[Pkg-golang-commits] [golang] 01/01: Fix some orig discrepancies...

Tianon Gravi tianon at debian.org
Mon Sep 14 19:28:06 UTC 2015


This is an automated email from the git hooks/post-receive script.

tianon pushed a commit to branch debian-sid
in repository golang.

commit 3a91c6e90e2ffc4abefa5334ac7aaf47e94d8201
Author: Tianon Gravi <tianon at debian.org>
Date:   Mon Sep 14 12:27:46 2015 -0700

    Fix some orig discrepancies...
---
 CONTRIBUTING.md                                    |   33 -
 README.md                                          |   45 -
 api/go1.5.txt                                      |  975 ----
 doc/articles/wiki/final-test.patch                 |   36 -
 doc/devel/pre_go1.html                             |  455 --
 doc/go1.5.html                                     | 1303 ------
 doc/progs/run.go                                   |  230 -
 misc/android/cleaner.go                            |   39 -
 misc/cgo/test/backdoor.go                          |   11 -
 misc/cgo/test/issue10303.go                        |   70 -
 misc/cgo/test/issue11925.go                        |   37 -
 misc/cgo/test/issue8945.go                         |   16 -
 misc/cgo/test/issue9400/asm_386.s                  |   26 -
 misc/cgo/test/issue9400/asm_amd64x.s               |   27 -
 misc/cgo/test/issue9400/asm_arm.s                  |   39 -
 misc/cgo/test/issue9400/asm_arm64.s                |   39 -
 misc/cgo/test/issue9400/asm_ppc64x.s               |   32 -
 misc/cgo/test/issue9400/gccgo.go                   |   24 -
 misc/cgo/test/issue9400/stubs.go                   |    9 -
 misc/cgo/test/issue9400_linux.go                   |   58 -
 misc/cgo/test/issue9557.go                         |   36 -
 misc/cgo/test/sigprocmask_linux.c                  |   36 -
 misc/cgo/test/sigprocmask_linux.go                 |   38 -
 misc/cgo/testcarchive/main.c                       |   34 -
 misc/cgo/testcarchive/src/libgo/libgo.go           |   53 -
 misc/cgo/testcarchive/src/p/p.go                   |   10 -
 misc/cgo/testcarchive/test.bash                    |   44 -
 misc/cgo/testcshared/main0.c                       |   36 -
 misc/cgo/testcshared/main1.c                       |   69 -
 misc/cgo/testcshared/main2.c                       |   56 -
 misc/cgo/testcshared/main3.c                       |   29 -
 misc/cgo/testcshared/src/libgo/libgo.go            |   46 -
 misc/cgo/testcshared/src/libgo2/libgo2.go          |   52 -
 misc/cgo/testcshared/src/p/p.go                    |   10 -
 misc/cgo/testcshared/test.bash                     |  129 -
 misc/cgo/testshared/shared_test.go                 |  674 ---
 misc/cgo/testshared/src/dep/asm.s                  |   10 -
 misc/cgo/testshared/src/dep/dep.go                 |   13 -
 misc/cgo/testshared/src/dep/gccgo.go               |    5 -
 misc/cgo/testshared/src/dep/stubs.go               |    5 -
 misc/cgo/testshared/src/dep2/dep2.go               |   11 -
 misc/cgo/testshared/src/exe/exe.go                 |   12 -
 misc/cgo/testshared/src/exe2/exe2.go               |    7 -
 misc/cgo/testshared/src/execgo/exe.go              |    8 -
 misc/cgo/testshared/src/trivial/trivial.go         |    4 -
 misc/cgo/testsigfwd/main.go                        |   58 -
 misc/cgo/testsovar/cgoso.go                        |   43 -
 misc/cgo/testsovar/cgoso_c.c                       |    7 -
 misc/cgo/testsovar/cgoso_c.h                       |   17 -
 misc/cgo/testsovar/main.go                         |   13 -
 misc/ios/README                                    |   44 -
 misc/ios/clangwrap.sh                              |   20 -
 misc/ios/detect.go                                 |  135 -
 misc/ios/go_darwin_arm_exec.go                     |  665 ---
 misc/trace/README.md                               |   38 -
 misc/trace/trace_viewer_lean.html                  | 4043 ----------------
 src/archive/tar/testdata/hardlink.tar              |  Bin 2560 -> 0 bytes
 src/archive/tar/testdata/issue10968.tar            |  Bin 512 -> 0 bytes
 src/archive/tar/testdata/issue11169.tar            |  Bin 602 -> 0 bytes
 src/archive/tar/testdata/neg-size.tar              |  Bin 512 -> 0 bytes
 src/bootstrap.bash                                 |   71 -
 src/buildall.bash                                  |   70 -
 src/cmd/asm/internal/arch/arch.go                  |  363 --
 src/cmd/asm/internal/arch/arm.go                   |  239 -
 src/cmd/asm/internal/arch/arm64.go                 |  115 -
 src/cmd/asm/internal/arch/ppc64.go                 |   87 -
 src/cmd/asm/internal/asm/asm.go                    |  657 ---
 src/cmd/asm/internal/asm/endtoend_test.go          |   91 -
 src/cmd/asm/internal/asm/expr_test.go              |  131 -
 src/cmd/asm/internal/asm/operand_test.go           |  429 --
 src/cmd/asm/internal/asm/parse.go                  |  983 ----
 src/cmd/asm/internal/asm/testdata/386.out          |   49 -
 src/cmd/asm/internal/asm/testdata/386.s            |   86 -
 src/cmd/asm/internal/asm/testdata/amd64.out        |   57 -
 src/cmd/asm/internal/asm/testdata/amd64.s          |  101 -
 src/cmd/asm/internal/asm/testdata/arm.out          |   59 -
 src/cmd/asm/internal/asm/testdata/arm.s            |  292 --
 src/cmd/asm/internal/asm/testdata/arm64.out        |   55 -
 src/cmd/asm/internal/asm/testdata/arm64.s          |  266 --
 src/cmd/asm/internal/asm/testdata/ppc64.out        |  114 -
 src/cmd/asm/internal/asm/testdata/ppc64.s          |  720 ---
 src/cmd/asm/internal/flags/flags.go                |   69 -
 src/cmd/asm/internal/lex/input.go                  |  464 --
 src/cmd/asm/internal/lex/lex.go                    |  157 -
 src/cmd/asm/internal/lex/lex_test.go               |  154 -
 src/cmd/asm/internal/lex/slice.go                  |   59 -
 src/cmd/asm/internal/lex/stack.go                  |   53 -
 src/cmd/asm/internal/lex/tokenizer.go              |  152 -
 src/cmd/asm/main.go                                |   67 -
 src/cmd/compile/doc.go                             |  127 -
 src/cmd/compile/internal/amd64/cgen.go             |  151 -
 src/cmd/compile/internal/amd64/galign.go           |  129 -
 src/cmd/compile/internal/amd64/ggen.go             |  743 ---
 src/cmd/compile/internal/amd64/gsubr.go            | 1380 ------
 src/cmd/compile/internal/amd64/peep.go             | 1038 -----
 src/cmd/compile/internal/amd64/prog.go             |  308 --
 src/cmd/compile/internal/amd64/reg.go              |  152 -
 src/cmd/compile/internal/arm/cgen.go               |  229 -
 src/cmd/compile/internal/arm/cgen64.go             |  859 ----
 src/cmd/compile/internal/arm/galign.go             |   94 -
 src/cmd/compile/internal/arm/ggen.go               |  529 ---
 src/cmd/compile/internal/arm/gsubr.go              | 1209 -----
 src/cmd/compile/internal/arm/peep.go               | 1748 -------
 src/cmd/compile/internal/arm/prog.go               |  165 -
 src/cmd/compile/internal/arm/reg.go                |  136 -
 src/cmd/compile/internal/arm64/cgen.go             |  157 -
 src/cmd/compile/internal/arm64/galign.go           |   93 -
 src/cmd/compile/internal/arm64/ggen.go             |  534 ---
 src/cmd/compile/internal/arm64/gsubr.go            |  983 ----
 src/cmd/compile/internal/arm64/peep.go             |  809 ----
 src/cmd/compile/internal/arm64/prog.go             |  174 -
 src/cmd/compile/internal/arm64/reg.go              |  169 -
 src/cmd/compile/internal/big/accuracy_string.go    |   17 -
 src/cmd/compile/internal/big/arith.go              |  305 --
 src/cmd/compile/internal/big/arith_decl.go         |   53 -
 src/cmd/compile/internal/big/arith_test.go         |  457 --
 src/cmd/compile/internal/big/bits_test.go          |  224 -
 src/cmd/compile/internal/big/calibrate_test.go     |   88 -
 src/cmd/compile/internal/big/decimal.go            |  264 --
 src/cmd/compile/internal/big/decimal_test.go       |  106 -
 src/cmd/compile/internal/big/example_test.go       |   51 -
 src/cmd/compile/internal/big/float.go              | 1693 -------
 src/cmd/compile/internal/big/float_test.go         | 1694 -------
 src/cmd/compile/internal/big/floatconv.go          |  239 -
 src/cmd/compile/internal/big/floatconv_test.go     |  573 ---
 src/cmd/compile/internal/big/floatexample_test.go  |  111 -
 src/cmd/compile/internal/big/ftoa.go               |  393 --
 src/cmd/compile/internal/big/gcd_test.go           |   47 -
 src/cmd/compile/internal/big/hilbert_test.go       |  160 -
 src/cmd/compile/internal/big/int.go                |  966 ----
 src/cmd/compile/internal/big/int_test.go           | 1525 ------
 src/cmd/compile/internal/big/intconv.go            |  228 -
 src/cmd/compile/internal/big/intconv_test.go       |  342 --
 src/cmd/compile/internal/big/nat.go                | 1274 -----
 src/cmd/compile/internal/big/nat_test.go           |  579 ---
 src/cmd/compile/internal/big/natconv.go            |  495 --
 src/cmd/compile/internal/big/natconv_test.go       |  425 --
 src/cmd/compile/internal/big/rat.go                |  570 ---
 src/cmd/compile/internal/big/rat_test.go           |  736 ---
 src/cmd/compile/internal/big/ratconv.go            |  251 -
 src/cmd/compile/internal/big/ratconv_test.go       |  451 --
 .../compile/internal/big/roundingmode_string.go    |   16 -
 src/cmd/compile/internal/big/vendor.bash           |   31 -
 src/cmd/compile/internal/gc/align.go               |  713 ---
 src/cmd/compile/internal/gc/builtin.go             |  169 -
 src/cmd/compile/internal/gc/builtin/runtime.go     |  195 -
 src/cmd/compile/internal/gc/builtin/unsafe.go      |   18 -
 src/cmd/compile/internal/gc/bv.go                  |  195 -
 src/cmd/compile/internal/gc/cgen.go                | 3566 --------------
 src/cmd/compile/internal/gc/closure.go             |  690 ---
 src/cmd/compile/internal/gc/const.go               | 1715 -------
 src/cmd/compile/internal/gc/cplx.go                |  479 --
 src/cmd/compile/internal/gc/dcl.go                 | 1513 ------
 src/cmd/compile/internal/gc/esc.go                 | 1821 --------
 src/cmd/compile/internal/gc/export.go              |  561 ---
 src/cmd/compile/internal/gc/fmt.go                 | 1724 -------
 src/cmd/compile/internal/gc/gen.go                 | 1276 -----
 src/cmd/compile/internal/gc/go.go                  |  870 ----
 src/cmd/compile/internal/gc/go.y                   | 2316 ---------
 src/cmd/compile/internal/gc/gsubr.go               |  836 ----
 src/cmd/compile/internal/gc/init.go                |  189 -
 src/cmd/compile/internal/gc/inl.go                 |  995 ----
 src/cmd/compile/internal/gc/lex.go                 | 2653 -----------
 src/cmd/compile/internal/gc/mkbuiltin.go           |   97 -
 src/cmd/compile/internal/gc/mparith2.go            |  300 --
 src/cmd/compile/internal/gc/mparith3.go            |  250 -
 src/cmd/compile/internal/gc/obj.go                 |  450 --
 src/cmd/compile/internal/gc/opnames.go             |  163 -
 src/cmd/compile/internal/gc/order.go               | 1179 -----
 src/cmd/compile/internal/gc/pgen.go                |  544 ---
 src/cmd/compile/internal/gc/plive.go               | 1830 --------
 src/cmd/compile/internal/gc/popt.go                | 1086 -----
 src/cmd/compile/internal/gc/racewalk.go            |  622 ---
 src/cmd/compile/internal/gc/range.go               |  406 --
 src/cmd/compile/internal/gc/reflect.go             | 1607 -------
 src/cmd/compile/internal/gc/reg.go                 | 1559 -------
 src/cmd/compile/internal/gc/select.go              |  369 --
 src/cmd/compile/internal/gc/sinit.go               | 1551 -------
 src/cmd/compile/internal/gc/subr.go                | 3589 --------------
 src/cmd/compile/internal/gc/swt.go                 |  848 ----
 src/cmd/compile/internal/gc/syntax.go              |  484 --
 src/cmd/compile/internal/gc/typecheck.go           | 4035 ----------------
 src/cmd/compile/internal/gc/unsafe.go              |  165 -
 src/cmd/compile/internal/gc/util.go                |  103 -
 src/cmd/compile/internal/gc/walk.go                | 4069 ----------------
 src/cmd/compile/internal/gc/y.go                   | 3526 --------------
 src/cmd/compile/internal/ppc64/cgen.go             |  149 -
 src/cmd/compile/internal/ppc64/galign.go           |  100 -
 src/cmd/compile/internal/ppc64/ggen.go             |  564 ---
 src/cmd/compile/internal/ppc64/gsubr.go            | 1031 ----
 src/cmd/compile/internal/ppc64/opt.go              |   12 -
 src/cmd/compile/internal/ppc64/peep.go             | 1051 -----
 src/cmd/compile/internal/ppc64/prog.go             |  314 --
 src/cmd/compile/internal/ppc64/reg.go              |  162 -
 src/cmd/compile/internal/x86/cgen.go               |  159 -
 src/cmd/compile/internal/x86/cgen64.go             |  598 ---
 src/cmd/compile/internal/x86/galign.go             |  110 -
 src/cmd/compile/internal/x86/ggen.go               |  940 ----
 src/cmd/compile/internal/x86/gsubr.go              | 1801 -------
 src/cmd/compile/internal/x86/peep.go               |  814 ----
 src/cmd/compile/internal/x86/prog.go               |  292 --
 src/cmd/compile/internal/x86/reg.go                |  110 -
 src/cmd/compile/main.go                            |   34 -
 src/cmd/cover/cover.go                             |  722 ---
 src/cmd/cover/cover_test.go                        |   92 -
 src/cmd/cover/doc.go                               |   21 -
 src/cmd/cover/func.go                              |  164 -
 src/cmd/cover/html.go                              |  279 --
 src/cmd/cover/profile.go                           |  192 -
 src/cmd/cover/testdata/main.go                     |  112 -
 src/cmd/cover/testdata/test.go                     |  218 -
 src/cmd/dist/build.go                              | 1202 -----
 src/cmd/dist/buildgo.go                            |   39 -
 src/cmd/dist/buildruntime.go                       |   96 -
 src/cmd/dist/buildtool.go                          |  144 -
 src/cmd/dist/cpuid_386.s                           |   16 -
 src/cmd/dist/cpuid_amd64.s                         |   16 -
 src/cmd/dist/cpuid_default.s                       |   10 -
 src/cmd/dist/main.go                               |   86 -
 src/cmd/dist/sys_default.go                        |   10 -
 src/cmd/dist/sys_windows.go                        |   49 -
 src/cmd/dist/test.go                               |  866 ----
 src/cmd/dist/util.go                               |  559 ---
 src/cmd/dist/util_gc.go                            |   19 -
 src/cmd/dist/util_gccgo.go                         |   20 -
 src/cmd/doc/doc_test.go                            |  348 --
 src/cmd/doc/main.go                                |  354 --
 src/cmd/doc/pkg.go                                 |  552 ---
 src/cmd/doc/testdata/pkg.go                        |   96 -
 src/cmd/fix/gotypes.go                             |   75 -
 src/cmd/fix/gotypes_test.go                        |   89 -
 src/cmd/go/alldocs.go                              | 1482 ------
 src/cmd/go/go_test.go                              | 2389 ----------
 src/cmd/go/mkalldocs.sh                            |   12 -
 src/cmd/go/note.go                                 |  116 -
 src/cmd/go/note_test.go                            |   49 -
 src/cmd/go/testdata/failssh/ssh                    |    2 -
 src/cmd/go/testdata/generate/test4.go              |   10 -
 src/cmd/go/testdata/rundir/sub/sub.go              |    1 -
 src/cmd/go/testdata/rundir/x.go                    |    1 -
 src/cmd/go/testdata/src/testcycle/q1/q1.go         |    1 -
 src/cmd/go/testdata/src/testcycle/q1/q1_test.go    |    6 -
 src/cmd/go/testdata/src/testdep/p1/p1.go           |    1 -
 src/cmd/go/testdata/src/testdep/p1/p1_test.go      |    3 -
 src/cmd/go/testdata/src/testdep/p2/p2.go           |    3 -
 src/cmd/go/testdata/src/testdep/p3/p3.go           |    3 -
 src/cmd/go/testdata/src/vend/bad.go                |    3 -
 src/cmd/go/testdata/src/vend/good.go               |    3 -
 src/cmd/go/testdata/src/vend/hello/hello.go        |   10 -
 src/cmd/go/testdata/src/vend/hello/hello_test.go   |   12 -
 src/cmd/go/testdata/src/vend/hello/hellox_test.go  |   12 -
 src/cmd/go/testdata/src/vend/subdir/bad.go         |    3 -
 src/cmd/go/testdata/src/vend/subdir/good.go        |    3 -
 src/cmd/go/testdata/src/vend/vendor/p/p.go         |    1 -
 src/cmd/go/testdata/src/vend/vendor/q/q.go         |    1 -
 src/cmd/go/testdata/src/vend/vendor/strings/msg.go |    3 -
 src/cmd/go/testdata/src/vend/x/invalid/invalid.go  |    3 -
 src/cmd/go/testdata/src/vend/x/vendor/p/p.go       |    1 -
 src/cmd/go/testdata/src/vend/x/vendor/p/p/p.go     |    3 -
 src/cmd/go/testdata/src/vend/x/vendor/r/r.go       |    1 -
 src/cmd/go/testdata/src/vend/x/x.go                |    5 -
 src/cmd/go/testdata/src/vetpkg/c.go                |    9 -
 src/cmd/go/testdata/testinternal3/t.go             |    3 -
 src/cmd/go/testdata/testinternal4/src/p/p.go       |    6 -
 .../testdata/testinternal4/src/q/internal/x/x.go   |    1 -
 src/cmd/go/testdata/testinternal4/src/q/j/j.go     |    3 -
 src/cmd/go/testdata/testvendor/src/p/p.go          |    6 -
 src/cmd/go/testdata/testvendor/src/q/vendor/x/x.go |    1 -
 src/cmd/go/testdata/testvendor/src/q/y/y.go        |    3 -
 src/cmd/go/testdata/testvendor/src/q/z/z.go        |    3 -
 src/cmd/go/testdata/testvendor2/src/p/p.go         |    3 -
 src/cmd/go/testdata/testvendor2/vendor/x/x.go      |    1 -
 src/cmd/go/vendor_test.go                          |  258 -
 src/cmd/internal/gcprog/gcprog.go                  |  298 --
 src/cmd/internal/obj/ar.go                         |   45 -
 src/cmd/internal/obj/arm/a.out.go                  |  328 --
 src/cmd/internal/obj/arm/anames.go                 |  108 -
 src/cmd/internal/obj/arm/anames5.go                |   70 -
 src/cmd/internal/obj/arm/asm5.go                   | 2855 ------------
 src/cmd/internal/obj/arm/list5.go                  |   83 -
 src/cmd/internal/obj/arm/obj5.go                   | 1020 ----
 src/cmd/internal/obj/arm64/a.out.go                |  711 ---
 src/cmd/internal/obj/arm64/anames.go               |  379 --
 src/cmd/internal/obj/arm64/anames7.go              |   62 -
 src/cmd/internal/obj/arm64/asm7.go                 | 4158 -----------------
 src/cmd/internal/obj/arm64/list7.go                |  114 -
 src/cmd/internal/obj/arm64/obj7.go                 |  836 ----
 src/cmd/internal/obj/data.go                       |  268 --
 src/cmd/internal/obj/flag.go                       |  120 -
 src/cmd/internal/obj/fmt.go                        |   34 -
 src/cmd/internal/obj/funcdata.go                   |   79 -
 src/cmd/internal/obj/go.go                         |   83 -
 src/cmd/internal/obj/ld.go                         |   92 -
 src/cmd/internal/obj/libc.go                       |   12 -
 src/cmd/internal/obj/line_test.go                  |   51 -
 src/cmd/internal/obj/link.go                       |  569 ---
 src/cmd/internal/obj/mgc0.go                       |   30 -
 src/cmd/internal/obj/obj.go                        |  283 --
 src/cmd/internal/obj/objfile.go                    |  523 ---
 src/cmd/internal/obj/pass.go                       |  216 -
 src/cmd/internal/obj/pcln.go                       |  338 --
 src/cmd/internal/obj/ppc64/a.out.go                |  538 ---
 src/cmd/internal/obj/ppc64/anames.go               |  300 --
 src/cmd/internal/obj/ppc64/anames9.go              |   40 -
 src/cmd/internal/obj/ppc64/asm9.go                 | 3247 -------------
 src/cmd/internal/obj/ppc64/list9.go                |   98 -
 src/cmd/internal/obj/ppc64/obj9.go                 |  968 ----
 src/cmd/internal/obj/stack.go                      |   51 -
 src/cmd/internal/obj/stringer.go                   |  104 -
 src/cmd/internal/obj/sym.go                        |  213 -
 src/cmd/internal/obj/textflag.go                   |   38 -
 src/cmd/internal/obj/typekind.go                   |   41 -
 src/cmd/internal/obj/util.go                       |  645 ---
 src/cmd/internal/obj/x86/a.out.go                  |  910 ----
 src/cmd/internal/obj/x86/anames.go                 |  696 ---
 src/cmd/internal/obj/x86/asm6.go                   | 4380 -----------------
 src/cmd/internal/obj/x86/list6.go                  |  164 -
 src/cmd/internal/obj/x86/obj6.go                   | 1330 ------
 src/cmd/internal/obj/x86/obj6_test.go              |  170 -
 src/cmd/link/doc.go                                |   93 -
 src/cmd/link/internal/amd64/asm.go                 |  817 ----
 src/cmd/link/internal/amd64/l.go                   |   47 -
 src/cmd/link/internal/amd64/obj.go                 |  214 -
 src/cmd/link/internal/amd64/z.go                   |    1 -
 src/cmd/link/internal/arm/asm.go                   |  651 ---
 src/cmd/link/internal/arm/l.go                     |   79 -
 src/cmd/link/internal/arm/obj.go                   |  178 -
 src/cmd/link/internal/arm64/asm.go                 |  435 --
 src/cmd/link/internal/arm64/l.go                   |   78 -
 src/cmd/link/internal/arm64/obj.go                 |  169 -
 src/cmd/link/internal/ld/ar.go                     |   52 -
 src/cmd/link/internal/ld/arch.go                   |   70 -
 src/cmd/link/internal/ld/data.go                   | 1764 -------
 src/cmd/link/internal/ld/decodesym.go              |  226 -
 src/cmd/link/internal/ld/dwarf.go                  | 2624 -----------
 src/cmd/link/internal/ld/dwarf_defs.go             |  516 --
 src/cmd/link/internal/ld/elf.go                    | 2595 -----------
 src/cmd/link/internal/ld/go.go                     |  869 ----
 src/cmd/link/internal/ld/ld.go                     |  130 -
 src/cmd/link/internal/ld/ldelf.go                  | 1019 ----
 src/cmd/link/internal/ld/ldmacho.go                |  893 ----
 src/cmd/link/internal/ld/ldpe.go                   |  534 ---
 src/cmd/link/internal/ld/lib.go                    | 2049 --------
 src/cmd/link/internal/ld/link.go                   |  227 -
 src/cmd/link/internal/ld/macho.go                  |  860 ----
 src/cmd/link/internal/ld/macho_combine_dwarf.go    |  370 --
 src/cmd/link/internal/ld/objfile.go                |  482 --
 src/cmd/link/internal/ld/pcln.go                   |  471 --
 src/cmd/link/internal/ld/pe.go                     | 1254 -----
 src/cmd/link/internal/ld/pobj.go                   |  259 --
 src/cmd/link/internal/ld/sym.go                    |  227 -
 src/cmd/link/internal/ld/symtab.go                 |  541 ---
 src/cmd/link/internal/ld/textflag.go               |   29 -
 src/cmd/link/internal/ld/util.go                   |  172 -
 src/cmd/link/internal/ppc64/asm.go                 |  737 ---
 src/cmd/link/internal/ppc64/l.go                   |   78 -
 src/cmd/link/internal/ppc64/obj.go                 |  162 -
 src/cmd/link/internal/x86/asm.go                   |  643 ---
 src/cmd/link/internal/x86/l.go                     |   47 -
 src/cmd/link/internal/x86/obj.go                   |  187 -
 src/cmd/link/main.go                               |   34 -
 src/cmd/pprof/internal/profile/profile_test.go     |   24 -
 src/cmd/pprof/internal/svg/svgpan.go               |  291 --
 src/cmd/trace/goroutines.go                        |  168 -
 src/cmd/trace/main.go                              |  156 -
 src/cmd/trace/pprof.go                             |  166 -
 src/cmd/trace/trace.go                             |  445 --
 src/cmd/vet/asmdecl.go                             |  662 ---
 src/cmd/vet/assign.go                              |   49 -
 src/cmd/vet/atomic.go                              |   66 -
 src/cmd/vet/bool.go                                |  186 -
 src/cmd/vet/buildtag.go                            |   91 -
 src/cmd/vet/composite.go                           |  124 -
 src/cmd/vet/copylock.go                            |  156 -
 src/cmd/vet/deadcode.go                            |  296 --
 src/cmd/vet/doc.go                                 |  191 -
 src/cmd/vet/main.go                                |  486 --
 src/cmd/vet/method.go                              |  182 -
 src/cmd/vet/nilfunc.go                             |   67 -
 src/cmd/vet/print.go                               |  586 ---
 src/cmd/vet/rangeloop.go                           |   70 -
 src/cmd/vet/shadow.go                              |  244 -
 src/cmd/vet/shift.go                               |   82 -
 src/cmd/vet/structtag.go                           |  122 -
 src/cmd/vet/testdata/asm.go                        |   33 -
 src/cmd/vet/testdata/asm1.s                        |  254 -
 src/cmd/vet/testdata/asm2.s                        |  257 -
 src/cmd/vet/testdata/asm3.s                        |  178 -
 src/cmd/vet/testdata/asm4.s                        |   26 -
 src/cmd/vet/testdata/assign.go                     |   18 -
 src/cmd/vet/testdata/atomic.go                     |   43 -
 src/cmd/vet/testdata/bool.go                       |  113 -
 src/cmd/vet/testdata/buildtag.go                   |   14 -
 src/cmd/vet/testdata/buildtag_bad.go               |   15 -
 src/cmd/vet/testdata/composite.go                  |   63 -
 src/cmd/vet/testdata/copylock_func.go              |   95 -
 src/cmd/vet/testdata/copylock_range.go             |   67 -
 src/cmd/vet/testdata/deadcode.go                   | 2125 ---------
 src/cmd/vet/testdata/method.go                     |   22 -
 src/cmd/vet/testdata/nilfunc.go                    |   35 -
 src/cmd/vet/testdata/print.go                      |  342 --
 src/cmd/vet/testdata/rangeloop.go                  |   59 -
 src/cmd/vet/testdata/shadow.go                     |   54 -
 src/cmd/vet/testdata/shift.go                      |   78 -
 src/cmd/vet/testdata/structtag.go                  |   36 -
 src/cmd/vet/testdata/tagtest/file1.go              |   10 -
 src/cmd/vet/testdata/tagtest/file2.go              |   10 -
 src/cmd/vet/testdata/unsafeptr.go                  |   61 -
 src/cmd/vet/testdata/unused.go                     |   29 -
 src/cmd/vet/types.go                               |  370 --
 src/cmd/vet/unsafeptr.go                           |   97 -
 src/cmd/vet/unused.go                              |   93 -
 src/cmd/vet/vet_test.go                            |  107 -
 src/cmd/vet/whitelist/whitelist.go                 |   53 -
 src/crypto/rand/eagain.go                          |   27 -
 .../Client-TLSv12-ClientCert-RSA-AES256-GCM-SHA384 |  139 -
 .../Client-TLSv12-ECDHE-ECDSA-AES256-GCM-SHA384    |   85 -
 src/crypto/tls/testdata/Client-TLSv12-SCT          |  118 -
 .../testdata/Server-TLSv12-RSA-AES256-GCM-SHA384   |   87 -
 .../tls/testdata/Server-TLSv12-SNI-GetCertificate  |   64 -
 .../Server-TLSv12-SNI-GetCertificateNotFound       |   64 -
 src/crypto/x509/root_bsd.go                        |   14 -
 src/crypto/x509/root_darwin_arm_gen.go             |  191 -
 src/crypto/x509/root_darwin_armx.go                | 4907 --------------------
 src/crypto/x509/root_linux.go                      |   13 -
 src/crypto/x509/root_nacl.go                       |    8 -
 src/crypto/x509/root_solaris.go                    |   12 -
 src/crypto/x509/sha2_windows_test.go               |   19 -
 src/debug/dwarf/class_string.go                    |   17 -
 src/debug/dwarf/line.go                            |  590 ---
 src/debug/dwarf/line_test.go                       |  229 -
 src/debug/dwarf/testdata/line-clang.elf            |  Bin 10271 -> 0 bytes
 src/debug/dwarf/testdata/line-gcc.elf              |  Bin 10113 -> 0 bytes
 src/debug/dwarf/testdata/line1.c                   |    9 -
 src/debug/dwarf/testdata/line1.h                   |    7 -
 src/debug/dwarf/testdata/line2.c                   |    6 -
 .../elf/testdata/go-relocation-test-clang-arm.obj  |  Bin 3092 -> 0 bytes
 .../testdata/go-relocation-test-gcc482-ppc64le.obj |  Bin 3016 -> 0 bytes
 .../elf/testdata/go-relocation-test-gcc492-arm.obj |  Bin 2648 -> 0 bytes
 .../elf/testdata/go-relocation-test-gcc5-ppc.obj   |  Bin 2356 -> 0 bytes
 src/encoding/csv/example_test.go                   |  131 -
 src/fmt/norace_test.go                             |    9 -
 src/fmt/race_test.go                               |    9 -
 src/go/constant/go13.go                            |   24 -
 src/go/constant/go14.go                            |   13 -
 src/go/constant/value.go                           |  925 ----
 src/go/constant/value_test.go                      |  375 --
 src/go/importer/importer.go                        |   69 -
 src/go/internal/gccgoimporter/gccgoinstallation.go |   94 -
 .../gccgoimporter/gccgoinstallation_test.go        |  193 -
 src/go/internal/gccgoimporter/importer.go          |  212 -
 src/go/internal/gccgoimporter/importer_test.go     |  171 -
 src/go/internal/gccgoimporter/parser.go            |  855 ----
 src/go/internal/gccgoimporter/parser_test.go       |   72 -
 .../internal/gccgoimporter/testdata/complexnums.go |    6 -
 .../gccgoimporter/testdata/complexnums.gox         |    8 -
 src/go/internal/gccgoimporter/testdata/imports.go  |    5 -
 src/go/internal/gccgoimporter/testdata/imports.gox |    7 -
 src/go/internal/gccgoimporter/testdata/pointer.go  |    3 -
 src/go/internal/gccgoimporter/testdata/pointer.gox |    4 -
 src/go/internal/gcimporter/exportdata.go           |  108 -
 src/go/internal/gcimporter/gcimporter.go           |  991 ----
 src/go/internal/gcimporter/gcimporter_test.go      |  225 -
 src/go/internal/gcimporter/testdata/exports.go     |   89 -
 src/go/types/api.go                                |  336 --
 src/go/types/api_test.go                           | 1044 -----
 src/go/types/assignments.go                        |  328 --
 src/go/types/builtins.go                           |  627 ---
 src/go/types/builtins_test.go                      |  204 -
 src/go/types/call.go                               |  441 --
 src/go/types/check.go                              |  358 --
 src/go/types/check_test.go                         |  298 --
 src/go/types/conversions.go                        |  146 -
 src/go/types/decl.go                               |  430 --
 src/go/types/errors.go                             |  103 -
 src/go/types/eval.go                               |   83 -
 src/go/types/eval_test.go                          |  188 -
 src/go/types/example_test.go                       |  312 --
 src/go/types/expr.go                               | 1496 ------
 src/go/types/exprstring.go                         |  220 -
 src/go/types/exprstring_test.go                    |   94 -
 src/go/types/go11.go                               |   17 -
 src/go/types/go12.go                               |   17 -
 src/go/types/hilbert_test.go                       |  234 -
 src/go/types/initorder.go                          |  222 -
 src/go/types/issues_test.go                        |  206 -
 src/go/types/labels.go                             |  268 --
 src/go/types/lookup.go                             |  341 --
 src/go/types/methodset.go                          |  268 --
 src/go/types/object.go                             |  360 --
 src/go/types/objset.go                             |   31 -
 src/go/types/operand.go                            |  287 --
 src/go/types/ordering.go                           |  127 -
 src/go/types/package.go                            |   65 -
 src/go/types/predicates.go                         |  309 --
 src/go/types/resolver.go                           |  445 --
 src/go/types/resolver_test.go                      |  209 -
 src/go/types/return.go                             |  185 -
 src/go/types/scope.go                              |  190 -
 src/go/types/selection.go                          |  143 -
 src/go/types/self_test.go                          |  102 -
 src/go/types/sizes.go                              |  211 -
 src/go/types/stdlib_test.go                        |  279 --
 src/go/types/stmt.go                               |  744 ---
 src/go/types/testdata/blank.src                    |    5 -
 src/go/types/testdata/builtins.src                 |  881 ----
 src/go/types/testdata/const0.src                   |  282 --
 src/go/types/testdata/const1.src                   |  314 --
 src/go/types/testdata/constdecl.src                |   97 -
 src/go/types/testdata/conversions.src              |   93 -
 src/go/types/testdata/cycles.src                   |  143 -
 src/go/types/testdata/cycles1.src                  |   77 -
 src/go/types/testdata/cycles2.src                  |  118 -
 src/go/types/testdata/cycles3.src                  |   60 -
 src/go/types/testdata/cycles4.src                  |  110 -
 src/go/types/testdata/decls0.src                   |  207 -
 src/go/types/testdata/decls1.src                   |  144 -
 src/go/types/testdata/decls2a.src                  |  111 -
 src/go/types/testdata/decls2b.src                  |   65 -
 src/go/types/testdata/decls3.src                   |  309 --
 src/go/types/testdata/errors.src                   |   55 -
 src/go/types/testdata/expr0.src                    |  174 -
 src/go/types/testdata/expr1.src                    |    7 -
 src/go/types/testdata/expr2.src                    |  247 -
 src/go/types/testdata/expr3.src                    |  534 ---
 src/go/types/testdata/gotos.src                    |  560 ---
 src/go/types/testdata/importdecl0a.src             |   53 -
 src/go/types/testdata/importdecl0b.src             |   33 -
 src/go/types/testdata/importdecl1a.src             |   11 -
 src/go/types/testdata/importdecl1b.src             |    7 -
 src/go/types/testdata/init0.src                    |  106 -
 src/go/types/testdata/init1.src                    |   97 -
 src/go/types/testdata/init2.src                    |  139 -
 src/go/types/testdata/issues.src                   |   97 -
 src/go/types/testdata/labels.src                   |  207 -
 src/go/types/testdata/methodsets.src               |  214 -
 src/go/types/testdata/shifts.src                   |  341 --
 src/go/types/testdata/stmt0.src                    |  833 ----
 src/go/types/testdata/stmt1.src                    |  165 -
 src/go/types/testdata/vardecl.src                  |  186 -
 src/go/types/token_test.go                         |   47 -
 src/go/types/type.go                               |  454 --
 src/go/types/typestring.go                         |  296 --
 src/go/types/typestring_test.go                    |  168 -
 src/go/types/typexpr.go                            |  712 ---
 src/go/types/universe.go                           |  223 -
 src/hash/crc32/example_test.go                     |   28 -
 src/html/example_test.go                           |   22 -
 src/html/template/example_test.go                  |  122 -
 src/html/template/transition_test.go               |   60 -
 src/image/geom_test.go                             |  115 -
 src/image/internal/imageutil/gen.go                |  154 -
 src/image/internal/imageutil/imageutil.go          |    8 -
 src/image/internal/imageutil/impl.go               |  196 -
 .../png/testdata/gray-gradient.interlaced.png      |  Bin 247 -> 0 bytes
 src/image/png/testdata/gray-gradient.png           |  Bin 77 -> 0 bytes
 src/image/testdata/video-001.221212.jpeg           |  Bin 19263 -> 0 bytes
 src/image/testdata/video-001.221212.png            |  Bin 29820 -> 0 bytes
 src/image/testdata/video-001.cmyk.jpeg             |  Bin 19477 -> 0 bytes
 src/image/testdata/video-001.cmyk.png              |  Bin 25439 -> 0 bytes
 src/image/testdata/video-001.q50.410.jpeg          |  Bin 3259 -> 0 bytes
 .../testdata/video-001.q50.410.progressive.jpeg    |  Bin 3125 -> 0 bytes
 src/image/testdata/video-001.q50.411.jpeg          |  Bin 3362 -> 0 bytes
 .../testdata/video-001.q50.411.progressive.jpeg    |  Bin 3251 -> 0 bytes
 src/image/testdata/video-001.rgb.jpeg              |  Bin 6237 -> 0 bytes
 src/image/testdata/video-001.rgb.png               |  Bin 20414 -> 0 bytes
 src/internal/format/format.go                      |  163 -
 src/internal/singleflight/singleflight.go          |  111 -
 src/internal/singleflight/singleflight_test.go     |   87 -
 src/internal/syscall/unix/getrandom_linux.go       |   58 -
 .../syscall/windows/registry/export_test.go        |   11 -
 src/internal/syscall/windows/registry/key.go       |  175 -
 .../syscall/windows/registry/registry_test.go      |  678 ---
 src/internal/syscall/windows/registry/syscall.go   |   28 -
 src/internal/syscall/windows/registry/value.go     |  330 --
 .../syscall/windows/registry/zsyscall_windows.go   |   73 -
 src/internal/syscall/windows/syscall_windows.go    |  130 -
 src/internal/syscall/windows/zsyscall_windows.go   |   49 -
 src/internal/testenv/testenv.go                    |  101 -
 src/internal/trace/goroutines.go                   |  180 -
 src/internal/trace/parser.go                       |  786 ----
 src/internal/trace/parser_test.go                  |   30 -
 src/iostest.bash                                   |   69 -
 src/log/syslog/doc.go                              |   18 -
 src/math/abs_arm64.s                               |   11 -
 src/math/abs_ppc64x.s                              |   14 -
 src/math/big/accuracy_string.go                    |   17 -
 src/math/big/arith_arm64.s                         |  177 -
 src/math/big/arith_decl_pure.go                    |   55 -
 src/math/big/arith_ppc64x.s                        |   46 -
 src/math/big/bits_test.go                          |  224 -
 src/math/big/decimal.go                            |  264 --
 src/math/big/decimal_test.go                       |  106 -
 src/math/big/float.go                              | 1693 -------
 src/math/big/float_test.go                         | 1694 -------
 src/math/big/floatconv.go                          |  239 -
 src/math/big/floatconv_test.go                     |  573 ---
 src/math/big/floatexample_test.go                  |  111 -
 src/math/big/ftoa.go                               |  393 --
 src/math/big/intconv.go                            |  228 -
 src/math/big/intconv_test.go                       |  342 --
 src/math/big/natconv.go                            |  495 --
 src/math/big/natconv_test.go                       |  425 --
 src/math/big/ratconv.go                            |  252 -
 src/math/big/ratconv_test.go                       |  453 --
 src/math/big/roundingmode_string.go                |   16 -
 src/math/sqrt_arm64.s                              |   12 -
 src/math/stubs_arm64.s                             |   88 -
 src/math/stubs_ppc64x.s                            |   91 -
 src/mime/encodedword.go                            |  329 --
 src/mime/encodedword_test.go                       |  287 --
 src/mime/quotedprintable/reader.go                 |  124 -
 src/mime/quotedprintable/reader_test.go            |  204 -
 src/mime/quotedprintable/writer.go                 |  172 -
 src/mime/quotedprintable/writer_test.go            |  158 -
 src/mime/type_dragonfly.go                         |    9 -
 src/mime/type_freebsd.go                           |    9 -
 src/mime/type_openbsd.go                           |    9 -
 src/net/addrselect.go                              |  388 --
 src/net/addrselect_test.go                         |  219 -
 src/net/cgo_resnew.go                              |   23 -
 src/net/cgo_resold.go                              |   23 -
 src/net/cgo_socknew.go                             |   33 -
 src/net/cgo_sockold.go                             |   33 -
 src/net/cgo_solaris.go                             |   15 -
 src/net/cgo_windows.go                             |   13 -
 src/net/conf.go                                    |  308 --
 src/net/conf_netcgo.go                             |   18 -
 src/net/conf_test.go                               |  301 --
 src/net/error_plan9_test.go                        |   17 -
 src/net/error_posix_test.go                        |   44 -
 src/net/error_test.go                              |  673 ---
 src/net/external_test.go                           |  167 -
 src/net/fd_posix.go                                |   21 -
 src/net/fd_posix_test.go                           |   57 -
 src/net/file.go                                    |   48 -
 src/net/hook.go                                    |   12 -
 src/net/hook_cloexec.go                            |   14 -
 src/net/hook_plan9.go                              |    9 -
 src/net/hook_unix.go                               |   21 -
 src/net/hook_windows.go                            |   21 -
 src/net/http/http_test.go                          |   58 -
 src/net/internal/socktest/main_test.go             |   56 -
 src/net/internal/socktest/main_unix_test.go        |   24 -
 src/net/internal/socktest/main_windows_test.go     |   22 -
 src/net/internal/socktest/switch.go                |  169 -
 src/net/internal/socktest/switch_posix.go          |   58 -
 src/net/internal/socktest/switch_stub.go           |   16 -
 src/net/internal/socktest/switch_unix.go           |   29 -
 src/net/internal/socktest/switch_windows.go        |   29 -
 src/net/internal/socktest/sys_cloexec.go           |   42 -
 src/net/internal/socktest/sys_unix.go              |  193 -
 src/net/internal/socktest/sys_windows.go           |  156 -
 src/net/listen_test.go                             |  685 ---
 src/net/mail/example_test.go                       |   77 -
 src/net/main_cloexec_test.go                       |   25 -
 src/net/main_plan9_test.go                         |   15 -
 src/net/main_posix_test.go                         |   50 -
 src/net/main_test.go                               |  204 -
 src/net/main_unix_test.go                          |   52 -
 src/net/main_windows_test.go                       |   36 -
 src/net/non_unix_test.go                           |   11 -
 src/net/nss.go                                     |  159 -
 src/net/nss_test.go                                |  169 -
 src/net/platform_test.go                           |  159 -
 src/net/sendfile_solaris.go                        |  110 -
 src/net/tcpsockopt_solaris.go                      |   35 -
 src/net/testdata/ipv4-hosts                        |   12 -
 src/net/testdata/ipv6-hosts                        |   11 -
 src/net/testdata/openbsd-resolv.conf               |    5 -
 src/net/testdata/singleline-hosts                  |    1 -
 src/os/exec/exec_posix.go                          |   24 -
 src/os/signal/signal_plan9.go                      |   60 -
 src/os/signal/signal_plan9_test.go                 |  181 -
 src/os/sticky_bsd.go                               |   11 -
 src/os/sticky_notbsd.go                            |   14 -
 src/reflect/asm_arm64.s                            |   30 -
 src/reflect/asm_ppc64x.s                           |   32 -
 src/regexp/backtrack.go                            |  366 --
 src/runtime/arch1_386.go                           |   15 -
 src/runtime/arch1_amd64.go                         |   15 -
 src/runtime/arch1_amd64p32.go                      |   15 -
 src/runtime/arch1_arm.go                           |   15 -
 src/runtime/arch1_arm64.go                         |   15 -
 src/runtime/arch1_ppc64.go                         |   15 -
 src/runtime/arch1_ppc64le.go                       |   15 -
 src/runtime/arch_arm64.go                          |    8 -
 src/runtime/arch_ppc64.go                          |    8 -
 src/runtime/arch_ppc64le.go                        |    8 -
 src/runtime/asm_arm64.s                            | 1029 ----
 src/runtime/asm_ppc64x.s                           | 1172 -----
 src/runtime/atomic_386.go                          |   82 -
 src/runtime/atomic_amd64x.go                       |   72 -
 src/runtime/atomic_arm64.go                        |   82 -
 src/runtime/atomic_arm64.s                         |  117 -
 src/runtime/atomic_pointer.go                      |   78 -
 src/runtime/atomic_ppc64x.go                       |   60 -
 src/runtime/atomic_ppc64x.s                        |   47 -
 src/runtime/atomic_test.go                         |   66 -
 src/runtime/cgo.go                                 |   50 -
 src/runtime/cgo/asm_arm64.s                        |   57 -
 src/runtime/cgo/asm_ppc64x.s                       |  124 -
 src/runtime/cgo/callbacks.go                       |   96 -
 src/runtime/cgo/dragonfly.go                       |   19 -
 src/runtime/cgo/freebsd.go                         |   22 -
 src/runtime/cgo/gcc_arm64.S                        |   57 -
 src/runtime/cgo/gcc_darwin_arm.c                   |  153 -
 src/runtime/cgo/gcc_darwin_arm64.c                 |  157 -
 src/runtime/cgo/gcc_libinit.c                      |   42 -
 src/runtime/cgo/gcc_libinit_linux_ppc64x.c         |   26 -
 src/runtime/cgo/gcc_libinit_openbsd.c              |   22 -
 src/runtime/cgo/gcc_libinit_windows.c              |   22 -
 src/runtime/cgo/gcc_linux_arm64.c                  |   73 -
 src/runtime/cgo/gcc_linux_ppc64x.c                 |   70 -
 src/runtime/cgo/gcc_ppc64x.S                       |  140 -
 src/runtime/cgo/gcc_signal_darwin_armx.c           |  205 -
 src/runtime/cgo/gcc_signal_darwin_lldb.c           |   14 -
 src/runtime/cgo/gcc_solaris_amd64.c                |   75 -
 src/runtime/cgo/iscgo.go                           |   17 -
 src/runtime/cgo/netbsd.go                          |   19 -
 src/runtime/cgo/openbsd.go                         |   31 -
 src/runtime/cgo/setenv.go                          |   21 -
 src/runtime/cgo/signal_darwin_arm.s                |   49 -
 src/runtime/cgo/signal_darwin_arm64.s              |   56 -
 src/runtime/cgo/signal_darwin_armx.go              |   31 -
 src/runtime/chanbarrier_test.go                    |   83 -
 src/runtime/cputicks.go                            |   12 -
 src/runtime/crash_unix_test.go                     |  135 -
 src/runtime/defs1_netbsd_386.go                    |  183 -
 src/runtime/defs1_netbsd_amd64.go                  |  195 -
 src/runtime/defs1_netbsd_arm.go                    |  183 -
 src/runtime/defs1_solaris_amd64.go                 |  245 -
 src/runtime/defs3_linux.go                         |   43 -
 src/runtime/defs_darwin_386.go                     |  382 --
 src/runtime/defs_darwin_amd64.go                   |  385 --
 src/runtime/defs_darwin_arm.go                     |  245 -
 src/runtime/defs_darwin_arm64.go                   |  248 -
 src/runtime/defs_dragonfly_amd64.go                |  208 -
 src/runtime/defs_freebsd_386.go                    |  213 -
 src/runtime/defs_freebsd_amd64.go                  |  224 -
 src/runtime/defs_freebsd_arm.go                    |  186 -
 src/runtime/defs_linux_386.go                      |  220 -
 src/runtime/defs_linux_amd64.go                    |  255 -
 src/runtime/defs_linux_arm.go                      |  182 -
 src/runtime/defs_linux_arm64.go                    |  178 -
 src/runtime/defs_linux_ppc64.go                    |  200 -
 src/runtime/defs_linux_ppc64le.go                  |  200 -
 src/runtime/defs_nacl_386.go                       |   43 -
 src/runtime/defs_nacl_amd64p32.go                  |   64 -
 src/runtime/defs_nacl_arm.go                       |   50 -
 src/runtime/defs_openbsd_386.go                    |  170 -
 src/runtime/defs_openbsd_amd64.go                  |  181 -
 src/runtime/defs_openbsd_arm.go                    |  170 -
 src/runtime/defs_plan9_386.go                      |   51 -
 src/runtime/defs_plan9_amd64.go                    |   68 -
 src/runtime/defs_windows_386.go                    |  131 -
 src/runtime/defs_windows_amd64.go                  |  153 -
 src/runtime/duff_386.s                             |  779 ----
 src/runtime/duff_amd64.s                           |  841 ----
 src/runtime/duff_arm.s                             |  523 ---
 src/runtime/duff_arm64.s                           |  138 -
 src/runtime/duff_ppc64x.s                          |  140 -
 src/runtime/env_test.go                            |   47 -
 src/runtime/export_arm_test.go                     |    9 -
 src/runtime/export_linux_test.go                   |    9 -
 src/runtime/export_windows_test.go                 |    9 -
 src/runtime/gengoos.go                             |   84 -
 src/runtime/go_tls.h                               |   22 -
 src/runtime/hash32.go                              |   89 -
 src/runtime/hash64.go                              |   89 -
 src/runtime/heapdump.go                            |  735 ---
 src/runtime/lfstack.go                             |   40 -
 src/runtime/lfstack_32bit.go                       |   21 -
 src/runtime/lfstack_amd64.go                       |   24 -
 src/runtime/lfstack_darwin_arm64.go                |   25 -
 src/runtime/lfstack_linux_arm64.go                 |   25 -
 src/runtime/lfstack_linux_ppc64x.go                |   32 -
 src/runtime/mbarrier.go                            |  298 --
 src/runtime/mbitmap.go                             | 1710 -------
 src/runtime/mcache.go                              |  139 -
 src/runtime/mcentral.go                            |  212 -
 src/runtime/mem_bsd.go                             |   93 -
 src/runtime/mem_darwin.go                          |   63 -
 src/runtime/mem_linux.go                           |  159 -
 src/runtime/mem_plan9.go                           |  174 -
 src/runtime/mem_windows.go                         |  114 -
 src/runtime/memclr_arm64.s                         |   18 -
 src/runtime/memclr_ppc64x.s                        |   20 -
 src/runtime/memmove_arm64.s                        |   36 -
 src/runtime/memmove_ppc64x.s                       |   40 -
 src/runtime/mfinal.go                              |  412 --
 src/runtime/mfixalloc.go                           |   87 -
 src/runtime/mgc.go                                 | 1764 -------
 src/runtime/mgcmark.go                             | 1020 ----
 src/runtime/mgcsweep.go                            |  370 --
 src/runtime/mgcwork.go                             |  458 --
 src/runtime/mheap.go                               | 1090 -----
 src/runtime/mkduff.go                              |  188 -
 src/runtime/msize.go                               |  254 -
 src/runtime/mstats.go                              |  391 --
 src/runtime/netpoll_solaris.go                     |  243 -
 src/runtime/netpoll_stub.go                        |   19 -
 src/runtime/netpoll_windows.go                     |  145 -
 src/runtime/noasm.go                               |   58 -
 src/runtime/norace_linux_test.go                   |   41 -
 src/runtime/os1_darwin.go                          |  481 --
 src/runtime/os1_dragonfly.go                       |  247 -
 src/runtime/os1_freebsd.go                         |  249 -
 src/runtime/os1_linux.go                           |  350 --
 src/runtime/os1_nacl.go                            |  203 -
 src/runtime/os1_netbsd.go                          |  238 -
 src/runtime/os1_netbsd_386.go                      |   16 -
 src/runtime/os1_netbsd_amd64.go                    |   16 -
 src/runtime/os1_openbsd.go                         |  246 -
 src/runtime/os1_plan9.go                           |  268 --
 src/runtime/os1_windows.go                         |  540 ---
 src/runtime/os2_darwin.go                          |   14 -
 src/runtime/os2_dragonfly.go                       |   15 -
 src/runtime/os2_freebsd.go                         |   15 -
 src/runtime/os2_linux.go                           |   25 -
 src/runtime/os2_nacl.go                            |  154 -
 src/runtime/os2_netbsd.go                          |   18 -
 src/runtime/os2_openbsd.go                         |   14 -
 src/runtime/os2_plan9.go                           |   74 -
 src/runtime/os2_solaris.go                         |   14 -
 src/runtime/os2_windows.go                         |   19 -
 src/runtime/os3_plan9.go                           |  128 -
 src/runtime/os3_solaris.go                         |  529 ---
 src/runtime/os_android_arm.go                      |   15 -
 src/runtime/os_darwin_arm.go                       |   24 -
 src/runtime/os_darwin_arm64.go                     |   13 -
 src/runtime/os_freebsd_arm.go                      |   24 -
 src/runtime/os_linux_386.go                        |   35 -
 src/runtime/os_linux_arm.go                        |   72 -
 src/runtime/os_linux_arm64.go                      |   20 -
 src/runtime/os_nacl_arm.go                         |   23 -
 src/runtime/os_netbsd_arm.go                       |   35 -
 src/runtime/os_openbsd_arm.go                      |   24 -
 src/runtime/panic1.go                              |  150 -
 src/runtime/parfor.go                              |  212 -
 src/runtime/print1_write.go                        |   13 -
 src/runtime/print1_write_android.go                |  160 -
 src/runtime/proc1.go                               | 3725 ---------------
 src/runtime/race/sched_test.go                     |   48 -
 src/runtime/race1.go                               |  315 --
 src/runtime/rt0_darwin_arm.s                       |   59 -
 src/runtime/rt0_darwin_arm64.s                     |   55 -
 src/runtime/rt0_linux_arm64.s                      |   19 -
 src/runtime/rt0_linux_ppc64.s                      |   23 -
 src/runtime/rt0_linux_ppc64le.s                    |   34 -
 src/runtime/rt0_openbsd_arm.s                      |   11 -
 src/runtime/runtime-gdb_test.go                    |  164 -
 src/runtime/runtime1.go                            |  444 --
 src/runtime/runtime2.go                            |  699 ---
 src/runtime/signal1_unix.go                        |  241 -
 src/runtime/signal_386.go                          |  193 -
 src/runtime/signal_amd64x.go                       |  204 -
 src/runtime/signal_arm.go                          |  165 -
 src/runtime/signal_arm64.go                        |  178 -
 src/runtime/signal_darwin.go                       |   71 -
 src/runtime/signal_darwin_386.go                   |   34 -
 src/runtime/signal_darwin_amd64.go                 |   42 -
 src/runtime/signal_darwin_arm.go                   |   44 -
 src/runtime/signal_darwin_arm64.go                 |   60 -
 src/runtime/signal_dragonfly.go                    |   46 -
 src/runtime/signal_dragonfly_amd64.go              |   44 -
 src/runtime/signal_freebsd.go                      |   46 -
 src/runtime/signal_freebsd_386.go                  |   34 -
 src/runtime/signal_freebsd_amd64.go                |   44 -
 src/runtime/signal_freebsd_arm.go                  |   48 -
 src/runtime/signal_linux.go                        |   96 -
 src/runtime/signal_linux_386.go                    |   36 -
 src/runtime/signal_linux_amd64.go                  |   46 -
 src/runtime/signal_linux_arm.go                    |   48 -
 src/runtime/signal_linux_arm64.go                  |   61 -
 src/runtime/signal_linux_ppc64x.go                 |   71 -
 src/runtime/signal_nacl.go                         |   45 -
 src/runtime/signal_nacl_386.go                     |   34 -
 src/runtime/signal_nacl_amd64p32.go                |   44 -
 src/runtime/signal_nacl_arm.go                     |   47 -
 src/runtime/signal_netbsd.go                       |   46 -
 src/runtime/signal_netbsd_386.go                   |   38 -
 src/runtime/signal_netbsd_amd64.go                 |   48 -
 src/runtime/signal_netbsd_arm.go                   |   48 -
 src/runtime/signal_openbsd.go                      |   46 -
 src/runtime/signal_openbsd_386.go                  |   41 -
 src/runtime/signal_openbsd_amd64.go                |   49 -
 src/runtime/signal_openbsd_arm.go                  |   53 -
 src/runtime/signal_plan9.go                        |   54 -
 src/runtime/signal_ppc64x.go                       |  183 -
 src/runtime/signal_solaris.go                      |   88 -
 src/runtime/signal_solaris_amd64.go                |   46 -
 src/runtime/signal_windows.go                      |  221 -
 src/runtime/sigqueue_plan9.go                      |  128 -
 src/runtime/softfloat_arm.go                       |  608 ---
 src/runtime/sqrt_test.go                           |   85 -
 src/runtime/stack1.go                              |  917 ----
 src/runtime/stack2.go                              |  106 -
 src/runtime/string1.go                             |   67 -
 src/runtime/stubs2.go                              |   30 -
 src/runtime/stubs32.go                             |   14 -
 src/runtime/stubs_android.go                       |   10 -
 src/runtime/sys_arm.go                             |   38 -
 src/runtime/sys_arm64.go                           |   36 -
 src/runtime/sys_darwin_arm.s                       |  490 --
 src/runtime/sys_darwin_arm64.s                     |  455 --
 src/runtime/sys_linux_arm64.s                      |  447 --
 src/runtime/sys_linux_ppc64x.s                     |  407 --
 src/runtime/sys_openbsd_arm.s                      |  390 --
 src/runtime/sys_ppc64x.go                          |   37 -
 src/runtime/sys_x86.go                             |   54 -
 src/runtime/syscall2_solaris.go                    |   49 -
 src/runtime/textflag.h                             |   23 -
 src/runtime/tls_arm64.h                            |   20 -
 src/runtime/tls_arm64.s                            |   60 -
 src/runtime/tls_ppc64x.s                           |   60 -
 src/runtime/trace.go                               |  859 ----
 src/runtime/trace/trace.go                         |   42 -
 src/runtime/trace/trace_stack_test.go              |  285 --
 src/runtime/trace/trace_test.go                    |  434 --
 src/runtime/type.go                                |   94 -
 src/runtime/typekind1.go                           |   39 -
 src/runtime/unaligned1.go                          |   17 -
 src/runtime/unaligned2.go                          |   20 -
 src/runtime/vdso_linux_amd64.go                    |  327 --
 src/runtime/vdso_none.go                           |   12 -
 src/runtime/wbfat.go                               |  190 -
 src/runtime/wbfat_gen.go                           |   41 -
 src/runtime/wincallback.go                         |   64 -
 src/runtime/zcallback_windows.go                   |    5 -
 src/runtime/zcallback_windows.s                    | 2010 --------
 src/runtime/zgoarch_386.go                         |   13 -
 src/runtime/zgoarch_amd64.go                       |   13 -
 src/runtime/zgoarch_amd64p32.go                    |   13 -
 src/runtime/zgoarch_arm.go                         |   13 -
 src/runtime/zgoarch_arm64.go                       |   13 -
 src/runtime/zgoarch_ppc64.go                       |   13 -
 src/runtime/zgoarch_ppc64le.go                     |   13 -
 src/runtime/zgoos_android.go                       |   17 -
 src/runtime/zgoos_darwin.go                        |   17 -
 src/runtime/zgoos_dragonfly.go                     |   17 -
 src/runtime/zgoos_freebsd.go                       |   17 -
 src/runtime/zgoos_linux.go                         |   19 -
 src/runtime/zgoos_nacl.go                          |   17 -
 src/runtime/zgoos_netbsd.go                        |   17 -
 src/runtime/zgoos_openbsd.go                       |   17 -
 src/runtime/zgoos_plan9.go                         |   17 -
 src/runtime/zgoos_solaris.go                       |   17 -
 src/runtime/zgoos_windows.go                       |   17 -
 src/strconv/doc.go                                 |   57 -
 src/strconv/example_test.go                        |  338 --
 src/strings/compare.go                             |   28 -
 src/strings/compare_test.go                        |   98 -
 src/sync/atomic/asm_arm64.s                        |  149 -
 src/sync/atomic/asm_darwin_arm.s                   |   99 -
 src/sync/atomic/asm_openbsd_arm.s                  |  100 -
 src/sync/atomic/asm_ppc64x.s                       |  175 -
 src/syscall/asm_darwin_arm.s                       |  134 -
 src/syscall/asm_darwin_arm64.s                     |  127 -
 src/syscall/asm_linux_arm64.s                      |  105 -
 src/syscall/asm_linux_ppc64x.s                     |  104 -
 src/syscall/asm_openbsd_arm.s                      |  132 -
 src/syscall/const_plan9.go                         |   59 -
 src/syscall/errors_plan9.go                        |   48 -
 src/syscall/exec_linux_test.go                     |  111 -
 src/syscall/exec_solaris_test.go                   |   37 -
 src/syscall/exec_unix_test.go                      |  215 -
 src/syscall/export_unix_test.go                    |   12 -
 src/syscall/pwd_plan9.go                           |   83 -
 src/syscall/route_bsd_test.go                      |  225 -
 src/syscall/route_ifma_test.go                     |   74 -
 src/syscall/route_noifma_test.go                   |   63 -
 src/syscall/syscall_darwin_arm.go                  |   70 -
 src/syscall/syscall_darwin_arm64.go                |   70 -
 src/syscall/syscall_linux_arm64.go                 |  148 -
 src/syscall/syscall_linux_ppc64x.go                |  124 -
 src/syscall/syscall_linux_test.go                  |  140 -
 src/syscall/syscall_openbsd_arm.go                 |   42 -
 src/syscall/zerrors_darwin_arm.go                  | 1351 ------
 src/syscall/zerrors_darwin_arm64.go                | 1436 ------
 src/syscall/zerrors_linux_arm64.go                 | 1824 --------
 src/syscall/zerrors_linux_ppc64.go                 | 1880 --------
 src/syscall/zerrors_linux_ppc64le.go               | 1904 --------
 src/syscall/zerrors_openbsd_arm.go                 | 1584 -------
 src/syscall/zsyscall_darwin_arm.go                 | 1421 ------
 src/syscall/zsyscall_darwin_arm64.go               | 1421 ------
 src/syscall/zsyscall_linux_arm64.go                | 1725 -------
 src/syscall/zsyscall_linux_ppc64.go                | 1798 -------
 src/syscall/zsyscall_linux_ppc64le.go              | 1798 -------
 src/syscall/zsyscall_openbsd_arm.go                | 1293 ------
 src/syscall/zsysnum_darwin_arm.go                  |  347 --
 src/syscall/zsysnum_darwin_arm64.go                |  358 --
 src/syscall/zsysnum_linux_arm64.go                 |  277 --
 src/syscall/zsysnum_linux_ppc64.go                 |  353 --
 src/syscall/zsysnum_linux_ppc64le.go               |  353 --
 src/syscall/zsysnum_openbsd_arm.go                 |  213 -
 src/syscall/zsysnum_plan9.go                       |   49 -
 src/syscall/ztypes_darwin_arm.go                   |  449 --
 src/syscall/ztypes_darwin_arm64.go                 |  458 --
 src/syscall/ztypes_linux_arm64.go                  |  596 ---
 src/syscall/ztypes_linux_ppc64.go                  |  606 ---
 src/syscall/ztypes_linux_ppc64le.go                |  606 ---
 src/syscall/ztypes_openbsd_arm.go                  |  434 --
 src/text/scanner/example_test.go                   |   38 -
 src/text/template/option.go                        |   74 -
 src/time/zoneinfo_ios.go                           |   51 -
 test/bench/shootout/fasta-1000.txt                 |  171 -
 test/chanlinear.go                                 |   94 -
 test/clearfat.go                                   |   68 -
 test/closure1.go                                   |   19 -
 test/closure2.go                                   |  118 -
 test/escape_array.go                               |  122 -
 test/escape_calls.go                               |   54 -
 test/escape_closure.go                             |  147 -
 test/escape_field.go                               |  174 -
 test/escape_iface.go                               |  227 -
 test/escape_indir.go                               |  160 -
 test/escape_level.go                               |  108 -
 test/escape_map.go                                 |  107 -
 test/escape_param.go                               |  353 --
 test/escape_slice.go                               |  165 -
 test/escape_struct_param1.go                       |  298 --
 test/escape_struct_param2.go                       |  298 --
 test/escape_struct_return.go                       |   74 -
 test/fibo.go                                       |  310 --
 test/fixedbugs/bug369.dir/main.go                  |   54 -
 test/fixedbugs/bug429_run.go                       |   34 -
 test/fixedbugs/bug492.dir/a.go                     |   16 -
 test/fixedbugs/bug492.dir/b.go                     |   11 -
 test/fixedbugs/bug492.go                           |    9 -
 test/fixedbugs/bug493.go                           |   15 -
 test/fixedbugs/bug494.go                           |   51 -
 test/fixedbugs/bug495.go                           |   20 -
 test/fixedbugs/gcc61204.go                         |   17 -
 test/fixedbugs/gcc61244.go                         |   19 -
 test/fixedbugs/gcc61246.go                         |   17 -
 test/fixedbugs/gcc61248.go                         |   14 -
 test/fixedbugs/gcc61253.go                         |   20 -
 test/fixedbugs/gcc61254.go                         |   13 -
 test/fixedbugs/gcc61255.go                         |   13 -
 test/fixedbugs/gcc61258.go                         |   13 -
 test/fixedbugs/gcc61264.go                         |   13 -
 test/fixedbugs/gcc61265.go                         |   16 -
 test/fixedbugs/gcc61273.go                         |   16 -
 test/fixedbugs/gcc65755.go                         |   37 -
 test/fixedbugs/issue10047.go                       |   19 -
 test/fixedbugs/issue10066.dir/a.go                 |   11 -
 test/fixedbugs/issue10066.dir/b.go                 |    7 -
 test/fixedbugs/issue10066.go                       |   10 -
 test/fixedbugs/issue10135.go                       |   25 -
 test/fixedbugs/issue10219.dir/a.go                 |   24 -
 test/fixedbugs/issue10219.dir/b.go                 |   11 -
 test/fixedbugs/issue10219.dir/c.go                 |   12 -
 test/fixedbugs/issue10219.go                       |   10 -
 test/fixedbugs/issue10253.go                       |   26 -
 test/fixedbugs/issue10284.go                       |   16 -
 test/fixedbugs/issue10320.go                       |   55 -
 test/fixedbugs/issue10332.go                       |   25 -
 test/fixedbugs/issue10353.go                       |   49 -
 test/fixedbugs/issue10407.go                       |   16 -
 test/fixedbugs/issue10441.go                       |   17 -
 test/fixedbugs/issue10486.go                       |   31 -
 test/fixedbugs/issue10607.go                       |   31 -
 test/fixedbugs/issue10607a.go                      |   81 -
 test/fixedbugs/issue10654.go                       |   17 -
 test/fixedbugs/issue10700.dir/other.go             |   10 -
 test/fixedbugs/issue10700.dir/test.go              |   49 -
 test/fixedbugs/issue10700.go                       |    7 -
 test/fixedbugs/issue10925.go                       |   23 -
 test/fixedbugs/issue10977.go                       |   20 -
 test/fixedbugs/issue11053.dir/p.go                 |    9 -
 test/fixedbugs/issue11053.dir/p_test.go            |   51 -
 test/fixedbugs/issue11053.go                       |   10 -
 test/fixedbugs/issue11053.out                      |    3 -
 test/fixedbugs/issue11256.go                       |   53 -
 test/fixedbugs/issue11286.go                       |   34 -
 test/fixedbugs/issue11326.go                       |   28 -
 test/fixedbugs/issue11326b.go                      |   44 -
 test/fixedbugs/issue11369.go                       |   27 -
 test/fixedbugs/issue11656.go                       |   62 -
 test/fixedbugs/issue11750.go                       |   20 -
 test/fixedbugs/issue11771.go                       |   64 -
 test/fixedbugs/issue11790.go                       |   36 -
 test/fixedbugs/issue12133.go                       |   26 -
 test/fixedbugs/issue4365.go                        |   27 -
 test/fixedbugs/issue5373.go                        |   71 -
 test/fixedbugs/issue6671.go                        |   28 -
 test/fixedbugs/issue6866.go                        |   80 -
 test/fixedbugs/issue7740.go                        |   35 -
 test/fixedbugs/issue7746.go                        |  133 -
 test/fixedbugs/issue8154.go                        |   14 -
 test/fixedbugs/issue8183.go                        |   23 -
 test/fixedbugs/issue8385.go                        |   42 -
 test/fixedbugs/issue8501.go                        |   18 -
 test/fixedbugs/issue8620.go                        |   30 -
 test/fixedbugs/issue8745.go                        |   13 -
 test/fixedbugs/issue8836.go                        |   24 -
 test/fixedbugs/issue9017.go                        |   57 -
 test/fixedbugs/issue9036.go                        |   29 -
 test/fixedbugs/issue9076.go                        |   15 -
 test/fixedbugs/issue9083.go                        |   22 -
 test/fixedbugs/issue9355.dir/a.go                  |   16 -
 test/fixedbugs/issue9355.go                        |   59 -
 test/fixedbugs/issue9370.go                        |  127 -
 test/fixedbugs/issue9521.go                        |   18 -
 test/fixedbugs/issue9604b.go                       |  177 -
 test/fixedbugs/issue9608.dir/issue9608.go          |   73 -
 test/fixedbugs/issue9608.go                        |   14 -
 test/fixedbugs/issue9691.go                        |   21 -
 test/fixedbugs/issue9731.go                        |   21 -
 test/fixedbugs/issue9738.go                        |   20 -
 test/fixedbugs/issue9862.go                        |   15 -
 test/fixedbugs/issue9862_run.go                    |   27 -
 test/inline.go                                     |   24 -
 test/interface/assertinline.go                     |   53 -
 test/recover4.go                                   |   73 -
 test/sliceopt.go                                   |   59 -
 test/writebarrier.go                               |  146 -
 1118 files changed, 304234 deletions(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index 712431c..0000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# Contributing to Go
-
-Go is an open source project.
-
-It is the work of hundreds of contributors. We appreciate your help!
-
-
-## Filing issues
-
-When filing an issue, make sure to answer these five questions:
-
-1. What version of Go are you using (`go version`)?
-2. What operating system and processor architecture are you using?
-3. What did you do?
-4. What did you expect to see?
-5. What did you see instead?
-
-General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker.
-The gophers there will answer or ask you to file an issue if you've tripped over a bug.
-
-Sensitive security-related issues should be reported to [security at golang.org](mailto:security at golang.org).
-
-## Contributing code
-
-Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html)
-before sending patches.
-
-**We do not accept GitHub pull requests**
-(we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review).
-
-Unless otherwise noted, the Go source files are distributed under
-the BSD-style license found in the LICENSE file.
-
diff --git a/README.md b/README.md
deleted file mode 100644
index 4e6d7bd..0000000
--- a/README.md
+++ /dev/null
@@ -1,45 +0,0 @@
-# The Go Programming Language
-
-Go is an open source programming language that makes it easy to build simple,
-reliable, and efficient software.
-
-![Gopher image](doc/gopher/fiveyears.jpg)
-
-For documentation about how to install and use Go,
-visit https://golang.org/ or load doc/install-source.html
-in your web browser.
-
-Our canonical Git repository is located at https://go.googlesource.com/go.
-There is a mirror of the repository at https://github.com/golang/go.
-
-Please report issues here: https://golang.org/issue/new
-
-Go is the work of hundreds of contributors. We appreciate your help!
-
-To contribute, please read the contribution guidelines:
-	https://golang.org/doc/contribute.html
-
-##### Please note that we do not use pull requests.
-
-Unless otherwise noted, the Go source files are distributed
-under the BSD-style license found in the LICENSE file.
-
---
-
-## Binary Distribution Notes
-
-If you have just untarred a binary Go distribution, you need to set
-the environment variable $GOROOT to the full path of the go
-directory (the one containing this file).  You can omit the
-variable if you unpack it into /usr/local/go, or if you rebuild
-from sources by running all.bash (see doc/install-source.html).
-You should also add the Go binary directory $GOROOT/bin
-to your shell's path.
-
-For example, if you extracted the tar file into $HOME/go, you might
-put the following in your .profile:
-
-	export GOROOT=$HOME/go
-	export PATH=$PATH:$GOROOT/bin
-
-See https://golang.org/doc/install or doc/install.html for more details.
diff --git a/api/go1.5.txt b/api/go1.5.txt
deleted file mode 100644
index d9cf797..0000000
--- a/api/go1.5.txt
+++ /dev/null
@@ -1,975 +0,0 @@
-pkg archive/zip, method (*Writer) SetOffset(int64)
-pkg bufio, method (*Reader) Discard(int) (int, error)
-pkg bufio, method (ReadWriter) Discard(int) (int, error)
-pkg bytes, func LastIndexByte([]uint8, uint8) int
-pkg bytes, method (*Buffer) Cap() int
-pkg bytes, method (*Reader) Size() int64
-pkg crypto, const SHA512_224 = 14
-pkg crypto, const SHA512_224 Hash
-pkg crypto, const SHA512_256 = 15
-pkg crypto, const SHA512_256 Hash
-pkg crypto, type Decrypter interface { Decrypt, Public }
-pkg crypto, type Decrypter interface, Decrypt(io.Reader, []uint8, DecrypterOpts) ([]uint8, error)
-pkg crypto, type Decrypter interface, Public() PublicKey
-pkg crypto, type DecrypterOpts interface {}
-pkg crypto/cipher, func NewGCMWithNonceSize(Block, int) (AEAD, error)
-pkg crypto/elliptic, type CurveParams struct, Name string
-pkg crypto/rsa, method (*PrivateKey) Decrypt(io.Reader, []uint8, crypto.DecrypterOpts) ([]uint8, error)
-pkg crypto/rsa, type OAEPOptions struct
-pkg crypto/rsa, type OAEPOptions struct, Hash crypto.Hash
-pkg crypto/rsa, type OAEPOptions struct, Label []uint8
-pkg crypto/rsa, type PKCS1v15DecryptOptions struct
-pkg crypto/rsa, type PKCS1v15DecryptOptions struct, SessionKeyLen int
-pkg crypto/sha512, const Size224 = 28
-pkg crypto/sha512, const Size224 ideal-int
-pkg crypto/sha512, const Size256 = 32
-pkg crypto/sha512, const Size256 ideal-int
-pkg crypto/sha512, func New512_224() hash.Hash
-pkg crypto/sha512, func New512_256() hash.Hash
-pkg crypto/sha512, func Sum512_224([]uint8) [28]uint8
-pkg crypto/sha512, func Sum512_256([]uint8) [32]uint8
-pkg crypto/tls, const TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = 49196
-pkg crypto/tls, const TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 uint16
-pkg crypto/tls, const TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = 49200
-pkg crypto/tls, const TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 uint16
-pkg crypto/tls, method (*Config) SetSessionTicketKeys([][32]uint8)
-pkg crypto/tls, type Certificate struct, SignedCertificateTimestamps [][]uint8
-pkg crypto/tls, type ConnectionState struct, OCSPResponse []uint8
-pkg crypto/tls, type ConnectionState struct, SignedCertificateTimestamps [][]uint8
-pkg crypto/x509, method (*CertificateRequest) CheckSignature() error
-pkg crypto/x509, type Certificate struct, UnhandledCriticalExtensions []asn1.ObjectIdentifier
-pkg crypto/x509/pkix, type Name struct, ExtraNames []AttributeTypeAndValue
-pkg database/sql, method (*DB) Stats() DBStats
-pkg database/sql, type DBStats struct
-pkg database/sql, type DBStats struct, OpenConnections int
-pkg debug/dwarf, const ClassAddress = 1
-pkg debug/dwarf, const ClassAddress Class
-pkg debug/dwarf, const ClassBlock = 2
-pkg debug/dwarf, const ClassBlock Class
-pkg debug/dwarf, const ClassConstant = 3
-pkg debug/dwarf, const ClassConstant Class
-pkg debug/dwarf, const ClassExprLoc = 4
-pkg debug/dwarf, const ClassExprLoc Class
-pkg debug/dwarf, const ClassFlag = 5
-pkg debug/dwarf, const ClassFlag Class
-pkg debug/dwarf, const ClassLinePtr = 6
-pkg debug/dwarf, const ClassLinePtr Class
-pkg debug/dwarf, const ClassLocListPtr = 7
-pkg debug/dwarf, const ClassLocListPtr Class
-pkg debug/dwarf, const ClassMacPtr = 8
-pkg debug/dwarf, const ClassMacPtr Class
-pkg debug/dwarf, const ClassRangeListPtr = 9
-pkg debug/dwarf, const ClassRangeListPtr Class
-pkg debug/dwarf, const ClassReference = 10
-pkg debug/dwarf, const ClassReference Class
-pkg debug/dwarf, const ClassReferenceAlt = 13
-pkg debug/dwarf, const ClassReferenceAlt Class
-pkg debug/dwarf, const ClassReferenceSig = 11
-pkg debug/dwarf, const ClassReferenceSig Class
-pkg debug/dwarf, const ClassString = 12
-pkg debug/dwarf, const ClassString Class
-pkg debug/dwarf, const ClassStringAlt = 14
-pkg debug/dwarf, const ClassStringAlt Class
-pkg debug/dwarf, method (*Data) LineReader(*Entry) (*LineReader, error)
-pkg debug/dwarf, method (*Entry) AttrField(Attr) *Field
-pkg debug/dwarf, method (*LineReader) Next(*LineEntry) error
-pkg debug/dwarf, method (*LineReader) Reset()
-pkg debug/dwarf, method (*LineReader) Seek(LineReaderPos)
-pkg debug/dwarf, method (*LineReader) SeekPC(uint64, *LineEntry) error
-pkg debug/dwarf, method (*LineReader) Tell() LineReaderPos
-pkg debug/dwarf, method (*Reader) AddressSize() int
-pkg debug/dwarf, method (Class) GoString() string
-pkg debug/dwarf, method (Class) String() string
-pkg debug/dwarf, type Class int
-pkg debug/dwarf, type Field struct, Class Class
-pkg debug/dwarf, type LineEntry struct
-pkg debug/dwarf, type LineEntry struct, Address uint64
-pkg debug/dwarf, type LineEntry struct, BasicBlock bool
-pkg debug/dwarf, type LineEntry struct, Column int
-pkg debug/dwarf, type LineEntry struct, Discriminator int
-pkg debug/dwarf, type LineEntry struct, EndSequence bool
-pkg debug/dwarf, type LineEntry struct, EpilogueBegin bool
-pkg debug/dwarf, type LineEntry struct, File *LineFile
-pkg debug/dwarf, type LineEntry struct, ISA int
-pkg debug/dwarf, type LineEntry struct, IsStmt bool
-pkg debug/dwarf, type LineEntry struct, Line int
-pkg debug/dwarf, type LineEntry struct, OpIndex int
-pkg debug/dwarf, type LineEntry struct, PrologueEnd bool
-pkg debug/dwarf, type LineFile struct
-pkg debug/dwarf, type LineFile struct, Length int
-pkg debug/dwarf, type LineFile struct, Mtime uint64
-pkg debug/dwarf, type LineFile struct, Name string
-pkg debug/dwarf, type LineReader struct
-pkg debug/dwarf, type LineReaderPos struct
-pkg debug/dwarf, var ErrUnknownPC error
-pkg debug/elf, const R_PPC64_ADDR14 = 7
-pkg debug/elf, const R_PPC64_ADDR14 R_PPC64
-pkg debug/elf, const R_PPC64_ADDR14_BRNTAKEN = 9
-pkg debug/elf, const R_PPC64_ADDR14_BRNTAKEN R_PPC64
-pkg debug/elf, const R_PPC64_ADDR14_BRTAKEN = 8
-pkg debug/elf, const R_PPC64_ADDR14_BRTAKEN R_PPC64
-pkg debug/elf, const R_PPC64_ADDR16 = 3
-pkg debug/elf, const R_PPC64_ADDR16 R_PPC64
-pkg debug/elf, const R_PPC64_ADDR16_DS = 56
-pkg debug/elf, const R_PPC64_ADDR16_DS R_PPC64
-pkg debug/elf, const R_PPC64_ADDR16_HA = 6
-pkg debug/elf, const R_PPC64_ADDR16_HA R_PPC64
-pkg debug/elf, const R_PPC64_ADDR16_HI = 5
-pkg debug/elf, const R_PPC64_ADDR16_HI R_PPC64
-pkg debug/elf, const R_PPC64_ADDR16_HIGHER = 39
-pkg debug/elf, const R_PPC64_ADDR16_HIGHER R_PPC64
-pkg debug/elf, const R_PPC64_ADDR16_HIGHERA = 40
-pkg debug/elf, const R_PPC64_ADDR16_HIGHERA R_PPC64
-pkg debug/elf, const R_PPC64_ADDR16_HIGHEST = 41
-pkg debug/elf, const R_PPC64_ADDR16_HIGHEST R_PPC64
-pkg debug/elf, const R_PPC64_ADDR16_HIGHESTA = 42
-pkg debug/elf, const R_PPC64_ADDR16_HIGHESTA R_PPC64
-pkg debug/elf, const R_PPC64_ADDR16_LO = 4
-pkg debug/elf, const R_PPC64_ADDR16_LO R_PPC64
-pkg debug/elf, const R_PPC64_ADDR16_LO_DS = 57
-pkg debug/elf, const R_PPC64_ADDR16_LO_DS R_PPC64
-pkg debug/elf, const R_PPC64_ADDR24 = 2
-pkg debug/elf, const R_PPC64_ADDR24 R_PPC64
-pkg debug/elf, const R_PPC64_ADDR32 = 1
-pkg debug/elf, const R_PPC64_ADDR32 R_PPC64
-pkg debug/elf, const R_PPC64_ADDR64 = 38
-pkg debug/elf, const R_PPC64_ADDR64 R_PPC64
-pkg debug/elf, const R_PPC64_DTPMOD64 = 68
-pkg debug/elf, const R_PPC64_DTPMOD64 R_PPC64
-pkg debug/elf, const R_PPC64_DTPREL16 = 74
-pkg debug/elf, const R_PPC64_DTPREL16 R_PPC64
-pkg debug/elf, const R_PPC64_DTPREL16_DS = 101
-pkg debug/elf, const R_PPC64_DTPREL16_DS R_PPC64
-pkg debug/elf, const R_PPC64_DTPREL16_HA = 77
-pkg debug/elf, const R_PPC64_DTPREL16_HA R_PPC64
-pkg debug/elf, const R_PPC64_DTPREL16_HI = 76
-pkg debug/elf, const R_PPC64_DTPREL16_HI R_PPC64
-pkg debug/elf, const R_PPC64_DTPREL16_HIGHER = 103
-pkg debug/elf, const R_PPC64_DTPREL16_HIGHER R_PPC64
-pkg debug/elf, const R_PPC64_DTPREL16_HIGHERA = 104
-pkg debug/elf, const R_PPC64_DTPREL16_HIGHERA R_PPC64
-pkg debug/elf, const R_PPC64_DTPREL16_HIGHEST = 105
-pkg debug/elf, const R_PPC64_DTPREL16_HIGHEST R_PPC64
-pkg debug/elf, const R_PPC64_DTPREL16_HIGHESTA = 106
-pkg debug/elf, const R_PPC64_DTPREL16_HIGHESTA R_PPC64
-pkg debug/elf, const R_PPC64_DTPREL16_LO = 75
-pkg debug/elf, const R_PPC64_DTPREL16_LO R_PPC64
-pkg debug/elf, const R_PPC64_DTPREL16_LO_DS = 102
-pkg debug/elf, const R_PPC64_DTPREL16_LO_DS R_PPC64
-pkg debug/elf, const R_PPC64_DTPREL64 = 78
-pkg debug/elf, const R_PPC64_DTPREL64 R_PPC64
-pkg debug/elf, const R_PPC64_GOT16 = 14
-pkg debug/elf, const R_PPC64_GOT16 R_PPC64
-pkg debug/elf, const R_PPC64_GOT16_DS = 58
-pkg debug/elf, const R_PPC64_GOT16_DS R_PPC64
-pkg debug/elf, const R_PPC64_GOT16_HA = 17
-pkg debug/elf, const R_PPC64_GOT16_HA R_PPC64
-pkg debug/elf, const R_PPC64_GOT16_HI = 16
-pkg debug/elf, const R_PPC64_GOT16_HI R_PPC64
-pkg debug/elf, const R_PPC64_GOT16_LO = 15
-pkg debug/elf, const R_PPC64_GOT16_LO R_PPC64
-pkg debug/elf, const R_PPC64_GOT16_LO_DS = 59
-pkg debug/elf, const R_PPC64_GOT16_LO_DS R_PPC64
-pkg debug/elf, const R_PPC64_GOT_DTPREL16_DS = 91
-pkg debug/elf, const R_PPC64_GOT_DTPREL16_DS R_PPC64
-pkg debug/elf, const R_PPC64_GOT_DTPREL16_HA = 94
-pkg debug/elf, const R_PPC64_GOT_DTPREL16_HA R_PPC64
-pkg debug/elf, const R_PPC64_GOT_DTPREL16_HI = 93
-pkg debug/elf, const R_PPC64_GOT_DTPREL16_HI R_PPC64
-pkg debug/elf, const R_PPC64_GOT_DTPREL16_LO_DS = 92
-pkg debug/elf, const R_PPC64_GOT_DTPREL16_LO_DS R_PPC64
-pkg debug/elf, const R_PPC64_GOT_TLSGD16 = 79
-pkg debug/elf, const R_PPC64_GOT_TLSGD16 R_PPC64
-pkg debug/elf, const R_PPC64_GOT_TLSGD16_HA = 82
-pkg debug/elf, const R_PPC64_GOT_TLSGD16_HA R_PPC64
-pkg debug/elf, const R_PPC64_GOT_TLSGD16_HI = 81
-pkg debug/elf, const R_PPC64_GOT_TLSGD16_HI R_PPC64
-pkg debug/elf, const R_PPC64_GOT_TLSGD16_LO = 80
-pkg debug/elf, const R_PPC64_GOT_TLSGD16_LO R_PPC64
-pkg debug/elf, const R_PPC64_GOT_TLSLD16 = 83
-pkg debug/elf, const R_PPC64_GOT_TLSLD16 R_PPC64
-pkg debug/elf, const R_PPC64_GOT_TLSLD16_HA = 86
-pkg debug/elf, const R_PPC64_GOT_TLSLD16_HA R_PPC64
-pkg debug/elf, const R_PPC64_GOT_TLSLD16_HI = 85
-pkg debug/elf, const R_PPC64_GOT_TLSLD16_HI R_PPC64
-pkg debug/elf, const R_PPC64_GOT_TLSLD16_LO = 84
-pkg debug/elf, const R_PPC64_GOT_TLSLD16_LO R_PPC64
-pkg debug/elf, const R_PPC64_GOT_TPREL16_DS = 87
-pkg debug/elf, const R_PPC64_GOT_TPREL16_DS R_PPC64
-pkg debug/elf, const R_PPC64_GOT_TPREL16_HA = 90
-pkg debug/elf, const R_PPC64_GOT_TPREL16_HA R_PPC64
-pkg debug/elf, const R_PPC64_GOT_TPREL16_HI = 89
-pkg debug/elf, const R_PPC64_GOT_TPREL16_HI R_PPC64
-pkg debug/elf, const R_PPC64_GOT_TPREL16_LO_DS = 88
-pkg debug/elf, const R_PPC64_GOT_TPREL16_LO_DS R_PPC64
-pkg debug/elf, const R_PPC64_JMP_SLOT = 21
-pkg debug/elf, const R_PPC64_JMP_SLOT R_PPC64
-pkg debug/elf, const R_PPC64_NONE = 0
-pkg debug/elf, const R_PPC64_NONE R_PPC64
-pkg debug/elf, const R_PPC64_REL14 = 11
-pkg debug/elf, const R_PPC64_REL14 R_PPC64
-pkg debug/elf, const R_PPC64_REL14_BRNTAKEN = 13
-pkg debug/elf, const R_PPC64_REL14_BRNTAKEN R_PPC64
-pkg debug/elf, const R_PPC64_REL14_BRTAKEN = 12
-pkg debug/elf, const R_PPC64_REL14_BRTAKEN R_PPC64
-pkg debug/elf, const R_PPC64_REL16 = 249
-pkg debug/elf, const R_PPC64_REL16 R_PPC64
-pkg debug/elf, const R_PPC64_REL16_HA = 252
-pkg debug/elf, const R_PPC64_REL16_HA R_PPC64
-pkg debug/elf, const R_PPC64_REL16_HI = 251
-pkg debug/elf, const R_PPC64_REL16_HI R_PPC64
-pkg debug/elf, const R_PPC64_REL16_LO = 250
-pkg debug/elf, const R_PPC64_REL16_LO R_PPC64
-pkg debug/elf, const R_PPC64_REL24 = 10
-pkg debug/elf, const R_PPC64_REL24 R_PPC64
-pkg debug/elf, const R_PPC64_REL32 = 26
-pkg debug/elf, const R_PPC64_REL32 R_PPC64
-pkg debug/elf, const R_PPC64_REL64 = 44
-pkg debug/elf, const R_PPC64_REL64 R_PPC64
-pkg debug/elf, const R_PPC64_TLS = 67
-pkg debug/elf, const R_PPC64_TLS R_PPC64
-pkg debug/elf, const R_PPC64_TLSGD = 107
-pkg debug/elf, const R_PPC64_TLSGD R_PPC64
-pkg debug/elf, const R_PPC64_TLSLD = 108
-pkg debug/elf, const R_PPC64_TLSLD R_PPC64
-pkg debug/elf, const R_PPC64_TOC = 51
-pkg debug/elf, const R_PPC64_TOC R_PPC64
-pkg debug/elf, const R_PPC64_TOC16 = 47
-pkg debug/elf, const R_PPC64_TOC16 R_PPC64
-pkg debug/elf, const R_PPC64_TOC16_DS = 63
-pkg debug/elf, const R_PPC64_TOC16_DS R_PPC64
-pkg debug/elf, const R_PPC64_TOC16_HA = 50
-pkg debug/elf, const R_PPC64_TOC16_HA R_PPC64
-pkg debug/elf, const R_PPC64_TOC16_HI = 49
-pkg debug/elf, const R_PPC64_TOC16_HI R_PPC64
-pkg debug/elf, const R_PPC64_TOC16_LO = 48
-pkg debug/elf, const R_PPC64_TOC16_LO R_PPC64
-pkg debug/elf, const R_PPC64_TOC16_LO_DS = 64
-pkg debug/elf, const R_PPC64_TOC16_LO_DS R_PPC64
-pkg debug/elf, const R_PPC64_TPREL16 = 69
-pkg debug/elf, const R_PPC64_TPREL16 R_PPC64
-pkg debug/elf, const R_PPC64_TPREL16_DS = 95
-pkg debug/elf, const R_PPC64_TPREL16_DS R_PPC64
-pkg debug/elf, const R_PPC64_TPREL16_HA = 72
-pkg debug/elf, const R_PPC64_TPREL16_HA R_PPC64
-pkg debug/elf, const R_PPC64_TPREL16_HI = 71
-pkg debug/elf, const R_PPC64_TPREL16_HI R_PPC64
-pkg debug/elf, const R_PPC64_TPREL16_HIGHER = 97
-pkg debug/elf, const R_PPC64_TPREL16_HIGHER R_PPC64
-pkg debug/elf, const R_PPC64_TPREL16_HIGHERA = 98
-pkg debug/elf, const R_PPC64_TPREL16_HIGHERA R_PPC64
-pkg debug/elf, const R_PPC64_TPREL16_HIGHEST = 99
-pkg debug/elf, const R_PPC64_TPREL16_HIGHEST R_PPC64
-pkg debug/elf, const R_PPC64_TPREL16_HIGHESTA = 100
-pkg debug/elf, const R_PPC64_TPREL16_HIGHESTA R_PPC64
-pkg debug/elf, const R_PPC64_TPREL16_LO = 70
-pkg debug/elf, const R_PPC64_TPREL16_LO R_PPC64
-pkg debug/elf, const R_PPC64_TPREL16_LO_DS = 96
-pkg debug/elf, const R_PPC64_TPREL16_LO_DS R_PPC64
-pkg debug/elf, const R_PPC64_TPREL64 = 73
-pkg debug/elf, const R_PPC64_TPREL64 R_PPC64
-pkg debug/elf, method (R_PPC64) GoString() string
-pkg debug/elf, method (R_PPC64) String() string
-pkg debug/elf, type R_PPC64 int
-pkg encoding/base64, const NoPadding = -1
-pkg encoding/base64, const NoPadding int32
-pkg encoding/base64, const StdPadding = 61
-pkg encoding/base64, const StdPadding int32
-pkg encoding/base64, method (Encoding) WithPadding(int32) *Encoding
-pkg encoding/base64, var RawStdEncoding *Encoding
-pkg encoding/base64, var RawURLEncoding *Encoding
-pkg encoding/json, method (*Decoder) More() bool
-pkg encoding/json, method (*Decoder) Token() (Token, error)
-pkg encoding/json, method (Delim) String() string
-pkg encoding/json, type Delim int32
-pkg encoding/json, type Token interface {}
-pkg encoding/json, type UnmarshalTypeError struct, Offset int64
-pkg flag, func UnquoteUsage(*Flag) (string, string)
-pkg go/ast, type EmptyStmt struct, Implicit bool
-pkg go/build, type Package struct, PkgTargetRoot string
-pkg go/constant, const Bool = 1
-pkg go/constant, const Bool Kind
-pkg go/constant, const Complex = 5
-pkg go/constant, const Complex Kind
-pkg go/constant, const Float = 4
-pkg go/constant, const Float Kind
-pkg go/constant, const Int = 3
-pkg go/constant, const Int Kind
-pkg go/constant, const String = 2
-pkg go/constant, const String Kind
-pkg go/constant, const Unknown = 0
-pkg go/constant, const Unknown Kind
-pkg go/constant, func BinaryOp(Value, token.Token, Value) Value
-pkg go/constant, func BitLen(Value) int
-pkg go/constant, func BoolVal(Value) bool
-pkg go/constant, func Bytes(Value) []uint8
-pkg go/constant, func Compare(Value, token.Token, Value) bool
-pkg go/constant, func Denom(Value) Value
-pkg go/constant, func Float32Val(Value) (float32, bool)
-pkg go/constant, func Float64Val(Value) (float64, bool)
-pkg go/constant, func Imag(Value) Value
-pkg go/constant, func Int64Val(Value) (int64, bool)
-pkg go/constant, func MakeBool(bool) Value
-pkg go/constant, func MakeFloat64(float64) Value
-pkg go/constant, func MakeFromBytes([]uint8) Value
-pkg go/constant, func MakeFromLiteral(string, token.Token, uint) Value
-pkg go/constant, func MakeImag(Value) Value
-pkg go/constant, func MakeInt64(int64) Value
-pkg go/constant, func MakeString(string) Value
-pkg go/constant, func MakeUint64(uint64) Value
-pkg go/constant, func MakeUnknown() Value
-pkg go/constant, func Num(Value) Value
-pkg go/constant, func Real(Value) Value
-pkg go/constant, func Shift(Value, token.Token, uint) Value
-pkg go/constant, func Sign(Value) int
-pkg go/constant, func StringVal(Value) string
-pkg go/constant, func Uint64Val(Value) (uint64, bool)
-pkg go/constant, func UnaryOp(token.Token, Value, uint) Value
-pkg go/constant, type Kind int
-pkg go/constant, type Value interface, Kind() Kind
-pkg go/constant, type Value interface, String() string
-pkg go/constant, type Value interface, unexported methods
-pkg go/importer, func Default() types.Importer
-pkg go/importer, func For(string, Lookup) types.Importer
-pkg go/importer, type Lookup func(string) (io.ReadCloser, error)
-pkg go/parser, func ParseExprFrom(*token.FileSet, string, interface{}, Mode) (ast.Expr, error)
-pkg go/types, const Bool = 1
-pkg go/types, const Bool BasicKind
-pkg go/types, const Byte = 8
-pkg go/types, const Byte BasicKind
-pkg go/types, const Complex128 = 16
-pkg go/types, const Complex128 BasicKind
-pkg go/types, const Complex64 = 15
-pkg go/types, const Complex64 BasicKind
-pkg go/types, const FieldVal = 0
-pkg go/types, const FieldVal SelectionKind
-pkg go/types, const Float32 = 13
-pkg go/types, const Float32 BasicKind
-pkg go/types, const Float64 = 14
-pkg go/types, const Float64 BasicKind
-pkg go/types, const Int = 2
-pkg go/types, const Int BasicKind
-pkg go/types, const Int16 = 4
-pkg go/types, const Int16 BasicKind
-pkg go/types, const Int32 = 5
-pkg go/types, const Int32 BasicKind
-pkg go/types, const Int64 = 6
-pkg go/types, const Int64 BasicKind
-pkg go/types, const Int8 = 3
-pkg go/types, const Int8 BasicKind
-pkg go/types, const Invalid = 0
-pkg go/types, const Invalid BasicKind
-pkg go/types, const IsBoolean = 1
-pkg go/types, const IsBoolean BasicInfo
-pkg go/types, const IsComplex = 16
-pkg go/types, const IsComplex BasicInfo
-pkg go/types, const IsConstType = 59
-pkg go/types, const IsConstType BasicInfo
-pkg go/types, const IsFloat = 8
-pkg go/types, const IsFloat BasicInfo
-pkg go/types, const IsInteger = 2
-pkg go/types, const IsInteger BasicInfo
-pkg go/types, const IsNumeric = 26
-pkg go/types, const IsNumeric BasicInfo
-pkg go/types, const IsOrdered = 42
-pkg go/types, const IsOrdered BasicInfo
-pkg go/types, const IsString = 32
-pkg go/types, const IsString BasicInfo
-pkg go/types, const IsUnsigned = 4
-pkg go/types, const IsUnsigned BasicInfo
-pkg go/types, const IsUntyped = 64
-pkg go/types, const IsUntyped BasicInfo
-pkg go/types, const MethodExpr = 2
-pkg go/types, const MethodExpr SelectionKind
-pkg go/types, const MethodVal = 1
-pkg go/types, const MethodVal SelectionKind
-pkg go/types, const RecvOnly = 2
-pkg go/types, const RecvOnly ChanDir
-pkg go/types, const Rune = 5
-pkg go/types, const Rune BasicKind
-pkg go/types, const SendOnly = 1
-pkg go/types, const SendOnly ChanDir
-pkg go/types, const SendRecv = 0
-pkg go/types, const SendRecv ChanDir
-pkg go/types, const String = 17
-pkg go/types, const String BasicKind
-pkg go/types, const Uint = 7
-pkg go/types, const Uint BasicKind
-pkg go/types, const Uint16 = 9
-pkg go/types, const Uint16 BasicKind
-pkg go/types, const Uint32 = 10
-pkg go/types, const Uint32 BasicKind
-pkg go/types, const Uint64 = 11
-pkg go/types, const Uint64 BasicKind
-pkg go/types, const Uint8 = 8
-pkg go/types, const Uint8 BasicKind
-pkg go/types, const Uintptr = 12
-pkg go/types, const Uintptr BasicKind
-pkg go/types, const UnsafePointer = 18
-pkg go/types, const UnsafePointer BasicKind
-pkg go/types, const UntypedBool = 19
-pkg go/types, const UntypedBool BasicKind
-pkg go/types, const UntypedComplex = 23
-pkg go/types, const UntypedComplex BasicKind
-pkg go/types, const UntypedFloat = 22
-pkg go/types, const UntypedFloat BasicKind
-pkg go/types, const UntypedInt = 20
-pkg go/types, const UntypedInt BasicKind
-pkg go/types, const UntypedNil = 25
-pkg go/types, const UntypedNil BasicKind
-pkg go/types, const UntypedRune = 21
-pkg go/types, const UntypedRune BasicKind
-pkg go/types, const UntypedString = 24
-pkg go/types, const UntypedString BasicKind
-pkg go/types, func AssertableTo(*Interface, Type) bool
-pkg go/types, func AssignableTo(Type, Type) bool
-pkg go/types, func Comparable(Type) bool
-pkg go/types, func ConvertibleTo(Type, Type) bool
-pkg go/types, func DefPredeclaredTestFuncs()
-pkg go/types, func Eval(*token.FileSet, *Package, token.Pos, string) (TypeAndValue, error)
-pkg go/types, func ExprString(ast.Expr) string
-pkg go/types, func Id(*Package, string) string
-pkg go/types, func Identical(Type, Type) bool
-pkg go/types, func Implements(Type, *Interface) bool
-pkg go/types, func IsInterface(Type) bool
-pkg go/types, func LookupFieldOrMethod(Type, bool, *Package, string) (Object, []int, bool)
-pkg go/types, func MissingMethod(Type, *Interface, bool) (*Func, bool)
-pkg go/types, func NewArray(Type, int64) *Array
-pkg go/types, func NewChan(ChanDir, Type) *Chan
-pkg go/types, func NewChecker(*Config, *token.FileSet, *Package, *Info) *Checker
-pkg go/types, func NewConst(token.Pos, *Package, string, Type, constant.Value) *Const
-pkg go/types, func NewField(token.Pos, *Package, string, Type, bool) *Var
-pkg go/types, func NewFunc(token.Pos, *Package, string, *Signature) *Func
-pkg go/types, func NewInterface([]*Func, []*Named) *Interface
-pkg go/types, func NewLabel(token.Pos, *Package, string) *Label
-pkg go/types, func NewMap(Type, Type) *Map
-pkg go/types, func NewMethodSet(Type) *MethodSet
-pkg go/types, func NewNamed(*TypeName, Type, []*Func) *Named
-pkg go/types, func NewPackage(string, string) *Package
-pkg go/types, func NewParam(token.Pos, *Package, string, Type) *Var
-pkg go/types, func NewPkgName(token.Pos, *Package, string, *Package) *PkgName
-pkg go/types, func NewPointer(Type) *Pointer
-pkg go/types, func NewScope(*Scope, token.Pos, token.Pos, string) *Scope
-pkg go/types, func NewSignature(*Var, *Tuple, *Tuple, bool) *Signature
-pkg go/types, func NewSlice(Type) *Slice
-pkg go/types, func NewStruct([]*Var, []string) *Struct
-pkg go/types, func NewTuple(...*Var) *Tuple
-pkg go/types, func NewTypeName(token.Pos, *Package, string, Type) *TypeName
-pkg go/types, func NewVar(token.Pos, *Package, string, Type) *Var
-pkg go/types, func ObjectString(Object, Qualifier) string
-pkg go/types, func RelativeTo(*Package) Qualifier
-pkg go/types, func SelectionString(*Selection, Qualifier) string
-pkg go/types, func TypeString(Type, Qualifier) string
-pkg go/types, func WriteExpr(*bytes.Buffer, ast.Expr)
-pkg go/types, func WriteSignature(*bytes.Buffer, *Signature, Qualifier)
-pkg go/types, func WriteType(*bytes.Buffer, Type, Qualifier)
-pkg go/types, method (*Array) Elem() Type
-pkg go/types, method (*Array) Len() int64
-pkg go/types, method (*Array) String() string
-pkg go/types, method (*Array) Underlying() Type
-pkg go/types, method (*Basic) Info() BasicInfo
-pkg go/types, method (*Basic) Kind() BasicKind
-pkg go/types, method (*Basic) Name() string
-pkg go/types, method (*Basic) String() string
-pkg go/types, method (*Basic) Underlying() Type
-pkg go/types, method (*Builtin) Exported() bool
-pkg go/types, method (*Builtin) Id() string
-pkg go/types, method (*Builtin) Name() string
-pkg go/types, method (*Builtin) Parent() *Scope
-pkg go/types, method (*Builtin) Pkg() *Package
-pkg go/types, method (*Builtin) Pos() token.Pos
-pkg go/types, method (*Builtin) String() string
-pkg go/types, method (*Builtin) Type() Type
-pkg go/types, method (*Chan) Dir() ChanDir
-pkg go/types, method (*Chan) Elem() Type
-pkg go/types, method (*Chan) String() string
-pkg go/types, method (*Chan) Underlying() Type
-pkg go/types, method (*Checker) Files([]*ast.File) error
-pkg go/types, method (*Config) Check(string, *token.FileSet, []*ast.File, *Info) (*Package, error)
-pkg go/types, method (*Const) Exported() bool
-pkg go/types, method (*Const) Id() string
-pkg go/types, method (*Const) Name() string
-pkg go/types, method (*Const) Parent() *Scope
-pkg go/types, method (*Const) Pkg() *Package
-pkg go/types, method (*Const) Pos() token.Pos
-pkg go/types, method (*Const) String() string
-pkg go/types, method (*Const) Type() Type
-pkg go/types, method (*Const) Val() constant.Value
-pkg go/types, method (*Func) Exported() bool
-pkg go/types, method (*Func) FullName() string
-pkg go/types, method (*Func) Id() string
-pkg go/types, method (*Func) Name() string
-pkg go/types, method (*Func) Parent() *Scope
-pkg go/types, method (*Func) Pkg() *Package
-pkg go/types, method (*Func) Pos() token.Pos
-pkg go/types, method (*Func) Scope() *Scope
-pkg go/types, method (*Func) String() string
-pkg go/types, method (*Func) Type() Type
-pkg go/types, method (*Info) ObjectOf(*ast.Ident) Object
-pkg go/types, method (*Info) TypeOf(ast.Expr) Type
-pkg go/types, method (*Initializer) String() string
-pkg go/types, method (*Interface) Complete() *Interface
-pkg go/types, method (*Interface) Embedded(int) *Named
-pkg go/types, method (*Interface) Empty() bool
-pkg go/types, method (*Interface) ExplicitMethod(int) *Func
-pkg go/types, method (*Interface) Method(int) *Func
-pkg go/types, method (*Interface) NumEmbeddeds() int
-pkg go/types, method (*Interface) NumExplicitMethods() int
-pkg go/types, method (*Interface) NumMethods() int
-pkg go/types, method (*Interface) String() string
-pkg go/types, method (*Interface) Underlying() Type
-pkg go/types, method (*Label) Exported() bool
-pkg go/types, method (*Label) Id() string
-pkg go/types, method (*Label) Name() string
-pkg go/types, method (*Label) Parent() *Scope
-pkg go/types, method (*Label) Pkg() *Package
-pkg go/types, method (*Label) Pos() token.Pos
-pkg go/types, method (*Label) String() string
-pkg go/types, method (*Label) Type() Type
-pkg go/types, method (*Map) Elem() Type
-pkg go/types, method (*Map) Key() Type
-pkg go/types, method (*Map) String() string
-pkg go/types, method (*Map) Underlying() Type
-pkg go/types, method (*MethodSet) At(int) *Selection
-pkg go/types, method (*MethodSet) Len() int
-pkg go/types, method (*MethodSet) Lookup(*Package, string) *Selection
-pkg go/types, method (*MethodSet) String() string
-pkg go/types, method (*Named) AddMethod(*Func)
-pkg go/types, method (*Named) Method(int) *Func
-pkg go/types, method (*Named) NumMethods() int
-pkg go/types, method (*Named) Obj() *TypeName
-pkg go/types, method (*Named) SetUnderlying(Type)
-pkg go/types, method (*Named) String() string
-pkg go/types, method (*Named) Underlying() Type
-pkg go/types, method (*Nil) Exported() bool
-pkg go/types, method (*Nil) Id() string
-pkg go/types, method (*Nil) Name() string
-pkg go/types, method (*Nil) Parent() *Scope
-pkg go/types, method (*Nil) Pkg() *Package
-pkg go/types, method (*Nil) Pos() token.Pos
-pkg go/types, method (*Nil) String() string
-pkg go/types, method (*Nil) Type() Type
-pkg go/types, method (*Package) Complete() bool
-pkg go/types, method (*Package) Imports() []*Package
-pkg go/types, method (*Package) MarkComplete()
-pkg go/types, method (*Package) Name() string
-pkg go/types, method (*Package) Path() string
-pkg go/types, method (*Package) Scope() *Scope
-pkg go/types, method (*Package) SetImports([]*Package)
-pkg go/types, method (*Package) String() string
-pkg go/types, method (*PkgName) Exported() bool
-pkg go/types, method (*PkgName) Id() string
-pkg go/types, method (*PkgName) Imported() *Package
-pkg go/types, method (*PkgName) Name() string
-pkg go/types, method (*PkgName) Parent() *Scope
-pkg go/types, method (*PkgName) Pkg() *Package
-pkg go/types, method (*PkgName) Pos() token.Pos
-pkg go/types, method (*PkgName) String() string
-pkg go/types, method (*PkgName) Type() Type
-pkg go/types, method (*Pointer) Elem() Type
-pkg go/types, method (*Pointer) String() string
-pkg go/types, method (*Pointer) Underlying() Type
-pkg go/types, method (*Scope) Child(int) *Scope
-pkg go/types, method (*Scope) Contains(token.Pos) bool
-pkg go/types, method (*Scope) End() token.Pos
-pkg go/types, method (*Scope) Innermost(token.Pos) *Scope
-pkg go/types, method (*Scope) Insert(Object) Object
-pkg go/types, method (*Scope) Len() int
-pkg go/types, method (*Scope) Lookup(string) Object
-pkg go/types, method (*Scope) LookupParent(string, token.Pos) (*Scope, Object)
-pkg go/types, method (*Scope) Names() []string
-pkg go/types, method (*Scope) NumChildren() int
-pkg go/types, method (*Scope) Parent() *Scope
-pkg go/types, method (*Scope) Pos() token.Pos
-pkg go/types, method (*Scope) String() string
-pkg go/types, method (*Scope) WriteTo(io.Writer, int, bool)
-pkg go/types, method (*Selection) Index() []int
-pkg go/types, method (*Selection) Indirect() bool
-pkg go/types, method (*Selection) Kind() SelectionKind
-pkg go/types, method (*Selection) Obj() Object
-pkg go/types, method (*Selection) Recv() Type
-pkg go/types, method (*Selection) String() string
-pkg go/types, method (*Selection) Type() Type
-pkg go/types, method (*Signature) Params() *Tuple
-pkg go/types, method (*Signature) Recv() *Var
-pkg go/types, method (*Signature) Results() *Tuple
-pkg go/types, method (*Signature) String() string
-pkg go/types, method (*Signature) Underlying() Type
-pkg go/types, method (*Signature) Variadic() bool
-pkg go/types, method (*Slice) Elem() Type
-pkg go/types, method (*Slice) String() string
-pkg go/types, method (*Slice) Underlying() Type
-pkg go/types, method (*StdSizes) Alignof(Type) int64
-pkg go/types, method (*StdSizes) Offsetsof([]*Var) []int64
-pkg go/types, method (*StdSizes) Sizeof(Type) int64
-pkg go/types, method (*Struct) Field(int) *Var
-pkg go/types, method (*Struct) NumFields() int
-pkg go/types, method (*Struct) String() string
-pkg go/types, method (*Struct) Tag(int) string
-pkg go/types, method (*Struct) Underlying() Type
-pkg go/types, method (*Tuple) At(int) *Var
-pkg go/types, method (*Tuple) Len() int
-pkg go/types, method (*Tuple) String() string
-pkg go/types, method (*Tuple) Underlying() Type
-pkg go/types, method (*TypeName) Exported() bool
-pkg go/types, method (*TypeName) Id() string
-pkg go/types, method (*TypeName) Name() string
-pkg go/types, method (*TypeName) Parent() *Scope
-pkg go/types, method (*TypeName) Pkg() *Package
-pkg go/types, method (*TypeName) Pos() token.Pos
-pkg go/types, method (*TypeName) String() string
-pkg go/types, method (*TypeName) Type() Type
-pkg go/types, method (*Var) Anonymous() bool
-pkg go/types, method (*Var) Exported() bool
-pkg go/types, method (*Var) Id() string
-pkg go/types, method (*Var) IsField() bool
-pkg go/types, method (*Var) Name() string
-pkg go/types, method (*Var) Parent() *Scope
-pkg go/types, method (*Var) Pkg() *Package
-pkg go/types, method (*Var) Pos() token.Pos
-pkg go/types, method (*Var) String() string
-pkg go/types, method (*Var) Type() Type
-pkg go/types, method (Checker) ObjectOf(*ast.Ident) Object
-pkg go/types, method (Checker) TypeOf(ast.Expr) Type
-pkg go/types, method (Error) Error() string
-pkg go/types, method (TypeAndValue) Addressable() bool
-pkg go/types, method (TypeAndValue) Assignable() bool
-pkg go/types, method (TypeAndValue) HasOk() bool
-pkg go/types, method (TypeAndValue) IsBuiltin() bool
-pkg go/types, method (TypeAndValue) IsNil() bool
-pkg go/types, method (TypeAndValue) IsType() bool
-pkg go/types, method (TypeAndValue) IsValue() bool
-pkg go/types, method (TypeAndValue) IsVoid() bool
-pkg go/types, type Array struct
-pkg go/types, type Basic struct
-pkg go/types, type BasicInfo int
-pkg go/types, type BasicKind int
-pkg go/types, type Builtin struct
-pkg go/types, type Chan struct
-pkg go/types, type ChanDir int
-pkg go/types, type Checker struct
-pkg go/types, type Checker struct, embedded *Info
-pkg go/types, type Config struct
-pkg go/types, type Config struct, DisableUnusedImportCheck bool
-pkg go/types, type Config struct, Error func(error)
-pkg go/types, type Config struct, FakeImportC bool
-pkg go/types, type Config struct, IgnoreFuncBodies bool
-pkg go/types, type Config struct, Importer Importer
-pkg go/types, type Config struct, Sizes Sizes
-pkg go/types, type Const struct
-pkg go/types, type Error struct
-pkg go/types, type Error struct, Fset *token.FileSet
-pkg go/types, type Error struct, Msg string
-pkg go/types, type Error struct, Pos token.Pos
-pkg go/types, type Error struct, Soft bool
-pkg go/types, type Func struct
-pkg go/types, type Importer interface { Import }
-pkg go/types, type Importer interface, Import(string) (*Package, error)
-pkg go/types, type Info struct
-pkg go/types, type Info struct, Defs map[*ast.Ident]Object
-pkg go/types, type Info struct, Implicits map[ast.Node]Object
-pkg go/types, type Info struct, InitOrder []*Initializer
-pkg go/types, type Info struct, Scopes map[ast.Node]*Scope
-pkg go/types, type Info struct, Selections map[*ast.SelectorExpr]*Selection
-pkg go/types, type Info struct, Types map[ast.Expr]TypeAndValue
-pkg go/types, type Info struct, Uses map[*ast.Ident]Object
-pkg go/types, type Initializer struct
-pkg go/types, type Initializer struct, Lhs []*Var
-pkg go/types, type Initializer struct, Rhs ast.Expr
-pkg go/types, type Interface struct
-pkg go/types, type Label struct
-pkg go/types, type Map struct
-pkg go/types, type MethodSet struct
-pkg go/types, type Named struct
-pkg go/types, type Nil struct
-pkg go/types, type Object interface, Exported() bool
-pkg go/types, type Object interface, Id() string
-pkg go/types, type Object interface, Name() string
-pkg go/types, type Object interface, Parent() *Scope
-pkg go/types, type Object interface, Pkg() *Package
-pkg go/types, type Object interface, Pos() token.Pos
-pkg go/types, type Object interface, String() string
-pkg go/types, type Object interface, Type() Type
-pkg go/types, type Object interface, unexported methods
-pkg go/types, type Package struct
-pkg go/types, type PkgName struct
-pkg go/types, type Pointer struct
-pkg go/types, type Qualifier func(*Package) string
-pkg go/types, type Scope struct
-pkg go/types, type Selection struct
-pkg go/types, type SelectionKind int
-pkg go/types, type Signature struct
-pkg go/types, type Sizes interface { Alignof, Offsetsof, Sizeof }
-pkg go/types, type Sizes interface, Alignof(Type) int64
-pkg go/types, type Sizes interface, Offsetsof([]*Var) []int64
-pkg go/types, type Sizes interface, Sizeof(Type) int64
-pkg go/types, type Slice struct
-pkg go/types, type StdSizes struct
-pkg go/types, type StdSizes struct, MaxAlign int64
-pkg go/types, type StdSizes struct, WordSize int64
-pkg go/types, type Struct struct
-pkg go/types, type Tuple struct
-pkg go/types, type Type interface { String, Underlying }
-pkg go/types, type Type interface, String() string
-pkg go/types, type Type interface, Underlying() Type
-pkg go/types, type TypeAndValue struct
-pkg go/types, type TypeAndValue struct, Type Type
-pkg go/types, type TypeAndValue struct, Value constant.Value
-pkg go/types, type TypeName struct
-pkg go/types, type Var struct
-pkg go/types, var Typ []*Basic
-pkg go/types, var Universe *Scope
-pkg go/types, var Unsafe *Package
-pkg html/template, method (*Template) Option(...string) *Template
-pkg image, const YCbCrSubsampleRatio410 = 5
-pkg image, const YCbCrSubsampleRatio410 YCbCrSubsampleRatio
-pkg image, const YCbCrSubsampleRatio411 = 4
-pkg image, const YCbCrSubsampleRatio411 YCbCrSubsampleRatio
-pkg image, func NewCMYK(Rectangle) *CMYK
-pkg image, method (*CMYK) At(int, int) color.Color
-pkg image, method (*CMYK) Bounds() Rectangle
-pkg image, method (*CMYK) CMYKAt(int, int) color.CMYK
-pkg image, method (*CMYK) ColorModel() color.Model
-pkg image, method (*CMYK) Opaque() bool
-pkg image, method (*CMYK) PixOffset(int, int) int
-pkg image, method (*CMYK) Set(int, int, color.Color)
-pkg image, method (*CMYK) SetCMYK(int, int, color.CMYK)
-pkg image, method (*CMYK) SubImage(Rectangle) Image
-pkg image, method (Rectangle) At(int, int) color.Color
-pkg image, method (Rectangle) Bounds() Rectangle
-pkg image, method (Rectangle) ColorModel() color.Model
-pkg image, type CMYK struct
-pkg image, type CMYK struct, Pix []uint8
-pkg image, type CMYK struct, Rect Rectangle
-pkg image, type CMYK struct, Stride int
-pkg image/color, func CMYKToRGB(uint8, uint8, uint8, uint8) (uint8, uint8, uint8)
-pkg image/color, func RGBToCMYK(uint8, uint8, uint8) (uint8, uint8, uint8, uint8)
-pkg image/color, method (CMYK) RGBA() (uint32, uint32, uint32, uint32)
-pkg image/color, type CMYK struct
-pkg image/color, type CMYK struct, C uint8
-pkg image/color, type CMYK struct, K uint8
-pkg image/color, type CMYK struct, M uint8
-pkg image/color, type CMYK struct, Y uint8
-pkg image/color, var CMYKModel Model
-pkg image/gif, const DisposalBackground = 2
-pkg image/gif, const DisposalBackground ideal-int
-pkg image/gif, const DisposalNone = 1
-pkg image/gif, const DisposalNone ideal-int
-pkg image/gif, const DisposalPrevious = 3
-pkg image/gif, const DisposalPrevious ideal-int
-pkg image/gif, type GIF struct, BackgroundIndex uint8
-pkg image/gif, type GIF struct, Config image.Config
-pkg image/gif, type GIF struct, Disposal []uint8
-pkg io, func CopyBuffer(Writer, Reader, []uint8) (int64, error)
-pkg log, const LUTC = 32
-pkg log, const LUTC ideal-int
-pkg log, func Output(int, string) error
-pkg log, method (*Logger) SetOutput(io.Writer)
-pkg math/big, const Above = 1
-pkg math/big, const Above Accuracy
-pkg math/big, const AwayFromZero = 3
-pkg math/big, const AwayFromZero RoundingMode
-pkg math/big, const Below = -1
-pkg math/big, const Below Accuracy
-pkg math/big, const Exact = 0
-pkg math/big, const Exact Accuracy
-pkg math/big, const MaxExp = 2147483647
-pkg math/big, const MaxExp ideal-int
-pkg math/big, const MaxPrec = 4294967295
-pkg math/big, const MaxPrec ideal-int
-pkg math/big, const MinExp = -2147483648
-pkg math/big, const MinExp ideal-int
-pkg math/big, const ToNearestAway = 1
-pkg math/big, const ToNearestAway RoundingMode
-pkg math/big, const ToNearestEven = 0
-pkg math/big, const ToNearestEven RoundingMode
-pkg math/big, const ToNegativeInf = 4
-pkg math/big, const ToNegativeInf RoundingMode
-pkg math/big, const ToPositiveInf = 5
-pkg math/big, const ToPositiveInf RoundingMode
-pkg math/big, const ToZero = 2
-pkg math/big, const ToZero RoundingMode
-pkg math/big, func Jacobi(*Int, *Int) int
-pkg math/big, func NewFloat(float64) *Float
-pkg math/big, func ParseFloat(string, int, uint, RoundingMode) (*Float, int, error)
-pkg math/big, method (*Float) Abs(*Float) *Float
-pkg math/big, method (*Float) Acc() Accuracy
-pkg math/big, method (*Float) Add(*Float, *Float) *Float
-pkg math/big, method (*Float) Append([]uint8, uint8, int) []uint8
-pkg math/big, method (*Float) Cmp(*Float) int
-pkg math/big, method (*Float) Copy(*Float) *Float
-pkg math/big, method (*Float) Float32() (float32, Accuracy)
-pkg math/big, method (*Float) Float64() (float64, Accuracy)
-pkg math/big, method (*Float) Format(fmt.State, int32)
-pkg math/big, method (*Float) Int(*Int) (*Int, Accuracy)
-pkg math/big, method (*Float) Int64() (int64, Accuracy)
-pkg math/big, method (*Float) IsInf() bool
-pkg math/big, method (*Float) IsInt() bool
-pkg math/big, method (*Float) MantExp(*Float) int
-pkg math/big, method (*Float) MinPrec() uint
-pkg math/big, method (*Float) Mode() RoundingMode
-pkg math/big, method (*Float) Mul(*Float, *Float) *Float
-pkg math/big, method (*Float) Neg(*Float) *Float
-pkg math/big, method (*Float) Parse(string, int) (*Float, int, error)
-pkg math/big, method (*Float) Prec() uint
-pkg math/big, method (*Float) Quo(*Float, *Float) *Float
-pkg math/big, method (*Float) Rat(*Rat) (*Rat, Accuracy)
-pkg math/big, method (*Float) Set(*Float) *Float
-pkg math/big, method (*Float) SetFloat64(float64) *Float
-pkg math/big, method (*Float) SetInf(bool) *Float
-pkg math/big, method (*Float) SetInt(*Int) *Float
-pkg math/big, method (*Float) SetInt64(int64) *Float
-pkg math/big, method (*Float) SetMantExp(*Float, int) *Float
-pkg math/big, method (*Float) SetMode(RoundingMode) *Float
-pkg math/big, method (*Float) SetPrec(uint) *Float
-pkg math/big, method (*Float) SetRat(*Rat) *Float
-pkg math/big, method (*Float) SetString(string) (*Float, bool)
-pkg math/big, method (*Float) SetUint64(uint64) *Float
-pkg math/big, method (*Float) Sign() int
-pkg math/big, method (*Float) Signbit() bool
-pkg math/big, method (*Float) String() string
-pkg math/big, method (*Float) Sub(*Float, *Float) *Float
-pkg math/big, method (*Float) Text(uint8, int) string
-pkg math/big, method (*Float) Uint64() (uint64, Accuracy)
-pkg math/big, method (*Int) ModSqrt(*Int, *Int) *Int
-pkg math/big, method (Accuracy) String() string
-pkg math/big, method (ErrNaN) Error() string
-pkg math/big, method (RoundingMode) String() string
-pkg math/big, type Accuracy int8
-pkg math/big, type ErrNaN struct
-pkg math/big, type Float struct
-pkg math/big, type RoundingMode uint8
-pkg mime, const BEncoding = 98
-pkg mime, const BEncoding WordEncoder
-pkg mime, const QEncoding = 113
-pkg mime, const QEncoding WordEncoder
-pkg mime, func ExtensionsByType(string) ([]string, error)
-pkg mime, method (*WordDecoder) Decode(string) (string, error)
-pkg mime, method (*WordDecoder) DecodeHeader(string) (string, error)
-pkg mime, method (WordEncoder) Encode(string, string) string
-pkg mime, type WordDecoder struct
-pkg mime, type WordDecoder struct, CharsetReader func(string, io.Reader) (io.Reader, error)
-pkg mime, type WordEncoder uint8
-pkg mime/quotedprintable, func NewReader(io.Reader) *Reader
-pkg mime/quotedprintable, func NewWriter(io.Writer) *Writer
-pkg mime/quotedprintable, method (*Reader) Read([]uint8) (int, error)
-pkg mime/quotedprintable, method (*Writer) Close() error
-pkg mime/quotedprintable, method (*Writer) Write([]uint8) (int, error)
-pkg mime/quotedprintable, type Reader struct
-pkg mime/quotedprintable, type Writer struct
-pkg mime/quotedprintable, type Writer struct, Binary bool
-pkg net, type Dialer struct, FallbackDelay time.Duration
-pkg net, type OpError struct, Source Addr
-pkg net/http, type Request struct, Cancel <-chan struct
-pkg net/http/fcgi, var ErrConnClosed error
-pkg net/http/fcgi, var ErrRequestAborted error
-pkg net/http/pprof, func Trace(http.ResponseWriter, *http.Request)
-pkg net/mail, method (*AddressParser) Parse(string) (*Address, error)
-pkg net/mail, method (*AddressParser) ParseList(string) ([]*Address, error)
-pkg net/mail, type AddressParser struct
-pkg net/mail, type AddressParser struct, WordDecoder *mime.WordDecoder
-pkg net/smtp, method (*Client) TLSConnectionState() (tls.ConnectionState, bool)
-pkg net/url, method (*URL) EscapedPath() string
-pkg net/url, type URL struct, RawPath string
-pkg os, func LookupEnv(string) (string, bool)
-pkg os/signal, func Ignore(...os.Signal)
-pkg os/signal, func Reset(...os.Signal)
-pkg reflect, func ArrayOf(int, Type) Type
-pkg reflect, func FuncOf([]Type, []Type, bool) Type
-pkg runtime, func ReadTrace() []uint8
-pkg runtime, func StartTrace() error
-pkg runtime, func StopTrace()
-pkg runtime, type MemStats struct, GCCPUFraction float64
-pkg runtime/trace, func Start(io.Writer) error
-pkg runtime/trace, func Stop()
-pkg strings, func Compare(string, string) int
-pkg strings, func LastIndexByte(string, uint8) int
-pkg strings, method (*Reader) Size() int64
-pkg syscall (darwin-386), type SysProcAttr struct, Ctty int
-pkg syscall (darwin-386), type SysProcAttr struct, Foreground bool
-pkg syscall (darwin-386), type SysProcAttr struct, Pgid int
-pkg syscall (darwin-386-cgo), type SysProcAttr struct, Ctty int
-pkg syscall (darwin-386-cgo), type SysProcAttr struct, Foreground bool
-pkg syscall (darwin-386-cgo), type SysProcAttr struct, Pgid int
-pkg syscall (darwin-amd64), type SysProcAttr struct, Ctty int
-pkg syscall (darwin-amd64), type SysProcAttr struct, Foreground bool
-pkg syscall (darwin-amd64), type SysProcAttr struct, Pgid int
-pkg syscall (darwin-amd64-cgo), type SysProcAttr struct, Ctty int
-pkg syscall (darwin-amd64-cgo), type SysProcAttr struct, Foreground bool
-pkg syscall (darwin-amd64-cgo), type SysProcAttr struct, Pgid int
-pkg syscall (freebsd-386), type SysProcAttr struct, Ctty int
-pkg syscall (freebsd-386), type SysProcAttr struct, Foreground bool
-pkg syscall (freebsd-386), type SysProcAttr struct, Pgid int
-pkg syscall (freebsd-386-cgo), type SysProcAttr struct, Ctty int
-pkg syscall (freebsd-386-cgo), type SysProcAttr struct, Foreground bool
-pkg syscall (freebsd-386-cgo), type SysProcAttr struct, Pgid int
-pkg syscall (freebsd-amd64), type SysProcAttr struct, Ctty int
-pkg syscall (freebsd-amd64), type SysProcAttr struct, Foreground bool
-pkg syscall (freebsd-amd64), type SysProcAttr struct, Pgid int
-pkg syscall (freebsd-amd64-cgo), type SysProcAttr struct, Ctty int
-pkg syscall (freebsd-amd64-cgo), type SysProcAttr struct, Foreground bool
-pkg syscall (freebsd-amd64-cgo), type SysProcAttr struct, Pgid int
-pkg syscall (freebsd-arm), type SysProcAttr struct, Ctty int
-pkg syscall (freebsd-arm), type SysProcAttr struct, Foreground bool
-pkg syscall (freebsd-arm), type SysProcAttr struct, Pgid int
-pkg syscall (freebsd-arm-cgo), type SysProcAttr struct, Ctty int
-pkg syscall (freebsd-arm-cgo), type SysProcAttr struct, Foreground bool
-pkg syscall (freebsd-arm-cgo), type SysProcAttr struct, Pgid int
-pkg syscall (linux-386), type SysProcAttr struct, Foreground bool
-pkg syscall (linux-386), type SysProcAttr struct, GidMappingsEnableSetgroups bool
-pkg syscall (linux-386), type SysProcAttr struct, Pgid int
-pkg syscall (linux-386-cgo), type SysProcAttr struct, Foreground bool
-pkg syscall (linux-386-cgo), type SysProcAttr struct, GidMappingsEnableSetgroups bool
-pkg syscall (linux-386-cgo), type SysProcAttr struct, Pgid int
-pkg syscall (linux-amd64), type SysProcAttr struct, Foreground bool
-pkg syscall (linux-amd64), type SysProcAttr struct, GidMappingsEnableSetgroups bool
-pkg syscall (linux-amd64), type SysProcAttr struct, Pgid int
-pkg syscall (linux-amd64-cgo), type SysProcAttr struct, Foreground bool
-pkg syscall (linux-amd64-cgo), type SysProcAttr struct, GidMappingsEnableSetgroups bool
-pkg syscall (linux-amd64-cgo), type SysProcAttr struct, Pgid int
-pkg syscall (linux-arm), type SysProcAttr struct, Foreground bool
-pkg syscall (linux-arm), type SysProcAttr struct, GidMappingsEnableSetgroups bool
-pkg syscall (linux-arm), type SysProcAttr struct, Pgid int
-pkg syscall (linux-arm-cgo), type SysProcAttr struct, Foreground bool
-pkg syscall (linux-arm-cgo), type SysProcAttr struct, GidMappingsEnableSetgroups bool
-pkg syscall (linux-arm-cgo), type SysProcAttr struct, Pgid int
-pkg syscall (netbsd-386), type SysProcAttr struct, Ctty int
-pkg syscall (netbsd-386), type SysProcAttr struct, Foreground bool
-pkg syscall (netbsd-386), type SysProcAttr struct, Pgid int
-pkg syscall (netbsd-386-cgo), type SysProcAttr struct, Ctty int
-pkg syscall (netbsd-386-cgo), type SysProcAttr struct, Foreground bool
-pkg syscall (netbsd-386-cgo), type SysProcAttr struct, Pgid int
-pkg syscall (netbsd-amd64), type SysProcAttr struct, Ctty int
-pkg syscall (netbsd-amd64), type SysProcAttr struct, Foreground bool
-pkg syscall (netbsd-amd64), type SysProcAttr struct, Pgid int
-pkg syscall (netbsd-amd64-cgo), type SysProcAttr struct, Ctty int
-pkg syscall (netbsd-amd64-cgo), type SysProcAttr struct, Foreground bool
-pkg syscall (netbsd-amd64-cgo), type SysProcAttr struct, Pgid int
-pkg syscall (netbsd-arm), type SysProcAttr struct, Ctty int
-pkg syscall (netbsd-arm), type SysProcAttr struct, Foreground bool
-pkg syscall (netbsd-arm), type SysProcAttr struct, Pgid int
-pkg syscall (netbsd-arm-cgo), type SysProcAttr struct, Ctty int
-pkg syscall (netbsd-arm-cgo), type SysProcAttr struct, Foreground bool
-pkg syscall (netbsd-arm-cgo), type SysProcAttr struct, Pgid int
-pkg syscall (openbsd-386), type SysProcAttr struct, Ctty int
-pkg syscall (openbsd-386), type SysProcAttr struct, Foreground bool
-pkg syscall (openbsd-386), type SysProcAttr struct, Pgid int
-pkg syscall (openbsd-386-cgo), type SysProcAttr struct, Ctty int
-pkg syscall (openbsd-386-cgo), type SysProcAttr struct, Foreground bool
-pkg syscall (openbsd-386-cgo), type SysProcAttr struct, Pgid int
-pkg syscall (openbsd-amd64), type SysProcAttr struct, Ctty int
-pkg syscall (openbsd-amd64), type SysProcAttr struct, Foreground bool
-pkg syscall (openbsd-amd64), type SysProcAttr struct, Pgid int
-pkg syscall (openbsd-amd64-cgo), type SysProcAttr struct, Ctty int
-pkg syscall (openbsd-amd64-cgo), type SysProcAttr struct, Foreground bool
-pkg syscall (openbsd-amd64-cgo), type SysProcAttr struct, Pgid int
-pkg text/template, method (*Template) DefinedTemplates() string
-pkg text/template, method (*Template) Option(...string) *Template
-pkg time, method (Time) AppendFormat([]uint8, string) []uint8
-pkg unicode, const Version = "8.0.0"
-pkg unicode, var Ahom *RangeTable
-pkg unicode, var Anatolian_Hieroglyphs *RangeTable
-pkg unicode, var Hatran *RangeTable
-pkg unicode, var Multani *RangeTable
-pkg unicode, var Old_Hungarian *RangeTable
-pkg unicode, var SignWriting *RangeTable
diff --git a/doc/articles/wiki/final-test.patch b/doc/articles/wiki/final-test.patch
deleted file mode 100644
index 499ad78..0000000
--- a/doc/articles/wiki/final-test.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-*** final.go	2015-06-14 23:59:22.000000000 +0200
---- final-test.go	2015-06-15 00:15:41.000000000 +0200
-***************
-*** 7,12 ****
---- 7,14 ----
-  import (
-  	"html/template"
-  	"io/ioutil"
-+ 	"log"
-+ 	"net"
-  	"net/http"
-  	"regexp"
-  )
-***************
-*** 85,89 ****
-  	http.HandleFunc("/edit/", makeHandler(editHandler))
-  	http.HandleFunc("/save/", makeHandler(saveHandler))
-  
-! 	http.ListenAndServe(":8080", nil)
-  }
---- 87,101 ----
-  	http.HandleFunc("/edit/", makeHandler(editHandler))
-  	http.HandleFunc("/save/", makeHandler(saveHandler))
-  
-! 	l, err := net.Listen("tcp", "127.0.0.1:0")
-! 	if err != nil {
-! 		log.Fatal(err)
-! 	}
-! 	err = ioutil.WriteFile("final-test-port.txt", []byte(l.Addr().String()), 0644)
-! 	if err != nil {
-! 		log.Fatal(err)
-! 	}
-! 	s := &http.Server{}
-! 	s.Serve(l)
-! 	return
-  }
diff --git a/doc/devel/pre_go1.html b/doc/devel/pre_go1.html
deleted file mode 100644
index 813e23c..0000000
--- a/doc/devel/pre_go1.html
+++ /dev/null
@@ -1,455 +0,0 @@
-<!--{
-	"Title": "Pre-Go 1 Release History"
-}-->
-
-<p>
-This page summarizes the changes between stable releases of Go prior to Go 1.
-See the <a href="release.html">Release History</a> page for notes on recent releases.
-</p>
-
-<h2 id="r60">r60 (released 2011/09/07)</h2>
-
-<p>
-The r60 release corresponds to 
-<code><a href="weekly.html#2011-08-17">weekly.2011-08-17</a></code>.
-This section highlights the most significant changes in this release.
-For a more detailed summary, see the
-<a href="weekly.html#2011-08-17">weekly release notes</a>.
-For complete information, see the
-<a href="//code.google.com/p/go/source/list?r=release-branch.r60">Mercurial change list</a>.
-</p>
-
-<h3 id="r60.lang">Language</h3>
-
-<p>
-An "else" block is now required to have braces except if the body of the "else"
-is another "if". Since gofmt always puts those braces in anyway,
-gofmt-formatted programs will not be affected.
-To fix other programs, run gofmt.
-</p>
-
-<h3 id="r60.pkg">Packages</h3>
-
-<p>
-<a href="/pkg/http/">Package http</a>'s URL parsing and query escaping code
-(such as <code>ParseURL</code> and <code>URLEscape</code>) has been moved to
-the new <a href="/pkg/url/">url package</a>, with several simplifications to
-the names. Client code can be updated automatically with gofix.
-</p>
-
-<p>
-<a href="/pkg/image/">Package image</a> has had significant changes made to the
-<code>Pix</code> field of struct types such as
-<a href="/pkg/image/#RGBA">image.RGBA</a> and
-<a href="/pkg/image/#NRGBA">image.NRGBA</a>.
-The <a href="/pkg/image/#Image">image.Image</a> interface type has not changed,
-though, and you should not need to change your code if you don't explicitly
-refer to <code>Pix</code> fields. For example, if you decode a number of images
-using the <a href="/pkg/image/jpeg/">image/jpeg</a> package, compose them using
-<a href="/pkg/image/draw/">image/draw</a>, and then encode the result using
-<a href="/pkg/img/png">image/png</a>, then your code should still work as
-before.
-If your code <i>does</i> refer to <code>Pix</code> fields see the 
-<a href="/doc/devel/weekly.html#2011-07-19">weekly.2011-07-19</a>
-snapshot notes for how to update your code.
-</p>
-
-<p>
-<a href="/pkg/template/">Package template</a> has been replaced with a new
-templating package (formerly <code>exp/template</code>). The original template
-package is still available as <a href="/pkg/old/template/">old/template</a>.
-The <code>old/template</code> package is deprecated and will be removed.
-The Go tree has been updated to use the new template package. We encourage
-users of the old template package to switch to the new one. Code that uses
-<code>template</code> or <code>exp/template</code> will need to change its
-import lines to <code>"old/template"</code> or <code>"template"</code>,
-respectively.
-</p>
-
-<h3 id="r60.cmd">Tools</h3>
-
-<p>
-<a href="/cmd/goinstall/">Goinstall</a> now uses a new tag selection scheme.
-When downloading or updating, goinstall looks for a tag or branch with the
-<code>"go."</code> prefix that corresponds to the local Go version. For Go
-<code>release.r58</code> it looks for <code>go.r58</code>. For
-<code>weekly.2011-06-03</code> it looks for <code>go.weekly.2011-06-03</code>.
-If the specific <code>go.X</code> tag or branch is not found, it chooses the
-closest earlier version. If an appropriate tag or branch is found, goinstall
-uses that version of the code. Otherwise it uses the default version selected
-by the version control system. Library authors are encouraged to use the
-appropriate tag or branch names in their repositories to make their libraries
-more accessible.
-</p>
-
-<h3 id="r60.minor">Minor revisions</h3>
-
-<p>
-r60.1 includes a 
-<a href="//golang.org/change/1824581bf62d">linker
-fix</a>, a pair of
-<a href="//golang.org/change/9ef4429c2c64">goplay</a>
-<a href="//golang.org/change/d42ed8c3098e">fixes</a>,
-and a <code>json</code> package
-<a href="//golang.org/change/d5e97874fe84">fix</a> and
-a new
-<a href="//golang.org/change/4f0e6269213f">struct tag
-option</a>.
-</p>
-
-<p>
-r60.2
-<a href="//golang.org/change/ff19536042ac">fixes</a>
-a memory leak involving maps.
-</p>
-
-<p>
-r60.3 fixes a
-<a href="//golang.org/change/01fa62f5e4e5">reflect bug</a>.
-</p>
-
-<h2 id="r59">r59 (released 2011/08/01)</h2>
-
-<p>
-The r59 release corresponds to 
-<code><a href="weekly.html#2011-07-07">weekly.2011-07-07</a></code>.
-This section highlights the most significant changes in this release.
-For a more detailed summary, see the
-<a href="weekly.html#2011-07-07">weekly release notes</a>.
-For complete information, see the
-<a href="//code.google.com/p/go/source/list?r=release-branch.r59">Mercurial change list</a>.
-</p>
-
-<h3 id="r59.lang">Language</h3>
-
-<p>
-This release includes a language change that restricts the use of
-<code>goto</code>.  In essence, a <code>goto</code> statement outside a block
-cannot jump to a label inside that block. Your code may require changes if it
-uses <code>goto</code>.
-See <a href="//golang.org/change/dc6d3cf9279d">this
-changeset</a> for how the new rule affected the Go tree.
-</p>
-
-<h3 id="r59.pkg">Packages</h3>
-
-<p>
-As usual, <a href="/cmd/gofix/">gofix</a> will handle the bulk of the rewrites
-necessary for these changes to package APIs.
-</p>
-
-<p>
-<a href="/pkg/http">Package http</a> has a new
-<a href="/pkg/http/#FileSystem">FileSystem</a> interface that provides access
-to files. The <a href="/pkg/http/#FileServer">FileServer</a> helper now takes a
-<code>FileSystem</code> argument instead of an explicit file system root. By
-implementing your own <code>FileSystem</code> you can use the
-<code>FileServer</code> to serve arbitrary data.
-</p>
-
-<p>
-<a href="/pkg/os/">Package os</a>'s <code>ErrorString</code> type has been
-hidden. Most uses of <code>os.ErrorString</code> can be replaced with
-<a href="/pkg/os/#NewError">os.NewError</a>.
-</p>
-
-<p>
-<a href="/pkg/reflect/">Package reflect</a> supports a new struct tag scheme
-that enables sharing of struct tags between multiple packages.
-In this scheme, the tags must be of the form:
-</p>
-<pre>
-	`key:"value" key2:"value2"`
-</pre>
-<p>
-The <a href="/pkg/reflect/#StructField">StructField</a> type's Tag field now
-has type <a href="/pkg/reflect/#StructTag">StructTag</a>, which has a
-<code>Get</code> method. Clients of <a href="/pkg/json">json</a> and
-<a href="/pkg/xml">xml</a> will need to be updated. Code that says
-</p>
-<pre>
-	type T struct {
-		X int "name"
-	}
-</pre>
-<p>
-should become
-</p>
-<pre>
-	type T struct {
-		X int `json:"name"`  // or `xml:"name"`
-	}
-</pre>
-<p>
-Use <a href="/cmd/govet/">govet</a> to identify struct tags that need to be
-changed to use the new syntax.
-</p>
-
-<p>
-<a href="/pkg/sort/">Package sort</a>'s <code>IntArray</code> type has been
-renamed to <a href="/pkg/sort/#IntSlice">IntSlice</a>, and similarly for
-<a href="/pkg/sort/#Float64Slice">Float64Slice</a> and
-<a href="/pkg/sort/#StringSlice">StringSlice</a>.
-</p>
-
-<p>
-<a href="/pkg/strings/">Package strings</a>'s <code>Split</code> function has
-itself been split into <a href="/pkg/strings/#Split">Split</a> and
-<a href="/pkg/strings/#SplitN">SplitN</a>.
-<code>SplitN</code> is the same as the old <code>Split</code>.
-The new <code>Split</code> is equivalent to <code>SplitN</code> with a final
-argument of -1.
-</p>
-
-<a href="/pkg/image/draw/">Package image/draw</a>'s
-<a href="/pkg/image/draw/#Draw">Draw</a> function now takes an additional
-argument, a compositing operator.
-If in doubt, use <a href="/pkg/image/draw/#Op">draw.Over</a>.
-</p>
-
-<h3 id="r59.cmd">Tools</h3>
-
-<p>
-<a href="/cmd/goinstall/">Goinstall</a> now installs packages and commands from
-arbitrary remote repositories (not just Google Code, Github, and so on).
-See the <a href="/cmd/goinstall/">goinstall documentation</a> for details.
-</p>
-
-<h2 id="r58">r58 (released 2011/06/29)</h2>
-
-<p>
-The r58 release corresponds to 
-<code><a href="weekly.html#2011-06-09">weekly.2011-06-09</a></code>
-with additional bug fixes.
-This section highlights the most significant changes in this release.
-For a more detailed summary, see the
-<a href="weekly.html#2011-06-09">weekly release notes</a>.
-For complete information, see the
-<a href="//code.google.com/p/go/source/list?r=release-branch.r58">Mercurial change list</a>.
-</p>
-
-<h3 id="r58.lang">Language</h3>
-
-<p>
-This release fixes a <a href="//golang.org/change/b720749486e1">use of uninitialized memory in programs that misuse <code>goto</code></a>.
-</p>
-
-<h3 id="r58.pkg">Packages</h3>
-
-<p>
-As usual, <a href="/cmd/gofix/">gofix</a> will handle the bulk of the rewrites
-necessary for these changes to package APIs.
-</p>
-
-<p>
-<a href="/pkg/http/">Package http</a> drops the <code>finalURL</code> return
-value from the <a href="/pkg/http/#Client.Get">Client.Get</a> method. The value
-is now available via the new <code>Request</code> field on <a
-href="/pkg/http/#Response">http.Response</a>.
-Most instances of the type map[string][]string in have been
-replaced with the new <a href="/pkg/http/#Values">Values</a> type.
-</p>
-
-<p>
-<a href="/pkg/exec/">Package exec</a> has been redesigned with a more
-convenient and succinct API.
-</p>
-
-<p>
-<a href="/pkg/strconv/">Package strconv</a>'s <a href="/pkg/strconv/#Quote">Quote</a>
-function now escapes only those Unicode code points not classified as printable
-by <a href="/pkg/unicode/#IsPrint">unicode.IsPrint</a>.
-Previously Quote would escape all non-ASCII characters.
-This also affects the <a href="/pkg/fmt/">fmt</a> package's <code>"%q"</code>
-formatting directive. The previous quoting behavior is still available via
-strconv's new <a href="/pkg/strconv/#QuoteToASCII">QuoteToASCII</a> function.   
-</p>
-
-<p>
-<a href="/pkg/os/signal/">Package os/signal</a>'s
-<a href="/pkg/os/#Signal">Signal</a> and 
-<a href="/pkg/os/#UnixSignal">UnixSignal</a> types have been moved to the
-<a href="/pkg/os/">os</a> package.
-</p>
-
-<p>
-<a href="/pkg/image/draw/">Package image/draw</a> is the new name for
-<code>exp/draw</code>. The GUI-related code from <code>exp/draw</code> is now
-located in the <a href="/pkg/exp/gui/">exp/gui</a> package.
-</p>
-
-<h3 id="r58.cmd">Tools</h3>
-
-<p>
-<a href="/cmd/goinstall/">Goinstall</a> now observes the GOPATH environment
-variable to build and install your own code and external libraries outside of
-the Go tree (and avoid writing Makefiles).
-</p>
-
-
-<h3 id="r58.minor">Minor revisions</h3>
-
-<p>r58.1 adds 
-<a href="//golang.org/change/293c25943586">build</a> and
-<a href="//golang.org/change/bf17e96b6582">runtime</a>
-changes to make Go run on OS X 10.7 Lion.
-</p>
-
-<h2 id="r57">r57 (released 2011/05/03)</h2>
-
-<p>
-The r57 release corresponds to 
-<code><a href="weekly.html#2011-04-27">weekly.2011-04-27</a></code>
-with additional bug fixes.
-This section highlights the most significant changes in this release.
-For a more detailed summary, see the
-<a href="weekly.html#2011-04-27">weekly release notes</a>.
-For complete information, see the
-<a href="//code.google.com/p/go/source/list?r=release-branch.r57">Mercurial change list</a>.
-</p>
-
-<p>The new <a href="/cmd/gofix">gofix</a> tool finds Go programs that use old APIs and rewrites them to use
-newer ones.  After you update to a new Go release, gofix helps make the
-necessary changes to your programs. Gofix will handle the http, os, and syscall
-package changes described below, and we will update the program to keep up with
-future changes to the libraries. 
-Gofix can’t
-handle all situations perfectly, so read and test the changes it makes before
-committing them.
-See <a href="//blog.golang.org/2011/04/introducing-gofix.html">the gofix blog post</a> for more
-information.</p>
-
-<h3 id="r57.lang">Language</h3>
-
-<p>
-<a href="/doc/go_spec.html#Receive_operator">Multiple assignment syntax</a> replaces the <code>closed</code> function.
-The syntax for channel
-receives allows an optional second assigned value, a boolean value
-indicating whether the channel is closed. This code:
-</p>
-
-<pre>
-	v := <-ch
-	if closed(ch) {
-		// channel is closed
-	}
-</pre>
-
-<p>should now be written as:</p>
-
-<pre>
-	v, ok := <-ch
-	if !ok {
-		// channel is closed
-	}
-</pre>
-
-<p><a href="/doc/go_spec.html#Label_scopes">Unused labels are now illegal</a>, just as unused local variables are.</p>
-
-<h3 id="r57.pkg">Packages</h3>
-
-<p>
-<a href="/pkg/gob/">Package gob</a> will now encode and decode values of types that implement the
-<a href="/pkg/gob/#GobEncoder">GobEncoder</a> and
-<a href="/pkg/gob/#GobDecoder">GobDecoder</a> interfaces. This allows types with unexported
-fields to transmit self-consistent descriptions; examples include 
-<a href="/pkg/big/#Int.GobDecode">big.Int</a> and <a href="/pkg/big/#Rat.GobDecode">big.Rat</a>.
-</p>
-
-<p>
-<a href="/pkg/http/">Package http</a> has been redesigned.
-For clients, there are new
-<a href="/pkg/http/#Client">Client</a> and <a href="/pkg/http/#Transport">Transport</a>
-abstractions that give more control over HTTP details such as headers sent
-and redirections followed.  These abstractions make it easy to implement
-custom clients that add functionality such as <a href="//code.google.com/p/goauth2/source/browse/oauth/oauth.go">OAuth2</a>.
-For servers, <a href="/pkg/http/#ResponseWriter">ResponseWriter</a>
-has dropped its non-essential methods.
-The Hijack and Flush methods are no longer required;
-code can test for them by checking whether a specific value implements
-<a href="/pkg/http/#Hijacker">Hijacker</a> or <a href="/pkg/http/#Flusher">Flusher</a>.
-The RemoteAddr and UsingTLS methods are replaced by <a href="/pkg/http/#Request">Request</a>'s
-RemoteAddr and TLS fields.
-The SetHeader method is replaced by a Header method;
-its result, of type <a href="/pkg/http/#Header">Header</a>,
-implements Set and other methods.
-</p>
-
-<p>
-<a href="/pkg/net/">Package net</a>
-drops the <code>laddr</code> argument from <a href="/pkg/net/#Conn.Dial">Dial</a>
-and drops the <code>cname</code> return value
-from <a href="/pkg/net/#LookupHost">LookupHost</a>.
-The implementation now uses <a href="/cmd/cgo/">cgo</a> to implement
-network name lookups using the C library getaddrinfo(3)
-function when possible.  This ensures that Go and C programs
-resolve names the same way and also avoids the OS X 
-application-level firewall.
-</p>
-
-<p>
-<a href="/pkg/os/">Package os</a>
-introduces simplified <a href="/pkg/os/#File.Open">Open</a>
-and <a href="/pkg/os/#File.Create">Create</a> functions.
-The original Open is now available as <a href="/pkg/os/#File.OpenFile">OpenFile</a>.
-The final three arguments to <a href="/pkg/os/#Process.StartProcess">StartProcess</a>
-have been replaced by a pointer to a <a href="/pkg/os/#ProcAttr">ProcAttr</a>.
-</p>
-
-<p>
-<a href="/pkg/reflect/">Package reflect</a> has been redesigned.
-<a href="/pkg/reflect/#Type">Type</a> is now an interface that implements
-all the possible type methods.
-Instead of a type switch on a Type <code>t</code>, switch on <code>t.Kind()</code>.
-<a href="/pkg/reflect/#Value">Value</a> is now a struct value that
-implements all the possible value methods.
-Instead of a type switch on a Value <code>v</code>, switch on <code>v.Kind()</code>.
-Typeof and NewValue are now called <a href="/pkg/reflect/#Type.TypeOf">TypeOf</a> and <a href="/pkg/reflect/#Value.ValueOf">ValueOf</a>
-To create a writable Value, use <code>New(t).Elem()</code> instead of <code>Zero(t)</code>.
-See <a href="//golang.org/change/843855f3c026">the change description</a>
-for the full details.
-The new API allows a more efficient implementation of Value
-that avoids many of the allocations required by the previous API.
-</p>
-
-<p>
-Remember that gofix will handle the bulk of the rewrites
-necessary for these changes to package APIs.
-</p>
-
-<h3 id="r57.cmd">Tools</h3>
-
-<p><a href="/cmd/gofix/">Gofix</a>, a new command, is described above.</p>
-
-<p>
-<a href="/cmd/gotest/">Gotest</a> is now a Go program instead of a shell script.
-The new <code>-test.short</code> flag in combination with package testing's Short function
-allows you to write tests that can be run in normal or “short” mode;
-all.bash runs tests in short mode to reduce installation time.
-The Makefiles know about the flag: use <code>make testshort</code>.
-</p>
-
-<p>
-The run-time support now implements CPU and memory profiling.
-Gotest's new 
-<a href="/cmd/gotest/"><code>-test.cpuprofile</code> and
-<code>-test.memprofile</code> flags</a> make it easy to
-profile tests.
-To add profiling to your web server, see the <a href="/pkg/http/pprof/">http/pprof</a>
-documentation.
-For other uses, see the <a href="/pkg/runtime/pprof/">runtime/pprof</a> documentation.
-</p>
-
-<h3 id="r57.minor">Minor revisions</h3>
-
-<p>r57.1 fixes a <a href="//golang.org/change/ff2bc62726e7145eb2ecc1e0f076998e4a8f86f0">nil pointer dereference in http.FormFile</a>.</p>
-<p>r57.2 fixes a <a href="//golang.org/change/063b0ff67d8277df03c956208abc068076818dae">use of uninitialized memory in programs that misuse <code>goto</code></a>.</p>
-
-<h2 id="r56">r56 (released 2011/03/16)</h2>
-
-<p>
-The r56 release was the first stable release and corresponds to
-<code><a href="weekly.html#2011-03-07">weekly.2011-03-07.1</a></code>.
-The numbering starts at 56 because before this release,
-what we now consider weekly snapshots were called releases.
-</p>
diff --git a/doc/go1.5.html b/doc/go1.5.html
deleted file mode 100644
index 4e5832d..0000000
--- a/doc/go1.5.html
+++ /dev/null
@@ -1,1303 +0,0 @@
-<!--{
-	"Title": "Go 1.5 Release Notes",
-	"Path":  "/doc/go1.5",
-	"Template": true
-}-->
-
-
-<h2 id="introduction">Introduction to Go 1.5</h2>
-
-<p>
-The latest Go release, version 1.5,
-is a significant release, including major architectural changes to the implementation.
-Despite that, we expect almost all Go programs to continue to compile and run as before,
-because the release still maintains the Go 1 <a href="/doc/go1compat.html">promise
-of compatibility</a>.
-</p>
-
-<p>
-The biggest developments in the implementation are:
-</p>
-
-<ul>
-
-<li>
-The compiler and runtime are now written entirely in Go (with a little assembler).
-C is no longer involved in the implementation, and so the C compiler that was
-once necessary for building the distribution is gone.
-</li>
-
-<li>
-The garbage collector is now <a href="https://golang.org/s/go14gc">concurrent</a> and provides dramatically lower
-pause times by running, when possible, in parallel with other goroutines.
-</li>
-
-<li>
-By default, Go programs run with <code>GOMAXPROCS</code> set to the
-number of cores available; in prior releases it defaulted to 1.
-</li>
-
-<li>
-Support for <a href="https://golang.org/s/go14internal">internal packages</a>
-is now provided for all repositories, not just the Go core.
-</li>
-
-<li>
-The <code>go</code> command now provides <a href="https://golang.org/s/go15vendor">experimental
-support</a> for "vendoring" external dependencies.
-</li>
-
-<li>
-A new <code>go tool trace</code> command supports fine-grained
-tracing of program execution.
-</li>
-
-<li>
-A new <code>go doc</code> command (distinct from <code>godoc</code>)
-is customized for command-line use.
-</li>
-
-</ul>
-
-<p>
-These and a number of other changes to the implementation and tools
-are discussed below.
-</p>
-
-<p>
-The release also contains one small language change involving map literals.
-</p>
-
-<p>
-Finally, the timing of the <a href="https://golang.org/s/releasesched">release</a>
-strays from the usual six-month interval,
-both to provide more time to prepare this major release and to shift the schedule thereafter to
-time the release dates more conveniently.
-</p>
-
-<h2 id="language">Changes to the language</h2>
-
-<h3 id="map_literals">Map literals</h3>
-
-<p>
-Due to an oversight, the rule that allowed the element type to be elided from slice literals was not
-applied to map keys.
-This has been <a href="/cl/2591">corrected</a> in Go 1.5.
-An example will make this clear.
-As of Go 1.5, this map literal,
-</p>
-
-<pre>
-m := map[Point]string{
-    Point{29.935523, 52.891566}:   "Persepolis",
-    Point{-25.352594, 131.034361}: "Uluru",
-    Point{37.422455, -122.084306}: "Googleplex",
-}
-</pre>
-
-<p>
-may be written as follows, without the <code>Point</code> type listed explicitly:
-</p>
-
-<pre>
-m := map[Point]string{
-    {29.935523, 52.891566}:   "Persepolis",
-    {-25.352594, 131.034361}: "Uluru",
-    {37.422455, -122.084306}: "Googleplex",
-}
-</pre>
-
-<h2 id="implementation">The Implementation</h2>
-
-<h3 id="c">No more C</h3>
-
-<p>
-The compiler and runtime are now implemented in Go and assembler, without C.
-The only C source left in the tree is related to testing or to <code>cgo</code>.
-There was a C compiler in the tree in 1.4 and earlier.
-It was used to build the runtime; a custom compiler was necessary in part to
-guarantee the C code would work with the stack management of goroutines.
-Since the runtime is in Go now, there is no need for this C compiler and it is gone.
-Details of the process to eliminate C are discussed <a href="https://golang.org/s/go13compiler">elsewhere</a>.
-</p>
-
-<p>
-The conversion from C was done with the help of custom tools created for the job.
-Most important, the compiler was actually moved by automatic translation of
-the C code into Go.
-It is in effect the same program in a different language.
-It is not a new implementation
-of the compiler so we expect the process will not have introduced new compiler
-bugs.
-An overview of this process is available in the slides for
-<a href="https://talks.golang.org/2015/gogo.slide">this presentation</a>.
-</p>
-
-<h3 id="compiler_and_tools">Compiler and tools</h3>
-
-<p>
-Independent of but encouraged by the move to Go, the names of the tools have changed.
-The old names <code>6g</code>, <code>8g</code> and so on are gone; instead there
-is just one binary, accessible as <code>go</code> <code>tool</code> <code>compile</code>,
-that compiles Go source into binaries suitable for the architecture and operating system
-specified by <code>$GOARCH</code> and <code>$GOOS</code>.
-Similarly, there is now one linker (<code>go</code> <code>tool</code> <code>link</code>)
-and one assembler (<code>go</code> <code>tool</code> <code>asm</code>).
-The linker was translated automatically from the old C implementation,
-but the assembler is a new native Go implementation discussed
-in more detail below.
-</p>
-
-<p>
-Similar to the drop of the names <code>6g</code>, <code>8g</code>, and so on,
-the output of the compiler and assembler are now given a plain <code>.o</code> suffix
-rather than <code>.8</code>, <code>.6</code>, etc.
-</p>
-
-
-<h3 id="gc">Garbage collector</h3>
-
-<p>
-The garbage collector has been re-engineered for 1.5 as part of the development
-outlined in the <a href="https://golang.org/s/go14gc">design document</a>.
-Expected latencies are much lower than with the collector
-in prior releases, through a combination of advanced algorithms,
-better <a href="https://golang.org/s/go15gcpacing">scheduling</a> of the collector,
-and running more of the collection in parallel with the user program.
-The "stop the world" phase of the collector
-will almost always be under 10 milliseconds and usually much less.
-</p>
-
-<p>
-For systems that benefit from low latency, such as user-responsive web sites,
-the drop in expected latency with the new collector may be important.
-</p>
-
-<p>
-Details of the new collector were presented in a
-<a href="https://talks.golang.org/2015/go-gc.pdf">talk</a> at GopherCon 2015.
-</p>
-
-<h3 id="runtime">Runtime</h3>
-
-<p>
-In Go 1.5, the order in which goroutines are scheduled has been changed.
-The properties of the scheduler were never defined by the language,
-but programs that depend on the scheduling order may be broken
-by this change.
-We have seen a few (erroneous) programs affected by this change.
-If you have programs that implicitly depend on the scheduling
-order, you will need to update them.
-</p>
-
-<p>
-Another potentially breaking change is that the runtime now
-sets the default number of threads to run simultaneously,
-defined by <code>GOMAXPROCS</code>, to the number
-of cores available on the CPU.
-In prior releases the default was 1.
-Programs that do not expect to run with multiple cores may
-break inadvertently.
-They can be updated by removing the restriction or by setting
-<code>GOMAXPROCS</code> explicitly.
-For a more detailed discussion of this change, see
-the <a href="https://golang.org/s/go15gomaxprocs">design document</a>.
-</p>
-
-<h3 id="build">Build</h3>
-
-<p>
-Now that the Go compiler and runtime are implemented in Go, a Go compiler
-must be available to compile the distribution from source.
-Thus, to build the Go core, a working Go distribution must already be in place.
-(Go programmers who do not work on the core are unaffected by this change.)
-Any Go 1.4 or later distribution (including <code>gccgo</code>) will serve.
-For details, see the <a href="https://golang.org/s/go15bootstrap">design document</a>.
-</p>
-
-<h2 id="ports">Ports</h2>
-
-<p>
-Due mostly to the industry's move away from the 32-bit x86 architecture,
-the set of binary downloads provided is reduced in 1.5.
-A distribution for the OS X operating system is provided only for the
-<code>amd64</code> architecture, not <code>386</code>.
-Similarly, the ports for Snow Leopard (Apple OS X 10.6) still work but are no
-longer released as a download or maintained since Apple no longer maintains that version
-of the operating system.
-Also, the <code>dragonfly/386</code> port is no longer supported at all
-because DragonflyBSD itself no longer supports the 32-bit 386 architecture.
-</p>
-
-<p>
-There are however several new ports available to be built from source.
-These include <code>darwin/arm</code> and <code>darwin/arm64</code>.
-The new port <code>linux/arm64</code> is mostly in place, but <code>cgo</code>
-is only supported using external linking.
-</p>
-
-<p>
-Also available as experiments are <code>ppc64</code>
-and <code>ppc64le</code> (64-bit PowerPC, big- and little-endian).
-Both these ports support <code>cgo</code> but
-only with internal linking.
-</p>
-
-<p>
-On FreeBSD, Go 1.5 requires FreeBSD 8-STABLE+ because of its new use of the <code>SYSCALL</code> instruction.
-</p>
-
-<p>
-On NaCl, Go 1.5 requires SDK version pepper-41. Later pepper versions are not
-compatible due to the removal of the sRPC subsystem from the NaCl runtime.
-</p>
-
-<p>
-On Darwin, the use of the system X.509 certificate interface can be disabled
-with the <code>ios</code> build tag.
-</p>
-
-<p>
-The Solaris port now has full support for cgo and the packages
-<a href="/pkg/net/"><code>net</code></a> and
-<a href="/pkg/crypto/x509/"><code>crypto/x509</code></a>,
-as well as a number of other fixes and improvements.
-</p>
-
-<h2 id="tools">Tools</h2>
-
-<h3 id="translate">Translating</h3>
-
-<p>
-As part of the process to eliminate C from the tree, the compiler and
-linker were translated from C to Go.
-It was a genuine (machine assisted) translation, so the new programs are essentially
-the old programs translated rather than new ones with new bugs.
-We are confident the translation process has introduced few if any new bugs,
-and in fact uncovered a number of previously unknown bugs, now fixed.
-</p>
-
-<p>
-The assembler is a new program, however; it is described below.
-</p>
-
-<h3 id="rename">Renaming</h3>
-
-<p>
-The suites of programs that were the compilers (<code>6g</code>, <code>8g</code>, etc.),
-the assemblers (<code>6a</code>, <code>8a</code>, etc.),
-and the linkers (<code>6l</code>, <code>8l</code>, etc.)
-have each been consolidated into a single tool that is configured
-by the environment variables <code>GOOS</code> and <code>GOARCH</code>.
-The old names are gone; the new tools are available through the <code>go</code> <code>tool</code>
-mechanism as <code>go tool compile</code>,
-<code>go tool asm</code>,
-<code>and go tool link</code>.
-Also, the file suffixes <code>.6</code>, <code>.8</code>, etc. for the
-intermediate object files are also gone; now they are just plain <code>.o</code> files.
-</p>
-
-<p>
-For example, to build and link a program on amd64 for Darwin
-using the tools directly, rather than through <code>go build</code>,
-one would run:
-</p>
-
-<pre>
-$ export GOOS=darwin GOARCH=amd64
-$ go tool compile program.go
-$ go tool link program.o
-</pre>
-
-<h3 id="moving">Moving</h3>
-
-<p>
-Because the <a href="/pkg/go/types/"><code>go/types</code></a> package
-has now moved into the main repository (see below),
-the <a href="/cmd/vet"><code>vet</code></a> and
-<a href="/cmd/cover"><code>cover</code></a>
-tools have also been moved.
-They are no longer maintained in the external <code>golang.org/x/tools</code> repository,
-although (deprecated) source still resides there for compatibility with old releases.
-</p>
-
-<h3 id="compiler">Compiler</h3>
-
-<p>
-As described above, the compiler in Go 1.5 is a single Go program,
-translated from the old C source, that replaces <code>6g</code>, <code>8g</code>,
-and so on.
-Its target is configured by the environment variables <code>GOOS</code> and <code>GOARCH</code>.
-</p>
-
-<p>
-The 1.5 compiler is mostly equivalent to the old,
-but some internal details have changed.
-One significant change is that evaluation of constants now uses
-the <a href="/pkg/math/big/"><code>math/big</code></a> package
-rather than a custom (and less well tested) implementation of high precision
-arithmetic.
-We do not expect this to affect the results.
-</p>
-
-<p>
-For the amd64 architecture only, the compiler has a new option, <code>-dynlink</code>,
-that assists dynamic linking by supporting references to Go symbols
-defined in external shared libraries.
-</p>
-
-<h3 id="assembler">Assembler</h3>
-
-<p>
-Like the compiler and linker, the assembler in Go 1.5 is a single program
-that replaces the suite of assemblers (<code>6a</code>,
-<code>8a</code>, etc.) and the environment variables
-<code>GOARCH</code> and <code>GOOS</code>
-configure the architecture and operating system.
-Unlike the other programs, the assembler is a wholly new program
-written in Go.
-</p>
-
- <p>
-The new assembler is very nearly compatible with the previous
-ones, but there are a few changes that may affect some
-assembler source files.
-See the updated <a href="/doc/asm">assembler guide</a>
-for more specific information about these changes. In summary:
-
-</p>
-
-<p>
-First, the expression evaluation used for constants is a little
-different.
-It now uses unsigned 64-bit arithmetic and the precedence
-of operators (<code>+</code>, <code>-</code>, <code><<</code>, etc.)
-comes from Go, not C.
-We expect these changes to affect very few programs but
-manual verification may be required.
-</p>
-
-<p>
-Perhaps more important is that on machines where
-<code>SP</code> or <code>PC</code> is only an alias
-for a numbered register,
-such as <code>R13</code> for the stack pointer and
-<code>R15</code> for the hardware program counter
-on ARM,
-a reference to such a register that does not include a symbol
-is now illegal.
-For example, <code>SP</code> and <code>4(SP)</code> are
-illegal but <code>sym+4(SP)</code> is fine.
-On such machines, to refer to the hardware register use its
-true <code>R</code> name.
-</p>
-
-<p>
-One minor change is that some of the old assemblers
-permitted the notation
-</p>
-
-<pre>
-constant=value
-</pre>
-
-<p>
-to define a named constant.
-Since this is always possible to do with the traditional
-C-like <code>#define</code> notation, which is still
-supported (the assembler includes an implementation
-of a simplified C preprocessor), the feature was removed.
-</p>
-
-<h3 id="link">Linker</h3>
-
-<p>
-The linker in Go 1.5 is now one Go program,
-that replaces <code>6l</code>, <code>8l</code>, etc.
-Its operating system and instruction set are specified
-by the environment variables <code>GOOS</code> and <code>GOARCH</code>.
-</p>
-
-<p>
-There are several other changes.
-The most significant is the addition of a <code>-buildmode</code> option that
-expands the style of linking; it now supports
-situations such as building shared libraries and allowing other languages
-to call into Go libraries.
-Some of these were outlined in a <a href="https://golang.org/s/execmodes">design document</a>.
-For a list of the available build modes and their use, run
-</p>
-
-<pre>
-$ go help buildmode
-</pre>
-
-<p>
-Another minor change is that the linker no longer records build time stamps in
-the header of Windows executables.
-Also, although this may be fixed, Windows cgo executables are missing some
-DWARF information.
-</p>
-
-<p>
-Finally, the <code>-X</code> flag, which takes two arguments,
-as in
-</p>
-
-<pre>
--X importpath.name value
-</pre>
-
-<p>
-now also accepts a more common Go flag style with a single argument
-that is itself a <code>name=value</code> pair:
-</p>
-
-<pre>
--X importpath.name=value
-</pre>
-
-<p>
-Although the old syntax still works, it is recommended that uses of this
-flag in scripts and the like be updated to the new form.
-</p>
-
-<h3 id="go_command">Go command</h3>
-
-<p>
-The <a href="/cmd/go"><code>go</code></a> command's basic operation
-is unchanged, but there are a number of changes worth noting.
-</p>
-
-<p>
-The previous release introduced the idea of a directory internal to a package
-being unimportable through the <code>go</code> command.
-In 1.4, it was tested with the introduction of some internal elements
-in the core repository.
-As suggested in the <a href="https://golang.org/s/go14internal">design document</a>,
-that change is now being made available to all repositories.
-The rules are explained in the design document, but in summary any
-package in or under a directory named <code>internal</code> may
-be imported by packages rooted in the same subtree.
-Existing packages with directory elements named <code>internal</code> may be
-inadvertently broken by this change, which was why it was advertised
-in the last release.
-</p>
-
-<p>
-Another change in how packages are handled is the experimental
-addition of support for "vendoring".
-For details, see the documentation for the <a href="/cmd/go/#hdr-Vendor_Directories"><code>go</code> command</a>
-and the <a href="https://golang.org/s/go15vendor">design document</a>.
-</p>
-
-<p>
-There have also been several minor changes.
-Read the <a href="/cmd/go">documentation</a> for full details.
-</p>
-
-<ul>
-
-<li>
-SWIG support has been updated such that
-<code>.swig</code> and <code>.swigcxx</code>
-now require SWIG 3.0.6 or later.
-</li>
-
-<li>
-The <code>std</code> (standard library) wildcard package name
-now excludes commands.
-A new <code>cmd</code> wildcard covers the commands.
-</li>
-
-<li>
-A new <code>-asmflags</code> build option
-sets flags to pass to the assembler.
-However,
-the <code>-ccflags</code> build option has been dropped;
-it was specific to the old, now deleted C compiler .
-</li>
-
-<li>
-A new <code>-buildmode</code> build option
-sets the build mode, described above.
-</li>
-
-<li>
-A new <code>-pkgdir</code> build option
-sets the location of installed package archives,
-to help isolate custom builds.
-</li>
-
-<li>
-A new <code>-toolexec</code> build option
-allows substitution of a different command to invoke
-the compiler and so on.
-This acts as a custom replacement for <code>go tool</code>.
-</li>
-
-<li>
-The <code>test</code> subcommand now has a <code>-count</code>
-flag to specify how many times to run each test and benchmark.
-The <a href="/pkg/testing/"><code>testing</code></a> package
-does the work here, through by the <code>-test.count</code> flag.
-</li>
-
-<li>
-The <code>generate</code> subcommand has a couple of new features.
-The <code>-run</code> option specifies a regular expression to select which directives
-to execute; this was proposed but never implemented in 1.4.
-The executing pattern now has access to two new environment variables:
-<code>$GOLINE</code> returns the source line number of the directive
-and <code>$DOLLAR</code> expands to a dollar sign.
-</li>
-
-<li>
-The <code>get</code> subcommand now has a <code>-insecure</code>
-flag that must be enabled if fetching from an insecure repository, one that
-does not encrypt the connection.
-</li>
-
-</ul>
-
-<h3 id="vet_command">Go vet command</h3>
-
-<p>
-The <a href="/cmd/vet"><code>go tool vet</code></a> command now does
-more thorough validation of struct tags.
-</p>
-
-<h3 id="trace_command">Trace command</h3>
-
-<p>
-A new tool is available for dynamic execution tracing of Go programs.
-The usage is analogous to how the test coverage tool works.
-Generation of traces is integrated into <code>go test</code>,
-and then a separate execution of the tracing tool itself analyzes the results:
-</p>
-
-<pre>
-$ go test -trace=trace.out path/to/package
-$ go tool trace [flags] pkg.test trace.out
-</pre>
-
-<p>
-The flags enable the output to be displayed in a browser window.
-For details, run <code>go tool trace -help</code>.
-There is also a description of the tracing facility in this
-<a href="https://talks.golang.org/2015/dynamic-tools.slide">talk</a>
-from GopherCon 2015.
-</p>
-
-<h3 id="doc_command">Go doc command</h3>
-
-<p>
-A few releases back, the <code>go doc</code>
-command was deleted as being unnecessary.
-One could always run "<code>godoc .</code>" instead.
-The 1.5 release introduces a new <a href="/cmd/doc"><code>go doc</code></a>
-command with a more convenient command-line interface than
-<code>godoc</code>'s.
-It is designed for command-line usage specifically, and provides a more
-compact and focused presentation of the documentation for a package
-or its elements, according to the invocation.
-It also provides case-insensitive matching and
-support for showing the documentation for unexported symbols.
-For details run "<code>go help doc</code>".
-</p>
-
-<h3 id="cgo">Cgo</h3>
-
-<p>
-When parsing <code>#cgo</code> lines,
-the invocation <code>${SRCDIR}</code> is now
-expanded into the path to the source directory.
-This allows options to be passed to the
-compiler and linker that involve file paths relative to the
-source code directory. Without the expansion the paths would be
-invalid when the current working directory changes.
-</p>
-
-<p>
-Solaris now has full cgo support.
-</p>
-
-<p>
-On Windows, cgo now uses external linking by default.
-</p>
-
-<p>
-When a C struct ends with a zero-sized field, but the struct itself is
-not zero-sized, Go code can no longer refer to the zero-sized field.
-Any such references will have to be rewritten.
-</p>
-
-<h2 id="performance">Performance</h2>
-
-<p>
-As always, the changes are so general and varied that precise statements
-about performance are difficult to make.
-The changes are even broader ranging than usual in this release, which
-includes a new garbage collector and a conversion of the runtime to Go.
-Some programs may run faster, some slower.
-On average the programs in the Go 1 benchmark suite run a few percent faster in Go 1.5
-than they did in Go 1.4,
-while as mentioned above the garbage collector's pauses are
-dramatically shorter, and almost always under 10 milliseconds.
-</p>
-
-<p>
-Builds in Go 1.5 will be slower by a factor of about two.
-The automatic translation of the compiler and linker from C to Go resulted in
-unidiomatic Go code that performs poorly compared to well-written Go.
-Analysis tools and refactoring helped to improve the code, but much remains to be done.
-Further profiling and optimization will continue in Go 1.6 and future releases.
-For more details, see these <a href="https://talks.golang.org/2015/gogo.slide">slides</a>
-and associated <a href="https://www.youtube.com/watch?v=cF1zJYkBW4A">video</a>.
-</p>
-
-<h2 id="library">Core library</h2>
-
-<h3 id="flag">Flag</h3>
-
-<p>
-The flag package's
-<a href="/pkg/flag/#PrintDefaults"><code>PrintDefaults</code></a>
-function, and method on <a href="/pkg/flag/#FlagSet"><code>FlagSet</code></a>,
-have been modified to create nicer usage messages.
-The format has been changed to be more human-friendly and in the usage
-messages a word quoted with `backquotes` is taken to be the name of the
-flag's operand to display in the usage message.
-For instance, a flag created with the invocation,
-</p>
-
-<pre>
-cpuFlag = flag.Int("cpu", 1, "run `N` processes in parallel")
-</pre>
-
-<p>
-will show the help message,
-</p>
-
-<pre>
--cpu N
-    	run N processes in parallel (default 1)
-</pre>
-
-<p>
-Also, the default is now listed only when it is not the zero value for the type.
-</p>
-
-<h3 id="math_big">Floats in math/big</h3>
-
-<p>
-The <a href="/pkg/math/big/"><code>math/big</code></a> package
-has a new, fundamental data type,
-<a href="/pkg/math/big/#Float"><code>Float</code></a>,
-which implements arbitrary-precision floating-point numbers.
-A <code>Float</code> value is represented by a boolean sign,
-a variable-length mantissa, and a 32-bit fixed-size signed exponent.
-The precision of a <code>Float</code> (the mantissa size in bits)
-can be specified explicitly or is otherwise determined by the first
-operation that creates the value.
-Once created, the size of a <code>Float</code>'s mantissa may be modified with the
-<a href="/pkg/math/big/#Float.SetPrec"><code>SetPrec</code></a> method.
-<code>Floats</code> support the concept of infinities, such as are created by
-overflow, but values that would lead to the equivalent of IEEE 754 NaNs
-trigger a panic.
-<code>Float</code> operations support all IEEE-754 rounding modes.
-When the precision is set to 24 (53) bits,
-operations that stay within the range of normalized <code>float32</code>
-(<code>float64</code>)
-values produce the same results as the corresponding IEEE-754
-arithmetic on those values.
-</p>
-
-<h3 id="go_types">Go types</h3>
-
-<p>
-The <a href="/pkg/go/types/"><code>go/types</code></a> package
-up to now has been maintained in the <code>golang.org/x</code>
-repository; as of Go 1.5 it has been relocated to the main repository.
-The code at the old location is now deprecated.
-There is also a modest API change in the package, discussed below.
-</p>
-
-<p>
-Associated with this move, the
-<a href="/pkg/go/constant/"><code>go/constant</code></a>
-package also moved to the main repository;
-it was <code>golang.org/x/tools/exact</code> before.
-The <a href="/pkg/go/importer/"><code>go/importer</code></a> package
-also moved to the main repository,
-as well as some tools described above.
-</p>
-
-<h3 id="net">Net</h3>
-
-<p>
-The DNS resolver in the net package has almost always used <code>cgo</code> to access
-the system interface.
-A change in Go 1.5 means that on most Unix systems DNS resolution
-will no longer require <code>cgo</code>, which simplifies execution
-on those platforms.
-Now, if the system's networking configuration permits, the native Go resolver
-will suffice.
-The important effect of this change is that each DNS resolution occupies a goroutine
-rather than a thread,
-so a program with multiple outstanding DNS requests will consume fewer operating
-system resources.
-</p>
-
-<p>
-The decision of how to run the resolver applies at run time, not build time.
-The <code>netgo</code> build tag that has been used to enforce the use
-of the Go resolver is no longer necessary, although it still works.
-A new <code>netcgo</code> build tag forces the use of the <code>cgo</code> resolver at
-build time.
-To force <code>cgo</code> resolution at run time set
-<code>GODEBUG=netdns=cgo</code> in the environment.
-More debug options are documented <a href="https://golang.org/cl/11584">here</a>.
-</p>
-
-<p>
-This change applies to Unix systems only.
-Windows, Mac OS X, and Plan 9 systems behave as before.
-</p>
-
-<h3 id="reflect">Reflect</h3>
-
-<p>
-The <a href="/pkg/reflect/"><code>reflect</code></a> package
-has two new functions: <a href="/pkg/reflect/#ArrayOf"><code>ArrayOf</code></a>
-and <a href="/pkg/reflect/#FuncOf"><code>FuncOf</code></a>.
-These functions, analogous to the extant
-<a href="/pkg/reflect/#SliceOf"><code>SliceOf</code></a> function,
-create new types at runtime to describe arrays and functions.
-</p>
-
-<h3 id="hardening">Hardening</h3>
-
-<p>
-Several dozen bugs were found in the standard library
-through randomized testing with the
-<a href="https://github.com/dvyukov/go-fuzz"><code>go-fuzz</code></a> tool.
-Bugs were fixed in the
-<a href="/pkg/archive/tar/"><code>archive/tar</code></a>,
-<a href="/pkg/archive/zip/"><code>archive/zip</code></a>,
-<a href="/pkg/compress/flate/"><code>compress/flate</code></a>,
-<a href="/pkg/encoding/gob/"><code>encoding/gob</code></a>,
-<a href="/pkg/fmt/"><code>fmt</code></a>,
-<a href="/pkg/html/template/"><code>html/template</code></a>,
-<a href="/pkg/image/gif/"><code>image/gif</code></a>,
-<a href="/pkg/image/jpeg/"><code>image/jpeg</code></a>,
-<a href="/pkg/image/png/"><code>image/png</code></a>, and
-<a href="/pkg/text/template/"><code>text/template</code></a>,
-packages.
-The fixes harden the implementation against incorrect and malicious inputs.
-</p>
-
-<h3 id="minor_library_changes">Minor changes to the library</h3>
-
-<ul>
-
-<li>
-The <a href="/pkg/archive/zip/"><code>archive/zip</code></a> package's
-<a href="/pkg/archive/zip/#Writer"><code>Writer</code></a> type now has a
-<a href="/pkg/archive/zip/#Writer.SetOffset"><code>SetOffset</code></a>
-method to specify the location within the output stream at which to write the archive.
-</li>
-
-<li>
-The <a href="/pkg/bufio/#Reader"><code>Reader</code></a> in the
-<a href="/pkg/bufio/"><code>bufio</code></a> package now has a
-<a href="/pkg/bufio/#Reader.Discard"><code>Discard</code></a>
-method to discard data from the input.
-</li>
-
-<li>
-In the <a href="/pkg/bytes/"><code>bytes</code></a> package,
-the <a href="/pkg/bytes/#Buffer"><code>Buffer</code></a> type
-now has a <a href="/pkg/bytes/#Buffer.Cap"><code>Cap</code></a> method
-that reports the number of bytes allocated within the buffer.
-Similarly, in both the <a href="/pkg/bytes/"><code>bytes</code></a>
-and <a href="/pkg/strings/"><code>strings</code></a> packages,
-the <a href="/pkg/bytes/#Reader"><code>Reader</code></a>
-type now has a <a href="/pkg/bytes/#Reader.Size"><code>Size</code></a>
-method that reports the original length of the underlying slice or string.
-</li>
-
-<li>
-Both the <a href="/pkg/bytes/"><code>bytes</code></a> and
-<a href="/pkg/strings/"><code>strings</code></a> packages
-also now have a <a href="/pkg/bytes/#LastIndexByte"><code>LastIndexByte</code></a>
-function that locates the rightmost byte with that value in the argument.
-</li>
-
-<li>
-The <a href="/pkg/crypto/"><code>crypto</code></a> package
-has a new interface, <a href="/pkg/crypto/#Decrypter"><code>Decrypter</code></a>,
-that abstracts the behavior of a private key used in asymmetric decryption.
-</li>
-
-<li>
-In the <a href="/pkg/crypto/cipher/"><code>crypto/cipher</code></a> package,
-the documentation for the <a href="/pkg/crypto/cipher/#Stream"><code>Stream</code></a>
-interface has been clarified regarding the behavior when the source and destination are
-different lengths.
-If the destination is shorter than the source, the method will panic.
-This is not a change in the implementation, only the documentation.
-</li>
-
-<li>
-Also in the <a href="/pkg/crypto/cipher/"><code>crypto/cipher</code></a> package,
-there is now support for nonce lengths other than 96 bytes in AES's Galois/Counter mode (GCM),
-which some protocols require.
-</li>
-
-<li>
-In the <a href="/pkg/crypto/elliptic/"><code>crypto/elliptic</code></a> package,
-there is now a <code>Name</code> field in the
-<a href="/pkg/crypto/elliptic/#CurveParams"><code>CurveParams</code></a> struct,
-and the curves implemented in the package have been given names.
-These names provide a safer way to select a curve, as opposed to
-selecting its bit size, for cryptographic systems that are curve-dependent.
-</li>
-
-<li>
-Also in the <a href="/pkg/crypto/elliptic/"><code>crypto/elliptic</code></a> package,
-the <a href="/pkg/crypto/elliptic/#Unmarshal"><code>Unmarshal</code></a> function
-now verifies that the point is actually on the curve.
-(If it is not, the function returns nils).
-This change guards against certain attacks.
-</li>
-
-<li>
-The <a href="/pkg/crypto/sha512/"><code>crypto/sha512</code></a>
-package now has support for the two truncated versions of
-the SHA-512 hash algorithm, SHA-512/224 and SHA-512/256.
-</li>
-
-<li>
-The <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> package
-minimum protocol version now defaults to TLS 1.0.
-The old default, SSLv3, is still available through <a href="/pkg/crypto/tls/#Config"><code>Config</code></a> if needed.
-</li>
-
-<li>
-The <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> package
-now supports Signed Certificate Timestamps (SCTs) as specified in RFC 6962.
-The server serves them if they are listed in the
-<a href="/pkg/crypto/tls/#Certificate"><code>Certificate</code></a> struct,
-and the client requests them and exposes them, if present,
-in its <a href="/pkg/crypto/tls/#ConnectionState"><code>ConnectionState</code></a> struct.
-
-<li>
-The stapled OCSP response to a <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> client connection,
-previously only available via the
-<a href="/pkg/crypto/tls/#Conn.OCSPResponse"><code>OCSPResponse</code></a> method,
-is now exposed in the <a href="/pkg/crypto/tls/#ConnectionState"><code>ConnectionState</code></a> struct.
-</li>
-
-<li>
-The <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> server implementation
-will now always call the
-<code>GetCertificate</code> function in
-the <a href="/pkg/crypto/tls/#Config"><code>Config</code></a> struct
-to select a certificate for the connection when none is supplied.
-</li>
-
-<li>
-Finally, the session ticket keys in the
-<a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> package
-can now be changed while the server is running.
-This is done through the new
-<a href="/pkg/crypto/tls/#Config.SetSessionTicketKeys"><code>SetSessionTicketKeys</code></a>
-method of the
-<a href="/pkg/crypto/tls/#Config"><code>Config</code></a> type.
-</li>
-
-<li>
-In the <a href="/pkg/crypto/x509/"><code>crypto/x509</code></a> package,
-wildcards are now accepted only in the leftmost label as defined in
-<a href="https://tools.ietf.org/html/rfc6125#section-6.4.3">the specification</a>.
-</li>
-
-<li>
-Also in the <a href="/pkg/crypto/x509/"><code>crypto/x509</code></a> package,
-the handling of unknown critical extensions has been changed.
-They used to cause parse errors but now they are parsed and caused errors only
-in <a href="/pkg/crypto/x509/#Certificate.Verify"><code>Verify</code></a>.
-The new field <code>UnhandledCriticalExtensions</code> of
-<a href="/pkg/crypto/x509/#Certificate"><code>Certificate</code></a> records these extensions.
-</li>
-
-<li>
-The <a href="/pkg/database/sql/#DB"><code>DB</code></a> type of the
-<a href="/pkg/database/sql/"><code>database/sql</code></a> package
-now has a <a href="/pkg/database/sql/#DB.Stats"><code>Stats</code></a> method
-to retrieve database statistics.
-</li>
-
-<li>
-The <a href="/pkg/debug/dwarf/"><code>debug/dwarf</code></a>
-package has extensive additions to better support DWARF version 4.
-See for example the definition of the new type
-<a href="/pkg/debug/dwarf/#Class"><code>Class</code></a>.
-</li>
-
-<li>
-The <a href="/pkg/debug/dwarf/"><code>debug/dwarf</code></a> package
-also now supports decoding of DWARF line tables.
-</li>
-
-<li>
-The <a href="/pkg/debug/elf/"><code>debug/elf</code></a>
-package now has support for the 64-bit PowerPC architecture.
-</li>
-
-<li>
-The <a href="/pkg/encoding/base64/"><code>encoding/base64</code></a> package
-now supports unpadded encodings through two new encoding variables,
-<a href="/pkg/encoding/base64/#RawStdEncoding"><code>RawStdEncoding</code></a> and
-<a href="/pkg/encoding/base64/#RawURLEncoding"><code>RawURLEncoding</code></a>.
-</li>
-
-<li>
-The <a href="/pkg/encoding/json/"><code>encoding/json</code></a> package
-now returns an <a href="/pkg/encoding/json/#UnmarshalTypeError"><code>UnmarshalTypeError</code></a>
-if a JSON value is not appropriate for the target variable or component
-to which it is being unmarshaled.
-</li>
-
-<li>
-The <code>encoding/json</code>'s
-<a href="/pkg/encoding/json/#Decoder"><code>Decoder</code></a>
-type has a new method that provides a streaming interface for decoding
-a JSON document:
-<a href="/pkg/encoding/json/#Decoder.Token"><code>Token</code></a>.
-It also interoperates with the existing functionality of <code>Decode</code>,
-which will continue a decode operation already started with <code>Decoder.Token</code>.
-</li>
-
-<li>
-The <a href="/pkg/flag/"><code>flag</code></a> package
-has a new function, <a href="/pkg/flag/#UnquoteUsage"><code>UnquoteUsage</code></a>,
-to assist in the creation of usage messages using the new convention
-described above.
-</li>
-
-<li>
-In the <a href="/pkg/fmt/"><code>fmt</code></a> package,
-a value of type <a href="/pkg/reflect/#Value"><code>Value</code></a> now
-prints what it holds, rather than use the <code>reflect.Value</code>'s <code>Stringer</code>
-method, which produces things like <code><int Value></code>.
-</li>
-
-<li>
-The <a href="/pkg/ast/#EmptyStmt"><code>EmptyStmt</code></a> type
-in the <a href="/pkg/go/ast/"><code>go/ast</code></a> package now
-has a boolean <code>Implicit</code> field that records whether the
-semicolon was implicitly added or was present in the source.
-</li>
-
-<li>
-For forward compatibility the <a href="/pkg/go/build/"><code>go/build</code></a> package
-reserves <code>GOARCH</code> values for  a number of architectures that Go might support one day.
-This is not a promise that it will.
-Also, the <a href="/pkg/go/build/#Package"><code>Package</code></a> struct
-now has a <code>PkgTargetRoot</code> field that stores the
-architecture-dependent root directory in which to install, if known.
-</li>
-
-<li>
-The (newly migrated) <a href="/pkg/go/types/"><code>go/types</code></a>
-package allows one to control the prefix attached to package-level names using
-the new <a href="/pkg/go/types/#Qualifier"><code>Qualifier</code></a>
-function type as an argument to several functions. This is an API change for
-the package, but since it is new to the core, it is not breaking the Go 1 compatibility
-rules since code that uses the package must explicitly ask for it at its new location.
-To update, run
-<a href="https://golang.org/cmd/go/#hdr-Run_go_tool_fix_on_packages"><code>go fix</code></a> on your package.
-</li>
-
-<li>
-In the <a href="/pkg/image/"><code>image</code></a> package,
-the <a href="/pkg/image/#Rectangle"><code>Rectangle</code></a> type
-now implements the <a href="/pkg/image/#Image"><code>Image</code></a> interface,
-so a <code>Rectangle</code> can serve as a mask when drawing.
-</li>
-
-<li>
-Also in the <a href="/pkg/image/"><code>image</code></a> package,
-to assist in the handling of some JPEG images,
-there is now support for 4:1:1 and 4:1:0 YCbCr subsampling and basic
-CMYK support, represented by the new <code>image.CMYK</code> struct.
-</li>
-
-<li>
-The <a href="/pkg/image/color/"><code>image/color</code></a> package
-adds basic CMYK support, through the new
-<a href="/pkg/image/color/#CMYK"><code>CMYK</code></a> struct,
-the <a href="/pkg/image/color/#CMYKModel"><code>CMYKModel</code></a> color model, and the
-<a href="/pkg/image/color/#CMYKToRGB"><code>CMYKToRGB</code></a> function, as
-needed by some JPEG images.
-</li>
-
-<li>
-Also in the <a href="/pkg/image/color/"><code>image/color</code></a> package,
-the conversion of a <a href="/pkg/image/color/#YCbCr"><code>YCbCr</code></a>
-value to <code>RGBA</code> has become more precise.
-Previously, the low 8 bits were just an echo of the high 8 bits;
-now they contain more accurate information.
-Because of the echo property of the old code, the operation
-<code>uint8(r)</code> to extract an 8-bit red value worked, but is incorrect.
-In Go 1.5, that operation may yield a different value.
-The correct code is, and always was, to select the high 8 bits:
-<code>uint8(r>>8)</code>.
-Incidentally, the <code>image/draw</code> package
-provides better support for such conversions; see
-<a href="https://blog.golang.org/go-imagedraw-package">this blog post</a>
-for more information.
-</li>
-
-<li>
-Finally, as of Go 1.5 the closest match check in
-<a href="/pkg/image/color/#Palette.Index"><code>Index</code></a>
-now honors the alpha channel.
-</li>
-
-<li>
-The <a href="/pkg/image/gif/"><code>image/gif</code></a> package
-includes a couple of generalizations.
-A multiple-frame GIF file can now have an overall bounds different
-from all the contained single frames' bounds.
-Also, the <a href="/pkg/image/gif/#GIF"><code>GIF</code></a> struct
-now has a <code>Disposal</code> field
-that specifies the disposal method for each frame.
-</li>
-
-<li>
-The <a href="/pkg/io/"><code>io</code></a> package
-adds a <a href="/pkg/io/#CopyBuffer"><code>CopyBuffer</code></a> function
-that is like <a href="/pkg/io/#Copy"><code>Copy</code></a> but
-uses a caller-provided buffer, permitting control of allocation and buffer size.
-</li>
-
-<li>
-The <a href="/pkg/log/"><code>log</code></a> package
-has a new <a href="/pkg/log/#LUTC"><code>LUTC</code></a> flag
-that causes time stamps to be printed in the UTC time zone.
-It also adds a <a href="/pkg/log/#Logger.SetOutput"><code>SetOutput</code></a> method
-for user-created loggers.
-</li>
-
-<li>
-In Go 1.4, <a href="/pkg/math/#Max"><code>Max</code></a> was not detecting all possible NaN bit patterns.
-This is fixed in Go 1.5, so programs that use <code>math.Max</code> on data including NaNs may behave differently,
-but now correctly according to the IEEE754 definition of NaNs.
-</li>
-
-<li>
-The <a href="/pkg/math/big/"><code>math/big</code></a> package
-adds a new <a href="/pkg/math/big/#Jacobi"><code>Jacobi</code></a>
-function for integers and a new
-<a href="/pkg/math/big/#Int.ModSqrt"><code>ModSqrt</code></a>
-method for the <a href="/pkg/math/big/#Int"><code>Int</code></a> type.
-</li>
-
-<li>
-The mime package
-adds a new <a href="/pkg/mime/#WordDecoder"><code>WordDecoder</code></a> type
-to decode MIME headers containing RFC 204-encoded words.
-It also provides <a href="/pkg/mime/#BEncoding"><code>BEncoding</code></a> and
-<a href="/pkg/mime/#QEncoding"><code>QEncoding</code></a>
-as implementations of the encoding schemes of RFC 2045 and RFC 2047.
-</li>
-
-<li>
-The <a href="/pkg/mime/"><code>mime</code></a> package also adds an
-<a href="/pkg/mime/#ExtensionsByType"><code>ExtensionsByType</code></a>
-function that returns the MIME extensions know to be associated with a given MIME type.
-</li>
-
-<li>
-There is a new <a href="/pkg/mime/quotedprintable/"><code>mime/quotedprintable</code></a>
-package that implements the quoted-printable encoding defined by RFC 2045.
-</li>
-
-<li>
-The <a href="/pkg/net/"><code>net</code></a> package will now
-<a href="/pkg/net/#Dial"><code>Dial</code></a> hostnames by trying each
-IP address in order until one succeeds.
-The <code><a href="/pkg/net/#Dialer">Dialer</a>.DualStack</code>
-mode now implements Happy Eyeballs
-(<a href="https://tools.ietf.org/html/rfc6555">RFC 6555</a>) by giving the
-first address family a 300ms head start; this value can be overridden by
-the new <code>Dialer.FallbackDelay</code>.
-</li>
-
-<li>
-A number of inconsistencies in the types returned by errors in the
-<a href="/pkg/net/"><code>net</code></a> package have been
-tidied up.
-Most now return an
-<a href="/pkg/net/#OpError"><code>OpError</code></a> value
-with more information than before.
-Also, the <a href="/pkg/net/#OpError"><code>OpError</code></a>
-type now includes a <code>Source</code> field that holds the local
-network address.
-</li>
-
-<li>
-The <a href="/pkg/net/http/"><code>net/http</code></a> package now
-has support for setting trailers from a server <a href="/pkg/net/http/#Handler"><code>Handler</code></a>.
-For details, see the documentation for
-<a href="/pkg/net/http/#ResponseWriter"><code>ResponseWriter</code></a>.
-</li>
-
-<li>
-There is a new method to cancel a <a href="/pkg/net/http/"><code>net/http</code></a>
-<code>Request</code> by setting the new
-<a href="/pkg/net/http/#Request"><code>Request.Cancel</code></a>
-field.
-It is supported by <code>http.Transport</code>.
-The <code>Cancel</code> field's type is compatible with the
-<a href="https://godoc.org/golang.org/x/net/context"><code>context.Context.Done</code></a>
-return value.
-</li>
-
-<li>
-Also in the <a href="/pkg/net/http/"><code>net/http</code></a> package,
-there is code to ignore the zero <a href="/pkg/time/#Time"><code>Time</code></a> value
-in the <a href="/pkg/net/#ServeContent"><code>ServeContent</code></a> function.
-As of Go 1.5, it now also ignores a time value equal to the Unix epoch.
-</li>
-
-<li>
-The <a href="/pkg/net/http/fcgi/"><code>net/http/fcgi</code></a> package
-exports two new errors,
-<a href="/pkg/net/http/fcgi/#ErrConnClosed"><code>ErrConnClosed</code></a> and
-<a href="/pkg/net/http/fcgi/#ErrRequestAborted"><code>ErrRequestAborted</code></a>,
-to report the corresponding error conditions.
-</li>
-
-<li>
-The <a href="/pkg/net/http/cgi/"><code>net/http/cgi</code></a> package
-had a bug that mishandled the values of the environment variables
-<code>REMOTE_ADDR</code> and <code>REMOTE_HOST</code>.
-This has been fixed.
-Also, starting with Go 1.5 the package sets the <code>REMOTE_PORT</code>
-variable.
-</li>
-
-<li>
-The <a href="/pkg/net/mail/"><code>net/mail</code></a> package
-adds an <a href="/pkg/net/mail/#AddressParser"><code>AddressParser</code></a>
-type that can parse mail addresses.
-</li>
-
-<li>
-The <a href="/pkg/net/smtp/"><code>net/smtp</code></a> package
-now has a <a href="/pkg/net/smtp/#Client.TLSConnectionState"><code>TLSConnectionState</code></a>
-accessor to the <a href="/pkg/net/smtp/#Client"><code>Client</code></a>
-type that returns the client's TLS state.
-</li>
-
-<li>
-The <a href="/pkg/os/"><code>os</code></a> package
-has a new <a href="/pkg/os/#LookupEnv"><code>LookupEnv</code></a> function
-that is similar to <a href="/pkg/os/#Getenv"><code>Getenv</code></a>
-but can distinguish between an empty environment variable and a missing one.
-</li>
-
-<li>
-The <a href="/pkg/os/signal/"><code>os/signal</code></a> package
-adds new <a href="/pkg/os/signal/#Ignore"><code>Ignore</code></a> and
-<a href="/pkg/os/signal/#Reset"><code>Reset</code></a> functions.
-</li>
-
-<li>
-The <a href="/pkg/runtime/"><code>runtime</code></a>,
-<a href="/pkg/runtime/trace/"><code>runtime/trace</code></a>,
-and <a href="/pkg/net/http/pprof/"><code>net/http/pprof</code></a> packages
-each have new functions to support the tracing facilities described above:
-<a href="/pkg/runtime/#ReadTrace"><code>ReadTrace</code></a>,
-<a href="/pkg/runtime/#StartTrace"><code>StartTrace</code></a>,
-<a href="/pkg/runtime/#StopTrace"><code>StopTrace</code></a>,
-<a href="/pkg/runtime/trace/#Start"><code>Start</code></a>,
-<a href="/pkg/runtime/trace/#Stop"><code>Stop</code></a>, and
-<a href="/pkg/net/http/pprof/#Trace"><code>Trace</code></a>.
-See the respective documentation for details.
-</li>
-
-<li>
-The <a href="/pkg/runtime/pprof/"><code>runtime/pprof</code></a> package
-by default now includes overall memory statistics in all memory profiles.
-</li>
-
-<li>
-The <a href="/pkg/strings/"><code>strings</code></a> package
-has a new <a href="/pkg/strings/#Compare"><code>Compare</code></a> function.
-This is present to provide symmetry with the <a href="/pkg/bytes/"><code>bytes</code></a> package
-but is otherwise unnecessary as strings support comparison natively.
-</li>
-
-<li>
-The <a href="/pkg/sync/#WaitGroup"><code>WaitGroup</code></a> implementation in
-package <a href="/pkg/sync/"><code>sync</code></a>
-now diagnoses code that races a call to <a href="/pkg/sync/#WaitGroup.Add"><code>Add</code></a>
-against a return from <a href="/pkg/sync/#WaitGroup.Wait"><code>Wait</code></a>.
-If it detects this condition, the implementation panics.
-</li>
-
-<li>
-In the <a href="/pkg/syscall/"><code>syscall</code></a> package,
-the Linux <code>SysProcAttr</code> struct now has a
-<code>GidMappingsEnableSetgroups</code> field, made necessary
-by security changes in Linux 3.19.
-On all Unix systems, the struct also has new <code>Foreground</code> and <code>Pgid</code> fields
-to provide more control when exec'ing.
-On Darwin, there is now a <code>Syscall9</code> function
-to support calls with too many arguments.
-</li>
-
-<li>
-The <a href="/pkg/testing/quick/"><code>testing/quick</code></a> will now
-generate <code>nil</code> values for pointer types,
-making it possible to use with recursive data structures.
-Also, the package now supports generation of array types.
-</li>
-
-<li>
-In the <a href="/pkg/text/template/"><code>text/template</code></a> and
-<a href="/pkg/html/template/"><code>html/template</code></a> packages,
-integer constants too large to be represented as a Go integer now trigger a
-parse error. Before, they were silently converted to floating point, losing
-precision.
-</li>
-
-<li>
-Also in the <a href="/pkg/text/template/"><code>text/template</code></a> and
-<a href="/pkg/html/template/"><code>html/template</code></a> packages,
-a new <a href="/pkg/text/template/#Template.Option"><code>Option</code></a> method
-allows customization of the behavior of the template during execution.
-The sole implemented option allows control over how a missing key is
-handled when indexing a map.
-The default, which can now be overridden, is as before: to continue with an invalid value.
-</li>
-
-<li>
-The <a href="/pkg/time/"><code>time</code></a> package's
-<code>Time</code> type has a new method
-<a href="/pkg/time/#Time.AppendFormat"><code>AppendFormat</code></a>,
-which can be used to avoid allocation when printing a time value.
-</li>
-
-<li>
-The <a href="/pkg/unicode/"><code>unicode</code></a> package and associated
-support throughout the system has been upgraded from version 7.0 to
-<a href="http://www.unicode.org/versions/Unicode8.0.0/">Unicode 8.0</a>.
-</li>
-
-</ul>
diff --git a/doc/progs/run.go b/doc/progs/run.go
deleted file mode 100755
index 8479a66..0000000
--- a/doc/progs/run.go
+++ /dev/null
@@ -1,230 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// run runs the docs tests found in this directory.
-package main
-
-import (
-	"bytes"
-	"flag"
-	"fmt"
-	"io/ioutil"
-	"os"
-	"os/exec"
-	"path/filepath"
-	"regexp"
-	"runtime"
-	"strings"
-)
-
-const usage = `go run run.go [tests]
-
-run.go runs the docs tests in this directory.
-If no tests are provided, it runs all tests.
-Tests may be specified without their .go suffix.
-`
-
-func main() {
-	flag.Usage = func() {
-		fmt.Fprintf(os.Stderr, usage)
-		flag.PrintDefaults()
-		os.Exit(2)
-	}
-
-	flag.Parse()
-	if flag.NArg() == 0 {
-		// run all tests
-		fixcgo()
-	} else {
-		// run specified tests
-		onlyTest(flag.Args()...)
-	}
-
-	tmpdir, err := ioutil.TempDir("", "go-progs")
-	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
-		os.Exit(1)
-	}
-
-	// ratec limits the number of tests running concurrently.
-	// None of the tests are intensive, so don't bother
-	// trying to manually adjust for slow builders.
-	ratec := make(chan bool, runtime.NumCPU())
-	errc := make(chan error, len(tests))
-
-	for _, tt := range tests {
-		tt := tt
-		ratec <- true
-		go func() {
-			errc <- test(tmpdir, tt.file, tt.want)
-			<-ratec
-		}()
-	}
-
-	var rc int
-	for range tests {
-		if err := <-errc; err != nil {
-			fmt.Fprintln(os.Stderr, err)
-			rc = 1
-		}
-	}
-	os.Remove(tmpdir)
-	os.Exit(rc)
-}
-
-// test builds the test in the given file.
-// If want is non-empty, test also runs the test
-// and checks that the output matches the regexp want.
-func test(tmpdir, file, want string) error {
-	// Build the program.
-	prog := filepath.Join(tmpdir, file)
-	cmd := exec.Command("go", "build", "-o", prog, file+".go")
-	out, err := cmd.CombinedOutput()
-	if err != nil {
-		return fmt.Errorf("go build %s.go failed: %v\nOutput:\n%s", file, err, out)
-	}
-	defer os.Remove(prog)
-
-	// Only run the test if we have output to check.
-	if want == "" {
-		return nil
-	}
-
-	cmd = exec.Command(prog)
-	out, err = cmd.CombinedOutput()
-	if err != nil {
-		return fmt.Errorf("%s failed: %v\nOutput:\n%s", file, err, out)
-	}
-
-	// Canonicalize output.
-	out = bytes.TrimRight(out, "\n")
-	out = bytes.Replace(out, []byte{'\n'}, []byte{' '}, -1)
-
-	// Check the result.
-	match, err := regexp.Match(want, out)
-	if err != nil {
-		return fmt.Errorf("failed to parse regexp %q: %v", want, err)
-	}
-	if !match {
-		return fmt.Errorf("%s.go:\n%q\ndoes not match %s", file, out, want)
-	}
-
-	return nil
-}
-
-type testcase struct {
-	file string
-	want string
-}
-
-var tests = []testcase{
-	// defer_panic_recover
-	{"defer", `^0 3210 2$`},
-	{"defer2", `^Calling g. Printing in g 0 Printing in g 1 Printing in g 2 Printing in g 3 Panicking! Defer in g 3 Defer in g 2 Defer in g 1 Defer in g 0 Recovered in f 4 Returned normally from f.$`},
-
-	// effective_go
-	{"eff_bytesize", `^1.00YB 9.09TB$`},
-	{"eff_qr", ""},
-	{"eff_sequence", `^\[-1 2 6 16 44\]$`},
-	{"eff_unused2", ""},
-
-	// error_handling
-	{"error", ""},
-	{"error2", ""},
-	{"error3", ""},
-	{"error4", ""},
-
-	// law_of_reflection
-	{"interface", ""},
-	{"interface2", `^type: float64$`},
-
-	// c_go_cgo
-	{"cgo1", ""},
-	{"cgo2", ""},
-	{"cgo3", ""},
-	{"cgo4", ""},
-
-	// timeout
-	{"timeout1", ""},
-	{"timeout2", ""},
-
-	// gobs
-	{"gobs1", ""},
-	{"gobs2", ""},
-
-	// json
-	{"json1", `^$`},
-	{"json2", `the reciprocal of i is`},
-	{"json3", `Age is int 6`},
-	{"json4", `^$`},
-	{"json5", ""},
-
-	// image_package
-	{"image_package1", `^X is 2 Y is 1$`},
-	{"image_package2", `^3 4 false$`},
-	{"image_package3", `^3 4 true$`},
-	{"image_package4", `^image.Point{X:2, Y:1}$`},
-	{"image_package5", `^{255 0 0 255}$`},
-	{"image_package6", `^8 4 true$`},
-
-	// other
-	{"go1", `^Christmas is a holiday: true .*go1.go already exists$`},
-	{"slices", ""},
-}
-
-func onlyTest(files ...string) {
-	var new []testcase
-NextFile:
-	for _, file := range files {
-		file = strings.TrimSuffix(file, ".go")
-		for _, tt := range tests {
-			if tt.file == file {
-				new = append(new, tt)
-				continue NextFile
-			}
-		}
-		fmt.Fprintf(os.Stderr, "test %s.go not found\n", file)
-		os.Exit(1)
-	}
-	tests = new
-}
-
-func skipTest(file string) {
-	for i, tt := range tests {
-		if tt.file == file {
-			copy(tests[i:], tests[i+1:])
-			tests = tests[:len(tests)-1]
-			return
-		}
-	}
-	panic("delete(" + file + "): not found")
-}
-
-func fixcgo() {
-	if os.Getenv("CGO_ENABLED") != "1" {
-		skipTest("cgo1")
-		skipTest("cgo2")
-		skipTest("cgo3")
-		skipTest("cgo4")
-		return
-	}
-
-	switch runtime.GOOS {
-	case "freebsd":
-		// cgo1 and cgo2 don't run on freebsd, srandom has a different signature
-		skipTest("cgo1")
-		skipTest("cgo2")
-	case "netbsd":
-		// cgo1 and cgo2 don't run on netbsd, srandom has a different signature
-		skipTest("cgo1")
-		skipTest("cgo2")
-		// cgo3 and cgo4 don't run on netbsd, since cgo cannot handle stdout correctly, see issue #10715.
-		skipTest("cgo3")
-		skipTest("cgo4")
-	case "openbsd", "solaris":
-		// cgo3 and cgo4 don't run on openbsd and solaris, since cgo cannot handle stdout correctly, see issue #10715.
-		skipTest("cgo3")
-		skipTest("cgo4")
-	}
-}
diff --git a/misc/android/cleaner.go b/misc/android/cleaner.go
deleted file mode 100644
index dafb162..0000000
--- a/misc/android/cleaner.go
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Cleaner removes anything from /data/local/tmp/goroot not on a builtin list.
-// Used by androidtest.bash.
-package main
-
-import (
-	"log"
-	"os"
-	"path/filepath"
-	"strings"
-)
-
-func main() {
-	const goroot = "/data/local/tmp/goroot"
-	expect := make(map[string]bool)
-	for _, f := range strings.Split(files, "\n") {
-		expect[filepath.Join(goroot, f)] = true
-	}
-
-	err := filepath.Walk(goroot, func(path string, info os.FileInfo, err error) error {
-		if expect[path] {
-			return nil
-		}
-		log.Printf("removing %s", path)
-		if err := os.RemoveAll(path); err != nil {
-			return err
-		}
-		if info.IsDir() {
-			return filepath.SkipDir
-		}
-		return nil
-	})
-	if err != nil {
-		log.Fatal(err)
-	}
-}
diff --git a/misc/cgo/test/backdoor.go b/misc/cgo/test/backdoor.go
deleted file mode 100644
index 6fb33d6..0000000
--- a/misc/cgo/test/backdoor.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package cgotest
-
-import _ "unsafe"
-
-//go:linkname lockedOSThread runtime.lockedOSThread
-//extern runtime_lockedOSThread
-func lockedOSThread() bool
diff --git a/misc/cgo/test/issue10303.go b/misc/cgo/test/issue10303.go
deleted file mode 100644
index ea623d7..0000000
--- a/misc/cgo/test/issue10303.go
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Issue 10303. Pointers passed to C were not marked as escaping (bug in cgo).
-
-package cgotest
-
-/*
-typedef int *intptr;
-
-void setintstar(int *x) {
-	*x = 1;
-}
-
-void setintptr(intptr x) {
-	*x = 1;
-}
-
-void setvoidptr(void *x) {
-	*(int*)x = 1;
-}
-
-typedef struct Struct Struct;
-struct Struct {
-	int *P;
-};
-
-void setstruct(Struct s) {
-	*s.P = 1;
-}
-
-*/
-import "C"
-
-import (
-	"testing"
-	"unsafe"
-)
-
-func test10303(t *testing.T, n int) {
-	// Run at a few different stack depths just to avoid an unlucky pass
-	// due to variables ending up on different pages.
-	if n > 0 {
-		test10303(t, n-1)
-	}
-	if t.Failed() {
-		return
-	}
-	var x, y, z, v, si C.int
-	var s C.Struct
-	C.setintstar(&x)
-	C.setintptr(&y)
-	C.setvoidptr(unsafe.Pointer(&v))
-	s.P = &si
-	C.setstruct(s)
-
-	if uintptr(unsafe.Pointer(&x))&^0xfff == uintptr(unsafe.Pointer(&z))&^0xfff {
-		t.Error("C int* argument on stack")
-	}
-	if uintptr(unsafe.Pointer(&y))&^0xfff == uintptr(unsafe.Pointer(&z))&^0xfff {
-		t.Error("C intptr argument on stack")
-	}
-	if uintptr(unsafe.Pointer(&v))&^0xfff == uintptr(unsafe.Pointer(&z))&^0xfff {
-		t.Error("C void* argument on stack")
-	}
-	if uintptr(unsafe.Pointer(&si))&^0xfff == uintptr(unsafe.Pointer(&z))&^0xfff {
-		t.Error("C struct field pointer on stack")
-	}
-}
diff --git a/misc/cgo/test/issue11925.go b/misc/cgo/test/issue11925.go
deleted file mode 100644
index 9e50fb7..0000000
--- a/misc/cgo/test/issue11925.go
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Issue 11925.  Structs with zero-length trailing fields are now
-// padded by the Go compiler.
-
-package cgotest
-
-/*
-struct a11925 {
-	int i;
-	char a[0];
-	char b[0];
-};
-
-struct b11925 {
-	int i;
-	char a[0];
-	char b[];
-};
-*/
-import "C"
-
-import (
-	"testing"
-	"unsafe"
-)
-
-func test11925(t *testing.T) {
-	if C.sizeof_struct_a11925 != unsafe.Sizeof(C.struct_a11925{}) {
-		t.Errorf("size of a changed: C %d, Go %d", C.sizeof_struct_a11925, unsafe.Sizeof(C.struct_a11925{}))
-	}
-	if C.sizeof_struct_b11925 != unsafe.Sizeof(C.struct_b11925{}) {
-		t.Errorf("size of b changed: C %d, Go %d", C.sizeof_struct_b11925, unsafe.Sizeof(C.struct_b11925{}))
-	}
-}
diff --git a/misc/cgo/test/issue8945.go b/misc/cgo/test/issue8945.go
deleted file mode 100644
index 572b815..0000000
--- a/misc/cgo/test/issue8945.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gccgo
-
-package cgotest
-
-//typedef void (*PFunc)();
-//PFunc success_cb;
-import "C"
-
-//export Test
-func Test() {
-	_ = C.success_cb
-}
diff --git a/misc/cgo/test/issue9400/asm_386.s b/misc/cgo/test/issue9400/asm_386.s
deleted file mode 100644
index e37a54f..0000000
--- a/misc/cgo/test/issue9400/asm_386.s
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-TEXT ·RewindAndSetgid(SB),NOSPLIT,$0-0
-	// Rewind stack pointer so anything that happens on the stack
-	// will clobber the test pattern created by the caller
-	ADDL	$(1024 * 8), SP
-
-	// Ask signaller to setgid
-	MOVL	$1, ·Baton(SB)
-
-	// Wait for setgid completion
-loop:
-	PAUSE
-	MOVL	·Baton(SB), AX
-	CMPL	AX, $0
-	JNE	loop
-
-	// Restore stack
-	SUBL	$(1024 * 8), SP
-	RET
diff --git a/misc/cgo/test/issue9400/asm_amd64x.s b/misc/cgo/test/issue9400/asm_amd64x.s
deleted file mode 100644
index f09e95d..0000000
--- a/misc/cgo/test/issue9400/asm_amd64x.s
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64 amd64p32
-// +build !gccgo
-
-#include "textflag.h"
-
-TEXT ·RewindAndSetgid(SB),NOSPLIT,$0-0
-	// Rewind stack pointer so anything that happens on the stack
-	// will clobber the test pattern created by the caller
-	ADDQ	$(1024 * 8), SP
-
-	// Ask signaller to setgid
-	MOVL	$1, ·Baton(SB)
-
-	// Wait for setgid completion
-loop:
-	PAUSE
-	MOVL	·Baton(SB), AX
-	CMPL	AX, $0
-	JNE	loop
-
-	// Restore stack
-	SUBQ	$(1024 * 8), SP
-	RET
diff --git a/misc/cgo/test/issue9400/asm_arm.s b/misc/cgo/test/issue9400/asm_arm.s
deleted file mode 100644
index 5c5983d..0000000
--- a/misc/cgo/test/issue9400/asm_arm.s
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-TEXT cas<>(SB),NOSPLIT,$0
-	MOVW	$0xffff0fc0, R15 // R15 is PC
-
-TEXT ·RewindAndSetgid(SB),NOSPLIT,$-4-0
-	// Save link register
-	MOVW	R14, R4
-
-	// Rewind stack pointer so anything that happens on the stack
-	// will clobber the test pattern created by the caller
-	ADD	$(1024 * 8), R13
-
-	// Ask signaller to setgid
-	MOVW	$·Baton(SB), R2
-storeloop:
-	MOVW	0(R2), R0
-	MOVW	$1, R1
-	BL	cas<>(SB)
-	BCC	storeloop
-
-	// Wait for setgid completion
-loop:
-	MOVW	$0, R0
-	MOVW	$0, R1
-	BL	cas<>(SB)
-	BCC	loop
-
-	// Restore stack
-	SUB	$(1024 * 8), R13
-
-	MOVW	R4, R14
-	RET
diff --git a/misc/cgo/test/issue9400/asm_arm64.s b/misc/cgo/test/issue9400/asm_arm64.s
deleted file mode 100644
index cba525f..0000000
--- a/misc/cgo/test/issue9400/asm_arm64.s
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-TEXT ·RewindAndSetgid(SB),NOSPLIT,$-8-0
-	// Save link register
-	MOVD	R30, R9
-
-	// Rewind stack pointer so anything that happens on the stack
-	// will clobber the test pattern created by the caller
-	ADD	$(1024 * 8), RSP
-
-	// Ask signaller to setgid
-	MOVD	$·Baton(SB), R0
-	MOVD	$1, R1
-storeloop:
-	LDAXRW	(R0), R2
-	STLXRW	R1, (R0), R3
-	CBNZ	R3, storeloop
-
-	// Wait for setgid completion
-	MOVW	$0, R1
-	MOVW	$0, R2
-loop:
-	LDAXRW	(R0), R3
-	CMPW	R1, R3
-	BNE	loop
-	STLXRW	R2, (R0), R3
-	CBNZ	R3, loop
-
-	// Restore stack
-	SUB	$(1024 * 8), RSP
-
-	MOVD	R9, R30
-	RET
diff --git a/misc/cgo/test/issue9400/asm_ppc64x.s b/misc/cgo/test/issue9400/asm_ppc64x.s
deleted file mode 100644
index 7dfe37e..0000000
--- a/misc/cgo/test/issue9400/asm_ppc64x.s
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ppc64 ppc64le
-// +build !gccgo
-
-#include "textflag.h"
-
-TEXT ·RewindAndSetgid(SB),NOSPLIT,$-8-0
-	// Rewind stack pointer so anything that happens on the stack
-	// will clobber the test pattern created by the caller
-	ADD	$(1024 * 8), R1
-
-	// Ask signaller to setgid
-	MOVW	$1, R3
-	SYNC
-	MOVW	R3, ·Baton(SB)
-
-	// Wait for setgid completion
-loop:
-	SYNC
-	MOVW	·Baton(SB), R3
-	CMP	R3, $0
-	// Hint that we're in a spin loop
-	OR	R1, R1, R1
-	BNE	loop
-	ISYNC
-
-	// Restore stack
-	SUB	$(1024 * 8), R1
-	RET
diff --git a/misc/cgo/test/issue9400/gccgo.go b/misc/cgo/test/issue9400/gccgo.go
deleted file mode 100644
index 6b9d5fa..0000000
--- a/misc/cgo/test/issue9400/gccgo.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gccgo
-
-package issue9400
-
-import (
-	"runtime"
-	"sync/atomic"
-)
-
-// The test for the gc compiler resets the stack pointer so that the
-// stack gets modified.  We don't have a way to do that for gccgo
-// without writing more assembly code, which we haven't bothered to
-// do.  So this is not much of a test.
-
-func RewindAndSetgid() {
-	atomic.StoreInt32(&Baton, 1)
-	for atomic.LoadInt32(&Baton) != 0 {
-		runtime.Gosched()
-	}
-}
diff --git a/misc/cgo/test/issue9400/stubs.go b/misc/cgo/test/issue9400/stubs.go
deleted file mode 100644
index 1dd8ccd..0000000
--- a/misc/cgo/test/issue9400/stubs.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package issue9400
-
-var Baton int32
-
-func RewindAndSetgid()
diff --git a/misc/cgo/test/issue9400_linux.go b/misc/cgo/test/issue9400_linux.go
deleted file mode 100644
index b3b4b79..0000000
--- a/misc/cgo/test/issue9400_linux.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test that SIGSETXID runs on signal stack, since it's likely to
-// overflow if it runs on the Go stack.
-
-package cgotest
-
-/*
-#include <sys/types.h>
-#include <unistd.h>
-*/
-import "C"
-
-import (
-	"runtime"
-	"sync/atomic"
-	"testing"
-
-	"./issue9400"
-)
-
-func test9400(t *testing.T) {
-	// We synchronize through a shared variable, so we need two procs
-	defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(2))
-
-	// Start signaller
-	atomic.StoreInt32(&issue9400.Baton, 0)
-	go func() {
-		// Wait for RewindAndSetgid
-		for atomic.LoadInt32(&issue9400.Baton) == 0 {
-			runtime.Gosched()
-		}
-		// Broadcast SIGSETXID
-		runtime.LockOSThread()
-		C.setgid(0)
-		// Indicate that signalling is done
-		atomic.StoreInt32(&issue9400.Baton, 0)
-	}()
-
-	// Grow the stack and put down a test pattern
-	const pattern = 0x123456789abcdef
-	var big [1024]uint64 // len must match assmebly
-	for i := range big {
-		big[i] = pattern
-	}
-
-	// Temporarily rewind the stack and trigger SIGSETXID
-	issue9400.RewindAndSetgid()
-
-	// Check test pattern
-	for i := range big {
-		if big[i] != pattern {
-			t.Fatalf("entry %d of test pattern is wrong; %#x != %#x", i, big[i], uint64(pattern))
-		}
-	}
-}
diff --git a/misc/cgo/test/issue9557.go b/misc/cgo/test/issue9557.go
deleted file mode 100644
index b29bacd..0000000
--- a/misc/cgo/test/issue9557.go
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// cgo rewrote C.var to *_Cvar_var, but left
-// C.var.field as _Cvar.var.field.  It now rewrites
-// the latter as (*_Cvar_var).field.
-// See https://golang.org/issue/9557.
-
-package cgotest
-
-// struct issue9557_t {
-//   int a;
-// } test9557bar = { 42 };
-//
-// struct issue9557_t *issue9557foo = &test9557bar;
-import "C"
-import "testing"
-
-func test9557(t *testing.T) {
-	// implicitly dereference a Go variable
-	foo := C.issue9557foo
-	if v := foo.a; v != 42 {
-		t.Fatalf("foo.a expected 42, but got %d", v)
-	}
-
-	// explicitly dereference a C variable
-	if v := (*C.issue9557foo).a; v != 42 {
-		t.Fatalf("(*C.issue9557foo).a expected 42, but is %d", v)
-	}
-
-	// implicitly dereference a C variable
-	if v := C.issue9557foo.a; v != 42 {
-		t.Fatalf("C.issue9557foo.a expected 42, but is %d", v)
-	}
-}
diff --git a/misc/cgo/test/sigprocmask_linux.c b/misc/cgo/test/sigprocmask_linux.c
deleted file mode 100644
index 518c533..0000000
--- a/misc/cgo/test/sigprocmask_linux.c
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include <signal.h>
-#include <stdlib.h>
-#include <pthread.h>
-#include <stdio.h>
-#include <unistd.h>
-
-extern void IntoGoAndBack();
-
-int CheckBlocked() {
-	sigset_t mask;
-	sigprocmask(SIG_BLOCK, NULL, &mask);
-	return sigismember(&mask, SIGIO);
-}
-
-static void* sigthreadfunc(void* unused) {
-	sigset_t mask;
-	sigemptyset(&mask);
-	sigaddset(&mask, SIGIO);
-	sigprocmask(SIG_BLOCK, &mask, NULL);
-	IntoGoAndBack();
-	return NULL;
-}
-
-int RunSigThread() {
-	pthread_t thread;
-	int r;
-
-	r = pthread_create(&thread, NULL, &sigthreadfunc, NULL);
-	if (r != 0)
-		return r;
-	return pthread_join(thread, NULL);
-}
diff --git a/misc/cgo/test/sigprocmask_linux.go b/misc/cgo/test/sigprocmask_linux.go
deleted file mode 100644
index 7d343e9..0000000
--- a/misc/cgo/test/sigprocmask_linux.go
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package cgotest
-
-/*
-#cgo CFLAGS: -pthread
-#cgo LDFLAGS: -pthread
-extern int RunSigThread();
-extern int CheckBlocked();
-*/
-import "C"
-import (
-	"os"
-	"os/signal"
-	"syscall"
-	"testing"
-)
-
-var blocked bool
-
-//export IntoGoAndBack
-func IntoGoAndBack() {
-	// Verify that SIGIO stays blocked on the C thread
-	// even when unblocked for signal.Notify().
-	signal.Notify(make(chan os.Signal), syscall.SIGIO)
-	blocked = C.CheckBlocked() != 0
-}
-
-func testSigProcMask(t *testing.T) {
-	if r := C.RunSigThread(); r != 0 {
-		t.Error("pthread_create/pthread_join failed")
-	}
-	if !blocked {
-		t.Error("Go runtime unblocked SIGIO")
-	}
-}
diff --git a/misc/cgo/testcarchive/main.c b/misc/cgo/testcarchive/main.c
deleted file mode 100644
index cc3170d..0000000
--- a/misc/cgo/testcarchive/main.c
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include <stdint.h>
-#include <stdio.h>
-
-#include "p.h"
-#include "libgo.h"
-
-int main(void) {
-	int32_t res;
-
-	if (!DidInitRun()) {
-		fprintf(stderr, "ERROR: buildmode=c-archive init should run\n");
-		return 2;
-	}
-
-	if (DidMainRun()) {
-		fprintf(stderr, "ERROR: buildmode=c-archive should not run main\n");
-		return 2;
-	}
-
-	res = FromPkg();
-	if (res != 1024) {
-		fprintf(stderr, "ERROR: FromPkg()=%d, want 1024\n", res);
-		return 2;
-	}
-
-	CheckArgs();
-
-	fprintf(stderr, "PASS\n");
-	return 0;
-}
diff --git a/misc/cgo/testcarchive/src/libgo/libgo.go b/misc/cgo/testcarchive/src/libgo/libgo.go
deleted file mode 100644
index 45958a5..0000000
--- a/misc/cgo/testcarchive/src/libgo/libgo.go
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
-	"fmt"
-	"os"
-	"syscall"
-	"time"
-
-	_ "p"
-)
-
-import "C"
-
-var initCh = make(chan int, 1)
-var ranMain bool
-
-func init() {
-	// emulate an exceedingly slow package initialization function
-	time.Sleep(100 * time.Millisecond)
-	initCh <- 42
-}
-
-func main() { ranMain = true }
-
-//export DidInitRun
-func DidInitRun() bool {
-	select {
-	case x := <-initCh:
-		if x != 42 {
-			// Just in case initCh was not correctly made.
-			println("want init value of 42, got: ", x)
-			syscall.Exit(2)
-		}
-		return true
-	default:
-		return false
-	}
-}
-
-//export DidMainRun
-func DidMainRun() bool { return ranMain }
-
-//export CheckArgs
-func CheckArgs() {
-	if len(os.Args) != 3 || os.Args[1] != "arg1" || os.Args[2] != "arg2" {
-		fmt.Printf("CheckArgs: want [_, arg1, arg2], got: %v\n", os.Args)
-		os.Exit(2)
-	}
-}
diff --git a/misc/cgo/testcarchive/src/p/p.go b/misc/cgo/testcarchive/src/p/p.go
deleted file mode 100644
index 82b445c..0000000
--- a/misc/cgo/testcarchive/src/p/p.go
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package p
-
-import "C"
-
-//export FromPkg
-func FromPkg() int32 { return 1024 }
diff --git a/misc/cgo/testcarchive/test.bash b/misc/cgo/testcarchive/test.bash
deleted file mode 100755
index 89b761b..0000000
--- a/misc/cgo/testcarchive/test.bash
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2015 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-set -e
-
-ccargs=
-if [ "$(go env GOOS)" == "darwin" ]; then
-	ccargs="-Wl,-no_pie"
-	# For darwin/arm.
-	# TODO(crawshaw): Can we do better?
-	ccargs="$ccargs -framework CoreFoundation -framework Foundation"
-fi
-ccargs="$ccargs -I pkg/$(go env GOOS)_$(go env GOARCH)"
-
-# TODO(crawshaw): Consider a go env for exec script name.
-bin=./testp
-exec_script=go_$(go env GOOS)_$(go env GOARCH)_exec
-if [ "$(which $exec_script)" != "" ]; then
-	bin="$exec_script ./testp"
-fi
-
-rm -rf libgo.a libgo.h testp pkg
-
-# Installing first will create the header files we want.
-
-GOPATH=$(pwd) go install -buildmode=c-archive libgo
-$(go env CC) $(go env GOGCCFLAGS) $ccargs -o testp main.c pkg/$(go env GOOS)_$(go env GOARCH)/libgo.a
-$bin arg1 arg2
-rm -f libgo.a libgo.h testp
-
-# Test building libgo other than installing it.
-# Header files are now present.
-
-GOPATH=$(pwd) go build -buildmode=c-archive src/libgo/libgo.go
-$(go env CC) $(go env GOGCCFLAGS) $ccargs -o testp main.c libgo.a
-$bin arg1 arg2
-rm -f libgo.a libgo.h testp
-
-GOPATH=$(pwd) go build -buildmode=c-archive -o libgo.a libgo
-$(go env CC) $(go env GOGCCFLAGS) $ccargs -o testp main.c libgo.a
-$bin arg1 arg2
-rm -rf libgo.a libgo.h testp pkg
diff --git a/misc/cgo/testcshared/main0.c b/misc/cgo/testcshared/main0.c
deleted file mode 100644
index 1274b89..0000000
--- a/misc/cgo/testcshared/main0.c
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include <stdint.h>
-#include <stdio.h>
-
-#include "p.h"
-#include "libgo.h"
-
-// Tests libgo.so to export the following functions.
-//   int8_t DidInitRun();
-//   int8_t DidMainRun();
-//   int32_t FromPkg();
-int main(void) {
-  int8_t ran_init = DidInitRun();
-  if (!ran_init) {
-    fprintf(stderr, "ERROR: DidInitRun returned unexpected results: %d\n",
-            ran_init);
-    return 1;
-  }
-  int8_t ran_main = DidMainRun();
-  if (ran_main) {
-    fprintf(stderr, "ERROR: DidMainRun returned unexpected results: %d\n",
-            ran_main);
-    return 1;
-  }
-  int32_t from_pkg = FromPkg();
-  if (from_pkg != 1024) {
-    fprintf(stderr, "ERROR: FromPkg=%d, want %d\n", from_pkg, 1024);
-    return 1;
-  }
-  // test.bash looks for "PASS" to ensure this program has reached the end. 
-  printf("PASS\n");
-  return 0;
-}
diff --git a/misc/cgo/testcshared/main1.c b/misc/cgo/testcshared/main1.c
deleted file mode 100644
index 420dd1e..0000000
--- a/misc/cgo/testcshared/main1.c
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include <stdint.h>
-#include <stdio.h>
-#include <dlfcn.h>
-
-int check_int8(void* handle, const char* fname, int8_t want) {
-  int8_t (*fn)();
-  fn = (int8_t (*)())dlsym(handle, fname);
-  if (!fn) {
-    fprintf(stderr, "ERROR: missing %s: %s\n", fname, dlerror());
-    return 1;
-  }
-  signed char ret = fn();
-  if (ret != want) {
-    fprintf(stderr, "ERROR: %s=%d, want %d\n", fname, ret, want);
-    return 1;
-  }
-  return 0;
-}
-
-int check_int32(void* handle, const char* fname, int32_t want) {
-  int32_t (*fn)();
-  fn = (int32_t (*)())dlsym(handle, fname);
-  if (!fn) {
-    fprintf(stderr, "ERROR: missing %s: %s\n", fname, dlerror());
-    return 1;
-  }
-  int32_t ret = fn();
-  if (ret != want) {
-    fprintf(stderr, "ERROR: %s=%d, want %d\n", fname, ret, want);
-    return 1;
-  }
-  return 0;
-}
-
-// Tests libgo.so to export the following functions.
-//   int8_t DidInitRun() // returns true
-//   int8_t DidMainRun() // returns true
-//   int32_t FromPkg() // returns 1024
-int main(int argc, char** argv) {
-  void* handle = dlopen(argv[1], RTLD_LAZY | RTLD_GLOBAL);
-  if (!handle) {
-    fprintf(stderr, "ERROR: failed to open the shared library: %s\n",
-		    dlerror());
-    return 2;
-  }
-
-  int ret = 0;
-  ret = check_int8(handle, "DidInitRun", 1);
-  if (ret != 0) {
-    return ret;
-  }
-
-  ret = check_int8(handle, "DidMainRun", 0);
-  if (ret != 0) {
-    return ret;
-  }
-
-  ret = check_int32(handle, "FromPkg", 1024);
-  if (ret != 0) {
-   return ret;
-  }
-  // test.bash looks for "PASS" to ensure this program has reached the end. 
-  printf("PASS\n");
-  return 0;
-}
diff --git a/misc/cgo/testcshared/main2.c b/misc/cgo/testcshared/main2.c
deleted file mode 100644
index 4023383..0000000
--- a/misc/cgo/testcshared/main2.c
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <unistd.h>
-
-#define fd (10)
-
-// Tests libgo2.so, which does not export any functions.
-// Read a string from the file descriptor and print it.
-int main(void) {
-  int i;
-  ssize_t n;
-  char buf[20];
-  struct timespec ts;
-
-  // The descriptor will be initialized in a thread, so we have to
-  // give a chance to get opened.
-  for (i = 0; i < 100; i++) {
-    n = read(fd, buf, sizeof buf);
-    if (n >= 0)
-      break;
-    if (errno != EBADF) {
-      fprintf(stderr, "BUG: read: %s\n", strerror(errno));
-      return 2;
-    }
-
-    // An EBADF error means that the shared library has not opened the
-    // descriptor yet.
-    ts.tv_sec = 0;
-    ts.tv_nsec = 1000000;
-    nanosleep(&ts, NULL);
-  }
-
-  if (n < 0) {
-    fprintf(stderr, "BUG: failed to read any data from pipe\n");
-    return 2;
-  }
-
-  if (n == 0) {
-    fprintf(stderr, "BUG: unexpected EOF\n");
-    return 2;
-  }
-
-  if (n == sizeof buf) {
-    n--;
-  }
-  buf[n] = '\0';
-  printf("%s\n", buf);
-  return 0;
-}
diff --git a/misc/cgo/testcshared/main3.c b/misc/cgo/testcshared/main3.c
deleted file mode 100644
index 49cc055..0000000
--- a/misc/cgo/testcshared/main3.c
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include <stdint.h>
-#include <stdio.h>
-#include <dlfcn.h>
-
-// Tests "main.main" is exported on android/arm,
-// which golang.org/x/mobile/app depends on.
-int main(int argc, char** argv) {
-  void* handle = dlopen(argv[1], RTLD_LAZY | RTLD_GLOBAL);
-  if (!handle) {
-    fprintf(stderr, "ERROR: failed to open the shared library: %s\n",
-            dlerror());
-    return 2;
-  }
-
-  uintptr_t main_fn = (uintptr_t)dlsym(handle, "main.main");
-  if (!main_fn) {
-    fprintf(stderr, "ERROR: missing main.main: %s\n", dlerror());
-    return 2;
-  }
-
-  // TODO(hyangah): check that main.main can run.
-
-  printf("PASS\n");
-  return 0;
-}
diff --git a/misc/cgo/testcshared/src/libgo/libgo.go b/misc/cgo/testcshared/src/libgo/libgo.go
deleted file mode 100644
index 8a4bf79..0000000
--- a/misc/cgo/testcshared/src/libgo/libgo.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
-	_ "p"
-	"syscall"
-	"time"
-)
-
-import "C"
-
-var initCh = make(chan int, 1)
-var ranMain bool
-
-func init() {
-	// emulate an exceedingly slow package initialization function
-	time.Sleep(100 * time.Millisecond)
-	initCh <- 42
-}
-
-func main() {
-	ranMain = true
-}
-
-//export DidInitRun
-func DidInitRun() bool {
-	select {
-	case x := <-initCh:
-		if x != 42 {
-			// Just in case initCh was not correctly made.
-			println("want init value of 42, got: ", x)
-			syscall.Exit(2)
-		}
-		return true
-	default:
-		return false
-	}
-}
-
-//export DidMainRun
-func DidMainRun() bool {
-	return ranMain
-}
diff --git a/misc/cgo/testcshared/src/libgo2/libgo2.go b/misc/cgo/testcshared/src/libgo2/libgo2.go
deleted file mode 100644
index 6096860..0000000
--- a/misc/cgo/testcshared/src/libgo2/libgo2.go
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package main
-
-// Test a shared library created by -buildmode=c-shared that does not
-// export anything.
-
-import (
-	"fmt"
-	"os"
-	"syscall"
-)
-
-// To test this we want to communicate between the main program and
-// the shared library without using any exported symbols.  The init
-// function creates a pipe and Dups the read end to a known number
-// that the C code can also use.
-
-const (
-	fd = 10
-)
-
-func init() {
-	var p [2]int
-	if e := syscall.Pipe(p[0:]); e != nil {
-		fmt.Fprintf(os.Stderr, "pipe: %v\n", e)
-		os.Exit(2)
-	}
-
-	if e := syscall.Dup2(p[0], fd); e != nil {
-		fmt.Fprintf(os.Stderr, "dup2: %v\n", e)
-		os.Exit(2)
-	}
-
-	const str = "PASS"
-	if n, e := syscall.Write(p[1], []byte(str)); e != nil || n != len(str) {
-		fmt.Fprintf(os.Stderr, "write: %d %v\n", n, e)
-		os.Exit(2)
-	}
-
-	if e := syscall.Close(p[1]); e != nil {
-		fmt.Fprintf(os.Stderr, "close: %v\n", e)
-		os.Exit(2)
-	}
-}
-
-func main() {
-}
diff --git a/misc/cgo/testcshared/src/p/p.go b/misc/cgo/testcshared/src/p/p.go
deleted file mode 100644
index 82b445c..0000000
--- a/misc/cgo/testcshared/src/p/p.go
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package p
-
-import "C"
-
-//export FromPkg
-func FromPkg() int32 { return 1024 }
diff --git a/misc/cgo/testcshared/test.bash b/misc/cgo/testcshared/test.bash
deleted file mode 100755
index 57221bc..0000000
--- a/misc/cgo/testcshared/test.bash
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2015 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# For testing Android, this script requires adb to push and run compiled
-# binaries on a target device.
-
-set -e
-
-if [ ! -f src/libgo/libgo.go ]; then
-	cwd=$(pwd)
-	echo 'misc/cgo/testcshared/test.bash is running in $cwd' 1>&2
-	exit 1
-fi
-
-goos=$(go env GOOS)
-goarch=$(go env GOARCH)
-
-# Directory where cgo headers and outputs will be installed.
-# The installation directory format varies depending on the platform.
-installdir=pkg/${goos}_${goarch}_testcshared_shared
-if [ "${goos}/${goarch}" == "android/arm" ] || [ "${goos}/${goarch}" == "darwin/amd64" ]; then
-	installdir=pkg/${goos}_${goarch}_testcshared
-fi
-
-# Temporary directory on the android device.
-androidpath=/data/local/tmp/testcshared-$$
-
-function cleanup() {
-	rm -rf libgo.$libext libgo2.$libext libgo.h testp testp2 testp3 pkg
-
-	rm -rf $(go env GOROOT)/${installdir}
-
-	if [ "$goos" == "android" ]; then
-		adb shell rm -rf $androidpath
-	fi
-}
-trap cleanup EXIT
-
-if [ "$goos" == "android" ]; then
-	adb shell mkdir -p "$androidpath"
-fi
-
-function run() {
-	case "$goos" in
-	"android")
-		local args=$@
-		output=$(adb shell "cd ${androidpath}; $@")
-		output=$(echo $output|tr -d '\r')
-		case $output in
-			*PASS) echo "PASS";; 
-			*) echo "$output";;
-		esac
-		;;
-	*)
-		echo $(env $@)
-		;;
-	esac
-}
-
-function binpush() {
-	bin=${1}
-	if [ "$goos" == "android" ]; then
-		adb push "$bin"  "${androidpath}/${bin}" 2>/dev/null
-	fi
-}
-
-rm -rf pkg
-
-suffix="-installsuffix testcshared"
-
-libext="so"
-if [ "$goos" == "darwin" ]; then
-	libext="dylib"
-fi
-
-# Create the header files.
-GOPATH=$(pwd) go install -buildmode=c-shared $suffix libgo
-
-GOPATH=$(pwd) go build -buildmode=c-shared $suffix -o libgo.$libext src/libgo/libgo.go
-binpush libgo.$libext
-
-# test0: exported symbols in shared lib are accessible.
-# TODO(iant): using _shared here shouldn't really be necessary.
-$(go env CC) $(go env GOGCCFLAGS) -I ${installdir} -o testp main0.c libgo.$libext
-binpush testp
-
-output=$(run LD_LIBRARY_PATH=. ./testp)
-if [ "$output" != "PASS" ]; then
-	echo "FAIL test0 got ${output}"
-	exit 1
-fi
-
-# test1: shared library can be dynamically loaded and exported symbols are accessible.
-$(go env CC) $(go env GOGCCFLAGS) -o testp main1.c -ldl
-binpush testp
-output=$(run ./testp ./libgo.$libext)
-if [ "$output" != "PASS" ]; then
-	echo "FAIL test1 got ${output}"
-	exit 1
-fi
-
-# test2: tests libgo2 which does not export any functions.
-GOPATH=$(pwd) go build -buildmode=c-shared $suffix -o libgo2.$libext src/libgo2/libgo2.go
-binpush libgo2.$libext
-linkflags="-Wl,--no-as-needed"
-if [ "$goos" == "darwin" ]; then
-	linkflags=""
-fi
-$(go env CC) $(go env GOGCCFLAGS) -o testp2 main2.c $linkflags libgo2.$libext
-binpush testp2
-output=$(run LD_LIBRARY_PATH=. ./testp2)
-if [ "$output" != "PASS" ]; then
-	echo "FAIL test2 got ${output}"
-	exit 1
-fi
-
-# test3: tests main.main is exported on android.
-if [ "$goos" == "android" ]; then
-	$(go env CC) $(go env GOGCCFLAGS) -o testp3 main3.c -ldl
-	binpush testp3
-	output=$(run ./testp ./libgo.so)
-	if [ "$output" != "PASS" ]; then
-		echo "FAIL test3 got ${output}"
-		exit 1
-	fi
-fi
-echo "ok"
diff --git a/misc/cgo/testshared/shared_test.go b/misc/cgo/testshared/shared_test.go
deleted file mode 100644
index 6ef448c..0000000
--- a/misc/cgo/testshared/shared_test.go
+++ /dev/null
@@ -1,674 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package shared_test
-
-import (
-	"bufio"
-	"bytes"
-	"debug/elf"
-	"encoding/binary"
-	"errors"
-	"flag"
-	"fmt"
-	"go/build"
-	"io"
-	"io/ioutil"
-	"log"
-	"math/rand"
-	"os"
-	"os/exec"
-	"path/filepath"
-	"regexp"
-	"strings"
-	"testing"
-	"time"
-)
-
-var gopathInstallDir, gorootInstallDir, suffix string
-
-// This is the smallest set of packages we can link into a shared
-// library (runtime/cgo is built implicitly).
-var minpkgs = []string{"runtime", "sync/atomic"}
-var soname = "libruntime,sync-atomic.so"
-
-// run runs a command and calls t.Errorf if it fails.
-func run(t *testing.T, msg string, args ...string) {
-	c := exec.Command(args[0], args[1:]...)
-	if output, err := c.CombinedOutput(); err != nil {
-		t.Errorf("executing %s (%s) failed %s:\n%s", strings.Join(args, " "), msg, err, output)
-	}
-}
-
-// goCmd invokes the go tool with the installsuffix set up by TestMain. It calls
-// t.Errorf if the command fails.
-func goCmd(t *testing.T, args ...string) {
-	newargs := []string{args[0], "-installsuffix=" + suffix}
-	if testing.Verbose() {
-		newargs = append(newargs, "-v")
-	}
-	newargs = append(newargs, args[1:]...)
-	c := exec.Command("go", newargs...)
-	var output []byte
-	var err error
-	if testing.Verbose() {
-		fmt.Printf("+ go %s\n", strings.Join(newargs, " "))
-		c.Stdout = os.Stdout
-		c.Stderr = os.Stderr
-		err = c.Run()
-	} else {
-		output, err = c.CombinedOutput()
-	}
-	if err != nil {
-		if t != nil {
-			t.Errorf("executing %s failed %v:\n%s", strings.Join(c.Args, " "), err, output)
-		} else {
-			log.Fatalf("executing %s failed %v:\n%s", strings.Join(c.Args, " "), err, output)
-		}
-	}
-}
-
-// TestMain calls testMain so that the latter can use defer (TestMain exits with os.Exit).
-func testMain(m *testing.M) (int, error) {
-	// Because go install -buildmode=shared $standard_library_package always
-	// installs into $GOROOT, here are some gymnastics to come up with a unique
-	// installsuffix to use in this test that we can clean up afterwards.
-	myContext := build.Default
-	runtimeP, err := myContext.Import("runtime", ".", build.ImportComment)
-	if err != nil {
-		return 0, fmt.Errorf("import failed: %v", err)
-	}
-	for i := 0; i < 10000; i++ {
-		try := fmt.Sprintf("%s_%d_dynlink", runtimeP.PkgTargetRoot, rand.Int63())
-		err = os.Mkdir(try, 0700)
-		if os.IsExist(err) {
-			continue
-		}
-		if err == nil {
-			gorootInstallDir = try
-		}
-		break
-	}
-	if err != nil {
-		return 0, fmt.Errorf("can't create temporary directory: %v", err)
-	}
-	if gorootInstallDir == "" {
-		return 0, errors.New("could not create temporary directory after 10000 tries")
-	}
-	defer os.RemoveAll(gorootInstallDir)
-
-	// Some tests need to edit the source in GOPATH, so copy this directory to a
-	// temporary directory and chdir to that.
-	scratchDir, err := ioutil.TempDir("", "testshared")
-	if err != nil {
-		return 0, fmt.Errorf("TempDir failed: %v", err)
-	}
-	defer os.RemoveAll(scratchDir)
-	err = filepath.Walk(".", func(path string, info os.FileInfo, err error) error {
-		scratchPath := filepath.Join(scratchDir, path)
-		if info.IsDir() {
-			if path == "." {
-				return nil
-			}
-			return os.Mkdir(scratchPath, info.Mode())
-		} else {
-			fromBytes, err := ioutil.ReadFile(path)
-			if err != nil {
-				return err
-			}
-			return ioutil.WriteFile(scratchPath, fromBytes, info.Mode())
-		}
-	})
-	if err != nil {
-		return 0, fmt.Errorf("walk failed: %v", err)
-	}
-	os.Setenv("GOPATH", scratchDir)
-	myContext.GOPATH = scratchDir
-	os.Chdir(scratchDir)
-
-	// All tests depend on runtime being built into a shared library. Because
-	// that takes a few seconds, do it here and have all tests use the version
-	// built here.
-	suffix = strings.Split(filepath.Base(gorootInstallDir), "_")[2]
-	goCmd(nil, append([]string{"install", "-buildmode=shared"}, minpkgs...)...)
-
-	myContext.InstallSuffix = suffix + "_dynlink"
-	depP, err := myContext.Import("dep", ".", build.ImportComment)
-	if err != nil {
-		return 0, fmt.Errorf("import failed: %v", err)
-	}
-	gopathInstallDir = depP.PkgTargetRoot
-	return m.Run(), nil
-}
-
-func TestMain(m *testing.M) {
-	// Some of the tests install binaries into a custom GOPATH.
-	// That won't work if GOBIN is set.
-	os.Unsetenv("GOBIN")
-
-	flag.Parse()
-	exitCode, err := testMain(m)
-	if err != nil {
-		log.Fatal(err)
-	}
-	os.Exit(exitCode)
-}
-
-// The shared library was built at the expected location.
-func TestSOBuilt(t *testing.T) {
-	_, err := os.Stat(filepath.Join(gorootInstallDir, soname))
-	if err != nil {
-		t.Error(err)
-	}
-}
-
-// The install command should have created a "shlibname" file for the
-// listed packages (and runtime/cgo) indicating the name of the shared
-// library containing it.
-func TestShlibnameFiles(t *testing.T) {
-	pkgs := append([]string{}, minpkgs...)
-	pkgs = append(pkgs, "runtime/cgo")
-	for _, pkg := range pkgs {
-		shlibnamefile := filepath.Join(gorootInstallDir, pkg+".shlibname")
-		contentsb, err := ioutil.ReadFile(shlibnamefile)
-		if err != nil {
-			t.Errorf("error reading shlibnamefile for %s: %v", pkg, err)
-			continue
-		}
-		contents := strings.TrimSpace(string(contentsb))
-		if contents != soname {
-			t.Errorf("shlibnamefile for %s has wrong contents: %q", pkg, contents)
-		}
-	}
-}
-
-// Is a given offset into the file contained in a loaded segment?
-func isOffsetLoaded(f *elf.File, offset uint64) bool {
-	for _, prog := range f.Progs {
-		if prog.Type == elf.PT_LOAD {
-			if prog.Off <= offset && offset < prog.Off+prog.Filesz {
-				return true
-			}
-		}
-	}
-	return false
-}
-
-func rnd(v int32, r int32) int32 {
-	if r <= 0 {
-		return v
-	}
-	v += r - 1
-	c := v % r
-	if c < 0 {
-		c += r
-	}
-	v -= c
-	return v
-}
-
-func readwithpad(r io.Reader, sz int32) ([]byte, error) {
-	data := make([]byte, rnd(sz, 4))
-	_, err := io.ReadFull(r, data)
-	if err != nil {
-		return nil, err
-	}
-	data = data[:sz]
-	return data, nil
-}
-
-type note struct {
-	name    string
-	tag     int32
-	desc    string
-	section *elf.Section
-}
-
-// Read all notes from f. As ELF section names are not supposed to be special, one
-// looks for a particular note by scanning all SHT_NOTE sections looking for a note
-// with a particular "name" and "tag".
-func readNotes(f *elf.File) ([]*note, error) {
-	var notes []*note
-	for _, sect := range f.Sections {
-		if sect.Type != elf.SHT_NOTE {
-			continue
-		}
-		r := sect.Open()
-		for {
-			var namesize, descsize, tag int32
-			err := binary.Read(r, f.ByteOrder, &namesize)
-			if err != nil {
-				if err == io.EOF {
-					break
-				}
-				return nil, fmt.Errorf("read namesize failed:", err)
-			}
-			err = binary.Read(r, f.ByteOrder, &descsize)
-			if err != nil {
-				return nil, fmt.Errorf("read descsize failed:", err)
-			}
-			err = binary.Read(r, f.ByteOrder, &tag)
-			if err != nil {
-				return nil, fmt.Errorf("read type failed:", err)
-			}
-			name, err := readwithpad(r, namesize)
-			if err != nil {
-				return nil, fmt.Errorf("read name failed:", err)
-			}
-			desc, err := readwithpad(r, descsize)
-			if err != nil {
-				return nil, fmt.Errorf("read desc failed:", err)
-			}
-			notes = append(notes, &note{name: string(name), tag: tag, desc: string(desc), section: sect})
-		}
-	}
-	return notes, nil
-}
-
-func dynStrings(path string, flag elf.DynTag) []string {
-	f, err := elf.Open(path)
-	defer f.Close()
-	if err != nil {
-		log.Fatal("elf.Open failed: ", err)
-	}
-	dynstrings, err := f.DynString(flag)
-	if err != nil {
-		log.Fatal("dynstring failed: ", err)
-	}
-	return dynstrings
-}
-
-func AssertIsLinkedToRegexp(t *testing.T, path string, re *regexp.Regexp) {
-	for _, dynstring := range dynStrings(path, elf.DT_NEEDED) {
-		if re.MatchString(dynstring) {
-			return
-		}
-	}
-	t.Errorf("%s is not linked to anything matching %v", path, re)
-}
-
-func AssertIsLinkedTo(t *testing.T, path, lib string) {
-	AssertIsLinkedToRegexp(t, path, regexp.MustCompile(regexp.QuoteMeta(lib)))
-}
-
-func AssertHasRPath(t *testing.T, path, dir string) {
-	for _, tag := range []elf.DynTag{elf.DT_RPATH, elf.DT_RUNPATH} {
-		for _, dynstring := range dynStrings(path, tag) {
-			for _, rpath := range strings.Split(dynstring, ":") {
-				if filepath.Clean(rpath) == filepath.Clean(dir) {
-					return
-				}
-			}
-		}
-	}
-	t.Errorf("%s does not have rpath %s", path, dir)
-}
-
-// Build a trivial program that links against the shared runtime and check it runs.
-func TestTrivialExecutable(t *testing.T) {
-	goCmd(t, "install", "-linkshared", "trivial")
-	run(t, "trivial executable", "./bin/trivial")
-	AssertIsLinkedTo(t, "./bin/trivial", soname)
-	AssertHasRPath(t, "./bin/trivial", gorootInstallDir)
-}
-
-// Build an executable that uses cgo linked against the shared runtime and check it
-// runs.
-func TestCgoExecutable(t *testing.T) {
-	goCmd(t, "install", "-linkshared", "execgo")
-	run(t, "cgo executable", "./bin/execgo")
-}
-
-// Build a GOPATH package into a shared library that links against the goroot runtime
-// and an executable that links against both.
-func TestGopathShlib(t *testing.T) {
-	goCmd(t, "install", "-buildmode=shared", "-linkshared", "dep")
-	AssertIsLinkedTo(t, filepath.Join(gopathInstallDir, "libdep.so"), soname)
-	goCmd(t, "install", "-linkshared", "exe")
-	AssertIsLinkedTo(t, "./bin/exe", soname)
-	AssertIsLinkedTo(t, "./bin/exe", "libdep.so")
-	AssertHasRPath(t, "./bin/exe", gorootInstallDir)
-	AssertHasRPath(t, "./bin/exe", gopathInstallDir)
-	// And check it runs.
-	run(t, "executable linked to GOPATH library", "./bin/exe")
-}
-
-// The shared library contains a note listing the packages it contains in a section
-// that is not mapped into memory.
-func testPkgListNote(t *testing.T, f *elf.File, note *note) {
-	if note.section.Flags != 0 {
-		t.Errorf("package list section has flags %v", note.section.Flags)
-	}
-	if isOffsetLoaded(f, note.section.Offset) {
-		t.Errorf("package list section contained in PT_LOAD segment")
-	}
-	if note.desc != "dep\n" {
-		t.Errorf("incorrect package list %q", note.desc)
-	}
-}
-
-// The shared library contains a note containing the ABI hash that is mapped into
-// memory and there is a local symbol called go.link.abihashbytes that points 16
-// bytes into it.
-func testABIHashNote(t *testing.T, f *elf.File, note *note) {
-	if note.section.Flags != elf.SHF_ALLOC {
-		t.Errorf("abi hash section has flags %v", note.section.Flags)
-	}
-	if !isOffsetLoaded(f, note.section.Offset) {
-		t.Errorf("abihash section not contained in PT_LOAD segment")
-	}
-	var hashbytes elf.Symbol
-	symbols, err := f.Symbols()
-	if err != nil {
-		t.Errorf("error reading symbols %v", err)
-		return
-	}
-	for _, sym := range symbols {
-		if sym.Name == "go.link.abihashbytes" {
-			hashbytes = sym
-		}
-	}
-	if hashbytes.Name == "" {
-		t.Errorf("no symbol called go.link.abihashbytes")
-		return
-	}
-	if elf.ST_BIND(hashbytes.Info) != elf.STB_LOCAL {
-		t.Errorf("%s has incorrect binding %v", hashbytes.Name, elf.ST_BIND(hashbytes.Info))
-	}
-	if f.Sections[hashbytes.Section] != note.section {
-		t.Errorf("%s has incorrect section %v", hashbytes.Name, f.Sections[hashbytes.Section].Name)
-	}
-	if hashbytes.Value-note.section.Addr != 16 {
-		t.Errorf("%s has incorrect offset into section %d", hashbytes.Name, hashbytes.Value-note.section.Addr)
-	}
-}
-
-// A Go shared library contains a note indicating which other Go shared libraries it
-// was linked against in an unmapped section.
-func testDepsNote(t *testing.T, f *elf.File, note *note) {
-	if note.section.Flags != 0 {
-		t.Errorf("package list section has flags %v", note.section.Flags)
-	}
-	if isOffsetLoaded(f, note.section.Offset) {
-		t.Errorf("package list section contained in PT_LOAD segment")
-	}
-	// libdep.so just links against the lib containing the runtime.
-	if note.desc != soname {
-		t.Errorf("incorrect dependency list %q", note.desc)
-	}
-}
-
-// The shared library contains notes with defined contents; see above.
-func TestNotes(t *testing.T) {
-	goCmd(t, "install", "-buildmode=shared", "-linkshared", "dep")
-	f, err := elf.Open(filepath.Join(gopathInstallDir, "libdep.so"))
-	if err != nil {
-		t.Fatal(err)
-	}
-	defer f.Close()
-	notes, err := readNotes(f)
-	if err != nil {
-		t.Fatal(err)
-	}
-	pkgListNoteFound := false
-	abiHashNoteFound := false
-	depsNoteFound := false
-	for _, note := range notes {
-		if note.name != "Go\x00\x00" {
-			continue
-		}
-		switch note.tag {
-		case 1: // ELF_NOTE_GOPKGLIST_TAG
-			if pkgListNoteFound {
-				t.Error("multiple package list notes")
-			}
-			testPkgListNote(t, f, note)
-			pkgListNoteFound = true
-		case 2: // ELF_NOTE_GOABIHASH_TAG
-			if abiHashNoteFound {
-				t.Error("multiple abi hash notes")
-			}
-			testABIHashNote(t, f, note)
-			abiHashNoteFound = true
-		case 3: // ELF_NOTE_GODEPS_TAG
-			if depsNoteFound {
-				t.Error("multiple abi hash notes")
-			}
-			testDepsNote(t, f, note)
-			depsNoteFound = true
-		}
-	}
-	if !pkgListNoteFound {
-		t.Error("package list note not found")
-	}
-	if !abiHashNoteFound {
-		t.Error("abi hash note not found")
-	}
-	if !depsNoteFound {
-		t.Error("deps note not found")
-	}
-}
-
-// Build a GOPATH package (dep) into a shared library that links against the goroot
-// runtime, another package (dep2) that links against the first, and and an
-// executable that links against dep2.
-func TestTwoGopathShlibs(t *testing.T) {
-	goCmd(t, "install", "-buildmode=shared", "-linkshared", "dep")
-	goCmd(t, "install", "-buildmode=shared", "-linkshared", "dep2")
-	goCmd(t, "install", "-linkshared", "exe2")
-	run(t, "executable linked to GOPATH library", "./bin/exe2")
-}
-
-// Build a GOPATH package into a shared library with gccgo and an executable that
-// links against it.
-func TestGoPathShlibGccgo(t *testing.T) {
-	gccgoName := os.Getenv("GCCGO")
-	if gccgoName == "" {
-		gccgoName = "gccgo"
-	}
-	_, err := exec.LookPath(gccgoName)
-	if err != nil {
-		t.Skip("gccgo not found")
-	}
-
-	libgoRE := regexp.MustCompile("libgo.so.[0-9]+")
-
-	gccgoContext := build.Default
-	gccgoContext.InstallSuffix = suffix + "_fPIC"
-	gccgoContext.Compiler = "gccgo"
-	gccgoContext.GOPATH = os.Getenv("GOPATH")
-	depP, err := gccgoContext.Import("dep", ".", build.ImportComment)
-	if err != nil {
-		t.Fatalf("import failed: %v", err)
-	}
-	gccgoInstallDir := filepath.Join(depP.PkgTargetRoot, "shlibs")
-	goCmd(t, "install", "-compiler=gccgo", "-buildmode=shared", "-linkshared", "dep")
-	AssertIsLinkedToRegexp(t, filepath.Join(gccgoInstallDir, "libdep.so"), libgoRE)
-	goCmd(t, "install", "-compiler=gccgo", "-linkshared", "exe")
-	AssertIsLinkedToRegexp(t, "./bin/exe", libgoRE)
-	AssertIsLinkedTo(t, "./bin/exe", "libdep.so")
-	AssertHasRPath(t, "./bin/exe", gccgoInstallDir)
-	// And check it runs.
-	run(t, "gccgo-built", "./bin/exe")
-}
-
-// The gccgo version of TestTwoGopathShlibs: build a GOPATH package into a shared
-// library with gccgo, another GOPATH package that depends on the first and an
-// executable that links the second library.
-func TestTwoGopathShlibsGccgo(t *testing.T) {
-	gccgoName := os.Getenv("GCCGO")
-	if gccgoName == "" {
-		gccgoName = "gccgo"
-	}
-	_, err := exec.LookPath(gccgoName)
-	if err != nil {
-		t.Skip("gccgo not found")
-	}
-
-	libgoRE := regexp.MustCompile("libgo.so.[0-9]+")
-
-	gccgoContext := build.Default
-	gccgoContext.InstallSuffix = suffix + "_fPIC"
-	gccgoContext.Compiler = "gccgo"
-	gccgoContext.GOPATH = os.Getenv("GOPATH")
-	depP, err := gccgoContext.Import("dep", ".", build.ImportComment)
-	if err != nil {
-		t.Fatalf("import failed: %v", err)
-	}
-	gccgoInstallDir := filepath.Join(depP.PkgTargetRoot, "shlibs")
-	goCmd(t, "install", "-compiler=gccgo", "-buildmode=shared", "-linkshared", "dep")
-	goCmd(t, "install", "-compiler=gccgo", "-buildmode=shared", "-linkshared", "dep2")
-	goCmd(t, "install", "-compiler=gccgo", "-linkshared", "exe2")
-
-	AssertIsLinkedToRegexp(t, filepath.Join(gccgoInstallDir, "libdep.so"), libgoRE)
-	AssertIsLinkedToRegexp(t, filepath.Join(gccgoInstallDir, "libdep2.so"), libgoRE)
-	AssertIsLinkedTo(t, filepath.Join(gccgoInstallDir, "libdep2.so"), "libdep.so")
-	AssertIsLinkedToRegexp(t, "./bin/exe2", libgoRE)
-	AssertIsLinkedTo(t, "./bin/exe2", "libdep2")
-	AssertIsLinkedTo(t, "./bin/exe2", "libdep.so")
-
-	// And check it runs.
-	run(t, "gccgo-built", "./bin/exe2")
-}
-
-// Testing rebuilding of shared libraries when they are stale is a bit more
-// complicated that it seems like it should be. First, we make everything "old": but
-// only a few seconds old, or it might be older than gc (or the runtime source) and
-// everything will get rebuilt. Then define a timestamp slightly newer than this
-// time, which is what we set the mtime to of a file to cause it to be seen as new,
-// and finally another slightly even newer one that we can compare files against to
-// see if they have been rebuilt.
-var oldTime = time.Now().Add(-9 * time.Second)
-var nearlyNew = time.Now().Add(-6 * time.Second)
-var stampTime = time.Now().Add(-3 * time.Second)
-
-// resetFileStamps makes "everything" (bin, src, pkg from GOPATH and the
-// test-specific parts of GOROOT) appear old.
-func resetFileStamps() {
-	chtime := func(path string, info os.FileInfo, err error) error {
-		return os.Chtimes(path, oldTime, oldTime)
-	}
-	reset := func(path string) {
-		if err := filepath.Walk(path, chtime); err != nil {
-			log.Fatalf("resetFileStamps failed: %v", err)
-		}
-
-	}
-	reset("bin")
-	reset("pkg")
-	reset("src")
-	reset(gorootInstallDir)
-}
-
-// touch makes path newer than the "old" time stamp used by resetFileStamps.
-func touch(path string) {
-	if err := os.Chtimes(path, nearlyNew, nearlyNew); err != nil {
-		log.Fatalf("os.Chtimes failed: %v", err)
-	}
-}
-
-// isNew returns if the path is newer than the time stamp used by touch.
-func isNew(path string) bool {
-	fi, err := os.Stat(path)
-	if err != nil {
-		log.Fatalf("os.Stat failed: %v", err)
-	}
-	return fi.ModTime().After(stampTime)
-}
-
-// Fail unless path has been rebuilt (i.e. is newer than the time stamp used by
-// isNew)
-func AssertRebuilt(t *testing.T, msg, path string) {
-	if !isNew(path) {
-		t.Errorf("%s was not rebuilt (%s)", msg, path)
-	}
-}
-
-// Fail if path has been rebuilt (i.e. is newer than the time stamp used by isNew)
-func AssertNotRebuilt(t *testing.T, msg, path string) {
-	if isNew(path) {
-		t.Errorf("%s was rebuilt (%s)", msg, path)
-	}
-}
-
-func TestRebuilding(t *testing.T) {
-	goCmd(t, "install", "-buildmode=shared", "-linkshared", "dep")
-	goCmd(t, "install", "-linkshared", "exe")
-
-	// If the source is newer than both the .a file and the .so, both are rebuilt.
-	resetFileStamps()
-	touch("src/dep/dep.go")
-	goCmd(t, "install", "-linkshared", "exe")
-	AssertRebuilt(t, "new source", filepath.Join(gopathInstallDir, "dep.a"))
-	AssertRebuilt(t, "new source", filepath.Join(gopathInstallDir, "libdep.so"))
-
-	// If the .a file is newer than the .so, the .so is rebuilt (but not the .a)
-	resetFileStamps()
-	touch(filepath.Join(gopathInstallDir, "dep.a"))
-	goCmd(t, "install", "-linkshared", "exe")
-	AssertNotRebuilt(t, "new .a file", filepath.Join(gopathInstallDir, "dep.a"))
-	AssertRebuilt(t, "new .a file", filepath.Join(gopathInstallDir, "libdep.so"))
-}
-
-func appendFile(path, content string) {
-	f, err := os.OpenFile(path, os.O_WRONLY|os.O_APPEND, 0660)
-	if err != nil {
-		log.Fatalf("os.OpenFile failed: %v", err)
-	}
-	defer func() {
-		err := f.Close()
-		if err != nil {
-			log.Fatalf("f.Close failed: %v", err)
-		}
-	}()
-	_, err = f.WriteString(content)
-	if err != nil {
-		log.Fatalf("f.WriteString failed: %v", err)
-	}
-}
-
-func TestABIChecking(t *testing.T) {
-	goCmd(t, "install", "-buildmode=shared", "-linkshared", "dep")
-	goCmd(t, "install", "-linkshared", "exe")
-
-	// If we make an ABI-breaking change to dep and rebuild libp.so but not exe,
-	// exe will abort with a complaint on startup.
-	// This assumes adding an exported function breaks ABI, which is not true in
-	// some senses but suffices for the narrow definition of ABI compatiblity the
-	// toolchain uses today.
-	resetFileStamps()
-	appendFile("src/dep/dep.go", "func ABIBreak() {}\n")
-	goCmd(t, "install", "-buildmode=shared", "-linkshared", "dep")
-	c := exec.Command("./bin/exe")
-	output, err := c.CombinedOutput()
-	if err == nil {
-		t.Fatal("executing exe did not fail after ABI break")
-	}
-	scanner := bufio.NewScanner(bytes.NewReader(output))
-	foundMsg := false
-	const wantLine = "abi mismatch detected between the executable and libdep.so"
-	for scanner.Scan() {
-		if scanner.Text() == wantLine {
-			foundMsg = true
-			break
-		}
-	}
-	if err = scanner.Err(); err != nil {
-		t.Errorf("scanner encountered error: %v", err)
-	}
-	if !foundMsg {
-		t.Fatalf("exe failed, but without line %q; got output:\n%s", wantLine, output)
-	}
-
-	// Rebuilding exe makes it work again.
-	goCmd(t, "install", "-linkshared", "exe")
-	run(t, "rebuilt exe", "./bin/exe")
-
-	// If we make a change which does not break ABI (such as adding an unexported
-	// function) and rebuild libdep.so, exe still works.
-	resetFileStamps()
-	appendFile("src/dep/dep.go", "func noABIBreak() {}\n")
-	goCmd(t, "install", "-buildmode=shared", "-linkshared", "dep")
-	run(t, "after non-ABI breaking change", "./bin/exe")
-}
diff --git a/misc/cgo/testshared/src/dep/asm.s b/misc/cgo/testshared/src/dep/asm.s
deleted file mode 100644
index 8069ebb..0000000
--- a/misc/cgo/testshared/src/dep/asm.s
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//+build !gccgo
-
-#include "textflag.h"
-
-TEXT ·ImplementedInAsm(SB),NOSPLIT,$0-0
-       RET
diff --git a/misc/cgo/testshared/src/dep/dep.go b/misc/cgo/testshared/src/dep/dep.go
deleted file mode 100644
index d3bed3f..0000000
--- a/misc/cgo/testshared/src/dep/dep.go
+++ /dev/null
@@ -1,13 +0,0 @@
-package dep
-
-var V int = 1
-
-var HasMask []string = []string{"hi"}
-
-type HasProg struct {
-	array [1024]*byte
-}
-
-func F() int {
-	return V
-}
diff --git a/misc/cgo/testshared/src/dep/gccgo.go b/misc/cgo/testshared/src/dep/gccgo.go
deleted file mode 100644
index 552ec30..0000000
--- a/misc/cgo/testshared/src/dep/gccgo.go
+++ /dev/null
@@ -1,5 +0,0 @@
-//+build gccgo
-
-package dep
-
-func ImplementedInAsm() {}
diff --git a/misc/cgo/testshared/src/dep/stubs.go b/misc/cgo/testshared/src/dep/stubs.go
deleted file mode 100644
index 036296a..0000000
--- a/misc/cgo/testshared/src/dep/stubs.go
+++ /dev/null
@@ -1,5 +0,0 @@
-//+build !gccgo
-
-package dep
-
-func ImplementedInAsm()
diff --git a/misc/cgo/testshared/src/dep2/dep2.go b/misc/cgo/testshared/src/dep2/dep2.go
deleted file mode 100644
index bac1086..0000000
--- a/misc/cgo/testshared/src/dep2/dep2.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package dep2
-
-import "dep"
-
-var W int = 1
-
-var hasProg dep.HasProg
-
-func G() int {
-	return dep.F() + 1
-}
diff --git a/misc/cgo/testshared/src/exe/exe.go b/misc/cgo/testshared/src/exe/exe.go
deleted file mode 100644
index f644776..0000000
--- a/misc/cgo/testshared/src/exe/exe.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package main
-
-import (
-	"dep"
-	"runtime"
-)
-
-func main() {
-	defer dep.ImplementedInAsm()
-	runtime.GC()
-	dep.V = dep.F() + 1
-}
diff --git a/misc/cgo/testshared/src/exe2/exe2.go b/misc/cgo/testshared/src/exe2/exe2.go
deleted file mode 100644
index acdb4dd..0000000
--- a/misc/cgo/testshared/src/exe2/exe2.go
+++ /dev/null
@@ -1,7 +0,0 @@
-package main
-
-import "dep2"
-
-func main() {
-	dep2.W = dep2.G() + 1
-}
diff --git a/misc/cgo/testshared/src/execgo/exe.go b/misc/cgo/testshared/src/execgo/exe.go
deleted file mode 100644
index 0427be8..0000000
--- a/misc/cgo/testshared/src/execgo/exe.go
+++ /dev/null
@@ -1,8 +0,0 @@
-package main
-
-/*
- */
-import "C"
-
-func main() {
-}
diff --git a/misc/cgo/testshared/src/trivial/trivial.go b/misc/cgo/testshared/src/trivial/trivial.go
deleted file mode 100644
index da29a2c..0000000
--- a/misc/cgo/testshared/src/trivial/trivial.go
+++ /dev/null
@@ -1,4 +0,0 @@
-package main
-
-func main() {
-}
diff --git a/misc/cgo/testsigfwd/main.go b/misc/cgo/testsigfwd/main.go
deleted file mode 100644
index 6641c9d..0000000
--- a/misc/cgo/testsigfwd/main.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import "fmt"
-
-/*
-#include <signal.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-int *p;
-static void sigsegv() {
-	*p = 1;
-	fprintf(stderr, "ERROR: C SIGSEGV not thrown on caught?.\n");
-	exit(2);
-}
-
-static void sighandler(int signum) {
-	if (signum == SIGSEGV) {
-		exit(0);  // success
-	}
-}
-
-static void __attribute__ ((constructor)) sigsetup(void) {
-	struct sigaction act;
-	act.sa_handler = &sighandler;
-	sigaction(SIGSEGV, &act, 0);
-}
-*/
-import "C"
-
-var p *byte
-
-func f() (ret bool) {
-	defer func() {
-		if recover() == nil {
-			fmt.Errorf("ERROR: couldn't raise SIGSEGV in Go.")
-			C.exit(2)
-		}
-		ret = true
-	}()
-	*p = 1
-	return false
-}
-
-func main() {
-	// Test that the signal originating in Go is handled (and recovered) by Go.
-	if !f() {
-		fmt.Errorf("couldn't recover from SIGSEGV in Go.")
-		C.exit(2)
-	}
-
-	// Test that the signal originating in C is handled by C.
-	C.sigsegv()
-}
diff --git a/misc/cgo/testsovar/cgoso.go b/misc/cgo/testsovar/cgoso.go
deleted file mode 100644
index 88d44c2..0000000
--- a/misc/cgo/testsovar/cgoso.go
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package cgosotest
-
-// This test verifies that Go can access C variables
-// in shared object file via cgo.
-
-/*
-// intentionally write the same LDFLAGS differently
-// to test correct handling of LDFLAGS.
-#cgo windows CFLAGS: -DIMPORT_DLL
-#cgo linux LDFLAGS: -L. -lcgosotest
-#cgo dragonfly LDFLAGS: -L. -l cgosotest
-#cgo freebsd LDFLAGS: -L. -l cgosotest
-#cgo openbsd LDFLAGS: -L. -l cgosotest
-#cgo solaris LDFLAGS: -L. -lcgosotest
-#cgo netbsd LDFLAGS: -L. libcgosotest.so
-#cgo darwin LDFLAGS: -L. libcgosotest.dylib
-#cgo windows LDFLAGS: -L. libcgosotest.dll
-
-#include "cgoso_c.h"
-
-const char* getVar() {
-	    return exported_var;
-}
-*/
-import "C"
-
-import "fmt"
-
-func Test() {
-	const want = "Hello world"
-	got := C.GoString(C.getVar())
-	if got != want {
-		panic(fmt.Sprintf("testExportedVar: got %q, but want %q", got, want))
-	}
-	got = C.GoString(C.exported_var)
-	if got != want {
-		panic(fmt.Sprintf("testExportedVar: got %q, but want %q", got, want))
-	}
-}
diff --git a/misc/cgo/testsovar/cgoso_c.c b/misc/cgo/testsovar/cgoso_c.c
deleted file mode 100644
index a448c01..0000000
--- a/misc/cgo/testsovar/cgoso_c.c
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-const char *exported_var = "Hello world";
diff --git a/misc/cgo/testsovar/cgoso_c.h b/misc/cgo/testsovar/cgoso_c.h
deleted file mode 100644
index 640db7b..0000000
--- a/misc/cgo/testsovar/cgoso_c.h
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-#ifdef WIN32
-#if defined(EXPORT_DLL)
-#    define VAR __declspec(dllexport)
-#elif defined(IMPORT_DLL)
-#    define VAR __declspec(dllimport)
-#endif
-#else
-#    define VAR extern
-#endif
-
-VAR const char *exported_var;
diff --git a/misc/cgo/testsovar/main.go b/misc/cgo/testsovar/main.go
deleted file mode 100644
index 9c8a1c4..0000000
--- a/misc/cgo/testsovar/main.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-package main
-
-import "."
-
-func main() {
-	cgosotest.Test()
-}
diff --git a/misc/ios/README b/misc/ios/README
deleted file mode 100644
index 417a217..0000000
--- a/misc/ios/README
+++ /dev/null
@@ -1,44 +0,0 @@
-Go on iOS
-=========
-
-To build a cross compiling toolchain for iOS on OS X, first modify clangwrap.sh
-in misc/ios to match your setup. And then run:
-
-	GOARM=7 CGO_ENABLED=1 GOARCH=arm CC_FOR_TARGET=`pwd`/../misc/ios/clangwrap.sh \
-	CXX_FOR_TARGET=`pwd`/../misc/ios/clangwrap.sh ./make.bash
-
-To build a program, use the normal go build command:
-
-	CGO_ENABLED=1 GOARCH=arm go build import/path
-
-To run a program on an iDevice, first make sure you have a valid developer
-certificate and have setup your iDevice properly to run apps signed by your
-developer certificate. Then install https://github.com/phonegap/ios-deploy.
-At a first step, you can try building the famous hello world program to run
-on your test device.
-(The needed files are provided at https://github.com/minux/go-ios-examples.)
-
-	# assume your program binary is helloworld.go, build it into the
-	# example hello.app bundle.
-	CGO_ENABLED=1 GOARCH=arm go build -o hello.app/hello helloworld.go
-	# sign the executable using your developer certificate
-	codesign -f -s "iPhone Developer" --entitlements hello.app/Entitlements.plist hello.app/hello
-	# run the program inside lldb on iDevice, run `ios-deploy` for more
-	# command options
-	ios-deploy --debug --uninstall --bundle hello.app
-	# Depending on your ios-deploy version, you might need to enter "run"
-	# into lldb to run your program, and its output will be shown by lldb.
-
-Notes:
- - A dummy hello.app bundle is provided in this directory to help you get started.
- - Running the program on an iDevice requires code sign and thus external linking,
-   if your program uses cgo, then it will automatically use external linking.
-   However, if your program does not use cgo, please make sure to add
-	import _ "runtime/cgo"
-   so that external linking will be used.
-
-Known issues
-============
- - crypto/x509 won't build, I don't yet know how to get system root on iOS.
- - Because I still want to be able to do native build, CGO_ENABLED=1 is not the
-   default, yet.
diff --git a/misc/ios/clangwrap.sh b/misc/ios/clangwrap.sh
deleted file mode 100755
index 9cad49f..0000000
--- a/misc/ios/clangwrap.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-# This uses the latest available iOS SDK, which is recommended.
-# To select a specific SDK, run 'xcodebuild -showsdks'
-# to see the available SDKs and replace iphoneos with one of them.
-SDK=iphoneos
-SDK_PATH=`xcrun --sdk $SDK --show-sdk-path`
-export IPHONEOS_DEPLOYMENT_TARGET=5.1
-# cmd/cgo doesn't support llvm-gcc-4.2, so we have to use clang.
-CLANG=`xcrun --sdk $SDK --find clang`
-
-if [ "$GOARCH" == "arm" ]; then
-	CLANGARCH="armv7"
-elif [ "$GOARCH" == "arm64" ]; then
-	CLANGARCH="arm64"
-else
-	echo "unknown GOARCH=$GOARCH" >&2
-	exit 1
-fi
-
-exec $CLANG -arch $CLANGARCH -isysroot $SDK_PATH "$@"
diff --git a/misc/ios/detect.go b/misc/ios/detect.go
deleted file mode 100644
index d305458..0000000
--- a/misc/ios/detect.go
+++ /dev/null
@@ -1,135 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-// detect attempts to autodetect the correct
-// values of the environment variables
-// used by go_darwin_arm_exec.
-// detect shells out to ideviceinfo, a third party program that can
-// be obtained by following the instructions at
-// https://github.com/libimobiledevice/libimobiledevice.
-package main
-
-import (
-	"bytes"
-	"fmt"
-	"io/ioutil"
-	"os"
-	"os/exec"
-	"strings"
-)
-
-func main() {
-	devID := detectDevID()
-	fmt.Printf("export GOIOS_DEV_ID=%s\n", devID)
-
-	udid := detectUDID()
-	mp := detectMobileProvisionFile(udid)
-
-	f, err := ioutil.TempFile("", "go_ios_detect_")
-	check(err)
-	fname := f.Name()
-	defer os.Remove(fname)
-
-	out := combinedOutput(parseMobileProvision(mp))
-	_, err = f.Write(out)
-	check(err)
-	check(f.Close())
-
-	appID, err := plistExtract(fname, "ApplicationIdentifierPrefix:0")
-	check(err)
-	fmt.Printf("export GOIOS_APP_ID=%s\n", appID)
-
-	teamID, err := plistExtract(fname, "Entitlements:com.apple.developer.team-identifier")
-	check(err)
-	fmt.Printf("export GOIOS_TEAM_ID=%s\n", teamID)
-}
-
-func detectDevID() string {
-	cmd := exec.Command("security", "find-identity", "-p", "codesigning", "-v")
-	lines := getLines(cmd)
-
-	for _, line := range lines {
-		if !bytes.Contains(line, []byte("iPhone Developer")) {
-			continue
-		}
-		fields := bytes.Fields(line)
-		return string(fields[1])
-	}
-	fail("no code signing identity found")
-	panic("unreachable")
-}
-
-var udidPrefix = []byte("UniqueDeviceID: ")
-
-func detectUDID() []byte {
-	cmd := exec.Command("ideviceinfo")
-	lines := getLines(cmd)
-	for _, line := range lines {
-		if bytes.HasPrefix(line, udidPrefix) {
-			return bytes.TrimPrefix(line, udidPrefix)
-		}
-	}
-	fail("udid not found; is the device connected?")
-	panic("unreachable")
-}
-
-func detectMobileProvisionFile(udid []byte) string {
-	cmd := exec.Command("mdfind", "-name", ".mobileprovision")
-	lines := getLines(cmd)
-
-	for _, line := range lines {
-		if len(line) == 0 {
-			continue
-		}
-		xmlLines := getLines(parseMobileProvision(string(line)))
-		for _, xmlLine := range xmlLines {
-			if bytes.Contains(xmlLine, udid) {
-				return string(line)
-			}
-		}
-	}
-	fail("did not find mobile provision matching device udid %s", udid)
-	panic("ureachable")
-}
-
-func parseMobileProvision(fname string) *exec.Cmd {
-	return exec.Command("security", "cms", "-D", "-i", string(fname))
-}
-
-func plistExtract(fname string, path string) ([]byte, error) {
-	out, err := exec.Command("/usr/libexec/PlistBuddy", "-c", "Print "+path, fname).CombinedOutput()
-	if err != nil {
-		return nil, err
-	}
-	return bytes.TrimSpace(out), nil
-}
-
-func getLines(cmd *exec.Cmd) [][]byte {
-	out := combinedOutput(cmd)
-	return bytes.Split(out, []byte("\n"))
-}
-
-func combinedOutput(cmd *exec.Cmd) []byte {
-	out, err := cmd.CombinedOutput()
-	if err != nil {
-		fmt.Println(strings.Join(cmd.Args, "\n"))
-		fmt.Fprintln(os.Stderr, err)
-		os.Exit(1)
-	}
-	return out
-}
-
-func check(err error) {
-	if err != nil {
-		fail(err.Error())
-	}
-}
-
-func fail(msg string, v ...interface{}) {
-	fmt.Fprintf(os.Stderr, msg, v...)
-	fmt.Fprintln(os.Stderr)
-	os.Exit(1)
-}
diff --git a/misc/ios/go_darwin_arm_exec.go b/misc/ios/go_darwin_arm_exec.go
deleted file mode 100644
index debd2cd..0000000
--- a/misc/ios/go_darwin_arm_exec.go
+++ /dev/null
@@ -1,665 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This program can be used as go_darwin_arm_exec by the Go tool.
-// It executes binaries on an iOS device using the XCode toolchain
-// and the ios-deploy program: https://github.com/phonegap/ios-deploy
-//
-// This script supports an extra flag, -lldb, that pauses execution
-// just before the main program begins and allows the user to control
-// the remote lldb session. This flag is appended to the end of the
-// script's arguments and is not passed through to the underlying
-// binary.
-//
-// This script requires that three environment variables be set:
-// 	GOIOS_DEV_ID: The codesigning developer id or certificate identifier
-// 	GOIOS_APP_ID: The provisioning app id prefix. Must support wildcard app ids.
-// 	GOIOS_TEAM_ID: The team id that owns the app id prefix.
-// $GOROOT/misc/ios contains a script, detect.go, that attempts to autodetect these.
-package main
-
-import (
-	"bytes"
-	"errors"
-	"flag"
-	"fmt"
-	"go/build"
-	"io"
-	"io/ioutil"
-	"log"
-	"os"
-	"os/exec"
-	"path/filepath"
-	"runtime"
-	"strings"
-	"sync"
-	"time"
-)
-
-const debug = false
-
-var errRetry = errors.New("failed to start test harness (retry attempted)")
-
-var tmpdir string
-
-var (
-	devID  string
-	appID  string
-	teamID string
-)
-
-func main() {
-	log.SetFlags(0)
-	log.SetPrefix("go_darwin_arm_exec: ")
-	if debug {
-		log.Println(strings.Join(os.Args, " "))
-	}
-	if len(os.Args) < 2 {
-		log.Fatal("usage: go_darwin_arm_exec a.out")
-	}
-
-	// e.g. B393DDEB490947F5A463FD074299B6C0AXXXXXXX
-	devID = getenv("GOIOS_DEV_ID")
-
-	// e.g. Z8B3JBXXXX.org.golang.sample, Z8B3JBXXXX prefix is available at
-	// https://developer.apple.com/membercenter/index.action#accountSummary as Team ID.
-	appID = getenv("GOIOS_APP_ID")
-
-	// e.g. Z8B3JBXXXX, available at
-	// https://developer.apple.com/membercenter/index.action#accountSummary as Team ID.
-	teamID = getenv("GOIOS_TEAM_ID")
-
-	var err error
-	tmpdir, err = ioutil.TempDir("", "go_darwin_arm_exec_")
-	if err != nil {
-		log.Fatal(err)
-	}
-
-	// Approximately 1 in a 100 binaries fail to start. If it happens,
-	// try again. These failures happen for several reasons beyond
-	// our control, but all of them are safe to retry as they happen
-	// before lldb encounters the initial getwd breakpoint. As we
-	// know the tests haven't started, we are not hiding flaky tests
-	// with this retry.
-	for i := 0; i < 5; i++ {
-		if i > 0 {
-			fmt.Fprintln(os.Stderr, "start timeout, trying again")
-		}
-		err = run(os.Args[1], os.Args[2:])
-		if err == nil || err != errRetry {
-			break
-		}
-	}
-	if !debug {
-		os.RemoveAll(tmpdir)
-	}
-	if err != nil {
-		fmt.Fprintf(os.Stderr, "go_darwin_arm_exec: %v\n", err)
-		os.Exit(1)
-	}
-}
-
-func getenv(envvar string) string {
-	s := os.Getenv(envvar)
-	if s == "" {
-		log.Fatalf("%s not set\nrun $GOROOT/misc/ios/detect.go to attempt to autodetect", s)
-	}
-	return s
-}
-
-func run(bin string, args []string) (err error) {
-	appdir := filepath.Join(tmpdir, "gotest.app")
-	os.RemoveAll(appdir)
-	if err := os.MkdirAll(appdir, 0755); err != nil {
-		return err
-	}
-
-	if err := cp(filepath.Join(appdir, "gotest"), bin); err != nil {
-		return err
-	}
-
-	entitlementsPath := filepath.Join(tmpdir, "Entitlements.plist")
-	if err := ioutil.WriteFile(entitlementsPath, []byte(entitlementsPlist()), 0744); err != nil {
-		return err
-	}
-	if err := ioutil.WriteFile(filepath.Join(appdir, "Info.plist"), []byte(infoPlist), 0744); err != nil {
-		return err
-	}
-	if err := ioutil.WriteFile(filepath.Join(appdir, "ResourceRules.plist"), []byte(resourceRules), 0744); err != nil {
-		return err
-	}
-
-	pkgpath, err := copyLocalData(appdir)
-	if err != nil {
-		return err
-	}
-
-	cmd := exec.Command(
-		"codesign",
-		"-f",
-		"-s", devID,
-		"--entitlements", entitlementsPath,
-		appdir,
-	)
-	if debug {
-		log.Println(strings.Join(cmd.Args, " "))
-	}
-	cmd.Stdout = os.Stdout
-	cmd.Stderr = os.Stderr
-	if err := cmd.Run(); err != nil {
-		return fmt.Errorf("codesign: %v", err)
-	}
-
-	oldwd, err := os.Getwd()
-	if err != nil {
-		return err
-	}
-	if err := os.Chdir(filepath.Join(appdir, "..")); err != nil {
-		return err
-	}
-	defer os.Chdir(oldwd)
-
-	type waitPanic struct {
-		err error
-	}
-	defer func() {
-		if r := recover(); r != nil {
-			if w, ok := r.(waitPanic); ok {
-				err = w.err
-				return
-			}
-			panic(r)
-		}
-	}()
-
-	defer exec.Command("killall", "ios-deploy").Run() // cleanup
-
-	exec.Command("killall", "ios-deploy").Run()
-
-	var opts options
-	opts, args = parseArgs(args)
-
-	// ios-deploy invokes lldb to give us a shell session with the app.
-	cmd = exec.Command(
-		// lldb tries to be clever with terminals.
-		// So we wrap it in script(1) and be clever
-		// right back at it.
-		"script",
-		"-q", "-t", "0",
-		"/dev/null",
-
-		"ios-deploy",
-		"--debug",
-		"-u",
-		"-r",
-		"-n",
-		`--args=`+strings.Join(args, " ")+``,
-		"--bundle", appdir,
-	)
-	if debug {
-		log.Println(strings.Join(cmd.Args, " "))
-	}
-
-	lldbr, lldb, err := os.Pipe()
-	if err != nil {
-		return err
-	}
-	w := new(bufWriter)
-	if opts.lldb {
-		mw := io.MultiWriter(w, os.Stderr)
-		cmd.Stdout = mw
-		cmd.Stderr = mw
-	} else {
-		cmd.Stdout = w
-		cmd.Stderr = w // everything of interest is on stderr
-	}
-	cmd.Stdin = lldbr
-
-	if err := cmd.Start(); err != nil {
-		return fmt.Errorf("ios-deploy failed to start: %v", err)
-	}
-
-	// Manage the -test.timeout here, outside of the test. There is a lot
-	// of moving parts in an iOS test harness (notably lldb) that can
-	// swallow useful stdio or cause its own ruckus.
-	var timedout chan struct{}
-	if opts.timeout > 1*time.Second {
-		timedout = make(chan struct{})
-		time.AfterFunc(opts.timeout-1*time.Second, func() {
-			close(timedout)
-		})
-	}
-
-	exited := make(chan error)
-	go func() {
-		exited <- cmd.Wait()
-	}()
-
-	waitFor := func(stage, str string, timeout time.Duration) error {
-		select {
-		case <-timedout:
-			w.printBuf()
-			if p := cmd.Process; p != nil {
-				p.Kill()
-			}
-			return fmt.Errorf("timeout (stage %s)", stage)
-		case err := <-exited:
-			w.printBuf()
-			return fmt.Errorf("failed (stage %s): %v", stage, err)
-		case i := <-w.find(str, timeout):
-			if i < 0 {
-				log.Printf("timed out on stage %q, retrying", stage)
-				return errRetry
-			}
-			w.clearTo(i + len(str))
-			return nil
-		}
-	}
-	do := func(cmd string) {
-		fmt.Fprintln(lldb, cmd)
-		if err := waitFor(fmt.Sprintf("prompt after %q", cmd), "(lldb)", 0); err != nil {
-			panic(waitPanic{err})
-		}
-	}
-
-	// Wait for installation and connection.
-	if err := waitFor("ios-deploy before run", "(lldb)", 0); err != nil {
-		// Retry if we see a rare and longstanding ios-deploy bug.
-		// https://github.com/phonegap/ios-deploy/issues/11
-		//	Assertion failed: (AMDeviceStartService(device, CFSTR("com.apple.debugserver"), &gdbfd, NULL) == 0)
-		log.Printf("%v, retrying", err)
-		return errRetry
-	}
-
-	// Script LLDB. Oh dear.
-	do(`process handle SIGHUP  --stop false --pass true --notify false`)
-	do(`process handle SIGPIPE --stop false --pass true --notify false`)
-	do(`process handle SIGUSR1 --stop false --pass true --notify false`)
-	do(`process handle SIGSEGV --stop false --pass true --notify false`) // does not work
-	do(`process handle SIGBUS  --stop false --pass true --notify false`) // does not work
-
-	if opts.lldb {
-		_, err := io.Copy(lldb, os.Stdin)
-		if err != io.EOF {
-			return err
-		}
-		return nil
-	}
-
-	do(`breakpoint set -n getwd`) // in runtime/cgo/gcc_darwin_arm.go
-
-	fmt.Fprintln(lldb, `run`)
-	if err := waitFor("br getwd", "stop reason = breakpoint", 20*time.Second); err != nil {
-		// At this point we see several flaky errors from the iOS
-		// build infrastructure. The most common is never reaching
-		// the breakpoint, which we catch with a timeout. Very
-		// occasionally lldb can produce errors like:
-		//
-		//	Breakpoint 1: no locations (pending).
-		//	WARNING:  Unable to resolve breakpoint to any actual locations.
-		//
-		// As no actual test code has been executed by this point,
-		// we treat all errors as recoverable.
-		if err != errRetry {
-			log.Printf("%v, retrying", err)
-			err = errRetry
-		}
-		return err
-	}
-	if err := waitFor("br getwd prompt", "(lldb)", 0); err != nil {
-		return err
-	}
-
-	// Move the current working directory into the faux gopath.
-	if pkgpath != "src" {
-		do(`breakpoint delete 1`)
-		do(`expr char* $mem = (char*)malloc(512)`)
-		do(`expr $mem = (char*)getwd($mem, 512)`)
-		do(`expr $mem = (char*)strcat($mem, "/` + pkgpath + `")`)
-		do(`call (void)chdir($mem)`)
-	}
-
-	// Run the tests.
-	w.trimSuffix("(lldb) ")
-	fmt.Fprintln(lldb, `process continue`)
-
-	// Wait for the test to complete.
-	select {
-	case <-timedout:
-		w.printBuf()
-		if p := cmd.Process; p != nil {
-			p.Kill()
-		}
-		return errors.New("timeout running tests")
-	case <-w.find("\nPASS", 0):
-		passed := w.isPass()
-		w.printBuf()
-		if passed {
-			return nil
-		}
-		return errors.New("test failure")
-	case err := <-exited:
-		// The returned lldb error code is usually non-zero.
-		// We check for test success by scanning for the final
-		// PASS returned by the test harness, assuming the worst
-		// in its absence.
-		if w.isPass() {
-			err = nil
-		} else if err == nil {
-			err = errors.New("test failure")
-		}
-		w.printBuf()
-		return err
-	}
-}
-
-type bufWriter struct {
-	mu     sync.Mutex
-	buf    []byte
-	suffix []byte // remove from each Write
-
-	findTxt   []byte   // search buffer on each Write
-	findCh    chan int // report find position
-	findAfter *time.Timer
-}
-
-func (w *bufWriter) Write(in []byte) (n int, err error) {
-	w.mu.Lock()
-	defer w.mu.Unlock()
-
-	n = len(in)
-	in = bytes.TrimSuffix(in, w.suffix)
-
-	if debug {
-		inTxt := strings.Replace(string(in), "\n", "\\n", -1)
-		findTxt := strings.Replace(string(w.findTxt), "\n", "\\n", -1)
-		fmt.Printf("debug --> %s <-- debug (findTxt='%s')\n", inTxt, findTxt)
-	}
-
-	w.buf = append(w.buf, in...)
-
-	if len(w.findTxt) > 0 {
-		if i := bytes.Index(w.buf, w.findTxt); i >= 0 {
-			w.findCh <- i
-			close(w.findCh)
-			w.findTxt = nil
-			w.findCh = nil
-			if w.findAfter != nil {
-				w.findAfter.Stop()
-				w.findAfter = nil
-			}
-		}
-	}
-	return n, nil
-}
-
-func (w *bufWriter) trimSuffix(p string) {
-	w.mu.Lock()
-	defer w.mu.Unlock()
-	w.suffix = []byte(p)
-}
-
-func (w *bufWriter) printBuf() {
-	w.mu.Lock()
-	defer w.mu.Unlock()
-	fmt.Fprintf(os.Stderr, "%s", w.buf)
-	w.buf = nil
-}
-
-func (w *bufWriter) clearTo(i int) {
-	w.mu.Lock()
-	defer w.mu.Unlock()
-	w.buf = w.buf[i:]
-}
-
-// find returns a channel that will have exactly one byte index sent
-// to it when the text str appears in the buffer. If the text does not
-// appear before timeout, -1 is sent.
-//
-// A timeout of zero means no timeout.
-func (w *bufWriter) find(str string, timeout time.Duration) <-chan int {
-	w.mu.Lock()
-	defer w.mu.Unlock()
-	if len(w.findTxt) > 0 {
-		panic(fmt.Sprintf("find(%s): already trying to find %s", str, w.findTxt))
-	}
-	txt := []byte(str)
-	ch := make(chan int, 1)
-	if i := bytes.Index(w.buf, txt); i >= 0 {
-		ch <- i
-		close(ch)
-	} else {
-		w.findTxt = txt
-		w.findCh = ch
-		if timeout > 0 {
-			w.findAfter = time.AfterFunc(timeout, func() {
-				w.mu.Lock()
-				defer w.mu.Unlock()
-				if w.findCh == ch {
-					w.findTxt = nil
-					w.findCh = nil
-					w.findAfter = nil
-					ch <- -1
-					close(ch)
-				}
-			})
-		}
-	}
-	return ch
-}
-
-func (w *bufWriter) isPass() bool {
-	w.mu.Lock()
-	defer w.mu.Unlock()
-
-	// The final stdio of lldb is non-deterministic, so we
-	// scan the whole buffer.
-	//
-	// Just to make things fun, lldb sometimes translates \n
-	// into \r\n.
-	return bytes.Contains(w.buf, []byte("\nPASS\n")) || bytes.Contains(w.buf, []byte("\nPASS\r"))
-}
-
-type options struct {
-	timeout time.Duration
-	lldb    bool
-}
-
-func parseArgs(binArgs []string) (opts options, remainingArgs []string) {
-	var flagArgs []string
-	for _, arg := range binArgs {
-		if strings.Contains(arg, "-test.timeout") {
-			flagArgs = append(flagArgs, arg)
-		}
-		if strings.Contains(arg, "-lldb") {
-			flagArgs = append(flagArgs, arg)
-			continue
-		}
-		remainingArgs = append(remainingArgs, arg)
-	}
-	f := flag.NewFlagSet("", flag.ContinueOnError)
-	f.DurationVar(&opts.timeout, "test.timeout", 0, "")
-	f.BoolVar(&opts.lldb, "lldb", false, "")
-	f.Parse(flagArgs)
-	return opts, remainingArgs
-
-}
-
-func copyLocalDir(dst, src string) error {
-	if err := os.Mkdir(dst, 0755); err != nil {
-		return err
-	}
-
-	d, err := os.Open(src)
-	if err != nil {
-		return err
-	}
-	defer d.Close()
-	fi, err := d.Readdir(-1)
-	if err != nil {
-		return err
-	}
-
-	for _, f := range fi {
-		if f.IsDir() {
-			if f.Name() == "testdata" {
-				if err := cp(dst, filepath.Join(src, f.Name())); err != nil {
-					return err
-				}
-			}
-			continue
-		}
-		if err := cp(dst, filepath.Join(src, f.Name())); err != nil {
-			return err
-		}
-	}
-	return nil
-}
-
-func cp(dst, src string) error {
-	out, err := exec.Command("cp", "-a", src, dst).CombinedOutput()
-	if err != nil {
-		os.Stderr.Write(out)
-	}
-	return err
-}
-
-func copyLocalData(dstbase string) (pkgpath string, err error) {
-	cwd, err := os.Getwd()
-	if err != nil {
-		return "", err
-	}
-
-	finalPkgpath, underGoRoot, err := subdir()
-	if err != nil {
-		return "", err
-	}
-	cwd = strings.TrimSuffix(cwd, finalPkgpath)
-
-	// Copy all immediate files and testdata directories between
-	// the package being tested and the source root.
-	pkgpath = ""
-	for _, element := range strings.Split(finalPkgpath, string(filepath.Separator)) {
-		if debug {
-			log.Printf("copying %s", pkgpath)
-		}
-		pkgpath = filepath.Join(pkgpath, element)
-		dst := filepath.Join(dstbase, pkgpath)
-		src := filepath.Join(cwd, pkgpath)
-		if err := copyLocalDir(dst, src); err != nil {
-			return "", err
-		}
-	}
-
-	// Copy timezone file.
-	//
-	// Typical apps have the zoneinfo.zip in the root of their app bundle,
-	// read by the time package as the working directory at initialization.
-	// As we move the working directory to the GOROOT pkg directory, we
-	// install the zoneinfo.zip file in the pkgpath.
-	if underGoRoot {
-		err := cp(
-			filepath.Join(dstbase, pkgpath),
-			filepath.Join(cwd, "lib", "time", "zoneinfo.zip"),
-		)
-		if err != nil {
-			return "", err
-		}
-	}
-
-	return finalPkgpath, nil
-}
-
-// subdir determines the package based on the current working directory,
-// and returns the path to the package source relative to $GOROOT (or $GOPATH).
-func subdir() (pkgpath string, underGoRoot bool, err error) {
-	cwd, err := os.Getwd()
-	if err != nil {
-		return "", false, err
-	}
-	if root := runtime.GOROOT(); strings.HasPrefix(cwd, root) {
-		subdir, err := filepath.Rel(root, cwd)
-		if err != nil {
-			return "", false, err
-		}
-		return subdir, true, nil
-	}
-
-	for _, p := range filepath.SplitList(build.Default.GOPATH) {
-		if !strings.HasPrefix(cwd, p) {
-			continue
-		}
-		subdir, err := filepath.Rel(p, cwd)
-		if err == nil {
-			return subdir, false, nil
-		}
-	}
-	return "", false, fmt.Errorf(
-		"working directory %q is not in either GOROOT(%q) or GOPATH(%q)",
-		cwd,
-		runtime.GOROOT(),
-		build.Default.GOPATH,
-	)
-}
-
-const infoPlist = `<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-<key>CFBundleName</key><string>golang.gotest</string>
-<key>CFBundleSupportedPlatforms</key><array><string>iPhoneOS</string></array>
-<key>CFBundleExecutable</key><string>gotest</string>
-<key>CFBundleVersion</key><string>1.0</string>
-<key>CFBundleIdentifier</key><string>golang.gotest</string>
-<key>CFBundleResourceSpecification</key><string>ResourceRules.plist</string>
-<key>LSRequiresIPhoneOS</key><true/>
-<key>CFBundleDisplayName</key><string>gotest</string>
-</dict>
-</plist>
-`
-
-func entitlementsPlist() string {
-	return `<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>keychain-access-groups</key>
-	<array><string>` + appID + `.golang.gotest</string></array>
-	<key>get-task-allow</key>
-	<true/>
-	<key>application-identifier</key>
-	<string>` + appID + `.golang.gotest</string>
-	<key>com.apple.developer.team-identifier</key>
-	<string>` + teamID + `</string>
-</dict>
-</plist>
-`
-}
-
-const resourceRules = `<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>rules</key>
-	<dict>
-		<key>.*</key>
-		<true/>
-		<key>Info.plist</key>
-		<dict>
-			<key>omit</key>
-			<true/>
-			<key>weight</key>
-			<integer>10</integer>
-		</dict>
-		<key>ResourceRules.plist</key>
-		<dict>
-			<key>omit</key>
-			<true/>
-			<key>weight</key>
-			<integer>100</integer>
-		</dict>
-	</dict>
-</dict>
-</plist>
-`
diff --git a/misc/trace/README.md b/misc/trace/README.md
deleted file mode 100644
index 8561c79..0000000
--- a/misc/trace/README.md
+++ /dev/null
@@ -1,38 +0,0 @@
-This directory contains helper file for trace viewer (`go tool trace`).
-
-`trace_viewer_lean.html` was generated by following
-[instructions](https://github.com/google/trace-viewer/wiki/Embedding)
-on revision `280626ef607decf36291e290d5f0322b173e8a7f` using:
-```
-trace-viewer$ ./vulcanize_trace_viewer --config=lean
-trace-viewer$ cp bin/trace_viewer_lean.html $GOROOT/misc/trace/
-```
-
-The license for trace-viewer is as follows:
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//    * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//    * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//    * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/misc/trace/trace_viewer_lean.html b/misc/trace/trace_viewer_lean.html
deleted file mode 100644
index 5d40bc5..0000000
--- a/misc/trace/trace_viewer_lean.html
+++ /dev/null
@@ -1,4043 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-  <head i18n-values="dir:textdirection;">
-  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-    <polymer-element name="tr-ui-b-toolbar-button" noscript="noscript">
-<template>
-<style>
-    :host {
-      background-color: #f8f8f8;
-      border: 1px solid rgba(0, 0, 0, 0.5);
-      color: rgba(0,0,0,0.8);
-      text-align: center;
-    }
-    :host(:hover) {
-      background-color: rgba(255, 255, 255, 1.0);
-      border-color: rgba(0, 0, 0, 0.8);
-      box-shadow: 0 0 .05em rgba(0, 0, 0, 0.4);
-      color: rgba(0, 0, 0, 1);
-    }
-    </style>
-<content></content>
-</template>
-</polymer-element><polymer-element name="tr-ui-a-tab-view" constructor="TracingAnalysisTabView">
-<template>
-<style>
-      :host {
-        display: flex;
-        flex-flow: column nowrap;
-        overflow: hidden;
-        box-sizing: border-box;
-      }
-
-      tab-strip[tabs-hidden] {
-        display: none;
-      }
-
-      tab-strip {
-        background-color: rgb(236, 236, 236);
-        border-bottom: 1px solid #8e8e8e;
-        display: flex;
-        flex: 0 0 auto;
-        flex-flow: row;
-        overflow-x: auto;
-        padding: 0 10px 0 10px;
-        font-size: 12px;
-      }
-
-      tab-button {
-        display: block;
-        flex: 0 0 auto;
-        padding: 4px 15px 1px 15px;
-        margin-top: 2px;
-      }
-
-      tab-button[selected=true] {
-        background-color: white;
-        border: 1px solid rgb(163, 163, 163);
-        border-bottom: none;
-        padding: 3px 14px 1px 14px;
-      }
-
-      tabs-content-container {
-        display: flex;
-        flex: 1 1 auto;
-        overflow: auto;
-        width: 100%;
-      }
-
-      ::content > * {
-        flex: 1 1 auto;
-      }
-
-      ::content > *:not([selected]) {
-        display: none;
-      }
-
-      button-label {
-        display: inline;
-      }
-
-      tab-strip-heading {
-        display: block;
-        flex: 0 0 auto;
-        padding: 4px 15px 1px 15px;
-        margin-top: 2px;
-        margin-before: 20px;
-        margin-after: 10px;
-      }
-      #tsh {
-        display: inline;
-        font-weight: bold;
-      }
-    </style>
-<tab-strip>
-<tab-strip-heading id="tshh">
-<span id="tsh"></span>
-</tab-strip-heading>
-<template repeat="{{tab in tabs_}}">
-<tab-button button-id="{{ tab.id }}" on-click="{{ tabButtonSelectHandler_ }}" selected="{{ selectedTab_.id === tab.id }}">
-<button-label>{{ tab.label ? tab.label : 'No Label'}}</button-label>
-</tab-button>
-</template>
-</tab-strip>
-<tabs-content-container id="content-container">
-<content></content>
-</tabs-content-container>
-</template>
-
-</polymer-element><template id="overlay-template">
-<style>
-    overlay-mask {
-      left: 0;
-      padding: 8px;
-      position: absolute;
-      top: 0;
-      z-index: 1000;
-      font-family: sans-serif;
-      -webkit-justify-content: center;
-      background: rgba(0, 0, 0, 0.8);
-      display: -webkit-flex;
-      height: 100%;
-      left: 0;
-      position: fixed;
-      top: 0;
-      width: 100%;
-    }
-    overlay-mask:focus {
-      outline: none;
-    }
-    overlay-vertical-centering-container {
-      -webkit-justify-content: center;
-      -webkit-flex-direction: column;
-      display: -webkit-flex;
-    }
-    overlay-frame {
-      z-index: 1100;
-      background: rgb(255, 255, 255);
-      border: 1px solid #ccc;
-      margin: 75px;
-      display: -webkit-flex;
-      -webkit-flex-direction: column;
-      min-height: 0;
-    }
-    title-bar {
-      -webkit-align-items: center;
-      -webkit-flex-direction: row;
-      border-bottom: 1px solid #ccc;
-      background-color: #ddd;
-      display: -webkit-flex;
-      padding: 5px;
-      -webkit-flex: 0 0 auto;
-    }
-    title {
-      display: inline;
-      font-weight: bold;
-      -webkit-box-flex: 1;
-      -webkit-flex: 1 1 auto;
-    }
-    close-button {
-      -webkit-align-self: flex-end;
-      border: 1px solid #eee;
-      background-color: #999;
-      font-size: 10pt;
-      font-weight: bold;
-      padding: 2px;
-      text-align: center;
-      width: 16px;
-    }
-    close-button:hover {
-      background-color: #ddd;
-      border-color: black;
-      cursor: pointer;
-    }
-    overlay-content {
-      display: -webkit-flex;
-      -webkit-flex: 1 1 auto;
-      -webkit-flex-direction: column;
-      overflow-y: auto;
-      padding: 10px;
-      min-width: 300px;
-      min-height: 0;
-    }
-    button-bar {
-      -webkit-align-items: baseline;
-      border-top: 1px solid #ccc;
-      display: -webkit-flex;
-      -webkit-flex: 0 0 auto;
-      -webkit-flex-direction: row-reverse;
-      padding: 4px;
-    }
-  </style>
-<overlay-mask>
-<overlay-vertical-centering-container>
-<overlay-frame>
-<title-bar>
-<title></title>
-<close-button>&#x2715</close-button>
-</title-bar>
-<overlay-content>
-<content></content>
-</overlay-content>
-<button-bar></button-bar>
-</overlay-frame>
-</overlay-vertical-centering-container>
-</overlay-mask>
-</template><polymer-element name="tr-ui-a-sub-view">
-
-</polymer-element><polymer-element name="tr-ui-a-analysis-link" is="a">
-<template>
-<style>
-    :host {
-      display: inline;
-      color: -webkit-link;
-      cursor: pointer;
-      text-decoration: underline;
-      /* TODO(nduca): Whitespace is forced to normal here because the
-         analysis_results.css forces everything under it to pre. This is insane.
-         When that horrible evil class dies, then we can rip this white-space
-         restriction out.
-       */
-      white-space: normal;
-      cursor: pointer;
-    }
-    </style>
-<content></content>
-</template>
-
-</polymer-element><style>
-* /deep/ .labeled-checkbox {
-  display: flex;
-  white-space: nowrap;
-}
-</style><polymer-element name="tr-ui-b-table">
-<template>
-<style>
-      :host {
-        display: flex;
-        flex-direction: column;
-      }
-
-      table {
-        font-size: 12px;
-
-        flex: 1 1 auto;
-        align-self: stretch;
-        border-collapse: separate;
-        border-spacing: 0;
-        border-width: 0;
-        -webkit-user-select: initial;
-      }
-
-      tr > td {
-        padding: 2px 4px 2px 4px;
-        vertical-align: text-top;
-      }
-
-      tr:focus,
-      td:focus {
-        outline: 1px dotted rgba(0,0,0,0.1);
-        outline-offset: 0;
-      }
-
-      button.toggle-button {
-        height: 15px;
-        line-height: 60%;
-        vertical-align: middle;
-        width: 100%;
-      }
-
-      button > * {
-        height: 15px;
-        vertical-align: middle;
-      }
-
-      td.button-column {
-        width: 30px;
-      }
-
-      table > thead > tr > td.sensitive:hover {
-        background-color: #fcfcfc;
-      }
-
-      table > thead > tr > td {
-        font-weight: bold;
-        text-align: left;
-
-        background-color: #eee;
-        white-space: nowrap;
-        overflow: hidden;
-        text-overflow: ellipsis;
-
-        border-top: 1px solid #ffffff;
-        border-bottom: 1px solid #aaa;
-      }
-
-      table > tfoot {
-        background-color: #eee;
-        font-weight: bold;
-      }
-
-      /* Selection. */
-      table > tbody.row-selection-mode > tr[selected],
-      table > tbody.cell-selection-mode > tr > td[selected] {
-        background-color: rgb(103, 199, 165);  /* turquoise */
-      }
-      table > tbody.cell-selection-mode.row-highlight-enabled >
-          tr.highlighted-row {
-        background-color: rgb(213, 236, 229);  /* light turquoise */
-      }
-
-      /* Hover. */
-      table > tbody.row-selection-mode >
-          tr:hover:not(.empty-row):not([selected]),
-      table > tbody.cell-selection-mode >
-          tr:not(.empty-row):not(.highlighted-row) >
-          td.supports-selection:hover:not([selected]),
-      table > tfoot > tr:hover {
-        background-color: #e6e6e6;  /* grey */
-      }
-      table > tbody.cell-selection-mode.row-highlight-enabled >
-          tr:hover:not(.empty-row):not(.highlighted-row) {
-        background-color: #f6f6f6;  /* light grey */
-      }
-
-      /* Hover on selected and highlighted elements. */
-      table > tbody.row-selection-mode > tr:hover[selected],
-      table > tbody.cell-selection-mode > tr > td:hover[selected],
-      table > tbody.cell-selection-mode > tr.highlighted-row > td:hover {
-        background-color: rgb(171, 217, 202);  /* semi-light turquoise */
-      }
-
-      table > tbody > tr.empty-row > td {
-        color: #666;
-        font-style: italic;
-        text-align: center;
-      }
-
-      table > tbody.has-footer > tr:last-child > td {
-        border-bottom: 1px solid #aaa;
-      }
-
-      table > tfoot > tr:first-child > td {
-        border-top: 1px solid #ffffff;
-      }
-
-      expand-button {
-        -webkit-user-select: none;
-        display: inline-block;
-        cursor: pointer;
-        font-size: 9px;
-        min-width: 8px;
-        max-width: 8px;
-      }
-
-      .button-expanded {
-        transform: rotate(90deg);
-      }
-    </style>
-<table>
-<thead id="head">
-</thead>
-<tbody id="body">
-</tbody>
-<tfoot id="foot">
-</tfoot>
-</table>
-</template>
-
-</polymer-element>
-<polymer-element name="tr-ui-b-table-header-cell" on-tap="onTap_">
-<template>
-<style>
-    :host {
-      -webkit-user-select: none;
-      display: flex;
-    }
-
-    span {
-      flex: 0 1 auto;
-    }
-
-    side-element {
-      -webkit-user-select: none;
-      flex: 1 0 auto;
-      padding-left: 4px;
-      vertical-align: top;
-      font-size: 15px;
-      font-family: sans-serif;
-      display: inline;
-      line-height: 85%;
-    }
-  </style>
-<span id="title"></span><side-element id="side"></side-element>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-u-time-duration-span">
-<template>
-<style>
-    :host {
-      display: flex;
-      flex-direction: row;
-      align-items: center;
-    }
-    #warning {
-      margin-left: 4px;
-      font-size: 66%;
-    }
-    </style>
-<span id="content"></span>
-<span id="warning" style="display:none">⚠</span>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-u-time-stamp-span">
-<template>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-u-size-in-bytes-span">
-<template>
-<style>
-    :host {
-      display: flex;
-      flex-direction: row;
-      align-items: center;
-    }
-    </style>
-<span id="content"></span>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-generic-object-view" is="HTMLUnknownElement">
-<template>
-<style>
-    :host {
-      display: block;
-      font-family: monospace;
-    }
-    </style>
-<div id="content">
-</div>
-</template>
-
-</polymer-element>
-<polymer-element name="tr-ui-a-generic-object-view-with-label" is="HTMLUnknownElement">
-<template>
-<style>
-    :host {
-      display: block;
-    }
-    </style>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-stack-frame">
-<template>
-<style>
-    :host {
-      display: flex;
-      flex-direction: row;
-      align-items: center;
-    }
-    </style>
-<tr-ui-a-generic-object-view id="ov">
-</tr-ui-a-generic-object-view>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-single-event-sub-view" extends="tr-ui-a-sub-view">
-<template>
-<style>
-    :host {
-      display: flex;
-      flex-direction: column;
-    }
-    #table {
-      flex: 1 1 auto;
-      align-self: stretch;
-    }
-    </style>
-<tr-ui-b-table id="table">
-</tr-ui-b-table>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-related-events">
-<template>
-<style>
-    :host {
-      display: flex;
-      flex-direction: column;
-    }
-    #table {
-      flex: 1 1 auto;
-      align-self: stretch;
-    }
-    </style>
-<tr-ui-b-table id="table"></tr-ui-b-table>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-single-thread-slice-sub-view" extends="tr-ui-a-sub-view">
-<template>
-<style>
-    :host {
-      display: flex;
-      flex-direction: row;
-    }
-    #events {
-      display: flex;
-      flex-direction: column;
-    }
-
-    </style>
-<tr-ui-a-single-event-sub-view id="content"></tr-ui-a-single-event-sub-view>
-<div id="events">
-<tr-ui-a-related-events id="relatedEvents">
-</tr-ui-a-related-events>
-</div>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-selection-summary-table">
-<template>
-<style>
-    :host {
-      display: flex;
-    }
-    #table {
-      flex: 1 1 auto;
-      align-self: stretch;
-    }
-    </style>
-<tr-ui-b-table id="table">
-</tr-ui-b-table>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-multi-event-summary-table">
-<template>
-<style>
-    :host {
-      display: flex;
-    }
-    #table {
-      flex: 1 1 auto;
-      align-self: stretch;
-    }
-    </style>
-<tr-ui-b-table id="table">
-</tr-ui-b-table>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-multi-event-details-table">
-<template>
-<style>
-    :host {
-      display: flex;
-      flex-direction: column;
-    }
-    #table {
-      flex: 1 1 auto;
-      align-self: stretch;
-    }
-
-    #titletable {
-      font-weight: bold;
-    }
-
-    #title-info {
-      font-size: 12px;
-    }
-    </style>
-<tr-ui-b-table id="titletable">
-</tr-ui-b-table>
-<tr-ui-b-table id="table">
-</tr-ui-b-table>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-multi-event-sub-view" extends="tr-ui-a-sub-view">
-<template>
-<style>
-    :host {
-      display: flex;
-      overflow: auto;
-    }
-    #content {
-      display: flex;
-      flex-direction: column;
-      flex: 0 1 auto;
-      align-self: stretch;
-    }
-    #content > * {
-      flex: 0 0 auto;
-      align-self: stretch;
-    }
-    tr-ui-a-multi-event-summary-table {
-      border-bottom: 1px solid #aaa;
-    }
-
-    tr-ui-a-selection-summary-table  {
-      margin-top: 1.25em;
-      border-top: 1px solid #aaa;
-      background-color: #eee;
-      font-weight: bold;
-      margin-bottom: 1.25em;
-      border-bottom: 1px solid #aaa;
-    }
-    </style>
-<div id="content"></div>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-multi-thread-slice-sub-view" extends="tr-ui-a-sub-view">
-<template>
-<style>
-    :host {
-      display: flex;
-    }
-    #content {
-      display: flex;
-      flex: 1 1 auto;
-    }
-    #content > tr-ui-a-related-events {
-      margin-left: 8px;
-    }
-    </style>
-<div id="content"></div>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-single-async-slice-sub-view" extends="tr-ui-a-single-event-sub-view">
-
-</polymer-element><polymer-element name="tr-ui-a-multi-async-slice-sub-view" extends="tr-ui-a-sub-view">
-<template>
-<style>
-    :host {
-      display: flex;
-    }
-    </style>
-<tr-ui-a-multi-event-sub-view id="content"></tr-ui-a-multi-event-sub-view>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-single-cpu-slice-sub-view" extends="tr-ui-a-sub-view">
-<template>
-<style>
-    table {
-      border-collapse: collapse;
-      border-width: 0;
-      margin-bottom: 25px;
-      width: 100%;
-    }
-
-    table tr > td:first-child {
-      padding-left: 2px;
-    }
-
-    table tr > td {
-      padding: 2px 4px 2px 4px;
-      vertical-align: text-top;
-      width: 150px;
-    }
-
-    table td td {
-      padding: 0 0 0 0;
-      width: auto;
-    }
-    tr {
-      vertical-align: top;
-    }
-
-    tr:nth-child(2n+0) {
-      background-color: #e2e2e2;
-    }
-    </style>
-<table>
-<tr>
-<td>Running process:</td><td id="process-name"></td>
-</tr>
-<tr>
-<td>Running thread:</td><td id="thread-name"></td>
-</tr>
-<tr>
-<td>Start:</td><td id="start"></td>
-</tr>
-<tr>
-<td>Duration:</td><td id="duration"></td>
-</tr>
-<tr>
-<td>Active slices:</td><td id="running-thread"></td>
-</tr>
-<tr>
-<td>Args:</td>
-<td>
-<tr-ui-a-generic-object-view id="args">
-</tr-ui-a-generic-object-view>
-</td>
-</tr>
-</table>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-multi-cpu-slice-sub-view" extends="tr-ui-a-sub-view">
-<template>
-<style>
-    :host {
-      display: flex;
-    }
-    #content {
-      flex: 1 1 auto;
-    }
-    </style>
-<tr-ui-a-multi-event-sub-view id="content"></tr-ui-a-multi-event-sub-view>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-single-thread-time-slice-sub-view" extends="tr-ui-a-sub-view">
-<template>
-<style>
-    table {
-      border-collapse: collapse;
-      border-width: 0;
-      margin-bottom: 25px;
-      width: 100%;
-    }
-
-    table tr > td:first-child {
-      padding-left: 2px;
-    }
-
-    table tr > td {
-      padding: 2px 4px 2px 4px;
-      vertical-align: text-top;
-      width: 150px;
-    }
-
-    table td td {
-      padding: 0 0 0 0;
-      width: auto;
-    }
-    tr {
-      vertical-align: top;
-    }
-
-    tr:nth-child(2n+0) {
-      background-color: #e2e2e2;
-    }
-    </style>
-<table>
-<tr>
-<td>Running process:</td><td id="process-name"></td>
-</tr>
-<tr>
-<td>Running thread:</td><td id="thread-name"></td>
-</tr>
-<tr>
-<td>State:</td>
-<td><b><span id="state"></span></b></td>
-</tr>
-<tr>
-<td>Start:</td><td id="start"></td>
-</tr>
-<tr>
-<td>Duration:</td><td id="duration"></td>
-</tr>
-<tr>
-<td>On CPU:</td><td id="on-cpu"></td>
-</tr>
-<tr>
-<td>Running instead:</td><td id="running-instead"></td>
-</tr>
-<tr>
-<td>Args:</td><td id="args"></td>
-</tr>
-</table>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-multi-thread-time-slice-sub-view" extends="tr-ui-a-sub-view">
-<template>
-<style>
-    :host {
-      display: flex;
-    }
-    #content {
-      flex: 1 1 auto;
-    }
-    </style>
-<tr-ui-a-multi-event-sub-view id="content"></tr-ui-a-multi-event-sub-view>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-single-instant-event-sub-view" extends="tr-ui-a-sub-view">
-<template>
-<style>
-    :host {
-      display: block;
-    }
-    </style>
-<div id="content"></div>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-multi-instant-event-sub-view" extends="tr-ui-a-sub-view">
-<template>
-<style>
-    :host {
-      display: block;
-    }
-    </style>
-<div id="content"></div>
-</template>
-
-</polymer-element><style>
-.analysis-header{font-weight:bold}.analysis-results{font-family:monospace;white-space:pre}.analysis-results *{-webkit-user-select:text!important;cursor:text}.analysis-table{border-collapse:collapse;border-width:0;margin-bottom:25px;width:100%}.analysis-table tr>td:first-child{padding-left:2px}.analysis-table tr>td{padding:2px 4px 2px 4px;vertical-align:text-top;width:150px}.analysis-table td td{padding:0 0 0 0;width:auto}.analysis-table-header{text-align:left}.analysis-table-row{vertical [...]
-</style><polymer-element name="tr-ui-a-counter-sample-sub-view" extends="tr-ui-a-sub-view">
-
-</polymer-element><polymer-element name="tr-ui-a-single-flow-event-sub-view" extends="tr-ui-a-single-event-sub-view">
-
-</polymer-element><polymer-element name="tr-ui-a-multi-flow-event-sub-view" extends="tr-ui-a-sub-view">
-<template>
-<style>
-    :host {
-      display: flex;
-    }
-    </style>
-<tr-ui-a-multi-event-sub-view id="content"></tr-ui-a-multi-event-sub-view>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-single-object-instance-sub-view" extends="tr-ui-a-sub-view">
-<template>
-<style>
-    :host {
-      display: block;
-    }
-
-    #snapshots > * {
-      display: block;
-    }
-
-    :host {
-      overflow: auto;
-      display: block;
-    }
-
-    * {
-      -webkit-user-select: text;
-    }
-
-    .title {
-      border-bottom: 1px solid rgb(128, 128, 128);
-      font-size: 110%;
-      font-weight: bold;
-    }
-
-    td, th {
-      font-family: monospace;
-      vertical-align: top;
-    }
-    </style>
-<div id="content"></div>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-single-object-snapshot-sub-view" extends="tr-ui-a-sub-view">
-<template>
-<style>
-    #args {
-      white-space: pre;
-    }
-
-    :host {
-      overflow: auto;
-      display: flex;
-    }
-
-    * {
-      -webkit-user-select: text;
-    }
-
-    .title {
-      border-bottom: 1px solid rgb(128, 128, 128);
-      font-size: 110%;
-      font-weight: bold;
-    }
-
-    td, th {
-      font-family: monospace;
-      vertical-align: top;
-    }
-    </style>
-<content></content>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-multi-object-sub-view" extends="tr-ui-a-sub-view">
-<template>
-<style>
-    :host {
-      display: flex;
-    }
-    </style>
-<tr-ui-b-table id="content"></tr-ui-b-table>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-single-sample-sub-view" extends="tr-ui-a-sub-view">
-<template>
-<style>
-    :host {
-      display: flex;
-    }
-    </style>
-<tr-ui-b-table id="content"></tr-ui-b-table>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-multi-sample-sub-view" extends="tr-ui-a-sub-view">
-<template>
-<style>
-    :host {
-      display: block;
-    }
-    </style>
-<div id="content"></div>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-single-interaction-record-sub-view" extends="tr-ui-a-sub-view">
-
-</polymer-element><polymer-element name="tr-ui-a-multi-interaction-record-sub-view" extends="tr-ui-a-sub-view">
-
-</polymer-element><polymer-element name="tr-ui-a-alert-sub-view" extends="tr-ui-a-sub-view">
-<template>
-<style>
-    :host {
-      display: flex;
-      flex-direction: column;
-    }
-    #table {
-      flex: 1 1 auto;
-      align-self: stretch;
-    }
-    </style>
-<tr-ui-b-table id="table">
-</tr-ui-b-table>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-single-frame-sub-view" extends="tr-ui-a-sub-view">
-<template>
-<style>
-    :host {
-      display: flex;
-      flex-direction: column;
-    }
-    #asv {
-      flex: 0 0 auto;
-      align-self: stretch;
-    }
-    </style>
-<tr-ui-a-alert-sub-view id="asv">
-</tr-ui-a-alert-sub-view>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-multi-frame-sub-view" extends="tr-ui-a-sub-view">
-
-</polymer-element><polymer-element name="tr-ui-b-color-legend">
-<template>
-<style>
-    :host {
-      display: inline-block;
-    }
-
-    #square {
-      font-size: 150%;  /* Make the square bigger. */
-      line-height: 0%;  /* Prevent the square from increasing legend height. */
-    }
-    </style>
-<span id="square"></span>
-<span id="label"></span>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-memory-dump-allocator-details-pane">
-<template>
-<style>
-      :host {
-        display: flex;
-        flex-direction: column;
-      }
-
-      #label {
-        flex: 0 0 auto;
-        padding: 8px;
-
-        background-color: #eee;
-        border-bottom: 1px solid #8e8e8e;
-        border-top: 1px solid white;
-
-        font-size:  15px;
-        font-weight: bold;
-      }
-
-      #contents {
-        flex: 1 0 auto;
-        align-self: stretch;
-        font-size: 12px;
-      }
-
-      #contents .info-text {
-        padding: 8px;
-        color: #666;
-        font-style: italic;
-        text-align: center;
-      }
-    </style>
-<div id="label">Allocator details</div>
-<div id="contents"></div>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-memory-dump-vm-regions-details-pane">
-<template>
-<style>
-      :host {
-        display: flex;
-        flex-direction: column;
-      }
-
-      #label {
-        flex: 0 0 auto;
-        padding: 8px;
-
-        background-color: #eee;
-        border-bottom: 1px solid #8e8e8e;
-        border-top: 1px solid white;
-
-        font-size:  15px;
-        font-weight: bold;
-      }
-
-      #contents {
-        flex: 1 0 auto;
-        align-self: stretch;
-        font-size: 12px;
-      }
-
-      #contents .info-text {
-        padding: 8px;
-        color: #666;
-        font-style: italic;
-        text-align: center;
-      }
-    </style>
-<div id="label">Memory maps</div>
-<div id="contents"></div>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-memory-dump-overview-pane">
-<template>
-<style>
-      :host {
-        display: flex;
-        flex-direction: column;
-      }
-
-      #label {
-        flex: 0 0 auto;
-        padding: 8px;
-
-        background-color: #eee;
-        border-bottom: 1px solid #8e8e8e;
-        border-top: 1px solid white;
-
-        font-size:  15px;
-        font-weight: bold;
-      }
-
-      #table {
-        flex: 1 0 auto;
-        align-self: stretch;
-      }
-    </style>
-<div id="label">Overview</div>
-<tr-ui-b-table id="table">
-</tr-ui-b-table>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-memory-dump-view">
-<template>
-<style>
-    :host {
-      display: flex;
-      flex-direction: column;
-    }
-
-    #overview_pane,
-    #details_pane_container {
-      flex: 0 0 auto;
-    }
-    </style>
-<tr-ui-a-memory-dump-overview-pane id="overview_pane">
-</tr-ui-a-memory-dump-overview-pane>
-<div id="details_pane_container">
-</div>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-single-process-memory-dump-sub-view" extends="tr-ui-a-sub-view">
-<template>
-<tr-ui-a-memory-dump-view id="memory_dump_view">
-</tr-ui-a-memory-dump-view>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-multi-process-memory-dump-sub-view" extends="tr-ui-a-sub-view">
-<template>
-<style>
-    :host {
-      display: flex;
-    }
-    </style>
-<tr-ui-b-table id="content"></tr-ui-b-table>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-single-global-memory-dump-sub-view" extends="tr-ui-a-sub-view">
-<template>
-<tr-ui-a-memory-dump-view id="memory_dump_view">
-</tr-ui-a-memory-dump-view>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-multi-global-memory-dump-sub-view" extends="tr-ui-a-sub-view">
-<template>
-<style>
-    :host {
-      display: flex;
-    }
-    </style>
-<tr-ui-b-table id="content"></tr-ui-b-table>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-a-analysis-view">
-<template>
-<style>
-      :host {
-        background-color: white;
-        display: flex;
-        flex-direction: column;
-        height: 275px;
-        overflow: auto;
-      }
-
-      :host(.tall-mode) {
-        height: 525px;
-      }
-
-      ::content > * {
-        flex: 1 0 auto;
-      }
-    </style>
-<content></content>
-</template>
-
-</polymer-element><style>
-.track-button{background-color:rgba(255,255,255,0.5);border:1px solid rgba(0,0,0,0.1);color:rgba(0,0,0,0.2);font-size:10px;height:12px;text-align:center;width:12px}.track-button:hover{background-color:rgba(255,255,255,1.0);border:1px solid rgba(0,0,0,0.5);box-shadow:0 0 .05em rgba(0,0,0,0.4);color:rgba(0,0,0,1)}.track-close-button{left:2px;position:absolute;top:2px}.track-collapse-button{left:3px;position:absolute;top:2px}
-</style><style>
-.drawing-container{-webkit-box-flex:1;display:inline;overflow:auto;overflow-x:hidden;position:relative}.drawing-container-canvas{-webkit-box-flex:1;display:block;pointer-events:none;position:absolute;top:0}
-</style><style>
-.heading-track{-webkit-box-align:stretch;-webkit-box-orient:horizontal;display:-webkit-box;margin:0;padding:0 5px 0 0}.heading-track>heading{-webkit-box-sizing:border-box;background-color:rgb(243,245,247);border-right:1px solid #8e8e8e;box-sizing:border-box;display:-webkit-flex;-webkit-flex-direction:row;align-items:center;overflow-x:hidden;padding-right:5px;text-align:left;text-overflow:ellipsis;white-space:nowrap}.heading-track>heading>.heading-arrow{-webkit-flex:0 0 auto;margin-left:5 [...]
-</style><style>
-.chart-track {
-  height: 30px;
-  position: relative;
-}
-</style><style>
-.letter-dot-track {
-  height: 18px;
-}
-</style><style>
-.object-instance-track{height:18px}
-</style><style>
-.rect-track{height:18px}
-</style><style>
-.spacing-track{height:4px}
-</style><style>
-.thread-track{-webkit-box-orient:vertical;display:-webkit-box;position:relative}
-</style><style>
-.process-track-header{-webkit-flex:0 0 auto;background-image:-webkit-gradient(linear,0 0,100% 0,from(#E5E5E5),to(#D1D1D1));border-bottom:1px solid #8e8e8e;border-top:1px solid white;font-size:75%}.process-track-name:before{content:'\25B8';padding:0 5px}.process-track-base.expanded .process-track-name:before{content:'\25BE'}
-</style><style>
-.model-track {
-  -webkit-box-flex: 1;
-}
-</style><style>
-.ruler-track{height:12px}.ruler-track.tall-mode{height:30px}
-</style><style>
-* /deep/ .mouse-mode-selector{-webkit-user-drag:element;-webkit-user-select:none;background:#DDD;border:1px solid #BBB;border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,0.2);left:calc(100% - 120px);position:absolute;top:100px;user-select:none;width:29px;z-index:20}* /deep/ .mouse-mode-icon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAChCAYAAACbBNzvAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABV0RVh0Q3JlYXRpb24gVGltZQA3LzE2LzEzRNEKUwAAABx0RVh0U29mdHdhcm [...]
-</style>
-<style>
-* /deep/ .tool-button{background-position:center center;background-repeat:no-repeat;border-bottom:1px solid #BCBCBC;border-top:1px solid #F1F1F1;cursor:pointer;height:30px}* /deep/ .tool-button.active{cursor:auto}
-</style>
-<template id="mouse-mode-selector-template">
-<div class="drag-handle"></div>
-<div class="buttons">
-</div>
-</template><style>
-body *{-webkit-user-select:none;box-sizing:border-box}
-</style>
-<style>
-.timeline-track-view *{-webkit-user-select:none;cursor:default}.timeline-track-view .tool-button{cursor:pointer}.timeline-track-view{-webkit-box-orient:vertical;display:-webkit-box;position:relative}.model-track-container{-webkit-box-flex:1;overflow:auto}.drag-box{background-color:rgba(0,0,255,0.25);border:1px solid rgb(0,0,96);font-size:75%;position:fixed}.timeline-track-view>.hint-text{position:absolute;bottom:6px;right:6px;font-size:8pt}
-</style><polymer-element name="tr-ui-find-control" constructor="TracingFindControl">
-<template>
-<style>
-      :host {
-        -webkit-user-select: none;
-        display: -webkit-flex;
-        position: relative;
-      }
-      input {
-        -webkit-user-select: auto;
-        background-color: #f8f8f8;
-        border: 1px solid rgba(0, 0, 0, 0.5);
-        box-sizing: border-box;
-        margin: 0;
-        padding: 0;
-        width: 170px;
-      }
-      input:focus {
-        background-color: white;
-      }
-      tr-ui-b-toolbar-button {
-        border-left: none;
-        font-size: 14px;
-        margin: 0;
-      }
-      #hitCount {
-        left: 0;
-        opacity: 0.25;
-        pointer-events: none;
-        position: absolute;
-        text-align: right;
-        top: 2px;
-        width: 167px;
-        z-index: 1;
-      }
-      #spinner {
-        visibility: hidden;
-        width: 8px;
-        height: 8px;
-        left: 154px;
-        pointer-events: none;
-        position: absolute;
-        top: 4px;
-        z-index: 1;
-
-        border: 2px solid transparent;
-        border-bottom: 2px solid rgba(0, 0, 0, 0.5);
-        border-right: 2px solid rgba(0, 0, 0, 0.5);
-        border-radius: 50%;
-
-        animation: spin 1s linear infinite;
-      }
-      @keyframes spin { 100% { transform: rotate(360deg); } }
-    </style>
-<input type="text" id="filter" on-input="{{ filterTextChanged }}" on-keypress="{{ filterKeyPress }}" on-keydown="{{ filterKeyDown }}" on-blur="{{ filterBlur }}" on-focus="{{ filterFocus }}" on-mouseup="{{ filterMouseUp }}" />
-<div id="spinner"></div>
-<tr-ui-b-toolbar-button on-click="{{ findPrevious }}">
-      ←
-    </tr-ui-b-toolbar-button>
-<tr-ui-b-toolbar-button on-click="{{ findNext }}">
-      →
-    </tr-ui-b-toolbar-button>
-<div id="hitCount">0 of 0</div>
-</template>
-
-</polymer-element><polymer-element name="tracing-scripting-control" constructor="TracingScriptingControl">
-<template>
-<style>
-      :host {
-        flex: 1 1 auto;
-      }
-      .root {
-        font-family: monospace;
-        cursor: text;
-
-        padding: 2px;
-        margin: 2px;
-        border: 1px solid rgba(0, 0, 0, 0.5);
-        background: white;
-
-        height: 100px;
-        overflow-y: auto;
-
-        transition-property: opacity, height, padding, margin;
-        transition-duration: .2s;
-        transition-timing-function: ease-out;
-      }
-      .hidden {
-        margin-top: 0px;
-        margin-bottom: 0px;
-        padding-top: 0px;
-        padding-bottom: 0px;
-        height: 0px;
-        opacity: 0;
-      }
-      .focused {
-        outline: auto 5px -webkit-focus-ring-color;
-      }
-      #history {
-        -webkit-user-select: text;
-        color: #777;
-      }
-      #prompt {
-        -webkit-user-select: text;
-        -webkit-user-modify: read-write-plaintext-only;
-        text-overflow: clip !important;
-        text-decoration: none !important;
-      }
-      #prompt:focus {
-        outline: none;
-      }
-      #prompt br {
-        display: none;
-      }
-      #prompt ::before {
-        content: ">";
-        color: #468;
-      }
-    </style>
-<div id="root" class="root hidden" tabindex="0" on-focus="{{ onConsoleFocus }}">
-<div id="history"></div>
-<div id="prompt" on-keypress="{{ promptKeyPress }}" on-keydown="{{ promptKeyDown }}" on-blur="{{ onConsoleBlur }}">
-</div></div></template>
-
-</polymer-element><polymer-element name="tr-ui-side-panel">
-
-</polymer-element><polymer-element name="tr-ui-side-panel-container" is="HTMLUnknownElement">
-<template>
-<style>
-    :host {
-      align-items: stretch;
-      display: -webkit-flex;
-    }
-
-    :host([expanded]) > active-panel-container {
-      -webkit-flex: 1 1 auto;
-      border-left: 1px solid black;
-      display: -webkit-flex;
-    }
-
-    :host(:not([expanded])) > active-panel-container {
-      display: none;
-    }
-
-    active-panel-container {
-      display: flex;
-    }
-
-    tab-strip {
-      -webkit-flex: 0 0 auto;
-      -webkit-flex-direction: column;
-      -webkit-user-select: none;
-      background-color: rgb(236, 236, 236);
-      border-left: 1px solid black;
-      cursor: default;
-      display: -webkit-flex;
-      min-width: 18px; /* workaround for flexbox and writing-mode mixing bug */
-      padding: 10px 0 10px 0;
-      font-size: 12px;
-    }
-
-    tab-strip > tab-strip-label {
-      -webkit-writing-mode: vertical-rl;
-      display: inline;
-      margin-right: 1px;
-      min-height: 20px;
-      padding: 15px 3px 15px 1px;
-    }
-
-    tab-strip >
-        tab-strip-label:not([enabled]) {
-      color: rgb(128, 128, 128);
-    }
-
-    tab-strip > tab-strip-label[selected] {
-      background-color: white;
-      border: 1px solid rgb(163, 163, 163);
-      border-left: none;
-      padding: 14px 2px 14px 1px;
-    }
-    </style>
-<active-panel-container id="active_panel_container">
-</active-panel-container>
-<tab-strip id="tab_strip"></tab-strip>
-</template>
-
-</polymer-element><polymer-element name="tr-ui-b-dropdown">
-<template>
-<style>
-    :host {
-      position: relative;
-      display: flex;
-    }
-    #outer {
-      display: flex;
-      flex: 0 0 auto;
-      padding: 1px 4px 1px 4px;
-      -webkit-user-select: none;
-      cursor: default;
-      font-size: 12px;
-    }
-
-    #state {
-      display: flex;
-      flex: 0 0 auto;
-      margin-left: 2px;
-      margin-right: 0px;
-      flex: 0 0 auto;
-    }
-
-    #icon {
-      display: flex;
-      flex: 0 0 auto;
-      flex: 0 0 auto;
-    }
-    dialog {
-      position: absolute;
-      padding: 0;
-      border: 0;
-      margin: 0;
-    }
-    dialog::backdrop {
-      background: rgba(0,0,0,.05);
-    }
-
-    #dialog-frame {
-      background-color: #fff;
-      display: flex;
-      flex-direction: column;
-      flex: 1 1 auto;
-      padding: 6px;
-      border: 1px solid black;
-      -webkit-user-select: none;
-      cursor: default;
-    }
-    </style>
-<tr-ui-b-toolbar-button id="outer">
-<div id="icon">⚙</div>
-<div id="state">▾</div>
-</tr-ui-b-toolbar-button>
-<dialog id="dialog">
-<div id="dialog-frame">
-<content></content>
-</div>
-</dialog>
-</template>
-
-</polymer-element><style>
-* /deep/ x-drag-handle{-webkit-user-select:none;box-sizing:border-box;display:block}* /deep/ x-drag-handle.horizontal-drag-handle{background-image:-webkit-gradient(linear,0 0,0 100%,from(#E5E5E5),to(#D1D1D1));border-bottom:1px solid #8e8e8e;border-top:1px solid white;cursor:ns-resize;height:7px;position:relative;z-index:10}* /deep/ x-drag-handle.vertical-drag-handle{background-image:-webkit-gradient(linear,0 0,100% 0,from(#E5E5E5),to(#D1D1D1));border-left:1px solid white;border-right:1px [...]
-</style><style>
-x-timeline-view{-webkit-flex-direction:column;cursor:default;display:-webkit-flex;font-family:sans-serif;padding:0}x-timeline-view>.control>.title{font-size:14px;height:22px;padding-left:2px;padding-right:8px;padding-top:2px;flex:1 0 auto}x-timeline-view>.control{background-color:#e6e6e6;background-image:-webkit-gradient(linear,0 0,0 100%,from(#E5E5E5),to(#D1D1D1));flex:0 0 auto;overflow-x:auto}x-timeline-view>.control>.bar{display:flex}x-timeline-view>.control::-webkit-scrollbar{height: [...]
-</style>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<template id="timeline-view-template">
-<div class="control">
-<div class="bar">
-<div id="left-controls" class="controls"></div>
-<div class="title">^_^</div>
-<div id="right-controls" class="controls"></div>
-</div>
-<div id="collapsing-controls" class="controls"></div>
-</div>
-<middle-container>
-<track-view-container></track-view-container>
-<tr-ui-side-panel-container></tr-ui-side-panel-container>
-</middle-container>
-<x-drag-handle></x-drag-handle>
-<tr-ui-a-analysis-view id="analysis"></tr-ui-a-analysis-view>
-</template>
-<template id="help-btn-template">
-<tr-ui-b-toolbar-button class="view-help-button">
-    ?
-  </tr-ui-b-toolbar-button>
-<div class="view-help-text">
-<div class="column left">
-<h2>Navigation</h2>
-<div class="pair">
-<div class="command">w/s</div>
-<div class="action">Zoom in/out (+shift: faster)</div>
-</div>
-<div class="pair">
-<div class="command">a/d</div>
-<div class="action">Pan left/right (+shift: faster)</div>
-</div>
-<div class="pair">
-<div class="command">→/shift-TAB</div>
-<div class="action">Select previous event</div>
-</div>
-<div class="pair">
-<div class="command">←/TAB</div>
-<div class="action">Select next event</div>
-</div>
-<h2>Mouse Controls</h2>
-<div class="pair">
-<div class="command">click</div>
-<div class="action">Select event</div>
-</div>
-<div class="pair">
-<div class="command">alt-mousewheel</div>
-<div class="action">Zoom in/out</div>
-</div>
-<h3>
-<span class="mouse-mode-icon select-mode"></span>
-        Select mode
-      </h3>
-<div class="pair">
-<div class="command">drag</div>
-<div class="action">Box select</div>
-</div>
-<div class="pair">
-<div class="command">double click</div>
-<div class="action">Select all events with same title</div>
-</div>
-<h3>
-<span class="mouse-mode-icon pan-mode"></span>
-        Pan mode
-      </h3>
-<div class="pair">
-<div class="command">drag</div>
-<div class="action">Pan the view</div>
-</div>
-<h3>
-<span class="mouse-mode-icon zoom-mode"></span>
-        Zoom mode
-      </h3>
-<div class="pair">
-<div class="command">drag</div>
-<div class="action">Zoom in/out by dragging up/down</div>
-</div>
-<h3>
-<span class="mouse-mode-icon timing-mode"></span>
-        Timing mode
-      </h3>
-<div class="pair">
-<div class="command">drag</div>
-<div class="action">Create or move markers</div>
-</div>
-<div class="pair">
-<div class="command">double click</div>
-<div class="action">Set marker range to slice</div>
-</div>
-</div>
-<div class="column right">
-<h2>General</h2>
-<div class="pair">
-<div class="command">1-4</div>
-<div class="action">Switch mouse mode</div>
-</div>
-<div class="pair">
-<div class="command">shift</div>
-<div class="action">Hold for temporary select</div>
-</div>
-<div class="pair">
-<div class="command">space</div>
-<div class="action">Hold for temporary pan</div>
-</div>
-<div class="pair">
-<div class="command"><span class="mod"></span></div>
-<div class="action">Hold for temporary zoom</div>
-</div>
-<div class="pair">
-<div class="command">/</div>
-<div class="action">Search</div>
-</div>
-<div class="pair">
-<div class="command">enter</div>
-<div class="action">Step through search results</div>
-</div>
-<div class="pair">
-<div class="command">f</div>
-<div class="action">Zoom into selection</div>
-</div>
-<div class="pair">
-<div class="command">z/0</div>
-<div class="action">Reset zoom and pan</div>
-</div>
-<div class="pair">
-<div class="command">g/G</div>
-<div class="action">Toggle 60hz grid</div>
-</div>
-<div class="pair">
-<div class="command">v</div>
-<div class="action">Highlight VSync</div>
-</div>
-<div class="pair">
-<div class="command">h</div>
-<div class="action">Toggle low/high details</div>
-</div>
-<div class="pair">
-<div class="command">m</div>
-<div class="action">Mark current selection</div>
-</div>
-<div class="pair">
-<div class="command">`</div>
-<div class="action">Show or hide the scripting console</div>
-</div>
-<div class="pair">
-<div class="command">?</div>
-<div class="action">Show help</div>
-</div>
-</div>
-</div>
-</template>
-<template id="metadata-btn-template">
-<div class="button view-metadata-button view-info-button">Metadata</div>
-<div class="info-button-text metadata-dialog-text"></div>
-</template>
-<template id="console-btn-template">
-<tr-ui-b-toolbar-button class="view-console-button">
-    »
-  </tr-ui-b-toolbar-button>
-</template><script>
-
-// Copyright (c) 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-/* WARNING: This file is auto generated.
- *
- * Do not edit directly.
- */
-
-/**
- * @license
- * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
- */
-// @version 0.5.5
-window.PolymerGestures={},function(a){var b=!1,c=document.createElement("meta");if(c.createShadowRoot){var d=c.createShadowRoot(),e=document.createElement("span");d.appendChild(e),c.addEventListener("testpath",function(a){a.path&&(b=a.path[0]===e),a.stopPropagation()});var f=new CustomEvent("testpath",{bubbles:!0});document.head.appendChild(c),e.dispatchEvent(f),c.parentNode.removeChild(c),d=e=null}c=null;var g={shadow:function(a){return a?a.shadowRoot||a.webkitShadowRoot:void 0},canTarg [...]
-var ab=H,bb=L;a.esprima={parse:R}}(this),function(a){"use strict";function b(a,b,d,e){var f;try{if(f=c(a),f.scopeIdent&&(d.nodeType!==Node.ELEMENT_NODE||"TEMPLATE"!==d.tagName||"bind"!==b&&"repeat"!==b))throw Error("as and in can only be used within <template bind/repeat>")}catch(g){return void console.error("Invalid expression syntax: "+a,g)}return function(a,b,c){var d=f.getBinding(a,e,c);return f.scopeIdent&&d&&(b.polymerExpressionScopeIdent_=f.scopeIdent,f.indexIdent&&(b.polymerExpre [...]
-return q(this,d.open(r(this))),t(this,a,e)},HTMLSelectElement.prototype.bind=function(a,c,d){if("selectedindex"===a&&(a="selectedIndex"),"selectedIndex"!==a&&"value"!==a)return HTMLElement.prototype.bind.call(this,a,c,d);if(this.removeAttribute(a),d)return j(this,a,c);var e=c,f=m(this,a,e);return j(this,a,e.open(k(this,a))),b(this,a,f)}}(this),function(a){"use strict";function b(a){if(!a)throw new Error("Assertion failed")}function c(a){for(var b;b=a.parentNode;)a=b;return a}function d(a [...]
-b.events&&Object.keys(a).length>0&&console.log("[%s] addHostListeners:",this.localName,a);for(var c in a){var d=a[c];PolymerGestures.addEventListener(this,c,this.element.getEventHandler(this,this,d))}},dispatchMethod:function(a,c,d){if(a){b.events&&console.group("[%s] dispatch [%s]",a.localName,c);var e="function"==typeof c?c:a[c];e&&e[d?"apply":"call"](a,d),b.events&&console.groupEnd(),Polymer.flush()}}};a.api.instance.events=d,a.addEventListener=function(a,b,c,d){PolymerGestures.addEve [...]
-function exportPath(name){var parts=name.split('.');var cur=global;for(var part;parts.length&&(part=parts.shift());){if(part in cur){cur=cur[part];}else{cur=cur[part]={};}}
-return cur;};function isDefined(name){var parts=name.split('.');var curObject=global;for(var i=0;i<parts.length;i++){var partName=parts[i];var nextObject=curObject[partName];if(nextObject===undefined)
-return false;curObject=nextObject;}
-return true;}
-var panicElement=undefined;var rawPanicMessages=[];function showPanicElementIfNeeded(){if(panicElement)
-return;var panicOverlay=document.createElement('div');panicOverlay.style.backgroundColor='white';panicOverlay.style.border='3px solid red';panicOverlay.style.boxSizing='border-box';panicOverlay.style.color='black';panicOverlay.style.display='-webkit-flex';panicOverlay.style.height='100%';panicOverlay.style.left=0;panicOverlay.style.padding='8px';panicOverlay.style.position='fixed';panicOverlay.style.top=0;panicOverlay.style.webkitFlexDirection='column';panicOverlay.style.width='100%';pan [...]
-function showPanic(panicTitle,panicDetails){if(panicDetails instanceof Error)
-panicDetails=panicDetails.stack;showPanicElementIfNeeded();var panicMessageEl=document.createElement('div');panicMessageEl.innerHTML='<h2 id="message"></h2>'+'<pre id="details"></pre>';panicMessageEl.querySelector('#message').textContent=panicTitle;panicMessageEl.querySelector('#details').textContent=panicDetails;panicElement.appendChild(panicMessageEl);rawPanicMessages.push({title:panicTitle,details:panicDetails});}
-function hasPanic(){return rawPanicMessages.length!==0;}
-function getPanicText(){return rawPanicMessages.map(function(msg){return msg.title;}).join(', ');}
-function exportTo(namespace,fn){var obj=exportPath(namespace);var exports=fn();for(var propertyName in exports){var propertyDescriptor=Object.getOwnPropertyDescriptor(exports,propertyName);if(propertyDescriptor)
-Object.defineProperty(obj,propertyName,propertyDescriptor);}};function initialize(){tr.doc=document;tr.isMac=/Mac/.test(navigator.platform);tr.isWindows=/Win/.test(navigator.platform);tr.isChromeOS=/CrOS/.test(navigator.userAgent);tr.isLinux=/Linux/.test(navigator.userAgent);}
-return{initialize:initialize,exportTo:exportTo,isDefined:isDefined,showPanic:showPanic,hasPanic:hasPanic,getPanicText:getPanicText};})();tr.initialize();'use strict';tr.exportTo('tr.b',function(){function Settings(){return Settings;};document.head.addEventListener('tr-unittest-will-run',function(){Settings.setAlternativeStorageInstance(global.sessionStorage);});function SessionSettings(){return SessionSettings;}
-function AddStaticStorageFunctionsToClass_(input_class,storage){input_class.storage_=storage;input_class.get=function(key,opt_default,opt_namespace){key=input_class.namespace_(key,opt_namespace);var rawVal=input_class.storage_.getItem(key);if(rawVal===null||rawVal===undefined)
-return opt_default;try{return JSON.parse(rawVal).value;}catch(e){input_class.storage_.removeItem(input_class.namespace_(key,opt_namespace));return opt_default;}};input_class.set=function(key,value,opt_namespace){if(value===undefined)
-throw new Error('Settings.set: value must not be undefined');var v=JSON.stringify({value:value});input_class.storage_.setItem(input_class.namespace_(key,opt_namespace),v);};input_class.keys=function(opt_namespace){var result=[];opt_namespace=opt_namespace||'';for(var i=0;i<input_class.storage_.length;i++){var key=input_class.storage_.key(i);if(input_class.isnamespaced_(key,opt_namespace))
-result.push(input_class.unnamespace_(key,opt_namespace));}
-return result;};input_class.isnamespaced_=function(key,opt_namespace){return key.indexOf(input_class.normalize_(opt_namespace))==0;};input_class.namespace_=function(key,opt_namespace){return input_class.normalize_(opt_namespace)+key;};input_class.unnamespace_=function(key,opt_namespace){return key.replace(input_class.normalize_(opt_namespace),'');};input_class.normalize_=function(opt_namespace){return input_class.NAMESPACE+(opt_namespace?opt_namespace+'.':'');};input_class.setAlternative [...]
-return undefined;return input_class.storage_;};input_class.NAMESPACE='trace-viewer';};AddStaticStorageFunctionsToClass_(Settings,localStorage);AddStaticStorageFunctionsToClass_(SessionSettings,sessionStorage);return{Settings:Settings,SessionSettings:SessionSettings};});'use strict';tr.exportTo('tr.b',function(){function asArray(arrayish){var values=[];for(var i=0;i<arrayish.length;i++)
-values.push(arrayish[i]);return values;}
-function compareArrays(x,y,elementCmp){var minLength=Math.min(x.length,y.length);for(var i=0;i<minLength;i++){var tmp=elementCmp(x[i],y[i]);if(tmp)
-return tmp;}
-if(x.length==y.length)
-return 0;if(x[i]===undefined)
-return-1;return 1;}
-function comparePossiblyUndefinedValues(x,y,cmp,opt_this){if(x!==undefined&&y!==undefined)
-return cmp.call(opt_this,x,y);if(x!==undefined)
-return-1;if(y!==undefined)
-return 1;return 0;}
-function concatenateArrays(){var values=[];for(var i=0;i<arguments.length;i++){if(!(arguments[i]instanceof Array))
-throw new Error('Arguments '+i+'is not an array');values.push.apply(values,arguments[i]);}
-return values;}
-function concatenateObjects(){var result={};for(var i=0;i<arguments.length;i++){var object=arguments[i];for(var j in object){result[j]=object[j];}}
-return result;}
-function dictionaryKeys(dict){var keys=[];for(var key in dict)
-keys.push(key);return keys;}
-function dictionaryValues(dict){var values=[];for(var key in dict)
-values.push(dict[key]);return values;}
-function dictionaryLength(dict){var n=0;for(var key in dict)
-n++;return n;}
-function group(ary,fn){return ary.reduce(function(accumulator,curr){var key=fn(curr);if(key in accumulator)
-accumulator[key].push(curr);else
-accumulator[key]=[curr];return accumulator;},{});}
-function iterItems(dict,fn,opt_this){opt_this=opt_this||this;var keys=Object.keys(dict);for(var i=0;i<keys.length;i++){var key=keys[i];fn.call(opt_this,key,dict[key]);}}
-function mapItems(dict,fn,opt_this){opt_this=opt_this||this;var result={};var keys=Object.keys(dict);for(var i=0;i<keys.length;i++){var key=keys[i];result[key]=fn.call(opt_this,key,dict[key]);}
-return result;}
-function iterObjectFieldsRecursively(object,func){if(!(object instanceof Object))
-return;if(object instanceof Array){for(var i=0;i<object.length;i++){func(object,i,object[i]);iterObjectFieldsRecursively(object[i],func);}
-return;}
-for(var key in object){var value=object[key];func(object,key,value);iterObjectFieldsRecursively(value,func);}}
-function identity(d){return d;}
-function findFirstIndexInArray(ary,opt_func,opt_this){var func=opt_func||identity;for(var i=0;i<ary.length;i++){if(func.call(opt_this,ary[i],i))
-return i;}
-return-1;}
-function findFirstInArray(ary,opt_func,opt_this){var i=findFirstIndexInArray(ary,opt_func,opt_func);if(i===-1)
-return undefined;return ary[i];}
-return{asArray:asArray,concatenateArrays:concatenateArrays,concatenateObjects:concatenateObjects,compareArrays:compareArrays,comparePossiblyUndefinedValues:comparePossiblyUndefinedValues,dictionaryLength:dictionaryLength,dictionaryKeys:dictionaryKeys,dictionaryValues:dictionaryValues,group:group,iterItems:iterItems,mapItems:mapItems,iterObjectFieldsRecursively:iterObjectFieldsRecursively,identity:identity,findFirstIndexInArray:findFirstIndexInArray,findFirstInArray:findFirstInArray};});' [...]
-this.processAddedChild_(this.children[i]);this.childrenObserver_=new MutationObserver(this.childrenUpdated_.bind(this));this.childrenObserver_.observe(this,{childList:'true'});},get tabStripHeadingText(){return this.$.tsh.textContent;},set tabStripHeadingText(tabStripHeadingText){this.$.tsh.textContent=tabStripHeadingText;if(!!tabStripHeadingText)
-this.$.tshh.style.display='';else
-this.$.tshh.style.display='none';},get selectedTab(){this.childrenUpdated_(this.childrenObserver_.takeRecords(),this.childrenObserver_);if(this.selectedTab_)
-return this.selectedTab_.content;return undefined;},set selectedTab(content){this.childrenUpdated_(this.childrenObserver_.takeRecords(),this.childrenObserver_);if(content===undefined||content===null){this.changeSelectedTabById_(undefined);return;}
-var contentTabId=undefined;for(var i=0;i<this.tabs_.length;i++)
-if(this.tabs_[i].content===content){contentTabId=this.tabs_[i].id;break;}
-if(contentTabId===undefined){console.warn('Tab not in tabs list. Ignoring changed selection.');return;}
-this.changeSelectedTabById_(contentTabId);},get tabsHidden(){var ts=this.shadowRoot.querySelector('tab-strip');return ts.hasAttribute('tabs-hidden');},set tabsHidden(tabsHidden){tabsHidden=!!tabsHidden;var ts=this.shadowRoot.querySelector('tab-strip');if(tabsHidden)
-ts.setAttribute('tabs-hidden',true);else
-ts.removeAttribute('tabs-hidden');},processAddedChild_:function(child){var observerAttributeSelected=new MutationObserver(this.childAttributesChanged_.bind(this));var observerAttributeTabLabel=new MutationObserver(this.childAttributesChanged_.bind(this));var tabObject={id:this.tabs_.length,content:child,label:child.getAttribute('tab-label'),observers:{forAttributeSelected:observerAttributeSelected,forAttributeTabLabel:observerAttributeTabLabel},savedScrollTop:0,savedScrollLeft:0};this.ta [...]
-child.removeAttribute('selected');else
-this.setSelectedTabById_(tabObject.id);}
-var previousSelected=child.selected;var tabView=this;Object.defineProperty(child,'selected',{configurable:true,set:function(value){if(value){tabView.changeSelectedTabById_(tabObject.id);return;}
-var wasSelected=tabView.selectedTab_===tabObject;if(wasSelected)
-tabView.changeSelectedTabById_(undefined);},get:function(){return this.hasAttribute('selected');}});if(previousSelected)
-child.selected=previousSelected;observerAttributeSelected.observe(child,{attributeFilter:['selected']});observerAttributeTabLabel.observe(child,{attributeFilter:['tab-label']});},processRemovedChild_:function(child){for(var i=0;i<this.tabs_.length;i++){this.tabs_[i].id=i;if(this.tabs_[i].content===child){this.tabs_[i].observers.forAttributeSelected.disconnect();this.tabs_[i].observers.forAttributeTabLabel.disconnect();if(this.tabs_[i]===this.selectedTab_){this.clearSelectedTab_();this.fi [...]
-child.removeAttribute('selected');delete child.selected;this.tabs_.splice(i,1);i--;}}},childAttributesChanged_:function(mutations,observer){var tabObject=undefined;for(var i=0;i<this.tabs_.length;i++){var observers=this.tabs_[i].observers;if(observers.forAttributeSelected===observer||observers.forAttributeTabLabel===observer){tabObject=this.tabs_[i];break;}}
-if(!tabObject)
-return;for(var i=0;i<mutations.length;i++){var node=tabObject.content;if(mutations[i].attributeName==='tab-label')
-tabObject.label=node.getAttribute('tab-label');if(mutations[i].attributeName==='selected'){var nodeIsSelected=node.hasAttribute('selected');if(nodeIsSelected)
-this.changeSelectedTabById_(tabObject.id);else
-this.changeSelectedTabById_(undefined);}}},childrenUpdated_:function(mutations,observer){mutations.forEach(function(mutation){for(var i=0;i<mutation.removedNodes.length;i++)
-this.processRemovedChild_(mutation.removedNodes[i]);for(var i=0;i<mutation.addedNodes.length;i++)
-this.processAddedChild_(mutation.addedNodes[i]);},this);},tabButtonSelectHandler_:function(event,detail,sender){this.changeSelectedTabById_(sender.getAttribute('button-id'));},changeSelectedTabById_:function(id){var newTab=id!==undefined?this.tabs_[id]:undefined;var changed=this.selectedTab_!==newTab;this.saveCurrentTabScrollPosition_();this.clearSelectedTab_();if(id!==undefined){this.setSelectedTabById_(id);this.restoreCurrentTabScrollPosition_();}
-if(changed)
-this.fire('selected-tab-change');},setSelectedTabById_:function(id){this.selectedTab_=this.tabs_[id];this.selectedTab_.observers.forAttributeSelected.disconnect();this.selectedTab_.content.setAttribute('selected','selected');this.selectedTab_.observers.forAttributeSelected.observe(this.selectedTab_.content,{attributeFilter:['selected']});},saveCurrentTabScrollPosition_:function(){if(this.selectedTab_){this.selectedTab_.savedScrollTop=this.$['content-container'].scrollTop;this.selectedTab [...]
-EventTarget.decorate=function(target){for(var k in EventTarget.prototype){if(k=='decorate')
-continue;var v=EventTarget.prototype[k];if(typeof v!=='function')
-continue;target[k]=v;}};EventTarget.prototype={addEventListener:function(type,handler){if(!this.listeners_)
-this.listeners_=Object.create(null);if(!(type in this.listeners_)){this.listeners_[type]=[handler];}else{var handlers=this.listeners_[type];if(handlers.indexOf(handler)<0)
-handlers.push(handler);}},removeEventListener:function(type,handler){if(!this.listeners_)
-return;if(type in this.listeners_){var handlers=this.listeners_[type];var index=handlers.indexOf(handler);if(index>=0){if(handlers.length==1)
-delete this.listeners_[type];else
-handlers.splice(index,1);}}},dispatchEvent:function(event){if(!this.listeners_)
-return true;var self=this;event.__defineGetter__('target',function(){return self;});var realPreventDefault=event.preventDefault;event.preventDefault=function(){realPreventDefault.call(this);this.rawReturnValue=false;};var type=event.type;var prevented=0;if(type in this.listeners_){var handlers=this.listeners_[type].concat();for(var i=0,handler;handler=handlers[i];i++){if(handler.handleEvent)
-prevented|=handler.handleEvent.call(handler,event)===false;else
-prevented|=handler.call(this,event)===false;}}
-return!prevented&&event.rawReturnValue;},hasEventListener:function(type){return this.listeners_[type]!==undefined;}};var EventTargetHelper={decorate:function(target){for(var k in EventTargetHelper){if(k=='decorate')
-continue;var v=EventTargetHelper[k];if(typeof v!=='function')
-continue;target[k]=v;}
-target.listenerCounts_={};},addEventListener:function(type,listener,useCapture){this.__proto__.addEventListener.call(this,type,listener,useCapture);if(this.listenerCounts_[type]===undefined)
-this.listenerCounts_[type]=0;this.listenerCounts_[type]++;},removeEventListener:function(type,listener,useCapture){this.__proto__.removeEventListener.call(this,type,listener,useCapture);this.listenerCounts_[type]--;},hasEventListener:function(type){return this.listenerCounts_[type]>0;}};return{EventTarget:EventTarget,EventTargetHelper:EventTargetHelper};});'use strict';tr.exportTo('tr.b',function(){function Event(type,opt_bubbles,opt_preventable){var e=tr.doc.createEvent('Event');e.initE [...]
-return{Event:Event,dispatchSimpleEvent:dispatchSimpleEvent};});'use strict';tr.exportTo('tr.b',function(){var nextGUID=1;var GUID={allocate:function(){return nextGUID++;},getLastGuid:function(){return nextGUID-1;}};return{GUID:GUID};});'use strict';tr.exportTo('tr.b',function(){function Range(){this.isEmpty_=true;this.min_=undefined;this.max_=undefined;};Range.prototype={__proto__:Object.prototype,reset:function(){this.isEmpty_=true;this.min_=undefined;this.max_=undefined;},get isEmpty() [...]
-return;this.addValue(range.min);this.addValue(range.max);},addValue:function(value){if(this.isEmpty_){this.max_=value;this.min_=value;this.isEmpty_=false;return;}
-this.max_=Math.max(this.max_,value);this.min_=Math.min(this.min_,value);},set min(min){this.isEmpty_=false;this.min_=min;},get min(){if(this.isEmpty_)
-return undefined;return this.min_;},get max(){if(this.isEmpty_)
-return undefined;return this.max_;},set max(max){this.isEmpty_=false;this.max_=max;},get range(){if(this.isEmpty_)
-return undefined;return this.max_-this.min_;},get center(){return(this.min_+this.max_)*0.5;},equals:function(that){if(this.isEmpty&&that.isEmpty)
-return true;if(this.isEmpty!=that.isEmpty)
-return false;return this.min===that.min&&this.max===that.max;},containsRange:function(range){if(this.isEmpty||range.isEmpty)
-return false;return this.min<=range.min&&this.max>=range.max;},containsExplicitRange:function(min,max){if(this.isEmpty)
-return false;return this.min<=min&&this.max>=max;},intersectsRange:function(range){if(this.isEmpty||range.isEmpty)
-return false;return!(range.max<this.min||range.min>this.max);},intersectsExplicitRange:function(min,max){if(this.isEmpty)
-return false;return!(max<this.min||min>this.max);}};Range.fromExplicitRange=function(min,max){var range=new Range();range.min=min;range.max=max;return range;};Range.compareByMinTimes=function(a,b){if(!a.isEmpty&&!b.isEmpty)
-return a.min_-b.min_;if(a.isEmpty&&!b.isEmpty)
-return-1;if(!a.isEmpty&&b.isEmpty)
-return 1;return 0;};return{Range:Range};});'use strict';tr.exportTo('tr.b',function(){function max(a,b){if(a===undefined)
-return b;if(b===undefined)
-return a;return Math.max(a,b);}
-function IntervalTree(beginPositionCb,endPositionCb){this.beginPositionCb_=beginPositionCb;this.endPositionCb_=endPositionCb;this.root_=undefined;this.size_=0;}
-IntervalTree.prototype={insert:function(datum){var startPosition=this.beginPositionCb_(datum);var endPosition=this.endPositionCb_(datum);var node=new IntervalTreeNode(datum,startPosition,endPosition);this.size_++;this.root_=this.insertNode_(this.root_,node);this.root_.colour=Colour.BLACK;return datum;},insertNode_:function(root,node){if(root===undefined)
-return node;if(root.leftNode&&root.leftNode.isRed&&root.rightNode&&root.rightNode.isRed)
-this.flipNodeColour_(root);if(node.key<root.key)
-root.leftNode=this.insertNode_(root.leftNode,node);else if(node.key===root.key)
-root.merge(node);else
-root.rightNode=this.insertNode_(root.rightNode,node);if(root.rightNode&&root.rightNode.isRed&&(root.leftNode===undefined||!root.leftNode.isRed))
-root=this.rotateLeft_(root);if(root.leftNode&&root.leftNode.isRed&&root.leftNode.leftNode&&root.leftNode.leftNode.isRed)
-root=this.rotateRight_(root);return root;},rotateRight_:function(node){var sibling=node.leftNode;node.leftNode=sibling.rightNode;sibling.rightNode=node;sibling.colour=node.colour;node.colour=Colour.RED;return sibling;},rotateLeft_:function(node){var sibling=node.rightNode;node.rightNode=sibling.leftNode;sibling.leftNode=node;sibling.colour=node.colour;node.colour=Colour.RED;return sibling;},flipNodeColour_:function(node){node.colour=this.flipColour_(node.colour);node.leftNode.colour=this [...]
-return undefined;node.maxHighLeft=this.updateHighValues_(node.leftNode);node.maxHighRight=this.updateHighValues_(node.rightNode);return max(max(node.maxHighLeft,node.highValue),node.maxHighRight);},validateFindArguments_:function(queryLow,queryHigh){if(queryLow===undefined||queryHigh===undefined)
-throw new Error('queryLow and queryHigh must be defined');if((typeof queryLow!=='number')||(typeof queryHigh!=='number'))
-throw new Error('queryLow and queryHigh must be numbers');},findIntersection:function(queryLow,queryHigh){this.validateFindArguments_(queryLow,queryHigh);if(this.root_===undefined)
-return[];var ret=[];this.root_.appendIntersectionsInto_(ret,queryLow,queryHigh);return ret;},get size(){return this.size_;},get root(){return this.root_;},dump_:function(){if(this.root_===undefined)
-return[];return this.root_.dump();}};var Colour={RED:'red',BLACK:'black'};function IntervalTreeNode(datum,lowValue,highValue){this.lowValue_=lowValue;this.data_=[{datum:datum,high:highValue,low:lowValue}];this.colour_=Colour.RED;this.parentNode_=undefined;this.leftNode_=undefined;this.rightNode_=undefined;this.maxHighLeft_=undefined;this.maxHighRight_=undefined;}
-IntervalTreeNode.prototype={appendIntersectionsInto_:function(ret,queryLow,queryHigh){if(this.lowValue_>=queryHigh){if(!this.leftNode_)
-return;return this.leftNode_.appendIntersectionsInto_(ret,queryLow,queryHigh);}
-if(this.maxHighLeft_>queryLow){this.leftNode_.appendIntersectionsInto_(ret,queryLow,queryHigh);}
-if(this.highValue>queryLow){for(var i=(this.data.length-1);i>=0;--i){if(this.data[i].high<queryLow)
-break;ret.push(this.data[i].datum);}}
-if(this.rightNode_){this.rightNode_.appendIntersectionsInto_(ret,queryLow,queryHigh);}},get colour(){return this.colour_;},set colour(colour){this.colour_=colour;},get key(){return this.lowValue_;},get lowValue(){return this.lowValue_;},get highValue(){return this.data_[this.data_.length-1].high;},set leftNode(left){this.leftNode_=left;},get leftNode(){return this.leftNode_;},get hasLeftNode(){return this.leftNode_!==undefined;},set rightNode(right){this.rightNode_=right;},get rightNode( [...]
-this.data_.push(node.data[i]);this.data_.sort(function(a,b){return a.high-b.high;});},dump:function(){var ret={};if(this.leftNode_)
-ret['left']=this.leftNode_.dump();ret['data']=this.data_.map(function(d){return[d.low,d.high];});if(this.rightNode_)
-ret['right']=this.rightNode_.dump();return ret;}};return{IntervalTree:IntervalTree};});'use strict';tr.exportTo('tr.b',function(){function addSingletonGetter(ctor){ctor.getInstance=function(){return ctor.instance_||(ctor.instance_=new ctor());};}
-function normalizeException(e){if(typeof(e)=='string'){return{message:e,stack:['<unknown>']};}
-return{message:e.message,stack:e.stack?e.stack:['<unknown>']};}
-function stackTrace(){var stack=new Error().stack+'';stack=stack.split('\n');return stack.slice(2);}
-function getUsingPath(path,from_dict){var parts=path.split('.');var cur=from_dict;for(var part;parts.length&&(part=parts.shift());){if(!parts.length){return cur[part];}else if(part in cur){cur=cur[part];}else{return undefined;}}
-return undefined;}
-return{addSingletonGetter:addSingletonGetter,normalizeException:normalizeException,stackTrace:stackTrace,getUsingPath:getUsingPath};});'use strict';tr.exportTo('tr.b',function(){var recordRAFStacks=false;var pendingPreAFs=[];var pendingRAFs=[];var pendingIdleCallbacks=[];var currentRAFDispatchList=undefined;var rafScheduled=false;function scheduleRAF(){if(rafScheduled)
-return;rafScheduled=true;if(window.requestAnimationFrame){window.requestAnimationFrame(processRequests);}else{var delta=Date.now()-window.performance.now();window.webkitRequestAnimationFrame(function(domTimeStamp){processRequests(domTimeStamp-delta);});}}
-function onAnimationFrameError(e,opt_stack){if(opt_stack)
-console.log(opt_stack);if(e.message)
-console.error(e.message,e.stack);else
-console.error(e);}
-function runTask(task,frameBeginTime){try{task.callback.call(task.context,frameBeginTime);}catch(e){tr.b.onAnimationFrameError(e,task.stack);}}
-function processRequests(frameBeginTime){var rafCompletionDeadline=frameBeginTime+10;rafScheduled=false;var currentPreAFs=pendingPreAFs;currentRAFDispatchList=pendingRAFs;pendingPreAFs=[];pendingRAFs=[];var hasRAFTasks=currentPreAFs.length||currentRAFDispatchList.length;for(var i=0;i<currentPreAFs.length;i++)
-runTask(currentPreAFs[i],frameBeginTime);while(currentRAFDispatchList.length>0)
-runTask(currentRAFDispatchList.shift(),frameBeginTime);currentRAFDispatchList=undefined;if(!hasRAFTasks){while(pendingIdleCallbacks.length>0){runTask(pendingIdleCallbacks.shift());if(window.performance.now()>=rafCompletionDeadline)
-break;}}
-if(pendingIdleCallbacks.length>0)
-scheduleRAF();}
-function getStack_(){if(!recordRAFStacks)
-return'';var stackLines=tr.b.stackTrace();stackLines.shift();return stackLines.join('\n');}
-function requestPreAnimationFrame(callback,opt_this){pendingPreAFs.push({callback:callback,context:opt_this||window,stack:getStack_()});scheduleRAF();}
-function requestAnimationFrameInThisFrameIfPossible(callback,opt_this){if(!currentRAFDispatchList){requestAnimationFrame(callback,opt_this);return;}
-currentRAFDispatchList.push({callback:callback,context:opt_this||window,stack:getStack_()});return;}
-function requestAnimationFrame(callback,opt_this){pendingRAFs.push({callback:callback,context:opt_this||window,stack:getStack_()});scheduleRAF();}
-function requestIdleCallback(callback,opt_this){pendingIdleCallbacks.push({callback:callback,context:opt_this||window,stack:getStack_()});scheduleRAF();}
-function forcePendingRAFTasksToRun(frameBeginTime){if(!rafScheduled)
-return;processRequests(frameBeginTime);}
-return{onAnimationFrameError:onAnimationFrameError,requestPreAnimationFrame:requestPreAnimationFrame,requestAnimationFrame:requestAnimationFrame,requestAnimationFrameInThisFrameIfPossible:requestAnimationFrameInThisFrameIfPossible,requestIdleCallback:requestIdleCallback,forcePendingRAFTasksToRun:forcePendingRAFTasksToRun};});'use strict';tr.exportTo('tr.b',function(){function Task(runCb,thisArg){if(runCb!==undefined&&thisArg===undefined)
-throw new Error('Almost certainly, you meant to pass a thisArg.');this.runCb_=runCb;this.thisArg_=thisArg;this.afterTask_=undefined;this.subTasks_=[];}
-Task.prototype={subTask:function(cb,thisArg){if(cb instanceof Task)
-this.subTasks_.push(cb);else
-this.subTasks_.push(new Task(cb,thisArg));return this.subTasks_[this.subTasks_.length-1];},run:function(){if(this.runCb_!==undefined)
-this.runCb_.call(this.thisArg_,this);var subTasks=this.subTasks_;this.subTasks_=undefined;if(!subTasks.length)
-return this.afterTask_;for(var i=1;i<subTasks.length;i++)
-subTasks[i-1].afterTask_=subTasks[i];subTasks[subTasks.length-1].afterTask_=this.afterTask_;return subTasks[0];},after:function(cb,thisArg){if(this.afterTask_)
-throw new Error('Has an after task already');if(cb instanceof Task)
-this.afterTask_=cb;else
-this.afterTask_=new Task(cb,thisArg);return this.afterTask_;},enqueue:function(cb,thisArg){var lastTask=this;while(lastTask.afterTask_)
-lastTask=lastTask.afterTask_;return lastTask.after(cb,thisArg);}};Task.RunSynchronously=function(task){var curTask=task;while(curTask)
-curTask=curTask.run();}
-Task.RunWhenIdle=function(task){return new Promise(function(resolve,reject){var curTask=task;function runAnother(){try{curTask=curTask.run();}catch(e){reject(e);console.error(e.stack);return;}
-if(curTask){tr.b.requestIdleCallback(runAnother);return;}
-resolve();}
-tr.b.requestIdleCallback(runAnother);});}
-return{Task:Task};});'use strict';tr.exportTo('tr.b.units',function(){var ms={suffix:'ms',roundedLess:function(a,b){return Math.round(a*1000)<Math.round(b*1000);},format:function(ts){var tsRounded=Math.round(ts*1000.0)/1000.0;var n=new Number(tsRounded);return n.toLocaleString(undefined,{minimumFractionDigits:3})+' ms';}};var ns={suffix:'ns',roundedLess:function(a,b){return Math.round(a*1000000)<Math.round(b*1000000);},format:function(ts){var tsRounded=Math.round(ts*1000000.0);var n=new  [...]
-return;this.currentDisplayUnit_=value;this.dispatchEvent(new Event('display-unit-changed'));},timestampFromUs:function(us){return us/1000;},maybeTimestampFromUs:function(us){return us===undefined?undefined:us/1000;}};tr.b.EventTarget.decorate(Time);return{Time:Time};});'use strict';tr.exportTo('tr.b',function(){function dispatchPropertyChange(target,propertyName,newValue,oldValue,opt_bubbles,opt_cancelable){var e=new tr.b.Event(propertyName+'Change',opt_bubbles,opt_cancelable);e.property [...]
-throw error;}
-function setPropertyAndDispatchChange(obj,propertyName,newValue){var privateName=propertyName+'_';var oldValue=obj[propertyName];obj[privateName]=newValue;if(oldValue!==newValue)
-tr.b.dispatchPropertyChange(obj,propertyName,newValue,oldValue,true,false);}
-function getAttributeName(jsName){return jsName.replace(/([A-Z])/g,'-$1').toLowerCase();}
-function getPrivateName(name){return name+'_tr_';}
-var PropertyKind={JS:'js',ATTR:'attr',BOOL_ATTR:'boolAttr'};function getGetter(name,kind){switch(kind){case PropertyKind.JS:var privateName=getPrivateName(name);return function(){return this[privateName];};case PropertyKind.ATTR:var attributeName=getAttributeName(name);return function(){return this.getAttribute(attributeName);};case PropertyKind.BOOL_ATTR:var attributeName=getAttributeName(name);return function(){return this.hasAttribute(attributeName);};}}
-function getSetter(name,kind,opt_setHook,opt_bubbles,opt_cancelable){switch(kind){case PropertyKind.JS:var privateName=getPrivateName(name);return function(value){var oldValue=this[privateName];if(value!==oldValue){this[privateName]=value;if(opt_setHook)
-opt_setHook.call(this,value,oldValue);dispatchPropertyChange(this,name,value,oldValue,opt_bubbles,opt_cancelable);}};case PropertyKind.ATTR:var attributeName=getAttributeName(name);return function(value){var oldValue=this.getAttribute(attributeName);if(value!==oldValue){if(value==undefined)
-this.removeAttribute(attributeName);else
-this.setAttribute(attributeName,value);if(opt_setHook)
-opt_setHook.call(this,value,oldValue);dispatchPropertyChange(this,name,value,oldValue,opt_bubbles,opt_cancelable);}};case PropertyKind.BOOL_ATTR:var attributeName=getAttributeName(name);return function(value){var oldValue=(this.getAttribute(attributeName)===name);if(value!==oldValue){if(value)
-this.setAttribute(attributeName,name);else
-this.removeAttribute(attributeName);if(opt_setHook)
-opt_setHook.call(this,value,oldValue);dispatchPropertyChange(this,name,value,oldValue,opt_bubbles,opt_cancelable);}};}}
-function defineProperty(obj,name,opt_kind,opt_setHook,opt_bubbles,opt_cancelable){console.error("Don't use tr.b.defineProperty");if(typeof obj=='function')
-obj=obj.prototype;var kind=opt_kind||PropertyKind.JS;if(!obj.__lookupGetter__(name))
-obj.__defineGetter__(name,getGetter(name,kind));if(!obj.__lookupSetter__(name))
-obj.__defineSetter__(name,getSetter(name,kind,opt_setHook,opt_bubbles,opt_cancelable));}
-return{PropertyKind:PropertyKind,defineProperty:defineProperty,dispatchPropertyChange:dispatchPropertyChange,setPropertyAndDispatchChange:setPropertyAndDispatchChange};});'use strict';tr.exportTo('tr.ui.b',function(){function decorate(source,constr){var elements;if(typeof source=='string')
-elements=tr.doc.querySelectorAll(source);else
-elements=[source];for(var i=0,el;el=elements[i];i++){if(!(el instanceof constr))
-constr.decorate(el);}}
-function define(className,opt_parentConstructor,opt_tagNS){if(typeof className=='function'){throw new Error('Passing functions as className is deprecated. Please '+'use (className, opt_parentConstructor) to subclass');}
-var className=className.toLowerCase();if(opt_parentConstructor&&!opt_parentConstructor.tagName)
-throw new Error('opt_parentConstructor was not '+'created by tr.ui.b.define');var tagName=className;var tagNS=undefined;if(opt_parentConstructor){if(opt_tagNS)
-throw new Error('Must not specify tagNS if parentConstructor is given');var parent=opt_parentConstructor;while(parent&&parent.tagName){tagName=parent.tagName;tagNS=parent.tagNS;parent=parent.parentConstructor;}}else{tagNS=opt_tagNS;}
-function f(){if(opt_parentConstructor&&f.prototype.__proto__!=opt_parentConstructor.prototype){throw new Error(className+' prototye\'s __proto__ field is messed up. '+'It MUST be the prototype of '+opt_parentConstructor.tagName);}
-var el;if(tagNS===undefined)
-el=tr.doc.createElement(tagName);else
-el=tr.doc.createElementNS(tagNS,tagName);f.decorate.call(this,el,arguments);return el;}
-f.decorate=function(el){el.__proto__=f.prototype;el.decorate.apply(el,arguments[1]);el.constructor=f;};f.className=className;f.tagName=tagName;f.tagNS=tagNS;f.parentConstructor=(opt_parentConstructor?opt_parentConstructor:undefined);f.toString=function(){if(!f.parentConstructor)
-return f.tagName;return f.parentConstructor.toString()+'::'+f.className;};return f;}
-function elementIsChildOf(el,potentialParent){if(el==potentialParent)
-return false;var cur=el;while(cur.parentNode){if(cur==potentialParent)
-return true;cur=cur.parentNode;}
-return false;};return{decorate:decorate,define:define,elementIsChildOf:elementIsChildOf};});(function(){"use strict";var e={};typeof exports=="undefined"?typeof define=="function"&&typeof define.amd=="object"&&define.amd?(e.exports={},define(function(){return e.exports})):e.exports=window:e.exports=exports,function(e){if(!t)var t=1e-6;if(!n)var n=typeof Float32Array!="undefined"?Float32Array:Array;var r={};r.setMatrixArrayType=function(e){n=e},typeof e!="undefined"&&(e.glMatrix=r);var i= [...]
-function lerp(percentage,lo,hi){var range=hi-lo;return lo+percentage*range;}
-function normalize(value,lo,hi){return(value-lo)/(hi-lo);}
-function deg2rad(deg){return(Math.PI*deg)/180.0;}
-var tmp_vec2=vec2.create();var tmp_vec2b=vec2.create();var tmp_vec4=vec4.create();var tmp_mat2d=mat2d.create();vec2.createFromArray=function(arr){if(arr.length!=2)
-throw new Error('Should be length 2');var v=vec2.create();vec2.set(v,arr[0],arr[1]);return v;};vec2.createXY=function(x,y){var v=vec2.create();vec2.set(v,x,y);return v;};vec2.toString=function(a){return'['+a[0]+', '+a[1]+']';};vec2.addTwoScaledUnitVectors=function(out,u1,scale1,u2,scale2){vec2.scale(tmp_vec2,u1,scale1);vec2.scale(tmp_vec2b,u2,scale2);vec2.add(out,tmp_vec2,tmp_vec2b);};vec2.interpolatePiecewiseFunction=function(points,x){if(x<points[0][0])
-return points[0][1];for(var i=1;i<points.length;++i){if(x<points[i][0]){var percent=normalize(x,points[i-1][0],points[i][0]);return lerp(percent,points[i-1][1],points[i][1]);}}
-return points[points.length-1][1];};vec3.createXYZ=function(x,y,z){var v=vec3.create();vec3.set(v,x,y,z);return v;};vec3.toString=function(a){return'vec3('+a[0]+', '+a[1]+', '+a[2]+')';}
-mat2d.translateXY=function(out,x,y){vec2.set(tmp_vec2,x,y);mat2d.translate(out,out,tmp_vec2);}
-mat2d.scaleXY=function(out,x,y){vec2.set(tmp_vec2,x,y);mat2d.scale(out,out,tmp_vec2);}
-vec4.unitize=function(out,a){out[0]=a[0]/a[3];out[1]=a[1]/a[3];out[2]=a[2]/a[3];out[3]=1;return out;}
-vec2.copyFromVec4=function(out,a){vec4.unitize(tmp_vec4,a);vec2.copy(out,tmp_vec4);}
-return{clamp:clamp,lerp:lerp,normalize:normalize,deg2rad:deg2rad};});'use strict';tr.exportTo('tr.b',function(){function Rect(){this.x=0;this.y=0;this.width=0;this.height=0;};Rect.fromXYWH=function(x,y,w,h){var rect=new Rect();rect.x=x;rect.y=y;rect.width=w;rect.height=h;return rect;}
-Rect.fromArray=function(ary){if(ary.length!=4)
-throw new Error('ary.length must be 4');var rect=new Rect();rect.x=ary[0];rect.y=ary[1];rect.width=ary[2];rect.height=ary[3];return rect;}
-Rect.prototype={__proto__:Object.prototype,get left(){return this.x;},get top(){return this.y;},get right(){return this.x+this.width;},get bottom(){return this.y+this.height;},toString:function(){return'Rect('+this.x+', '+this.y+', '+
-this.width+', '+this.height+')';},toArray:function(){return[this.x,this.y,this.width,this.height];},clone:function(){var rect=new Rect();rect.x=this.x;rect.y=this.y;rect.width=this.width;rect.height=this.height;return rect;},enlarge:function(pad){var rect=new Rect();this.enlargeFast(rect,pad);return rect;},enlargeFast:function(out,pad){out.x=this.x-pad;out.y=this.y-pad;out.width=this.width+2*pad;out.height=this.height+2*pad;return out;},size:function(){return{width:this.width,height:this [...]
-throw new Error('Element not found');return el.createInstance();}
-function windowRectForElement(element){var position=[element.offsetLeft,element.offsetTop];var size=[element.offsetWidth,element.offsetHeight];var node=element.offsetParent;while(node){position[0]+=node.offsetLeft;position[1]+=node.offsetTop;node=node.offsetParent;}
-return tr.b.Rect.fromXYWH(position[0],position[1],size[0],size[1]);}
-function scrollIntoViewIfNeeded(el){var pr=el.parentElement.getBoundingClientRect();var cr=el.getBoundingClientRect();if(cr.top<pr.top){el.scrollIntoView(true);}else if(cr.bottom>pr.bottom){el.scrollIntoView(false);}}
-return{instantiateTemplate:instantiateTemplate,windowRectForElement:windowRectForElement,scrollIntoViewIfNeeded:scrollIntoViewIfNeeded};});'use strict';tr.exportTo('tr.ui.b',function(){var THIS_DOC=document.currentScript.ownerDocument;var Overlay=tr.ui.b.define('overlay');Overlay.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.classList.add('overlay');this.parentEl_=this.ownerDocument.body;this.visible_=false;this.userCanClose_=true;this.onKeyDown_=this.onKeyDown_. [...]
-return;tr.b.setPropertyAndDispatchChange(this,'visible',newValue);},onVisibleChange_:function(){this.visible_?this.show_():this.hide_();},show_:function(){this.parentEl_.appendChild(this);if(this.userCanClose_){this.addEventListener('keydown',this.onKeyDown_.bind(this));this.addEventListener('click',this.onDocumentClick_.bind(this));}
-this.parentEl_.addEventListener('focusin',this.onFocusIn_);this.tabIndex=0;var focusEl=undefined;var elList=this.querySelectorAll('button, input, list, select, a');if(elList.length>0){if(elList[0]===this.closeBtn_){if(elList.length>1)
-focusEl=elList[1];}else{focusEl=elList[0];}}
-if(focusEl===undefined)
-focusEl=this;focusEl.focus();},hide_:function(){this.parentEl_.removeChild(this);this.parentEl_.removeEventListener('focusin',this.onFocusIn_);if(this.closeBtn_)
-this.closeBtn_.removeEventListener(this.onClose_);document.removeEventListener('keydown',this.onKeyDown_);document.removeEventListener('click',this.onDocumentClick_);},onClose_:function(e){this.visible=false;if((e.type!='keydown')||(e.type==='keydown'&&e.keyCode===27))
-e.stopPropagation();e.preventDefault();tr.b.dispatchSimpleEvent(this,'closeclick');},onFocusIn_:function(e){if(e.target===this)
-return;window.setTimeout(function(){this.focus();},0);e.preventDefault();e.stopPropagation();},didButtonBarMutate_:function(e){var hasButtons=this.buttons.children.length>0;if(hasButtons)
-this.shadow_.querySelector('button-bar').style.display=undefined;else
-this.shadow_.querySelector('button-bar').style.display='none';},onKeyDown_:function(e){if(e.keyCode===9&&e.shiftKey&&e.target===this){e.preventDefault();return;}
-if(e.keyCode!==27)
-return;this.onClose_(e);},onClick_:function(e){e.stopPropagation();},onDocumentClick_:function(e){if(!this.userCanClose_)
-return;this.onClose_(e);}};Overlay.showError=function(msg,opt_err){var o=new Overlay();o.title='Error';o.textContent=msg;if(opt_err){var e=tr.b.normalizeException(opt_err);var stackDiv=document.createElement('pre');stackDiv.textContent=e.stack;stackDiv.style.paddingLeft='8px';stackDiv.style.margin=0;o.appendChild(stackDiv);}
-var b=document.createElement('button');b.textContent='OK';b.addEventListener('click',function(){o.visible=false;});o.buttons.appendChild(b);o.visible=true;return o;}
-return{Overlay:Overlay};});'use strict';tr.exportTo('tr.c',function(){function matchLower(value,pattern){return value.toLowerCase().indexOf(pattern)!==-1;}
-function Filter(){}
-Filter.prototype={__proto__:Object.prototype,matchCounter:function(counter){return true;},matchCpu:function(cpu){return true;},matchProcess:function(process){return true;},matchSlice:function(slice){return true;},matchThread:function(thread){return true;}};function TitleOrCategoryFilter(text){Filter.call(this);this.text_=text.toLowerCase();if(!text.length)
-throw new Error('Filter text is empty.');}
-TitleOrCategoryFilter.prototype={__proto__:Filter.prototype,matchSlice:function(slice){if(slice.title===undefined&&slice.category===undefined)
-return false;return matchLower(slice.title,this.text_)||(!!slice.category&&matchLower(slice.category,this.text_));}};function ExactTitleFilter(text){Filter.call(this);this.text_=text;if(!text.length)
-throw new Error('Filter text is empty.');}
-ExactTitleFilter.prototype={__proto__:Filter.prototype,matchSlice:function(slice){return slice.title===this.text_;}};return{Filter:Filter,TitleOrCategoryFilter:TitleOrCategoryFilter,ExactTitleFilter:ExactTitleFilter};});'use strict';tr.exportTo('tr.b',function(){function RegisteredTypeInfo(constructor,metadata){this.constructor=constructor;this.metadata=metadata;};var BASIC_REGISTRY_MODE='BASIC_REGISTRY_MODE';var TYPE_BASED_REGISTRY_MODE='TYPE_BASED_REGISTRY_MODE';var ALL_MODES={BASIC_RE [...]
-throw new Error('Mode is required');if(!ALL_MODES[mode])
-throw new Error('Not a mode.');this.mode_=mode;this.defaultMetadata_={};this.defaultConstructor_=undefined;this.mandatoryBaseClass_=undefined;this.defaultTypeInfo_=undefined;this.frozen_=false;}
-ExtensionRegistryOptions.prototype={freeze:function(){if(this.frozen_)
-throw new Error('Frozen');this.frozen_=true;},get mode(){return this.mode_;},get defaultMetadata(){return this.defaultMetadata_;},set defaultMetadata(defaultMetadata){if(this.frozen_)
-throw new Error('Frozen');this.defaultMetadata_=defaultMetadata;this.defaultTypeInfo_=undefined;},get defaultConstructor(){return this.defaultConstructor_;},set defaultConstructor(defaultConstructor){if(this.frozen_)
-throw new Error('Frozen');this.defaultConstructor_=defaultConstructor;this.defaultTypeInfo_=undefined;},get defaultTypeInfo(){if(this.defaultTypeInfo_===undefined&&this.defaultConstructor_){this.defaultTypeInfo_=new RegisteredTypeInfo(this.defaultConstructor,this.defaultMetadata);}
-return this.defaultTypeInfo_;},validateConstructor:function(constructor){if(!this.mandatoryBaseClass)
-return;var curProto=constructor.prototype.__proto__;var ok=false;while(curProto){if(curProto===this.mandatoryBaseClass.prototype){ok=true;break;}
-curProto=curProto.__proto__;}
-if(!ok)
-throw new Error(constructor+'must be subclass of '+registry);}};return{BASIC_REGISTRY_MODE:BASIC_REGISTRY_MODE,TYPE_BASED_REGISTRY_MODE:TYPE_BASED_REGISTRY_MODE,ExtensionRegistryOptions:ExtensionRegistryOptions,RegisteredTypeInfo:RegisteredTypeInfo};});'use strict';tr.exportTo('tr.b',function(){var RegisteredTypeInfo=tr.b.RegisteredTypeInfo;var ExtensionRegistryOptions=tr.b.ExtensionRegistryOptions;function decorateBasicExtensionRegistry(registry,extensionRegistryOptions){var savedStateS [...]
-throw new Error('Handler already registered for '+constructor);extensionRegistryOptions.validateConstructor(constructor);var metadata={};for(var k in extensionRegistryOptions.defaultMetadata)
-metadata[k]=extensionRegistryOptions.defaultMetadata[k];if(opt_metadata){for(var k in opt_metadata)
-metadata[k]=opt_metadata[k];}
-var typeInfo=new RegisteredTypeInfo(constructor,metadata);var e=new tr.b.Event('will-register');e.typeInfo=typeInfo;registry.dispatchEvent(e);registry.registeredTypeInfos_.push(typeInfo);e=new tr.b.Event('registry-changed');registry.dispatchEvent(e);};registry.pushCleanStateBeforeTest=function(){savedStateStack.push(registry.registeredTypeInfos_);registry.registeredTypeInfos_=[];var e=new tr.b.Event('registry-changed');registry.dispatchEvent(e);};registry.popCleanStateAfterTest=function( [...]
-if(registry.registeredTypeInfos_[i].constructor==constructor)
-return i;return undefined;};registry.unregister=function(constructor){var foundIndex=registry.findIndexOfRegisteredConstructor(constructor);if(foundIndex===undefined)
-throw new Error(constructor+' not registered');registry.registeredTypeInfos_.splice(foundIndex,1);var e=new tr.b.Event('registry-changed');registry.dispatchEvent(e);};registry.getAllRegisteredTypeInfos=function(){return registry.registeredTypeInfos_;};registry.findTypeInfo=function(constructor){var foundIndex=this.findIndexOfRegisteredConstructor(constructor);if(foundIndex!==undefined)
-return this.registeredTypeInfos_[foundIndex];return undefined;};registry.findTypeInfoMatching=function(predicate,opt_this){opt_this=opt_this?opt_this:undefined;for(var i=0;i<registry.registeredTypeInfos_.length;++i){var typeInfo=registry.registeredTypeInfos_[i];if(predicate.call(opt_this,typeInfo))
-return typeInfo;}
-return extensionRegistryOptions.defaultTypeInfo;};}
-return{_decorateBasicExtensionRegistry:decorateBasicExtensionRegistry};});'use strict';tr.exportTo('tr.b',function(){var categoryPartsFor={};function getCategoryParts(category){var parts=categoryPartsFor[category];if(parts!==undefined)
-return parts;parts=category.split(',');categoryPartsFor[category]=parts;return parts;}
-return{getCategoryParts:getCategoryParts};});'use strict';tr.exportTo('tr.b',function(){var getCategoryParts=tr.b.getCategoryParts;var RegisteredTypeInfo=tr.b.RegisteredTypeInfo;var ExtensionRegistryOptions=tr.b.ExtensionRegistryOptions;function decorateTypeBasedExtensionRegistry(registry,extensionRegistryOptions){var savedStateStack=[];registry.registeredTypeInfos_=[];registry.categoryPartToTypeInfoMap_={};registry.typeNameToTypeInfoMap_={};registry.register=function(constructor,metadat [...]
-typeInfo.typeNames.push(metadata.typeName);if(metadata&&metadata.typeNames){typeInfo.typeNames.push.apply(typeInfo.typeNames,metadata.typeNames);}
-if(metadata&&metadata.categoryParts){typeInfo.categoryParts.push.apply(typeInfo.categoryParts,metadata.categoryParts);}
-if(typeInfo.typeNames.length===0&&typeInfo.categoryParts.length===0)
-throw new Error('typeName or typeNames must be provided');typeInfo.typeNames.forEach(function(typeName){if(registry.typeNameToTypeInfoMap_[typeName])
-throw new Error('typeName '+typeName+' already registered');});typeInfo.categoryParts.forEach(function(categoryPart){if(registry.categoryPartToTypeInfoMap_[categoryPart]){throw new Error('categoryPart '+categoryPart+' already registered');}});var e=new tr.b.Event('will-register');e.typeInfo=typeInfo;registry.dispatchEvent(e);typeInfo.typeNames.forEach(function(typeName){registry.typeNameToTypeInfoMap_[typeName]=typeInfo;});typeInfo.categoryParts.forEach(function(categoryPart){registry.ca [...]
-if(typeInfoIndex===-1)
-throw new Error(constructor+' not registered');var typeInfo=registry.registeredTypeInfos_[typeInfoIndex];registry.registeredTypeInfos_.splice(typeInfoIndex,1);typeInfo.typeNames.forEach(function(typeName){delete registry.typeNameToTypeInfoMap_[typeName];});typeInfo.categoryParts.forEach(function(categoryPart){delete registry.categoryPartToTypeInfoMap_[categoryPart];});var e=new tr.b.Event('registry-changed');registry.dispatchEvent(e);};registry.getTypeInfo=function(category,typeName){if( [...]
-return registry.categoryPartToTypeInfoMap_[categoryPart];}}
-if(registry.typeNameToTypeInfoMap_[typeName])
-return registry.typeNameToTypeInfoMap_[typeName];return extensionRegistryOptions.defaultTypeInfo;};registry.getConstructor=function(category,typeName){var typeInfo=registry.getTypeInfo(category,typeName);if(typeInfo)
-return typeInfo.constructor;return undefined;};}
-return{_decorateTypeBasedExtensionRegistry:decorateTypeBasedExtensionRegistry};});'use strict';tr.exportTo('tr.b',function(){function decorateExtensionRegistry(registry,registryOptions){if(registry.register)
-throw new Error('Already has registry');registryOptions.freeze();if(registryOptions.mode==tr.b.BASIC_REGISTRY_MODE){tr.b._decorateBasicExtensionRegistry(registry,registryOptions);}else if(registryOptions.mode==tr.b.TYPE_BASED_REGISTRY_MODE){tr.b._decorateTypeBasedExtensionRegistry(registry,registryOptions);}else{throw new Error('Unrecognized mode');}
-if(registry.addEventListener===undefined)
-tr.b.EventTarget.decorate(registry);}
-return{decorateExtensionRegistry:decorateExtensionRegistry};});'use strict';tr.exportTo('tr.c',function(){function Auditor(model){}
-Auditor.prototype={__proto__:Object.prototype,runAnnotate:function(){},runAudit:function(){}};var options=new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);options.defaultMetadata={};options.mandatoryBaseClass=Auditor;tr.b.decorateExtensionRegistry(Auditor,options);return{Auditor:Auditor};});'use strict';tr.exportTo('tr.importer',function(){function Importer(){}
-Importer.prototype={__proto__:Object.prototype,isTraceDataContainer:function(){return false;},extractSubtraces:function(){return[];},importEvents:function(){},importSampleData:function(){},finalizeImport:function(){},joinRefs:function(){}};var options=new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);options.defaultMetadata={};options.mandatoryBaseClass=Importer;tr.b.decorateExtensionRegistry(Importer,options);Importer.findImporterFor=function(eventData){var typeInfo=Importer.f [...]
-return typeInfo.constructor;return undefined;};return{Importer:Importer};});'use strict';tr.exportTo('tr.importer',function(){var Importer=tr.importer.Importer;function EmptyImporter(events){this.importPriority=0;};EmptyImporter.canImport=function(eventData){if(eventData instanceof Array&&eventData.length==0)
-return true;if(typeof(eventData)==='string'||eventData instanceof String){return eventData.length==0;}
-return false;};EmptyImporter.prototype={__proto__:Importer.prototype};Importer.register(EmptyImporter);return{EmptyImporter:EmptyImporter};});'use strict';tr.exportTo('tr.model',function(){function EventContainer(){this.important=true;this.bounds=undefined;}
-EventContainer.prototype={get stableId(){throw new Error('Not implemented');},updateBounds:function(){throw new Error('Not implemented');},shiftTimestampsForward:function(amount){throw new Error('Not implemented');},iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){throw new Error('Not implemented');},iterateAllChildEventContainers:function(callback,opt_this){throw new Error('Not implemented');},iterateAllEvents:function(callback,opt_this){this.iterateAllEven [...]
-visit(this);}};return{EventContainer:EventContainer};});'use strict';tr.exportTo('tr.model',function(){function Device(model){if(!model)
-throw new Error('Must provide a model.');tr.model.EventContainer.call(this);this.bounds=new tr.b.Range();this.guid=tr.b.GUID.allocate();};Device.compare=function(x,y){return x.guid-y.guid;};Device.prototype={__proto__:tr.model.EventContainer.prototype,compareTo:function(that){return Device.compare(this,that);},get userFriendlyName(){return'Device';},get userFriendlyDetails(){return'Device';},get stableId(){return'Device';},getSettingsKey:function(){return'device';},get counters(){return{ [...]
-SelectableItem.prototype={get modelItem(){return this.modelItem_;},get selected(){return this.selectionState===SelectionState.SELECTED;},addToSelection:function(selection){var modelItem=this.modelItem_;if(!modelItem)
-return;selection.push(modelItem);},addToTrackMap:function(eventToTrackMap,track){var modelItem=this.modelItem_;if(!modelItem)
-return;eventToTrackMap.addEvent(modelItem,track);}};return{SelectableItem:SelectableItem};});'use strict';tr.exportTo('tr.model',function(){var SelectableItem=tr.model.SelectableItem;var SelectionState=tr.model.SelectionState;var categoryPartsFor={};function getCategoryParts(category){var parts=categoryPartsFor[category];if(parts!==undefined)
-return parts;parts=category.split(',');categoryPartsFor[category]=parts;return parts;}
-function Event(){SelectableItem.call(this,this);this.guid_=tr.b.GUID.allocate();this.selectionState=SelectionState.NONE;this.associatedAlerts=new tr.c.Selection();this.info=undefined;}
-Event.prototype={__proto__:SelectableItem.prototype,get guid(){return this.guid_;}};function EventRegistry(){}
-var options=new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);options.mandatoryBaseType=Event;tr.b.decorateExtensionRegistry(EventRegistry,options);EventRegistry.addEventListener('will-register',function(e){var metadata=e.typeInfo.metadata;if(metadata.name===undefined)
-throw new Error('Registered events must provide name metadata');var i=tr.b.findFirstInArray(EventRegistry.getAllRegisteredTypeInfos(),function(x){return x.metadata.name===metadata.name;});if(i!==undefined)
-throw new Error('Event type with that name already registered');if(metadata.pluralName===undefined)
-throw new Error('Registered events must provide pluralName metadata');if(metadata.singleViewElementName===undefined){throw new Error('Registered events must provide '+'singleViewElementName metadata');}
-if(metadata.multiViewElementName===undefined){throw new Error('Registered events must provide '+'multiViewElementName metadata');}});var eventsByTypeName=undefined;EventRegistry.getEventTypeInfoByTypeName=function(typeName){if(eventsByTypeName===undefined){eventsByTypeName={};EventRegistry.getAllRegisteredTypeInfos().forEach(function(typeInfo){eventsByTypeName[typeInfo.metadata.name]=typeInfo;});}
-return eventsByTypeName[typeName];}
-EventRegistry.addEventListener('registry-changed',function(){eventsByTypeName=undefined;});function convertCamelCaseToTitleCase(name){var result=name.replace(/[A-Z]/g,' $&');result=result.charAt(0).toUpperCase()+result.slice(1);return result;}
-EventRegistry.getUserFriendlySingularName=function(typeName){var typeInfo=EventRegistry.getEventTypeInfoByTypeName(typeName);var str=typeInfo.metadata.name;return convertCamelCaseToTitleCase(str);};EventRegistry.getUserFriendlyPluralName=function(typeName){var typeInfo=EventRegistry.getEventTypeInfoByTypeName(typeName);var str=typeInfo.metadata.pluralName;return convertCamelCaseToTitleCase(str);};return{Event:Event,EventRegistry:EventRegistry};});'use strict';tr.exportTo('tr.b.units',fun [...]
-return{tsString:tsString};});'use strict';tr.exportTo('tr.b',function(){function findLowIndexInSortedArray(ary,mapFn,loVal){if(ary.length==0)
-return 1;var low=0;var high=ary.length-1;var i,comparison;var hitPos=-1;while(low<=high){i=Math.floor((low+high)/2);comparison=mapFn(ary[i])-loVal;if(comparison<0){low=i+1;continue;}else if(comparison>0){high=i-1;continue;}else{hitPos=i;high=i-1;}}
-return hitPos!=-1?hitPos:low;}
-function findIndexInSortedIntervals(ary,mapLoFn,mapWidthFn,loVal){var first=findLowIndexInSortedArray(ary,mapLoFn,loVal);if(first==0){if(loVal>=mapLoFn(ary[0])&&loVal<mapLoFn(ary[0])+mapWidthFn(ary[0],0)){return 0;}else{return-1;}}else if(first<ary.length){if(loVal>=mapLoFn(ary[first])&&loVal<mapLoFn(ary[first])+mapWidthFn(ary[first],first)){return first;}else if(loVal>=mapLoFn(ary[first-1])&&loVal<mapLoFn(ary[first-1])+
-mapWidthFn(ary[first-1],first-1)){return first-1;}else{return ary.length;}}else if(first==ary.length){if(loVal>=mapLoFn(ary[first-1])&&loVal<mapLoFn(ary[first-1])+
-mapWidthFn(ary[first-1],first-1)){return first-1;}else{return ary.length;}}else{return ary.length;}}
-function findIndexInSortedClosedIntervals(ary,mapLoFn,mapHiFn,val){var i=findLowIndexInSortedArray(ary,mapLoFn,val);if(i===0){if(val>=mapLoFn(ary[0],0)&&val<=mapHiFn(ary[0],0)){return 0;}else{return-1;}}else if(i<ary.length){if(val>=mapLoFn(ary[i-1],i-1)&&val<=mapHiFn(ary[i-1],i-1)){return i-1;}else if(val>=mapLoFn(ary[i],i)&&val<=mapHiFn(ary[i],i)){return i;}else{return ary.length;}}else if(i==ary.length){if(val>=mapLoFn(ary[i-1],i-1)&&val<=mapHiFn(ary[i-1],i-1)){return i-1;}else{return [...]
-function iterateOverIntersectingIntervals(ary,mapLoFn,mapWidthFn,loVal,hiVal,cb){if(ary.length==0)
-return;if(loVal>hiVal)return;var i=findLowIndexInSortedArray(ary,mapLoFn,loVal);if(i==-1){return;}
-if(i>0){var hi=mapLoFn(ary[i-1])+mapWidthFn(ary[i-1],i-1);if(hi>=loVal){cb(ary[i-1],i-1);}}
-if(i==ary.length){return;}
-for(var n=ary.length;i<n;i++){var lo=mapLoFn(ary[i]);if(lo>=hiVal)
-break;cb(ary[i],i);}}
-function getIntersectingIntervals(ary,mapLoFn,mapWidthFn,loVal,hiVal){var tmp=[];iterateOverIntersectingIntervals(ary,mapLoFn,mapWidthFn,loVal,hiVal,function(d){tmp.push(d);});return tmp;}
-function findClosestElementInSortedArray(ary,mapFn,val,maxDiff){if(ary.length===0)
-return null;var aftIdx=findLowIndexInSortedArray(ary,mapFn,val);var befIdx=aftIdx>0?aftIdx-1:0;if(aftIdx===ary.length)
-aftIdx-=1;var befDiff=Math.abs(val-mapFn(ary[befIdx]));var aftDiff=Math.abs(val-mapFn(ary[aftIdx]));if(befDiff>maxDiff&&aftDiff>maxDiff)
-return null;var idx=befDiff<aftDiff?befIdx:aftIdx;return ary[idx];}
-function findClosestIntervalInSortedIntervals(ary,mapLoFn,mapHiFn,val,maxDiff){if(ary.length===0)
-return null;var idx=findLowIndexInSortedArray(ary,mapLoFn,val);if(idx>0)
-idx-=1;var hiInt=ary[idx];var loInt=hiInt;if(val>mapHiFn(hiInt)&&idx+1<ary.length)
-loInt=ary[idx+1];var loDiff=Math.abs(val-mapLoFn(loInt));var hiDiff=Math.abs(val-mapHiFn(hiInt));if(loDiff>maxDiff&&hiDiff>maxDiff)
-return null;if(loDiff<hiDiff)
-return loInt;else
-return hiInt;}
-return{findLowIndexInSortedArray:findLowIndexInSortedArray,findIndexInSortedIntervals:findIndexInSortedIntervals,findIndexInSortedClosedIntervals:findIndexInSortedClosedIntervals,iterateOverIntersectingIntervals:iterateOverIntersectingIntervals,getIntersectingIntervals:getIntersectingIntervals,findClosestElementInSortedArray:findClosestElementInSortedArray,findClosestIntervalInSortedIntervals:findClosestIntervalInSortedIntervals};});'use strict';tr.exportTo('tr.model',function(){function [...]
-CounterSample.groupByTimestamp=function(samples){var samplesByTimestamp=tr.b.group(samples,function(sample){return sample.timestamp;});var timestamps=tr.b.dictionaryKeys(samplesByTimestamp);timestamps.sort();var groups=[];for(var i=0;i<timestamps.length;i++){var ts=timestamps[i];var group=samplesByTimestamp[ts];group.sort(function(x,y){return x.series.seriesIndex-y.series.seriesIndex;});groups.push(group);}
-return groups;}
-CounterSample.prototype={__proto__:tr.model.Event.prototype,get series(){return this.series_;},get timestamp(){return this.timestamp_;},get value(){return this.value_;},set timestamp(timestamp){this.timestamp_=timestamp;},addBoundsToRange:function(range){range.addValue(this.timestamp);},getSampleIndex:function(){return tr.b.findLowIndexInSortedArray(this.series.timestamps,function(x){return x;},this.timestamp_);},get userFriendlyName(){return'Counter sample from '+this.series_.title+' at '+
-tr.b.units.tsString(this.timestamp);}};tr.model.EventRegistry.register(CounterSample,{name:'counterSample',pluralName:'counterSamples',singleViewElementName:'tr-ui-a-counter-sample-sub-view',multiViewElementName:'tr-ui-a-counter-sample-sub-view'});return{CounterSample:CounterSample};});'use strict';tr.exportTo('tr.model',function(){var CounterSample=tr.model.CounterSample;function CounterSeries(name,color){tr.model.EventContainer.call(this);this.guid_=tr.b.GUID.allocate();this.name_=name [...]
-CounterSeries.prototype={__proto__:tr.model.EventContainer.prototype,get length(){return this.timestamps_.length;},get name(){return this.name_;},get color(){return this.color_;},get samples(){return this.samples_;},get timestamps(){return this.timestamps_;},getSample:function(idx){return this.samples_[idx];},getTimestamp:function(idx){return this.timestamps_[idx];},addCounterSample:function(ts,val){var sample=new CounterSample(this,ts,val);this.addSample(sample);return sample;},addSampl [...]
-return{min:min,max:max,avg:(sum/sampleIndices.length),start:this.getSample(sampleIndices[0]).value,end:this.getSample(sampleIndices.length-1).value};},shiftTimestampsForward:function(amount){for(var i=0;i<this.timestamps_.length;++i){this.timestamps_[i]+=amount;this.samples_[i].timestamp=this.timestamps_[i];}},iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){if(eventTypePredicate.call(opt_this,tr.model.CounterSample)){this.samples_.forEach(callback,opt_this) [...]
-Counter.prototype={__proto__:tr.model.EventContainer.prototype,get guid(){return this.guid_;},get parent(){return this.parent_;},get id(){return this.id_;},get category(){return this.category_;},get name(){return this.name_;},iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){},iterateAllChildEventContainers:function(callback,opt_this){for(var i=0;i<this.series_.length;i++)
-callback.call(opt_this,this.series_[i]);},set timestamps(arg){throw new Error('Bad counter API. No cookie.');},set seriesNames(arg){throw new Error('Bad counter API. No cookie.');},set seriesColors(arg){throw new Error('Bad counter API. No cookie.');},set samples(arg){throw new Error('Bad counter API. No cookie.');},addSeries:function(series){series.counter=this;series.seriesIndex=this.series_.length;this.series_.push(series);return series;},getSeries:function(idx){return this.series_[id [...]
-return 0;return this.series_[0].length;},get timestamps(){if(this.series_.length===0)
-return[];return this.series_[0].timestamps;},getSampleStatistics:function(sampleIndices){sampleIndices.sort();var ret=[];this.series_.forEach(function(series){ret.push(series.getStatistics(sampleIndices));});return ret;},shiftTimestampsForward:function(amount){for(var i=0;i<this.series_.length;++i)
-this.series_[i].shiftTimestampsForward(amount);},updateBounds:function(){this.totals=[];this.maxTotal=0;this.bounds.reset();if(this.series_.length===0)
-return;var firstSeries=this.series_[0];var lastSeries=this.series_[this.series_.length-1];this.bounds.addValue(firstSeries.getTimestamp(0));this.bounds.addValue(lastSeries.getTimestamp(lastSeries.length-1));var numSeries=this.numSeries;this.maxTotal=-Infinity;for(var i=0;i<firstSeries.length;++i){var total=0;this.series_.forEach(function(series){total+=series.getSample(i).value;this.totals.push(total);}.bind(this));this.maxTotal=Math.max(total,this.maxTotal);}}};Counter.compare=function( [...]
-return tmp;var tmp=x.name.localeCompare(y.name);if(tmp==0)
-return x.tid-y.tid;return tmp;};return{Counter:Counter};});'use strict';tr.exportTo('tr.model',function(){function TimedEvent(start){tr.model.Event.call(this);this.start=start;this.duration=0;this.cpuStart=undefined;this.cpuDuration=undefined;}
-TimedEvent.prototype={__proto__:tr.model.Event.prototype,get end(){return this.start+this.duration;},addBoundsToRange:function(range){range.addValue(this.start);range.addValue(this.end);},bounds:function(that,precisionUnit){if(precisionUnit===undefined){precisionUnit=tr.b.units.Time.supportedUnits.ms;}
-var startsBefore=precisionUnit.roundedLess(that.start,this.start);var endsAfter=precisionUnit.roundedLess(this.end,that.end);return!startsBefore&&!endsAfter;}};return{TimedEvent:TimedEvent};});'use strict';tr.exportTo('tr.model',function(){function Slice(category,title,colorId,start,args,opt_duration,opt_cpuStart,opt_cpuDuration,opt_argsStripped){tr.model.TimedEvent.call(this,start);this.category=category||'';this.title=title;this.colorId=colorId;this.args=args;this.startStackFrame=undef [...]
-this.duration=opt_duration;if(opt_cpuStart!==undefined)
-this.cpuStart=opt_cpuStart;if(opt_cpuDuration!==undefined)
-this.cpuDuration=opt_cpuDuration;if(opt_argsStripped!==undefined)
-this.argsStripped=true;}
-Slice.prototype={__proto__:tr.model.TimedEvent.prototype,get analysisTypeName(){return this.title;},get userFriendlyName(){return'Slice '+this.title+' at '+
-tr.b.units.tsString(this.start);},findDescendentSlice:function(targetTitle){if(!this.subSlices)
-return undefined;for(var i=0;i<this.subSlices.length;i++){if(this.subSlices[i].title==targetTitle)
-return this.subSlices[i];var slice=this.subSlices[i].findDescendentSlice(targetTitle);if(slice)return slice;}
-return undefined;},get mostTopLevelSlice(){var curSlice=this;while(curSlice.parentSlice)
-curSlice=curSlice.parentSlice;return curSlice;},iterateAllSubsequentSlices:function(callback,opt_this){var parentStack=[];var started=false;var topmostSlice=this.mostTopLevelSlice;parentStack.push(topmostSlice);while(parentStack.length!==0){var curSlice=parentStack.pop();if(started)
-callback.call(opt_this,curSlice);else
-started=(curSlice.guid===this.guid);for(var i=curSlice.subSlices.length-1;i>=0;i--){parentStack.push(curSlice.subSlices[i]);}}},get subsequentSlices(){var res=[];this.iterateAllSubsequentSlices(function(subseqSlice){res.push(subseqSlice);});return res;},iterateAllAncestors:function(callback,opt_this){var curSlice=this;while(curSlice.parentSlice){curSlice=curSlice.parentSlice;callback.call(opt_this,curSlice);}},get ancestorSlices(){var res=[];this.iterateAllAncestors(function(ancestor){re [...]
-ThreadTimeSlice.prototype={__proto__:Slice.prototype,getColorForState_:function(state){var getColorIdForReservedName=tr.ui.b.getColorIdForReservedName;switch(state){case SCHEDULING_STATE.RUNNABLE:return getColorIdForReservedName('thread_state_runnable');case SCHEDULING_STATE.RUNNING:return getColorIdForReservedName('thread_state_running');case SCHEDULING_STATE.SLEEPING:return getColorIdForReservedName('thread_state_sleeping');case SCHEDULING_STATE.DEBUG:case SCHEDULING_STATE.EXIT_DEAD:ca [...]
-return undefined;var cpuSlices=this.cpuOnWhichThreadWasRunning.slices;for(var i=0;i<cpuSlices.length;i++){var cpuSlice=cpuSlices[i];if(cpuSlice.start!==this.start)
-continue;if(cpuSlice.duration!==this.duration)
-continue;return cpuSlice;}
-return undefined;},getCpuSliceThatTookCpu:function(){if(this.cpuOnWhichThreadWasRunning)
-return undefined;var curIndex=this.thread.indexOfTimeSlice(this);var cpuSliceWhenLastRunning;while(curIndex>=0){var curSlice=this.thread.timeSlices[curIndex];if(!curSlice.cpuOnWhichThreadWasRunning){curIndex--;continue;}
-cpuSliceWhenLastRunning=curSlice.getAssociatedCpuSlice();break;}
-if(!cpuSliceWhenLastRunning)
-return undefined;var cpu=cpuSliceWhenLastRunning.cpu;var indexOfSliceOnCpuWhenLastRunning=cpu.indexOf(cpuSliceWhenLastRunning);var nextRunningSlice=cpu.slices[indexOfSliceOnCpuWhenLastRunning+1];if(!nextRunningSlice)
-return undefined;if(Math.abs(nextRunningSlice.start-cpuSliceWhenLastRunning.end)<0.00001)
-return nextRunningSlice;return undefined;}};tr.model.EventRegistry.register(ThreadTimeSlice,{name:'threadTimeSlice',pluralName:'threadTimeSlices',singleViewElementName:'tr-ui-a-single-thread-time-slice-sub-view',multiViewElementName:'tr-ui-a-multi-thread-time-slice-sub-view'});return{ThreadTimeSlice:ThreadTimeSlice,SCHEDULING_STATE:SCHEDULING_STATE};});'use strict';tr.exportTo('tr.model',function(){var Slice=tr.model.Slice;function CpuSlice(cat,title,colorId,start,args,opt_duration){Slic [...]
-CpuSlice.prototype={__proto__:Slice.prototype,get analysisTypeName(){return'tr.ui.analysis.CpuSlice';},getAssociatedTimeslice:function(){if(!this.threadThatWasRunning)
-return undefined;var timeSlices=this.threadThatWasRunning.timeSlices;for(var i=0;i<timeSlices.length;i++){var timeSlice=timeSlices[i];if(timeSlice.start!==this.start)
-continue;if(timeSlice.duration!==this.duration)
-continue;return timeSlice;}
-return undefined;}};tr.model.EventRegistry.register(CpuSlice,{name:'cpuSlice',pluralName:'cpuSlices',singleViewElementName:'tr-ui-a-single-cpu-slice-sub-view',multiViewElementName:'tr-ui-a-multi-cpu-slice-sub-view'});return{CpuSlice:CpuSlice};});'use strict';tr.exportTo('tr.model',function(){var Counter=tr.model.Counter;var Slice=tr.model.Slice;var CpuSlice=tr.model.CpuSlice;function Cpu(kernel,number){if(kernel===undefined||number===undefined)
-throw new Error('Missing arguments');this.kernel=kernel;this.cpuNumber=number;this.slices=[];this.counters={};this.bounds=new tr.b.Range();this.samples_=undefined;this.lastActiveTimestamp_=undefined;this.lastActiveThread_=undefined;this.lastActiveName_=undefined;this.lastActiveArgs_=undefined;};Cpu.prototype={iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){if(eventTypePredicate.call(opt_this,tr.model.CpuSlice))
-this.slices.forEach(callback,opt_this);if(this.samples_){if(eventTypePredicate.call(opt_this,tr.model.Sample))
-this.samples_.forEach(callback,opt_this);}},iterateAllChildEventContainers:function(callback,opt_this){for(var id in this.counters)
-callback.call(opt_this,this.counters[id]);},getOrCreateCounter:function(cat,name){var id;if(cat.length)
-id=cat+'.'+name;else
-id=name;if(!this.counters[id])
-this.counters[id]=new Counter(this,id,cat,name);return this.counters[id];},shiftTimestampsForward:function(amount){for(var sI=0;sI<this.slices.length;sI++)
-this.slices[sI].start=(this.slices[sI].start+amount);for(var id in this.counters)
-this.counters[id].shiftTimestampsForward(amount);},updateBounds:function(){this.bounds.reset();if(this.slices.length){this.bounds.addValue(this.slices[0].start);this.bounds.addValue(this.slices[this.slices.length-1].end);}
-for(var id in this.counters){this.counters[id].updateBounds();this.bounds.addRange(this.counters[id].bounds);}
-if(this.samples_&&this.samples_.length){this.bounds.addValue(this.samples_[0].start);this.bounds.addValue(this.samples_[this.samples_.length-1].end);}},createSubSlices:function(){this.samples_=this.kernel.model.samples.filter(function(sample){return sample.cpu==this;},this);},addCategoriesToDict:function(categoriesDict){for(var i=0;i<this.slices.length;i++)
-categoriesDict[this.slices[i].category]=true;for(var id in this.counters)
-categoriesDict[this.counters[id].category]=true;for(var i=0;i<this.samples_.length;i++)
-categoriesDict[this.samples_[i].category]=true;},get userFriendlyName(){return'CPU '+this.cpuNumber;},indexOf:function(cpuSlice){var i=tr.b.findLowIndexInSortedArray(this.slices,function(slice){return slice.start;},cpuSlice.start);if(this.slices[i]!==cpuSlice)
-return undefined;return i;},closeActiveThread:function(end_timestamp,args){if(this.lastActiveThread_==undefined||this.lastActiveThread_==0)
-return;if(end_timestamp<this.lastActiveTimestamp_){throw new Error('The end timestamp of a thread running on CPU '+
-this.cpuNumber+' is before its start timestamp.');}
-for(var key in args){this.lastActiveArgs_[key]=args[key];}
-var duration=end_timestamp-this.lastActiveTimestamp_;var slice=new tr.model.CpuSlice('',this.lastActiveName_,tr.ui.b.getColorIdForGeneralPurposeString(this.lastActiveName_),this.lastActiveTimestamp_,this.lastActiveArgs_,duration);slice.cpu=this;this.slices.push(slice);this.lastActiveTimestamp_=undefined;this.lastActiveThread_=undefined;this.lastActiveName_=undefined;this.lastActiveArgs_=undefined;},switchActiveThread:function(timestamp,old_thread_args,new_thread_id,new_thread_name,new_th [...]
-ObjectSnapshot.prototype={__proto__:tr.model.Event.prototype,preInitialize:function(){},initialize:function(){},addBoundsToRange:function(range){range.addValue(this.ts);},get userFriendlyName(){return'Snapshot of '+
-this.objectInstance.typeName+' '+
-this.objectInstance.id+' @ '+
-tr.b.units.tsString(this.ts);}};tr.model.EventRegistry.register(ObjectSnapshot,{name:'objectSnapshot',pluralName:'objectSnapshots',singleViewElementName:'tr-ui-a-single-object-snapshot-sub-view',multiViewElementName:'tr-ui-a-multi-object-sub-view'});var options=new tr.b.ExtensionRegistryOptions(tr.b.TYPE_BASED_REGISTRY_MODE);options.mandatoryBaseClass=ObjectSnapshot;options.defaultConstructor=ObjectSnapshot;tr.b.decorateExtensionRegistry(ObjectSnapshot,options);return{ObjectSnapshot:Obje [...]
-ObjectInstance.prototype={__proto__:tr.model.Event.prototype,get typeName(){return this.name;},addBoundsToRange:function(range){range.addRange(this.bounds);},addSnapshot:function(ts,args,opt_name,opt_baseTypeName){if(ts<this.creationTs)
-throw new Error('Snapshots must be >= instance.creationTs');if(ts>=this.deletionTs)
-throw new Error('Snapshots cannot be added after '+'an objects deletion timestamp.');var lastSnapshot;if(this.snapshots.length>0){lastSnapshot=this.snapshots[this.snapshots.length-1];if(lastSnapshot.ts==ts)
-throw new Error('Snapshots already exists at this time!');if(ts<lastSnapshot.ts){throw new Error('Snapshots must be added in increasing timestamp order');}}
-if(opt_name&&(this.name!=opt_name)){if(!opt_baseTypeName)
-throw new Error('Must provide base type name for name update');if(this.baseTypeName!=opt_baseTypeName)
-throw new Error('Cannot update type name: base types dont match');this.name=opt_name;}
-var snapshotConstructor=tr.model.ObjectSnapshot.getConstructor(this.category,this.name);var snapshot=new snapshotConstructor(this,ts,args);this.snapshots.push(snapshot);return snapshot;},wasDeleted:function(ts){var lastSnapshot;if(this.snapshots.length>0){lastSnapshot=this.snapshots[this.snapshots.length-1];if(lastSnapshot.ts>ts)
-throw new Error('Instance cannot be deleted at ts='+
-ts+'. A snapshot exists that is older.');}
-this.deletionTs=ts;this.deletionTsWasExplicit=true;},preInitialize:function(){for(var i=0;i<this.snapshots.length;i++)
-this.snapshots[i].preInitialize();},initialize:function(){for(var i=0;i<this.snapshots.length;i++)
-this.snapshots[i].initialize();},getSnapshotAt:function(ts){if(ts<this.creationTs){if(this.creationTsWasExplicit)
-throw new Error('ts must be within lifetime of this instance');return this.snapshots[0];}
-if(ts>this.deletionTs)
-throw new Error('ts must be within lifetime of this instance');var snapshots=this.snapshots;var i=tr.b.findIndexInSortedIntervals(snapshots,function(snapshot){return snapshot.ts;},function(snapshot,i){if(i==snapshots.length-1)
-return snapshots[i].objectInstance.deletionTs;return snapshots[i+1].ts-snapshots[i].ts;},ts);if(i<0){return this.snapshots[0];}
-if(i>=this.snapshots.length)
-return this.snapshots[this.snapshots.length-1];return this.snapshots[i];},updateBounds:function(){this.bounds.reset();this.bounds.addValue(this.creationTs);if(this.deletionTs!=Number.MAX_VALUE)
-this.bounds.addValue(this.deletionTs);else if(this.snapshots.length>0)
-this.bounds.addValue(this.snapshots[this.snapshots.length-1].ts);},shiftTimestampsForward:function(amount){this.creationTs+=amount;if(this.deletionTs!=Number.MAX_VALUE)
-this.deletionTs+=amount;this.snapshots.forEach(function(snapshot){snapshot.ts+=amount;});},get userFriendlyName(){return this.typeName+' object '+this.id;}};tr.model.EventRegistry.register(ObjectInstance,{name:'objectInstance',pluralName:'objectInstances',singleViewElementName:'tr-ui-a-single-object-instance-sub-view',multiViewElementName:'tr-ui-a-multi-object-sub-view'});var options=new tr.b.ExtensionRegistryOptions(tr.b.TYPE_BASED_REGISTRY_MODE);options.mandatoryBaseClass=ObjectInstanc [...]
-TimeToObjectInstanceMap.prototype={idWasCreated:function(category,name,ts){if(this.instances.length==0){this.instances.push(this.createObjectInstanceFunction_(this.parent,this.id,category,name,ts));this.instances[0].creationTsWasExplicit=true;return this.instances[0];}
-var lastInstance=this.instances[this.instances.length-1];if(ts<lastInstance.deletionTs){throw new Error('Mutation of the TimeToObjectInstanceMap must be '+'done in ascending timestamp order.');}
-lastInstance=this.createObjectInstanceFunction_(this.parent,this.id,category,name,ts);lastInstance.creationTsWasExplicit=true;this.instances.push(lastInstance);return lastInstance;},addSnapshot:function(category,name,ts,args,opt_baseTypeName){if(this.instances.length==0){this.instances.push(this.createObjectInstanceFunction_(this.parent,this.id,category,name,ts,opt_baseTypeName));}
-var i=tr.b.findIndexInSortedIntervals(this.instances,function(inst){return inst.creationTs;},function(inst){return inst.deletionTs-inst.creationTs;},ts);var instance;if(i<0){instance=this.instances[0];if(ts>instance.deletionTs||instance.creationTsWasExplicit){throw new Error('At the provided timestamp, no instance was still alive');}
-if(instance.snapshots.length!=0){throw new Error('Cannot shift creationTs forward, '+'snapshots have been added. First snap was at ts='+
-instance.snapshots[0].ts+' and creationTs was '+
-instance.creationTs);}
-instance.creationTs=ts;}else if(i>=this.instances.length){instance=this.instances[this.instances.length-1];if(ts>=instance.deletionTs){instance=this.createObjectInstanceFunction_(this.parent,this.id,category,name,ts,opt_baseTypeName);this.instances.push(instance);}else{var lastValidIndex;for(var i=this.instances.length-1;i>=0;i--){var tmp=this.instances[i];if(ts>=tmp.deletionTs)
-break;if(tmp.creationTsWasExplicit==false&&tmp.snapshots.length==0)
-lastValidIndex=i;}
-if(lastValidIndex===undefined){throw new Error('Cannot add snapshot. No instance was alive that was mutable.');}
-instance=this.instances[lastValidIndex];instance.creationTs=ts;}}else{instance=this.instances[i];}
-return instance.addSnapshot(ts,args,name,opt_baseTypeName);},get lastInstance(){if(this.instances.length==0)
-return undefined;return this.instances[this.instances.length-1];},idWasDeleted:function(category,name,ts){if(this.instances.length==0){this.instances.push(this.createObjectInstanceFunction_(this.parent,this.id,category,name,ts));}
-var lastInstance=this.instances[this.instances.length-1];if(ts<lastInstance.creationTs)
-throw new Error('Cannot delete a id before it was crated');if(lastInstance.deletionTs==Number.MAX_VALUE){lastInstance.wasDeleted(ts);return lastInstance;}
-if(ts<lastInstance.deletionTs)
-throw new Error('id was already deleted earlier.');lastInstance=this.createObjectInstanceFunction_(this.parent,this.id,category,name,ts);this.instances.push(lastInstance);lastInstance.wasDeleted(ts);return lastInstance;},getInstanceAt:function(ts){var i=tr.b.findIndexInSortedIntervals(this.instances,function(inst){return inst.creationTs;},function(inst){return inst.deletionTs-inst.creationTs;},ts);if(i<0){if(this.instances[0].creationTsWasExplicit)
-return undefined;return this.instances[0];}else if(i>=this.instances.length){return undefined;}
-return this.instances[i];},logToConsole:function(){for(var i=0;i<this.instances.length;i++){var instance=this.instances[i];var cEF='';var dEF='';if(instance.creationTsWasExplicit)
-cEF='(explicitC)';if(instance.deletionTsWasExplicit)
-dEF='(explicit)';console.log(instance.creationTs,cEF,instance.deletionTs,dEF,instance.category,instance.name,instance.snapshots.length+' snapshots');}}};return{TimeToObjectInstanceMap:TimeToObjectInstanceMap};});'use strict';tr.exportTo('tr.model',function(){var ObjectInstance=tr.model.ObjectInstance;var ObjectSnapshot=tr.model.ObjectSnapshot;function ObjectCollection(parent){tr.model.EventContainer.call(this);this.parent=parent;this.bounds=new tr.b.Range();this.instanceMapsById_={};this [...]
-ObjectCollection.prototype={__proto__:tr.model.EventContainer.prototype,iterateAllChildEventContainers:function(callback,opt_this){},iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){var bI=!!eventTypePredicate.call(opt_this,ObjectInstance);var bS=!!eventTypePredicate.call(opt_this,ObjectSnapshot);if(bI===false&&bS===false)
-return;this.iterObjectInstances(function(instance){if(bI)
-callback.call(opt_this,instance);if(bS)
-instance.snapshots.forEach(callback,opt_this);},opt_this);},createObjectInstance_:function(parent,id,category,name,creationTs,opt_baseTypeName){var constructor=tr.model.ObjectInstance.getConstructor(category,name);var instance=new constructor(parent,id,category,name,creationTs,opt_baseTypeName);var typeName=instance.typeName;var instancesOfTypeName=this.instancesByTypeName_[typeName];if(!instancesOfTypeName){instancesOfTypeName=[];this.instancesByTypeName_[typeName]=instancesOfTypeName;}
-instancesOfTypeName.push(instance);return instance;},getOrCreateInstanceMap_:function(id){var instanceMap=this.instanceMapsById_[id];if(instanceMap)
-return instanceMap;instanceMap=new tr.model.TimeToObjectInstanceMap(this.createObjectInstance_,this.parent,id);this.instanceMapsById_[id]=instanceMap;return instanceMap;},idWasCreated:function(id,category,name,ts){var instanceMap=this.getOrCreateInstanceMap_(id);return instanceMap.idWasCreated(category,name,ts);},addSnapshot:function(id,category,name,ts,args,opt_baseTypeName){var instanceMap=this.getOrCreateInstanceMap_(id);var snapshot=instanceMap.addSnapshot(category,name,ts,args,opt_b [...]
-snapshot.objectInstance.category+' name='+
-snapshot.objectInstance.name;throw new Error(msg);}
-if(opt_baseTypeName&&snapshot.objectInstance.baseTypeName!=opt_baseTypeName){throw new Error('Could not add snapshot with baseTypeName='+
-opt_baseTypeName+'. It '+'was previously created with name='+
-snapshot.objectInstance.baseTypeName);}
-if(snapshot.objectInstance.name!=name){throw new Error('Could not add snapshot with name='+name+'. It '+'was previously created with name='+
-snapshot.objectInstance.name);}
-return snapshot;},idWasDeleted:function(id,category,name,ts){var instanceMap=this.getOrCreateInstanceMap_(id);var deletedInstance=instanceMap.idWasDeleted(category,name,ts);if(!deletedInstance)
-return;if(deletedInstance.category!=category){var msg='Deleting object '+deletedInstance.name+' with a different category '+'than when it was created. It previous had cat='+
-deletedInstance.category+' but the delete command '+'had cat='+category;throw new Error(msg);}
-if(deletedInstance.baseTypeName!=name){throw new Error('Deletion requested for name='+
-name+' could not proceed: '+'An existing object with baseTypeName='+
-deletedInstance.baseTypeName+' existed.');}},autoDeleteObjects:function(maxTimestamp){tr.b.iterItems(this.instanceMapsById_,function(id,i2imap){var lastInstance=i2imap.lastInstance;if(lastInstance.deletionTs!=Number.MAX_VALUE)
-return;i2imap.idWasDeleted(lastInstance.category,lastInstance.name,maxTimestamp);lastInstance.deletionTsWasExplicit=false;});},getObjectInstanceAt:function(id,ts){var instanceMap=this.instanceMapsById_[id];if(!instanceMap)
-return undefined;return instanceMap.getInstanceAt(ts);},getSnapshotAt:function(id,ts){var instance=this.getObjectInstanceAt(id,ts);if(!instance)
-return undefined;return instance.getSnapshotAt(ts);},iterObjectInstances:function(iter,opt_this){opt_this=opt_this||this;tr.b.iterItems(this.instanceMapsById_,function(id,i2imap){i2imap.instances.forEach(iter,opt_this);});},getAllObjectInstances:function(){var instances=[];this.iterObjectInstances(function(i){instances.push(i);});return instances;},getAllInstancesNamed:function(name){return this.instancesByTypeName_[name];},getAllInstancesByTypeName:function(){return this.instancesByType [...]
-ThreadSlice.prototype={__proto__:Slice.prototype};tr.model.EventRegistry.register(ThreadSlice,{name:'slice',pluralName:'slices',singleViewElementName:'tr-ui-a-single-thread-slice-sub-view',multiViewElementName:'tr-ui-a-multi-thread-slice-sub-view'});return{ThreadSlice:ThreadSlice};});'use strict';tr.exportTo('tr.ui.b',function(){function boundChannel(v){return Math.min(255,Math.max(0,Math.floor(v)));}
-function brightenColor(c){var k;if(c.r>=240&&c.g>=240&&c.b>=240)
-k=0.80;else
-k=1.45;return{r:boundChannel(c.r*k),g:boundChannel(c.g*k),b:boundChannel(c.b*k)};}
-function desaturateColor(c){var value=boundChannel((c.r+c.g+c.b)/3);return{r:value,g:value,b:value};}
-function colorToRGBString(c){return'rgb('+c.r+','+c.g+','+c.b+')';}
-function colorToRGBAString(c,a){return'rgba('+c.r+','+c.g+','+c.b+','+a+')';}
-return{brightenColor:brightenColor,desaturateColor:desaturateColor,colorToRGBString:colorToRGBString,colorToRGBAString:colorToRGBAString};});'use strict';tr.exportTo('tr.ui.b',function(){var colorToRGBString=tr.ui.b.colorToRGBString;var colorToRGBAString=tr.ui.b.colorToRGBAString;var generalPurposeColors=[{r:138,g:113,b:152},{r:175,g:112,b:133},{r:127,g:135,b:225},{r:93,g:81,b:137},{r:116,g:143,b:119},{r:178,g:214,b:122},{r:87,g:109,b:147},{r:119,g:155,b:95},{r:114,g:180,b:160},{r:132,g: [...]
-hash=(hash+37*hash+11*name.charCodeAt(i))%0xFFFFFFFF;return hash;}
-function getColorPalette(){return palette;}
-function getRawColorPalette(){return paletteRaw;}
-function getColorPaletteHighlightIdBoost(){return highlightIdBoost;}
-function getColorPaletteDesaturateIdBoost(){return desaturateIdBoost;}
-function getColorIdForReservedName(name){var id=reservedColorNameToIdMap[name];if(id===undefined)
-throw new Error('Unrecognized color ')+name;return id;}
-var stringColorIdCache={};function getColorIdForGeneralPurposeString(string){if(stringColorIdCache[string]===undefined){var hash=getStringHash(string);stringColorIdCache[string]=hash%numGeneralPurposeColorIds;}
-return stringColorIdCache[string];}
-var paletteProperties={numGeneralPurposeColorIds:numGeneralPurposeColorIds,highlightIdBoost:highlightIdBoost,desaturateIdBoost:desaturateIdBoost};return{getRawColorPalette:getRawColorPalette,getColorPalette:getColorPalette,paletteProperties:paletteProperties,getColorPaletteHighlightIdBoost:getColorPaletteHighlightIdBoost,getColorPaletteDesaturateIdBoost:getColorPaletteDesaturateIdBoost,getColorIdForReservedName:getColorIdForReservedName,getStringHash:getStringHash,getColorIdForGeneralPur [...]
-function getSliceHi(s){return s.end;}
-function SliceGroup(parentContainer,opt_sliceConstructor,opt_name){this.guid_=tr.b.GUID.allocate();this.parentContainer_=parentContainer;var sliceConstructor=opt_sliceConstructor||Slice;this.sliceConstructor=sliceConstructor;this.openPartialSlices_=[];this.slices=[];this.bounds=new tr.b.Range();this.topLevelSlices=[];this.haveTopLevelSlicesBeenBuilt=false;this.name_=opt_name;if(this.model===undefined)
-throw new Error('SliceGroup must have model defined.');}
-SliceGroup.prototype={__proto__:tr.model.EventContainer.prototype,get guid(){return this.guid_;},get parentContainer(){return this.parentContainer_;},get model(){return this.parentContainer_.model;},get stableId(){return this.parentContainer_.stableId+'.SliceGroup';},getSettingsKey:function(){if(!this.name_)
-return undefined;var parentKey=this.parentContainer_.getSettingsKey();if(!parentKey)
-return undefined;return parentKey+'.'+this.name;},get length(){return this.slices.length;},pushSlice:function(slice){this.haveTopLevelSlicesBeenBuilt=false;slice.parentContainer=this.parentContainer_;this.slices.push(slice);return slice;},pushSlices:function(slices){this.haveTopLevelSlicesBeenBuilt=false;slices.forEach(function(slice){slice.parentContainer=this.parentContainer_;this.slices.push(slice);},this);},beginSlice:function(category,title,ts,opt_args,opt_tts,opt_argsStripped){if(t [...]
-throw new Error('Slices must be added in increasing timestamp order');}
-var colorId=tr.ui.b.getColorIdForGeneralPurposeString(title);var slice=new this.sliceConstructor(category,title,colorId,ts,opt_args?opt_args:{},null,opt_tts,undefined,opt_argsStripped);this.openPartialSlices_.push(slice);slice.didNotFinish=true;this.pushSlice(slice);return slice;},isTimestampValidForBeginOrEnd:function(ts){if(!this.openPartialSlices_.length)
-return true;var top=this.openPartialSlices_[this.openPartialSlices_.length-1];return ts>=top.start;},get openSliceCount(){return this.openPartialSlices_.length;},get mostRecentlyOpenedPartialSlice(){if(!this.openPartialSlices_.length)
-return undefined;return this.openPartialSlices_[this.openPartialSlices_.length-1];},endSlice:function(ts,opt_tts){if(!this.openSliceCount)
-throw new Error('endSlice called without an open slice');var slice=this.openPartialSlices_[this.openSliceCount-1];this.openPartialSlices_.splice(this.openSliceCount-1,1);if(ts<slice.start)
-throw new Error('Slice '+slice.title+' end time is before its start.');slice.duration=ts-slice.start;slice.didNotFinish=false;if(opt_tts&&slice.cpuStart!==undefined)
-slice.cpuDuration=opt_tts-slice.cpuStart;return slice;},pushCompleteSlice:function(category,title,ts,duration,tts,cpuDuration,opt_args,opt_argsStripped){var colorId=tr.ui.b.getColorIdForGeneralPurposeString(title);var slice=new this.sliceConstructor(category,title,colorId,ts,opt_args?opt_args:{},duration,tts,cpuDuration,opt_argsStripped);if(duration===undefined)
-slice.didNotFinish=true;this.pushSlice(slice);return slice;},autoCloseOpenSlices:function(opt_maxTimestamp){if(!opt_maxTimestamp){this.updateBounds();opt_maxTimestamp=this.bounds.max;}
-for(var sI=0;sI<this.slices.length;sI++){var slice=this.slices[sI];if(slice.didNotFinish)
-slice.duration=opt_maxTimestamp-slice.start;}
-this.openPartialSlices_=[];},shiftTimestampsForward:function(amount){for(var sI=0;sI<this.slices.length;sI++){var slice=this.slices[sI];slice.start=(slice.start+amount);}},updateBounds:function(){this.bounds.reset();for(var i=0;i<this.slices.length;i++){this.bounds.addValue(this.slices[i].start);this.bounds.addValue(this.slices[i].end);}},copySlice:function(slice){var newSlice=new this.sliceConstructor(slice.category,slice.title,slice.colorId,slice.start,slice.args,slice.duration,slice.c [...]
-this.slices.forEach(callback,opt_this);},iterateAllChildEventContainers:function(callback,opt_this){},getSlicesOfName:function(title){var slices=[];for(var i=0;i<this.slices.length;i++){if(this.slices[i].title==title){slices.push(this.slices[i]);}}
-return slices;},iterSlicesInTimeRange:function(callback,start,end){var ret=[];tr.b.iterateOverIntersectingIntervals(this.topLevelSlices,function(s){return s.start;},function(s){return s.duration;},start,end,function(topLevelSlice){callback(topLevelSlice);topLevelSlice.iterateAllDescendents(callback);});return ret;},findSliceAtTs:function(ts){if(!this.haveTopLevelSlicesBeenBuilt)
-throw new Error('Nope');var i=tr.b.findIndexInSortedClosedIntervals(this.topLevelSlices,getSliceLo,getSliceHi,ts);if(i==-1||i==this.topLevelSlices.length)
-return undefined;var curSlice=this.topLevelSlices[i];while(true){var i=tr.b.findIndexInSortedClosedIntervals(curSlice.subSlices,getSliceLo,getSliceHi,ts);if(i==-1||i==curSlice.subSlices.length)
-return curSlice;curSlice=curSlice.subSlices[i];}},findNextSliceAfter:function(ts,refGuid){var i=tr.b.findLowIndexInSortedArray(this.slices,getSliceLo,ts);if(i===this.slices.length)
-return undefined;for(;i<this.slices.length;i++){var slice=this.slices[i];if(slice.start>ts)
-return slice;if(slice.guid<=refGuid)
-continue;return slice;}
-return undefined;},createSubSlices:function(){this.haveTopLevelSlicesBeenBuilt=true;this.createSubSlicesImpl_();if(this.parentContainer.timeSlices)
-this.addCpuTimeToSubslices_(this.parentContainer.timeSlices);this.slices.forEach(function(slice){var selfTime=slice.duration;for(var i=0;i<slice.subSlices.length;i++)
-selfTime-=slice.subSlices[i].duration;slice.selfTime=selfTime;if(slice.cpuDuration===undefined)
-return;var cpuSelfTime=slice.cpuDuration;for(var i=0;i<slice.subSlices.length;i++){if(slice.subSlices[i].cpuDuration!==undefined)
-cpuSelfTime-=slice.subSlices[i].cpuDuration;}
-slice.cpuSelfTime=cpuSelfTime;});},createSubSlicesImpl_:function(){var precisionUnit=this.model.intrinsicTimeUnit;function addSliceIfBounds(root,child){if(root.bounds(child,precisionUnit)){if(root.subSlices&&root.subSlices.length>0){if(addSliceIfBounds(root.subSlices[root.subSlices.length-1],child))
-return true;}
-child.parentSlice=root;if(root.subSlices===undefined)
-root.subSlices=[];root.subSlices.push(child);return true;}
-return false;}
-if(!this.slices.length)
-return;var ops=[];for(var i=0;i<this.slices.length;i++){if(this.slices[i].subSlices)
-this.slices[i].subSlices.splice(0,this.slices[i].subSlices.length);ops.push(i);}
-var originalSlices=this.slices;ops.sort(function(ix,iy){var x=originalSlices[ix];var y=originalSlices[iy];if(x.start!=y.start)
-return x.start-y.start;return ix-iy;});var slices=new Array(this.slices.length);for(var i=0;i<ops.length;i++){slices[i]=originalSlices[ops[i]];}
-var rootSlice=slices[0];this.topLevelSlices=[];this.topLevelSlices.push(rootSlice);for(var i=1;i<slices.length;i++){var slice=slices[i];if(!addSliceIfBounds(rootSlice,slice)){rootSlice=slice;this.topLevelSlices.push(rootSlice);}}
-this.slices=slices;},addCpuTimeToSubslices_:function(timeSlices){var SCHEDULING_STATE=tr.model.SCHEDULING_STATE;var sliceIdx=0;timeSlices.forEach(function(timeSlice){if(timeSlice.schedulingState==SCHEDULING_STATE.RUNNING){while(sliceIdx<this.topLevelSlices.length){if(this.addCpuTimeToSubslice_(this.topLevelSlices[sliceIdx],timeSlice)){sliceIdx++;}else{break;}}}},this);},addCpuTimeToSubslice_:function(slice,timeSlice){if(slice.start>timeSlice.end||slice.end<timeSlice.start)
-return slice.end<=timeSlice.end;var duration=timeSlice.duration;if(slice.start>timeSlice.start)
-duration-=slice.start-timeSlice.start;if(timeSlice.end>slice.end)
-duration-=timeSlice.end-slice.end;if(slice.cpuDuration){slice.cpuDuration+=duration;}else{slice.cpuDuration=duration;}
-for(var i=0;i<slice.subSlices.length;i++){this.addCpuTimeToSubslice_(slice.subSlices[i],timeSlice);}
-return slice.end<=timeSlice.end;}};SliceGroup.merge=function(groupA,groupB){if(groupA.openPartialSlices_.length>0)
-throw new Error('groupA has open partial slices');if(groupB.openPartialSlices_.length>0)
-throw new Error('groupB has open partial slices');if(groupA.parentContainer!=groupB.parentContainer)
-throw new Error('Different parent threads. Cannot merge');if(groupA.sliceConstructor!=groupB.sliceConstructor)
-throw new Error('Different slice constructors. Cannot merge');var result=new SliceGroup(groupA.parentContainer,groupA.sliceConstructor,groupA.name_);var slicesA=groupA.slices;var slicesB=groupB.slices;var idxA=0;var idxB=0;var openA=[];var openB=[];var splitOpenSlices=function(when){for(var i=0;i<openB.length;i++){var oldSlice=openB[i];var oldEnd=oldSlice.end;if(when<oldSlice.start||oldEnd<when){throw new Error('slice should not be split');}
-var newSlice=result.copySlice(oldSlice);newSlice.start=when;newSlice.duration=oldEnd-when;if(newSlice.title.indexOf(' (cont.)')==-1)
-newSlice.title+=' (cont.)';oldSlice.duration=when-oldSlice.start;openB[i]=newSlice;result.pushSlice(newSlice);}};var closeOpenSlices=function(upTo){while(openA.length>0||openB.length>0){var nextA=openA[openA.length-1];var nextB=openB[openB.length-1];var endA=nextA&&nextA.end;var endB=nextB&&nextB.end;if((endA===undefined||endA>upTo)&&(endB===undefined||endB>upTo)){return;}
-if(endB===undefined||endA<endB){splitOpenSlices(endA);openA.pop();}else{openB.pop();}}};while(idxA<slicesA.length||idxB<slicesB.length){var sA=slicesA[idxA];var sB=slicesB[idxB];var nextSlice,isFromB;if(sA===undefined||(sB!==undefined&&sA.start>sB.start)){nextSlice=result.copySlice(sB);isFromB=true;idxB++;}else{nextSlice=result.copySlice(sA);isFromB=false;idxA++;}
-closeOpenSlices(nextSlice.start);result.pushSlice(nextSlice);if(isFromB){openB.push(nextSlice);}else{splitOpenSlices(nextSlice.start);openA.push(nextSlice);}}
-closeOpenSlices();return result;};return{SliceGroup:SliceGroup};});'use strict';tr.exportTo('tr.model',function(){function AsyncSlice(category,title,colorId,start,args,duration,opt_isTopLevel,opt_cpuStart,opt_cpuDuration,opt_argsStripped){tr.model.TimedEvent.call(this,start);this.category=category||'';this.title=title;this.colorId=colorId;this.args=args;this.startStackFrame=undefined;this.endStackFrame=undefined;this.didNotFinish=false;this.important=false;this.subSlices=[];this.parentCo [...]
-this.cpuStart=opt_cpuStart;if(opt_cpuDuration!==undefined)
-this.cpuDuration=opt_cpuDuration;if(opt_argsStripped!==undefined)
-this.argsStripped=opt_argsStripped;};AsyncSlice.prototype={__proto__:tr.model.TimedEvent.prototype,get analysisTypeName(){return this.title;},get viewSubGroupTitle(){return this.title;},get userFriendlyName(){return'Async slice '+this.title+' at '+
-tr.b.units.tsString(this.start);},findDescendentSlice:function(targetTitle){if(!this.subSlices)
-return undefined;for(var i=0;i<this.subSlices.length;i++){if(this.subSlices[i].title==targetTitle)
-return this.subSlices[i];var slice=this.subSlices[i].findDescendentSlice(targetTitle);if(slice)return slice;}
-return undefined;},iterateAllDescendents:function(callback,opt_this){this.subSlices.forEach(callback,opt_this);this.subSlices.forEach(function(subSlice){subSlice.iterateAllDescendents(callback,opt_this);},opt_this);},compareTo:function(that){return this.title.localeCompare(that.title);}};tr.model.EventRegistry.register(AsyncSlice,{name:'asyncSlice',pluralName:'asyncSlices',singleViewElementName:'tr-ui-a-single-async-slice-sub-view',multiViewElementName:'tr-ui-a-multi-async-slice-sub-view [...]
-AsyncSliceGroup.prototype={__proto__:tr.model.EventContainer.prototype,get guid(){return this.guid_;},get parentContainer(){return this.parentContainer_;},get model(){return this.parentContainer_.parent.model;},get stableId(){return this.parentContainer_.stableId+'.AsyncSliceGroup';},getSettingsKey:function(){if(!this.name_)
-return undefined;var parentKey=this.parentContainer_.getSettingsKey();if(!parentKey)
-return undefined;return parentKey+'.'+this.name_;},push:function(slice){slice.parentContainer=this.parentContainer;this.slices.push(slice);return slice;},get length(){return this.slices.length;},shiftTimestampsForward:function(amount){for(var sI=0;sI<this.slices.length;sI++){var slice=this.slices[sI];slice.start=(slice.start+amount);var shiftSubSlices=function(subSlices){if(subSlices===undefined||subSlices.length===0)
-return;for(var sJ=0;sJ<subSlices.length;sJ++){subSlices[sJ].start+=amount;shiftSubSlices(subSlices[sJ].subSlices);}};shiftSubSlices(slice.subSlices);}},updateBounds:function(){this.bounds.reset();for(var i=0;i<this.slices.length;i++){this.bounds.addValue(this.slices[i].start);this.bounds.addValue(this.slices[i].end);}},get viewSubGroups(){if(this.viewSubGroups_===undefined){var prefix='';if(this.name!==undefined)
-prefix=this.name+'.';else
-prefix='';var subGroupsByTitle={};for(var i=0;i<this.slices.length;++i){var slice=this.slices[i];var subGroupTitle=slice.viewSubGroupTitle;if(!subGroupsByTitle[subGroupTitle]){subGroupsByTitle[subGroupTitle]=new AsyncSliceGroup(this.parentContainer_,prefix+subGroupTitle);}
-subGroupsByTitle[subGroupTitle].push(slice);}
-this.viewSubGroups_=tr.b.dictionaryValues(subGroupsByTitle);this.viewSubGroups_.sort(function(a,b){return a.slices[0].compareTo(b.slices[0]);});}
-return this.viewSubGroups_;},iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){if(eventTypePredicate.call(opt_this,tr.model.AsyncSlice)){for(var i=0;i<this.slices.length;i++){var slice=this.slices[i];callback.call(opt_this,slice);if(slice.subSlices)
-slice.subSlices.forEach(callback,opt_this);}}},iterateAllChildEventContainers:function(callback,opt_this){}};return{AsyncSliceGroup:AsyncSliceGroup};});'use strict';tr.exportTo('tr.model',function(){var Slice=tr.model.Slice;var SliceGroup=tr.model.SliceGroup;var AsyncSlice=tr.model.AsyncSlice;var AsyncSliceGroup=tr.model.AsyncSliceGroup;var ThreadSlice=tr.model.ThreadSlice;var ThreadTimeSlice=tr.model.ThreadTimeSlice;function Thread(parent,tid){this.guid_=tr.b.GUID.allocate();if(!parent)
-throw new Error('Parent must be provided.');this.parent=parent;this.sortIndex=0;this.tid=tid;this.name=undefined;this.samples_=undefined;var that=this;this.sliceGroup=new SliceGroup(this,ThreadSlice,'slices');this.timeSlices=undefined;this.kernelSliceGroup=new SliceGroup(this,ThreadSlice,'kernel-slices');this.asyncSliceGroup=new AsyncSliceGroup(this,'async-slices');this.bounds=new tr.b.Range();}
-Thread.prototype={__proto__:tr.model.EventContainer.prototype,get guid(){return this.guid_;},get model(){return this.parent.model;},get stableId(){return this.parent.stableId+'.'+this.tid;},compareTo:function(that){return Thread.compare(this,that);},iterateAllChildEventContainers:function(callback,opt_this){if(this.sliceGroup.length)
-callback.call(opt_this,this.sliceGroup);if(this.kernelSliceGroup.length)
-callback.call(opt_this,this.kernelSliceGroup);if(this.asyncSliceGroup.length)
-callback.call(opt_this,this.asyncSliceGroup);},iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){if(this.timeSlices&&this.timeSlices.length){if(eventTypePredicate.call(opt_this,ThreadTimeSlice))
-this.timeSlices.forEach(callback,opt_this);}},iterateAllPersistableObjects:function(cb){cb(this);if(this.sliceGroup.length)
-cb(this.sliceGroup);this.asyncSliceGroup.viewSubGroups.forEach(cb);},shiftTimestampsForward:function(amount){this.sliceGroup.shiftTimestampsForward(amount);if(this.timeSlices){for(var i=0;i<this.timeSlices.length;i++){var slice=this.timeSlices[i];slice.start+=amount;}}
-this.kernelSliceGroup.shiftTimestampsForward(amount);this.asyncSliceGroup.shiftTimestampsForward(amount);},get isEmpty(){if(this.sliceGroup.length)
-return false;if(this.sliceGroup.openSliceCount)
-return false;if(this.timeSlices&&this.timeSlices.length)
-return false;if(this.kernelSliceGroup.length)
-return false;if(this.asyncSliceGroup.length)
-return false;if(this.samples_.length)
-return false;return true;},updateBounds:function(){this.bounds.reset();this.sliceGroup.updateBounds();this.bounds.addRange(this.sliceGroup.bounds);this.kernelSliceGroup.updateBounds();this.bounds.addRange(this.kernelSliceGroup.bounds);this.asyncSliceGroup.updateBounds();this.bounds.addRange(this.asyncSliceGroup.bounds);if(this.timeSlices&&this.timeSlices.length){this.bounds.addValue(this.timeSlices[0].start);this.bounds.addValue(this.timeSlices[this.timeSlices.length-1].end);}
-if(this.samples_&&this.samples_.length){this.bounds.addValue(this.samples_[0].start);this.bounds.addValue(this.samples_[this.samples_.length-1].end);}},addCategoriesToDict:function(categoriesDict){for(var i=0;i<this.sliceGroup.length;i++)
-categoriesDict[this.sliceGroup.slices[i].category]=true;for(var i=0;i<this.kernelSliceGroup.length;i++)
-categoriesDict[this.kernelSliceGroup.slices[i].category]=true;for(var i=0;i<this.asyncSliceGroup.length;i++)
-categoriesDict[this.asyncSliceGroup.slices[i].category]=true;if(this.samples_){for(var i=0;i<this.samples_.length;i++)
-categoriesDict[this.samples_[i].category]=true;}},autoCloseOpenSlices:function(opt_maxTimestamp){this.sliceGroup.autoCloseOpenSlices(opt_maxTimestamp);this.kernelSliceGroup.autoCloseOpenSlices(opt_maxTimestamp);},mergeKernelWithUserland:function(){if(this.kernelSliceGroup.length>0){var newSlices=SliceGroup.merge(this.sliceGroup,this.kernelSliceGroup);this.sliceGroup.slices=newSlices.slices;this.kernelSliceGroup=new SliceGroup(this);this.updateBounds();}},createSubSlices:function(){this.s [...]
-(this.name?', name: '+this.name:'');},getSettingsKey:function(){if(!this.name)
-return undefined;var parentKey=this.parent.getSettingsKey();if(!parentKey)
-return undefined;return parentKey+'.'+this.name;},indexOfTimeSlice:function(timeSlice){var i=tr.b.findLowIndexInSortedArray(this.timeSlices,function(slice){return slice.start;},timeSlice.start);if(this.timeSlices[i]!==timeSlice)
-return undefined;return i;},getSchedulingStatsForRange:function(start,end){var stats={};if(!this.timeSlices)return stats;function addStatsForSlice(threadTimeSlice){var overlapStart=Math.max(threadTimeSlice.start,start);var overlapEnd=Math.min(threadTimeSlice.end,end);var schedulingState=threadTimeSlice.schedulingState;if(!(schedulingState in stats))
-stats[schedulingState]=0;stats[schedulingState]+=overlapEnd-overlapStart;}
-tr.b.iterateOverIntersectingIntervals(this.timeSlices,function(x){return x.start;},function(x){return x.end;},start,end,addStatsForSlice);return stats;},get samples(){return this.samples_;}};Thread.compare=function(x,y){var tmp=x.parent.compareTo(y.parent);if(tmp)
-return tmp;tmp=x.sortIndex-y.sortIndex;if(tmp)
-return tmp;tmp=tr.b.comparePossiblyUndefinedValues(x.name,y.name,function(x,y){return x.localeCompare(y);});if(tmp)
-return tmp;return x.tid-y.tid;};return{Thread:Thread};});'use strict';tr.exportTo('tr.model',function(){var Thread=tr.model.Thread;var Counter=tr.model.Counter;function ProcessBase(model){if(!model)
-throw new Error('Must provide a model');tr.model.EventContainer.call(this);this.guid_=tr.b.GUID.allocate();this.model=model;this.threads={};this.counters={};this.objects=new tr.model.ObjectCollection(this);this.bounds=new tr.b.Range();this.sortIndex=0;};ProcessBase.compare=function(x,y){return x.sortIndex-y.sortIndex;};ProcessBase.prototype={__proto__:tr.model.EventContainer.prototype,get guid(){return this.guid_;},get stableId(){throw new Error('Not implemented');},iterateAllChildEventC [...]
-callback.call(opt_this,this.threads[tid]);for(var id in this.counters)
-callback.call(opt_this,this.counters[id]);callback.call(opt_this,this.objects);},iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){},iterateAllPersistableObjects:function(cb){cb(this);for(var tid in this.threads)
-this.threads[tid].iterateAllPersistableObjects(cb);},get numThreads(){var n=0;for(var p in this.threads){n++;}
-return n;},shiftTimestampsForward:function(amount){for(var tid in this.threads)
-this.threads[tid].shiftTimestampsForward(amount);for(var id in this.counters)
-this.counters[id].shiftTimestampsForward(amount);this.objects.shiftTimestampsForward(amount);},autoCloseOpenSlices:function(opt_maxTimestamp){for(var tid in this.threads){var thread=this.threads[tid];thread.autoCloseOpenSlices(opt_maxTimestamp);}},autoDeleteObjects:function(maxTimestamp){this.objects.autoDeleteObjects(maxTimestamp);},preInitializeObjects:function(){this.objects.preInitializeAllObjects();},initializeObjects:function(){this.objects.initializeAllObjects();},mergeKernelWithU [...]
-for(var id in this.counters){this.counters[id].updateBounds();this.bounds.addRange(this.counters[id].bounds);}
-this.objects.updateBounds();this.bounds.addRange(this.objects.bounds);},addCategoriesToDict:function(categoriesDict){for(var tid in this.threads)
-this.threads[tid].addCategoriesToDict(categoriesDict);for(var id in this.counters)
-categoriesDict[this.counters[id].category]=true;this.objects.addCategoriesToDict(categoriesDict);},findAllThreadsMatching:function(predicate,opt_this){var threads=[];for(var tid in this.threads){var thread=this.threads[tid];if(predicate.call(opt_this,thread))
-threads.push(thread);}
-return threads;},findAllThreadsNamed:function(name){var threads=this.findAllThreadsMatching(function(thread){if(!thread.name)
-return false;return thread.name===name;});return threads;},findAtMostOneThreadNamed:function(name){var threads=this.findAllThreadsNamed(name);if(threads.length===0)
-return undefined;if(threads.length>1)
-throw new Error('Expected no more than one '+name);return threads[0];},pruneEmptyContainers:function(){var threadsToKeep={};for(var tid in this.threads){var thread=this.threads[tid];if(!thread.isEmpty)
-threadsToKeep[tid]=thread;}
-this.threads=threadsToKeep;},getThread:function(tid){return this.threads[tid];},getOrCreateThread:function(tid){if(!this.threads[tid])
-this.threads[tid]=new Thread(this,tid);return this.threads[tid];},getOrCreateCounter:function(cat,name){var id=cat+'.'+name;if(!this.counters[id])
-this.counters[id]=new Counter(this,id,cat,name);return this.counters[id];},getSettingsKey:function(){throw new Error('Not implemented');},createSubSlices:function(){for(var tid in this.threads)
-this.threads[tid].createSubSlices();}};return{ProcessBase:ProcessBase};});'use strict';tr.exportTo('tr.model',function(){var Cpu=tr.model.Cpu;var ProcessBase=tr.model.ProcessBase;function Kernel(model){ProcessBase.call(this,model);this.cpus={};this.softwareMeasuredCpuCount_=undefined;};Kernel.compare=function(x,y){return 0;};Kernel.prototype={__proto__:ProcessBase.prototype,compareTo:function(that){return Kernel.compare(this,that);},get userFriendlyName(){return'Kernel';},get userFriendl [...]
-this.cpus[cpuNumber]=new Cpu(this,cpuNumber);return this.cpus[cpuNumber];},get softwareMeasuredCpuCount(){return this.softwareMeasuredCpuCount_;},set softwareMeasuredCpuCount(softwareMeasuredCpuCount){if(this.softwareMeasuredCpuCount_!==undefined&&this.softwareMeasuredCpuCount_!==softwareMeasuredCpuCount){throw new Error('Cannot change the softwareMeasuredCpuCount once it is set');}
-this.softwareMeasuredCpuCount_=softwareMeasuredCpuCount;},get bestGuessAtCpuCount(){var realCpuCount=tr.b.dictionaryLength(this.cpus);if(realCpuCount!==0)
-return realCpuCount;return this.softwareMeasuredCpuCount;},shiftTimestampsForward:function(amount){ProcessBase.prototype.shiftTimestampsForward.call(this,amount);for(var cpuNumber in this.cpus)
-this.cpus[cpuNumber].shiftTimestampsForward(amount);},updateBounds:function(){ProcessBase.prototype.updateBounds.call(this);for(var cpuNumber in this.cpus){var cpu=this.cpus[cpuNumber];cpu.updateBounds();this.bounds.addRange(cpu.bounds);}},createSubSlices:function(){ProcessBase.prototype.createSubSlices.call(this);for(var cpuNumber in this.cpus){var cpu=this.cpus[cpuNumber];cpu.createSubSlices();}},addCategoriesToDict:function(categoriesDict){ProcessBase.prototype.addCategoriesToDict.cal [...]
-this.cpus[cpuNumber].addCategoriesToDict(categoriesDict);},getSettingsKey:function(){return'kernel';},iterateAllChildEventContainers:function(callback,opt_this){ProcessBase.prototype.iterateAllChildEventContainers.call(this,callback,opt_this);for(var cpuId in this.cpus)
-callback.call(opt_this,this.cpus[cpuId]);},iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){ProcessBase.prototype.iterateAllEventsInThisContainer.call(this,eventTypePredicate,callback,opt_this);}};return{Kernel:Kernel};});'use strict';tr.exportTo('tr.model',function(){function Attribute(units){this.units=units;this.infos=[];}
-Attribute.fromDictIfPossible=function(dict,opt_model){var typeInfo=Attribute.findTypeInfoMatching(function(typeInfo){return typeInfo.metadata.type===dict.type;});if(typeInfo===undefined){if(opt_model){opt_model.importWarning({type:'attribute_parse_error',message:'Unknown attribute type \''+dict.type+'\'.'});}
-return UnknownAttribute.fromDict(dict,opt_model);}
-return typeInfo.constructor.fromDict(dict,opt_model);};Attribute.findCommonTraits=function(attributes,opt_model){var commonTraits;for(var i=0;i<attributes.length;i++){var attribute=attributes[i];if(attribute===undefined)
-continue;var attributeConstructor=attribute.constructor;var attributeUnits=attribute.units;if(commonTraits===undefined){commonTraits={constructor:attributeConstructor,units:attributeUnits};}else if(attributeConstructor!==commonTraits.constructor){if(opt_model){opt_model.importWarning({type:'attribute_parse_error',message:'Attribute with different types: '+
-commonTraits.constructor+' and '+attributeConstructor+'.'});}
-commonTraits={constructor:UnknownAttribute,units:undefined};break;}else if(attributeUnits!==commonTraits.units){if(opt_model){opt_model.importWarning({type:'attribute_parse_error',message:'Attribute with different units: '+commonTraits.units+' and '+attributeUnits+'.'});}
-commonTraits={constructor:UnknownAttribute,units:undefined};break;}}
-return commonTraits;};Attribute.aggregate=function(childAttributes,existingParentAttribute,opt_model){var definedChildAttributes=childAttributes.filter(function(childAttribute){return childAttribute!==undefined;});var traits=Attribute.findCommonTraits(definedChildAttributes,opt_model);if(traits===undefined)
-return existingParentAttribute;var constructor=traits.constructor;if(constructor.merge===undefined)
-return existingParentAttribute;var mergedAttribute=constructor.merge(definedChildAttributes,traits.units,opt_model);if(existingParentAttribute===undefined)
-return mergedAttribute;existingParentAttribute.useMergedAttribute(mergedAttribute,opt_model);return existingParentAttribute;}
-Attribute.fromTraceValue=function(dict,opt_model){throw new Error('Not implemented');};Attribute.prototype.useMergedAttribute=function(mergedAttribute,opt_model){if(mergedAttribute.constructor!==this.constructor){if(opt_model){opt_model.importWarning({type:'attribute_parse_error',message:'Attribute with different types: '+this.constructor+' and '+mergedAttribute.constructor+'.'});}}else if(mergedAttribute.units!==this.units){if(opt_model){opt_model.importWarning({type:'attribute_parse_er [...]
-throw new Error('Attributes must have fromDict method');if(!e.typeInfo.metadata.type)
-throw new Error('Attributes must provide type');if(e.typeInfo.constructor.prototype.constructor!==e.typeInfo.constructor)
-throw new Error('Attribute prototypes must provide constructor.');});function ScalarAttribute(units,value){Attribute.call(this,units);this.value=value;}
-ScalarAttribute.fromDict=function(dict){return new ScalarAttribute(dict.units,parseInt(dict.value,16));};ScalarAttribute.merge=function(childAttributes,units){var sum=0;childAttributes.forEach(function(childAttribute){sum+=childAttribute.value;});return new ScalarAttribute(units,sum);}
-ScalarAttribute.prototype.__proto__=Attribute.prototype;Attribute.register(ScalarAttribute,{type:'scalar'});function StringAttribute(units,value){Attribute.call(this,units);this.value=value;}
-StringAttribute.fromDict=function(dict){return new StringAttribute(dict.units,dict.value);};Attribute.register(StringAttribute,{type:'string'});function UnknownAttribute(units,opt_value){Attribute.call(this,units,opt_value);this.value=opt_value;}
-UnknownAttribute.fromDict=function(dict){return new UnknownAttribute(dict.units);};UnknownAttribute.prototype.__proto__=Attribute.prototype;function AttributeInfo(type,message){this.type=type;this.message=message;}
-var AttributeInfoType={INFORMATION:0,WARNING:1,LINK:2};return{Attribute:Attribute,ScalarAttribute:ScalarAttribute,StringAttribute:StringAttribute,UnknownAttribute:UnknownAttribute,AttributeInfo:AttributeInfo,AttributeInfoType:AttributeInfoType};});'use strict';tr.exportTo('tr.model',function(){function ContainerMemoryDump(start){tr.model.TimedEvent.call(this,start);this.memoryAllocatorDumps_=undefined;this.memoryAllocatorDumpsByFullName_=undefined;};ContainerMemoryDump.prototype={__proto [...]
-return undefined;if(this.memoryAllocatorDumpsByFullName_===undefined){var index={};function addDumpsToIndex(dumps){dumps.forEach(function(dump){index[dump.fullName]=dump;addDumpsToIndex(dump.children);});};addDumpsToIndex(this.memoryAllocatorDumps_);this.memoryAllocatorDumpsByFullName_=index;}
-return this.memoryAllocatorDumpsByFullName_[fullName];}};return{ContainerMemoryDump:ContainerMemoryDump};});'use strict';tr.exportTo('tr.model',function(){function MemoryAllocatorDump(containerMemoryDump,fullName,opt_guid){this.fullName=fullName;this.parent=undefined;this.children=[];this.attributes={};this.containerMemoryDump=containerMemoryDump;this.owns=undefined;this.ownedBy=[];this.retains=[];this.retainedBy=[];this.guid=opt_guid;};MemoryAllocatorDump.prototype={get name(){return th [...]
-return true;dump=dump.parent;}
-return false;},addAttribute:function(name,value){if(name in this.attributes)
-throw new Error('Duplicate attribute name: '+name+'.');this.attributes[name]=value;},aggregateAttributes:function(opt_model){var attributes={};this.children.forEach(function(child){child.aggregateAttributes(opt_model);tr.b.iterItems(child.attributes,function(name){attributes[name]=true;},this);},this);tr.b.iterItems(attributes,function(name){var childAttributes=this.children.map(function(child){return child.attributes[name];},this);var currentAttribute=this.attributes[name];this.attribut [...]
-return undefined;if(!(sizeAttr instanceof tr.model.ScalarAttribute)){if(opt_model!==undefined){opt_model.importWarning({type:'memory_dump_parse_error',message:'\''+sizeAttrName+'\' attribute of memory allocator '+'dump \''+memoryAllocatorDump.fullName+'\' is not a scalar.'});}
-return undefined;}
-return sizeAttr;}};function MemoryAllocatorDumpLink(source,target,opt_importance){this.source=source;this.target=target;this.importance=opt_importance;}
-return{MemoryAllocatorDump:MemoryAllocatorDump,MemoryAllocatorDumpLink:MemoryAllocatorDumpLink};});'use strict';tr.exportTo('tr.model',function(){var DISCOUNTED_ALLOCATOR_NAMES=['winheap','malloc'];function ProcessMemoryDump(globalMemoryDump,process,start){tr.model.ContainerMemoryDump.call(this,start);this.process=process;this.globalMemoryDump=globalMemoryDump;this.totalResidentBytes=undefined;this.vmRegions_=undefined;this.tracingMemoryDiscounted_=false;};ProcessMemoryDump.prototype={__ [...]
-return undefined;var total=0;this.mostRecentVmRegions.forEach(function(vmRegion){var statValue=vmRegion.byteStats[statName];if(statValue===undefined)
-return;total+=statValue;});return total;},discountTracingOverhead:function(opt_model){if(this.tracingMemoryDiscounted_)
-return;this.tracingMemoryDiscounted_=true;var tracingDump=this.getMemoryAllocatorDumpByFullName('tracing');if(tracingDump===undefined)
-return;var tracingResidentSizeAttr=tracingDump.getValidSizeAttributeOrUndefined('resident_size',opt_model);if(tracingResidentSizeAttr!==undefined){var tracingResidentSize=tracingResidentSizeAttr.value;if(this.totalResidentBytes!==undefined)
-this.totalResidentBytes-=tracingResidentSize;if(this.vmRegions_!==undefined){this.vmRegions_.push(VMRegion.fromDict({mappedFile:'[discounted tracing overhead]',byteStats:{privateDirtyResident:-tracingResidentSize,proportionalResident:-tracingResidentSize}}));}}
-var tracingSizeAttr=tracingDump.getValidSizeAttributeOrUndefined('size',opt_model);if(tracingSizeAttr!==undefined){var tracingSize=tracingSizeAttr.value;var hasDiscountedFromAllocatorDumps=DISCOUNTED_ALLOCATOR_NAMES.some(function(allocatorName){var dump=this.getMemoryAllocatorDumpByFullName(allocatorName);if(dump===undefined)
-return false;var overheadSizeAttribute=new tr.model.ScalarAttribute('bytes',-tracingSize);var overheadDump=new tr.model.MemoryAllocatorDump(this,allocatorName+'/discounted_tracing_overhead');overheadDump.parent=dump;overheadDump.addAttribute('size',overheadSizeAttribute);dump.children.push(overheadDump);var dumpSizeAttr=dump.getValidSizeAttributeOrUndefined('size',opt_model);if(dumpSizeAttr!==undefined)
-dumpSizeAttr.value-=tracingSize;return true;},this);if(hasDiscountedFromAllocatorDumps)
-this.memoryAllocatorDumps=this.memoryAllocatorDumps;}}};ProcessMemoryDump.hookUpMostRecentVmRegionsLinks=function(processDumps){var mostRecentVmRegions=undefined;processDumps.forEach(function(processDump){if(processDump.vmRegions_!==undefined)
-mostRecentVmRegions=processDump.vmRegions_;processDump.mostRecentVmRegions=mostRecentVmRegions;});};function VMRegion(startAddress,sizeInBytes,protectionFlags,mappedFile,byteStats){this.startAddress=startAddress;this.sizeInBytes=sizeInBytes;this.protectionFlags=protectionFlags;this.mappedFile=mappedFile;this.byteStats=byteStats;};VMRegion.PROTECTION_FLAG_READ=4;VMRegion.PROTECTION_FLAG_WRITE=2;VMRegion.PROTECTION_FLAG_EXECUTE=1;VMRegion.prototype={get protectionFlagsToString(){if(this.pr [...]
-return undefined;return((this.protectionFlags&VMRegion.PROTECTION_FLAG_READ?'r':'-')+
-(this.protectionFlags&VMRegion.PROTECTION_FLAG_WRITE?'w':'-')+
-(this.protectionFlags&VMRegion.PROTECTION_FLAG_EXECUTE?'x':'-'));}};VMRegion.fromDict=function(dict){return new VMRegion(dict.startAddress,dict.sizeInBytes,dict.protectionFlags,dict.mappedFile,VMRegionByteStats.fromDict(dict.byteStats));};function VMRegionByteStats(privateCleanResident,privateDirtyResident,sharedCleanResident,sharedDirtyResident,proportionalResident,swapped){this.privateCleanResident=privateCleanResident;this.privateDirtyResident=privateDirtyResident;this.sharedCleanResi [...]
-VMRegionByteStats.fromDict=function(dict){return new VMRegionByteStats(dict.privateCleanResident,dict.privateDirtyResident,dict.sharedCleanResident,dict.sharedDirtyResident,dict.proportionalResident,dict.swapped);}
-tr.model.EventRegistry.register(ProcessMemoryDump,{name:'processMemoryDump',pluralName:'processMemoryDumps',singleViewElementName:'tr-ui-a-single-process-memory-dump-sub-view',multiViewElementName:'tr-ui-a-multi-process-memory-dump-sub-view'});return{ProcessMemoryDump:ProcessMemoryDump,VMRegion:VMRegion,VMRegionByteStats:VMRegionByteStats};});'use strict';tr.exportTo('tr.model',function(){var ProcessBase=tr.model.ProcessBase;var ProcessInstantEvent=tr.model.ProcessInstantEvent;var Frame= [...]
-throw new Error('model must be provided');if(pid===undefined)
-throw new Error('pid must be provided');tr.model.ProcessBase.call(this,model);this.pid=pid;this.name=undefined;this.labels=[];this.instantEvents=[];this.memoryDumps=[];this.frames=[];};Process.compare=function(x,y){var tmp=tr.model.ProcessBase.compare(x,y);if(tmp)
-return tmp;tmp=tr.b.comparePossiblyUndefinedValues(x.name,y.name,function(x,y){return x.localeCompare(y);});if(tmp)
-return tmp;tmp=tr.b.compareArrays(x.labels,y.labels,function(x,y){return x.localeCompare(y);});if(tmp)
-return tmp;return x.pid-y.pid;};Process.prototype={__proto__:tr.model.ProcessBase.prototype,get stableId(){return this.pid;},compareTo:function(that){return Process.compare(this,that);},iterateAllChildEventContainers:function(callback,opt_this){ProcessBase.prototype.iterateAllChildEventContainers.call(this,callback,opt_this);},iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){ProcessBase.prototype.iterateAllEventsInThisContainer.call(this,eventTypePredicate,c [...]
-this.instantEvents.forEach(callback,opt_this);if(eventTypePredicate.call(opt_this,Frame))
-this.frames.forEach(callback,opt_this);if(eventTypePredicate.call(opt_this,ProcessMemoryDump))
-this.memoryDumps.forEach(callback,opt_this);},pushInstantEvent:function(instantEvent){this.instantEvents.push(instantEvent);},addLabelIfNeeded:function(labelName){for(var i=0;i<this.labels.length;i++){if(this.labels[i]===labelName)
-return;}
-this.labels.push(labelName);},get userFriendlyName(){var res;if(this.name)
-res=this.name+' (pid '+this.pid+')';else
-res='Process '+this.pid;if(this.labels.length)
-res+=': '+this.labels.join(', ');return res;},get userFriendlyDetails(){if(this.name)
-return this.name+' (pid '+this.pid+')';return'pid: '+this.pid;},getSettingsKey:function(){if(!this.name)
-return undefined;if(!this.labels.length)
-return'processes.'+this.name;return'processes.'+this.name+'.'+this.labels.join('.');},shiftTimestampsForward:function(amount){for(var id in this.instantEvents)
-this.instantEvents[id].start+=amount;for(var i=0;i<this.frames.length;i++)
-this.frames[i].shiftTimestampsForward(amount);for(var i=0;i<this.memoryDumps.length;i++)
-this.memoryDumps[i].shiftTimestampsForward(amount);tr.model.ProcessBase.prototype.shiftTimestampsForward.apply(this,arguments);},updateBounds:function(){tr.model.ProcessBase.prototype.updateBounds.apply(this);for(var i=0;i<this.frames.length;i++)
-this.frames[i].addBoundsToRange(this.bounds);for(var i=0;i<this.memoryDumps.length;i++)
-this.memoryDumps[i].addBoundsToRange(this.bounds);},sortMemoryDumps:function(){this.memoryDumps.sort(function(x,y){return x.start-y.start;});tr.model.ProcessMemoryDump.hookUpMostRecentVmRegionsLinks(this.memoryDumps);}};return{Process:Process};});'use strict';tr.exportTo('tr.model',function(){function Sample(cpu,thread,title,start,leafStackFrame,opt_weight,opt_args){tr.model.TimedEvent.call(this,start);this.title=title;this.cpu=cpu;this.thread=thread;this.leafStackFrame=leafStackFrame;th [...]
-Sample.prototype={__proto__:tr.model.TimedEvent.prototype,get colorId(){return this.leafStackFrame.colorId;},get stackTrace(){return this.leafStackFrame.stackTrace;},getUserFriendlyStackTrace:function(){return this.leafStackFrame.getUserFriendlyStackTrace();},get userFriendlyName(){return'Sample '+' at '+
-tr.b.units.tsString(this.start);}};tr.model.EventRegistry.register(Sample,{name:'sample',pluralName:'samples',singleViewElementName:'tr-ui-a-single-sample-sub-view',multiViewElementName:'tr-ui-a-multi-sample-sub-view'});return{Sample:Sample};});'use strict';tr.exportTo('tr.model',function(){function StackFrame(parentFrame,id,category,title,colorId){if(id===undefined)
-throw new Error('id must be given');this.parentFrame_=parentFrame;this.id=id;this.category=category||'';this.title=title;this.colorId=colorId;this.children=[];if(this.parentFrame_)
-this.parentFrame_.addChild(this);}
-StackFrame.prototype={get parentFrame(){return this.parentFrame_;},set parentFrame(parentFrame){if(this.parentFrame_)
-this.parentFrame_.removeChild(this);this.parentFrame_=parentFrame;if(this.parentFrame_)
-this.parentFrame_.addChild(this);},addChild:function(child){this.children.push(child);},removeChild:function(child){var i=this.children.indexOf(child.id);if(i==-1)
-throw new Error('omg');this.children.splice(i,1);},removeAllChildren:function(){for(var i=0;i<this.children.length;i++)
-this.children[i].parentFrame_=undefined;this.children.splice(0,this.children.length);},get stackTrace(){var stack=[];var cur=this;while(cur){stack.push(cur);cur=cur.parentFrame;}
-stack.reverse();return stack;},getUserFriendlyStackTrace:function(){return this.stackTrace.map(function(x){return x.category+': '+x.title;});}};return{StackFrame:StackFrame};});'use strict';tr.exportTo('tr.model',function(){var InstantEventType={GLOBAL:1,PROCESS:2};function InstantEvent(category,title,colorId,start,args){tr.model.TimedEvent.call(this);this.category=category||'';this.title=title;this.colorId=colorId;this.start=start;this.args=args;this.type=undefined;};InstantEvent.protot [...]
-this.tsString(start);}};function ProcessInstantEvent(category,title,colorId,start,args){InstantEvent.apply(this,arguments);this.type=InstantEventType.PROCESS;};ProcessInstantEvent.prototype={__proto__:InstantEvent.prototype,get userFriendlyName(){return'Process-level instant event '+this.title+' @ '+
-this.tsString(start);}};tr.model.EventRegistry.register(InstantEvent,{name:'instantEvent',pluralName:'instantEvents',singleViewElementName:'tr-ui-a-single-instant-event-sub-view',multiViewElementName:'tr-ui-a-multi-instant-event-sub-view'});return{GlobalInstantEvent:GlobalInstantEvent,ProcessInstantEvent:ProcessInstantEvent,InstantEventType:InstantEventType,InstantEvent:InstantEvent};});'use strict';tr.exportTo('tr.model',function(){function FlowEvent(category,id,title,colorId,start,args [...]
-this.duration=opt_duration;}
-FlowEvent.prototype={__proto__:tr.model.TimedEvent.prototype,get userFriendlyName(){return'Flow event named '+this.title+' at '+
-tr.b.units.tsString(this.timestamp);}};tr.model.EventRegistry.register(FlowEvent,{name:'flowEvent',pluralName:'flowEvents',singleViewElementName:'tr-ui-a-single-flow-event-sub-view',multiViewElementName:'tr-ui-a-multi-flow-event-sub-view'});return{FlowEvent:FlowEvent};});'use strict';tr.exportTo('tr.b.units',function(){var UNIT_PREFIXES=['','Ki','Mi','Gi','Ti'];function SizeInBytes(numBytes){this.numBytes=numBytes;};SizeInBytes.prototype={toString:function(){return SizeInBytes.format(thi [...]
-var i=0;while(numBytes>=1024&&i<UNIT_PREFIXES.length-1){numBytes/=1024;i++;}
-return signPrefix+numBytes.toFixed(1)+' '+UNIT_PREFIXES[i]+'B';};return{SizeInBytes:SizeInBytes};});'use strict';tr.exportTo('tr.model',function(){function GlobalMemoryDump(model,start){tr.model.ContainerMemoryDump.call(this,start);this.model=model;this.processMemoryDumps={};}
-var SIZE_ATTRIBUTE_NAME='size';GlobalMemoryDump.prototype={__proto__:tr.model.ContainerMemoryDump.prototype,get userFriendlyName(){return'Global memory dump at '+tr.b.units.tsString(this.start);},calculateGraphAttributes:function(){this.calculateSizes();this.aggregateAttributes();this.discountTracingOverhead();},calculateSizes:function(){this.traverseAllocatorDumpsInDepthFirstPostOrder(this.calculateMemoryAllocatorDumpSize_);},calculateMemoryAllocatorDumpSize_:function(dump){var shouldDe [...]
-return 0;shouldDefineSize=true;return attr.value;}
-var sizeAttribute=dump.getValidSizeAttributeOrUndefined(SIZE_ATTRIBUTE_NAME,this.model);var size=0;var infos=[];var checkDependentSizeIsConsistent=function(){};if(sizeAttribute!==undefined){size=sizeAttribute.value;shouldDefineSize=true;checkDependentSizeIsConsistent=function(dependentSize,dependentName){if(size>=dependentSize)
-return;var messageSuffix=' ('+tr.b.units.SizeInBytes.format(size)+') is less than '+dependentName+' ('+
-tr.b.units.SizeInBytes.format(dependentSize)+').';this.model.importWarning({type:'memory_dump_parse_error',message:'Size provided by memory allocator dump \''+
-dump.fullName+'\''+messageSuffix});infos.push(new tr.model.AttributeInfo(tr.model.AttributeInfoType.WARNING,'Size provided by this memory allocator dump'+messageSuffix));}.bind(this);}
-var aggregatedChildrenSize=0;var allOverlaps={};dump.children.forEach(function(childDump){function aggregateDescendantDump(descendantDump){var ownedDumpLink=descendantDump.owns;if(ownedDumpLink!==undefined&&ownedDumpLink.target.isDescendantOf(dump)){var ownedDescendantDump=ownedDumpLink.target;var ownedChildDump=ownedDescendantDump;while(ownedChildDump.parent!==dump)
-ownedChildDump=ownedChildDump.parent;if(childDump!==ownedChildDump){var overlap=getDependencySize(descendantDump);if(overlap>0){var ownedChildOverlaps=allOverlaps[ownedChildDump.name];if(ownedChildOverlaps===undefined)
-allOverlaps[ownedChildDump.name]=ownedChildOverlaps={};var previousTotalOverlap=ownedChildOverlaps[childDump.name]||0;var updatedTotalOverlap=previousTotalOverlap+overlap;ownedChildOverlaps[childDump.name]=updatedTotalOverlap;}}
-return;}
-if(descendantDump.children.length===0){aggregatedChildrenSize+=getDependencySize(descendantDump);return;}
-descendantDump.children.forEach(aggregateDescendantDump);}
-aggregateDescendantDump(childDump);});dump.children.forEach(function(childDump){var childOverlaps=allOverlaps[childDump.name];if(childOverlaps===undefined)
-return;var message=tr.b.dictionaryValues(tr.b.mapItems(childOverlaps,function(ownerChildName,overlap){return'This memory allocator dump overlaps with its sibling \''+
-ownerChildName+'\' ('+
-tr.b.units.SizeInBytes.format(overlap)+').';})).join(' ');childDump.attributes[SIZE_ATTRIBUTE_NAME].infos.push(new tr.model.AttributeInfo(tr.model.AttributeInfoType.INFORMATION,message));});checkDependentSizeIsConsistent(aggregatedChildrenSize,'the aggregated size of its children');var largestOwnerSize=0;dump.ownedBy.forEach(function(ownershipLink){var owner=ownershipLink.source;var ownerSize=getDependencySize(owner);largestOwnerSize=Math.max(largestOwnerSize,ownerSize);});checkDependent [...]
-size=Math.max(size,aggregatedChildrenSize,largestOwnerSize);var sizeAttribute=new tr.model.ScalarAttribute('bytes',size);sizeAttribute.infos=infos;dump.attributes[SIZE_ATTRIBUTE_NAME]=sizeAttribute;if(aggregatedChildrenSize<size&&dump.children!==undefined&&dump.children.length>0){var virtualChild=new tr.model.MemoryAllocatorDump(dump.containerMemoryDump,dump.fullName+'/<unspecified>');virtualChild.parent=dump;dump.children.unshift(virtualChild);virtualChild.attributes[SIZE_ATTRIBUTE_NAME [...]
-return;memoryAllocatorDumps.forEach(fn,this);});},traverseAllocatorDumpsInDepthFirstPostOrder:function(fn){var visitedDumps=new WeakSet();var openDumps=new WeakSet();function visit(dump){if(visitedDumps.has(dump))
-return;if(openDumps.has(dump))
-throw new Error(dump.userFriendlyName+' contains a cycle');openDumps.add(dump);dump.ownedBy.forEach(function(ownershipLink){visit.call(this,ownershipLink.source);},this);dump.children.forEach(visit,this);fn.call(this,dump);openDumps.delete(dump);visitedDumps.add(dump);}
-this.iterateRootAllocatorDumps(visit);}};tr.model.EventRegistry.register(GlobalMemoryDump,{name:'globalMemoryDump',pluralName:'globalMemoryDumps',singleViewElementName:'tr-ui-a-single-global-memory-dump-sub-view',multiViewElementName:'tr-ui-a-multi-global-memory-dump-sub-view'});return{GlobalMemoryDump:GlobalMemoryDump};});'use strict';tr.exportTo('tr.model',function(){function EventInfo(title,description,docLinks){this.title=title;this.description=description;this.docLinks=docLinks;this [...]
-return{EventInfo:EventInfo};});'use strict';tr.exportTo('tr.model',function(){function Alert(info,start,opt_associatedEvents,opt_args){tr.model.TimedEvent.call(this,start);this.info=info;this.args=opt_args||{};this.associatedEvents=new tr.c.Selection(opt_associatedEvents);this.associatedEvents.forEach(function(event){event.associatedAlerts.push(this);},this);}
-Alert.prototype={__proto__:tr.model.TimedEvent.prototype,get title(){return this.info.title;},get colorId(){return this.info.colorId;},get userFriendlyName(){return'Alert '+this.title+' at '+
-tr.b.units.tsString(this.start);}};tr.model.EventRegistry.register(Alert,{name:'alert',pluralName:'alerts',singleViewElementName:'tr-ui-a-alert-sub-view',multiViewElementName:'tr-ui-a-alert-sub-view'});return{Alert:Alert};});'use strict';tr.exportTo('tr.model',function(){function InteractionRecord(title,colorId,start,duration){tr.model.TimedEvent.call(this,start);this.title=title;this.colorId=colorId;this.duration=duration;this.args={};this.associatedEvents=new tr.c.Selection();}
-InteractionRecord.prototype={__proto__:tr.model.TimedEvent.prototype,get subSlices(){return[];},get userFriendlyName(){return this.title+' interaction at '+
-tr.b.units.tsString(this.start);}};tr.model.EventRegistry.register(InteractionRecord,{name:'interaction',pluralName:'interactions',singleViewElementName:'tr-ui-a-single-interaction-record-sub-view',multiViewElementName:'tr-ui-a-multi-interaction-record-sub-view'});return{InteractionRecord:InteractionRecord};});'use strict';tr.exportTo('tr.model',function(){function ModelIndices(model){this.flowEventsById_={};model.flowEvents.forEach(function(fe){if(fe.id!==undefined){if(!this.flowEventsB [...]
-this.flowEventsById_[fe.id].push(fe);}},this);}
-ModelIndices.prototype={addEventWithId:function(id,event){if(!this.flowEventsById_.hasOwnProperty(id)){this.flowEventsById_[id]=new Array();}
-this.flowEventsById_[id].push(event);},getFlowEventsWithId:function(id){if(!this.flowEventsById_.hasOwnProperty(id))
-return[];return this.flowEventsById_[id];}};return{ModelIndices:ModelIndices};});'use strict';tr.exportTo('tr',function(){var Importer=tr.importer.Importer;var Process=tr.model.Process;var Device=tr.model.Device;var Kernel=tr.model.Kernel;var GlobalMemoryDump=tr.model.GlobalMemoryDump;var GlobalInstantEvent=tr.model.GlobalInstantEvent;var FlowEvent=tr.model.FlowEvent;var Alert=tr.model.Alert;var InteractionRecord=tr.model.InteractionRecord;var Sample=tr.model.Sample;function ImportOption [...]
-ImportOptions.fromArguments=function(args,argsStartIndex){var arg0=args[argsStartIndex+0];if(typeof arg0==='object'){if(!(arg0 instanceof ImportOptions))
-throw new Error('Unexpected');return arg0;}
-var options=new ImportOptions();if(args[argsStartIndex]!==undefined)
-options.shiftWorldToZero=args[argsStartIndex];if(args[argsStartIndex+1]!==undefined)
-options.pruneEmptyContainers=args[argsStartIndex+1];if(args[argsStartIndex+2])
-options.customizeModelCallback=args[argsStartIndex+2];return options;}
-function ClockSyncRecord(name,ts,args){this.name=name;this.ts=ts;this.args=args;}
-function Model(opt_eventData,opt_options){tr.model.EventContainer.call(this);tr.b.EventTarget.decorate(this);this.faviconHue='blue';this.device=new Device(this);this.kernel=new Kernel(this);this.processes={};this.metadata=[];this.categories=[];this.bounds=new tr.b.Range();this.instantEvents=[];this.flowEvents=[];this.clockSyncRecords=[];this.intrinsicTimeUnit_=undefined;this.stackFrames={};this.samples=[];this.alerts=[];this.interaction_records=[];this.flowIntervalTree=new tr.b.IntervalT [...]
-this.importTraces([opt_eventData],options);}
-Model.prototype={__proto__:tr.model.EventContainer.prototype,iterateAllEventsInThisContainer:function(eventTypePredicate,callback,opt_this){if(eventTypePredicate.call(opt_this,GlobalMemoryDump))
-this.globalMemoryDumps.forEach(callback,opt_this);if(eventTypePredicate.call(opt_this,GlobalInstantEvent))
-this.instantEvents.forEach(callback,opt_this);if(eventTypePredicate.call(opt_this,FlowEvent))
-this.flowEvents.forEach(callback,opt_this);if(eventTypePredicate.call(opt_this,Alert))
-this.alerts.forEach(callback,opt_this);if(eventTypePredicate.call(opt_this,InteractionRecord))
-this.interaction_records.forEach(callback,opt_this);if(eventTypePredicate.call(opt_this,Sample))
-this.samples.forEach(callback,opt_this);},iterateAllChildEventContainers:function(callback,opt_this){callback.call(opt_this,this.device);callback.call(opt_this,this.kernel);for(var pid in this.processes)
-callback.call(opt_this,this.processes[pid]);},iterateAllPersistableObjects:function(callback){this.kernel.iterateAllPersistableObjects(callback);for(var pid in this.processes)
-this.processes[pid].iterateAllPersistableObjects(callback);},updateBounds:function(){this.bounds.reset();var bounds=this.bounds;this.iterateAllChildEventContainers(function(ec){ec.updateBounds();bounds.addRange(ec.bounds);});this.iterateAllEventsInThisContainer(function(eventConstructor){return true;},function(event){event.addBoundsToRange(bounds);});},shiftWorldToZero:function(){var shiftAmount=-this.bounds.min;this.iterateAllChildEventContainers(function(ec){ec.shiftTimestampsForward(s [...]
-n++;return n;},getProcess:function(pid){return this.processes[pid];},getOrCreateProcess:function(pid){if(!this.processes[pid])
-this.processes[pid]=new Process(this,pid);return this.processes[pid];},pushInstantEvent:function(instantEvent){this.instantEvents.push(instantEvent);},addStackFrame:function(stackFrame){if(this.stackFrames[stackFrame.id])
-throw new Error('Stack frame already exists');this.stackFrames[stackFrame.id]=stackFrame;return stackFrame;},addInteractionRecord:function(ir1){this.interaction_records.push(ir1);},getClockSyncRecordsNamed:function(name){return this.clockSyncRecords.filter(function(x){return x.name===name;});},updateCategories_:function(){var categoriesDict={};this.device.addCategoriesToDict(categoriesDict);this.kernel.addCategoriesToDict(categoriesDict);for(var pid in this.processes)
-this.processes[pid].addCategoriesToDict(categoriesDict);this.categories=[];for(var category in categoriesDict)
-if(category!='')
-this.categories.push(category);},getAllThreads:function(){var threads=[];for(var tid in this.kernel.threads){threads.push(process.threads[tid]);}
-for(var pid in this.processes){var process=this.processes[pid];for(var tid in process.threads){threads.push(process.threads[tid]);}}
-return threads;},getAllProcesses:function(){var processes=[];for(var pid in this.processes)
-processes.push(this.processes[pid]);return processes;},getAllCounters:function(){var counters=[];counters.push.apply(counters,tr.b.dictionaryValues(this.device.counters));counters.push.apply(counters,tr.b.dictionaryValues(this.kernel.counters));for(var pid in this.processes){var process=this.processes[pid];for(var tid in process.counters){counters.push(process.counters[tid]);}}
-return counters;},getAnnotationByGUID:function(guid){return this.annotationsByGuid_[guid];},addAnnotation:function(annotation){if(!annotation.guid)
-throw new Error('Annotation with undefined guid given');this.annotationsByGuid_[annotation.guid]=annotation;tr.b.dispatchSimpleEvent(this,'annotationChange');},removeAnnotation:function(annotation){this.annotationsByGuid_[annotation.guid].onRemove();delete this.annotationsByGuid_[annotation.guid];tr.b.dispatchSimpleEvent(this,'annotationChange');},getAllAnnotations:function(){return tr.b.dictionaryValues(this.annotationsByGuid_);},findAllThreadsNamed:function(name){var namedThreads=[];na [...]
-return namedThreads;},createImporter_:function(eventData){var importerConstructor=tr.importer.Importer.findImporterFor(eventData);if(!importerConstructor)
-throw new Error('Could not find an importer for the provided eventData.');var importer=new importerConstructor(this,eventData);return importer;},importTraces:function(traces,opt_options){var progressMeter={update:function(msg){}};var options=ImportOptions.fromArguments(arguments,1);var task=this.createImportTracesTask(progressMeter,traces,options);tr.b.Task.RunSynchronously(task);},importTracesWithProgressDialog:function(traces,opt_options){var options=ImportOptions.fromArguments(argumen [...]
-overlay.visible=true;var task=this.createImportTracesTask(overlay,traces,options);var promise=tr.b.Task.RunWhenIdle(task);promise.then(function(){overlay.visible=false;},function(err){overlay.visible=false;});return promise;},hasEventDataDecoder_:function(importers){if(importers.length===0)
-return false;for(var i=0;i<importers.length;++i){if(!importers[i].isTraceDataContainer())
-return true;}
-return false;},createImportTracesTask:function(progressMeter,traces,opt_options){var options=ImportOptions.fromArguments(arguments,2);if(this.importing_)
-throw new Error('Already importing.');this.importing_=true;var importTask=new tr.b.Task(function(){progressMeter.update('I will now import your traces for you...');},this);var lastTask=importTask;var importers=[];lastTask=lastTask.after(function(){traces=traces.slice(0);progressMeter.update('Creating importers...');for(var i=0;i<traces.length;++i)
-importers.push(this.createImporter_(traces[i]));for(var i=0;i<importers.length;i++){var subtraces=importers[i].extractSubtraces();for(var j=0;j<subtraces.length;j++){try{traces.push(subtraces[j]);importers.push(this.createImporter_(subtraces[j]));}catch(error){console.warn(error.name+': '+error.message);continue;}}}
-if(traces.length&&!this.hasEventDataDecoder_(importers)){throw new Error('Could not find an importer for '+'the provided eventData.');}
-importers.sort(function(x,y){return x.importPriority-y.importPriority;});},this);lastTask=lastTask.after(function(task){importers.forEach(function(importer,index){task.subTask(function(){progressMeter.update('Importing '+(index+1)+' of '+importers.length);importer.importEvents();},this);},this);},this);if(options.customizeModelCallback){lastTask=lastTask.after(function(task){options.customizeModelCallback(this);},this);}
-lastTask=lastTask.after(function(task){importers.forEach(function(importer,index){progressMeter.update('Importing sample data '+(index+1)+'/'+importers.length);importer.importSampleData();},this);},this);lastTask=lastTask.after(function(){progressMeter.update('Autoclosing open slices...');this.samples.sort(function(x,y){return x.start-y.start;});this.updateBounds();this.kernel.autoCloseOpenSlices(this.bounds.max);for(var pid in this.processes)
-this.processes[pid].autoCloseOpenSlices(this.bounds.max);this.kernel.createSubSlices();for(var pid in this.processes)
-this.processes[pid].createSubSlices();},this);lastTask=lastTask.after(function(task){importers.forEach(function(importer,index){progressMeter.update('Finalizing import '+(index+1)+'/'+importers.length);importer.finalizeImport();},this);},this);lastTask=lastTask.after(function(){progressMeter.update('Initializing objects (step 1/2)...');for(var pid in this.processes)
-this.processes[pid].preInitializeObjects();},this);if(options.pruneEmptyContainers){lastTask=lastTask.after(function(){progressMeter.update('Pruning empty containers...');this.kernel.pruneEmptyContainers();for(var pid in this.processes){this.processes[pid].pruneEmptyContainers();}},this);}
-lastTask=lastTask.after(function(){progressMeter.update('Merging kernel with userland...');for(var pid in this.processes)
-this.processes[pid].mergeKernelWithUserland();},this);var auditors=[];lastTask=lastTask.after(function(){progressMeter.update('Adding arbitrary data to model...');auditors=options.auditorConstructors.map(function(auditorConstructor){return new auditorConstructor(this);},this);auditors.forEach(function(auditor){auditor.runAnnotate();});},this);lastTask=lastTask.after(function(){progressMeter.update('Computing final world bounds...');this.updateBounds();this.updateCategories_();if(options. [...]
-this.shiftWorldToZero();},this);lastTask=lastTask.after(function(){progressMeter.update('Building flow event map...');for(var i=0;i<this.flowEvents.length;++i){var flowEvent=this.flowEvents[i];this.flowIntervalTree.insert(flowEvent);}
-this.flowIntervalTree.updateHighValues();},this);lastTask=lastTask.after(function(){progressMeter.update('Joining object refs...');for(var i=0;i<importers.length;i++)
-importers[i].joinRefs();},this);lastTask=lastTask.after(function(){progressMeter.update('Cleaning up undeleted objects...');for(var pid in this.processes)
-this.processes[pid].autoDeleteObjects(this.bounds.max);},this);lastTask=lastTask.after(function(){progressMeter.update('Sorting memory dumps...');this.globalMemoryDumps.sort(function(x,y){return x.start-y.start;});for(var pid in this.processes)
-this.processes[pid].sortMemoryDumps();},this);lastTask=lastTask.after(function(){progressMeter.update('Calculating memory dump graph attributes...');this.globalMemoryDumps.forEach(function(dump){dump.calculateGraphAttributes();});},this);lastTask=lastTask.after(function(){progressMeter.update('Initializing objects (step 2/2)...');for(var pid in this.processes)
-this.processes[pid].initializeObjects();},this);lastTask=lastTask.after(function(){progressMeter.update('Building flow event indices...');this.modelIndices=new tr.model.ModelIndices(this);},this);lastTask=lastTask.after(function(){progressMeter.update('Running auditors...');auditors.forEach(function(auditor){auditor.runAudit();});this.interaction_records.sort(function(x,y){return x.start-y.start;});this.alerts.sort(function(x,y){return x.start-y.start;});this.updateBounds();},this);lastT [...]
-return;console.warn(data.message);this.reportedImportWarnings_[data.type]=true;},get intrinsicTimeUnit(){if(this.intrinsicTimeUnit_===undefined)
-return tr.b.units.Time.supportedUnits.ms;return this.intrinsicTimeUnit_;},set intrinsicTimeUnit(value){if(this.intrinsicTimeUnit_===value)
-return;if(this.intrinsicTimeUnit_!==undefined)
-throw new Error('Intrinsic time unit already set');this.intrinsicTimeUnit_=value;},get hasImportWarnings(){return(this.importWarnings_.length>0);},get importWarnings(){return this.importWarnings_;}};return{ImportOptions:ImportOptions,ClockSyncRecord:ClockSyncRecord,Model:Model};});'use strict';tr.exportTo('tr.c',function(){var EventRegistry=tr.model.EventRegistry;var RequestSelectionChangeEvent=tr.b.Event.bind(undefined,'requestSelectionChange',true,false);function Selection(opt_events){ [...]
-this.push(opt_events[i]);}else{this.push(opt_events);}}}
-Selection.prototype={__proto__:Object.prototype,get bounds(){if(this.bounds_dirty_){this.bounds_.reset();for(var i=0;i<this.length_;i++)
-this[i].addBoundsToRange(this.bounds_);this.bounds_dirty_=false;}
-return this.bounds_;},get duration(){if(this.bounds_.isEmpty)
-return 0;return this.bounds_.max-this.bounds_.min;},get length(){return this.length_;},get guid(){return this.guid_;},clear:function(){for(var i=0;i<this.length_;++i)
-delete this[i];this.length_=0;this.bounds_dirty_=true;},push:function(event){if(event.guid==undefined)
-throw new Error('Event must have a GUID');if(this.contains(event))
-return event;this.pushed_guids_[event.guid]=true;this[this.length_++]=event;this.bounds_dirty_=true;return event;},contains:function(event){return this.pushed_guids_[event.guid];},addSelection:function(selection){for(var i=0;i<selection.length;i++)
-this.push(selection[i]);},subSelection:function(index,count){count=count||1;var selection=new Selection();selection.bounds_dirty_=true;if(index<0||index+count>this.length_)
-throw new Error('Index out of bounds');for(var i=index;i<index+count;i++)
-selection.push(this[i]);return selection;},equals:function(that){if(this.length!==that.length)
-return false;for(var i=0;i<this.length;i++){var event=this[i];if(that.pushed_guids_[event.guid]===undefined)
-return false;}
-return true;},getEventsOrganizedByBaseType:function(opt_pruneEmpty){var events={};var allTypeInfos=EventRegistry.getAllRegisteredTypeInfos();allTypeInfos.forEach(function(eventTypeInfo){events[eventTypeInfo.metadata.name]=new Selection();if(this.sunburst_zoom_level!==undefined)
-events[eventTypeInfo.metadata.name].sunburst_zoom_level=this.sunburst_zoom_level;},this);this.forEach(function(event,i){var maxEventIndex=-1;var maxEventTypeInfo=undefined;allTypeInfos.forEach(function(eventTypeInfo,eventIndex){if(!(event instanceof eventTypeInfo.constructor))
-return;if(eventIndex>maxEventIndex){maxEventIndex=eventIndex;maxEventTypeInfo=eventTypeInfo;}});if(maxEventIndex==-1){console.log(event);throw new Error('Unrecognized event type');}
-events[maxEventTypeInfo.metadata.name].push(event);});if(opt_pruneEmpty){var prunedEvents={};for(var eventType in events){if(events[eventType].length>0)
-prunedEvents[eventType]=events[eventType];}
-return prunedEvents;}else{return events;}},getEventsOrganizedByTitle:function(){var eventsByTitle={};for(var i=0;i<this.length;i++){var event=this[i];if(event.title===undefined)
-throw new Error('An event didn\'t have a title!');if(eventsByTitle[event.title]==undefined){eventsByTitle[event.title]=[];}
-eventsByTitle[event.title].push(event);}
-return eventsByTitle;},enumEventsOfType:function(type,func){for(var i=0;i<this.length_;i++)
-if(this[i]instanceof type)
-func(this[i]);},get userFriendlyName(){if(this.length===0){throw new Error('Empty selection');}
-var eventsByBaseType=this.getEventsOrganizedByBaseType(true);var eventTypeName=tr.b.dictionaryKeys(eventsByBaseType)[0];if(this.length===1){var tmp=EventRegistry.getUserFriendlySingularName(eventTypeName);return this[0].userFriendlyName;}
-var numEventTypes=tr.b.dictionaryLength(eventsByBaseType);if(numEventTypes!==1){return this.length+' events of various types';}
-var tmp=EventRegistry.getUserFriendlyPluralName(eventTypeName);return this.length+' '+tmp;},getShiftedSelection:function(viewport,offset){var newSelection=new Selection();for(var i=0;i<this.length_;i++){var event=this[i];if(event instanceof tr.model.FlowEvent){if(offset>0){newSelection.push(event.endSlice);}else if(offset<0){newSelection.push(event.startSlice);}else{}
-continue;}
-var track=viewport.trackForEvent(event);track.addEventNearToProvidedEventToSelection(event,offset,newSelection);}
-if(newSelection.length==0)
-return undefined;return newSelection;},filter:function(fn,opt_this){var res=new Selection();this.forEach(function(slice){if(fn.call(this,slice))
-res.push(slice);},opt_this);return res;},forEach:function(fn,opt_this){for(var i=0;i<this.length;i++)
-fn.call(opt_this,this[i],i);},map:function(fn,opt_this){var res=[];for(var i=0;i<this.length;i++)
-res.push(fn.call(opt_this,this[i],i));return res;},every:function(fn,opt_this){for(var i=0;i<this.length;i++)
-if(!fn.call(opt_this,this[i],i))
-return false;return true;},some:function(fn,opt_this){for(var i=0;i<this.length;i++)
-if(fn.call(opt_this,this[i],i))
-return true;return false;}};return{Selection:Selection,RequestSelectionChangeEvent:RequestSelectionChangeEvent};});'use strict';Polymer('tr-ui-a-sub-view',{set tabLabel(label){return this.setAttribute('tab-label',label);},get tabLabel(){return this.getAttribute('tab-label');},get requiresTallView(){return false;},get relatedEventsToHighlight(){return undefined;},set selection(selection){throw new Error('Not implemented!');},get selection(){throw new Error('Not implemented!');}});'use str [...]
-this.textContent=opt_textContent;},onClicked_:function(){if(!this.selection_)
-return;var event=new tr.c.RequestSelectionChangeEvent();if(typeof this.selection_==='function')
-event.selection=this.selection_();else
-event.selection=this.selection_;this.dispatchEvent(event);}});'use strict';tr.exportTo('tr.b.units',function(){function TimeDuration(duration){this.duration=duration;};TimeDuration.prototype={toString:function(){return TimeDuration.format(this.duration);}};TimeDuration.format=function(duration){return tr.b.units.Time.currentDisplayUnit.format(duration);};return{TimeDuration:TimeDuration};});'use strict';tr.exportTo('tr.b.units',function(){function TimeStamp(timestamp){this.timestamp=time [...]
-spanEl.className=opt_dictionary.className;if(opt_dictionary.textContent)
-spanEl.textContent=opt_dictionary.textContent;if(opt_dictionary.parent)
-opt_dictionary.parent.appendChild(spanEl);if(opt_dictionary.bold)
-spanEl.style.fontWeight='bold';if(opt_dictionary.marginLeft)
-spanEl.style.marginLeft=opt_dictionary.marginLeft;if(opt_dictionary.marginRight)
-spanEl.style.marginRight=opt_dictionary.marginRight;if(opt_dictionary.backgroundColor)
-spanEl.style.backgroundColor=opt_dictionary.backgroundColor;if(opt_dictionary.color)
-spanEl.style.color=opt_dictionary.color;}
-return spanEl;};function createDiv(opt_dictionary){var divEl=document.createElement('div');if(opt_dictionary){if(opt_dictionary.className)
-divEl.className=opt_dictionary.className;if(opt_dictionary.parent)
-opt_dictionary.parent.appendChild(divEl);if(opt_dictionary.textContent)
-divEl.textContent=opt_dictionary.textContent;if(opt_dictionary.maxWidth)
-divEl.style.maxWidth=opt_dictionary.maxWidth;}
-return divEl;};function createScopedStyle(styleContent){var styleEl=document.createElement('style');styleEl.scoped=true;styleEl.innerHTML=styleContent;return styleEl;}
-function valuesEqual(a,b){if(a instanceof Array&&b instanceof Array)
-return a.length===b.length&&JSON.stringify(a)===JSON.stringify(b);return a===b;}
-function createSelector(targetEl,targetElProperty,settingsKey,defaultValue,items,opt_namespace){var defaultValueIndex;for(var i=0;i<items.length;i++){var item=items[i];if(valuesEqual(item.value,defaultValue)){defaultValueIndex=i;break;}}
-if(defaultValueIndex===undefined)
-throw new Error('defaultValue must be in the items list');var selectorEl=document.createElement('select');selectorEl.addEventListener('change',onChange);for(var i=0;i<items.length;i++){var item=items[i];var optionEl=document.createElement('option');optionEl.textContent=item.label;optionEl.targetPropertyValue=item.value;selectorEl.appendChild(optionEl);}
-function onChange(e){var value=selectorEl.selectedOptions[0].targetPropertyValue;tr.b.Settings.set(settingsKey,value,opt_namespace);targetEl[targetElProperty]=value;}
-var oldSetter=targetEl.__lookupSetter__('selectedIndex');selectorEl.__defineGetter__('selectedValue',function(v){return selectorEl.children[selectorEl.selectedIndex].targetPropertyValue;});selectorEl.__defineSetter__('selectedValue',function(v){for(var i=0;i<selectorEl.children.length;i++){var value=selectorEl.children[i].targetPropertyValue;if(valuesEqual(value,v)){var changed=selectorEl.selectedIndex!=i;if(changed){selectorEl.selectedIndex=i;onChange();}
-return;}}
-throw new Error('Not a valid value');});var initialValue=tr.b.Settings.get(settingsKey,defaultValue,opt_namespace);var didSet=false;for(var i=0;i<selectorEl.children.length;i++){if(valuesEqual(selectorEl.children[i].targetPropertyValue,initialValue)){didSet=true;targetEl[targetElProperty]=initialValue;selectorEl.selectedIndex=i;break;}}
-if(!didSet){selectorEl.selectedIndex=defaultValueIndex;targetEl[targetElProperty]=defaultValue;}
-return selectorEl;}
-function createEditCategorySpan(optionGroupEl,targetEl){var spanEl=createSpan({className:'edit-categories'});spanEl.textContent='Edit categories';spanEl.classList.add('labeled-option');spanEl.addEventListener('click',function(){targetEl.onClickEditCategories();});return spanEl;}
-function createOptionGroup(targetEl,targetElProperty,settingsKey,defaultValue,items){function onChange(){var value=[];if(this.value.length)
-value=this.value.split(',');tr.b.Settings.set(settingsKey,value);targetEl[targetElProperty]=value;}
-var optionGroupEl=createSpan({className:'labeled-option-group'});var initialValue=tr.b.Settings.get(settingsKey,defaultValue);for(var i=0;i<items.length;++i){var item=items[i];var id='category-preset-'+item.label.replace(/ /g,'-');var radioEl=document.createElement('input');radioEl.type='radio';radioEl.setAttribute('id',id);radioEl.setAttribute('name','category-presets-group');radioEl.setAttribute('value',item.value);radioEl.addEventListener('change',onChange.bind(radioEl,targetEl,target [...]
-radioEl.checked=true;var labelEl=document.createElement('label');labelEl.textContent=item.label;labelEl.setAttribute('for',id);var spanEl=createSpan({className:'labeled-option'});spanEl.appendChild(radioEl);spanEl.appendChild(labelEl);spanEl.__defineSetter__('checked',function(opt_bool){var changed=radioEl.checked!==(!!opt_bool);if(!changed)
-return;radioEl.checked=!!opt_bool;onChange();});spanEl.__defineGetter__('checked',function(){return radioEl.checked;});optionGroupEl.appendChild(spanEl);}
-optionGroupEl.appendChild(createEditCategorySpan(optionGroupEl,targetEl));if(!initialValue.length)
-optionGroupEl.classList.add('categories-expanded');targetEl[targetElProperty]=initialValue;return optionGroupEl;}
-var nextCheckboxId=1;function createCheckBox(targetEl,targetElProperty,settingsKey,defaultValue,label){var buttonEl=document.createElement('input');buttonEl.type='checkbox';var initialValue=tr.b.Settings.get(settingsKey,defaultValue);buttonEl.checked=!!initialValue;if(targetEl)
-targetEl[targetElProperty]=initialValue;function onChange(){tr.b.Settings.set(settingsKey,buttonEl.checked);if(targetEl)
-targetEl[targetElProperty]=buttonEl.checked;}
-buttonEl.addEventListener('change',onChange);var id='#checkbox-'+nextCheckboxId++;var spanEl=createSpan({className:'labeled-checkbox'});buttonEl.setAttribute('id',id);var labelEl=document.createElement('label');labelEl.textContent=label;labelEl.setAttribute('for',id);spanEl.appendChild(buttonEl);spanEl.appendChild(labelEl);spanEl.__defineSetter__('checked',function(opt_bool){var changed=buttonEl.checked!==(!!opt_bool);if(!changed)
-return;buttonEl.checked=!!opt_bool;onChange();});spanEl.__defineGetter__('checked',function(){return buttonEl.checked;});return spanEl;}
-function isElementAttachedToDocument(el){var cur=el;while(cur.parentNode)
-cur=cur.parentNode;return(cur===el.ownerDocument||cur.nodeName==='#document-fragment');}
-function asHTMLOrTextNode(value,opt_ownerDocument){if(value instanceof Node)
-return value;var ownerDocument=opt_ownerDocument||document;return ownerDocument.createTextNode(value);}
-return{createSpan:createSpan,createDiv:createDiv,createScopedStyle:createScopedStyle,createSelector:createSelector,createOptionGroup:createOptionGroup,createCheckBox:createCheckBox,isElementAttachedToDocument:isElementAttachedToDocument,asHTMLOrTextNode:asHTMLOrTextNode};});'use strict';(function(){var RIGHT_ARROW=String.fromCharCode(0x25b6);var UNSORTED_ARROW=String.fromCharCode(0x25BF);var ASCENDING_ARROW=String.fromCharCode(0x25BE);var DESCENDING_ARROW=String.fromCharCode(0x25B4);var  [...]
-this.scheduleRebuildBody_();},set tableColumns(columns){var columnsWithExpandButtons=[];for(var i=0;i<columns.length;i++){if(columns[i].showExpandButtons)
-columnsWithExpandButtons.push(i);}
-if(columnsWithExpandButtons.length===0){columnsWithExpandButtons=[0];}
-for(var i=0;i<columns.length;i++){var colInfo=columns[i];if(colInfo.width===undefined)
-continue;var hasExpandButton=columnsWithExpandButtons.indexOf(i)!==-1;var w=colInfo.width;if(w){if(/\d+px/.test(w)){continue;}else if(/\d+%/.test(w)){if(hasExpandButton){throw new Error('Columns cannot be %-sized and host '+' an expand button');}}else{throw new Error('Unrecognized width string');}}}
-this.tableColumns_=columns;this.headerCells_=[];this.columnsWithExpandButtons_=columnsWithExpandButtons;this.sortColumnIndex=undefined;this.scheduleRebuildHeaders_();this.tableRows=this.tableRows_;},get tableColumns(){return this.tableColumns_;},set tableRows(rows){this.selectedTableRowInfo_=undefined;this.selectedColumnIndex_=undefined;this.maybeUpdateSelectedRow_();this.tableRows_=rows;this.tableRowsInfo_=new WeakMap();this.scheduleRebuildBody_();},get tableRows(){return this.tableRows [...]
-if(this.tableColumns_.length<=number)
-throw new Error('Column number '+number+' is out of bounds.');if(!this.tableColumns_[number].cmp)
-throw new Error('Column '+number+' does not have a comparator.');this.sortColumnIndex_=number;this.updateHeaderArrows_();this.scheduleRebuildBody_();},get sortColumnIndex(){return this.sortColumnIndex_;},set sortDescending(value){var newValue=!!value;if(newValue!==this.sortDescending_){this.sortDescending_=newValue;this.updateHeaderArrows_();this.scheduleRebuildBody_();}},get sortDescending(){return this.sortDescending_;},updateHeaderArrows_:function(){for(var i=0;i<this.headerCells_.len [...]
-if(i!==this.sortColumnIndex_){this.headerCells_[i].sideContent=UNSORTED_ARROW;continue;}
-this.headerCells_[i].sideContent=this.sortDescending_?DESCENDING_ARROW:ASCENDING_ARROW;}},sortRows_:function(rows){rows.sort(function(rowA,rowB){if(this.sortDescending_)
-return this.tableColumns_[this.sortColumnIndex_].cmp(rowB.userRow,rowA.userRow);return this.tableColumns_[this.sortColumnIndex_].cmp(rowA.userRow,rowB.userRow);}.bind(this));for(var i=0;i<rows.length;i++){if(rows[i].isExpanded)
-this.sortRows_(rows[i][this.subRowsPropertyName_]);}},generateHeaderColumns_:function(){this.headerCells_=[];this.$.head.textContent='';if(!this.showHeader_)
-return;var tr=this.appendNewElement_(this.$.head,'tr');for(var i=0;i<this.tableColumns_.length;i++){var td=this.appendNewElement_(tr,'td');var headerCell=document.createElement('tr-ui-b-table-header-cell');if(this.showHeader)
-headerCell.cellTitle=this.tableColumns_[i].title;else
-headerCell.cellTitle='';if(this.tableColumns_[i].cmp){td.classList.add('sensitive');headerCell.tapCallback=this.createSortCallback_(i);if(this.sortColumnIndex_===i)
-headerCell.sideContent=this.sortDescending_?DESCENDING_ARROW:ASCENDING_ARROW;else
-headerCell.sideContent=UNSORTED_ARROW;}
-td.appendChild(headerCell);this.headerCells_.push(headerCell);}},applySizes_:function(){if(this.tableRows_.length===0&&!this.showHeader)
-return;var rowToRemoveSizing;var rowToSize;if(this.showHeader){rowToSize=this.$.head.children[0];rowToRemoveSizing=this.$.body.children[0];}else{rowToSize=this.$.body.children[0];rowToRemoveSizing=this.$.head.children[0];}
-for(var i=0;i<this.tableColumns_.length;i++){if(rowToRemoveSizing&&rowToRemoveSizing.children[i]){var tdToRemoveSizing=rowToRemoveSizing.children[i];tdToRemoveSizing.style.minWidth='';tdToRemoveSizing.style.width='';}
-var td=rowToSize.children[i];var delta;if(this.columnsWithExpandButtons_.indexOf(i)!==-1){td.style.paddingLeft=BASIC_INDENTATION+'px';delta=BASIC_INDENTATION+'px';}else{delta=undefined;}
-function calc(base,delta){if(delta)
-return'calc('+base+' - '+delta+')';else
-return base;}
-var w=this.tableColumns_[i].width;if(w){if(/\d+px/.test(w)){td.style.minWidth=calc(w,delta);}else if(/\d+%/.test(w)){td.style.width=w;}else{throw new Error('Unrecognized width string: '+w);}}}},createSortCallback_:function(columnNumber){return function(){var previousIndex=this.sortColumnIndex;this.sortColumnIndex=columnNumber;if(previousIndex!==columnNumber)
-this.sortDescending=false;else
-this.sortDescending=!this.sortDescending;}.bind(this);},generateTableRowNodes_:function(tableSection,userRows,rowInfoMap,indentation,lastAddedRow,parentRowInfo){if(this.sortColumnIndex_!==undefined&&tableSection===this.$.body){userRows=userRows.slice();userRows.sort(function(rowA,rowB){var c=this.tableColumns_[this.sortColumnIndex_].cmp(rowA,rowB);if(this.sortDescending_)
-c=-c;return c;}.bind(this));}
-for(var i=0;i<userRows.length;i++){var userRow=userRows[i];var rowInfo=this.getOrCreateRowInfoFor_(rowInfoMap,userRow,parentRowInfo);var htmlNode=this.getHTMLNodeForRowInfo_(tableSection,rowInfo,rowInfoMap,indentation);if(lastAddedRow===undefined){tableSection.insertBefore(htmlNode,tableSection.firstChild);}else{var nextSiblingOfLastAdded=lastAddedRow.nextSibling;tableSection.insertBefore(htmlNode,nextSiblingOfLastAdded);}
-this.updateTabIndexForTableRowNode_(htmlNode);lastAddedRow=htmlNode;if(!rowInfo.isExpanded)
-continue;lastAddedRow=this.generateTableRowNodes_(tableSection,userRow[this.subRowsPropertyName_],rowInfoMap,indentation+1,lastAddedRow,rowInfo);}
-return lastAddedRow;},getOrCreateRowInfoFor_:function(rowInfoMap,userRow,parentRowInfo){if(rowInfoMap.has(userRow))
-return rowInfoMap.get(userRow);var rowInfo={userRow:userRow,htmlNode:undefined,isExpanded:userRow.isExpanded||false,parentRowInfo:parentRowInfo};rowInfoMap.set(userRow,rowInfo);return rowInfo;},getHTMLNodeForRowInfo_:function(tableSection,rowInfo,rowInfoMap,indentation){if(rowInfo.htmlNode)
-return rowInfo.htmlNode;var INDENT_SPACE=indentation*16;var INDENT_SPACE_NO_BUTTON=indentation*16+BASIC_INDENTATION;var trElement=this.ownerDocument.createElement('tr');rowInfo.htmlNode=trElement;rowInfo.indentation=indentation;trElement.rowInfo=rowInfo;for(var i=0;i<this.tableColumns_.length;){var td=this.appendNewElement_(trElement,'td');td.columnIndex=i;var column=this.tableColumns_[i];var value=column.value(rowInfo.userRow);var colSpan=column.colSpan?column.colSpan:1;td.style.colSpan [...]
-if(this.doesColumnIndexSupportSelection(i))
-td.classList.add('supports-selection');if(this.columnsWithExpandButtons_.indexOf(i)!=-1){if(rowInfo.userRow[this.subRowsPropertyName_]&&rowInfo.userRow[this.subRowsPropertyName_].length>0){td.style.paddingLeft=INDENT_SPACE+'px';var expandButton=this.appendNewElement_(td,'expand-button');expandButton.textContent=RIGHT_ARROW;if(rowInfo.isExpanded)
-expandButton.classList.add('button-expanded');}else{td.style.paddingLeft=INDENT_SPACE_NO_BUTTON+'px';}}
-td.appendChild(tr.ui.b.asHTMLOrTextNode(value,this.ownerDocument));i+=colSpan;}
-var needsClickListener=false;if(this.columnsWithExpandButtons_.length)
-needsClickListener=true;else if(tableSection==this.$.body)
-needsClickListener=true;if(needsClickListener){trElement.addEventListener('click',function(e){e.stopPropagation();if(e.target.tagName=='EXPAND-BUTTON'){this.setExpandedForUserRow_(tableSection,rowInfoMap,rowInfo.userRow,!rowInfo.isExpanded);return;}
-function getTD(cur){if(cur===trElement)
-throw new Error('woah');if(cur.parentElement===trElement)
-return cur;return getTD(cur.parentElement);}
-if(this.supportsSelection_){var isAlreadySelected=false;var tdThatWasClicked=getTD(e.target);if(!this.cellSelectionMode_){isAlreadySelected=this.selectedTableRowInfo_===rowInfo;}else{isAlreadySelected=this.selectedTableRowInfo_===rowInfo;isAlreadySelected&=(this.selectedColumnIndex_===tdThatWasClicked.columnIndex);}
-if(isAlreadySelected){if(rowInfo.userRow[this.subRowsPropertyName_]&&rowInfo.userRow[this.subRowsPropertyName_].length){this.setExpandedForUserRow_(tableSection,rowInfoMap,rowInfo.userRow,!rowInfo.isExpanded);}}else{this.didTableRowInfoGetClicked_(rowInfo,tdThatWasClicked.columnIndex);}}else{if(rowInfo.userRow[this.subRowsPropertyName_]&&rowInfo.userRow[this.subRowsPropertyName_].length){this.setExpandedForUserRow_(tableSection,rowInfoMap,rowInfo.userRow,!rowInfo.isExpanded);}}}.bind(this));}
-return rowInfo.htmlNode;},removeSubNodes_:function(tableSection,rowInfo,rowInfoMap){if(rowInfo.userRow[this.subRowsPropertyName_]===undefined)
-return;for(var i=0;i<rowInfo.userRow[this.subRowsPropertyName_].length;i++){var subRow=rowInfo.userRow[this.subRowsPropertyName_][i];var subRowInfo=rowInfoMap.get(subRow);if(!subRowInfo)
-continue;var subNode=subRowInfo.htmlNode;if(subNode&&subNode.parentNode===tableSection){tableSection.removeChild(subNode);this.removeSubNodes_(tableSection,subRowInfo,rowInfoMap);}}},scheduleRebuildHeaders_:function(){this.headerDirty_=true;this.scheduleRebuild_();},scheduleRebuildBody_:function(){this.bodyDirty_=true;this.scheduleRebuild_();},scheduleRebuildFooter_:function(){this.footerDirty_=true;this.scheduleRebuild_();},scheduleRebuild_:function(){if(this.rebuildPending_)
-return;this.rebuildPending_=true;setTimeout(function(){this.rebuildPending_=false;this.rebuild();}.bind(this),0);},rebuildIfNeeded_:function(){this.rebuild();},rebuild:function(){var wasBodyOrHeaderDirty=this.headerDirty_||this.bodyDirty_;if(this.headerDirty_){this.generateHeaderColumns_();this.headerDirty_=false;}
-if(this.bodyDirty_){this.$.body.textContent='';this.generateTableRowNodes_(this.$.body,this.tableRows_,this.tableRowsInfo_,0,undefined,undefined);if(this.tableRows_.length===0&&this.emptyValue_!==undefined){var trElement=this.ownerDocument.createElement('tr');this.$.body.appendChild(trElement);trElement.classList.add('empty-row');var td=this.ownerDocument.createElement('td');trElement.appendChild(td);td.colSpan=this.tableColumns_.length;var emptyValue=this.emptyValue_;td.appendChild(tr.u [...]
-this.bodyDirty_=false;}
-if(wasBodyOrHeaderDirty)
-this.applySizes_();if(this.footerDirty_){this.$.foot.textContent='';this.generateTableRowNodes_(this.$.foot,this.tableFooterRows_,this.tableFooterRowsInfo_,0,undefined,undefined);if(this.tableFooterRowsInfo_.length){this.$.body.classList.add('has-footer');}else{this.$.body.classList.remove('has-footer');}
-this.footerDirty_=false;}},appendNewElement_:function(parent,tagName){var element=parent.ownerDocument.createElement(tagName);parent.appendChild(element);return element;},getExpandedForTableRow:function(userRow){this.rebuildIfNeeded_();var rowInfo=this.tableRowsInfo_.get(userRow);if(rowInfo===undefined)
-throw new Error('Row has not been seen, must expand its parents');return rowInfo.isExpanded;},setExpandedForTableRow:function(userRow,expanded){this.rebuildIfNeeded_();var rowInfo=this.tableRowsInfo_.get(userRow);if(rowInfo===undefined)
-throw new Error('Row has not been seen, must expand its parents');return this.setExpandedForUserRow_(this.$.body,this.tableRowsInfo_,userRow,expanded);},setExpandedForUserRow_:function(tableSection,rowInfoMap,userRow,expanded){this.rebuildIfNeeded_();var rowInfo=rowInfoMap.get(userRow);if(rowInfo===undefined)
-throw new Error('Row has not been seen, must expand its parents');rowInfo.isExpanded=!!expanded;if(rowInfo.htmlNode===undefined)
-return;if(rowInfo.htmlNode.parentElement!==tableSection)
-return;var expandButton=rowInfo.htmlNode.querySelector('expand-button');if(rowInfo.isExpanded){expandButton.classList.add('button-expanded');var lastAddedRow=rowInfo.htmlNode;if(rowInfo.userRow[this.subRowsPropertyName_]){this.generateTableRowNodes_(tableSection,rowInfo.userRow[this.subRowsPropertyName_],rowInfoMap,rowInfo.indentation+1,lastAddedRow,rowInfo);}}else{expandButton.classList.remove('button-expanded');this.removeSubNodes_(tableSection,rowInfo,rowInfoMap);}
-this.maybeUpdateSelectedRow_();},get supportsSelection(){return this.supportsSelection_;},set supportsSelection(supportsSelection){this.rebuildIfNeeded_();this.supportsSelection_=!!supportsSelection;this.didSelectionStateChange_();},get cellSelectionMode(){return this.cellSelectionMode_;},set cellSelectionMode(cellSelectionMode){this.rebuildIfNeeded_();this.cellSelectionMode_=!!cellSelectionMode;this.didSelectionStateChange_();},get rowHighlightEnabled(){return this.rowHighlightEnabled_; [...]
-this.$.body.classList.add('row-highlight-enabled');else
-this.$.body.classList.remove('row-highlight-enabled');}
-for(var i=0;i<this.$.body.children.length;i++)
-this.updateTabIndexForTableRowNode_(this.$.body.children[i]);this.maybeUpdateSelectedRow_();},maybeUpdateSelectedRow_:function(){if(this.selectedTableRowInfo_===undefined)
-return;if(!this.supportsSelection_){this.removeSelectedState_();this.selectedTableRowInfo_=undefined;return;}
-function isVisible(rowInfo){if(!rowInfo.htmlNode)
-return false;return!!rowInfo.htmlNode.parentElement;}
-if(isVisible(this.selectedTableRowInfo_)){this.updateSelectedState_();return;}
-this.removeSelectedState_();var curRowInfo=this.selectedTableRowInfo_;while(curRowInfo&&!isVisible(curRowInfo))
-curRowInfo=curRowInfo.parentRowInfo;this.selectedTableRowInfo_=curRowInfo;if(this.selectedTableRowInfo_)
-this.updateSelectedState_();},didTableRowInfoGetClicked_:function(rowInfo,columnIndex){if(!this.supportsSelection_)
-return;if(this.cellSelectionMode_){if(!this.doesColumnIndexSupportSelection(columnIndex))
-return;}
-if(this.selectedTableRowInfo_!==rowInfo)
-this.selectedTableRow=rowInfo.userRow;if(this.selectedColumnIndex!==columnIndex)
-this.selectedColumnIndex=columnIndex;},get selectedTableRow(){if(!this.selectedTableRowInfo_)
-return undefined;return this.selectedTableRowInfo_.userRow;},set selectedTableRow(userRow){this.rebuildIfNeeded_();if(!this.supportsSelection_)
-throw new Error('Selection is off. Set supportsSelection=true.');var rowInfo=this.tableRowsInfo_.get(userRow);if(rowInfo===undefined)
-throw new Error('Row has not been seen, must expand its parents');var e=this.prepareToChangeSelection_();this.selectedTableRowInfo_=rowInfo;if(this.cellSelectionMode_){if(this.selectedTableRowInfo_&&this.selectedColumnIndex_===undefined){var i=this.getFirstSelectableColumnIndex_();if(i==-1)
-throw new Error('nope');this.selectedColumnIndex_=i;}}else{this.selectedColumnIndex_=undefined;}
-this.updateSelectedState_();this.dispatchEvent(e);},updateTabIndexForTableRowNode_:function(row){if(this.supportsSelection_){if(!this.cellSelectionMode_){row.tabIndex=0;}else{for(var i=0;i<this.tableColumns_.length;i++){if(!this.doesColumnIndexSupportSelection(i))
-continue;row.children[i].tabIndex=0;}}}else{if(!this.cellSelectionMode_){row.removeAttribute('tabIndex');}else{for(var i=0;i<this.tableColumns_.length;i++){if(!this.doesColumnIndexSupportSelection(i))
-continue;row.children[i].removeAttribute('tabIndex');}}}},prepareToChangeSelection_:function(){var e=new Event('selection-changed');var previousSelectedRowInfo=this.selectedTableRowInfo_;if(previousSelectedRowInfo)
-e.previousSelectedTableRow=previousSelectedRowInfo.userRow;else
-e.previousSelectedTableRow=undefined;this.removeSelectedState_();return e;},removeSelectedState_:function(){this.setSelectedState_(false);},updateSelectedState_:function(){this.setSelectedState_(true);},setSelectedState_:function(select){if(this.selectedTableRowInfo_===undefined)
-return;var tableRowNode=this.selectedTableRowInfo_.htmlNode;if(this.cellSelectionMode_&&this.rowHighlightEnabled_){if(select)
-tableRowNode.classList.add('highlighted-row');else
-tableRowNode.classList.remove('highlighted-row');}
-var node=this.getSelectableNodeGivenTableRowNode_(tableRowNode);if(select)
-node.setAttribute('selected',true);else
-node.removeAttribute('selected');},doesColumnIndexSupportSelection:function(columnIndex){var columnInfo=this.tableColumns_[columnIndex];var scs=columnInfo.supportsCellSelection;if(scs===false)
-return false;return true;},getFirstSelectableColumnIndex_:function(){for(var i=0;i<this.tableColumns_.length;i++){if(this.doesColumnIndexSupportSelection(i))
-return i;}
-return-1;},getSelectableNodeGivenTableRowNode_:function(htmlNode){if(!this.cellSelectionMode_){return htmlNode;}else{return htmlNode.children[this.selectedColumnIndex_];}},get selectedColumnIndex(){if(!this.supportsSelection_)
-return undefined;if(!this.cellSelectionMode_)
-return undefined;return this.selectedColumnIndex_;},set selectedColumnIndex(selectedColumnIndex){this.rebuildIfNeeded_();if(!this.supportsSelection_)
-throw new Error('Selection is off. Set supportsSelection=true.');if(selectedColumnIndex<0||selectedColumnIndex>=this.tableColumns_.length)
-throw new Error('Invalid index');if(!this.doesColumnIndexSupportSelection(selectedColumnIndex))
-throw new Error('Selection is not supported on this column');var e=this.prepareToChangeSelection_();this.selectedColumnIndex_=selectedColumnIndex;if(this.selectedColumnIndex_===undefined)
-this.selectedTableRowInfo_=undefined;this.updateSelectedState_();this.dispatchEvent(e);},onKeyDown_:function(e){if(this.supportsSelection_===false)
-return;if(this.selectedTableRowInfo_===undefined)
-return;var code_to_command_names={37:'ARROW_LEFT',38:'ARROW_UP',39:'ARROW_RIGHT',40:'ARROW_DOWN'};var cmdName=code_to_command_names[e.keyCode];if(cmdName===undefined)
-return;e.stopPropagation();e.preventDefault();this.performKeyCommand_(cmdName);},performKeyCommand_:function(cmdName){this.rebuildIfNeeded_();var rowInfo=this.selectedTableRowInfo_;var htmlNode=rowInfo.htmlNode;if(cmdName==='ARROW_UP'){var prev=htmlNode.previousElementSibling;if(prev){tr.ui.b.scrollIntoViewIfNeeded(prev);this.selectedTableRow=prev.rowInfo.userRow;this.focusSelected_();return;}
-return;}
-if(cmdName==='ARROW_DOWN'){var next=htmlNode.nextElementSibling;if(next){tr.ui.b.scrollIntoViewIfNeeded(next);this.selectedTableRow=next.rowInfo.userRow;this.focusSelected_();return;}
-return;}
-if(cmdName==='ARROW_RIGHT'){if(this.cellSelectionMode_){var newIndex=this.selectedColumnIndex_+1;if(newIndex>=this.tableColumns_.length)
-return;if(!this.doesColumnIndexSupportSelection(newIndex))
-return;this.selectedColumnIndex=newIndex;this.focusSelected_();return;}else{if(rowInfo.userRow[this.subRowsPropertyName_]===undefined)
-return;if(rowInfo.userRow[this.subRowsPropertyName_].length===0)
-return;if(!rowInfo.isExpanded)
-this.setExpandedForTableRow(rowInfo.userRow,true);this.selectedTableRow=rowInfo.userRow[this.subRowsPropertyName_][0];this.focusSelected_();return;}}
-if(cmdName==='ARROW_LEFT'){if(this.cellSelectionMode_){var newIndex=this.selectedColumnIndex_-1;if(newIndex<0)
-return;if(!this.doesColumnIndexSupportSelection(newIndex))
-return;this.selectedColumnIndex=newIndex;this.focusSelected_();return;}else{if(rowInfo.isExpanded){this.setExpandedForTableRow(rowInfo.userRow,false);this.focusSelected_();return;}
-var parentRowInfo=rowInfo.parentRowInfo;if(parentRowInfo){this.selectedTableRow=parentRowInfo.userRow;this.focusSelected_();return;}
-return;}}
-throw new Error('Unrecognized command');},focusSelected_:function(){if(!this.selectedTableRowInfo_)
-return;var node=this.getSelectableNodeGivenTableRowNode_(this.selectedTableRowInfo_.htmlNode);node.focus();}});})();'use strict';Polymer('tr-ui-b-table-header-cell',{created:function(){this.tapCallback_=undefined;this.cellTitle_='';},set cellTitle(value){this.cellTitle_=value;var titleNode=tr.ui.b.asHTMLOrTextNode(this.cellTitle_,this.ownerDocument);this.$.title.innerText='';this.$.title.appendChild(titleNode);},get cellTitle(){return this.cellTitle_;},clearSideContent:function(){this.$. [...]
-this.tapCallback_();}});'use strict';tr.exportTo('tr.b',function(){function _iterateElementDeeplyImpl(element,cb,thisArg,includeElement){if(includeElement){if(cb.call(thisArg,element))
-return true;}
-if(element.shadowRoot){if(_iterateElementDeeplyImpl(element.shadowRoot,cb,thisArg,false))
-return true;}
-for(var i=0;i<element.children.length;i++){if(_iterateElementDeeplyImpl(element.children[i],cb,thisArg,true))
-return true;}}
-function iterateElementDeeply(element,cb,thisArg){_iterateElementDeeplyImpl(element,cb,thisArg,false);}
-function findDeepElementMatchingPredicate(element,predicate){var foundElement=undefined;function matches(element){var match=predicate(element);if(!match)
-return false;foundElement=element;return true;}
-iterateElementDeeply(element,matches);return foundElement;}
-function findDeepElementsMatchingPredicate(element,predicate){var foundElements=[];function matches(element){var match=predicate(element);if(match){foundElements.push(element);}
-return false;}
-iterateElementDeeply(element,matches);return foundElements;}
-function findDeepElementMatching(element,selector){return findDeepElementMatchingPredicate(element,function(element){return element.matches(selector);});}
-function findDeepElementsMatching(element,selector){return findDeepElementsMatchingPredicate(element,function(element){return element.matches(selector);});}
-function findDeepElementWithTextContent(element,re){return findDeepElementMatchingPredicate(element,function(element){if(element.children.length!==0)
-return false;return re.test(element.textContent);});}
-return{iterateElementDeeply:iterateElementDeeply,findDeepElementMatching:findDeepElementMatching,findDeepElementsMatching:findDeepElementsMatching,findDeepElementMatchingPredicate:findDeepElementMatchingPredicate,findDeepElementsMatchingPredicate:findDeepElementsMatchingPredicate,findDeepElementWithTextContent:findDeepElementWithTextContent};});'use strict';tr.exportTo('tr.ui.units',function(){function createTimeSpan(duration){if(duration===undefined)
-return'';var span=document.createElement('tr-ui-u-time-duration-span');span.duration=duration;return span;}
-tr.b.units.Time.addEventListener('display-unit-changed',function(e){tr.b.findDeepElementsMatching(document.body,'tr-ui-u-time-duration-span').forEach(function(el){el.updateContent_();});});return{createTimeSpan:createTimeSpan};});'use strict';Polymer('tr-ui-u-time-duration-span',{ready:function(){this.warning_=undefined;this.duration_=undefined;},get duration(){return this.duration_;},set duration(duration){if(duration instanceof tr.b.units.TimeDuration)
-this.duration_=duration.duration;else
-this.duration_=duration;this.updateContent_();},updateContent_:function(){var content=tr.b.units.TimeDuration.format(this.duration_);this.$.content.textContent=content;},get warning(){return this.warning_;},set warning(warning){this.warning_=warning;var warningEl=this.$.warning;if(this.warning_){warningEl.title=warning;warningEl.style.display='';}else{warningEl.title='';warningEl.style.display='none';}}});'use strict';tr.exportTo('tr.ui.units',function(){function createTimeStampSpan(time [...]
-return'';var span=document.createElement('tr-ui-u-time-stamp-span');span.timestamp=timestamp;return span;}
-tr.b.units.Time.addEventListener('display-unit-changed',function(e){tr.b.findDeepElementsMatching(document.body,'tr-ui-u-time-stamp-span').forEach(function(el){el.updateContent_();});});return{createTimeStampSpan:createTimeStampSpan};});'use strict';Polymer('tr-ui-u-time-stamp-span',{ready:function(){this.timestamp_=undefined;},get timestamp(){return this.timestamp_;},set timestamp(timestamp){if(timestamp instanceof tr.b.units.TimeStamp)
-this.timestamp_=timestamp.timestamp;else
-this.timestamp_=timestamp;this.updateContent_();},updateContent_:function(){var content=tr.b.units.TimeStamp.format(this.timestamp_);this.shadowRoot.textContent=content;}});'use strict';Polymer('tr-ui-u-size-in-bytes-span',{ready:function(){this.$.content.textContent=String.fromCharCode(9888);this.numBytes_=undefined;},get numBytes(){return this.numBytes_;},set numBytes(numBytesOrSizeInBytes){if(numBytesOrSizeInBytes instanceof tr.b.units.SizeInBytes)
-this.numBytes_=numBytesOrSizeInBytes.numBytes;else
-this.numBytes_=numBytesOrSizeInBytes;this.$.content.textContent=tr.b.units.SizeInBytes.format(this.numBytes_);},get stringContent(){return this.$.content.textContent;}});'use strict';function isTable(object){if(!(object instanceof Array)||(object.length<2))return false;for(var colName in object[0]){if(typeof colName!=='string')return false;}
-for(var i=0;i<object.length;++i){if(!(object[i]instanceof Object))return false;for(var colName in object[i]){if(i&&(object[0][colName]===undefined))return false;var cellType=typeof object[i][colName];if(cellType!=='string'&&cellType!='number')return false;}
-if(i){for(var colName in object[0]){if(object[i][colName]===undefined)return false;}}}
-return true;}
-Polymer('tr-ui-a-generic-object-view',{ready:function(){this.object_=undefined;},get object(){return this.object_;},set object(object){this.object_=object;this.updateContents_();},updateContents_:function(){this.$.content.textContent='';this.appendElementsForType_('',this.object_,0,0,5,'');},appendElementsForType_:function(label,object,indent,depth,maxDepth,suffix){if(depth>maxDepth){this.appendSimpleText_(label,indent,'<recursion limit reached>',suffix);return;}
-if(object===undefined){this.appendSimpleText_(label,indent,'undefined',suffix);return;}
-if(object===null){this.appendSimpleText_(label,indent,'null',suffix);return;}
-if(!(object instanceof Object)){var type=typeof object;if(type=='string'){var objectReplaced=false;if((object[0]=='{'&&object[object.length-1]=='}')||(object[0]=='['&&object[object.length-1]==']')){try{object=JSON.parse(object);objectReplaced=true;}catch(e){}}
-if(!objectReplaced){if(object.indexOf('\n')!==-1){var lines=object.split('\n');lines.forEach(function(line,i){var text,ioff,ll,ss;if(i==0){text='"'+line;ioff=0;ll=label;ss='';}else if(i<lines.length-1){text=line;ioff=1;ll='';ss='';}else{text=line+'"';ioff=1;ll='';ss=suffix;}
-var el=this.appendSimpleText_(ll,indent+ioff*label.length+ioff,text,ss);el.style.whiteSpace='pre';return el;},this);return;}else{this.appendSimpleText_(label,indent,'"'+object+'"',suffix);return;}}
-else{}}else{return this.appendSimpleText_(label,indent,object,suffix);}}
-if(object instanceof tr.model.ObjectSnapshot){var link=document.createElement('tr-ui-a-analysis-link');link.selection=new tr.c.Selection(object);this.appendElementWithLabel_(label,indent,link,suffix);return;}
-if(object instanceof tr.model.ObjectInstance){var link=document.createElement('tr-ui-a-analysis-link');link.selection=new tr.c.Selection(object);this.appendElementWithLabel_(label,indent,link,suffix);return;}
-if(object instanceof tr.b.Rect){this.appendSimpleText_(label,indent,object.toString(),suffix);return;}
-if(object instanceof tr.b.units.SizeInBytes){var el=this.ownerDocument.createElement('tr-ui-u-size-in-bytes-span');el.numBytes=object.numBytes;this.appendElementWithLabel_(label,indent,el,suffix);return;}
-if(object instanceof tr.b.units.TimeDuration){var el=this.ownerDocument.createElement('tr-ui-u-time-duration-span');el.duration=object.duration;this.appendElementWithLabel_(label,indent,el,suffix);return;}
-if(object instanceof tr.b.units.TimeStamp){var el=this.ownerDocument.createElement('tr-ui-u-time-stamp-span');el.timestamp=object.timestamp;this.appendElementWithLabel_(label,indent,el,suffix);return;}
-if(object instanceof Array){this.appendElementsForArray_(label,object,indent,depth,maxDepth,suffix);return;}
-this.appendElementsForObject_(label,object,indent,depth,maxDepth,suffix);},appendElementsForArray_:function(label,object,indent,depth,maxDepth,suffix){if(object.length==0){this.appendSimpleText_(label,indent,'[]',suffix);return;}
-if(isTable(object)){var table=document.createElement('tr-ui-b-table');var columns=[];tr.b.iterItems(object[0],function(colName){columns.push({title:colName,value:function(row){return row[colName];}});});table.tableColumns=columns;table.tableRows=object;this.appendElementWithLabel_(label,indent,table,suffix);table.rebuild();return;}
-this.appendElementsForType_(label+'[',object[0],indent,depth+1,maxDepth,object.length>1?',':']'+suffix);for(var i=1;i<object.length;i++){this.appendElementsForType_('',object[i],indent+label.length+1,depth+1,maxDepth,i<object.length-1?',':']'+suffix);}
-return;},appendElementsForObject_:function(label,object,indent,depth,maxDepth,suffix){var keys=tr.b.dictionaryKeys(object);if(keys.length==0){this.appendSimpleText_(label,indent,'{}',suffix);return;}
-this.appendElementsForType_(label+'{'+keys[0]+': ',object[keys[0]],indent,depth,maxDepth,keys.length>1?',':'}'+suffix);for(var i=1;i<keys.length;i++){this.appendElementsForType_(keys[i]+': ',object[keys[i]],indent+label.length+1,depth+1,maxDepth,i<keys.length-1?',':'}'+suffix);}},appendElementWithLabel_:function(label,indent,dataElement,suffix){var row=document.createElement('div');var indentSpan=document.createElement('span');indentSpan.style.whiteSpace='pre';for(var i=0;i<indent;i++)
-indentSpan.textContent+=' ';row.appendChild(indentSpan);var labelSpan=document.createElement('span');labelSpan.textContent=label;row.appendChild(labelSpan);row.appendChild(dataElement);var suffixSpan=document.createElement('span');suffixSpan.textContent=suffix;row.appendChild(suffixSpan);row.dataElement=dataElement;this.$.content.appendChild(row);},appendSimpleText_:function(label,indent,text,suffix){var el=this.ownerDocument.createElement('span');el.textContent=text;this.appendElementWi [...]
-throw new Error('Only supports single slices');this.setSelectionWithoutErrorChecks(selection);},setSelectionWithoutErrorChecks:function(selection){this.currentSelection_=selection;this.updateContents_();},getEventRows_:function(event){var rows=[];if(event.error)
-rows.push({name:'Error',value:event.error});if(event.title)
-rows.push({name:'Title',value:event.title});if(event.category)
-rows.push({name:'Category',value:event.category});var startEl=document.createElement('tr-ui-u-time-stamp-span');startEl.timestamp=event.start;rows.push({name:'Start',value:startEl});if(event.duration){var wallDurationEl=document.createElement('tr-ui-u-time-duration-span');wallDurationEl.duration=event.duration;rows.push({name:'Wall Duration',value:wallDurationEl});}
-if(event.cpuDuration){var cpuDurationEl=document.createElement('tr-ui-u-time-duration-span');cpuDurationEl.duration=event.cpuDuration;rows.push({name:'CPU Duration',value:cpuDurationEl});}
-if(event.subSlices!==undefined&&event.subSlices.length!==0){if(event.selfTime){var selfTimeEl=document.createElement('tr-ui-u-time-duration-span');selfTimeEl.duration=event.selfTime;rows.push({name:'Self Time',value:selfTimeEl});}
-if(event.cpuSelfTime){var cpuSelfTimeEl=document.createElement('tr-ui-u-time-duration-span');cpuSelfTimeEl.duration=event.cpuSelfTime;if(event.cpuSelfTime>event.selfTime){cpuSelfTimeEl.warning=' Note that CPU Self Time is larger than Self Time. '+'This is a known limitation of this system, which occurs '+'due to several subslices, rounding issues, and imprecise '+'time at which we get cpu- and real-time.';}
-rows.push({name:'CPU Self Time',value:cpuSelfTimeEl});}}
-if(event.durationInUserTime){var durationInUserTimeEl=document.createElement('tr-ui-u-time-duration-span');durationInUserTimeEl.duration=event.durationInUserTime;rows.push({name:'Duration (U)',value:durationInUserTimeEl});}
-function createStackFrameEl(sf){var sfEl=document.createElement('tr-ui-a-stack-frame');sfEl.stackFrame=sf;return sfEl;}
-if(event.startStackFrame&&event.endStackFrame){if(event.startStackFrame===event.endStackFrame){rows.push({name:'Start+End Stack Trace',value:createStackFrameEl(event.startStackFrame)});}else{rows.push({name:'Start Stack Trace',value:createStackFrameEl(event.startStackFrame)});rows.push({name:'End Stack Trace',value:createStackFrameEl(event.endStackFrame)});}}else if(event.startStackFrame){rows.push({name:'Start Stack Trace',value:createStackFrameEl(event.startStackFrame)});}else if(event [...]
-if(event.info){var descriptionEl=tr.ui.b.createDiv({textContent:event.info.description,maxWidth:'300px'});rows.push({name:'Description',value:descriptionEl});if(event.info.docLinks){event.info.docLinks.forEach(function(linkObject){var linkEl=document.createElement('a');linkEl.target='_blank';linkEl.href=linkObject.href;linkEl.textContent=linkObject.textContent;rows.push({name:linkObject.label,value:linkEl});});}}
-if(event.associatedAlerts.length){var alertSubRows=[];event.associatedAlerts.forEach(function(alert){var linkEl=document.createElement('tr-ui-a-analysis-link');linkEl.setSelectionAndContent(function(){return new tr.c.Selection(alert);},alert.info.description);alertSubRows.push({name:alert.title,value:linkEl});});rows.push({name:'Alerts',value:'',isExpanded:true,subRows:alertSubRows});}
-return rows;},addArgsToRows_:function(rows,args){var n=0;for(var argName in args){n+=1;}
-if(n>0){var subRows=[];for(var argName in args){var argView=document.createElement('tr-ui-a-generic-object-view');argView.object=args[argName];subRows.push({name:argName,value:argView});}
-rows.push({name:'Args',value:'',isExpanded:true,subRows:subRows});}
-return rows;},updateContents_:function(){if(this.currentSelection_===undefined){this.$.table.rows=[];this.$.table.rebuild();return;}
-var event=this.currentSelection_[0];var rows=this.getEventRows_(event);if(event.argsStripped)
-rows.push({name:'Args',value:'Stripped'});else
-this.addArgsToRows_(rows,event.args);this.$.table.tableRows=rows;this.$.table.rebuild();}});'use strict';tr.exportTo('tr.ui.analysis',function(){var FLOW_IN=0x1;var FLOW_OUT=0x2;var FLOW_IN_OUT=FLOW_IN|FLOW_OUT;function FlowClassifier(){this.numEvents_=0;this.eventsByGUID_={};}
-FlowClassifier.prototype={getFS_:function(event){var fs=this.eventsByGUID_[event.guid];if(fs===undefined){this.numEvents_++;fs={state:0,event:event};this.eventsByGUID_[event.guid]=fs;}
-return fs;},addInFlow:function(event){var fs=this.getFS_(event);fs.state|=FLOW_IN;return event;},addOutFlow:function(event){var fs=this.getFS_(event);fs.state|=FLOW_OUT;return event;},hasEvents:function(){return this.numEvents_>0;},get inFlowEvents(){var selection=new tr.c.Selection();for(var guid in this.eventsByGUID_){var fs=this.eventsByGUID_[guid];if(fs.state===FLOW_IN)
-selection.push(fs.event);}
-return selection;},get outFlowEvents(){var selection=new tr.c.Selection();for(var guid in this.eventsByGUID_){var fs=this.eventsByGUID_[guid];if(fs.state===FLOW_OUT)
-selection.push(fs.event);}
-return selection;},get internalFlowEvents(){var selection=new tr.c.Selection();for(var guid in this.eventsByGUID_){var fs=this.eventsByGUID_[guid];if(fs.state===FLOW_IN_OUT)
-selection.push(fs.event);}
-return selection;}};return{FlowClassifier:FlowClassifier};});'use strict';Polymer('tr-ui-a-related-events',{ready:function(){this.eventGroups_=[];this.$.table.tableColumns=[{title:'Event(s)',value:function(row){var typeEl=document.createElement('span');typeEl.innerText=row.type;if(row.tooltip)
-typeEl.title=row.tooltip;return typeEl;},width:'150px'},{title:'Link',width:'100%',value:function(row){var linkEl=document.createElement('tr-ui-a-analysis-link');if(row.name)
-linkEl.setSelectionAndContent(row.selection,row.name);else
-linkEl.selection=row.selection;return linkEl;}}];},hasRelatedEvents:function(){return(this.eventGroups_&&this.eventGroups_.length>0);},addRelatedEvents:function(selection){this.addConnectedFlows_(selection);this.addConnectedEvents_(selection);this.addAncestorsAndDescendents_(selection);this.updateContents_();},addConnectedFlows_:function(selection){var classifier=new tr.ui.analysis.FlowClassifier();selection.forEach(function(slice){if(slice.inFlowEvents){slice.inFlowEvents.forEach(functi [...]
-if(slice.outFlowEvents){slice.outFlowEvents.forEach(function(flow){classifier.addOutFlow(flow);});}});if(!classifier.hasEvents())
-return;var addToEventGroups=function(type,flowEvent){this.eventGroups_.push({type:type,selection:new tr.c.Selection(flowEvent),name:flowEvent.title});};classifier.inFlowEvents.forEach(addToEventGroups.bind(this,'Incoming flow'));classifier.outFlowEvents.forEach(addToEventGroups.bind(this,'Outgoing flow'));classifier.internalFlowEvents.forEach(addToEventGroups.bind(this,'Internal flow'));},addConnectedEvents_:function(selection){if(selection.length===1)
-this.addConnectedEventsForSlice_(selection[0]);else
-this.addConnectedEventsForSelection_(selection);},addAncestorsAndDescendents_:function(selection){if(selection.length===1)
-this.addAncestorsAndDescendentsForSlice_(selection[0]);else
-this.addAncestorsAndDescendentsForSelection_(selection);},addConnectedEventsForSlice_:function(slice){var precedingEventsSelection=undefined;var followingEventsSelection=undefined;if(slice.inFlowEvents&&slice.inFlowEvents.length!==0){precedingEventsSelection=new tr.c.Selection();this.recursivelyAddConnectedEvents_(precedingEventsSelection,slice,function(event){return event.inFlowEvents;});this.eventGroups_.push({type:'Preceding events',tooltip:'All preceding events connected to this one  [...]
-if(slice.outFlowEvents&&slice.outFlowEvents.length!==0){followingEventsSelection=new tr.c.Selection();this.recursivelyAddConnectedEvents_(followingEventsSelection,slice,function(event){return event.outFlowEvents;});this.eventGroups_.push({type:'Following events',tooltip:'All following events connected to this one by flow arrows.',selection:followingEventsSelection});}
-if(precedingEventsSelection&&followingEventsSelection){var allEventsSelection=new tr.c.Selection();for(var i=0;i<precedingEventsSelection.length;++i)
-allEventsSelection.push(precedingEventsSelection[i]);for(var i=0;i<followingEventsSelection.length;++i)
-allEventsSelection.push(followingEventsSelection[i]);this.eventGroups_.push({type:'All connected events',tooltip:'All events connected to this one by flow arrows.',selection:allEventsSelection});}},addConnectedEventsForSelection_:function(selection){var allEventsSelection=new tr.c.Selection();selection.forEach(function(slice){this.recursivelyAddConnectedEvents_(allEventsSelection,slice,function(event){var flows=[];if(event.inFlowEvents)
-flows=flows.concat(event.inFlowEvents);if(event.outFlowEvents)
-flows=flows.concat(event.outFlowEvents);return flows;});}.bind(this));if(allEventsSelection.length>selection.length){this.eventGroups_.push({type:'All connected events',tooltip:'All events connected to this selection by flow arrows.',selection:allEventsSelection});}},recursivelyAddConnectedEvents_:function(selection,event,getFlows){if(!event||selection.contains(event))
-return;selection.push(event);var flowEvents=getFlows(event);if(!flowEvents)
-return;for(var i=0;i<flowEvents.length;++i){selection.push(flowEvents[i]);this.recursivelyAddConnectedEvents_(selection,flowEvents[i].startSlice,getFlows);this.recursivelyAddConnectedEvents_(selection,flowEvents[i].endSlice,getFlows);}},addAncestorsAndDescendentsForSlice_:function(slice){if(!slice.iterateAllAncestors||!slice.iterateAllDescendents)
-return;var ancestorsSelection=new tr.c.Selection(slice);var descendentsSelection=new tr.c.Selection(slice);var allSlicesSelection=new tr.c.Selection(slice);slice.iterateAllAncestors(function(otherSlice){ancestorsSelection.push(otherSlice);});slice.iterateAllDescendents(function(otherSlice){descendentsSelection.push(otherSlice);});if(ancestorsSelection.length>1){this.eventGroups_.push({type:'Ancestors',tooltip:'All slices above this one on this thread.',selection:ancestorsSelection});}
-if(descendentsSelection.length>1){this.eventGroups_.push({type:'Descendents',tooltip:'All slices below this one on this thread.',selection:descendentsSelection});}
-if(ancestorsSelection.length>1&&descendentsSelection.length>1){for(var i=0;i<ancestorsSelection.length;++i)
-allSlicesSelection.push(ancestorsSelection[i]);for(var i=0;i<descendentsSelection.length;++i)
-allSlicesSelection.push(descendentsSelection[i]);this.eventGroups_.push({type:'Hierarchy',tooltip:'All slices above or below this one on this thread.',selection:allSlicesSelection});}},addAncestorsAndDescendentsForSelection_:function(selection){var allSlicesSelection=new tr.c.Selection();selection.forEach(function(slice){allSlicesSelection.push(slice);if(slice.iterateAllAncestors&&slice.iterateAllDescendents){slice.iterateAllAncestors(function(otherSlice){allSlicesSelection.push(otherSli [...]
-table.tableRows=[];else
-table.tableRows=this.eventGroups_.slice();table.rebuild();}});'use strict';Polymer('tr-ui-a-single-thread-slice-sub-view',{get selection(){return this.$.content.selection;},set selection(selection){this.$.content.selection=selection;this.$.relatedEvents.addRelatedEvents(selection);if(this.$.relatedEvents.hasRelatedEvents())
-this.$.relatedEvents.style.display='';else
-this.$.relatedEvents.style.display='none';}});'use strict';Polymer('tr-ui-a-selection-summary-table',{created:function(){this.selection_=new tr.b.Range();},ready:function(){this.$.table.showHeader=false;this.$.table.tableColumns=[{title:'Name',value:function(row){return row.title;},width:'350px'},{title:'Value',width:'100%',value:function(row){return row.value;}}];},get selection(){return this.selection_;},set selection(selection){this.selection_=selection;this.updateContents_();},update [...]
-hasRange=true;else
-hasRange=false;rows.push({title:'Selection start',value:hasRange?tr.ui.units.createTimeStampSpan(selection.bounds.min):'<empty>'});rows.push({title:'Selection extent',value:hasRange?tr.ui.units.createTimeSpan(selection.bounds.range):'<empty>'});this.$.table.tableRows=rows;this.$.table.rebuild();}});'use strict';tr.exportTo('tr.b',function(){function identity(d){return d;}
-function Statistics(){}
-Statistics.sum=function(ary,opt_func,opt_this){var func=opt_func||identity;var ret=0;for(var i=0;i<ary.length;i++)
-ret+=func.call(opt_this,ary[i],i);return ret;};Statistics.mean=function(ary,opt_func,opt_this){return Statistics.sum(ary,opt_func,opt_this)/ary.length;};Statistics.variance=function(ary,opt_func,opt_this){var func=opt_func||identity;var mean=Statistics.mean(ary,func,opt_this);var sumOfSquaredDistances=Statistics.sum(ary,function(d,i){var v=func.call(this,d,i)-mean;return v*v;},opt_this);return sumOfSquaredDistances/(ary.length-1);};Statistics.stddev=function(ary,opt_func,opt_this){return [...]
-ret=Math.max(ret,func.call(opt_this,ary[i],i));return ret;};Statistics.min=function(ary,opt_func,opt_this){var func=opt_func||identity;var ret=Infinity;for(var i=0;i<ary.length;i++)
-ret=Math.min(ret,func.call(opt_this,ary[i],i));return ret;};Statistics.range=function(ary,opt_func,opt_this){var func=opt_func||identity;var ret=new tr.b.Range();for(var i=0;i<ary.length;i++)
-ret.addValue(func.call(opt_this,ary[i],i));return ret;}
-Statistics.percentile=function(ary,percent,opt_func,opt_this){if(!(percent>=0&&percent<=1))
-throw new Error('percent must be [0,1]');var func=opt_func||identity;var tmp=new Array(ary.length);for(var i=0;i<ary.length;i++)
-tmp[i]=func.call(opt_this,ary[i],i);tmp.sort();var idx=Math.floor((ary.length-1)*percent);return tmp[idx];};return{Statistics:Statistics};});'use strict';tr.exportTo('tr.ui.analysis',function(){function MultiEventSummary(title,events){this.title=title;this.duration_=undefined;this.selfTime_=undefined;this.events_=events;this.cpuTimesComputed_=false;this.cpuSelfTime_=undefined;this.cpuDuration_=undefined;this.untotallableArgs_=[];this.totalledArgs_=undefined;};MultiEventSummary.prototype= [...]
-return this.duration_;},get cpuSelfTime(){this.computeCpuTimesIfNeeded_();return this.cpuSelfTime_;},get cpuDuration(){this.computeCpuTimesIfNeeded_();return this.cpuDuration_;},computeCpuTimesIfNeeded_:function(){if(this.cpuTimesComputed_)
-return;this.cpuTimesComputed_=true;var cpuSelfTime=0;var cpuDuration=0;var hasCpuData=false;for(var i=0;i<this.events_.length;i++){var event=this.events_[i];if(event.cpuDuration!==undefined){cpuDuration+=event.cpuDuration;hasCpuData=true;}
-if(event.cpuSelfTime!==undefined){cpuSelfTime+=event.cpuSelfTime;hasCpuData=true;}}
-if(hasCpuData){this.cpuDuration_=cpuDuration;this.cpuSelfTime_=cpuSelfTime;}},get selfTime(){if(this.selfTime_===undefined){this.selfTime_=0;for(var i=0;i<this.events_.length;i++){if(this.events_[i].selfTime!==undefined)
-this.selfTime_+=this.events[i].selfTime;}}
-return this.selfTime_;},get events(){return this.events_;},get numEvents(){return this.events_.length;},get numAlerts(){if(this.numAlerts_===undefined){this.numAlerts_=tr.b.Statistics.sum(this.events_,function(event){return event.associatedAlerts.length;});}
-return this.numAlerts_;},get untotallableArgs(){this.updateArgsIfNeeded_();return this.untotallableArgs_;},get totalledArgs(){this.updateArgsIfNeeded_();return this.totalledArgs_;},updateArgsIfNeeded_:function(){if(this.totalledArgs_!==undefined)
-return;var untotallableArgs={};var totalledArgs={};for(var i=0;i<this.events_.length;i++){var event=this.events_[i];for(var argName in event.args){var argVal=event.args[argName];var type=typeof argVal;if(type!=='number'){untotallableArgs[argName]=true;delete totalledArgs[argName];continue;}
-if(untotallableArgs[argName]){continue;}
-if(totalledArgs[argName]===undefined)
-totalledArgs[argName]=0;totalledArgs[argName]+=argVal;}}
-this.untotallableArgs_=tr.b.dictionaryKeys(untotallableArgs);this.totalledArgs_=totalledArgs;}};return{MultiEventSummary:MultiEventSummary};});'use strict';Polymer('tr-ui-a-multi-event-summary-table',{ready:function(){this.showTotals_=false;this.eventsHaveDuration_=true;this.eventsHaveSubRows_=true;this.eventsByTitle_=undefined;},updateTableColumns_:function(rows){var hasCpuData=false;var hasAlerts=false;rows.forEach(function(row){if(row.cpuDuration!==undefined)
-hasCpuData=true;if(row.cpuSelfTime!==undefined)
-hasCpuData=true;if(row.numAlerts)
-hasAlerts=true;});var columns=[];columns.push({title:'Name',value:function(row){if(row.title==='Totals')
-return'Totals';var linkEl=document.createElement('tr-ui-a-analysis-link');linkEl.setSelectionAndContent(function(){return new tr.c.Selection(row.events);},row.title);return linkEl;},width:'350px',cmp:function(rowA,rowB){return rowA.title.localeCompare(rowB.title);}});if(this.eventsHaveDuration_){columns.push({title:'Wall Duration (ms)',value:function(row){return tr.ui.units.createTimeSpan(row.duration);},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.duration-rowB.dura [...]
-if(this.eventsHaveDuration_&&hasCpuData){columns.push({title:'CPU Duration (ms)',value:function(row){return tr.ui.units.createTimeSpan(row.cpuDuration);},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.cpuDuration-rowB.cpuDuration;}});}
-if(this.eventsHaveSubRows_&&this.eventsHaveDuration_){columns.push({title:'Self time (ms)',value:function(row){return tr.ui.units.createTimeSpan(row.selfTime);},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.selfTime-rowB.selfTime;}});}
-if(this.eventsHaveSubRows_&&this.eventsHaveDuration_&&hasCpuData){columns.push({title:'CPU Self Time (ms)',value:function(row){return tr.ui.units.createTimeSpan(row.cpuSelfTime);},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.cpuSelfTime-rowB.cpuSelfTime;}});}
-columns.push({title:'Occurrences',value:function(row){return row.numEvents;},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.numEvents-rowB.numEvents;}});var alertsColumnIndex;if(hasAlerts){columns.push({title:'Num Alerts',value:function(row){return row.numAlerts;},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.numAlerts-rowB.numAlerts;}});alertsColumnIndex=columns.length-1;}
-var colWidthPercentage;if(columns.length==1)
-colWidthPercentage='100%';else
-colWidthPercentage=(100/(columns.length-1)).toFixed(3)+'%';for(var i=1;i<columns.length;i++)
-columns[i].width=colWidthPercentage;this.$.table.tableColumns=columns;if(hasAlerts){this.$.table.sortColumnIndex=alertsColumnIndex;this.$.table.sortDescending=true;}},configure:function(config){if(config.eventsByTitle===undefined)
-throw new Error('Required: eventsByTitle');if(config.showTotals!==undefined)
-this.showTotals_=config.showTotals;else
-this.showTotals_=true;if(config.eventsHaveDuration!==undefined)
-this.eventsHaveDuration_=config.eventsHaveDuration;else
-this.eventsHaveDuration_=true;if(config.eventsHaveSubRows!==undefined)
-this.eventsHaveSubRows_=config.eventsHaveSubRows;else
-this.eventsHaveSubRows_=true;this.eventsByTitle_=config.eventsByTitle;this.updateContents_();},get showTotals(){return this.showTotals_;},set showTotals(showTotals){this.showTotals_=showTotals;this.updateContents_();},get eventsHaveDuration(){return this.eventsHaveDuration_;},set eventsHaveDuration(eventsHaveDuration){this.eventsHaveDuration_=eventsHaveDuration;this.updateContents_();},get eventsHaveSubRows(){return this.eventsHaveSubRows_;},set eventsHaveSubRows(eventsHaveSubRows){this. [...]
-eventsByTitle=this.eventsByTitle_;else
-eventsByTitle=[];var allEvents=[];var rows=[];tr.b.iterItems(eventsByTitle,function(title,eventsOfSingleTitle){allEvents.push.apply(allEvents,eventsOfSingleTitle);var row=new tr.ui.analysis.MultiEventSummary(title,eventsOfSingleTitle);rows.push(row);});this.updateTableColumns_(rows);this.$.table.tableRows=rows;var footerRows=[];if(this.showTotals_){footerRows.push(new tr.ui.analysis.MultiEventSummary('Totals',allEvents));}
-this.$.table.footerRows=footerRows;this.$.table.rebuild();}});'use strict';Polymer('tr-ui-a-multi-event-details-table',{created:function(){this.selection_=undefined;this.eventsHaveDuration_=true;this.eventsHaveSubRows_=true;},ready:function(){this.initTitleTable_();},get eventsHaveDuration(){return this.eventsHaveDuration_;},set eventsHaveDuration(eventsHaveDuration){this.eventsHaveDuration_=eventsHaveDuration;this.updateContents_();},get eventsHaveSubRows(){return this.eventsHaveSubRows [...]
-var summary=new tr.ui.analysis.MultiEventSummary('Totals',this.selection_);this.updateColumns_(summary);this.updateRows_(summary);this.$.table.rebuild();},initTitleTable_:function(){var table=this.$.titletable;table.showHeader=false;table.tableColumns=[{title:'Title',value:function(row){return row.title;},width:'350px'},{title:'Value',width:'100%',value:function(row){return row.value;}}];},updateTitleTable_:function(){var title;if(this.selection_&&this.selection_.length)
-title=this.selection_[0].title;else
-title='<No selection>';var table=this.$.titletable;table.tableRows=[{title:'Title',value:title}];},updateColumns_:function(summary){var hasCpuData;if(summary.cpuDuration!==undefined)
-hasCpuData=true;if(summary.cpuSelfTime!==undefined)
-hasCpuData=true;var colWidthPercentage;if(hasCpuData)
-colWidthPercentage='20%';else
-colWidthPercentage='33.3333%';var columns=[];columns.push({title:'Start',value:function(row){if(row.__proto__===tr.ui.analysis.MultiEventSummary.prototype){return row.title;}
-var linkEl=document.createElement('tr-ui-a-analysis-link');linkEl.setSelectionAndContent(function(){return new tr.c.Selection(row.event);});linkEl.appendChild(tr.ui.units.createTimeStampSpan(row.start));return linkEl;},width:'350px',cmp:function(rowA,rowB){return rowA.start-rowB.start;}});if(this.eventsHaveDuration_){columns.push({title:'Wall Duration (ms)',value:function(row){return tr.ui.units.createTimeSpan(row.duration);},width:'<upated further down>',cmp:function(rowA,rowB){return r [...]
-if(this.eventsHaveDuration_&&hasCpuData){columns.push({title:'CPU Duration (ms)',value:function(row){return tr.ui.units.createTimeSpan(row.cpuDuration);},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.cpuDuration-rowB.cpuDuration;}});}
-if(this.eventsHaveSubRows_&&this.eventsHaveDuration_){columns.push({title:'Self time (ms)',value:function(row){return tr.ui.units.createTimeSpan(row.selfTime);},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.selfTime-rowB.selfTime;}});}
-if(this.eventsHaveSubRows_&&this.eventsHaveDuration_&&hasCpuData){columns.push({title:'CPU Self Time (ms)',value:function(row){return tr.ui.units.createTimeSpan(row.cpuSelfTime);},width:'<upated further down>',cmp:function(rowA,rowB){return rowA.cpuSelfTime-rowB.cpuSelfTime;}});}
-var argKeys=tr.b.dictionaryKeys(summary.totalledArgs);argKeys.sort();var otherKeys=summary.untotallableArgs.slice(0);otherKeys.sort();argKeys.push.apply(argKeys,otherKeys);var keysWithColumns=argKeys.slice(0,4);var keysInOtherColumn=argKeys.slice(4);keysWithColumns.forEach(function(argKey){var hasTotal=summary.totalledArgs[argKey];var colDesc={title:'Arg: '+argKey,value:function(row){if(row.__proto__!==tr.ui.analysis.MultiEventSummary.prototype){var argView=document.createElement('tr-ui- [...]
-if(hasTotal)
-return row.totalledArgs[argKey];return'';},width:'<upated further down>'};if(hasTotal){colDesc.cmp=function(rowA,rowB){return rowA.args[argKey]-rowB.args[argKey];}}
-columns.push(colDesc);});if(keysInOtherColumn.length){columns.push({title:'Other Args',value:function(row){if(row.__proto__===tr.ui.analysis.MultiEventSummary.prototype)
-return'';var argView=document.createElement('tr-ui-a-generic-object-view');var obj={};for(var i=0;i<keysInOtherColumn.length;i++)
-obj[keysInOtherColumn[i]]=row.args[keysInOtherColumn[i]];argView.object=obj;return argView;},width:'<upated further down>'});}
-var colWidthPercentage;if(columns.length==1)
-colWidthPercentage='100%';else
-colWidthPercentage=(100/(columns.length-1)).toFixed(3)+'%';for(var i=1;i<columns.length;i++)
-columns[i].width=colWidthPercentage;this.$.table.tableColumns=columns;},updateRows_:function(summary){this.$.table.sortColumnIndex=0;function Row(event){this.event=event;}
-Row.prototype={get start(){return this.event.start;},get duration(){return this.event.duration;},get cpuDuration(){return this.event.cpuDuration;},get selfTime(){return this.event.selfTime;},get cpuSelfTime(){return this.event.cpuSelfTime;},get args(){return this.event.args;}};this.$.table.tableRows=this.selection_.map(function(event){return new Row(event);});this.$.table.footerRows=[summary];}});'use strict';Polymer('tr-ui-a-multi-event-sub-view',{created:function(){this.currentSelectio [...]
-throw new Error('Only supports multiple items');this.setSelectionWithoutErrorChecks(selection);},get selection(){return this.currentSelection_;},setSelectionWithoutErrorChecks:function(selection){this.currentSelection_=selection;this.updateContents_();},get eventsHaveDuration(){return this.eventsHaveDuration_;},set eventsHaveDuration(eventsHaveDuration){this.eventsHaveDuration_=eventsHaveDuration;this.updateContents_();},get eventsHaveSubRows(){return this.eventsHaveSubRows_;},set events [...]
-return;var eventsByTitle=selection.getEventsOrganizedByTitle();var numTitles=tr.b.dictionaryLength(eventsByTitle);var summaryTableEl=document.createElement('tr-ui-a-multi-event-summary-table');summaryTableEl.configure({showTotals:numTitles>1,eventsByTitle:eventsByTitle,eventsHaveDuration:this.eventsHaveDuration_,eventsHaveSubRows:this.eventsHaveSubRows_});this.$.content.appendChild(summaryTableEl);var selectionSummaryTableEl=document.createElement('tr-ui-a-selection-summary-table');selec [...]
-this.$.content.textContent='';var mesv=document.createElement('tr-ui-a-multi-event-sub-view');mesv.selection=selection;this.$.content.appendChild(mesv);var relatedEvents=document.createElement('tr-ui-a-related-events');relatedEvents.addRelatedEvents(selection);if(relatedEvents.hasRelatedEvents()){this.$.content.appendChild(relatedEvents);}},get requiresTallView(){if(this.$.content.children.length===0)
-return false;var childTagName=this.$.content.children[0].tagName;if(childTagName==='TR-UI-A-MULTI-EVENT-SUB-VIEW')
-return false;return true;}});'use strict';Polymer('tr-ui-a-single-async-slice-sub-view',{getEventRows_:function(event){var rows=this.__proto__.__proto__.getEventRows_(event);rows.splice(0,0,{name:'ID',value:event.id});return rows;},get relatedEventsToHighlight(){if(!this.currentSelection_)
-return undefined;return this.currentSelection_[0].associatedEvents;}});'use strict';Polymer('tr-ui-a-multi-async-slice-sub-view',{get selection(){return this.$.content.selection;},set selection(selection){this.$.content.selection=selection;},get relatedEventsToHighlight(){if(!this.$.content.selection)
-return undefined;var selection=new tr.c.Selection();this.$.content.selection.forEach(function(asyncEvent){if(!asyncEvent.associatedEvents)
-return;asyncEvent.associatedEvents.forEach(function(event){selection.push(event);});});if(selection.length)
-return selection;return undefined;}});'use strict';Polymer('tr-ui-a-single-cpu-slice-sub-view',{created:function(){this.currentSelection_=undefined;},get selection(){return this.currentSelection_;},set selection(selection){if(selection.length!==1)
-throw new Error('Only supports single slices');if(!(selection[0]instanceof tr.model.CpuSlice))
-throw new Error('Only supports thread time slices');this.currentSelection_=selection;var cpuSlice=selection[0];var thread=cpuSlice.threadThatWasRunning;var shadowRoot=this.shadowRoot;if(thread){shadowRoot.querySelector('#process-name').textContent=thread.parent.userFriendlyName;shadowRoot.querySelector('#thread-name').textContent=thread.userFriendlyName;}else{shadowRoot.querySelector('#process-name').parentElement.style.display='none';shadowRoot.querySelector('#thread-name').textContent= [...]
-shadowRoot.querySelector('#start').textContent=tr.b.units.tsString(cpuSlice.start);shadowRoot.querySelector('#duration').textContent=tr.b.units.tsString(cpuSlice.duration);var runningThreadEl=shadowRoot.querySelector('#running-thread');var timeSlice=cpuSlice.getAssociatedTimeslice();if(!timeSlice){runningThreadEl.parentElement.style.display='none';}else{var threadLink=document.createElement('tr-ui-a-analysis-link');threadLink.selection=new tr.c.Selection(timeSlice);threadLink.textContent [...]
-shadowRoot.querySelector('#args').object=cpuSlice.args;}});'use strict';Polymer('tr-ui-a-multi-cpu-slice-sub-view',{ready:function(){this.$.content.eventsHaveSubRows=false;},get selection(){return this.$.content.selection;},set selection(selection){this.$.content.setSelectionWithoutErrorChecks(selection);}});'use strict';Polymer('tr-ui-a-single-thread-time-slice-sub-view',{created:function(){this.currentSelection_=undefined;},get selection(){return this.currentSelection_;},set selection( [...]
-throw new Error('Only supports single slices');if(!(selection[0]instanceof tr.model.ThreadTimeSlice))
-throw new Error('Only supports thread time slices');this.currentSelection_=selection;var timeSlice=selection[0];var thread=timeSlice.thread;var shadowRoot=this.shadowRoot;shadowRoot.querySelector('#state').textContent=timeSlice.title;var stateColor=tr.ui.b.getColorPalette()[timeSlice.colorId];shadowRoot.querySelector('#state').style.backgroundColor=stateColor;shadowRoot.querySelector('#process-name').textContent=thread.parent.userFriendlyName;shadowRoot.querySelector('#thread-name').text [...]
-cpuLink.textContent=cpuSliceThatTookCpu.thread.userFriendlyName;else
-cpuLink.textContent=cpuSliceThatTookCpu.title;runningInsteadEl.appendChild(cpuLink);}else{runningInsteadEl.parentElement.removeChild(runningInsteadEl);}}
-var argsEl=shadowRoot.querySelector('#args');if(tr.b.dictionaryKeys(timeSlice.args).length>0){var argsView=document.createElement('tr-ui-a-generic-object-view');argsView.object=timeSlice.args;argsEl.parentElement.style.display='';argsEl.textContent='';argsEl.appendChild(argsView);}else{argsEl.parentElement.style.display='none';}}});'use strict';Polymer('tr-ui-a-multi-thread-time-slice-sub-view',{ready:function(){this.$.content.eventsHaveSubRows=false;},get selection(){return this.$.conte [...]
-wrap.userFriendlyName=text;el.selection=wrap;if(opt_tooltip)
-el.title=opt_tooltip;return el;},appendElement_:function(parent,tagName,opt_text){var n=parent.ownerDocument.createElement(tagName);parent.appendChild(n);if(opt_text!=undefined)
-n.textContent=opt_text;return n;},appendText_:function(parent,text){var textElement=parent.ownerDocument.createTextNode(text);parent.appendChild(textNode);return textNode;},appendTableCell_:function(table,row,cellnum,text,opt_warning){var td=this.appendElement_(row,'td',text);td.className=table.className+'-col-'+cellnum;if(opt_warning){var span=document.createElement('span');span.textContent=' '+String.fromCharCode(9888);span.title=opt_warning;td.appendChild(span);}
-return td;},appendTableCell:function(table,row,text){return this.appendTableCell_(table,row,row.children.length,text);},appendTableCellWithTooltip_:function(table,row,cellnum,text,tooltip){if(tooltip){var td=this.appendElement_(row,'td');td.className=table.className+'-col-'+cellnum;var span=this.appendElement_(td,'span',text);span.className='tooltip';span.title=tooltip;return td;}else{return this.appendTableCell_(table,row,cellnum,text);}},appendHeader:function(label){var header=this.app [...]
-throw new Error('Only one header row allowed.');if(table.tbody||table.tfoot)
-throw new Error('Cannot add a header row after data rows have been added.');table.headerRow=this.appendElement_(this.appendElement_(table,'thead'),'tr');table.headerRow.className='analysis-table-header';return table.headerRow;},appendBodyRow:function(table){if(table.tfoot)
-throw new Error('Cannot add a tbody row after footer rows have been added.');if(!table.tbody)
-table.tbody=this.appendElement_(table,'tbody');var row=this.appendElement_(table.tbody,'tr');if(table.headerRow)
-row.className='analysis-table-row';else
-row.className='analysis-table-row-inverted';return row;},appendFootRow:function(table){if(!table.tfoot){table.tfoot=this.appendElement_(table,'tfoot');table.tfoot.rowsClassName=((table.headerRow?1:0)+
-(table.tbody?table.tbody.rows.length:0))%2?'analysis-table-row':'analysis-table-row-inverted';}
-var row=this.appendElement_(table.tfoot,'tr');row.className=table.tfoot.rowsClassName;return row;},appendSpacingRow:function(table,opt_inFoot){if(table.tfoot||opt_inFoot)
-var row=this.appendFootRow(table);else
-var row=this.appendBodyRow(table);for(var i=0;i<table.numColumns;i++)
-this.appendTableCell_(table,row,i,' ');},appendInfoRow:function(table,label,opt_value,opt_inFoot){if(table.tfoot||opt_inFoot)
-var row=this.appendFootRow(table);else
-var row=this.appendBodyRow(table);this.appendTableCell_(table,row,0,label);if(opt_value!==undefined){var objectView=document.createElement('tr-ui-a-generic-object-view');objectView.object=opt_value;objectView.classList.add('analysis-table-col-1');objectView.style.display='table-cell';row.appendChild(objectView);}else{this.appendTableCell_(table,row,1,'');}
-for(var i=2;i<table.numColumns;i++)
-this.appendTableCell_(table,row,i,'');},appendInfoRowTime:function(table,label,time,opt_inFoot,opt_warning){if(table.tfoot||opt_inFoot)
-var row=this.appendFootRow(table);else
-var row=this.appendBodyRow(table);this.appendTableCell_(table,row,0,label);this.appendTableCell_(table,row,1,tr.b.units.tsString(time),opt_warning);},appendDetailsRow:function(table,start,duration,selfTime,args,opt_selectionGenerator,opt_cpuDuration,opt_inFoot){if(opt_inFoot){var row=this.appendFootRow(table);this.appendTableCell(table,row,'Totals');}
-else{var row=this.appendBodyRow(table);if(opt_selectionGenerator){var labelEl=this.appendTableCell(table,row,tr.b.units.tsString(start));labelEl.textContent='';labelEl.appendChild(this.createSelectionChangingLink(tr.b.units.tsString(start),opt_selectionGenerator,''));}else{this.appendTableCell(table,row,tr.b.units.tsString(start));}}
-if(duration!==null)
-this.appendTableCell(table,row,tr.b.units.tsString(duration));if(opt_cpuDuration)
-this.appendTableCell(table,row,opt_cpuDuration!=''?tr.b.units.tsString(opt_cpuDuration):'');if(selfTime!==null)
-this.appendTableCell(table,row,tr.b.units.tsString(selfTime));var argsCell=this.appendTableCell(table,row,'');var n=0;for(var argName in args){n+=1;}
-if(n>0){for(var argName in args){var argVal=args[argName];var objectView=document.createElement('tr-ui-a-generic-object-view');objectView.object=argVal;var argsRow=this.appendElement_(this.appendElement_(argsCell,'table'),'tr');this.appendElement_(argsRow,'td',argName+':');this.appendElement_(argsRow,'td').appendChild(objectView);}}},appendDataRow:function(table,label,opt_duration,opt_cpuDuration,opt_selfTime,opt_cpuSelfTime,opt_occurrences,opt_percentage,opt_statistics,opt_selectionGene [...]
-tr.b.units.tsString(opt_statistics.min)+' \u000DMax Duration:\u0009'+
-tr.b.units.tsString(opt_statistics.max)+' \u000DAvg Duration:\u0009'+
-tr.b.units.tsString(opt_statistics.avg)+' (\u03C3 = '+stddevRounded+')';if(opt_statistics.start){tooltip+='\u000DStart Time:\u0009'+
-tr.b.units.tsString(opt_statistics.start);}
-if(opt_statistics.end){tooltip+='\u000DEnd Time:\u0009'+
-tr.b.units.tsString(opt_statistics.end);}
-if(opt_statistics.frequency&&opt_statistics.frequency_stddev){var fR=Math.round(opt_statistics.frequency*1000)/1000;var fSR=Math.round(opt_statistics.frequency_stddev*1000)/1000;tooltip+='\u000DFrequency:\u0009'+
-fR+' occurrences/s (\u03C3 = '+fSR+')';}}
-if(table.tfoot||opt_inFoot)
-var row=this.appendFootRow(table);else
-var row=this.appendBodyRow(table);var cellNum=0;if(!opt_selectionGenerator){this.appendTableCellWithTooltip_(table,row,cellNum,label,tooltip);}else{var labelEl=this.appendTableCellWithTooltip_(table,row,cellNum,label,tooltip);if(labelEl){labelEl.textContent='';labelEl.appendChild(this.createSelectionChangingLink(label,opt_selectionGenerator,tooltip));}}
-cellNum++;if(opt_duration!==null){if(opt_duration){if(opt_duration instanceof Array){this.appendTableCellWithTooltip_(table,row,cellNum,'['+opt_duration.join(', ')+']',tooltip);}else{this.appendTableCellWithTooltip_(table,row,cellNum,tr.b.units.tsString(opt_duration),tooltip);}}else{this.appendTableCell_(table,row,cellNum,'');}
-cellNum++;}
-if(opt_cpuDuration!==null){if(opt_cpuDuration!=''){this.appendTableCellWithTooltip_(table,row,cellNum,tr.b.units.tsString(opt_cpuDuration),tooltip);}else{this.appendTableCell_(table,row,cellNum,'');}
-cellNum++;}
-if(opt_selfTime!==null){if(opt_selfTime){this.appendTableCellWithTooltip_(table,row,cellNum,tr.b.units.tsString(opt_selfTime),tooltip);}else{this.appendTableCell_(table,row,cellNum,'');}
-cellNum++;}
-if(opt_cpuSelfTime!==null){if(opt_cpuSelfTime){this.appendTableCellWithTooltip_(table,row,cellNum,tr.b.units.tsString(opt_cpuSelfTime),tooltip);}else{this.appendTableCell_(table,row,cellNum,'');}
-cellNum++;}
-if(opt_percentage!==null){if(opt_percentage){this.appendTableCellWithTooltip_(table,row,cellNum,opt_percentage,tooltip);}else{this.appendTableCell_(table,row,cellNum,'');}
-cellNum++;}
-if(opt_occurrences){this.appendTableCellWithTooltip_(table,row,cellNum,String(opt_occurrences),tooltip);}else{this.appendTableCell_(table,row,cellNum,'');}
-cellNum++;}};return{AnalysisResults:AnalysisResults};});'use strict';(function(){var CounterSample=tr.model.CounterSample;Polymer('tr-ui-a-counter-sample-sub-view',{created:function(){this.currentSelection_=undefined;},get selection(){return this.currentSelection_;},set selection(selection){var results=new tr.ui.analysis.AnalysisResults();this.appendChild(results);this.analyzeCounterSamples_(results,selection);},analyzeCounterSamples_:function(results,allSamples){var samplesByCounter={}; [...]
-samplesByCounter[ctr.guid]=[];samplesByCounter[ctr.guid].push(allSamples[i]);}
-for(var guid in samplesByCounter){var samples=samplesByCounter[guid];var ctr=samples[0].series.counter;var timestampGroups=CounterSample.groupByTimestamp(samples);if(timestampGroups.length==1)
-this.analyzeSingleCounterTimestamp_(results,ctr,timestampGroups[0]);else
-this.analyzeMultipleCounterTimestamps_(results,ctr,timestampGroups);}},analyzeSingleCounterTimestamp_:function(results,ctr,samplesWithSameTimestamp){results.appendHeader('Selected counter:');var table=results.appendTable('analysis-counter-table',2);results.appendInfoRow(table,'Title',ctr.name);results.appendInfoRowTime(table,'Timestamp',samplesWithSameTimestamp[0].timestamp);for(var i=0;i<samplesWithSameTimestamp.length;i++){var sample=samplesWithSameTimestamp[i];results.appendInfoRow(ta [...]
-sampleIndices.push(samplesByTimestamp[i][0].getSampleIndex());var stats=ctr.getSampleStatistics(sampleIndices);for(var i=0;i<stats.length;i++){var samples=[];for(var k=0;k<sampleIndices.length;++k)
-samples.push(ctr.getSeries(i).getSample(sampleIndices[k]).value);results.appendDataRow(table,ctr.name+': series('+ctr.getSeries(i).name+')',samples,null,null,null,samples.length,null,stats[i]);}}});})();'use strict';Polymer('tr-ui-a-single-flow-event-sub-view',{getEventRows_:function(event){var rows=this.__proto__.__proto__.getEventRows_(event);rows.splice(0,0,{name:'ID',value:event.id});function createLinkTo(slice){var linkEl=document.createElement('tr-ui-a-analysis-link');linkEl.setSel [...]
-rows.push({name:'From',value:createLinkTo(event.startSlice)});rows.push({name:'To',value:createLinkTo(event.endSlice)});return rows;}});'use strict';Polymer('tr-ui-a-multi-flow-event-sub-view',{ready:function(){this.$.content.eventsHaveDuration=false;this.$.content.eventsHaveSubRows=false;},set selection(selection){this.$.content.selection=selection;},get selection(){return this.$.content.selection;}});'use strict';tr.exportTo('tr.ui.analysis',function(){var ObjectInstanceView=tr.ui.b.de [...]
-return false;if(this.$.content.children[0]instanceof
-tr.ui.analysis.ObjectInstanceView)
-return this.$.content.children[0].requiresTallView;},get selection(){return this.currentSelection_;},set selection(selection){if(selection.length!==1)
-throw new Error('Only supports single item selections');if(!(selection[0]instanceof tr.model.ObjectInstance))
-throw new Error('Only supports object instances');this.$.content.textContent='';this.currentSelection_=selection;var instance=selection[0];var typeInfo=tr.ui.analysis.ObjectInstanceView.getTypeInfo(instance.category,instance.typeName);if(typeInfo){var customView=new typeInfo.constructor();this.$.content.appendChild(customView);customView.modelEvent=instance;}else{this.appendGenericAnalysis_(instance);}},appendGenericAnalysis_:function(instance){var html='';html+='<div class="title">'+
-instance.typeName+' '+
-instance.id+'</div>\n';html+='<table>';html+='<tr>';html+='<tr><td>creationTs:</td><td>'+
-instance.creationTs+'</td></tr>\n';if(instance.deletionTs!=Number.MAX_VALUE){html+='<tr><td>deletionTs:</td><td>'+
-instance.deletionTs+'</td></tr>\n';}else{html+='<tr><td>deletionTs:</td><td>not deleted</td></tr>\n';}
-html+='<tr><td>snapshots:</td><td id="snapshots"></td></tr>\n';html+='</table>';this.$.content.innerHTML=html;var snapshotsEl=this.$.content.querySelector('#snapshots');instance.snapshots.forEach(function(snapshot){var snapshotLink=document.createElement('tr-ui-a-analysis-link');snapshotLink.selection=new tr.c.Selection(snapshot);snapshotsEl.appendChild(snapshotLink);});}});'use strict';tr.exportTo('tr.ui.analysis',function(){var ObjectSnapshotView=tr.ui.b.define('object-snapshot-view'); [...]
-return false;if(this.children[0]instanceof tr.ui.analysis.ObjectSnapshotView)
-return this.children[0].requiresTallView;},get selection(){return this.currentSelection_;},set selection(selection){if(selection.length!==1)
-throw new Error('Only supports single item selections');if(!(selection[0]instanceof tr.model.ObjectSnapshot))
-throw new Error('Only supports object instances');this.textContent='';this.currentSelection_=selection;var snapshot=selection[0];var typeInfo=tr.ui.analysis.ObjectSnapshotView.getTypeInfo(snapshot.objectInstance.category,snapshot.objectInstance.typeName);if(typeInfo){var customView=new typeInfo.constructor();this.appendChild(customView);customView.modelEvent=snapshot;}else{this.appendGenericAnalysis_(snapshot);}},appendGenericAnalysis_:function(snapshot){var instance=snapshot.objectInsta [...]
-tr.b.units.tsString(snapshot.ts)+'</div>\n';html+='<table>';html+='<tr>';html+='<tr><td>args:</td><td id="args"></td></tr>\n';html+='</table>';this.innerHTML=html;var instanceLinkEl=document.createElement('tr-ui-a-analysis-link');instanceLinkEl.selection=new tr.c.Selection(instance);var tmp=this.querySelector('#instance-link');tmp.parentElement.replaceChild(instanceLinkEl,tmp);var argsEl=this.querySelector('#args');argsEl.textContent='';var objectView=document.createElement('tr-ui-a-gene [...]
-return tr.ui.units.createTimeStampSpan(event.ts);var spanEl=document.createElement('span');spanEl.appendChild(tr.ui.units.createTimeStampSpan(event.creationTs));spanEl.appendChild(tr.ui.b.createSpan({textContent:'-',marginLeft:'4px',marginRight:'4px'}));if(event.deletionTs!=Number.MAX_VALUE){spanEl.appendChild(tr.ui.units.createTimeStampSpan(event.deletionTs));}
-return spanEl;},width:'200px'},{title:'Second',value:function(event){var linkEl=document.createElement('tr-ui-a-analysis-link');linkEl.setSelectionAndContent(function(){return new tr.c.Selection(event);},event.userFriendlyName);return linkEl;},width:'100%'}];table.tableRows=objectEvents;table.rebuild();}});'use strict';Polymer('tr-ui-a-single-sample-sub-view',{created:function(){this.currentSelection_=undefined;},ready:function(){this.$.content.tableColumns=[{title:'FirstColumn',value:fu [...]
-var sample=this.currentSelection_[0];var table=this.$.content;var rows=[];rows.push({title:'Title',value:sample.title});rows.push({title:'Sample time',value:tr.ui.units.createTimeStampSpan(sample.start)});var sfEl=document.createElement('tr-ui-a-stack-frame');sfEl.stackFrame=sample.leafStackFrame;rows.push({title:'Stack trace',value:sfEl});table.tableRows=rows;table.rebuild();}});'use strict';Polymer('tr-ui-a-multi-sample-sub-view',{created:function(){this.currentSelection_=undefined;},g [...]
-return undefined;return this.currentSelection_[0].associatedEvents;}});'use strict';Polymer('tr-ui-a-multi-interaction-record-sub-view',{created:function(){this.currentSelection_=undefined;},set selection(selection){this.currentSelection_=selection;this.textContent='';var realView=document.createElement('tr-ui-a-multi-event-sub-view');this.appendChild(realView);realView.setSelectionWithoutErrorChecks(selection);this.currentSelection_=selection;},get selection(){return this.currentSelecti [...]
-return undefined;var selection=new tr.c.Selection();this.currentSelection_.forEach(function(ir){ir.associatedEvents.forEach(function(event){selection.push(event);});});return selection;}});'use strict';Polymer('tr-ui-a-alert-sub-view',{ready:function(){this.currentSelection_=undefined;this.$.table.tableColumns=[{title:'Label',value:function(row){return row.name;},width:'150px'},{title:'Value',width:'100%',value:function(row){return row.value;}}];this.$.table.showHeader=false;},get select [...]
-if(alert.associatedEvents.length){alert.associatedEvents.forEach(function(event,i){var linkEl=document.createElement('tr-ui-a-analysis-link');linkEl.setSelectionAndContent(function(){return event;},event.title);var valueString='';if(event instanceof tr.model.TimedEvent)
-valueString='took '+event.duration.toFixed(2)+'ms';rows.push({name:linkEl,value:valueString});});}
-var descriptionEl=tr.ui.b.createDiv({textContent:alert.info.description,maxWidth:'300px'});rows.push({name:'Description',value:descriptionEl});if(alert.info.docLinks){alert.info.docLinks.forEach(function(linkObject){var linkEl=document.createElement('a');linkEl.target='_blank';linkEl.href=linkObject.href;linkEl.textContent=linkObject.textContent;rows.push({name:linkObject.label,value:linkEl});});}
-return rows;},getRowsForAlerts_:function(alerts){if(alerts.length==1){var rows=[{name:'Alert',value:alerts[0].title}];var detailRows=this.getRowsForSingleAlert_(alerts[0]);rows.push.apply(rows,detailRows);return rows;}else{return alerts.map(function(alert){return{name:'Alert',value:alert.title,isExpanded:alerts.size<10,subRows:this.getRowsForSingleAlert_(alert)};},this);}},updateContents_:function(){if(this.currentSelection_===undefined){this.$.table.rows=[];this.$.table.rebuild();return;}
-var alerts=this.currentSelection_;this.$.table.tableRows=this.getRowsForAlerts_(alerts);this.$.table.rebuild();}});'use strict';Polymer('tr-ui-a-single-frame-sub-view',{ready:function(){this.currentSelection_=undefined;},get selection(){return this.currentSelection_;},set selection(selection){if(selection.length!=1)
-throw new Error('Only supports single frame!');this.currentSelection_=selection;this.$.asv.selection=selection[0].associatedAlerts;},get relatedEventsToHighlight(){if(!this.currentSelection_)
-return undefined;return this.currentSelection_[0].associatedEvents;}});'use strict';Polymer('tr-ui-a-multi-frame-sub-view',{created:function(){this.currentSelection_=undefined;},set selection(selection){this.textContent='';var realView=document.createElement('tr-ui-a-multi-event-sub-view');realView.eventsHaveDuration=false;realView.eventsHaveSubRows=false;this.appendChild(realView);realView.setSelectionWithoutErrorChecks(selection);this.currentSelection_=selection;},get selection(){retur [...]
-return undefined;var selection=new tr.c.Selection();this.currentSelection_.forEach(function(frameEvent){frameEvent.associatedEvents.forEach(function(event){selection.push(event);});});return selection;}});'use strict';Polymer('tr-ui-b-color-legend',{ready:function(){var blackSquareCharCode=9632;this.$.square.innerText=String.fromCharCode(blackSquareCharCode);this.label_=undefined;},get label(){return this.label_;},set label(label){this.label_=label;if(this.label_===undefined){this.$.squa [...]
-var paletteRaw=tr.ui.b.getRawColorPalette();var colorId=tr.ui.b.getColorIdForGeneralPurposeString(this.label_);var color=tr.ui.b.colorToRGBString(paletteRaw[colorId]);this.$.square.style.color=color;this.$.label.innerText=this.label_;}});'use strict';tr.exportTo('tr.ui.analysis',function(){function MemoryColumn(name,title,units,cellGetter){this.name=name;this.title=title;this.units=units;this.cell=cellGetter;this.color=undefined;}
-MemoryColumn.fromRows=function(rows,cellKey,opt_titleBuilder){var columnTraits={};function gatherTraits(row){if(row===undefined)
-return;var attrCells=row[cellKey];tr.b.iterItems(attrCells,function(attrName,attrCell){if(attrCell===undefined)
-return;var attrValue=attrCell.attr;if(attrValue===undefined)
-return;var existingTraits=columnTraits[attrName];if(existingTraits===undefined){columnTraits[attrName]={constructor:attrValue.constructor,units:attrValue.units};return;}
-if(existingTraits.constructor!==attrValue.constructor||existingTraits.units!==attrValue.units){existingTraits.constructor=tr.model.UnknownAttribute;existingTraits.units=undefined;}});if(row.subRows!==undefined)
-row.subRows.forEach(gatherTraits);};rows.forEach(gatherTraits);var titleBuilder=opt_titleBuilder||tr.b.identity;var columns=[];tr.b.iterItems(columnTraits,function(columnName,columnTraits){var cellGetter=fieldGetter(cellKey,columnName);var title=titleBuilder(columnName);columns.push(MemoryColumn.fromAttributeTraits(columnName,title,columnTraits,cellGetter));});return columns;};MemoryColumn.fromAttributeTraits=function(name,title,traits,cellGetter){var constructor;if(traits.constructor=== [...]
-constructor=ScalarMemoryColumn;else
-constructor=MemoryColumn;return new constructor(name,title,traits.units,cellGetter);};MemoryColumn.spaceEqually=function(columns){var columnWidth=(100/columns.length).toFixed(3)+'%';columns.forEach(function(column){column.width=columnWidth;});};MemoryColumn.sortByImportance=function(columns,importanceRules){var positions=columns.map(function(column,srcIndex){return{importance:column.getImportance(importanceRules),srcIndex:srcIndex,column:column};});positions.sort(function(a,b){if(a.impor [...]
-return a.srcIndex-b.srcIndex;return b.importance-a.importance;});positions.forEach(function(position,dstIndex){columns[dstIndex]=position.column;});};MemoryColumn.iconFromAttributeInfoType=function(type){switch(type){case tr.model.AttributeInfoType.WARNING:return{symbol:String.fromCharCode(9888),color:'red'};case tr.model.AttributeInfoType.LINK:return{symbol:String.fromCharCode(9903)};default:return{symbol:String.fromCharCode(9432),color:'blue'};}
-throw new Error('Unreachable');};MemoryColumn.prototype={attr:function(row){var cell=this.cell(row);if(cell===undefined)
-return undefined;return cell.attr;},value:function(row){var attr=this.attr(row);if(attr===undefined)
-return'';return this.formatDefinedAttribute(attr);},formatDefinedAttribute:function(attr){var formattedValue=this.formatDefinedAttributeValue(attr);var color;if(typeof this.color==='function')
-color=this.color(attr);else
-color=this.color;if(color===undefined&&attr.infos.length===0)
-return formattedValue;var attrEl=document.createElement('span');attrEl.style.display='flex';attrEl.style.alignItems='center';attrEl.appendChild(tr.ui.b.asHTMLOrTextNode(formattedValue));attr.infos.forEach(function(info){var infoEl=document.createElement('span');infoEl.style.paddingLeft='4px';infoEl.style.cursor='help';infoEl.style.fontWeight='bold';var icon=MemoryColumn.iconFromAttributeInfoType(info.type);infoEl.textContent=icon.symbol;if(icon.color!==undefined)
-infoEl.style.color=icon.color;infoEl.title=info.message;attrEl.appendChild(infoEl);},this);if(color!==undefined)
-attrEl.style.color=color;return attrEl;},formatDefinedAttributeValue:function(attr){return String(attr.value);},cmp:function(rowA,rowB){var attrA=this.attr(rowA);var attrB=this.attr(rowB);if(attrA===undefined&&attrB===undefined)
-return 0;if(attrA===undefined)
-return-1;if(attrB===undefined)
-return 1;return this.compareDefinedAttributes(attrA,attrB);},compareDefinedAttributes:function(attrA,attrB){var strA=String(attrA.value);var strB=String(attrB.value);return strA.localeCompare(strB);},getImportance:function(importanceRules){if(importanceRules.length===0)
-return 0;for(var i=0;i<importanceRules.length;i++){var importanceRule=importanceRules[i];if(this.matchesNameCondition(importanceRule.condition))
-return importanceRule.importance;}
-var minImportance=importanceRules[0].importance;for(var i=1;i<importanceRules.length;i++){minImportance=Math.min(minImportance,importanceRules[i].importance);}
-return minImportance-1;},matchesNameCondition:function(condition){if(condition===undefined)
-return true;if(typeof(condition)==='string')
-return this.name===condition;return condition.test(this.name);}};function ScalarMemoryColumn(name,title,units,cellGetter){MemoryColumn.call(this,name,title,units,cellGetter);}
-ScalarMemoryColumn.prototype={__proto__:MemoryColumn.prototype,formatDefinedAttributeValue:function(attr){if(this.units==='bytes'){var sizeEl=document.createElement('tr-ui-u-size-in-bytes-span');sizeEl.numBytes=attr.value;return sizeEl;}
-return MemoryColumn.prototype.formatDefinedAttributeValue.call(this,attr);},compareDefinedAttributes:function(attrA,attrB){return attrA.value-attrB.value;}};function MemoryCell(attr){this.attr=attr;}
-MemoryCell.extractAttribute=function(cell){if(cell===undefined)
-return undefined;return cell.attr;};function fieldGetter(){var fields=tr.b.asArray(arguments);return function(row){var value=row;for(var i=0;i<fields.length;i++)
-value=value[fields[i]];return value;};}
-var RECURSIVE_EXPANSION_MAX_SUB_ROW_COUNT=10;function expandTableRowsRecursively(table){function expandRowRecursively(row){if(row.subRows===undefined||row.subRows.length===0)
-return;if(row.subRows.length>RECURSIVE_EXPANSION_MAX_SUB_ROW_COUNT)
-return;table.setExpandedForTableRow(row,true);row.subRows.forEach(expandRowRecursively);}
-table.tableRows.forEach(expandRowRecursively);}
-function aggregateTableRowCellsRecursively(row,cellKey){var subRows=row.subRows;if(subRows===undefined)
-return;subRows.forEach(function(subRow){aggregateTableRowCellsRecursively(subRow,cellKey);});aggregateTableRowCells(row,subRows,cellKey);}
-function aggregateTableRowCells(row,subRows,cellKey){var rowCells=row[cellKey];if(rowCells===undefined)
-row[cellKey]=rowCells={};var subRowCellNames={};subRows.forEach(function(subRow){var subRowCells=subRow[cellKey];if(subRowCells===undefined)
-return;tr.b.iterItems(subRowCells,function(columnName){subRowCellNames[columnName]=true;});});tr.b.iterItems(subRowCellNames,function(cellName){var subRowAttributes=subRows.map(function(subRow){var subRowCells=subRow[cellKey];if(subRowCells===undefined)
-return undefined;return MemoryCell.extractAttribute(subRowCells[cellName]);},this);var existingRowCell=rowCells[cellName];var existingRowAttribute=MemoryCell.extractAttribute(existingRowCell);var aggregatedAttribute=tr.model.Attribute.aggregate(subRowAttributes,existingRowAttribute);if(existingRowCell!==undefined){existingRowCell.attr=aggregatedAttribute;}else{rowCells[cellName]=new MemoryCell(aggregatedAttribute);}});}
-return{MemoryColumn:MemoryColumn,ScalarMemoryColumn:ScalarMemoryColumn,MemoryCell:MemoryCell,fieldGetter:fieldGetter,expandTableRowsRecursively:expandTableRowsRecursively,aggregateTableRowCellsRecursively:aggregateTableRowCellsRecursively,aggregateTableRowCells:aggregateTableRowCells};});'use strict';(function(){var IMPORTANCE_RULES=[{condition:'size',importance:10},{condition:'page_size',importance:0},{condition:/size/,importance:5},{importance:0}];Polymer('tr-ui-a-memory-dump-allocator [...]
-var rows=this.createRows_();var columns=this.createColumns_(rows);var table=this.ownerDocument.createElement('tr-ui-b-table');this.$.contents.appendChild(table);table.supportsSelection=true;table.tableRows=rows;table.tableColumns=columns;table.rebuild();tr.ui.analysis.expandTableRowsRecursively(table);},createRows_:function(){var createAllocatorRow=function(allocatorDump){var cells=tr.b.mapItems(allocatorDump.attributes,function(attrName,attrValue){return new tr.ui.analysis.MemoryCell(at [...]
-row.subRows=allocatorDump.children.map(createAllocatorRow);return row;};var rows=[createAllocatorRow(this.memoryAllocatorDump_)];return rows;},createColumns_:function(rows){var titleColumn={title:'Allocator',value:function(row){return row.title;},width:'200px',cmp:function(rowA,rowB){return rowA.title.localeCompare(rowB.title);}};var attributeColumns=tr.ui.analysis.MemoryColumn.fromRows(rows,'cells');tr.ui.analysis.MemoryColumn.spaceEqually(attributeColumns);tr.ui.analysis.MemoryColumn.s [...]
-row.subRows=rule.children.map(createEmptyRow);return row;}
-function hexString(address,is64BitAddress){var hexPadding=is64BitAddress?'0000000000000000':'00000000';if(address===undefined)
-return undefined;return(hexPadding+address.toString(16)).substr(-hexPadding.length);}
-function classifyVMRegion(row,vmRegion,is64BitAddress){var rule=row.rule;if(rule===undefined||rule.children===undefined||rule.children.length===0){var mappedFile=vmRegion.mappedFile||'';var cells={};function addCellIfValueDefined(columnName,attrClass,units,value){if(value===undefined)
-return;var attr=new attrClass(units,value);var cell=new tr.ui.analysis.MemoryCell(attr);cells[columnName]=cell;}
-function addBytesCellIfValueDefined(columnName,value){addCellIfValueDefined(columnName,tr.model.ScalarAttribute,'bytes',value);}
-addCellIfValueDefined('Start address',tr.model.StringAttribute,'',hexString(vmRegion.startAddress,is64BitAddress));addBytesCellIfValueDefined('Virtual size',vmRegion.sizeInBytes);addCellIfValueDefined('Protection flags',tr.model.StringAttribute,'',vmRegion.protectionFlagsToString);addBytesCellIfValueDefined('PSS',vmRegion.byteStats.proportionalResident);addBytesCellIfValueDefined('Private dirty',vmRegion.byteStats.privateDirtyResident);addBytesCellIfValueDefined('Private clean',vmRegion. [...]
-function vmRegionMatchesChildRule(childRule){var fileRegExp=childRule.file;if(fileRegExp===undefined)
-return true;return fileRegExp.test(vmRegion.mappedFile);}
-var matchedChildRuleIndex=tr.b.findFirstIndexInArray(rule.children,vmRegionMatchesChildRule);if(matchedChildRuleIndex===-1){matchedChildRuleIndex=rule.children.length;if(matchedChildRuleIndex>=row.subRows.length){row.subRows.push({title:'Other',cells:{},subRows:[]});}}
-classifyVMRegion(row.subRows[matchedChildRuleIndex],vmRegion,is64BitAddress);}
-Polymer('tr-ui-a-memory-dump-vm-regions-details-pane',{created:function(){this.vmRegions_=undefined;},ready:function(){this.updateContents_();},set vmRegions(vmRegions){this.vmRegions_=vmRegions;this.updateContents_();},get vmRegions(){return this.vmRegions_;},updateContents_:function(){this.$.contents.textContent='';if(this.vmRegions_===undefined){var infoText=this.ownerDocument.createElement('div');this.$.contents.appendChild(infoText);infoText.classList.add('info-text');infoText.inner [...]
-var rows=this.createRows_();var columns=this.createColumns_(rows);var table=this.ownerDocument.createElement('tr-ui-b-table');this.$.contents.appendChild(table);table.supportsSelection=true;table.tableRows=rows;table.tableColumns=columns;table.rebuild();tr.ui.analysis.expandTableRowsRecursively(table);},createRows_:function(){var is64BitAddress=this.vmRegions_.some(function(vmRegion){if(vmRegion.startAddress===undefined)
-return;return vmRegion.startAddress>=4294967296;});var rootRow=createEmptyRow(CLASSIFICATION_RULES);this.vmRegions_.map(function(vmRegion){classifyVMRegion(rootRow,vmRegion,is64BitAddress);});tr.ui.analysis.aggregateTableRowCellsRecursively(rootRow,'cells');return[rootRow];},createColumns_:function(rows){var titleColumn={title:'Mapped file',value:function(row){return row.title;},width:'200px',cmp:function(rowA,rowB){return rowA.title.localeCompare(rowB.title);}};var attributeColumns=tr.u [...]
-return undefined;var selectedColumnIndex=this.$.table.selectedColumnIndex;if(selectedColumnIndex===undefined)
-return undefined;var selectedColumn=this.$.table.tableColumns[selectedColumnIndex];var selectedMemoryCell=selectedColumn.cell(selectedTableRow);return selectedMemoryCell;},updateContents_:function(){var processMemoryDumps=this.processMemoryDumps_||[];var rows=processMemoryDumps.map(function(processMemoryDump){function buildVMRegionsPane(){var pane=document.createElement('tr-ui-a-memory-dump-vm-regions-details-pane');pane.vmRegions=processMemoryDump.mostRecentVmRegions;return pane;}
-var usedMemorySizes={};var totalResident=processMemoryDump.totalResidentBytes;if(totalResident!==undefined){var cell=new tr.ui.analysis.MemoryCell(new tr.model.ScalarAttribute('bytes',totalResident));cell.buildDetailsPane=buildVMRegionsPane;usedMemorySizes['Total resident']=cell;}
-function addByteStatCell(byteStatName,columnTitle){var byteStat=processMemoryDump.getMostRecentTotalVmRegionStat(byteStatName);if(byteStat!==undefined){var attr=new tr.model.ScalarAttribute('bytes',byteStat);if(!processMemoryDump.hasOwnVmRegions){attr.infos.push(new tr.model.AttributeInfo(tr.model.AttributeInfoType.LINK,'Older value (process did not dump memory maps).'));attr.isOlderValue=true;}
-var cell=new tr.ui.analysis.MemoryCell(attr);cell.buildDetailsPane=buildVMRegionsPane;usedMemorySizes[columnTitle]=cell;}}
-addByteStatCell('proportionalResident','PSS');addByteStatCell('privateDirtyResident','Private dirty');addByteStatCell('swapped','Swapped');var allocatorSizes={};if(processMemoryDump.memoryAllocatorDumps!==undefined){processMemoryDump.memoryAllocatorDumps.forEach(function(dump){var attr=dump.attributes['size'];var cell=new tr.ui.analysis.MemoryCell(attr);cell.buildDetailsPane=function(){var pane=document.createElement('tr-ui-a-memory-dump-allocator-details-pane');pane.memoryAllocatorDump= [...]
-return{title:processMemoryDump.process.userFriendlyName,usedMemorySizes:usedMemorySizes,allocatorSizes:allocatorSizes};},this);this.$.table.tableRows=rows;if(rows.length>1){var totalRow={title:'Total',noLegend:true};tr.ui.analysis.aggregateTableRowCells(totalRow,rows,'usedMemorySizes');tr.ui.analysis.aggregateTableRowCells(totalRow,rows,'allocatorSizes');this.$.table.footerRows=[totalRow];}
-this.updateColumns_(rows);this.$.table.rebuild();this.restoreSelection_();},updateColumns_:function(rows){var titleColumn={title:'Process',value:function(row){if(row.noLegend)
-return row.title;var titleEl=document.createElement('tr-ui-b-color-legend');titleEl.label=row.title;return titleEl;},width:'200px',cmp:function(rowA,rowB){return rowA.title.localeCompare(rowB.title);},supportsCellSelection:false};var usedMemorySizeColumns=tr.ui.analysis.MemoryColumn.fromRows(rows,'usedMemorySizes');var allocatorSizeColumns=tr.ui.analysis.MemoryColumn.fromRows(rows,'allocatorSizes',function(allocatorName){var titleEl=document.createElement('tr-ui-b-color-legend');titleEl. [...]
-usedMemorySizeColumns.forEach(function(column){var olderUsedMemoryColumnColor=tr.ui.b.getColorPalette()[tr.ui.b.getColorIdForReservedName('older_used_memory_column')];var usedMemoryColumnColor=tr.ui.b.getColorPalette()[tr.ui.b.getColorIdForReservedName('used_memory_column')];column.title=tr.ui.b.createSpan({textContent:column.title,color:usedMemoryColumnColor});column.color=function(attr){return attr.isOlderValue?olderUsedMemoryColumnColor:usedMemoryColumnColor;}});var sizeColumns=usedMe [...]
-selectedRowTitle=selectedRow.title;var selectedColumnName;var selectedColumnIndex=this.$.table.selectedColumnIndex;if(selectedColumnIndex!==undefined){var selectedColumn=this.$.table.tableColumns[selectedColumnIndex];selectedColumnName=selectedColumn.name;}
-tr.b.SessionSettings.set(SETTINGS_KEY,{rowTitle:selectedRowTitle,columnName:selectedColumnName},SETTINGS_NAMESPACE);},restoreSelection_:function(){var settings=tr.b.SessionSettings.get(SETTINGS_KEY,{},SETTINGS_NAMESPACE);if(settings.rowTitle===undefined||settings.columnName===undefined)
-return;var selectedColumnName=settings.columnName;var selectedColumnIndex=tr.b.findFirstIndexInArray(this.$.table.tableColumns,function(column){return column.name===selectedColumnName;});if(selectedColumnIndex<0)
-return;var selectedRowTitle=settings.rowTitle;var selectedRow=tr.b.findFirstInArray(this.$.table.tableRows,function(row){return row.title===selectedRowTitle;});if(selectedRow===undefined)
-return;this.$.table.selectedTableRow=selectedRow;this.$.table.selectedColumnIndex=selectedColumnIndex;}});})();'use strict';Polymer('tr-ui-a-memory-dump-view',{created:function(){this.processMemoryDumps_=undefined;},ready:function(){this.$.overview_pane.addEventListener('selected-memory-cell-changed',this.updateDetailsPane_.bind(this));},set processMemoryDumps(processMemoryDumps){this.processMemoryDumps_=processMemoryDumps;this.$.overview_pane.processMemoryDumps=this.processMemoryDumps_; [...]
-return;this.$.details_pane_container.appendChild(selectedMemoryCell.buildDetailsPane());}});'use strict';Polymer('tr-ui-a-single-process-memory-dump-sub-view',{set selection(selection){if(selection.length!==1)
-throw new Error('Only supports a single process memory dump');if(!(selection[0]instanceof tr.model.ProcessMemoryDump))
-throw new Error('Only supports process memory dumps');this.currentSelection_=selection;this.$.memory_dump_view.processMemoryDumps=[selection[0]];},get selection(){return this.currentSelection_;},get requiresTallView(){return true;}});'use strict';Polymer('tr-ui-a-multi-process-memory-dump-sub-view',{created:function(){this.currentSelection_=undefined;},get selection(){return this.currentSelection_;},set selection(selection){this.currentSelection_=selection;selection=tr.b.asArray(selectio [...]
-throw new Error('Only supports a single global memory dump');if(!(selection[0]instanceof tr.model.GlobalMemoryDump))
-throw new Error('Only supports global memory dumps');this.currentSelection_=selection;this.$.memory_dump_view.processMemoryDumps=tr.b.dictionaryValues(selection[0].processMemoryDumps);},get selection(){return this.currentSelection_;},get requiresTallView(){return true;}});'use strict';Polymer('tr-ui-a-multi-global-memory-dump-sub-view',{created:function(){this.currentSelection_=undefined;},get selection(){return this.currentSelection_;},set selection(selection){this.currentSelection_=sel [...]
-function buildElementMapsIfNeeded(){if(elementsThatExtend!==undefined&&elementsByName!==undefined)
-return;elementsByName={};elementsThatExtend={};Polymer.elements.forEach(function(element){if(elementsByName[element.name])
-throw new Error('Something is strange: dupe polymer element names');elementsByName[element.name]=element;if(element.extends){if(elementsThatExtend[element.extends]===undefined)
-elementsThatExtend[element.extends]=[];elementsThatExtend[element.extends].push(element.name);}});}
-function getPolymerElementNamed(tagName){buildElementMapsIfNeeded();return elementsByName[tagName];}
-function getPolymerElementsThatSubclass(tagName){if(Polymer.waitingFor().length){throw new Error('There are unresolved polymer elements. '+'Wait until Polymer.whenReady');}
-buildElementMapsIfNeeded();var element=getPolymerElementNamed(tagName);if(!element)
-throw new Error(tagName+' is not a polymer element');if(elementSubclasses===undefined)
-elementSubclasses={};if(elementSubclasses[tagName]===undefined){var immediateSubElements=elementsThatExtend[element.name];var allSubElements=[];if(immediateSubElements!==undefined&&immediateSubElements.length){immediateSubElements.forEach(function(subElement){allSubElements.push(subElement);allSubElements.push.apply(allSubElements,getPolymerElementsThatSubclass(subElement));});}
-elementSubclasses[tagName]=allSubElements;}
-return elementSubclasses[tagName];}
-return{getPolymerElementNamed:getPolymerElementNamed,getPolymerElementsThatSubclass:getPolymerElementsThatSubclass};});'use strict';(function(){var EventRegistry=tr.model.EventRegistry;Polymer('tr-ui-a-analysis-view',{ready:function(){this.tabView_=document.createElement('tr-ui-a-tab-view');this.tabView_.style.flex='1 1 auto';this.appendChild(this.tabView_);this.selectionController_=undefined;this.onSelectedTabChange_=this.onSelectedTabChange_.bind(this);this.onSelectionChanged_=this.onS [...]
-this.classList.add('tall-mode');else
-this.classList.remove('tall-mode');},get tallMode(){return this.classList.contains('tall-mode');},get tabView(){return this.tabView_;},get selectionController(){return this.selectionController_;},set selectionController(selectionController){if(this.selectionController){this.selectionController_.removeEventListener('change',this.onSelectionChanged_);}
-this.selectionController_=selectionController;if(this.selectionController){this.selectionController_.addEventListener('change',this.onSelectionChanged_);}
-this.onSelectionChanged_();},get selection(){return this.selectionController_.selection;},onSelectionChanged_:function(e){var selection=this.selectionController_.selection;var selectionHasSameValue=this.lastSeenSelection_.equals(selection);this.lastSeenSelection_=selection;if(selectionHasSameValue)
-return;var lastSelectedTabTagName;var lastSelectedTabTypeName;if(this.tabView_.selectedTab){lastSelectedTabTagName=this.tabView_.selectedTab.tagName;lastSelectedTabTypeName=this.tabView_.selectedTab._eventTypeName;}
-this.tallMode=false;var previouslySelectedTab=this.tabView_.selectedTab;this.tabView_.removeEventListener('selected-tab-change',this.onSelectedTabChange_);this.tabView_.textContent='';if(selection.length==0){this.tabView_.tabStripHeadingText='Nothing selected. Tap stuff.';}else if(selection.length==1){this.tabView_.tabStripHeadingText='1 item selected: ';}else{this.tabView_.tabStripHeadingText=selection.length+' items selected: ';}
-var eventsByBaseTypeName=selection.getEventsOrganizedByBaseType(true);var numBaseTypesToAnalyze=tr.b.dictionaryLength(eventsByBaseTypeName);for(var eventTypeName in eventsByBaseTypeName){var subSelection=eventsByBaseTypeName[eventTypeName];var subView=this.createSubViewForSelection_(eventTypeName,subSelection);subView._eventTypeName=eventTypeName;this.tabView_.appendChild(subView);subView.selection=subSelection;}
-var tab;if(lastSelectedTabTagName)
-tab=this.tabView_.querySelector(lastSelectedTabTagName);if(!tab&&lastSelectedTabTypeName){var tab=tr.b.findFirstInArray(this.tabView_.children,function(tab){return tab._eventTypeName===lastSelectedTabTypeName;});}
-if(!tab)
-tab=this.tabView_.firstChild;this.tabView_.selectedTab=tab;if(this.tabView_.selectedTab!==previouslySelectedTab)
-this.onSelectedTabChange_();this.tabView_.addEventListener('selected-tab-change',this.onSelectedTabChange_);},createSubViewForSelection_:function(eventTypeName,subSelection){var eventTypeInfo=EventRegistry.getEventTypeInfoByTypeName(eventTypeName);var singleMode=subSelection.length==1;var tagName;if(subSelection.length===1)
-tagName=eventTypeInfo.metadata.singleViewElementName;else
-tagName=eventTypeInfo.metadata.multiViewElementName;if(!tr.ui.b.getPolymerElementNamed(tagName))
-throw new Error('Element not registered: '+tagName);var subView=document.createElement(tagName);var camelLabel;if(subSelection.length===1)
-camelLabel=EventRegistry.getUserFriendlySingularName(eventTypeName);else
-camelLabel=EventRegistry.getUserFriendlyPluralName(eventTypeName);subView.tabLabel=camelLabel+' ('+subSelection.length+')';return subView;},onSelectedTabChange_:function(){var selectionController=this.selectionController_;if(this.tabView_.selectedTab){var selectedTab=this.tabView_.selectedTab;this.tallMode=selectedTab.requiresTallView;if(selectionController){var rlth=selectedTab.relatedEventsToHighlight;selectionController.changeAnalysisViewRelatedEvents(rlth);}}else{this.tallMode=false; [...]
-selectionController.changeAnalysisViewRelatedEvents(undefined);}}});})();'use strict';tr.exportTo('tr.ui.b',function(){var FaviconsByHue={blue:'data:image/vndmicrosofticon;base64,AAABAAIAEBAAAAEAIABoBAAAJgAAACAgAAABACAAqBAAAI4EAAAoAAAAEAAAACAAAAABACAAAAAAAAAEAAASCwAAEgsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjj8xAGArIgqOPzE8nUY3dqJJOJeiSTiXnUY3do4/MTxhKyIKjkAxAAAAAAAAAAAAAAAAAAAAAABQJBwAAAAAAZJBMzSoSzqlsU8+6bRQP/21UT//tVE//7RQP/2wTz3ppko6pY9AMjQAAAABTyMbAAAAAAB7e3sAAP//AKFSRE+wTz3dtVE//7VRP/+1UT//t [...]
-task=operation;else
-task=new tr.b.Task(operation,this);if(this.activeTask_){this.activeTask_=this.activeTask_.enqueue(task);}else{this.activeTask_=task;this.activePromise_=Task.RunWhenIdle(this.activeTask_);this.activePromise_.then(function(){this.activePromise_=undefined;this.activeTask_=undefined;}.bind(this));}},startFiltering:function(filterText){var sc=this.selectionController_;if(!sc)
-return;this.enqueueOperation_(function(){this.filterHits_=new tr.c.Selection();this.currentHitIndex_=-1;}.bind(this));var stateFromString;try{stateFromString=sc.uiStateFromString(filterText);}catch(e){this.enqueueOperation_(function(){var overlay=new tr.ui.b.Overlay();overlay.textContent=e.message;overlay.title='UI State Navigation Error';overlay.visible=true;});return this.activePromise_;}
-if(stateFromString!==undefined){this.enqueueOperation_(sc.navToPosition.bind(this,stateFromString,true));}else{if(filterText.length===0){this.enqueueOperation_(sc.findTextCleared.bind(sc));}else{var filter=new tr.c.TitleOrCategoryFilter(filterText);var filterHits=new tr.c.Selection();this.enqueueOperation_(sc.addAllEventsMatchingFilterToSelectionAsTask(filter,filterHits));this.enqueueOperation_(function(){this.filterHits_=filterHits;sc.findTextChangedTo(filterHits);}.bind(this));}}
-return this.activePromise_;},get filterHits(){return this.filterHits_;},get currentHitIndex(){return this.currentHitIndex_;},find_:function(dir){var firstHit=this.currentHitIndex_===-1;if(firstHit&&dir<0)
-this.currentHitIndex_=0;var N=this.filterHits.length;this.currentHitIndex_=(this.currentHitIndex_+dir+N)%N;if(!this.selectionController_)
-return;this.selectionController_.findFocusChangedTo(this.filterHits.subSelection(this.currentHitIndex_,1));},findNext:function(){this.find_(1);},findPrevious:function(){this.find_(-1);}};return{FindController:FindController};});'use strict';tr.exportTo('tr.ui.b',function(){var paletteRaw=tr.ui.b.getRawColorPalette();var palette=tr.ui.b.getColorPalette();var SelectionState=tr.model.SelectionState;var EventPresenter={getSelectableItemColor:function(item){var colorId=item.colorId+this.getCo [...]
-return tr.ui.b.paletteProperties.highlightIdBoost;else if(event.selectionState===SelectionState.DIMMED)
-return tr.ui.b.paletteProperties.desaturateIdBoost;return 0;},getTextColor:function(event){if(event.selectionState===SelectionState.DIMMED)
-return'rgb(60,60,60)';return'rgb(0,0,0)';},getSliceColorId:function(slice){return slice.colorId+this.getColorIdOffset_(slice);},getSliceAlpha:function(slice,async){var alpha=1;if(async)
-alpha*=0.3;return alpha;},getInstantSliceColor:function(instant){var colorId=instant.colorId+this.getColorIdOffset_(instant);return tr.ui.b.colorToRGBAString(paletteRaw[colorId],1.0);},getObjectInstanceColor:function(instance){var colorId=instance.colorId+this.getColorIdOffset_(instance);return tr.ui.b.colorToRGBAString(paletteRaw[colorId],0.25);},getObjectSnapshotColor:function(snapshot){var colorId=snapshot.objectInstance.colorId+this.getColorIdOffset_(snapshot);return palette[colorId] [...]
-ElidedTitleCache.prototype={get:function(ctx,pixWidth,title,width,sliceDuration){var elidedDict=elidedTitleCacheDict[title];if(!elidedDict){elidedDict={};elidedTitleCacheDict[title]=elidedDict;}
-var elidedDictForPixWidth=elidedDict[pixWidth];if(!elidedDictForPixWidth){elidedDict[pixWidth]={};elidedDictForPixWidth=elidedDict[pixWidth];}
-var stringWidthPair=elidedDictForPixWidth[sliceDuration];if(stringWidthPair===undefined){var newtitle=title;var elided=false;while(this.labelWidthWorld(ctx,newtitle,pixWidth)>sliceDuration){if(newtitle.length*0.75<1)
-break;newtitle=newtitle.substring(0,newtitle.length*0.75);elided=true;}
-if(elided&&newtitle.length>3)
-newtitle=newtitle.substring(0,newtitle.length-3)+'...';stringWidthPair=new ElidedStringWidthPair(newtitle,this.labelWidth(ctx,newtitle));elidedDictForPixWidth[sliceDuration]=stringWidthPair;}
-return stringWidthPair;},quickMeasureText_:function(ctx,text){var w=this.textWidthMap[text];if(!w){w=ctx.measureText(text).width;this.textWidthMap[text]=w;}
-return w;},labelWidth:function(ctx,title){return this.quickMeasureText_(ctx,title)+2;},labelWidthWorld:function(ctx,title,pixWidth){return this.labelWidth(ctx,title)*pixWidth;}};function ElidedStringWidthPair(string,width){this.string=string;this.width=width;}
-return{ElidedTitleCache:ElidedTitleCache};});'use strict';tr.exportTo('tr.ui.b',function(){var elidedTitleCache=new tr.ui.b.ElidedTitleCache();var palette=tr.ui.b.getColorPalette();var EventPresenter=tr.ui.b.EventPresenter;var blackColorId=tr.ui.b.getColorIdForReservedName('black');var THIN_SLICE_HEIGHT=4;var SLICE_WAITING_WIDTH_DRAW_THRESHOLD=3;var SLICE_ACTIVE_WIDTH_DRAW_THRESHOLD=1;var SHOULD_ELIDE_TEXT=true;function drawLine(ctx,x1,y1,x2,y2){ctx.moveTo(x1,y1);ctx.lineTo(x2,y2);}
-function drawTriangle(ctx,x1,y1,x2,y2,x3,y3){ctx.beginPath();ctx.moveTo(x1,y1);ctx.lineTo(x2,y2);ctx.lineTo(x3,y3);ctx.closePath();}
-function drawArrow(ctx,x1,y1,x2,y2,arrowLength,arrowWidth){var dx=x2-x1;var dy=y2-y1;var len=Math.sqrt(dx*dx+dy*dy);var perc=(len-arrowLength)/len;var bx=x1+perc*dx;var by=y1+perc*dy;var ux=dx/len;var uy=dy/len;var ax=uy*arrowWidth;var ay=-ux*arrowWidth;ctx.beginPath();drawLine(ctx,x1,y1,x2,y2);ctx.stroke();drawTriangle(ctx,bx+ax,by+ay,x2,y2,bx-ax,by-ay);ctx.fill();}
-function drawSlices(ctx,dt,viewLWorld,viewRWorld,viewHeight,slices,async){var pixelRatio=window.devicePixelRatio||1;var pixWidth=dt.xViewVectorToWorld(1);var height=viewHeight*pixelRatio;var darkRectHeight=THIN_SLICE_HEIGHT*pixelRatio;if(height<darkRectHeight)
-darkRectHeight=0;var lightRectHeight=height-darkRectHeight;ctx.save();dt.applyTransformToCanvas(ctx);var rect=new tr.ui.b.FastRectRenderer(ctx,2*pixWidth,2*pixWidth,palette);rect.setYandH(0,height);var lowSlice=tr.b.findLowIndexInSortedArray(slices,function(slice){return slice.start+slice.duration;},viewLWorld);var hadTopLevel=false;for(var i=lowSlice;i<slices.length;++i){var slice=slices[i];var x=slice.start;if(x>viewRWorld)
-break;var w=pixWidth;if(slice.duration>0){w=Math.max(slice.duration,0.000001);if(w<pixWidth)
-w=pixWidth;}
-var colorId=EventPresenter.getSliceColorId(slice);var alpha=EventPresenter.getSliceAlpha(slice,async);var lightAlpha=alpha*0.70;if(slice.isTopLevel){rect.setYandH(3,height-3);hadTopLevel=true;}else{rect.setYandH(0,height);}
-if(!slice.cpuDuration){rect.fillRect(x,w,colorId,alpha);continue;}
-var activeWidth=w*(slice.cpuDuration/slice.duration);var waitingWidth=w-activeWidth;if(activeWidth<SLICE_ACTIVE_WIDTH_DRAW_THRESHOLD*pixWidth){activeWidth=0;waitingWidth=w;}
-if(waitingWidth<SLICE_WAITING_WIDTH_DRAW_THRESHOLD*pixWidth){activeWidth=w;waitingWidth=0;}
-if(activeWidth>0){rect.fillRect(x,activeWidth,colorId,alpha);}
-if(waitingWidth>0){rect.setYandH(0,lightRectHeight);rect.fillRect(x+activeWidth-pixWidth,waitingWidth+pixWidth,colorId,lightAlpha);rect.setYandH(lightRectHeight,darkRectHeight);rect.fillRect(x+activeWidth-pixWidth,waitingWidth+pixWidth,colorId,alpha);rect.setYandH(0,height);}}
-rect.flush();if(async&&hadTopLevel){rect.setYandH(2,1);for(var i=lowSlice;i<slices.length;++i){var slice=slices[i];var x=slice.start;if(x>viewRWorld)
-break;if(!slice.isTopLevel)
-continue;var w=pixWidth;if(slice.duration>0){w=Math.max(slice.duration,0.000001);if(w<pixWidth)
-w=pixWidth;}
-rect.fillRect(x,w,blackColorId,0.7);}
-rect.flush();}
-ctx.restore();}
-function drawInstantSlicesAsLines(ctx,dt,viewLWorld,viewRWorld,viewHeight,slices,lineWidthInPixels){var pixelRatio=window.devicePixelRatio||1;var height=viewHeight*pixelRatio;var pixWidth=dt.xViewVectorToWorld(1);ctx.save();ctx.lineWidth=pixWidth*lineWidthInPixels*pixelRatio;dt.applyTransformToCanvas(ctx);ctx.beginPath();var lowSlice=tr.b.findLowIndexInSortedArray(slices,function(slice){return slice.start;},viewLWorld);for(var i=lowSlice;i<slices.length;++i){var slice=slices[i];var x=sli [...]
-break;ctx.strokeStyle=EventPresenter.getInstantSliceColor(slice);ctx.beginPath();ctx.moveTo(x,0);ctx.lineTo(x,height);ctx.stroke();}
-ctx.restore();}
-function drawLabels(ctx,dt,viewLWorld,viewRWorld,slices,async,fontSize,yOffset){var pixelRatio=window.devicePixelRatio||1;var pixWidth=dt.xViewVectorToWorld(1);ctx.save();ctx.textAlign='center';ctx.textBaseline='top';ctx.font=(fontSize*pixelRatio)+'px sans-serif';if(async)
-ctx.font='italic '+ctx.font;var cY=yOffset*pixelRatio;var lowSlice=tr.b.findLowIndexInSortedArray(slices,function(slice){return slice.start+slice.duration;},viewLWorld);var quickDiscardThresshold=pixWidth*20;for(var i=lowSlice;i<slices.length;++i){var slice=slices[i];if(slice.start>viewRWorld)
-break;if(slice.duration<=quickDiscardThresshold)
-continue;var title=slice.title+
-(slice.didNotFinish?' (Did Not Finish)':'');var drawnTitle=title;var drawnWidth=elidedTitleCache.labelWidth(ctx,drawnTitle);var fullLabelWidth=elidedTitleCache.labelWidthWorld(ctx,drawnTitle,pixWidth);if(SHOULD_ELIDE_TEXT&&fullLabelWidth>slice.duration){var elidedValues=elidedTitleCache.get(ctx,pixWidth,drawnTitle,drawnWidth,slice.duration);drawnTitle=elidedValues.string;drawnWidth=elidedValues.width;}
-if(drawnWidth*pixWidth<slice.duration){ctx.fillStyle=EventPresenter.getTextColor(slice);var cX=dt.xWorldToView(slice.start+0.5*slice.duration);ctx.fillText(drawnTitle,cX,cY,drawnWidth);}}
-ctx.restore();}
-return{drawSlices:drawSlices,drawInstantSlicesAsLines:drawInstantSlicesAsLines,drawLabels:drawLabels,drawLine:drawLine,drawTriangle:drawTriangle,drawArrow:drawArrow,elidedTitleCache_:elidedTitleCache,THIN_SLICE_HEIGHT:THIN_SLICE_HEIGHT};});'use strict';tr.exportTo('tr.ui',function(){function SnapIndicator(y,height){this.y=y;this.height=height;}
-function TimelineInterestRange(vp){this.viewport_=vp;this.range_=new tr.b.Range();this.leftSelected_=false;this.rightSelected_=false;this.leftSnapIndicator_=undefined;this.rightSnapIndicator_=undefined;}
-TimelineInterestRange.prototype={get isEmpty(){return this.range_.isEmpty;},reset:function(){this.range_.reset();this.leftSelected_=false;this.rightSelected_=false;this.leftSnapIndicator_=undefined;this.rightSnapIndicator_=undefined;this.viewport_.dispatchChangeEvent();},get min(){return this.range_.min;},set min(min){this.range_.min=min;this.viewport_.dispatchChangeEvent();},get max(){return this.range_.max;},set max(max){this.range_.max=max;this.viewport_.dispatchChangeEvent();},set:fu [...]
-return;this.leftSelected_=leftSelected;this.viewport_.dispatchChangeEvent();},get rightSelected(){return this.rightSelected_;},set rightSelected(rightSelected){if(this.rightSelected_==rightSelected)
-return;this.rightSelected_=rightSelected;this.viewport_.dispatchChangeEvent();},get leftSnapIndicator(){return this.leftSnapIndicator_;},set leftSnapIndicator(leftSnapIndicator){this.leftSnapIndicator_=leftSnapIndicator;this.viewport_.dispatchChangeEvent();},get rightSnapIndicator(){return this.rightSnapIndicator_;},set rightSnapIndicator(rightSnapIndicator){this.rightSnapIndicator_=rightSnapIndicator;this.viewport_.dispatchChangeEvent();},draw:function(ctx,viewLWorld,viewRWorld){if(this [...]
-return;var dt=this.viewport_.currentDisplayTransform;var markerLWorld=this.min;var markerRWorld=this.max;var markerLView=Math.round(dt.xWorldToView(markerLWorld));var markerRView=Math.round(dt.xWorldToView(markerRWorld));ctx.fillStyle='rgba(0, 0, 0, 0.2)';if(markerLWorld>viewLWorld){ctx.fillRect(dt.xWorldToView(viewLWorld),0,markerLView,ctx.canvas.height);}
-if(markerRWorld<viewRWorld){ctx.fillRect(markerRView,0,dt.xWorldToView(viewRWorld),ctx.canvas.height);}
-var pixelRatio=window.devicePixelRatio||1;ctx.lineWidth=Math.round(pixelRatio);if(this.range_.range>0){this.drawLine_(ctx,viewLWorld,viewRWorld,ctx.canvas.height,this.min,this.leftSelected_);this.drawLine_(ctx,viewLWorld,viewRWorld,ctx.canvas.height,this.max,this.rightSelected_);}else{this.drawLine_(ctx,viewLWorld,viewRWorld,ctx.canvas.height,this.min,this.leftSelected_||this.rightSelected_);}
-ctx.lineWidth=1;},drawLine_:function(ctx,viewLWorld,viewRWorld,height,ts,selected){if(ts<viewLWorld||ts>=viewRWorld)
-return;var dt=this.viewport_.currentDisplayTransform;var viewX=Math.round(dt.xWorldToView(ts));ctx.save();ctx.translate((Math.round(ctx.lineWidth)%2)/2,0);ctx.beginPath();tr.ui.b.drawLine(ctx,viewX,0,viewX,height);if(selected)
-ctx.strokeStyle='rgb(255, 0, 0)';else
-ctx.strokeStyle='rgb(0, 0, 0)';ctx.stroke();ctx.restore();},drawIndicators:function(ctx,viewLWorld,viewRWorld){if(this.leftSnapIndicator_){this.drawIndicator_(ctx,viewLWorld,viewRWorld,this.range_.min,this.leftSnapIndicator_,this.leftSelected_);}
-if(this.rightSnapIndicator_){this.drawIndicator_(ctx,viewLWorld,viewRWorld,this.range_.max,this.rightSnapIndicator_,this.rightSelected_);}},drawIndicator_:function(ctx,viewLWorld,viewRWorld,xWorld,si,selected){var dt=this.viewport_.currentDisplayTransform;var viewX=Math.round(dt.xWorldToView(xWorld));ctx.save();ctx.translate((Math.round(ctx.lineWidth)%2)/2,0);var pixelRatio=window.devicePixelRatio||1;var viewY=si.y*devicePixelRatio;var viewHeight=si.height*devicePixelRatio;var arrowSize= [...]
-ctx.fillStyle='rgb(255, 0, 0)';else
-ctx.fillStyle='rgb(0, 0, 0)';tr.ui.b.drawTriangle(ctx,viewX-arrowSize*0.75,viewY,viewX+arrowSize*0.75,viewY,viewX,viewY+arrowSize);ctx.fill();tr.ui.b.drawTriangle(ctx,viewX-arrowSize*0.75,viewY+viewHeight,viewX+arrowSize*0.75,viewY+viewHeight,viewX,viewY+viewHeight-arrowSize);ctx.fill();ctx.restore();}};return{SnapIndicator:SnapIndicator,TimelineInterestRange:TimelineInterestRange};});'use strict';tr.exportTo('tr.ui',function(){function TimelineDisplayTransform(opt_that){if(opt_that){thi [...]
-this.scaleX=1;this.panX=0;this.panY=0;}
-TimelineDisplayTransform.prototype={set:function(that){this.scaleX=that.scaleX;this.panX=that.panX;this.panY=that.panY;},clone:function(){return new TimelineDisplayTransform(this);},equals:function(that){var eq=true;if(that===undefined||that===null)
-return false;eq&=this.panX===that.panX;eq&=this.panY===that.panY;eq&=this.scaleX===that.scaleX;return!!eq;},almostEquals:function(that){var eq=true;if(that===undefined||that===null)
-return false;eq&=Math.abs(this.panX-that.panX)<0.001;eq&=Math.abs(this.panY-that.panY)<0.001;eq&=Math.abs(this.scaleX-that.scaleX)<0.001;return!!eq;},incrementPanXInViewUnits:function(xDeltaView){this.panX+=this.xViewVectorToWorld(xDeltaView);},xPanWorldPosToViewPos:function(worldX,viewX,viewWidth){if(typeof viewX=='string'){if(viewX==='left'){viewX=0;}else if(viewX==='center'){viewX=viewWidth/2;}else if(viewX==='right'){viewX=viewWidth-1;}else{throw new Error('viewX must be left|center| [...]
-this.panX=(viewX/this.scaleX)-worldX;},xPanWorldBoundsIntoView:function(worldMin,worldMax,viewWidth){if(this.xWorldToView(worldMin)<0)
-this.xPanWorldPosToViewPos(worldMin,'left',viewWidth);else if(this.xWorldToView(worldMax)>viewWidth)
-this.xPanWorldPosToViewPos(worldMax,'right',viewWidth);},xSetWorldBounds:function(worldMin,worldMax,viewWidth){var worldWidth=worldMax-worldMin;var scaleX=viewWidth/worldWidth;var panX=-worldMin;this.setPanAndScale(panX,scaleX);},setPanAndScale:function(p,s){this.scaleX=s;this.panX=p;},xWorldToView:function(x){return(x+this.panX)*this.scaleX;},xWorldVectorToView:function(x){return x*this.scaleX;},xViewToWorld:function(x){return(x/this.scaleX)-this.panX;},xViewVectorToWorld:function(x){re [...]
-ContainerToTrackMap.prototype={addContainer:function(container,track){if(!track)
-throw new Error('Must provide a track.');this.stableIdToTrackMap_[container.stableId]=track;},clear:function(){this.stableIdToTrackMap_={};},getTrackByStableId:function(stableId){return this.stableIdToTrackMap_[stableId];}};return{ContainerToTrackMap:ContainerToTrackMap};});'use strict';tr.exportTo('tr.ui.tracks',function(){function EventToTrackMap(){}
-EventToTrackMap.prototype={addEvent:function(event,track){if(!track)
-throw new Error('Must provide a track.');this[event.guid]=track;}};return{EventToTrackMap:EventToTrackMap};});'use strict';tr.exportTo('tr.ui.b',function(){function Animation(){}
-Animation.prototype={canTakeOverFor:function(existingAnimation){throw new Error('Not implemented');},takeOverFor:function(existingAnimation,newStartTimestamp,target){throw new Error('Not implemented');},start:function(timestamp,target){throw new Error('Not implemented');},didStopEarly:function(timestamp,target,willBeTakenOverByAnotherAnimation){},tick:function(timestamp,target){throw new Error('Not implemented');}};return{Animation:Animation};});'use strict';tr.exportTo('tr.ui.b',functio [...]
-AnimationController.prototype={__proto__:tr.b.EventTarget.prototype,get target(){return this.target_;},set target(target){if(this.activeAnimation_)
-throw new Error('Cannot change target while animation is running.');if(target.cloneAnimationState===undefined||typeof target.cloneAnimationState!=='function')
-throw new Error('target must have a cloneAnimationState function');this.target_=target;},get activeAnimation(){return this.activeAnimation_;},get hasActiveAnimation(){return!!this.activeAnimation_;},queueAnimation:function(animation,opt_now){if(this.target_===undefined)
-throw new Error('Cannot queue animations without a target');var now;if(opt_now!==undefined)
-now=opt_now;else
-now=window.performance.now();if(this.activeAnimation_){var done=this.activeAnimation_.tick(now,this.target_);if(done)
-this.activeAnimation_=undefined;}
-if(this.activeAnimation_){if(animation.canTakeOverFor(this.activeAnimation_)){this.activeAnimation_.didStopEarly(now,this.target_,true);animation.takeOverFor(this.activeAnimation_,now,this.target_);}else{this.activeAnimation_.didStopEarly(now,this.target_,false);}}
-this.activeAnimation_=animation;this.activeAnimation_.start(now,this.target_);if(this.tickScheduled_)
-return;this.tickScheduled_=true;tr.b.requestAnimationFrame(this.tickActiveAnimation_,this);},cancelActiveAnimation:function(opt_now){if(!this.activeAnimation_)
-return;var now;if(opt_now!==undefined)
-now=opt_now;else
-now=window.performance.now();this.activeAnimation_.didStopEarly(now,this.target_,false);this.activeAnimation_=undefined;},tickActiveAnimation_:function(frameBeginTime){this.tickScheduled_=false;if(!this.activeAnimation_)
-return;if(this.target_===undefined){this.activeAnimation_.didStopEarly(frameBeginTime,this.target_,false);return;}
-var oldTargetState=this.target_.cloneAnimationState();var done=this.activeAnimation_.tick(frameBeginTime,this.target_);if(done)
-this.activeAnimation_=undefined;if(this.activeAnimation_){this.tickScheduled_=true;tr.b.requestAnimationFrame(this.tickActiveAnimation_,this);}
-if(oldTargetState){var e=new Event('didtick');e.oldTargetState=oldTargetState;this.dispatchEvent(e,false,false);}}};return{AnimationController:AnimationController};});'use strict';tr.exportTo('tr.ui',function(){var TimelineDisplayTransform=tr.ui.TimelineDisplayTransform;var TimelineInterestRange=tr.ui.TimelineInterestRange;function TimelineViewport(parentEl){this.parentEl_=parentEl;this.modelTrackContainer_=undefined;this.currentDisplayTransform_=new TimelineDisplayTransform();this.initA [...]
-TimelineViewport.prototype={__proto__:tr.b.EventTarget.prototype,setWhenPossible:function(fn){this.pendingSetFunction_=fn;},get isAttachedToDocumentOrInTestMode(){if(this.parentEl_===undefined)
-return;return tr.ui.b.isElementAttachedToDocument(this.parentEl_);},onResize_:function(){this.dispatchChangeEvent();},checkForAttach_:function(){if(!this.isAttachedToDocumentOrInTestMode||this.clientWidth==0)
-return;if(!this.iframe_){this.iframe_=document.createElement('iframe');this.iframe_.style.cssText='position:absolute;width:100%;height:0;border:0;visibility:hidden;';this.parentEl_.appendChild(this.iframe_);this.iframe_.contentWindow.addEventListener('resize',this.onResize_);}
-var curSize=this.parentEl_.clientWidth+'x'+
-this.parentEl_.clientHeight;if(this.pendingSetFunction_){this.lastSize_=curSize;try{this.pendingSetFunction_();}catch(ex){console.log('While running setWhenPossible:',ex.message?ex.message+'\n'+ex.stack:ex.stack);}
-this.pendingSetFunction_=undefined;}
-window.clearInterval(this.checkForAttachInterval_);this.checkForAttachInterval_=undefined;},dispatchChangeEvent:function(){tr.b.dispatchSimpleEvent(this,'change');},detach:function(){if(this.checkForAttachInterval_){window.clearInterval(this.checkForAttachInterval_);this.checkForAttachInterval_=undefined;}
-if(this.iframe_){this.iframe_.removeEventListener('resize',this.onResize_);this.parentEl_.removeChild(this.iframe_);}},initAnimationController_:function(){this.dtAnimationController_=new tr.ui.b.AnimationController();this.dtAnimationController_.addEventListener('didtick',function(e){this.onCurentDisplayTransformChange_(e.oldTargetState);}.bind(this));var that=this;this.dtAnimationController_.target={get panX(){return that.currentDisplayTransform_.panX;},set panX(panX){that.currentDisplay [...]
-throw new Error('animation must be instanceof tr.ui.b.Animation');this.dtAnimationController_.queueAnimation(animation);},onCurentDisplayTransformChange_:function(oldDisplayTransform){if(this.modelTrackContainer_){this.currentDisplayTransform.panY=tr.b.clamp(this.currentDisplayTransform.panY,0,this.modelTrackContainer_.scrollHeight-
-this.modelTrackContainer_.clientHeight);}
-var changed=!this.currentDisplayTransform.equals(oldDisplayTransform);var yChanged=this.currentDisplayTransform.panY!==oldDisplayTransform.panY;if(yChanged)
-this.modelTrackContainer_.scrollTop=this.currentDisplayTransform.panY;if(changed)
-this.dispatchChangeEvent();},onModelTrackControllerScroll_:function(e){if(this.dtAnimationController_.activeAnimation&&this.dtAnimationController_.activeAnimation.affectsPanY)
-this.dtAnimationController_.cancelActiveAnimation();var panY=this.modelTrackContainer_.scrollTop;this.currentDisplayTransform_.panY=panY;},get modelTrackContainer(){return this.modelTrackContainer_;},set modelTrackContainer(m){if(this.modelTrackContainer_)
-this.modelTrackContainer_.removeEventListener('scroll',this.onModelTrackControllerScroll_);this.modelTrackContainer_=m;this.modelTrackContainer_.addEventListener('scroll',this.onModelTrackControllerScroll_);},get showFlowEvents(){return this.showFlowEvents_;},set showFlowEvents(showFlowEvents){this.showFlowEvents_=showFlowEvents;this.dispatchChangeEvent();},get highlightVSync(){return this.highlightVSync_;},set highlightVSync(highlightVSync){this.highlightVSync_=highlightVSync;this.dispa [...]
-return;this.gridEnabled_=enabled&&true;this.dispatchChangeEvent();},get gridTimebase(){return this.gridTimebase_;},set gridTimebase(timebase){if(this.gridTimebase_==timebase)
-return;this.gridTimebase_=timebase;this.dispatchChangeEvent();},get gridStep(){return this.gridStep_;},get interestRange(){return this.interestRange_;},drawMajorMarkLines:function(ctx){ctx.save();ctx.translate((Math.round(ctx.lineWidth)%2)/2,0);ctx.beginPath();for(var idx in this.majorMarkPositions){var x=Math.floor(this.majorMarkPositions[idx]);tr.ui.b.drawLine(ctx,x,0,x,ctx.canvas.height);}
-ctx.strokeStyle='#ddd';ctx.stroke();ctx.restore();},drawGridLines:function(ctx,viewLWorld,viewRWorld){if(!this.gridEnabled)
-return;var dt=this.currentDisplayTransform;var x=this.gridTimebase;ctx.save();ctx.translate((Math.round(ctx.lineWidth)%2)/2,0);ctx.beginPath();while(x<viewRWorld){if(x>=viewLWorld){var vx=Math.floor(dt.xWorldToView(x));tr.ui.b.drawLine(ctx,vx,0,vx,ctx.canvas.height);}
-x+=this.gridStep;}
-ctx.strokeStyle='rgba(255, 0, 0, 0.25)';ctx.stroke();ctx.restore();},rebuildEventToTrackMap:function(){this.eventToTrackMap_=new tr.ui.tracks.EventToTrackMap();this.modelTrackContainer_.addEventsToTrackMap(this.eventToTrackMap_);},rebuildContainerToTrackMap:function(){this.containerToTrackMap.clear();this.modelTrackContainer_.addContainersToTrackMap(this.containerToTrackMap);},trackForEvent:function(event){return this.eventToTrackMap_[event.guid];}};return{TimelineViewport:TimelineViewpo [...]
-this.durationMs=kDefaultPanAnimatoinDurationMs;else
-this.durationMs=opt_durationMs;this.startPanX=undefined;this.startPanY=undefined;this.startTimeMs=undefined;}
-TimelineDisplayTransformPanAnimation.prototype={__proto__:tr.ui.b.Animation.prototype,get affectsPanY(){return this.deltaY!==0;},canTakeOverFor:function(existingAnimation){return existingAnimation instanceof TimelineDisplayTransformPanAnimation;},takeOverFor:function(existing,timestamp,target){var remainingDeltaXOnExisting=existing.goalPanX-target.panX;var remainingDeltaYOnExisting=existing.goalPanY-target.panY;var remainingTimeOnExisting=timestamp-(existing.startTimeMs+existing.duration [...]
-target.panY=tr.b.lerp(percentDone,this.startPanY,this.goalPanY);return timestamp>=this.startTimeMs+this.durationMs;},get goalPanX(){return this.startPanX+this.deltaX;},get goalPanY(){return this.startPanY+this.deltaY;}};function TimelineDisplayTransformZoomToAnimation(goalFocalPointXWorld,goalFocalPointXView,goalFocalPointY,zoomInRatioX,opt_durationMs){this.goalFocalPointXWorld=goalFocalPointXWorld;this.goalFocalPointXView=goalFocalPointXView;this.goalFocalPointY=goalFocalPointY;this.zoo [...]
-this.durationMs=kDefaultPanAnimatoinDurationMs;else
-this.durationMs=opt_durationMs;this.startTimeMs=undefined;this.startScaleX=undefined;this.goalScaleX=undefined;this.startPanY=undefined;}
-TimelineDisplayTransformZoomToAnimation.prototype={__proto__:tr.ui.b.Animation.prototype,get affectsPanY(){return this.startPanY!=this.goalFocalPointY;},canTakeOverFor:function(existingAnimation){return false;},takeOverFor:function(existingAnimation,timestamp,target){this.goalScaleX=target.scaleX*this.zoomInRatioX;},start:function(timestamp,target){this.startTimeMs=timestamp;this.startScaleX=target.scaleX;this.goalScaleX=this.zoomInRatioX*target.scaleX;this.startPanY=target.panY;},tick:f [...]
-target.xPanWorldPosToViewPos(this.goalFocalPointXWorld,this.goalFocalPointXView);return timestamp>=this.startTimeMs+this.durationMs;}};return{TimelineDisplayTransformPanAnimation:TimelineDisplayTransformPanAnimation,TimelineDisplayTransformZoomToAnimation:TimelineDisplayTransformZoomToAnimation};});'use strict';tr.exportTo('tr.c',function(){var constants={HEADING_WIDTH:250};return{constants:constants};});'use strict';tr.exportTo('tr.ui.b',function(){var constants=tr.c.constants;function  [...]
-return;var pt=this.getSnappedToEventPosition_(e);this.mouseDownAt_(pt.x,pt.y);this.updateSnapIndicators_(pt);},updateSnapIndicators_:function(pt){if(!pt.snapped)
-return;var ir=this.viewport_.interestRange;if(ir.min===pt.x)
-ir.leftSnapIndicator=new tr.ui.SnapIndicator(pt.y,pt.height);if(ir.max===pt.x)
-ir.rightSnapIndicator=new tr.ui.SnapIndicator(pt.y,pt.height);},onUpdateTiming:function(e){var pt=this.getSnappedToEventPosition_(e);this.mouseMoveAt_(pt.x,pt.y,true);this.updateSnapIndicators_(pt);},onEndTiming:function(e){this.mouseUp_();},onExitTiming:function(e){this.targetElement_.removeEventListener('mousemove',this.onMouseMove_);this.targetElement_.removeEventListener('dblclick',this.onDblClick_);},onMouseMove_:function(e){if(e.button)
-return;var worldX=this.getWorldXFromEvent_(e);this.mouseMoveAt_(worldX,e.clientY,false);},onDblClick_:function(e){console.error('not implemented');},isTouchPointInsideTrackBounds_:function(clientX,clientY){if(!this.viewport_||!this.viewport_.modelTrackContainer||!this.viewport_.modelTrackContainer.canvas)
-return false;var canvas=this.viewport_.modelTrackContainer.canvas;var canvasRect=canvas.getBoundingClientRect();if(clientX>=canvasRect.left&&clientX<=canvasRect.right&&clientY>=canvasRect.top&&clientY<=canvasRect.bottom)
-return true;return false;},mouseDownAt_:function(worldX,y){var ir=this.viewport_.interestRange;var dt=this.viewport_.currentDisplayTransform;var pixelRatio=window.devicePixelRatio||1;var nearnessThresholdWorld=dt.xViewVectorToWorld(6*pixelRatio);if(ir.isEmpty){ir.setMinAndMax(worldX,worldX);ir.rightSelected=true;this.isMovingLeftEdge_=false;return;}
-if(Math.abs(worldX-ir.min)<nearnessThresholdWorld){ir.leftSelected=true;ir.min=worldX;this.isMovingLeftEdge_=true;return;}
-if(Math.abs(worldX-ir.max)<nearnessThresholdWorld){ir.rightSelected=true;ir.max=worldX;this.isMovingLeftEdge_=false;return;}
-ir.setMinAndMax(worldX,worldX);ir.rightSelected=true;this.isMovingLeftEdge_=false;},mouseMoveAt_:function(worldX,y,mouseDown){var ir=this.viewport_.interestRange;if(mouseDown){this.updateMovingEdge_(worldX);return;}
-var ir=this.viewport_.interestRange;var dt=this.viewport_.currentDisplayTransform;var pixelRatio=window.devicePixelRatio||1;var nearnessThresholdWorld=dt.xViewVectorToWorld(6*pixelRatio);if(Math.abs(worldX-ir.min)<nearnessThresholdWorld){ir.leftSelected=true;ir.rightSelected=false;return;}
-if(Math.abs(worldX-ir.max)<nearnessThresholdWorld){ir.leftSelected=false;ir.rightSelected=true;return;}
-ir.leftSelected=false;ir.rightSelected=false;return;},updateMovingEdge_:function(newWorldX){var ir=this.viewport_.interestRange;var a=ir.min;var b=ir.max;if(this.isMovingLeftEdge_)
-a=newWorldX;else
-b=newWorldX;if(a<=b)
-ir.setMinAndMax(a,b);else
-ir.setMinAndMax(b,a);if(ir.min==newWorldX){this.isMovingLeftEdge_=true;ir.leftSelected=true;ir.rightSelected=false;}else{this.isMovingLeftEdge_=false;ir.leftSelected=false;ir.rightSelected=true;}},mouseUp_:function(){var dt=this.viewport_.currentDisplayTransform;var ir=this.viewport_.interestRange;ir.leftSelected=false;ir.rightSelected=false;var pixelRatio=window.devicePixelRatio||1;var minWidthValue=dt.xViewVectorToWorld(2*pixelRatio);if(ir.range<minWidthValue)
-ir.reset();},getWorldXFromEvent_:function(e){var pixelRatio=window.devicePixelRatio||1;var canvas=this.viewport_.modelTrackContainer.canvas;var worldOffset=canvas.getBoundingClientRect().left;var viewX=(e.clientX-worldOffset)*pixelRatio;return this.viewport_.currentDisplayTransform.xViewToWorld(viewX);},getSnappedToEventPosition_:function(e){var pixelRatio=window.devicePixelRatio||1;var EVENT_SNAP_RANGE=16*pixelRatio;var modelTrackContainer=this.viewport_.modelTrackContainer;var modelTra [...]
-var minDistX=worldMaxDist;var minDistY=Infinity;var pixWidth=dt.xViewVectorToWorld(1);var result={x:worldX,y:mouseY-modelTrackContainerRect.top,height:0,snapped:false};var eventBounds=new tr.b.Range();for(var i=0;i<selection.length;i++){var event=selection[i];var track=viewport.trackForEvent(event);var trackRect=track.getBoundingClientRect();eventBounds.reset();event.addBoundsToRange(eventBounds);var eventX;if(Math.abs(eventBounds.min-worldX)<Math.abs(eventBounds.max-worldX)){eventX=even [...]
-var distX=eventX-worldX;var eventY=trackRect.top;var eventHeight=trackRect.height;var distY=Math.abs(eventY+eventHeight/2-mouseY);if((distX<=minDistX||Math.abs(distX-minDistX)<pixWidth)&&distY<minDistY){minDistX=distX;minDistY=distY;result.x=eventX;result.y=eventY+
-modelTrackContainer.scrollTop-modelTrackContainerRect.top;result.height=eventHeight;result.snapped=true;}}
-return result;}};return{TimingTool:TimingTool};});'use strict';tr.exportTo('tr.ui.b',function(){var ContainerThatDecoratesItsChildren=tr.ui.b.define('div');ContainerThatDecoratesItsChildren.prototype={__proto__:HTMLUnknownElement.prototype,decorate:function(){this.observer_=new WebKitMutationObserver(this.didMutate_.bind(this));this.observer_.observe(this,{childList:true});Object.defineProperty(this,'textContent',{get:undefined,set:this.onSetTextContent_});},appendChild:function(x){HTMLU [...]
-throw new Error('textContent can only be set to \'\'.');this.clear();},clear:function(){while(this.lastChild)
-HTMLUnknownElement.prototype.removeChild.call(this,this.lastChild);this.didMutate_(this.observer_.takeRecords());},didMutate_:function(records){this.beginDecorating_();for(var i=0;i<records.length;i++){var addedNodes=records[i].addedNodes;if(addedNodes){for(var j=0;j<addedNodes.length;j++)
-this.decorateChild_(addedNodes[j]);}
-var removedNodes=records[i].removedNodes;if(removedNodes){for(var j=0;j<removedNodes.length;j++){this.undecorateChild_(removedNodes[j]);}}}
-this.doneDecoratingForNow_();},decorateChild_:function(child){throw new Error('Not implemented');},undecorateChild_:function(child){throw new Error('Not implemented');},beginDecorating_:function(){},doneDecoratingForNow_:function(){}};return{ContainerThatDecoratesItsChildren:ContainerThatDecoratesItsChildren};});'use strict';tr.exportTo('tr.ui.tracks',function(){var Track=tr.ui.b.define('track',tr.ui.b.ContainerThatDecoratesItsChildren);Track.prototype={__proto__:tr.ui.b.ContainerThatDec [...]
-throw new Error('viewport is required when creating a Track.');this.viewport_=viewport;this.classList.add('track');},get viewport(){return this.viewport_;},get drawingContainer(){var cur=this;while(cur){if(cur instanceof tr.ui.tracks.DrawingContainer)
-return cur;cur=cur.parentElement;}
-return undefined;},get eventContainer(){},invalidateDrawingContainer:function(){var dc=this.drawingContainer;if(dc)
-dc.invalidate();},context:function(){if(!this.parentNode)
-return undefined;if(!this.parentNode.context)
-throw new Error('Parent container does not support context() method.');return this.parentNode.context();},decorateChild_:function(childTrack){},undecorateChild_:function(childTrack){if(childTrack.detach)
-childTrack.detach();},updateContents_:function(){},drawTrack:function(type){var ctx=this.context();var pixelRatio=window.devicePixelRatio||1;var bounds=this.getBoundingClientRect();var canvasBounds=ctx.canvas.getBoundingClientRect();ctx.save();ctx.translate(0,pixelRatio*(bounds.top-canvasBounds.top));var dt=this.viewport.currentDisplayTransform;var viewLWorld=dt.xViewToWorld(0);var viewRWorld=dt.xViewToWorld(bounds.width*pixelRatio);this.draw(type,viewLWorld,viewRWorld);ctx.restore();},d [...]
-return;this.addIntersectingEventsInRangeToSelectionInWorldSpace(loWX,hiWX,viewPixWidthWorld,selection);},addIntersectingEventsInRangeToSelectionInWorldSpace:function(loWX,hiWX,viewPixWidthWorld,selection){},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){},addClosestInstantEventToSelection:function(instantEvents,worldX,worldMaxDist,selection){var instantEvent=tr.b.findClosestElementInSortedArray(instantEvents,function(x){return x.start;},worldX,worldMaxDist);if [...]
-return;selection.push(instantEvent);}};return{Track:Track};});'use strict';tr.exportTo('tr.ui.tracks',function(){var DrawType={GENERAL_EVENT:1,INSTANT_EVENT:2,BACKGROUND:3,GRID:4,FLOW_ARROWS:5,MARKERS:6,HIGHLIGHTS:7,ANNOTATIONS:8};var DrawingContainer=tr.ui.b.define('drawing-container',tr.ui.tracks.Track);DrawingContainer.prototype={__proto__:tr.ui.tracks.Track.prototype,decorate:function(viewport){tr.ui.tracks.Track.prototype.decorate.call(this,viewport);this.classList.add('drawing-cont [...]
-return;this.rafPending_=true;tr.b.requestPreAnimationFrame(this.preDraw_,this);},preDraw_:function(){this.rafPending_=false;this.updateCanvasSizeIfNeeded_();tr.b.requestAnimationFrameInThisFrameIfPossible(this.draw_,this);},draw_:function(){this.ctx_.clearRect(0,0,this.canvas_.width,this.canvas_.height);var typesToDraw=[DrawType.BACKGROUND,DrawType.HIGHLIGHTS,DrawType.GRID,DrawType.INSTANT_EVENT,DrawType.GENERAL_EVENT,DrawType.MARKERS,DrawType.ANNOTATIONS,DrawType.FLOW_ARROWS];for(var id [...]
-continue;this.children[i].drawTrack(typesToDraw[idx]);}}
-var pixelRatio=window.devicePixelRatio||1;var bounds=this.canvas_.getBoundingClientRect();var dt=this.viewport.currentDisplayTransform;var viewLWorld=dt.xViewToWorld(0);var viewRWorld=dt.xViewToWorld(bounds.width*pixelRatio);this.viewport.drawGridLines(this.ctx_,viewLWorld,viewRWorld);},updateCanvasSizeIfNeeded_:function(){var visibleChildTracks=tr.b.asArray(this.children).filter(this.visibleFilter_);var thisBounds=this.getBoundingClientRect();var firstChildTrackBounds=visibleChildTracks [...]
-tr.c.constants.HEADING_WIDTH;var innerHeight=lastChildTrackBounds.bottom-firstChildTrackBounds.top;var pixelRatio=window.devicePixelRatio||1;if(this.canvas_.width!=innerWidth*pixelRatio){this.canvas_.width=innerWidth*pixelRatio;this.canvas_.style.width=innerWidth+'px';}
-if(this.canvas_.height!=innerHeight*pixelRatio){this.canvas_.height=innerHeight*pixelRatio;this.canvas_.style.height=innerHeight+'px';}},visibleFilter_:function(element){if(!(element instanceof tr.ui.tracks.Track))
-return false;return window.getComputedStyle(element).display!=='none';},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){for(var i=0;i<this.children.length;++i){if(!(this.children[i]instanceof tr.ui.tracks.Track))
-continue;var trackClientRect=this.children[i].getBoundingClientRect();var a=Math.max(loY,trackClientRect.top);var b=Math.min(hiY,trackClientRect.bottom);if(a<=b){this.children[i].addClosestEventToSelection(worldX,worldMaxDist,loY,hiY,selection);}}
-tr.ui.tracks.Track.prototype.addClosestEventToSelection.apply(this,arguments);},addEventsToTrackMap:function(eventToTrackMap){for(var i=0;i<this.children.length;++i){if(!(this.children[i]instanceof tr.ui.tracks.Track))
-continue;this.children[i].addEventsToTrackMap(eventToTrackMap);}},addContainersToTrackMap:function(containerToTrackMap){for(var i=0;i<this.children.length;++i){if(!(this.children[i]instanceof tr.ui.tracks.Track))
-continue;this.children[i].addContainersToTrackMap(containerToTrackMap);}}};return{DrawingContainer:DrawingContainer,DrawType:DrawType};});'use strict';tr.exportTo('tr.ui.tracks',function(){function Highlighter(viewport){if(viewport===undefined){throw new Error('viewport must be provided');}
-this.viewport_=viewport;};Highlighter.prototype={__proto__:Object.prototype,processModel:function(model){throw new Error('processModel implementation missing');},drawHighlight:function(ctx,dt,viewLWorld,viewRWorld,viewHeight){throw new Error('drawHighlight implementation missing');}};var options=new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);options.defaultMetadata={};options.mandatoryBaseClass=Highlighter;tr.b.decorateExtensionRegistry(Highlighter,options);return{Highlighte [...]
-tracks.push(this.children[i]);}
-return tracks;},drawTrack:function(type){for(var i=0;i<this.children.length;++i){if(!(this.children[i]instanceof tr.ui.tracks.Track))
-continue;this.children[i].drawTrack(type);}},addIntersectingEventsInRangeToSelection:function(loVX,hiVX,loY,hiY,selection){for(var i=0;i<this.tracks_.length;i++){var trackClientRect=this.tracks_[i].getBoundingClientRect();var a=Math.max(loY,trackClientRect.top);var b=Math.min(hiY,trackClientRect.bottom);if(a<=b)
-this.tracks_[i].addIntersectingEventsInRangeToSelection(loVX,hiVX,loY,hiY,selection);}
-tr.ui.tracks.Track.prototype.addIntersectingEventsInRangeToSelection.apply(this,arguments);},addEventsToTrackMap:function(eventToTrackMap){for(var i=0;i<this.children.length;++i)
-this.children[i].addEventsToTrackMap(eventToTrackMap);},addAllEventsMatchingFilterToSelection:function(filter,selection){for(var i=0;i<this.tracks_.length;i++)
-this.tracks_[i].addAllEventsMatchingFilterToSelection(filter,selection);},addAllEventsMatchingFilterToSelectionAsTask:function(filter,selection){var task=new Task();for(var i=0;i<this.tracks_.length;i++){task.subTask(function(i){return function(){this.tracks_[i].addAllEventsMatchingFilterToSelection(filter,selection);}}(i),this);}
-return task;},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){for(var i=0;i<this.tracks_.length;i++){var trackClientRect=this.tracks_[i].getBoundingClientRect();var a=Math.max(loY,trackClientRect.top);var b=Math.min(hiY,trackClientRect.bottom);if(a<=b){this.tracks_[i].addClosestEventToSelection(worldX,worldMaxDist,loY,hiY,selection);}}
-tr.ui.tracks.Track.prototype.addClosestEventToSelection.apply(this,arguments);}};return{ContainerTrack:ContainerTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){function ChartAxis(opt_min,opt_max){this.guid_=tr.b.GUID.allocate();this.bounds=new tr.b.Range();if(opt_min!==undefined)
-this.bounds.addValue(opt_min);if(opt_max!==undefined)
-this.bounds.addValue(opt_max);};ChartAxis.prototype={get guid(){return this.guid_;},valueToUnitRange:function(value){if(this.bounds.isEmpty)
-throw new Error('Chart axis bounds are empty');var bounds=this.bounds;if(bounds.range===0)
-return 0;return(value-bounds.min)/bounds.range;},autoSetFromSeries:function(series,opt_config){var range=new tr.b.Range();series.forEach(function(s){range.addRange(s.range);},this);this.autoSetFromRange(range,opt_config);},autoSetFromRange:function(range,opt_config){if(range.isEmpty)
-return;var bounds=this.bounds;if(bounds.isEmpty){bounds.addRange(range);return;}
-if(!opt_config)
-return;var useRangeMin=(opt_config.expandMin&&range.min<bounds.min||opt_config.shrinkMin&&range.min>bounds.min);var useRangeMax=(opt_config.expandMax&&range.max>bounds.max||opt_config.shrinkMax&&range.max<bounds.max);if(!useRangeMin&&!useRangeMax)
-return;if(useRangeMin&&useRangeMax){bounds.min=range.min;bounds.max=range.max;return;}
-if(useRangeMin){bounds.min=Math.min(range.min,bounds.max);}else{bounds.max=Math.max(range.max,bounds.min);}}};return{ChartAxis:ChartAxis};});'use strict';tr.exportTo('tr.model',function(){var SelectableItem=tr.model.SelectableItem;var SelectionState=tr.model.SelectionState;function ProxySelectableItem(modelItem){SelectableItem.call(this,modelItem);};ProxySelectableItem.prototype={__proto__:SelectableItem.prototype,get selectionState(){var modelItem=this.modelItem_;if(modelItem===undefined)
-return SelectionState.NONE;return modelItem.selectionState;}};return{ProxySelectableItem:ProxySelectableItem};});'use strict';tr.exportTo('tr.ui.tracks',function(){function ChartPoint(modelItem,x,y,opt_yBase){tr.model.ProxySelectableItem.call(this,modelItem);this.x=x;this.y=y;this.yBase=opt_yBase;};ChartPoint.prototype={__proto__:tr.model.ProxySelectableItem.prototype};return{ChartPoint:ChartPoint};});'use strict';tr.exportTo('tr.ui.tracks',function(){var DOWN_ARROW=String.fromCharCode(0 [...]
-return;this.expanded_=expanded;this.expandedStateChanged_();},expandedStateChanged_:function(){this.updateHeadigDiv_();},onHeadingDivClicked_:function(){var e=new Event('heading-clicked',{'bubbles':true});this.dispatchEvent(e);},updateContents_:function(){this.updateHeadigDiv_();},updateHeadigDiv_:function(){this.headingDiv_.innerHTML='';var span=document.createElement('span');span.classList.add('heading-arrow');if(this.expanded===true)
-span.textContent=DOWN_ARROW;else if(this.expanded===false)
-span.textContent=RIGHT_ARROW;else
-span.textContent='';this.headingDiv_.appendChild(span);if(this.selectionGenerator_){this.headingLink_=document.createElement('tr-ui-a-analysis-link');this.headingLink_.selection=this.selectionGenerator_;this.headingLink_.textContent='';this.headingDiv_.appendChild(this.headingLink_);this.headingLink_.appendChild(document.createTextNode(this.heading_));}else{span=document.createElement('span');span.textContent=this.heading_;this.headingDiv_.appendChild(span);}
-this.appendChild(this.headingDiv_);},draw:function(type,viewLWorld,viewRWorld){throw new Error('draw implementation missing');}};return{HeadingTrack:HeadingTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var EventPresenter=tr.ui.b.EventPresenter;var SelectionState=tr.model.SelectionState;var ChartSeriesType={LINE:0,AREA:1};var DEFAULT_RENDERING_CONFIG={chartType:ChartSeriesType.LINE,selectedPointSize:4,unselectedPointSize:3,colorId:0,lineWidth:1,skipDistance:1,unselectedPoin [...]
-ChartSeries.prototype={useRenderingConfig_:function(opt_renderingConfig){var config=opt_renderingConfig||{};tr.b.iterItems(DEFAULT_RENDERING_CONFIG,function(key,defaultValue){var value=config[key];if(value===undefined)
-value=defaultValue;this[key+'_']=value;},this);this.topPadding=this.bottomPadding=Math.max(this.selectedPointSize_,this.unselectedPointSize_)/2;},get range(){var range=new tr.b.Range();this.points.forEach(function(point){range.addValue(point.y);},this);return range;},draw:function(ctx,transform,highDetails){if(this.points===undefined||this.points.length===0)
-return;if(this.chartType_===ChartSeriesType.AREA){this.drawComponent_(ctx,transform,ChartSeriesComponent.BACKGROUND,highDetails);}
-if(this.chartType_===ChartSeriesType.LINE||highDetails){this.drawComponent_(ctx,transform,ChartSeriesComponent.LINE,highDetails);}
-this.drawComponent_(ctx,transform,ChartSeriesComponent.DOTS,highDetails);},drawComponent_:function(ctx,transform,component,highDetails){var extraPixels=0;if(component===ChartSeriesComponent.DOTS){extraPixels=Math.max(this.selectedPointSize_,this.unselectedPointSize_);}
-var leftViewX=transform.leftViewX-extraPixels*transform.pixelRatio;var rightViewX=transform.rightViewX+
-extraPixels*transform.pixelRatio;var leftTimestamp=transform.leftTimestamp-extraPixels;var rightTimestamp=transform.rightTimestamp+extraPixels;var firstVisibleIndex=tr.b.findLowIndexInSortedArray(this.points,function(point){return point.x;},leftTimestamp);var lastVisibleIndex=tr.b.findLowIndexInSortedArray(this.points,function(point){return point.x;},rightTimestamp);if(lastVisibleIndex>=this.points.length||this.points[lastVisibleIndex].x>rightTimestamp){lastVisibleIndex--;}
-var viewSkipDistance=this.skipDistance_*transform.pixelRatio;var circleRadius;var squareSize;var squareHalfSize;var squareOpacity;switch(component){case ChartSeriesComponent.DOTS:ctx.strokeStyle=EventPresenter.getCounterSeriesColor(this.colorId_,SelectionState.NONE);ctx.lineWidth=transform.pixelRatio;circleRadius=(this.selectedPointSize_/2)*transform.pixelRatio;squareSize=this.unselectedPointSize_*transform.pixelRatio;squareHalfSize=squareSize/2;if(!highDetails){squareOpacity=0;break;}
-var visibleIndexRange=lastVisibleIndex-firstVisibleIndex;if(visibleIndexRange<=0){squareOpacity=1;break;}
-var visibleViewXRange=transform.worldXToViewX(this.points[lastVisibleIndex].x)-
-transform.worldXToViewX(this.points[firstVisibleIndex].x);if(visibleViewXRange===0){squareOpacity=1;break;}
-var density=visibleIndexRange/visibleViewXRange;var clampedDensity=tr.b.clamp(density,this.unselectedPointDensityOpaque_,this.unselectedPointDensityTransparent_);var densityRange=this.unselectedPointDensityTransparent_-
-this.unselectedPointDensityOpaque_;squareOpacity=(this.unselectedPointDensityTransparent_-clampedDensity)/densityRange;break;case ChartSeriesComponent.LINE:ctx.strokeStyle=EventPresenter.getCounterSeriesColor(this.colorId_,SelectionState.NONE);ctx.lineWidth=this.lineWidth_*transform.pixelRatio;break;case ChartSeriesComponent.BACKGROUND:break;default:throw new Error('Invalid component: '+component);}
-var previousViewX=undefined;var previousViewY=undefined;var previousViewYBase=undefined;var lastSelectionState=undefined;var baseSteps=undefined;var startIndex=Math.max(firstVisibleIndex-1,0);for(var i=startIndex;i<this.points.length;i++){var currentPoint=this.points[i];var currentViewX=transform.worldXToViewX(currentPoint.x);if(currentViewX>rightViewX){if(previousViewX!==undefined){previousViewX=currentViewX=rightViewX;if(component===ChartSeriesComponent.BACKGROUND||component===ChartSer [...]
-break;}
-if(i+1<this.points.length){var nextPoint=this.points[i+1];var nextViewX=transform.worldXToViewX(nextPoint.x);if(previousViewX!==undefined&&nextViewX-previousViewX<=viewSkipDistance&&nextViewX<rightViewX){continue;}
-if(currentViewX<leftViewX){currentViewX=leftViewX;}}
-if(previousViewX!==undefined&&currentViewX-previousViewX<viewSkipDistance){currentViewX=previousViewX+viewSkipDistance;}
-var currentViewY=Math.round(transform.worldYToViewY(currentPoint.y));var currentViewYBase;if(currentPoint.yBase===undefined){currentViewYBase=transform.outerBottomViewY;}else{currentViewYBase=Math.round(transform.worldYToViewY(currentPoint.yBase));}
-var currentSelectionState=currentPoint.selectionState;switch(component){case ChartSeriesComponent.DOTS:if(currentSelectionState!==lastSelectionState){if(currentSelectionState===SelectionState.SELECTED){ctx.fillStyle=EventPresenter.getCounterSeriesColor(this.colorId_,currentSelectionState);}else if(squareOpacity>0){ctx.fillStyle=EventPresenter.getCounterSeriesColor(this.colorId_,currentSelectionState,squareOpacity);}}
-if(currentSelectionState===SelectionState.SELECTED){ctx.beginPath();ctx.arc(currentViewX,currentViewY,circleRadius,0,2*Math.PI);ctx.fill();ctx.stroke();}else if(squareOpacity>0){ctx.fillRect(currentViewX-squareHalfSize,currentViewY-squareHalfSize,squareSize,squareSize);}
-break;case ChartSeriesComponent.LINE:if(previousViewX===undefined){ctx.beginPath();ctx.moveTo(currentViewX,currentViewY);}else{ctx.lineTo(currentViewX,previousViewY);}
-ctx.lineTo(currentViewX,currentViewY);break;case ChartSeriesComponent.BACKGROUND:if(previousViewX!==undefined)
-ctx.lineTo(currentViewX,previousViewY);if(currentSelectionState!==lastSelectionState){if(previousViewX!==undefined){var previousBaseStepViewX=currentViewX;for(var j=baseSteps.length-1;j>=0;j--){var baseStep=baseSteps[j];var baseStepViewX=baseStep.viewX;var baseStepViewY=baseStep.viewY;ctx.lineTo(previousBaseStepViewX,baseStepViewY);ctx.lineTo(baseStepViewX,baseStepViewY);previousBaseStepViewX=baseStepViewX;}
-ctx.closePath();ctx.fill();}
-ctx.beginPath();ctx.fillStyle=EventPresenter.getCounterSeriesColor(this.colorId_,currentSelectionState,this.backgroundOpacity_);ctx.moveTo(currentViewX,currentViewYBase);baseSteps=[];}
-if(currentViewYBase!==previousViewYBase||currentSelectionState!==lastSelectionState){baseSteps.push({viewX:currentViewX,viewY:currentViewYBase});}
-ctx.lineTo(currentViewX,currentViewY);break;default:throw new Error('Not reachable');}
-previousViewX=currentViewX;previousViewY=currentViewY;previousViewYBase=currentViewYBase;lastSelectionState=currentSelectionState;}
-if(previousViewX!==undefined){switch(component){case ChartSeriesComponent.DOTS:break;case ChartSeriesComponent.LINE:ctx.stroke();break;case ChartSeriesComponent.BACKGROUND:var previousBaseStepViewX=currentViewX;for(var j=baseSteps.length-1;j>=0;j--){var baseStep=baseSteps[j];var baseStepViewX=baseStep.viewX;var baseStepViewY=baseStep.viewY;ctx.lineTo(previousBaseStepViewX,baseStepViewY);ctx.lineTo(baseStepViewX,baseStepViewY);previousBaseStepViewX=baseStepViewX;}
-ctx.closePath();ctx.fill();break;default:throw new Error('Not reachable');}}},addIntersectingEventsInRangeToSelectionInWorldSpace:function(loWX,hiWX,viewPixWidthWorld,selection){var points=this.points;function getPointWidth(point,i){if(i===points.length-1)
-return LAST_POINT_WIDTH*viewPixWidthWorld;var nextPoint=points[i+1];return nextPoint.x-point.x;}
-function selectPoint(point){point.addToSelection(selection);}
-tr.b.iterateOverIntersectingIntervals(this.points,function(point){return point.x},getPointWidth,loWX,hiWX,selectPoint);},addEventNearToProvidedEventToSelection:function(event,offset,selection){if(this.points===undefined)
-return false;var index=tr.b.findFirstIndexInArray(this.points,function(point){return point.modelItem===event;},this);if(index===-1)
-return false;var newIndex=index+offset;if(newIndex<0||newIndex>=this.points.length)
-return false;this.points[newIndex].addToSelection(selection);return true;},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){if(this.points===undefined)
-return;var item=tr.b.findClosestElementInSortedArray(this.points,function(point){return point.x},worldX,worldMaxDist);if(!item)
-return;item.addToSelection(selection);}};return{ChartSeries:ChartSeries,ChartSeriesType:ChartSeriesType};});'use strict';tr.exportTo('tr.ui.tracks',function(){function ChartTransform(displayTransform,axis,trackWidth,trackHeight,topPadding,bottomPadding,pixelRatio){this.pixelRatio=pixelRatio;this.leftViewX=0;this.rightViewX=trackWidth;this.leftTimestamp=displayTransform.xViewToWorld(this.leftViewX);this.rightTimestamp=displayTransform.xViewToWorld(this.rightViewX);this.displayTransform_=d [...]
-var axisGuidToAxisData={};var topPadding=0;var bottomPadding=0;this.series_.forEach(function(series){var axis=series.axis;var axisGuid=axis.guid;if(!(axisGuid in axisGuidToAxisData)){axisGuidToAxisData[axisGuid]={axis:axis,series:[]};}
-axisGuidToAxisData[axisGuid].series.push(series);topPadding=Math.max(topPadding,series.topPadding);bottomPadding=Math.max(bottomPadding,series.bottomPadding);},this);this.axisGuidToAxisData_=axisGuidToAxisData;this.topPadding_=topPadding;this.bottomPadding_=bottomPadding;},draw:function(type,viewLWorld,viewRWorld){switch(type){case tr.ui.tracks.DrawType.GENERAL_EVENT:this.drawChart_(viewLWorld,viewRWorld);break;}},drawChart_:function(viewLWorld,viewRWorld){if(!this.series_)
-return;var ctx=this.context();var displayTransform=this.viewport.currentDisplayTransform;var pixelRatio=window.devicePixelRatio||1;var bounds=this.getBoundingClientRect();var highDetails=this.viewport.highDetails;var width=bounds.width*pixelRatio;var height=bounds.height*pixelRatio;var topPadding=this.topPadding_*pixelRatio;var bottomPadding=this.bottomPadding_*pixelRatio;ctx.save();ctx.beginPath();ctx.rect(0,0,width,height);ctx.clip();this.series_.forEach(function(series){var chartTrans [...]
-return;switch(type){case tr.ui.tracks.DrawType.GENERAL_EVENT:this.drawLetterDots_(viewLWorld,viewRWorld);break;}},drawLetterDots_:function(viewLWorld,viewRWorld){var ctx=this.context();var pixelRatio=window.devicePixelRatio||1;var bounds=this.getBoundingClientRect();var height=bounds.height*pixelRatio;var halfHeight=height*0.5;var twoPi=Math.PI*2;var palette=tr.ui.b.getColorPalette();var highlightIdBoost=tr.ui.b.paletteProperties.highlightIdBoost;var dt=this.viewport.currentDisplayTransf [...]
-break;if(item.selected!==selected)
-continue;var xView=dt.xWorldToView(x);ctx.fillStyle=EventPresenter.getSelectableItemColor(item);ctx.beginPath();ctx.arc(xView,halfHeight,dumpRadiusView+0.5,0,twoPi);ctx.fill();if(item.selected){ctx.lineWidth=3;ctx.strokeStyle='rgb(100,100,0)';ctx.stroke();ctx.beginPath();ctx.arc(xView,halfHeight,dumpRadiusView,0,twoPi);ctx.lineWidth=1.5;ctx.strokeStyle='rgb(255,255,0)';ctx.stroke();}else{ctx.lineWidth=1;ctx.strokeStyle='rgb(0,0,0)';ctx.stroke();}
-ctx.fillStyle='rgb(255, 255, 255)';ctx.fillText(item.dotLetter,xView,halfHeight);}};drawItems(false);drawItems(true);ctx.lineWidth=1;ctx.font=oldFont;},addEventsToTrackMap:function(eventToTrackMap){if(this.items_===undefined)
-return;this.items_.forEach(function(item){item.addToTrackMap(eventToTrackMap,this);},this);},addIntersectingEventsInRangeToSelectionInWorldSpace:function(loWX,hiWX,viewPixWidthWorld,selection){if(this.items_===undefined)
-return;var itemRadiusWorld=viewPixWidthWorld*this.dumpRadiusView;tr.b.iterateOverIntersectingIntervals(this.items_,function(x){return x.start-itemRadiusWorld;},function(x){return 2*itemRadiusWorld;},loWX,hiWX,function(item){item.addToSelection(selection);}.bind(this));},addEventNearToProvidedEventToSelection:function(event,offset,selection){if(this.items_===undefined)
-return;var items=this.items_;var index=tr.b.findFirstIndexInArray(items,function(item){return item.modelItem===event;});if(index===-1)
-return false;var newIndex=index+offset;if(newIndex>=0&&newIndex<items.length){items[newIndex].addToSelection(selection);return true;}
-return false;},addAllEventsMatchingFilterToSelection:function(filter,selection){},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){if(this.items_===undefined)
-return;var item=tr.b.findClosestElementInSortedArray(this.items_,function(x){return x.start;},worldX,worldMaxDist);if(!item)
-return;item.addToSelection(selection);}};function LetterDot(modelItem,dotLetter,colorId,start){tr.model.ProxySelectableItem.call(this,modelItem);this.dotLetter=dotLetter;this.colorId=colorId;this.start=start;};LetterDot.prototype={__proto__:tr.model.ProxySelectableItem.prototype};return{LetterDotTrack:LetterDotTrack,LetterDot:LetterDot};});'use strict';tr.exportTo('tr.ui.tracks',function(){var palette=tr.ui.b.getColorPalette();var startCompare=function(x,y){return x.start-y.start;}
-var FrameTrack=tr.ui.b.define('frame-track',tr.ui.tracks.LetterDotTrack);FrameTrack.prototype={__proto__:tr.ui.tracks.LetterDotTrack.prototype,decorate:function(viewport){tr.ui.tracks.LetterDotTrack.prototype.decorate.call(this,viewport);this.heading='Frames';this.frames_=undefined;this.items=undefined;},get frames(){return this.frames_;},set frames(frames){this.frames_=frames;if(frames===undefined)
-return;this.frames_=this.frames_.slice();this.frames_.sort(startCompare);this.items=this.frames_.map(function(frame){return new FrameDot(frame);});}};function FrameDot(frame){tr.ui.tracks.LetterDot.call(this,frame,'F',frame.colorId,frame.start);}
-FrameDot.prototype={__proto__:tr.ui.tracks.LetterDot.prototype};return{FrameTrack:FrameTrack};});'use strict';tr.exportTo('tr.model',function(){var Settings=tr.b.Settings;function ModelSettings(model){this.model=model;this.objectsByKey_=[];this.nonuniqueKeys_=[];this.buildObjectsByKeyMap_();this.removeNonuniqueKeysFromSettings_();this.ephemeralSettingsByGUID_={};}
-ModelSettings.prototype={buildObjectsByKeyMap_:function(){var objects=[];this.model.iterateAllPersistableObjects(function(o){objects.push(o);});var objectsByKey={};var NONUNIQUE_KEY='nonuniqueKey';for(var i=0;i<objects.length;i++){var object=objects[i];var objectKey=object.getSettingsKey();if(!objectKey)
-continue;if(objectsByKey[objectKey]===undefined){objectsByKey[objectKey]=object;continue;}
-objectsByKey[objectKey]=NONUNIQUE_KEY;}
-var nonuniqueKeys={};tr.b.dictionaryKeys(objectsByKey).forEach(function(objectKey){if(objectsByKey[objectKey]!==NONUNIQUE_KEY)
-return;delete objectsByKey[objectKey];nonuniqueKeys[objectKey]=true;});this.nonuniqueKeys=nonuniqueKeys;this.objectsByKey_=objectsByKey;},removeNonuniqueKeysFromSettings_:function(){var settings=Settings.get('trace_model_settings',{});var settingsChanged=false;tr.b.dictionaryKeys(settings).forEach(function(objectKey){if(!this.nonuniqueKeys[objectKey])
-return;settingsChanged=true;delete settings[objectKey];},this);if(settingsChanged)
-Settings.set('trace_model_settings',settings);},hasUniqueSettingKey:function(object){var objectKey=object.getSettingsKey();if(!objectKey)
-return false;return this.objectsByKey_[objectKey]!==undefined;},getSettingFor:function(object,objectLevelKey,defaultValue){var objectKey=object.getSettingsKey();if(!objectKey||!this.objectsByKey_[objectKey]){var settings=this.getEphemeralSettingsFor_(object);var ephemeralValue=settings[objectLevelKey];if(ephemeralValue!==undefined)
-return ephemeralValue;return defaultValue;}
-var settings=Settings.get('trace_model_settings',{});if(!settings[objectKey])
-settings[objectKey]={};var value=settings[objectKey][objectLevelKey];if(value!==undefined)
-return value;return defaultValue;},setSettingFor:function(object,objectLevelKey,value){var objectKey=object.getSettingsKey();if(!objectKey||!this.objectsByKey_[objectKey]){this.getEphemeralSettingsFor_(object)[objectLevelKey]=value;return;}
-var settings=Settings.get('trace_model_settings',{});if(!settings[objectKey])
-settings[objectKey]={};if(settings[objectKey][objectLevelKey]===value)
-return;settings[objectKey][objectLevelKey]=value;Settings.set('trace_model_settings',settings);},getEphemeralSettingsFor_:function(object){if(object.guid===undefined)
-throw new Error('Only objects with GUIDs can be persisted');if(this.ephemeralSettingsByGUID_[object.guid]===undefined)
-this.ephemeralSettingsByGUID_[object.guid]={};return this.ephemeralSettingsByGUID_[object.guid];}};return{ModelSettings:ModelSettings};});'use strict';tr.exportTo('tr.ui.tracks',function(){var MultiRowTrack=tr.ui.b.define('multi-row-track',tr.ui.tracks.ContainerTrack);MultiRowTrack.prototype={__proto__:tr.ui.tracks.ContainerTrack.prototype,decorate:function(viewport){tr.ui.tracks.ContainerTrack.prototype.decorate.call(this,viewport);this.tooltip_='';this.heading_='';this.groupingSource_= [...]
-return;this.expanded_=expanded;this.expandedStateChanged_();},onHeadingClicked_:function(e){if(this.subRows.length<=1)
-return;this.expanded=!this.expanded;if(this.groupingSource_){var modelSettings=new tr.model.ModelSettings(this.groupingSource_.model);modelSettings.setSettingFor(this.groupingSource_,'expanded',this.expanded);}
-e.stopPropagation();},updateExpandedStateFromGroupingSource_:function(){if(this.groupingSource_){var numSubRows=this.subRows.length;var modelSettings=new tr.model.ModelSettings(this.groupingSource_.model);if(numSubRows>1){var defaultExpanded;if(numSubRows>this.defaultToCollapsedWhenSubRowCountMoreThan){defaultExpanded=false;}else{defaultExpanded=true;}
-this.expanded=modelSettings.getSettingFor(this.groupingSource_,'expanded',defaultExpanded);}else{this.expanded=undefined;}}},expandedStateChanged_:function(){var minH=Math.max(2,Math.ceil(18/this.children.length));var h=(this.expanded_?18:minH)+'px';for(var i=0;i<this.children.length;i++)
-this.children[i].height=h;if(this.children.length>0)
-this.children[0].expanded=this.expanded;},updateContents_:function(){tr.ui.tracks.ContainerTrack.prototype.updateContents_.call(this);if(!this.itemsToGroup_){this.updateHeadingAndTooltip_();this.currentSubRows_=[];return;}
-if(this.areArrayContentsSame_(this.itemsGroupedOnLastUpdateContents_,this.itemsToGroup_)){this.updateHeadingAndTooltip_();return;}
-this.itemsGroupedOnLastUpdateContents_=this.itemsToGroup_;this.detach();if(!this.itemsToGroup_.length){this.currentSubRows_=[];return;}
-var subRows=this.buildSubRows_(this.itemsToGroup_);this.currentSubRows_=subRows;for(var srI=0;srI<subRows.length;srI++){var subRow=subRows[srI];if(!subRow.length)
-continue;var track=this.addSubTrack_(subRow);track.addEventListener('heading-clicked',this.onHeadingClicked_.bind(this));}
-this.updateHeadingAndTooltip_();this.expandedStateChanged_();},updateHeadingAndTooltip_:function(){if(!this.firstChild)
-return;this.firstChild.heading=this.heading_;this.firstChild.tooltip=this.tooltip_;},buildSubRows_:function(itemsToGroup){throw new Error('Not implemented');},addSubTrack_:function(subRowItems){throw new Error('Not implemented');},areArrayContentsSame_:function(a,b){if(!a||!b)
-return false;if(!a.length||!b.length)
-return false;if(a.length!=b.length)
-return false;for(var i=0;i<a.length;++i){if(a[i]!=b[i])
-return false;}
-return true;}};return{MultiRowTrack:MultiRowTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var SelectionState=tr.model.SelectionState;var EventPresenter=tr.ui.b.EventPresenter;var ObjectInstanceTrack=tr.ui.b.define('object-instance-track',tr.ui.tracks.HeadingTrack);ObjectInstanceTrack.prototype={__proto__:tr.ui.tracks.HeadingTrack.prototype,decorate:function(viewport){tr.ui.tracks.HeadingTrack.prototype.decorate.call(this,viewport);this.classList.add('object-instance-track' [...]
-this.heading=objectInstances[0].typeName;this.objectInstances_=objectInstances;this.objectSnapshots_=[];this.objectInstances_.forEach(function(instance){this.objectSnapshots_.push.apply(this.objectSnapshots_,instance.snapshots);},this);this.objectSnapshots_.sort(function(a,b){return a.ts-b.ts;});},get height(){return window.getComputedStyle(this).height;},set height(height){this.style.height=height;},get snapshotRadiusView(){return 7*(window.devicePixelRatio||1);},draw:function(type,view [...]
-break;var right=instance.deletionTs==Number.MAX_VALUE?viewRWorld:instance.deletionTs;ctx.fillStyle=EventPresenter.getObjectInstanceColor(instance);ctx.fillRect(x,pixelRatio,right-x,height-2*pixelRatio);}
-ctx.restore();var objectSnapshots=this.objectSnapshots_;loI=tr.b.findLowIndexInSortedArray(objectSnapshots,function(snapshot){return snapshot.ts+snapshotRadiusWorld;},viewLWorld);for(var i=loI;i<objectSnapshots.length;++i){var snapshot=objectSnapshots[i];var x=snapshot.ts;if(x-snapshotRadiusWorld>viewRWorld)
-break;var xView=dt.xWorldToView(x);ctx.fillStyle=EventPresenter.getObjectSnapshotColor(snapshot);ctx.beginPath();ctx.arc(xView,halfHeight,snapshotRadiusView,0,twoPi);ctx.fill();if(snapshot.selected){ctx.lineWidth=5;ctx.strokeStyle='rgb(100,100,0)';ctx.stroke();ctx.beginPath();ctx.arc(xView,halfHeight,snapshotRadiusView-1,0,twoPi);ctx.lineWidth=2;ctx.strokeStyle='rgb(255,255,0)';ctx.stroke();}else{ctx.lineWidth=1;ctx.strokeStyle='rgb(0,0,0)';ctx.stroke();}}
-ctx.lineWidth=1;var selectionState=SelectionState.NONE;if(objectInstances.length&&objectInstances[0].selectionState===SelectionState.DIMMED){selectionState=SelectionState.DIMMED;}
-if(selectionState===SelectionState.DIMMED){var width=bounds.width*pixelRatio;ctx.fillStyle='rgba(255,255,255,0.5)';ctx.fillRect(0,0,width,height);ctx.restore();}},addEventsToTrackMap:function(eventToTrackMap){if(this.objectInstance_!==undefined){this.objectInstance_.forEach(function(obj){eventToTrackMap.addEvent(obj,this);},this);}
-if(this.objectSnapshots_!==undefined){this.objectSnapshots_.forEach(function(obj){eventToTrackMap.addEvent(obj,this);},this);}},addIntersectingEventsInRangeToSelectionInWorldSpace:function(loWX,hiWX,viewPixWidthWorld,selection){var foundSnapshot=false;function onSnapshot(snapshot){selection.push(snapshot);foundSnapshot=true;}
-var snapshotRadiusView=this.snapshotRadiusView;var snapshotRadiusWorld=viewPixWidthWorld*snapshotRadiusView;tr.b.iterateOverIntersectingIntervals(this.objectSnapshots_,function(x){return x.ts-snapshotRadiusWorld;},function(x){return 2*snapshotRadiusWorld;},loWX,hiWX,onSnapshot);if(foundSnapshot)
-return;tr.b.iterateOverIntersectingIntervals(this.objectInstances_,function(x){return x.creationTs;},function(x){return x.deletionTs-x.creationTs;},loWX,hiWX,selection.push.bind(selection));},addEventNearToProvidedEventToSelection:function(event,offset,selection){var events;if(event instanceof tr.model.ObjectSnapshot)
-events=this.objectSnapshots_;else if(event instanceof tr.model.ObjectInstance)
-events=this.objectInstances_;else
-throw new Error('Unrecognized event');var index=events.indexOf(event);var newIndex=index+offset;if(newIndex>=0&&newIndex<events.length){selection.push(events[newIndex]);return true;}
-return false;},addAllEventsMatchingFilterToSelection:function(filter,selection){},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){var snapshot=tr.b.findClosestElementInSortedArray(this.objectSnapshots_,function(x){return x.ts;},worldX,worldMaxDist);if(!snapshot)
-return;selection.push(snapshot);}};var options=new tr.b.ExtensionRegistryOptions(tr.b.TYPE_BASED_REGISTRY_MODE);tr.b.decorateExtensionRegistry(ObjectInstanceTrack,options);return{ObjectInstanceTrack:ObjectInstanceTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ObjectInstanceGroupTrack=tr.ui.b.define('object-instance-group-track',tr.ui.tracks.MultiRowTrack);ObjectInstanceGroupTrack.prototype={__proto__:tr.ui.tracks.MultiRowTrack.prototype,decorate:function(viewport){tr.ui [...]
-if(!found){var subRow=[objectInstance];subRows.push(subRow);}}
-return subRows;},updateHeadingAndTooltip_:function(){}};return{ObjectInstanceGroupTrack:ObjectInstanceGroupTrack};});'use strict';tr.exportTo('tr.ui.b',function(){function FastRectRenderer(ctx,minRectSize,maxMergeDist,pallette){this.ctx_=ctx;this.minRectSize_=minRectSize;this.maxMergeDist_=maxMergeDist;this.pallette_=pallette;}
-FastRectRenderer.prototype={y_:0,h_:0,merging_:false,mergeStartX_:0,mergeCurRight_:0,mergedColorId_:0,mergedAlpha_:0,setYandH:function(y,h){if(this.y_===y&&this.h_===h)
-return;this.flush();this.y_=y;this.h_=h;},fillRect:function(x,w,colorId,alpha){var r=x+w;if(w<this.minRectSize_){if(r-this.mergeStartX_>this.maxMergeDist_)
-this.flush();if(!this.merging_){this.merging_=true;this.mergeStartX_=x;this.mergeCurRight_=r;this.mergedColorId_=colorId;this.mergedAlpha_=alpha;}else{this.mergeCurRight_=r;if(this.mergedAlpha_<alpha||(this.mergedAlpha_===alpha&&this.mergedColorId_<colorId)){this.mergedAlpha_=alpha;this.mergedColorId_=colorId;}}}else{if(this.merging_)
-this.flush();this.ctx_.fillStyle=this.pallette_[colorId];this.ctx_.globalAlpha=alpha;this.ctx_.fillRect(x,this.y_,w,this.h_);}},flush:function(){if(this.merging_){this.ctx_.fillStyle=this.pallette_[this.mergedColorId_];this.ctx_.globalAlpha=this.mergedAlpha_;this.ctx_.fillRect(this.mergeStartX_,this.y_,this.mergeCurRight_-this.mergeStartX_,this.h_);this.merging_=false;}}};return{FastRectRenderer:FastRectRenderer};});'use strict';tr.exportTo('tr.ui.tracks',function(){var RectTrack=tr.ui.b [...]
-return;var fontSize,yOffset;if(bounds.height<15){fontSize=6;yOffset=1.0;}else{fontSize=10;yOffset=2.5;}
-tr.ui.b.drawLabels(ctx,this.viewport.currentDisplayTransform,viewLWorld,viewRWorld,this.rects_,this.asyncStyle_,fontSize,yOffset);},addEventsToTrackMap:function(eventToTrackMap){if(this.rects_===undefined||this.rects_===null)
-return;this.rects_.forEach(function(rect){rect.addToTrackMap(eventToTrackMap,this);},this);},addIntersectingEventsInRangeToSelectionInWorldSpace:function(loWX,hiWX,viewPixWidthWorld,selection){function onRect(rect){rect.addToSelection(selection);}
-onRect=onRect.bind(this);tr.b.iterateOverIntersectingIntervals(this.rects_,function(x){return x.start;},function(x){return x.duration;},loWX,hiWX,onRect);},addEventNearToProvidedEventToSelection:function(event,offset,selection){var index=tr.b.findFirstIndexInArray(this.rects_,function(rect){return rect.modelItem===event;});if(index===-1)
-return false;var newIndex=index+offset;if(newIndex<0||newIndex>=this.rects_.length)
-return false;this.rects_[newIndex].addToSelection(selection);return true;},addAllEventsMatchingFilterToSelection:function(filter,selection){for(var i=0;i<this.rects_.length;++i){var modelItem=this.rects_[i].modelItem;if(!modelItem)
-continue;if(filter.matchSlice(modelItem))
-selection.push(modelItem);}},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){var rect=tr.b.findClosestIntervalInSortedIntervals(this.rects_,function(x){return x.start;},function(x){return x.end;},worldX,worldMaxDist);if(!rect)
-return;rect.addToSelection(selection);}};function Rect(modelItem,title,colorId,start,duration){tr.model.ProxySelectableItem.call(this,modelItem);this.title=title;this.colorId=colorId;this.start=start;this.duration=duration;this.end=start+duration;};Rect.prototype={__proto__:tr.model.ProxySelectableItem.prototype};return{RectTrack:RectTrack,Rect:Rect};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ProcessSummaryTrack=tr.ui.b.define('process-summary-track',tr.ui.tracks.RectTrack [...]
-return[];var ops=[];var pushOp=function(isStart,time,slice){ops.push({isStart:isStart,time:time,slice:slice});};for(var tid in process.threads){var sliceGroup=process.threads[tid].sliceGroup;sliceGroup.topLevelSlices.forEach(function(slice){pushOp(true,slice.start,undefined);pushOp(false,slice.end,undefined);});sliceGroup.slices.forEach(function(slice){if(slice.important){pushOp(true,slice.start,slice);pushOp(false,slice.end,slice);}});}
-ops.sort(function(a,b){return a.time-b.time;});var rects=[];var genericColorId=tr.ui.b.getColorIdForReservedName('generic_work');var pushRect=function(start,end,slice){rects.push(new tr.ui.tracks.Rect(slice,slice?slice.title:'',slice?slice.colorId:genericColorId,start,end-start));}
-var depth=0;var currentSlice=undefined;var lastStart=undefined;ops.forEach(function(op){depth+=op.isStart?1:-1;if(currentSlice){if(!op.isStart&&op.slice==currentSlice){pushRect(lastStart,op.time,currentSlice);lastStart=depth>=1?op.time:undefined;currentSlice=undefined;}}else{if(op.isStart){if(depth==1){lastStart=op.time;currentSlice=op.slice;}else if(op.slice){if(op.time!=lastStart){pushRect(lastStart,op.time,undefined);lastStart=op.time;}
-currentSlice=op.slice;}}else{if(depth==0){pushRect(lastStart,op.time,undefined);lastStart=undefined;}}}});return rects;};ProcessSummaryTrack.prototype={__proto__:tr.ui.tracks.RectTrack.prototype,decorate:function(viewport){tr.ui.tracks.RectTrack.prototype.decorate.call(this,viewport);},get process(){return this.process_;},set process(process){this.process_=process;this.rects=ProcessSummaryTrack.buildRectsFromProcess(process);}};return{ProcessSummaryTrack:ProcessSummaryTrack};});'use stri [...]
-return[];var ops=[];for(var i=0;i<slices.length;i++){if(slices[i].subSlices)
-slices[i].subSlices.splice(0,slices[i].subSlices.length);ops.push(i);}
-ops.sort(function(ix,iy){var x=slices[ix];var y=slices[iy];if(x.start!=y.start)
-return x.start-y.start;return ix-iy;});var subRows=[[]];this.badSlices_=[];for(var i=0;i<ops.length;i++){var op=ops[i];var slice=slices[op];var inserted=false;for(var j=subRows.length-1;j>=0;j--){if(subRows[j].length==0)
-continue;var insertedSlice=subRows[j][subRows[j].length-1];if(slice.start<insertedSlice.start){this.badSlices_.push(slice);inserted=true;}
-if(insertedSlice.bounds(slice,precisionUnit)){while(subRows.length<=j+1)
-subRows.push([]);subRows[j+1].push(slice);if(insertedSlice.subSlices)
-insertedSlice.subSlices.push(slice);inserted=true;break;}}
-if(inserted)
-continue;subRows[0].push(slice);}
-return subRows;}};return{SliceGroupTrack:SliceGroupTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var AsyncSliceGroupTrack=tr.ui.b.define('async-slice-group-track',tr.ui.tracks.MultiRowTrack);AsyncSliceGroupTrack.prototype={__proto__:tr.ui.tracks.MultiRowTrack.prototype,decorate:function(viewport){tr.ui.tracks.MultiRowTrack.prototype.decorate.call(this,viewport);this.classList.add('async-slice-group-track');this.group_=undefined;},addSubTrack_:function(slices){var track=new [...]
-var findLevel=function(sliceToPut,rows,n){if(n>=rows.length)
-return true;var subRow=rows[n];var lastSliceInSubRow=subRow[subRow.length-1];if(sliceToPut.start>=lastSliceInSubRow.end){if(sliceToPut.subSlices===undefined||sliceToPut.subSlices.length===0){return true;}
-for(var i=0;i<sliceToPut.subSlices.length;i++){if(!findLevel(sliceToPut.subSlices[i],rows,n+1))
-return false;}
-return true;}
-return false;}
-var subRows=[];for(var i=0;i<slices.length;i++){var slice=slices[i];var found=false;var index=subRows.length;for(var j=0;j<subRows.length;j++){if(findLevel(slice,subRows,j)){found=true;index=j;break;}}
-if(!found)
-subRows.push([]);subRows[index].push(slice);var fitSubSlicesRecursively=function(subSlices,level,rows){if(subSlices===undefined||subSlices.length===0)
-return;if(level===rows.length)
-rows.push([]);for(var h=0;h<subSlices.length;h++){rows[level].push(subSlices[h]);fitSubSlicesRecursively(subSlices[h].subSlices,level+1,rows);}}
-fitSubSlicesRecursively(slice.subSlices,index+1,subRows);}
-return subRows;}};return{AsyncSliceGroupTrack:AsyncSliceGroupTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ThreadTrack=tr.ui.b.define('thread-track',tr.ui.tracks.ContainerTrack);ThreadTrack.prototype={__proto__:tr.ui.tracks.ContainerTrack.prototype,decorate:function(viewport){tr.ui.tracks.ContainerTrack.prototype.decorate.call(this,viewport);this.classList.add('thread-track');},get thread(){return this.thread_;},set thread(thread){this.thread_=thread;this.updateContent [...]
-this.childNodes[i].addContainersToTrackMap(containerToTrackMap);},updateContents_:function(){this.detach();if(!this.thread_)
-return;this.heading=this.thread_.userFriendlyName+': ';this.tooltip=this.thread_.userFriendlyDetails;if(this.thread_.asyncSliceGroup.length)
-this.appendAsyncSliceTracks_();this.appendThreadSamplesTracks_();if(this.thread_.timeSlices){var timeSlicesTrack=new tr.ui.tracks.SliceTrack(this.viewport);timeSlicesTrack.heading='';timeSlicesTrack.height=tr.ui.b.THIN_SLICE_HEIGHT+'px';timeSlicesTrack.slices=this.thread_.timeSlices;if(timeSlicesTrack.hasVisibleContent)
-this.appendChild(timeSlicesTrack);}
-if(this.thread_.sliceGroup.length){var track=new tr.ui.tracks.SliceGroupTrack(this.viewport);track.heading=this.thread_.userFriendlyName;track.tooltip=this.thread_.userFriendlyDetails;track.group=this.thread_.sliceGroup;if(track.hasVisibleContent)
-this.appendChild(track);}},appendAsyncSliceTracks_:function(){var subGroups=this.thread_.asyncSliceGroup.viewSubGroups;subGroups.forEach(function(subGroup){var asyncTrack=new tr.ui.tracks.AsyncSliceGroupTrack(this.viewport);var title=subGroup.slices[0].viewSubGroupTitle;asyncTrack.group=subGroup;asyncTrack.heading=title;if(asyncTrack.hasVisibleContent)
-this.appendChild(asyncTrack);},this);},appendThreadSamplesTracks_:function(){var threadSamples=this.thread_.samples;if(threadSamples===undefined||threadSamples.length===0)
-return;var samplesByTitle={};threadSamples.forEach(function(sample){if(samplesByTitle[sample.title]===undefined)
-samplesByTitle[sample.title]=[];samplesByTitle[sample.title].push(sample);});var sampleTitles=tr.b.dictionaryKeys(samplesByTitle);sampleTitles.sort();sampleTitles.forEach(function(sampleTitle){var samples=samplesByTitle[sampleTitle];var samplesTrack=new tr.ui.tracks.SampleTrack(this.viewport);samplesTrack.group=this.thread_;samplesTrack.samples=samples;samplesTrack.heading=this.thread_.userFriendlyName+': '+
-sampleTitle;samplesTrack.tooltip=this.thread_.userFriendlyDetails;samplesTrack.selectionGenerator=function(){var selection=new tr.c.Selection();for(var i=0;i<samplesTrack.samples.length;i++){selection.push(samplesTrack.samples[i]);}
-return selection;};this.appendChild(samplesTrack);},this);},collapsedDidChange:function(collapsed){if(collapsed){var h=parseInt(this.tracks[0].height);for(var i=0;i<this.tracks.length;++i){if(h>2){this.tracks[i].height=Math.floor(h)+'px';}else{this.tracks[i].style.display='none';}
-h=h*0.5;}}else{for(var i=0;i<this.tracks.length;++i){this.tracks[i].height=this.tracks[0].height;this.tracks[i].style.display='';}}}};return{ThreadTrack:ThreadTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ObjectSnapshotView=tr.ui.analysis.ObjectSnapshotView;var ObjectInstanceView=tr.ui.analysis.ObjectInstanceView;var SpacingTrack=tr.ui.tracks.SpacingTrack;var ProcessTrackBase=tr.ui.b.define('process-track-base',tr.ui.tracks.ContainerTrack);ProcessTrackBase.prototype={_ [...]
-this.updateContents_();},get expanded(){return this.classList.contains('expanded');},set expanded(expanded){expanded=!!expanded;if(this.expanded===expanded)
-return;this.classList.toggle('expanded');this.viewport_.dispatchChangeEvent();if(!this.processBase_)
-return;var modelSettings=new tr.model.ModelSettings(this.processBase_.model);modelSettings.setSettingFor(this.processBase_,'expanded',expanded);this.updateContents_();this.viewport.rebuildEventToTrackMap();this.viewport.rebuildContainerToTrackMap();},get hasVisibleContent(){if(this.expanded)
-return this.children.length>1;return true;},onHeaderClick_:function(e){e.stopPropagation();e.preventDefault();this.expanded=!this.expanded;},updateContents_:function(){this.tracks_.forEach(function(track){this.removeChild(track);},this);if(!this.processBase_)
-return;this.processNameEl_.textContent=this.processBase_.userFriendlyName;this.headerEl_.title=this.processBase_.userFriendlyDetails;this.willAppendTracks_();if(this.expanded){this.appendMemoryDumpTrack_();this.appendObjectInstanceTracks_();this.appendCounterTracks_();this.appendFrameTrack_();this.appendThreadTracks_();}else{this.appendSummaryTrack_();}
-this.didAppendTracks_();},addEventsToTrackMap:function(eventToTrackMap){this.tracks_.forEach(function(track){track.addEventsToTrackMap(eventToTrackMap);});},willAppendTracks_:function(){},didAppendTracks_:function(){},appendMemoryDumpTrack_:function(){},appendSummaryTrack_:function(){var track=new tr.ui.tracks.ProcessSummaryTrack(this.viewport);track.process=this.process;if(!track.hasVisibleContent)
-return;this.appendChild(track);},appendFrameTrack_:function(){var frames=this.process?this.process.frames:undefined;if(!frames||!frames.length)
-return;var track=new tr.ui.tracks.FrameTrack(this.viewport);track.frames=frames;this.appendChild(track);this.backgroundProvider=track;},appendObjectInstanceTracks_:function(){var instancesByTypeName=this.processBase_.objects.getAllInstancesByTypeName();var instanceTypeNames=tr.b.dictionaryKeys(instancesByTypeName);instanceTypeNames.sort();var didAppendAtLeastOneTrack=false;instanceTypeNames.forEach(function(typeName){var allInstances=instancesByTypeName[typeName];var instanceViewInfo=Obj [...]
-instanceViewInfo=undefined;if(snapshotViewInfo&&!snapshotViewInfo.metadata.showInTrackView)
-snapshotViewInfo=undefined;var hasViewInfo=instanceViewInfo||snapshotViewInfo;var visibleInstances=[];for(var i=0;i<allInstances.length;i++){var instance=allInstances[i];if(instance.snapshots.length===0)
-continue;if(instance.hasImplicitSnapshots&&!hasViewInfo)
-continue;visibleInstances.push(instance);}
-if(visibleInstances.length===0)
-return;var trackConstructor=tr.ui.tracks.ObjectInstanceTrack.getConstructor(undefined,typeName);if(!trackConstructor){var snapshotViewInfo=ObjectSnapshotView.getTypeInfo(undefined,typeName);if(snapshotViewInfo&&snapshotViewInfo.metadata.showInstances){trackConstructor=tr.ui.tracks.ObjectInstanceGroupTrack;}else{trackConstructor=tr.ui.tracks.ObjectInstanceTrack;}}
-var track=new trackConstructor(this.viewport);track.objectInstances=visibleInstances;this.appendChild(track);didAppendAtLeastOneTrack=true;},this);if(didAppendAtLeastOneTrack)
-this.appendChild(new SpacingTrack(this.viewport));},appendCounterTracks_:function(){var counters=tr.b.dictionaryValues(this.processBase.counters);counters.sort(tr.model.Counter.compare);counters.forEach(function(counter){var track=new tr.ui.tracks.CounterTrack(this.viewport);track.counter=counter;this.appendChild(track);this.appendChild(new SpacingTrack(this.viewport));}.bind(this));},appendThreadTracks_:function(){var threads=tr.b.dictionaryValues(this.processBase.threads);threads.sort( [...]
-return;this.appendChild(track);this.appendChild(new SpacingTrack(this.viewport));}.bind(this));}};return{ProcessTrackBase:ProcessTrackBase};});'use strict';tr.exportTo('tr.ui.tracks',function(){var CpuTrack=tr.ui.b.define('cpu-track',tr.ui.tracks.ContainerTrack);CpuTrack.prototype={__proto__:tr.ui.tracks.ContainerTrack.prototype,decorate:function(viewport){tr.ui.tracks.ContainerTrack.prototype.decorate.call(this,viewport);this.classList.add('cpu-track');this.detailedMode_=true;},get cpu( [...]
-return false;var cpu=this.cpu_;if(cpu.slices.length)
-return true;if(cpu.samples&&cpu.samples.length)
-return true;if(tr.b.dictionaryLength(cpu.counters)>0)
-return true;return false;},updateContents_:function(){this.detach();if(!this.cpu_)
-return;var slices=this.cpu_.slices;if(slices.length){var track=new tr.ui.tracks.SliceTrack(this.viewport);track.slices=slices;track.heading=this.cpu_.userFriendlyName+':';this.appendChild(track);}
-if(this.detailedMode_){this.appendSamplesTracks_();for(var counterName in this.cpu_.counters){var counter=this.cpu_.counters[counterName];track=new tr.ui.tracks.CounterTrack(this.viewport);track.heading=this.cpu_.userFriendlyName+' '+
-counter.name+':';track.counter=counter;this.appendChild(track);}}},appendSamplesTracks_:function(){var samples=this.cpu_.samples;if(samples===undefined||samples.length===0)
-return;var samplesByTitle={};samples.forEach(function(sample){if(samplesByTitle[sample.title]===undefined)
-samplesByTitle[sample.title]=[];samplesByTitle[sample.title].push(sample);});var sampleTitles=tr.b.dictionaryKeys(samplesByTitle);sampleTitles.sort();sampleTitles.forEach(function(sampleTitle){var samples=samplesByTitle[sampleTitle];var samplesTrack=new tr.ui.tracks.SliceTrack(this.viewport);samplesTrack.group=this.cpu_;samplesTrack.slices=samples;samplesTrack.heading=this.cpu_.userFriendlyName+': '+
-sampleTitle;samplesTrack.tooltip=this.cpu_.userFriendlyDetails;samplesTrack.selectionGenerator=function(){var selection=new tr.c.Selection();for(var i=0;i<samplesTrack.slices.length;i++){selection.push(samplesTrack.slices[i]);}
-return selection;};this.appendChild(samplesTrack);},this);}};return{CpuTrack:CpuTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var Cpu=tr.model.Cpu;var CpuTrack=tr.ui.tracks.cpu_track;var ProcessTrackBase=tr.ui.tracks.ProcessTrackBase;var SpacingTrack=tr.ui.tracks.SpacingTrack;var KernelTrack=tr.ui.b.define('kernel-track',ProcessTrackBase);KernelTrack.prototype={__proto__:ProcessTrackBase.prototype,decorate:function(viewport){ProcessTrackBase.prototype.decorate.call(this,vi [...]
-continue;this.appendChild(track);didAppendAtLeastOneTrack=true;}
-if(didAppendAtLeastOneTrack)
-this.appendChild(new SpacingTrack(this.viewport));}};return{KernelTrack:KernelTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var AlertTrack=tr.ui.b.define('alert-track',tr.ui.tracks.LetterDotTrack);AlertTrack.prototype={__proto__:tr.ui.tracks.LetterDotTrack.prototype,decorate:function(viewport){tr.ui.tracks.LetterDotTrack.prototype.decorate.call(this,viewport);this.heading='Alerts';this.alerts_=undefined;},get alerts(){return this.alerts_;},set alerts(alerts){this.alerts_=a [...]
-this.items=this.alerts_.map(function(alert){return new tr.ui.tracks.LetterDot(alert,String.fromCharCode(9888),alert.colorId,alert.start);});}};return{AlertTrack:AlertTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ALLOCATOR_SIZE_ATTRIBUTE_NAME='size';function addDictionary(dstDict,srcDict){tr.b.iterItems(srcDict,function(key,value){var existingValue=dstDict[key];if(existingValue===undefined)
-existingValue=0;dstDict[key]=existingValue+value;});}
-function getProcessMemoryDumpAllocatorSizes(processMemoryDump){var allocatorDumps=processMemoryDump.memoryAllocatorDumps;if(allocatorDumps===undefined)
-return{};var allocatorSizes={};allocatorDumps.forEach(function(allocatorDump){if(allocatorDump.fullName==='tracing')
-return;var allocatorSize=allocatorDump.attributes[ALLOCATOR_SIZE_ATTRIBUTE_NAME];if(allocatorSize===undefined)
-return;var allocatorSizeValue=allocatorSize.value;if(allocatorSizeValue===undefined)
-return;allocatorSizes[allocatorDump.fullName]=allocatorSizeValue;});return allocatorSizes;};function getGlobalMemoryDumpAllocatorSizes(globalMemoryDump){var globalAllocatorSizes={};tr.b.iterItems(globalMemoryDump.processMemoryDumps,function(pid,processMemoryDump){addDictionary(globalAllocatorSizes,getProcessMemoryDumpAllocatorSizes(processMemoryDump));});return globalAllocatorSizes;}
-function buildAllocatedMemoryChartSeries(memoryDumps,memoryDumpToAllocatorSizesFn){var allocatorNameToPoints={};var dumpsData=memoryDumps.map(function(memoryDump){var allocatorSizes=memoryDumpToAllocatorSizesFn(memoryDump);tr.b.iterItems(allocatorSizes,function(allocatorName){allocatorNameToPoints[allocatorName]=[];});return{dump:memoryDump,sizes:allocatorSizes};});if(Object.keys(allocatorNameToPoints).length===0)
-return undefined;dumpsData.forEach(function(dumpData){var memoryDump=dumpData.dump;var allocatorSizes=dumpData.sizes;tr.b.iterItems(allocatorNameToPoints,function(allocatorName,points){var allocatorSize=allocatorSizes[allocatorName]||0;points.push(new tr.ui.tracks.ChartPoint(memoryDump,memoryDump.start,allocatorSize));});});var axis=new tr.ui.tracks.ChartAxis(0);var series=[];tr.b.iterItems(allocatorNameToPoints,function(allocatorName,points){var colorId=tr.ui.b.getColorIdForGeneralPurpo [...]
-function buildMemoryLetterDots(memoryDumps){var memoryColorId=tr.ui.b.getColorIdForReservedName('memory_dump');return memoryDumps.map(function(memoryDump){return new tr.ui.tracks.LetterDot(memoryDump,'M',memoryColorId,memoryDump.start);});}
-function buildGlobalUsedMemoryChartSeries(globalMemoryDumps){var containsVmRegions=globalMemoryDumps.some(function(globalDump){for(var pid in globalDump.processMemoryDumps)
-if(globalDump.processMemoryDumps[pid].mostRecentVmRegions)
-return true;return false;});if(!containsVmRegions)
-return undefined;var pidToProcess={};globalMemoryDumps.forEach(function(globalDump){tr.b.iterItems(globalDump.processMemoryDumps,function(pid,processDump){pidToProcess[pid]=processDump.process;});});var pidToPoints={};tr.b.iterItems(pidToProcess,function(pid,process){pidToPoints[pid]=[];});globalMemoryDumps.forEach(function(globalDump){var pssBase=0;tr.b.iterItems(pidToPoints,function(pid,points){var processMemoryDump=globalDump.processMemoryDumps[pid];var pss;if(processMemoryDump===unde [...]
-var cumulativePss=pssBase+pss;points.push(new tr.ui.tracks.ChartPoint(globalDump,globalDump.start,cumulativePss,pssBase));pssBase=cumulativePss;});});var axis=new tr.ui.tracks.ChartAxis(0);var series=[];tr.b.iterItems(pidToPoints,function(pid,points){var process=pidToProcess[pid];var colorId=tr.ui.b.getColorIdForGeneralPurposeString(process.userFriendlyName);var renderingConfig={chartType:tr.ui.tracks.ChartSeriesType.AREA,colorId:colorId,backgroundOpacity:0.8};series.push(new tr.ui.track [...]
-function buildProcessAllocatedMemoryChartSeries(processMemoryDumps){return buildAllocatedMemoryChartSeries(processMemoryDumps,getProcessMemoryDumpAllocatorSizes);}
-function buildGlobalAllocatedMemoryChartSeries(globalMemoryDumps){return buildAllocatedMemoryChartSeries(globalMemoryDumps,getGlobalMemoryDumpAllocatorSizes);}
-return{buildMemoryLetterDots:buildMemoryLetterDots,buildGlobalUsedMemoryChartSeries:buildGlobalUsedMemoryChartSeries,buildProcessAllocatedMemoryChartSeries:buildProcessAllocatedMemoryChartSeries,buildGlobalAllocatedMemoryChartSeries:buildGlobalAllocatedMemoryChartSeries};});'use strict';tr.exportTo('tr.ui.tracks',function(){var USED_MEMORY_TRACK_HEIGHT=50;var ALLOCATED_MEMORY_TRACK_HEIGHT=50;var GlobalMemoryDumpTrack=tr.ui.b.define('global-memory-dump-track',tr.ui.tracks.ContainerTrack); [...]
-return;this.appendDumpDotsTrack_();this.appendUsedMemoryTrack_();this.appendAllocatedMemoryTrack_();},appendDumpDotsTrack_:function(){var items=tr.ui.tracks.buildMemoryLetterDots(this.memoryDumps_);if(!items)
-return;var track=new tr.ui.tracks.LetterDotTrack(this.viewport);track.heading='Memory Dumps';track.items=items;this.appendChild(track);},appendUsedMemoryTrack_:function(){var series=tr.ui.tracks.buildGlobalUsedMemoryChartSeries(this.memoryDumps_);if(!series)
-return;var track=new tr.ui.tracks.ChartTrack(this.viewport);track.heading='Used memory (per process)';track.height=USED_MEMORY_TRACK_HEIGHT+'px';track.series=series;track.autoSetAllAxes({expandMax:true});this.appendChild(track);},appendAllocatedMemoryTrack_:function(){var series=tr.ui.tracks.buildGlobalAllocatedMemoryChartSeries(this.memoryDumps_);if(!series)
-return;var track=new tr.ui.tracks.ChartTrack(this.viewport);track.heading='Allocated memory (per allocator)';track.height=ALLOCATED_MEMORY_TRACK_HEIGHT+'px';track.series=series;track.autoSetAllAxes({expandMax:true});this.appendChild(track);}};return{GlobalMemoryDumpTrack:GlobalMemoryDumpTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ALLOCATED_MEMORY_TRACK_HEIGHT=50;var ProcessMemoryDumpTrack=tr.ui.b.define('process-memory-dump-track',tr.ui.tracks.ContainerTrack);Process [...]
-return;this.appendAllocatedMemoryTrack_();},appendAllocatedMemoryTrack_:function(){var series=tr.ui.tracks.buildProcessAllocatedMemoryChartSeries(this.memoryDumps_);if(!series)
-return;var track=new tr.ui.tracks.ChartTrack(this.viewport);track.heading='Allocated memory (per allocator)';track.height=ALLOCATED_MEMORY_TRACK_HEIGHT+'px';track.series=series;track.autoSetAllAxes({expandMax:true});this.appendChild(track);}};return{ProcessMemoryDumpTrack:ProcessMemoryDumpTrack};});'use strict';tr.exportTo('tr.ui.tracks',function(){var ProcessTrackBase=tr.ui.tracks.ProcessTrackBase;var ProcessTrack=tr.ui.b.define('process-track',ProcessTrackBase);ProcessTrack.prototype={ [...]
-break;var ctx=this.context();var pixelRatio=window.devicePixelRatio||1;var bounds=this.getBoundingClientRect();var canvasBounds=ctx.canvas.getBoundingClientRect();ctx.save();ctx.translate(0,pixelRatio*(bounds.top-canvasBounds.top));var dt=this.viewport.currentDisplayTransform;var viewLWorld=dt.xViewToWorld(0);var viewRWorld=dt.xViewToWorld(bounds.width*pixelRatio);tr.ui.b.drawInstantSlicesAsLines(ctx,this.viewport.currentDisplayTransform,viewLWorld,viewRWorld,bounds.height,this.processBa [...]
-tr.ui.tracks.ContainerTrack.prototype.drawTrack.call(this,type);},drawBackground_:function(){var ctx=this.context();var canvasBounds=ctx.canvas.getBoundingClientRect();var pixelRatio=window.devicePixelRatio||1;var draw=false;ctx.fillStyle='#eee';for(var i=0;i<this.children.length;++i){if(!(this.children[i]instanceof tr.ui.tracks.Track)||(this.children[i]instanceof tr.ui.tracks.SpacingTrack))
-continue;draw=!draw;if(!draw)
-continue;var bounds=this.children[i].getBoundingClientRect();ctx.fillRect(0,pixelRatio*(bounds.top-canvasBounds.top),ctx.canvas.width,pixelRatio*bounds.height);}},set process(process){this.processBase=process;},get process(){return this.processBase;},get eventContainer(){return this.process;},addContainersToTrackMap:function(containerToTrackMap){containerToTrackMap.addContainer(this.process,this);this.tracks_.forEach(function(track){track.addContainersToTrackMap(containerToTrackMap);});} [...]
-tr.b.iterateOverIntersectingIntervals(this.processBase.instantEvents,function(x){return x.start;},function(x){return x.duration;},loWX,hiWX,onPickHit.bind(this));tr.ui.tracks.ContainerTrack.prototype.addIntersectingEventsInRangeToSelectionInWorldSpace.apply(this,arguments);},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){this.addClosestInstantEventToSelection(this.processBase.instantEvents,worldX,worldMaxDist,selection);tr.ui.tracks.ContainerTrack.prototype.ad [...]
-return r;return x.start-y.start;});return tr.ui.tracks.AsyncSliceGroupTrack.prototype.buildSubRows_.call({},slices,true);};mrt.addSubTrack_=function(slices){var track=new tr.ui.tracks.SliceTrack(this.viewport);track.slices=slices;this.appendChild(track);return track;};mrt.setItemsToGroup(model.interaction_records,{guid:tr.b.GUID.allocate(),model:model,getSettingsKey:function(){return undefined;}});return mrt;}
-var SelectionState=tr.model.SelectionState;var EventPresenter=tr.ui.b.EventPresenter;var ModelTrack=tr.ui.b.define('model-track',tr.ui.tracks.ContainerTrack);ModelTrack.prototype={__proto__:tr.ui.tracks.ContainerTrack.prototype,decorate:function(viewport){tr.ui.tracks.ContainerTrack.prototype.decorate.call(this,viewport);this.classList.add('model-track');var typeInfos=tr.ui.tracks.Highlighter.getAllRegisteredTypeInfos();this.highlighters_=typeInfos.map(function(typeInfo){return new typeI [...]
-return;if(this.upperMode_)
-this.updateContentsForUpperMode_();else
-this.updateContentsForLowerMode_();},updateContentsForUpperMode_:function(){},updateContentsForLowerMode_:function(){if(this.model_.interaction_records.length){var mrt=new HackyMultiRowTrack(this.viewport_,this.model_);this.appendChild(mrt);}
-if(this.model_.alerts.length){var at=new tr.ui.tracks.AlertTrack(this.viewport_);at.alerts=this.model_.alerts;this.appendChild(at);}
-if(this.model_.globalMemoryDumps.length){var gmdt=new tr.ui.tracks.GlobalMemoryDumpTrack(this.viewport_);gmdt.memoryDumps=this.model_.globalMemoryDumps;this.appendChild(gmdt);}
-this.appendKernelTrack_();var processes=this.model_.getAllProcesses();processes.sort(tr.model.Process.compare);for(var i=0;i<processes.length;++i){var process=processes[i];var track=new tr.ui.tracks.ProcessTrack(this.viewport);track.process=process;if(!track.hasVisibleContent)
-continue;this.appendChild(track);}
-this.viewport_.rebuildEventToTrackMap();this.viewport_.rebuildContainerToTrackMap();for(var i=0;i<this.highlighters_.length;i++){this.highlighters_[i].processModel(this.model_);}
-this.updateAnnotations_();},updateAnnotations_:function(){this.annotationViews_=[];var annotations=this.model_.getAllAnnotations();for(var i=0;i<annotations.length;i++){this.annotationViews_.push(annotations[i].getOrCreateView(this.viewport_));}
-this.invalidateDrawingContainer();},addEventsToTrackMap:function(eventToTrackMap){if(!this.model_)
-return;var tracks=this.children;for(var i=0;i<tracks.length;++i)
-tracks[i].addEventsToTrackMap(eventToTrackMap);if(this.instantEvents===undefined)
-return;var vp=this.viewport_;this.instantEvents.forEach(function(ev){eventToTrackMap.addEvent(ev,this);}.bind(this));},addContainersToTrackMap:function(containerToTrackMap){var tracks=this.children;for(var i=0;i<tracks.length;++i)
-tracks[i].addContainersToTrackMap(containerToTrackMap);},appendKernelTrack_:function(){var kernel=this.model.kernel;var track=new tr.ui.tracks.KernelTrack(this.viewport);track.kernel=this.model.kernel;if(!track.hasVisibleContent)
-return;this.appendChild(track);},drawTrack:function(type){var ctx=this.context();if(!this.model_)
-return;var pixelRatio=window.devicePixelRatio||1;var bounds=this.getBoundingClientRect();var canvasBounds=ctx.canvas.getBoundingClientRect();ctx.save();ctx.translate(0,pixelRatio*(bounds.top-canvasBounds.top));var dt=this.viewport.currentDisplayTransform;var viewLWorld=dt.xViewToWorld(0);var viewRWorld=dt.xViewToWorld(bounds.width*pixelRatio);switch(type){case tr.ui.tracks.DrawType.GRID:this.viewport.drawMajorMarkLines(ctx);ctx.restore();return;case tr.ui.tracks.DrawType.FLOW_ARROWS:if(t [...]
-this.drawFlowArrows_(viewLWorld,viewRWorld);ctx.restore();return;case tr.ui.tracks.DrawType.INSTANT_EVENT:if(!this.model_.instantEvents||this.model_.instantEvents.length===0)
-break;tr.ui.b.drawInstantSlicesAsLines(ctx,this.viewport.currentDisplayTransform,viewLWorld,viewRWorld,bounds.height,this.model_.instantEvents,4);break;case tr.ui.tracks.DrawType.MARKERS:if(!this.viewport.interestRange.isEmpty){this.viewport.interestRange.draw(ctx,viewLWorld,viewRWorld);this.viewport.interestRange.drawIndicators(ctx,viewLWorld,viewRWorld);}
-ctx.restore();return;case tr.ui.tracks.DrawType.HIGHLIGHTS:for(var i=0;i<this.highlighters_.length;i++){this.highlighters_[i].drawHighlight(ctx,dt,viewLWorld,viewRWorld,bounds.height);}
-ctx.restore();return;case tr.ui.tracks.DrawType.ANNOTATIONS:for(var i=0;i<this.annotationViews_.length;i++){this.annotationViews_[i].draw(ctx);}
-ctx.restore();return;}
-ctx.restore();tr.ui.tracks.ContainerTrack.prototype.drawTrack.call(this,type);},drawFlowArrows_:function(viewLWorld,viewRWorld){var ctx=this.context();var dt=this.viewport.currentDisplayTransform;dt.applyTransformToCanvas(ctx);var pixWidth=dt.xViewVectorToWorld(1);ctx.strokeStyle='rgba(0, 0, 0, 0.4)';ctx.fillStyle='rgba(0, 0, 0, 0.4)';ctx.lineWidth=pixWidth>1.0?1:pixWidth;var events=this.model_.flowIntervalTree.findIntersection(viewLWorld,viewRWorld);var onlyHighlighted=!this.viewport.sh [...]
-continue;this.drawFlowArrow_(ctx,events[i],canvasBounds,pixWidth);}},drawFlowArrow_:function(ctx,flowEvent,canvasBounds,pixWidth){var pixelRatio=window.devicePixelRatio||1;var startTrack=this.viewport.trackForEvent(flowEvent.startSlice);var endTrack=this.viewport.trackForEvent(flowEvent.endSlice);if(startTrack===undefined||endTrack===undefined)
-return;var startBounds=startTrack.getBoundingClientRect();var endBounds=endTrack.getBoundingClientRect();if(flowEvent.selectionState==SelectionState.SELECTED){ctx.shadowBlur=1;ctx.shadowColor='red';ctx.shadowOffsety=2;ctx.strokeStyle='red';}else if(flowEvent.selectionState==SelectionState.HIGHLIGHTED){ctx.shadowBlur=1;ctx.shadowColor='red';ctx.shadowOffsety=2;ctx.strokeStyle='red';}else if(flowEvent.selectionState==SelectionState.DIMMED){ctx.shadowBlur=0;ctx.shadowOffsetX=0;ctx.strokeSty [...]
-var startSize=startBounds.left+startBounds.top+
-startBounds.bottom+startBounds.right;var endSize=endBounds.left+endBounds.top+
-endBounds.bottom+endBounds.right;if(startSize===0&&endSize===0)
-return;var startY=this.calculateTrackY_(startTrack,canvasBounds);var endY=this.calculateTrackY_(endTrack,canvasBounds);var pixelStartY=pixelRatio*startY;var pixelEndY=pixelRatio*endY;var half=(flowEvent.end-flowEvent.start)/2;ctx.beginPath();ctx.moveTo(flowEvent.start,pixelStartY);ctx.bezierCurveTo(flowEvent.start+half,pixelStartY,flowEvent.start+half,pixelEndY,flowEvent.end,pixelEndY);ctx.stroke();var arrowWidth=5*pixWidth*pixelRatio;var distance=flowEvent.end-flowEvent.start;if(distanc [...]
-return;var tipX=flowEvent.end;var tipY=pixelEndY;var arrowHeight=(endBounds.height/4)*pixelRatio;tr.ui.b.drawTriangle(ctx,tipX,tipY,tipX-arrowWidth,tipY-arrowHeight,tipX-arrowWidth,tipY+arrowHeight);ctx.fill();},calculateTrackY_:function(track,canvasBounds){var bounds=track.getBoundingClientRect();var size=bounds.left+bounds.top+bounds.bottom+bounds.right;if(size===0)
-return this.calculateTrackY_(track.parentNode,canvasBounds);return bounds.top-canvasBounds.top+(bounds.height/2);},addIntersectingEventsInRangeToSelectionInWorldSpace:function(loWX,hiWX,viewPixWidthWorld,selection){function onPickHit(instantEvent){selection.push(instantEvent);}
-tr.b.iterateOverIntersectingIntervals(this.model_.instantEvents,function(x){return x.start;},function(x){return x.duration;},loWX,hiWX,onPickHit.bind(this));tr.ui.tracks.ContainerTrack.prototype.addIntersectingEventsInRangeToSelectionInWorldSpace.apply(this,arguments);},addClosestEventToSelection:function(worldX,worldMaxDist,loY,hiY,selection){this.addClosestInstantEventToSelection(this.model_.instantEvents,worldX,worldMaxDist,selection);tr.ui.tracks.ContainerTrack.prototype.addClosestEv [...]
-RulerTrack.prototype={__proto__:tr.ui.tracks.HeadingTrack.prototype,decorate:function(viewport){tr.ui.tracks.HeadingTrack.prototype.decorate.call(this,viewport);this.classList.add('ruler-track');this.strings_secs_=[];this.strings_msecs_=[];this.strings_usecs_=[];this.strings_nsecs_=[];this.viewportChange_=this.viewportChange_.bind(this);viewport.addEventListener('change',this.viewportChange_);},detach:function(){tr.ui.tracks.HeadingTrack.prototype.detach.call(this);this.viewport.removeEv [...]
-this.classList.remove('tall-mode');else
-this.classList.add('tall-mode');},draw:function(type,viewLWorld,viewRWorld){switch(type){case tr.ui.tracks.DrawType.GRID:this.drawGrid_(viewLWorld,viewRWorld);break;case tr.ui.tracks.DrawType.MARKERS:if(!this.viewport.interestRange.isEmpty)
-this.viewport.interestRange.draw(this.context(),viewLWorld,viewRWorld);break;}},drawGrid_:function(viewLWorld,viewRWorld){var ctx=this.context();var pixelRatio=window.devicePixelRatio||1;var canvasBounds=ctx.canvas.getBoundingClientRect();var trackBounds=this.getBoundingClientRect();var width=canvasBounds.width*pixelRatio;var height=trackBounds.height*pixelRatio;var hasInterestRange=!this.viewport.interestRange.isEmpty;var rulerHeight=hasInterestRange?(height*2)/5:height;var vp=this.view [...]
-continue;majorMarkDistanceWorld=conservativeGuess/divisors[i-1];break;}
-var unit;var unitDivisor;var tickLabels=undefined;if(majorMarkDistanceWorld<0.0001){unit='ns';unitDivisor=0.000001;tickLabels=this.strings_nsecs_;}else if(majorMarkDistanceWorld<0.1){unit='us';unitDivisor=0.001;tickLabels=this.strings_usecs_;}else if(majorMarkDistanceWorld<100){unit='ms';unitDivisor=1;tickLabels=this.strings_msecs_;}else{unit='s';unitDivisor=1000;tickLabels=this.strings_secs_;}
-var numTicksPerMajor=5;var minorMarkDistanceWorld=majorMarkDistanceWorld/numTicksPerMajor;var minorMarkDistancePx=dt.xWorldVectorToView(minorMarkDistanceWorld);var firstMajorMark=Math.floor(viewLWorld/majorMarkDistanceWorld)*majorMarkDistanceWorld;var minorTickH=Math.floor(rulerHeight*0.25);ctx.save();var pixelRatio=window.devicePixelRatio||1;ctx.lineWidth=Math.round(pixelRatio);var crispLineCorrection=(ctx.lineWidth%2)/2;ctx.translate(crispLineCorrection,-crispLineCorrection);ctx.fillSt [...]
-tickLabels[roundedUnitValue]=roundedUnitValue+' '+unit;ctx.fillText(tickLabels[roundedUnitValue],curXView+(2*pixelRatio),0);vp.majorMarkPositions.push(curXView);tr.ui.b.drawLine(ctx,curXView,0,curXView,rulerHeight);for(var i=1;i<numTicksPerMajor;++i){var xView=Math.floor(curXView+minorMarkDistancePx*i);tr.ui.b.drawLine(ctx,xView,rulerHeight-minorTickH,xView,rulerHeight);}}
-ctx.strokeStyle='rgb(0, 0, 0)';tr.ui.b.drawLine(ctx,0,height,width,height);ctx.stroke();if(!hasInterestRange)
-return;tr.ui.b.drawLine(ctx,0,rulerHeight,width,rulerHeight);ctx.stroke();var displayDistance;var displayTextColor='rgb(0,0,0)';var arrowSpacing=10*pixelRatio;var arrowColor='rgb(128,121,121)';var arrowPosY=rulerHeight*1.75;var arrowWidthView=3*pixelRatio;var arrowLengthView=10*pixelRatio;var spaceForArrowsView=2*(arrowWidthView+arrowSpacing);ctx.textBaseline='middle';ctx.font=(14*pixelRatio)+'px sans-serif';var textPosY=arrowPosY;var interestRange=vp.interestRange;if(interestRange.range [...]
-textLeftView=markerView-4*pixelRatio-textWidthView;ctx.fillStyle=displayTextColor;ctx.fillText(textToDraw,textLeftView,textPosY);return;}
-var leftMarker=interestRange.min;var rightMarker=interestRange.max;var leftMarkerView=dt.xWorldToView(leftMarker);var rightMarkerView=dt.xWorldToView(rightMarker);var distanceBetweenMarkers=interestRange.range;var distanceBetweenMarkersView=dt.xWorldVectorToView(distanceBetweenMarkers);var positionInMiddleOfMarkersView=leftMarkerView+(distanceBetweenMarkersView/2);if(distanceBetweenMarkers<0.0001){unit='ns';unitDivisor=0.000001;}else if(distanceBetweenMarkers<0.1){unit='us';unitDivisor=0 [...]
-displayDistance=distanceBetweenMarkers/unitDivisor;var roundedDisplayDistance=Math.abs((Math.round(displayDistance*1000)/1000));var textToDraw=roundedDisplayDistance+' '+unit;var textWidthView=ctx.measureText(textToDraw).width;var spaceForArrowsAndTextView=textWidthView+spaceForArrowsView+arrowSpacing;var textLeftView=positionInMiddleOfMarkersView-textWidthView/2;var textRightView=textLeftView+textWidthView;if(spaceForArrowsAndTextView>distanceBetweenMarkersView){textLeftView=rightMarker [...]
-textLeftView=leftMarkerView-2*arrowSpacing-textWidthView;ctx.fillStyle=displayTextColor;ctx.fillText(textToDraw,textLeftView,textPosY);ctx.strokeStyle=arrowColor;ctx.beginPath();tr.ui.b.drawLine(ctx,leftMarkerView,arrowPosY,rightMarkerView,arrowPosY);ctx.stroke();ctx.fillStyle=arrowColor;tr.ui.b.drawArrow(ctx,leftMarkerView-1.5*arrowSpacing,arrowPosY,leftMarkerView,arrowPosY,arrowLengthView,arrowWidthView);tr.ui.b.drawArrow(ctx,rightMarkerView+1.5*arrowSpacing,arrowPosY,rightMarkerView,a [...]
-ctx.strokeStyle=arrowColor;ctx.fillStyle=arrowColor;tr.ui.b.drawArrow(ctx,leftArrowStart,arrowPosY,leftMarkerView,arrowPosY,arrowLengthView,arrowWidthView);tr.ui.b.drawArrow(ctx,rightArrowStart,arrowPosY,rightMarkerView,arrowPosY,arrowLengthView,arrowWidthView);}
-ctx.restore();},addIntersectingEventsInRangeToSelection:function(loVX,hiVX,loY,hiY,selection){},addAllEventsMatchingFilterToSelection:function(filter,selection){}};return{RulerTrack:RulerTrack};});'use strict';tr.exportTo('tr.model',function(){function Annotation(){this.guid_=tr.b.GUID.allocate();this.view_=undefined;};Annotation.fromDictIfPossible=function(args){if(args.typeName===undefined)
-throw new Error('Missing typeName argument');var typeInfo=Annotation.findTypeInfoMatching(function(typeInfo){return typeInfo.metadata.typeName===args.typeName;});if(typeInfo===undefined)
-return undefined;return typeInfo.constructor.fromDict(args);};Annotation.fromDict=function(){throw new Error('Not implemented');}
-Annotation.prototype={get guid(){return this.guid_;},onRemove:function(){},toDict:function(){throw new Error('Not implemented');},getOrCreateView:function(viewport){if(!this.view_)
-this.view_=this.createView_(viewport);return this.view_;},createView_:function(){throw new Error('Not implemented');}};var options=new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);options.mandatoryBaseType=Annotation;tr.b.decorateExtensionRegistry(Annotation,options);Annotation.addEventListener('will-register',function(e){if(!e.typeInfo.constructor.hasOwnProperty('fromDict'))
-throw new Error('Must have fromDict method');if(!e.typeInfo.metadata.typeName)
-throw new Error('Registered Annotations must provide typeName');});return{Annotation:Annotation};});'use strict';tr.exportTo('tr.ui.annotations',function(){function AnnotationView(viewport,annotation){}
-AnnotationView.prototype={draw:function(ctx){throw new Error('Not implemented');}};return{AnnotationView:AnnotationView};});'use strict';tr.exportTo('tr.ui.annotations',function(){function XMarkerAnnotationView(viewport,annotation){this.viewport_=viewport;this.annotation_=annotation;}
-XMarkerAnnotationView.prototype={__proto__:tr.ui.annotations.AnnotationView.prototype,draw:function(ctx){var dt=this.viewport_.currentDisplayTransform;var viewX=dt.xWorldToView(this.annotation_.timestamp);ctx.beginPath();tr.ui.b.drawLine(ctx,viewX,0,viewX,ctx.canvas.height);ctx.strokeStyle=this.annotation_.strokeStyle;ctx.stroke();}};return{XMarkerAnnotationView:XMarkerAnnotationView};});'use strict';tr.exportTo('tr.model',function(){function XMarkerAnnotation(timestamp){tr.model.Annotat [...]
-XMarkerAnnotation.fromDict=function(dict){return new XMarkerAnnotation(dict.args.timestamp);}
-XMarkerAnnotation.prototype={__proto__:tr.model.Annotation.prototype,toDict:function(){return{typeName:'xmarker',args:{timestamp:this.timestamp}};},createView_:function(viewport){return new tr.ui.annotations.XMarkerAnnotationView(viewport,this);}};tr.model.Annotation.register(XMarkerAnnotation,{typeName:'xmarker'});return{XMarkerAnnotation:XMarkerAnnotation};});'use strict';tr.exportTo('tr.ui.b',function(){function KeyEventManager(opt_document){this.document_=opt_document||document;if(Ke [...]
-throw new Error('KeyEventManager is a singleton.');this.onEvent_=this.onEvent_.bind(this);this.document_.addEventListener('keydown',this.onEvent_);this.document_.addEventListener('keypress',this.onEvent_);this.document_.addEventListener('keyup',this.onEvent_);this.listeners_=[];}
-KeyEventManager.instance=undefined;document.head.addEventListener('tr-unittest-will-run',function(){if(KeyEventManager.instance){KeyEventManager.instance.destroy();KeyEventManager.instance=undefined;}
-KeyEventManager.instance=new KeyEventManager();});KeyEventManager.prototype={addListener:function(type,handler,thisArg){if(!thisArg.keyEventManagerGuid_){thisArg.keyEventManagerGuid_=tr.b.GUID.allocate();thisArg.keyEventManagerRefCount_=0;}
-thisArg.classList.add('key-event-manager-target');thisArg.keyEventManagerRefCount_++;var guid=thisArg.keyEventManagerGuid_;this.listeners_.push({guid:guid,type:type,handler:handler});},onEvent_:function(event){var preventDefaultState=undefined;var stopPropagationCalled=false;var oldPreventDefault=event.preventDefault;event.preventDefault=function(){preventDefaultState=false;oldPreventDefault.call(this);};var oldStopPropagation=event.stopPropagation;event.stopPropagation=function(){stopPr [...]
-var listeners=this.listeners_.concat();var type=event.type;var prevented=0;for(var i=0;i<listeners.length;i++){var listener=listeners[i];if(listener.type!==type)
-continue;var thisArg=possibleThisArgsByGUID[listener.guid];if(!thisArg)
-continue;var handler=listener.handler;if(handler.handleEvent)
-prevented|=handler.handleEvent.call(handler,event)===false;else
-prevented|=handler.call(thisArg,event)===false;if(stopPropagationCalled)
-break;}
-return!prevented&&preventDefaultState;},removeListener:function(type,handler,thisArg){if(thisArg.keyEventManagerGuid_===undefined)
-throw new Error('Was not registered with KeyEventManager');if(thisArg.keyEventManagerRefCount_===0)
-throw new Error('No events were registered on the provided thisArg');for(var i=0;i<this.listeners_.length;i++){var listener=this.listeners_[i];if(listener.type==type&&listener.handler==handler&&listener.guid==thisArg.keyEventManagerGuid_){thisArg.keyEventManagerRefCount_--;if(thisArg.keyEventManagerRefCount_===0)
-thisArg.classList.remove('key-event-manager-target');this.listeners_.splice(i,1);return;}}
-throw new Error('Listener not found');},destroy:function(){this.listeners_.splice(0);this.document_.removeEventListener('keydown',this.onEvent_);this.document_.removeEventListener('keypress',this.onEvent_);this.document_.removeEventListener('keyup',this.onEvent_);},dispatchFakeEvent:function(type,args){var e=new KeyboardEvent(type,args);return KeyEventManager.instance.onEvent_.call(undefined,e);}};KeyEventManager.instance=new KeyEventManager();return{KeyEventManager:KeyEventManager};});' [...]
-MouseTracker.prototype={get targetElement(){return this.targetElement_;},set targetElement(targetElement){if(this.targetElement_)
-this.targetElement_.removeEventListener('mousedown',this.onMouseDown_);this.targetElement_=targetElement;if(this.targetElement_)
-this.targetElement_.addEventListener('mousedown',this.onMouseDown_);},onMouseDown_:function(e){if(e.button!==0)
-return true;e=this.remakeEvent_(e,'mouse-tracker-start');this.targetElement_.dispatchEvent(e);document.addEventListener('mousemove',this.onMouseMove_);document.addEventListener('mouseup',this.onMouseUp_);this.targetElement_.addEventListener('blur',this.onMouseUp_);this.savePreviousUserSelect_=document.body.style['-webkit-user-select'];document.body.style['-webkit-user-select']='none';e.preventDefault();return true;},onMouseMove_:function(e){e=this.remakeEvent_(e,'mouse-tracker-move');thi [...]
-opt_mouseUpHandler(e);}
-document.addEventListener('mousemove',mouseMoveHandler);document.addEventListener('mouseup',cleanupAndDispatchToMouseUp);}
-return{MouseTracker:MouseTracker,trackMouseMovesUntilMouseUp:trackMouseMovesUntilMouseUp};});'use strict';tr.exportTo('tr.ui.b',function(){var THIS_DOC=document.currentScript.ownerDocument;var MIN_MOUSE_SELECTION_DISTANCE=4;var MOUSE_SELECTOR_MODE={};MOUSE_SELECTOR_MODE.SELECTION=0x1;MOUSE_SELECTOR_MODE.PANSCAN=0x2;MOUSE_SELECTOR_MODE.ZOOM=0x4;MOUSE_SELECTOR_MODE.TIMING=0x8;MOUSE_SELECTOR_MODE.ROTATE=0x10;MOUSE_SELECTOR_MODE.ALL_MODES=0x1F;var allModeInfo={};allModeInfo[MOUSE_SELECTOR_MO [...]
-this.targetElement_.removeEventListener('mousedown',this.onMouseDown_);this.targetElement_=target;if(this.targetElement_)
-this.targetElement_.addEventListener('mousedown',this.onMouseDown_);},get defaultMode(){return this.defaultMode_;},set defaultMode(defaultMode){this.defaultMode_=defaultMode;},get settingsKey(){return this.settingsKey_;},set settingsKey(settingsKey){this.settingsKey_=settingsKey;if(!this.settingsKey_)
-return;var mode=tr.b.Settings.get(this.settingsKey_+'.mode',undefined);if(allModeInfo[mode]===undefined)
-mode=undefined;if((mode&this.supportedModeMask_)===0)
-mode=undefined;if(!mode)
-mode=this.defaultMode_;this.mode=mode;var pos=tr.b.Settings.get(this.settingsKey_+'.pos',undefined);if(pos)
-this.pos=pos;},get supportedModeMask(){return this.supportedModeMask_;},set supportedModeMask(supportedModeMask){if(this.mode&&(supportedModeMask&this.mode)===0)
-throw new Error('supportedModeMask must include current mode.');function createButtonForMode(mode){var button=document.createElement('div');button.mode=mode;button.title=allModeInfo[mode].title;button.classList.add('tool-button');button.classList.add(allModeInfo[mode].className);return button;}
-this.supportedModeMask_=supportedModeMask;this.buttonsEl_.textContent='';for(var modeName in MOUSE_SELECTOR_MODE){if(modeName=='ALL_MODES')
-continue;var mode=MOUSE_SELECTOR_MODE[modeName];if((this.supportedModeMask_&mode)===0)
-continue;this.buttonsEl_.appendChild(createButtonForMode(mode));}},get mode(){return this.currentMode_;},set mode(newMode){if(newMode!==undefined){if(typeof newMode!=='number')
-throw new Error('Mode must be a number');if((newMode&this.supportedModeMask_)===0)
-throw new Error('Cannot switch to this mode, it is not supported');if(allModeInfo[newMode]===undefined)
-throw new Error('Unrecognized mode');}
-var modeInfo;if(this.currentMode_===newMode)
-return;if(this.currentMode_){modeInfo=allModeInfo[this.currentMode_];var buttonEl=this.buttonsEl_.querySelector('.'+modeInfo.className);if(buttonEl)
-buttonEl.classList.remove('active');if(this.isInteracting_){var mouseEvent=this.createEvent_(allModeInfo[this.mode].eventNames.end);this.dispatchEvent(mouseEvent);}
-tr.b.dispatchSimpleEvent(this,modeInfo.eventNames.exit,true);}
-this.currentMode_=newMode;if(this.currentMode_){modeInfo=allModeInfo[this.currentMode_];var buttonEl=this.buttonsEl_.querySelector('.'+modeInfo.className);if(buttonEl)
-buttonEl.classList.add('active');this.mouseDownPos_.x=this.mousePos_.x;this.mouseDownPos_.y=this.mousePos_.y;if(!this.isInAlternativeMode_)
-tr.b.dispatchSimpleEvent(this,modeInfo.eventNames.enter,true);if(this.isInteracting_){var mouseEvent=this.createEvent_(allModeInfo[this.mode].eventNames.begin);this.dispatchEvent(mouseEvent);}}
-if(this.settingsKey_&&!this.isInAlternativeMode_)
-tr.b.Settings.set(this.settingsKey_+'.mode',this.mode);},setKeyCodeForMode:function(mode,keyCode){if((mode&this.supportedModeMask_)===0)
-throw new Error('Mode not supported');this.modeToKeyCodeMap_[mode]=keyCode;if(!this.buttonsEl_)
-return;var modeInfo=allModeInfo[mode];var buttonEl=this.buttonsEl_.querySelector('.'+modeInfo.className);if(buttonEl){buttonEl.title=modeInfo.title+' ('+String.fromCharCode(keyCode)+')';}},setKeyCodeCondition:function(callback){this.keyCodeCondition=callback;},setCurrentMousePosFromEvent_:function(e){this.mousePos_.x=e.clientX;this.mousePos_.y=e.clientY;},createEvent_:function(eventName,sourceEvent){var event=new tr.b.Event(eventName,true);event.clientX=this.mousePos_.x;event.clientY=thi [...]
-sourceEvent.preventDefault();};event.stopPropagation=function(){sourceEvent.stopPropagation();};event.stopImmediatePropagation=function(){throw new Error('Not implemented');};return event;},onMouseDown_:function(e){if(e.button!==0)
-return;this.setCurrentMousePosFromEvent_(e);var mouseEvent=this.createEvent_(allModeInfo[this.mode].eventNames.begin,e);this.dispatchEvent(mouseEvent);this.isInteracting_=true;this.isClick_=true;tr.ui.b.trackMouseMovesUntilMouseUp(this.onMouseMove_,this.onMouseUp_);},onMouseMove_:function(e){this.setCurrentMousePosFromEvent_(e);var mouseEvent=this.createEvent_(allModeInfo[this.mode].eventNames.update,e);this.dispatchEvent(mouseEvent);if(this.isInteracting_)
-this.checkIsClick_(e);},onMouseUp_:function(e){if(e.button!==0)
-return;var mouseEvent=this.createEvent_(allModeInfo[this.mode].eventNames.end,e);mouseEvent.isClick=this.isClick_;this.dispatchEvent(mouseEvent);if(this.isClick_&&!mouseEvent.didPreventDefault)
-this.dispatchClickEvents_(e);this.isInteracting_=false;this.updateAlternativeModeState_(e);},onButtonMouseDown_:function(e){e.preventDefault();e.stopImmediatePropagation();},onButtonMouseUp_:function(e){e.preventDefault();e.stopImmediatePropagation();},onButtonPress_:function(e){this.modeBeforeAlternativeModeActivated_=undefined;this.mode=e.target.mode;e.preventDefault();},onKeyDown_:function(e){if(e.keyCode===' '.charCodeAt(0))
-this.spacePressed_=true;this.updateAlternativeModeState_(e);},onKeyUp_:function(e){if(e.keyCode===' '.charCodeAt(0))
-this.spacePressed_=false;if(this.keyCodeCondition!=undefined&&!this.keyCodeCondition()){return;}
-var didHandleKey=false;tr.b.iterItems(this.modeToKeyCodeMap_,function(modeStr,keyCode){if(e.keyCode===keyCode){this.modeBeforeAlternativeModeActivated_=undefined;var mode=parseInt(modeStr);this.mode=mode;didHandleKey=true;}},this);if(didHandleKey){e.preventDefault();e.stopPropagation();return;}
-this.updateAlternativeModeState_(e);},updateAlternativeModeState_:function(e){var shiftPressed=e.shiftKey;var spacePressed=this.spacePressed_;var cmdOrCtrlPressed=(tr.isMac&&e.metaKey)||(!tr.isMac&&e.ctrlKey);var smm=this.supportedModeMask_;var newMode;var isNewModeAnAlternativeMode=false;if(shiftPressed&&(this.modifierToModeMap_[MODIFIER.SHIFT]&smm)!==0){newMode=this.modifierToModeMap_[MODIFIER.SHIFT];isNewModeAnAlternativeMode=true;}else if(spacePressed&&(this.modifierToModeMap_[MODIFI [...]
-if(this.mode===newMode||newMode===undefined)
-return;if(isNewModeAnAlternativeMode)
-this.modeBeforeAlternativeModeActivated_=this.mode;this.mode=newMode;},get isInAlternativeMode_(){return!!this.modeBeforeAlternativeModeActivated_;},setModifierForAlternateMode:function(mode,modifier){this.modifierToModeMap_[modifier]=mode;},get pos(){return{x:parseInt(this.style.left),y:parseInt(this.style.top)};},set pos(pos){pos=this.constrainPositionToBounds_(pos);this.style.left=pos.x+'px';this.style.top=pos.y+'px';if(this.settingsKey_)
-tr.b.Settings.set(this.settingsKey_+'.pos',this.pos);},constrainPositionToBounds_:function(pos){var parent=this.offsetParent||document.body;var parentRect=tr.ui.b.windowRectForElement(parent);var top=0;var bottom=parentRect.height-this.offsetHeight;var left=0;var right=parentRect.width-this.offsetWidth;var res={};res.x=Math.max(pos.x,left);res.x=Math.min(res.x,right);res.y=Math.max(pos.y,top);res.y=Math.min(res.y,bottom);return res;},onDragHandleMouseDown_:function(e){e.preventDefault(); [...]
-return;var deltaX=this.mousePos_.x-this.mouseDownPos_.x;var deltaY=this.mousePos_.y-this.mouseDownPos_.y;var minDist=MIN_MOUSE_SELECTION_DISTANCE;if(deltaX*deltaX+deltaY*deltaY>minDist*minDist)
-this.isClick_=false;},dispatchClickEvents_:function(e){if(!this.isClick_)
-return;var eventNames=allModeInfo[MOUSE_SELECTOR_MODE.SELECTION].eventNames;var mouseEvent=this.createEvent_(eventNames.begin);this.dispatchEvent(mouseEvent);mouseEvent=this.createEvent_(eventNames.end);this.dispatchEvent(mouseEvent);}};return{MIN_MOUSE_SELECTION_DISTANCE:MIN_MOUSE_SELECTION_DISTANCE,MouseModeSelector:MouseModeSelector,MOUSE_SELECTOR_MODE:MOUSE_SELECTOR_MODE,MODIFIER:MODIFIER};});'use strict';tr.exportTo('tr.ui',function(){var Selection=tr.c.Selection;var SelectionState= [...]
-results.left=Math.max(r1.left,r2.left);results.top=Math.max(r1.top,r2.top);results.right=Math.min(r1.right,r2.right);results.bottom=Math.min(r1.bottom,r2.bottom);results.width=(results.right-results.left);results.height=(results.bottom-results.top);return results;}
-var TimelineTrackView=tr.ui.b.define('div');TimelineTrackView.prototype={__proto__:HTMLDivElement.prototype,model_:null,decorate:function(timelineView){this.classList.add('timeline-track-view');this.timelineView_=timelineView;this.viewport_=new Viewport(this);this.viewportDisplayTransformAtMouseDown_=null;this.selectionController_=undefined;this.rulerTrackContainer_=new tr.ui.tracks.DrawingContainer(this.viewport_);this.appendChild(this.rulerTrackContainer_);this.rulerTrackContainer_.inv [...]
-this.boundListeners_=[];var boundFunc=func.bind(target);this.boundListeners_.push({object:object,event:event,boundFunc:boundFunc});object.addEventListener(event,boundFunc);},initMouseModeSelector:function(){this.mouseModeSelector_=new tr.ui.b.MouseModeSelector(this);this.appendChild(this.mouseModeSelector_);this.mouseModeSelector_.addEventListener('beginpan',this.onBeginPanScan_.bind(this));this.mouseModeSelector_.addEventListener('updatepan',this.onUpdatePanScan_.bind(this));this.mouseM [...]
-this.selectionController_=selectionController;if(this.selectionController_){this.selectionController_.addEventListener('change',this.onSelectionChanged_);}},onSelectionChanged_:function(){this.showHintText_('Press \'m\' to mark current selection');this.viewport_.dispatchChangeEvent();},set selection(selection){throw new Error('DO NOT CALL THIS');},set highlight(highlight){throw new Error('DO NOT CALL THIS');},detach:function(){this.modelTrack_.detach();this.upperModelTrack_.detach();for( [...]
-this.boundListeners_=undefined;this.viewport_.detach();},get viewport(){return this.viewport_;},get model(){return this.model_;},set model(model){if(!model)
-throw new Error('Model cannot be null');var modelInstanceChanged=this.model_!==model;this.model_=model;this.modelTrack_.model=model;this.upperModelTrack_.model=model;if(modelInstanceChanged)
-this.viewport_.setWhenPossible(this.setInitialViewport_.bind(this));tr.b.setPropertyAndDispatchChange(this,'model',model);},get hasVisibleContent(){return this.modelTrack_.hasVisibleContent||this.upperModelTrack_.hasVisibleContent;},setInitialViewport_:function(){this.modelTrackContainer_.updateCanvasSizeIfNeeded_();var w=this.modelTrackContainer_.canvas.width;var min;var range;if(this.model_.bounds.isEmpty){min=0;range=1000;}else if(this.model_.bounds.range===0){min=this.model_.bounds.m [...]
-var boost=range*0.15;tempDisplayTransform.set(this.viewport_.currentDisplayTransform);tempDisplayTransform.xSetWorldBounds(min-boost,min+range+boost,w);this.viewport_.setDisplayTransformImmediately(tempDisplayTransform);},addAllEventsMatchingFilterToSelectionAsTask:function(filter,selection){var modelTrack=this.modelTrack_;var firstT=modelTrack.addAllEventsMatchingFilterToSelectionAsTask(filter,selection);var lastT=firstT.after(function(){this.upperModelTrack_.addAllEventsMatchingFilterT [...]
-return this.focusElement_;return this.parentElement;},set focusElement(value){this.focusElement_=value;},get listenToKeys_(){if(!this.viewport_.isAttachedToDocumentOrInTestMode)
-return false;if(document.activeElement instanceof TracingFindControl)
-return false;if(document.activeElement instanceof TracingScriptingControl)
-return false;if(!this.focusElement_)
-return true;if(this.focusElement.tabIndex>=0){if(document.activeElement==this.focusElement)
-return true;return tr.ui.b.elementIsChildOf(document.activeElement,this.focusElement);}
-return true;},onMouseMove_:function(e){if(this.isZooming_)
-return;this.storeLastMousePos_(e);},onTouchStart_:function(e){this.storeLastTouchPositions_(e);this.focusElements_();},onTouchMove_:function(e){e.preventDefault();this.onUpdateTransformForTouch_(e);},onTouchEnd_:function(e){this.storeLastTouchPositions_(e);this.focusElements_();},onKeypress_:function(e){var vp=this.viewport_;if(!this.listenToKeys_)
-return;if(document.activeElement.nodeName=='INPUT')
-return;var viewWidth=this.modelTrackContainer_.canvas.clientWidth;var curMouseV,curCenterW;switch(e.keyCode){case 119:case 44:this.zoomBy_(1.5,true);break;case 115:case 111:this.zoomBy_(1/1.5,true);break;case 103:this.onGridToggle_(true);break;case 71:this.onGridToggle_(false);break;case 87:case 60:this.zoomBy_(10,true);break;case 83:case 79:this.zoomBy_(1/10,true);break;case 97:this.queueSmoothPan_(viewWidth*0.3,0);break;case 100:case 101:this.queueSmoothPan_(viewWidth*-0.3,0);break;cas [...]
-return;var sel;var vp=this.viewport_;var viewWidth=this.modelTrackContainer_.canvas.clientWidth;switch(e.keyCode){case 37:sel=this.selectionController_.selection.getShiftedSelection(this.viewport,-1);if(sel){this.selectionController.changeSelectionFromTimeline(sel);this.panToSelection();e.preventDefault();}else{this.queueSmoothPan_(viewWidth*0.3,0);}
-break;case 39:sel=this.selectionController_.selection.getShiftedSelection(this.viewport,1);if(sel){this.selectionController.changeSelectionFromTimeline(sel);this.panToSelection();e.preventDefault();}else{this.queueSmoothPan_(-viewWidth*0.3,0);}
-break;case 9:if(this.focusElement.tabIndex==-1){if(e.shiftKey)
-this.selectPrevious_(e);else
-this.selectNext_(e);e.preventDefault();}
-break;}},onKeyup_:function(e){if(!this.listenToKeys_)
-return;if(!e.shiftKey){if(this.dragBeginEvent_){this.setDragBoxPosition_(this.dragBoxXStart_,this.dragBoxYStart_,this.dragBoxXEnd_,this.dragBoxYEnd_);}}},onDblClick_:function(e){if(this.mouseModeSelector_.mode!==tr.ui.b.MOUSE_SELECTOR_MODE.SELECTION)
-return;var curSelection=this.selectionController_.selection;if(!curSelection.length||!curSelection[0].title)
-return;var selection=new Selection();var filter=new tr.c.ExactTitleFilter(curSelection[0].title);this.modelTrack_.addAllEventsMatchingFilterToSelection(filter,selection);this.selectionController.changeSelectionFromTimeline(selection);},onMouseWheel_:function(e){if(!e.altKey)
-return;var delta=e.wheelDelta/120;var zoomScale=Math.pow(1.5,delta);this.zoomBy_(zoomScale);e.preventDefault();},onMouseDown_:function(e){if(this.mouseModeSelector_.mode!==tr.ui.b.MOUSE_SELECTOR_MODE.SELECTION)
-return;if(e.target!==this.rulerTrack_)
-return;this.dragBeginEvent_=undefined;if(this.xNavStringMarker_){this.model.removeAnnotation(this.xNavStringMarker_);this.xNavStringMarker_=undefined;}
-var dt=this.viewport_.currentDisplayTransform;tr.ui.b.trackMouseMovesUntilMouseUp(function(e){if(e.target===this.rulerTrack_)
-return;var relativePosition=this.extractRelativeMousePosition_(e);var loc=tr.ui.b.Location.fromViewCoordinates(this.viewport_,relativePosition.x,relativePosition.y);if(!loc)
-return;if(this.guideLineAnnotation_===undefined){this.guideLineAnnotation_=new tr.model.XMarkerAnnotation(loc.xWorld);this.model.addAnnotation(this.guideLineAnnotation_);}else{this.guideLineAnnotation_.timestamp=loc.xWorld;this.modelTrackContainer_.invalidate();}
-var state=new tr.ui.b.UIState(loc,this.viewport_.currentDisplayTransform.scaleX);this.timelineView_.setFindCtlText(state.toUserFriendlyString(this.viewport_));}.bind(this));},queueSmoothPan_:function(viewDeltaX,deltaY){var deltaX=this.viewport_.currentDisplayTransform.xViewVectorToWorld(viewDeltaX);var animation=new tr.ui.TimelineDisplayTransformPanAnimation(deltaX,deltaY);this.viewport_.queueDisplayTransformAnimation(animation);},zoomBy_:function(scale,smooth){if(scale<=0){return;}
-smooth=!!smooth;var vp=this.viewport_;var viewWidth=this.modelTrackContainer_.canvas.clientWidth;var pixelRatio=window.devicePixelRatio||1;var goalFocalPointXView=this.lastMouseViewPos_.x*pixelRatio;var goalFocalPointXWorld=vp.currentDisplayTransform.xViewToWorld(goalFocalPointXView);if(smooth){var animation=new tr.ui.TimelineDisplayTransformZoomToAnimation(goalFocalPointXWorld,goalFocalPointXView,vp.currentDisplayTransform.panY,scale);vp.queueDisplayTransformAnimation(animation);}else{t [...]
-return;var bounds=this.selectionController.selectionOfInterest.bounds;if(!bounds.range)
-return;var worldCenter=bounds.center;var viewCenter=this.modelTrackContainer_.canvas.width/2;var adjustedWorldRange=bounds.range*1.25;var newScale=this.modelTrackContainer_.canvas.width/adjustedWorldRange;var zoomInRatio=newScale/this.viewport_.currentDisplayTransform.scaleX;var animation=new tr.ui.TimelineDisplayTransformZoomToAnimation(worldCenter,viewCenter,this.viewport_.currentDisplayTransform.panY,zoomInRatio);this.viewport_.queueDisplayTransformAnimation(animation);},panToSelectio [...]
-return;var bounds=this.selectionController.selectionOfInterest.bounds;var worldCenter=bounds.center;var viewWidth=this.modelTrackContainer_.canvas.width;var dt=this.viewport_.currentDisplayTransform;if(false&&!bounds.range){if(dt.xWorldToView(bounds.center)<0||dt.xWorldToView(bounds.center)>viewWidth){tempDisplayTransform.set(dt);tempDisplayTransform.xPanWorldPosToViewPos(worldCenter,'center',viewWidth);var deltaX=tempDisplayTransform.panX-dt.panX;var animation=new tr.ui.TimelineDisplayT [...]
-return;}
-tempDisplayTransform.set(dt);tempDisplayTransform.xPanWorldBoundsIntoView(bounds.min,bounds.max,viewWidth);var deltaX=tempDisplayTransform.panX-dt.panX;var animation=new tr.ui.TimelineDisplayTransformPanAnimation(deltaX,0);this.viewport_.queueDisplayTransformAnimation(animation);},navToPosition:function(uiState,showNavLine){var location=uiState.location;var scaleX=uiState.scaleX;var track=location.getContainingTrack(this.viewport_);var worldCenter=location.xWorld;var viewCenter=this.mode [...]
-return;if(this.xNavStringMarker_)
-this.model.removeAnnotation(this.xNavStringMarker_);this.xNavStringMarker_=new tr.model.XMarkerAnnotation(worldCenter);this.model.addAnnotation(this.xNavStringMarker_);},setCurrentSelectionAsInterestRange_:function(){var selectionBounds=this.selectionController_.selection.bounds;if(selectionBounds.empty){this.viewport_.interestRange.reset();return;}
-if(this.viewport_.interestRange.min==selectionBounds.min&&this.viewport_.interestRange.max==selectionBounds.max)
-this.viewport_.interestRange.reset();else
-this.viewport_.interestRange.set(selectionBounds);},toggleHighDetails_:function(){this.viewport_.highDetails=!this.viewport_.highDetails;},hideDragBox_:function(){this.dragBox_.style.left='-1000px';this.dragBox_.style.top='-1000px';this.dragBox_.style.width=0;this.dragBox_.style.height=0;},setDragBoxPosition_:function(xStart,yStart,xEnd,yEnd){var loY=Math.min(yStart,yEnd);var hiY=Math.max(yStart,yEnd);var loX=Math.min(xStart,xEnd);var hiX=Math.max(xStart,xEnd);var modelTrackRect=this.mod [...]
-var numIntervalsSinceStart=Math.ceil((tb-this.model_.bounds.min)/this.viewport_.gridStep_);this.viewport_.gridEnabled=true;this.viewport_.gridSide=left;this.viewport_.gridInitialTimebase=tb;this.viewport_.gridTimebase=tb-
-(numIntervalsSinceStart+1)*this.viewport_.gridStep_;},storeLastMousePos_:function(e){this.lastMouseViewPos_=this.extractRelativeMousePosition_(e);},storeLastTouchPositions_:function(e){this.lastTouchViewPositions_=this.extractRelativeTouchPositions_(e);},extractRelativeMousePosition_:function(e){var canv=this.modelTrackContainer_.canvas;return{x:e.clientX-canv.offsetLeft,y:e.clientY-canv.offsetTop};},extractRelativeTouchPositions_:function(e){var canv=this.modelTrackContainer_.canvas;var [...]
-return touches;},storeInitialMouseDownPos_:function(e){var position=this.extractRelativeMousePosition_(e);this.mouseViewPosAtMouseDown_.x=position.x;this.mouseViewPosAtMouseDown_.y=position.y;},focusElements_:function(){if(document.activeElement)
-document.activeElement.blur();if(this.focusElement.tabIndex>=0)
-this.focusElement.focus();},storeInitialInteractionPositionsAndFocus_:function(e){this.storeInitialMouseDownPos_(e);this.storeLastMousePos_(e);this.focusElements_();},onBeginPanScan_:function(e){var vp=this.viewport_;this.viewportDisplayTransformAtMouseDown_=vp.currentDisplayTransform.clone();this.isPanningAndScanning_=true;this.storeInitialInteractionPositionsAndFocus_(e);e.preventDefault();},onUpdatePanScan_:function(e){if(!this.isPanningAndScanning_)
-return;var viewWidth=this.modelTrackContainer_.canvas.clientWidth;var pixelRatio=window.devicePixelRatio||1;var xDeltaView=pixelRatio*(this.lastMouseViewPos_.x-
-this.mouseViewPosAtMouseDown_.x);var yDelta=this.lastMouseViewPos_.y-
-this.mouseViewPosAtMouseDown_.y;tempDisplayTransform.set(this.viewportDisplayTransformAtMouseDown_);tempDisplayTransform.incrementPanXInViewUnits(xDeltaView);tempDisplayTransform.panY-=yDelta;this.viewport_.setDisplayTransformImmediately(tempDisplayTransform);e.preventDefault();e.stopPropagation();this.storeLastMousePos_(e);},onEndPanScan_:function(e){this.isPanningAndScanning_=false;this.storeLastMousePos_(e);if(!e.isClick)
-e.preventDefault();},onBeginSelection_:function(e){var canv=this.modelTrackContainer_.canvas;var rect=this.modelTrack_.getBoundingClientRect();var canvRect=canv.getBoundingClientRect();var inside=rect&&e.clientX>=rect.left&&e.clientX<rect.right&&e.clientY>=rect.top&&e.clientY<rect.bottom&&e.clientX>=canvRect.left&&e.clientX<canvRect.right;if(!inside)
-return;this.dragBeginEvent_=e;this.storeInitialInteractionPositionsAndFocus_(e);e.preventDefault();},onUpdateSelection_:function(e){if(!this.dragBeginEvent_)
-return;this.dragBoxXStart_=this.dragBeginEvent_.clientX;this.dragBoxXEnd_=e.clientX;this.dragBoxYStart_=this.dragBeginEvent_.clientY;this.dragBoxYEnd_=e.clientY;this.setDragBoxPosition_(this.dragBoxXStart_,this.dragBoxYStart_,this.dragBoxXEnd_,this.dragBoxYEnd_);},onEndSelection_:function(e){e.preventDefault();if(!this.dragBeginEvent_)
-return;this.hideDragBox_();var eDown=this.dragBeginEvent_;this.dragBeginEvent_=null;var loY=Math.min(eDown.clientY,e.clientY);var hiY=Math.max(eDown.clientY,e.clientY);var loX=Math.min(eDown.clientX,e.clientX);var hiX=Math.max(eDown.clientX,e.clientX);var canv=this.modelTrackContainer_.canvas;var worldOffset=canv.getBoundingClientRect().left;var loVX=loX-worldOffset;var hiVX=hiX-worldOffset;var selection=new Selection();this.modelTrack_.addIntersectingEventsInRangeToSelection(loVX,hiVX,l [...]
-return;var newPosition=this.extractRelativeMousePosition_(e);var zoomScaleValue=1+(this.lastMouseViewPos_.y-
-newPosition.y)*0.01;this.zoomBy_(zoomScaleValue,false);this.storeLastMousePos_(e);},onEndZoom_:function(e){this.isZooming_=false;if(!e.isClick)
-e.preventDefault();},computeTouchCenter_:function(positions){var xSum=0;var ySum=0;for(var i=0;i<positions.length;++i){xSum+=positions[i].x;ySum+=positions[i].y;}
-return{x:xSum/positions.length,y:ySum/positions.length};},computeTouchSpan_:function(positions){var xMin=Number.MAX_VALUE;var yMin=Number.MAX_VALUE;var xMax=Number.MIN_VALUE;var yMax=Number.MIN_VALUE;for(var i=0;i<positions.length;++i){xMin=Math.min(xMin,positions[i].x);yMin=Math.min(yMin,positions[i].y);xMax=Math.max(xMax,positions[i].x);yMax=Math.max(yMax,positions[i].y);}
-return Math.sqrt((xMin-xMax)*(xMin-xMax)+
-(yMin-yMax)*(yMin-yMax));},onUpdateTransformForTouch_:function(e){var newPositions=this.extractRelativeTouchPositions_(e);var currentPositions=this.lastTouchViewPositions_;var newCenter=this.computeTouchCenter_(newPositions);var currentCenter=this.computeTouchCenter_(currentPositions);var newSpan=this.computeTouchSpan_(newPositions);var currentSpan=this.computeTouchSpan_(currentPositions);var vp=this.viewport_;var viewWidth=this.modelTrackContainer_.canvas.clientWidth;var pixelRatio=wind [...]
-this.pendingHintTextClearTimeout_=setTimeout(this.hideHintText_.bind(this),1000);this.hintTextBox_.textContent=text;this.hintTextBox_.style.display='';},hideHintText_:function(){this.pendingHintTextClearTimeout_=undefined;this.hintTextBox_.style.display='none';}};return{TimelineTrackView:TimelineTrackView};});'use strict';Polymer('tr-ui-find-control',{filterKeyDown:function(e){if(e.keyCode===27)
-return;e.stopPropagation();if(e.keyCode!==13)return;e.shiftKey?this.findPrevious():this.findNext();},filterKeyPress:function(e){if(e.keyCode===27)
-return;e.stopPropagation();},filterBlur:function(e){this.updateHitCountEl();},filterFocus:function(e){this.$.filter.select();},filterMouseUp:function(e){e.preventDefault();},get controller(){return this.controller_;},set controller(c){this.controller_=c;this.updateHitCountEl();},focus:function(){this.$.filter.focus();},get hasFocus(){return this===document.activeElement;},filterTextChanged:function(){this.$.hitCount.textContent='';this.$.spinner.style.visibility='visible';this.controller [...]
-this.controller.findNext();this.updateHitCountEl();},findPrevious:function(){if(this.controller)
-this.controller.findPrevious();this.updateHitCountEl();},updateHitCountEl:function(){if(!this.controller||!this.hasFocus){this.$.hitCount.textContent='';return;}
-var n=this.controller.filterHits.length;var i=n===0?-1:this.controller.currentHitIndex;this.$.hitCount.textContent=(i+1)+' of '+n;},setText:function(string){this.$.filter.value=string;}});'use strict';tr.exportTo('tr.ui.b',function(){var Selection=tr.c.Selection;var SelectionState=tr.model.SelectionState;function BrushingState(){this.guid_=tr.b.GUID.allocate();this.selection_=new Selection();this.findMatches_=new Selection();this.analysisViewRelatedEvents_=new Selection();this.appliedToM [...]
-BrushingState.prototype={get guid(){return this.guid_;},clone:function(){var that=new BrushingState();that.selection_=this.selection_;that.findMatches_=this.findMatches_;that.analysisViewRelatedEvents_=this.analysisViewRelatedEvents_;return that;},equals:function(that){if(!this.selection_.equals(that.selection_))
-return false;if(!this.findMatches_.equals(that.findMatches_))
-return false;if(!this.analysisViewRelatedEvents_.equals(that.analysisViewRelatedEvents_)){return false;}
-return true;},get selectionOfInterest(){if(this.selection_.length)
-return this.selection_;if(this.highlight_.length)
-return this.highlight_;if(this.analysisViewRelatedEvents_.length)
-return this.analysisViewRelatedEvents_;return this.selection_;},get selection(){return this.selection_;},set selection(selection){if(this.appliedToModel_)
-throw new Error('Cannot mutate this state right now');if(selection===undefined)
-selection=new Selection();this.selection_=selection;},get findMatches(){return this.findMatches_;},set findMatches(findMatches){if(this.appliedToModel_)
-throw new Error('Cannot mutate this state right now');if(findMatches===undefined)
-findMatches=new Selection();this.findMatches_=findMatches;},get analysisViewRelatedEvents(){return this.analysisViewRelatedEvents_;},set analysisViewRelatedEvents(analysisViewRelatedEvents){if(this.appliedToModel_)
-throw new Error('Cannot mutate this state right now');if(analysisViewRelatedEvents===undefined)
-analysisViewRelatedEvents=new Selection();this.analysisViewRelatedEvents_=analysisViewRelatedEvents;},get isAppliedToModel(){return this.appliedToModel_!==undefined;},get hasHighlight_(){return this.findMatches_.length>0||this.analysisViewRelatedEvents_.length>0;},applyToModelSelectionState:function(model){this.appliedToModel_=model;if(!this.hasHighlight_){this.selection_.forEach(function(e){e.selectionState=SelectionState.SELECTED;});return;}
-model.iterateAllEvents(function(e){var selectionState;if(this.selection_.contains(e)){selectionState=SelectionState.SELECTED;}else if(this.findMatches_.contains(e)){selectionState=SelectionState.HIGHLIGHTED;}else if(this.analysisViewRelatedEvents_.contains(e)){selectionState=SelectionState.HIGHLIGHTED;}else{selectionState=SelectionState.DIMMED;}
-e.selectionState=selectionState;}.bind(this));},transferModelOwnershipToClone:function(that){if(!this.appliedToModel_)
-throw new Error('Not applied');that.appliedToModel_=this.appliedToModel_;this.appliedToModel_=undefined;},unapplyFromModelSelectionState:function(){if(!this.appliedToModel_)
-throw new Error('Not applied');var model=this.appliedToModel_;this.appliedToModel_=undefined;if(!this.hasHighlight_){this.selection_.forEach(function(e){e.selectionState=SelectionState.NONE;});return;}
-model.iterateAllEvents(function(e){e.selectionState=SelectionState.NONE;});}};return{BrushingState:BrushingState};});'use strict';tr.exportTo('tr.ui.b',function(){function YComponent(stableId,yPercentOffset){this.stableId=stableId;this.yPercentOffset=yPercentOffset;}
-YComponent.prototype={toDict:function(){return{stableId:this.stableId,yPercentOffset:this.yPercentOffset};}};function Location(xWorld,yComponents){this.xWorld_=xWorld;this.yComponents_=yComponents;};Location.fromViewCoordinates=function(viewport,viewX,viewY){var dt=viewport.currentDisplayTransform;var xWorld=dt.xViewToWorld(viewX);var yComponents=[];var elem=document.elementFromPoint(viewX+viewport.modelTrackContainer.canvas.offsetLeft,viewY+viewport.modelTrackContainer.canvas.offsetTop) [...]
-elem=elem.parentElement;}
-if(yComponents.length==0)
-return;return new Location(xWorld,yComponents);}
-Location.fromStableIdAndTimestamp=function(viewport,stableId,ts){var xWorld=ts;var yComponents=[];var containerToTrack=viewport.containerToTrackMap;var elem=containerToTrack.getTrackByStableId(stableId);if(!elem)
-return;var firstY=elem.getBoundingClientRect().top;while(elem instanceof tr.ui.tracks.Track){if(elem.eventContainer){var boundRect=elem.getBoundingClientRect();var yPercentOffset=(firstY-boundRect.top)/boundRect.height;yComponents.push(new YComponent(elem.eventContainer.stableId,yPercentOffset));}
-elem=elem.parentElement;}
-if(yComponents.length==0)
-return;return new Location(xWorld,yComponents);}
-Location.prototype={get xWorld(){return this.xWorld_;},getContainingTrack:function(viewport){var containerToTrack=viewport.containerToTrackMap;for(var i in this.yComponents_){var yComponent=this.yComponents_[i];var track=containerToTrack.getTrackByStableId(yComponent.stableId);if(track!==undefined)
-return track;}},toViewCoordinates:function(viewport){var dt=viewport.currentDisplayTransform;var containerToTrack=viewport.containerToTrackMap;var viewX=dt.xWorldToView(this.xWorld_);var viewY=-1;for(var index in this.yComponents_){var yComponent=this.yComponents_[index];var track=containerToTrack.getTrackByStableId(yComponent.stableId);if(track!==undefined){var boundRect=track.getBoundingClientRect();viewY=yComponent.yPercentOffset*boundRect.height+boundRect.top;break;}}
-return{viewX:viewX,viewY:viewY};},toDict:function(){return{xWorld:this.xWorld_,yComponents:this.yComponents_};}};return{Location:Location};});'use strict';tr.exportTo('tr.ui.b',function(){var Location=tr.ui.b.Location;function UIState(location,scaleX){this.location_=location;this.scaleX_=scaleX;};UIState.fromUserFriendlyString=function(model,viewport,stateString){var navByFinderPattern=/^(-?\d+(\.\d+)?)@(.+)x(\d+(\.\d+)?)$/g;var match=navByFinderPattern.exec(stateString);if(!match)
-return;var timestamp=parseFloat(match[1]);var stableId=match[3];var scaleX=parseFloat(match[4]);if(scaleX<=0)
-throw new Error('Invalid ScaleX value in UI State string.');if(!viewport.containerToTrackMap.getTrackByStableId(stableId))
-throw new Error('Invalid StableID given in UI State String.');var loc=tr.ui.b.Location.fromStableIdAndTimestamp(viewport,stableId,timestamp);return new UIState(loc,scaleX);}
-UIState.prototype={get location(){return this.location_;},get scaleX(){return this.scaleX_;},toUserFriendlyString:function(viewport){var timestamp=this.location_.xWorld;var stableId=this.location_.getContainingTrack(viewport).eventContainer.stableId;var scaleX=this.scaleX_;return timestamp.toFixed(5)+'@'+stableId+'x'+scaleX.toFixed(5);},toDict:function(){return{location:this.location_.toDict(),scaleX:this.scaleX_};}};return{UIState:UIState};});'use strict';tr.exportTo('tr.c',function(){v [...]
-SelectionController.prototype={__proto__:tr.b.EventTarget.prototype,dispatchChangeEvent_:function(){var e=new tr.b.Event('change',false,false);this.dispatchEvent(e);},get model(){if(!this.timelineView_)
-return undefined;return this.timelineView_.model;},get trackView(){if(!this.timelineView_)
-return undefined;return this.timelineView_.trackView;},get viewport(){if(!this.timelineView_)
-return undefined;if(!this.timelineView_.trackView)
-return undefined;return this.timelineView_.trackView.viewport;},get historyEnabled(){return this.historyEnabled_;},set historyEnabled(historyEnabled){this.historyEnabled_=!!historyEnabled;if(historyEnabled)
-window.addEventListener('popstate',this.onPopState_);else
-window.removeEventListener('popstate',this.onPopState_);},modelWillChange:function(){if(this.currentBrushingState_.isAppliedToModel)
-this.currentBrushingState_.unapplyFromModelSelectionState();},modelDidChange:function(){this.selections_={};this.currentBrushingState_.applyToModelSelectionState(this.model);var e=new tr.b.Event('model-changed',false,false);this.dispatchEvent(e);},onUserInitiatedSelectionChange_:function(){var selection=this.selection;if(this.historyEnabled){this.selections_[selection.guid]=selection;var state={selection_guid:selection.guid};window.history.pushState(state,document.title);}},onPopState_:f [...]
-return;var selection=this.selections_[e.state.selection_guid];if(selection){var newState=this.currentBrushingState_.clone();newState.selection=selection;this.currentBrushingState=newState;}
-e.stopPropagation();},get selection(){return this.currentBrushingState_.selection;},get findMatches(){return this.currentBrushingState_.findMatches;},get selectionOfInterest(){return this.currentBrushingState_.selectionOfInterest;},get currentBrushingState(){return this.currentBrushingState_;},set currentBrushingState(newBrushingState){if(newBrushingState.isAppliedToModel)
-throw new Error('Cannot apply this state, it is applied');var hasValueChanged=!this.currentBrushingState_.equals(newBrushingState);if(newBrushingState!==this.currentBrushingState_&&!hasValueChanged){if(this.currentBrushingState_.isAppliedToModel){this.currentBrushingState_.transferModelOwnershipToClone(newBrushingState);}
-this.currentBrushingState_=newBrushingState;return;}
-if(this.currentBrushingState_.isAppliedToModel)
-this.currentBrushingState_.unapplyFromModelSelectionState();this.currentBrushingState_=newBrushingState;if(this.model)
-this.currentBrushingState_.applyToModelSelectionState(this.model);this.dispatchChangeEvent_();},addAllEventsMatchingFilterToSelectionAsTask:function(filter,selection){var timelineView=this.timelineView_.trackView;if(!timelineView)
-return new tr.b.Task();return timelineView.addAllEventsMatchingFilterToSelectionAsTask(filter,selection);},findTextChangedTo:function(allPossibleMatches){var newBrushingState=this.currentBrushingState_.clone();newBrushingState.findMatches=allPossibleMatches;this.currentBrushingState=newBrushingState;},findFocusChangedTo:function(currentFocus){var newBrushingState=this.currentBrushingState_.clone();newBrushingState.selection=currentFocus;this.currentBrushingState=newBrushingState;this.onU [...]
-if(this.guideLineAnnotation_!==undefined){this.model.removeAnnotation(this.guideLineAnnotation_);this.guideLineAnnotation_=undefined;}
-var newBrushingState=this.currentBrushingState_.clone();newBrushingState.selection=new Selection();newBrushingState.findMatches=new Selection();this.currentBrushingState=newBrushingState;this.onUserInitiatedSelectionChange_();},uiStateFromString:function(string){return tr.ui.b.UIState.fromUserFriendlyString(this.model,this.viewport,string);},navToPosition:function(uiState,showNavLine){this.trackView.navToPosition(uiState,showNavLine);},changeSelectionFromTimeline:function(selection){var  [...]
-ScriptingObject.prototype={onModelChanged:function(){}};return{ScriptingObject:ScriptingObject};});'use strict';tr.exportTo('tr.c',function(){function ScriptingController(selectionController){this.selectionController_=selectionController;this.scriptObjectNames_=[];this.scriptObjectValues_=[];this.selectionController.addEventListener('model-changed',this.onModelChanged_.bind(this));var typeInfos=ScriptingObjectRegistry.getAllRegisteredTypeInfos();typeInfos.forEach(function(typeInfo){this. [...]
-function ScriptingObjectRegistry(){}
-var options=new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);tr.b.decorateExtensionRegistry(ScriptingObjectRegistry,options);ScriptingController.prototype={get selectionController(){return this.selectionController_;},onModelChanged_:function(){this.scriptObjectValues_.forEach(function(v){if(v.onModelChanged)
-v.onModelChanged();});},addScriptObject:function(name,value){this.scriptObjectNames_.push(name);this.scriptObjectValues_.push(value);},executeCommand:function(command){var f=new Function(this.scriptObjectNames_,'return eval('+command+')');return f.apply(null,this.scriptObjectValues_);}};return{ScriptingController:ScriptingController,ScriptingObjectRegistry:ScriptingObjectRegistry};});'use strict';tr.exportTo('tr.e.tquery',function(){function Context(){this.event=undefined;this.ancestors=[];}
-Context.prototype={push:function(event){var ctx=new Context();ctx.ancestors=this.ancestors.slice();ctx.ancestors.push(event);return ctx;},pop:function(event){var ctx=new Context();ctx.event=this.ancestors[this.ancestors.length-1];ctx.ancestors=this.ancestors.slice(0,this.ancestors.length-1);return ctx;}};return{Context:Context};});'use strict';tr.exportTo('tr.e.tquery',function(){function Filter(){tr.c.ScriptingObject.call(this);}
-Filter.normalizeFilterExpression=function(filterExpression){if(filterExpression instanceof String||typeof(filterExpression)=='string'||filterExpression instanceof RegExp){var filter=new tr.e.tquery.FilterHasTitle(filterExpression);return filter;}
-return filterExpression;};Filter.prototype={__proto__:tr.c.ScriptingObject.prototype,evaluate:function(context){throw new Error('Not implemented');},matchValue_:function(value,expected){if(expected instanceof RegExp)
-return expected.test(value);else if(expected instanceof Function)
-return expected(value);return value===expected;}};return{Filter:Filter};});'use strict';tr.exportTo('tr.e.tquery',function(){function FilterAllOf(opt_subExpressions){tr.e.tquery.Filter.call(this);this.subExpressions=opt_subExpressions||[];}
-FilterAllOf.prototype={__proto__:tr.e.tquery.Filter.prototype,set subExpressions(exprs){this.subExpressions_=[];for(var i=0;i<exprs.length;i++){this.subExpressions_.push(tr.e.tquery.Filter.normalizeFilterExpression(exprs[i]));}},get subExpressions(){return this.subExpressions_;},evaluate:function(context){if(!this.subExpressions.length)
-return true;for(var i=0;i<this.subExpressions.length;i++){if(!this.subExpressions[i].evaluate(context))
-return false;}
-return true;}};tr.c.ScriptingObjectRegistry.register(function(){var exprs=[];for(var i=0;i<arguments.length;i++){exprs.push(arguments[i]);}
-return new FilterAllOf(exprs);},{name:'allOf'});return{FilterAllOf:FilterAllOf};});'use strict';tr.exportTo('tr.e.tquery',function(){function FilterAnyOf(opt_subExpressions){tr.e.tquery.Filter.call(this);this.subExpressions=opt_subExpressions||[];};FilterAnyOf.prototype={__proto__:tr.e.tquery.Filter.prototype,set subExpressions(exprs){this.subExpressions_=[];for(var i=0;i<exprs.length;i++){this.subExpressions_.push(tr.e.tquery.Filter.normalizeFilterExpression(exprs[i]));}},get subExpress [...]
-return true;for(var i=0;i<this.subExpressions.length;i++){if(this.subExpressions[i].evaluate(context))
-return true;}
-return false;}};tr.c.ScriptingObjectRegistry.register(function(){var exprs=[];for(var i=0;i<arguments.length;i++){exprs.push(arguments[i]);}
-return new FilterAnyOf(exprs);},{name:'anyOf'});return{FilterAnyOf:FilterAnyOf};});'use strict';tr.exportTo('tr.e.tquery',function(){function FilterHasAncestor(opt_subExpression){this.subExpression=opt_subExpression;};FilterHasAncestor.prototype={__proto__:tr.e.tquery.Filter.prototype,set subExpression(expr){this.subExpression_=tr.e.tquery.Filter.normalizeFilterExpression(expr);},get subExpression(){return this.subExpression_;},evaluate:function(context){if(!this.subExpression)
-return context.ancestors.length>0;while(context.ancestors.length){context=context.pop();if(this.subExpression.evaluate(context))
-return true;}
-return false;}};tr.c.ScriptingObjectRegistry.register(function(subExpression){return new FilterHasAncestor(subExpression);},{name:'hasAncestor'});return{FilterHasAncestor:FilterHasAncestor};});'use strict';tr.exportTo('tr.e.tquery',function(){function FilterHasDuration(minValueOrExpected,opt_maxValue){if(minValueOrExpected!==undefined&&opt_maxValue!==undefined){this.minValue=minValueOrExpected;this.maxValue=opt_maxValue;}else{this.expected=minValueOrExpected;}};FilterHasDuration.prototyp [...]
-return false;if(this.minValue!==undefined&&this.maxValue!==undefined){return context.event.duration>=this.minValue&&context.event.duration<=this.maxValue;}
-return this.matchValue_(context.event.duration,this.expected);}};tr.c.ScriptingObjectRegistry.register(function(minValueOrExpected,opt_maxValue){return new FilterHasDuration(minValueOrExpected,opt_maxValue);},{name:'hasDuration'});return{FilterHasDuration:FilterHasDuration};});'use strict';tr.exportTo('tr.e.tquery',function(){function FilterHasTitle(expected){tr.e.tquery.Filter.call(this);this.expected=expected;}
-FilterHasTitle.prototype={__proto__:tr.e.tquery.Filter.prototype,evaluate:function(context){return this.matchValue_(context.event.title,this.expected);}};tr.c.ScriptingObjectRegistry.register(function(expected){var filter=new tr.e.tquery.FilterHasTitle(expected);return filter;},{name:'hasTitle'});return{FilterHasTitle:FilterHasTitle};});'use strict';tr.exportTo('tr.e.tquery',function(){function FilterIsTopLevel(opt_subExpression){this.subExpression=opt_subExpression;}
-FilterIsTopLevel.prototype={__proto__:tr.e.tquery.Filter.prototype,set subExpression(expr){this.subExpression_=tr.e.tquery.Filter.normalizeFilterExpression(expr);},get subExpression(){return this.subExpression_;},evaluate:function(context){if(context.ancestors.length>0)
-return false;if(!this.subExpression)
-return true;return this.subExpression.evaluate(context);}};tr.c.ScriptingObjectRegistry.register(function(subExpression){return new FilterIsTopLevel(subExpression);},{name:'isTopLevel'});return{FilterIsTopLevel:FilterIsTopLevel};});'use strict';tr.exportTo('tr.e.tquery',function(){function TQuery(selectionController){tr.c.ScriptingObject.call(this);this.selectionController_=selectionController;this.parent_=undefined;this.filterExpression_=undefined;this.selection_=undefined;};TQuery.prot [...]
-var rootTask=new tr.b.Task();var lastTask=rootTask;for(var i=nodes.length-1;i>=0;i--){var node=nodes[i];if(node.selection_!==undefined)
-continue;node.selection_=new tr.c.Selection();if(node.parent_===undefined){lastTask=lastTask.after(this.selectEverythingAsTask_(node.selection_));}else{var prevNode=nodes[i+1];lastTask=this.createFilterTaskForNode_(lastTask,node,prevNode);}}
-return{rootTask:rootTask,lastTask:lastTask,lastNode:node};},createFilterTaskForNode_:function(lastTask,node,prevNode){return lastTask.after(function(){node.evaluateFilterExpression_(prevNode.selection_,node.selection_);},this);},evaluateFilterExpression_:function(inputSelection,outputSelection){var seenEvents={};inputSelection.forEach(function(event){var context=new tr.e.tquery.Context();context.event=event;this.evaluateFilterExpressionForEvent_(context,inputSelection,outputSelection,see [...]
-outputSelection.push(event);}
-if(!event.subSlices)
-return;context=context.push(event);for(var i=0;i<event.subSlices.length;i++){context.event=event.subSlices[i];this.evaluateFilterExpressionForEvent_(context,inputSelection,outputSelection,seenEvents);}},show:function(){var graph=this.createFilterTaskGraph_();graph.lastTask=graph.lastTask.after(function(){this.selectionController.showScriptControlSelection(graph.lastNode.selection_);},this);return graph.rootTask;},selectEverythingAsTask_:function(selection){var passThroughFilter=new tr.c. [...]
-return this.selection_;}};tr.c.ScriptingObjectRegistry.register(new TQuery(),{name:'$t'});return{TQuery:TQuery};});'use strict';Polymer('tracing-scripting-control',{_isEnterKey:function(event){return event.keyCode!==229&&event.keyIdentifier==='Enter';},_setFocused:function(focused){var promptEl=this.$.prompt;if(focused){promptEl.focus();this.$.root.classList.add('focused');if(promptEl.innerText.length>0){var sel=window.getSelection();sel.collapse(promptEl.firstChild,promptEl.innerText.le [...]
-return;var promptEl=this.$.prompt;var command=promptEl.innerText;if(command.length===0)
-return;promptEl.innerText='';this.addLine_(String.fromCharCode(187)+' '+command);try{var result=this.controller_.executeCommand(command);}catch(e){result=e.stack||e.stackTrace;}
-if(result instanceof tr.b.Task){tr.b.Task.RunWhenIdle(result);}else{this.addLine_(result);}},addLine_:function(line){var historyEl=this.$.history;if(historyEl.innerText.length!==0)
-historyEl.innerText+='\n';historyEl.innerText+=line;},promptKeyPress:function(e){e.stopPropagation();},toggleVisibility:function(){var root=this.$.root;if(!this.visible){root.classList.remove('hidden');this._setFocused(true);}else{root.classList.add('hidden');this._setFocused(false);}},get hasFocus(){return this===document.activeElement;},get visible(){var root=this.$.root;return!root.classList.contains('hidden');},get controller(){return this.controller_;},set controller(c){this.control [...]
-this.selectionController_=selectionController;if(this.selectionController){this.selectionController_.addEventListener('change',this.onSelectionChanged_);this.selectionController_.addEventListener('model-changed',this.onModelChanged_);}},get selection(){return this.selectionController_.selection;},onSelectionChanged_:function(){if(this.activePanel)
-this.activePanel.selection=this.selection;},get model(){return this.selectionController_.model;},onModelChanged_:function(){this.activePanelType_=undefined;this.updateContents_();},get expanded(){this.hasAttribute('expanded');},get activePanel(){if(this.activePanelContainer_.children.length===0)
-return undefined;return this.activePanelContainer_.children[0];},get activePanelType(){return this.activePanelType_;},set activePanelType(panelType){if(this.model===undefined)
-throw new Error('Cannot activate panel without a model');var panel=undefined;if(panelType)
-panel=document.createElement(panelType);if(panel!==undefined&&!panel.supportsModel(this.model))
-throw new Error('Cannot activate panel: does not support this model');if(this.activePanelType){this.getLabelElementForPanelType_(this.activePanelType).removeAttribute('selected');}
-this.activePanelContainer_.textContent='';if(panelType===undefined){this.removeAttribute('expanded');this.activePanelType_=undefined;return;}
-this.getLabelElementForPanelType_(panelType).setAttribute('selected',true);this.setAttribute('expanded',true);this.activePanelContainer_.appendChild(panel);panel.rangeOfInterest=this.rangeOfInterest_;panel.selection=this.selection_;panel.model=this.model;this.activePanelType_=panelType;},getPanelTypeForConstructor_:function(constructor){for(var i=0;i<this.tabStrip_.children.length;i++){if(this.tabStrip_.children[i].panelType.constructor==constructor)
-return this.tabStrip_.children[i].panelType;}},getLabelElementForPanelType_:function(panelType){for(var i=0;i<this.tabStrip_.children.length;i++){if(this.tabStrip_.children[i].panelType==panelType)
-return this.tabStrip_.children[i];}
-return undefined;},updateContents_:function(){var previouslyActivePanelType=this.activePanelType;this.tabStrip_.textContent='';var supportedPanelTypes=[];var panelTypes=tr.ui.b.getPolymerElementsThatSubclass('tr-ui-side-panel');panelTypes.forEach(function(panelType){var labelEl=document.createElement('tab-strip-label');var panel=document.createElement(panelType);labelEl.textContent=panel.textLabel;labelEl.panelType=panelType;var supported=panel.supportsModel(this.model);if(this.model&&su [...]
-supported.reason;labelEl.style.display='none';}
-this.tabStrip_.appendChild(labelEl);},this);if(previouslyActivePanelType&&supportedPanelTypes.indexOf(previouslyActivePanelType)!=-1){this.activePanelType=previouslyActivePanelType;this.setAttribute('expanded',true);}else{this.activePanelContainer_.textContent='';this.removeAttribute('expanded');}},get rangeOfInterest(){return this.rangeOfInterest_;},set rangeOfInterest(range){if(range==undefined)
-throw new Error('Must not be undefined');this.rangeOfInterest_=range;if(this.activePanel)
-this.activePanel.rangeOfInterest=range;}});'use strict';Polymer('tr-ui-b-dropdown',{ready:function(){this.$.outer.addEventListener('click',this.onOuterClick_.bind(this));this.$.dialog.addEventListener('click',this.onDialogClick_.bind(this));this.$.dialog.addEventListener('cancel',this.onDialogCancel_.bind(this));},get iconElement(){return this.$.icon;},onOuterClick_:function(e){var or=this.$.outer.getBoundingClientRect();var inside=true;inside&=e.clientX>=or.left;inside&=e.clientX<or.rig [...]
-return;e.preventDefault();if(!this.isOpen)
-this.show();else
-this.close();},show:function(){if(this.isOpen)
-return;this.$.outer.classList.add('open');var ddr=this.$.outer.getBoundingClientRect();var rW=Math.max(ddr.width,150);this.$.dialog.style.minWidth=rW+'px';this.$.dialog.showModal();var ddw=this.$.outer.getBoundingClientRect().width;var w=this.$.dialog.getBoundingClientRect().width;this.$.dialog.style.top=ddr.bottom-1+'px';this.$.dialog.style.left=ddr.left+'px';},onDialogClick_:function(e){if(!this.isOpen)
-return;var dr=this.$.dialog.getBoundingClientRect();var inside=true;inside&=e.clientX>=dr.left;inside&=e.clientX<dr.right;inside&=e.clientY>=dr.top;inside&=e.clientY<dr.bottom;if(!inside){e.preventDefault();this.close();}},onDialogCancel_:function(e){e.preventDefault();this.close();},close:function(){if(!this.isOpen)
-return;this.$.dialog.close();this.$.outer.classList.remove('open');},get isOpen(){return this.$.dialog.hasAttribute('open');}});'use strict';tr.exportTo('tr.ui.b',function(){var DragHandle=tr.ui.b.define('x-drag-handle');DragHandle.prototype={__proto__:HTMLDivElement.prototype,decorate:function(){this.lastMousePos_=0;this.onMouseMove_=this.onMouseMove_.bind(this);this.onMouseUp_=this.onMouseUp_.bind(this);this.addEventListener('mousedown',this.onMouseDown_);this.target_=undefined;this.ho [...]
-return;this.observer_.observe(this.target_,{attributes:true,attributeFilter:['class']});},get horizontal(){return this.horizontal_;},set horizontal(h){this.horizontal_=h;if(this.horizontal_)
-this.className='horizontal-drag-handle';else
-this.className='vertical-drag-handle';},get vertical(){return!this.horizontal_;},set vertical(v){this.horizontal=!v;},forceMutationObserverFlush_:function(){var records=this.observer_.takeRecords();if(records.length)
-this.didTargetMutate_(records);},didTargetMutate_:function(e){var modeSize=this.targetSizesByModeKey_[this.modeKey_];if(modeSize!==undefined){this.setTargetSize_(modeSize);return;}
-this.target_.style[this.targetStyleKey_]='';},get targetStyleKey_(){return this.horizontal_?'height':'width';},getTargetSize_:function(){var targetStyleKey=this.targetStyleKey_;if(!this.target_.style[targetStyleKey]){this.target_.style[targetStyleKey]=window.getComputedStyle(this.target_)[targetStyleKey];}
-var size=parseInt(this.target_.style[targetStyleKey]);this.targetSizesByModeKey_[this.modeKey_]=size;return size;},setTargetSize_:function(s){this.target_.style[this.targetStyleKey_]=s+'px';this.targetSizesByModeKey_[this.modeKey_]=s;},applyDelta_:function(delta){var curSize=this.getTargetSize_();var newSize;if(this.target_===this.nextElementSibling){newSize=curSize+delta;}else{newSize=curSize-delta;}
-this.setTargetSize_(newSize);},onMouseMove_:function(e){var curMousePos=this.horizontal_?e.clientY:e.clientX;var delta=this.lastMousePos_-curMousePos;this.applyDelta_(delta);this.lastMousePos_=curMousePos;e.preventDefault();return true;},onMouseDown_:function(e){if(!this.target_)
-return;this.forceMutationObserverFlush_();this.lastMousePos_=this.horizontal_?e.clientY:e.clientX;document.addEventListener('mousemove',this.onMouseMove_);document.addEventListener('mouseup',this.onMouseUp_);e.preventDefault();return true;},onMouseUp_:function(e){document.removeEventListener('mousemove',this.onMouseMove_);document.removeEventListener('mouseup',this.onMouseUp_);e.preventDefault();}};return{DragHandle:DragHandle};});'use strict';tr.exportTo('tr.ui',function(){var THIS_DOC= [...]
-this.optionsDropdown_=document.createElement('tr-ui-b-dropdown');this.optionsDropdown_.iconElement.textContent='View Options';this.showFlowEvents_=false;this.optionsDropdown_.appendChild(tr.ui.b.createCheckBox(this,'showFlowEvents','tr.ui.TimelineView.showFlowEvents',false,'Flow events'));this.highlightVSync_=false;this.highlightVSyncCheckbox_=tr.ui.b.createCheckBox(this,'highlightVSync','tr.ui.TimelineView.highlightVSync',false,'Highlight VSync');this.optionsDropdown_.appendChild(this.h [...]
-hue='blue';else
-hue=this.model.faviconHue;var faviconData=tr.ui.b.FaviconsByHue[hue];if(faviconData===undefined)
-faviconData=tr.ui.b.FaviconsByHue['blue'];var link=document.head.querySelector('link[rel="shortcut icon"]');if(!link){link=document.createElement('link');link.rel='shortcut icon';document.head.appendChild(link);}
-link.href=faviconData;},get showFlowEvents(){return this.showFlowEvents_;},set showFlowEvents(showFlowEvents){this.showFlowEvents_=showFlowEvents;if(!this.trackView_)
-return;this.trackView_.viewport.showFlowEvents=showFlowEvents;},get highlightVSync(){return this.highlightVSync_;},set highlightVSync(highlightVSync){this.highlightVSync_=highlightVSync;if(!this.trackView_)
-return;this.trackView_.viewport.highlightVSync=highlightVSync;},createHelpButton_:function(){var node=tr.ui.b.instantiateTemplate('#help-btn-template',THIS_DOC);var showEl=node.querySelector('.view-help-button');var helpTextEl=node.querySelector('.view-help-text');var dlg=new tr.ui.b.Overlay();dlg.title='chrome://tracing Help';dlg.classList.add('view-help-overlay');dlg.appendChild(node);function onClick(e){dlg.visible=!dlg.visible;var mod=tr.isMac?'cmd ':'ctrl';var spans=helpTextEl.query [...]
-e.stopPropagation();return false;}
-showEl.addEventListener('click',onClick.bind(this));return showEl;},createConsoleButton_:function(){var node=tr.ui.b.instantiateTemplate('#console-btn-template',THIS_DOC);var toggleEl=node.querySelector('.view-console-button');function onClick(e){this.scriptingCtl_.toggleVisibility();e.stopPropagation();return false;}
-toggleEl.addEventListener('click',onClick.bind(this));return toggleEl;},createMetadataButton_:function(){var node=tr.ui.b.instantiateTemplate('#metadata-btn-template',THIS_DOC);var showEl=node.querySelector('.view-metadata-button');var textEl=node.querySelector('.info-button-text');var dlg=new tr.ui.b.Overlay();dlg.title='Metadata for trace';dlg.classList.add('view-metadata-overlay');dlg.appendChild(node);function onClick(e){dlg.visible=true;var metadataStrings=[];var model=this.model;fo [...]
-textEl.textContent=metadataStrings.join('\n');e.stopPropagation();return false;}
-showEl.addEventListener('click',onClick.bind(this));function updateVisibility(){showEl.style.display=(this.model&&this.model.metadata.length)?'':'none';}
-var updateVisibility_=updateVisibility.bind(this);updateVisibility_();this.addEventListener('modelChange',updateVisibility_);return showEl;},get leftControls(){return this.leftControlsEl_;},get rightControls(){return this.rightControlsEl_;},get collapsingControls(){return this.collapsingControlsEl_;},get viewTitle(){return this.titleEl_.textContent.substring(this.titleEl_.textContent.length-2);},set viewTitle(text){if(text===undefined){this.titleEl_.textContent='';this.titleEl_.hidden=tr [...]
-this.titleEl_.hidden=false;this.titleEl_.textContent=text;},get model(){if(this.trackView_)
-return this.trackView_.model;return undefined;},set model(model){var modelInstanceChanged=model!=this.model;var modelValid=model&&!model.bounds.isEmpty;if(modelInstanceChanged){if(this.railScoreSpan_)
-this.railScoreSpan_.railScore=undefined;this.trackViewContainer_.textContent='';if(this.trackView_){this.trackView_.viewport.removeEventListener('change',this.onViewportChanged_);this.trackView_.selectionController=undefined;this.trackView_.detach();this.trackView_=undefined;}
-this.selectionController_.modelWillChange();}
-if(modelValid&&!this.trackView_){this.trackView_=new tr.ui.TimelineTrackView(this);this.trackView.selectionController=this.selectionController_;this.trackView_.focusElement=this.focusElement_?this.focusElement_:this.parentElement;this.trackViewContainer_.appendChild(this.trackView_);this.trackView_.viewport.addEventListener('change',this.onViewportChanged_);}
-if(modelValid){this.trackView_.model=model;this.trackView_.viewport.showFlowEvents=this.showFlowEvents;this.trackView_.viewport.highlightVSync=this.highlightVSync;if(this.railScoreSpan_){var railScore=tr.e.rail.RAILScore.fromModel(model);this.railScoreSpan_.railScore=railScore;}}
-if(modelInstanceChanged){tr.b.dispatchSimpleEvent(this,'modelChange');this.selectionController_.modelDidChange();this.onViewportChanged_();}},get selectionController(){return this.selectionController_;},get trackView(){return this.trackView_;},get settings(){if(!this.settings_)
-this.settings_=new tr.b.Settings();return this.settings_;},set focusElement(value){this.focusElement_=value;if(this.trackView_)
-this.trackView_.focusElement=value;},get focusElement(){if(this.focusElement_)
-return this.focusElement_;return this.parentElement;},get listenToKeys_(){if(!tr.ui.b.isElementAttachedToDocument(this))
-return;if(document.activeElement.type==='textarea')
-return false;if(this.sidePanelContainer_.activePanel&&this.sidePanelContainer_.activePanel.listeningToKeys)
-return false;if(!this.focusElement_)
-return true;if(this.focusElement.tabIndex>=0)
-return document.activeElement==this.focusElement;return true;},onKeyDown_:function(e){if(!this.listenToKeys_)
-return;},onKeypress_:function(e){if(!this.listenToKeys_)
-return;switch(e.keyCode){case'`'.charCodeAt(0):this.scriptingCtl_.toggleVisibility();if(!this.scriptingCtl_.hasFocus)
-this.focus();e.preventDefault();break;}
-if(this.scriptingCtl_.hasFocus)
-return;switch(e.keyCode){case'/'.charCodeAt(0):if(this.findCtl_.hasFocus)
-this.focus();else
-this.findCtl_.focus();e.preventDefault();break;case'?'.charCodeAt(0):this.querySelector('.view-help-button').click();e.preventDefault();break;}
-if(this.findCtl_.hasFocus)
-return;switch(e.keyCode){case'v'.charCodeAt(0):this.toggleHighlightVSync_();e.preventDefault();break;}},onViewportChanged_:function(e){var spc=this.sidePanelContainer_;if(!this.trackView_){spc.rangeOfInterest.reset();return;}
-var vr=this.trackView_.viewport.interestRange.asRangeObject();if(!spc.rangeOfInterest.equals(vr))
-spc.rangeOfInterest=vr;},toggleHighlightVSync_:function(){this.highlightVSyncCheckbox_.checked=!this.highlightVSyncCheckbox_.checked;},setFindCtlText:function(string){this.findCtl_.setText(string);}};return{TimelineView:TimelineView};});'use strict';tr.exportTo('tr',function(){var TraceViewer=tr.ui.b.define('trace-viewer',tr.ui.TimelineView);TraceViewer.prototype={__proto__:tr.ui.TimelineView.prototype,decorate:function(opt_url){tr.ui.TimelineView.prototype.decorate.call(this);if(opt_url [...]
-return;var url=opt_url;var that=this;var req=new XMLHttpRequest();var is_binary=/[.]gz$/.test(url)||/[.]zip$/.test(url);req.overrideMimeType('text/plain; charset=x-user-defined');req.open('GET',url,true);if(is_binary)
-req.responseType='arraybuffer';req.onreadystatechange=function(aEvt){if(req.readyState==4){window.setTimeout(function(){if(req.status==200){onResult(is_binary?req.response:req.responseText);}else{onResultFail(req.status);}},0);}};req.send(null);function onResultFail(err){var overlay=new tr.ui.b.Overlay();overlay.textContent=err+': '+url+' could not be loaded';overlay.title='Failed to fetch data';overlay.visible=true;}
-var model;function onResult(result){model=new tr.Model();var p=model.importTracesWithProgressDialog([result],true);p.then(onModelLoaded,onImportFail);}
-function onModelLoaded(){that.model=model;that.viewTitle=url;if(that.timeline)
-that.timeline.focusElement=that;}
-function onImportFail(){var overlay=new tr.ui.b.Overlay();overlay.textContent=tr.b.normalizeException(err).message;overlay.title='Import error';overlay.visible=true;}}};return{TraceViewer:TraceViewer};});'use strict';tr.exportTo('tr.b',function(){var tmpVec2s=[];for(var i=0;i<8;i++)
-tmpVec2s[i]=vec2.create();var tmpVec2a=vec4.create();var tmpVec4a=vec4.create();var tmpVec4b=vec4.create();var tmpMat4=mat4.create();var tmpMat4b=mat4.create();var p00=vec2.createXY(0,0);var p10=vec2.createXY(1,0);var p01=vec2.createXY(0,1);var p11=vec2.createXY(1,1);var lerpingVecA=vec2.create();var lerpingVecB=vec2.create();function lerpVec2(out,a,b,amt){vec2.scale(lerpingVecA,a,amt);vec2.scale(lerpingVecB,b,1-amt);vec2.add(out,lerpingVecA,lerpingVecB);vec2.normalize(out,out);return out;}
-function Quad(){this.p1=vec2.create();this.p2=vec2.create();this.p3=vec2.create();this.p4=vec2.create();}
-Quad.fromXYWH=function(x,y,w,h){var q=new Quad();vec2.set(q.p1,x,y);vec2.set(q.p2,x+w,y);vec2.set(q.p3,x+w,y+h);vec2.set(q.p4,x,y+h);return q;}
-Quad.fromRect=function(r){return new Quad.fromXYWH(r.x,r.y,r.width,r.height);}
-Quad.from4Vecs=function(p1,p2,p3,p4){var q=new Quad();vec2.set(q.p1,p1[0],p1[1]);vec2.set(q.p2,p2[0],p2[1]);vec2.set(q.p3,p3[0],p3[1]);vec2.set(q.p4,p4[0],p4[1]);return q;}
-Quad.from8Array=function(arr){if(arr.length!=8)
-throw new Error('Array must be 8 long');var q=new Quad();q.p1[0]=arr[0];q.p1[1]=arr[1];q.p2[0]=arr[2];q.p2[1]=arr[3];q.p3[0]=arr[4];q.p3[1]=arr[5];q.p4[0]=arr[6];q.p4[1]=arr[7];return q;};Quad.prototype={pointInside:function(point){return pointInImplicitQuad(point,this.p1,this.p2,this.p3,this.p4);},boundingRect:function(){var x0=Math.min(this.p1[0],this.p2[0],this.p3[0],this.p4[0]);var y0=Math.min(this.p1[1],this.p2[1],this.p3[1],this.p4[1]);var x1=Math.max(this.p1[0],this.p2[0],this.p3[ [...]
-vec2.toString(this.p1)+', '+
-vec2.toString(this.p2)+', '+
-vec2.toString(this.p3)+', '+
-vec2.toString(this.p4)+')';}};function sign(p1,p2,p3){return(p1[0]-p3[0])*(p2[1]-p3[1])-
-(p2[0]-p3[0])*(p1[1]-p3[1]);}
-function pointInTriangle2(pt,p1,p2,p3){var b1=sign(pt,p1,p2)<0.0;var b2=sign(pt,p2,p3)<0.0;var b3=sign(pt,p3,p1)<0.0;return((b1==b2)&&(b2==b3));}
-function pointInImplicitQuad(point,p1,p2,p3,p4){return pointInTriangle2(point,p1,p2,p3)||pointInTriangle2(point,p1,p3,p4);}
-return{pointInTriangle2:pointInTriangle2,pointInImplicitQuad:pointInImplicitQuad,Quad:Quad};});'use strict';tr.exportTo('tr.ui.annotations',function(){function RectAnnotationView(viewport,annotation){this.viewport_=viewport;this.annotation_=annotation;}
-RectAnnotationView.prototype={__proto__:tr.ui.annotations.AnnotationView.prototype,draw:function(ctx){var dt=this.viewport_.currentDisplayTransform;var startCoords=this.annotation_.startLocation.toViewCoordinates(this.viewport_);var endCoords=this.annotation_.endLocation.toViewCoordinates(this.viewport_);var startY=startCoords.viewY-ctx.canvas.getBoundingClientRect().top;var sizeY=endCoords.viewY-startCoords.viewY;if(startY+sizeY<0){startY=sizeY;}else if(startY<0){startY=0;}
-ctx.fillStyle=this.annotation_.fillStyle;ctx.fillRect(startCoords.viewX,startY,endCoords.viewX-startCoords.viewX,sizeY);}};return{RectAnnotationView:RectAnnotationView};});'use strict';tr.exportTo('tr.model',function(){function RectAnnotation(start,end){tr.model.Annotation.apply(this,arguments);this.startLocation_=start;this.endLocation_=end;this.fillStyle='rgba(255, 180, 0, 0.3)';}
-RectAnnotation.fromDict=function(dict){var args=dict.args;var startLoc=new tr.ui.b.Location(args.start.xWorld,args.start.yComponents);var endLoc=new tr.ui.b.Location(args.end.xWorld,args.end.yComponents);return new tr.model.RectAnnotation(startLoc,endLoc);}
-RectAnnotation.prototype={__proto__:tr.model.Annotation.prototype,get startLocation(){return this.startLocation_;},get endLocation(){return this.endLocation_;},toDict:function(){return{typeName:'rect',args:{start:this.startLocation.toDict(),end:this.endLocation.toDict()}};},createView_:function(viewport){return new tr.ui.annotations.RectAnnotationView(viewport,this);}};tr.model.Annotation.register(RectAnnotation,{typeName:'rect'});return{RectAnnotation:RectAnnotation};});'use strict';tr. [...]
-CommentBoxAnnotationView.prototype={__proto__:tr.ui.annotations.AnnotationView.prototype,removeTextArea:function(){this.textArea_.parentNode.removeChild(this.textArea_);},draw:function(ctx){var coords=this.annotation_.location.toViewCoordinates(this.viewport_);if(coords.viewX<0){if(this.textArea_)
-this.textArea_.style.visibility='hidden';return;}
-if(!this.textArea_){this.textArea_=document.createElement('textarea');this.textArea_.style.position='absolute';this.textArea_.readOnly=true;this.textArea_.value=this.annotation_.text;this.textArea_.style.zIndex=1;ctx.canvas.parentNode.appendChild(this.textArea_);}
-this.textArea_.style.width=this.styleWidth+'px';this.textArea_.style.height=this.styleHeight+'px';this.textArea_.style.fontSize=this.fontSize+'px';this.textArea_.style.visibility='visible';this.textArea_.style.left=coords.viewX+ctx.canvas.getBoundingClientRect().left+
-this.rightOffset+'px';this.textArea_.style.top=coords.viewY-ctx.canvas.getBoundingClientRect().top-
-this.topOffset+'px';ctx.strokeStyle='rgb(0, 0, 0)';ctx.lineWidth=2;ctx.beginPath();tr.ui.b.drawLine(ctx,coords.viewX,coords.viewY-ctx.canvas.getBoundingClientRect().top,coords.viewX+this.rightOffset,coords.viewY-this.topOffset-
-ctx.canvas.getBoundingClientRect().top);ctx.stroke();}};return{CommentBoxAnnotationView:CommentBoxAnnotationView};});'use strict';tr.exportTo('tr.model',function(){function CommentBoxAnnotation(location,text){tr.model.Annotation.apply(this,arguments);this.location=location;this.text=text;}
-CommentBoxAnnotation.fromDict=function(dict){var args=dict.args;var location=new tr.ui.b.Location(args.location.xWorld,args.location.yComponents);return new tr.model.CommentBoxAnnotation(location,args.text);};CommentBoxAnnotation.prototype={__proto__:tr.model.Annotation.prototype,onRemove:function(){this.view_.removeTextArea();},toDict:function(){return{typeName:'comment_box',args:{text:this.text,location:this.location.toDict()}};},createView_:function(viewport){return new tr.ui.annotati [...]
-return value;if(typeof value=='string')
-return value.substring();if(typeof value=='boolean')
-return value;if(typeof value=='number')
-return value;throw new Error('Unrecognized: '+typeof value);}
-var object=value;if(object instanceof Array){var res=new Array(object.length);for(var i=0;i<object.length;i++)
-res[i]=deepCopy(object[i]);return res;}
-if(object.__proto__!=Object.prototype)
-throw new Error('Can only clone simple types');var res={};for(var key in object){res[key]=deepCopy(object[key]);}
-return res;}
-var timestampFromUs=tr.b.units.Time.timestampFromUs;var maybeTimestampFromUs=tr.b.units.Time.maybeTimestampFromUs;function TraceEventImporter(model,eventData){this.importPriority=1;this.model_=model;this.events_=undefined;this.sampleEvents_=undefined;this.stackFrameEvents_=undefined;this.systemTraceEvents_=undefined;this.eventsWereFromString_=false;this.softwareMeasuredCpuCount_=undefined;this.allAsyncEvents_=[];this.allFlowEvents_=[];this.allObjectEvents_=[];this.traceEventSampleStackFr [...]
-eventData=eventData+']';}
-this.events_=JSON.parse(eventData);this.eventsWereFromString_=true;}else{this.events_=eventData;}
-this.traceAnnotations_=this.events_.traceAnnotations;if(this.events_.traceEvents){var container=this.events_;this.events_=this.events_.traceEvents;this.systemTraceEvents_=container.systemTraceEvents;this.sampleEvents_=container.samples;this.stackFrameEvents_=container.stackFrames;if(container.displayTimeUnit){var unitName=container.displayTimeUnit;var unit=tr.b.units.Time.supportedUnits[unitName];if(unit===undefined){throw new Error('Unit '+unitName+' is not supported.');}
-this.model_.intrinsicTimeUnit=unit;}
-for(var fieldName in container){if(fieldName==='traceEvents'||fieldName==='systemTraceEvents'||fieldName==='samples'||fieldName==='stackFrames'||fieldName==='traceAnnotations')
-continue;this.model_.metadata.push({name:fieldName,value:container[fieldName]});}}}
-TraceEventImporter.canImport=function(eventData){if(typeof(eventData)==='string'||eventData instanceof String){eventData=eventData.trim();return eventData[0]=='{'||eventData[0]=='[';}
-if(eventData instanceof Array&&eventData.length&&eventData[0].ph)
-return true;if(eventData.traceEvents){if(eventData.traceEvents instanceof Array){if(eventData.traceEvents.length&&eventData.traceEvents[0].ph)
-return true;if(eventData.samples.length&&eventData.stackFrames!==undefined)
-return true;}}
-return false;};TraceEventImporter.prototype={__proto__:Importer.prototype,extractSubtraces:function(){var tmp=this.systemTraceEvents_;this.systemTraceEvents_=undefined;return tmp?[tmp]:[];},deepCopyIfNeeded_:function(obj){if(obj===undefined)
-obj={};if(this.eventsWereFromString_)
-return obj;return deepCopy(obj);},processAsyncEvent:function(event){var thread=this.model_.getOrCreateProcess(event.pid).getOrCreateThread(event.tid);this.allAsyncEvents_.push({sequenceNumber:this.allAsyncEvents_.length,event:event,thread:thread});},processFlowEvent:function(event){var thread=this.model_.getOrCreateProcess(event.pid).getOrCreateThread(event.tid);this.allFlowEvents_.push({refGuid:tr.b.GUID.getLastGuid(),sequenceNumber:this.allFlowEvents_.length,event:event,thread:thread}) [...]
-ctr_name=event.name+'['+event.id+']';else
-ctr_name=event.name;var ctr=this.model_.getOrCreateProcess(event.pid).getOrCreateCounter(event.cat,ctr_name);if(ctr.numSeries===0){for(var seriesName in event.args){ctr.addSeries(new tr.model.CounterSeries(seriesName,tr.ui.b.getColorIdForGeneralPurposeString(ctr.name+'.'+seriesName)));}
-if(ctr.numSeries===0){this.model_.importWarning({type:'counter_parse_error',message:'Expected counter '+event.name+' to have at least one argument to use as a value.'});delete ctr.parent.counters[ctr.name];return;}}
-var ts=timestampFromUs(event.ts);ctr.series.forEach(function(series){var val=event.args[series.name]?event.args[series.name]:0;series.addCounterSample(ts,val);});},processObjectEvent:function(event){var thread=this.model_.getOrCreateProcess(event.pid).getOrCreateThread(event.tid);this.allObjectEvents_.push({sequenceNumber:this.allObjectEvents_.length,event:event,thread:thread});},processDurationEvent:function(event){var thread=this.model_.getOrCreateProcess(event.pid).getOrCreateThread(e [...]
-if(event.ph=='B'){var slice=thread.sliceGroup.beginSlice(event.cat,event.name,timestampFromUs(event.ts),this.deepCopyIfNeeded_(event.args),timestampFromUs(event.tts),event.argsStripped);slice.startStackFrame=this.getStackFrameForEvent_(event);}else if(event.ph=='I'||event.ph=='i'){if(event.s!==undefined&&event.s!=='t')
-throw new Error('This should never happen');thread.sliceGroup.beginSlice(event.cat,event.name,timestampFromUs(event.ts),this.deepCopyIfNeeded_(event.args),timestampFromUs(event.tts));var slice=thread.sliceGroup.endSlice(timestampFromUs(event.ts),timestampFromUs(event.tts));slice.startStackFrame=this.getStackFrameForEvent_(event);slice.endStackFrame=undefined;}else{if(!thread.sliceGroup.openSliceCount){this.model_.importWarning({type:'duration_parse_error',message:'E phase event without a [...]
-var slice=thread.sliceGroup.endSlice(timestampFromUs(event.ts),timestampFromUs(event.tts));if(event.name&&slice.title!=event.name){this.model_.importWarning({type:'title_match_error',message:'Titles do not match. Title is '+
-slice.title+' in openSlice, and is '+
-event.name+' in endSlice'});}
-slice.endStackFrame=this.getStackFrameForEvent_(event);this.mergeArgsInto_(slice.args,event.args,slice.title);}},mergeArgsInto_:function(dstArgs,srcArgs,eventName){for(var arg in srcArgs){if(dstArgs[arg]!==undefined){this.model_.importWarning({type:'arg_merge_error',message:'Different phases of '+eventName+' provided values for argument '+arg+'.'+' The last provided value will be used.'});}
-dstArgs[arg]=this.deepCopyIfNeeded_(srcArgs[arg]);}},processCompleteEvent:function(event){var thread=this.model_.getOrCreateProcess(event.pid).getOrCreateThread(event.tid);var slice=thread.sliceGroup.pushCompleteSlice(event.cat,event.name,timestampFromUs(event.ts),maybeTimestampFromUs(event.dur),maybeTimestampFromUs(event.tts),maybeTimestampFromUs(event.tdur),this.deepCopyIfNeeded_(event.args),event.argsStripped);slice.startStackFrame=this.getStackFrameForEvent_(event);slice.endStackFram [...]
-return;if(event.name=='process_name'){var process=this.model_.getOrCreateProcess(event.pid);process.name=event.args.name;}else if(event.name=='process_labels'){var process=this.model_.getOrCreateProcess(event.pid);var labels=event.args.labels.split(',');for(var i=0;i<labels.length;i++)
-process.addLabelIfNeeded(labels[i]);}else if(event.name=='process_sort_index'){var process=this.model_.getOrCreateProcess(event.pid);process.sortIndex=event.args.sort_index;}else if(event.name=='thread_name'){var thread=this.model_.getOrCreateProcess(event.pid).getOrCreateThread(event.tid);thread.name=event.args.name;}else if(event.name=='thread_sort_index'){var thread=this.model_.getOrCreateProcess(event.pid).getOrCreateThread(event.tid);thread.sortIndex=event.args.sort_index;}else if(e [...]
-n=Math.max(n,this.softwareMeasuredCpuCount_);this.softwareMeasuredCpuCount_=n;}else{this.model_.importWarning({type:'metadata_parse_error',message:'Unrecognized metadata name: '+event.name});}},processInstantEvent:function(event){if(event.s=='t'||event.s===undefined){this.processDurationEvent(event);return;}
-var constructor;switch(event.s){case'g':constructor=tr.model.GlobalInstantEvent;break;case'p':constructor=tr.model.ProcessInstantEvent;break;default:this.model_.importWarning({type:'instant_parse_error',message:'I phase event with unknown "s" field value.'});return;}
-var colorId=tr.ui.b.getColorIdForGeneralPurposeString(event.name);var instantEvent=new constructor(event.cat,event.name,colorId,timestampFromUs(event.ts),this.deepCopyIfNeeded_(event.args));switch(instantEvent.type){case tr.model.InstantEventType.GLOBAL:this.model_.pushInstantEvent(instantEvent);break;case tr.model.InstantEventType.PROCESS:var process=this.model_.getOrCreateProcess(event.pid);process.pushInstantEvent(instantEvent);break;default:throw new Error('Unknown instant event type [...]
-if(stackFrame===undefined){var id='te-'+tr.b.GUID.allocate();stackFrame=new tr.model.StackFrame(undefined,id,event.cat,event.name,tr.ui.b.getColorIdForGeneralPurposeString(event.name));this.model_.addStackFrame(stackFrame);this.traceEventSampleStackFramesByName_[event.name]=stackFrame;}
-var sample=new tr.model.Sample(undefined,thread,'TRACE_EVENT_SAMPLE',timestampFromUs(event.ts),stackFrame,1,this.deepCopyIfNeeded_(event.args));this.model_.samples.push(sample);},getOrCreateMemoryDumpEvents_:function(dumpId){if(this.allMemoryDumpEvents_[dumpId]===undefined){this.allMemoryDumpEvents_[dumpId]={global:undefined,process:[]};}
-return this.allMemoryDumpEvents_[dumpId];},processMemoryDumpEvent:function(event){if(event.id===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:event.ph+' phase event without a dump ID.'});return;}
-var events=this.getOrCreateMemoryDumpEvents_(event.id);if(event.ph==='v'){events.process.push(event);}else if(event.ph==='V'){if(events.global!==undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Multiple V phase events with the same dump ID.'});return;}
-events.global=event;}else{throw new Error('Invalid memory dump event phase "'+event.ph+'".');}},importEvents:function(){var csr=new tr.ClockSyncRecord('ftrace_importer',0,{});this.model_.clockSyncRecords.push(csr);if(this.stackFrameEvents_)
-this.importStackFrames_();if(this.traceAnnotations_)
-this.importAnnotations_();var events=this.events_;for(var eI=0;eI<events.length;eI++){var event=events[eI];if(event.args==='__stripped__'){event.argsStripped=true;event.args=undefined;}
-if(event.ph==='B'||event.ph==='E'){this.processDurationEvent(event);}else if(event.ph==='X'){this.processCompleteEvent(event);}else if(event.ph==='b'||event.ph==='e'||event.ph==='n'||event.ph==='S'||event.ph==='F'||event.ph==='T'||event.ph==='p'){this.processAsyncEvent(event);}else if(event.ph=='I'||event.ph=='i'){this.processInstantEvent(event);}else if(event.ph=='P'){this.processTraceSampleEvent(event);}else if(event.ph=='C'){this.processCounterEvent(event);}else if(event.ph=='M'){this [...]
-event.ph+' ('+event.name+')'});}}},importStackFrames_:function(){var m=this.model_;var events=this.stackFrameEvents_;for(var id in events){var event=events[id];var textForColor=event.category?event.category:event.name;var frame=new tr.model.StackFrame(undefined,'g'+id,event.category,event.name,tr.ui.b.getColorIdForGeneralPurposeString(textForColor));m.addStackFrame(frame);}
-for(var id in events){var event=events[id];if(event.parent===undefined)
-continue;var frame=m.stackFrames['g'+id];if(frame===undefined)
-throw new Error('omg');var parentFrame;if(event.parent===undefined){parentFrame=undefined;}else{parentFrame=m.stackFrames['g'+event.parent];if(parentFrame===undefined)
-throw new Error('omg');}
-frame.parentFrame=parentFrame;}},importAnnotations_:function(){for(var id in this.traceAnnotations_){var annotation=tr.model.Annotation.fromDictIfPossible(this.traceAnnotations_[id]);if(!annotation){this.model_.importWarning({type:'annotation_warning',message:'Unrecognized traceAnnotation typeName \"'+
-this.traceAnnotations_[id].typeName+'\"'});continue;}
-this.model_.addAnnotation(annotation);}},finalizeImport:function(){if(this.softwareMeasuredCpuCount_!==undefined){this.model_.kernel.softwareMeasuredCpuCount=this.softwareMeasuredCpuCount_;}
-this.createAsyncSlices_();this.createFlowSlices_();this.createExplicitObjects_();this.createImplicitObjects_();this.createMemoryDumps_();},getStackFrameForEvent_:function(event,opt_lookForEndEvent){var sf;var stack;if(opt_lookForEndEvent){sf=event.esf;stack=event.estack;}else{sf=event.sf;stack=event.stack;}
-if(stack!==undefined&&sf!==undefined){this.model_.importWarning({type:'stack_frame_and_stack_error',message:'Event at '+event.ts+' cannot have both a stack and a stackframe.'});return undefined;}
-if(stack!==undefined)
-return this.model_.resolveStackToStackFrame_(event.pid,stack);if(sf===undefined)
-return undefined;var stackFrame=this.model_.stackFrames['g'+sf];if(stackFrame===undefined){this.model_.importWarning({type:'sample_import_error',message:'No frame for '+sf});return;}
-return stackFrame;},resolveStackToStackFrame_:function(pid,stack){return undefined;},importSampleData:function(){if(!this.sampleEvents_)
-return;var m=this.model_;var events=this.sampleEvents_;if(this.events_.length===0){for(var i=0;i<events.length;i++){var event=events[i];m.getOrCreateProcess(event.tid).getOrCreateThread(event.tid);}}
-var threadsByTid={};m.getAllThreads().forEach(function(t){threadsByTid[t.tid]=t;});for(var i=0;i<events.length;i++){var event=events[i];var thread=threadsByTid[event.tid];if(thread===undefined){m.importWarning({type:'sample_import_error',message:'Thread '+events.tid+'not found'});continue;}
-var cpu;if(event.cpu!==undefined)
-cpu=m.kernel.getOrCreateCpu(event.cpu);var stackFrame=this.getStackFrameForEvent_(event);var sample=new tr.model.Sample(cpu,thread,event.name,timestampFromUs(event.ts),stackFrame,event.weight);m.samples.push(sample);}},joinRefs:function(){this.joinObjectRefs_();},createAsyncSlices_:function(){if(this.allAsyncEvents_.length===0)
-return;this.allAsyncEvents_.sort(function(x,y){var d=x.event.ts-y.event.ts;if(d!==0)
-return d;return x.sequenceNumber-y.sequenceNumber;});var legacyEvents=[];var nestableAsyncEventsByKey={};for(var i=0;i<this.allAsyncEvents_.length;i++){var asyncEventState=this.allAsyncEvents_[i];var event=asyncEventState.event;if(event.ph==='S'||event.ph==='F'||event.ph==='T'||event.ph==='p'){legacyEvents.push(asyncEventState);continue;}
-if(event.cat===undefined){this.model_.importWarning({type:'async_slice_parse_error',message:'Nestable async events (ph: b, e, or n) require a '+'cat parameter.'});continue;}
-if(event.name===undefined){this.model_.importWarning({type:'async_slice_parse_error',message:'Nestable async events (ph: b, e, or n) require a '+'name parameter.'});continue;}
-if(event.id===undefined){this.model_.importWarning({type:'async_slice_parse_error',message:'Nestable async events (ph: b, e, or n) require an '+'id parameter.'});continue;}
-var key=event.cat+':'+event.id;if(nestableAsyncEventsByKey[key]===undefined)
-nestableAsyncEventsByKey[key]=[];nestableAsyncEventsByKey[key].push(asyncEventState);}
-this.createLegacyAsyncSlices_(legacyEvents);for(var key in nestableAsyncEventsByKey){var eventStateEntries=nestableAsyncEventsByKey[key];var parentStack=[];for(var i=0;i<eventStateEntries.length;++i){var eventStateEntry=eventStateEntries[i];if(eventStateEntry.event.ph==='e'){var parentIndex=-1;for(var k=parentStack.length-1;k>=0;--k){if(parentStack[k].event.name===eventStateEntry.event.name){parentIndex=k;break;}}
-if(parentIndex===-1){eventStateEntry.finished=false;}else{parentStack[parentIndex].end=eventStateEntry;while(parentIndex<parentStack.length){parentStack.pop();}}}
-if(parentStack.length>0)
-eventStateEntry.parentEntry=parentStack[parentStack.length-1];if(eventStateEntry.event.ph==='b')
-parentStack.push(eventStateEntry);}
-var topLevelSlices=[];for(var i=0;i<eventStateEntries.length;++i){var eventStateEntry=eventStateEntries[i];if(eventStateEntry.event.ph==='e'&&eventStateEntry.finished===undefined){continue;}
-var startState=undefined;var endState=undefined;var sliceArgs=eventStateEntry.event.args||{};var sliceError=undefined;if(eventStateEntry.event.ph==='n'){startState=eventStateEntry;endState=eventStateEntry;}else if(eventStateEntry.event.ph==='b'){if(eventStateEntry.end===undefined){eventStateEntry.end=eventStateEntries[eventStateEntries.length-1];sliceError='Slice has no matching END. End time has been adjusted.';this.model_.importWarning({type:'async_slice_parse_error',message:'Nestable  [...]
-eventStateEntry.event.ts+' with name='+
-eventStateEntry.event.name+' and id='+eventStateEntry.event.id+' was unmatched.'});}else{var concatenateArguments=function(args1,args2){if(args1.params===undefined||args2.params===undefined)
-return tr.b.concatenateObjects(args1,args2);var args3={};args3.params=tr.b.concatenateObjects(args1.params,args2.params);return tr.b.concatenateObjects(args1,args2,args3);}
-var endArgs=eventStateEntry.end.event.args||{};sliceArgs=concatenateArguments(sliceArgs,endArgs);}
-startState=eventStateEntry;endState=eventStateEntry.end;}else{sliceError='Slice has no matching BEGIN. Start time has been adjusted.';this.model_.importWarning({type:'async_slice_parse_error',message:'Nestable async END event at '+
-eventStateEntry.event.ts+' with name='+
-eventStateEntry.event.name+' and id='+eventStateEntry.event.id+' was unmatched.'});startState=eventStateEntries[0];endState=eventStateEntry;}
-var isTopLevel=(eventStateEntry.parentEntry===undefined);var asyncSliceConstructor=tr.model.AsyncSlice.getConstructor(eventStateEntry.event.cat,eventStateEntry.event.name);var thread_start=undefined;var thread_duration=undefined;if(startState.event.tts&&startState.event.use_async_tts){thread_start=timestampFromUs(startState.event.tts);if(endState.event.tts){var thread_end=timestampFromUs(endState.event.tts);thread_duration=thread_end-thread_start;}}
-var slice=new asyncSliceConstructor(eventStateEntry.event.cat,eventStateEntry.event.name,tr.ui.b.getColorIdForGeneralPurposeString(eventStateEntry.event.name),timestampFromUs(startState.event.ts),sliceArgs,timestampFromUs(endState.event.ts-startState.event.ts),isTopLevel,thread_start,thread_duration,startState.event.argsStripped);slice.startThread=startState.thread;slice.endThread=endState.thread;slice.id=key;if(sliceError!==undefined)
-slice.error=sliceError;eventStateEntry.slice=slice;if(isTopLevel){topLevelSlices.push(slice);}else if(eventStateEntry.parentEntry.slice!==undefined){eventStateEntry.parentEntry.slice.subSlices.push(slice);}}
-for(var si=0;si<topLevelSlices.length;si++){topLevelSlices[si].startThread.asyncSliceGroup.push(topLevelSlices[si]);}}},createLegacyAsyncSlices_:function(legacyEvents){if(legacyEvents.length===0)
-return;legacyEvents.sort(function(x,y){var d=x.event.ts-y.event.ts;if(d!=0)
-return d;return x.sequenceNumber-y.sequenceNumber;});var asyncEventStatesByNameThenID={};for(var i=0;i<legacyEvents.length;i++){var asyncEventState=legacyEvents[i];var event=asyncEventState.event;var name=event.name;if(name===undefined){this.model_.importWarning({type:'async_slice_parse_error',message:'Async events (ph: S, T, p, or F) require a name '+' parameter.'});continue;}
-var id=event.id;if(id===undefined){this.model_.importWarning({type:'async_slice_parse_error',message:'Async events (ph: S, T, p, or F) require an id parameter.'});continue;}
-if(event.ph==='S'){if(asyncEventStatesByNameThenID[name]===undefined)
-asyncEventStatesByNameThenID[name]={};if(asyncEventStatesByNameThenID[name][id]){this.model_.importWarning({type:'async_slice_parse_error',message:'At '+event.ts+', a slice of the same id '+id+' was alrady open.'});continue;}
-asyncEventStatesByNameThenID[name][id]=[];asyncEventStatesByNameThenID[name][id].push(asyncEventState);}else{if(asyncEventStatesByNameThenID[name]===undefined){this.model_.importWarning({type:'async_slice_parse_error',message:'At '+event.ts+', no slice named '+name+' was open.'});continue;}
-if(asyncEventStatesByNameThenID[name][id]===undefined){this.model_.importWarning({type:'async_slice_parse_error',message:'At '+event.ts+', no slice named '+name+' with id='+id+' was open.'});continue;}
-var events=asyncEventStatesByNameThenID[name][id];events.push(asyncEventState);if(event.ph==='F'){var asyncSliceConstructor=tr.model.AsyncSlice.getConstructor(events[0].event.cat,name);var slice=new asyncSliceConstructor(events[0].event.cat,name,tr.ui.b.getColorIdForGeneralPurposeString(name),timestampFromUs(events[0].event.ts),tr.b.concatenateObjects(events[0].event.args,events[events.length-1].event.args),timestampFromUs(event.ts-events[0].event.ts),true,undefined,undefined,events[0].e [...]
-break;}
-if(events[j].event.ph==='S'){this.model_.importWarning({type:'async_slice_parse_error',message:'At '+event.event.ts+', a slice named '+
-event.event.name+' with id='+event.event.id+' had a step before the start event.'});continue;}
-if(events[j].event.ph==='F'){this.model_.importWarning({type:'async_slice_parse_error',message:'At '+event.event.ts+', a slice named '+
-event.event.name+' with id='+event.event.id+' had a step after the finish event.'});continue;}
-var startIndex=j+(stepType==='T'?0:-1);var endIndex=startIndex+1;var subName=events[j].event.name;if(!events[j].event.argsStripped&&(events[j].event.ph==='T'||events[j].event.ph==='p'))
-subName=subName+':'+events[j].event.args.step;var asyncSliceConstructor=tr.model.AsyncSlice.getConstructor(events[0].event.cat,subName);var subSlice=new asyncSliceConstructor(events[0].event.cat,subName,tr.ui.b.getColorIdForGeneralPurposeString(subName+j),timestampFromUs(events[startIndex].event.ts),this.deepCopyIfNeeded_(events[j].event.args),timestampFromUs(events[endIndex].event.ts-events[startIndex].event.ts),undefined,undefined,events[startIndex].event.argsStripped);subSlice.startTh [...]
-if(isValid){slice.startThread.asyncSliceGroup.push(slice);}
-delete asyncEventStatesByNameThenID[name][id];}}}},assertStepTypeMatches_:function(stepType,event){if(stepType!=event.event.ph){this.model_.importWarning({type:'async_slice_parse_error',message:'At '+event.event.ts+', a slice named '+
-event.event.name+' with id='+event.event.id+' had both begin and end steps, which is not allowed.'});return false;}
-return true;},createFlowSlices_:function(){if(this.allFlowEvents_.length===0)
-return;var that=this;function validateFlowEvent(){if(event.name===undefined){that.model_.importWarning({type:'flow_slice_parse_error',message:'Flow events (ph: s, t or f) require a name parameter.'});return false;}
-if(event.id===undefined){that.model_.importWarning({type:'flow_slice_parse_error',message:'Flow events (ph: s, t or f) require an id parameter.'});return false;}
-return true;}
-function createFlowEvent(thread,event,refGuid){var ts=timestampFromUs(event.ts);var startSlice=thread.sliceGroup.findSliceAtTs(ts);if(startSlice===undefined)
-return undefined;var flowEvent=new tr.model.FlowEvent(event.cat,event.id,event.name,tr.ui.b.getColorIdForGeneralPurposeString(event.name),timestampFromUs(event.ts),that.deepCopyIfNeeded_(event.args));flowEvent.startSlice=startSlice;startSlice.outFlowEvents.push(flowEvent);return flowEvent;}
-function finishFlowEventWith(flowEvent,thread,event,refGuid,bindToParent){var endSlice;var ts=timestampFromUs(event.ts);if(bindToParent){endSlice=thread.sliceGroup.findSliceAtTs(ts);}else{endSlice=thread.sliceGroup.findNextSliceAfter(ts,refGuid);}
-if(endSlice===undefined)
-return false;endSlice.inFlowEvents.push(flowEvent);flowEvent.endSlice=endSlice;flowEvent.duration=ts-flowEvent.start;that.mergeArgsInto_(flowEvent.args,event.args,flowEvent.title);return true;}
-this.allFlowEvents_.sort(function(x,y){var d=x.event.ts-y.event.ts;if(d!=0)
-return d;return x.sequenceNumber-y.sequenceNumber;});var flowIdToEvent={};for(var i=0;i<this.allFlowEvents_.length;++i){var data=this.allFlowEvents_[i];var refGuid=data.refGuid;var event=data.event;var thread=data.thread;if(!validateFlowEvent(event))
-continue;var flowEvent;if(event.ph==='s'){if(flowIdToEvent[event.id]){this.model_.importWarning({type:'flow_slice_start_error',message:'event id '+event.id+' already seen when '+'encountering start of flow event.'});continue;}
-flowEvent=createFlowEvent(thread,event,refGuid);if(!flowEvent){this.model_.importWarning({type:'flow_slice_start_error',message:'event id '+event.id+' does not start '+'at an actual slice, so cannot be created.'});continue;}
-flowIdToEvent[event.id]=flowEvent;}else if(event.ph==='t'||event.ph==='f'){flowEvent=flowIdToEvent[event.id];if(flowEvent===undefined){this.model_.importWarning({type:'flow_slice_ordering_error',message:'Found flow phase '+event.ph+' for id: '+event.id+' but no flow start found.'});continue;}
-var bindToParent=event.ph==='t';if(event.ph==='f'){if(event.bp===undefined){if(event.cat.indexOf('input')>-1)
-bindToParent=true;else if(event.cat.indexOf('ipc.flow')>-1)
-bindToParent=true;}else{if(event.bp!=='e'){this.model_.importWarning({type:'flow_slice_bind_point_error',message:'Flow event with invalid binding point (event.bp).'});continue;}
-bindToParent=true;}}
-var ok=finishFlowEventWith(flowEvent,thread,event,refGuid,bindToParent);if(ok){that.model_.flowEvents.push(flowEvent);}else{this.model_.importWarning({type:'flow_slice_start_error',message:'event id '+event.id+' does not end '+'at an actual slice, so cannot be created.'});}
-flowIdToEvent[event.id]=undefined;if(ok&&event.ph==='t'){flowEvent=createFlowEvent(thread,event);flowIdToEvent[event.id]=flowEvent;}}}},createExplicitObjects_:function(){if(this.allObjectEvents_.length==0)
-return;function processEvent(objectEventState){var event=objectEventState.event;var thread=objectEventState.thread;if(event.name===undefined){this.model_.importWarning({type:'object_parse_error',message:'While processing '+JSON.stringify(event)+': '+'Object events require an name parameter.'});}
-if(event.id===undefined){this.model_.importWarning({type:'object_parse_error',message:'While processing '+JSON.stringify(event)+': '+'Object events require an id parameter.'});}
-var process=thread.parent;var ts=timestampFromUs(event.ts);var instance;if(event.ph=='N'){try{instance=process.objects.idWasCreated(event.id,event.cat,event.name,ts);}catch(e){this.model_.importWarning({type:'object_parse_error',message:'While processing create of '+
-event.id+' at ts='+ts+': '+e});return;}}else if(event.ph=='O'){if(event.args.snapshot===undefined){this.model_.importWarning({type:'object_parse_error',message:'While processing '+event.id+' at ts='+ts+': '+'Snapshots must have args: {snapshot: ...}'});return;}
-var snapshot;try{var args=this.deepCopyIfNeeded_(event.args.snapshot);var cat;if(args.cat){cat=args.cat;delete args.cat;}else{cat=event.cat;}
-var baseTypename;if(args.base_type){baseTypename=args.base_type;delete args.base_type;}else{baseTypename=undefined;}
-snapshot=process.objects.addSnapshot(event.id,cat,event.name,ts,args,baseTypename);snapshot.snapshottedOnThread=thread;}catch(e){this.model_.importWarning({type:'object_parse_error',message:'While processing snapshot of '+
-event.id+' at ts='+ts+': '+e});return;}
-instance=snapshot.objectInstance;}else if(event.ph=='D'){try{instance=process.objects.idWasDeleted(event.id,event.cat,event.name,ts);}catch(e){this.model_.importWarning({type:'object_parse_error',message:'While processing delete of '+
-event.id+' at ts='+ts+': '+e});return;}}
-if(instance){instance.colorId=tr.ui.b.getColorIdForGeneralPurposeString(instance.typeName);}}
-this.allObjectEvents_.sort(function(x,y){var d=x.event.ts-y.event.ts;if(d!=0)
-return d;return x.sequenceNumber-y.sequenceNumber;});var allObjectEvents=this.allObjectEvents_;for(var i=0;i<allObjectEvents.length;i++){var objectEventState=allObjectEvents[i];try{processEvent.call(this,objectEventState);}catch(e){this.model_.importWarning({type:'object_parse_error',message:e.message});}}},createImplicitObjects_:function(){tr.b.iterItems(this.model_.processes,function(pid,process){this.createImplicitObjectsForProcess_(process);},this);},createImplicitObjectsForProcess_: [...]
-return;if(referencingObjectFieldValue instanceof
-tr.model.ObjectSnapshot)
-return null;if(referencingObjectFieldValue.id===undefined)
-return;var implicitSnapshot=referencingObjectFieldValue;var rawId=implicitSnapshot.id;var m=/(.+)\/(.+)/.exec(rawId);if(!m)
-throw new Error('Implicit snapshots must have names.');delete implicitSnapshot.id;var name=m[1];var id=m[2];var res;var cat;if(implicitSnapshot.cat!==undefined)
-cat=implicitSnapshot.cat;else
-cat=containingSnapshot.objectInstance.category;var baseTypename;if(implicitSnapshot.base_type)
-baseTypename=implicitSnapshot.base_type;else
-baseTypename=undefined;try{res=process.objects.addSnapshot(id,cat,name,containingSnapshot.ts,implicitSnapshot,baseTypename);}catch(e){this.model_.importWarning({type:'object_snapshot_parse_error',message:'While processing implicit snapshot of '+
-rawId+' at ts='+containingSnapshot.ts+': '+e});return;}
-res.objectInstance.hasImplicitSnapshots=true;res.containingSnapshot=containingSnapshot;res.snapshottedOnThread=containingSnapshot.snapshottedOnThread;referencingObject[referencingObjectFieldName]=res;if(!(res instanceof tr.model.ObjectSnapshot))
-throw new Error('Created object must be instanceof snapshot');return res.args;}
-function iterObject(object,func,containingSnapshot,thisArg){if(!(object instanceof Object))
-return;if(object instanceof Array){for(var i=0;i<object.length;i++){var res=func.call(thisArg,object,i,object[i],containingSnapshot);if(res===null)
-continue;if(res)
-iterObject(res,func,containingSnapshot,thisArg);else
-iterObject(object[i],func,containingSnapshot,thisArg);}
-return;}
-for(var key in object){var res=func.call(thisArg,object,key,object[key],containingSnapshot);if(res===null)
-continue;if(res)
-iterObject(res,func,containingSnapshot,thisArg);else
-iterObject(object[key],func,containingSnapshot,thisArg);}}
-process.objects.iterObjectInstances(function(instance){instance.snapshots.forEach(function(snapshot){if(snapshot.args.id!==undefined)
-throw new Error('args cannot have an id field inside it');iterObject(snapshot.args,processField,snapshot,this);},this);},this);},createMemoryDumps_:function(){tr.b.iterItems(this.allMemoryDumpEvents_,function(id,events){var range=new tr.b.Range();if(events.global!==undefined)
-range.addValue(timestampFromUs(events.global.ts));for(var i=0;i<events.process.length;i++)
-range.addValue(timestampFromUs(events.process[i].ts));var globalMemoryDump=new tr.model.GlobalMemoryDump(this.model_,range.min);globalMemoryDump.duration=range.range;this.model_.globalMemoryDumps.push(globalMemoryDump);if(events.process.length===0){this.model_.importWarning({type:'memory_dump_parse_error',message:'No process memory dumps associated with global memory'+' dump '+id+'.'});}
-var allMemoryAllocatorDumpsByGuid={};var globalMemoryAllocatorDumpsByFullName={};events.process.forEach(function(processEvent){var pid=processEvent.pid;if(pid in globalMemoryDump.processMemoryDumps){this.model_.importWarning({type:'memory_dump_parse_error',message:'Multiple process memory dumps with pid='+pid+' for dump id '+id+'.'});return;}
-var dumps=processEvent.args.dumps;if(dumps===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'dumps not found in process memory dump for '+'pid='+pid+' and dump id='+id+'.'});return;}
-var process=this.model_.getOrCreateProcess(pid);var processMemoryDump=new tr.model.ProcessMemoryDump(globalMemoryDump,process,timestampFromUs(processEvent.ts));if(dumps.process_totals===undefined||dumps.process_totals.resident_set_bytes===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Mandatory field resident_set_bytes not found in'+' process memory dump for pid='+pid+' and dump id='+id+'.'});processMemoryDump.totalResidentBytes=undefined;}else{processMemor [...]
-if(dumps.process_mmaps&&dumps.process_mmaps.vm_regions){function parseByteStat(rawValue){if(rawValue===undefined)
-return undefined;return parseInt(rawValue,16);}
-processMemoryDump.vmRegions=dumps.process_mmaps.vm_regions.map(function(rawRegion){var byteStats=new tr.model.VMRegionByteStats(parseByteStat(rawRegion.bs.pc),parseByteStat(rawRegion.bs.pd),parseByteStat(rawRegion.bs.sc),parseByteStat(rawRegion.bs.sd),parseByteStat(rawRegion.bs.pss),parseByteStat(rawRegion.bs.sw));return new tr.model.VMRegion(parseInt(rawRegion.sa,16),parseInt(rawRegion.sz,16),rawRegion.pf,rawRegion.mf,byteStats);});}
-var processMemoryAllocatorDumpsByFullName={};if(dumps.allocators!==undefined){tr.b.iterItems(dumps.allocators,function(fullName,rawAllocatorDump){var guid=rawAllocatorDump.guid;if(guid===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Memory allocator dump '+fullName+' from pid='+pid+' does not have a GUID.'});}
-var GLOBAL_MEMORY_ALLOCATOR_DUMP_PREFIX='global/';var containerMemoryDump;var dstIndex;if(fullName.startsWith(GLOBAL_MEMORY_ALLOCATOR_DUMP_PREFIX)){fullName=fullName.substring(GLOBAL_MEMORY_ALLOCATOR_DUMP_PREFIX.length);containerMemoryDump=globalMemoryDump;dstIndex=globalMemoryAllocatorDumpsByFullName;}else{containerMemoryDump=processMemoryDump;dstIndex=processMemoryAllocatorDumpsByFullName;}
-var allocatorDump=allMemoryAllocatorDumpsByGuid[guid];if(allocatorDump===undefined){if(fullName in dstIndex){this.model_.importWarning({type:'memory_dump_parse_error',message:'Multiple GUIDs provided for'+' memory allocator dump '+fullName+': '+
-dstIndex[fullName].guid+', '+guid+' (ignored).'});return;}
-allocatorDump=new tr.model.MemoryAllocatorDump(containerMemoryDump,fullName,guid);dstIndex[fullName]=allocatorDump;if(guid!==undefined)
-allMemoryAllocatorDumpsByGuid[guid]=allocatorDump;}else{if(allocatorDump.containerMemoryDump!==containerMemoryDump){this.model_.importWarning({type:'memory_dump_parse_error',message:'Memory allocator dump '+fullName+' (GUID='+guid+') dumped in different contexts.'});return;}
-if(allocatorDump.fullName!==fullName){this.model_.importWarning({type:'memory_dump_parse_error',message:'Memory allocator dump with GUID='+guid+' has multiple names: '+allocatorDump.fullName+', '+fullName+' (ignored).'});return;}}
-var attributes=rawAllocatorDump.attrs;tr.b.iterItems(attributes,function(attrName,attrArgs){if(attrName in allocatorDump.attributes){this.model_.importWarning({type:'memory_dump_parse_error',message:'Multiple values provided for attribute '+
-attrName+' of memory allocator dump '+fullName+' (GUID='+guid+').'});return;}
-var attrValue=tr.model.Attribute.fromDictIfPossible(attrArgs);allocatorDump.addAttribute(attrName,attrValue);},this);},this);}
-processMemoryDump.memoryAllocatorDumps=this.inferMemoryAllocatorDumpTree_(processMemoryAllocatorDumpsByFullName);process.memoryDumps.push(processMemoryDump);globalMemoryDump.processMemoryDumps[pid]=processMemoryDump;},this);globalMemoryDump.memoryAllocatorDumps=this.inferMemoryAllocatorDumpTree_(globalMemoryAllocatorDumpsByFullName);events.process.forEach(function(processEvent){var dumps=processEvent.args.dumps;if(dumps===undefined)
-return;var edges=dumps.allocators_graph;if(edges===undefined)
-return;edges.forEach(function(rawEdge){var sourceGuid=rawEdge.source;var sourceDump=allMemoryAllocatorDumpsByGuid[sourceGuid];if(sourceDump===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Edge is missing source memory allocator dump (GUID='+
-sourceGuid+')'});return;}
-var targetGuid=rawEdge.target;var targetDump=allMemoryAllocatorDumpsByGuid[targetGuid];if(targetDump===undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Edge is missing target memory allocator dump (GUID='+
-targetGuid+')'});return;}
-var importance=rawEdge.importance;var edge=new tr.model.MemoryAllocatorDumpLink(sourceDump,targetDump,importance);switch(rawEdge.type){case'ownership':if(sourceDump.owns!==undefined){this.model_.importWarning({type:'memory_dump_parse_error',message:'Memory allocator dump '+sourceDump.fullName+' (GUID='+sourceGuid+') already owns a memory'+' allocator dump ('+
-sourceDump.owns.target.fullName+').'});return;}
-sourceDump.owns=edge;targetDump.ownedBy.push(edge);break;case'retention':sourceDump.retains.push(edge);targetDump.retainedBy.push(edge);break;default:this.model_.importWarning({type:'memory_dump_parse_error',message:'Invalid edge type: '+rawEdge.type+' (source='+sourceGuid+', target='+targetGuid+', importance='+importance+').'});}},this);},this);},this);},inferMemoryAllocatorDumpTree_:function(memoryAllocatorDumpsByFullName){var rootAllocatorDumps=[];var fullNames=Object.keys(memoryAlloc [...]
-var parentFullName=fullName.substring(0,lastSlashIndex);var parentAllocatorDump=memoryAllocatorDumpsByFullName[parentFullName];var parentAlreadyExisted=true;if(parentAllocatorDump===undefined){parentAlreadyExisted=false;parentAllocatorDump=new tr.model.MemoryAllocatorDump(allocatorDump.containerMemoryDump,parentFullName);memoryAllocatorDumpsByFullName[parentFullName]=parentAllocatorDump;}
-allocatorDump.parent=parentAllocatorDump;parentAllocatorDump.children.push(allocatorDump);if(parentAlreadyExisted)
-break;fullName=parentFullName;allocatorDump=parentAllocatorDump;}},this);return rootAllocatorDumps;},joinObjectRefs_:function(){tr.b.iterItems(this.model_.processes,function(pid,process){this.joinObjectRefsForProcess_(process);},this);},joinObjectRefsForProcess_:function(process){var patchupsToApply=[];tr.b.iterItems(process.threads,function(tid,thread){thread.asyncSliceGroup.slices.forEach(function(item){this.searchItemForIDRefs_(patchupsToApply,process.objects,'start',item);},this);thr [...]
-throw new Error('item is missing its args');function handleField(object,fieldName,fieldValue){if(!fieldValue||(!fieldValue.id_ref&&!fieldValue.idRef))
-return;var id=fieldValue.id_ref||fieldValue.idRef;var ts=item[itemTimestampField];var snapshot=objectCollection.getSnapshotAt(id,ts);if(!snapshot)
-return;patchupsToApply.push({object:object,field:fieldName,value:snapshot});}
-function iterObjectFieldsRecursively(object){if(!(object instanceof Object))
-return;if((object instanceof tr.model.ObjectSnapshot)||(object instanceof Float32Array)||(object instanceof tr.b.Quad))
-return;if(object instanceof Array){for(var i=0;i<object.length;i++){handleField(object,i,object[i]);iterObjectFieldsRecursively(object[i]);}
-return;}
-for(var key in object){var value=object[key];handleField(object,key,value);iterObjectFieldsRecursively(value);}}
-iterObjectFieldsRecursively(item.args);}};tr.importer.Importer.register(TraceEventImporter);return{TraceEventImporter:TraceEventImporter};});'use strict';tr.exportTo('tr.ui.e.highlighter',function(){var Highlighter=tr.ui.tracks.Highlighter;function VSyncHighlighter(viewport){Highlighter.call(this,viewport);this.times_=[];}
-VSyncHighlighter.VSYNC_HIGHLIGHT_COLOR={r:0,g:0,b:255};VSyncHighlighter.VSYNC_HIGHLIGHT_ALPHA=0.1;VSyncHighlighter.VSYNC_DENSITY_TRANSPARENT=0.20;VSyncHighlighter.VSYNC_DENSITY_OPAQUE=0.10;VSyncHighlighter.VSYNC_DENSITY_RANGE=VSyncHighlighter.VSYNC_DENSITY_TRANSPARENT-
-VSyncHighlighter.VSYNC_DENSITY_OPAQUE;VSyncHighlighter.VSYNC_COUNTER_PRECISIONS={'android.VSYNC-app':15,'android.VSYNC':15};VSyncHighlighter.VSYNC_SLICE_PRECISIONS={'RenderWidgetHostViewAndroid::OnVSync':5,'VSYNC':10,'vblank':10,'DisplayLinkMac::GetVSyncParameters':5};VSyncHighlighter.findVSyncTimes=function(model){var times=[];var maxPrecision=Number.NEGATIVE_INFINITY;var maxTitle=undefined;var useInstead=function(title,precisions){if(title!=maxTitle){var precision=precisions[title];if( [...]
-maxTitle+', '+title+') with the same precision, '+'ignoring the newer one ('+title+')');}
-return false;}
-maxPrecision=precision;maxTitle=title;times=[];}
-return true;}
-for(var pid in model.processes){var process=model.processes[pid];for(var cid in process.counters){if(useInstead(cid,VSyncHighlighter.VSYNC_COUNTER_PRECISIONS)){var counter=process.counters[cid];for(var i=0;i<counter.series.length;i++){var series=counter.series[i];Array.prototype.push.apply(times,series.timestamps);}}}
-for(var tid in process.threads){var thread=process.threads[tid];for(var i=0;i<thread.sliceGroup.slices.length;i++){var slice=thread.sliceGroup.slices[i];if(useInstead(slice.title,VSyncHighlighter.VSYNC_SLICE_PRECISIONS)){times.push(slice.start);}}}}
-times.sort(function(x,y){return x-y;});return times;};VSyncHighlighter.generateStripes=function(times,minTime,maxTime){var stripes=[];var lowIndex=tr.b.findLowIndexInSortedArray(times,function(time){return time;},minTime);if(lowIndex>times.length){lowIndex=times.length;}
-var highIndex=lowIndex-1;while(times[highIndex+1]<=maxTime){highIndex++;}
-for(var i=lowIndex-(lowIndex%2);i<=highIndex;i+=2){var left=i<lowIndex?minTime:times[i];var right=i+1>highIndex?maxTime:times[i+1];stripes.push([left,right]);}
-return stripes;}
-VSyncHighlighter.prototype={__proto__:Highlighter.prototype,processModel:function(model){this.times_=VSyncHighlighter.findVSyncTimes(model);},drawHighlight:function(ctx,dt,viewLWorld,viewRWorld,viewHeight){if(!this.viewport_.highlightVSync){return;}
-var stripes=VSyncHighlighter.generateStripes(this.times_,viewLWorld,viewRWorld);if(stripes.length==0){return;}
-var stripeRange=stripes[stripes.length-1][1]-stripes[0][0];var stripeDensity=stripes.length/(dt.scaleX*stripeRange);var clampedStripeDensity=tr.b.clamp(stripeDensity,VSyncHighlighter.VSYNC_DENSITY_OPAQUE,VSyncHighlighter.VSYNC_DENSITY_TRANSPARENT);var opacity=(VSyncHighlighter.VSYNC_DENSITY_TRANSPARENT-clampedStripeDensity)/VSyncHighlighter.VSYNC_DENSITY_RANGE;if(opacity==0){return;}
-var pixelRatio=window.devicePixelRatio||1;var height=viewHeight*pixelRatio;ctx.fillStyle=tr.ui.b.colorToRGBAString(VSyncHighlighter.VSYNC_HIGHLIGHT_COLOR,VSyncHighlighter.VSYNC_HIGHLIGHT_ALPHA*opacity);for(var i=0;i<stripes.length;i++){var xLeftView=dt.xWorldToView(stripes[i][0]);var xRightView=dt.xWorldToView(stripes[i][1]);ctx.fillRect(xLeftView,0,xRightView-xLeftView,height);}}};tr.ui.tracks.Highlighter.register(VSyncHighlighter);return{VSyncHighlighter:VSyncHighlighter};});
-</script>
-</head>
-  <body>
-  </body>
-</html>
diff --git a/src/archive/tar/testdata/hardlink.tar b/src/archive/tar/testdata/hardlink.tar
deleted file mode 100644
index 9cd1a26..0000000
Binary files a/src/archive/tar/testdata/hardlink.tar and /dev/null differ
diff --git a/src/archive/tar/testdata/issue10968.tar b/src/archive/tar/testdata/issue10968.tar
deleted file mode 100644
index 1cc837b..0000000
Binary files a/src/archive/tar/testdata/issue10968.tar and /dev/null differ
diff --git a/src/archive/tar/testdata/issue11169.tar b/src/archive/tar/testdata/issue11169.tar
deleted file mode 100644
index 4d71fa1..0000000
Binary files a/src/archive/tar/testdata/issue11169.tar and /dev/null differ
diff --git a/src/archive/tar/testdata/neg-size.tar b/src/archive/tar/testdata/neg-size.tar
deleted file mode 100644
index 5deea3d..0000000
Binary files a/src/archive/tar/testdata/neg-size.tar and /dev/null differ
diff --git a/src/bootstrap.bash b/src/bootstrap.bash
deleted file mode 100755
index 60d6151..0000000
--- a/src/bootstrap.bash
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/bin/bash
-# Copyright 2015 The Go Authors.  All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# When run as (for example)
-#
-#	GOOS=linux GOARCH=ppc64 bootstrap.bash
-#
-# this script cross-compiles a toolchain for that GOOS/GOARCH
-# combination, leaving the resulting tree in ../../go-${GOOS}-${GOARCH}-bootstrap.
-# That tree can be copied to a machine of the given target type
-# and used as $GOROOT_BOOTSTRAP to bootstrap a local build.
-#
-# Only changes that have been committed to Git (at least locally,
-# not necessary reviewed and submitted to master) are included in the tree.
-
-set -e
-
-if [ "$GOOS" = "" -o "$GOARCH" = "" ]; then
-	echo "usage: GOOS=os GOARCH=arch ./bootstrap.bash" >&2
-	exit 2
-fi
-
-targ="../../go-${GOOS}-${GOARCH}-bootstrap"
-if [ -e $targ ]; then
-	echo "$targ already exists; remove before continuing"
-	exit 2
-fi
-
-unset GOROOT
-src=$(cd .. && pwd)
-echo "#### Copying to $targ"
-cp -R "$src" "$targ"
-cd "$targ"
-echo
-echo "#### Cleaning $targ"
-rm .gitignore
-git clean -f -d
-echo
-echo "#### Building $targ"
-echo
-cd src
-./make.bash --no-banner
-gohostos="$(../bin/go env GOHOSTOS)"
-gohostarch="$(../bin/go env GOHOSTARCH)"
-goos="$(../bin/go env GOOS)"
-goarch="$(../bin/go env GOARCH)"
-
-# NOTE: Cannot invoke go command after this point.
-# We're about to delete all but the cross-compiled binaries.
-cd ..
-if [ "$goos" = "$gohostos" -a "$goarch" = "$gohostarch" ]; then
-	# cross-compile for local system. nothing to copy.
-	# useful if you've bootstrapped yourself but want to
-	# prepare a clean toolchain for others.
-	true
-else
-	mv bin/*_*/* bin
-	rmdir bin/*_*
-	rm -rf "pkg/${gohostos}_${gohostarch}" "pkg/tool/${gohostos}_${gohostarch}"
-fi
-rm -rf pkg/bootstrap pkg/obj .git
-
-echo ----
-echo Bootstrap toolchain for "$GOOS/$GOARCH" installed in "$(pwd)".
-echo Building tbz.
-cd ..
-tar cf - "go-${GOOS}-${GOARCH}-bootstrap" | bzip2 -9 >"go-${GOOS}-${GOARCH}-bootstrap.tbz"
-ls -l "$(pwd)/go-${GOOS}-${GOARCH}-bootstrap.tbz"
-exit 0
diff --git a/src/buildall.bash b/src/buildall.bash
deleted file mode 100755
index ba23d31..0000000
--- a/src/buildall.bash
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2015 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# Usage: buildall.sh [-e] [pattern]
-#
-# buildall.bash builds the standard library for all Go-supported
-# architectures. It is used by the "all-compile" trybot builder,
-# as a smoke test to quickly flag portability issues.
-#
-# Options:
-#   -e: stop at first failure
-
-if [ ! -f run.bash ]; then
-	echo 'buildall.bash must be run from $GOROOT/src' 1>&2
-	exit 1
-fi
-
-sete=false
-if [ "$1" = "-e" ]; then
-    sete=true
-    shift
-fi
-
-if [ "$sete" = true ]; then
-    set -e
-fi
-
-pattern="$1"
-if [ "$pattern" = "" ]; then
-    pattern=.
-fi
-
-# put linux, nacl first in the target list to get all the architectures up front.
-targets="$((ls runtime | sed -n 's/^rt0_\(.*\)_\(.*\)\.s/\1-\2/p'; echo linux-386-387 linux-arm-arm5) | sort | egrep -v android-arm | egrep "$pattern" | egrep 'linux|nacl')
-$(ls runtime | sed -n 's/^rt0_\(.*\)_\(.*\)\.s/\1-\2/p' | egrep -v 'android-arm|darwin-arm' | egrep "$pattern" | egrep -v 'linux|nacl')"
-
-./make.bash || exit 1
-GOROOT="$(cd .. && pwd)"
-
-failed=false
-for target in $targets
-do
-    echo ""
-    echo "### Building $target"
-    export GOOS=$(echo $target | sed 's/-.*//')
-    export GOARCH=$(echo $target | sed 's/.*-//')
-    unset GO386 GOARM
-    if [ "$GOARCH" = "arm5" ]; then
-        export GOARCH=arm
-        export GOARM=5
-    fi
-    if [ "$GOARCH" = "387" ]; then
-        export GOARCH=386
-        export GO386=387
-    fi
-    if ! "$GOROOT/bin/go" build -a std cmd; then
-        failed=true
-        if $sete; then
-            exit 1
-        fi
-    fi
-done
-
-if [ "$failed" = "true" ]; then
-    echo "" 1>&2
-    echo "Build(s) failed." 1>&2
-    exit 1
-fi
diff --git a/src/cmd/asm/internal/arch/arch.go b/src/cmd/asm/internal/arch/arch.go
deleted file mode 100644
index e6901eb..0000000
--- a/src/cmd/asm/internal/arch/arch.go
+++ /dev/null
@@ -1,363 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package arch
-
-import (
-	"cmd/internal/obj"
-	"cmd/internal/obj/arm"
-	"cmd/internal/obj/arm64"
-	"cmd/internal/obj/ppc64"
-	"cmd/internal/obj/x86"
-	"fmt"
-	"strings"
-)
-
-// Pseudo-registers whose names are the constant name without the leading R.
-const (
-	RFP = -(iota + 1)
-	RSB
-	RSP
-	RPC
-)
-
-// Arch wraps the link architecture object with more architecture-specific information.
-type Arch struct {
-	*obj.LinkArch
-	// Map of instruction names to enumeration.
-	Instructions map[string]int
-	// Map of register names to enumeration.
-	Register map[string]int16
-	// Table of register prefix names. These are things like R for R(0) and SPR for SPR(268).
-	RegisterPrefix map[string]bool
-	// RegisterNumber converts R(10) into arm.REG_R10.
-	RegisterNumber func(string, int16) (int16, bool)
-	// Instruction is a jump.
-	IsJump func(word string) bool
-}
-
-// nilRegisterNumber is the register number function for architectures
-// that do not accept the R(N) notation. It always returns failure.
-func nilRegisterNumber(name string, n int16) (int16, bool) {
-	return 0, false
-}
-
-var Pseudos = map[string]int{
-	"DATA":     obj.ADATA,
-	"FUNCDATA": obj.AFUNCDATA,
-	"GLOBL":    obj.AGLOBL,
-	"PCDATA":   obj.APCDATA,
-	"TEXT":     obj.ATEXT,
-}
-
-// Set configures the architecture specified by GOARCH and returns its representation.
-// It returns nil if GOARCH is not recognized.
-func Set(GOARCH string) *Arch {
-	switch GOARCH {
-	case "386":
-		return archX86(&x86.Link386)
-	case "amd64":
-		return archX86(&x86.Linkamd64)
-	case "amd64p32":
-		return archX86(&x86.Linkamd64p32)
-	case "arm":
-		return archArm()
-	case "arm64":
-		return archArm64()
-	case "ppc64":
-		a := archPPC64()
-		a.LinkArch = &ppc64.Linkppc64
-		return a
-	case "ppc64le":
-		a := archPPC64()
-		a.LinkArch = &ppc64.Linkppc64le
-		return a
-	}
-	return nil
-}
-
-func jumpX86(word string) bool {
-	return word[0] == 'J' || word == "CALL" || strings.HasPrefix(word, "LOOP")
-}
-
-func archX86(linkArch *obj.LinkArch) *Arch {
-	register := make(map[string]int16)
-	// Create maps for easy lookup of instruction names etc.
-	for i, s := range x86.Register {
-		register[s] = int16(i + x86.REG_AL)
-	}
-	// Pseudo-registers.
-	register["SB"] = RSB
-	register["FP"] = RFP
-	register["PC"] = RPC
-	// Register prefix not used on this architecture.
-
-	instructions := make(map[string]int)
-	for i, s := range obj.Anames {
-		instructions[s] = i
-	}
-	for i, s := range x86.Anames {
-		if i >= obj.A_ARCHSPECIFIC {
-			instructions[s] = i + obj.ABaseAMD64
-		}
-	}
-	// Annoying aliases.
-	instructions["JA"] = x86.AJHI   /* alternate */
-	instructions["JAE"] = x86.AJCC  /* alternate */
-	instructions["JB"] = x86.AJCS   /* alternate */
-	instructions["JBE"] = x86.AJLS  /* alternate */
-	instructions["JC"] = x86.AJCS   /* alternate */
-	instructions["JCC"] = x86.AJCC  /* carry clear (CF = 0) */
-	instructions["JCS"] = x86.AJCS  /* carry set (CF = 1) */
-	instructions["JE"] = x86.AJEQ   /* alternate */
-	instructions["JEQ"] = x86.AJEQ  /* equal (ZF = 1) */
-	instructions["JG"] = x86.AJGT   /* alternate */
-	instructions["JGE"] = x86.AJGE  /* greater than or equal (signed) (SF = OF) */
-	instructions["JGT"] = x86.AJGT  /* greater than (signed) (ZF = 0 && SF = OF) */
-	instructions["JHI"] = x86.AJHI  /* higher (unsigned) (CF = 0 && ZF = 0) */
-	instructions["JHS"] = x86.AJCC  /* alternate */
-	instructions["JL"] = x86.AJLT   /* alternate */
-	instructions["JLE"] = x86.AJLE  /* less than or equal (signed) (ZF = 1 || SF != OF) */
-	instructions["JLO"] = x86.AJCS  /* alternate */
-	instructions["JLS"] = x86.AJLS  /* lower or same (unsigned) (CF = 1 || ZF = 1) */
-	instructions["JLT"] = x86.AJLT  /* less than (signed) (SF != OF) */
-	instructions["JMI"] = x86.AJMI  /* negative (minus) (SF = 1) */
-	instructions["JNA"] = x86.AJLS  /* alternate */
-	instructions["JNAE"] = x86.AJCS /* alternate */
-	instructions["JNB"] = x86.AJCC  /* alternate */
-	instructions["JNBE"] = x86.AJHI /* alternate */
-	instructions["JNC"] = x86.AJCC  /* alternate */
-	instructions["JNE"] = x86.AJNE  /* not equal (ZF = 0) */
-	instructions["JNG"] = x86.AJLE  /* alternate */
-	instructions["JNGE"] = x86.AJLT /* alternate */
-	instructions["JNL"] = x86.AJGE  /* alternate */
-	instructions["JNLE"] = x86.AJGT /* alternate */
-	instructions["JNO"] = x86.AJOC  /* alternate */
-	instructions["JNP"] = x86.AJPC  /* alternate */
-	instructions["JNS"] = x86.AJPL  /* alternate */
-	instructions["JNZ"] = x86.AJNE  /* alternate */
-	instructions["JO"] = x86.AJOS   /* alternate */
-	instructions["JOC"] = x86.AJOC  /* overflow clear (OF = 0) */
-	instructions["JOS"] = x86.AJOS  /* overflow set (OF = 1) */
-	instructions["JP"] = x86.AJPS   /* alternate */
-	instructions["JPC"] = x86.AJPC  /* parity clear (PF = 0) */
-	instructions["JPE"] = x86.AJPS  /* alternate */
-	instructions["JPL"] = x86.AJPL  /* non-negative (plus) (SF = 0) */
-	instructions["JPO"] = x86.AJPC  /* alternate */
-	instructions["JPS"] = x86.AJPS  /* parity set (PF = 1) */
-	instructions["JS"] = x86.AJMI   /* alternate */
-	instructions["JZ"] = x86.AJEQ   /* alternate */
-	instructions["MASKMOVDQU"] = x86.AMASKMOVOU
-	instructions["MOVD"] = x86.AMOVQ
-	instructions["MOVDQ2Q"] = x86.AMOVQ
-	instructions["MOVNTDQ"] = x86.AMOVNTO
-	instructions["MOVOA"] = x86.AMOVO
-	instructions["MOVOA"] = x86.AMOVO
-	instructions["PF2ID"] = x86.APF2IL
-	instructions["PI2FD"] = x86.API2FL
-	instructions["PSLLDQ"] = x86.APSLLO
-	instructions["PSRLDQ"] = x86.APSRLO
-
-	return &Arch{
-		LinkArch:       linkArch,
-		Instructions:   instructions,
-		Register:       register,
-		RegisterPrefix: nil,
-		RegisterNumber: nilRegisterNumber,
-		IsJump:         jumpX86,
-	}
-}
-
-func archArm() *Arch {
-	register := make(map[string]int16)
-	// Create maps for easy lookup of instruction names etc.
-	// Note that there is no list of names as there is for x86.
-	for i := arm.REG_R0; i < arm.REG_SPSR; i++ {
-		register[obj.Rconv(i)] = int16(i)
-	}
-	// Avoid unintentionally clobbering g using R10.
-	delete(register, "R10")
-	register["g"] = arm.REG_R10
-	for i := 0; i < 16; i++ {
-		register[fmt.Sprintf("C%d", i)] = int16(i)
-	}
-
-	// Pseudo-registers.
-	register["SB"] = RSB
-	register["FP"] = RFP
-	register["PC"] = RPC
-	register["SP"] = RSP
-	registerPrefix := map[string]bool{
-		"F": true,
-		"R": true,
-	}
-
-	instructions := make(map[string]int)
-	for i, s := range obj.Anames {
-		instructions[s] = i
-	}
-	for i, s := range arm.Anames {
-		if i >= obj.A_ARCHSPECIFIC {
-			instructions[s] = i + obj.ABaseARM
-		}
-	}
-	// Annoying aliases.
-	instructions["B"] = obj.AJMP
-	instructions["BL"] = obj.ACALL
-	// MCR differs from MRC by the way fields of the word are encoded.
-	// (Details in arm.go). Here we add the instruction so parse will find
-	// it, but give it an opcode number known only to us.
-	instructions["MCR"] = aMCR
-
-	return &Arch{
-		LinkArch:       &arm.Linkarm,
-		Instructions:   instructions,
-		Register:       register,
-		RegisterPrefix: registerPrefix,
-		RegisterNumber: armRegisterNumber,
-		IsJump:         jumpArm,
-	}
-}
-
-func archArm64() *Arch {
-	register := make(map[string]int16)
-	// Create maps for easy lookup of instruction names etc.
-	// Note that there is no list of names as there is for 386 and amd64.
-	register[arm64.Rconv(arm64.REGSP)] = int16(arm64.REGSP)
-	for i := arm64.REG_R0; i <= arm64.REG_R31; i++ {
-		register[arm64.Rconv(i)] = int16(i)
-	}
-	for i := arm64.REG_F0; i <= arm64.REG_F31; i++ {
-		register[arm64.Rconv(i)] = int16(i)
-	}
-	for i := arm64.REG_V0; i <= arm64.REG_V31; i++ {
-		register[arm64.Rconv(i)] = int16(i)
-	}
-	register["LR"] = arm64.REGLINK
-	register["DAIF"] = arm64.REG_DAIF
-	register["NZCV"] = arm64.REG_NZCV
-	register["FPSR"] = arm64.REG_FPSR
-	register["FPCR"] = arm64.REG_FPCR
-	register["SPSR_EL1"] = arm64.REG_SPSR_EL1
-	register["ELR_EL1"] = arm64.REG_ELR_EL1
-	register["SPSR_EL2"] = arm64.REG_SPSR_EL2
-	register["ELR_EL2"] = arm64.REG_ELR_EL2
-	register["CurrentEL"] = arm64.REG_CurrentEL
-	register["SP_EL0"] = arm64.REG_SP_EL0
-	register["SPSel"] = arm64.REG_SPSel
-	register["DAIFSet"] = arm64.REG_DAIFSet
-	register["DAIFClr"] = arm64.REG_DAIFClr
-	// Conditional operators, like EQ, NE, etc.
-	register["EQ"] = arm64.COND_EQ
-	register["NE"] = arm64.COND_NE
-	register["HS"] = arm64.COND_HS
-	register["LO"] = arm64.COND_LO
-	register["MI"] = arm64.COND_MI
-	register["PL"] = arm64.COND_PL
-	register["VS"] = arm64.COND_VS
-	register["VC"] = arm64.COND_VC
-	register["HI"] = arm64.COND_HI
-	register["LS"] = arm64.COND_LS
-	register["GE"] = arm64.COND_GE
-	register["LT"] = arm64.COND_LT
-	register["GT"] = arm64.COND_GT
-	register["LE"] = arm64.COND_LE
-	register["AL"] = arm64.COND_AL
-	register["NV"] = arm64.COND_NV
-	// Pseudo-registers.
-	register["SB"] = RSB
-	register["FP"] = RFP
-	register["PC"] = RPC
-	register["SP"] = RSP
-	// Avoid unintentionally clobbering g using R28.
-	delete(register, "R28")
-	register["g"] = arm64.REG_R28
-	registerPrefix := map[string]bool{
-		"F": true,
-		"R": true,
-		"V": true,
-	}
-
-	instructions := make(map[string]int)
-	for i, s := range obj.Anames {
-		instructions[s] = i
-	}
-	for i, s := range arm64.Anames {
-		if i >= obj.A_ARCHSPECIFIC {
-			instructions[s] = i + obj.ABaseARM64
-		}
-	}
-	// Annoying aliases.
-	instructions["B"] = arm64.AB
-	instructions["BL"] = arm64.ABL
-
-	return &Arch{
-		LinkArch:       &arm64.Linkarm64,
-		Instructions:   instructions,
-		Register:       register,
-		RegisterPrefix: registerPrefix,
-		RegisterNumber: arm64RegisterNumber,
-		IsJump:         jumpArm64,
-	}
-
-}
-
-func archPPC64() *Arch {
-	register := make(map[string]int16)
-	// Create maps for easy lookup of instruction names etc.
-	// Note that there is no list of names as there is for x86.
-	for i := ppc64.REG_R0; i <= ppc64.REG_R31; i++ {
-		register[obj.Rconv(i)] = int16(i)
-	}
-	for i := ppc64.REG_F0; i <= ppc64.REG_F31; i++ {
-		register[obj.Rconv(i)] = int16(i)
-	}
-	for i := ppc64.REG_CR0; i <= ppc64.REG_CR7; i++ {
-		register[obj.Rconv(i)] = int16(i)
-	}
-	for i := ppc64.REG_MSR; i <= ppc64.REG_CR; i++ {
-		register[obj.Rconv(i)] = int16(i)
-	}
-	register["CR"] = ppc64.REG_CR
-	register["XER"] = ppc64.REG_XER
-	register["LR"] = ppc64.REG_LR
-	register["CTR"] = ppc64.REG_CTR
-	register["FPSCR"] = ppc64.REG_FPSCR
-	register["MSR"] = ppc64.REG_MSR
-	// Pseudo-registers.
-	register["SB"] = RSB
-	register["FP"] = RFP
-	register["PC"] = RPC
-	// Avoid unintentionally clobbering g using R30.
-	delete(register, "R30")
-	register["g"] = ppc64.REG_R30
-	registerPrefix := map[string]bool{
-		"CR":  true,
-		"F":   true,
-		"R":   true,
-		"SPR": true,
-	}
-
-	instructions := make(map[string]int)
-	for i, s := range obj.Anames {
-		instructions[s] = i
-	}
-	for i, s := range ppc64.Anames {
-		if i >= obj.A_ARCHSPECIFIC {
-			instructions[s] = i + obj.ABasePPC64
-		}
-	}
-	// Annoying aliases.
-	instructions["BR"] = ppc64.ABR
-	instructions["BL"] = ppc64.ABL
-
-	return &Arch{
-		LinkArch:       &ppc64.Linkppc64,
-		Instructions:   instructions,
-		Register:       register,
-		RegisterPrefix: registerPrefix,
-		RegisterNumber: ppc64RegisterNumber,
-		IsJump:         jumpPPC64,
-	}
-}
diff --git a/src/cmd/asm/internal/arch/arm.go b/src/cmd/asm/internal/arch/arm.go
deleted file mode 100644
index c030214..0000000
--- a/src/cmd/asm/internal/arch/arm.go
+++ /dev/null
@@ -1,239 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file encapsulates some of the odd characteristics of the ARM
-// instruction set, to minimize its interaction with the core of the
-// assembler.
-
-package arch
-
-import (
-	"strings"
-
-	"cmd/internal/obj"
-	"cmd/internal/obj/arm"
-)
-
-var armLS = map[string]uint8{
-	"U":  arm.C_UBIT,
-	"S":  arm.C_SBIT,
-	"W":  arm.C_WBIT,
-	"P":  arm.C_PBIT,
-	"PW": arm.C_WBIT | arm.C_PBIT,
-	"WP": arm.C_WBIT | arm.C_PBIT,
-}
-
-var armSCOND = map[string]uint8{
-	"EQ":  arm.C_SCOND_EQ,
-	"NE":  arm.C_SCOND_NE,
-	"CS":  arm.C_SCOND_HS,
-	"HS":  arm.C_SCOND_HS,
-	"CC":  arm.C_SCOND_LO,
-	"LO":  arm.C_SCOND_LO,
-	"MI":  arm.C_SCOND_MI,
-	"PL":  arm.C_SCOND_PL,
-	"VS":  arm.C_SCOND_VS,
-	"VC":  arm.C_SCOND_VC,
-	"HI":  arm.C_SCOND_HI,
-	"LS":  arm.C_SCOND_LS,
-	"GE":  arm.C_SCOND_GE,
-	"LT":  arm.C_SCOND_LT,
-	"GT":  arm.C_SCOND_GT,
-	"LE":  arm.C_SCOND_LE,
-	"AL":  arm.C_SCOND_NONE,
-	"U":   arm.C_UBIT,
-	"S":   arm.C_SBIT,
-	"W":   arm.C_WBIT,
-	"P":   arm.C_PBIT,
-	"PW":  arm.C_WBIT | arm.C_PBIT,
-	"WP":  arm.C_WBIT | arm.C_PBIT,
-	"F":   arm.C_FBIT,
-	"IBW": arm.C_WBIT | arm.C_PBIT | arm.C_UBIT,
-	"IAW": arm.C_WBIT | arm.C_UBIT,
-	"DBW": arm.C_WBIT | arm.C_PBIT,
-	"DAW": arm.C_WBIT,
-	"IB":  arm.C_PBIT | arm.C_UBIT,
-	"IA":  arm.C_UBIT,
-	"DB":  arm.C_PBIT,
-	"DA":  0,
-}
-
-var armJump = map[string]bool{
-	"B":    true,
-	"BL":   true,
-	"BEQ":  true,
-	"BNE":  true,
-	"BCS":  true,
-	"BHS":  true,
-	"BCC":  true,
-	"BLO":  true,
-	"BMI":  true,
-	"BPL":  true,
-	"BVS":  true,
-	"BVC":  true,
-	"BHI":  true,
-	"BLS":  true,
-	"BGE":  true,
-	"BLT":  true,
-	"BGT":  true,
-	"BLE":  true,
-	"CALL": true,
-	"JMP":  true,
-}
-
-func jumpArm(word string) bool {
-	return armJump[word]
-}
-
-// IsARMCMP reports whether the op (as defined by an arm.A* constant) is
-// one of the comparison instructions that require special handling.
-func IsARMCMP(op int) bool {
-	switch op {
-	case arm.ACMN, arm.ACMP, arm.ATEQ, arm.ATST:
-		return true
-	}
-	return false
-}
-
-// IsARMSTREX reports whether the op (as defined by an arm.A* constant) is
-// one of the STREX-like instructions that require special handling.
-func IsARMSTREX(op int) bool {
-	switch op {
-	case arm.ASTREX, arm.ASTREXD, arm.ASWPW, arm.ASWPBU:
-		return true
-	}
-	return false
-}
-
-// MCR is not defined by the obj/arm; instead we define it privately here.
-// It is encoded as an MRC with a bit inside the instruction word,
-// passed to arch.ARMMRCOffset.
-const aMCR = arm.ALAST + 1
-
-// IsARMMRC reports whether the op (as defined by an arm.A* constant) is
-// MRC or MCR
-func IsARMMRC(op int) bool {
-	switch op {
-	case arm.AMRC, aMCR: // Note: aMCR is defined in this package.
-		return true
-	}
-	return false
-}
-
-// ARMMRCOffset implements the peculiar encoding of the MRC and MCR instructions.
-// The difference between MRC and MCR is represented by a bit high in the word, not
-// in the usual way by the opcode itself. Asm must use AMRC for both instructions, so
-// we return the opcode for MRC so that asm doesn't need to import obj/arm.
-func ARMMRCOffset(op int, cond string, x0, x1, x2, x3, x4, x5 int64) (offset int64, op0 int16, ok bool) {
-	op1 := int64(0)
-	if op == arm.AMRC {
-		op1 = 1
-	}
-	bits, ok := ParseARMCondition(cond)
-	if !ok {
-		return
-	}
-	offset = (0xe << 24) | // opcode
-		(op1 << 20) | // MCR/MRC
-		((int64(bits) ^ arm.C_SCOND_XOR) << 28) | // scond
-		((x0 & 15) << 8) | //coprocessor number
-		((x1 & 7) << 21) | // coprocessor operation
-		((x2 & 15) << 12) | // ARM register
-		((x3 & 15) << 16) | // Crn
-		((x4 & 15) << 0) | // Crm
-		((x5 & 7) << 5) | // coprocessor information
-		(1 << 4) /* must be set */
-	return offset, arm.AMRC, true
-}
-
-// IsARMMULA reports whether the op (as defined by an arm.A* constant) is
-// MULA, MULAWT or MULAWB, the 4-operand instructions.
-func IsARMMULA(op int) bool {
-	switch op {
-	case arm.AMULA, arm.AMULAWB, arm.AMULAWT:
-		return true
-	}
-	return false
-}
-
-var bcode = []int{
-	arm.ABEQ,
-	arm.ABNE,
-	arm.ABCS,
-	arm.ABCC,
-	arm.ABMI,
-	arm.ABPL,
-	arm.ABVS,
-	arm.ABVC,
-	arm.ABHI,
-	arm.ABLS,
-	arm.ABGE,
-	arm.ABLT,
-	arm.ABGT,
-	arm.ABLE,
-	arm.AB,
-	obj.ANOP,
-}
-
-// ARMConditionCodes handles the special condition code situation for the ARM.
-// It returns a boolean to indicate success; failure means cond was unrecognized.
-func ARMConditionCodes(prog *obj.Prog, cond string) bool {
-	if cond == "" {
-		return true
-	}
-	bits, ok := ParseARMCondition(cond)
-	if !ok {
-		return false
-	}
-	/* hack to make B.NE etc. work: turn it into the corresponding conditional */
-	if prog.As == arm.AB {
-		prog.As = int16(bcode[(bits^arm.C_SCOND_XOR)&0xf])
-		bits = (bits &^ 0xf) | arm.C_SCOND_NONE
-	}
-	prog.Scond = bits
-	return true
-}
-
-// ParseARMCondition parses the conditions attached to an ARM instruction.
-// The input is a single string consisting of period-separated condition
-// codes, such as ".P.W". An initial period is ignored.
-func ParseARMCondition(cond string) (uint8, bool) {
-	return parseARMCondition(cond, armLS, armSCOND)
-}
-
-func parseARMCondition(cond string, ls, scond map[string]uint8) (uint8, bool) {
-	if strings.HasPrefix(cond, ".") {
-		cond = cond[1:]
-	}
-	if cond == "" {
-		return arm.C_SCOND_NONE, true
-	}
-	names := strings.Split(cond, ".")
-	bits := uint8(0)
-	for _, name := range names {
-		if b, present := ls[name]; present {
-			bits |= b
-			continue
-		}
-		if b, present := scond[name]; present {
-			bits = (bits &^ arm.C_SCOND) | b
-			continue
-		}
-		return 0, false
-	}
-	return bits, true
-}
-
-func armRegisterNumber(name string, n int16) (int16, bool) {
-	if n < 0 || 15 < n {
-		return 0, false
-	}
-	switch name {
-	case "R":
-		return arm.REG_R0 + n, true
-	case "F":
-		return arm.REG_F0 + n, true
-	}
-	return 0, false
-}
diff --git a/src/cmd/asm/internal/arch/arm64.go b/src/cmd/asm/internal/arch/arm64.go
deleted file mode 100644
index 0f29e81..0000000
--- a/src/cmd/asm/internal/arch/arm64.go
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file encapsulates some of the odd characteristics of the ARM64
-// instruction set, to minimize its interaction with the core of the
-// assembler.
-
-package arch
-
-import (
-	"cmd/internal/obj"
-	"cmd/internal/obj/arm64"
-)
-
-var arm64LS = map[string]uint8{
-	"P": arm64.C_XPOST,
-	"W": arm64.C_XPRE,
-}
-
-var arm64Jump = map[string]bool{
-	"B":     true,
-	"BL":    true,
-	"BEQ":   true,
-	"BNE":   true,
-	"BCS":   true,
-	"BHS":   true,
-	"BCC":   true,
-	"BLO":   true,
-	"BMI":   true,
-	"BPL":   true,
-	"BVS":   true,
-	"BVC":   true,
-	"BHI":   true,
-	"BLS":   true,
-	"BGE":   true,
-	"BLT":   true,
-	"BGT":   true,
-	"BLE":   true,
-	"CALL":  true,
-	"CBZ":   true,
-	"CBZW":  true,
-	"CBNZ":  true,
-	"CBNZW": true,
-	"JMP":   true,
-}
-
-func jumpArm64(word string) bool {
-	return arm64Jump[word]
-}
-
-// IsARM64CMP reports whether the op (as defined by an arm.A* constant) is
-// one of the comparison instructions that require special handling.
-func IsARM64CMP(op int) bool {
-	switch op {
-	case arm64.ACMN, arm64.ACMP, arm64.ATST,
-		arm64.ACMNW, arm64.ACMPW, arm64.ATSTW:
-		return true
-	}
-	return false
-}
-
-// IsARM64STLXR reports whether the op (as defined by an arm64.A*
-// constant) is one of the STLXR-like instructions that require special
-// handling.
-func IsARM64STLXR(op int) bool {
-	switch op {
-	case arm64.ASTLXRB, arm64.ASTLXRH, arm64.ASTLXRW, arm64.ASTLXR:
-		return true
-	}
-	return false
-}
-
-// ARM64Suffix handles the special suffix for the ARM64.
-// It returns a boolean to indicate success; failure means
-// cond was unrecognized.
-func ARM64Suffix(prog *obj.Prog, cond string) bool {
-	if cond == "" {
-		return true
-	}
-	bits, ok := ParseARM64Suffix(cond)
-	if !ok {
-		return false
-	}
-	prog.Scond = bits
-	return true
-}
-
-// ParseARM64Suffix parses the suffix attached to an ARM64 instruction.
-// The input is a single string consisting of period-separated condition
-// codes, such as ".P.W". An initial period is ignored.
-func ParseARM64Suffix(cond string) (uint8, bool) {
-	if cond == "" {
-		return 0, true
-	}
-	return parseARMCondition(cond, arm64LS, nil)
-}
-
-func arm64RegisterNumber(name string, n int16) (int16, bool) {
-	switch name {
-	case "F":
-		if 0 <= n && n <= 31 {
-			return arm64.REG_F0 + n, true
-		}
-	case "R":
-		if 0 <= n && n <= 30 { // not 31
-			return arm64.REG_R0 + n, true
-		}
-	case "V":
-		if 0 <= n && n <= 31 {
-			return arm64.REG_V0 + n, true
-		}
-	}
-	return 0, false
-}
diff --git a/src/cmd/asm/internal/arch/ppc64.go b/src/cmd/asm/internal/arch/ppc64.go
deleted file mode 100644
index 6523fbf..0000000
--- a/src/cmd/asm/internal/arch/ppc64.go
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file encapsulates some of the odd characteristics of the
-// 64-bit PowerPC (PPC64) instruction set, to minimize its interaction
-// with the core of the assembler.
-
-package arch
-
-import "cmd/internal/obj/ppc64"
-
-func jumpPPC64(word string) bool {
-	switch word {
-	case "BC", "BCL", "BEQ", "BGE", "BGT", "BL", "BLE", "BLT", "BNE", "BR", "BVC", "BVS", "CALL", "JMP":
-		return true
-	}
-	return false
-}
-
-// IsPPC64RLD reports whether the op (as defined by an ppc64.A* constant) is
-// one of the RLD-like instructions that require special handling.
-// The FMADD-like instructions behave similarly.
-func IsPPC64RLD(op int) bool {
-	switch op {
-	case ppc64.ARLDC, ppc64.ARLDCCC, ppc64.ARLDCL, ppc64.ARLDCLCC,
-		ppc64.ARLDCR, ppc64.ARLDCRCC, ppc64.ARLDMI, ppc64.ARLDMICC,
-		ppc64.ARLWMI, ppc64.ARLWMICC, ppc64.ARLWNM, ppc64.ARLWNMCC:
-		return true
-	case ppc64.AFMADD, ppc64.AFMADDCC, ppc64.AFMADDS, ppc64.AFMADDSCC,
-		ppc64.AFMSUB, ppc64.AFMSUBCC, ppc64.AFMSUBS, ppc64.AFMSUBSCC,
-		ppc64.AFNMADD, ppc64.AFNMADDCC, ppc64.AFNMADDS, ppc64.AFNMADDSCC,
-		ppc64.AFNMSUB, ppc64.AFNMSUBCC, ppc64.AFNMSUBS, ppc64.AFNMSUBSCC:
-		return true
-	}
-	return false
-}
-
-// IsPPC64CMP reports whether the op (as defined by an ppc64.A* constant) is
-// one of the CMP instructions that require special handling.
-func IsPPC64CMP(op int) bool {
-	switch op {
-	case ppc64.ACMP, ppc64.ACMPU, ppc64.ACMPW, ppc64.ACMPWU:
-		return true
-	}
-	return false
-}
-
-// IsPPC64NEG reports whether the op (as defined by an ppc64.A* constant) is
-// one of the NEG-like instructions that require special handling.
-func IsPPC64NEG(op int) bool {
-	switch op {
-	case ppc64.AADDMECC, ppc64.AADDMEVCC, ppc64.AADDMEV, ppc64.AADDME,
-		ppc64.AADDZECC, ppc64.AADDZEVCC, ppc64.AADDZEV, ppc64.AADDZE,
-		ppc64.ACNTLZDCC, ppc64.ACNTLZD, ppc64.ACNTLZWCC, ppc64.ACNTLZW,
-		ppc64.AEXTSBCC, ppc64.AEXTSB, ppc64.AEXTSHCC, ppc64.AEXTSH,
-		ppc64.AEXTSWCC, ppc64.AEXTSW, ppc64.ANEGCC, ppc64.ANEGVCC,
-		ppc64.ANEGV, ppc64.ANEG, ppc64.ASLBMFEE, ppc64.ASLBMFEV,
-		ppc64.ASLBMTE, ppc64.ASUBMECC, ppc64.ASUBMEVCC, ppc64.ASUBMEV,
-		ppc64.ASUBME, ppc64.ASUBZECC, ppc64.ASUBZEVCC, ppc64.ASUBZEV,
-		ppc64.ASUBZE:
-		return true
-	}
-	return false
-}
-
-func ppc64RegisterNumber(name string, n int16) (int16, bool) {
-	switch name {
-	case "CR":
-		if 0 <= n && n <= 7 {
-			return ppc64.REG_CR0 + n, true
-		}
-	case "F":
-		if 0 <= n && n <= 31 {
-			return ppc64.REG_F0 + n, true
-		}
-	case "R":
-		if 0 <= n && n <= 31 {
-			return ppc64.REG_R0 + n, true
-		}
-	case "SPR":
-		if 0 <= n && n <= 1024 {
-			return ppc64.REG_SPR0 + n, true
-		}
-	}
-	return 0, false
-}
diff --git a/src/cmd/asm/internal/asm/asm.go b/src/cmd/asm/internal/asm/asm.go
deleted file mode 100644
index 7ac8bf4..0000000
--- a/src/cmd/asm/internal/asm/asm.go
+++ /dev/null
@@ -1,657 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package asm
-
-import (
-	"bytes"
-	"fmt"
-	"text/scanner"
-
-	"cmd/asm/internal/arch"
-	"cmd/asm/internal/flags"
-	"cmd/asm/internal/lex"
-	"cmd/internal/obj"
-)
-
-// TODO: configure the architecture
-
-var testOut *bytes.Buffer // Gathers output when testing.
-
-// append adds the Prog to the end of the program-thus-far.
-// If doLabel is set, it also defines the labels collect for this Prog.
-func (p *Parser) append(prog *obj.Prog, cond string, doLabel bool) {
-	if cond != "" {
-		switch p.arch.Thechar {
-		case '5':
-			if !arch.ARMConditionCodes(prog, cond) {
-				p.errorf("unrecognized condition code .%q", cond)
-			}
-
-		case '7':
-			if !arch.ARM64Suffix(prog, cond) {
-				p.errorf("unrecognized suffix .%q", cond)
-			}
-
-		default:
-			p.errorf("unrecognized suffix .%q", cond)
-		}
-	}
-	if p.firstProg == nil {
-		p.firstProg = prog
-	} else {
-		p.lastProg.Link = prog
-	}
-	p.lastProg = prog
-	if doLabel {
-		p.pc++
-		for _, label := range p.pendingLabels {
-			if p.labels[label] != nil {
-				p.errorf("label %q multiply defined", label)
-			}
-			p.labels[label] = prog
-		}
-		p.pendingLabels = p.pendingLabels[0:0]
-	}
-	prog.Pc = int64(p.pc)
-	if *flags.Debug {
-		fmt.Println(p.histLineNum, prog)
-	}
-	if testOut != nil {
-		fmt.Fprintln(testOut, p.histLineNum, prog)
-	}
-}
-
-// validateSymbol checks that addr represents a valid name for a pseudo-op.
-func (p *Parser) validateSymbol(pseudo string, addr *obj.Addr, offsetOk bool) {
-	if addr.Name != obj.NAME_EXTERN && addr.Name != obj.NAME_STATIC || addr.Scale != 0 || addr.Reg != 0 {
-		p.errorf("%s symbol %q must be a symbol(SB)", pseudo, addr.Sym.Name)
-	}
-	if !offsetOk && addr.Offset != 0 {
-		p.errorf("%s symbol %q must not be offset from SB", pseudo, addr.Sym.Name)
-	}
-}
-
-// evalInteger evaluates an integer constant for a pseudo-op.
-func (p *Parser) evalInteger(pseudo string, operands []lex.Token) int64 {
-	addr := p.address(operands)
-	return p.getConstantPseudo(pseudo, &addr)
-}
-
-// validateImmediate checks that addr represents an immediate constant.
-func (p *Parser) validateImmediate(pseudo string, addr *obj.Addr) {
-	if addr.Type != obj.TYPE_CONST || addr.Name != 0 || addr.Reg != 0 || addr.Index != 0 {
-		p.errorf("%s: expected immediate constant; found %s", pseudo, obj.Dconv(&emptyProg, addr))
-	}
-}
-
-// asmText assembles a TEXT pseudo-op.
-// TEXT runtime·sigtramp(SB),4,$0-0
-func (p *Parser) asmText(word string, operands [][]lex.Token) {
-	if len(operands) != 2 && len(operands) != 3 {
-		p.errorf("expect two or three operands for TEXT")
-	}
-
-	// Labels are function scoped. Patch existing labels and
-	// create a new label space for this TEXT.
-	p.patch()
-	p.labels = make(map[string]*obj.Prog)
-
-	// Operand 0 is the symbol name in the form foo(SB).
-	// That means symbol plus indirect on SB and no offset.
-	nameAddr := p.address(operands[0])
-	p.validateSymbol("TEXT", &nameAddr, false)
-	name := nameAddr.Sym.Name
-	next := 1
-
-	// Next operand is the optional text flag, a literal integer.
-	var flag = int64(0)
-	if len(operands) == 3 {
-		flag = p.evalInteger("TEXT", operands[1])
-		next++
-	}
-
-	// Next operand is the frame and arg size.
-	// Bizarre syntax: $frameSize-argSize is two words, not subtraction.
-	// Both frameSize and argSize must be simple integers; only frameSize
-	// can be negative.
-	// The "-argSize" may be missing; if so, set it to obj.ArgsSizeUnknown.
-	// Parse left to right.
-	op := operands[next]
-	if len(op) < 2 || op[0].ScanToken != '$' {
-		p.errorf("TEXT %s: frame size must be an immediate constant", name)
-		return
-	}
-	op = op[1:]
-	negative := false
-	if op[0].ScanToken == '-' {
-		negative = true
-		op = op[1:]
-	}
-	if len(op) == 0 || op[0].ScanToken != scanner.Int {
-		p.errorf("TEXT %s: frame size must be an immediate constant", name)
-		return
-	}
-	frameSize := p.positiveAtoi(op[0].String())
-	if negative {
-		frameSize = -frameSize
-	}
-	op = op[1:]
-	argSize := int64(obj.ArgsSizeUnknown)
-	if len(op) > 0 {
-		// There is an argument size. It must be a minus sign followed by a non-negative integer literal.
-		if len(op) != 2 || op[0].ScanToken != '-' || op[1].ScanToken != scanner.Int {
-			p.errorf("TEXT %s: argument size must be of form -integer", name)
-		}
-		argSize = p.positiveAtoi(op[1].String())
-	}
-	prog := &obj.Prog{
-		Ctxt:   p.ctxt,
-		As:     obj.ATEXT,
-		Lineno: p.histLineNum,
-		From:   nameAddr,
-		From3: &obj.Addr{
-			Type:   obj.TYPE_CONST,
-			Offset: flag,
-		},
-		To: obj.Addr{
-			Type:   obj.TYPE_TEXTSIZE,
-			Offset: frameSize,
-			// Argsize set below.
-		},
-	}
-	prog.To.Val = int32(argSize)
-
-	p.append(prog, "", true)
-}
-
-// asmData assembles a DATA pseudo-op.
-// DATA masks<>+0x00(SB)/4, $0x00000000
-func (p *Parser) asmData(word string, operands [][]lex.Token) {
-	if len(operands) != 2 {
-		p.errorf("expect two operands for DATA")
-	}
-
-	// Operand 0 has the general form foo<>+0x04(SB)/4.
-	op := operands[0]
-	n := len(op)
-	if n < 3 || op[n-2].ScanToken != '/' || op[n-1].ScanToken != scanner.Int {
-		p.errorf("expect /size for DATA argument")
-	}
-	scale := p.parseScale(op[n-1].String())
-	op = op[:n-2]
-	nameAddr := p.address(op)
-	p.validateSymbol("DATA", &nameAddr, true)
-	name := nameAddr.Sym.Name
-
-	// Operand 1 is an immediate constant or address.
-	valueAddr := p.address(operands[1])
-	switch valueAddr.Type {
-	case obj.TYPE_CONST, obj.TYPE_FCONST, obj.TYPE_SCONST, obj.TYPE_ADDR:
-		// OK
-	default:
-		p.errorf("DATA value must be an immediate constant or address")
-	}
-
-	// The addresses must not overlap. Easiest test: require monotonicity.
-	if lastAddr, ok := p.dataAddr[name]; ok && nameAddr.Offset < lastAddr {
-		p.errorf("overlapping DATA entry for %s", name)
-	}
-	p.dataAddr[name] = nameAddr.Offset + int64(scale)
-
-	prog := &obj.Prog{
-		Ctxt:   p.ctxt,
-		As:     obj.ADATA,
-		Lineno: p.histLineNum,
-		From:   nameAddr,
-		From3: &obj.Addr{
-			Offset: int64(scale),
-		},
-		To: valueAddr,
-	}
-
-	p.append(prog, "", false)
-}
-
-// asmGlobl assembles a GLOBL pseudo-op.
-// GLOBL shifts<>(SB),8,$256
-// GLOBL shifts<>(SB),$256
-func (p *Parser) asmGlobl(word string, operands [][]lex.Token) {
-	if len(operands) != 2 && len(operands) != 3 {
-		p.errorf("expect two or three operands for GLOBL")
-	}
-
-	// Operand 0 has the general form foo<>+0x04(SB).
-	nameAddr := p.address(operands[0])
-	p.validateSymbol("GLOBL", &nameAddr, false)
-	next := 1
-
-	// Next operand is the optional flag, a literal integer.
-	var flag = int64(0)
-	if len(operands) == 3 {
-		flag = p.evalInteger("GLOBL", operands[1])
-		next++
-	}
-
-	// Final operand is an immediate constant.
-	addr := p.address(operands[next])
-	p.validateImmediate("GLOBL", &addr)
-
-	// log.Printf("GLOBL %s %d, $%d", name, flag, size)
-	prog := &obj.Prog{
-		Ctxt:   p.ctxt,
-		As:     obj.AGLOBL,
-		Lineno: p.histLineNum,
-		From:   nameAddr,
-		From3: &obj.Addr{
-			Offset: flag,
-		},
-		To: addr,
-	}
-	p.append(prog, "", false)
-}
-
-// asmPCData assembles a PCDATA pseudo-op.
-// PCDATA $2, $705
-func (p *Parser) asmPCData(word string, operands [][]lex.Token) {
-	if len(operands) != 2 {
-		p.errorf("expect two operands for PCDATA")
-	}
-
-	// Operand 0 must be an immediate constant.
-	key := p.address(operands[0])
-	p.validateImmediate("PCDATA", &key)
-
-	// Operand 1 must be an immediate constant.
-	value := p.address(operands[1])
-	p.validateImmediate("PCDATA", &value)
-
-	// log.Printf("PCDATA $%d, $%d", key.Offset, value.Offset)
-	prog := &obj.Prog{
-		Ctxt:   p.ctxt,
-		As:     obj.APCDATA,
-		Lineno: p.histLineNum,
-		From:   key,
-		To:     value,
-	}
-	p.append(prog, "", true)
-}
-
-// asmFuncData assembles a FUNCDATA pseudo-op.
-// FUNCDATA $1, funcdata<>+4(SB)
-func (p *Parser) asmFuncData(word string, operands [][]lex.Token) {
-	if len(operands) != 2 {
-		p.errorf("expect two operands for FUNCDATA")
-	}
-
-	// Operand 0 must be an immediate constant.
-	valueAddr := p.address(operands[0])
-	p.validateImmediate("FUNCDATA", &valueAddr)
-
-	// Operand 1 is a symbol name in the form foo(SB).
-	nameAddr := p.address(operands[1])
-	p.validateSymbol("FUNCDATA", &nameAddr, true)
-
-	prog := &obj.Prog{
-		Ctxt:   p.ctxt,
-		As:     obj.AFUNCDATA,
-		Lineno: p.histLineNum,
-		From:   valueAddr,
-		To:     nameAddr,
-	}
-	p.append(prog, "", true)
-}
-
-// asmJump assembles a jump instruction.
-// JMP	R1
-// JMP	exit
-// JMP	3(PC)
-func (p *Parser) asmJump(op int, cond string, a []obj.Addr) {
-	var target *obj.Addr
-	prog := &obj.Prog{
-		Ctxt:   p.ctxt,
-		Lineno: p.histLineNum,
-		As:     int16(op),
-	}
-	switch len(a) {
-	case 1:
-		target = &a[0]
-	case 2:
-		// Special 2-operand jumps.
-		target = &a[1]
-		prog.From = a[0]
-	case 3:
-		if p.arch.Thechar == '9' {
-			// Special 3-operand jumps.
-			// First two must be constants; a[1] is a register number.
-			target = &a[2]
-			prog.From = obj.Addr{
-				Type:   obj.TYPE_CONST,
-				Offset: p.getConstant(prog, op, &a[0]),
-			}
-			reg := int16(p.getConstant(prog, op, &a[1]))
-			reg, ok := p.arch.RegisterNumber("R", int16(reg))
-			if !ok {
-				p.errorf("bad register number %d", reg)
-			}
-			prog.Reg = reg
-			break
-		}
-		fallthrough
-	default:
-		p.errorf("wrong number of arguments to %s instruction", obj.Aconv(op))
-		return
-	}
-	switch {
-	case target.Type == obj.TYPE_BRANCH:
-		// JMP 4(PC)
-		prog.To = obj.Addr{
-			Type:   obj.TYPE_BRANCH,
-			Offset: p.pc + 1 + target.Offset, // +1 because p.pc is incremented in append, below.
-		}
-	case target.Type == obj.TYPE_REG:
-		// JMP R1
-		prog.To = *target
-	case target.Type == obj.TYPE_MEM && (target.Name == obj.NAME_EXTERN || target.Name == obj.NAME_STATIC):
-		// JMP main·morestack(SB)
-		prog.To = *target
-	case target.Type == obj.TYPE_INDIR && (target.Name == obj.NAME_EXTERN || target.Name == obj.NAME_STATIC):
-		// JMP *main·morestack(SB)
-		prog.To = *target
-		prog.To.Type = obj.TYPE_INDIR
-	case target.Type == obj.TYPE_MEM && target.Reg == 0 && target.Offset == 0:
-		// JMP exit
-		if target.Sym == nil {
-			// Parse error left name unset.
-			return
-		}
-		targetProg := p.labels[target.Sym.Name]
-		if targetProg == nil {
-			p.toPatch = append(p.toPatch, Patch{prog, target.Sym.Name})
-		} else {
-			p.branch(prog, targetProg)
-		}
-	case target.Type == obj.TYPE_MEM && target.Name == obj.NAME_NONE:
-		// JMP 4(R0)
-		prog.To = *target
-		// On the ppc64, 9a encodes BR (CTR) as BR CTR. We do the same.
-		if p.arch.Thechar == '9' && target.Offset == 0 {
-			prog.To.Type = obj.TYPE_REG
-		}
-	case target.Type == obj.TYPE_CONST:
-		// JMP $4
-		prog.To = a[0]
-	default:
-		p.errorf("cannot assemble jump %+v", target)
-	}
-
-	p.append(prog, cond, true)
-}
-
-func (p *Parser) patch() {
-	for _, patch := range p.toPatch {
-		targetProg := p.labels[patch.label]
-		if targetProg == nil {
-			p.errorf("undefined label %s", patch.label)
-		} else {
-			p.branch(patch.prog, targetProg)
-		}
-	}
-	p.toPatch = p.toPatch[:0]
-}
-
-func (p *Parser) branch(jmp, target *obj.Prog) {
-	jmp.To = obj.Addr{
-		Type:  obj.TYPE_BRANCH,
-		Index: 0,
-	}
-	jmp.To.Val = target
-}
-
-// asmInstruction assembles an instruction.
-// MOVW R9, (R10)
-func (p *Parser) asmInstruction(op int, cond string, a []obj.Addr) {
-	// fmt.Printf("%s %+v\n", obj.Aconv(op), a)
-	prog := &obj.Prog{
-		Ctxt:   p.ctxt,
-		Lineno: p.histLineNum,
-		As:     int16(op),
-	}
-	switch len(a) {
-	case 0:
-		// Nothing to do.
-	case 1:
-		if p.arch.UnaryDst[op] {
-			// prog.From is no address.
-			prog.To = a[0]
-		} else {
-			prog.From = a[0]
-			// prog.To is no address.
-		}
-		if p.arch.Thechar == '9' && arch.IsPPC64NEG(op) {
-			// NEG: From and To are both a[0].
-			prog.To = a[0]
-			prog.From = a[0]
-			break
-		}
-	case 2:
-		if p.arch.Thechar == '5' {
-			if arch.IsARMCMP(op) {
-				prog.From = a[0]
-				prog.Reg = p.getRegister(prog, op, &a[1])
-				break
-			}
-			// Strange special cases.
-			if arch.IsARMSTREX(op) {
-				/*
-					STREX x, (y)
-						from=(y) reg=x to=x
-					STREX (x), y
-						from=(x) reg=y to=y
-				*/
-				if a[0].Type == obj.TYPE_REG && a[1].Type != obj.TYPE_REG {
-					prog.From = a[1]
-					prog.Reg = a[0].Reg
-					prog.To = a[0]
-					break
-				} else if a[0].Type != obj.TYPE_REG && a[1].Type == obj.TYPE_REG {
-					prog.From = a[0]
-					prog.Reg = a[1].Reg
-					prog.To = a[1]
-					break
-				}
-				p.errorf("unrecognized addressing for %s", obj.Aconv(op))
-			}
-		} else if p.arch.Thechar == '7' && arch.IsARM64CMP(op) {
-			prog.From = a[0]
-			prog.Reg = p.getRegister(prog, op, &a[1])
-			break
-		}
-		prog.From = a[0]
-		prog.To = a[1]
-	case 3:
-		switch p.arch.Thechar {
-		case '5':
-			// Special cases.
-			if arch.IsARMSTREX(op) {
-				/*
-					STREX x, (y), z
-						from=(y) reg=x to=z
-				*/
-				prog.From = a[1]
-				prog.Reg = p.getRegister(prog, op, &a[0])
-				prog.To = a[2]
-				break
-			}
-			// Otherwise the 2nd operand (a[1]) must be a register.
-			prog.From = a[0]
-			prog.Reg = p.getRegister(prog, op, &a[1])
-			prog.To = a[2]
-		case '7':
-			// ARM64 instructions with one input and two outputs.
-			if arch.IsARM64STLXR(op) {
-				prog.From = a[0]
-				prog.To = a[1]
-				if a[2].Type != obj.TYPE_REG {
-					p.errorf("invalid addressing modes for third operand to %s instruction, must be register", obj.Aconv(op))
-				}
-				prog.RegTo2 = a[2].Reg
-				break
-			}
-			prog.From = a[0]
-			prog.Reg = p.getRegister(prog, op, &a[1])
-			prog.To = a[2]
-		case '6', '8':
-			prog.From = a[0]
-			prog.From3 = newAddr(a[1])
-			prog.To = a[2]
-		case '9':
-			if arch.IsPPC64CMP(op) {
-				// CMPW etc.; third argument is a CR register that goes into prog.Reg.
-				prog.From = a[0]
-				prog.Reg = p.getRegister(prog, op, &a[2])
-				prog.To = a[1]
-				break
-			}
-			// Arithmetic. Choices are:
-			// reg reg reg
-			// imm reg reg
-			// reg imm reg
-			// If the immediate is the middle argument, use From3.
-			switch a[1].Type {
-			case obj.TYPE_REG:
-				prog.From = a[0]
-				prog.Reg = p.getRegister(prog, op, &a[1])
-				prog.To = a[2]
-			case obj.TYPE_CONST:
-				prog.From = a[0]
-				prog.From3 = newAddr(a[1])
-				prog.To = a[2]
-			default:
-				p.errorf("invalid addressing modes for %s instruction", obj.Aconv(op))
-			}
-		default:
-			p.errorf("TODO: implement three-operand instructions for this architecture")
-		}
-	case 4:
-		if p.arch.Thechar == '5' && arch.IsARMMULA(op) {
-			// All must be registers.
-			p.getRegister(prog, op, &a[0])
-			r1 := p.getRegister(prog, op, &a[1])
-			p.getRegister(prog, op, &a[2])
-			r3 := p.getRegister(prog, op, &a[3])
-			prog.From = a[0]
-			prog.To = a[2]
-			prog.To.Type = obj.TYPE_REGREG2
-			prog.To.Offset = int64(r3)
-			prog.Reg = r1
-			break
-		}
-		if p.arch.Thechar == '7' {
-			prog.From = a[0]
-			prog.Reg = p.getRegister(prog, op, &a[1])
-			prog.From3 = newAddr(a[2])
-			prog.To = a[3]
-			break
-		}
-		if p.arch.Thechar == '9' && arch.IsPPC64RLD(op) {
-			// 2nd operand must always be a register.
-			// TODO: Do we need to guard this with the instruction type?
-			// That is, are there 4-operand instructions without this property?
-			prog.From = a[0]
-			prog.Reg = p.getRegister(prog, op, &a[1])
-			prog.From3 = newAddr(a[2])
-			prog.To = a[3]
-			break
-		}
-		p.errorf("can't handle %s instruction with 4 operands", obj.Aconv(op))
-	case 5:
-		if p.arch.Thechar == '9' && arch.IsPPC64RLD(op) {
-			// Always reg, reg, con, con, reg.  (con, con is a 'mask').
-			prog.From = a[0]
-			prog.Reg = p.getRegister(prog, op, &a[1])
-			mask1 := p.getConstant(prog, op, &a[2])
-			mask2 := p.getConstant(prog, op, &a[3])
-			var mask uint32
-			if mask1 < mask2 {
-				mask = (^uint32(0) >> uint(mask1)) & (^uint32(0) << uint(31-mask2))
-			} else {
-				mask = (^uint32(0) >> uint(mask2+1)) & (^uint32(0) << uint(31-(mask1-1)))
-			}
-			prog.From3 = &obj.Addr{
-				Type:   obj.TYPE_CONST,
-				Offset: int64(mask),
-			}
-			prog.To = a[4]
-			break
-		}
-		p.errorf("can't handle %s instruction with 5 operands", obj.Aconv(op))
-	case 6:
-		if p.arch.Thechar == '5' && arch.IsARMMRC(op) {
-			// Strange special case: MCR, MRC.
-			prog.To.Type = obj.TYPE_CONST
-			x0 := p.getConstant(prog, op, &a[0])
-			x1 := p.getConstant(prog, op, &a[1])
-			x2 := int64(p.getRegister(prog, op, &a[2]))
-			x3 := int64(p.getRegister(prog, op, &a[3]))
-			x4 := int64(p.getRegister(prog, op, &a[4]))
-			x5 := p.getConstant(prog, op, &a[5])
-			// Cond is handled specially for this instruction.
-			offset, MRC, ok := arch.ARMMRCOffset(op, cond, x0, x1, x2, x3, x4, x5)
-			if !ok {
-				p.errorf("unrecognized condition code .%q", cond)
-			}
-			prog.To.Offset = offset
-			cond = ""
-			prog.As = MRC // Both instructions are coded as MRC.
-			break
-		}
-		fallthrough
-	default:
-		p.errorf("can't handle %s instruction with %d operands", obj.Aconv(op), len(a))
-	}
-
-	p.append(prog, cond, true)
-}
-
-// newAddr returns a new(Addr) initialized to x.
-func newAddr(x obj.Addr) *obj.Addr {
-	p := new(obj.Addr)
-	*p = x
-	return p
-}
-
-var emptyProg obj.Prog
-
-// getConstantPseudo checks that addr represents a plain constant and returns its value.
-func (p *Parser) getConstantPseudo(pseudo string, addr *obj.Addr) int64 {
-	if addr.Type != obj.TYPE_MEM || addr.Name != 0 || addr.Reg != 0 || addr.Index != 0 {
-		p.errorf("%s: expected integer constant; found %s", pseudo, obj.Dconv(&emptyProg, addr))
-	}
-	return addr.Offset
-}
-
-// getConstant checks that addr represents a plain constant and returns its value.
-func (p *Parser) getConstant(prog *obj.Prog, op int, addr *obj.Addr) int64 {
-	if addr.Type != obj.TYPE_MEM || addr.Name != 0 || addr.Reg != 0 || addr.Index != 0 {
-		p.errorf("%s: expected integer constant; found %s", obj.Aconv(op), obj.Dconv(prog, addr))
-	}
-	return addr.Offset
-}
-
-// getImmediate checks that addr represents an immediate constant and returns its value.
-func (p *Parser) getImmediate(prog *obj.Prog, op int, addr *obj.Addr) int64 {
-	if addr.Type != obj.TYPE_CONST || addr.Name != 0 || addr.Reg != 0 || addr.Index != 0 {
-		p.errorf("%s: expected immediate constant; found %s", obj.Aconv(op), obj.Dconv(prog, addr))
-	}
-	return addr.Offset
-}
-
-// getRegister checks that addr represents a register and returns its value.
-func (p *Parser) getRegister(prog *obj.Prog, op int, addr *obj.Addr) int16 {
-	if addr.Type != obj.TYPE_REG || addr.Offset != 0 || addr.Name != 0 || addr.Index != 0 {
-		p.errorf("%s: expected register; found %s", obj.Aconv(op), obj.Dconv(prog, addr))
-	}
-	return addr.Reg
-}
diff --git a/src/cmd/asm/internal/asm/endtoend_test.go b/src/cmd/asm/internal/asm/endtoend_test.go
deleted file mode 100644
index abe4e4e..0000000
--- a/src/cmd/asm/internal/asm/endtoend_test.go
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package asm
-
-import (
-	"bytes"
-	"fmt"
-	"io/ioutil"
-	"log"
-	"os"
-	"path/filepath"
-	"strings"
-	"testing"
-
-	"cmd/asm/internal/lex"
-	"cmd/internal/obj"
-)
-
-// An end-to-end test for the assembler: Do we print what we parse?
-// Output is generated by, in effect, turning on -S and comparing the
-// result against a golden file.
-
-func testEndToEnd(t *testing.T, goarch string) {
-	lex.InitHist()
-	input := filepath.Join("testdata", goarch+".s")
-	output := filepath.Join("testdata", goarch+".out")
-	architecture, ctxt := setArch(goarch)
-	lexer := lex.NewLexer(input, ctxt)
-	parser := NewParser(ctxt, architecture, lexer)
-	pList := obj.Linknewplist(ctxt)
-	var ok bool
-	testOut = new(bytes.Buffer) // The assembler writes -S output to this buffer.
-	ctxt.Bso = obj.Binitw(os.Stdout)
-	defer ctxt.Bso.Flush()
-	ctxt.Diag = log.Fatalf
-	obj.Binitw(ioutil.Discard)
-	pList.Firstpc, ok = parser.Parse()
-	if !ok {
-		t.Fatalf("asm: %s assembly failed", goarch)
-	}
-	result := string(testOut.Bytes())
-	expect, err := ioutil.ReadFile(output)
-	// For Windows.
-	result = strings.Replace(result, `testdata\`, `testdata/`, -1)
-	if err != nil {
-		t.Fatal(err)
-	}
-	if result != string(expect) {
-		if false { // Enable to capture output.
-			fmt.Printf("%s", result)
-			os.Exit(1)
-		}
-		t.Errorf("%s failed: output differs", goarch)
-		r := strings.Split(result, "\n")
-		e := strings.Split(string(expect), "\n")
-		if len(r) != len(e) {
-			t.Errorf("%s: expected %d lines, got %d", goarch, len(e), len(r))
-		}
-		n := len(e)
-		if n > len(r) {
-			n = len(r)
-		}
-		for i := 0; i < n; i++ {
-			if r[i] != e[i] {
-				t.Errorf("%s:%d:\nexpected\n\t%s\ngot\n\t%s", output, i, e[i], r[i])
-			}
-		}
-	}
-}
-
-func TestPPC64EndToEnd(t *testing.T) {
-	testEndToEnd(t, "ppc64")
-}
-
-func TestARMEndToEnd(t *testing.T) {
-	testEndToEnd(t, "arm")
-}
-
-func TestARM64EndToEnd(t *testing.T) {
-	testEndToEnd(t, "arm64")
-}
-
-func TestAMD64EndToEnd(t *testing.T) {
-	testEndToEnd(t, "amd64")
-}
-
-func Test386EndToEnd(t *testing.T) {
-	testEndToEnd(t, "386")
-}
diff --git a/src/cmd/asm/internal/asm/expr_test.go b/src/cmd/asm/internal/asm/expr_test.go
deleted file mode 100644
index eafbc5f..0000000
--- a/src/cmd/asm/internal/asm/expr_test.go
+++ /dev/null
@@ -1,131 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package asm
-
-import (
-	"cmd/asm/internal/lex"
-	"strings"
-	"testing"
-	"text/scanner"
-)
-
-type exprTest struct {
-	input  string
-	output int64
-	atEOF  bool
-}
-
-var exprTests = []exprTest{
-	// Simple
-	{"0", 0, true},
-	{"3", 3, true},
-	{"070", 8 * 7, true},
-	{"0x0f", 15, true},
-	{"0xFF", 255, true},
-	{"9223372036854775807", 9223372036854775807, true}, // max int64
-	// Unary
-	{"-0", 0, true},
-	{"~0", -1, true},
-	{"~0*0", 0, true},
-	{"+3", 3, true},
-	{"-3", -3, true},
-	{"-9223372036854775808", -9223372036854775808, true}, // min int64
-	// Binary
-	{"3+4", 3 + 4, true},
-	{"3-4", 3 - 4, true},
-	{"2|5", 2 | 5, true},
-	{"3^4", 3 ^ 4, true},
-	{"3*4", 3 * 4, true},
-	{"14/4", 14 / 4, true},
-	{"3<<4", 3 << 4, true},
-	{"48>>3", 48 >> 3, true},
-	{"3&9", 3 & 9, true},
-	// General
-	{"3*2+3", 3*2 + 3, true},
-	{"3+2*3", 3 + 2*3, true},
-	{"3*(2+3)", 3 * (2 + 3), true},
-	{"3*-(2+3)", 3 * -(2 + 3), true},
-	{"3<<2+4", 3<<2 + 4, true},
-	{"3<<2+4", 3<<2 + 4, true},
-	{"3<<(2+4)", 3 << (2 + 4), true},
-	// Junk at EOF.
-	{"3 x", 3, false},
-	// Big number
-	{"4611686018427387904", 4611686018427387904, true},
-}
-
-func TestExpr(t *testing.T) {
-	p := NewParser(nil, nil, nil) // Expression evaluation uses none of these fields of the parser.
-	for i, test := range exprTests {
-		p.start(lex.Tokenize(test.input))
-		result := int64(p.expr())
-		if result != test.output {
-			t.Errorf("%d: %q evaluated to %d; expected %d", i, test.input, result, test.output)
-		}
-		tok := p.next()
-		if test.atEOF && tok.ScanToken != scanner.EOF {
-			t.Errorf("%d: %q: at EOF got %s", i, test.input, tok)
-		} else if !test.atEOF && tok.ScanToken == scanner.EOF {
-			t.Errorf("%d: %q: expected not EOF but at EOF", i, test.input)
-		}
-	}
-}
-
-type badExprTest struct {
-	input string
-	error string // Empty means no error.
-}
-
-var badExprTests = []badExprTest{
-	{"0/0", "division by zero"},
-	{"3/0", "division by zero"},
-	{"(1<<63)/0", "divide of value with high bit set"},
-	{"3%0", "modulo by zero"},
-	{"(1<<63)%0", "modulo of value with high bit set"},
-	{"3<<-4", "negative left shift count"},
-	{"3<<(1<<63)", "negative left shift count"},
-	{"3>>-4", "negative right shift count"},
-	{"3>>(1<<63)", "negative right shift count"},
-	{"(1<<63)>>2", "right shift of value with high bit set"},
-	{"(1<<62)>>2", ""},
-	{`'\x80'`, "illegal UTF-8 encoding for character constant"},
-	{"(23*4", "missing closing paren"},
-	{")23*4", "unexpected ) evaluating expression"},
-	{"18446744073709551616", "value out of range"},
-}
-
-func TestBadExpr(t *testing.T) {
-	panicOnError = true
-	defer func() {
-		panicOnError = false
-	}()
-	for i, test := range badExprTests {
-		err := runBadTest(i, test, t)
-		if err == nil {
-			if test.error != "" {
-				t.Errorf("#%d: %q: expected error %q; got none", i, test.input, test.error)
-			}
-			continue
-		}
-		if !strings.Contains(err.Error(), test.error) {
-			t.Errorf("#%d: expected error %q; got %q", i, test.error, err)
-			continue
-		}
-	}
-}
-
-func runBadTest(i int, test badExprTest, t *testing.T) (err error) {
-	p := NewParser(nil, nil, nil) // Expression evaluation uses none of these fields of the parser.
-	p.start(lex.Tokenize(test.input))
-	defer func() {
-		e := recover()
-		var ok bool
-		if err, ok = e.(error); e != nil && !ok {
-			t.Fatal(e)
-		}
-	}()
-	p.expr()
-	return nil
-}
diff --git a/src/cmd/asm/internal/asm/operand_test.go b/src/cmd/asm/internal/asm/operand_test.go
deleted file mode 100644
index b9154a9..0000000
--- a/src/cmd/asm/internal/asm/operand_test.go
+++ /dev/null
@@ -1,429 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package asm
-
-import (
-	"os"
-	"testing"
-
-	"cmd/asm/internal/arch"
-	"cmd/asm/internal/lex"
-	"cmd/internal/obj"
-)
-
-// A simple in-out test: Do we print what we parse?
-
-func setArch(goarch string) (*arch.Arch, *obj.Link) {
-	os.Setenv("GOOS", "linux") // obj can handle this OS for all architectures.
-	architecture := arch.Set(goarch)
-	if architecture == nil {
-		panic("asm: unrecognized architecture " + goarch)
-	}
-	return architecture, obj.Linknew(architecture.LinkArch)
-}
-
-func newParser(goarch string) *Parser {
-	architecture, ctxt := setArch(goarch)
-	return NewParser(ctxt, architecture, nil)
-}
-
-func testOperandParser(t *testing.T, parser *Parser, tests []operandTest) {
-	for _, test := range tests {
-		parser.start(lex.Tokenize(test.input))
-		addr := obj.Addr{}
-		parser.operand(&addr)
-		result := obj.Dconv(&emptyProg, &addr)
-		if result != test.output {
-			t.Errorf("fail at %s: got %s; expected %s\n", test.input, result, test.output)
-		}
-	}
-}
-
-func TestAMD64OperandParser(t *testing.T) {
-	parser := newParser("amd64")
-	testOperandParser(t, parser, amd64OperandTests)
-}
-
-func Test386OperandParser(t *testing.T) {
-	parser := newParser("386")
-	testOperandParser(t, parser, x86OperandTests)
-}
-
-func TestARMOperandParser(t *testing.T) {
-	parser := newParser("arm")
-	testOperandParser(t, parser, armOperandTests)
-}
-func TestARM64OperandParser(t *testing.T) {
-	parser := newParser("arm64")
-	testOperandParser(t, parser, arm64OperandTests)
-}
-
-func TestPPC64OperandParser(t *testing.T) {
-	parser := newParser("ppc64")
-	testOperandParser(t, parser, ppc64OperandTests)
-}
-
-type operandTest struct {
-	input, output string
-}
-
-// Examples collected by scanning all the assembly in the standard repo.
-
-var amd64OperandTests = []operandTest{
-	{"$(-1.0)", "$(-1.0)"},
-	{"$(0.0)", "$(0.0)"},
-	{"$(0x2000000+116)", "$33554548"},
-	{"$(0x3F<<7)", "$8064"},
-	{"$(112+8)", "$120"},
-	{"$(1<<63)", "$-9223372036854775808"},
-	{"$-1", "$-1"},
-	{"$0", "$0"},
-	{"$0-0", "$0"},
-	{"$0-16", "$-16"},
-	{"$0x000FFFFFFFFFFFFF", "$4503599627370495"},
-	{"$0x01", "$1"},
-	{"$0x02", "$2"},
-	{"$0x04", "$4"},
-	{"$0x3FE", "$1022"},
-	{"$0x7fffffe00000", "$140737486258176"},
-	{"$0xfffffffffffff001", "$-4095"},
-	{"$1", "$1"},
-	{"$1.0", "$(1.0)"},
-	{"$10", "$10"},
-	{"$1000", "$1000"},
-	{"$1000000", "$1000000"},
-	{"$1000000000", "$1000000000"},
-	{"$__tsan_func_enter(SB)", "$__tsan_func_enter(SB)"},
-	{"$main(SB)", "$main(SB)"},
-	{"$masks<>(SB)", "$masks<>(SB)"},
-	{"$setg_gcc<>(SB)", "$setg_gcc<>(SB)"},
-	{"$shifts<>(SB)", "$shifts<>(SB)"},
-	{"$~(1<<63)", "$9223372036854775807"},
-	{"$~0x3F", "$-64"},
-	{"$~15", "$-16"},
-	{"(((8)&0xf)*4)(SP)", "32(SP)"},
-	{"(((8-14)&0xf)*4)(SP)", "40(SP)"},
-	{"(6+8)(AX)", "14(AX)"},
-	{"(8*4)(BP)", "32(BP)"},
-	{"(AX)", "(AX)"},
-	{"(AX)(CX*8)", "(AX)(CX*8)"},
-	{"(BP)(CX*4)", "(BP)(CX*4)"},
-	{"(BP)(DX*4)", "(BP)(DX*4)"},
-	{"(BP)(R8*4)", "(BP)(R8*4)"},
-	{"(BX)", "(BX)"},
-	{"(DI)", "(DI)"},
-	{"(DI)(BX*1)", "(DI)(BX*1)"},
-	{"(DX)", "(DX)"},
-	{"(R9)", "(R9)"},
-	{"(R9)(BX*8)", "(R9)(BX*8)"},
-	{"(SI)", "(SI)"},
-	{"(SI)(BX*1)", "(SI)(BX*1)"},
-	{"(SI)(DX*1)", "(SI)(DX*1)"},
-	{"(SP)", "(SP)"},
-	{"+3(PC)", "3(PC)"},
-	{"-1(DI)(BX*1)", "-1(DI)(BX*1)"},
-	{"-3(PC)", "-3(PC)"},
-	{"-64(SI)(BX*1)", "-64(SI)(BX*1)"},
-	{"-96(SI)(BX*1)", "-96(SI)(BX*1)"},
-	{"AL", "AL"},
-	{"AX", "AX"},
-	{"BP", "BP"},
-	{"BX", "BX"},
-	{"CX", "CX"},
-	{"DI", "DI"},
-	{"DX", "DX"},
-	{"R10", "R10"},
-	{"R10", "R10"},
-	{"R11", "R11"},
-	{"R12", "R12"},
-	{"R13", "R13"},
-	{"R14", "R14"},
-	{"R15", "R15"},
-	{"R8", "R8"},
-	{"R9", "R9"},
-	{"SI", "SI"},
-	{"SP", "SP"},
-	{"X0", "X0"},
-	{"X1", "X1"},
-	{"X10", "X10"},
-	{"X11", "X11"},
-	{"X12", "X12"},
-	{"X13", "X13"},
-	{"X14", "X14"},
-	{"X15", "X15"},
-	{"X2", "X2"},
-	{"X3", "X3"},
-	{"X4", "X4"},
-	{"X5", "X5"},
-	{"X6", "X6"},
-	{"X7", "X7"},
-	{"X8", "X8"},
-	{"X9", "X9"},
-	{"_expand_key_128<>(SB)", "_expand_key_128<>(SB)"},
-	{"_seek<>(SB)", "_seek<>(SB)"},
-	{"a2+16(FP)", "a2+16(FP)"},
-	{"addr2+24(FP)", "addr2+24(FP)"},
-	{"asmcgocall<>(SB)", "asmcgocall<>(SB)"},
-	{"b+24(FP)", "b+24(FP)"},
-	{"b_len+32(FP)", "b_len+32(FP)"},
-	{"racecall<>(SB)", "racecall<>(SB)"},
-	{"rcv_name+20(FP)", "rcv_name+20(FP)"},
-	{"retoffset+28(FP)", "retoffset+28(FP)"},
-	{"runtime·_GetStdHandle(SB)", "runtime._GetStdHandle(SB)"},
-	{"sync\u2215atomic·AddInt64(SB)", "sync/atomic.AddInt64(SB)"},
-	{"timeout+20(FP)", "timeout+20(FP)"},
-	{"ts+16(FP)", "ts+16(FP)"},
-	{"x+24(FP)", "x+24(FP)"},
-	{"x·y(SB)", "x.y(SB)"},
-	{"x·y(SP)", "x.y(SP)"},
-	{"x·y+8(SB)", "x.y+8(SB)"},
-	{"x·y+8(SP)", "x.y+8(SP)"},
-	{"y+56(FP)", "y+56(FP)"},
-	{"·AddUint32(SB", "\"\".AddUint32(SB)"},
-	{"·callReflect(SB)", "\"\".callReflect(SB)"},
-}
-
-var x86OperandTests = []operandTest{
-	{"$(2.928932188134524e-01)", "$(0.29289321881345243)"},
-	{"$-1", "$-1"},
-	{"$0", "$0"},
-	{"$0x00000000", "$0"},
-	{"$runtime·badmcall(SB)", "$runtime.badmcall(SB)"},
-	{"$setg_gcc<>(SB)", "$setg_gcc<>(SB)"},
-	{"$~15", "$-16"},
-	{"(-64*1024+104)(SP)", "-65432(SP)"},
-	{"(0*4)(BP)", "(BP)"},
-	{"(1*4)(DI)", "4(DI)"},
-	{"(4*4)(BP)", "16(BP)"},
-	{"(AX)", "(AX)"},
-	{"(BP)(CX*4)", "(BP)(CX*4)"},
-	{"(BP*8)", "0(BP*8)"},
-	{"(BX)", "(BX)"},
-	{"(SP)", "(SP)"},
-	{"*AX", "AX"}, // TODO: Should make * illegal here; a simple alias for JMP AX.
-	{"*runtime·_GetStdHandle(SB)", "*runtime._GetStdHandle(SB)"},
-	{"-(4+12)(DI)", "-16(DI)"},
-	{"-1(DI)(BX*1)", "-1(DI)(BX*1)"},
-	{"-96(DI)(BX*1)", "-96(DI)(BX*1)"},
-	{"0(AX)", "(AX)"},
-	{"0(BP)", "(BP)"},
-	{"0(BX)", "(BX)"},
-	{"4(AX)", "4(AX)"},
-	{"AL", "AL"},
-	{"AX", "AX"},
-	{"BP", "BP"},
-	{"BX", "BX"},
-	{"CX", "CX"},
-	{"DI", "DI"},
-	{"DX", "DX"},
-	{"F0", "F0"},
-	{"GS", "GS"},
-	{"SI", "SI"},
-	{"SP", "SP"},
-	{"X0", "X0"},
-	{"X1", "X1"},
-	{"X2", "X2"},
-	{"X3", "X3"},
-	{"X4", "X4"},
-	{"X5", "X5"},
-	{"X6", "X6"},
-	{"X7", "X7"},
-	{"asmcgocall<>(SB)", "asmcgocall<>(SB)"},
-	{"ax+4(FP)", "ax+4(FP)"},
-	{"ptime-12(SP)", "ptime-12(SP)"},
-	{"runtime·_NtWaitForSingleObject(SB)", "runtime._NtWaitForSingleObject(SB)"},
-	{"s(FP)", "s(FP)"},
-	{"sec+4(FP)", "sec+4(FP)"},
-	{"shifts<>(SB)(CX*8)", "shifts<>(SB)(CX*8)"},
-	{"x+4(FP)", "x+4(FP)"},
-	{"·AddUint32(SB)", "\"\".AddUint32(SB)"},
-	{"·reflectcall(SB)", "\"\".reflectcall(SB)"},
-}
-
-var armOperandTests = []operandTest{
-	{"$0", "$0"},
-	{"$256", "$256"},
-	{"(R0)", "(R0)"},
-	{"(R11)", "(R11)"},
-	{"(g)", "(g)"},
-	{"-12(R4)", "-12(R4)"},
-	{"0(PC)", "0(PC)"},
-	{"1024", "1024"},
-	{"12(R(1))", "12(R1)"},
-	{"12(R13)", "12(R13)"},
-	{"R0", "R0"},
-	{"R0->(32-1)", "R0->31"},
-	{"R0<<R1", "R0<<R1"},
-	{"R0>>R(1)", "R0>>R1"},
-	{"R0@>(32-1)", "R0@>31"},
-	{"R1", "R1"},
-	{"R11", "R11"},
-	{"R12", "R12"},
-	{"R13", "R13"},
-	{"R14", "R14"},
-	{"R15", "R15"},
-	{"R1<<2(R3)", "R1<<2(R3)"},
-	{"R(1)<<2(R(3))", "R1<<2(R3)"},
-	{"R2", "R2"},
-	{"R3", "R3"},
-	{"R4", "R4"},
-	{"R(4)", "R4"},
-	{"R5", "R5"},
-	{"R6", "R6"},
-	{"R7", "R7"},
-	{"R8", "R8"},
-	{"[R0,R1,g,R15]", "[R0,R1,g,R15]"},
-	{"[R0-R7]", "[R0,R1,R2,R3,R4,R5,R6,R7]"},
-	{"[R(0)-R(7)]", "[R0,R1,R2,R3,R4,R5,R6,R7]"},
-	{"[R0]", "[R0]"},
-	{"[R1-R12]", "[R1,R2,R3,R4,R5,R6,R7,R8,R9,g,R11,R12]"},
-	{"armCAS64(SB)", "armCAS64(SB)"},
-	{"asmcgocall<>(SB)", "asmcgocall<>(SB)"},
-	{"c+28(FP)", "c+28(FP)"},
-	{"g", "g"},
-	{"gosave<>(SB)", "gosave<>(SB)"},
-	{"retlo+12(FP)", "retlo+12(FP)"},
-	{"runtime·_sfloat2(SB)", "runtime._sfloat2(SB)"},
-	{"·AddUint32(SB)", "\"\".AddUint32(SB)"},
-	{"(R1, R3)", "(R1, R3)"},
-}
-
-var ppc64OperandTests = []operandTest{
-	{"$((1<<63)-1)", "$9223372036854775807"},
-	{"$(-64*1024)", "$-65536"},
-	{"$(1024 * 8)", "$8192"},
-	{"$-1", "$-1"},
-	{"$-24(R4)", "$-24(R4)"},
-	{"$0", "$0"},
-	{"$0(R1)", "$(R1)"},
-	{"$0.5", "$(0.5)"},
-	{"$0x7000", "$28672"},
-	{"$0x88888eef", "$2290650863"},
-	{"$1", "$1"},
-	{"$_main<>(SB)", "$_main<>(SB)"},
-	{"$argframe(FP)", "$argframe(FP)"},
-	{"$runtime·tlsg(SB)", "$runtime.tlsg(SB)"},
-	{"$~3", "$-4"},
-	{"(-288-3*8)(R1)", "-312(R1)"},
-	{"(16)(R7)", "16(R7)"},
-	{"(8)(g)", "8(g)"},
-	{"(CTR)", "(CTR)"},
-	{"(R0)", "(R0)"},
-	{"(R3)", "(R3)"},
-	{"(R4)", "(R4)"},
-	{"(R5)", "(R5)"},
-	{"(R5)(R6*1)", "(R5)(R6*1)"},
-	{"(R5+R6)", "(R5)(R6*1)"}, // Old syntax.
-	{"-1(R4)", "-1(R4)"},
-	{"-1(R5)", "-1(R5)"},
-	{"6(PC)", "6(PC)"},
-	{"CR7", "CR7"},
-	{"CTR", "CTR"},
-	{"F14", "F14"},
-	{"F15", "F15"},
-	{"F16", "F16"},
-	{"F17", "F17"},
-	{"F18", "F18"},
-	{"F19", "F19"},
-	{"F20", "F20"},
-	{"F21", "F21"},
-	{"F22", "F22"},
-	{"F23", "F23"},
-	{"F24", "F24"},
-	{"F25", "F25"},
-	{"F26", "F26"},
-	{"F27", "F27"},
-	{"F28", "F28"},
-	{"F29", "F29"},
-	{"F30", "F30"},
-	{"F31", "F31"},
-	{"LR", "LR"},
-	{"R0", "R0"},
-	{"R1", "R1"},
-	{"R11", "R11"},
-	{"R12", "R12"},
-	{"R13", "R13"},
-	{"R14", "R14"},
-	{"R15", "R15"},
-	{"R16", "R16"},
-	{"R17", "R17"},
-	{"R18", "R18"},
-	{"R19", "R19"},
-	{"R2", "R2"},
-	{"R20", "R20"},
-	{"R21", "R21"},
-	{"R22", "R22"},
-	{"R23", "R23"},
-	{"R24", "R24"},
-	{"R25", "R25"},
-	{"R26", "R26"},
-	{"R27", "R27"},
-	{"R28", "R28"},
-	{"R29", "R29"},
-	{"R3", "R3"},
-	{"R31", "R31"},
-	{"R4", "R4"},
-	{"R5", "R5"},
-	{"R6", "R6"},
-	{"R7", "R7"},
-	{"R8", "R8"},
-	{"R9", "R9"},
-	{"SPR(269)", "SPR(269)"},
-	{"a(FP)", "a(FP)"},
-	{"g", "g"},
-	{"ret+8(FP)", "ret+8(FP)"},
-	{"runtime·abort(SB)", "runtime.abort(SB)"},
-	{"·AddUint32(SB)", "\"\".AddUint32(SB)"},
-	{"·trunc(SB)", "\"\".trunc(SB)"},
-}
-
-var arm64OperandTests = []operandTest{
-	{"$0", "$0"},
-	{"$0.5", "$(0.5)"},
-	{"0(R26)", "(R26)"},
-	{"0(RSP)", "(RSP)"},
-	{"$1", "$1"},
-	{"$-1", "$-1"},
-	{"$1000", "$1000"},
-	{"$1000000000", "$1000000000"},
-	{"$0x7fff3c000", "$34358935552"},
-	{"$1234", "$1234"},
-	{"$~15", "$-16"},
-	{"$16", "$16"},
-	{"-16(RSP)", "-16(RSP)"},
-	{"16(RSP)", "16(RSP)"},
-	{"1(R1)", "1(R1)"},
-	{"-1(R4)", "-1(R4)"},
-	{"18740(R5)", "18740(R5)"},
-	{"$2", "$2"},
-	{"$-24(R4)", "$-24(R4)"},
-	{"-24(RSP)", "-24(RSP)"},
-	{"$24(RSP)", "$24(RSP)"},
-	{"-32(RSP)", "-32(RSP)"},
-	{"$48", "$48"},
-	{"$(-64*1024)(R7)", "$-65536(R7)"},
-	{"$(8-1)", "$7"},
-	{"a+0(FP)", "a(FP)"},
-	{"a1+8(FP)", "a1+8(FP)"},
-	{"·AddInt32(SB)", `"".AddInt32(SB)`},
-	{"runtime·divWVW(SB)", "runtime.divWVW(SB)"},
-	{"$argframe+0(FP)", "$argframe(FP)"},
-	{"$asmcgocall<>(SB)", "$asmcgocall<>(SB)"},
-	{"EQ", "EQ"},
-	{"F29", "F29"},
-	{"F3", "F3"},
-	{"F30", "F30"},
-	{"g", "g"},
-	{"LR", "R30"},
-	{"(LR)", "(R30)"},
-	{"R0", "R0"},
-	{"R10", "R10"},
-	{"R11", "R11"},
-	{"$4503601774854144.0", "$(4503601774854144.0)"},
-	{"$runtime·badsystemstack(SB)", "$runtime.badsystemstack(SB)"},
-	{"ZR", "ZR"},
-	{"(ZR)", "(ZR)"},
-	{"(R29, RSP)", "(R29, RSP)"},
-}
diff --git a/src/cmd/asm/internal/asm/parse.go b/src/cmd/asm/internal/asm/parse.go
deleted file mode 100644
index c07e6f8..0000000
--- a/src/cmd/asm/internal/asm/parse.go
+++ /dev/null
@@ -1,983 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package asm implements the parser and instruction generator for the assembler.
-// TODO: Split apart?
-package asm
-
-import (
-	"fmt"
-	"log"
-	"os"
-	"strconv"
-	"text/scanner"
-	"unicode/utf8"
-
-	"cmd/asm/internal/arch"
-	"cmd/asm/internal/lex"
-	"cmd/internal/obj"
-)
-
-type Parser struct {
-	lex           lex.TokenReader
-	lineNum       int   // Line number in source file.
-	histLineNum   int32 // Cumulative line number across source files.
-	errorLine     int32 // (Cumulative) line number of last error.
-	errorCount    int   // Number of errors.
-	pc            int64 // virtual PC; count of Progs; doesn't advance for GLOBL or DATA.
-	input         []lex.Token
-	inputPos      int
-	pendingLabels []string // Labels to attach to next instruction.
-	labels        map[string]*obj.Prog
-	toPatch       []Patch
-	addr          []obj.Addr
-	arch          *arch.Arch
-	ctxt          *obj.Link
-	firstProg     *obj.Prog
-	lastProg      *obj.Prog
-	dataAddr      map[string]int64 // Most recent address for DATA for this symbol.
-}
-
-type Patch struct {
-	prog  *obj.Prog
-	label string
-}
-
-func NewParser(ctxt *obj.Link, ar *arch.Arch, lexer lex.TokenReader) *Parser {
-	return &Parser{
-		ctxt:     ctxt,
-		arch:     ar,
-		lex:      lexer,
-		labels:   make(map[string]*obj.Prog),
-		dataAddr: make(map[string]int64),
-	}
-}
-
-// panicOnError is enable when testing to abort execution on the first error
-// and turn it into a recoverable panic.
-var panicOnError bool
-
-func (p *Parser) errorf(format string, args ...interface{}) {
-	if panicOnError {
-		panic(fmt.Errorf(format, args...))
-	}
-	if p.histLineNum == p.errorLine {
-		// Only one error per line.
-		return
-	}
-	p.errorLine = p.histLineNum
-	// Put file and line information on head of message.
-	format = "%s:%d: " + format + "\n"
-	args = append([]interface{}{p.lex.File(), p.lineNum}, args...)
-	fmt.Fprintf(os.Stderr, format, args...)
-	p.errorCount++
-	if p.errorCount > 10 {
-		log.Fatal("too many errors")
-	}
-}
-
-func (p *Parser) Parse() (*obj.Prog, bool) {
-	for p.line() {
-	}
-	if p.errorCount > 0 {
-		return nil, false
-	}
-	p.patch()
-	return p.firstProg, true
-}
-
-// WORD [ arg {, arg} ] (';' | '\n')
-func (p *Parser) line() bool {
-	// Skip newlines.
-	var tok lex.ScanToken
-	for {
-		tok = p.lex.Next()
-		// We save the line number here so error messages from this instruction
-		// are labeled with this line. Otherwise we complain after we've absorbed
-		// the terminating newline and the line numbers are off by one in errors.
-		p.lineNum = p.lex.Line()
-		p.histLineNum = lex.HistLine()
-		switch tok {
-		case '\n', ';':
-			continue
-		case scanner.EOF:
-			return false
-		}
-		break
-	}
-	// First item must be an identifier.
-	if tok != scanner.Ident {
-		p.errorf("expected identifier, found %q", p.lex.Text())
-		return false // Might as well stop now.
-	}
-	word := p.lex.Text()
-	var cond string
-	operands := make([][]lex.Token, 0, 3)
-	// Zero or more comma-separated operands, one per loop.
-	nesting := 0
-	colon := -1
-	for tok != '\n' && tok != ';' {
-		// Process one operand.
-		items := make([]lex.Token, 0, 3)
-		for {
-			tok = p.lex.Next()
-			if len(operands) == 0 && len(items) == 0 {
-				if (p.arch.Thechar == '5' || p.arch.Thechar == '7') && tok == '.' {
-					// ARM conditionals.
-					tok = p.lex.Next()
-					str := p.lex.Text()
-					if tok != scanner.Ident {
-						p.errorf("ARM condition expected identifier, found %s", str)
-					}
-					cond = cond + "." + str
-					continue
-				}
-				if tok == ':' {
-					// Labels.
-					p.pendingLabels = append(p.pendingLabels, word)
-					return true
-				}
-			}
-			if tok == scanner.EOF {
-				p.errorf("unexpected EOF")
-				return false
-			}
-			// Split operands on comma. Also, the old syntax on x86 for a "register pair"
-			// was AX:DX, for which the new syntax is DX, AX. Note the reordering.
-			if tok == '\n' || tok == ';' || (nesting == 0 && (tok == ',' || tok == ':')) {
-				if tok == ':' {
-					// Remember this location so we can swap the operands below.
-					if colon >= 0 {
-						p.errorf("invalid ':' in operand")
-					}
-					colon = len(operands)
-				}
-				break
-			}
-			if tok == '(' || tok == '[' {
-				nesting++
-			}
-			if tok == ')' || tok == ']' {
-				nesting--
-			}
-			items = append(items, lex.Make(tok, p.lex.Text()))
-		}
-		if len(items) > 0 {
-			operands = append(operands, items)
-			if colon >= 0 && len(operands) == colon+2 {
-				// AX:DX becomes DX, AX.
-				operands[colon], operands[colon+1] = operands[colon+1], operands[colon]
-				colon = -1
-			}
-		} else if len(operands) > 0 || tok == ',' || colon >= 0 {
-			// Had a separator with nothing after.
-			p.errorf("missing operand")
-		}
-	}
-	i, present := arch.Pseudos[word]
-	if present {
-		p.pseudo(i, word, operands)
-		return true
-	}
-	i, present = p.arch.Instructions[word]
-	if present {
-		p.instruction(i, word, cond, operands)
-		return true
-	}
-	p.errorf("unrecognized instruction %q", word)
-	return true
-}
-
-func (p *Parser) instruction(op int, word, cond string, operands [][]lex.Token) {
-	p.addr = p.addr[0:0]
-	isJump := p.arch.IsJump(word)
-	for _, op := range operands {
-		addr := p.address(op)
-		if !isJump && addr.Reg < 0 { // Jumps refer to PC, a pseudo.
-			p.errorf("illegal use of pseudo-register in %s", word)
-		}
-		p.addr = append(p.addr, addr)
-	}
-	if isJump {
-		p.asmJump(op, cond, p.addr)
-		return
-	}
-	p.asmInstruction(op, cond, p.addr)
-}
-
-func (p *Parser) pseudo(op int, word string, operands [][]lex.Token) {
-	switch op {
-	case obj.ATEXT:
-		p.asmText(word, operands)
-	case obj.ADATA:
-		p.asmData(word, operands)
-	case obj.AGLOBL:
-		p.asmGlobl(word, operands)
-	case obj.APCDATA:
-		p.asmPCData(word, operands)
-	case obj.AFUNCDATA:
-		p.asmFuncData(word, operands)
-	default:
-		p.errorf("unimplemented: %s", word)
-	}
-}
-
-func (p *Parser) start(operand []lex.Token) {
-	p.input = operand
-	p.inputPos = 0
-}
-
-// address parses the operand into a link address structure.
-func (p *Parser) address(operand []lex.Token) obj.Addr {
-	p.start(operand)
-	addr := obj.Addr{}
-	p.operand(&addr)
-	return addr
-}
-
-// parseScale converts a decimal string into a valid scale factor.
-func (p *Parser) parseScale(s string) int8 {
-	switch s {
-	case "1", "2", "4", "8":
-		return int8(s[0] - '0')
-	}
-	p.errorf("bad scale: %s", s)
-	return 0
-}
-
-// operand parses a general operand and stores the result in *a.
-func (p *Parser) operand(a *obj.Addr) bool {
-	//fmt.Printf("Operand: %v\n", p.input)
-	if len(p.input) == 0 {
-		p.errorf("empty operand: cannot happen")
-		return false
-	}
-	// General address (with a few exceptions) looks like
-	//	$sym±offset(SB)(reg)(index*scale)
-	// Exceptions are:
-	//
-	//	R1
-	//	offset
-	//	$offset
-	// Every piece is optional, so we scan left to right and what
-	// we discover tells us where we are.
-
-	// Prefix: $.
-	var prefix rune
-	switch tok := p.peek(); tok {
-	case '$', '*':
-		prefix = rune(tok)
-		p.next()
-	}
-
-	// Symbol: sym±offset(SB)
-	tok := p.next()
-	name := tok.String()
-	if tok.ScanToken == scanner.Ident && !p.atStartOfRegister(name) {
-		// We have a symbol. Parse $sym±offset(symkind)
-		p.symbolReference(a, name, prefix)
-		// fmt.Printf("SYM %s\n", obj.Dconv(&emptyProg, 0, a))
-		if p.peek() == scanner.EOF {
-			return true
-		}
-	}
-
-	// Special register list syntax for arm: [R1,R3-R7]
-	if tok.ScanToken == '[' {
-		if prefix != 0 {
-			p.errorf("illegal use of register list")
-		}
-		p.registerList(a)
-		p.expect(scanner.EOF)
-		return true
-	}
-
-	// Register: R1
-	if tok.ScanToken == scanner.Ident && p.atStartOfRegister(name) {
-		if p.atRegisterShift() {
-			// ARM shifted register such as R1<<R2 or R1>>2.
-			a.Type = obj.TYPE_SHIFT
-			a.Offset = p.registerShift(tok.String(), prefix)
-			if p.peek() == '(' {
-				// Can only be a literal register here.
-				p.next()
-				tok := p.next()
-				name := tok.String()
-				if !p.atStartOfRegister(name) {
-					p.errorf("expected register; found %s", name)
-				}
-				a.Reg, _ = p.registerReference(name)
-				p.get(')')
-			}
-		} else if r1, r2, scale, ok := p.register(tok.String(), prefix); ok {
-			if scale != 0 {
-				p.errorf("expected simple register reference")
-			}
-			a.Type = obj.TYPE_REG
-			a.Reg = r1
-			if r2 != 0 {
-				// Form is R1:R2. It is on RHS and the second register
-				// needs to go into the LHS.
-				panic("cannot happen (Addr.Reg2)")
-			}
-		}
-		// fmt.Printf("REG %s\n", obj.Dconv(&emptyProg, 0, a))
-		p.expect(scanner.EOF)
-		return true
-	}
-
-	// Constant.
-	haveConstant := false
-	switch tok.ScanToken {
-	case scanner.Int, scanner.Float, scanner.String, scanner.Char, '+', '-', '~':
-		haveConstant = true
-	case '(':
-		// Could be parenthesized expression or (R).
-		rname := p.next().String()
-		p.back()
-		haveConstant = !p.atStartOfRegister(rname)
-		if !haveConstant {
-			p.back() // Put back the '('.
-		}
-	}
-	if haveConstant {
-		p.back()
-		if p.have(scanner.Float) {
-			if prefix != '$' {
-				p.errorf("floating-point constant must be an immediate")
-			}
-			a.Type = obj.TYPE_FCONST
-			a.Val = p.floatExpr()
-			// fmt.Printf("FCONST %s\n", obj.Dconv(&emptyProg, 0, a))
-			p.expect(scanner.EOF)
-			return true
-		}
-		if p.have(scanner.String) {
-			if prefix != '$' {
-				p.errorf("string constant must be an immediate")
-			}
-			str, err := strconv.Unquote(p.get(scanner.String).String())
-			if err != nil {
-				p.errorf("string parse error: %s", err)
-			}
-			a.Type = obj.TYPE_SCONST
-			a.Val = str
-			// fmt.Printf("SCONST %s\n", obj.Dconv(&emptyProg, 0, a))
-			p.expect(scanner.EOF)
-			return true
-		}
-		a.Offset = int64(p.expr())
-		if p.peek() != '(' {
-			switch prefix {
-			case '$':
-				a.Type = obj.TYPE_CONST
-			case '*':
-				a.Type = obj.TYPE_INDIR // Can appear but is illegal, will be rejected by the linker.
-			default:
-				a.Type = obj.TYPE_MEM
-			}
-			// fmt.Printf("CONST %d %s\n", a.Offset, obj.Dconv(&emptyProg, 0, a))
-			p.expect(scanner.EOF)
-			return true
-		}
-		// fmt.Printf("offset %d \n", a.Offset)
-	}
-
-	// Register indirection: (reg) or (index*scale). We are on the opening paren.
-	p.registerIndirect(a, prefix)
-	// fmt.Printf("DONE %s\n", p.arch.Dconv(&emptyProg, 0, a))
-
-	p.expect(scanner.EOF)
-	return true
-}
-
-// atStartOfRegister reports whether the parser is at the start of a register definition.
-func (p *Parser) atStartOfRegister(name string) bool {
-	// Simple register: R10.
-	_, present := p.arch.Register[name]
-	if present {
-		return true
-	}
-	// Parenthesized register: R(10).
-	return p.arch.RegisterPrefix[name] && p.peek() == '('
-}
-
-// atRegisterShift reports whether we are at the start of an ARM shifted register.
-// We have consumed the register or R prefix.
-func (p *Parser) atRegisterShift() bool {
-	// ARM only.
-	if p.arch.Thechar != '5' {
-		return false
-	}
-	// R1<<...
-	if lex.IsRegisterShift(p.peek()) {
-		return true
-	}
-	// R(1)<<...   Ugly check. TODO: Rethink how we handle ARM register shifts to be
-	// less special.
-	if p.peek() != '(' || len(p.input)-p.inputPos < 4 {
-		return false
-	}
-	return p.at('(', scanner.Int, ')') && lex.IsRegisterShift(p.input[p.inputPos+3].ScanToken)
-}
-
-// registerReference parses a register given either the name, R10, or a parenthesized form, SPR(10).
-func (p *Parser) registerReference(name string) (int16, bool) {
-	r, present := p.arch.Register[name]
-	if present {
-		return r, true
-	}
-	if !p.arch.RegisterPrefix[name] {
-		p.errorf("expected register; found %s", name)
-		return 0, false
-	}
-	p.get('(')
-	tok := p.get(scanner.Int)
-	num, err := strconv.ParseInt(tok.String(), 10, 16)
-	p.get(')')
-	if err != nil {
-		p.errorf("parsing register list: %s", err)
-		return 0, false
-	}
-	r, ok := p.arch.RegisterNumber(name, int16(num))
-	if !ok {
-		p.errorf("illegal register %s(%d)", name, r)
-		return 0, false
-	}
-	return r, true
-}
-
-// register parses a full register reference where there is no symbol present (as in 4(R0) or R(10) but not sym(SB))
-// including forms involving multiple registers such as R1:R2.
-func (p *Parser) register(name string, prefix rune) (r1, r2 int16, scale int8, ok bool) {
-	// R1 or R(1) R1:R2 R1,R2 R1+R2, or R1*scale.
-	r1, ok = p.registerReference(name)
-	if !ok {
-		return
-	}
-	if prefix != 0 && prefix != '*' { // *AX is OK.
-		p.errorf("prefix %c not allowed for register: %c%s", prefix, prefix, name)
-	}
-	c := p.peek()
-	if c == ':' || c == ',' || c == '+' {
-		// 2nd register; syntax (R1+R2) etc. No two architectures agree.
-		// Check the architectures match the syntax.
-		char := p.arch.Thechar
-		switch p.next().ScanToken {
-		case ',':
-			if char != '5' && char != '7' {
-				p.errorf("(register,register) not supported on this architecture")
-				return
-			}
-		case '+':
-			if char != '9' {
-				p.errorf("(register+register) not supported on this architecture")
-				return
-			}
-		}
-		name := p.next().String()
-		r2, ok = p.registerReference(name)
-		if !ok {
-			return
-		}
-	}
-	if p.peek() == '*' {
-		// Scale
-		p.next()
-		scale = p.parseScale(p.next().String())
-	}
-	return r1, r2, scale, true
-}
-
-// registerShift parses an ARM shifted register reference and returns the encoded representation.
-// There is known to be a register (current token) and a shift operator (peeked token).
-func (p *Parser) registerShift(name string, prefix rune) int64 {
-	if prefix != 0 {
-		p.errorf("prefix %c not allowed for shifted register: $%s", prefix, name)
-	}
-	// R1 op R2 or r1 op constant.
-	// op is:
-	//	"<<" == 0
-	//	">>" == 1
-	//	"->" == 2
-	//	"@>" == 3
-	r1, ok := p.registerReference(name)
-	if !ok {
-		return 0
-	}
-	var op int16
-	switch p.next().ScanToken {
-	case lex.LSH:
-		op = 0
-	case lex.RSH:
-		op = 1
-	case lex.ARR:
-		op = 2
-	case lex.ROT:
-		op = 3
-	}
-	tok := p.next()
-	str := tok.String()
-	var count int16
-	switch tok.ScanToken {
-	case scanner.Ident:
-		r2, ok := p.registerReference(str)
-		if !ok {
-			p.errorf("rhs of shift must be register or integer: %s", str)
-		}
-		count = (r2&15)<<8 | 1<<4
-	case scanner.Int, '(':
-		p.back()
-		x := int64(p.expr())
-		if x >= 32 {
-			p.errorf("register shift count too large: %s", str)
-		}
-		count = int16((x & 31) << 7)
-	default:
-		p.errorf("unexpected %s in register shift", tok.String())
-	}
-	return int64((r1 & 15) | op<<5 | count)
-}
-
-// symbolReference parses a symbol that is known not to be a register.
-func (p *Parser) symbolReference(a *obj.Addr, name string, prefix rune) {
-	// Identifier is a name.
-	switch prefix {
-	case 0:
-		a.Type = obj.TYPE_MEM
-	case '$':
-		a.Type = obj.TYPE_ADDR
-	case '*':
-		a.Type = obj.TYPE_INDIR
-	}
-	// Weirdness with statics: Might now have "<>".
-	isStatic := 0 // TODO: Really a boolean, but Linklookup wants a "version" integer.
-	if p.peek() == '<' {
-		isStatic = 1
-		p.next()
-		p.get('>')
-	}
-	if p.peek() == '+' || p.peek() == '-' {
-		a.Offset = int64(p.expr())
-	}
-	a.Sym = obj.Linklookup(p.ctxt, name, isStatic)
-	if p.peek() == scanner.EOF {
-		if prefix != 0 {
-			p.errorf("illegal addressing mode for symbol %s", name)
-		}
-		return
-	}
-	// Expect (SB) or (FP), (PC), (SB), or (SP)
-	p.get('(')
-	reg := p.get(scanner.Ident).String()
-	p.get(')')
-	p.setPseudoRegister(a, reg, isStatic != 0, prefix)
-}
-
-// setPseudoRegister sets the NAME field of addr for a pseudo-register reference such as (SB).
-func (p *Parser) setPseudoRegister(addr *obj.Addr, reg string, isStatic bool, prefix rune) {
-	if addr.Reg != 0 {
-		p.errorf("internal error: reg %s already set in pseudo", reg)
-	}
-	switch reg {
-	case "FP":
-		addr.Name = obj.NAME_PARAM
-	case "PC":
-		if prefix != 0 {
-			p.errorf("illegal addressing mode for PC")
-		}
-		addr.Type = obj.TYPE_BRANCH // We set the type and leave NAME untouched. See asmJump.
-	case "SB":
-		addr.Name = obj.NAME_EXTERN
-		if isStatic {
-			addr.Name = obj.NAME_STATIC
-		}
-	case "SP":
-		addr.Name = obj.NAME_AUTO // The pseudo-stack.
-	default:
-		p.errorf("expected pseudo-register; found %s", reg)
-	}
-	if prefix == '$' {
-		addr.Type = obj.TYPE_ADDR
-	}
-}
-
-// registerIndirect parses the general form of a register indirection.
-// It is can be (R1), (R2*scale), or (R1)(R2*scale) where R1 may be a simple
-// register or register pair R:R or (R, R) or (R+R).
-// Or it might be a pseudo-indirection like (FP).
-// We are sitting on the opening parenthesis.
-func (p *Parser) registerIndirect(a *obj.Addr, prefix rune) {
-	p.get('(')
-	tok := p.next()
-	name := tok.String()
-	r1, r2, scale, ok := p.register(name, 0)
-	if !ok {
-		p.errorf("indirect through non-register %s", tok)
-	}
-	p.get(')')
-	a.Type = obj.TYPE_MEM
-	if r1 < 0 {
-		// Pseudo-register reference.
-		if r2 != 0 {
-			p.errorf("cannot use pseudo-register in pair")
-			return
-		}
-		// For SB, SP, and FP, there must be a name here. 0(FP) is not legal.
-		if name != "PC" && a.Name == obj.NAME_NONE {
-			p.errorf("cannot reference %s without a symbol", name)
-		}
-		p.setPseudoRegister(a, name, false, prefix)
-		return
-	}
-	a.Reg = r1
-	if r2 != 0 {
-		// TODO: Consistency in the encoding would be nice here.
-		if p.arch.Thechar == '5' || p.arch.Thechar == '7' {
-			// Special form
-			// ARM: destination register pair (R1, R2).
-			// ARM64: register pair (R1, R2) for LDP/STP.
-			if prefix != 0 || scale != 0 {
-				p.errorf("illegal address mode for register pair")
-				return
-			}
-			a.Type = obj.TYPE_REGREG
-			a.Offset = int64(r2)
-			// Nothing may follow
-			return
-		}
-		if p.arch.Thechar == '9' {
-			// Special form for PPC64: (R1+R2); alias for (R1)(R2*1).
-			if prefix != 0 || scale != 0 {
-				p.errorf("illegal address mode for register+register")
-				return
-			}
-			a.Type = obj.TYPE_MEM
-			a.Scale = 1
-			a.Index = r2
-			// Nothing may follow.
-			return
-		}
-	}
-	if r2 != 0 {
-		p.errorf("indirect through register pair")
-	}
-	if prefix == '$' {
-		a.Type = obj.TYPE_ADDR
-	}
-	if r1 == arch.RPC && prefix != 0 {
-		p.errorf("illegal addressing mode for PC")
-	}
-	if scale == 0 && p.peek() == '(' {
-		// General form (R)(R*scale).
-		p.next()
-		tok := p.next()
-		r1, r2, scale, ok = p.register(tok.String(), 0)
-		if !ok {
-			p.errorf("indirect through non-register %s", tok)
-		}
-		if r2 != 0 {
-			p.errorf("unimplemented two-register form")
-		}
-		a.Index = r1
-		a.Scale = int16(scale)
-		p.get(')')
-	} else if scale != 0 {
-		// First (R) was missing, all we have is (R*scale).
-		a.Reg = 0
-		a.Index = r1
-		a.Scale = int16(scale)
-	}
-}
-
-// registerList parses an ARM register list expression, a list of registers in [].
-// There may be comma-separated ranges or individual registers, as in
-// [R1,R3-R5]. Only R0 through R15 may appear.
-// The opening bracket has been consumed.
-func (p *Parser) registerList(a *obj.Addr) {
-	// One range per loop.
-	var bits uint16
-	for {
-		tok := p.next()
-		if tok.ScanToken == ']' {
-			break
-		}
-		lo := p.registerNumber(tok.String())
-		hi := lo
-		if p.peek() == '-' {
-			p.next()
-			hi = p.registerNumber(p.next().String())
-		}
-		if hi < lo {
-			lo, hi = hi, lo
-		}
-		for lo <= hi {
-			if bits&(1<<lo) != 0 {
-				p.errorf("register R%d already in list", lo)
-			}
-			bits |= 1 << lo
-			lo++
-		}
-		if p.peek() != ']' {
-			p.get(',')
-		}
-	}
-	a.Type = obj.TYPE_REGLIST
-	a.Offset = int64(bits)
-}
-
-// register number is ARM-specific. It returns the number of the specified register.
-func (p *Parser) registerNumber(name string) uint16 {
-	if p.arch.Thechar == '5' && name == "g" {
-		return 10
-	}
-	if name[0] != 'R' {
-		p.errorf("expected g or R0 through R15; found %s", name)
-	}
-	r, ok := p.registerReference(name)
-	if !ok {
-		return 0
-	}
-	return uint16(r - p.arch.Register["R0"])
-}
-
-// Note: There are two changes in the expression handling here
-// compared to the old yacc/C implementations. Neither has
-// much practical consequence because the expressions we
-// see in assembly code are simple, but for the record:
-//
-// 1) Evaluation uses uint64; the old one used int64.
-// 2) Precedence uses Go rules not C rules.
-
-// expr = term | term ('+' | '-' | '|' | '^') term.
-func (p *Parser) expr() uint64 {
-	value := p.term()
-	for {
-		switch p.peek() {
-		case '+':
-			p.next()
-			value += p.term()
-		case '-':
-			p.next()
-			value -= p.term()
-		case '|':
-			p.next()
-			value |= p.term()
-		case '^':
-			p.next()
-			value ^= p.term()
-		default:
-			return value
-		}
-	}
-}
-
-// floatExpr = fconst | '-' floatExpr | '+' floatExpr | '(' floatExpr ')'
-func (p *Parser) floatExpr() float64 {
-	tok := p.next()
-	switch tok.ScanToken {
-	case '(':
-		v := p.floatExpr()
-		if p.next().ScanToken != ')' {
-			p.errorf("missing closing paren")
-		}
-		return v
-	case '+':
-		return +p.floatExpr()
-	case '-':
-		return -p.floatExpr()
-	case scanner.Float:
-		return p.atof(tok.String())
-	}
-	p.errorf("unexpected %s evaluating float expression", tok)
-	return 0
-}
-
-// term = factor | factor ('*' | '/' | '%' | '>>' | '<<' | '&') factor
-func (p *Parser) term() uint64 {
-	value := p.factor()
-	for {
-		switch p.peek() {
-		case '*':
-			p.next()
-			value *= p.factor()
-		case '/':
-			p.next()
-			if int64(value) < 0 {
-				p.errorf("divide of value with high bit set")
-			}
-			divisor := p.factor()
-			if divisor == 0 {
-				p.errorf("division by zero")
-			} else {
-				value /= divisor
-			}
-		case '%':
-			p.next()
-			divisor := p.factor()
-			if int64(value) < 0 {
-				p.errorf("modulo of value with high bit set")
-			}
-			if divisor == 0 {
-				p.errorf("modulo by zero")
-			} else {
-				value %= divisor
-			}
-		case lex.LSH:
-			p.next()
-			shift := p.factor()
-			if int64(shift) < 0 {
-				p.errorf("negative left shift count")
-			}
-			return value << shift
-		case lex.RSH:
-			p.next()
-			shift := p.term()
-			if int64(shift) < 0 {
-				p.errorf("negative right shift count")
-			}
-			if int64(value) < 0 {
-				p.errorf("right shift of value with high bit set")
-			}
-			value >>= shift
-		case '&':
-			p.next()
-			value &= p.factor()
-		default:
-			return value
-		}
-	}
-}
-
-// factor = const | '+' factor | '-' factor | '~' factor | '(' expr ')'
-func (p *Parser) factor() uint64 {
-	tok := p.next()
-	switch tok.ScanToken {
-	case scanner.Int:
-		return p.atoi(tok.String())
-	case scanner.Char:
-		str, err := strconv.Unquote(tok.String())
-		if err != nil {
-			p.errorf("%s", err)
-		}
-		r, w := utf8.DecodeRuneInString(str)
-		if w == 1 && r == utf8.RuneError {
-			p.errorf("illegal UTF-8 encoding for character constant")
-		}
-		return uint64(r)
-	case '+':
-		return +p.factor()
-	case '-':
-		return -p.factor()
-	case '~':
-		return ^p.factor()
-	case '(':
-		v := p.expr()
-		if p.next().ScanToken != ')' {
-			p.errorf("missing closing paren")
-		}
-		return v
-	}
-	p.errorf("unexpected %s evaluating expression", tok)
-	return 0
-}
-
-// positiveAtoi returns an int64 that must be >= 0.
-func (p *Parser) positiveAtoi(str string) int64 {
-	value, err := strconv.ParseInt(str, 0, 64)
-	if err != nil {
-		p.errorf("%s", err)
-	}
-	if value < 0 {
-		p.errorf("%s overflows int64", str)
-	}
-	return value
-}
-
-func (p *Parser) atoi(str string) uint64 {
-	value, err := strconv.ParseUint(str, 0, 64)
-	if err != nil {
-		p.errorf("%s", err)
-	}
-	return value
-}
-
-func (p *Parser) atof(str string) float64 {
-	value, err := strconv.ParseFloat(str, 64)
-	if err != nil {
-		p.errorf("%s", err)
-	}
-	return value
-}
-
-func (p *Parser) atos(str string) string {
-	value, err := strconv.Unquote(str)
-	if err != nil {
-		p.errorf("%s", err)
-	}
-	return value
-}
-
-// EOF represents the end of input.
-var EOF = lex.Make(scanner.EOF, "EOF")
-
-func (p *Parser) next() lex.Token {
-	if !p.more() {
-		return EOF
-	}
-	tok := p.input[p.inputPos]
-	p.inputPos++
-	return tok
-}
-
-func (p *Parser) back() {
-	p.inputPos--
-}
-
-func (p *Parser) peek() lex.ScanToken {
-	if p.more() {
-		return p.input[p.inputPos].ScanToken
-	}
-	return scanner.EOF
-}
-
-func (p *Parser) more() bool {
-	return p.inputPos < len(p.input)
-}
-
-// get verifies that the next item has the expected type and returns it.
-func (p *Parser) get(expected lex.ScanToken) lex.Token {
-	p.expect(expected)
-	return p.next()
-}
-
-// expect verifies that the next item has the expected type. It does not consume it.
-func (p *Parser) expect(expected lex.ScanToken) {
-	if p.peek() != expected {
-		p.errorf("expected %s, found %s", expected, p.next())
-	}
-}
-
-// have reports whether the remaining tokens (including the current one) contain the specified token.
-func (p *Parser) have(token lex.ScanToken) bool {
-	for i := p.inputPos; i < len(p.input); i++ {
-		if p.input[i].ScanToken == token {
-			return true
-		}
-	}
-	return false
-}
-
-// at reports whether the next tokens are as requested.
-func (p *Parser) at(next ...lex.ScanToken) bool {
-	if len(p.input)-p.inputPos < len(next) {
-		return false
-	}
-	for i, r := range next {
-		if p.input[p.inputPos+i].ScanToken != r {
-			return false
-		}
-	}
-	return true
-}
diff --git a/src/cmd/asm/internal/asm/testdata/386.out b/src/cmd/asm/internal/asm/testdata/386.out
deleted file mode 100644
index be43ccb..0000000
--- a/src/cmd/asm/internal/asm/testdata/386.out
+++ /dev/null
@@ -1,49 +0,0 @@
-5 00001 (testdata/386.s:5)	TEXT	foo(SB), 0, $0
-8 00002 (testdata/386.s:8)	SETCC	AX
-9 00003 (testdata/386.s:9)	SETCC	foo+4(SB)
-12 00004 (testdata/386.s:12)	DIVB	AX
-13 00005 (testdata/386.s:13)	DIVB	foo+4(SB)
-14 00006 (testdata/386.s:14)	PUSHL	$foo+4(SB)
-15 00007 (testdata/386.s:15)	POPL	AX
-18 00008 (testdata/386.s:18)	SUBB	$1, AX
-19 00009 (testdata/386.s:19)	SUBB	$1, foo+4(SB)
-20 00010 (testdata/386.s:20)	SUBB	BX, AX
-21 00011 (testdata/386.s:21)	SUBB	BX, foo+4(SB)
-24 00012 (testdata/386.s:24)	CMPB	AX, $1
-25 00013 (testdata/386.s:25)	CMPB	foo+4(SB), $4
-26 00014 (testdata/386.s:26)	CMPB	BX, AX
-27 00015 (testdata/386.s:27)	CMPB	foo+4(SB), BX
-31 00016 (testdata/386.s:31)	JCS
-32 00017 (testdata/386.s:32)	JCS	16(PC)
-35 00018 (testdata/386.s:35)	CALL	AX
-36 00019 (testdata/386.s:36)	JMP	AX
-37 00020 (testdata/386.s:37)	CALL	*foo(SB)
-38 00021 (testdata/386.s:38)	JMP	$4
-39 00022 (testdata/386.s:39)	JMP	16
-40 00023 (testdata/386.s:40)	CALL	foo(SB)
-42 00024 (testdata/386.s:42)	CALL	foo+4(SB)(AX*4)
-43 00025 (testdata/386.s:43)	CALL	4(SP)
-44 00026 (testdata/386.s:44)	CALL	(AX)
-45 00027 (testdata/386.s:45)	CALL	(SP)
-47 00028 (testdata/386.s:47)	CALL	(AX)(AX*4)
-48 00029 (testdata/386.s:48)	CALL	4(SP)
-49 00030 (testdata/386.s:49)	CALL	(AX)
-50 00031 (testdata/386.s:50)	CALL	(SP)
-52 00032 (testdata/386.s:52)	JMP	(AX)(AX*4)
-55 00033 (testdata/386.s:55)	NOP
-56 00034 (testdata/386.s:56)	NOP	AX
-57 00035 (testdata/386.s:57)	NOP	foo+4(SB)
-60 00036 (testdata/386.s:60)	SHLL	$4, BX
-61 00037 (testdata/386.s:61)	SHLL	$4, foo+4(SB)
-62 00038 (testdata/386.s:62)	SHLL	$4, AX, foo+4(SB)
-65 00039 (testdata/386.s:65)	MOVL	AX, BX
-66 00040 (testdata/386.s:66)	MOVL	$4, BX
-69 00041 (testdata/386.s:69)	IMULL	AX
-70 00042 (testdata/386.s:70)	IMULL	$4, CX
-71 00043 (testdata/386.s:71)	IMULL	AX, BX
-74 00044 (testdata/386.s:74)	CMPPD	X0, X1, 4
-75 00045 (testdata/386.s:75)	CMPPD	X0, foo+4(SB), 4
-78 00046 (testdata/386.s:78)	PINSRD	$1, (AX), X0
-79 00047 (testdata/386.s:79)	PINSRD	$2, foo+4(FP), X0
-83 00048 (testdata/386.s:83)	LOOP
-86 00049 (testdata/386.s:86)	RET
diff --git a/src/cmd/asm/internal/asm/testdata/386.s b/src/cmd/asm/internal/asm/testdata/386.s
deleted file mode 100644
index 6bee39f..0000000
--- a/src/cmd/asm/internal/asm/testdata/386.s
+++ /dev/null
@@ -1,86 +0,0 @@
-// This input was created by taking the instruction productions in
-// the old assembler's (8a's) grammar and hand-writing complete
-// instructions for each rule, to guarantee we cover the same space.
-
-TEXT foo(SB), 0, $0
-
-// LTYPE1 nonrem	{ outcode(int($1), &$2); }
-	SETCC	AX
-	SETCC	foo+4(SB)
-
-// LTYPE2 rimnon	{ outcode(int($1), &$2); }
-	DIVB	AX
-	DIVB	foo+4(SB)
-	PUSHL	$foo+4(SB)
-	POPL		AX // balance PUSHL
-
-// LTYPE3 rimrem	{ outcode(int($1), &$2); }
-	SUBB	$1, AX
-	SUBB	$1, foo+4(SB)
-	SUBB	BX, AX
-	SUBB	BX, foo+4(SB)
-
-// LTYPE4 remrim	{ outcode(int($1), &$2); }
-	CMPB	AX, $1
-	CMPB	foo+4(SB), $4
-	CMPB	BX, AX
-	CMPB	foo+4(SB), BX
-
-// LTYPER nonrel	{ outcode(int($1), &$2); }
-label:
-	JC	label
-	JC	-1(PC)
-
-// LTYPEC spec3	{ outcode(int($1), &$2); }
-	CALL	AX
-	JMP	*AX
-	CALL	*foo(SB)
-	JMP	$4
-	JMP	label
-	CALL	foo(SB)
-	CALL	(AX*4)
-	CALL	foo+4(SB)(AX*4)
-	CALL	*4(SP)
-	CALL	*(AX)
-	CALL	*(SP)
-	CALL	*(AX*4)
-	CALL	*(AX)(AX*4)
-	CALL	4(SP)
-	CALL	(AX)
-	CALL	(SP)
-	CALL	(AX*4)
-	JMP	(AX)(AX*4)
-
-// LTYPEN spec4	{ outcode(int($1), &$2); }
-	NOP
-	NOP	AX
-	NOP	foo+4(SB)
-
-// LTYPES spec5	{ outcode(int($1), &$2); }
-	SHLL	$4, BX
-	SHLL	$4, foo+4(SB)
-	SHLL	$4, foo+4(SB):AX
-
-// LTYPEM spec6	{ outcode(int($1), &$2); }
-	MOVL	AX, BX
-	MOVL	$4, BX
-	
-// LTYPEI spec7	{ outcode(int($1), &$2); }
-	IMULL	AX
-	IMULL	$4, CX
-	IMULL	AX, BX
-
-// LTYPEXC spec9	{ outcode(int($1), &$2); }
-	CMPPD	X0, X1, 4
-	CMPPD	X0, foo+4(SB), 4
-
-// LTYPEX spec10	{ outcode(int($1), &$2); }
-	PINSRD	$1, (AX), X0
-	PINSRD	$2, foo+4(FP), X0
-
-// Was bug: LOOP is a branch instruction.
-loop:
-	LOOP	loop
-
-// LTYPE0 nonnon	{ outcode(int($1), &$2); }
-	RET
diff --git a/src/cmd/asm/internal/asm/testdata/amd64.out b/src/cmd/asm/internal/asm/testdata/amd64.out
deleted file mode 100644
index 850a78e..0000000
--- a/src/cmd/asm/internal/asm/testdata/amd64.out
+++ /dev/null
@@ -1,57 +0,0 @@
-9 00001 (testdata/amd64.s:9)	TEXT	foo(SB), 0, $0
-12 00002 (testdata/amd64.s:12)	NEGQ	R11
-13 00003 (testdata/amd64.s:13)	NEGQ	4(R11)
-14 00004 (testdata/amd64.s:14)	NEGQ	foo+4(SB)
-17 00005 (testdata/amd64.s:17)	INT	$4
-18 00006 (testdata/amd64.s:18)	DIVB	R11
-19 00007 (testdata/amd64.s:19)	DIVB	4(R11)
-20 00008 (testdata/amd64.s:20)	DIVB	foo+4(SB)
-23 00009 (testdata/amd64.s:23)	SUBQ	$4, DI
-24 00010 (testdata/amd64.s:24)	SUBQ	R11, DI
-25 00011 (testdata/amd64.s:25)	SUBQ	4(R11), DI
-26 00012 (testdata/amd64.s:26)	SUBQ	foo+4(SB), DI
-27 00013 (testdata/amd64.s:27)	SUBQ	$4, 8(R12)
-28 00014 (testdata/amd64.s:28)	SUBQ	R11, 8(R12)
-29 00015 (testdata/amd64.s:29)	SUBQ	R11, foo+4(SB)
-32 00016 (testdata/amd64.s:32)	CMPB	CX, $4
-36 00017 (testdata/amd64.s:36)	JCS	13(PC)
-37 00018 (testdata/amd64.s:37)	JCS	17
-40 00019 (testdata/amd64.s:40)	JMP	15(PC)
-41 00020 (testdata/amd64.s:41)	JMP	17
-42 00021 (testdata/amd64.s:42)	JMP	foo+4(SB)
-43 00022 (testdata/amd64.s:43)	JMP	bar<>+4(SB)
-44 00023 (testdata/amd64.s:44)	JMP	bar<>+4(SB)(R11*4)
-45 00024 (testdata/amd64.s:45)	JMP	4(SP)
-46 00025 (testdata/amd64.s:46)	JMP	(R12)
-48 00026 (testdata/amd64.s:48)	JMP	(R12)(R13*4)
-49 00027 (testdata/amd64.s:49)	JMP	(AX)
-50 00028 (testdata/amd64.s:50)	JMP	(SP)
-52 00029 (testdata/amd64.s:52)	JMP	(AX)(AX*4)
-53 00030 (testdata/amd64.s:53)	JMP	4(SP)
-54 00031 (testdata/amd64.s:54)	JMP	(R12)
-56 00032 (testdata/amd64.s:56)	JMP	(R12)(R13*4)
-57 00033 (testdata/amd64.s:57)	JMP	(AX)
-58 00034 (testdata/amd64.s:58)	JMP	(SP)
-60 00035 (testdata/amd64.s:60)	JMP	(AX)(AX*4)
-61 00036 (testdata/amd64.s:61)	JMP	R13
-64 00037 (testdata/amd64.s:64)	NOP
-65 00038 (testdata/amd64.s:65)	NOP	AX
-66 00039 (testdata/amd64.s:66)	NOP	foo+4(SB)
-69 00040 (testdata/amd64.s:69)	SHLL	R11, R12
-70 00041 (testdata/amd64.s:70)	SHLL	R11, foo+4(SB)
-71 00042 (testdata/amd64.s:71)	SHLL	R11, AX, R11
-74 00043 (testdata/amd64.s:74)	MOVL	AX, R11
-75 00044 (testdata/amd64.s:75)	MOVL	$4, R11
-76 00045 (testdata/amd64.s:76)	MOVL	AX, CS, AX
-79 00046 (testdata/amd64.s:79)	IMULB	$4
-80 00047 (testdata/amd64.s:80)	IMULB	R11
-81 00048 (testdata/amd64.s:81)	IMULB	$4, R11
-82 00049 (testdata/amd64.s:82)	IMULB	R11, R12
-83 00050 (testdata/amd64.s:83)	IMULB	R11, foo+4(SB)
-86 00051 (testdata/amd64.s:86)	CMPPD	R11, R12, 4
-87 00052 (testdata/amd64.s:87)	CMPPD	R11, foo+4(SB), 4
-90 00053 (testdata/amd64.s:90)	PINSRW	$4, R11, AX
-91 00054 (testdata/amd64.s:91)	PINSRW	$4, foo+4(SB), AX
-94 00055 (testdata/amd64.s:94)	RETFL	$4
-98 00056 (testdata/amd64.s:98)	LOOP
-101 00057 (testdata/amd64.s:101)	RET
diff --git a/src/cmd/asm/internal/asm/testdata/amd64.s b/src/cmd/asm/internal/asm/testdata/amd64.s
deleted file mode 100644
index 1b32ac4..0000000
--- a/src/cmd/asm/internal/asm/testdata/amd64.s
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This input was created by taking the instruction productions in
-// the old assembler's (6a's) grammar and hand-writing complete
-// instructions for each rule, to guarantee we cover the same space.
-
-TEXT	foo(SB), 0, $0
-
-// LTYPE1 nonrem	{ outcode($1, &$2); }
-	NEGQ	R11
-	NEGQ	4(R11)
-	NEGQ	foo+4(SB)
-
-// LTYPE2 rimnon	{ outcode($1, &$2); }
-	INT	$4
-	DIVB	R11
-	DIVB	4(R11)
-	DIVB	foo+4(SB)
-
-// LTYPE3 rimrem	{ outcode($1, &$2); }
-	SUBQ $4, DI
-	SUBQ R11, DI
-	SUBQ 4(R11), DI
-	SUBQ foo+4(SB), DI
-	SUBQ $4, 8(R12)
-	SUBQ R11, 8(R12)
-	SUBQ R11, foo+4(SB)
-
-// LTYPE4 remrim	{ outcode($1, &$2); }
-	CMPB	CX, $4
-
-// LTYPER nonrel	{ outcode($1, &$2); }
-label:
-	JB	-4(PC)
-	JB	label
-
-// LTYPEC spec3	{ outcode($1, &$2); }
-	JMP	-4(PC)
-	JMP	label
-	JMP	foo+4(SB)
-	JMP	bar<>+4(SB)
-	JMP	bar<>+4(SB)(R11*4)
-	JMP	*4(SP)
-	JMP	*(R12)
-	JMP	*(R12*4)
-	JMP	*(R12)(R13*4)
-	JMP	*(AX)
-	JMP	*(SP)
-	JMP	*(AX*4)
-	JMP	*(AX)(AX*4)
-	JMP	4(SP)
-	JMP	(R12)
-	JMP	(R12*4)
-	JMP	(R12)(R13*4)
-	JMP	(AX)
-	JMP	(SP)
-	JMP	(AX*4)
-	JMP	(AX)(AX*4)
-	JMP	R13
-
-// LTYPEN spec4	{ outcode($1, &$2); }
-	NOP
-	NOP	AX
-	NOP	foo+4(SB)
-
-// LTYPES spec5	{ outcode($1, &$2); }
-	SHLL	R11, R12
-	SHLL	R11, foo+4(SB)
-	SHLL	R11, R11:AX // Old syntax, still accepted.
-
-// LTYPEM spec6	{ outcode($1, &$2); }
-	MOVL	AX, R11
-	MOVL	$4, R11
-	MOVL	AX, AX:CS
-
-// LTYPEI spec7	{ outcode($1, &$2); }
-	IMULB	$4
-	IMULB	R11
-	IMULB	$4, R11
-	IMULB	R11, R12
-	IMULB	R11, foo+4(SB)
-
-// LTYPEXC spec8	{ outcode($1, &$2); }
-	CMPPD	R11, R12, 4
-	CMPPD	R11, foo+4(SB), 4
-
-// LTYPEX spec9	{ outcode($1, &$2); }
-	PINSRW	$4, R11, AX
-	PINSRW	$4, foo+4(SB), AX
-
-// LTYPERT spec10	{ outcode($1, &$2); }
-	RETFL	$4
-
-// Was bug: LOOP is a branch instruction.
-loop:
-	LOOP	loop
-
-// LTYPE0 nonnon	{ outcode($1, &$2); }
-	RET
diff --git a/src/cmd/asm/internal/asm/testdata/arm.out b/src/cmd/asm/internal/asm/testdata/arm.out
deleted file mode 100644
index 7501db3..0000000
--- a/src/cmd/asm/internal/asm/testdata/arm.out
+++ /dev/null
@@ -1,59 +0,0 @@
-9 00001 (testdata/arm.s:9)	TEXT	foo(SB), 0, $0
-18 00002 (testdata/arm.s:18)	ADD	$1, R2, R3
-19 00003 (testdata/arm.s:19)	ADD	R1<<R2, R3, R4
-20 00004 (testdata/arm.s:20)	ADD	R1>>R2, R3, R4
-21 00005 (testdata/arm.s:21)	ADD	R1@>R2, R3, R4
-22 00006 (testdata/arm.s:22)	ADD	R1->R2, R3, R4
-23 00007 (testdata/arm.s:23)	ADD	R1, R2, R3
-24 00008 (testdata/arm.s:24)	ADD	R1<<R2, R3, R4
-34 00009 (testdata/arm.s:34)	ADD	$1, R2
-35 00010 (testdata/arm.s:35)	ADD	R1<<R2, R3
-36 00011 (testdata/arm.s:36)	ADD	R1>>R2, R3
-37 00012 (testdata/arm.s:37)	ADD	R1@>R2, R3
-38 00013 (testdata/arm.s:38)	ADD	R1->R2, R3
-39 00014 (testdata/arm.s:39)	ADD	R1, R2
-48 00015 (testdata/arm.s:48)	CLZ.S	R1, R2
-57 00016 (testdata/arm.s:57)	MOVW.S	R1, R2
-58 00017 (testdata/arm.s:58)	MOVW.S	$1, R2
-59 00018 (testdata/arm.s:59)	MOVW.S	R1<<R2, R3
-68 00019 (testdata/arm.s:68)	JMP.S	20(PC)
-74 00020 (testdata/arm.s:74)	JMP.S	(R2)
-75 00021 (testdata/arm.s:75)	JMP.S	foo(SB)
-76 00022 (testdata/arm.s:76)	JMP.S	bar<>(SB)
-85 00023 (testdata/arm.s:85)	BX	(R2)
-94 00024 (testdata/arm.s:94)	BEQ	25(PC)
-103 00025 (testdata/arm.s:103)	SWI.S	R1
-104 00026 (testdata/arm.s:104)	SWI.S	(R1)
-105 00027 (testdata/arm.s:105)	SWI.S	foo(SB)
-114 00028 (testdata/arm.s:114)	CMP.S	$1, R2
-115 00029 (testdata/arm.s:115)	CMP.S	R1<<R2, R3
-116 00030 (testdata/arm.s:116)	CMP.S	R1, R2
-130 00031 (testdata/arm.s:130)	MOVM	(R1), [R2,R5,R8,g]
-131 00032 (testdata/arm.s:131)	MOVM	(R1), [R2,R3,R4,R5]
-132 00033 (testdata/arm.s:132)	MOVM.S	(R1), [R2]
-143 00034 (testdata/arm.s:143)	MOVM	[R2,R5,R8,g], (R1)
-144 00035 (testdata/arm.s:144)	MOVM	[R2,R3,R4,R5], (R1)
-145 00036 (testdata/arm.s:145)	MOVM.S	[R2], (R1)
-154 00037 (testdata/arm.s:154)	STREX.S	(R2), R1, R3
-160 00038 (testdata/arm.s:160)	STREX.S	(R2), R1, R1
-166 00039 (testdata/arm.s:166)	STREX.S	(R2), R3, R3
-174 00040 (testdata/arm.s:174)	CASE.S	R1
-183 00041 (testdata/arm.s:183)	WORD	$1234
-192 00042 (testdata/arm.s:192)	ABSF.S	F1, F2
-198 00043 (testdata/arm.s:198)	ADDD.S	F1, F2
-199 00044 (testdata/arm.s:199)	ADDD.S	$(0.5), F2
-205 00045 (testdata/arm.s:205)	ADDD.S	F1, F2, F3
-206 00046 (testdata/arm.s:206)	ADDD.S	$(0.5), F2, F3
-212 00047 (testdata/arm.s:212)	CMPD.S	F1, F2
-236 00048 (testdata/arm.s:236)	MRC	$8301712627
-237 00049 (testdata/arm.s:237)	MRC	$8300664051
-246 00050 (testdata/arm.s:246)	MULL	R1, R2, (R3, R4)
-258 00051 (testdata/arm.s:258)	MULAWT	R1, R2, R3, R4
-266 00052 (testdata/arm.s:266)	PLD	(R1)
-267 00053 (testdata/arm.s:267)	PLD	4(R1)
-276 00054 (testdata/arm.s:276)	RET
-280 00055 (testdata/arm.s:280)	JMP	foo(SB)
-281 00056 (testdata/arm.s:281)	CALL	foo(SB)
-282 00057 (testdata/arm.s:282)	JMP	foo(SB)
-283 00058 (testdata/arm.s:283)	CALL	foo(SB)
-292 00059 (testdata/arm.s:292)	END
diff --git a/src/cmd/asm/internal/asm/testdata/arm.s b/src/cmd/asm/internal/asm/testdata/arm.s
deleted file mode 100644
index b8bdfb2..0000000
--- a/src/cmd/asm/internal/asm/testdata/arm.s
+++ /dev/null
@@ -1,292 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This input was created by taking the instruction productions in
-// the old assembler's (5a's) grammar and hand-writing complete
-// instructions for each rule, to guarantee we cover the same space.
-
-TEXT	foo(SB), 0, $0
-
-// ADD
-//
-//	LTYPE1 cond imsr ',' spreg ',' reg
-//	{
-//		outcode($1, $2, &$3, $5, &$7);
-//	}
-// Cover some operand space here too.
-	ADD	$1, R2, R3
-	ADD	R1<<R2, R3, R4
-	ADD	R1>>R2, R3, R4
-	ADD	R1@>R2, R3, R4
-	ADD	R1->R2, R3, R4
-	ADD	R1, R2, R3
-	ADD	R(1)<<R(2), R(3), R(4)
-
-//	LTYPE1 cond imsr ',' spreg ',' // asm doesn't support trailing comma.
-//	{
-//		outcode($1, $2, &$3, $5, &nullgen);
-//	}
-//	LTYPE1 cond imsr ',' reg
-//	{
-//		outcode($1, $2, &$3, 0, &$5);
-//	}
-	ADD	$1, R2
-	ADD	R1<<R2, R3
-	ADD	R1>>R2, R3
-	ADD	R1@>R2, R3
-	ADD	R1->R2, R3
-	ADD	R1, R2
-
-//
-// MVN
-//
-//	LTYPE2 cond imsr ',' reg
-//	{
-//		outcode($1, $2, &$3, 0, &$5);
-//	}
-	CLZ.S	R1, R2
-
-//
-// MOVW
-//
-//	LTYPE3 cond gen ',' gen
-//	{
-//		outcode($1, $2, &$3, 0, &$5);
-//	}
-	MOVW.S	R1, R2
-	MOVW.S	$1, R2
-	MOVW.S	R1<<R2, R3
-
-//
-// B/BL
-//
-//	LTYPE4 cond comma rel
-//	{
-//		outcode($1, $2, &nullgen, 0, &$4);
-//	}
-	B.S	1(PC)
-
-//	LTYPE4 cond comma nireg
-//	{
-//		outcode($1, $2, &nullgen, 0, &$4);
-//	}
-	B.S	(R2)
-	B.S	foo(SB)
-	B.S	bar<>(SB)
-
-//
-// BX
-//
-//	LTYPEBX comma ireg
-//	{
-//		outcode($1, Always, &nullgen, 0, &$3);
-//	}
-	BX	(R2)
-
-//
-// BEQ
-//
-//	LTYPE5 comma rel
-//	{
-//		outcode($1, Always, &nullgen, 0, &$3);
-//	}
-	BEQ	1(PC)
-
-//
-// SWI
-//
-//	LTYPE6 cond comma gen
-//	{
-//		outcode($1, $2, &nullgen, 0, &$4);
-//	}
-	SWI.S	R1
-	SWI.S	(R1)
-	SWI.S	foo(SB)
-
-//
-// CMP
-//
-//	LTYPE7 cond imsr ',' spreg
-//	{
-//		outcode($1, $2, &$3, $5, &nullgen);
-//	}
-	CMP.S	$1, R2
-	CMP.S	R1<<R2, R3
-	CMP.S	R1, R2
-
-//
-// MOVM
-//
-//	LTYPE8 cond ioreg ',' '[' reglist ']'
-//	{
-//		var g obj.Addr
-//
-//		g = nullgen;
-//		g.Type = obj.TYPE_CONST;
-//		g.Offset = int64($6);
-//		outcode($1, $2, &$3, 0, &g);
-//	}
-	MOVM	0(R1), [R2,R5,R8,g]
-	MOVM	0(R1), [R2-R5]
-	MOVM.S	(R1), [R2]
-
-//	LTYPE8 cond '[' reglist ']' ',' ioreg
-//	{
-//		var g obj.Addr
-//
-//		g = nullgen;
-//		g.Type = obj.TYPE_CONST;
-//		g.Offset = int64($4);
-//		outcode($1, $2, &g, 0, &$7);
-//	}
-	MOVM	[R2,R5,R8,g], 0(R1)
-	MOVM	[R2-R5], 0(R1)
-	MOVM.S	[R2], (R1)
-
-//
-// SWAP
-//
-//	LTYPE9 cond reg ',' ireg ',' reg
-//	{
-//		outcode($1, $2, &$5, int32($3.Reg), &$7);
-//	}
-	STREX.S	R1, (R2), R3
-
-//	LTYPE9 cond reg ',' ireg
-//	{
-//		outcode($1, $2, &$5, int32($3.Reg), &$3);
-//	}
-	STREX.S	R1, (R2)
-
-//	LTYPE9 cond comma ireg ',' reg
-//	{
-//		outcode($1, $2, &$4, int32($6.Reg), &$6);
-//	}
-	STREX.S	(R2), R3
-
-// CASE
-//
-//	LTYPED cond reg
-//	{
-//		outcode($1, $2, &$3, 0, &nullgen);
-//	}
-	CASE.S	R1
-
-//
-// word
-//
-//	LTYPEH comma ximm
-//	{
-//		outcode($1, Always, &nullgen, 0, &$3);
-//	}
-	WORD	$1234
-
-//
-// floating-point coprocessor
-//
-//	LTYPEI cond freg ',' freg
-//	{
-//		outcode($1, $2, &$3, 0, &$5);
-//	}
-	ABSF.S	F1, F2
-
-//	LTYPEK cond frcon ',' freg
-//	{
-//		outcode($1, $2, &$3, 0, &$5);
-//	}
-	ADDD.S	F1, F2
-	ADDD.S	$0.5, F2
-
-//	LTYPEK cond frcon ',' LFREG ',' freg
-//	{
-//		outcode($1, $2, &$3, $5, &$7);
-//	}
-	ADDD.S	F1, F2, F3
-	ADDD.S	$0.5, F2, F3
-
-//	LTYPEL cond freg ',' freg
-//	{
-//		outcode($1, $2, &$3, int32($5.Reg), &nullgen);
-//	}
-	CMPD.S	F1, F2
-
-//
-// MCR MRC
-//
-//	LTYPEJ cond con ',' expr ',' spreg ',' creg ',' creg oexpr
-//	{
-//		var g obj.Addr
-//
-//		g = nullgen;
-//		g.Type = obj.TYPE_CONST;
-//		g.Offset = int64(
-//			(0xe << 24) |		/* opcode */
-//			($1 << 20) |		/* MCR/MRC */
-//			(($2^C_SCOND_XOR) << 28) |		/* scond */
-//			(($3 & 15) << 8) |	/* coprocessor number */
-//			(($5 & 7) << 21) |	/* coprocessor operation */
-//			(($7 & 15) << 12) |	/* arm register */
-//			(($9 & 15) << 16) |	/* Crn */
-//			(($11 & 15) << 0) |	/* Crm */
-//			(($12 & 7) << 5) |	/* coprocessor information */
-//			(1<<4));			/* must be set */
-//		outcode(AMRC, Always, &nullgen, 0, &g);
-//	}
-	MRC.S	4, 6, R1, C2, C3, 7
-	MCR.S	4, 6, R1, C2, C3, 7
-
-//
-// MULL r1,r2,(hi,lo)
-//
-//	LTYPEM cond reg ',' reg ',' regreg
-//	{
-//		outcode($1, $2, &$3, int32($5.Reg), &$7);
-//	}
-	MULL	R1, R2, (R3,R4)
-
-//
-// MULA r1,r2,r3,r4: (r1*r2+r3) & 0xffffffff . r4
-// MULAW{T,B} r1,r2,r3,r4
-//
-//	LTYPEN cond reg ',' reg ',' reg ',' spreg
-//	{
-//		$7.Type = obj.TYPE_REGREG2;
-//		$7.Offset = int64($9);
-//		outcode($1, $2, &$3, int32($5.Reg), &$7);
-//	}
-	MULAWT	R1, R2, R3, R4
-//
-// PLD
-//
-//	LTYPEPLD oreg
-//	{
-//		outcode($1, Always, &$2, 0, &nullgen);
-//	}
-	PLD	(R1)
-	PLD	4(R1)
-
-//
-// RET
-//
-//	LTYPEA cond
-//	{
-//		outcode($1, $2, &nullgen, 0, &nullgen);
-//	}
-	RET
-
-// More B/BL cases, and canonical names JMP, CALL.
-
-	B	foo(SB)
-	BL	foo(SB)
-	JMP	foo(SB)
-	CALL	foo(SB)
-
-//
-// END
-//
-//	LTYPEE
-//	{
-//		outcode($1, Always, &nullgen, 0, &nullgen);
-//	}
-	END
diff --git a/src/cmd/asm/internal/asm/testdata/arm64.out b/src/cmd/asm/internal/asm/testdata/arm64.out
deleted file mode 100644
index 0b7b430..0000000
--- a/src/cmd/asm/internal/asm/testdata/arm64.out
+++ /dev/null
@@ -1,55 +0,0 @@
-9 00001 (testdata/arm64.s:9)	TEXT	foo(SB), 7, $-8
-20 00002 (testdata/arm64.s:20)	ADDW	$1, R2, R3
-21 00003 (testdata/arm64.s:21)	ADDW	R1, R2, R3
-22 00004 (testdata/arm64.s:22)	ADDW	R1, ZR, R3
-23 00005 (testdata/arm64.s:23)	ADD	$1, R2, R3
-24 00006 (testdata/arm64.s:24)	ADD	R1, R2, R3
-25 00007 (testdata/arm64.s:25)	ADD	R1, ZR, R3
-26 00008 (testdata/arm64.s:26)	ADD	$1, R2, R3
-36 00009 (testdata/arm64.s:36)	ADDW	$1, R2
-37 00010 (testdata/arm64.s:37)	ADDW	R1, R2
-38 00011 (testdata/arm64.s:38)	ADD	$1, R2
-39 00012 (testdata/arm64.s:39)	ADD	R1, R2
-48 00013 (testdata/arm64.s:48)	CLSW	R1, R2
-49 00014 (testdata/arm64.s:49)	CLS	R1, R2
-58 00015 (testdata/arm64.s:58)	MOVW	R1, R2
-59 00016 (testdata/arm64.s:59)	MOVW	ZR, R1
-60 00017 (testdata/arm64.s:60)	MOVW	R1, ZR
-61 00018 (testdata/arm64.s:61)	MOVW	$1, ZR
-62 00019 (testdata/arm64.s:62)	MOVW	$1, R1
-63 00020 (testdata/arm64.s:63)	MOVW	ZR, (R1)
-64 00021 (testdata/arm64.s:64)	MOVD	R1, R2
-65 00022 (testdata/arm64.s:65)	MOVD	ZR, R1
-66 00023 (testdata/arm64.s:66)	MOVD	$1, ZR
-67 00024 (testdata/arm64.s:67)	MOVD	$1, R1
-68 00025 (testdata/arm64.s:68)	MOVD	ZR, (R1)
-77 00026 (testdata/arm64.s:77)	MOVK	$1, R1
-86 00027 (testdata/arm64.s:86)	CALL	28(PC)
-92 00028 (testdata/arm64.s:92)	CALL	(R2)
-93 00029 (testdata/arm64.s:93)	CALL	foo(SB)
-94 00030 (testdata/arm64.s:94)	CALL	bar<>(SB)
-102 00031 (testdata/arm64.s:102)	BEQ	32(PC)
-110 00032 (testdata/arm64.s:110)	SVC
-119 00033 (testdata/arm64.s:119)	CMP	$3, R2
-120 00034 (testdata/arm64.s:120)	CMP	R1, R2
-130 00035 (testdata/arm64.s:130)	CBZ	R1
-139 00036 (testdata/arm64.s:139)	CSET	GT, R1
-147 00037 (testdata/arm64.s:147)	CSEL	LT, R1, R2, ZR
-148 00038 (testdata/arm64.s:148)	CSINC	GT, R1, ZR, R3
-149 00039 (testdata/arm64.s:149)	CSNEG	MI, R1, R2, R3
-150 00040 (testdata/arm64.s:150)	CSINV	0, R1, R2, R3
-156 00041 (testdata/arm64.s:156)	CSEL	LT, R1, R2
-164 00042 (testdata/arm64.s:164)	CCMN	MI, ZR, R1, $4
-173 00043 (testdata/arm64.s:173)	FADDD	$(0.5), F1
-174 00044 (testdata/arm64.s:174)	FADDD	F1, F2
-180 00045 (testdata/arm64.s:180)	FADDD	$(0.69999999999999996), F1, F2
-181 00046 (testdata/arm64.s:181)	FADDD	F1, F2, F3
-233 00047 (testdata/arm64.s:233)	DMB	$1
-242 00048 (testdata/arm64.s:242)	LDAXRW	(R0), R2
-243 00049 (testdata/arm64.s:243)	STLXRW	R1, (R0), R3
-251 00050 (testdata/arm64.s:251)	RET
-255 00051 (testdata/arm64.s:255)	JMP	foo(SB)
-256 00052 (testdata/arm64.s:256)	CALL	foo(SB)
-257 00053 (testdata/arm64.s:257)	JMP	foo(SB)
-258 00054 (testdata/arm64.s:258)	CALL	foo(SB)
-266 00055 (testdata/arm64.s:266)	END
diff --git a/src/cmd/asm/internal/asm/testdata/arm64.s b/src/cmd/asm/internal/asm/testdata/arm64.s
deleted file mode 100644
index 2c8720b..0000000
--- a/src/cmd/asm/internal/asm/testdata/arm64.s
+++ /dev/null
@@ -1,266 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This input was created by taking the instruction productions in
-// the old assembler's (7a's) grammar and hand-writing complete
-// instructions for each rule, to guarantee we cover the same space.
-
-TEXT	foo(SB), 7, $-8
-
-//
-// ADD
-//
-//	LTYPE1 imsr ',' spreg ',' reg
-//	{
-//		outcode($1, &$2, $4, &$6);
-//	}
-// imsr comes from the old 7a, we only support immediates and registers
-// at the moment, no shifted registers.
-	ADDW	$1, R2, R3
-	ADDW	R1, R2, R3
-	ADDW	R1, ZR, R3
-	ADD	$1, R2, R3
-	ADD	R1, R2, R3
-	ADD	R1, ZR, R3
-	ADD	$1, R2, R3
-
-//	LTYPE1 imsr ',' spreg ','
-//	{
-//		outcode($1, &$2, $4, &nullgen);
-//	}
-//	LTYPE1 imsr ',' reg
-//	{
-//		outcode($1, &$2, NREG, &$4);
-//	}
-	ADDW	$1, R2
-	ADDW	R1, R2
-	ADD	$1, R2
-	ADD	R1, R2
-
-//
-// CLS
-//
-//	LTYPE2 imsr ',' reg
-//	{
-//		outcode($1, &$2, NREG, &$4);
-//	}
-	CLSW	R1, R2
-	CLS	R1, R2
-
-//
-// MOV
-//
-//	LTYPE3 addr ',' addr
-//	{
-//		outcode($1, &$2, NREG, &$4);
-//	}
-	MOVW	R1, R2
-	MOVW	ZR, R1
-	MOVW	R1, ZR
-	MOVW	$1, ZR
-	MOVW	$1, R1
-	MOVW	ZR, (R1)
-	MOVD	R1, R2
-	MOVD	ZR, R1
-	MOVD	$1, ZR
-	MOVD	$1, R1
-	MOVD	ZR, (R1)
-
-//
-// MOVK
-//
-//		LMOVK imm ',' reg
-//	{
-//		outcode($1, &$2, NREG, &$4);
-//	}
-	MOVK	$1, R1
-
-//
-// B/BL
-//
-//		LTYPE4 comma rel
-//	{
-//		outcode($1, &nullgen, NREG, &$3);
-//	}
-	BL	1(PC)
-
-//		LTYPE4 comma nireg
-//	{
-//		outcode($1, &nullgen, NREG, &$3);
-//	}
-	BL	(R2)
-	BL	foo(SB)
-	BL	bar<>(SB)
-//
-// BEQ
-//
-//		LTYPE5 comma rel
-//	{
-//		outcode($1, &nullgen, NREG, &$3);
-//	}
-	BEQ	1(PC)
-//
-// SVC
-//
-//		LTYPE6
-//	{
-//		outcode($1, &nullgen, NREG, &nullgen);
-//	}
-	SVC
-
-//
-// CMP
-//
-//		LTYPE7 imsr ',' spreg comma
-//	{
-//		outcode($1, &$2, $4, &nullgen);
-//	}
-	CMP	$3, R2
-	CMP	R1, R2
-
-//
-// CBZ
-//
-//		LTYPE8 reg ',' rel
-//	{
-//		outcode($1, &$2, NREG, &$4);
-//	}
-again:
-	CBZ	R1, again
-
-//
-// CSET
-//
-//		LTYPER cond ',' reg
-//	{
-//		outcode($1, &$2, NREG, &$4);
-//	}
-	CSET	GT, R1
-//
-// CSEL/CSINC/CSNEG/CSINV
-//
-//		LTYPES cond ',' reg ',' reg ',' reg
-//	{
-//		outgcode($1, &$2, $6.reg, &$4, &$8);
-//	}
-	CSEL	LT, R1, R2, ZR
-	CSINC	GT, R1, ZR, R3
-	CSNEG	MI, R1, R2, R3
-	CSINV	CS, R1, R2, R3
-
-//		LTYPES cond ',' reg ',' reg
-//	{
-//		outcode($1, &$2, $4.reg, &$6);
-//	}
-	CSEL	LT, R1, R2
-//
-// CCMN
-//
-//		LTYPEU cond ',' imsr ',' reg ',' imm comma
-//	{
-//		outgcode($1, &$2, $6.reg, &$4, &$8);
-//	}
-	CCMN	MI, ZR, R1, $4
-
-//
-// FADDD
-//
-//		LTYPEK frcon ',' freg
-//	{
-//		outcode($1, &$2, NREG, &$4);
-//	}
-	FADDD	$0.5, F1
-	FADDD	F1, F2
-
-//		LTYPEK frcon ',' freg ',' freg
-//	{
-//		outcode($1, &$2, $4.reg, &$6);
-//	}
-	FADDD	$0.7, F1, F2
-	FADDD	F1, F2, F3
-
-//
-// FCMP
-//
-//		LTYPEL frcon ',' freg comma
-//	{
-//		outcode($1, &$2, $4.reg, &nullgen);
-//	}
-//	FCMP	$0.2, F1
-//	FCMP	F1, F2
-
-//
-// FCCMP
-//
-//		LTYPEF cond ',' freg ',' freg ',' imm comma
-//	{
-//		outgcode($1, &$2, $6.reg, &$4, &$8);
-//	}
-//	FCCMP	LT, F1, F2, $1
-
-//
-// FMULA
-//
-//		LTYPE9 freg ',' freg ',' freg ',' freg comma
-//	{
-//		outgcode($1, &$2, $4.reg, &$6, &$8);
-//	}
-//	FMULA	F1, F2, F3, F4
-
-//
-// FCSEL
-//
-//		LFCSEL cond ',' freg ',' freg ',' freg
-//	{
-//		outgcode($1, &$2, $6.reg, &$4, &$8);
-//	}
-//
-// MADD Rn,Rm,Ra,Rd
-//
-//		LTYPEM reg ',' reg ',' sreg ',' reg
-//	{
-//		outgcode($1, &$2, $6, &$4, &$8);
-//	}
-//	MADD	R1, R2, R3, R4
-
-// DMB, HINT
-//
-//		LDMB imm
-//	{
-//		outcode($1, &$2, NREG, &nullgen);
-//	}
-	DMB	$1
-
-//
-// STXR
-//
-//		LSTXR reg ',' addr ',' reg
-//	{
-//		outtcode($1, &$2, &$4, &$6);
-//	}
-	LDAXRW	(R0), R2
-	STLXRW	R1, (R0), R3
-
-// RET
-//
-//		LTYPEA comma
-//	{
-//		outcode($1, &nullgen, NREG, &nullgen);
-//	}
-	RET
-
-// More B/BL cases, and canonical names JMP, CALL.
-
-	B	foo(SB)
-	BL	foo(SB)
-	JMP	foo(SB)
-	CALL	foo(SB)
-
-// END
-//
-//	LTYPEE comma
-//	{
-//		outcode($1, &nullgen, NREG, &nullgen);
-//	}
-	END
diff --git a/src/cmd/asm/internal/asm/testdata/ppc64.out b/src/cmd/asm/internal/asm/testdata/ppc64.out
deleted file mode 100644
index 2a5d175..0000000
--- a/src/cmd/asm/internal/asm/testdata/ppc64.out
+++ /dev/null
@@ -1,114 +0,0 @@
-9 00001 (testdata/ppc64.s:9)	TEXT	foo(SB), 0, $0
-19 00002 (testdata/ppc64.s:19)	MOVW	R1, R2
-25 00003 (testdata/ppc64.s:25)	MOVW	foo<>+3(SB), R2
-26 00004 (testdata/ppc64.s:26)	MOVW	16(R1), R2
-32 00005 (testdata/ppc64.s:32)	MOVW	(R1), R2
-33 00006 (testdata/ppc64.s:33)	MOVW	(R1)(R2*1), R3
-39 00007 (testdata/ppc64.s:39)	MOVW	R1, R2
-45 00008 (testdata/ppc64.s:45)	MOVB	foo<>+3(SB), R2
-46 00009 (testdata/ppc64.s:46)	MOVB	16(R1), R2
-52 00010 (testdata/ppc64.s:52)	MOVB	(R1), R2
-53 00011 (testdata/ppc64.s:53)	MOVB	(R1)(R2*1), R3
-62 00012 (testdata/ppc64.s:62)	FMOVD	foo<>+3(SB), F2
-63 00013 (testdata/ppc64.s:63)	FMOVD	16(R1), F2
-69 00014 (testdata/ppc64.s:69)	FMOVD	(R1), F2
-75 00015 (testdata/ppc64.s:75)	FMOVD	$(0.10000000000000001), F2
-81 00016 (testdata/ppc64.s:81)	FMOVD	F1, F2
-87 00017 (testdata/ppc64.s:87)	FMOVD	F2, foo<>+3(SB)
-88 00018 (testdata/ppc64.s:88)	FMOVD	F2, 16(R1)
-94 00019 (testdata/ppc64.s:94)	FMOVD	F2, (R1)
-103 00020 (testdata/ppc64.s:103)	MOVW	R1, foo<>+3(SB)
-104 00021 (testdata/ppc64.s:104)	MOVW	R1, 16(R2)
-110 00022 (testdata/ppc64.s:110)	MOVW	R1, (R1)
-111 00023 (testdata/ppc64.s:111)	MOVW	R1, (R2)(R3*1)
-117 00024 (testdata/ppc64.s:117)	MOVB	R1, foo<>+3(SB)
-118 00025 (testdata/ppc64.s:118)	MOVB	R1, 16(R2)
-124 00026 (testdata/ppc64.s:124)	MOVB	R1, (R1)
-125 00027 (testdata/ppc64.s:125)	MOVB	R1, (R2)(R3*1)
-133 00028 (testdata/ppc64.s:133)	FMOVD	F1, foo<>+3(SB)
-134 00029 (testdata/ppc64.s:134)	FMOVD	F1, 16(R2)
-140 00030 (testdata/ppc64.s:140)	FMOVD	F1, (R1)
-149 00031 (testdata/ppc64.s:149)	MOVFL	FPSCR, F1
-155 00032 (testdata/ppc64.s:155)	MOVFL	F1, FPSCR
-161 00033 (testdata/ppc64.s:161)	MOVFL	F1, $4, FPSCR
-167 00034 (testdata/ppc64.s:167)	MOVFL	FPSCR, CR0
-188 00035 (testdata/ppc64.s:188)	MOVW	R1, CR1
-194 00036 (testdata/ppc64.s:194)	MOVW	R1, CR
-206 00037 (testdata/ppc64.s:206)	ADD	R1, R2, R3
-212 00038 (testdata/ppc64.s:212)	ADD	$1, R2, R3
-224 00039 (testdata/ppc64.s:224)	ADD	R1, R2
-230 00040 (testdata/ppc64.s:230)	ADD	$4, R1
-236 00041 (testdata/ppc64.s:236)	ADDE	R1, R2, R3
-242 00042 (testdata/ppc64.s:242)	ADDE	R1, R2
-248 00043 (testdata/ppc64.s:248)	SLW	R1, R2, R3
-254 00044 (testdata/ppc64.s:254)	SLW	R1, R2
-260 00045 (testdata/ppc64.s:260)	SLW	$4, R1, R2
-266 00046 (testdata/ppc64.s:266)	SLW	$4, R1
-272 00047 (testdata/ppc64.s:272)	SLW	$4, R1
-278 00048 (testdata/ppc64.s:278)	SUBME	R1, R1
-296 00049 (testdata/ppc64.s:296)	MOVW	$1, R1
-302 00050 (testdata/ppc64.s:302)	MOVW	$1, R1
-303 00051 (testdata/ppc64.s:303)	MOVW	$foo(SB), R1
-327 00052 (testdata/ppc64.s:327)	MOVFL	CR0, CR1
-339 00053 (testdata/ppc64.s:339)	MOVW	CR, R1
-345 00054 (testdata/ppc64.s:345)	MOVW	SPR(0), R1
-346 00055 (testdata/ppc64.s:346)	MOVW	SPR(7), R1
-352 00056 (testdata/ppc64.s:352)	MOVW	LR, R1
-353 00057 (testdata/ppc64.s:353)	MOVW	CTR, R1
-359 00058 (testdata/ppc64.s:359)	MOVW	R1, LR
-360 00059 (testdata/ppc64.s:360)	MOVW	R1, CTR
-372 00060 (testdata/ppc64.s:372)	MOVW	R1, SPR(7)
-384 00061 (testdata/ppc64.s:384)	JMP	62(PC)
-385 00062 (testdata/ppc64.s:385)	JMP	61
-391 00063 (testdata/ppc64.s:391)	JMP	4(R1)
-392 00064 (testdata/ppc64.s:392)	JMP	foo(SB)
-398 00065 (testdata/ppc64.s:398)	JMP	CTR
-417 00066 (testdata/ppc64.s:417)	BEQ	CR1, 67(PC)
-418 00067 (testdata/ppc64.s:418)	BEQ	CR1, 66
-444 00068 (testdata/ppc64.s:444)	BC	4, CTR
-454 00069 (testdata/ppc64.s:454)	BC	$3, R4, 66
-474 00070 (testdata/ppc64.s:474)	BC	$3, R3, LR
-504 00071 (testdata/ppc64.s:504)	FABS	F1, F2
-510 00072 (testdata/ppc64.s:510)	FADD	F1, F2
-516 00073 (testdata/ppc64.s:516)	FADD	F1, F2, F3
-522 00074 (testdata/ppc64.s:522)	FMADD	F1, F2, F3, F4
-528 00075 (testdata/ppc64.s:528)	FCMPU	F1, F2
-534 00076 (testdata/ppc64.s:534)	FCMPU	F1, F2, CR0
-543 00077 (testdata/ppc64.s:543)	CMP	R1, R2
-549 00078 (testdata/ppc64.s:549)	CMP	R1, $4
-555 00079 (testdata/ppc64.s:555)	CMP	R1, CR0, R2
-561 00080 (testdata/ppc64.s:561)	CMP	R1, CR0, $4
-570 00081 (testdata/ppc64.s:570)	RLDC	$4, R1, $5, R2
-576 00082 (testdata/ppc64.s:576)	RLDC	$26, R1, $201326592, R2
-582 00083 (testdata/ppc64.s:582)	RLDC	R1, R2, $4, R3
-588 00084 (testdata/ppc64.s:588)	RLWMI	R1, R2, $201326592, R3
-597 00085 (testdata/ppc64.s:597)	MOVMW	foo(SB), R2
-598 00086 (testdata/ppc64.s:598)	MOVMW	4(R1), R2
-604 00087 (testdata/ppc64.s:604)	MOVMW	R1, foo(SB)
-605 00088 (testdata/ppc64.s:605)	MOVMW	R1, 4(R2)
-615 00089 (testdata/ppc64.s:615)	LSW	(R1), R2
-616 00090 (testdata/ppc64.s:616)	LSW	(R1)(R2*1), R3
-622 00091 (testdata/ppc64.s:622)	LSW	(R1), $1, R2
-623 00092 (testdata/ppc64.s:623)	LSW	(R1)(R2*1), $1, R3
-629 00093 (testdata/ppc64.s:629)	STSW	R1, (R2)
-630 00094 (testdata/ppc64.s:630)	STSW	R1, (R2)(R3*1)
-636 00095 (testdata/ppc64.s:636)	STSW	R1, $1, (R2)
-637 00096 (testdata/ppc64.s:637)	STSW	R1, $1, (R2)(R3*1)
-643 00097 (testdata/ppc64.s:643)	MOVHBR	(R1), R2
-644 00098 (testdata/ppc64.s:644)	MOVHBR	(R1)(R2*1), R3
-650 00099 (testdata/ppc64.s:650)	MOVHBR	R1, (R2)
-651 00100 (testdata/ppc64.s:651)	MOVHBR	R1, (R2)(R3*1)
-657 00101 (testdata/ppc64.s:657)	DCBF	(R1)
-658 00102 (testdata/ppc64.s:658)	DCBF	(R1)(R2*1)
-667 00103 (testdata/ppc64.s:667)	NOP
-673 00104 (testdata/ppc64.s:673)	NOP	R2
-679 00105 (testdata/ppc64.s:679)	NOP	F2
-685 00106 (testdata/ppc64.s:685)	NOP	R2
-691 00107 (testdata/ppc64.s:691)	NOP	F2
-697 00108 (testdata/ppc64.s:697)	NOP	$4
-705 00109 (testdata/ppc64.s:705)	RET
-709 00110 (testdata/ppc64.s:709)	JMP	foo(SB)
-710 00111 (testdata/ppc64.s:710)	CALL	foo(SB)
-711 00112 (testdata/ppc64.s:711)	JMP	foo(SB)
-712 00113 (testdata/ppc64.s:712)	CALL	foo(SB)
-720 00114 (testdata/ppc64.s:720)	END
diff --git a/src/cmd/asm/internal/asm/testdata/ppc64.s b/src/cmd/asm/internal/asm/testdata/ppc64.s
deleted file mode 100644
index 46c1ee6..0000000
--- a/src/cmd/asm/internal/asm/testdata/ppc64.s
+++ /dev/null
@@ -1,720 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This input was created by taking the instruction productions in
-// the old assembler's (9a's) grammar and hand-writing complete
-// instructions for each rule, to guarantee we cover the same space.
-
-TEXT foo(SB),0,$0
-
-//inst:
-//
-// load ints and bytes
-//
-//	LMOVW rreg ',' rreg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVW	R1, R2
-
-//	LMOVW addr ',' rreg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVW	foo<>+3(SB), R2
-	MOVW	16(R1), R2
-
-//	LMOVW regaddr ',' rreg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVW	(R1), R2
-	MOVW	(R1+R2), R3
-
-//	LMOVB rreg ',' rreg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVW	R1, R2
-
-//	LMOVB addr ',' rreg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVB	foo<>+3(SB), R2
-	MOVB	16(R1), R2
-
-//	LMOVB regaddr ',' rreg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVB	(R1), R2
-	MOVB	(R1+R2), R3
-
-//
-// load floats
-//
-//	LFMOV addr ',' freg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	FMOVD	foo<>+3(SB), F2
-	FMOVD	16(R1), F2
-
-//	LFMOV regaddr ',' freg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	FMOVD	(R1), F2
-
-//	LFMOV fimm ',' freg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	FMOVD	$0.1, F2
-
-//	LFMOV freg ',' freg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	FMOVD	F1, F2
-
-//	LFMOV freg ',' addr
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	FMOVD	F2, foo<>+3(SB)
-	FMOVD	F2, 16(R1)
-
-//	LFMOV freg ',' regaddr
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	FMOVD	F2, (R1)
-
-//
-// store ints and bytes
-//
-//	LMOVW rreg ',' addr
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVW	R1, foo<>+3(SB)
-	MOVW	R1, 16(R2)
-
-//	LMOVW rreg ',' regaddr
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVW	R1, (R1)
-	MOVW	R1, (R2+R3)
-
-//	LMOVB rreg ',' addr
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVB	R1, foo<>+3(SB)
-	MOVB	R1, 16(R2)
-
-//	LMOVB rreg ',' regaddr
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVB	R1, (R1)
-	MOVB	R1, (R2+R3)
-//
-// store floats
-//
-//	LMOVW freg ',' addr
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	FMOVD	F1, foo<>+3(SB)
-	FMOVD	F1, 16(R2)
-
-//	LMOVW freg ',' regaddr
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	FMOVD	F1, (R1)
-
-//
-// floating point status
-//
-//	LMOVW fpscr ',' freg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVFL	FPSCR, F1
-
-//	LMOVW freg ','  fpscr
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVFL	F1, FPSCR
-
-//	LMOVW freg ',' imm ',' fpscr
-//	{
-//		outgcode(int($1), &$2, 0, &$4, &$6);
-//	}
-	MOVFL	F1, $4, FPSCR
-
-//	LMOVW fpscr ',' creg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVFL	FPSCR, CR0
-
-//	LMTFSB imm ',' con
-//	{
-//		outcode(int($1), &$2, int($4), &nullgen);
-//	}
-//TODO	9a doesn't work MTFSB0	$4, 4
-
-//
-// field moves (mtcrf)
-//
-//	LMOVW rreg ',' imm ',' lcr
-//	{
-//		outgcode(int($1), &$2, 0, &$4, &$6);
-//	}
-// TODO 9a doesn't work	MOVFL	R1,$4,CR
-
-//	LMOVW rreg ',' creg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-		MOVW	R1, CR1
-
-//	LMOVW rreg ',' lcr
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVW	R1, CR
-
-//
-// integer operations
-// logical instructions
-// shift instructions
-// unary instructions
-//
-//	LADDW rreg ',' sreg ',' rreg
-//	{
-//		outcode(int($1), &$2, int($4), &$6);
-//	}
-	ADD	R1, R2, R3
-
-//	LADDW imm ',' sreg ',' rreg
-//	{
-//		outcode(int($1), &$2, int($4), &$6);
-//	}
-	ADD	$1, R2, R3
-
-//	LADDW rreg ',' imm ',' rreg
-//	{
-//		outgcode(int($1), &$2, 0, &$4, &$6);
-//	}
-//TODO 9a trouble	ADD	R1, $2, R3 maybe swap rreg and imm
-
-//	LADDW rreg ',' rreg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	ADD	R1, R2
-
-//	LADDW imm ',' rreg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	ADD	$4, R1
-
-//	LLOGW rreg ',' sreg ',' rreg
-//	{
-//		outcode(int($1), &$2, int($4), &$6);
-//	}
-	ADDE	R1, R2, R3
-
-//	LLOGW rreg ',' rreg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	ADDE	R1, R2
-
-//	LSHW rreg ',' sreg ',' rreg
-//	{
-//		outcode(int($1), &$2, int($4), &$6);
-//	}
-	SLW	R1, R2, R3
-
-//	LSHW rreg ',' rreg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	SLW	R1, R2
-
-//	LSHW imm ',' sreg ',' rreg
-//	{
-//		outcode(int($1), &$2, int($4), &$6);
-//	}
-	SLW	$4, R1, R2
-
-//	LSHW imm ',' rreg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	SLW	$4, R1
-
-//	LABS rreg ',' rreg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	SLW	$4, R1
-
-//	LABS rreg
-//	{
-//		outcode(int($1), &$2, 0, &$2);
-//	}
-	SUBME	R1
-
-//
-// multiply-accumulate
-//
-//	LMA rreg ',' sreg ',' rreg
-//	{
-//		outcode(int($1), &$2, int($4), &$6);
-//	}
-//TODO this instruction is undefined in lex.go	LMA R1, R2, R3 NOT SUPPORTED (called MAC)
-
-//
-// move immediate: macro for cau+or, addi, addis, and other combinations
-//
-//	LMOVW imm ',' rreg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVW	$1, R1
-
-//	LMOVW ximm ',' rreg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVW	$1, R1
-	MOVW	$foo(SB), R1
-
-// condition register operations
-//
-//	LCROP cbit ',' cbit
-//	{
-//		outcode(int($1), &$2, int($4.Reg), &$4);
-//	}
-//TODO 9a trouble	CREQV	1, 2 delete? liblink encodes like a divide (maybe wrong too)
-
-//	LCROP cbit ',' con ',' cbit
-//	{
-//		outcode(int($1), &$2, int($4), &$6);
-//	}
-//TODO 9a trouble	CREQV	1, 2, 3
-
-//
-// condition register moves
-// move from machine state register
-//
-//	LMOVW creg ',' creg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVFL	CR0, CR1
-
-//	LMOVW psr ',' creg // TODO: should psr should be fpscr
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-//TODO 9a trouble	MOVW	FPSCR, CR1
-
-//	LMOVW lcr ',' rreg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVW	CR, R1
-
-//	LMOVW psr ',' rreg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVW	SPR(0), R1
-	MOVW	SPR(7), R1
-
-//	LMOVW xlreg ',' rreg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVW	LR, R1
-	MOVW	CTR, R1
-
-//	LMOVW rreg ',' xlreg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVW	R1, LR
-	MOVW	R1, CTR
-
-//	LMOVW creg ',' psr // TODO doesn't exist
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-//TODO 9a trouble	MOVW	CR1, SPR(7)
-
-//	LMOVW rreg ',' psr
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVW	R1, SPR(7)
-
-//
-// branch, branch conditional
-// branch conditional register
-// branch conditional to count register
-//
-//	LBRA rel
-//	{
-//		outcode(int($1), &nullgen, 0, &$2);
-//	}
-label0:
-	BR	1(PC)
-	BR	label0+0
-
-//	LBRA addr
-//	{
-//		outcode(int($1), &nullgen, 0, &$2);
-//	}
-	BR	4(R1)
-	BR	foo+0(SB)
-
-//	LBRA '(' xlreg ')'
-//	{
-//		outcode(int($1), &nullgen, 0, &$3);
-//	}
-	BR	(CTR)
-
-//	LBRA ',' rel  // asm doesn't support the leading comma
-//	{
-//		outcode(int($1), &nullgen, 0, &$3);
-//	}
-//	LBRA ',' addr  // asm doesn't support the leading comma
-//	{
-//		outcode(int($1), &nullgen, 0, &$3);
-//	}
-//	LBRA ',' '(' xlreg ')'  // asm doesn't support the leading comma
-//	{
-//		outcode(int($1), &nullgen, 0, &$4);
-//	}
-//	LBRA creg ',' rel
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-label1:
-	BEQ	CR1, 1(PC)
-	BEQ	CR1, label1
-
-//	LBRA creg ',' addr // TODO DOES NOT WORK in 9a
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-
-//	LBRA creg ',' '(' xlreg ')' // TODO DOES NOT WORK in 9a
-//	{
-//		outcode(int($1), &$2, 0, &$5);
-//	}
-
-//	LBRA con ',' rel // TODO DOES NOT WORK in 9a
-//	{
-//		outcode(int($1), &nullgen, int($2), &$4);
-//	}
-
-//	LBRA con ',' addr // TODO DOES NOT WORK in 9a
-//	{
-//		outcode(int($1), &nullgen, int($2), &$4);
-//	}
-
-//	LBRA con ',' '(' xlreg ')'
-//	{
-//		outcode(int($1), &nullgen, int($2), &$5);
-//	}
-	BC	4, (CTR)
-
-//	LBRA con ',' con ',' rel
-//	{
-//		var g obj.Addr
-//		g = nullgen;
-//		g.Type = obj.TYPE_CONST;
-//		g.Offset = $2;
-//		outcode(int($1), &g, int(REG_R0+$4), &$6);
-//	}
-	BC	3, 4, label1
-
-//	LBRA con ',' con ',' addr // TODO mystery
-//	{
-//		var g obj.Addr
-//		g = nullgen;
-//		g.Type = obj.TYPE_CONST;
-//		g.Offset = $2;
-//		outcode(int($1), &g, int(REG_R0+$4), &$6);
-//	}
-//TODO 9a trouble	BC	3, 3, 4(R1)
-
-//	LBRA con ',' con ',' '(' xlreg ')'
-//	{
-//		var g obj.Addr
-//		g = nullgen;
-//		g.Type = obj.TYPE_CONST;
-//		g.Offset = $2;
-//		outcode(int($1), &g, int(REG_R0+$4), &$7);
-//	}
-	BC	3, 3, (LR)
-
-//
-// conditional trap // TODO NOT DEFINED
-// TODO these instructions are not in lex.go
-//
-//	LTRAP rreg ',' sreg
-//	{
-//		outcode(int($1), &$2, int($4), &nullgen);
-//	}
-//	LTRAP imm ',' sreg
-//	{
-//		outcode(int($1), &$2, int($4), &nullgen);
-//	}
-//	LTRAP rreg comma
-//	{
-//		outcode(int($1), &$2, 0, &nullgen);
-//	}
-//	LTRAP comma
-//	{
-//		outcode(int($1), &nullgen, 0, &nullgen);
-//	}
-
-//
-// floating point operate
-//
-//	LFCONV freg ',' freg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	FABS	F1, F2
-
-//	LFADD freg ',' freg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	FADD	F1, F2
-
-//	LFADD freg ',' freg ',' freg
-//	{
-//		outcode(int($1), &$2, int($4.Reg), &$6);
-//	}
-	FADD	F1, F2, F3
-
-//	LFMA freg ',' freg ',' freg ',' freg
-//	{
-//		outgcode(int($1), &$2, int($4.Reg), &$6, &$8);
-//	}
-	FMADD	F1, F2, F3, F4
-
-//	LFCMP freg ',' freg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	FCMPU	F1, F2
-
-//	LFCMP freg ',' freg ',' creg
-//	{
-//		outcode(int($1), &$2, int($6.Reg), &$4);
-//	}
-	FCMPU	F1, F2, CR0
-
-//
-// CMP
-//
-//	LCMP rreg ',' rreg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	CMP	R1, R2
-
-//	LCMP rreg ',' imm
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	CMP	R1, $4
-
-//	LCMP rreg ',' rreg ',' creg
-//	{
-//		outcode(int($1), &$2, int($6.Reg), &$4);
-//	}
-	CMP	R1, R2, CR0
-
-//	LCMP rreg ',' imm ',' creg
-//	{
-//		outcode(int($1), &$2, int($6.Reg), &$4);
-//	}
-	CMP	R1, $4, CR0
-
-//
-// rotate and mask
-//
-//	LRLWM  imm ',' rreg ',' imm ',' rreg
-//	{
-//		outgcode(int($1), &$2, int($4.Reg), &$6, &$8);
-//	}
-	RLDC $4, R1, $5, R2
-
-//	LRLWM  imm ',' rreg ',' mask ',' rreg
-//	{
-//		outgcode(int($1), &$2, int($4.Reg), &$6, &$8);
-//	}
-	RLDC $26, R1, 4, 5, R2
-
-//	LRLWM  rreg ',' rreg ',' imm ',' rreg
-//	{
-//		outgcode(int($1), &$2, int($4.Reg), &$6, &$8);
-//	}
-	RLDC	R1, R2, $4, R3
-
-//	LRLWM  rreg ',' rreg ',' mask ',' rreg
-//	{
-//		outgcode(int($1), &$2, int($4.Reg), &$6, &$8);
-//	}
-	RLWMI	R1, R2, 4, 5, R3
-
-//
-// load/store multiple
-//
-//	LMOVMW addr ',' rreg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVMW	foo+0(SB), R2
-	MOVMW	4(R1), R2
-
-//	LMOVMW rreg ',' addr
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVMW	R1, foo+0(SB)
-	MOVMW	R1, 4(R2)
-
-//
-// various indexed load/store
-// indexed unary (eg, cache clear)
-//
-//	LXLD regaddr ',' rreg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	LSW	(R1), R2
-	LSW	(R1+R2), R3
-
-//	LXLD regaddr ',' imm ',' rreg
-//	{
-//		outgcode(int($1), &$2, 0, &$4, &$6);
-//	}
-	LSW	(R1), $1, R2
-	LSW	(R1+R2), $1, R3
-
-//	LXST rreg ',' regaddr
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	STSW	R1, (R2)
-	STSW	R1, (R2+R3)
-
-//	LXST rreg ',' imm ',' regaddr
-//	{
-//		outgcode(int($1), &$2, 0, &$4, &$6);
-//	}
-	STSW	R1, $1, (R2)
-	STSW	R1, $1, (R2+R3)
-
-//	LXMV regaddr ',' rreg
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVHBR	(R1), R2
-	MOVHBR	(R1+R2), R3
-
-//	LXMV rreg ',' regaddr
-//	{
-//		outcode(int($1), &$2, 0, &$4);
-//	}
-	MOVHBR	R1, (R2)
-	MOVHBR	R1, (R2+R3)
-
-//	LXOP regaddr
-//	{
-//		outcode(int($1), &$2, 0, &nullgen);
-//	}
-	DCBF	(R1)
-	DCBF	(R1+R2)
-
-//
-// NOP
-//
-//	LNOP comma // asm doesn't support the trailing comma.
-//	{
-//		outcode(int($1), &nullgen, 0, &nullgen);
-//	}
-	NOP
-
-//	LNOP rreg comma // asm doesn't support the trailing comma.
-//	{
-//		outcode(int($1), &$2, 0, &nullgen);
-//	}
-	NOP R2
-
-//	LNOP freg comma // asm doesn't support the trailing comma.
-//	{
-//		outcode(int($1), &$2, 0, &nullgen);
-//	}
-	NOP	F2
-
-//	LNOP ',' rreg // asm doesn't support the leading comma.
-//	{
-//		outcode(int($1), &nullgen, 0, &$3);
-//	}
-	NOP	R2
-
-//	LNOP ',' freg // asm doesn't support the leading comma.
-//	{
-//		outcode(int($1), &nullgen, 0, &$3);
-//	}
-	NOP	F2
-
-//	LNOP imm // SYSCALL $num: load $num to R0 before syscall and restore R0 to 0 afterwards.
-//	{
-//		outcode(int($1), &$2, 0, &nullgen);
-//	}
-	NOP	$4
-
-// RET
-//
-//	LRETRN	comma // asm doesn't support the trailing comma.
-//	{
-//		outcode(int($1), &nullgen, 0, &nullgen);
-//	}
-	RET
-
-// More BR/BL cases, and canonical names JMP, CALL.
-
-	BR	foo(SB)
-	BL	foo(SB)
-	JMP	foo(SB)
-	CALL	foo(SB)
-
-// END
-//
-//	LEND	comma // asm doesn't support the trailing comma.
-//	{
-//		outcode(int($1), &nullgen, 0, &nullgen);
-//	}
-	END
diff --git a/src/cmd/asm/internal/flags/flags.go b/src/cmd/asm/internal/flags/flags.go
deleted file mode 100644
index bf5cb1e..0000000
--- a/src/cmd/asm/internal/flags/flags.go
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package flags implements top-level flags and the usage message for the assembler.
-package flags
-
-import (
-	"flag"
-	"fmt"
-	"os"
-	"path/filepath"
-	"strings"
-)
-
-var (
-	Debug      = flag.Bool("debug", false, "dump instructions as they are parsed")
-	OutputFile = flag.String("o", "", "output file; default foo.6 for /a/b/c/foo.s on amd64")
-	PrintOut   = flag.Bool("S", false, "print assembly and machine code")
-	TrimPath   = flag.String("trimpath", "", "remove prefix from recorded source file paths")
-	Shared     = flag.Bool("shared", false, "generate code that can be linked into a shared library")
-	Dynlink    = flag.Bool("dynlink", false, "support references to Go symbols defined in other shared libraries")
-)
-
-var (
-	D MultiFlag
-	I MultiFlag
-)
-
-func init() {
-	flag.Var(&D, "D", "predefined symbol with optional simple value -D=identifer=value; can be set multiple times")
-	flag.Var(&I, "I", "include directory; can be set multiple times")
-}
-
-// MultiFlag allows setting a value multiple times to collect a list, as in -I=dir1 -I=dir2.
-type MultiFlag []string
-
-func (m *MultiFlag) String() string {
-	return fmt.Sprint(*m)
-}
-
-func (m *MultiFlag) Set(val string) error {
-	(*m) = append(*m, val)
-	return nil
-}
-
-func Usage() {
-	fmt.Fprintf(os.Stderr, "usage: asm [options] file.s\n")
-	fmt.Fprintf(os.Stderr, "Flags:\n")
-	flag.PrintDefaults()
-	os.Exit(2)
-}
-
-func Parse() {
-	flag.Usage = Usage
-	flag.Parse()
-	if flag.NArg() != 1 {
-		flag.Usage()
-	}
-
-	// Flag refinement.
-	if *OutputFile == "" {
-		input := filepath.Base(flag.Arg(0))
-		if strings.HasSuffix(input, ".s") {
-			input = input[:len(input)-2]
-		}
-		*OutputFile = fmt.Sprintf("%s.o", input)
-	}
-}
diff --git a/src/cmd/asm/internal/lex/input.go b/src/cmd/asm/internal/lex/input.go
deleted file mode 100644
index 7e495b8..0000000
--- a/src/cmd/asm/internal/lex/input.go
+++ /dev/null
@@ -1,464 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package lex
-
-import (
-	"fmt"
-	"os"
-	"path/filepath"
-	"strconv"
-	"strings"
-	"text/scanner"
-
-	"cmd/asm/internal/flags"
-)
-
-// Input is the main input: a stack of readers and some macro definitions.
-// It also handles #include processing (by pushing onto the input stack)
-// and parses and instantiates macro definitions.
-type Input struct {
-	Stack
-	includes        []string
-	beginningOfLine bool
-	ifdefStack      []bool
-	macros          map[string]*Macro
-	text            string // Text of last token returned by Next.
-	peek            bool
-	peekToken       ScanToken
-	peekText        string
-}
-
-// NewInput returns a
-func NewInput(name string) *Input {
-	return &Input{
-		// include directories: look in source dir, then -I directories.
-		includes:        append([]string{filepath.Dir(name)}, flags.I...),
-		beginningOfLine: true,
-		macros:          predefine(flags.D),
-	}
-}
-
-// predefine installs the macros set by the -D flag on the command line.
-func predefine(defines flags.MultiFlag) map[string]*Macro {
-	macros := make(map[string]*Macro)
-	for _, name := range defines {
-		value := "1"
-		i := strings.IndexRune(name, '=')
-		if i > 0 {
-			name, value = name[:i], name[i+1:]
-		}
-		tokens := Tokenize(name)
-		if len(tokens) != 1 || tokens[0].ScanToken != scanner.Ident {
-			fmt.Fprintf(os.Stderr, "asm: parsing -D: %q is not a valid identifier name\n", tokens[0])
-			flags.Usage()
-		}
-		macros[name] = &Macro{
-			name:   name,
-			args:   nil,
-			tokens: Tokenize(value),
-		}
-	}
-	return macros
-}
-
-func (in *Input) Error(args ...interface{}) {
-	fmt.Fprintf(os.Stderr, "%s:%d: %s", in.File(), in.Line(), fmt.Sprintln(args...))
-	os.Exit(1)
-}
-
-// expectText is like Error but adds "got XXX" where XXX is a quoted representation of the most recent token.
-func (in *Input) expectText(args ...interface{}) {
-	in.Error(append(args, "; got", strconv.Quote(in.Stack.Text()))...)
-}
-
-// enabled reports whether the input is enabled by an ifdef, or is at the top level.
-func (in *Input) enabled() bool {
-	return len(in.ifdefStack) == 0 || in.ifdefStack[len(in.ifdefStack)-1]
-}
-
-func (in *Input) expectNewline(directive string) {
-	tok := in.Stack.Next()
-	if tok != '\n' {
-		in.expectText("expected newline after", directive)
-	}
-}
-
-func (in *Input) Next() ScanToken {
-	if in.peek {
-		in.peek = false
-		tok := in.peekToken
-		in.text = in.peekText
-		return tok
-	}
-	// If we cannot generate a token after 100 macro invocations, we're in trouble.
-	// The usual case is caught by Push, below, but be safe.
-	for nesting := 0; nesting < 100; {
-		tok := in.Stack.Next()
-		switch tok {
-		case '#':
-			if !in.beginningOfLine {
-				in.Error("'#' must be first item on line")
-			}
-			in.beginningOfLine = in.hash()
-		case scanner.Ident:
-			// Is it a macro name?
-			name := in.Stack.Text()
-			macro := in.macros[name]
-			if macro != nil {
-				nesting++
-				in.invokeMacro(macro)
-				continue
-			}
-			fallthrough
-		default:
-			in.beginningOfLine = tok == '\n'
-			if in.enabled() {
-				in.text = in.Stack.Text()
-				return tok
-			}
-		}
-	}
-	in.Error("recursive macro invocation")
-	return 0
-}
-
-func (in *Input) Text() string {
-	return in.text
-}
-
-// hash processes a # preprocessor directive. It returns true iff it completes.
-func (in *Input) hash() bool {
-	// We have a '#'; it must be followed by a known word (define, include, etc.).
-	tok := in.Stack.Next()
-	if tok != scanner.Ident {
-		in.expectText("expected identifier after '#'")
-	}
-	if !in.enabled() {
-		// Can only start including again if we are at #else or #endif.
-		// We let #line through because it might affect errors.
-		switch in.Stack.Text() {
-		case "else", "endif", "line":
-			// Press on.
-		default:
-			return false
-		}
-	}
-	switch in.Stack.Text() {
-	case "define":
-		in.define()
-	case "else":
-		in.else_()
-	case "endif":
-		in.endif()
-	case "ifdef":
-		in.ifdef(true)
-	case "ifndef":
-		in.ifdef(false)
-	case "include":
-		in.include()
-	case "line":
-		in.line()
-	case "undef":
-		in.undef()
-	default:
-		in.Error("unexpected token after '#':", in.Stack.Text())
-	}
-	return true
-}
-
-// macroName returns the name for the macro being referenced.
-func (in *Input) macroName() string {
-	// We use the Stack's input method; no macro processing at this stage.
-	tok := in.Stack.Next()
-	if tok != scanner.Ident {
-		in.expectText("expected identifier after # directive")
-	}
-	// Name is alphanumeric by definition.
-	return in.Stack.Text()
-}
-
-// #define processing.
-func (in *Input) define() {
-	name := in.macroName()
-	args, tokens := in.macroDefinition(name)
-	in.defineMacro(name, args, tokens)
-}
-
-// defineMacro stores the macro definition in the Input.
-func (in *Input) defineMacro(name string, args []string, tokens []Token) {
-	if in.macros[name] != nil {
-		in.Error("redefinition of macro:", name)
-	}
-	in.macros[name] = &Macro{
-		name:   name,
-		args:   args,
-		tokens: tokens,
-	}
-}
-
-// macroDefinition returns the list of formals and the tokens of the definition.
-// The argument list is nil for no parens on the definition; otherwise a list of
-// formal argument names.
-func (in *Input) macroDefinition(name string) ([]string, []Token) {
-	prevCol := in.Stack.Col()
-	tok := in.Stack.Next()
-	if tok == '\n' || tok == scanner.EOF {
-		return nil, nil // No definition for macro
-	}
-	var args []string
-	// The C preprocessor treats
-	//	#define A(x)
-	// and
-	//	#define A (x)
-	// distinctly: the first is a macro with arguments, the second without.
-	// Distinguish these cases using the column number, since we don't
-	// see the space itself. Note that text/scanner reports the position at the
-	// end of the token. It's where you are now, and you just read this token.
-	if tok == '(' && in.Stack.Col() == prevCol+1 {
-		// Macro has arguments. Scan list of formals.
-		acceptArg := true
-		args = []string{} // Zero length but not nil.
-	Loop:
-		for {
-			tok = in.Stack.Next()
-			switch tok {
-			case ')':
-				tok = in.Stack.Next() // First token of macro definition.
-				break Loop
-			case ',':
-				if acceptArg {
-					in.Error("bad syntax in definition for macro:", name)
-				}
-				acceptArg = true
-			case scanner.Ident:
-				if !acceptArg {
-					in.Error("bad syntax in definition for macro:", name)
-				}
-				arg := in.Stack.Text()
-				if i := lookup(args, arg); i >= 0 {
-					in.Error("duplicate argument", arg, "in definition for macro:", name)
-				}
-				args = append(args, arg)
-				acceptArg = false
-			default:
-				in.Error("bad definition for macro:", name)
-			}
-		}
-	}
-	var tokens []Token
-	// Scan to newline. Backslashes escape newlines.
-	for tok != '\n' {
-		if tok == '\\' {
-			tok = in.Stack.Next()
-			if tok != '\n' && tok != '\\' {
-				in.Error(`can only escape \ or \n in definition for macro:`, name)
-			}
-		}
-		tokens = append(tokens, Make(tok, in.Stack.Text()))
-		tok = in.Stack.Next()
-	}
-	return args, tokens
-}
-
-func lookup(args []string, arg string) int {
-	for i, a := range args {
-		if a == arg {
-			return i
-		}
-	}
-	return -1
-}
-
-// invokeMacro pushes onto the input Stack a Slice that holds the macro definition with the actual
-// parameters substituted for the formals.
-// Invoking a macro does not touch the PC/line history.
-func (in *Input) invokeMacro(macro *Macro) {
-	// If the macro has no arguments, just substitute the text.
-	if macro.args == nil {
-		in.Push(NewSlice(in.File(), in.Line(), macro.tokens))
-		return
-	}
-	tok := in.Stack.Next()
-	if tok != '(' {
-		// If the macro has arguments but is invoked without them, all we push is the macro name.
-		// First, put back the token.
-		in.peekToken = tok
-		in.peekText = in.text
-		in.peek = true
-		in.Push(NewSlice(in.File(), in.Line(), []Token{Make(macroName, macro.name)}))
-		return
-	}
-	actuals := in.argsFor(macro)
-	var tokens []Token
-	for _, tok := range macro.tokens {
-		if tok.ScanToken != scanner.Ident {
-			tokens = append(tokens, tok)
-			continue
-		}
-		substitution := actuals[tok.text]
-		if substitution == nil {
-			tokens = append(tokens, tok)
-			continue
-		}
-		tokens = append(tokens, substitution...)
-	}
-	in.Push(NewSlice(in.File(), in.Line(), tokens))
-}
-
-// argsFor returns a map from formal name to actual value for this argumented macro invocation.
-// The opening parenthesis has been absorbed.
-func (in *Input) argsFor(macro *Macro) map[string][]Token {
-	var args [][]Token
-	// One macro argument per iteration. Collect them all and check counts afterwards.
-	for argNum := 0; ; argNum++ {
-		tokens, tok := in.collectArgument(macro)
-		args = append(args, tokens)
-		if tok == ')' {
-			break
-		}
-	}
-	// Zero-argument macros are tricky.
-	if len(macro.args) == 0 && len(args) == 1 && args[0] == nil {
-		args = nil
-	} else if len(args) != len(macro.args) {
-		in.Error("wrong arg count for macro", macro.name)
-	}
-	argMap := make(map[string][]Token)
-	for i, arg := range args {
-		argMap[macro.args[i]] = arg
-	}
-	return argMap
-}
-
-// collectArgument returns the actual tokens for a single argument of a macro.
-// It also returns the token that terminated the argument, which will always
-// be either ',' or ')'. The starting '(' has been scanned.
-func (in *Input) collectArgument(macro *Macro) ([]Token, ScanToken) {
-	nesting := 0
-	var tokens []Token
-	for {
-		tok := in.Stack.Next()
-		if tok == scanner.EOF || tok == '\n' {
-			in.Error("unterminated arg list invoking macro:", macro.name)
-		}
-		if nesting == 0 && (tok == ')' || tok == ',') {
-			return tokens, tok
-		}
-		if tok == '(' {
-			nesting++
-		}
-		if tok == ')' {
-			nesting--
-		}
-		tokens = append(tokens, Make(tok, in.Stack.Text()))
-	}
-}
-
-// #ifdef and #ifndef processing.
-func (in *Input) ifdef(truth bool) {
-	name := in.macroName()
-	in.expectNewline("#if[n]def")
-	if _, defined := in.macros[name]; !defined {
-		truth = !truth
-	}
-	in.ifdefStack = append(in.ifdefStack, truth)
-}
-
-// #else processing
-func (in *Input) else_() {
-	in.expectNewline("#else")
-	if len(in.ifdefStack) == 0 {
-		in.Error("unmatched #else")
-	}
-	in.ifdefStack[len(in.ifdefStack)-1] = !in.ifdefStack[len(in.ifdefStack)-1]
-}
-
-// #endif processing.
-func (in *Input) endif() {
-	in.expectNewline("#endif")
-	if len(in.ifdefStack) == 0 {
-		in.Error("unmatched #endif")
-	}
-	in.ifdefStack = in.ifdefStack[:len(in.ifdefStack)-1]
-}
-
-// #include processing.
-func (in *Input) include() {
-	// Find and parse string.
-	tok := in.Stack.Next()
-	if tok != scanner.String {
-		in.expectText("expected string after #include")
-	}
-	name, err := strconv.Unquote(in.Stack.Text())
-	if err != nil {
-		in.Error("unquoting include file name: ", err)
-	}
-	in.expectNewline("#include")
-	// Push tokenizer for file onto stack.
-	fd, err := os.Open(name)
-	if err != nil {
-		for _, dir := range in.includes {
-			fd, err = os.Open(filepath.Join(dir, name))
-			if err == nil {
-				break
-			}
-		}
-		if err != nil {
-			in.Error("#include:", err)
-		}
-	}
-	in.Push(NewTokenizer(name, fd, fd))
-}
-
-// #line processing.
-func (in *Input) line() {
-	// Only need to handle Plan 9 format: #line 337 "filename"
-	tok := in.Stack.Next()
-	if tok != scanner.Int {
-		in.expectText("expected line number after #line")
-	}
-	line, err := strconv.Atoi(in.Stack.Text())
-	if err != nil {
-		in.Error("error parsing #line (cannot happen):", err)
-	}
-	tok = in.Stack.Next()
-	if tok != scanner.String {
-		in.expectText("expected file name in #line")
-	}
-	file, err := strconv.Unquote(in.Stack.Text())
-	if err != nil {
-		in.Error("unquoting #line file name: ", err)
-	}
-	tok = in.Stack.Next()
-	if tok != '\n' {
-		in.Error("unexpected token at end of #line: ", tok)
-	}
-	linkCtxt.LineHist.Update(histLine, file, line)
-	in.Stack.SetPos(line, file)
-}
-
-// #undef processing
-func (in *Input) undef() {
-	name := in.macroName()
-	if in.macros[name] == nil {
-		in.Error("#undef for undefined macro:", name)
-	}
-	// Newline must be next.
-	tok := in.Stack.Next()
-	if tok != '\n' {
-		in.Error("syntax error in #undef for macro:", name)
-	}
-	delete(in.macros, name)
-}
-
-func (in *Input) Push(r TokenReader) {
-	if len(in.tr) > 100 {
-		in.Error("input recursion")
-	}
-	in.Stack.Push(r)
-}
-
-func (in *Input) Close() {
-}
diff --git a/src/cmd/asm/internal/lex/lex.go b/src/cmd/asm/internal/lex/lex.go
deleted file mode 100644
index 6fce55f..0000000
--- a/src/cmd/asm/internal/lex/lex.go
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package lex implements lexical analysis for the assembler.
-package lex
-
-import (
-	"fmt"
-	"log"
-	"os"
-	"strings"
-	"text/scanner"
-
-	"cmd/internal/obj"
-)
-
-// A ScanToken represents an input item. It is a simple wrapping of rune, as
-// returned by text/scanner.Scanner, plus a couple of extra values.
-type ScanToken rune
-
-const (
-	// Asm defines some two-character lexemes. We make up
-	// a rune/ScanToken value for them - ugly but simple.
-	LSH       ScanToken = -1000 - iota // << Left shift.
-	RSH                                // >> Logical right shift.
-	ARR                                // -> Used on ARM for shift type 3, arithmetic right shift.
-	ROT                                // @> Used on ARM for shift type 4, rotate right.
-	macroName                          // name of macro that should not be expanded
-)
-
-// IsRegisterShift reports whether the token is one of the ARM register shift operators.
-func IsRegisterShift(r ScanToken) bool {
-	return ROT <= r && r <= LSH // Order looks backwards because these are negative.
-}
-
-func (t ScanToken) String() string {
-	switch t {
-	case scanner.EOF:
-		return "EOF"
-	case scanner.Ident:
-		return "identifier"
-	case scanner.Int:
-		return "integer constant"
-	case scanner.Float:
-		return "float constant"
-	case scanner.Char:
-		return "rune constant"
-	case scanner.String:
-		return "string constant"
-	case scanner.RawString:
-		return "raw string constant"
-	case scanner.Comment:
-		return "comment"
-	default:
-		return fmt.Sprintf("%q", rune(t))
-	}
-}
-
-var (
-	// It might be nice if these weren't global.
-	linkCtxt *obj.Link     // The link context for all instructions.
-	histLine int       = 1 // The cumulative count of lines processed.
-)
-
-// HistLine reports the cumulative source line number of the token,
-// for use in the Prog structure for the linker. (It's always handling the
-// instruction from the current lex line.)
-// It returns int32 because that's what type ../asm prefers.
-func HistLine() int32 {
-	return int32(histLine)
-}
-
-// NewLexer returns a lexer for the named file and the given link context.
-func NewLexer(name string, ctxt *obj.Link) TokenReader {
-	linkCtxt = ctxt
-	input := NewInput(name)
-	fd, err := os.Open(name)
-	if err != nil {
-		log.Fatalf("asm: %s\n", err)
-	}
-	input.Push(NewTokenizer(name, fd, fd))
-	return input
-}
-
-// InitHist sets the line count to 1, for reproducible testing.
-func InitHist() {
-	histLine = 1
-}
-
-// The other files in this directory each contain an implementation of TokenReader.
-
-// A TokenReader is like a reader, but returns lex tokens of type Token. It also can tell you what
-// the text of the most recently returned token is, and where it was found.
-// The underlying scanner elides all spaces except newline, so the input looks like a  stream of
-// Tokens; original spacing is lost but we don't need it.
-type TokenReader interface {
-	// Next returns the next token.
-	Next() ScanToken
-	// The following methods all refer to the most recent token returned by Next.
-	// Text returns the original string representation of the token.
-	Text() string
-	// File reports the source file name of the token.
-	File() string
-	// Line reports the source line number of the token.
-	Line() int
-	// Col reports the source column number of the token.
-	Col() int
-	// SetPos sets the file and line number.
-	SetPos(line int, file string)
-	// Close does any teardown required.
-	Close()
-}
-
-// A Token is a scan token plus its string value.
-// A macro is stored as a sequence of Tokens with spaces stripped.
-type Token struct {
-	ScanToken
-	text string
-}
-
-// Make returns a Token with the given rune (ScanToken) and text representation.
-func Make(token ScanToken, text string) Token {
-	// If the symbol starts with center dot, as in ·x, rewrite it as ""·x
-	if token == scanner.Ident && strings.HasPrefix(text, "\u00B7") {
-		text = `""` + text
-	}
-	// Substitute the substitutes for . and /.
-	text = strings.Replace(text, "\u00B7", ".", -1)
-	text = strings.Replace(text, "\u2215", "/", -1)
-	return Token{ScanToken: token, text: text}
-}
-
-func (l Token) String() string {
-	return l.text
-}
-
-// A Macro represents the definition of a #defined macro.
-type Macro struct {
-	name   string   // The #define name.
-	args   []string // Formal arguments.
-	tokens []Token  // Body of macro.
-}
-
-// Tokenize turns a string into a list of Tokens; used to parse the -D flag and in tests.
-func Tokenize(str string) []Token {
-	t := NewTokenizer("command line", strings.NewReader(str), nil)
-	var tokens []Token
-	for {
-		tok := t.Next()
-		if tok == scanner.EOF {
-			break
-		}
-		tokens = append(tokens, Make(tok, t.Text()))
-	}
-	return tokens
-}
diff --git a/src/cmd/asm/internal/lex/lex_test.go b/src/cmd/asm/internal/lex/lex_test.go
deleted file mode 100644
index f034d69..0000000
--- a/src/cmd/asm/internal/lex/lex_test.go
+++ /dev/null
@@ -1,154 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package lex
-
-import (
-	"bytes"
-	"strings"
-	"testing"
-	"text/scanner"
-)
-
-type lexTest struct {
-	name   string
-	input  string
-	output string
-}
-
-var lexTests = []lexTest{
-	{
-		"empty",
-		"",
-		"",
-	},
-	{
-		"simple",
-		"1 (a)",
-		"1.(.a.)",
-	},
-	{
-		"simple define",
-		lines(
-			"#define A 1234",
-			"A",
-		),
-		"1234.\n",
-	},
-	{
-		"define without value",
-		"#define A",
-		"",
-	},
-	{
-		"macro without arguments",
-		"#define A() 1234\n" + "A()\n",
-		"1234.\n",
-	},
-	{
-		"macro with just parens as body",
-		"#define A () \n" + "A\n",
-		"(.).\n",
-	},
-	{
-		"macro with parens but no arguments",
-		"#define A (x) \n" + "A\n",
-		"(.x.).\n",
-	},
-	{
-		"macro with arguments",
-		"#define A(x, y, z) x+z+y\n" + "A(1, 2, 3)\n",
-		"1.+.3.+.2.\n",
-	},
-	{
-		"argumented macro invoked without arguments",
-		lines(
-			"#define X() foo ",
-			"X()",
-			"X",
-		),
-		"foo.\n.X.\n",
-	},
-	{
-		"multiline macro without arguments",
-		lines(
-			"#define A 1\\",
-			"\t2\\",
-			"\t3",
-			"before",
-			"A",
-			"after",
-		),
-		"before.\n.1.\n.2.\n.3.\n.after.\n",
-	},
-	{
-		"multiline macro with arguments",
-		lines(
-			"#define A(a, b, c) a\\",
-			"\tb\\",
-			"\tc",
-			"before",
-			"A(1, 2, 3)",
-			"after",
-		),
-		"before.\n.1.\n.2.\n.3.\n.after.\n",
-	},
-	{
-		"LOAD macro",
-		lines(
-			"#define LOAD(off, reg) \\",
-			"\tMOVBLZX	(off*4)(R12),	reg \\",
-			"\tADDB	reg,		DX",
-			"",
-			"LOAD(8, AX)",
-		),
-		"\n.\n.MOVBLZX.(.8.*.4.).(.R12.).,.AX.\n.ADDB.AX.,.DX.\n",
-	},
-	{
-		"nested multiline macro",
-		lines(
-			"#define KEYROUND(xmm, load, off, r1, r2, index) \\",
-			"\tMOVBLZX	(BP)(DX*4),	R8 \\",
-			"\tload((off+1), r2) \\",
-			"\tMOVB	R8,		(off*4)(R12) \\",
-			"\tPINSRW	$index, (BP)(R8*4), xmm",
-			"#define LOAD(off, reg) \\",
-			"\tMOVBLZX	(off*4)(R12),	reg \\",
-			"\tADDB	reg,		DX",
-			"KEYROUND(X0, LOAD, 8, AX, BX, 0)",
-		),
-		"\n.MOVBLZX.(.BP.).(.DX.*.4.).,.R8.\n.\n.MOVBLZX.(.(.8.+.1.).*.4.).(.R12.).,.BX.\n.ADDB.BX.,.DX.\n.MOVB.R8.,.(.8.*.4.).(.R12.).\n.PINSRW.$.0.,.(.BP.).(.R8.*.4.).,.X0.\n",
-	},
-}
-
-func TestLex(t *testing.T) {
-	for _, test := range lexTests {
-		input := NewInput(test.name)
-		input.Push(NewTokenizer(test.name, strings.NewReader(test.input), nil))
-		result := drain(input)
-		if result != test.output {
-			t.Errorf("%s: got %q expected %q", test.name, result, test.output)
-		}
-	}
-}
-
-// lines joins the arguments together as complete lines.
-func lines(a ...string) string {
-	return strings.Join(a, "\n") + "\n"
-}
-
-// drain returns a single string representing the processed input tokens.
-func drain(input *Input) string {
-	var buf bytes.Buffer
-	for {
-		tok := input.Next()
-		if tok == scanner.EOF {
-			return buf.String()
-		}
-		if buf.Len() > 0 {
-			buf.WriteByte('.')
-		}
-		buf.WriteString(input.Text())
-	}
-}
diff --git a/src/cmd/asm/internal/lex/slice.go b/src/cmd/asm/internal/lex/slice.go
deleted file mode 100644
index e94106b..0000000
--- a/src/cmd/asm/internal/lex/slice.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package lex
-
-import "text/scanner"
-
-// A Slice reads from a slice of Tokens.
-type Slice struct {
-	tokens   []Token
-	fileName string
-	line     int
-	pos      int
-}
-
-func NewSlice(fileName string, line int, tokens []Token) *Slice {
-	return &Slice{
-		tokens:   tokens,
-		fileName: fileName,
-		line:     line,
-		pos:      -1, // Next will advance to zero.
-	}
-}
-
-func (s *Slice) Next() ScanToken {
-	s.pos++
-	if s.pos >= len(s.tokens) {
-		return scanner.EOF
-	}
-	return s.tokens[s.pos].ScanToken
-}
-
-func (s *Slice) Text() string {
-	return s.tokens[s.pos].text
-}
-
-func (s *Slice) File() string {
-	return s.fileName
-}
-
-func (s *Slice) Line() int {
-	return s.line
-}
-
-func (s *Slice) Col() int {
-	// Col is only called when defining a macro, which can't reach here.
-	panic("cannot happen: slice col")
-}
-
-func (s *Slice) SetPos(line int, file string) {
-	// Cannot happen because we only have slices of already-scanned
-	// text, but be prepared.
-	s.line = line
-	s.fileName = file
-}
-
-func (s *Slice) Close() {
-}
diff --git a/src/cmd/asm/internal/lex/stack.go b/src/cmd/asm/internal/lex/stack.go
deleted file mode 100644
index 72d7f8a..0000000
--- a/src/cmd/asm/internal/lex/stack.go
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package lex
-
-import "text/scanner"
-
-// A Stack is a stack of TokenReaders. As the top TokenReader hits EOF,
-// it resumes reading the next one down.
-type Stack struct {
-	tr []TokenReader
-}
-
-// Push adds tr to the top (end) of the input stack. (Popping happens automatically.)
-func (s *Stack) Push(tr TokenReader) {
-	s.tr = append(s.tr, tr)
-}
-
-func (s *Stack) Next() ScanToken {
-	tos := s.tr[len(s.tr)-1]
-	tok := tos.Next()
-	for tok == scanner.EOF && len(s.tr) > 1 {
-		tos.Close()
-		// Pop the topmost item from the stack and resume with the next one down.
-		s.tr = s.tr[:len(s.tr)-1]
-		tok = s.Next()
-	}
-	return tok
-}
-
-func (s *Stack) Text() string {
-	return s.tr[len(s.tr)-1].Text()
-}
-
-func (s *Stack) File() string {
-	return s.tr[len(s.tr)-1].File()
-}
-
-func (s *Stack) Line() int {
-	return s.tr[len(s.tr)-1].Line()
-}
-
-func (s *Stack) Col() int {
-	return s.tr[len(s.tr)-1].Col()
-}
-
-func (s *Stack) SetPos(line int, file string) {
-	s.tr[len(s.tr)-1].SetPos(line, file)
-}
-
-func (s *Stack) Close() { // Unused.
-}
diff --git a/src/cmd/asm/internal/lex/tokenizer.go b/src/cmd/asm/internal/lex/tokenizer.go
deleted file mode 100644
index 6a4d954..0000000
--- a/src/cmd/asm/internal/lex/tokenizer.go
+++ /dev/null
@@ -1,152 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package lex
-
-import (
-	"io"
-	"os"
-	"strings"
-	"text/scanner"
-	"unicode"
-)
-
-// A Tokenizer is a simple wrapping of text/scanner.Scanner, configured
-// for our purposes and made a TokenReader. It forms the lowest level,
-// turning text from readers into tokens.
-type Tokenizer struct {
-	tok      ScanToken
-	s        *scanner.Scanner
-	line     int
-	fileName string
-	file     *os.File // If non-nil, file descriptor to close.
-}
-
-func NewTokenizer(name string, r io.Reader, file *os.File) *Tokenizer {
-	var s scanner.Scanner
-	s.Init(r)
-	// Newline is like a semicolon; other space characters are fine.
-	s.Whitespace = 1<<'\t' | 1<<'\r' | 1<<' '
-	// Don't skip comments: we need to count newlines.
-	s.Mode = scanner.ScanChars |
-		scanner.ScanFloats |
-		scanner.ScanIdents |
-		scanner.ScanInts |
-		scanner.ScanStrings |
-		scanner.ScanComments
-	s.Position.Filename = name
-	s.IsIdentRune = isIdentRune
-	if file != nil {
-		linkCtxt.LineHist.Push(histLine, name)
-	}
-	return &Tokenizer{
-		s:        &s,
-		line:     1,
-		fileName: name,
-		file:     file,
-	}
-}
-
-// We want center dot (·) and division slash (∕) to work as identifier characters.
-func isIdentRune(ch rune, i int) bool {
-	if unicode.IsLetter(ch) {
-		return true
-	}
-	switch ch {
-	case '_': // Underscore; traditional.
-		return true
-	case '\u00B7': // Represents the period in runtime.exit. U+00B7 '·' middle dot
-		return true
-	case '\u2215': // Represents the slash in runtime/debug.setGCPercent. U+2215 '∕' division slash
-		return true
-	}
-	// Digits are OK only after the first character.
-	return i > 0 && unicode.IsDigit(ch)
-}
-
-func (t *Tokenizer) Text() string {
-	switch t.tok {
-	case LSH:
-		return "<<"
-	case RSH:
-		return ">>"
-	case ARR:
-		return "->"
-	case ROT:
-		return "@>"
-	}
-	return t.s.TokenText()
-}
-
-func (t *Tokenizer) File() string {
-	return t.fileName
-}
-
-func (t *Tokenizer) Line() int {
-	return t.line
-}
-
-func (t *Tokenizer) Col() int {
-	return t.s.Pos().Column
-}
-
-func (t *Tokenizer) SetPos(line int, file string) {
-	t.line = line
-	t.fileName = file
-}
-
-func (t *Tokenizer) Next() ScanToken {
-	s := t.s
-	for {
-		t.tok = ScanToken(s.Scan())
-		if t.tok != scanner.Comment {
-			break
-		}
-		length := strings.Count(s.TokenText(), "\n")
-		t.line += length
-		histLine += length
-		// TODO: If we ever have //go: comments in assembly, will need to keep them here.
-		// For now, just discard all comments.
-	}
-	switch t.tok {
-	case '\n':
-		if t.file != nil {
-			histLine++
-		}
-		t.line++
-	case '-':
-		if s.Peek() == '>' {
-			s.Next()
-			t.tok = ARR
-			return ARR
-		}
-	case '@':
-		if s.Peek() == '>' {
-			s.Next()
-			t.tok = ROT
-			return ROT
-		}
-	case '<':
-		if s.Peek() == '<' {
-			s.Next()
-			t.tok = LSH
-			return LSH
-		}
-	case '>':
-		if s.Peek() == '>' {
-			s.Next()
-			t.tok = RSH
-			return RSH
-		}
-	}
-	return t.tok
-}
-
-func (t *Tokenizer) Close() {
-	if t.file != nil {
-		t.file.Close()
-		// It's an open file, so pop the line history.
-		linkCtxt.LineHist.Pop(histLine)
-	}
-}
diff --git a/src/cmd/asm/main.go b/src/cmd/asm/main.go
deleted file mode 100644
index db0e28e..0000000
--- a/src/cmd/asm/main.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
-	"flag"
-	"fmt"
-	"log"
-	"os"
-
-	"cmd/asm/internal/arch"
-	"cmd/asm/internal/asm"
-	"cmd/asm/internal/flags"
-	"cmd/asm/internal/lex"
-
-	"cmd/internal/obj"
-)
-
-func main() {
-	log.SetFlags(0)
-	log.SetPrefix("asm: ")
-
-	GOARCH := obj.Getgoarch()
-
-	architecture := arch.Set(GOARCH)
-	if architecture == nil {
-		log.Fatalf("asm: unrecognized architecture %s", GOARCH)
-	}
-
-	flags.Parse()
-
-	// Create object file, write header.
-	fd, err := os.Create(*flags.OutputFile)
-	if err != nil {
-		log.Fatal(err)
-	}
-	ctxt := obj.Linknew(architecture.LinkArch)
-	if *flags.PrintOut {
-		ctxt.Debugasm = 1
-	}
-	ctxt.LineHist.TrimPathPrefix = *flags.TrimPath
-	ctxt.Flag_dynlink = *flags.Dynlink
-	if *flags.Shared || *flags.Dynlink {
-		ctxt.Flag_shared = 1
-	}
-	ctxt.Bso = obj.Binitw(os.Stdout)
-	defer ctxt.Bso.Flush()
-	ctxt.Diag = log.Fatalf
-	output := obj.Binitw(fd)
-	fmt.Fprintf(output, "go object %s %s %s\n", obj.Getgoos(), obj.Getgoarch(), obj.Getgoversion())
-	fmt.Fprintf(output, "!\n")
-
-	lexer := lex.NewLexer(flag.Arg(0), ctxt)
-	parser := asm.NewParser(ctxt, architecture, lexer)
-	pList := obj.Linknewplist(ctxt)
-	var ok bool
-	pList.Firstpc, ok = parser.Parse()
-	if !ok {
-		log.Printf("asm: assembly of %s failed", flag.Arg(0))
-		os.Remove(*flags.OutputFile)
-		os.Exit(1)
-	}
-	obj.Writeobjdirect(ctxt, output)
-	output.Flush()
-}
diff --git a/src/cmd/compile/doc.go b/src/cmd/compile/doc.go
deleted file mode 100644
index e362657..0000000
--- a/src/cmd/compile/doc.go
+++ /dev/null
@@ -1,127 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-/*
-Compile, typically invoked as ``go tool compile,'' compiles a single Go package
-comprising the files named on the command line. It then writes a single
-object file named for the basename of the first source file with a .o suffix.
-The object file can then be combined with other objects into a package archive
-or passed directly to the linker (``go tool link''). If invoked with -pack, the compiler
-writes an archive directly, bypassing the intermediate object file.
-
-The generated files contain type information about the symbols exported by
-the package and about types used by symbols imported by the package from
-other packages. It is therefore not necessary when compiling client C of
-package P to read the files of P's dependencies, only the compiled output of P.
-
-Command Line
-
-Usage:
-
-	go tool compile [flags] file...
-
-The specified files must be Go source files and all part of the same package.
-The same compiler is used for all target operating systems and architectures.
-The GOOS and GOARCH environment variables set the desired target.
-
-Flags:
-
-	-D path
-		Set relative path for local imports.
-	-I dir1 -I dir2
-		Search for imported packages in dir1, dir2, etc,
-		after consulting $GOROOT/pkg/$GOOS_$GOARCH.
-	-L
-		Show complete file path in error messages.
-	-N
-		Disable optimizations.
-	-S
-		Print assembly listing to standard output (code only).
-	-S -S
-		Print assembly listing to standard output (code and data).
-	-V
-		Print compiler version and exit.
-	-asmhdr file
-		Write assembly header to file.
-	-complete
-		Assume package has no non-Go components.
-	-cpuprofile file
-		Write a CPU profile for the compilation to file.
-	-dynlink
-		Allow references to Go symbols in shared libraries (experimental).
-	-e
-		Remove the limit on the number of errors reported (default limit is 10).
-	-h
-		Halt with a stack trace at the first error detected.
-	-importmap old=new
-		Interpret import "old" as import "new" during compilation.
-		The option may be repeated to add multiple mappings.
-	-installsuffix suffix
-		Look for packages in $GOROOT/pkg/$GOOS_$GOARCH_suffix
-		instead of $GOROOT/pkg/$GOOS_$GOARCH.
-	-largemodel
-		Generated code that assumes a large memory model.
-	-memprofile file
-		Write memory profile for the compilation to file.
-	-memprofilerate rate
-		Set runtime.MemProfileRate for the compilation to rate.
-	-nolocalimports
-		Disallow local (relative) imports.
-	-o file
-		Write object to file (default file.o or, with -pack, file.a).
-	-p path
-		Set expected package import path for the code being compiled,
-		and diagnose imports that would cause a circular dependency.
-	-pack
-		Write a package (archive) file rather than an object file
-	-race
-		Compile with race detector enabled.
-	-u
-		Disallow importing packages not marked as safe; implies -nolocalimports.
-
-There are also a number of debugging flags; run the command with no arguments
-for a usage message.
-
-Compiler Directives
-
-The compiler accepts compiler directives in the form of // comments at the
-beginning of a line. To distinguish them from non-directive comments, the directives
-require no space between the slashes and the name of the directive. However, since
-they are comments, tools unaware of the directive convention or of a particular
-directive can skip over a directive like any other comment.
-
-	//line path/to/file:linenumber
-
-The //line directive specifies that the source line that follows should be recorded
-as having come from the given file path and line number. Successive lines are
-recorded using increasing line numbers, until the next directive. This directive
-typically appears in machine-generated code, so that compilers and debuggers
-will show lines in the original input to the generator.
-
-The //line directive is an historical special case; all other directives are of the form
-//go:name, indicating that the directive is defined by the Go toolchain.
-
-	//go:noescape
-
-The //go:noescape directive specifies that the next declaration in the file, which
-must be a func without a body (meaning that it has an implementation not written
-in Go) does not allow any of the pointers passed as arguments to escape into the
-heap or into the values returned from the function. This information can be used as
-during the compiler's escape analysis of Go code calling the function.
-
-	//go:nosplit
-
-The //go:nosplit directive specifies that the next function declared in the file must
-not include a stack overflow check. This is most commonly used by low-level
-runtime sources invoked at times when it is unsafe for the calling goroutine to be
-preempted.
-
-	//go:linkname localname importpath.name
-
-The //go:linkname directive instructs the compiler to use ``importpath.name'' as the
-object file symbol name for the variable or function declared as ``localname'' in the
-source code. Because this directive can subvert the type system and package
-modularity, it is only enabled in files that have imported "unsafe".
-*/
-package main
diff --git a/src/cmd/compile/internal/amd64/cgen.go b/src/cmd/compile/internal/amd64/cgen.go
deleted file mode 100644
index 71f8f88..0000000
--- a/src/cmd/compile/internal/amd64/cgen.go
+++ /dev/null
@@ -1,151 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package amd64
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/x86"
-)
-
-func blockcopy(n, ns *gc.Node, osrc, odst, w int64) {
-	var noddi gc.Node
-	gc.Nodreg(&noddi, gc.Types[gc.Tptr], x86.REG_DI)
-	var nodsi gc.Node
-	gc.Nodreg(&nodsi, gc.Types[gc.Tptr], x86.REG_SI)
-
-	var nodl gc.Node
-	var nodr gc.Node
-	if n.Ullman >= ns.Ullman {
-		gc.Agenr(n, &nodr, &nodsi)
-		if ns.Op == gc.ONAME {
-			gc.Gvardef(ns)
-		}
-		gc.Agenr(ns, &nodl, &noddi)
-	} else {
-		if ns.Op == gc.ONAME {
-			gc.Gvardef(ns)
-		}
-		gc.Agenr(ns, &nodl, &noddi)
-		gc.Agenr(n, &nodr, &nodsi)
-	}
-
-	if nodl.Reg != x86.REG_DI {
-		gmove(&nodl, &noddi)
-	}
-	if nodr.Reg != x86.REG_SI {
-		gmove(&nodr, &nodsi)
-	}
-	gc.Regfree(&nodl)
-	gc.Regfree(&nodr)
-
-	c := w % 8 // bytes
-	q := w / 8 // quads
-
-	var oldcx gc.Node
-	var cx gc.Node
-	savex(x86.REG_CX, &cx, &oldcx, nil, gc.Types[gc.TINT64])
-
-	// if we are copying forward on the stack and
-	// the src and dst overlap, then reverse direction
-	if osrc < odst && odst < osrc+w {
-		// reverse direction
-		gins(x86.ASTD, nil, nil) // set direction flag
-		if c > 0 {
-			gconreg(addptr, w-1, x86.REG_SI)
-			gconreg(addptr, w-1, x86.REG_DI)
-
-			gconreg(movptr, c, x86.REG_CX)
-			gins(x86.AREP, nil, nil)   // repeat
-			gins(x86.AMOVSB, nil, nil) // MOVB *(SI)-,*(DI)-
-		}
-
-		if q > 0 {
-			if c > 0 {
-				gconreg(addptr, -7, x86.REG_SI)
-				gconreg(addptr, -7, x86.REG_DI)
-			} else {
-				gconreg(addptr, w-8, x86.REG_SI)
-				gconreg(addptr, w-8, x86.REG_DI)
-			}
-
-			gconreg(movptr, q, x86.REG_CX)
-			gins(x86.AREP, nil, nil)   // repeat
-			gins(x86.AMOVSQ, nil, nil) // MOVQ *(SI)-,*(DI)-
-		}
-
-		// we leave with the flag clear
-		gins(x86.ACLD, nil, nil)
-	} else {
-		// normal direction
-		if q > 128 || (gc.Nacl && q >= 4) {
-			gconreg(movptr, q, x86.REG_CX)
-			gins(x86.AREP, nil, nil)   // repeat
-			gins(x86.AMOVSQ, nil, nil) // MOVQ *(SI)+,*(DI)+
-		} else if q >= 4 {
-			p := gins(obj.ADUFFCOPY, nil, nil)
-			p.To.Type = obj.TYPE_ADDR
-			p.To.Sym = gc.Linksym(gc.Pkglookup("duffcopy", gc.Runtimepkg))
-
-			// 14 and 128 = magic constants: see ../../runtime/asm_amd64.s
-			p.To.Offset = 14 * (128 - q)
-		} else if !gc.Nacl && c == 0 {
-			// We don't need the MOVSQ side-effect of updating SI and DI,
-			// and issuing a sequence of MOVQs directly is faster.
-			nodsi.Op = gc.OINDREG
-
-			noddi.Op = gc.OINDREG
-			for q > 0 {
-				gmove(&nodsi, &cx) // MOVQ x+(SI),CX
-				gmove(&cx, &noddi) // MOVQ CX,x+(DI)
-				nodsi.Xoffset += 8
-				noddi.Xoffset += 8
-				q--
-			}
-		} else {
-			for q > 0 {
-				gins(x86.AMOVSQ, nil, nil) // MOVQ *(SI)+,*(DI)+
-				q--
-			}
-		}
-
-		// copy the remaining c bytes
-		if w < 4 || c <= 1 || (odst < osrc && osrc < odst+w) {
-			for c > 0 {
-				gins(x86.AMOVSB, nil, nil) // MOVB *(SI)+,*(DI)+
-				c--
-			}
-		} else if w < 8 || c <= 4 {
-			nodsi.Op = gc.OINDREG
-			noddi.Op = gc.OINDREG
-			cx.Type = gc.Types[gc.TINT32]
-			nodsi.Type = gc.Types[gc.TINT32]
-			noddi.Type = gc.Types[gc.TINT32]
-			if c > 4 {
-				nodsi.Xoffset = 0
-				noddi.Xoffset = 0
-				gmove(&nodsi, &cx)
-				gmove(&cx, &noddi)
-			}
-
-			nodsi.Xoffset = c - 4
-			noddi.Xoffset = c - 4
-			gmove(&nodsi, &cx)
-			gmove(&cx, &noddi)
-		} else {
-			nodsi.Op = gc.OINDREG
-			noddi.Op = gc.OINDREG
-			cx.Type = gc.Types[gc.TINT64]
-			nodsi.Type = gc.Types[gc.TINT64]
-			noddi.Type = gc.Types[gc.TINT64]
-			nodsi.Xoffset = c - 8
-			noddi.Xoffset = c - 8
-			gmove(&nodsi, &cx)
-			gmove(&cx, &noddi)
-		}
-	}
-
-	restx(&cx, &oldcx)
-}
diff --git a/src/cmd/compile/internal/amd64/galign.go b/src/cmd/compile/internal/amd64/galign.go
deleted file mode 100644
index 79bf94a..0000000
--- a/src/cmd/compile/internal/amd64/galign.go
+++ /dev/null
@@ -1,129 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package amd64
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/x86"
-)
-
-var (
-	thechar     int           = '6'
-	thestring   string        = "amd64"
-	thelinkarch *obj.LinkArch = &x86.Linkamd64
-)
-
-func linkarchinit() {
-	if obj.Getgoarch() == "amd64p32" {
-		thelinkarch = &x86.Linkamd64p32
-		gc.Thearch.Thelinkarch = thelinkarch
-		thestring = "amd64p32"
-		gc.Thearch.Thestring = "amd64p32"
-	}
-}
-
-var MAXWIDTH int64 = 1 << 50
-
-var (
-	addptr int = x86.AADDQ
-	movptr int = x86.AMOVQ
-	leaptr int = x86.ALEAQ
-	cmpptr int = x86.ACMPQ
-)
-
-/*
- * go declares several platform-specific type aliases:
- * int, uint, and uintptr
- */
-var typedefs = []gc.Typedef{
-	gc.Typedef{"int", gc.TINT, gc.TINT64},
-	gc.Typedef{"uint", gc.TUINT, gc.TUINT64},
-	gc.Typedef{"uintptr", gc.TUINTPTR, gc.TUINT64},
-}
-
-func betypeinit() {
-	gc.Widthptr = 8
-	gc.Widthint = 8
-	gc.Widthreg = 8
-	if obj.Getgoarch() == "amd64p32" {
-		gc.Widthptr = 4
-		gc.Widthint = 4
-		addptr = x86.AADDL
-		movptr = x86.AMOVL
-		leaptr = x86.ALEAL
-		cmpptr = x86.ACMPL
-		typedefs[0].Sameas = gc.TINT32
-		typedefs[1].Sameas = gc.TUINT32
-		typedefs[2].Sameas = gc.TUINT32
-	}
-
-	if gc.Ctxt.Flag_dynlink {
-		gc.Thearch.ReservedRegs = append(gc.Thearch.ReservedRegs, x86.REG_R15)
-	}
-}
-
-func Main() {
-	if obj.Getgoos() == "nacl" {
-		resvd = append(resvd, x86.REG_BP, x86.REG_R15)
-	} else if obj.Framepointer_enabled != 0 {
-		resvd = append(resvd, x86.REG_BP)
-	}
-
-	gc.Thearch.Thechar = thechar
-	gc.Thearch.Thestring = thestring
-	gc.Thearch.Thelinkarch = thelinkarch
-	gc.Thearch.Typedefs = typedefs
-	gc.Thearch.REGSP = x86.REGSP
-	gc.Thearch.REGCTXT = x86.REGCTXT
-	gc.Thearch.REGCALLX = x86.REG_BX
-	gc.Thearch.REGCALLX2 = x86.REG_AX
-	gc.Thearch.REGRETURN = x86.REG_AX
-	gc.Thearch.REGMIN = x86.REG_AX
-	gc.Thearch.REGMAX = x86.REG_R15
-	gc.Thearch.FREGMIN = x86.REG_X0
-	gc.Thearch.FREGMAX = x86.REG_X15
-	gc.Thearch.MAXWIDTH = MAXWIDTH
-	gc.Thearch.ReservedRegs = resvd
-
-	gc.Thearch.AddIndex = addindex
-	gc.Thearch.Betypeinit = betypeinit
-	gc.Thearch.Cgen_bmul = cgen_bmul
-	gc.Thearch.Cgen_hmul = cgen_hmul
-	gc.Thearch.Cgen_shift = cgen_shift
-	gc.Thearch.Clearfat = clearfat
-	gc.Thearch.Defframe = defframe
-	gc.Thearch.Dodiv = dodiv
-	gc.Thearch.Excise = excise
-	gc.Thearch.Expandchecks = expandchecks
-	gc.Thearch.Getg = getg
-	gc.Thearch.Gins = gins
-	gc.Thearch.Ginsboolval = ginsboolval
-	gc.Thearch.Ginscmp = ginscmp
-	gc.Thearch.Ginscon = ginscon
-	gc.Thearch.Ginsnop = ginsnop
-	gc.Thearch.Gmove = gmove
-	gc.Thearch.Linkarchinit = linkarchinit
-	gc.Thearch.Peep = peep
-	gc.Thearch.Proginfo = proginfo
-	gc.Thearch.Regtyp = regtyp
-	gc.Thearch.Sameaddr = sameaddr
-	gc.Thearch.Smallindir = smallindir
-	gc.Thearch.Stackaddr = stackaddr
-	gc.Thearch.Blockcopy = blockcopy
-	gc.Thearch.Sudoaddable = sudoaddable
-	gc.Thearch.Sudoclean = sudoclean
-	gc.Thearch.Excludedregs = excludedregs
-	gc.Thearch.RtoB = RtoB
-	gc.Thearch.FtoB = FtoB
-	gc.Thearch.BtoR = BtoR
-	gc.Thearch.BtoF = BtoF
-	gc.Thearch.Optoas = optoas
-	gc.Thearch.Doregbits = doregbits
-	gc.Thearch.Regnames = regnames
-
-	gc.Main()
-	gc.Exit(0)
-}
diff --git a/src/cmd/compile/internal/amd64/ggen.go b/src/cmd/compile/internal/amd64/ggen.go
deleted file mode 100644
index 65cf694..0000000
--- a/src/cmd/compile/internal/amd64/ggen.go
+++ /dev/null
@@ -1,743 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package amd64
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/x86"
-)
-
-func defframe(ptxt *obj.Prog) {
-	var n *gc.Node
-
-	// fill in argument size, stack size
-	ptxt.To.Type = obj.TYPE_TEXTSIZE
-
-	ptxt.To.Val = int32(gc.Rnd(gc.Curfn.Type.Argwid, int64(gc.Widthptr)))
-	frame := uint32(gc.Rnd(gc.Stksize+gc.Maxarg, int64(gc.Widthreg)))
-	ptxt.To.Offset = int64(frame)
-
-	// insert code to zero ambiguously live variables
-	// so that the garbage collector only sees initialized values
-	// when it looks for pointers.
-	p := ptxt
-
-	hi := int64(0)
-	lo := hi
-	ax := uint32(0)
-
-	// iterate through declarations - they are sorted in decreasing xoffset order.
-	for l := gc.Curfn.Func.Dcl; l != nil; l = l.Next {
-		n = l.N
-		if !n.Name.Needzero {
-			continue
-		}
-		if n.Class != gc.PAUTO {
-			gc.Fatal("needzero class %d", n.Class)
-		}
-		if n.Type.Width%int64(gc.Widthptr) != 0 || n.Xoffset%int64(gc.Widthptr) != 0 || n.Type.Width == 0 {
-			gc.Fatal("var %v has size %d offset %d", gc.Nconv(n, obj.FmtLong), int(n.Type.Width), int(n.Xoffset))
-		}
-
-		if lo != hi && n.Xoffset+n.Type.Width >= lo-int64(2*gc.Widthreg) {
-			// merge with range we already have
-			lo = n.Xoffset
-
-			continue
-		}
-
-		// zero old range
-		p = zerorange(p, int64(frame), lo, hi, &ax)
-
-		// set new range
-		hi = n.Xoffset + n.Type.Width
-
-		lo = n.Xoffset
-	}
-
-	// zero final range
-	zerorange(p, int64(frame), lo, hi, &ax)
-}
-
-// DUFFZERO consists of repeated blocks of 4 MOVs + ADD,
-// with 4 STOSQs at the very end.
-// The trailing STOSQs prevent the need for a DI preadjustment
-// for small numbers of words to clear.
-// See runtime/mkduff.go.
-const (
-	dzBlocks    = 31 // number of MOV/ADD blocks
-	dzBlockLen  = 4  // number of clears per block
-	dzBlockSize = 19 // size of instructions in a single block
-	dzMovSize   = 4  // size of single MOV instruction w/ offset
-	dzAddSize   = 4  // size of single ADD instruction
-	dzDIStep    = 8  // number of bytes cleared by each MOV instruction
-
-	dzTailLen  = 4 // number of final STOSQ instructions
-	dzTailSize = 2 // size of single STOSQ instruction
-
-	dzSize = dzBlocks*dzBlockSize + dzTailLen*dzTailSize // total size of DUFFZERO routine
-)
-
-// duffzeroDI returns the pre-adjustment to DI for a call to DUFFZERO.
-// q is the number of words to zero.
-func dzDI(q int64) int64 {
-	if q < dzTailLen {
-		return 0
-	}
-	q -= dzTailLen
-	if q%dzBlockLen == 0 {
-		return 0
-	}
-	return -dzDIStep * (dzBlockLen - q%dzBlockLen)
-}
-
-// dzOff returns the offset for a jump into DUFFZERO.
-// q is the number of words to zero.
-func dzOff(q int64) int64 {
-	off := int64(dzSize)
-	if q < dzTailLen {
-		return off - q*dzTailSize
-	}
-	off -= dzTailLen * dzTailSize
-	q -= dzTailLen
-	blocks, steps := q/dzBlockLen, q%dzBlockLen
-	off -= dzBlockSize * blocks
-	if steps > 0 {
-		off -= dzAddSize + dzMovSize*steps
-	}
-	return off
-}
-
-func zerorange(p *obj.Prog, frame int64, lo int64, hi int64, ax *uint32) *obj.Prog {
-	cnt := hi - lo
-	if cnt == 0 {
-		return p
-	}
-	if *ax == 0 {
-		p = appendpp(p, x86.AMOVQ, obj.TYPE_CONST, 0, 0, obj.TYPE_REG, x86.REG_AX, 0)
-		*ax = 1
-	}
-
-	if cnt%int64(gc.Widthreg) != 0 {
-		// should only happen with nacl
-		if cnt%int64(gc.Widthptr) != 0 {
-			gc.Fatal("zerorange count not a multiple of widthptr %d", cnt)
-		}
-		p = appendpp(p, x86.AMOVL, obj.TYPE_REG, x86.REG_AX, 0, obj.TYPE_MEM, x86.REG_SP, frame+lo)
-		lo += int64(gc.Widthptr)
-		cnt -= int64(gc.Widthptr)
-	}
-
-	if cnt <= int64(4*gc.Widthreg) {
-		for i := int64(0); i < cnt; i += int64(gc.Widthreg) {
-			p = appendpp(p, x86.AMOVQ, obj.TYPE_REG, x86.REG_AX, 0, obj.TYPE_MEM, x86.REG_SP, frame+lo+i)
-		}
-	} else if !gc.Nacl && (cnt <= int64(128*gc.Widthreg)) {
-		q := cnt / int64(gc.Widthreg)
-		p = appendpp(p, leaptr, obj.TYPE_MEM, x86.REG_SP, frame+lo+dzDI(q), obj.TYPE_REG, x86.REG_DI, 0)
-		p = appendpp(p, obj.ADUFFZERO, obj.TYPE_NONE, 0, 0, obj.TYPE_ADDR, 0, dzOff(q))
-		p.To.Sym = gc.Linksym(gc.Pkglookup("duffzero", gc.Runtimepkg))
-	} else {
-		p = appendpp(p, x86.AMOVQ, obj.TYPE_CONST, 0, cnt/int64(gc.Widthreg), obj.TYPE_REG, x86.REG_CX, 0)
-		p = appendpp(p, leaptr, obj.TYPE_MEM, x86.REG_SP, frame+lo, obj.TYPE_REG, x86.REG_DI, 0)
-		p = appendpp(p, x86.AREP, obj.TYPE_NONE, 0, 0, obj.TYPE_NONE, 0, 0)
-		p = appendpp(p, x86.ASTOSQ, obj.TYPE_NONE, 0, 0, obj.TYPE_NONE, 0, 0)
-	}
-
-	return p
-}
-
-func appendpp(p *obj.Prog, as int, ftype int, freg int, foffset int64, ttype int, treg int, toffset int64) *obj.Prog {
-	q := gc.Ctxt.NewProg()
-	gc.Clearp(q)
-	q.As = int16(as)
-	q.Lineno = p.Lineno
-	q.From.Type = int16(ftype)
-	q.From.Reg = int16(freg)
-	q.From.Offset = foffset
-	q.To.Type = int16(ttype)
-	q.To.Reg = int16(treg)
-	q.To.Offset = toffset
-	q.Link = p.Link
-	p.Link = q
-	return q
-}
-
-var panicdiv *gc.Node
-
-/*
- * generate division.
- * generates one of:
- *	res = nl / nr
- *	res = nl % nr
- * according to op.
- */
-func dodiv(op int, nl *gc.Node, nr *gc.Node, res *gc.Node) {
-	// Have to be careful about handling
-	// most negative int divided by -1 correctly.
-	// The hardware will trap.
-	// Also the byte divide instruction needs AH,
-	// which we otherwise don't have to deal with.
-	// Easiest way to avoid for int8, int16: use int32.
-	// For int32 and int64, use explicit test.
-	// Could use int64 hw for int32.
-	t := nl.Type
-
-	t0 := t
-	check := 0
-	if gc.Issigned[t.Etype] {
-		check = 1
-		if gc.Isconst(nl, gc.CTINT) && nl.Int() != -(1<<uint64(t.Width*8-1)) {
-			check = 0
-		} else if gc.Isconst(nr, gc.CTINT) && nr.Int() != -1 {
-			check = 0
-		}
-	}
-
-	if t.Width < 4 {
-		if gc.Issigned[t.Etype] {
-			t = gc.Types[gc.TINT32]
-		} else {
-			t = gc.Types[gc.TUINT32]
-		}
-		check = 0
-	}
-
-	a := optoas(op, t)
-
-	var n3 gc.Node
-	gc.Regalloc(&n3, t0, nil)
-	var ax gc.Node
-	var oldax gc.Node
-	if nl.Ullman >= nr.Ullman {
-		savex(x86.REG_AX, &ax, &oldax, res, t0)
-		gc.Cgen(nl, &ax)
-		gc.Regalloc(&ax, t0, &ax) // mark ax live during cgen
-		gc.Cgen(nr, &n3)
-		gc.Regfree(&ax)
-	} else {
-		gc.Cgen(nr, &n3)
-		savex(x86.REG_AX, &ax, &oldax, res, t0)
-		gc.Cgen(nl, &ax)
-	}
-
-	if t != t0 {
-		// Convert
-		ax1 := ax
-
-		n31 := n3
-		ax.Type = t
-		n3.Type = t
-		gmove(&ax1, &ax)
-		gmove(&n31, &n3)
-	}
-
-	var n4 gc.Node
-	if gc.Nacl {
-		// Native Client does not relay the divide-by-zero trap
-		// to the executing program, so we must insert a check
-		// for ourselves.
-		gc.Nodconst(&n4, t, 0)
-
-		gins(optoas(gc.OCMP, t), &n3, &n4)
-		p1 := gc.Gbranch(optoas(gc.ONE, t), nil, +1)
-		if panicdiv == nil {
-			panicdiv = gc.Sysfunc("panicdivide")
-		}
-		gc.Ginscall(panicdiv, -1)
-		gc.Patch(p1, gc.Pc)
-	}
-
-	var p2 *obj.Prog
-	if check != 0 {
-		gc.Nodconst(&n4, t, -1)
-		gins(optoas(gc.OCMP, t), &n3, &n4)
-		p1 := gc.Gbranch(optoas(gc.ONE, t), nil, +1)
-		if op == gc.ODIV {
-			// a / (-1) is -a.
-			gins(optoas(gc.OMINUS, t), nil, &ax)
-
-			gmove(&ax, res)
-		} else {
-			// a % (-1) is 0.
-			gc.Nodconst(&n4, t, 0)
-
-			gmove(&n4, res)
-		}
-
-		p2 = gc.Gbranch(obj.AJMP, nil, 0)
-		gc.Patch(p1, gc.Pc)
-	}
-
-	var olddx gc.Node
-	var dx gc.Node
-	savex(x86.REG_DX, &dx, &olddx, res, t)
-	if !gc.Issigned[t.Etype] {
-		gc.Nodconst(&n4, t, 0)
-		gmove(&n4, &dx)
-	} else {
-		gins(optoas(gc.OEXTEND, t), nil, nil)
-	}
-	gins(a, &n3, nil)
-	gc.Regfree(&n3)
-	if op == gc.ODIV {
-		gmove(&ax, res)
-	} else {
-		gmove(&dx, res)
-	}
-	restx(&dx, &olddx)
-	if check != 0 {
-		gc.Patch(p2, gc.Pc)
-	}
-	restx(&ax, &oldax)
-}
-
-/*
- * register dr is one of the special ones (AX, CX, DI, SI, etc.).
- * we need to use it.  if it is already allocated as a temporary
- * (r > 1; can only happen if a routine like sgen passed a
- * special as cgen's res and then cgen used regalloc to reuse
- * it as its own temporary), then move it for now to another
- * register.  caller must call restx to move it back.
- * the move is not necessary if dr == res, because res is
- * known to be dead.
- */
-func savex(dr int, x *gc.Node, oldx *gc.Node, res *gc.Node, t *gc.Type) {
-	r := uint8(gc.GetReg(dr))
-
-	// save current ax and dx if they are live
-	// and not the destination
-	*oldx = gc.Node{}
-
-	gc.Nodreg(x, t, dr)
-	if r > 1 && !gc.Samereg(x, res) {
-		gc.Regalloc(oldx, gc.Types[gc.TINT64], nil)
-		x.Type = gc.Types[gc.TINT64]
-		gmove(x, oldx)
-		x.Type = t
-		oldx.Etype = r // squirrel away old r value
-		gc.SetReg(dr, 1)
-	}
-}
-
-func restx(x *gc.Node, oldx *gc.Node) {
-	if oldx.Op != 0 {
-		x.Type = gc.Types[gc.TINT64]
-		gc.SetReg(int(x.Reg), int(oldx.Etype))
-		gmove(oldx, x)
-		gc.Regfree(oldx)
-	}
-}
-
-/*
- * generate high multiply:
- *   res = (nl*nr) >> width
- */
-func cgen_hmul(nl *gc.Node, nr *gc.Node, res *gc.Node) {
-	t := nl.Type
-	a := optoas(gc.OHMUL, t)
-	if nl.Ullman < nr.Ullman {
-		tmp := nl
-		nl = nr
-		nr = tmp
-	}
-
-	var n1 gc.Node
-	gc.Cgenr(nl, &n1, res)
-	var n2 gc.Node
-	gc.Cgenr(nr, &n2, nil)
-	var ax gc.Node
-	gc.Nodreg(&ax, t, x86.REG_AX)
-	gmove(&n1, &ax)
-	gins(a, &n2, nil)
-	gc.Regfree(&n2)
-	gc.Regfree(&n1)
-
-	var dx gc.Node
-	if t.Width == 1 {
-		// byte multiply behaves differently.
-		gc.Nodreg(&ax, t, x86.REG_AH)
-
-		gc.Nodreg(&dx, t, x86.REG_DX)
-		gmove(&ax, &dx)
-	}
-
-	gc.Nodreg(&dx, t, x86.REG_DX)
-	gmove(&dx, res)
-}
-
-/*
- * generate shift according to op, one of:
- *	res = nl << nr
- *	res = nl >> nr
- */
-func cgen_shift(op int, bounded bool, nl *gc.Node, nr *gc.Node, res *gc.Node) {
-	a := optoas(op, nl.Type)
-
-	if nr.Op == gc.OLITERAL {
-		var n1 gc.Node
-		gc.Regalloc(&n1, nl.Type, res)
-		gc.Cgen(nl, &n1)
-		sc := uint64(nr.Int())
-		if sc >= uint64(nl.Type.Width*8) {
-			// large shift gets 2 shifts by width-1
-			var n3 gc.Node
-			gc.Nodconst(&n3, gc.Types[gc.TUINT32], nl.Type.Width*8-1)
-
-			gins(a, &n3, &n1)
-			gins(a, &n3, &n1)
-		} else {
-			gins(a, nr, &n1)
-		}
-		gmove(&n1, res)
-		gc.Regfree(&n1)
-		return
-	}
-
-	if nl.Ullman >= gc.UINF {
-		var n4 gc.Node
-		gc.Tempname(&n4, nl.Type)
-		gc.Cgen(nl, &n4)
-		nl = &n4
-	}
-
-	if nr.Ullman >= gc.UINF {
-		var n5 gc.Node
-		gc.Tempname(&n5, nr.Type)
-		gc.Cgen(nr, &n5)
-		nr = &n5
-	}
-
-	rcx := gc.GetReg(x86.REG_CX)
-	var n1 gc.Node
-	gc.Nodreg(&n1, gc.Types[gc.TUINT32], x86.REG_CX)
-
-	// Allow either uint32 or uint64 as shift type,
-	// to avoid unnecessary conversion from uint32 to uint64
-	// just to do the comparison.
-	tcount := gc.Types[gc.Simtype[nr.Type.Etype]]
-
-	if tcount.Etype < gc.TUINT32 {
-		tcount = gc.Types[gc.TUINT32]
-	}
-
-	gc.Regalloc(&n1, nr.Type, &n1) // to hold the shift type in CX
-	var n3 gc.Node
-	gc.Regalloc(&n3, tcount, &n1) // to clear high bits of CX
-
-	var cx gc.Node
-	gc.Nodreg(&cx, gc.Types[gc.TUINT64], x86.REG_CX)
-
-	var oldcx gc.Node
-	if rcx > 0 && !gc.Samereg(&cx, res) {
-		gc.Regalloc(&oldcx, gc.Types[gc.TUINT64], nil)
-		gmove(&cx, &oldcx)
-	}
-
-	cx.Type = tcount
-
-	var n2 gc.Node
-	if gc.Samereg(&cx, res) {
-		gc.Regalloc(&n2, nl.Type, nil)
-	} else {
-		gc.Regalloc(&n2, nl.Type, res)
-	}
-	if nl.Ullman >= nr.Ullman {
-		gc.Cgen(nl, &n2)
-		gc.Cgen(nr, &n1)
-		gmove(&n1, &n3)
-	} else {
-		gc.Cgen(nr, &n1)
-		gmove(&n1, &n3)
-		gc.Cgen(nl, &n2)
-	}
-
-	gc.Regfree(&n3)
-
-	// test and fix up large shifts
-	if !bounded {
-		gc.Nodconst(&n3, tcount, nl.Type.Width*8)
-		gins(optoas(gc.OCMP, tcount), &n1, &n3)
-		p1 := gc.Gbranch(optoas(gc.OLT, tcount), nil, +1)
-		if op == gc.ORSH && gc.Issigned[nl.Type.Etype] {
-			gc.Nodconst(&n3, gc.Types[gc.TUINT32], nl.Type.Width*8-1)
-			gins(a, &n3, &n2)
-		} else {
-			gc.Nodconst(&n3, nl.Type, 0)
-			gmove(&n3, &n2)
-		}
-
-		gc.Patch(p1, gc.Pc)
-	}
-
-	gins(a, &n1, &n2)
-
-	if oldcx.Op != 0 {
-		cx.Type = gc.Types[gc.TUINT64]
-		gmove(&oldcx, &cx)
-		gc.Regfree(&oldcx)
-	}
-
-	gmove(&n2, res)
-
-	gc.Regfree(&n1)
-	gc.Regfree(&n2)
-}
-
-/*
- * generate byte multiply:
- *	res = nl * nr
- * there is no 2-operand byte multiply instruction so
- * we do a full-width multiplication and truncate afterwards.
- */
-func cgen_bmul(op int, nl *gc.Node, nr *gc.Node, res *gc.Node) bool {
-	if optoas(op, nl.Type) != x86.AIMULB {
-		return false
-	}
-
-	// largest ullman on left.
-	if nl.Ullman < nr.Ullman {
-		tmp := nl
-		nl = nr
-		nr = tmp
-	}
-
-	// generate operands in "8-bit" registers.
-	var n1b gc.Node
-	gc.Regalloc(&n1b, nl.Type, res)
-
-	gc.Cgen(nl, &n1b)
-	var n2b gc.Node
-	gc.Regalloc(&n2b, nr.Type, nil)
-	gc.Cgen(nr, &n2b)
-
-	// perform full-width multiplication.
-	t := gc.Types[gc.TUINT64]
-
-	if gc.Issigned[nl.Type.Etype] {
-		t = gc.Types[gc.TINT64]
-	}
-	var n1 gc.Node
-	gc.Nodreg(&n1, t, int(n1b.Reg))
-	var n2 gc.Node
-	gc.Nodreg(&n2, t, int(n2b.Reg))
-	a := optoas(op, t)
-	gins(a, &n2, &n1)
-
-	// truncate.
-	gmove(&n1, res)
-
-	gc.Regfree(&n1b)
-	gc.Regfree(&n2b)
-	return true
-}
-
-func clearfat(nl *gc.Node) {
-	/* clear a fat object */
-	if gc.Debug['g'] != 0 {
-		gc.Dump("\nclearfat", nl)
-	}
-
-	w := nl.Type.Width
-
-	// Avoid taking the address for simple enough types.
-	if gc.Componentgen(nil, nl) {
-		return
-	}
-
-	c := w % 8 // bytes
-	q := w / 8 // quads
-
-	if q < 4 {
-		// Write sequence of MOV 0, off(base) instead of using STOSQ.
-		// The hope is that although the code will be slightly longer,
-		// the MOVs will have no dependencies and pipeline better
-		// than the unrolled STOSQ loop.
-		// NOTE: Must use agen, not igen, so that optimizer sees address
-		// being taken. We are not writing on field boundaries.
-		var n1 gc.Node
-		gc.Agenr(nl, &n1, nil)
-
-		n1.Op = gc.OINDREG
-		var z gc.Node
-		gc.Nodconst(&z, gc.Types[gc.TUINT64], 0)
-		for {
-			tmp14 := q
-			q--
-			if tmp14 <= 0 {
-				break
-			}
-			n1.Type = z.Type
-			gins(x86.AMOVQ, &z, &n1)
-			n1.Xoffset += 8
-		}
-
-		if c >= 4 {
-			gc.Nodconst(&z, gc.Types[gc.TUINT32], 0)
-			n1.Type = z.Type
-			gins(x86.AMOVL, &z, &n1)
-			n1.Xoffset += 4
-			c -= 4
-		}
-
-		gc.Nodconst(&z, gc.Types[gc.TUINT8], 0)
-		for {
-			tmp15 := c
-			c--
-			if tmp15 <= 0 {
-				break
-			}
-			n1.Type = z.Type
-			gins(x86.AMOVB, &z, &n1)
-			n1.Xoffset++
-		}
-
-		gc.Regfree(&n1)
-		return
-	}
-
-	var oldn1 gc.Node
-	var n1 gc.Node
-	savex(x86.REG_DI, &n1, &oldn1, nil, gc.Types[gc.Tptr])
-	gc.Agen(nl, &n1)
-
-	var ax gc.Node
-	var oldax gc.Node
-	savex(x86.REG_AX, &ax, &oldax, nil, gc.Types[gc.Tptr])
-	gconreg(x86.AMOVL, 0, x86.REG_AX)
-
-	if q > 128 || gc.Nacl {
-		gconreg(movptr, q, x86.REG_CX)
-		gins(x86.AREP, nil, nil)   // repeat
-		gins(x86.ASTOSQ, nil, nil) // STOQ AL,*(DI)+
-	} else {
-		if di := dzDI(q); di != 0 {
-			gconreg(addptr, di, x86.REG_DI)
-		}
-		p := gins(obj.ADUFFZERO, nil, nil)
-		p.To.Type = obj.TYPE_ADDR
-		p.To.Sym = gc.Linksym(gc.Pkglookup("duffzero", gc.Runtimepkg))
-		p.To.Offset = dzOff(q)
-	}
-
-	z := ax
-	di := n1
-	if w >= 8 && c >= 4 {
-		di.Op = gc.OINDREG
-		z.Type = gc.Types[gc.TINT64]
-		di.Type = z.Type
-		p := gins(x86.AMOVQ, &z, &di)
-		p.To.Scale = 1
-		p.To.Offset = c - 8
-	} else if c >= 4 {
-		di.Op = gc.OINDREG
-		z.Type = gc.Types[gc.TINT32]
-		di.Type = z.Type
-		gins(x86.AMOVL, &z, &di)
-		if c > 4 {
-			p := gins(x86.AMOVL, &z, &di)
-			p.To.Scale = 1
-			p.To.Offset = c - 4
-		}
-	} else {
-		for c > 0 {
-			gins(x86.ASTOSB, nil, nil) // STOB AL,*(DI)+
-			c--
-		}
-	}
-
-	restx(&n1, &oldn1)
-	restx(&ax, &oldax)
-}
-
-// Called after regopt and peep have run.
-// Expand CHECKNIL pseudo-op into actual nil pointer check.
-func expandchecks(firstp *obj.Prog) {
-	var p1 *obj.Prog
-	var p2 *obj.Prog
-
-	for p := firstp; p != nil; p = p.Link {
-		if p.As != obj.ACHECKNIL {
-			continue
-		}
-		if gc.Debug_checknil != 0 && p.Lineno > 1 { // p->lineno==1 in generated wrappers
-			gc.Warnl(int(p.Lineno), "generated nil check")
-		}
-
-		// check is
-		//	CMP arg, $0
-		//	JNE 2(PC) (likely)
-		//	MOV AX, 0
-		p1 = gc.Ctxt.NewProg()
-
-		p2 = gc.Ctxt.NewProg()
-		gc.Clearp(p1)
-		gc.Clearp(p2)
-		p1.Link = p2
-		p2.Link = p.Link
-		p.Link = p1
-		p1.Lineno = p.Lineno
-		p2.Lineno = p.Lineno
-		p1.Pc = 9999
-		p2.Pc = 9999
-		p.As = int16(cmpptr)
-		p.To.Type = obj.TYPE_CONST
-		p.To.Offset = 0
-		p1.As = x86.AJNE
-		p1.From.Type = obj.TYPE_CONST
-		p1.From.Offset = 1 // likely
-		p1.To.Type = obj.TYPE_BRANCH
-		p1.To.Val = p2.Link
-
-		// crash by write to memory address 0.
-		// if possible, since we know arg is 0, use 0(arg),
-		// which will be shorter to encode than plain 0.
-		p2.As = x86.AMOVL
-
-		p2.From.Type = obj.TYPE_REG
-		p2.From.Reg = x86.REG_AX
-		if regtyp(&p.From) {
-			p2.To.Type = obj.TYPE_MEM
-			p2.To.Reg = p.From.Reg
-		} else {
-			p2.To.Type = obj.TYPE_MEM
-			p2.To.Reg = x86.REG_NONE
-		}
-
-		p2.To.Offset = 0
-	}
-}
-
-// addr += index*width if possible.
-func addindex(index *gc.Node, width int64, addr *gc.Node) bool {
-	switch width {
-	case 1, 2, 4, 8:
-		p1 := gins(x86.ALEAQ, index, addr)
-		p1.From.Type = obj.TYPE_MEM
-		p1.From.Scale = int16(width)
-		p1.From.Index = p1.From.Reg
-		p1.From.Reg = p1.To.Reg
-		return true
-	}
-	return false
-}
-
-// res = runtime.getg()
-func getg(res *gc.Node) {
-	var n1 gc.Node
-	gc.Regalloc(&n1, res.Type, res)
-	mov := optoas(gc.OAS, gc.Types[gc.Tptr])
-	p := gins(mov, nil, &n1)
-	p.From.Type = obj.TYPE_REG
-	p.From.Reg = x86.REG_TLS
-	p = gins(mov, nil, &n1)
-	p.From = p.To
-	p.From.Type = obj.TYPE_MEM
-	p.From.Index = x86.REG_TLS
-	p.From.Scale = 1
-	gmove(&n1, res)
-	gc.Regfree(&n1)
-}
diff --git a/src/cmd/compile/internal/amd64/gsubr.go b/src/cmd/compile/internal/amd64/gsubr.go
deleted file mode 100644
index a8e4170..0000000
--- a/src/cmd/compile/internal/amd64/gsubr.go
+++ /dev/null
@@ -1,1380 +0,0 @@
-// Derived from Inferno utils/6c/txt.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6c/txt.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package amd64
-
-import (
-	"cmd/compile/internal/big"
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/x86"
-	"fmt"
-)
-
-var resvd = []int{
-	x86.REG_DI, // for movstring
-	x86.REG_SI, // for movstring
-
-	x86.REG_AX, // for divide
-	x86.REG_CX, // for shift
-	x86.REG_DX, // for divide
-	x86.REG_SP, // for stack
-}
-
-/*
- * generate
- *	as $c, reg
- */
-func gconreg(as int, c int64, reg int) {
-	var nr gc.Node
-
-	switch as {
-	case x86.AADDL,
-		x86.AMOVL,
-		x86.ALEAL:
-		gc.Nodreg(&nr, gc.Types[gc.TINT32], reg)
-
-	default:
-		gc.Nodreg(&nr, gc.Types[gc.TINT64], reg)
-	}
-
-	ginscon(as, c, &nr)
-}
-
-/*
- * generate
- *	as $c, n
- */
-func ginscon(as int, c int64, n2 *gc.Node) {
-	var n1 gc.Node
-
-	switch as {
-	case x86.AADDL,
-		x86.AMOVL,
-		x86.ALEAL:
-		gc.Nodconst(&n1, gc.Types[gc.TINT32], c)
-
-	default:
-		gc.Nodconst(&n1, gc.Types[gc.TINT64], c)
-	}
-
-	if as != x86.AMOVQ && (c < -(1<<31) || c >= 1<<31) {
-		// cannot have 64-bit immediate in ADD, etc.
-		// instead, MOV into register first.
-		var ntmp gc.Node
-		gc.Regalloc(&ntmp, gc.Types[gc.TINT64], nil)
-
-		gins(x86.AMOVQ, &n1, &ntmp)
-		gins(as, &ntmp, n2)
-		gc.Regfree(&ntmp)
-		return
-	}
-
-	gins(as, &n1, n2)
-}
-
-func ginscmp(op int, t *gc.Type, n1, n2 *gc.Node, likely int) *obj.Prog {
-	if gc.Isint[t.Etype] && n1.Op == gc.OLITERAL && gc.Smallintconst(n1) && n2.Op != gc.OLITERAL {
-		// Reverse comparison to place constant last.
-		op = gc.Brrev(op)
-		n1, n2 = n2, n1
-	}
-	// General case.
-	var r1, r2, g1, g2 gc.Node
-	if n1.Op == gc.ONAME && n1.Class&gc.PHEAP == 0 || n1.Op == gc.OINDREG {
-		r1 = *n1
-	} else {
-		gc.Regalloc(&r1, t, n1)
-		gc.Regalloc(&g1, n1.Type, &r1)
-		gc.Cgen(n1, &g1)
-		gmove(&g1, &r1)
-	}
-	if n2.Op == gc.OLITERAL && gc.Isint[t.Etype] && gc.Smallintconst(n2) {
-		r2 = *n2
-	} else {
-		gc.Regalloc(&r2, t, n2)
-		gc.Regalloc(&g2, n1.Type, &r2)
-		gc.Cgen(n2, &g2)
-		gmove(&g2, &r2)
-	}
-	gins(optoas(gc.OCMP, t), &r1, &r2)
-	if r1.Op == gc.OREGISTER {
-		gc.Regfree(&g1)
-		gc.Regfree(&r1)
-	}
-	if r2.Op == gc.OREGISTER {
-		gc.Regfree(&g2)
-		gc.Regfree(&r2)
-	}
-	return gc.Gbranch(optoas(op, t), nil, likely)
-}
-
-func ginsboolval(a int, n *gc.Node) {
-	gins(jmptoset(a), nil, n)
-}
-
-// set up nodes representing 2^63
-var (
-	bigi         gc.Node
-	bigf         gc.Node
-	bignodes_did bool
-)
-
-func bignodes() {
-	if bignodes_did {
-		return
-	}
-	bignodes_did = true
-
-	var i big.Int
-	i.SetInt64(1)
-	i.Lsh(&i, 63)
-
-	gc.Nodconst(&bigi, gc.Types[gc.TUINT64], 0)
-	bigi.SetBigInt(&i)
-
-	bigi.Convconst(&bigf, gc.Types[gc.TFLOAT64])
-}
-
-/*
- * generate move:
- *	t = f
- * hard part is conversions.
- */
-func gmove(f *gc.Node, t *gc.Node) {
-	if gc.Debug['M'] != 0 {
-		fmt.Printf("gmove %v -> %v\n", gc.Nconv(f, obj.FmtLong), gc.Nconv(t, obj.FmtLong))
-	}
-
-	ft := gc.Simsimtype(f.Type)
-	tt := gc.Simsimtype(t.Type)
-	cvt := t.Type
-
-	if gc.Iscomplex[ft] || gc.Iscomplex[tt] {
-		gc.Complexmove(f, t)
-		return
-	}
-
-	// cannot have two memory operands
-	var a int
-	if gc.Ismem(f) && gc.Ismem(t) {
-		goto hard
-	}
-
-	// convert constant to desired type
-	if f.Op == gc.OLITERAL {
-		var con gc.Node
-		f.Convconst(&con, t.Type)
-		f = &con
-		ft = tt // so big switch will choose a simple mov
-
-		// some constants can't move directly to memory.
-		if gc.Ismem(t) {
-			// float constants come from memory.
-			if gc.Isfloat[tt] {
-				goto hard
-			}
-
-			// 64-bit immediates are really 32-bit sign-extended
-			// unless moving into a register.
-			if gc.Isint[tt] {
-				if i := con.Int(); int64(int32(i)) != i {
-					goto hard
-				}
-			}
-		}
-	}
-
-	// value -> value copy, only one memory operand.
-	// figure out the instruction to use.
-	// break out of switch for one-instruction gins.
-	// goto rdst for "destination must be register".
-	// goto hard for "convert to cvt type first".
-	// otherwise handle and return.
-
-	switch uint32(ft)<<16 | uint32(tt) {
-	default:
-		gc.Fatal("gmove %v -> %v", gc.Tconv(f.Type, obj.FmtLong), gc.Tconv(t.Type, obj.FmtLong))
-
-		/*
-		 * integer copy and truncate
-		 */
-	case gc.TINT8<<16 | gc.TINT8, // same size
-		gc.TINT8<<16 | gc.TUINT8,
-		gc.TUINT8<<16 | gc.TINT8,
-		gc.TUINT8<<16 | gc.TUINT8,
-		gc.TINT16<<16 | gc.TINT8,
-		// truncate
-		gc.TUINT16<<16 | gc.TINT8,
-		gc.TINT32<<16 | gc.TINT8,
-		gc.TUINT32<<16 | gc.TINT8,
-		gc.TINT64<<16 | gc.TINT8,
-		gc.TUINT64<<16 | gc.TINT8,
-		gc.TINT16<<16 | gc.TUINT8,
-		gc.TUINT16<<16 | gc.TUINT8,
-		gc.TINT32<<16 | gc.TUINT8,
-		gc.TUINT32<<16 | gc.TUINT8,
-		gc.TINT64<<16 | gc.TUINT8,
-		gc.TUINT64<<16 | gc.TUINT8:
-		a = x86.AMOVB
-
-	case gc.TINT16<<16 | gc.TINT16, // same size
-		gc.TINT16<<16 | gc.TUINT16,
-		gc.TUINT16<<16 | gc.TINT16,
-		gc.TUINT16<<16 | gc.TUINT16,
-		gc.TINT32<<16 | gc.TINT16,
-		// truncate
-		gc.TUINT32<<16 | gc.TINT16,
-		gc.TINT64<<16 | gc.TINT16,
-		gc.TUINT64<<16 | gc.TINT16,
-		gc.TINT32<<16 | gc.TUINT16,
-		gc.TUINT32<<16 | gc.TUINT16,
-		gc.TINT64<<16 | gc.TUINT16,
-		gc.TUINT64<<16 | gc.TUINT16:
-		a = x86.AMOVW
-
-	case gc.TINT32<<16 | gc.TINT32, // same size
-		gc.TINT32<<16 | gc.TUINT32,
-		gc.TUINT32<<16 | gc.TINT32,
-		gc.TUINT32<<16 | gc.TUINT32:
-		a = x86.AMOVL
-
-	case gc.TINT64<<16 | gc.TINT32, // truncate
-		gc.TUINT64<<16 | gc.TINT32,
-		gc.TINT64<<16 | gc.TUINT32,
-		gc.TUINT64<<16 | gc.TUINT32:
-		a = x86.AMOVQL
-
-	case gc.TINT64<<16 | gc.TINT64, // same size
-		gc.TINT64<<16 | gc.TUINT64,
-		gc.TUINT64<<16 | gc.TINT64,
-		gc.TUINT64<<16 | gc.TUINT64:
-		a = x86.AMOVQ
-
-		/*
-		 * integer up-conversions
-		 */
-	case gc.TINT8<<16 | gc.TINT16, // sign extend int8
-		gc.TINT8<<16 | gc.TUINT16:
-		a = x86.AMOVBWSX
-
-		goto rdst
-
-	case gc.TINT8<<16 | gc.TINT32,
-		gc.TINT8<<16 | gc.TUINT32:
-		a = x86.AMOVBLSX
-		goto rdst
-
-	case gc.TINT8<<16 | gc.TINT64,
-		gc.TINT8<<16 | gc.TUINT64:
-		a = x86.AMOVBQSX
-		goto rdst
-
-	case gc.TUINT8<<16 | gc.TINT16, // zero extend uint8
-		gc.TUINT8<<16 | gc.TUINT16:
-		a = x86.AMOVBWZX
-
-		goto rdst
-
-	case gc.TUINT8<<16 | gc.TINT32,
-		gc.TUINT8<<16 | gc.TUINT32:
-		a = x86.AMOVBLZX
-		goto rdst
-
-	case gc.TUINT8<<16 | gc.TINT64,
-		gc.TUINT8<<16 | gc.TUINT64:
-		a = x86.AMOVBQZX
-		goto rdst
-
-	case gc.TINT16<<16 | gc.TINT32, // sign extend int16
-		gc.TINT16<<16 | gc.TUINT32:
-		a = x86.AMOVWLSX
-
-		goto rdst
-
-	case gc.TINT16<<16 | gc.TINT64,
-		gc.TINT16<<16 | gc.TUINT64:
-		a = x86.AMOVWQSX
-		goto rdst
-
-	case gc.TUINT16<<16 | gc.TINT32, // zero extend uint16
-		gc.TUINT16<<16 | gc.TUINT32:
-		a = x86.AMOVWLZX
-
-		goto rdst
-
-	case gc.TUINT16<<16 | gc.TINT64,
-		gc.TUINT16<<16 | gc.TUINT64:
-		a = x86.AMOVWQZX
-		goto rdst
-
-	case gc.TINT32<<16 | gc.TINT64, // sign extend int32
-		gc.TINT32<<16 | gc.TUINT64:
-		a = x86.AMOVLQSX
-
-		goto rdst
-
-		// AMOVL into a register zeros the top of the register,
-	// so this is not always necessary, but if we rely on AMOVL
-	// the optimizer is almost certain to screw with us.
-	case gc.TUINT32<<16 | gc.TINT64, // zero extend uint32
-		gc.TUINT32<<16 | gc.TUINT64:
-		a = x86.AMOVLQZX
-
-		goto rdst
-
-		/*
-		* float to integer
-		 */
-	case gc.TFLOAT32<<16 | gc.TINT32:
-		a = x86.ACVTTSS2SL
-
-		goto rdst
-
-	case gc.TFLOAT64<<16 | gc.TINT32:
-		a = x86.ACVTTSD2SL
-		goto rdst
-
-	case gc.TFLOAT32<<16 | gc.TINT64:
-		a = x86.ACVTTSS2SQ
-		goto rdst
-
-	case gc.TFLOAT64<<16 | gc.TINT64:
-		a = x86.ACVTTSD2SQ
-		goto rdst
-
-		// convert via int32.
-	case gc.TFLOAT32<<16 | gc.TINT16,
-		gc.TFLOAT32<<16 | gc.TINT8,
-		gc.TFLOAT32<<16 | gc.TUINT16,
-		gc.TFLOAT32<<16 | gc.TUINT8,
-		gc.TFLOAT64<<16 | gc.TINT16,
-		gc.TFLOAT64<<16 | gc.TINT8,
-		gc.TFLOAT64<<16 | gc.TUINT16,
-		gc.TFLOAT64<<16 | gc.TUINT8:
-		cvt = gc.Types[gc.TINT32]
-
-		goto hard
-
-		// convert via int64.
-	case gc.TFLOAT32<<16 | gc.TUINT32,
-		gc.TFLOAT64<<16 | gc.TUINT32:
-		cvt = gc.Types[gc.TINT64]
-
-		goto hard
-
-		// algorithm is:
-	//	if small enough, use native float64 -> int64 conversion.
-	//	otherwise, subtract 2^63, convert, and add it back.
-	case gc.TFLOAT32<<16 | gc.TUINT64,
-		gc.TFLOAT64<<16 | gc.TUINT64:
-		a := x86.ACVTTSS2SQ
-
-		if ft == gc.TFLOAT64 {
-			a = x86.ACVTTSD2SQ
-		}
-		bignodes()
-		var r1 gc.Node
-		gc.Regalloc(&r1, gc.Types[ft], nil)
-		var r2 gc.Node
-		gc.Regalloc(&r2, gc.Types[tt], t)
-		var r3 gc.Node
-		gc.Regalloc(&r3, gc.Types[ft], nil)
-		var r4 gc.Node
-		gc.Regalloc(&r4, gc.Types[tt], nil)
-		gins(optoas(gc.OAS, f.Type), f, &r1)
-		gins(optoas(gc.OCMP, f.Type), &bigf, &r1)
-		p1 := gc.Gbranch(optoas(gc.OLE, f.Type), nil, +1)
-		gins(a, &r1, &r2)
-		p2 := gc.Gbranch(obj.AJMP, nil, 0)
-		gc.Patch(p1, gc.Pc)
-		gins(optoas(gc.OAS, f.Type), &bigf, &r3)
-		gins(optoas(gc.OSUB, f.Type), &r3, &r1)
-		gins(a, &r1, &r2)
-		gins(x86.AMOVQ, &bigi, &r4)
-		gins(x86.AXORQ, &r4, &r2)
-		gc.Patch(p2, gc.Pc)
-		gmove(&r2, t)
-		gc.Regfree(&r4)
-		gc.Regfree(&r3)
-		gc.Regfree(&r2)
-		gc.Regfree(&r1)
-		return
-
-		/*
-		 * integer to float
-		 */
-	case gc.TINT32<<16 | gc.TFLOAT32:
-		a = x86.ACVTSL2SS
-
-		goto rdst
-
-	case gc.TINT32<<16 | gc.TFLOAT64:
-		a = x86.ACVTSL2SD
-		goto rdst
-
-	case gc.TINT64<<16 | gc.TFLOAT32:
-		a = x86.ACVTSQ2SS
-		goto rdst
-
-	case gc.TINT64<<16 | gc.TFLOAT64:
-		a = x86.ACVTSQ2SD
-		goto rdst
-
-		// convert via int32
-	case gc.TINT16<<16 | gc.TFLOAT32,
-		gc.TINT16<<16 | gc.TFLOAT64,
-		gc.TINT8<<16 | gc.TFLOAT32,
-		gc.TINT8<<16 | gc.TFLOAT64,
-		gc.TUINT16<<16 | gc.TFLOAT32,
-		gc.TUINT16<<16 | gc.TFLOAT64,
-		gc.TUINT8<<16 | gc.TFLOAT32,
-		gc.TUINT8<<16 | gc.TFLOAT64:
-		cvt = gc.Types[gc.TINT32]
-
-		goto hard
-
-		// convert via int64.
-	case gc.TUINT32<<16 | gc.TFLOAT32,
-		gc.TUINT32<<16 | gc.TFLOAT64:
-		cvt = gc.Types[gc.TINT64]
-
-		goto hard
-
-		// algorithm is:
-	//	if small enough, use native int64 -> uint64 conversion.
-	//	otherwise, halve (rounding to odd?), convert, and double.
-	case gc.TUINT64<<16 | gc.TFLOAT32,
-		gc.TUINT64<<16 | gc.TFLOAT64:
-		a := x86.ACVTSQ2SS
-
-		if tt == gc.TFLOAT64 {
-			a = x86.ACVTSQ2SD
-		}
-		var zero gc.Node
-		gc.Nodconst(&zero, gc.Types[gc.TUINT64], 0)
-		var one gc.Node
-		gc.Nodconst(&one, gc.Types[gc.TUINT64], 1)
-		var r1 gc.Node
-		gc.Regalloc(&r1, f.Type, f)
-		var r2 gc.Node
-		gc.Regalloc(&r2, t.Type, t)
-		var r3 gc.Node
-		gc.Regalloc(&r3, f.Type, nil)
-		var r4 gc.Node
-		gc.Regalloc(&r4, f.Type, nil)
-		gmove(f, &r1)
-		gins(x86.ACMPQ, &r1, &zero)
-		p1 := gc.Gbranch(x86.AJLT, nil, +1)
-		gins(a, &r1, &r2)
-		p2 := gc.Gbranch(obj.AJMP, nil, 0)
-		gc.Patch(p1, gc.Pc)
-		gmove(&r1, &r3)
-		gins(x86.ASHRQ, &one, &r3)
-		gmove(&r1, &r4)
-		gins(x86.AANDL, &one, &r4)
-		gins(x86.AORQ, &r4, &r3)
-		gins(a, &r3, &r2)
-		gins(optoas(gc.OADD, t.Type), &r2, &r2)
-		gc.Patch(p2, gc.Pc)
-		gmove(&r2, t)
-		gc.Regfree(&r4)
-		gc.Regfree(&r3)
-		gc.Regfree(&r2)
-		gc.Regfree(&r1)
-		return
-
-		/*
-		 * float to float
-		 */
-	case gc.TFLOAT32<<16 | gc.TFLOAT32:
-		a = x86.AMOVSS
-
-	case gc.TFLOAT64<<16 | gc.TFLOAT64:
-		a = x86.AMOVSD
-
-	case gc.TFLOAT32<<16 | gc.TFLOAT64:
-		a = x86.ACVTSS2SD
-		goto rdst
-
-	case gc.TFLOAT64<<16 | gc.TFLOAT32:
-		a = x86.ACVTSD2SS
-		goto rdst
-	}
-
-	gins(a, f, t)
-	return
-
-	// requires register destination
-rdst:
-	{
-		var r1 gc.Node
-		gc.Regalloc(&r1, t.Type, t)
-
-		gins(a, f, &r1)
-		gmove(&r1, t)
-		gc.Regfree(&r1)
-		return
-	}
-
-	// requires register intermediate
-hard:
-	var r1 gc.Node
-	gc.Regalloc(&r1, cvt, t)
-
-	gmove(f, &r1)
-	gmove(&r1, t)
-	gc.Regfree(&r1)
-	return
-}
-
-func samaddr(f *gc.Node, t *gc.Node) bool {
-	if f.Op != t.Op {
-		return false
-	}
-
-	switch f.Op {
-	case gc.OREGISTER:
-		if f.Reg != t.Reg {
-			break
-		}
-		return true
-	}
-
-	return false
-}
-
-/*
- * generate one instruction:
- *	as f, t
- */
-func gins(as int, f *gc.Node, t *gc.Node) *obj.Prog {
-	//	Node nod;
-
-	//	if(f != N && f->op == OINDEX) {
-	//		gc.Regalloc(&nod, &regnode, Z);
-	//		v = constnode.vconst;
-	//		gc.Cgen(f->right, &nod);
-	//		constnode.vconst = v;
-	//		idx.reg = nod.reg;
-	//		gc.Regfree(&nod);
-	//	}
-	//	if(t != N && t->op == OINDEX) {
-	//		gc.Regalloc(&nod, &regnode, Z);
-	//		v = constnode.vconst;
-	//		gc.Cgen(t->right, &nod);
-	//		constnode.vconst = v;
-	//		idx.reg = nod.reg;
-	//		gc.Regfree(&nod);
-	//	}
-
-	if f != nil && f.Op == gc.OADDR && (as == x86.AMOVL || as == x86.AMOVQ) {
-		// Turn MOVL $xxx into LEAL xxx.
-		// These should be equivalent but most of the backend
-		// only expects to see LEAL, because that's what we had
-		// historically generated. Various hidden assumptions are baked in by now.
-		if as == x86.AMOVL {
-			as = x86.ALEAL
-		} else {
-			as = x86.ALEAQ
-		}
-		f = f.Left
-	}
-
-	switch as {
-	case x86.AMOVB,
-		x86.AMOVW,
-		x86.AMOVL,
-		x86.AMOVQ,
-		x86.AMOVSS,
-		x86.AMOVSD:
-		if f != nil && t != nil && samaddr(f, t) {
-			return nil
-		}
-
-	case x86.ALEAQ:
-		if f != nil && gc.Isconst(f, gc.CTNIL) {
-			gc.Fatal("gins LEAQ nil %v", f.Type)
-		}
-	}
-
-	p := gc.Prog(as)
-	gc.Naddr(&p.From, f)
-	gc.Naddr(&p.To, t)
-
-	if gc.Debug['g'] != 0 {
-		fmt.Printf("%v\n", p)
-	}
-
-	w := int32(0)
-	switch as {
-	case x86.AMOVB:
-		w = 1
-
-	case x86.AMOVW:
-		w = 2
-
-	case x86.AMOVL:
-		w = 4
-
-	case x86.AMOVQ:
-		w = 8
-	}
-
-	if w != 0 && ((f != nil && p.From.Width < int64(w)) || (t != nil && p.To.Width > int64(w))) {
-		gc.Dump("f", f)
-		gc.Dump("t", t)
-		gc.Fatal("bad width: %v (%d, %d)\n", p, p.From.Width, p.To.Width)
-	}
-
-	if p.To.Type == obj.TYPE_ADDR && w > 0 {
-		gc.Fatal("bad use of addr: %v", p)
-	}
-
-	return p
-}
-
-func ginsnop() {
-	// This is actually not the x86 NOP anymore,
-	// but at the point where it gets used, AX is dead
-	// so it's okay if we lose the high bits.
-	var reg gc.Node
-	gc.Nodreg(&reg, gc.Types[gc.TINT], x86.REG_AX)
-	gins(x86.AXCHGL, &reg, &reg)
-}
-
-/*
- * return Axxx for Oxxx on type t.
- */
-func optoas(op int, t *gc.Type) int {
-	if t == nil {
-		gc.Fatal("optoas: t is nil")
-	}
-
-	a := obj.AXXX
-	switch uint32(op)<<16 | uint32(gc.Simtype[t.Etype]) {
-	default:
-		gc.Fatal("optoas: no entry %v-%v", gc.Oconv(int(op), 0), t)
-
-	case gc.OADDR<<16 | gc.TPTR32:
-		a = x86.ALEAL
-
-	case gc.OADDR<<16 | gc.TPTR64:
-		a = x86.ALEAQ
-
-	case gc.OEQ<<16 | gc.TBOOL,
-		gc.OEQ<<16 | gc.TINT8,
-		gc.OEQ<<16 | gc.TUINT8,
-		gc.OEQ<<16 | gc.TINT16,
-		gc.OEQ<<16 | gc.TUINT16,
-		gc.OEQ<<16 | gc.TINT32,
-		gc.OEQ<<16 | gc.TUINT32,
-		gc.OEQ<<16 | gc.TINT64,
-		gc.OEQ<<16 | gc.TUINT64,
-		gc.OEQ<<16 | gc.TPTR32,
-		gc.OEQ<<16 | gc.TPTR64,
-		gc.OEQ<<16 | gc.TFLOAT32,
-		gc.OEQ<<16 | gc.TFLOAT64:
-		a = x86.AJEQ
-
-	case gc.ONE<<16 | gc.TBOOL,
-		gc.ONE<<16 | gc.TINT8,
-		gc.ONE<<16 | gc.TUINT8,
-		gc.ONE<<16 | gc.TINT16,
-		gc.ONE<<16 | gc.TUINT16,
-		gc.ONE<<16 | gc.TINT32,
-		gc.ONE<<16 | gc.TUINT32,
-		gc.ONE<<16 | gc.TINT64,
-		gc.ONE<<16 | gc.TUINT64,
-		gc.ONE<<16 | gc.TPTR32,
-		gc.ONE<<16 | gc.TPTR64,
-		gc.ONE<<16 | gc.TFLOAT32,
-		gc.ONE<<16 | gc.TFLOAT64:
-		a = x86.AJNE
-
-	case gc.OPS<<16 | gc.TBOOL,
-		gc.OPS<<16 | gc.TINT8,
-		gc.OPS<<16 | gc.TUINT8,
-		gc.OPS<<16 | gc.TINT16,
-		gc.OPS<<16 | gc.TUINT16,
-		gc.OPS<<16 | gc.TINT32,
-		gc.OPS<<16 | gc.TUINT32,
-		gc.OPS<<16 | gc.TINT64,
-		gc.OPS<<16 | gc.TUINT64,
-		gc.OPS<<16 | gc.TPTR32,
-		gc.OPS<<16 | gc.TPTR64,
-		gc.OPS<<16 | gc.TFLOAT32,
-		gc.OPS<<16 | gc.TFLOAT64:
-		a = x86.AJPS
-
-	case gc.OPC<<16 | gc.TBOOL,
-		gc.OPC<<16 | gc.TINT8,
-		gc.OPC<<16 | gc.TUINT8,
-		gc.OPC<<16 | gc.TINT16,
-		gc.OPC<<16 | gc.TUINT16,
-		gc.OPC<<16 | gc.TINT32,
-		gc.OPC<<16 | gc.TUINT32,
-		gc.OPC<<16 | gc.TINT64,
-		gc.OPC<<16 | gc.TUINT64,
-		gc.OPC<<16 | gc.TPTR32,
-		gc.OPC<<16 | gc.TPTR64,
-		gc.OPC<<16 | gc.TFLOAT32,
-		gc.OPC<<16 | gc.TFLOAT64:
-		a = x86.AJPC
-
-	case gc.OLT<<16 | gc.TINT8,
-		gc.OLT<<16 | gc.TINT16,
-		gc.OLT<<16 | gc.TINT32,
-		gc.OLT<<16 | gc.TINT64:
-		a = x86.AJLT
-
-	case gc.OLT<<16 | gc.TUINT8,
-		gc.OLT<<16 | gc.TUINT16,
-		gc.OLT<<16 | gc.TUINT32,
-		gc.OLT<<16 | gc.TUINT64:
-		a = x86.AJCS
-
-	case gc.OLE<<16 | gc.TINT8,
-		gc.OLE<<16 | gc.TINT16,
-		gc.OLE<<16 | gc.TINT32,
-		gc.OLE<<16 | gc.TINT64:
-		a = x86.AJLE
-
-	case gc.OLE<<16 | gc.TUINT8,
-		gc.OLE<<16 | gc.TUINT16,
-		gc.OLE<<16 | gc.TUINT32,
-		gc.OLE<<16 | gc.TUINT64:
-		a = x86.AJLS
-
-	case gc.OGT<<16 | gc.TINT8,
-		gc.OGT<<16 | gc.TINT16,
-		gc.OGT<<16 | gc.TINT32,
-		gc.OGT<<16 | gc.TINT64:
-		a = x86.AJGT
-
-	case gc.OGT<<16 | gc.TUINT8,
-		gc.OGT<<16 | gc.TUINT16,
-		gc.OGT<<16 | gc.TUINT32,
-		gc.OGT<<16 | gc.TUINT64,
-		gc.OLT<<16 | gc.TFLOAT32,
-		gc.OLT<<16 | gc.TFLOAT64:
-		a = x86.AJHI
-
-	case gc.OGE<<16 | gc.TINT8,
-		gc.OGE<<16 | gc.TINT16,
-		gc.OGE<<16 | gc.TINT32,
-		gc.OGE<<16 | gc.TINT64:
-		a = x86.AJGE
-
-	case gc.OGE<<16 | gc.TUINT8,
-		gc.OGE<<16 | gc.TUINT16,
-		gc.OGE<<16 | gc.TUINT32,
-		gc.OGE<<16 | gc.TUINT64,
-		gc.OLE<<16 | gc.TFLOAT32,
-		gc.OLE<<16 | gc.TFLOAT64:
-		a = x86.AJCC
-
-	case gc.OCMP<<16 | gc.TBOOL,
-		gc.OCMP<<16 | gc.TINT8,
-		gc.OCMP<<16 | gc.TUINT8:
-		a = x86.ACMPB
-
-	case gc.OCMP<<16 | gc.TINT16,
-		gc.OCMP<<16 | gc.TUINT16:
-		a = x86.ACMPW
-
-	case gc.OCMP<<16 | gc.TINT32,
-		gc.OCMP<<16 | gc.TUINT32,
-		gc.OCMP<<16 | gc.TPTR32:
-		a = x86.ACMPL
-
-	case gc.OCMP<<16 | gc.TINT64,
-		gc.OCMP<<16 | gc.TUINT64,
-		gc.OCMP<<16 | gc.TPTR64:
-		a = x86.ACMPQ
-
-	case gc.OCMP<<16 | gc.TFLOAT32:
-		a = x86.AUCOMISS
-
-	case gc.OCMP<<16 | gc.TFLOAT64:
-		a = x86.AUCOMISD
-
-	case gc.OAS<<16 | gc.TBOOL,
-		gc.OAS<<16 | gc.TINT8,
-		gc.OAS<<16 | gc.TUINT8:
-		a = x86.AMOVB
-
-	case gc.OAS<<16 | gc.TINT16,
-		gc.OAS<<16 | gc.TUINT16:
-		a = x86.AMOVW
-
-	case gc.OAS<<16 | gc.TINT32,
-		gc.OAS<<16 | gc.TUINT32,
-		gc.OAS<<16 | gc.TPTR32:
-		a = x86.AMOVL
-
-	case gc.OAS<<16 | gc.TINT64,
-		gc.OAS<<16 | gc.TUINT64,
-		gc.OAS<<16 | gc.TPTR64:
-		a = x86.AMOVQ
-
-	case gc.OAS<<16 | gc.TFLOAT32:
-		a = x86.AMOVSS
-
-	case gc.OAS<<16 | gc.TFLOAT64:
-		a = x86.AMOVSD
-
-	case gc.OADD<<16 | gc.TINT8,
-		gc.OADD<<16 | gc.TUINT8:
-		a = x86.AADDB
-
-	case gc.OADD<<16 | gc.TINT16,
-		gc.OADD<<16 | gc.TUINT16:
-		a = x86.AADDW
-
-	case gc.OADD<<16 | gc.TINT32,
-		gc.OADD<<16 | gc.TUINT32,
-		gc.OADD<<16 | gc.TPTR32:
-		a = x86.AADDL
-
-	case gc.OADD<<16 | gc.TINT64,
-		gc.OADD<<16 | gc.TUINT64,
-		gc.OADD<<16 | gc.TPTR64:
-		a = x86.AADDQ
-
-	case gc.OADD<<16 | gc.TFLOAT32:
-		a = x86.AADDSS
-
-	case gc.OADD<<16 | gc.TFLOAT64:
-		a = x86.AADDSD
-
-	case gc.OSUB<<16 | gc.TINT8,
-		gc.OSUB<<16 | gc.TUINT8:
-		a = x86.ASUBB
-
-	case gc.OSUB<<16 | gc.TINT16,
-		gc.OSUB<<16 | gc.TUINT16:
-		a = x86.ASUBW
-
-	case gc.OSUB<<16 | gc.TINT32,
-		gc.OSUB<<16 | gc.TUINT32,
-		gc.OSUB<<16 | gc.TPTR32:
-		a = x86.ASUBL
-
-	case gc.OSUB<<16 | gc.TINT64,
-		gc.OSUB<<16 | gc.TUINT64,
-		gc.OSUB<<16 | gc.TPTR64:
-		a = x86.ASUBQ
-
-	case gc.OSUB<<16 | gc.TFLOAT32:
-		a = x86.ASUBSS
-
-	case gc.OSUB<<16 | gc.TFLOAT64:
-		a = x86.ASUBSD
-
-	case gc.OINC<<16 | gc.TINT8,
-		gc.OINC<<16 | gc.TUINT8:
-		a = x86.AINCB
-
-	case gc.OINC<<16 | gc.TINT16,
-		gc.OINC<<16 | gc.TUINT16:
-		a = x86.AINCW
-
-	case gc.OINC<<16 | gc.TINT32,
-		gc.OINC<<16 | gc.TUINT32,
-		gc.OINC<<16 | gc.TPTR32:
-		a = x86.AINCL
-
-	case gc.OINC<<16 | gc.TINT64,
-		gc.OINC<<16 | gc.TUINT64,
-		gc.OINC<<16 | gc.TPTR64:
-		a = x86.AINCQ
-
-	case gc.ODEC<<16 | gc.TINT8,
-		gc.ODEC<<16 | gc.TUINT8:
-		a = x86.ADECB
-
-	case gc.ODEC<<16 | gc.TINT16,
-		gc.ODEC<<16 | gc.TUINT16:
-		a = x86.ADECW
-
-	case gc.ODEC<<16 | gc.TINT32,
-		gc.ODEC<<16 | gc.TUINT32,
-		gc.ODEC<<16 | gc.TPTR32:
-		a = x86.ADECL
-
-	case gc.ODEC<<16 | gc.TINT64,
-		gc.ODEC<<16 | gc.TUINT64,
-		gc.ODEC<<16 | gc.TPTR64:
-		a = x86.ADECQ
-
-	case gc.OMINUS<<16 | gc.TINT8,
-		gc.OMINUS<<16 | gc.TUINT8:
-		a = x86.ANEGB
-
-	case gc.OMINUS<<16 | gc.TINT16,
-		gc.OMINUS<<16 | gc.TUINT16:
-		a = x86.ANEGW
-
-	case gc.OMINUS<<16 | gc.TINT32,
-		gc.OMINUS<<16 | gc.TUINT32,
-		gc.OMINUS<<16 | gc.TPTR32:
-		a = x86.ANEGL
-
-	case gc.OMINUS<<16 | gc.TINT64,
-		gc.OMINUS<<16 | gc.TUINT64,
-		gc.OMINUS<<16 | gc.TPTR64:
-		a = x86.ANEGQ
-
-	case gc.OAND<<16 | gc.TBOOL,
-		gc.OAND<<16 | gc.TINT8,
-		gc.OAND<<16 | gc.TUINT8:
-		a = x86.AANDB
-
-	case gc.OAND<<16 | gc.TINT16,
-		gc.OAND<<16 | gc.TUINT16:
-		a = x86.AANDW
-
-	case gc.OAND<<16 | gc.TINT32,
-		gc.OAND<<16 | gc.TUINT32,
-		gc.OAND<<16 | gc.TPTR32:
-		a = x86.AANDL
-
-	case gc.OAND<<16 | gc.TINT64,
-		gc.OAND<<16 | gc.TUINT64,
-		gc.OAND<<16 | gc.TPTR64:
-		a = x86.AANDQ
-
-	case gc.OOR<<16 | gc.TBOOL,
-		gc.OOR<<16 | gc.TINT8,
-		gc.OOR<<16 | gc.TUINT8:
-		a = x86.AORB
-
-	case gc.OOR<<16 | gc.TINT16,
-		gc.OOR<<16 | gc.TUINT16:
-		a = x86.AORW
-
-	case gc.OOR<<16 | gc.TINT32,
-		gc.OOR<<16 | gc.TUINT32,
-		gc.OOR<<16 | gc.TPTR32:
-		a = x86.AORL
-
-	case gc.OOR<<16 | gc.TINT64,
-		gc.OOR<<16 | gc.TUINT64,
-		gc.OOR<<16 | gc.TPTR64:
-		a = x86.AORQ
-
-	case gc.OXOR<<16 | gc.TINT8,
-		gc.OXOR<<16 | gc.TUINT8:
-		a = x86.AXORB
-
-	case gc.OXOR<<16 | gc.TINT16,
-		gc.OXOR<<16 | gc.TUINT16:
-		a = x86.AXORW
-
-	case gc.OXOR<<16 | gc.TINT32,
-		gc.OXOR<<16 | gc.TUINT32,
-		gc.OXOR<<16 | gc.TPTR32:
-		a = x86.AXORL
-
-	case gc.OXOR<<16 | gc.TINT64,
-		gc.OXOR<<16 | gc.TUINT64,
-		gc.OXOR<<16 | gc.TPTR64:
-		a = x86.AXORQ
-
-	case gc.OLROT<<16 | gc.TINT8,
-		gc.OLROT<<16 | gc.TUINT8:
-		a = x86.AROLB
-
-	case gc.OLROT<<16 | gc.TINT16,
-		gc.OLROT<<16 | gc.TUINT16:
-		a = x86.AROLW
-
-	case gc.OLROT<<16 | gc.TINT32,
-		gc.OLROT<<16 | gc.TUINT32,
-		gc.OLROT<<16 | gc.TPTR32:
-		a = x86.AROLL
-
-	case gc.OLROT<<16 | gc.TINT64,
-		gc.OLROT<<16 | gc.TUINT64,
-		gc.OLROT<<16 | gc.TPTR64:
-		a = x86.AROLQ
-
-	case gc.OLSH<<16 | gc.TINT8,
-		gc.OLSH<<16 | gc.TUINT8:
-		a = x86.ASHLB
-
-	case gc.OLSH<<16 | gc.TINT16,
-		gc.OLSH<<16 | gc.TUINT16:
-		a = x86.ASHLW
-
-	case gc.OLSH<<16 | gc.TINT32,
-		gc.OLSH<<16 | gc.TUINT32,
-		gc.OLSH<<16 | gc.TPTR32:
-		a = x86.ASHLL
-
-	case gc.OLSH<<16 | gc.TINT64,
-		gc.OLSH<<16 | gc.TUINT64,
-		gc.OLSH<<16 | gc.TPTR64:
-		a = x86.ASHLQ
-
-	case gc.ORSH<<16 | gc.TUINT8:
-		a = x86.ASHRB
-
-	case gc.ORSH<<16 | gc.TUINT16:
-		a = x86.ASHRW
-
-	case gc.ORSH<<16 | gc.TUINT32,
-		gc.ORSH<<16 | gc.TPTR32:
-		a = x86.ASHRL
-
-	case gc.ORSH<<16 | gc.TUINT64,
-		gc.ORSH<<16 | gc.TPTR64:
-		a = x86.ASHRQ
-
-	case gc.ORSH<<16 | gc.TINT8:
-		a = x86.ASARB
-
-	case gc.ORSH<<16 | gc.TINT16:
-		a = x86.ASARW
-
-	case gc.ORSH<<16 | gc.TINT32:
-		a = x86.ASARL
-
-	case gc.ORSH<<16 | gc.TINT64:
-		a = x86.ASARQ
-
-	case gc.ORROTC<<16 | gc.TINT8,
-		gc.ORROTC<<16 | gc.TUINT8:
-		a = x86.ARCRB
-
-	case gc.ORROTC<<16 | gc.TINT16,
-		gc.ORROTC<<16 | gc.TUINT16:
-		a = x86.ARCRW
-
-	case gc.ORROTC<<16 | gc.TINT32,
-		gc.ORROTC<<16 | gc.TUINT32:
-		a = x86.ARCRL
-
-	case gc.ORROTC<<16 | gc.TINT64,
-		gc.ORROTC<<16 | gc.TUINT64:
-		a = x86.ARCRQ
-
-	case gc.OHMUL<<16 | gc.TINT8,
-		gc.OMUL<<16 | gc.TINT8,
-		gc.OMUL<<16 | gc.TUINT8:
-		a = x86.AIMULB
-
-	case gc.OHMUL<<16 | gc.TINT16,
-		gc.OMUL<<16 | gc.TINT16,
-		gc.OMUL<<16 | gc.TUINT16:
-		a = x86.AIMULW
-
-	case gc.OHMUL<<16 | gc.TINT32,
-		gc.OMUL<<16 | gc.TINT32,
-		gc.OMUL<<16 | gc.TUINT32,
-		gc.OMUL<<16 | gc.TPTR32:
-		a = x86.AIMULL
-
-	case gc.OHMUL<<16 | gc.TINT64,
-		gc.OMUL<<16 | gc.TINT64,
-		gc.OMUL<<16 | gc.TUINT64,
-		gc.OMUL<<16 | gc.TPTR64:
-		a = x86.AIMULQ
-
-	case gc.OHMUL<<16 | gc.TUINT8:
-		a = x86.AMULB
-
-	case gc.OHMUL<<16 | gc.TUINT16:
-		a = x86.AMULW
-
-	case gc.OHMUL<<16 | gc.TUINT32,
-		gc.OHMUL<<16 | gc.TPTR32:
-		a = x86.AMULL
-
-	case gc.OHMUL<<16 | gc.TUINT64,
-		gc.OHMUL<<16 | gc.TPTR64:
-		a = x86.AMULQ
-
-	case gc.OMUL<<16 | gc.TFLOAT32:
-		a = x86.AMULSS
-
-	case gc.OMUL<<16 | gc.TFLOAT64:
-		a = x86.AMULSD
-
-	case gc.ODIV<<16 | gc.TINT8,
-		gc.OMOD<<16 | gc.TINT8:
-		a = x86.AIDIVB
-
-	case gc.ODIV<<16 | gc.TUINT8,
-		gc.OMOD<<16 | gc.TUINT8:
-		a = x86.ADIVB
-
-	case gc.ODIV<<16 | gc.TINT16,
-		gc.OMOD<<16 | gc.TINT16:
-		a = x86.AIDIVW
-
-	case gc.ODIV<<16 | gc.TUINT16,
-		gc.OMOD<<16 | gc.TUINT16:
-		a = x86.ADIVW
-
-	case gc.ODIV<<16 | gc.TINT32,
-		gc.OMOD<<16 | gc.TINT32:
-		a = x86.AIDIVL
-
-	case gc.ODIV<<16 | gc.TUINT32,
-		gc.ODIV<<16 | gc.TPTR32,
-		gc.OMOD<<16 | gc.TUINT32,
-		gc.OMOD<<16 | gc.TPTR32:
-		a = x86.ADIVL
-
-	case gc.ODIV<<16 | gc.TINT64,
-		gc.OMOD<<16 | gc.TINT64:
-		a = x86.AIDIVQ
-
-	case gc.ODIV<<16 | gc.TUINT64,
-		gc.ODIV<<16 | gc.TPTR64,
-		gc.OMOD<<16 | gc.TUINT64,
-		gc.OMOD<<16 | gc.TPTR64:
-		a = x86.ADIVQ
-
-	case gc.OEXTEND<<16 | gc.TINT16:
-		a = x86.ACWD
-
-	case gc.OEXTEND<<16 | gc.TINT32:
-		a = x86.ACDQ
-
-	case gc.OEXTEND<<16 | gc.TINT64:
-		a = x86.ACQO
-
-	case gc.ODIV<<16 | gc.TFLOAT32:
-		a = x86.ADIVSS
-
-	case gc.ODIV<<16 | gc.TFLOAT64:
-		a = x86.ADIVSD
-
-	case gc.OSQRT<<16 | gc.TFLOAT64:
-		a = x86.ASQRTSD
-	}
-
-	return a
-}
-
-// jmptoset returns ASETxx for AJxx.
-func jmptoset(jmp int) int {
-	switch jmp {
-	case x86.AJEQ:
-		return x86.ASETEQ
-	case x86.AJNE:
-		return x86.ASETNE
-	case x86.AJLT:
-		return x86.ASETLT
-	case x86.AJCS:
-		return x86.ASETCS
-	case x86.AJLE:
-		return x86.ASETLE
-	case x86.AJLS:
-		return x86.ASETLS
-	case x86.AJGT:
-		return x86.ASETGT
-	case x86.AJHI:
-		return x86.ASETHI
-	case x86.AJGE:
-		return x86.ASETGE
-	case x86.AJCC:
-		return x86.ASETCC
-	case x86.AJMI:
-		return x86.ASETMI
-	case x86.AJOC:
-		return x86.ASETOC
-	case x86.AJOS:
-		return x86.ASETOS
-	case x86.AJPC:
-		return x86.ASETPC
-	case x86.AJPL:
-		return x86.ASETPL
-	case x86.AJPS:
-		return x86.ASETPS
-	}
-	gc.Fatal("jmptoset: no entry for %v", gc.Oconv(jmp, 0))
-	panic("unreachable")
-}
-
-const (
-	ODynam   = 1 << 0
-	OAddable = 1 << 1
-)
-
-var clean [20]gc.Node
-
-var cleani int = 0
-
-func sudoclean() {
-	if clean[cleani-1].Op != gc.OEMPTY {
-		gc.Regfree(&clean[cleani-1])
-	}
-	if clean[cleani-2].Op != gc.OEMPTY {
-		gc.Regfree(&clean[cleani-2])
-	}
-	cleani -= 2
-}
-
-/*
- * generate code to compute address of n,
- * a reference to a (perhaps nested) field inside
- * an array or struct.
- * return 0 on failure, 1 on success.
- * on success, leaves usable address in a.
- *
- * caller is responsible for calling sudoclean
- * after successful sudoaddable,
- * to release the register used for a.
- */
-func sudoaddable(as int, n *gc.Node, a *obj.Addr) bool {
-	if n.Type == nil {
-		return false
-	}
-
-	*a = obj.Addr{}
-
-	switch n.Op {
-	case gc.OLITERAL:
-		if !gc.Isconst(n, gc.CTINT) {
-			break
-		}
-		v := n.Int()
-		if v >= 32000 || v <= -32000 {
-			break
-		}
-		switch as {
-		default:
-			return false
-
-		case x86.AADDB,
-			x86.AADDW,
-			x86.AADDL,
-			x86.AADDQ,
-			x86.ASUBB,
-			x86.ASUBW,
-			x86.ASUBL,
-			x86.ASUBQ,
-			x86.AANDB,
-			x86.AANDW,
-			x86.AANDL,
-			x86.AANDQ,
-			x86.AORB,
-			x86.AORW,
-			x86.AORL,
-			x86.AORQ,
-			x86.AXORB,
-			x86.AXORW,
-			x86.AXORL,
-			x86.AXORQ,
-			x86.AINCB,
-			x86.AINCW,
-			x86.AINCL,
-			x86.AINCQ,
-			x86.ADECB,
-			x86.ADECW,
-			x86.ADECL,
-			x86.ADECQ,
-			x86.AMOVB,
-			x86.AMOVW,
-			x86.AMOVL,
-			x86.AMOVQ:
-			break
-		}
-
-		cleani += 2
-		reg := &clean[cleani-1]
-		reg1 := &clean[cleani-2]
-		reg.Op = gc.OEMPTY
-		reg1.Op = gc.OEMPTY
-		gc.Naddr(a, n)
-		return true
-
-	case gc.ODOT,
-		gc.ODOTPTR:
-		cleani += 2
-		reg := &clean[cleani-1]
-		reg1 := &clean[cleani-2]
-		reg.Op = gc.OEMPTY
-		reg1.Op = gc.OEMPTY
-		var nn *gc.Node
-		var oary [10]int64
-		o := gc.Dotoffset(n, oary[:], &nn)
-		if nn == nil {
-			sudoclean()
-			return false
-		}
-
-		if nn.Addable && o == 1 && oary[0] >= 0 {
-			// directly addressable set of DOTs
-			n1 := *nn
-
-			n1.Type = n.Type
-			n1.Xoffset += oary[0]
-			gc.Naddr(a, &n1)
-			return true
-		}
-
-		gc.Regalloc(reg, gc.Types[gc.Tptr], nil)
-		n1 := *reg
-		n1.Op = gc.OINDREG
-		if oary[0] >= 0 {
-			gc.Agen(nn, reg)
-			n1.Xoffset = oary[0]
-		} else {
-			gc.Cgen(nn, reg)
-			gc.Cgen_checknil(reg)
-			n1.Xoffset = -(oary[0] + 1)
-		}
-
-		for i := 1; i < o; i++ {
-			if oary[i] >= 0 {
-				gc.Fatal("can't happen")
-			}
-			gins(movptr, &n1, reg)
-			gc.Cgen_checknil(reg)
-			n1.Xoffset = -(oary[i] + 1)
-		}
-
-		a.Type = obj.TYPE_NONE
-		a.Index = obj.TYPE_NONE
-		gc.Fixlargeoffset(&n1)
-		gc.Naddr(a, &n1)
-		return true
-
-	case gc.OINDEX:
-		return false
-	}
-
-	return false
-}
diff --git a/src/cmd/compile/internal/amd64/peep.go b/src/cmd/compile/internal/amd64/peep.go
deleted file mode 100644
index 19db68e..0000000
--- a/src/cmd/compile/internal/amd64/peep.go
+++ /dev/null
@@ -1,1038 +0,0 @@
-// Derived from Inferno utils/6c/peep.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6c/peep.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package amd64
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/x86"
-	"fmt"
-)
-
-var gactive uint32
-
-const (
-	exregoffset = x86.REG_R15
-)
-
-// do we need the carry bit
-func needc(p *obj.Prog) bool {
-	for p != nil {
-		flags := progcarryflags(p)
-		if flags&gc.UseCarry != 0 {
-			return true
-		}
-		if flags&(gc.SetCarry|gc.KillCarry) != 0 {
-			return false
-		}
-		p = p.Link
-	}
-
-	return false
-}
-
-func rnops(r *gc.Flow) *gc.Flow {
-	if r != nil {
-		var p *obj.Prog
-		var r1 *gc.Flow
-		for {
-			p = r.Prog
-			if p.As != obj.ANOP || p.From.Type != obj.TYPE_NONE || p.To.Type != obj.TYPE_NONE {
-				break
-			}
-			r1 = gc.Uniqs(r)
-			if r1 == nil {
-				break
-			}
-			r = r1
-		}
-	}
-
-	return r
-}
-
-func peep(firstp *obj.Prog) {
-	g := (*gc.Graph)(gc.Flowstart(firstp, nil))
-	if g == nil {
-		return
-	}
-	gactive = 0
-
-	// byte, word arithmetic elimination.
-	elimshortmov(g)
-
-	// constant propagation
-	// find MOV $con,R followed by
-	// another MOV $con,R without
-	// setting R in the interim
-	var p *obj.Prog
-	for r := (*gc.Flow)(g.Start); r != nil; r = r.Link {
-		p = r.Prog
-		switch p.As {
-		case x86.ALEAL,
-			x86.ALEAQ:
-			if regtyp(&p.To) {
-				if p.From.Sym != nil {
-					if p.From.Index == x86.REG_NONE {
-						conprop(r)
-					}
-				}
-			}
-
-		case x86.AMOVB,
-			x86.AMOVW,
-			x86.AMOVL,
-			x86.AMOVQ,
-			x86.AMOVSS,
-			x86.AMOVSD:
-			if regtyp(&p.To) {
-				if p.From.Type == obj.TYPE_CONST || p.From.Type == obj.TYPE_FCONST {
-					conprop(r)
-				}
-			}
-		}
-	}
-
-	var r *gc.Flow
-	var r1 *gc.Flow
-	var p1 *obj.Prog
-	var t int
-loop1:
-	if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-		gc.Dumpit("loop1", g.Start, 0)
-	}
-
-	t = 0
-	for r = g.Start; r != nil; r = r.Link {
-		p = r.Prog
-		switch p.As {
-		case x86.AMOVL,
-			x86.AMOVQ,
-			x86.AMOVSS,
-			x86.AMOVSD:
-			if regtyp(&p.To) {
-				if regtyp(&p.From) {
-					if copyprop(g, r) {
-						excise(r)
-						t++
-					} else if subprop(r) && copyprop(g, r) {
-						excise(r)
-						t++
-					}
-				}
-			}
-
-		case x86.AMOVBLZX,
-			x86.AMOVWLZX,
-			x86.AMOVBLSX,
-			x86.AMOVWLSX:
-			if regtyp(&p.To) {
-				r1 = rnops(gc.Uniqs(r))
-				if r1 != nil {
-					p1 = r1.Prog
-					if p.As == p1.As && p.To.Type == p1.From.Type && p.To.Reg == p1.From.Reg {
-						p1.As = x86.AMOVL
-						t++
-					}
-				}
-			}
-
-		case x86.AMOVBQSX,
-			x86.AMOVBQZX,
-			x86.AMOVWQSX,
-			x86.AMOVWQZX,
-			x86.AMOVLQSX,
-			x86.AMOVLQZX,
-			x86.AMOVQL:
-			if regtyp(&p.To) {
-				r1 = rnops(gc.Uniqs(r))
-				if r1 != nil {
-					p1 = r1.Prog
-					if p.As == p1.As && p.To.Type == p1.From.Type && p.To.Reg == p1.From.Reg {
-						p1.As = x86.AMOVQ
-						t++
-					}
-				}
-			}
-
-		case x86.AADDL,
-			x86.AADDQ,
-			x86.AADDW:
-			if p.From.Type != obj.TYPE_CONST || needc(p.Link) {
-				break
-			}
-			if p.From.Offset == -1 {
-				if p.As == x86.AADDQ {
-					p.As = x86.ADECQ
-				} else if p.As == x86.AADDL {
-					p.As = x86.ADECL
-				} else {
-					p.As = x86.ADECW
-				}
-				p.From = obj.Addr{}
-				break
-			}
-
-			if p.From.Offset == 1 {
-				if p.As == x86.AADDQ {
-					p.As = x86.AINCQ
-				} else if p.As == x86.AADDL {
-					p.As = x86.AINCL
-				} else {
-					p.As = x86.AINCW
-				}
-				p.From = obj.Addr{}
-				break
-			}
-
-		case x86.ASUBL,
-			x86.ASUBQ,
-			x86.ASUBW:
-			if p.From.Type != obj.TYPE_CONST || needc(p.Link) {
-				break
-			}
-			if p.From.Offset == -1 {
-				if p.As == x86.ASUBQ {
-					p.As = x86.AINCQ
-				} else if p.As == x86.ASUBL {
-					p.As = x86.AINCL
-				} else {
-					p.As = x86.AINCW
-				}
-				p.From = obj.Addr{}
-				break
-			}
-
-			if p.From.Offset == 1 {
-				if p.As == x86.ASUBQ {
-					p.As = x86.ADECQ
-				} else if p.As == x86.ASUBL {
-					p.As = x86.ADECL
-				} else {
-					p.As = x86.ADECW
-				}
-				p.From = obj.Addr{}
-				break
-			}
-		}
-	}
-
-	if t != 0 {
-		goto loop1
-	}
-
-	// MOVLQZX removal.
-	// The MOVLQZX exists to avoid being confused for a
-	// MOVL that is just copying 32-bit data around during
-	// copyprop.  Now that copyprop is done, remov MOVLQZX R1, R2
-	// if it is dominated by an earlier ADDL/MOVL/etc into R1 that
-	// will have already cleared the high bits.
-	//
-	// MOVSD removal.
-	// We never use packed registers, so a MOVSD between registers
-	// can be replaced by MOVAPD, which moves the pair of float64s
-	// instead of just the lower one.  We only use the lower one, but
-	// the processor can do better if we do moves using both.
-	for r := (*gc.Flow)(g.Start); r != nil; r = r.Link {
-		p = r.Prog
-		if p.As == x86.AMOVLQZX {
-			if regtyp(&p.From) {
-				if p.From.Type == p.To.Type && p.From.Reg == p.To.Reg {
-					if prevl(r, int(p.From.Reg)) {
-						excise(r)
-					}
-				}
-			}
-		}
-
-		if p.As == x86.AMOVSD {
-			if regtyp(&p.From) {
-				if regtyp(&p.To) {
-					p.As = x86.AMOVAPD
-				}
-			}
-		}
-	}
-
-	// load pipelining
-	// push any load from memory as early as possible
-	// to give it time to complete before use.
-	for r := (*gc.Flow)(g.Start); r != nil; r = r.Link {
-		p = r.Prog
-		switch p.As {
-		case x86.AMOVB,
-			x86.AMOVW,
-			x86.AMOVL,
-			x86.AMOVQ,
-			x86.AMOVLQZX:
-			if regtyp(&p.To) && !regconsttyp(&p.From) {
-				pushback(r)
-			}
-		}
-	}
-
-	gc.Flowend(g)
-}
-
-func pushback(r0 *gc.Flow) {
-	var r *gc.Flow
-	var p *obj.Prog
-
-	var b *gc.Flow
-	p0 := (*obj.Prog)(r0.Prog)
-	for r = gc.Uniqp(r0); r != nil && gc.Uniqs(r) != nil; r = gc.Uniqp(r) {
-		p = r.Prog
-		if p.As != obj.ANOP {
-			if !regconsttyp(&p.From) || !regtyp(&p.To) {
-				break
-			}
-			if copyu(p, &p0.To, nil) != 0 || copyu(p0, &p.To, nil) != 0 {
-				break
-			}
-		}
-
-		if p.As == obj.ACALL {
-			break
-		}
-		b = r
-	}
-
-	if b == nil {
-		if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-			fmt.Printf("no pushback: %v\n", r0.Prog)
-			if r != nil {
-				fmt.Printf("\t%v [%v]\n", r.Prog, gc.Uniqs(r) != nil)
-			}
-		}
-
-		return
-	}
-
-	if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-		fmt.Printf("pushback\n")
-		for r := (*gc.Flow)(b); ; r = r.Link {
-			fmt.Printf("\t%v\n", r.Prog)
-			if r == r0 {
-				break
-			}
-		}
-	}
-
-	t := obj.Prog(*r0.Prog)
-	for r = gc.Uniqp(r0); ; r = gc.Uniqp(r) {
-		p0 = r.Link.Prog
-		p = r.Prog
-		p0.As = p.As
-		p0.Lineno = p.Lineno
-		p0.From = p.From
-		p0.To = p.To
-
-		if r == b {
-			break
-		}
-	}
-
-	p0 = r.Prog
-	p0.As = t.As
-	p0.Lineno = t.Lineno
-	p0.From = t.From
-	p0.To = t.To
-
-	if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-		fmt.Printf("\tafter\n")
-		for r := (*gc.Flow)(b); ; r = r.Link {
-			fmt.Printf("\t%v\n", r.Prog)
-			if r == r0 {
-				break
-			}
-		}
-	}
-}
-
-func excise(r *gc.Flow) {
-	p := (*obj.Prog)(r.Prog)
-	if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-		fmt.Printf("%v ===delete===\n", p)
-	}
-
-	obj.Nopout(p)
-
-	gc.Ostats.Ndelmov++
-}
-
-func regtyp(a *obj.Addr) bool {
-	return a.Type == obj.TYPE_REG && (x86.REG_AX <= a.Reg && a.Reg <= x86.REG_R15 || x86.REG_X0 <= a.Reg && a.Reg <= x86.REG_X15)
-}
-
-// movb elimination.
-// movb is simulated by the linker
-// when a register other than ax, bx, cx, dx
-// is used, so rewrite to other instructions
-// when possible.  a movb into a register
-// can smash the entire 32-bit register without
-// causing any trouble.
-//
-// TODO: Using the Q forms here instead of the L forms
-// seems unnecessary, and it makes the instructions longer.
-func elimshortmov(g *gc.Graph) {
-	var p *obj.Prog
-
-	for r := (*gc.Flow)(g.Start); r != nil; r = r.Link {
-		p = r.Prog
-		if regtyp(&p.To) {
-			switch p.As {
-			case x86.AINCB,
-				x86.AINCW:
-				p.As = x86.AINCQ
-
-			case x86.ADECB,
-				x86.ADECW:
-				p.As = x86.ADECQ
-
-			case x86.ANEGB,
-				x86.ANEGW:
-				p.As = x86.ANEGQ
-
-			case x86.ANOTB,
-				x86.ANOTW:
-				p.As = x86.ANOTQ
-			}
-
-			if regtyp(&p.From) || p.From.Type == obj.TYPE_CONST {
-				// move or artihmetic into partial register.
-				// from another register or constant can be movl.
-				// we don't switch to 64-bit arithmetic if it can
-				// change how the carry bit is set (and the carry bit is needed).
-				switch p.As {
-				case x86.AMOVB,
-					x86.AMOVW:
-					p.As = x86.AMOVQ
-
-				case x86.AADDB,
-					x86.AADDW:
-					if !needc(p.Link) {
-						p.As = x86.AADDQ
-					}
-
-				case x86.ASUBB,
-					x86.ASUBW:
-					if !needc(p.Link) {
-						p.As = x86.ASUBQ
-					}
-
-				case x86.AMULB,
-					x86.AMULW:
-					p.As = x86.AMULQ
-
-				case x86.AIMULB,
-					x86.AIMULW:
-					p.As = x86.AIMULQ
-
-				case x86.AANDB,
-					x86.AANDW:
-					p.As = x86.AANDQ
-
-				case x86.AORB,
-					x86.AORW:
-					p.As = x86.AORQ
-
-				case x86.AXORB,
-					x86.AXORW:
-					p.As = x86.AXORQ
-
-				case x86.ASHLB,
-					x86.ASHLW:
-					p.As = x86.ASHLQ
-				}
-			} else if p.From.Type != obj.TYPE_REG {
-				// explicit zero extension, but don't
-				// do that if source is a byte register
-				// (only AH can occur and it's forbidden).
-				switch p.As {
-				case x86.AMOVB:
-					p.As = x86.AMOVBQZX
-
-				case x86.AMOVW:
-					p.As = x86.AMOVWQZX
-				}
-			}
-		}
-	}
-}
-
-// is 'a' a register or constant?
-func regconsttyp(a *obj.Addr) bool {
-	if regtyp(a) {
-		return true
-	}
-	switch a.Type {
-	case obj.TYPE_CONST,
-		obj.TYPE_FCONST,
-		obj.TYPE_SCONST,
-		obj.TYPE_ADDR: // TODO(rsc): Not all TYPE_ADDRs are constants.
-		return true
-	}
-
-	return false
-}
-
-// is reg guaranteed to be truncated by a previous L instruction?
-func prevl(r0 *gc.Flow, reg int) bool {
-	for r := (*gc.Flow)(gc.Uniqp(r0)); r != nil; r = gc.Uniqp(r) {
-		p := r.Prog
-		if p.To.Type == obj.TYPE_REG && int(p.To.Reg) == reg {
-			flags := progflags(p)
-			if flags&gc.RightWrite != 0 {
-				if flags&gc.SizeL != 0 {
-					return true
-				}
-				return false
-			}
-		}
-	}
-
-	return false
-}
-
-/*
- * the idea is to substitute
- * one register for another
- * from one MOV to another
- *	MOV	a, R0
- *	ADD	b, R0	/ no use of R1
- *	MOV	R0, R1
- * would be converted to
- *	MOV	a, R1
- *	ADD	b, R1
- *	MOV	R1, R0
- * hopefully, then the former or latter MOV
- * will be eliminated by copy propagation.
- */
-func subprop(r0 *gc.Flow) bool {
-	if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-		fmt.Printf("subprop %v\n", r0.Prog)
-	}
-	p := (*obj.Prog)(r0.Prog)
-	v1 := (*obj.Addr)(&p.From)
-	if !regtyp(v1) {
-		if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-			fmt.Printf("\tnot regtype %v; return 0\n", gc.Ctxt.Dconv(v1))
-		}
-		return false
-	}
-
-	v2 := (*obj.Addr)(&p.To)
-	if !regtyp(v2) {
-		if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-			fmt.Printf("\tnot regtype %v; return 0\n", gc.Ctxt.Dconv(v2))
-		}
-		return false
-	}
-
-	for r := gc.Uniqp(r0); r != nil; r = gc.Uniqp(r) {
-		if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-			fmt.Printf("\t? %v\n", r.Prog)
-		}
-		if gc.Uniqs(r) == nil {
-			if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-				fmt.Printf("\tno unique successor\n")
-			}
-			break
-		}
-
-		p = r.Prog
-		if p.As == obj.AVARDEF || p.As == obj.AVARKILL {
-			continue
-		}
-		if p.Info.Flags&gc.Call != 0 {
-			if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-				fmt.Printf("\tfound %v; return 0\n", p)
-			}
-			return false
-		}
-
-		if p.Info.Reguse|p.Info.Regset != 0 {
-			if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-				fmt.Printf("\tfound %v; return 0\n", p)
-			}
-			return false
-		}
-
-		if (p.Info.Flags&gc.Move != 0) && (p.Info.Flags&(gc.SizeL|gc.SizeQ|gc.SizeF|gc.SizeD) != 0) && p.To.Type == v1.Type && p.To.Reg == v1.Reg {
-			copysub(&p.To, v1, v2, 1)
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("gotit: %v->%v\n%v", gc.Ctxt.Dconv(v1), gc.Ctxt.Dconv(v2), r.Prog)
-				if p.From.Type == v2.Type && p.From.Reg == v2.Reg {
-					fmt.Printf(" excise")
-				}
-				fmt.Printf("\n")
-			}
-
-			for r = gc.Uniqs(r); r != r0; r = gc.Uniqs(r) {
-				p = r.Prog
-				copysub(&p.From, v1, v2, 1)
-				copysub(&p.To, v1, v2, 1)
-				if gc.Debug['P'] != 0 {
-					fmt.Printf("%v\n", r.Prog)
-				}
-			}
-
-			t := int(int(v1.Reg))
-			v1.Reg = v2.Reg
-			v2.Reg = int16(t)
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("%v last\n", r.Prog)
-			}
-			return true
-		}
-
-		if copyau(&p.From, v2) || copyau(&p.To, v2) {
-			if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-				fmt.Printf("\tcopyau %v failed\n", gc.Ctxt.Dconv(v2))
-			}
-			break
-		}
-
-		if copysub(&p.From, v1, v2, 0) != 0 || copysub(&p.To, v1, v2, 0) != 0 {
-			if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-				fmt.Printf("\tcopysub failed\n")
-			}
-			break
-		}
-	}
-
-	if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-		fmt.Printf("\tran off end; return 0\n")
-	}
-	return false
-}
-
-/*
- * The idea is to remove redundant copies.
- *	v1->v2	F=0
- *	(use v2	s/v2/v1/)*
- *	set v1	F=1
- *	use v2	return fail
- *	-----------------
- *	v1->v2	F=0
- *	(use v2	s/v2/v1/)*
- *	set v1	F=1
- *	set v2	return success
- */
-func copyprop(g *gc.Graph, r0 *gc.Flow) bool {
-	if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-		fmt.Printf("copyprop %v\n", r0.Prog)
-	}
-	p := (*obj.Prog)(r0.Prog)
-	v1 := (*obj.Addr)(&p.From)
-	v2 := (*obj.Addr)(&p.To)
-	if copyas(v1, v2) {
-		return true
-	}
-	gactive++
-	return copy1(v1, v2, r0.S1, 0)
-}
-
-func copy1(v1 *obj.Addr, v2 *obj.Addr, r *gc.Flow, f int) bool {
-	if uint32(r.Active) == gactive {
-		if gc.Debug['P'] != 0 {
-			fmt.Printf("act set; return 1\n")
-		}
-		return true
-	}
-
-	r.Active = int32(gactive)
-	if gc.Debug['P'] != 0 {
-		fmt.Printf("copy %v->%v f=%d\n", gc.Ctxt.Dconv(v1), gc.Ctxt.Dconv(v2), f)
-	}
-	var t int
-	var p *obj.Prog
-	for ; r != nil; r = r.S1 {
-		p = r.Prog
-		if gc.Debug['P'] != 0 {
-			fmt.Printf("%v", p)
-		}
-		if f == 0 && gc.Uniqp(r) == nil {
-			f = 1
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("; merge; f=%d", f)
-			}
-		}
-
-		t = copyu(p, v2, nil)
-		switch t {
-		case 2: /* rar, can't split */
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("; %v rar; return 0\n", gc.Ctxt.Dconv(v2))
-			}
-			return false
-
-		case 3: /* set */
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("; %v set; return 1\n", gc.Ctxt.Dconv(v2))
-			}
-			return true
-
-		case 1, /* used, substitute */
-			4: /* use and set */
-			if f != 0 {
-				if gc.Debug['P'] == 0 {
-					return false
-				}
-				if t == 4 {
-					fmt.Printf("; %v used+set and f=%d; return 0\n", gc.Ctxt.Dconv(v2), f)
-				} else {
-					fmt.Printf("; %v used and f=%d; return 0\n", gc.Ctxt.Dconv(v2), f)
-				}
-				return false
-			}
-
-			if copyu(p, v2, v1) != 0 {
-				if gc.Debug['P'] != 0 {
-					fmt.Printf("; sub fail; return 0\n")
-				}
-				return false
-			}
-
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("; sub %v/%v", gc.Ctxt.Dconv(v2), gc.Ctxt.Dconv(v1))
-			}
-			if t == 4 {
-				if gc.Debug['P'] != 0 {
-					fmt.Printf("; %v used+set; return 1\n", gc.Ctxt.Dconv(v2))
-				}
-				return true
-			}
-		}
-
-		if f == 0 {
-			t = copyu(p, v1, nil)
-			if f == 0 && (t == 2 || t == 3 || t == 4) {
-				f = 1
-				if gc.Debug['P'] != 0 {
-					fmt.Printf("; %v set and !f; f=%d", gc.Ctxt.Dconv(v1), f)
-				}
-			}
-		}
-
-		if gc.Debug['P'] != 0 {
-			fmt.Printf("\n")
-		}
-		if r.S2 != nil {
-			if !copy1(v1, v2, r.S2, f) {
-				return false
-			}
-		}
-	}
-
-	return true
-}
-
-/*
- * return
- * 1 if v only used (and substitute),
- * 2 if read-alter-rewrite
- * 3 if set
- * 4 if set and used
- * 0 otherwise (not touched)
- */
-func copyu(p *obj.Prog, v *obj.Addr, s *obj.Addr) int {
-	switch p.As {
-	case obj.AJMP:
-		if s != nil {
-			if copysub(&p.To, v, s, 1) != 0 {
-				return 1
-			}
-			return 0
-		}
-
-		if copyau(&p.To, v) {
-			return 1
-		}
-		return 0
-
-	case obj.ARET:
-		if s != nil {
-			return 1
-		}
-		return 3
-
-	case obj.ACALL:
-		if x86.REGEXT != 0 /*TypeKind(100016)*/ && v.Type == obj.TYPE_REG && v.Reg <= x86.REGEXT && v.Reg > exregoffset {
-			return 2
-		}
-		if x86.REGARG >= 0 && v.Type == obj.TYPE_REG && v.Reg == x86.REGARG {
-			return 2
-		}
-		if v.Type == p.From.Type && v.Reg == p.From.Reg {
-			return 2
-		}
-
-		if s != nil {
-			if copysub(&p.To, v, s, 1) != 0 {
-				return 1
-			}
-			return 0
-		}
-
-		if copyau(&p.To, v) {
-			return 4
-		}
-		return 3
-
-	case obj.ATEXT:
-		if x86.REGARG >= 0 && v.Type == obj.TYPE_REG && v.Reg == x86.REGARG {
-			return 3
-		}
-		return 0
-	}
-
-	if p.As == obj.AVARDEF || p.As == obj.AVARKILL {
-		return 0
-	}
-
-	if (p.Info.Reguse|p.Info.Regset)&RtoB(int(v.Reg)) != 0 {
-		return 2
-	}
-
-	if p.Info.Flags&gc.LeftAddr != 0 {
-		if copyas(&p.From, v) {
-			return 2
-		}
-	}
-
-	if p.Info.Flags&(gc.RightRead|gc.RightWrite) == gc.RightRead|gc.RightWrite {
-		if copyas(&p.To, v) {
-			return 2
-		}
-	}
-
-	if p.Info.Flags&gc.RightWrite != 0 {
-		if copyas(&p.To, v) {
-			if s != nil {
-				return copysub(&p.From, v, s, 1)
-			}
-			if copyau(&p.From, v) {
-				return 4
-			}
-			return 3
-		}
-	}
-
-	if p.Info.Flags&(gc.LeftAddr|gc.LeftRead|gc.LeftWrite|gc.RightAddr|gc.RightRead|gc.RightWrite) != 0 {
-		if s != nil {
-			if copysub(&p.From, v, s, 1) != 0 {
-				return 1
-			}
-			return copysub(&p.To, v, s, 1)
-		}
-
-		if copyau(&p.From, v) {
-			return 1
-		}
-		if copyau(&p.To, v) {
-			return 1
-		}
-	}
-
-	return 0
-}
-
-/*
- * direct reference,
- * could be set/use depending on
- * semantics
- */
-func copyas(a *obj.Addr, v *obj.Addr) bool {
-	if x86.REG_AL <= a.Reg && a.Reg <= x86.REG_R15B {
-		gc.Fatal("use of byte register")
-	}
-	if x86.REG_AL <= v.Reg && v.Reg <= x86.REG_R15B {
-		gc.Fatal("use of byte register")
-	}
-
-	if a.Type != v.Type || a.Name != v.Name || a.Reg != v.Reg {
-		return false
-	}
-	if regtyp(v) {
-		return true
-	}
-	if v.Type == obj.TYPE_MEM && (v.Name == obj.NAME_AUTO || v.Name == obj.NAME_PARAM) {
-		if v.Offset == a.Offset {
-			return true
-		}
-	}
-	return false
-}
-
-func sameaddr(a *obj.Addr, v *obj.Addr) bool {
-	if a.Type != v.Type || a.Name != v.Name || a.Reg != v.Reg {
-		return false
-	}
-	if regtyp(v) {
-		return true
-	}
-	if v.Type == obj.TYPE_MEM && (v.Name == obj.NAME_AUTO || v.Name == obj.NAME_PARAM) {
-		if v.Offset == a.Offset {
-			return true
-		}
-	}
-	return false
-}
-
-/*
- * either direct or indirect
- */
-func copyau(a *obj.Addr, v *obj.Addr) bool {
-	if copyas(a, v) {
-		if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-			fmt.Printf("\tcopyau: copyas returned 1\n")
-		}
-		return true
-	}
-
-	if regtyp(v) {
-		if a.Type == obj.TYPE_MEM && a.Reg == v.Reg {
-			if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-				fmt.Printf("\tcopyau: found indir use - return 1\n")
-			}
-			return true
-		}
-
-		if a.Index == v.Reg {
-			if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-				fmt.Printf("\tcopyau: found index use - return 1\n")
-			}
-			return true
-		}
-	}
-
-	return false
-}
-
-/*
- * substitute s for v in a
- * return failure to substitute
- */
-func copysub(a *obj.Addr, v *obj.Addr, s *obj.Addr, f int) int {
-	if copyas(a, v) {
-		reg := int(int(s.Reg))
-		if reg >= x86.REG_AX && reg <= x86.REG_R15 || reg >= x86.REG_X0 && reg <= x86.REG_X0+15 {
-			if f != 0 {
-				a.Reg = int16(reg)
-			}
-		}
-
-		return 0
-	}
-
-	if regtyp(v) {
-		reg := int(int(v.Reg))
-		if a.Type == obj.TYPE_MEM && int(a.Reg) == reg {
-			if (s.Reg == x86.REG_BP || s.Reg == x86.REG_R13) && a.Index != x86.REG_NONE {
-				return 1 /* can't use BP-base with index */
-			}
-			if f != 0 {
-				a.Reg = s.Reg
-			}
-		}
-
-		//			return 0;
-		if int(a.Index) == reg {
-			if f != 0 {
-				a.Index = s.Reg
-			}
-			return 0
-		}
-
-		return 0
-	}
-
-	return 0
-}
-
-func conprop(r0 *gc.Flow) {
-	var p *obj.Prog
-	var t int
-
-	p0 := (*obj.Prog)(r0.Prog)
-	v0 := (*obj.Addr)(&p0.To)
-	r := (*gc.Flow)(r0)
-
-loop:
-	r = gc.Uniqs(r)
-	if r == nil || r == r0 {
-		return
-	}
-	if gc.Uniqp(r) == nil {
-		return
-	}
-
-	p = r.Prog
-	t = copyu(p, v0, nil)
-	switch t {
-	case 0, // miss
-		1: // use
-		goto loop
-
-	case 2, // rar
-		4: // use and set
-		break
-
-	case 3: // set
-		if p.As == p0.As {
-			if p.From.Type == p0.From.Type {
-				if p.From.Reg == p0.From.Reg {
-					if p.From.Node == p0.From.Node {
-						if p.From.Offset == p0.From.Offset {
-							if p.From.Scale == p0.From.Scale {
-								if p.From.Type == obj.TYPE_FCONST && p.From.Val.(float64) == p0.From.Val.(float64) {
-									if p.From.Index == p0.From.Index {
-										excise(r)
-										goto loop
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-	}
-}
-
-func smallindir(a *obj.Addr, reg *obj.Addr) bool {
-	return regtyp(reg) && a.Type == obj.TYPE_MEM && a.Reg == reg.Reg && a.Index == x86.REG_NONE && 0 <= a.Offset && a.Offset < 4096
-}
-
-func stackaddr(a *obj.Addr) bool {
-	return a.Type == obj.TYPE_REG && a.Reg == x86.REG_SP
-}
diff --git a/src/cmd/compile/internal/amd64/prog.go b/src/cmd/compile/internal/amd64/prog.go
deleted file mode 100644
index 00918c8..0000000
--- a/src/cmd/compile/internal/amd64/prog.go
+++ /dev/null
@@ -1,308 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package amd64
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/x86"
-)
-
-const (
-	LeftRdwr  uint32 = gc.LeftRead | gc.LeftWrite
-	RightRdwr uint32 = gc.RightRead | gc.RightWrite
-)
-
-// This table gives the basic information about instruction
-// generated by the compiler and processed in the optimizer.
-// See opt.h for bit definitions.
-//
-// Instructions not generated need not be listed.
-// As an exception to that rule, we typically write down all the
-// size variants of an operation even if we just use a subset.
-//
-// The table is formatted for 8-space tabs.
-var progtable = [x86.ALAST]obj.ProgInfo{
-	obj.ATYPE:     {gc.Pseudo | gc.Skip, 0, 0, 0},
-	obj.ATEXT:     {gc.Pseudo, 0, 0, 0},
-	obj.AFUNCDATA: {gc.Pseudo, 0, 0, 0},
-	obj.APCDATA:   {gc.Pseudo, 0, 0, 0},
-	obj.AUNDEF:    {gc.Break, 0, 0, 0},
-	obj.AUSEFIELD: {gc.OK, 0, 0, 0},
-	obj.ACHECKNIL: {gc.LeftRead, 0, 0, 0},
-	obj.AVARDEF:   {gc.Pseudo | gc.RightWrite, 0, 0, 0},
-	obj.AVARKILL:  {gc.Pseudo | gc.RightWrite, 0, 0, 0},
-
-	// NOP is an internal no-op that also stands
-	// for USED and SET annotations, not the Intel opcode.
-	obj.ANOP:       {gc.LeftRead | gc.RightWrite, 0, 0, 0},
-	x86.AADCL:      {gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.AADCQ:      {gc.SizeQ | gc.LeftRead | RightRdwr | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.AADCW:      {gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.AADDB:      {gc.SizeB | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.AADDL:      {gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.AADDW:      {gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.AADDQ:      {gc.SizeQ | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.AADDSD:     {gc.SizeD | gc.LeftRead | RightRdwr, 0, 0, 0},
-	x86.AADDSS:     {gc.SizeF | gc.LeftRead | RightRdwr, 0, 0, 0},
-	x86.AANDB:      {gc.SizeB | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.AANDL:      {gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.AANDQ:      {gc.SizeQ | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.AANDW:      {gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	obj.ACALL:      {gc.RightAddr | gc.Call | gc.KillCarry, 0, 0, 0},
-	x86.ACDQ:       {gc.OK, AX, AX | DX, 0},
-	x86.ACQO:       {gc.OK, AX, AX | DX, 0},
-	x86.ACWD:       {gc.OK, AX, AX | DX, 0},
-	x86.ACLD:       {gc.OK, 0, 0, 0},
-	x86.ASTD:       {gc.OK, 0, 0, 0},
-	x86.ACMPB:      {gc.SizeB | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
-	x86.ACMPL:      {gc.SizeL | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
-	x86.ACMPQ:      {gc.SizeQ | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
-	x86.ACMPW:      {gc.SizeW | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
-	x86.ACOMISD:    {gc.SizeD | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
-	x86.ACOMISS:    {gc.SizeF | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
-	x86.ACVTSD2SL:  {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.ACVTSD2SQ:  {gc.SizeQ | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.ACVTSD2SS:  {gc.SizeF | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.ACVTSL2SD:  {gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.ACVTSL2SS:  {gc.SizeF | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.ACVTSQ2SD:  {gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.ACVTSQ2SS:  {gc.SizeF | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.ACVTSS2SD:  {gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.ACVTSS2SL:  {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.ACVTSS2SQ:  {gc.SizeQ | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.ACVTTSD2SL: {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.ACVTTSD2SQ: {gc.SizeQ | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.ACVTTSS2SL: {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.ACVTTSS2SQ: {gc.SizeQ | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.ADECB:      {gc.SizeB | RightRdwr, 0, 0, 0},
-	x86.ADECL:      {gc.SizeL | RightRdwr, 0, 0, 0},
-	x86.ADECQ:      {gc.SizeQ | RightRdwr, 0, 0, 0},
-	x86.ADECW:      {gc.SizeW | RightRdwr, 0, 0, 0},
-	x86.ADIVB:      {gc.SizeB | gc.LeftRead | gc.SetCarry, AX, AX, 0},
-	x86.ADIVL:      {gc.SizeL | gc.LeftRead | gc.SetCarry, AX | DX, AX | DX, 0},
-	x86.ADIVQ:      {gc.SizeQ | gc.LeftRead | gc.SetCarry, AX | DX, AX | DX, 0},
-	x86.ADIVW:      {gc.SizeW | gc.LeftRead | gc.SetCarry, AX | DX, AX | DX, 0},
-	x86.ADIVSD:     {gc.SizeD | gc.LeftRead | RightRdwr, 0, 0, 0},
-	x86.ADIVSS:     {gc.SizeF | gc.LeftRead | RightRdwr, 0, 0, 0},
-	x86.AIDIVB:     {gc.SizeB | gc.LeftRead | gc.SetCarry, AX, AX, 0},
-	x86.AIDIVL:     {gc.SizeL | gc.LeftRead | gc.SetCarry, AX | DX, AX | DX, 0},
-	x86.AIDIVQ:     {gc.SizeQ | gc.LeftRead | gc.SetCarry, AX | DX, AX | DX, 0},
-	x86.AIDIVW:     {gc.SizeW | gc.LeftRead | gc.SetCarry, AX | DX, AX | DX, 0},
-	x86.AIMULB:     {gc.SizeB | gc.LeftRead | gc.SetCarry, AX, AX, 0},
-	x86.AIMULL:     {gc.SizeL | gc.LeftRead | gc.ImulAXDX | gc.SetCarry, 0, 0, 0},
-	x86.AIMULQ:     {gc.SizeQ | gc.LeftRead | gc.ImulAXDX | gc.SetCarry, 0, 0, 0},
-	x86.AIMULW:     {gc.SizeW | gc.LeftRead | gc.ImulAXDX | gc.SetCarry, 0, 0, 0},
-	x86.AINCB:      {gc.SizeB | RightRdwr, 0, 0, 0},
-	x86.AINCL:      {gc.SizeL | RightRdwr, 0, 0, 0},
-	x86.AINCQ:      {gc.SizeQ | RightRdwr, 0, 0, 0},
-	x86.AINCW:      {gc.SizeW | RightRdwr, 0, 0, 0},
-	x86.AJCC:       {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJCS:       {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJEQ:       {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJGE:       {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJGT:       {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJHI:       {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJLE:       {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJLS:       {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJLT:       {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJMI:       {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJNE:       {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJOC:       {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJOS:       {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJPC:       {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJPL:       {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJPS:       {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	obj.AJMP:       {gc.Jump | gc.Break | gc.KillCarry, 0, 0, 0},
-	x86.ALEAL:      {gc.LeftAddr | gc.RightWrite, 0, 0, 0},
-	x86.ALEAQ:      {gc.LeftAddr | gc.RightWrite, 0, 0, 0},
-	x86.AMOVBLSX:   {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.AMOVBLZX:   {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.AMOVBQSX:   {gc.SizeQ | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.AMOVBQZX:   {gc.SizeQ | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.AMOVBWSX:   {gc.SizeW | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.AMOVBWZX:   {gc.SizeW | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.AMOVLQSX:   {gc.SizeQ | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.AMOVLQZX:   {gc.SizeQ | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.AMOVWLSX:   {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.AMOVWLZX:   {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.AMOVWQSX:   {gc.SizeQ | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.AMOVWQZX:   {gc.SizeQ | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.AMOVQL:     {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.AMOVB:      {gc.SizeB | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
-	x86.AMOVL:      {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
-	x86.AMOVQ:      {gc.SizeQ | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
-	x86.AMOVW:      {gc.SizeW | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
-	x86.AMOVSB:     {gc.OK, DI | SI, DI | SI, 0},
-	x86.AMOVSL:     {gc.OK, DI | SI, DI | SI, 0},
-	x86.AMOVSQ:     {gc.OK, DI | SI, DI | SI, 0},
-	x86.AMOVSW:     {gc.OK, DI | SI, DI | SI, 0},
-	obj.ADUFFCOPY:  {gc.OK, DI | SI, DI | SI | CX, 0},
-	x86.AMOVSD:     {gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
-	x86.AMOVSS:     {gc.SizeF | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
-
-	// We use MOVAPD as a faster synonym for MOVSD.
-	x86.AMOVAPD:   {gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
-	x86.AMULB:     {gc.SizeB | gc.LeftRead | gc.SetCarry, AX, AX, 0},
-	x86.AMULL:     {gc.SizeL | gc.LeftRead | gc.SetCarry, AX, AX | DX, 0},
-	x86.AMULQ:     {gc.SizeQ | gc.LeftRead | gc.SetCarry, AX, AX | DX, 0},
-	x86.AMULW:     {gc.SizeW | gc.LeftRead | gc.SetCarry, AX, AX | DX, 0},
-	x86.AMULSD:    {gc.SizeD | gc.LeftRead | RightRdwr, 0, 0, 0},
-	x86.AMULSS:    {gc.SizeF | gc.LeftRead | RightRdwr, 0, 0, 0},
-	x86.ANEGB:     {gc.SizeB | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.ANEGL:     {gc.SizeL | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.ANEGQ:     {gc.SizeQ | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.ANEGW:     {gc.SizeW | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.ANOTB:     {gc.SizeB | RightRdwr, 0, 0, 0},
-	x86.ANOTL:     {gc.SizeL | RightRdwr, 0, 0, 0},
-	x86.ANOTQ:     {gc.SizeQ | RightRdwr, 0, 0, 0},
-	x86.ANOTW:     {gc.SizeW | RightRdwr, 0, 0, 0},
-	x86.AORB:      {gc.SizeB | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.AORL:      {gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.AORQ:      {gc.SizeQ | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.AORW:      {gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.APOPQ:     {gc.SizeQ | gc.RightWrite, 0, 0, 0},
-	x86.APUSHQ:    {gc.SizeQ | gc.LeftRead, 0, 0, 0},
-	x86.ARCLB:     {gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.ARCLL:     {gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.ARCLQ:     {gc.SizeQ | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.ARCLW:     {gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.ARCRB:     {gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.ARCRL:     {gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.ARCRQ:     {gc.SizeQ | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.ARCRW:     {gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.AREP:      {gc.OK, CX, CX, 0},
-	x86.AREPN:     {gc.OK, CX, CX, 0},
-	obj.ARET:      {gc.Break | gc.KillCarry, 0, 0, 0},
-	x86.AROLB:     {gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.AROLL:     {gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.AROLQ:     {gc.SizeQ | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.AROLW:     {gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ARORB:     {gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ARORL:     {gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ARORQ:     {gc.SizeQ | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ARORW:     {gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASALB:     {gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASALL:     {gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASALQ:     {gc.SizeQ | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASALW:     {gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASARB:     {gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASARL:     {gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASARQ:     {gc.SizeQ | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASARW:     {gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASBBB:     {gc.SizeB | gc.LeftRead | RightRdwr | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.ASBBL:     {gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.ASBBQ:     {gc.SizeQ | gc.LeftRead | RightRdwr | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.ASBBW:     {gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.ASETCC:    {gc.SizeB | gc.RightWrite | gc.UseCarry, 0, 0, 0},
-	x86.ASETCS:    {gc.SizeB | gc.RightWrite | gc.UseCarry, 0, 0, 0},
-	x86.ASETEQ:    {gc.SizeB | gc.RightWrite | gc.UseCarry, 0, 0, 0},
-	x86.ASETGE:    {gc.SizeB | gc.RightWrite | gc.UseCarry, 0, 0, 0},
-	x86.ASETGT:    {gc.SizeB | gc.RightWrite | gc.UseCarry, 0, 0, 0},
-	x86.ASETHI:    {gc.SizeB | gc.RightWrite | gc.UseCarry, 0, 0, 0},
-	x86.ASETLE:    {gc.SizeB | gc.RightWrite | gc.UseCarry, 0, 0, 0},
-	x86.ASETLS:    {gc.SizeB | gc.RightWrite | gc.UseCarry, 0, 0, 0},
-	x86.ASETLT:    {gc.SizeB | gc.RightWrite | gc.UseCarry, 0, 0, 0},
-	x86.ASETMI:    {gc.SizeB | gc.RightWrite | gc.UseCarry, 0, 0, 0},
-	x86.ASETNE:    {gc.SizeB | gc.RightWrite | gc.UseCarry, 0, 0, 0},
-	x86.ASETOC:    {gc.SizeB | gc.RightWrite | gc.UseCarry, 0, 0, 0},
-	x86.ASETOS:    {gc.SizeB | gc.RightWrite | gc.UseCarry, 0, 0, 0},
-	x86.ASETPC:    {gc.SizeB | gc.RightWrite | gc.UseCarry, 0, 0, 0},
-	x86.ASETPL:    {gc.SizeB | gc.RightWrite | gc.UseCarry, 0, 0, 0},
-	x86.ASETPS:    {gc.SizeB | gc.RightWrite | gc.UseCarry, 0, 0, 0},
-	x86.ASHLB:     {gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASHLL:     {gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASHLQ:     {gc.SizeQ | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASHLW:     {gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASHRB:     {gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASHRL:     {gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASHRQ:     {gc.SizeQ | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASHRW:     {gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASQRTSD:   {gc.SizeD | gc.LeftRead | RightRdwr, 0, 0, 0},
-	x86.ASTOSB:    {gc.OK, AX | DI, DI, 0},
-	x86.ASTOSL:    {gc.OK, AX | DI, DI, 0},
-	x86.ASTOSQ:    {gc.OK, AX | DI, DI, 0},
-	x86.ASTOSW:    {gc.OK, AX | DI, DI, 0},
-	obj.ADUFFZERO: {gc.OK, AX | DI, DI, 0},
-	x86.ASUBB:     {gc.SizeB | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.ASUBL:     {gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.ASUBQ:     {gc.SizeQ | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.ASUBW:     {gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.ASUBSD:    {gc.SizeD | gc.LeftRead | RightRdwr, 0, 0, 0},
-	x86.ASUBSS:    {gc.SizeF | gc.LeftRead | RightRdwr, 0, 0, 0},
-	x86.ATESTB:    {gc.SizeB | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
-	x86.ATESTL:    {gc.SizeL | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
-	x86.ATESTQ:    {gc.SizeQ | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
-	x86.ATESTW:    {gc.SizeW | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
-	x86.AUCOMISD:  {gc.SizeD | gc.LeftRead | gc.RightRead, 0, 0, 0},
-	x86.AUCOMISS:  {gc.SizeF | gc.LeftRead | gc.RightRead, 0, 0, 0},
-	x86.AXCHGB:    {gc.SizeB | LeftRdwr | RightRdwr, 0, 0, 0},
-	x86.AXCHGL:    {gc.SizeL | LeftRdwr | RightRdwr, 0, 0, 0},
-	x86.AXCHGQ:    {gc.SizeQ | LeftRdwr | RightRdwr, 0, 0, 0},
-	x86.AXCHGW:    {gc.SizeW | LeftRdwr | RightRdwr, 0, 0, 0},
-	x86.AXORB:     {gc.SizeB | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.AXORL:     {gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.AXORQ:     {gc.SizeQ | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.AXORW:     {gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-}
-
-func progflags(p *obj.Prog) uint32 {
-	flags := progtable[p.As].Flags
-	if flags&gc.ImulAXDX != 0 && p.To.Type != obj.TYPE_NONE {
-		flags |= RightRdwr
-	}
-	return flags
-}
-
-func progcarryflags(p *obj.Prog) uint32 {
-	return progtable[p.As].Flags
-}
-
-func proginfo(p *obj.Prog) {
-	info := &p.Info
-	*info = progtable[p.As]
-	if info.Flags == 0 {
-		gc.Fatal("unknown instruction %v", p)
-	}
-
-	if (info.Flags&gc.ShiftCX != 0) && p.From.Type != obj.TYPE_CONST {
-		info.Reguse |= CX
-	}
-
-	if info.Flags&gc.ImulAXDX != 0 {
-		if p.To.Type == obj.TYPE_NONE {
-			info.Reguse |= AX
-			info.Regset |= AX | DX
-		} else {
-			info.Flags |= RightRdwr
-		}
-	}
-
-	// Addressing makes some registers used.
-	if p.From.Type == obj.TYPE_MEM && p.From.Name == obj.NAME_NONE {
-		info.Regindex |= RtoB(int(p.From.Reg))
-	}
-	if p.From.Index != x86.REG_NONE {
-		info.Regindex |= RtoB(int(p.From.Index))
-	}
-	if p.To.Type == obj.TYPE_MEM && p.To.Name == obj.NAME_NONE {
-		info.Regindex |= RtoB(int(p.To.Reg))
-	}
-	if p.To.Index != x86.REG_NONE {
-		info.Regindex |= RtoB(int(p.To.Index))
-	}
-	if gc.Ctxt.Flag_dynlink {
-		// When -dynlink is passed, many operations on external names (and
-		// also calling duffzero/duffcopy) use R15 as a scratch register.
-		if p.As == x86.ALEAQ || info.Flags == gc.Pseudo || p.As == obj.ACALL || p.As == obj.ARET || p.As == obj.AJMP {
-			return
-		}
-		if p.As == obj.ADUFFZERO || p.As == obj.ADUFFCOPY || (p.From.Name == obj.NAME_EXTERN && !p.From.Sym.Local) || (p.To.Name == obj.NAME_EXTERN && !p.To.Sym.Local) {
-			info.Reguse |= R15
-			info.Regset |= R15
-			return
-		}
-	}
-}
diff --git a/src/cmd/compile/internal/amd64/reg.go b/src/cmd/compile/internal/amd64/reg.go
deleted file mode 100644
index 8fab639..0000000
--- a/src/cmd/compile/internal/amd64/reg.go
+++ /dev/null
@@ -1,152 +0,0 @@
-// Derived from Inferno utils/6c/reg.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6c/reg.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package amd64
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/x86"
-)
-
-const (
-	NREGVAR = 32
-)
-
-var regname = []string{
-	".AX",
-	".CX",
-	".DX",
-	".BX",
-	".SP",
-	".BP",
-	".SI",
-	".DI",
-	".R8",
-	".R9",
-	".R10",
-	".R11",
-	".R12",
-	".R13",
-	".R14",
-	".R15",
-	".X0",
-	".X1",
-	".X2",
-	".X3",
-	".X4",
-	".X5",
-	".X6",
-	".X7",
-	".X8",
-	".X9",
-	".X10",
-	".X11",
-	".X12",
-	".X13",
-	".X14",
-	".X15",
-}
-
-func regnames(n *int) []string {
-	*n = NREGVAR
-	return regname
-}
-
-func excludedregs() uint64 {
-	return RtoB(x86.REG_SP)
-}
-
-func doregbits(r int) uint64 {
-	b := uint64(0)
-	if r >= x86.REG_AX && r <= x86.REG_R15 {
-		b |= RtoB(r)
-	} else if r >= x86.REG_AL && r <= x86.REG_R15B {
-		b |= RtoB(r - x86.REG_AL + x86.REG_AX)
-	} else if r >= x86.REG_AH && r <= x86.REG_BH {
-		b |= RtoB(r - x86.REG_AH + x86.REG_AX)
-	} else if r >= x86.REG_X0 && r <= x86.REG_X0+15 {
-		b |= FtoB(r)
-	}
-	return b
-}
-
-// For ProgInfo.
-const (
-	AX  = 1 << (x86.REG_AX - x86.REG_AX)
-	BX  = 1 << (x86.REG_BX - x86.REG_AX)
-	CX  = 1 << (x86.REG_CX - x86.REG_AX)
-	DX  = 1 << (x86.REG_DX - x86.REG_AX)
-	DI  = 1 << (x86.REG_DI - x86.REG_AX)
-	SI  = 1 << (x86.REG_SI - x86.REG_AX)
-	R15 = 1 << (x86.REG_R15 - x86.REG_AX)
-)
-
-func RtoB(r int) uint64 {
-	if r < x86.REG_AX || r > x86.REG_R15 {
-		return 0
-	}
-	return 1 << uint(r-x86.REG_AX)
-}
-
-func BtoR(b uint64) int {
-	b &= 0xffff
-	if gc.Nacl {
-		b &^= (1<<(x86.REG_BP-x86.REG_AX) | 1<<(x86.REG_R15-x86.REG_AX))
-	} else if obj.Framepointer_enabled != 0 {
-		// BP is part of the calling convention if framepointer_enabled.
-		b &^= (1 << (x86.REG_BP - x86.REG_AX))
-	}
-	if b == 0 {
-		return 0
-	}
-	return gc.Bitno(b) + x86.REG_AX
-}
-
-/*
- *	bit	reg
- *	16	X0
- *	...
- *	31	X15
- */
-func FtoB(f int) uint64 {
-	if f < x86.REG_X0 || f > x86.REG_X15 {
-		return 0
-	}
-	return 1 << uint(f-x86.REG_X0+16)
-}
-
-func BtoF(b uint64) int {
-	b &= 0xFFFF0000
-	if b == 0 {
-		return 0
-	}
-	return gc.Bitno(b) - 16 + x86.REG_X0
-}
diff --git a/src/cmd/compile/internal/arm/cgen.go b/src/cmd/compile/internal/arm/cgen.go
deleted file mode 100644
index 8ea6c5f..0000000
--- a/src/cmd/compile/internal/arm/cgen.go
+++ /dev/null
@@ -1,229 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package arm
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/arm"
-)
-
-/*
- * generate array index into res.
- * n might be any size; res is 32-bit.
- * returns Prog* to patch to panic call.
- */
-func cgenindex(n *gc.Node, res *gc.Node, bounded bool) *obj.Prog {
-	if !gc.Is64(n.Type) {
-		gc.Cgen(n, res)
-		return nil
-	}
-
-	var tmp gc.Node
-	gc.Tempname(&tmp, gc.Types[gc.TINT64])
-	gc.Cgen(n, &tmp)
-	var lo gc.Node
-	var hi gc.Node
-	split64(&tmp, &lo, &hi)
-	gmove(&lo, res)
-	if bounded {
-		splitclean()
-		return nil
-	}
-
-	var n1 gc.Node
-	gc.Regalloc(&n1, gc.Types[gc.TINT32], nil)
-	var n2 gc.Node
-	gc.Regalloc(&n2, gc.Types[gc.TINT32], nil)
-	var zero gc.Node
-	gc.Nodconst(&zero, gc.Types[gc.TINT32], 0)
-	gmove(&hi, &n1)
-	gmove(&zero, &n2)
-	gins(arm.ACMP, &n1, &n2)
-	gc.Regfree(&n2)
-	gc.Regfree(&n1)
-	splitclean()
-	return gc.Gbranch(arm.ABNE, nil, -1)
-}
-
-func igenindex(n *gc.Node, res *gc.Node, bounded bool) *obj.Prog {
-	gc.Tempname(res, n.Type)
-	return cgenindex(n, res, bounded)
-}
-
-func blockcopy(n, res *gc.Node, osrc, odst, w int64) {
-	// determine alignment.
-	// want to avoid unaligned access, so have to use
-	// smaller operations for less aligned types.
-	// for example moving [4]byte must use 4 MOVB not 1 MOVW.
-	align := int(n.Type.Align)
-
-	var op int
-	switch align {
-	default:
-		gc.Fatal("sgen: invalid alignment %d for %v", align, n.Type)
-
-	case 1:
-		op = arm.AMOVB
-
-	case 2:
-		op = arm.AMOVH
-
-	case 4:
-		op = arm.AMOVW
-	}
-
-	if w%int64(align) != 0 {
-		gc.Fatal("sgen: unaligned size %d (align=%d) for %v", w, align, n.Type)
-	}
-	c := int32(w / int64(align))
-
-	if osrc%int64(align) != 0 || odst%int64(align) != 0 {
-		gc.Fatal("sgen: unaligned offset src %d or dst %d (align %d)", osrc, odst, align)
-	}
-
-	// if we are copying forward on the stack and
-	// the src and dst overlap, then reverse direction
-	dir := align
-	if osrc < odst && int64(odst) < int64(osrc)+w {
-		dir = -dir
-	}
-
-	if op == arm.AMOVW && !gc.Nacl && dir > 0 && c >= 4 && c <= 128 {
-		var r0 gc.Node
-		r0.Op = gc.OREGISTER
-		r0.Reg = arm.REG_R0
-		var r1 gc.Node
-		r1.Op = gc.OREGISTER
-		r1.Reg = arm.REG_R0 + 1
-		var r2 gc.Node
-		r2.Op = gc.OREGISTER
-		r2.Reg = arm.REG_R0 + 2
-
-		var src gc.Node
-		gc.Regalloc(&src, gc.Types[gc.Tptr], &r1)
-		var dst gc.Node
-		gc.Regalloc(&dst, gc.Types[gc.Tptr], &r2)
-		if n.Ullman >= res.Ullman {
-			// eval n first
-			gc.Agen(n, &src)
-
-			if res.Op == gc.ONAME {
-				gc.Gvardef(res)
-			}
-			gc.Agen(res, &dst)
-		} else {
-			// eval res first
-			if res.Op == gc.ONAME {
-				gc.Gvardef(res)
-			}
-			gc.Agen(res, &dst)
-			gc.Agen(n, &src)
-		}
-
-		var tmp gc.Node
-		gc.Regalloc(&tmp, gc.Types[gc.Tptr], &r0)
-		f := gc.Sysfunc("duffcopy")
-		p := gins(obj.ADUFFCOPY, nil, f)
-		gc.Afunclit(&p.To, f)
-
-		// 8 and 128 = magic constants: see ../../runtime/asm_arm.s
-		p.To.Offset = 8 * (128 - int64(c))
-
-		gc.Regfree(&tmp)
-		gc.Regfree(&src)
-		gc.Regfree(&dst)
-		return
-	}
-
-	var dst gc.Node
-	var src gc.Node
-	if n.Ullman >= res.Ullman {
-		gc.Agenr(n, &dst, res) // temporarily use dst
-		gc.Regalloc(&src, gc.Types[gc.Tptr], nil)
-		gins(arm.AMOVW, &dst, &src)
-		if res.Op == gc.ONAME {
-			gc.Gvardef(res)
-		}
-		gc.Agen(res, &dst)
-	} else {
-		if res.Op == gc.ONAME {
-			gc.Gvardef(res)
-		}
-		gc.Agenr(res, &dst, res)
-		gc.Agenr(n, &src, nil)
-	}
-
-	var tmp gc.Node
-	gc.Regalloc(&tmp, gc.Types[gc.TUINT32], nil)
-
-	// set up end marker
-	var nend gc.Node
-
-	if c >= 4 {
-		gc.Regalloc(&nend, gc.Types[gc.TUINT32], nil)
-
-		p := gins(arm.AMOVW, &src, &nend)
-		p.From.Type = obj.TYPE_ADDR
-		if dir < 0 {
-			p.From.Offset = int64(dir)
-		} else {
-			p.From.Offset = w
-		}
-	}
-
-	// move src and dest to the end of block if necessary
-	if dir < 0 {
-		p := gins(arm.AMOVW, &src, &src)
-		p.From.Type = obj.TYPE_ADDR
-		p.From.Offset = w + int64(dir)
-
-		p = gins(arm.AMOVW, &dst, &dst)
-		p.From.Type = obj.TYPE_ADDR
-		p.From.Offset = w + int64(dir)
-	}
-
-	// move
-	if c >= 4 {
-		p := gins(op, &src, &tmp)
-		p.From.Type = obj.TYPE_MEM
-		p.From.Offset = int64(dir)
-		p.Scond |= arm.C_PBIT
-		ploop := p
-
-		p = gins(op, &tmp, &dst)
-		p.To.Type = obj.TYPE_MEM
-		p.To.Offset = int64(dir)
-		p.Scond |= arm.C_PBIT
-
-		p = gins(arm.ACMP, &src, nil)
-		raddr(&nend, p)
-
-		gc.Patch(gc.Gbranch(arm.ABNE, nil, 0), ploop)
-		gc.Regfree(&nend)
-	} else {
-		var p *obj.Prog
-		for {
-			tmp14 := c
-			c--
-			if tmp14 <= 0 {
-				break
-			}
-			p = gins(op, &src, &tmp)
-			p.From.Type = obj.TYPE_MEM
-			p.From.Offset = int64(dir)
-			p.Scond |= arm.C_PBIT
-
-			p = gins(op, &tmp, &dst)
-			p.To.Type = obj.TYPE_MEM
-			p.To.Offset = int64(dir)
-			p.Scond |= arm.C_PBIT
-		}
-	}
-
-	gc.Regfree(&dst)
-	gc.Regfree(&src)
-	gc.Regfree(&tmp)
-}
diff --git a/src/cmd/compile/internal/arm/cgen64.go b/src/cmd/compile/internal/arm/cgen64.go
deleted file mode 100644
index cc969b8..0000000
--- a/src/cmd/compile/internal/arm/cgen64.go
+++ /dev/null
@@ -1,859 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package arm
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/arm"
-)
-
-/*
- * attempt to generate 64-bit
- *	res = n
- * return 1 on success, 0 if op not handled.
- */
-func cgen64(n *gc.Node, res *gc.Node) {
-	if res.Op != gc.OINDREG && res.Op != gc.ONAME {
-		gc.Dump("n", n)
-		gc.Dump("res", res)
-		gc.Fatal("cgen64 %v of %v", gc.Oconv(int(n.Op), 0), gc.Oconv(int(res.Op), 0))
-	}
-
-	l := n.Left
-	var t1 gc.Node
-	if !l.Addable {
-		gc.Tempname(&t1, l.Type)
-		gc.Cgen(l, &t1)
-		l = &t1
-	}
-
-	var hi1 gc.Node
-	var lo1 gc.Node
-	split64(l, &lo1, &hi1)
-	switch n.Op {
-	default:
-		gc.Fatal("cgen64 %v", gc.Oconv(int(n.Op), 0))
-
-	case gc.OMINUS:
-		var lo2 gc.Node
-		var hi2 gc.Node
-		split64(res, &lo2, &hi2)
-
-		gc.Regalloc(&t1, lo1.Type, nil)
-		var al gc.Node
-		gc.Regalloc(&al, lo1.Type, nil)
-		var ah gc.Node
-		gc.Regalloc(&ah, hi1.Type, nil)
-
-		gins(arm.AMOVW, &lo1, &al)
-		gins(arm.AMOVW, &hi1, &ah)
-
-		gmove(ncon(0), &t1)
-		p1 := gins(arm.ASUB, &al, &t1)
-		p1.Scond |= arm.C_SBIT
-		gins(arm.AMOVW, &t1, &lo2)
-
-		gmove(ncon(0), &t1)
-		gins(arm.ASBC, &ah, &t1)
-		gins(arm.AMOVW, &t1, &hi2)
-
-		gc.Regfree(&t1)
-		gc.Regfree(&al)
-		gc.Regfree(&ah)
-		splitclean()
-		splitclean()
-		return
-
-	case gc.OCOM:
-		gc.Regalloc(&t1, lo1.Type, nil)
-		gmove(ncon(^uint32(0)), &t1)
-
-		var lo2 gc.Node
-		var hi2 gc.Node
-		split64(res, &lo2, &hi2)
-		var n1 gc.Node
-		gc.Regalloc(&n1, lo1.Type, nil)
-
-		gins(arm.AMOVW, &lo1, &n1)
-		gins(arm.AEOR, &t1, &n1)
-		gins(arm.AMOVW, &n1, &lo2)
-
-		gins(arm.AMOVW, &hi1, &n1)
-		gins(arm.AEOR, &t1, &n1)
-		gins(arm.AMOVW, &n1, &hi2)
-
-		gc.Regfree(&t1)
-		gc.Regfree(&n1)
-		splitclean()
-		splitclean()
-		return
-
-		// binary operators.
-	// common setup below.
-	case gc.OADD,
-		gc.OSUB,
-		gc.OMUL,
-		gc.OLSH,
-		gc.ORSH,
-		gc.OAND,
-		gc.OOR,
-		gc.OXOR,
-		gc.OLROT:
-		break
-	}
-
-	// setup for binary operators
-	r := n.Right
-
-	if r != nil && !r.Addable {
-		var t2 gc.Node
-		gc.Tempname(&t2, r.Type)
-		gc.Cgen(r, &t2)
-		r = &t2
-	}
-
-	var hi2 gc.Node
-	var lo2 gc.Node
-	if gc.Is64(r.Type) {
-		split64(r, &lo2, &hi2)
-	}
-
-	var al gc.Node
-	gc.Regalloc(&al, lo1.Type, nil)
-	var ah gc.Node
-	gc.Regalloc(&ah, hi1.Type, nil)
-
-	// Do op.  Leave result in ah:al.
-	switch n.Op {
-	default:
-		gc.Fatal("cgen64: not implemented: %v\n", n)
-
-		// TODO: Constants
-	case gc.OADD:
-		var bl gc.Node
-		gc.Regalloc(&bl, gc.Types[gc.TPTR32], nil)
-
-		var bh gc.Node
-		gc.Regalloc(&bh, gc.Types[gc.TPTR32], nil)
-		gins(arm.AMOVW, &hi1, &ah)
-		gins(arm.AMOVW, &lo1, &al)
-		gins(arm.AMOVW, &hi2, &bh)
-		gins(arm.AMOVW, &lo2, &bl)
-		p1 := gins(arm.AADD, &bl, &al)
-		p1.Scond |= arm.C_SBIT
-		gins(arm.AADC, &bh, &ah)
-		gc.Regfree(&bl)
-		gc.Regfree(&bh)
-
-		// TODO: Constants.
-	case gc.OSUB:
-		var bl gc.Node
-		gc.Regalloc(&bl, gc.Types[gc.TPTR32], nil)
-
-		var bh gc.Node
-		gc.Regalloc(&bh, gc.Types[gc.TPTR32], nil)
-		gins(arm.AMOVW, &lo1, &al)
-		gins(arm.AMOVW, &hi1, &ah)
-		gins(arm.AMOVW, &lo2, &bl)
-		gins(arm.AMOVW, &hi2, &bh)
-		p1 := gins(arm.ASUB, &bl, &al)
-		p1.Scond |= arm.C_SBIT
-		gins(arm.ASBC, &bh, &ah)
-		gc.Regfree(&bl)
-		gc.Regfree(&bh)
-
-		// TODO(kaib): this can be done with 4 regs and does not need 6
-	case gc.OMUL:
-		var bl gc.Node
-		gc.Regalloc(&bl, gc.Types[gc.TPTR32], nil)
-
-		var bh gc.Node
-		gc.Regalloc(&bh, gc.Types[gc.TPTR32], nil)
-		var cl gc.Node
-		gc.Regalloc(&cl, gc.Types[gc.TPTR32], nil)
-		var ch gc.Node
-		gc.Regalloc(&ch, gc.Types[gc.TPTR32], nil)
-
-		// load args into bh:bl and bh:bl.
-		gins(arm.AMOVW, &hi1, &bh)
-
-		gins(arm.AMOVW, &lo1, &bl)
-		gins(arm.AMOVW, &hi2, &ch)
-		gins(arm.AMOVW, &lo2, &cl)
-
-		// bl * cl -> ah al
-		p1 := gins(arm.AMULLU, nil, nil)
-
-		p1.From.Type = obj.TYPE_REG
-		p1.From.Reg = bl.Reg
-		p1.Reg = cl.Reg
-		p1.To.Type = obj.TYPE_REGREG
-		p1.To.Reg = ah.Reg
-		p1.To.Offset = int64(al.Reg)
-
-		//print("%v\n", p1);
-
-		// bl * ch + ah -> ah
-		p1 = gins(arm.AMULA, nil, nil)
-
-		p1.From.Type = obj.TYPE_REG
-		p1.From.Reg = bl.Reg
-		p1.Reg = ch.Reg
-		p1.To.Type = obj.TYPE_REGREG2
-		p1.To.Reg = ah.Reg
-		p1.To.Offset = int64(ah.Reg)
-
-		//print("%v\n", p1);
-
-		// bh * cl + ah -> ah
-		p1 = gins(arm.AMULA, nil, nil)
-
-		p1.From.Type = obj.TYPE_REG
-		p1.From.Reg = bh.Reg
-		p1.Reg = cl.Reg
-		p1.To.Type = obj.TYPE_REGREG2
-		p1.To.Reg = ah.Reg
-		p1.To.Offset = int64(ah.Reg)
-
-		//print("%v\n", p1);
-
-		gc.Regfree(&bh)
-
-		gc.Regfree(&bl)
-		gc.Regfree(&ch)
-		gc.Regfree(&cl)
-
-		// We only rotate by a constant c in [0,64).
-	// if c >= 32:
-	//	lo, hi = hi, lo
-	//	c -= 32
-	// if c == 0:
-	//	no-op
-	// else:
-	//	t = hi
-	//	shld hi:lo, c
-	//	shld lo:t, c
-	case gc.OLROT:
-		v := uint64(r.Int())
-
-		var bl gc.Node
-		gc.Regalloc(&bl, lo1.Type, nil)
-		var bh gc.Node
-		gc.Regalloc(&bh, hi1.Type, nil)
-		if v >= 32 {
-			// reverse during load to do the first 32 bits of rotate
-			v -= 32
-
-			gins(arm.AMOVW, &hi1, &bl)
-			gins(arm.AMOVW, &lo1, &bh)
-		} else {
-			gins(arm.AMOVW, &hi1, &bh)
-			gins(arm.AMOVW, &lo1, &bl)
-		}
-
-		if v == 0 {
-			gins(arm.AMOVW, &bh, &ah)
-			gins(arm.AMOVW, &bl, &al)
-		} else {
-			// rotate by 1 <= v <= 31
-			//	MOVW	bl<<v, al
-			//	MOVW	bh<<v, ah
-			//	OR		bl>>(32-v), ah
-			//	OR		bh>>(32-v), al
-			gshift(arm.AMOVW, &bl, arm.SHIFT_LL, int32(v), &al)
-
-			gshift(arm.AMOVW, &bh, arm.SHIFT_LL, int32(v), &ah)
-			gshift(arm.AORR, &bl, arm.SHIFT_LR, int32(32-v), &ah)
-			gshift(arm.AORR, &bh, arm.SHIFT_LR, int32(32-v), &al)
-		}
-
-		gc.Regfree(&bl)
-		gc.Regfree(&bh)
-
-	case gc.OLSH:
-		var bl gc.Node
-		gc.Regalloc(&bl, lo1.Type, nil)
-		var bh gc.Node
-		gc.Regalloc(&bh, hi1.Type, nil)
-		gins(arm.AMOVW, &hi1, &bh)
-		gins(arm.AMOVW, &lo1, &bl)
-
-		var p6 *obj.Prog
-		var s gc.Node
-		var n1 gc.Node
-		var creg gc.Node
-		var p1 *obj.Prog
-		var p2 *obj.Prog
-		var p3 *obj.Prog
-		var p4 *obj.Prog
-		var p5 *obj.Prog
-		if r.Op == gc.OLITERAL {
-			v := uint64(r.Int())
-			if v >= 64 {
-				// TODO(kaib): replace with gins(AMOVW, nodintconst(0), &al)
-				// here and below (verify it optimizes to EOR)
-				gins(arm.AEOR, &al, &al)
-
-				gins(arm.AEOR, &ah, &ah)
-			} else if v > 32 {
-				gins(arm.AEOR, &al, &al)
-
-				//	MOVW	bl<<(v-32), ah
-				gshift(arm.AMOVW, &bl, arm.SHIFT_LL, int32(v-32), &ah)
-			} else if v == 32 {
-				gins(arm.AEOR, &al, &al)
-				gins(arm.AMOVW, &bl, &ah)
-			} else if v > 0 {
-				//	MOVW	bl<<v, al
-				gshift(arm.AMOVW, &bl, arm.SHIFT_LL, int32(v), &al)
-
-				//	MOVW	bh<<v, ah
-				gshift(arm.AMOVW, &bh, arm.SHIFT_LL, int32(v), &ah)
-
-				//	OR		bl>>(32-v), ah
-				gshift(arm.AORR, &bl, arm.SHIFT_LR, int32(32-v), &ah)
-			} else {
-				gins(arm.AMOVW, &bl, &al)
-				gins(arm.AMOVW, &bh, &ah)
-			}
-
-			goto olsh_break
-		}
-
-		gc.Regalloc(&s, gc.Types[gc.TUINT32], nil)
-		gc.Regalloc(&creg, gc.Types[gc.TUINT32], nil)
-		if gc.Is64(r.Type) {
-			// shift is >= 1<<32
-			var cl gc.Node
-			var ch gc.Node
-			split64(r, &cl, &ch)
-
-			gmove(&ch, &s)
-			gins(arm.ATST, &s, nil)
-			p6 = gc.Gbranch(arm.ABNE, nil, 0)
-			gmove(&cl, &s)
-			splitclean()
-		} else {
-			gmove(r, &s)
-			p6 = nil
-		}
-
-		gins(arm.ATST, &s, nil)
-
-		// shift == 0
-		p1 = gins(arm.AMOVW, &bl, &al)
-
-		p1.Scond = arm.C_SCOND_EQ
-		p1 = gins(arm.AMOVW, &bh, &ah)
-		p1.Scond = arm.C_SCOND_EQ
-		p2 = gc.Gbranch(arm.ABEQ, nil, 0)
-
-		// shift is < 32
-		gc.Nodconst(&n1, gc.Types[gc.TUINT32], 32)
-
-		gmove(&n1, &creg)
-		gins(arm.ACMP, &s, &creg)
-
-		//	MOVW.LO		bl<<s, al
-		p1 = gregshift(arm.AMOVW, &bl, arm.SHIFT_LL, &s, &al)
-
-		p1.Scond = arm.C_SCOND_LO
-
-		//	MOVW.LO		bh<<s, ah
-		p1 = gregshift(arm.AMOVW, &bh, arm.SHIFT_LL, &s, &ah)
-
-		p1.Scond = arm.C_SCOND_LO
-
-		//	SUB.LO		s, creg
-		p1 = gins(arm.ASUB, &s, &creg)
-
-		p1.Scond = arm.C_SCOND_LO
-
-		//	OR.LO		bl>>creg, ah
-		p1 = gregshift(arm.AORR, &bl, arm.SHIFT_LR, &creg, &ah)
-
-		p1.Scond = arm.C_SCOND_LO
-
-		//	BLO	end
-		p3 = gc.Gbranch(arm.ABLO, nil, 0)
-
-		// shift == 32
-		p1 = gins(arm.AEOR, &al, &al)
-
-		p1.Scond = arm.C_SCOND_EQ
-		p1 = gins(arm.AMOVW, &bl, &ah)
-		p1.Scond = arm.C_SCOND_EQ
-		p4 = gc.Gbranch(arm.ABEQ, nil, 0)
-
-		// shift is < 64
-		gc.Nodconst(&n1, gc.Types[gc.TUINT32], 64)
-
-		gmove(&n1, &creg)
-		gins(arm.ACMP, &s, &creg)
-
-		//	EOR.LO	al, al
-		p1 = gins(arm.AEOR, &al, &al)
-
-		p1.Scond = arm.C_SCOND_LO
-
-		//	MOVW.LO		creg>>1, creg
-		p1 = gshift(arm.AMOVW, &creg, arm.SHIFT_LR, 1, &creg)
-
-		p1.Scond = arm.C_SCOND_LO
-
-		//	SUB.LO		creg, s
-		p1 = gins(arm.ASUB, &creg, &s)
-
-		p1.Scond = arm.C_SCOND_LO
-
-		//	MOVW	bl<<s, ah
-		p1 = gregshift(arm.AMOVW, &bl, arm.SHIFT_LL, &s, &ah)
-
-		p1.Scond = arm.C_SCOND_LO
-
-		p5 = gc.Gbranch(arm.ABLO, nil, 0)
-
-		// shift >= 64
-		if p6 != nil {
-			gc.Patch(p6, gc.Pc)
-		}
-		gins(arm.AEOR, &al, &al)
-		gins(arm.AEOR, &ah, &ah)
-
-		gc.Patch(p2, gc.Pc)
-		gc.Patch(p3, gc.Pc)
-		gc.Patch(p4, gc.Pc)
-		gc.Patch(p5, gc.Pc)
-		gc.Regfree(&s)
-		gc.Regfree(&creg)
-
-	olsh_break:
-		gc.Regfree(&bl)
-		gc.Regfree(&bh)
-
-	case gc.ORSH:
-		var bl gc.Node
-		gc.Regalloc(&bl, lo1.Type, nil)
-		var bh gc.Node
-		gc.Regalloc(&bh, hi1.Type, nil)
-		gins(arm.AMOVW, &hi1, &bh)
-		gins(arm.AMOVW, &lo1, &bl)
-
-		var p4 *obj.Prog
-		var p5 *obj.Prog
-		var n1 gc.Node
-		var p6 *obj.Prog
-		var s gc.Node
-		var p1 *obj.Prog
-		var p2 *obj.Prog
-		var creg gc.Node
-		var p3 *obj.Prog
-		if r.Op == gc.OLITERAL {
-			v := uint64(r.Int())
-			if v >= 64 {
-				if bh.Type.Etype == gc.TINT32 {
-					//	MOVW	bh->31, al
-					gshift(arm.AMOVW, &bh, arm.SHIFT_AR, 31, &al)
-
-					//	MOVW	bh->31, ah
-					gshift(arm.AMOVW, &bh, arm.SHIFT_AR, 31, &ah)
-				} else {
-					gins(arm.AEOR, &al, &al)
-					gins(arm.AEOR, &ah, &ah)
-				}
-			} else if v > 32 {
-				if bh.Type.Etype == gc.TINT32 {
-					//	MOVW	bh->(v-32), al
-					gshift(arm.AMOVW, &bh, arm.SHIFT_AR, int32(v-32), &al)
-
-					//	MOVW	bh->31, ah
-					gshift(arm.AMOVW, &bh, arm.SHIFT_AR, 31, &ah)
-				} else {
-					//	MOVW	bh>>(v-32), al
-					gshift(arm.AMOVW, &bh, arm.SHIFT_LR, int32(v-32), &al)
-
-					gins(arm.AEOR, &ah, &ah)
-				}
-			} else if v == 32 {
-				gins(arm.AMOVW, &bh, &al)
-				if bh.Type.Etype == gc.TINT32 {
-					//	MOVW	bh->31, ah
-					gshift(arm.AMOVW, &bh, arm.SHIFT_AR, 31, &ah)
-				} else {
-					gins(arm.AEOR, &ah, &ah)
-				}
-			} else if v > 0 {
-				//	MOVW	bl>>v, al
-				gshift(arm.AMOVW, &bl, arm.SHIFT_LR, int32(v), &al)
-
-				//	OR		bh<<(32-v), al
-				gshift(arm.AORR, &bh, arm.SHIFT_LL, int32(32-v), &al)
-
-				if bh.Type.Etype == gc.TINT32 {
-					//	MOVW	bh->v, ah
-					gshift(arm.AMOVW, &bh, arm.SHIFT_AR, int32(v), &ah)
-				} else {
-					//	MOVW	bh>>v, ah
-					gshift(arm.AMOVW, &bh, arm.SHIFT_LR, int32(v), &ah)
-				}
-			} else {
-				gins(arm.AMOVW, &bl, &al)
-				gins(arm.AMOVW, &bh, &ah)
-			}
-
-			goto orsh_break
-		}
-
-		gc.Regalloc(&s, gc.Types[gc.TUINT32], nil)
-		gc.Regalloc(&creg, gc.Types[gc.TUINT32], nil)
-		if gc.Is64(r.Type) {
-			// shift is >= 1<<32
-			var ch gc.Node
-			var cl gc.Node
-			split64(r, &cl, &ch)
-
-			gmove(&ch, &s)
-			gins(arm.ATST, &s, nil)
-			var p1 *obj.Prog
-			if bh.Type.Etype == gc.TINT32 {
-				p1 = gshift(arm.AMOVW, &bh, arm.SHIFT_AR, 31, &ah)
-			} else {
-				p1 = gins(arm.AEOR, &ah, &ah)
-			}
-			p1.Scond = arm.C_SCOND_NE
-			p6 = gc.Gbranch(arm.ABNE, nil, 0)
-			gmove(&cl, &s)
-			splitclean()
-		} else {
-			gmove(r, &s)
-			p6 = nil
-		}
-
-		gins(arm.ATST, &s, nil)
-
-		// shift == 0
-		p1 = gins(arm.AMOVW, &bl, &al)
-
-		p1.Scond = arm.C_SCOND_EQ
-		p1 = gins(arm.AMOVW, &bh, &ah)
-		p1.Scond = arm.C_SCOND_EQ
-		p2 = gc.Gbranch(arm.ABEQ, nil, 0)
-
-		// check if shift is < 32
-		gc.Nodconst(&n1, gc.Types[gc.TUINT32], 32)
-
-		gmove(&n1, &creg)
-		gins(arm.ACMP, &s, &creg)
-
-		//	MOVW.LO		bl>>s, al
-		p1 = gregshift(arm.AMOVW, &bl, arm.SHIFT_LR, &s, &al)
-
-		p1.Scond = arm.C_SCOND_LO
-
-		//	SUB.LO		s,creg
-		p1 = gins(arm.ASUB, &s, &creg)
-
-		p1.Scond = arm.C_SCOND_LO
-
-		//	OR.LO		bh<<(32-s), al
-		p1 = gregshift(arm.AORR, &bh, arm.SHIFT_LL, &creg, &al)
-
-		p1.Scond = arm.C_SCOND_LO
-
-		if bh.Type.Etype == gc.TINT32 {
-			//	MOVW	bh->s, ah
-			p1 = gregshift(arm.AMOVW, &bh, arm.SHIFT_AR, &s, &ah)
-		} else {
-			//	MOVW	bh>>s, ah
-			p1 = gregshift(arm.AMOVW, &bh, arm.SHIFT_LR, &s, &ah)
-		}
-
-		p1.Scond = arm.C_SCOND_LO
-
-		//	BLO	end
-		p3 = gc.Gbranch(arm.ABLO, nil, 0)
-
-		// shift == 32
-		p1 = gins(arm.AMOVW, &bh, &al)
-
-		p1.Scond = arm.C_SCOND_EQ
-		if bh.Type.Etype == gc.TINT32 {
-			gshift(arm.AMOVW, &bh, arm.SHIFT_AR, 31, &ah)
-		} else {
-			gins(arm.AEOR, &ah, &ah)
-		}
-		p4 = gc.Gbranch(arm.ABEQ, nil, 0)
-
-		// check if shift is < 64
-		gc.Nodconst(&n1, gc.Types[gc.TUINT32], 64)
-
-		gmove(&n1, &creg)
-		gins(arm.ACMP, &s, &creg)
-
-		//	MOVW.LO		creg>>1, creg
-		p1 = gshift(arm.AMOVW, &creg, arm.SHIFT_LR, 1, &creg)
-
-		p1.Scond = arm.C_SCOND_LO
-
-		//	SUB.LO		creg, s
-		p1 = gins(arm.ASUB, &creg, &s)
-
-		p1.Scond = arm.C_SCOND_LO
-
-		if bh.Type.Etype == gc.TINT32 {
-			//	MOVW	bh->(s-32), al
-			p1 := gregshift(arm.AMOVW, &bh, arm.SHIFT_AR, &s, &al)
-
-			p1.Scond = arm.C_SCOND_LO
-		} else {
-			//	MOVW	bh>>(v-32), al
-			p1 := gregshift(arm.AMOVW, &bh, arm.SHIFT_LR, &s, &al)
-
-			p1.Scond = arm.C_SCOND_LO
-		}
-
-		//	BLO	end
-		p5 = gc.Gbranch(arm.ABLO, nil, 0)
-
-		// s >= 64
-		if p6 != nil {
-			gc.Patch(p6, gc.Pc)
-		}
-		if bh.Type.Etype == gc.TINT32 {
-			//	MOVW	bh->31, al
-			gshift(arm.AMOVW, &bh, arm.SHIFT_AR, 31, &al)
-		} else {
-			gins(arm.AEOR, &al, &al)
-		}
-
-		gc.Patch(p2, gc.Pc)
-		gc.Patch(p3, gc.Pc)
-		gc.Patch(p4, gc.Pc)
-		gc.Patch(p5, gc.Pc)
-		gc.Regfree(&s)
-		gc.Regfree(&creg)
-
-	orsh_break:
-		gc.Regfree(&bl)
-		gc.Regfree(&bh)
-
-		// TODO(kaib): literal optimizations
-	// make constant the right side (it usually is anyway).
-	//		if(lo1.op == OLITERAL) {
-	//			nswap(&lo1, &lo2);
-	//			nswap(&hi1, &hi2);
-	//		}
-	//		if(lo2.op == OLITERAL) {
-	//			// special cases for constants.
-	//			lv = mpgetfix(lo2.val.u.xval);
-	//			hv = mpgetfix(hi2.val.u.xval);
-	//			splitclean();	// right side
-	//			split64(res, &lo2, &hi2);
-	//			switch(n->op) {
-	//			case OXOR:
-	//				gmove(&lo1, &lo2);
-	//				gmove(&hi1, &hi2);
-	//				switch(lv) {
-	//				case 0:
-	//					break;
-	//				case 0xffffffffu:
-	//					gins(ANOTL, N, &lo2);
-	//					break;
-	//				default:
-	//					gins(AXORL, ncon(lv), &lo2);
-	//					break;
-	//				}
-	//				switch(hv) {
-	//				case 0:
-	//					break;
-	//				case 0xffffffffu:
-	//					gins(ANOTL, N, &hi2);
-	//					break;
-	//				default:
-	//					gins(AXORL, ncon(hv), &hi2);
-	//					break;
-	//				}
-	//				break;
-
-	//			case OAND:
-	//				switch(lv) {
-	//				case 0:
-	//					gins(AMOVL, ncon(0), &lo2);
-	//					break;
-	//				default:
-	//					gmove(&lo1, &lo2);
-	//					if(lv != 0xffffffffu)
-	//						gins(AANDL, ncon(lv), &lo2);
-	//					break;
-	//				}
-	//				switch(hv) {
-	//				case 0:
-	//					gins(AMOVL, ncon(0), &hi2);
-	//					break;
-	//				default:
-	//					gmove(&hi1, &hi2);
-	//					if(hv != 0xffffffffu)
-	//						gins(AANDL, ncon(hv), &hi2);
-	//					break;
-	//				}
-	//				break;
-
-	//			case OOR:
-	//				switch(lv) {
-	//				case 0:
-	//					gmove(&lo1, &lo2);
-	//					break;
-	//				case 0xffffffffu:
-	//					gins(AMOVL, ncon(0xffffffffu), &lo2);
-	//					break;
-	//				default:
-	//					gmove(&lo1, &lo2);
-	//					gins(AORL, ncon(lv), &lo2);
-	//					break;
-	//				}
-	//				switch(hv) {
-	//				case 0:
-	//					gmove(&hi1, &hi2);
-	//					break;
-	//				case 0xffffffffu:
-	//					gins(AMOVL, ncon(0xffffffffu), &hi2);
-	//					break;
-	//				default:
-	//					gmove(&hi1, &hi2);
-	//					gins(AORL, ncon(hv), &hi2);
-	//					break;
-	//				}
-	//				break;
-	//			}
-	//			splitclean();
-	//			splitclean();
-	//			goto out;
-	//		}
-	case gc.OXOR,
-		gc.OAND,
-		gc.OOR:
-		var n1 gc.Node
-		gc.Regalloc(&n1, lo1.Type, nil)
-
-		gins(arm.AMOVW, &lo1, &al)
-		gins(arm.AMOVW, &hi1, &ah)
-		gins(arm.AMOVW, &lo2, &n1)
-		gins(optoas(int(n.Op), lo1.Type), &n1, &al)
-		gins(arm.AMOVW, &hi2, &n1)
-		gins(optoas(int(n.Op), lo1.Type), &n1, &ah)
-		gc.Regfree(&n1)
-	}
-
-	if gc.Is64(r.Type) {
-		splitclean()
-	}
-	splitclean()
-
-	split64(res, &lo1, &hi1)
-	gins(arm.AMOVW, &al, &lo1)
-	gins(arm.AMOVW, &ah, &hi1)
-	splitclean()
-
-	//out:
-	gc.Regfree(&al)
-
-	gc.Regfree(&ah)
-}
-
-/*
- * generate comparison of nl, nr, both 64-bit.
- * nl is memory; nr is constant or memory.
- */
-func cmp64(nl *gc.Node, nr *gc.Node, op int, likely int, to *obj.Prog) {
-	var lo1 gc.Node
-	var hi1 gc.Node
-	var lo2 gc.Node
-	var hi2 gc.Node
-	var r1 gc.Node
-	var r2 gc.Node
-
-	split64(nl, &lo1, &hi1)
-	split64(nr, &lo2, &hi2)
-
-	// compare most significant word;
-	// if they differ, we're done.
-	t := hi1.Type
-
-	gc.Regalloc(&r1, gc.Types[gc.TINT32], nil)
-	gc.Regalloc(&r2, gc.Types[gc.TINT32], nil)
-	gins(arm.AMOVW, &hi1, &r1)
-	gins(arm.AMOVW, &hi2, &r2)
-	gins(arm.ACMP, &r1, &r2)
-	gc.Regfree(&r1)
-	gc.Regfree(&r2)
-
-	var br *obj.Prog
-	switch op {
-	default:
-		gc.Fatal("cmp64 %v %v", gc.Oconv(int(op), 0), t)
-
-		// cmp hi
-	// bne L
-	// cmp lo
-	// beq to
-	// L:
-	case gc.OEQ:
-		br = gc.Gbranch(arm.ABNE, nil, -likely)
-
-		// cmp hi
-	// bne to
-	// cmp lo
-	// bne to
-	case gc.ONE:
-		gc.Patch(gc.Gbranch(arm.ABNE, nil, likely), to)
-
-		// cmp hi
-	// bgt to
-	// blt L
-	// cmp lo
-	// bge to (or bgt to)
-	// L:
-	case gc.OGE,
-		gc.OGT:
-		gc.Patch(gc.Gbranch(optoas(gc.OGT, t), nil, likely), to)
-
-		br = gc.Gbranch(optoas(gc.OLT, t), nil, -likely)
-
-		// cmp hi
-	// blt to
-	// bgt L
-	// cmp lo
-	// ble to (or jlt to)
-	// L:
-	case gc.OLE,
-		gc.OLT:
-		gc.Patch(gc.Gbranch(optoas(gc.OLT, t), nil, likely), to)
-
-		br = gc.Gbranch(optoas(gc.OGT, t), nil, -likely)
-	}
-
-	// compare least significant word
-	t = lo1.Type
-
-	gc.Regalloc(&r1, gc.Types[gc.TINT32], nil)
-	gc.Regalloc(&r2, gc.Types[gc.TINT32], nil)
-	gins(arm.AMOVW, &lo1, &r1)
-	gins(arm.AMOVW, &lo2, &r2)
-	gins(arm.ACMP, &r1, &r2)
-	gc.Regfree(&r1)
-	gc.Regfree(&r2)
-
-	// jump again
-	gc.Patch(gc.Gbranch(optoas(op, t), nil, likely), to)
-
-	// point first branch down here if appropriate
-	if br != nil {
-		gc.Patch(br, gc.Pc)
-	}
-
-	splitclean()
-	splitclean()
-}
diff --git a/src/cmd/compile/internal/arm/galign.go b/src/cmd/compile/internal/arm/galign.go
deleted file mode 100644
index 60a39d3..0000000
--- a/src/cmd/compile/internal/arm/galign.go
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package arm
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/arm"
-)
-
-var thechar int = '5'
-
-var thestring string = "arm"
-
-var thelinkarch *obj.LinkArch = &arm.Linkarm
-
-func linkarchinit() {
-}
-
-var MAXWIDTH int64 = (1 << 32) - 1
-
-/*
- * go declares several platform-specific type aliases:
- * int, uint, and uintptr
- */
-var typedefs = []gc.Typedef{
-	gc.Typedef{"int", gc.TINT, gc.TINT32},
-	gc.Typedef{"uint", gc.TUINT, gc.TUINT32},
-	gc.Typedef{"uintptr", gc.TUINTPTR, gc.TUINT32},
-}
-
-func betypeinit() {
-	gc.Widthptr = 4
-	gc.Widthint = 4
-	gc.Widthreg = 4
-}
-
-func Main() {
-	gc.Thearch.Thechar = thechar
-	gc.Thearch.Thestring = thestring
-	gc.Thearch.Thelinkarch = thelinkarch
-	gc.Thearch.Typedefs = typedefs
-	gc.Thearch.REGSP = arm.REGSP
-	gc.Thearch.REGCTXT = arm.REGCTXT
-	gc.Thearch.REGCALLX = arm.REG_R1
-	gc.Thearch.REGCALLX2 = arm.REG_R2
-	gc.Thearch.REGRETURN = arm.REG_R0
-	gc.Thearch.REGMIN = arm.REG_R0
-	gc.Thearch.REGMAX = arm.REGEXT
-	gc.Thearch.FREGMIN = arm.REG_F0
-	gc.Thearch.FREGMAX = arm.FREGEXT
-	gc.Thearch.MAXWIDTH = MAXWIDTH
-	gc.Thearch.ReservedRegs = resvd
-
-	gc.Thearch.Betypeinit = betypeinit
-	gc.Thearch.Cgen64 = cgen64
-	gc.Thearch.Cgen_hmul = cgen_hmul
-	gc.Thearch.Cgen_shift = cgen_shift
-	gc.Thearch.Clearfat = clearfat
-	gc.Thearch.Cmp64 = cmp64
-	gc.Thearch.Defframe = defframe
-	gc.Thearch.Excise = excise
-	gc.Thearch.Expandchecks = expandchecks
-	gc.Thearch.Getg = getg
-	gc.Thearch.Gins = gins
-	gc.Thearch.Ginscmp = ginscmp
-	gc.Thearch.Ginscon = ginscon
-	gc.Thearch.Ginsnop = ginsnop
-	gc.Thearch.Gmove = gmove
-	gc.Thearch.Cgenindex = cgenindex
-	gc.Thearch.Linkarchinit = linkarchinit
-	gc.Thearch.Peep = peep
-	gc.Thearch.Proginfo = proginfo
-	gc.Thearch.Regtyp = regtyp
-	gc.Thearch.Sameaddr = sameaddr
-	gc.Thearch.Smallindir = smallindir
-	gc.Thearch.Stackaddr = stackaddr
-	gc.Thearch.Blockcopy = blockcopy
-	gc.Thearch.Sudoaddable = sudoaddable
-	gc.Thearch.Sudoclean = sudoclean
-	gc.Thearch.Excludedregs = excludedregs
-	gc.Thearch.RtoB = RtoB
-	gc.Thearch.FtoB = RtoB
-	gc.Thearch.BtoR = BtoR
-	gc.Thearch.BtoF = BtoF
-	gc.Thearch.Optoas = optoas
-	gc.Thearch.Doregbits = doregbits
-	gc.Thearch.Regnames = regnames
-
-	gc.Main()
-	gc.Exit(0)
-}
diff --git a/src/cmd/compile/internal/arm/ggen.go b/src/cmd/compile/internal/arm/ggen.go
deleted file mode 100644
index 2d19d75..0000000
--- a/src/cmd/compile/internal/arm/ggen.go
+++ /dev/null
@@ -1,529 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package arm
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/arm"
-)
-
-func defframe(ptxt *obj.Prog) {
-	var n *gc.Node
-
-	// fill in argument size, stack size
-	ptxt.To.Type = obj.TYPE_TEXTSIZE
-
-	ptxt.To.Val = int32(gc.Rnd(gc.Curfn.Type.Argwid, int64(gc.Widthptr)))
-	frame := uint32(gc.Rnd(gc.Stksize+gc.Maxarg, int64(gc.Widthreg)))
-	ptxt.To.Offset = int64(frame)
-
-	// insert code to contain ambiguously live variables
-	// so that garbage collector only sees initialized values
-	// when it looks for pointers.
-	p := ptxt
-
-	hi := int64(0)
-	lo := hi
-	r0 := uint32(0)
-	for l := gc.Curfn.Func.Dcl; l != nil; l = l.Next {
-		n = l.N
-		if !n.Name.Needzero {
-			continue
-		}
-		if n.Class != gc.PAUTO {
-			gc.Fatal("needzero class %d", n.Class)
-		}
-		if n.Type.Width%int64(gc.Widthptr) != 0 || n.Xoffset%int64(gc.Widthptr) != 0 || n.Type.Width == 0 {
-			gc.Fatal("var %v has size %d offset %d", gc.Nconv(n, obj.FmtLong), int(n.Type.Width), int(n.Xoffset))
-		}
-		if lo != hi && n.Xoffset+n.Type.Width >= lo-int64(2*gc.Widthptr) {
-			// merge with range we already have
-			lo = gc.Rnd(n.Xoffset, int64(gc.Widthptr))
-
-			continue
-		}
-
-		// zero old range
-		p = zerorange(p, int64(frame), lo, hi, &r0)
-
-		// set new range
-		hi = n.Xoffset + n.Type.Width
-
-		lo = n.Xoffset
-	}
-
-	// zero final range
-	zerorange(p, int64(frame), lo, hi, &r0)
-}
-
-func zerorange(p *obj.Prog, frame int64, lo int64, hi int64, r0 *uint32) *obj.Prog {
-	cnt := hi - lo
-	if cnt == 0 {
-		return p
-	}
-	if *r0 == 0 {
-		p = appendpp(p, arm.AMOVW, obj.TYPE_CONST, 0, 0, obj.TYPE_REG, arm.REG_R0, 0)
-		*r0 = 1
-	}
-
-	if cnt < int64(4*gc.Widthptr) {
-		for i := int64(0); i < cnt; i += int64(gc.Widthptr) {
-			p = appendpp(p, arm.AMOVW, obj.TYPE_REG, arm.REG_R0, 0, obj.TYPE_MEM, arm.REGSP, int32(4+frame+lo+i))
-		}
-	} else if !gc.Nacl && (cnt <= int64(128*gc.Widthptr)) {
-		p = appendpp(p, arm.AADD, obj.TYPE_CONST, 0, int32(4+frame+lo), obj.TYPE_REG, arm.REG_R1, 0)
-		p.Reg = arm.REGSP
-		p = appendpp(p, obj.ADUFFZERO, obj.TYPE_NONE, 0, 0, obj.TYPE_MEM, 0, 0)
-		f := gc.Sysfunc("duffzero")
-		gc.Naddr(&p.To, f)
-		gc.Afunclit(&p.To, f)
-		p.To.Offset = 4 * (128 - cnt/int64(gc.Widthptr))
-	} else {
-		p = appendpp(p, arm.AADD, obj.TYPE_CONST, 0, int32(4+frame+lo), obj.TYPE_REG, arm.REG_R1, 0)
-		p.Reg = arm.REGSP
-		p = appendpp(p, arm.AADD, obj.TYPE_CONST, 0, int32(cnt), obj.TYPE_REG, arm.REG_R2, 0)
-		p.Reg = arm.REG_R1
-		p = appendpp(p, arm.AMOVW, obj.TYPE_REG, arm.REG_R0, 0, obj.TYPE_MEM, arm.REG_R1, 4)
-		p1 := p
-		p.Scond |= arm.C_PBIT
-		p = appendpp(p, arm.ACMP, obj.TYPE_REG, arm.REG_R1, 0, obj.TYPE_NONE, 0, 0)
-		p.Reg = arm.REG_R2
-		p = appendpp(p, arm.ABNE, obj.TYPE_NONE, 0, 0, obj.TYPE_BRANCH, 0, 0)
-		gc.Patch(p, p1)
-	}
-
-	return p
-}
-
-func appendpp(p *obj.Prog, as int, ftype int, freg int, foffset int32, ttype int, treg int, toffset int32) *obj.Prog {
-	q := gc.Ctxt.NewProg()
-	gc.Clearp(q)
-	q.As = int16(as)
-	q.Lineno = p.Lineno
-	q.From.Type = int16(ftype)
-	q.From.Reg = int16(freg)
-	q.From.Offset = int64(foffset)
-	q.To.Type = int16(ttype)
-	q.To.Reg = int16(treg)
-	q.To.Offset = int64(toffset)
-	q.Link = p.Link
-	p.Link = q
-	return q
-}
-
-/*
- * generate high multiply
- *  res = (nl * nr) >> wordsize
- */
-func cgen_hmul(nl *gc.Node, nr *gc.Node, res *gc.Node) {
-	if nl.Ullman < nr.Ullman {
-		tmp := nl
-		nl = nr
-		nr = tmp
-	}
-
-	t := nl.Type
-	w := int(t.Width * 8)
-	var n1 gc.Node
-	gc.Regalloc(&n1, t, res)
-	gc.Cgen(nl, &n1)
-	var n2 gc.Node
-	gc.Regalloc(&n2, t, nil)
-	gc.Cgen(nr, &n2)
-	switch gc.Simtype[t.Etype] {
-	case gc.TINT8,
-		gc.TINT16:
-		gins(optoas(gc.OMUL, t), &n2, &n1)
-		gshift(arm.AMOVW, &n1, arm.SHIFT_AR, int32(w), &n1)
-
-	case gc.TUINT8,
-		gc.TUINT16:
-		gins(optoas(gc.OMUL, t), &n2, &n1)
-		gshift(arm.AMOVW, &n1, arm.SHIFT_LR, int32(w), &n1)
-
-		// perform a long multiplication.
-	case gc.TINT32,
-		gc.TUINT32:
-		var p *obj.Prog
-		if gc.Issigned[t.Etype] {
-			p = gins(arm.AMULL, &n2, nil)
-		} else {
-			p = gins(arm.AMULLU, &n2, nil)
-		}
-
-		// n2 * n1 -> (n1 n2)
-		p.Reg = n1.Reg
-
-		p.To.Type = obj.TYPE_REGREG
-		p.To.Reg = n1.Reg
-		p.To.Offset = int64(n2.Reg)
-
-	default:
-		gc.Fatal("cgen_hmul %v", t)
-	}
-
-	gc.Cgen(&n1, res)
-	gc.Regfree(&n1)
-	gc.Regfree(&n2)
-}
-
-/*
- * generate shift according to op, one of:
- *	res = nl << nr
- *	res = nl >> nr
- */
-func cgen_shift(op int, bounded bool, nl *gc.Node, nr *gc.Node, res *gc.Node) {
-	if nl.Type.Width > 4 {
-		gc.Fatal("cgen_shift %v", nl.Type)
-	}
-
-	w := int(nl.Type.Width * 8)
-
-	if op == gc.OLROT {
-		v := nr.Int()
-		var n1 gc.Node
-		gc.Regalloc(&n1, nl.Type, res)
-		if w == 32 {
-			gc.Cgen(nl, &n1)
-			gshift(arm.AMOVW, &n1, arm.SHIFT_RR, int32(w)-int32(v), &n1)
-		} else {
-			var n2 gc.Node
-			gc.Regalloc(&n2, nl.Type, nil)
-			gc.Cgen(nl, &n2)
-			gshift(arm.AMOVW, &n2, arm.SHIFT_LL, int32(v), &n1)
-			gshift(arm.AORR, &n2, arm.SHIFT_LR, int32(w)-int32(v), &n1)
-			gc.Regfree(&n2)
-
-			// Ensure sign/zero-extended result.
-			gins(optoas(gc.OAS, nl.Type), &n1, &n1)
-		}
-
-		gmove(&n1, res)
-		gc.Regfree(&n1)
-		return
-	}
-
-	if nr.Op == gc.OLITERAL {
-		var n1 gc.Node
-		gc.Regalloc(&n1, nl.Type, res)
-		gc.Cgen(nl, &n1)
-		sc := uint64(nr.Int())
-		if sc == 0 {
-		} else // nothing to do
-		if sc >= uint64(nl.Type.Width*8) {
-			if op == gc.ORSH && gc.Issigned[nl.Type.Etype] {
-				gshift(arm.AMOVW, &n1, arm.SHIFT_AR, int32(w), &n1)
-			} else {
-				gins(arm.AEOR, &n1, &n1)
-			}
-		} else {
-			if op == gc.ORSH && gc.Issigned[nl.Type.Etype] {
-				gshift(arm.AMOVW, &n1, arm.SHIFT_AR, int32(sc), &n1)
-			} else if op == gc.ORSH {
-				gshift(arm.AMOVW, &n1, arm.SHIFT_LR, int32(sc), &n1) // OLSH
-			} else {
-				gshift(arm.AMOVW, &n1, arm.SHIFT_LL, int32(sc), &n1)
-			}
-		}
-
-		if w < 32 && op == gc.OLSH {
-			gins(optoas(gc.OAS, nl.Type), &n1, &n1)
-		}
-		gmove(&n1, res)
-		gc.Regfree(&n1)
-		return
-	}
-
-	tr := nr.Type
-	var t gc.Node
-	var n1 gc.Node
-	var n2 gc.Node
-	var n3 gc.Node
-	if tr.Width > 4 {
-		var nt gc.Node
-		gc.Tempname(&nt, nr.Type)
-		if nl.Ullman >= nr.Ullman {
-			gc.Regalloc(&n2, nl.Type, res)
-			gc.Cgen(nl, &n2)
-			gc.Cgen(nr, &nt)
-			n1 = nt
-		} else {
-			gc.Cgen(nr, &nt)
-			gc.Regalloc(&n2, nl.Type, res)
-			gc.Cgen(nl, &n2)
-		}
-
-		var hi gc.Node
-		var lo gc.Node
-		split64(&nt, &lo, &hi)
-		gc.Regalloc(&n1, gc.Types[gc.TUINT32], nil)
-		gc.Regalloc(&n3, gc.Types[gc.TUINT32], nil)
-		gmove(&lo, &n1)
-		gmove(&hi, &n3)
-		splitclean()
-		gins(arm.ATST, &n3, nil)
-		gc.Nodconst(&t, gc.Types[gc.TUINT32], int64(w))
-		p1 := gins(arm.AMOVW, &t, &n1)
-		p1.Scond = arm.C_SCOND_NE
-		tr = gc.Types[gc.TUINT32]
-		gc.Regfree(&n3)
-	} else {
-		if nl.Ullman >= nr.Ullman {
-			gc.Regalloc(&n2, nl.Type, res)
-			gc.Cgen(nl, &n2)
-			gc.Regalloc(&n1, nr.Type, nil)
-			gc.Cgen(nr, &n1)
-		} else {
-			gc.Regalloc(&n1, nr.Type, nil)
-			gc.Cgen(nr, &n1)
-			gc.Regalloc(&n2, nl.Type, res)
-			gc.Cgen(nl, &n2)
-		}
-	}
-
-	// test for shift being 0
-	gins(arm.ATST, &n1, nil)
-
-	p3 := gc.Gbranch(arm.ABEQ, nil, -1)
-
-	// test and fix up large shifts
-	// TODO: if(!bounded), don't emit some of this.
-	gc.Regalloc(&n3, tr, nil)
-
-	gc.Nodconst(&t, gc.Types[gc.TUINT32], int64(w))
-	gmove(&t, &n3)
-	gins(arm.ACMP, &n1, &n3)
-	if op == gc.ORSH {
-		var p1 *obj.Prog
-		var p2 *obj.Prog
-		if gc.Issigned[nl.Type.Etype] {
-			p1 = gshift(arm.AMOVW, &n2, arm.SHIFT_AR, int32(w)-1, &n2)
-			p2 = gregshift(arm.AMOVW, &n2, arm.SHIFT_AR, &n1, &n2)
-		} else {
-			p1 = gins(arm.AEOR, &n2, &n2)
-			p2 = gregshift(arm.AMOVW, &n2, arm.SHIFT_LR, &n1, &n2)
-		}
-
-		p1.Scond = arm.C_SCOND_HS
-		p2.Scond = arm.C_SCOND_LO
-	} else {
-		p1 := gins(arm.AEOR, &n2, &n2)
-		p2 := gregshift(arm.AMOVW, &n2, arm.SHIFT_LL, &n1, &n2)
-		p1.Scond = arm.C_SCOND_HS
-		p2.Scond = arm.C_SCOND_LO
-	}
-
-	gc.Regfree(&n3)
-
-	gc.Patch(p3, gc.Pc)
-
-	// Left-shift of smaller word must be sign/zero-extended.
-	if w < 32 && op == gc.OLSH {
-		gins(optoas(gc.OAS, nl.Type), &n2, &n2)
-	}
-	gmove(&n2, res)
-
-	gc.Regfree(&n1)
-	gc.Regfree(&n2)
-}
-
-func clearfat(nl *gc.Node) {
-	/* clear a fat object */
-	if gc.Debug['g'] != 0 {
-		gc.Dump("\nclearfat", nl)
-	}
-
-	w := uint32(nl.Type.Width)
-
-	// Avoid taking the address for simple enough types.
-	if gc.Componentgen(nil, nl) {
-		return
-	}
-
-	c := w % 4 // bytes
-	q := w / 4 // quads
-
-	var r0 gc.Node
-	r0.Op = gc.OREGISTER
-
-	r0.Reg = arm.REG_R0
-	var r1 gc.Node
-	r1.Op = gc.OREGISTER
-	r1.Reg = arm.REG_R1
-	var dst gc.Node
-	gc.Regalloc(&dst, gc.Types[gc.Tptr], &r1)
-	gc.Agen(nl, &dst)
-	var nc gc.Node
-	gc.Nodconst(&nc, gc.Types[gc.TUINT32], 0)
-	var nz gc.Node
-	gc.Regalloc(&nz, gc.Types[gc.TUINT32], &r0)
-	gc.Cgen(&nc, &nz)
-
-	if q > 128 {
-		var end gc.Node
-		gc.Regalloc(&end, gc.Types[gc.Tptr], nil)
-		p := gins(arm.AMOVW, &dst, &end)
-		p.From.Type = obj.TYPE_ADDR
-		p.From.Offset = int64(q) * 4
-
-		p = gins(arm.AMOVW, &nz, &dst)
-		p.To.Type = obj.TYPE_MEM
-		p.To.Offset = 4
-		p.Scond |= arm.C_PBIT
-		pl := p
-
-		p = gins(arm.ACMP, &dst, nil)
-		raddr(&end, p)
-		gc.Patch(gc.Gbranch(arm.ABNE, nil, 0), pl)
-
-		gc.Regfree(&end)
-	} else if q >= 4 && !gc.Nacl {
-		f := gc.Sysfunc("duffzero")
-		p := gins(obj.ADUFFZERO, nil, f)
-		gc.Afunclit(&p.To, f)
-
-		// 4 and 128 = magic constants: see ../../runtime/asm_arm.s
-		p.To.Offset = 4 * (128 - int64(q))
-	} else {
-		var p *obj.Prog
-		for q > 0 {
-			p = gins(arm.AMOVW, &nz, &dst)
-			p.To.Type = obj.TYPE_MEM
-			p.To.Offset = 4
-			p.Scond |= arm.C_PBIT
-
-			//print("1. %v\n", p);
-			q--
-		}
-	}
-
-	var p *obj.Prog
-	for c > 0 {
-		p = gins(arm.AMOVB, &nz, &dst)
-		p.To.Type = obj.TYPE_MEM
-		p.To.Offset = 1
-		p.Scond |= arm.C_PBIT
-
-		//print("2. %v\n", p);
-		c--
-	}
-
-	gc.Regfree(&dst)
-	gc.Regfree(&nz)
-}
-
-// Called after regopt and peep have run.
-// Expand CHECKNIL pseudo-op into actual nil pointer check.
-func expandchecks(firstp *obj.Prog) {
-	var reg int
-	var p1 *obj.Prog
-
-	for p := firstp; p != nil; p = p.Link {
-		if p.As != obj.ACHECKNIL {
-			continue
-		}
-		if gc.Debug_checknil != 0 && p.Lineno > 1 { // p->lineno==1 in generated wrappers
-			gc.Warnl(int(p.Lineno), "generated nil check")
-		}
-		if p.From.Type != obj.TYPE_REG {
-			gc.Fatal("invalid nil check %v", p)
-		}
-		reg = int(p.From.Reg)
-
-		// check is
-		//	CMP arg, $0
-		//	MOV.EQ arg, 0(arg)
-		p1 = gc.Ctxt.NewProg()
-
-		gc.Clearp(p1)
-		p1.Link = p.Link
-		p.Link = p1
-		p1.Lineno = p.Lineno
-		p1.Pc = 9999
-		p1.As = arm.AMOVW
-		p1.From.Type = obj.TYPE_REG
-		p1.From.Reg = int16(reg)
-		p1.To.Type = obj.TYPE_MEM
-		p1.To.Reg = int16(reg)
-		p1.To.Offset = 0
-		p1.Scond = arm.C_SCOND_EQ
-		p.As = arm.ACMP
-		p.From.Type = obj.TYPE_CONST
-		p.From.Reg = 0
-		p.From.Offset = 0
-		p.Reg = int16(reg)
-	}
-}
-
-func ginsnop() {
-	var r gc.Node
-	gc.Nodreg(&r, gc.Types[gc.TINT], arm.REG_R0)
-	p := gins(arm.AAND, &r, &r)
-	p.Scond = arm.C_SCOND_EQ
-}
-
-/*
- * generate
- *	as $c, n
- */
-func ginscon(as int, c int64, n *gc.Node) {
-	var n1 gc.Node
-	gc.Nodconst(&n1, gc.Types[gc.TINT32], c)
-	var n2 gc.Node
-	gc.Regalloc(&n2, gc.Types[gc.TINT32], nil)
-	gmove(&n1, &n2)
-	gins(as, &n2, n)
-	gc.Regfree(&n2)
-}
-
-func ginscmp(op int, t *gc.Type, n1, n2 *gc.Node, likely int) *obj.Prog {
-	if gc.Isint[t.Etype] && n1.Op == gc.OLITERAL && n1.Int() == 0 && n2.Op != gc.OLITERAL {
-		op = gc.Brrev(op)
-		n1, n2 = n2, n1
-	}
-	var r1, r2, g1, g2 gc.Node
-	gc.Regalloc(&r1, t, n1)
-	gc.Regalloc(&g1, n1.Type, &r1)
-	gc.Cgen(n1, &g1)
-	gmove(&g1, &r1)
-	if gc.Isint[t.Etype] && n2.Op == gc.OLITERAL && n2.Int() == 0 {
-		gins(arm.ACMP, &r1, n2)
-	} else {
-		gc.Regalloc(&r2, t, n2)
-		gc.Regalloc(&g2, n1.Type, &r2)
-		gc.Cgen(n2, &g2)
-		gmove(&g2, &r2)
-		gins(optoas(gc.OCMP, t), &r1, &r2)
-		gc.Regfree(&g2)
-		gc.Regfree(&r2)
-	}
-	gc.Regfree(&g1)
-	gc.Regfree(&r1)
-	return gc.Gbranch(optoas(op, t), nil, likely)
-}
-
-// addr += index*width if possible.
-func addindex(index *gc.Node, width int64, addr *gc.Node) bool {
-	switch width {
-	case 2:
-		gshift(arm.AADD, index, arm.SHIFT_LL, 1, addr)
-		return true
-	case 4:
-		gshift(arm.AADD, index, arm.SHIFT_LL, 2, addr)
-		return true
-	case 8:
-		gshift(arm.AADD, index, arm.SHIFT_LL, 3, addr)
-		return true
-	}
-	return false
-}
-
-// res = runtime.getg()
-func getg(res *gc.Node) {
-	var n1 gc.Node
-	gc.Nodreg(&n1, res.Type, arm.REGG)
-	gmove(&n1, res)
-}
diff --git a/src/cmd/compile/internal/arm/gsubr.go b/src/cmd/compile/internal/arm/gsubr.go
deleted file mode 100644
index a0a7ba2..0000000
--- a/src/cmd/compile/internal/arm/gsubr.go
+++ /dev/null
@@ -1,1209 +0,0 @@
-// Derived from Inferno utils/5c/txt.c
-// http://code.google.com/p/inferno-os/source/browse/utils/5c/txt.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package arm
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/arm"
-	"fmt"
-)
-
-var resvd = []int{
-	arm.REG_R9,  // formerly reserved for m; might be okay to reuse now; not sure about NaCl
-	arm.REG_R10, // reserved for g
-}
-
-/*
- * return constant i node.
- * overwritten by next call, but useful in calls to gins.
- */
-
-var ncon_n gc.Node
-
-func ncon(i uint32) *gc.Node {
-	if ncon_n.Type == nil {
-		gc.Nodconst(&ncon_n, gc.Types[gc.TUINT32], 0)
-	}
-	ncon_n.SetInt(int64(i))
-	return &ncon_n
-}
-
-var sclean [10]gc.Node
-
-var nsclean int
-
-/*
- * n is a 64-bit value.  fill in lo and hi to refer to its 32-bit halves.
- */
-func split64(n *gc.Node, lo *gc.Node, hi *gc.Node) {
-	if !gc.Is64(n.Type) {
-		gc.Fatal("split64 %v", n.Type)
-	}
-
-	if nsclean >= len(sclean) {
-		gc.Fatal("split64 clean")
-	}
-	sclean[nsclean].Op = gc.OEMPTY
-	nsclean++
-	switch n.Op {
-	default:
-		switch n.Op {
-		default:
-			var n1 gc.Node
-			if !dotaddable(n, &n1) {
-				gc.Igen(n, &n1, nil)
-				sclean[nsclean-1] = n1
-			}
-
-			n = &n1
-
-		case gc.ONAME:
-			if n.Class == gc.PPARAMREF {
-				var n1 gc.Node
-				gc.Cgen(n.Name.Heapaddr, &n1)
-				sclean[nsclean-1] = n1
-				n = &n1
-			}
-
-			// nothing
-		case gc.OINDREG:
-			break
-		}
-
-		*lo = *n
-		*hi = *n
-		lo.Type = gc.Types[gc.TUINT32]
-		if n.Type.Etype == gc.TINT64 {
-			hi.Type = gc.Types[gc.TINT32]
-		} else {
-			hi.Type = gc.Types[gc.TUINT32]
-		}
-		hi.Xoffset += 4
-
-	case gc.OLITERAL:
-		var n1 gc.Node
-		n.Convconst(&n1, n.Type)
-		i := n1.Int()
-		gc.Nodconst(lo, gc.Types[gc.TUINT32], int64(uint32(i)))
-		i >>= 32
-		if n.Type.Etype == gc.TINT64 {
-			gc.Nodconst(hi, gc.Types[gc.TINT32], int64(int32(i)))
-		} else {
-			gc.Nodconst(hi, gc.Types[gc.TUINT32], int64(uint32(i)))
-		}
-	}
-}
-
-func splitclean() {
-	if nsclean <= 0 {
-		gc.Fatal("splitclean")
-	}
-	nsclean--
-	if sclean[nsclean].Op != gc.OEMPTY {
-		gc.Regfree(&sclean[nsclean])
-	}
-}
-
-func gmove(f *gc.Node, t *gc.Node) {
-	if gc.Debug['M'] != 0 {
-		fmt.Printf("gmove %v -> %v\n", f, t)
-	}
-
-	ft := gc.Simsimtype(f.Type)
-	tt := gc.Simsimtype(t.Type)
-	cvt := t.Type
-
-	if gc.Iscomplex[ft] || gc.Iscomplex[tt] {
-		gc.Complexmove(f, t)
-		return
-	}
-
-	// cannot have two memory operands;
-	// except 64-bit, which always copies via registers anyway.
-	var a int
-	var r1 gc.Node
-	if !gc.Is64(f.Type) && !gc.Is64(t.Type) && gc.Ismem(f) && gc.Ismem(t) {
-		goto hard
-	}
-
-	// convert constant to desired type
-	if f.Op == gc.OLITERAL {
-		var con gc.Node
-		switch tt {
-		default:
-			f.Convconst(&con, t.Type)
-
-		case gc.TINT16,
-			gc.TINT8:
-			var con gc.Node
-			f.Convconst(&con, gc.Types[gc.TINT32])
-			var r1 gc.Node
-			gc.Regalloc(&r1, con.Type, t)
-			gins(arm.AMOVW, &con, &r1)
-			gmove(&r1, t)
-			gc.Regfree(&r1)
-			return
-
-		case gc.TUINT16,
-			gc.TUINT8:
-			var con gc.Node
-			f.Convconst(&con, gc.Types[gc.TUINT32])
-			var r1 gc.Node
-			gc.Regalloc(&r1, con.Type, t)
-			gins(arm.AMOVW, &con, &r1)
-			gmove(&r1, t)
-			gc.Regfree(&r1)
-			return
-		}
-
-		f = &con
-		ft = gc.Simsimtype(con.Type)
-
-		// constants can't move directly to memory
-		if gc.Ismem(t) && !gc.Is64(t.Type) {
-			goto hard
-		}
-	}
-
-	// value -> value copy, only one memory operand.
-	// figure out the instruction to use.
-	// break out of switch for one-instruction gins.
-	// goto rdst for "destination must be register".
-	// goto hard for "convert to cvt type first".
-	// otherwise handle and return.
-
-	switch uint32(ft)<<16 | uint32(tt) {
-	default:
-		// should not happen
-		gc.Fatal("gmove %v -> %v", f, t)
-		return
-
-		/*
-		 * integer copy and truncate
-		 */
-	case gc.TINT8<<16 | gc.TINT8: // same size
-		if !gc.Ismem(f) {
-			a = arm.AMOVB
-			break
-		}
-		fallthrough
-
-	case gc.TUINT8<<16 | gc.TINT8,
-		gc.TINT16<<16 | gc.TINT8, // truncate
-		gc.TUINT16<<16 | gc.TINT8,
-		gc.TINT32<<16 | gc.TINT8,
-		gc.TUINT32<<16 | gc.TINT8:
-		a = arm.AMOVBS
-
-	case gc.TUINT8<<16 | gc.TUINT8:
-		if !gc.Ismem(f) {
-			a = arm.AMOVB
-			break
-		}
-		fallthrough
-
-	case gc.TINT8<<16 | gc.TUINT8,
-		gc.TINT16<<16 | gc.TUINT8,
-		gc.TUINT16<<16 | gc.TUINT8,
-		gc.TINT32<<16 | gc.TUINT8,
-		gc.TUINT32<<16 | gc.TUINT8:
-		a = arm.AMOVBU
-
-	case gc.TINT64<<16 | gc.TINT8, // truncate low word
-		gc.TUINT64<<16 | gc.TINT8:
-		a = arm.AMOVBS
-
-		goto trunc64
-
-	case gc.TINT64<<16 | gc.TUINT8,
-		gc.TUINT64<<16 | gc.TUINT8:
-		a = arm.AMOVBU
-		goto trunc64
-
-	case gc.TINT16<<16 | gc.TINT16: // same size
-		if !gc.Ismem(f) {
-			a = arm.AMOVH
-			break
-		}
-		fallthrough
-
-	case gc.TUINT16<<16 | gc.TINT16,
-		gc.TINT32<<16 | gc.TINT16, // truncate
-		gc.TUINT32<<16 | gc.TINT16:
-		a = arm.AMOVHS
-
-	case gc.TUINT16<<16 | gc.TUINT16:
-		if !gc.Ismem(f) {
-			a = arm.AMOVH
-			break
-		}
-		fallthrough
-
-	case gc.TINT16<<16 | gc.TUINT16,
-		gc.TINT32<<16 | gc.TUINT16,
-		gc.TUINT32<<16 | gc.TUINT16:
-		a = arm.AMOVHU
-
-	case gc.TINT64<<16 | gc.TINT16, // truncate low word
-		gc.TUINT64<<16 | gc.TINT16:
-		a = arm.AMOVHS
-
-		goto trunc64
-
-	case gc.TINT64<<16 | gc.TUINT16,
-		gc.TUINT64<<16 | gc.TUINT16:
-		a = arm.AMOVHU
-		goto trunc64
-
-	case gc.TINT32<<16 | gc.TINT32, // same size
-		gc.TINT32<<16 | gc.TUINT32,
-		gc.TUINT32<<16 | gc.TINT32,
-		gc.TUINT32<<16 | gc.TUINT32:
-		a = arm.AMOVW
-
-	case gc.TINT64<<16 | gc.TINT32, // truncate
-		gc.TUINT64<<16 | gc.TINT32,
-		gc.TINT64<<16 | gc.TUINT32,
-		gc.TUINT64<<16 | gc.TUINT32:
-		var flo gc.Node
-		var fhi gc.Node
-		split64(f, &flo, &fhi)
-
-		var r1 gc.Node
-		gc.Regalloc(&r1, t.Type, nil)
-		gins(arm.AMOVW, &flo, &r1)
-		gins(arm.AMOVW, &r1, t)
-		gc.Regfree(&r1)
-		splitclean()
-		return
-
-	case gc.TINT64<<16 | gc.TINT64, // same size
-		gc.TINT64<<16 | gc.TUINT64,
-		gc.TUINT64<<16 | gc.TINT64,
-		gc.TUINT64<<16 | gc.TUINT64:
-		var fhi gc.Node
-		var flo gc.Node
-		split64(f, &flo, &fhi)
-
-		var tlo gc.Node
-		var thi gc.Node
-		split64(t, &tlo, &thi)
-		var r1 gc.Node
-		gc.Regalloc(&r1, flo.Type, nil)
-		var r2 gc.Node
-		gc.Regalloc(&r2, fhi.Type, nil)
-		gins(arm.AMOVW, &flo, &r1)
-		gins(arm.AMOVW, &fhi, &r2)
-		gins(arm.AMOVW, &r1, &tlo)
-		gins(arm.AMOVW, &r2, &thi)
-		gc.Regfree(&r1)
-		gc.Regfree(&r2)
-		splitclean()
-		splitclean()
-		return
-
-		/*
-		 * integer up-conversions
-		 */
-	case gc.TINT8<<16 | gc.TINT16, // sign extend int8
-		gc.TINT8<<16 | gc.TUINT16,
-		gc.TINT8<<16 | gc.TINT32,
-		gc.TINT8<<16 | gc.TUINT32:
-		a = arm.AMOVBS
-
-		goto rdst
-
-	case gc.TINT8<<16 | gc.TINT64, // convert via int32
-		gc.TINT8<<16 | gc.TUINT64:
-		cvt = gc.Types[gc.TINT32]
-
-		goto hard
-
-	case gc.TUINT8<<16 | gc.TINT16, // zero extend uint8
-		gc.TUINT8<<16 | gc.TUINT16,
-		gc.TUINT8<<16 | gc.TINT32,
-		gc.TUINT8<<16 | gc.TUINT32:
-		a = arm.AMOVBU
-
-		goto rdst
-
-	case gc.TUINT8<<16 | gc.TINT64, // convert via uint32
-		gc.TUINT8<<16 | gc.TUINT64:
-		cvt = gc.Types[gc.TUINT32]
-
-		goto hard
-
-	case gc.TINT16<<16 | gc.TINT32, // sign extend int16
-		gc.TINT16<<16 | gc.TUINT32:
-		a = arm.AMOVHS
-
-		goto rdst
-
-	case gc.TINT16<<16 | gc.TINT64, // convert via int32
-		gc.TINT16<<16 | gc.TUINT64:
-		cvt = gc.Types[gc.TINT32]
-
-		goto hard
-
-	case gc.TUINT16<<16 | gc.TINT32, // zero extend uint16
-		gc.TUINT16<<16 | gc.TUINT32:
-		a = arm.AMOVHU
-
-		goto rdst
-
-	case gc.TUINT16<<16 | gc.TINT64, // convert via uint32
-		gc.TUINT16<<16 | gc.TUINT64:
-		cvt = gc.Types[gc.TUINT32]
-
-		goto hard
-
-	case gc.TINT32<<16 | gc.TINT64, // sign extend int32
-		gc.TINT32<<16 | gc.TUINT64:
-		var tlo gc.Node
-		var thi gc.Node
-		split64(t, &tlo, &thi)
-
-		var r1 gc.Node
-		gc.Regalloc(&r1, tlo.Type, nil)
-		var r2 gc.Node
-		gc.Regalloc(&r2, thi.Type, nil)
-		gmove(f, &r1)
-		p1 := gins(arm.AMOVW, &r1, &r2)
-		p1.From.Type = obj.TYPE_SHIFT
-		p1.From.Offset = 2<<5 | 31<<7 | int64(r1.Reg)&15 // r1->31
-		p1.From.Reg = 0
-
-		//print("gmove: %v\n", p1);
-		gins(arm.AMOVW, &r1, &tlo)
-
-		gins(arm.AMOVW, &r2, &thi)
-		gc.Regfree(&r1)
-		gc.Regfree(&r2)
-		splitclean()
-		return
-
-	case gc.TUINT32<<16 | gc.TINT64, // zero extend uint32
-		gc.TUINT32<<16 | gc.TUINT64:
-		var thi gc.Node
-		var tlo gc.Node
-		split64(t, &tlo, &thi)
-
-		gmove(f, &tlo)
-		var r1 gc.Node
-		gc.Regalloc(&r1, thi.Type, nil)
-		gins(arm.AMOVW, ncon(0), &r1)
-		gins(arm.AMOVW, &r1, &thi)
-		gc.Regfree(&r1)
-		splitclean()
-		return
-
-		//	case CASE(TFLOAT64, TUINT64):
-	/*
-	* float to integer
-	 */
-	case gc.TFLOAT32<<16 | gc.TINT8,
-		gc.TFLOAT32<<16 | gc.TUINT8,
-		gc.TFLOAT32<<16 | gc.TINT16,
-		gc.TFLOAT32<<16 | gc.TUINT16,
-		gc.TFLOAT32<<16 | gc.TINT32,
-		gc.TFLOAT32<<16 | gc.TUINT32,
-
-		//	case CASE(TFLOAT32, TUINT64):
-
-		gc.TFLOAT64<<16 | gc.TINT8,
-		gc.TFLOAT64<<16 | gc.TUINT8,
-		gc.TFLOAT64<<16 | gc.TINT16,
-		gc.TFLOAT64<<16 | gc.TUINT16,
-		gc.TFLOAT64<<16 | gc.TINT32,
-		gc.TFLOAT64<<16 | gc.TUINT32:
-		fa := arm.AMOVF
-
-		a := arm.AMOVFW
-		if ft == gc.TFLOAT64 {
-			fa = arm.AMOVD
-			a = arm.AMOVDW
-		}
-
-		ta := arm.AMOVW
-		switch tt {
-		case gc.TINT8:
-			ta = arm.AMOVBS
-
-		case gc.TUINT8:
-			ta = arm.AMOVBU
-
-		case gc.TINT16:
-			ta = arm.AMOVHS
-
-		case gc.TUINT16:
-			ta = arm.AMOVHU
-		}
-
-		var r1 gc.Node
-		gc.Regalloc(&r1, gc.Types[ft], f)
-		var r2 gc.Node
-		gc.Regalloc(&r2, gc.Types[tt], t)
-		gins(fa, f, &r1)        // load to fpu
-		p1 := gins(a, &r1, &r1) // convert to w
-		switch tt {
-		case gc.TUINT8,
-			gc.TUINT16,
-			gc.TUINT32:
-			p1.Scond |= arm.C_UBIT
-		}
-
-		gins(arm.AMOVW, &r1, &r2) // copy to cpu
-		gins(ta, &r2, t)          // store
-		gc.Regfree(&r1)
-		gc.Regfree(&r2)
-		return
-
-		/*
-		 * integer to float
-		 */
-	case gc.TINT8<<16 | gc.TFLOAT32,
-		gc.TUINT8<<16 | gc.TFLOAT32,
-		gc.TINT16<<16 | gc.TFLOAT32,
-		gc.TUINT16<<16 | gc.TFLOAT32,
-		gc.TINT32<<16 | gc.TFLOAT32,
-		gc.TUINT32<<16 | gc.TFLOAT32,
-		gc.TINT8<<16 | gc.TFLOAT64,
-		gc.TUINT8<<16 | gc.TFLOAT64,
-		gc.TINT16<<16 | gc.TFLOAT64,
-		gc.TUINT16<<16 | gc.TFLOAT64,
-		gc.TINT32<<16 | gc.TFLOAT64,
-		gc.TUINT32<<16 | gc.TFLOAT64:
-		fa := arm.AMOVW
-
-		switch ft {
-		case gc.TINT8:
-			fa = arm.AMOVBS
-
-		case gc.TUINT8:
-			fa = arm.AMOVBU
-
-		case gc.TINT16:
-			fa = arm.AMOVHS
-
-		case gc.TUINT16:
-			fa = arm.AMOVHU
-		}
-
-		a := arm.AMOVWF
-		ta := arm.AMOVF
-		if tt == gc.TFLOAT64 {
-			a = arm.AMOVWD
-			ta = arm.AMOVD
-		}
-
-		var r1 gc.Node
-		gc.Regalloc(&r1, gc.Types[ft], f)
-		var r2 gc.Node
-		gc.Regalloc(&r2, gc.Types[tt], t)
-		gins(fa, f, &r1)          // load to cpu
-		gins(arm.AMOVW, &r1, &r2) // copy to fpu
-		p1 := gins(a, &r2, &r2)   // convert
-		switch ft {
-		case gc.TUINT8,
-			gc.TUINT16,
-			gc.TUINT32:
-			p1.Scond |= arm.C_UBIT
-		}
-
-		gins(ta, &r2, t) // store
-		gc.Regfree(&r1)
-		gc.Regfree(&r2)
-		return
-
-	case gc.TUINT64<<16 | gc.TFLOAT32,
-		gc.TUINT64<<16 | gc.TFLOAT64:
-		gc.Fatal("gmove UINT64, TFLOAT not implemented")
-		return
-
-		/*
-		 * float to float
-		 */
-	case gc.TFLOAT32<<16 | gc.TFLOAT32:
-		a = arm.AMOVF
-
-	case gc.TFLOAT64<<16 | gc.TFLOAT64:
-		a = arm.AMOVD
-
-	case gc.TFLOAT32<<16 | gc.TFLOAT64:
-		var r1 gc.Node
-		gc.Regalloc(&r1, gc.Types[gc.TFLOAT64], t)
-		gins(arm.AMOVF, f, &r1)
-		gins(arm.AMOVFD, &r1, &r1)
-		gins(arm.AMOVD, &r1, t)
-		gc.Regfree(&r1)
-		return
-
-	case gc.TFLOAT64<<16 | gc.TFLOAT32:
-		var r1 gc.Node
-		gc.Regalloc(&r1, gc.Types[gc.TFLOAT64], t)
-		gins(arm.AMOVD, f, &r1)
-		gins(arm.AMOVDF, &r1, &r1)
-		gins(arm.AMOVF, &r1, t)
-		gc.Regfree(&r1)
-		return
-	}
-
-	gins(a, f, t)
-	return
-
-	// TODO(kaib): we almost always require a register dest anyway, this can probably be
-	// removed.
-	// requires register destination
-rdst:
-	{
-		gc.Regalloc(&r1, t.Type, t)
-
-		gins(a, f, &r1)
-		gmove(&r1, t)
-		gc.Regfree(&r1)
-		return
-	}
-
-	// requires register intermediate
-hard:
-	gc.Regalloc(&r1, cvt, t)
-
-	gmove(f, &r1)
-	gmove(&r1, t)
-	gc.Regfree(&r1)
-	return
-
-	// truncate 64 bit integer
-trunc64:
-	var fhi gc.Node
-	var flo gc.Node
-	split64(f, &flo, &fhi)
-
-	gc.Regalloc(&r1, t.Type, nil)
-	gins(a, &flo, &r1)
-	gins(a, &r1, t)
-	gc.Regfree(&r1)
-	splitclean()
-	return
-}
-
-func samaddr(f *gc.Node, t *gc.Node) bool {
-	if f.Op != t.Op {
-		return false
-	}
-
-	switch f.Op {
-	case gc.OREGISTER:
-		if f.Reg != t.Reg {
-			break
-		}
-		return true
-	}
-
-	return false
-}
-
-/*
- * generate one instruction:
- *	as f, t
- */
-func gins(as int, f *gc.Node, t *gc.Node) *obj.Prog {
-	//	Node nod;
-	//	int32 v;
-
-	if f != nil && f.Op == gc.OINDEX {
-		gc.Fatal("gins OINDEX not implemented")
-	}
-
-	//		gc.Regalloc(&nod, &regnode, Z);
-	//		v = constnode.vconst;
-	//		gc.Cgen(f->right, &nod);
-	//		constnode.vconst = v;
-	//		idx.reg = nod.reg;
-	//		gc.Regfree(&nod);
-	if t != nil && t.Op == gc.OINDEX {
-		gc.Fatal("gins OINDEX not implemented")
-	}
-
-	//		gc.Regalloc(&nod, &regnode, Z);
-	//		v = constnode.vconst;
-	//		gc.Cgen(t->right, &nod);
-	//		constnode.vconst = v;
-	//		idx.reg = nod.reg;
-	//		gc.Regfree(&nod);
-
-	p := gc.Prog(as)
-	gc.Naddr(&p.From, f)
-	gc.Naddr(&p.To, t)
-
-	switch as {
-	case arm.ABL:
-		if p.To.Type == obj.TYPE_REG {
-			p.To.Type = obj.TYPE_MEM
-		}
-
-	case arm.ACMP, arm.ACMPF, arm.ACMPD:
-		if t != nil {
-			if f.Op != gc.OREGISTER {
-				/* generate a comparison
-				TODO(kaib): one of the args can actually be a small constant. relax the constraint and fix call sites.
-				*/
-				gc.Fatal("bad operands to gcmp")
-			}
-			p.From = p.To
-			p.To = obj.Addr{}
-			raddr(f, p)
-		}
-
-	case arm.AMULU:
-		if f != nil && f.Op != gc.OREGISTER {
-			gc.Fatal("bad operands to mul")
-		}
-
-	case arm.AMOVW:
-		if (p.From.Type == obj.TYPE_MEM || p.From.Type == obj.TYPE_ADDR || p.From.Type == obj.TYPE_CONST) && (p.To.Type == obj.TYPE_MEM || p.To.Type == obj.TYPE_ADDR) {
-			gc.Fatal("gins double memory")
-		}
-
-	case arm.AADD:
-		if p.To.Type == obj.TYPE_MEM {
-			gc.Fatal("gins arith to mem")
-		}
-
-	case arm.ARSB:
-		if p.From.Type == obj.TYPE_NONE {
-			gc.Fatal("rsb with no from")
-		}
-	}
-
-	if gc.Debug['g'] != 0 {
-		fmt.Printf("%v\n", p)
-	}
-	return p
-}
-
-/*
- * insert n into reg slot of p
- */
-func raddr(n *gc.Node, p *obj.Prog) {
-	var a obj.Addr
-	gc.Naddr(&a, n)
-	if a.Type != obj.TYPE_REG {
-		if n != nil {
-			gc.Fatal("bad in raddr: %v", gc.Oconv(int(n.Op), 0))
-		} else {
-			gc.Fatal("bad in raddr: <null>")
-		}
-		p.Reg = 0
-	} else {
-		p.Reg = a.Reg
-	}
-}
-
-/* generate a constant shift
- * arm encodes a shift by 32 as 0, thus asking for 0 shift is illegal.
- */
-func gshift(as int, lhs *gc.Node, stype int32, sval int32, rhs *gc.Node) *obj.Prog {
-	if sval <= 0 || sval > 32 {
-		gc.Fatal("bad shift value: %d", sval)
-	}
-
-	sval = sval & 0x1f
-
-	p := gins(as, nil, rhs)
-	p.From.Type = obj.TYPE_SHIFT
-	p.From.Offset = int64(stype) | int64(sval)<<7 | int64(lhs.Reg)&15
-	return p
-}
-
-/* generate a register shift
- */
-func gregshift(as int, lhs *gc.Node, stype int32, reg *gc.Node, rhs *gc.Node) *obj.Prog {
-	p := gins(as, nil, rhs)
-	p.From.Type = obj.TYPE_SHIFT
-	p.From.Offset = int64(stype) | (int64(reg.Reg)&15)<<8 | 1<<4 | int64(lhs.Reg)&15
-	return p
-}
-
-/*
- * return Axxx for Oxxx on type t.
- */
-func optoas(op int, t *gc.Type) int {
-	if t == nil {
-		gc.Fatal("optoas: t is nil")
-	}
-
-	a := obj.AXXX
-	switch uint32(op)<<16 | uint32(gc.Simtype[t.Etype]) {
-	default:
-		gc.Fatal("optoas: no entry %v-%v etype %v simtype %v", gc.Oconv(int(op), 0), t, gc.Types[t.Etype], gc.Types[gc.Simtype[t.Etype]])
-
-		/*	case CASE(OADDR, TPTR32):
-				a = ALEAL;
-				break;
-
-			case CASE(OADDR, TPTR64):
-				a = ALEAQ;
-				break;
-		*/
-	// TODO(kaib): make sure the conditional branches work on all edge cases
-	case gc.OEQ<<16 | gc.TBOOL,
-		gc.OEQ<<16 | gc.TINT8,
-		gc.OEQ<<16 | gc.TUINT8,
-		gc.OEQ<<16 | gc.TINT16,
-		gc.OEQ<<16 | gc.TUINT16,
-		gc.OEQ<<16 | gc.TINT32,
-		gc.OEQ<<16 | gc.TUINT32,
-		gc.OEQ<<16 | gc.TINT64,
-		gc.OEQ<<16 | gc.TUINT64,
-		gc.OEQ<<16 | gc.TPTR32,
-		gc.OEQ<<16 | gc.TPTR64,
-		gc.OEQ<<16 | gc.TFLOAT32,
-		gc.OEQ<<16 | gc.TFLOAT64:
-		a = arm.ABEQ
-
-	case gc.ONE<<16 | gc.TBOOL,
-		gc.ONE<<16 | gc.TINT8,
-		gc.ONE<<16 | gc.TUINT8,
-		gc.ONE<<16 | gc.TINT16,
-		gc.ONE<<16 | gc.TUINT16,
-		gc.ONE<<16 | gc.TINT32,
-		gc.ONE<<16 | gc.TUINT32,
-		gc.ONE<<16 | gc.TINT64,
-		gc.ONE<<16 | gc.TUINT64,
-		gc.ONE<<16 | gc.TPTR32,
-		gc.ONE<<16 | gc.TPTR64,
-		gc.ONE<<16 | gc.TFLOAT32,
-		gc.ONE<<16 | gc.TFLOAT64:
-		a = arm.ABNE
-
-	case gc.OLT<<16 | gc.TINT8,
-		gc.OLT<<16 | gc.TINT16,
-		gc.OLT<<16 | gc.TINT32,
-		gc.OLT<<16 | gc.TINT64,
-		gc.OLT<<16 | gc.TFLOAT32,
-		gc.OLT<<16 | gc.TFLOAT64:
-		a = arm.ABLT
-
-	case gc.OLT<<16 | gc.TUINT8,
-		gc.OLT<<16 | gc.TUINT16,
-		gc.OLT<<16 | gc.TUINT32,
-		gc.OLT<<16 | gc.TUINT64:
-		a = arm.ABLO
-
-	case gc.OLE<<16 | gc.TINT8,
-		gc.OLE<<16 | gc.TINT16,
-		gc.OLE<<16 | gc.TINT32,
-		gc.OLE<<16 | gc.TINT64,
-		gc.OLE<<16 | gc.TFLOAT32,
-		gc.OLE<<16 | gc.TFLOAT64:
-		a = arm.ABLE
-
-	case gc.OLE<<16 | gc.TUINT8,
-		gc.OLE<<16 | gc.TUINT16,
-		gc.OLE<<16 | gc.TUINT32,
-		gc.OLE<<16 | gc.TUINT64:
-		a = arm.ABLS
-
-	case gc.OGT<<16 | gc.TINT8,
-		gc.OGT<<16 | gc.TINT16,
-		gc.OGT<<16 | gc.TINT32,
-		gc.OGT<<16 | gc.TINT64,
-		gc.OGT<<16 | gc.TFLOAT32,
-		gc.OGT<<16 | gc.TFLOAT64:
-		a = arm.ABGT
-
-	case gc.OGT<<16 | gc.TUINT8,
-		gc.OGT<<16 | gc.TUINT16,
-		gc.OGT<<16 | gc.TUINT32,
-		gc.OGT<<16 | gc.TUINT64:
-		a = arm.ABHI
-
-	case gc.OGE<<16 | gc.TINT8,
-		gc.OGE<<16 | gc.TINT16,
-		gc.OGE<<16 | gc.TINT32,
-		gc.OGE<<16 | gc.TINT64,
-		gc.OGE<<16 | gc.TFLOAT32,
-		gc.OGE<<16 | gc.TFLOAT64:
-		a = arm.ABGE
-
-	case gc.OGE<<16 | gc.TUINT8,
-		gc.OGE<<16 | gc.TUINT16,
-		gc.OGE<<16 | gc.TUINT32,
-		gc.OGE<<16 | gc.TUINT64:
-		a = arm.ABHS
-
-	case gc.OCMP<<16 | gc.TBOOL,
-		gc.OCMP<<16 | gc.TINT8,
-		gc.OCMP<<16 | gc.TUINT8,
-		gc.OCMP<<16 | gc.TINT16,
-		gc.OCMP<<16 | gc.TUINT16,
-		gc.OCMP<<16 | gc.TINT32,
-		gc.OCMP<<16 | gc.TUINT32,
-		gc.OCMP<<16 | gc.TPTR32:
-		a = arm.ACMP
-
-	case gc.OCMP<<16 | gc.TFLOAT32:
-		a = arm.ACMPF
-
-	case gc.OCMP<<16 | gc.TFLOAT64:
-		a = arm.ACMPD
-
-	case gc.OPS<<16 | gc.TFLOAT32,
-		gc.OPS<<16 | gc.TFLOAT64:
-		a = arm.ABVS
-
-	case gc.OAS<<16 | gc.TBOOL:
-		a = arm.AMOVB
-
-	case gc.OAS<<16 | gc.TINT8:
-		a = arm.AMOVBS
-
-	case gc.OAS<<16 | gc.TUINT8:
-		a = arm.AMOVBU
-
-	case gc.OAS<<16 | gc.TINT16:
-		a = arm.AMOVHS
-
-	case gc.OAS<<16 | gc.TUINT16:
-		a = arm.AMOVHU
-
-	case gc.OAS<<16 | gc.TINT32,
-		gc.OAS<<16 | gc.TUINT32,
-		gc.OAS<<16 | gc.TPTR32:
-		a = arm.AMOVW
-
-	case gc.OAS<<16 | gc.TFLOAT32:
-		a = arm.AMOVF
-
-	case gc.OAS<<16 | gc.TFLOAT64:
-		a = arm.AMOVD
-
-	case gc.OADD<<16 | gc.TINT8,
-		gc.OADD<<16 | gc.TUINT8,
-		gc.OADD<<16 | gc.TINT16,
-		gc.OADD<<16 | gc.TUINT16,
-		gc.OADD<<16 | gc.TINT32,
-		gc.OADD<<16 | gc.TUINT32,
-		gc.OADD<<16 | gc.TPTR32:
-		a = arm.AADD
-
-	case gc.OADD<<16 | gc.TFLOAT32:
-		a = arm.AADDF
-
-	case gc.OADD<<16 | gc.TFLOAT64:
-		a = arm.AADDD
-
-	case gc.OSUB<<16 | gc.TINT8,
-		gc.OSUB<<16 | gc.TUINT8,
-		gc.OSUB<<16 | gc.TINT16,
-		gc.OSUB<<16 | gc.TUINT16,
-		gc.OSUB<<16 | gc.TINT32,
-		gc.OSUB<<16 | gc.TUINT32,
-		gc.OSUB<<16 | gc.TPTR32:
-		a = arm.ASUB
-
-	case gc.OSUB<<16 | gc.TFLOAT32:
-		a = arm.ASUBF
-
-	case gc.OSUB<<16 | gc.TFLOAT64:
-		a = arm.ASUBD
-
-	case gc.OMINUS<<16 | gc.TINT8,
-		gc.OMINUS<<16 | gc.TUINT8,
-		gc.OMINUS<<16 | gc.TINT16,
-		gc.OMINUS<<16 | gc.TUINT16,
-		gc.OMINUS<<16 | gc.TINT32,
-		gc.OMINUS<<16 | gc.TUINT32,
-		gc.OMINUS<<16 | gc.TPTR32:
-		a = arm.ARSB
-
-	case gc.OAND<<16 | gc.TINT8,
-		gc.OAND<<16 | gc.TUINT8,
-		gc.OAND<<16 | gc.TINT16,
-		gc.OAND<<16 | gc.TUINT16,
-		gc.OAND<<16 | gc.TINT32,
-		gc.OAND<<16 | gc.TUINT32,
-		gc.OAND<<16 | gc.TPTR32:
-		a = arm.AAND
-
-	case gc.OOR<<16 | gc.TINT8,
-		gc.OOR<<16 | gc.TUINT8,
-		gc.OOR<<16 | gc.TINT16,
-		gc.OOR<<16 | gc.TUINT16,
-		gc.OOR<<16 | gc.TINT32,
-		gc.OOR<<16 | gc.TUINT32,
-		gc.OOR<<16 | gc.TPTR32:
-		a = arm.AORR
-
-	case gc.OXOR<<16 | gc.TINT8,
-		gc.OXOR<<16 | gc.TUINT8,
-		gc.OXOR<<16 | gc.TINT16,
-		gc.OXOR<<16 | gc.TUINT16,
-		gc.OXOR<<16 | gc.TINT32,
-		gc.OXOR<<16 | gc.TUINT32,
-		gc.OXOR<<16 | gc.TPTR32:
-		a = arm.AEOR
-
-	case gc.OLSH<<16 | gc.TINT8,
-		gc.OLSH<<16 | gc.TUINT8,
-		gc.OLSH<<16 | gc.TINT16,
-		gc.OLSH<<16 | gc.TUINT16,
-		gc.OLSH<<16 | gc.TINT32,
-		gc.OLSH<<16 | gc.TUINT32,
-		gc.OLSH<<16 | gc.TPTR32:
-		a = arm.ASLL
-
-	case gc.ORSH<<16 | gc.TUINT8,
-		gc.ORSH<<16 | gc.TUINT16,
-		gc.ORSH<<16 | gc.TUINT32,
-		gc.ORSH<<16 | gc.TPTR32:
-		a = arm.ASRL
-
-	case gc.ORSH<<16 | gc.TINT8,
-		gc.ORSH<<16 | gc.TINT16,
-		gc.ORSH<<16 | gc.TINT32:
-		a = arm.ASRA
-
-	case gc.OMUL<<16 | gc.TUINT8,
-		gc.OMUL<<16 | gc.TUINT16,
-		gc.OMUL<<16 | gc.TUINT32,
-		gc.OMUL<<16 | gc.TPTR32:
-		a = arm.AMULU
-
-	case gc.OMUL<<16 | gc.TINT8,
-		gc.OMUL<<16 | gc.TINT16,
-		gc.OMUL<<16 | gc.TINT32:
-		a = arm.AMUL
-
-	case gc.OMUL<<16 | gc.TFLOAT32:
-		a = arm.AMULF
-
-	case gc.OMUL<<16 | gc.TFLOAT64:
-		a = arm.AMULD
-
-	case gc.ODIV<<16 | gc.TUINT8,
-		gc.ODIV<<16 | gc.TUINT16,
-		gc.ODIV<<16 | gc.TUINT32,
-		gc.ODIV<<16 | gc.TPTR32:
-		a = arm.ADIVU
-
-	case gc.ODIV<<16 | gc.TINT8,
-		gc.ODIV<<16 | gc.TINT16,
-		gc.ODIV<<16 | gc.TINT32:
-		a = arm.ADIV
-
-	case gc.OMOD<<16 | gc.TUINT8,
-		gc.OMOD<<16 | gc.TUINT16,
-		gc.OMOD<<16 | gc.TUINT32,
-		gc.OMOD<<16 | gc.TPTR32:
-		a = arm.AMODU
-
-	case gc.OMOD<<16 | gc.TINT8,
-		gc.OMOD<<16 | gc.TINT16,
-		gc.OMOD<<16 | gc.TINT32:
-		a = arm.AMOD
-
-		//	case CASE(OEXTEND, TINT16):
-	//		a = ACWD;
-	//		break;
-
-	//	case CASE(OEXTEND, TINT32):
-	//		a = ACDQ;
-	//		break;
-
-	//	case CASE(OEXTEND, TINT64):
-	//		a = ACQO;
-	//		break;
-
-	case gc.ODIV<<16 | gc.TFLOAT32:
-		a = arm.ADIVF
-
-	case gc.ODIV<<16 | gc.TFLOAT64:
-		a = arm.ADIVD
-
-	case gc.OSQRT<<16 | gc.TFLOAT64:
-		a = arm.ASQRTD
-	}
-
-	return a
-}
-
-const (
-	ODynam = 1 << 0
-	OPtrto = 1 << 1
-)
-
-var clean [20]gc.Node
-
-var cleani int = 0
-
-func sudoclean() {
-	if clean[cleani-1].Op != gc.OEMPTY {
-		gc.Regfree(&clean[cleani-1])
-	}
-	if clean[cleani-2].Op != gc.OEMPTY {
-		gc.Regfree(&clean[cleani-2])
-	}
-	cleani -= 2
-}
-
-func dotaddable(n *gc.Node, n1 *gc.Node) bool {
-	if n.Op != gc.ODOT {
-		return false
-	}
-
-	var oary [10]int64
-	var nn *gc.Node
-	o := gc.Dotoffset(n, oary[:], &nn)
-	if nn != nil && nn.Addable && o == 1 && oary[0] >= 0 {
-		*n1 = *nn
-		n1.Type = n.Type
-		n1.Xoffset += oary[0]
-		return true
-	}
-
-	return false
-}
-
-/*
- * generate code to compute address of n,
- * a reference to a (perhaps nested) field inside
- * an array or struct.
- * return 0 on failure, 1 on success.
- * on success, leaves usable address in a.
- *
- * caller is responsible for calling sudoclean
- * after successful sudoaddable,
- * to release the register used for a.
- */
-func sudoaddable(as int, n *gc.Node, a *obj.Addr) bool {
-	if n.Type == nil {
-		return false
-	}
-
-	*a = obj.Addr{}
-
-	switch n.Op {
-	case gc.OLITERAL:
-		if !gc.Isconst(n, gc.CTINT) {
-			break
-		}
-		v := n.Int()
-		if v >= 32000 || v <= -32000 {
-			break
-		}
-		switch as {
-		default:
-			return false
-
-		case arm.AADD,
-			arm.ASUB,
-			arm.AAND,
-			arm.AORR,
-			arm.AEOR,
-			arm.AMOVB,
-			arm.AMOVBS,
-			arm.AMOVBU,
-			arm.AMOVH,
-			arm.AMOVHS,
-			arm.AMOVHU,
-			arm.AMOVW:
-			break
-		}
-
-		cleani += 2
-		reg := &clean[cleani-1]
-		reg1 := &clean[cleani-2]
-		reg.Op = gc.OEMPTY
-		reg1.Op = gc.OEMPTY
-		gc.Naddr(a, n)
-		return true
-
-	case gc.ODOT,
-		gc.ODOTPTR:
-		cleani += 2
-		reg := &clean[cleani-1]
-		reg1 := &clean[cleani-2]
-		reg.Op = gc.OEMPTY
-		reg1.Op = gc.OEMPTY
-		var nn *gc.Node
-		var oary [10]int64
-		o := gc.Dotoffset(n, oary[:], &nn)
-		if nn == nil {
-			sudoclean()
-			return false
-		}
-
-		if nn.Addable && o == 1 && oary[0] >= 0 {
-			// directly addressable set of DOTs
-			n1 := *nn
-
-			n1.Type = n.Type
-			n1.Xoffset += oary[0]
-			gc.Naddr(a, &n1)
-			return true
-		}
-
-		gc.Regalloc(reg, gc.Types[gc.Tptr], nil)
-		n1 := *reg
-		n1.Op = gc.OINDREG
-		if oary[0] >= 0 {
-			gc.Agen(nn, reg)
-			n1.Xoffset = oary[0]
-		} else {
-			gc.Cgen(nn, reg)
-			gc.Cgen_checknil(reg)
-			n1.Xoffset = -(oary[0] + 1)
-		}
-
-		for i := 1; i < o; i++ {
-			if oary[i] >= 0 {
-				gc.Fatal("can't happen")
-			}
-			gins(arm.AMOVW, &n1, reg)
-			gc.Cgen_checknil(reg)
-			n1.Xoffset = -(oary[i] + 1)
-		}
-
-		a.Type = obj.TYPE_NONE
-		a.Name = obj.NAME_NONE
-		n1.Type = n.Type
-		gc.Naddr(a, &n1)
-		return true
-
-	case gc.OINDEX:
-		return false
-	}
-
-	return false
-}
diff --git a/src/cmd/compile/internal/arm/peep.go b/src/cmd/compile/internal/arm/peep.go
deleted file mode 100644
index 66eba41..0000000
--- a/src/cmd/compile/internal/arm/peep.go
+++ /dev/null
@@ -1,1748 +0,0 @@
-// Inferno utils/5c/peep.c
-// http://code.google.com/p/inferno-os/source/browse/utils/5c/peep.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package arm
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/arm"
-	"fmt"
-)
-
-var gactive uint32
-
-// UNUSED
-func peep(firstp *obj.Prog) {
-	g := (*gc.Graph)(gc.Flowstart(firstp, nil))
-	if g == nil {
-		return
-	}
-	gactive = 0
-
-	var r *gc.Flow
-	var p *obj.Prog
-	var t int
-loop1:
-	if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-		gc.Dumpit("loop1", g.Start, 0)
-	}
-
-	t = 0
-	for r = g.Start; r != nil; r = r.Link {
-		p = r.Prog
-		switch p.As {
-		/*
-		 * elide shift into TYPE_SHIFT operand of subsequent instruction
-		 */
-		//			if(shiftprop(r)) {
-		//				excise(r);
-		//				t++;
-		//				break;
-		//			}
-		case arm.ASLL,
-			arm.ASRL,
-			arm.ASRA:
-			break
-
-		case arm.AMOVB,
-			arm.AMOVH,
-			arm.AMOVW,
-			arm.AMOVF,
-			arm.AMOVD:
-			if regtyp(&p.From) {
-				if p.From.Type == p.To.Type && isfloatreg(&p.From) == isfloatreg(&p.To) {
-					if p.Scond == arm.C_SCOND_NONE {
-						if copyprop(g, r) {
-							excise(r)
-							t++
-							break
-						}
-
-						if subprop(r) && copyprop(g, r) {
-							excise(r)
-							t++
-							break
-						}
-					}
-				}
-			}
-
-		case arm.AMOVHS,
-			arm.AMOVHU,
-			arm.AMOVBS,
-			arm.AMOVBU:
-			if p.From.Type == obj.TYPE_REG {
-				if shortprop(r) {
-					t++
-				}
-			}
-		}
-	}
-
-	/*
-		if(p->scond == C_SCOND_NONE)
-		if(regtyp(&p->to))
-		if(isdconst(&p->from)) {
-			constprop(&p->from, &p->to, r->s1);
-		}
-		break;
-	*/
-	if t != 0 {
-		goto loop1
-	}
-
-	for r := (*gc.Flow)(g.Start); r != nil; r = r.Link {
-		p = r.Prog
-		switch p.As {
-		/*
-		 * EOR -1,x,y => MVN x,y
-		 */
-		case arm.AEOR:
-			if isdconst(&p.From) && p.From.Offset == -1 {
-				p.As = arm.AMVN
-				p.From.Type = obj.TYPE_REG
-				if p.Reg != 0 {
-					p.From.Reg = p.Reg
-				} else {
-					p.From.Reg = p.To.Reg
-				}
-				p.Reg = 0
-			}
-		}
-	}
-
-	for r := (*gc.Flow)(g.Start); r != nil; r = r.Link {
-		p = r.Prog
-		switch p.As {
-		case arm.AMOVW,
-			arm.AMOVB,
-			arm.AMOVBS,
-			arm.AMOVBU:
-			if p.From.Type == obj.TYPE_MEM && p.From.Offset == 0 {
-				xtramodes(g, r, &p.From)
-			} else if p.To.Type == obj.TYPE_MEM && p.To.Offset == 0 {
-				xtramodes(g, r, &p.To)
-			} else {
-				continue
-			}
-		}
-	}
-
-	//		case ACMP:
-	//			/*
-	//			 * elide CMP $0,x if calculation of x can set condition codes
-	//			 */
-	//			if(isdconst(&p->from) || p->from.offset != 0)
-	//				continue;
-	//			r2 = r->s1;
-	//			if(r2 == nil)
-	//				continue;
-	//			t = r2->prog->as;
-	//			switch(t) {
-	//			default:
-	//				continue;
-	//			case ABEQ:
-	//			case ABNE:
-	//			case ABMI:
-	//			case ABPL:
-	//				break;
-	//			case ABGE:
-	//				t = ABPL;
-	//				break;
-	//			case ABLT:
-	//				t = ABMI;
-	//				break;
-	//			case ABHI:
-	//				t = ABNE;
-	//				break;
-	//			case ABLS:
-	//				t = ABEQ;
-	//				break;
-	//			}
-	//			r1 = r;
-	//			do
-	//				r1 = uniqp(r1);
-	//			while (r1 != nil && r1->prog->as == ANOP);
-	//			if(r1 == nil)
-	//				continue;
-	//			p1 = r1->prog;
-	//			if(p1->to.type != TYPE_REG)
-	//				continue;
-	//			if(p1->to.reg != p->reg)
-	//			if(!(p1->as == AMOVW && p1->from.type == TYPE_REG && p1->from.reg == p->reg))
-	//				continue;
-	//
-	//			switch(p1->as) {
-	//			default:
-	//				continue;
-	//			case AMOVW:
-	//				if(p1->from.type != TYPE_REG)
-	//					continue;
-	//			case AAND:
-	//			case AEOR:
-	//			case AORR:
-	//			case ABIC:
-	//			case AMVN:
-	//			case ASUB:
-	//			case ARSB:
-	//			case AADD:
-	//			case AADC:
-	//			case ASBC:
-	//			case ARSC:
-	//				break;
-	//			}
-	//			p1->scond |= C_SBIT;
-	//			r2->prog->as = t;
-	//			excise(r);
-	//			continue;
-
-	//	predicate(g);
-
-	gc.Flowend(g)
-}
-
-func regtyp(a *obj.Addr) bool {
-	return a.Type == obj.TYPE_REG && (arm.REG_R0 <= a.Reg && a.Reg <= arm.REG_R15 || arm.REG_F0 <= a.Reg && a.Reg <= arm.REG_F15)
-}
-
-/*
- * the idea is to substitute
- * one register for another
- * from one MOV to another
- *	MOV	a, R0
- *	ADD	b, R0	/ no use of R1
- *	MOV	R0, R1
- * would be converted to
- *	MOV	a, R1
- *	ADD	b, R1
- *	MOV	R1, R0
- * hopefully, then the former or latter MOV
- * will be eliminated by copy propagation.
- */
-func subprop(r0 *gc.Flow) bool {
-	p := (*obj.Prog)(r0.Prog)
-	v1 := (*obj.Addr)(&p.From)
-	if !regtyp(v1) {
-		return false
-	}
-	v2 := (*obj.Addr)(&p.To)
-	if !regtyp(v2) {
-		return false
-	}
-	for r := gc.Uniqp(r0); r != nil; r = gc.Uniqp(r) {
-		if gc.Uniqs(r) == nil {
-			break
-		}
-		p = r.Prog
-		if p.As == obj.AVARDEF || p.As == obj.AVARKILL {
-			continue
-		}
-		if p.Info.Flags&gc.Call != 0 {
-			return false
-		}
-
-		// TODO(rsc): Whatever invalidated the info should have done this call.
-		proginfo(p)
-
-		if (p.Info.Flags&gc.CanRegRead != 0) && p.To.Type == obj.TYPE_REG {
-			p.Info.Flags |= gc.RegRead
-			p.Info.Flags &^= (gc.CanRegRead | gc.RightRead)
-			p.Reg = p.To.Reg
-		}
-
-		switch p.As {
-		case arm.AMULLU,
-			arm.AMULA,
-			arm.AMVN:
-			return false
-		}
-
-		if p.Info.Flags&(gc.RightRead|gc.RightWrite) == gc.RightWrite {
-			if p.To.Type == v1.Type {
-				if p.To.Reg == v1.Reg {
-					if p.Scond == arm.C_SCOND_NONE {
-						copysub(&p.To, v1, v2, 1)
-						if gc.Debug['P'] != 0 {
-							fmt.Printf("gotit: %v->%v\n%v", gc.Ctxt.Dconv(v1), gc.Ctxt.Dconv(v2), r.Prog)
-							if p.From.Type == v2.Type {
-								fmt.Printf(" excise")
-							}
-							fmt.Printf("\n")
-						}
-
-						for r = gc.Uniqs(r); r != r0; r = gc.Uniqs(r) {
-							p = r.Prog
-							copysub(&p.From, v1, v2, 1)
-							copysub1(p, v1, v2, 1)
-							copysub(&p.To, v1, v2, 1)
-							if gc.Debug['P'] != 0 {
-								fmt.Printf("%v\n", r.Prog)
-							}
-						}
-
-						t := int(int(v1.Reg))
-						v1.Reg = v2.Reg
-						v2.Reg = int16(t)
-						if gc.Debug['P'] != 0 {
-							fmt.Printf("%v last\n", r.Prog)
-						}
-						return true
-					}
-				}
-			}
-		}
-
-		if copyau(&p.From, v2) || copyau1(p, v2) || copyau(&p.To, v2) {
-			break
-		}
-		if copysub(&p.From, v1, v2, 0) != 0 || copysub1(p, v1, v2, 0) != 0 || copysub(&p.To, v1, v2, 0) != 0 {
-			break
-		}
-	}
-
-	return false
-}
-
-/*
- * The idea is to remove redundant copies.
- *	v1->v2	F=0
- *	(use v2	s/v2/v1/)*
- *	set v1	F=1
- *	use v2	return fail
- *	-----------------
- *	v1->v2	F=0
- *	(use v2	s/v2/v1/)*
- *	set v1	F=1
- *	set v2	return success
- */
-func copyprop(g *gc.Graph, r0 *gc.Flow) bool {
-	p := (*obj.Prog)(r0.Prog)
-	v1 := (*obj.Addr)(&p.From)
-	v2 := (*obj.Addr)(&p.To)
-	if copyas(v1, v2) {
-		return true
-	}
-	gactive++
-	return copy1(v1, v2, r0.S1, 0)
-}
-
-func copy1(v1 *obj.Addr, v2 *obj.Addr, r *gc.Flow, f int) bool {
-	if uint32(r.Active) == gactive {
-		if gc.Debug['P'] != 0 {
-			fmt.Printf("act set; return 1\n")
-		}
-		return true
-	}
-
-	r.Active = int32(gactive)
-	if gc.Debug['P'] != 0 {
-		fmt.Printf("copy %v->%v f=%d\n", gc.Ctxt.Dconv(v1), gc.Ctxt.Dconv(v2), f)
-	}
-	var t int
-	var p *obj.Prog
-	for ; r != nil; r = r.S1 {
-		p = r.Prog
-		if gc.Debug['P'] != 0 {
-			fmt.Printf("%v", p)
-		}
-		if f == 0 && gc.Uniqp(r) == nil {
-			f = 1
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("; merge; f=%d", f)
-			}
-		}
-
-		t = copyu(p, v2, nil)
-		switch t {
-		case 2: /* rar, can't split */
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("; %vrar; return 0\n", gc.Ctxt.Dconv(v2))
-			}
-			return false
-
-		case 3: /* set */
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("; %vset; return 1\n", gc.Ctxt.Dconv(v2))
-			}
-			return true
-
-		case 1, /* used, substitute */
-			4: /* use and set */
-			if f != 0 {
-				if gc.Debug['P'] == 0 {
-					return false
-				}
-				if t == 4 {
-					fmt.Printf("; %vused+set and f=%d; return 0\n", gc.Ctxt.Dconv(v2), f)
-				} else {
-					fmt.Printf("; %vused and f=%d; return 0\n", gc.Ctxt.Dconv(v2), f)
-				}
-				return false
-			}
-
-			if copyu(p, v2, v1) != 0 {
-				if gc.Debug['P'] != 0 {
-					fmt.Printf("; sub fail; return 0\n")
-				}
-				return false
-			}
-
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("; sub%v/%v", gc.Ctxt.Dconv(v2), gc.Ctxt.Dconv(v1))
-			}
-			if t == 4 {
-				if gc.Debug['P'] != 0 {
-					fmt.Printf("; %vused+set; return 1\n", gc.Ctxt.Dconv(v2))
-				}
-				return true
-			}
-		}
-
-		if f == 0 {
-			t = copyu(p, v1, nil)
-			if f == 0 && (t == 2 || t == 3 || t == 4) {
-				f = 1
-				if gc.Debug['P'] != 0 {
-					fmt.Printf("; %vset and !f; f=%d", gc.Ctxt.Dconv(v1), f)
-				}
-			}
-		}
-
-		if gc.Debug['P'] != 0 {
-			fmt.Printf("\n")
-		}
-		if r.S2 != nil {
-			if !copy1(v1, v2, r.S2, f) {
-				return false
-			}
-		}
-	}
-
-	return true
-}
-
-// UNUSED
-/*
- * The idea is to remove redundant constants.
- *	$c1->v1
- *	($c1->v2 s/$c1/v1)*
- *	set v1  return
- * The v1->v2 should be eliminated by copy propagation.
- */
-func constprop(c1 *obj.Addr, v1 *obj.Addr, r *gc.Flow) {
-	if gc.Debug['P'] != 0 {
-		fmt.Printf("constprop %v->%v\n", gc.Ctxt.Dconv(c1), gc.Ctxt.Dconv(v1))
-	}
-	var p *obj.Prog
-	for ; r != nil; r = r.S1 {
-		p = r.Prog
-		if gc.Debug['P'] != 0 {
-			fmt.Printf("%v", p)
-		}
-		if gc.Uniqp(r) == nil {
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("; merge; return\n")
-			}
-			return
-		}
-
-		if p.As == arm.AMOVW && copyas(&p.From, c1) {
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("; sub%v/%v", gc.Ctxt.Dconv(&p.From), gc.Ctxt.Dconv(v1))
-			}
-			p.From = *v1
-		} else if copyu(p, v1, nil) > 1 {
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("; %vset; return\n", gc.Ctxt.Dconv(v1))
-			}
-			return
-		}
-
-		if gc.Debug['P'] != 0 {
-			fmt.Printf("\n")
-		}
-		if r.S2 != nil {
-			constprop(c1, v1, r.S2)
-		}
-	}
-}
-
-/*
- * shortprop eliminates redundant zero/sign extensions.
- *
- *   MOVBS x, R
- *   <no use R>
- *   MOVBS R, R'
- *
- * changed to
- *
- *   MOVBS x, R
- *   ...
- *   MOVB  R, R' (compiled to mov)
- *
- * MOVBS above can be a MOVBS, MOVBU, MOVHS or MOVHU.
- */
-func shortprop(r *gc.Flow) bool {
-	p := (*obj.Prog)(r.Prog)
-	r1 := (*gc.Flow)(findpre(r, &p.From))
-	if r1 == nil {
-		return false
-	}
-
-	p1 := (*obj.Prog)(r1.Prog)
-	if p1.As == p.As {
-		// Two consecutive extensions.
-		goto gotit
-	}
-
-	if p1.As == arm.AMOVW && isdconst(&p1.From) && p1.From.Offset >= 0 && p1.From.Offset < 128 {
-		// Loaded an immediate.
-		goto gotit
-	}
-
-	return false
-
-gotit:
-	if gc.Debug['P'] != 0 {
-		fmt.Printf("shortprop\n%v\n%v", p1, p)
-	}
-	switch p.As {
-	case arm.AMOVBS,
-		arm.AMOVBU:
-		p.As = arm.AMOVB
-
-	case arm.AMOVHS,
-		arm.AMOVHU:
-		p.As = arm.AMOVH
-	}
-
-	if gc.Debug['P'] != 0 {
-		fmt.Printf(" => %v\n", obj.Aconv(int(p.As)))
-	}
-	return true
-}
-
-// UNUSED
-/*
- * ASLL x,y,w
- * .. (not use w, not set x y w)
- * AXXX w,a,b (a != w)
- * .. (not use w)
- * (set w)
- * ----------- changed to
- * ..
- * AXXX (x<<y),a,b
- * ..
- */
-func shiftprop(r *gc.Flow) bool {
-	p := (*obj.Prog)(r.Prog)
-	if p.To.Type != obj.TYPE_REG {
-		if gc.Debug['P'] != 0 {
-			fmt.Printf("\tBOTCH: result not reg; FAILURE\n")
-		}
-		return false
-	}
-
-	n := int(int(p.To.Reg))
-	a := obj.Addr(obj.Addr{})
-	if p.Reg != 0 && p.Reg != p.To.Reg {
-		a.Type = obj.TYPE_REG
-		a.Reg = p.Reg
-	}
-
-	if gc.Debug['P'] != 0 {
-		fmt.Printf("shiftprop\n%v", p)
-	}
-	r1 := (*gc.Flow)(r)
-	var p1 *obj.Prog
-	for {
-		/* find first use of shift result; abort if shift operands or result are changed */
-		r1 = gc.Uniqs(r1)
-
-		if r1 == nil {
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("\tbranch; FAILURE\n")
-			}
-			return false
-		}
-
-		if gc.Uniqp(r1) == nil {
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("\tmerge; FAILURE\n")
-			}
-			return false
-		}
-
-		p1 = r1.Prog
-		if gc.Debug['P'] != 0 {
-			fmt.Printf("\n%v", p1)
-		}
-		switch copyu(p1, &p.To, nil) {
-		case 0: /* not used or set */
-			if (p.From.Type == obj.TYPE_REG && copyu(p1, &p.From, nil) > 1) || (a.Type == obj.TYPE_REG && copyu(p1, &a, nil) > 1) {
-				if gc.Debug['P'] != 0 {
-					fmt.Printf("\targs modified; FAILURE\n")
-				}
-				return false
-			}
-
-			continue
-		case 3: /* set, not used */
-			{
-				if gc.Debug['P'] != 0 {
-					fmt.Printf("\tBOTCH: noref; FAILURE\n")
-				}
-				return false
-			}
-		}
-
-		break
-	}
-
-	/* check whether substitution can be done */
-	switch p1.As {
-	default:
-		if gc.Debug['P'] != 0 {
-			fmt.Printf("\tnon-dpi; FAILURE\n")
-		}
-		return false
-
-	case arm.AAND,
-		arm.AEOR,
-		arm.AADD,
-		arm.AADC,
-		arm.AORR,
-		arm.ASUB,
-		arm.ASBC,
-		arm.ARSB,
-		arm.ARSC:
-		if int(p1.Reg) == n || (p1.Reg == 0 && p1.To.Type == obj.TYPE_REG && int(p1.To.Reg) == n) {
-			if p1.From.Type != obj.TYPE_REG {
-				if gc.Debug['P'] != 0 {
-					fmt.Printf("\tcan't swap; FAILURE\n")
-				}
-				return false
-			}
-
-			p1.Reg = p1.From.Reg
-			p1.From.Reg = int16(n)
-			switch p1.As {
-			case arm.ASUB:
-				p1.As = arm.ARSB
-
-			case arm.ARSB:
-				p1.As = arm.ASUB
-
-			case arm.ASBC:
-				p1.As = arm.ARSC
-
-			case arm.ARSC:
-				p1.As = arm.ASBC
-			}
-
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("\t=>%v", p1)
-			}
-		}
-		fallthrough
-
-	case arm.ABIC,
-		arm.ATST,
-		arm.ACMP,
-		arm.ACMN:
-		if int(p1.Reg) == n {
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("\tcan't swap; FAILURE\n")
-			}
-			return false
-		}
-
-		if p1.Reg == 0 && int(p1.To.Reg) == n {
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("\tshift result used twice; FAILURE\n")
-			}
-			return false
-		}
-
-		//	case AMVN:
-		if p1.From.Type == obj.TYPE_SHIFT {
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("\tshift result used in shift; FAILURE\n")
-			}
-			return false
-		}
-
-		if p1.From.Type != obj.TYPE_REG || int(p1.From.Reg) != n {
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("\tBOTCH: where is it used?; FAILURE\n")
-			}
-			return false
-		}
-	}
-
-	/* check whether shift result is used subsequently */
-	p2 := (*obj.Prog)(p1)
-
-	if int(p1.To.Reg) != n {
-		var p1 *obj.Prog
-		for {
-			r1 = gc.Uniqs(r1)
-			if r1 == nil {
-				if gc.Debug['P'] != 0 {
-					fmt.Printf("\tinconclusive; FAILURE\n")
-				}
-				return false
-			}
-
-			p1 = r1.Prog
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("\n%v", p1)
-			}
-			switch copyu(p1, &p.To, nil) {
-			case 0: /* not used or set */
-				continue
-
-			case 3: /* set, not used */
-				break
-
-			default: /* used */
-				if gc.Debug['P'] != 0 {
-					fmt.Printf("\treused; FAILURE\n")
-				}
-				return false
-			}
-
-			break
-		}
-	}
-
-	/* make the substitution */
-	p2.From.Reg = 0
-
-	o := int(int(p.Reg))
-	if o == 0 {
-		o = int(p.To.Reg)
-	}
-	o &= 15
-
-	switch p.From.Type {
-	case obj.TYPE_CONST:
-		o |= int((p.From.Offset & 0x1f) << 7)
-
-	case obj.TYPE_REG:
-		o |= 1<<4 | (int(p.From.Reg)&15)<<8
-	}
-
-	switch p.As {
-	case arm.ASLL:
-		o |= 0 << 5
-
-	case arm.ASRL:
-		o |= 1 << 5
-
-	case arm.ASRA:
-		o |= 2 << 5
-	}
-
-	p2.From = obj.Addr{}
-	p2.From.Type = obj.TYPE_SHIFT
-	p2.From.Offset = int64(o)
-	if gc.Debug['P'] != 0 {
-		fmt.Printf("\t=>%v\tSUCCEED\n", p2)
-	}
-	return true
-}
-
-/*
- * findpre returns the last instruction mentioning v
- * before r. It must be a set, and there must be
- * a unique path from that instruction to r.
- */
-func findpre(r *gc.Flow, v *obj.Addr) *gc.Flow {
-	var r1 *gc.Flow
-
-	for r1 = gc.Uniqp(r); r1 != nil; r, r1 = r1, gc.Uniqp(r1) {
-		if gc.Uniqs(r1) != r {
-			return nil
-		}
-		switch copyu(r1.Prog, v, nil) {
-		case 1, /* used */
-			2: /* read-alter-rewrite */
-			return nil
-
-		case 3, /* set */
-			4: /* set and used */
-			return r1
-		}
-	}
-
-	return nil
-}
-
-/*
- * findinc finds ADD instructions with a constant
- * argument which falls within the immed_12 range.
- */
-func findinc(r *gc.Flow, r2 *gc.Flow, v *obj.Addr) *gc.Flow {
-	var r1 *gc.Flow
-	var p *obj.Prog
-
-	for r1 = gc.Uniqs(r); r1 != nil && r1 != r2; r, r1 = r1, gc.Uniqs(r1) {
-		if gc.Uniqp(r1) != r {
-			return nil
-		}
-		switch copyu(r1.Prog, v, nil) {
-		case 0: /* not touched */
-			continue
-
-		case 4: /* set and used */
-			p = r1.Prog
-
-			if p.As == arm.AADD {
-				if isdconst(&p.From) {
-					if p.From.Offset > -4096 && p.From.Offset < 4096 {
-						return r1
-					}
-				}
-			}
-			fallthrough
-
-		default:
-			return nil
-		}
-	}
-
-	return nil
-}
-
-func nochange(r *gc.Flow, r2 *gc.Flow, p *obj.Prog) bool {
-	if r == r2 {
-		return true
-	}
-	n := int(0)
-	var a [3]obj.Addr
-	if p.Reg != 0 && p.Reg != p.To.Reg {
-		a[n].Type = obj.TYPE_REG
-		a[n].Reg = p.Reg
-		n++
-	}
-
-	switch p.From.Type {
-	case obj.TYPE_SHIFT:
-		a[n].Type = obj.TYPE_REG
-		a[n].Reg = int16(arm.REG_R0 + (p.From.Offset & 0xf))
-		n++
-		fallthrough
-
-	case obj.TYPE_REG:
-		a[n].Type = obj.TYPE_REG
-		a[n].Reg = p.From.Reg
-		n++
-	}
-
-	if n == 0 {
-		return true
-	}
-	var i int
-	for ; r != nil && r != r2; r = gc.Uniqs(r) {
-		p = r.Prog
-		for i = 0; i < n; i++ {
-			if copyu(p, &a[i], nil) > 1 {
-				return false
-			}
-		}
-	}
-
-	return true
-}
-
-func findu1(r *gc.Flow, v *obj.Addr) bool {
-	for ; r != nil; r = r.S1 {
-		if r.Active != 0 {
-			return false
-		}
-		r.Active = 1
-		switch copyu(r.Prog, v, nil) {
-		case 1, /* used */
-			2, /* read-alter-rewrite */
-			4: /* set and used */
-			return true
-
-		case 3: /* set */
-			return false
-		}
-
-		if r.S2 != nil {
-			if findu1(r.S2, v) {
-				return true
-			}
-		}
-	}
-
-	return false
-}
-
-func finduse(g *gc.Graph, r *gc.Flow, v *obj.Addr) bool {
-	for r1 := (*gc.Flow)(g.Start); r1 != nil; r1 = r1.Link {
-		r1.Active = 0
-	}
-	return findu1(r, v)
-}
-
-/*
- * xtramodes enables the ARM post increment and
- * shift offset addressing modes to transform
- *   MOVW   0(R3),R1
- *   ADD    $4,R3,R3
- * into
- *   MOVW.P 4(R3),R1
- * and
- *   ADD    R0,R1
- *   MOVBU  0(R1),R0
- * into
- *   MOVBU  R0<<0(R1),R0
- */
-func xtramodes(g *gc.Graph, r *gc.Flow, a *obj.Addr) bool {
-	p := (*obj.Prog)(r.Prog)
-	v := obj.Addr(*a)
-	v.Type = obj.TYPE_REG
-	r1 := (*gc.Flow)(findpre(r, &v))
-	if r1 != nil {
-		p1 := r1.Prog
-		if p1.To.Type == obj.TYPE_REG && p1.To.Reg == v.Reg {
-			switch p1.As {
-			case arm.AADD:
-				if p1.Scond&arm.C_SBIT != 0 {
-					// avoid altering ADD.S/ADC sequences.
-					break
-				}
-
-				if p1.From.Type == obj.TYPE_REG || (p1.From.Type == obj.TYPE_SHIFT && p1.From.Offset&(1<<4) == 0 && ((p.As != arm.AMOVB && p.As != arm.AMOVBS) || (a == &p.From && p1.From.Offset&^0xf == 0))) || ((p1.From.Type == obj.TYPE_ADDR || p1.From.Type == obj.TYPE_CONST) && p1.From.Offset > -4096 && p1.From.Offset < 4096) {
-					if nochange(gc.Uniqs(r1), r, p1) {
-						if a != &p.From || v.Reg != p.To.Reg {
-							if finduse(g, r.S1, &v) {
-								if p1.Reg == 0 || p1.Reg == v.Reg {
-									/* pre-indexing */
-									p.Scond |= arm.C_WBIT
-								} else {
-									return false
-								}
-							}
-						}
-
-						switch p1.From.Type {
-						/* register offset */
-						case obj.TYPE_REG:
-							if gc.Nacl {
-								return false
-							}
-							*a = obj.Addr{}
-							a.Type = obj.TYPE_SHIFT
-							a.Offset = int64(p1.From.Reg) & 15
-
-							/* scaled register offset */
-						case obj.TYPE_SHIFT:
-							if gc.Nacl {
-								return false
-							}
-							*a = obj.Addr{}
-							a.Type = obj.TYPE_SHIFT
-							fallthrough
-
-							/* immediate offset */
-						case obj.TYPE_CONST,
-							obj.TYPE_ADDR:
-							a.Offset = p1.From.Offset
-						}
-
-						if p1.Reg != 0 {
-							a.Reg = p1.Reg
-						}
-						excise(r1)
-						return true
-					}
-				}
-
-			case arm.AMOVW:
-				if p1.From.Type == obj.TYPE_REG {
-					r2 := (*gc.Flow)(findinc(r1, r, &p1.From))
-					if r2 != nil {
-						var r3 *gc.Flow
-						for r3 = gc.Uniqs(r2); r3.Prog.As == obj.ANOP; r3 = gc.Uniqs(r3) {
-						}
-						if r3 == r {
-							/* post-indexing */
-							p1 := r2.Prog
-
-							a.Reg = p1.To.Reg
-							a.Offset = p1.From.Offset
-							p.Scond |= arm.C_PBIT
-							if !finduse(g, r, &r1.Prog.To) {
-								excise(r1)
-							}
-							excise(r2)
-							return true
-						}
-					}
-				}
-			}
-		}
-	}
-
-	if a != &p.From || a.Reg != p.To.Reg {
-		r1 := (*gc.Flow)(findinc(r, nil, &v))
-		if r1 != nil {
-			/* post-indexing */
-			p1 := r1.Prog
-
-			a.Offset = p1.From.Offset
-			p.Scond |= arm.C_PBIT
-			excise(r1)
-			return true
-		}
-	}
-
-	return false
-}
-
-/*
- * return
- * 1 if v only used (and substitute),
- * 2 if read-alter-rewrite
- * 3 if set
- * 4 if set and used
- * 0 otherwise (not touched)
- */
-func copyu(p *obj.Prog, v *obj.Addr, s *obj.Addr) int {
-	switch p.As {
-	default:
-		fmt.Printf("copyu: can't find %v\n", obj.Aconv(int(p.As)))
-		return 2
-
-	case arm.AMOVM:
-		if v.Type != obj.TYPE_REG {
-			return 0
-		}
-		if p.From.Type == obj.TYPE_CONST { /* read reglist, read/rar */
-			if s != nil {
-				if p.From.Offset&(1<<uint(v.Reg)) != 0 {
-					return 1
-				}
-				if copysub(&p.To, v, s, 1) != 0 {
-					return 1
-				}
-				return 0
-			}
-
-			if copyau(&p.To, v) {
-				if p.Scond&arm.C_WBIT != 0 {
-					return 2
-				}
-				return 1
-			}
-
-			if p.From.Offset&(1<<uint(v.Reg)) != 0 {
-				return 1 /* read/rar, write reglist */
-			}
-		} else {
-			if s != nil {
-				if p.To.Offset&(1<<uint(v.Reg)) != 0 {
-					return 1
-				}
-				if copysub(&p.From, v, s, 1) != 0 {
-					return 1
-				}
-				return 0
-			}
-
-			if copyau(&p.From, v) {
-				if p.Scond&arm.C_WBIT != 0 {
-					return 2
-				}
-				if p.To.Offset&(1<<uint(v.Reg)) != 0 {
-					return 4
-				}
-				return 1
-			}
-
-			if p.To.Offset&(1<<uint(v.Reg)) != 0 {
-				return 3
-			}
-		}
-
-		return 0
-
-	case obj.ANOP, /* read,, write */
-		arm.ASQRTD,
-		arm.AMOVW,
-		arm.AMOVF,
-		arm.AMOVD,
-		arm.AMOVH,
-		arm.AMOVHS,
-		arm.AMOVHU,
-		arm.AMOVB,
-		arm.AMOVBS,
-		arm.AMOVBU,
-		arm.AMOVFW,
-		arm.AMOVWF,
-		arm.AMOVDW,
-		arm.AMOVWD,
-		arm.AMOVFD,
-		arm.AMOVDF:
-		if p.Scond&(arm.C_WBIT|arm.C_PBIT) != 0 {
-			if v.Type == obj.TYPE_REG {
-				if p.From.Type == obj.TYPE_MEM || p.From.Type == obj.TYPE_SHIFT {
-					if p.From.Reg == v.Reg {
-						return 2
-					}
-				} else {
-					if p.To.Reg == v.Reg {
-						return 2
-					}
-				}
-			}
-		}
-
-		if s != nil {
-			if copysub(&p.From, v, s, 1) != 0 {
-				return 1
-			}
-			if !copyas(&p.To, v) {
-				if copysub(&p.To, v, s, 1) != 0 {
-					return 1
-				}
-			}
-			return 0
-		}
-
-		if copyas(&p.To, v) {
-			if p.Scond != arm.C_SCOND_NONE {
-				return 2
-			}
-			if copyau(&p.From, v) {
-				return 4
-			}
-			return 3
-		}
-
-		if copyau(&p.From, v) {
-			return 1
-		}
-		if copyau(&p.To, v) {
-			return 1
-		}
-		return 0
-
-	case arm.AMULLU, /* read, read, write, write */
-		arm.AMULL,
-		arm.AMULA,
-		arm.AMVN:
-		return 2
-
-	case arm.AADD, /* read, read, write */
-		arm.AADC,
-		arm.ASUB,
-		arm.ASBC,
-		arm.ARSB,
-		arm.ASLL,
-		arm.ASRL,
-		arm.ASRA,
-		arm.AORR,
-		arm.AAND,
-		arm.AEOR,
-		arm.AMUL,
-		arm.AMULU,
-		arm.ADIV,
-		arm.ADIVU,
-		arm.AMOD,
-		arm.AMODU,
-		arm.AADDF,
-		arm.AADDD,
-		arm.ASUBF,
-		arm.ASUBD,
-		arm.AMULF,
-		arm.AMULD,
-		arm.ADIVF,
-		arm.ADIVD,
-		obj.ACHECKNIL,
-		/* read */
-		arm.ACMPF, /* read, read, */
-		arm.ACMPD,
-		arm.ACMP,
-		arm.ACMN,
-		arm.ACASE,
-		arm.ATST:
-		/* read,, */
-		if s != nil {
-			if copysub(&p.From, v, s, 1) != 0 {
-				return 1
-			}
-			if copysub1(p, v, s, 1) != 0 {
-				return 1
-			}
-			if !copyas(&p.To, v) {
-				if copysub(&p.To, v, s, 1) != 0 {
-					return 1
-				}
-			}
-			return 0
-		}
-
-		if copyas(&p.To, v) {
-			if p.Scond != arm.C_SCOND_NONE {
-				return 2
-			}
-			if p.Reg == 0 {
-				p.Reg = p.To.Reg
-			}
-			if copyau(&p.From, v) {
-				return 4
-			}
-			if copyau1(p, v) {
-				return 4
-			}
-			return 3
-		}
-
-		if copyau(&p.From, v) {
-			return 1
-		}
-		if copyau1(p, v) {
-			return 1
-		}
-		if copyau(&p.To, v) {
-			return 1
-		}
-		return 0
-
-	case arm.ABEQ, /* read, read */
-		arm.ABNE,
-		arm.ABCS,
-		arm.ABHS,
-		arm.ABCC,
-		arm.ABLO,
-		arm.ABMI,
-		arm.ABPL,
-		arm.ABVS,
-		arm.ABVC,
-		arm.ABHI,
-		arm.ABLS,
-		arm.ABGE,
-		arm.ABLT,
-		arm.ABGT,
-		arm.ABLE:
-		if s != nil {
-			if copysub(&p.From, v, s, 1) != 0 {
-				return 1
-			}
-			return copysub1(p, v, s, 1)
-		}
-
-		if copyau(&p.From, v) {
-			return 1
-		}
-		if copyau1(p, v) {
-			return 1
-		}
-		return 0
-
-	case arm.AB: /* funny */
-		if s != nil {
-			if copysub(&p.To, v, s, 1) != 0 {
-				return 1
-			}
-			return 0
-		}
-
-		if copyau(&p.To, v) {
-			return 1
-		}
-		return 0
-
-	case obj.ARET: /* funny */
-		if s != nil {
-			return 1
-		}
-		return 3
-
-	case arm.ABL: /* funny */
-		if v.Type == obj.TYPE_REG {
-			// TODO(rsc): REG_R0 and REG_F0 used to be
-			// (when register numbers started at 0) exregoffset and exfregoffset,
-			// which are unset entirely.
-			// It's strange that this handles R0 and F0 differently from the other
-			// registers. Possible failure to optimize?
-			if arm.REG_R0 < v.Reg && v.Reg <= arm.REGEXT {
-				return 2
-			}
-			if v.Reg == arm.REGARG {
-				return 2
-			}
-			if arm.REG_F0 < v.Reg && v.Reg <= arm.FREGEXT {
-				return 2
-			}
-		}
-
-		if p.From.Type == obj.TYPE_REG && v.Type == obj.TYPE_REG && p.From.Reg == v.Reg {
-			return 2
-		}
-
-		if s != nil {
-			if copysub(&p.To, v, s, 1) != 0 {
-				return 1
-			}
-			return 0
-		}
-
-		if copyau(&p.To, v) {
-			return 4
-		}
-		return 3
-
-		// R0 is zero, used by DUFFZERO, cannot be substituted.
-	// R1 is ptr to memory, used and set, cannot be substituted.
-	case obj.ADUFFZERO:
-		if v.Type == obj.TYPE_REG {
-			if v.Reg == arm.REG_R0 {
-				return 1
-			}
-			if v.Reg == arm.REG_R0+1 {
-				return 2
-			}
-		}
-
-		return 0
-
-		// R0 is scratch, set by DUFFCOPY, cannot be substituted.
-	// R1, R2 areptr to src, dst, used and set, cannot be substituted.
-	case obj.ADUFFCOPY:
-		if v.Type == obj.TYPE_REG {
-			if v.Reg == arm.REG_R0 {
-				return 3
-			}
-			if v.Reg == arm.REG_R0+1 || v.Reg == arm.REG_R0+2 {
-				return 2
-			}
-		}
-
-		return 0
-
-	case obj.ATEXT: /* funny */
-		if v.Type == obj.TYPE_REG {
-			if v.Reg == arm.REGARG {
-				return 3
-			}
-		}
-		return 0
-
-	case obj.APCDATA,
-		obj.AFUNCDATA,
-		obj.AVARDEF,
-		obj.AVARKILL:
-		return 0
-	}
-}
-
-/*
- * direct reference,
- * could be set/use depending on
- * semantics
- */
-func copyas(a *obj.Addr, v *obj.Addr) bool {
-	if regtyp(v) {
-		if a.Type == v.Type {
-			if a.Reg == v.Reg {
-				return true
-			}
-		}
-	} else if v.Type == obj.TYPE_CONST { /* for constprop */
-		if a.Type == v.Type {
-			if a.Name == v.Name {
-				if a.Sym == v.Sym {
-					if a.Reg == v.Reg {
-						if a.Offset == v.Offset {
-							return true
-						}
-					}
-				}
-			}
-		}
-	}
-
-	return false
-}
-
-func sameaddr(a *obj.Addr, v *obj.Addr) bool {
-	if a.Type != v.Type {
-		return false
-	}
-	if regtyp(v) && a.Reg == v.Reg {
-		return true
-	}
-
-	// TODO(rsc): Change v->type to v->name and enable.
-	//if(v->type == NAME_AUTO || v->type == NAME_PARAM) {
-	//	if(v->offset == a->offset)
-	//		return 1;
-	//}
-	return false
-}
-
-/*
- * either direct or indirect
- */
-func copyau(a *obj.Addr, v *obj.Addr) bool {
-	if copyas(a, v) {
-		return true
-	}
-	if v.Type == obj.TYPE_REG {
-		if a.Type == obj.TYPE_ADDR && a.Reg != 0 {
-			if a.Reg == v.Reg {
-				return true
-			}
-		} else if a.Type == obj.TYPE_MEM {
-			if a.Reg == v.Reg {
-				return true
-			}
-		} else if a.Type == obj.TYPE_REGREG || a.Type == obj.TYPE_REGREG2 {
-			if a.Reg == v.Reg {
-				return true
-			}
-			if a.Offset == int64(v.Reg) {
-				return true
-			}
-		} else if a.Type == obj.TYPE_SHIFT {
-			if a.Offset&0xf == int64(v.Reg-arm.REG_R0) {
-				return true
-			}
-			if (a.Offset&(1<<4) != 0) && (a.Offset>>8)&0xf == int64(v.Reg-arm.REG_R0) {
-				return true
-			}
-		}
-	}
-
-	return false
-}
-
-/*
- * compare v to the center
- * register in p (p->reg)
- */
-func copyau1(p *obj.Prog, v *obj.Addr) bool {
-	if v.Type == obj.TYPE_REG && v.Reg == 0 {
-		return false
-	}
-	return p.Reg == v.Reg
-}
-
-/*
- * substitute s for v in a
- * return failure to substitute
- */
-func copysub(a *obj.Addr, v *obj.Addr, s *obj.Addr, f int) int {
-	if f != 0 {
-		if copyau(a, v) {
-			if a.Type == obj.TYPE_SHIFT {
-				if a.Offset&0xf == int64(v.Reg-arm.REG_R0) {
-					a.Offset = a.Offset&^0xf | int64(s.Reg)&0xf
-				}
-				if (a.Offset&(1<<4) != 0) && (a.Offset>>8)&0xf == int64(v.Reg-arm.REG_R0) {
-					a.Offset = a.Offset&^(0xf<<8) | (int64(s.Reg)&0xf)<<8
-				}
-			} else if a.Type == obj.TYPE_REGREG || a.Type == obj.TYPE_REGREG2 {
-				if a.Offset == int64(v.Reg) {
-					a.Offset = int64(s.Reg)
-				}
-				if a.Reg == v.Reg {
-					a.Reg = s.Reg
-				}
-			} else {
-				a.Reg = s.Reg
-			}
-		}
-	}
-
-	return 0
-}
-
-func copysub1(p1 *obj.Prog, v *obj.Addr, s *obj.Addr, f int) int {
-	if f != 0 {
-		if copyau1(p1, v) {
-			p1.Reg = s.Reg
-		}
-	}
-	return 0
-}
-
-var predinfo = []struct {
-	opcode    int
-	notopcode int
-	scond     int
-	notscond  int
-}{
-	{arm.ABEQ, arm.ABNE, 0x0, 0x1},
-	{arm.ABNE, arm.ABEQ, 0x1, 0x0},
-	{arm.ABCS, arm.ABCC, 0x2, 0x3},
-	{arm.ABHS, arm.ABLO, 0x2, 0x3},
-	{arm.ABCC, arm.ABCS, 0x3, 0x2},
-	{arm.ABLO, arm.ABHS, 0x3, 0x2},
-	{arm.ABMI, arm.ABPL, 0x4, 0x5},
-	{arm.ABPL, arm.ABMI, 0x5, 0x4},
-	{arm.ABVS, arm.ABVC, 0x6, 0x7},
-	{arm.ABVC, arm.ABVS, 0x7, 0x6},
-	{arm.ABHI, arm.ABLS, 0x8, 0x9},
-	{arm.ABLS, arm.ABHI, 0x9, 0x8},
-	{arm.ABGE, arm.ABLT, 0xA, 0xB},
-	{arm.ABLT, arm.ABGE, 0xB, 0xA},
-	{arm.ABGT, arm.ABLE, 0xC, 0xD},
-	{arm.ABLE, arm.ABGT, 0xD, 0xC},
-}
-
-type Joininfo struct {
-	start *gc.Flow
-	last  *gc.Flow
-	end   *gc.Flow
-	len   int
-}
-
-const (
-	Join = iota
-	Split
-	End
-	Branch
-	Setcond
-	Toolong
-)
-
-const (
-	Falsecond = iota
-	Truecond
-	Delbranch
-	Keepbranch
-)
-
-func isbranch(p *obj.Prog) bool {
-	return (arm.ABEQ <= p.As) && (p.As <= arm.ABLE)
-}
-
-func predicable(p *obj.Prog) bool {
-	switch p.As {
-	case obj.ANOP,
-		obj.AXXX,
-		obj.ADATA,
-		obj.AGLOBL,
-		obj.ATEXT,
-		arm.AWORD,
-		arm.ABCASE,
-		arm.ACASE:
-		return false
-	}
-
-	if isbranch(p) {
-		return false
-	}
-	return true
-}
-
-/*
- * Depends on an analysis of the encodings performed by 5l.
- * These seem to be all of the opcodes that lead to the "S" bit
- * being set in the instruction encodings.
- *
- * C_SBIT may also have been set explicitly in p->scond.
- */
-func modifiescpsr(p *obj.Prog) bool {
-	switch p.As {
-	case arm.AMULLU,
-		arm.AMULA,
-		arm.AMULU,
-		arm.ADIVU,
-		arm.ATEQ,
-		arm.ACMN,
-		arm.ATST,
-		arm.ACMP,
-		arm.AMUL,
-		arm.ADIV,
-		arm.AMOD,
-		arm.AMODU,
-		arm.ABL:
-		return true
-	}
-
-	if p.Scond&arm.C_SBIT != 0 {
-		return true
-	}
-	return false
-}
-
-/*
- * Find the maximal chain of instructions starting with r which could
- * be executed conditionally
- */
-func joinsplit(r *gc.Flow, j *Joininfo) int {
-	j.start = r
-	j.last = r
-	j.len = 0
-	for {
-		if r.P2 != nil && (r.P1 != nil || r.P2.P2link != nil) {
-			j.end = r
-			return Join
-		}
-
-		if r.S1 != nil && r.S2 != nil {
-			j.end = r
-			return Split
-		}
-
-		j.last = r
-		if r.Prog.As != obj.ANOP {
-			j.len++
-		}
-		if r.S1 == nil && r.S2 == nil {
-			j.end = r.Link
-			return End
-		}
-
-		if r.S2 != nil {
-			j.end = r.S2
-			return Branch
-		}
-
-		if modifiescpsr(r.Prog) {
-			j.end = r.S1
-			return Setcond
-		}
-
-		r = r.S1
-		if j.len >= 4 {
-			break
-		}
-	}
-
-	j.end = r
-	return Toolong
-}
-
-func successor(r *gc.Flow) *gc.Flow {
-	if r.S1 != nil {
-		return r.S1
-	} else {
-		return r.S2
-	}
-}
-
-func applypred(rstart *gc.Flow, j *Joininfo, cond int, branch int) {
-	if j.len == 0 {
-		return
-	}
-	var pred int
-	if cond == Truecond {
-		pred = predinfo[rstart.Prog.As-arm.ABEQ].scond
-	} else {
-		pred = predinfo[rstart.Prog.As-arm.ABEQ].notscond
-	}
-
-	for r := (*gc.Flow)(j.start); ; r = successor(r) {
-		if r.Prog.As == arm.AB {
-			if r != j.last || branch == Delbranch {
-				excise(r)
-			} else {
-				if cond == Truecond {
-					r.Prog.As = int16(predinfo[rstart.Prog.As-arm.ABEQ].opcode)
-				} else {
-					r.Prog.As = int16(predinfo[rstart.Prog.As-arm.ABEQ].notopcode)
-				}
-			}
-		} else if predicable(r.Prog) {
-			r.Prog.Scond = uint8(int(r.Prog.Scond&^arm.C_SCOND) | pred)
-		}
-		if r.S1 != r.Link {
-			r.S1 = r.Link
-			r.Link.P1 = r
-		}
-
-		if r == j.last {
-			break
-		}
-	}
-}
-
-func predicate(g *gc.Graph) {
-	var t1 int
-	var t2 int
-	var j1 Joininfo
-	var j2 Joininfo
-
-	for r := (*gc.Flow)(g.Start); r != nil; r = r.Link {
-		if isbranch(r.Prog) {
-			t1 = joinsplit(r.S1, &j1)
-			t2 = joinsplit(r.S2, &j2)
-			if j1.last.Link != j2.start {
-				continue
-			}
-			if j1.end == j2.end {
-				if (t1 == Branch && (t2 == Join || t2 == Setcond)) || (t2 == Join && (t1 == Join || t1 == Setcond)) {
-					applypred(r, &j1, Falsecond, Delbranch)
-					applypred(r, &j2, Truecond, Delbranch)
-					excise(r)
-					continue
-				}
-			}
-
-			if t1 == End || t1 == Branch {
-				applypred(r, &j1, Falsecond, Keepbranch)
-				excise(r)
-				continue
-			}
-		}
-	}
-}
-
-func isdconst(a *obj.Addr) bool {
-	return a.Type == obj.TYPE_CONST
-}
-
-func isfloatreg(a *obj.Addr) bool {
-	return arm.REG_F0 <= a.Reg && a.Reg <= arm.REG_F15
-}
-
-func stackaddr(a *obj.Addr) bool {
-	return regtyp(a) && a.Reg == arm.REGSP
-}
-
-func smallindir(a *obj.Addr, reg *obj.Addr) bool {
-	return reg.Type == obj.TYPE_REG && a.Type == obj.TYPE_MEM && a.Reg == reg.Reg && 0 <= a.Offset && a.Offset < 4096
-}
-
-func excise(r *gc.Flow) {
-	p := (*obj.Prog)(r.Prog)
-	obj.Nopout(p)
-}
diff --git a/src/cmd/compile/internal/arm/prog.go b/src/cmd/compile/internal/arm/prog.go
deleted file mode 100644
index cdf9d29..0000000
--- a/src/cmd/compile/internal/arm/prog.go
+++ /dev/null
@@ -1,165 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package arm
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/arm"
-)
-
-const (
-	RightRdwr = gc.RightRead | gc.RightWrite
-)
-
-// This table gives the basic information about instruction
-// generated by the compiler and processed in the optimizer.
-// See opt.h for bit definitions.
-//
-// Instructions not generated need not be listed.
-// As an exception to that rule, we typically write down all the
-// size variants of an operation even if we just use a subset.
-//
-// The table is formatted for 8-space tabs.
-var progtable = [arm.ALAST]obj.ProgInfo{
-	obj.ATYPE:     {gc.Pseudo | gc.Skip, 0, 0, 0},
-	obj.ATEXT:     {gc.Pseudo, 0, 0, 0},
-	obj.AFUNCDATA: {gc.Pseudo, 0, 0, 0},
-	obj.APCDATA:   {gc.Pseudo, 0, 0, 0},
-	obj.AUNDEF:    {gc.Break, 0, 0, 0},
-	obj.AUSEFIELD: {gc.OK, 0, 0, 0},
-	obj.ACHECKNIL: {gc.LeftRead, 0, 0, 0},
-	obj.AVARDEF:   {gc.Pseudo | gc.RightWrite, 0, 0, 0},
-	obj.AVARKILL:  {gc.Pseudo | gc.RightWrite, 0, 0, 0},
-
-	// NOP is an internal no-op that also stands
-	// for USED and SET annotations, not the Intel opcode.
-	obj.ANOP: {gc.LeftRead | gc.RightWrite, 0, 0, 0},
-
-	// Integer.
-	arm.AADC:    {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm.AADD:    {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm.AAND:    {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm.ABIC:    {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm.ACMN:    {gc.SizeL | gc.LeftRead | gc.RightRead, 0, 0, 0},
-	arm.ACMP:    {gc.SizeL | gc.LeftRead | gc.RightRead, 0, 0, 0},
-	arm.ADIVU:   {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm.ADIV:    {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm.AEOR:    {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm.AMODU:   {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm.AMOD:    {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm.AMULALU: {gc.SizeL | gc.LeftRead | gc.RegRead | RightRdwr, 0, 0, 0},
-	arm.AMULAL:  {gc.SizeL | gc.LeftRead | gc.RegRead | RightRdwr, 0, 0, 0},
-	arm.AMULA:   {gc.SizeL | gc.LeftRead | gc.RegRead | RightRdwr, 0, 0, 0},
-	arm.AMULU:   {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm.AMUL:    {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm.AMULL:   {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm.AMULLU:  {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm.AMVN:    {gc.SizeL | gc.LeftRead | gc.RightWrite, 0, 0, 0},
-	arm.AORR:    {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm.ARSB:    {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm.ARSC:    {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm.ASBC:    {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm.ASLL:    {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm.ASRA:    {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm.ASRL:    {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm.ASUB:    {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm.ATEQ:    {gc.SizeL | gc.LeftRead | gc.RightRead, 0, 0, 0},
-	arm.ATST:    {gc.SizeL | gc.LeftRead | gc.RightRead, 0, 0, 0},
-
-	// Floating point.
-	arm.AADDD:  {gc.SizeD | gc.LeftRead | RightRdwr, 0, 0, 0},
-	arm.AADDF:  {gc.SizeF | gc.LeftRead | RightRdwr, 0, 0, 0},
-	arm.ACMPD:  {gc.SizeD | gc.LeftRead | gc.RightRead, 0, 0, 0},
-	arm.ACMPF:  {gc.SizeF | gc.LeftRead | gc.RightRead, 0, 0, 0},
-	arm.ADIVD:  {gc.SizeD | gc.LeftRead | RightRdwr, 0, 0, 0},
-	arm.ADIVF:  {gc.SizeF | gc.LeftRead | RightRdwr, 0, 0, 0},
-	arm.AMULD:  {gc.SizeD | gc.LeftRead | RightRdwr, 0, 0, 0},
-	arm.AMULF:  {gc.SizeF | gc.LeftRead | RightRdwr, 0, 0, 0},
-	arm.ASUBD:  {gc.SizeD | gc.LeftRead | RightRdwr, 0, 0, 0},
-	arm.ASUBF:  {gc.SizeF | gc.LeftRead | RightRdwr, 0, 0, 0},
-	arm.ASQRTD: {gc.SizeD | gc.LeftRead | RightRdwr, 0, 0, 0},
-
-	// Conversions.
-	arm.AMOVWD: {gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	arm.AMOVWF: {gc.SizeF | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	arm.AMOVDF: {gc.SizeF | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	arm.AMOVDW: {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	arm.AMOVFD: {gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	arm.AMOVFW: {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-
-	// Moves.
-	arm.AMOVB: {gc.SizeB | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
-	arm.AMOVD: {gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
-	arm.AMOVF: {gc.SizeF | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
-	arm.AMOVH: {gc.SizeW | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
-	arm.AMOVW: {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
-
-	// In addtion, duffzero reads R0,R1 and writes R1.  This fact is
-	// encoded in peep.c
-	obj.ADUFFZERO: {gc.Call, 0, 0, 0},
-
-	// In addtion, duffcopy reads R1,R2 and writes R0,R1,R2.  This fact is
-	// encoded in peep.c
-	obj.ADUFFCOPY: {gc.Call, 0, 0, 0},
-
-	// These should be split into the two different conversions instead
-	// of overloading the one.
-	arm.AMOVBS: {gc.SizeB | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	arm.AMOVBU: {gc.SizeB | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	arm.AMOVHS: {gc.SizeW | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	arm.AMOVHU: {gc.SizeW | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-
-	// Jumps.
-	arm.AB:   {gc.Jump | gc.Break, 0, 0, 0},
-	arm.ABL:  {gc.Call, 0, 0, 0},
-	arm.ABEQ: {gc.Cjmp, 0, 0, 0},
-	arm.ABNE: {gc.Cjmp, 0, 0, 0},
-	arm.ABCS: {gc.Cjmp, 0, 0, 0},
-	arm.ABHS: {gc.Cjmp, 0, 0, 0},
-	arm.ABCC: {gc.Cjmp, 0, 0, 0},
-	arm.ABLO: {gc.Cjmp, 0, 0, 0},
-	arm.ABMI: {gc.Cjmp, 0, 0, 0},
-	arm.ABPL: {gc.Cjmp, 0, 0, 0},
-	arm.ABVS: {gc.Cjmp, 0, 0, 0},
-	arm.ABVC: {gc.Cjmp, 0, 0, 0},
-	arm.ABHI: {gc.Cjmp, 0, 0, 0},
-	arm.ABLS: {gc.Cjmp, 0, 0, 0},
-	arm.ABGE: {gc.Cjmp, 0, 0, 0},
-	arm.ABLT: {gc.Cjmp, 0, 0, 0},
-	arm.ABGT: {gc.Cjmp, 0, 0, 0},
-	arm.ABLE: {gc.Cjmp, 0, 0, 0},
-	obj.ARET: {gc.Break, 0, 0, 0},
-}
-
-func proginfo(p *obj.Prog) {
-	info := &p.Info
-	*info = progtable[p.As]
-	if info.Flags == 0 {
-		gc.Fatal("unknown instruction %v", p)
-	}
-
-	if p.From.Type == obj.TYPE_ADDR && p.From.Sym != nil && (info.Flags&gc.LeftRead != 0) {
-		info.Flags &^= gc.LeftRead
-		info.Flags |= gc.LeftAddr
-	}
-
-	if (info.Flags&gc.RegRead != 0) && p.Reg == 0 {
-		info.Flags &^= gc.RegRead
-		info.Flags |= gc.CanRegRead | gc.RightRead
-	}
-
-	if (p.Scond&arm.C_SCOND != arm.C_SCOND_NONE) && (info.Flags&gc.RightWrite != 0) {
-		info.Flags |= gc.RightRead
-	}
-
-	switch p.As {
-	case arm.ADIV,
-		arm.ADIVU,
-		arm.AMOD,
-		arm.AMODU:
-		info.Regset |= RtoB(arm.REG_R12)
-	}
-}
diff --git a/src/cmd/compile/internal/arm/reg.go b/src/cmd/compile/internal/arm/reg.go
deleted file mode 100644
index b72ccc9..0000000
--- a/src/cmd/compile/internal/arm/reg.go
+++ /dev/null
@@ -1,136 +0,0 @@
-// Inferno utils/5c/reg.c
-// http://code.google.com/p/inferno-os/source/browse/utils/5c/reg.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package arm
-
-import "cmd/internal/obj/arm"
-import "cmd/compile/internal/gc"
-
-const (
-	NREGVAR = 32
-)
-
-var regname = []string{
-	".R0",
-	".R1",
-	".R2",
-	".R3",
-	".R4",
-	".R5",
-	".R6",
-	".R7",
-	".R8",
-	".R9",
-	".R10",
-	".R11",
-	".R12",
-	".R13",
-	".R14",
-	".R15",
-	".F0",
-	".F1",
-	".F2",
-	".F3",
-	".F4",
-	".F5",
-	".F6",
-	".F7",
-	".F8",
-	".F9",
-	".F10",
-	".F11",
-	".F12",
-	".F13",
-	".F14",
-	".F15",
-}
-
-func regnames(n *int) []string {
-	*n = NREGVAR
-	return regname
-}
-
-func excludedregs() uint64 {
-	return RtoB(arm.REGSP) | RtoB(arm.REGLINK) | RtoB(arm.REGPC)
-}
-
-func doregbits(r int) uint64 {
-	return 0
-}
-
-/*
- *	bit	reg
- *	0	R0
- *	1	R1
- *	...	...
- *	10	R10
- *	12  R12
- *
- *	bit	reg
- *	18	F2
- *	19	F3
- *	...	...
- *	31	F15
- */
-func RtoB(r int) uint64 {
-	if arm.REG_R0 <= r && r <= arm.REG_R15 {
-		if r >= arm.REGTMP-2 && r != arm.REG_R12 { // excluded R9 and R10 for m and g, but not R12
-			return 0
-		}
-		return 1 << uint(r-arm.REG_R0)
-	}
-
-	if arm.REG_F0 <= r && r <= arm.REG_F15 {
-		if r < arm.REG_F2 || r > arm.REG_F0+arm.NFREG-1 {
-			return 0
-		}
-		return 1 << uint((r-arm.REG_F0)+16)
-	}
-
-	return 0
-}
-
-func BtoR(b uint64) int {
-	// TODO Allow R0 and R1, but be careful with a 0 return
-	// TODO Allow R9. Only R10 is reserved now (just g, not m).
-	b &= 0x11fc // excluded R9 and R10 for m and g, but not R12
-	if b == 0 {
-		return 0
-	}
-	return gc.Bitno(b) + arm.REG_R0
-}
-
-func BtoF(b uint64) int {
-	b &= 0xfffc0000
-	if b == 0 {
-		return 0
-	}
-	return gc.Bitno(b) - 16 + arm.REG_F0
-}
diff --git a/src/cmd/compile/internal/arm64/cgen.go b/src/cmd/compile/internal/arm64/cgen.go
deleted file mode 100644
index 30326d7..0000000
--- a/src/cmd/compile/internal/arm64/cgen.go
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package arm64
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/arm64"
-)
-
-func blockcopy(n, res *gc.Node, osrc, odst, w int64) {
-	// determine alignment.
-	// want to avoid unaligned access, so have to use
-	// smaller operations for less aligned types.
-	// for example moving [4]byte must use 4 MOVB not 1 MOVW.
-	align := int(n.Type.Align)
-
-	var op int
-	switch align {
-	default:
-		gc.Fatal("sgen: invalid alignment %d for %v", align, n.Type)
-
-	case 1:
-		op = arm64.AMOVB
-
-	case 2:
-		op = arm64.AMOVH
-
-	case 4:
-		op = arm64.AMOVW
-
-	case 8:
-		op = arm64.AMOVD
-	}
-
-	if w%int64(align) != 0 {
-		gc.Fatal("sgen: unaligned size %d (align=%d) for %v", w, align, n.Type)
-	}
-	c := int32(w / int64(align))
-
-	if osrc%int64(align) != 0 || odst%int64(align) != 0 {
-		gc.Fatal("sgen: unaligned offset src %d or dst %d (align %d)", osrc, odst, align)
-	}
-
-	// if we are copying forward on the stack and
-	// the src and dst overlap, then reverse direction
-	dir := align
-
-	if osrc < odst && int64(odst) < int64(osrc)+w {
-		dir = -dir
-	}
-
-	var dst gc.Node
-	var src gc.Node
-	if n.Ullman >= res.Ullman {
-		gc.Agenr(n, &dst, res) // temporarily use dst
-		gc.Regalloc(&src, gc.Types[gc.Tptr], nil)
-		gins(arm64.AMOVD, &dst, &src)
-		if res.Op == gc.ONAME {
-			gc.Gvardef(res)
-		}
-		gc.Agen(res, &dst)
-	} else {
-		if res.Op == gc.ONAME {
-			gc.Gvardef(res)
-		}
-		gc.Agenr(res, &dst, res)
-		gc.Agenr(n, &src, nil)
-	}
-
-	var tmp gc.Node
-	gc.Regalloc(&tmp, gc.Types[gc.Tptr], nil)
-
-	// set up end marker
-	var nend gc.Node
-
-	// move src and dest to the end of block if necessary
-	if dir < 0 {
-		if c >= 4 {
-			gc.Regalloc(&nend, gc.Types[gc.Tptr], nil)
-			gins(arm64.AMOVD, &src, &nend)
-		}
-
-		p := gins(arm64.AADD, nil, &src)
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = w
-
-		p = gins(arm64.AADD, nil, &dst)
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = w
-	} else {
-		p := gins(arm64.AADD, nil, &src)
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = int64(-dir)
-
-		p = gins(arm64.AADD, nil, &dst)
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = int64(-dir)
-
-		if c >= 4 {
-			gc.Regalloc(&nend, gc.Types[gc.Tptr], nil)
-			p := gins(arm64.AMOVD, &src, &nend)
-			p.From.Type = obj.TYPE_ADDR
-			p.From.Offset = w
-		}
-	}
-
-	// move
-	// TODO: enable duffcopy for larger copies.
-	if c >= 4 {
-		p := gins(op, &src, &tmp)
-		p.From.Type = obj.TYPE_MEM
-		p.From.Offset = int64(dir)
-		p.Scond = arm64.C_XPRE
-		ploop := p
-
-		p = gins(op, &tmp, &dst)
-		p.To.Type = obj.TYPE_MEM
-		p.To.Offset = int64(dir)
-		p.Scond = arm64.C_XPRE
-
-		p = gcmp(arm64.ACMP, &src, &nend)
-
-		gc.Patch(gc.Gbranch(arm64.ABNE, nil, 0), ploop)
-		gc.Regfree(&nend)
-	} else {
-		// TODO(austin): Instead of generating ADD $-8,R8; ADD
-		// $-8,R7; n*(MOVDU 8(R8),R9; MOVDU R9,8(R7);) just
-		// generate the offsets directly and eliminate the
-		// ADDs.  That will produce shorter, more
-		// pipeline-able code.
-		var p *obj.Prog
-		for {
-			tmp14 := c
-			c--
-			if tmp14 <= 0 {
-				break
-			}
-
-			p = gins(op, &src, &tmp)
-			p.From.Type = obj.TYPE_MEM
-			p.From.Offset = int64(dir)
-			p.Scond = arm64.C_XPRE
-
-			p = gins(op, &tmp, &dst)
-			p.To.Type = obj.TYPE_MEM
-			p.To.Offset = int64(dir)
-			p.Scond = arm64.C_XPRE
-		}
-	}
-
-	gc.Regfree(&dst)
-	gc.Regfree(&src)
-	gc.Regfree(&tmp)
-}
diff --git a/src/cmd/compile/internal/arm64/galign.go b/src/cmd/compile/internal/arm64/galign.go
deleted file mode 100644
index 38def8f..0000000
--- a/src/cmd/compile/internal/arm64/galign.go
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package arm64
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/arm64"
-)
-
-var thechar int = '7'
-
-var thestring string = "arm64"
-
-var thelinkarch *obj.LinkArch = &arm64.Linkarm64
-
-func linkarchinit() {
-}
-
-var MAXWIDTH int64 = 1 << 50
-
-/*
- * go declares several platform-specific type aliases:
- * int, uint, and uintptr
- */
-var typedefs = []gc.Typedef{
-	gc.Typedef{"int", gc.TINT, gc.TINT64},
-	gc.Typedef{"uint", gc.TUINT, gc.TUINT64},
-	gc.Typedef{"uintptr", gc.TUINTPTR, gc.TUINT64},
-}
-
-func betypeinit() {
-	gc.Widthptr = 8
-	gc.Widthint = 8
-	gc.Widthreg = 8
-}
-
-func Main() {
-	gc.Thearch.Thechar = thechar
-	gc.Thearch.Thestring = thestring
-	gc.Thearch.Thelinkarch = thelinkarch
-	gc.Thearch.Typedefs = typedefs
-	gc.Thearch.REGSP = arm64.REGSP
-	gc.Thearch.REGCTXT = arm64.REGCTXT
-	gc.Thearch.REGCALLX = arm64.REGRT1
-	gc.Thearch.REGCALLX2 = arm64.REGRT2
-	gc.Thearch.REGRETURN = arm64.REG_R0
-	gc.Thearch.REGMIN = arm64.REG_R0
-	gc.Thearch.REGMAX = arm64.REG_R31
-	gc.Thearch.REGZERO = arm64.REGZERO
-	gc.Thearch.FREGMIN = arm64.REG_F0
-	gc.Thearch.FREGMAX = arm64.REG_F31
-	gc.Thearch.MAXWIDTH = MAXWIDTH
-	gc.Thearch.ReservedRegs = resvd
-
-	gc.Thearch.Betypeinit = betypeinit
-	gc.Thearch.Cgen_hmul = cgen_hmul
-	gc.Thearch.Cgen_shift = cgen_shift
-	gc.Thearch.Clearfat = clearfat
-	gc.Thearch.Defframe = defframe
-	gc.Thearch.Dodiv = dodiv
-	gc.Thearch.Excise = excise
-	gc.Thearch.Expandchecks = expandchecks
-	gc.Thearch.Getg = getg
-	gc.Thearch.Gins = gins
-	gc.Thearch.Ginscmp = ginscmp
-	gc.Thearch.Ginscon = ginscon
-	gc.Thearch.Ginsnop = ginsnop
-	gc.Thearch.Gmove = gmove
-	gc.Thearch.Linkarchinit = linkarchinit
-	gc.Thearch.Peep = peep
-	gc.Thearch.Proginfo = proginfo
-	gc.Thearch.Regtyp = regtyp
-	gc.Thearch.Sameaddr = sameaddr
-	gc.Thearch.Smallindir = smallindir
-	gc.Thearch.Stackaddr = stackaddr
-	gc.Thearch.Blockcopy = blockcopy
-	gc.Thearch.Sudoaddable = sudoaddable
-	gc.Thearch.Sudoclean = sudoclean
-	gc.Thearch.Excludedregs = excludedregs
-	gc.Thearch.RtoB = RtoB
-	gc.Thearch.FtoB = RtoB
-	gc.Thearch.BtoR = BtoR
-	gc.Thearch.BtoF = BtoF
-	gc.Thearch.Optoas = optoas
-	gc.Thearch.Doregbits = doregbits
-	gc.Thearch.Regnames = regnames
-
-	gc.Main()
-	gc.Exit(0)
-}
diff --git a/src/cmd/compile/internal/arm64/ggen.go b/src/cmd/compile/internal/arm64/ggen.go
deleted file mode 100644
index cba4d99..0000000
--- a/src/cmd/compile/internal/arm64/ggen.go
+++ /dev/null
@@ -1,534 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package arm64
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/arm64"
-	"fmt"
-)
-
-func defframe(ptxt *obj.Prog) {
-	var n *gc.Node
-
-	// fill in argument size, stack size
-	ptxt.To.Type = obj.TYPE_TEXTSIZE
-
-	ptxt.To.Val = int32(gc.Rnd(gc.Curfn.Type.Argwid, int64(gc.Widthptr)))
-	frame := uint32(gc.Rnd(gc.Stksize+gc.Maxarg, int64(gc.Widthreg)))
-
-	// arm64 requires that the frame size (not counting saved LR)
-	// be empty or be 8 mod 16. If not, pad it.
-	if frame != 0 && frame%16 != 8 {
-		frame += 8
-	}
-
-	ptxt.To.Offset = int64(frame)
-
-	// insert code to zero ambiguously live variables
-	// so that the garbage collector only sees initialized values
-	// when it looks for pointers.
-	p := ptxt
-
-	hi := int64(0)
-	lo := hi
-
-	// iterate through declarations - they are sorted in decreasing xoffset order.
-	for l := gc.Curfn.Func.Dcl; l != nil; l = l.Next {
-		n = l.N
-		if !n.Name.Needzero {
-			continue
-		}
-		if n.Class != gc.PAUTO {
-			gc.Fatal("needzero class %d", n.Class)
-		}
-		if n.Type.Width%int64(gc.Widthptr) != 0 || n.Xoffset%int64(gc.Widthptr) != 0 || n.Type.Width == 0 {
-			gc.Fatal("var %v has size %d offset %d", gc.Nconv(n, obj.FmtLong), int(n.Type.Width), int(n.Xoffset))
-		}
-
-		if lo != hi && n.Xoffset+n.Type.Width >= lo-int64(2*gc.Widthreg) {
-			// merge with range we already have
-			lo = n.Xoffset
-
-			continue
-		}
-
-		// zero old range
-		p = zerorange(p, int64(frame), lo, hi)
-
-		// set new range
-		hi = n.Xoffset + n.Type.Width
-
-		lo = n.Xoffset
-	}
-
-	// zero final range
-	zerorange(p, int64(frame), lo, hi)
-}
-
-var darwin = obj.Getgoos() == "darwin"
-
-func zerorange(p *obj.Prog, frame int64, lo int64, hi int64) *obj.Prog {
-	cnt := hi - lo
-	if cnt == 0 {
-		return p
-	}
-	if cnt < int64(4*gc.Widthptr) {
-		for i := int64(0); i < cnt; i += int64(gc.Widthptr) {
-			p = appendpp(p, arm64.AMOVD, obj.TYPE_REG, arm64.REGZERO, 0, obj.TYPE_MEM, arm64.REGSP, 8+frame+lo+i)
-		}
-	} else if cnt <= int64(128*gc.Widthptr) && !darwin { // darwin ld64 cannot handle BR26 reloc with non-zero addend
-		p = appendpp(p, arm64.AMOVD, obj.TYPE_REG, arm64.REGSP, 0, obj.TYPE_REG, arm64.REGRT1, 0)
-		p = appendpp(p, arm64.AADD, obj.TYPE_CONST, 0, 8+frame+lo-8, obj.TYPE_REG, arm64.REGRT1, 0)
-		p.Reg = arm64.REGRT1
-		p = appendpp(p, obj.ADUFFZERO, obj.TYPE_NONE, 0, 0, obj.TYPE_MEM, 0, 0)
-		f := gc.Sysfunc("duffzero")
-		gc.Naddr(&p.To, f)
-		gc.Afunclit(&p.To, f)
-		p.To.Offset = 4 * (128 - cnt/int64(gc.Widthptr))
-	} else {
-		p = appendpp(p, arm64.AMOVD, obj.TYPE_CONST, 0, 8+frame+lo-8, obj.TYPE_REG, arm64.REGTMP, 0)
-		p = appendpp(p, arm64.AMOVD, obj.TYPE_REG, arm64.REGSP, 0, obj.TYPE_REG, arm64.REGRT1, 0)
-		p = appendpp(p, arm64.AADD, obj.TYPE_REG, arm64.REGTMP, 0, obj.TYPE_REG, arm64.REGRT1, 0)
-		p.Reg = arm64.REGRT1
-		p = appendpp(p, arm64.AMOVD, obj.TYPE_CONST, 0, cnt, obj.TYPE_REG, arm64.REGTMP, 0)
-		p = appendpp(p, arm64.AADD, obj.TYPE_REG, arm64.REGTMP, 0, obj.TYPE_REG, arm64.REGRT2, 0)
-		p.Reg = arm64.REGRT1
-		p = appendpp(p, arm64.AMOVD, obj.TYPE_REG, arm64.REGZERO, 0, obj.TYPE_MEM, arm64.REGRT1, int64(gc.Widthptr))
-		p.Scond = arm64.C_XPRE
-		p1 := p
-		p = appendpp(p, arm64.ACMP, obj.TYPE_REG, arm64.REGRT1, 0, obj.TYPE_NONE, 0, 0)
-		p.Reg = arm64.REGRT2
-		p = appendpp(p, arm64.ABNE, obj.TYPE_NONE, 0, 0, obj.TYPE_BRANCH, 0, 0)
-		gc.Patch(p, p1)
-	}
-
-	return p
-}
-
-func appendpp(p *obj.Prog, as int, ftype int, freg int, foffset int64, ttype int, treg int, toffset int64) *obj.Prog {
-	q := gc.Ctxt.NewProg()
-	gc.Clearp(q)
-	q.As = int16(as)
-	q.Lineno = p.Lineno
-	q.From.Type = int16(ftype)
-	q.From.Reg = int16(freg)
-	q.From.Offset = foffset
-	q.To.Type = int16(ttype)
-	q.To.Reg = int16(treg)
-	q.To.Offset = toffset
-	q.Link = p.Link
-	p.Link = q
-	return q
-}
-
-func ginsnop() {
-	var con gc.Node
-	gc.Nodconst(&con, gc.Types[gc.TINT], 0)
-	gins(arm64.AHINT, &con, nil)
-}
-
-var panicdiv *gc.Node
-
-/*
- * generate division.
- * generates one of:
- *	res = nl / nr
- *	res = nl % nr
- * according to op.
- */
-func dodiv(op int, nl *gc.Node, nr *gc.Node, res *gc.Node) {
-	// Have to be careful about handling
-	// most negative int divided by -1 correctly.
-	// The hardware will generate undefined result.
-	// Also need to explicitly trap on division on zero,
-	// the hardware will silently generate undefined result.
-	// DIVW will leave unpredicable result in higher 32-bit,
-	// so always use DIVD/DIVDU.
-	t := nl.Type
-
-	t0 := t
-	check := 0
-	if gc.Issigned[t.Etype] {
-		check = 1
-		if gc.Isconst(nl, gc.CTINT) && nl.Int() != -(1<<uint64(t.Width*8-1)) {
-			check = 0
-		} else if gc.Isconst(nr, gc.CTINT) && nr.Int() != -1 {
-			check = 0
-		}
-	}
-
-	if t.Width < 8 {
-		if gc.Issigned[t.Etype] {
-			t = gc.Types[gc.TINT64]
-		} else {
-			t = gc.Types[gc.TUINT64]
-		}
-		check = 0
-	}
-
-	a := optoas(gc.ODIV, t)
-
-	var tl gc.Node
-	gc.Regalloc(&tl, t0, nil)
-	var tr gc.Node
-	gc.Regalloc(&tr, t0, nil)
-	if nl.Ullman >= nr.Ullman {
-		gc.Cgen(nl, &tl)
-		gc.Cgen(nr, &tr)
-	} else {
-		gc.Cgen(nr, &tr)
-		gc.Cgen(nl, &tl)
-	}
-
-	if t != t0 {
-		// Convert
-		tl2 := tl
-
-		tr2 := tr
-		tl.Type = t
-		tr.Type = t
-		gmove(&tl2, &tl)
-		gmove(&tr2, &tr)
-	}
-
-	// Handle divide-by-zero panic.
-	p1 := gins(optoas(gc.OCMP, t), &tr, nil)
-	p1.Reg = arm64.REGZERO
-	p1 = gc.Gbranch(optoas(gc.ONE, t), nil, +1)
-	if panicdiv == nil {
-		panicdiv = gc.Sysfunc("panicdivide")
-	}
-	gc.Ginscall(panicdiv, -1)
-	gc.Patch(p1, gc.Pc)
-
-	var p2 *obj.Prog
-	if check != 0 {
-		var nm1 gc.Node
-		gc.Nodconst(&nm1, t, -1)
-		gcmp(optoas(gc.OCMP, t), &tr, &nm1)
-		p1 := gc.Gbranch(optoas(gc.ONE, t), nil, +1)
-		if op == gc.ODIV {
-			// a / (-1) is -a.
-			gins(optoas(gc.OMINUS, t), &tl, &tl)
-
-			gmove(&tl, res)
-		} else {
-			// a % (-1) is 0.
-			var nz gc.Node
-			gc.Nodconst(&nz, t, 0)
-
-			gmove(&nz, res)
-		}
-
-		p2 = gc.Gbranch(obj.AJMP, nil, 0)
-		gc.Patch(p1, gc.Pc)
-	}
-
-	p1 = gins(a, &tr, &tl)
-	if op == gc.ODIV {
-		gc.Regfree(&tr)
-		gmove(&tl, res)
-	} else {
-		// A%B = A-(A/B*B)
-		var tm gc.Node
-		gc.Regalloc(&tm, t, nil)
-
-		// patch div to use the 3 register form
-		// TODO(minux): add gins3?
-		p1.Reg = p1.To.Reg
-
-		p1.To.Reg = tm.Reg
-		gins(optoas(gc.OMUL, t), &tr, &tm)
-		gc.Regfree(&tr)
-		gins(optoas(gc.OSUB, t), &tm, &tl)
-		gc.Regfree(&tm)
-		gmove(&tl, res)
-	}
-
-	gc.Regfree(&tl)
-	if check != 0 {
-		gc.Patch(p2, gc.Pc)
-	}
-}
-
-/*
- * generate high multiply:
- *   res = (nl*nr) >> width
- */
-func cgen_hmul(nl *gc.Node, nr *gc.Node, res *gc.Node) {
-	// largest ullman on left.
-	if nl.Ullman < nr.Ullman {
-		tmp := (*gc.Node)(nl)
-		nl = nr
-		nr = tmp
-	}
-
-	t := (*gc.Type)(nl.Type)
-	w := int(int(t.Width * 8))
-	var n1 gc.Node
-	gc.Cgenr(nl, &n1, res)
-	var n2 gc.Node
-	gc.Cgenr(nr, &n2, nil)
-	switch gc.Simtype[t.Etype] {
-	case gc.TINT8,
-		gc.TINT16,
-		gc.TINT32:
-		gins(optoas(gc.OMUL, t), &n2, &n1)
-		p := (*obj.Prog)(gins(arm64.AASR, nil, &n1))
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = int64(w)
-
-	case gc.TUINT8,
-		gc.TUINT16,
-		gc.TUINT32:
-		gins(optoas(gc.OMUL, t), &n2, &n1)
-		p := (*obj.Prog)(gins(arm64.ALSR, nil, &n1))
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = int64(w)
-
-	case gc.TINT64,
-		gc.TUINT64:
-		if gc.Issigned[t.Etype] {
-			gins(arm64.ASMULH, &n2, &n1)
-		} else {
-			gins(arm64.AUMULH, &n2, &n1)
-		}
-
-	default:
-		gc.Fatal("cgen_hmul %v", t)
-	}
-
-	gc.Cgen(&n1, res)
-	gc.Regfree(&n1)
-	gc.Regfree(&n2)
-}
-
-/*
- * generate shift according to op, one of:
- *	res = nl << nr
- *	res = nl >> nr
- */
-func cgen_shift(op int, bounded bool, nl *gc.Node, nr *gc.Node, res *gc.Node) {
-	a := int(optoas(op, nl.Type))
-
-	if nr.Op == gc.OLITERAL {
-		var n1 gc.Node
-		gc.Regalloc(&n1, nl.Type, res)
-		gc.Cgen(nl, &n1)
-		sc := uint64(nr.Int())
-		if sc >= uint64(nl.Type.Width*8) {
-			// large shift gets 2 shifts by width-1
-			var n3 gc.Node
-			gc.Nodconst(&n3, gc.Types[gc.TUINT32], nl.Type.Width*8-1)
-
-			gins(a, &n3, &n1)
-			gins(a, &n3, &n1)
-		} else {
-			gins(a, nr, &n1)
-		}
-		gmove(&n1, res)
-		gc.Regfree(&n1)
-		return
-	}
-
-	if nl.Ullman >= gc.UINF {
-		var n4 gc.Node
-		gc.Tempname(&n4, nl.Type)
-		gc.Cgen(nl, &n4)
-		nl = &n4
-	}
-
-	if nr.Ullman >= gc.UINF {
-		var n5 gc.Node
-		gc.Tempname(&n5, nr.Type)
-		gc.Cgen(nr, &n5)
-		nr = &n5
-	}
-
-	// Allow either uint32 or uint64 as shift type,
-	// to avoid unnecessary conversion from uint32 to uint64
-	// just to do the comparison.
-	tcount := gc.Types[gc.Simtype[nr.Type.Etype]]
-
-	if tcount.Etype < gc.TUINT32 {
-		tcount = gc.Types[gc.TUINT32]
-	}
-
-	var n1 gc.Node
-	gc.Regalloc(&n1, nr.Type, nil) // to hold the shift type in CX
-	var n3 gc.Node
-	gc.Regalloc(&n3, tcount, &n1) // to clear high bits of CX
-
-	var n2 gc.Node
-	gc.Regalloc(&n2, nl.Type, res)
-
-	if nl.Ullman >= nr.Ullman {
-		gc.Cgen(nl, &n2)
-		gc.Cgen(nr, &n1)
-		gmove(&n1, &n3)
-	} else {
-		gc.Cgen(nr, &n1)
-		gmove(&n1, &n3)
-		gc.Cgen(nl, &n2)
-	}
-
-	gc.Regfree(&n3)
-
-	// test and fix up large shifts
-	if !bounded {
-		gc.Nodconst(&n3, tcount, nl.Type.Width*8)
-		gcmp(optoas(gc.OCMP, tcount), &n1, &n3)
-		p1 := (*obj.Prog)(gc.Gbranch(optoas(gc.OLT, tcount), nil, +1))
-		if op == gc.ORSH && gc.Issigned[nl.Type.Etype] {
-			gc.Nodconst(&n3, gc.Types[gc.TUINT32], nl.Type.Width*8-1)
-			gins(a, &n3, &n2)
-		} else {
-			gc.Nodconst(&n3, nl.Type, 0)
-			gmove(&n3, &n2)
-		}
-
-		gc.Patch(p1, gc.Pc)
-	}
-
-	gins(a, &n1, &n2)
-
-	gmove(&n2, res)
-
-	gc.Regfree(&n1)
-	gc.Regfree(&n2)
-}
-
-func clearfat(nl *gc.Node) {
-	/* clear a fat object */
-	if gc.Debug['g'] != 0 {
-		fmt.Printf("clearfat %v (%v, size: %d)\n", nl, nl.Type, nl.Type.Width)
-	}
-
-	w := uint64(uint64(nl.Type.Width))
-
-	// Avoid taking the address for simple enough types.
-	if gc.Componentgen(nil, nl) {
-		return
-	}
-
-	c := uint64(w % 8) // bytes
-	q := uint64(w / 8) // dwords
-
-	var r0 gc.Node
-	gc.Nodreg(&r0, gc.Types[gc.TUINT64], arm64.REGZERO)
-	var dst gc.Node
-
-	// REGRT1 is reserved on arm64, see arm64/gsubr.go.
-	gc.Nodreg(&dst, gc.Types[gc.Tptr], arm64.REGRT1)
-	gc.Agen(nl, &dst)
-
-	var boff uint64
-	if q > 128 {
-		p := gins(arm64.ASUB, nil, &dst)
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = 8
-
-		var end gc.Node
-		gc.Regalloc(&end, gc.Types[gc.Tptr], nil)
-		p = gins(arm64.AMOVD, &dst, &end)
-		p.From.Type = obj.TYPE_ADDR
-		p.From.Offset = int64(q * 8)
-
-		p = gins(arm64.AMOVD, &r0, &dst)
-		p.To.Type = obj.TYPE_MEM
-		p.To.Offset = 8
-		p.Scond = arm64.C_XPRE
-		pl := (*obj.Prog)(p)
-
-		p = gcmp(arm64.ACMP, &dst, &end)
-		gc.Patch(gc.Gbranch(arm64.ABNE, nil, 0), pl)
-
-		gc.Regfree(&end)
-
-		// The loop leaves R16 on the last zeroed dword
-		boff = 8
-	} else if q >= 4 && !darwin { // darwin ld64 cannot handle BR26 reloc with non-zero addend
-		p := gins(arm64.ASUB, nil, &dst)
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = 8
-		f := (*gc.Node)(gc.Sysfunc("duffzero"))
-		p = gins(obj.ADUFFZERO, nil, f)
-		gc.Afunclit(&p.To, f)
-
-		// 4 and 128 = magic constants: see ../../runtime/asm_arm64x.s
-		p.To.Offset = int64(4 * (128 - q))
-
-		// duffzero leaves R16 on the last zeroed dword
-		boff = 8
-	} else {
-		var p *obj.Prog
-		for t := uint64(0); t < q; t++ {
-			p = gins(arm64.AMOVD, &r0, &dst)
-			p.To.Type = obj.TYPE_MEM
-			p.To.Offset = int64(8 * t)
-		}
-
-		boff = 8 * q
-	}
-
-	var p *obj.Prog
-	for t := uint64(0); t < c; t++ {
-		p = gins(arm64.AMOVB, &r0, &dst)
-		p.To.Type = obj.TYPE_MEM
-		p.To.Offset = int64(t + boff)
-	}
-}
-
-// Called after regopt and peep have run.
-// Expand CHECKNIL pseudo-op into actual nil pointer check.
-func expandchecks(firstp *obj.Prog) {
-	var p1 *obj.Prog
-
-	for p := (*obj.Prog)(firstp); p != nil; p = p.Link {
-		if gc.Debug_checknil != 0 && gc.Ctxt.Debugvlog != 0 {
-			fmt.Printf("expandchecks: %v\n", p)
-		}
-		if p.As != obj.ACHECKNIL {
-			continue
-		}
-		if gc.Debug_checknil != 0 && p.Lineno > 1 { // p->lineno==1 in generated wrappers
-			gc.Warnl(int(p.Lineno), "generated nil check")
-		}
-		if p.From.Type != obj.TYPE_REG {
-			gc.Fatal("invalid nil check %v\n", p)
-		}
-
-		// check is
-		//	CBNZ arg, 2(PC)
-		//	MOVD ZR, 0(arg)
-		p1 = gc.Ctxt.NewProg()
-		gc.Clearp(p1)
-		p1.Link = p.Link
-		p.Link = p1
-		p1.Lineno = p.Lineno
-		p1.Pc = 9999
-
-		p.As = arm64.ACBNZ
-		p.To.Type = obj.TYPE_BRANCH
-		p.To.Val = p1.Link
-
-		// crash by write to memory address 0.
-		p1.As = arm64.AMOVD
-		p1.From.Type = obj.TYPE_REG
-		p1.From.Reg = arm64.REGZERO
-		p1.To.Type = obj.TYPE_MEM
-		p1.To.Reg = p.From.Reg
-		p1.To.Offset = 0
-	}
-}
-
-// res = runtime.getg()
-func getg(res *gc.Node) {
-	var n1 gc.Node
-	gc.Nodreg(&n1, res.Type, arm64.REGG)
-	gmove(&n1, res)
-}
diff --git a/src/cmd/compile/internal/arm64/gsubr.go b/src/cmd/compile/internal/arm64/gsubr.go
deleted file mode 100644
index 0a14654..0000000
--- a/src/cmd/compile/internal/arm64/gsubr.go
+++ /dev/null
@@ -1,983 +0,0 @@
-// Derived from Inferno utils/6c/txt.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6c/txt.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package arm64
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/arm64"
-	"fmt"
-)
-
-var resvd = []int{
-	arm64.REGTMP,
-	arm64.REGG,
-	arm64.REGRT1,
-	arm64.REGRT2,
-	arm64.REG_R31, // REGZERO and REGSP
-	arm64.FREGZERO,
-	arm64.FREGHALF,
-	arm64.FREGONE,
-	arm64.FREGTWO,
-}
-
-/*
- * generate
- *	as $c, n
- */
-func ginscon(as int, c int64, n2 *gc.Node) {
-	var n1 gc.Node
-
-	gc.Nodconst(&n1, gc.Types[gc.TINT64], c)
-
-	if as != arm64.AMOVD && (c < -arm64.BIG || c > arm64.BIG) || as == arm64.AMUL || n2 != nil && n2.Op != gc.OREGISTER {
-		// cannot have more than 16-bit of immediate in ADD, etc.
-		// instead, MOV into register first.
-		var ntmp gc.Node
-		gc.Regalloc(&ntmp, gc.Types[gc.TINT64], nil)
-
-		gins(arm64.AMOVD, &n1, &ntmp)
-		gins(as, &ntmp, n2)
-		gc.Regfree(&ntmp)
-		return
-	}
-
-	rawgins(as, &n1, n2)
-}
-
-/*
- * generate
- *	as n, $c (CMP)
- */
-func ginscon2(as int, n2 *gc.Node, c int64) {
-	var n1 gc.Node
-
-	gc.Nodconst(&n1, gc.Types[gc.TINT64], c)
-
-	switch as {
-	default:
-		gc.Fatal("ginscon2")
-
-	case arm64.ACMP:
-		if -arm64.BIG <= c && c <= arm64.BIG {
-			gcmp(as, n2, &n1)
-			return
-		}
-	}
-
-	// MOV n1 into register first
-	var ntmp gc.Node
-	gc.Regalloc(&ntmp, gc.Types[gc.TINT64], nil)
-
-	rawgins(arm64.AMOVD, &n1, &ntmp)
-	gcmp(as, n2, &ntmp)
-	gc.Regfree(&ntmp)
-}
-
-func ginscmp(op int, t *gc.Type, n1, n2 *gc.Node, likely int) *obj.Prog {
-	if gc.Isint[t.Etype] && n1.Op == gc.OLITERAL && n2.Op != gc.OLITERAL {
-		// Reverse comparison to place constant last.
-		op = gc.Brrev(op)
-		n1, n2 = n2, n1
-	}
-
-	var r1, r2, g1, g2 gc.Node
-	gc.Regalloc(&r1, t, n1)
-	gc.Regalloc(&g1, n1.Type, &r1)
-	gc.Cgen(n1, &g1)
-	gmove(&g1, &r1)
-	if gc.Isint[t.Etype] && gc.Isconst(n2, gc.CTINT) {
-		ginscon2(optoas(gc.OCMP, t), &r1, n2.Int())
-	} else {
-		gc.Regalloc(&r2, t, n2)
-		gc.Regalloc(&g2, n1.Type, &r2)
-		gc.Cgen(n2, &g2)
-		gmove(&g2, &r2)
-		gcmp(optoas(gc.OCMP, t), &r1, &r2)
-		gc.Regfree(&g2)
-		gc.Regfree(&r2)
-	}
-	gc.Regfree(&g1)
-	gc.Regfree(&r1)
-	return gc.Gbranch(optoas(op, t), nil, likely)
-}
-
-/*
- * generate move:
- *	t = f
- * hard part is conversions.
- */
-func gmove(f *gc.Node, t *gc.Node) {
-	if gc.Debug['M'] != 0 {
-		fmt.Printf("gmove %v -> %v\n", gc.Nconv(f, obj.FmtLong), gc.Nconv(t, obj.FmtLong))
-	}
-
-	ft := int(gc.Simsimtype(f.Type))
-	tt := int(gc.Simsimtype(t.Type))
-	cvt := (*gc.Type)(t.Type)
-
-	if gc.Iscomplex[ft] || gc.Iscomplex[tt] {
-		gc.Complexmove(f, t)
-		return
-	}
-
-	// cannot have two memory operands
-	var r1 gc.Node
-	var a int
-	if gc.Ismem(f) && gc.Ismem(t) {
-		goto hard
-	}
-
-	// convert constant to desired type
-	if f.Op == gc.OLITERAL {
-		var con gc.Node
-		switch tt {
-		default:
-			f.Convconst(&con, t.Type)
-
-		case gc.TINT32,
-			gc.TINT16,
-			gc.TINT8:
-			var con gc.Node
-			f.Convconst(&con, gc.Types[gc.TINT64])
-			var r1 gc.Node
-			gc.Regalloc(&r1, con.Type, t)
-			gins(arm64.AMOVD, &con, &r1)
-			gmove(&r1, t)
-			gc.Regfree(&r1)
-			return
-
-		case gc.TUINT32,
-			gc.TUINT16,
-			gc.TUINT8:
-			var con gc.Node
-			f.Convconst(&con, gc.Types[gc.TUINT64])
-			var r1 gc.Node
-			gc.Regalloc(&r1, con.Type, t)
-			gins(arm64.AMOVD, &con, &r1)
-			gmove(&r1, t)
-			gc.Regfree(&r1)
-			return
-		}
-
-		f = &con
-		ft = tt // so big switch will choose a simple mov
-
-		// constants can't move directly to memory.
-		if gc.Ismem(t) {
-			goto hard
-		}
-	}
-
-	// value -> value copy, first operand in memory.
-	// any floating point operand requires register
-	// src, so goto hard to copy to register first.
-	if gc.Ismem(f) && ft != tt && (gc.Isfloat[ft] || gc.Isfloat[tt]) {
-		cvt = gc.Types[ft]
-		goto hard
-	}
-
-	// value -> value copy, only one memory operand.
-	// figure out the instruction to use.
-	// break out of switch for one-instruction gins.
-	// goto rdst for "destination must be register".
-	// goto hard for "convert to cvt type first".
-	// otherwise handle and return.
-
-	switch uint32(ft)<<16 | uint32(tt) {
-	default:
-		gc.Fatal("gmove %v -> %v", gc.Tconv(f.Type, obj.FmtLong), gc.Tconv(t.Type, obj.FmtLong))
-
-		/*
-		 * integer copy and truncate
-		 */
-	case gc.TINT8<<16 | gc.TINT8, // same size
-		gc.TUINT8<<16 | gc.TINT8,
-		gc.TINT16<<16 | gc.TINT8,
-		// truncate
-		gc.TUINT16<<16 | gc.TINT8,
-		gc.TINT32<<16 | gc.TINT8,
-		gc.TUINT32<<16 | gc.TINT8,
-		gc.TINT64<<16 | gc.TINT8,
-		gc.TUINT64<<16 | gc.TINT8:
-		a = arm64.AMOVB
-
-	case gc.TINT8<<16 | gc.TUINT8, // same size
-		gc.TUINT8<<16 | gc.TUINT8,
-		gc.TINT16<<16 | gc.TUINT8,
-		// truncate
-		gc.TUINT16<<16 | gc.TUINT8,
-		gc.TINT32<<16 | gc.TUINT8,
-		gc.TUINT32<<16 | gc.TUINT8,
-		gc.TINT64<<16 | gc.TUINT8,
-		gc.TUINT64<<16 | gc.TUINT8:
-		a = arm64.AMOVBU
-
-	case gc.TINT16<<16 | gc.TINT16, // same size
-		gc.TUINT16<<16 | gc.TINT16,
-		gc.TINT32<<16 | gc.TINT16,
-		// truncate
-		gc.TUINT32<<16 | gc.TINT16,
-		gc.TINT64<<16 | gc.TINT16,
-		gc.TUINT64<<16 | gc.TINT16:
-		a = arm64.AMOVH
-
-	case gc.TINT16<<16 | gc.TUINT16, // same size
-		gc.TUINT16<<16 | gc.TUINT16,
-		gc.TINT32<<16 | gc.TUINT16,
-		// truncate
-		gc.TUINT32<<16 | gc.TUINT16,
-		gc.TINT64<<16 | gc.TUINT16,
-		gc.TUINT64<<16 | gc.TUINT16:
-		a = arm64.AMOVHU
-
-	case gc.TINT32<<16 | gc.TINT32, // same size
-		gc.TUINT32<<16 | gc.TINT32,
-		gc.TINT64<<16 | gc.TINT32,
-		// truncate
-		gc.TUINT64<<16 | gc.TINT32:
-		a = arm64.AMOVW
-
-	case gc.TINT32<<16 | gc.TUINT32, // same size
-		gc.TUINT32<<16 | gc.TUINT32,
-		gc.TINT64<<16 | gc.TUINT32,
-		gc.TUINT64<<16 | gc.TUINT32:
-		a = arm64.AMOVWU
-
-	case gc.TINT64<<16 | gc.TINT64, // same size
-		gc.TINT64<<16 | gc.TUINT64,
-		gc.TUINT64<<16 | gc.TINT64,
-		gc.TUINT64<<16 | gc.TUINT64:
-		a = arm64.AMOVD
-
-		/*
-		 * integer up-conversions
-		 */
-	case gc.TINT8<<16 | gc.TINT16, // sign extend int8
-		gc.TINT8<<16 | gc.TUINT16,
-		gc.TINT8<<16 | gc.TINT32,
-		gc.TINT8<<16 | gc.TUINT32,
-		gc.TINT8<<16 | gc.TINT64,
-		gc.TINT8<<16 | gc.TUINT64:
-		a = arm64.AMOVB
-
-		goto rdst
-
-	case gc.TUINT8<<16 | gc.TINT16, // zero extend uint8
-		gc.TUINT8<<16 | gc.TUINT16,
-		gc.TUINT8<<16 | gc.TINT32,
-		gc.TUINT8<<16 | gc.TUINT32,
-		gc.TUINT8<<16 | gc.TINT64,
-		gc.TUINT8<<16 | gc.TUINT64:
-		a = arm64.AMOVBU
-
-		goto rdst
-
-	case gc.TINT16<<16 | gc.TINT32, // sign extend int16
-		gc.TINT16<<16 | gc.TUINT32,
-		gc.TINT16<<16 | gc.TINT64,
-		gc.TINT16<<16 | gc.TUINT64:
-		a = arm64.AMOVH
-
-		goto rdst
-
-	case gc.TUINT16<<16 | gc.TINT32, // zero extend uint16
-		gc.TUINT16<<16 | gc.TUINT32,
-		gc.TUINT16<<16 | gc.TINT64,
-		gc.TUINT16<<16 | gc.TUINT64:
-		a = arm64.AMOVHU
-
-		goto rdst
-
-	case gc.TINT32<<16 | gc.TINT64, // sign extend int32
-		gc.TINT32<<16 | gc.TUINT64:
-		a = arm64.AMOVW
-
-		goto rdst
-
-	case gc.TUINT32<<16 | gc.TINT64, // zero extend uint32
-		gc.TUINT32<<16 | gc.TUINT64:
-		a = arm64.AMOVWU
-
-		goto rdst
-
-	/*
-	* float to integer
-	 */
-	case gc.TFLOAT32<<16 | gc.TINT32:
-		a = arm64.AFCVTZSSW
-		goto rdst
-
-	case gc.TFLOAT64<<16 | gc.TINT32:
-		a = arm64.AFCVTZSDW
-		goto rdst
-
-	case gc.TFLOAT32<<16 | gc.TINT64:
-		a = arm64.AFCVTZSS
-		goto rdst
-
-	case gc.TFLOAT64<<16 | gc.TINT64:
-		a = arm64.AFCVTZSD
-		goto rdst
-
-	case gc.TFLOAT32<<16 | gc.TUINT32:
-		a = arm64.AFCVTZUSW
-		goto rdst
-
-	case gc.TFLOAT64<<16 | gc.TUINT32:
-		a = arm64.AFCVTZUDW
-		goto rdst
-
-	case gc.TFLOAT32<<16 | gc.TUINT64:
-		a = arm64.AFCVTZUS
-		goto rdst
-
-	case gc.TFLOAT64<<16 | gc.TUINT64:
-		a = arm64.AFCVTZUD
-		goto rdst
-
-	case gc.TFLOAT32<<16 | gc.TINT16,
-		gc.TFLOAT32<<16 | gc.TINT8,
-		gc.TFLOAT64<<16 | gc.TINT16,
-		gc.TFLOAT64<<16 | gc.TINT8:
-		cvt = gc.Types[gc.TINT32]
-
-		goto hard
-
-	case gc.TFLOAT32<<16 | gc.TUINT16,
-		gc.TFLOAT32<<16 | gc.TUINT8,
-		gc.TFLOAT64<<16 | gc.TUINT16,
-		gc.TFLOAT64<<16 | gc.TUINT8:
-		cvt = gc.Types[gc.TUINT32]
-
-		goto hard
-
-	/*
-	 * integer to float
-	 */
-	case gc.TINT8<<16 | gc.TFLOAT32,
-		gc.TINT16<<16 | gc.TFLOAT32,
-		gc.TINT32<<16 | gc.TFLOAT32:
-		a = arm64.ASCVTFWS
-
-		goto rdst
-
-	case gc.TINT8<<16 | gc.TFLOAT64,
-		gc.TINT16<<16 | gc.TFLOAT64,
-		gc.TINT32<<16 | gc.TFLOAT64:
-		a = arm64.ASCVTFWD
-
-		goto rdst
-
-	case gc.TINT64<<16 | gc.TFLOAT32:
-		a = arm64.ASCVTFS
-		goto rdst
-
-	case gc.TINT64<<16 | gc.TFLOAT64:
-		a = arm64.ASCVTFD
-		goto rdst
-
-	case gc.TUINT8<<16 | gc.TFLOAT32,
-		gc.TUINT16<<16 | gc.TFLOAT32,
-		gc.TUINT32<<16 | gc.TFLOAT32:
-		a = arm64.AUCVTFWS
-
-		goto rdst
-
-	case gc.TUINT8<<16 | gc.TFLOAT64,
-		gc.TUINT16<<16 | gc.TFLOAT64,
-		gc.TUINT32<<16 | gc.TFLOAT64:
-		a = arm64.AUCVTFWD
-
-		goto rdst
-
-	case gc.TUINT64<<16 | gc.TFLOAT32:
-		a = arm64.AUCVTFS
-		goto rdst
-
-	case gc.TUINT64<<16 | gc.TFLOAT64:
-		a = arm64.AUCVTFD
-		goto rdst
-
-		/*
-		 * float to float
-		 */
-	case gc.TFLOAT32<<16 | gc.TFLOAT32:
-		a = arm64.AFMOVS
-
-	case gc.TFLOAT64<<16 | gc.TFLOAT64:
-		a = arm64.AFMOVD
-
-	case gc.TFLOAT32<<16 | gc.TFLOAT64:
-		a = arm64.AFCVTSD
-		goto rdst
-
-	case gc.TFLOAT64<<16 | gc.TFLOAT32:
-		a = arm64.AFCVTDS
-		goto rdst
-	}
-
-	gins(a, f, t)
-	return
-
-	// requires register destination
-rdst:
-	gc.Regalloc(&r1, t.Type, t)
-
-	gins(a, f, &r1)
-	gmove(&r1, t)
-	gc.Regfree(&r1)
-	return
-
-	// requires register intermediate
-hard:
-	gc.Regalloc(&r1, cvt, t)
-
-	gmove(f, &r1)
-	gmove(&r1, t)
-	gc.Regfree(&r1)
-	return
-}
-
-func intLiteral(n *gc.Node) (x int64, ok bool) {
-	switch {
-	case n == nil:
-		return
-	case gc.Isconst(n, gc.CTINT):
-		return n.Int(), true
-	case gc.Isconst(n, gc.CTBOOL):
-		return int64(obj.Bool2int(n.Bool())), true
-	}
-	return
-}
-
-// gins is called by the front end.
-// It synthesizes some multiple-instruction sequences
-// so the front end can stay simpler.
-func gins(as int, f, t *gc.Node) *obj.Prog {
-	if as >= obj.A_ARCHSPECIFIC {
-		if x, ok := intLiteral(f); ok {
-			ginscon(as, x, t)
-			return nil // caller must not use
-		}
-	}
-	if as == arm64.ACMP {
-		if x, ok := intLiteral(t); ok {
-			ginscon2(as, f, x)
-			return nil // caller must not use
-		}
-	}
-	return rawgins(as, f, t)
-}
-
-/*
- * generate one instruction:
- *	as f, t
- */
-func rawgins(as int, f *gc.Node, t *gc.Node) *obj.Prog {
-	// TODO(austin): Add self-move test like in 6g (but be careful
-	// of truncation moves)
-
-	p := gc.Prog(as)
-	gc.Naddr(&p.From, f)
-	gc.Naddr(&p.To, t)
-
-	switch as {
-	case arm64.ACMP, arm64.AFCMPS, arm64.AFCMPD:
-		if t != nil {
-			if f.Op != gc.OREGISTER {
-				gc.Fatal("bad operands to gcmp")
-			}
-			p.From = p.To
-			p.To = obj.Addr{}
-			raddr(f, p)
-		}
-	}
-
-	// Bad things the front end has done to us. Crash to find call stack.
-	switch as {
-	case arm64.AAND, arm64.AMUL:
-		if p.From.Type == obj.TYPE_CONST {
-			gc.Debug['h'] = 1
-			gc.Fatal("bad inst: %v", p)
-		}
-	case arm64.ACMP:
-		if p.From.Type == obj.TYPE_MEM || p.To.Type == obj.TYPE_MEM {
-			gc.Debug['h'] = 1
-			gc.Fatal("bad inst: %v", p)
-		}
-	}
-
-	if gc.Debug['g'] != 0 {
-		fmt.Printf("%v\n", p)
-	}
-
-	w := int32(0)
-	switch as {
-	case arm64.AMOVB,
-		arm64.AMOVBU:
-		w = 1
-
-	case arm64.AMOVH,
-		arm64.AMOVHU:
-		w = 2
-
-	case arm64.AMOVW,
-		arm64.AMOVWU:
-		w = 4
-
-	case arm64.AMOVD:
-		if p.From.Type == obj.TYPE_CONST || p.From.Type == obj.TYPE_ADDR {
-			break
-		}
-		w = 8
-	}
-
-	if w != 0 && ((f != nil && p.From.Width < int64(w)) || (t != nil && p.To.Type != obj.TYPE_REG && p.To.Width > int64(w))) {
-		gc.Dump("f", f)
-		gc.Dump("t", t)
-		gc.Fatal("bad width: %v (%d, %d)\n", p, p.From.Width, p.To.Width)
-	}
-
-	return p
-}
-
-/*
- * insert n into reg slot of p
- */
-func raddr(n *gc.Node, p *obj.Prog) {
-	var a obj.Addr
-
-	gc.Naddr(&a, n)
-	if a.Type != obj.TYPE_REG {
-		if n != nil {
-			gc.Fatal("bad in raddr: %v", gc.Oconv(int(n.Op), 0))
-		} else {
-			gc.Fatal("bad in raddr: <null>")
-		}
-		p.Reg = 0
-	} else {
-		p.Reg = a.Reg
-	}
-}
-
-func gcmp(as int, lhs *gc.Node, rhs *gc.Node) *obj.Prog {
-	if lhs.Op != gc.OREGISTER {
-		gc.Fatal("bad operands to gcmp: %v %v", gc.Oconv(int(lhs.Op), 0), gc.Oconv(int(rhs.Op), 0))
-	}
-
-	p := rawgins(as, rhs, nil)
-	raddr(lhs, p)
-	return p
-}
-
-/*
- * return Axxx for Oxxx on type t.
- */
-func optoas(op int, t *gc.Type) int {
-	if t == nil {
-		gc.Fatal("optoas: t is nil")
-	}
-
-	a := int(obj.AXXX)
-	switch uint32(op)<<16 | uint32(gc.Simtype[t.Etype]) {
-	default:
-		gc.Fatal("optoas: no entry for op=%v type=%v", gc.Oconv(int(op), 0), t)
-
-	case gc.OEQ<<16 | gc.TBOOL,
-		gc.OEQ<<16 | gc.TINT8,
-		gc.OEQ<<16 | gc.TUINT8,
-		gc.OEQ<<16 | gc.TINT16,
-		gc.OEQ<<16 | gc.TUINT16,
-		gc.OEQ<<16 | gc.TINT32,
-		gc.OEQ<<16 | gc.TUINT32,
-		gc.OEQ<<16 | gc.TINT64,
-		gc.OEQ<<16 | gc.TUINT64,
-		gc.OEQ<<16 | gc.TPTR32,
-		gc.OEQ<<16 | gc.TPTR64,
-		gc.OEQ<<16 | gc.TFLOAT32,
-		gc.OEQ<<16 | gc.TFLOAT64:
-		a = arm64.ABEQ
-
-	case gc.ONE<<16 | gc.TBOOL,
-		gc.ONE<<16 | gc.TINT8,
-		gc.ONE<<16 | gc.TUINT8,
-		gc.ONE<<16 | gc.TINT16,
-		gc.ONE<<16 | gc.TUINT16,
-		gc.ONE<<16 | gc.TINT32,
-		gc.ONE<<16 | gc.TUINT32,
-		gc.ONE<<16 | gc.TINT64,
-		gc.ONE<<16 | gc.TUINT64,
-		gc.ONE<<16 | gc.TPTR32,
-		gc.ONE<<16 | gc.TPTR64,
-		gc.ONE<<16 | gc.TFLOAT32,
-		gc.ONE<<16 | gc.TFLOAT64:
-		a = arm64.ABNE
-
-	case gc.OLT<<16 | gc.TINT8,
-		gc.OLT<<16 | gc.TINT16,
-		gc.OLT<<16 | gc.TINT32,
-		gc.OLT<<16 | gc.TINT64:
-		a = arm64.ABLT
-
-	case gc.OLT<<16 | gc.TUINT8,
-		gc.OLT<<16 | gc.TUINT16,
-		gc.OLT<<16 | gc.TUINT32,
-		gc.OLT<<16 | gc.TUINT64,
-		gc.OLT<<16 | gc.TFLOAT32,
-		gc.OLT<<16 | gc.TFLOAT64:
-		a = arm64.ABLO
-
-	case gc.OLE<<16 | gc.TINT8,
-		gc.OLE<<16 | gc.TINT16,
-		gc.OLE<<16 | gc.TINT32,
-		gc.OLE<<16 | gc.TINT64:
-		a = arm64.ABLE
-
-	case gc.OLE<<16 | gc.TUINT8,
-		gc.OLE<<16 | gc.TUINT16,
-		gc.OLE<<16 | gc.TUINT32,
-		gc.OLE<<16 | gc.TUINT64,
-		gc.OLE<<16 | gc.TFLOAT32,
-		gc.OLE<<16 | gc.TFLOAT64:
-		a = arm64.ABLS
-
-	case gc.OGT<<16 | gc.TINT8,
-		gc.OGT<<16 | gc.TINT16,
-		gc.OGT<<16 | gc.TINT32,
-		gc.OGT<<16 | gc.TINT64,
-		gc.OGT<<16 | gc.TFLOAT32,
-		gc.OGT<<16 | gc.TFLOAT64:
-		a = arm64.ABGT
-
-	case gc.OGT<<16 | gc.TUINT8,
-		gc.OGT<<16 | gc.TUINT16,
-		gc.OGT<<16 | gc.TUINT32,
-		gc.OGT<<16 | gc.TUINT64:
-		a = arm64.ABHI
-
-	case gc.OGE<<16 | gc.TINT8,
-		gc.OGE<<16 | gc.TINT16,
-		gc.OGE<<16 | gc.TINT32,
-		gc.OGE<<16 | gc.TINT64,
-		gc.OGE<<16 | gc.TFLOAT32,
-		gc.OGE<<16 | gc.TFLOAT64:
-		a = arm64.ABGE
-
-	case gc.OGE<<16 | gc.TUINT8,
-		gc.OGE<<16 | gc.TUINT16,
-		gc.OGE<<16 | gc.TUINT32,
-		gc.OGE<<16 | gc.TUINT64:
-		a = arm64.ABHS
-
-	case gc.OCMP<<16 | gc.TBOOL,
-		gc.OCMP<<16 | gc.TINT8,
-		gc.OCMP<<16 | gc.TINT16,
-		gc.OCMP<<16 | gc.TINT32,
-		gc.OCMP<<16 | gc.TPTR32,
-		gc.OCMP<<16 | gc.TINT64,
-		gc.OCMP<<16 | gc.TUINT8,
-		gc.OCMP<<16 | gc.TUINT16,
-		gc.OCMP<<16 | gc.TUINT32,
-		gc.OCMP<<16 | gc.TUINT64,
-		gc.OCMP<<16 | gc.TPTR64:
-		a = arm64.ACMP
-
-	case gc.OCMP<<16 | gc.TFLOAT32:
-		a = arm64.AFCMPS
-
-	case gc.OCMP<<16 | gc.TFLOAT64:
-		a = arm64.AFCMPD
-
-	case gc.OAS<<16 | gc.TBOOL,
-		gc.OAS<<16 | gc.TINT8:
-		a = arm64.AMOVB
-
-	case gc.OAS<<16 | gc.TUINT8:
-		a = arm64.AMOVBU
-
-	case gc.OAS<<16 | gc.TINT16:
-		a = arm64.AMOVH
-
-	case gc.OAS<<16 | gc.TUINT16:
-		a = arm64.AMOVHU
-
-	case gc.OAS<<16 | gc.TINT32:
-		a = arm64.AMOVW
-
-	case gc.OAS<<16 | gc.TUINT32,
-		gc.OAS<<16 | gc.TPTR32:
-		a = arm64.AMOVWU
-
-	case gc.OAS<<16 | gc.TINT64,
-		gc.OAS<<16 | gc.TUINT64,
-		gc.OAS<<16 | gc.TPTR64:
-		a = arm64.AMOVD
-
-	case gc.OAS<<16 | gc.TFLOAT32:
-		a = arm64.AFMOVS
-
-	case gc.OAS<<16 | gc.TFLOAT64:
-		a = arm64.AFMOVD
-
-	case gc.OADD<<16 | gc.TINT8,
-		gc.OADD<<16 | gc.TUINT8,
-		gc.OADD<<16 | gc.TINT16,
-		gc.OADD<<16 | gc.TUINT16,
-		gc.OADD<<16 | gc.TINT32,
-		gc.OADD<<16 | gc.TUINT32,
-		gc.OADD<<16 | gc.TPTR32,
-		gc.OADD<<16 | gc.TINT64,
-		gc.OADD<<16 | gc.TUINT64,
-		gc.OADD<<16 | gc.TPTR64:
-		a = arm64.AADD
-
-	case gc.OADD<<16 | gc.TFLOAT32:
-		a = arm64.AFADDS
-
-	case gc.OADD<<16 | gc.TFLOAT64:
-		a = arm64.AFADDD
-
-	case gc.OSUB<<16 | gc.TINT8,
-		gc.OSUB<<16 | gc.TUINT8,
-		gc.OSUB<<16 | gc.TINT16,
-		gc.OSUB<<16 | gc.TUINT16,
-		gc.OSUB<<16 | gc.TINT32,
-		gc.OSUB<<16 | gc.TUINT32,
-		gc.OSUB<<16 | gc.TPTR32,
-		gc.OSUB<<16 | gc.TINT64,
-		gc.OSUB<<16 | gc.TUINT64,
-		gc.OSUB<<16 | gc.TPTR64:
-		a = arm64.ASUB
-
-	case gc.OSUB<<16 | gc.TFLOAT32:
-		a = arm64.AFSUBS
-
-	case gc.OSUB<<16 | gc.TFLOAT64:
-		a = arm64.AFSUBD
-
-	case gc.OMINUS<<16 | gc.TINT8,
-		gc.OMINUS<<16 | gc.TUINT8,
-		gc.OMINUS<<16 | gc.TINT16,
-		gc.OMINUS<<16 | gc.TUINT16,
-		gc.OMINUS<<16 | gc.TINT32,
-		gc.OMINUS<<16 | gc.TUINT32,
-		gc.OMINUS<<16 | gc.TPTR32,
-		gc.OMINUS<<16 | gc.TINT64,
-		gc.OMINUS<<16 | gc.TUINT64,
-		gc.OMINUS<<16 | gc.TPTR64:
-		a = arm64.ANEG
-
-	case gc.OMINUS<<16 | gc.TFLOAT32:
-		a = arm64.AFNEGS
-
-	case gc.OMINUS<<16 | gc.TFLOAT64:
-		a = arm64.AFNEGD
-
-	case gc.OAND<<16 | gc.TINT8,
-		gc.OAND<<16 | gc.TUINT8,
-		gc.OAND<<16 | gc.TINT16,
-		gc.OAND<<16 | gc.TUINT16,
-		gc.OAND<<16 | gc.TINT32,
-		gc.OAND<<16 | gc.TUINT32,
-		gc.OAND<<16 | gc.TPTR32,
-		gc.OAND<<16 | gc.TINT64,
-		gc.OAND<<16 | gc.TUINT64,
-		gc.OAND<<16 | gc.TPTR64:
-		a = arm64.AAND
-
-	case gc.OOR<<16 | gc.TINT8,
-		gc.OOR<<16 | gc.TUINT8,
-		gc.OOR<<16 | gc.TINT16,
-		gc.OOR<<16 | gc.TUINT16,
-		gc.OOR<<16 | gc.TINT32,
-		gc.OOR<<16 | gc.TUINT32,
-		gc.OOR<<16 | gc.TPTR32,
-		gc.OOR<<16 | gc.TINT64,
-		gc.OOR<<16 | gc.TUINT64,
-		gc.OOR<<16 | gc.TPTR64:
-		a = arm64.AORR
-
-	case gc.OXOR<<16 | gc.TINT8,
-		gc.OXOR<<16 | gc.TUINT8,
-		gc.OXOR<<16 | gc.TINT16,
-		gc.OXOR<<16 | gc.TUINT16,
-		gc.OXOR<<16 | gc.TINT32,
-		gc.OXOR<<16 | gc.TUINT32,
-		gc.OXOR<<16 | gc.TPTR32,
-		gc.OXOR<<16 | gc.TINT64,
-		gc.OXOR<<16 | gc.TUINT64,
-		gc.OXOR<<16 | gc.TPTR64:
-		a = arm64.AEOR
-
-		// TODO(minux): handle rotates
-	//case CASE(OLROT, TINT8):
-	//case CASE(OLROT, TUINT8):
-	//case CASE(OLROT, TINT16):
-	//case CASE(OLROT, TUINT16):
-	//case CASE(OLROT, TINT32):
-	//case CASE(OLROT, TUINT32):
-	//case CASE(OLROT, TPTR32):
-	//case CASE(OLROT, TINT64):
-	//case CASE(OLROT, TUINT64):
-	//case CASE(OLROT, TPTR64):
-	//	a = 0//???; RLDC?
-	//	break;
-
-	case gc.OLSH<<16 | gc.TINT8,
-		gc.OLSH<<16 | gc.TUINT8,
-		gc.OLSH<<16 | gc.TINT16,
-		gc.OLSH<<16 | gc.TUINT16,
-		gc.OLSH<<16 | gc.TINT32,
-		gc.OLSH<<16 | gc.TUINT32,
-		gc.OLSH<<16 | gc.TPTR32,
-		gc.OLSH<<16 | gc.TINT64,
-		gc.OLSH<<16 | gc.TUINT64,
-		gc.OLSH<<16 | gc.TPTR64:
-		a = arm64.ALSL
-
-	case gc.ORSH<<16 | gc.TUINT8,
-		gc.ORSH<<16 | gc.TUINT16,
-		gc.ORSH<<16 | gc.TUINT32,
-		gc.ORSH<<16 | gc.TPTR32,
-		gc.ORSH<<16 | gc.TUINT64,
-		gc.ORSH<<16 | gc.TPTR64:
-		a = arm64.ALSR
-
-	case gc.ORSH<<16 | gc.TINT8,
-		gc.ORSH<<16 | gc.TINT16,
-		gc.ORSH<<16 | gc.TINT32,
-		gc.ORSH<<16 | gc.TINT64:
-		a = arm64.AASR
-
-		// TODO(minux): handle rotates
-	//case CASE(ORROTC, TINT8):
-	//case CASE(ORROTC, TUINT8):
-	//case CASE(ORROTC, TINT16):
-	//case CASE(ORROTC, TUINT16):
-	//case CASE(ORROTC, TINT32):
-	//case CASE(ORROTC, TUINT32):
-	//case CASE(ORROTC, TINT64):
-	//case CASE(ORROTC, TUINT64):
-	//	a = 0//??? RLDC??
-	//	break;
-
-	case gc.OHMUL<<16 | gc.TINT64:
-		a = arm64.ASMULH
-
-	case gc.OHMUL<<16 | gc.TUINT64,
-		gc.OHMUL<<16 | gc.TPTR64:
-		a = arm64.AUMULH
-
-	case gc.OMUL<<16 | gc.TINT8,
-		gc.OMUL<<16 | gc.TINT16,
-		gc.OMUL<<16 | gc.TINT32:
-		a = arm64.ASMULL
-
-	case gc.OMUL<<16 | gc.TINT64:
-		a = arm64.AMUL
-
-	case gc.OMUL<<16 | gc.TUINT8,
-		gc.OMUL<<16 | gc.TUINT16,
-		gc.OMUL<<16 | gc.TUINT32,
-		gc.OMUL<<16 | gc.TPTR32:
-		// don't use word multiply, the high 32-bit are undefined.
-		a = arm64.AUMULL
-
-	case gc.OMUL<<16 | gc.TUINT64,
-		gc.OMUL<<16 | gc.TPTR64:
-		a = arm64.AMUL // for 64-bit multiplies, signedness doesn't matter.
-
-	case gc.OMUL<<16 | gc.TFLOAT32:
-		a = arm64.AFMULS
-
-	case gc.OMUL<<16 | gc.TFLOAT64:
-		a = arm64.AFMULD
-
-	case gc.ODIV<<16 | gc.TINT8,
-		gc.ODIV<<16 | gc.TINT16,
-		gc.ODIV<<16 | gc.TINT32,
-		gc.ODIV<<16 | gc.TINT64:
-		a = arm64.ASDIV
-
-	case gc.ODIV<<16 | gc.TUINT8,
-		gc.ODIV<<16 | gc.TUINT16,
-		gc.ODIV<<16 | gc.TUINT32,
-		gc.ODIV<<16 | gc.TPTR32,
-		gc.ODIV<<16 | gc.TUINT64,
-		gc.ODIV<<16 | gc.TPTR64:
-		a = arm64.AUDIV
-
-	case gc.ODIV<<16 | gc.TFLOAT32:
-		a = arm64.AFDIVS
-
-	case gc.ODIV<<16 | gc.TFLOAT64:
-		a = arm64.AFDIVD
-
-	case gc.OSQRT<<16 | gc.TFLOAT64:
-		a = arm64.AFSQRTD
-	}
-
-	return a
-}
-
-const (
-	ODynam   = 1 << 0
-	OAddable = 1 << 1
-)
-
-func xgen(n *gc.Node, a *gc.Node, o int) bool {
-	// TODO(minux)
-
-	return -1 != 0 /*TypeKind(100016)*/
-}
-
-func sudoclean() {
-	return
-}
-
-/*
- * generate code to compute address of n,
- * a reference to a (perhaps nested) field inside
- * an array or struct.
- * return 0 on failure, 1 on success.
- * on success, leaves usable address in a.
- *
- * caller is responsible for calling sudoclean
- * after successful sudoaddable,
- * to release the register used for a.
- */
-func sudoaddable(as int, n *gc.Node, a *obj.Addr) bool {
-	// TODO(minux)
-
-	*a = obj.Addr{}
-	return false
-}
diff --git a/src/cmd/compile/internal/arm64/peep.go b/src/cmd/compile/internal/arm64/peep.go
deleted file mode 100644
index 387a30e..0000000
--- a/src/cmd/compile/internal/arm64/peep.go
+++ /dev/null
@@ -1,809 +0,0 @@
-// Derived from Inferno utils/6c/peep.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6c/peep.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package arm64
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/arm64"
-	"fmt"
-)
-
-var gactive uint32
-
-func peep(firstp *obj.Prog) {
-	g := (*gc.Graph)(gc.Flowstart(firstp, nil))
-	if g == nil {
-		return
-	}
-	gactive = 0
-
-	var p *obj.Prog
-	var r *gc.Flow
-	var t int
-loop1:
-	if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-		gc.Dumpit("loop1", g.Start, 0)
-	}
-
-	t = 0
-	for r = g.Start; r != nil; r = r.Link {
-		p = r.Prog
-
-		// TODO(minux) Handle smaller moves. arm and amd64
-		// distinguish between moves that *must* sign/zero
-		// extend and moves that don't care so they
-		// can eliminate moves that don't care without
-		// breaking moves that do care. This might let us
-		// simplify or remove the next peep loop, too.
-		if p.As == arm64.AMOVD || p.As == arm64.AFMOVD {
-			if regtyp(&p.To) {
-				// Try to eliminate reg->reg moves
-				if regtyp(&p.From) {
-					if p.From.Type == p.To.Type {
-						if copyprop(r) {
-							excise(r)
-							t++
-						} else if subprop(r) && copyprop(r) {
-							excise(r)
-							t++
-						}
-					}
-				}
-			}
-		}
-	}
-
-	if t != 0 {
-		goto loop1
-	}
-
-	/*
-	 * look for MOVB x,R; MOVB R,R (for small MOVs not handled above)
-	 */
-	var p1 *obj.Prog
-	var r1 *gc.Flow
-	for r := (*gc.Flow)(g.Start); r != nil; r = r.Link {
-		p = r.Prog
-		switch p.As {
-		default:
-			continue
-
-		case arm64.AMOVH,
-			arm64.AMOVHU,
-			arm64.AMOVB,
-			arm64.AMOVBU,
-			arm64.AMOVW,
-			arm64.AMOVWU:
-			if p.To.Type != obj.TYPE_REG {
-				continue
-			}
-		}
-
-		r1 = r.Link
-		if r1 == nil {
-			continue
-		}
-		p1 = r1.Prog
-		if p1.As != p.As {
-			continue
-		}
-		if p1.From.Type != obj.TYPE_REG || p1.From.Reg != p.To.Reg {
-			continue
-		}
-		if p1.To.Type != obj.TYPE_REG || p1.To.Reg != p.To.Reg {
-			continue
-		}
-		excise(r1)
-	}
-
-	if gc.Debug['D'] > 1 {
-		goto ret /* allow following code improvement to be suppressed */
-	}
-
-	// MOVD $c, R'; ADD R', R (R' unused) -> ADD $c, R
-	for r := (*gc.Flow)(g.Start); r != nil; r = r.Link {
-		p = r.Prog
-		switch p.As {
-		default:
-			continue
-
-		case arm64.AMOVD:
-			if p.To.Type != obj.TYPE_REG {
-				continue
-			}
-			if p.From.Type != obj.TYPE_CONST {
-				continue
-			}
-			if p.From.Offset < 0 || 4096 <= p.From.Offset {
-				continue
-			}
-		}
-		r1 = r.Link
-		if r1 == nil {
-			continue
-		}
-		p1 = r1.Prog
-		if p1.As != arm64.AADD && p1.As != arm64.ASUB { // TODO(aram): also logical after we have bimm.
-			continue
-		}
-		if p1.From.Type != obj.TYPE_REG || p1.From.Reg != p.To.Reg {
-			continue
-		}
-		if p1.To.Type != obj.TYPE_REG {
-			continue
-		}
-		if gc.Debug['P'] != 0 {
-			fmt.Printf("encoding $%d directly into %v in:\n%v\n%v\n", p.From.Offset, obj.Aconv(int(p1.As)), p, p1)
-		}
-		p1.From.Type = obj.TYPE_CONST
-		p1.From = p.From
-		excise(r)
-	}
-
-	/* TODO(minux):
-	 * look for OP x,y,R; CMP R, $0 -> OP.S x,y,R
-	 * when OP can set condition codes correctly
-	 */
-
-ret:
-	gc.Flowend(g)
-}
-
-func excise(r *gc.Flow) {
-	p := (*obj.Prog)(r.Prog)
-	if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-		fmt.Printf("%v ===delete===\n", p)
-	}
-	obj.Nopout(p)
-	gc.Ostats.Ndelmov++
-}
-
-func regtyp(a *obj.Addr) bool {
-	// TODO(rsc): Floating point register exclusions?
-	return a.Type == obj.TYPE_REG && arm64.REG_R0 <= a.Reg && a.Reg <= arm64.REG_F31 && a.Reg != arm64.REGZERO
-}
-
-/*
- * the idea is to substitute
- * one register for another
- * from one MOV to another
- *	MOV	a, R1
- *	ADD	b, R1	/ no use of R2
- *	MOV	R1, R2
- * would be converted to
- *	MOV	a, R2
- *	ADD	b, R2
- *	MOV	R2, R1
- * hopefully, then the former or latter MOV
- * will be eliminated by copy propagation.
- *
- * r0 (the argument, not the register) is the MOV at the end of the
- * above sequences. This returns 1 if it modified any instructions.
- */
-func subprop(r0 *gc.Flow) bool {
-	p := (*obj.Prog)(r0.Prog)
-	v1 := (*obj.Addr)(&p.From)
-	if !regtyp(v1) {
-		return false
-	}
-	v2 := (*obj.Addr)(&p.To)
-	if !regtyp(v2) {
-		return false
-	}
-	for r := gc.Uniqp(r0); r != nil; r = gc.Uniqp(r) {
-		if gc.Uniqs(r) == nil {
-			break
-		}
-		p = r.Prog
-		if p.As == obj.AVARDEF || p.As == obj.AVARKILL {
-			continue
-		}
-		if p.Info.Flags&gc.Call != 0 {
-			return false
-		}
-
-		if p.Info.Flags&(gc.RightRead|gc.RightWrite) == gc.RightWrite {
-			if p.To.Type == v1.Type {
-				if p.To.Reg == v1.Reg {
-					copysub(&p.To, v1, v2, 1)
-					if gc.Debug['P'] != 0 {
-						fmt.Printf("gotit: %v->%v\n%v", gc.Ctxt.Dconv(v1), gc.Ctxt.Dconv(v2), r.Prog)
-						if p.From.Type == v2.Type {
-							fmt.Printf(" excise")
-						}
-						fmt.Printf("\n")
-					}
-
-					for r = gc.Uniqs(r); r != r0; r = gc.Uniqs(r) {
-						p = r.Prog
-						copysub(&p.From, v1, v2, 1)
-						copysub1(p, v1, v2, 1)
-						copysub(&p.To, v1, v2, 1)
-						if gc.Debug['P'] != 0 {
-							fmt.Printf("%v\n", r.Prog)
-						}
-					}
-
-					t := int(int(v1.Reg))
-					v1.Reg = v2.Reg
-					v2.Reg = int16(t)
-					if gc.Debug['P'] != 0 {
-						fmt.Printf("%v last\n", r.Prog)
-					}
-					return true
-				}
-			}
-		}
-
-		if copyau(&p.From, v2) || copyau1(p, v2) || copyau(&p.To, v2) {
-			break
-		}
-		if copysub(&p.From, v1, v2, 0) != 0 || copysub1(p, v1, v2, 0) != 0 || copysub(&p.To, v1, v2, 0) != 0 {
-			break
-		}
-	}
-
-	return false
-}
-
-/*
- * The idea is to remove redundant copies.
- *	v1->v2	F=0
- *	(use v2	s/v2/v1/)*
- *	set v1	F=1
- *	use v2	return fail (v1->v2 move must remain)
- *	-----------------
- *	v1->v2	F=0
- *	(use v2	s/v2/v1/)*
- *	set v1	F=1
- *	set v2	return success (caller can remove v1->v2 move)
- */
-func copyprop(r0 *gc.Flow) bool {
-	p := (*obj.Prog)(r0.Prog)
-	v1 := (*obj.Addr)(&p.From)
-	v2 := (*obj.Addr)(&p.To)
-	if copyas(v1, v2) {
-		if gc.Debug['P'] != 0 {
-			fmt.Printf("eliminating self-move: %v\n", r0.Prog)
-		}
-		return true
-	}
-
-	gactive++
-	if gc.Debug['P'] != 0 {
-		fmt.Printf("trying to eliminate %v->%v move from:\n%v\n", gc.Ctxt.Dconv(v1), gc.Ctxt.Dconv(v2), r0.Prog)
-	}
-	return copy1(v1, v2, r0.S1, 0)
-}
-
-// copy1 replaces uses of v2 with v1 starting at r and returns 1 if
-// all uses were rewritten.
-func copy1(v1 *obj.Addr, v2 *obj.Addr, r *gc.Flow, f int) bool {
-	if uint32(r.Active) == gactive {
-		if gc.Debug['P'] != 0 {
-			fmt.Printf("act set; return 1\n")
-		}
-		return true
-	}
-
-	r.Active = int32(gactive)
-	if gc.Debug['P'] != 0 {
-		fmt.Printf("copy1 replace %v with %v f=%d\n", gc.Ctxt.Dconv(v2), gc.Ctxt.Dconv(v1), f)
-	}
-	var t int
-	var p *obj.Prog
-	for ; r != nil; r = r.S1 {
-		p = r.Prog
-		if gc.Debug['P'] != 0 {
-			fmt.Printf("%v", p)
-		}
-		if f == 0 && gc.Uniqp(r) == nil {
-			// Multiple predecessors; conservatively
-			// assume v1 was set on other path
-			f = 1
-
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("; merge; f=%d", f)
-			}
-		}
-
-		t = copyu(p, v2, nil)
-		switch t {
-		case 2: /* rar, can't split */
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("; %v rar; return 0\n", gc.Ctxt.Dconv(v2))
-			}
-			return false
-
-		case 3: /* set */
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("; %v set; return 1\n", gc.Ctxt.Dconv(v2))
-			}
-			return true
-
-		case 1, /* used, substitute */
-			4: /* use and set */
-			if f != 0 {
-				if gc.Debug['P'] == 0 {
-					return false
-				}
-				if t == 4 {
-					fmt.Printf("; %v used+set and f=%d; return 0\n", gc.Ctxt.Dconv(v2), f)
-				} else {
-					fmt.Printf("; %v used and f=%d; return 0\n", gc.Ctxt.Dconv(v2), f)
-				}
-				return false
-			}
-
-			if copyu(p, v2, v1) != 0 {
-				if gc.Debug['P'] != 0 {
-					fmt.Printf("; sub fail; return 0\n")
-				}
-				return false
-			}
-
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("; sub %v->%v\n => %v", gc.Ctxt.Dconv(v2), gc.Ctxt.Dconv(v1), p)
-			}
-			if t == 4 {
-				if gc.Debug['P'] != 0 {
-					fmt.Printf("; %v used+set; return 1\n", gc.Ctxt.Dconv(v2))
-				}
-				return true
-			}
-		}
-
-		if f == 0 {
-			t = copyu(p, v1, nil)
-			if f == 0 && (t == 2 || t == 3 || t == 4) {
-				f = 1
-				if gc.Debug['P'] != 0 {
-					fmt.Printf("; %v set and !f; f=%d", gc.Ctxt.Dconv(v1), f)
-				}
-			}
-		}
-
-		if gc.Debug['P'] != 0 {
-			fmt.Printf("\n")
-		}
-		if r.S2 != nil {
-			if !copy1(v1, v2, r.S2, f) {
-				return false
-			}
-		}
-	}
-
-	return true
-}
-
-// If s==nil, copyu returns the set/use of v in p; otherwise, it
-// modifies p to replace reads of v with reads of s and returns 0 for
-// success or non-zero for failure.
-//
-// If s==nil, copy returns one of the following values:
-//	1 if v only used
-//	2 if v is set and used in one address (read-alter-rewrite;
-//	  can't substitute)
-//	3 if v is only set
-//	4 if v is set in one address and used in another (so addresses
-//	  can be rewritten independently)
-//	0 otherwise (not touched)
-func copyu(p *obj.Prog, v *obj.Addr, s *obj.Addr) int {
-	if p.From3Type() != obj.TYPE_NONE {
-		// 7g never generates a from3
-		fmt.Printf("copyu: from3 (%v) not implemented\n", gc.Ctxt.Dconv(p.From3))
-	}
-	if p.RegTo2 != obj.REG_NONE {
-		// 7g never generates a to2
-		fmt.Printf("copyu: RegTo2 (%v) not implemented\n", obj.Rconv(int(p.RegTo2)))
-	}
-
-	switch p.As {
-	default:
-		fmt.Printf("copyu: can't find %v\n", obj.Aconv(int(p.As)))
-		return 2
-
-	case obj.ANOP, /* read p->from, write p->to */
-		arm64.ANEG,
-		arm64.AFNEGD,
-		arm64.AFNEGS,
-		arm64.AFSQRTD,
-		arm64.AFCVTZSD,
-		arm64.AFCVTZSS,
-		arm64.AFCVTZSDW,
-		arm64.AFCVTZSSW,
-		arm64.AFCVTZUD,
-		arm64.AFCVTZUS,
-		arm64.AFCVTZUDW,
-		arm64.AFCVTZUSW,
-		arm64.AFCVTSD,
-		arm64.AFCVTDS,
-		arm64.ASCVTFD,
-		arm64.ASCVTFS,
-		arm64.ASCVTFWD,
-		arm64.ASCVTFWS,
-		arm64.AUCVTFD,
-		arm64.AUCVTFS,
-		arm64.AUCVTFWD,
-		arm64.AUCVTFWS,
-		arm64.AMOVB,
-		arm64.AMOVBU,
-		arm64.AMOVH,
-		arm64.AMOVHU,
-		arm64.AMOVW,
-		arm64.AMOVWU,
-		arm64.AMOVD,
-		arm64.AFMOVS,
-		arm64.AFMOVD:
-		if p.Scond == 0 {
-			if s != nil {
-				if copysub(&p.From, v, s, 1) != 0 {
-					return 1
-				}
-
-				// Update only indirect uses of v in p->to
-				if !copyas(&p.To, v) {
-					if copysub(&p.To, v, s, 1) != 0 {
-						return 1
-					}
-				}
-				return 0
-			}
-
-			if copyas(&p.To, v) {
-				// Fix up implicit from
-				if p.From.Type == obj.TYPE_NONE {
-					p.From = p.To
-				}
-				if copyau(&p.From, v) {
-					return 4
-				}
-				return 3
-			}
-
-			if copyau(&p.From, v) {
-				return 1
-			}
-			if copyau(&p.To, v) {
-				// p->to only indirectly uses v
-				return 1
-			}
-
-			return 0
-		}
-
-		/* rar p->from, write p->to or read p->from, rar p->to */
-		if p.From.Type == obj.TYPE_MEM {
-			if copyas(&p.From, v) {
-				// No s!=nil check; need to fail
-				// anyway in that case
-				return 2
-			}
-
-			if s != nil {
-				if copysub(&p.To, v, s, 1) != 0 {
-					return 1
-				}
-				return 0
-			}
-
-			if copyas(&p.To, v) {
-				return 3
-			}
-		} else if p.To.Type == obj.TYPE_MEM {
-			if copyas(&p.To, v) {
-				return 2
-			}
-			if s != nil {
-				if copysub(&p.From, v, s, 1) != 0 {
-					return 1
-				}
-				return 0
-			}
-
-			if copyau(&p.From, v) {
-				return 1
-			}
-		} else {
-			fmt.Printf("copyu: bad %v\n", p)
-		}
-
-		return 0
-
-	case arm64.AADD, /* read p->from, read p->reg, write p->to */
-		arm64.ASUB,
-		arm64.AAND,
-		arm64.AORR,
-		arm64.AEOR,
-		arm64.AMUL,
-		arm64.ASMULL,
-		arm64.AUMULL,
-		arm64.ASMULH,
-		arm64.AUMULH,
-		arm64.ASDIV,
-		arm64.AUDIV,
-		arm64.ALSL,
-		arm64.ALSR,
-		arm64.AASR,
-		arm64.AFADDD,
-		arm64.AFADDS,
-		arm64.AFSUBD,
-		arm64.AFSUBS,
-		arm64.AFMULD,
-		arm64.AFMULS,
-		arm64.AFDIVD,
-		arm64.AFDIVS:
-		if s != nil {
-			if copysub(&p.From, v, s, 1) != 0 {
-				return 1
-			}
-			if copysub1(p, v, s, 1) != 0 {
-				return 1
-			}
-
-			// Update only indirect uses of v in p->to
-			if !copyas(&p.To, v) {
-				if copysub(&p.To, v, s, 1) != 0 {
-					return 1
-				}
-			}
-			return 0
-		}
-
-		if copyas(&p.To, v) {
-			if p.Reg == 0 {
-				// Fix up implicit reg (e.g., ADD
-				// R3,R4 -> ADD R3,R4,R4) so we can
-				// update reg and to separately.
-				p.Reg = p.To.Reg
-			}
-
-			if copyau(&p.From, v) {
-				return 4
-			}
-			if copyau1(p, v) {
-				return 4
-			}
-			return 3
-		}
-
-		if copyau(&p.From, v) {
-			return 1
-		}
-		if copyau1(p, v) {
-			return 1
-		}
-		if copyau(&p.To, v) {
-			return 1
-		}
-		return 0
-
-	case arm64.ABEQ,
-		arm64.ABNE,
-		arm64.ABGE,
-		arm64.ABLT,
-		arm64.ABGT,
-		arm64.ABLE,
-		arm64.ABLO,
-		arm64.ABLS,
-		arm64.ABHI,
-		arm64.ABHS:
-		return 0
-
-	case obj.ACHECKNIL, /* read p->from */
-		arm64.ACMP, /* read p->from, read p->reg */
-		arm64.AFCMPD,
-		arm64.AFCMPS:
-		if s != nil {
-			if copysub(&p.From, v, s, 1) != 0 {
-				return 1
-			}
-			return copysub1(p, v, s, 1)
-		}
-
-		if copyau(&p.From, v) {
-			return 1
-		}
-		if copyau1(p, v) {
-			return 1
-		}
-		return 0
-
-	case arm64.AB: /* read p->to */
-		if s != nil {
-			if copysub(&p.To, v, s, 1) != 0 {
-				return 1
-			}
-			return 0
-		}
-
-		if copyau(&p.To, v) {
-			return 1
-		}
-		return 0
-
-	case obj.ARET: /* funny */
-		if s != nil {
-			return 0
-		}
-
-		// All registers die at this point, so claim
-		// everything is set (and not used).
-		return 3
-
-	case arm64.ABL: /* funny */
-		if p.From.Type == obj.TYPE_REG && v.Type == obj.TYPE_REG && p.From.Reg == v.Reg {
-			return 2
-		}
-
-		if s != nil {
-			if copysub(&p.To, v, s, 1) != 0 {
-				return 1
-			}
-			return 0
-		}
-
-		if copyau(&p.To, v) {
-			return 4
-		}
-		return 3
-
-	// R31 is zero, used by DUFFZERO, cannot be substituted.
-	// R16 is ptr to memory, used and set, cannot be substituted.
-	case obj.ADUFFZERO:
-		if v.Type == obj.TYPE_REG {
-			if v.Reg == 31 {
-				return 1
-			}
-			if v.Reg == 16 {
-				return 2
-			}
-		}
-
-		return 0
-
-	// R16, R17 are ptr to src, dst, used and set, cannot be substituted.
-	// R27 is scratch, set by DUFFCOPY, cannot be substituted.
-	case obj.ADUFFCOPY:
-		if v.Type == obj.TYPE_REG {
-			if v.Reg == 16 || v.Reg == 17 {
-				return 2
-			}
-			if v.Reg == 27 {
-				return 3
-			}
-		}
-
-		return 0
-
-	case arm64.AHINT,
-		obj.ATEXT,
-		obj.APCDATA,
-		obj.AFUNCDATA,
-		obj.AVARDEF,
-		obj.AVARKILL:
-		return 0
-	}
-}
-
-// copyas returns 1 if a and v address the same register.
-//
-// If a is the from operand, this means this operation reads the
-// register in v. If a is the to operand, this means this operation
-// writes the register in v.
-func copyas(a *obj.Addr, v *obj.Addr) bool {
-	if regtyp(v) {
-		if a.Type == v.Type {
-			if a.Reg == v.Reg {
-				return true
-			}
-		}
-	}
-	return false
-}
-
-// copyau returns 1 if a either directly or indirectly addresses the
-// same register as v.
-//
-// If a is the from operand, this means this operation reads the
-// register in v. If a is the to operand, this means the operation
-// either reads or writes the register in v (if !copyas(a, v), then
-// the operation reads the register in v).
-func copyau(a *obj.Addr, v *obj.Addr) bool {
-	if copyas(a, v) {
-		return true
-	}
-	if v.Type == obj.TYPE_REG {
-		if a.Type == obj.TYPE_MEM || (a.Type == obj.TYPE_ADDR && a.Reg != 0) {
-			if v.Reg == a.Reg {
-				return true
-			}
-		}
-	}
-	return false
-}
-
-// copyau1 returns 1 if p->reg references the same register as v and v
-// is a direct reference.
-func copyau1(p *obj.Prog, v *obj.Addr) bool {
-	if regtyp(v) && v.Reg != 0 {
-		if p.Reg == v.Reg {
-			return true
-		}
-	}
-	return false
-}
-
-// copysub replaces v with s in a if f!=0 or indicates it if could if f==0.
-// Returns 1 on failure to substitute (it always succeeds on arm64).
-func copysub(a *obj.Addr, v *obj.Addr, s *obj.Addr, f int) int {
-	if f != 0 {
-		if copyau(a, v) {
-			a.Reg = s.Reg
-		}
-	}
-	return 0
-}
-
-// copysub1 replaces v with s in p1->reg if f!=0 or indicates if it could if f==0.
-// Returns 1 on failure to substitute (it always succeeds on arm64).
-func copysub1(p1 *obj.Prog, v *obj.Addr, s *obj.Addr, f int) int {
-	if f != 0 {
-		if copyau1(p1, v) {
-			p1.Reg = s.Reg
-		}
-	}
-	return 0
-}
-
-func sameaddr(a *obj.Addr, v *obj.Addr) bool {
-	if a.Type != v.Type {
-		return false
-	}
-	if regtyp(v) && a.Reg == v.Reg {
-		return true
-	}
-	if v.Type == obj.NAME_AUTO || v.Type == obj.NAME_PARAM {
-		if v.Offset == a.Offset {
-			return true
-		}
-	}
-	return false
-}
-
-func smallindir(a *obj.Addr, reg *obj.Addr) bool {
-	return reg.Type == obj.TYPE_REG && a.Type == obj.TYPE_MEM && a.Reg == reg.Reg && 0 <= a.Offset && a.Offset < 4096
-}
-
-func stackaddr(a *obj.Addr) bool {
-	return a.Type == obj.TYPE_REG && a.Reg == arm64.REGSP
-}
diff --git a/src/cmd/compile/internal/arm64/prog.go b/src/cmd/compile/internal/arm64/prog.go
deleted file mode 100644
index 1106e78..0000000
--- a/src/cmd/compile/internal/arm64/prog.go
+++ /dev/null
@@ -1,174 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package arm64
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/arm64"
-)
-
-const (
-	LeftRdwr  uint32 = gc.LeftRead | gc.LeftWrite
-	RightRdwr uint32 = gc.RightRead | gc.RightWrite
-)
-
-// This table gives the basic information about instruction
-// generated by the compiler and processed in the optimizer.
-// See opt.h for bit definitions.
-//
-// Instructions not generated need not be listed.
-// As an exception to that rule, we typically write down all the
-// size variants of an operation even if we just use a subset.
-//
-// The table is formatted for 8-space tabs.
-var progtable = [arm64.ALAST]obj.ProgInfo{
-	obj.ATYPE:     {gc.Pseudo | gc.Skip, 0, 0, 0},
-	obj.ATEXT:     {gc.Pseudo, 0, 0, 0},
-	obj.AFUNCDATA: {gc.Pseudo, 0, 0, 0},
-	obj.APCDATA:   {gc.Pseudo, 0, 0, 0},
-	obj.AUNDEF:    {gc.Break, 0, 0, 0},
-	obj.AUSEFIELD: {gc.OK, 0, 0, 0},
-	obj.ACHECKNIL: {gc.LeftRead, 0, 0, 0},
-	obj.AVARDEF:   {gc.Pseudo | gc.RightWrite, 0, 0, 0},
-	obj.AVARKILL:  {gc.Pseudo | gc.RightWrite, 0, 0, 0},
-
-	// NOP is an internal no-op that also stands
-	// for USED and SET annotations, not the Power opcode.
-	obj.ANOP:    {gc.LeftRead | gc.RightWrite, 0, 0, 0},
-	arm64.AHINT: {gc.OK, 0, 0, 0},
-
-	// Integer
-	arm64.AADD:   {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm64.ASUB:   {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm64.ANEG:   {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm64.AAND:   {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm64.AORR:   {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm64.AEOR:   {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm64.AMUL:   {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm64.ASMULL: {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm64.AUMULL: {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm64.ASMULH: {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm64.AUMULH: {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm64.ASDIV:  {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm64.AUDIV:  {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm64.ALSL:   {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm64.ALSR:   {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm64.AASR:   {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm64.ACMP:   {gc.SizeQ | gc.LeftRead | gc.RegRead, 0, 0, 0},
-
-	// Floating point.
-	arm64.AFADDD:  {gc.SizeD | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm64.AFADDS:  {gc.SizeF | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm64.AFSUBD:  {gc.SizeD | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm64.AFSUBS:  {gc.SizeF | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm64.AFNEGD:  {gc.SizeD | gc.LeftRead | gc.RightWrite, 0, 0, 0},
-	arm64.AFNEGS:  {gc.SizeF | gc.LeftRead | gc.RightWrite, 0, 0, 0},
-	arm64.AFSQRTD: {gc.SizeD | gc.LeftRead | gc.RightWrite, 0, 0, 0},
-	arm64.AFMULD:  {gc.SizeD | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm64.AFMULS:  {gc.SizeF | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm64.AFDIVD:  {gc.SizeD | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm64.AFDIVS:  {gc.SizeF | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	arm64.AFCMPD:  {gc.SizeD | gc.LeftRead | gc.RegRead, 0, 0, 0},
-	arm64.AFCMPS:  {gc.SizeF | gc.LeftRead | gc.RegRead, 0, 0, 0},
-
-	// float -> integer
-	arm64.AFCVTZSD:  {gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	arm64.AFCVTZSS:  {gc.SizeF | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	arm64.AFCVTZSDW: {gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	arm64.AFCVTZSSW: {gc.SizeF | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	arm64.AFCVTZUD:  {gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	arm64.AFCVTZUS:  {gc.SizeF | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	arm64.AFCVTZUDW: {gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	arm64.AFCVTZUSW: {gc.SizeF | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-
-	// float -> float
-	arm64.AFCVTSD: {gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	arm64.AFCVTDS: {gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-
-	// integer -> float
-	arm64.ASCVTFD:  {gc.SizeQ | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	arm64.ASCVTFS:  {gc.SizeQ | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	arm64.ASCVTFWD: {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	arm64.ASCVTFWS: {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	arm64.AUCVTFD:  {gc.SizeQ | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	arm64.AUCVTFS:  {gc.SizeQ | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	arm64.AUCVTFWD: {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	arm64.AUCVTFWS: {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-
-	// Moves
-	arm64.AMOVB:  {gc.SizeB | gc.LeftRead | gc.RightWrite | gc.Move | gc.Conv, 0, 0, 0},
-	arm64.AMOVBU: {gc.SizeB | gc.LeftRead | gc.RightWrite | gc.Move | gc.Conv, 0, 0, 0},
-	arm64.AMOVH:  {gc.SizeW | gc.LeftRead | gc.RightWrite | gc.Move | gc.Conv, 0, 0, 0},
-	arm64.AMOVHU: {gc.SizeW | gc.LeftRead | gc.RightWrite | gc.Move | gc.Conv, 0, 0, 0},
-	arm64.AMOVW:  {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Move | gc.Conv, 0, 0, 0},
-	arm64.AMOVWU: {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Move | gc.Conv, 0, 0, 0},
-	arm64.AMOVD:  {gc.SizeQ | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
-	arm64.AFMOVS: {gc.SizeF | gc.LeftRead | gc.RightWrite | gc.Move | gc.Conv, 0, 0, 0},
-	arm64.AFMOVD: {gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
-
-	// Jumps
-	arm64.AB:      {gc.Jump | gc.Break, 0, 0, 0},
-	arm64.ABL:     {gc.Call, 0, 0, 0},
-	arm64.ABEQ:    {gc.Cjmp, 0, 0, 0},
-	arm64.ABNE:    {gc.Cjmp, 0, 0, 0},
-	arm64.ABGE:    {gc.Cjmp, 0, 0, 0},
-	arm64.ABLT:    {gc.Cjmp, 0, 0, 0},
-	arm64.ABGT:    {gc.Cjmp, 0, 0, 0},
-	arm64.ABLE:    {gc.Cjmp, 0, 0, 0},
-	arm64.ABLO:    {gc.Cjmp, 0, 0, 0},
-	arm64.ABLS:    {gc.Cjmp, 0, 0, 0},
-	arm64.ABHI:    {gc.Cjmp, 0, 0, 0},
-	arm64.ABHS:    {gc.Cjmp, 0, 0, 0},
-	arm64.ACBZ:    {gc.Cjmp, 0, 0, 0},
-	arm64.ACBNZ:   {gc.Cjmp, 0, 0, 0},
-	obj.ARET:      {gc.Break, 0, 0, 0},
-	obj.ADUFFZERO: {gc.Call, 0, 0, 0},
-	obj.ADUFFCOPY: {gc.Call, 0, 0, 0},
-}
-
-func proginfo(p *obj.Prog) {
-	info := &p.Info
-	*info = progtable[p.As]
-	if info.Flags == 0 {
-		gc.Fatal("proginfo: unknown instruction %v", p)
-	}
-
-	if (info.Flags&gc.RegRead != 0) && p.Reg == 0 {
-		info.Flags &^= gc.RegRead
-		info.Flags |= gc.RightRead /*CanRegRead |*/
-	}
-
-	if (p.From.Type == obj.TYPE_MEM || p.From.Type == obj.TYPE_ADDR) && p.From.Reg != 0 {
-		info.Regindex |= RtoB(int(p.From.Reg))
-		if p.Scond != 0 {
-			info.Regset |= RtoB(int(p.From.Reg))
-		}
-	}
-
-	if (p.To.Type == obj.TYPE_MEM || p.To.Type == obj.TYPE_ADDR) && p.To.Reg != 0 {
-		info.Regindex |= RtoB(int(p.To.Reg))
-		if p.Scond != 0 {
-			info.Regset |= RtoB(int(p.To.Reg))
-		}
-	}
-
-	if p.From.Type == obj.TYPE_ADDR && p.From.Sym != nil && (info.Flags&gc.LeftRead != 0) {
-		info.Flags &^= gc.LeftRead
-		info.Flags |= gc.LeftAddr
-	}
-
-	if p.As == obj.ADUFFZERO {
-		info.Reguse |= RtoB(arm64.REGRT1)
-		info.Regset |= RtoB(arm64.REGRT1)
-	}
-
-	if p.As == obj.ADUFFCOPY {
-		// TODO(austin) Revisit when duffcopy is implemented
-		info.Reguse |= RtoB(arm64.REGRT1) | RtoB(arm64.REGRT2) | RtoB(arm64.REG_R5)
-
-		info.Regset |= RtoB(arm64.REGRT1) | RtoB(arm64.REGRT2)
-	}
-}
diff --git a/src/cmd/compile/internal/arm64/reg.go b/src/cmd/compile/internal/arm64/reg.go
deleted file mode 100644
index b84359a..0000000
--- a/src/cmd/compile/internal/arm64/reg.go
+++ /dev/null
@@ -1,169 +0,0 @@
-// Derived from Inferno utils/6c/reg.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6c/reg.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package arm64
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj/arm64"
-)
-
-const (
-	NREGVAR = 64 /* 32 general + 32 floating */
-)
-
-var regname = []string{
-	".R0",
-	".R1",
-	".R2",
-	".R3",
-	".R4",
-	".R5",
-	".R6",
-	".R7",
-	".R8",
-	".R9",
-	".R10",
-	".R11",
-	".R12",
-	".R13",
-	".R14",
-	".R15",
-	".R16",
-	".R17",
-	".R18",
-	".R19",
-	".R20",
-	".R21",
-	".R22",
-	".R23",
-	".R24",
-	".R25",
-	".R26",
-	".R27",
-	".R28",
-	".R29",
-	".R30",
-	".R31",
-	".F0",
-	".F1",
-	".F2",
-	".F3",
-	".F4",
-	".F5",
-	".F6",
-	".F7",
-	".F8",
-	".F9",
-	".F10",
-	".F11",
-	".F12",
-	".F13",
-	".F14",
-	".F15",
-	".F16",
-	".F17",
-	".F18",
-	".F19",
-	".F20",
-	".F21",
-	".F22",
-	".F23",
-	".F24",
-	".F25",
-	".F26",
-	".F27",
-	".F28",
-	".F29",
-	".F30",
-	".F31",
-}
-
-func regnames(n *int) []string {
-	*n = NREGVAR
-	return regname
-}
-
-func excludedregs() uint64 {
-	// Exclude registers with fixed functions
-	regbits := uint64(RtoB(arm64.REGRT1) | RtoB(arm64.REGRT2) | RtoB(arm64.REGPR))
-
-	// Exclude R26 - R31.
-	for r := arm64.REGMAX + 1; r <= arm64.REGZERO; r++ {
-		regbits |= RtoB(r)
-	}
-
-	// Also exclude floating point registers with fixed constants
-	regbits |= RtoB(arm64.REG_F27) | RtoB(arm64.REG_F28) | RtoB(arm64.REG_F29) | RtoB(arm64.REG_F30) | RtoB(arm64.REG_F31)
-
-	return regbits
-}
-
-func doregbits(r int) uint64 {
-	return 0
-}
-
-/*
- * track register variables including external registers:
- *	bit	reg
- *	0	R0
- *	1	R1
- *	...	...
- *	31	R31
- *	32+0	F0
- *	32+1	F1
- *	...	...
- *	32+31	F31
- */
-func RtoB(r int) uint64 {
-	if r >= arm64.REG_R0 && r <= arm64.REG_R31 {
-		return 1 << uint(r-arm64.REG_R0)
-	}
-	if r >= arm64.REG_F0 && r <= arm64.REG_F31 {
-		return 1 << uint(32+r-arm64.REG_F0)
-	}
-	return 0
-}
-
-func BtoR(b uint64) int {
-	b &= 0xffffffff
-	if b == 0 {
-		return 0
-	}
-	return gc.Bitno(b) + arm64.REG_R0
-}
-
-func BtoF(b uint64) int {
-	b >>= 32
-	if b == 0 {
-		return 0
-	}
-	return gc.Bitno(b) + arm64.REG_F0
-}
diff --git a/src/cmd/compile/internal/big/accuracy_string.go b/src/cmd/compile/internal/big/accuracy_string.go
deleted file mode 100644
index 24ef7f1..0000000
--- a/src/cmd/compile/internal/big/accuracy_string.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// generated by stringer -type=Accuracy; DO NOT EDIT
-
-package big
-
-import "fmt"
-
-const _Accuracy_name = "BelowExactAbove"
-
-var _Accuracy_index = [...]uint8{0, 5, 10, 15}
-
-func (i Accuracy) String() string {
-	i -= -1
-	if i < 0 || i+1 >= Accuracy(len(_Accuracy_index)) {
-		return fmt.Sprintf("Accuracy(%d)", i+-1)
-	}
-	return _Accuracy_name[_Accuracy_index[i]:_Accuracy_index[i+1]]
-}
diff --git a/src/cmd/compile/internal/big/arith.go b/src/cmd/compile/internal/big/arith.go
deleted file mode 100644
index d7ea838..0000000
--- a/src/cmd/compile/internal/big/arith.go
+++ /dev/null
@@ -1,305 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file provides Go implementations of elementary multi-precision
-// arithmetic operations on word vectors. Needed for platforms without
-// assembly implementations of these routines.
-
-package big
-
-// A Word represents a single digit of a multi-precision unsigned integer.
-type Word uintptr
-
-const (
-	// Compute the size _S of a Word in bytes.
-	_m    = ^Word(0)
-	_logS = _m>>8&1 + _m>>16&1 + _m>>32&1
-	_S    = 1 << _logS
-
-	_W = _S << 3 // word size in bits
-	_B = 1 << _W // digit base
-	_M = _B - 1  // digit mask
-
-	_W2 = _W / 2   // half word size in bits
-	_B2 = 1 << _W2 // half digit base
-	_M2 = _B2 - 1  // half digit mask
-)
-
-// ----------------------------------------------------------------------------
-// Elementary operations on words
-//
-// These operations are used by the vector operations below.
-
-// z1<<_W + z0 = x+y+c, with c == 0 or 1
-func addWW_g(x, y, c Word) (z1, z0 Word) {
-	yc := y + c
-	z0 = x + yc
-	if z0 < x || yc < y {
-		z1 = 1
-	}
-	return
-}
-
-// z1<<_W + z0 = x-y-c, with c == 0 or 1
-func subWW_g(x, y, c Word) (z1, z0 Word) {
-	yc := y + c
-	z0 = x - yc
-	if z0 > x || yc < y {
-		z1 = 1
-	}
-	return
-}
-
-// z1<<_W + z0 = x*y
-// Adapted from Warren, Hacker's Delight, p. 132.
-func mulWW_g(x, y Word) (z1, z0 Word) {
-	x0 := x & _M2
-	x1 := x >> _W2
-	y0 := y & _M2
-	y1 := y >> _W2
-	w0 := x0 * y0
-	t := x1*y0 + w0>>_W2
-	w1 := t & _M2
-	w2 := t >> _W2
-	w1 += x0 * y1
-	z1 = x1*y1 + w2 + w1>>_W2
-	z0 = x * y
-	return
-}
-
-// z1<<_W + z0 = x*y + c
-func mulAddWWW_g(x, y, c Word) (z1, z0 Word) {
-	z1, zz0 := mulWW_g(x, y)
-	if z0 = zz0 + c; z0 < zz0 {
-		z1++
-	}
-	return
-}
-
-// Length of x in bits.
-func bitLen_g(x Word) (n int) {
-	for ; x >= 0x8000; x >>= 16 {
-		n += 16
-	}
-	if x >= 0x80 {
-		x >>= 8
-		n += 8
-	}
-	if x >= 0x8 {
-		x >>= 4
-		n += 4
-	}
-	if x >= 0x2 {
-		x >>= 2
-		n += 2
-	}
-	if x >= 0x1 {
-		n++
-	}
-	return
-}
-
-// log2 computes the integer binary logarithm of x.
-// The result is the integer n for which 2^n <= x < 2^(n+1).
-// If x == 0, the result is -1.
-func log2(x Word) int {
-	return bitLen(x) - 1
-}
-
-// nlz returns the number of leading zeros in x.
-func nlz(x Word) uint {
-	return uint(_W - bitLen(x))
-}
-
-// nlz64 returns the number of leading zeros in x.
-func nlz64(x uint64) uint {
-	switch _W {
-	case 32:
-		w := x >> 32
-		if w == 0 {
-			return 32 + nlz(Word(x))
-		}
-		return nlz(Word(w))
-	case 64:
-		return nlz(Word(x))
-	}
-	panic("unreachable")
-}
-
-// q = (u1<<_W + u0 - r)/y
-// Adapted from Warren, Hacker's Delight, p. 152.
-func divWW_g(u1, u0, v Word) (q, r Word) {
-	if u1 >= v {
-		return 1<<_W - 1, 1<<_W - 1
-	}
-
-	s := nlz(v)
-	v <<= s
-
-	vn1 := v >> _W2
-	vn0 := v & _M2
-	un32 := u1<<s | u0>>(_W-s)
-	un10 := u0 << s
-	un1 := un10 >> _W2
-	un0 := un10 & _M2
-	q1 := un32 / vn1
-	rhat := un32 - q1*vn1
-
-	for q1 >= _B2 || q1*vn0 > _B2*rhat+un1 {
-		q1--
-		rhat += vn1
-		if rhat >= _B2 {
-			break
-		}
-	}
-
-	un21 := un32*_B2 + un1 - q1*v
-	q0 := un21 / vn1
-	rhat = un21 - q0*vn1
-
-	for q0 >= _B2 || q0*vn0 > _B2*rhat+un0 {
-		q0--
-		rhat += vn1
-		if rhat >= _B2 {
-			break
-		}
-	}
-
-	return q1*_B2 + q0, (un21*_B2 + un0 - q0*v) >> s
-}
-
-// Keep for performance debugging.
-// Using addWW_g is likely slower.
-const use_addWW_g = false
-
-// The resulting carry c is either 0 or 1.
-func addVV_g(z, x, y []Word) (c Word) {
-	if use_addWW_g {
-		for i := range z {
-			c, z[i] = addWW_g(x[i], y[i], c)
-		}
-		return
-	}
-
-	for i, xi := range x[:len(z)] {
-		yi := y[i]
-		zi := xi + yi + c
-		z[i] = zi
-		// see "Hacker's Delight", section 2-12 (overflow detection)
-		c = (xi&yi | (xi|yi)&^zi) >> (_W - 1)
-	}
-	return
-}
-
-// The resulting carry c is either 0 or 1.
-func subVV_g(z, x, y []Word) (c Word) {
-	if use_addWW_g {
-		for i := range z {
-			c, z[i] = subWW_g(x[i], y[i], c)
-		}
-		return
-	}
-
-	for i, xi := range x[:len(z)] {
-		yi := y[i]
-		zi := xi - yi - c
-		z[i] = zi
-		// see "Hacker's Delight", section 2-12 (overflow detection)
-		c = (yi&^xi | (yi|^xi)&zi) >> (_W - 1)
-	}
-	return
-}
-
-// The resulting carry c is either 0 or 1.
-func addVW_g(z, x []Word, y Word) (c Word) {
-	if use_addWW_g {
-		c = y
-		for i := range z {
-			c, z[i] = addWW_g(x[i], c, 0)
-		}
-		return
-	}
-
-	c = y
-	for i, xi := range x[:len(z)] {
-		zi := xi + c
-		z[i] = zi
-		c = xi &^ zi >> (_W - 1)
-	}
-	return
-}
-
-func subVW_g(z, x []Word, y Word) (c Word) {
-	if use_addWW_g {
-		c = y
-		for i := range z {
-			c, z[i] = subWW_g(x[i], c, 0)
-		}
-		return
-	}
-
-	c = y
-	for i, xi := range x[:len(z)] {
-		zi := xi - c
-		z[i] = zi
-		c = (zi &^ xi) >> (_W - 1)
-	}
-	return
-}
-
-func shlVU_g(z, x []Word, s uint) (c Word) {
-	if n := len(z); n > 0 {
-		ŝ := _W - s
-		w1 := x[n-1]
-		c = w1 >> ŝ
-		for i := n - 1; i > 0; i-- {
-			w := w1
-			w1 = x[i-1]
-			z[i] = w<<s | w1>>ŝ
-		}
-		z[0] = w1 << s
-	}
-	return
-}
-
-func shrVU_g(z, x []Word, s uint) (c Word) {
-	if n := len(z); n > 0 {
-		ŝ := _W - s
-		w1 := x[0]
-		c = w1 << ŝ
-		for i := 0; i < n-1; i++ {
-			w := w1
-			w1 = x[i+1]
-			z[i] = w>>s | w1<<ŝ
-		}
-		z[n-1] = w1 >> s
-	}
-	return
-}
-
-func mulAddVWW_g(z, x []Word, y, r Word) (c Word) {
-	c = r
-	for i := range z {
-		c, z[i] = mulAddWWW_g(x[i], y, c)
-	}
-	return
-}
-
-// TODO(gri) Remove use of addWW_g here and then we can remove addWW_g and subWW_g.
-func addMulVVW_g(z, x []Word, y Word) (c Word) {
-	for i := range z {
-		z1, z0 := mulAddWWW_g(x[i], y, z[i])
-		c, z[i] = addWW_g(z0, c, 0)
-		c += z1
-	}
-	return
-}
-
-func divWVW_g(z []Word, xn Word, x []Word, y Word) (r Word) {
-	r = xn
-	for i := len(z) - 1; i >= 0; i-- {
-		z[i], r = divWW_g(r, x[i], y)
-	}
-	return
-}
diff --git a/src/cmd/compile/internal/big/arith_decl.go b/src/cmd/compile/internal/big/arith_decl.go
deleted file mode 100644
index fe13577..0000000
--- a/src/cmd/compile/internal/big/arith_decl.go
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package big
-
-func mulWW(x, y Word) (z1, z0 Word) {
-	return mulWW_g(x, y)
-}
-
-func divWW(x1, x0, y Word) (q, r Word) {
-	return divWW_g(x1, x0, y)
-}
-
-func addVV(z, x, y []Word) (c Word) {
-	return addVV_g(z, x, y)
-}
-
-func subVV(z, x, y []Word) (c Word) {
-	return subVV_g(z, x, y)
-}
-
-func addVW(z, x []Word, y Word) (c Word) {
-	return addVW_g(z, x, y)
-}
-
-func subVW(z, x []Word, y Word) (c Word) {
-	return subVW_g(z, x, y)
-}
-
-func shlVU(z, x []Word, s uint) (c Word) {
-	return shlVU_g(z, x, s)
-}
-
-func shrVU(z, x []Word, s uint) (c Word) {
-	return shrVU_g(z, x, s)
-}
-
-func mulAddVWW(z, x []Word, y, r Word) (c Word) {
-	return mulAddVWW_g(z, x, y, r)
-}
-
-func addMulVVW(z, x []Word, y Word) (c Word) {
-	return addMulVVW_g(z, x, y)
-}
-
-func divWVW(z []Word, xn Word, x []Word, y Word) (r Word) {
-	return divWVW_g(z, xn, x, y)
-}
-
-func bitLen(x Word) (n int) {
-	return bitLen_g(x)
-}
diff --git a/src/cmd/compile/internal/big/arith_test.go b/src/cmd/compile/internal/big/arith_test.go
deleted file mode 100644
index f46a494..0000000
--- a/src/cmd/compile/internal/big/arith_test.go
+++ /dev/null
@@ -1,457 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package big
-
-import (
-	"math/rand"
-	"testing"
-)
-
-type funWW func(x, y, c Word) (z1, z0 Word)
-type argWW struct {
-	x, y, c, z1, z0 Word
-}
-
-var sumWW = []argWW{
-	{0, 0, 0, 0, 0},
-	{0, 1, 0, 0, 1},
-	{0, 0, 1, 0, 1},
-	{0, 1, 1, 0, 2},
-	{12345, 67890, 0, 0, 80235},
-	{12345, 67890, 1, 0, 80236},
-	{_M, 1, 0, 1, 0},
-	{_M, 0, 1, 1, 0},
-	{_M, 1, 1, 1, 1},
-	{_M, _M, 0, 1, _M - 1},
-	{_M, _M, 1, 1, _M},
-}
-
-func testFunWW(t *testing.T, msg string, f funWW, a argWW) {
-	z1, z0 := f(a.x, a.y, a.c)
-	if z1 != a.z1 || z0 != a.z0 {
-		t.Errorf("%s%+v\n\tgot z1:z0 = %#x:%#x; want %#x:%#x", msg, a, z1, z0, a.z1, a.z0)
-	}
-}
-
-func TestFunWW(t *testing.T) {
-	for _, a := range sumWW {
-		arg := a
-		testFunWW(t, "addWW_g", addWW_g, arg)
-
-		arg = argWW{a.y, a.x, a.c, a.z1, a.z0}
-		testFunWW(t, "addWW_g symmetric", addWW_g, arg)
-
-		arg = argWW{a.z0, a.x, a.c, a.z1, a.y}
-		testFunWW(t, "subWW_g", subWW_g, arg)
-
-		arg = argWW{a.z0, a.y, a.c, a.z1, a.x}
-		testFunWW(t, "subWW_g symmetric", subWW_g, arg)
-	}
-}
-
-type funVV func(z, x, y []Word) (c Word)
-type argVV struct {
-	z, x, y nat
-	c       Word
-}
-
-var sumVV = []argVV{
-	{},
-	{nat{0}, nat{0}, nat{0}, 0},
-	{nat{1}, nat{1}, nat{0}, 0},
-	{nat{0}, nat{_M}, nat{1}, 1},
-	{nat{80235}, nat{12345}, nat{67890}, 0},
-	{nat{_M - 1}, nat{_M}, nat{_M}, 1},
-	{nat{0, 0, 0, 0}, nat{_M, _M, _M, _M}, nat{1, 0, 0, 0}, 1},
-	{nat{0, 0, 0, _M}, nat{_M, _M, _M, _M - 1}, nat{1, 0, 0, 0}, 0},
-	{nat{0, 0, 0, 0}, nat{_M, 0, _M, 0}, nat{1, _M, 0, _M}, 1},
-}
-
-func testFunVV(t *testing.T, msg string, f funVV, a argVV) {
-	z := make(nat, len(a.z))
-	c := f(z, a.x, a.y)
-	for i, zi := range z {
-		if zi != a.z[i] {
-			t.Errorf("%s%+v\n\tgot z[%d] = %#x; want %#x", msg, a, i, zi, a.z[i])
-			break
-		}
-	}
-	if c != a.c {
-		t.Errorf("%s%+v\n\tgot c = %#x; want %#x", msg, a, c, a.c)
-	}
-}
-
-func TestFunVV(t *testing.T) {
-	for _, a := range sumVV {
-		arg := a
-		testFunVV(t, "addVV_g", addVV_g, arg)
-		testFunVV(t, "addVV", addVV, arg)
-
-		arg = argVV{a.z, a.y, a.x, a.c}
-		testFunVV(t, "addVV_g symmetric", addVV_g, arg)
-		testFunVV(t, "addVV symmetric", addVV, arg)
-
-		arg = argVV{a.x, a.z, a.y, a.c}
-		testFunVV(t, "subVV_g", subVV_g, arg)
-		testFunVV(t, "subVV", subVV, arg)
-
-		arg = argVV{a.y, a.z, a.x, a.c}
-		testFunVV(t, "subVV_g symmetric", subVV_g, arg)
-		testFunVV(t, "subVV symmetric", subVV, arg)
-	}
-}
-
-// Always the same seed for reproducible results.
-var rnd = rand.New(rand.NewSource(0))
-
-func rndW() Word {
-	return Word(rnd.Int63()<<1 | rnd.Int63n(2))
-}
-
-func rndV(n int) []Word {
-	v := make([]Word, n)
-	for i := range v {
-		v[i] = rndW()
-	}
-	return v
-}
-
-func benchmarkFunVV(b *testing.B, f funVV, n int) {
-	x := rndV(n)
-	y := rndV(n)
-	z := make([]Word, n)
-	b.SetBytes(int64(n * _W))
-	b.ResetTimer()
-	for i := 0; i < b.N; i++ {
-		f(z, x, y)
-	}
-}
-
-func BenchmarkAddVV_1(b *testing.B)   { benchmarkFunVV(b, addVV, 1) }
-func BenchmarkAddVV_2(b *testing.B)   { benchmarkFunVV(b, addVV, 2) }
-func BenchmarkAddVV_3(b *testing.B)   { benchmarkFunVV(b, addVV, 3) }
-func BenchmarkAddVV_4(b *testing.B)   { benchmarkFunVV(b, addVV, 4) }
-func BenchmarkAddVV_5(b *testing.B)   { benchmarkFunVV(b, addVV, 5) }
-func BenchmarkAddVV_1e1(b *testing.B) { benchmarkFunVV(b, addVV, 1e1) }
-func BenchmarkAddVV_1e2(b *testing.B) { benchmarkFunVV(b, addVV, 1e2) }
-func BenchmarkAddVV_1e3(b *testing.B) { benchmarkFunVV(b, addVV, 1e3) }
-func BenchmarkAddVV_1e4(b *testing.B) { benchmarkFunVV(b, addVV, 1e4) }
-func BenchmarkAddVV_1e5(b *testing.B) { benchmarkFunVV(b, addVV, 1e5) }
-
-type funVW func(z, x []Word, y Word) (c Word)
-type argVW struct {
-	z, x nat
-	y    Word
-	c    Word
-}
-
-var sumVW = []argVW{
-	{},
-	{nil, nil, 2, 2},
-	{nat{0}, nat{0}, 0, 0},
-	{nat{1}, nat{0}, 1, 0},
-	{nat{1}, nat{1}, 0, 0},
-	{nat{0}, nat{_M}, 1, 1},
-	{nat{0, 0, 0, 0}, nat{_M, _M, _M, _M}, 1, 1},
-	{nat{585}, nat{314}, 271, 0},
-}
-
-var prodVW = []argVW{
-	{},
-	{nat{0}, nat{0}, 0, 0},
-	{nat{0}, nat{_M}, 0, 0},
-	{nat{0}, nat{0}, _M, 0},
-	{nat{1}, nat{1}, 1, 0},
-	{nat{22793}, nat{991}, 23, 0},
-	{nat{0, 0, 0, 22793}, nat{0, 0, 0, 991}, 23, 0},
-	{nat{0, 0, 0, 0}, nat{7893475, 7395495, 798547395, 68943}, 0, 0},
-	{nat{0, 0, 0, 0}, nat{0, 0, 0, 0}, 894375984, 0},
-	{nat{_M << 1 & _M}, nat{_M}, 1 << 1, _M >> (_W - 1)},
-	{nat{_M << 7 & _M}, nat{_M}, 1 << 7, _M >> (_W - 7)},
-	{nat{_M << 7 & _M, _M, _M, _M}, nat{_M, _M, _M, _M}, 1 << 7, _M >> (_W - 7)},
-}
-
-var lshVW = []argVW{
-	{},
-	{nat{0}, nat{0}, 0, 0},
-	{nat{0}, nat{0}, 1, 0},
-	{nat{0}, nat{0}, 20, 0},
-
-	{nat{_M}, nat{_M}, 0, 0},
-	{nat{_M << 1 & _M}, nat{_M}, 1, 1},
-	{nat{_M << 20 & _M}, nat{_M}, 20, _M >> (_W - 20)},
-
-	{nat{_M, _M, _M}, nat{_M, _M, _M}, 0, 0},
-	{nat{_M << 1 & _M, _M, _M}, nat{_M, _M, _M}, 1, 1},
-	{nat{_M << 20 & _M, _M, _M}, nat{_M, _M, _M}, 20, _M >> (_W - 20)},
-}
-
-var rshVW = []argVW{
-	{},
-	{nat{0}, nat{0}, 0, 0},
-	{nat{0}, nat{0}, 1, 0},
-	{nat{0}, nat{0}, 20, 0},
-
-	{nat{_M}, nat{_M}, 0, 0},
-	{nat{_M >> 1}, nat{_M}, 1, _M << (_W - 1) & _M},
-	{nat{_M >> 20}, nat{_M}, 20, _M << (_W - 20) & _M},
-
-	{nat{_M, _M, _M}, nat{_M, _M, _M}, 0, 0},
-	{nat{_M, _M, _M >> 1}, nat{_M, _M, _M}, 1, _M << (_W - 1) & _M},
-	{nat{_M, _M, _M >> 20}, nat{_M, _M, _M}, 20, _M << (_W - 20) & _M},
-}
-
-func testFunVW(t *testing.T, msg string, f funVW, a argVW) {
-	z := make(nat, len(a.z))
-	c := f(z, a.x, a.y)
-	for i, zi := range z {
-		if zi != a.z[i] {
-			t.Errorf("%s%+v\n\tgot z[%d] = %#x; want %#x", msg, a, i, zi, a.z[i])
-			break
-		}
-	}
-	if c != a.c {
-		t.Errorf("%s%+v\n\tgot c = %#x; want %#x", msg, a, c, a.c)
-	}
-}
-
-func makeFunVW(f func(z, x []Word, s uint) (c Word)) funVW {
-	return func(z, x []Word, s Word) (c Word) {
-		return f(z, x, uint(s))
-	}
-}
-
-func TestFunVW(t *testing.T) {
-	for _, a := range sumVW {
-		arg := a
-		testFunVW(t, "addVW_g", addVW_g, arg)
-		testFunVW(t, "addVW", addVW, arg)
-
-		arg = argVW{a.x, a.z, a.y, a.c}
-		testFunVW(t, "subVW_g", subVW_g, arg)
-		testFunVW(t, "subVW", subVW, arg)
-	}
-
-	shlVW_g := makeFunVW(shlVU_g)
-	shlVW := makeFunVW(shlVU)
-	for _, a := range lshVW {
-		arg := a
-		testFunVW(t, "shlVU_g", shlVW_g, arg)
-		testFunVW(t, "shlVU", shlVW, arg)
-	}
-
-	shrVW_g := makeFunVW(shrVU_g)
-	shrVW := makeFunVW(shrVU)
-	for _, a := range rshVW {
-		arg := a
-		testFunVW(t, "shrVU_g", shrVW_g, arg)
-		testFunVW(t, "shrVU", shrVW, arg)
-	}
-}
-
-func benchmarkFunVW(b *testing.B, f funVW, n int) {
-	x := rndV(n)
-	y := rndW()
-	z := make([]Word, n)
-	b.SetBytes(int64(n * _S))
-	b.ResetTimer()
-	for i := 0; i < b.N; i++ {
-		f(z, x, y)
-	}
-}
-
-func BenchmarkAddVW_1(b *testing.B)   { benchmarkFunVW(b, addVW, 1) }
-func BenchmarkAddVW_2(b *testing.B)   { benchmarkFunVW(b, addVW, 2) }
-func BenchmarkAddVW_3(b *testing.B)   { benchmarkFunVW(b, addVW, 3) }
-func BenchmarkAddVW_4(b *testing.B)   { benchmarkFunVW(b, addVW, 4) }
-func BenchmarkAddVW_5(b *testing.B)   { benchmarkFunVW(b, addVW, 5) }
-func BenchmarkAddVW_1e1(b *testing.B) { benchmarkFunVW(b, addVW, 1e1) }
-func BenchmarkAddVW_1e2(b *testing.B) { benchmarkFunVW(b, addVW, 1e2) }
-func BenchmarkAddVW_1e3(b *testing.B) { benchmarkFunVW(b, addVW, 1e3) }
-func BenchmarkAddVW_1e4(b *testing.B) { benchmarkFunVW(b, addVW, 1e4) }
-func BenchmarkAddVW_1e5(b *testing.B) { benchmarkFunVW(b, addVW, 1e5) }
-
-type funVWW func(z, x []Word, y, r Word) (c Word)
-type argVWW struct {
-	z, x nat
-	y, r Word
-	c    Word
-}
-
-var prodVWW = []argVWW{
-	{},
-	{nat{0}, nat{0}, 0, 0, 0},
-	{nat{991}, nat{0}, 0, 991, 0},
-	{nat{0}, nat{_M}, 0, 0, 0},
-	{nat{991}, nat{_M}, 0, 991, 0},
-	{nat{0}, nat{0}, _M, 0, 0},
-	{nat{991}, nat{0}, _M, 991, 0},
-	{nat{1}, nat{1}, 1, 0, 0},
-	{nat{992}, nat{1}, 1, 991, 0},
-	{nat{22793}, nat{991}, 23, 0, 0},
-	{nat{22800}, nat{991}, 23, 7, 0},
-	{nat{0, 0, 0, 22793}, nat{0, 0, 0, 991}, 23, 0, 0},
-	{nat{7, 0, 0, 22793}, nat{0, 0, 0, 991}, 23, 7, 0},
-	{nat{0, 0, 0, 0}, nat{7893475, 7395495, 798547395, 68943}, 0, 0, 0},
-	{nat{991, 0, 0, 0}, nat{7893475, 7395495, 798547395, 68943}, 0, 991, 0},
-	{nat{0, 0, 0, 0}, nat{0, 0, 0, 0}, 894375984, 0, 0},
-	{nat{991, 0, 0, 0}, nat{0, 0, 0, 0}, 894375984, 991, 0},
-	{nat{_M << 1 & _M}, nat{_M}, 1 << 1, 0, _M >> (_W - 1)},
-	{nat{_M<<1&_M + 1}, nat{_M}, 1 << 1, 1, _M >> (_W - 1)},
-	{nat{_M << 7 & _M}, nat{_M}, 1 << 7, 0, _M >> (_W - 7)},
-	{nat{_M<<7&_M + 1<<6}, nat{_M}, 1 << 7, 1 << 6, _M >> (_W - 7)},
-	{nat{_M << 7 & _M, _M, _M, _M}, nat{_M, _M, _M, _M}, 1 << 7, 0, _M >> (_W - 7)},
-	{nat{_M<<7&_M + 1<<6, _M, _M, _M}, nat{_M, _M, _M, _M}, 1 << 7, 1 << 6, _M >> (_W - 7)},
-}
-
-func testFunVWW(t *testing.T, msg string, f funVWW, a argVWW) {
-	z := make(nat, len(a.z))
-	c := f(z, a.x, a.y, a.r)
-	for i, zi := range z {
-		if zi != a.z[i] {
-			t.Errorf("%s%+v\n\tgot z[%d] = %#x; want %#x", msg, a, i, zi, a.z[i])
-			break
-		}
-	}
-	if c != a.c {
-		t.Errorf("%s%+v\n\tgot c = %#x; want %#x", msg, a, c, a.c)
-	}
-}
-
-// TODO(gri) mulAddVWW and divWVW are symmetric operations but
-//           their signature is not symmetric. Try to unify.
-
-type funWVW func(z []Word, xn Word, x []Word, y Word) (r Word)
-type argWVW struct {
-	z  nat
-	xn Word
-	x  nat
-	y  Word
-	r  Word
-}
-
-func testFunWVW(t *testing.T, msg string, f funWVW, a argWVW) {
-	z := make(nat, len(a.z))
-	r := f(z, a.xn, a.x, a.y)
-	for i, zi := range z {
-		if zi != a.z[i] {
-			t.Errorf("%s%+v\n\tgot z[%d] = %#x; want %#x", msg, a, i, zi, a.z[i])
-			break
-		}
-	}
-	if r != a.r {
-		t.Errorf("%s%+v\n\tgot r = %#x; want %#x", msg, a, r, a.r)
-	}
-}
-
-func TestFunVWW(t *testing.T) {
-	for _, a := range prodVWW {
-		arg := a
-		testFunVWW(t, "mulAddVWW_g", mulAddVWW_g, arg)
-		testFunVWW(t, "mulAddVWW", mulAddVWW, arg)
-
-		if a.y != 0 && a.r < a.y {
-			arg := argWVW{a.x, a.c, a.z, a.y, a.r}
-			testFunWVW(t, "divWVW_g", divWVW_g, arg)
-			testFunWVW(t, "divWVW", divWVW, arg)
-		}
-	}
-}
-
-var mulWWTests = []struct {
-	x, y Word
-	q, r Word
-}{
-	{_M, _M, _M - 1, 1},
-	// 32 bit only: {0xc47dfa8c, 50911, 0x98a4, 0x998587f4},
-}
-
-func TestMulWW(t *testing.T) {
-	for i, test := range mulWWTests {
-		q, r := mulWW_g(test.x, test.y)
-		if q != test.q || r != test.r {
-			t.Errorf("#%d got (%x, %x) want (%x, %x)", i, q, r, test.q, test.r)
-		}
-	}
-}
-
-var mulAddWWWTests = []struct {
-	x, y, c Word
-	q, r    Word
-}{
-	// TODO(agl): These will only work on 64-bit platforms.
-	// {15064310297182388543, 0xe7df04d2d35d5d80, 13537600649892366549, 13644450054494335067, 10832252001440893781},
-	// {15064310297182388543, 0xdab2f18048baa68d, 13644450054494335067, 12869334219691522700, 14233854684711418382},
-	{_M, _M, 0, _M - 1, 1},
-	{_M, _M, _M, _M, 0},
-}
-
-func TestMulAddWWW(t *testing.T) {
-	for i, test := range mulAddWWWTests {
-		q, r := mulAddWWW_g(test.x, test.y, test.c)
-		if q != test.q || r != test.r {
-			t.Errorf("#%d got (%x, %x) want (%x, %x)", i, q, r, test.q, test.r)
-		}
-	}
-}
-
-func benchmarkAddMulVVW(b *testing.B, n int) {
-	x := rndV(n)
-	y := rndW()
-	z := make([]Word, n)
-	b.SetBytes(int64(n * _W))
-	b.ResetTimer()
-	for i := 0; i < b.N; i++ {
-		addMulVVW(z, x, y)
-	}
-}
-
-func BenchmarkAddMulVVW_1(b *testing.B)   { benchmarkAddMulVVW(b, 1) }
-func BenchmarkAddMulVVW_2(b *testing.B)   { benchmarkAddMulVVW(b, 2) }
-func BenchmarkAddMulVVW_3(b *testing.B)   { benchmarkAddMulVVW(b, 3) }
-func BenchmarkAddMulVVW_4(b *testing.B)   { benchmarkAddMulVVW(b, 4) }
-func BenchmarkAddMulVVW_5(b *testing.B)   { benchmarkAddMulVVW(b, 5) }
-func BenchmarkAddMulVVW_1e1(b *testing.B) { benchmarkAddMulVVW(b, 1e1) }
-func BenchmarkAddMulVVW_1e2(b *testing.B) { benchmarkAddMulVVW(b, 1e2) }
-func BenchmarkAddMulVVW_1e3(b *testing.B) { benchmarkAddMulVVW(b, 1e3) }
-func BenchmarkAddMulVVW_1e4(b *testing.B) { benchmarkAddMulVVW(b, 1e4) }
-func BenchmarkAddMulVVW_1e5(b *testing.B) { benchmarkAddMulVVW(b, 1e5) }
-
-func testWordBitLen(t *testing.T, fname string, f func(Word) int) {
-	for i := 0; i <= _W; i++ {
-		x := Word(1) << uint(i-1) // i == 0 => x == 0
-		n := f(x)
-		if n != i {
-			t.Errorf("got %d; want %d for %s(%#x)", n, i, fname, x)
-		}
-	}
-}
-
-func TestWordBitLen(t *testing.T) {
-	testWordBitLen(t, "bitLen", bitLen)
-	testWordBitLen(t, "bitLen_g", bitLen_g)
-}
-
-// runs b.N iterations of bitLen called on a Word containing (1 << nbits)-1.
-func benchmarkBitLenN(b *testing.B, nbits uint) {
-	testword := Word((uint64(1) << nbits) - 1)
-	for i := 0; i < b.N; i++ {
-		bitLen(testword)
-	}
-}
-
-// Individual bitLen tests.  Numbers chosen to examine both sides
-// of powers-of-two boundaries.
-func BenchmarkBitLen0(b *testing.B)  { benchmarkBitLenN(b, 0) }
-func BenchmarkBitLen1(b *testing.B)  { benchmarkBitLenN(b, 1) }
-func BenchmarkBitLen2(b *testing.B)  { benchmarkBitLenN(b, 2) }
-func BenchmarkBitLen3(b *testing.B)  { benchmarkBitLenN(b, 3) }
-func BenchmarkBitLen4(b *testing.B)  { benchmarkBitLenN(b, 4) }
-func BenchmarkBitLen5(b *testing.B)  { benchmarkBitLenN(b, 5) }
-func BenchmarkBitLen8(b *testing.B)  { benchmarkBitLenN(b, 8) }
-func BenchmarkBitLen9(b *testing.B)  { benchmarkBitLenN(b, 9) }
-func BenchmarkBitLen16(b *testing.B) { benchmarkBitLenN(b, 16) }
-func BenchmarkBitLen17(b *testing.B) { benchmarkBitLenN(b, 17) }
-func BenchmarkBitLen31(b *testing.B) { benchmarkBitLenN(b, 31) }
diff --git a/src/cmd/compile/internal/big/bits_test.go b/src/cmd/compile/internal/big/bits_test.go
deleted file mode 100644
index 985b60b..0000000
--- a/src/cmd/compile/internal/big/bits_test.go
+++ /dev/null
@@ -1,224 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements the Bits type used for testing Float operations
-// via an independent (albeit slower) representations for floating-point
-// numbers.
-
-package big
-
-import (
-	"fmt"
-	"sort"
-	"testing"
-)
-
-// A Bits value b represents a finite floating-point number x of the form
-//
-//	x = 2**b[0] + 2**b[1] + ... 2**b[len(b)-1]
-//
-// The order of slice elements is not significant. Negative elements may be
-// used to form fractions. A Bits value is normalized if each b[i] occurs at
-// most once. For instance Bits{0, 0, 1} is not normalized but represents the
-// same floating-point number as Bits{2}, which is normalized. The zero (nil)
-// value of Bits is a ready to use Bits value and represents the value 0.
-type Bits []int
-
-func (x Bits) add(y Bits) Bits {
-	return append(x, y...)
-}
-
-func (x Bits) mul(y Bits) Bits {
-	var p Bits
-	for _, x := range x {
-		for _, y := range y {
-			p = append(p, x+y)
-		}
-	}
-	return p
-}
-
-func TestMulBits(t *testing.T) {
-	for _, test := range []struct {
-		x, y, want Bits
-	}{
-		{nil, nil, nil},
-		{Bits{}, Bits{}, nil},
-		{Bits{0}, Bits{0}, Bits{0}},
-		{Bits{0}, Bits{1}, Bits{1}},
-		{Bits{1}, Bits{1, 2, 3}, Bits{2, 3, 4}},
-		{Bits{-1}, Bits{1}, Bits{0}},
-		{Bits{-10, -1, 0, 1, 10}, Bits{1, 2, 3}, Bits{-9, -8, -7, 0, 1, 2, 1, 2, 3, 2, 3, 4, 11, 12, 13}},
-	} {
-		got := fmt.Sprintf("%v", test.x.mul(test.y))
-		want := fmt.Sprintf("%v", test.want)
-		if got != want {
-			t.Errorf("%v * %v = %s; want %s", test.x, test.y, got, want)
-		}
-
-	}
-}
-
-// norm returns the normalized bits for x: It removes multiple equal entries
-// by treating them as an addition (e.g., Bits{5, 5} => Bits{6}), and it sorts
-// the result list for reproducible results.
-func (x Bits) norm() Bits {
-	m := make(map[int]bool)
-	for _, b := range x {
-		for m[b] {
-			m[b] = false
-			b++
-		}
-		m[b] = true
-	}
-	var z Bits
-	for b, set := range m {
-		if set {
-			z = append(z, b)
-		}
-	}
-	sort.Ints([]int(z))
-	return z
-}
-
-func TestNormBits(t *testing.T) {
-	for _, test := range []struct {
-		x, want Bits
-	}{
-		{nil, nil},
-		{Bits{}, Bits{}},
-		{Bits{0}, Bits{0}},
-		{Bits{0, 0}, Bits{1}},
-		{Bits{3, 1, 1}, Bits{2, 3}},
-		{Bits{10, 9, 8, 7, 6, 6}, Bits{11}},
-	} {
-		got := fmt.Sprintf("%v", test.x.norm())
-		want := fmt.Sprintf("%v", test.want)
-		if got != want {
-			t.Errorf("normBits(%v) = %s; want %s", test.x, got, want)
-		}
-
-	}
-}
-
-// round returns the Float value corresponding to x after rounding x
-// to prec bits according to mode.
-func (x Bits) round(prec uint, mode RoundingMode) *Float {
-	x = x.norm()
-
-	// determine range
-	var min, max int
-	for i, b := range x {
-		if i == 0 || b < min {
-			min = b
-		}
-		if i == 0 || b > max {
-			max = b
-		}
-	}
-	prec0 := uint(max + 1 - min)
-	if prec >= prec0 {
-		return x.Float()
-	}
-	// prec < prec0
-
-	// determine bit 0, rounding, and sticky bit, and result bits z
-	var bit0, rbit, sbit uint
-	var z Bits
-	r := max - int(prec)
-	for _, b := range x {
-		switch {
-		case b == r:
-			rbit = 1
-		case b < r:
-			sbit = 1
-		default:
-			// b > r
-			if b == r+1 {
-				bit0 = 1
-			}
-			z = append(z, b)
-		}
-	}
-
-	// round
-	f := z.Float() // rounded to zero
-	if mode == ToNearestAway {
-		panic("not yet implemented")
-	}
-	if mode == ToNearestEven && rbit == 1 && (sbit == 1 || sbit == 0 && bit0 != 0) || mode == AwayFromZero {
-		// round away from zero
-		f.SetMode(ToZero).SetPrec(prec)
-		f.Add(f, Bits{int(r) + 1}.Float())
-	}
-	return f
-}
-
-// Float returns the *Float z of the smallest possible precision such that
-// z = sum(2**bits[i]), with i = range bits. If multiple bits[i] are equal,
-// they are added: Bits{0, 1, 0}.Float() == 2**0 + 2**1 + 2**0 = 4.
-func (bits Bits) Float() *Float {
-	// handle 0
-	if len(bits) == 0 {
-		return new(Float)
-	}
-	// len(bits) > 0
-
-	// determine lsb exponent
-	var min int
-	for i, b := range bits {
-		if i == 0 || b < min {
-			min = b
-		}
-	}
-
-	// create bit pattern
-	x := NewInt(0)
-	for _, b := range bits {
-		badj := b - min
-		// propagate carry if necessary
-		for x.Bit(badj) != 0 {
-			x.SetBit(x, badj, 0)
-			badj++
-		}
-		x.SetBit(x, badj, 1)
-	}
-
-	// create corresponding float
-	z := new(Float).SetInt(x) // normalized
-	if e := int64(z.exp) + int64(min); MinExp <= e && e <= MaxExp {
-		z.exp = int32(e)
-	} else {
-		// this should never happen for our test cases
-		panic("exponent out of range")
-	}
-	return z
-}
-
-func TestFromBits(t *testing.T) {
-	for _, test := range []struct {
-		bits Bits
-		want string
-	}{
-		// all different bit numbers
-		{nil, "0"},
-		{Bits{0}, "0x.8p+1"},
-		{Bits{1}, "0x.8p+2"},
-		{Bits{-1}, "0x.8p+0"},
-		{Bits{63}, "0x.8p+64"},
-		{Bits{33, -30}, "0x.8000000000000001p+34"},
-		{Bits{255, 0}, "0x.8000000000000000000000000000000000000000000000000000000000000001p+256"},
-
-		// multiple equal bit numbers
-		{Bits{0, 0}, "0x.8p+2"},
-		{Bits{0, 0, 0, 0}, "0x.8p+3"},
-		{Bits{0, 1, 0}, "0x.8p+3"},
-		{append(Bits{2, 1, 0} /* 7 */, Bits{3, 1} /* 10 */ ...), "0x.88p+5" /* 17 */},
-	} {
-		f := test.bits.Float()
-		if got := f.Text('p', 0); got != test.want {
-			t.Errorf("setBits(%v) = %s; want %s", test.bits, got, test.want)
-		}
-	}
-}
diff --git a/src/cmd/compile/internal/big/calibrate_test.go b/src/cmd/compile/internal/big/calibrate_test.go
deleted file mode 100644
index f69ffbf..0000000
--- a/src/cmd/compile/internal/big/calibrate_test.go
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file prints execution times for the Mul benchmark
-// given different Karatsuba thresholds. The result may be
-// used to manually fine-tune the threshold constant. The
-// results are somewhat fragile; use repeated runs to get
-// a clear picture.
-
-// Usage: go test -run=TestCalibrate -calibrate
-
-package big
-
-import (
-	"flag"
-	"fmt"
-	"testing"
-	"time"
-)
-
-var calibrate = flag.Bool("calibrate", false, "run calibration test")
-
-func karatsubaLoad(b *testing.B) {
-	BenchmarkMul(b)
-}
-
-// measureKaratsuba returns the time to run a Karatsuba-relevant benchmark
-// given Karatsuba threshold th.
-func measureKaratsuba(th int) time.Duration {
-	th, karatsubaThreshold = karatsubaThreshold, th
-	res := testing.Benchmark(karatsubaLoad)
-	karatsubaThreshold = th
-	return time.Duration(res.NsPerOp())
-}
-
-func computeThresholds() {
-	fmt.Printf("Multiplication times for varying Karatsuba thresholds\n")
-	fmt.Printf("(run repeatedly for good results)\n")
-
-	// determine Tk, the work load execution time using basic multiplication
-	Tb := measureKaratsuba(1e9) // th == 1e9 => Karatsuba multiplication disabled
-	fmt.Printf("Tb = %10s\n", Tb)
-
-	// thresholds
-	th := 4
-	th1 := -1
-	th2 := -1
-
-	var deltaOld time.Duration
-	for count := -1; count != 0 && th < 128; count-- {
-		// determine Tk, the work load execution time using Karatsuba multiplication
-		Tk := measureKaratsuba(th)
-
-		// improvement over Tb
-		delta := (Tb - Tk) * 100 / Tb
-
-		fmt.Printf("th = %3d  Tk = %10s  %4d%%", th, Tk, delta)
-
-		// determine break-even point
-		if Tk < Tb && th1 < 0 {
-			th1 = th
-			fmt.Print("  break-even point")
-		}
-
-		// determine diminishing return
-		if 0 < delta && delta < deltaOld && th2 < 0 {
-			th2 = th
-			fmt.Print("  diminishing return")
-		}
-		deltaOld = delta
-
-		fmt.Println()
-
-		// trigger counter
-		if th1 >= 0 && th2 >= 0 && count < 0 {
-			count = 10 // this many extra measurements after we got both thresholds
-		}
-
-		th++
-	}
-}
-
-func TestCalibrate(t *testing.T) {
-	if *calibrate {
-		computeThresholds()
-	}
-}
diff --git a/src/cmd/compile/internal/big/decimal.go b/src/cmd/compile/internal/big/decimal.go
deleted file mode 100644
index 2595e5f..0000000
--- a/src/cmd/compile/internal/big/decimal.go
+++ /dev/null
@@ -1,264 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements multi-precision decimal numbers.
-// The implementation is for float to decimal conversion only;
-// not general purpose use.
-// The only operations are precise conversion from binary to
-// decimal and rounding.
-//
-// The key observation and some code (shr) is borrowed from
-// strconv/decimal.go: conversion of binary fractional values can be done
-// precisely in multi-precision decimal because 2 divides 10 (required for
-// >> of mantissa); but conversion of decimal floating-point values cannot
-// be done precisely in binary representation.
-//
-// In contrast to strconv/decimal.go, only right shift is implemented in
-// decimal format - left shift can be done precisely in binary format.
-
-package big
-
-// A decimal represents an unsigned floating-point number in decimal representation.
-// The value of a non-zero decimal x is x.mant * 10 ** x.exp with 0.5 <= x.mant < 1,
-// with the most-significant mantissa digit at index 0. For the zero decimal, the
-// mantissa length and exponent are 0.
-// The zero value for decimal represents a ready-to-use 0.0.
-type decimal struct {
-	mant []byte // mantissa ASCII digits, big-endian
-	exp  int    // exponent
-}
-
-// Maximum shift amount that can be done in one pass without overflow.
-// A Word has _W bits and (1<<maxShift - 1)*10 + 9 must fit into Word.
-const maxShift = _W - 4
-
-// TODO(gri) Since we know the desired decimal precision when converting
-// a floating-point number, we may be able to limit the number of decimal
-// digits that need to be computed by init by providing an additional
-// precision argument and keeping track of when a number was truncated early
-// (equivalent of "sticky bit" in binary rounding).
-
-// TODO(gri) Along the same lines, enforce some limit to shift magnitudes
-// to avoid "infinitely" long running conversions (until we run out of space).
-
-// Init initializes x to the decimal representation of m << shift (for
-// shift >= 0), or m >> -shift (for shift < 0).
-func (x *decimal) init(m nat, shift int) {
-	// special case 0
-	if len(m) == 0 {
-		x.mant = x.mant[:0]
-		x.exp = 0
-		return
-	}
-
-	// Optimization: If we need to shift right, first remove any trailing
-	// zero bits from m to reduce shift amount that needs to be done in
-	// decimal format (since that is likely slower).
-	if shift < 0 {
-		ntz := m.trailingZeroBits()
-		s := uint(-shift)
-		if s >= ntz {
-			s = ntz // shift at most ntz bits
-		}
-		m = nat(nil).shr(m, s)
-		shift += int(s)
-	}
-
-	// Do any shift left in binary representation.
-	if shift > 0 {
-		m = nat(nil).shl(m, uint(shift))
-		shift = 0
-	}
-
-	// Convert mantissa into decimal representation.
-	s := m.decimalString() // TODO(gri) avoid string conversion here
-	n := len(s)
-	x.exp = n
-	// Trim trailing zeros; instead the exponent is tracking
-	// the decimal point independent of the number of digits.
-	for n > 0 && s[n-1] == '0' {
-		n--
-	}
-	x.mant = append(x.mant[:0], s[:n]...)
-
-	// Do any (remaining) shift right in decimal representation.
-	if shift < 0 {
-		for shift < -maxShift {
-			shr(x, maxShift)
-			shift += maxShift
-		}
-		shr(x, uint(-shift))
-	}
-}
-
-// Possibly optimization: The current implementation of nat.string takes
-// a charset argument. When a right shift is needed, we could provide
-// "\x00\x01...\x09" instead of "012..9" (as in nat.decimalString) and
-// avoid the repeated +'0' and -'0' operations in decimal.shr (and do a
-// single +'0' pass at the end).
-
-// shr implements x >> s, for s <= maxShift.
-func shr(x *decimal, s uint) {
-	// Division by 1<<s using shift-and-subtract algorithm.
-
-	// pick up enough leading digits to cover first shift
-	r := 0 // read index
-	var n Word
-	for n>>s == 0 && r < len(x.mant) {
-		ch := Word(x.mant[r])
-		r++
-		n = n*10 + ch - '0'
-	}
-	if n == 0 {
-		// x == 0; shouldn't get here, but handle anyway
-		x.mant = x.mant[:0]
-		return
-	}
-	for n>>s == 0 {
-		r++
-		n *= 10
-	}
-	x.exp += 1 - r
-
-	// read a digit, write a digit
-	w := 0 // write index
-	for r < len(x.mant) {
-		ch := Word(x.mant[r])
-		r++
-		d := n >> s
-		n -= d << s
-		x.mant[w] = byte(d + '0')
-		w++
-		n = n*10 + ch - '0'
-	}
-
-	// write extra digits that still fit
-	for n > 0 && w < len(x.mant) {
-		d := n >> s
-		n -= d << s
-		x.mant[w] = byte(d + '0')
-		w++
-		n = n * 10
-	}
-	x.mant = x.mant[:w] // the number may be shorter (e.g. 1024 >> 10)
-
-	// append additional digits that didn't fit
-	for n > 0 {
-		d := n >> s
-		n -= d << s
-		x.mant = append(x.mant, byte(d+'0'))
-		n = n * 10
-	}
-
-	trim(x)
-}
-
-func (x *decimal) String() string {
-	if len(x.mant) == 0 {
-		return "0"
-	}
-
-	var buf []byte
-	switch {
-	case x.exp <= 0:
-		// 0.00ddd
-		buf = append(buf, "0."...)
-		buf = appendZeros(buf, -x.exp)
-		buf = append(buf, x.mant...)
-
-	case /* 0 < */ x.exp < len(x.mant):
-		// dd.ddd
-		buf = append(buf, x.mant[:x.exp]...)
-		buf = append(buf, '.')
-		buf = append(buf, x.mant[x.exp:]...)
-
-	default: // len(x.mant) <= x.exp
-		// ddd00
-		buf = append(buf, x.mant...)
-		buf = appendZeros(buf, x.exp-len(x.mant))
-	}
-
-	return string(buf)
-}
-
-// appendZeros appends n 0 digits to buf and returns buf.
-func appendZeros(buf []byte, n int) []byte {
-	for ; n > 0; n-- {
-		buf = append(buf, '0')
-	}
-	return buf
-}
-
-// shouldRoundUp reports if x should be rounded up
-// if shortened to n digits. n must be a valid index
-// for x.mant.
-func shouldRoundUp(x *decimal, n int) bool {
-	if x.mant[n] == '5' && n+1 == len(x.mant) {
-		// exactly halfway - round to even
-		return n > 0 && (x.mant[n-1]-'0')&1 != 0
-	}
-	// not halfway - digit tells all (x.mant has no trailing zeros)
-	return x.mant[n] >= '5'
-}
-
-// round sets x to (at most) n mantissa digits by rounding it
-// to the nearest even value with n (or fever) mantissa digits.
-// If n < 0, x remains unchanged.
-func (x *decimal) round(n int) {
-	if n < 0 || n >= len(x.mant) {
-		return // nothing to do
-	}
-
-	if shouldRoundUp(x, n) {
-		x.roundUp(n)
-	} else {
-		x.roundDown(n)
-	}
-}
-
-func (x *decimal) roundUp(n int) {
-	if n < 0 || n >= len(x.mant) {
-		return // nothing to do
-	}
-	// 0 <= n < len(x.mant)
-
-	// find first digit < '9'
-	for n > 0 && x.mant[n-1] >= '9' {
-		n--
-	}
-
-	if n == 0 {
-		// all digits are '9's => round up to '1' and update exponent
-		x.mant[0] = '1' // ok since len(x.mant) > n
-		x.mant = x.mant[:1]
-		x.exp++
-		return
-	}
-
-	// n > 0 && x.mant[n-1] < '9'
-	x.mant[n-1]++
-	x.mant = x.mant[:n]
-	// x already trimmed
-}
-
-func (x *decimal) roundDown(n int) {
-	if n < 0 || n >= len(x.mant) {
-		return // nothing to do
-	}
-	x.mant = x.mant[:n]
-	trim(x)
-}
-
-// trim cuts off any trailing zeros from x's mantissa;
-// they are meaningless for the value of x.
-func trim(x *decimal) {
-	i := len(x.mant)
-	for i > 0 && x.mant[i-1] == '0' {
-		i--
-	}
-	x.mant = x.mant[:i]
-	if i == 0 {
-		x.exp = 0
-	}
-}
diff --git a/src/cmd/compile/internal/big/decimal_test.go b/src/cmd/compile/internal/big/decimal_test.go
deleted file mode 100644
index 81e022a..0000000
--- a/src/cmd/compile/internal/big/decimal_test.go
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package big
-
-import "testing"
-
-func TestDecimalString(t *testing.T) {
-	for _, test := range []struct {
-		x    decimal
-		want string
-	}{
-		{want: "0"},
-		{decimal{nil, 1000}, "0"}, // exponent of 0 is ignored
-		{decimal{[]byte("12345"), 0}, "0.12345"},
-		{decimal{[]byte("12345"), -3}, "0.00012345"},
-		{decimal{[]byte("12345"), +3}, "123.45"},
-		{decimal{[]byte("12345"), +10}, "1234500000"},
-	} {
-		if got := test.x.String(); got != test.want {
-			t.Errorf("%v == %s; want %s", test.x, got, test.want)
-		}
-	}
-}
-
-func TestDecimalInit(t *testing.T) {
-	for _, test := range []struct {
-		x     Word
-		shift int
-		want  string
-	}{
-		{0, 0, "0"},
-		{0, -100, "0"},
-		{0, 100, "0"},
-		{1, 0, "1"},
-		{1, 10, "1024"},
-		{1, 100, "1267650600228229401496703205376"},
-		{1, -100, "0.0000000000000000000000000000007888609052210118054117285652827862296732064351090230047702789306640625"},
-		{12345678, 8, "3160493568"},
-		{12345678, -8, "48225.3046875"},
-		{195312, 9, "99999744"},
-		{1953125, 9, "1000000000"},
-	} {
-		var d decimal
-		d.init(nat{test.x}.norm(), test.shift)
-		if got := d.String(); got != test.want {
-			t.Errorf("%d << %d == %s; want %s", test.x, test.shift, got, test.want)
-		}
-	}
-}
-
-func TestDecimalRounding(t *testing.T) {
-	for _, test := range []struct {
-		x              uint64
-		n              int
-		down, even, up string
-	}{
-		{0, 0, "0", "0", "0"},
-		{0, 1, "0", "0", "0"},
-
-		{1, 0, "0", "0", "10"},
-		{5, 0, "0", "0", "10"},
-		{9, 0, "0", "10", "10"},
-
-		{15, 1, "10", "20", "20"},
-		{45, 1, "40", "40", "50"},
-		{95, 1, "90", "100", "100"},
-
-		{12344999, 4, "12340000", "12340000", "12350000"},
-		{12345000, 4, "12340000", "12340000", "12350000"},
-		{12345001, 4, "12340000", "12350000", "12350000"},
-		{23454999, 4, "23450000", "23450000", "23460000"},
-		{23455000, 4, "23450000", "23460000", "23460000"},
-		{23455001, 4, "23450000", "23460000", "23460000"},
-
-		{99994999, 4, "99990000", "99990000", "100000000"},
-		{99995000, 4, "99990000", "100000000", "100000000"},
-		{99999999, 4, "99990000", "100000000", "100000000"},
-
-		{12994999, 4, "12990000", "12990000", "13000000"},
-		{12995000, 4, "12990000", "13000000", "13000000"},
-		{12999999, 4, "12990000", "13000000", "13000000"},
-	} {
-		x := nat(nil).setUint64(test.x)
-
-		var d decimal
-		d.init(x, 0)
-		d.roundDown(test.n)
-		if got := d.String(); got != test.down {
-			t.Errorf("roundDown(%d, %d) = %s; want %s", test.x, test.n, got, test.down)
-		}
-
-		d.init(x, 0)
-		d.round(test.n)
-		if got := d.String(); got != test.even {
-			t.Errorf("round(%d, %d) = %s; want %s", test.x, test.n, got, test.even)
-		}
-
-		d.init(x, 0)
-		d.roundUp(test.n)
-		if got := d.String(); got != test.up {
-			t.Errorf("roundUp(%d, %d) = %s; want %s", test.x, test.n, got, test.up)
-		}
-	}
-}
diff --git a/src/cmd/compile/internal/big/example_test.go b/src/cmd/compile/internal/big/example_test.go
deleted file mode 100644
index cb91bc2..0000000
--- a/src/cmd/compile/internal/big/example_test.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package big_test
-
-import (
-	"cmd/compile/internal/big"
-	"fmt"
-	"log"
-)
-
-func ExampleRat_SetString() {
-	r := new(big.Rat)
-	r.SetString("355/113")
-	fmt.Println(r.FloatString(3))
-	// Output: 3.142
-}
-
-func ExampleInt_SetString() {
-	i := new(big.Int)
-	i.SetString("644", 8) // octal
-	fmt.Println(i)
-	// Output: 420
-}
-
-func ExampleRat_Scan() {
-	// The Scan function is rarely used directly;
-	// the fmt package recognizes it as an implementation of fmt.Scanner.
-	r := new(big.Rat)
-	_, err := fmt.Sscan("1.5000", r)
-	if err != nil {
-		log.Println("error scanning value:", err)
-	} else {
-		fmt.Println(r)
-	}
-	// Output: 3/2
-}
-
-func ExampleInt_Scan() {
-	// The Scan function is rarely used directly;
-	// the fmt package recognizes it as an implementation of fmt.Scanner.
-	i := new(big.Int)
-	_, err := fmt.Sscan("18446744073709551617", i)
-	if err != nil {
-		log.Println("error scanning value:", err)
-	} else {
-		fmt.Println(i)
-	}
-	// Output: 18446744073709551617
-}
diff --git a/src/cmd/compile/internal/big/float.go b/src/cmd/compile/internal/big/float.go
deleted file mode 100644
index d7aa895..0000000
--- a/src/cmd/compile/internal/big/float.go
+++ /dev/null
@@ -1,1693 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements multi-precision floating-point numbers.
-// Like in the GNU MPFR library (http://www.mpfr.org/), operands
-// can be of mixed precision. Unlike MPFR, the rounding mode is
-// not specified with each operation, but with each operand. The
-// rounding mode of the result operand determines the rounding
-// mode of an operation. This is a from-scratch implementation.
-
-package big
-
-import (
-	"fmt"
-	"math"
-)
-
-const debugFloat = false // enable for debugging
-
-// A nonzero finite Float represents a multi-precision floating point number
-//
-//   sign × mantissa × 2**exponent
-//
-// with 0.5 <= mantissa < 1.0, and MinExp <= exponent <= MaxExp.
-// A Float may also be zero (+0, -0) or infinite (+Inf, -Inf).
-// All Floats are ordered, and the ordering of two Floats x and y
-// is defined by x.Cmp(y).
-//
-// Each Float value also has a precision, rounding mode, and accuracy.
-// The precision is the maximum number of mantissa bits available to
-// represent the value. The rounding mode specifies how a result should
-// be rounded to fit into the mantissa bits, and accuracy describes the
-// rounding error with respect to the exact result.
-//
-// Unless specified otherwise, all operations (including setters) that
-// specify a *Float variable for the result (usually via the receiver
-// with the exception of MantExp), round the numeric result according
-// to the precision and rounding mode of the result variable.
-//
-// If the provided result precision is 0 (see below), it is set to the
-// precision of the argument with the largest precision value before any
-// rounding takes place, and the rounding mode remains unchanged. Thus,
-// uninitialized Floats provided as result arguments will have their
-// precision set to a reasonable value determined by the operands and
-// their mode is the zero value for RoundingMode (ToNearestEven).
-//
-// By setting the desired precision to 24 or 53 and using matching rounding
-// mode (typically ToNearestEven), Float operations produce the same results
-// as the corresponding float32 or float64 IEEE-754 arithmetic for operands
-// that correspond to normal (i.e., not denormal) float32 or float64 numbers.
-// Exponent underflow and overflow lead to a 0 or an Infinity for different
-// values than IEEE-754 because Float exponents have a much larger range.
-//
-// The zero (uninitialized) value for a Float is ready to use and represents
-// the number +0.0 exactly, with precision 0 and rounding mode ToNearestEven.
-//
-type Float struct {
-	prec uint32
-	mode RoundingMode
-	acc  Accuracy
-	form form
-	neg  bool
-	mant nat
-	exp  int32
-}
-
-// An ErrNaN panic is raised by a Float operation that would lead to
-// a NaN under IEEE-754 rules. An ErrNaN implements the error interface.
-type ErrNaN struct {
-	msg string
-}
-
-func (err ErrNaN) Error() string {
-	return err.msg
-}
-
-// NewFloat allocates and returns a new Float set to x,
-// with precision 53 and rounding mode ToNearestEven.
-// NewFloat panics with ErrNaN if x is a NaN.
-func NewFloat(x float64) *Float {
-	if math.IsNaN(x) {
-		panic(ErrNaN{"NewFloat(NaN)"})
-	}
-	return new(Float).SetFloat64(x)
-}
-
-// Exponent and precision limits.
-const (
-	MaxExp  = math.MaxInt32  // largest supported exponent
-	MinExp  = math.MinInt32  // smallest supported exponent
-	MaxPrec = math.MaxUint32 // largest (theoretically) supported precision; likely memory-limited
-)
-
-// Internal representation: The mantissa bits x.mant of a nonzero finite
-// Float x are stored in a nat slice long enough to hold up to x.prec bits;
-// the slice may (but doesn't have to) be shorter if the mantissa contains
-// trailing 0 bits. x.mant is normalized if the msb of x.mant == 1 (i.e.,
-// the msb is shifted all the way "to the left"). Thus, if the mantissa has
-// trailing 0 bits or x.prec is not a multiple of the the Word size _W,
-// x.mant[0] has trailing zero bits. The msb of the mantissa corresponds
-// to the value 0.5; the exponent x.exp shifts the binary point as needed.
-//
-// A zero or non-finite Float x ignores x.mant and x.exp.
-//
-// x                 form      neg      mant         exp
-// ----------------------------------------------------------
-// ±0                zero      sign     -            -
-// 0 < |x| < +Inf    finite    sign     mantissa     exponent
-// ±Inf              inf       sign     -            -
-
-// A form value describes the internal representation.
-type form byte
-
-// The form value order is relevant - do not change!
-const (
-	zero form = iota
-	finite
-	inf
-)
-
-// RoundingMode determines how a Float value is rounded to the
-// desired precision. Rounding may change the Float value; the
-// rounding error is described by the Float's Accuracy.
-type RoundingMode byte
-
-// The following rounding modes are supported.
-const (
-	ToNearestEven RoundingMode = iota // == IEEE 754-2008 roundTiesToEven
-	ToNearestAway                     // == IEEE 754-2008 roundTiesToAway
-	ToZero                            // == IEEE 754-2008 roundTowardZero
-	AwayFromZero                      // no IEEE 754-2008 equivalent
-	ToNegativeInf                     // == IEEE 754-2008 roundTowardNegative
-	ToPositiveInf                     // == IEEE 754-2008 roundTowardPositive
-)
-
-//go:generate stringer -type=RoundingMode
-
-// Accuracy describes the rounding error produced by the most recent
-// operation that generated a Float value, relative to the exact value.
-type Accuracy int8
-
-// Constants describing the Accuracy of a Float.
-const (
-	Below Accuracy = -1
-	Exact Accuracy = 0
-	Above Accuracy = +1
-)
-
-//go:generate stringer -type=Accuracy
-
-// SetPrec sets z's precision to prec and returns the (possibly) rounded
-// value of z. Rounding occurs according to z's rounding mode if the mantissa
-// cannot be represented in prec bits without loss of precision.
-// SetPrec(0) maps all finite values to ±0; infinite values remain unchanged.
-// If prec > MaxPrec, it is set to MaxPrec.
-func (z *Float) SetPrec(prec uint) *Float {
-	z.acc = Exact // optimistically assume no rounding is needed
-
-	// special case
-	if prec == 0 {
-		z.prec = 0
-		if z.form == finite {
-			// truncate z to 0
-			z.acc = makeAcc(z.neg)
-			z.form = zero
-		}
-		return z
-	}
-
-	// general case
-	if prec > MaxPrec {
-		prec = MaxPrec
-	}
-	old := z.prec
-	z.prec = uint32(prec)
-	if z.prec < old {
-		z.round(0)
-	}
-	return z
-}
-
-func makeAcc(above bool) Accuracy {
-	if above {
-		return Above
-	}
-	return Below
-}
-
-// SetMode sets z's rounding mode to mode and returns an exact z.
-// z remains unchanged otherwise.
-// z.SetMode(z.Mode()) is a cheap way to set z's accuracy to Exact.
-func (z *Float) SetMode(mode RoundingMode) *Float {
-	z.mode = mode
-	z.acc = Exact
-	return z
-}
-
-// Prec returns the mantissa precision of x in bits.
-// The result may be 0 for |x| == 0 and |x| == Inf.
-func (x *Float) Prec() uint {
-	return uint(x.prec)
-}
-
-// MinPrec returns the minimum precision required to represent x exactly
-// (i.e., the smallest prec before x.SetPrec(prec) would start rounding x).
-// The result is 0 for |x| == 0 and |x| == Inf.
-func (x *Float) MinPrec() uint {
-	if x.form != finite {
-		return 0
-	}
-	return uint(len(x.mant))*_W - x.mant.trailingZeroBits()
-}
-
-// Mode returns the rounding mode of x.
-func (x *Float) Mode() RoundingMode {
-	return x.mode
-}
-
-// Acc returns the accuracy of x produced by the most recent operation.
-func (x *Float) Acc() Accuracy {
-	return x.acc
-}
-
-// Sign returns:
-//
-//	-1 if x <   0
-//	 0 if x is ±0
-//	+1 if x >   0
-//
-func (x *Float) Sign() int {
-	if debugFloat {
-		x.validate()
-	}
-	if x.form == zero {
-		return 0
-	}
-	if x.neg {
-		return -1
-	}
-	return 1
-}
-
-// MantExp breaks x into its mantissa and exponent components
-// and returns the exponent. If a non-nil mant argument is
-// provided its value is set to the mantissa of x, with the
-// same precision and rounding mode as x. The components
-// satisfy x == mant × 2**exp, with 0.5 <= |mant| < 1.0.
-// Calling MantExp with a nil argument is an efficient way to
-// get the exponent of the receiver.
-//
-// Special cases are:
-//
-//	(  ±0).MantExp(mant) = 0, with mant set to   ±0
-//	(±Inf).MantExp(mant) = 0, with mant set to ±Inf
-//
-// x and mant may be the same in which case x is set to its
-// mantissa value.
-func (x *Float) MantExp(mant *Float) (exp int) {
-	if debugFloat {
-		x.validate()
-	}
-	if x.form == finite {
-		exp = int(x.exp)
-	}
-	if mant != nil {
-		mant.Copy(x)
-		if mant.form == finite {
-			mant.exp = 0
-		}
-	}
-	return
-}
-
-func (z *Float) setExpAndRound(exp int64, sbit uint) {
-	if exp < MinExp {
-		// underflow
-		z.acc = makeAcc(z.neg)
-		z.form = zero
-		return
-	}
-
-	if exp > MaxExp {
-		// overflow
-		z.acc = makeAcc(!z.neg)
-		z.form = inf
-		return
-	}
-
-	z.form = finite
-	z.exp = int32(exp)
-	z.round(sbit)
-}
-
-// SetMantExp sets z to mant × 2**exp and and returns z.
-// The result z has the same precision and rounding mode
-// as mant. SetMantExp is an inverse of MantExp but does
-// not require 0.5 <= |mant| < 1.0. Specifically:
-//
-//	mant := new(Float)
-//	new(Float).SetMantExp(mant, x.SetMantExp(mant)).Cmp(x).Eql() is true
-//
-// Special cases are:
-//
-//	z.SetMantExp(  ±0, exp) =   ±0
-//	z.SetMantExp(±Inf, exp) = ±Inf
-//
-// z and mant may be the same in which case z's exponent
-// is set to exp.
-func (z *Float) SetMantExp(mant *Float, exp int) *Float {
-	if debugFloat {
-		z.validate()
-		mant.validate()
-	}
-	z.Copy(mant)
-	if z.form != finite {
-		return z
-	}
-	z.setExpAndRound(int64(z.exp)+int64(exp), 0)
-	return z
-}
-
-// Signbit returns true if x is negative or negative zero.
-func (x *Float) Signbit() bool {
-	return x.neg
-}
-
-// IsInf reports whether x is +Inf or -Inf.
-func (x *Float) IsInf() bool {
-	return x.form == inf
-}
-
-// IsInt reports whether x is an integer.
-// ±Inf values are not integers.
-func (x *Float) IsInt() bool {
-	if debugFloat {
-		x.validate()
-	}
-	// special cases
-	if x.form != finite {
-		return x.form == zero
-	}
-	// x.form == finite
-	if x.exp <= 0 {
-		return false
-	}
-	// x.exp > 0
-	return x.prec <= uint32(x.exp) || x.MinPrec() <= uint(x.exp) // not enough bits for fractional mantissa
-}
-
-// debugging support
-func (x *Float) validate() {
-	if !debugFloat {
-		// avoid performance bugs
-		panic("validate called but debugFloat is not set")
-	}
-	if x.form != finite {
-		return
-	}
-	m := len(x.mant)
-	if m == 0 {
-		panic("nonzero finite number with empty mantissa")
-	}
-	const msb = 1 << (_W - 1)
-	if x.mant[m-1]&msb == 0 {
-		panic(fmt.Sprintf("msb not set in last word %#x of %s", x.mant[m-1], x.Text('p', 0)))
-	}
-	if x.prec == 0 {
-		panic("zero precision finite number")
-	}
-}
-
-// round rounds z according to z.mode to z.prec bits and sets z.acc accordingly.
-// sbit must be 0 or 1 and summarizes any "sticky bit" information one might
-// have before calling round. z's mantissa must be normalized (with the msb set)
-// or empty.
-//
-// CAUTION: The rounding modes ToNegativeInf, ToPositiveInf are affected by the
-// sign of z. For correct rounding, the sign of z must be set correctly before
-// calling round.
-func (z *Float) round(sbit uint) {
-	if debugFloat {
-		z.validate()
-	}
-
-	z.acc = Exact
-	if z.form != finite {
-		// ±0 or ±Inf => nothing left to do
-		return
-	}
-	// z.form == finite && len(z.mant) > 0
-	// m > 0 implies z.prec > 0 (checked by validate)
-
-	m := uint32(len(z.mant)) // present mantissa length in words
-	bits := m * _W           // present mantissa bits
-	if bits <= z.prec {
-		// mantissa fits => nothing to do
-		return
-	}
-	// bits > z.prec
-
-	n := (z.prec + (_W - 1)) / _W // mantissa length in words for desired precision
-
-	// Rounding is based on two bits: the rounding bit (rbit) and the
-	// sticky bit (sbit). The rbit is the bit immediately before the
-	// z.prec leading mantissa bits (the "0.5"). The sbit is set if any
-	// of the bits before the rbit are set (the "0.25", "0.125", etc.):
-	//
-	//   rbit  sbit  => "fractional part"
-	//
-	//   0     0        == 0
-	//   0     1        >  0  , < 0.5
-	//   1     0        == 0.5
-	//   1     1        >  0.5, < 1.0
-
-	// bits > z.prec: mantissa too large => round
-	r := uint(bits - z.prec - 1) // rounding bit position; r >= 0
-	rbit := z.mant.bit(r)        // rounding bit
-	if sbit == 0 {
-		sbit = z.mant.sticky(r)
-	}
-	if debugFloat && sbit&^1 != 0 {
-		panic(fmt.Sprintf("invalid sbit %#x", sbit))
-	}
-
-	// convert ToXInf rounding modes
-	mode := z.mode
-	switch mode {
-	case ToNegativeInf:
-		mode = ToZero
-		if z.neg {
-			mode = AwayFromZero
-		}
-	case ToPositiveInf:
-		mode = AwayFromZero
-		if z.neg {
-			mode = ToZero
-		}
-	}
-
-	// cut off extra words
-	if m > n {
-		copy(z.mant, z.mant[m-n:]) // move n last words to front
-		z.mant = z.mant[:n]
-	}
-
-	// determine number of trailing zero bits t
-	t := n*_W - z.prec // 0 <= t < _W
-	lsb := Word(1) << t
-
-	// make rounding decision
-	// TODO(gri) This can be simplified (see Bits.round in bits_test.go).
-	switch mode {
-	case ToZero:
-		// nothing to do
-	case ToNearestEven, ToNearestAway:
-		if rbit == 0 {
-			// rounding bits == 0b0x
-			mode = ToZero
-		} else if sbit == 1 {
-			// rounding bits == 0b11
-			mode = AwayFromZero
-		}
-	case AwayFromZero:
-		if rbit|sbit == 0 {
-			mode = ToZero
-		}
-	default:
-		// ToXInf modes have been converted to ToZero or AwayFromZero
-		panic("unreachable")
-	}
-
-	// round and determine accuracy
-	switch mode {
-	case ToZero:
-		if rbit|sbit != 0 {
-			z.acc = Below
-		}
-
-	case ToNearestEven, ToNearestAway:
-		if debugFloat && rbit != 1 {
-			panic("internal error in rounding")
-		}
-		if mode == ToNearestEven && sbit == 0 && z.mant[0]&lsb == 0 {
-			z.acc = Below
-			break
-		}
-		// mode == ToNearestAway || sbit == 1 || z.mant[0]&lsb != 0
-		fallthrough
-
-	case AwayFromZero:
-		// add 1 to mantissa
-		if addVW(z.mant, z.mant, lsb) != 0 {
-			// overflow => shift mantissa right by 1 and add msb
-			shrVU(z.mant, z.mant, 1)
-			z.mant[n-1] |= 1 << (_W - 1)
-			// adjust exponent
-			if z.exp < MaxExp {
-				z.exp++
-			} else {
-				// exponent overflow
-				z.acc = makeAcc(!z.neg)
-				z.form = inf
-				return
-			}
-		}
-		z.acc = Above
-	}
-
-	// zero out trailing bits in least-significant word
-	z.mant[0] &^= lsb - 1
-
-	// update accuracy
-	if z.acc != Exact && z.neg {
-		z.acc = -z.acc
-	}
-
-	if debugFloat {
-		z.validate()
-	}
-
-	return
-}
-
-func (z *Float) setBits64(neg bool, x uint64) *Float {
-	if z.prec == 0 {
-		z.prec = 64
-	}
-	z.acc = Exact
-	z.neg = neg
-	if x == 0 {
-		z.form = zero
-		return z
-	}
-	// x != 0
-	z.form = finite
-	s := nlz64(x)
-	z.mant = z.mant.setUint64(x << s)
-	z.exp = int32(64 - s) // always fits
-	if z.prec < 64 {
-		z.round(0)
-	}
-	return z
-}
-
-// SetUint64 sets z to the (possibly rounded) value of x and returns z.
-// If z's precision is 0, it is changed to 64 (and rounding will have
-// no effect).
-func (z *Float) SetUint64(x uint64) *Float {
-	return z.setBits64(false, x)
-}
-
-// SetInt64 sets z to the (possibly rounded) value of x and returns z.
-// If z's precision is 0, it is changed to 64 (and rounding will have
-// no effect).
-func (z *Float) SetInt64(x int64) *Float {
-	u := x
-	if u < 0 {
-		u = -u
-	}
-	// We cannot simply call z.SetUint64(uint64(u)) and change
-	// the sign afterwards because the sign affects rounding.
-	return z.setBits64(x < 0, uint64(u))
-}
-
-// SetFloat64 sets z to the (possibly rounded) value of x and returns z.
-// If z's precision is 0, it is changed to 53 (and rounding will have
-// no effect). SetFloat64 panics with ErrNaN if x is a NaN.
-func (z *Float) SetFloat64(x float64) *Float {
-	if z.prec == 0 {
-		z.prec = 53
-	}
-	if math.IsNaN(x) {
-		panic(ErrNaN{"Float.SetFloat64(NaN)"})
-	}
-	z.acc = Exact
-	z.neg = math.Signbit(x) // handle -0, -Inf correctly
-	if x == 0 {
-		z.form = zero
-		return z
-	}
-	if math.IsInf(x, 0) {
-		z.form = inf
-		return z
-	}
-	// normalized x != 0
-	z.form = finite
-	fmant, exp := math.Frexp(x) // get normalized mantissa
-	z.mant = z.mant.setUint64(1<<63 | math.Float64bits(fmant)<<11)
-	z.exp = int32(exp) // always fits
-	if z.prec < 53 {
-		z.round(0)
-	}
-	return z
-}
-
-// fnorm normalizes mantissa m by shifting it to the left
-// such that the msb of the most-significant word (msw) is 1.
-// It returns the shift amount. It assumes that len(m) != 0.
-func fnorm(m nat) int64 {
-	if debugFloat && (len(m) == 0 || m[len(m)-1] == 0) {
-		panic("msw of mantissa is 0")
-	}
-	s := nlz(m[len(m)-1])
-	if s > 0 {
-		c := shlVU(m, m, s)
-		if debugFloat && c != 0 {
-			panic("nlz or shlVU incorrect")
-		}
-	}
-	return int64(s)
-}
-
-// SetInt sets z to the (possibly rounded) value of x and returns z.
-// If z's precision is 0, it is changed to the larger of x.BitLen()
-// or 64 (and rounding will have no effect).
-func (z *Float) SetInt(x *Int) *Float {
-	// TODO(gri) can be more efficient if z.prec > 0
-	// but small compared to the size of x, or if there
-	// are many trailing 0's.
-	bits := uint32(x.BitLen())
-	if z.prec == 0 {
-		z.prec = umax32(bits, 64)
-	}
-	z.acc = Exact
-	z.neg = x.neg
-	if len(x.abs) == 0 {
-		z.form = zero
-		return z
-	}
-	// x != 0
-	z.mant = z.mant.set(x.abs)
-	fnorm(z.mant)
-	z.setExpAndRound(int64(bits), 0)
-	return z
-}
-
-// SetRat sets z to the (possibly rounded) value of x and returns z.
-// If z's precision is 0, it is changed to the largest of a.BitLen(),
-// b.BitLen(), or 64; with x = a/b.
-func (z *Float) SetRat(x *Rat) *Float {
-	if x.IsInt() {
-		return z.SetInt(x.Num())
-	}
-	var a, b Float
-	a.SetInt(x.Num())
-	b.SetInt(x.Denom())
-	if z.prec == 0 {
-		z.prec = umax32(a.prec, b.prec)
-	}
-	return z.Quo(&a, &b)
-}
-
-// SetInf sets z to the infinite Float -Inf if signbit is
-// set, or +Inf if signbit is not set, and returns z. The
-// precision of z is unchanged and the result is always
-// Exact.
-func (z *Float) SetInf(signbit bool) *Float {
-	z.acc = Exact
-	z.form = inf
-	z.neg = signbit
-	return z
-}
-
-// Set sets z to the (possibly rounded) value of x and returns z.
-// If z's precision is 0, it is changed to the precision of x
-// before setting z (and rounding will have no effect).
-// Rounding is performed according to z's precision and rounding
-// mode; and z's accuracy reports the result error relative to the
-// exact (not rounded) result.
-func (z *Float) Set(x *Float) *Float {
-	if debugFloat {
-		x.validate()
-	}
-	z.acc = Exact
-	if z != x {
-		z.form = x.form
-		z.neg = x.neg
-		if x.form == finite {
-			z.exp = x.exp
-			z.mant = z.mant.set(x.mant)
-		}
-		if z.prec == 0 {
-			z.prec = x.prec
-		} else if z.prec < x.prec {
-			z.round(0)
-		}
-	}
-	return z
-}
-
-// Copy sets z to x, with the same precision, rounding mode, and
-// accuracy as x, and returns z. x is not changed even if z and
-// x are the same.
-func (z *Float) Copy(x *Float) *Float {
-	if debugFloat {
-		x.validate()
-	}
-	if z != x {
-		z.prec = x.prec
-		z.mode = x.mode
-		z.acc = x.acc
-		z.form = x.form
-		z.neg = x.neg
-		if z.form == finite {
-			z.mant = z.mant.set(x.mant)
-			z.exp = x.exp
-		}
-	}
-	return z
-}
-
-// msb32 returns the 32 most significant bits of x.
-func msb32(x nat) uint32 {
-	i := len(x) - 1
-	if i < 0 {
-		return 0
-	}
-	if debugFloat && x[i]&(1<<(_W-1)) == 0 {
-		panic("x not normalized")
-	}
-	switch _W {
-	case 32:
-		return uint32(x[i])
-	case 64:
-		return uint32(x[i] >> 32)
-	}
-	panic("unreachable")
-}
-
-// msb64 returns the 64 most significant bits of x.
-func msb64(x nat) uint64 {
-	i := len(x) - 1
-	if i < 0 {
-		return 0
-	}
-	if debugFloat && x[i]&(1<<(_W-1)) == 0 {
-		panic("x not normalized")
-	}
-	switch _W {
-	case 32:
-		v := uint64(x[i]) << 32
-		if i > 0 {
-			v |= uint64(x[i-1])
-		}
-		return v
-	case 64:
-		return uint64(x[i])
-	}
-	panic("unreachable")
-}
-
-// Uint64 returns the unsigned integer resulting from truncating x
-// towards zero. If 0 <= x <= math.MaxUint64, the result is Exact
-// if x is an integer and Below otherwise.
-// The result is (0, Above) for x < 0, and (math.MaxUint64, Below)
-// for x > math.MaxUint64.
-func (x *Float) Uint64() (uint64, Accuracy) {
-	if debugFloat {
-		x.validate()
-	}
-
-	switch x.form {
-	case finite:
-		if x.neg {
-			return 0, Above
-		}
-		// 0 < x < +Inf
-		if x.exp <= 0 {
-			// 0 < x < 1
-			return 0, Below
-		}
-		// 1 <= x < Inf
-		if x.exp <= 64 {
-			// u = trunc(x) fits into a uint64
-			u := msb64(x.mant) >> (64 - uint32(x.exp))
-			if x.MinPrec() <= 64 {
-				return u, Exact
-			}
-			return u, Below // x truncated
-		}
-		// x too large
-		return math.MaxUint64, Below
-
-	case zero:
-		return 0, Exact
-
-	case inf:
-		if x.neg {
-			return 0, Above
-		}
-		return math.MaxUint64, Below
-	}
-
-	panic("unreachable")
-}
-
-// Int64 returns the integer resulting from truncating x towards zero.
-// If math.MinInt64 <= x <= math.MaxInt64, the result is Exact if x is
-// an integer, and Above (x < 0) or Below (x > 0) otherwise.
-// The result is (math.MinInt64, Above) for x < math.MinInt64,
-// and (math.MaxInt64, Below) for x > math.MaxInt64.
-func (x *Float) Int64() (int64, Accuracy) {
-	if debugFloat {
-		x.validate()
-	}
-
-	switch x.form {
-	case finite:
-		// 0 < |x| < +Inf
-		acc := makeAcc(x.neg)
-		if x.exp <= 0 {
-			// 0 < |x| < 1
-			return 0, acc
-		}
-		// x.exp > 0
-
-		// 1 <= |x| < +Inf
-		if x.exp <= 63 {
-			// i = trunc(x) fits into an int64 (excluding math.MinInt64)
-			i := int64(msb64(x.mant) >> (64 - uint32(x.exp)))
-			if x.neg {
-				i = -i
-			}
-			if x.MinPrec() <= uint(x.exp) {
-				return i, Exact
-			}
-			return i, acc // x truncated
-		}
-		if x.neg {
-			// check for special case x == math.MinInt64 (i.e., x == -(0.5 << 64))
-			if x.exp == 64 && x.MinPrec() == 1 {
-				acc = Exact
-			}
-			return math.MinInt64, acc
-		}
-		// x too large
-		return math.MaxInt64, Below
-
-	case zero:
-		return 0, Exact
-
-	case inf:
-		if x.neg {
-			return math.MinInt64, Above
-		}
-		return math.MaxInt64, Below
-	}
-
-	panic("unreachable")
-}
-
-// Float32 returns the float32 value nearest to x. If x is too small to be
-// represented by a float32 (|x| < math.SmallestNonzeroFloat32), the result
-// is (0, Below) or (-0, Above), respectively, depending on the sign of x.
-// If x is too large to be represented by a float32 (|x| > math.MaxFloat32),
-// the result is (+Inf, Above) or (-Inf, Below), depending on the sign of x.
-func (x *Float) Float32() (float32, Accuracy) {
-	if debugFloat {
-		x.validate()
-	}
-
-	switch x.form {
-	case finite:
-		// 0 < |x| < +Inf
-
-		const (
-			fbits = 32                //        float size
-			mbits = 23                //        mantissa size (excluding implicit msb)
-			ebits = fbits - mbits - 1 //     8  exponent size
-			bias  = 1<<(ebits-1) - 1  //   127  exponent bias
-			dmin  = 1 - bias - mbits  //  -149  smallest unbiased exponent (denormal)
-			emin  = 1 - bias          //  -126  smallest unbiased exponent (normal)
-			emax  = bias              //   127  largest unbiased exponent (normal)
-		)
-
-		// Float mantissa m is 0.5 <= m < 1.0; compute exponent for floatxx mantissa.
-		e := x.exp - 1 // exponent for mantissa m with 1.0 <= m < 2.0
-		p := mbits + 1 // precision of normal float
-
-		// If the exponent is too small, we may have a denormal number
-		// in which case we have fewer mantissa bits available: reduce
-		// precision accordingly.
-		if e < emin {
-			p -= emin - int(e)
-			// Make sure we have at least 1 bit so that we don't
-			// lose numbers rounded up to the smallest denormal.
-			if p < 1 {
-				p = 1
-			}
-		}
-
-		// round
-		var r Float
-		r.prec = uint32(p)
-		r.Set(x)
-		e = r.exp - 1
-
-		// Rounding may have caused r to overflow to ±Inf
-		// (rounding never causes underflows to 0).
-		if r.form == inf {
-			e = emax + 1 // cause overflow below
-		}
-
-		// If the exponent is too large, overflow to ±Inf.
-		if e > emax {
-			// overflow
-			if x.neg {
-				return float32(math.Inf(-1)), Below
-			}
-			return float32(math.Inf(+1)), Above
-		}
-		// e <= emax
-
-		// Determine sign, biased exponent, and mantissa.
-		var sign, bexp, mant uint32
-		if x.neg {
-			sign = 1 << (fbits - 1)
-		}
-
-		// Rounding may have caused a denormal number to
-		// become normal. Check again.
-		if e < emin {
-			// denormal number
-			if e < dmin {
-				// underflow to ±0
-				if x.neg {
-					var z float32
-					return -z, Above
-				}
-				return 0.0, Below
-			}
-			// bexp = 0
-			mant = msb32(r.mant) >> (fbits - r.prec)
-		} else {
-			// normal number: emin <= e <= emax
-			bexp = uint32(e+bias) << mbits
-			mant = msb32(r.mant) >> ebits & (1<<mbits - 1) // cut off msb (implicit 1 bit)
-		}
-
-		return math.Float32frombits(sign | bexp | mant), r.acc
-
-	case zero:
-		if x.neg {
-			var z float32
-			return -z, Exact
-		}
-		return 0.0, Exact
-
-	case inf:
-		if x.neg {
-			return float32(math.Inf(-1)), Exact
-		}
-		return float32(math.Inf(+1)), Exact
-	}
-
-	panic("unreachable")
-}
-
-// Float64 returns the float64 value nearest to x. If x is too small to be
-// represented by a float64 (|x| < math.SmallestNonzeroFloat64), the result
-// is (0, Below) or (-0, Above), respectively, depending on the sign of x.
-// If x is too large to be represented by a float64 (|x| > math.MaxFloat64),
-// the result is (+Inf, Above) or (-Inf, Below), depending on the sign of x.
-func (x *Float) Float64() (float64, Accuracy) {
-	if debugFloat {
-		x.validate()
-	}
-
-	switch x.form {
-	case finite:
-		// 0 < |x| < +Inf
-
-		const (
-			fbits = 64                //        float size
-			mbits = 52                //        mantissa size (excluding implicit msb)
-			ebits = fbits - mbits - 1 //    11  exponent size
-			bias  = 1<<(ebits-1) - 1  //  1023  exponent bias
-			dmin  = 1 - bias - mbits  // -1074  smallest unbiased exponent (denormal)
-			emin  = 1 - bias          // -1022  smallest unbiased exponent (normal)
-			emax  = bias              //  1023  largest unbiased exponent (normal)
-		)
-
-		// Float mantissa m is 0.5 <= m < 1.0; compute exponent for floatxx mantissa.
-		e := x.exp - 1 // exponent for mantissa m with 1.0 <= m < 2.0
-		p := mbits + 1 // precision of normal float
-
-		// If the exponent is too small, we may have a denormal number
-		// in which case we have fewer mantissa bits available: reduce
-		// precision accordingly.
-		if e < emin {
-			p -= emin - int(e)
-			// Make sure we have at least 1 bit so that we don't
-			// lose numbers rounded up to the smallest denormal.
-			if p < 1 {
-				p = 1
-			}
-		}
-
-		// round
-		var r Float
-		r.prec = uint32(p)
-		r.Set(x)
-		e = r.exp - 1
-
-		// Rounding may have caused r to overflow to ±Inf
-		// (rounding never causes underflows to 0).
-		if r.form == inf {
-			e = emax + 1 // cause overflow below
-		}
-
-		// If the exponent is too large, overflow to ±Inf.
-		if e > emax {
-			// overflow
-			if x.neg {
-				return math.Inf(-1), Below
-			}
-			return math.Inf(+1), Above
-		}
-		// e <= emax
-
-		// Determine sign, biased exponent, and mantissa.
-		var sign, bexp, mant uint64
-		if x.neg {
-			sign = 1 << (fbits - 1)
-		}
-
-		// Rounding may have caused a denormal number to
-		// become normal. Check again.
-		if e < emin {
-			// denormal number
-			if e < dmin {
-				// underflow to ±0
-				if x.neg {
-					var z float64
-					return -z, Above
-				}
-				return 0.0, Below
-			}
-			// bexp = 0
-			mant = msb64(r.mant) >> (fbits - r.prec)
-		} else {
-			// normal number: emin <= e <= emax
-			bexp = uint64(e+bias) << mbits
-			mant = msb64(r.mant) >> ebits & (1<<mbits - 1) // cut off msb (implicit 1 bit)
-		}
-
-		return math.Float64frombits(sign | bexp | mant), r.acc
-
-	case zero:
-		if x.neg {
-			var z float64
-			return -z, Exact
-		}
-		return 0.0, Exact
-
-	case inf:
-		if x.neg {
-			return math.Inf(-1), Exact
-		}
-		return math.Inf(+1), Exact
-	}
-
-	panic("unreachable")
-}
-
-// Int returns the result of truncating x towards zero;
-// or nil if x is an infinity.
-// The result is Exact if x.IsInt(); otherwise it is Below
-// for x > 0, and Above for x < 0.
-// If a non-nil *Int argument z is provided, Int stores
-// the result in z instead of allocating a new Int.
-func (x *Float) Int(z *Int) (*Int, Accuracy) {
-	if debugFloat {
-		x.validate()
-	}
-
-	if z == nil && x.form <= finite {
-		z = new(Int)
-	}
-
-	switch x.form {
-	case finite:
-		// 0 < |x| < +Inf
-		acc := makeAcc(x.neg)
-		if x.exp <= 0 {
-			// 0 < |x| < 1
-			return z.SetInt64(0), acc
-		}
-		// x.exp > 0
-
-		// 1 <= |x| < +Inf
-		// determine minimum required precision for x
-		allBits := uint(len(x.mant)) * _W
-		exp := uint(x.exp)
-		if x.MinPrec() <= exp {
-			acc = Exact
-		}
-		// shift mantissa as needed
-		if z == nil {
-			z = new(Int)
-		}
-		z.neg = x.neg
-		switch {
-		case exp > allBits:
-			z.abs = z.abs.shl(x.mant, exp-allBits)
-		default:
-			z.abs = z.abs.set(x.mant)
-		case exp < allBits:
-			z.abs = z.abs.shr(x.mant, allBits-exp)
-		}
-		return z, acc
-
-	case zero:
-		return z.SetInt64(0), Exact
-
-	case inf:
-		return nil, makeAcc(x.neg)
-	}
-
-	panic("unreachable")
-}
-
-// Rat returns the rational number corresponding to x;
-// or nil if x is an infinity.
-// The result is Exact is x is not an Inf.
-// If a non-nil *Rat argument z is provided, Rat stores
-// the result in z instead of allocating a new Rat.
-func (x *Float) Rat(z *Rat) (*Rat, Accuracy) {
-	if debugFloat {
-		x.validate()
-	}
-
-	if z == nil && x.form <= finite {
-		z = new(Rat)
-	}
-
-	switch x.form {
-	case finite:
-		// 0 < |x| < +Inf
-		allBits := int32(len(x.mant)) * _W
-		// build up numerator and denominator
-		z.a.neg = x.neg
-		switch {
-		case x.exp > allBits:
-			z.a.abs = z.a.abs.shl(x.mant, uint(x.exp-allBits))
-			z.b.abs = z.b.abs[:0] // == 1 (see Rat)
-			// z already in normal form
-		default:
-			z.a.abs = z.a.abs.set(x.mant)
-			z.b.abs = z.b.abs[:0] // == 1 (see Rat)
-			// z already in normal form
-		case x.exp < allBits:
-			z.a.abs = z.a.abs.set(x.mant)
-			t := z.b.abs.setUint64(1)
-			z.b.abs = t.shl(t, uint(allBits-x.exp))
-			z.norm()
-		}
-		return z, Exact
-
-	case zero:
-		return z.SetInt64(0), Exact
-
-	case inf:
-		return nil, makeAcc(x.neg)
-	}
-
-	panic("unreachable")
-}
-
-// Abs sets z to the (possibly rounded) value |x| (the absolute value of x)
-// and returns z.
-func (z *Float) Abs(x *Float) *Float {
-	z.Set(x)
-	z.neg = false
-	return z
-}
-
-// Neg sets z to the (possibly rounded) value of x with its sign negated,
-// and returns z.
-func (z *Float) Neg(x *Float) *Float {
-	z.Set(x)
-	z.neg = !z.neg
-	return z
-}
-
-func validateBinaryOperands(x, y *Float) {
-	if !debugFloat {
-		// avoid performance bugs
-		panic("validateBinaryOperands called but debugFloat is not set")
-	}
-	if len(x.mant) == 0 {
-		panic("empty mantissa for x")
-	}
-	if len(y.mant) == 0 {
-		panic("empty mantissa for y")
-	}
-}
-
-// z = x + y, ignoring signs of x and y for the addition
-// but using the sign of z for rounding the result.
-// x and y must have a non-empty mantissa and valid exponent.
-func (z *Float) uadd(x, y *Float) {
-	// Note: This implementation requires 2 shifts most of the
-	// time. It is also inefficient if exponents or precisions
-	// differ by wide margins. The following article describes
-	// an efficient (but much more complicated) implementation
-	// compatible with the internal representation used here:
-	//
-	// Vincent Lefèvre: "The Generic Multiple-Precision Floating-
-	// Point Addition With Exact Rounding (as in the MPFR Library)"
-	// http://www.vinc17.net/research/papers/rnc6.pdf
-
-	if debugFloat {
-		validateBinaryOperands(x, y)
-	}
-
-	// compute exponents ex, ey for mantissa with "binary point"
-	// on the right (mantissa.0) - use int64 to avoid overflow
-	ex := int64(x.exp) - int64(len(x.mant))*_W
-	ey := int64(y.exp) - int64(len(y.mant))*_W
-
-	// TODO(gri) having a combined add-and-shift primitive
-	//           could make this code significantly faster
-	switch {
-	case ex < ey:
-		// cannot re-use z.mant w/o testing for aliasing
-		t := nat(nil).shl(y.mant, uint(ey-ex))
-		z.mant = z.mant.add(x.mant, t)
-	default:
-		// ex == ey, no shift needed
-		z.mant = z.mant.add(x.mant, y.mant)
-	case ex > ey:
-		// cannot re-use z.mant w/o testing for aliasing
-		t := nat(nil).shl(x.mant, uint(ex-ey))
-		z.mant = z.mant.add(t, y.mant)
-		ex = ey
-	}
-	// len(z.mant) > 0
-
-	z.setExpAndRound(ex+int64(len(z.mant))*_W-fnorm(z.mant), 0)
-}
-
-// z = x - y for |x| > |y|, ignoring signs of x and y for the subtraction
-// but using the sign of z for rounding the result.
-// x and y must have a non-empty mantissa and valid exponent.
-func (z *Float) usub(x, y *Float) {
-	// This code is symmetric to uadd.
-	// We have not factored the common code out because
-	// eventually uadd (and usub) should be optimized
-	// by special-casing, and the code will diverge.
-
-	if debugFloat {
-		validateBinaryOperands(x, y)
-	}
-
-	ex := int64(x.exp) - int64(len(x.mant))*_W
-	ey := int64(y.exp) - int64(len(y.mant))*_W
-
-	switch {
-	case ex < ey:
-		// cannot re-use z.mant w/o testing for aliasing
-		t := nat(nil).shl(y.mant, uint(ey-ex))
-		z.mant = t.sub(x.mant, t)
-	default:
-		// ex == ey, no shift needed
-		z.mant = z.mant.sub(x.mant, y.mant)
-	case ex > ey:
-		// cannot re-use z.mant w/o testing for aliasing
-		t := nat(nil).shl(x.mant, uint(ex-ey))
-		z.mant = t.sub(t, y.mant)
-		ex = ey
-	}
-
-	// operands may have cancelled each other out
-	if len(z.mant) == 0 {
-		z.acc = Exact
-		z.form = zero
-		z.neg = false
-		return
-	}
-	// len(z.mant) > 0
-
-	z.setExpAndRound(ex+int64(len(z.mant))*_W-fnorm(z.mant), 0)
-}
-
-// z = x * y, ignoring signs of x and y for the multiplication
-// but using the sign of z for rounding the result.
-// x and y must have a non-empty mantissa and valid exponent.
-func (z *Float) umul(x, y *Float) {
-	if debugFloat {
-		validateBinaryOperands(x, y)
-	}
-
-	// Note: This is doing too much work if the precision
-	// of z is less than the sum of the precisions of x
-	// and y which is often the case (e.g., if all floats
-	// have the same precision).
-	// TODO(gri) Optimize this for the common case.
-
-	e := int64(x.exp) + int64(y.exp)
-	z.mant = z.mant.mul(x.mant, y.mant)
-
-	z.setExpAndRound(e-fnorm(z.mant), 0)
-}
-
-// z = x / y, ignoring signs of x and y for the division
-// but using the sign of z for rounding the result.
-// x and y must have a non-empty mantissa and valid exponent.
-func (z *Float) uquo(x, y *Float) {
-	if debugFloat {
-		validateBinaryOperands(x, y)
-	}
-
-	// mantissa length in words for desired result precision + 1
-	// (at least one extra bit so we get the rounding bit after
-	// the division)
-	n := int(z.prec/_W) + 1
-
-	// compute adjusted x.mant such that we get enough result precision
-	xadj := x.mant
-	if d := n - len(x.mant) + len(y.mant); d > 0 {
-		// d extra words needed => add d "0 digits" to x
-		xadj = make(nat, len(x.mant)+d)
-		copy(xadj[d:], x.mant)
-	}
-	// TODO(gri): If we have too many digits (d < 0), we should be able
-	// to shorten x for faster division. But we must be extra careful
-	// with rounding in that case.
-
-	// Compute d before division since there may be aliasing of x.mant
-	// (via xadj) or y.mant with z.mant.
-	d := len(xadj) - len(y.mant)
-
-	// divide
-	var r nat
-	z.mant, r = z.mant.div(nil, xadj, y.mant)
-	e := int64(x.exp) - int64(y.exp) - int64(d-len(z.mant))*_W
-
-	// The result is long enough to include (at least) the rounding bit.
-	// If there's a non-zero remainder, the corresponding fractional part
-	// (if it were computed), would have a non-zero sticky bit (if it were
-	// zero, it couldn't have a non-zero remainder).
-	var sbit uint
-	if len(r) > 0 {
-		sbit = 1
-	}
-
-	z.setExpAndRound(e-fnorm(z.mant), sbit)
-}
-
-// ucmp returns -1, 0, or +1, depending on whether
-// |x| < |y|, |x| == |y|, or |x| > |y|.
-// x and y must have a non-empty mantissa and valid exponent.
-func (x *Float) ucmp(y *Float) int {
-	if debugFloat {
-		validateBinaryOperands(x, y)
-	}
-
-	switch {
-	case x.exp < y.exp:
-		return -1
-	case x.exp > y.exp:
-		return +1
-	}
-	// x.exp == y.exp
-
-	// compare mantissas
-	i := len(x.mant)
-	j := len(y.mant)
-	for i > 0 || j > 0 {
-		var xm, ym Word
-		if i > 0 {
-			i--
-			xm = x.mant[i]
-		}
-		if j > 0 {
-			j--
-			ym = y.mant[j]
-		}
-		switch {
-		case xm < ym:
-			return -1
-		case xm > ym:
-			return +1
-		}
-	}
-
-	return 0
-}
-
-// Handling of sign bit as defined by IEEE 754-2008, section 6.3:
-//
-// When neither the inputs nor result are NaN, the sign of a product or
-// quotient is the exclusive OR of the operands’ signs; the sign of a sum,
-// or of a difference x−y regarded as a sum x+(−y), differs from at most
-// one of the addends’ signs; and the sign of the result of conversions,
-// the quantize operation, the roundToIntegral operations, and the
-// roundToIntegralExact (see 5.3.1) is the sign of the first or only operand.
-// These rules shall apply even when operands or results are zero or infinite.
-//
-// When the sum of two operands with opposite signs (or the difference of
-// two operands with like signs) is exactly zero, the sign of that sum (or
-// difference) shall be +0 in all rounding-direction attributes except
-// roundTowardNegative; under that attribute, the sign of an exact zero
-// sum (or difference) shall be −0. However, x+x = x−(−x) retains the same
-// sign as x even when x is zero.
-//
-// See also: https://play.golang.org/p/RtH3UCt5IH
-
-// Add sets z to the rounded sum x+y and returns z. If z's precision is 0,
-// it is changed to the larger of x's or y's precision before the operation.
-// Rounding is performed according to z's precision and rounding mode; and
-// z's accuracy reports the result error relative to the exact (not rounded)
-// result. Add panics with ErrNaN if x and y are infinities with opposite
-// signs. The value of z is undefined in that case.
-//
-// BUG(gri) When rounding ToNegativeInf, the sign of Float values rounded to 0 is incorrect.
-func (z *Float) Add(x, y *Float) *Float {
-	if debugFloat {
-		x.validate()
-		y.validate()
-	}
-
-	if z.prec == 0 {
-		z.prec = umax32(x.prec, y.prec)
-	}
-
-	if x.form == finite && y.form == finite {
-		// x + y (commom case)
-		z.neg = x.neg
-		if x.neg == y.neg {
-			// x + y == x + y
-			// (-x) + (-y) == -(x + y)
-			z.uadd(x, y)
-		} else {
-			// x + (-y) == x - y == -(y - x)
-			// (-x) + y == y - x == -(x - y)
-			if x.ucmp(y) > 0 {
-				z.usub(x, y)
-			} else {
-				z.neg = !z.neg
-				z.usub(y, x)
-			}
-		}
-		return z
-	}
-
-	if x.form == inf && y.form == inf && x.neg != y.neg {
-		// +Inf + -Inf
-		// -Inf + +Inf
-		// value of z is undefined but make sure it's valid
-		z.acc = Exact
-		z.form = zero
-		z.neg = false
-		panic(ErrNaN{"addition of infinities with opposite signs"})
-	}
-
-	if x.form == zero && y.form == zero {
-		// ±0 + ±0
-		z.acc = Exact
-		z.form = zero
-		z.neg = x.neg && y.neg // -0 + -0 == -0
-		return z
-	}
-
-	if x.form == inf || y.form == zero {
-		// ±Inf + y
-		// x + ±0
-		return z.Set(x)
-	}
-
-	// ±0 + y
-	// x + ±Inf
-	return z.Set(y)
-}
-
-// Sub sets z to the rounded difference x-y and returns z.
-// Precision, rounding, and accuracy reporting are as for Add.
-// Sub panics with ErrNaN if x and y are infinities with equal
-// signs. The value of z is undefined in that case.
-func (z *Float) Sub(x, y *Float) *Float {
-	if debugFloat {
-		x.validate()
-		y.validate()
-	}
-
-	if z.prec == 0 {
-		z.prec = umax32(x.prec, y.prec)
-	}
-
-	if x.form == finite && y.form == finite {
-		// x - y (common case)
-		z.neg = x.neg
-		if x.neg != y.neg {
-			// x - (-y) == x + y
-			// (-x) - y == -(x + y)
-			z.uadd(x, y)
-		} else {
-			// x - y == x - y == -(y - x)
-			// (-x) - (-y) == y - x == -(x - y)
-			if x.ucmp(y) > 0 {
-				z.usub(x, y)
-			} else {
-				z.neg = !z.neg
-				z.usub(y, x)
-			}
-		}
-		return z
-	}
-
-	if x.form == inf && y.form == inf && x.neg == y.neg {
-		// +Inf - +Inf
-		// -Inf - -Inf
-		// value of z is undefined but make sure it's valid
-		z.acc = Exact
-		z.form = zero
-		z.neg = false
-		panic(ErrNaN{"subtraction of infinities with equal signs"})
-	}
-
-	if x.form == zero && y.form == zero {
-		// ±0 - ±0
-		z.acc = Exact
-		z.form = zero
-		z.neg = x.neg && !y.neg // -0 - +0 == -0
-		return z
-	}
-
-	if x.form == inf || y.form == zero {
-		// ±Inf - y
-		// x - ±0
-		return z.Set(x)
-	}
-
-	// ±0 - y
-	// x - ±Inf
-	return z.Neg(y)
-}
-
-// Mul sets z to the rounded product x*y and returns z.
-// Precision, rounding, and accuracy reporting are as for Add.
-// Mul panics with ErrNaN if one operand is zero and the other
-// operand an infinity. The value of z is undefined in that case.
-func (z *Float) Mul(x, y *Float) *Float {
-	if debugFloat {
-		x.validate()
-		y.validate()
-	}
-
-	if z.prec == 0 {
-		z.prec = umax32(x.prec, y.prec)
-	}
-
-	z.neg = x.neg != y.neg
-
-	if x.form == finite && y.form == finite {
-		// x * y (common case)
-		z.umul(x, y)
-		return z
-	}
-
-	z.acc = Exact
-	if x.form == zero && y.form == inf || x.form == inf && y.form == zero {
-		// ±0 * ±Inf
-		// ±Inf * ±0
-		// value of z is undefined but make sure it's valid
-		z.form = zero
-		z.neg = false
-		panic(ErrNaN{"multiplication of zero with infinity"})
-	}
-
-	if x.form == inf || y.form == inf {
-		// ±Inf * y
-		// x * ±Inf
-		z.form = inf
-		return z
-	}
-
-	// ±0 * y
-	// x * ±0
-	z.form = zero
-	return z
-}
-
-// Quo sets z to the rounded quotient x/y and returns z.
-// Precision, rounding, and accuracy reporting are as for Add.
-// Quo panics with ErrNaN if both operands are zero or infinities.
-// The value of z is undefined in that case.
-func (z *Float) Quo(x, y *Float) *Float {
-	if debugFloat {
-		x.validate()
-		y.validate()
-	}
-
-	if z.prec == 0 {
-		z.prec = umax32(x.prec, y.prec)
-	}
-
-	z.neg = x.neg != y.neg
-
-	if x.form == finite && y.form == finite {
-		// x / y (common case)
-		z.uquo(x, y)
-		return z
-	}
-
-	z.acc = Exact
-	if x.form == zero && y.form == zero || x.form == inf && y.form == inf {
-		// ±0 / ±0
-		// ±Inf / ±Inf
-		// value of z is undefined but make sure it's valid
-		z.form = zero
-		z.neg = false
-		panic(ErrNaN{"division of zero by zero or infinity by infinity"})
-	}
-
-	if x.form == zero || y.form == inf {
-		// ±0 / y
-		// x / ±Inf
-		z.form = zero
-		return z
-	}
-
-	// x / ±0
-	// ±Inf / y
-	z.form = inf
-	return z
-}
-
-// Cmp compares x and y and returns:
-//
-//   -1 if x <  y
-//    0 if x == y (incl. -0 == 0, -Inf == -Inf, and +Inf == +Inf)
-//   +1 if x >  y
-//
-func (x *Float) Cmp(y *Float) int {
-	if debugFloat {
-		x.validate()
-		y.validate()
-	}
-
-	mx := x.ord()
-	my := y.ord()
-	switch {
-	case mx < my:
-		return -1
-	case mx > my:
-		return +1
-	}
-	// mx == my
-
-	// only if |mx| == 1 we have to compare the mantissae
-	switch mx {
-	case -1:
-		return y.ucmp(x)
-	case +1:
-		return x.ucmp(y)
-	}
-
-	return 0
-}
-
-// ord classifies x and returns:
-//
-//	-2 if -Inf == x
-//	-1 if -Inf < x < 0
-//	 0 if x == 0 (signed or unsigned)
-//	+1 if 0 < x < +Inf
-//	+2 if x == +Inf
-//
-func (x *Float) ord() int {
-	var m int
-	switch x.form {
-	case finite:
-		m = 1
-	case zero:
-		return 0
-	case inf:
-		m = 2
-	}
-	if x.neg {
-		m = -m
-	}
-	return m
-}
-
-func umax32(x, y uint32) uint32 {
-	if x > y {
-		return x
-	}
-	return y
-}
diff --git a/src/cmd/compile/internal/big/float_test.go b/src/cmd/compile/internal/big/float_test.go
deleted file mode 100644
index d3b214b..0000000
--- a/src/cmd/compile/internal/big/float_test.go
+++ /dev/null
@@ -1,1694 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package big
-
-import (
-	"fmt"
-	"math"
-	"strconv"
-	"strings"
-	"testing"
-)
-
-// Verify that ErrNaN implements the error interface.
-var _ error = ErrNaN{}
-
-func (x *Float) uint64() uint64 {
-	u, acc := x.Uint64()
-	if acc != Exact {
-		panic(fmt.Sprintf("%s is not a uint64", x.Text('g', 10)))
-	}
-	return u
-}
-
-func (x *Float) int64() int64 {
-	i, acc := x.Int64()
-	if acc != Exact {
-		panic(fmt.Sprintf("%s is not an int64", x.Text('g', 10)))
-	}
-	return i
-}
-
-func TestFloatZeroValue(t *testing.T) {
-	// zero (uninitialized) value is a ready-to-use 0.0
-	var x Float
-	if s := x.Text('f', 1); s != "0.0" {
-		t.Errorf("zero value = %s; want 0.0", s)
-	}
-
-	// zero value has precision 0
-	if prec := x.Prec(); prec != 0 {
-		t.Errorf("prec = %d; want 0", prec)
-	}
-
-	// zero value can be used in any and all positions of binary operations
-	make := func(x int) *Float {
-		var f Float
-		if x != 0 {
-			f.SetInt64(int64(x))
-		}
-		// x == 0 translates into the zero value
-		return &f
-	}
-	for _, test := range []struct {
-		z, x, y, want int
-		opname        rune
-		op            func(z, x, y *Float) *Float
-	}{
-		{0, 0, 0, 0, '+', (*Float).Add},
-		{0, 1, 2, 3, '+', (*Float).Add},
-		{1, 2, 0, 2, '+', (*Float).Add},
-		{2, 0, 1, 1, '+', (*Float).Add},
-
-		{0, 0, 0, 0, '-', (*Float).Sub},
-		{0, 1, 2, -1, '-', (*Float).Sub},
-		{1, 2, 0, 2, '-', (*Float).Sub},
-		{2, 0, 1, -1, '-', (*Float).Sub},
-
-		{0, 0, 0, 0, '*', (*Float).Mul},
-		{0, 1, 2, 2, '*', (*Float).Mul},
-		{1, 2, 0, 0, '*', (*Float).Mul},
-		{2, 0, 1, 0, '*', (*Float).Mul},
-
-		// {0, 0, 0, 0, '/', (*Float).Quo}, // panics
-		{0, 2, 1, 2, '/', (*Float).Quo},
-		{1, 2, 0, 0, '/', (*Float).Quo}, // = +Inf
-		{2, 0, 1, 0, '/', (*Float).Quo},
-	} {
-		z := make(test.z)
-		test.op(z, make(test.x), make(test.y))
-		got := 0
-		if !z.IsInf() {
-			got = int(z.int64())
-		}
-		if got != test.want {
-			t.Errorf("%d %c %d = %d; want %d", test.x, test.opname, test.y, got, test.want)
-		}
-	}
-
-	// TODO(gri) test how precision is set for zero value results
-}
-
-func makeFloat(s string) *Float {
-	x, _, err := ParseFloat(s, 0, 1000, ToNearestEven)
-	if err != nil {
-		panic(err)
-	}
-	return x
-}
-
-func TestFloatSetPrec(t *testing.T) {
-	for _, test := range []struct {
-		x    string
-		prec uint
-		want string
-		acc  Accuracy
-	}{
-		// prec 0
-		{"0", 0, "0", Exact},
-		{"-0", 0, "-0", Exact},
-		{"-Inf", 0, "-Inf", Exact},
-		{"+Inf", 0, "+Inf", Exact},
-		{"123", 0, "0", Below},
-		{"-123", 0, "-0", Above},
-
-		// prec at upper limit
-		{"0", MaxPrec, "0", Exact},
-		{"-0", MaxPrec, "-0", Exact},
-		{"-Inf", MaxPrec, "-Inf", Exact},
-		{"+Inf", MaxPrec, "+Inf", Exact},
-
-		// just a few regular cases - general rounding is tested elsewhere
-		{"1.5", 1, "2", Above},
-		{"-1.5", 1, "-2", Below},
-		{"123", 1e6, "123", Exact},
-		{"-123", 1e6, "-123", Exact},
-	} {
-		x := makeFloat(test.x).SetPrec(test.prec)
-		prec := test.prec
-		if prec > MaxPrec {
-			prec = MaxPrec
-		}
-		if got := x.Prec(); got != prec {
-			t.Errorf("%s.SetPrec(%d).Prec() == %d; want %d", test.x, test.prec, got, prec)
-		}
-		if got, acc := x.String(), x.Acc(); got != test.want || acc != test.acc {
-			t.Errorf("%s.SetPrec(%d) = %s (%s); want %s (%s)", test.x, test.prec, got, acc, test.want, test.acc)
-		}
-	}
-}
-
-func TestFloatMinPrec(t *testing.T) {
-	const max = 100
-	for _, test := range []struct {
-		x    string
-		want uint
-	}{
-		{"0", 0},
-		{"-0", 0},
-		{"+Inf", 0},
-		{"-Inf", 0},
-		{"1", 1},
-		{"2", 1},
-		{"3", 2},
-		{"0x8001", 16},
-		{"0x8001p-1000", 16},
-		{"0x8001p+1000", 16},
-		{"0.1", max},
-	} {
-		x := makeFloat(test.x).SetPrec(max)
-		if got := x.MinPrec(); got != test.want {
-			t.Errorf("%s.MinPrec() = %d; want %d", test.x, got, test.want)
-		}
-	}
-}
-
-func TestFloatSign(t *testing.T) {
-	for _, test := range []struct {
-		x string
-		s int
-	}{
-		{"-Inf", -1},
-		{"-1", -1},
-		{"-0", 0},
-		{"+0", 0},
-		{"+1", +1},
-		{"+Inf", +1},
-	} {
-		x := makeFloat(test.x)
-		s := x.Sign()
-		if s != test.s {
-			t.Errorf("%s.Sign() = %d; want %d", test.x, s, test.s)
-		}
-	}
-}
-
-// alike(x, y) is like x.Cmp(y) == 0 but also considers the sign of 0 (0 != -0).
-func alike(x, y *Float) bool {
-	return x.Cmp(y) == 0 && x.Signbit() == y.Signbit()
-}
-
-func alike32(x, y float32) bool {
-	// we can ignore NaNs
-	return x == y && math.Signbit(float64(x)) == math.Signbit(float64(y))
-
-}
-
-func alike64(x, y float64) bool {
-	// we can ignore NaNs
-	return x == y && math.Signbit(x) == math.Signbit(y)
-
-}
-
-func TestFloatMantExp(t *testing.T) {
-	for _, test := range []struct {
-		x    string
-		mant string
-		exp  int
-	}{
-		{"0", "0", 0},
-		{"+0", "0", 0},
-		{"-0", "-0", 0},
-		{"Inf", "+Inf", 0},
-		{"+Inf", "+Inf", 0},
-		{"-Inf", "-Inf", 0},
-		{"1.5", "0.75", 1},
-		{"1.024e3", "0.5", 11},
-		{"-0.125", "-0.5", -2},
-	} {
-		x := makeFloat(test.x)
-		mant := makeFloat(test.mant)
-		m := new(Float)
-		e := x.MantExp(m)
-		if !alike(m, mant) || e != test.exp {
-			t.Errorf("%s.MantExp() = %s, %d; want %s, %d", test.x, m.Text('g', 10), e, test.mant, test.exp)
-		}
-	}
-}
-
-func TestFloatMantExpAliasing(t *testing.T) {
-	x := makeFloat("0.5p10")
-	if e := x.MantExp(x); e != 10 {
-		t.Fatalf("Float.MantExp aliasing error: got %d; want 10", e)
-	}
-	if want := makeFloat("0.5"); !alike(x, want) {
-		t.Fatalf("Float.MantExp aliasing error: got %s; want %s", x.Text('g', 10), want.Text('g', 10))
-	}
-}
-
-func TestFloatSetMantExp(t *testing.T) {
-	for _, test := range []struct {
-		frac string
-		exp  int
-		z    string
-	}{
-		{"0", 0, "0"},
-		{"+0", 0, "0"},
-		{"-0", 0, "-0"},
-		{"Inf", 1234, "+Inf"},
-		{"+Inf", -1234, "+Inf"},
-		{"-Inf", -1234, "-Inf"},
-		{"0", MinExp, "0"},
-		{"0.25", MinExp, "+0"},    // exponent underflow
-		{"-0.25", MinExp, "-0"},   // exponent underflow
-		{"1", MaxExp, "+Inf"},     // exponent overflow
-		{"2", MaxExp - 1, "+Inf"}, // exponent overflow
-		{"0.75", 1, "1.5"},
-		{"0.5", 11, "1024"},
-		{"-0.5", -2, "-0.125"},
-		{"32", 5, "1024"},
-		{"1024", -10, "1"},
-	} {
-		frac := makeFloat(test.frac)
-		want := makeFloat(test.z)
-		var z Float
-		z.SetMantExp(frac, test.exp)
-		if !alike(&z, want) {
-			t.Errorf("SetMantExp(%s, %d) = %s; want %s", test.frac, test.exp, z.Text('g', 10), test.z)
-		}
-		// test inverse property
-		mant := new(Float)
-		if z.SetMantExp(mant, want.MantExp(mant)).Cmp(want) != 0 {
-			t.Errorf("Inverse property not satisfied: got %s; want %s", z.Text('g', 10), test.z)
-		}
-	}
-}
-
-func TestFloatPredicates(t *testing.T) {
-	for _, test := range []struct {
-		x            string
-		sign         int
-		signbit, inf bool
-	}{
-		{x: "-Inf", sign: -1, signbit: true, inf: true},
-		{x: "-1", sign: -1, signbit: true},
-		{x: "-0", signbit: true},
-		{x: "0"},
-		{x: "1", sign: 1},
-		{x: "+Inf", sign: 1, inf: true},
-	} {
-		x := makeFloat(test.x)
-		if got := x.Signbit(); got != test.signbit {
-			t.Errorf("(%s).Signbit() = %v; want %v", test.x, got, test.signbit)
-		}
-		if got := x.Sign(); got != test.sign {
-			t.Errorf("(%s).Sign() = %d; want %d", test.x, got, test.sign)
-		}
-		if got := x.IsInf(); got != test.inf {
-			t.Errorf("(%s).IsInf() = %v; want %v", test.x, got, test.inf)
-		}
-	}
-}
-
-func TestFloatIsInt(t *testing.T) {
-	for _, test := range []string{
-		"0 int",
-		"-0 int",
-		"1 int",
-		"-1 int",
-		"0.5",
-		"1.23",
-		"1.23e1",
-		"1.23e2 int",
-		"0.000000001e+8",
-		"0.000000001e+9 int",
-		"1.2345e200 int",
-		"Inf",
-		"+Inf",
-		"-Inf",
-	} {
-		s := strings.TrimSuffix(test, " int")
-		want := s != test
-		if got := makeFloat(s).IsInt(); got != want {
-			t.Errorf("%s.IsInt() == %t", s, got)
-		}
-	}
-}
-
-func fromBinary(s string) int64 {
-	x, err := strconv.ParseInt(s, 2, 64)
-	if err != nil {
-		panic(err)
-	}
-	return x
-}
-
-func toBinary(x int64) string {
-	return strconv.FormatInt(x, 2)
-}
-
-func testFloatRound(t *testing.T, x, r int64, prec uint, mode RoundingMode) {
-	// verify test data
-	var ok bool
-	switch mode {
-	case ToNearestEven, ToNearestAway:
-		ok = true // nothing to do for now
-	case ToZero:
-		if x < 0 {
-			ok = r >= x
-		} else {
-			ok = r <= x
-		}
-	case AwayFromZero:
-		if x < 0 {
-			ok = r <= x
-		} else {
-			ok = r >= x
-		}
-	case ToNegativeInf:
-		ok = r <= x
-	case ToPositiveInf:
-		ok = r >= x
-	default:
-		panic("unreachable")
-	}
-	if !ok {
-		t.Fatalf("incorrect test data for prec = %d, %s: x = %s, r = %s", prec, mode, toBinary(x), toBinary(r))
-	}
-
-	// compute expected accuracy
-	a := Exact
-	switch {
-	case r < x:
-		a = Below
-	case r > x:
-		a = Above
-	}
-
-	// round
-	f := new(Float).SetMode(mode).SetInt64(x).SetPrec(prec)
-
-	// check result
-	r1 := f.int64()
-	p1 := f.Prec()
-	a1 := f.Acc()
-	if r1 != r || p1 != prec || a1 != a {
-		t.Errorf("round %s (%d bits, %s) incorrect: got %s (%d bits, %s); want %s (%d bits, %s)",
-			toBinary(x), prec, mode,
-			toBinary(r1), p1, a1,
-			toBinary(r), prec, a)
-		return
-	}
-
-	// g and f should be the same
-	// (rounding by SetPrec after SetInt64 using default precision
-	// should be the same as rounding by SetInt64 after setting the
-	// precision)
-	g := new(Float).SetMode(mode).SetPrec(prec).SetInt64(x)
-	if !alike(g, f) {
-		t.Errorf("round %s (%d bits, %s) not symmetric: got %s and %s; want %s",
-			toBinary(x), prec, mode,
-			toBinary(g.int64()),
-			toBinary(r1),
-			toBinary(r),
-		)
-		return
-	}
-
-	// h and f should be the same
-	// (repeated rounding should be idempotent)
-	h := new(Float).SetMode(mode).SetPrec(prec).Set(f)
-	if !alike(h, f) {
-		t.Errorf("round %s (%d bits, %s) not idempotent: got %s and %s; want %s",
-			toBinary(x), prec, mode,
-			toBinary(h.int64()),
-			toBinary(r1),
-			toBinary(r),
-		)
-		return
-	}
-}
-
-// TestFloatRound tests basic rounding.
-func TestFloatRound(t *testing.T) {
-	for _, test := range []struct {
-		prec                        uint
-		x, zero, neven, naway, away string // input, results rounded to prec bits
-	}{
-		{5, "1000", "1000", "1000", "1000", "1000"},
-		{5, "1001", "1001", "1001", "1001", "1001"},
-		{5, "1010", "1010", "1010", "1010", "1010"},
-		{5, "1011", "1011", "1011", "1011", "1011"},
-		{5, "1100", "1100", "1100", "1100", "1100"},
-		{5, "1101", "1101", "1101", "1101", "1101"},
-		{5, "1110", "1110", "1110", "1110", "1110"},
-		{5, "1111", "1111", "1111", "1111", "1111"},
-
-		{4, "1000", "1000", "1000", "1000", "1000"},
-		{4, "1001", "1001", "1001", "1001", "1001"},
-		{4, "1010", "1010", "1010", "1010", "1010"},
-		{4, "1011", "1011", "1011", "1011", "1011"},
-		{4, "1100", "1100", "1100", "1100", "1100"},
-		{4, "1101", "1101", "1101", "1101", "1101"},
-		{4, "1110", "1110", "1110", "1110", "1110"},
-		{4, "1111", "1111", "1111", "1111", "1111"},
-
-		{3, "1000", "1000", "1000", "1000", "1000"},
-		{3, "1001", "1000", "1000", "1010", "1010"},
-		{3, "1010", "1010", "1010", "1010", "1010"},
-		{3, "1011", "1010", "1100", "1100", "1100"},
-		{3, "1100", "1100", "1100", "1100", "1100"},
-		{3, "1101", "1100", "1100", "1110", "1110"},
-		{3, "1110", "1110", "1110", "1110", "1110"},
-		{3, "1111", "1110", "10000", "10000", "10000"},
-
-		{3, "1000001", "1000000", "1000000", "1000000", "1010000"},
-		{3, "1001001", "1000000", "1010000", "1010000", "1010000"},
-		{3, "1010001", "1010000", "1010000", "1010000", "1100000"},
-		{3, "1011001", "1010000", "1100000", "1100000", "1100000"},
-		{3, "1100001", "1100000", "1100000", "1100000", "1110000"},
-		{3, "1101001", "1100000", "1110000", "1110000", "1110000"},
-		{3, "1110001", "1110000", "1110000", "1110000", "10000000"},
-		{3, "1111001", "1110000", "10000000", "10000000", "10000000"},
-
-		{2, "1000", "1000", "1000", "1000", "1000"},
-		{2, "1001", "1000", "1000", "1000", "1100"},
-		{2, "1010", "1000", "1000", "1100", "1100"},
-		{2, "1011", "1000", "1100", "1100", "1100"},
-		{2, "1100", "1100", "1100", "1100", "1100"},
-		{2, "1101", "1100", "1100", "1100", "10000"},
-		{2, "1110", "1100", "10000", "10000", "10000"},
-		{2, "1111", "1100", "10000", "10000", "10000"},
-
-		{2, "1000001", "1000000", "1000000", "1000000", "1100000"},
-		{2, "1001001", "1000000", "1000000", "1000000", "1100000"},
-		{2, "1010001", "1000000", "1100000", "1100000", "1100000"},
-		{2, "1011001", "1000000", "1100000", "1100000", "1100000"},
-		{2, "1100001", "1100000", "1100000", "1100000", "10000000"},
-		{2, "1101001", "1100000", "1100000", "1100000", "10000000"},
-		{2, "1110001", "1100000", "10000000", "10000000", "10000000"},
-		{2, "1111001", "1100000", "10000000", "10000000", "10000000"},
-
-		{1, "1000", "1000", "1000", "1000", "1000"},
-		{1, "1001", "1000", "1000", "1000", "10000"},
-		{1, "1010", "1000", "1000", "1000", "10000"},
-		{1, "1011", "1000", "1000", "1000", "10000"},
-		{1, "1100", "1000", "10000", "10000", "10000"},
-		{1, "1101", "1000", "10000", "10000", "10000"},
-		{1, "1110", "1000", "10000", "10000", "10000"},
-		{1, "1111", "1000", "10000", "10000", "10000"},
-
-		{1, "1000001", "1000000", "1000000", "1000000", "10000000"},
-		{1, "1001001", "1000000", "1000000", "1000000", "10000000"},
-		{1, "1010001", "1000000", "1000000", "1000000", "10000000"},
-		{1, "1011001", "1000000", "1000000", "1000000", "10000000"},
-		{1, "1100001", "1000000", "10000000", "10000000", "10000000"},
-		{1, "1101001", "1000000", "10000000", "10000000", "10000000"},
-		{1, "1110001", "1000000", "10000000", "10000000", "10000000"},
-		{1, "1111001", "1000000", "10000000", "10000000", "10000000"},
-	} {
-		x := fromBinary(test.x)
-		z := fromBinary(test.zero)
-		e := fromBinary(test.neven)
-		n := fromBinary(test.naway)
-		a := fromBinary(test.away)
-		prec := test.prec
-
-		testFloatRound(t, x, z, prec, ToZero)
-		testFloatRound(t, x, e, prec, ToNearestEven)
-		testFloatRound(t, x, n, prec, ToNearestAway)
-		testFloatRound(t, x, a, prec, AwayFromZero)
-
-		testFloatRound(t, x, z, prec, ToNegativeInf)
-		testFloatRound(t, x, a, prec, ToPositiveInf)
-
-		testFloatRound(t, -x, -a, prec, ToNegativeInf)
-		testFloatRound(t, -x, -z, prec, ToPositiveInf)
-	}
-}
-
-// TestFloatRound24 tests that rounding a float64 to 24 bits
-// matches IEEE-754 rounding to nearest when converting a
-// float64 to a float32 (excluding denormal numbers).
-func TestFloatRound24(t *testing.T) {
-	const x0 = 1<<26 - 0x10 // 11...110000 (26 bits)
-	for d := 0; d <= 0x10; d++ {
-		x := float64(x0 + d)
-		f := new(Float).SetPrec(24).SetFloat64(x)
-		got, _ := f.Float32()
-		want := float32(x)
-		if got != want {
-			t.Errorf("Round(%g, 24) = %g; want %g", x, got, want)
-		}
-	}
-}
-
-func TestFloatSetUint64(t *testing.T) {
-	for _, want := range []uint64{
-		0,
-		1,
-		2,
-		10,
-		100,
-		1<<32 - 1,
-		1 << 32,
-		1<<64 - 1,
-	} {
-		var f Float
-		f.SetUint64(want)
-		if got := f.uint64(); got != want {
-			t.Errorf("got %#x (%s); want %#x", got, f.Text('p', 0), want)
-		}
-	}
-
-	// test basic rounding behavior (exhaustive rounding testing is done elsewhere)
-	const x uint64 = 0x8765432187654321 // 64 bits needed
-	for prec := uint(1); prec <= 64; prec++ {
-		f := new(Float).SetPrec(prec).SetMode(ToZero).SetUint64(x)
-		got := f.uint64()
-		want := x &^ (1<<(64-prec) - 1) // cut off (round to zero) low 64-prec bits
-		if got != want {
-			t.Errorf("got %#x (%s); want %#x", got, f.Text('p', 0), want)
-		}
-	}
-}
-
-func TestFloatSetInt64(t *testing.T) {
-	for _, want := range []int64{
-		0,
-		1,
-		2,
-		10,
-		100,
-		1<<32 - 1,
-		1 << 32,
-		1<<63 - 1,
-	} {
-		for i := range [2]int{} {
-			if i&1 != 0 {
-				want = -want
-			}
-			var f Float
-			f.SetInt64(want)
-			if got := f.int64(); got != want {
-				t.Errorf("got %#x (%s); want %#x", got, f.Text('p', 0), want)
-			}
-		}
-	}
-
-	// test basic rounding behavior (exhaustive rounding testing is done elsewhere)
-	const x int64 = 0x7654321076543210 // 63 bits needed
-	for prec := uint(1); prec <= 63; prec++ {
-		f := new(Float).SetPrec(prec).SetMode(ToZero).SetInt64(x)
-		got := f.int64()
-		want := x &^ (1<<(63-prec) - 1) // cut off (round to zero) low 63-prec bits
-		if got != want {
-			t.Errorf("got %#x (%s); want %#x", got, f.Text('p', 0), want)
-		}
-	}
-}
-
-func TestFloatSetFloat64(t *testing.T) {
-	for _, want := range []float64{
-		0,
-		1,
-		2,
-		12345,
-		1e10,
-		1e100,
-		3.14159265e10,
-		2.718281828e-123,
-		1.0 / 3,
-		math.MaxFloat32,
-		math.MaxFloat64,
-		math.SmallestNonzeroFloat32,
-		math.SmallestNonzeroFloat64,
-		math.Inf(-1),
-		math.Inf(0),
-		-math.Inf(1),
-	} {
-		for i := range [2]int{} {
-			if i&1 != 0 {
-				want = -want
-			}
-			var f Float
-			f.SetFloat64(want)
-			if got, acc := f.Float64(); got != want || acc != Exact {
-				t.Errorf("got %g (%s, %s); want %g (Exact)", got, f.Text('p', 0), acc, want)
-			}
-		}
-	}
-
-	// test basic rounding behavior (exhaustive rounding testing is done elsewhere)
-	const x uint64 = 0x8765432143218 // 53 bits needed
-	for prec := uint(1); prec <= 52; prec++ {
-		f := new(Float).SetPrec(prec).SetMode(ToZero).SetFloat64(float64(x))
-		got, _ := f.Float64()
-		want := float64(x &^ (1<<(52-prec) - 1)) // cut off (round to zero) low 53-prec bits
-		if got != want {
-			t.Errorf("got %g (%s); want %g", got, f.Text('p', 0), want)
-		}
-	}
-
-	// test NaN
-	defer func() {
-		if p, ok := recover().(ErrNaN); !ok {
-			t.Errorf("got %v; want ErrNaN panic", p)
-		}
-	}()
-	var f Float
-	f.SetFloat64(math.NaN())
-	// should not reach here
-	t.Errorf("got %s; want ErrNaN panic", f.Text('p', 0))
-}
-
-func TestFloatSetInt(t *testing.T) {
-	for _, want := range []string{
-		"0",
-		"1",
-		"-1",
-		"1234567890",
-		"123456789012345678901234567890",
-		"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890",
-	} {
-		var x Int
-		_, ok := x.SetString(want, 0)
-		if !ok {
-			t.Errorf("invalid integer %s", want)
-			continue
-		}
-		n := x.BitLen()
-
-		var f Float
-		f.SetInt(&x)
-
-		// check precision
-		if n < 64 {
-			n = 64
-		}
-		if prec := f.Prec(); prec != uint(n) {
-			t.Errorf("got prec = %d; want %d", prec, n)
-		}
-
-		// check value
-		got := f.Text('g', 100)
-		if got != want {
-			t.Errorf("got %s (%s); want %s", got, f.Text('p', 0), want)
-		}
-	}
-
-	// TODO(gri) test basic rounding behavior
-}
-
-func TestFloatSetRat(t *testing.T) {
-	for _, want := range []string{
-		"0",
-		"1",
-		"-1",
-		"1234567890",
-		"123456789012345678901234567890",
-		"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890",
-		"1.2",
-		"3.14159265",
-		// TODO(gri) expand
-	} {
-		var x Rat
-		_, ok := x.SetString(want)
-		if !ok {
-			t.Errorf("invalid fraction %s", want)
-			continue
-		}
-		n := max(x.Num().BitLen(), x.Denom().BitLen())
-
-		var f1, f2 Float
-		f2.SetPrec(1000)
-		f1.SetRat(&x)
-		f2.SetRat(&x)
-
-		// check precision when set automatically
-		if n < 64 {
-			n = 64
-		}
-		if prec := f1.Prec(); prec != uint(n) {
-			t.Errorf("got prec = %d; want %d", prec, n)
-		}
-
-		got := f2.Text('g', 100)
-		if got != want {
-			t.Errorf("got %s (%s); want %s", got, f2.Text('p', 0), want)
-		}
-	}
-}
-
-func TestFloatSetInf(t *testing.T) {
-	var f Float
-	for _, test := range []struct {
-		signbit bool
-		prec    uint
-		want    string
-	}{
-		{false, 0, "+Inf"},
-		{true, 0, "-Inf"},
-		{false, 10, "+Inf"},
-		{true, 30, "-Inf"},
-	} {
-		x := f.SetPrec(test.prec).SetInf(test.signbit)
-		if got := x.String(); got != test.want || x.Prec() != test.prec {
-			t.Errorf("SetInf(%v) = %s (prec = %d); want %s (prec = %d)", test.signbit, got, x.Prec(), test.want, test.prec)
-		}
-	}
-}
-
-func TestFloatUint64(t *testing.T) {
-	for _, test := range []struct {
-		x   string
-		out uint64
-		acc Accuracy
-	}{
-		{"-Inf", 0, Above},
-		{"-1", 0, Above},
-		{"-1e-1000", 0, Above},
-		{"-0", 0, Exact},
-		{"0", 0, Exact},
-		{"1e-1000", 0, Below},
-		{"1", 1, Exact},
-		{"1.000000000000000000001", 1, Below},
-		{"12345.0", 12345, Exact},
-		{"12345.000000000000000000001", 12345, Below},
-		{"18446744073709551615", 18446744073709551615, Exact},
-		{"18446744073709551615.000000000000000000001", math.MaxUint64, Below},
-		{"18446744073709551616", math.MaxUint64, Below},
-		{"1e10000", math.MaxUint64, Below},
-		{"+Inf", math.MaxUint64, Below},
-	} {
-		x := makeFloat(test.x)
-		out, acc := x.Uint64()
-		if out != test.out || acc != test.acc {
-			t.Errorf("%s: got %d (%s); want %d (%s)", test.x, out, acc, test.out, test.acc)
-		}
-	}
-}
-
-func TestFloatInt64(t *testing.T) {
-	for _, test := range []struct {
-		x   string
-		out int64
-		acc Accuracy
-	}{
-		{"-Inf", math.MinInt64, Above},
-		{"-1e10000", math.MinInt64, Above},
-		{"-9223372036854775809", math.MinInt64, Above},
-		{"-9223372036854775808.000000000000000000001", math.MinInt64, Above},
-		{"-9223372036854775808", -9223372036854775808, Exact},
-		{"-9223372036854775807.000000000000000000001", -9223372036854775807, Above},
-		{"-9223372036854775807", -9223372036854775807, Exact},
-		{"-12345.000000000000000000001", -12345, Above},
-		{"-12345.0", -12345, Exact},
-		{"-1.000000000000000000001", -1, Above},
-		{"-1.5", -1, Above},
-		{"-1", -1, Exact},
-		{"-1e-1000", 0, Above},
-		{"0", 0, Exact},
-		{"1e-1000", 0, Below},
-		{"1", 1, Exact},
-		{"1.000000000000000000001", 1, Below},
-		{"1.5", 1, Below},
-		{"12345.0", 12345, Exact},
-		{"12345.000000000000000000001", 12345, Below},
-		{"9223372036854775807", 9223372036854775807, Exact},
-		{"9223372036854775807.000000000000000000001", math.MaxInt64, Below},
-		{"9223372036854775808", math.MaxInt64, Below},
-		{"1e10000", math.MaxInt64, Below},
-		{"+Inf", math.MaxInt64, Below},
-	} {
-		x := makeFloat(test.x)
-		out, acc := x.Int64()
-		if out != test.out || acc != test.acc {
-			t.Errorf("%s: got %d (%s); want %d (%s)", test.x, out, acc, test.out, test.acc)
-		}
-	}
-}
-
-func TestFloatFloat32(t *testing.T) {
-	for _, test := range []struct {
-		x   string
-		out float32
-		acc Accuracy
-	}{
-		{"0", 0, Exact},
-
-		// underflow
-		{"1e-1000", 0, Below},
-		{"0x0.000002p-127", 0, Below},
-		{"0x.0000010p-126", 0, Below},
-
-		// denormals
-		{"1.401298464e-45", math.SmallestNonzeroFloat32, Above}, // rounded up to smallest denormal
-		{"0x.ffffff8p-149", math.SmallestNonzeroFloat32, Above}, // rounded up to smallest denormal
-		{"0x.0000018p-126", math.SmallestNonzeroFloat32, Above}, // rounded up to smallest denormal
-		{"0x.0000020p-126", math.SmallestNonzeroFloat32, Exact},
-		{"0x.8p-148", math.SmallestNonzeroFloat32, Exact},
-		{"1p-149", math.SmallestNonzeroFloat32, Exact},
-		{"0x.fffffep-126", math.Float32frombits(0x7fffff), Exact}, // largest denormal
-
-		// normals
-		{"0x.ffffffp-126", math.Float32frombits(0x00800000), Above}, // rounded up to smallest normal
-		{"1p-126", math.Float32frombits(0x00800000), Exact},         // smallest normal
-		{"0x1.fffffep-126", math.Float32frombits(0x00ffffff), Exact},
-		{"0x1.ffffffp-126", math.Float32frombits(0x01000000), Above}, // rounded up
-		{"1", 1, Exact},
-		{"1.000000000000000000001", 1, Below},
-		{"12345.0", 12345, Exact},
-		{"12345.000000000000000000001", 12345, Below},
-		{"0x1.fffffe0p127", math.MaxFloat32, Exact},
-		{"0x1.fffffe8p127", math.MaxFloat32, Below},
-
-		// overflow
-		{"0x1.ffffff0p127", float32(math.Inf(+1)), Above},
-		{"0x1p128", float32(math.Inf(+1)), Above},
-		{"1e10000", float32(math.Inf(+1)), Above},
-		{"0x1.ffffff0p2147483646", float32(math.Inf(+1)), Above}, // overflow in rounding
-
-		// inf
-		{"Inf", float32(math.Inf(+1)), Exact},
-	} {
-		for i := 0; i < 2; i++ {
-			// test both signs
-			tx, tout, tacc := test.x, test.out, test.acc
-			if i != 0 {
-				tx = "-" + tx
-				tout = -tout
-				tacc = -tacc
-			}
-
-			// conversion should match strconv where syntax is agreeable
-			if f, err := strconv.ParseFloat(tx, 32); err == nil && !alike32(float32(f), tout) {
-				t.Errorf("%s: got %g; want %g (incorrect test data)", tx, f, tout)
-			}
-
-			x := makeFloat(tx)
-			out, acc := x.Float32()
-			if !alike32(out, tout) || acc != tacc {
-				t.Errorf("%s: got %g (%#x, %s); want %g (%#x, %s)", tx, out, math.Float32bits(out), acc, test.out, math.Float32bits(test.out), tacc)
-			}
-
-			// test that x.SetFloat64(float64(f)).Float32() == f
-			var x2 Float
-			out2, acc2 := x2.SetFloat64(float64(out)).Float32()
-			if !alike32(out2, out) || acc2 != Exact {
-				t.Errorf("idempotency test: got %g (%s); want %g (Exact)", out2, acc2, out)
-			}
-		}
-	}
-}
-
-func TestFloatFloat64(t *testing.T) {
-	const smallestNormalFloat64 = 2.2250738585072014e-308 // 1p-1022
-	for _, test := range []struct {
-		x   string
-		out float64
-		acc Accuracy
-	}{
-		{"0", 0, Exact},
-
-		// underflow
-		{"1e-1000", 0, Below},
-		{"0x0.0000000000001p-1023", 0, Below},
-		{"0x0.00000000000008p-1022", 0, Below},
-
-		// denormals
-		{"0x0.0000000000000cp-1022", math.SmallestNonzeroFloat64, Above}, // rounded up to smallest denormal
-		{"0x0.0000000000001p-1022", math.SmallestNonzeroFloat64, Exact},  // smallest denormal
-		{"0x.8p-1073", math.SmallestNonzeroFloat64, Exact},
-		{"1p-1074", math.SmallestNonzeroFloat64, Exact},
-		{"0x.fffffffffffffp-1022", math.Float64frombits(0x000fffffffffffff), Exact}, // largest denormal
-
-		// normals
-		{"0x.fffffffffffff8p-1022", math.Float64frombits(0x0010000000000000), Above}, // rounded up to smallest normal
-		{"1p-1022", math.Float64frombits(0x0010000000000000), Exact},                 // smallest normal
-		{"1", 1, Exact},
-		{"1.000000000000000000001", 1, Below},
-		{"12345.0", 12345, Exact},
-		{"12345.000000000000000000001", 12345, Below},
-		{"0x1.fffffffffffff0p1023", math.MaxFloat64, Exact},
-		{"0x1.fffffffffffff4p1023", math.MaxFloat64, Below},
-
-		// overflow
-		{"0x1.fffffffffffff8p1023", math.Inf(+1), Above},
-		{"0x1p1024", math.Inf(+1), Above},
-		{"1e10000", math.Inf(+1), Above},
-		{"0x1.fffffffffffff8p2147483646", math.Inf(+1), Above}, // overflow in rounding
-		{"Inf", math.Inf(+1), Exact},
-
-		// selected denormalized values that were handled incorrectly in the past
-		{"0x.fffffffffffffp-1022", smallestNormalFloat64 - math.SmallestNonzeroFloat64, Exact},
-		{"4503599627370495p-1074", smallestNormalFloat64 - math.SmallestNonzeroFloat64, Exact},
-
-		// http://www.exploringbinary.com/php-hangs-on-numeric-value-2-2250738585072011e-308/
-		{"2.2250738585072011e-308", 2.225073858507201e-308, Below},
-		// http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
-		{"2.2250738585072012e-308", 2.2250738585072014e-308, Above},
-	} {
-		for i := 0; i < 2; i++ {
-			// test both signs
-			tx, tout, tacc := test.x, test.out, test.acc
-			if i != 0 {
-				tx = "-" + tx
-				tout = -tout
-				tacc = -tacc
-			}
-
-			// conversion should match strconv where syntax is agreeable
-			if f, err := strconv.ParseFloat(tx, 64); err == nil && !alike64(f, tout) {
-				t.Errorf("%s: got %g; want %g (incorrect test data)", tx, f, tout)
-			}
-
-			x := makeFloat(tx)
-			out, acc := x.Float64()
-			if !alike64(out, tout) || acc != tacc {
-				t.Errorf("%s: got %g (%#x, %s); want %g (%#x, %s)", tx, out, math.Float64bits(out), acc, test.out, math.Float64bits(test.out), tacc)
-			}
-
-			// test that x.SetFloat64(f).Float64() == f
-			var x2 Float
-			out2, acc2 := x2.SetFloat64(out).Float64()
-			if !alike64(out2, out) || acc2 != Exact {
-				t.Errorf("idempotency test: got %g (%s); want %g (Exact)", out2, acc2, out)
-			}
-		}
-	}
-}
-
-func TestFloatInt(t *testing.T) {
-	for _, test := range []struct {
-		x    string
-		want string
-		acc  Accuracy
-	}{
-		{"0", "0", Exact},
-		{"+0", "0", Exact},
-		{"-0", "0", Exact},
-		{"Inf", "nil", Below},
-		{"+Inf", "nil", Below},
-		{"-Inf", "nil", Above},
-		{"1", "1", Exact},
-		{"-1", "-1", Exact},
-		{"1.23", "1", Below},
-		{"-1.23", "-1", Above},
-		{"123e-2", "1", Below},
-		{"123e-3", "0", Below},
-		{"123e-4", "0", Below},
-		{"1e-1000", "0", Below},
-		{"-1e-1000", "0", Above},
-		{"1e+10", "10000000000", Exact},
-		{"1e+100", "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", Exact},
-	} {
-		x := makeFloat(test.x)
-		res, acc := x.Int(nil)
-		got := "nil"
-		if res != nil {
-			got = res.String()
-		}
-		if got != test.want || acc != test.acc {
-			t.Errorf("%s: got %s (%s); want %s (%s)", test.x, got, acc, test.want, test.acc)
-		}
-	}
-
-	// check that supplied *Int is used
-	for _, f := range []string{"0", "1", "-1", "1234"} {
-		x := makeFloat(f)
-		i := new(Int)
-		if res, _ := x.Int(i); res != i {
-			t.Errorf("(%s).Int is not using supplied *Int", f)
-		}
-	}
-}
-
-func TestFloatRat(t *testing.T) {
-	for _, test := range []struct {
-		x, want string
-		acc     Accuracy
-	}{
-		{"0", "0/1", Exact},
-		{"+0", "0/1", Exact},
-		{"-0", "0/1", Exact},
-		{"Inf", "nil", Below},
-		{"+Inf", "nil", Below},
-		{"-Inf", "nil", Above},
-		{"1", "1/1", Exact},
-		{"-1", "-1/1", Exact},
-		{"1.25", "5/4", Exact},
-		{"-1.25", "-5/4", Exact},
-		{"1e10", "10000000000/1", Exact},
-		{"1p10", "1024/1", Exact},
-		{"-1p-10", "-1/1024", Exact},
-		{"3.14159265", "7244019449799623199/2305843009213693952", Exact},
-	} {
-		x := makeFloat(test.x).SetPrec(64)
-		res, acc := x.Rat(nil)
-		got := "nil"
-		if res != nil {
-			got = res.String()
-		}
-		if got != test.want {
-			t.Errorf("%s: got %s; want %s", test.x, got, test.want)
-			continue
-		}
-		if acc != test.acc {
-			t.Errorf("%s: got %s; want %s", test.x, acc, test.acc)
-			continue
-		}
-
-		// inverse conversion
-		if res != nil {
-			got := new(Float).SetPrec(64).SetRat(res)
-			if got.Cmp(x) != 0 {
-				t.Errorf("%s: got %s; want %s", test.x, got, x)
-			}
-		}
-	}
-
-	// check that supplied *Rat is used
-	for _, f := range []string{"0", "1", "-1", "1234"} {
-		x := makeFloat(f)
-		r := new(Rat)
-		if res, _ := x.Rat(r); res != r {
-			t.Errorf("(%s).Rat is not using supplied *Rat", f)
-		}
-	}
-}
-
-func TestFloatAbs(t *testing.T) {
-	for _, test := range []string{
-		"0",
-		"1",
-		"1234",
-		"1.23e-2",
-		"1e-1000",
-		"1e1000",
-		"Inf",
-	} {
-		p := makeFloat(test)
-		a := new(Float).Abs(p)
-		if !alike(a, p) {
-			t.Errorf("%s: got %s; want %s", test, a.Text('g', 10), test)
-		}
-
-		n := makeFloat("-" + test)
-		a.Abs(n)
-		if !alike(a, p) {
-			t.Errorf("-%s: got %s; want %s", test, a.Text('g', 10), test)
-		}
-	}
-}
-
-func TestFloatNeg(t *testing.T) {
-	for _, test := range []string{
-		"0",
-		"1",
-		"1234",
-		"1.23e-2",
-		"1e-1000",
-		"1e1000",
-		"Inf",
-	} {
-		p1 := makeFloat(test)
-		n1 := makeFloat("-" + test)
-		n2 := new(Float).Neg(p1)
-		p2 := new(Float).Neg(n2)
-		if !alike(n2, n1) {
-			t.Errorf("%s: got %s; want %s", test, n2.Text('g', 10), n1.Text('g', 10))
-		}
-		if !alike(p2, p1) {
-			t.Errorf("%s: got %s; want %s", test, p2.Text('g', 10), p1.Text('g', 10))
-		}
-	}
-}
-
-func TestFloatInc(t *testing.T) {
-	const n = 10
-	for _, prec := range precList {
-		if 1<<prec < n {
-			continue // prec must be large enough to hold all numbers from 0 to n
-		}
-		var x, one Float
-		x.SetPrec(prec)
-		one.SetInt64(1)
-		for i := 0; i < n; i++ {
-			x.Add(&x, &one)
-		}
-		if x.Cmp(new(Float).SetInt64(n)) != 0 {
-			t.Errorf("prec = %d: got %s; want %d", prec, &x, n)
-		}
-	}
-}
-
-// Selected precisions with which to run various tests.
-var precList = [...]uint{1, 2, 5, 8, 10, 16, 23, 24, 32, 50, 53, 64, 100, 128, 500, 511, 512, 513, 1000, 10000}
-
-// Selected bits with which to run various tests.
-// Each entry is a list of bits representing a floating-point number (see fromBits).
-var bitsList = [...]Bits{
-	{},           // = 0
-	{0},          // = 1
-	{1},          // = 2
-	{-1},         // = 1/2
-	{10},         // = 2**10 == 1024
-	{-10},        // = 2**-10 == 1/1024
-	{100, 10, 1}, // = 2**100 + 2**10 + 2**1
-	{0, -1, -2, -10},
-	// TODO(gri) add more test cases
-}
-
-// TestFloatAdd tests Float.Add/Sub by comparing the result of a "manual"
-// addition/subtraction of arguments represented by Bits values with the
-// respective Float addition/subtraction for a variety of precisions
-// and rounding modes.
-func TestFloatAdd(t *testing.T) {
-	for _, xbits := range bitsList {
-		for _, ybits := range bitsList {
-			// exact values
-			x := xbits.Float()
-			y := ybits.Float()
-			zbits := xbits.add(ybits)
-			z := zbits.Float()
-
-			for i, mode := range [...]RoundingMode{ToZero, ToNearestEven, AwayFromZero} {
-				for _, prec := range precList {
-					got := new(Float).SetPrec(prec).SetMode(mode)
-					got.Add(x, y)
-					want := zbits.round(prec, mode)
-					if got.Cmp(want) != 0 {
-						t.Errorf("i = %d, prec = %d, %s:\n\t     %s %v\n\t+    %s %v\n\t=    %s\n\twant %s",
-							i, prec, mode, x, xbits, y, ybits, got, want)
-					}
-
-					got.Sub(z, x)
-					want = ybits.round(prec, mode)
-					if got.Cmp(want) != 0 {
-						t.Errorf("i = %d, prec = %d, %s:\n\t     %s %v\n\t-    %s %v\n\t=    %s\n\twant %s",
-							i, prec, mode, z, zbits, x, xbits, got, want)
-					}
-				}
-			}
-		}
-	}
-}
-
-// TestFloatAdd32 tests that Float.Add/Sub of numbers with
-// 24bit mantissa behaves like float32 addition/subtraction
-// (excluding denormal numbers).
-func TestFloatAdd32(t *testing.T) {
-	// chose base such that we cross the mantissa precision limit
-	const base = 1<<26 - 0x10 // 11...110000 (26 bits)
-	for d := 0; d <= 0x10; d++ {
-		for i := range [2]int{} {
-			x0, y0 := float64(base), float64(d)
-			if i&1 != 0 {
-				x0, y0 = y0, x0
-			}
-
-			x := NewFloat(x0)
-			y := NewFloat(y0)
-			z := new(Float).SetPrec(24)
-
-			z.Add(x, y)
-			got, acc := z.Float32()
-			want := float32(y0) + float32(x0)
-			if got != want || acc != Exact {
-				t.Errorf("d = %d: %g + %g = %g (%s); want %g (Exact)", d, x0, y0, got, acc, want)
-			}
-
-			z.Sub(z, y)
-			got, acc = z.Float32()
-			want = float32(want) - float32(y0)
-			if got != want || acc != Exact {
-				t.Errorf("d = %d: %g - %g = %g (%s); want %g (Exact)", d, x0+y0, y0, got, acc, want)
-			}
-		}
-	}
-}
-
-// TestFloatAdd64 tests that Float.Add/Sub of numbers with
-// 53bit mantissa behaves like float64 addition/subtraction.
-func TestFloatAdd64(t *testing.T) {
-	// chose base such that we cross the mantissa precision limit
-	const base = 1<<55 - 0x10 // 11...110000 (55 bits)
-	for d := 0; d <= 0x10; d++ {
-		for i := range [2]int{} {
-			x0, y0 := float64(base), float64(d)
-			if i&1 != 0 {
-				x0, y0 = y0, x0
-			}
-
-			x := NewFloat(x0)
-			y := NewFloat(y0)
-			z := new(Float).SetPrec(53)
-
-			z.Add(x, y)
-			got, acc := z.Float64()
-			want := x0 + y0
-			if got != want || acc != Exact {
-				t.Errorf("d = %d: %g + %g = %g (%s); want %g (Exact)", d, x0, y0, got, acc, want)
-			}
-
-			z.Sub(z, y)
-			got, acc = z.Float64()
-			want -= y0
-			if got != want || acc != Exact {
-				t.Errorf("d = %d: %g - %g = %g (%s); want %g (Exact)", d, x0+y0, y0, got, acc, want)
-			}
-		}
-	}
-}
-
-// TestFloatMul tests Float.Mul/Quo by comparing the result of a "manual"
-// multiplication/division of arguments represented by Bits values with the
-// respective Float multiplication/division for a variety of precisions
-// and rounding modes.
-func TestFloatMul(t *testing.T) {
-	for _, xbits := range bitsList {
-		for _, ybits := range bitsList {
-			// exact values
-			x := xbits.Float()
-			y := ybits.Float()
-			zbits := xbits.mul(ybits)
-			z := zbits.Float()
-
-			for i, mode := range [...]RoundingMode{ToZero, ToNearestEven, AwayFromZero} {
-				for _, prec := range precList {
-					got := new(Float).SetPrec(prec).SetMode(mode)
-					got.Mul(x, y)
-					want := zbits.round(prec, mode)
-					if got.Cmp(want) != 0 {
-						t.Errorf("i = %d, prec = %d, %s:\n\t     %s %v\n\t*    %s %v\n\t=    %s\n\twant %s",
-							i, prec, mode, x, xbits, y, ybits, got, want)
-					}
-
-					if x.Sign() == 0 {
-						continue // ignore div-0 case (not invertable)
-					}
-					got.Quo(z, x)
-					want = ybits.round(prec, mode)
-					if got.Cmp(want) != 0 {
-						t.Errorf("i = %d, prec = %d, %s:\n\t     %s %v\n\t/    %s %v\n\t=    %s\n\twant %s",
-							i, prec, mode, z, zbits, x, xbits, got, want)
-					}
-				}
-			}
-		}
-	}
-}
-
-// TestFloatMul64 tests that Float.Mul/Quo of numbers with
-// 53bit mantissa behaves like float64 multiplication/division.
-func TestFloatMul64(t *testing.T) {
-	for _, test := range []struct {
-		x, y float64
-	}{
-		{0, 0},
-		{0, 1},
-		{1, 1},
-		{1, 1.5},
-		{1.234, 0.5678},
-		{2.718281828, 3.14159265358979},
-		{2.718281828e10, 3.14159265358979e-32},
-		{1.0 / 3, 1e200},
-	} {
-		for i := range [8]int{} {
-			x0, y0 := test.x, test.y
-			if i&1 != 0 {
-				x0 = -x0
-			}
-			if i&2 != 0 {
-				y0 = -y0
-			}
-			if i&4 != 0 {
-				x0, y0 = y0, x0
-			}
-
-			x := NewFloat(x0)
-			y := NewFloat(y0)
-			z := new(Float).SetPrec(53)
-
-			z.Mul(x, y)
-			got, _ := z.Float64()
-			want := x0 * y0
-			if got != want {
-				t.Errorf("%g * %g = %g; want %g", x0, y0, got, want)
-			}
-
-			if y0 == 0 {
-				continue // avoid division-by-zero
-			}
-			z.Quo(z, y)
-			got, _ = z.Float64()
-			want /= y0
-			if got != want {
-				t.Errorf("%g / %g = %g; want %g", x0*y0, y0, got, want)
-			}
-		}
-	}
-}
-
-func TestIssue6866(t *testing.T) {
-	for _, prec := range precList {
-		two := new(Float).SetPrec(prec).SetInt64(2)
-		one := new(Float).SetPrec(prec).SetInt64(1)
-		three := new(Float).SetPrec(prec).SetInt64(3)
-		msix := new(Float).SetPrec(prec).SetInt64(-6)
-		psix := new(Float).SetPrec(prec).SetInt64(+6)
-
-		p := new(Float).SetPrec(prec)
-		z1 := new(Float).SetPrec(prec)
-		z2 := new(Float).SetPrec(prec)
-
-		// z1 = 2 + 1.0/3*-6
-		p.Quo(one, three)
-		p.Mul(p, msix)
-		z1.Add(two, p)
-
-		// z2 = 2 - 1.0/3*+6
-		p.Quo(one, three)
-		p.Mul(p, psix)
-		z2.Sub(two, p)
-
-		if z1.Cmp(z2) != 0 {
-			t.Fatalf("prec %d: got z1 = %s != z2 = %s; want z1 == z2\n", prec, z1, z2)
-		}
-		if z1.Sign() != 0 {
-			t.Errorf("prec %d: got z1 = %s; want 0", prec, z1)
-		}
-		if z2.Sign() != 0 {
-			t.Errorf("prec %d: got z2 = %s; want 0", prec, z2)
-		}
-	}
-}
-
-func TestFloatQuo(t *testing.T) {
-	// TODO(gri) make the test vary these precisions
-	preci := 200 // precision of integer part
-	precf := 20  // precision of fractional part
-
-	for i := 0; i < 8; i++ {
-		// compute accurate (not rounded) result z
-		bits := Bits{preci - 1}
-		if i&3 != 0 {
-			bits = append(bits, 0)
-		}
-		if i&2 != 0 {
-			bits = append(bits, -1)
-		}
-		if i&1 != 0 {
-			bits = append(bits, -precf)
-		}
-		z := bits.Float()
-
-		// compute accurate x as z*y
-		y := NewFloat(3.14159265358979323e123)
-
-		x := new(Float).SetPrec(z.Prec() + y.Prec()).SetMode(ToZero)
-		x.Mul(z, y)
-
-		// leave for debugging
-		// fmt.Printf("x = %s\ny = %s\nz = %s\n", x, y, z)
-
-		if got := x.Acc(); got != Exact {
-			t.Errorf("got acc = %s; want exact", got)
-		}
-
-		// round accurate z for a variety of precisions and
-		// modes and compare against result of x / y.
-		for _, mode := range [...]RoundingMode{ToZero, ToNearestEven, AwayFromZero} {
-			for d := -5; d < 5; d++ {
-				prec := uint(preci + d)
-				got := new(Float).SetPrec(prec).SetMode(mode).Quo(x, y)
-				want := bits.round(prec, mode)
-				if got.Cmp(want) != 0 {
-					t.Errorf("i = %d, prec = %d, %s:\n\t     %s\n\t/    %s\n\t=    %s\n\twant %s",
-						i, prec, mode, x, y, got, want)
-				}
-			}
-		}
-	}
-}
-
-// TestFloatQuoSmoke tests all divisions x/y for values x, y in the range [-n, +n];
-// it serves as a smoke test for basic correctness of division.
-func TestFloatQuoSmoke(t *testing.T) {
-	n := 1000
-	if testing.Short() {
-		n = 10
-	}
-
-	const dprec = 3         // max. precision variation
-	const prec = 10 + dprec // enough bits to hold n precisely
-	for x := -n; x <= n; x++ {
-		for y := -n; y < n; y++ {
-			if y == 0 {
-				continue
-			}
-
-			a := float64(x)
-			b := float64(y)
-			c := a / b
-
-			// vary operand precision (only ok as long as a, b can be represented correctly)
-			for ad := -dprec; ad <= dprec; ad++ {
-				for bd := -dprec; bd <= dprec; bd++ {
-					A := new(Float).SetPrec(uint(prec + ad)).SetFloat64(a)
-					B := new(Float).SetPrec(uint(prec + bd)).SetFloat64(b)
-					C := new(Float).SetPrec(53).Quo(A, B) // C has float64 mantissa width
-
-					cc, acc := C.Float64()
-					if cc != c {
-						t.Errorf("%g/%g = %s; want %.5g\n", a, b, C.Text('g', 5), c)
-						continue
-					}
-					if acc != Exact {
-						t.Errorf("%g/%g got %s result; want exact result", a, b, acc)
-					}
-				}
-			}
-		}
-	}
-}
-
-// TestFloatArithmeticSpecialValues tests that Float operations produce the
-// correct results for combinations of zero (±0), finite (±1 and ±2.71828),
-// and infinite (±Inf) operands.
-func TestFloatArithmeticSpecialValues(t *testing.T) {
-	zero := 0.0
-	args := []float64{math.Inf(-1), -2.71828, -1, -zero, zero, 1, 2.71828, math.Inf(1)}
-	xx := new(Float)
-	yy := new(Float)
-	got := new(Float)
-	want := new(Float)
-	for i := 0; i < 4; i++ {
-		for _, x := range args {
-			xx.SetFloat64(x)
-			// check conversion is correct
-			// (no need to do this for y, since we see exactly the
-			// same values there)
-			if got, acc := xx.Float64(); got != x || acc != Exact {
-				t.Errorf("Float(%g) == %g (%s)", x, got, acc)
-			}
-			for _, y := range args {
-				yy.SetFloat64(y)
-				var (
-					op string
-					z  float64
-					f  func(z, x, y *Float) *Float
-				)
-				switch i {
-				case 0:
-					op = "+"
-					z = x + y
-					f = (*Float).Add
-				case 1:
-					op = "-"
-					z = x - y
-					f = (*Float).Sub
-				case 2:
-					op = "*"
-					z = x * y
-					f = (*Float).Mul
-				case 3:
-					op = "/"
-					z = x / y
-					f = (*Float).Quo
-				default:
-					panic("unreachable")
-				}
-				var errnan bool // set if execution of f panicked with ErrNaN
-				// protect execution of f
-				func() {
-					defer func() {
-						if p := recover(); p != nil {
-							_ = p.(ErrNaN) // re-panic if not ErrNaN
-							errnan = true
-						}
-					}()
-					f(got, xx, yy)
-				}()
-				if math.IsNaN(z) {
-					if !errnan {
-						t.Errorf("%5g %s %5g = %5s; want ErrNaN panic", x, op, y, got)
-					}
-					continue
-				}
-				if errnan {
-					t.Errorf("%5g %s %5g panicked with ErrNan; want %5s", x, op, y, want)
-					continue
-				}
-				want.SetFloat64(z)
-				if !alike(got, want) {
-					t.Errorf("%5g %s %5g = %5s; want %5s", x, op, y, got, want)
-				}
-			}
-		}
-	}
-}
-
-func TestFloatArithmeticOverflow(t *testing.T) {
-	for _, test := range []struct {
-		prec       uint
-		mode       RoundingMode
-		op         byte
-		x, y, want string
-		acc        Accuracy
-	}{
-		{4, ToNearestEven, '+', "0", "0", "0", Exact},                   // smoke test
-		{4, ToNearestEven, '+', "0x.8p+0", "0x.8p+0", "0x.8p+1", Exact}, // smoke test
-
-		{4, ToNearestEven, '+', "0", "0x.8p2147483647", "0x.8p+2147483647", Exact},
-		{4, ToNearestEven, '+', "0x.8p2147483500", "0x.8p2147483647", "0x.8p+2147483647", Below}, // rounded to zero
-		{4, ToNearestEven, '+', "0x.8p2147483647", "0x.8p2147483647", "+Inf", Above},             // exponent overflow in +
-		{4, ToNearestEven, '+', "-0x.8p2147483647", "-0x.8p2147483647", "-Inf", Below},           // exponent overflow in +
-		{4, ToNearestEven, '-', "-0x.8p2147483647", "0x.8p2147483647", "-Inf", Below},            // exponent overflow in -
-
-		{4, ToZero, '+', "0x.fp2147483647", "0x.8p2147483643", "0x.fp+2147483647", Below}, // rounded to zero
-		{4, ToNearestEven, '+', "0x.fp2147483647", "0x.8p2147483643", "+Inf", Above},      // exponent overflow in rounding
-		{4, AwayFromZero, '+', "0x.fp2147483647", "0x.8p2147483643", "+Inf", Above},       // exponent overflow in rounding
-
-		{4, AwayFromZero, '-', "-0x.fp2147483647", "0x.8p2147483644", "-Inf", Below},        // exponent overflow in rounding
-		{4, ToNearestEven, '-', "-0x.fp2147483647", "0x.8p2147483643", "-Inf", Below},       // exponent overflow in rounding
-		{4, ToZero, '-', "-0x.fp2147483647", "0x.8p2147483643", "-0x.fp+2147483647", Above}, // rounded to zero
-
-		{4, ToNearestEven, '+', "0", "0x.8p-2147483648", "0x.8p-2147483648", Exact},
-		{4, ToNearestEven, '+', "0x.8p-2147483648", "0x.8p-2147483648", "0x.8p-2147483647", Exact},
-
-		{4, ToNearestEven, '*', "1", "0x.8p2147483647", "0x.8p+2147483647", Exact},
-		{4, ToNearestEven, '*', "2", "0x.8p2147483647", "+Inf", Above},  // exponent overflow in *
-		{4, ToNearestEven, '*', "-2", "0x.8p2147483647", "-Inf", Below}, // exponent overflow in *
-
-		{4, ToNearestEven, '/', "0.5", "0x.8p2147483647", "0x.8p-2147483646", Exact},
-		{4, ToNearestEven, '/', "0x.8p+0", "0x.8p2147483647", "0x.8p-2147483646", Exact},
-		{4, ToNearestEven, '/', "0x.8p-1", "0x.8p2147483647", "0x.8p-2147483647", Exact},
-		{4, ToNearestEven, '/', "0x.8p-2", "0x.8p2147483647", "0x.8p-2147483648", Exact},
-		{4, ToNearestEven, '/', "0x.8p-3", "0x.8p2147483647", "0", Below}, // exponent underflow in /
-	} {
-		x := makeFloat(test.x)
-		y := makeFloat(test.y)
-		z := new(Float).SetPrec(test.prec).SetMode(test.mode)
-		switch test.op {
-		case '+':
-			z.Add(x, y)
-		case '-':
-			z.Sub(x, y)
-		case '*':
-			z.Mul(x, y)
-		case '/':
-			z.Quo(x, y)
-		default:
-			panic("unreachable")
-		}
-		if got := z.Text('p', 0); got != test.want || z.Acc() != test.acc {
-			t.Errorf(
-				"prec = %d (%s): %s %c %s = %s (%s); want %s (%s)",
-				test.prec, test.mode, x.Text('p', 0), test.op, y.Text('p', 0), got, z.Acc(), test.want, test.acc,
-			)
-		}
-	}
-}
-
-// TODO(gri) Add tests that check correctness in the presence of aliasing.
-
-// For rounding modes ToNegativeInf and ToPositiveInf, rounding is affected
-// by the sign of the value to be rounded. Test that rounding happens after
-// the sign of a result has been set.
-// This test uses specific values that are known to fail if rounding is
-// "factored" out before setting the result sign.
-func TestFloatArithmeticRounding(t *testing.T) {
-	for _, test := range []struct {
-		mode       RoundingMode
-		prec       uint
-		x, y, want int64
-		op         byte
-	}{
-		{ToZero, 3, -0x8, -0x1, -0x8, '+'},
-		{AwayFromZero, 3, -0x8, -0x1, -0xa, '+'},
-		{ToNegativeInf, 3, -0x8, -0x1, -0xa, '+'},
-
-		{ToZero, 3, -0x8, 0x1, -0x8, '-'},
-		{AwayFromZero, 3, -0x8, 0x1, -0xa, '-'},
-		{ToNegativeInf, 3, -0x8, 0x1, -0xa, '-'},
-
-		{ToZero, 3, -0x9, 0x1, -0x8, '*'},
-		{AwayFromZero, 3, -0x9, 0x1, -0xa, '*'},
-		{ToNegativeInf, 3, -0x9, 0x1, -0xa, '*'},
-
-		{ToZero, 3, -0x9, 0x1, -0x8, '/'},
-		{AwayFromZero, 3, -0x9, 0x1, -0xa, '/'},
-		{ToNegativeInf, 3, -0x9, 0x1, -0xa, '/'},
-	} {
-		var x, y, z Float
-		x.SetInt64(test.x)
-		y.SetInt64(test.y)
-		z.SetPrec(test.prec).SetMode(test.mode)
-		switch test.op {
-		case '+':
-			z.Add(&x, &y)
-		case '-':
-			z.Sub(&x, &y)
-		case '*':
-			z.Mul(&x, &y)
-		case '/':
-			z.Quo(&x, &y)
-		default:
-			panic("unreachable")
-		}
-		if got, acc := z.Int64(); got != test.want || acc != Exact {
-			t.Errorf("%s, %d bits: %d %c %d = %d (%s); want %d (Exact)",
-				test.mode, test.prec, test.x, test.op, test.y, got, acc, test.want,
-			)
-		}
-	}
-}
-
-// TestFloatCmpSpecialValues tests that Cmp produces the correct results for
-// combinations of zero (±0), finite (±1 and ±2.71828), and infinite (±Inf)
-// operands.
-func TestFloatCmpSpecialValues(t *testing.T) {
-	zero := 0.0
-	args := []float64{math.Inf(-1), -2.71828, -1, -zero, zero, 1, 2.71828, math.Inf(1)}
-	xx := new(Float)
-	yy := new(Float)
-	for i := 0; i < 4; i++ {
-		for _, x := range args {
-			xx.SetFloat64(x)
-			// check conversion is correct
-			// (no need to do this for y, since we see exactly the
-			// same values there)
-			if got, acc := xx.Float64(); got != x || acc != Exact {
-				t.Errorf("Float(%g) == %g (%s)", x, got, acc)
-			}
-			for _, y := range args {
-				yy.SetFloat64(y)
-				got := xx.Cmp(yy)
-				want := 0
-				switch {
-				case x < y:
-					want = -1
-				case x > y:
-					want = +1
-				}
-				if got != want {
-					t.Errorf("(%g).Cmp(%g) = %v; want %v", x, y, got, want)
-				}
-			}
-		}
-	}
-}
diff --git a/src/cmd/compile/internal/big/floatconv.go b/src/cmd/compile/internal/big/floatconv.go
deleted file mode 100644
index 4a070ca..0000000
--- a/src/cmd/compile/internal/big/floatconv.go
+++ /dev/null
@@ -1,239 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements string-to-Float conversion functions.
-
-package big
-
-import (
-	"fmt"
-	"io"
-	"strings"
-)
-
-// SetString sets z to the value of s and returns z and a boolean indicating
-// success. s must be a floating-point number of the same format as accepted
-// by Parse, with base argument 0.
-func (z *Float) SetString(s string) (*Float, bool) {
-	if f, _, err := z.Parse(s, 0); err == nil {
-		return f, true
-	}
-	return nil, false
-}
-
-// scan is like Parse but reads the longest possible prefix representing a valid
-// floating point number from an io.ByteScanner rather than a string. It serves
-// as the implementation of Parse. It does not recognize ±Inf and does not expect
-// EOF at the end.
-func (z *Float) scan(r io.ByteScanner, base int) (f *Float, b int, err error) {
-	prec := z.prec
-	if prec == 0 {
-		prec = 64
-	}
-
-	// A reasonable value in case of an error.
-	z.form = zero
-
-	// sign
-	z.neg, err = scanSign(r)
-	if err != nil {
-		return
-	}
-
-	// mantissa
-	var fcount int // fractional digit count; valid if <= 0
-	z.mant, b, fcount, err = z.mant.scan(r, base, true)
-	if err != nil {
-		return
-	}
-
-	// exponent
-	var exp int64
-	var ebase int
-	exp, ebase, err = scanExponent(r, true)
-	if err != nil {
-		return
-	}
-
-	// special-case 0
-	if len(z.mant) == 0 {
-		z.prec = prec
-		z.acc = Exact
-		z.form = zero
-		f = z
-		return
-	}
-	// len(z.mant) > 0
-
-	// The mantissa may have a decimal point (fcount <= 0) and there
-	// may be a nonzero exponent exp. The decimal point amounts to a
-	// division by b**(-fcount). An exponent means multiplication by
-	// ebase**exp. Finally, mantissa normalization (shift left) requires
-	// a correcting multiplication by 2**(-shiftcount). Multiplications
-	// are commutative, so we can apply them in any order as long as there
-	// is no loss of precision. We only have powers of 2 and 10; keep
-	// track via separate exponents exp2 and exp10.
-
-	// normalize mantissa and get initial binary exponent
-	var exp2 = int64(len(z.mant))*_W - fnorm(z.mant)
-
-	// determine binary or decimal exponent contribution of decimal point
-	var exp10 int64
-	if fcount < 0 {
-		// The mantissa has a "decimal" point ddd.dddd; and
-		// -fcount is the number of digits to the right of '.'.
-		// Adjust relevant exponent accodingly.
-		switch b {
-		case 16:
-			fcount *= 4 // hexadecimal digits are 4 bits each
-			fallthrough
-		case 2:
-			exp2 += int64(fcount)
-		default: // b == 10
-			exp10 = int64(fcount)
-		}
-		// we don't need fcount anymore
-	}
-
-	// take actual exponent into account
-	if ebase == 2 {
-		exp2 += exp
-	} else { // ebase == 10
-		exp10 += exp
-	}
-	// we don't need exp anymore
-
-	// apply 2**exp2
-	if MinExp <= exp2 && exp2 <= MaxExp {
-		z.prec = prec
-		z.form = finite
-		z.exp = int32(exp2)
-		f = z
-	} else {
-		err = fmt.Errorf("exponent overflow")
-		return
-	}
-
-	if exp10 == 0 {
-		// no decimal exponent to consider
-		z.round(0)
-		return
-	}
-	// exp10 != 0
-
-	// apply 10**exp10
-	p := new(Float).SetPrec(z.Prec() + 64) // use more bits for p -- TODO(gri) what is the right number?
-	if exp10 < 0 {
-		z.uquo(z, p.pow10(-exp10))
-	} else {
-		z.umul(z, p.pow10(exp10))
-	}
-
-	return
-}
-
-// These powers of 10 can be represented exactly as a float64.
-var pow10tab = [...]float64{
-	1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9,
-	1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19,
-}
-
-// pow10 sets z to 10**n and returns z.
-// n must not be negative.
-func (z *Float) pow10(n int64) *Float {
-	if n < 0 {
-		panic("pow10 called with negative argument")
-	}
-
-	const m = int64(len(pow10tab) - 1)
-	if n <= m {
-		return z.SetFloat64(pow10tab[n])
-	}
-	// n > m
-
-	z.SetFloat64(pow10tab[m])
-	n -= m
-
-	// use more bits for f than for z
-	// TODO(gri) what is the right number?
-	f := new(Float).SetPrec(z.Prec() + 64).SetInt64(10)
-
-	for n > 0 {
-		if n&1 != 0 {
-			z.Mul(z, f)
-		}
-		f.Mul(f, f)
-		n >>= 1
-	}
-
-	return z
-}
-
-// Parse parses s which must contain a text representation of a floating-
-// point number with a mantissa in the given conversion base (the exponent
-// is always a decimal number), or a string representing an infinite value.
-//
-// It sets z to the (possibly rounded) value of the corresponding floating-
-// point value, and returns z, the actual base b, and an error err, if any.
-// If z's precision is 0, it is changed to 64 before rounding takes effect.
-// The number must be of the form:
-//
-//	number   = [ sign ] [ prefix ] mantissa [ exponent ] | infinity .
-//	sign     = "+" | "-" .
-//      prefix   = "0" ( "x" | "X" | "b" | "B" ) .
-//	mantissa = digits | digits "." [ digits ] | "." digits .
-//	exponent = ( "E" | "e" | "p" ) [ sign ] digits .
-//	digits   = digit { digit } .
-//	digit    = "0" ... "9" | "a" ... "z" | "A" ... "Z" .
-//      infinity = [ sign ] ( "inf" | "Inf" ) .
-//
-// The base argument must be 0, 2, 10, or 16. Providing an invalid base
-// argument will lead to a run-time panic.
-//
-// For base 0, the number prefix determines the actual base: A prefix of
-// "0x" or "0X" selects base 16, and a "0b" or "0B" prefix selects
-// base 2; otherwise, the actual base is 10 and no prefix is accepted.
-// The octal prefix "0" is not supported (a leading "0" is simply
-// considered a "0").
-//
-// A "p" exponent indicates a binary (rather then decimal) exponent;
-// for instance "0x1.fffffffffffffp1023" (using base 0) represents the
-// maximum float64 value. For hexadecimal mantissae, the exponent must
-// be binary, if present (an "e" or "E" exponent indicator cannot be
-// distinguished from a mantissa digit).
-//
-// The returned *Float f is nil and the value of z is valid but not
-// defined if an error is reported.
-//
-func (z *Float) Parse(s string, base int) (f *Float, b int, err error) {
-	// scan doesn't handle ±Inf
-	if len(s) == 3 && (s == "Inf" || s == "inf") {
-		f = z.SetInf(false)
-		return
-	}
-	if len(s) == 4 && (s[0] == '+' || s[0] == '-') && (s[1:] == "Inf" || s[1:] == "inf") {
-		f = z.SetInf(s[0] == '-')
-		return
-	}
-
-	r := strings.NewReader(s)
-	if f, b, err = z.scan(r, base); err != nil {
-		return
-	}
-
-	// entire string must have been consumed
-	if ch, err2 := r.ReadByte(); err2 == nil {
-		err = fmt.Errorf("expected end of string, found %q", ch)
-	} else if err2 != io.EOF {
-		err = err2
-	}
-
-	return
-}
-
-// ParseFloat is like f.Parse(s, base) with f set to the given precision
-// and rounding mode.
-func ParseFloat(s string, base int, prec uint, mode RoundingMode) (f *Float, b int, err error) {
-	return new(Float).SetPrec(prec).SetMode(mode).Parse(s, base)
-}
diff --git a/src/cmd/compile/internal/big/floatconv_test.go b/src/cmd/compile/internal/big/floatconv_test.go
deleted file mode 100644
index 4f23953..0000000
--- a/src/cmd/compile/internal/big/floatconv_test.go
+++ /dev/null
@@ -1,573 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package big
-
-import (
-	"fmt"
-	"math"
-	"strconv"
-	"testing"
-)
-
-func TestFloatSetFloat64String(t *testing.T) {
-	inf := math.Inf(0)
-	nan := math.NaN()
-
-	for _, test := range []struct {
-		s string
-		x float64 // NaNs represent invalid inputs
-	}{
-		// basics
-		{"0", 0},
-		{"-0", -0},
-		{"+0", 0},
-		{"1", 1},
-		{"-1", -1},
-		{"+1", 1},
-		{"1.234", 1.234},
-		{"-1.234", -1.234},
-		{"+1.234", 1.234},
-		{".1", 0.1},
-		{"1.", 1},
-		{"+1.", 1},
-
-		// various zeros
-		{"0e100", 0},
-		{"-0e+100", 0},
-		{"+0e-100", 0},
-		{"0E100", 0},
-		{"-0E+100", 0},
-		{"+0E-100", 0},
-
-		// various decimal exponent formats
-		{"1.e10", 1e10},
-		{"1e+10", 1e10},
-		{"+1e-10", 1e-10},
-		{"1E10", 1e10},
-		{"1.E+10", 1e10},
-		{"+1E-10", 1e-10},
-
-		// infinities
-		{"Inf", inf},
-		{"+Inf", inf},
-		{"-Inf", -inf},
-		{"inf", inf},
-		{"+inf", inf},
-		{"-inf", -inf},
-
-		// invalid numbers
-		{"", nan},
-		{"-", nan},
-		{"0x", nan},
-		{"0e", nan},
-		{"1.2ef", nan},
-		{"2..3", nan},
-		{"123..", nan},
-		{"infinity", nan},
-		{"foobar", nan},
-
-		// misc decimal values
-		{"3.14159265", 3.14159265},
-		{"-687436.79457e-245", -687436.79457e-245},
-		{"-687436.79457E245", -687436.79457e245},
-		{".0000000000000000000000000000000000000001", 1e-40},
-		{"+10000000000000000000000000000000000000000e-0", 1e40},
-
-		// decimal mantissa, binary exponent
-		{"0p0", 0},
-		{"-0p0", -0},
-		{"1p10", 1 << 10},
-		{"1p+10", 1 << 10},
-		{"+1p-10", 1.0 / (1 << 10)},
-		{"1024p-12", 0.25},
-		{"-1p10", -1024},
-		{"1.5p1", 3},
-
-		// binary mantissa, decimal exponent
-		{"0b0", 0},
-		{"-0b0", -0},
-		{"0b0e+10", 0},
-		{"-0b0e-10", -0},
-		{"0b1010", 10},
-		{"0B1010E2", 1000},
-		{"0b.1", 0.5},
-		{"0b.001", 0.125},
-		{"0b.001e3", 125},
-
-		// binary mantissa, binary exponent
-		{"0b0p+10", 0},
-		{"-0b0p-10", -0},
-		{"0b.1010p4", 10},
-		{"0b1p-1", 0.5},
-		{"0b001p-3", 0.125},
-		{"0b.001p3", 1},
-		{"0b0.01p2", 1},
-
-		// hexadecimal mantissa and exponent
-		{"0x0", 0},
-		{"-0x0", -0},
-		{"0x0p+10", 0},
-		{"-0x0p-10", -0},
-		{"0xff", 255},
-		{"0X.8p1", 1},
-		{"-0X0.00008p16", -0.5},
-		{"0x0.0000000000001p-1022", math.SmallestNonzeroFloat64},
-		{"0x1.fffffffffffffp1023", math.MaxFloat64},
-	} {
-		var x Float
-		x.SetPrec(53)
-		_, ok := x.SetString(test.s)
-		if math.IsNaN(test.x) {
-			// test.s is invalid
-			if ok {
-				t.Errorf("%s: want parse error", test.s)
-			}
-			continue
-		}
-		// test.s is valid
-		if !ok {
-			t.Errorf("%s: got parse error", test.s)
-			continue
-		}
-		f, _ := x.Float64()
-		want := new(Float).SetFloat64(test.x)
-		if x.Cmp(want) != 0 {
-			t.Errorf("%s: got %s (%v); want %v", test.s, &x, f, test.x)
-		}
-	}
-}
-
-const (
-	below1e23 = 99999999999999974834176
-	above1e23 = 100000000000000008388608
-)
-
-func TestFloat64Text(t *testing.T) {
-	for _, test := range []struct {
-		x      float64
-		format byte
-		prec   int
-		want   string
-	}{
-		{0, 'f', 0, "0"},
-		{math.Copysign(0, -1), 'f', 0, "-0"},
-		{1, 'f', 0, "1"},
-		{-1, 'f', 0, "-1"},
-
-		{0.001, 'e', 0, "1e-03"},
-		{0.459, 'e', 0, "5e-01"},
-		{1.459, 'e', 0, "1e+00"},
-		{2.459, 'e', 1, "2.5e+00"},
-		{3.459, 'e', 2, "3.46e+00"},
-		{4.459, 'e', 3, "4.459e+00"},
-		{5.459, 'e', 4, "5.4590e+00"},
-
-		{0.001, 'f', 0, "0"},
-		{0.459, 'f', 0, "0"},
-		{1.459, 'f', 0, "1"},
-		{2.459, 'f', 1, "2.5"},
-		{3.459, 'f', 2, "3.46"},
-		{4.459, 'f', 3, "4.459"},
-		{5.459, 'f', 4, "5.4590"},
-
-		{0, 'b', 0, "0"},
-		{math.Copysign(0, -1), 'b', 0, "-0"},
-		{1.0, 'b', 0, "4503599627370496p-52"},
-		{-1.0, 'b', 0, "-4503599627370496p-52"},
-		{4503599627370496, 'b', 0, "4503599627370496p+0"},
-
-		{0, 'p', 0, "0"},
-		{math.Copysign(0, -1), 'p', 0, "-0"},
-		{1024.0, 'p', 0, "0x.8p+11"},
-		{-1024.0, 'p', 0, "-0x.8p+11"},
-
-		// all test cases below from strconv/ftoa_test.go
-		{1, 'e', 5, "1.00000e+00"},
-		{1, 'f', 5, "1.00000"},
-		{1, 'g', 5, "1"},
-		// {1, 'g', -1, "1"},
-		// {20, 'g', -1, "20"},
-		// {1234567.8, 'g', -1, "1.2345678e+06"},
-		// {200000, 'g', -1, "200000"},
-		// {2000000, 'g', -1, "2e+06"},
-
-		// g conversion and zero suppression
-		{400, 'g', 2, "4e+02"},
-		{40, 'g', 2, "40"},
-		{4, 'g', 2, "4"},
-		{.4, 'g', 2, "0.4"},
-		{.04, 'g', 2, "0.04"},
-		{.004, 'g', 2, "0.004"},
-		{.0004, 'g', 2, "0.0004"},
-		{.00004, 'g', 2, "4e-05"},
-		{.000004, 'g', 2, "4e-06"},
-
-		{0, 'e', 5, "0.00000e+00"},
-		{0, 'f', 5, "0.00000"},
-		{0, 'g', 5, "0"},
-		// {0, 'g', -1, "0"},
-
-		{-1, 'e', 5, "-1.00000e+00"},
-		{-1, 'f', 5, "-1.00000"},
-		{-1, 'g', 5, "-1"},
-		// {-1, 'g', -1, "-1"},
-
-		{12, 'e', 5, "1.20000e+01"},
-		{12, 'f', 5, "12.00000"},
-		{12, 'g', 5, "12"},
-		// {12, 'g', -1, "12"},
-
-		{123456700, 'e', 5, "1.23457e+08"},
-		{123456700, 'f', 5, "123456700.00000"},
-		{123456700, 'g', 5, "1.2346e+08"},
-		// {123456700, 'g', -1, "1.234567e+08"},
-
-		{1.2345e6, 'e', 5, "1.23450e+06"},
-		{1.2345e6, 'f', 5, "1234500.00000"},
-		{1.2345e6, 'g', 5, "1.2345e+06"},
-
-		{1e23, 'e', 17, "9.99999999999999916e+22"},
-		{1e23, 'f', 17, "99999999999999991611392.00000000000000000"},
-		{1e23, 'g', 17, "9.9999999999999992e+22"},
-
-		// {1e23, 'e', -1, "1e+23"},
-		// {1e23, 'f', -1, "100000000000000000000000"},
-		// {1e23, 'g', -1, "1e+23"},
-
-		{below1e23, 'e', 17, "9.99999999999999748e+22"},
-		{below1e23, 'f', 17, "99999999999999974834176.00000000000000000"},
-		{below1e23, 'g', 17, "9.9999999999999975e+22"},
-
-		// {below1e23, 'e', -1, "9.999999999999997e+22"},
-		// {below1e23, 'f', -1, "99999999999999970000000"},
-		// {below1e23, 'g', -1, "9.999999999999997e+22"},
-
-		{above1e23, 'e', 17, "1.00000000000000008e+23"},
-		{above1e23, 'f', 17, "100000000000000008388608.00000000000000000"},
-		// {above1e23, 'g', 17, "1.0000000000000001e+23"},
-
-		// {above1e23, 'e', -1, "1.0000000000000001e+23"},
-		// {above1e23, 'f', -1, "100000000000000010000000"},
-		// {above1e23, 'g', -1, "1.0000000000000001e+23"},
-
-		// {fdiv(5e-304, 1e20), 'g', -1, "5e-324"},
-		// {fdiv(-5e-304, 1e20), 'g', -1, "-5e-324"},
-
-		// {32, 'g', -1, "32"},
-		// {32, 'g', 0, "3e+01"},
-
-		// {100, 'x', -1, "%x"},
-
-		// {math.NaN(), 'g', -1, "NaN"},
-		// {-math.NaN(), 'g', -1, "NaN"},
-		{math.Inf(0), 'g', -1, "+Inf"},
-		{math.Inf(-1), 'g', -1, "-Inf"},
-		{-math.Inf(0), 'g', -1, "-Inf"},
-
-		{-1, 'b', -1, "-4503599627370496p-52"},
-
-		// fixed bugs
-		{0.9, 'f', 1, "0.9"},
-		{0.09, 'f', 1, "0.1"},
-		{0.0999, 'f', 1, "0.1"},
-		{0.05, 'f', 1, "0.1"},
-		{0.05, 'f', 0, "0"},
-		{0.5, 'f', 1, "0.5"},
-		{0.5, 'f', 0, "0"},
-		{1.5, 'f', 0, "2"},
-
-		// http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
-		// {2.2250738585072012e-308, 'g', -1, "2.2250738585072014e-308"},
-		// http://www.exploringbinary.com/php-hangs-on-numeric-value-2-2250738585072011e-308/
-		// {2.2250738585072011e-308, 'g', -1, "2.225073858507201e-308"},
-
-		// Issue 2625.
-		{383260575764816448, 'f', 0, "383260575764816448"},
-		// {383260575764816448, 'g', -1, "3.8326057576481645e+17"},
-	} {
-		f := new(Float).SetFloat64(test.x)
-		got := f.Text(test.format, test.prec)
-		if got != test.want {
-			t.Errorf("%v: got %s; want %s", test, got, test.want)
-		}
-
-		if test.format == 'b' && test.x == 0 {
-			continue // 'b' format in strconv.Float requires knowledge of bias for 0.0
-		}
-		if test.format == 'p' {
-			continue // 'p' format not supported in strconv.Format
-		}
-
-		// verify that Float format matches strconv format
-		want := strconv.FormatFloat(test.x, test.format, test.prec, 64)
-		if got != want {
-			t.Errorf("%v: got %s; want %s (strconv)", test, got, want)
-		}
-	}
-}
-
-func TestFloatText(t *testing.T) {
-	for _, test := range []struct {
-		x      string
-		prec   uint
-		format byte
-		digits int
-		want   string
-	}{
-		{"0", 10, 'f', 0, "0"},
-		{"-0", 10, 'f', 0, "-0"},
-		{"1", 10, 'f', 0, "1"},
-		{"-1", 10, 'f', 0, "-1"},
-
-		{"1.459", 100, 'e', 0, "1e+00"},
-		{"2.459", 100, 'e', 1, "2.5e+00"},
-		{"3.459", 100, 'e', 2, "3.46e+00"},
-		{"4.459", 100, 'e', 3, "4.459e+00"},
-		{"5.459", 100, 'e', 4, "5.4590e+00"},
-
-		{"1.459", 100, 'E', 0, "1E+00"},
-		{"2.459", 100, 'E', 1, "2.5E+00"},
-		{"3.459", 100, 'E', 2, "3.46E+00"},
-		{"4.459", 100, 'E', 3, "4.459E+00"},
-		{"5.459", 100, 'E', 4, "5.4590E+00"},
-
-		{"1.459", 100, 'f', 0, "1"},
-		{"2.459", 100, 'f', 1, "2.5"},
-		{"3.459", 100, 'f', 2, "3.46"},
-		{"4.459", 100, 'f', 3, "4.459"},
-		{"5.459", 100, 'f', 4, "5.4590"},
-
-		{"1.459", 100, 'g', 0, "1"},
-		{"2.459", 100, 'g', 1, "2"},
-		{"3.459", 100, 'g', 2, "3.5"},
-		{"4.459", 100, 'g', 3, "4.46"},
-		{"5.459", 100, 'g', 4, "5.459"},
-
-		{"1459", 53, 'g', 0, "1e+03"},
-		{"2459", 53, 'g', 1, "2e+03"},
-		{"3459", 53, 'g', 2, "3.5e+03"},
-		{"4459", 53, 'g', 3, "4.46e+03"},
-		{"5459", 53, 'g', 4, "5459"},
-
-		{"1459", 53, 'G', 0, "1E+03"},
-		{"2459", 53, 'G', 1, "2E+03"},
-		{"3459", 53, 'G', 2, "3.5E+03"},
-		{"4459", 53, 'G', 3, "4.46E+03"},
-		{"5459", 53, 'G', 4, "5459"},
-
-		{"3", 10, 'e', 40, "3.0000000000000000000000000000000000000000e+00"},
-		{"3", 10, 'f', 40, "3.0000000000000000000000000000000000000000"},
-		{"3", 10, 'g', 40, "3"},
-
-		{"3e40", 100, 'e', 40, "3.0000000000000000000000000000000000000000e+40"},
-		{"3e40", 100, 'f', 4, "30000000000000000000000000000000000000000.0000"},
-		{"3e40", 100, 'g', 40, "3e+40"},
-
-		// make sure "stupid" exponents don't stall the machine
-		{"1e1000000", 64, 'p', 0, "0x.88b3a28a05eade3ap+3321929"},
-		{"1e1000000000", 64, 'p', 0, "0x.ecc5f45aa573d3p+1538481529"},
-		{"1e-1000000", 64, 'p', 0, "0x.efb4542cc8ca418ap-3321928"},
-		{"1e-1000000000", 64, 'p', 0, "0x.8a64dd983a4c7dabp-1538481528"},
-
-		// TODO(gri) need tests for actual large Floats
-
-		{"0", 53, 'b', 0, "0"},
-		{"-0", 53, 'b', 0, "-0"},
-		{"1.0", 53, 'b', 0, "4503599627370496p-52"},
-		{"-1.0", 53, 'b', 0, "-4503599627370496p-52"},
-		{"4503599627370496", 53, 'b', 0, "4503599627370496p+0"},
-
-		// issue 9939
-		{"3", 350, 'b', 0, "1720123961992553633708115671476565205597423741876210842803191629540192157066363606052513914832594264915968p-348"},
-		{"03", 350, 'b', 0, "1720123961992553633708115671476565205597423741876210842803191629540192157066363606052513914832594264915968p-348"},
-		{"3.", 350, 'b', 0, "1720123961992553633708115671476565205597423741876210842803191629540192157066363606052513914832594264915968p-348"},
-		{"3.0", 350, 'b', 0, "1720123961992553633708115671476565205597423741876210842803191629540192157066363606052513914832594264915968p-348"},
-		{"3.00", 350, 'b', 0, "1720123961992553633708115671476565205597423741876210842803191629540192157066363606052513914832594264915968p-348"},
-		{"3.000", 350, 'b', 0, "1720123961992553633708115671476565205597423741876210842803191629540192157066363606052513914832594264915968p-348"},
-
-		{"3", 350, 'p', 0, "0x.cp+2"},
-		{"03", 350, 'p', 0, "0x.cp+2"},
-		{"3.", 350, 'p', 0, "0x.cp+2"},
-		{"3.0", 350, 'p', 0, "0x.cp+2"},
-		{"3.00", 350, 'p', 0, "0x.cp+2"},
-		{"3.000", 350, 'p', 0, "0x.cp+2"},
-
-		{"0", 64, 'p', 0, "0"},
-		{"-0", 64, 'p', 0, "-0"},
-		{"1024.0", 64, 'p', 0, "0x.8p+11"},
-		{"-1024.0", 64, 'p', 0, "-0x.8p+11"},
-
-		// unsupported format
-		{"3.14", 64, 'x', 0, "%x"},
-		{"-3.14", 64, 'x', 0, "%x"},
-	} {
-		f, _, err := ParseFloat(test.x, 0, test.prec, ToNearestEven)
-		if err != nil {
-			t.Errorf("%v: %s", test, err)
-			continue
-		}
-
-		got := f.Text(test.format, test.digits)
-		if got != test.want {
-			t.Errorf("%v: got %s; want %s", test, got, test.want)
-		}
-
-		// compare with strconv.FormatFloat output if possible
-		// ('p' format is not supported by strconv.FormatFloat,
-		// and its output for 0.0 prints a biased exponent value
-		// as in 0p-1074 which makes no sense to emulate here)
-		if test.prec == 53 && test.format != 'p' && f.Sign() != 0 {
-			f64, acc := f.Float64()
-			if acc != Exact {
-				t.Errorf("%v: expected exact conversion to float64", test)
-				continue
-			}
-			got := strconv.FormatFloat(f64, test.format, test.digits, 64)
-			if got != test.want {
-				t.Errorf("%v: got %s; want %s", test, got, test.want)
-			}
-		}
-	}
-}
-
-func TestFloatFormat(t *testing.T) {
-	for _, test := range []struct {
-		format string
-		value  interface{} // float32, float64, or string (== 512bit *Float)
-		want   string
-	}{
-		// TODO(gri) uncomment the disabled 'g'/'G' formats
-		// 	     below once (*Float).Text supports prec < 0
-
-		// from fmt/fmt_test.go
-		{"%+.3e", 0.0, "+0.000e+00"},
-		{"%+.3e", 1.0, "+1.000e+00"},
-		{"%+.3f", -1.0, "-1.000"},
-		{"%+.3F", -1.0, "-1.000"},
-		{"%+.3F", float32(-1.0), "-1.000"},
-		{"%+07.2f", 1.0, "+001.00"},
-		{"%+07.2f", -1.0, "-001.00"},
-		{"%+10.2f", +1.0, "     +1.00"},
-		{"%+10.2f", -1.0, "     -1.00"},
-		{"% .3E", -1.0, "-1.000E+00"},
-		{"% .3e", 1.0, " 1.000e+00"},
-		{"%+.3g", 0.0, "+0"},
-		{"%+.3g", 1.0, "+1"},
-		{"%+.3g", -1.0, "-1"},
-		{"% .3g", -1.0, "-1"},
-		{"% .3g", 1.0, " 1"},
-		{"%b", float32(1.0), "8388608p-23"},
-		{"%b", 1.0, "4503599627370496p-52"},
-
-		// from fmt/fmt_test.go: old test/fmt_test.go
-		{"%e", 1.0, "1.000000e+00"},
-		{"%e", 1234.5678e3, "1.234568e+06"},
-		{"%e", 1234.5678e-8, "1.234568e-05"},
-		{"%e", -7.0, "-7.000000e+00"},
-		{"%e", -1e-9, "-1.000000e-09"},
-		{"%f", 1234.5678e3, "1234567.800000"},
-		{"%f", 1234.5678e-8, "0.000012"},
-		{"%f", -7.0, "-7.000000"},
-		{"%f", -1e-9, "-0.000000"},
-		// {"%g", 1234.5678e3, "1.2345678e+06"},
-		// {"%g", float32(1234.5678e3), "1.2345678e+06"},
-		// {"%g", 1234.5678e-8, "1.2345678e-05"},
-		{"%g", -7.0, "-7"},
-		{"%g", -1e-9, "-1e-09"},
-		{"%g", float32(-1e-9), "-1e-09"},
-		{"%E", 1.0, "1.000000E+00"},
-		{"%E", 1234.5678e3, "1.234568E+06"},
-		{"%E", 1234.5678e-8, "1.234568E-05"},
-		{"%E", -7.0, "-7.000000E+00"},
-		{"%E", -1e-9, "-1.000000E-09"},
-		// {"%G", 1234.5678e3, "1.2345678E+06"},
-		// {"%G", float32(1234.5678e3), "1.2345678E+06"},
-		// {"%G", 1234.5678e-8, "1.2345678E-05"},
-		{"%G", -7.0, "-7"},
-		{"%G", -1e-9, "-1E-09"},
-		{"%G", float32(-1e-9), "-1E-09"},
-
-		{"%20.6e", 1.2345e3, "        1.234500e+03"},
-		{"%20.6e", 1.2345e-3, "        1.234500e-03"},
-		{"%20e", 1.2345e3, "        1.234500e+03"},
-		{"%20e", 1.2345e-3, "        1.234500e-03"},
-		{"%20.8e", 1.2345e3, "      1.23450000e+03"},
-		{"%20f", 1.23456789e3, "         1234.567890"},
-		{"%20f", 1.23456789e-3, "            0.001235"},
-		{"%20f", 12345678901.23456789, "  12345678901.234568"},
-		{"%-20f", 1.23456789e3, "1234.567890         "},
-		{"%20.8f", 1.23456789e3, "       1234.56789000"},
-		{"%20.8f", 1.23456789e-3, "          0.00123457"},
-		// {"%g", 1.23456789e3, "1234.56789"},
-		// {"%g", 1.23456789e-3, "0.00123456789"},
-		// {"%g", 1.23456789e20, "1.23456789e+20"},
-		{"%20e", math.Inf(1), "                +Inf"},
-		{"%-20f", math.Inf(-1), "-Inf                "},
-
-		// from fmt/fmt_test.go: comparison of padding rules with C printf
-		{"%.2f", 1.0, "1.00"},
-		{"%.2f", -1.0, "-1.00"},
-		{"% .2f", 1.0, " 1.00"},
-		{"% .2f", -1.0, "-1.00"},
-		{"%+.2f", 1.0, "+1.00"},
-		{"%+.2f", -1.0, "-1.00"},
-		{"%7.2f", 1.0, "   1.00"},
-		{"%7.2f", -1.0, "  -1.00"},
-		{"% 7.2f", 1.0, "   1.00"},
-		{"% 7.2f", -1.0, "  -1.00"},
-		{"%+7.2f", 1.0, "  +1.00"},
-		{"%+7.2f", -1.0, "  -1.00"},
-		{"%07.2f", 1.0, "0001.00"},
-		{"%07.2f", -1.0, "-001.00"},
-		{"% 07.2f", 1.0, " 001.00"},
-		{"% 07.2f", -1.0, "-001.00"},
-		{"%+07.2f", 1.0, "+001.00"},
-		{"%+07.2f", -1.0, "-001.00"},
-
-		// from fmt/fmt_test.go: zero padding does not apply to infinities
-		{"%020f", math.Inf(-1), "                -Inf"},
-		{"%020f", math.Inf(+1), "                +Inf"},
-		{"% 020f", math.Inf(-1), "                -Inf"},
-		{"% 020f", math.Inf(+1), "                 Inf"},
-		{"%+020f", math.Inf(-1), "                -Inf"},
-		{"%+020f", math.Inf(+1), "                +Inf"},
-		{"%20f", -1.0, "           -1.000000"},
-
-		// handle %v like %g
-		{"%v", 0.0, "0"},
-		{"%v", -7.0, "-7"},
-		{"%v", -1e-9, "-1e-09"},
-		{"%v", float32(-1e-9), "-1e-09"},
-		{"%010v", 0.0, "0000000000"},
-		{"%010v", 0.0, "0000000000"},
-
-		// *Float cases
-		{"%.20f", "1e-20", "0.00000000000000000001"},
-		{"%.20f", "-1e-20", "-0.00000000000000000001"},
-		{"%30.20f", "-1e-20", "       -0.00000000000000000001"},
-		{"%030.20f", "-1e-20", "-00000000.00000000000000000001"},
-		{"%030.20f", "+1e-20", "000000000.00000000000000000001"},
-		{"% 030.20f", "+1e-20", " 00000000.00000000000000000001"},
-
-		// erroneous formats
-		{"%s", 1.0, "%!s(*big.Float=1)"},
-	} {
-		value := new(Float)
-		switch v := test.value.(type) {
-		case float32:
-			value.SetPrec(24).SetFloat64(float64(v))
-		case float64:
-			value.SetPrec(53).SetFloat64(v)
-		case string:
-			value.SetPrec(512).Parse(v, 0)
-		default:
-			t.Fatalf("unsupported test value: %v (%T)", v, v)
-		}
-
-		if got := fmt.Sprintf(test.format, value); got != test.want {
-			t.Errorf("%v: got %q; want %q", test, got, test.want)
-		}
-	}
-}
diff --git a/src/cmd/compile/internal/big/floatexample_test.go b/src/cmd/compile/internal/big/floatexample_test.go
deleted file mode 100644
index 6fd291c..0000000
--- a/src/cmd/compile/internal/big/floatexample_test.go
+++ /dev/null
@@ -1,111 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package big_test
-
-import (
-	"cmd/compile/internal/big"
-	"fmt"
-	"math"
-)
-
-func ExampleFloat_Add() {
-	// Operating on numbers of different precision.
-	var x, y, z big.Float
-	x.SetInt64(1000)          // x is automatically set to 64bit precision
-	y.SetFloat64(2.718281828) // y is automatically set to 53bit precision
-	z.SetPrec(32)
-	z.Add(&x, &y)
-	fmt.Printf("x = %.10g (%s, prec = %d, acc = %s)\n", &x, x.Text('p', 0), x.Prec(), x.Acc())
-	fmt.Printf("y = %.10g (%s, prec = %d, acc = %s)\n", &y, y.Text('p', 0), y.Prec(), y.Acc())
-	fmt.Printf("z = %.10g (%s, prec = %d, acc = %s)\n", &z, z.Text('p', 0), z.Prec(), z.Acc())
-	// Output:
-	// x = 1000 (0x.fap+10, prec = 64, acc = Exact)
-	// y = 2.718281828 (0x.adf85458248cd8p+2, prec = 53, acc = Exact)
-	// z = 1002.718282 (0x.faadf854p+10, prec = 32, acc = Below)
-}
-
-func Example_Shift() {
-	// Implementing Float "shift" by modifying the (binary) exponents directly.
-	for s := -5; s <= 5; s++ {
-		x := big.NewFloat(0.5)
-		x.SetMantExp(x, x.MantExp(nil)+s) // shift x by s
-		fmt.Println(x)
-	}
-	// Output:
-	// 0.015625
-	// 0.03125
-	// 0.0625
-	// 0.125
-	// 0.25
-	// 0.5
-	// 1
-	// 2
-	// 4
-	// 8
-	// 16
-}
-
-func ExampleFloat_Cmp() {
-	inf := math.Inf(1)
-	zero := 0.0
-
-	operands := []float64{-inf, -1.2, -zero, 0, +1.2, +inf}
-
-	fmt.Println("   x     y  cmp")
-	fmt.Println("---------------")
-	for _, x64 := range operands {
-		x := big.NewFloat(x64)
-		for _, y64 := range operands {
-			y := big.NewFloat(y64)
-			fmt.Printf("%4g  %4g  %3d\n", x, y, x.Cmp(y))
-		}
-		fmt.Println()
-	}
-
-	// Output:
-	//    x     y  cmp
-	// ---------------
-	// -Inf  -Inf    0
-	// -Inf  -1.2   -1
-	// -Inf    -0   -1
-	// -Inf     0   -1
-	// -Inf   1.2   -1
-	// -Inf  +Inf   -1
-	//
-	// -1.2  -Inf    1
-	// -1.2  -1.2    0
-	// -1.2    -0   -1
-	// -1.2     0   -1
-	// -1.2   1.2   -1
-	// -1.2  +Inf   -1
-	//
-	//   -0  -Inf    1
-	//   -0  -1.2    1
-	//   -0    -0    0
-	//   -0     0    0
-	//   -0   1.2   -1
-	//   -0  +Inf   -1
-	//
-	//    0  -Inf    1
-	//    0  -1.2    1
-	//    0    -0    0
-	//    0     0    0
-	//    0   1.2   -1
-	//    0  +Inf   -1
-	//
-	//  1.2  -Inf    1
-	//  1.2  -1.2    1
-	//  1.2    -0    1
-	//  1.2     0    1
-	//  1.2   1.2    0
-	//  1.2  +Inf   -1
-	//
-	// +Inf  -Inf    1
-	// +Inf  -1.2    1
-	// +Inf    -0    1
-	// +Inf     0    1
-	// +Inf   1.2    1
-	// +Inf  +Inf    0
-}
diff --git a/src/cmd/compile/internal/big/ftoa.go b/src/cmd/compile/internal/big/ftoa.go
deleted file mode 100644
index 5c5f2ce..0000000
--- a/src/cmd/compile/internal/big/ftoa.go
+++ /dev/null
@@ -1,393 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements Float-to-string conversion functions.
-// It is closely following the corresponding implementation
-// in strconv/ftoa.go, but modified and simplified for Float.
-
-package big
-
-import (
-	"fmt"
-	"strconv"
-	"strings"
-)
-
-// Text converts the floating-point number x to a string according
-// to the given format and precision prec. The format is one of:
-//
-//	'e'	-d.dddde±dd, decimal exponent, at least two (possibly 0) exponent digits
-//	'E'	-d.ddddE±dd, decimal exponent, at least two (possibly 0) exponent digits
-//	'f'	-ddddd.dddd, no exponent
-//	'g'	like 'e' for large exponents, like 'f' otherwise
-//	'G'	like 'E' for large exponents, like 'f' otherwise
-//	'b'	-ddddddp±dd, binary exponent
-//	'p'	-0x.dddp±dd, binary exponent, hexadecimal mantissa
-//
-// For the binary exponent formats, the mantissa is printed in normalized form:
-//
-//	'b'	decimal integer mantissa using x.Prec() bits, or -0
-//	'p'	hexadecimal fraction with 0.5 <= 0.mantissa < 1.0, or -0
-//
-// If format is a different character, Text returns a "%" followed by the
-// unrecognized format character.
-//
-// The precision prec controls the number of digits (excluding the exponent)
-// printed by the 'e', 'E', 'f', 'g', and 'G' formats. For 'e', 'E', and 'f'
-// it is the number of digits after the decimal point. For 'g' and 'G' it is
-// the total number of digits. A negative precision selects the smallest
-// number of digits necessary to identify the value x uniquely.
-// The prec value is ignored for the 'b' or 'p' format.
-//
-// BUG(gri) Float.Text does not accept negative precisions (issue #10991).
-func (x *Float) Text(format byte, prec int) string {
-	const extra = 10 // TODO(gri) determine a good/better value here
-	return string(x.Append(make([]byte, 0, prec+extra), format, prec))
-}
-
-// String formats x like x.Text('g', 10).
-func (x *Float) String() string {
-	return x.Text('g', 10)
-}
-
-// Append appends to buf the string form of the floating-point number x,
-// as generated by x.Text, and returns the extended buffer.
-func (x *Float) Append(buf []byte, fmt byte, prec int) []byte {
-	// sign
-	if x.neg {
-		buf = append(buf, '-')
-	}
-
-	// Inf
-	if x.form == inf {
-		if !x.neg {
-			buf = append(buf, '+')
-		}
-		return append(buf, "Inf"...)
-	}
-
-	// pick off easy formats
-	switch fmt {
-	case 'b':
-		return x.fmtB(buf)
-	case 'p':
-		return x.fmtP(buf)
-	}
-
-	// Algorithm:
-	//   1) convert Float to multiprecision decimal
-	//   2) round to desired precision
-	//   3) read digits out and format
-
-	// 1) convert Float to multiprecision decimal
-	var d decimal // == 0.0
-	if x.form == finite {
-		d.init(x.mant, int(x.exp)-x.mant.bitLen())
-	}
-
-	// 2) round to desired precision
-	shortest := false
-	if prec < 0 {
-		shortest = true
-		panic("unimplemented")
-		// TODO(gri) complete this
-		// roundShortest(&d, f.mant, int(f.exp))
-		// Precision for shortest representation mode.
-		switch fmt {
-		case 'e', 'E':
-			prec = len(d.mant) - 1
-		case 'f':
-			prec = max(len(d.mant)-d.exp, 0)
-		case 'g', 'G':
-			prec = len(d.mant)
-		}
-	} else {
-		// round appropriately
-		switch fmt {
-		case 'e', 'E':
-			// one digit before and number of digits after decimal point
-			d.round(1 + prec)
-		case 'f':
-			// number of digits before and after decimal point
-			d.round(d.exp + prec)
-		case 'g', 'G':
-			if prec == 0 {
-				prec = 1
-			}
-			d.round(prec)
-		}
-	}
-
-	// 3) read digits out and format
-	switch fmt {
-	case 'e', 'E':
-		return fmtE(buf, fmt, prec, d)
-	case 'f':
-		return fmtF(buf, prec, d)
-	case 'g', 'G':
-		// trim trailing fractional zeros in %e format
-		eprec := prec
-		if eprec > len(d.mant) && len(d.mant) >= d.exp {
-			eprec = len(d.mant)
-		}
-		// %e is used if the exponent from the conversion
-		// is less than -4 or greater than or equal to the precision.
-		// If precision was the shortest possible, use eprec = 6 for
-		// this decision.
-		if shortest {
-			eprec = 6
-		}
-		exp := d.exp - 1
-		if exp < -4 || exp >= eprec {
-			if prec > len(d.mant) {
-				prec = len(d.mant)
-			}
-			return fmtE(buf, fmt+'e'-'g', prec-1, d)
-		}
-		if prec > d.exp {
-			prec = len(d.mant)
-		}
-		return fmtF(buf, max(prec-d.exp, 0), d)
-	}
-
-	// unknown format
-	if x.neg {
-		buf = buf[:len(buf)-1] // sign was added prematurely - remove it again
-	}
-	return append(buf, '%', fmt)
-}
-
-// %e: d.ddddde±dd
-func fmtE(buf []byte, fmt byte, prec int, d decimal) []byte {
-	// first digit
-	ch := byte('0')
-	if len(d.mant) > 0 {
-		ch = d.mant[0]
-	}
-	buf = append(buf, ch)
-
-	// .moredigits
-	if prec > 0 {
-		buf = append(buf, '.')
-		i := 1
-		m := min(len(d.mant), prec+1)
-		if i < m {
-			buf = append(buf, d.mant[i:m]...)
-			i = m
-		}
-		for ; i <= prec; i++ {
-			buf = append(buf, '0')
-		}
-	}
-
-	// e±
-	buf = append(buf, fmt)
-	var exp int64
-	if len(d.mant) > 0 {
-		exp = int64(d.exp) - 1 // -1 because first digit was printed before '.'
-	}
-	if exp < 0 {
-		ch = '-'
-		exp = -exp
-	} else {
-		ch = '+'
-	}
-	buf = append(buf, ch)
-
-	// dd...d
-	if exp < 10 {
-		buf = append(buf, '0') // at least 2 exponent digits
-	}
-	return strconv.AppendInt(buf, exp, 10)
-}
-
-// %f: ddddddd.ddddd
-func fmtF(buf []byte, prec int, d decimal) []byte {
-	// integer, padded with zeros as needed
-	if d.exp > 0 {
-		m := min(len(d.mant), d.exp)
-		buf = append(buf, d.mant[:m]...)
-		for ; m < d.exp; m++ {
-			buf = append(buf, '0')
-		}
-	} else {
-		buf = append(buf, '0')
-	}
-
-	// fraction
-	if prec > 0 {
-		buf = append(buf, '.')
-		for i := 0; i < prec; i++ {
-			ch := byte('0')
-			if j := d.exp + i; 0 <= j && j < len(d.mant) {
-				ch = d.mant[j]
-			}
-			buf = append(buf, ch)
-		}
-	}
-
-	return buf
-}
-
-// fmtB appends the string of x in the format mantissa "p" exponent
-// with a decimal mantissa and a binary exponent, or 0" if x is zero,
-// and returns the extended buffer.
-// The mantissa is normalized such that is uses x.Prec() bits in binary
-// representation.
-// The sign of x is ignored, and x must not be an Inf.
-func (x *Float) fmtB(buf []byte) []byte {
-	if x.form == zero {
-		return append(buf, '0')
-	}
-
-	if debugFloat && x.form != finite {
-		panic("non-finite float")
-	}
-	// x != 0
-
-	// adjust mantissa to use exactly x.prec bits
-	m := x.mant
-	switch w := uint32(len(x.mant)) * _W; {
-	case w < x.prec:
-		m = nat(nil).shl(m, uint(x.prec-w))
-	case w > x.prec:
-		m = nat(nil).shr(m, uint(w-x.prec))
-	}
-
-	buf = append(buf, m.decimalString()...)
-	buf = append(buf, 'p')
-	e := int64(x.exp) - int64(x.prec)
-	if e >= 0 {
-		buf = append(buf, '+')
-	}
-	return strconv.AppendInt(buf, e, 10)
-}
-
-// fmtP appends the string of x in the format 0x." mantissa "p" exponent
-// with a hexadecimal mantissa and a binary exponent, or 0" if x is zero,
-// ad returns the extended buffer.
-// The mantissa is normalized such that 0.5 <= 0.mantissa < 1.0.
-// The sign of x is ignored, and x must not be an Inf.
-func (x *Float) fmtP(buf []byte) []byte {
-	if x.form == zero {
-		return append(buf, '0')
-	}
-
-	if debugFloat && x.form != finite {
-		panic("non-finite float")
-	}
-	// x != 0
-
-	// remove trailing 0 words early
-	// (no need to convert to hex 0's and trim later)
-	m := x.mant
-	i := 0
-	for i < len(m) && m[i] == 0 {
-		i++
-	}
-	m = m[i:]
-
-	buf = append(buf, "0x."...)
-	buf = append(buf, strings.TrimRight(m.hexString(), "0")...)
-	buf = append(buf, 'p')
-	if x.exp >= 0 {
-		buf = append(buf, '+')
-	}
-	return strconv.AppendInt(buf, int64(x.exp), 10)
-}
-
-func min(x, y int) int {
-	if x < y {
-		return x
-	}
-	return y
-}
-
-// Format implements fmt.Formatter. It accepts all the regular
-// formats for floating-point numbers ('e', 'E', 'f', 'F', 'g',
-// 'G') as well as 'b', 'p', and 'v'. See (*Float).Text for the
-// interpretation of 'b' and 'p'. The 'v' format is handled like
-// 'g'.
-// Format also supports specification of the minimum precision
-// in digits, the output field width, as well as the format verbs
-// '+' and ' ' for sign control, '0' for space or zero padding,
-// and '-' for left or right justification. See the fmt package
-// for details.
-//
-// BUG(gri) A missing precision for the 'g' format, or a negative
-//          (via '*') precision is not yet supported. Instead the
-//          default precision (6) is used in that case (issue #10991).
-func (x *Float) Format(s fmt.State, format rune) {
-	prec, hasPrec := s.Precision()
-	if !hasPrec {
-		prec = 6 // default precision for 'e', 'f'
-	}
-
-	switch format {
-	case 'e', 'E', 'f', 'b', 'p':
-		// nothing to do
-	case 'F':
-		// (*Float).Text doesn't support 'F'; handle like 'f'
-		format = 'f'
-	case 'v':
-		// handle like 'g'
-		format = 'g'
-		fallthrough
-	case 'g', 'G':
-		if !hasPrec {
-			// TODO(gri) uncomment once (*Float).Text handles prec < 0
-			// prec = -1 // default precision for 'g', 'G'
-		}
-	default:
-		fmt.Fprintf(s, "%%!%c(*big.Float=%s)", format, x.String())
-		return
-	}
-	var buf []byte
-	buf = x.Append(buf, byte(format), prec)
-	if len(buf) == 0 {
-		buf = []byte("?") // should never happen, but don't crash
-	}
-	// len(buf) > 0
-
-	var sign string
-	switch {
-	case buf[0] == '-':
-		sign = "-"
-		buf = buf[1:]
-	case buf[0] == '+':
-		// +Inf
-		sign = "+"
-		if s.Flag(' ') {
-			sign = " "
-		}
-		buf = buf[1:]
-	case s.Flag('+'):
-		sign = "+"
-	case s.Flag(' '):
-		sign = " "
-	}
-
-	var padding int
-	if width, hasWidth := s.Width(); hasWidth && width > len(sign)+len(buf) {
-		padding = width - len(sign) - len(buf)
-	}
-
-	switch {
-	case s.Flag('0') && !x.IsInf():
-		// 0-padding on left
-		writeMultiple(s, sign, 1)
-		writeMultiple(s, "0", padding)
-		s.Write(buf)
-	case s.Flag('-'):
-		// padding on right
-		writeMultiple(s, sign, 1)
-		s.Write(buf)
-		writeMultiple(s, " ", padding)
-	default:
-		// padding on left
-		writeMultiple(s, " ", padding)
-		writeMultiple(s, sign, 1)
-		s.Write(buf)
-	}
-}
diff --git a/src/cmd/compile/internal/big/gcd_test.go b/src/cmd/compile/internal/big/gcd_test.go
deleted file mode 100644
index c0b9f58..0000000
--- a/src/cmd/compile/internal/big/gcd_test.go
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements a GCD benchmark.
-// Usage: go test math/big -test.bench GCD
-
-package big
-
-import (
-	"math/rand"
-	"testing"
-)
-
-// randInt returns a pseudo-random Int in the range [1<<(size-1), (1<<size) - 1]
-func randInt(r *rand.Rand, size uint) *Int {
-	n := new(Int).Lsh(intOne, size-1)
-	x := new(Int).Rand(r, n)
-	return x.Add(x, n) // make sure result > 1<<(size-1)
-}
-
-func runGCD(b *testing.B, aSize, bSize uint) {
-	b.StopTimer()
-	var r = rand.New(rand.NewSource(1234))
-	aa := randInt(r, aSize)
-	bb := randInt(r, bSize)
-	b.StartTimer()
-	for i := 0; i < b.N; i++ {
-		new(Int).GCD(nil, nil, aa, bb)
-	}
-}
-
-func BenchmarkGCD10x10(b *testing.B)         { runGCD(b, 10, 10) }
-func BenchmarkGCD10x100(b *testing.B)        { runGCD(b, 10, 100) }
-func BenchmarkGCD10x1000(b *testing.B)       { runGCD(b, 10, 1000) }
-func BenchmarkGCD10x10000(b *testing.B)      { runGCD(b, 10, 10000) }
-func BenchmarkGCD10x100000(b *testing.B)     { runGCD(b, 10, 100000) }
-func BenchmarkGCD100x100(b *testing.B)       { runGCD(b, 100, 100) }
-func BenchmarkGCD100x1000(b *testing.B)      { runGCD(b, 100, 1000) }
-func BenchmarkGCD100x10000(b *testing.B)     { runGCD(b, 100, 10000) }
-func BenchmarkGCD100x100000(b *testing.B)    { runGCD(b, 100, 100000) }
-func BenchmarkGCD1000x1000(b *testing.B)     { runGCD(b, 1000, 1000) }
-func BenchmarkGCD1000x10000(b *testing.B)    { runGCD(b, 1000, 10000) }
-func BenchmarkGCD1000x100000(b *testing.B)   { runGCD(b, 1000, 100000) }
-func BenchmarkGCD10000x10000(b *testing.B)   { runGCD(b, 10000, 10000) }
-func BenchmarkGCD10000x100000(b *testing.B)  { runGCD(b, 10000, 100000) }
-func BenchmarkGCD100000x100000(b *testing.B) { runGCD(b, 100000, 100000) }
diff --git a/src/cmd/compile/internal/big/hilbert_test.go b/src/cmd/compile/internal/big/hilbert_test.go
deleted file mode 100644
index 1a84341..0000000
--- a/src/cmd/compile/internal/big/hilbert_test.go
+++ /dev/null
@@ -1,160 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// A little test program and benchmark for rational arithmetics.
-// Computes a Hilbert matrix, its inverse, multiplies them
-// and verifies that the product is the identity matrix.
-
-package big
-
-import (
-	"fmt"
-	"testing"
-)
-
-type matrix struct {
-	n, m int
-	a    []*Rat
-}
-
-func (a *matrix) at(i, j int) *Rat {
-	if !(0 <= i && i < a.n && 0 <= j && j < a.m) {
-		panic("index out of range")
-	}
-	return a.a[i*a.m+j]
-}
-
-func (a *matrix) set(i, j int, x *Rat) {
-	if !(0 <= i && i < a.n && 0 <= j && j < a.m) {
-		panic("index out of range")
-	}
-	a.a[i*a.m+j] = x
-}
-
-func newMatrix(n, m int) *matrix {
-	if !(0 <= n && 0 <= m) {
-		panic("illegal matrix")
-	}
-	a := new(matrix)
-	a.n = n
-	a.m = m
-	a.a = make([]*Rat, n*m)
-	return a
-}
-
-func newUnit(n int) *matrix {
-	a := newMatrix(n, n)
-	for i := 0; i < n; i++ {
-		for j := 0; j < n; j++ {
-			x := NewRat(0, 1)
-			if i == j {
-				x.SetInt64(1)
-			}
-			a.set(i, j, x)
-		}
-	}
-	return a
-}
-
-func newHilbert(n int) *matrix {
-	a := newMatrix(n, n)
-	for i := 0; i < n; i++ {
-		for j := 0; j < n; j++ {
-			a.set(i, j, NewRat(1, int64(i+j+1)))
-		}
-	}
-	return a
-}
-
-func newInverseHilbert(n int) *matrix {
-	a := newMatrix(n, n)
-	for i := 0; i < n; i++ {
-		for j := 0; j < n; j++ {
-			x1 := new(Rat).SetInt64(int64(i + j + 1))
-			x2 := new(Rat).SetInt(new(Int).Binomial(int64(n+i), int64(n-j-1)))
-			x3 := new(Rat).SetInt(new(Int).Binomial(int64(n+j), int64(n-i-1)))
-			x4 := new(Rat).SetInt(new(Int).Binomial(int64(i+j), int64(i)))
-
-			x1.Mul(x1, x2)
-			x1.Mul(x1, x3)
-			x1.Mul(x1, x4)
-			x1.Mul(x1, x4)
-
-			if (i+j)&1 != 0 {
-				x1.Neg(x1)
-			}
-
-			a.set(i, j, x1)
-		}
-	}
-	return a
-}
-
-func (a *matrix) mul(b *matrix) *matrix {
-	if a.m != b.n {
-		panic("illegal matrix multiply")
-	}
-	c := newMatrix(a.n, b.m)
-	for i := 0; i < c.n; i++ {
-		for j := 0; j < c.m; j++ {
-			x := NewRat(0, 1)
-			for k := 0; k < a.m; k++ {
-				x.Add(x, new(Rat).Mul(a.at(i, k), b.at(k, j)))
-			}
-			c.set(i, j, x)
-		}
-	}
-	return c
-}
-
-func (a *matrix) eql(b *matrix) bool {
-	if a.n != b.n || a.m != b.m {
-		return false
-	}
-	for i := 0; i < a.n; i++ {
-		for j := 0; j < a.m; j++ {
-			if a.at(i, j).Cmp(b.at(i, j)) != 0 {
-				return false
-			}
-		}
-	}
-	return true
-}
-
-func (a *matrix) String() string {
-	s := ""
-	for i := 0; i < a.n; i++ {
-		for j := 0; j < a.m; j++ {
-			s += fmt.Sprintf("\t%s", a.at(i, j))
-		}
-		s += "\n"
-	}
-	return s
-}
-
-func doHilbert(t *testing.T, n int) {
-	a := newHilbert(n)
-	b := newInverseHilbert(n)
-	I := newUnit(n)
-	ab := a.mul(b)
-	if !ab.eql(I) {
-		if t == nil {
-			panic("Hilbert failed")
-		}
-		t.Errorf("a   = %s\n", a)
-		t.Errorf("b   = %s\n", b)
-		t.Errorf("a*b = %s\n", ab)
-		t.Errorf("I   = %s\n", I)
-	}
-}
-
-func TestHilbert(t *testing.T) {
-	doHilbert(t, 10)
-}
-
-func BenchmarkHilbert(b *testing.B) {
-	for i := 0; i < b.N; i++ {
-		doHilbert(nil, 10)
-	}
-}
diff --git a/src/cmd/compile/internal/big/int.go b/src/cmd/compile/internal/big/int.go
deleted file mode 100644
index 5e31253..0000000
--- a/src/cmd/compile/internal/big/int.go
+++ /dev/null
@@ -1,966 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements signed multi-precision integers.
-
-package big
-
-import (
-	"fmt"
-	"io"
-	"math/rand"
-	"strings"
-)
-
-// An Int represents a signed multi-precision integer.
-// The zero value for an Int represents the value 0.
-type Int struct {
-	neg bool // sign
-	abs nat  // absolute value of the integer
-}
-
-var intOne = &Int{false, natOne}
-
-// Sign returns:
-//
-//	-1 if x <  0
-//	 0 if x == 0
-//	+1 if x >  0
-//
-func (x *Int) Sign() int {
-	if len(x.abs) == 0 {
-		return 0
-	}
-	if x.neg {
-		return -1
-	}
-	return 1
-}
-
-// SetInt64 sets z to x and returns z.
-func (z *Int) SetInt64(x int64) *Int {
-	neg := false
-	if x < 0 {
-		neg = true
-		x = -x
-	}
-	z.abs = z.abs.setUint64(uint64(x))
-	z.neg = neg
-	return z
-}
-
-// SetUint64 sets z to x and returns z.
-func (z *Int) SetUint64(x uint64) *Int {
-	z.abs = z.abs.setUint64(x)
-	z.neg = false
-	return z
-}
-
-// NewInt allocates and returns a new Int set to x.
-func NewInt(x int64) *Int {
-	return new(Int).SetInt64(x)
-}
-
-// Set sets z to x and returns z.
-func (z *Int) Set(x *Int) *Int {
-	if z != x {
-		z.abs = z.abs.set(x.abs)
-		z.neg = x.neg
-	}
-	return z
-}
-
-// Bits provides raw (unchecked but fast) access to x by returning its
-// absolute value as a little-endian Word slice. The result and x share
-// the same underlying array.
-// Bits is intended to support implementation of missing low-level Int
-// functionality outside this package; it should be avoided otherwise.
-func (x *Int) Bits() []Word {
-	return x.abs
-}
-
-// SetBits provides raw (unchecked but fast) access to z by setting its
-// value to abs, interpreted as a little-endian Word slice, and returning
-// z. The result and abs share the same underlying array.
-// SetBits is intended to support implementation of missing low-level Int
-// functionality outside this package; it should be avoided otherwise.
-func (z *Int) SetBits(abs []Word) *Int {
-	z.abs = nat(abs).norm()
-	z.neg = false
-	return z
-}
-
-// Abs sets z to |x| (the absolute value of x) and returns z.
-func (z *Int) Abs(x *Int) *Int {
-	z.Set(x)
-	z.neg = false
-	return z
-}
-
-// Neg sets z to -x and returns z.
-func (z *Int) Neg(x *Int) *Int {
-	z.Set(x)
-	z.neg = len(z.abs) > 0 && !z.neg // 0 has no sign
-	return z
-}
-
-// Add sets z to the sum x+y and returns z.
-func (z *Int) Add(x, y *Int) *Int {
-	neg := x.neg
-	if x.neg == y.neg {
-		// x + y == x + y
-		// (-x) + (-y) == -(x + y)
-		z.abs = z.abs.add(x.abs, y.abs)
-	} else {
-		// x + (-y) == x - y == -(y - x)
-		// (-x) + y == y - x == -(x - y)
-		if x.abs.cmp(y.abs) >= 0 {
-			z.abs = z.abs.sub(x.abs, y.abs)
-		} else {
-			neg = !neg
-			z.abs = z.abs.sub(y.abs, x.abs)
-		}
-	}
-	z.neg = len(z.abs) > 0 && neg // 0 has no sign
-	return z
-}
-
-// Sub sets z to the difference x-y and returns z.
-func (z *Int) Sub(x, y *Int) *Int {
-	neg := x.neg
-	if x.neg != y.neg {
-		// x - (-y) == x + y
-		// (-x) - y == -(x + y)
-		z.abs = z.abs.add(x.abs, y.abs)
-	} else {
-		// x - y == x - y == -(y - x)
-		// (-x) - (-y) == y - x == -(x - y)
-		if x.abs.cmp(y.abs) >= 0 {
-			z.abs = z.abs.sub(x.abs, y.abs)
-		} else {
-			neg = !neg
-			z.abs = z.abs.sub(y.abs, x.abs)
-		}
-	}
-	z.neg = len(z.abs) > 0 && neg // 0 has no sign
-	return z
-}
-
-// Mul sets z to the product x*y and returns z.
-func (z *Int) Mul(x, y *Int) *Int {
-	// x * y == x * y
-	// x * (-y) == -(x * y)
-	// (-x) * y == -(x * y)
-	// (-x) * (-y) == x * y
-	z.abs = z.abs.mul(x.abs, y.abs)
-	z.neg = len(z.abs) > 0 && x.neg != y.neg // 0 has no sign
-	return z
-}
-
-// MulRange sets z to the product of all integers
-// in the range [a, b] inclusively and returns z.
-// If a > b (empty range), the result is 1.
-func (z *Int) MulRange(a, b int64) *Int {
-	switch {
-	case a > b:
-		return z.SetInt64(1) // empty range
-	case a <= 0 && b >= 0:
-		return z.SetInt64(0) // range includes 0
-	}
-	// a <= b && (b < 0 || a > 0)
-
-	neg := false
-	if a < 0 {
-		neg = (b-a)&1 == 0
-		a, b = -b, -a
-	}
-
-	z.abs = z.abs.mulRange(uint64(a), uint64(b))
-	z.neg = neg
-	return z
-}
-
-// Binomial sets z to the binomial coefficient of (n, k) and returns z.
-func (z *Int) Binomial(n, k int64) *Int {
-	// reduce the number of multiplications by reducing k
-	if n/2 < k && k <= n {
-		k = n - k // Binomial(n, k) == Binomial(n, n-k)
-	}
-	var a, b Int
-	a.MulRange(n-k+1, n)
-	b.MulRange(1, k)
-	return z.Quo(&a, &b)
-}
-
-// Quo sets z to the quotient x/y for y != 0 and returns z.
-// If y == 0, a division-by-zero run-time panic occurs.
-// Quo implements truncated division (like Go); see QuoRem for more details.
-func (z *Int) Quo(x, y *Int) *Int {
-	z.abs, _ = z.abs.div(nil, x.abs, y.abs)
-	z.neg = len(z.abs) > 0 && x.neg != y.neg // 0 has no sign
-	return z
-}
-
-// Rem sets z to the remainder x%y for y != 0 and returns z.
-// If y == 0, a division-by-zero run-time panic occurs.
-// Rem implements truncated modulus (like Go); see QuoRem for more details.
-func (z *Int) Rem(x, y *Int) *Int {
-	_, z.abs = nat(nil).div(z.abs, x.abs, y.abs)
-	z.neg = len(z.abs) > 0 && x.neg // 0 has no sign
-	return z
-}
-
-// QuoRem sets z to the quotient x/y and r to the remainder x%y
-// and returns the pair (z, r) for y != 0.
-// If y == 0, a division-by-zero run-time panic occurs.
-//
-// QuoRem implements T-division and modulus (like Go):
-//
-//	q = x/y      with the result truncated to zero
-//	r = x - y*q
-//
-// (See Daan Leijen, ``Division and Modulus for Computer Scientists''.)
-// See DivMod for Euclidean division and modulus (unlike Go).
-//
-func (z *Int) QuoRem(x, y, r *Int) (*Int, *Int) {
-	z.abs, r.abs = z.abs.div(r.abs, x.abs, y.abs)
-	z.neg, r.neg = len(z.abs) > 0 && x.neg != y.neg, len(r.abs) > 0 && x.neg // 0 has no sign
-	return z, r
-}
-
-// Div sets z to the quotient x/y for y != 0 and returns z.
-// If y == 0, a division-by-zero run-time panic occurs.
-// Div implements Euclidean division (unlike Go); see DivMod for more details.
-func (z *Int) Div(x, y *Int) *Int {
-	y_neg := y.neg // z may be an alias for y
-	var r Int
-	z.QuoRem(x, y, &r)
-	if r.neg {
-		if y_neg {
-			z.Add(z, intOne)
-		} else {
-			z.Sub(z, intOne)
-		}
-	}
-	return z
-}
-
-// Mod sets z to the modulus x%y for y != 0 and returns z.
-// If y == 0, a division-by-zero run-time panic occurs.
-// Mod implements Euclidean modulus (unlike Go); see DivMod for more details.
-func (z *Int) Mod(x, y *Int) *Int {
-	y0 := y // save y
-	if z == y || alias(z.abs, y.abs) {
-		y0 = new(Int).Set(y)
-	}
-	var q Int
-	q.QuoRem(x, y, z)
-	if z.neg {
-		if y0.neg {
-			z.Sub(z, y0)
-		} else {
-			z.Add(z, y0)
-		}
-	}
-	return z
-}
-
-// DivMod sets z to the quotient x div y and m to the modulus x mod y
-// and returns the pair (z, m) for y != 0.
-// If y == 0, a division-by-zero run-time panic occurs.
-//
-// DivMod implements Euclidean division and modulus (unlike Go):
-//
-//	q = x div y  such that
-//	m = x - y*q  with 0 <= m < |q|
-//
-// (See Raymond T. Boute, ``The Euclidean definition of the functions
-// div and mod''. ACM Transactions on Programming Languages and
-// Systems (TOPLAS), 14(2):127-144, New York, NY, USA, 4/1992.
-// ACM press.)
-// See QuoRem for T-division and modulus (like Go).
-//
-func (z *Int) DivMod(x, y, m *Int) (*Int, *Int) {
-	y0 := y // save y
-	if z == y || alias(z.abs, y.abs) {
-		y0 = new(Int).Set(y)
-	}
-	z.QuoRem(x, y, m)
-	if m.neg {
-		if y0.neg {
-			z.Add(z, intOne)
-			m.Sub(m, y0)
-		} else {
-			z.Sub(z, intOne)
-			m.Add(m, y0)
-		}
-	}
-	return z, m
-}
-
-// Cmp compares x and y and returns:
-//
-//   -1 if x <  y
-//    0 if x == y
-//   +1 if x >  y
-//
-func (x *Int) Cmp(y *Int) (r int) {
-	// x cmp y == x cmp y
-	// x cmp (-y) == x
-	// (-x) cmp y == y
-	// (-x) cmp (-y) == -(x cmp y)
-	switch {
-	case x.neg == y.neg:
-		r = x.abs.cmp(y.abs)
-		if x.neg {
-			r = -r
-		}
-	case x.neg:
-		r = -1
-	default:
-		r = 1
-	}
-	return
-}
-
-// low32 returns the least significant 32 bits of z.
-func low32(z nat) uint32 {
-	if len(z) == 0 {
-		return 0
-	}
-	return uint32(z[0])
-}
-
-// low64 returns the least significant 64 bits of z.
-func low64(z nat) uint64 {
-	if len(z) == 0 {
-		return 0
-	}
-	v := uint64(z[0])
-	if _W == 32 && len(z) > 1 {
-		v |= uint64(z[1]) << 32
-	}
-	return v
-}
-
-// Int64 returns the int64 representation of x.
-// If x cannot be represented in an int64, the result is undefined.
-func (x *Int) Int64() int64 {
-	v := int64(low64(x.abs))
-	if x.neg {
-		v = -v
-	}
-	return v
-}
-
-// Uint64 returns the uint64 representation of x.
-// If x cannot be represented in a uint64, the result is undefined.
-func (x *Int) Uint64() uint64 {
-	return low64(x.abs)
-}
-
-// SetString sets z to the value of s, interpreted in the given base,
-// and returns z and a boolean indicating success. If SetString fails,
-// the value of z is undefined but the returned value is nil.
-//
-// The base argument must be 0 or a value between 2 and MaxBase. If the base
-// is 0, the string prefix determines the actual conversion base. A prefix of
-// ``0x'' or ``0X'' selects base 16; the ``0'' prefix selects base 8, and a
-// ``0b'' or ``0B'' prefix selects base 2. Otherwise the selected base is 10.
-//
-func (z *Int) SetString(s string, base int) (*Int, bool) {
-	r := strings.NewReader(s)
-	_, _, err := z.scan(r, base)
-	if err != nil {
-		return nil, false
-	}
-	_, err = r.ReadByte()
-	if err != io.EOF {
-		return nil, false
-	}
-	return z, true // err == io.EOF => scan consumed all of s
-}
-
-// SetBytes interprets buf as the bytes of a big-endian unsigned
-// integer, sets z to that value, and returns z.
-func (z *Int) SetBytes(buf []byte) *Int {
-	z.abs = z.abs.setBytes(buf)
-	z.neg = false
-	return z
-}
-
-// Bytes returns the absolute value of x as a big-endian byte slice.
-func (x *Int) Bytes() []byte {
-	buf := make([]byte, len(x.abs)*_S)
-	return buf[x.abs.bytes(buf):]
-}
-
-// BitLen returns the length of the absolute value of x in bits.
-// The bit length of 0 is 0.
-func (x *Int) BitLen() int {
-	return x.abs.bitLen()
-}
-
-// Exp sets z = x**y mod |m| (i.e. the sign of m is ignored), and returns z.
-// If y <= 0, the result is 1 mod |m|; if m == nil or m == 0, z = x**y.
-// See Knuth, volume 2, section 4.6.3.
-func (z *Int) Exp(x, y, m *Int) *Int {
-	var yWords nat
-	if !y.neg {
-		yWords = y.abs
-	}
-	// y >= 0
-
-	var mWords nat
-	if m != nil {
-		mWords = m.abs // m.abs may be nil for m == 0
-	}
-
-	z.abs = z.abs.expNN(x.abs, yWords, mWords)
-	z.neg = len(z.abs) > 0 && x.neg && len(yWords) > 0 && yWords[0]&1 == 1 // 0 has no sign
-	if z.neg && len(mWords) > 0 {
-		// make modulus result positive
-		z.abs = z.abs.sub(mWords, z.abs) // z == x**y mod |m| && 0 <= z < |m|
-		z.neg = false
-	}
-
-	return z
-}
-
-// GCD sets z to the greatest common divisor of a and b, which both must
-// be > 0, and returns z.
-// If x and y are not nil, GCD sets x and y such that z = a*x + b*y.
-// If either a or b is <= 0, GCD sets z = x = y = 0.
-func (z *Int) GCD(x, y, a, b *Int) *Int {
-	if a.Sign() <= 0 || b.Sign() <= 0 {
-		z.SetInt64(0)
-		if x != nil {
-			x.SetInt64(0)
-		}
-		if y != nil {
-			y.SetInt64(0)
-		}
-		return z
-	}
-	if x == nil && y == nil {
-		return z.binaryGCD(a, b)
-	}
-
-	A := new(Int).Set(a)
-	B := new(Int).Set(b)
-
-	X := new(Int)
-	Y := new(Int).SetInt64(1)
-
-	lastX := new(Int).SetInt64(1)
-	lastY := new(Int)
-
-	q := new(Int)
-	temp := new(Int)
-
-	for len(B.abs) > 0 {
-		r := new(Int)
-		q, r = q.QuoRem(A, B, r)
-
-		A, B = B, r
-
-		temp.Set(X)
-		X.Mul(X, q)
-		X.neg = !X.neg
-		X.Add(X, lastX)
-		lastX.Set(temp)
-
-		temp.Set(Y)
-		Y.Mul(Y, q)
-		Y.neg = !Y.neg
-		Y.Add(Y, lastY)
-		lastY.Set(temp)
-	}
-
-	if x != nil {
-		*x = *lastX
-	}
-
-	if y != nil {
-		*y = *lastY
-	}
-
-	*z = *A
-	return z
-}
-
-// binaryGCD sets z to the greatest common divisor of a and b, which both must
-// be > 0, and returns z.
-// See Knuth, The Art of Computer Programming, Vol. 2, Section 4.5.2, Algorithm B.
-func (z *Int) binaryGCD(a, b *Int) *Int {
-	u := z
-	v := new(Int)
-
-	// use one Euclidean iteration to ensure that u and v are approx. the same size
-	switch {
-	case len(a.abs) > len(b.abs):
-		u.Set(b)
-		v.Rem(a, b)
-	case len(a.abs) < len(b.abs):
-		u.Set(a)
-		v.Rem(b, a)
-	default:
-		u.Set(a)
-		v.Set(b)
-	}
-
-	// v might be 0 now
-	if len(v.abs) == 0 {
-		return u
-	}
-	// u > 0 && v > 0
-
-	// determine largest k such that u = u' << k, v = v' << k
-	k := u.abs.trailingZeroBits()
-	if vk := v.abs.trailingZeroBits(); vk < k {
-		k = vk
-	}
-	u.Rsh(u, k)
-	v.Rsh(v, k)
-
-	// determine t (we know that u > 0)
-	t := new(Int)
-	if u.abs[0]&1 != 0 {
-		// u is odd
-		t.Neg(v)
-	} else {
-		t.Set(u)
-	}
-
-	for len(t.abs) > 0 {
-		// reduce t
-		t.Rsh(t, t.abs.trailingZeroBits())
-		if t.neg {
-			v, t = t, v
-			v.neg = len(v.abs) > 0 && !v.neg // 0 has no sign
-		} else {
-			u, t = t, u
-		}
-		t.Sub(u, v)
-	}
-
-	return z.Lsh(u, k)
-}
-
-// ProbablyPrime performs n Miller-Rabin tests to check whether x is prime.
-// If it returns true, x is prime with probability 1 - 1/4^n.
-// If it returns false, x is not prime. n must be > 0.
-func (x *Int) ProbablyPrime(n int) bool {
-	if n <= 0 {
-		panic("non-positive n for ProbablyPrime")
-	}
-	return !x.neg && x.abs.probablyPrime(n)
-}
-
-// Rand sets z to a pseudo-random number in [0, n) and returns z.
-func (z *Int) Rand(rnd *rand.Rand, n *Int) *Int {
-	z.neg = false
-	if n.neg == true || len(n.abs) == 0 {
-		z.abs = nil
-		return z
-	}
-	z.abs = z.abs.random(rnd, n.abs, n.abs.bitLen())
-	return z
-}
-
-// ModInverse sets z to the multiplicative inverse of g in the ring ℤ/nℤ
-// and returns z. If g and n are not relatively prime, the result is undefined.
-func (z *Int) ModInverse(g, n *Int) *Int {
-	var d Int
-	d.GCD(z, nil, g, n)
-	// x and y are such that g*x + n*y = d. Since g and n are
-	// relatively prime, d = 1. Taking that modulo n results in
-	// g*x = 1, therefore x is the inverse element.
-	if z.neg {
-		z.Add(z, n)
-	}
-	return z
-}
-
-// Jacobi returns the Jacobi symbol (x/y), either +1, -1, or 0.
-// The y argument must be an odd integer.
-func Jacobi(x, y *Int) int {
-	if len(y.abs) == 0 || y.abs[0]&1 == 0 {
-		panic(fmt.Sprintf("big: invalid 2nd argument to Int.Jacobi: need odd integer but got %s", y))
-	}
-
-	// We use the formulation described in chapter 2, section 2.4,
-	// "The Yacas Book of Algorithms":
-	// http://yacas.sourceforge.net/Algo.book.pdf
-
-	var a, b, c Int
-	a.Set(x)
-	b.Set(y)
-	j := 1
-
-	if b.neg {
-		if a.neg {
-			j = -1
-		}
-		b.neg = false
-	}
-
-	for {
-		if b.Cmp(intOne) == 0 {
-			return j
-		}
-		if len(a.abs) == 0 {
-			return 0
-		}
-		a.Mod(&a, &b)
-		if len(a.abs) == 0 {
-			return 0
-		}
-		// a > 0
-
-		// handle factors of 2 in 'a'
-		s := a.abs.trailingZeroBits()
-		if s&1 != 0 {
-			bmod8 := b.abs[0] & 7
-			if bmod8 == 3 || bmod8 == 5 {
-				j = -j
-			}
-		}
-		c.Rsh(&a, s) // a = 2^s*c
-
-		// swap numerator and denominator
-		if b.abs[0]&3 == 3 && c.abs[0]&3 == 3 {
-			j = -j
-		}
-		a.Set(&b)
-		b.Set(&c)
-	}
-}
-
-// ModSqrt sets z to a square root of x mod p if such a square root exists, and
-// returns z. The modulus p must be an odd prime. If x is not a square mod p,
-// ModSqrt leaves z unchanged and returns nil. This function panics if p is
-// not an odd integer.
-func (z *Int) ModSqrt(x, p *Int) *Int {
-	switch Jacobi(x, p) {
-	case -1:
-		return nil // x is not a square mod p
-	case 0:
-		return z.SetInt64(0) // sqrt(0) mod p = 0
-	case 1:
-		break
-	}
-	if x.neg || x.Cmp(p) >= 0 { // ensure 0 <= x < p
-		x = new(Int).Mod(x, p)
-	}
-
-	// Break p-1 into s*2^e such that s is odd.
-	var s Int
-	s.Sub(p, intOne)
-	e := s.abs.trailingZeroBits()
-	s.Rsh(&s, e)
-
-	// find some non-square n
-	var n Int
-	n.SetInt64(2)
-	for Jacobi(&n, p) != -1 {
-		n.Add(&n, intOne)
-	}
-
-	// Core of the Tonelli-Shanks algorithm. Follows the description in
-	// section 6 of "Square roots from 1; 24, 51, 10 to Dan Shanks" by Ezra
-	// Brown:
-	// https://www.maa.org/sites/default/files/pdf/upload_library/22/Polya/07468342.di020786.02p0470a.pdf
-	var y, b, g, t Int
-	y.Add(&s, intOne)
-	y.Rsh(&y, 1)
-	y.Exp(x, &y, p)  // y = x^((s+1)/2)
-	b.Exp(x, &s, p)  // b = x^s
-	g.Exp(&n, &s, p) // g = n^s
-	r := e
-	for {
-		// find the least m such that ord_p(b) = 2^m
-		var m uint
-		t.Set(&b)
-		for t.Cmp(intOne) != 0 {
-			t.Mul(&t, &t).Mod(&t, p)
-			m++
-		}
-
-		if m == 0 {
-			return z.Set(&y)
-		}
-
-		t.SetInt64(0).SetBit(&t, int(r-m-1), 1).Exp(&g, &t, p)
-		// t = g^(2^(r-m-1)) mod p
-		g.Mul(&t, &t).Mod(&g, p) // g = g^(2^(r-m)) mod p
-		y.Mul(&y, &t).Mod(&y, p)
-		b.Mul(&b, &g).Mod(&b, p)
-		r = m
-	}
-}
-
-// Lsh sets z = x << n and returns z.
-func (z *Int) Lsh(x *Int, n uint) *Int {
-	z.abs = z.abs.shl(x.abs, n)
-	z.neg = x.neg
-	return z
-}
-
-// Rsh sets z = x >> n and returns z.
-func (z *Int) Rsh(x *Int, n uint) *Int {
-	if x.neg {
-		// (-x) >> s == ^(x-1) >> s == ^((x-1) >> s) == -(((x-1) >> s) + 1)
-		t := z.abs.sub(x.abs, natOne) // no underflow because |x| > 0
-		t = t.shr(t, n)
-		z.abs = t.add(t, natOne)
-		z.neg = true // z cannot be zero if x is negative
-		return z
-	}
-
-	z.abs = z.abs.shr(x.abs, n)
-	z.neg = false
-	return z
-}
-
-// Bit returns the value of the i'th bit of x. That is, it
-// returns (x>>i)&1. The bit index i must be >= 0.
-func (x *Int) Bit(i int) uint {
-	if i == 0 {
-		// optimization for common case: odd/even test of x
-		if len(x.abs) > 0 {
-			return uint(x.abs[0] & 1) // bit 0 is same for -x
-		}
-		return 0
-	}
-	if i < 0 {
-		panic("negative bit index")
-	}
-	if x.neg {
-		t := nat(nil).sub(x.abs, natOne)
-		return t.bit(uint(i)) ^ 1
-	}
-
-	return x.abs.bit(uint(i))
-}
-
-// SetBit sets z to x, with x's i'th bit set to b (0 or 1).
-// That is, if b is 1 SetBit sets z = x | (1 << i);
-// if b is 0 SetBit sets z = x &^ (1 << i). If b is not 0 or 1,
-// SetBit will panic.
-func (z *Int) SetBit(x *Int, i int, b uint) *Int {
-	if i < 0 {
-		panic("negative bit index")
-	}
-	if x.neg {
-		t := z.abs.sub(x.abs, natOne)
-		t = t.setBit(t, uint(i), b^1)
-		z.abs = t.add(t, natOne)
-		z.neg = len(z.abs) > 0
-		return z
-	}
-	z.abs = z.abs.setBit(x.abs, uint(i), b)
-	z.neg = false
-	return z
-}
-
-// And sets z = x & y and returns z.
-func (z *Int) And(x, y *Int) *Int {
-	if x.neg == y.neg {
-		if x.neg {
-			// (-x) & (-y) == ^(x-1) & ^(y-1) == ^((x-1) | (y-1)) == -(((x-1) | (y-1)) + 1)
-			x1 := nat(nil).sub(x.abs, natOne)
-			y1 := nat(nil).sub(y.abs, natOne)
-			z.abs = z.abs.add(z.abs.or(x1, y1), natOne)
-			z.neg = true // z cannot be zero if x and y are negative
-			return z
-		}
-
-		// x & y == x & y
-		z.abs = z.abs.and(x.abs, y.abs)
-		z.neg = false
-		return z
-	}
-
-	// x.neg != y.neg
-	if x.neg {
-		x, y = y, x // & is symmetric
-	}
-
-	// x & (-y) == x & ^(y-1) == x &^ (y-1)
-	y1 := nat(nil).sub(y.abs, natOne)
-	z.abs = z.abs.andNot(x.abs, y1)
-	z.neg = false
-	return z
-}
-
-// AndNot sets z = x &^ y and returns z.
-func (z *Int) AndNot(x, y *Int) *Int {
-	if x.neg == y.neg {
-		if x.neg {
-			// (-x) &^ (-y) == ^(x-1) &^ ^(y-1) == ^(x-1) & (y-1) == (y-1) &^ (x-1)
-			x1 := nat(nil).sub(x.abs, natOne)
-			y1 := nat(nil).sub(y.abs, natOne)
-			z.abs = z.abs.andNot(y1, x1)
-			z.neg = false
-			return z
-		}
-
-		// x &^ y == x &^ y
-		z.abs = z.abs.andNot(x.abs, y.abs)
-		z.neg = false
-		return z
-	}
-
-	if x.neg {
-		// (-x) &^ y == ^(x-1) &^ y == ^(x-1) & ^y == ^((x-1) | y) == -(((x-1) | y) + 1)
-		x1 := nat(nil).sub(x.abs, natOne)
-		z.abs = z.abs.add(z.abs.or(x1, y.abs), natOne)
-		z.neg = true // z cannot be zero if x is negative and y is positive
-		return z
-	}
-
-	// x &^ (-y) == x &^ ^(y-1) == x & (y-1)
-	y1 := nat(nil).sub(y.abs, natOne)
-	z.abs = z.abs.and(x.abs, y1)
-	z.neg = false
-	return z
-}
-
-// Or sets z = x | y and returns z.
-func (z *Int) Or(x, y *Int) *Int {
-	if x.neg == y.neg {
-		if x.neg {
-			// (-x) | (-y) == ^(x-1) | ^(y-1) == ^((x-1) & (y-1)) == -(((x-1) & (y-1)) + 1)
-			x1 := nat(nil).sub(x.abs, natOne)
-			y1 := nat(nil).sub(y.abs, natOne)
-			z.abs = z.abs.add(z.abs.and(x1, y1), natOne)
-			z.neg = true // z cannot be zero if x and y are negative
-			return z
-		}
-
-		// x | y == x | y
-		z.abs = z.abs.or(x.abs, y.abs)
-		z.neg = false
-		return z
-	}
-
-	// x.neg != y.neg
-	if x.neg {
-		x, y = y, x // | is symmetric
-	}
-
-	// x | (-y) == x | ^(y-1) == ^((y-1) &^ x) == -(^((y-1) &^ x) + 1)
-	y1 := nat(nil).sub(y.abs, natOne)
-	z.abs = z.abs.add(z.abs.andNot(y1, x.abs), natOne)
-	z.neg = true // z cannot be zero if one of x or y is negative
-	return z
-}
-
-// Xor sets z = x ^ y and returns z.
-func (z *Int) Xor(x, y *Int) *Int {
-	if x.neg == y.neg {
-		if x.neg {
-			// (-x) ^ (-y) == ^(x-1) ^ ^(y-1) == (x-1) ^ (y-1)
-			x1 := nat(nil).sub(x.abs, natOne)
-			y1 := nat(nil).sub(y.abs, natOne)
-			z.abs = z.abs.xor(x1, y1)
-			z.neg = false
-			return z
-		}
-
-		// x ^ y == x ^ y
-		z.abs = z.abs.xor(x.abs, y.abs)
-		z.neg = false
-		return z
-	}
-
-	// x.neg != y.neg
-	if x.neg {
-		x, y = y, x // ^ is symmetric
-	}
-
-	// x ^ (-y) == x ^ ^(y-1) == ^(x ^ (y-1)) == -((x ^ (y-1)) + 1)
-	y1 := nat(nil).sub(y.abs, natOne)
-	z.abs = z.abs.add(z.abs.xor(x.abs, y1), natOne)
-	z.neg = true // z cannot be zero if only one of x or y is negative
-	return z
-}
-
-// Not sets z = ^x and returns z.
-func (z *Int) Not(x *Int) *Int {
-	if x.neg {
-		// ^(-x) == ^(^(x-1)) == x-1
-		z.abs = z.abs.sub(x.abs, natOne)
-		z.neg = false
-		return z
-	}
-
-	// ^x == -x-1 == -(x+1)
-	z.abs = z.abs.add(x.abs, natOne)
-	z.neg = true // z cannot be zero if x is positive
-	return z
-}
-
-// Gob codec version. Permits backward-compatible changes to the encoding.
-const intGobVersion byte = 1
-
-// GobEncode implements the gob.GobEncoder interface.
-func (x *Int) GobEncode() ([]byte, error) {
-	if x == nil {
-		return nil, nil
-	}
-	buf := make([]byte, 1+len(x.abs)*_S) // extra byte for version and sign bit
-	i := x.abs.bytes(buf) - 1            // i >= 0
-	b := intGobVersion << 1              // make space for sign bit
-	if x.neg {
-		b |= 1
-	}
-	buf[i] = b
-	return buf[i:], nil
-}
-
-// GobDecode implements the gob.GobDecoder interface.
-func (z *Int) GobDecode(buf []byte) error {
-	if len(buf) == 0 {
-		// Other side sent a nil or default value.
-		*z = Int{}
-		return nil
-	}
-	b := buf[0]
-	if b>>1 != intGobVersion {
-		return fmt.Errorf("Int.GobDecode: encoding version %d not supported", b>>1)
-	}
-	z.neg = b&1 != 0
-	z.abs = z.abs.setBytes(buf[1:])
-	return nil
-}
-
-// MarshalJSON implements the json.Marshaler interface.
-func (z *Int) MarshalJSON() ([]byte, error) {
-	// TODO(gri): get rid of the []byte/string conversions
-	return []byte(z.String()), nil
-}
-
-// UnmarshalJSON implements the json.Unmarshaler interface.
-func (z *Int) UnmarshalJSON(text []byte) error {
-	// TODO(gri): get rid of the []byte/string conversions
-	if _, ok := z.SetString(string(text), 0); !ok {
-		return fmt.Errorf("math/big: cannot unmarshal %q into a *big.Int", text)
-	}
-	return nil
-}
-
-// MarshalText implements the encoding.TextMarshaler interface.
-func (z *Int) MarshalText() (text []byte, err error) {
-	return []byte(z.String()), nil
-}
-
-// UnmarshalText implements the encoding.TextUnmarshaler interface.
-func (z *Int) UnmarshalText(text []byte) error {
-	if _, ok := z.SetString(string(text), 0); !ok {
-		return fmt.Errorf("math/big: cannot unmarshal %q into a *big.Int", text)
-	}
-	return nil
-}
diff --git a/src/cmd/compile/internal/big/int_test.go b/src/cmd/compile/internal/big/int_test.go
deleted file mode 100644
index 16eed9a..0000000
--- a/src/cmd/compile/internal/big/int_test.go
+++ /dev/null
@@ -1,1525 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package big
-
-import (
-	"bytes"
-	"encoding/gob"
-	"encoding/hex"
-	"encoding/json"
-	"encoding/xml"
-	"fmt"
-	"math/rand"
-	"testing"
-	"testing/quick"
-)
-
-func isNormalized(x *Int) bool {
-	if len(x.abs) == 0 {
-		return !x.neg
-	}
-	// len(x.abs) > 0
-	return x.abs[len(x.abs)-1] != 0
-}
-
-type funZZ func(z, x, y *Int) *Int
-type argZZ struct {
-	z, x, y *Int
-}
-
-var sumZZ = []argZZ{
-	{NewInt(0), NewInt(0), NewInt(0)},
-	{NewInt(1), NewInt(1), NewInt(0)},
-	{NewInt(1111111110), NewInt(123456789), NewInt(987654321)},
-	{NewInt(-1), NewInt(-1), NewInt(0)},
-	{NewInt(864197532), NewInt(-123456789), NewInt(987654321)},
-	{NewInt(-1111111110), NewInt(-123456789), NewInt(-987654321)},
-}
-
-var prodZZ = []argZZ{
-	{NewInt(0), NewInt(0), NewInt(0)},
-	{NewInt(0), NewInt(1), NewInt(0)},
-	{NewInt(1), NewInt(1), NewInt(1)},
-	{NewInt(-991 * 991), NewInt(991), NewInt(-991)},
-	// TODO(gri) add larger products
-}
-
-func TestSignZ(t *testing.T) {
-	var zero Int
-	for _, a := range sumZZ {
-		s := a.z.Sign()
-		e := a.z.Cmp(&zero)
-		if s != e {
-			t.Errorf("got %d; want %d for z = %v", s, e, a.z)
-		}
-	}
-}
-
-func TestSetZ(t *testing.T) {
-	for _, a := range sumZZ {
-		var z Int
-		z.Set(a.z)
-		if !isNormalized(&z) {
-			t.Errorf("%v is not normalized", z)
-		}
-		if (&z).Cmp(a.z) != 0 {
-			t.Errorf("got z = %v; want %v", z, a.z)
-		}
-	}
-}
-
-func TestAbsZ(t *testing.T) {
-	var zero Int
-	for _, a := range sumZZ {
-		var z Int
-		z.Abs(a.z)
-		var e Int
-		e.Set(a.z)
-		if e.Cmp(&zero) < 0 {
-			e.Sub(&zero, &e)
-		}
-		if z.Cmp(&e) != 0 {
-			t.Errorf("got z = %v; want %v", z, e)
-		}
-	}
-}
-
-func testFunZZ(t *testing.T, msg string, f funZZ, a argZZ) {
-	var z Int
-	f(&z, a.x, a.y)
-	if !isNormalized(&z) {
-		t.Errorf("%s%v is not normalized", msg, z)
-	}
-	if (&z).Cmp(a.z) != 0 {
-		t.Errorf("%s%+v\n\tgot z = %v; want %v", msg, a, &z, a.z)
-	}
-}
-
-func TestSumZZ(t *testing.T) {
-	AddZZ := func(z, x, y *Int) *Int { return z.Add(x, y) }
-	SubZZ := func(z, x, y *Int) *Int { return z.Sub(x, y) }
-	for _, a := range sumZZ {
-		arg := a
-		testFunZZ(t, "AddZZ", AddZZ, arg)
-
-		arg = argZZ{a.z, a.y, a.x}
-		testFunZZ(t, "AddZZ symmetric", AddZZ, arg)
-
-		arg = argZZ{a.x, a.z, a.y}
-		testFunZZ(t, "SubZZ", SubZZ, arg)
-
-		arg = argZZ{a.y, a.z, a.x}
-		testFunZZ(t, "SubZZ symmetric", SubZZ, arg)
-	}
-}
-
-func TestProdZZ(t *testing.T) {
-	MulZZ := func(z, x, y *Int) *Int { return z.Mul(x, y) }
-	for _, a := range prodZZ {
-		arg := a
-		testFunZZ(t, "MulZZ", MulZZ, arg)
-
-		arg = argZZ{a.z, a.y, a.x}
-		testFunZZ(t, "MulZZ symmetric", MulZZ, arg)
-	}
-}
-
-// mulBytes returns x*y via grade school multiplication. Both inputs
-// and the result are assumed to be in big-endian representation (to
-// match the semantics of Int.Bytes and Int.SetBytes).
-func mulBytes(x, y []byte) []byte {
-	z := make([]byte, len(x)+len(y))
-
-	// multiply
-	k0 := len(z) - 1
-	for j := len(y) - 1; j >= 0; j-- {
-		d := int(y[j])
-		if d != 0 {
-			k := k0
-			carry := 0
-			for i := len(x) - 1; i >= 0; i-- {
-				t := int(z[k]) + int(x[i])*d + carry
-				z[k], carry = byte(t), t>>8
-				k--
-			}
-			z[k] = byte(carry)
-		}
-		k0--
-	}
-
-	// normalize (remove leading 0's)
-	i := 0
-	for i < len(z) && z[i] == 0 {
-		i++
-	}
-
-	return z[i:]
-}
-
-func checkMul(a, b []byte) bool {
-	var x, y, z1 Int
-	x.SetBytes(a)
-	y.SetBytes(b)
-	z1.Mul(&x, &y)
-
-	var z2 Int
-	z2.SetBytes(mulBytes(a, b))
-
-	return z1.Cmp(&z2) == 0
-}
-
-func TestMul(t *testing.T) {
-	if err := quick.Check(checkMul, nil); err != nil {
-		t.Error(err)
-	}
-}
-
-var mulRangesZ = []struct {
-	a, b int64
-	prod string
-}{
-	// entirely positive ranges are covered by mulRangesN
-	{-1, 1, "0"},
-	{-2, -1, "2"},
-	{-3, -2, "6"},
-	{-3, -1, "-6"},
-	{1, 3, "6"},
-	{-10, -10, "-10"},
-	{0, -1, "1"},                      // empty range
-	{-1, -100, "1"},                   // empty range
-	{-1, 1, "0"},                      // range includes 0
-	{-1e9, 0, "0"},                    // range includes 0
-	{-1e9, 1e9, "0"},                  // range includes 0
-	{-10, -1, "3628800"},              // 10!
-	{-20, -2, "-2432902008176640000"}, // -20!
-	{-99, -1,
-		"-933262154439441526816992388562667004907159682643816214685929" +
-			"638952175999932299156089414639761565182862536979208272237582" +
-			"511852109168640000000000000000000000", // -99!
-	},
-}
-
-func TestMulRangeZ(t *testing.T) {
-	var tmp Int
-	// test entirely positive ranges
-	for i, r := range mulRangesN {
-		prod := tmp.MulRange(int64(r.a), int64(r.b)).String()
-		if prod != r.prod {
-			t.Errorf("#%da: got %s; want %s", i, prod, r.prod)
-		}
-	}
-	// test other ranges
-	for i, r := range mulRangesZ {
-		prod := tmp.MulRange(r.a, r.b).String()
-		if prod != r.prod {
-			t.Errorf("#%db: got %s; want %s", i, prod, r.prod)
-		}
-	}
-}
-
-func TestBinomial(t *testing.T) {
-	var z Int
-	for _, test := range []struct {
-		n, k int64
-		want string
-	}{
-		{0, 0, "1"},
-		{0, 1, "0"},
-		{1, 0, "1"},
-		{1, 1, "1"},
-		{1, 10, "0"},
-		{4, 0, "1"},
-		{4, 1, "4"},
-		{4, 2, "6"},
-		{4, 3, "4"},
-		{4, 4, "1"},
-		{10, 1, "10"},
-		{10, 9, "10"},
-		{10, 5, "252"},
-		{11, 5, "462"},
-		{11, 6, "462"},
-		{100, 10, "17310309456440"},
-		{100, 90, "17310309456440"},
-		{1000, 10, "263409560461970212832400"},
-		{1000, 990, "263409560461970212832400"},
-	} {
-		if got := z.Binomial(test.n, test.k).String(); got != test.want {
-			t.Errorf("Binomial(%d, %d) = %s; want %s", test.n, test.k, got, test.want)
-		}
-	}
-}
-
-func BenchmarkBinomial(b *testing.B) {
-	var z Int
-	for i := b.N - 1; i >= 0; i-- {
-		z.Binomial(1000, 990)
-	}
-}
-
-// Examples from the Go Language Spec, section "Arithmetic operators"
-var divisionSignsTests = []struct {
-	x, y int64
-	q, r int64 // T-division
-	d, m int64 // Euclidian division
-}{
-	{5, 3, 1, 2, 1, 2},
-	{-5, 3, -1, -2, -2, 1},
-	{5, -3, -1, 2, -1, 2},
-	{-5, -3, 1, -2, 2, 1},
-	{1, 2, 0, 1, 0, 1},
-	{8, 4, 2, 0, 2, 0},
-}
-
-func TestDivisionSigns(t *testing.T) {
-	for i, test := range divisionSignsTests {
-		x := NewInt(test.x)
-		y := NewInt(test.y)
-		q := NewInt(test.q)
-		r := NewInt(test.r)
-		d := NewInt(test.d)
-		m := NewInt(test.m)
-
-		q1 := new(Int).Quo(x, y)
-		r1 := new(Int).Rem(x, y)
-		if !isNormalized(q1) {
-			t.Errorf("#%d Quo: %v is not normalized", i, *q1)
-		}
-		if !isNormalized(r1) {
-			t.Errorf("#%d Rem: %v is not normalized", i, *r1)
-		}
-		if q1.Cmp(q) != 0 || r1.Cmp(r) != 0 {
-			t.Errorf("#%d QuoRem: got (%s, %s), want (%s, %s)", i, q1, r1, q, r)
-		}
-
-		q2, r2 := new(Int).QuoRem(x, y, new(Int))
-		if !isNormalized(q2) {
-			t.Errorf("#%d Quo: %v is not normalized", i, *q2)
-		}
-		if !isNormalized(r2) {
-			t.Errorf("#%d Rem: %v is not normalized", i, *r2)
-		}
-		if q2.Cmp(q) != 0 || r2.Cmp(r) != 0 {
-			t.Errorf("#%d QuoRem: got (%s, %s), want (%s, %s)", i, q2, r2, q, r)
-		}
-
-		d1 := new(Int).Div(x, y)
-		m1 := new(Int).Mod(x, y)
-		if !isNormalized(d1) {
-			t.Errorf("#%d Div: %v is not normalized", i, *d1)
-		}
-		if !isNormalized(m1) {
-			t.Errorf("#%d Mod: %v is not normalized", i, *m1)
-		}
-		if d1.Cmp(d) != 0 || m1.Cmp(m) != 0 {
-			t.Errorf("#%d DivMod: got (%s, %s), want (%s, %s)", i, d1, m1, d, m)
-		}
-
-		d2, m2 := new(Int).DivMod(x, y, new(Int))
-		if !isNormalized(d2) {
-			t.Errorf("#%d Div: %v is not normalized", i, *d2)
-		}
-		if !isNormalized(m2) {
-			t.Errorf("#%d Mod: %v is not normalized", i, *m2)
-		}
-		if d2.Cmp(d) != 0 || m2.Cmp(m) != 0 {
-			t.Errorf("#%d DivMod: got (%s, %s), want (%s, %s)", i, d2, m2, d, m)
-		}
-	}
-}
-
-func norm(x nat) nat {
-	i := len(x)
-	for i > 0 && x[i-1] == 0 {
-		i--
-	}
-	return x[:i]
-}
-
-func TestBits(t *testing.T) {
-	for _, test := range []nat{
-		nil,
-		{0},
-		{1},
-		{0, 1, 2, 3, 4},
-		{4, 3, 2, 1, 0},
-		{4, 3, 2, 1, 0, 0, 0, 0},
-	} {
-		var z Int
-		z.neg = true
-		got := z.SetBits(test)
-		want := norm(test)
-		if got.abs.cmp(want) != 0 {
-			t.Errorf("SetBits(%v) = %v; want %v", test, got.abs, want)
-		}
-
-		if got.neg {
-			t.Errorf("SetBits(%v): got negative result", test)
-		}
-
-		bits := nat(z.Bits())
-		if bits.cmp(want) != 0 {
-			t.Errorf("%v.Bits() = %v; want %v", z.abs, bits, want)
-		}
-	}
-}
-
-func checkSetBytes(b []byte) bool {
-	hex1 := hex.EncodeToString(new(Int).SetBytes(b).Bytes())
-	hex2 := hex.EncodeToString(b)
-
-	for len(hex1) < len(hex2) {
-		hex1 = "0" + hex1
-	}
-
-	for len(hex1) > len(hex2) {
-		hex2 = "0" + hex2
-	}
-
-	return hex1 == hex2
-}
-
-func TestSetBytes(t *testing.T) {
-	if err := quick.Check(checkSetBytes, nil); err != nil {
-		t.Error(err)
-	}
-}
-
-func checkBytes(b []byte) bool {
-	b2 := new(Int).SetBytes(b).Bytes()
-	return bytes.Equal(b, b2)
-}
-
-func TestBytes(t *testing.T) {
-	if err := quick.Check(checkBytes, nil); err != nil {
-		t.Error(err)
-	}
-}
-
-func checkQuo(x, y []byte) bool {
-	u := new(Int).SetBytes(x)
-	v := new(Int).SetBytes(y)
-
-	if len(v.abs) == 0 {
-		return true
-	}
-
-	r := new(Int)
-	q, r := new(Int).QuoRem(u, v, r)
-
-	if r.Cmp(v) >= 0 {
-		return false
-	}
-
-	uprime := new(Int).Set(q)
-	uprime.Mul(uprime, v)
-	uprime.Add(uprime, r)
-
-	return uprime.Cmp(u) == 0
-}
-
-var quoTests = []struct {
-	x, y string
-	q, r string
-}{
-	{
-		"476217953993950760840509444250624797097991362735329973741718102894495832294430498335824897858659711275234906400899559094370964723884706254265559534144986498357",
-		"9353930466774385905609975137998169297361893554149986716853295022578535724979483772383667534691121982974895531435241089241440253066816724367338287092081996",
-		"50911",
-		"1",
-	},
-	{
-		"11510768301994997771168",
-		"1328165573307167369775",
-		"8",
-		"885443715537658812968",
-	},
-}
-
-func TestQuo(t *testing.T) {
-	if err := quick.Check(checkQuo, nil); err != nil {
-		t.Error(err)
-	}
-
-	for i, test := range quoTests {
-		x, _ := new(Int).SetString(test.x, 10)
-		y, _ := new(Int).SetString(test.y, 10)
-		expectedQ, _ := new(Int).SetString(test.q, 10)
-		expectedR, _ := new(Int).SetString(test.r, 10)
-
-		r := new(Int)
-		q, r := new(Int).QuoRem(x, y, r)
-
-		if q.Cmp(expectedQ) != 0 || r.Cmp(expectedR) != 0 {
-			t.Errorf("#%d got (%s, %s) want (%s, %s)", i, q, r, expectedQ, expectedR)
-		}
-	}
-}
-
-func TestQuoStepD6(t *testing.T) {
-	// See Knuth, Volume 2, section 4.3.1, exercise 21. This code exercises
-	// a code path which only triggers 1 in 10^{-19} cases.
-
-	u := &Int{false, nat{0, 0, 1 + 1<<(_W-1), _M ^ (1 << (_W - 1))}}
-	v := &Int{false, nat{5, 2 + 1<<(_W-1), 1 << (_W - 1)}}
-
-	r := new(Int)
-	q, r := new(Int).QuoRem(u, v, r)
-	const expectedQ64 = "18446744073709551613"
-	const expectedR64 = "3138550867693340382088035895064302439801311770021610913807"
-	const expectedQ32 = "4294967293"
-	const expectedR32 = "39614081266355540837921718287"
-	if q.String() != expectedQ64 && q.String() != expectedQ32 ||
-		r.String() != expectedR64 && r.String() != expectedR32 {
-		t.Errorf("got (%s, %s) want (%s, %s) or (%s, %s)", q, r, expectedQ64, expectedR64, expectedQ32, expectedR32)
-	}
-}
-
-var bitLenTests = []struct {
-	in  string
-	out int
-}{
-	{"-1", 1},
-	{"0", 0},
-	{"1", 1},
-	{"2", 2},
-	{"4", 3},
-	{"0xabc", 12},
-	{"0x8000", 16},
-	{"0x80000000", 32},
-	{"0x800000000000", 48},
-	{"0x8000000000000000", 64},
-	{"0x80000000000000000000", 80},
-	{"-0x4000000000000000000000", 87},
-}
-
-func TestBitLen(t *testing.T) {
-	for i, test := range bitLenTests {
-		x, ok := new(Int).SetString(test.in, 0)
-		if !ok {
-			t.Errorf("#%d test input invalid: %s", i, test.in)
-			continue
-		}
-
-		if n := x.BitLen(); n != test.out {
-			t.Errorf("#%d got %d want %d", i, n, test.out)
-		}
-	}
-}
-
-var expTests = []struct {
-	x, y, m string
-	out     string
-}{
-	// y <= 0
-	{"0", "0", "", "1"},
-	{"1", "0", "", "1"},
-	{"-10", "0", "", "1"},
-	{"1234", "-1", "", "1"},
-
-	// m == 1
-	{"0", "0", "1", "0"},
-	{"1", "0", "1", "0"},
-	{"-10", "0", "1", "0"},
-	{"1234", "-1", "1", "0"},
-
-	// misc
-	{"5", "1", "3", "2"},
-	{"5", "-7", "", "1"},
-	{"-5", "-7", "", "1"},
-	{"5", "0", "", "1"},
-	{"-5", "0", "", "1"},
-	{"5", "1", "", "5"},
-	{"-5", "1", "", "-5"},
-	{"-5", "1", "7", "2"},
-	{"-2", "3", "2", "0"},
-	{"5", "2", "", "25"},
-	{"1", "65537", "2", "1"},
-	{"0x8000000000000000", "2", "", "0x40000000000000000000000000000000"},
-	{"0x8000000000000000", "2", "6719", "4944"},
-	{"0x8000000000000000", "3", "6719", "5447"},
-	{"0x8000000000000000", "1000", "6719", "1603"},
-	{"0x8000000000000000", "1000000", "6719", "3199"},
-	{"0x8000000000000000", "-1000000", "6719", "1"},
-	{
-		"2938462938472983472983659726349017249287491026512746239764525612965293865296239471239874193284792387498274256129746192347",
-		"298472983472983471903246121093472394872319615612417471234712061",
-		"29834729834729834729347290846729561262544958723956495615629569234729836259263598127342374289365912465901365498236492183464",
-		"23537740700184054162508175125554701713153216681790245129157191391322321508055833908509185839069455749219131480588829346291",
-	},
-	// test case for issue 8822
-	{
-		"-0x1BCE04427D8032319A89E5C4136456671AC620883F2C4139E57F91307C485AD2D6204F4F87A58262652DB5DBBAC72B0613E51B835E7153BEC6068F5C8D696B74DBD18FEC316AEF73985CF0475663208EB46B4F17DD9DA55367B03323E5491A70997B90C059FB34809E6EE55BCFBD5F2F52233BFE62E6AA9E4E26A1D4C2439883D14F2633D55D8AA66A1ACD5595E778AC3A280517F1157989E70C1A437B849F1877B779CC3CDDEDE2DAA6594A6C66D181A00A5F777EE60596D8773998F6E988DEAE4CCA60E4DDCF9590543C89F74F603259FCAD71660D30294FBBE6490300F78A9D63FA660DC9417B8B9DDA28BEB3977B621B98 [...]
-		"0xB08FFB20760FFED58FADA86DFEF71AD72AA0FA763219618FE022C197E54708BB1191C66470250FCE8879487507CEE41381CA4D932F81C2B3F1AB20B539D50DCD",
-		"0xAC6BDB41324A9A9BF166DE5E1389582FAF72B6651987EE07FC3192943DB56050A37329CBB4A099ED8193E0757767A13DD52312AB4B03310DCD7F48A9DA04FD50E8083969EDB767B0CF6095179A163AB3661A05FBD5FAAAE82918A9962F0B93B855F97993EC975EEAA80D740ADBF4FF747359D041D5C33EA71D281E446B14773BCA97B43A23FB801676BD207A436C6481F1D2B9078717461A5B9D32E688F87748544523B524B0D57D5EA77A2775D2ECFA032CFBDBF52FB3786160279004E57AE6AF874E7303CE53299CCC041C7BC308D82A5698F3A8D0C38271AE35F8E9DBFBB694B5C803D89F7AE435DE236D525F54759B65E37 [...]
-		"214842521977763024996399388837777103219931130979872010505011829095813593576185795667465563725893853616836105247305090413288550665149633855225708948390358847130516401714741865487135466864767613064364341464751401562843891818086750165768458333404948482836810888865842197505544080605567694866280290287207273932931116788263564804554339092335205041120744013761330771504712375494741491902420104695390064495966115766125739557543490423291306311282346379247864665857034884605402284774408534933920862 [...]
-	},
-}
-
-func TestExp(t *testing.T) {
-	for i, test := range expTests {
-		x, ok1 := new(Int).SetString(test.x, 0)
-		y, ok2 := new(Int).SetString(test.y, 0)
-		out, ok3 := new(Int).SetString(test.out, 0)
-
-		var ok4 bool
-		var m *Int
-
-		if len(test.m) == 0 {
-			m, ok4 = nil, true
-		} else {
-			m, ok4 = new(Int).SetString(test.m, 0)
-		}
-
-		if !ok1 || !ok2 || !ok3 || !ok4 {
-			t.Errorf("#%d: error in input", i)
-			continue
-		}
-
-		z1 := new(Int).Exp(x, y, m)
-		if !isNormalized(z1) {
-			t.Errorf("#%d: %v is not normalized", i, *z1)
-		}
-		if z1.Cmp(out) != 0 {
-			t.Errorf("#%d: got %s want %s", i, z1, out)
-		}
-
-		if m == nil {
-			// The result should be the same as for m == 0;
-			// specifically, there should be no div-zero panic.
-			m = &Int{abs: nat{}} // m != nil && len(m.abs) == 0
-			z2 := new(Int).Exp(x, y, m)
-			if z2.Cmp(z1) != 0 {
-				t.Errorf("#%d: got %s want %s", i, z2, z1)
-			}
-		}
-	}
-}
-
-func checkGcd(aBytes, bBytes []byte) bool {
-	x := new(Int)
-	y := new(Int)
-	a := new(Int).SetBytes(aBytes)
-	b := new(Int).SetBytes(bBytes)
-
-	d := new(Int).GCD(x, y, a, b)
-	x.Mul(x, a)
-	y.Mul(y, b)
-	x.Add(x, y)
-
-	return x.Cmp(d) == 0
-}
-
-var gcdTests = []struct {
-	d, x, y, a, b string
-}{
-	// a <= 0 || b <= 0
-	{"0", "0", "0", "0", "0"},
-	{"0", "0", "0", "0", "7"},
-	{"0", "0", "0", "11", "0"},
-	{"0", "0", "0", "-77", "35"},
-	{"0", "0", "0", "64515", "-24310"},
-	{"0", "0", "0", "-64515", "-24310"},
-
-	{"1", "-9", "47", "120", "23"},
-	{"7", "1", "-2", "77", "35"},
-	{"935", "-3", "8", "64515", "24310"},
-	{"935000000000000000", "-3", "8", "64515000000000000000", "24310000000000000000"},
-	{"1", "-221", "22059940471369027483332068679400581064239780177629666810348940098015901108344", "98920366548084643601728869055592650835572950932266967461790948584315647051443", "991"},
-
-	// test early exit (after one Euclidean iteration) in binaryGCD
-	{"1", "", "", "1", "98920366548084643601728869055592650835572950932266967461790948584315647051443"},
-}
-
-func testGcd(t *testing.T, d, x, y, a, b *Int) {
-	var X *Int
-	if x != nil {
-		X = new(Int)
-	}
-	var Y *Int
-	if y != nil {
-		Y = new(Int)
-	}
-
-	D := new(Int).GCD(X, Y, a, b)
-	if D.Cmp(d) != 0 {
-		t.Errorf("GCD(%s, %s): got d = %s, want %s", a, b, D, d)
-	}
-	if x != nil && X.Cmp(x) != 0 {
-		t.Errorf("GCD(%s, %s): got x = %s, want %s", a, b, X, x)
-	}
-	if y != nil && Y.Cmp(y) != 0 {
-		t.Errorf("GCD(%s, %s): got y = %s, want %s", a, b, Y, y)
-	}
-
-	// binaryGCD requires a > 0 && b > 0
-	if a.Sign() <= 0 || b.Sign() <= 0 {
-		return
-	}
-
-	D.binaryGCD(a, b)
-	if D.Cmp(d) != 0 {
-		t.Errorf("binaryGcd(%s, %s): got d = %s, want %s", a, b, D, d)
-	}
-}
-
-func TestGcd(t *testing.T) {
-	for _, test := range gcdTests {
-		d, _ := new(Int).SetString(test.d, 0)
-		x, _ := new(Int).SetString(test.x, 0)
-		y, _ := new(Int).SetString(test.y, 0)
-		a, _ := new(Int).SetString(test.a, 0)
-		b, _ := new(Int).SetString(test.b, 0)
-
-		testGcd(t, d, nil, nil, a, b)
-		testGcd(t, d, x, nil, a, b)
-		testGcd(t, d, nil, y, a, b)
-		testGcd(t, d, x, y, a, b)
-	}
-
-	quick.Check(checkGcd, nil)
-}
-
-var primes = []string{
-	"2",
-	"3",
-	"5",
-	"7",
-	"11",
-
-	"13756265695458089029",
-	"13496181268022124907",
-	"10953742525620032441",
-	"17908251027575790097",
-
-	// https://golang.org/issue/638
-	"18699199384836356663",
-
-	"98920366548084643601728869055592650835572950932266967461790948584315647051443",
-	"94560208308847015747498523884063394671606671904944666360068158221458669711639",
-
-	// http://primes.utm.edu/lists/small/small3.html
-	"449417999055441493994709297093108513015373787049558499205492347871729927573118262811508386655998299074566974373711472560655026288668094291699357843464363003144674940345912431129144354948751003607115263071543163",
-	"230975859993204150666423538988557839555560243929065415434980904258310530753006723857139742334640122533598517597674807096648905501653461687601339782814316124971547968912893214002992086353183070342498989426570593",
-	"5521712099665906221540423207019333379125265462121169655563495403888449493493629943498064604536961775110765377745550377067893607246020694972959780839151452457728855382113555867743022746090187341871655890805971735385789993",
-	"203956878356401977405765866929034577280193993314348263094772646453283062722701277632936616063144088173312372882677123879538709400158306567338328279154499698366071906766440037074217117805690872792848149112022286332144876183376326512083574821647933992961249917319836219304274280243803104015000563790123",
-
-	// ECC primes: http://tools.ietf.org/html/draft-ladd-safecurves-02
-	"3618502788666131106986593281521497120414687020801267626233049500247285301239",                                                                                  // Curve1174: 2^251-9
-	"57896044618658097711785492504343953926634992332820282019728792003956564819949",                                                                                 // Curve25519: 2^255-19
-	"9850501549098619803069760025035903451269934817616361666987073351061430442874302652853566563721228910201656997576599",                                           // E-382: 2^382-105
-	"42307582002575910332922579714097346549017899709713998034217522897561970639123926132812109468141778230245837569601494931472367",                                 // Curve41417: 2^414-17
-	"6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057151", // E-521: 2^521-1
-}
-
-var composites = []string{
-	"0",
-	"1",
-	"21284175091214687912771199898307297748211672914763848041968395774954376176754",
-	"6084766654921918907427900243509372380954290099172559290432744450051395395951",
-	"84594350493221918389213352992032324280367711247940675652888030554255915464401",
-	"82793403787388584738507275144194252681",
-}
-
-func TestProbablyPrime(t *testing.T) {
-	nreps := 20
-	if testing.Short() {
-		nreps = 1
-	}
-	for i, s := range primes {
-		p, _ := new(Int).SetString(s, 10)
-		if !p.ProbablyPrime(nreps) {
-			t.Errorf("#%d prime found to be non-prime (%s)", i, s)
-		}
-	}
-
-	for i, s := range composites {
-		c, _ := new(Int).SetString(s, 10)
-		if c.ProbablyPrime(nreps) {
-			t.Errorf("#%d composite found to be prime (%s)", i, s)
-		}
-		if testing.Short() {
-			break
-		}
-	}
-
-	// check that ProbablyPrime panics if n <= 0
-	c := NewInt(11) // a prime
-	for _, n := range []int{-1, 0, 1} {
-		func() {
-			defer func() {
-				if n <= 0 && recover() == nil {
-					t.Fatalf("expected panic from ProbablyPrime(%d)", n)
-				}
-			}()
-			if !c.ProbablyPrime(n) {
-				t.Fatalf("%v should be a prime", c)
-			}
-		}()
-	}
-}
-
-type intShiftTest struct {
-	in    string
-	shift uint
-	out   string
-}
-
-var rshTests = []intShiftTest{
-	{"0", 0, "0"},
-	{"-0", 0, "0"},
-	{"0", 1, "0"},
-	{"0", 2, "0"},
-	{"1", 0, "1"},
-	{"1", 1, "0"},
-	{"1", 2, "0"},
-	{"2", 0, "2"},
-	{"2", 1, "1"},
-	{"-1", 0, "-1"},
-	{"-1", 1, "-1"},
-	{"-1", 10, "-1"},
-	{"-100", 2, "-25"},
-	{"-100", 3, "-13"},
-	{"-100", 100, "-1"},
-	{"4294967296", 0, "4294967296"},
-	{"4294967296", 1, "2147483648"},
-	{"4294967296", 2, "1073741824"},
-	{"18446744073709551616", 0, "18446744073709551616"},
-	{"18446744073709551616", 1, "9223372036854775808"},
-	{"18446744073709551616", 2, "4611686018427387904"},
-	{"18446744073709551616", 64, "1"},
-	{"340282366920938463463374607431768211456", 64, "18446744073709551616"},
-	{"340282366920938463463374607431768211456", 128, "1"},
-}
-
-func TestRsh(t *testing.T) {
-	for i, test := range rshTests {
-		in, _ := new(Int).SetString(test.in, 10)
-		expected, _ := new(Int).SetString(test.out, 10)
-		out := new(Int).Rsh(in, test.shift)
-
-		if !isNormalized(out) {
-			t.Errorf("#%d: %v is not normalized", i, *out)
-		}
-		if out.Cmp(expected) != 0 {
-			t.Errorf("#%d: got %s want %s", i, out, expected)
-		}
-	}
-}
-
-func TestRshSelf(t *testing.T) {
-	for i, test := range rshTests {
-		z, _ := new(Int).SetString(test.in, 10)
-		expected, _ := new(Int).SetString(test.out, 10)
-		z.Rsh(z, test.shift)
-
-		if !isNormalized(z) {
-			t.Errorf("#%d: %v is not normalized", i, *z)
-		}
-		if z.Cmp(expected) != 0 {
-			t.Errorf("#%d: got %s want %s", i, z, expected)
-		}
-	}
-}
-
-var lshTests = []intShiftTest{
-	{"0", 0, "0"},
-	{"0", 1, "0"},
-	{"0", 2, "0"},
-	{"1", 0, "1"},
-	{"1", 1, "2"},
-	{"1", 2, "4"},
-	{"2", 0, "2"},
-	{"2", 1, "4"},
-	{"2", 2, "8"},
-	{"-87", 1, "-174"},
-	{"4294967296", 0, "4294967296"},
-	{"4294967296", 1, "8589934592"},
-	{"4294967296", 2, "17179869184"},
-	{"18446744073709551616", 0, "18446744073709551616"},
-	{"9223372036854775808", 1, "18446744073709551616"},
-	{"4611686018427387904", 2, "18446744073709551616"},
-	{"1", 64, "18446744073709551616"},
-	{"18446744073709551616", 64, "340282366920938463463374607431768211456"},
-	{"1", 128, "340282366920938463463374607431768211456"},
-}
-
-func TestLsh(t *testing.T) {
-	for i, test := range lshTests {
-		in, _ := new(Int).SetString(test.in, 10)
-		expected, _ := new(Int).SetString(test.out, 10)
-		out := new(Int).Lsh(in, test.shift)
-
-		if !isNormalized(out) {
-			t.Errorf("#%d: %v is not normalized", i, *out)
-		}
-		if out.Cmp(expected) != 0 {
-			t.Errorf("#%d: got %s want %s", i, out, expected)
-		}
-	}
-}
-
-func TestLshSelf(t *testing.T) {
-	for i, test := range lshTests {
-		z, _ := new(Int).SetString(test.in, 10)
-		expected, _ := new(Int).SetString(test.out, 10)
-		z.Lsh(z, test.shift)
-
-		if !isNormalized(z) {
-			t.Errorf("#%d: %v is not normalized", i, *z)
-		}
-		if z.Cmp(expected) != 0 {
-			t.Errorf("#%d: got %s want %s", i, z, expected)
-		}
-	}
-}
-
-func TestLshRsh(t *testing.T) {
-	for i, test := range rshTests {
-		in, _ := new(Int).SetString(test.in, 10)
-		out := new(Int).Lsh(in, test.shift)
-		out = out.Rsh(out, test.shift)
-
-		if !isNormalized(out) {
-			t.Errorf("#%d: %v is not normalized", i, *out)
-		}
-		if in.Cmp(out) != 0 {
-			t.Errorf("#%d: got %s want %s", i, out, in)
-		}
-	}
-	for i, test := range lshTests {
-		in, _ := new(Int).SetString(test.in, 10)
-		out := new(Int).Lsh(in, test.shift)
-		out.Rsh(out, test.shift)
-
-		if !isNormalized(out) {
-			t.Errorf("#%d: %v is not normalized", i, *out)
-		}
-		if in.Cmp(out) != 0 {
-			t.Errorf("#%d: got %s want %s", i, out, in)
-		}
-	}
-}
-
-var int64Tests = []int64{
-	0,
-	1,
-	-1,
-	4294967295,
-	-4294967295,
-	4294967296,
-	-4294967296,
-	9223372036854775807,
-	-9223372036854775807,
-	-9223372036854775808,
-}
-
-func TestInt64(t *testing.T) {
-	for i, testVal := range int64Tests {
-		in := NewInt(testVal)
-		out := in.Int64()
-
-		if out != testVal {
-			t.Errorf("#%d got %d want %d", i, out, testVal)
-		}
-	}
-}
-
-var uint64Tests = []uint64{
-	0,
-	1,
-	4294967295,
-	4294967296,
-	8589934591,
-	8589934592,
-	9223372036854775807,
-	9223372036854775808,
-	18446744073709551615, // 1<<64 - 1
-}
-
-func TestUint64(t *testing.T) {
-	in := new(Int)
-	for i, testVal := range uint64Tests {
-		in.SetUint64(testVal)
-		out := in.Uint64()
-
-		if out != testVal {
-			t.Errorf("#%d got %d want %d", i, out, testVal)
-		}
-
-		str := fmt.Sprint(testVal)
-		strOut := in.String()
-		if strOut != str {
-			t.Errorf("#%d.String got %s want %s", i, strOut, str)
-		}
-	}
-}
-
-var bitwiseTests = []struct {
-	x, y                 string
-	and, or, xor, andNot string
-}{
-	{"0x00", "0x00", "0x00", "0x00", "0x00", "0x00"},
-	{"0x00", "0x01", "0x00", "0x01", "0x01", "0x00"},
-	{"0x01", "0x00", "0x00", "0x01", "0x01", "0x01"},
-	{"-0x01", "0x00", "0x00", "-0x01", "-0x01", "-0x01"},
-	{"-0xaf", "-0x50", "-0xf0", "-0x0f", "0xe1", "0x41"},
-	{"0x00", "-0x01", "0x00", "-0x01", "-0x01", "0x00"},
-	{"0x01", "0x01", "0x01", "0x01", "0x00", "0x00"},
-	{"-0x01", "-0x01", "-0x01", "-0x01", "0x00", "0x00"},
-	{"0x07", "0x08", "0x00", "0x0f", "0x0f", "0x07"},
-	{"0x05", "0x0f", "0x05", "0x0f", "0x0a", "0x00"},
-	{"0xff", "-0x0a", "0xf6", "-0x01", "-0xf7", "0x09"},
-	{"0x013ff6", "0x9a4e", "0x1a46", "0x01bffe", "0x01a5b8", "0x0125b0"},
-	{"-0x013ff6", "0x9a4e", "0x800a", "-0x0125b2", "-0x01a5bc", "-0x01c000"},
-	{"-0x013ff6", "-0x9a4e", "-0x01bffe", "-0x1a46", "0x01a5b8", "0x8008"},
-	{
-		"0x1000009dc6e3d9822cba04129bcbe3401",
-		"0xb9bd7d543685789d57cb918e833af352559021483cdb05cc21fd",
-		"0x1000001186210100001000009048c2001",
-		"0xb9bd7d543685789d57cb918e8bfeff7fddb2ebe87dfbbdfe35fd",
-		"0xb9bd7d543685789d57ca918e8ae69d6fcdb2eae87df2b97215fc",
-		"0x8c40c2d8822caa04120b8321400",
-	},
-	{
-		"0x1000009dc6e3d9822cba04129bcbe3401",
-		"-0xb9bd7d543685789d57cb918e833af352559021483cdb05cc21fd",
-		"0x8c40c2d8822caa04120b8321401",
-		"-0xb9bd7d543685789d57ca918e82229142459020483cd2014001fd",
-		"-0xb9bd7d543685789d57ca918e8ae69d6fcdb2eae87df2b97215fe",
-		"0x1000001186210100001000009048c2000",
-	},
-	{
-		"-0x1000009dc6e3d9822cba04129bcbe3401",
-		"-0xb9bd7d543685789d57cb918e833af352559021483cdb05cc21fd",
-		"-0xb9bd7d543685789d57cb918e8bfeff7fddb2ebe87dfbbdfe35fd",
-		"-0x1000001186210100001000009048c2001",
-		"0xb9bd7d543685789d57ca918e8ae69d6fcdb2eae87df2b97215fc",
-		"0xb9bd7d543685789d57ca918e82229142459020483cd2014001fc",
-	},
-}
-
-type bitFun func(z, x, y *Int) *Int
-
-func testBitFun(t *testing.T, msg string, f bitFun, x, y *Int, exp string) {
-	expected := new(Int)
-	expected.SetString(exp, 0)
-
-	out := f(new(Int), x, y)
-	if out.Cmp(expected) != 0 {
-		t.Errorf("%s: got %s want %s", msg, out, expected)
-	}
-}
-
-func testBitFunSelf(t *testing.T, msg string, f bitFun, x, y *Int, exp string) {
-	self := new(Int)
-	self.Set(x)
-	expected := new(Int)
-	expected.SetString(exp, 0)
-
-	self = f(self, self, y)
-	if self.Cmp(expected) != 0 {
-		t.Errorf("%s: got %s want %s", msg, self, expected)
-	}
-}
-
-func altBit(x *Int, i int) uint {
-	z := new(Int).Rsh(x, uint(i))
-	z = z.And(z, NewInt(1))
-	if z.Cmp(new(Int)) != 0 {
-		return 1
-	}
-	return 0
-}
-
-func altSetBit(z *Int, x *Int, i int, b uint) *Int {
-	one := NewInt(1)
-	m := one.Lsh(one, uint(i))
-	switch b {
-	case 1:
-		return z.Or(x, m)
-	case 0:
-		return z.AndNot(x, m)
-	}
-	panic("set bit is not 0 or 1")
-}
-
-func testBitset(t *testing.T, x *Int) {
-	n := x.BitLen()
-	z := new(Int).Set(x)
-	z1 := new(Int).Set(x)
-	for i := 0; i < n+10; i++ {
-		old := z.Bit(i)
-		old1 := altBit(z1, i)
-		if old != old1 {
-			t.Errorf("bitset: inconsistent value for Bit(%s, %d), got %v want %v", z1, i, old, old1)
-		}
-		z := new(Int).SetBit(z, i, 1)
-		z1 := altSetBit(new(Int), z1, i, 1)
-		if z.Bit(i) == 0 {
-			t.Errorf("bitset: bit %d of %s got 0 want 1", i, x)
-		}
-		if z.Cmp(z1) != 0 {
-			t.Errorf("bitset: inconsistent value after SetBit 1, got %s want %s", z, z1)
-		}
-		z.SetBit(z, i, 0)
-		altSetBit(z1, z1, i, 0)
-		if z.Bit(i) != 0 {
-			t.Errorf("bitset: bit %d of %s got 1 want 0", i, x)
-		}
-		if z.Cmp(z1) != 0 {
-			t.Errorf("bitset: inconsistent value after SetBit 0, got %s want %s", z, z1)
-		}
-		altSetBit(z1, z1, i, old)
-		z.SetBit(z, i, old)
-		if z.Cmp(z1) != 0 {
-			t.Errorf("bitset: inconsistent value after SetBit old, got %s want %s", z, z1)
-		}
-	}
-	if z.Cmp(x) != 0 {
-		t.Errorf("bitset: got %s want %s", z, x)
-	}
-}
-
-var bitsetTests = []struct {
-	x string
-	i int
-	b uint
-}{
-	{"0", 0, 0},
-	{"0", 200, 0},
-	{"1", 0, 1},
-	{"1", 1, 0},
-	{"-1", 0, 1},
-	{"-1", 200, 1},
-	{"0x2000000000000000000000000000", 108, 0},
-	{"0x2000000000000000000000000000", 109, 1},
-	{"0x2000000000000000000000000000", 110, 0},
-	{"-0x2000000000000000000000000001", 108, 1},
-	{"-0x2000000000000000000000000001", 109, 0},
-	{"-0x2000000000000000000000000001", 110, 1},
-}
-
-func TestBitSet(t *testing.T) {
-	for _, test := range bitwiseTests {
-		x := new(Int)
-		x.SetString(test.x, 0)
-		testBitset(t, x)
-		x = new(Int)
-		x.SetString(test.y, 0)
-		testBitset(t, x)
-	}
-	for i, test := range bitsetTests {
-		x := new(Int)
-		x.SetString(test.x, 0)
-		b := x.Bit(test.i)
-		if b != test.b {
-			t.Errorf("#%d got %v want %v", i, b, test.b)
-		}
-	}
-	z := NewInt(1)
-	z.SetBit(NewInt(0), 2, 1)
-	if z.Cmp(NewInt(4)) != 0 {
-		t.Errorf("destination leaked into result; got %s want 4", z)
-	}
-}
-
-func BenchmarkBitset(b *testing.B) {
-	z := new(Int)
-	z.SetBit(z, 512, 1)
-	b.ResetTimer()
-	b.StartTimer()
-	for i := b.N - 1; i >= 0; i-- {
-		z.SetBit(z, i&512, 1)
-	}
-}
-
-func BenchmarkBitsetNeg(b *testing.B) {
-	z := NewInt(-1)
-	z.SetBit(z, 512, 0)
-	b.ResetTimer()
-	b.StartTimer()
-	for i := b.N - 1; i >= 0; i-- {
-		z.SetBit(z, i&512, 0)
-	}
-}
-
-func BenchmarkBitsetOrig(b *testing.B) {
-	z := new(Int)
-	altSetBit(z, z, 512, 1)
-	b.ResetTimer()
-	b.StartTimer()
-	for i := b.N - 1; i >= 0; i-- {
-		altSetBit(z, z, i&512, 1)
-	}
-}
-
-func BenchmarkBitsetNegOrig(b *testing.B) {
-	z := NewInt(-1)
-	altSetBit(z, z, 512, 0)
-	b.ResetTimer()
-	b.StartTimer()
-	for i := b.N - 1; i >= 0; i-- {
-		altSetBit(z, z, i&512, 0)
-	}
-}
-
-func TestBitwise(t *testing.T) {
-	x := new(Int)
-	y := new(Int)
-	for _, test := range bitwiseTests {
-		x.SetString(test.x, 0)
-		y.SetString(test.y, 0)
-
-		testBitFun(t, "and", (*Int).And, x, y, test.and)
-		testBitFunSelf(t, "and", (*Int).And, x, y, test.and)
-		testBitFun(t, "andNot", (*Int).AndNot, x, y, test.andNot)
-		testBitFunSelf(t, "andNot", (*Int).AndNot, x, y, test.andNot)
-		testBitFun(t, "or", (*Int).Or, x, y, test.or)
-		testBitFunSelf(t, "or", (*Int).Or, x, y, test.or)
-		testBitFun(t, "xor", (*Int).Xor, x, y, test.xor)
-		testBitFunSelf(t, "xor", (*Int).Xor, x, y, test.xor)
-	}
-}
-
-var notTests = []struct {
-	in  string
-	out string
-}{
-	{"0", "-1"},
-	{"1", "-2"},
-	{"7", "-8"},
-	{"0", "-1"},
-	{"-81910", "81909"},
-	{
-		"298472983472983471903246121093472394872319615612417471234712061",
-		"-298472983472983471903246121093472394872319615612417471234712062",
-	},
-}
-
-func TestNot(t *testing.T) {
-	in := new(Int)
-	out := new(Int)
-	expected := new(Int)
-	for i, test := range notTests {
-		in.SetString(test.in, 10)
-		expected.SetString(test.out, 10)
-		out = out.Not(in)
-		if out.Cmp(expected) != 0 {
-			t.Errorf("#%d: got %s want %s", i, out, expected)
-		}
-		out = out.Not(out)
-		if out.Cmp(in) != 0 {
-			t.Errorf("#%d: got %s want %s", i, out, in)
-		}
-	}
-}
-
-var modInverseTests = []struct {
-	element string
-	modulus string
-}{
-	{"1234567", "458948883992"},
-	{"239487239847", "2410312426921032588552076022197566074856950548502459942654116941958108831682612228890093858261341614673227141477904012196503648957050582631942730706805009223062734745341073406696246014589361659774041027169249453200378729434170325843778659198143763193776859869524088940195577346119843545301547043747207749969763750084308926339295559968882457872412993810129130294592999947926365264059284647209730384947211681434464714438488520940127459844288859336526896320919633919"},
-}
-
-func TestModInverse(t *testing.T) {
-	var element, modulus, gcd, inverse Int
-	one := NewInt(1)
-	for i, test := range modInverseTests {
-		(&element).SetString(test.element, 10)
-		(&modulus).SetString(test.modulus, 10)
-		(&inverse).ModInverse(&element, &modulus)
-		(&inverse).Mul(&inverse, &element)
-		(&inverse).Mod(&inverse, &modulus)
-		if (&inverse).Cmp(one) != 0 {
-			t.Errorf("#%d: failed (e·e^(-1)=%s)", i, &inverse)
-		}
-	}
-	// exhaustive test for small values
-	for n := 2; n < 100; n++ {
-		(&modulus).SetInt64(int64(n))
-		for x := 1; x < n; x++ {
-			(&element).SetInt64(int64(x))
-			(&gcd).GCD(nil, nil, &element, &modulus)
-			if (&gcd).Cmp(one) != 0 {
-				continue
-			}
-			(&inverse).ModInverse(&element, &modulus)
-			(&inverse).Mul(&inverse, &element)
-			(&inverse).Mod(&inverse, &modulus)
-			if (&inverse).Cmp(one) != 0 {
-				t.Errorf("ModInverse(%d,%d)*%d%%%d=%d, not 1", &element, &modulus, &element, &modulus, &inverse)
-			}
-		}
-	}
-}
-
-// testModSqrt is a helper for TestModSqrt,
-// which checks that ModSqrt can compute a square-root of elt^2.
-func testModSqrt(t *testing.T, elt, mod, sq, sqrt *Int) bool {
-	var sqChk, sqrtChk, sqrtsq Int
-	sq.Mul(elt, elt)
-	sq.Mod(sq, mod)
-	z := sqrt.ModSqrt(sq, mod)
-	if z != sqrt {
-		t.Errorf("ModSqrt returned wrong value %s", z)
-	}
-
-	// test ModSqrt arguments outside the range [0,mod)
-	sqChk.Add(sq, mod)
-	z = sqrtChk.ModSqrt(&sqChk, mod)
-	if z != &sqrtChk || z.Cmp(sqrt) != 0 {
-		t.Errorf("ModSqrt returned inconsistent value %s", z)
-	}
-	sqChk.Sub(sq, mod)
-	z = sqrtChk.ModSqrt(&sqChk, mod)
-	if z != &sqrtChk || z.Cmp(sqrt) != 0 {
-		t.Errorf("ModSqrt returned inconsistent value %s", z)
-	}
-
-	// make sure we actually got a square root
-	if sqrt.Cmp(elt) == 0 {
-		return true // we found the "desired" square root
-	}
-	sqrtsq.Mul(sqrt, sqrt) // make sure we found the "other" one
-	sqrtsq.Mod(&sqrtsq, mod)
-	return sq.Cmp(&sqrtsq) == 0
-}
-
-func TestModSqrt(t *testing.T) {
-	var elt, mod, modx4, sq, sqrt Int
-	r := rand.New(rand.NewSource(9))
-	for i, s := range primes[1:] { // skip 2, use only odd primes
-		mod.SetString(s, 10)
-		modx4.Lsh(&mod, 2)
-
-		// test a few random elements per prime
-		for x := 1; x < 5; x++ {
-			elt.Rand(r, &modx4)
-			elt.Sub(&elt, &mod) // test range [-mod, 3*mod)
-			if !testModSqrt(t, &elt, &mod, &sq, &sqrt) {
-				t.Errorf("#%d: failed (sqrt(e) = %s)", i, &sqrt)
-			}
-		}
-	}
-
-	// exhaustive test for small values
-	for n := 3; n < 100; n++ {
-		mod.SetInt64(int64(n))
-		if !mod.ProbablyPrime(10) {
-			continue
-		}
-		isSquare := make([]bool, n)
-
-		// test all the squares
-		for x := 1; x < n; x++ {
-			elt.SetInt64(int64(x))
-			if !testModSqrt(t, &elt, &mod, &sq, &sqrt) {
-				t.Errorf("#%d: failed (sqrt(%d,%d) = %s)", x, &elt, &mod, &sqrt)
-			}
-			isSquare[sq.Uint64()] = true
-		}
-
-		// test all non-squares
-		for x := 1; x < n; x++ {
-			sq.SetInt64(int64(x))
-			z := sqrt.ModSqrt(&sq, &mod)
-			if !isSquare[x] && z != nil {
-				t.Errorf("#%d: failed (sqrt(%d,%d) = nil)", x, &sqrt, &mod)
-			}
-		}
-	}
-}
-
-func TestJacobi(t *testing.T) {
-	testCases := []struct {
-		x, y   int64
-		result int
-	}{
-		{0, 1, 1},
-		{0, -1, 1},
-		{1, 1, 1},
-		{1, -1, 1},
-		{0, 5, 0},
-		{1, 5, 1},
-		{2, 5, -1},
-		{-2, 5, -1},
-		{2, -5, -1},
-		{-2, -5, 1},
-		{3, 5, -1},
-		{5, 5, 0},
-		{-5, 5, 0},
-		{6, 5, 1},
-		{6, -5, 1},
-		{-6, 5, 1},
-		{-6, -5, -1},
-	}
-
-	var x, y Int
-
-	for i, test := range testCases {
-		x.SetInt64(test.x)
-		y.SetInt64(test.y)
-		expected := test.result
-		actual := Jacobi(&x, &y)
-		if actual != expected {
-			t.Errorf("#%d: Jacobi(%d, %d) = %d, but expected %d", i, test.x, test.y, actual, expected)
-		}
-	}
-}
-
-func TestJacobiPanic(t *testing.T) {
-	const failureMsg = "test failure"
-	defer func() {
-		msg := recover()
-		if msg == nil || msg == failureMsg {
-			panic(msg)
-		}
-		t.Log(msg)
-	}()
-	x := NewInt(1)
-	y := NewInt(2)
-	// Jacobi should panic when the second argument is even.
-	Jacobi(x, y)
-	panic(failureMsg)
-}
-
-var encodingTests = []string{
-	"-539345864568634858364538753846587364875430589374589",
-	"-678645873",
-	"-100",
-	"-2",
-	"-1",
-	"0",
-	"1",
-	"2",
-	"10",
-	"42",
-	"1234567890",
-	"298472983472983471903246121093472394872319615612417471234712061",
-}
-
-func TestIntGobEncoding(t *testing.T) {
-	var medium bytes.Buffer
-	enc := gob.NewEncoder(&medium)
-	dec := gob.NewDecoder(&medium)
-	for _, test := range encodingTests {
-		medium.Reset() // empty buffer for each test case (in case of failures)
-		var tx Int
-		tx.SetString(test, 10)
-		if err := enc.Encode(&tx); err != nil {
-			t.Errorf("encoding of %s failed: %s", &tx, err)
-		}
-		var rx Int
-		if err := dec.Decode(&rx); err != nil {
-			t.Errorf("decoding of %s failed: %s", &tx, err)
-		}
-		if rx.Cmp(&tx) != 0 {
-			t.Errorf("transmission of %s failed: got %s want %s", &tx, &rx, &tx)
-		}
-	}
-}
-
-// Sending a nil Int pointer (inside a slice) on a round trip through gob should yield a zero.
-// TODO: top-level nils.
-func TestGobEncodingNilIntInSlice(t *testing.T) {
-	buf := new(bytes.Buffer)
-	enc := gob.NewEncoder(buf)
-	dec := gob.NewDecoder(buf)
-
-	var in = make([]*Int, 1)
-	err := enc.Encode(&in)
-	if err != nil {
-		t.Errorf("gob encode failed: %q", err)
-	}
-	var out []*Int
-	err = dec.Decode(&out)
-	if err != nil {
-		t.Fatalf("gob decode failed: %q", err)
-	}
-	if len(out) != 1 {
-		t.Fatalf("wrong len; want 1 got %d", len(out))
-	}
-	var zero Int
-	if out[0].Cmp(&zero) != 0 {
-		t.Errorf("transmission of (*Int)(nill) failed: got %s want 0", out)
-	}
-}
-
-func TestIntJSONEncoding(t *testing.T) {
-	for _, test := range encodingTests {
-		var tx Int
-		tx.SetString(test, 10)
-		b, err := json.Marshal(&tx)
-		if err != nil {
-			t.Errorf("marshaling of %s failed: %s", &tx, err)
-		}
-		var rx Int
-		if err := json.Unmarshal(b, &rx); err != nil {
-			t.Errorf("unmarshaling of %s failed: %s", &tx, err)
-		}
-		if rx.Cmp(&tx) != 0 {
-			t.Errorf("JSON encoding of %s failed: got %s want %s", &tx, &rx, &tx)
-		}
-	}
-}
-
-var intVals = []string{
-	"-141592653589793238462643383279502884197169399375105820974944592307816406286",
-	"-1415926535897932384626433832795028841971",
-	"-141592653589793",
-	"-1",
-	"0",
-	"1",
-	"141592653589793",
-	"1415926535897932384626433832795028841971",
-	"141592653589793238462643383279502884197169399375105820974944592307816406286",
-}
-
-func TestIntJSONEncodingTextMarshaller(t *testing.T) {
-	for _, num := range intVals {
-		var tx Int
-		tx.SetString(num, 0)
-		b, err := json.Marshal(&tx)
-		if err != nil {
-			t.Errorf("marshaling of %s failed: %s", &tx, err)
-			continue
-		}
-		var rx Int
-		if err := json.Unmarshal(b, &rx); err != nil {
-			t.Errorf("unmarshaling of %s failed: %s", &tx, err)
-			continue
-		}
-		if rx.Cmp(&tx) != 0 {
-			t.Errorf("JSON encoding of %s failed: got %s want %s", &tx, &rx, &tx)
-		}
-	}
-}
-
-func TestIntXMLEncodingTextMarshaller(t *testing.T) {
-	for _, num := range intVals {
-		var tx Int
-		tx.SetString(num, 0)
-		b, err := xml.Marshal(&tx)
-		if err != nil {
-			t.Errorf("marshaling of %s failed: %s", &tx, err)
-			continue
-		}
-		var rx Int
-		if err := xml.Unmarshal(b, &rx); err != nil {
-			t.Errorf("unmarshaling of %s failed: %s", &tx, err)
-			continue
-		}
-		if rx.Cmp(&tx) != 0 {
-			t.Errorf("XML encoding of %s failed: got %s want %s", &tx, &rx, &tx)
-		}
-	}
-}
-
-func TestIssue2607(t *testing.T) {
-	// This code sequence used to hang.
-	n := NewInt(10)
-	n.Rand(rand.New(rand.NewSource(9)), n)
-}
diff --git a/src/cmd/compile/internal/big/intconv.go b/src/cmd/compile/internal/big/intconv.go
deleted file mode 100644
index 9c68a22..0000000
--- a/src/cmd/compile/internal/big/intconv.go
+++ /dev/null
@@ -1,228 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements int-to-string conversion functions.
-
-package big
-
-import (
-	"errors"
-	"fmt"
-	"io"
-)
-
-func (x *Int) String() string {
-	switch {
-	case x == nil:
-		return "<nil>"
-	case x.neg:
-		return "-" + x.abs.decimalString()
-	}
-	return x.abs.decimalString()
-}
-
-func charset(ch rune) string {
-	switch ch {
-	case 'b':
-		return lowercaseDigits[0:2]
-	case 'o':
-		return lowercaseDigits[0:8]
-	case 'd', 's', 'v':
-		return lowercaseDigits[0:10]
-	case 'x':
-		return lowercaseDigits[0:16]
-	case 'X':
-		return uppercaseDigits[0:16]
-	}
-	return "" // unknown format
-}
-
-// write count copies of text to s
-func writeMultiple(s fmt.State, text string, count int) {
-	if len(text) > 0 {
-		b := []byte(text)
-		for ; count > 0; count-- {
-			s.Write(b)
-		}
-	}
-}
-
-// Format is a support routine for fmt.Formatter. It accepts
-// the formats 'b' (binary), 'o' (octal), 'd' (decimal), 'x'
-// (lowercase hexadecimal), and 'X' (uppercase hexadecimal).
-// Also supported are the full suite of package fmt's format
-// verbs for integral types, including '+', '-', and ' '
-// for sign control, '#' for leading zero in octal and for
-// hexadecimal, a leading "0x" or "0X" for "%#x" and "%#X"
-// respectively, specification of minimum digits precision,
-// output field width, space or zero padding, and left or
-// right justification.
-//
-func (x *Int) Format(s fmt.State, ch rune) {
-	cs := charset(ch)
-
-	// special cases
-	switch {
-	case cs == "":
-		// unknown format
-		fmt.Fprintf(s, "%%!%c(big.Int=%s)", ch, x.String())
-		return
-	case x == nil:
-		fmt.Fprint(s, "<nil>")
-		return
-	}
-
-	// determine sign character
-	sign := ""
-	switch {
-	case x.neg:
-		sign = "-"
-	case s.Flag('+'): // supersedes ' ' when both specified
-		sign = "+"
-	case s.Flag(' '):
-		sign = " "
-	}
-
-	// determine prefix characters for indicating output base
-	prefix := ""
-	if s.Flag('#') {
-		switch ch {
-		case 'o': // octal
-			prefix = "0"
-		case 'x': // hexadecimal
-			prefix = "0x"
-		case 'X':
-			prefix = "0X"
-		}
-	}
-
-	// determine digits with base set by len(cs) and digit characters from cs
-	digits := x.abs.string(cs)
-
-	// number of characters for the three classes of number padding
-	var left int   // space characters to left of digits for right justification ("%8d")
-	var zeroes int // zero characters (actually cs[0]) as left-most digits ("%.8d")
-	var right int  // space characters to right of digits for left justification ("%-8d")
-
-	// determine number padding from precision: the least number of digits to output
-	precision, precisionSet := s.Precision()
-	if precisionSet {
-		switch {
-		case len(digits) < precision:
-			zeroes = precision - len(digits) // count of zero padding
-		case digits == "0" && precision == 0:
-			return // print nothing if zero value (x == 0) and zero precision ("." or ".0")
-		}
-	}
-
-	// determine field pad from width: the least number of characters to output
-	length := len(sign) + len(prefix) + zeroes + len(digits)
-	if width, widthSet := s.Width(); widthSet && length < width { // pad as specified
-		switch d := width - length; {
-		case s.Flag('-'):
-			// pad on the right with spaces; supersedes '0' when both specified
-			right = d
-		case s.Flag('0') && !precisionSet:
-			// pad with zeroes unless precision also specified
-			zeroes = d
-		default:
-			// pad on the left with spaces
-			left = d
-		}
-	}
-
-	// print number as [left pad][sign][prefix][zero pad][digits][right pad]
-	writeMultiple(s, " ", left)
-	writeMultiple(s, sign, 1)
-	writeMultiple(s, prefix, 1)
-	writeMultiple(s, "0", zeroes)
-	writeMultiple(s, digits, 1)
-	writeMultiple(s, " ", right)
-}
-
-// scan sets z to the integer value corresponding to the longest possible prefix
-// read from r representing a signed integer number in a given conversion base.
-// It returns z, the actual conversion base used, and an error, if any. In the
-// error case, the value of z is undefined but the returned value is nil. The
-// syntax follows the syntax of integer literals in Go.
-//
-// The base argument must be 0 or a value from 2 through MaxBase. If the base
-// is 0, the string prefix determines the actual conversion base. A prefix of
-// ``0x'' or ``0X'' selects base 16; the ``0'' prefix selects base 8, and a
-// ``0b'' or ``0B'' prefix selects base 2. Otherwise the selected base is 10.
-//
-func (z *Int) scan(r io.ByteScanner, base int) (*Int, int, error) {
-	// determine sign
-	neg, err := scanSign(r)
-	if err != nil {
-		return nil, 0, err
-	}
-
-	// determine mantissa
-	z.abs, base, _, err = z.abs.scan(r, base, false)
-	if err != nil {
-		return nil, base, err
-	}
-	z.neg = len(z.abs) > 0 && neg // 0 has no sign
-
-	return z, base, nil
-}
-
-func scanSign(r io.ByteScanner) (neg bool, err error) {
-	var ch byte
-	if ch, err = r.ReadByte(); err != nil {
-		return false, err
-	}
-	switch ch {
-	case '-':
-		neg = true
-	case '+':
-		// nothing to do
-	default:
-		r.UnreadByte()
-	}
-	return
-}
-
-// byteReader is a local wrapper around fmt.ScanState;
-// it implements the ByteReader interface.
-type byteReader struct {
-	fmt.ScanState
-}
-
-func (r byteReader) ReadByte() (byte, error) {
-	ch, size, err := r.ReadRune()
-	if size != 1 && err == nil {
-		err = fmt.Errorf("invalid rune %#U", ch)
-	}
-	return byte(ch), err
-}
-
-func (r byteReader) UnreadByte() error {
-	return r.UnreadRune()
-}
-
-// Scan is a support routine for fmt.Scanner; it sets z to the value of
-// the scanned number. It accepts the formats 'b' (binary), 'o' (octal),
-// 'd' (decimal), 'x' (lowercase hexadecimal), and 'X' (uppercase hexadecimal).
-func (z *Int) Scan(s fmt.ScanState, ch rune) error {
-	s.SkipSpace() // skip leading space characters
-	base := 0
-	switch ch {
-	case 'b':
-		base = 2
-	case 'o':
-		base = 8
-	case 'd':
-		base = 10
-	case 'x', 'X':
-		base = 16
-	case 's', 'v':
-		// let scan determine the base
-	default:
-		return errors.New("Int.Scan: invalid verb")
-	}
-	_, _, err := z.scan(byteReader{s}, base)
-	return err
-}
diff --git a/src/cmd/compile/internal/big/intconv_test.go b/src/cmd/compile/internal/big/intconv_test.go
deleted file mode 100644
index 2deb84b..0000000
--- a/src/cmd/compile/internal/big/intconv_test.go
+++ /dev/null
@@ -1,342 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package big
-
-import (
-	"bytes"
-	"fmt"
-	"testing"
-)
-
-var stringTests = []struct {
-	in   string
-	out  string
-	base int
-	val  int64
-	ok   bool
-}{
-	{in: "", ok: false},
-	{in: "a", ok: false},
-	{in: "z", ok: false},
-	{in: "+", ok: false},
-	{in: "-", ok: false},
-	{in: "0b", ok: false},
-	{in: "0x", ok: false},
-	{in: "2", base: 2, ok: false},
-	{in: "0b2", base: 0, ok: false},
-	{in: "08", ok: false},
-	{in: "8", base: 8, ok: false},
-	{in: "0xg", base: 0, ok: false},
-	{in: "g", base: 16, ok: false},
-	{"0", "0", 0, 0, true},
-	{"0", "0", 10, 0, true},
-	{"0", "0", 16, 0, true},
-	{"+0", "0", 0, 0, true},
-	{"-0", "0", 0, 0, true},
-	{"10", "10", 0, 10, true},
-	{"10", "10", 10, 10, true},
-	{"10", "10", 16, 16, true},
-	{"-10", "-10", 16, -16, true},
-	{"+10", "10", 16, 16, true},
-	{"0x10", "16", 0, 16, true},
-	{in: "0x10", base: 16, ok: false},
-	{"-0x10", "-16", 0, -16, true},
-	{"+0x10", "16", 0, 16, true},
-	{"00", "0", 0, 0, true},
-	{"0", "0", 8, 0, true},
-	{"07", "7", 0, 7, true},
-	{"7", "7", 8, 7, true},
-	{"023", "19", 0, 19, true},
-	{"23", "23", 8, 19, true},
-	{"cafebabe", "cafebabe", 16, 0xcafebabe, true},
-	{"0b0", "0", 0, 0, true},
-	{"-111", "-111", 2, -7, true},
-	{"-0b111", "-7", 0, -7, true},
-	{"0b1001010111", "599", 0, 0x257, true},
-	{"1001010111", "1001010111", 2, 0x257, true},
-}
-
-func format(base int) string {
-	switch base {
-	case 2:
-		return "%b"
-	case 8:
-		return "%o"
-	case 16:
-		return "%x"
-	}
-	return "%d"
-}
-
-func TestGetString(t *testing.T) {
-	z := new(Int)
-	for i, test := range stringTests {
-		if !test.ok {
-			continue
-		}
-		z.SetInt64(test.val)
-
-		if test.base == 10 {
-			s := z.String()
-			if s != test.out {
-				t.Errorf("#%da got %s; want %s", i, s, test.out)
-			}
-		}
-
-		s := fmt.Sprintf(format(test.base), z)
-		if s != test.out {
-			t.Errorf("#%db got %s; want %s", i, s, test.out)
-		}
-	}
-}
-
-func TestSetString(t *testing.T) {
-	tmp := new(Int)
-	for i, test := range stringTests {
-		// initialize to a non-zero value so that issues with parsing
-		// 0 are detected
-		tmp.SetInt64(1234567890)
-		n1, ok1 := new(Int).SetString(test.in, test.base)
-		n2, ok2 := tmp.SetString(test.in, test.base)
-		expected := NewInt(test.val)
-		if ok1 != test.ok || ok2 != test.ok {
-			t.Errorf("#%d (input '%s') ok incorrect (should be %t)", i, test.in, test.ok)
-			continue
-		}
-		if !ok1 {
-			if n1 != nil {
-				t.Errorf("#%d (input '%s') n1 != nil", i, test.in)
-			}
-			continue
-		}
-		if !ok2 {
-			if n2 != nil {
-				t.Errorf("#%d (input '%s') n2 != nil", i, test.in)
-			}
-			continue
-		}
-
-		if ok1 && !isNormalized(n1) {
-			t.Errorf("#%d (input '%s'): %v is not normalized", i, test.in, *n1)
-		}
-		if ok2 && !isNormalized(n2) {
-			t.Errorf("#%d (input '%s'): %v is not normalized", i, test.in, *n2)
-		}
-
-		if n1.Cmp(expected) != 0 {
-			t.Errorf("#%d (input '%s') got: %s want: %d", i, test.in, n1, test.val)
-		}
-		if n2.Cmp(expected) != 0 {
-			t.Errorf("#%d (input '%s') got: %s want: %d", i, test.in, n2, test.val)
-		}
-	}
-}
-
-var formatTests = []struct {
-	input  string
-	format string
-	output string
-}{
-	{"<nil>", "%x", "<nil>"},
-	{"<nil>", "%#x", "<nil>"},
-	{"<nil>", "%#y", "%!y(big.Int=<nil>)"},
-
-	{"10", "%b", "1010"},
-	{"10", "%o", "12"},
-	{"10", "%d", "10"},
-	{"10", "%v", "10"},
-	{"10", "%x", "a"},
-	{"10", "%X", "A"},
-	{"-10", "%X", "-A"},
-	{"10", "%y", "%!y(big.Int=10)"},
-	{"-10", "%y", "%!y(big.Int=-10)"},
-
-	{"10", "%#b", "1010"},
-	{"10", "%#o", "012"},
-	{"10", "%#d", "10"},
-	{"10", "%#v", "10"},
-	{"10", "%#x", "0xa"},
-	{"10", "%#X", "0XA"},
-	{"-10", "%#X", "-0XA"},
-	{"10", "%#y", "%!y(big.Int=10)"},
-	{"-10", "%#y", "%!y(big.Int=-10)"},
-
-	{"1234", "%d", "1234"},
-	{"1234", "%3d", "1234"},
-	{"1234", "%4d", "1234"},
-	{"-1234", "%d", "-1234"},
-	{"1234", "% 5d", " 1234"},
-	{"1234", "%+5d", "+1234"},
-	{"1234", "%-5d", "1234 "},
-	{"1234", "%x", "4d2"},
-	{"1234", "%X", "4D2"},
-	{"-1234", "%3x", "-4d2"},
-	{"-1234", "%4x", "-4d2"},
-	{"-1234", "%5x", " -4d2"},
-	{"-1234", "%-5x", "-4d2 "},
-	{"1234", "%03d", "1234"},
-	{"1234", "%04d", "1234"},
-	{"1234", "%05d", "01234"},
-	{"1234", "%06d", "001234"},
-	{"-1234", "%06d", "-01234"},
-	{"1234", "%+06d", "+01234"},
-	{"1234", "% 06d", " 01234"},
-	{"1234", "%-6d", "1234  "},
-	{"1234", "%-06d", "1234  "},
-	{"-1234", "%-06d", "-1234 "},
-
-	{"1234", "%.3d", "1234"},
-	{"1234", "%.4d", "1234"},
-	{"1234", "%.5d", "01234"},
-	{"1234", "%.6d", "001234"},
-	{"-1234", "%.3d", "-1234"},
-	{"-1234", "%.4d", "-1234"},
-	{"-1234", "%.5d", "-01234"},
-	{"-1234", "%.6d", "-001234"},
-
-	{"1234", "%8.3d", "    1234"},
-	{"1234", "%8.4d", "    1234"},
-	{"1234", "%8.5d", "   01234"},
-	{"1234", "%8.6d", "  001234"},
-	{"-1234", "%8.3d", "   -1234"},
-	{"-1234", "%8.4d", "   -1234"},
-	{"-1234", "%8.5d", "  -01234"},
-	{"-1234", "%8.6d", " -001234"},
-
-	{"1234", "%+8.3d", "   +1234"},
-	{"1234", "%+8.4d", "   +1234"},
-	{"1234", "%+8.5d", "  +01234"},
-	{"1234", "%+8.6d", " +001234"},
-	{"-1234", "%+8.3d", "   -1234"},
-	{"-1234", "%+8.4d", "   -1234"},
-	{"-1234", "%+8.5d", "  -01234"},
-	{"-1234", "%+8.6d", " -001234"},
-
-	{"1234", "% 8.3d", "    1234"},
-	{"1234", "% 8.4d", "    1234"},
-	{"1234", "% 8.5d", "   01234"},
-	{"1234", "% 8.6d", "  001234"},
-	{"-1234", "% 8.3d", "   -1234"},
-	{"-1234", "% 8.4d", "   -1234"},
-	{"-1234", "% 8.5d", "  -01234"},
-	{"-1234", "% 8.6d", " -001234"},
-
-	{"1234", "%.3x", "4d2"},
-	{"1234", "%.4x", "04d2"},
-	{"1234", "%.5x", "004d2"},
-	{"1234", "%.6x", "0004d2"},
-	{"-1234", "%.3x", "-4d2"},
-	{"-1234", "%.4x", "-04d2"},
-	{"-1234", "%.5x", "-004d2"},
-	{"-1234", "%.6x", "-0004d2"},
-
-	{"1234", "%8.3x", "     4d2"},
-	{"1234", "%8.4x", "    04d2"},
-	{"1234", "%8.5x", "   004d2"},
-	{"1234", "%8.6x", "  0004d2"},
-	{"-1234", "%8.3x", "    -4d2"},
-	{"-1234", "%8.4x", "   -04d2"},
-	{"-1234", "%8.5x", "  -004d2"},
-	{"-1234", "%8.6x", " -0004d2"},
-
-	{"1234", "%+8.3x", "    +4d2"},
-	{"1234", "%+8.4x", "   +04d2"},
-	{"1234", "%+8.5x", "  +004d2"},
-	{"1234", "%+8.6x", " +0004d2"},
-	{"-1234", "%+8.3x", "    -4d2"},
-	{"-1234", "%+8.4x", "   -04d2"},
-	{"-1234", "%+8.5x", "  -004d2"},
-	{"-1234", "%+8.6x", " -0004d2"},
-
-	{"1234", "% 8.3x", "     4d2"},
-	{"1234", "% 8.4x", "    04d2"},
-	{"1234", "% 8.5x", "   004d2"},
-	{"1234", "% 8.6x", "  0004d2"},
-	{"1234", "% 8.7x", " 00004d2"},
-	{"1234", "% 8.8x", " 000004d2"},
-	{"-1234", "% 8.3x", "    -4d2"},
-	{"-1234", "% 8.4x", "   -04d2"},
-	{"-1234", "% 8.5x", "  -004d2"},
-	{"-1234", "% 8.6x", " -0004d2"},
-	{"-1234", "% 8.7x", "-00004d2"},
-	{"-1234", "% 8.8x", "-000004d2"},
-
-	{"1234", "%-8.3d", "1234    "},
-	{"1234", "%-8.4d", "1234    "},
-	{"1234", "%-8.5d", "01234   "},
-	{"1234", "%-8.6d", "001234  "},
-	{"1234", "%-8.7d", "0001234 "},
-	{"1234", "%-8.8d", "00001234"},
-	{"-1234", "%-8.3d", "-1234   "},
-	{"-1234", "%-8.4d", "-1234   "},
-	{"-1234", "%-8.5d", "-01234  "},
-	{"-1234", "%-8.6d", "-001234 "},
-	{"-1234", "%-8.7d", "-0001234"},
-	{"-1234", "%-8.8d", "-00001234"},
-
-	{"16777215", "%b", "111111111111111111111111"}, // 2**24 - 1
-
-	{"0", "%.d", ""},
-	{"0", "%.0d", ""},
-	{"0", "%3.d", ""},
-}
-
-func TestFormat(t *testing.T) {
-	for i, test := range formatTests {
-		var x *Int
-		if test.input != "<nil>" {
-			var ok bool
-			x, ok = new(Int).SetString(test.input, 0)
-			if !ok {
-				t.Errorf("#%d failed reading input %s", i, test.input)
-			}
-		}
-		output := fmt.Sprintf(test.format, x)
-		if output != test.output {
-			t.Errorf("#%d got %q; want %q, {%q, %q, %q}", i, output, test.output, test.input, test.format, test.output)
-		}
-	}
-}
-
-var scanTests = []struct {
-	input     string
-	format    string
-	output    string
-	remaining int
-}{
-	{"1010", "%b", "10", 0},
-	{"0b1010", "%v", "10", 0},
-	{"12", "%o", "10", 0},
-	{"012", "%v", "10", 0},
-	{"10", "%d", "10", 0},
-	{"10", "%v", "10", 0},
-	{"a", "%x", "10", 0},
-	{"0xa", "%v", "10", 0},
-	{"A", "%X", "10", 0},
-	{"-A", "%X", "-10", 0},
-	{"+0b1011001", "%v", "89", 0},
-	{"0xA", "%v", "10", 0},
-	{"0 ", "%v", "0", 1},
-	{"2+3", "%v", "2", 2},
-	{"0XABC 12", "%v", "2748", 3},
-}
-
-func TestScan(t *testing.T) {
-	var buf bytes.Buffer
-	for i, test := range scanTests {
-		x := new(Int)
-		buf.Reset()
-		buf.WriteString(test.input)
-		if _, err := fmt.Fscanf(&buf, test.format, x); err != nil {
-			t.Errorf("#%d error: %s", i, err)
-		}
-		if x.String() != test.output {
-			t.Errorf("#%d got %s; want %s", i, x.String(), test.output)
-		}
-		if buf.Len() != test.remaining {
-			t.Errorf("#%d got %d bytes remaining; want %d", i, buf.Len(), test.remaining)
-		}
-	}
-}
diff --git a/src/cmd/compile/internal/big/nat.go b/src/cmd/compile/internal/big/nat.go
deleted file mode 100644
index 6545bc1..0000000
--- a/src/cmd/compile/internal/big/nat.go
+++ /dev/null
@@ -1,1274 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package big implements multi-precision arithmetic (big numbers).
-// The following numeric types are supported:
-//
-//   Int    signed integers
-//   Rat    rational numbers
-//   Float  floating-point numbers
-//
-// Methods are typically of the form:
-//
-//   func (z *T) Unary(x *T) *T        // z = op x
-//   func (z *T) Binary(x, y *T) *T    // z = x op y
-//   func (x *T) M() T1                // v = x.M()
-//
-// with T one of Int, Rat, or Float. For unary and binary operations, the
-// result is the receiver (usually named z in that case); if it is one of
-// the operands x or y it may be overwritten (and its memory reused).
-// To enable chaining of operations, the result is also returned. Methods
-// returning a result other than *Int, *Rat, or *Float take an operand as
-// the receiver (usually named x in that case).
-//
-package big
-
-// This file contains operations on unsigned multi-precision integers.
-// These are the building blocks for the operations on signed integers
-// and rationals.
-
-import "math/rand"
-
-// An unsigned integer x of the form
-//
-//   x = x[n-1]*_B^(n-1) + x[n-2]*_B^(n-2) + ... + x[1]*_B + x[0]
-//
-// with 0 <= x[i] < _B and 0 <= i < n is stored in a slice of length n,
-// with the digits x[i] as the slice elements.
-//
-// A number is normalized if the slice contains no leading 0 digits.
-// During arithmetic operations, denormalized values may occur but are
-// always normalized before returning the final result. The normalized
-// representation of 0 is the empty or nil slice (length = 0).
-//
-type nat []Word
-
-var (
-	natOne = nat{1}
-	natTwo = nat{2}
-	natTen = nat{10}
-)
-
-func (z nat) clear() {
-	for i := range z {
-		z[i] = 0
-	}
-}
-
-func (z nat) norm() nat {
-	i := len(z)
-	for i > 0 && z[i-1] == 0 {
-		i--
-	}
-	return z[0:i]
-}
-
-func (z nat) make(n int) nat {
-	if n <= cap(z) {
-		return z[:n] // reuse z
-	}
-	// Choosing a good value for e has significant performance impact
-	// because it increases the chance that a value can be reused.
-	const e = 4 // extra capacity
-	return make(nat, n, n+e)
-}
-
-func (z nat) setWord(x Word) nat {
-	if x == 0 {
-		return z[:0]
-	}
-	z = z.make(1)
-	z[0] = x
-	return z
-}
-
-func (z nat) setUint64(x uint64) nat {
-	// single-digit values
-	if w := Word(x); uint64(w) == x {
-		return z.setWord(w)
-	}
-
-	// compute number of words n required to represent x
-	n := 0
-	for t := x; t > 0; t >>= _W {
-		n++
-	}
-
-	// split x into n words
-	z = z.make(n)
-	for i := range z {
-		z[i] = Word(x & _M)
-		x >>= _W
-	}
-
-	return z
-}
-
-func (z nat) set(x nat) nat {
-	z = z.make(len(x))
-	copy(z, x)
-	return z
-}
-
-func (z nat) add(x, y nat) nat {
-	m := len(x)
-	n := len(y)
-
-	switch {
-	case m < n:
-		return z.add(y, x)
-	case m == 0:
-		// n == 0 because m >= n; result is 0
-		return z[:0]
-	case n == 0:
-		// result is x
-		return z.set(x)
-	}
-	// m > 0
-
-	z = z.make(m + 1)
-	c := addVV(z[0:n], x, y)
-	if m > n {
-		c = addVW(z[n:m], x[n:], c)
-	}
-	z[m] = c
-
-	return z.norm()
-}
-
-func (z nat) sub(x, y nat) nat {
-	m := len(x)
-	n := len(y)
-
-	switch {
-	case m < n:
-		panic("underflow")
-	case m == 0:
-		// n == 0 because m >= n; result is 0
-		return z[:0]
-	case n == 0:
-		// result is x
-		return z.set(x)
-	}
-	// m > 0
-
-	z = z.make(m)
-	c := subVV(z[0:n], x, y)
-	if m > n {
-		c = subVW(z[n:], x[n:], c)
-	}
-	if c != 0 {
-		panic("underflow")
-	}
-
-	return z.norm()
-}
-
-func (x nat) cmp(y nat) (r int) {
-	m := len(x)
-	n := len(y)
-	if m != n || m == 0 {
-		switch {
-		case m < n:
-			r = -1
-		case m > n:
-			r = 1
-		}
-		return
-	}
-
-	i := m - 1
-	for i > 0 && x[i] == y[i] {
-		i--
-	}
-
-	switch {
-	case x[i] < y[i]:
-		r = -1
-	case x[i] > y[i]:
-		r = 1
-	}
-	return
-}
-
-func (z nat) mulAddWW(x nat, y, r Word) nat {
-	m := len(x)
-	if m == 0 || y == 0 {
-		return z.setWord(r) // result is r
-	}
-	// m > 0
-
-	z = z.make(m + 1)
-	z[m] = mulAddVWW(z[0:m], x, y, r)
-
-	return z.norm()
-}
-
-// basicMul multiplies x and y and leaves the result in z.
-// The (non-normalized) result is placed in z[0 : len(x) + len(y)].
-func basicMul(z, x, y nat) {
-	z[0 : len(x)+len(y)].clear() // initialize z
-	for i, d := range y {
-		if d != 0 {
-			z[len(x)+i] = addMulVVW(z[i:i+len(x)], x, d)
-		}
-	}
-}
-
-// montgomery computes x*y*2^(-n*_W) mod m,
-// assuming k = -1/m mod 2^_W.
-// z is used for storing the result which is returned;
-// z must not alias x, y or m.
-func (z nat) montgomery(x, y, m nat, k Word, n int) nat {
-	var c1, c2 Word
-	z = z.make(n)
-	z.clear()
-	for i := 0; i < n; i++ {
-		d := y[i]
-		c1 += addMulVVW(z, x, d)
-		t := z[0] * k
-		c2 = addMulVVW(z, m, t)
-
-		copy(z, z[1:])
-		z[n-1] = c1 + c2
-		if z[n-1] < c1 {
-			c1 = 1
-		} else {
-			c1 = 0
-		}
-	}
-	if c1 != 0 {
-		subVV(z, z, m)
-	}
-	return z
-}
-
-// Fast version of z[0:n+n>>1].add(z[0:n+n>>1], x[0:n]) w/o bounds checks.
-// Factored out for readability - do not use outside karatsuba.
-func karatsubaAdd(z, x nat, n int) {
-	if c := addVV(z[0:n], z, x); c != 0 {
-		addVW(z[n:n+n>>1], z[n:], c)
-	}
-}
-
-// Like karatsubaAdd, but does subtract.
-func karatsubaSub(z, x nat, n int) {
-	if c := subVV(z[0:n], z, x); c != 0 {
-		subVW(z[n:n+n>>1], z[n:], c)
-	}
-}
-
-// Operands that are shorter than karatsubaThreshold are multiplied using
-// "grade school" multiplication; for longer operands the Karatsuba algorithm
-// is used.
-var karatsubaThreshold int = 40 // computed by calibrate.go
-
-// karatsuba multiplies x and y and leaves the result in z.
-// Both x and y must have the same length n and n must be a
-// power of 2. The result vector z must have len(z) >= 6*n.
-// The (non-normalized) result is placed in z[0 : 2*n].
-func karatsuba(z, x, y nat) {
-	n := len(y)
-
-	// Switch to basic multiplication if numbers are odd or small.
-	// (n is always even if karatsubaThreshold is even, but be
-	// conservative)
-	if n&1 != 0 || n < karatsubaThreshold || n < 2 {
-		basicMul(z, x, y)
-		return
-	}
-	// n&1 == 0 && n >= karatsubaThreshold && n >= 2
-
-	// Karatsuba multiplication is based on the observation that
-	// for two numbers x and y with:
-	//
-	//   x = x1*b + x0
-	//   y = y1*b + y0
-	//
-	// the product x*y can be obtained with 3 products z2, z1, z0
-	// instead of 4:
-	//
-	//   x*y = x1*y1*b*b + (x1*y0 + x0*y1)*b + x0*y0
-	//       =    z2*b*b +              z1*b +    z0
-	//
-	// with:
-	//
-	//   xd = x1 - x0
-	//   yd = y0 - y1
-	//
-	//   z1 =      xd*yd                    + z2 + z0
-	//      = (x1-x0)*(y0 - y1)             + z2 + z0
-	//      = x1*y0 - x1*y1 - x0*y0 + x0*y1 + z2 + z0
-	//      = x1*y0 -    z2 -    z0 + x0*y1 + z2 + z0
-	//      = x1*y0                 + x0*y1
-
-	// split x, y into "digits"
-	n2 := n >> 1              // n2 >= 1
-	x1, x0 := x[n2:], x[0:n2] // x = x1*b + y0
-	y1, y0 := y[n2:], y[0:n2] // y = y1*b + y0
-
-	// z is used for the result and temporary storage:
-	//
-	//   6*n     5*n     4*n     3*n     2*n     1*n     0*n
-	// z = [z2 copy|z0 copy| xd*yd | yd:xd | x1*y1 | x0*y0 ]
-	//
-	// For each recursive call of karatsuba, an unused slice of
-	// z is passed in that has (at least) half the length of the
-	// caller's z.
-
-	// compute z0 and z2 with the result "in place" in z
-	karatsuba(z, x0, y0)     // z0 = x0*y0
-	karatsuba(z[n:], x1, y1) // z2 = x1*y1
-
-	// compute xd (or the negative value if underflow occurs)
-	s := 1 // sign of product xd*yd
-	xd := z[2*n : 2*n+n2]
-	if subVV(xd, x1, x0) != 0 { // x1-x0
-		s = -s
-		subVV(xd, x0, x1) // x0-x1
-	}
-
-	// compute yd (or the negative value if underflow occurs)
-	yd := z[2*n+n2 : 3*n]
-	if subVV(yd, y0, y1) != 0 { // y0-y1
-		s = -s
-		subVV(yd, y1, y0) // y1-y0
-	}
-
-	// p = (x1-x0)*(y0-y1) == x1*y0 - x1*y1 - x0*y0 + x0*y1 for s > 0
-	// p = (x0-x1)*(y0-y1) == x0*y0 - x0*y1 - x1*y0 + x1*y1 for s < 0
-	p := z[n*3:]
-	karatsuba(p, xd, yd)
-
-	// save original z2:z0
-	// (ok to use upper half of z since we're done recursing)
-	r := z[n*4:]
-	copy(r, z[:n*2])
-
-	// add up all partial products
-	//
-	//   2*n     n     0
-	// z = [ z2  | z0  ]
-	//   +    [ z0  ]
-	//   +    [ z2  ]
-	//   +    [  p  ]
-	//
-	karatsubaAdd(z[n2:], r, n)
-	karatsubaAdd(z[n2:], r[n:], n)
-	if s > 0 {
-		karatsubaAdd(z[n2:], p, n)
-	} else {
-		karatsubaSub(z[n2:], p, n)
-	}
-}
-
-// alias reports whether x and y share the same base array.
-func alias(x, y nat) bool {
-	return cap(x) > 0 && cap(y) > 0 && &x[0:cap(x)][cap(x)-1] == &y[0:cap(y)][cap(y)-1]
-}
-
-// addAt implements z += x<<(_W*i); z must be long enough.
-// (we don't use nat.add because we need z to stay the same
-// slice, and we don't need to normalize z after each addition)
-func addAt(z, x nat, i int) {
-	if n := len(x); n > 0 {
-		if c := addVV(z[i:i+n], z[i:], x); c != 0 {
-			j := i + n
-			if j < len(z) {
-				addVW(z[j:], z[j:], c)
-			}
-		}
-	}
-}
-
-func max(x, y int) int {
-	if x > y {
-		return x
-	}
-	return y
-}
-
-// karatsubaLen computes an approximation to the maximum k <= n such that
-// k = p<<i for a number p <= karatsubaThreshold and an i >= 0. Thus, the
-// result is the largest number that can be divided repeatedly by 2 before
-// becoming about the value of karatsubaThreshold.
-func karatsubaLen(n int) int {
-	i := uint(0)
-	for n > karatsubaThreshold {
-		n >>= 1
-		i++
-	}
-	return n << i
-}
-
-func (z nat) mul(x, y nat) nat {
-	m := len(x)
-	n := len(y)
-
-	switch {
-	case m < n:
-		return z.mul(y, x)
-	case m == 0 || n == 0:
-		return z[:0]
-	case n == 1:
-		return z.mulAddWW(x, y[0], 0)
-	}
-	// m >= n > 1
-
-	// determine if z can be reused
-	if alias(z, x) || alias(z, y) {
-		z = nil // z is an alias for x or y - cannot reuse
-	}
-
-	// use basic multiplication if the numbers are small
-	if n < karatsubaThreshold {
-		z = z.make(m + n)
-		basicMul(z, x, y)
-		return z.norm()
-	}
-	// m >= n && n >= karatsubaThreshold && n >= 2
-
-	// determine Karatsuba length k such that
-	//
-	//   x = xh*b + x0  (0 <= x0 < b)
-	//   y = yh*b + y0  (0 <= y0 < b)
-	//   b = 1<<(_W*k)  ("base" of digits xi, yi)
-	//
-	k := karatsubaLen(n)
-	// k <= n
-
-	// multiply x0 and y0 via Karatsuba
-	x0 := x[0:k]              // x0 is not normalized
-	y0 := y[0:k]              // y0 is not normalized
-	z = z.make(max(6*k, m+n)) // enough space for karatsuba of x0*y0 and full result of x*y
-	karatsuba(z, x0, y0)
-	z = z[0 : m+n]  // z has final length but may be incomplete
-	z[2*k:].clear() // upper portion of z is garbage (and 2*k <= m+n since k <= n <= m)
-
-	// If xh != 0 or yh != 0, add the missing terms to z. For
-	//
-	//   xh = xi*b^i + ... + x2*b^2 + x1*b (0 <= xi < b)
-	//   yh =                         y1*b (0 <= y1 < b)
-	//
-	// the missing terms are
-	//
-	//   x0*y1*b and xi*y0*b^i, xi*y1*b^(i+1) for i > 0
-	//
-	// since all the yi for i > 1 are 0 by choice of k: If any of them
-	// were > 0, then yh >= b^2 and thus y >= b^2. Then k' = k*2 would
-	// be a larger valid threshold contradicting the assumption about k.
-	//
-	if k < n || m != n {
-		var t nat
-
-		// add x0*y1*b
-		x0 := x0.norm()
-		y1 := y[k:]       // y1 is normalized because y is
-		t = t.mul(x0, y1) // update t so we don't lose t's underlying array
-		addAt(z, t, k)
-
-		// add xi*y0<<i, xi*y1*b<<(i+k)
-		y0 := y0.norm()
-		for i := k; i < len(x); i += k {
-			xi := x[i:]
-			if len(xi) > k {
-				xi = xi[:k]
-			}
-			xi = xi.norm()
-			t = t.mul(xi, y0)
-			addAt(z, t, i)
-			t = t.mul(xi, y1)
-			addAt(z, t, i+k)
-		}
-	}
-
-	return z.norm()
-}
-
-// mulRange computes the product of all the unsigned integers in the
-// range [a, b] inclusively. If a > b (empty range), the result is 1.
-func (z nat) mulRange(a, b uint64) nat {
-	switch {
-	case a == 0:
-		// cut long ranges short (optimization)
-		return z.setUint64(0)
-	case a > b:
-		return z.setUint64(1)
-	case a == b:
-		return z.setUint64(a)
-	case a+1 == b:
-		return z.mul(nat(nil).setUint64(a), nat(nil).setUint64(b))
-	}
-	m := (a + b) / 2
-	return z.mul(nat(nil).mulRange(a, m), nat(nil).mulRange(m+1, b))
-}
-
-// q = (x-r)/y, with 0 <= r < y
-func (z nat) divW(x nat, y Word) (q nat, r Word) {
-	m := len(x)
-	switch {
-	case y == 0:
-		panic("division by zero")
-	case y == 1:
-		q = z.set(x) // result is x
-		return
-	case m == 0:
-		q = z[:0] // result is 0
-		return
-	}
-	// m > 0
-	z = z.make(m)
-	r = divWVW(z, 0, x, y)
-	q = z.norm()
-	return
-}
-
-func (z nat) div(z2, u, v nat) (q, r nat) {
-	if len(v) == 0 {
-		panic("division by zero")
-	}
-
-	if u.cmp(v) < 0 {
-		q = z[:0]
-		r = z2.set(u)
-		return
-	}
-
-	if len(v) == 1 {
-		var r2 Word
-		q, r2 = z.divW(u, v[0])
-		r = z2.setWord(r2)
-		return
-	}
-
-	q, r = z.divLarge(z2, u, v)
-	return
-}
-
-// q = (uIn-r)/v, with 0 <= r < y
-// Uses z as storage for q, and u as storage for r if possible.
-// See Knuth, Volume 2, section 4.3.1, Algorithm D.
-// Preconditions:
-//    len(v) >= 2
-//    len(uIn) >= len(v)
-func (z nat) divLarge(u, uIn, v nat) (q, r nat) {
-	n := len(v)
-	m := len(uIn) - n
-
-	// determine if z can be reused
-	// TODO(gri) should find a better solution - this if statement
-	//           is very costly (see e.g. time pidigits -s -n 10000)
-	if alias(z, uIn) || alias(z, v) {
-		z = nil // z is an alias for uIn or v - cannot reuse
-	}
-	q = z.make(m + 1)
-
-	qhatv := make(nat, n+1)
-	if alias(u, uIn) || alias(u, v) {
-		u = nil // u is an alias for uIn or v - cannot reuse
-	}
-	u = u.make(len(uIn) + 1)
-	u.clear() // TODO(gri) no need to clear if we allocated a new u
-
-	// D1.
-	shift := nlz(v[n-1])
-	if shift > 0 {
-		// do not modify v, it may be used by another goroutine simultaneously
-		v1 := make(nat, n)
-		shlVU(v1, v, shift)
-		v = v1
-	}
-	u[len(uIn)] = shlVU(u[0:len(uIn)], uIn, shift)
-
-	// D2.
-	for j := m; j >= 0; j-- {
-		// D3.
-		qhat := Word(_M)
-		if u[j+n] != v[n-1] {
-			var rhat Word
-			qhat, rhat = divWW(u[j+n], u[j+n-1], v[n-1])
-
-			// x1 | x2 = q̂v_{n-2}
-			x1, x2 := mulWW(qhat, v[n-2])
-			// test if q̂v_{n-2} > br̂ + u_{j+n-2}
-			for greaterThan(x1, x2, rhat, u[j+n-2]) {
-				qhat--
-				prevRhat := rhat
-				rhat += v[n-1]
-				// v[n-1] >= 0, so this tests for overflow.
-				if rhat < prevRhat {
-					break
-				}
-				x1, x2 = mulWW(qhat, v[n-2])
-			}
-		}
-
-		// D4.
-		qhatv[n] = mulAddVWW(qhatv[0:n], v, qhat, 0)
-
-		c := subVV(u[j:j+len(qhatv)], u[j:], qhatv)
-		if c != 0 {
-			c := addVV(u[j:j+n], u[j:], v)
-			u[j+n] += c
-			qhat--
-		}
-
-		q[j] = qhat
-	}
-
-	q = q.norm()
-	shrVU(u, u, shift)
-	r = u.norm()
-
-	return q, r
-}
-
-// Length of x in bits. x must be normalized.
-func (x nat) bitLen() int {
-	if i := len(x) - 1; i >= 0 {
-		return i*_W + bitLen(x[i])
-	}
-	return 0
-}
-
-const deBruijn32 = 0x077CB531
-
-var deBruijn32Lookup = []byte{
-	0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8,
-	31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9,
-}
-
-const deBruijn64 = 0x03f79d71b4ca8b09
-
-var deBruijn64Lookup = []byte{
-	0, 1, 56, 2, 57, 49, 28, 3, 61, 58, 42, 50, 38, 29, 17, 4,
-	62, 47, 59, 36, 45, 43, 51, 22, 53, 39, 33, 30, 24, 18, 12, 5,
-	63, 55, 48, 27, 60, 41, 37, 16, 46, 35, 44, 21, 52, 32, 23, 11,
-	54, 26, 40, 15, 34, 20, 31, 10, 25, 14, 19, 9, 13, 8, 7, 6,
-}
-
-// trailingZeroBits returns the number of consecutive least significant zero
-// bits of x.
-func trailingZeroBits(x Word) uint {
-	// x & -x leaves only the right-most bit set in the word. Let k be the
-	// index of that bit. Since only a single bit is set, the value is two
-	// to the power of k. Multiplying by a power of two is equivalent to
-	// left shifting, in this case by k bits.  The de Bruijn constant is
-	// such that all six bit, consecutive substrings are distinct.
-	// Therefore, if we have a left shifted version of this constant we can
-	// find by how many bits it was shifted by looking at which six bit
-	// substring ended up at the top of the word.
-	// (Knuth, volume 4, section 7.3.1)
-	switch _W {
-	case 32:
-		return uint(deBruijn32Lookup[((x&-x)*deBruijn32)>>27])
-	case 64:
-		return uint(deBruijn64Lookup[((x&-x)*(deBruijn64&_M))>>58])
-	default:
-		panic("unknown word size")
-	}
-}
-
-// trailingZeroBits returns the number of consecutive least significant zero
-// bits of x.
-func (x nat) trailingZeroBits() uint {
-	if len(x) == 0 {
-		return 0
-	}
-	var i uint
-	for x[i] == 0 {
-		i++
-	}
-	// x[i] != 0
-	return i*_W + trailingZeroBits(x[i])
-}
-
-// z = x << s
-func (z nat) shl(x nat, s uint) nat {
-	m := len(x)
-	if m == 0 {
-		return z[:0]
-	}
-	// m > 0
-
-	n := m + int(s/_W)
-	z = z.make(n + 1)
-	z[n] = shlVU(z[n-m:n], x, s%_W)
-	z[0 : n-m].clear()
-
-	return z.norm()
-}
-
-// z = x >> s
-func (z nat) shr(x nat, s uint) nat {
-	m := len(x)
-	n := m - int(s/_W)
-	if n <= 0 {
-		return z[:0]
-	}
-	// n > 0
-
-	z = z.make(n)
-	shrVU(z, x[m-n:], s%_W)
-
-	return z.norm()
-}
-
-func (z nat) setBit(x nat, i uint, b uint) nat {
-	j := int(i / _W)
-	m := Word(1) << (i % _W)
-	n := len(x)
-	switch b {
-	case 0:
-		z = z.make(n)
-		copy(z, x)
-		if j >= n {
-			// no need to grow
-			return z
-		}
-		z[j] &^= m
-		return z.norm()
-	case 1:
-		if j >= n {
-			z = z.make(j + 1)
-			z[n:].clear()
-		} else {
-			z = z.make(n)
-		}
-		copy(z, x)
-		z[j] |= m
-		// no need to normalize
-		return z
-	}
-	panic("set bit is not 0 or 1")
-}
-
-// bit returns the value of the i'th bit, with lsb == bit 0.
-func (x nat) bit(i uint) uint {
-	j := i / _W
-	if j >= uint(len(x)) {
-		return 0
-	}
-	// 0 <= j < len(x)
-	return uint(x[j] >> (i % _W) & 1)
-}
-
-// sticky returns 1 if there's a 1 bit within the
-// i least significant bits, otherwise it returns 0.
-func (x nat) sticky(i uint) uint {
-	j := i / _W
-	if j >= uint(len(x)) {
-		if len(x) == 0 {
-			return 0
-		}
-		return 1
-	}
-	// 0 <= j < len(x)
-	for _, x := range x[:j] {
-		if x != 0 {
-			return 1
-		}
-	}
-	if x[j]<<(_W-i%_W) != 0 {
-		return 1
-	}
-	return 0
-}
-
-func (z nat) and(x, y nat) nat {
-	m := len(x)
-	n := len(y)
-	if m > n {
-		m = n
-	}
-	// m <= n
-
-	z = z.make(m)
-	for i := 0; i < m; i++ {
-		z[i] = x[i] & y[i]
-	}
-
-	return z.norm()
-}
-
-func (z nat) andNot(x, y nat) nat {
-	m := len(x)
-	n := len(y)
-	if n > m {
-		n = m
-	}
-	// m >= n
-
-	z = z.make(m)
-	for i := 0; i < n; i++ {
-		z[i] = x[i] &^ y[i]
-	}
-	copy(z[n:m], x[n:m])
-
-	return z.norm()
-}
-
-func (z nat) or(x, y nat) nat {
-	m := len(x)
-	n := len(y)
-	s := x
-	if m < n {
-		n, m = m, n
-		s = y
-	}
-	// m >= n
-
-	z = z.make(m)
-	for i := 0; i < n; i++ {
-		z[i] = x[i] | y[i]
-	}
-	copy(z[n:m], s[n:m])
-
-	return z.norm()
-}
-
-func (z nat) xor(x, y nat) nat {
-	m := len(x)
-	n := len(y)
-	s := x
-	if m < n {
-		n, m = m, n
-		s = y
-	}
-	// m >= n
-
-	z = z.make(m)
-	for i := 0; i < n; i++ {
-		z[i] = x[i] ^ y[i]
-	}
-	copy(z[n:m], s[n:m])
-
-	return z.norm()
-}
-
-// greaterThan reports whether (x1<<_W + x2) > (y1<<_W + y2)
-func greaterThan(x1, x2, y1, y2 Word) bool {
-	return x1 > y1 || x1 == y1 && x2 > y2
-}
-
-// modW returns x % d.
-func (x nat) modW(d Word) (r Word) {
-	// TODO(agl): we don't actually need to store the q value.
-	var q nat
-	q = q.make(len(x))
-	return divWVW(q, 0, x, d)
-}
-
-// random creates a random integer in [0..limit), using the space in z if
-// possible. n is the bit length of limit.
-func (z nat) random(rand *rand.Rand, limit nat, n int) nat {
-	if alias(z, limit) {
-		z = nil // z is an alias for limit - cannot reuse
-	}
-	z = z.make(len(limit))
-
-	bitLengthOfMSW := uint(n % _W)
-	if bitLengthOfMSW == 0 {
-		bitLengthOfMSW = _W
-	}
-	mask := Word((1 << bitLengthOfMSW) - 1)
-
-	for {
-		switch _W {
-		case 32:
-			for i := range z {
-				z[i] = Word(rand.Uint32())
-			}
-		case 64:
-			for i := range z {
-				z[i] = Word(rand.Uint32()) | Word(rand.Uint32())<<32
-			}
-		default:
-			panic("unknown word size")
-		}
-		z[len(limit)-1] &= mask
-		if z.cmp(limit) < 0 {
-			break
-		}
-	}
-
-	return z.norm()
-}
-
-// If m != 0 (i.e., len(m) != 0), expNN sets z to x**y mod m;
-// otherwise it sets z to x**y. The result is the value of z.
-func (z nat) expNN(x, y, m nat) nat {
-	if alias(z, x) || alias(z, y) {
-		// We cannot allow in-place modification of x or y.
-		z = nil
-	}
-
-	// x**y mod 1 == 0
-	if len(m) == 1 && m[0] == 1 {
-		return z.setWord(0)
-	}
-	// m == 0 || m > 1
-
-	// x**0 == 1
-	if len(y) == 0 {
-		return z.setWord(1)
-	}
-	// y > 0
-
-	// x**1 mod m == x mod m
-	if len(y) == 1 && y[0] == 1 && len(m) != 0 {
-		_, z = z.div(z, x, m)
-		return z
-	}
-	// y > 1
-
-	if len(m) != 0 {
-		// We likely end up being as long as the modulus.
-		z = z.make(len(m))
-	}
-	z = z.set(x)
-
-	// If the base is non-trivial and the exponent is large, we use
-	// 4-bit, windowed exponentiation. This involves precomputing 14 values
-	// (x^2...x^15) but then reduces the number of multiply-reduces by a
-	// third. Even for a 32-bit exponent, this reduces the number of
-	// operations. Uses Montgomery method for odd moduli.
-	if len(x) > 1 && len(y) > 1 && len(m) > 0 {
-		if m[0]&1 == 1 {
-			return z.expNNMontgomery(x, y, m)
-		}
-		return z.expNNWindowed(x, y, m)
-	}
-
-	v := y[len(y)-1] // v > 0 because y is normalized and y > 0
-	shift := nlz(v) + 1
-	v <<= shift
-	var q nat
-
-	const mask = 1 << (_W - 1)
-
-	// We walk through the bits of the exponent one by one. Each time we
-	// see a bit, we square, thus doubling the power. If the bit is a one,
-	// we also multiply by x, thus adding one to the power.
-
-	w := _W - int(shift)
-	// zz and r are used to avoid allocating in mul and div as
-	// otherwise the arguments would alias.
-	var zz, r nat
-	for j := 0; j < w; j++ {
-		zz = zz.mul(z, z)
-		zz, z = z, zz
-
-		if v&mask != 0 {
-			zz = zz.mul(z, x)
-			zz, z = z, zz
-		}
-
-		if len(m) != 0 {
-			zz, r = zz.div(r, z, m)
-			zz, r, q, z = q, z, zz, r
-		}
-
-		v <<= 1
-	}
-
-	for i := len(y) - 2; i >= 0; i-- {
-		v = y[i]
-
-		for j := 0; j < _W; j++ {
-			zz = zz.mul(z, z)
-			zz, z = z, zz
-
-			if v&mask != 0 {
-				zz = zz.mul(z, x)
-				zz, z = z, zz
-			}
-
-			if len(m) != 0 {
-				zz, r = zz.div(r, z, m)
-				zz, r, q, z = q, z, zz, r
-			}
-
-			v <<= 1
-		}
-	}
-
-	return z.norm()
-}
-
-// expNNWindowed calculates x**y mod m using a fixed, 4-bit window.
-func (z nat) expNNWindowed(x, y, m nat) nat {
-	// zz and r are used to avoid allocating in mul and div as otherwise
-	// the arguments would alias.
-	var zz, r nat
-
-	const n = 4
-	// powers[i] contains x^i.
-	var powers [1 << n]nat
-	powers[0] = natOne
-	powers[1] = x
-	for i := 2; i < 1<<n; i += 2 {
-		p2, p, p1 := &powers[i/2], &powers[i], &powers[i+1]
-		*p = p.mul(*p2, *p2)
-		zz, r = zz.div(r, *p, m)
-		*p, r = r, *p
-		*p1 = p1.mul(*p, x)
-		zz, r = zz.div(r, *p1, m)
-		*p1, r = r, *p1
-	}
-
-	z = z.setWord(1)
-
-	for i := len(y) - 1; i >= 0; i-- {
-		yi := y[i]
-		for j := 0; j < _W; j += n {
-			if i != len(y)-1 || j != 0 {
-				// Unrolled loop for significant performance
-				// gain.  Use go test -bench=".*" in crypto/rsa
-				// to check performance before making changes.
-				zz = zz.mul(z, z)
-				zz, z = z, zz
-				zz, r = zz.div(r, z, m)
-				z, r = r, z
-
-				zz = zz.mul(z, z)
-				zz, z = z, zz
-				zz, r = zz.div(r, z, m)
-				z, r = r, z
-
-				zz = zz.mul(z, z)
-				zz, z = z, zz
-				zz, r = zz.div(r, z, m)
-				z, r = r, z
-
-				zz = zz.mul(z, z)
-				zz, z = z, zz
-				zz, r = zz.div(r, z, m)
-				z, r = r, z
-			}
-
-			zz = zz.mul(z, powers[yi>>(_W-n)])
-			zz, z = z, zz
-			zz, r = zz.div(r, z, m)
-			z, r = r, z
-
-			yi <<= n
-		}
-	}
-
-	return z.norm()
-}
-
-// expNNMontgomery calculates x**y mod m using a fixed, 4-bit window.
-// Uses Montgomery representation.
-func (z nat) expNNMontgomery(x, y, m nat) nat {
-	var zz, one, rr, RR nat
-
-	numWords := len(m)
-
-	// We want the lengths of x and m to be equal.
-	if len(x) > numWords {
-		_, rr = rr.div(rr, x, m)
-	} else if len(x) < numWords {
-		rr = rr.make(numWords)
-		rr.clear()
-		for i := range x {
-			rr[i] = x[i]
-		}
-	} else {
-		rr = x
-	}
-	x = rr
-
-	// Ideally the precomputations would be performed outside, and reused
-	// k0 = -mˆ-1 mod 2ˆ_W. Algorithm from: Dumas, J.G. "On Newton–Raphson
-	// Iteration for Multiplicative Inverses Modulo Prime Powers".
-	k0 := 2 - m[0]
-	t := m[0] - 1
-	for i := 1; i < _W; i <<= 1 {
-		t *= t
-		k0 *= (t + 1)
-	}
-	k0 = -k0
-
-	// RR = 2ˆ(2*_W*len(m)) mod m
-	RR = RR.setWord(1)
-	zz = zz.shl(RR, uint(2*numWords*_W))
-	_, RR = RR.div(RR, zz, m)
-	if len(RR) < numWords {
-		zz = zz.make(numWords)
-		copy(zz, RR)
-		RR = zz
-	}
-	// one = 1, with equal length to that of m
-	one = one.make(numWords)
-	one.clear()
-	one[0] = 1
-
-	const n = 4
-	// powers[i] contains x^i
-	var powers [1 << n]nat
-	powers[0] = powers[0].montgomery(one, RR, m, k0, numWords)
-	powers[1] = powers[1].montgomery(x, RR, m, k0, numWords)
-	for i := 2; i < 1<<n; i++ {
-		powers[i] = powers[i].montgomery(powers[i-1], powers[1], m, k0, numWords)
-	}
-
-	// initialize z = 1 (Montgomery 1)
-	z = z.make(numWords)
-	copy(z, powers[0])
-
-	zz = zz.make(numWords)
-
-	// same windowed exponent, but with Montgomery multiplications
-	for i := len(y) - 1; i >= 0; i-- {
-		yi := y[i]
-		for j := 0; j < _W; j += n {
-			if i != len(y)-1 || j != 0 {
-				zz = zz.montgomery(z, z, m, k0, numWords)
-				z = z.montgomery(zz, zz, m, k0, numWords)
-				zz = zz.montgomery(z, z, m, k0, numWords)
-				z = z.montgomery(zz, zz, m, k0, numWords)
-			}
-			zz = zz.montgomery(z, powers[yi>>(_W-n)], m, k0, numWords)
-			z, zz = zz, z
-			yi <<= n
-		}
-	}
-	// convert to regular number
-	zz = zz.montgomery(z, one, m, k0, numWords)
-	return zz.norm()
-}
-
-// probablyPrime performs reps Miller-Rabin tests to check whether n is prime.
-// If it returns true, n is prime with probability 1 - 1/4^reps.
-// If it returns false, n is not prime.
-func (n nat) probablyPrime(reps int) bool {
-	if len(n) == 0 {
-		return false
-	}
-
-	if len(n) == 1 {
-		if n[0] < 2 {
-			return false
-		}
-
-		if n[0]%2 == 0 {
-			return n[0] == 2
-		}
-
-		// We have to exclude these cases because we reject all
-		// multiples of these numbers below.
-		switch n[0] {
-		case 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53:
-			return true
-		}
-	}
-
-	if n[0]&1 == 0 {
-		return false // n is even
-	}
-
-	const primesProduct32 = 0xC0CFD797         // Π {p ∈ primes, 2 < p <= 29}
-	const primesProduct64 = 0xE221F97C30E94E1D // Π {p ∈ primes, 2 < p <= 53}
-
-	var r Word
-	switch _W {
-	case 32:
-		r = n.modW(primesProduct32)
-	case 64:
-		r = n.modW(primesProduct64 & _M)
-	default:
-		panic("Unknown word size")
-	}
-
-	if r%3 == 0 || r%5 == 0 || r%7 == 0 || r%11 == 0 ||
-		r%13 == 0 || r%17 == 0 || r%19 == 0 || r%23 == 0 || r%29 == 0 {
-		return false
-	}
-
-	if _W == 64 && (r%31 == 0 || r%37 == 0 || r%41 == 0 ||
-		r%43 == 0 || r%47 == 0 || r%53 == 0) {
-		return false
-	}
-
-	nm1 := nat(nil).sub(n, natOne)
-	// determine q, k such that nm1 = q << k
-	k := nm1.trailingZeroBits()
-	q := nat(nil).shr(nm1, k)
-
-	nm3 := nat(nil).sub(nm1, natTwo)
-	rand := rand.New(rand.NewSource(int64(n[0])))
-
-	var x, y, quotient nat
-	nm3Len := nm3.bitLen()
-
-NextRandom:
-	for i := 0; i < reps; i++ {
-		x = x.random(rand, nm3, nm3Len)
-		x = x.add(x, natTwo)
-		y = y.expNN(x, q, n)
-		if y.cmp(natOne) == 0 || y.cmp(nm1) == 0 {
-			continue
-		}
-		for j := uint(1); j < k; j++ {
-			y = y.mul(y, y)
-			quotient, y = quotient.div(y, y, n)
-			if y.cmp(nm1) == 0 {
-				continue NextRandom
-			}
-			if y.cmp(natOne) == 0 {
-				return false
-			}
-		}
-		return false
-	}
-
-	return true
-}
-
-// bytes writes the value of z into buf using big-endian encoding.
-// len(buf) must be >= len(z)*_S. The value of z is encoded in the
-// slice buf[i:]. The number i of unused bytes at the beginning of
-// buf is returned as result.
-func (z nat) bytes(buf []byte) (i int) {
-	i = len(buf)
-	for _, d := range z {
-		for j := 0; j < _S; j++ {
-			i--
-			buf[i] = byte(d)
-			d >>= 8
-		}
-	}
-
-	for i < len(buf) && buf[i] == 0 {
-		i++
-	}
-
-	return
-}
-
-// setBytes interprets buf as the bytes of a big-endian unsigned
-// integer, sets z to that value, and returns z.
-func (z nat) setBytes(buf []byte) nat {
-	z = z.make((len(buf) + _S - 1) / _S)
-
-	k := 0
-	s := uint(0)
-	var d Word
-	for i := len(buf); i > 0; i-- {
-		d |= Word(buf[i-1]) << s
-		if s += 8; s == _S*8 {
-			z[k] = d
-			k++
-			s = 0
-			d = 0
-		}
-	}
-	if k < len(z) {
-		z[k] = d
-	}
-
-	return z.norm()
-}
diff --git a/src/cmd/compile/internal/big/nat_test.go b/src/cmd/compile/internal/big/nat_test.go
deleted file mode 100644
index 7ac3cb8..0000000
--- a/src/cmd/compile/internal/big/nat_test.go
+++ /dev/null
@@ -1,579 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package big
-
-import (
-	"runtime"
-	"strings"
-	"testing"
-)
-
-var cmpTests = []struct {
-	x, y nat
-	r    int
-}{
-	{nil, nil, 0},
-	{nil, nat(nil), 0},
-	{nat(nil), nil, 0},
-	{nat(nil), nat(nil), 0},
-	{nat{0}, nat{0}, 0},
-	{nat{0}, nat{1}, -1},
-	{nat{1}, nat{0}, 1},
-	{nat{1}, nat{1}, 0},
-	{nat{0, _M}, nat{1}, 1},
-	{nat{1}, nat{0, _M}, -1},
-	{nat{1, _M}, nat{0, _M}, 1},
-	{nat{0, _M}, nat{1, _M}, -1},
-	{nat{16, 571956, 8794, 68}, nat{837, 9146, 1, 754489}, -1},
-	{nat{34986, 41, 105, 1957}, nat{56, 7458, 104, 1957}, 1},
-}
-
-func TestCmp(t *testing.T) {
-	for i, a := range cmpTests {
-		r := a.x.cmp(a.y)
-		if r != a.r {
-			t.Errorf("#%d got r = %v; want %v", i, r, a.r)
-		}
-	}
-}
-
-type funNN func(z, x, y nat) nat
-type argNN struct {
-	z, x, y nat
-}
-
-var sumNN = []argNN{
-	{},
-	{nat{1}, nil, nat{1}},
-	{nat{1111111110}, nat{123456789}, nat{987654321}},
-	{nat{0, 0, 0, 1}, nil, nat{0, 0, 0, 1}},
-	{nat{0, 0, 0, 1111111110}, nat{0, 0, 0, 123456789}, nat{0, 0, 0, 987654321}},
-	{nat{0, 0, 0, 1}, nat{0, 0, _M}, nat{0, 0, 1}},
-}
-
-var prodNN = []argNN{
-	{},
-	{nil, nil, nil},
-	{nil, nat{991}, nil},
-	{nat{991}, nat{991}, nat{1}},
-	{nat{991 * 991}, nat{991}, nat{991}},
-	{nat{0, 0, 991 * 991}, nat{0, 991}, nat{0, 991}},
-	{nat{1 * 991, 2 * 991, 3 * 991, 4 * 991}, nat{1, 2, 3, 4}, nat{991}},
-	{nat{4, 11, 20, 30, 20, 11, 4}, nat{1, 2, 3, 4}, nat{4, 3, 2, 1}},
-	// 3^100 * 3^28 = 3^128
-	{
-		natFromString("11790184577738583171520872861412518665678211592275841109096961"),
-		natFromString("515377520732011331036461129765621272702107522001"),
-		natFromString("22876792454961"),
-	},
-	// z = 111....1 (70000 digits)
-	// x = 10^(99*700) + ... + 10^1400 + 10^700 + 1
-	// y = 111....1 (700 digits, larger than Karatsuba threshold on 32-bit and 64-bit)
-	{
-		natFromString(strings.Repeat("1", 70000)),
-		natFromString("1" + strings.Repeat(strings.Repeat("0", 699)+"1", 99)),
-		natFromString(strings.Repeat("1", 700)),
-	},
-	// z = 111....1 (20000 digits)
-	// x = 10^10000 + 1
-	// y = 111....1 (10000 digits)
-	{
-		natFromString(strings.Repeat("1", 20000)),
-		natFromString("1" + strings.Repeat("0", 9999) + "1"),
-		natFromString(strings.Repeat("1", 10000)),
-	},
-}
-
-func natFromString(s string) nat {
-	x, _, _, err := nat(nil).scan(strings.NewReader(s), 0, false)
-	if err != nil {
-		panic(err)
-	}
-	return x
-}
-
-func TestSet(t *testing.T) {
-	for _, a := range sumNN {
-		z := nat(nil).set(a.z)
-		if z.cmp(a.z) != 0 {
-			t.Errorf("got z = %v; want %v", z, a.z)
-		}
-	}
-}
-
-func testFunNN(t *testing.T, msg string, f funNN, a argNN) {
-	z := f(nil, a.x, a.y)
-	if z.cmp(a.z) != 0 {
-		t.Errorf("%s%+v\n\tgot z = %v; want %v", msg, a, z, a.z)
-	}
-}
-
-func TestFunNN(t *testing.T) {
-	for _, a := range sumNN {
-		arg := a
-		testFunNN(t, "add", nat.add, arg)
-
-		arg = argNN{a.z, a.y, a.x}
-		testFunNN(t, "add symmetric", nat.add, arg)
-
-		arg = argNN{a.x, a.z, a.y}
-		testFunNN(t, "sub", nat.sub, arg)
-
-		arg = argNN{a.y, a.z, a.x}
-		testFunNN(t, "sub symmetric", nat.sub, arg)
-	}
-
-	for _, a := range prodNN {
-		arg := a
-		testFunNN(t, "mul", nat.mul, arg)
-
-		arg = argNN{a.z, a.y, a.x}
-		testFunNN(t, "mul symmetric", nat.mul, arg)
-	}
-}
-
-var mulRangesN = []struct {
-	a, b uint64
-	prod string
-}{
-	{0, 0, "0"},
-	{1, 1, "1"},
-	{1, 2, "2"},
-	{1, 3, "6"},
-	{10, 10, "10"},
-	{0, 100, "0"},
-	{0, 1e9, "0"},
-	{1, 0, "1"},                    // empty range
-	{100, 1, "1"},                  // empty range
-	{1, 10, "3628800"},             // 10!
-	{1, 20, "2432902008176640000"}, // 20!
-	{1, 100,
-		"933262154439441526816992388562667004907159682643816214685929" +
-			"638952175999932299156089414639761565182862536979208272237582" +
-			"51185210916864000000000000000000000000", // 100!
-	},
-}
-
-func TestMulRangeN(t *testing.T) {
-	for i, r := range mulRangesN {
-		prod := nat(nil).mulRange(r.a, r.b).decimalString()
-		if prod != r.prod {
-			t.Errorf("#%d: got %s; want %s", i, prod, r.prod)
-		}
-	}
-}
-
-// allocBytes returns the number of bytes allocated by invoking f.
-func allocBytes(f func()) uint64 {
-	var stats runtime.MemStats
-	runtime.ReadMemStats(&stats)
-	t := stats.TotalAlloc
-	f()
-	runtime.ReadMemStats(&stats)
-	return stats.TotalAlloc - t
-}
-
-// TestMulUnbalanced tests that multiplying numbers of different lengths
-// does not cause deep recursion and in turn allocate too much memory.
-// Test case for issue 3807.
-func TestMulUnbalanced(t *testing.T) {
-	defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(1))
-	x := rndNat(50000)
-	y := rndNat(40)
-	allocSize := allocBytes(func() {
-		nat(nil).mul(x, y)
-	})
-	inputSize := uint64(len(x)+len(y)) * _S
-	if ratio := allocSize / uint64(inputSize); ratio > 10 {
-		t.Errorf("multiplication uses too much memory (%d > %d times the size of inputs)", allocSize, ratio)
-	}
-}
-
-func rndNat(n int) nat {
-	return nat(rndV(n)).norm()
-}
-
-func BenchmarkMul(b *testing.B) {
-	mulx := rndNat(1e4)
-	muly := rndNat(1e4)
-	b.ResetTimer()
-	for i := 0; i < b.N; i++ {
-		var z nat
-		z.mul(mulx, muly)
-	}
-}
-
-func TestNLZ(t *testing.T) {
-	var x Word = _B >> 1
-	for i := 0; i <= _W; i++ {
-		if int(nlz(x)) != i {
-			t.Errorf("failed at %x: got %d want %d", x, nlz(x), i)
-		}
-		x >>= 1
-	}
-}
-
-type shiftTest struct {
-	in    nat
-	shift uint
-	out   nat
-}
-
-var leftShiftTests = []shiftTest{
-	{nil, 0, nil},
-	{nil, 1, nil},
-	{natOne, 0, natOne},
-	{natOne, 1, natTwo},
-	{nat{1 << (_W - 1)}, 1, nat{0}},
-	{nat{1 << (_W - 1), 0}, 1, nat{0, 1}},
-}
-
-func TestShiftLeft(t *testing.T) {
-	for i, test := range leftShiftTests {
-		var z nat
-		z = z.shl(test.in, test.shift)
-		for j, d := range test.out {
-			if j >= len(z) || z[j] != d {
-				t.Errorf("#%d: got: %v want: %v", i, z, test.out)
-				break
-			}
-		}
-	}
-}
-
-var rightShiftTests = []shiftTest{
-	{nil, 0, nil},
-	{nil, 1, nil},
-	{natOne, 0, natOne},
-	{natOne, 1, nil},
-	{natTwo, 1, natOne},
-	{nat{0, 1}, 1, nat{1 << (_W - 1)}},
-	{nat{2, 1, 1}, 1, nat{1<<(_W-1) + 1, 1 << (_W - 1)}},
-}
-
-func TestShiftRight(t *testing.T) {
-	for i, test := range rightShiftTests {
-		var z nat
-		z = z.shr(test.in, test.shift)
-		for j, d := range test.out {
-			if j >= len(z) || z[j] != d {
-				t.Errorf("#%d: got: %v want: %v", i, z, test.out)
-				break
-			}
-		}
-	}
-}
-
-type modWTest struct {
-	in       string
-	dividend string
-	out      string
-}
-
-var modWTests32 = []modWTest{
-	{"23492635982634928349238759823742", "252341", "220170"},
-}
-
-var modWTests64 = []modWTest{
-	{"6527895462947293856291561095690465243862946", "524326975699234", "375066989628668"},
-}
-
-func runModWTests(t *testing.T, tests []modWTest) {
-	for i, test := range tests {
-		in, _ := new(Int).SetString(test.in, 10)
-		d, _ := new(Int).SetString(test.dividend, 10)
-		out, _ := new(Int).SetString(test.out, 10)
-
-		r := in.abs.modW(d.abs[0])
-		if r != out.abs[0] {
-			t.Errorf("#%d failed: got %d want %s", i, r, out)
-		}
-	}
-}
-
-func TestModW(t *testing.T) {
-	if _W >= 32 {
-		runModWTests(t, modWTests32)
-	}
-	if _W >= 64 {
-		runModWTests(t, modWTests64)
-	}
-}
-
-func TestTrailingZeroBits(t *testing.T) {
-	// test 0 case explicitly
-	if n := trailingZeroBits(0); n != 0 {
-		t.Errorf("got trailingZeroBits(0) = %d; want 0", n)
-	}
-
-	x := Word(1)
-	for i := uint(0); i < _W; i++ {
-		n := trailingZeroBits(x)
-		if n != i {
-			t.Errorf("got trailingZeroBits(%#x) = %d; want %d", x, n, i%_W)
-		}
-		x <<= 1
-	}
-
-	// test 0 case explicitly
-	if n := nat(nil).trailingZeroBits(); n != 0 {
-		t.Errorf("got nat(nil).trailingZeroBits() = %d; want 0", n)
-	}
-
-	y := nat(nil).set(natOne)
-	for i := uint(0); i <= 3*_W; i++ {
-		n := y.trailingZeroBits()
-		if n != i {
-			t.Errorf("got 0x%s.trailingZeroBits() = %d; want %d", y.hexString(), n, i)
-		}
-		y = y.shl(y, 1)
-	}
-}
-
-var montgomeryTests = []struct {
-	x, y, m      string
-	k0           uint64
-	out32, out64 string
-}{
-	{
-		"0xffffffffffffffffffffffffffffffffffffffffffffffffe",
-		"0xffffffffffffffffffffffffffffffffffffffffffffffffe",
-		"0xfffffffffffffffffffffffffffffffffffffffffffffffff",
-		0x0000000000000000,
-		"0xffffffffffffffffffffffffffffffffffffffffff",
-		"0xffffffffffffffffffffffffffffffffff",
-	},
-	{
-		"0x0000000080000000",
-		"0x00000000ffffffff",
-		"0x0000000010000001",
-		0xff0000000fffffff,
-		"0x0000000088000000",
-		"0x0000000007800001",
-	},
-	{
-		"0xffffffffffffffffffffffffffffffff00000000000022222223333333333444444444",
-		"0xffffffffffffffffffffffffffffffff999999999999999aaabbbbbbbbcccccccccccc",
-		"0x33377fffffffffffffffffffffffffffffffffffffffffffff0000000000022222eee1",
-		0xdecc8f1249812adf,
-		"0x22bb05b6d95eaaeca2bb7c05e51f807bce9064b5fbad177161695e4558f9474e91cd79",
-		"0x14beb58d230f85b6d95eaaeca2bb7c05e51f807bce9064b5fb45669afa695f228e48cd",
-	},
-	{
-		"0x10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000022222223333333333444444444",
-		"0x10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff999999999999999aaabbbbbbbbcccccccccccc",
-		"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff33377fffffffffffffffffffffffffffffffffffffffffffff0000000000022222eee1",
-		0xdecc8f1249812adf,
-		"0x5c0d52f451aec609b15da8e5e5626c4eaa88723bdeac9d25ca9b961269400410ca208a16af9c2fb07d7a11c7772cba02c22f9711078d51a3797eb18e691295293284d988e349fa6deba46b25a4ecd9f715",
-		"0x92fcad4b5c0d52f451aec609b15da8e5e5626c4eaa88723bdeac9d25ca9b961269400410ca208a16af9c2fb07d799c32fe2f3cc5422f9711078d51a3797eb18e691295293284d8f5e69caf6decddfe1df6",
-	},
-}
-
-func TestMontgomery(t *testing.T) {
-	for i, test := range montgomeryTests {
-		x := natFromString(test.x)
-		y := natFromString(test.y)
-		m := natFromString(test.m)
-
-		var out nat
-		if _W == 32 {
-			out = natFromString(test.out32)
-		} else {
-			out = natFromString(test.out64)
-		}
-
-		k0 := Word(test.k0 & _M) // mask k0 to ensure that it fits for 32-bit systems.
-		z := nat(nil).montgomery(x, y, m, k0, len(m))
-		z = z.norm()
-		if z.cmp(out) != 0 {
-			t.Errorf("#%d got %s want %s", i, z.decimalString(), out.decimalString())
-		}
-	}
-}
-
-var expNNTests = []struct {
-	x, y, m string
-	out     string
-}{
-	{"0", "0", "0", "1"},
-	{"0", "0", "1", "0"},
-	{"1", "1", "1", "0"},
-	{"2", "1", "1", "0"},
-	{"2", "2", "1", "0"},
-	{"10", "100000000000", "1", "0"},
-	{"0x8000000000000000", "2", "", "0x40000000000000000000000000000000"},
-	{"0x8000000000000000", "2", "6719", "4944"},
-	{"0x8000000000000000", "3", "6719", "5447"},
-	{"0x8000000000000000", "1000", "6719", "1603"},
-	{"0x8000000000000000", "1000000", "6719", "3199"},
-	{
-		"2938462938472983472983659726349017249287491026512746239764525612965293865296239471239874193284792387498274256129746192347",
-		"298472983472983471903246121093472394872319615612417471234712061",
-		"29834729834729834729347290846729561262544958723956495615629569234729836259263598127342374289365912465901365498236492183464",
-		"23537740700184054162508175125554701713153216681790245129157191391322321508055833908509185839069455749219131480588829346291",
-	},
-}
-
-func TestExpNN(t *testing.T) {
-	for i, test := range expNNTests {
-		x := natFromString(test.x)
-		y := natFromString(test.y)
-		out := natFromString(test.out)
-
-		var m nat
-		if len(test.m) > 0 {
-			m = natFromString(test.m)
-		}
-
-		z := nat(nil).expNN(x, y, m)
-		if z.cmp(out) != 0 {
-			t.Errorf("#%d got %s want %s", i, z.decimalString(), out.decimalString())
-		}
-	}
-}
-
-func ExpHelper(b *testing.B, x, y Word) {
-	var z nat
-	for i := 0; i < b.N; i++ {
-		z.expWW(x, y)
-	}
-}
-
-func BenchmarkExp3Power0x10(b *testing.B)     { ExpHelper(b, 3, 0x10) }
-func BenchmarkExp3Power0x40(b *testing.B)     { ExpHelper(b, 3, 0x40) }
-func BenchmarkExp3Power0x100(b *testing.B)    { ExpHelper(b, 3, 0x100) }
-func BenchmarkExp3Power0x400(b *testing.B)    { ExpHelper(b, 3, 0x400) }
-func BenchmarkExp3Power0x1000(b *testing.B)   { ExpHelper(b, 3, 0x1000) }
-func BenchmarkExp3Power0x4000(b *testing.B)   { ExpHelper(b, 3, 0x4000) }
-func BenchmarkExp3Power0x10000(b *testing.B)  { ExpHelper(b, 3, 0x10000) }
-func BenchmarkExp3Power0x40000(b *testing.B)  { ExpHelper(b, 3, 0x40000) }
-func BenchmarkExp3Power0x100000(b *testing.B) { ExpHelper(b, 3, 0x100000) }
-func BenchmarkExp3Power0x400000(b *testing.B) { ExpHelper(b, 3, 0x400000) }
-
-func fibo(n int) nat {
-	switch n {
-	case 0:
-		return nil
-	case 1:
-		return nat{1}
-	}
-	f0 := fibo(0)
-	f1 := fibo(1)
-	var f2 nat
-	for i := 1; i < n; i++ {
-		f2 = f2.add(f0, f1)
-		f0, f1, f2 = f1, f2, f0
-	}
-	return f1
-}
-
-var fiboNums = []string{
-	"0",
-	"55",
-	"6765",
-	"832040",
-	"102334155",
-	"12586269025",
-	"1548008755920",
-	"190392490709135",
-	"23416728348467685",
-	"2880067194370816120",
-	"354224848179261915075",
-}
-
-func TestFibo(t *testing.T) {
-	for i, want := range fiboNums {
-		n := i * 10
-		got := fibo(n).decimalString()
-		if got != want {
-			t.Errorf("fibo(%d) failed: got %s want %s", n, got, want)
-		}
-	}
-}
-
-func BenchmarkFibo(b *testing.B) {
-	for i := 0; i < b.N; i++ {
-		fibo(1e0)
-		fibo(1e1)
-		fibo(1e2)
-		fibo(1e3)
-		fibo(1e4)
-		fibo(1e5)
-	}
-}
-
-var bitTests = []struct {
-	x    string
-	i    uint
-	want uint
-}{
-	{"0", 0, 0},
-	{"0", 1, 0},
-	{"0", 1000, 0},
-
-	{"0x1", 0, 1},
-	{"0x10", 0, 0},
-	{"0x10", 3, 0},
-	{"0x10", 4, 1},
-	{"0x10", 5, 0},
-
-	{"0x8000000000000000", 62, 0},
-	{"0x8000000000000000", 63, 1},
-	{"0x8000000000000000", 64, 0},
-
-	{"0x3" + strings.Repeat("0", 32), 127, 0},
-	{"0x3" + strings.Repeat("0", 32), 128, 1},
-	{"0x3" + strings.Repeat("0", 32), 129, 1},
-	{"0x3" + strings.Repeat("0", 32), 130, 0},
-}
-
-func TestBit(t *testing.T) {
-	for i, test := range bitTests {
-		x := natFromString(test.x)
-		if got := x.bit(test.i); got != test.want {
-			t.Errorf("#%d: %s.bit(%d) = %v; want %v", i, test.x, test.i, got, test.want)
-		}
-	}
-}
-
-var stickyTests = []struct {
-	x    string
-	i    uint
-	want uint
-}{
-	{"0", 0, 0},
-	{"0", 1, 0},
-	{"0", 1000, 0},
-
-	{"0x1", 0, 0},
-	{"0x1", 1, 1},
-
-	{"0x1350", 0, 0},
-	{"0x1350", 4, 0},
-	{"0x1350", 5, 1},
-
-	{"0x8000000000000000", 63, 0},
-	{"0x8000000000000000", 64, 1},
-
-	{"0x1" + strings.Repeat("0", 100), 400, 0},
-	{"0x1" + strings.Repeat("0", 100), 401, 1},
-}
-
-func TestSticky(t *testing.T) {
-	for i, test := range stickyTests {
-		x := natFromString(test.x)
-		if got := x.sticky(test.i); got != test.want {
-			t.Errorf("#%d: %s.sticky(%d) = %v; want %v", i, test.x, test.i, got, test.want)
-		}
-		if test.want == 1 {
-			// all subsequent i's should also return 1
-			for d := uint(1); d <= 3; d++ {
-				if got := x.sticky(test.i + d); got != 1 {
-					t.Errorf("#%d: %s.sticky(%d) = %v; want %v", i, test.x, test.i+d, got, 1)
-				}
-			}
-		}
-	}
-}
diff --git a/src/cmd/compile/internal/big/natconv.go b/src/cmd/compile/internal/big/natconv.go
deleted file mode 100644
index 022dcfe..0000000
--- a/src/cmd/compile/internal/big/natconv.go
+++ /dev/null
@@ -1,495 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements nat-to-string conversion functions.
-
-package big
-
-import (
-	"errors"
-	"fmt"
-	"io"
-	"math"
-	"sync"
-)
-
-// MaxBase is the largest number base accepted for string conversions.
-const MaxBase = 'z' - 'a' + 10 + 1
-
-// maxPow returns (b**n, n) such that b**n is the largest power b**n <= _M.
-// For instance maxPow(10) == (1e19, 19) for 19 decimal digits in a 64bit Word.
-// In other words, at most n digits in base b fit into a Word.
-// TODO(gri) replace this with a table, generated at build time.
-func maxPow(b Word) (p Word, n int) {
-	p, n = b, 1 // assuming b <= _M
-	for max := _M / b; p <= max; {
-		// p == b**n && p <= max
-		p *= b
-		n++
-	}
-	// p == b**n && p <= _M
-	return
-}
-
-// pow returns x**n for n > 0, and 1 otherwise.
-func pow(x Word, n int) (p Word) {
-	// n == sum of bi * 2**i, for 0 <= i < imax, and bi is 0 or 1
-	// thus x**n == product of x**(2**i) for all i where bi == 1
-	// (Russian Peasant Method for exponentiation)
-	p = 1
-	for n > 0 {
-		if n&1 != 0 {
-			p *= x
-		}
-		x *= x
-		n >>= 1
-	}
-	return
-}
-
-// scan scans the number corresponding to the longest possible prefix
-// from r representing an unsigned number in a given conversion base.
-// It returns the corresponding natural number res, the actual base b,
-// a digit count, and a read or syntax error err, if any.
-//
-//	number   = [ prefix ] mantissa .
-//	prefix   = "0" [ "x" | "X" | "b" | "B" ] .
-//      mantissa = digits | digits "." [ digits ] | "." digits .
-//	digits   = digit { digit } .
-//	digit    = "0" ... "9" | "a" ... "z" | "A" ... "Z" .
-//
-// Unless fracOk is set, the base argument must be 0 or a value between
-// 2 and MaxBase. If fracOk is set, the base argument must be one of
-// 0, 2, 10, or 16. Providing an invalid base argument leads to a run-
-// time panic.
-//
-// For base 0, the number prefix determines the actual base: A prefix of
-// ``0x'' or ``0X'' selects base 16; if fracOk is not set, the ``0'' prefix
-// selects base 8, and a ``0b'' or ``0B'' prefix selects base 2. Otherwise
-// the selected base is 10 and no prefix is accepted.
-//
-// If fracOk is set, an octal prefix is ignored (a leading ``0'' simply
-// stands for a zero digit), and a period followed by a fractional part
-// is permitted. The result value is computed as if there were no period
-// present; and the count value is used to determine the fractional part.
-//
-// A result digit count > 0 corresponds to the number of (non-prefix) digits
-// parsed. A digit count <= 0 indicates the presence of a period (if fracOk
-// is set, only), and -count is the number of fractional digits found.
-// In this case, the actual value of the scanned number is res * b**count.
-//
-func (z nat) scan(r io.ByteScanner, base int, fracOk bool) (res nat, b, count int, err error) {
-	// reject illegal bases
-	baseOk := base == 0 ||
-		!fracOk && 2 <= base && base <= MaxBase ||
-		fracOk && (base == 2 || base == 10 || base == 16)
-	if !baseOk {
-		panic(fmt.Sprintf("illegal number base %d", base))
-	}
-
-	// one char look-ahead
-	ch, err := r.ReadByte()
-	if err != nil {
-		return
-	}
-
-	// determine actual base
-	b = base
-	if base == 0 {
-		// actual base is 10 unless there's a base prefix
-		b = 10
-		if ch == '0' {
-			count = 1
-			switch ch, err = r.ReadByte(); err {
-			case nil:
-				// possibly one of 0x, 0X, 0b, 0B
-				if !fracOk {
-					b = 8
-				}
-				switch ch {
-				case 'x', 'X':
-					b = 16
-				case 'b', 'B':
-					b = 2
-				}
-				switch b {
-				case 16, 2:
-					count = 0 // prefix is not counted
-					if ch, err = r.ReadByte(); err != nil {
-						// io.EOF is also an error in this case
-						return
-					}
-				case 8:
-					count = 0 // prefix is not counted
-				}
-			case io.EOF:
-				// input is "0"
-				res = z[:0]
-				err = nil
-				return
-			default:
-				// read error
-				return
-			}
-		}
-	}
-
-	// convert string
-	// Algorithm: Collect digits in groups of at most n digits in di
-	// and then use mulAddWW for every such group to add them to the
-	// result.
-	z = z[:0]
-	b1 := Word(b)
-	bn, n := maxPow(b1) // at most n digits in base b1 fit into Word
-	di := Word(0)       // 0 <= di < b1**i < bn
-	i := 0              // 0 <= i < n
-	dp := -1            // position of decimal point
-	for {
-		if fracOk && ch == '.' {
-			fracOk = false
-			dp = count
-			// advance
-			if ch, err = r.ReadByte(); err != nil {
-				if err == io.EOF {
-					err = nil
-					break
-				}
-				return
-			}
-		}
-
-		// convert rune into digit value d1
-		var d1 Word
-		switch {
-		case '0' <= ch && ch <= '9':
-			d1 = Word(ch - '0')
-		case 'a' <= ch && ch <= 'z':
-			d1 = Word(ch - 'a' + 10)
-		case 'A' <= ch && ch <= 'Z':
-			d1 = Word(ch - 'A' + 10)
-		default:
-			d1 = MaxBase + 1
-		}
-		if d1 >= b1 {
-			r.UnreadByte() // ch does not belong to number anymore
-			break
-		}
-		count++
-
-		// collect d1 in di
-		di = di*b1 + d1
-		i++
-
-		// if di is "full", add it to the result
-		if i == n {
-			z = z.mulAddWW(z, bn, di)
-			di = 0
-			i = 0
-		}
-
-		// advance
-		if ch, err = r.ReadByte(); err != nil {
-			if err == io.EOF {
-				err = nil
-				break
-			}
-			return
-		}
-	}
-
-	if count == 0 {
-		// no digits found
-		switch {
-		case base == 0 && b == 8:
-			// there was only the octal prefix 0 (possibly followed by digits > 7);
-			// count as one digit and return base 10, not 8
-			count = 1
-			b = 10
-		case base != 0 || b != 8:
-			// there was neither a mantissa digit nor the octal prefix 0
-			err = errors.New("syntax error scanning number")
-		}
-		return
-	}
-	// count > 0
-
-	// add remaining digits to result
-	if i > 0 {
-		z = z.mulAddWW(z, pow(b1, i), di)
-	}
-	res = z.norm()
-
-	// adjust for fraction, if any
-	if dp >= 0 {
-		// 0 <= dp <= count > 0
-		count = dp - count
-	}
-
-	return
-}
-
-// Character sets for string conversion.
-const (
-	lowercaseDigits = "0123456789abcdefghijklmnopqrstuvwxyz"
-	uppercaseDigits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-)
-
-// decimalString returns a decimal representation of x.
-// It calls x.string with the charset "0123456789".
-func (x nat) decimalString() string {
-	return x.string(lowercaseDigits[:10])
-}
-
-// hexString returns a hexadecimal representation of x.
-// It calls x.string with the charset "0123456789abcdef".
-func (x nat) hexString() string {
-	return x.string(lowercaseDigits[:16])
-}
-
-// string converts x to a string using digits from a charset; a digit with
-// value d is represented by charset[d]. The conversion base is determined
-// by len(charset), which must be >= 2 and <= 256.
-func (x nat) string(charset string) string {
-	b := Word(len(charset))
-
-	// special cases
-	switch {
-	case b < 2 || b > 256:
-		panic("invalid character set length")
-	case len(x) == 0:
-		return string(charset[0])
-	}
-
-	// allocate buffer for conversion
-	i := int(float64(x.bitLen())/math.Log2(float64(b))) + 1 // off by one at most
-	s := make([]byte, i)
-
-	// convert power of two and non power of two bases separately
-	if b == b&-b {
-		// shift is base-b digit size in bits
-		shift := trailingZeroBits(b) // shift > 0 because b >= 2
-		mask := Word(1)<<shift - 1
-		w := x[0]
-		nbits := uint(_W) // number of unprocessed bits in w
-
-		// convert less-significant words
-		for k := 1; k < len(x); k++ {
-			// convert full digits
-			for nbits >= shift {
-				i--
-				s[i] = charset[w&mask]
-				w >>= shift
-				nbits -= shift
-			}
-
-			// convert any partial leading digit and advance to next word
-			if nbits == 0 {
-				// no partial digit remaining, just advance
-				w = x[k]
-				nbits = _W
-			} else {
-				// partial digit in current (k-1) and next (k) word
-				w |= x[k] << nbits
-				i--
-				s[i] = charset[w&mask]
-
-				// advance
-				w = x[k] >> (shift - nbits)
-				nbits = _W - (shift - nbits)
-			}
-		}
-
-		// convert digits of most-significant word (omit leading zeros)
-		for nbits >= 0 && w != 0 {
-			i--
-			s[i] = charset[w&mask]
-			w >>= shift
-			nbits -= shift
-		}
-
-	} else {
-		bb, ndigits := maxPow(Word(b))
-
-		// construct table of successive squares of bb*leafSize to use in subdivisions
-		// result (table != nil) <=> (len(x) > leafSize > 0)
-		table := divisors(len(x), b, ndigits, bb)
-
-		// preserve x, create local copy for use by convertWords
-		q := nat(nil).set(x)
-
-		// convert q to string s in base b
-		q.convertWords(s, charset, b, ndigits, bb, table)
-
-		// strip leading zeros
-		// (x != 0; thus s must contain at least one non-zero digit
-		// and the loop will terminate)
-		i = 0
-		for zero := charset[0]; s[i] == zero; {
-			i++
-		}
-	}
-
-	return string(s[i:])
-}
-
-// Convert words of q to base b digits in s. If q is large, it is recursively "split in half"
-// by nat/nat division using tabulated divisors. Otherwise, it is converted iteratively using
-// repeated nat/Word division.
-//
-// The iterative method processes n Words by n divW() calls, each of which visits every Word in the
-// incrementally shortened q for a total of n + (n-1) + (n-2) ... + 2 + 1, or n(n+1)/2 divW()'s.
-// Recursive conversion divides q by its approximate square root, yielding two parts, each half
-// the size of q. Using the iterative method on both halves means 2 * (n/2)(n/2 + 1)/2 divW()'s
-// plus the expensive long div(). Asymptotically, the ratio is favorable at 1/2 the divW()'s, and
-// is made better by splitting the subblocks recursively. Best is to split blocks until one more
-// split would take longer (because of the nat/nat div()) than the twice as many divW()'s of the
-// iterative approach. This threshold is represented by leafSize. Benchmarking of leafSize in the
-// range 2..64 shows that values of 8 and 16 work well, with a 4x speedup at medium lengths and
-// ~30x for 20000 digits. Use nat_test.go's BenchmarkLeafSize tests to optimize leafSize for
-// specific hardware.
-//
-func (q nat) convertWords(s []byte, charset string, b Word, ndigits int, bb Word, table []divisor) {
-	// split larger blocks recursively
-	if table != nil {
-		// len(q) > leafSize > 0
-		var r nat
-		index := len(table) - 1
-		for len(q) > leafSize {
-			// find divisor close to sqrt(q) if possible, but in any case < q
-			maxLength := q.bitLen()     // ~= log2 q, or at of least largest possible q of this bit length
-			minLength := maxLength >> 1 // ~= log2 sqrt(q)
-			for index > 0 && table[index-1].nbits > minLength {
-				index-- // desired
-			}
-			if table[index].nbits >= maxLength && table[index].bbb.cmp(q) >= 0 {
-				index--
-				if index < 0 {
-					panic("internal inconsistency")
-				}
-			}
-
-			// split q into the two digit number (q'*bbb + r) to form independent subblocks
-			q, r = q.div(r, q, table[index].bbb)
-
-			// convert subblocks and collect results in s[:h] and s[h:]
-			h := len(s) - table[index].ndigits
-			r.convertWords(s[h:], charset, b, ndigits, bb, table[0:index])
-			s = s[:h] // == q.convertWords(s, charset, b, ndigits, bb, table[0:index+1])
-		}
-	}
-
-	// having split any large blocks now process the remaining (small) block iteratively
-	i := len(s)
-	var r Word
-	if b == 10 {
-		// hard-coding for 10 here speeds this up by 1.25x (allows for / and % by constants)
-		for len(q) > 0 {
-			// extract least significant, base bb "digit"
-			q, r = q.divW(q, bb)
-			for j := 0; j < ndigits && i > 0; j++ {
-				i--
-				// avoid % computation since r%10 == r - int(r/10)*10;
-				// this appears to be faster for BenchmarkString10000Base10
-				// and smaller strings (but a bit slower for larger ones)
-				t := r / 10
-				s[i] = charset[r-t<<3-t-t] // TODO(gri) replace w/ t*10 once compiler produces better code
-				r = t
-			}
-		}
-	} else {
-		for len(q) > 0 {
-			// extract least significant, base bb "digit"
-			q, r = q.divW(q, bb)
-			for j := 0; j < ndigits && i > 0; j++ {
-				i--
-				s[i] = charset[r%b]
-				r /= b
-			}
-		}
-	}
-
-	// prepend high-order zeroes
-	zero := charset[0]
-	for i > 0 { // while need more leading zeroes
-		i--
-		s[i] = zero
-	}
-}
-
-// Split blocks greater than leafSize Words (or set to 0 to disable recursive conversion)
-// Benchmark and configure leafSize using: go test -bench="Leaf"
-//   8 and 16 effective on 3.0 GHz Xeon "Clovertown" CPU (128 byte cache lines)
-//   8 and 16 effective on 2.66 GHz Core 2 Duo "Penryn" CPU
-var leafSize int = 8 // number of Word-size binary values treat as a monolithic block
-
-type divisor struct {
-	bbb     nat // divisor
-	nbits   int // bit length of divisor (discounting leading zeroes) ~= log2(bbb)
-	ndigits int // digit length of divisor in terms of output base digits
-}
-
-var cacheBase10 struct {
-	sync.Mutex
-	table [64]divisor // cached divisors for base 10
-}
-
-// expWW computes x**y
-func (z nat) expWW(x, y Word) nat {
-	return z.expNN(nat(nil).setWord(x), nat(nil).setWord(y), nil)
-}
-
-// construct table of powers of bb*leafSize to use in subdivisions
-func divisors(m int, b Word, ndigits int, bb Word) []divisor {
-	// only compute table when recursive conversion is enabled and x is large
-	if leafSize == 0 || m <= leafSize {
-		return nil
-	}
-
-	// determine k where (bb**leafSize)**(2**k) >= sqrt(x)
-	k := 1
-	for words := leafSize; words < m>>1 && k < len(cacheBase10.table); words <<= 1 {
-		k++
-	}
-
-	// reuse and extend existing table of divisors or create new table as appropriate
-	var table []divisor // for b == 10, table overlaps with cacheBase10.table
-	if b == 10 {
-		cacheBase10.Lock()
-		table = cacheBase10.table[0:k] // reuse old table for this conversion
-	} else {
-		table = make([]divisor, k) // create new table for this conversion
-	}
-
-	// extend table
-	if table[k-1].ndigits == 0 {
-		// add new entries as needed
-		var larger nat
-		for i := 0; i < k; i++ {
-			if table[i].ndigits == 0 {
-				if i == 0 {
-					table[0].bbb = nat(nil).expWW(bb, Word(leafSize))
-					table[0].ndigits = ndigits * leafSize
-				} else {
-					table[i].bbb = nat(nil).mul(table[i-1].bbb, table[i-1].bbb)
-					table[i].ndigits = 2 * table[i-1].ndigits
-				}
-
-				// optimization: exploit aggregated extra bits in macro blocks
-				larger = nat(nil).set(table[i].bbb)
-				for mulAddVWW(larger, larger, b, 0) == 0 {
-					table[i].bbb = table[i].bbb.set(larger)
-					table[i].ndigits++
-				}
-
-				table[i].nbits = table[i].bbb.bitLen()
-			}
-		}
-	}
-
-	if b == 10 {
-		cacheBase10.Unlock()
-	}
-
-	return table
-}
diff --git a/src/cmd/compile/internal/big/natconv_test.go b/src/cmd/compile/internal/big/natconv_test.go
deleted file mode 100644
index f321fbc..0000000
--- a/src/cmd/compile/internal/big/natconv_test.go
+++ /dev/null
@@ -1,425 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package big
-
-import (
-	"io"
-	"strings"
-	"testing"
-)
-
-func toString(x nat, charset string) string {
-	base := len(charset)
-
-	// special cases
-	switch {
-	case base < 2:
-		panic("illegal base")
-	case len(x) == 0:
-		return string(charset[0])
-	}
-
-	// allocate buffer for conversion
-	i := x.bitLen()/log2(Word(base)) + 1 // +1: round up
-	s := make([]byte, i)
-
-	// don't destroy x
-	q := nat(nil).set(x)
-
-	// convert
-	for len(q) > 0 {
-		i--
-		var r Word
-		q, r = q.divW(q, Word(base))
-		s[i] = charset[r]
-	}
-
-	return string(s[i:])
-}
-
-var strTests = []struct {
-	x nat    // nat value to be converted
-	c string // conversion charset
-	s string // expected result
-}{
-	{nil, "01", "0"},
-	{nat{1}, "01", "1"},
-	{nat{0xc5}, "01", "11000101"},
-	{nat{03271}, lowercaseDigits[:8], "3271"},
-	{nat{10}, lowercaseDigits[:10], "10"},
-	{nat{1234567890}, uppercaseDigits[:10], "1234567890"},
-	{nat{0xdeadbeef}, lowercaseDigits[:16], "deadbeef"},
-	{nat{0xdeadbeef}, uppercaseDigits[:16], "DEADBEEF"},
-	{nat{0x229be7}, lowercaseDigits[:17], "1a2b3c"},
-	{nat{0x309663e6}, uppercaseDigits[:32], "O9COV6"},
-}
-
-func TestString(t *testing.T) {
-	// test invalid character set explicitly
-	var panicStr string
-	func() {
-		defer func() {
-			panicStr = recover().(string)
-		}()
-		natOne.string("0")
-	}()
-	if panicStr != "invalid character set length" {
-		t.Errorf("expected panic for invalid character set")
-	}
-
-	for _, a := range strTests {
-		s := a.x.string(a.c)
-		if s != a.s {
-			t.Errorf("string%+v\n\tgot s = %s; want %s", a, s, a.s)
-		}
-
-		x, b, _, err := nat(nil).scan(strings.NewReader(a.s), len(a.c), false)
-		if x.cmp(a.x) != 0 {
-			t.Errorf("scan%+v\n\tgot z = %v; want %v", a, x, a.x)
-		}
-		if b != len(a.c) {
-			t.Errorf("scan%+v\n\tgot b = %d; want %d", a, b, len(a.c))
-		}
-		if err != nil {
-			t.Errorf("scan%+v\n\tgot error = %s", a, err)
-		}
-	}
-}
-
-var natScanTests = []struct {
-	s     string // string to be scanned
-	base  int    // input base
-	frac  bool   // fraction ok
-	x     nat    // expected nat
-	b     int    // expected base
-	count int    // expected digit count
-	ok    bool   // expected success
-	next  rune   // next character (or 0, if at EOF)
-}{
-	// error: no mantissa
-	{},
-	{s: "?"},
-	{base: 10},
-	{base: 36},
-	{s: "?", base: 10},
-	{s: "0x"},
-	{s: "345", base: 2},
-
-	// error: incorrect use of decimal point
-	{s: ".0"},
-	{s: ".0", base: 10},
-	{s: ".", base: 0},
-	{s: "0x.0"},
-
-	// no errors
-	{"0", 0, false, nil, 10, 1, true, 0},
-	{"0", 10, false, nil, 10, 1, true, 0},
-	{"0", 36, false, nil, 36, 1, true, 0},
-	{"1", 0, false, nat{1}, 10, 1, true, 0},
-	{"1", 10, false, nat{1}, 10, 1, true, 0},
-	{"0 ", 0, false, nil, 10, 1, true, ' '},
-	{"08", 0, false, nil, 10, 1, true, '8'},
-	{"08", 10, false, nat{8}, 10, 2, true, 0},
-	{"018", 0, false, nat{1}, 8, 1, true, '8'},
-	{"0b1", 0, false, nat{1}, 2, 1, true, 0},
-	{"0b11000101", 0, false, nat{0xc5}, 2, 8, true, 0},
-	{"03271", 0, false, nat{03271}, 8, 4, true, 0},
-	{"10ab", 0, false, nat{10}, 10, 2, true, 'a'},
-	{"1234567890", 0, false, nat{1234567890}, 10, 10, true, 0},
-	{"xyz", 36, false, nat{(33*36+34)*36 + 35}, 36, 3, true, 0},
-	{"xyz?", 36, false, nat{(33*36+34)*36 + 35}, 36, 3, true, '?'},
-	{"0x", 16, false, nil, 16, 1, true, 'x'},
-	{"0xdeadbeef", 0, false, nat{0xdeadbeef}, 16, 8, true, 0},
-	{"0XDEADBEEF", 0, false, nat{0xdeadbeef}, 16, 8, true, 0},
-
-	// no errors, decimal point
-	{"0.", 0, false, nil, 10, 1, true, '.'},
-	{"0.", 10, true, nil, 10, 0, true, 0},
-	{"0.1.2", 10, true, nat{1}, 10, -1, true, '.'},
-	{".000", 10, true, nil, 10, -3, true, 0},
-	{"12.3", 10, true, nat{123}, 10, -1, true, 0},
-	{"012.345", 10, true, nat{12345}, 10, -3, true, 0},
-}
-
-func TestScanBase(t *testing.T) {
-	for _, a := range natScanTests {
-		r := strings.NewReader(a.s)
-		x, b, count, err := nat(nil).scan(r, a.base, a.frac)
-		if err == nil && !a.ok {
-			t.Errorf("scan%+v\n\texpected error", a)
-		}
-		if err != nil {
-			if a.ok {
-				t.Errorf("scan%+v\n\tgot error = %s", a, err)
-			}
-			continue
-		}
-		if x.cmp(a.x) != 0 {
-			t.Errorf("scan%+v\n\tgot z = %v; want %v", a, x, a.x)
-		}
-		if b != a.b {
-			t.Errorf("scan%+v\n\tgot b = %d; want %d", a, b, a.base)
-		}
-		if count != a.count {
-			t.Errorf("scan%+v\n\tgot count = %d; want %d", a, count, a.count)
-		}
-		next, _, err := r.ReadRune()
-		if err == io.EOF {
-			next = 0
-			err = nil
-		}
-		if err == nil && next != a.next {
-			t.Errorf("scan%+v\n\tgot next = %q; want %q", a, next, a.next)
-		}
-	}
-}
-
-var pi = "3" +
-	"14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651" +
-	"32823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461" +
-	"28475648233786783165271201909145648566923460348610454326648213393607260249141273724587006606315588174881520920" +
-	"96282925409171536436789259036001133053054882046652138414695194151160943305727036575959195309218611738193261179" +
-	"31051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798" +
-	"60943702770539217176293176752384674818467669405132000568127145263560827785771342757789609173637178721468440901" +
-	"22495343014654958537105079227968925892354201995611212902196086403441815981362977477130996051870721134999999837" +
-	"29780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083" +
-	"81420617177669147303598253490428755468731159562863882353787593751957781857780532171226806613001927876611195909" +
-	"21642019893809525720106548586327886593615338182796823030195203530185296899577362259941389124972177528347913151" +
-	"55748572424541506959508295331168617278558890750983817546374649393192550604009277016711390098488240128583616035" +
-	"63707660104710181942955596198946767837449448255379774726847104047534646208046684259069491293313677028989152104" +
-	"75216205696602405803815019351125338243003558764024749647326391419927260426992279678235478163600934172164121992" +
-	"45863150302861829745557067498385054945885869269956909272107975093029553211653449872027559602364806654991198818" +
-	"34797753566369807426542527862551818417574672890977772793800081647060016145249192173217214772350141441973568548" +
-	"16136115735255213347574184946843852332390739414333454776241686251898356948556209921922218427255025425688767179" +
-	"04946016534668049886272327917860857843838279679766814541009538837863609506800642251252051173929848960841284886" +
-	"26945604241965285022210661186306744278622039194945047123713786960956364371917287467764657573962413890865832645" +
-	"99581339047802759009946576407895126946839835259570982582262052248940772671947826848260147699090264013639443745" +
-	"53050682034962524517493996514314298091906592509372216964615157098583874105978859597729754989301617539284681382" +
-	"68683868942774155991855925245953959431049972524680845987273644695848653836736222626099124608051243884390451244" +
-	"13654976278079771569143599770012961608944169486855584840635342207222582848864815845602850601684273945226746767" +
-	"88952521385225499546667278239864565961163548862305774564980355936345681743241125150760694794510965960940252288" +
-	"79710893145669136867228748940560101503308617928680920874760917824938589009714909675985261365549781893129784821" +
-	"68299894872265880485756401427047755513237964145152374623436454285844479526586782105114135473573952311342716610" +
-	"21359695362314429524849371871101457654035902799344037420073105785390621983874478084784896833214457138687519435" +
-	"06430218453191048481005370614680674919278191197939952061419663428754440643745123718192179998391015919561814675" +
-	"14269123974894090718649423196156794520809514655022523160388193014209376213785595663893778708303906979207734672" +
-	"21825625996615014215030680384477345492026054146659252014974428507325186660021324340881907104863317346496514539" +
-	"05796268561005508106658796998163574736384052571459102897064140110971206280439039759515677157700420337869936007" +
-	"23055876317635942187312514712053292819182618612586732157919841484882916447060957527069572209175671167229109816" +
-	"90915280173506712748583222871835209353965725121083579151369882091444210067510334671103141267111369908658516398" +
-	"31501970165151168517143765761835155650884909989859982387345528331635507647918535893226185489632132933089857064" +
-	"20467525907091548141654985946163718027098199430992448895757128289059232332609729971208443357326548938239119325" +
-	"97463667305836041428138830320382490375898524374417029132765618093773444030707469211201913020330380197621101100" +
-	"44929321516084244485963766983895228684783123552658213144957685726243344189303968642624341077322697802807318915" +
-	"44110104468232527162010526522721116603966655730925471105578537634668206531098965269186205647693125705863566201" +
-	"85581007293606598764861179104533488503461136576867532494416680396265797877185560845529654126654085306143444318" +
-	"58676975145661406800700237877659134401712749470420562230538994561314071127000407854733269939081454664645880797" +
-	"27082668306343285878569830523580893306575740679545716377525420211495576158140025012622859413021647155097925923" +
-	"09907965473761255176567513575178296664547791745011299614890304639947132962107340437518957359614589019389713111" +
-	"79042978285647503203198691514028708085990480109412147221317947647772622414254854540332157185306142288137585043" +
-	"06332175182979866223717215916077166925474873898665494945011465406284336639379003976926567214638530673609657120" +
-	"91807638327166416274888800786925602902284721040317211860820419000422966171196377921337575114959501566049631862" +
-	"94726547364252308177036751590673502350728354056704038674351362222477158915049530984448933309634087807693259939" +
-	"78054193414473774418426312986080998886874132604721569516239658645730216315981931951673538129741677294786724229" +
-	"24654366800980676928238280689964004824354037014163149658979409243237896907069779422362508221688957383798623001" +
-	"59377647165122893578601588161755782973523344604281512627203734314653197777416031990665541876397929334419521541" +
-	"34189948544473456738316249934191318148092777710386387734317720754565453220777092120190516609628049092636019759" +
-	"88281613323166636528619326686336062735676303544776280350450777235547105859548702790814356240145171806246436267" +
-	"94561275318134078330336254232783944975382437205835311477119926063813346776879695970309833913077109870408591337"
-
-// Test case for BenchmarkScanPi.
-func TestScanPi(t *testing.T) {
-	var x nat
-	z, _, _, err := x.scan(strings.NewReader(pi), 10, false)
-	if err != nil {
-		t.Errorf("scanning pi: %s", err)
-	}
-	if s := z.decimalString(); s != pi {
-		t.Errorf("scanning pi: got %s", s)
-	}
-}
-
-func TestScanPiParallel(t *testing.T) {
-	const n = 2
-	c := make(chan int)
-	for i := 0; i < n; i++ {
-		go func() {
-			TestScanPi(t)
-			c <- 0
-		}()
-	}
-	for i := 0; i < n; i++ {
-		<-c
-	}
-}
-
-func BenchmarkScanPi(b *testing.B) {
-	for i := 0; i < b.N; i++ {
-		var x nat
-		x.scan(strings.NewReader(pi), 10, false)
-	}
-}
-
-func BenchmarkStringPiParallel(b *testing.B) {
-	var x nat
-	x, _, _, _ = x.scan(strings.NewReader(pi), 0, false)
-	if x.decimalString() != pi {
-		panic("benchmark incorrect: conversion failed")
-	}
-	b.RunParallel(func(pb *testing.PB) {
-		for pb.Next() {
-			x.decimalString()
-		}
-	})
-}
-
-func BenchmarkScan10Base2(b *testing.B)     { ScanHelper(b, 2, 10, 10) }
-func BenchmarkScan100Base2(b *testing.B)    { ScanHelper(b, 2, 10, 100) }
-func BenchmarkScan1000Base2(b *testing.B)   { ScanHelper(b, 2, 10, 1000) }
-func BenchmarkScan10000Base2(b *testing.B)  { ScanHelper(b, 2, 10, 10000) }
-func BenchmarkScan100000Base2(b *testing.B) { ScanHelper(b, 2, 10, 100000) }
-
-func BenchmarkScan10Base8(b *testing.B)     { ScanHelper(b, 8, 10, 10) }
-func BenchmarkScan100Base8(b *testing.B)    { ScanHelper(b, 8, 10, 100) }
-func BenchmarkScan1000Base8(b *testing.B)   { ScanHelper(b, 8, 10, 1000) }
-func BenchmarkScan10000Base8(b *testing.B)  { ScanHelper(b, 8, 10, 10000) }
-func BenchmarkScan100000Base8(b *testing.B) { ScanHelper(b, 8, 10, 100000) }
-
-func BenchmarkScan10Base10(b *testing.B)     { ScanHelper(b, 10, 10, 10) }
-func BenchmarkScan100Base10(b *testing.B)    { ScanHelper(b, 10, 10, 100) }
-func BenchmarkScan1000Base10(b *testing.B)   { ScanHelper(b, 10, 10, 1000) }
-func BenchmarkScan10000Base10(b *testing.B)  { ScanHelper(b, 10, 10, 10000) }
-func BenchmarkScan100000Base10(b *testing.B) { ScanHelper(b, 10, 10, 100000) }
-
-func BenchmarkScan10Base16(b *testing.B)     { ScanHelper(b, 16, 10, 10) }
-func BenchmarkScan100Base16(b *testing.B)    { ScanHelper(b, 16, 10, 100) }
-func BenchmarkScan1000Base16(b *testing.B)   { ScanHelper(b, 16, 10, 1000) }
-func BenchmarkScan10000Base16(b *testing.B)  { ScanHelper(b, 16, 10, 10000) }
-func BenchmarkScan100000Base16(b *testing.B) { ScanHelper(b, 16, 10, 100000) }
-
-func ScanHelper(b *testing.B, base int, x, y Word) {
-	b.StopTimer()
-	var z nat
-	z = z.expWW(x, y)
-
-	var s string
-	s = z.string(lowercaseDigits[:base])
-	if t := toString(z, lowercaseDigits[:base]); t != s {
-		b.Fatalf("scanning: got %s; want %s", s, t)
-	}
-	b.StartTimer()
-
-	for i := 0; i < b.N; i++ {
-		z.scan(strings.NewReader(s), base, false)
-	}
-}
-
-func BenchmarkString10Base2(b *testing.B)     { StringHelper(b, 2, 10, 10) }
-func BenchmarkString100Base2(b *testing.B)    { StringHelper(b, 2, 10, 100) }
-func BenchmarkString1000Base2(b *testing.B)   { StringHelper(b, 2, 10, 1000) }
-func BenchmarkString10000Base2(b *testing.B)  { StringHelper(b, 2, 10, 10000) }
-func BenchmarkString100000Base2(b *testing.B) { StringHelper(b, 2, 10, 100000) }
-
-func BenchmarkString10Base8(b *testing.B)     { StringHelper(b, 8, 10, 10) }
-func BenchmarkString100Base8(b *testing.B)    { StringHelper(b, 8, 10, 100) }
-func BenchmarkString1000Base8(b *testing.B)   { StringHelper(b, 8, 10, 1000) }
-func BenchmarkString10000Base8(b *testing.B)  { StringHelper(b, 8, 10, 10000) }
-func BenchmarkString100000Base8(b *testing.B) { StringHelper(b, 8, 10, 100000) }
-
-func BenchmarkString10Base10(b *testing.B)     { StringHelper(b, 10, 10, 10) }
-func BenchmarkString100Base10(b *testing.B)    { StringHelper(b, 10, 10, 100) }
-func BenchmarkString1000Base10(b *testing.B)   { StringHelper(b, 10, 10, 1000) }
-func BenchmarkString10000Base10(b *testing.B)  { StringHelper(b, 10, 10, 10000) }
-func BenchmarkString100000Base10(b *testing.B) { StringHelper(b, 10, 10, 100000) }
-
-func BenchmarkString10Base16(b *testing.B)     { StringHelper(b, 16, 10, 10) }
-func BenchmarkString100Base16(b *testing.B)    { StringHelper(b, 16, 10, 100) }
-func BenchmarkString1000Base16(b *testing.B)   { StringHelper(b, 16, 10, 1000) }
-func BenchmarkString10000Base16(b *testing.B)  { StringHelper(b, 16, 10, 10000) }
-func BenchmarkString100000Base16(b *testing.B) { StringHelper(b, 16, 10, 100000) }
-
-func StringHelper(b *testing.B, base int, x, y Word) {
-	b.StopTimer()
-	var z nat
-	z = z.expWW(x, y)
-	z.string(lowercaseDigits[:base]) // warm divisor cache
-	b.StartTimer()
-
-	for i := 0; i < b.N; i++ {
-		_ = z.string(lowercaseDigits[:base])
-	}
-}
-
-func BenchmarkLeafSize0(b *testing.B)  { LeafSizeHelper(b, 10, 0) } // test without splitting
-func BenchmarkLeafSize1(b *testing.B)  { LeafSizeHelper(b, 10, 1) }
-func BenchmarkLeafSize2(b *testing.B)  { LeafSizeHelper(b, 10, 2) }
-func BenchmarkLeafSize3(b *testing.B)  { LeafSizeHelper(b, 10, 3) }
-func BenchmarkLeafSize4(b *testing.B)  { LeafSizeHelper(b, 10, 4) }
-func BenchmarkLeafSize5(b *testing.B)  { LeafSizeHelper(b, 10, 5) }
-func BenchmarkLeafSize6(b *testing.B)  { LeafSizeHelper(b, 10, 6) }
-func BenchmarkLeafSize7(b *testing.B)  { LeafSizeHelper(b, 10, 7) }
-func BenchmarkLeafSize8(b *testing.B)  { LeafSizeHelper(b, 10, 8) }
-func BenchmarkLeafSize9(b *testing.B)  { LeafSizeHelper(b, 10, 9) }
-func BenchmarkLeafSize10(b *testing.B) { LeafSizeHelper(b, 10, 10) }
-func BenchmarkLeafSize11(b *testing.B) { LeafSizeHelper(b, 10, 11) }
-func BenchmarkLeafSize12(b *testing.B) { LeafSizeHelper(b, 10, 12) }
-func BenchmarkLeafSize13(b *testing.B) { LeafSizeHelper(b, 10, 13) }
-func BenchmarkLeafSize14(b *testing.B) { LeafSizeHelper(b, 10, 14) }
-func BenchmarkLeafSize15(b *testing.B) { LeafSizeHelper(b, 10, 15) }
-func BenchmarkLeafSize16(b *testing.B) { LeafSizeHelper(b, 10, 16) }
-func BenchmarkLeafSize32(b *testing.B) { LeafSizeHelper(b, 10, 32) } // try some large lengths
-func BenchmarkLeafSize64(b *testing.B) { LeafSizeHelper(b, 10, 64) }
-
-func LeafSizeHelper(b *testing.B, base Word, size int) {
-	b.StopTimer()
-	originalLeafSize := leafSize
-	resetTable(cacheBase10.table[:])
-	leafSize = size
-	b.StartTimer()
-
-	for d := 1; d <= 10000; d *= 10 {
-		b.StopTimer()
-		var z nat
-		z = z.expWW(base, Word(d))           // build target number
-		_ = z.string(lowercaseDigits[:base]) // warm divisor cache
-		b.StartTimer()
-
-		for i := 0; i < b.N; i++ {
-			_ = z.string(lowercaseDigits[:base])
-		}
-	}
-
-	b.StopTimer()
-	resetTable(cacheBase10.table[:])
-	leafSize = originalLeafSize
-	b.StartTimer()
-}
-
-func resetTable(table []divisor) {
-	if table != nil && table[0].bbb != nil {
-		for i := 0; i < len(table); i++ {
-			table[i].bbb = nil
-			table[i].nbits = 0
-			table[i].ndigits = 0
-		}
-	}
-}
-
-func TestStringPowers(t *testing.T) {
-	var b, p Word
-	for b = 2; b <= 16; b++ {
-		for p = 0; p <= 512; p++ {
-			x := nat(nil).expWW(b, p)
-			xs := x.string(lowercaseDigits[:b])
-			xs2 := toString(x, lowercaseDigits[:b])
-			if xs != xs2 {
-				t.Errorf("failed at %d ** %d in base %d: %s != %s", b, p, b, xs, xs2)
-			}
-		}
-		if b >= 3 && testing.Short() {
-			break
-		}
-	}
-}
diff --git a/src/cmd/compile/internal/big/rat.go b/src/cmd/compile/internal/big/rat.go
deleted file mode 100644
index fb16f18..0000000
--- a/src/cmd/compile/internal/big/rat.go
+++ /dev/null
@@ -1,570 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements multi-precision rational numbers.
-
-package big
-
-import (
-	"encoding/binary"
-	"errors"
-	"fmt"
-	"math"
-)
-
-// A Rat represents a quotient a/b of arbitrary precision.
-// The zero value for a Rat represents the value 0.
-type Rat struct {
-	// To make zero values for Rat work w/o initialization,
-	// a zero value of b (len(b) == 0) acts like b == 1.
-	// a.neg determines the sign of the Rat, b.neg is ignored.
-	a, b Int
-}
-
-// NewRat creates a new Rat with numerator a and denominator b.
-func NewRat(a, b int64) *Rat {
-	return new(Rat).SetFrac64(a, b)
-}
-
-// SetFloat64 sets z to exactly f and returns z.
-// If f is not finite, SetFloat returns nil.
-func (z *Rat) SetFloat64(f float64) *Rat {
-	const expMask = 1<<11 - 1
-	bits := math.Float64bits(f)
-	mantissa := bits & (1<<52 - 1)
-	exp := int((bits >> 52) & expMask)
-	switch exp {
-	case expMask: // non-finite
-		return nil
-	case 0: // denormal
-		exp -= 1022
-	default: // normal
-		mantissa |= 1 << 52
-		exp -= 1023
-	}
-
-	shift := 52 - exp
-
-	// Optimization (?): partially pre-normalise.
-	for mantissa&1 == 0 && shift > 0 {
-		mantissa >>= 1
-		shift--
-	}
-
-	z.a.SetUint64(mantissa)
-	z.a.neg = f < 0
-	z.b.Set(intOne)
-	if shift > 0 {
-		z.b.Lsh(&z.b, uint(shift))
-	} else {
-		z.a.Lsh(&z.a, uint(-shift))
-	}
-	return z.norm()
-}
-
-// quotToFloat32 returns the non-negative float32 value
-// nearest to the quotient a/b, using round-to-even in
-// halfway cases.  It does not mutate its arguments.
-// Preconditions: b is non-zero; a and b have no common factors.
-func quotToFloat32(a, b nat) (f float32, exact bool) {
-	const (
-		// float size in bits
-		Fsize = 32
-
-		// mantissa
-		Msize  = 23
-		Msize1 = Msize + 1 // incl. implicit 1
-		Msize2 = Msize1 + 1
-
-		// exponent
-		Esize = Fsize - Msize1
-		Ebias = 1<<(Esize-1) - 1
-		Emin  = 1 - Ebias
-		Emax  = Ebias
-	)
-
-	// TODO(adonovan): specialize common degenerate cases: 1.0, integers.
-	alen := a.bitLen()
-	if alen == 0 {
-		return 0, true
-	}
-	blen := b.bitLen()
-	if blen == 0 {
-		panic("division by zero")
-	}
-
-	// 1. Left-shift A or B such that quotient A/B is in [1<<Msize1, 1<<(Msize2+1)
-	// (Msize2 bits if A < B when they are left-aligned, Msize2+1 bits if A >= B).
-	// This is 2 or 3 more than the float32 mantissa field width of Msize:
-	// - the optional extra bit is shifted away in step 3 below.
-	// - the high-order 1 is omitted in "normal" representation;
-	// - the low-order 1 will be used during rounding then discarded.
-	exp := alen - blen
-	var a2, b2 nat
-	a2 = a2.set(a)
-	b2 = b2.set(b)
-	if shift := Msize2 - exp; shift > 0 {
-		a2 = a2.shl(a2, uint(shift))
-	} else if shift < 0 {
-		b2 = b2.shl(b2, uint(-shift))
-	}
-
-	// 2. Compute quotient and remainder (q, r).  NB: due to the
-	// extra shift, the low-order bit of q is logically the
-	// high-order bit of r.
-	var q nat
-	q, r := q.div(a2, a2, b2) // (recycle a2)
-	mantissa := low32(q)
-	haveRem := len(r) > 0 // mantissa&1 && !haveRem => remainder is exactly half
-
-	// 3. If quotient didn't fit in Msize2 bits, redo division by b2<<1
-	// (in effect---we accomplish this incrementally).
-	if mantissa>>Msize2 == 1 {
-		if mantissa&1 == 1 {
-			haveRem = true
-		}
-		mantissa >>= 1
-		exp++
-	}
-	if mantissa>>Msize1 != 1 {
-		panic(fmt.Sprintf("expected exactly %d bits of result", Msize2))
-	}
-
-	// 4. Rounding.
-	if Emin-Msize <= exp && exp <= Emin {
-		// Denormal case; lose 'shift' bits of precision.
-		shift := uint(Emin - (exp - 1)) // [1..Esize1)
-		lostbits := mantissa & (1<<shift - 1)
-		haveRem = haveRem || lostbits != 0
-		mantissa >>= shift
-		exp = 2 - Ebias // == exp + shift
-	}
-	// Round q using round-half-to-even.
-	exact = !haveRem
-	if mantissa&1 != 0 {
-		exact = false
-		if haveRem || mantissa&2 != 0 {
-			if mantissa++; mantissa >= 1<<Msize2 {
-				// Complete rollover 11...1 => 100...0, so shift is safe
-				mantissa >>= 1
-				exp++
-			}
-		}
-	}
-	mantissa >>= 1 // discard rounding bit.  Mantissa now scaled by 1<<Msize1.
-
-	f = float32(math.Ldexp(float64(mantissa), exp-Msize1))
-	if math.IsInf(float64(f), 0) {
-		exact = false
-	}
-	return
-}
-
-// quotToFloat64 returns the non-negative float64 value
-// nearest to the quotient a/b, using round-to-even in
-// halfway cases.  It does not mutate its arguments.
-// Preconditions: b is non-zero; a and b have no common factors.
-func quotToFloat64(a, b nat) (f float64, exact bool) {
-	const (
-		// float size in bits
-		Fsize = 64
-
-		// mantissa
-		Msize  = 52
-		Msize1 = Msize + 1 // incl. implicit 1
-		Msize2 = Msize1 + 1
-
-		// exponent
-		Esize = Fsize - Msize1
-		Ebias = 1<<(Esize-1) - 1
-		Emin  = 1 - Ebias
-		Emax  = Ebias
-	)
-
-	// TODO(adonovan): specialize common degenerate cases: 1.0, integers.
-	alen := a.bitLen()
-	if alen == 0 {
-		return 0, true
-	}
-	blen := b.bitLen()
-	if blen == 0 {
-		panic("division by zero")
-	}
-
-	// 1. Left-shift A or B such that quotient A/B is in [1<<Msize1, 1<<(Msize2+1)
-	// (Msize2 bits if A < B when they are left-aligned, Msize2+1 bits if A >= B).
-	// This is 2 or 3 more than the float64 mantissa field width of Msize:
-	// - the optional extra bit is shifted away in step 3 below.
-	// - the high-order 1 is omitted in "normal" representation;
-	// - the low-order 1 will be used during rounding then discarded.
-	exp := alen - blen
-	var a2, b2 nat
-	a2 = a2.set(a)
-	b2 = b2.set(b)
-	if shift := Msize2 - exp; shift > 0 {
-		a2 = a2.shl(a2, uint(shift))
-	} else if shift < 0 {
-		b2 = b2.shl(b2, uint(-shift))
-	}
-
-	// 2. Compute quotient and remainder (q, r).  NB: due to the
-	// extra shift, the low-order bit of q is logically the
-	// high-order bit of r.
-	var q nat
-	q, r := q.div(a2, a2, b2) // (recycle a2)
-	mantissa := low64(q)
-	haveRem := len(r) > 0 // mantissa&1 && !haveRem => remainder is exactly half
-
-	// 3. If quotient didn't fit in Msize2 bits, redo division by b2<<1
-	// (in effect---we accomplish this incrementally).
-	if mantissa>>Msize2 == 1 {
-		if mantissa&1 == 1 {
-			haveRem = true
-		}
-		mantissa >>= 1
-		exp++
-	}
-	if mantissa>>Msize1 != 1 {
-		panic(fmt.Sprintf("expected exactly %d bits of result", Msize2))
-	}
-
-	// 4. Rounding.
-	if Emin-Msize <= exp && exp <= Emin {
-		// Denormal case; lose 'shift' bits of precision.
-		shift := uint(Emin - (exp - 1)) // [1..Esize1)
-		lostbits := mantissa & (1<<shift - 1)
-		haveRem = haveRem || lostbits != 0
-		mantissa >>= shift
-		exp = 2 - Ebias // == exp + shift
-	}
-	// Round q using round-half-to-even.
-	exact = !haveRem
-	if mantissa&1 != 0 {
-		exact = false
-		if haveRem || mantissa&2 != 0 {
-			if mantissa++; mantissa >= 1<<Msize2 {
-				// Complete rollover 11...1 => 100...0, so shift is safe
-				mantissa >>= 1
-				exp++
-			}
-		}
-	}
-	mantissa >>= 1 // discard rounding bit.  Mantissa now scaled by 1<<Msize1.
-
-	f = math.Ldexp(float64(mantissa), exp-Msize1)
-	if math.IsInf(f, 0) {
-		exact = false
-	}
-	return
-}
-
-// Float32 returns the nearest float32 value for x and a bool indicating
-// whether f represents x exactly. If the magnitude of x is too large to
-// be represented by a float32, f is an infinity and exact is false.
-// The sign of f always matches the sign of x, even if f == 0.
-func (x *Rat) Float32() (f float32, exact bool) {
-	b := x.b.abs
-	if len(b) == 0 {
-		b = b.set(natOne) // materialize denominator
-	}
-	f, exact = quotToFloat32(x.a.abs, b)
-	if x.a.neg {
-		f = -f
-	}
-	return
-}
-
-// Float64 returns the nearest float64 value for x and a bool indicating
-// whether f represents x exactly. If the magnitude of x is too large to
-// be represented by a float64, f is an infinity and exact is false.
-// The sign of f always matches the sign of x, even if f == 0.
-func (x *Rat) Float64() (f float64, exact bool) {
-	b := x.b.abs
-	if len(b) == 0 {
-		b = b.set(natOne) // materialize denominator
-	}
-	f, exact = quotToFloat64(x.a.abs, b)
-	if x.a.neg {
-		f = -f
-	}
-	return
-}
-
-// SetFrac sets z to a/b and returns z.
-func (z *Rat) SetFrac(a, b *Int) *Rat {
-	z.a.neg = a.neg != b.neg
-	babs := b.abs
-	if len(babs) == 0 {
-		panic("division by zero")
-	}
-	if &z.a == b || alias(z.a.abs, babs) {
-		babs = nat(nil).set(babs) // make a copy
-	}
-	z.a.abs = z.a.abs.set(a.abs)
-	z.b.abs = z.b.abs.set(babs)
-	return z.norm()
-}
-
-// SetFrac64 sets z to a/b and returns z.
-func (z *Rat) SetFrac64(a, b int64) *Rat {
-	z.a.SetInt64(a)
-	if b == 0 {
-		panic("division by zero")
-	}
-	if b < 0 {
-		b = -b
-		z.a.neg = !z.a.neg
-	}
-	z.b.abs = z.b.abs.setUint64(uint64(b))
-	return z.norm()
-}
-
-// SetInt sets z to x (by making a copy of x) and returns z.
-func (z *Rat) SetInt(x *Int) *Rat {
-	z.a.Set(x)
-	z.b.abs = z.b.abs[:0]
-	return z
-}
-
-// SetInt64 sets z to x and returns z.
-func (z *Rat) SetInt64(x int64) *Rat {
-	z.a.SetInt64(x)
-	z.b.abs = z.b.abs[:0]
-	return z
-}
-
-// Set sets z to x (by making a copy of x) and returns z.
-func (z *Rat) Set(x *Rat) *Rat {
-	if z != x {
-		z.a.Set(&x.a)
-		z.b.Set(&x.b)
-	}
-	return z
-}
-
-// Abs sets z to |x| (the absolute value of x) and returns z.
-func (z *Rat) Abs(x *Rat) *Rat {
-	z.Set(x)
-	z.a.neg = false
-	return z
-}
-
-// Neg sets z to -x and returns z.
-func (z *Rat) Neg(x *Rat) *Rat {
-	z.Set(x)
-	z.a.neg = len(z.a.abs) > 0 && !z.a.neg // 0 has no sign
-	return z
-}
-
-// Inv sets z to 1/x and returns z.
-func (z *Rat) Inv(x *Rat) *Rat {
-	if len(x.a.abs) == 0 {
-		panic("division by zero")
-	}
-	z.Set(x)
-	a := z.b.abs
-	if len(a) == 0 {
-		a = a.set(natOne) // materialize numerator
-	}
-	b := z.a.abs
-	if b.cmp(natOne) == 0 {
-		b = b[:0] // normalize denominator
-	}
-	z.a.abs, z.b.abs = a, b // sign doesn't change
-	return z
-}
-
-// Sign returns:
-//
-//	-1 if x <  0
-//	 0 if x == 0
-//	+1 if x >  0
-//
-func (x *Rat) Sign() int {
-	return x.a.Sign()
-}
-
-// IsInt reports whether the denominator of x is 1.
-func (x *Rat) IsInt() bool {
-	return len(x.b.abs) == 0 || x.b.abs.cmp(natOne) == 0
-}
-
-// Num returns the numerator of x; it may be <= 0.
-// The result is a reference to x's numerator; it
-// may change if a new value is assigned to x, and vice versa.
-// The sign of the numerator corresponds to the sign of x.
-func (x *Rat) Num() *Int {
-	return &x.a
-}
-
-// Denom returns the denominator of x; it is always > 0.
-// The result is a reference to x's denominator; it
-// may change if a new value is assigned to x, and vice versa.
-func (x *Rat) Denom() *Int {
-	x.b.neg = false // the result is always >= 0
-	if len(x.b.abs) == 0 {
-		x.b.abs = x.b.abs.set(natOne) // materialize denominator
-	}
-	return &x.b
-}
-
-func (z *Rat) norm() *Rat {
-	switch {
-	case len(z.a.abs) == 0:
-		// z == 0 - normalize sign and denominator
-		z.a.neg = false
-		z.b.abs = z.b.abs[:0]
-	case len(z.b.abs) == 0:
-		// z is normalized int - nothing to do
-	case z.b.abs.cmp(natOne) == 0:
-		// z is int - normalize denominator
-		z.b.abs = z.b.abs[:0]
-	default:
-		neg := z.a.neg
-		z.a.neg = false
-		z.b.neg = false
-		if f := NewInt(0).binaryGCD(&z.a, &z.b); f.Cmp(intOne) != 0 {
-			z.a.abs, _ = z.a.abs.div(nil, z.a.abs, f.abs)
-			z.b.abs, _ = z.b.abs.div(nil, z.b.abs, f.abs)
-			if z.b.abs.cmp(natOne) == 0 {
-				// z is int - normalize denominator
-				z.b.abs = z.b.abs[:0]
-			}
-		}
-		z.a.neg = neg
-	}
-	return z
-}
-
-// mulDenom sets z to the denominator product x*y (by taking into
-// account that 0 values for x or y must be interpreted as 1) and
-// returns z.
-func mulDenom(z, x, y nat) nat {
-	switch {
-	case len(x) == 0:
-		return z.set(y)
-	case len(y) == 0:
-		return z.set(x)
-	}
-	return z.mul(x, y)
-}
-
-// scaleDenom computes x*f.
-// If f == 0 (zero value of denominator), the result is (a copy of) x.
-func scaleDenom(x *Int, f nat) *Int {
-	var z Int
-	if len(f) == 0 {
-		return z.Set(x)
-	}
-	z.abs = z.abs.mul(x.abs, f)
-	z.neg = x.neg
-	return &z
-}
-
-// Cmp compares x and y and returns:
-//
-//   -1 if x <  y
-//    0 if x == y
-//   +1 if x >  y
-//
-func (x *Rat) Cmp(y *Rat) int {
-	return scaleDenom(&x.a, y.b.abs).Cmp(scaleDenom(&y.a, x.b.abs))
-}
-
-// Add sets z to the sum x+y and returns z.
-func (z *Rat) Add(x, y *Rat) *Rat {
-	a1 := scaleDenom(&x.a, y.b.abs)
-	a2 := scaleDenom(&y.a, x.b.abs)
-	z.a.Add(a1, a2)
-	z.b.abs = mulDenom(z.b.abs, x.b.abs, y.b.abs)
-	return z.norm()
-}
-
-// Sub sets z to the difference x-y and returns z.
-func (z *Rat) Sub(x, y *Rat) *Rat {
-	a1 := scaleDenom(&x.a, y.b.abs)
-	a2 := scaleDenom(&y.a, x.b.abs)
-	z.a.Sub(a1, a2)
-	z.b.abs = mulDenom(z.b.abs, x.b.abs, y.b.abs)
-	return z.norm()
-}
-
-// Mul sets z to the product x*y and returns z.
-func (z *Rat) Mul(x, y *Rat) *Rat {
-	z.a.Mul(&x.a, &y.a)
-	z.b.abs = mulDenom(z.b.abs, x.b.abs, y.b.abs)
-	return z.norm()
-}
-
-// Quo sets z to the quotient x/y and returns z.
-// If y == 0, a division-by-zero run-time panic occurs.
-func (z *Rat) Quo(x, y *Rat) *Rat {
-	if len(y.a.abs) == 0 {
-		panic("division by zero")
-	}
-	a := scaleDenom(&x.a, y.b.abs)
-	b := scaleDenom(&y.a, x.b.abs)
-	z.a.abs = a.abs
-	z.b.abs = b.abs
-	z.a.neg = a.neg != b.neg
-	return z.norm()
-}
-
-// Gob codec version. Permits backward-compatible changes to the encoding.
-const ratGobVersion byte = 1
-
-// GobEncode implements the gob.GobEncoder interface.
-func (x *Rat) GobEncode() ([]byte, error) {
-	if x == nil {
-		return nil, nil
-	}
-	buf := make([]byte, 1+4+(len(x.a.abs)+len(x.b.abs))*_S) // extra bytes for version and sign bit (1), and numerator length (4)
-	i := x.b.abs.bytes(buf)
-	j := x.a.abs.bytes(buf[:i])
-	n := i - j
-	if int(uint32(n)) != n {
-		// this should never happen
-		return nil, errors.New("Rat.GobEncode: numerator too large")
-	}
-	binary.BigEndian.PutUint32(buf[j-4:j], uint32(n))
-	j -= 1 + 4
-	b := ratGobVersion << 1 // make space for sign bit
-	if x.a.neg {
-		b |= 1
-	}
-	buf[j] = b
-	return buf[j:], nil
-}
-
-// GobDecode implements the gob.GobDecoder interface.
-func (z *Rat) GobDecode(buf []byte) error {
-	if len(buf) == 0 {
-		// Other side sent a nil or default value.
-		*z = Rat{}
-		return nil
-	}
-	b := buf[0]
-	if b>>1 != ratGobVersion {
-		return fmt.Errorf("Rat.GobDecode: encoding version %d not supported", b>>1)
-	}
-	const j = 1 + 4
-	i := j + binary.BigEndian.Uint32(buf[j-4:j])
-	z.a.neg = b&1 != 0
-	z.a.abs = z.a.abs.setBytes(buf[j:i])
-	z.b.abs = z.b.abs.setBytes(buf[i:])
-	return nil
-}
-
-// MarshalText implements the encoding.TextMarshaler interface.
-func (r *Rat) MarshalText() (text []byte, err error) {
-	return []byte(r.RatString()), nil
-}
-
-// UnmarshalText implements the encoding.TextUnmarshaler interface.
-func (r *Rat) UnmarshalText(text []byte) error {
-	if _, ok := r.SetString(string(text)); !ok {
-		return fmt.Errorf("math/big: cannot unmarshal %q into a *big.Rat", text)
-	}
-	return nil
-}
diff --git a/src/cmd/compile/internal/big/rat_test.go b/src/cmd/compile/internal/big/rat_test.go
deleted file mode 100644
index 012d0c4..0000000
--- a/src/cmd/compile/internal/big/rat_test.go
+++ /dev/null
@@ -1,736 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package big
-
-import (
-	"bytes"
-	"encoding/gob"
-	"encoding/json"
-	"encoding/xml"
-	"math"
-	"testing"
-)
-
-func TestZeroRat(t *testing.T) {
-	var x, y, z Rat
-	y.SetFrac64(0, 42)
-
-	if x.Cmp(&y) != 0 {
-		t.Errorf("x and y should be both equal and zero")
-	}
-
-	if s := x.String(); s != "0/1" {
-		t.Errorf("got x = %s, want 0/1", s)
-	}
-
-	if s := x.RatString(); s != "0" {
-		t.Errorf("got x = %s, want 0", s)
-	}
-
-	z.Add(&x, &y)
-	if s := z.RatString(); s != "0" {
-		t.Errorf("got x+y = %s, want 0", s)
-	}
-
-	z.Sub(&x, &y)
-	if s := z.RatString(); s != "0" {
-		t.Errorf("got x-y = %s, want 0", s)
-	}
-
-	z.Mul(&x, &y)
-	if s := z.RatString(); s != "0" {
-		t.Errorf("got x*y = %s, want 0", s)
-	}
-
-	// check for division by zero
-	defer func() {
-		if s := recover(); s == nil || s.(string) != "division by zero" {
-			panic(s)
-		}
-	}()
-	z.Quo(&x, &y)
-}
-
-func TestRatSign(t *testing.T) {
-	zero := NewRat(0, 1)
-	for _, a := range setStringTests {
-		x, ok := new(Rat).SetString(a.in)
-		if !ok {
-			continue
-		}
-		s := x.Sign()
-		e := x.Cmp(zero)
-		if s != e {
-			t.Errorf("got %d; want %d for z = %v", s, e, &x)
-		}
-	}
-}
-
-var ratCmpTests = []struct {
-	rat1, rat2 string
-	out        int
-}{
-	{"0", "0/1", 0},
-	{"1/1", "1", 0},
-	{"-1", "-2/2", 0},
-	{"1", "0", 1},
-	{"0/1", "1/1", -1},
-	{"-5/1434770811533343057144", "-5/1434770811533343057145", -1},
-	{"49832350382626108453/8964749413", "49832350382626108454/8964749413", -1},
-	{"-37414950961700930/7204075375675961", "37414950961700930/7204075375675961", -1},
-	{"37414950961700930/7204075375675961", "74829901923401860/14408150751351922", 0},
-}
-
-func TestRatCmp(t *testing.T) {
-	for i, test := range ratCmpTests {
-		x, _ := new(Rat).SetString(test.rat1)
-		y, _ := new(Rat).SetString(test.rat2)
-
-		out := x.Cmp(y)
-		if out != test.out {
-			t.Errorf("#%d got out = %v; want %v", i, out, test.out)
-		}
-	}
-}
-
-func TestIsInt(t *testing.T) {
-	one := NewInt(1)
-	for _, a := range setStringTests {
-		x, ok := new(Rat).SetString(a.in)
-		if !ok {
-			continue
-		}
-		i := x.IsInt()
-		e := x.Denom().Cmp(one) == 0
-		if i != e {
-			t.Errorf("got IsInt(%v) == %v; want %v", x, i, e)
-		}
-	}
-}
-
-func TestRatAbs(t *testing.T) {
-	zero := new(Rat)
-	for _, a := range setStringTests {
-		x, ok := new(Rat).SetString(a.in)
-		if !ok {
-			continue
-		}
-		e := new(Rat).Set(x)
-		if e.Cmp(zero) < 0 {
-			e.Sub(zero, e)
-		}
-		z := new(Rat).Abs(x)
-		if z.Cmp(e) != 0 {
-			t.Errorf("got Abs(%v) = %v; want %v", x, z, e)
-		}
-	}
-}
-
-func TestRatNeg(t *testing.T) {
-	zero := new(Rat)
-	for _, a := range setStringTests {
-		x, ok := new(Rat).SetString(a.in)
-		if !ok {
-			continue
-		}
-		e := new(Rat).Sub(zero, x)
-		z := new(Rat).Neg(x)
-		if z.Cmp(e) != 0 {
-			t.Errorf("got Neg(%v) = %v; want %v", x, z, e)
-		}
-	}
-}
-
-func TestRatInv(t *testing.T) {
-	zero := new(Rat)
-	for _, a := range setStringTests {
-		x, ok := new(Rat).SetString(a.in)
-		if !ok {
-			continue
-		}
-		if x.Cmp(zero) == 0 {
-			continue // avoid division by zero
-		}
-		e := new(Rat).SetFrac(x.Denom(), x.Num())
-		z := new(Rat).Inv(x)
-		if z.Cmp(e) != 0 {
-			t.Errorf("got Inv(%v) = %v; want %v", x, z, e)
-		}
-	}
-}
-
-type ratBinFun func(z, x, y *Rat) *Rat
-type ratBinArg struct {
-	x, y, z string
-}
-
-func testRatBin(t *testing.T, i int, name string, f ratBinFun, a ratBinArg) {
-	x, _ := new(Rat).SetString(a.x)
-	y, _ := new(Rat).SetString(a.y)
-	z, _ := new(Rat).SetString(a.z)
-	out := f(new(Rat), x, y)
-
-	if out.Cmp(z) != 0 {
-		t.Errorf("%s #%d got %s want %s", name, i, out, z)
-	}
-}
-
-var ratBinTests = []struct {
-	x, y      string
-	sum, prod string
-}{
-	{"0", "0", "0", "0"},
-	{"0", "1", "1", "0"},
-	{"-1", "0", "-1", "0"},
-	{"-1", "1", "0", "-1"},
-	{"1", "1", "2", "1"},
-	{"1/2", "1/2", "1", "1/4"},
-	{"1/4", "1/3", "7/12", "1/12"},
-	{"2/5", "-14/3", "-64/15", "-28/15"},
-	{"4707/49292519774798173060", "-3367/70976135186689855734", "84058377121001851123459/1749296273614329067191168098769082663020", "-1760941/388732505247628681598037355282018369560"},
-	{"-61204110018146728334/3", "-31052192278051565633/2", "-215564796870448153567/6", "950260896245257153059642991192710872711/3"},
-	{"-854857841473707320655/4237645934602118692642972629634714039", "-18/31750379913563777419", "-27/133467566250814981", "15387441146526731771790/134546868362786310073779084329032722548987800600710485341"},
-	{"618575745270541348005638912139/19198433543745179392300736", "-19948846211000086/637313996471", "27674141753240653/30123979153216", "-6169936206128396568797607742807090270137721977/6117715203873571641674006593837351328"},
-	{"-3/26206484091896184128", "5/2848423294177090248", "15310893822118706237/9330894968229805033368778458685147968", "-5/24882386581946146755650075889827061248"},
-	{"26946729/330400702820", "41563965/225583428284", "1238218672302860271/4658307703098666660055", "224002580204097/14906584649915733312176"},
-	{"-8259900599013409474/7", "-84829337473700364773/56707961321161574960", "-468402123685491748914621885145127724451/396955729248131024720", "350340947706464153265156004876107029701/198477864624065512360"},
-	{"575775209696864/1320203974639986246357", "29/712593081308", "410331716733912717985762465/940768218243776489278275419794956", "808/45524274987585732633"},
-	{"1786597389946320496771/2066653520653241", "6269770/1992362624741777", "3559549865190272133656109052308126637/4117523232840525481453983149257", "8967230/3296219033"},
-	{"-36459180403360509753/32150500941194292113930", "9381566963714/9633539", "301622077145533298008420642898530153/309723104686531919656937098270", "-3784609207827/3426986245"},
-}
-
-func TestRatBin(t *testing.T) {
-	for i, test := range ratBinTests {
-		arg := ratBinArg{test.x, test.y, test.sum}
-		testRatBin(t, i, "Add", (*Rat).Add, arg)
-
-		arg = ratBinArg{test.y, test.x, test.sum}
-		testRatBin(t, i, "Add symmetric", (*Rat).Add, arg)
-
-		arg = ratBinArg{test.sum, test.x, test.y}
-		testRatBin(t, i, "Sub", (*Rat).Sub, arg)
-
-		arg = ratBinArg{test.sum, test.y, test.x}
-		testRatBin(t, i, "Sub symmetric", (*Rat).Sub, arg)
-
-		arg = ratBinArg{test.x, test.y, test.prod}
-		testRatBin(t, i, "Mul", (*Rat).Mul, arg)
-
-		arg = ratBinArg{test.y, test.x, test.prod}
-		testRatBin(t, i, "Mul symmetric", (*Rat).Mul, arg)
-
-		if test.x != "0" {
-			arg = ratBinArg{test.prod, test.x, test.y}
-			testRatBin(t, i, "Quo", (*Rat).Quo, arg)
-		}
-
-		if test.y != "0" {
-			arg = ratBinArg{test.prod, test.y, test.x}
-			testRatBin(t, i, "Quo symmetric", (*Rat).Quo, arg)
-		}
-	}
-}
-
-func TestIssue820(t *testing.T) {
-	x := NewRat(3, 1)
-	y := NewRat(2, 1)
-	z := y.Quo(x, y)
-	q := NewRat(3, 2)
-	if z.Cmp(q) != 0 {
-		t.Errorf("got %s want %s", z, q)
-	}
-
-	y = NewRat(3, 1)
-	x = NewRat(2, 1)
-	z = y.Quo(x, y)
-	q = NewRat(2, 3)
-	if z.Cmp(q) != 0 {
-		t.Errorf("got %s want %s", z, q)
-	}
-
-	x = NewRat(3, 1)
-	z = x.Quo(x, x)
-	q = NewRat(3, 3)
-	if z.Cmp(q) != 0 {
-		t.Errorf("got %s want %s", z, q)
-	}
-}
-
-var setFrac64Tests = []struct {
-	a, b int64
-	out  string
-}{
-	{0, 1, "0"},
-	{0, -1, "0"},
-	{1, 1, "1"},
-	{-1, 1, "-1"},
-	{1, -1, "-1"},
-	{-1, -1, "1"},
-	{-9223372036854775808, -9223372036854775808, "1"},
-}
-
-func TestRatSetFrac64Rat(t *testing.T) {
-	for i, test := range setFrac64Tests {
-		x := new(Rat).SetFrac64(test.a, test.b)
-		if x.RatString() != test.out {
-			t.Errorf("#%d got %s want %s", i, x.RatString(), test.out)
-		}
-	}
-}
-
-func TestRatGobEncoding(t *testing.T) {
-	var medium bytes.Buffer
-	enc := gob.NewEncoder(&medium)
-	dec := gob.NewDecoder(&medium)
-	for _, test := range encodingTests {
-		medium.Reset() // empty buffer for each test case (in case of failures)
-		var tx Rat
-		tx.SetString(test + ".14159265")
-		if err := enc.Encode(&tx); err != nil {
-			t.Errorf("encoding of %s failed: %s", &tx, err)
-		}
-		var rx Rat
-		if err := dec.Decode(&rx); err != nil {
-			t.Errorf("decoding of %s failed: %s", &tx, err)
-		}
-		if rx.Cmp(&tx) != 0 {
-			t.Errorf("transmission of %s failed: got %s want %s", &tx, &rx, &tx)
-		}
-	}
-}
-
-// Sending a nil Rat pointer (inside a slice) on a round trip through gob should yield a zero.
-// TODO: top-level nils.
-func TestGobEncodingNilRatInSlice(t *testing.T) {
-	buf := new(bytes.Buffer)
-	enc := gob.NewEncoder(buf)
-	dec := gob.NewDecoder(buf)
-
-	var in = make([]*Rat, 1)
-	err := enc.Encode(&in)
-	if err != nil {
-		t.Errorf("gob encode failed: %q", err)
-	}
-	var out []*Rat
-	err = dec.Decode(&out)
-	if err != nil {
-		t.Fatalf("gob decode failed: %q", err)
-	}
-	if len(out) != 1 {
-		t.Fatalf("wrong len; want 1 got %d", len(out))
-	}
-	var zero Rat
-	if out[0].Cmp(&zero) != 0 {
-		t.Errorf("transmission of (*Int)(nill) failed: got %s want 0", out)
-	}
-}
-
-var ratNums = []string{
-	"-141592653589793238462643383279502884197169399375105820974944592307816406286",
-	"-1415926535897932384626433832795028841971",
-	"-141592653589793",
-	"-1",
-	"0",
-	"1",
-	"141592653589793",
-	"1415926535897932384626433832795028841971",
-	"141592653589793238462643383279502884197169399375105820974944592307816406286",
-}
-
-var ratDenoms = []string{
-	"1",
-	"718281828459045",
-	"7182818284590452353602874713526624977572",
-	"718281828459045235360287471352662497757247093699959574966967627724076630353",
-}
-
-func TestRatJSONEncoding(t *testing.T) {
-	for _, num := range ratNums {
-		for _, denom := range ratDenoms {
-			var tx Rat
-			tx.SetString(num + "/" + denom)
-			b, err := json.Marshal(&tx)
-			if err != nil {
-				t.Errorf("marshaling of %s failed: %s", &tx, err)
-				continue
-			}
-			var rx Rat
-			if err := json.Unmarshal(b, &rx); err != nil {
-				t.Errorf("unmarshaling of %s failed: %s", &tx, err)
-				continue
-			}
-			if rx.Cmp(&tx) != 0 {
-				t.Errorf("JSON encoding of %s failed: got %s want %s", &tx, &rx, &tx)
-			}
-		}
-	}
-}
-
-func TestRatXMLEncoding(t *testing.T) {
-	for _, num := range ratNums {
-		for _, denom := range ratDenoms {
-			var tx Rat
-			tx.SetString(num + "/" + denom)
-			b, err := xml.Marshal(&tx)
-			if err != nil {
-				t.Errorf("marshaling of %s failed: %s", &tx, err)
-				continue
-			}
-			var rx Rat
-			if err := xml.Unmarshal(b, &rx); err != nil {
-				t.Errorf("unmarshaling of %s failed: %s", &tx, err)
-				continue
-			}
-			if rx.Cmp(&tx) != 0 {
-				t.Errorf("XML encoding of %s failed: got %s want %s", &tx, &rx, &tx)
-			}
-		}
-	}
-}
-
-func TestIssue2379(t *testing.T) {
-	// 1) no aliasing
-	q := NewRat(3, 2)
-	x := new(Rat)
-	x.SetFrac(NewInt(3), NewInt(2))
-	if x.Cmp(q) != 0 {
-		t.Errorf("1) got %s want %s", x, q)
-	}
-
-	// 2) aliasing of numerator
-	x = NewRat(2, 3)
-	x.SetFrac(NewInt(3), x.Num())
-	if x.Cmp(q) != 0 {
-		t.Errorf("2) got %s want %s", x, q)
-	}
-
-	// 3) aliasing of denominator
-	x = NewRat(2, 3)
-	x.SetFrac(x.Denom(), NewInt(2))
-	if x.Cmp(q) != 0 {
-		t.Errorf("3) got %s want %s", x, q)
-	}
-
-	// 4) aliasing of numerator and denominator
-	x = NewRat(2, 3)
-	x.SetFrac(x.Denom(), x.Num())
-	if x.Cmp(q) != 0 {
-		t.Errorf("4) got %s want %s", x, q)
-	}
-
-	// 5) numerator and denominator are the same
-	q = NewRat(1, 1)
-	x = new(Rat)
-	n := NewInt(7)
-	x.SetFrac(n, n)
-	if x.Cmp(q) != 0 {
-		t.Errorf("5) got %s want %s", x, q)
-	}
-}
-
-func TestIssue3521(t *testing.T) {
-	a := new(Int)
-	b := new(Int)
-	a.SetString("64375784358435883458348587", 0)
-	b.SetString("4789759874531", 0)
-
-	// 0) a raw zero value has 1 as denominator
-	zero := new(Rat)
-	one := NewInt(1)
-	if zero.Denom().Cmp(one) != 0 {
-		t.Errorf("0) got %s want %s", zero.Denom(), one)
-	}
-
-	// 1a) a zero value remains zero independent of denominator
-	x := new(Rat)
-	x.Denom().Set(new(Int).Neg(b))
-	if x.Cmp(zero) != 0 {
-		t.Errorf("1a) got %s want %s", x, zero)
-	}
-
-	// 1b) a zero value may have a denominator != 0 and != 1
-	x.Num().Set(a)
-	qab := new(Rat).SetFrac(a, b)
-	if x.Cmp(qab) != 0 {
-		t.Errorf("1b) got %s want %s", x, qab)
-	}
-
-	// 2a) an integral value becomes a fraction depending on denominator
-	x.SetFrac64(10, 2)
-	x.Denom().SetInt64(3)
-	q53 := NewRat(5, 3)
-	if x.Cmp(q53) != 0 {
-		t.Errorf("2a) got %s want %s", x, q53)
-	}
-
-	// 2b) an integral value becomes a fraction depending on denominator
-	x = NewRat(10, 2)
-	x.Denom().SetInt64(3)
-	if x.Cmp(q53) != 0 {
-		t.Errorf("2b) got %s want %s", x, q53)
-	}
-
-	// 3) changing the numerator/denominator of a Rat changes the Rat
-	x.SetFrac(a, b)
-	a = x.Num()
-	b = x.Denom()
-	a.SetInt64(5)
-	b.SetInt64(3)
-	if x.Cmp(q53) != 0 {
-		t.Errorf("3) got %s want %s", x, q53)
-	}
-}
-
-func TestFloat32Distribution(t *testing.T) {
-	// Generate a distribution of (sign, mantissa, exp) values
-	// broader than the float32 range, and check Rat.Float32()
-	// always picks the closest float32 approximation.
-	var add = []int64{
-		0,
-		1,
-		3,
-		5,
-		7,
-		9,
-		11,
-	}
-	var winc, einc = uint64(1), 1 // soak test (~1.5s on x86-64)
-	if testing.Short() {
-		winc, einc = 5, 15 // quick test (~60ms on x86-64)
-	}
-
-	for _, sign := range "+-" {
-		for _, a := range add {
-			for wid := uint64(0); wid < 30; wid += winc {
-				b := 1<<wid + a
-				if sign == '-' {
-					b = -b
-				}
-				for exp := -150; exp < 150; exp += einc {
-					num, den := NewInt(b), NewInt(1)
-					if exp > 0 {
-						num.Lsh(num, uint(exp))
-					} else {
-						den.Lsh(den, uint(-exp))
-					}
-					r := new(Rat).SetFrac(num, den)
-					f, _ := r.Float32()
-
-					if !checkIsBestApprox32(t, f, r) {
-						// Append context information.
-						t.Errorf("(input was mantissa %#x, exp %d; f = %g (%b); f ~ %g; r = %v)",
-							b, exp, f, f, math.Ldexp(float64(b), exp), r)
-					}
-
-					checkNonLossyRoundtrip32(t, f)
-				}
-			}
-		}
-	}
-}
-
-func TestFloat64Distribution(t *testing.T) {
-	// Generate a distribution of (sign, mantissa, exp) values
-	// broader than the float64 range, and check Rat.Float64()
-	// always picks the closest float64 approximation.
-	var add = []int64{
-		0,
-		1,
-		3,
-		5,
-		7,
-		9,
-		11,
-	}
-	var winc, einc = uint64(1), 1 // soak test (~75s on x86-64)
-	if testing.Short() {
-		winc, einc = 10, 500 // quick test (~12ms on x86-64)
-	}
-
-	for _, sign := range "+-" {
-		for _, a := range add {
-			for wid := uint64(0); wid < 60; wid += winc {
-				b := 1<<wid + a
-				if sign == '-' {
-					b = -b
-				}
-				for exp := -1100; exp < 1100; exp += einc {
-					num, den := NewInt(b), NewInt(1)
-					if exp > 0 {
-						num.Lsh(num, uint(exp))
-					} else {
-						den.Lsh(den, uint(-exp))
-					}
-					r := new(Rat).SetFrac(num, den)
-					f, _ := r.Float64()
-
-					if !checkIsBestApprox64(t, f, r) {
-						// Append context information.
-						t.Errorf("(input was mantissa %#x, exp %d; f = %g (%b); f ~ %g; r = %v)",
-							b, exp, f, f, math.Ldexp(float64(b), exp), r)
-					}
-
-					checkNonLossyRoundtrip64(t, f)
-				}
-			}
-		}
-	}
-}
-
-// TestSetFloat64NonFinite checks that SetFloat64 of a non-finite value
-// returns nil.
-func TestSetFloat64NonFinite(t *testing.T) {
-	for _, f := range []float64{math.NaN(), math.Inf(+1), math.Inf(-1)} {
-		var r Rat
-		if r2 := r.SetFloat64(f); r2 != nil {
-			t.Errorf("SetFloat64(%g) was %v, want nil", f, r2)
-		}
-	}
-}
-
-// checkNonLossyRoundtrip32 checks that a float->Rat->float roundtrip is
-// non-lossy for finite f.
-func checkNonLossyRoundtrip32(t *testing.T, f float32) {
-	if !isFinite(float64(f)) {
-		return
-	}
-	r := new(Rat).SetFloat64(float64(f))
-	if r == nil {
-		t.Errorf("Rat.SetFloat64(float64(%g) (%b)) == nil", f, f)
-		return
-	}
-	f2, exact := r.Float32()
-	if f != f2 || !exact {
-		t.Errorf("Rat.SetFloat64(float64(%g)).Float32() = %g (%b), %v, want %g (%b), %v; delta = %b",
-			f, f2, f2, exact, f, f, true, f2-f)
-	}
-}
-
-// checkNonLossyRoundtrip64 checks that a float->Rat->float roundtrip is
-// non-lossy for finite f.
-func checkNonLossyRoundtrip64(t *testing.T, f float64) {
-	if !isFinite(f) {
-		return
-	}
-	r := new(Rat).SetFloat64(f)
-	if r == nil {
-		t.Errorf("Rat.SetFloat64(%g (%b)) == nil", f, f)
-		return
-	}
-	f2, exact := r.Float64()
-	if f != f2 || !exact {
-		t.Errorf("Rat.SetFloat64(%g).Float64() = %g (%b), %v, want %g (%b), %v; delta = %b",
-			f, f2, f2, exact, f, f, true, f2-f)
-	}
-}
-
-// delta returns the absolute difference between r and f.
-func delta(r *Rat, f float64) *Rat {
-	d := new(Rat).Sub(r, new(Rat).SetFloat64(f))
-	return d.Abs(d)
-}
-
-// checkIsBestApprox32 checks that f is the best possible float32
-// approximation of r.
-// Returns true on success.
-func checkIsBestApprox32(t *testing.T, f float32, r *Rat) bool {
-	if math.Abs(float64(f)) >= math.MaxFloat32 {
-		// Cannot check +Inf, -Inf, nor the float next to them (MaxFloat32).
-		// But we have tests for these special cases.
-		return true
-	}
-
-	// r must be strictly between f0 and f1, the floats bracketing f.
-	f0 := math.Nextafter32(f, float32(math.Inf(-1)))
-	f1 := math.Nextafter32(f, float32(math.Inf(+1)))
-
-	// For f to be correct, r must be closer to f than to f0 or f1.
-	df := delta(r, float64(f))
-	df0 := delta(r, float64(f0))
-	df1 := delta(r, float64(f1))
-	if df.Cmp(df0) > 0 {
-		t.Errorf("Rat(%v).Float32() = %g (%b), but previous float32 %g (%b) is closer", r, f, f, f0, f0)
-		return false
-	}
-	if df.Cmp(df1) > 0 {
-		t.Errorf("Rat(%v).Float32() = %g (%b), but next float32 %g (%b) is closer", r, f, f, f1, f1)
-		return false
-	}
-	if df.Cmp(df0) == 0 && !isEven32(f) {
-		t.Errorf("Rat(%v).Float32() = %g (%b); halfway should have rounded to %g (%b) instead", r, f, f, f0, f0)
-		return false
-	}
-	if df.Cmp(df1) == 0 && !isEven32(f) {
-		t.Errorf("Rat(%v).Float32() = %g (%b); halfway should have rounded to %g (%b) instead", r, f, f, f1, f1)
-		return false
-	}
-	return true
-}
-
-// checkIsBestApprox64 checks that f is the best possible float64
-// approximation of r.
-// Returns true on success.
-func checkIsBestApprox64(t *testing.T, f float64, r *Rat) bool {
-	if math.Abs(f) >= math.MaxFloat64 {
-		// Cannot check +Inf, -Inf, nor the float next to them (MaxFloat64).
-		// But we have tests for these special cases.
-		return true
-	}
-
-	// r must be strictly between f0 and f1, the floats bracketing f.
-	f0 := math.Nextafter(f, math.Inf(-1))
-	f1 := math.Nextafter(f, math.Inf(+1))
-
-	// For f to be correct, r must be closer to f than to f0 or f1.
-	df := delta(r, f)
-	df0 := delta(r, f0)
-	df1 := delta(r, f1)
-	if df.Cmp(df0) > 0 {
-		t.Errorf("Rat(%v).Float64() = %g (%b), but previous float64 %g (%b) is closer", r, f, f, f0, f0)
-		return false
-	}
-	if df.Cmp(df1) > 0 {
-		t.Errorf("Rat(%v).Float64() = %g (%b), but next float64 %g (%b) is closer", r, f, f, f1, f1)
-		return false
-	}
-	if df.Cmp(df0) == 0 && !isEven64(f) {
-		t.Errorf("Rat(%v).Float64() = %g (%b); halfway should have rounded to %g (%b) instead", r, f, f, f0, f0)
-		return false
-	}
-	if df.Cmp(df1) == 0 && !isEven64(f) {
-		t.Errorf("Rat(%v).Float64() = %g (%b); halfway should have rounded to %g (%b) instead", r, f, f, f1, f1)
-		return false
-	}
-	return true
-}
-
-func isEven32(f float32) bool { return math.Float32bits(f)&1 == 0 }
-func isEven64(f float64) bool { return math.Float64bits(f)&1 == 0 }
-
-func TestIsFinite(t *testing.T) {
-	finites := []float64{
-		1.0 / 3,
-		4891559871276714924261e+222,
-		math.MaxFloat64,
-		math.SmallestNonzeroFloat64,
-		-math.MaxFloat64,
-		-math.SmallestNonzeroFloat64,
-	}
-	for _, f := range finites {
-		if !isFinite(f) {
-			t.Errorf("!IsFinite(%g (%b))", f, f)
-		}
-	}
-	nonfinites := []float64{
-		math.NaN(),
-		math.Inf(-1),
-		math.Inf(+1),
-	}
-	for _, f := range nonfinites {
-		if isFinite(f) {
-			t.Errorf("IsFinite(%g, (%b))", f, f)
-		}
-	}
-}
diff --git a/src/cmd/compile/internal/big/ratconv.go b/src/cmd/compile/internal/big/ratconv.go
deleted file mode 100644
index 778077b..0000000
--- a/src/cmd/compile/internal/big/ratconv.go
+++ /dev/null
@@ -1,251 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements rat-to-string conversion functions.
-
-package big
-
-import (
-	"errors"
-	"fmt"
-	"io"
-	"strconv"
-	"strings"
-)
-
-func ratTok(ch rune) bool {
-	return strings.IndexRune("+-/0123456789.eE", ch) >= 0
-}
-
-// Scan is a support routine for fmt.Scanner. It accepts the formats
-// 'e', 'E', 'f', 'F', 'g', 'G', and 'v'. All formats are equivalent.
-func (z *Rat) Scan(s fmt.ScanState, ch rune) error {
-	tok, err := s.Token(true, ratTok)
-	if err != nil {
-		return err
-	}
-	if strings.IndexRune("efgEFGv", ch) < 0 {
-		return errors.New("Rat.Scan: invalid verb")
-	}
-	if _, ok := z.SetString(string(tok)); !ok {
-		return errors.New("Rat.Scan: invalid syntax")
-	}
-	return nil
-}
-
-// SetString sets z to the value of s and returns z and a boolean indicating
-// success. s can be given as a fraction "a/b" or as a floating-point number
-// optionally followed by an exponent. If the operation failed, the value of
-// z is undefined but the returned value is nil.
-func (z *Rat) SetString(s string) (*Rat, bool) {
-	if len(s) == 0 {
-		return nil, false
-	}
-	// len(s) > 0
-
-	// parse fraction a/b, if any
-	if sep := strings.Index(s, "/"); sep >= 0 {
-		if _, ok := z.a.SetString(s[:sep], 0); !ok {
-			return nil, false
-		}
-		s = s[sep+1:]
-		var err error
-		if z.b.abs, _, _, err = z.b.abs.scan(strings.NewReader(s), 0, false); err != nil {
-			return nil, false
-		}
-		if len(z.b.abs) == 0 {
-			return nil, false
-		}
-		return z.norm(), true
-	}
-
-	// parse floating-point number
-	r := strings.NewReader(s)
-
-	// sign
-	neg, err := scanSign(r)
-	if err != nil {
-		return nil, false
-	}
-
-	// mantissa
-	var ecorr int
-	z.a.abs, _, ecorr, err = z.a.abs.scan(r, 10, true)
-	if err != nil {
-		return nil, false
-	}
-
-	// exponent
-	var exp int64
-	exp, _, err = scanExponent(r, false)
-	if err != nil {
-		return nil, false
-	}
-
-	// there should be no unread characters left
-	if _, err = r.ReadByte(); err != io.EOF {
-		return nil, false
-	}
-
-	// correct exponent
-	if ecorr < 0 {
-		exp += int64(ecorr)
-	}
-
-	// compute exponent power
-	expabs := exp
-	if expabs < 0 {
-		expabs = -expabs
-	}
-	powTen := nat(nil).expNN(natTen, nat(nil).setWord(Word(expabs)), nil)
-
-	// complete fraction
-	if exp < 0 {
-		z.b.abs = powTen
-		z.norm()
-	} else {
-		z.a.abs = z.a.abs.mul(z.a.abs, powTen)
-		z.b.abs = z.b.abs[:0]
-	}
-
-	z.a.neg = neg && len(z.a.abs) > 0 // 0 has no sign
-
-	return z, true
-}
-
-// scanExponent scans the longest possible prefix of r representing a decimal
-// ('e', 'E') or binary ('p') exponent, if any. It returns the exponent, the
-// exponent base (10 or 2), or a read or syntax error, if any.
-//
-//	exponent = ( "E" | "e" | "p" ) [ sign ] digits .
-//	sign     = "+" | "-" .
-//	digits   = digit { digit } .
-//	digit    = "0" ... "9" .
-//
-// A binary exponent is only permitted if binExpOk is set.
-func scanExponent(r io.ByteScanner, binExpOk bool) (exp int64, base int, err error) {
-	base = 10
-
-	var ch byte
-	if ch, err = r.ReadByte(); err != nil {
-		if err == io.EOF {
-			err = nil // no exponent; same as e0
-		}
-		return
-	}
-
-	switch ch {
-	case 'e', 'E':
-		// ok
-	case 'p':
-		if binExpOk {
-			base = 2
-			break // ok
-		}
-		fallthrough // binary exponent not permitted
-	default:
-		r.UnreadByte()
-		return // no exponent; same as e0
-	}
-
-	var neg bool
-	if neg, err = scanSign(r); err != nil {
-		return
-	}
-
-	var digits []byte
-	if neg {
-		digits = append(digits, '-')
-	}
-
-	// no need to use nat.scan for exponent digits
-	// since we only care about int64 values - the
-	// from-scratch scan is easy enough and faster
-	for i := 0; ; i++ {
-		if ch, err = r.ReadByte(); err != nil {
-			if err != io.EOF || i == 0 {
-				return
-			}
-			err = nil
-			break // i > 0
-		}
-		if ch < '0' || '9' < ch {
-			if i == 0 {
-				r.UnreadByte()
-				err = fmt.Errorf("invalid exponent (missing digits)")
-				return
-			}
-			break // i > 0
-		}
-		digits = append(digits, byte(ch))
-	}
-	// i > 0 => we have at least one digit
-
-	exp, err = strconv.ParseInt(string(digits), 10, 64)
-	return
-}
-
-// String returns a string representation of x in the form "a/b" (even if b == 1).
-func (x *Rat) String() string {
-	s := "/1"
-	if len(x.b.abs) != 0 {
-		s = "/" + x.b.abs.decimalString()
-	}
-	return x.a.String() + s
-}
-
-// RatString returns a string representation of x in the form "a/b" if b != 1,
-// and in the form "a" if b == 1.
-func (x *Rat) RatString() string {
-	if x.IsInt() {
-		return x.a.String()
-	}
-	return x.String()
-}
-
-// FloatString returns a string representation of x in decimal form with prec
-// digits of precision after the decimal point and the last digit rounded.
-func (x *Rat) FloatString(prec int) string {
-	if x.IsInt() {
-		s := x.a.String()
-		if prec > 0 {
-			s += "." + strings.Repeat("0", prec)
-		}
-		return s
-	}
-	// x.b.abs != 0
-
-	q, r := nat(nil).div(nat(nil), x.a.abs, x.b.abs)
-
-	p := natOne
-	if prec > 0 {
-		p = nat(nil).expNN(natTen, nat(nil).setUint64(uint64(prec)), nil)
-	}
-
-	r = r.mul(r, p)
-	r, r2 := r.div(nat(nil), r, x.b.abs)
-
-	// see if we need to round up
-	r2 = r2.add(r2, r2)
-	if x.b.abs.cmp(r2) <= 0 {
-		r = r.add(r, natOne)
-		if r.cmp(p) >= 0 {
-			q = nat(nil).add(q, natOne)
-			r = nat(nil).sub(r, p)
-		}
-	}
-
-	s := q.decimalString()
-	if x.a.neg {
-		s = "-" + s
-	}
-
-	if prec > 0 {
-		rs := r.decimalString()
-		leadingZeros := prec - len(rs)
-		s += "." + strings.Repeat("0", leadingZeros) + rs
-	}
-
-	return s
-}
diff --git a/src/cmd/compile/internal/big/ratconv_test.go b/src/cmd/compile/internal/big/ratconv_test.go
deleted file mode 100644
index 16b3a19..0000000
--- a/src/cmd/compile/internal/big/ratconv_test.go
+++ /dev/null
@@ -1,451 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package big
-
-import (
-	"bytes"
-	"fmt"
-	"math"
-	"strconv"
-	"strings"
-	"testing"
-)
-
-type StringTest struct {
-	in, out string
-	ok      bool
-}
-
-var setStringTests = []StringTest{
-	{"0", "0", true},
-	{"-0", "0", true},
-	{"1", "1", true},
-	{"-1", "-1", true},
-	{"1.", "1", true},
-	{"1e0", "1", true},
-	{"1.e1", "10", true},
-	{in: "1e"},
-	{in: "1.e"},
-	{in: "1e+14e-5"},
-	{in: "1e4.5"},
-	{in: "r"},
-	{in: "a/b"},
-	{in: "a.b"},
-	{"-0.1", "-1/10", true},
-	{"-.1", "-1/10", true},
-	{"2/4", "1/2", true},
-	{".25", "1/4", true},
-	{"-1/5", "-1/5", true},
-	{"8129567.7690E14", "812956776900000000000", true},
-	{"78189e+4", "781890000", true},
-	{"553019.8935e+8", "55301989350000", true},
-	{"98765432109876543210987654321e-10", "98765432109876543210987654321/10000000000", true},
-	{"9877861857500000E-7", "3951144743/4", true},
-	{"2169378.417e-3", "2169378417/1000000", true},
-	{"884243222337379604041632732738665534", "884243222337379604041632732738665534", true},
-	{"53/70893980658822810696", "53/70893980658822810696", true},
-	{"106/141787961317645621392", "53/70893980658822810696", true},
-	{"204211327800791583.81095", "4084226556015831676219/20000", true},
-	{in: "1/0"},
-}
-
-// These are not supported by fmt.Fscanf.
-var setStringTests2 = []StringTest{
-	{"0x10", "16", true},
-	{"-010/1", "-8", true}, // TODO(gri) should we even permit octal here?
-	{"-010.", "-10", true},
-	{"0x10/0x20", "1/2", true},
-	{"0b1000/3", "8/3", true},
-	// TODO(gri) add more tests
-}
-
-func TestRatSetString(t *testing.T) {
-	var tests []StringTest
-	tests = append(tests, setStringTests...)
-	tests = append(tests, setStringTests2...)
-
-	for i, test := range tests {
-		x, ok := new(Rat).SetString(test.in)
-
-		if ok {
-			if !test.ok {
-				t.Errorf("#%d SetString(%q) expected failure", i, test.in)
-			} else if x.RatString() != test.out {
-				t.Errorf("#%d SetString(%q) got %s want %s", i, test.in, x.RatString(), test.out)
-			}
-		} else if x != nil {
-			t.Errorf("#%d SetString(%q) got %p want nil", i, test.in, x)
-		}
-	}
-}
-
-func TestRatScan(t *testing.T) {
-	var buf bytes.Buffer
-	for i, test := range setStringTests {
-		x := new(Rat)
-		buf.Reset()
-		buf.WriteString(test.in)
-
-		_, err := fmt.Fscanf(&buf, "%v", x)
-		if err == nil != test.ok {
-			if test.ok {
-				t.Errorf("#%d (%s) error: %s", i, test.in, err)
-			} else {
-				t.Errorf("#%d (%s) expected error", i, test.in)
-			}
-			continue
-		}
-		if err == nil && x.RatString() != test.out {
-			t.Errorf("#%d got %s want %s", i, x.RatString(), test.out)
-		}
-	}
-}
-
-var floatStringTests = []struct {
-	in   string
-	prec int
-	out  string
-}{
-	{"0", 0, "0"},
-	{"0", 4, "0.0000"},
-	{"1", 0, "1"},
-	{"1", 2, "1.00"},
-	{"-1", 0, "-1"},
-	{".25", 2, "0.25"},
-	{".25", 1, "0.3"},
-	{".25", 3, "0.250"},
-	{"-1/3", 3, "-0.333"},
-	{"-2/3", 4, "-0.6667"},
-	{"0.96", 1, "1.0"},
-	{"0.999", 2, "1.00"},
-	{"0.9", 0, "1"},
-	{".25", -1, "0"},
-	{".55", -1, "1"},
-}
-
-func TestFloatString(t *testing.T) {
-	for i, test := range floatStringTests {
-		x, _ := new(Rat).SetString(test.in)
-
-		if x.FloatString(test.prec) != test.out {
-			t.Errorf("#%d got %s want %s", i, x.FloatString(test.prec), test.out)
-		}
-	}
-}
-
-// Test inputs to Rat.SetString.  The prefix "long:" causes the test
-// to be skipped in --test.short mode.  (The threshold is about 500us.)
-var float64inputs = []string{
-	// Constants plundered from strconv/testfp.txt.
-
-	// Table 1: Stress Inputs for Conversion to 53-bit Binary, < 1/2 ULP
-	"5e+125",
-	"69e+267",
-	"999e-026",
-	"7861e-034",
-	"75569e-254",
-	"928609e-261",
-	"9210917e+080",
-	"84863171e+114",
-	"653777767e+273",
-	"5232604057e-298",
-	"27235667517e-109",
-	"653532977297e-123",
-	"3142213164987e-294",
-	"46202199371337e-072",
-	"231010996856685e-073",
-	"9324754620109615e+212",
-	"78459735791271921e+049",
-	"272104041512242479e+200",
-	"6802601037806061975e+198",
-	"20505426358836677347e-221",
-	"836168422905420598437e-234",
-	"4891559871276714924261e+222",
-
-	// Table 2: Stress Inputs for Conversion to 53-bit Binary, > 1/2 ULP
-	"9e-265",
-	"85e-037",
-	"623e+100",
-	"3571e+263",
-	"81661e+153",
-	"920657e-023",
-	"4603285e-024",
-	"87575437e-309",
-	"245540327e+122",
-	"6138508175e+120",
-	"83356057653e+193",
-	"619534293513e+124",
-	"2335141086879e+218",
-	"36167929443327e-159",
-	"609610927149051e-255",
-	"3743626360493413e-165",
-	"94080055902682397e-242",
-	"899810892172646163e+283",
-	"7120190517612959703e+120",
-	"25188282901709339043e-252",
-	"308984926168550152811e-052",
-	"6372891218502368041059e+064",
-
-	// Table 14: Stress Inputs for Conversion to 24-bit Binary, <1/2 ULP
-	"5e-20",
-	"67e+14",
-	"985e+15",
-	"7693e-42",
-	"55895e-16",
-	"996622e-44",
-	"7038531e-32",
-	"60419369e-46",
-	"702990899e-20",
-	"6930161142e-48",
-	"25933168707e+13",
-	"596428896559e+20",
-
-	// Table 15: Stress Inputs for Conversion to 24-bit Binary, >1/2 ULP
-	"3e-23",
-	"57e+18",
-	"789e-35",
-	"2539e-18",
-	"76173e+28",
-	"887745e-11",
-	"5382571e-37",
-	"82381273e-35",
-	"750486563e-38",
-	"3752432815e-39",
-	"75224575729e-45",
-	"459926601011e+15",
-
-	// Constants plundered from strconv/atof_test.go.
-
-	"0",
-	"1",
-	"+1",
-	"1e23",
-	"1E23",
-	"100000000000000000000000",
-	"1e-100",
-	"123456700",
-	"99999999999999974834176",
-	"100000000000000000000001",
-	"100000000000000008388608",
-	"100000000000000016777215",
-	"100000000000000016777216",
-	"-1",
-	"-0.1",
-	"-0", // NB: exception made for this input
-	"1e-20",
-	"625e-3",
-
-	// largest float64
-	"1.7976931348623157e308",
-	"-1.7976931348623157e308",
-	// next float64 - too large
-	"1.7976931348623159e308",
-	"-1.7976931348623159e308",
-	// the border is ...158079
-	// borderline - okay
-	"1.7976931348623158e308",
-	"-1.7976931348623158e308",
-	// borderline - too large
-	"1.797693134862315808e308",
-	"-1.797693134862315808e308",
-
-	// a little too large
-	"1e308",
-	"2e308",
-	"1e309",
-
-	// way too large
-	"1e310",
-	"-1e310",
-	"1e400",
-	"-1e400",
-	"long:1e400000",
-	"long:-1e400000",
-
-	// denormalized
-	"1e-305",
-	"1e-306",
-	"1e-307",
-	"1e-308",
-	"1e-309",
-	"1e-310",
-	"1e-322",
-	// smallest denormal
-	"5e-324",
-	"4e-324",
-	"3e-324",
-	// too small
-	"2e-324",
-	// way too small
-	"1e-350",
-	"long:1e-400000",
-	// way too small, negative
-	"-1e-350",
-	"long:-1e-400000",
-
-	// try to overflow exponent
-	// [Disabled: too slow and memory-hungry with rationals.]
-	// "1e-4294967296",
-	// "1e+4294967296",
-	// "1e-18446744073709551616",
-	// "1e+18446744073709551616",
-
-	// http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
-	"2.2250738585072012e-308",
-	// http://www.exploringbinary.com/php-hangs-on-numeric-value-2-2250738585072011e-308/
-	"2.2250738585072011e-308",
-
-	// A very large number (initially wrongly parsed by the fast algorithm).
-	"4.630813248087435e+307",
-
-	// A different kind of very large number.
-	"22.222222222222222",
-	"long:2." + strings.Repeat("2", 4000) + "e+1",
-
-	// Exactly halfway between 1 and math.Nextafter(1, 2).
-	// Round to even (down).
-	"1.00000000000000011102230246251565404236316680908203125",
-	// Slightly lower; still round down.
-	"1.00000000000000011102230246251565404236316680908203124",
-	// Slightly higher; round up.
-	"1.00000000000000011102230246251565404236316680908203126",
-	// Slightly higher, but you have to read all the way to the end.
-	"long:1.00000000000000011102230246251565404236316680908203125" + strings.Repeat("0", 10000) + "1",
-
-	// Smallest denormal, 2^(-1022-52)
-	"4.940656458412465441765687928682213723651e-324",
-	// Half of smallest denormal, 2^(-1022-53)
-	"2.470328229206232720882843964341106861825e-324",
-	// A little more than the exact half of smallest denormal
-	// 2^-1075 + 2^-1100.  (Rounds to 1p-1074.)
-	"2.470328302827751011111470718709768633275e-324",
-	// The exact halfway between smallest normal and largest denormal:
-	// 2^-1022 - 2^-1075.  (Rounds to 2^-1022.)
-	"2.225073858507201136057409796709131975935e-308",
-
-	"1152921504606846975",  //   1<<60 - 1
-	"-1152921504606846975", // -(1<<60 - 1)
-	"1152921504606846977",  //   1<<60 + 1
-	"-1152921504606846977", // -(1<<60 + 1)
-
-	"1/3",
-}
-
-// isFinite reports whether f represents a finite rational value.
-// It is equivalent to !math.IsNan(f) && !math.IsInf(f, 0).
-func isFinite(f float64) bool {
-	return math.Abs(f) <= math.MaxFloat64
-}
-
-func TestFloat32SpecialCases(t *testing.T) {
-	for _, input := range float64inputs {
-		if strings.HasPrefix(input, "long:") {
-			if testing.Short() {
-				continue
-			}
-			input = input[len("long:"):]
-		}
-
-		r, ok := new(Rat).SetString(input)
-		if !ok {
-			t.Errorf("Rat.SetString(%q) failed", input)
-			continue
-		}
-		f, exact := r.Float32()
-
-		// 1. Check string -> Rat -> float32 conversions are
-		// consistent with strconv.ParseFloat.
-		// Skip this check if the input uses "a/b" rational syntax.
-		if !strings.Contains(input, "/") {
-			e64, _ := strconv.ParseFloat(input, 32)
-			e := float32(e64)
-
-			// Careful: negative Rats too small for
-			// float64 become -0, but Rat obviously cannot
-			// preserve the sign from SetString("-0").
-			switch {
-			case math.Float32bits(e) == math.Float32bits(f):
-				// Ok: bitwise equal.
-			case f == 0 && r.Num().BitLen() == 0:
-				// Ok: Rat(0) is equivalent to both +/- float64(0).
-			default:
-				t.Errorf("strconv.ParseFloat(%q) = %g (%b), want %g (%b); delta = %g", input, e, e, f, f, f-e)
-			}
-		}
-
-		if !isFinite(float64(f)) {
-			continue
-		}
-
-		// 2. Check f is best approximation to r.
-		if !checkIsBestApprox32(t, f, r) {
-			// Append context information.
-			t.Errorf("(input was %q)", input)
-		}
-
-		// 3. Check f->R->f roundtrip is non-lossy.
-		checkNonLossyRoundtrip32(t, f)
-
-		// 4. Check exactness using slow algorithm.
-		if wasExact := new(Rat).SetFloat64(float64(f)).Cmp(r) == 0; wasExact != exact {
-			t.Errorf("Rat.SetString(%q).Float32().exact = %t, want %t", input, exact, wasExact)
-		}
-	}
-}
-
-func TestFloat64SpecialCases(t *testing.T) {
-	for _, input := range float64inputs {
-		if strings.HasPrefix(input, "long:") {
-			if testing.Short() {
-				continue
-			}
-			input = input[len("long:"):]
-		}
-
-		r, ok := new(Rat).SetString(input)
-		if !ok {
-			t.Errorf("Rat.SetString(%q) failed", input)
-			continue
-		}
-		f, exact := r.Float64()
-
-		// 1. Check string -> Rat -> float64 conversions are
-		// consistent with strconv.ParseFloat.
-		// Skip this check if the input uses "a/b" rational syntax.
-		if !strings.Contains(input, "/") {
-			e, _ := strconv.ParseFloat(input, 64)
-
-			// Careful: negative Rats too small for
-			// float64 become -0, but Rat obviously cannot
-			// preserve the sign from SetString("-0").
-			switch {
-			case math.Float64bits(e) == math.Float64bits(f):
-				// Ok: bitwise equal.
-			case f == 0 && r.Num().BitLen() == 0:
-				// Ok: Rat(0) is equivalent to both +/- float64(0).
-			default:
-				t.Errorf("strconv.ParseFloat(%q) = %g (%b), want %g (%b); delta = %g", input, e, e, f, f, f-e)
-			}
-		}
-
-		if !isFinite(f) {
-			continue
-		}
-
-		// 2. Check f is best approximation to r.
-		if !checkIsBestApprox64(t, f, r) {
-			// Append context information.
-			t.Errorf("(input was %q)", input)
-		}
-
-		// 3. Check f->R->f roundtrip is non-lossy.
-		checkNonLossyRoundtrip64(t, f)
-
-		// 4. Check exactness using slow algorithm.
-		if wasExact := new(Rat).SetFloat64(f).Cmp(r) == 0; wasExact != exact {
-			t.Errorf("Rat.SetString(%q).Float64().exact = %t, want %t", input, exact, wasExact)
-		}
-	}
-}
diff --git a/src/cmd/compile/internal/big/roundingmode_string.go b/src/cmd/compile/internal/big/roundingmode_string.go
deleted file mode 100644
index 05024b8..0000000
--- a/src/cmd/compile/internal/big/roundingmode_string.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// generated by stringer -type=RoundingMode; DO NOT EDIT
-
-package big
-
-import "fmt"
-
-const _RoundingMode_name = "ToNearestEvenToNearestAwayToZeroAwayFromZeroToNegativeInfToPositiveInf"
-
-var _RoundingMode_index = [...]uint8{0, 13, 26, 32, 44, 57, 70}
-
-func (i RoundingMode) String() string {
-	if i+1 >= RoundingMode(len(_RoundingMode_index)) {
-		return fmt.Sprintf("RoundingMode(%d)", i)
-	}
-	return _RoundingMode_name[_RoundingMode_index[i]:_RoundingMode_index[i+1]]
-}
diff --git a/src/cmd/compile/internal/big/vendor.bash b/src/cmd/compile/internal/big/vendor.bash
deleted file mode 100755
index 1b191cc..0000000
--- a/src/cmd/compile/internal/big/vendor.bash
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env bash
-
-# Copyright 2015 The Go Authors.  All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# Run this script to obtain an up-to-date vendored version of math/big.
-
-BIGDIR=../../../../math/big
-
-# Start from scratch.
-rm *.go
-
-# We don't want any assembly files.
-cp $BIGDIR/*.go .
-
-# Use pure Go arith ops w/o build tag.
-sed 's|^// \+build math_big_pure_go$||' arith_decl_pure.go > arith_decl.go
-rm arith_decl_pure.go
-
-# Import vendored math/big in external tests (e.g., floatexample_test.go).
-for f in *_test.go; do
-	sed 's|"math/big"|"cmd/compile/internal/big"|' $f > foo.go
-	mv foo.go $f
-done
-
-# gofmt to clean up after sed
-gofmt -w .
-
-# Test that it works
-go test -short
diff --git a/src/cmd/compile/internal/gc/align.go b/src/cmd/compile/internal/gc/align.go
deleted file mode 100644
index 60c59fc..0000000
--- a/src/cmd/compile/internal/gc/align.go
+++ /dev/null
@@ -1,713 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import "cmd/internal/obj"
-
-/*
- * machine size and rounding
- * alignment is dictated around
- * the size of a pointer, set in betypeinit
- * (see ../6g/galign.c).
- */
-var defercalc int
-
-func Rnd(o int64, r int64) int64 {
-	if r < 1 || r > 8 || r&(r-1) != 0 {
-		Fatal("rnd %d", r)
-	}
-	return (o + r - 1) &^ (r - 1)
-}
-
-func offmod(t *Type) {
-	o := int32(0)
-	for f := t.Type; f != nil; f = f.Down {
-		if f.Etype != TFIELD {
-			Fatal("offmod: not TFIELD: %v", Tconv(f, obj.FmtLong))
-		}
-		f.Width = int64(o)
-		o += int32(Widthptr)
-		if int64(o) >= Thearch.MAXWIDTH {
-			Yyerror("interface too large")
-			o = int32(Widthptr)
-		}
-	}
-}
-
-func widstruct(errtype *Type, t *Type, o int64, flag int) int64 {
-	starto := o
-	maxalign := int32(flag)
-	if maxalign < 1 {
-		maxalign = 1
-	}
-	lastzero := int64(0)
-	var w int64
-	for f := t.Type; f != nil; f = f.Down {
-		if f.Etype != TFIELD {
-			Fatal("widstruct: not TFIELD: %v", Tconv(f, obj.FmtLong))
-		}
-		if f.Type == nil {
-			// broken field, just skip it so that other valid fields
-			// get a width.
-			continue
-		}
-
-		dowidth(f.Type)
-		if int32(f.Type.Align) > maxalign {
-			maxalign = int32(f.Type.Align)
-		}
-		if f.Type.Width < 0 {
-			Fatal("invalid width %d", f.Type.Width)
-		}
-		w = f.Type.Width
-		if f.Type.Align > 0 {
-			o = Rnd(o, int64(f.Type.Align))
-		}
-		f.Width = o // really offset for TFIELD
-		if f.Nname != nil {
-			// this same stackparam logic is in addrescapes
-			// in typecheck.c.  usually addrescapes runs after
-			// widstruct, in which case we could drop this,
-			// but function closure functions are the exception.
-			if f.Nname.Name.Param.Stackparam != nil {
-				f.Nname.Name.Param.Stackparam.Xoffset = o
-				f.Nname.Xoffset = 0
-			} else {
-				f.Nname.Xoffset = o
-			}
-		}
-
-		if w == 0 {
-			lastzero = o
-		}
-		o += w
-		if o >= Thearch.MAXWIDTH {
-			Yyerror("type %v too large", Tconv(errtype, obj.FmtLong))
-			o = 8 // small but nonzero
-		}
-	}
-
-	// For nonzero-sized structs which end in a zero-sized thing, we add
-	// an extra byte of padding to the type.  This padding ensures that
-	// taking the address of the zero-sized thing can't manufacture a
-	// pointer to the next object in the heap.  See issue 9401.
-	if flag == 1 && o > starto && o == lastzero {
-		o++
-	}
-
-	// final width is rounded
-	if flag != 0 {
-		o = Rnd(o, int64(maxalign))
-	}
-	t.Align = uint8(maxalign)
-
-	// type width only includes back to first field's offset
-	t.Width = o - starto
-
-	return o
-}
-
-func dowidth(t *Type) {
-	if Widthptr == 0 {
-		Fatal("dowidth without betypeinit")
-	}
-
-	if t == nil {
-		return
-	}
-
-	if t.Width > 0 {
-		if t.Align == 0 {
-			// See issue 11354
-			Fatal("zero alignment with nonzero size %v", t)
-		}
-		return
-	}
-
-	if t.Width == -2 {
-		lno := int(lineno)
-		lineno = int32(t.Lineno)
-		if t.Broke == 0 {
-			t.Broke = 1
-			Yyerror("invalid recursive type %v", t)
-		}
-
-		t.Width = 0
-		lineno = int32(lno)
-		return
-	}
-
-	// break infinite recursion if the broken recursive type
-	// is referenced again
-	if t.Broke != 0 && t.Width == 0 {
-		return
-	}
-
-	// defer checkwidth calls until after we're done
-	defercalc++
-
-	lno := int(lineno)
-	lineno = int32(t.Lineno)
-	t.Width = -2
-	t.Align = 0
-
-	et := int32(t.Etype)
-	switch et {
-	case TFUNC, TCHAN, TMAP, TSTRING:
-		break
-
-		/* simtype == 0 during bootstrap */
-	default:
-		if Simtype[t.Etype] != 0 {
-			et = int32(Simtype[t.Etype])
-		}
-	}
-
-	w := int64(0)
-	switch et {
-	default:
-		Fatal("dowidth: unknown type: %v", t)
-
-		/* compiler-specific stuff */
-	case TINT8, TUINT8, TBOOL:
-		// bool is int8
-		w = 1
-
-	case TINT16, TUINT16:
-		w = 2
-
-	case TINT32, TUINT32, TFLOAT32:
-		w = 4
-
-	case TINT64, TUINT64, TFLOAT64, TCOMPLEX64:
-		w = 8
-		t.Align = uint8(Widthreg)
-
-	case TCOMPLEX128:
-		w = 16
-		t.Align = uint8(Widthreg)
-
-	case TPTR32:
-		w = 4
-		checkwidth(t.Type)
-
-	case TPTR64:
-		w = 8
-		checkwidth(t.Type)
-
-	case TUNSAFEPTR:
-		w = int64(Widthptr)
-
-	case TINTER: // implemented as 2 pointers
-		w = 2 * int64(Widthptr)
-
-		t.Align = uint8(Widthptr)
-		offmod(t)
-
-	case TCHAN: // implemented as pointer
-		w = int64(Widthptr)
-
-		checkwidth(t.Type)
-
-		// make fake type to check later to
-		// trigger channel argument check.
-		t1 := typ(TCHANARGS)
-
-		t1.Type = t
-		checkwidth(t1)
-
-	case TCHANARGS:
-		t1 := t.Type
-		dowidth(t.Type) // just in case
-		if t1.Type.Width >= 1<<16 {
-			Yyerror("channel element type too large (>64kB)")
-		}
-		t.Width = 1
-
-	case TMAP: // implemented as pointer
-		w = int64(Widthptr)
-
-		checkwidth(t.Type)
-		checkwidth(t.Down)
-
-	case TFORW: // should have been filled in
-		if t.Broke == 0 {
-			Yyerror("invalid recursive type %v", t)
-		}
-		w = 1 // anything will do
-
-		// dummy type; should be replaced before use.
-	case TANY:
-		if Debug['A'] == 0 {
-			Fatal("dowidth any")
-		}
-		w = 1 // anything will do
-
-	case TSTRING:
-		if sizeof_String == 0 {
-			Fatal("early dowidth string")
-		}
-		w = int64(sizeof_String)
-		t.Align = uint8(Widthptr)
-
-	case TARRAY:
-		if t.Type == nil {
-			break
-		}
-		if t.Bound >= 0 {
-			dowidth(t.Type)
-			if t.Type.Width != 0 {
-				cap := (uint64(Thearch.MAXWIDTH) - 1) / uint64(t.Type.Width)
-				if uint64(t.Bound) > cap {
-					Yyerror("type %v larger than address space", Tconv(t, obj.FmtLong))
-				}
-			}
-
-			w = t.Bound * t.Type.Width
-			t.Align = t.Type.Align
-		} else if t.Bound == -1 {
-			w = int64(sizeof_Array)
-			checkwidth(t.Type)
-			t.Align = uint8(Widthptr)
-		} else if t.Bound == -100 {
-			if t.Broke == 0 {
-				Yyerror("use of [...] array outside of array literal")
-				t.Broke = 1
-			}
-		} else {
-			Fatal("dowidth %v", t) // probably [...]T
-		}
-
-	case TSTRUCT:
-		if t.Funarg != 0 {
-			Fatal("dowidth fn struct %v", t)
-		}
-		w = widstruct(t, t, 0, 1)
-
-		// make fake type to check later to
-	// trigger function argument computation.
-	case TFUNC:
-		t1 := typ(TFUNCARGS)
-
-		t1.Type = t
-		checkwidth(t1)
-
-		// width of func type is pointer
-		w = int64(Widthptr)
-
-		// function is 3 cated structures;
-	// compute their widths as side-effect.
-	case TFUNCARGS:
-		t1 := t.Type
-
-		w = widstruct(t.Type, *getthis(t1), 0, 0)
-		w = widstruct(t.Type, *getinarg(t1), w, Widthreg)
-		w = widstruct(t.Type, *Getoutarg(t1), w, Widthreg)
-		t1.Argwid = w
-		if w%int64(Widthreg) != 0 {
-			Warn("bad type %v %d\n", t1, w)
-		}
-		t.Align = 1
-	}
-
-	if Widthptr == 4 && w != int64(int32(w)) {
-		Yyerror("type %v too large", t)
-	}
-
-	t.Width = w
-	if t.Align == 0 {
-		if w > 8 || w&(w-1) != 0 {
-			Fatal("invalid alignment for %v", t)
-		}
-		t.Align = uint8(w)
-	}
-
-	lineno = int32(lno)
-
-	if defercalc == 1 {
-		resumecheckwidth()
-	} else {
-		defercalc--
-	}
-}
-
-/*
- * when a type's width should be known, we call checkwidth
- * to compute it.  during a declaration like
- *
- *	type T *struct { next T }
- *
- * it is necessary to defer the calculation of the struct width
- * until after T has been initialized to be a pointer to that struct.
- * similarly, during import processing structs may be used
- * before their definition.  in those situations, calling
- * defercheckwidth() stops width calculations until
- * resumecheckwidth() is called, at which point all the
- * checkwidths that were deferred are executed.
- * dowidth should only be called when the type's size
- * is needed immediately.  checkwidth makes sure the
- * size is evaluated eventually.
- */
-type TypeList struct {
-	t    *Type
-	next *TypeList
-}
-
-var tlfree *TypeList
-
-var tlq *TypeList
-
-func checkwidth(t *Type) {
-	if t == nil {
-		return
-	}
-
-	// function arg structs should not be checked
-	// outside of the enclosing function.
-	if t.Funarg != 0 {
-		Fatal("checkwidth %v", t)
-	}
-
-	if defercalc == 0 {
-		dowidth(t)
-		return
-	}
-
-	if t.Deferwidth != 0 {
-		return
-	}
-	t.Deferwidth = 1
-
-	l := tlfree
-	if l != nil {
-		tlfree = l.next
-	} else {
-		l = new(TypeList)
-	}
-
-	l.t = t
-	l.next = tlq
-	tlq = l
-}
-
-func defercheckwidth() {
-	// we get out of sync on syntax errors, so don't be pedantic.
-	if defercalc != 0 && nerrors == 0 {
-		Fatal("defercheckwidth")
-	}
-	defercalc = 1
-}
-
-func resumecheckwidth() {
-	if defercalc == 0 {
-		Fatal("resumecheckwidth")
-	}
-	for l := tlq; l != nil; l = tlq {
-		l.t.Deferwidth = 0
-		tlq = l.next
-		dowidth(l.t)
-		l.next = tlfree
-		tlfree = l
-	}
-
-	defercalc = 0
-}
-
-var itable *Type // distinguished *byte
-
-func typeinit() {
-	if Widthptr == 0 {
-		Fatal("typeinit before betypeinit")
-	}
-
-	for i := 0; i < NTYPE; i++ {
-		Simtype[i] = uint8(i)
-	}
-
-	Types[TPTR32] = typ(TPTR32)
-	dowidth(Types[TPTR32])
-
-	Types[TPTR64] = typ(TPTR64)
-	dowidth(Types[TPTR64])
-
-	t := typ(TUNSAFEPTR)
-	Types[TUNSAFEPTR] = t
-	t.Sym = Pkglookup("Pointer", unsafepkg)
-	t.Sym.Def = typenod(t)
-	t.Sym.Def.Name = new(Name)
-
-	dowidth(Types[TUNSAFEPTR])
-
-	Tptr = TPTR32
-	if Widthptr == 8 {
-		Tptr = TPTR64
-	}
-
-	for i := TINT8; i <= TUINT64; i++ {
-		Isint[i] = true
-	}
-	Isint[TINT] = true
-	Isint[TUINT] = true
-	Isint[TUINTPTR] = true
-
-	Isfloat[TFLOAT32] = true
-	Isfloat[TFLOAT64] = true
-
-	Iscomplex[TCOMPLEX64] = true
-	Iscomplex[TCOMPLEX128] = true
-
-	Isptr[TPTR32] = true
-	Isptr[TPTR64] = true
-
-	isforw[TFORW] = true
-
-	Issigned[TINT] = true
-	Issigned[TINT8] = true
-	Issigned[TINT16] = true
-	Issigned[TINT32] = true
-	Issigned[TINT64] = true
-
-	/*
-	 * initialize okfor
-	 */
-	for i := 0; i < NTYPE; i++ {
-		if Isint[i] || i == TIDEAL {
-			okforeq[i] = true
-			okforcmp[i] = true
-			okforarith[i] = true
-			okforadd[i] = true
-			okforand[i] = true
-			okforconst[i] = true
-			issimple[i] = true
-			Minintval[i] = new(Mpint)
-			Maxintval[i] = new(Mpint)
-		}
-
-		if Isfloat[i] {
-			okforeq[i] = true
-			okforcmp[i] = true
-			okforadd[i] = true
-			okforarith[i] = true
-			okforconst[i] = true
-			issimple[i] = true
-			minfltval[i] = newMpflt()
-			maxfltval[i] = newMpflt()
-		}
-
-		if Iscomplex[i] {
-			okforeq[i] = true
-			okforadd[i] = true
-			okforarith[i] = true
-			okforconst[i] = true
-			issimple[i] = true
-		}
-	}
-
-	issimple[TBOOL] = true
-
-	okforadd[TSTRING] = true
-
-	okforbool[TBOOL] = true
-
-	okforcap[TARRAY] = true
-	okforcap[TCHAN] = true
-
-	okforconst[TBOOL] = true
-	okforconst[TSTRING] = true
-
-	okforlen[TARRAY] = true
-	okforlen[TCHAN] = true
-	okforlen[TMAP] = true
-	okforlen[TSTRING] = true
-
-	okforeq[TPTR32] = true
-	okforeq[TPTR64] = true
-	okforeq[TUNSAFEPTR] = true
-	okforeq[TINTER] = true
-	okforeq[TCHAN] = true
-	okforeq[TSTRING] = true
-	okforeq[TBOOL] = true
-	okforeq[TMAP] = true    // nil only; refined in typecheck
-	okforeq[TFUNC] = true   // nil only; refined in typecheck
-	okforeq[TARRAY] = true  // nil slice only; refined in typecheck
-	okforeq[TSTRUCT] = true // it's complicated; refined in typecheck
-
-	okforcmp[TSTRING] = true
-
-	var i int
-	for i = 0; i < len(okfor); i++ {
-		okfor[i] = okfornone[:]
-	}
-
-	// binary
-	okfor[OADD] = okforadd[:]
-
-	okfor[OAND] = okforand[:]
-	okfor[OANDAND] = okforbool[:]
-	okfor[OANDNOT] = okforand[:]
-	okfor[ODIV] = okforarith[:]
-	okfor[OEQ] = okforeq[:]
-	okfor[OGE] = okforcmp[:]
-	okfor[OGT] = okforcmp[:]
-	okfor[OLE] = okforcmp[:]
-	okfor[OLT] = okforcmp[:]
-	okfor[OMOD] = okforand[:]
-	okfor[OHMUL] = okforarith[:]
-	okfor[OMUL] = okforarith[:]
-	okfor[ONE] = okforeq[:]
-	okfor[OOR] = okforand[:]
-	okfor[OOROR] = okforbool[:]
-	okfor[OSUB] = okforarith[:]
-	okfor[OXOR] = okforand[:]
-	okfor[OLSH] = okforand[:]
-	okfor[ORSH] = okforand[:]
-
-	// unary
-	okfor[OCOM] = okforand[:]
-
-	okfor[OMINUS] = okforarith[:]
-	okfor[ONOT] = okforbool[:]
-	okfor[OPLUS] = okforarith[:]
-
-	// special
-	okfor[OCAP] = okforcap[:]
-
-	okfor[OLEN] = okforlen[:]
-
-	// comparison
-	iscmp[OLT] = true
-
-	iscmp[OGT] = true
-	iscmp[OGE] = true
-	iscmp[OLE] = true
-	iscmp[OEQ] = true
-	iscmp[ONE] = true
-
-	mpatofix(Maxintval[TINT8], "0x7f")
-	mpatofix(Minintval[TINT8], "-0x80")
-	mpatofix(Maxintval[TINT16], "0x7fff")
-	mpatofix(Minintval[TINT16], "-0x8000")
-	mpatofix(Maxintval[TINT32], "0x7fffffff")
-	mpatofix(Minintval[TINT32], "-0x80000000")
-	mpatofix(Maxintval[TINT64], "0x7fffffffffffffff")
-	mpatofix(Minintval[TINT64], "-0x8000000000000000")
-
-	mpatofix(Maxintval[TUINT8], "0xff")
-	mpatofix(Maxintval[TUINT16], "0xffff")
-	mpatofix(Maxintval[TUINT32], "0xffffffff")
-	mpatofix(Maxintval[TUINT64], "0xffffffffffffffff")
-
-	/* f is valid float if min < f < max.  (min and max are not themselves valid.) */
-	mpatoflt(maxfltval[TFLOAT32], "33554431p103") /* 2^24-1 p (127-23) + 1/2 ulp*/
-	mpatoflt(minfltval[TFLOAT32], "-33554431p103")
-	mpatoflt(maxfltval[TFLOAT64], "18014398509481983p970") /* 2^53-1 p (1023-52) + 1/2 ulp */
-	mpatoflt(minfltval[TFLOAT64], "-18014398509481983p970")
-
-	maxfltval[TCOMPLEX64] = maxfltval[TFLOAT32]
-	minfltval[TCOMPLEX64] = minfltval[TFLOAT32]
-	maxfltval[TCOMPLEX128] = maxfltval[TFLOAT64]
-	minfltval[TCOMPLEX128] = minfltval[TFLOAT64]
-
-	/* for walk to use in error messages */
-	Types[TFUNC] = functype(nil, nil, nil)
-
-	/* types used in front end */
-	// types[TNIL] got set early in lexinit
-	Types[TIDEAL] = typ(TIDEAL)
-
-	Types[TINTER] = typ(TINTER)
-
-	/* simple aliases */
-	Simtype[TMAP] = uint8(Tptr)
-
-	Simtype[TCHAN] = uint8(Tptr)
-	Simtype[TFUNC] = uint8(Tptr)
-	Simtype[TUNSAFEPTR] = uint8(Tptr)
-
-	/* pick up the backend thearch.typedefs */
-	var s1 *Sym
-	var etype int
-	var sameas int
-	var s *Sym
-	for i = range Thearch.Typedefs {
-		s = Lookup(Thearch.Typedefs[i].Name)
-		s1 = Pkglookup(Thearch.Typedefs[i].Name, builtinpkg)
-
-		etype = Thearch.Typedefs[i].Etype
-		if etype < 0 || etype >= len(Types) {
-			Fatal("typeinit: %s bad etype", s.Name)
-		}
-		sameas = Thearch.Typedefs[i].Sameas
-		if sameas < 0 || sameas >= len(Types) {
-			Fatal("typeinit: %s bad sameas", s.Name)
-		}
-		Simtype[etype] = uint8(sameas)
-		minfltval[etype] = minfltval[sameas]
-		maxfltval[etype] = maxfltval[sameas]
-		Minintval[etype] = Minintval[sameas]
-		Maxintval[etype] = Maxintval[sameas]
-
-		t = Types[etype]
-		if t != nil {
-			Fatal("typeinit: %s already defined", s.Name)
-		}
-
-		t = typ(etype)
-		t.Sym = s1
-
-		dowidth(t)
-		Types[etype] = t
-		s1.Def = typenod(t)
-		s1.Def.Name = new(Name)
-	}
-
-	Array_array = int(Rnd(0, int64(Widthptr)))
-	Array_nel = int(Rnd(int64(Array_array)+int64(Widthptr), int64(Widthint)))
-	Array_cap = int(Rnd(int64(Array_nel)+int64(Widthint), int64(Widthint)))
-	sizeof_Array = int(Rnd(int64(Array_cap)+int64(Widthint), int64(Widthptr)))
-
-	// string is same as slice wo the cap
-	sizeof_String = int(Rnd(int64(Array_nel)+int64(Widthint), int64(Widthptr)))
-
-	dowidth(Types[TSTRING])
-	dowidth(idealstring)
-
-	itable = typ(Tptr)
-	itable.Type = Types[TUINT8]
-}
-
-/*
- * compute total size of f's in/out arguments.
- */
-func Argsize(t *Type) int {
-	var save Iter
-	var x int64
-
-	w := int64(0)
-
-	fp := Structfirst(&save, Getoutarg(t))
-	for fp != nil {
-		x = fp.Width + fp.Type.Width
-		if x > w {
-			w = x
-		}
-		fp = structnext(&save)
-	}
-
-	fp = funcfirst(&save, t)
-	for fp != nil {
-		x = fp.Width + fp.Type.Width
-		if x > w {
-			w = x
-		}
-		fp = funcnext(&save)
-	}
-
-	w = (w + int64(Widthptr) - 1) &^ (int64(Widthptr) - 1)
-	if int64(int(w)) != w {
-		Fatal("argsize too big")
-	}
-	return int(w)
-}
diff --git a/src/cmd/compile/internal/gc/builtin.go b/src/cmd/compile/internal/gc/builtin.go
deleted file mode 100644
index f09dd56..0000000
--- a/src/cmd/compile/internal/gc/builtin.go
+++ /dev/null
@@ -1,169 +0,0 @@
-// AUTO-GENERATED by mkbuiltin.go; DO NOT EDIT
-
-package gc
-
-const runtimeimport = "" +
-	"package runtime\n" +
-	"import runtime \"runtime\"\n" +
-	"func @\"\".newobject (@\"\".typ·2 *byte) (? *any)\n" +
-	"func @\"\".panicindex ()\n" +
-	"func @\"\".panicslice ()\n" +
-	"func @\"\".panicdivide ()\n" +
-	"func @\"\".throwreturn ()\n" +
-	"func @\"\".throwinit ()\n" +
-	"func @\"\".panicwrap (? string, ? string, ? string)\n" +
-	"func @\"\".gopanic (? interface {})\n" +
-	"func @\"\".gorecover (? *int32) (? interface {})\n" +
-	"func @\"\".printbool (? bool)\n" +
-	"func @\"\".printfloat (? float64)\n" +
-	"func @\"\".printint (? int64)\n" +
-	"func @\"\".printhex (? uint64)\n" +
-	"func @\"\".printuint (? uint64)\n" +
-	"func @\"\".printcomplex (? complex128)\n" +
-	"func @\"\".printstring (? string)\n" +
-	"func @\"\".printpointer (? any)\n" +
-	"func @\"\".printiface (? any)\n" +
-	"func @\"\".printeface (? any)\n" +
-	"func @\"\".printslice (? any)\n" +
-	"func @\"\".printnl ()\n" +
-	"func @\"\".printsp ()\n" +
-	"func @\"\".printlock ()\n" +
-	"func @\"\".printunlock ()\n" +
-	"func @\"\".concatstring2 (? *[32]byte, ? string, ? string) (? string)\n" +
-	"func @\"\".concatstring3 (? *[32]byte, ? string, ? string, ? string) (? string)\n" +
-	"func @\"\".concatstring4 (? *[32]byte, ? string, ? string, ? string, ? string) (? string)\n" +
-	"func @\"\".concatstring5 (? *[32]byte, ? string, ? string, ? string, ? string, ? string) (? string)\n" +
-	"func @\"\".concatstrings (? *[32]byte, ? []string) (? string)\n" +
-	"func @\"\".cmpstring (? string, ? string) (? int)\n" +
-	"func @\"\".eqstring (? string, ? string) (? bool)\n" +
-	"func @\"\".intstring (? *[4]byte, ? int64) (? string)\n" +
-	"func @\"\".slicebytetostring (? *[32]byte, ? []byte) (? string)\n" +
-	"func @\"\".slicebytetostringtmp (? []byte) (? string)\n" +
-	"func @\"\".slicerunetostring (? *[32]byte, ? []rune) (? string)\n" +
-	"func @\"\".stringtoslicebyte (? *[32]byte, ? string) (? []byte)\n" +
-	"func @\"\".stringtoslicebytetmp (? string) (? []byte)\n" +
-	"func @\"\".stringtoslicerune (? *[32]rune, ? string) (? []rune)\n" +
-	"func @\"\".stringiter (? string, ? int) (? int)\n" +
-	"func @\"\".stringiter2 (? string, ? int) (@\"\".retk·1 int, @\"\".retv·2 rune)\n" +
-	"func @\"\".slicecopy (@\"\".to·2 any, @\"\".fr·3 any, @\"\".wid·4 uintptr) (? int)\n" +
-	"func @\"\".slicestringcopy (@\"\".to·2 any, @\"\".fr·3 any) (? int)\n" +
-	"func @\"\".typ2Itab (@\"\".typ·2 *byte, @\"\".typ2·3 *byte, @\"\".cache·4 **byte) (@\"\".ret·1 *byte)\n" +
-	"func @\"\".convI2E (@\"\".elem·2 any) (@\"\".ret·1 any)\n" +
-	"func @\"\".convI2I (@\"\".typ·2 *byte, @\"\".elem·3 any) (@\"\".ret·1 any)\n" +
-	"func @\"\".convT2E (@\"\".typ·2 *byte, @\"\".elem·3 *any, @\"\".buf·4 *any) (@\"\".ret·1 any)\n" +
-	"func @\"\".convT2I (@\"\".typ·2 *byte, @\"\".typ2·3 *byte, @\"\".cache·4 **byte, @\"\".elem·5 *any, @\"\".buf·6 *any) (@\"\".ret·1 any)\n" +
-	"func @\"\".assertE2E (@\"\".typ·1 *byte, @\"\".iface·2 any, @\"\".ret·3 *any)\n" +
-	"func @\"\".assertE2E2 (@\"\".typ·2 *byte, @\"\".iface·3 any, @\"\".ret·4 *any) (? bool)\n" +
-	"func @\"\".assertE2I (@\"\".typ·1 *byte, @\"\".iface·2 any, @\"\".ret·3 *any)\n" +
-	"func @\"\".assertE2I2 (@\"\".typ·2 *byte, @\"\".iface·3 any, @\"\".ret·4 *any) (? bool)\n" +
-	"func @\"\".assertE2T (@\"\".typ·1 *byte, @\"\".iface·2 any, @\"\".ret·3 *any)\n" +
-	"func @\"\".assertE2T2 (@\"\".typ·2 *byte, @\"\".iface·3 any, @\"\".ret·4 *any) (? bool)\n" +
-	"func @\"\".assertI2E (@\"\".typ·1 *byte, @\"\".iface·2 any, @\"\".ret·3 *any)\n" +
-	"func @\"\".assertI2E2 (@\"\".typ·2 *byte, @\"\".iface·3 any, @\"\".ret·4 *any) (? bool)\n" +
-	"func @\"\".assertI2I (@\"\".typ·1 *byte, @\"\".iface·2 any, @\"\".ret·3 *any)\n" +
-	"func @\"\".assertI2I2 (@\"\".typ·2 *byte, @\"\".iface·3 any, @\"\".ret·4 *any) (? bool)\n" +
-	"func @\"\".assertI2T (@\"\".typ·1 *byte, @\"\".iface·2 any, @\"\".ret·3 *any)\n" +
-	"func @\"\".assertI2T2 (@\"\".typ·2 *byte, @\"\".iface·3 any, @\"\".ret·4 *any) (? bool)\n" +
-	"func @\"\".panicdottype (@\"\".have·1 *byte, @\"\".want·2 *byte, @\"\".iface·3 *byte)\n" +
-	"func @\"\".ifaceeq (@\"\".i1·2 any, @\"\".i2·3 any) (@\"\".ret·1 bool)\n" +
-	"func @\"\".efaceeq (@\"\".i1·2 any, @\"\".i2·3 any) (@\"\".ret·1 bool)\n" +
-	"func @\"\".ifacethash (@\"\".i1·2 any) (@\"\".ret·1 uint32)\n" +
-	"func @\"\".efacethash (@\"\".i1·2 any) (@\"\".ret·1 uint32)\n" +
-	"func @\"\".makemap (@\"\".mapType·2 *byte, @\"\".hint·3 int64, @\"\".mapbuf·4 *any, @\"\".bucketbuf·5 *any) (@\"\".hmap·1 map[any]any)\n" +
-	"func @\"\".mapaccess1 (@\"\".mapType·2 *byte, @\"\".hmap·3 map[any]any, @\"\".key·4 *any) (@\"\".val·1 *any)\n" +
-	"func @\"\".mapaccess1_fast32 (@\"\".mapType·2 *byte, @\"\".hmap·3 map[any]any, @\"\".key·4 any) (@\"\".val·1 *any)\n" +
-	"func @\"\".mapaccess1_fast64 (@\"\".mapType·2 *byte, @\"\".hmap·3 map[any]any, @\"\".key·4 any) (@\"\".val·1 *any)\n" +
-	"func @\"\".mapaccess1_faststr (@\"\".mapType·2 *byte, @\"\".hmap·3 map[any]any, @\"\".key·4 any) (@\"\".val·1 *any)\n" +
-	"func @\"\".mapaccess2 (@\"\".mapType·3 *byte, @\"\".hmap·4 map[any]any, @\"\".key·5 *any) (@\"\".val·1 *any, @\"\".pres·2 bool)\n" +
-	"func @\"\".mapaccess2_fast32 (@\"\".mapType·3 *byte, @\"\".hmap·4 map[any]any, @\"\".key·5 any) (@\"\".val·1 *any, @\"\".pres·2 bool)\n" +
-	"func @\"\".mapaccess2_fast64 (@\"\".mapType·3 *byte, @\"\".hmap·4 map[any]any, @\"\".key·5 any) (@\"\".val·1 *any, @\"\".pres·2 bool)\n" +
-	"func @\"\".mapaccess2_faststr (@\"\".mapType·3 *byte, @\"\".hmap·4 map[any]any, @\"\".key·5 any) (@\"\".val·1 *any, @\"\".pres·2 bool)\n" +
-	"func @\"\".mapassign1 (@\"\".mapType·1 *byte, @\"\".hmap·2 map[any]any, @\"\".key·3 *any, @\"\".val·4 *any)\n" +
-	"func @\"\".mapiterinit (@\"\".mapType·1 *byte, @\"\".hmap·2 map[any]any, @\"\".hiter·3 *any)\n" +
-	"func @\"\".mapdelete (@\"\".mapType·1 *byte, @\"\".hmap·2 map[any]any, @\"\".key·3 *any)\n" +
-	"func @\"\".mapiternext (@\"\".hiter·1 *any)\n" +
-	"func @\"\".makechan (@\"\".chanType·2 *byte, @\"\".hint·3 int64) (@\"\".hchan·1 chan any)\n" +
-	"func @\"\".chanrecv1 (@\"\".chanType·1 *byte, @\"\".hchan·2 <-chan any, @\"\".elem·3 *any)\n" +
-	"func @\"\".chanrecv2 (@\"\".chanType·2 *byte, @\"\".hchan·3 <-chan any, @\"\".elem·4 *any) (? bool)\n" +
-	"func @\"\".chansend1 (@\"\".chanType·1 *byte, @\"\".hchan·2 chan<- any, @\"\".elem·3 *any)\n" +
-	"func @\"\".closechan (@\"\".hchan·1 any)\n" +
-	"var @\"\".writeBarrierEnabled bool\n" +
-	"func @\"\".writebarrierptr (@\"\".dst·1 *any, @\"\".src·2 any)\n" +
-	"func @\"\".writebarrierstring (@\"\".dst·1 *any, @\"\".src·2 any)\n" +
-	"func @\"\".writebarrierslice (@\"\".dst·1 *any, @\"\".src·2 any)\n" +
-	"func @\"\".writebarrieriface (@\"\".dst·1 *any, @\"\".src·2 any)\n" +
-	"func @\"\".writebarrierfat01 (@\"\".dst·1 *any, _ uintptr, @\"\".src·3 any)\n" +
-	"func @\"\".writebarrierfat10 (@\"\".dst·1 *any, _ uintptr, @\"\".src·3 any)\n" +
-	"func @\"\".writebarrierfat11 (@\"\".dst·1 *any, _ uintptr, @\"\".src·3 any)\n" +
-	"func @\"\".writebarrierfat001 (@\"\".dst·1 *any, _ uintptr, @\"\".src·3 any)\n" +
-	"func @\"\".writebarrierfat010 (@\"\".dst·1 *any, _ uintptr, @\"\".src·3 any)\n" +
-	"func @\"\".writebarrierfat011 (@\"\".dst·1 *any, _ uintptr, @\"\".src·3 any)\n" +
-	"func @\"\".writebarrierfat100 (@\"\".dst·1 *any, _ uintptr, @\"\".src·3 any)\n" +
-	"func @\"\".writebarrierfat101 (@\"\".dst·1 *any, _ uintptr, @\"\".src·3 any)\n" +
-	"func @\"\".writebarrierfat110 (@\"\".dst·1 *any, _ uintptr, @\"\".src·3 any)\n" +
-	"func @\"\".writebarrierfat111 (@\"\".dst·1 *any, _ uintptr, @\"\".src·3 any)\n" +
-	"func @\"\".writebarrierfat0001 (@\"\".dst·1 *any, _ uintptr, @\"\".src·3 any)\n" +
-	"func @\"\".writebarrierfat0010 (@\"\".dst·1 *any, _ uintptr, @\"\".src·3 any)\n" +
-	"func @\"\".writebarrierfat0011 (@\"\".dst·1 *any, _ uintptr, @\"\".src·3 any)\n" +
-	"func @\"\".writebarrierfat0100 (@\"\".dst·1 *any, _ uintptr, @\"\".src·3 any)\n" +
-	"func @\"\".writebarrierfat0101 (@\"\".dst·1 *any, _ uintptr, @\"\".src·3 any)\n" +
-	"func @\"\".writebarrierfat0110 (@\"\".dst·1 *any, _ uintptr, @\"\".src·3 any)\n" +
-	"func @\"\".writebarrierfat0111 (@\"\".dst·1 *any, _ uintptr, @\"\".src·3 any)\n" +
-	"func @\"\".writebarrierfat1000 (@\"\".dst·1 *any, _ uintptr, @\"\".src·3 any)\n" +
-	"func @\"\".writebarrierfat1001 (@\"\".dst·1 *any, _ uintptr, @\"\".src·3 any)\n" +
-	"func @\"\".writebarrierfat1010 (@\"\".dst·1 *any, _ uintptr, @\"\".src·3 any)\n" +
-	"func @\"\".writebarrierfat1011 (@\"\".dst·1 *any, _ uintptr, @\"\".src·3 any)\n" +
-	"func @\"\".writebarrierfat1100 (@\"\".dst·1 *any, _ uintptr, @\"\".src·3 any)\n" +
-	"func @\"\".writebarrierfat1101 (@\"\".dst·1 *any, _ uintptr, @\"\".src·3 any)\n" +
-	"func @\"\".writebarrierfat1110 (@\"\".dst·1 *any, _ uintptr, @\"\".src·3 any)\n" +
-	"func @\"\".writebarrierfat1111 (@\"\".dst·1 *any, _ uintptr, @\"\".src·3 any)\n" +
-	"func @\"\".typedmemmove (@\"\".typ·1 *byte, @\"\".dst·2 *any, @\"\".src·3 *any)\n" +
-	"func @\"\".typedslicecopy (@\"\".typ·2 *byte, @\"\".dst·3 any, @\"\".src·4 any) (? int)\n" +
-	"func @\"\".selectnbsend (@\"\".chanType·2 *byte, @\"\".hchan·3 chan<- any, @\"\".elem·4 *any) (? bool)\n" +
-	"func @\"\".selectnbrecv (@\"\".chanType·2 *byte, @\"\".elem·3 *any, @\"\".hchan·4 <-chan any) (? bool)\n" +
-	"func @\"\".selectnbrecv2 (@\"\".chanType·2 *byte, @\"\".elem·3 *any, @\"\".received·4 *bool, @\"\".hchan·5 <-chan any) (? bool)\n" +
-	"func @\"\".newselect (@\"\".sel·1 *byte, @\"\".selsize·2 int64, @\"\".size·3 int32)\n" +
-	"func @\"\".selectsend (@\"\".sel·2 *byte, @\"\".hchan·3 chan<- any, @\"\".elem·4 *any) (@\"\".selected·1 bool)\n" +
-	"func @\"\".selectrecv (@\"\".sel·2 *byte, @\"\".hchan·3 <-chan any, @\"\".elem·4 *any) (@\"\".selected·1 bool)\n" +
-	"func @\"\".selectrecv2 (@\"\".sel·2 *byte, @\"\".hchan·3 <-chan any, @\"\".elem·4 *any, @\"\".received·5 *bool) (@\"\".selected·1 bool)\n" +
-	"func @\"\".selectdefault (@\"\".sel·2 *byte) (@\"\".selected·1 bool)\n" +
-	"func @\"\".selectgo (@\"\".sel·1 *byte)\n" +
-	"func @\"\".block ()\n" +
-	"func @\"\".makeslice (@\"\".typ·2 *byte, @\"\".nel·3 int64, @\"\".cap·4 int64) (@\"\".ary·1 []any)\n" +
-	"func @\"\".growslice (@\"\".typ·2 *byte, @\"\".old·3 []any, @\"\".cap·4 int) (@\"\".ary·1 []any)\n" +
-	"func @\"\".growslice_n (@\"\".typ·2 *byte, @\"\".old·3 []any, @\"\".n·4 int) (@\"\".ary·1 []any)\n" +
-	"func @\"\".memmove (@\"\".to·1 *any, @\"\".frm·2 *any, @\"\".length·3 uintptr)\n" +
-	"func @\"\".memclr (@\"\".ptr·1 *byte, @\"\".length·2 uintptr)\n" +
-	"func @\"\".memequal (@\"\".x·2 *any, @\"\".y·3 *any, @\"\".size·4 uintptr) (? bool)\n" +
-	"func @\"\".memequal8 (@\"\".x·2 *any, @\"\".y·3 *any) (? bool)\n" +
-	"func @\"\".memequal16 (@\"\".x·2 *any, @\"\".y·3 *any) (? bool)\n" +
-	"func @\"\".memequal32 (@\"\".x·2 *any, @\"\".y·3 *any) (? bool)\n" +
-	"func @\"\".memequal64 (@\"\".x·2 *any, @\"\".y·3 *any) (? bool)\n" +
-	"func @\"\".memequal128 (@\"\".x·2 *any, @\"\".y·3 *any) (? bool)\n" +
-	"func @\"\".int64div (? int64, ? int64) (? int64)\n" +
-	"func @\"\".uint64div (? uint64, ? uint64) (? uint64)\n" +
-	"func @\"\".int64mod (? int64, ? int64) (? int64)\n" +
-	"func @\"\".uint64mod (? uint64, ? uint64) (? uint64)\n" +
-	"func @\"\".float64toint64 (? float64) (? int64)\n" +
-	"func @\"\".float64touint64 (? float64) (? uint64)\n" +
-	"func @\"\".int64tofloat64 (? int64) (? float64)\n" +
-	"func @\"\".uint64tofloat64 (? uint64) (? float64)\n" +
-	"func @\"\".complex128div (@\"\".num·2 complex128, @\"\".den·3 complex128) (@\"\".quo·1 complex128)\n" +
-	"func @\"\".racefuncenter (? uintptr)\n" +
-	"func @\"\".racefuncexit ()\n" +
-	"func @\"\".raceread (? uintptr)\n" +
-	"func @\"\".racewrite (? uintptr)\n" +
-	"func @\"\".racereadrange (@\"\".addr·1 uintptr, @\"\".size·2 uintptr)\n" +
-	"func @\"\".racewriterange (@\"\".addr·1 uintptr, @\"\".size·2 uintptr)\n" +
-	"\n" +
-	"$$\n"
-
-const unsafeimport = "" +
-	"package unsafe\n" +
-	"import runtime \"runtime\"\n" +
-	"type @\"\".Pointer uintptr\n" +
-	"func @\"\".Offsetof (? any) (? uintptr)\n" +
-	"func @\"\".Sizeof (? any) (? uintptr)\n" +
-	"func @\"\".Alignof (? any) (? uintptr)\n" +
-	"\n" +
-	"$$\n"
diff --git a/src/cmd/compile/internal/gc/builtin/runtime.go b/src/cmd/compile/internal/gc/builtin/runtime.go
deleted file mode 100644
index 6210f10..0000000
--- a/src/cmd/compile/internal/gc/builtin/runtime.go
+++ /dev/null
@@ -1,195 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// NOTE: If you change this file you must run "go generate"
-// to update builtin.go.  This is not done automatically
-// to avoid depending on having a working compiler binary.
-
-// +build ignore
-
-package PACKAGE
-
-// emitted by compiler, not referred to by go programs
-
-func newobject(typ *byte) *any
-func panicindex()
-func panicslice()
-func panicdivide()
-func throwreturn()
-func throwinit()
-func panicwrap(string, string, string)
-
-func gopanic(interface{})
-func gorecover(*int32) interface{}
-
-func printbool(bool)
-func printfloat(float64)
-func printint(int64)
-func printhex(uint64)
-func printuint(uint64)
-func printcomplex(complex128)
-func printstring(string)
-func printpointer(any)
-func printiface(any)
-func printeface(any)
-func printslice(any)
-func printnl()
-func printsp()
-func printlock()
-func printunlock()
-
-func concatstring2(*[32]byte, string, string) string
-func concatstring3(*[32]byte, string, string, string) string
-func concatstring4(*[32]byte, string, string, string, string) string
-func concatstring5(*[32]byte, string, string, string, string, string) string
-func concatstrings(*[32]byte, []string) string
-
-func cmpstring(string, string) int
-func eqstring(string, string) bool
-func intstring(*[4]byte, int64) string
-func slicebytetostring(*[32]byte, []byte) string
-func slicebytetostringtmp([]byte) string
-func slicerunetostring(*[32]byte, []rune) string
-func stringtoslicebyte(*[32]byte, string) []byte
-func stringtoslicebytetmp(string) []byte
-func stringtoslicerune(*[32]rune, string) []rune
-func stringiter(string, int) int
-func stringiter2(string, int) (retk int, retv rune)
-func slicecopy(to any, fr any, wid uintptr) int
-func slicestringcopy(to any, fr any) int
-
-// interface conversions
-func typ2Itab(typ *byte, typ2 *byte, cache **byte) (ret *byte)
-func convI2E(elem any) (ret any)
-func convI2I(typ *byte, elem any) (ret any)
-func convT2E(typ *byte, elem, buf *any) (ret any)
-func convT2I(typ *byte, typ2 *byte, cache **byte, elem, buf *any) (ret any)
-
-// interface type assertions  x.(T)
-func assertE2E(typ *byte, iface any, ret *any)
-func assertE2E2(typ *byte, iface any, ret *any) bool
-func assertE2I(typ *byte, iface any, ret *any)
-func assertE2I2(typ *byte, iface any, ret *any) bool
-func assertE2T(typ *byte, iface any, ret *any)
-func assertE2T2(typ *byte, iface any, ret *any) bool
-func assertI2E(typ *byte, iface any, ret *any)
-func assertI2E2(typ *byte, iface any, ret *any) bool
-func assertI2I(typ *byte, iface any, ret *any)
-func assertI2I2(typ *byte, iface any, ret *any) bool
-func assertI2T(typ *byte, iface any, ret *any)
-func assertI2T2(typ *byte, iface any, ret *any) bool
-func panicdottype(have, want, iface *byte)
-
-func ifaceeq(i1 any, i2 any) (ret bool)
-func efaceeq(i1 any, i2 any) (ret bool)
-func ifacethash(i1 any) (ret uint32)
-func efacethash(i1 any) (ret uint32)
-
-// *byte is really *runtime.Type
-func makemap(mapType *byte, hint int64, mapbuf *any, bucketbuf *any) (hmap map[any]any)
-func mapaccess1(mapType *byte, hmap map[any]any, key *any) (val *any)
-func mapaccess1_fast32(mapType *byte, hmap map[any]any, key any) (val *any)
-func mapaccess1_fast64(mapType *byte, hmap map[any]any, key any) (val *any)
-func mapaccess1_faststr(mapType *byte, hmap map[any]any, key any) (val *any)
-func mapaccess2(mapType *byte, hmap map[any]any, key *any) (val *any, pres bool)
-func mapaccess2_fast32(mapType *byte, hmap map[any]any, key any) (val *any, pres bool)
-func mapaccess2_fast64(mapType *byte, hmap map[any]any, key any) (val *any, pres bool)
-func mapaccess2_faststr(mapType *byte, hmap map[any]any, key any) (val *any, pres bool)
-func mapassign1(mapType *byte, hmap map[any]any, key *any, val *any)
-func mapiterinit(mapType *byte, hmap map[any]any, hiter *any)
-func mapdelete(mapType *byte, hmap map[any]any, key *any)
-func mapiternext(hiter *any)
-
-// *byte is really *runtime.Type
-func makechan(chanType *byte, hint int64) (hchan chan any)
-func chanrecv1(chanType *byte, hchan <-chan any, elem *any)
-func chanrecv2(chanType *byte, hchan <-chan any, elem *any) bool
-func chansend1(chanType *byte, hchan chan<- any, elem *any)
-func closechan(hchan any)
-
-var writeBarrierEnabled bool
-
-func writebarrierptr(dst *any, src any)
-func writebarrierstring(dst *any, src any)
-func writebarrierslice(dst *any, src any)
-func writebarrieriface(dst *any, src any)
-
-// The unused *byte argument makes sure that src is 2-pointer-aligned,
-// which is the maximum alignment on NaCl amd64p32
-// (and possibly on 32-bit systems if we start 64-bit aligning uint64s).
-// The bitmap in the name tells which words being copied are pointers.
-func writebarrierfat01(dst *any, _ uintptr, src any)
-func writebarrierfat10(dst *any, _ uintptr, src any)
-func writebarrierfat11(dst *any, _ uintptr, src any)
-func writebarrierfat001(dst *any, _ uintptr, src any)
-func writebarrierfat010(dst *any, _ uintptr, src any)
-func writebarrierfat011(dst *any, _ uintptr, src any)
-func writebarrierfat100(dst *any, _ uintptr, src any)
-func writebarrierfat101(dst *any, _ uintptr, src any)
-func writebarrierfat110(dst *any, _ uintptr, src any)
-func writebarrierfat111(dst *any, _ uintptr, src any)
-func writebarrierfat0001(dst *any, _ uintptr, src any)
-func writebarrierfat0010(dst *any, _ uintptr, src any)
-func writebarrierfat0011(dst *any, _ uintptr, src any)
-func writebarrierfat0100(dst *any, _ uintptr, src any)
-func writebarrierfat0101(dst *any, _ uintptr, src any)
-func writebarrierfat0110(dst *any, _ uintptr, src any)
-func writebarrierfat0111(dst *any, _ uintptr, src any)
-func writebarrierfat1000(dst *any, _ uintptr, src any)
-func writebarrierfat1001(dst *any, _ uintptr, src any)
-func writebarrierfat1010(dst *any, _ uintptr, src any)
-func writebarrierfat1011(dst *any, _ uintptr, src any)
-func writebarrierfat1100(dst *any, _ uintptr, src any)
-func writebarrierfat1101(dst *any, _ uintptr, src any)
-func writebarrierfat1110(dst *any, _ uintptr, src any)
-func writebarrierfat1111(dst *any, _ uintptr, src any)
-
-// *byte is really *runtime.Type
-func typedmemmove(typ *byte, dst *any, src *any)
-func typedslicecopy(typ *byte, dst any, src any) int
-
-func selectnbsend(chanType *byte, hchan chan<- any, elem *any) bool
-func selectnbrecv(chanType *byte, elem *any, hchan <-chan any) bool
-func selectnbrecv2(chanType *byte, elem *any, received *bool, hchan <-chan any) bool
-
-func newselect(sel *byte, selsize int64, size int32)
-func selectsend(sel *byte, hchan chan<- any, elem *any) (selected bool)
-func selectrecv(sel *byte, hchan <-chan any, elem *any) (selected bool)
-func selectrecv2(sel *byte, hchan <-chan any, elem *any, received *bool) (selected bool)
-func selectdefault(sel *byte) (selected bool)
-func selectgo(sel *byte)
-func block()
-
-func makeslice(typ *byte, nel int64, cap int64) (ary []any)
-func growslice(typ *byte, old []any, cap int) (ary []any)
-func growslice_n(typ *byte, old []any, n int) (ary []any)
-func memmove(to *any, frm *any, length uintptr)
-func memclr(ptr *byte, length uintptr)
-
-func memequal(x, y *any, size uintptr) bool
-func memequal8(x, y *any) bool
-func memequal16(x, y *any) bool
-func memequal32(x, y *any) bool
-func memequal64(x, y *any) bool
-func memequal128(x, y *any) bool
-
-// only used on 32-bit
-func int64div(int64, int64) int64
-func uint64div(uint64, uint64) uint64
-func int64mod(int64, int64) int64
-func uint64mod(uint64, uint64) uint64
-func float64toint64(float64) int64
-func float64touint64(float64) uint64
-func int64tofloat64(int64) float64
-func uint64tofloat64(uint64) float64
-
-func complex128div(num complex128, den complex128) (quo complex128)
-
-// race detection
-func racefuncenter(uintptr)
-func racefuncexit()
-func raceread(uintptr)
-func racewrite(uintptr)
-func racereadrange(addr, size uintptr)
-func racewriterange(addr, size uintptr)
diff --git a/src/cmd/compile/internal/gc/builtin/unsafe.go b/src/cmd/compile/internal/gc/builtin/unsafe.go
deleted file mode 100644
index ce50869..0000000
--- a/src/cmd/compile/internal/gc/builtin/unsafe.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// NOTE: If you change this file you must run "go generate"
-// to update builtin.go.  This is not done automatically
-// to avoid depending on having a working compiler binary.
-
-// +build ignore
-
-package PACKAGE
-
-type Pointer uintptr // not really; filled in by compiler
-
-// return types here are ignored; see unsafe.go
-func Offsetof(any) uintptr
-func Sizeof(any) uintptr
-func Alignof(any) uintptr
diff --git a/src/cmd/compile/internal/gc/bv.go b/src/cmd/compile/internal/gc/bv.go
deleted file mode 100644
index 2b988e6..0000000
--- a/src/cmd/compile/internal/gc/bv.go
+++ /dev/null
@@ -1,195 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import "fmt"
-
-const (
-	WORDSIZE  = 4
-	WORDBITS  = 32
-	WORDMASK  = WORDBITS - 1
-	WORDSHIFT = 5
-)
-
-// A Bvec is a bit vector.
-type Bvec struct {
-	n int32    // number of bits in vector
-	b []uint32 // words holding bits
-}
-
-func bvsize(n uint32) uint32 {
-	return ((n + WORDBITS - 1) / WORDBITS) * WORDSIZE
-}
-
-func bvbits(bv Bvec) int32 {
-	return bv.n
-}
-
-func bvwords(bv Bvec) int32 {
-	return (bv.n + WORDBITS - 1) / WORDBITS
-}
-
-func bvalloc(n int32) Bvec {
-	return Bvec{n, make([]uint32, bvsize(uint32(n))/4)}
-}
-
-type bulkBvec struct {
-	words []uint32
-	nbit  int32
-	nword int32
-}
-
-func bvbulkalloc(nbit int32, count int32) bulkBvec {
-	nword := (nbit + WORDBITS - 1) / WORDBITS
-	return bulkBvec{
-		words: make([]uint32, nword*count),
-		nbit:  nbit,
-		nword: nword,
-	}
-}
-
-func (b *bulkBvec) next() Bvec {
-	out := Bvec{b.nbit, b.words[:b.nword]}
-	b.words = b.words[b.nword:]
-	return out
-}
-
-/* difference */
-func bvandnot(dst Bvec, src1 Bvec, src2 Bvec) {
-	for i, x := range src1.b {
-		dst.b[i] = x &^ src2.b[i]
-	}
-}
-
-func bvcmp(bv1 Bvec, bv2 Bvec) int {
-	if bv1.n != bv2.n {
-		Fatal("bvequal: lengths %d and %d are not equal", bv1.n, bv2.n)
-	}
-	for i, x := range bv1.b {
-		if x != bv2.b[i] {
-			return 1
-		}
-	}
-	return 0
-}
-
-func bvcopy(dst Bvec, src Bvec) {
-	for i, x := range src.b {
-		dst.b[i] = x
-	}
-}
-
-func bvconcat(src1 Bvec, src2 Bvec) Bvec {
-	dst := bvalloc(src1.n + src2.n)
-	for i := int32(0); i < src1.n; i++ {
-		if bvget(src1, i) != 0 {
-			bvset(dst, i)
-		}
-	}
-	for i := int32(0); i < src2.n; i++ {
-		if bvget(src2, i) != 0 {
-			bvset(dst, i+src1.n)
-		}
-	}
-	return dst
-}
-
-func bvget(bv Bvec, i int32) int {
-	if i < 0 || i >= bv.n {
-		Fatal("bvget: index %d is out of bounds with length %d\n", i, bv.n)
-	}
-	return int((bv.b[i>>WORDSHIFT] >> uint(i&WORDMASK)) & 1)
-}
-
-// bvnext returns the smallest index >= i for which bvget(bv, i) == 1.
-// If there is no such index, bvnext returns -1.
-func bvnext(bv Bvec, i int32) int {
-	if i >= bv.n {
-		return -1
-	}
-
-	// Jump i ahead to next word with bits.
-	if bv.b[i>>WORDSHIFT]>>uint(i&WORDMASK) == 0 {
-		i &^= WORDMASK
-		i += WORDBITS
-		for i < bv.n && bv.b[i>>WORDSHIFT] == 0 {
-			i += WORDBITS
-		}
-	}
-
-	if i >= bv.n {
-		return -1
-	}
-
-	// Find 1 bit.
-	w := bv.b[i>>WORDSHIFT] >> uint(i&WORDMASK)
-
-	for w&1 == 0 {
-		w >>= 1
-		i++
-	}
-
-	return int(i)
-}
-
-func bvisempty(bv Bvec) bool {
-	for i := int32(0); i < bv.n; i += WORDBITS {
-		if bv.b[i>>WORDSHIFT] != 0 {
-			return false
-		}
-	}
-	return true
-}
-
-func bvnot(bv Bvec) {
-	i := int32(0)
-	w := int32(0)
-	for ; i < bv.n; i, w = i+WORDBITS, w+1 {
-		bv.b[w] = ^bv.b[w]
-	}
-}
-
-/* union */
-func bvor(dst Bvec, src1 Bvec, src2 Bvec) {
-	for i, x := range src1.b {
-		dst.b[i] = x | src2.b[i]
-	}
-}
-
-/* intersection */
-func bvand(dst Bvec, src1 Bvec, src2 Bvec) {
-	for i, x := range src1.b {
-		dst.b[i] = x & src2.b[i]
-	}
-}
-
-func bvprint(bv Bvec) {
-	fmt.Printf("#*")
-	for i := int32(0); i < bv.n; i++ {
-		fmt.Printf("%d", bvget(bv, i))
-	}
-}
-
-func bvreset(bv Bvec, i int32) {
-	if i < 0 || i >= bv.n {
-		Fatal("bvreset: index %d is out of bounds with length %d\n", i, bv.n)
-	}
-	mask := uint32(^(1 << uint(i%WORDBITS)))
-	bv.b[i/WORDBITS] &= mask
-}
-
-func bvresetall(bv Bvec) {
-	for i := range bv.b {
-		bv.b[i] = 0
-	}
-}
-
-func bvset(bv Bvec, i int32) {
-	if i < 0 || i >= bv.n {
-		Fatal("bvset: index %d is out of bounds with length %d\n", i, bv.n)
-	}
-	mask := uint32(1 << uint(i%WORDBITS))
-	bv.b[i/WORDBITS] |= mask
-}
diff --git a/src/cmd/compile/internal/gc/cgen.go b/src/cmd/compile/internal/gc/cgen.go
deleted file mode 100644
index 4160ae9..0000000
--- a/src/cmd/compile/internal/gc/cgen.go
+++ /dev/null
@@ -1,3566 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-)
-
-/*
- * generate:
- *	res = n;
- * simplifies and calls Thearch.Gmove.
- * if wb is true, need to emit write barriers.
- */
-func Cgen(n, res *Node) {
-	cgen_wb(n, res, false)
-}
-
-func cgen_wb(n, res *Node, wb bool) {
-	if Debug['g'] != 0 {
-		op := "cgen"
-		if wb {
-			op = "cgen_wb"
-		}
-		Dump("\n"+op+"-n", n)
-		Dump(op+"-res", res)
-	}
-
-	if n == nil || n.Type == nil {
-		return
-	}
-
-	if res == nil || res.Type == nil {
-		Fatal("cgen: res nil")
-	}
-
-	for n.Op == OCONVNOP {
-		n = n.Left
-	}
-
-	switch n.Op {
-	case OSLICE, OSLICEARR, OSLICESTR, OSLICE3, OSLICE3ARR:
-		cgen_slice(n, res, wb)
-		return
-
-	case OEFACE:
-		if res.Op != ONAME || !res.Addable || wb {
-			var n1 Node
-			Tempname(&n1, n.Type)
-			Cgen_eface(n, &n1)
-			cgen_wb(&n1, res, wb)
-		} else {
-			Cgen_eface(n, res)
-		}
-		return
-
-	case ODOTTYPE:
-		cgen_dottype(n, res, nil, wb)
-		return
-
-	case OAPPEND:
-		cgen_append(n, res)
-		return
-	}
-
-	if n.Ullman >= UINF {
-		if n.Op == OINDREG {
-			Fatal("cgen: this is going to miscompile")
-		}
-		if res.Ullman >= UINF {
-			var n1 Node
-			Tempname(&n1, n.Type)
-			Cgen(n, &n1)
-			cgen_wb(&n1, res, wb)
-			return
-		}
-	}
-
-	if Isfat(n.Type) {
-		if n.Type.Width < 0 {
-			Fatal("forgot to compute width for %v", n.Type)
-		}
-		sgen_wb(n, res, n.Type.Width, wb)
-		return
-	}
-
-	if !res.Addable {
-		if n.Ullman > res.Ullman {
-			if Ctxt.Arch.Regsize == 4 && Is64(n.Type) {
-				var n1 Node
-				Tempname(&n1, n.Type)
-				Cgen(n, &n1)
-				cgen_wb(&n1, res, wb)
-				return
-			}
-
-			var n1 Node
-			Regalloc(&n1, n.Type, res)
-			Cgen(n, &n1)
-			if n1.Ullman > res.Ullman {
-				Dump("n1", &n1)
-				Dump("res", res)
-				Fatal("loop in cgen")
-			}
-
-			cgen_wb(&n1, res, wb)
-			Regfree(&n1)
-			return
-		}
-
-		var f int
-		if res.Ullman < UINF {
-			if Complexop(n, res) {
-				Complexgen(n, res)
-				return
-			}
-
-			f = 1 // gen thru register
-			switch n.Op {
-			case OLITERAL:
-				if Smallintconst(n) {
-					f = 0
-				}
-
-			case OREGISTER:
-				f = 0
-			}
-
-			if !Iscomplex[n.Type.Etype] && Ctxt.Arch.Regsize == 8 && !wb {
-				a := Thearch.Optoas(OAS, res.Type)
-				var addr obj.Addr
-				if Thearch.Sudoaddable(a, res, &addr) {
-					var p1 *obj.Prog
-					if f != 0 {
-						var n2 Node
-						Regalloc(&n2, res.Type, nil)
-						Cgen(n, &n2)
-						p1 = Thearch.Gins(a, &n2, nil)
-						Regfree(&n2)
-					} else {
-						p1 = Thearch.Gins(a, n, nil)
-					}
-					p1.To = addr
-					if Debug['g'] != 0 {
-						fmt.Printf("%v [ignore previous line]\n", p1)
-					}
-					Thearch.Sudoclean()
-					return
-				}
-			}
-		}
-
-		if Ctxt.Arch.Thechar == '8' {
-			// no registers to speak of
-			var n1, n2 Node
-			Tempname(&n1, n.Type)
-			Cgen(n, &n1)
-			Igen(res, &n2, nil)
-			cgen_wb(&n1, &n2, wb)
-			Regfree(&n2)
-			return
-		}
-
-		var n1 Node
-		Igen(res, &n1, nil)
-		cgen_wb(n, &n1, wb)
-		Regfree(&n1)
-		return
-	}
-
-	// update addressability for string, slice
-	// can't do in walk because n->left->addable
-	// changes if n->left is an escaping local variable.
-	switch n.Op {
-	case OSPTR, OLEN:
-		if Isslice(n.Left.Type) || Istype(n.Left.Type, TSTRING) {
-			n.Addable = n.Left.Addable
-		}
-
-	case OCAP:
-		if Isslice(n.Left.Type) {
-			n.Addable = n.Left.Addable
-		}
-
-	case OITAB:
-		n.Addable = n.Left.Addable
-	}
-
-	if wb {
-		if int(Simtype[res.Type.Etype]) != Tptr {
-			Fatal("cgen_wb of type %v", res.Type)
-		}
-		if n.Ullman >= UINF {
-			var n1 Node
-			Tempname(&n1, n.Type)
-			Cgen(n, &n1)
-			n = &n1
-		}
-		cgen_wbptr(n, res)
-		return
-	}
-
-	// Write barrier now handled. Code below this line can ignore wb.
-
-	if Ctxt.Arch.Thechar == '5' { // TODO(rsc): Maybe more often?
-		// if both are addressable, move
-		if n.Addable && res.Addable {
-			if Is64(n.Type) || Is64(res.Type) || n.Op == OREGISTER || res.Op == OREGISTER || Iscomplex[n.Type.Etype] || Iscomplex[res.Type.Etype] {
-				Thearch.Gmove(n, res)
-			} else {
-				var n1 Node
-				Regalloc(&n1, n.Type, nil)
-				Thearch.Gmove(n, &n1)
-				Cgen(&n1, res)
-				Regfree(&n1)
-			}
-
-			return
-		}
-
-		// if both are not addressable, use a temporary.
-		if !n.Addable && !res.Addable {
-			// could use regalloc here sometimes,
-			// but have to check for ullman >= UINF.
-			var n1 Node
-			Tempname(&n1, n.Type)
-			Cgen(n, &n1)
-			Cgen(&n1, res)
-			return
-		}
-
-		// if result is not addressable directly but n is,
-		// compute its address and then store via the address.
-		if !res.Addable {
-			var n1 Node
-			Igen(res, &n1, nil)
-			Cgen(n, &n1)
-			Regfree(&n1)
-			return
-		}
-	}
-
-	if Complexop(n, res) {
-		Complexgen(n, res)
-		return
-	}
-
-	if (Ctxt.Arch.Thechar == '6' || Ctxt.Arch.Thechar == '8') && n.Addable {
-		Thearch.Gmove(n, res)
-		return
-	}
-
-	if Ctxt.Arch.Thechar == '7' || Ctxt.Arch.Thechar == '9' {
-		// if both are addressable, move
-		if n.Addable {
-			if n.Op == OREGISTER || res.Op == OREGISTER {
-				Thearch.Gmove(n, res)
-			} else {
-				var n1 Node
-				Regalloc(&n1, n.Type, nil)
-				Thearch.Gmove(n, &n1)
-				Cgen(&n1, res)
-				Regfree(&n1)
-			}
-			return
-		}
-	}
-
-	// if n is sudoaddable generate addr and move
-	if Ctxt.Arch.Thechar == '5' && !Is64(n.Type) && !Is64(res.Type) && !Iscomplex[n.Type.Etype] && !Iscomplex[res.Type.Etype] {
-		a := Thearch.Optoas(OAS, n.Type)
-		var addr obj.Addr
-		if Thearch.Sudoaddable(a, n, &addr) {
-			if res.Op != OREGISTER {
-				var n2 Node
-				Regalloc(&n2, res.Type, nil)
-				p1 := Thearch.Gins(a, nil, &n2)
-				p1.From = addr
-				if Debug['g'] != 0 {
-					fmt.Printf("%v [ignore previous line]\n", p1)
-				}
-				Thearch.Gmove(&n2, res)
-				Regfree(&n2)
-			} else {
-				p1 := Thearch.Gins(a, nil, res)
-				p1.From = addr
-				if Debug['g'] != 0 {
-					fmt.Printf("%v [ignore previous line]\n", p1)
-				}
-			}
-			Thearch.Sudoclean()
-			return
-		}
-	}
-
-	nl := n.Left
-	nr := n.Right
-
-	if nl != nil && nl.Ullman >= UINF {
-		if nr != nil && nr.Ullman >= UINF {
-			var n1 Node
-			Tempname(&n1, nl.Type)
-			Cgen(nl, &n1)
-			n2 := *n
-			n2.Left = &n1
-			Cgen(&n2, res)
-			return
-		}
-	}
-
-	// 64-bit ops are hard on 32-bit machine.
-	if Ctxt.Arch.Regsize == 4 && (Is64(n.Type) || Is64(res.Type) || n.Left != nil && Is64(n.Left.Type)) {
-		switch n.Op {
-		// math goes to cgen64.
-		case OMINUS,
-			OCOM,
-			OADD,
-			OSUB,
-			OMUL,
-			OLROT,
-			OLSH,
-			ORSH,
-			OAND,
-			OOR,
-			OXOR:
-			Thearch.Cgen64(n, res)
-			return
-		}
-	}
-
-	if Thearch.Cgen_float != nil && nl != nil && Isfloat[n.Type.Etype] && Isfloat[nl.Type.Etype] {
-		Thearch.Cgen_float(n, res)
-		return
-	}
-
-	if !Iscomplex[n.Type.Etype] && Ctxt.Arch.Regsize == 8 {
-		a := Thearch.Optoas(OAS, n.Type)
-		var addr obj.Addr
-		if Thearch.Sudoaddable(a, n, &addr) {
-			if res.Op == OREGISTER {
-				p1 := Thearch.Gins(a, nil, res)
-				p1.From = addr
-			} else {
-				var n2 Node
-				Regalloc(&n2, n.Type, nil)
-				p1 := Thearch.Gins(a, nil, &n2)
-				p1.From = addr
-				Thearch.Gins(a, &n2, res)
-				Regfree(&n2)
-			}
-
-			Thearch.Sudoclean()
-			return
-		}
-	}
-
-	var a int
-	switch n.Op {
-	default:
-		Dump("cgen", n)
-		Dump("cgen-res", res)
-		Fatal("cgen: unknown op %v", Nconv(n, obj.FmtShort|obj.FmtSign))
-
-	case OOROR, OANDAND,
-		OEQ, ONE,
-		OLT, OLE,
-		OGE, OGT,
-		ONOT:
-		Bvgen(n, res, true)
-		return
-
-	case OPLUS:
-		Cgen(nl, res)
-		return
-
-		// unary
-	case OCOM:
-		a := Thearch.Optoas(OXOR, nl.Type)
-
-		var n1 Node
-		Regalloc(&n1, nl.Type, nil)
-		Cgen(nl, &n1)
-		var n2 Node
-		Nodconst(&n2, nl.Type, -1)
-		Thearch.Gins(a, &n2, &n1)
-		cgen_norm(n, &n1, res)
-		return
-
-	case OMINUS:
-		if Isfloat[nl.Type.Etype] {
-			nr = Nodintconst(-1)
-			Convlit(&nr, n.Type)
-			a = Thearch.Optoas(OMUL, nl.Type)
-			goto sbop
-		}
-
-		a := Thearch.Optoas(int(n.Op), nl.Type)
-		// unary
-		var n1 Node
-		Regalloc(&n1, nl.Type, res)
-
-		Cgen(nl, &n1)
-		if Ctxt.Arch.Thechar == '5' {
-			var n2 Node
-			Nodconst(&n2, nl.Type, 0)
-			Thearch.Gins(a, &n2, &n1)
-		} else if Ctxt.Arch.Thechar == '7' {
-			Thearch.Gins(a, &n1, &n1)
-		} else {
-			Thearch.Gins(a, nil, &n1)
-		}
-		cgen_norm(n, &n1, res)
-		return
-
-	case OSQRT:
-		var n1 Node
-		Regalloc(&n1, nl.Type, res)
-		Cgen(n.Left, &n1)
-		Thearch.Gins(Thearch.Optoas(OSQRT, nl.Type), &n1, &n1)
-		Thearch.Gmove(&n1, res)
-		Regfree(&n1)
-		return
-
-	case OGETG:
-		Thearch.Getg(res)
-		return
-
-		// symmetric binary
-	case OAND,
-		OOR,
-		OXOR,
-		OADD,
-		OMUL:
-		if n.Op == OMUL && Thearch.Cgen_bmul != nil && Thearch.Cgen_bmul(int(n.Op), nl, nr, res) {
-			break
-		}
-		a = Thearch.Optoas(int(n.Op), nl.Type)
-		goto sbop
-
-		// asymmetric binary
-	case OSUB:
-		a = Thearch.Optoas(int(n.Op), nl.Type)
-		goto abop
-
-	case OHMUL:
-		Thearch.Cgen_hmul(nl, nr, res)
-
-	case OCONV:
-		if Eqtype(n.Type, nl.Type) || Noconv(n.Type, nl.Type) {
-			Cgen(nl, res)
-			return
-		}
-
-		if Ctxt.Arch.Thechar == '8' {
-			var n1 Node
-			var n2 Node
-			Tempname(&n2, n.Type)
-			Mgen(nl, &n1, res)
-			Thearch.Gmove(&n1, &n2)
-			Thearch.Gmove(&n2, res)
-			Mfree(&n1)
-			break
-		}
-
-		var n1 Node
-		var n2 Node
-		if Ctxt.Arch.Thechar == '5' {
-			if nl.Addable && !Is64(nl.Type) {
-				Regalloc(&n1, nl.Type, res)
-				Thearch.Gmove(nl, &n1)
-			} else {
-				if n.Type.Width > int64(Widthptr) || Is64(nl.Type) || Isfloat[nl.Type.Etype] {
-					Tempname(&n1, nl.Type)
-				} else {
-					Regalloc(&n1, nl.Type, res)
-				}
-				Cgen(nl, &n1)
-			}
-			if n.Type.Width > int64(Widthptr) || Is64(n.Type) || Isfloat[n.Type.Etype] {
-				Tempname(&n2, n.Type)
-			} else {
-				Regalloc(&n2, n.Type, nil)
-			}
-		} else {
-			if n.Type.Width > nl.Type.Width {
-				// If loading from memory, do conversion during load,
-				// so as to avoid use of 8-bit register in, say, int(*byteptr).
-				switch nl.Op {
-				case ODOT, ODOTPTR, OINDEX, OIND, ONAME:
-					Igen(nl, &n1, res)
-					Regalloc(&n2, n.Type, res)
-					Thearch.Gmove(&n1, &n2)
-					Thearch.Gmove(&n2, res)
-					Regfree(&n2)
-					Regfree(&n1)
-					return
-				}
-			}
-			Regalloc(&n1, nl.Type, res)
-			Regalloc(&n2, n.Type, &n1)
-			Cgen(nl, &n1)
-		}
-
-		// if we do the conversion n1 -> n2 here
-		// reusing the register, then gmove won't
-		// have to allocate its own register.
-		Thearch.Gmove(&n1, &n2)
-		Thearch.Gmove(&n2, res)
-		if n2.Op == OREGISTER {
-			Regfree(&n2)
-		}
-		if n1.Op == OREGISTER {
-			Regfree(&n1)
-		}
-
-	case ODOT,
-		ODOTPTR,
-		OINDEX,
-		OIND,
-		ONAME: // PHEAP or PPARAMREF var
-		var n1 Node
-		Igen(n, &n1, res)
-
-		Thearch.Gmove(&n1, res)
-		Regfree(&n1)
-
-		// interface table is first word of interface value
-	case OITAB:
-		var n1 Node
-		Igen(nl, &n1, res)
-
-		n1.Type = n.Type
-		Thearch.Gmove(&n1, res)
-		Regfree(&n1)
-
-	case OSPTR:
-		// pointer is the first word of string or slice.
-		if Isconst(nl, CTSTR) {
-			var n1 Node
-			Regalloc(&n1, Types[Tptr], res)
-			p1 := Thearch.Gins(Thearch.Optoas(OAS, n1.Type), nil, &n1)
-			Datastring(nl.Val().U.(string), &p1.From)
-			p1.From.Type = obj.TYPE_ADDR
-			Thearch.Gmove(&n1, res)
-			Regfree(&n1)
-			break
-		}
-
-		var n1 Node
-		Igen(nl, &n1, res)
-		n1.Type = n.Type
-		Thearch.Gmove(&n1, res)
-		Regfree(&n1)
-
-	case OLEN:
-		if Istype(nl.Type, TMAP) || Istype(nl.Type, TCHAN) {
-			// map and chan have len in the first int-sized word.
-			// a zero pointer means zero length
-			var n1 Node
-			Regalloc(&n1, Types[Tptr], res)
-
-			Cgen(nl, &n1)
-
-			var n2 Node
-			Nodconst(&n2, Types[Tptr], 0)
-			p1 := Thearch.Ginscmp(OEQ, Types[Tptr], &n1, &n2, 0)
-
-			n2 = n1
-			n2.Op = OINDREG
-			n2.Type = Types[Simtype[TINT]]
-			Thearch.Gmove(&n2, &n1)
-
-			Patch(p1, Pc)
-
-			Thearch.Gmove(&n1, res)
-			Regfree(&n1)
-			break
-		}
-
-		if Istype(nl.Type, TSTRING) || Isslice(nl.Type) {
-			// both slice and string have len one pointer into the struct.
-			// a zero pointer means zero length
-			var n1 Node
-			Igen(nl, &n1, res)
-
-			n1.Type = Types[Simtype[TUINT]]
-			n1.Xoffset += int64(Array_nel)
-			Thearch.Gmove(&n1, res)
-			Regfree(&n1)
-			break
-		}
-
-		Fatal("cgen: OLEN: unknown type %v", Tconv(nl.Type, obj.FmtLong))
-
-	case OCAP:
-		if Istype(nl.Type, TCHAN) {
-			// chan has cap in the second int-sized word.
-			// a zero pointer means zero length
-			var n1 Node
-			Regalloc(&n1, Types[Tptr], res)
-
-			Cgen(nl, &n1)
-
-			var n2 Node
-			Nodconst(&n2, Types[Tptr], 0)
-			p1 := Thearch.Ginscmp(OEQ, Types[Tptr], &n1, &n2, 0)
-
-			n2 = n1
-			n2.Op = OINDREG
-			n2.Xoffset = int64(Widthint)
-			n2.Type = Types[Simtype[TINT]]
-			Thearch.Gmove(&n2, &n1)
-
-			Patch(p1, Pc)
-
-			Thearch.Gmove(&n1, res)
-			Regfree(&n1)
-			break
-		}
-
-		if Isslice(nl.Type) {
-			var n1 Node
-			Igen(nl, &n1, res)
-			n1.Type = Types[Simtype[TUINT]]
-			n1.Xoffset += int64(Array_cap)
-			Thearch.Gmove(&n1, res)
-			Regfree(&n1)
-			break
-		}
-
-		Fatal("cgen: OCAP: unknown type %v", Tconv(nl.Type, obj.FmtLong))
-
-	case OADDR:
-		if n.Bounded { // let race detector avoid nil checks
-			Disable_checknil++
-		}
-		Agen(nl, res)
-		if n.Bounded {
-			Disable_checknil--
-		}
-
-	case OCALLMETH:
-		cgen_callmeth(n, 0)
-		cgen_callret(n, res)
-
-	case OCALLINTER:
-		cgen_callinter(n, res, 0)
-		cgen_callret(n, res)
-
-	case OCALLFUNC:
-		cgen_call(n, 0)
-		cgen_callret(n, res)
-
-	case OMOD, ODIV:
-		if Isfloat[n.Type.Etype] || Thearch.Dodiv == nil {
-			a = Thearch.Optoas(int(n.Op), nl.Type)
-			goto abop
-		}
-
-		if nl.Ullman >= nr.Ullman {
-			var n1 Node
-			Regalloc(&n1, nl.Type, res)
-			Cgen(nl, &n1)
-			cgen_div(int(n.Op), &n1, nr, res)
-			Regfree(&n1)
-		} else {
-			var n2 Node
-			if !Smallintconst(nr) {
-				Regalloc(&n2, nr.Type, res)
-				Cgen(nr, &n2)
-			} else {
-				n2 = *nr
-			}
-
-			cgen_div(int(n.Op), nl, &n2, res)
-			if n2.Op != OLITERAL {
-				Regfree(&n2)
-			}
-		}
-
-	case OLSH, ORSH, OLROT:
-		Thearch.Cgen_shift(int(n.Op), n.Bounded, nl, nr, res)
-	}
-
-	return
-
-	/*
-	 * put simplest on right - we'll generate into left
-	 * and then adjust it using the computation of right.
-	 * constants and variables have the same ullman
-	 * count, so look for constants specially.
-	 *
-	 * an integer constant we can use as an immediate
-	 * is simpler than a variable - we can use the immediate
-	 * in the adjustment instruction directly - so it goes
-	 * on the right.
-	 *
-	 * other constants, like big integers or floating point
-	 * constants, require a mov into a register, so those
-	 * might as well go on the left, so we can reuse that
-	 * register for the computation.
-	 */
-sbop: // symmetric binary
-	if nl.Ullman < nr.Ullman || (nl.Ullman == nr.Ullman && (Smallintconst(nl) || (nr.Op == OLITERAL && !Smallintconst(nr)))) {
-		r := nl
-		nl = nr
-		nr = r
-	}
-
-abop: // asymmetric binary
-	var n1 Node
-	var n2 Node
-	if Ctxt.Arch.Thechar == '8' {
-		// no registers, sigh
-		if Smallintconst(nr) {
-			var n1 Node
-			Mgen(nl, &n1, res)
-			var n2 Node
-			Regalloc(&n2, nl.Type, &n1)
-			Thearch.Gmove(&n1, &n2)
-			Thearch.Gins(a, nr, &n2)
-			Thearch.Gmove(&n2, res)
-			Regfree(&n2)
-			Mfree(&n1)
-		} else if nl.Ullman >= nr.Ullman {
-			var nt Node
-			Tempname(&nt, nl.Type)
-			Cgen(nl, &nt)
-			var n2 Node
-			Mgen(nr, &n2, nil)
-			var n1 Node
-			Regalloc(&n1, nl.Type, res)
-			Thearch.Gmove(&nt, &n1)
-			Thearch.Gins(a, &n2, &n1)
-			Thearch.Gmove(&n1, res)
-			Regfree(&n1)
-			Mfree(&n2)
-		} else {
-			var n2 Node
-			Regalloc(&n2, nr.Type, res)
-			Cgen(nr, &n2)
-			var n1 Node
-			Regalloc(&n1, nl.Type, nil)
-			Cgen(nl, &n1)
-			Thearch.Gins(a, &n2, &n1)
-			Regfree(&n2)
-			Thearch.Gmove(&n1, res)
-			Regfree(&n1)
-		}
-		return
-	}
-
-	if nl.Ullman >= nr.Ullman {
-		Regalloc(&n1, nl.Type, res)
-		Cgen(nl, &n1)
-
-		if Smallintconst(nr) && Ctxt.Arch.Thechar != '5' && Ctxt.Arch.Thechar != '7' && Ctxt.Arch.Thechar != '9' { // TODO(rsc): Check opcode for arm
-			n2 = *nr
-		} else {
-			Regalloc(&n2, nr.Type, nil)
-			Cgen(nr, &n2)
-		}
-	} else {
-		if Smallintconst(nr) && Ctxt.Arch.Thechar != '5' && Ctxt.Arch.Thechar != '7' && Ctxt.Arch.Thechar != '9' { // TODO(rsc): Check opcode for arm
-			n2 = *nr
-		} else {
-			Regalloc(&n2, nr.Type, res)
-			Cgen(nr, &n2)
-		}
-
-		Regalloc(&n1, nl.Type, nil)
-		Cgen(nl, &n1)
-	}
-
-	Thearch.Gins(a, &n2, &n1)
-	if n2.Op != OLITERAL {
-		Regfree(&n2)
-	}
-	cgen_norm(n, &n1, res)
-}
-
-var sys_wbptr *Node
-
-func cgen_wbptr(n, res *Node) {
-	if Curfn != nil && Curfn.Func.Nowritebarrier {
-		Yyerror("write barrier prohibited")
-	}
-	if Debug_wb > 0 {
-		Warn("write barrier")
-	}
-
-	var dst, src Node
-	Igen(res, &dst, nil)
-	if n.Op == OREGISTER {
-		src = *n
-		Regrealloc(&src)
-	} else {
-		Cgenr(n, &src, nil)
-	}
-
-	wbEnabled := syslook("writeBarrierEnabled", 0)
-	pbr := Thearch.Ginscmp(ONE, Types[TUINT8], wbEnabled, Nodintconst(0), -1)
-	Thearch.Gins(Thearch.Optoas(OAS, Types[Tptr]), &src, &dst)
-	pjmp := Gbranch(obj.AJMP, nil, 0)
-	Patch(pbr, Pc)
-	var adst Node
-	Agenr(&dst, &adst, &dst)
-	p := Thearch.Gins(Thearch.Optoas(OAS, Types[Tptr]), &adst, nil)
-	a := &p.To
-	a.Type = obj.TYPE_MEM
-	a.Reg = int16(Thearch.REGSP)
-	a.Offset = 0
-	if HasLinkRegister() {
-		a.Offset += int64(Widthptr)
-	}
-	p2 := Thearch.Gins(Thearch.Optoas(OAS, Types[Tptr]), &src, nil)
-	p2.To = p.To
-	p2.To.Offset += int64(Widthptr)
-	Regfree(&adst)
-	if sys_wbptr == nil {
-		sys_wbptr = writebarrierfn("writebarrierptr", Types[Tptr], Types[Tptr])
-	}
-	Ginscall(sys_wbptr, 0)
-	Patch(pjmp, Pc)
-
-	Regfree(&dst)
-	Regfree(&src)
-}
-
-func cgen_wbfat(n, res *Node) {
-	if Curfn != nil && Curfn.Func.Nowritebarrier {
-		Yyerror("write barrier prohibited")
-	}
-	if Debug_wb > 0 {
-		Warn("write barrier")
-	}
-	needType := true
-	funcName := "typedmemmove"
-	var dst, src Node
-	if n.Ullman >= res.Ullman {
-		Agenr(n, &src, nil)
-		Agenr(res, &dst, nil)
-	} else {
-		Agenr(res, &dst, nil)
-		Agenr(n, &src, nil)
-	}
-	p := Thearch.Gins(Thearch.Optoas(OAS, Types[Tptr]), &dst, nil)
-	a := &p.To
-	a.Type = obj.TYPE_MEM
-	a.Reg = int16(Thearch.REGSP)
-	a.Offset = 0
-	if HasLinkRegister() {
-		a.Offset += int64(Widthptr)
-	}
-	if needType {
-		a.Offset += int64(Widthptr)
-	}
-	p2 := Thearch.Gins(Thearch.Optoas(OAS, Types[Tptr]), &src, nil)
-	p2.To = p.To
-	p2.To.Offset += int64(Widthptr)
-	Regfree(&dst)
-	if needType {
-		src.Type = Types[Tptr]
-		Thearch.Gins(Thearch.Optoas(OAS, Types[Tptr]), typename(n.Type), &src)
-		p3 := Thearch.Gins(Thearch.Optoas(OAS, Types[Tptr]), &src, nil)
-		p3.To = p2.To
-		p3.To.Offset -= 2 * int64(Widthptr)
-	}
-	Regfree(&src)
-	Ginscall(writebarrierfn(funcName, Types[Tptr], Types[Tptr]), 0)
-}
-
-// cgen_norm moves n1 to res, truncating to expected type if necessary.
-// n1 is a register, and cgen_norm frees it.
-func cgen_norm(n, n1, res *Node) {
-	switch Ctxt.Arch.Thechar {
-	case '6', '8':
-		// We use sized math, so the result is already truncated.
-	default:
-		switch n.Op {
-		case OADD, OSUB, OMUL, ODIV, OCOM, OMINUS:
-			// TODO(rsc): What about left shift?
-			Thearch.Gins(Thearch.Optoas(OAS, n.Type), n1, n1)
-		}
-	}
-
-	Thearch.Gmove(n1, res)
-	Regfree(n1)
-}
-
-func Mgen(n *Node, n1 *Node, rg *Node) {
-	n1.Op = OEMPTY
-
-	if n.Addable {
-		*n1 = *n
-		if n1.Op == OREGISTER || n1.Op == OINDREG {
-			reg[n.Reg-int16(Thearch.REGMIN)]++
-		}
-		return
-	}
-
-	Tempname(n1, n.Type)
-	Cgen(n, n1)
-	if n.Type.Width <= int64(Widthptr) || Isfloat[n.Type.Etype] {
-		n2 := *n1
-		Regalloc(n1, n.Type, rg)
-		Thearch.Gmove(&n2, n1)
-	}
-}
-
-func Mfree(n *Node) {
-	if n.Op == OREGISTER {
-		Regfree(n)
-	}
-}
-
-/*
- * allocate a register (reusing res if possible) and generate
- *  a = n
- * The caller must call Regfree(a).
- */
-func Cgenr(n *Node, a *Node, res *Node) {
-	if Debug['g'] != 0 {
-		Dump("cgenr-n", n)
-	}
-
-	if Isfat(n.Type) {
-		Fatal("cgenr on fat node")
-	}
-
-	if n.Addable {
-		Regalloc(a, n.Type, res)
-		Thearch.Gmove(n, a)
-		return
-	}
-
-	switch n.Op {
-	case ONAME,
-		ODOT,
-		ODOTPTR,
-		OINDEX,
-		OCALLFUNC,
-		OCALLMETH,
-		OCALLINTER:
-		var n1 Node
-		Igen(n, &n1, res)
-		Regalloc(a, Types[Tptr], &n1)
-		Thearch.Gmove(&n1, a)
-		Regfree(&n1)
-
-	default:
-		Regalloc(a, n.Type, res)
-		Cgen(n, a)
-	}
-}
-
-/*
- * allocate a register (reusing res if possible) and generate
- * a = &n
- * The caller must call Regfree(a).
- * The generated code checks that the result is not nil.
- */
-func Agenr(n *Node, a *Node, res *Node) {
-	if Debug['g'] != 0 {
-		Dump("\nagenr-n", n)
-	}
-
-	nl := n.Left
-	nr := n.Right
-
-	switch n.Op {
-	case ODOT, ODOTPTR, OCALLFUNC, OCALLMETH, OCALLINTER:
-		var n1 Node
-		Igen(n, &n1, res)
-		Regalloc(a, Types[Tptr], &n1)
-		Agen(&n1, a)
-		Regfree(&n1)
-
-	case OIND:
-		Cgenr(n.Left, a, res)
-		Cgen_checknil(a)
-
-	case OINDEX:
-		if Ctxt.Arch.Thechar == '5' {
-			var p2 *obj.Prog // to be patched to panicindex.
-			w := uint32(n.Type.Width)
-			bounded := Debug['B'] != 0 || n.Bounded
-			var n1 Node
-			var n3 Node
-			if nr.Addable {
-				var tmp Node
-				if !Isconst(nr, CTINT) {
-					Tempname(&tmp, Types[TINT32])
-				}
-				if !Isconst(nl, CTSTR) {
-					Agenr(nl, &n3, res)
-				}
-				if !Isconst(nr, CTINT) {
-					p2 = Thearch.Cgenindex(nr, &tmp, bounded)
-					Regalloc(&n1, tmp.Type, nil)
-					Thearch.Gmove(&tmp, &n1)
-				}
-			} else if nl.Addable {
-				if !Isconst(nr, CTINT) {
-					var tmp Node
-					Tempname(&tmp, Types[TINT32])
-					p2 = Thearch.Cgenindex(nr, &tmp, bounded)
-					Regalloc(&n1, tmp.Type, nil)
-					Thearch.Gmove(&tmp, &n1)
-				}
-
-				if !Isconst(nl, CTSTR) {
-					Agenr(nl, &n3, res)
-				}
-			} else {
-				var tmp Node
-				Tempname(&tmp, Types[TINT32])
-				p2 = Thearch.Cgenindex(nr, &tmp, bounded)
-				nr = &tmp
-				if !Isconst(nl, CTSTR) {
-					Agenr(nl, &n3, res)
-				}
-				Regalloc(&n1, tmp.Type, nil)
-				Thearch.Gins(Thearch.Optoas(OAS, tmp.Type), &tmp, &n1)
-			}
-
-			// &a is in &n3 (allocated in res)
-			// i is in &n1 (if not constant)
-			// w is width
-
-			// constant index
-			if Isconst(nr, CTINT) {
-				if Isconst(nl, CTSTR) {
-					Fatal("constant string constant index")
-				}
-				v := uint64(Mpgetfix(nr.Val().U.(*Mpint)))
-				var n2 Node
-				if Isslice(nl.Type) || nl.Type.Etype == TSTRING {
-					if Debug['B'] == 0 && !n.Bounded {
-						n1 = n3
-						n1.Op = OINDREG
-						n1.Type = Types[Tptr]
-						n1.Xoffset = int64(Array_nel)
-						Nodconst(&n2, Types[TUINT32], int64(v))
-						p1 := Thearch.Ginscmp(OGT, Types[TUINT32], &n1, &n2, +1)
-						Ginscall(Panicindex, -1)
-						Patch(p1, Pc)
-					}
-
-					n1 = n3
-					n1.Op = OINDREG
-					n1.Type = Types[Tptr]
-					n1.Xoffset = int64(Array_array)
-					Thearch.Gmove(&n1, &n3)
-				}
-
-				Nodconst(&n2, Types[Tptr], int64(v*uint64(w)))
-				Thearch.Gins(Thearch.Optoas(OADD, Types[Tptr]), &n2, &n3)
-				*a = n3
-				break
-			}
-
-			var n2 Node
-			Regalloc(&n2, Types[TINT32], &n1) // i
-			Thearch.Gmove(&n1, &n2)
-			Regfree(&n1)
-
-			var n4 Node
-			if Debug['B'] == 0 && !n.Bounded {
-				// check bounds
-				if Isconst(nl, CTSTR) {
-					Nodconst(&n4, Types[TUINT32], int64(len(nl.Val().U.(string))))
-				} else if Isslice(nl.Type) || nl.Type.Etype == TSTRING {
-					n1 = n3
-					n1.Op = OINDREG
-					n1.Type = Types[Tptr]
-					n1.Xoffset = int64(Array_nel)
-					Regalloc(&n4, Types[TUINT32], nil)
-					Thearch.Gmove(&n1, &n4)
-				} else {
-					Nodconst(&n4, Types[TUINT32], nl.Type.Bound)
-				}
-				p1 := Thearch.Ginscmp(OLT, Types[TUINT32], &n2, &n4, +1)
-				if n4.Op == OREGISTER {
-					Regfree(&n4)
-				}
-				if p2 != nil {
-					Patch(p2, Pc)
-				}
-				Ginscall(Panicindex, -1)
-				Patch(p1, Pc)
-			}
-
-			if Isconst(nl, CTSTR) {
-				Regalloc(&n3, Types[Tptr], res)
-				p1 := Thearch.Gins(Thearch.Optoas(OAS, Types[Tptr]), nil, &n3)
-				Datastring(nl.Val().U.(string), &p1.From)
-				p1.From.Type = obj.TYPE_ADDR
-			} else if Isslice(nl.Type) || nl.Type.Etype == TSTRING {
-				n1 = n3
-				n1.Op = OINDREG
-				n1.Type = Types[Tptr]
-				n1.Xoffset = int64(Array_array)
-				Thearch.Gmove(&n1, &n3)
-			}
-
-			if w == 0 {
-				// nothing to do
-			} else if Thearch.AddIndex != nil && Thearch.AddIndex(&n2, int64(w), &n3) {
-				// done by back end
-			} else if w == 1 {
-				Thearch.Gins(Thearch.Optoas(OADD, Types[Tptr]), &n2, &n3)
-			} else {
-				if w&(w-1) == 0 {
-					// Power of 2.  Use shift.
-					Thearch.Ginscon(Thearch.Optoas(OLSH, Types[TUINT32]), int64(log2(uint64(w))), &n2)
-				} else {
-					// Not a power of 2.  Use multiply.
-					Regalloc(&n4, Types[TUINT32], nil)
-					Nodconst(&n1, Types[TUINT32], int64(w))
-					Thearch.Gmove(&n1, &n4)
-					Thearch.Gins(Thearch.Optoas(OMUL, Types[TUINT32]), &n4, &n2)
-					Regfree(&n4)
-				}
-				Thearch.Gins(Thearch.Optoas(OADD, Types[Tptr]), &n2, &n3)
-			}
-			*a = n3
-			Regfree(&n2)
-			break
-		}
-		if Ctxt.Arch.Thechar == '8' {
-			var p2 *obj.Prog // to be patched to panicindex.
-			w := uint32(n.Type.Width)
-			bounded := Debug['B'] != 0 || n.Bounded
-			var n3 Node
-			var tmp Node
-			var n1 Node
-			if nr.Addable {
-				// Generate &nl first, and move nr into register.
-				if !Isconst(nl, CTSTR) {
-					Igen(nl, &n3, res)
-				}
-				if !Isconst(nr, CTINT) {
-					p2 = Thearch.Igenindex(nr, &tmp, bounded)
-					Regalloc(&n1, tmp.Type, nil)
-					Thearch.Gmove(&tmp, &n1)
-				}
-			} else if nl.Addable {
-				// Generate nr first, and move &nl into register.
-				if !Isconst(nr, CTINT) {
-					p2 = Thearch.Igenindex(nr, &tmp, bounded)
-					Regalloc(&n1, tmp.Type, nil)
-					Thearch.Gmove(&tmp, &n1)
-				}
-
-				if !Isconst(nl, CTSTR) {
-					Igen(nl, &n3, res)
-				}
-			} else {
-				p2 = Thearch.Igenindex(nr, &tmp, bounded)
-				nr = &tmp
-				if !Isconst(nl, CTSTR) {
-					Igen(nl, &n3, res)
-				}
-				Regalloc(&n1, tmp.Type, nil)
-				Thearch.Gins(Thearch.Optoas(OAS, tmp.Type), &tmp, &n1)
-			}
-
-			// For fixed array we really want the pointer in n3.
-			var n2 Node
-			if Isfixedarray(nl.Type) {
-				Regalloc(&n2, Types[Tptr], &n3)
-				Agen(&n3, &n2)
-				Regfree(&n3)
-				n3 = n2
-			}
-
-			// &a[0] is in n3 (allocated in res)
-			// i is in n1 (if not constant)
-			// len(a) is in nlen (if needed)
-			// w is width
-
-			// constant index
-			if Isconst(nr, CTINT) {
-				if Isconst(nl, CTSTR) {
-					Fatal("constant string constant index") // front end should handle
-				}
-				v := uint64(Mpgetfix(nr.Val().U.(*Mpint)))
-				if Isslice(nl.Type) || nl.Type.Etype == TSTRING {
-					if Debug['B'] == 0 && !n.Bounded {
-						nlen := n3
-						nlen.Type = Types[TUINT32]
-						nlen.Xoffset += int64(Array_nel)
-						Nodconst(&n2, Types[TUINT32], int64(v))
-						p1 := Thearch.Ginscmp(OGT, Types[TUINT32], &nlen, &n2, +1)
-						Ginscall(Panicindex, -1)
-						Patch(p1, Pc)
-					}
-				}
-
-				// Load base pointer in n2 = n3.
-				Regalloc(&n2, Types[Tptr], &n3)
-
-				n3.Type = Types[Tptr]
-				n3.Xoffset += int64(Array_array)
-				Thearch.Gmove(&n3, &n2)
-				Regfree(&n3)
-				if v*uint64(w) != 0 {
-					Nodconst(&n1, Types[Tptr], int64(v*uint64(w)))
-					Thearch.Gins(Thearch.Optoas(OADD, Types[Tptr]), &n1, &n2)
-				}
-				*a = n2
-				break
-			}
-
-			// i is in register n1, extend to 32 bits.
-			t := Types[TUINT32]
-
-			if Issigned[n1.Type.Etype] {
-				t = Types[TINT32]
-			}
-
-			Regalloc(&n2, t, &n1) // i
-			Thearch.Gmove(&n1, &n2)
-			Regfree(&n1)
-
-			if Debug['B'] == 0 && !n.Bounded {
-				// check bounds
-				t := Types[TUINT32]
-
-				var nlen Node
-				if Isconst(nl, CTSTR) {
-					Nodconst(&nlen, t, int64(len(nl.Val().U.(string))))
-				} else if Isslice(nl.Type) || nl.Type.Etype == TSTRING {
-					nlen = n3
-					nlen.Type = t
-					nlen.Xoffset += int64(Array_nel)
-				} else {
-					Nodconst(&nlen, t, nl.Type.Bound)
-				}
-
-				p1 := Thearch.Ginscmp(OLT, t, &n2, &nlen, +1)
-				if p2 != nil {
-					Patch(p2, Pc)
-				}
-				Ginscall(Panicindex, -1)
-				Patch(p1, Pc)
-			}
-
-			if Isconst(nl, CTSTR) {
-				Regalloc(&n3, Types[Tptr], res)
-				p1 := Thearch.Gins(Thearch.Optoas(OAS, Types[Tptr]), nil, &n3)
-				Datastring(nl.Val().U.(string), &p1.From)
-				p1.From.Type = obj.TYPE_ADDR
-				Thearch.Gins(Thearch.Optoas(OADD, n3.Type), &n2, &n3)
-				goto indexdone1
-			}
-
-			// Load base pointer in n3.
-			Regalloc(&tmp, Types[Tptr], &n3)
-
-			if Isslice(nl.Type) || nl.Type.Etype == TSTRING {
-				n3.Type = Types[Tptr]
-				n3.Xoffset += int64(Array_array)
-				Thearch.Gmove(&n3, &tmp)
-			}
-
-			Regfree(&n3)
-			n3 = tmp
-
-			if w == 0 {
-				// nothing to do
-			} else if Thearch.AddIndex != nil && Thearch.AddIndex(&n2, int64(w), &n3) {
-				// done by back end
-			} else if w == 1 {
-				Thearch.Gins(Thearch.Optoas(OADD, Types[Tptr]), &n2, &n3)
-			} else {
-				if w&(w-1) == 0 {
-					// Power of 2.  Use shift.
-					Thearch.Ginscon(Thearch.Optoas(OLSH, Types[TUINT32]), int64(log2(uint64(w))), &n2)
-				} else {
-					// Not a power of 2.  Use multiply.
-					Thearch.Ginscon(Thearch.Optoas(OMUL, Types[TUINT32]), int64(w), &n2)
-				}
-				Thearch.Gins(Thearch.Optoas(OADD, Types[Tptr]), &n2, &n3)
-			}
-
-		indexdone1:
-			*a = n3
-			Regfree(&n2)
-			break
-		}
-
-		freelen := 0
-		w := uint64(n.Type.Width)
-
-		// Generate the non-addressable child first.
-		var n3 Node
-		var nlen Node
-		var tmp Node
-		var n1 Node
-		if nr.Addable {
-			goto irad
-		}
-		if nl.Addable {
-			Cgenr(nr, &n1, nil)
-			if !Isconst(nl, CTSTR) {
-				if Isfixedarray(nl.Type) {
-					Agenr(nl, &n3, res)
-				} else {
-					Igen(nl, &nlen, res)
-					freelen = 1
-					nlen.Type = Types[Tptr]
-					nlen.Xoffset += int64(Array_array)
-					Regalloc(&n3, Types[Tptr], res)
-					Thearch.Gmove(&nlen, &n3)
-					nlen.Type = Types[Simtype[TUINT]]
-					nlen.Xoffset += int64(Array_nel) - int64(Array_array)
-				}
-			}
-
-			goto index
-		}
-
-		Tempname(&tmp, nr.Type)
-		Cgen(nr, &tmp)
-		nr = &tmp
-
-	irad:
-		if !Isconst(nl, CTSTR) {
-			if Isfixedarray(nl.Type) {
-				Agenr(nl, &n3, res)
-			} else {
-				if !nl.Addable {
-					if res != nil && res.Op == OREGISTER { // give up res, which we don't need yet.
-						Regfree(res)
-					}
-
-					// igen will need an addressable node.
-					var tmp2 Node
-					Tempname(&tmp2, nl.Type)
-					Cgen(nl, &tmp2)
-					nl = &tmp2
-
-					if res != nil && res.Op == OREGISTER { // reacquire res
-						Regrealloc(res)
-					}
-				}
-
-				Igen(nl, &nlen, res)
-				freelen = 1
-				nlen.Type = Types[Tptr]
-				nlen.Xoffset += int64(Array_array)
-				Regalloc(&n3, Types[Tptr], res)
-				Thearch.Gmove(&nlen, &n3)
-				nlen.Type = Types[Simtype[TUINT]]
-				nlen.Xoffset += int64(Array_nel) - int64(Array_array)
-			}
-		}
-
-		if !Isconst(nr, CTINT) {
-			Cgenr(nr, &n1, nil)
-		}
-
-		goto index
-
-		// &a is in &n3 (allocated in res)
-		// i is in &n1 (if not constant)
-		// len(a) is in nlen (if needed)
-		// w is width
-
-		// constant index
-	index:
-		if Isconst(nr, CTINT) {
-			if Isconst(nl, CTSTR) {
-				Fatal("constant string constant index") // front end should handle
-			}
-			v := uint64(Mpgetfix(nr.Val().U.(*Mpint)))
-			if Isslice(nl.Type) || nl.Type.Etype == TSTRING {
-				if Debug['B'] == 0 && !n.Bounded {
-					p1 := Thearch.Ginscmp(OGT, Types[Simtype[TUINT]], &nlen, Nodintconst(int64(v)), +1)
-					Ginscall(Panicindex, -1)
-					Patch(p1, Pc)
-				}
-
-				Regfree(&nlen)
-			}
-
-			if v*w != 0 {
-				Thearch.Ginscon(Thearch.Optoas(OADD, Types[Tptr]), int64(v*w), &n3)
-			}
-			*a = n3
-			break
-		}
-
-		// type of the index
-		t := Types[TUINT64]
-
-		if Issigned[n1.Type.Etype] {
-			t = Types[TINT64]
-		}
-
-		var n2 Node
-		Regalloc(&n2, t, &n1) // i
-		Thearch.Gmove(&n1, &n2)
-		Regfree(&n1)
-
-		if Debug['B'] == 0 && !n.Bounded {
-			// check bounds
-			t = Types[Simtype[TUINT]]
-
-			if Is64(nr.Type) {
-				t = Types[TUINT64]
-			}
-			if Isconst(nl, CTSTR) {
-				Nodconst(&nlen, t, int64(len(nl.Val().U.(string))))
-			} else if Isslice(nl.Type) || nl.Type.Etype == TSTRING {
-				// nlen already initialized
-			} else {
-				Nodconst(&nlen, t, nl.Type.Bound)
-			}
-
-			p1 := Thearch.Ginscmp(OLT, t, &n2, &nlen, +1)
-			Ginscall(Panicindex, -1)
-			Patch(p1, Pc)
-		}
-
-		if Isconst(nl, CTSTR) {
-			Regalloc(&n3, Types[Tptr], res)
-			p1 := Thearch.Gins(Thearch.Optoas(OAS, n3.Type), nil, &n3) // XXX was LEAQ!
-			Datastring(nl.Val().U.(string), &p1.From)
-			p1.From.Type = obj.TYPE_ADDR
-			Thearch.Gins(Thearch.Optoas(OADD, n3.Type), &n2, &n3)
-			goto indexdone
-		}
-
-		if w == 0 {
-			// nothing to do
-		} else if Thearch.AddIndex != nil && Thearch.AddIndex(&n2, int64(w), &n3) {
-			// done by back end
-		} else if w == 1 {
-			Thearch.Gins(Thearch.Optoas(OADD, Types[Tptr]), &n2, &n3)
-		} else {
-			if w&(w-1) == 0 {
-				// Power of 2.  Use shift.
-				Thearch.Ginscon(Thearch.Optoas(OLSH, t), int64(log2(w)), &n2)
-			} else {
-				// Not a power of 2.  Use multiply.
-				Thearch.Ginscon(Thearch.Optoas(OMUL, t), int64(w), &n2)
-			}
-			Thearch.Gins(Thearch.Optoas(OADD, Types[Tptr]), &n2, &n3)
-		}
-
-	indexdone:
-		*a = n3
-		Regfree(&n2)
-		if freelen != 0 {
-			Regfree(&nlen)
-		}
-
-	default:
-		Regalloc(a, Types[Tptr], res)
-		Agen(n, a)
-	}
-}
-
-// log2 returns the logarithm base 2 of n.  n must be a power of 2.
-func log2(n uint64) int {
-	x := 0
-	for n>>uint(x) != 1 {
-		x++
-	}
-	return x
-}
-
-/*
- * generate:
- *	res = &n;
- * The generated code checks that the result is not nil.
- */
-func Agen(n *Node, res *Node) {
-	if Debug['g'] != 0 {
-		Dump("\nagen-res", res)
-		Dump("agen-r", n)
-	}
-
-	if n == nil || n.Type == nil {
-		return
-	}
-
-	for n.Op == OCONVNOP {
-		n = n.Left
-	}
-
-	if Isconst(n, CTNIL) && n.Type.Width > int64(Widthptr) {
-		// Use of a nil interface or nil slice.
-		// Create a temporary we can take the address of and read.
-		// The generated code is just going to panic, so it need not
-		// be terribly efficient. See issue 3670.
-		var n1 Node
-		Tempname(&n1, n.Type)
-
-		Gvardef(&n1)
-		Thearch.Clearfat(&n1)
-		var n2 Node
-		Regalloc(&n2, Types[Tptr], res)
-		var n3 Node
-		n3.Op = OADDR
-		n3.Left = &n1
-		Thearch.Gins(Thearch.Optoas(OAS, Types[Tptr]), &n3, &n2)
-		Thearch.Gmove(&n2, res)
-		Regfree(&n2)
-		return
-	}
-
-	if n.Op == OINDREG && n.Xoffset == 0 {
-		// Generate MOVW R0, R1 instead of MOVW $0(R0), R1.
-		// This allows better move propagation in the back ends
-		// (and maybe it helps the processor).
-		n1 := *n
-		n1.Op = OREGISTER
-		n1.Type = res.Type
-		Thearch.Gmove(&n1, res)
-		return
-	}
-
-	if n.Addable {
-		if n.Op == OREGISTER {
-			Fatal("agen OREGISTER")
-		}
-		var n1 Node
-		n1.Op = OADDR
-		n1.Left = n
-		var n2 Node
-		Regalloc(&n2, Types[Tptr], res)
-		Thearch.Gins(Thearch.Optoas(OAS, Types[Tptr]), &n1, &n2)
-		Thearch.Gmove(&n2, res)
-		Regfree(&n2)
-		return
-	}
-
-	nl := n.Left
-
-	switch n.Op {
-	default:
-		Fatal("agen: unknown op %v", Nconv(n, obj.FmtShort|obj.FmtSign))
-
-	case OCALLMETH:
-		cgen_callmeth(n, 0)
-		cgen_aret(n, res)
-
-	case OCALLINTER:
-		cgen_callinter(n, res, 0)
-		cgen_aret(n, res)
-
-	case OCALLFUNC:
-		cgen_call(n, 0)
-		cgen_aret(n, res)
-
-	case OEFACE, ODOTTYPE, OSLICE, OSLICEARR, OSLICESTR, OSLICE3, OSLICE3ARR:
-		var n1 Node
-		Tempname(&n1, n.Type)
-		Cgen(n, &n1)
-		Agen(&n1, res)
-
-	case OINDEX:
-		var n1 Node
-		Agenr(n, &n1, res)
-		Thearch.Gmove(&n1, res)
-		Regfree(&n1)
-
-	case ONAME:
-		// should only get here with names in this func.
-		if n.Name.Funcdepth > 0 && n.Name.Funcdepth != Funcdepth {
-			Dump("bad agen", n)
-			Fatal("agen: bad ONAME funcdepth %d != %d", n.Name.Funcdepth, Funcdepth)
-		}
-
-		// should only get here for heap vars or paramref
-		if n.Class&PHEAP == 0 && n.Class != PPARAMREF {
-			Dump("bad agen", n)
-			Fatal("agen: bad ONAME class %#x", n.Class)
-		}
-
-		Cgen(n.Name.Heapaddr, res)
-		if n.Xoffset != 0 {
-			addOffset(res, n.Xoffset)
-		}
-
-	case OIND:
-		Cgen(nl, res)
-		Cgen_checknil(res)
-
-	case ODOT:
-		Agen(nl, res)
-		if n.Xoffset != 0 {
-			addOffset(res, n.Xoffset)
-		}
-
-	case ODOTPTR:
-		Cgen(nl, res)
-		Cgen_checknil(res)
-		if n.Xoffset != 0 {
-			addOffset(res, n.Xoffset)
-		}
-	}
-}
-
-func addOffset(res *Node, offset int64) {
-	if Ctxt.Arch.Thechar == '6' || Ctxt.Arch.Thechar == '8' {
-		Thearch.Gins(Thearch.Optoas(OADD, Types[Tptr]), Nodintconst(offset), res)
-		return
-	}
-
-	var n1, n2 Node
-	Regalloc(&n1, Types[Tptr], nil)
-	Thearch.Gmove(res, &n1)
-	Regalloc(&n2, Types[Tptr], nil)
-	Thearch.Gins(Thearch.Optoas(OAS, Types[Tptr]), Nodintconst(offset), &n2)
-	Thearch.Gins(Thearch.Optoas(OADD, Types[Tptr]), &n2, &n1)
-	Thearch.Gmove(&n1, res)
-	Regfree(&n1)
-	Regfree(&n2)
-}
-
-// Igen computes the address &n, stores it in a register r,
-// and rewrites a to refer to *r. The chosen r may be the
-// stack pointer, it may be borrowed from res, or it may
-// be a newly allocated register. The caller must call Regfree(a)
-// to free r when the address is no longer needed.
-// The generated code ensures that &n is not nil.
-func Igen(n *Node, a *Node, res *Node) {
-	if Debug['g'] != 0 {
-		Dump("\nigen-n", n)
-	}
-
-	switch n.Op {
-	case ONAME:
-		if (n.Class&PHEAP != 0) || n.Class == PPARAMREF {
-			break
-		}
-		*a = *n
-		return
-
-	case OINDREG:
-		// Increase the refcount of the register so that igen's caller
-		// has to call Regfree.
-		if n.Reg != int16(Thearch.REGSP) {
-			reg[n.Reg-int16(Thearch.REGMIN)]++
-		}
-		*a = *n
-		return
-
-	case ODOT:
-		Igen(n.Left, a, res)
-		a.Xoffset += n.Xoffset
-		a.Type = n.Type
-		Fixlargeoffset(a)
-		return
-
-	case ODOTPTR:
-		Cgenr(n.Left, a, res)
-		Cgen_checknil(a)
-		a.Op = OINDREG
-		a.Xoffset += n.Xoffset
-		a.Type = n.Type
-		Fixlargeoffset(a)
-		return
-
-	case OCALLFUNC, OCALLMETH, OCALLINTER:
-		switch n.Op {
-		case OCALLFUNC:
-			cgen_call(n, 0)
-
-		case OCALLMETH:
-			cgen_callmeth(n, 0)
-
-		case OCALLINTER:
-			cgen_callinter(n, nil, 0)
-		}
-
-		var flist Iter
-		fp := Structfirst(&flist, Getoutarg(n.Left.Type))
-		*a = Node{}
-		a.Op = OINDREG
-		a.Reg = int16(Thearch.REGSP)
-		a.Addable = true
-		a.Xoffset = fp.Width
-		if HasLinkRegister() {
-			a.Xoffset += int64(Ctxt.Arch.Ptrsize)
-		}
-		a.Type = n.Type
-		return
-
-		// Index of fixed-size array by constant can
-	// put the offset in the addressing.
-	// Could do the same for slice except that we need
-	// to use the real index for the bounds checking.
-	case OINDEX:
-		if Isfixedarray(n.Left.Type) || (Isptr[n.Left.Type.Etype] && Isfixedarray(n.Left.Left.Type)) {
-			if Isconst(n.Right, CTINT) {
-				// Compute &a.
-				if !Isptr[n.Left.Type.Etype] {
-					Igen(n.Left, a, res)
-				} else {
-					var n1 Node
-					Igen(n.Left, &n1, res)
-					Cgen_checknil(&n1)
-					Regalloc(a, Types[Tptr], res)
-					Thearch.Gmove(&n1, a)
-					Regfree(&n1)
-					a.Op = OINDREG
-				}
-
-				// Compute &a[i] as &a + i*width.
-				a.Type = n.Type
-
-				a.Xoffset += Mpgetfix(n.Right.Val().U.(*Mpint)) * n.Type.Width
-				Fixlargeoffset(a)
-				return
-			}
-		}
-	}
-
-	Agenr(n, a, res)
-	a.Op = OINDREG
-	a.Type = n.Type
-}
-
-// Bgen generates code for branches:
-//
-// 	if n == wantTrue {
-// 		goto to
-// 	}
-func Bgen(n *Node, wantTrue bool, likely int, to *obj.Prog) {
-	bgenx(n, nil, wantTrue, likely, to)
-}
-
-// Bvgen generates code for calculating boolean values:
-// 	res = n == wantTrue
-func Bvgen(n, res *Node, wantTrue bool) {
-	if Thearch.Ginsboolval == nil {
-		// Direct value generation not implemented for this architecture.
-		// Implement using jumps.
-		bvgenjump(n, res, wantTrue, true)
-		return
-	}
-	bgenx(n, res, wantTrue, 0, nil)
-}
-
-// bvgenjump implements boolean value generation using jumps:
-// 	if n == wantTrue {
-// 		res = 1
-// 	} else {
-// 		res = 0
-// 	}
-// geninit controls whether n's Ninit is generated.
-func bvgenjump(n, res *Node, wantTrue, geninit bool) {
-	init := n.Ninit
-	if !geninit {
-		n.Ninit = nil
-	}
-	p1 := Gbranch(obj.AJMP, nil, 0)
-	p2 := Pc
-	Thearch.Gmove(Nodbool(true), res)
-	p3 := Gbranch(obj.AJMP, nil, 0)
-	Patch(p1, Pc)
-	Bgen(n, wantTrue, 0, p2)
-	Thearch.Gmove(Nodbool(false), res)
-	Patch(p3, Pc)
-	n.Ninit = init
-}
-
-// bgenx is the backend for Bgen and Bvgen.
-// If res is nil, it generates a branch.
-// Otherwise, it generates a boolean value.
-func bgenx(n, res *Node, wantTrue bool, likely int, to *obj.Prog) {
-	if Debug['g'] != 0 {
-		fmt.Printf("\nbgenx wantTrue=%t likely=%d to=%v\n", wantTrue, likely, to)
-		Dump("n", n)
-		Dump("res", res)
-	}
-
-	genval := res != nil
-
-	if n == nil {
-		n = Nodbool(true)
-	}
-
-	Genlist(n.Ninit)
-
-	if n.Type == nil {
-		Convlit(&n, Types[TBOOL])
-		if n.Type == nil {
-			return
-		}
-	}
-
-	if n.Type.Etype != TBOOL {
-		Fatal("bgen: bad type %v for %v", n.Type, Oconv(int(n.Op), 0))
-	}
-
-	for n.Op == OCONVNOP {
-		n = n.Left
-		Genlist(n.Ninit)
-	}
-
-	if Thearch.Bgen_float != nil && n.Left != nil && Isfloat[n.Left.Type.Etype] {
-		if genval {
-			bvgenjump(n, res, wantTrue, false)
-			return
-		}
-		Thearch.Bgen_float(n, wantTrue, likely, to)
-		return
-	}
-
-	switch n.Op {
-	default:
-		if genval {
-			Cgen(n, res)
-			if !wantTrue {
-				Thearch.Gins(Thearch.Optoas(OXOR, Types[TUINT8]), Nodintconst(1), res)
-			}
-			return
-		}
-
-		var tmp Node
-		Regalloc(&tmp, n.Type, nil)
-		Cgen(n, &tmp)
-		bgenNonZero(&tmp, nil, wantTrue, likely, to)
-		Regfree(&tmp)
-		return
-
-	case ONAME:
-		if genval {
-			// 5g, 7g, and 9g might need a temporary or other help here,
-			// but they don't support direct generation of a bool value yet.
-			// We can fix that as we go.
-			switch Ctxt.Arch.Thechar {
-			case '5', '7', '9':
-				Fatal("genval 5g, 7g, 9g ONAMES not fully implemented")
-			}
-			Cgen(n, res)
-			if !wantTrue {
-				Thearch.Gins(Thearch.Optoas(OXOR, Types[TUINT8]), Nodintconst(1), res)
-			}
-			return
-		}
-
-		if n.Addable && Ctxt.Arch.Thechar != '5' && Ctxt.Arch.Thechar != '7' && Ctxt.Arch.Thechar != '9' {
-			// no need for a temporary
-			bgenNonZero(n, nil, wantTrue, likely, to)
-			return
-		}
-		var tmp Node
-		Regalloc(&tmp, n.Type, nil)
-		Cgen(n, &tmp)
-		bgenNonZero(&tmp, nil, wantTrue, likely, to)
-		Regfree(&tmp)
-		return
-
-	case OLITERAL:
-		// n is a constant.
-		if !Isconst(n, CTBOOL) {
-			Fatal("bgen: non-bool const %v\n", Nconv(n, obj.FmtLong))
-		}
-		if genval {
-			Cgen(Nodbool(wantTrue == n.Val().U.(bool)), res)
-			return
-		}
-		// If n == wantTrue, jump; otherwise do nothing.
-		if wantTrue == n.Val().U.(bool) {
-			Patch(Gbranch(obj.AJMP, nil, likely), to)
-		}
-		return
-
-	case OANDAND, OOROR:
-		and := (n.Op == OANDAND) == wantTrue
-		if genval {
-			p1 := Gbranch(obj.AJMP, nil, 0)
-			p2 := Gbranch(obj.AJMP, nil, 0)
-			Patch(p2, Pc)
-			Cgen(Nodbool(!and), res)
-			p3 := Gbranch(obj.AJMP, nil, 0)
-			Patch(p1, Pc)
-			Bgen(n.Left, wantTrue != and, 0, p2)
-			Bvgen(n.Right, res, wantTrue)
-			Patch(p3, Pc)
-			return
-		}
-
-		if and {
-			p1 := Gbranch(obj.AJMP, nil, 0)
-			p2 := Gbranch(obj.AJMP, nil, 0)
-			Patch(p1, Pc)
-			Bgen(n.Left, !wantTrue, -likely, p2)
-			Bgen(n.Right, !wantTrue, -likely, p2)
-			p1 = Gbranch(obj.AJMP, nil, 0)
-			Patch(p1, to)
-			Patch(p2, Pc)
-		} else {
-			Bgen(n.Left, wantTrue, likely, to)
-			Bgen(n.Right, wantTrue, likely, to)
-		}
-		return
-
-	case ONOT: // unary
-		if n.Left == nil || n.Left.Type == nil {
-			return
-		}
-		bgenx(n.Left, res, !wantTrue, likely, to)
-		return
-
-	case OEQ, ONE, OLT, OGT, OLE, OGE:
-		if n.Left == nil || n.Left.Type == nil || n.Right == nil || n.Right.Type == nil {
-			return
-		}
-	}
-
-	// n.Op is one of OEQ, ONE, OLT, OGT, OLE, OGE
-	nl := n.Left
-	nr := n.Right
-	a := int(n.Op)
-
-	if !wantTrue {
-		if Isfloat[nr.Type.Etype] {
-			// Brcom is not valid on floats when NaN is involved.
-			ll := n.Ninit // avoid re-genning Ninit
-			n.Ninit = nil
-			if genval {
-				bgenx(n, res, true, likely, to)
-				Thearch.Gins(Thearch.Optoas(OXOR, Types[TUINT8]), Nodintconst(1), res) // res = !res
-				n.Ninit = ll
-				return
-			}
-			p1 := Gbranch(obj.AJMP, nil, 0)
-			p2 := Gbranch(obj.AJMP, nil, 0)
-			Patch(p1, Pc)
-			bgenx(n, res, true, -likely, p2)
-			Patch(Gbranch(obj.AJMP, nil, 0), to)
-			Patch(p2, Pc)
-			n.Ninit = ll
-			return
-		}
-
-		a = Brcom(a)
-	}
-	wantTrue = true
-
-	// make simplest on right
-	if nl.Op == OLITERAL || (nl.Ullman < nr.Ullman && nl.Ullman < UINF) {
-		a = Brrev(a)
-		nl, nr = nr, nl
-	}
-
-	if Isslice(nl.Type) || Isinter(nl.Type) {
-		// front end should only leave cmp to literal nil
-		if (a != OEQ && a != ONE) || nr.Op != OLITERAL {
-			if Isslice(nl.Type) {
-				Yyerror("illegal slice comparison")
-			} else {
-				Yyerror("illegal interface comparison")
-			}
-			return
-		}
-
-		var ptr Node
-		Igen(nl, &ptr, nil)
-		if Isslice(nl.Type) {
-			ptr.Xoffset += int64(Array_array)
-		}
-		ptr.Type = Types[Tptr]
-		var tmp Node
-		Regalloc(&tmp, ptr.Type, &ptr)
-		Cgen(&ptr, &tmp)
-		Regfree(&ptr)
-		bgenNonZero(&tmp, res, a == OEQ != wantTrue, likely, to)
-		Regfree(&tmp)
-		return
-	}
-
-	if Iscomplex[nl.Type.Etype] {
-		complexbool(a, nl, nr, res, wantTrue, likely, to)
-		return
-	}
-
-	if Ctxt.Arch.Regsize == 4 && Is64(nr.Type) {
-		if genval {
-			// TODO: Teach Cmp64 to generate boolean values and remove this.
-			bvgenjump(n, res, wantTrue, false)
-			return
-		}
-		if !nl.Addable || Isconst(nl, CTINT) {
-			nl = CgenTemp(nl)
-		}
-		if !nr.Addable {
-			nr = CgenTemp(nr)
-		}
-		Thearch.Cmp64(nl, nr, a, likely, to)
-		return
-	}
-
-	if nr.Ullman >= UINF {
-		var n1 Node
-		Regalloc(&n1, nl.Type, nil)
-		Cgen(nl, &n1)
-		nl = &n1
-
-		var tmp Node
-		Tempname(&tmp, nl.Type)
-		Thearch.Gmove(&n1, &tmp)
-		Regfree(&n1)
-
-		var n2 Node
-		Regalloc(&n2, nr.Type, nil)
-		Cgen(nr, &n2)
-		nr = &n2
-		Regfree(&n2)
-
-		Regalloc(&n1, nl.Type, nil)
-		Cgen(&tmp, &n1)
-		Regfree(&n1)
-	} else {
-		var n1 Node
-		if !nl.Addable && Ctxt.Arch.Thechar == '8' {
-			Tempname(&n1, nl.Type)
-		} else {
-			Regalloc(&n1, nl.Type, nil)
-			defer Regfree(&n1)
-		}
-		Cgen(nl, &n1)
-		nl = &n1
-
-		if Smallintconst(nr) && Ctxt.Arch.Thechar != '9' {
-			Thearch.Gins(Thearch.Optoas(OCMP, nr.Type), nl, nr)
-			bins(nr.Type, res, a, likely, to)
-			return
-		}
-
-		if !nr.Addable && Ctxt.Arch.Thechar == '8' {
-			nr = CgenTemp(nr)
-		}
-
-		var n2 Node
-		Regalloc(&n2, nr.Type, nil)
-		Cgen(nr, &n2)
-		nr = &n2
-		Regfree(&n2)
-	}
-
-	l, r := nl, nr
-
-	// On x86, only < and <= work right with NaN; reverse if needed
-	if Ctxt.Arch.Thechar == '6' && Isfloat[nl.Type.Etype] && (a == OGT || a == OGE) {
-		l, r = r, l
-		a = Brrev(a)
-	}
-
-	// Do the comparison.
-	Thearch.Gins(Thearch.Optoas(OCMP, nr.Type), l, r)
-
-	// Handle floating point special cases.
-	// Note that 8g has Bgen_float and is handled above.
-	if Isfloat[nl.Type.Etype] {
-		switch Ctxt.Arch.Thechar {
-		case '5':
-			if genval {
-				Fatal("genval 5g Isfloat special cases not implemented")
-			}
-			switch n.Op {
-			case ONE:
-				Patch(Gbranch(Thearch.Optoas(OPS, nr.Type), nr.Type, likely), to)
-				Patch(Gbranch(Thearch.Optoas(a, nr.Type), nr.Type, likely), to)
-			default:
-				p := Gbranch(Thearch.Optoas(OPS, nr.Type), nr.Type, -likely)
-				Patch(Gbranch(Thearch.Optoas(a, nr.Type), nr.Type, likely), to)
-				Patch(p, Pc)
-			}
-			return
-		case '6':
-			switch n.Op {
-			case OEQ:
-				// neither NE nor P
-				if genval {
-					var reg Node
-					Regalloc(&reg, Types[TBOOL], nil)
-					Thearch.Ginsboolval(Thearch.Optoas(OEQ, nr.Type), &reg)
-					Thearch.Ginsboolval(Thearch.Optoas(OPC, nr.Type), res)
-					Thearch.Gins(Thearch.Optoas(OAND, Types[TBOOL]), &reg, res)
-					Regfree(&reg)
-				} else {
-					p1 := Gbranch(Thearch.Optoas(ONE, nr.Type), nil, -likely)
-					p2 := Gbranch(Thearch.Optoas(OPS, nr.Type), nil, -likely)
-					Patch(Gbranch(obj.AJMP, nil, 0), to)
-					Patch(p1, Pc)
-					Patch(p2, Pc)
-				}
-				return
-			case ONE:
-				// either NE or P
-				if genval {
-					var reg Node
-					Regalloc(&reg, Types[TBOOL], nil)
-					Thearch.Ginsboolval(Thearch.Optoas(ONE, nr.Type), &reg)
-					Thearch.Ginsboolval(Thearch.Optoas(OPS, nr.Type), res)
-					Thearch.Gins(Thearch.Optoas(OOR, Types[TBOOL]), &reg, res)
-					Regfree(&reg)
-				} else {
-					Patch(Gbranch(Thearch.Optoas(ONE, nr.Type), nil, likely), to)
-					Patch(Gbranch(Thearch.Optoas(OPS, nr.Type), nil, likely), to)
-				}
-				return
-			}
-		case '7', '9':
-			if genval {
-				Fatal("genval 7g, 9g Isfloat special cases not implemented")
-			}
-			switch n.Op {
-			// On arm64 and ppc64, <= and >= mishandle NaN. Must decompose into < or > and =.
-			// TODO(josh): Convert a <= b to b > a instead?
-			case OLE, OGE:
-				if a == OLE {
-					a = OLT
-				} else {
-					a = OGT
-				}
-				Patch(Gbranch(Thearch.Optoas(a, nr.Type), nr.Type, likely), to)
-				Patch(Gbranch(Thearch.Optoas(OEQ, nr.Type), nr.Type, likely), to)
-				return
-			}
-		}
-	}
-
-	// Not a special case. Insert the conditional jump or value gen.
-	bins(nr.Type, res, a, likely, to)
-}
-
-func bgenNonZero(n, res *Node, wantTrue bool, likely int, to *obj.Prog) {
-	// TODO: Optimize on systems that can compare to zero easily.
-	a := ONE
-	if !wantTrue {
-		a = OEQ
-	}
-	var zero Node
-	Nodconst(&zero, n.Type, 0)
-	Thearch.Gins(Thearch.Optoas(OCMP, n.Type), n, &zero)
-	bins(n.Type, res, a, likely, to)
-}
-
-// bins inserts an instruction to handle the result of a compare.
-// If res is non-nil, it inserts appropriate value generation instructions.
-// If res is nil, it inserts a branch to to.
-func bins(typ *Type, res *Node, a, likely int, to *obj.Prog) {
-	a = Thearch.Optoas(a, typ)
-	if res != nil {
-		// value gen
-		Thearch.Ginsboolval(a, res)
-	} else {
-		// jump
-		Patch(Gbranch(a, typ, likely), to)
-	}
-}
-
-// stkof returns n's offset from SP if n is on the stack
-// (either a local variable or the return value from a function call
-// or the arguments to a function call).
-// If n is not on the stack, stkof returns -1000.
-// If n is on the stack but in an unknown location
-// (due to array index arithmetic), stkof returns +1000.
-//
-// NOTE(rsc): It is possible that the ODOT and OINDEX cases
-// are not relevant here, since it shouldn't be possible for them
-// to be involved in an overlapping copy. Only function results
-// from one call and the arguments to the next can overlap in
-// any non-trivial way. If they can be dropped, then this function
-// becomes much simpler and also more trustworthy.
-// The fact that it works at all today is probably due to the fact
-// that ODOT and OINDEX are irrelevant.
-func stkof(n *Node) int64 {
-	switch n.Op {
-	case OINDREG:
-		if n.Reg != int16(Thearch.REGSP) {
-			return -1000 // not on stack
-		}
-		return n.Xoffset
-
-	case ODOT:
-		t := n.Left.Type
-		if Isptr[t.Etype] {
-			break
-		}
-		off := stkof(n.Left)
-		if off == -1000 || off == +1000 {
-			return off
-		}
-		return off + n.Xoffset
-
-	case OINDEX:
-		t := n.Left.Type
-		if !Isfixedarray(t) {
-			break
-		}
-		off := stkof(n.Left)
-		if off == -1000 || off == +1000 {
-			return off
-		}
-		if Isconst(n.Right, CTINT) {
-			return off + t.Type.Width*Mpgetfix(n.Right.Val().U.(*Mpint))
-		}
-		return +1000 // on stack but not sure exactly where
-
-	case OCALLMETH, OCALLINTER, OCALLFUNC:
-		t := n.Left.Type
-		if Isptr[t.Etype] {
-			t = t.Type
-		}
-
-		var flist Iter
-		t = Structfirst(&flist, Getoutarg(t))
-		if t != nil {
-			w := t.Width
-			if HasLinkRegister() {
-				w += int64(Ctxt.Arch.Ptrsize)
-			}
-			return w
-		}
-	}
-
-	// botch - probably failing to recognize address
-	// arithmetic on the above. eg INDEX and DOT
-	return -1000 // not on stack
-}
-
-/*
- * block copy:
- *	memmove(&ns, &n, w);
- * if wb is true, needs write barrier.
- */
-func sgen_wb(n *Node, ns *Node, w int64, wb bool) {
-	if Debug['g'] != 0 {
-		op := "sgen"
-		if wb {
-			op = "sgen-wb"
-		}
-		fmt.Printf("\n%s w=%d\n", op, w)
-		Dump("r", n)
-		Dump("res", ns)
-	}
-
-	if n.Ullman >= UINF && ns.Ullman >= UINF {
-		Fatal("sgen UINF")
-	}
-
-	if w < 0 {
-		Fatal("sgen copy %d", w)
-	}
-
-	// If copying .args, that's all the results, so record definition sites
-	// for them for the liveness analysis.
-	if ns.Op == ONAME && ns.Sym.Name == ".args" {
-		for l := Curfn.Func.Dcl; l != nil; l = l.Next {
-			if l.N.Class == PPARAMOUT {
-				Gvardef(l.N)
-			}
-		}
-	}
-
-	// Avoid taking the address for simple enough types.
-	if componentgen_wb(n, ns, wb) {
-		return
-	}
-
-	if w == 0 {
-		// evaluate side effects only
-		var nodr Node
-		Regalloc(&nodr, Types[Tptr], nil)
-		Agen(ns, &nodr)
-		Agen(n, &nodr)
-		Regfree(&nodr)
-		return
-	}
-
-	// offset on the stack
-	osrc := stkof(n)
-	odst := stkof(ns)
-
-	if odst != -1000 {
-		// on stack, write barrier not needed after all
-		wb = false
-	}
-
-	if osrc != -1000 && odst != -1000 && (osrc == 1000 || odst == 1000) || wb && osrc != -1000 {
-		// osrc and odst both on stack, and at least one is in
-		// an unknown position.  Could generate code to test
-		// for forward/backward copy, but instead just copy
-		// to a temporary location first.
-		//
-		// OR: write barrier needed and source is on stack.
-		// Invoking the write barrier will use the stack to prepare its call.
-		// Copy to temporary.
-		var tmp Node
-		Tempname(&tmp, n.Type)
-		sgen_wb(n, &tmp, w, false)
-		sgen_wb(&tmp, ns, w, wb)
-		return
-	}
-
-	if wb {
-		cgen_wbfat(n, ns)
-		return
-	}
-
-	Thearch.Blockcopy(n, ns, osrc, odst, w)
-}
-
-/*
- * generate:
- *	call f
- *	proc=-1	normal call but no return
- *	proc=0	normal call
- *	proc=1	goroutine run in new proc
- *	proc=2	defer call save away stack
-  *	proc=3	normal call to C pointer (not Go func value)
-*/
-func Ginscall(f *Node, proc int) {
-	if f.Type != nil {
-		extra := int32(0)
-		if proc == 1 || proc == 2 {
-			extra = 2 * int32(Widthptr)
-		}
-		Setmaxarg(f.Type, extra)
-	}
-
-	switch proc {
-	default:
-		Fatal("Ginscall: bad proc %d", proc)
-
-	case 0, // normal call
-		-1: // normal call but no return
-		if f.Op == ONAME && f.Class == PFUNC {
-			if f == Deferreturn {
-				// Deferred calls will appear to be returning to
-				// the CALL deferreturn(SB) that we are about to emit.
-				// However, the stack trace code will show the line
-				// of the instruction byte before the return PC.
-				// To avoid that being an unrelated instruction,
-				// insert an actual hardware NOP that will have the right line number.
-				// This is different from obj.ANOP, which is a virtual no-op
-				// that doesn't make it into the instruction stream.
-				Thearch.Ginsnop()
-			}
-
-			p := Thearch.Gins(obj.ACALL, nil, f)
-			Afunclit(&p.To, f)
-			if proc == -1 || Noreturn(p) {
-				Thearch.Gins(obj.AUNDEF, nil, nil)
-			}
-			break
-		}
-
-		var reg Node
-		Nodreg(&reg, Types[Tptr], Thearch.REGCTXT)
-		var r1 Node
-		Nodreg(&r1, Types[Tptr], Thearch.REGCALLX)
-		Thearch.Gmove(f, &reg)
-		reg.Op = OINDREG
-		Thearch.Gmove(&reg, &r1)
-		reg.Op = OREGISTER
-		Thearch.Gins(obj.ACALL, &reg, &r1)
-
-	case 3: // normal call of c function pointer
-		Thearch.Gins(obj.ACALL, nil, f)
-
-	case 1, // call in new proc (go)
-		2: // deferred call (defer)
-		var stk Node
-
-		// size of arguments at 0(SP)
-		stk.Op = OINDREG
-		stk.Reg = int16(Thearch.REGSP)
-		stk.Xoffset = 0
-		if HasLinkRegister() {
-			stk.Xoffset += int64(Ctxt.Arch.Ptrsize)
-		}
-		Thearch.Ginscon(Thearch.Optoas(OAS, Types[TINT32]), int64(Argsize(f.Type)), &stk)
-
-		// FuncVal* at 8(SP)
-		stk.Xoffset = int64(Widthptr)
-		if HasLinkRegister() {
-			stk.Xoffset += int64(Ctxt.Arch.Ptrsize)
-		}
-
-		var reg Node
-		Nodreg(&reg, Types[Tptr], Thearch.REGCALLX2)
-		Thearch.Gmove(f, &reg)
-		Thearch.Gins(Thearch.Optoas(OAS, Types[Tptr]), &reg, &stk)
-
-		if proc == 1 {
-			Ginscall(Newproc, 0)
-		} else {
-			if Hasdefer == 0 {
-				Fatal("hasdefer=0 but has defer")
-			}
-			Ginscall(Deferproc, 0)
-		}
-
-		if proc == 2 {
-			Nodreg(&reg, Types[TINT32], Thearch.REGRETURN)
-			p := Thearch.Ginscmp(OEQ, Types[TINT32], &reg, Nodintconst(0), +1)
-			cgen_ret(nil)
-			Patch(p, Pc)
-		}
-	}
-}
-
-/*
- * n is call to interface method.
- * generate res = n.
- */
-func cgen_callinter(n *Node, res *Node, proc int) {
-	i := n.Left
-	if i.Op != ODOTINTER {
-		Fatal("cgen_callinter: not ODOTINTER %v", Oconv(int(i.Op), 0))
-	}
-
-	f := i.Right // field
-	if f.Op != ONAME {
-		Fatal("cgen_callinter: not ONAME %v", Oconv(int(f.Op), 0))
-	}
-
-	i = i.Left // interface
-
-	if !i.Addable {
-		var tmpi Node
-		Tempname(&tmpi, i.Type)
-		Cgen(i, &tmpi)
-		i = &tmpi
-	}
-
-	Genlist(n.List) // assign the args
-
-	// i is now addable, prepare an indirected
-	// register to hold its address.
-	var nodi Node
-	Igen(i, &nodi, res) // REG = &inter
-
-	var nodsp Node
-	Nodindreg(&nodsp, Types[Tptr], Thearch.REGSP)
-	nodsp.Xoffset = 0
-	if HasLinkRegister() {
-		nodsp.Xoffset += int64(Ctxt.Arch.Ptrsize)
-	}
-	if proc != 0 {
-		nodsp.Xoffset += 2 * int64(Widthptr) // leave room for size & fn
-	}
-	nodi.Type = Types[Tptr]
-	nodi.Xoffset += int64(Widthptr)
-	Cgen(&nodi, &nodsp) // {0, 8(nacl), or 16}(SP) = 8(REG) -- i.data
-
-	var nodo Node
-	Regalloc(&nodo, Types[Tptr], res)
-
-	nodi.Type = Types[Tptr]
-	nodi.Xoffset -= int64(Widthptr)
-	Cgen(&nodi, &nodo) // REG = 0(REG) -- i.tab
-	Regfree(&nodi)
-
-	var nodr Node
-	Regalloc(&nodr, Types[Tptr], &nodo)
-	if n.Left.Xoffset == BADWIDTH {
-		Fatal("cgen_callinter: badwidth")
-	}
-	Cgen_checknil(&nodo) // in case offset is huge
-	nodo.Op = OINDREG
-	nodo.Xoffset = n.Left.Xoffset + 3*int64(Widthptr) + 8
-	if proc == 0 {
-		// plain call: use direct c function pointer - more efficient
-		Cgen(&nodo, &nodr) // REG = 32+offset(REG) -- i.tab->fun[f]
-		proc = 3
-	} else {
-		// go/defer. generate go func value.
-		Agen(&nodo, &nodr) // REG = &(32+offset(REG)) -- i.tab->fun[f]
-	}
-
-	nodr.Type = n.Left.Type
-	Ginscall(&nodr, proc)
-
-	Regfree(&nodr)
-	Regfree(&nodo)
-}
-
-/*
- * generate function call;
- *	proc=0	normal call
- *	proc=1	goroutine run in new proc
- *	proc=2	defer call save away stack
- */
-func cgen_call(n *Node, proc int) {
-	if n == nil {
-		return
-	}
-
-	var afun Node
-	if n.Left.Ullman >= UINF {
-		// if name involves a fn call
-		// precompute the address of the fn
-		Tempname(&afun, Types[Tptr])
-
-		Cgen(n.Left, &afun)
-	}
-
-	Genlist(n.List) // assign the args
-	t := n.Left.Type
-
-	// call tempname pointer
-	if n.Left.Ullman >= UINF {
-		var nod Node
-		Regalloc(&nod, Types[Tptr], nil)
-		Cgen_as(&nod, &afun)
-		nod.Type = t
-		Ginscall(&nod, proc)
-		Regfree(&nod)
-		return
-	}
-
-	// call pointer
-	if n.Left.Op != ONAME || n.Left.Class != PFUNC {
-		var nod Node
-		Regalloc(&nod, Types[Tptr], nil)
-		Cgen_as(&nod, n.Left)
-		nod.Type = t
-		Ginscall(&nod, proc)
-		Regfree(&nod)
-		return
-	}
-
-	// call direct
-	n.Left.Name.Method = true
-
-	Ginscall(n.Left, proc)
-}
-
-func HasLinkRegister() bool {
-	c := Ctxt.Arch.Thechar
-	return c != '6' && c != '8'
-}
-
-/*
- * call to n has already been generated.
- * generate:
- *	res = return value from call.
- */
-func cgen_callret(n *Node, res *Node) {
-	t := n.Left.Type
-	if t.Etype == TPTR32 || t.Etype == TPTR64 {
-		t = t.Type
-	}
-
-	var flist Iter
-	fp := Structfirst(&flist, Getoutarg(t))
-	if fp == nil {
-		Fatal("cgen_callret: nil")
-	}
-
-	var nod Node
-	nod.Op = OINDREG
-	nod.Reg = int16(Thearch.REGSP)
-	nod.Addable = true
-
-	nod.Xoffset = fp.Width
-	if HasLinkRegister() {
-		nod.Xoffset += int64(Ctxt.Arch.Ptrsize)
-	}
-	nod.Type = fp.Type
-	Cgen_as(res, &nod)
-}
-
-/*
- * call to n has already been generated.
- * generate:
- *	res = &return value from call.
- */
-func cgen_aret(n *Node, res *Node) {
-	t := n.Left.Type
-	if Isptr[t.Etype] {
-		t = t.Type
-	}
-
-	var flist Iter
-	fp := Structfirst(&flist, Getoutarg(t))
-	if fp == nil {
-		Fatal("cgen_aret: nil")
-	}
-
-	var nod1 Node
-	nod1.Op = OINDREG
-	nod1.Reg = int16(Thearch.REGSP)
-	nod1.Addable = true
-	nod1.Xoffset = fp.Width
-	if HasLinkRegister() {
-		nod1.Xoffset += int64(Ctxt.Arch.Ptrsize)
-	}
-	nod1.Type = fp.Type
-
-	if res.Op != OREGISTER {
-		var nod2 Node
-		Regalloc(&nod2, Types[Tptr], res)
-		Agen(&nod1, &nod2)
-		Thearch.Gins(Thearch.Optoas(OAS, Types[Tptr]), &nod2, res)
-		Regfree(&nod2)
-	} else {
-		Agen(&nod1, res)
-	}
-}
-
-/*
- * generate return.
- * n->left is assignments to return values.
- */
-func cgen_ret(n *Node) {
-	if n != nil {
-		Genlist(n.List) // copy out args
-	}
-	if Hasdefer != 0 {
-		Ginscall(Deferreturn, 0)
-	}
-	Genlist(Curfn.Func.Exit)
-	p := Thearch.Gins(obj.ARET, nil, nil)
-	if n != nil && n.Op == ORETJMP {
-		p.To.Type = obj.TYPE_MEM
-		p.To.Name = obj.NAME_EXTERN
-		p.To.Sym = Linksym(n.Left.Sym)
-	}
-}
-
-/*
- * generate division according to op, one of:
- *	res = nl / nr
- *	res = nl % nr
- */
-func cgen_div(op int, nl *Node, nr *Node, res *Node) {
-	var w int
-
-	// TODO(rsc): arm64 needs to support the relevant instructions
-	// in peep and optoas in order to enable this.
-	// TODO(rsc): ppc64 needs to support the relevant instructions
-	// in peep and optoas in order to enable this.
-	if nr.Op != OLITERAL || Ctxt.Arch.Thechar == '7' || Ctxt.Arch.Thechar == '9' {
-		goto longdiv
-	}
-	w = int(nl.Type.Width * 8)
-
-	// Front end handled 32-bit division. We only need to handle 64-bit.
-	// try to do division by multiply by (2^w)/d
-	// see hacker's delight chapter 10
-	switch Simtype[nl.Type.Etype] {
-	default:
-		goto longdiv
-
-	case TUINT64:
-		var m Magic
-		m.W = w
-		m.Ud = uint64(Mpgetfix(nr.Val().U.(*Mpint)))
-		Umagic(&m)
-		if m.Bad != 0 {
-			break
-		}
-		if op == OMOD {
-			goto longmod
-		}
-
-		var n1 Node
-		Cgenr(nl, &n1, nil)
-		var n2 Node
-		Nodconst(&n2, nl.Type, int64(m.Um))
-		var n3 Node
-		Regalloc(&n3, nl.Type, res)
-		Thearch.Cgen_hmul(&n1, &n2, &n3)
-
-		if m.Ua != 0 {
-			// need to add numerator accounting for overflow
-			Thearch.Gins(Thearch.Optoas(OADD, nl.Type), &n1, &n3)
-
-			Nodconst(&n2, nl.Type, 1)
-			Thearch.Gins(Thearch.Optoas(ORROTC, nl.Type), &n2, &n3)
-			Nodconst(&n2, nl.Type, int64(m.S)-1)
-			Thearch.Gins(Thearch.Optoas(ORSH, nl.Type), &n2, &n3)
-		} else {
-			Nodconst(&n2, nl.Type, int64(m.S))
-			Thearch.Gins(Thearch.Optoas(ORSH, nl.Type), &n2, &n3) // shift dx
-		}
-
-		Thearch.Gmove(&n3, res)
-		Regfree(&n1)
-		Regfree(&n3)
-		return
-
-	case TINT64:
-		var m Magic
-		m.W = w
-		m.Sd = Mpgetfix(nr.Val().U.(*Mpint))
-		Smagic(&m)
-		if m.Bad != 0 {
-			break
-		}
-		if op == OMOD {
-			goto longmod
-		}
-
-		var n1 Node
-		Cgenr(nl, &n1, res)
-		var n2 Node
-		Nodconst(&n2, nl.Type, m.Sm)
-		var n3 Node
-		Regalloc(&n3, nl.Type, nil)
-		Thearch.Cgen_hmul(&n1, &n2, &n3)
-
-		if m.Sm < 0 {
-			// need to add numerator
-			Thearch.Gins(Thearch.Optoas(OADD, nl.Type), &n1, &n3)
-		}
-
-		Nodconst(&n2, nl.Type, int64(m.S))
-		Thearch.Gins(Thearch.Optoas(ORSH, nl.Type), &n2, &n3) // shift n3
-
-		Nodconst(&n2, nl.Type, int64(w)-1)
-
-		Thearch.Gins(Thearch.Optoas(ORSH, nl.Type), &n2, &n1) // -1 iff num is neg
-		Thearch.Gins(Thearch.Optoas(OSUB, nl.Type), &n1, &n3) // added
-
-		if m.Sd < 0 {
-			// this could probably be removed
-			// by factoring it into the multiplier
-			Thearch.Gins(Thearch.Optoas(OMINUS, nl.Type), nil, &n3)
-		}
-
-		Thearch.Gmove(&n3, res)
-		Regfree(&n1)
-		Regfree(&n3)
-		return
-	}
-
-	goto longdiv
-
-	// division and mod using (slow) hardware instruction
-longdiv:
-	Thearch.Dodiv(op, nl, nr, res)
-
-	return
-
-	// mod using formula A%B = A-(A/B*B) but
-	// we know that there is a fast algorithm for A/B
-longmod:
-	var n1 Node
-	Regalloc(&n1, nl.Type, res)
-
-	Cgen(nl, &n1)
-	var n2 Node
-	Regalloc(&n2, nl.Type, nil)
-	cgen_div(ODIV, &n1, nr, &n2)
-	a := Thearch.Optoas(OMUL, nl.Type)
-	if w == 8 {
-		// use 2-operand 16-bit multiply
-		// because there is no 2-operand 8-bit multiply
-		a = Thearch.Optoas(OMUL, Types[TINT16]) // XXX was IMULW
-	}
-
-	if !Smallintconst(nr) {
-		var n3 Node
-		Regalloc(&n3, nl.Type, nil)
-		Cgen(nr, &n3)
-		Thearch.Gins(a, &n3, &n2)
-		Regfree(&n3)
-	} else {
-		Thearch.Gins(a, nr, &n2)
-	}
-	Thearch.Gins(Thearch.Optoas(OSUB, nl.Type), &n2, &n1)
-	Thearch.Gmove(&n1, res)
-	Regfree(&n1)
-	Regfree(&n2)
-}
-
-func Fixlargeoffset(n *Node) {
-	if n == nil {
-		return
-	}
-	if n.Op != OINDREG {
-		return
-	}
-	if n.Reg == int16(Thearch.REGSP) { // stack offset cannot be large
-		return
-	}
-	if n.Xoffset != int64(int32(n.Xoffset)) {
-		// offset too large, add to register instead.
-		a := *n
-
-		a.Op = OREGISTER
-		a.Type = Types[Tptr]
-		a.Xoffset = 0
-		Cgen_checknil(&a)
-		Thearch.Ginscon(Thearch.Optoas(OADD, Types[Tptr]), n.Xoffset, &a)
-		n.Xoffset = 0
-	}
-}
-
-func cgen_append(n, res *Node) {
-	if Debug['g'] != 0 {
-		Dump("cgen_append-n", n)
-		Dump("cgen_append-res", res)
-	}
-	if res.Op != ONAME && !samesafeexpr(res, n.List.N) {
-		Dump("cgen_append-n", n)
-		Dump("cgen_append-res", res)
-		Fatal("append not lowered")
-	}
-	for l := n.List; l != nil; l = l.Next {
-		if l.N.Ullman >= UINF {
-			Fatal("append with function call arguments")
-		}
-	}
-
-	// res = append(src, x, y, z)
-	//
-	// If res and src are the same, we can avoid writing to base and cap
-	// unless we grow the underlying array.
-	needFullUpdate := !samesafeexpr(res, n.List.N)
-
-	// Copy src triple into base, len, cap.
-	base := temp(Types[Tptr])
-	len := temp(Types[TUINT])
-	cap := temp(Types[TUINT])
-
-	var src Node
-	Igen(n.List.N, &src, nil)
-	src.Type = Types[Tptr]
-	Thearch.Gmove(&src, base)
-	src.Type = Types[TUINT]
-	src.Xoffset += int64(Widthptr)
-	Thearch.Gmove(&src, len)
-	src.Xoffset += int64(Widthptr)
-	Thearch.Gmove(&src, cap)
-
-	// if len+argc <= cap goto L1
-	var rlen Node
-	Regalloc(&rlen, Types[TUINT], nil)
-	Thearch.Gmove(len, &rlen)
-	Thearch.Ginscon(Thearch.Optoas(OADD, Types[TUINT]), int64(count(n.List)-1), &rlen)
-	p := Thearch.Ginscmp(OLE, Types[TUINT], &rlen, cap, +1)
-	// Note: rlen and src are Regrealloc'ed below at the target of the
-	// branch we just emitted; do not reuse these Go variables for
-	// other purposes. They need to still describe the same things
-	// below that they describe right here.
-	Regfree(&src)
-
-	// base, len, cap = growslice(type, base, len, cap, newlen)
-	var arg Node
-	arg.Op = OINDREG
-	arg.Reg = int16(Thearch.REGSP)
-	arg.Addable = true
-	arg.Xoffset = 0
-	if HasLinkRegister() {
-		arg.Xoffset = int64(Ctxt.Arch.Ptrsize)
-	}
-	arg.Type = Ptrto(Types[TUINT8])
-	Cgen(typename(res.Type), &arg)
-	arg.Xoffset += int64(Widthptr)
-
-	arg.Type = Types[Tptr]
-	Cgen(base, &arg)
-	arg.Xoffset += int64(Widthptr)
-
-	arg.Type = Types[TUINT]
-	Cgen(len, &arg)
-	arg.Xoffset += int64(Widthptr)
-
-	arg.Type = Types[TUINT]
-	Cgen(cap, &arg)
-	arg.Xoffset += int64(Widthptr)
-
-	arg.Type = Types[TUINT]
-	Cgen(&rlen, &arg)
-	arg.Xoffset += int64(Widthptr)
-	Regfree(&rlen)
-
-	fn := syslook("growslice", 1)
-	substArgTypes(fn, res.Type.Type, res.Type.Type)
-	Ginscall(fn, 0)
-
-	if Widthptr == 4 && Widthreg == 8 {
-		arg.Xoffset += 4
-	}
-
-	arg.Type = Types[Tptr]
-	Cgen(&arg, base)
-	arg.Xoffset += int64(Widthptr)
-
-	arg.Type = Types[TUINT]
-	Cgen(&arg, len)
-	arg.Xoffset += int64(Widthptr)
-
-	arg.Type = Types[TUINT]
-	Cgen(&arg, cap)
-
-	// Update res with base, len+argc, cap.
-	if needFullUpdate {
-		if Debug_append > 0 {
-			Warn("append: full update")
-		}
-		Patch(p, Pc)
-	}
-	if res.Op == ONAME {
-		Gvardef(res)
-	}
-	var dst, r1 Node
-	Igen(res, &dst, nil)
-	dst.Type = Types[TUINT]
-	dst.Xoffset += int64(Widthptr)
-	Regalloc(&r1, Types[TUINT], nil)
-	Thearch.Gmove(len, &r1)
-	Thearch.Ginscon(Thearch.Optoas(OADD, Types[TUINT]), int64(count(n.List)-1), &r1)
-	Thearch.Gmove(&r1, &dst)
-	Regfree(&r1)
-	dst.Xoffset += int64(Widthptr)
-	Thearch.Gmove(cap, &dst)
-	dst.Type = Types[Tptr]
-	dst.Xoffset -= 2 * int64(Widthptr)
-	cgen_wb(base, &dst, needwritebarrier(&dst, base))
-	Regfree(&dst)
-
-	if !needFullUpdate {
-		if Debug_append > 0 {
-			Warn("append: len-only update")
-		}
-		// goto L2;
-		// L1:
-		//	update len only
-		// L2:
-		q := Gbranch(obj.AJMP, nil, 0)
-		Patch(p, Pc)
-		// At the goto above, src refers to cap and rlen holds the new len
-		if src.Op == OREGISTER || src.Op == OINDREG {
-			Regrealloc(&src)
-		}
-		Regrealloc(&rlen)
-		src.Xoffset -= int64(Widthptr)
-		Thearch.Gmove(&rlen, &src)
-		Regfree(&src)
-		Regfree(&rlen)
-		Patch(q, Pc)
-	}
-
-	// Copy data into place.
-	// Could do write barrier check around entire copy instead of each element.
-	// Could avoid reloading registers on each iteration if we know the cgen_wb
-	// is not going to use a write barrier.
-	i := 0
-	var r2 Node
-	for l := n.List.Next; l != nil; l = l.Next {
-		Regalloc(&r1, Types[Tptr], nil)
-		Thearch.Gmove(base, &r1)
-		Regalloc(&r2, Types[TUINT], nil)
-		Thearch.Gmove(len, &r2)
-		if i > 0 {
-			Thearch.Gins(Thearch.Optoas(OADD, Types[TUINT]), Nodintconst(int64(i)), &r2)
-		}
-		w := res.Type.Type.Width
-		if Thearch.AddIndex != nil && Thearch.AddIndex(&r2, w, &r1) {
-			// r1 updated by back end
-		} else if w == 1 {
-			Thearch.Gins(Thearch.Optoas(OADD, Types[Tptr]), &r2, &r1)
-		} else {
-			Thearch.Ginscon(Thearch.Optoas(OMUL, Types[TUINT]), int64(w), &r2)
-			Thearch.Gins(Thearch.Optoas(OADD, Types[Tptr]), &r2, &r1)
-		}
-		Regfree(&r2)
-
-		r1.Op = OINDREG
-		r1.Type = res.Type.Type
-		cgen_wb(l.N, &r1, needwritebarrier(&r1, l.N))
-		Regfree(&r1)
-		i++
-	}
-}
-
-// Generate res = n, where n is x[i:j] or x[i:j:k].
-// If wb is true, need write barrier updating res's base pointer.
-// On systems with 32-bit ints, i, j, k are guaranteed to be 32-bit values.
-func cgen_slice(n, res *Node, wb bool) {
-	if Debug['g'] != 0 {
-		Dump("cgen_slice-n", n)
-		Dump("cgen_slice-res", res)
-	}
-
-	needFullUpdate := !samesafeexpr(n.Left, res)
-
-	// orderexpr has made sure that x is safe (but possibly expensive)
-	// and i, j, k are cheap. On a system with registers (anything but 386)
-	// we can evaluate x first and then know we have enough registers
-	// for i, j, k as well.
-	var x, xbase, xlen, xcap, i, j, k Node
-	if n.Op != OSLICEARR && n.Op != OSLICE3ARR {
-		Igen(n.Left, &x, nil)
-	}
-
-	indexRegType := Types[TUINT]
-	if Widthreg > Widthptr { // amd64p32
-		indexRegType = Types[TUINT64]
-	}
-
-	// On most systems, we use registers.
-	// The 386 has basically no registers, so substitute functions
-	// that can work with temporaries instead.
-	regalloc := Regalloc
-	ginscon := Thearch.Ginscon
-	gins := Thearch.Gins
-	if Thearch.Thechar == '8' {
-		regalloc = func(n *Node, t *Type, reuse *Node) {
-			Tempname(n, t)
-		}
-		ginscon = func(as int, c int64, n *Node) {
-			var n1 Node
-			Regalloc(&n1, n.Type, n)
-			Thearch.Gmove(n, &n1)
-			Thearch.Ginscon(as, c, &n1)
-			Thearch.Gmove(&n1, n)
-			Regfree(&n1)
-		}
-		gins = func(as int, f, t *Node) *obj.Prog {
-			var n1 Node
-			Regalloc(&n1, t.Type, t)
-			Thearch.Gmove(t, &n1)
-			Thearch.Gins(as, f, &n1)
-			Thearch.Gmove(&n1, t)
-			Regfree(&n1)
-			return nil
-		}
-	}
-
-	panics := make([]*obj.Prog, 0, 6) // 3 loads + 3 checks
-
-	loadlen := func() {
-		if xlen.Op != 0 {
-			return
-		}
-		if n.Op == OSLICEARR || n.Op == OSLICE3ARR {
-			Nodconst(&xlen, indexRegType, n.Left.Type.Type.Bound)
-			return
-		}
-		if n.Op == OSLICESTR && Isconst(n.Left, CTSTR) {
-			Nodconst(&xlen, indexRegType, int64(len(n.Left.Val().U.(string))))
-			return
-		}
-		regalloc(&xlen, indexRegType, nil)
-		x.Xoffset += int64(Widthptr)
-		x.Type = Types[TUINT]
-		Thearch.Gmove(&x, &xlen)
-		x.Xoffset -= int64(Widthptr)
-	}
-
-	loadcap := func() {
-		if xcap.Op != 0 {
-			return
-		}
-		if n.Op == OSLICEARR || n.Op == OSLICE3ARR || n.Op == OSLICESTR {
-			loadlen()
-			xcap = xlen
-			if xcap.Op == OREGISTER {
-				Regrealloc(&xcap)
-			}
-			return
-		}
-		regalloc(&xcap, indexRegType, nil)
-		x.Xoffset += 2 * int64(Widthptr)
-		x.Type = Types[TUINT]
-		Thearch.Gmove(&x, &xcap)
-		x.Xoffset -= 2 * int64(Widthptr)
-	}
-
-	var x1, x2, x3 *Node // unevaluated index arguments
-	x1 = n.Right.Left
-	switch n.Op {
-	default:
-		x2 = n.Right.Right
-	case OSLICE3, OSLICE3ARR:
-		x2 = n.Right.Right.Left
-		x3 = n.Right.Right.Right
-	}
-
-	// load computes src into targ, but if src refers to the len or cap of n.Left,
-	// load copies those from xlen, xcap, loading xlen if needed.
-	// If targ.Op == OREGISTER on return, it must be Regfreed,
-	// but it should not be modified without first checking whether it is
-	// xlen or xcap's register.
-	load := func(src, targ *Node) {
-		if src == nil {
-			return
-		}
-		switch src.Op {
-		case OLITERAL:
-			*targ = *src
-			return
-		case OLEN:
-			// NOTE(rsc): This doesn't actually trigger, because order.go
-			// has pulled all the len and cap calls into separate assignments
-			// to temporaries. There are tests in test/sliceopt.go that could
-			// be enabled if this is fixed.
-			if samesafeexpr(n.Left, src.Left) {
-				if Debug_slice > 0 {
-					Warn("slice: reuse len")
-				}
-				loadlen()
-				*targ = xlen
-				if targ.Op == OREGISTER {
-					Regrealloc(targ)
-				}
-				return
-			}
-		case OCAP:
-			// NOTE(rsc): This doesn't actually trigger; see note in case OLEN above.
-			if samesafeexpr(n.Left, src.Left) {
-				if Debug_slice > 0 {
-					Warn("slice: reuse cap")
-				}
-				loadcap()
-				*targ = xcap
-				if targ.Op == OREGISTER {
-					Regrealloc(targ)
-				}
-				return
-			}
-		}
-		if i.Op != 0 && samesafeexpr(x1, src) {
-			if Debug_slice > 0 {
-				Warn("slice: reuse 1st index")
-			}
-			*targ = i
-			if targ.Op == OREGISTER {
-				Regrealloc(targ)
-			}
-			return
-		}
-		if j.Op != 0 && samesafeexpr(x2, src) {
-			if Debug_slice > 0 {
-				Warn("slice: reuse 2nd index")
-			}
-			*targ = j
-			if targ.Op == OREGISTER {
-				Regrealloc(targ)
-			}
-			return
-		}
-		if Thearch.Cgenindex != nil {
-			regalloc(targ, indexRegType, nil)
-			p := Thearch.Cgenindex(src, targ, false)
-			if p != nil {
-				panics = append(panics, p)
-			}
-		} else if Thearch.Igenindex != nil {
-			p := Thearch.Igenindex(src, targ, false)
-			if p != nil {
-				panics = append(panics, p)
-			}
-		} else {
-			regalloc(targ, indexRegType, nil)
-			var tmp Node
-			Cgenr(src, &tmp, targ)
-			Thearch.Gmove(&tmp, targ)
-			Regfree(&tmp)
-		}
-	}
-
-	load(x1, &i)
-	load(x2, &j)
-	load(x3, &k)
-
-	// i defaults to 0.
-	if i.Op == 0 {
-		Nodconst(&i, indexRegType, 0)
-	}
-
-	// j defaults to len(x)
-	if j.Op == 0 {
-		loadlen()
-		j = xlen
-		if j.Op == OREGISTER {
-			Regrealloc(&j)
-		}
-	}
-
-	// k defaults to cap(x)
-	// Only need to load it if we're recalculating cap or doing a full update.
-	if k.Op == 0 && n.Op != OSLICESTR && (!iszero(&i) || needFullUpdate) {
-		loadcap()
-		k = xcap
-		if k.Op == OREGISTER {
-			Regrealloc(&k)
-		}
-	}
-
-	// Check constant indexes for negative values, and against constant length if known.
-	// The func obvious below checks for out-of-order constant indexes.
-	var bound int64 = -1
-	if n.Op == OSLICEARR || n.Op == OSLICE3ARR {
-		bound = n.Left.Type.Type.Bound
-	} else if n.Op == OSLICESTR && Isconst(n.Left, CTSTR) {
-		bound = int64(len(n.Left.Val().U.(string)))
-	}
-	if Isconst(&i, CTINT) {
-		if mpcmpfixc(i.Val().U.(*Mpint), 0) < 0 || bound >= 0 && mpcmpfixc(i.Val().U.(*Mpint), bound) > 0 {
-			Yyerror("slice index out of bounds")
-		}
-	}
-	if Isconst(&j, CTINT) {
-		if mpcmpfixc(j.Val().U.(*Mpint), 0) < 0 || bound >= 0 && mpcmpfixc(j.Val().U.(*Mpint), bound) > 0 {
-			Yyerror("slice index out of bounds")
-		}
-	}
-	if Isconst(&k, CTINT) {
-		if mpcmpfixc(k.Val().U.(*Mpint), 0) < 0 || bound >= 0 && mpcmpfixc(k.Val().U.(*Mpint), bound) > 0 {
-			Yyerror("slice index out of bounds")
-		}
-	}
-
-	// same reports whether n1 and n2 are the same register or constant.
-	same := func(n1, n2 *Node) bool {
-		return n1.Op == OREGISTER && n2.Op == OREGISTER && n1.Reg == n2.Reg ||
-			n1.Op == ONAME && n2.Op == ONAME && n1.Orig == n2.Orig && n1.Type == n2.Type && n1.Xoffset == n2.Xoffset ||
-			n1.Op == OLITERAL && n2.Op == OLITERAL && Mpcmpfixfix(n1.Val().U.(*Mpint), n2.Val().U.(*Mpint)) == 0
-	}
-
-	// obvious reports whether n1 <= n2 is obviously true,
-	// and it calls Yyerror if n1 <= n2 is obviously false.
-	obvious := func(n1, n2 *Node) bool {
-		if Debug['B'] != 0 { // -B disables bounds checks
-			return true
-		}
-		if same(n1, n2) {
-			return true // n1 == n2
-		}
-		if iszero(n1) {
-			return true // using unsigned compare, so 0 <= n2 always true
-		}
-		if xlen.Op != 0 && same(n1, &xlen) && xcap.Op != 0 && same(n2, &xcap) {
-			return true // len(x) <= cap(x) always true
-		}
-		if Isconst(n1, CTINT) && Isconst(n2, CTINT) {
-			if Mpcmpfixfix(n1.Val().U.(*Mpint), n2.Val().U.(*Mpint)) <= 0 {
-				return true // n1, n2 constants such that n1 <= n2
-			}
-			Yyerror("slice index out of bounds")
-			return true
-		}
-		return false
-	}
-
-	compare := func(n1, n2 *Node) {
-		// n1 might be a 64-bit constant, even on 32-bit architectures,
-		// but it will be represented in 32 bits.
-		if Ctxt.Arch.Regsize == 4 && Is64(n1.Type) {
-			if mpcmpfixc(n1.Val().U.(*Mpint), 1<<31) >= 0 {
-				Fatal("missed slice out of bounds check")
-			}
-			var tmp Node
-			Nodconst(&tmp, indexRegType, Mpgetfix(n1.Val().U.(*Mpint)))
-			n1 = &tmp
-		}
-		p := Thearch.Ginscmp(OGT, indexRegType, n1, n2, -1)
-		panics = append(panics, p)
-	}
-
-	loadcap()
-	max := &xcap
-	if k.Op != 0 && (n.Op == OSLICE3 || n.Op == OSLICE3ARR) {
-		if obvious(&k, max) {
-			if Debug_slice > 0 {
-				Warn("slice: omit check for 3rd index")
-			}
-		} else {
-			compare(&k, max)
-		}
-		max = &k
-	}
-	if j.Op != 0 {
-		if obvious(&j, max) {
-			if Debug_slice > 0 {
-				Warn("slice: omit check for 2nd index")
-			}
-		} else {
-			compare(&j, max)
-		}
-		max = &j
-	}
-	if i.Op != 0 {
-		if obvious(&i, max) {
-			if Debug_slice > 0 {
-				Warn("slice: omit check for 1st index")
-			}
-		} else {
-			compare(&i, max)
-		}
-		max = &i
-	}
-	if k.Op != 0 && i.Op != 0 {
-		obvious(&i, &k) // emit compile-time error for x[3:n:2]
-	}
-
-	if len(panics) > 0 {
-		p := Gbranch(obj.AJMP, nil, 0)
-		for _, q := range panics {
-			Patch(q, Pc)
-		}
-		Ginscall(panicslice, -1)
-		Patch(p, Pc)
-	}
-
-	// Checks are done.
-	// Compute new len as j-i, cap as k-i.
-	// If i and j are same register, len is constant 0.
-	// If i and k are same register, cap is constant 0.
-	// If j and k are same register, len and cap are same.
-
-	// Done with xlen and xcap.
-	// Now safe to modify j and k even if they alias xlen, xcap.
-	if xlen.Op == OREGISTER {
-		Regfree(&xlen)
-	}
-	if xcap.Op == OREGISTER {
-		Regfree(&xcap)
-	}
-
-	// are j and k the same value?
-	sameJK := same(&j, &k)
-
-	if i.Op != 0 {
-		// j -= i
-		if same(&i, &j) {
-			if Debug_slice > 0 {
-				Warn("slice: result len == 0")
-			}
-			if j.Op == OREGISTER {
-				Regfree(&j)
-			}
-			Nodconst(&j, indexRegType, 0)
-		} else {
-			switch j.Op {
-			case OLITERAL:
-				if Isconst(&i, CTINT) {
-					Nodconst(&j, indexRegType, Mpgetfix(j.Val().U.(*Mpint))-Mpgetfix(i.Val().U.(*Mpint)))
-					if Debug_slice > 0 {
-						Warn("slice: result len == %d", Mpgetfix(j.Val().U.(*Mpint)))
-					}
-					break
-				}
-				fallthrough
-			case ONAME:
-				if !istemp(&j) {
-					var r Node
-					regalloc(&r, indexRegType, nil)
-					Thearch.Gmove(&j, &r)
-					j = r
-				}
-				fallthrough
-			case OREGISTER:
-				if i.Op == OLITERAL {
-					v := Mpgetfix(i.Val().U.(*Mpint))
-					if v != 0 {
-						ginscon(Thearch.Optoas(OSUB, indexRegType), v, &j)
-					}
-				} else {
-					gins(Thearch.Optoas(OSUB, indexRegType), &i, &j)
-				}
-			}
-		}
-
-		// k -= i if k different from j and cap is needed.j
-		// (The modifications to j above cannot affect i: if j and i were aliased,
-		// we replace j with a constant 0 instead of doing a subtraction,
-		// leaving i unmodified.)
-		if k.Op == 0 {
-			if Debug_slice > 0 && n.Op != OSLICESTR {
-				Warn("slice: result cap not computed")
-			}
-			// no need
-		} else if same(&i, &k) {
-			if k.Op == OREGISTER {
-				Regfree(&k)
-			}
-			Nodconst(&k, indexRegType, 0)
-			if Debug_slice > 0 {
-				Warn("slice: result cap == 0")
-			}
-		} else if sameJK {
-			if Debug_slice > 0 {
-				Warn("slice: result cap == result len")
-			}
-			// k and j were the same value; make k-i the same as j-i.
-			if k.Op == OREGISTER {
-				Regfree(&k)
-			}
-			k = j
-			if k.Op == OREGISTER {
-				Regrealloc(&k)
-			}
-		} else {
-			switch k.Op {
-			case OLITERAL:
-				if Isconst(&i, CTINT) {
-					Nodconst(&k, indexRegType, Mpgetfix(k.Val().U.(*Mpint))-Mpgetfix(i.Val().U.(*Mpint)))
-					if Debug_slice > 0 {
-						Warn("slice: result cap == %d", Mpgetfix(k.Val().U.(*Mpint)))
-					}
-					break
-				}
-				fallthrough
-			case ONAME:
-				if !istemp(&k) {
-					var r Node
-					regalloc(&r, indexRegType, nil)
-					Thearch.Gmove(&k, &r)
-					k = r
-				}
-				fallthrough
-			case OREGISTER:
-				if same(&i, &k) {
-					Regfree(&k)
-					Nodconst(&k, indexRegType, 0)
-					if Debug_slice > 0 {
-						Warn("slice: result cap == 0")
-					}
-				} else if i.Op == OLITERAL {
-					v := Mpgetfix(i.Val().U.(*Mpint))
-					if v != 0 {
-						ginscon(Thearch.Optoas(OSUB, indexRegType), v, &k)
-					}
-				} else {
-					gins(Thearch.Optoas(OSUB, indexRegType), &i, &k)
-				}
-			}
-		}
-	}
-
-	adjustBase := true
-	if i.Op == 0 || iszero(&i) {
-		if Debug_slice > 0 {
-			Warn("slice: skip base adjustment for 1st index 0")
-		}
-		adjustBase = false
-	} else if k.Op != 0 && iszero(&k) || k.Op == 0 && iszero(&j) {
-		if Debug_slice > 0 {
-			if n.Op == OSLICESTR {
-				Warn("slice: skip base adjustment for string len == 0")
-			} else {
-				Warn("slice: skip base adjustment for cap == 0")
-			}
-		}
-		adjustBase = false
-	}
-
-	if !adjustBase && !needFullUpdate {
-		if Debug_slice > 0 {
-			if k.Op != 0 {
-				Warn("slice: len/cap-only update")
-			} else {
-				Warn("slice: len-only update")
-			}
-		}
-		if i.Op == OREGISTER {
-			Regfree(&i)
-		}
-		// Write len (and cap if needed) back to x.
-		x.Xoffset += int64(Widthptr)
-		x.Type = Types[TUINT]
-		Thearch.Gmove(&j, &x)
-		x.Xoffset -= int64(Widthptr)
-		if k.Op != 0 {
-			x.Xoffset += 2 * int64(Widthptr)
-			x.Type = Types[TUINT]
-			Thearch.Gmove(&k, &x)
-			x.Xoffset -= 2 * int64(Widthptr)
-		}
-		Regfree(&x)
-	} else {
-		// Compute new base. May smash i.
-		if n.Op == OSLICEARR || n.Op == OSLICE3ARR {
-			Cgenr(n.Left, &xbase, nil)
-			Cgen_checknil(&xbase)
-		} else {
-			regalloc(&xbase, Ptrto(res.Type.Type), nil)
-			x.Type = xbase.Type
-			Thearch.Gmove(&x, &xbase)
-			Regfree(&x)
-		}
-		if i.Op != 0 && adjustBase {
-			// Branch around the base adjustment if the resulting cap will be 0.
-			var p *obj.Prog
-			size := &k
-			if k.Op == 0 {
-				size = &j
-			}
-			if Isconst(size, CTINT) {
-				// zero was checked above, must be non-zero.
-			} else {
-				var tmp Node
-				Nodconst(&tmp, indexRegType, 0)
-				p = Thearch.Ginscmp(OEQ, indexRegType, size, &tmp, -1)
-			}
-			var w int64
-			if n.Op == OSLICESTR {
-				w = 1 // res is string, elem size is 1 (byte)
-			} else {
-				w = res.Type.Type.Width // res is []T, elem size is T.width
-			}
-			if Isconst(&i, CTINT) {
-				ginscon(Thearch.Optoas(OADD, xbase.Type), Mpgetfix(i.Val().U.(*Mpint))*w, &xbase)
-			} else if Thearch.AddIndex != nil && Thearch.AddIndex(&i, w, &xbase) {
-				// done by back end
-			} else if w == 1 {
-				gins(Thearch.Optoas(OADD, xbase.Type), &i, &xbase)
-			} else {
-				if i.Op == ONAME && !istemp(&i) {
-					var tmp Node
-					Tempname(&tmp, i.Type)
-					Thearch.Gmove(&i, &tmp)
-					i = tmp
-				}
-				ginscon(Thearch.Optoas(OMUL, i.Type), w, &i)
-				gins(Thearch.Optoas(OADD, xbase.Type), &i, &xbase)
-			}
-			if p != nil {
-				Patch(p, Pc)
-			}
-		}
-		if i.Op == OREGISTER {
-			Regfree(&i)
-		}
-
-		// Write len, cap, base to result.
-		if res.Op == ONAME {
-			Gvardef(res)
-		}
-		Igen(res, &x, nil)
-		x.Xoffset += int64(Widthptr)
-		x.Type = Types[TUINT]
-		Thearch.Gmove(&j, &x)
-		x.Xoffset -= int64(Widthptr)
-		if k.Op != 0 {
-			x.Xoffset += 2 * int64(Widthptr)
-			Thearch.Gmove(&k, &x)
-			x.Xoffset -= 2 * int64(Widthptr)
-		}
-		x.Type = xbase.Type
-		cgen_wb(&xbase, &x, wb)
-		Regfree(&xbase)
-		Regfree(&x)
-	}
-
-	if j.Op == OREGISTER {
-		Regfree(&j)
-	}
-	if k.Op == OREGISTER {
-		Regfree(&k)
-	}
-}
diff --git a/src/cmd/compile/internal/gc/closure.go b/src/cmd/compile/internal/gc/closure.go
deleted file mode 100644
index a0dfa0b..0000000
--- a/src/cmd/compile/internal/gc/closure.go
+++ /dev/null
@@ -1,690 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-)
-
-/*
- * function literals aka closures
- */
-func closurehdr(ntype *Node) {
-	var name *Node
-	var a *Node
-
-	n := Nod(OCLOSURE, nil, nil)
-	n.Func.Ntype = ntype
-	n.Func.Depth = Funcdepth
-	n.Func.Outerfunc = Curfn
-
-	funchdr(n)
-
-	// steal ntype's argument names and
-	// leave a fresh copy in their place.
-	// references to these variables need to
-	// refer to the variables in the external
-	// function declared below; see walkclosure.
-	n.List = ntype.List
-
-	n.Rlist = ntype.Rlist
-	ntype.List = nil
-	ntype.Rlist = nil
-	for l := n.List; l != nil; l = l.Next {
-		name = l.N.Left
-		if name != nil {
-			name = newname(name.Sym)
-		}
-		a = Nod(ODCLFIELD, name, l.N.Right)
-		a.Isddd = l.N.Isddd
-		if name != nil {
-			name.Isddd = a.Isddd
-		}
-		ntype.List = list(ntype.List, a)
-	}
-
-	for l := n.Rlist; l != nil; l = l.Next {
-		name = l.N.Left
-		if name != nil {
-			name = newname(name.Sym)
-		}
-		ntype.Rlist = list(ntype.Rlist, Nod(ODCLFIELD, name, l.N.Right))
-	}
-}
-
-func closurebody(body *NodeList) *Node {
-	if body == nil {
-		body = list1(Nod(OEMPTY, nil, nil))
-	}
-
-	func_ := Curfn
-	func_.Nbody = body
-	func_.Func.Endlineno = lineno
-	funcbody(func_)
-
-	// closure-specific variables are hanging off the
-	// ordinary ones in the symbol table; see oldname.
-	// unhook them.
-	// make the list of pointers for the closure call.
-	var v *Node
-	for l := func_.Func.Cvars; l != nil; l = l.Next {
-		v = l.N
-		v.Name.Param.Closure.Name.Param.Closure = v.Name.Param.Outer
-		v.Name.Param.Outerexpr = oldname(v.Sym)
-	}
-
-	return func_
-}
-
-func typecheckclosure(func_ *Node, top int) {
-	var n *Node
-
-	for l := func_.Func.Cvars; l != nil; l = l.Next {
-		n = l.N.Name.Param.Closure
-		if !n.Name.Captured {
-			n.Name.Captured = true
-			if n.Name.Decldepth == 0 {
-				Fatal("typecheckclosure: var %v does not have decldepth assigned", Nconv(n, obj.FmtShort))
-			}
-
-			// Ignore assignments to the variable in straightline code
-			// preceding the first capturing by a closure.
-			if n.Name.Decldepth == decldepth {
-				n.Assigned = false
-			}
-		}
-	}
-
-	for l := func_.Func.Dcl; l != nil; l = l.Next {
-		if l.N.Op == ONAME && (l.N.Class == PPARAM || l.N.Class == PPARAMOUT) {
-			l.N.Name.Decldepth = 1
-		}
-	}
-
-	oldfn := Curfn
-	typecheck(&func_.Func.Ntype, Etype)
-	func_.Type = func_.Func.Ntype.Type
-	func_.Func.Top = top
-
-	// Type check the body now, but only if we're inside a function.
-	// At top level (in a variable initialization: curfn==nil) we're not
-	// ready to type check code yet; we'll check it later, because the
-	// underlying closure function we create is added to xtop.
-	if Curfn != nil && func_.Type != nil {
-		Curfn = func_
-		olddd := decldepth
-		decldepth = 1
-		typechecklist(func_.Nbody, Etop)
-		decldepth = olddd
-		Curfn = oldfn
-	}
-
-	// Create top-level function
-	xtop = list(xtop, makeclosure(func_))
-}
-
-// closurename returns name for OCLOSURE n.
-// It is not as simple as it ought to be, because we typecheck nested closures
-// starting from the innermost one. So when we check the inner closure,
-// we don't yet have name for the outer closure. This function uses recursion
-// to generate names all the way up if necessary.
-
-var closurename_closgen int
-
-func closurename(n *Node) *Sym {
-	if n.Sym != nil {
-		return n.Sym
-	}
-	gen := 0
-	outer := ""
-	prefix := ""
-	if n.Func.Outerfunc == nil {
-		// Global closure.
-		outer = "glob"
-
-		prefix = "func"
-		closurename_closgen++
-		gen = closurename_closgen
-	} else if n.Func.Outerfunc.Op == ODCLFUNC {
-		// The outermost closure inside of a named function.
-		outer = n.Func.Outerfunc.Func.Nname.Sym.Name
-
-		prefix = "func"
-
-		// Yes, functions can be named _.
-		// Can't use function closgen in such case,
-		// because it would lead to name clashes.
-		if !isblank(n.Func.Outerfunc.Func.Nname) {
-			n.Func.Outerfunc.Func.Closgen++
-			gen = n.Func.Outerfunc.Func.Closgen
-		} else {
-			closurename_closgen++
-			gen = closurename_closgen
-		}
-	} else if n.Func.Outerfunc.Op == OCLOSURE {
-		// Nested closure, recurse.
-		outer = closurename(n.Func.Outerfunc).Name
-
-		prefix = ""
-		n.Func.Outerfunc.Func.Closgen++
-		gen = n.Func.Outerfunc.Func.Closgen
-	} else {
-		Fatal("closurename called for %v", Nconv(n, obj.FmtShort))
-	}
-	n.Sym = Lookupf("%s.%s%d", outer, prefix, gen)
-	return n.Sym
-}
-
-func makeclosure(func_ *Node) *Node {
-	/*
-	 * wrap body in external function
-	 * that begins by reading closure parameters.
-	 */
-	xtype := Nod(OTFUNC, nil, nil)
-
-	xtype.List = func_.List
-	xtype.Rlist = func_.Rlist
-
-	// create the function
-	xfunc := Nod(ODCLFUNC, nil, nil)
-
-	xfunc.Func.Nname = newfuncname(closurename(func_))
-	xfunc.Func.Nname.Sym.Flags |= SymExported // disable export
-	xfunc.Func.Nname.Name.Param.Ntype = xtype
-	xfunc.Func.Nname.Name.Defn = xfunc
-	declare(xfunc.Func.Nname, PFUNC)
-	xfunc.Func.Nname.Name.Funcdepth = func_.Func.Depth
-	xfunc.Func.Depth = func_.Func.Depth
-	xfunc.Func.Endlineno = func_.Func.Endlineno
-	makefuncsym(xfunc.Func.Nname.Sym)
-
-	xfunc.Nbody = func_.Nbody
-	xfunc.Func.Dcl = concat(func_.Func.Dcl, xfunc.Func.Dcl)
-	if xfunc.Nbody == nil {
-		Fatal("empty body - won't generate any code")
-	}
-	typecheck(&xfunc, Etop)
-
-	xfunc.Func.Closure = func_
-	func_.Func.Closure = xfunc
-
-	func_.Nbody = nil
-	func_.List = nil
-	func_.Rlist = nil
-
-	return xfunc
-}
-
-// capturevars is called in a separate phase after all typechecking is done.
-// It decides whether each variable captured by a closure should be captured
-// by value or by reference.
-// We use value capturing for values <= 128 bytes that are never reassigned
-// after capturing (effectively constant).
-func capturevars(xfunc *Node) {
-	var v *Node
-	var outer *Node
-
-	lno := int(lineno)
-	lineno = xfunc.Lineno
-
-	func_ := xfunc.Func.Closure
-	func_.Func.Enter = nil
-	for l := func_.Func.Cvars; l != nil; l = l.Next {
-		v = l.N
-		if v.Type == nil {
-			// if v->type is nil, it means v looked like it was
-			// going to be used in the closure but wasn't.
-			// this happens because when parsing a, b, c := f()
-			// the a, b, c gets parsed as references to older
-			// a, b, c before the parser figures out this is a
-			// declaration.
-			v.Op = OXXX
-
-			continue
-		}
-
-		// type check the & of closed variables outside the closure,
-		// so that the outer frame also grabs them and knows they escape.
-		dowidth(v.Type)
-
-		outer = v.Name.Param.Outerexpr
-		v.Name.Param.Outerexpr = nil
-
-		// out parameters will be assigned to implicitly upon return.
-		if outer.Class != PPARAMOUT && !v.Name.Param.Closure.Addrtaken && !v.Name.Param.Closure.Assigned && v.Type.Width <= 128 {
-			v.Name.Byval = true
-		} else {
-			v.Name.Param.Closure.Addrtaken = true
-			outer = Nod(OADDR, outer, nil)
-		}
-
-		if Debug['m'] > 1 {
-			var name *Sym
-			if v.Name.Curfn != nil && v.Name.Curfn.Func.Nname != nil {
-				name = v.Name.Curfn.Func.Nname.Sym
-			}
-			how := "ref"
-			if v.Name.Byval {
-				how = "value"
-			}
-			Warnl(int(v.Lineno), "%v capturing by %s: %v (addr=%v assign=%v width=%d)", name, how, v.Sym, v.Name.Param.Closure.Addrtaken, v.Name.Param.Closure.Assigned, int32(v.Type.Width))
-		}
-
-		typecheck(&outer, Erv)
-		func_.Func.Enter = list(func_.Func.Enter, outer)
-	}
-
-	lineno = int32(lno)
-}
-
-// transformclosure is called in a separate phase after escape analysis.
-// It transform closure bodies to properly reference captured variables.
-func transformclosure(xfunc *Node) {
-	lno := int(lineno)
-	lineno = xfunc.Lineno
-	func_ := xfunc.Func.Closure
-
-	if func_.Func.Top&Ecall != 0 {
-		// If the closure is directly called, we transform it to a plain function call
-		// with variables passed as args. This avoids allocation of a closure object.
-		// Here we do only a part of the transformation. Walk of OCALLFUNC(OCLOSURE)
-		// will complete the transformation later.
-		// For illustration, the following closure:
-		//	func(a int) {
-		//		println(byval)
-		//		byref++
-		//	}(42)
-		// becomes:
-		//	func(a int, byval int, &byref *int) {
-		//		println(byval)
-		//		(*&byref)++
-		//	}(byval, &byref, 42)
-
-		// f is ONAME of the actual function.
-		f := xfunc.Func.Nname
-
-		// Get pointer to input arguments.
-		// We are going to insert captured variables before input args.
-		param := &getinargx(f.Type).Type
-		original_args := *param // old input args
-		original_dcl := xfunc.Func.Dcl
-		xfunc.Func.Dcl = nil
-
-		var v *Node
-		var addr *Node
-		var fld *Type
-		for l := func_.Func.Cvars; l != nil; l = l.Next {
-			v = l.N
-			if v.Op == OXXX {
-				continue
-			}
-			fld = typ(TFIELD)
-			fld.Funarg = 1
-			if v.Name.Byval {
-				// If v is captured by value, we merely downgrade it to PPARAM.
-				v.Class = PPARAM
-
-				v.Ullman = 1
-				fld.Nname = v
-			} else {
-				// If v of type T is captured by reference,
-				// we introduce function param &v *T
-				// and v remains PPARAMREF with &v heapaddr
-				// (accesses will implicitly deref &v).
-				addr = newname(Lookupf("&%s", v.Sym.Name))
-				addr.Type = Ptrto(v.Type)
-				addr.Class = PPARAM
-				v.Name.Heapaddr = addr
-				fld.Nname = addr
-			}
-
-			fld.Type = fld.Nname.Type
-			fld.Sym = fld.Nname.Sym
-
-			// Declare the new param and add it the first part of the input arguments.
-			xfunc.Func.Dcl = list(xfunc.Func.Dcl, fld.Nname)
-
-			*param = fld
-			param = &fld.Down
-		}
-		*param = original_args
-		xfunc.Func.Dcl = concat(xfunc.Func.Dcl, original_dcl)
-
-		// Recalculate param offsets.
-		if f.Type.Width > 0 {
-			Fatal("transformclosure: width is already calculated")
-		}
-		dowidth(f.Type)
-		xfunc.Type = f.Type // update type of ODCLFUNC
-	} else {
-		// The closure is not called, so it is going to stay as closure.
-		nvar := 0
-
-		var body *NodeList
-		offset := int64(Widthptr)
-		var addr *Node
-		var v *Node
-		var cv *Node
-		for l := func_.Func.Cvars; l != nil; l = l.Next {
-			v = l.N
-			if v.Op == OXXX {
-				continue
-			}
-			nvar++
-
-			// cv refers to the field inside of closure OSTRUCTLIT.
-			cv = Nod(OCLOSUREVAR, nil, nil)
-
-			cv.Type = v.Type
-			if !v.Name.Byval {
-				cv.Type = Ptrto(v.Type)
-			}
-			offset = Rnd(offset, int64(cv.Type.Align))
-			cv.Xoffset = offset
-			offset += cv.Type.Width
-
-			if v.Name.Byval && v.Type.Width <= int64(2*Widthptr) {
-				// If it is a small variable captured by value, downgrade it to PAUTO.
-				v.Class = PAUTO
-				v.Ullman = 1
-				xfunc.Func.Dcl = list(xfunc.Func.Dcl, v)
-				body = list(body, Nod(OAS, v, cv))
-			} else {
-				// Declare variable holding addresses taken from closure
-				// and initialize in entry prologue.
-				addr = newname(Lookupf("&%s", v.Sym.Name))
-				addr.Name.Param.Ntype = Nod(OIND, typenod(v.Type), nil)
-				addr.Class = PAUTO
-				addr.Used = true
-				addr.Name.Curfn = xfunc
-				xfunc.Func.Dcl = list(xfunc.Func.Dcl, addr)
-				v.Name.Heapaddr = addr
-				if v.Name.Byval {
-					cv = Nod(OADDR, cv, nil)
-				}
-				body = list(body, Nod(OAS, addr, cv))
-			}
-		}
-
-		typechecklist(body, Etop)
-		walkstmtlist(body)
-		xfunc.Func.Enter = body
-		xfunc.Func.Needctxt = nvar > 0
-	}
-
-	lineno = int32(lno)
-}
-
-func walkclosure(func_ *Node, init **NodeList) *Node {
-	// If no closure vars, don't bother wrapping.
-	if func_.Func.Cvars == nil {
-		return func_.Func.Closure.Func.Nname
-	}
-
-	// Create closure in the form of a composite literal.
-	// supposing the closure captures an int i and a string s
-	// and has one float64 argument and no results,
-	// the generated code looks like:
-	//
-	//	clos = &struct{.F uintptr; i *int; s *string}{func.1, &i, &s}
-	//
-	// The use of the struct provides type information to the garbage
-	// collector so that it can walk the closure. We could use (in this case)
-	// [3]unsafe.Pointer instead, but that would leave the gc in the dark.
-	// The information appears in the binary in the form of type descriptors;
-	// the struct is unnamed so that closures in multiple packages with the
-	// same struct type can share the descriptor.
-
-	typ := Nod(OTSTRUCT, nil, nil)
-
-	typ.List = list1(Nod(ODCLFIELD, newname(Lookup(".F")), typenod(Types[TUINTPTR])))
-	var typ1 *Node
-	var v *Node
-	for l := func_.Func.Cvars; l != nil; l = l.Next {
-		v = l.N
-		if v.Op == OXXX {
-			continue
-		}
-		typ1 = typenod(v.Type)
-		if !v.Name.Byval {
-			typ1 = Nod(OIND, typ1, nil)
-		}
-		typ.List = list(typ.List, Nod(ODCLFIELD, newname(v.Sym), typ1))
-	}
-
-	clos := Nod(OCOMPLIT, nil, Nod(OIND, typ, nil))
-	clos.Esc = func_.Esc
-	clos.Right.Implicit = true
-	clos.List = concat(list1(Nod(OCFUNC, func_.Func.Closure.Func.Nname, nil)), func_.Func.Enter)
-
-	// Force type conversion from *struct to the func type.
-	clos = Nod(OCONVNOP, clos, nil)
-
-	clos.Type = func_.Type
-
-	typecheck(&clos, Erv)
-
-	// typecheck will insert a PTRLIT node under CONVNOP,
-	// tag it with escape analysis result.
-	clos.Left.Esc = func_.Esc
-
-	// non-escaping temp to use, if any.
-	// orderexpr did not compute the type; fill it in now.
-	if x := prealloc[func_]; x != nil {
-		x.Type = clos.Left.Left.Type
-		x.Orig.Type = x.Type
-		clos.Left.Right = x
-		delete(prealloc, func_)
-	}
-
-	walkexpr(&clos, init)
-
-	return clos
-}
-
-func typecheckpartialcall(fn *Node, sym *Node) {
-	switch fn.Op {
-	case ODOTINTER, ODOTMETH:
-		break
-
-	default:
-		Fatal("invalid typecheckpartialcall")
-	}
-
-	// Create top-level function.
-	xfunc := makepartialcall(fn, fn.Type, sym)
-	fn.Func = xfunc.Func
-	fn.Right = sym
-	fn.Op = OCALLPART
-	fn.Type = xfunc.Type
-}
-
-var makepartialcall_gopkg *Pkg
-
-func makepartialcall(fn *Node, t0 *Type, meth *Node) *Node {
-	var p string
-
-	rcvrtype := fn.Left.Type
-	if exportname(meth.Sym.Name) {
-		p = fmt.Sprintf("(%v).%s-fm", Tconv(rcvrtype, obj.FmtLeft|obj.FmtShort), meth.Sym.Name)
-	} else {
-		p = fmt.Sprintf("(%v).(%v)-fm", Tconv(rcvrtype, obj.FmtLeft|obj.FmtShort), Sconv(meth.Sym, obj.FmtLeft))
-	}
-	basetype := rcvrtype
-	if Isptr[rcvrtype.Etype] {
-		basetype = basetype.Type
-	}
-	if basetype.Etype != TINTER && basetype.Sym == nil {
-		Fatal("missing base type for %v", rcvrtype)
-	}
-
-	var spkg *Pkg
-	if basetype.Sym != nil {
-		spkg = basetype.Sym.Pkg
-	}
-	if spkg == nil {
-		if makepartialcall_gopkg == nil {
-			makepartialcall_gopkg = mkpkg("go")
-		}
-		spkg = makepartialcall_gopkg
-	}
-
-	sym := Pkglookup(p, spkg)
-
-	if sym.Flags&SymUniq != 0 {
-		return sym.Def
-	}
-	sym.Flags |= SymUniq
-
-	savecurfn := Curfn
-	Curfn = nil
-
-	xtype := Nod(OTFUNC, nil, nil)
-	i := 0
-	var l *NodeList
-	var callargs *NodeList
-	ddd := false
-	xfunc := Nod(ODCLFUNC, nil, nil)
-	Curfn = xfunc
-	var fld *Node
-	var n *Node
-	for t := getinargx(t0).Type; t != nil; t = t.Down {
-		n = newname(Lookupf("a%d", i))
-		i++
-		n.Class = PPARAM
-		xfunc.Func.Dcl = list(xfunc.Func.Dcl, n)
-		callargs = list(callargs, n)
-		fld = Nod(ODCLFIELD, n, typenod(t.Type))
-		if t.Isddd {
-			fld.Isddd = true
-			ddd = true
-		}
-
-		l = list(l, fld)
-	}
-
-	xtype.List = l
-	i = 0
-	l = nil
-	var retargs *NodeList
-	for t := getoutargx(t0).Type; t != nil; t = t.Down {
-		n = newname(Lookupf("r%d", i))
-		i++
-		n.Class = PPARAMOUT
-		xfunc.Func.Dcl = list(xfunc.Func.Dcl, n)
-		retargs = list(retargs, n)
-		l = list(l, Nod(ODCLFIELD, n, typenod(t.Type)))
-	}
-
-	xtype.Rlist = l
-
-	xfunc.Func.Dupok = true
-	xfunc.Func.Nname = newfuncname(sym)
-	xfunc.Func.Nname.Sym.Flags |= SymExported // disable export
-	xfunc.Func.Nname.Name.Param.Ntype = xtype
-	xfunc.Func.Nname.Name.Defn = xfunc
-	declare(xfunc.Func.Nname, PFUNC)
-
-	// Declare and initialize variable holding receiver.
-
-	xfunc.Func.Needctxt = true
-	cv := Nod(OCLOSUREVAR, nil, nil)
-	cv.Xoffset = int64(Widthptr)
-	cv.Type = rcvrtype
-	if int(cv.Type.Align) > Widthptr {
-		cv.Xoffset = int64(cv.Type.Align)
-	}
-	ptr := Nod(ONAME, nil, nil)
-	ptr.Sym = Lookup("rcvr")
-	ptr.Class = PAUTO
-	ptr.Addable = true
-	ptr.Ullman = 1
-	ptr.Used = true
-	ptr.Name.Curfn = xfunc
-	xfunc.Func.Dcl = list(xfunc.Func.Dcl, ptr)
-	var body *NodeList
-	if Isptr[rcvrtype.Etype] || Isinter(rcvrtype) {
-		ptr.Name.Param.Ntype = typenod(rcvrtype)
-		body = list(body, Nod(OAS, ptr, cv))
-	} else {
-		ptr.Name.Param.Ntype = typenod(Ptrto(rcvrtype))
-		body = list(body, Nod(OAS, ptr, Nod(OADDR, cv, nil)))
-	}
-
-	call := Nod(OCALL, Nod(OXDOT, ptr, meth), nil)
-	call.List = callargs
-	call.Isddd = ddd
-	if t0.Outtuple == 0 {
-		body = list(body, call)
-	} else {
-		n := Nod(OAS2, nil, nil)
-		n.List = retargs
-		n.Rlist = list1(call)
-		body = list(body, n)
-		n = Nod(ORETURN, nil, nil)
-		body = list(body, n)
-	}
-
-	xfunc.Nbody = body
-
-	typecheck(&xfunc, Etop)
-	sym.Def = xfunc
-	xtop = list(xtop, xfunc)
-	Curfn = savecurfn
-
-	return xfunc
-}
-
-func walkpartialcall(n *Node, init **NodeList) *Node {
-	// Create closure in the form of a composite literal.
-	// For x.M with receiver (x) type T, the generated code looks like:
-	//
-	//	clos = &struct{F uintptr; R T}{M.T·f, x}
-	//
-	// Like walkclosure above.
-
-	if Isinter(n.Left.Type) {
-		// Trigger panic for method on nil interface now.
-		// Otherwise it happens in the wrapper and is confusing.
-		n.Left = cheapexpr(n.Left, init)
-
-		checknil(n.Left, init)
-	}
-
-	typ := Nod(OTSTRUCT, nil, nil)
-	typ.List = list1(Nod(ODCLFIELD, newname(Lookup("F")), typenod(Types[TUINTPTR])))
-	typ.List = list(typ.List, Nod(ODCLFIELD, newname(Lookup("R")), typenod(n.Left.Type)))
-
-	clos := Nod(OCOMPLIT, nil, Nod(OIND, typ, nil))
-	clos.Esc = n.Esc
-	clos.Right.Implicit = true
-	clos.List = list1(Nod(OCFUNC, n.Func.Nname, nil))
-	clos.List = list(clos.List, n.Left)
-
-	// Force type conversion from *struct to the func type.
-	clos = Nod(OCONVNOP, clos, nil)
-
-	clos.Type = n.Type
-
-	typecheck(&clos, Erv)
-
-	// typecheck will insert a PTRLIT node under CONVNOP,
-	// tag it with escape analysis result.
-	clos.Left.Esc = n.Esc
-
-	// non-escaping temp to use, if any.
-	// orderexpr did not compute the type; fill it in now.
-	if x := prealloc[n]; x != nil {
-		x.Type = clos.Left.Left.Type
-		x.Orig.Type = x.Type
-		clos.Left.Right = x
-		delete(prealloc, n)
-	}
-
-	walkexpr(&clos, init)
-
-	return clos
-}
diff --git a/src/cmd/compile/internal/gc/const.go b/src/cmd/compile/internal/gc/const.go
deleted file mode 100644
index 9eb4983..0000000
--- a/src/cmd/compile/internal/gc/const.go
+++ /dev/null
@@ -1,1715 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import (
-	"cmd/compile/internal/big"
-	"cmd/internal/obj"
-	"strings"
-)
-
-// Int returns n as an int.
-// n must be an integer constant.
-func (n *Node) Int() int64 {
-	if !Isconst(n, CTINT) {
-		Fatal("Int(%v)", n)
-	}
-	return Mpgetfix(n.Val().U.(*Mpint))
-}
-
-// SetInt sets n's value to i.
-// n must be an integer constant.
-func (n *Node) SetInt(i int64) {
-	if !Isconst(n, CTINT) {
-		Fatal("SetInt(%v)", n)
-	}
-	Mpmovecfix(n.Val().U.(*Mpint), i)
-}
-
-// SetBigInt sets n's value to x.
-// n must be an integer constant.
-func (n *Node) SetBigInt(x *big.Int) {
-	if !Isconst(n, CTINT) {
-		Fatal("SetBigInt(%v)", n)
-	}
-	n.Val().U.(*Mpint).Val.Set(x)
-}
-
-// Bool returns n as an bool.
-// n must be an boolean constant.
-func (n *Node) Bool() bool {
-	if !Isconst(n, CTBOOL) {
-		Fatal("Int(%v)", n)
-	}
-	return n.Val().U.(bool)
-}
-
-/*
- * truncate float literal fv to 32-bit or 64-bit precision
- * according to type; return truncated value.
- */
-func truncfltlit(oldv *Mpflt, t *Type) *Mpflt {
-	if t == nil {
-		return oldv
-	}
-
-	var v Val
-	v.U = oldv
-	overflow(v, t)
-
-	fv := newMpflt()
-	mpmovefltflt(fv, oldv)
-
-	// convert large precision literal floating
-	// into limited precision (float64 or float32)
-	switch t.Etype {
-	case TFLOAT64:
-		d := mpgetflt(fv)
-		Mpmovecflt(fv, d)
-
-	case TFLOAT32:
-		d := mpgetflt32(fv)
-		Mpmovecflt(fv, d)
-	}
-
-	return fv
-}
-
-/*
- * convert n, if literal, to type t.
- * implicit conversion.
- */
-func Convlit(np **Node, t *Type) {
-	convlit1(np, t, false)
-}
-
-/*
- * convert n, if literal, to type t.
- * return a new node if necessary
- * (if n is a named constant, can't edit n->type directly).
- */
-func convlit1(np **Node, t *Type, explicit bool) {
-	n := *np
-	if n == nil || t == nil || n.Type == nil || isideal(t) || n.Type == t {
-		return
-	}
-	if !explicit && !isideal(n.Type) {
-		return
-	}
-
-	if n.Op == OLITERAL {
-		nn := Nod(OXXX, nil, nil)
-		*nn = *n
-		n = nn
-		*np = n
-	}
-
-	switch n.Op {
-	default:
-		if n.Type == idealbool {
-			if t.Etype == TBOOL {
-				n.Type = t
-			} else {
-				n.Type = Types[TBOOL]
-			}
-		}
-
-		if n.Type.Etype == TIDEAL {
-			Convlit(&n.Left, t)
-			Convlit(&n.Right, t)
-			n.Type = t
-		}
-
-		return
-
-		// target is invalid type for a constant?  leave alone.
-	case OLITERAL:
-		if !okforconst[t.Etype] && n.Type.Etype != TNIL {
-			defaultlit(&n, nil)
-			*np = n
-			return
-		}
-
-	case OLSH, ORSH:
-		convlit1(&n.Left, t, explicit && isideal(n.Left.Type))
-		t = n.Left.Type
-		if t != nil && t.Etype == TIDEAL && n.Val().Ctype() != CTINT {
-			n.SetVal(toint(n.Val()))
-		}
-		if t != nil && !Isint[t.Etype] {
-			Yyerror("invalid operation: %v (shift of type %v)", n, t)
-			t = nil
-		}
-
-		n.Type = t
-		return
-
-	case OCOMPLEX:
-		if n.Type.Etype == TIDEAL {
-			switch t.Etype {
-			// If trying to convert to non-complex type,
-			// leave as complex128 and let typechecker complain.
-			default:
-				t = Types[TCOMPLEX128]
-				fallthrough
-
-				//fallthrough
-			case TCOMPLEX128:
-				n.Type = t
-
-				Convlit(&n.Left, Types[TFLOAT64])
-				Convlit(&n.Right, Types[TFLOAT64])
-
-			case TCOMPLEX64:
-				n.Type = t
-				Convlit(&n.Left, Types[TFLOAT32])
-				Convlit(&n.Right, Types[TFLOAT32])
-			}
-		}
-
-		return
-	}
-
-	// avoided repeated calculations, errors
-	if Eqtype(n.Type, t) {
-		return
-	}
-
-	ct := consttype(n)
-	var et int
-	if ct < 0 {
-		goto bad
-	}
-
-	et = int(t.Etype)
-	if et == TINTER {
-		if ct == CTNIL && n.Type == Types[TNIL] {
-			n.Type = t
-			return
-		}
-
-		defaultlit(np, nil)
-		return
-	}
-
-	switch ct {
-	default:
-		goto bad
-
-	case CTNIL:
-		switch et {
-		default:
-			n.Type = nil
-			goto bad
-
-			// let normal conversion code handle it
-		case TSTRING:
-			return
-
-		case TARRAY:
-			if !Isslice(t) {
-				goto bad
-			}
-
-		case TPTR32,
-			TPTR64,
-			TINTER,
-			TMAP,
-			TCHAN,
-			TFUNC,
-			TUNSAFEPTR:
-			break
-
-			// A nil literal may be converted to uintptr
-		// if it is an unsafe.Pointer
-		case TUINTPTR:
-			if n.Type.Etype == TUNSAFEPTR {
-				n.SetVal(Val{new(Mpint)})
-				Mpmovecfix(n.Val().U.(*Mpint), 0)
-			} else {
-				goto bad
-			}
-		}
-
-	case CTSTR, CTBOOL:
-		if et != int(n.Type.Etype) {
-			goto bad
-		}
-
-	case CTINT, CTRUNE, CTFLT, CTCPLX:
-		if n.Type.Etype == TUNSAFEPTR && t.Etype != TUINTPTR {
-			goto bad
-		}
-		ct := int(n.Val().Ctype())
-		if Isint[et] {
-			switch ct {
-			default:
-				goto bad
-
-			case CTCPLX, CTFLT, CTRUNE:
-				n.SetVal(toint(n.Val()))
-				fallthrough
-
-				// flowthrough
-			case CTINT:
-				overflow(n.Val(), t)
-			}
-		} else if Isfloat[et] {
-			switch ct {
-			default:
-				goto bad
-
-			case CTCPLX, CTINT, CTRUNE:
-				n.SetVal(toflt(n.Val()))
-				fallthrough
-
-				// flowthrough
-			case CTFLT:
-				n.SetVal(Val{truncfltlit(n.Val().U.(*Mpflt), t)})
-			}
-		} else if Iscomplex[et] {
-			switch ct {
-			default:
-				goto bad
-
-			case CTFLT, CTINT, CTRUNE:
-				n.SetVal(tocplx(n.Val()))
-
-			case CTCPLX:
-				overflow(n.Val(), t)
-			}
-		} else if et == TSTRING && (ct == CTINT || ct == CTRUNE) && explicit {
-			n.SetVal(tostr(n.Val()))
-		} else {
-			goto bad
-		}
-	}
-
-	n.Type = t
-	return
-
-bad:
-	if n.Diag == 0 {
-		if t.Broke == 0 {
-			Yyerror("cannot convert %v to type %v", n, t)
-		}
-		n.Diag = 1
-	}
-
-	if isideal(n.Type) {
-		defaultlit(&n, nil)
-		*np = n
-	}
-}
-
-func copyval(v Val) Val {
-	switch v.Ctype() {
-	case CTINT, CTRUNE:
-		i := new(Mpint)
-		mpmovefixfix(i, v.U.(*Mpint))
-		i.Rune = v.U.(*Mpint).Rune
-		v.U = i
-
-	case CTFLT:
-		f := newMpflt()
-		mpmovefltflt(f, v.U.(*Mpflt))
-		v.U = f
-
-	case CTCPLX:
-		c := new(Mpcplx)
-		mpmovefltflt(&c.Real, &v.U.(*Mpcplx).Real)
-		mpmovefltflt(&c.Imag, &v.U.(*Mpcplx).Imag)
-		v.U = c
-	}
-
-	return v
-}
-
-func tocplx(v Val) Val {
-	switch v.Ctype() {
-	case CTINT, CTRUNE:
-		c := new(Mpcplx)
-		Mpmovefixflt(&c.Real, v.U.(*Mpint))
-		Mpmovecflt(&c.Imag, 0.0)
-		v.U = c
-
-	case CTFLT:
-		c := new(Mpcplx)
-		mpmovefltflt(&c.Real, v.U.(*Mpflt))
-		Mpmovecflt(&c.Imag, 0.0)
-		v.U = c
-	}
-
-	return v
-}
-
-func toflt(v Val) Val {
-	switch v.Ctype() {
-	case CTINT, CTRUNE:
-		f := newMpflt()
-		Mpmovefixflt(f, v.U.(*Mpint))
-		v.U = f
-
-	case CTCPLX:
-		f := newMpflt()
-		mpmovefltflt(f, &v.U.(*Mpcplx).Real)
-		if mpcmpfltc(&v.U.(*Mpcplx).Imag, 0) != 0 {
-			Yyerror("constant %v%vi truncated to real", Fconv(&v.U.(*Mpcplx).Real, obj.FmtSharp), Fconv(&v.U.(*Mpcplx).Imag, obj.FmtSharp|obj.FmtSign))
-		}
-		v.U = f
-	}
-
-	return v
-}
-
-func toint(v Val) Val {
-	switch v.Ctype() {
-	case CTRUNE:
-		i := new(Mpint)
-		mpmovefixfix(i, v.U.(*Mpint))
-		v.U = i
-
-	case CTFLT:
-		i := new(Mpint)
-		if mpmovefltfix(i, v.U.(*Mpflt)) < 0 {
-			Yyerror("constant %v truncated to integer", Fconv(v.U.(*Mpflt), obj.FmtSharp))
-		}
-		v.U = i
-
-	case CTCPLX:
-		i := new(Mpint)
-		if mpmovefltfix(i, &v.U.(*Mpcplx).Real) < 0 {
-			Yyerror("constant %v%vi truncated to integer", Fconv(&v.U.(*Mpcplx).Real, obj.FmtSharp), Fconv(&v.U.(*Mpcplx).Imag, obj.FmtSharp|obj.FmtSign))
-		}
-		if mpcmpfltc(&v.U.(*Mpcplx).Imag, 0) != 0 {
-			Yyerror("constant %v%vi truncated to real", Fconv(&v.U.(*Mpcplx).Real, obj.FmtSharp), Fconv(&v.U.(*Mpcplx).Imag, obj.FmtSharp|obj.FmtSign))
-		}
-		v.U = i
-	}
-
-	return v
-}
-
-func doesoverflow(v Val, t *Type) bool {
-	switch v.Ctype() {
-	case CTINT, CTRUNE:
-		if !Isint[t.Etype] {
-			Fatal("overflow: %v integer constant", t)
-		}
-		if Mpcmpfixfix(v.U.(*Mpint), Minintval[t.Etype]) < 0 || Mpcmpfixfix(v.U.(*Mpint), Maxintval[t.Etype]) > 0 {
-			return true
-		}
-
-	case CTFLT:
-		if !Isfloat[t.Etype] {
-			Fatal("overflow: %v floating-point constant", t)
-		}
-		if mpcmpfltflt(v.U.(*Mpflt), minfltval[t.Etype]) <= 0 || mpcmpfltflt(v.U.(*Mpflt), maxfltval[t.Etype]) >= 0 {
-			return true
-		}
-
-	case CTCPLX:
-		if !Iscomplex[t.Etype] {
-			Fatal("overflow: %v complex constant", t)
-		}
-		if mpcmpfltflt(&v.U.(*Mpcplx).Real, minfltval[t.Etype]) <= 0 || mpcmpfltflt(&v.U.(*Mpcplx).Real, maxfltval[t.Etype]) >= 0 || mpcmpfltflt(&v.U.(*Mpcplx).Imag, minfltval[t.Etype]) <= 0 || mpcmpfltflt(&v.U.(*Mpcplx).Imag, maxfltval[t.Etype]) >= 0 {
-			return true
-		}
-	}
-
-	return false
-}
-
-func overflow(v Val, t *Type) {
-	// v has already been converted
-	// to appropriate form for t.
-	if t == nil || t.Etype == TIDEAL {
-		return
-	}
-
-	// Only uintptrs may be converted to unsafe.Pointer, which cannot overflow.
-	if t.Etype == TUNSAFEPTR {
-		return
-	}
-
-	if !doesoverflow(v, t) {
-		return
-	}
-
-	switch v.Ctype() {
-	case CTINT, CTRUNE:
-		Yyerror("constant %v overflows %v", v.U.(*Mpint), t)
-
-	case CTFLT:
-		Yyerror("constant %v overflows %v", Fconv(v.U.(*Mpflt), obj.FmtSharp), t)
-
-	case CTCPLX:
-		Yyerror("constant %v overflows %v", Fconv(v.U.(*Mpflt), obj.FmtSharp), t)
-	}
-}
-
-func tostr(v Val) Val {
-	switch v.Ctype() {
-	case CTINT, CTRUNE:
-		if Mpcmpfixfix(v.U.(*Mpint), Minintval[TINT]) < 0 || Mpcmpfixfix(v.U.(*Mpint), Maxintval[TINT]) > 0 {
-			Yyerror("overflow in int -> string")
-		}
-		r := uint(Mpgetfix(v.U.(*Mpint)))
-		v = Val{}
-		v.U = string(r)
-
-	case CTFLT:
-		Yyerror("no float -> string")
-		fallthrough
-
-	case CTNIL:
-		v = Val{}
-		v.U = ""
-	}
-
-	return v
-}
-
-func consttype(n *Node) int {
-	if n == nil || n.Op != OLITERAL {
-		return -1
-	}
-	return int(n.Val().Ctype())
-}
-
-func Isconst(n *Node, ct int) bool {
-	t := consttype(n)
-
-	// If the caller is asking for CTINT, allow CTRUNE too.
-	// Makes life easier for back ends.
-	return t == ct || (ct == CTINT && t == CTRUNE)
-}
-
-func saveorig(n *Node) *Node {
-	if n == n.Orig {
-		// duplicate node for n->orig.
-		n1 := Nod(OLITERAL, nil, nil)
-
-		n.Orig = n1
-		*n1 = *n
-	}
-
-	return n.Orig
-}
-
-/*
- * if n is constant, rewrite as OLITERAL node.
- */
-func evconst(n *Node) {
-	// pick off just the opcodes that can be
-	// constant evaluated.
-	switch n.Op {
-	default:
-		return
-
-	case OADD,
-		OAND,
-		OANDAND,
-		OANDNOT,
-		OARRAYBYTESTR,
-		OCOM,
-		ODIV,
-		OEQ,
-		OGE,
-		OGT,
-		OLE,
-		OLSH,
-		OLT,
-		OMINUS,
-		OMOD,
-		OMUL,
-		ONE,
-		ONOT,
-		OOR,
-		OOROR,
-		OPLUS,
-		ORSH,
-		OSUB,
-		OXOR:
-		break
-
-	case OCONV:
-		if n.Type == nil {
-			return
-		}
-		if !okforconst[n.Type.Etype] && n.Type.Etype != TNIL {
-			return
-		}
-
-		// merge adjacent constants in the argument list.
-	case OADDSTR:
-		var nr *Node
-		var nl *Node
-		var l2 *NodeList
-		for l1 := n.List; l1 != nil; l1 = l1.Next {
-			if Isconst(l1.N, CTSTR) && l1.Next != nil && Isconst(l1.Next.N, CTSTR) {
-				// merge from l1 up to but not including l2
-				var strs []string
-				l2 = l1
-				for l2 != nil && Isconst(l2.N, CTSTR) {
-					nr = l2.N
-					strs = append(strs, nr.Val().U.(string))
-					l2 = l2.Next
-				}
-
-				nl = Nod(OXXX, nil, nil)
-				*nl = *l1.N
-				nl.Orig = nl
-				nl.SetVal(Val{strings.Join(strs, "")})
-				l1.N = nl
-				l1.Next = l2
-			}
-		}
-
-		// fix list end pointer.
-		for l2 := n.List; l2 != nil; l2 = l2.Next {
-			n.List.End = l2
-		}
-
-		// collapse single-constant list to single constant.
-		if count(n.List) == 1 && Isconst(n.List.N, CTSTR) {
-			n.Op = OLITERAL
-			n.SetVal(n.List.N.Val())
-		}
-
-		return
-	}
-
-	nl := n.Left
-	if nl == nil || nl.Type == nil {
-		return
-	}
-	if consttype(nl) < 0 {
-		return
-	}
-	wl := int(nl.Type.Etype)
-	if Isint[wl] || Isfloat[wl] || Iscomplex[wl] {
-		wl = TIDEAL
-	}
-
-	nr := n.Right
-	var rv Val
-	var lno int
-	var wr int
-	var v Val
-	var norig *Node
-	if nr == nil {
-		// copy numeric value to avoid modifying
-		// nl, in case someone still refers to it (e.g. iota).
-		v = nl.Val()
-
-		if wl == TIDEAL {
-			v = copyval(v)
-		}
-
-		switch uint32(n.Op)<<16 | uint32(v.Ctype()) {
-		default:
-			if n.Diag == 0 {
-				Yyerror("illegal constant expression %v %v", Oconv(int(n.Op), 0), nl.Type)
-				n.Diag = 1
-			}
-
-			return
-
-		case OCONV<<16 | CTNIL,
-			OARRAYBYTESTR<<16 | CTNIL:
-			if n.Type.Etype == TSTRING {
-				v = tostr(v)
-				nl.Type = n.Type
-				break
-			}
-			fallthrough
-
-			// fall through
-		case OCONV<<16 | CTINT,
-			OCONV<<16 | CTRUNE,
-			OCONV<<16 | CTFLT,
-			OCONV<<16 | CTSTR:
-			convlit1(&nl, n.Type, true)
-
-			v = nl.Val()
-
-		case OPLUS<<16 | CTINT,
-			OPLUS<<16 | CTRUNE:
-			break
-
-		case OMINUS<<16 | CTINT,
-			OMINUS<<16 | CTRUNE:
-			mpnegfix(v.U.(*Mpint))
-
-		case OCOM<<16 | CTINT,
-			OCOM<<16 | CTRUNE:
-			et := Txxx
-			if nl.Type != nil {
-				et = int(nl.Type.Etype)
-			}
-
-			// calculate the mask in b
-			// result will be (a ^ mask)
-			var b Mpint
-			switch et {
-			// signed guys change sign
-			default:
-				Mpmovecfix(&b, -1)
-
-				// unsigned guys invert their bits
-			case TUINT8,
-				TUINT16,
-				TUINT32,
-				TUINT64,
-				TUINT,
-				TUINTPTR:
-				mpmovefixfix(&b, Maxintval[et])
-			}
-
-			mpxorfixfix(v.U.(*Mpint), &b)
-
-		case OPLUS<<16 | CTFLT:
-			break
-
-		case OMINUS<<16 | CTFLT:
-			mpnegflt(v.U.(*Mpflt))
-
-		case OPLUS<<16 | CTCPLX:
-			break
-
-		case OMINUS<<16 | CTCPLX:
-			mpnegflt(&v.U.(*Mpcplx).Real)
-			mpnegflt(&v.U.(*Mpcplx).Imag)
-
-		case ONOT<<16 | CTBOOL:
-			if !v.U.(bool) {
-				goto settrue
-			}
-			goto setfalse
-		}
-		goto ret
-	}
-	if nr.Type == nil {
-		return
-	}
-	if consttype(nr) < 0 {
-		return
-	}
-	wr = int(nr.Type.Etype)
-	if Isint[wr] || Isfloat[wr] || Iscomplex[wr] {
-		wr = TIDEAL
-	}
-
-	// check for compatible general types (numeric, string, etc)
-	if wl != wr {
-		goto illegal
-	}
-
-	// check for compatible types.
-	switch n.Op {
-	// ideal const mixes with anything but otherwise must match.
-	default:
-		if nl.Type.Etype != TIDEAL {
-			defaultlit(&nr, nl.Type)
-			n.Right = nr
-		}
-
-		if nr.Type.Etype != TIDEAL {
-			defaultlit(&nl, nr.Type)
-			n.Left = nl
-		}
-
-		if nl.Type.Etype != nr.Type.Etype {
-			goto illegal
-		}
-
-		// right must be unsigned.
-	// left can be ideal.
-	case OLSH, ORSH:
-		defaultlit(&nr, Types[TUINT])
-
-		n.Right = nr
-		if nr.Type != nil && (Issigned[nr.Type.Etype] || !Isint[nr.Type.Etype]) {
-			goto illegal
-		}
-		if nl.Val().Ctype() != CTRUNE {
-			nl.SetVal(toint(nl.Val()))
-		}
-		nr.SetVal(toint(nr.Val()))
-	}
-
-	// copy numeric value to avoid modifying
-	// n->left, in case someone still refers to it (e.g. iota).
-	v = nl.Val()
-
-	if wl == TIDEAL {
-		v = copyval(v)
-	}
-
-	rv = nr.Val()
-
-	// convert to common ideal
-	if v.Ctype() == CTCPLX || rv.Ctype() == CTCPLX {
-		v = tocplx(v)
-		rv = tocplx(rv)
-	}
-
-	if v.Ctype() == CTFLT || rv.Ctype() == CTFLT {
-		v = toflt(v)
-		rv = toflt(rv)
-	}
-
-	// Rune and int turns into rune.
-	if v.Ctype() == CTRUNE && rv.Ctype() == CTINT {
-		i := new(Mpint)
-		mpmovefixfix(i, rv.U.(*Mpint))
-		i.Rune = true
-		rv.U = i
-	}
-	if v.Ctype() == CTINT && rv.Ctype() == CTRUNE {
-		if n.Op == OLSH || n.Op == ORSH {
-			i := new(Mpint)
-			mpmovefixfix(i, rv.U.(*Mpint))
-			rv.U = i
-		} else {
-			i := new(Mpint)
-			mpmovefixfix(i, v.U.(*Mpint))
-			i.Rune = true
-			v.U = i
-		}
-	}
-
-	if v.Ctype() != rv.Ctype() {
-		// Use of undefined name as constant?
-		if (v.Ctype() == 0 || rv.Ctype() == 0) && nerrors > 0 {
-			return
-		}
-		Fatal("constant type mismatch %v(%d) %v(%d)", nl.Type, v.Ctype(), nr.Type, rv.Ctype())
-	}
-
-	// run op
-	switch uint32(n.Op)<<16 | uint32(v.Ctype()) {
-	default:
-		goto illegal
-
-	case OADD<<16 | CTINT,
-		OADD<<16 | CTRUNE:
-		mpaddfixfix(v.U.(*Mpint), rv.U.(*Mpint), 0)
-
-	case OSUB<<16 | CTINT,
-		OSUB<<16 | CTRUNE:
-		mpsubfixfix(v.U.(*Mpint), rv.U.(*Mpint))
-
-	case OMUL<<16 | CTINT,
-		OMUL<<16 | CTRUNE:
-		mpmulfixfix(v.U.(*Mpint), rv.U.(*Mpint))
-
-	case ODIV<<16 | CTINT,
-		ODIV<<16 | CTRUNE:
-		if mpcmpfixc(rv.U.(*Mpint), 0) == 0 {
-			Yyerror("division by zero")
-			mpsetovf(v.U.(*Mpint))
-			break
-		}
-
-		mpdivfixfix(v.U.(*Mpint), rv.U.(*Mpint))
-
-	case OMOD<<16 | CTINT,
-		OMOD<<16 | CTRUNE:
-		if mpcmpfixc(rv.U.(*Mpint), 0) == 0 {
-			Yyerror("division by zero")
-			mpsetovf(v.U.(*Mpint))
-			break
-		}
-
-		mpmodfixfix(v.U.(*Mpint), rv.U.(*Mpint))
-
-	case OLSH<<16 | CTINT,
-		OLSH<<16 | CTRUNE:
-		mplshfixfix(v.U.(*Mpint), rv.U.(*Mpint))
-
-	case ORSH<<16 | CTINT,
-		ORSH<<16 | CTRUNE:
-		mprshfixfix(v.U.(*Mpint), rv.U.(*Mpint))
-
-	case OOR<<16 | CTINT,
-		OOR<<16 | CTRUNE:
-		mporfixfix(v.U.(*Mpint), rv.U.(*Mpint))
-
-	case OAND<<16 | CTINT,
-		OAND<<16 | CTRUNE:
-		mpandfixfix(v.U.(*Mpint), rv.U.(*Mpint))
-
-	case OANDNOT<<16 | CTINT,
-		OANDNOT<<16 | CTRUNE:
-		mpandnotfixfix(v.U.(*Mpint), rv.U.(*Mpint))
-
-	case OXOR<<16 | CTINT,
-		OXOR<<16 | CTRUNE:
-		mpxorfixfix(v.U.(*Mpint), rv.U.(*Mpint))
-
-	case OADD<<16 | CTFLT:
-		mpaddfltflt(v.U.(*Mpflt), rv.U.(*Mpflt))
-
-	case OSUB<<16 | CTFLT:
-		mpsubfltflt(v.U.(*Mpflt), rv.U.(*Mpflt))
-
-	case OMUL<<16 | CTFLT:
-		mpmulfltflt(v.U.(*Mpflt), rv.U.(*Mpflt))
-
-	case ODIV<<16 | CTFLT:
-		if mpcmpfltc(rv.U.(*Mpflt), 0) == 0 {
-			Yyerror("division by zero")
-			Mpmovecflt(v.U.(*Mpflt), 1.0)
-			break
-		}
-
-		mpdivfltflt(v.U.(*Mpflt), rv.U.(*Mpflt))
-
-		// The default case above would print 'ideal % ideal',
-	// which is not quite an ideal error.
-	case OMOD<<16 | CTFLT:
-		if n.Diag == 0 {
-			Yyerror("illegal constant expression: floating-point %% operation")
-			n.Diag = 1
-		}
-
-		return
-
-	case OADD<<16 | CTCPLX:
-		mpaddfltflt(&v.U.(*Mpcplx).Real, &rv.U.(*Mpcplx).Real)
-		mpaddfltflt(&v.U.(*Mpcplx).Imag, &rv.U.(*Mpcplx).Imag)
-
-	case OSUB<<16 | CTCPLX:
-		mpsubfltflt(&v.U.(*Mpcplx).Real, &rv.U.(*Mpcplx).Real)
-		mpsubfltflt(&v.U.(*Mpcplx).Imag, &rv.U.(*Mpcplx).Imag)
-
-	case OMUL<<16 | CTCPLX:
-		cmplxmpy(v.U.(*Mpcplx), rv.U.(*Mpcplx))
-
-	case ODIV<<16 | CTCPLX:
-		if mpcmpfltc(&rv.U.(*Mpcplx).Real, 0) == 0 && mpcmpfltc(&rv.U.(*Mpcplx).Imag, 0) == 0 {
-			Yyerror("complex division by zero")
-			Mpmovecflt(&rv.U.(*Mpcplx).Real, 1.0)
-			Mpmovecflt(&rv.U.(*Mpcplx).Imag, 0.0)
-			break
-		}
-
-		cmplxdiv(v.U.(*Mpcplx), rv.U.(*Mpcplx))
-
-	case OEQ<<16 | CTNIL:
-		goto settrue
-
-	case ONE<<16 | CTNIL:
-		goto setfalse
-
-	case OEQ<<16 | CTINT,
-		OEQ<<16 | CTRUNE:
-		if Mpcmpfixfix(v.U.(*Mpint), rv.U.(*Mpint)) == 0 {
-			goto settrue
-		}
-		goto setfalse
-
-	case ONE<<16 | CTINT,
-		ONE<<16 | CTRUNE:
-		if Mpcmpfixfix(v.U.(*Mpint), rv.U.(*Mpint)) != 0 {
-			goto settrue
-		}
-		goto setfalse
-
-	case OLT<<16 | CTINT,
-		OLT<<16 | CTRUNE:
-		if Mpcmpfixfix(v.U.(*Mpint), rv.U.(*Mpint)) < 0 {
-			goto settrue
-		}
-		goto setfalse
-
-	case OLE<<16 | CTINT,
-		OLE<<16 | CTRUNE:
-		if Mpcmpfixfix(v.U.(*Mpint), rv.U.(*Mpint)) <= 0 {
-			goto settrue
-		}
-		goto setfalse
-
-	case OGE<<16 | CTINT,
-		OGE<<16 | CTRUNE:
-		if Mpcmpfixfix(v.U.(*Mpint), rv.U.(*Mpint)) >= 0 {
-			goto settrue
-		}
-		goto setfalse
-
-	case OGT<<16 | CTINT,
-		OGT<<16 | CTRUNE:
-		if Mpcmpfixfix(v.U.(*Mpint), rv.U.(*Mpint)) > 0 {
-			goto settrue
-		}
-		goto setfalse
-
-	case OEQ<<16 | CTFLT:
-		if mpcmpfltflt(v.U.(*Mpflt), rv.U.(*Mpflt)) == 0 {
-			goto settrue
-		}
-		goto setfalse
-
-	case ONE<<16 | CTFLT:
-		if mpcmpfltflt(v.U.(*Mpflt), rv.U.(*Mpflt)) != 0 {
-			goto settrue
-		}
-		goto setfalse
-
-	case OLT<<16 | CTFLT:
-		if mpcmpfltflt(v.U.(*Mpflt), rv.U.(*Mpflt)) < 0 {
-			goto settrue
-		}
-		goto setfalse
-
-	case OLE<<16 | CTFLT:
-		if mpcmpfltflt(v.U.(*Mpflt), rv.U.(*Mpflt)) <= 0 {
-			goto settrue
-		}
-		goto setfalse
-
-	case OGE<<16 | CTFLT:
-		if mpcmpfltflt(v.U.(*Mpflt), rv.U.(*Mpflt)) >= 0 {
-			goto settrue
-		}
-		goto setfalse
-
-	case OGT<<16 | CTFLT:
-		if mpcmpfltflt(v.U.(*Mpflt), rv.U.(*Mpflt)) > 0 {
-			goto settrue
-		}
-		goto setfalse
-
-	case OEQ<<16 | CTCPLX:
-		if mpcmpfltflt(&v.U.(*Mpcplx).Real, &rv.U.(*Mpcplx).Real) == 0 && mpcmpfltflt(&v.U.(*Mpcplx).Imag, &rv.U.(*Mpcplx).Imag) == 0 {
-			goto settrue
-		}
-		goto setfalse
-
-	case ONE<<16 | CTCPLX:
-		if mpcmpfltflt(&v.U.(*Mpcplx).Real, &rv.U.(*Mpcplx).Real) != 0 || mpcmpfltflt(&v.U.(*Mpcplx).Imag, &rv.U.(*Mpcplx).Imag) != 0 {
-			goto settrue
-		}
-		goto setfalse
-
-	case OEQ<<16 | CTSTR:
-		if cmpslit(nl, nr) == 0 {
-			goto settrue
-		}
-		goto setfalse
-
-	case ONE<<16 | CTSTR:
-		if cmpslit(nl, nr) != 0 {
-			goto settrue
-		}
-		goto setfalse
-
-	case OLT<<16 | CTSTR:
-		if cmpslit(nl, nr) < 0 {
-			goto settrue
-		}
-		goto setfalse
-
-	case OLE<<16 | CTSTR:
-		if cmpslit(nl, nr) <= 0 {
-			goto settrue
-		}
-		goto setfalse
-
-	case OGE<<16 | CTSTR:
-		if cmpslit(nl, nr) >= 0 {
-			goto settrue
-		}
-		goto setfalse
-
-	case OGT<<16 | CTSTR:
-		if cmpslit(nl, nr) > 0 {
-			goto settrue
-		}
-		goto setfalse
-
-	case OOROR<<16 | CTBOOL:
-		if v.U.(bool) || rv.U.(bool) {
-			goto settrue
-		}
-		goto setfalse
-
-	case OANDAND<<16 | CTBOOL:
-		if v.U.(bool) && rv.U.(bool) {
-			goto settrue
-		}
-		goto setfalse
-
-	case OEQ<<16 | CTBOOL:
-		if v.U.(bool) == rv.U.(bool) {
-			goto settrue
-		}
-		goto setfalse
-
-	case ONE<<16 | CTBOOL:
-		if v.U.(bool) != rv.U.(bool) {
-			goto settrue
-		}
-		goto setfalse
-	}
-
-	goto ret
-
-ret:
-	norig = saveorig(n)
-	*n = *nl
-
-	// restore value of n->orig.
-	n.Orig = norig
-
-	n.SetVal(v)
-
-	// check range.
-	lno = int(setlineno(n))
-
-	overflow(v, n.Type)
-	lineno = int32(lno)
-
-	// truncate precision for non-ideal float.
-	if v.Ctype() == CTFLT && n.Type.Etype != TIDEAL {
-		n.SetVal(Val{truncfltlit(v.U.(*Mpflt), n.Type)})
-	}
-	return
-
-settrue:
-	norig = saveorig(n)
-	*n = *Nodbool(true)
-	n.Orig = norig
-	return
-
-setfalse:
-	norig = saveorig(n)
-	*n = *Nodbool(false)
-	n.Orig = norig
-	return
-
-illegal:
-	if n.Diag == 0 {
-		Yyerror("illegal constant expression: %v %v %v", nl.Type, Oconv(int(n.Op), 0), nr.Type)
-		n.Diag = 1
-	}
-
-	return
-}
-
-func nodlit(v Val) *Node {
-	n := Nod(OLITERAL, nil, nil)
-	n.SetVal(v)
-	switch v.Ctype() {
-	default:
-		Fatal("nodlit ctype %d", v.Ctype())
-
-	case CTSTR:
-		n.Type = idealstring
-
-	case CTBOOL:
-		n.Type = idealbool
-
-	case CTINT, CTRUNE, CTFLT, CTCPLX:
-		n.Type = Types[TIDEAL]
-
-	case CTNIL:
-		n.Type = Types[TNIL]
-	}
-
-	return n
-}
-
-func nodcplxlit(r Val, i Val) *Node {
-	r = toflt(r)
-	i = toflt(i)
-
-	c := new(Mpcplx)
-	n := Nod(OLITERAL, nil, nil)
-	n.Type = Types[TIDEAL]
-	n.SetVal(Val{c})
-
-	if r.Ctype() != CTFLT || i.Ctype() != CTFLT {
-		Fatal("nodcplxlit ctype %d/%d", r.Ctype(), i.Ctype())
-	}
-
-	mpmovefltflt(&c.Real, r.U.(*Mpflt))
-	mpmovefltflt(&c.Imag, i.U.(*Mpflt))
-	return n
-}
-
-// idealkind returns a constant kind like consttype
-// but for an arbitrary "ideal" (untyped constant) expression.
-func idealkind(n *Node) int {
-	if n == nil || !isideal(n.Type) {
-		return CTxxx
-	}
-
-	switch n.Op {
-	default:
-		return CTxxx
-
-	case OLITERAL:
-		return int(n.Val().Ctype())
-
-		// numeric kinds.
-	case OADD,
-		OAND,
-		OANDNOT,
-		OCOM,
-		ODIV,
-		OMINUS,
-		OMOD,
-		OMUL,
-		OSUB,
-		OXOR,
-		OOR,
-		OPLUS:
-		k1 := idealkind(n.Left)
-
-		k2 := idealkind(n.Right)
-		if k1 > k2 {
-			return k1
-		} else {
-			return k2
-		}
-
-	case OREAL, OIMAG:
-		return CTFLT
-
-	case OCOMPLEX:
-		return CTCPLX
-
-	case OADDSTR:
-		return CTSTR
-
-	case OANDAND,
-		OEQ,
-		OGE,
-		OGT,
-		OLE,
-		OLT,
-		ONE,
-		ONOT,
-		OOROR,
-		OCMPSTR,
-		OCMPIFACE:
-		return CTBOOL
-
-		// shifts (beware!).
-	case OLSH, ORSH:
-		return idealkind(n.Left)
-	}
-}
-
-func defaultlit(np **Node, t *Type) {
-	n := *np
-	if n == nil || !isideal(n.Type) {
-		return
-	}
-
-	if n.Op == OLITERAL {
-		nn := Nod(OXXX, nil, nil)
-		*nn = *n
-		n = nn
-		*np = n
-	}
-
-	lno := int(setlineno(n))
-	ctype := idealkind(n)
-	var t1 *Type
-	switch ctype {
-	default:
-		if t != nil {
-			Convlit(np, t)
-			return
-		}
-
-		if n.Val().Ctype() == CTNIL {
-			lineno = int32(lno)
-			if n.Diag == 0 {
-				Yyerror("use of untyped nil")
-				n.Diag = 1
-			}
-
-			n.Type = nil
-			break
-		}
-
-		if n.Val().Ctype() == CTSTR {
-			t1 := Types[TSTRING]
-			Convlit(np, t1)
-			break
-		}
-
-		Yyerror("defaultlit: unknown literal: %v", n)
-
-	case CTxxx:
-		Fatal("defaultlit: idealkind is CTxxx: %v", Nconv(n, obj.FmtSign))
-
-	case CTBOOL:
-		t1 := Types[TBOOL]
-		if t != nil && t.Etype == TBOOL {
-			t1 = t
-		}
-		Convlit(np, t1)
-
-	case CTINT:
-		t1 = Types[TINT]
-		goto num
-
-	case CTRUNE:
-		t1 = runetype
-		goto num
-
-	case CTFLT:
-		t1 = Types[TFLOAT64]
-		goto num
-
-	case CTCPLX:
-		t1 = Types[TCOMPLEX128]
-		goto num
-	}
-
-	lineno = int32(lno)
-	return
-
-num:
-	if t != nil {
-		if Isint[t.Etype] {
-			t1 = t
-			n.SetVal(toint(n.Val()))
-		} else if Isfloat[t.Etype] {
-			t1 = t
-			n.SetVal(toflt(n.Val()))
-		} else if Iscomplex[t.Etype] {
-			t1 = t
-			n.SetVal(tocplx(n.Val()))
-		}
-	}
-
-	overflow(n.Val(), t1)
-	Convlit(np, t1)
-	lineno = int32(lno)
-	return
-}
-
-/*
- * defaultlit on both nodes simultaneously;
- * if they're both ideal going in they better
- * get the same type going out.
- * force means must assign concrete (non-ideal) type.
- */
-func defaultlit2(lp **Node, rp **Node, force int) {
-	l := *lp
-	r := *rp
-	if l.Type == nil || r.Type == nil {
-		return
-	}
-	if !isideal(l.Type) {
-		Convlit(rp, l.Type)
-		return
-	}
-
-	if !isideal(r.Type) {
-		Convlit(lp, r.Type)
-		return
-	}
-
-	if force == 0 {
-		return
-	}
-	if l.Type.Etype == TBOOL {
-		Convlit(lp, Types[TBOOL])
-		Convlit(rp, Types[TBOOL])
-	}
-
-	lkind := idealkind(l)
-	rkind := idealkind(r)
-	if lkind == CTCPLX || rkind == CTCPLX {
-		Convlit(lp, Types[TCOMPLEX128])
-		Convlit(rp, Types[TCOMPLEX128])
-		return
-	}
-
-	if lkind == CTFLT || rkind == CTFLT {
-		Convlit(lp, Types[TFLOAT64])
-		Convlit(rp, Types[TFLOAT64])
-		return
-	}
-
-	if lkind == CTRUNE || rkind == CTRUNE {
-		Convlit(lp, runetype)
-		Convlit(rp, runetype)
-		return
-	}
-
-	Convlit(lp, Types[TINT])
-	Convlit(rp, Types[TINT])
-}
-
-func cmpslit(l, r *Node) int {
-	return stringsCompare(l.Val().U.(string), r.Val().U.(string))
-}
-
-func Smallintconst(n *Node) bool {
-	if n.Op == OLITERAL && Isconst(n, CTINT) && n.Type != nil {
-		switch Simtype[n.Type.Etype] {
-		case TINT8,
-			TUINT8,
-			TINT16,
-			TUINT16,
-			TINT32,
-			TUINT32,
-			TBOOL,
-			TPTR32:
-			return true
-
-		case TIDEAL, TINT64, TUINT64, TPTR64:
-			if Mpcmpfixfix(n.Val().U.(*Mpint), Minintval[TINT32]) < 0 || Mpcmpfixfix(n.Val().U.(*Mpint), Maxintval[TINT32]) > 0 {
-				break
-			}
-			return true
-		}
-	}
-
-	return false
-}
-
-func nonnegconst(n *Node) int {
-	if n.Op == OLITERAL && n.Type != nil {
-		switch Simtype[n.Type.Etype] {
-		// check negative and 2^31
-		case TINT8,
-			TUINT8,
-			TINT16,
-			TUINT16,
-			TINT32,
-			TUINT32,
-			TINT64,
-			TUINT64,
-			TIDEAL:
-			if Mpcmpfixfix(n.Val().U.(*Mpint), Minintval[TUINT32]) < 0 || Mpcmpfixfix(n.Val().U.(*Mpint), Maxintval[TINT32]) > 0 {
-				break
-			}
-			return int(Mpgetfix(n.Val().U.(*Mpint)))
-		}
-	}
-
-	return -1
-}
-
-/*
- * convert x to type et and back to int64
- * for sign extension and truncation.
- */
-func iconv(x int64, et int) int64 {
-	switch et {
-	case TINT8:
-		x = int64(int8(x))
-
-	case TUINT8:
-		x = int64(uint8(x))
-
-	case TINT16:
-		x = int64(int16(x))
-
-	case TUINT16:
-		x = int64(uint64(x))
-
-	case TINT32:
-		x = int64(int32(x))
-
-	case TUINT32:
-		x = int64(uint32(x))
-
-	case TINT64, TUINT64:
-		break
-	}
-
-	return x
-}
-
-// Convconst converts constant node n to type t and
-// places the result in con.
-func (n *Node) Convconst(con *Node, t *Type) {
-	tt := Simsimtype(t)
-
-	// copy the constant for conversion
-	Nodconst(con, Types[TINT8], 0)
-
-	con.Type = t
-	con.SetVal(n.Val())
-
-	if Isint[tt] {
-		con.SetVal(Val{new(Mpint)})
-		var i int64
-		switch n.Val().Ctype() {
-		default:
-			Fatal("convconst ctype=%d %v", n.Val().Ctype(), Tconv(t, obj.FmtLong))
-
-		case CTINT, CTRUNE:
-			i = Mpgetfix(n.Val().U.(*Mpint))
-
-		case CTBOOL:
-			i = int64(obj.Bool2int(n.Val().U.(bool)))
-
-		case CTNIL:
-			i = 0
-		}
-
-		i = iconv(i, tt)
-		Mpmovecfix(con.Val().U.(*Mpint), i)
-		return
-	}
-
-	if Isfloat[tt] {
-		con.SetVal(toflt(con.Val()))
-		if con.Val().Ctype() != CTFLT {
-			Fatal("convconst ctype=%d %v", con.Val().Ctype(), t)
-		}
-		if tt == TFLOAT32 {
-			con.SetVal(Val{truncfltlit(con.Val().U.(*Mpflt), t)})
-		}
-		return
-	}
-
-	if Iscomplex[tt] {
-		con.SetVal(tocplx(con.Val()))
-		if tt == TCOMPLEX64 {
-			con.Val().U.(*Mpcplx).Real = *truncfltlit(&con.Val().U.(*Mpcplx).Real, Types[TFLOAT32])
-			con.Val().U.(*Mpcplx).Imag = *truncfltlit(&con.Val().U.(*Mpcplx).Imag, Types[TFLOAT32])
-		}
-		return
-	}
-
-	Fatal("convconst %v constant", Tconv(t, obj.FmtLong))
-}
-
-// complex multiply v *= rv
-//	(a, b) * (c, d) = (a*c - b*d, b*c + a*d)
-func cmplxmpy(v *Mpcplx, rv *Mpcplx) {
-	var ac Mpflt
-	var bd Mpflt
-	var bc Mpflt
-	var ad Mpflt
-
-	mpmovefltflt(&ac, &v.Real)
-	mpmulfltflt(&ac, &rv.Real) // ac
-
-	mpmovefltflt(&bd, &v.Imag)
-
-	mpmulfltflt(&bd, &rv.Imag) // bd
-
-	mpmovefltflt(&bc, &v.Imag)
-
-	mpmulfltflt(&bc, &rv.Real) // bc
-
-	mpmovefltflt(&ad, &v.Real)
-
-	mpmulfltflt(&ad, &rv.Imag) // ad
-
-	mpmovefltflt(&v.Real, &ac)
-
-	mpsubfltflt(&v.Real, &bd) // ac-bd
-
-	mpmovefltflt(&v.Imag, &bc)
-
-	mpaddfltflt(&v.Imag, &ad) // bc+ad
-}
-
-// complex divide v /= rv
-//	(a, b) / (c, d) = ((a*c + b*d), (b*c - a*d))/(c*c + d*d)
-func cmplxdiv(v *Mpcplx, rv *Mpcplx) {
-	var ac Mpflt
-	var bd Mpflt
-	var bc Mpflt
-	var ad Mpflt
-	var cc_plus_dd Mpflt
-
-	mpmovefltflt(&cc_plus_dd, &rv.Real)
-	mpmulfltflt(&cc_plus_dd, &rv.Real) // cc
-
-	mpmovefltflt(&ac, &rv.Imag)
-
-	mpmulfltflt(&ac, &rv.Imag) // dd
-
-	mpaddfltflt(&cc_plus_dd, &ac) // cc+dd
-
-	mpmovefltflt(&ac, &v.Real)
-
-	mpmulfltflt(&ac, &rv.Real) // ac
-
-	mpmovefltflt(&bd, &v.Imag)
-
-	mpmulfltflt(&bd, &rv.Imag) // bd
-
-	mpmovefltflt(&bc, &v.Imag)
-
-	mpmulfltflt(&bc, &rv.Real) // bc
-
-	mpmovefltflt(&ad, &v.Real)
-
-	mpmulfltflt(&ad, &rv.Imag) // ad
-
-	mpmovefltflt(&v.Real, &ac)
-
-	mpaddfltflt(&v.Real, &bd)         // ac+bd
-	mpdivfltflt(&v.Real, &cc_plus_dd) // (ac+bd)/(cc+dd)
-
-	mpmovefltflt(&v.Imag, &bc)
-
-	mpsubfltflt(&v.Imag, &ad)         // bc-ad
-	mpdivfltflt(&v.Imag, &cc_plus_dd) // (bc+ad)/(cc+dd)
-}
-
-// Is n a Go language constant (as opposed to a compile-time constant)?
-// Expressions derived from nil, like string([]byte(nil)), while they
-// may be known at compile time, are not Go language constants.
-// Only called for expressions known to evaluated to compile-time
-// constants.
-func isgoconst(n *Node) bool {
-	if n.Orig != nil {
-		n = n.Orig
-	}
-
-	switch n.Op {
-	case OADD,
-		OADDSTR,
-		OAND,
-		OANDAND,
-		OANDNOT,
-		OCOM,
-		ODIV,
-		OEQ,
-		OGE,
-		OGT,
-		OLE,
-		OLSH,
-		OLT,
-		OMINUS,
-		OMOD,
-		OMUL,
-		ONE,
-		ONOT,
-		OOR,
-		OOROR,
-		OPLUS,
-		ORSH,
-		OSUB,
-		OXOR,
-		OIOTA,
-		OCOMPLEX,
-		OREAL,
-		OIMAG:
-		if isgoconst(n.Left) && (n.Right == nil || isgoconst(n.Right)) {
-			return true
-		}
-
-	case OCONV:
-		if okforconst[n.Type.Etype] && isgoconst(n.Left) {
-			return true
-		}
-
-	case OLEN, OCAP:
-		l := n.Left
-		if isgoconst(l) {
-			return true
-		}
-
-		// Special case: len/cap is constant when applied to array or
-		// pointer to array when the expression does not contain
-		// function calls or channel receive operations.
-		t := l.Type
-
-		if t != nil && Isptr[t.Etype] {
-			t = t.Type
-		}
-		if Isfixedarray(t) && !hascallchan(l) {
-			return true
-		}
-
-	case OLITERAL:
-		if n.Val().Ctype() != CTNIL {
-			return true
-		}
-
-	case ONAME:
-		l := n.Sym.Def
-		if l != nil && l.Op == OLITERAL && n.Val().Ctype() != CTNIL {
-			return true
-		}
-
-	case ONONAME:
-		if n.Sym.Def != nil && n.Sym.Def.Op == OIOTA {
-			return true
-		}
-
-		// Only constant calls are unsafe.Alignof, Offsetof, and Sizeof.
-	case OCALL:
-		l := n.Left
-
-		for l.Op == OPAREN {
-			l = l.Left
-		}
-		if l.Op != ONAME || l.Sym.Pkg != unsafepkg {
-			break
-		}
-		if l.Sym.Name == "Alignof" || l.Sym.Name == "Offsetof" || l.Sym.Name == "Sizeof" {
-			return true
-		}
-	}
-
-	//dump("nonconst", n);
-	return false
-}
-
-func hascallchan(n *Node) bool {
-	if n == nil {
-		return false
-	}
-	switch n.Op {
-	case OAPPEND,
-		OCALL,
-		OCALLFUNC,
-		OCALLINTER,
-		OCALLMETH,
-		OCAP,
-		OCLOSE,
-		OCOMPLEX,
-		OCOPY,
-		ODELETE,
-		OIMAG,
-		OLEN,
-		OMAKE,
-		ONEW,
-		OPANIC,
-		OPRINT,
-		OPRINTN,
-		OREAL,
-		ORECOVER,
-		ORECV:
-		return true
-	}
-
-	if hascallchan(n.Left) || hascallchan(n.Right) {
-		return true
-	}
-
-	for l := n.List; l != nil; l = l.Next {
-		if hascallchan(l.N) {
-			return true
-		}
-	}
-	for l := n.Rlist; l != nil; l = l.Next {
-		if hascallchan(l.N) {
-			return true
-		}
-	}
-
-	return false
-}
diff --git a/src/cmd/compile/internal/gc/cplx.go b/src/cmd/compile/internal/gc/cplx.go
deleted file mode 100644
index 1643f26..0000000
--- a/src/cmd/compile/internal/gc/cplx.go
+++ /dev/null
@@ -1,479 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import "cmd/internal/obj"
-
-func overlap_cplx(f *Node, t *Node) bool {
-	// check whether f and t could be overlapping stack references.
-	// not exact, because it's hard to check for the stack register
-	// in portable code.  close enough: worst case we will allocate
-	// an extra temporary and the registerizer will clean it up.
-	return f.Op == OINDREG && t.Op == OINDREG && f.Xoffset+f.Type.Width >= t.Xoffset && t.Xoffset+t.Type.Width >= f.Xoffset
-}
-
-func complexbool(op int, nl, nr, res *Node, wantTrue bool, likely int, to *obj.Prog) {
-	// make both sides addable in ullman order
-	if nr != nil {
-		if nl.Ullman > nr.Ullman && !nl.Addable {
-			nl = CgenTemp(nl)
-		}
-
-		if !nr.Addable {
-			nr = CgenTemp(nr)
-		}
-	}
-	if !nl.Addable {
-		nl = CgenTemp(nl)
-	}
-
-	// Break nl and nr into real and imaginary components.
-	var lreal, limag, rreal, rimag Node
-	subnode(&lreal, &limag, nl)
-	subnode(&rreal, &rimag, nr)
-
-	// build tree
-	// if branching:
-	// 	real(l) == real(r) && imag(l) == imag(r)
-	// if generating a value, use a branch-free version:
-	// 	real(l) == real(r) & imag(l) == imag(r)
-	realeq := Node{
-		Op:    OEQ,
-		Left:  &lreal,
-		Right: &rreal,
-		Type:  Types[TBOOL],
-	}
-	imageq := Node{
-		Op:    OEQ,
-		Left:  &limag,
-		Right: &rimag,
-		Type:  Types[TBOOL],
-	}
-	and := Node{
-		Op:    OANDAND,
-		Left:  &realeq,
-		Right: &imageq,
-		Type:  Types[TBOOL],
-	}
-
-	if res != nil {
-		// generating a value
-		and.Op = OAND
-		if op == ONE {
-			and.Op = OOR
-			realeq.Op = ONE
-			imageq.Op = ONE
-		}
-		Bvgen(&and, res, true)
-		return
-	}
-
-	// generating a branch
-	if op == ONE {
-		wantTrue = !wantTrue
-	}
-
-	Bgen(&and, wantTrue, likely, to)
-}
-
-// break addable nc-complex into nr-real and ni-imaginary
-func subnode(nr *Node, ni *Node, nc *Node) {
-	if !nc.Addable {
-		Fatal("subnode not addable")
-	}
-
-	tc := Simsimtype(nc.Type)
-	tc = cplxsubtype(tc)
-	t := Types[tc]
-
-	if nc.Op == OLITERAL {
-		nodfconst(nr, t, &nc.Val().U.(*Mpcplx).Real)
-		nodfconst(ni, t, &nc.Val().U.(*Mpcplx).Imag)
-		return
-	}
-
-	*nr = *nc
-	nr.Type = t
-
-	*ni = *nc
-	ni.Type = t
-	ni.Xoffset += t.Width
-}
-
-// generate code res = -nl
-func minus(nl *Node, res *Node) {
-	var ra Node
-	ra.Op = OMINUS
-	ra.Left = nl
-	ra.Type = nl.Type
-	Cgen(&ra, res)
-}
-
-// build and execute tree
-//	real(res) = -real(nl)
-//	imag(res) = -imag(nl)
-func complexminus(nl *Node, res *Node) {
-	var n1 Node
-	var n2 Node
-	var n5 Node
-	var n6 Node
-
-	subnode(&n1, &n2, nl)
-	subnode(&n5, &n6, res)
-
-	minus(&n1, &n5)
-	minus(&n2, &n6)
-}
-
-// build and execute tree
-//	real(res) = real(nl) op real(nr)
-//	imag(res) = imag(nl) op imag(nr)
-func complexadd(op int, nl *Node, nr *Node, res *Node) {
-	var n1 Node
-	var n2 Node
-	var n3 Node
-	var n4 Node
-	var n5 Node
-	var n6 Node
-
-	subnode(&n1, &n2, nl)
-	subnode(&n3, &n4, nr)
-	subnode(&n5, &n6, res)
-
-	var ra Node
-	ra.Op = uint8(op)
-	ra.Left = &n1
-	ra.Right = &n3
-	ra.Type = n1.Type
-	Cgen(&ra, &n5)
-
-	ra = Node{}
-	ra.Op = uint8(op)
-	ra.Left = &n2
-	ra.Right = &n4
-	ra.Type = n2.Type
-	Cgen(&ra, &n6)
-}
-
-// build and execute tree
-//	tmp       = real(nl)*real(nr) - imag(nl)*imag(nr)
-//	imag(res) = real(nl)*imag(nr) + imag(nl)*real(nr)
-//	real(res) = tmp
-func complexmul(nl *Node, nr *Node, res *Node) {
-	var n1 Node
-	var n2 Node
-	var n3 Node
-	var n4 Node
-	var n5 Node
-	var n6 Node
-	var tmp Node
-
-	subnode(&n1, &n2, nl)
-	subnode(&n3, &n4, nr)
-	subnode(&n5, &n6, res)
-	Tempname(&tmp, n5.Type)
-
-	// real part -> tmp
-	var rm1 Node
-
-	rm1.Op = OMUL
-	rm1.Left = &n1
-	rm1.Right = &n3
-	rm1.Type = n1.Type
-
-	var rm2 Node
-	rm2.Op = OMUL
-	rm2.Left = &n2
-	rm2.Right = &n4
-	rm2.Type = n2.Type
-
-	var ra Node
-	ra.Op = OSUB
-	ra.Left = &rm1
-	ra.Right = &rm2
-	ra.Type = rm1.Type
-	Cgen(&ra, &tmp)
-
-	// imag part
-	rm1 = Node{}
-
-	rm1.Op = OMUL
-	rm1.Left = &n1
-	rm1.Right = &n4
-	rm1.Type = n1.Type
-
-	rm2 = Node{}
-	rm2.Op = OMUL
-	rm2.Left = &n2
-	rm2.Right = &n3
-	rm2.Type = n2.Type
-
-	ra = Node{}
-	ra.Op = OADD
-	ra.Left = &rm1
-	ra.Right = &rm2
-	ra.Type = rm1.Type
-	Cgen(&ra, &n6)
-
-	// tmp ->real part
-	Cgen(&tmp, &n5)
-}
-
-func nodfconst(n *Node, t *Type, fval *Mpflt) {
-	*n = Node{}
-	n.Op = OLITERAL
-	n.Addable = true
-	ullmancalc(n)
-	n.SetVal(Val{fval})
-	n.Type = t
-
-	if !Isfloat[t.Etype] {
-		Fatal("nodfconst: bad type %v", t)
-	}
-}
-
-func Complexop(n *Node, res *Node) bool {
-	if n != nil && n.Type != nil {
-		if Iscomplex[n.Type.Etype] {
-			goto maybe
-		}
-	}
-
-	if res != nil && res.Type != nil {
-		if Iscomplex[res.Type.Etype] {
-			goto maybe
-		}
-	}
-
-	if n.Op == OREAL || n.Op == OIMAG {
-		//dump("\ncomplex-yes", n);
-		return true
-	}
-
-	//dump("\ncomplex-no", n);
-	return false
-
-maybe:
-	switch n.Op {
-	case OCONV, // implemented ops
-		OADD,
-		OSUB,
-		OMUL,
-		OMINUS,
-		OCOMPLEX,
-		OREAL,
-		OIMAG:
-		//dump("\ncomplex-yes", n);
-		return true
-
-	case ODOT,
-		ODOTPTR,
-		OINDEX,
-		OIND,
-		ONAME:
-		//dump("\ncomplex-yes", n);
-		return true
-	}
-
-	//dump("\ncomplex-no", n);
-	return false
-}
-
-func Complexmove(f *Node, t *Node) {
-	if Debug['g'] != 0 {
-		Dump("\ncomplexmove-f", f)
-		Dump("complexmove-t", t)
-	}
-
-	if !t.Addable {
-		Fatal("complexmove: to not addable")
-	}
-
-	ft := Simsimtype(f.Type)
-	tt := Simsimtype(t.Type)
-	switch uint32(ft)<<16 | uint32(tt) {
-	default:
-		Fatal("complexmove: unknown conversion: %v -> %v\n", f.Type, t.Type)
-
-		// complex to complex move/convert.
-	// make f addable.
-	// also use temporary if possible stack overlap.
-	case TCOMPLEX64<<16 | TCOMPLEX64,
-		TCOMPLEX64<<16 | TCOMPLEX128,
-		TCOMPLEX128<<16 | TCOMPLEX64,
-		TCOMPLEX128<<16 | TCOMPLEX128:
-		if !f.Addable || overlap_cplx(f, t) {
-			var tmp Node
-			Tempname(&tmp, f.Type)
-			Complexmove(f, &tmp)
-			f = &tmp
-		}
-
-		var n1 Node
-		var n2 Node
-		subnode(&n1, &n2, f)
-		var n4 Node
-		var n3 Node
-		subnode(&n3, &n4, t)
-
-		Cgen(&n1, &n3)
-		Cgen(&n2, &n4)
-	}
-}
-
-func Complexgen(n *Node, res *Node) {
-	if Debug['g'] != 0 {
-		Dump("\ncomplexgen-n", n)
-		Dump("complexgen-res", res)
-	}
-
-	for n.Op == OCONVNOP {
-		n = n.Left
-	}
-
-	// pick off float/complex opcodes
-	switch n.Op {
-	case OCOMPLEX:
-		if res.Addable {
-			var n1 Node
-			var n2 Node
-			subnode(&n1, &n2, res)
-			var tmp Node
-			Tempname(&tmp, n1.Type)
-			Cgen(n.Left, &tmp)
-			Cgen(n.Right, &n2)
-			Cgen(&tmp, &n1)
-			return
-		}
-
-	case OREAL, OIMAG:
-		nl := n.Left
-		if !nl.Addable {
-			var tmp Node
-			Tempname(&tmp, nl.Type)
-			Complexgen(nl, &tmp)
-			nl = &tmp
-		}
-
-		var n1 Node
-		var n2 Node
-		subnode(&n1, &n2, nl)
-		if n.Op == OREAL {
-			Cgen(&n1, res)
-			return
-		}
-
-		Cgen(&n2, res)
-		return
-	}
-
-	// perform conversion from n to res
-	tl := Simsimtype(res.Type)
-
-	tl = cplxsubtype(tl)
-	tr := Simsimtype(n.Type)
-	tr = cplxsubtype(tr)
-	if tl != tr {
-		if !n.Addable {
-			var n1 Node
-			Tempname(&n1, n.Type)
-			Complexmove(n, &n1)
-			n = &n1
-		}
-
-		Complexmove(n, res)
-		return
-	}
-
-	if !res.Addable {
-		var n1 Node
-		Igen(res, &n1, nil)
-		Cgen(n, &n1)
-		Regfree(&n1)
-		return
-	}
-
-	if n.Addable {
-		Complexmove(n, res)
-		return
-	}
-
-	switch n.Op {
-	default:
-		Dump("complexgen: unknown op", n)
-		Fatal("complexgen: unknown op %v", Oconv(int(n.Op), 0))
-
-	case ODOT,
-		ODOTPTR,
-		OINDEX,
-		OIND,
-		ONAME, // PHEAP or PPARAMREF var
-		OCALLFUNC,
-		OCALLMETH,
-		OCALLINTER:
-		var n1 Node
-		Igen(n, &n1, res)
-
-		Complexmove(&n1, res)
-		Regfree(&n1)
-		return
-
-	case OCONV,
-		OADD,
-		OSUB,
-		OMUL,
-		OMINUS,
-		OCOMPLEX,
-		OREAL,
-		OIMAG:
-		break
-	}
-
-	nl := n.Left
-	if nl == nil {
-		return
-	}
-	nr := n.Right
-
-	// make both sides addable in ullman order
-	var tnl Node
-	if nr != nil {
-		if nl.Ullman > nr.Ullman && !nl.Addable {
-			Tempname(&tnl, nl.Type)
-			Cgen(nl, &tnl)
-			nl = &tnl
-		}
-
-		if !nr.Addable {
-			var tnr Node
-			Tempname(&tnr, nr.Type)
-			Cgen(nr, &tnr)
-			nr = &tnr
-		}
-	}
-
-	if !nl.Addable {
-		Tempname(&tnl, nl.Type)
-		Cgen(nl, &tnl)
-		nl = &tnl
-	}
-
-	switch n.Op {
-	default:
-		Fatal("complexgen: unknown op %v", Oconv(int(n.Op), 0))
-
-	case OCONV:
-		Complexmove(nl, res)
-
-	case OMINUS:
-		complexminus(nl, res)
-
-	case OADD, OSUB:
-		complexadd(int(n.Op), nl, nr, res)
-
-	case OMUL:
-		complexmul(nl, nr, res)
-	}
-}
diff --git a/src/cmd/compile/internal/gc/dcl.go b/src/cmd/compile/internal/gc/dcl.go
deleted file mode 100644
index c8864f3..0000000
--- a/src/cmd/compile/internal/gc/dcl.go
+++ /dev/null
@@ -1,1513 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-	"strings"
-)
-
-func dflag() bool {
-	if Debug['d'] == 0 {
-		return false
-	}
-	if Debug['y'] != 0 {
-		return true
-	}
-	if incannedimport != 0 {
-		return false
-	}
-	return true
-}
-
-/*
- * declaration stack & operations
- */
-func dcopy(a *Sym, b *Sym) {
-	a.Pkg = b.Pkg
-	a.Name = b.Name
-	a.Def = b.Def
-	a.Block = b.Block
-	a.Lastlineno = b.Lastlineno
-}
-
-func push() *Sym {
-	d := new(Sym)
-	d.Lastlineno = lineno
-	d.Link = dclstack
-	dclstack = d
-	return d
-}
-
-func pushdcl(s *Sym) *Sym {
-	d := push()
-	dcopy(d, s)
-	if dflag() {
-		fmt.Printf("\t%v push %v %p\n", Ctxt.Line(int(lineno)), s, s.Def)
-	}
-	return d
-}
-
-func popdcl() {
-	var d *Sym
-	var s *Sym
-	var lno int
-
-	//	if(dflag())
-	//		print("revert\n");
-
-	for d = dclstack; d != nil; d = d.Link {
-		if d.Name == "" {
-			break
-		}
-		s = Pkglookup(d.Name, d.Pkg)
-		lno = int(s.Lastlineno)
-		dcopy(s, d)
-		d.Lastlineno = int32(lno)
-		if dflag() {
-			fmt.Printf("\t%v pop %v %p\n", Ctxt.Line(int(lineno)), s, s.Def)
-		}
-	}
-
-	if d == nil {
-		Fatal("popdcl: no mark")
-	}
-	dclstack = d.Link
-	block = d.Block
-}
-
-func poptodcl() {
-	// pop the old marker and push a new one
-	// (cannot reuse the existing one)
-	// because we use the markers to identify blocks
-	// for the goto restriction checks.
-	popdcl()
-
-	markdcl()
-}
-
-func markdcl() {
-	d := push()
-	d.Name = "" // used as a mark in fifo
-	d.Block = block
-
-	blockgen++
-	block = blockgen
-}
-
-//	if(dflag())
-//		print("markdcl\n");
-func dumpdcl(st string) {
-	var s *Sym
-
-	i := 0
-	for d := dclstack; d != nil; d = d.Link {
-		i++
-		fmt.Printf("    %.2d %p", i, d)
-		if d.Name == "" {
-			fmt.Printf("\n")
-			continue
-		}
-
-		fmt.Printf(" '%s'", d.Name)
-		s = Pkglookup(d.Name, d.Pkg)
-		fmt.Printf(" %v\n", s)
-	}
-}
-
-func testdclstack() {
-	for d := dclstack; d != nil; d = d.Link {
-		if d.Name == "" {
-			if nerrors != 0 {
-				errorexit()
-			}
-			Yyerror("mark left on the stack")
-			continue
-		}
-	}
-}
-
-func redeclare(s *Sym, where string) {
-	if s.Lastlineno == 0 {
-		var tmp string
-		if s.Origpkg != nil {
-			tmp = s.Origpkg.Path
-		} else {
-			tmp = s.Pkg.Path
-		}
-		pkgstr := tmp
-		Yyerror("%v redeclared %s\n"+"\tprevious declaration during import %q", s, where, pkgstr)
-	} else {
-		line1 := parserline()
-		line2 := int(s.Lastlineno)
-
-		// When an import and a declaration collide in separate files,
-		// present the import as the "redeclared", because the declaration
-		// is visible where the import is, but not vice versa.
-		// See issue 4510.
-		if s.Def == nil {
-			line2 = line1
-			line1 = int(s.Lastlineno)
-		}
-
-		yyerrorl(int(line1), "%v redeclared %s\n"+"\tprevious declaration at %v", s, where, Ctxt.Line(line2))
-	}
-}
-
-var vargen int
-
-/*
- * declare individual names - var, typ, const
- */
-
-var declare_typegen int
-
-func declare(n *Node, ctxt uint8) {
-	if ctxt == PDISCARD {
-		return
-	}
-
-	if isblank(n) {
-		return
-	}
-
-	if n.Name == nil {
-		// named OLITERAL needs Name; most OLITERALs don't.
-		n.Name = new(Name)
-	}
-	n.Lineno = int32(parserline())
-	s := n.Sym
-
-	// kludgy: typecheckok means we're past parsing.  Eg genwrapper may declare out of package names later.
-	if importpkg == nil && typecheckok == 0 && s.Pkg != localpkg {
-		Yyerror("cannot declare name %v", s)
-	}
-
-	if ctxt == PEXTERN && s.Name == "init" {
-		Yyerror("cannot declare init - must be func")
-	}
-
-	gen := 0
-	if ctxt == PEXTERN {
-		externdcl = list(externdcl, n)
-		if dflag() {
-			fmt.Printf("\t%v global decl %v %p\n", Ctxt.Line(int(lineno)), s, n)
-		}
-	} else {
-		if Curfn == nil && ctxt == PAUTO {
-			Fatal("automatic outside function")
-		}
-		if Curfn != nil {
-			Curfn.Func.Dcl = list(Curfn.Func.Dcl, n)
-		}
-		if n.Op == OTYPE {
-			declare_typegen++
-			gen = declare_typegen
-		} else if n.Op == ONAME && ctxt == PAUTO && !strings.Contains(s.Name, "·") {
-			vargen++
-			gen = vargen
-		}
-		pushdcl(s)
-		n.Name.Curfn = Curfn
-	}
-
-	if ctxt == PAUTO {
-		n.Xoffset = 0
-	}
-
-	if s.Block == block {
-		// functype will print errors about duplicate function arguments.
-		// Don't repeat the error here.
-		if ctxt != PPARAM && ctxt != PPARAMOUT {
-			redeclare(s, "in this block")
-		}
-	}
-
-	s.Block = block
-	s.Lastlineno = int32(parserline())
-	s.Def = n
-	n.Name.Vargen = int32(gen)
-	n.Name.Funcdepth = Funcdepth
-	n.Class = uint8(ctxt)
-
-	autoexport(n, ctxt)
-}
-
-func addvar(n *Node, t *Type, ctxt uint8) {
-	if n == nil || n.Sym == nil || (n.Op != ONAME && n.Op != ONONAME) || t == nil {
-		Fatal("addvar: n=%v t=%v nil", n, t)
-	}
-
-	n.Op = ONAME
-	declare(n, ctxt)
-	n.Type = t
-}
-
-/*
- * declare variables from grammar
- * new_name_list (type | [type] = expr_list)
- */
-func variter(vl *NodeList, t *Node, el *NodeList) *NodeList {
-	var init *NodeList
-	doexpr := el != nil
-
-	if count(el) == 1 && count(vl) > 1 {
-		e := el.N
-		as2 := Nod(OAS2, nil, nil)
-		as2.List = vl
-		as2.Rlist = list1(e)
-		var v *Node
-		for ; vl != nil; vl = vl.Next {
-			v = vl.N
-			v.Op = ONAME
-			declare(v, dclcontext)
-			v.Name.Param.Ntype = t
-			v.Name.Defn = as2
-			if Funcdepth > 0 {
-				init = list(init, Nod(ODCL, v, nil))
-			}
-		}
-
-		return list(init, as2)
-	}
-
-	var v *Node
-	var e *Node
-	for ; vl != nil; vl = vl.Next {
-		if doexpr {
-			if el == nil {
-				Yyerror("missing expression in var declaration")
-				break
-			}
-
-			e = el.N
-			el = el.Next
-		} else {
-			e = nil
-		}
-
-		v = vl.N
-		v.Op = ONAME
-		declare(v, dclcontext)
-		v.Name.Param.Ntype = t
-
-		if e != nil || Funcdepth > 0 || isblank(v) {
-			if Funcdepth > 0 {
-				init = list(init, Nod(ODCL, v, nil))
-			}
-			e = Nod(OAS, v, e)
-			init = list(init, e)
-			if e.Right != nil {
-				v.Name.Defn = e
-			}
-		}
-	}
-
-	if el != nil {
-		Yyerror("extra expression in var declaration")
-	}
-	return init
-}
-
-/*
- * declare constants from grammar
- * new_name_list [[type] = expr_list]
- */
-func constiter(vl *NodeList, t *Node, cl *NodeList) *NodeList {
-	lno := int32(0) // default is to leave line number alone in listtreecopy
-	if cl == nil {
-		if t != nil {
-			Yyerror("const declaration cannot have type without expression")
-		}
-		cl = lastconst
-		t = lasttype
-		lno = vl.N.Lineno
-	} else {
-		lastconst = cl
-		lasttype = t
-	}
-	cl = listtreecopy(cl, lno)
-
-	var v *Node
-	var c *Node
-	var vv *NodeList
-	for ; vl != nil; vl = vl.Next {
-		if cl == nil {
-			Yyerror("missing value in const declaration")
-			break
-		}
-
-		c = cl.N
-		cl = cl.Next
-
-		v = vl.N
-		v.Op = OLITERAL
-		declare(v, dclcontext)
-
-		v.Name.Param.Ntype = t
-		v.Name.Defn = c
-
-		vv = list(vv, Nod(ODCLCONST, v, nil))
-	}
-
-	if cl != nil {
-		Yyerror("extra expression in const declaration")
-	}
-	iota_ += 1
-	return vv
-}
-
-/*
- * this generates a new name node,
- * typically for labels or other one-off names.
- */
-func newname(s *Sym) *Node {
-	if s == nil {
-		Fatal("newname nil")
-	}
-
-	n := Nod(ONAME, nil, nil)
-	n.Sym = s
-	n.Type = nil
-	n.Addable = true
-	n.Ullman = 1
-	n.Xoffset = 0
-	return n
-}
-
-// newfuncname generates a new name node for a function or method.
-// TODO(rsc): Use an ODCLFUNC node instead. See comment in CL 7360.
-func newfuncname(s *Sym) *Node {
-	n := newname(s)
-	n.Func = new(Func)
-	n.Func.FCurfn = Curfn
-	return n
-}
-
-/*
- * this generates a new name node for a name
- * being declared.
- */
-func dclname(s *Sym) *Node {
-	n := newname(s)
-	n.Op = ONONAME // caller will correct it
-	return n
-}
-
-func typenod(t *Type) *Node {
-	// if we copied another type with *t = *u
-	// then t->nod might be out of date, so
-	// check t->nod->type too
-	if t.Nod == nil || t.Nod.Type != t {
-		t.Nod = Nod(OTYPE, nil, nil)
-		t.Nod.Type = t
-		t.Nod.Sym = t.Sym
-	}
-
-	return t.Nod
-}
-
-/*
- * this will return an old name
- * that has already been pushed on the
- * declaration list. a diagnostic is
- * generated if no name has been defined.
- */
-func oldname(s *Sym) *Node {
-	n := s.Def
-	if n == nil {
-		// maybe a top-level name will come along
-		// to give this a definition later.
-		// walkdef will check s->def again once
-		// all the input source has been processed.
-		n = newname(s)
-		n.Op = ONONAME
-		n.Name.Iota = iota_ // save current iota value in const declarations
-	}
-
-	if Curfn != nil && n.Op == ONAME && n.Name.Funcdepth > 0 && n.Name.Funcdepth != Funcdepth {
-		// inner func is referring to var in outer func.
-		//
-		// TODO(rsc): If there is an outer variable x and we
-		// are parsing x := 5 inside the closure, until we get to
-		// the := it looks like a reference to the outer x so we'll
-		// make x a closure variable unnecessarily.
-		if n.Name.Param.Closure == nil || n.Name.Param.Closure.Name.Funcdepth != Funcdepth {
-			// create new closure var.
-			c := Nod(ONAME, nil, nil)
-
-			c.Sym = s
-			c.Class = PPARAMREF
-			c.Isddd = n.Isddd
-			c.Name.Defn = n
-			c.Addable = false
-			c.Ullman = 2
-			c.Name.Funcdepth = Funcdepth
-			c.Name.Param.Outer = n.Name.Param.Closure
-			n.Name.Param.Closure = c
-			c.Name.Param.Closure = n
-			c.Xoffset = 0
-			Curfn.Func.Cvars = list(Curfn.Func.Cvars, c)
-		}
-
-		// return ref to closure var, not original
-		return n.Name.Param.Closure
-	}
-
-	return n
-}
-
-/*
- * := declarations
- */
-func colasname(n *Node) bool {
-	switch n.Op {
-	case ONAME,
-		ONONAME,
-		OPACK,
-		OTYPE,
-		OLITERAL:
-		return n.Sym != nil
-	}
-
-	return false
-}
-
-func colasdefn(left *NodeList, defn *Node) {
-	for l := left; l != nil; l = l.Next {
-		if l.N.Sym != nil {
-			l.N.Sym.Flags |= SymUniq
-		}
-	}
-
-	nnew := 0
-	nerr := 0
-	var n *Node
-	for l := left; l != nil; l = l.Next {
-		n = l.N
-		if isblank(n) {
-			continue
-		}
-		if !colasname(n) {
-			yyerrorl(int(defn.Lineno), "non-name %v on left side of :=", n)
-			nerr++
-			continue
-		}
-
-		if n.Sym.Flags&SymUniq == 0 {
-			yyerrorl(int(defn.Lineno), "%v repeated on left side of :=", n.Sym)
-			n.Diag++
-			nerr++
-			continue
-		}
-
-		n.Sym.Flags &^= SymUniq
-		if n.Sym.Block == block {
-			continue
-		}
-
-		nnew++
-		n = newname(n.Sym)
-		declare(n, dclcontext)
-		n.Name.Defn = defn
-		defn.Ninit = list(defn.Ninit, Nod(ODCL, n, nil))
-		l.N = n
-	}
-
-	if nnew == 0 && nerr == 0 {
-		yyerrorl(int(defn.Lineno), "no new variables on left side of :=")
-	}
-}
-
-func colas(left *NodeList, right *NodeList, lno int32) *Node {
-	as := Nod(OAS2, nil, nil)
-	as.List = left
-	as.Rlist = right
-	as.Colas = true
-	as.Lineno = lno
-	colasdefn(left, as)
-
-	// make the tree prettier; not necessary
-	if count(left) == 1 && count(right) == 1 {
-		as.Left = as.List.N
-		as.Right = as.Rlist.N
-		as.List = nil
-		as.Rlist = nil
-		as.Op = OAS
-	}
-
-	return as
-}
-
-/*
- * declare the arguments in an
- * interface field declaration.
- */
-func ifacedcl(n *Node) {
-	if n.Op != ODCLFIELD || n.Right == nil {
-		Fatal("ifacedcl")
-	}
-
-	if isblank(n.Left) {
-		Yyerror("methods must have a unique non-blank name")
-	}
-
-	n.Func = new(Func)
-	n.Func.FCurfn = Curfn
-	dclcontext = PPARAM
-	markdcl()
-	Funcdepth++
-	n.Func.Outer = Curfn
-	Curfn = n
-	funcargs(n.Right)
-
-	// funcbody is normally called after the parser has
-	// seen the body of a function but since an interface
-	// field declaration does not have a body, we must
-	// call it now to pop the current declaration context.
-	dclcontext = PAUTO
-
-	funcbody(n)
-}
-
-/*
- * declare the function proper
- * and declare the arguments.
- * called in extern-declaration context
- * returns in auto-declaration context.
- */
-func funchdr(n *Node) {
-	// change the declaration context from extern to auto
-	if Funcdepth == 0 && dclcontext != PEXTERN {
-		Fatal("funchdr: dclcontext")
-	}
-
-	if importpkg == nil && n.Func.Nname != nil {
-		makefuncsym(n.Func.Nname.Sym)
-	}
-
-	dclcontext = PAUTO
-	markdcl()
-	Funcdepth++
-
-	n.Func.Outer = Curfn
-	Curfn = n
-
-	if n.Func.Nname != nil {
-		funcargs(n.Func.Nname.Name.Param.Ntype)
-	} else if n.Func.Ntype != nil {
-		funcargs(n.Func.Ntype)
-	} else {
-		funcargs2(n.Type)
-	}
-}
-
-func funcargs(nt *Node) {
-	if nt.Op != OTFUNC {
-		Fatal("funcargs %v", Oconv(int(nt.Op), 0))
-	}
-
-	// re-start the variable generation number
-	// we want to use small numbers for the return variables,
-	// so let them have the chunk starting at 1.
-	vargen = count(nt.Rlist)
-
-	// declare the receiver and in arguments.
-	// no n->defn because type checking of func header
-	// will not fill in the types until later
-	if nt.Left != nil {
-		n := nt.Left
-		if n.Op != ODCLFIELD {
-			Fatal("funcargs receiver %v", Oconv(int(n.Op), 0))
-		}
-		if n.Left != nil {
-			n.Left.Op = ONAME
-			n.Left.Name.Param.Ntype = n.Right
-			declare(n.Left, PPARAM)
-			if dclcontext == PAUTO {
-				vargen++
-				n.Left.Name.Vargen = int32(vargen)
-			}
-		}
-	}
-
-	var n *Node
-	for l := nt.List; l != nil; l = l.Next {
-		n = l.N
-		if n.Op != ODCLFIELD {
-			Fatal("funcargs in %v", Oconv(int(n.Op), 0))
-		}
-		if n.Left != nil {
-			n.Left.Op = ONAME
-			n.Left.Name.Param.Ntype = n.Right
-			declare(n.Left, PPARAM)
-			if dclcontext == PAUTO {
-				vargen++
-				n.Left.Name.Vargen = int32(vargen)
-			}
-		}
-	}
-
-	// declare the out arguments.
-	gen := count(nt.List)
-	var i int = 0
-	var nn *Node
-	for l := nt.Rlist; l != nil; l = l.Next {
-		n = l.N
-
-		if n.Op != ODCLFIELD {
-			Fatal("funcargs out %v", Oconv(int(n.Op), 0))
-		}
-
-		if n.Left == nil {
-			// Name so that escape analysis can track it. ~r stands for 'result'.
-			n.Left = newname(Lookupf("~r%d", gen))
-			gen++
-		}
-
-		// TODO: n->left->missing = 1;
-		n.Left.Op = ONAME
-
-		if isblank(n.Left) {
-			// Give it a name so we can assign to it during return. ~b stands for 'blank'.
-			// The name must be different from ~r above because if you have
-			//	func f() (_ int)
-			//	func g() int
-			// f is allowed to use a plain 'return' with no arguments, while g is not.
-			// So the two cases must be distinguished.
-			// We do not record a pointer to the original node (n->orig).
-			// Having multiple names causes too much confusion in later passes.
-			nn = Nod(OXXX, nil, nil)
-
-			*nn = *n.Left
-			nn.Orig = nn
-			nn.Sym = Lookupf("~b%d", gen)
-			gen++
-			n.Left = nn
-		}
-
-		n.Left.Name.Param.Ntype = n.Right
-		declare(n.Left, PPARAMOUT)
-		if dclcontext == PAUTO {
-			i++
-			n.Left.Name.Vargen = int32(i)
-		}
-	}
-}
-
-/*
- * Same as funcargs, except run over an already constructed TFUNC.
- * This happens during import, where the hidden_fndcl rule has
- * used functype directly to parse the function's type.
- */
-func funcargs2(t *Type) {
-	if t.Etype != TFUNC {
-		Fatal("funcargs2 %v", t)
-	}
-
-	if t.Thistuple != 0 {
-		var n *Node
-		for ft := getthisx(t).Type; ft != nil; ft = ft.Down {
-			if ft.Nname == nil || ft.Nname.Sym == nil {
-				continue
-			}
-			n = ft.Nname // no need for newname(ft->nname->sym)
-			n.Type = ft.Type
-			declare(n, PPARAM)
-		}
-	}
-
-	if t.Intuple != 0 {
-		var n *Node
-		for ft := getinargx(t).Type; ft != nil; ft = ft.Down {
-			if ft.Nname == nil || ft.Nname.Sym == nil {
-				continue
-			}
-			n = ft.Nname
-			n.Type = ft.Type
-			declare(n, PPARAM)
-		}
-	}
-
-	if t.Outtuple != 0 {
-		var n *Node
-		for ft := getoutargx(t).Type; ft != nil; ft = ft.Down {
-			if ft.Nname == nil || ft.Nname.Sym == nil {
-				continue
-			}
-			n = ft.Nname
-			n.Type = ft.Type
-			declare(n, PPARAMOUT)
-		}
-	}
-}
-
-/*
- * finish the body.
- * called in auto-declaration context.
- * returns in extern-declaration context.
- */
-func funcbody(n *Node) {
-	// change the declaration context from auto to extern
-	if dclcontext != PAUTO {
-		Fatal("funcbody: dclcontext")
-	}
-	popdcl()
-	Funcdepth--
-	Curfn = n.Func.Outer
-	n.Func.Outer = nil
-	if Funcdepth == 0 {
-		dclcontext = PEXTERN
-	}
-}
-
-/*
- * new type being defined with name s.
- */
-func typedcl0(s *Sym) *Node {
-	n := newname(s)
-	n.Op = OTYPE
-	declare(n, dclcontext)
-	return n
-}
-
-/*
- * node n, which was returned by typedcl0
- * is being declared to have uncompiled type t.
- * return the ODCLTYPE node to use.
- */
-func typedcl1(n *Node, t *Node, local bool) *Node {
-	n.Name.Param.Ntype = t
-	n.Local = local
-	return Nod(ODCLTYPE, n, nil)
-}
-
-/*
- * structs, functions, and methods.
- * they don't belong here, but where do they belong?
- */
-func checkembeddedtype(t *Type) {
-	if t == nil {
-		return
-	}
-
-	if t.Sym == nil && Isptr[t.Etype] {
-		t = t.Type
-		if t.Etype == TINTER {
-			Yyerror("embedded type cannot be a pointer to interface")
-		}
-	}
-
-	if Isptr[t.Etype] {
-		Yyerror("embedded type cannot be a pointer")
-	} else if t.Etype == TFORW && t.Embedlineno == 0 {
-		t.Embedlineno = lineno
-	}
-}
-
-func structfield(n *Node) *Type {
-	lno := int(lineno)
-	lineno = n.Lineno
-
-	if n.Op != ODCLFIELD {
-		Fatal("structfield: oops %v\n", n)
-	}
-
-	f := typ(TFIELD)
-	f.Isddd = n.Isddd
-
-	if n.Right != nil {
-		typecheck(&n.Right, Etype)
-		n.Type = n.Right.Type
-		if n.Left != nil {
-			n.Left.Type = n.Type
-		}
-		if n.Embedded != 0 {
-			checkembeddedtype(n.Type)
-		}
-	}
-
-	n.Right = nil
-
-	f.Type = n.Type
-	if f.Type == nil {
-		f.Broke = 1
-	}
-
-	switch n.Val().Ctype() {
-	case CTSTR:
-		f.Note = new(string)
-		*f.Note = n.Val().U.(string)
-
-	default:
-		Yyerror("field annotation must be string")
-		fallthrough
-
-	case CTxxx:
-		f.Note = nil
-	}
-
-	if n.Left != nil && n.Left.Op == ONAME {
-		f.Nname = n.Left
-		f.Embedded = n.Embedded
-		f.Sym = f.Nname.Sym
-	}
-
-	lineno = int32(lno)
-	return f
-}
-
-var uniqgen uint32
-
-func checkdupfields(t *Type, what string) {
-	lno := int(lineno)
-
-	for ; t != nil; t = t.Down {
-		if t.Sym != nil && t.Nname != nil && !isblank(t.Nname) {
-			if t.Sym.Uniqgen == uniqgen {
-				lineno = t.Nname.Lineno
-				Yyerror("duplicate %s %s", what, t.Sym.Name)
-			} else {
-				t.Sym.Uniqgen = uniqgen
-			}
-		}
-	}
-
-	lineno = int32(lno)
-}
-
-/*
- * convert a parsed id/type list into
- * a type for struct/interface/arglist
- */
-func tostruct(l *NodeList) *Type {
-	var f *Type
-	t := typ(TSTRUCT)
-
-	for tp := &t.Type; l != nil; l = l.Next {
-		f = structfield(l.N)
-
-		*tp = f
-		tp = &f.Down
-	}
-
-	for f := t.Type; f != nil && t.Broke == 0; f = f.Down {
-		if f.Broke != 0 {
-			t.Broke = 1
-		}
-	}
-
-	uniqgen++
-	checkdupfields(t.Type, "field")
-
-	if t.Broke == 0 {
-		checkwidth(t)
-	}
-
-	return t
-}
-
-func tofunargs(l *NodeList) *Type {
-	var f *Type
-
-	t := typ(TSTRUCT)
-	t.Funarg = 1
-
-	for tp := &t.Type; l != nil; l = l.Next {
-		f = structfield(l.N)
-		f.Funarg = 1
-
-		// esc.c needs to find f given a PPARAM to add the tag.
-		if l.N.Left != nil && l.N.Left.Class == PPARAM {
-			l.N.Left.Name.Param.Field = f
-		}
-
-		*tp = f
-		tp = &f.Down
-	}
-
-	for f := t.Type; f != nil && t.Broke == 0; f = f.Down {
-		if f.Broke != 0 {
-			t.Broke = 1
-		}
-	}
-
-	return t
-}
-
-func interfacefield(n *Node) *Type {
-	lno := int(lineno)
-	lineno = n.Lineno
-
-	if n.Op != ODCLFIELD {
-		Fatal("interfacefield: oops %v\n", n)
-	}
-
-	if n.Val().Ctype() != CTxxx {
-		Yyerror("interface method cannot have annotation")
-	}
-
-	f := typ(TFIELD)
-	f.Isddd = n.Isddd
-
-	if n.Right != nil {
-		if n.Left != nil {
-			// queue resolution of method type for later.
-			// right now all we need is the name list.
-			// avoids cycles for recursive interface types.
-			n.Type = typ(TINTERMETH)
-
-			n.Type.Nname = n.Right
-			n.Left.Type = n.Type
-			queuemethod(n)
-
-			if n.Left.Op == ONAME {
-				f.Nname = n.Left
-				f.Embedded = n.Embedded
-				f.Sym = f.Nname.Sym
-			}
-		} else {
-			typecheck(&n.Right, Etype)
-			n.Type = n.Right.Type
-
-			if n.Embedded != 0 {
-				checkembeddedtype(n.Type)
-			}
-
-			if n.Type != nil {
-				switch n.Type.Etype {
-				case TINTER:
-					break
-
-				case TFORW:
-					Yyerror("interface type loop involving %v", n.Type)
-					f.Broke = 1
-
-				default:
-					Yyerror("interface contains embedded non-interface %v", n.Type)
-					f.Broke = 1
-				}
-			}
-		}
-	}
-
-	n.Right = nil
-
-	f.Type = n.Type
-	if f.Type == nil {
-		f.Broke = 1
-	}
-
-	lineno = int32(lno)
-	return f
-}
-
-func tointerface(l *NodeList) *Type {
-	var f *Type
-	var t1 *Type
-
-	t := typ(TINTER)
-
-	tp := &t.Type
-	for ; l != nil; l = l.Next {
-		f = interfacefield(l.N)
-
-		if l.N.Left == nil && f.Type.Etype == TINTER {
-			// embedded interface, inline methods
-			for t1 = f.Type.Type; t1 != nil; t1 = t1.Down {
-				f = typ(TFIELD)
-				f.Type = t1.Type
-				f.Broke = t1.Broke
-				f.Sym = t1.Sym
-				if f.Sym != nil {
-					f.Nname = newname(f.Sym)
-				}
-				*tp = f
-				tp = &f.Down
-			}
-		} else {
-			*tp = f
-			tp = &f.Down
-		}
-	}
-
-	for f := t.Type; f != nil && t.Broke == 0; f = f.Down {
-		if f.Broke != 0 {
-			t.Broke = 1
-		}
-	}
-
-	uniqgen++
-	checkdupfields(t.Type, "method")
-	t = sortinter(t)
-	checkwidth(t)
-
-	return t
-}
-
-func embedded(s *Sym, pkg *Pkg) *Node {
-	const (
-		CenterDot = 0xB7
-	)
-	// Names sometimes have disambiguation junk
-	// appended after a center dot.  Discard it when
-	// making the name for the embedded struct field.
-	name := s.Name
-
-	if i := strings.Index(s.Name, string(CenterDot)); i >= 0 {
-		name = s.Name[:i]
-	}
-
-	var n *Node
-	if exportname(name) {
-		n = newname(Lookup(name))
-	} else if s.Pkg == builtinpkg {
-		// The name of embedded builtins belongs to pkg.
-		n = newname(Pkglookup(name, pkg))
-	} else {
-		n = newname(Pkglookup(name, s.Pkg))
-	}
-	n = Nod(ODCLFIELD, n, oldname(s))
-	n.Embedded = 1
-	return n
-}
-
-/*
- * check that the list of declarations is either all anonymous or all named
- */
-func findtype(l *NodeList) *Node {
-	for ; l != nil; l = l.Next {
-		if l.N.Op == OKEY {
-			return l.N.Right
-		}
-	}
-	return nil
-}
-
-func checkarglist(all *NodeList, input int) *NodeList {
-	named := 0
-	for l := all; l != nil; l = l.Next {
-		if l.N.Op == OKEY {
-			named = 1
-			break
-		}
-	}
-
-	if named != 0 {
-		var n *Node
-		var l *NodeList
-		for l = all; l != nil; l = l.Next {
-			n = l.N
-			if n.Op != OKEY && n.Sym == nil {
-				Yyerror("mixed named and unnamed function parameters")
-				break
-			}
-		}
-
-		if l == nil && n != nil && n.Op != OKEY {
-			Yyerror("final function parameter must have type")
-		}
-	}
-
-	var nextt *Node
-	var t *Node
-	var n *Node
-	for l := all; l != nil; l = l.Next {
-		// can cache result from findtype to avoid
-		// quadratic behavior here, but unlikely to matter.
-		n = l.N
-
-		if named != 0 {
-			if n.Op == OKEY {
-				t = n.Right
-				n = n.Left
-				nextt = nil
-			} else {
-				if nextt == nil {
-					nextt = findtype(l)
-				}
-				t = nextt
-			}
-		} else {
-			t = n
-			n = nil
-		}
-
-		// during import l->n->op is OKEY, but l->n->left->sym == S
-		// means it was a '?', not that it was
-		// a lone type This doesn't matter for the exported
-		// declarations, which are parsed by rules that don't
-		// use checkargs, but can happen for func literals in
-		// the inline bodies.
-		// TODO(rsc) this can go when typefmt case TFIELD in exportmode fmt.c prints _ instead of ?
-		if importpkg != nil && n.Sym == nil {
-			n = nil
-		}
-
-		if n != nil && n.Sym == nil {
-			t = n
-			n = nil
-		}
-
-		if n != nil {
-			n = newname(n.Sym)
-		}
-		n = Nod(ODCLFIELD, n, t)
-		if n.Right != nil && n.Right.Op == ODDD {
-			if input == 0 {
-				Yyerror("cannot use ... in output argument list")
-			} else if l.Next != nil {
-				Yyerror("can only use ... as final argument in list")
-			}
-			n.Right.Op = OTARRAY
-			n.Right.Right = n.Right.Left
-			n.Right.Left = nil
-			n.Isddd = true
-			if n.Left != nil {
-				n.Left.Isddd = true
-			}
-		}
-
-		l.N = n
-	}
-
-	return all
-}
-
-func fakethis() *Node {
-	n := Nod(ODCLFIELD, nil, typenod(Ptrto(typ(TSTRUCT))))
-	return n
-}
-
-/*
- * Is this field a method on an interface?
- * Those methods have an anonymous
- * *struct{} as the receiver.
- * (See fakethis above.)
- */
-func isifacemethod(f *Type) bool {
-	rcvr := getthisx(f).Type
-	if rcvr.Sym != nil {
-		return false
-	}
-	t := rcvr.Type
-	if !Isptr[t.Etype] {
-		return false
-	}
-	t = t.Type
-	if t.Sym != nil || t.Etype != TSTRUCT || t.Type != nil {
-		return false
-	}
-	return true
-}
-
-/*
- * turn a parsed function declaration
- * into a type
- */
-func functype(this *Node, in *NodeList, out *NodeList) *Type {
-	t := typ(TFUNC)
-
-	var rcvr *NodeList
-	if this != nil {
-		rcvr = list1(this)
-	}
-	t.Type = tofunargs(rcvr)
-	t.Type.Down = tofunargs(out)
-	t.Type.Down.Down = tofunargs(in)
-
-	uniqgen++
-	checkdupfields(t.Type.Type, "argument")
-	checkdupfields(t.Type.Down.Type, "argument")
-	checkdupfields(t.Type.Down.Down.Type, "argument")
-
-	if t.Type.Broke != 0 || t.Type.Down.Broke != 0 || t.Type.Down.Down.Broke != 0 {
-		t.Broke = 1
-	}
-
-	if this != nil {
-		t.Thistuple = 1
-	}
-	t.Outtuple = count(out)
-	t.Intuple = count(in)
-	t.Outnamed = 0
-	if t.Outtuple > 0 && out.N.Left != nil && out.N.Left.Orig != nil {
-		s := out.N.Left.Orig.Sym
-		if s != nil && (s.Name[0] != '~' || s.Name[1] != 'r') { // ~r%d is the name invented for an unnamed result
-			t.Outnamed = 1
-		}
-	}
-
-	return t
-}
-
-var methodsym_toppkg *Pkg
-
-func methodsym(nsym *Sym, t0 *Type, iface int) *Sym {
-	var s *Sym
-	var p string
-	var suffix string
-	var spkg *Pkg
-
-	t := t0
-	if t == nil {
-		goto bad
-	}
-	s = t.Sym
-	if s == nil && Isptr[t.Etype] {
-		t = t.Type
-		if t == nil {
-			goto bad
-		}
-		s = t.Sym
-	}
-
-	spkg = nil
-	if s != nil {
-		spkg = s.Pkg
-	}
-
-	// if t0 == *t and t0 has a sym,
-	// we want to see *t, not t0, in the method name.
-	if t != t0 && t0.Sym != nil {
-		t0 = Ptrto(t)
-	}
-
-	suffix = ""
-	if iface != 0 {
-		dowidth(t0)
-		if t0.Width < Types[Tptr].Width {
-			suffix = "·i"
-		}
-	}
-
-	if (spkg == nil || nsym.Pkg != spkg) && !exportname(nsym.Name) {
-		if t0.Sym == nil && Isptr[t0.Etype] {
-			p = fmt.Sprintf("(%v).%s.%s%s", Tconv(t0, obj.FmtLeft|obj.FmtShort), nsym.Pkg.Prefix, nsym.Name, suffix)
-		} else {
-			p = fmt.Sprintf("%v.%s.%s%s", Tconv(t0, obj.FmtLeft|obj.FmtShort), nsym.Pkg.Prefix, nsym.Name, suffix)
-		}
-	} else {
-		if t0.Sym == nil && Isptr[t0.Etype] {
-			p = fmt.Sprintf("(%v).%s%s", Tconv(t0, obj.FmtLeft|obj.FmtShort), nsym.Name, suffix)
-		} else {
-			p = fmt.Sprintf("%v.%s%s", Tconv(t0, obj.FmtLeft|obj.FmtShort), nsym.Name, suffix)
-		}
-	}
-
-	if spkg == nil {
-		if methodsym_toppkg == nil {
-			methodsym_toppkg = mkpkg("go")
-		}
-		spkg = methodsym_toppkg
-	}
-
-	s = Pkglookup(p, spkg)
-
-	return s
-
-bad:
-	Yyerror("illegal receiver type: %v", t0)
-	return nil
-}
-
-func methodname(n *Node, t *Type) *Node {
-	s := methodsym(n.Sym, t, 0)
-	if s == nil {
-		return n
-	}
-	return newname(s)
-}
-
-func methodname1(n *Node, t *Node) *Node {
-	star := ""
-	if t.Op == OIND {
-		star = "*"
-		t = t.Left
-	}
-
-	if t.Sym == nil || isblank(n) {
-		return newfuncname(n.Sym)
-	}
-
-	var p string
-	if star != "" {
-		p = fmt.Sprintf("(%s%v).%v", star, t.Sym, n.Sym)
-	} else {
-		p = fmt.Sprintf("%v.%v", t.Sym, n.Sym)
-	}
-
-	if exportname(t.Sym.Name) {
-		n = newfuncname(Lookup(p))
-	} else {
-		n = newfuncname(Pkglookup(p, t.Sym.Pkg))
-	}
-
-	return n
-}
-
-/*
- * add a method, declared as a function,
- * n is fieldname, pa is base type, t is function type
- */
-func addmethod(sf *Sym, t *Type, local bool, nointerface bool) {
-	// get field sym
-	if sf == nil {
-		Fatal("no method symbol")
-	}
-
-	// get parent type sym
-	pa := getthisx(t).Type // ptr to this structure
-	if pa == nil {
-		Yyerror("missing receiver")
-		return
-	}
-
-	pa = pa.Type
-	f := methtype(pa, 1)
-	if f == nil {
-		t = pa
-		if t == nil { // rely on typecheck having complained before
-			return
-		}
-		if t != nil {
-			if Isptr[t.Etype] {
-				if t.Sym != nil {
-					Yyerror("invalid receiver type %v (%v is a pointer type)", pa, t)
-					return
-				}
-
-				t = t.Type
-			}
-
-			if t.Broke != 0 { // rely on typecheck having complained before
-				return
-			}
-			if t.Sym == nil {
-				Yyerror("invalid receiver type %v (%v is an unnamed type)", pa, t)
-				return
-			}
-
-			if Isptr[t.Etype] {
-				Yyerror("invalid receiver type %v (%v is a pointer type)", pa, t)
-				return
-			}
-
-			if t.Etype == TINTER {
-				Yyerror("invalid receiver type %v (%v is an interface type)", pa, t)
-				return
-			}
-		}
-
-		// Should have picked off all the reasons above,
-		// but just in case, fall back to generic error.
-		Yyerror("invalid receiver type %v (%v / %v)", pa, Tconv(pa, obj.FmtLong), Tconv(t, obj.FmtLong))
-
-		return
-	}
-
-	pa = f
-	if pa.Etype == TSTRUCT {
-		for f := pa.Type; f != nil; f = f.Down {
-			if f.Sym == sf {
-				Yyerror("type %v has both field and method named %v", pa, sf)
-				return
-			}
-		}
-	}
-
-	if local && !pa.Local {
-		// defining method on non-local type.
-		Yyerror("cannot define new methods on non-local type %v", pa)
-
-		return
-	}
-
-	n := Nod(ODCLFIELD, newname(sf), nil)
-	n.Type = t
-
-	var d *Type // last found
-	for f := pa.Method; f != nil; f = f.Down {
-		d = f
-		if f.Etype != TFIELD {
-			Fatal("addmethod: not TFIELD: %v", Tconv(f, obj.FmtLong))
-		}
-		if sf.Name != f.Sym.Name {
-			continue
-		}
-		if !Eqtype(t, f.Type) {
-			Yyerror("method redeclared: %v.%v\n\t%v\n\t%v", pa, sf, f.Type, t)
-		}
-		return
-	}
-
-	f = structfield(n)
-	f.Nointerface = nointerface
-
-	// during import unexported method names should be in the type's package
-	if importpkg != nil && f.Sym != nil && !exportname(f.Sym.Name) && f.Sym.Pkg != structpkg {
-		Fatal("imported method name %v in wrong package %s\n", Sconv(f.Sym, obj.FmtSign), structpkg.Name)
-	}
-
-	if d == nil {
-		pa.Method = f
-	} else {
-		d.Down = f
-	}
-	return
-}
-
-func funccompile(n *Node) {
-	Stksize = BADWIDTH
-	Maxarg = 0
-
-	if n.Type == nil {
-		if nerrors == 0 {
-			Fatal("funccompile missing type")
-		}
-		return
-	}
-
-	// assign parameter offsets
-	checkwidth(n.Type)
-
-	if Curfn != nil {
-		Fatal("funccompile %v inside %v", n.Func.Nname.Sym, Curfn.Func.Nname.Sym)
-	}
-
-	Stksize = 0
-	dclcontext = PAUTO
-	Funcdepth = n.Func.Depth + 1
-	compile(n)
-	Curfn = nil
-	Funcdepth = 0
-	dclcontext = PEXTERN
-}
-
-func funcsym(s *Sym) *Sym {
-	if s.Fsym != nil {
-		return s.Fsym
-	}
-
-	s1 := Pkglookup(s.Name+"·f", s.Pkg)
-	s.Fsym = s1
-	return s1
-}
-
-func makefuncsym(s *Sym) {
-	if isblanksym(s) {
-		return
-	}
-	if compiling_runtime != 0 && s.Name == "getg" {
-		// runtime.getg() is not a real function and so does
-		// not get a funcsym.
-		return
-	}
-	s1 := funcsym(s)
-	s1.Def = newfuncname(s1)
-	s1.Def.Func.Shortname = newname(s)
-	funcsyms = list(funcsyms, s1.Def)
-}
diff --git a/src/cmd/compile/internal/gc/esc.go b/src/cmd/compile/internal/gc/esc.go
deleted file mode 100644
index 4c4455f..0000000
--- a/src/cmd/compile/internal/gc/esc.go
+++ /dev/null
@@ -1,1821 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-	"strings"
-)
-
-// Run analysis on minimal sets of mutually recursive functions
-// or single non-recursive functions, bottom up.
-//
-// Finding these sets is finding strongly connected components
-// in the static call graph.  The algorithm for doing that is taken
-// from Sedgewick, Algorithms, Second Edition, p. 482, with two
-// adaptations.
-//
-// First, a hidden closure function (n->curfn != N) cannot be the
-// root of a connected component. Refusing to use it as a root
-// forces it into the component of the function in which it appears.
-// This is more convenient for escape analysis.
-//
-// Second, each function becomes two virtual nodes in the graph,
-// with numbers n and n+1. We record the function's node number as n
-// but search from node n+1. If the search tells us that the component
-// number (min) is n+1, we know that this is a trivial component: one function
-// plus its closures. If the search tells us that the component number is
-// n, then there was a path from node n+1 back to node n, meaning that
-// the function set is mutually recursive. The escape analysis can be
-// more precise when analyzing a single non-recursive function than
-// when analyzing a set of mutually recursive functions.
-
-type bottomUpVisitor struct {
-	analyze  func(*NodeList, bool)
-	visitgen uint32
-	nodeID   map[*Node]uint32
-	stack    *NodeList
-}
-
-// visitBottomUp invokes analyze on the ODCLFUNC nodes listed in list.
-// It calls analyze with successive groups of functions, working from
-// the bottom of the call graph upward. Each time analyze is called with
-// a list of functions, every function on that list only calls other functions
-// on the list or functions that have been passed in previous invocations of
-// analyze. Closures appear in the same list as their outer functions.
-// The lists are as short as possible while preserving those requirements.
-// (In a typical program, many invocations of analyze will be passed just
-// a single function.) The boolean argument 'recursive' passed to analyze
-// specifies whether the functions on the list are mutually recursive.
-// If recursive is false, the list consists of only a single function and its closures.
-// If recursive is true, the list may still contain only a single function,
-// if that function is itself recursive.
-func visitBottomUp(list *NodeList, analyze func(list *NodeList, recursive bool)) {
-	var v bottomUpVisitor
-	v.analyze = analyze
-	v.nodeID = make(map[*Node]uint32)
-	for l := list; l != nil; l = l.Next {
-		if l.N.Op == ODCLFUNC && l.N.Func.FCurfn == nil {
-			v.visit(l.N)
-		}
-	}
-}
-
-func (v *bottomUpVisitor) visit(n *Node) uint32 {
-	if id := v.nodeID[n]; id > 0 {
-		// already visited
-		return id
-	}
-
-	v.visitgen++
-	id := v.visitgen
-	v.nodeID[n] = id
-	v.visitgen++
-	min := v.visitgen
-
-	l := new(NodeList)
-	l.Next = v.stack
-	l.N = n
-	v.stack = l
-	min = v.visitcodelist(n.Nbody, min)
-	if (min == id || min == id+1) && n.Func.FCurfn == nil {
-		// This node is the root of a strongly connected component.
-
-		// The original min passed to visitcodelist was n->walkgen+1.
-		// If visitcodelist found its way back to n->walkgen, then this
-		// block is a set of mutually recursive functions.
-		// Otherwise it's just a lone function that does not recurse.
-		recursive := min == id
-
-		// Remove connected component from stack.
-		// Mark walkgen so that future visits return a large number
-		// so as not to affect the caller's min.
-		block := v.stack
-
-		var l *NodeList
-		for l = v.stack; l.N != n; l = l.Next {
-			v.nodeID[l.N] = ^uint32(0)
-		}
-		v.nodeID[n] = ^uint32(0)
-		v.stack = l.Next
-		l.Next = nil
-
-		// Run escape analysis on this set of functions.
-		v.analyze(block, recursive)
-	}
-
-	return min
-}
-
-func (v *bottomUpVisitor) visitcodelist(l *NodeList, min uint32) uint32 {
-	for ; l != nil; l = l.Next {
-		min = v.visitcode(l.N, min)
-	}
-	return min
-}
-
-func (v *bottomUpVisitor) visitcode(n *Node, min uint32) uint32 {
-	if n == nil {
-		return min
-	}
-
-	min = v.visitcodelist(n.Ninit, min)
-	min = v.visitcode(n.Left, min)
-	min = v.visitcode(n.Right, min)
-	min = v.visitcodelist(n.List, min)
-	min = v.visitcodelist(n.Nbody, min)
-	min = v.visitcodelist(n.Rlist, min)
-
-	if n.Op == OCALLFUNC || n.Op == OCALLMETH {
-		fn := n.Left
-		if n.Op == OCALLMETH {
-			fn = n.Left.Right.Sym.Def
-		}
-		if fn != nil && fn.Op == ONAME && fn.Class == PFUNC && fn.Name.Defn != nil {
-			m := v.visit(fn.Name.Defn)
-			if m < min {
-				min = m
-			}
-		}
-	}
-
-	if n.Op == OCLOSURE {
-		m := v.visit(n.Func.Closure)
-		if m < min {
-			min = m
-		}
-	}
-
-	return min
-}
-
-// Escape analysis.
-
-// An escape analysis pass for a set of functions.
-// The analysis assumes that closures and the functions in which they
-// appear are analyzed together, so that the aliasing between their
-// variables can be modeled more precisely.
-//
-// First escfunc, esc and escassign recurse over the ast of each
-// function to dig out flow(dst,src) edges between any
-// pointer-containing nodes and store them in dst->escflowsrc.  For
-// variables assigned to a variable in an outer scope or used as a
-// return value, they store a flow(theSink, src) edge to a fake node
-// 'the Sink'.  For variables referenced in closures, an edge
-// flow(closure, &var) is recorded and the flow of a closure itself to
-// an outer scope is tracked the same way as other variables.
-//
-// Then escflood walks the graph starting at theSink and tags all
-// variables of it can reach an & node as escaping and all function
-// parameters it can reach as leaking.
-//
-// If a value's address is taken but the address does not escape,
-// then the value can stay on the stack.  If the value new(T) does
-// not escape, then new(T) can be rewritten into a stack allocation.
-// The same is true of slice literals.
-//
-// If optimizations are disabled (-N), this code is not used.
-// Instead, the compiler assumes that any value whose address
-// is taken without being immediately dereferenced
-// needs to be moved to the heap, and new(T) and slice
-// literals are always real allocations.
-
-func escapes(all *NodeList) {
-	visitBottomUp(all, escAnalyze)
-}
-
-const (
-	EscFuncUnknown = 0 + iota
-	EscFuncPlanned
-	EscFuncStarted
-	EscFuncTagged
-)
-
-// There appear to be some loops in the escape graph, causing
-// arbitrary recursion into deeper and deeper levels.
-// Cut this off safely by making minLevel sticky: once you
-// get that deep, you cannot go down any further but you also
-// cannot go up any further. This is a conservative fix.
-// Making minLevel smaller (more negative) would handle more
-// complex chains of indirections followed by address-of operations,
-// at the cost of repeating the traversal once for each additional
-// allowed level when a loop is encountered. Using -2 suffices to
-// pass all the tests we have written so far, which we assume matches
-// the level of complexity we want the escape analysis code to handle.
-const (
-	MinLevel = -2
-)
-
-// A Level encodes the reference state and context applied to
-// (stack, heap) allocated memory.
-//
-// value is the overall sum of *(1) and &(-1) operations encountered
-// along a path from a destination (sink, return value) to a source
-// (allocation, parameter).
-//
-// suffixValue is the maximum-copy-started-suffix-level applied to a sink.
-// For example:
-// sink = x.left.left --> level=2, x is dereferenced twice and does not escape to sink.
-// sink = &Node{x} --> level=-1, x is accessible from sink via one "address of"
-// sink = &Node{&Node{x}} --> level=-2, x is accessible from sink via two "address of"
-// sink = &Node{&Node{x.left}} --> level=-1, but x is NOT accessible from sink because it was indirected and then copied.
-// (The copy operations are sometimes implicit in the source code; in this case,
-// value of x.left was copied into a field of a newly allocated Node)
-//
-// There's one of these for each Node, and the integer values
-// rarely exceed even what can be stored in 4 bits, never mind 8.
-type Level struct {
-	value, suffixValue int8
-}
-
-func (l Level) int() int {
-	return int(l.value)
-}
-
-func levelFrom(i int) Level {
-	if i <= MinLevel {
-		return Level{value: MinLevel}
-	}
-	return Level{value: int8(i)}
-}
-
-func satInc8(x int8) int8 {
-	if x == 127 {
-		return 127
-	}
-	return x + 1
-}
-
-func satAdd8(x, y int8) int8 {
-	z := x + y
-	if x^y < 0 || x^z >= 0 {
-		return z
-	}
-	if x < 0 {
-		return -128
-	}
-	return 127
-}
-
-func min8(a, b int8) int8 {
-	if a < b {
-		return a
-	}
-	return b
-}
-
-func max8(a, b int8) int8 {
-	if a > b {
-		return a
-	}
-	return b
-}
-
-// inc returns the level l + 1, representing the effect of an indirect (*) operation.
-func (l Level) inc() Level {
-	if l.value <= MinLevel {
-		return Level{value: MinLevel}
-	}
-	return Level{value: satInc8(l.value), suffixValue: satInc8(l.suffixValue)}
-}
-
-// dec returns the level l - 1, representing the effect of an address-of (&) operation.
-func (l Level) dec() Level {
-	if l.value <= MinLevel {
-		return Level{value: MinLevel}
-	}
-	return Level{value: l.value - 1, suffixValue: l.suffixValue - 1}
-}
-
-// copy returns the level for a copy of a value with level l.
-func (l Level) copy() Level {
-	return Level{value: l.value, suffixValue: max8(l.suffixValue, 0)}
-}
-
-func (l1 Level) min(l2 Level) Level {
-	return Level{
-		value:       min8(l1.value, l2.value),
-		suffixValue: min8(l1.suffixValue, l2.suffixValue)}
-}
-
-// guaranteedDereference returns the number of dereferences
-// applied to a pointer before addresses are taken/generated.
-// This is the maximum level computed from path suffixes starting
-// with copies where paths flow from destination to source.
-func (l Level) guaranteedDereference() int {
-	return int(l.suffixValue)
-}
-
-type NodeEscState struct {
-	Curfn        *Node
-	Escflowsrc   *NodeList // flow(this, src)
-	Escretval    *NodeList // on OCALLxxx, list of dummy return values
-	Escloopdepth int32     // -1: global, 0: return variables, 1:function top level, increased inside function for every loop or label to mark scopes
-	Esclevel     Level
-	Walkgen      uint32
-}
-
-func (e *EscState) nodeEscState(n *Node) *NodeEscState {
-	if nE, ok := n.Opt().(*NodeEscState); ok {
-		return nE
-	}
-	if n.Opt() != nil {
-		Fatal("nodeEscState: opt in use (%T)", n.Opt())
-	}
-	nE := new(NodeEscState)
-	nE.Curfn = Curfn
-	n.SetOpt(nE)
-	e.opts = append(e.opts, n)
-	return nE
-}
-
-func (e *EscState) track(n *Node) {
-	if Curfn == nil {
-		Fatal("EscState.track: Curfn nil")
-	}
-	n.Esc = EscNone // until proven otherwise
-	nE := e.nodeEscState(n)
-	nE.Escloopdepth = e.loopdepth
-	e.noesc = list(e.noesc, n)
-}
-
-// Escape constants are numbered in order of increasing "escapiness"
-// to help make inferences be monotonic.  With the exception of
-// EscNever which is sticky, eX < eY means that eY is more exposed
-// than eX, and hence replaces it in a conservative analysis.
-const (
-	EscUnknown = iota
-	EscNone    // Does not escape to heap, result, or parameters.
-	EscReturn  // Is returned or reachable from returned.
-	EscScope   // Allocated in an inner loop scope, assigned to an outer loop scope,
-	// which allows the construction of non-escaping but arbitrarily large linked
-	// data structures (i.e., not eligible for allocation in a fixed-size stack frame).
-	EscHeap           // Reachable from the heap
-	EscNever          // By construction will not escape.
-	EscBits           = 3
-	EscMask           = (1 << EscBits) - 1
-	EscContentEscapes = 1 << EscBits // value obtained by indirect of parameter escapes to heap
-	EscReturnBits     = EscBits + 1
-	// Node.esc encoding = | escapeReturnEncoding:(width-4) | contentEscapes:1 | escEnum:3
-)
-
-// escMax returns the maximum of an existing escape value
-// (and its additional parameter flow flags) and a new escape type.
-func escMax(e, etype uint16) uint16 {
-	if e&EscMask >= EscScope {
-		// normalize
-		if e&^EscMask != 0 {
-			Fatal("Escape information had unexpected return encoding bits (w/ EscScope, EscHeap, EscNever), e&EscMask=%v", e&EscMask)
-		}
-	}
-	if e&EscMask > etype {
-		return e
-	}
-	if etype == EscNone || etype == EscReturn {
-		return (e &^ EscMask) | etype
-	}
-	return etype
-}
-
-// For each input parameter to a function, the escapeReturnEncoding describes
-// how the parameter may leak to the function's outputs.  This is currently the
-// "level" of the leak where level is 0 or larger (negative level means stored into
-// something whose address is returned -- but that implies stored into the heap,
-// hence EscHeap, which means that the details are not currently relevant. )
-const (
-	bitsPerOutputInTag = 3                                         // For each output, the number of bits for a tag
-	bitsMaskForTag     = uint16(1<<bitsPerOutputInTag) - 1         // The bit mask to extract a single tag.
-	outputsPerTag      = (16 - EscReturnBits) / bitsPerOutputInTag // The number of outputs that can be tagged.
-	maxEncodedLevel    = int(bitsMaskForTag - 1)                   // The largest level that can be stored in a tag.
-)
-
-type EscState struct {
-	// Fake node that all
-	//   - return values and output variables
-	//   - parameters on imported functions not marked 'safe'
-	//   - assignments to global variables
-	// flow to.
-	theSink Node
-
-	dsts      *NodeList // all dst nodes
-	loopdepth int32     // for detecting nested loop scopes
-	pdepth    int       // for debug printing in recursions.
-	dstcount  int       // diagnostic
-	edgecount int       // diagnostic
-	noesc     *NodeList // list of possible non-escaping nodes, for printing
-	recursive bool      // recursive function or group of mutually recursive functions.
-	opts      []*Node   // nodes with .Opt initialized
-	walkgen   uint32
-}
-
-// funcSym returns fn.Func.Nname.Sym if no nils are encountered along the way.
-func funcSym(fn *Node) *Sym {
-	if fn == nil || fn.Func.Nname == nil {
-		return nil
-	}
-	return fn.Func.Nname.Sym
-}
-
-// curfnSym returns n.Curfn.Nname.Sym if no nils are encountered along the way.
-func (e *EscState) curfnSym(n *Node) *Sym {
-	nE := e.nodeEscState(n)
-	return funcSym(nE.Curfn)
-}
-
-func escAnalyze(all *NodeList, recursive bool) {
-	var es EscState
-	e := &es
-	e.theSink.Op = ONAME
-	e.theSink.Orig = &e.theSink
-	e.theSink.Class = PEXTERN
-	e.theSink.Sym = Lookup(".sink")
-	e.nodeEscState(&e.theSink).Escloopdepth = -1
-	e.recursive = recursive
-
-	for l := all; l != nil; l = l.Next {
-		if l.N.Op == ODCLFUNC {
-			l.N.Esc = EscFuncPlanned
-		}
-	}
-
-	// flow-analyze functions
-	for l := all; l != nil; l = l.Next {
-		if l.N.Op == ODCLFUNC {
-			escfunc(e, l.N)
-		}
-	}
-
-	// print("escapes: %d e->dsts, %d edges\n", e->dstcount, e->edgecount);
-
-	// visit the upstream of each dst, mark address nodes with
-	// addrescapes, mark parameters unsafe
-	for l := e.dsts; l != nil; l = l.Next {
-		escflood(e, l.N)
-	}
-
-	// for all top level functions, tag the typenodes corresponding to the param nodes
-	for l := all; l != nil; l = l.Next {
-		if l.N.Op == ODCLFUNC {
-			esctag(e, l.N)
-		}
-	}
-
-	if Debug['m'] != 0 {
-		for l := e.noesc; l != nil; l = l.Next {
-			if l.N.Esc == EscNone {
-				Warnl(int(l.N.Lineno), "%v %v does not escape", e.curfnSym(l.N), Nconv(l.N, obj.FmtShort))
-			}
-		}
-	}
-	for _, x := range e.opts {
-		x.SetOpt(nil)
-	}
-}
-
-func escfunc(e *EscState, func_ *Node) {
-	//	print("escfunc %N %s\n", func->nname, e->recursive?"(recursive)":"");
-	if func_.Esc != 1 {
-		Fatal("repeat escfunc %v", func_.Func.Nname)
-	}
-	func_.Esc = EscFuncStarted
-
-	saveld := e.loopdepth
-	e.loopdepth = 1
-	savefn := Curfn
-	Curfn = func_
-
-	for ll := Curfn.Func.Dcl; ll != nil; ll = ll.Next {
-		if ll.N.Op != ONAME {
-			continue
-		}
-		llNE := e.nodeEscState(ll.N)
-		switch ll.N.Class {
-		// out params are in a loopdepth between the sink and all local variables
-		case PPARAMOUT:
-			llNE.Escloopdepth = 0
-
-		case PPARAM:
-			llNE.Escloopdepth = 1
-			if ll.N.Type != nil && !haspointers(ll.N.Type) {
-				break
-			}
-			if Curfn.Nbody == nil && !Curfn.Noescape {
-				ll.N.Esc = EscHeap
-			} else {
-				ll.N.Esc = EscNone // prime for escflood later
-			}
-			e.noesc = list(e.noesc, ll.N)
-		}
-	}
-
-	// in a mutually recursive group we lose track of the return values
-	if e.recursive {
-		for ll := Curfn.Func.Dcl; ll != nil; ll = ll.Next {
-			if ll.N.Op == ONAME && ll.N.Class == PPARAMOUT {
-				escflows(e, &e.theSink, ll.N)
-			}
-		}
-	}
-
-	escloopdepthlist(e, Curfn.Nbody)
-	esclist(e, Curfn.Nbody, Curfn)
-	Curfn = savefn
-	e.loopdepth = saveld
-}
-
-// Mark labels that have no backjumps to them as not increasing e->loopdepth.
-// Walk hasn't generated (goto|label)->left->sym->label yet, so we'll cheat
-// and set it to one of the following two.  Then in esc we'll clear it again.
-var looping Label
-
-var nonlooping Label
-
-func escloopdepthlist(e *EscState, l *NodeList) {
-	for ; l != nil; l = l.Next {
-		escloopdepth(e, l.N)
-	}
-}
-
-func escloopdepth(e *EscState, n *Node) {
-	if n == nil {
-		return
-	}
-
-	escloopdepthlist(e, n.Ninit)
-
-	switch n.Op {
-	case OLABEL:
-		if n.Left == nil || n.Left.Sym == nil {
-			Fatal("esc:label without label: %v", Nconv(n, obj.FmtSign))
-		}
-
-		// Walk will complain about this label being already defined, but that's not until
-		// after escape analysis. in the future, maybe pull label & goto analysis out of walk and put before esc
-		// if(n->left->sym->label != nil)
-		//	fatal("escape analysis messed up analyzing label: %+N", n);
-		n.Left.Sym.Label = &nonlooping
-
-	case OGOTO:
-		if n.Left == nil || n.Left.Sym == nil {
-			Fatal("esc:goto without label: %v", Nconv(n, obj.FmtSign))
-		}
-
-		// If we come past one that's uninitialized, this must be a (harmless) forward jump
-		// but if it's set to nonlooping the label must have preceded this goto.
-		if n.Left.Sym.Label == &nonlooping {
-			n.Left.Sym.Label = &looping
-		}
-	}
-
-	escloopdepth(e, n.Left)
-	escloopdepth(e, n.Right)
-	escloopdepthlist(e, n.List)
-	escloopdepthlist(e, n.Nbody)
-	escloopdepthlist(e, n.Rlist)
-}
-
-func esclist(e *EscState, l *NodeList, up *Node) {
-	for ; l != nil; l = l.Next {
-		esc(e, l.N, up)
-	}
-}
-
-func esc(e *EscState, n *Node, up *Node) {
-	if n == nil {
-		return
-	}
-
-	lno := int(setlineno(n))
-
-	// ninit logically runs at a different loopdepth than the rest of the for loop.
-	esclist(e, n.Ninit, n)
-
-	if n.Op == OFOR || n.Op == ORANGE {
-		e.loopdepth++
-	}
-
-	// type switch variables have no ODCL.
-	// process type switch as declaration.
-	// must happen before processing of switch body,
-	// so before recursion.
-	if n.Op == OSWITCH && n.Left != nil && n.Left.Op == OTYPESW {
-		for ll := n.List; ll != nil; ll = ll.Next { // cases
-
-			// ll.N.Rlist is the variable per case
-			if ll.N.Rlist != nil {
-				e.nodeEscState(ll.N.Rlist.N).Escloopdepth = e.loopdepth
-			}
-		}
-	}
-
-	// Big stuff escapes unconditionally
-	// "Big" conditions that were scattered around in walk have been gathered here
-	if n.Esc != EscHeap && n.Type != nil && (n.Type.Width > MaxStackVarSize ||
-		n.Op == ONEW && n.Type.Type.Width >= 1<<16 ||
-		n.Op == OMAKESLICE && !isSmallMakeSlice(n)) {
-		if Debug['m'] > 1 {
-			Warnl(int(n.Lineno), "%v is too large for stack", n)
-		}
-		n.Esc = EscHeap
-		addrescapes(n)
-		escassign(e, &e.theSink, n)
-	}
-
-	esc(e, n.Left, n)
-	esc(e, n.Right, n)
-	esclist(e, n.Nbody, n)
-	esclist(e, n.List, n)
-	esclist(e, n.Rlist, n)
-
-	if n.Op == OFOR || n.Op == ORANGE {
-		e.loopdepth--
-	}
-
-	if Debug['m'] > 1 {
-		fmt.Printf("%v:[%d] %v esc: %v\n", Ctxt.Line(int(lineno)), e.loopdepth, funcSym(Curfn), n)
-	}
-
-	switch n.Op {
-	// Record loop depth at declaration.
-	case ODCL:
-		if n.Left != nil {
-			e.nodeEscState(n.Left).Escloopdepth = e.loopdepth
-		}
-
-	case OLABEL:
-		if n.Left.Sym.Label == &nonlooping {
-			if Debug['m'] > 1 {
-				fmt.Printf("%v:%v non-looping label\n", Ctxt.Line(int(lineno)), n)
-			}
-		} else if n.Left.Sym.Label == &looping {
-			if Debug['m'] > 1 {
-				fmt.Printf("%v: %v looping label\n", Ctxt.Line(int(lineno)), n)
-			}
-			e.loopdepth++
-		}
-
-		// See case OLABEL in escloopdepth above
-		// else if(n->left->sym->label == nil)
-		//	fatal("escape analysis missed or messed up a label: %+N", n);
-
-		n.Left.Sym.Label = nil
-
-		// Everything but fixed array is a dereference.
-	case ORANGE:
-		if n.List != nil && n.List.Next != nil {
-			if Isfixedarray(n.Type) {
-				escassign(e, n.List.Next.N, n.Right)
-			} else {
-				escassignDereference(e, n.List.Next.N, n.Right)
-			}
-		}
-
-	case OSWITCH:
-		if n.Left != nil && n.Left.Op == OTYPESW {
-			for ll := n.List; ll != nil; ll = ll.Next {
-				// cases
-				// n.Left.Right is the argument of the .(type),
-				// ll.N.Rlist is the variable per case
-				if ll.N.Rlist != nil {
-					escassign(e, ll.N.Rlist.N, n.Left.Right)
-				}
-			}
-		}
-
-		// Filter out the following special case.
-	//
-	//	func (b *Buffer) Foo() {
-	//		n, m := ...
-	//		b.buf = b.buf[n:m]
-	//	}
-	//
-	// This assignment is a no-op for escape analysis,
-	// it does not store any new pointers into b that were not already there.
-	// However, without this special case b will escape, because we assign to OIND/ODOTPTR.
-	case OAS, OASOP, OASWB:
-		if (n.Left.Op == OIND || n.Left.Op == ODOTPTR) && n.Left.Left.Op == ONAME && // dst is ONAME dereference
-			(n.Right.Op == OSLICE || n.Right.Op == OSLICE3 || n.Right.Op == OSLICESTR) && // src is slice operation
-			(n.Right.Left.Op == OIND || n.Right.Left.Op == ODOTPTR) && n.Right.Left.Left.Op == ONAME && // slice is applied to ONAME dereference
-			n.Left.Left == n.Right.Left.Left { // dst and src reference the same base ONAME
-
-			// Here we also assume that the statement will not contain calls,
-			// that is, that order will move any calls to init.
-			// Otherwise base ONAME value could change between the moments
-			// when we evaluate it for dst and for src.
-			//
-			// Note, this optimization does not apply to OSLICEARR,
-			// because it does introduce a new pointer into b that was not already there
-			// (pointer to b itself). After such assignment, if b contents escape,
-			// b escapes as well. If we ignore such OSLICEARR, we will conclude
-			// that b does not escape when b contents do.
-			if Debug['m'] != 0 {
-				Warnl(int(n.Lineno), "%v ignoring self-assignment to %v", e.curfnSym(n), Nconv(n.Left, obj.FmtShort))
-			}
-
-			break
-		}
-
-		escassign(e, n.Left, n.Right)
-
-	case OAS2: // x,y = a,b
-		if count(n.List) == count(n.Rlist) {
-			ll := n.List
-			lr := n.Rlist
-			for ; ll != nil; ll, lr = ll.Next, lr.Next {
-				escassign(e, ll.N, lr.N)
-			}
-		}
-
-	case OAS2RECV, // v, ok = <-ch
-		OAS2MAPR,    // v, ok = m[k]
-		OAS2DOTTYPE: // v, ok = x.(type)
-		escassign(e, n.List.N, n.Rlist.N)
-
-	case OSEND: // ch <- x
-		escassign(e, &e.theSink, n.Right)
-
-	case ODEFER:
-		if e.loopdepth == 1 { // top level
-			break
-		}
-		// arguments leak out of scope
-		// TODO: leak to a dummy node instead
-		fallthrough
-
-	case OPROC:
-		// go f(x) - f and x escape
-		escassign(e, &e.theSink, n.Left.Left)
-
-		escassign(e, &e.theSink, n.Left.Right) // ODDDARG for call
-		for ll := n.Left.List; ll != nil; ll = ll.Next {
-			escassign(e, &e.theSink, ll.N)
-		}
-
-	case OCALLMETH, OCALLFUNC, OCALLINTER:
-		esccall(e, n, up)
-
-		// esccall already done on n->rlist->n. tie it's escretval to n->list
-	case OAS2FUNC: // x,y = f()
-		lr := e.nodeEscState(n.Rlist.N).Escretval
-
-		var ll *NodeList
-		for ll = n.List; lr != nil && ll != nil; lr, ll = lr.Next, ll.Next {
-			escassign(e, ll.N, lr.N)
-		}
-		if lr != nil || ll != nil {
-			Fatal("esc oas2func")
-		}
-
-	case ORETURN:
-		ll := n.List
-		if count(n.List) == 1 && Curfn.Type.Outtuple > 1 {
-			// OAS2FUNC in disguise
-			// esccall already done on n->list->n
-			// tie n->list->n->escretval to curfn->dcl PPARAMOUT's
-			ll = e.nodeEscState(n.List.N).Escretval
-		}
-
-		for lr := Curfn.Func.Dcl; lr != nil && ll != nil; lr = lr.Next {
-			if lr.N.Op != ONAME || lr.N.Class != PPARAMOUT {
-				continue
-			}
-			escassign(e, lr.N, ll.N)
-			ll = ll.Next
-		}
-
-		if ll != nil {
-			Fatal("esc return list")
-		}
-
-		// Argument could leak through recover.
-	case OPANIC:
-		escassign(e, &e.theSink, n.Left)
-
-	case OAPPEND:
-		if !n.Isddd {
-			for ll := n.List.Next; ll != nil; ll = ll.Next {
-				escassign(e, &e.theSink, ll.N) // lose track of assign to dereference
-			}
-		} else {
-			// append(slice1, slice2...) -- slice2 itself does not escape, but contents do.
-			slice2 := n.List.Next.N
-			escassignDereference(e, &e.theSink, slice2) // lose track of assign of dereference
-			if Debug['m'] > 2 {
-				Warnl(int(n.Lineno), "%v special treatment of append(slice1, slice2...) %v", e.curfnSym(n), Nconv(n, obj.FmtShort))
-			}
-		}
-		escassignDereference(e, &e.theSink, n.List.N) // The original elements are now leaked, too
-
-	case OCOPY:
-		escassignDereference(e, &e.theSink, n.Right) // lose track of assign of dereference
-
-	case OCONV, OCONVNOP:
-		escassign(e, n, n.Left)
-
-	case OCONVIFACE:
-		e.track(n)
-		escassign(e, n, n.Left)
-
-	case OARRAYLIT:
-		if Isslice(n.Type) {
-			// Slice itself is not leaked until proven otherwise
-			e.track(n)
-		}
-
-		// Link values to array/slice
-		for ll := n.List; ll != nil; ll = ll.Next {
-			escassign(e, n, ll.N.Right)
-		}
-
-		// Link values to struct.
-	case OSTRUCTLIT:
-		for ll := n.List; ll != nil; ll = ll.Next {
-			escassign(e, n, ll.N.Right)
-		}
-
-	case OPTRLIT:
-		e.track(n)
-
-		// Link OSTRUCTLIT to OPTRLIT; if OPTRLIT escapes, OSTRUCTLIT elements do too.
-		escassign(e, n, n.Left)
-
-	case OCALLPART:
-		e.track(n)
-
-		// Contents make it to memory, lose track.
-		escassign(e, &e.theSink, n.Left)
-
-	case OMAPLIT:
-		e.track(n)
-
-		// Keys and values make it to memory, lose track.
-		for ll := n.List; ll != nil; ll = ll.Next {
-			escassign(e, &e.theSink, ll.N.Left)
-			escassign(e, &e.theSink, ll.N.Right)
-		}
-
-		// Link addresses of captured variables to closure.
-	case OCLOSURE:
-		var a *Node
-		var v *Node
-		for ll := n.Func.Cvars; ll != nil; ll = ll.Next {
-			v = ll.N
-			if v.Op == OXXX { // unnamed out argument; see dcl.c:/^funcargs
-				continue
-			}
-			a = v.Name.Param.Closure
-			if !v.Name.Byval {
-				a = Nod(OADDR, a, nil)
-				a.Lineno = v.Lineno
-				e.nodeEscState(a).Escloopdepth = e.loopdepth
-				typecheck(&a, Erv)
-			}
-
-			escassign(e, n, a)
-		}
-		fallthrough
-
-	case OMAKECHAN,
-		OMAKEMAP,
-		OMAKESLICE,
-		ONEW,
-		OARRAYRUNESTR,
-		OARRAYBYTESTR,
-		OSTRARRAYRUNE,
-		OSTRARRAYBYTE,
-		ORUNESTR:
-		e.track(n)
-
-	case OADDSTR:
-		e.track(n)
-		// Arguments of OADDSTR do not escape.
-
-	case OADDR:
-		// current loop depth is an upper bound on actual loop depth
-		// of addressed value.
-		e.track(n)
-
-		// for &x, use loop depth of x if known.
-		// it should always be known, but if not, be conservative
-		// and keep the current loop depth.
-		if n.Left.Op == ONAME {
-			switch n.Left.Class {
-			case PAUTO:
-				nE := e.nodeEscState(n)
-				leftE := e.nodeEscState(n.Left)
-				if leftE.Escloopdepth != 0 {
-					nE.Escloopdepth = leftE.Escloopdepth
-				}
-
-				// PPARAM is loop depth 1 always.
-			// PPARAMOUT is loop depth 0 for writes
-			// but considered loop depth 1 for address-of,
-			// so that writing the address of one result
-			// to another (or the same) result makes the
-			// first result move to the heap.
-			case PPARAM, PPARAMOUT:
-				nE := e.nodeEscState(n)
-				nE.Escloopdepth = 1
-			}
-		}
-	}
-
-	lineno = int32(lno)
-}
-
-// Assert that expr somehow gets assigned to dst, if non nil.  for
-// dst==nil, any name node expr still must be marked as being
-// evaluated in curfn.	For expr==nil, dst must still be examined for
-// evaluations inside it (e.g *f(x) = y)
-func escassign(e *EscState, dst *Node, src *Node) {
-	if isblank(dst) || dst == nil || src == nil || src.Op == ONONAME || src.Op == OXXX {
-		return
-	}
-
-	if Debug['m'] > 1 {
-		fmt.Printf("%v:[%d] %v escassign: %v(%v)[%v] = %v(%v)[%v]\n",
-			Ctxt.Line(int(lineno)), e.loopdepth, funcSym(Curfn),
-			Nconv(dst, obj.FmtShort), Jconv(dst, obj.FmtShort), Oconv(int(dst.Op), 0),
-			Nconv(src, obj.FmtShort), Jconv(src, obj.FmtShort), Oconv(int(src.Op), 0))
-	}
-
-	setlineno(dst)
-
-	// Analyze lhs of assignment.
-	// Replace dst with e->theSink if we can't track it.
-	switch dst.Op {
-	default:
-		Dump("dst", dst)
-		Fatal("escassign: unexpected dst")
-
-	case OARRAYLIT,
-		OCLOSURE,
-		OCONV,
-		OCONVIFACE,
-		OCONVNOP,
-		OMAPLIT,
-		OSTRUCTLIT,
-		OPTRLIT,
-		OCALLPART:
-		break
-
-	case ONAME:
-		if dst.Class == PEXTERN {
-			dst = &e.theSink
-		}
-
-	case ODOT: // treat "dst.x  = src" as "dst = src"
-		escassign(e, dst.Left, src)
-
-		return
-
-	case OINDEX:
-		if Isfixedarray(dst.Left.Type) {
-			escassign(e, dst.Left, src)
-			return
-		}
-
-		dst = &e.theSink // lose track of dereference
-
-	case OIND, ODOTPTR:
-		dst = &e.theSink // lose track of dereference
-
-		// lose track of key and value
-	case OINDEXMAP:
-		escassign(e, &e.theSink, dst.Right)
-
-		dst = &e.theSink
-	}
-
-	lno := int(setlineno(src))
-	e.pdepth++
-
-	switch src.Op {
-	case OADDR, // dst = &x
-		OIND,    // dst = *x
-		ODOTPTR, // dst = (*x).f
-		ONAME,
-		OPARAM,
-		ODDDARG,
-		OPTRLIT,
-		OARRAYLIT,
-		OMAPLIT,
-		OSTRUCTLIT,
-		OMAKECHAN,
-		OMAKEMAP,
-		OMAKESLICE,
-		OARRAYRUNESTR,
-		OARRAYBYTESTR,
-		OSTRARRAYRUNE,
-		OSTRARRAYBYTE,
-		OADDSTR,
-		ONEW,
-		OCALLPART,
-		ORUNESTR,
-		OCONVIFACE:
-		escflows(e, dst, src)
-
-	case OCLOSURE:
-		// OCLOSURE is lowered to OPTRLIT,
-		// insert OADDR to account for the additional indirection.
-		a := Nod(OADDR, src, nil)
-		a.Lineno = src.Lineno
-		e.nodeEscState(a).Escloopdepth = e.nodeEscState(src).Escloopdepth
-		a.Type = Ptrto(src.Type)
-		escflows(e, dst, a)
-
-	// Flowing multiple returns to a single dst happens when
-	// analyzing "go f(g())": here g() flows to sink (issue 4529).
-	case OCALLMETH, OCALLFUNC, OCALLINTER:
-		for ll := e.nodeEscState(src).Escretval; ll != nil; ll = ll.Next {
-			escflows(e, dst, ll.N)
-		}
-
-		// A non-pointer escaping from a struct does not concern us.
-	case ODOT:
-		if src.Type != nil && !haspointers(src.Type) {
-			break
-		}
-		fallthrough
-
-		// Conversions, field access, slice all preserve the input value.
-	case OCONV,
-		OCONVNOP,
-		ODOTMETH,
-		// treat recv.meth as a value with recv in it, only happens in ODEFER and OPROC
-		// iface.method already leaks iface in esccall, no need to put in extra ODOTINTER edge here
-		ODOTTYPE,
-		ODOTTYPE2,
-		OSLICE,
-		OSLICE3,
-		OSLICEARR,
-		OSLICE3ARR,
-		OSLICESTR:
-		// Conversions, field access, slice all preserve the input value.
-		escassign(e, dst, src.Left)
-
-	case OAPPEND:
-		// Append returns first argument.
-		// Subsequent arguments are already leaked because they are operands to append.
-		escassign(e, dst, src.List.N)
-
-	case OINDEX:
-		// Index of array preserves input value.
-		if Isfixedarray(src.Left.Type) {
-			escassign(e, dst, src.Left)
-		} else {
-			escflows(e, dst, src)
-		}
-
-		// Might be pointer arithmetic, in which case
-	// the operands flow into the result.
-	// TODO(rsc): Decide what the story is here.  This is unsettling.
-	case OADD,
-		OSUB,
-		OOR,
-		OXOR,
-		OMUL,
-		ODIV,
-		OMOD,
-		OLSH,
-		ORSH,
-		OAND,
-		OANDNOT,
-		OPLUS,
-		OMINUS,
-		OCOM:
-		escassign(e, dst, src.Left)
-
-		escassign(e, dst, src.Right)
-	}
-
-	e.pdepth--
-	lineno = int32(lno)
-}
-
-// Common case for escapes is 16 bits 000000000xxxEEEE
-// where commonest cases for xxx encoding in-to-out pointer
-//  flow are 000, 001, 010, 011  and EEEE is computed Esc bits.
-// Note width of xxx depends on value of constant
-// bitsPerOutputInTag -- expect 2 or 3, so in practice the
-// tag cache array is 64 or 128 long.  Some entries will
-// never be populated.
-var tags [1 << (bitsPerOutputInTag + EscReturnBits)]string
-
-// mktag returns the string representation for an escape analysis tag.
-func mktag(mask int) *string {
-	switch mask & EscMask {
-	case EscNone, EscReturn:
-		break
-
-	default:
-		Fatal("escape mktag")
-	}
-
-	if mask < len(tags) && tags[mask] != "" {
-		return &tags[mask]
-	}
-
-	s := fmt.Sprintf("esc:0x%x", mask)
-	if mask < len(tags) {
-		tags[mask] = s
-	}
-	return &s
-}
-
-// parsetag decodes an escape analysis tag and returns the esc value.
-func parsetag(note *string) uint16 {
-	if note == nil || !strings.HasPrefix(*note, "esc:") {
-		return EscUnknown
-	}
-	em := uint16(atoi((*note)[4:]))
-	if em == 0 {
-		return EscNone
-	}
-	return em
-}
-
-// describeEscape returns a string describing the escape tag.
-// The result is either one of {EscUnknown, EscNone, EscHeap} which all have no further annotation
-// or a description of parameter flow, which takes the form of an optional "contentToHeap"
-// indicating that the content of this parameter is leaked to the heap, followed by a sequence
-// of level encodings separated by spaces, one for each parameter, where _ means no flow,
-// = means direct flow, and N asterisks (*) encodes content (obtained by indirection) flow.
-// e.g., "contentToHeap _ =" means that a parameter's content (one or more dereferences)
-// escapes to the heap, the parameter does not leak to the first output, but does leak directly
-// to the second output (and if there are more than two outputs, there is no flow to those.)
-func describeEscape(em uint16) string {
-	var s string
-	if em&EscMask == EscUnknown {
-		s = "EscUnknown"
-	}
-	if em&EscMask == EscNone {
-		s = "EscNone"
-	}
-	if em&EscMask == EscHeap {
-		s = "EscHeap"
-	}
-	if em&EscMask == EscReturn {
-		s = "EscReturn"
-	}
-	if em&EscMask == EscScope {
-		s = "EscScope"
-	}
-	if em&EscContentEscapes != 0 {
-		if s != "" {
-			s += " "
-		}
-		s += "contentToHeap"
-	}
-	for em >>= EscReturnBits; em != 0; em = em >> bitsPerOutputInTag {
-		// See encoding description above
-		if s != "" {
-			s += " "
-		}
-		switch embits := em & bitsMaskForTag; embits {
-		case 0:
-			s += "_"
-		case 1:
-			s += "="
-		default:
-			for i := uint16(0); i < embits-1; i++ {
-				s += "*"
-			}
-		}
-
-	}
-	return s
-}
-
-// escassignfromtag models the input-to-output assignment flow of one of a function
-// calls arguments, where the flow is encoded in "note".
-func escassignfromtag(e *EscState, note *string, dsts *NodeList, src *Node) uint16 {
-	em := parsetag(note)
-	if src.Op == OLITERAL {
-		return em
-	}
-
-	if Debug['m'] > 2 {
-		fmt.Printf("%v::assignfromtag:: src=%v, em=%s\n",
-			Ctxt.Line(int(lineno)), Nconv(src, obj.FmtShort), describeEscape(em))
-	}
-
-	if em == EscUnknown {
-		escassign(e, &e.theSink, src)
-		return em
-	}
-
-	if em == EscNone {
-		return em
-	}
-
-	// If content inside parameter (reached via indirection)
-	// escapes to heap, mark as such.
-	if em&EscContentEscapes != 0 {
-		escassign(e, &e.theSink, e.addDereference(src))
-	}
-
-	em0 := em
-	for em >>= EscReturnBits; em != 0 && dsts != nil; em, dsts = em>>bitsPerOutputInTag, dsts.Next {
-		// Prefer the lowest-level path to the reference (for escape purposes).
-		// Two-bit encoding (for example. 1, 3, and 4 bits are other options)
-		//  01 = 0-level
-		//  10 = 1-level, (content escapes),
-		//  11 = 2-level, (content of content escapes),
-		embits := em & bitsMaskForTag
-		if embits > 0 {
-			n := src
-			for i := uint16(0); i < embits-1; i++ {
-				n = e.addDereference(n) // encode level>0 as indirections
-			}
-			escassign(e, dsts.N, n)
-		}
-	}
-	// If there are too many outputs to fit in the tag,
-	// that is handled at the encoding end as EscHeap,
-	// so there is no need to check here.
-
-	if em != 0 && dsts == nil {
-		Fatal("corrupt esc tag %q or messed up escretval list\n", note)
-	}
-	return em0
-}
-
-func escassignDereference(e *EscState, dst *Node, src *Node) {
-	if src.Op == OLITERAL {
-		return
-	}
-	escassign(e, dst, e.addDereference(src))
-}
-
-// addDereference constructs a suitable OIND note applied to src.
-// Because this is for purposes of escape accounting, not execution,
-// some semantically dubious node combinations are (currently) possible.
-func (e *EscState) addDereference(n *Node) *Node {
-	ind := Nod(OIND, n, nil)
-	e.nodeEscState(ind).Escloopdepth = e.nodeEscState(n).Escloopdepth
-	ind.Lineno = n.Lineno
-	t := n.Type
-	if Istype(t, Tptr) {
-		// This should model our own sloppy use of OIND to encode
-		// decreasing levels of indirection; i.e., "indirecting" an array
-		// might yield the type of an element.  To be enhanced...
-		t = t.Type
-	}
-	ind.Type = t
-	return ind
-}
-
-// escNoteOutputParamFlow encodes maxEncodedLevel/.../1/0-level flow to the vargen'th parameter.
-// Levels greater than maxEncodedLevel are replaced with maxEncodedLevel.
-// If the encoding cannot describe the modified input level and output number, then EscHeap is returned.
-func escNoteOutputParamFlow(e uint16, vargen int32, level Level) uint16 {
-	// Flow+level is encoded in two bits.
-	// 00 = not flow, xx = level+1 for 0 <= level <= maxEncodedLevel
-	// 16 bits for Esc allows 6x2bits or 4x3bits or 3x4bits if additional information would be useful.
-	if level.int() <= 0 && level.guaranteedDereference() > 0 {
-		return escMax(e|EscContentEscapes, EscNone) // At least one deref, thus only content.
-	}
-	if level.int() < 0 {
-		return EscHeap
-	}
-	if level.int() > maxEncodedLevel {
-		// Cannot encode larger values than maxEncodedLevel.
-		level = levelFrom(maxEncodedLevel)
-	}
-	encoded := uint16(level.int() + 1)
-
-	shift := uint(bitsPerOutputInTag*(vargen-1) + EscReturnBits)
-	old := (e >> shift) & bitsMaskForTag
-	if old == 0 || encoded != 0 && encoded < old {
-		old = encoded
-	}
-
-	encodedFlow := old << shift
-	if (encodedFlow>>shift)&bitsMaskForTag != old {
-		// Encoding failure defaults to heap.
-		return EscHeap
-	}
-
-	return (e &^ (bitsMaskForTag << shift)) | encodedFlow
-}
-
-func initEscretval(e *EscState, n *Node, fntype *Type) {
-	i := 0
-	nE := e.nodeEscState(n)
-	nE.Escretval = nil // Suspect this is not nil for indirect calls.
-	for t := getoutargx(fntype).Type; t != nil; t = t.Down {
-		src := Nod(ONAME, nil, nil)
-		buf := fmt.Sprintf(".out%d", i)
-		i++
-		src.Sym = Lookup(buf)
-		src.Type = t.Type
-		src.Class = PAUTO
-		src.Name.Curfn = Curfn
-		e.nodeEscState(src).Escloopdepth = e.loopdepth
-		src.Used = true
-		src.Lineno = n.Lineno
-		nE.Escretval = list(nE.Escretval, src)
-	}
-}
-
-// This is a bit messier than fortunate, pulled out of esc's big
-// switch for clarity.	We either have the paramnodes, which may be
-// connected to other things through flows or we have the parameter type
-// nodes, which may be marked "noescape". Navigating the ast is slightly
-// different for methods vs plain functions and for imported vs
-// this-package
-func esccall(e *EscState, n *Node, up *Node) {
-	var fntype *Type
-	var indirect bool
-	var fn *Node
-	switch n.Op {
-	default:
-		Fatal("esccall")
-
-	case OCALLFUNC:
-		fn = n.Left
-		fntype = fn.Type
-		indirect = fn.Op != ONAME || fn.Class != PFUNC
-
-	case OCALLMETH:
-		fn = n.Left.Right.Sym.Def
-		if fn != nil {
-			fntype = fn.Type
-		} else {
-			fntype = n.Left.Type
-		}
-
-	case OCALLINTER:
-		fntype = n.Left.Type
-		indirect = true
-	}
-
-	ll := n.List
-	if n.List != nil && n.List.Next == nil {
-		a := n.List.N
-		if a.Type.Etype == TSTRUCT && a.Type.Funarg != 0 { // f(g()).
-			ll = e.nodeEscState(a).Escretval
-		}
-	}
-
-	if indirect {
-		// We know nothing!
-		// Leak all the parameters
-		for ; ll != nil; ll = ll.Next {
-			escassign(e, &e.theSink, ll.N)
-			if Debug['m'] > 2 {
-				fmt.Printf("%v::esccall:: indirect call <- %v, untracked\n", Ctxt.Line(int(lineno)), Nconv(ll.N, obj.FmtShort))
-			}
-		}
-		// Set up bogus outputs
-		initEscretval(e, n, fntype)
-		// If there is a receiver, it also leaks to heap.
-		if n.Op != OCALLFUNC {
-			t := getthisx(fntype).Type
-			src := n.Left.Left
-			if haspointers(t.Type) {
-				escassign(e, &e.theSink, src)
-			}
-		}
-		return
-	}
-
-	nE := e.nodeEscState(n)
-	if fn != nil && fn.Op == ONAME && fn.Class == PFUNC &&
-		fn.Name.Defn != nil && fn.Name.Defn.Nbody != nil && fn.Name.Param.Ntype != nil && fn.Name.Defn.Esc < EscFuncTagged {
-		if Debug['m'] > 2 {
-			fmt.Printf("%v::esccall:: %v in recursive group\n", Ctxt.Line(int(lineno)), Nconv(n, obj.FmtShort))
-		}
-
-		// function in same mutually recursive group.  Incorporate into flow graph.
-		//		print("esc local fn: %N\n", fn->ntype);
-		if fn.Name.Defn.Esc == EscFuncUnknown || nE.Escretval != nil {
-			Fatal("graph inconsistency")
-		}
-
-		// set up out list on this call node
-		for lr := fn.Name.Param.Ntype.Rlist; lr != nil; lr = lr.Next {
-			nE.Escretval = list(nE.Escretval, lr.N.Left) // type.rlist ->  dclfield -> ONAME (PPARAMOUT)
-		}
-
-		// Receiver.
-		if n.Op != OCALLFUNC {
-			escassign(e, fn.Name.Param.Ntype.Left.Left, n.Left.Left)
-		}
-
-		var src *Node
-		for lr := fn.Name.Param.Ntype.List; ll != nil && lr != nil; ll, lr = ll.Next, lr.Next {
-			src = ll.N
-			if lr.N.Isddd && !n.Isddd {
-				// Introduce ODDDARG node to represent ... allocation.
-				src = Nod(ODDDARG, nil, nil)
-				src.Type = typ(TARRAY)
-				src.Type.Type = lr.N.Type.Type
-				src.Type.Bound = int64(count(ll))
-				src.Type = Ptrto(src.Type) // make pointer so it will be tracked
-				src.Lineno = n.Lineno
-				e.track(src)
-				n.Right = src
-			}
-
-			if lr.N.Left != nil {
-				escassign(e, lr.N.Left, src)
-			}
-			if src != ll.N {
-				break
-			}
-		}
-
-		// "..." arguments are untracked
-		for ; ll != nil; ll = ll.Next {
-			if Debug['m'] > 2 {
-				fmt.Printf("%v::esccall:: ... <- %v, untracked\n", Ctxt.Line(int(lineno)), Nconv(ll.N, obj.FmtShort))
-			}
-			escassign(e, &e.theSink, ll.N)
-		}
-
-		return
-	}
-
-	// Imported or completely analyzed function.  Use the escape tags.
-	if nE.Escretval != nil {
-		Fatal("esc already decorated call %v\n", Nconv(n, obj.FmtSign))
-	}
-
-	if Debug['m'] > 2 {
-		fmt.Printf("%v::esccall:: %v not recursive\n", Ctxt.Line(int(lineno)), Nconv(n, obj.FmtShort))
-	}
-
-	// set up out list on this call node with dummy auto ONAMES in the current (calling) function.
-	initEscretval(e, n, fntype)
-
-	//	print("esc analyzed fn: %#N (%+T) returning (%+H)\n", fn, fntype, n->escretval);
-
-	// Receiver.
-	if n.Op != OCALLFUNC {
-		t := getthisx(fntype).Type
-		src := n.Left.Left
-		if haspointers(t.Type) {
-			escassignfromtag(e, t.Note, nE.Escretval, src)
-		}
-	}
-
-	for t := getinargx(fntype).Type; ll != nil; ll = ll.Next {
-		src := ll.N
-		if t.Isddd && !n.Isddd {
-			// Introduce ODDDARG node to represent ... allocation.
-			src = Nod(ODDDARG, nil, nil)
-			src.Lineno = n.Lineno
-			src.Type = typ(TARRAY)
-			src.Type.Type = t.Type.Type
-			src.Type.Bound = int64(count(ll))
-			src.Type = Ptrto(src.Type) // make pointer so it will be tracked
-			e.track(src)
-			n.Right = src
-		}
-
-		if haspointers(t.Type) {
-			if escassignfromtag(e, t.Note, nE.Escretval, src) == EscNone && up.Op != ODEFER && up.Op != OPROC {
-				a := src
-				for a.Op == OCONVNOP {
-					a = a.Left
-				}
-				switch a.Op {
-				// The callee has already been analyzed, so its arguments have esc tags.
-				// The argument is marked as not escaping at all.
-				// Record that fact so that any temporary used for
-				// synthesizing this expression can be reclaimed when
-				// the function returns.
-				// This 'noescape' is even stronger than the usual esc == EscNone.
-				// src->esc == EscNone means that src does not escape the current function.
-				// src->noescape = 1 here means that src does not escape this statement
-				// in the current function.
-				case OCALLPART,
-					OCLOSURE,
-					ODDDARG,
-					OARRAYLIT,
-					OPTRLIT,
-					OSTRUCTLIT:
-					a.Noescape = true
-				}
-			}
-		}
-
-		if src != ll.N {
-			break
-		}
-		t = t.Down
-	}
-
-	// "..." arguments are untracked
-	for ; ll != nil; ll = ll.Next {
-		escassign(e, &e.theSink, ll.N)
-		if Debug['m'] > 2 {
-			fmt.Printf("%v::esccall:: ... <- %v, untracked\n", Ctxt.Line(int(lineno)), Nconv(ll.N, obj.FmtShort))
-		}
-	}
-}
-
-// escflows records the link src->dst in dst, throwing out some quick wins,
-// and also ensuring that dst is noted as a flow destination.
-func escflows(e *EscState, dst *Node, src *Node) {
-	if dst == nil || src == nil || dst == src {
-		return
-	}
-
-	// Don't bother building a graph for scalars.
-	if src.Type != nil && !haspointers(src.Type) {
-		return
-	}
-
-	if Debug['m'] > 2 {
-		fmt.Printf("%v::flows:: %v <- %v\n", Ctxt.Line(int(lineno)), Nconv(dst, obj.FmtShort), Nconv(src, obj.FmtShort))
-	}
-
-	dstE := e.nodeEscState(dst)
-	if dstE.Escflowsrc == nil {
-		e.dsts = list(e.dsts, dst)
-		e.dstcount++
-	}
-
-	e.edgecount++
-
-	dstE.Escflowsrc = list(dstE.Escflowsrc, src)
-}
-
-// Whenever we hit a reference node, the level goes up by one, and whenever
-// we hit an OADDR, the level goes down by one. as long as we're on a level > 0
-// finding an OADDR just means we're following the upstream of a dereference,
-// so this address doesn't leak (yet).
-// If level == 0, it means the /value/ of this node can reach the root of this flood.
-// so if this node is an OADDR, it's argument should be marked as escaping iff
-// it's currfn/e->loopdepth are different from the flood's root.
-// Once an object has been moved to the heap, all of it's upstream should be considered
-// escaping to the global scope.
-func escflood(e *EscState, dst *Node) {
-	switch dst.Op {
-	case ONAME, OCLOSURE:
-		break
-
-	default:
-		return
-	}
-
-	dstE := e.nodeEscState(dst)
-	if Debug['m'] > 1 {
-		fmt.Printf("\nescflood:%d: dst %v scope:%v[%d]\n", e.walkgen, Nconv(dst, obj.FmtShort), e.curfnSym(dst), dstE.Escloopdepth)
-	}
-
-	for l := dstE.Escflowsrc; l != nil; l = l.Next {
-		e.walkgen++
-		escwalk(e, levelFrom(0), dst, l.N)
-	}
-}
-
-// funcOutputAndInput reports whether dst and src correspond to output and input parameters of the same function.
-func funcOutputAndInput(dst, src *Node) bool {
-	// Note if dst is marked as escaping, then "returned" is too weak.
-	return dst.Op == ONAME && dst.Class == PPARAMOUT &&
-		src.Op == ONAME && src.Class == PPARAM && src.Name.Curfn == dst.Name.Curfn
-}
-
-func escwalk(e *EscState, level Level, dst *Node, src *Node) {
-	if src.Op == OLITERAL {
-		return
-	}
-	srcE := e.nodeEscState(src)
-	if srcE.Walkgen == e.walkgen {
-		// Esclevels are vectors, do not compare as integers,
-		// and must use "min" of old and new to guarantee
-		// convergence.
-		level = level.min(srcE.Esclevel)
-		if level == srcE.Esclevel {
-			return
-		}
-	}
-
-	srcE.Walkgen = e.walkgen
-	srcE.Esclevel = level
-
-	if Debug['m'] > 1 {
-		fmt.Printf("escwalk: level:%d depth:%d %.*s op=%v %v(%v) scope:%v[%d]\n",
-			level, e.pdepth, e.pdepth, "\t\t\t\t\t\t\t\t\t\t", Oconv(int(src.Op), 0), Nconv(src, obj.FmtShort), Jconv(src, obj.FmtShort), e.curfnSym(src), srcE.Escloopdepth)
-	}
-
-	e.pdepth++
-
-	// Input parameter flowing to output parameter?
-	var leaks bool
-	dstE := e.nodeEscState(dst)
-	if funcOutputAndInput(dst, src) && src.Esc&EscMask < EscScope && dst.Esc != EscHeap {
-		// This case handles:
-		// 1. return in
-		// 2. return &in
-		// 3. tmp := in; return &tmp
-		// 4. return *in
-		if Debug['m'] != 0 {
-			if Debug['m'] == 1 {
-				Warnl(int(src.Lineno), "leaking param: %v to result %v level=%v", Nconv(src, obj.FmtShort), dst.Sym, level.int())
-			} else {
-				Warnl(int(src.Lineno), "leaking param: %v to result %v level=%v", Nconv(src, obj.FmtShort), dst.Sym, level)
-			}
-		}
-		if src.Esc&EscMask != EscReturn {
-			src.Esc = EscReturn | src.Esc&EscContentEscapes
-		}
-		src.Esc = escNoteOutputParamFlow(src.Esc, dst.Name.Vargen, level)
-		goto recurse
-	}
-
-	// If parameter content escapes to heap, set EscContentEscapes
-	// Note minor confusion around escape from pointer-to-struct vs escape from struct
-	if dst.Esc == EscHeap &&
-		src.Op == ONAME && src.Class == PPARAM && src.Esc&EscMask < EscScope &&
-		level.int() > 0 {
-		src.Esc = escMax(EscContentEscapes|src.Esc, EscNone)
-		if Debug['m'] != 0 {
-			Warnl(int(src.Lineno), "mark escaped content: %v", Nconv(src, obj.FmtShort))
-		}
-	}
-
-	leaks = level.int() <= 0 && level.guaranteedDereference() <= 0 && dstE.Escloopdepth < srcE.Escloopdepth
-
-	switch src.Op {
-	case ONAME:
-		if src.Class == PPARAM && (leaks || dstE.Escloopdepth < 0) && src.Esc&EscMask < EscScope {
-			if level.guaranteedDereference() > 0 {
-				src.Esc = escMax(EscContentEscapes|src.Esc, EscNone)
-				if Debug['m'] != 0 {
-					if Debug['m'] == 1 {
-						Warnl(int(src.Lineno), "leaking param content: %v", Nconv(src, obj.FmtShort))
-					} else {
-						Warnl(int(src.Lineno), "leaking param content: %v level=%v dst.eld=%v src.eld=%v dst=%v",
-							Nconv(src, obj.FmtShort), level, dstE.Escloopdepth, srcE.Escloopdepth, Nconv(dst, obj.FmtShort))
-					}
-				}
-			} else {
-				src.Esc = EscScope
-				if Debug['m'] != 0 {
-					if Debug['m'] == 1 {
-						Warnl(int(src.Lineno), "leaking param: %v", Nconv(src, obj.FmtShort))
-					} else {
-						Warnl(int(src.Lineno), "leaking param: %v level=%v dst.eld=%v src.eld=%v dst=%v",
-							Nconv(src, obj.FmtShort), level, dstE.Escloopdepth, srcE.Escloopdepth, Nconv(dst, obj.FmtShort))
-					}
-				}
-			}
-		}
-
-		// Treat a PPARAMREF closure variable as equivalent to the
-		// original variable.
-		if src.Class == PPARAMREF {
-			if leaks && Debug['m'] != 0 {
-				Warnl(int(src.Lineno), "leaking closure reference %v", Nconv(src, obj.FmtShort))
-			}
-			escwalk(e, level, dst, src.Name.Param.Closure)
-		}
-
-	case OPTRLIT, OADDR:
-		if leaks {
-			src.Esc = EscHeap
-			addrescapes(src.Left)
-			if Debug['m'] != 0 {
-				p := src
-				if p.Left.Op == OCLOSURE {
-					p = p.Left // merely to satisfy error messages in tests
-				}
-				if Debug['m'] > 1 {
-					Warnl(int(src.Lineno), "%v escapes to heap, level=%v, dst.eld=%v, src.eld=%v",
-						Nconv(p, obj.FmtShort), level, dstE.Escloopdepth, srcE.Escloopdepth)
-				} else {
-					Warnl(int(src.Lineno), "%v escapes to heap", Nconv(p, obj.FmtShort))
-				}
-			}
-		}
-
-		escwalk(e, level.dec(), dst, src.Left)
-
-	case OAPPEND:
-		escwalk(e, level, dst, src.List.N)
-
-	case OARRAYLIT:
-		if Isfixedarray(src.Type) {
-			break
-		}
-		for ll := src.List; ll != nil; ll = ll.Next {
-			escwalk(e, level.dec(), dst, ll.N.Right)
-		}
-
-		fallthrough
-
-	case ODDDARG,
-		OMAKECHAN,
-		OMAKEMAP,
-		OMAKESLICE,
-		OARRAYRUNESTR,
-		OARRAYBYTESTR,
-		OSTRARRAYRUNE,
-		OSTRARRAYBYTE,
-		OADDSTR,
-		OMAPLIT,
-		ONEW,
-		OCLOSURE,
-		OCALLPART,
-		ORUNESTR,
-		OCONVIFACE:
-		if leaks {
-			src.Esc = EscHeap
-			if Debug['m'] != 0 {
-				Warnl(int(src.Lineno), "%v escapes to heap", Nconv(src, obj.FmtShort))
-			}
-		}
-
-	case ODOT,
-		ODOTTYPE,
-		OSLICE,
-		OSLICEARR,
-		OSLICE3,
-		OSLICE3ARR,
-		OSLICESTR:
-		escwalk(e, level, dst, src.Left)
-
-	case OINDEX:
-		if Isfixedarray(src.Left.Type) {
-			escwalk(e, level, dst, src.Left)
-			break
-		}
-		fallthrough
-
-	case ODOTPTR, OINDEXMAP, OIND:
-		escwalk(e, level.inc(), dst, src.Left)
-
-	// In this case a link went directly to a call, but should really go
-	// to the dummy .outN outputs that were created for the call that
-	// themselves link to the inputs with levels adjusted.
-	// See e.g. #10466
-	// This can only happen with functions returning a single result.
-	case OCALLMETH, OCALLFUNC, OCALLINTER:
-		if srcE.Escretval != nil {
-			if Debug['m'] > 1 {
-				fmt.Printf("%v:[%d] dst %v escwalk replace src: %v with %v\n",
-					Ctxt.Line(int(lineno)), e.loopdepth,
-					Nconv(dst, obj.FmtShort), Nconv(src, obj.FmtShort), Nconv(srcE.Escretval.N, obj.FmtShort))
-			}
-			src = srcE.Escretval.N
-			srcE = e.nodeEscState(src)
-		}
-	}
-
-recurse:
-	level = level.copy()
-	for ll := srcE.Escflowsrc; ll != nil; ll = ll.Next {
-		escwalk(e, level, dst, ll.N)
-	}
-
-	e.pdepth--
-}
-
-func esctag(e *EscState, func_ *Node) {
-	func_.Esc = EscFuncTagged
-
-	// External functions are assumed unsafe,
-	// unless //go:noescape is given before the declaration.
-	if func_.Nbody == nil {
-		if func_.Noescape {
-			for t := getinargx(func_.Type).Type; t != nil; t = t.Down {
-				if haspointers(t.Type) {
-					t.Note = mktag(EscNone)
-				}
-			}
-		}
-
-		return
-	}
-
-	savefn := Curfn
-	Curfn = func_
-
-	for ll := Curfn.Func.Dcl; ll != nil; ll = ll.Next {
-		if ll.N.Op != ONAME {
-			continue
-		}
-
-		switch ll.N.Esc & EscMask {
-		case EscNone, // not touched by escflood
-			EscReturn:
-			if haspointers(ll.N.Type) { // don't bother tagging for scalars
-				ll.N.Name.Param.Field.Note = mktag(int(ll.N.Esc))
-			}
-
-		case EscHeap, // touched by escflood, moved to heap
-			EscScope: // touched by escflood, value leaves scope
-			break
-		}
-	}
-
-	Curfn = savefn
-}
diff --git a/src/cmd/compile/internal/gc/export.go b/src/cmd/compile/internal/gc/export.go
deleted file mode 100644
index 66ae881..0000000
--- a/src/cmd/compile/internal/gc/export.go
+++ /dev/null
@@ -1,561 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-	"sort"
-	"unicode"
-	"unicode/utf8"
-)
-
-var asmlist *NodeList
-
-// Mark n's symbol as exported
-func exportsym(n *Node) {
-	if n == nil || n.Sym == nil {
-		return
-	}
-	if n.Sym.Flags&(SymExport|SymPackage) != 0 {
-		if n.Sym.Flags&SymPackage != 0 {
-			Yyerror("export/package mismatch: %v", n.Sym)
-		}
-		return
-	}
-
-	n.Sym.Flags |= SymExport
-
-	if Debug['E'] != 0 {
-		fmt.Printf("export symbol %v\n", n.Sym)
-	}
-	exportlist = list(exportlist, n)
-}
-
-func exportname(s string) bool {
-	if s[0] < utf8.RuneSelf {
-		return 'A' <= s[0] && s[0] <= 'Z'
-	}
-	r, _ := utf8.DecodeRuneInString(s)
-	return unicode.IsUpper(r)
-}
-
-func initname(s string) bool {
-	return s == "init"
-}
-
-// exportedsym reports whether a symbol will be visible
-// to files that import our package.
-func exportedsym(sym *Sym) bool {
-	// Builtins are visible everywhere.
-	if sym.Pkg == builtinpkg || sym.Origpkg == builtinpkg {
-		return true
-	}
-
-	return sym.Pkg == localpkg && exportname(sym.Name)
-}
-
-func autoexport(n *Node, ctxt uint8) {
-	if n == nil || n.Sym == nil {
-		return
-	}
-	if (ctxt != PEXTERN && ctxt != PFUNC) || dclcontext != PEXTERN {
-		return
-	}
-	if n.Name.Param != nil && n.Name.Param.Ntype != nil && n.Name.Param.Ntype.Op == OTFUNC && n.Name.Param.Ntype.Left != nil { // method
-		return
-	}
-
-	// -A is for cmd/gc/mkbuiltin script, so export everything
-	if Debug['A'] != 0 || exportname(n.Sym.Name) || initname(n.Sym.Name) {
-		exportsym(n)
-	}
-	if asmhdr != "" && n.Sym.Pkg == localpkg && n.Sym.Flags&SymAsm == 0 {
-		n.Sym.Flags |= SymAsm
-		asmlist = list(asmlist, n)
-	}
-}
-
-func dumppkg(p *Pkg) {
-	if p == nil || p == localpkg || p.Exported != 0 || p == builtinpkg {
-		return
-	}
-	p.Exported = 1
-	suffix := ""
-	if p.Direct == 0 {
-		suffix = " // indirect"
-	}
-	fmt.Fprintf(bout, "\timport %s %q%s\n", p.Name, p.Path, suffix)
-}
-
-// Look for anything we need for the inline body
-func reexportdeplist(ll *NodeList) {
-	for ; ll != nil; ll = ll.Next {
-		reexportdep(ll.N)
-	}
-}
-
-func reexportdep(n *Node) {
-	if n == nil {
-		return
-	}
-
-	//print("reexportdep %+hN\n", n);
-	switch n.Op {
-	case ONAME:
-		switch n.Class &^ PHEAP {
-		// methods will be printed along with their type
-		// nodes for T.Method expressions
-		case PFUNC:
-			if n.Left != nil && n.Left.Op == OTYPE {
-				break
-			}
-
-			// nodes for method calls.
-			if n.Type == nil || n.Type.Thistuple > 0 {
-				break
-			}
-			fallthrough
-
-		case PEXTERN:
-			if n.Sym != nil && !exportedsym(n.Sym) {
-				if Debug['E'] != 0 {
-					fmt.Printf("reexport name %v\n", n.Sym)
-				}
-				exportlist = list(exportlist, n)
-			}
-		}
-
-		// Local variables in the bodies need their type.
-	case ODCL:
-		t := n.Left.Type
-
-		if t != Types[t.Etype] && t != idealbool && t != idealstring {
-			if Isptr[t.Etype] {
-				t = t.Type
-			}
-			if t != nil && t.Sym != nil && t.Sym.Def != nil && !exportedsym(t.Sym) {
-				if Debug['E'] != 0 {
-					fmt.Printf("reexport type %v from declaration\n", t.Sym)
-				}
-				exportlist = list(exportlist, t.Sym.Def)
-			}
-		}
-
-	case OLITERAL:
-		t := n.Type
-		if t != Types[n.Type.Etype] && t != idealbool && t != idealstring {
-			if Isptr[t.Etype] {
-				t = t.Type
-			}
-			if t != nil && t.Sym != nil && t.Sym.Def != nil && !exportedsym(t.Sym) {
-				if Debug['E'] != 0 {
-					fmt.Printf("reexport literal type %v\n", t.Sym)
-				}
-				exportlist = list(exportlist, t.Sym.Def)
-			}
-		}
-		fallthrough
-
-	case OTYPE:
-		if n.Sym != nil && !exportedsym(n.Sym) {
-			if Debug['E'] != 0 {
-				fmt.Printf("reexport literal/type %v\n", n.Sym)
-			}
-			exportlist = list(exportlist, n)
-		}
-
-		// for operations that need a type when rendered, put the type on the export list.
-	case OCONV,
-		OCONVIFACE,
-		OCONVNOP,
-		ORUNESTR,
-		OARRAYBYTESTR,
-		OARRAYRUNESTR,
-		OSTRARRAYBYTE,
-		OSTRARRAYRUNE,
-		ODOTTYPE,
-		ODOTTYPE2,
-		OSTRUCTLIT,
-		OARRAYLIT,
-		OPTRLIT,
-		OMAKEMAP,
-		OMAKESLICE,
-		OMAKECHAN:
-		t := n.Type
-
-		if t.Sym == nil && t.Type != nil {
-			t = t.Type
-		}
-		if t != nil && t.Sym != nil && t.Sym.Def != nil && !exportedsym(t.Sym) {
-			if Debug['E'] != 0 {
-				fmt.Printf("reexport type for expression %v\n", t.Sym)
-			}
-			exportlist = list(exportlist, t.Sym.Def)
-		}
-	}
-
-	reexportdep(n.Left)
-	reexportdep(n.Right)
-	reexportdeplist(n.List)
-	reexportdeplist(n.Rlist)
-	reexportdeplist(n.Ninit)
-	reexportdeplist(n.Nbody)
-}
-
-func dumpexportconst(s *Sym) {
-	n := s.Def
-	typecheck(&n, Erv)
-	if n == nil || n.Op != OLITERAL {
-		Fatal("dumpexportconst: oconst nil: %v", s)
-	}
-
-	t := n.Type // may or may not be specified
-	dumpexporttype(t)
-
-	if t != nil && !isideal(t) {
-		fmt.Fprintf(bout, "\tconst %v %v = %v\n", Sconv(s, obj.FmtSharp), Tconv(t, obj.FmtSharp), Vconv(n.Val(), obj.FmtSharp))
-	} else {
-		fmt.Fprintf(bout, "\tconst %v = %v\n", Sconv(s, obj.FmtSharp), Vconv(n.Val(), obj.FmtSharp))
-	}
-}
-
-func dumpexportvar(s *Sym) {
-	n := s.Def
-	typecheck(&n, Erv|Ecall)
-	if n == nil || n.Type == nil {
-		Yyerror("variable exported but not defined: %v", s)
-		return
-	}
-
-	t := n.Type
-	dumpexporttype(t)
-
-	if t.Etype == TFUNC && n.Class == PFUNC {
-		if n.Func != nil && n.Func.Inl != nil {
-			// when lazily typechecking inlined bodies, some re-exported ones may not have been typechecked yet.
-			// currently that can leave unresolved ONONAMEs in import-dot-ed packages in the wrong package
-			if Debug['l'] < 2 {
-				typecheckinl(n)
-			}
-
-			// NOTE: The space after %#S here is necessary for ld's export data parser.
-			fmt.Fprintf(bout, "\tfunc %v %v { %v }\n", Sconv(s, obj.FmtSharp), Tconv(t, obj.FmtShort|obj.FmtSharp), Hconv(n.Func.Inl, obj.FmtSharp))
-
-			reexportdeplist(n.Func.Inl)
-		} else {
-			fmt.Fprintf(bout, "\tfunc %v %v\n", Sconv(s, obj.FmtSharp), Tconv(t, obj.FmtShort|obj.FmtSharp))
-		}
-	} else {
-		fmt.Fprintf(bout, "\tvar %v %v\n", Sconv(s, obj.FmtSharp), Tconv(t, obj.FmtSharp))
-	}
-}
-
-type methodbyname []*Type
-
-func (x methodbyname) Len() int {
-	return len(x)
-}
-
-func (x methodbyname) Swap(i, j int) {
-	x[i], x[j] = x[j], x[i]
-}
-
-func (x methodbyname) Less(i, j int) bool {
-	a := x[i]
-	b := x[j]
-	return stringsCompare(a.Sym.Name, b.Sym.Name) < 0
-}
-
-func dumpexporttype(t *Type) {
-	if t == nil {
-		return
-	}
-	if t.Printed != 0 || t == Types[t.Etype] || t == bytetype || t == runetype || t == errortype {
-		return
-	}
-	t.Printed = 1
-
-	if t.Sym != nil && t.Etype != TFIELD {
-		dumppkg(t.Sym.Pkg)
-	}
-
-	dumpexporttype(t.Type)
-	dumpexporttype(t.Down)
-
-	if t.Sym == nil || t.Etype == TFIELD {
-		return
-	}
-
-	n := 0
-	for f := t.Method; f != nil; f = f.Down {
-		dumpexporttype(f)
-		n++
-	}
-
-	m := make([]*Type, n)
-	i := 0
-	for f := t.Method; f != nil; f = f.Down {
-		m[i] = f
-		i++
-	}
-	sort.Sort(methodbyname(m[:n]))
-
-	fmt.Fprintf(bout, "\ttype %v %v\n", Sconv(t.Sym, obj.FmtSharp), Tconv(t, obj.FmtSharp|obj.FmtLong))
-	var f *Type
-	for i := 0; i < n; i++ {
-		f = m[i]
-		if f.Nointerface {
-			fmt.Fprintf(bout, "\t//go:nointerface\n")
-		}
-		if f.Type.Nname != nil && f.Type.Nname.Func.Inl != nil { // nname was set by caninl
-
-			// when lazily typechecking inlined bodies, some re-exported ones may not have been typechecked yet.
-			// currently that can leave unresolved ONONAMEs in import-dot-ed packages in the wrong package
-			if Debug['l'] < 2 {
-				typecheckinl(f.Type.Nname)
-			}
-			fmt.Fprintf(bout, "\tfunc (%v) %v %v { %v }\n", Tconv(getthisx(f.Type).Type, obj.FmtSharp), Sconv(f.Sym, obj.FmtShort|obj.FmtByte|obj.FmtSharp), Tconv(f.Type, obj.FmtShort|obj.FmtSharp), Hconv(f.Type.Nname.Func.Inl, obj.FmtSharp))
-			reexportdeplist(f.Type.Nname.Func.Inl)
-		} else {
-			fmt.Fprintf(bout, "\tfunc (%v) %v %v\n", Tconv(getthisx(f.Type).Type, obj.FmtSharp), Sconv(f.Sym, obj.FmtShort|obj.FmtByte|obj.FmtSharp), Tconv(f.Type, obj.FmtShort|obj.FmtSharp))
-		}
-	}
-}
-
-func dumpsym(s *Sym) {
-	if s.Flags&SymExported != 0 {
-		return
-	}
-	s.Flags |= SymExported
-
-	if s.Def == nil {
-		Yyerror("unknown export symbol: %v", s)
-		return
-	}
-
-	//	print("dumpsym %O %+S\n", s->def->op, s);
-	dumppkg(s.Pkg)
-
-	switch s.Def.Op {
-	default:
-		Yyerror("unexpected export symbol: %v %v", Oconv(int(s.Def.Op), 0), s)
-
-	case OLITERAL:
-		dumpexportconst(s)
-
-	case OTYPE:
-		if s.Def.Type.Etype == TFORW {
-			Yyerror("export of incomplete type %v", s)
-		} else {
-			dumpexporttype(s.Def.Type)
-		}
-
-	case ONAME:
-		dumpexportvar(s)
-	}
-}
-
-func dumpexport() {
-	lno := lineno
-
-	if buildid != "" {
-		fmt.Fprintf(bout, "build id %q\n", buildid)
-	}
-	fmt.Fprintf(bout, "\n$$\npackage %s", localpkg.Name)
-	if safemode != 0 {
-		fmt.Fprintf(bout, " safe")
-	}
-	fmt.Fprintf(bout, "\n")
-
-	for _, p := range pkgs {
-		if p.Direct != 0 {
-			dumppkg(p)
-		}
-	}
-
-	for l := exportlist; l != nil; l = l.Next {
-		lineno = l.N.Lineno
-		dumpsym(l.N.Sym)
-	}
-
-	fmt.Fprintf(bout, "\n$$\n")
-	lineno = lno
-}
-
-/*
- * import
- */
-
-/*
- * return the sym for ss, which should match lexical
- */
-func importsym(s *Sym, op int) *Sym {
-	if s.Def != nil && int(s.Def.Op) != op {
-		pkgstr := fmt.Sprintf("during import %q", importpkg.Path)
-		redeclare(s, pkgstr)
-	}
-
-	// mark the symbol so it is not reexported
-	if s.Def == nil {
-		if exportname(s.Name) || initname(s.Name) {
-			s.Flags |= SymExport
-		} else {
-			s.Flags |= SymPackage // package scope
-		}
-	}
-
-	return s
-}
-
-/*
- * return the type pkg.name, forward declaring if needed
- */
-func pkgtype(s *Sym) *Type {
-	importsym(s, OTYPE)
-	if s.Def == nil || s.Def.Op != OTYPE {
-		t := typ(TFORW)
-		t.Sym = s
-		s.Def = typenod(t)
-		s.Def.Name = new(Name)
-	}
-
-	if s.Def.Type == nil {
-		Yyerror("pkgtype %v", s)
-	}
-	return s.Def.Type
-}
-
-var numImport = make(map[string]int)
-
-func importimport(s *Sym, path string) {
-	// Informational: record package name
-	// associated with import path, for use in
-	// human-readable messages.
-
-	if isbadimport(path) {
-		errorexit()
-	}
-	p := mkpkg(path)
-	if p.Name == "" {
-		p.Name = s.Name
-		numImport[s.Name]++
-	} else if p.Name != s.Name {
-		Yyerror("conflicting names %s and %s for package %q", p.Name, s.Name, p.Path)
-	}
-
-	if incannedimport == 0 && myimportpath != "" && path == myimportpath {
-		Yyerror("import %q: package depends on %q (import cycle)", importpkg.Path, path)
-		errorexit()
-	}
-}
-
-func importconst(s *Sym, t *Type, n *Node) {
-	importsym(s, OLITERAL)
-	Convlit(&n, t)
-
-	if s.Def != nil { // TODO: check if already the same.
-		return
-	}
-
-	if n.Op != OLITERAL {
-		Yyerror("expression must be a constant")
-		return
-	}
-
-	if n.Sym != nil {
-		n1 := Nod(OXXX, nil, nil)
-		*n1 = *n
-		n = n1
-	}
-
-	n.Orig = newname(s)
-	n.Sym = s
-	declare(n, PEXTERN)
-
-	if Debug['E'] != 0 {
-		fmt.Printf("import const %v\n", s)
-	}
-}
-
-func importvar(s *Sym, t *Type) {
-	importsym(s, ONAME)
-	if s.Def != nil && s.Def.Op == ONAME {
-		if Eqtype(t, s.Def.Type) {
-			return
-		}
-		Yyerror("inconsistent definition for var %v during import\n\t%v (in %q)\n\t%v (in %q)", s, s.Def.Type, s.Importdef.Path, t, importpkg.Path)
-	}
-
-	n := newname(s)
-	s.Importdef = importpkg
-	n.Type = t
-	declare(n, PEXTERN)
-
-	if Debug['E'] != 0 {
-		fmt.Printf("import var %v %v\n", s, Tconv(t, obj.FmtLong))
-	}
-}
-
-func importtype(pt *Type, t *Type) {
-	// override declaration in unsafe.go for Pointer.
-	// there is no way in Go code to define unsafe.Pointer
-	// so we have to supply it.
-	if incannedimport != 0 && importpkg.Name == "unsafe" && pt.Nod.Sym.Name == "Pointer" {
-		t = Types[TUNSAFEPTR]
-	}
-
-	if pt.Etype == TFORW {
-		n := pt.Nod
-		copytype(pt.Nod, t)
-		pt.Nod = n // unzero nod
-		pt.Sym.Importdef = importpkg
-		pt.Sym.Lastlineno = int32(parserline())
-		declare(n, PEXTERN)
-		checkwidth(pt)
-	} else if !Eqtype(pt.Orig, t) {
-		Yyerror("inconsistent definition for type %v during import\n\t%v (in %q)\n\t%v (in %q)", pt.Sym, Tconv(pt, obj.FmtLong), pt.Sym.Importdef.Path, Tconv(t, obj.FmtLong), importpkg.Path)
-	}
-
-	if Debug['E'] != 0 {
-		fmt.Printf("import type %v %v\n", pt, Tconv(t, obj.FmtLong))
-	}
-}
-
-func dumpasmhdr() {
-	var b *obj.Biobuf
-
-	b, err := obj.Bopenw(asmhdr)
-	if err != nil {
-		Fatal("%v", err)
-	}
-	fmt.Fprintf(b, "// generated by %cg -asmhdr from package %s\n\n", Thearch.Thechar, localpkg.Name)
-	var n *Node
-	var t *Type
-	for l := asmlist; l != nil; l = l.Next {
-		n = l.N
-		if isblanksym(n.Sym) {
-			continue
-		}
-		switch n.Op {
-		case OLITERAL:
-			fmt.Fprintf(b, "#define const_%s %v\n", n.Sym.Name, Vconv(n.Val(), obj.FmtSharp))
-
-		case OTYPE:
-			t = n.Type
-			if t.Etype != TSTRUCT || t.Map != nil || t.Funarg != 0 {
-				break
-			}
-			fmt.Fprintf(b, "#define %s__size %d\n", t.Sym.Name, int(t.Width))
-			for t = t.Type; t != nil; t = t.Down {
-				if !isblanksym(t.Sym) {
-					fmt.Fprintf(b, "#define %s_%s %d\n", n.Sym.Name, t.Sym.Name, int(t.Width))
-				}
-			}
-		}
-	}
-
-	obj.Bterm(b)
-}
diff --git a/src/cmd/compile/internal/gc/fmt.go b/src/cmd/compile/internal/gc/fmt.go
deleted file mode 100644
index b40014b..0000000
--- a/src/cmd/compile/internal/gc/fmt.go
+++ /dev/null
@@ -1,1724 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import (
-	"bytes"
-	"cmd/internal/obj"
-	"fmt"
-	"strconv"
-	"strings"
-	"unicode/utf8"
-)
-
-//
-// Format conversions
-//	%L int		Line numbers
-//
-//	%E int		etype values (aka 'Kind')
-//
-//	%O int		Node Opcodes
-//		Flags: "%#O": print go syntax. (automatic unless fmtmode == FDbg)
-//
-//	%J Node*	Node details
-//		Flags: "%hJ" suppresses things not relevant until walk.
-//
-//	%V Val*		Constant values
-//
-//	%S Sym*		Symbols
-//		Flags: +,- #: mode (see below)
-//			"%hS"	unqualified identifier in any mode
-//			"%hhS"  in export mode: unqualified identifier if exported, qualified if not
-//
-//	%T Type*	Types
-//		Flags: +,- #: mode (see below)
-//			'l' definition instead of name.
-//			'h' omit "func" and receiver in function types
-//			'u' (only in -/Sym mode) print type identifiers wit package name instead of prefix.
-//
-//	%N Node*	Nodes
-//		Flags: +,- #: mode (see below)
-//			'h' (only in +/debug mode) suppress recursion
-//			'l' (only in Error mode) print "foo (type Bar)"
-//
-//	%H NodeList*	NodeLists
-//		Flags: those of %N
-//			','  separate items with ',' instead of ';'
-//
-//   In mparith1.c:
-//      %B Mpint*	Big integers
-//	%F Mpflt*	Big floats
-//
-//   %S, %T and %N obey use the following flags to set the format mode:
-const (
-	FErr = iota
-	FDbg
-	FExp
-	FTypeId
-)
-
-var fmtmode int = FErr
-
-var fmtpkgpfx int // %uT stickyness
-
-//
-// E.g. for %S:	%+S %#S %-S	print an identifier properly qualified for debug/export/internal mode.
-//
-// The mode flags  +, - and # are sticky, meaning they persist through
-// recursions of %N, %T and %S, but not the h and l flags.  The u flag is
-// sticky only on %T recursions and only used in %-/Sym mode.
-
-//
-// Useful format combinations:
-//
-//	%+N   %+H	multiline recursive debug dump of node/nodelist
-//	%+hN  %+hH	non recursive debug dump
-//
-//	%#N   %#T	export format
-//	%#lT		type definition instead of name
-//	%#hT		omit"func" and receiver in function signature
-//
-//	%lN		"foo (type Bar)" for error messages
-//
-//	%-T		type identifiers
-//	%-hT		type identifiers without "func" and arg names in type signatures (methodsym)
-//	%-uT		type identifiers with package name instead of prefix (typesym, dcommontype, typehash)
-//
-
-func setfmode(flags *int) int {
-	fm := fmtmode
-	if *flags&obj.FmtSign != 0 {
-		fmtmode = FDbg
-	} else if *flags&obj.FmtSharp != 0 {
-		fmtmode = FExp
-	} else if *flags&obj.FmtLeft != 0 {
-		fmtmode = FTypeId
-	}
-
-	*flags &^= (obj.FmtSharp | obj.FmtLeft | obj.FmtSign)
-	return fm
-}
-
-// Fmt "%L": Linenumbers
-
-var goopnames = []string{
-	OADDR:     "&",
-	OADD:      "+",
-	OADDSTR:   "+",
-	OANDAND:   "&&",
-	OANDNOT:   "&^",
-	OAND:      "&",
-	OAPPEND:   "append",
-	OAS:       "=",
-	OAS2:      "=",
-	OBREAK:    "break",
-	OCALL:     "function call", // not actual syntax
-	OCAP:      "cap",
-	OCASE:     "case",
-	OCLOSE:    "close",
-	OCOMPLEX:  "complex",
-	OCOM:      "^",
-	OCONTINUE: "continue",
-	OCOPY:     "copy",
-	ODEC:      "--",
-	ODELETE:   "delete",
-	ODEFER:    "defer",
-	ODIV:      "/",
-	OEQ:       "==",
-	OFALL:     "fallthrough",
-	OFOR:      "for",
-	OGE:       ">=",
-	OGOTO:     "goto",
-	OGT:       ">",
-	OIF:       "if",
-	OIMAG:     "imag",
-	OINC:      "++",
-	OIND:      "*",
-	OLEN:      "len",
-	OLE:       "<=",
-	OLSH:      "<<",
-	OLT:       "<",
-	OMAKE:     "make",
-	OMINUS:    "-",
-	OMOD:      "%",
-	OMUL:      "*",
-	ONEW:      "new",
-	ONE:       "!=",
-	ONOT:      "!",
-	OOROR:     "||",
-	OOR:       "|",
-	OPANIC:    "panic",
-	OPLUS:     "+",
-	OPRINTN:   "println",
-	OPRINT:    "print",
-	ORANGE:    "range",
-	OREAL:     "real",
-	ORECV:     "<-",
-	ORECOVER:  "recover",
-	ORETURN:   "return",
-	ORSH:      ">>",
-	OSELECT:   "select",
-	OSEND:     "<-",
-	OSUB:      "-",
-	OSWITCH:   "switch",
-	OXOR:      "^",
-}
-
-// Fmt "%O":  Node opcodes
-func Oconv(o int, flag int) string {
-	if (flag&obj.FmtSharp != 0) || fmtmode != FDbg {
-		if o >= 0 && o < len(goopnames) && goopnames[o] != "" {
-			return goopnames[o]
-		}
-	}
-
-	if o >= 0 && o < len(opnames) && opnames[o] != "" {
-		return opnames[o]
-	}
-
-	return fmt.Sprintf("O-%d", o)
-}
-
-var classnames = []string{
-	"Pxxx",
-	"PEXTERN",
-	"PAUTO",
-	"PPARAM",
-	"PPARAMOUT",
-	"PPARAMREF",
-	"PFUNC",
-}
-
-// Fmt "%J": Node details.
-func Jconv(n *Node, flag int) string {
-	var buf bytes.Buffer
-
-	c := flag & obj.FmtShort
-
-	if c == 0 && n.Ullman != 0 {
-		fmt.Fprintf(&buf, " u(%d)", n.Ullman)
-	}
-
-	if c == 0 && n.Addable {
-		fmt.Fprintf(&buf, " a(%v)", n.Addable)
-	}
-
-	if c == 0 && n.Name != nil && n.Name.Vargen != 0 {
-		fmt.Fprintf(&buf, " g(%d)", n.Name.Vargen)
-	}
-
-	if n.Lineno != 0 {
-		fmt.Fprintf(&buf, " l(%d)", n.Lineno)
-	}
-
-	if c == 0 && n.Xoffset != BADWIDTH {
-		fmt.Fprintf(&buf, " x(%d%+d)", n.Xoffset, stkdelta[n])
-	}
-
-	if n.Class != 0 {
-		s := ""
-		if n.Class&PHEAP != 0 {
-			s = ",heap"
-		}
-		if int(n.Class&^PHEAP) < len(classnames) {
-			fmt.Fprintf(&buf, " class(%s%s)", classnames[n.Class&^PHEAP], s)
-		} else {
-			fmt.Fprintf(&buf, " class(%d?%s)", n.Class&^PHEAP, s)
-		}
-	}
-
-	if n.Colas {
-		fmt.Fprintf(&buf, " colas(%v)", n.Colas)
-	}
-
-	if n.Name != nil && n.Name.Funcdepth != 0 {
-		fmt.Fprintf(&buf, " f(%d)", n.Name.Funcdepth)
-	}
-	if n.Func != nil && n.Func.Depth != 0 {
-		fmt.Fprintf(&buf, " ff(%d)", n.Func.Depth)
-	}
-
-	switch n.Esc {
-	case EscUnknown:
-		break
-
-	case EscHeap:
-		buf.WriteString(" esc(h)")
-
-	case EscScope:
-		buf.WriteString(" esc(s)")
-
-	case EscNone:
-		buf.WriteString(" esc(no)")
-
-	case EscNever:
-		if c == 0 {
-			buf.WriteString(" esc(N)")
-		}
-
-	default:
-		fmt.Fprintf(&buf, " esc(%d)", n.Esc)
-	}
-
-	if e, ok := n.Opt().(*NodeEscState); ok && e.Escloopdepth != 0 {
-		fmt.Fprintf(&buf, " ld(%d)", e.Escloopdepth)
-	}
-
-	if c == 0 && n.Typecheck != 0 {
-		fmt.Fprintf(&buf, " tc(%d)", n.Typecheck)
-	}
-
-	if c == 0 && n.Dodata != 0 {
-		fmt.Fprintf(&buf, " dd(%d)", n.Dodata)
-	}
-
-	if n.Isddd {
-		fmt.Fprintf(&buf, " isddd(%v)", n.Isddd)
-	}
-
-	if n.Implicit {
-		fmt.Fprintf(&buf, " implicit(%v)", n.Implicit)
-	}
-
-	if n.Embedded != 0 {
-		fmt.Fprintf(&buf, " embedded(%d)", n.Embedded)
-	}
-
-	if n.Addrtaken {
-		buf.WriteString(" addrtaken")
-	}
-
-	if n.Assigned {
-		buf.WriteString(" assigned")
-	}
-
-	if c == 0 && n.Used {
-		fmt.Fprintf(&buf, " used(%v)", n.Used)
-	}
-	return buf.String()
-}
-
-// Fmt "%V": Values
-func Vconv(v Val, flag int) string {
-	switch v.Ctype() {
-	case CTINT:
-		if (flag&obj.FmtSharp != 0) || fmtmode == FExp {
-			return Bconv(v.U.(*Mpint), obj.FmtSharp)
-		}
-		return Bconv(v.U.(*Mpint), 0)
-
-	case CTRUNE:
-		x := Mpgetfix(v.U.(*Mpint))
-		if ' ' <= x && x < 0x80 && x != '\\' && x != '\'' {
-			return fmt.Sprintf("'%c'", int(x))
-		}
-		if 0 <= x && x < 1<<16 {
-			return fmt.Sprintf("'\\u%04x'", uint(int(x)))
-		}
-		if 0 <= x && x <= utf8.MaxRune {
-			return fmt.Sprintf("'\\U%08x'", uint64(x))
-		}
-		return fmt.Sprintf("('\\x00' + %v)", v.U.(*Mpint))
-
-	case CTFLT:
-		if (flag&obj.FmtSharp != 0) || fmtmode == FExp {
-			return Fconv(v.U.(*Mpflt), 0)
-		}
-		return Fconv(v.U.(*Mpflt), obj.FmtSharp)
-
-	case CTCPLX:
-		if (flag&obj.FmtSharp != 0) || fmtmode == FExp {
-			return fmt.Sprintf("(%v+%vi)", &v.U.(*Mpcplx).Real, &v.U.(*Mpcplx).Imag)
-		}
-		if mpcmpfltc(&v.U.(*Mpcplx).Real, 0) == 0 {
-			return fmt.Sprintf("%vi", Fconv(&v.U.(*Mpcplx).Imag, obj.FmtSharp))
-		}
-		if mpcmpfltc(&v.U.(*Mpcplx).Imag, 0) == 0 {
-			return Fconv(&v.U.(*Mpcplx).Real, obj.FmtSharp)
-		}
-		if mpcmpfltc(&v.U.(*Mpcplx).Imag, 0) < 0 {
-			return fmt.Sprintf("(%v%vi)", Fconv(&v.U.(*Mpcplx).Real, obj.FmtSharp), Fconv(&v.U.(*Mpcplx).Imag, obj.FmtSharp))
-		}
-		return fmt.Sprintf("(%v+%vi)", Fconv(&v.U.(*Mpcplx).Real, obj.FmtSharp), Fconv(&v.U.(*Mpcplx).Imag, obj.FmtSharp))
-
-	case CTSTR:
-		return strconv.Quote(v.U.(string))
-
-	case CTBOOL:
-		if v.U.(bool) {
-			return "true"
-		}
-		return "false"
-
-	case CTNIL:
-		return "nil"
-	}
-
-	return fmt.Sprintf("<ctype=%d>", v.Ctype)
-}
-
-/*
-s%,%,\n%g
-s%\n+%\n%g
-s%^[	]*T%%g
-s%,.*%%g
-s%.+%	[T&]		= "&",%g
-s%^	........*\]%&~%g
-s%~	%%g
-*/
-var etnames = []string{
-	TINT:        "INT",
-	TUINT:       "UINT",
-	TINT8:       "INT8",
-	TUINT8:      "UINT8",
-	TINT16:      "INT16",
-	TUINT16:     "UINT16",
-	TINT32:      "INT32",
-	TUINT32:     "UINT32",
-	TINT64:      "INT64",
-	TUINT64:     "UINT64",
-	TUINTPTR:    "UINTPTR",
-	TFLOAT32:    "FLOAT32",
-	TFLOAT64:    "FLOAT64",
-	TCOMPLEX64:  "COMPLEX64",
-	TCOMPLEX128: "COMPLEX128",
-	TBOOL:       "BOOL",
-	TPTR32:      "PTR32",
-	TPTR64:      "PTR64",
-	TFUNC:       "FUNC",
-	TARRAY:      "ARRAY",
-	TSTRUCT:     "STRUCT",
-	TCHAN:       "CHAN",
-	TMAP:        "MAP",
-	TINTER:      "INTER",
-	TFORW:       "FORW",
-	TFIELD:      "FIELD",
-	TSTRING:     "STRING",
-	TANY:        "ANY",
-}
-
-// Fmt "%E": etype
-func Econv(et int, flag int) string {
-	if et >= 0 && et < len(etnames) && etnames[et] != "" {
-		return etnames[et]
-	}
-	return fmt.Sprintf("E-%d", et)
-}
-
-// Fmt "%S": syms
-func symfmt(s *Sym, flag int) string {
-	if s.Pkg != nil && flag&obj.FmtShort == 0 {
-		switch fmtmode {
-		case FErr: // This is for the user
-			if s.Pkg == localpkg {
-				return s.Name
-			}
-
-			// If the name was used by multiple packages, display the full path,
-			if s.Pkg.Name != "" && numImport[s.Pkg.Name] > 1 {
-				return fmt.Sprintf("%q.%s", s.Pkg.Path, s.Name)
-			}
-			return fmt.Sprintf("%s.%s", s.Pkg.Name, s.Name)
-
-		case FDbg:
-			return fmt.Sprintf("%s.%s", s.Pkg.Name, s.Name)
-
-		case FTypeId:
-			if flag&obj.FmtUnsigned != 0 {
-				return fmt.Sprintf("%s.%s", s.Pkg.Name, s.Name) // dcommontype, typehash
-			}
-			return fmt.Sprintf("%s.%s", s.Pkg.Prefix, s.Name) // (methodsym), typesym, weaksym
-
-		case FExp:
-			if s.Name != "" && s.Name[0] == '.' {
-				Fatal("exporting synthetic symbol %s", s.Name)
-			}
-			if s.Pkg != builtinpkg {
-				return fmt.Sprintf("@%q.%s", s.Pkg.Path, s.Name)
-			}
-		}
-	}
-
-	if flag&obj.FmtByte != 0 {
-		// FmtByte (hh) implies FmtShort (h)
-		// skip leading "type." in method name
-		p := s.Name
-		if i := strings.LastIndex(s.Name, "."); i >= 0 {
-			p = s.Name[i+1:]
-		}
-
-		// exportname needs to see the name without the prefix too.
-		if (fmtmode == FExp && !exportname(p)) || fmtmode == FDbg {
-			return fmt.Sprintf("@%q.%s", s.Pkg.Path, p)
-		}
-
-		return p
-	}
-
-	return s.Name
-}
-
-var basicnames = []string{
-	TINT:        "int",
-	TUINT:       "uint",
-	TINT8:       "int8",
-	TUINT8:      "uint8",
-	TINT16:      "int16",
-	TUINT16:     "uint16",
-	TINT32:      "int32",
-	TUINT32:     "uint32",
-	TINT64:      "int64",
-	TUINT64:     "uint64",
-	TUINTPTR:    "uintptr",
-	TFLOAT32:    "float32",
-	TFLOAT64:    "float64",
-	TCOMPLEX64:  "complex64",
-	TCOMPLEX128: "complex128",
-	TBOOL:       "bool",
-	TANY:        "any",
-	TSTRING:     "string",
-	TNIL:        "nil",
-	TIDEAL:      "untyped number",
-	TBLANK:      "blank",
-}
-
-func typefmt(t *Type, flag int) string {
-	if t == nil {
-		return "<T>"
-	}
-
-	if t == bytetype || t == runetype {
-		// in %-T mode collapse rune and byte with their originals.
-		if fmtmode != FTypeId {
-			return Sconv(t.Sym, obj.FmtShort)
-		}
-		t = Types[t.Etype]
-	}
-
-	if t == errortype {
-		return "error"
-	}
-
-	// Unless the 'l' flag was specified, if the type has a name, just print that name.
-	if flag&obj.FmtLong == 0 && t.Sym != nil && t.Etype != TFIELD && t != Types[t.Etype] {
-		switch fmtmode {
-		case FTypeId:
-			if flag&obj.FmtShort != 0 {
-				if t.Vargen != 0 {
-					return fmt.Sprintf("%v·%d", Sconv(t.Sym, obj.FmtShort), t.Vargen)
-				}
-				return Sconv(t.Sym, obj.FmtShort)
-			}
-
-			if flag&obj.FmtUnsigned != 0 {
-				return Sconv(t.Sym, obj.FmtUnsigned)
-			}
-			fallthrough
-
-		case FExp:
-			if t.Sym.Pkg == localpkg && t.Vargen != 0 {
-				return fmt.Sprintf("%v·%d", t.Sym, t.Vargen)
-			}
-		}
-
-		return Sconv(t.Sym, 0)
-	}
-
-	if int(t.Etype) < len(basicnames) && basicnames[t.Etype] != "" {
-		prefix := ""
-		if fmtmode == FErr && (t == idealbool || t == idealstring) {
-			prefix = "untyped "
-		}
-		return prefix + basicnames[t.Etype]
-	}
-
-	if fmtmode == FDbg {
-		fmtmode = 0
-		str := Econv(int(t.Etype), 0) + "-" + typefmt(t, flag)
-		fmtmode = FDbg
-		return str
-	}
-
-	switch t.Etype {
-	case TPTR32, TPTR64:
-		if fmtmode == FTypeId && (flag&obj.FmtShort != 0) {
-			return fmt.Sprintf("*%v", Tconv(t.Type, obj.FmtShort))
-		}
-		return fmt.Sprintf("*%v", t.Type)
-
-	case TARRAY:
-		if t.Bound >= 0 {
-			return fmt.Sprintf("[%d]%v", t.Bound, t.Type)
-		}
-		if t.Bound == -100 {
-			return fmt.Sprintf("[...]%v", t.Type)
-		}
-		return fmt.Sprintf("[]%v", t.Type)
-
-	case TCHAN:
-		switch t.Chan {
-		case Crecv:
-			return fmt.Sprintf("<-chan %v", t.Type)
-
-		case Csend:
-			return fmt.Sprintf("chan<- %v", t.Type)
-		}
-
-		if t.Type != nil && t.Type.Etype == TCHAN && t.Type.Sym == nil && t.Type.Chan == Crecv {
-			return fmt.Sprintf("chan (%v)", t.Type)
-		}
-		return fmt.Sprintf("chan %v", t.Type)
-
-	case TMAP:
-		return fmt.Sprintf("map[%v]%v", t.Down, t.Type)
-
-	case TINTER:
-		var buf bytes.Buffer
-		buf.WriteString("interface {")
-		for t1 := t.Type; t1 != nil; t1 = t1.Down {
-			buf.WriteString(" ")
-			if exportname(t1.Sym.Name) {
-				buf.WriteString(Sconv(t1.Sym, obj.FmtShort))
-			} else {
-				buf.WriteString(Sconv(t1.Sym, obj.FmtUnsigned))
-			}
-			buf.WriteString(Tconv(t1.Type, obj.FmtShort))
-			if t1.Down != nil {
-				buf.WriteString(";")
-			}
-		}
-		if t.Type != nil {
-			buf.WriteString(" ")
-		}
-		buf.WriteString("}")
-		return buf.String()
-
-	case TFUNC:
-		var buf bytes.Buffer
-		if flag&obj.FmtShort != 0 {
-			// no leading func
-		} else {
-			if t.Thistuple != 0 {
-				buf.WriteString("method")
-				buf.WriteString(Tconv(getthisx(t), 0))
-				buf.WriteString(" ")
-			}
-			buf.WriteString("func")
-		}
-		buf.WriteString(Tconv(getinargx(t), 0))
-
-		switch t.Outtuple {
-		case 0:
-			break
-
-		case 1:
-			if fmtmode != FExp {
-				buf.WriteString(" ")
-				buf.WriteString(Tconv(getoutargx(t).Type.Type, 0)) // struct->field->field's type
-				break
-			}
-			fallthrough
-
-		default:
-			buf.WriteString(" ")
-			buf.WriteString(Tconv(getoutargx(t), 0))
-		}
-		return buf.String()
-
-	case TSTRUCT:
-		if t.Map != nil {
-			// Format the bucket struct for map[x]y as map.bucket[x]y.
-			// This avoids a recursive print that generates very long names.
-			if t.Map.Bucket == t {
-				return fmt.Sprintf("map.bucket[%v]%v", t.Map.Down, t.Map.Type)
-			}
-
-			if t.Map.Hmap == t {
-				return fmt.Sprintf("map.hdr[%v]%v", t.Map.Down, t.Map.Type)
-			}
-
-			if t.Map.Hiter == t {
-				return fmt.Sprintf("map.iter[%v]%v", t.Map.Down, t.Map.Type)
-			}
-
-			Yyerror("unknown internal map type")
-		}
-
-		var buf bytes.Buffer
-		if t.Funarg != 0 {
-			buf.WriteString("(")
-			if fmtmode == FTypeId || fmtmode == FErr { // no argument names on function signature, and no "noescape"/"nosplit" tags
-				for t1 := t.Type; t1 != nil; t1 = t1.Down {
-					buf.WriteString(Tconv(t1, obj.FmtShort))
-					if t1.Down != nil {
-						buf.WriteString(", ")
-					}
-				}
-			} else {
-				for t1 := t.Type; t1 != nil; t1 = t1.Down {
-					buf.WriteString(Tconv(t1, 0))
-					if t1.Down != nil {
-						buf.WriteString(", ")
-					}
-				}
-			}
-			buf.WriteString(")")
-		} else {
-			buf.WriteString("struct {")
-			for t1 := t.Type; t1 != nil; t1 = t1.Down {
-				buf.WriteString(" ")
-				buf.WriteString(Tconv(t1, obj.FmtLong))
-				if t1.Down != nil {
-					buf.WriteString(";")
-				}
-			}
-			if t.Type != nil {
-				buf.WriteString(" ")
-			}
-			buf.WriteString("}")
-		}
-		return buf.String()
-
-	case TFIELD:
-		var name string
-		if flag&obj.FmtShort == 0 {
-			s := t.Sym
-
-			// Take the name from the original, lest we substituted it with ~r%d or ~b%d.
-			// ~r%d is a (formerly) unnamed result.
-			if (fmtmode == FErr || fmtmode == FExp) && t.Nname != nil {
-				if t.Nname.Orig != nil {
-					s = t.Nname.Orig.Sym
-					if s != nil && s.Name[0] == '~' {
-						if s.Name[1] == 'r' { // originally an unnamed result
-							s = nil
-						} else if s.Name[1] == 'b' { // originally the blank identifier _
-							s = Lookup("_")
-						}
-					}
-				} else {
-					s = nil
-				}
-			}
-
-			if s != nil && t.Embedded == 0 {
-				if t.Funarg != 0 {
-					name = Nconv(t.Nname, 0)
-				} else if flag&obj.FmtLong != 0 {
-					name = Sconv(s, obj.FmtShort|obj.FmtByte) // qualify non-exported names (used on structs, not on funarg)
-				} else {
-					name = Sconv(s, 0)
-				}
-			} else if fmtmode == FExp {
-				// TODO(rsc) this breaks on the eliding of unused arguments in the backend
-				// when this is fixed, the special case in dcl.c checkarglist can go.
-				//if(t->funarg)
-				//	fmtstrcpy(fp, "_ ");
-				//else
-				if t.Embedded != 0 && s.Pkg != nil && len(s.Pkg.Path) > 0 {
-					name = fmt.Sprintf("@%q.?", s.Pkg.Path)
-				} else {
-					name = "?"
-				}
-			}
-		}
-
-		var typ string
-		if t.Isddd {
-			typ = "..." + Tconv(t.Type.Type, 0)
-		} else {
-			typ = Tconv(t.Type, 0)
-		}
-
-		str := typ
-		if name != "" {
-			str = name + " " + typ
-		}
-		if flag&obj.FmtShort == 0 && t.Note != nil {
-			str += " " + strconv.Quote(*t.Note)
-		}
-		return str
-
-	case TFORW:
-		if t.Sym != nil {
-			return fmt.Sprintf("undefined %v", t.Sym)
-		}
-		return "undefined"
-
-	case TUNSAFEPTR:
-		if fmtmode == FExp {
-			return "@\"unsafe\".Pointer"
-		}
-		return "unsafe.Pointer"
-	}
-
-	if fmtmode == FExp {
-		Fatal("missing %v case during export", Econv(int(t.Etype), 0))
-	}
-
-	// Don't know how to handle - fall back to detailed prints.
-	return fmt.Sprintf("%v <%v> %v", Econv(int(t.Etype), 0), t.Sym, t.Type)
-}
-
-// Statements which may be rendered with a simplestmt as init.
-func stmtwithinit(op int) bool {
-	switch op {
-	case OIF, OFOR, OSWITCH:
-		return true
-	}
-
-	return false
-}
-
-func stmtfmt(n *Node) string {
-	var f string
-
-	// some statements allow for an init, but at most one,
-	// but we may have an arbitrary number added, eg by typecheck
-	// and inlining.  If it doesn't fit the syntax, emit an enclosing
-	// block starting with the init statements.
-
-	// if we can just say "for" n->ninit; ... then do so
-	simpleinit := n.Ninit != nil && n.Ninit.Next == nil && n.Ninit.N.Ninit == nil && stmtwithinit(int(n.Op))
-
-	// otherwise, print the inits as separate statements
-	complexinit := n.Ninit != nil && !simpleinit && (fmtmode != FErr)
-
-	// but if it was for if/for/switch, put in an extra surrounding block to limit the scope
-	extrablock := complexinit && stmtwithinit(int(n.Op))
-
-	if extrablock {
-		f += "{"
-	}
-
-	if complexinit {
-		f += fmt.Sprintf(" %v; ", n.Ninit)
-	}
-
-	switch n.Op {
-	case ODCL:
-		if fmtmode == FExp {
-			switch n.Left.Class &^ PHEAP {
-			case PPARAM, PPARAMOUT, PAUTO:
-				f += fmt.Sprintf("var %v %v", n.Left, n.Left.Type)
-				goto ret
-			}
-		}
-
-		f += fmt.Sprintf("var %v %v", n.Left.Sym, n.Left.Type)
-
-	case ODCLFIELD:
-		if n.Left != nil {
-			f += fmt.Sprintf("%v %v", n.Left, n.Right)
-		} else {
-			f += Nconv(n.Right, 0)
-		}
-
-		// Don't export "v = <N>" initializing statements, hope they're always
-	// preceded by the DCL which will be re-parsed and typecheck to reproduce
-	// the "v = <N>" again.
-	case OAS, OASWB:
-		if fmtmode == FExp && n.Right == nil {
-			break
-		}
-
-		if n.Colas && !complexinit {
-			f += fmt.Sprintf("%v := %v", n.Left, n.Right)
-		} else {
-			f += fmt.Sprintf("%v = %v", n.Left, n.Right)
-		}
-
-	case OASOP:
-		if n.Implicit {
-			if n.Etype == OADD {
-				f += fmt.Sprintf("%v++", n.Left)
-			} else {
-				f += fmt.Sprintf("%v--", n.Left)
-			}
-			break
-		}
-
-		f += fmt.Sprintf("%v %v= %v", n.Left, Oconv(int(n.Etype), obj.FmtSharp), n.Right)
-
-	case OAS2:
-		if n.Colas && !complexinit {
-			f += fmt.Sprintf("%v := %v", Hconv(n.List, obj.FmtComma), Hconv(n.Rlist, obj.FmtComma))
-			break
-		}
-		fallthrough
-
-	case OAS2DOTTYPE, OAS2FUNC, OAS2MAPR, OAS2RECV:
-		f += fmt.Sprintf("%v = %v", Hconv(n.List, obj.FmtComma), Hconv(n.Rlist, obj.FmtComma))
-
-	case ORETURN:
-		f += fmt.Sprintf("return %v", Hconv(n.List, obj.FmtComma))
-
-	case ORETJMP:
-		f += fmt.Sprintf("retjmp %v", n.Sym)
-
-	case OPROC:
-		f += fmt.Sprintf("go %v", n.Left)
-
-	case ODEFER:
-		f += fmt.Sprintf("defer %v", n.Left)
-
-	case OIF:
-		if simpleinit {
-			f += fmt.Sprintf("if %v; %v { %v }", n.Ninit.N, n.Left, n.Nbody)
-		} else {
-			f += fmt.Sprintf("if %v { %v }", n.Left, n.Nbody)
-		}
-		if n.Rlist != nil {
-			f += fmt.Sprintf(" else { %v }", n.Rlist)
-		}
-
-	case OFOR:
-		if fmtmode == FErr { // TODO maybe only if FmtShort, same below
-			f += "for loop"
-			break
-		}
-
-		f += "for"
-		if simpleinit {
-			f += fmt.Sprintf(" %v;", n.Ninit.N)
-		} else if n.Right != nil {
-			f += " ;"
-		}
-
-		if n.Left != nil {
-			f += fmt.Sprintf(" %v", n.Left)
-		}
-
-		if n.Right != nil {
-			f += fmt.Sprintf("; %v", n.Right)
-		} else if simpleinit {
-			f += ";"
-		}
-
-		f += fmt.Sprintf(" { %v }", n.Nbody)
-
-	case ORANGE:
-		if fmtmode == FErr {
-			f += "for loop"
-			break
-		}
-
-		if n.List == nil {
-			f += fmt.Sprintf("for range %v { %v }", n.Right, n.Nbody)
-			break
-		}
-
-		f += fmt.Sprintf("for %v = range %v { %v }", Hconv(n.List, obj.FmtComma), n.Right, n.Nbody)
-
-	case OSELECT, OSWITCH:
-		if fmtmode == FErr {
-			f += fmt.Sprintf("%v statement", Oconv(int(n.Op), 0))
-			break
-		}
-
-		f += Oconv(int(n.Op), obj.FmtSharp)
-		if simpleinit {
-			f += fmt.Sprintf(" %v;", n.Ninit.N)
-		}
-		if n.Left != nil {
-			f += Nconv(n.Left, 0)
-		}
-
-		f += fmt.Sprintf(" { %v }", n.List)
-
-	case OCASE, OXCASE:
-		if n.List != nil {
-			f += fmt.Sprintf("case %v: %v", Hconv(n.List, obj.FmtComma), n.Nbody)
-		} else {
-			f += fmt.Sprintf("default: %v", n.Nbody)
-		}
-
-	case OBREAK,
-		OCONTINUE,
-		OGOTO,
-		OFALL,
-		OXFALL:
-		if n.Left != nil {
-			f += fmt.Sprintf("%v %v", Oconv(int(n.Op), obj.FmtSharp), n.Left)
-		} else {
-			f += Oconv(int(n.Op), obj.FmtSharp)
-		}
-
-	case OEMPTY:
-		break
-
-	case OLABEL:
-		f += fmt.Sprintf("%v: ", n.Left)
-	}
-
-ret:
-	if extrablock {
-		f += "}"
-	}
-
-	return f
-}
-
-var opprec = []int{
-	OAPPEND:       8,
-	OARRAYBYTESTR: 8,
-	OARRAYLIT:     8,
-	OARRAYRUNESTR: 8,
-	OCALLFUNC:     8,
-	OCALLINTER:    8,
-	OCALLMETH:     8,
-	OCALL:         8,
-	OCAP:          8,
-	OCLOSE:        8,
-	OCONVIFACE:    8,
-	OCONVNOP:      8,
-	OCONV:         8,
-	OCOPY:         8,
-	ODELETE:       8,
-	OGETG:         8,
-	OLEN:          8,
-	OLITERAL:      8,
-	OMAKESLICE:    8,
-	OMAKE:         8,
-	OMAPLIT:       8,
-	ONAME:         8,
-	ONEW:          8,
-	ONONAME:       8,
-	OPACK:         8,
-	OPANIC:        8,
-	OPAREN:        8,
-	OPRINTN:       8,
-	OPRINT:        8,
-	ORUNESTR:      8,
-	OSTRARRAYBYTE: 8,
-	OSTRARRAYRUNE: 8,
-	OSTRUCTLIT:    8,
-	OTARRAY:       8,
-	OTCHAN:        8,
-	OTFUNC:        8,
-	OTINTER:       8,
-	OTMAP:         8,
-	OTSTRUCT:      8,
-	OINDEXMAP:     8,
-	OINDEX:        8,
-	OSLICE:        8,
-	OSLICESTR:     8,
-	OSLICEARR:     8,
-	OSLICE3:       8,
-	OSLICE3ARR:    8,
-	ODOTINTER:     8,
-	ODOTMETH:      8,
-	ODOTPTR:       8,
-	ODOTTYPE2:     8,
-	ODOTTYPE:      8,
-	ODOT:          8,
-	OXDOT:         8,
-	OCALLPART:     8,
-	OPLUS:         7,
-	ONOT:          7,
-	OCOM:          7,
-	OMINUS:        7,
-	OADDR:         7,
-	OIND:          7,
-	ORECV:         7,
-	OMUL:          6,
-	ODIV:          6,
-	OMOD:          6,
-	OLSH:          6,
-	ORSH:          6,
-	OAND:          6,
-	OANDNOT:       6,
-	OADD:          5,
-	OSUB:          5,
-	OOR:           5,
-	OXOR:          5,
-	OEQ:           4,
-	OLT:           4,
-	OLE:           4,
-	OGE:           4,
-	OGT:           4,
-	ONE:           4,
-	OCMPSTR:       4,
-	OCMPIFACE:     4,
-	OSEND:         3,
-	OANDAND:       2,
-	OOROR:         1,
-	// Statements handled by stmtfmt
-	OAS:         -1,
-	OAS2:        -1,
-	OAS2DOTTYPE: -1,
-	OAS2FUNC:    -1,
-	OAS2MAPR:    -1,
-	OAS2RECV:    -1,
-	OASOP:       -1,
-	OBREAK:      -1,
-	OCASE:       -1,
-	OCONTINUE:   -1,
-	ODCL:        -1,
-	ODCLFIELD:   -1,
-	ODEFER:      -1,
-	OEMPTY:      -1,
-	OFALL:       -1,
-	OFOR:        -1,
-	OGOTO:       -1,
-	OIF:         -1,
-	OLABEL:      -1,
-	OPROC:       -1,
-	ORANGE:      -1,
-	ORETURN:     -1,
-	OSELECT:     -1,
-	OSWITCH:     -1,
-	OXCASE:      -1,
-	OXFALL:      -1,
-	OEND:        0,
-}
-
-func exprfmt(n *Node, prec int) string {
-	for n != nil && n.Implicit && (n.Op == OIND || n.Op == OADDR) {
-		n = n.Left
-	}
-
-	if n == nil {
-		return "<N>"
-	}
-
-	nprec := opprec[n.Op]
-	if n.Op == OTYPE && n.Sym != nil {
-		nprec = 8
-	}
-
-	if prec > nprec {
-		return fmt.Sprintf("(%v)", n)
-	}
-
-	switch n.Op {
-	case OPAREN:
-		return fmt.Sprintf("(%v)", n.Left)
-
-	case ODDDARG:
-		return "... argument"
-
-	case OREGISTER:
-		return obj.Rconv(int(n.Reg))
-
-	case OLITERAL: // this is a bit of a mess
-		if fmtmode == FErr {
-			if n.Orig != nil && n.Orig != n {
-				return exprfmt(n.Orig, prec)
-			}
-			if n.Sym != nil {
-				return Sconv(n.Sym, 0)
-			}
-		}
-		if n.Val().Ctype() == CTNIL && n.Orig != nil && n.Orig != n {
-			return exprfmt(n.Orig, prec)
-		}
-		if n.Type != nil && n.Type != Types[n.Type.Etype] && n.Type != idealbool && n.Type != idealstring {
-			// Need parens when type begins with what might
-			// be misinterpreted as a unary operator: * or <-.
-			if Isptr[n.Type.Etype] || (n.Type.Etype == TCHAN && n.Type.Chan == Crecv) {
-				return fmt.Sprintf("(%v)(%v)", n.Type, Vconv(n.Val(), 0))
-			} else {
-				return fmt.Sprintf("%v(%v)", n.Type, Vconv(n.Val(), 0))
-			}
-		}
-
-		return Vconv(n.Val(), 0)
-
-		// Special case: name used as local variable in export.
-	// _ becomes ~b%d internally; print as _ for export
-	case ONAME:
-		if (fmtmode == FExp || fmtmode == FErr) && n.Sym != nil && n.Sym.Name[0] == '~' && n.Sym.Name[1] == 'b' {
-			return "_"
-		}
-		if fmtmode == FExp && n.Sym != nil && !isblank(n) && n.Name.Vargen > 0 {
-			return fmt.Sprintf("%v·%d", n.Sym, n.Name.Vargen)
-		}
-
-		// Special case: explicit name of func (*T) method(...) is turned into pkg.(*T).method,
-		// but for export, this should be rendered as (*pkg.T).meth.
-		// These nodes have the special property that they are names with a left OTYPE and a right ONAME.
-		if fmtmode == FExp && n.Left != nil && n.Left.Op == OTYPE && n.Right != nil && n.Right.Op == ONAME {
-			if Isptr[n.Left.Type.Etype] {
-				return fmt.Sprintf("(%v).%v", n.Left.Type, Sconv(n.Right.Sym, obj.FmtShort|obj.FmtByte))
-			} else {
-				return fmt.Sprintf("%v.%v", n.Left.Type, Sconv(n.Right.Sym, obj.FmtShort|obj.FmtByte))
-			}
-		}
-		fallthrough
-
-		//fallthrough
-	case OPACK, ONONAME:
-		return Sconv(n.Sym, 0)
-
-	case OTYPE:
-		if n.Type == nil && n.Sym != nil {
-			return Sconv(n.Sym, 0)
-		}
-		return Tconv(n.Type, 0)
-
-	case OTARRAY:
-		if n.Left != nil {
-			return fmt.Sprintf("[]%v", n.Left)
-		}
-		var f string
-		f += fmt.Sprintf("[]%v", n.Right)
-		return f // happens before typecheck
-
-	case OTMAP:
-		return fmt.Sprintf("map[%v]%v", n.Left, n.Right)
-
-	case OTCHAN:
-		switch n.Etype {
-		case Crecv:
-			return fmt.Sprintf("<-chan %v", n.Left)
-
-		case Csend:
-			return fmt.Sprintf("chan<- %v", n.Left)
-
-		default:
-			if n.Left != nil && n.Left.Op == OTCHAN && n.Left.Sym == nil && n.Left.Etype == Crecv {
-				return fmt.Sprintf("chan (%v)", n.Left)
-			} else {
-				return fmt.Sprintf("chan %v", n.Left)
-			}
-		}
-
-	case OTSTRUCT:
-		return "<struct>"
-
-	case OTINTER:
-		return "<inter>"
-
-	case OTFUNC:
-		return "<func>"
-
-	case OCLOSURE:
-		if fmtmode == FErr {
-			return "func literal"
-		}
-		if n.Nbody != nil {
-			return fmt.Sprintf("%v { %v }", n.Type, n.Nbody)
-		}
-		return fmt.Sprintf("%v { %v }", n.Type, n.Name.Param.Closure.Nbody)
-
-	case OCOMPLIT:
-		ptrlit := n.Right != nil && n.Right.Implicit && n.Right.Type != nil && Isptr[n.Right.Type.Etype]
-		if fmtmode == FErr {
-			if n.Right != nil && n.Right.Type != nil && !n.Implicit {
-				if ptrlit {
-					return fmt.Sprintf("&%v literal", n.Right.Type.Type)
-				} else {
-					return fmt.Sprintf("%v literal", n.Right.Type)
-				}
-			}
-
-			return "composite literal"
-		}
-
-		if fmtmode == FExp && ptrlit {
-			// typecheck has overwritten OIND by OTYPE with pointer type.
-			return fmt.Sprintf("(&%v{ %v })", n.Right.Type.Type, Hconv(n.List, obj.FmtComma))
-		}
-
-		return fmt.Sprintf("(%v{ %v })", n.Right, Hconv(n.List, obj.FmtComma))
-
-	case OPTRLIT:
-		if fmtmode == FExp && n.Left.Implicit {
-			return Nconv(n.Left, 0)
-		}
-		return fmt.Sprintf("&%v", n.Left)
-
-	case OSTRUCTLIT:
-		if fmtmode == FExp { // requires special handling of field names
-			var f string
-			if n.Implicit {
-				f += "{"
-			} else {
-				f += fmt.Sprintf("(%v{", n.Type)
-			}
-			for l := n.List; l != nil; l = l.Next {
-				f += fmt.Sprintf(" %v:%v", Sconv(l.N.Left.Sym, obj.FmtShort|obj.FmtByte), l.N.Right)
-
-				if l.Next != nil {
-					f += ","
-				} else {
-					f += " "
-				}
-			}
-
-			if !n.Implicit {
-				f += "})"
-				return f
-			}
-			f += "}"
-			return f
-		}
-		fallthrough
-
-	case OARRAYLIT, OMAPLIT:
-		if fmtmode == FErr {
-			return fmt.Sprintf("%v literal", n.Type)
-		}
-		if fmtmode == FExp && n.Implicit {
-			return fmt.Sprintf("{ %v }", Hconv(n.List, obj.FmtComma))
-		}
-		return fmt.Sprintf("(%v{ %v })", n.Type, Hconv(n.List, obj.FmtComma))
-
-	case OKEY:
-		if n.Left != nil && n.Right != nil {
-			if fmtmode == FExp && n.Left.Type != nil && n.Left.Type.Etype == TFIELD {
-				// requires special handling of field names
-				return fmt.Sprintf("%v:%v", Sconv(n.Left.Sym, obj.FmtShort|obj.FmtByte), n.Right)
-			} else {
-				return fmt.Sprintf("%v:%v", n.Left, n.Right)
-			}
-		}
-
-		if n.Left == nil && n.Right != nil {
-			return fmt.Sprintf(":%v", n.Right)
-		}
-		if n.Left != nil && n.Right == nil {
-			return fmt.Sprintf("%v:", n.Left)
-		}
-		return ":"
-
-	case OXDOT,
-		ODOT,
-		ODOTPTR,
-		ODOTINTER,
-		ODOTMETH,
-		OCALLPART:
-		var f string
-		f += exprfmt(n.Left, nprec)
-		if n.Right == nil || n.Right.Sym == nil {
-			f += ".<nil>"
-			return f
-		}
-		f += fmt.Sprintf(".%v", Sconv(n.Right.Sym, obj.FmtShort|obj.FmtByte))
-		return f
-
-	case ODOTTYPE, ODOTTYPE2:
-		var f string
-		f += exprfmt(n.Left, nprec)
-		if n.Right != nil {
-			f += fmt.Sprintf(".(%v)", n.Right)
-			return f
-		}
-		f += fmt.Sprintf(".(%v)", n.Type)
-		return f
-
-	case OINDEX,
-		OINDEXMAP,
-		OSLICE,
-		OSLICESTR,
-		OSLICEARR,
-		OSLICE3,
-		OSLICE3ARR:
-		var f string
-		f += exprfmt(n.Left, nprec)
-		f += fmt.Sprintf("[%v]", n.Right)
-		return f
-
-	case OCOPY, OCOMPLEX:
-		return fmt.Sprintf("%v(%v, %v)", Oconv(int(n.Op), obj.FmtSharp), n.Left, n.Right)
-
-	case OCONV,
-		OCONVIFACE,
-		OCONVNOP,
-		OARRAYBYTESTR,
-		OARRAYRUNESTR,
-		OSTRARRAYBYTE,
-		OSTRARRAYRUNE,
-		ORUNESTR:
-		if n.Type == nil || n.Type.Sym == nil {
-			return fmt.Sprintf("(%v)(%v)", n.Type, n.Left)
-		}
-		if n.Left != nil {
-			return fmt.Sprintf("%v(%v)", n.Type, n.Left)
-		}
-		return fmt.Sprintf("%v(%v)", n.Type, Hconv(n.List, obj.FmtComma))
-
-	case OREAL,
-		OIMAG,
-		OAPPEND,
-		OCAP,
-		OCLOSE,
-		ODELETE,
-		OLEN,
-		OMAKE,
-		ONEW,
-		OPANIC,
-		ORECOVER,
-		OPRINT,
-		OPRINTN:
-		if n.Left != nil {
-			return fmt.Sprintf("%v(%v)", Oconv(int(n.Op), obj.FmtSharp), n.Left)
-		}
-		if n.Isddd {
-			return fmt.Sprintf("%v(%v...)", Oconv(int(n.Op), obj.FmtSharp), Hconv(n.List, obj.FmtComma))
-		}
-		return fmt.Sprintf("%v(%v)", Oconv(int(n.Op), obj.FmtSharp), Hconv(n.List, obj.FmtComma))
-
-	case OCALL, OCALLFUNC, OCALLINTER, OCALLMETH, OGETG:
-		var f string
-		f += exprfmt(n.Left, nprec)
-		if n.Isddd {
-			f += fmt.Sprintf("(%v...)", Hconv(n.List, obj.FmtComma))
-			return f
-		}
-		f += fmt.Sprintf("(%v)", Hconv(n.List, obj.FmtComma))
-		return f
-
-	case OMAKEMAP, OMAKECHAN, OMAKESLICE:
-		if n.List != nil { // pre-typecheck
-			return fmt.Sprintf("make(%v, %v)", n.Type, Hconv(n.List, obj.FmtComma))
-		}
-		if n.Right != nil {
-			return fmt.Sprintf("make(%v, %v, %v)", n.Type, n.Left, n.Right)
-		}
-		if n.Left != nil && (n.Op == OMAKESLICE || !isideal(n.Left.Type)) {
-			return fmt.Sprintf("make(%v, %v)", n.Type, n.Left)
-		}
-		return fmt.Sprintf("make(%v)", n.Type)
-
-		// Unary
-	case OPLUS,
-		OMINUS,
-		OADDR,
-		OCOM,
-		OIND,
-		ONOT,
-		ORECV:
-		var f string
-		if n.Left.Op == n.Op {
-			f += fmt.Sprintf("%v ", Oconv(int(n.Op), obj.FmtSharp))
-		} else {
-			f += Oconv(int(n.Op), obj.FmtSharp)
-		}
-		f += exprfmt(n.Left, nprec+1)
-		return f
-
-		// Binary
-	case OADD,
-		OAND,
-		OANDAND,
-		OANDNOT,
-		ODIV,
-		OEQ,
-		OGE,
-		OGT,
-		OLE,
-		OLT,
-		OLSH,
-		OMOD,
-		OMUL,
-		ONE,
-		OOR,
-		OOROR,
-		ORSH,
-		OSEND,
-		OSUB,
-		OXOR:
-		var f string
-		f += exprfmt(n.Left, nprec)
-
-		f += fmt.Sprintf(" %v ", Oconv(int(n.Op), obj.FmtSharp))
-		f += exprfmt(n.Right, nprec+1)
-		return f
-
-	case OADDSTR:
-		var f string
-		for l := n.List; l != nil; l = l.Next {
-			if l != n.List {
-				f += " + "
-			}
-			f += exprfmt(l.N, nprec)
-		}
-
-		return f
-
-	case OCMPSTR, OCMPIFACE:
-		var f string
-		f += exprfmt(n.Left, nprec)
-		f += fmt.Sprintf(" %v ", Oconv(int(n.Etype), obj.FmtSharp))
-		f += exprfmt(n.Right, nprec+1)
-		return f
-	}
-
-	return fmt.Sprintf("<node %v>", Oconv(int(n.Op), 0))
-}
-
-func nodefmt(n *Node, flag int) string {
-	t := n.Type
-
-	// we almost always want the original, except in export mode for literals
-	// this saves the importer some work, and avoids us having to redo some
-	// special casing for package unsafe
-	if (fmtmode != FExp || n.Op != OLITERAL) && n.Orig != nil {
-		n = n.Orig
-	}
-
-	if flag&obj.FmtLong != 0 && t != nil {
-		if t.Etype == TNIL {
-			return "nil"
-		} else {
-			return fmt.Sprintf("%v (type %v)", n, t)
-		}
-	}
-
-	// TODO inlining produces expressions with ninits. we can't print these yet.
-
-	if opprec[n.Op] < 0 {
-		return stmtfmt(n)
-	}
-
-	return exprfmt(n, 0)
-}
-
-var dumpdepth int
-
-func indent(buf *bytes.Buffer) {
-	buf.WriteString("\n")
-	for i := 0; i < dumpdepth; i++ {
-		buf.WriteString(".   ")
-	}
-}
-
-func nodedump(n *Node, flag int) string {
-	if n == nil {
-		return ""
-	}
-
-	recur := flag&obj.FmtShort == 0
-
-	var buf bytes.Buffer
-	if recur {
-		indent(&buf)
-		if dumpdepth > 10 {
-			buf.WriteString("...")
-			return buf.String()
-		}
-
-		if n.Ninit != nil {
-			fmt.Fprintf(&buf, "%v-init%v", Oconv(int(n.Op), 0), n.Ninit)
-			indent(&buf)
-		}
-	}
-
-	switch n.Op {
-	default:
-		fmt.Fprintf(&buf, "%v%v", Oconv(int(n.Op), 0), Jconv(n, 0))
-
-	case OREGISTER, OINDREG:
-		fmt.Fprintf(&buf, "%v-%v%v", Oconv(int(n.Op), 0), obj.Rconv(int(n.Reg)), Jconv(n, 0))
-
-	case OLITERAL:
-		fmt.Fprintf(&buf, "%v-%v%v", Oconv(int(n.Op), 0), Vconv(n.Val(), 0), Jconv(n, 0))
-
-	case ONAME, ONONAME:
-		if n.Sym != nil {
-			fmt.Fprintf(&buf, "%v-%v%v", Oconv(int(n.Op), 0), n.Sym, Jconv(n, 0))
-		} else {
-			fmt.Fprintf(&buf, "%v%v", Oconv(int(n.Op), 0), Jconv(n, 0))
-		}
-		if recur && n.Type == nil && n.Name.Param.Ntype != nil {
-			indent(&buf)
-			fmt.Fprintf(&buf, "%v-ntype%v", Oconv(int(n.Op), 0), n.Name.Param.Ntype)
-		}
-
-	case OASOP:
-		fmt.Fprintf(&buf, "%v-%v%v", Oconv(int(n.Op), 0), Oconv(int(n.Etype), 0), Jconv(n, 0))
-
-	case OTYPE:
-		fmt.Fprintf(&buf, "%v %v%v type=%v", Oconv(int(n.Op), 0), n.Sym, Jconv(n, 0), n.Type)
-		if recur && n.Type == nil && n.Name.Param.Ntype != nil {
-			indent(&buf)
-			fmt.Fprintf(&buf, "%v-ntype%v", Oconv(int(n.Op), 0), n.Name.Param.Ntype)
-		}
-	}
-
-	if n.Sym != nil && n.Op != ONAME {
-		fmt.Fprintf(&buf, " %v", n.Sym)
-	}
-
-	if n.Type != nil {
-		fmt.Fprintf(&buf, " %v", n.Type)
-	}
-
-	if recur {
-		if n.Left != nil {
-			buf.WriteString(Nconv(n.Left, 0))
-		}
-		if n.Right != nil {
-			buf.WriteString(Nconv(n.Right, 0))
-		}
-		if n.List != nil {
-			indent(&buf)
-			fmt.Fprintf(&buf, "%v-list%v", Oconv(int(n.Op), 0), n.List)
-		}
-
-		if n.Rlist != nil {
-			indent(&buf)
-			fmt.Fprintf(&buf, "%v-rlist%v", Oconv(int(n.Op), 0), n.Rlist)
-		}
-
-		if n.Nbody != nil {
-			indent(&buf)
-			fmt.Fprintf(&buf, "%v-body%v", Oconv(int(n.Op), 0), n.Nbody)
-		}
-	}
-
-	return buf.String()
-}
-
-func (s *Sym) String() string {
-	return Sconv(s, 0)
-}
-
-// Fmt "%S": syms
-// Flags:  "%hS" suppresses qualifying with package
-func Sconv(s *Sym, flag int) string {
-	if flag&obj.FmtLong != 0 {
-		panic("linksymfmt")
-	}
-
-	if s == nil {
-		return "<S>"
-	}
-
-	if s.Name == "_" {
-		return "_"
-	}
-
-	sf := flag
-	sm := setfmode(&flag)
-	var r int
-	_ = r
-	str := symfmt(s, flag)
-	flag = sf
-	fmtmode = sm
-	return str
-}
-
-func (t *Type) String() string {
-	return Tconv(t, 0)
-}
-
-// Fmt "%T": types.
-// Flags: 'l' print definition, not name
-//	  'h' omit 'func' and receiver from function types, short type names
-//	  'u' package name, not prefix (FTypeId mode, sticky)
-func Tconv(t *Type, flag int) string {
-	if t == nil {
-		return "<T>"
-	}
-
-	if t.Trecur > 4 {
-		return "<...>"
-	}
-
-	t.Trecur++
-	sf := flag
-	sm := setfmode(&flag)
-
-	if fmtmode == FTypeId && (sf&obj.FmtUnsigned != 0) {
-		fmtpkgpfx++
-	}
-	if fmtpkgpfx != 0 {
-		flag |= obj.FmtUnsigned
-	}
-
-	var r int
-	_ = r
-	str := typefmt(t, flag)
-
-	if fmtmode == FTypeId && (sf&obj.FmtUnsigned != 0) {
-		fmtpkgpfx--
-	}
-
-	flag = sf
-	fmtmode = sm
-	t.Trecur--
-	return str
-}
-
-func (n *Node) String() string {
-	return Nconv(n, 0)
-}
-
-// Fmt '%N': Nodes.
-// Flags: 'l' suffix with "(type %T)" where possible
-//	  '+h' in debug mode, don't recurse, no multiline output
-func Nconv(n *Node, flag int) string {
-	if n == nil {
-		return "<N>"
-	}
-	sf := flag
-	sm := setfmode(&flag)
-
-	var r int
-	_ = r
-	var str string
-	switch fmtmode {
-	case FErr, FExp:
-		str = nodefmt(n, flag)
-
-	case FDbg:
-		dumpdepth++
-		str = nodedump(n, flag)
-		dumpdepth--
-
-	default:
-		Fatal("unhandled %%N mode")
-	}
-
-	flag = sf
-	fmtmode = sm
-	return str
-}
-
-func (l *NodeList) String() string {
-	return Hconv(l, 0)
-}
-
-// Fmt '%H': NodeList.
-// Flags: all those of %N plus ',': separate with comma's instead of semicolons.
-func Hconv(l *NodeList, flag int) string {
-	if l == nil && fmtmode == FDbg {
-		return "<nil>"
-	}
-
-	sf := flag
-	sm := setfmode(&flag)
-	var r int
-	_ = r
-	sep := "; "
-	if fmtmode == FDbg {
-		sep = "\n"
-	} else if flag&obj.FmtComma != 0 {
-		sep = ", "
-	}
-
-	var buf bytes.Buffer
-	for ; l != nil; l = l.Next {
-		buf.WriteString(Nconv(l.N, 0))
-		if l.Next != nil {
-			buf.WriteString(sep)
-		}
-	}
-
-	flag = sf
-	fmtmode = sm
-	return buf.String()
-}
-
-func dumplist(s string, l *NodeList) {
-	fmt.Printf("%s%v\n", s, Hconv(l, obj.FmtSign))
-}
-
-func Dump(s string, n *Node) {
-	fmt.Printf("%s [%p]%v\n", s, n, Nconv(n, obj.FmtSign))
-}
diff --git a/src/cmd/compile/internal/gc/gen.go b/src/cmd/compile/internal/gc/gen.go
deleted file mode 100644
index 764895f..0000000
--- a/src/cmd/compile/internal/gc/gen.go
+++ /dev/null
@@ -1,1276 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-)
-
-/*
- * portable half of code generator.
- * mainly statements and control flow.
- */
-var labellist *Label
-
-var lastlabel *Label
-
-func Sysfunc(name string) *Node {
-	n := newname(Pkglookup(name, Runtimepkg))
-	n.Class = PFUNC
-	return n
-}
-
-// addrescapes tags node n as having had its address taken
-// by "increasing" the "value" of n.Esc to EscHeap.
-// Storage is allocated as necessary to allow the address
-// to be taken.
-func addrescapes(n *Node) {
-	switch n.Op {
-	// probably a type error already.
-	// dump("addrescapes", n);
-	default:
-		break
-
-	case ONAME:
-		if n == nodfp {
-			break
-		}
-
-		// if this is a tmpname (PAUTO), it was tagged by tmpname as not escaping.
-		// on PPARAM it means something different.
-		if n.Class == PAUTO && n.Esc == EscNever {
-			break
-		}
-
-		switch n.Class {
-		case PPARAMREF:
-			addrescapes(n.Name.Defn)
-
-		// if func param, need separate temporary
-		// to hold heap pointer.
-		// the function type has already been checked
-		// (we're in the function body)
-		// so the param already has a valid xoffset.
-
-		// expression to refer to stack copy
-		case PPARAM, PPARAMOUT:
-			n.Name.Param.Stackparam = Nod(OPARAM, n, nil)
-
-			n.Name.Param.Stackparam.Type = n.Type
-			n.Name.Param.Stackparam.Addable = true
-			if n.Xoffset == BADWIDTH {
-				Fatal("addrescapes before param assignment")
-			}
-			n.Name.Param.Stackparam.Xoffset = n.Xoffset
-			fallthrough
-
-		case PAUTO:
-			n.Class |= PHEAP
-
-			n.Addable = false
-			n.Ullman = 2
-			n.Xoffset = 0
-
-			// create stack variable to hold pointer to heap
-			oldfn := Curfn
-
-			Curfn = n.Name.Curfn
-			n.Name.Heapaddr = temp(Ptrto(n.Type))
-			buf := fmt.Sprintf("&%v", n.Sym)
-			n.Name.Heapaddr.Sym = Lookup(buf)
-			n.Name.Heapaddr.Orig.Sym = n.Name.Heapaddr.Sym
-			n.Esc = EscHeap
-			if Debug['m'] != 0 {
-				fmt.Printf("%v: moved to heap: %v\n", n.Line(), n)
-			}
-			Curfn = oldfn
-		}
-
-	case OIND, ODOTPTR:
-		break
-
-	// ODOTPTR has already been introduced,
-	// so these are the non-pointer ODOT and OINDEX.
-	// In &x[0], if x is a slice, then x does not
-	// escape--the pointer inside x does, but that
-	// is always a heap pointer anyway.
-	case ODOT, OINDEX, OPAREN, OCONVNOP:
-		if !Isslice(n.Left.Type) {
-			addrescapes(n.Left)
-		}
-	}
-}
-
-func clearlabels() {
-	for l := labellist; l != nil; l = l.Link {
-		l.Sym.Label = nil
-	}
-
-	labellist = nil
-	lastlabel = nil
-}
-
-func newlab(n *Node) *Label {
-	s := n.Left.Sym
-	lab := s.Label
-	if lab == nil {
-		lab = new(Label)
-		if lastlabel == nil {
-			labellist = lab
-		} else {
-			lastlabel.Link = lab
-		}
-		lastlabel = lab
-		lab.Sym = s
-		s.Label = lab
-	}
-
-	if n.Op == OLABEL {
-		if lab.Def != nil {
-			Yyerror("label %v already defined at %v", s, lab.Def.Line())
-		} else {
-			lab.Def = n
-		}
-	} else {
-		lab.Use = list(lab.Use, n)
-	}
-
-	return lab
-}
-
-func checkgoto(from *Node, to *Node) {
-	if from.Sym == to.Sym {
-		return
-	}
-
-	nf := 0
-	for fs := from.Sym; fs != nil; fs = fs.Link {
-		nf++
-	}
-	nt := 0
-	for fs := to.Sym; fs != nil; fs = fs.Link {
-		nt++
-	}
-	fs := from.Sym
-	for ; nf > nt; nf-- {
-		fs = fs.Link
-	}
-	if fs != to.Sym {
-		lno := int(lineno)
-		setlineno(from)
-
-		// decide what to complain about.
-		// prefer to complain about 'into block' over declarations,
-		// so scan backward to find most recent block or else dcl.
-		var block *Sym
-
-		var dcl *Sym
-		ts := to.Sym
-		for ; nt > nf; nt-- {
-			if ts.Pkg == nil {
-				block = ts
-			} else {
-				dcl = ts
-			}
-			ts = ts.Link
-		}
-
-		for ts != fs {
-			if ts.Pkg == nil {
-				block = ts
-			} else {
-				dcl = ts
-			}
-			ts = ts.Link
-			fs = fs.Link
-		}
-
-		if block != nil {
-			Yyerror("goto %v jumps into block starting at %v", from.Left.Sym, Ctxt.Line(int(block.Lastlineno)))
-		} else {
-			Yyerror("goto %v jumps over declaration of %v at %v", from.Left.Sym, dcl, Ctxt.Line(int(dcl.Lastlineno)))
-		}
-		lineno = int32(lno)
-	}
-}
-
-func stmtlabel(n *Node) *Label {
-	if n.Sym != nil {
-		lab := n.Sym.Label
-		if lab != nil {
-			if lab.Def != nil {
-				if lab.Def.Name.Defn == n {
-					return lab
-				}
-			}
-		}
-	}
-	return nil
-}
-
-/*
- * compile statements
- */
-func Genlist(l *NodeList) {
-	for ; l != nil; l = l.Next {
-		gen(l.N)
-	}
-}
-
-/*
- * generate code to start new proc running call n.
- */
-func cgen_proc(n *Node, proc int) {
-	switch n.Left.Op {
-	default:
-		Fatal("cgen_proc: unknown call %v", Oconv(int(n.Left.Op), 0))
-
-	case OCALLMETH:
-		cgen_callmeth(n.Left, proc)
-
-	case OCALLINTER:
-		cgen_callinter(n.Left, nil, proc)
-
-	case OCALLFUNC:
-		cgen_call(n.Left, proc)
-	}
-}
-
-/*
- * generate declaration.
- * have to allocate heap copy
- * for escaped variables.
- */
-func cgen_dcl(n *Node) {
-	if Debug['g'] != 0 {
-		Dump("\ncgen-dcl", n)
-	}
-	if n.Op != ONAME {
-		Dump("cgen_dcl", n)
-		Fatal("cgen_dcl")
-	}
-
-	if n.Class&PHEAP == 0 {
-		return
-	}
-	if compiling_runtime != 0 {
-		Yyerror("%v escapes to heap, not allowed in runtime.", n)
-	}
-	if prealloc[n] == nil {
-		prealloc[n] = callnew(n.Type)
-	}
-	Cgen_as(n.Name.Heapaddr, prealloc[n])
-}
-
-/*
- * generate discard of value
- */
-func cgen_discard(nr *Node) {
-	if nr == nil {
-		return
-	}
-
-	switch nr.Op {
-	case ONAME:
-		if nr.Class&PHEAP == 0 && nr.Class != PEXTERN && nr.Class != PFUNC && nr.Class != PPARAMREF {
-			gused(nr)
-		}
-
-		// unary
-	case OADD,
-		OAND,
-		ODIV,
-		OEQ,
-		OGE,
-		OGT,
-		OLE,
-		OLSH,
-		OLT,
-		OMOD,
-		OMUL,
-		ONE,
-		OOR,
-		ORSH,
-		OSUB,
-		OXOR:
-		cgen_discard(nr.Left)
-
-		cgen_discard(nr.Right)
-
-		// binary
-	case OCAP,
-		OCOM,
-		OLEN,
-		OMINUS,
-		ONOT,
-		OPLUS:
-		cgen_discard(nr.Left)
-
-	case OIND:
-		Cgen_checknil(nr.Left)
-
-		// special enough to just evaluate
-	default:
-		var tmp Node
-		Tempname(&tmp, nr.Type)
-
-		Cgen_as(&tmp, nr)
-		gused(&tmp)
-	}
-}
-
-/*
- * clearslim generates code to zero a slim node.
- */
-func Clearslim(n *Node) {
-	var z Node
-	z.Op = OLITERAL
-	z.Type = n.Type
-	z.Addable = true
-
-	switch Simtype[n.Type.Etype] {
-	case TCOMPLEX64, TCOMPLEX128:
-		z.SetVal(Val{new(Mpcplx)})
-		Mpmovecflt(&z.Val().U.(*Mpcplx).Real, 0.0)
-		Mpmovecflt(&z.Val().U.(*Mpcplx).Imag, 0.0)
-
-	case TFLOAT32, TFLOAT64:
-		var zero Mpflt
-		Mpmovecflt(&zero, 0.0)
-		z.SetVal(Val{&zero})
-
-	case TPTR32, TPTR64, TCHAN, TMAP:
-		z.SetVal(Val{new(NilVal)})
-
-	case TBOOL:
-		z.SetVal(Val{false})
-
-	case TINT8,
-		TINT16,
-		TINT32,
-		TINT64,
-		TUINT8,
-		TUINT16,
-		TUINT32,
-		TUINT64:
-		z.SetVal(Val{new(Mpint)})
-		Mpmovecfix(z.Val().U.(*Mpint), 0)
-
-	default:
-		Fatal("clearslim called on type %v", n.Type)
-	}
-
-	ullmancalc(&z)
-	Cgen(&z, n)
-}
-
-/*
- * generate:
- *	res = iface{typ, data}
- * n->left is typ
- * n->right is data
- */
-func Cgen_eface(n *Node, res *Node) {
-	/*
-	 * the right node of an eface may contain function calls that uses res as an argument,
-	 * so it's important that it is done first
-	 */
-
-	tmp := temp(Types[Tptr])
-	Cgen(n.Right, tmp)
-
-	Gvardef(res)
-
-	dst := *res
-	dst.Type = Types[Tptr]
-	dst.Xoffset += int64(Widthptr)
-	Cgen(tmp, &dst)
-
-	dst.Xoffset -= int64(Widthptr)
-	Cgen(n.Left, &dst)
-}
-
-/*
- * generate one of:
- *	res, resok = x.(T)
- *	res = x.(T) (when resok == nil)
- * n.Left is x
- * n.Type is T
- */
-func cgen_dottype(n *Node, res, resok *Node, wb bool) {
-	if Debug_typeassert > 0 {
-		Warn("type assertion inlined")
-	}
-	//	iface := n.Left
-	//	r1 := iword(iface)
-	//	if n.Left is non-empty interface {
-	//		r1 = *r1
-	//	}
-	//	if r1 == T {
-	//		res = idata(iface)
-	//		resok = true
-	//	} else {
-	//		assert[EI]2T(x, T, nil) // (when resok == nil; does not return)
-	//		resok = false // (when resok != nil)
-	//	}
-	//
-	var iface Node
-	Igen(n.Left, &iface, res)
-	var r1, r2 Node
-	byteptr := Ptrto(Types[TUINT8]) // type used in runtime prototypes for runtime type (*byte)
-	Regalloc(&r1, byteptr, nil)
-	iface.Type = byteptr
-	Cgen(&iface, &r1)
-	if !isnilinter(n.Left.Type) {
-		// Holding itab, want concrete type in second word.
-		p := Thearch.Ginscmp(OEQ, byteptr, &r1, Nodintconst(0), -1)
-		r2 = r1
-		r2.Op = OINDREG
-		r2.Xoffset = int64(Widthptr)
-		Cgen(&r2, &r1)
-		Patch(p, Pc)
-	}
-	Regalloc(&r2, byteptr, nil)
-	Cgen(typename(n.Type), &r2)
-	p := Thearch.Ginscmp(ONE, byteptr, &r1, &r2, -1)
-	Regfree(&r2) // not needed for success path; reclaimed on one failure path
-	iface.Xoffset += int64(Widthptr)
-	Cgen(&iface, &r1)
-	Regfree(&iface)
-
-	if resok == nil {
-		r1.Type = res.Type
-		cgen_wb(&r1, res, wb)
-		q := Gbranch(obj.AJMP, nil, 0)
-		Patch(p, Pc)
-		Regrealloc(&r2) // reclaim from above, for this failure path
-		fn := syslook("panicdottype", 0)
-		dowidth(fn.Type)
-		call := Nod(OCALLFUNC, fn, nil)
-		r1.Type = byteptr
-		r2.Type = byteptr
-		call.List = list(list(list1(&r1), &r2), typename(n.Left.Type))
-		call.List = ascompatte(OCALLFUNC, call, false, getinarg(fn.Type), call.List, 0, nil)
-		gen(call)
-		Regfree(&r1)
-		Regfree(&r2)
-		Thearch.Gins(obj.AUNDEF, nil, nil)
-		Patch(q, Pc)
-	} else {
-		// This half is handling the res, resok = x.(T) case,
-		// which is called from gen, not cgen, and is consequently fussier
-		// about blank assignments. We have to avoid calling cgen for those.
-		r1.Type = res.Type
-		if !isblank(res) {
-			cgen_wb(&r1, res, wb)
-		}
-		Regfree(&r1)
-		if !isblank(resok) {
-			Cgen(Nodbool(true), resok)
-		}
-		q := Gbranch(obj.AJMP, nil, 0)
-		Patch(p, Pc)
-		if !isblank(res) {
-			n := nodnil()
-			n.Type = res.Type
-			Cgen(n, res)
-		}
-		if !isblank(resok) {
-			Cgen(Nodbool(false), resok)
-		}
-		Patch(q, Pc)
-	}
-}
-
-/*
- * generate:
- *	res, resok = x.(T)
- * n.Left is x
- * n.Type is T
- */
-func Cgen_As2dottype(n, res, resok *Node) {
-	if Debug_typeassert > 0 {
-		Warn("type assertion inlined")
-	}
-	//	iface := n.Left
-	//	r1 := iword(iface)
-	//	if n.Left is non-empty interface {
-	//		r1 = *r1
-	//	}
-	//	if r1 == T {
-	//		res = idata(iface)
-	//		resok = true
-	//	} else {
-	//		res = nil
-	//		resok = false
-	//	}
-	//
-	var iface Node
-	Igen(n.Left, &iface, nil)
-	var r1, r2 Node
-	byteptr := Ptrto(Types[TUINT8]) // type used in runtime prototypes for runtime type (*byte)
-	Regalloc(&r1, byteptr, res)
-	iface.Type = byteptr
-	Cgen(&iface, &r1)
-	if !isnilinter(n.Left.Type) {
-		// Holding itab, want concrete type in second word.
-		p := Thearch.Ginscmp(OEQ, byteptr, &r1, Nodintconst(0), -1)
-		r2 = r1
-		r2.Op = OINDREG
-		r2.Xoffset = int64(Widthptr)
-		Cgen(&r2, &r1)
-		Patch(p, Pc)
-	}
-	Regalloc(&r2, byteptr, nil)
-	Cgen(typename(n.Type), &r2)
-	p := Thearch.Ginscmp(ONE, byteptr, &r1, &r2, -1)
-	iface.Type = n.Type
-	iface.Xoffset += int64(Widthptr)
-	Cgen(&iface, &r1)
-	if iface.Op != 0 {
-		Regfree(&iface)
-	}
-	Cgen(&r1, res)
-	q := Gbranch(obj.AJMP, nil, 0)
-	Patch(p, Pc)
-
-	fn := syslook("panicdottype", 0)
-	dowidth(fn.Type)
-	call := Nod(OCALLFUNC, fn, nil)
-	call.List = list(list(list1(&r1), &r2), typename(n.Left.Type))
-	call.List = ascompatte(OCALLFUNC, call, false, getinarg(fn.Type), call.List, 0, nil)
-	gen(call)
-	Regfree(&r1)
-	Regfree(&r2)
-	Thearch.Gins(obj.AUNDEF, nil, nil)
-	Patch(q, Pc)
-}
-
-/*
- * gather series of offsets
- * >=0 is direct addressed field
- * <0 is pointer to next field (+1)
- */
-func Dotoffset(n *Node, oary []int64, nn **Node) int {
-	var i int
-
-	switch n.Op {
-	case ODOT:
-		if n.Xoffset == BADWIDTH {
-			Dump("bad width in dotoffset", n)
-			Fatal("bad width in dotoffset")
-		}
-
-		i = Dotoffset(n.Left, oary, nn)
-		if i > 0 {
-			if oary[i-1] >= 0 {
-				oary[i-1] += n.Xoffset
-			} else {
-				oary[i-1] -= n.Xoffset
-			}
-			break
-		}
-
-		if i < 10 {
-			oary[i] = n.Xoffset
-			i++
-		}
-
-	case ODOTPTR:
-		if n.Xoffset == BADWIDTH {
-			Dump("bad width in dotoffset", n)
-			Fatal("bad width in dotoffset")
-		}
-
-		i = Dotoffset(n.Left, oary, nn)
-		if i < 10 {
-			oary[i] = -(n.Xoffset + 1)
-			i++
-		}
-
-	default:
-		*nn = n
-		return 0
-	}
-
-	if i >= 10 {
-		*nn = nil
-	}
-	return i
-}
-
-/*
- * make a new off the books
- */
-func Tempname(nn *Node, t *Type) {
-	if Curfn == nil {
-		Fatal("no curfn for tempname")
-	}
-
-	if t == nil {
-		Yyerror("tempname called with nil type")
-		t = Types[TINT32]
-	}
-
-	// give each tmp a different name so that there
-	// a chance to registerizer them
-	s := Lookupf("autotmp_%.4d", statuniqgen)
-	statuniqgen++
-	n := Nod(ONAME, nil, nil)
-	n.Sym = s
-	s.Def = n
-	n.Type = t
-	n.Class = PAUTO
-	n.Addable = true
-	n.Ullman = 1
-	n.Esc = EscNever
-	n.Name.Curfn = Curfn
-	Curfn.Func.Dcl = list(Curfn.Func.Dcl, n)
-
-	dowidth(t)
-	n.Xoffset = 0
-	*nn = *n
-}
-
-func temp(t *Type) *Node {
-	n := Nod(OXXX, nil, nil)
-	Tempname(n, t)
-	n.Sym.Def.Used = true
-	return n.Orig
-}
-
-func gen(n *Node) {
-	//dump("gen", n);
-
-	lno := setlineno(n)
-
-	wasregalloc := Anyregalloc()
-
-	if n == nil {
-		goto ret
-	}
-
-	if n.Ninit != nil {
-		Genlist(n.Ninit)
-	}
-
-	setlineno(n)
-
-	switch n.Op {
-	default:
-		Fatal("gen: unknown op %v", Nconv(n, obj.FmtShort|obj.FmtSign))
-
-	case OCASE,
-		OFALL,
-		OXCASE,
-		OXFALL,
-		ODCLCONST,
-		ODCLFUNC,
-		ODCLTYPE:
-		break
-
-	case OEMPTY:
-		break
-
-	case OBLOCK:
-		Genlist(n.List)
-
-	case OLABEL:
-		if isblanksym(n.Left.Sym) {
-			break
-		}
-
-		lab := newlab(n)
-
-		// if there are pending gotos, resolve them all to the current pc.
-		var p2 *obj.Prog
-		for p1 := lab.Gotopc; p1 != nil; p1 = p2 {
-			p2 = unpatch(p1)
-			Patch(p1, Pc)
-		}
-
-		lab.Gotopc = nil
-		if lab.Labelpc == nil {
-			lab.Labelpc = Pc
-		}
-
-		if n.Name.Defn != nil {
-			switch n.Name.Defn.Op {
-			// so stmtlabel can find the label
-			case OFOR, OSWITCH, OSELECT:
-				n.Name.Defn.Sym = lab.Sym
-			}
-		}
-
-		// if label is defined, emit jump to it.
-	// otherwise save list of pending gotos in lab->gotopc.
-	// the list is linked through the normal jump target field
-	// to avoid a second list.  (the jumps are actually still
-	// valid code, since they're just going to another goto
-	// to the same label.  we'll unwind it when we learn the pc
-	// of the label in the OLABEL case above.)
-	case OGOTO:
-		lab := newlab(n)
-
-		if lab.Labelpc != nil {
-			gjmp(lab.Labelpc)
-		} else {
-			lab.Gotopc = gjmp(lab.Gotopc)
-		}
-
-	case OBREAK:
-		if n.Left != nil {
-			lab := n.Left.Sym.Label
-			if lab == nil {
-				Yyerror("break label not defined: %v", n.Left.Sym)
-				break
-			}
-
-			lab.Used = 1
-			if lab.Breakpc == nil {
-				Yyerror("invalid break label %v", n.Left.Sym)
-				break
-			}
-
-			gjmp(lab.Breakpc)
-			break
-		}
-
-		if breakpc == nil {
-			Yyerror("break is not in a loop")
-			break
-		}
-
-		gjmp(breakpc)
-
-	case OCONTINUE:
-		if n.Left != nil {
-			lab := n.Left.Sym.Label
-			if lab == nil {
-				Yyerror("continue label not defined: %v", n.Left.Sym)
-				break
-			}
-
-			lab.Used = 1
-			if lab.Continpc == nil {
-				Yyerror("invalid continue label %v", n.Left.Sym)
-				break
-			}
-
-			gjmp(lab.Continpc)
-			break
-		}
-
-		if continpc == nil {
-			Yyerror("continue is not in a loop")
-			break
-		}
-
-		gjmp(continpc)
-
-	case OFOR:
-		sbreak := breakpc
-		p1 := gjmp(nil)     //		goto test
-		breakpc = gjmp(nil) // break:	goto done
-		scontin := continpc
-		continpc = Pc
-
-		// define break and continue labels
-		lab := stmtlabel(n)
-		if lab != nil {
-			lab.Breakpc = breakpc
-			lab.Continpc = continpc
-		}
-
-		gen(n.Right)                     // contin:	incr
-		Patch(p1, Pc)                    // test:
-		Bgen(n.Left, false, -1, breakpc) //		if(!test) goto break
-		Genlist(n.Nbody)                 //		body
-		gjmp(continpc)
-		Patch(breakpc, Pc) // done:
-		continpc = scontin
-		breakpc = sbreak
-		if lab != nil {
-			lab.Breakpc = nil
-			lab.Continpc = nil
-		}
-
-	case OIF:
-		p1 := gjmp(nil)                         //		goto test
-		p2 := gjmp(nil)                         // p2:		goto else
-		Patch(p1, Pc)                           // test:
-		Bgen(n.Left, false, int(-n.Likely), p2) //		if(!test) goto p2
-		Genlist(n.Nbody)                        //		then
-		p3 := gjmp(nil)                         //		goto done
-		Patch(p2, Pc)                           // else:
-		Genlist(n.Rlist)                        //		else
-		Patch(p3, Pc)                           // done:
-
-	case OSWITCH:
-		sbreak := breakpc
-		p1 := gjmp(nil)     //		goto test
-		breakpc = gjmp(nil) // break:	goto done
-
-		// define break label
-		lab := stmtlabel(n)
-		if lab != nil {
-			lab.Breakpc = breakpc
-		}
-
-		Patch(p1, Pc)      // test:
-		Genlist(n.Nbody)   //		switch(test) body
-		Patch(breakpc, Pc) // done:
-		breakpc = sbreak
-		if lab != nil {
-			lab.Breakpc = nil
-		}
-
-	case OSELECT:
-		sbreak := breakpc
-		p1 := gjmp(nil)     //		goto test
-		breakpc = gjmp(nil) // break:	goto done
-
-		// define break label
-		lab := stmtlabel(n)
-		if lab != nil {
-			lab.Breakpc = breakpc
-		}
-
-		Patch(p1, Pc)      // test:
-		Genlist(n.Nbody)   //		select() body
-		Patch(breakpc, Pc) // done:
-		breakpc = sbreak
-		if lab != nil {
-			lab.Breakpc = nil
-		}
-
-	case ODCL:
-		cgen_dcl(n.Left)
-
-	case OAS:
-		if gen_as_init(n) {
-			break
-		}
-		Cgen_as(n.Left, n.Right)
-
-	case OASWB:
-		Cgen_as_wb(n.Left, n.Right, true)
-
-	case OAS2DOTTYPE:
-		cgen_dottype(n.Rlist.N, n.List.N, n.List.Next.N, false)
-
-	case OCALLMETH:
-		cgen_callmeth(n, 0)
-
-	case OCALLINTER:
-		cgen_callinter(n, nil, 0)
-
-	case OCALLFUNC:
-		cgen_call(n, 0)
-
-	case OPROC:
-		cgen_proc(n, 1)
-
-	case ODEFER:
-		cgen_proc(n, 2)
-
-	case ORETURN, ORETJMP:
-		cgen_ret(n)
-
-	// Function calls turned into compiler intrinsics.
-	// At top level, can just ignore the call and make sure to preserve side effects in the argument, if any.
-	case OGETG:
-		// nothing
-	case OSQRT:
-		cgen_discard(n.Left)
-
-	case OCHECKNIL:
-		Cgen_checknil(n.Left)
-
-	case OVARKILL:
-		gvarkill(n.Left)
-	}
-
-ret:
-	if Anyregalloc() != wasregalloc {
-		Dump("node", n)
-		Fatal("registers left allocated")
-	}
-
-	lineno = lno
-}
-
-func Cgen_as(nl, nr *Node) {
-	Cgen_as_wb(nl, nr, false)
-}
-
-func Cgen_as_wb(nl, nr *Node, wb bool) {
-	if Debug['g'] != 0 {
-		op := "cgen_as"
-		if wb {
-			op = "cgen_as_wb"
-		}
-		Dump(op, nl)
-		Dump(op+" = ", nr)
-	}
-
-	for nr != nil && nr.Op == OCONVNOP {
-		nr = nr.Left
-	}
-
-	if nl == nil || isblank(nl) {
-		cgen_discard(nr)
-		return
-	}
-
-	if nr == nil || iszero(nr) {
-		// heaps should already be clear
-		if nr == nil && (nl.Class&PHEAP != 0) {
-			return
-		}
-
-		tl := nl.Type
-		if tl == nil {
-			return
-		}
-		if Isfat(tl) {
-			if nl.Op == ONAME {
-				Gvardef(nl)
-			}
-			Thearch.Clearfat(nl)
-			return
-		}
-
-		Clearslim(nl)
-		return
-	}
-
-	tl := nl.Type
-	if tl == nil {
-		return
-	}
-
-	cgen_wb(nr, nl, wb)
-}
-
-func cgen_callmeth(n *Node, proc int) {
-	// generate a rewrite in n2 for the method call
-	// (p.f)(...) goes to (f)(p,...)
-
-	l := n.Left
-
-	if l.Op != ODOTMETH {
-		Fatal("cgen_callmeth: not dotmethod: %v", l)
-	}
-
-	n2 := *n
-	n2.Op = OCALLFUNC
-	n2.Left = l.Right
-	n2.Left.Type = l.Type
-
-	if n2.Left.Op == ONAME {
-		n2.Left.Class = PFUNC
-	}
-	cgen_call(&n2, proc)
-}
-
-// CgenTemp creates a temporary node, assigns n to it, and returns it.
-func CgenTemp(n *Node) *Node {
-	var tmp Node
-	Tempname(&tmp, n.Type)
-	Cgen(n, &tmp)
-	return &tmp
-}
-
-func checklabels() {
-	var l *NodeList
-
-	for lab := labellist; lab != nil; lab = lab.Link {
-		if lab.Def == nil {
-			for l = lab.Use; l != nil; l = l.Next {
-				yyerrorl(int(l.N.Lineno), "label %v not defined", lab.Sym)
-			}
-			continue
-		}
-
-		if lab.Use == nil && lab.Used == 0 {
-			yyerrorl(int(lab.Def.Lineno), "label %v defined and not used", lab.Sym)
-			continue
-		}
-
-		if lab.Gotopc != nil {
-			Fatal("label %v never resolved", lab.Sym)
-		}
-		for l = lab.Use; l != nil; l = l.Next {
-			checkgoto(l.N, lab.Def)
-		}
-	}
-}
-
-// Componentgen copies a composite value by moving its individual components.
-// Slices, strings and interfaces are supported. Small structs or arrays with
-// elements of basic type are also supported.
-// nr is nil when assigning a zero value.
-func Componentgen(nr, nl *Node) bool {
-	return componentgen_wb(nr, nl, false)
-}
-
-// componentgen_wb is like componentgen but if wb==true emits write barriers for pointer updates.
-func componentgen_wb(nr, nl *Node, wb bool) bool {
-	// Don't generate any code for complete copy of a variable into itself.
-	// It's useless, and the VARDEF will incorrectly mark the old value as dead.
-	// (This check assumes that the arguments passed to componentgen did not
-	// themselves come from Igen, or else we could have Op==ONAME but
-	// with a Type and Xoffset describing an individual field, not the entire
-	// variable.)
-	if nl.Op == ONAME && nl == nr {
-		return true
-	}
-
-	// Count number of moves required to move components.
-	// If using write barrier, can only emit one pointer.
-	// TODO(rsc): Allow more pointers, for reflect.Value.
-	const maxMoves = 8
-	n := 0
-	numPtr := 0
-	visitComponents(nl.Type, 0, func(t *Type, offset int64) bool {
-		n++
-		if int(Simtype[t.Etype]) == Tptr && t != itable {
-			numPtr++
-		}
-		return n <= maxMoves && (!wb || numPtr <= 1)
-	})
-	if n > maxMoves || wb && numPtr > 1 {
-		return false
-	}
-
-	// Must call emitVardef after evaluating rhs but before writing to lhs.
-	emitVardef := func() {
-		// Emit vardef if needed.
-		if nl.Op == ONAME {
-			switch nl.Type.Etype {
-			case TARRAY, TSTRING, TINTER, TSTRUCT:
-				Gvardef(nl)
-			}
-		}
-	}
-
-	isConstString := Isconst(nr, CTSTR)
-
-	if !cadable(nl) && nr != nil && !cadable(nr) && !isConstString {
-		return false
-	}
-
-	var nodl Node
-	if cadable(nl) {
-		nodl = *nl
-	} else {
-		if nr != nil && !cadable(nr) && !isConstString {
-			return false
-		}
-		if nr == nil || isConstString || nl.Ullman >= nr.Ullman {
-			Igen(nl, &nodl, nil)
-			defer Regfree(&nodl)
-		}
-	}
-	lbase := nodl.Xoffset
-
-	// Special case: zeroing.
-	var nodr Node
-	if nr == nil {
-		// When zeroing, prepare a register containing zero.
-		// TODO(rsc): Check that this is actually generating the best code.
-		if Thearch.REGZERO != 0 {
-			// cpu has a dedicated zero register
-			Nodreg(&nodr, Types[TUINT], Thearch.REGZERO)
-		} else {
-			// no dedicated zero register
-			var zero Node
-			Nodconst(&zero, nl.Type, 0)
-			Regalloc(&nodr, Types[TUINT], nil)
-			Thearch.Gmove(&zero, &nodr)
-			defer Regfree(&nodr)
-		}
-
-		emitVardef()
-		visitComponents(nl.Type, 0, func(t *Type, offset int64) bool {
-			nodl.Type = t
-			nodl.Xoffset = lbase + offset
-			nodr.Type = t
-			if Isfloat[t.Etype] {
-				// TODO(rsc): Cache zero register like we do for integers?
-				Clearslim(&nodl)
-			} else {
-				Thearch.Gmove(&nodr, &nodl)
-			}
-			return true
-		})
-		return true
-	}
-
-	// Special case: assignment of string constant.
-	if isConstString {
-		emitVardef()
-
-		// base
-		nodl.Type = Ptrto(Types[TUINT8])
-		Regalloc(&nodr, Types[Tptr], nil)
-		p := Thearch.Gins(Thearch.Optoas(OAS, Types[Tptr]), nil, &nodr)
-		Datastring(nr.Val().U.(string), &p.From)
-		p.From.Type = obj.TYPE_ADDR
-		Thearch.Gmove(&nodr, &nodl)
-		Regfree(&nodr)
-
-		// length
-		nodl.Type = Types[Simtype[TUINT]]
-		nodl.Xoffset += int64(Array_nel) - int64(Array_array)
-		Nodconst(&nodr, nodl.Type, int64(len(nr.Val().U.(string))))
-		Thearch.Gmove(&nodr, &nodl)
-		return true
-	}
-
-	// General case: copy nl = nr.
-	nodr = *nr
-	if !cadable(nr) {
-		if nr.Ullman >= UINF && nodl.Op == OINDREG {
-			Fatal("miscompile")
-		}
-		Igen(nr, &nodr, nil)
-		defer Regfree(&nodr)
-	}
-	rbase := nodr.Xoffset
-
-	if nodl.Op == 0 {
-		Igen(nl, &nodl, nil)
-		defer Regfree(&nodl)
-		lbase = nodl.Xoffset
-	}
-
-	emitVardef()
-	var (
-		ptrType   *Type
-		ptrOffset int64
-	)
-	visitComponents(nl.Type, 0, func(t *Type, offset int64) bool {
-		if wb && int(Simtype[t.Etype]) == Tptr && t != itable {
-			if ptrType != nil {
-				Fatal("componentgen_wb %v", Tconv(nl.Type, 0))
-			}
-			ptrType = t
-			ptrOffset = offset
-			return true
-		}
-		nodl.Type = t
-		nodl.Xoffset = lbase + offset
-		nodr.Type = t
-		nodr.Xoffset = rbase + offset
-		Thearch.Gmove(&nodr, &nodl)
-		return true
-	})
-	if ptrType != nil {
-		nodl.Type = ptrType
-		nodl.Xoffset = lbase + ptrOffset
-		nodr.Type = ptrType
-		nodr.Xoffset = rbase + ptrOffset
-		cgen_wbptr(&nodr, &nodl)
-	}
-	return true
-}
-
-// visitComponents walks the individual components of the type t,
-// walking into array elements, struct fields, the real and imaginary
-// parts of complex numbers, and on 32-bit systems the high and
-// low halves of 64-bit integers.
-// It calls f for each such component, passing the component (aka element)
-// type and memory offset, assuming t starts at startOffset.
-// If f ever returns false, visitComponents returns false without any more
-// calls to f. Otherwise visitComponents returns true.
-func visitComponents(t *Type, startOffset int64, f func(elem *Type, elemOffset int64) bool) bool {
-	switch t.Etype {
-	case TINT64:
-		if Widthreg == 8 {
-			break
-		}
-		// NOTE: Assuming little endian (signed top half at offset 4).
-		// We don't have any 32-bit big-endian systems.
-		if Thearch.Thechar != '5' && Thearch.Thechar != '8' {
-			Fatal("unknown 32-bit architecture")
-		}
-		return f(Types[TUINT32], startOffset) &&
-			f(Types[TINT32], startOffset+4)
-
-	case TUINT64:
-		if Widthreg == 8 {
-			break
-		}
-		return f(Types[TUINT32], startOffset) &&
-			f(Types[TUINT32], startOffset+4)
-
-	case TCOMPLEX64:
-		return f(Types[TFLOAT32], startOffset) &&
-			f(Types[TFLOAT32], startOffset+4)
-
-	case TCOMPLEX128:
-		return f(Types[TFLOAT64], startOffset) &&
-			f(Types[TFLOAT64], startOffset+8)
-
-	case TINTER:
-		return f(itable, startOffset) &&
-			f(Ptrto(Types[TUINT8]), startOffset+int64(Widthptr))
-		return true
-
-	case TSTRING:
-		return f(Ptrto(Types[TUINT8]), startOffset) &&
-			f(Types[Simtype[TUINT]], startOffset+int64(Widthptr))
-
-	case TARRAY:
-		if Isslice(t) {
-			return f(Ptrto(t.Type), startOffset+int64(Array_array)) &&
-				f(Types[Simtype[TUINT]], startOffset+int64(Array_nel)) &&
-				f(Types[Simtype[TUINT]], startOffset+int64(Array_cap))
-		}
-
-		// Short-circuit [1e6]struct{}.
-		if t.Type.Width == 0 {
-			return true
-		}
-
-		for i := int64(0); i < t.Bound; i++ {
-			if !visitComponents(t.Type, startOffset+i*t.Type.Width, f) {
-				return false
-			}
-		}
-		return true
-
-	case TSTRUCT:
-		if t.Type != nil && t.Type.Width != 0 {
-			// NOTE(rsc): If this happens, the right thing to do is to say
-			//	startOffset -= t.Type.Width
-			// but I want to see if it does.
-			// The old version of componentgen handled this,
-			// in code introduced in CL 6932045 to fix issue #4518.
-			// But the test case in issue 4518 does not trigger this anymore,
-			// so maybe this complication is no longer needed.
-			Fatal("struct not at offset 0")
-		}
-
-		for field := t.Type; field != nil; field = field.Down {
-			if field.Etype != TFIELD {
-				Fatal("bad struct")
-			}
-			if !visitComponents(field.Type, startOffset+field.Width, f) {
-				return false
-			}
-		}
-		return true
-	}
-	return f(t, startOffset)
-}
-
-func cadable(n *Node) bool {
-	// Note: Not sure why you can have n.Op == ONAME without n.Addable, but you can.
-	return n.Addable && n.Op == ONAME
-}
diff --git a/src/cmd/compile/internal/gc/go.go b/src/cmd/compile/internal/gc/go.go
deleted file mode 100644
index 67d27bb..0000000
--- a/src/cmd/compile/internal/gc/go.go
+++ /dev/null
@@ -1,870 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import (
-	"bytes"
-	"cmd/compile/internal/big"
-	"cmd/internal/obj"
-)
-
-// avoid <ctype.h>
-
-// The parser's maximum stack size.
-// We have to use a #define macro here since yacc
-// or bison will check for its definition and use
-// a potentially smaller value if it is undefined.
-const (
-	NHUNK           = 50000
-	BUFSIZ          = 8192
-	NSYMB           = 500
-	NHASH           = 1024
-	MAXALIGN        = 7
-	UINF            = 100
-	PRIME1          = 3
-	BADWIDTH        = -1000000000
-	MaxStackVarSize = 10 * 1024 * 1024
-)
-
-const (
-	// These values are known by runtime.
-	// The MEMx and NOEQx values must run in parallel.  See algtype.
-	AMEM = iota
-	AMEM0
-	AMEM8
-	AMEM16
-	AMEM32
-	AMEM64
-	AMEM128
-	ANOEQ
-	ANOEQ0
-	ANOEQ8
-	ANOEQ16
-	ANOEQ32
-	ANOEQ64
-	ANOEQ128
-	ASTRING
-	AINTER
-	ANILINTER
-	ASLICE
-	AFLOAT32
-	AFLOAT64
-	ACPLX64
-	ACPLX128
-	AUNK = 100
-)
-
-const (
-	// Maximum size in bits for Mpints before signalling
-	// overflow and also mantissa precision for Mpflts.
-	Mpprec = 512
-	// Turn on for constant arithmetic debugging output.
-	Mpdebug = false
-)
-
-// Mpint represents an integer constant.
-type Mpint struct {
-	Val  big.Int
-	Ovf  bool // set if Val overflowed compiler limit (sticky)
-	Rune bool // set if syntax indicates default type rune
-}
-
-// Mpflt represents a floating-point constant.
-type Mpflt struct {
-	Val big.Float
-}
-
-// Mpcplx represents a complex constant.
-type Mpcplx struct {
-	Real Mpflt
-	Imag Mpflt
-}
-
-type Val struct {
-	// U contains one of:
-	// bool     bool when n.ValCtype() == CTBOOL
-	// *Mpint   int when n.ValCtype() == CTINT, rune when n.ValCtype() == CTRUNE
-	// *Mpflt   float when n.ValCtype() == CTFLT
-	// *Mpcplx  pair of floats when n.ValCtype() == CTCPLX
-	// string   string when n.ValCtype() == CTSTR
-	// *Nilval  when n.ValCtype() == CTNIL
-	U interface{}
-}
-
-type NilVal struct{}
-
-func (v Val) Ctype() int {
-	switch x := v.U.(type) {
-	default:
-		Fatal("unexpected Ctype for %T", v.U)
-		panic("not reached")
-	case nil:
-		return 0
-	case *NilVal:
-		return CTNIL
-	case bool:
-		return CTBOOL
-	case *Mpint:
-		if x.Rune {
-			return CTRUNE
-		}
-		return CTINT
-	case *Mpflt:
-		return CTFLT
-	case *Mpcplx:
-		return CTCPLX
-	case string:
-		return CTSTR
-	}
-}
-
-type Pkg struct {
-	Name     string // package name
-	Path     string // string literal used in import statement
-	Pathsym  *Sym
-	Prefix   string // escaped path for use in symbol table
-	Imported uint8  // export data of this package was parsed
-	Exported int8   // import line written in export data
-	Direct   int8   // imported directly
-	Safe     bool   // whether the package is marked as safe
-	Syms     map[string]*Sym
-}
-
-type Sym struct {
-	Lexical   uint16
-	Flags     uint8
-	Link      *Sym
-	Uniqgen   uint32
-	Importdef *Pkg   // where imported definition was found
-	Linkname  string // link name
-
-	// saved and restored by dcopy
-	Pkg        *Pkg
-	Name       string // variable name
-	Def        *Node  // definition: ONAME OTYPE OPACK or OLITERAL
-	Label      *Label // corresponding label (ephemeral)
-	Block      int32  // blocknumber to catch redeclaration
-	Lastlineno int32  // last declaration for diagnostic
-	Origpkg    *Pkg   // original package for . import
-	Lsym       *obj.LSym
-	Fsym       *Sym // funcsym
-}
-
-type Type struct {
-	Etype       uint8
-	Nointerface bool
-	Noalg       uint8
-	Chan        uint8
-	Trecur      uint8 // to detect loops
-	Printed     uint8
-	Embedded    uint8 // TFIELD embedded type
-	Siggen      uint8
-	Funarg      uint8 // on TSTRUCT and TFIELD
-	Copyany     uint8
-	Local       bool // created in this file
-	Deferwidth  uint8
-	Broke       uint8 // broken type definition.
-	Isddd       bool  // TFIELD is ... argument
-	Align       uint8
-	Haspointers uint8 // 0 unknown, 1 no, 2 yes
-
-	Nod    *Node // canonical OTYPE node
-	Orig   *Type // original type (type literal or predefined type)
-	Lineno int
-
-	// TFUNC
-	Thistuple int
-	Outtuple  int
-	Intuple   int
-	Outnamed  uint8
-
-	Method  *Type
-	Xmethod *Type
-
-	Sym    *Sym
-	Vargen int32 // unique name for OTYPE/ONAME
-
-	Nname  *Node
-	Argwid int64
-
-	// most nodes
-	Type  *Type // actual type for TFIELD, element type for TARRAY, TCHAN, TMAP, TPTRxx
-	Width int64 // offset in TFIELD, width in all others
-
-	// TFIELD
-	Down  *Type   // next struct field, also key type in TMAP
-	Outer *Type   // outer struct
-	Note  *string // literal string annotation
-
-	// TARRAY
-	Bound int64 // negative is dynamic array
-
-	// TMAP
-	Bucket *Type // internal type representing a hash bucket
-	Hmap   *Type // internal type representing a Hmap (map header object)
-	Hiter  *Type // internal type representing hash iterator state
-	Map    *Type // link from the above 3 internal types back to the map type.
-
-	Maplineno   int32 // first use of TFORW as map key
-	Embedlineno int32 // first use of TFORW as embedded type
-
-	// for TFORW, where to copy the eventual value to
-	Copyto *NodeList
-
-	Lastfn *Node // for usefield
-}
-
-type Label struct {
-	Used uint8
-	Sym  *Sym
-	Def  *Node
-	Use  *NodeList
-	Link *Label
-
-	// for use during gen
-	Gotopc   *obj.Prog // pointer to unresolved gotos
-	Labelpc  *obj.Prog // pointer to code
-	Breakpc  *obj.Prog // pointer to code
-	Continpc *obj.Prog // pointer to code
-}
-
-type InitEntry struct {
-	Xoffset int64 // struct, array only
-	Expr    *Node // bytes of run-time computed expressions
-}
-
-type InitPlan struct {
-	Lit  int64
-	Zero int64
-	Expr int64
-	E    []InitEntry
-}
-
-const (
-	SymExport   = 1 << 0 // to be exported
-	SymPackage  = 1 << 1
-	SymExported = 1 << 2 // already written out by export
-	SymUniq     = 1 << 3
-	SymSiggen   = 1 << 4
-	SymAsm      = 1 << 5
-	SymAlgGen   = 1 << 6
-)
-
-var dclstack *Sym
-
-type Iter struct {
-	Done  int
-	Tfunc *Type
-	T     *Type
-}
-
-const (
-	Txxx = iota
-
-	TINT8
-	TUINT8
-	TINT16
-	TUINT16
-	TINT32
-	TUINT32
-	TINT64
-	TUINT64
-	TINT
-	TUINT
-	TUINTPTR
-
-	TCOMPLEX64
-	TCOMPLEX128
-
-	TFLOAT32
-	TFLOAT64
-
-	TBOOL
-
-	TPTR32
-	TPTR64
-
-	TFUNC
-	TARRAY
-	T_old_DARRAY
-	TSTRUCT
-	TCHAN
-	TMAP
-	TINTER
-	TFORW
-	TFIELD
-	TANY
-	TSTRING
-	TUNSAFEPTR
-
-	// pseudo-types for literals
-	TIDEAL
-	TNIL
-	TBLANK
-
-	// pseudo-type for frame layout
-	TFUNCARGS
-	TCHANARGS
-	TINTERMETH
-
-	NTYPE
-)
-
-const (
-	CTxxx = iota
-
-	CTINT
-	CTRUNE
-	CTFLT
-	CTCPLX
-	CTSTR
-	CTBOOL
-	CTNIL
-)
-
-const (
-	/* types of channel */
-	/* must match ../../pkg/nreflect/type.go:/Chandir */
-	Cxxx  = 0
-	Crecv = 1 << 0
-	Csend = 1 << 1
-	Cboth = Crecv | Csend
-)
-
-// declaration context
-const (
-	Pxxx      = uint8(iota)
-	PEXTERN   // global variable
-	PAUTO     // local variables
-	PPARAM    // input arguments
-	PPARAMOUT // output results
-	PPARAMREF // closure variable reference
-	PFUNC     // global function
-
-	PDISCARD // discard during parse of duplicate import
-
-	PHEAP = uint8(1 << 7) // an extra bit to identify an escaped variable
-)
-
-const (
-	Etop      = 1 << 1 // evaluated at statement level
-	Erv       = 1 << 2 // evaluated in value context
-	Etype     = 1 << 3
-	Ecall     = 1 << 4  // call-only expressions are ok
-	Efnstruct = 1 << 5  // multivalue function returns are ok
-	Eiota     = 1 << 6  // iota is ok
-	Easgn     = 1 << 7  // assigning to expression
-	Eindir    = 1 << 8  // indirecting through expression
-	Eaddr     = 1 << 9  // taking address of expression
-	Eproc     = 1 << 10 // inside a go statement
-	Ecomplit  = 1 << 11 // type in composite literal
-)
-
-type Typedef struct {
-	Name   string
-	Etype  int
-	Sameas int
-}
-
-type Sig struct {
-	name   string
-	pkg    *Pkg
-	isym   *Sym
-	tsym   *Sym
-	type_  *Type
-	mtype  *Type
-	offset int32
-	link   *Sig
-}
-
-type Io struct {
-	infile     string
-	bin        *obj.Biobuf
-	nlsemi     int
-	eofnl      int
-	last       int
-	peekc      int
-	peekc1     int    // second peekc for ...
-	cp         string // used for content when bin==nil
-	importsafe bool
-}
-
-type Dlist struct {
-	field *Type
-}
-
-type Idir struct {
-	link *Idir
-	dir  string
-}
-
-/*
- * argument passing to/from
- * smagic and umagic
- */
-type Magic struct {
-	W   int // input for both - width
-	S   int // output for both - shift
-	Bad int // output for both - unexpected failure
-
-	// magic multiplier for signed literal divisors
-	Sd int64 // input - literal divisor
-	Sm int64 // output - multiplier
-
-	// magic multiplier for unsigned literal divisors
-	Ud uint64 // input - literal divisor
-	Um uint64 // output - multiplier
-	Ua int    // output - adder
-}
-
-/*
- * note this is the runtime representation
- * of the compilers arrays.
- *
- * typedef	struct
- * {				// must not move anything
- *	uchar	array[8];	// pointer to data
- *	uchar	nel[4];		// number of elements
- *	uchar	cap[4];		// allocated number of elements
- * } Array;
- */
-var Array_array int // runtime offsetof(Array,array) - same for String
-
-var Array_nel int // runtime offsetof(Array,nel) - same for String
-
-var Array_cap int // runtime offsetof(Array,cap)
-
-var sizeof_Array int // runtime sizeof(Array)
-
-/*
- * note this is the runtime representation
- * of the compilers strings.
- *
- * typedef	struct
- * {				// must not move anything
- *	uchar	array[8];	// pointer to data
- *	uchar	nel[4];		// number of elements
- * } String;
- */
-var sizeof_String int // runtime sizeof(String)
-
-var dotlist [10]Dlist // size is max depth of embeddeds
-
-var curio Io
-
-var pushedio Io
-
-var lexlineno int32
-
-var lineno int32
-
-var prevlineno int32
-
-var pragcgobuf string
-
-var infile string
-
-var outfile string
-
-var bout *obj.Biobuf
-
-var nerrors int
-
-var nsavederrors int
-
-var nsyntaxerrors int
-
-var decldepth int32
-
-var safemode int
-
-var nolocalimports int
-
-var lexbuf bytes.Buffer
-var strbuf bytes.Buffer
-
-var litbuf string
-
-var Debug [256]int
-
-var debugstr string
-
-var Debug_checknil int
-var Debug_typeassert int
-
-var importmyname *Sym // my name for package
-
-var localpkg *Pkg // package being compiled
-
-var importpkg *Pkg // package being imported
-
-var structpkg *Pkg // package that declared struct, during import
-
-var builtinpkg *Pkg // fake package for builtins
-
-var gostringpkg *Pkg // fake pkg for Go strings
-
-var itabpkg *Pkg // fake pkg for itab cache
-
-var Runtimepkg *Pkg // package runtime
-
-var racepkg *Pkg // package runtime/race
-
-var typepkg *Pkg // fake package for runtime type info (headers)
-
-var typelinkpkg *Pkg // fake package for runtime type info (data)
-
-var weaktypepkg *Pkg // weak references to runtime type info
-
-var unsafepkg *Pkg // package unsafe
-
-var trackpkg *Pkg // fake package for field tracking
-
-var Tptr int // either TPTR32 or TPTR64
-
-var myimportpath string
-
-var idirs *Idir
-
-var localimport string
-
-var asmhdr string
-
-var Types [NTYPE]*Type
-
-var idealstring *Type
-
-var idealbool *Type
-
-var bytetype *Type
-
-var runetype *Type
-
-var errortype *Type
-
-var Simtype [NTYPE]uint8
-
-var (
-	Isptr     [NTYPE]bool
-	isforw    [NTYPE]bool
-	Isint     [NTYPE]bool
-	Isfloat   [NTYPE]bool
-	Iscomplex [NTYPE]bool
-	Issigned  [NTYPE]bool
-	issimple  [NTYPE]bool
-)
-
-var (
-	okforeq    [NTYPE]bool
-	okforadd   [NTYPE]bool
-	okforand   [NTYPE]bool
-	okfornone  [NTYPE]bool
-	okforcmp   [NTYPE]bool
-	okforbool  [NTYPE]bool
-	okforcap   [NTYPE]bool
-	okforlen   [NTYPE]bool
-	okforarith [NTYPE]bool
-	okforconst [NTYPE]bool
-)
-
-var (
-	okfor [OEND][]bool
-	iscmp [OEND]bool
-)
-
-var Minintval [NTYPE]*Mpint
-
-var Maxintval [NTYPE]*Mpint
-
-var minfltval [NTYPE]*Mpflt
-
-var maxfltval [NTYPE]*Mpflt
-
-var xtop *NodeList
-
-var externdcl *NodeList
-
-var exportlist *NodeList
-
-var importlist *NodeList // imported functions and methods with inlinable bodies
-
-var funcsyms *NodeList
-
-var dclcontext uint8 // PEXTERN/PAUTO
-
-var incannedimport int
-
-var statuniqgen int // name generator for static temps
-
-var loophack int
-
-var iota_ int32
-
-var lastconst *NodeList
-
-var lasttype *Node
-
-var Maxarg int64
-
-var Stksize int64 // stack size for current frame
-
-var stkptrsize int64 // prefix of stack containing pointers
-
-var blockgen int32 // max block number
-
-var block int32 // current block number
-
-var Hasdefer int // flag that curfn has defer statetment
-
-var Curfn *Node
-
-var Widthptr int
-
-var Widthint int
-
-var Widthreg int
-
-var typesw *Node
-
-var nblank *Node
-
-var hunk string
-
-var nhunk int32
-
-var thunk int32
-
-var Funcdepth int32
-
-var typecheckok int
-
-var compiling_runtime int
-
-var compiling_wrappers int
-
-var use_writebarrier int
-
-var pure_go int
-
-var flag_installsuffix string
-
-var flag_race int
-
-var flag_largemodel int
-
-// Pending annotations for next func declaration.
-var (
-	noescape       bool
-	nosplit        bool
-	nowritebarrier bool
-	systemstack    bool
-	norace         bool
-)
-
-var debuglive int
-
-var Ctxt *obj.Link
-
-var nointerface bool
-
-var writearchive int
-
-var bstdout obj.Biobuf
-
-var Nacl bool
-
-var continpc *obj.Prog
-
-var breakpc *obj.Prog
-
-var Pc *obj.Prog
-
-var nodfp *Node
-
-var Disable_checknil int
-
-var zerosize int64
-
-type Flow struct {
-	Prog   *obj.Prog // actual instruction
-	P1     *Flow     // predecessors of this instruction: p1,
-	P2     *Flow     // and then p2 linked though p2link.
-	P2link *Flow
-	S1     *Flow // successors of this instruction (at most two: s1 and s2).
-	S2     *Flow
-	Link   *Flow // next instruction in function code
-
-	Active int32 // usable by client
-
-	Id     int32  // sequence number in flow graph
-	Rpo    int32  // reverse post ordering
-	Loop   uint16 // x5 for every loop
-	Refset uint8  // diagnostic generated
-
-	Data interface{} // for use by client
-}
-
-type Graph struct {
-	Start *Flow
-	Num   int
-
-	// After calling flowrpo, rpo lists the flow nodes in reverse postorder,
-	// and each non-dead Flow node f has g->rpo[f->rpo] == f.
-	Rpo []*Flow
-}
-
-/*
- *	interface to back end
- */
-
-const (
-	// Pseudo-op, like TEXT, GLOBL, TYPE, PCDATA, FUNCDATA.
-	Pseudo = 1 << 1
-
-	// There's nothing to say about the instruction,
-	// but it's still okay to see.
-	OK = 1 << 2
-
-	// Size of right-side write, or right-side read if no write.
-	SizeB = 1 << 3
-	SizeW = 1 << 4
-	SizeL = 1 << 5
-	SizeQ = 1 << 6
-	SizeF = 1 << 7
-	SizeD = 1 << 8
-
-	// Left side (Prog.from): address taken, read, write.
-	LeftAddr  = 1 << 9
-	LeftRead  = 1 << 10
-	LeftWrite = 1 << 11
-
-	// Register in middle (Prog.reg); only ever read. (arm, ppc64)
-	RegRead    = 1 << 12
-	CanRegRead = 1 << 13
-
-	// Right side (Prog.to): address taken, read, write.
-	RightAddr  = 1 << 14
-	RightRead  = 1 << 15
-	RightWrite = 1 << 16
-
-	// Instruction kinds
-	Move  = 1 << 17 // straight move
-	Conv  = 1 << 18 // size conversion
-	Cjmp  = 1 << 19 // conditional jump
-	Break = 1 << 20 // breaks control flow (no fallthrough)
-	Call  = 1 << 21 // function call
-	Jump  = 1 << 22 // jump
-	Skip  = 1 << 23 // data instruction
-
-	// Set, use, or kill of carry bit.
-	// Kill means we never look at the carry bit after this kind of instruction.
-	SetCarry  = 1 << 24
-	UseCarry  = 1 << 25
-	KillCarry = 1 << 26
-
-	// Special cases for register use. (amd64, 386)
-	ShiftCX  = 1 << 27 // possible shift by CX
-	ImulAXDX = 1 << 28 // possible multiply into DX:AX
-
-	// Instruction updates whichever of from/to is type D_OREG. (ppc64)
-	PostInc = 1 << 29
-)
-
-type Arch struct {
-	Thechar      int
-	Thestring    string
-	Thelinkarch  *obj.LinkArch
-	Typedefs     []Typedef
-	REGSP        int
-	REGCTXT      int
-	REGCALLX     int // BX
-	REGCALLX2    int // AX
-	REGRETURN    int // AX
-	REGMIN       int
-	REGMAX       int
-	REGZERO      int // architectural zero register, if available
-	FREGMIN      int
-	FREGMAX      int
-	MAXWIDTH     int64
-	ReservedRegs []int
-
-	AddIndex     func(*Node, int64, *Node) bool // optional
-	Betypeinit   func()
-	Bgen_float   func(*Node, bool, int, *obj.Prog) // optional
-	Cgen64       func(*Node, *Node)                // only on 32-bit systems
-	Cgenindex    func(*Node, *Node, bool) *obj.Prog
-	Cgen_bmul    func(int, *Node, *Node, *Node) bool
-	Cgen_float   func(*Node, *Node) // optional
-	Cgen_hmul    func(*Node, *Node, *Node)
-	Cgen_shift   func(int, bool, *Node, *Node, *Node)
-	Clearfat     func(*Node)
-	Cmp64        func(*Node, *Node, int, int, *obj.Prog) // only on 32-bit systems
-	Defframe     func(*obj.Prog)
-	Dodiv        func(int, *Node, *Node, *Node)
-	Excise       func(*Flow)
-	Expandchecks func(*obj.Prog)
-	Getg         func(*Node)
-	Gins         func(int, *Node, *Node) *obj.Prog
-
-	// Ginscmp generates code comparing n1 to n2 and jumping away if op is satisfied.
-	// The returned prog should be Patch'ed with the jump target.
-	// If op is not satisfied, code falls through to the next emitted instruction.
-	// Likely is the branch prediction hint: +1 for likely, -1 for unlikely, 0 for no opinion.
-	//
-	// Ginscmp must be able to handle all kinds of arguments for n1 and n2,
-	// not just simple registers, although it can assume that there are no
-	// function calls needed during the evaluation, and on 32-bit systems
-	// the values are guaranteed not to be 64-bit values, so no in-memory
-	// temporaries are necessary.
-	Ginscmp func(op int, t *Type, n1, n2 *Node, likely int) *obj.Prog
-
-	// Ginsboolval inserts instructions to convert the result
-	// of a just-completed comparison to a boolean value.
-	// The first argument is the conditional jump instruction
-	// corresponding to the desired value.
-	// The second argument is the destination.
-	// If not present, Ginsboolval will be emulated with jumps.
-	Ginsboolval func(int, *Node)
-
-	Ginscon      func(int, int64, *Node)
-	Ginsnop      func()
-	Gmove        func(*Node, *Node)
-	Igenindex    func(*Node, *Node, bool) *obj.Prog
-	Linkarchinit func()
-	Peep         func(*obj.Prog)
-	Proginfo     func(*obj.Prog) // fills in Prog.Info
-	Regtyp       func(*obj.Addr) bool
-	Sameaddr     func(*obj.Addr, *obj.Addr) bool
-	Smallindir   func(*obj.Addr, *obj.Addr) bool
-	Stackaddr    func(*obj.Addr) bool
-	Blockcopy    func(*Node, *Node, int64, int64, int64)
-	Sudoaddable  func(int, *Node, *obj.Addr) bool
-	Sudoclean    func()
-	Excludedregs func() uint64
-	RtoB         func(int) uint64
-	FtoB         func(int) uint64
-	BtoR         func(uint64) int
-	BtoF         func(uint64) int
-	Optoas       func(int, *Type) int
-	Doregbits    func(int) uint64
-	Regnames     func(*int) []string
-	Use387       bool // should 8g use 387 FP instructions instead of sse2.
-}
-
-var pcloc int32
-
-var Thearch Arch
-
-var Newproc *Node
-
-var Deferproc *Node
-
-var Deferreturn *Node
-
-var Panicindex *Node
-
-var panicslice *Node
-
-var throwreturn *Node
diff --git a/src/cmd/compile/internal/gc/go.y b/src/cmd/compile/internal/gc/go.y
deleted file mode 100644
index c6d1607..0000000
--- a/src/cmd/compile/internal/gc/go.y
+++ /dev/null
@@ -1,2316 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-/*
- * Go language grammar.
- *
- * The Go semicolon rules are:
- *
- *  1. all statements and declarations are terminated by semicolons.
- *  2. semicolons can be omitted before a closing ) or }.
- *  3. semicolons are inserted by the lexer before a newline
- *      following a specific list of tokens.
- *
- * Rules #1 and #2 are accomplished by writing the lists as
- * semicolon-separated lists with an optional trailing semicolon.
- * Rule #3 is implemented in yylex.
- */
-
-%{
-package gc
-
-import (
-	"fmt"
-	"strings"
-)
-%}
-%union	{
-	node *Node
-	list *NodeList
-	typ *Type
-	sym *Sym
-	val Val
-	i int
-}
-
-// |sed 's/.*	//' |9 fmt -l1 |sort |9 fmt -l50 | sed 's/^/%xxx		/'
-
-%token	<val>	LLITERAL
-%token	<i>	LASOP LCOLAS
-%token	<sym>	LBREAK LCASE LCHAN LCONST LCONTINUE LDDD
-%token	<sym>	LDEFAULT LDEFER LELSE LFALL LFOR LFUNC LGO LGOTO
-%token	<sym>	LIF LIMPORT LINTERFACE LMAP LNAME
-%token	<sym>	LPACKAGE LRANGE LRETURN LSELECT LSTRUCT LSWITCH
-%token	<sym>	LTYPE LVAR
-
-%token		LANDAND LANDNOT LBODY LCOMM LDEC LEQ LGE LGT
-%token		LIGNORE LINC LLE LLSH LLT LNE LOROR LRSH
-
-%type	<i>	lbrace import_here
-%type	<sym>	sym packname
-%type	<val>	oliteral
-
-%type	<node>	stmt ntype
-%type	<node>	arg_type
-%type	<node>	case caseblock
-%type	<node>	compound_stmt dotname embed expr complitexpr bare_complitexpr
-%type	<node>	expr_or_type
-%type	<node>	fndcl hidden_fndcl fnliteral
-%type	<node>	for_body for_header for_stmt if_header if_stmt non_dcl_stmt
-%type	<node>	interfacedcl keyval labelname name
-%type	<node>	name_or_type non_expr_type
-%type	<node>	new_name dcl_name oexpr typedclname
-%type	<node>	onew_name
-%type	<node>	osimple_stmt pexpr pexpr_no_paren
-%type	<node>	pseudocall range_stmt select_stmt
-%type	<node>	simple_stmt
-%type	<node>	switch_stmt uexpr
-%type	<node>	xfndcl typedcl start_complit
-
-%type	<list>	xdcl fnbody fnres loop_body dcl_name_list
-%type	<list>	new_name_list expr_list keyval_list braced_keyval_list expr_or_type_list xdcl_list
-%type	<list>	oexpr_list caseblock_list elseif elseif_list else stmt_list oarg_type_list_ocomma arg_type_list
-%type	<list>	interfacedcl_list vardcl vardcl_list structdcl structdcl_list
-%type	<list>	common_dcl constdcl constdcl1 constdcl_list typedcl_list
-
-%type	<node>	convtype comptype dotdotdot
-%type	<node>	indcl interfacetype structtype ptrtype
-%type	<node>	recvchantype non_recvchantype othertype fnret_type fntype
-
-%type	<sym>	hidden_importsym hidden_pkg_importsym
-
-%type	<node>	hidden_constant hidden_literal hidden_funarg
-%type	<node>	hidden_interfacedcl hidden_structdcl
-
-%type	<list>	hidden_funres
-%type	<list>	ohidden_funres
-%type	<list>	hidden_funarg_list ohidden_funarg_list
-%type	<list>	hidden_interfacedcl_list ohidden_interfacedcl_list
-%type	<list>	hidden_structdcl_list ohidden_structdcl_list
-
-%type	<typ>	hidden_type hidden_type_misc hidden_pkgtype
-%type	<typ>	hidden_type_func
-%type	<typ>	hidden_type_recv_chan hidden_type_non_recv_chan
-
-%left		LCOMM	/* outside the usual hierarchy; here for good error messages */
-
-%left		LOROR
-%left		LANDAND
-%left		LEQ LNE LLE LGE LLT LGT
-%left		'+' '-' '|' '^'
-%left		'*' '/' '%' '&' LLSH LRSH LANDNOT
-
-/*
- * manual override of shift/reduce conflicts.
- * the general form is that we assign a precedence
- * to the token being shifted and then introduce
- * NotToken with lower precedence or PreferToToken with higher
- * and annotate the reducing rule accordingly.
- */
-%left		NotPackage
-%left		LPACKAGE
-
-%left		NotParen
-%left		'('
-
-%left		')'
-%left		PreferToRightParen
-
-%error loadsys package LIMPORT '(' LLITERAL import_package import_there ',':
-	"unexpected comma during import block"
-
-%error loadsys package LIMPORT LNAME ';':
-	"missing import path; require quoted string"
-
-%error loadsys package imports LFUNC LNAME '(' ')' '{' LIF if_header ';':
-	"missing { after if clause"
-
-%error loadsys package imports LFUNC LNAME '(' ')' '{' LSWITCH if_header ';':
-	"missing { after switch clause"
-
-%error loadsys package imports LFUNC LNAME '(' ')' '{' LFOR for_header ';':
-	"missing { after for clause"
-
-%error loadsys package imports LFUNC LNAME '(' ')' '{' LFOR ';' LBODY:
-	"missing { after for clause"
-
-%error loadsys package imports LFUNC LNAME '(' ')' ';' '{':
-	"unexpected semicolon or newline before {"
-
-%error loadsys package imports LTYPE LNAME ';':
-	"unexpected semicolon or newline in type declaration"
-
-%error loadsys package imports LCHAN '}':
-	"unexpected } in channel type"
-
-%error loadsys package imports LCHAN ')':
-	"unexpected ) in channel type"
-
-%error loadsys package imports LCHAN ',':
-	"unexpected comma in channel type"
-
-%error loadsys package imports LFUNC LNAME '(' ')' '{' if_stmt ';' LELSE:
-	"unexpected semicolon or newline before else"
-
-%error loadsys package imports LTYPE LNAME LINTERFACE '{' LNAME ',' LNAME:
-	"name list not allowed in interface type"
-
-%error loadsys package imports LFUNC LNAME '(' ')' '{' LFOR LVAR LNAME '=' LNAME:
-	"var declaration not allowed in for initializer"
-
-%error loadsys package imports LVAR LNAME '[' ']' LNAME '{':
-	"unexpected { at end of statement"
-
-%error loadsys package imports LFUNC LNAME '(' ')' '{' LVAR LNAME '[' ']' LNAME '{':
-	"unexpected { at end of statement"
-
-%error loadsys package imports LFUNC LNAME '(' ')' '{' LDEFER LNAME ';':
-	"argument to go/defer must be function call"
-
-%error loadsys package imports LVAR LNAME '=' LNAME '{' LNAME ';':
-	"need trailing comma before newline in composite literal"
-
-%error loadsys package imports LVAR LNAME '=' comptype '{' LNAME ';':
-	"need trailing comma before newline in composite literal"
-
-%error loadsys package imports LFUNC LNAME '(' ')' '{' LFUNC LNAME:
-	"nested func not allowed"
-
-%error loadsys package imports LFUNC LNAME '(' ')' '{' LIF if_header loop_body LELSE ';':
-	"else must be followed by if or statement block"
-
-%%
-file:
-	loadsys
-	package
-	imports
-	xdcl_list
-	{
-		xtop = concat(xtop, $4);
-	}
-
-package:
-	%prec NotPackage
-	{
-		prevlineno = lineno;
-		Yyerror("package statement must be first");
-		errorexit();
-	}
-|	LPACKAGE sym ';'
-	{
-		mkpackage($2.Name);
-	}
-
-/*
- * this loads the definitions for the low-level runtime functions,
- * so that the compiler can generate calls to them,
- * but does not make the name "runtime" visible as a package.
- */
-loadsys:
-	{
-		importpkg = Runtimepkg;
-
-		if Debug['A'] != 0 {
-			cannedimports("runtime.Builtin", "package runtime\n\n$$\n\n");
-		} else {
-			cannedimports("runtime.Builtin", runtimeimport);
-		}
-		curio.importsafe = true
-	}
-	import_package
-	import_there
-	{
-		importpkg = nil;
-	}
-
-imports:
-|	imports import ';'
-
-import:
-	LIMPORT import_stmt
-|	LIMPORT '(' import_stmt_list osemi ')'
-|	LIMPORT '(' ')'
-
-import_stmt:
-	import_here import_package import_there
-	{
-		ipkg := importpkg;
-		my := importmyname;
-		importpkg = nil;
-		importmyname = nil;
-
-		if my == nil {
-			my = Lookup(ipkg.Name);
-		}
-
-		pack := Nod(OPACK, nil, nil);
-		pack.Sym = my;
-		pack.Name.Pkg = ipkg;
-		pack.Lineno = int32($1);
-
-		if strings.HasPrefix(my.Name, ".") {
-			importdot(ipkg, pack);
-			break;
-		}
-		if my.Name == "init" {
-			Yyerror("cannot import package as init - init must be a func");
-			break;
-		}
-		if my.Name == "_" {
-			break;
-		}
-		if my.Def != nil {
-			lineno = int32($1);
-			redeclare(my, "as imported package name");
-		}
-		my.Def = pack;
-		my.Lastlineno = int32($1);
-		my.Block = 1;	// at top level
-	}
-|	import_here import_there
-	{
-		// When an invalid import path is passed to importfile,
-		// it calls Yyerror and then sets up a fake import with
-		// no package statement. This allows us to test more
-		// than one invalid import statement in a single file.
-		if nerrors == 0 {
-			Fatal("phase error in import");
-		}
-	}
-
-import_stmt_list:
-	import_stmt
-|	import_stmt_list ';' import_stmt
-
-import_here:
-	LLITERAL
-	{
-		// import with original name
-		$$ = parserline();
-		importmyname = nil;
-		importfile(&$1, $$);
-	}
-|	sym LLITERAL
-	{
-		// import with given name
-		$$ = parserline();
-		importmyname = $1;
-		importfile(&$2, $$);
-	}
-|	'.' LLITERAL
-	{
-		// import into my name space
-		$$ = parserline();
-		importmyname = Lookup(".");
-		importfile(&$2, $$);
-	}
-
-import_package:
-	LPACKAGE LNAME import_safety ';'
-	{
-		if importpkg.Name == "" {
-			importpkg.Name = $2.Name;
-			numImport[$2.Name]++
-		} else if importpkg.Name != $2.Name {
-			Yyerror("conflicting names %s and %s for package %q", importpkg.Name, $2.Name, importpkg.Path);
-		}
-		importpkg.Direct = 1;
-		importpkg.Safe = curio.importsafe
-
-		if safemode != 0 && !curio.importsafe {
-			Yyerror("cannot import unsafe package %q", importpkg.Path);
-		}
-	}
-
-import_safety:
-|	LNAME
-	{
-		if $1.Name == "safe" {
-			curio.importsafe = true
-		}
-	}
-
-import_there:
-	{
-		defercheckwidth();
-	}
-	hidden_import_list '$' '$'
-	{
-		resumecheckwidth();
-		unimportfile();
-	}
-
-/*
- * declarations
- */
-xdcl:
-	{
-		Yyerror("empty top-level declaration");
-		$$ = nil;
-	}
-|	common_dcl
-|	xfndcl
-	{
-		$$ = list1($1);
-	}
-|	non_dcl_stmt
-	{
-		Yyerror("non-declaration statement outside function body");
-		$$ = nil;
-	}
-|	error
-	{
-		$$ = nil;
-	}
-
-common_dcl:
-	LVAR vardcl
-	{
-		$$ = $2;
-	}
-|	LVAR '(' vardcl_list osemi ')'
-	{
-		$$ = $3;
-	}
-|	LVAR '(' ')'
-	{
-		$$ = nil;
-	}
-|	lconst constdcl
-	{
-		$$ = $2;
-		iota_ = -100000;
-		lastconst = nil;
-	}
-|	lconst '(' constdcl osemi ')'
-	{
-		$$ = $3;
-		iota_ = -100000;
-		lastconst = nil;
-	}
-|	lconst '(' constdcl ';' constdcl_list osemi ')'
-	{
-		$$ = concat($3, $5);
-		iota_ = -100000;
-		lastconst = nil;
-	}
-|	lconst '(' ')'
-	{
-		$$ = nil;
-		iota_ = -100000;
-	}
-|	LTYPE typedcl
-	{
-		$$ = list1($2);
-	}
-|	LTYPE '(' typedcl_list osemi ')'
-	{
-		$$ = $3;
-	}
-|	LTYPE '(' ')'
-	{
-		$$ = nil;
-	}
-
-lconst:
-	LCONST
-	{
-		iota_ = 0;
-	}
-
-vardcl:
-	dcl_name_list ntype
-	{
-		$$ = variter($1, $2, nil);
-	}
-|	dcl_name_list ntype '=' expr_list
-	{
-		$$ = variter($1, $2, $4);
-	}
-|	dcl_name_list '=' expr_list
-	{
-		$$ = variter($1, nil, $3);
-	}
-
-constdcl:
-	dcl_name_list ntype '=' expr_list
-	{
-		$$ = constiter($1, $2, $4);
-	}
-|	dcl_name_list '=' expr_list
-	{
-		$$ = constiter($1, nil, $3);
-	}
-
-constdcl1:
-	constdcl
-|	dcl_name_list ntype
-	{
-		$$ = constiter($1, $2, nil);
-	}
-|	dcl_name_list
-	{
-		$$ = constiter($1, nil, nil);
-	}
-
-typedclname:
-	sym
-	{
-		// different from dclname because the name
-		// becomes visible right here, not at the end
-		// of the declaration.
-		$$ = typedcl0($1);
-	}
-
-typedcl:
-	typedclname ntype
-	{
-		$$ = typedcl1($1, $2, true);
-	}
-
-simple_stmt:
-	expr
-	{
-		$$ = $1;
-
-		// These nodes do not carry line numbers.
-		// Since a bare name used as an expression is an error,
-		// introduce a wrapper node to give the correct line.
-		switch($$.Op) {
-		case ONAME, ONONAME, OTYPE, OPACK, OLITERAL:
-			$$ = Nod(OPAREN, $$, nil);
-			$$.Implicit = true;
-			break;
-		}
-	}
-|	expr LASOP expr
-	{
-		$$ = Nod(OASOP, $1, $3);
-		$$.Etype = uint8($2);			// rathole to pass opcode
-	}
-|	expr_list '=' expr_list
-	{
-		if $1.Next == nil && $3.Next == nil {
-			// simple
-			$$ = Nod(OAS, $1.N, $3.N);
-			break;
-		}
-		// multiple
-		$$ = Nod(OAS2, nil, nil);
-		$$.List = $1;
-		$$.Rlist = $3;
-	}
-|	expr_list LCOLAS expr_list
-	{
-		if $3.N.Op == OTYPESW {
-			$$ = Nod(OTYPESW, nil, $3.N.Right);
-			if $3.Next != nil {
-				Yyerror("expr.(type) must be alone in list");
-			}
-			if $1.Next != nil {
-				Yyerror("argument count mismatch: %d = %d", count($1), 1);
-			} else if ($1.N.Op != ONAME && $1.N.Op != OTYPE && $1.N.Op != ONONAME) || isblank($1.N) {
-				Yyerror("invalid variable name %s in type switch", $1.N);
-			} else {
-				$$.Left = dclname($1.N.Sym);
-			}  // it's a colas, so must not re-use an oldname.
-			break;
-		}
-		$$ = colas($1, $3, int32($2));
-	}
-|	expr LINC
-	{
-		$$ = Nod(OASOP, $1, Nodintconst(1));
-		$$.Implicit = true;
-		$$.Etype = OADD;
-	}
-|	expr LDEC
-	{
-		$$ = Nod(OASOP, $1, Nodintconst(1));
-		$$.Implicit = true;
-		$$.Etype = OSUB;
-	}
-
-case:
-	LCASE expr_or_type_list ':'
-	{
-		var n, nn *Node
-
-		// will be converted to OCASE
-		// right will point to next case
-		// done in casebody()
-		markdcl();
-		$$ = Nod(OXCASE, nil, nil);
-		$$.List = $2;
-		if typesw != nil && typesw.Right != nil {
-			n = typesw.Right.Left
-			if n != nil {
-				// type switch - declare variable
-				nn = newname(n.Sym);
-				declare(nn, dclcontext);
-				$$.Rlist = list1(nn);
-	
-				// keep track of the instances for reporting unused
-				nn.Name.Defn = typesw.Right;
-			}
-		}
-	}
-|	LCASE expr_or_type_list '=' expr ':'
-	{
-		var n *Node
-
-		// will be converted to OCASE
-		// right will point to next case
-		// done in casebody()
-		markdcl();
-		$$ = Nod(OXCASE, nil, nil);
-		if $2.Next == nil {
-			n = Nod(OAS, $2.N, $4);
-		} else {
-			n = Nod(OAS2, nil, nil);
-			n.List = $2;
-			n.Rlist = list1($4);
-		}
-		$$.List = list1(n);
-	}
-|	LCASE expr_or_type_list LCOLAS expr ':'
-	{
-		// will be converted to OCASE
-		// right will point to next case
-		// done in casebody()
-		markdcl();
-		$$ = Nod(OXCASE, nil, nil);
-		$$.List = list1(colas($2, list1($4), int32($3)));
-	}
-|	LDEFAULT ':'
-	{
-		var n, nn *Node
-
-		markdcl();
-		$$ = Nod(OXCASE, nil, nil);
-		if typesw != nil && typesw.Right != nil {
-			n = typesw.Right.Left
-			if n != nil {
-				// type switch - declare variable
-				nn = newname(n.Sym);
-				declare(nn, dclcontext);
-				$$.Rlist = list1(nn);
-	
-				// keep track of the instances for reporting unused
-				nn.Name.Defn = typesw.Right;
-			}
-		}
-	}
-
-compound_stmt:
-	'{'
-	{
-		markdcl();
-	}
-	stmt_list '}'
-	{
-		if $3 == nil {
-			$$ = Nod(OEMPTY, nil, nil);
-		} else {
-			$$ = liststmt($3);
-		}
-		popdcl();
-	}
-
-caseblock:
-	case
-	{
-		// If the last token read by the lexer was consumed
-		// as part of the case, clear it (parser has cleared yychar).
-		// If the last token read by the lexer was the lookahead
-		// leave it alone (parser has it cached in yychar).
-		// This is so that the stmt_list action doesn't look at
-		// the case tokens if the stmt_list is empty.
-		yylast = yychar;
-		$1.Xoffset = int64(block);
-	}
-	stmt_list
-	{
-		// This is the only place in the language where a statement
-		// list is not allowed to drop the final semicolon, because
-		// it's the only place where a statement list is not followed 
-		// by a closing brace.  Handle the error for pedantry.
-
-		// Find the final token of the statement list.
-		// yylast is lookahead; yyprev is last of stmt_list
-		last := yyprev;
-
-		if last > 0 && last != ';' && yychar != '}' {
-			Yyerror("missing statement after label");
-		}
-		$$ = $1;
-		$$.Nbody = $3;
-		popdcl();
-	}
-
-caseblock_list:
-	{
-		$$ = nil;
-	}
-|	caseblock_list caseblock
-	{
-		$$ = list($1, $2);
-	}
-
-loop_body:
-	LBODY
-	{
-		markdcl();
-	}
-	stmt_list '}'
-	{
-		$$ = $3;
-		popdcl();
-	}
-
-range_stmt:
-	expr_list '=' LRANGE expr
-	{
-		$$ = Nod(ORANGE, nil, $4);
-		$$.List = $1;
-		$$.Etype = 0;	// := flag
-	}
-|	expr_list LCOLAS LRANGE expr
-	{
-		$$ = Nod(ORANGE, nil, $4);
-		$$.List = $1;
-		$$.Colas = true;
-		colasdefn($1, $$);
-	}
-|	LRANGE expr
-	{
-		$$ = Nod(ORANGE, nil, $2);
-		$$.Etype = 0; // := flag
-	}
-
-for_header:
-	osimple_stmt ';' osimple_stmt ';' osimple_stmt
-	{
-		// init ; test ; incr
-		if $5 != nil && $5.Colas {
-			Yyerror("cannot declare in the for-increment");
-		}
-		$$ = Nod(OFOR, nil, nil);
-		if $1 != nil {
-			$$.Ninit = list1($1);
-		}
-		$$.Left = $3;
-		$$.Right = $5;
-	}
-|	osimple_stmt
-	{
-		// normal test
-		$$ = Nod(OFOR, nil, nil);
-		$$.Left = $1;
-	}
-|	range_stmt
-
-for_body:
-	for_header loop_body
-	{
-		$$ = $1;
-		$$.Nbody = concat($$.Nbody, $2);
-	}
-
-for_stmt:
-	LFOR
-	{
-		markdcl();
-	}
-	for_body
-	{
-		$$ = $3;
-		popdcl();
-	}
-
-if_header:
-	osimple_stmt
-	{
-		// test
-		$$ = Nod(OIF, nil, nil);
-		$$.Left = $1;
-	}
-|	osimple_stmt ';' osimple_stmt
-	{
-		// init ; test
-		$$ = Nod(OIF, nil, nil);
-		if $1 != nil {
-			$$.Ninit = list1($1);
-		}
-		$$.Left = $3;
-	}
-
-/* IF cond body (ELSE IF cond body)* (ELSE block)? */
-if_stmt:
-	LIF
-	{
-		markdcl();
-	}
-	if_header
-	{
-		if $3.Left == nil {
-			Yyerror("missing condition in if statement");
-		}
-	}
-	loop_body
-	{
-		$3.Nbody = $5;
-	}
-	elseif_list else
-	{
-		var n *Node
-		var nn *NodeList
-
-		$$ = $3;
-		n = $3;
-		popdcl();
-		for nn = concat($7, $8); nn != nil; nn = nn.Next {
-			if nn.N.Op == OIF {
-				popdcl();
-			}
-			n.Rlist = list1(nn.N);
-			n = nn.N;
-		}
-	}
-
-elseif:
-	LELSE LIF 
-	{
-		markdcl();
-	}
-	if_header loop_body
-	{
-		if $4.Left == nil {
-			Yyerror("missing condition in if statement");
-		}
-		$4.Nbody = $5;
-		$$ = list1($4);
-	}
-
-elseif_list:
-	{
-		$$ = nil;
-	}
-|	elseif_list elseif
-	{
-		$$ = concat($1, $2);
-	}
-
-else:
-	{
-		$$ = nil;
-	}
-|	LELSE compound_stmt
-	{
-		l := &NodeList{N: $2}
-		l.End = l
-		$$ = l;
-	}
-
-switch_stmt:
-	LSWITCH
-	{
-		markdcl();
-	}
-	if_header
-	{
-		var n *Node
-		n = $3.Left;
-		if n != nil && n.Op != OTYPESW {
-			n = nil;
-		}
-		typesw = Nod(OXXX, typesw, n);
-	}
-	LBODY caseblock_list '}'
-	{
-		$$ = $3;
-		$$.Op = OSWITCH;
-		$$.List = $6;
-		typesw = typesw.Left;
-		popdcl();
-	}
-
-select_stmt:
-	LSELECT
-	{
-		typesw = Nod(OXXX, typesw, nil);
-	}
-	LBODY caseblock_list '}'
-	{
-		$$ = Nod(OSELECT, nil, nil);
-		$$.Lineno = typesw.Lineno;
-		$$.List = $4;
-		typesw = typesw.Left;
-	}
-
-/*
- * expressions
- */
-expr:
-	uexpr
-|	expr LOROR expr
-	{
-		$$ = Nod(OOROR, $1, $3);
-	}
-|	expr LANDAND expr
-	{
-		$$ = Nod(OANDAND, $1, $3);
-	}
-|	expr LEQ expr
-	{
-		$$ = Nod(OEQ, $1, $3);
-	}
-|	expr LNE expr
-	{
-		$$ = Nod(ONE, $1, $3);
-	}
-|	expr LLT expr
-	{
-		$$ = Nod(OLT, $1, $3);
-	}
-|	expr LLE expr
-	{
-		$$ = Nod(OLE, $1, $3);
-	}
-|	expr LGE expr
-	{
-		$$ = Nod(OGE, $1, $3);
-	}
-|	expr LGT expr
-	{
-		$$ = Nod(OGT, $1, $3);
-	}
-|	expr '+' expr
-	{
-		$$ = Nod(OADD, $1, $3);
-	}
-|	expr '-' expr
-	{
-		$$ = Nod(OSUB, $1, $3);
-	}
-|	expr '|' expr
-	{
-		$$ = Nod(OOR, $1, $3);
-	}
-|	expr '^' expr
-	{
-		$$ = Nod(OXOR, $1, $3);
-	}
-|	expr '*' expr
-	{
-		$$ = Nod(OMUL, $1, $3);
-	}
-|	expr '/' expr
-	{
-		$$ = Nod(ODIV, $1, $3);
-	}
-|	expr '%' expr
-	{
-		$$ = Nod(OMOD, $1, $3);
-	}
-|	expr '&' expr
-	{
-		$$ = Nod(OAND, $1, $3);
-	}
-|	expr LANDNOT expr
-	{
-		$$ = Nod(OANDNOT, $1, $3);
-	}
-|	expr LLSH expr
-	{
-		$$ = Nod(OLSH, $1, $3);
-	}
-|	expr LRSH expr
-	{
-		$$ = Nod(ORSH, $1, $3);
-	}
-	/* not an expression anymore, but left in so we can give a good error */
-|	expr LCOMM expr
-	{
-		$$ = Nod(OSEND, $1, $3);
-	}
-
-uexpr:
-	pexpr
-|	'*' uexpr
-	{
-		$$ = Nod(OIND, $2, nil);
-	}
-|	'&' uexpr
-	{
-		if $2.Op == OCOMPLIT {
-			// Special case for &T{...}: turn into (*T){...}.
-			$$ = $2;
-			$$.Right = Nod(OIND, $$.Right, nil);
-			$$.Right.Implicit = true;
-		} else {
-			$$ = Nod(OADDR, $2, nil);
-		}
-	}
-|	'+' uexpr
-	{
-		$$ = Nod(OPLUS, $2, nil);
-	}
-|	'-' uexpr
-	{
-		$$ = Nod(OMINUS, $2, nil);
-	}
-|	'!' uexpr
-	{
-		$$ = Nod(ONOT, $2, nil);
-	}
-|	'~' uexpr
-	{
-		Yyerror("the bitwise complement operator is ^");
-		$$ = Nod(OCOM, $2, nil);
-	}
-|	'^' uexpr
-	{
-		$$ = Nod(OCOM, $2, nil);
-	}
-|	LCOMM uexpr
-	{
-		$$ = Nod(ORECV, $2, nil);
-	}
-
-/*
- * call-like statements that
- * can be preceded by 'defer' and 'go'
- */
-pseudocall:
-	pexpr '(' ')'
-	{
-		$$ = Nod(OCALL, $1, nil);
-	}
-|	pexpr '(' expr_or_type_list ocomma ')'
-	{
-		$$ = Nod(OCALL, $1, nil);
-		$$.List = $3;
-	}
-|	pexpr '(' expr_or_type_list LDDD ocomma ')'
-	{
-		$$ = Nod(OCALL, $1, nil);
-		$$.List = $3;
-		$$.Isddd = true;
-	}
-
-pexpr_no_paren:
-	LLITERAL
-	{
-		$$ = nodlit($1);
-	}
-|	name
-|	pexpr '.' sym
-	{
-		if $1.Op == OPACK {
-			var s *Sym
-			s = restrictlookup($3.Name, $1.Name.Pkg);
-			$1.Used = true;
-			$$ = oldname(s);
-			break;
-		}
-		$$ = Nod(OXDOT, $1, newname($3));
-	}
-|	pexpr '.' '(' expr_or_type ')'
-	{
-		$$ = Nod(ODOTTYPE, $1, $4);
-	}
-|	pexpr '.' '(' LTYPE ')'
-	{
-		$$ = Nod(OTYPESW, nil, $1);
-	}
-|	pexpr '[' expr ']'
-	{
-		$$ = Nod(OINDEX, $1, $3);
-	}
-|	pexpr '[' oexpr ':' oexpr ']'
-	{
-		$$ = Nod(OSLICE, $1, Nod(OKEY, $3, $5));
-	}
-|	pexpr '[' oexpr ':' oexpr ':' oexpr ']'
-	{
-		if $5 == nil {
-			Yyerror("middle index required in 3-index slice");
-		}
-		if $7 == nil {
-			Yyerror("final index required in 3-index slice");
-		}
-		$$ = Nod(OSLICE3, $1, Nod(OKEY, $3, Nod(OKEY, $5, $7)));
-	}
-|	pseudocall
-|	convtype '(' expr ocomma ')'
-	{
-		// conversion
-		$$ = Nod(OCALL, $1, nil);
-		$$.List = list1($3);
-	}
-|	comptype lbrace start_complit braced_keyval_list '}'
-	{
-		$$ = $3;
-		$$.Right = $1;
-		$$.List = $4;
-		fixlbrace($2);
-	}
-|	pexpr_no_paren '{' start_complit braced_keyval_list '}'
-	{
-		$$ = $3;
-		$$.Right = $1;
-		$$.List = $4;
-	}
-|	'(' expr_or_type ')' '{' start_complit braced_keyval_list '}'
-	{
-		Yyerror("cannot parenthesize type in composite literal");
-		$$ = $5;
-		$$.Right = $2;
-		$$.List = $6;
-	}
-|	fnliteral
-
-start_complit:
-	{
-		// composite expression.
-		// make node early so we get the right line number.
-		$$ = Nod(OCOMPLIT, nil, nil);
-	}
-
-keyval:
-	complitexpr ':' complitexpr
-	{
-		$$ = Nod(OKEY, $1, $3);
-	}
-
-bare_complitexpr:
-	expr
-	{
-		// These nodes do not carry line numbers.
-		// Since a composite literal commonly spans several lines,
-		// the line number on errors may be misleading.
-		// Introduce a wrapper node to give the correct line.
-		$$ = $1;
-		switch($$.Op) {
-		case ONAME, ONONAME, OTYPE, OPACK, OLITERAL:
-			$$ = Nod(OPAREN, $$, nil);
-			$$.Implicit = true;
-		}
-	}
-|	'{' start_complit braced_keyval_list '}'
-	{
-		$$ = $2;
-		$$.List = $3;
-	}
-
-complitexpr:
-	expr
-|	'{' start_complit braced_keyval_list '}'
-	{
-		$$ = $2;
-		$$.List = $3;
-	}
-
-pexpr:
-	pexpr_no_paren
-|	'(' expr_or_type ')'
-	{
-		$$ = $2;
-		
-		// Need to know on lhs of := whether there are ( ).
-		// Don't bother with the OPAREN in other cases:
-		// it's just a waste of memory and time.
-		switch($$.Op) {
-		case ONAME, ONONAME, OPACK, OTYPE, OLITERAL, OTYPESW:
-			$$ = Nod(OPAREN, $$, nil);
-		}
-	}
-
-expr_or_type:
-	expr
-|	non_expr_type	%prec PreferToRightParen
-
-name_or_type:
-	ntype
-
-lbrace:
-	LBODY
-	{
-		$$ = LBODY;
-	}
-|	'{'
-	{
-		$$ = '{';
-	}
-
-/*
- * names and types
- *	newname is used before declared
- *	oldname is used after declared
- */
-new_name:
-	sym
-	{
-		if $1 == nil {
-			$$ = nil;
-		} else {
-			$$ = newname($1);
-		}
-	}
-
-dcl_name:
-	sym
-	{
-		$$ = dclname($1);
-	}
-
-onew_name:
-	{
-		$$ = nil;
-	}
-|	new_name
-
-sym:
-	LNAME
-	{
-		$$ = $1;
-		// during imports, unqualified non-exported identifiers are from builtinpkg
-		if importpkg != nil && !exportname($1.Name) {
-			$$ = Pkglookup($1.Name, builtinpkg);
-		}
-	}
-|	hidden_importsym
-|	'?'
-	{
-		$$ = nil;
-	}
-
-hidden_importsym:
-	'@' LLITERAL '.' LNAME
-	{
-		var p *Pkg
-
-		if $2.U.(string) == "" {
-			p = importpkg;
-		} else {
-			if isbadimport($2.U.(string)) {
-				errorexit();
-			}
-			p = mkpkg($2.U.(string));
-		}
-		$$ = Pkglookup($4.Name, p);
-	}
-|	'@' LLITERAL '.' '?'
-	{
-		var p *Pkg
-
-		if $2.U.(string) == "" {
-			p = importpkg;
-		} else {
-			if isbadimport($2.U.(string)) {
-				errorexit();
-			}
-			p = mkpkg($2.U.(string));
-		}
-		$$ = Pkglookup("?", p);
-	}
-
-name:
-	sym	%prec NotParen
-	{
-		$$ = oldname($1);
-		if $$.Name != nil && $$.Name.Pack != nil {
-			$$.Name.Pack.Used = true;
-		}
-	}
-
-labelname:
-	new_name
-
-/*
- * to avoid parsing conflicts, type is split into
- *	channel types
- *	function types
- *	parenthesized types
- *	any other type
- * the type system makes additional restrictions,
- * but those are not implemented in the grammar.
- */
-dotdotdot:
-	LDDD
-	{
-		Yyerror("final argument in variadic function missing type");
-		$$ = Nod(ODDD, typenod(typ(TINTER)), nil);
-	}
-|	LDDD ntype
-	{
-		$$ = Nod(ODDD, $2, nil);
-	}
-
-ntype:
-	recvchantype
-|	fntype
-|	othertype
-|	ptrtype
-|	dotname
-|	'(' ntype ')'
-	{
-		$$ = $2;
-	}
-
-non_expr_type:
-	recvchantype
-|	fntype
-|	othertype
-|	'*' non_expr_type
-	{
-		$$ = Nod(OIND, $2, nil);
-	}
-
-non_recvchantype:
-	fntype
-|	othertype
-|	ptrtype
-|	dotname
-|	'(' ntype ')'
-	{
-		$$ = $2;
-	}
-
-convtype:
-	fntype
-|	othertype
-
-comptype:
-	othertype
-
-fnret_type:
-	recvchantype
-|	fntype
-|	othertype
-|	ptrtype
-|	dotname
-
-dotname:
-	name
-|	name '.' sym
-	{
-		if $1.Op == OPACK {
-			var s *Sym
-			s = restrictlookup($3.Name, $1.Name.Pkg);
-			$1.Used = true;
-			$$ = oldname(s);
-			break;
-		}
-		$$ = Nod(OXDOT, $1, newname($3));
-	}
-
-othertype:
-	'[' oexpr ']' ntype
-	{
-		$$ = Nod(OTARRAY, $2, $4);
-	}
-|	'[' LDDD ']' ntype
-	{
-		// array literal of nelem
-		$$ = Nod(OTARRAY, Nod(ODDD, nil, nil), $4);
-	}
-|	LCHAN non_recvchantype
-	{
-		$$ = Nod(OTCHAN, $2, nil);
-		$$.Etype = Cboth;
-	}
-|	LCHAN LCOMM ntype
-	{
-		$$ = Nod(OTCHAN, $3, nil);
-		$$.Etype = Csend;
-	}
-|	LMAP '[' ntype ']' ntype
-	{
-		$$ = Nod(OTMAP, $3, $5);
-	}
-|	structtype
-|	interfacetype
-
-ptrtype:
-	'*' ntype
-	{
-		$$ = Nod(OIND, $2, nil);
-	}
-
-recvchantype:
-	LCOMM LCHAN ntype
-	{
-		$$ = Nod(OTCHAN, $3, nil);
-		$$.Etype = Crecv;
-	}
-
-structtype:
-	LSTRUCT lbrace structdcl_list osemi '}'
-	{
-		$$ = Nod(OTSTRUCT, nil, nil);
-		$$.List = $3;
-		fixlbrace($2);
-	}
-|	LSTRUCT lbrace '}'
-	{
-		$$ = Nod(OTSTRUCT, nil, nil);
-		fixlbrace($2);
-	}
-
-interfacetype:
-	LINTERFACE lbrace interfacedcl_list osemi '}'
-	{
-		$$ = Nod(OTINTER, nil, nil);
-		$$.List = $3;
-		fixlbrace($2);
-	}
-|	LINTERFACE lbrace '}'
-	{
-		$$ = Nod(OTINTER, nil, nil);
-		fixlbrace($2);
-	}
-
-/*
- * function stuff
- * all in one place to show how crappy it all is
- */
-xfndcl:
-	LFUNC fndcl fnbody
-	{
-		$$ = $2;
-		if $$ == nil {
-			break;
-		}
-		if noescape && $3 != nil {
-			Yyerror("can only use //go:noescape with external func implementations");
-		}
-		$$.Nbody = $3;
-		$$.Func.Endlineno = lineno;
-		$$.Noescape = noescape;
-		$$.Func.Norace = norace;
-		$$.Func.Nosplit = nosplit;
-		$$.Func.Nowritebarrier = nowritebarrier;
-		$$.Func.Systemstack = systemstack;
-		funcbody($$);
-	}
-
-fndcl:
-	sym '(' oarg_type_list_ocomma ')' fnres
-	{
-		var t *Node
-
-		$$ = nil;
-		$3 = checkarglist($3, 1);
-
-		if $1.Name == "init" {
-			$1 = renameinit();
-			if $3 != nil || $5 != nil {
-				Yyerror("func init must have no arguments and no return values");
-			}
-		}
-		if localpkg.Name == "main" && $1.Name == "main" {
-			if $3 != nil || $5 != nil {
-				Yyerror("func main must have no arguments and no return values");
-			}
-		}
-
-		t = Nod(OTFUNC, nil, nil);
-		t.List = $3;
-		t.Rlist = $5;
-
-		$$ = Nod(ODCLFUNC, nil, nil);
-		$$.Func.Nname = newfuncname($1);
-		$$.Func.Nname.Name.Defn = $$;
-		$$.Func.Nname.Name.Param.Ntype = t;		// TODO: check if nname already has an ntype
-		declare($$.Func.Nname, PFUNC);
-
-		funchdr($$);
-	}
-|	'(' oarg_type_list_ocomma ')' sym '(' oarg_type_list_ocomma ')' fnres
-	{
-		var rcvr, t *Node
-
-		$$ = nil;
-		$2 = checkarglist($2, 0);
-		$6 = checkarglist($6, 1);
-
-		if $2 == nil {
-			Yyerror("method has no receiver");
-			break;
-		}
-		if $2.Next != nil {
-			Yyerror("method has multiple receivers");
-			break;
-		}
-		rcvr = $2.N;
-		if rcvr.Op != ODCLFIELD {
-			Yyerror("bad receiver in method");
-			break;
-		}
-
-		t = Nod(OTFUNC, rcvr, nil);
-		t.List = $6;
-		t.Rlist = $8;
-
-		$$ = Nod(ODCLFUNC, nil, nil);
-		$$.Func.Shortname = newfuncname($4);
-		$$.Func.Nname = methodname1($$.Func.Shortname, rcvr.Right);
-		$$.Func.Nname.Name.Defn = $$;
-		$$.Func.Nname.Name.Param.Ntype = t;
-		$$.Func.Nname.Nointerface = nointerface;
-		declare($$.Func.Nname, PFUNC);
-
-		funchdr($$);
-	}
-
-hidden_fndcl:
-	hidden_pkg_importsym '(' ohidden_funarg_list ')' ohidden_funres
-	{
-		var s *Sym
-		var t *Type
-
-		$$ = nil;
-
-		s = $1;
-		t = functype(nil, $3, $5);
-
-		importsym(s, ONAME);
-		if s.Def != nil && s.Def.Op == ONAME {
-			if Eqtype(t, s.Def.Type) {
-				dclcontext = PDISCARD;  // since we skip funchdr below
-				break;
-			}
-			Yyerror("inconsistent definition for func %v during import\n\t%v\n\t%v", s, s.Def.Type, t);
-		}
-
-		$$ = newfuncname(s);
-		$$.Type = t;
-		declare($$, PFUNC);
-
-		funchdr($$);
-	}
-|	'(' hidden_funarg_list ')' sym '(' ohidden_funarg_list ')' ohidden_funres
-	{
-		$$ = methodname1(newname($4), $2.N.Right); 
-		$$.Type = functype($2.N, $6, $8);
-
-		checkwidth($$.Type);
-		addmethod($4, $$.Type, false, nointerface);
-		nointerface = false
-		funchdr($$);
-		
-		// inl.C's inlnode in on a dotmeth node expects to find the inlineable body as
-		// (dotmeth's type).Nname.Inl, and dotmeth's type has been pulled
-		// out by typecheck's lookdot as this $$.ttype.  So by providing
-		// this back link here we avoid special casing there.
-		$$.Type.Nname = $$;
-	}
-
-fntype:
-	LFUNC '(' oarg_type_list_ocomma ')' fnres
-	{
-		$3 = checkarglist($3, 1);
-		$$ = Nod(OTFUNC, nil, nil);
-		$$.List = $3;
-		$$.Rlist = $5;
-	}
-
-fnbody:
-	{
-		$$ = nil;
-	}
-|	'{' stmt_list '}'
-	{
-		$$ = $2;
-		if $$ == nil {
-			$$ = list1(Nod(OEMPTY, nil, nil));
-		}
-	}
-
-fnres:
-	%prec NotParen
-	{
-		$$ = nil;
-	}
-|	fnret_type
-	{
-		$$ = list1(Nod(ODCLFIELD, nil, $1));
-	}
-|	'(' oarg_type_list_ocomma ')'
-	{
-		$2 = checkarglist($2, 0);
-		$$ = $2;
-	}
-
-fnlitdcl:
-	fntype
-	{
-		closurehdr($1);
-	}
-
-fnliteral:
-	fnlitdcl lbrace stmt_list '}'
-	{
-		$$ = closurebody($3);
-		fixlbrace($2);
-	}
-|	fnlitdcl error
-	{
-		$$ = closurebody(nil);
-	}
-
-/*
- * lists of things
- * note that they are left recursive
- * to conserve yacc stack. they need to
- * be reversed to interpret correctly
- */
-xdcl_list:
-	{
-		$$ = nil;
-	}
-|	xdcl_list xdcl ';'
-	{
-		$$ = concat($1, $2);
-		if nsyntaxerrors == 0 {
-			testdclstack();
-		}
-		nointerface = false
-		noescape = false
-		norace = false
-		nosplit = false
-		nowritebarrier = false
-		systemstack = false
-	}
-
-vardcl_list:
-	vardcl
-|	vardcl_list ';' vardcl
-	{
-		$$ = concat($1, $3);
-	}
-
-constdcl_list:
-	constdcl1
-|	constdcl_list ';' constdcl1
-	{
-		$$ = concat($1, $3);
-	}
-
-typedcl_list:
-	typedcl
-	{
-		$$ = list1($1);
-	}
-|	typedcl_list ';' typedcl
-	{
-		$$ = list($1, $3);
-	}
-
-structdcl_list:
-	structdcl
-|	structdcl_list ';' structdcl
-	{
-		$$ = concat($1, $3);
-	}
-
-interfacedcl_list:
-	interfacedcl
-	{
-		$$ = list1($1);
-	}
-|	interfacedcl_list ';' interfacedcl
-	{
-		$$ = list($1, $3);
-	}
-
-structdcl:
-	new_name_list ntype oliteral
-	{
-		var l *NodeList
-
-		var n *Node
-		l = $1;
-		if l == nil || l.N.Sym.Name == "?" {
-			// ? symbol, during import (list1(nil) == nil)
-			n = $2;
-			if n.Op == OIND {
-				n = n.Left;
-			}
-			n = embedded(n.Sym, importpkg);
-			n.Right = $2;
-			n.SetVal($3)
-			$$ = list1(n);
-			break;
-		}
-
-		for l=$1; l != nil; l=l.Next {
-			l.N = Nod(ODCLFIELD, l.N, $2);
-			l.N.SetVal($3)
-		}
-	}
-|	embed oliteral
-	{
-		$1.SetVal($2)
-		$$ = list1($1);
-	}
-|	'(' embed ')' oliteral
-	{
-		$2.SetVal($4)
-		$$ = list1($2);
-		Yyerror("cannot parenthesize embedded type");
-	}
-|	'*' embed oliteral
-	{
-		$2.Right = Nod(OIND, $2.Right, nil);
-		$2.SetVal($3)
-		$$ = list1($2);
-	}
-|	'(' '*' embed ')' oliteral
-	{
-		$3.Right = Nod(OIND, $3.Right, nil);
-		$3.SetVal($5)
-		$$ = list1($3);
-		Yyerror("cannot parenthesize embedded type");
-	}
-|	'*' '(' embed ')' oliteral
-	{
-		$3.Right = Nod(OIND, $3.Right, nil);
-		$3.SetVal($5)
-		$$ = list1($3);
-		Yyerror("cannot parenthesize embedded type");
-	}
-
-packname:
-	LNAME
-	{
-		var n *Node
-
-		$$ = $1;
-		n = oldname($1);
-		if n.Name != nil && n.Name.Pack != nil {
-			n.Name.Pack.Used = true;
-		}
-	}
-|	LNAME '.' sym
-	{
-		var pkg *Pkg
-
-		if $1.Def == nil || $1.Def.Op != OPACK {
-			Yyerror("%v is not a package", $1);
-			pkg = localpkg;
-		} else {
-			$1.Def.Used = true;
-			pkg = $1.Def.Name.Pkg;
-		}
-		$$ = restrictlookup($3.Name, pkg);
-	}
-
-embed:
-	packname
-	{
-		$$ = embedded($1, localpkg);
-	}
-
-interfacedcl:
-	new_name indcl
-	{
-		$$ = Nod(ODCLFIELD, $1, $2);
-		ifacedcl($$);
-	}
-|	packname
-	{
-		$$ = Nod(ODCLFIELD, nil, oldname($1));
-	}
-|	'(' packname ')'
-	{
-		$$ = Nod(ODCLFIELD, nil, oldname($2));
-		Yyerror("cannot parenthesize embedded type");
-	}
-
-indcl:
-	'(' oarg_type_list_ocomma ')' fnres
-	{
-		// without func keyword
-		$2 = checkarglist($2, 1);
-		$$ = Nod(OTFUNC, fakethis(), nil);
-		$$.List = $2;
-		$$.Rlist = $4;
-	}
-
-/*
- * function arguments.
- */
-arg_type:
-	name_or_type
-|	sym name_or_type
-	{
-		$$ = Nod(ONONAME, nil, nil);
-		$$.Sym = $1;
-		$$ = Nod(OKEY, $$, $2);
-	}
-|	sym dotdotdot
-	{
-		$$ = Nod(ONONAME, nil, nil);
-		$$.Sym = $1;
-		$$ = Nod(OKEY, $$, $2);
-	}
-|	dotdotdot
-
-arg_type_list:
-	arg_type
-	{
-		$$ = list1($1);
-	}
-|	arg_type_list ',' arg_type
-	{
-		$$ = list($1, $3);
-	}
-
-oarg_type_list_ocomma:
-	{
-		$$ = nil;
-	}
-|	arg_type_list ocomma
-	{
-		$$ = $1;
-	}
-
-/*
- * statement
- */
-stmt:
-	{
-		$$ = nil;
-	}
-|	compound_stmt
-|	common_dcl
-	{
-		$$ = liststmt($1);
-	}
-|	non_dcl_stmt
-|	error
-	{
-		$$ = nil;
-	}
-
-non_dcl_stmt:
-	simple_stmt
-|	for_stmt
-|	switch_stmt
-|	select_stmt
-|	if_stmt
-|	labelname ':'
-	{
-		$1 = Nod(OLABEL, $1, nil);
-		$1.Sym = dclstack;  // context, for goto restrictions
-	}
-	stmt
-	{
-		var l *NodeList
-
-		$1.Name.Defn = $4;
-		l = list1($1);
-		if $4 != nil {
-			l = list(l, $4);
-		}
-		$$ = liststmt(l);
-	}
-|	LFALL
-	{
-		// will be converted to OFALL
-		$$ = Nod(OXFALL, nil, nil);
-		$$.Xoffset = int64(block);
-	}
-|	LBREAK onew_name
-	{
-		$$ = Nod(OBREAK, $2, nil);
-	}
-|	LCONTINUE onew_name
-	{
-		$$ = Nod(OCONTINUE, $2, nil);
-	}
-|	LGO pseudocall
-	{
-		$$ = Nod(OPROC, $2, nil);
-	}
-|	LDEFER pseudocall
-	{
-		$$ = Nod(ODEFER, $2, nil);
-	}
-|	LGOTO new_name
-	{
-		$$ = Nod(OGOTO, $2, nil);
-		$$.Sym = dclstack;  // context, for goto restrictions
-	}
-|	LRETURN oexpr_list
-	{
-		$$ = Nod(ORETURN, nil, nil);
-		$$.List = $2;
-		if $$.List == nil && Curfn != nil {
-			var l *NodeList
-
-			for l=Curfn.Func.Dcl; l != nil; l=l.Next {
-				if l.N.Class == PPARAM {
-					continue;
-				}
-				if l.N.Class != PPARAMOUT {
-					break;
-				}
-				if l.N.Sym.Def != l.N {
-					Yyerror("%s is shadowed during return", l.N.Sym.Name);
-				}
-			}
-		}
-	}
-
-stmt_list:
-	stmt
-	{
-		$$ = nil;
-		if $1 != nil {
-			$$ = list1($1);
-		}
-	}
-|	stmt_list ';' stmt
-	{
-		$$ = $1;
-		if $3 != nil {
-			$$ = list($$, $3);
-		}
-	}
-
-new_name_list:
-	new_name
-	{
-		$$ = list1($1);
-	}
-|	new_name_list ',' new_name
-	{
-		$$ = list($1, $3);
-	}
-
-dcl_name_list:
-	dcl_name
-	{
-		$$ = list1($1);
-	}
-|	dcl_name_list ',' dcl_name
-	{
-		$$ = list($1, $3);
-	}
-
-expr_list:
-	expr
-	{
-		$$ = list1($1);
-	}
-|	expr_list ',' expr
-	{
-		$$ = list($1, $3);
-	}
-
-expr_or_type_list:
-	expr_or_type
-	{
-		$$ = list1($1);
-	}
-|	expr_or_type_list ',' expr_or_type
-	{
-		$$ = list($1, $3);
-	}
-
-/*
- * list of combo of keyval and val
- */
-keyval_list:
-	keyval
-	{
-		$$ = list1($1);
-	}
-|	bare_complitexpr
-	{
-		$$ = list1($1);
-	}
-|	keyval_list ',' keyval
-	{
-		$$ = list($1, $3);
-	}
-|	keyval_list ',' bare_complitexpr
-	{
-		$$ = list($1, $3);
-	}
-
-braced_keyval_list:
-	{
-		$$ = nil;
-	}
-|	keyval_list ocomma
-	{
-		$$ = $1;
-	}
-
-/*
- * optional things
- */
-osemi:
-|	';'
-
-ocomma:
-|	','
-
-oexpr:
-	{
-		$$ = nil;
-	}
-|	expr
-
-oexpr_list:
-	{
-		$$ = nil;
-	}
-|	expr_list
-
-osimple_stmt:
-	{
-		$$ = nil;
-	}
-|	simple_stmt
-
-ohidden_funarg_list:
-	{
-		$$ = nil;
-	}
-|	hidden_funarg_list
-
-ohidden_structdcl_list:
-	{
-		$$ = nil;
-	}
-|	hidden_structdcl_list
-
-ohidden_interfacedcl_list:
-	{
-		$$ = nil;
-	}
-|	hidden_interfacedcl_list
-
-oliteral:
-	{
-		$$.U = nil
-	}
-|	LLITERAL
-
-/*
- * import syntax from package header
- */
-hidden_import:
-	LIMPORT LNAME LLITERAL ';'
-	{
-		importimport($2, $3.U.(string));
-	}
-|	LVAR hidden_pkg_importsym hidden_type ';'
-	{
-		importvar($2, $3);
-	}
-|	LCONST hidden_pkg_importsym '=' hidden_constant ';'
-	{
-		importconst($2, Types[TIDEAL], $4);
-	}
-|	LCONST hidden_pkg_importsym hidden_type '=' hidden_constant ';'
-	{
-		importconst($2, $3, $5);
-	}
-|	LTYPE hidden_pkgtype hidden_type ';'
-	{
-		importtype($2, $3);
-	}
-|	LFUNC hidden_fndcl fnbody ';'
-	{
-		if $2 == nil {
-			dclcontext = PEXTERN;  // since we skip the funcbody below
-			break;
-		}
-
-		$2.Func.Inl = $3;
-
-		funcbody($2);
-		importlist = list(importlist, $2);
-
-		if Debug['E'] > 0 {
-			fmt.Printf("import [%q] func %v \n", importpkg.Path, $2)
-			if Debug['m'] > 2 && $2.Func.Inl != nil {
-				fmt.Printf("inl body:%v\n", $2.Func.Inl)
-			}
-		}
-	}
-
-hidden_pkg_importsym:
-	hidden_importsym
-	{
-		$$ = $1;
-		structpkg = $$.Pkg;
-	}
-
-hidden_pkgtype:
-	hidden_pkg_importsym
-	{
-		$$ = pkgtype($1);
-		importsym($1, OTYPE);
-	}
-
-/*
- *  importing types
- */
-
-hidden_type:
-	hidden_type_misc
-|	hidden_type_recv_chan
-|	hidden_type_func
-
-hidden_type_non_recv_chan:
-	hidden_type_misc
-|	hidden_type_func
-
-hidden_type_misc:
-	hidden_importsym
-	{
-		$$ = pkgtype($1);
-	}
-|	LNAME
-	{
-		// predefined name like uint8
-		$1 = Pkglookup($1.Name, builtinpkg);
-		if $1.Def == nil || $1.Def.Op != OTYPE {
-			Yyerror("%s is not a type", $1.Name);
-			$$ = nil;
-		} else {
-			$$ = $1.Def.Type;
-		}
-	}
-|	'[' ']' hidden_type
-	{
-		$$ = aindex(nil, $3);
-	}
-|	'[' LLITERAL ']' hidden_type
-	{
-		$$ = aindex(nodlit($2), $4);
-	}
-|	LMAP '[' hidden_type ']' hidden_type
-	{
-		$$ = maptype($3, $5);
-	}
-|	LSTRUCT '{' ohidden_structdcl_list '}'
-	{
-		$$ = tostruct($3);
-	}
-|	LINTERFACE '{' ohidden_interfacedcl_list '}'
-	{
-		$$ = tointerface($3);
-	}
-|	'*' hidden_type
-	{
-		$$ = Ptrto($2);
-	}
-|	LCHAN hidden_type_non_recv_chan
-	{
-		$$ = typ(TCHAN);
-		$$.Type = $2;
-		$$.Chan = Cboth;
-	}
-|	LCHAN '(' hidden_type_recv_chan ')'
-	{
-		$$ = typ(TCHAN);
-		$$.Type = $3;
-		$$.Chan = Cboth;
-	}
-|	LCHAN LCOMM hidden_type
-	{
-		$$ = typ(TCHAN);
-		$$.Type = $3;
-		$$.Chan = Csend;
-	}
-
-hidden_type_recv_chan:
-	LCOMM LCHAN hidden_type
-	{
-		$$ = typ(TCHAN);
-		$$.Type = $3;
-		$$.Chan = Crecv;
-	}
-
-hidden_type_func:
-	LFUNC '(' ohidden_funarg_list ')' ohidden_funres
-	{
-		$$ = functype(nil, $3, $5);
-	}
-
-hidden_funarg:
-	sym hidden_type oliteral
-	{
-		$$ = Nod(ODCLFIELD, nil, typenod($2));
-		if $1 != nil {
-			$$.Left = newname($1);
-		}
-		$$.SetVal($3)
-	}
-|	sym LDDD hidden_type oliteral
-	{
-		var t *Type
-	
-		t = typ(TARRAY);
-		t.Bound = -1;
-		t.Type = $3;
-
-		$$ = Nod(ODCLFIELD, nil, typenod(t));
-		if $1 != nil {
-			$$.Left = newname($1);
-		}
-		$$.Isddd = true;
-		$$.SetVal($4)
-	}
-
-hidden_structdcl:
-	sym hidden_type oliteral
-	{
-		var s *Sym
-		var p *Pkg
-
-		if $1 != nil && $1.Name != "?" {
-			$$ = Nod(ODCLFIELD, newname($1), typenod($2));
-			$$.SetVal($3)
-		} else {
-			s = $2.Sym;
-			if s == nil && Isptr[$2.Etype] {
-				s = $2.Type.Sym;
-			}
-			p = importpkg;
-			if $1 != nil {
-				p = $1.Pkg;
-			}
-			$$ = embedded(s, p);
-			$$.Right = typenod($2);
-			$$.SetVal($3)
-		}
-	}
-
-hidden_interfacedcl:
-	sym '(' ohidden_funarg_list ')' ohidden_funres
-	{
-		$$ = Nod(ODCLFIELD, newname($1), typenod(functype(fakethis(), $3, $5)));
-	}
-|	hidden_type
-	{
-		$$ = Nod(ODCLFIELD, nil, typenod($1));
-	}
-
-ohidden_funres:
-	{
-		$$ = nil;
-	}
-|	hidden_funres
-
-hidden_funres:
-	'(' ohidden_funarg_list ')'
-	{
-		$$ = $2;
-	}
-|	hidden_type
-	{
-		$$ = list1(Nod(ODCLFIELD, nil, typenod($1)));
-	}
-
-/*
- *  importing constants
- */
-
-hidden_literal:
-	LLITERAL
-	{
-		$$ = nodlit($1);
-	}
-|	'-' LLITERAL
-	{
-		$$ = nodlit($2);
-		switch($$.Val().Ctype()){
-		case CTINT, CTRUNE:
-			mpnegfix($$.Val().U.(*Mpint));
-			break;
-		case CTFLT:
-			mpnegflt($$.Val().U.(*Mpflt));
-			break;
-		case CTCPLX:
-			mpnegflt(&$$.Val().U.(*Mpcplx).Real);
-			mpnegflt(&$$.Val().U.(*Mpcplx).Imag);
-			break;
-		default:
-			Yyerror("bad negated constant");
-		}
-	}
-|	sym
-	{
-		$$ = oldname(Pkglookup($1.Name, builtinpkg));
-		if $$.Op != OLITERAL {
-			Yyerror("bad constant %v", $$.Sym);
-		}
-	}
-
-hidden_constant:
-	hidden_literal
-|	'(' hidden_literal '+' hidden_literal ')'
-	{
-		if $2.Val().Ctype() == CTRUNE && $4.Val().Ctype() == CTINT {
-			$$ = $2;
-			mpaddfixfix($2.Val().U.(*Mpint), $4.Val().U.(*Mpint), 0);
-			break;
-		}
-		$4.Val().U.(*Mpcplx).Real = $4.Val().U.(*Mpcplx).Imag;
-		Mpmovecflt(&$4.Val().U.(*Mpcplx).Imag, 0.0);
-		$$ = nodcplxlit($2.Val(), $4.Val());
-	}
-
-hidden_import_list:
-|	hidden_import_list hidden_import
-
-hidden_funarg_list:
-	hidden_funarg
-	{
-		$$ = list1($1);
-	}
-|	hidden_funarg_list ',' hidden_funarg
-	{
-		$$ = list($1, $3);
-	}
-
-hidden_structdcl_list:
-	hidden_structdcl
-	{
-		$$ = list1($1);
-	}
-|	hidden_structdcl_list ';' hidden_structdcl
-	{
-		$$ = list($1, $3);
-	}
-
-hidden_interfacedcl_list:
-	hidden_interfacedcl
-	{
-		$$ = list1($1);
-	}
-|	hidden_interfacedcl_list ';' hidden_interfacedcl
-	{
-		$$ = list($1, $3);
-	}
-
-%%
-func fixlbrace(lbr int) {
-	// If the opening brace was an LBODY,
-	// set up for another one now that we're done.
-	// See comment in lex.C about loophack.
-	if lbr == LBODY {
-		loophack = 1
-	}
-}
diff --git a/src/cmd/compile/internal/gc/gsubr.go b/src/cmd/compile/internal/gc/gsubr.go
deleted file mode 100644
index 2c575f3..0000000
--- a/src/cmd/compile/internal/gc/gsubr.go
+++ /dev/null
@@ -1,836 +0,0 @@
-// Derived from Inferno utils/6c/txt.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6c/txt.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package gc
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-	"runtime"
-	"strings"
-)
-
-var ddumped int
-
-var dfirst *obj.Prog
-
-var dpc *obj.Prog
-
-/*
- * Is this node a memory operand?
- */
-func Ismem(n *Node) bool {
-	switch n.Op {
-	case OITAB,
-		OSPTR,
-		OLEN,
-		OCAP,
-		OINDREG,
-		ONAME,
-		OPARAM,
-		OCLOSUREVAR:
-		return true
-
-	case OADDR:
-		return Thearch.Thechar == '6' || Thearch.Thechar == '9' // because 6g uses PC-relative addressing; TODO(rsc): not sure why 9g too
-	}
-
-	return false
-}
-
-func Samereg(a *Node, b *Node) bool {
-	if a == nil || b == nil {
-		return false
-	}
-	if a.Op != OREGISTER {
-		return false
-	}
-	if b.Op != OREGISTER {
-		return false
-	}
-	if a.Reg != b.Reg {
-		return false
-	}
-	return true
-}
-
-func Gbranch(as int, t *Type, likely int) *obj.Prog {
-	p := Prog(as)
-	p.To.Type = obj.TYPE_BRANCH
-	p.To.Val = nil
-	if as != obj.AJMP && likely != 0 && Thearch.Thechar != '9' && Thearch.Thechar != '7' {
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = int64(obj.Bool2int(likely > 0))
-	}
-
-	if Debug['g'] != 0 {
-		fmt.Printf("%v\n", p)
-	}
-
-	return p
-}
-
-func Prog(as int) *obj.Prog {
-	var p *obj.Prog
-
-	if as == obj.ADATA || as == obj.AGLOBL {
-		if ddumped != 0 {
-			Fatal("already dumped data")
-		}
-		if dpc == nil {
-			dpc = Ctxt.NewProg()
-			dfirst = dpc
-		}
-
-		p = dpc
-		dpc = Ctxt.NewProg()
-		p.Link = dpc
-	} else {
-		p = Pc
-		Pc = Ctxt.NewProg()
-		Clearp(Pc)
-		p.Link = Pc
-	}
-
-	if lineno == 0 {
-		if Debug['K'] != 0 {
-			Warn("prog: line 0")
-		}
-	}
-
-	p.As = int16(as)
-	p.Lineno = lineno
-	return p
-}
-
-func Nodreg(n *Node, t *Type, r int) {
-	if t == nil {
-		Fatal("nodreg: t nil")
-	}
-
-	*n = Node{}
-	n.Op = OREGISTER
-	n.Addable = true
-	ullmancalc(n)
-	n.Reg = int16(r)
-	n.Type = t
-}
-
-func Nodindreg(n *Node, t *Type, r int) {
-	Nodreg(n, t, r)
-	n.Op = OINDREG
-}
-
-func Afunclit(a *obj.Addr, n *Node) {
-	if a.Type == obj.TYPE_ADDR && a.Name == obj.NAME_EXTERN {
-		a.Type = obj.TYPE_MEM
-		a.Sym = Linksym(n.Sym)
-	}
-}
-
-func Clearp(p *obj.Prog) {
-	obj.Nopout(p)
-	p.As = obj.AEND
-	p.Pc = int64(pcloc)
-	pcloc++
-}
-
-func dumpdata() {
-	ddumped = 1
-	if dfirst == nil {
-		return
-	}
-	newplist()
-	*Pc = *dfirst
-	Pc = dpc
-	Clearp(Pc)
-}
-
-// Fixup instructions after allocauto (formerly compactframe) has moved all autos around.
-func fixautoused(p *obj.Prog) {
-	for lp := &p; ; {
-		p = *lp
-		if p == nil {
-			break
-		}
-		if p.As == obj.ATYPE && p.From.Node != nil && p.From.Name == obj.NAME_AUTO && !((p.From.Node).(*Node)).Used {
-			*lp = p.Link
-			continue
-		}
-
-		if (p.As == obj.AVARDEF || p.As == obj.AVARKILL) && p.To.Node != nil && !((p.To.Node).(*Node)).Used {
-			// Cannot remove VARDEF instruction, because - unlike TYPE handled above -
-			// VARDEFs are interspersed with other code, and a jump might be using the
-			// VARDEF as a target. Replace with a no-op instead. A later pass will remove
-			// the no-ops.
-			obj.Nopout(p)
-
-			continue
-		}
-
-		if p.From.Name == obj.NAME_AUTO && p.From.Node != nil {
-			p.From.Offset += stkdelta[p.From.Node.(*Node)]
-		}
-
-		if p.To.Name == obj.NAME_AUTO && p.To.Node != nil {
-			p.To.Offset += stkdelta[p.To.Node.(*Node)]
-		}
-
-		lp = &p.Link
-	}
-}
-
-func ggloblnod(nam *Node) {
-	p := Thearch.Gins(obj.AGLOBL, nam, nil)
-	p.Lineno = nam.Lineno
-	p.From.Sym.Gotype = Linksym(ngotype(nam))
-	p.To.Sym = nil
-	p.To.Type = obj.TYPE_CONST
-	p.To.Offset = nam.Type.Width
-	p.From3 = new(obj.Addr)
-	if nam.Name.Readonly {
-		p.From3.Offset = obj.RODATA
-	}
-	if nam.Type != nil && !haspointers(nam.Type) {
-		p.From3.Offset |= obj.NOPTR
-	}
-}
-
-func ggloblsym(s *Sym, width int32, flags int16) {
-	p := Thearch.Gins(obj.AGLOBL, nil, nil)
-	p.From.Type = obj.TYPE_MEM
-	p.From.Name = obj.NAME_EXTERN
-	p.From.Sym = Linksym(s)
-	if flags&obj.LOCAL != 0 {
-		p.From.Sym.Local = true
-		flags &= ^obj.LOCAL
-	}
-	p.To.Type = obj.TYPE_CONST
-	p.To.Offset = int64(width)
-	p.From3 = new(obj.Addr)
-	p.From3.Offset = int64(flags)
-}
-
-func gjmp(to *obj.Prog) *obj.Prog {
-	p := Gbranch(obj.AJMP, nil, 0)
-	if to != nil {
-		Patch(p, to)
-	}
-	return p
-}
-
-func gtrack(s *Sym) {
-	p := Thearch.Gins(obj.AUSEFIELD, nil, nil)
-	p.From.Type = obj.TYPE_MEM
-	p.From.Name = obj.NAME_EXTERN
-	p.From.Sym = Linksym(s)
-}
-
-func gused(n *Node) {
-	Thearch.Gins(obj.ANOP, n, nil) // used
-}
-
-func Isfat(t *Type) bool {
-	if t != nil {
-		switch t.Etype {
-		case TSTRUCT, TARRAY, TSTRING,
-			TINTER: // maybe remove later
-			return true
-		}
-	}
-
-	return false
-}
-
-// Sweep the prog list to mark any used nodes.
-func markautoused(p *obj.Prog) {
-	for ; p != nil; p = p.Link {
-		if p.As == obj.ATYPE || p.As == obj.AVARDEF || p.As == obj.AVARKILL {
-			continue
-		}
-
-		if p.From.Node != nil {
-			((p.From.Node).(*Node)).Used = true
-		}
-
-		if p.To.Node != nil {
-			((p.To.Node).(*Node)).Used = true
-		}
-	}
-}
-
-// Naddr rewrites a to refer to n.
-// It assumes that a is zeroed on entry.
-func Naddr(a *obj.Addr, n *Node) {
-	if n == nil {
-		return
-	}
-
-	if n.Type != nil && n.Type.Etype != TIDEAL {
-		// TODO(rsc): This is undone by the selective clearing of width below,
-		// to match architectures that were not as aggressive in setting width
-		// during naddr. Those widths must be cleared to avoid triggering
-		// failures in gins when it detects real but heretofore latent (and one
-		// hopes innocuous) type mismatches.
-		// The type mismatches should be fixed and the clearing below removed.
-		dowidth(n.Type)
-
-		a.Width = n.Type.Width
-	}
-
-	switch n.Op {
-	default:
-		a := a // copy to let escape into Ctxt.Dconv
-		Debug['h'] = 1
-		Dump("naddr", n)
-		Fatal("naddr: bad %v %v", Oconv(int(n.Op), 0), Ctxt.Dconv(a))
-
-	case OREGISTER:
-		a.Type = obj.TYPE_REG
-		a.Reg = n.Reg
-		a.Sym = nil
-		if Thearch.Thechar == '8' { // TODO(rsc): Never clear a->width.
-			a.Width = 0
-		}
-
-	case OINDREG:
-		a.Type = obj.TYPE_MEM
-		a.Reg = n.Reg
-		a.Sym = Linksym(n.Sym)
-		a.Offset = n.Xoffset
-		if a.Offset != int64(int32(a.Offset)) {
-			Yyerror("offset %d too large for OINDREG", a.Offset)
-		}
-		if Thearch.Thechar == '8' { // TODO(rsc): Never clear a->width.
-			a.Width = 0
-		}
-
-		// n->left is PHEAP ONAME for stack parameter.
-	// compute address of actual parameter on stack.
-	case OPARAM:
-		a.Etype = Simtype[n.Left.Type.Etype]
-
-		a.Width = n.Left.Type.Width
-		a.Offset = n.Xoffset
-		a.Sym = Linksym(n.Left.Sym)
-		a.Type = obj.TYPE_MEM
-		a.Name = obj.NAME_PARAM
-		a.Node = n.Left.Orig
-
-	case OCLOSUREVAR:
-		if !Curfn.Func.Needctxt {
-			Fatal("closurevar without needctxt")
-		}
-		a.Type = obj.TYPE_MEM
-		a.Reg = int16(Thearch.REGCTXT)
-		a.Sym = nil
-		a.Offset = n.Xoffset
-
-	case OCFUNC:
-		Naddr(a, n.Left)
-		a.Sym = Linksym(n.Left.Sym)
-
-	case ONAME:
-		a.Etype = 0
-		if n.Type != nil {
-			a.Etype = Simtype[n.Type.Etype]
-		}
-		a.Offset = n.Xoffset
-		s := n.Sym
-		a.Node = n.Orig
-
-		//if(a->node >= (Node*)&n)
-		//	fatal("stack node");
-		if s == nil {
-			s = Lookup(".noname")
-		}
-		if n.Name.Method {
-			if n.Type != nil {
-				if n.Type.Sym != nil {
-					if n.Type.Sym.Pkg != nil {
-						s = Pkglookup(s.Name, n.Type.Sym.Pkg)
-					}
-				}
-			}
-		}
-
-		a.Type = obj.TYPE_MEM
-		switch n.Class {
-		default:
-			Fatal("naddr: ONAME class %v %d\n", n.Sym, n.Class)
-
-		case PEXTERN:
-			a.Name = obj.NAME_EXTERN
-
-		case PAUTO:
-			a.Name = obj.NAME_AUTO
-
-		case PPARAM, PPARAMOUT:
-			a.Name = obj.NAME_PARAM
-
-		case PFUNC:
-			a.Name = obj.NAME_EXTERN
-			a.Type = obj.TYPE_ADDR
-			a.Width = int64(Widthptr)
-			s = funcsym(s)
-		}
-
-		a.Sym = Linksym(s)
-
-	case OLITERAL:
-		if Thearch.Thechar == '8' {
-			a.Width = 0
-		}
-		switch n.Val().Ctype() {
-		default:
-			Fatal("naddr: const %v", Tconv(n.Type, obj.FmtLong))
-
-		case CTFLT:
-			a.Type = obj.TYPE_FCONST
-			a.Val = mpgetflt(n.Val().U.(*Mpflt))
-
-		case CTINT, CTRUNE:
-			a.Sym = nil
-			a.Type = obj.TYPE_CONST
-			a.Offset = Mpgetfix(n.Val().U.(*Mpint))
-
-		case CTSTR:
-			datagostring(n.Val().U.(string), a)
-
-		case CTBOOL:
-			a.Sym = nil
-			a.Type = obj.TYPE_CONST
-			a.Offset = int64(obj.Bool2int(n.Val().U.(bool)))
-
-		case CTNIL:
-			a.Sym = nil
-			a.Type = obj.TYPE_CONST
-			a.Offset = 0
-		}
-
-	case OADDR:
-		Naddr(a, n.Left)
-		a.Etype = uint8(Tptr)
-		if Thearch.Thechar != '5' && Thearch.Thechar != '7' && Thearch.Thechar != '9' { // TODO(rsc): Do this even for arm, ppc64.
-			a.Width = int64(Widthptr)
-		}
-		if a.Type != obj.TYPE_MEM {
-			a := a // copy to let escape into Ctxt.Dconv
-			Fatal("naddr: OADDR %v (from %v)", Ctxt.Dconv(a), Oconv(int(n.Left.Op), 0))
-		}
-		a.Type = obj.TYPE_ADDR
-
-		// itable of interface value
-	case OITAB:
-		Naddr(a, n.Left)
-
-		if a.Type == obj.TYPE_CONST && a.Offset == 0 {
-			break // itab(nil)
-		}
-		a.Etype = uint8(Tptr)
-		a.Width = int64(Widthptr)
-
-		// pointer in a string or slice
-	case OSPTR:
-		Naddr(a, n.Left)
-
-		if a.Type == obj.TYPE_CONST && a.Offset == 0 {
-			break // ptr(nil)
-		}
-		a.Etype = Simtype[Tptr]
-		a.Offset += int64(Array_array)
-		a.Width = int64(Widthptr)
-
-		// len of string or slice
-	case OLEN:
-		Naddr(a, n.Left)
-
-		if a.Type == obj.TYPE_CONST && a.Offset == 0 {
-			break // len(nil)
-		}
-		a.Etype = Simtype[TUINT]
-		a.Offset += int64(Array_nel)
-		if Thearch.Thechar != '5' { // TODO(rsc): Do this even on arm.
-			a.Width = int64(Widthint)
-		}
-
-		// cap of string or slice
-	case OCAP:
-		Naddr(a, n.Left)
-
-		if a.Type == obj.TYPE_CONST && a.Offset == 0 {
-			break // cap(nil)
-		}
-		a.Etype = Simtype[TUINT]
-		a.Offset += int64(Array_cap)
-		if Thearch.Thechar != '5' { // TODO(rsc): Do this even on arm.
-			a.Width = int64(Widthint)
-		}
-	}
-	return
-}
-
-func newplist() *obj.Plist {
-	pl := obj.Linknewplist(Ctxt)
-
-	Pc = Ctxt.NewProg()
-	Clearp(Pc)
-	pl.Firstpc = Pc
-
-	return pl
-}
-
-func nodarg(t *Type, fp int) *Node {
-	var n *Node
-
-	// entire argument struct, not just one arg
-	if t.Etype == TSTRUCT && t.Funarg != 0 {
-		n = Nod(ONAME, nil, nil)
-		n.Sym = Lookup(".args")
-		n.Type = t
-		var savet Iter
-		first := Structfirst(&savet, &t)
-		if first == nil {
-			Fatal("nodarg: bad struct")
-		}
-		if first.Width == BADWIDTH {
-			Fatal("nodarg: offset not computed for %v", t)
-		}
-		n.Xoffset = first.Width
-		n.Addable = true
-		goto fp
-	}
-
-	if t.Etype != TFIELD {
-		Fatal("nodarg: not field %v", t)
-	}
-
-	if fp == 1 {
-		var n *Node
-		for l := Curfn.Func.Dcl; l != nil; l = l.Next {
-			n = l.N
-			if (n.Class == PPARAM || n.Class == PPARAMOUT) && !isblanksym(t.Sym) && n.Sym == t.Sym {
-				return n
-			}
-		}
-	}
-
-	n = Nod(ONAME, nil, nil)
-	n.Type = t.Type
-	n.Sym = t.Sym
-
-	if t.Width == BADWIDTH {
-		Fatal("nodarg: offset not computed for %v", t)
-	}
-	n.Xoffset = t.Width
-	n.Addable = true
-	n.Orig = t.Nname
-
-	// Rewrite argument named _ to __,
-	// or else the assignment to _ will be
-	// discarded during code generation.
-fp:
-	if isblank(n) {
-		n.Sym = Lookup("__")
-	}
-
-	switch fp {
-	case 0: // output arg
-		n.Op = OINDREG
-
-		n.Reg = int16(Thearch.REGSP)
-		if HasLinkRegister() {
-			n.Xoffset += int64(Ctxt.Arch.Ptrsize)
-		}
-
-	case 1: // input arg
-		n.Class = PPARAM
-
-	case 2: // offset output arg
-		Fatal("shouldn't be used")
-	}
-
-	n.Typecheck = 1
-	return n
-}
-
-func Patch(p *obj.Prog, to *obj.Prog) {
-	if p.To.Type != obj.TYPE_BRANCH {
-		Fatal("patch: not a branch")
-	}
-	p.To.Val = to
-	p.To.Offset = to.Pc
-}
-
-func unpatch(p *obj.Prog) *obj.Prog {
-	if p.To.Type != obj.TYPE_BRANCH {
-		Fatal("unpatch: not a branch")
-	}
-	q, _ := p.To.Val.(*obj.Prog)
-	p.To.Val = nil
-	p.To.Offset = 0
-	return q
-}
-
-var reg [100]int       // count of references to reg
-var regstk [100][]byte // allocation sites, when -v is given
-
-func GetReg(r int) int {
-	return reg[r-Thearch.REGMIN]
-}
-func SetReg(r, v int) {
-	reg[r-Thearch.REGMIN] = v
-}
-
-func ginit() {
-	for r := range reg {
-		reg[r] = 1
-	}
-
-	for r := Thearch.REGMIN; r <= Thearch.REGMAX; r++ {
-		reg[r-Thearch.REGMIN] = 0
-	}
-	for r := Thearch.FREGMIN; r <= Thearch.FREGMAX; r++ {
-		reg[r-Thearch.REGMIN] = 0
-	}
-
-	for _, r := range Thearch.ReservedRegs {
-		reg[r-Thearch.REGMIN] = 1
-	}
-}
-
-func gclean() {
-	for _, r := range Thearch.ReservedRegs {
-		reg[r-Thearch.REGMIN]--
-	}
-
-	for r := Thearch.REGMIN; r <= Thearch.REGMAX; r++ {
-		n := reg[r-Thearch.REGMIN]
-		if n != 0 {
-			if Debug['v'] != 0 {
-				Regdump()
-			}
-			Yyerror("reg %v left allocated", obj.Rconv(r))
-		}
-	}
-
-	for r := Thearch.FREGMIN; r <= Thearch.FREGMAX; r++ {
-		n := reg[r-Thearch.REGMIN]
-		if n != 0 {
-			if Debug['v'] != 0 {
-				Regdump()
-			}
-			Yyerror("reg %v left allocated", obj.Rconv(r))
-		}
-	}
-}
-
-func Anyregalloc() bool {
-	n := 0
-	for r := Thearch.REGMIN; r <= Thearch.REGMAX; r++ {
-		if reg[r-Thearch.REGMIN] == 0 {
-			n++
-		}
-	}
-	return n > len(Thearch.ReservedRegs)
-}
-
-/*
- * allocate register of type t, leave in n.
- * if o != N, o may be reusable register.
- * caller must Regfree(n).
- */
-func Regalloc(n *Node, t *Type, o *Node) {
-	if t == nil {
-		Fatal("regalloc: t nil")
-	}
-	et := int(Simtype[t.Etype])
-	if Ctxt.Arch.Regsize == 4 && (et == TINT64 || et == TUINT64) {
-		Fatal("regalloc 64bit")
-	}
-
-	var i int
-Switch:
-	switch et {
-	default:
-		Fatal("regalloc: unknown type %v", t)
-
-	case TINT8, TUINT8, TINT16, TUINT16, TINT32, TUINT32, TINT64, TUINT64, TPTR32, TPTR64, TBOOL:
-		if o != nil && o.Op == OREGISTER {
-			i = int(o.Reg)
-			if Thearch.REGMIN <= i && i <= Thearch.REGMAX {
-				break Switch
-			}
-		}
-		for i = Thearch.REGMIN; i <= Thearch.REGMAX; i++ {
-			if reg[i-Thearch.REGMIN] == 0 {
-				break Switch
-			}
-		}
-		Flusherrors()
-		Regdump()
-		Fatal("out of fixed registers")
-
-	case TFLOAT32, TFLOAT64:
-		if Thearch.Use387 {
-			i = Thearch.FREGMIN // x86.REG_F0
-			break Switch
-		}
-		if o != nil && o.Op == OREGISTER {
-			i = int(o.Reg)
-			if Thearch.FREGMIN <= i && i <= Thearch.FREGMAX {
-				break Switch
-			}
-		}
-		for i = Thearch.FREGMIN; i <= Thearch.FREGMAX; i++ {
-			if reg[i-Thearch.REGMIN] == 0 { // note: REGMIN, not FREGMIN
-				break Switch
-			}
-		}
-		Flusherrors()
-		Regdump()
-		Fatal("out of floating registers")
-
-	case TCOMPLEX64, TCOMPLEX128:
-		Tempname(n, t)
-		return
-	}
-
-	ix := i - Thearch.REGMIN
-	if reg[ix] == 0 && Debug['v'] > 0 {
-		if regstk[ix] == nil {
-			regstk[ix] = make([]byte, 4096)
-		}
-		stk := regstk[ix]
-		n := runtime.Stack(stk[:cap(stk)], false)
-		regstk[ix] = stk[:n]
-	}
-	reg[ix]++
-	Nodreg(n, t, i)
-}
-
-func Regfree(n *Node) {
-	if n.Op == ONAME {
-		return
-	}
-	if n.Op != OREGISTER && n.Op != OINDREG {
-		Fatal("regfree: not a register")
-	}
-	i := int(n.Reg)
-	if i == Thearch.REGSP {
-		return
-	}
-	switch {
-	case Thearch.REGMIN <= i && i <= Thearch.REGMAX,
-		Thearch.FREGMIN <= i && i <= Thearch.FREGMAX:
-		// ok
-	default:
-		Fatal("regfree: reg out of range")
-	}
-
-	i -= Thearch.REGMIN
-	if reg[i] <= 0 {
-		Fatal("regfree: reg not allocated")
-	}
-	reg[i]--
-	if reg[i] == 0 {
-		regstk[i] = regstk[i][:0]
-	}
-}
-
-// Reginuse reports whether r is in use.
-func Reginuse(r int) bool {
-	switch {
-	case Thearch.REGMIN <= r && r <= Thearch.REGMAX,
-		Thearch.FREGMIN <= r && r <= Thearch.FREGMAX:
-		// ok
-	default:
-		Fatal("reginuse: reg out of range")
-	}
-
-	return reg[r-Thearch.REGMIN] > 0
-}
-
-// Regrealloc(n) undoes the effect of Regfree(n),
-// so that a register can be given up but then reclaimed.
-func Regrealloc(n *Node) {
-	if n.Op != OREGISTER && n.Op != OINDREG {
-		Fatal("regrealloc: not a register")
-	}
-	i := int(n.Reg)
-	if i == Thearch.REGSP {
-		return
-	}
-	switch {
-	case Thearch.REGMIN <= i && i <= Thearch.REGMAX,
-		Thearch.FREGMIN <= i && i <= Thearch.FREGMAX:
-		// ok
-	default:
-		Fatal("regrealloc: reg out of range")
-	}
-
-	i -= Thearch.REGMIN
-	if reg[i] == 0 && Debug['v'] > 0 {
-		if regstk[i] == nil {
-			regstk[i] = make([]byte, 4096)
-		}
-		stk := regstk[i]
-		n := runtime.Stack(stk[:cap(stk)], false)
-		regstk[i] = stk[:n]
-	}
-	reg[i]++
-}
-
-func Regdump() {
-	if Debug['v'] == 0 {
-		fmt.Printf("run compiler with -v for register allocation sites\n")
-		return
-	}
-
-	dump := func(r int) {
-		stk := regstk[r-Thearch.REGMIN]
-		if len(stk) == 0 {
-			return
-		}
-		fmt.Printf("reg %v allocated at:\n", obj.Rconv(r))
-		fmt.Printf("\t%s\n", strings.Replace(strings.TrimSpace(string(stk)), "\n", "\n\t", -1))
-	}
-
-	for r := Thearch.REGMIN; r <= Thearch.REGMAX; r++ {
-		if reg[r-Thearch.REGMIN] != 0 {
-			dump(r)
-		}
-	}
-	for r := Thearch.FREGMIN; r <= Thearch.FREGMAX; r++ {
-		if reg[r-Thearch.REGMIN] == 0 {
-			dump(r)
-		}
-	}
-}
diff --git a/src/cmd/compile/internal/gc/init.go b/src/cmd/compile/internal/gc/init.go
deleted file mode 100644
index 5fbc82d..0000000
--- a/src/cmd/compile/internal/gc/init.go
+++ /dev/null
@@ -1,189 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-//	case OADD:
-//		if(n->right->op == OLITERAL) {
-//			v = n->right->vconst;
-//			naddr(n->left, a, canemitcode);
-//		} else
-//		if(n->left->op == OLITERAL) {
-//			v = n->left->vconst;
-//			naddr(n->right, a, canemitcode);
-//		} else
-//			goto bad;
-//		a->offset += v;
-//		break;
-
-/*
- * a function named init is a special case.
- * it is called by the initialization before
- * main is run. to make it unique within a
- * package and also uncallable, the name,
- * normally "pkg.init", is altered to "pkg.init.1".
- */
-
-var renameinit_initgen int
-
-func renameinit() *Sym {
-	renameinit_initgen++
-	return Lookupf("init.%d", renameinit_initgen)
-}
-
-/*
- * hand-craft the following initialization code
- *	var initdone· uint8 				(1)
- *	func init()					(2)
- *		if initdone· != 0 {			(3)
- *			if initdone· == 2		(4)
- *				return
- *			throw();			(5)
- *		}
- *		initdone· = 1;				(6)
- *		// over all matching imported symbols
- *			<pkg>.init()			(7)
- *		{ <init stmts> }			(8)
- *		init.<n>() // if any			(9)
- *		initdone· = 2;				(10)
- *		return					(11)
- *	}
- */
-func anyinit(n *NodeList) bool {
-	// are there any interesting init statements
-	for l := n; l != nil; l = l.Next {
-		switch l.N.Op {
-		case ODCLFUNC, ODCLCONST, ODCLTYPE, OEMPTY:
-			break
-
-		case OAS, OASWB:
-			if isblank(l.N.Left) && candiscard(l.N.Right) {
-				break
-			}
-			fallthrough
-
-			// fall through
-		default:
-			return true
-		}
-	}
-
-	// is this main
-	if localpkg.Name == "main" {
-		return true
-	}
-
-	// is there an explicit init function
-	s := Lookup("init.1")
-
-	if s.Def != nil {
-		return true
-	}
-
-	// are there any imported init functions
-	for _, s := range initSyms {
-		if s.Def != nil {
-			return true
-		}
-	}
-
-	// then none
-	return false
-}
-
-func fninit(n *NodeList) {
-	if Debug['A'] != 0 {
-		// sys.go or unsafe.go during compiler build
-		return
-	}
-
-	n = initfix(n)
-	if !anyinit(n) {
-		return
-	}
-
-	var r *NodeList
-
-	// (1)
-	gatevar := newname(Lookup("initdone·"))
-	addvar(gatevar, Types[TUINT8], PEXTERN)
-
-	// (2)
-	Maxarg = 0
-
-	fn := Nod(ODCLFUNC, nil, nil)
-	initsym := Lookup("init")
-	fn.Func.Nname = newname(initsym)
-	fn.Func.Nname.Name.Defn = fn
-	fn.Func.Nname.Name.Param.Ntype = Nod(OTFUNC, nil, nil)
-	declare(fn.Func.Nname, PFUNC)
-	funchdr(fn)
-
-	// (3)
-	a := Nod(OIF, nil, nil)
-
-	a.Left = Nod(ONE, gatevar, Nodintconst(0))
-	r = list(r, a)
-
-	// (4)
-	b := Nod(OIF, nil, nil)
-
-	b.Left = Nod(OEQ, gatevar, Nodintconst(2))
-	b.Nbody = list1(Nod(ORETURN, nil, nil))
-	a.Nbody = list1(b)
-
-	// (5)
-	b = syslook("throwinit", 0)
-
-	b = Nod(OCALL, b, nil)
-	a.Nbody = list(a.Nbody, b)
-
-	// (6)
-	a = Nod(OAS, gatevar, Nodintconst(1))
-
-	r = list(r, a)
-
-	// (7)
-	for _, s := range initSyms {
-		if s.Def != nil && s != initsym {
-			// could check that it is fn of no args/returns
-			a = Nod(OCALL, s.Def, nil)
-			r = list(r, a)
-		}
-	}
-
-	// (8)
-	r = concat(r, n)
-
-	// (9)
-	// could check that it is fn of no args/returns
-	for i := 1; ; i++ {
-		s := Lookupf("init.%d", i)
-		if s.Def == nil {
-			break
-		}
-		a = Nod(OCALL, s.Def, nil)
-		r = list(r, a)
-	}
-
-	// (10)
-	a = Nod(OAS, gatevar, Nodintconst(2))
-
-	r = list(r, a)
-
-	// (11)
-	a = Nod(ORETURN, nil, nil)
-
-	r = list(r, a)
-	exportsym(fn.Func.Nname)
-
-	fn.Nbody = r
-	funcbody(fn)
-
-	Curfn = fn
-	typecheck(&fn, Etop)
-	typechecklist(r, Etop)
-	Curfn = nil
-	funccompile(fn)
-}
diff --git a/src/cmd/compile/internal/gc/inl.go b/src/cmd/compile/internal/gc/inl.go
deleted file mode 100644
index b2eeeed..0000000
--- a/src/cmd/compile/internal/gc/inl.go
+++ /dev/null
@@ -1,995 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-//
-// The inlining facility makes 2 passes: first caninl determines which
-// functions are suitable for inlining, and for those that are it
-// saves a copy of the body. Then inlcalls walks each function body to
-// expand calls to inlinable functions.
-//
-// The debug['l'] flag controls the agressiveness. Note that main() swaps level 0 and 1,
-// making 1 the default and -l disable.  -ll and more is useful to flush out bugs.
-// These additional levels (beyond -l) may be buggy and are not supported.
-//      0: disabled
-//      1: 40-nodes leaf functions, oneliners, lazy typechecking (default)
-//      2: early typechecking of all imported bodies
-//      3: allow variadic functions
-//      4: allow non-leaf functions , (breaks runtime.Caller)
-//
-//  At some point this may get another default and become switch-offable with -N.
-//
-//  The debug['m'] flag enables diagnostic output.  a single -m is useful for verifying
-//  which calls get inlined or not, more is for debugging, and may go away at any point.
-//
-// TODO:
-//   - inline functions with ... args
-//   - handle T.meth(f()) with func f() (t T, arg, arg, )
-
-package gc
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-)
-
-// Used by caninl.
-
-// Used by inlcalls
-
-// Used during inlsubst[list]
-var inlfn *Node // function currently being inlined
-
-var inlretlabel *Node // target of the goto substituted in place of a return
-
-var inlretvars *NodeList // temp out variables
-
-// Get the function's package.  For ordinary functions it's on the ->sym, but for imported methods
-// the ->sym can be re-used in the local package, so peel it off the receiver's type.
-func fnpkg(fn *Node) *Pkg {
-	if fn.Type.Thistuple != 0 {
-		// method
-		rcvr := getthisx(fn.Type).Type.Type
-
-		if Isptr[rcvr.Etype] {
-			rcvr = rcvr.Type
-		}
-		if rcvr.Sym == nil {
-			Fatal("receiver with no sym: [%v] %v  (%v)", fn.Sym, Nconv(fn, obj.FmtLong), rcvr)
-		}
-		return rcvr.Sym.Pkg
-	}
-
-	// non-method
-	return fn.Sym.Pkg
-}
-
-// Lazy typechecking of imported bodies.  For local functions, caninl will set ->typecheck
-// because they're a copy of an already checked body.
-func typecheckinl(fn *Node) {
-	lno := int(setlineno(fn))
-
-	// typecheckinl is only for imported functions;
-	// their bodies may refer to unsafe as long as the package
-	// was marked safe during import (which was checked then).
-	// the ->inl of a local function has been typechecked before caninl copied it.
-	pkg := fnpkg(fn)
-
-	if pkg == localpkg || pkg == nil {
-		return // typecheckinl on local function
-	}
-
-	if Debug['m'] > 2 {
-		fmt.Printf("typecheck import [%v] %v { %v }\n", fn.Sym, Nconv(fn, obj.FmtLong), Hconv(fn.Func.Inl, obj.FmtSharp))
-	}
-
-	save_safemode := safemode
-	safemode = 0
-
-	savefn := Curfn
-	Curfn = fn
-	typechecklist(fn.Func.Inl, Etop)
-	Curfn = savefn
-
-	safemode = save_safemode
-
-	lineno = int32(lno)
-}
-
-// Caninl determines whether fn is inlineable.
-// If so, caninl saves fn->nbody in fn->inl and substitutes it with a copy.
-// fn and ->nbody will already have been typechecked.
-func caninl(fn *Node) {
-	if fn.Op != ODCLFUNC {
-		Fatal("caninl %v", fn)
-	}
-	if fn.Func.Nname == nil {
-		Fatal("caninl no nname %v", Nconv(fn, obj.FmtSign))
-	}
-
-	// If fn has no body (is defined outside of Go), cannot inline it.
-	if fn.Nbody == nil {
-		return
-	}
-
-	if fn.Typecheck == 0 {
-		Fatal("caninl on non-typechecked function %v", fn)
-	}
-
-	// can't handle ... args yet
-	if Debug['l'] < 3 {
-		for t := fn.Type.Type.Down.Down.Type; t != nil; t = t.Down {
-			if t.Isddd {
-				return
-			}
-		}
-	}
-
-	// Runtime package must not be race instrumented.
-	// Racewalk skips runtime package. However, some runtime code can be
-	// inlined into other packages and instrumented there. To avoid this,
-	// we disable inlining of runtime functions in race mode.
-	// The example that we observed is inlining of LockOSThread,
-	// which lead to false race reports on m contents.
-	if flag_race != 0 && myimportpath == "runtime" {
-		return
-	}
-
-	const maxBudget = 80
-	budget := maxBudget // allowed hairyness
-	if ishairylist(fn.Nbody, &budget) || budget < 0 {
-		return
-	}
-
-	savefn := Curfn
-	Curfn = fn
-
-	fn.Func.Nname.Func.Inl = fn.Nbody
-	fn.Nbody = inlcopylist(fn.Func.Nname.Func.Inl)
-	fn.Func.Nname.Func.Inldcl = inlcopylist(fn.Func.Nname.Name.Defn.Func.Dcl)
-	fn.Func.Nname.Func.InlCost = int32(maxBudget - budget)
-
-	// hack, TODO, check for better way to link method nodes back to the thing with the ->inl
-	// this is so export can find the body of a method
-	fn.Type.Nname = fn.Func.Nname
-
-	if Debug['m'] > 1 {
-		fmt.Printf("%v: can inline %v as: %v { %v }\n", fn.Line(), Nconv(fn.Func.Nname, obj.FmtSharp), Tconv(fn.Type, obj.FmtSharp), Hconv(fn.Func.Nname.Func.Inl, obj.FmtSharp))
-	} else if Debug['m'] != 0 {
-		fmt.Printf("%v: can inline %v\n", fn.Line(), fn.Func.Nname)
-	}
-
-	Curfn = savefn
-}
-
-// Look for anything we want to punt on.
-func ishairylist(ll *NodeList, budget *int) bool {
-	for ; ll != nil; ll = ll.Next {
-		if ishairy(ll.N, budget) {
-			return true
-		}
-	}
-	return false
-}
-
-func ishairy(n *Node, budget *int) bool {
-	if n == nil {
-		return false
-	}
-
-	switch n.Op {
-	// Call is okay if inlinable and we have the budget for the body.
-	case OCALLFUNC:
-		if n.Left.Func != nil && n.Left.Func.Inl != nil {
-			*budget -= int(n.Left.Func.InlCost)
-			break
-		}
-		if n.Left.Op == ONAME && n.Left.Left != nil && n.Left.Left.Op == OTYPE && n.Left.Right != nil && n.Left.Right.Op == ONAME { // methods called as functions
-			if n.Left.Sym.Def != nil && n.Left.Sym.Def.Func.Inl != nil {
-				*budget -= int(n.Left.Sym.Def.Func.InlCost)
-				break
-			}
-		}
-		if Debug['l'] < 4 {
-			return true
-		}
-
-	// Call is okay if inlinable and we have the budget for the body.
-	case OCALLMETH:
-		if n.Left.Type == nil {
-			Fatal("no function type for [%p] %v\n", n.Left, Nconv(n.Left, obj.FmtSign))
-		}
-		if n.Left.Type.Nname == nil {
-			Fatal("no function definition for [%p] %v\n", n.Left.Type, Tconv(n.Left.Type, obj.FmtSign))
-		}
-		if n.Left.Type.Nname.Func.Inl != nil {
-			*budget -= int(n.Left.Type.Nname.Func.InlCost)
-			break
-		}
-		if Debug['l'] < 4 {
-			return true
-		}
-
-	// Things that are too hairy, irrespective of the budget
-	case OCALL, OCALLINTER, OPANIC, ORECOVER:
-		if Debug['l'] < 4 {
-			return true
-		}
-
-	case OCLOSURE,
-		OCALLPART,
-		ORANGE,
-		OFOR,
-		OSELECT,
-		OSWITCH,
-		OPROC,
-		ODEFER,
-		ODCLTYPE,  // can't print yet
-		ODCLCONST, // can't print yet
-		ORETJMP:
-		return true
-	}
-
-	(*budget)--
-
-	return *budget < 0 || ishairy(n.Left, budget) || ishairy(n.Right, budget) || ishairylist(n.List, budget) || ishairylist(n.Rlist, budget) || ishairylist(n.Ninit, budget) || ishairylist(n.Nbody, budget)
-}
-
-// Inlcopy and inlcopylist recursively copy the body of a function.
-// Any name-like node of non-local class is marked for re-export by adding it to
-// the exportlist.
-func inlcopylist(ll *NodeList) *NodeList {
-	var l *NodeList
-	for ; ll != nil; ll = ll.Next {
-		l = list(l, inlcopy(ll.N))
-	}
-	return l
-}
-
-func inlcopy(n *Node) *Node {
-	if n == nil {
-		return nil
-	}
-
-	switch n.Op {
-	case ONAME, OTYPE, OLITERAL:
-		return n
-	}
-
-	m := Nod(OXXX, nil, nil)
-	*m = *n
-	if m.Func != nil {
-		m.Func.Inl = nil
-	}
-	m.Left = inlcopy(n.Left)
-	m.Right = inlcopy(n.Right)
-	m.List = inlcopylist(n.List)
-	m.Rlist = inlcopylist(n.Rlist)
-	m.Ninit = inlcopylist(n.Ninit)
-	m.Nbody = inlcopylist(n.Nbody)
-
-	return m
-}
-
-// Inlcalls/nodelist/node walks fn's statements and expressions and substitutes any
-// calls made to inlineable functions.  This is the external entry point.
-func inlcalls(fn *Node) {
-	savefn := Curfn
-	Curfn = fn
-	inlnode(&fn)
-	if fn != Curfn {
-		Fatal("inlnode replaced curfn")
-	}
-	Curfn = savefn
-}
-
-// Turn an OINLCALL into a statement.
-func inlconv2stmt(n *Node) {
-	n.Op = OBLOCK
-
-	// n->ninit stays
-	n.List = n.Nbody
-
-	n.Nbody = nil
-	n.Rlist = nil
-}
-
-// Turn an OINLCALL into a single valued expression.
-func inlconv2expr(np **Node) {
-	n := *np
-	r := n.Rlist.N
-	addinit(&r, concat(n.Ninit, n.Nbody))
-	*np = r
-}
-
-// Turn the rlist (with the return values) of the OINLCALL in
-// n into an expression list lumping the ninit and body
-// containing the inlined statements on the first list element so
-// order will be preserved Used in return, oas2func and call
-// statements.
-func inlconv2list(n *Node) *NodeList {
-	if n.Op != OINLCALL || n.Rlist == nil {
-		Fatal("inlconv2list %v\n", Nconv(n, obj.FmtSign))
-	}
-
-	l := n.Rlist
-	addinit(&l.N, concat(n.Ninit, n.Nbody))
-	return l
-}
-
-func inlnodelist(l *NodeList) {
-	for ; l != nil; l = l.Next {
-		inlnode(&l.N)
-	}
-}
-
-// inlnode recurses over the tree to find inlineable calls, which will
-// be turned into OINLCALLs by mkinlcall.  When the recursion comes
-// back up will examine left, right, list, rlist, ninit, ntest, nincr,
-// nbody and nelse and use one of the 4 inlconv/glue functions above
-// to turn the OINLCALL into an expression, a statement, or patch it
-// in to this nodes list or rlist as appropriate.
-// NOTE it makes no sense to pass the glue functions down the
-// recursion to the level where the OINLCALL gets created because they
-// have to edit /this/ n, so you'd have to push that one down as well,
-// but then you may as well do it here.  so this is cleaner and
-// shorter and less complicated.
-func inlnode(np **Node) {
-	if *np == nil {
-		return
-	}
-
-	n := *np
-
-	switch n.Op {
-	// inhibit inlining of their argument
-	case ODEFER, OPROC:
-		switch n.Left.Op {
-		case OCALLFUNC, OCALLMETH:
-			n.Left.Etype = n.Op
-		}
-		fallthrough
-
-		// TODO do them here (or earlier),
-	// so escape analysis can avoid more heapmoves.
-	case OCLOSURE:
-		return
-	}
-
-	lno := int(setlineno(n))
-
-	inlnodelist(n.Ninit)
-	for l := n.Ninit; l != nil; l = l.Next {
-		if l.N.Op == OINLCALL {
-			inlconv2stmt(l.N)
-		}
-	}
-
-	inlnode(&n.Left)
-	if n.Left != nil && n.Left.Op == OINLCALL {
-		inlconv2expr(&n.Left)
-	}
-
-	inlnode(&n.Right)
-	if n.Right != nil && n.Right.Op == OINLCALL {
-		if n.Op == OFOR {
-			inlconv2stmt(n.Right)
-		} else {
-			inlconv2expr(&n.Right)
-		}
-	}
-
-	inlnodelist(n.List)
-	switch n.Op {
-	case OBLOCK:
-		for l := n.List; l != nil; l = l.Next {
-			if l.N.Op == OINLCALL {
-				inlconv2stmt(l.N)
-			}
-		}
-
-		// if we just replaced arg in f(arg()) or return arg with an inlined call
-	// and arg returns multiple values, glue as list
-	case ORETURN,
-		OCALLFUNC,
-		OCALLMETH,
-		OCALLINTER,
-		OAPPEND,
-		OCOMPLEX:
-		if count(n.List) == 1 && n.List.N.Op == OINLCALL && count(n.List.N.Rlist) > 1 {
-			n.List = inlconv2list(n.List.N)
-			break
-		}
-		fallthrough
-
-	default:
-		for l := n.List; l != nil; l = l.Next {
-			if l.N.Op == OINLCALL {
-				inlconv2expr(&l.N)
-			}
-		}
-	}
-
-	inlnodelist(n.Rlist)
-	switch n.Op {
-	case OAS2FUNC:
-		if n.Rlist.N.Op == OINLCALL {
-			n.Rlist = inlconv2list(n.Rlist.N)
-			n.Op = OAS2
-			n.Typecheck = 0
-			typecheck(np, Etop)
-			break
-		}
-		fallthrough
-
-	default:
-		for l := n.Rlist; l != nil; l = l.Next {
-			if l.N.Op == OINLCALL {
-				if n.Op == OIF {
-					inlconv2stmt(l.N)
-				} else {
-					inlconv2expr(&l.N)
-				}
-			}
-		}
-	}
-
-	inlnodelist(n.Nbody)
-	for l := n.Nbody; l != nil; l = l.Next {
-		if l.N.Op == OINLCALL {
-			inlconv2stmt(l.N)
-		}
-	}
-
-	// with all the branches out of the way, it is now time to
-	// transmogrify this node itself unless inhibited by the
-	// switch at the top of this function.
-	switch n.Op {
-	case OCALLFUNC, OCALLMETH:
-		if n.Etype == OPROC || n.Etype == ODEFER {
-			return
-		}
-	}
-
-	switch n.Op {
-	case OCALLFUNC:
-		if Debug['m'] > 3 {
-			fmt.Printf("%v:call to func %v\n", n.Line(), Nconv(n.Left, obj.FmtSign))
-		}
-		if n.Left.Func != nil && n.Left.Func.Inl != nil { // normal case
-			mkinlcall(np, n.Left, n.Isddd)
-		} else if n.Left.Op == ONAME && n.Left.Left != nil && n.Left.Left.Op == OTYPE && n.Left.Right != nil && n.Left.Right.Op == ONAME { // methods called as functions
-			if n.Left.Sym.Def != nil {
-				mkinlcall(np, n.Left.Sym.Def, n.Isddd)
-			}
-		}
-
-	case OCALLMETH:
-		if Debug['m'] > 3 {
-			fmt.Printf("%v:call to meth %v\n", n.Line(), Nconv(n.Left.Right, obj.FmtLong))
-		}
-
-		// typecheck should have resolved ODOTMETH->type, whose nname points to the actual function.
-		if n.Left.Type == nil {
-			Fatal("no function type for [%p] %v\n", n.Left, Nconv(n.Left, obj.FmtSign))
-		}
-
-		if n.Left.Type.Nname == nil {
-			Fatal("no function definition for [%p] %v\n", n.Left.Type, Tconv(n.Left.Type, obj.FmtSign))
-		}
-
-		mkinlcall(np, n.Left.Type.Nname, n.Isddd)
-	}
-
-	lineno = int32(lno)
-}
-
-func mkinlcall(np **Node, fn *Node, isddd bool) {
-	save_safemode := safemode
-
-	// imported functions may refer to unsafe as long as the
-	// package was marked safe during import (already checked).
-	pkg := fnpkg(fn)
-
-	if pkg != localpkg && pkg != nil {
-		safemode = 0
-	}
-	mkinlcall1(np, fn, isddd)
-	safemode = save_safemode
-}
-
-func tinlvar(t *Type) *Node {
-	if t.Nname != nil && !isblank(t.Nname) {
-		if t.Nname.Name.Inlvar == nil {
-			Fatal("missing inlvar for %v\n", t.Nname)
-		}
-		return t.Nname.Name.Inlvar
-	}
-
-	typecheck(&nblank, Erv|Easgn)
-	return nblank
-}
-
-var inlgen int
-
-// if *np is a call, and fn is a function with an inlinable body, substitute *np with an OINLCALL.
-// On return ninit has the parameter assignments, the nbody is the
-// inlined function body and list, rlist contain the input, output
-// parameters.
-func mkinlcall1(np **Node, fn *Node, isddd bool) {
-	// For variadic fn.
-	if fn.Func.Inl == nil {
-		return
-	}
-
-	if fn == Curfn || fn.Name.Defn == Curfn {
-		return
-	}
-
-	if Debug['l'] < 2 {
-		typecheckinl(fn)
-	}
-
-	n := *np
-
-	// Bingo, we have a function node, and it has an inlineable body
-	if Debug['m'] > 1 {
-		fmt.Printf("%v: inlining call to %v %v { %v }\n", n.Line(), fn.Sym, Tconv(fn.Type, obj.FmtSharp), Hconv(fn.Func.Inl, obj.FmtSharp))
-	} else if Debug['m'] != 0 {
-		fmt.Printf("%v: inlining call to %v\n", n.Line(), fn)
-	}
-
-	if Debug['m'] > 2 {
-		fmt.Printf("%v: Before inlining: %v\n", n.Line(), Nconv(n, obj.FmtSign))
-	}
-
-	saveinlfn := inlfn
-	inlfn = fn
-
-	ninit := n.Ninit
-
-	//dumplist("ninit pre", ninit);
-
-	var dcl *NodeList
-	if fn.Name.Defn != nil { // local function
-		dcl = fn.Func.Inldcl // imported function
-	} else {
-		dcl = fn.Func.Dcl
-	}
-
-	inlretvars = nil
-	i := 0
-
-	// Make temp names to use instead of the originals
-	for ll := dcl; ll != nil; ll = ll.Next {
-		if ll.N.Class == PPARAMOUT { // return values handled below.
-			continue
-		}
-		if ll.N.Op == ONAME {
-			ll.N.Name.Inlvar = inlvar(ll.N)
-
-			// Typecheck because inlvar is not necessarily a function parameter.
-			typecheck(&ll.N.Name.Inlvar, Erv)
-
-			if ll.N.Class&^PHEAP != PAUTO {
-				ninit = list(ninit, Nod(ODCL, ll.N.Name.Inlvar, nil)) // otherwise gen won't emit the allocations for heapallocs
-			}
-		}
-	}
-
-	// temporaries for return values.
-	var m *Node
-	for t := getoutargx(fn.Type).Type; t != nil; t = t.Down {
-		if t != nil && t.Nname != nil && !isblank(t.Nname) {
-			m = inlvar(t.Nname)
-			typecheck(&m, Erv)
-			t.Nname.Name.Inlvar = m
-		} else {
-			// anonymous return values, synthesize names for use in assignment that replaces return
-			m = retvar(t, i)
-			i++
-		}
-
-		ninit = list(ninit, Nod(ODCL, m, nil))
-		inlretvars = list(inlretvars, m)
-	}
-
-	// assign receiver.
-	var as *Node
-	if fn.Type.Thistuple != 0 && n.Left.Op == ODOTMETH {
-		// method call with a receiver.
-		t := getthisx(fn.Type).Type
-
-		if t != nil && t.Nname != nil && !isblank(t.Nname) && t.Nname.Name.Inlvar == nil {
-			Fatal("missing inlvar for %v\n", t.Nname)
-		}
-		if n.Left.Left == nil {
-			Fatal("method call without receiver: %v", Nconv(n, obj.FmtSign))
-		}
-		if t == nil {
-			Fatal("method call unknown receiver type: %v", Nconv(n, obj.FmtSign))
-		}
-		as = Nod(OAS, tinlvar(t), n.Left.Left)
-		if as != nil {
-			typecheck(&as, Etop)
-			ninit = list(ninit, as)
-		}
-	}
-
-	// check if inlined function is variadic.
-	variadic := false
-
-	var varargtype *Type
-	varargcount := 0
-	for t := fn.Type.Type.Down.Down.Type; t != nil; t = t.Down {
-		if t.Isddd {
-			variadic = true
-			varargtype = t.Type
-		}
-	}
-
-	// but if argument is dotted too forget about variadicity.
-	if variadic && isddd {
-		variadic = false
-	}
-
-	// check if argument is actually a returned tuple from call.
-	multiret := 0
-
-	if n.List != nil && n.List.Next == nil {
-		switch n.List.N.Op {
-		case OCALL, OCALLFUNC, OCALLINTER, OCALLMETH:
-			if n.List.N.Left.Type.Outtuple > 1 {
-				multiret = n.List.N.Left.Type.Outtuple - 1
-			}
-		}
-	}
-
-	if variadic {
-		varargcount = count(n.List) + multiret
-		if n.Left.Op != ODOTMETH {
-			varargcount -= fn.Type.Thistuple
-		}
-		varargcount -= fn.Type.Intuple - 1
-	}
-
-	// assign arguments to the parameters' temp names
-	as = Nod(OAS2, nil, nil)
-
-	as.Rlist = n.List
-	ll := n.List
-
-	// TODO: if len(nlist) == 1 but multiple args, check that n->list->n is a call?
-	if fn.Type.Thistuple != 0 && n.Left.Op != ODOTMETH {
-		// non-method call to method
-		if n.List == nil {
-			Fatal("non-method call to method without first arg: %v", Nconv(n, obj.FmtSign))
-		}
-
-		// append receiver inlvar to LHS.
-		t := getthisx(fn.Type).Type
-
-		if t != nil && t.Nname != nil && !isblank(t.Nname) && t.Nname.Name.Inlvar == nil {
-			Fatal("missing inlvar for %v\n", t.Nname)
-		}
-		if t == nil {
-			Fatal("method call unknown receiver type: %v", Nconv(n, obj.FmtSign))
-		}
-		as.List = list(as.List, tinlvar(t))
-		ll = ll.Next // track argument count.
-	}
-
-	// append ordinary arguments to LHS.
-	chkargcount := n.List != nil && n.List.Next != nil
-
-	var vararg *Node      // the slice argument to a variadic call
-	var varargs *NodeList // the list of LHS names to put in vararg.
-	if !chkargcount {
-		// 0 or 1 expression on RHS.
-		var i int
-		for t := getinargx(fn.Type).Type; t != nil; t = t.Down {
-			if variadic && t.Isddd {
-				vararg = tinlvar(t)
-				for i = 0; i < varargcount && ll != nil; i++ {
-					m = argvar(varargtype, i)
-					varargs = list(varargs, m)
-					as.List = list(as.List, m)
-				}
-
-				break
-			}
-
-			as.List = list(as.List, tinlvar(t))
-		}
-	} else {
-		// match arguments except final variadic (unless the call is dotted itself)
-		var t *Type
-		for t = getinargx(fn.Type).Type; t != nil; {
-			if ll == nil {
-				break
-			}
-			if variadic && t.Isddd {
-				break
-			}
-			as.List = list(as.List, tinlvar(t))
-			t = t.Down
-			ll = ll.Next
-		}
-
-		// match varargcount arguments with variadic parameters.
-		if variadic && t != nil && t.Isddd {
-			vararg = tinlvar(t)
-			var i int
-			for i = 0; i < varargcount && ll != nil; i++ {
-				m = argvar(varargtype, i)
-				varargs = list(varargs, m)
-				as.List = list(as.List, m)
-				ll = ll.Next
-			}
-
-			if i == varargcount {
-				t = t.Down
-			}
-		}
-
-		if ll != nil || t != nil {
-			Fatal("arg count mismatch: %v  vs %v\n", Tconv(getinargx(fn.Type), obj.FmtSharp), Hconv(n.List, obj.FmtComma))
-		}
-	}
-
-	if as.Rlist != nil {
-		typecheck(&as, Etop)
-		ninit = list(ninit, as)
-	}
-
-	// turn the variadic args into a slice.
-	if variadic {
-		as = Nod(OAS, vararg, nil)
-		if varargcount == 0 {
-			as.Right = nodnil()
-			as.Right.Type = varargtype
-		} else {
-			vararrtype := typ(TARRAY)
-			vararrtype.Type = varargtype.Type
-			vararrtype.Bound = int64(varargcount)
-
-			as.Right = Nod(OCOMPLIT, nil, typenod(varargtype))
-			as.Right.List = varargs
-			as.Right = Nod(OSLICE, as.Right, Nod(OKEY, nil, nil))
-		}
-
-		typecheck(&as, Etop)
-		ninit = list(ninit, as)
-	}
-
-	// zero the outparams
-	for ll := inlretvars; ll != nil; ll = ll.Next {
-		as = Nod(OAS, ll.N, nil)
-		typecheck(&as, Etop)
-		ninit = list(ninit, as)
-	}
-
-	inlretlabel = newlabel_inl()
-	inlgen++
-	body := inlsubstlist(fn.Func.Inl)
-
-	body = list(body, Nod(OGOTO, inlretlabel, nil)) // avoid 'not used' when function doesn't have return
-	body = list(body, Nod(OLABEL, inlretlabel, nil))
-
-	typechecklist(body, Etop)
-
-	//dumplist("ninit post", ninit);
-
-	call := Nod(OINLCALL, nil, nil)
-
-	call.Ninit = ninit
-	call.Nbody = body
-	call.Rlist = inlretvars
-	call.Type = n.Type
-	call.Typecheck = 1
-
-	// Hide the args from setlno -- the parameters to the inlined
-	// call already have good line numbers that should be preserved.
-	args := as.Rlist
-	as.Rlist = nil
-
-	setlno(call, int(n.Lineno))
-
-	as.Rlist = args
-
-	//dumplist("call body", body);
-
-	*np = call
-
-	inlfn = saveinlfn
-
-	// transitive inlining
-	// might be nice to do this before exporting the body,
-	// but can't emit the body with inlining expanded.
-	// instead we emit the things that the body needs
-	// and each use must redo the inlining.
-	// luckily these are small.
-	body = fn.Func.Inl
-	fn.Func.Inl = nil // prevent infinite recursion (shouldn't happen anyway)
-	inlnodelist(call.Nbody)
-	for ll := call.Nbody; ll != nil; ll = ll.Next {
-		if ll.N.Op == OINLCALL {
-			inlconv2stmt(ll.N)
-		}
-	}
-	fn.Func.Inl = body
-
-	if Debug['m'] > 2 {
-		fmt.Printf("%v: After inlining %v\n\n", n.Line(), Nconv(*np, obj.FmtSign))
-	}
-}
-
-// Every time we expand a function we generate a new set of tmpnames,
-// PAUTO's in the calling functions, and link them off of the
-// PPARAM's, PAUTOS and PPARAMOUTs of the called function.
-func inlvar(var_ *Node) *Node {
-	if Debug['m'] > 3 {
-		fmt.Printf("inlvar %v\n", Nconv(var_, obj.FmtSign))
-	}
-
-	n := newname(var_.Sym)
-	n.Type = var_.Type
-	n.Class = PAUTO
-	n.Used = true
-	n.Name.Curfn = Curfn // the calling function, not the called one
-	n.Addrtaken = var_.Addrtaken
-
-	// This may no longer be necessary now that we run escape analysis
-	// after wrapper generation, but for 1.5 this is conservatively left
-	// unchanged.  See bugs 11053 and 9537.
-	if var_.Esc == EscHeap {
-		addrescapes(n)
-	}
-
-	Curfn.Func.Dcl = list(Curfn.Func.Dcl, n)
-	return n
-}
-
-// Synthesize a variable to store the inlined function's results in.
-func retvar(t *Type, i int) *Node {
-	n := newname(Lookupf("~r%d", i))
-	n.Type = t.Type
-	n.Class = PAUTO
-	n.Used = true
-	n.Name.Curfn = Curfn // the calling function, not the called one
-	Curfn.Func.Dcl = list(Curfn.Func.Dcl, n)
-	return n
-}
-
-// Synthesize a variable to store the inlined function's arguments
-// when they come from a multiple return call.
-func argvar(t *Type, i int) *Node {
-	n := newname(Lookupf("~arg%d", i))
-	n.Type = t.Type
-	n.Class = PAUTO
-	n.Used = true
-	n.Name.Curfn = Curfn // the calling function, not the called one
-	Curfn.Func.Dcl = list(Curfn.Func.Dcl, n)
-	return n
-}
-
-var newlabel_inl_label int
-
-func newlabel_inl() *Node {
-	newlabel_inl_label++
-	n := newname(Lookupf(".inlret%.6d", newlabel_inl_label))
-	n.Etype = 1 // flag 'safe' for escape analysis (no backjumps)
-	return n
-}
-
-// inlsubst and inlsubstlist recursively copy the body of the saved
-// pristine ->inl body of the function while substituting references
-// to input/output parameters with ones to the tmpnames, and
-// substituting returns with assignments to the output.
-func inlsubstlist(ll *NodeList) *NodeList {
-	var l *NodeList
-	for ; ll != nil; ll = ll.Next {
-		l = list(l, inlsubst(ll.N))
-	}
-	return l
-}
-
-func inlsubst(n *Node) *Node {
-	if n == nil {
-		return nil
-	}
-
-	switch n.Op {
-	case ONAME:
-		if n.Name.Inlvar != nil { // These will be set during inlnode
-			if Debug['m'] > 2 {
-				fmt.Printf("substituting name %v  ->  %v\n", Nconv(n, obj.FmtSign), Nconv(n.Name.Inlvar, obj.FmtSign))
-			}
-			return n.Name.Inlvar
-		}
-
-		if Debug['m'] > 2 {
-			fmt.Printf("not substituting name %v\n", Nconv(n, obj.FmtSign))
-		}
-		return n
-
-	case OLITERAL, OTYPE:
-		return n
-
-		// Since we don't handle bodies with closures, this return is guaranteed to belong to the current inlined function.
-
-	//		dump("Return before substitution", n);
-	case ORETURN:
-		m := Nod(OGOTO, inlretlabel, nil)
-
-		m.Ninit = inlsubstlist(n.Ninit)
-
-		if inlretvars != nil && n.List != nil {
-			as := Nod(OAS2, nil, nil)
-
-			// shallow copy or OINLCALL->rlist will be the same list, and later walk and typecheck may clobber that.
-			for ll := inlretvars; ll != nil; ll = ll.Next {
-				as.List = list(as.List, ll.N)
-			}
-			as.Rlist = inlsubstlist(n.List)
-			typecheck(&as, Etop)
-			m.Ninit = list(m.Ninit, as)
-		}
-
-		typechecklist(m.Ninit, Etop)
-		typecheck(&m, Etop)
-
-		//		dump("Return after substitution", m);
-		return m
-
-	case OGOTO, OLABEL:
-		m := Nod(OXXX, nil, nil)
-		*m = *n
-		m.Ninit = nil
-		p := fmt.Sprintf("%s·%d", n.Left.Sym.Name, inlgen)
-		m.Left = newname(Lookup(p))
-
-		return m
-	}
-
-	m := Nod(OXXX, nil, nil)
-	*m = *n
-	m.Ninit = nil
-
-	if n.Op == OCLOSURE {
-		Fatal("cannot inline function containing closure: %v", Nconv(n, obj.FmtSign))
-	}
-
-	m.Left = inlsubst(n.Left)
-	m.Right = inlsubst(n.Right)
-	m.List = inlsubstlist(n.List)
-	m.Rlist = inlsubstlist(n.Rlist)
-	m.Ninit = concat(m.Ninit, inlsubstlist(n.Ninit))
-	m.Nbody = inlsubstlist(n.Nbody)
-
-	return m
-}
-
-// Plaster over linenumbers
-func setlnolist(ll *NodeList, lno int) {
-	for ; ll != nil; ll = ll.Next {
-		setlno(ll.N, lno)
-	}
-}
-
-func setlno(n *Node, lno int) {
-	if n == nil {
-		return
-	}
-
-	// don't clobber names, unless they're freshly synthesized
-	if n.Op != ONAME || n.Lineno == 0 {
-		n.Lineno = int32(lno)
-	}
-
-	setlno(n.Left, lno)
-	setlno(n.Right, lno)
-	setlnolist(n.List, lno)
-	setlnolist(n.Rlist, lno)
-	setlnolist(n.Ninit, lno)
-	setlnolist(n.Nbody, lno)
-}
diff --git a/src/cmd/compile/internal/gc/lex.go b/src/cmd/compile/internal/gc/lex.go
deleted file mode 100644
index 606298b..0000000
--- a/src/cmd/compile/internal/gc/lex.go
+++ /dev/null
@@ -1,2653 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:generate go tool yacc go.y
-//go:generate go run mkbuiltin.go runtime unsafe
-
-package gc
-
-import (
-	"bytes"
-	"cmd/internal/obj"
-	"flag"
-	"fmt"
-	"io"
-	"log"
-	"os"
-	"path"
-	"strconv"
-	"strings"
-	"unicode"
-	"unicode/utf8"
-)
-
-var yyprev int
-
-var yylast int
-
-var imported_unsafe int
-
-var (
-	goos    string
-	goarch  string
-	goroot  string
-	buildid string
-)
-
-var (
-	Debug_append int
-	Debug_panic  int
-	Debug_slice  int
-	Debug_wb     int
-)
-
-// Debug arguments.
-// These can be specified with the -d flag, as in "-d nil"
-// to set the debug_checknil variable. In general the list passed
-// to -d can be comma-separated.
-var debugtab = []struct {
-	name string
-	val  *int
-}{
-	{"append", &Debug_append},         // print information about append compilation
-	{"disablenil", &Disable_checknil}, // disable nil checks
-	{"gcprog", &Debug_gcprog},         // print dump of GC programs
-	{"nil", &Debug_checknil},          // print information about nil checks
-	{"panic", &Debug_panic},           // do not hide any compiler panic
-	{"slice", &Debug_slice},           // print information about slice compilation
-	{"typeassert", &Debug_typeassert}, // print information about type assertion inlining
-	{"wb", &Debug_wb},                 // print information about write barriers
-}
-
-// Our own isdigit, isspace, isalpha, isalnum that take care
-// of EOF and other out of range arguments.
-func yy_isdigit(c int) bool {
-	return c >= 0 && c <= 0xFF && isdigit(c)
-}
-
-func yy_isspace(c int) bool {
-	return c == ' ' || c == '\t' || c == '\n' || c == '\r'
-}
-
-func yy_isalpha(c int) bool {
-	return 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z'
-}
-
-func yy_isalnum(c int) bool {
-	return c >= 0 && c <= 0xFF && isalnum(c)
-}
-
-// Disallow use of isdigit etc.
-
-const (
-	EOF = -1
-)
-
-func usage() {
-	fmt.Printf("usage: %cg [options] file.go...\n", Thearch.Thechar)
-	obj.Flagprint(1)
-	Exit(2)
-}
-
-func hidePanic() {
-	if Debug_panic == 0 && nsavederrors+nerrors > 0 {
-		// If we've already complained about things
-		// in the program, don't bother complaining
-		// about a panic too; let the user clean up
-		// the code and try again.
-		if err := recover(); err != nil {
-			errorexit()
-		}
-	}
-}
-
-func doversion() {
-	p := obj.Expstring()
-	if p == "X:none" {
-		p = ""
-	}
-	sep := ""
-	if p != "" {
-		sep = " "
-	}
-	fmt.Printf("%cg version %s%s%s\n", Thearch.Thechar, obj.Getgoversion(), sep, p)
-	os.Exit(0)
-}
-
-func Main() {
-	defer hidePanic()
-
-	// Allow GOARCH=thearch.thestring or GOARCH=thearch.thestringsuffix,
-	// but not other values.
-	p := obj.Getgoarch()
-
-	if !strings.HasPrefix(p, Thearch.Thestring) {
-		log.Fatalf("cannot use %cg with GOARCH=%s", Thearch.Thechar, p)
-	}
-	goarch = p
-
-	Thearch.Linkarchinit()
-	Ctxt = obj.Linknew(Thearch.Thelinkarch)
-	Ctxt.Diag = Yyerror
-	Ctxt.Bso = &bstdout
-	bstdout = *obj.Binitw(os.Stdout)
-
-	localpkg = mkpkg("")
-	localpkg.Prefix = "\"\""
-
-	// pseudo-package, for scoping
-	builtinpkg = mkpkg("go.builtin")
-
-	builtinpkg.Prefix = "go.builtin" // not go%2ebuiltin
-
-	// pseudo-package, accessed by import "unsafe"
-	unsafepkg = mkpkg("unsafe")
-
-	unsafepkg.Name = "unsafe"
-
-	// real package, referred to by generated runtime calls
-	Runtimepkg = mkpkg("runtime")
-
-	Runtimepkg.Name = "runtime"
-
-	// pseudo-packages used in symbol tables
-	gostringpkg = mkpkg("go.string")
-
-	gostringpkg.Name = "go.string"
-	gostringpkg.Prefix = "go.string" // not go%2estring
-
-	itabpkg = mkpkg("go.itab")
-
-	itabpkg.Name = "go.itab"
-	itabpkg.Prefix = "go.itab" // not go%2eitab
-
-	weaktypepkg = mkpkg("go.weak.type")
-
-	weaktypepkg.Name = "go.weak.type"
-	weaktypepkg.Prefix = "go.weak.type" // not go%2eweak%2etype
-
-	typelinkpkg = mkpkg("go.typelink")
-	typelinkpkg.Name = "go.typelink"
-	typelinkpkg.Prefix = "go.typelink" // not go%2etypelink
-
-	trackpkg = mkpkg("go.track")
-
-	trackpkg.Name = "go.track"
-	trackpkg.Prefix = "go.track" // not go%2etrack
-
-	typepkg = mkpkg("type")
-
-	typepkg.Name = "type"
-
-	goroot = obj.Getgoroot()
-	goos = obj.Getgoos()
-
-	Nacl = goos == "nacl"
-	if Nacl {
-		flag_largemodel = 1
-	}
-
-	outfile = ""
-	obj.Flagcount("+", "compiling runtime", &compiling_runtime)
-	obj.Flagcount("%", "debug non-static initializers", &Debug['%'])
-	obj.Flagcount("A", "for bootstrapping, allow 'any' type", &Debug['A'])
-	obj.Flagcount("B", "disable bounds checking", &Debug['B'])
-	obj.Flagstr("D", "set relative `path` for local imports", &localimport)
-	obj.Flagcount("E", "debug symbol export", &Debug['E'])
-	obj.Flagfn1("I", "add `directory` to import search path", addidir)
-	obj.Flagcount("K", "debug missing line numbers", &Debug['K'])
-	obj.Flagcount("L", "use full (long) path in error messages", &Debug['L'])
-	obj.Flagcount("M", "debug move generation", &Debug['M'])
-	obj.Flagcount("N", "disable optimizations", &Debug['N'])
-	obj.Flagcount("P", "debug peephole optimizer", &Debug['P'])
-	obj.Flagcount("R", "debug register optimizer", &Debug['R'])
-	obj.Flagcount("S", "print assembly listing", &Debug['S'])
-	obj.Flagfn0("V", "print compiler version", doversion)
-	obj.Flagcount("W", "debug parse tree after type checking", &Debug['W'])
-	obj.Flagstr("asmhdr", "write assembly header to `file`", &asmhdr)
-	obj.Flagstr("buildid", "record `id` as the build id in the export metadata", &buildid)
-	obj.Flagcount("complete", "compiling complete package (no C or assembly)", &pure_go)
-	obj.Flagstr("d", "print debug information about items in `list`", &debugstr)
-	obj.Flagcount("e", "no limit on number of errors reported", &Debug['e'])
-	obj.Flagcount("f", "debug stack frames", &Debug['f'])
-	obj.Flagcount("g", "debug code generation", &Debug['g'])
-	obj.Flagcount("h", "halt on error", &Debug['h'])
-	obj.Flagcount("i", "debug line number stack", &Debug['i'])
-	obj.Flagfn1("importmap", "add `definition` of the form source=actual to import map", addImportMap)
-	obj.Flagstr("installsuffix", "set pkg directory `suffix`", &flag_installsuffix)
-	obj.Flagcount("j", "debug runtime-initialized variables", &Debug['j'])
-	obj.Flagcount("l", "disable inlining", &Debug['l'])
-	obj.Flagcount("live", "debug liveness analysis", &debuglive)
-	obj.Flagcount("m", "print optimization decisions", &Debug['m'])
-	obj.Flagcount("nolocalimports", "reject local (relative) imports", &nolocalimports)
-	obj.Flagstr("o", "write output to `file`", &outfile)
-	obj.Flagstr("p", "set expected package import `path`", &myimportpath)
-	obj.Flagcount("pack", "write package file instead of object file", &writearchive)
-	obj.Flagcount("r", "debug generated wrappers", &Debug['r'])
-	obj.Flagcount("race", "enable race detector", &flag_race)
-	obj.Flagcount("s", "warn about composite literals that can be simplified", &Debug['s'])
-	obj.Flagstr("trimpath", "remove `prefix` from recorded source file paths", &Ctxt.LineHist.TrimPathPrefix)
-	obj.Flagcount("u", "reject unsafe code", &safemode)
-	obj.Flagcount("v", "increase debug verbosity", &Debug['v'])
-	obj.Flagcount("w", "debug type checking", &Debug['w'])
-	use_writebarrier = 1
-	obj.Flagcount("wb", "enable write barrier", &use_writebarrier)
-	obj.Flagcount("x", "debug lexer", &Debug['x'])
-	obj.Flagcount("y", "debug declarations in canned imports (with -d)", &Debug['y'])
-	var flag_shared int
-	var flag_dynlink bool
-	if Thearch.Thechar == '6' {
-		obj.Flagcount("largemodel", "generate code that assumes a large memory model", &flag_largemodel)
-		obj.Flagcount("shared", "generate code that can be linked into a shared library", &flag_shared)
-		flag.BoolVar(&flag_dynlink, "dynlink", false, "support references to Go symbols defined in other shared libraries")
-	}
-	obj.Flagstr("cpuprofile", "write cpu profile to `file`", &cpuprofile)
-	obj.Flagstr("memprofile", "write memory profile to `file`", &memprofile)
-	obj.Flagint64("memprofilerate", "set runtime.MemProfileRate to `rate`", &memprofilerate)
-	obj.Flagparse(usage)
-
-	if flag_dynlink {
-		flag_shared = 1
-	}
-	Ctxt.Flag_shared = int32(flag_shared)
-	Ctxt.Flag_dynlink = flag_dynlink
-
-	Ctxt.Debugasm = int32(Debug['S'])
-	Ctxt.Debugvlog = int32(Debug['v'])
-
-	if flag.NArg() < 1 {
-		usage()
-	}
-
-	startProfile()
-
-	if flag_race != 0 {
-		racepkg = mkpkg("runtime/race")
-		racepkg.Name = "race"
-	}
-
-	// parse -d argument
-	if debugstr != "" {
-	Split:
-		for _, name := range strings.Split(debugstr, ",") {
-			if name == "" {
-				continue
-			}
-			val := 1
-			if i := strings.Index(name, "="); i >= 0 {
-				var err error
-				val, err = strconv.Atoi(name[i+1:])
-				if err != nil {
-					log.Fatalf("invalid debug value %v", name)
-				}
-				name = name[:i]
-			}
-			for _, t := range debugtab {
-				if t.name == name {
-					if t.val != nil {
-						*t.val = val
-						continue Split
-					}
-				}
-			}
-			log.Fatalf("unknown debug key -d %s\n", name)
-		}
-	}
-
-	// enable inlining.  for now:
-	//	default: inlining on.  (debug['l'] == 1)
-	//	-l: inlining off  (debug['l'] == 0)
-	//	-ll, -lll: inlining on again, with extra debugging (debug['l'] > 1)
-	if Debug['l'] <= 1 {
-		Debug['l'] = 1 - Debug['l']
-	}
-
-	Thearch.Betypeinit()
-	if Widthptr == 0 {
-		Fatal("betypeinit failed")
-	}
-
-	lexinit()
-	typeinit()
-	lexinit1()
-	// TODO(rsc): Restore yytinit?
-
-	blockgen = 1
-	dclcontext = PEXTERN
-	nerrors = 0
-	lexlineno = 1
-
-	for _, infile = range flag.Args() {
-		linehistpush(infile)
-
-		curio.infile = infile
-		var err error
-		curio.bin, err = obj.Bopenr(infile)
-		if err != nil {
-			fmt.Printf("open %s: %v\n", infile, err)
-			errorexit()
-		}
-
-		curio.peekc = 0
-		curio.peekc1 = 0
-		curio.nlsemi = 0
-		curio.eofnl = 0
-		curio.last = 0
-
-		// Skip initial BOM if present.
-		if obj.Bgetrune(curio.bin) != obj.BOM {
-			obj.Bungetrune(curio.bin)
-		}
-
-		block = 1
-		iota_ = -1000000
-
-		imported_unsafe = 0
-
-		yyparse()
-		if nsyntaxerrors != 0 {
-			errorexit()
-		}
-
-		linehistpop()
-		if curio.bin != nil {
-			obj.Bterm(curio.bin)
-		}
-	}
-
-	testdclstack()
-	mkpackage(localpkg.Name) // final import not used checks
-	lexfini()
-
-	typecheckok = 1
-	if Debug['f'] != 0 {
-		frame(1)
-	}
-
-	// Process top-level declarations in phases.
-
-	// Phase 1: const, type, and names and types of funcs.
-	//   This will gather all the information about types
-	//   and methods but doesn't depend on any of it.
-	defercheckwidth()
-
-	for l := xtop; l != nil; l = l.Next {
-		if l.N.Op != ODCL && l.N.Op != OAS && l.N.Op != OAS2 {
-			typecheck(&l.N, Etop)
-		}
-	}
-
-	// Phase 2: Variable assignments.
-	//   To check interface assignments, depends on phase 1.
-	for l := xtop; l != nil; l = l.Next {
-		if l.N.Op == ODCL || l.N.Op == OAS || l.N.Op == OAS2 {
-			typecheck(&l.N, Etop)
-		}
-	}
-	resumecheckwidth()
-
-	// Phase 3: Type check function bodies.
-	for l := xtop; l != nil; l = l.Next {
-		if l.N.Op == ODCLFUNC || l.N.Op == OCLOSURE {
-			Curfn = l.N
-			decldepth = 1
-			saveerrors()
-			typechecklist(l.N.Nbody, Etop)
-			checkreturn(l.N)
-			if nerrors != 0 {
-				l.N.Nbody = nil // type errors; do not compile
-			}
-		}
-	}
-
-	// Phase 4: Decide how to capture closed variables.
-	// This needs to run before escape analysis,
-	// because variables captured by value do not escape.
-	for l := xtop; l != nil; l = l.Next {
-		if l.N.Op == ODCLFUNC && l.N.Func.Closure != nil {
-			Curfn = l.N
-			capturevars(l.N)
-		}
-	}
-
-	Curfn = nil
-
-	if nsavederrors+nerrors != 0 {
-		errorexit()
-	}
-
-	// Phase 5: Inlining
-	if Debug['l'] > 1 {
-		// Typecheck imported function bodies if debug['l'] > 1,
-		// otherwise lazily when used or re-exported.
-		for l := importlist; l != nil; l = l.Next {
-			if l.N.Func.Inl != nil {
-				saveerrors()
-				typecheckinl(l.N)
-			}
-		}
-
-		if nsavederrors+nerrors != 0 {
-			errorexit()
-		}
-	}
-
-	if Debug['l'] != 0 {
-		// Find functions that can be inlined and clone them before walk expands them.
-		visitBottomUp(xtop, func(list *NodeList, recursive bool) {
-			for l := list; l != nil; l = l.Next {
-				if l.N.Op == ODCLFUNC {
-					caninl(l.N)
-					inlcalls(l.N)
-				}
-			}
-		})
-	}
-
-	// Phase 6: Escape analysis.
-	// Required for moving heap allocations onto stack,
-	// which in turn is required by the closure implementation,
-	// which stores the addresses of stack variables into the closure.
-	// If the closure does not escape, it needs to be on the stack
-	// or else the stack copier will not update it.
-	// Large values are also moved off stack in escape analysis;
-	// because large values may contain pointers, it must happen early.
-	escapes(xtop)
-
-	// Phase 7: Transform closure bodies to properly reference captured variables.
-	// This needs to happen before walk, because closures must be transformed
-	// before walk reaches a call of a closure.
-	for l := xtop; l != nil; l = l.Next {
-		if l.N.Op == ODCLFUNC && l.N.Func.Closure != nil {
-			Curfn = l.N
-			transformclosure(l.N)
-		}
-	}
-
-	Curfn = nil
-
-	// Phase 8: Compile top level functions.
-	for l := xtop; l != nil; l = l.Next {
-		if l.N.Op == ODCLFUNC {
-			funccompile(l.N)
-		}
-	}
-
-	if nsavederrors+nerrors == 0 {
-		fninit(xtop)
-	}
-
-	// Phase 9: Check external declarations.
-	for l := externdcl; l != nil; l = l.Next {
-		if l.N.Op == ONAME {
-			typecheck(&l.N, Erv)
-		}
-	}
-
-	if nerrors+nsavederrors != 0 {
-		errorexit()
-	}
-
-	dumpobj()
-
-	if asmhdr != "" {
-		dumpasmhdr()
-	}
-
-	if nerrors+nsavederrors != 0 {
-		errorexit()
-	}
-
-	Flusherrors()
-}
-
-var importMap = map[string]string{}
-
-func addImportMap(s string) {
-	if strings.Count(s, "=") != 1 {
-		log.Fatal("-importmap argument must be of the form source=actual")
-	}
-	i := strings.Index(s, "=")
-	source, actual := s[:i], s[i+1:]
-	if source == "" || actual == "" {
-		log.Fatal("-importmap argument must be of the form source=actual; source and actual must be non-empty")
-	}
-	importMap[source] = actual
-}
-
-func saveerrors() {
-	nsavederrors += nerrors
-	nerrors = 0
-}
-
-func arsize(b *obj.Biobuf, name string) int {
-	var buf [ArhdrSize]byte
-	if _, err := io.ReadFull(b, buf[:]); err != nil {
-		return -1
-	}
-	aname := strings.Trim(string(buf[0:16]), " ")
-	if !strings.HasPrefix(aname, name) {
-		return -1
-	}
-	asize := strings.Trim(string(buf[48:58]), " ")
-	i, _ := strconv.Atoi(asize)
-	return i
-}
-
-func skiptopkgdef(b *obj.Biobuf) bool {
-	/* archive header */
-	p := obj.Brdline(b, '\n')
-	if p == "" {
-		return false
-	}
-	if obj.Blinelen(b) != 8 {
-		return false
-	}
-	if p != "!<arch>\n" {
-		return false
-	}
-
-	/* symbol table may be first; skip it */
-	sz := arsize(b, "__.GOSYMDEF")
-
-	if sz >= 0 {
-		obj.Bseek(b, int64(sz), 1)
-	} else {
-		obj.Bseek(b, 8, 0)
-	}
-
-	/* package export block is next */
-	sz = arsize(b, "__.PKGDEF")
-
-	if sz <= 0 {
-		return false
-	}
-	return true
-}
-
-func addidir(dir string) {
-	if dir == "" {
-		return
-	}
-
-	var pp **Idir
-	for pp = &idirs; *pp != nil; pp = &(*pp).link {
-	}
-	*pp = new(Idir)
-	(*pp).link = nil
-	(*pp).dir = dir
-}
-
-// is this path a local name?  begins with ./ or ../ or /
-func islocalname(name string) bool {
-	return strings.HasPrefix(name, "/") ||
-		Ctxt.Windows != 0 && len(name) >= 3 && yy_isalpha(int(name[0])) && name[1] == ':' && name[2] == '/' ||
-		strings.HasPrefix(name, "./") || name == "." ||
-		strings.HasPrefix(name, "../") || name == ".."
-}
-
-func findpkg(name string) (file string, ok bool) {
-	if islocalname(name) {
-		if safemode != 0 || nolocalimports != 0 {
-			return "", false
-		}
-
-		// try .a before .6.  important for building libraries:
-		// if there is an array.6 in the array.a library,
-		// want to find all of array.a, not just array.6.
-		file = fmt.Sprintf("%s.a", name)
-		if obj.Access(file, 0) >= 0 {
-			return file, true
-		}
-		file = fmt.Sprintf("%s.o", name)
-		if obj.Access(file, 0) >= 0 {
-			return file, true
-		}
-		return "", false
-	}
-
-	// local imports should be canonicalized already.
-	// don't want to see "encoding/../encoding/base64"
-	// as different from "encoding/base64".
-	var q string
-	_ = q
-	if path.Clean(name) != name {
-		Yyerror("non-canonical import path %q (should be %q)", name, q)
-		return "", false
-	}
-
-	for p := idirs; p != nil; p = p.link {
-		file = fmt.Sprintf("%s/%s.a", p.dir, name)
-		if obj.Access(file, 0) >= 0 {
-			return file, true
-		}
-		file = fmt.Sprintf("%s/%s.o", p.dir, name)
-		if obj.Access(file, 0) >= 0 {
-			return file, true
-		}
-	}
-
-	if goroot != "" {
-		suffix := ""
-		suffixsep := ""
-		if flag_installsuffix != "" {
-			suffixsep = "_"
-			suffix = flag_installsuffix
-		} else if flag_race != 0 {
-			suffixsep = "_"
-			suffix = "race"
-		}
-
-		file = fmt.Sprintf("%s/pkg/%s_%s%s%s/%s.a", goroot, goos, goarch, suffixsep, suffix, name)
-		if obj.Access(file, 0) >= 0 {
-			return file, true
-		}
-		file = fmt.Sprintf("%s/pkg/%s_%s%s%s/%s.o", goroot, goos, goarch, suffixsep, suffix, name)
-		if obj.Access(file, 0) >= 0 {
-			return file, true
-		}
-	}
-
-	return "", false
-}
-
-func fakeimport() {
-	importpkg = mkpkg("fake")
-	cannedimports("fake.o", "$$\n")
-}
-
-func importfile(f *Val, line int) {
-	if _, ok := f.U.(string); !ok {
-		Yyerror("import statement not a string")
-		fakeimport()
-		return
-	}
-
-	if len(f.U.(string)) == 0 {
-		Yyerror("import path is empty")
-		fakeimport()
-		return
-	}
-
-	if isbadimport(f.U.(string)) {
-		fakeimport()
-		return
-	}
-
-	// The package name main is no longer reserved,
-	// but we reserve the import path "main" to identify
-	// the main package, just as we reserve the import
-	// path "math" to identify the standard math package.
-	if f.U.(string) == "main" {
-		Yyerror("cannot import \"main\"")
-		errorexit()
-	}
-
-	if myimportpath != "" && f.U.(string) == myimportpath {
-		Yyerror("import %q while compiling that package (import cycle)", f.U.(string))
-		errorexit()
-	}
-
-	if f.U.(string) == "unsafe" {
-		if safemode != 0 {
-			Yyerror("cannot import package unsafe")
-			errorexit()
-		}
-
-		importpkg = mkpkg(f.U.(string))
-		cannedimports("unsafe.o", unsafeimport)
-		imported_unsafe = 1
-		return
-	}
-
-	path_ := f.U.(string)
-
-	if mapped, ok := importMap[path_]; ok {
-		path_ = mapped
-	}
-
-	if islocalname(path_) {
-		if path_[0] == '/' {
-			Yyerror("import path cannot be absolute path")
-			fakeimport()
-			return
-		}
-
-		prefix := Ctxt.Pathname
-		if localimport != "" {
-			prefix = localimport
-		}
-		cleanbuf := prefix
-		cleanbuf += "/"
-		cleanbuf += path_
-		cleanbuf = path.Clean(cleanbuf)
-		path_ = cleanbuf
-
-		if isbadimport(path_) {
-			fakeimport()
-			return
-		}
-	}
-
-	file, found := findpkg(path_)
-	if !found {
-		Yyerror("can't find import: %q", f.U.(string))
-		errorexit()
-	}
-
-	importpkg = mkpkg(path_)
-
-	// If we already saw that package, feed a dummy statement
-	// to the lexer to avoid parsing export data twice.
-	if importpkg.Imported != 0 {
-		tag := ""
-		if importpkg.Safe {
-			tag = "safe"
-		}
-
-		p := fmt.Sprintf("package %s %s\n$$\n", importpkg.Name, tag)
-		cannedimports(file, p)
-		return
-	}
-
-	importpkg.Imported = 1
-
-	var err error
-	var imp *obj.Biobuf
-	imp, err = obj.Bopenr(file)
-	if err != nil {
-		Yyerror("can't open import: %q: %v", f.U.(string), err)
-		errorexit()
-	}
-
-	if strings.HasSuffix(file, ".a") {
-		if !skiptopkgdef(imp) {
-			Yyerror("import %s: not a package file", file)
-			errorexit()
-		}
-	}
-
-	// check object header
-	p := obj.Brdstr(imp, '\n', 1)
-
-	if p != "empty archive" {
-		if !strings.HasPrefix(p, "go object ") {
-			Yyerror("import %s: not a go object file", file)
-			errorexit()
-		}
-
-		q := fmt.Sprintf("%s %s %s %s", obj.Getgoos(), obj.Getgoarch(), obj.Getgoversion(), obj.Expstring())
-		if p[10:] != q {
-			Yyerror("import %s: object is [%s] expected [%s]", file, p[10:], q)
-			errorexit()
-		}
-	}
-
-	// assume files move (get installed)
-	// so don't record the full path.
-	linehistpragma(file[len(file)-len(path_)-2:]) // acts as #pragma lib
-
-	/*
-	 * position the input right
-	 * after $$ and return
-	 */
-	pushedio = curio
-
-	curio.bin = imp
-	curio.peekc = 0
-	curio.peekc1 = 0
-	curio.infile = file
-	curio.nlsemi = 0
-	typecheckok = 1
-
-	var c int32
-	for {
-		c = int32(getc())
-		if c == EOF {
-			break
-		}
-		if c != '$' {
-			continue
-		}
-		c = int32(getc())
-		if c == EOF {
-			break
-		}
-		if c != '$' {
-			continue
-		}
-		return
-	}
-
-	Yyerror("no import in %q", f.U.(string))
-	unimportfile()
-}
-
-func unimportfile() {
-	if curio.bin != nil {
-		obj.Bterm(curio.bin)
-		curio.bin = nil
-	} else {
-		lexlineno-- // re correct sys.6 line number
-	}
-
-	curio = pushedio
-
-	pushedio.bin = nil
-	incannedimport = 0
-	typecheckok = 0
-}
-
-func cannedimports(file string, cp string) {
-	lexlineno++ // if sys.6 is included on line 1,
-
-	pushedio = curio
-
-	curio.bin = nil
-	curio.peekc = 0
-	curio.peekc1 = 0
-	curio.infile = file
-	curio.cp = cp
-	curio.nlsemi = 0
-	curio.importsafe = false
-
-	typecheckok = 1
-	incannedimport = 1
-}
-
-func isfrog(c int) bool {
-	// complain about possibly invisible control characters
-	if c < ' ' {
-		return !yy_isspace(c) // exclude good white space
-	}
-
-	if 0x7f <= c && c <= 0xa0 { // DEL, unicode block including unbreakable space.
-		return true
-	}
-	return false
-}
-
-type Loophack struct {
-	v    int
-	next *Loophack
-}
-
-var _yylex_lstk *Loophack
-
-func _yylex(yylval *yySymType) int32 {
-	var c1 int
-	var escflag int
-	var v int64
-	var cp *bytes.Buffer
-	var rune_ uint
-	var s *Sym
-	var h *Loophack
-	var str string
-
-	prevlineno = lineno
-
-l0:
-	c := getc()
-	if yy_isspace(c) {
-		if c == '\n' && curio.nlsemi != 0 {
-			ungetc(c)
-			if Debug['x'] != 0 {
-				fmt.Printf("lex: implicit semi\n")
-			}
-			return ';'
-		}
-
-		goto l0
-	}
-
-	lineno = lexlineno /* start of token */
-
-	if c >= utf8.RuneSelf {
-		/* all multibyte runes are alpha */
-		cp = &lexbuf
-		cp.Reset()
-
-		goto talph
-	}
-
-	if yy_isalpha(c) {
-		cp = &lexbuf
-		cp.Reset()
-		goto talph
-	}
-
-	if yy_isdigit(c) {
-		cp = &lexbuf
-		cp.Reset()
-		if c != '0' {
-			for {
-				cp.WriteByte(byte(c))
-				c = getc()
-				if yy_isdigit(c) {
-					continue
-				}
-				if c == '.' {
-					goto casedot
-				}
-				if c == 'e' || c == 'E' || c == 'p' || c == 'P' {
-					goto caseep
-				}
-				if c == 'i' {
-					goto casei
-				}
-				goto ncu
-			}
-		}
-
-		cp.WriteByte(byte(c))
-		c = getc()
-		if c == 'x' || c == 'X' {
-			for {
-				cp.WriteByte(byte(c))
-				c = getc()
-				if yy_isdigit(c) {
-					continue
-				}
-				if c >= 'a' && c <= 'f' {
-					continue
-				}
-				if c >= 'A' && c <= 'F' {
-					continue
-				}
-				if lexbuf.Len() == 2 {
-					Yyerror("malformed hex constant")
-				}
-				if c == 'p' {
-					goto caseep
-				}
-				goto ncu
-			}
-		}
-
-		if c == 'p' { // 0p begins floating point zero
-			goto caseep
-		}
-
-		c1 = 0
-		for {
-			if !yy_isdigit(c) {
-				break
-			}
-			if c < '0' || c > '7' {
-				c1 = 1 // not octal
-			}
-			cp.WriteByte(byte(c))
-			c = getc()
-		}
-
-		if c == '.' {
-			goto casedot
-		}
-		if c == 'e' || c == 'E' {
-			goto caseep
-		}
-		if c == 'i' {
-			goto casei
-		}
-		if c1 != 0 {
-			Yyerror("malformed octal constant")
-		}
-		goto ncu
-	}
-
-	switch c {
-	case EOF:
-		lineno = prevlineno
-		ungetc(EOF)
-		return -1
-
-	case '_':
-		cp = &lexbuf
-		cp.Reset()
-		goto talph
-
-	case '.':
-		c1 = getc()
-		if yy_isdigit(c1) {
-			cp = &lexbuf
-			cp.Reset()
-			cp.WriteByte(byte(c))
-			c = c1
-			goto casedot
-		}
-
-		if c1 == '.' {
-			c1 = getc()
-			if c1 == '.' {
-				c = LDDD
-				goto lx
-			}
-
-			ungetc(c1)
-			c1 = '.'
-		}
-
-		/* "..." */
-	case '"':
-		lexbuf.Reset()
-		lexbuf.WriteString(`"<string>"`)
-
-		cp = &strbuf
-		cp.Reset()
-
-		for {
-			if escchar('"', &escflag, &v) {
-				break
-			}
-			if v < utf8.RuneSelf || escflag != 0 {
-				cp.WriteByte(byte(v))
-			} else {
-				rune_ = uint(v)
-				cp.WriteRune(rune(rune_))
-			}
-		}
-
-		goto strlit
-
-		/* `...` */
-	case '`':
-		lexbuf.Reset()
-		lexbuf.WriteString("`<string>`")
-
-		cp = &strbuf
-		cp.Reset()
-
-		for {
-			c = int(getr())
-			if c == '\r' {
-				continue
-			}
-			if c == EOF {
-				Yyerror("eof in string")
-				break
-			}
-
-			if c == '`' {
-				break
-			}
-			cp.WriteRune(rune(c))
-		}
-
-		goto strlit
-
-		/* '.' */
-	case '\'':
-		if escchar('\'', &escflag, &v) {
-			Yyerror("empty character literal or unescaped ' in character literal")
-			v = '\''
-		}
-
-		if !escchar('\'', &escflag, &v) {
-			Yyerror("missing '")
-			ungetc(int(v))
-		}
-
-		x := new(Mpint)
-		yylval.val.U = x
-		Mpmovecfix(x, v)
-		x.Rune = true
-		if Debug['x'] != 0 {
-			fmt.Printf("lex: codepoint literal\n")
-		}
-		litbuf = "string literal"
-		return LLITERAL
-
-	case '/':
-		c1 = getc()
-		if c1 == '*' {
-			nl := 0
-			for {
-				c = int(getr())
-				if c == '\n' {
-					nl = 1
-				}
-				for c == '*' {
-					c = int(getr())
-					if c == '/' {
-						if nl != 0 {
-							ungetc('\n')
-						}
-						goto l0
-					}
-
-					if c == '\n' {
-						nl = 1
-					}
-				}
-
-				if c == EOF {
-					Yyerror("eof in comment")
-					errorexit()
-				}
-			}
-		}
-
-		if c1 == '/' {
-			c = getlinepragma()
-			for {
-				if c == '\n' || c == EOF {
-					ungetc(c)
-					goto l0
-				}
-
-				c = int(getr())
-			}
-		}
-
-		if c1 == '=' {
-			c = ODIV
-			goto asop
-		}
-
-	case ':':
-		c1 = getc()
-		if c1 == '=' {
-			c = LCOLAS
-			yylval.i = int(lexlineno)
-			goto lx
-		}
-
-	case '*':
-		c1 = getc()
-		if c1 == '=' {
-			c = OMUL
-			goto asop
-		}
-
-	case '%':
-		c1 = getc()
-		if c1 == '=' {
-			c = OMOD
-			goto asop
-		}
-
-	case '+':
-		c1 = getc()
-		if c1 == '+' {
-			c = LINC
-			goto lx
-		}
-
-		if c1 == '=' {
-			c = OADD
-			goto asop
-		}
-
-	case '-':
-		c1 = getc()
-		if c1 == '-' {
-			c = LDEC
-			goto lx
-		}
-
-		if c1 == '=' {
-			c = OSUB
-			goto asop
-		}
-
-	case '>':
-		c1 = getc()
-		if c1 == '>' {
-			c = LRSH
-			c1 = getc()
-			if c1 == '=' {
-				c = ORSH
-				goto asop
-			}
-
-			break
-		}
-
-		if c1 == '=' {
-			c = LGE
-			goto lx
-		}
-
-		c = LGT
-
-	case '<':
-		c1 = getc()
-		if c1 == '<' {
-			c = LLSH
-			c1 = getc()
-			if c1 == '=' {
-				c = OLSH
-				goto asop
-			}
-
-			break
-		}
-
-		if c1 == '=' {
-			c = LLE
-			goto lx
-		}
-
-		if c1 == '-' {
-			c = LCOMM
-			goto lx
-		}
-
-		c = LLT
-
-	case '=':
-		c1 = getc()
-		if c1 == '=' {
-			c = LEQ
-			goto lx
-		}
-
-	case '!':
-		c1 = getc()
-		if c1 == '=' {
-			c = LNE
-			goto lx
-		}
-
-	case '&':
-		c1 = getc()
-		if c1 == '&' {
-			c = LANDAND
-			goto lx
-		}
-
-		if c1 == '^' {
-			c = LANDNOT
-			c1 = getc()
-			if c1 == '=' {
-				c = OANDNOT
-				goto asop
-			}
-
-			break
-		}
-
-		if c1 == '=' {
-			c = OAND
-			goto asop
-		}
-
-	case '|':
-		c1 = getc()
-		if c1 == '|' {
-			c = LOROR
-			goto lx
-		}
-
-		if c1 == '=' {
-			c = OOR
-			goto asop
-		}
-
-	case '^':
-		c1 = getc()
-		if c1 == '=' {
-			c = OXOR
-			goto asop
-		}
-
-		/*
-		 * clumsy dance:
-		 * to implement rule that disallows
-		 *	if T{1}[0] { ... }
-		 * but allows
-		 * 	if (T{1}[0]) { ... }
-		 * the block bodies for if/for/switch/select
-		 * begin with an LBODY token, not '{'.
-		 *
-		 * when we see the keyword, the next
-		 * non-parenthesized '{' becomes an LBODY.
-		 * loophack is normally 0.
-		 * a keyword makes it go up to 1.
-		 * parens push loophack onto a stack and go back to 0.
-		 * a '{' with loophack == 1 becomes LBODY and disables loophack.
-		 *
-		 * i said it was clumsy.
-		 */
-	case '(', '[':
-		if loophack != 0 || _yylex_lstk != nil {
-			h = new(Loophack)
-			if h == nil {
-				Flusherrors()
-				Yyerror("out of memory")
-				errorexit()
-			}
-
-			h.v = loophack
-			h.next = _yylex_lstk
-			_yylex_lstk = h
-			loophack = 0
-		}
-
-		goto lx
-
-	case ')', ']':
-		if _yylex_lstk != nil {
-			h = _yylex_lstk
-			loophack = h.v
-			_yylex_lstk = h.next
-		}
-
-		goto lx
-
-	case '{':
-		if loophack == 1 {
-			if Debug['x'] != 0 {
-				fmt.Printf("%v lex: LBODY\n", Ctxt.Line(int(lexlineno)))
-			}
-			loophack = 0
-			return LBODY
-		}
-
-		goto lx
-
-	default:
-		goto lx
-	}
-
-	ungetc(c1)
-
-lx:
-	if c > 0xff {
-		if Debug['x'] != 0 {
-			fmt.Printf("%v lex: TOKEN %s\n", Ctxt.Line(int(lexlineno)), lexname(c))
-		}
-	} else {
-		if Debug['x'] != 0 {
-			fmt.Printf("%v lex: TOKEN '%c'\n", Ctxt.Line(int(lexlineno)), c)
-		}
-	}
-	if isfrog(c) {
-		Yyerror("illegal character 0x%x", uint(c))
-		goto l0
-	}
-
-	if importpkg == nil && (c == '#' || c == '$' || c == '?' || c == '@' || c == '\\') {
-		Yyerror("%s: unexpected %c", "syntax error", c)
-		goto l0
-	}
-
-	return int32(c)
-
-asop:
-	yylval.i = c // rathole to hold which asop
-	if Debug['x'] != 0 {
-		fmt.Printf("lex: TOKEN ASOP %c\n", c)
-	}
-	return LASOP
-
-	/*
-	 * cp is set to lexbuf and some
-	 * prefix has been stored
-	 */
-talph:
-	for {
-		if c >= utf8.RuneSelf {
-			ungetc(c)
-			rune_ = uint(getr())
-
-			// 0xb7 · is used for internal names
-			if !unicode.IsLetter(rune(rune_)) && !unicode.IsDigit(rune(rune_)) && (importpkg == nil || rune_ != 0xb7) {
-				Yyerror("invalid identifier character U+%04x", rune_)
-			}
-			cp.WriteRune(rune(rune_))
-		} else if !yy_isalnum(c) && c != '_' {
-			break
-		} else {
-			cp.WriteByte(byte(c))
-		}
-		c = getc()
-	}
-
-	cp = nil
-	ungetc(c)
-
-	s = LookupBytes(lexbuf.Bytes())
-	switch s.Lexical {
-	case LIGNORE:
-		goto l0
-
-	case LFOR, LIF, LSWITCH, LSELECT:
-		loophack = 1 // see comment about loophack above
-	}
-
-	if Debug['x'] != 0 {
-		fmt.Printf("lex: %s %s\n", s, lexname(int(s.Lexical)))
-	}
-	yylval.sym = s
-	return int32(s.Lexical)
-
-ncu:
-	cp = nil
-	ungetc(c)
-
-	str = lexbuf.String()
-	yylval.val.U = new(Mpint)
-	mpatofix(yylval.val.U.(*Mpint), str)
-	if yylval.val.U.(*Mpint).Ovf {
-		Yyerror("overflow in constant")
-		Mpmovecfix(yylval.val.U.(*Mpint), 0)
-	}
-
-	if Debug['x'] != 0 {
-		fmt.Printf("lex: integer literal\n")
-	}
-	litbuf = "literal " + str
-	return LLITERAL
-
-casedot:
-	for {
-		cp.WriteByte(byte(c))
-		c = getc()
-		if !yy_isdigit(c) {
-			break
-		}
-	}
-
-	if c == 'i' {
-		goto casei
-	}
-	if c != 'e' && c != 'E' {
-		goto caseout
-	}
-
-caseep:
-	if importpkg == nil && (c == 'p' || c == 'P') {
-		// <mantissa>p<base-2-exponent> is allowed in .a/.o imports,
-		// but not in .go sources.  See #9036.
-		Yyerror("malformed floating point constant")
-	}
-	cp.WriteByte(byte(c))
-	c = getc()
-	if c == '+' || c == '-' {
-		cp.WriteByte(byte(c))
-		c = getc()
-	}
-
-	if !yy_isdigit(c) {
-		Yyerror("malformed floating point constant exponent")
-	}
-	for yy_isdigit(c) {
-		cp.WriteByte(byte(c))
-		c = getc()
-	}
-
-	if c == 'i' {
-		goto casei
-	}
-	goto caseout
-
-	// imaginary constant
-casei:
-	cp = nil
-
-	str = lexbuf.String()
-	yylval.val.U = new(Mpcplx)
-	Mpmovecflt(&yylval.val.U.(*Mpcplx).Real, 0.0)
-	mpatoflt(&yylval.val.U.(*Mpcplx).Imag, str)
-	if yylval.val.U.(*Mpcplx).Imag.Val.IsInf() {
-		Yyerror("overflow in imaginary constant")
-		Mpmovecflt(&yylval.val.U.(*Mpcplx).Real, 0.0)
-	}
-
-	if Debug['x'] != 0 {
-		fmt.Printf("lex: imaginary literal\n")
-	}
-	litbuf = "literal " + str
-	return LLITERAL
-
-caseout:
-	cp = nil
-	ungetc(c)
-
-	str = lexbuf.String()
-	yylval.val.U = newMpflt()
-	mpatoflt(yylval.val.U.(*Mpflt), str)
-	if yylval.val.U.(*Mpflt).Val.IsInf() {
-		Yyerror("overflow in float constant")
-		Mpmovecflt(yylval.val.U.(*Mpflt), 0.0)
-	}
-
-	if Debug['x'] != 0 {
-		fmt.Printf("lex: floating literal\n")
-	}
-	litbuf = "literal " + str
-	return LLITERAL
-
-strlit:
-	yylval.val.U = internString(cp.Bytes())
-	if Debug['x'] != 0 {
-		fmt.Printf("lex: string literal\n")
-	}
-	litbuf = "string literal"
-	return LLITERAL
-}
-
-var internedStrings = map[string]string{}
-
-func internString(b []byte) string {
-	s, ok := internedStrings[string(b)] // string(b) here doesn't allocate
-	if ok {
-		return s
-	}
-	s = string(b)
-	internedStrings[s] = s
-	return s
-}
-
-func more(pp *string) bool {
-	p := *pp
-	for p != "" && yy_isspace(int(p[0])) {
-		p = p[1:]
-	}
-	*pp = p
-	return p != ""
-}
-
-/*
- * read and interpret syntax that looks like
- * //line parse.y:15
- * as a discontinuity in sequential line numbers.
- * the next line of input comes from parse.y:15
- */
-func getlinepragma() int {
-	var cmd, verb, name string
-
-	c := int(getr())
-	if c == 'g' {
-		cp := &lexbuf
-		cp.Reset()
-		cp.WriteByte('g') // already read
-		for {
-			c = int(getr())
-			if c == EOF || c >= utf8.RuneSelf {
-				return c
-			}
-			if c == '\n' {
-				break
-			}
-			cp.WriteByte(byte(c))
-		}
-		cp = nil
-
-		text := strings.TrimSuffix(lexbuf.String(), "\r")
-
-		if strings.HasPrefix(text, "go:cgo_") {
-			pragcgo(text)
-		}
-
-		cmd = text
-		verb = cmd
-		if i := strings.Index(verb, " "); i >= 0 {
-			verb = verb[:i]
-		}
-
-		if verb == "go:linkname" {
-			if imported_unsafe == 0 {
-				Yyerror("//go:linkname only allowed in Go files that import \"unsafe\"")
-			}
-			f := strings.Fields(cmd)
-			if len(f) != 3 {
-				Yyerror("usage: //go:linkname localname linkname")
-				return c
-			}
-
-			Lookup(f[1]).Linkname = f[2]
-			return c
-		}
-
-		if verb == "go:nointerface" && obj.Fieldtrack_enabled != 0 {
-			nointerface = true
-			return c
-		}
-
-		if verb == "go:noescape" {
-			noescape = true
-			return c
-		}
-
-		if verb == "go:norace" {
-			norace = true
-			return c
-		}
-
-		if verb == "go:nosplit" {
-			nosplit = true
-			return c
-		}
-
-		if verb == "go:systemstack" {
-			systemstack = true
-			return c
-		}
-
-		if verb == "go:nowritebarrier" {
-			if compiling_runtime == 0 {
-				Yyerror("//go:nowritebarrier only allowed in runtime")
-			}
-			nowritebarrier = true
-			return c
-		}
-		return c
-	}
-	if c != 'l' {
-		return c
-	}
-	for i := 1; i < 5; i++ {
-		c = int(getr())
-		if c != int("line "[i]) {
-			return c
-		}
-	}
-
-	cp := &lexbuf
-	cp.Reset()
-	linep := 0
-	for {
-		c = int(getr())
-		if c == EOF {
-			return c
-		}
-		if c == '\n' {
-			break
-		}
-		if c == ' ' {
-			continue
-		}
-		if c == ':' {
-			linep = cp.Len() + 1
-		}
-		cp.WriteByte(byte(c))
-	}
-
-	cp = nil
-
-	if linep == 0 {
-		return c
-	}
-	text := strings.TrimSuffix(lexbuf.String(), "\r")
-	n := 0
-	for _, c := range text[linep:] {
-		if c < '0' || c > '9' {
-			goto out
-		}
-		n = n*10 + int(c) - '0'
-		if n > 1e8 {
-			Yyerror("line number out of range")
-			errorexit()
-		}
-	}
-
-	if n <= 0 {
-		return c
-	}
-
-	name = text[:linep-1]
-	linehistupdate(name, n)
-	return c
-
-out:
-	return c
-}
-
-func getimpsym(pp *string) string {
-	more(pp) // skip spaces
-	p := *pp
-	if p == "" || p[0] == '"' {
-		return ""
-	}
-	i := 0
-	for i < len(p) && !yy_isspace(int(p[i])) && p[i] != '"' {
-		i++
-	}
-	sym := p[:i]
-	*pp = p[i:]
-	return sym
-}
-
-func getquoted(pp *string) (string, bool) {
-	more(pp) // skip spaces
-	p := *pp
-	if p == "" || p[0] != '"' {
-		return "", false
-	}
-	p = p[1:]
-	i := strings.Index(p, `"`)
-	if i < 0 {
-		return "", false
-	}
-	*pp = p[i+1:]
-	return p[:i], true
-}
-
-// Copied nearly verbatim from the C compiler's #pragma parser.
-// TODO: Rewrite more cleanly once the compiler is written in Go.
-func pragcgo(text string) {
-	var q string
-
-	if i := strings.Index(text, " "); i >= 0 {
-		text, q = text[:i], text[i:]
-	}
-
-	verb := text[3:] // skip "go:"
-
-	if verb == "cgo_dynamic_linker" || verb == "dynlinker" {
-		var ok bool
-		var p string
-		p, ok = getquoted(&q)
-		if !ok {
-			Yyerror("usage: //go:cgo_dynamic_linker \"path\"")
-			return
-		}
-		pragcgobuf += fmt.Sprintf("cgo_dynamic_linker %v\n", plan9quote(p))
-		return
-
-	}
-
-	if verb == "dynexport" {
-		verb = "cgo_export_dynamic"
-	}
-	if verb == "cgo_export_static" || verb == "cgo_export_dynamic" {
-		local := getimpsym(&q)
-		var remote string
-		if local == "" {
-			goto err2
-		}
-		if !more(&q) {
-			pragcgobuf += fmt.Sprintf("%s %v\n", verb, plan9quote(local))
-			return
-		}
-
-		remote = getimpsym(&q)
-		if remote == "" {
-			goto err2
-		}
-		pragcgobuf += fmt.Sprintf("%s %v %v\n", verb, plan9quote(local), plan9quote(remote))
-		return
-
-	err2:
-		Yyerror("usage: //go:%s local [remote]", verb)
-		return
-	}
-
-	if verb == "cgo_import_dynamic" || verb == "dynimport" {
-		var ok bool
-		local := getimpsym(&q)
-		var p string
-		var remote string
-		if local == "" {
-			goto err3
-		}
-		if !more(&q) {
-			pragcgobuf += fmt.Sprintf("cgo_import_dynamic %v\n", plan9quote(local))
-			return
-		}
-
-		remote = getimpsym(&q)
-		if remote == "" {
-			goto err3
-		}
-		if !more(&q) {
-			pragcgobuf += fmt.Sprintf("cgo_import_dynamic %v %v\n", plan9quote(local), plan9quote(remote))
-			return
-		}
-
-		p, ok = getquoted(&q)
-		if !ok {
-			goto err3
-		}
-		pragcgobuf += fmt.Sprintf("cgo_import_dynamic %v %v %v\n", plan9quote(local), plan9quote(remote), plan9quote(p))
-		return
-
-	err3:
-		Yyerror("usage: //go:cgo_import_dynamic local [remote [\"library\"]]")
-		return
-	}
-
-	if verb == "cgo_import_static" {
-		local := getimpsym(&q)
-		if local == "" || more(&q) {
-			Yyerror("usage: //go:cgo_import_static local")
-			return
-		}
-		pragcgobuf += fmt.Sprintf("cgo_import_static %v\n", plan9quote(local))
-		return
-
-	}
-
-	if verb == "cgo_ldflag" {
-		var ok bool
-		var p string
-		p, ok = getquoted(&q)
-		if !ok {
-			Yyerror("usage: //go:cgo_ldflag \"arg\"")
-			return
-		}
-		pragcgobuf += fmt.Sprintf("cgo_ldflag %v\n", plan9quote(p))
-		return
-
-	}
-}
-
-type yy struct{}
-
-func (yy) Lex(v *yySymType) int {
-	return int(yylex(v))
-}
-
-func (yy) Error(msg string) {
-	Yyerror("%s", msg)
-}
-
-var theparser yyParser
-var parsing bool
-
-func yyparse() {
-	theparser = yyNewParser()
-	parsing = true
-	theparser.Parse(yy{})
-	parsing = false
-}
-
-func yylex(yylval *yySymType) int32 {
-	lx := int(_yylex(yylval))
-
-	if curio.nlsemi != 0 && lx == EOF {
-		// Treat EOF as "end of line" for the purposes
-		// of inserting a semicolon.
-		lx = ';'
-	}
-
-	switch lx {
-	case LNAME,
-		LLITERAL,
-		LBREAK,
-		LCONTINUE,
-		LFALL,
-		LRETURN,
-		LINC,
-		LDEC,
-		')',
-		'}',
-		']':
-		curio.nlsemi = 1
-
-	default:
-		curio.nlsemi = 0
-	}
-
-	// Track last two tokens returned by yylex.
-	yyprev = yylast
-
-	yylast = lx
-	return int32(lx)
-}
-
-func getc() int {
-	c := curio.peekc
-	if c != 0 {
-		curio.peekc = curio.peekc1
-		curio.peekc1 = 0
-		goto check
-	}
-
-	if curio.bin == nil {
-		if len(curio.cp) == 0 {
-			c = 0
-		} else {
-			c = int(curio.cp[0])
-			curio.cp = curio.cp[1:]
-		}
-	} else {
-	loop:
-		c = obj.Bgetc(curio.bin)
-		if c == 0xef {
-			buf, err := curio.bin.Peek(2)
-			if err != nil {
-				log.Fatalf("getc: peeking: %v", err)
-			}
-			if buf[0] == 0xbb && buf[1] == 0xbf {
-				yyerrorl(int(lexlineno), "Unicode (UTF-8) BOM in middle of file")
-
-				// consume BOM bytes
-				obj.Bgetc(curio.bin)
-				obj.Bgetc(curio.bin)
-				goto loop
-			}
-		}
-	}
-
-check:
-	switch c {
-	case 0:
-		if curio.bin != nil {
-			Yyerror("illegal NUL byte")
-			break
-		}
-		fallthrough
-
-		// insert \n at EOF
-	case EOF:
-		if curio.eofnl != 0 || curio.last == '\n' {
-			return EOF
-		}
-		curio.eofnl = 1
-		c = '\n'
-		fallthrough
-
-	case '\n':
-		if pushedio.bin == nil {
-			lexlineno++
-		}
-	}
-
-	curio.last = c
-	return c
-}
-
-func ungetc(c int) {
-	curio.peekc1 = curio.peekc
-	curio.peekc = c
-	if c == '\n' && pushedio.bin == nil {
-		lexlineno--
-	}
-}
-
-func getr() int32 {
-	var buf [utf8.UTFMax]byte
-
-	for i := 0; ; i++ {
-		c := getc()
-		if i == 0 && c < utf8.RuneSelf {
-			return int32(c)
-		}
-		buf[i] = byte(c)
-		if i+1 == len(buf) || utf8.FullRune(buf[:i+1]) {
-			r, w := utf8.DecodeRune(buf[:i+1])
-			if r == utf8.RuneError && w == 1 {
-				lineno = lexlineno
-				// The string conversion here makes a copy for passing
-				// to fmt.Printf, so that buf itself does not escape and can
-				// be allocated on the stack.
-				Yyerror("illegal UTF-8 sequence % x", string(buf[:i+1]))
-			}
-			return int32(r)
-		}
-	}
-}
-
-func escchar(e int, escflg *int, val *int64) bool {
-	*escflg = 0
-
-	c := int(getr())
-	switch c {
-	case EOF:
-		Yyerror("eof in string")
-		return true
-
-	case '\n':
-		Yyerror("newline in string")
-		return true
-
-	case '\\':
-		break
-
-	default:
-		if c == e {
-			return true
-		}
-		*val = int64(c)
-		return false
-	}
-
-	u := 0
-	c = int(getr())
-	var i int
-	switch c {
-	case 'x':
-		*escflg = 1 // it's a byte
-		i = 2
-		goto hex
-
-	case 'u':
-		i = 4
-		u = 1
-		goto hex
-
-	case 'U':
-		i = 8
-		u = 1
-		goto hex
-
-	case '0',
-		'1',
-		'2',
-		'3',
-		'4',
-		'5',
-		'6',
-		'7':
-		*escflg = 1 // it's a byte
-		l := int64(c) - '0'
-		for i := 2; i > 0; i-- {
-			c = getc()
-			if c >= '0' && c <= '7' {
-				l = l*8 + int64(c) - '0'
-				continue
-			}
-
-			Yyerror("non-octal character in escape sequence: %c", c)
-			ungetc(c)
-		}
-
-		if l > 255 {
-			Yyerror("octal escape value > 255: %d", l)
-		}
-
-		*val = l
-		return false
-
-	case 'a':
-		c = '\a'
-	case 'b':
-		c = '\b'
-	case 'f':
-		c = '\f'
-	case 'n':
-		c = '\n'
-	case 'r':
-		c = '\r'
-	case 't':
-		c = '\t'
-	case 'v':
-		c = '\v'
-	case '\\':
-		c = '\\'
-
-	default:
-		if c != e {
-			Yyerror("unknown escape sequence: %c", c)
-		}
-	}
-
-	*val = int64(c)
-	return false
-
-hex:
-	l := int64(0)
-	for ; i > 0; i-- {
-		c = getc()
-		if c >= '0' && c <= '9' {
-			l = l*16 + int64(c) - '0'
-			continue
-		}
-
-		if c >= 'a' && c <= 'f' {
-			l = l*16 + int64(c) - 'a' + 10
-			continue
-		}
-
-		if c >= 'A' && c <= 'F' {
-			l = l*16 + int64(c) - 'A' + 10
-			continue
-		}
-
-		Yyerror("non-hex character in escape sequence: %c", c)
-		ungetc(c)
-		break
-	}
-
-	if u != 0 && (l > utf8.MaxRune || (0xd800 <= l && l < 0xe000)) {
-		Yyerror("invalid Unicode code point in escape sequence: %#x", l)
-		l = utf8.RuneError
-	}
-
-	*val = l
-	return false
-}
-
-var syms = []struct {
-	name    string
-	lexical int
-	etype   int
-	op      int
-}{
-	/* basic types */
-	{"int8", LNAME, TINT8, OXXX},
-	{"int16", LNAME, TINT16, OXXX},
-	{"int32", LNAME, TINT32, OXXX},
-	{"int64", LNAME, TINT64, OXXX},
-	{"uint8", LNAME, TUINT8, OXXX},
-	{"uint16", LNAME, TUINT16, OXXX},
-	{"uint32", LNAME, TUINT32, OXXX},
-	{"uint64", LNAME, TUINT64, OXXX},
-	{"float32", LNAME, TFLOAT32, OXXX},
-	{"float64", LNAME, TFLOAT64, OXXX},
-	{"complex64", LNAME, TCOMPLEX64, OXXX},
-	{"complex128", LNAME, TCOMPLEX128, OXXX},
-	{"bool", LNAME, TBOOL, OXXX},
-	{"string", LNAME, TSTRING, OXXX},
-	{"any", LNAME, TANY, OXXX},
-	{"break", LBREAK, Txxx, OXXX},
-	{"case", LCASE, Txxx, OXXX},
-	{"chan", LCHAN, Txxx, OXXX},
-	{"const", LCONST, Txxx, OXXX},
-	{"continue", LCONTINUE, Txxx, OXXX},
-	{"default", LDEFAULT, Txxx, OXXX},
-	{"else", LELSE, Txxx, OXXX},
-	{"defer", LDEFER, Txxx, OXXX},
-	{"fallthrough", LFALL, Txxx, OXXX},
-	{"for", LFOR, Txxx, OXXX},
-	{"func", LFUNC, Txxx, OXXX},
-	{"go", LGO, Txxx, OXXX},
-	{"goto", LGOTO, Txxx, OXXX},
-	{"if", LIF, Txxx, OXXX},
-	{"import", LIMPORT, Txxx, OXXX},
-	{"interface", LINTERFACE, Txxx, OXXX},
-	{"map", LMAP, Txxx, OXXX},
-	{"package", LPACKAGE, Txxx, OXXX},
-	{"range", LRANGE, Txxx, OXXX},
-	{"return", LRETURN, Txxx, OXXX},
-	{"select", LSELECT, Txxx, OXXX},
-	{"struct", LSTRUCT, Txxx, OXXX},
-	{"switch", LSWITCH, Txxx, OXXX},
-	{"type", LTYPE, Txxx, OXXX},
-	{"var", LVAR, Txxx, OXXX},
-	{"append", LNAME, Txxx, OAPPEND},
-	{"cap", LNAME, Txxx, OCAP},
-	{"close", LNAME, Txxx, OCLOSE},
-	{"complex", LNAME, Txxx, OCOMPLEX},
-	{"copy", LNAME, Txxx, OCOPY},
-	{"delete", LNAME, Txxx, ODELETE},
-	{"imag", LNAME, Txxx, OIMAG},
-	{"len", LNAME, Txxx, OLEN},
-	{"make", LNAME, Txxx, OMAKE},
-	{"new", LNAME, Txxx, ONEW},
-	{"panic", LNAME, Txxx, OPANIC},
-	{"print", LNAME, Txxx, OPRINT},
-	{"println", LNAME, Txxx, OPRINTN},
-	{"real", LNAME, Txxx, OREAL},
-	{"recover", LNAME, Txxx, ORECOVER},
-	{"notwithstanding", LIGNORE, Txxx, OXXX},
-	{"thetruthofthematter", LIGNORE, Txxx, OXXX},
-	{"despiteallobjections", LIGNORE, Txxx, OXXX},
-	{"whereas", LIGNORE, Txxx, OXXX},
-	{"insofaras", LIGNORE, Txxx, OXXX},
-}
-
-func lexinit() {
-	var lex int
-	var s *Sym
-	var s1 *Sym
-	var t *Type
-	var etype int
-
-	/*
-	 * initialize basic types array
-	 * initialize known symbols
-	 */
-	for i := 0; i < len(syms); i++ {
-		lex = syms[i].lexical
-		s = Lookup(syms[i].name)
-		s.Lexical = uint16(lex)
-
-		etype = syms[i].etype
-		if etype != Txxx {
-			if etype < 0 || etype >= len(Types) {
-				Fatal("lexinit: %s bad etype", s.Name)
-			}
-			s1 = Pkglookup(syms[i].name, builtinpkg)
-			t = Types[etype]
-			if t == nil {
-				t = typ(etype)
-				t.Sym = s1
-
-				if etype != TANY && etype != TSTRING {
-					dowidth(t)
-				}
-				Types[etype] = t
-			}
-
-			s1.Lexical = LNAME
-			s1.Def = typenod(t)
-			s1.Def.Name = new(Name)
-			continue
-		}
-
-		etype = syms[i].op
-		if etype != OXXX {
-			s1 = Pkglookup(syms[i].name, builtinpkg)
-			s1.Lexical = LNAME
-			s1.Def = Nod(ONAME, nil, nil)
-			s1.Def.Sym = s1
-			s1.Def.Etype = uint8(etype)
-		}
-	}
-
-	// logically, the type of a string literal.
-	// types[TSTRING] is the named type string
-	// (the type of x in var x string or var x = "hello").
-	// this is the ideal form
-	// (the type of x in const x = "hello").
-	idealstring = typ(TSTRING)
-
-	idealbool = typ(TBOOL)
-
-	s = Pkglookup("true", builtinpkg)
-	s.Def = Nodbool(true)
-	s.Def.Sym = Lookup("true")
-	s.Def.Name = new(Name)
-	s.Def.Type = idealbool
-
-	s = Pkglookup("false", builtinpkg)
-	s.Def = Nodbool(false)
-	s.Def.Sym = Lookup("false")
-	s.Def.Name = new(Name)
-	s.Def.Type = idealbool
-
-	s = Lookup("_")
-	s.Block = -100
-	s.Def = Nod(ONAME, nil, nil)
-	s.Def.Sym = s
-	Types[TBLANK] = typ(TBLANK)
-	s.Def.Type = Types[TBLANK]
-	nblank = s.Def
-
-	s = Pkglookup("_", builtinpkg)
-	s.Block = -100
-	s.Def = Nod(ONAME, nil, nil)
-	s.Def.Sym = s
-	Types[TBLANK] = typ(TBLANK)
-	s.Def.Type = Types[TBLANK]
-
-	Types[TNIL] = typ(TNIL)
-	s = Pkglookup("nil", builtinpkg)
-	var v Val
-	v.U = new(NilVal)
-	s.Def = nodlit(v)
-	s.Def.Sym = s
-	s.Def.Name = new(Name)
-}
-
-func lexinit1() {
-	// t = interface { Error() string }
-	rcvr := typ(TSTRUCT)
-
-	rcvr.Type = typ(TFIELD)
-	rcvr.Type.Type = Ptrto(typ(TSTRUCT))
-	rcvr.Funarg = 1
-	in := typ(TSTRUCT)
-	in.Funarg = 1
-	out := typ(TSTRUCT)
-	out.Type = typ(TFIELD)
-	out.Type.Type = Types[TSTRING]
-	out.Funarg = 1
-	f := typ(TFUNC)
-	*getthis(f) = rcvr
-	*Getoutarg(f) = out
-	*getinarg(f) = in
-	f.Thistuple = 1
-	f.Intuple = 0
-	f.Outnamed = 0
-	f.Outtuple = 1
-	t := typ(TINTER)
-	t.Type = typ(TFIELD)
-	t.Type.Sym = Lookup("Error")
-	t.Type.Type = f
-
-	// error type
-	s := Lookup("error")
-
-	s.Lexical = LNAME
-	s1 := Pkglookup("error", builtinpkg)
-	errortype = t
-	errortype.Sym = s1
-	s1.Lexical = LNAME
-	s1.Def = typenod(errortype)
-
-	// byte alias
-	s = Lookup("byte")
-
-	s.Lexical = LNAME
-	s1 = Pkglookup("byte", builtinpkg)
-	bytetype = typ(TUINT8)
-	bytetype.Sym = s1
-	s1.Lexical = LNAME
-	s1.Def = typenod(bytetype)
-	s1.Def.Name = new(Name)
-
-	// rune alias
-	s = Lookup("rune")
-
-	s.Lexical = LNAME
-	s1 = Pkglookup("rune", builtinpkg)
-	runetype = typ(TINT32)
-	runetype.Sym = s1
-	s1.Lexical = LNAME
-	s1.Def = typenod(runetype)
-	s1.Def.Name = new(Name)
-}
-
-func lexfini() {
-	var s *Sym
-	var lex int
-	var etype int
-	var i int
-
-	for i = 0; i < len(syms); i++ {
-		lex = syms[i].lexical
-		if lex != LNAME {
-			continue
-		}
-		s = Lookup(syms[i].name)
-		s.Lexical = uint16(lex)
-
-		etype = syms[i].etype
-		if etype != Txxx && (etype != TANY || Debug['A'] != 0) && s.Def == nil {
-			s.Def = typenod(Types[etype])
-			s.Def.Name = new(Name)
-			s.Origpkg = builtinpkg
-		}
-
-		etype = syms[i].op
-		if etype != OXXX && s.Def == nil {
-			s.Def = Nod(ONAME, nil, nil)
-			s.Def.Sym = s
-			s.Def.Etype = uint8(etype)
-			s.Origpkg = builtinpkg
-		}
-	}
-
-	// backend-specific builtin types (e.g. int).
-	for i = range Thearch.Typedefs {
-		s = Lookup(Thearch.Typedefs[i].Name)
-		if s.Def == nil {
-			s.Def = typenod(Types[Thearch.Typedefs[i].Etype])
-			s.Def.Name = new(Name)
-			s.Origpkg = builtinpkg
-		}
-	}
-
-	// there's only so much table-driven we can handle.
-	// these are special cases.
-	s = Lookup("byte")
-
-	if s.Def == nil {
-		s.Def = typenod(bytetype)
-		s.Def.Name = new(Name)
-		s.Origpkg = builtinpkg
-	}
-
-	s = Lookup("error")
-	if s.Def == nil {
-		s.Def = typenod(errortype)
-		s.Def.Name = new(Name)
-		s.Origpkg = builtinpkg
-	}
-
-	s = Lookup("rune")
-	if s.Def == nil {
-		s.Def = typenod(runetype)
-		s.Def.Name = new(Name)
-		s.Origpkg = builtinpkg
-	}
-
-	s = Lookup("nil")
-	if s.Def == nil {
-		var v Val
-		v.U = new(NilVal)
-		s.Def = nodlit(v)
-		s.Def.Sym = s
-		s.Def.Name = new(Name)
-		s.Origpkg = builtinpkg
-	}
-
-	s = Lookup("iota")
-	if s.Def == nil {
-		s.Def = Nod(OIOTA, nil, nil)
-		s.Def.Sym = s
-		s.Origpkg = builtinpkg
-	}
-
-	s = Lookup("true")
-	if s.Def == nil {
-		s.Def = Nodbool(true)
-		s.Def.Sym = s
-		s.Def.Name = new(Name)
-		s.Origpkg = builtinpkg
-	}
-
-	s = Lookup("false")
-	if s.Def == nil {
-		s.Def = Nodbool(false)
-		s.Def.Sym = s
-		s.Def.Name = new(Name)
-		s.Origpkg = builtinpkg
-	}
-
-	nodfp = Nod(ONAME, nil, nil)
-	nodfp.Type = Types[TINT32]
-	nodfp.Xoffset = 0
-	nodfp.Class = PPARAM
-	nodfp.Sym = Lookup(".fp")
-}
-
-var lexn = []struct {
-	lex  int
-	name string
-}{
-	{LANDAND, "ANDAND"},
-	{LANDNOT, "ANDNOT"},
-	{LASOP, "ASOP"},
-	{LBREAK, "BREAK"},
-	{LCASE, "CASE"},
-	{LCHAN, "CHAN"},
-	{LCOLAS, "COLAS"},
-	{LCOMM, "<-"},
-	{LCONST, "CONST"},
-	{LCONTINUE, "CONTINUE"},
-	{LDDD, "..."},
-	{LDEC, "DEC"},
-	{LDEFAULT, "DEFAULT"},
-	{LDEFER, "DEFER"},
-	{LELSE, "ELSE"},
-	{LEQ, "EQ"},
-	{LFALL, "FALL"},
-	{LFOR, "FOR"},
-	{LFUNC, "FUNC"},
-	{LGE, "GE"},
-	{LGO, "GO"},
-	{LGOTO, "GOTO"},
-	{LGT, "GT"},
-	{LIF, "IF"},
-	{LIMPORT, "IMPORT"},
-	{LINC, "INC"},
-	{LINTERFACE, "INTERFACE"},
-	{LLE, "LE"},
-	{LLITERAL, "LITERAL"},
-	{LLSH, "LSH"},
-	{LLT, "LT"},
-	{LMAP, "MAP"},
-	{LNAME, "NAME"},
-	{LNE, "NE"},
-	{LOROR, "OROR"},
-	{LPACKAGE, "PACKAGE"},
-	{LRANGE, "RANGE"},
-	{LRETURN, "RETURN"},
-	{LRSH, "RSH"},
-	{LSELECT, "SELECT"},
-	{LSTRUCT, "STRUCT"},
-	{LSWITCH, "SWITCH"},
-	{LTYPE, "TYPE"},
-	{LVAR, "VAR"},
-}
-
-func lexname(lex int) string {
-	for i := 0; i < len(lexn); i++ {
-		if lexn[i].lex == lex {
-			return lexn[i].name
-		}
-	}
-	return fmt.Sprintf("LEX-%d", lex)
-}
-
-var yytfix = []struct {
-	have string
-	want string
-}{
-	{"$end", "EOF"},
-	{"LASOP", "op="},
-	{"LBREAK", "break"},
-	{"LCASE", "case"},
-	{"LCHAN", "chan"},
-	{"LCOLAS", ":="},
-	{"LCONST", "const"},
-	{"LCONTINUE", "continue"},
-	{"LDDD", "..."},
-	{"LDEFAULT", "default"},
-	{"LDEFER", "defer"},
-	{"LELSE", "else"},
-	{"LFALL", "fallthrough"},
-	{"LFOR", "for"},
-	{"LFUNC", "func"},
-	{"LGO", "go"},
-	{"LGOTO", "goto"},
-	{"LIF", "if"},
-	{"LIMPORT", "import"},
-	{"LINTERFACE", "interface"},
-	{"LMAP", "map"},
-	{"LNAME", "name"},
-	{"LPACKAGE", "package"},
-	{"LRANGE", "range"},
-	{"LRETURN", "return"},
-	{"LSELECT", "select"},
-	{"LSTRUCT", "struct"},
-	{"LSWITCH", "switch"},
-	{"LTYPE", "type"},
-	{"LVAR", "var"},
-	{"LANDAND", "&&"},
-	{"LANDNOT", "&^"},
-	{"LBODY", "{"},
-	{"LCOMM", "<-"},
-	{"LDEC", "--"},
-	{"LINC", "++"},
-	{"LEQ", "=="},
-	{"LGE", ">="},
-	{"LGT", ">"},
-	{"LLE", "<="},
-	{"LLT", "<"},
-	{"LLSH", "<<"},
-	{"LRSH", ">>"},
-	{"LOROR", "||"},
-	{"LNE", "!="},
-	// spell out to avoid confusion with punctuation in error messages
-	{"';'", "semicolon or newline"},
-	{"','", "comma"},
-}
-
-func init() {
-	yyErrorVerbose = true
-
-Outer:
-	for i, s := range yyToknames {
-		// Apply yytfix if possible.
-		for _, fix := range yytfix {
-			if s == fix.have {
-				yyToknames[i] = fix.want
-				continue Outer
-			}
-		}
-
-		// Turn 'x' into x.
-		if len(s) == 3 && s[0] == '\'' && s[2] == '\'' {
-			yyToknames[i] = s[1:2]
-			continue
-		}
-	}
-}
-
-func pkgnotused(lineno int, path string, name string) {
-	// If the package was imported with a name other than the final
-	// import path element, show it explicitly in the error message.
-	// Note that this handles both renamed imports and imports of
-	// packages containing unconventional package declarations.
-	// Note that this uses / always, even on Windows, because Go import
-	// paths always use forward slashes.
-	elem := path
-	if i := strings.LastIndex(elem, "/"); i >= 0 {
-		elem = elem[i+1:]
-	}
-	if name == "" || elem == name {
-		yyerrorl(int(lineno), "imported and not used: %q", path)
-	} else {
-		yyerrorl(int(lineno), "imported and not used: %q as %s", path, name)
-	}
-}
-
-func mkpackage(pkgname string) {
-	if localpkg.Name == "" {
-		if pkgname == "_" {
-			Yyerror("invalid package name _")
-		}
-		localpkg.Name = pkgname
-	} else {
-		if pkgname != localpkg.Name {
-			Yyerror("package %s; expected %s", pkgname, localpkg.Name)
-		}
-		for _, s := range localpkg.Syms {
-			if s.Def == nil {
-				continue
-			}
-			if s.Def.Op == OPACK {
-				// throw away top-level package name leftover
-				// from previous file.
-				// leave s->block set to cause redeclaration
-				// errors if a conflicting top-level name is
-				// introduced by a different file.
-				if !s.Def.Used && nsyntaxerrors == 0 {
-					pkgnotused(int(s.Def.Lineno), s.Def.Name.Pkg.Path, s.Name)
-				}
-				s.Def = nil
-				continue
-			}
-
-			if s.Def.Sym != s {
-				// throw away top-level name left over
-				// from previous import . "x"
-				if s.Def.Name != nil && s.Def.Name.Pack != nil && !s.Def.Name.Pack.Used && nsyntaxerrors == 0 {
-					pkgnotused(int(s.Def.Name.Pack.Lineno), s.Def.Name.Pack.Name.Pkg.Path, "")
-					s.Def.Name.Pack.Used = true
-				}
-
-				s.Def = nil
-				continue
-			}
-		}
-	}
-
-	if outfile == "" {
-		p := infile
-		if i := strings.LastIndex(p, "/"); i >= 0 {
-			p = p[i+1:]
-		}
-		if Ctxt.Windows != 0 {
-			if i := strings.LastIndex(p, `\`); i >= 0 {
-				p = p[i+1:]
-			}
-		}
-		if i := strings.LastIndex(p, "."); i >= 0 {
-			p = p[:i]
-		}
-		suffix := ".o"
-		if writearchive > 0 {
-			suffix = ".a"
-		}
-		outfile = p + suffix
-	}
-}
diff --git a/src/cmd/compile/internal/gc/mkbuiltin.go b/src/cmd/compile/internal/gc/mkbuiltin.go
deleted file mode 100644
index ea3877f..0000000
--- a/src/cmd/compile/internal/gc/mkbuiltin.go
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-// Generate builtin.go from $* (runtime.go and unsafe.go).
-// Run this after changing runtime.go and unsafe.go
-// or after changing the export metadata format in the compiler.
-// Either way, you need to have a working compiler binary first.
-package main
-
-import (
-	"bufio"
-	"fmt"
-	"io"
-	"log"
-	"os"
-	"os/exec"
-	"strings"
-)
-
-func main() {
-	f, err := os.Create("builtin.go")
-	if err != nil {
-		log.Fatal(err)
-	}
-	defer f.Close()
-	w := bufio.NewWriter(f)
-
-	fmt.Fprintln(w, "// AUTO-GENERATED by mkbuiltin.go; DO NOT EDIT")
-	fmt.Fprintln(w, "")
-	fmt.Fprintln(w, "package gc")
-
-	for _, name := range os.Args[1:] {
-		mkbuiltin(w, name)
-	}
-
-	if err := w.Flush(); err != nil {
-		log.Fatal(err)
-	}
-}
-
-// Compile .go file, import data from .6 file, and write Go string version.
-func mkbuiltin(w io.Writer, name string) {
-	if err := exec.Command("go", "tool", "compile", "-A", "builtin/"+name+".go").Run(); err != nil {
-		log.Fatal(err)
-	}
-	obj := name + ".o"
-	defer os.Remove(obj)
-
-	r, err := os.Open(obj)
-	if err != nil {
-		log.Fatal(err)
-	}
-	defer r.Close()
-	scanner := bufio.NewScanner(r)
-
-	// Look for $$ that introduces imports.
-	for scanner.Scan() {
-		if strings.Contains(scanner.Text(), "$$") {
-			goto Begin
-		}
-	}
-	log.Fatal("did not find beginning of imports")
-
-Begin:
-	initfunc := fmt.Sprintf("init_%s_function", name)
-
-	fmt.Fprintf(w, "\nconst %simport = \"\" +\n", name)
-
-	// sys.go claims to be in package PACKAGE to avoid
-	// conflicts during "go tool compile sys.go".  Rename PACKAGE to $2.
-	replacer := strings.NewReplacer("PACKAGE", name)
-
-	// Process imports, stopping at $$ that closes them.
-	for scanner.Scan() {
-		p := scanner.Text()
-		if strings.Contains(p, "$$") {
-			goto End
-		}
-
-		// Chop leading white space.
-		p = strings.TrimLeft(p, " \t")
-
-		// Cut out decl of init_$1_function - it doesn't exist.
-		if strings.Contains(p, initfunc) {
-			continue
-		}
-
-		fmt.Fprintf(w, "\t%q +\n", replacer.Replace(p)+"\n")
-	}
-	log.Fatal("did not find end of imports")
-
-End:
-	fmt.Fprintf(w, "\t\"$$\\n\"\n")
-}
diff --git a/src/cmd/compile/internal/gc/mparith2.go b/src/cmd/compile/internal/gc/mparith2.go
deleted file mode 100644
index 2c7e517..0000000
--- a/src/cmd/compile/internal/gc/mparith2.go
+++ /dev/null
@@ -1,300 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import (
-	"cmd/compile/internal/big"
-	"cmd/internal/obj"
-	"fmt"
-)
-
-/// implements fix arithmetic
-
-func mpsetovf(a *Mpint) {
-	a.Val.SetUint64(1) // avoid spurious div-zero errors
-	a.Ovf = true
-}
-
-func mptestovf(a *Mpint, extra int) bool {
-	// We don't need to be precise here, any reasonable upper limit would do.
-	// For now, use existing limit so we pass all the tests unchanged.
-	if a.Val.BitLen()+extra > Mpprec {
-		mpsetovf(a)
-	}
-	return a.Ovf
-}
-
-func mpmovefixfix(a, b *Mpint) {
-	a.Val.Set(&b.Val)
-}
-
-func mpmovefltfix(a *Mpint, b *Mpflt) int {
-	if _, acc := b.Val.Int(&a.Val); acc == big.Exact {
-		return 0
-	}
-
-	const delta = 16 // a reasonably small number of bits > 0
-	var t big.Float
-	t.SetPrec(Mpprec - delta)
-
-	// try rounding down a little
-	t.SetMode(big.ToZero)
-	t.Set(&b.Val)
-	if _, acc := t.Int(&a.Val); acc == big.Exact {
-		return 0
-	}
-
-	// try rounding up a little
-	t.SetMode(big.AwayFromZero)
-	t.Set(&b.Val)
-	if _, acc := t.Int(&a.Val); acc == big.Exact {
-		return 0
-	}
-
-	return -1
-}
-
-func mpaddfixfix(a, b *Mpint, quiet int) {
-	if a.Ovf || b.Ovf {
-		if nsavederrors+nerrors == 0 {
-			Yyerror("ovf in mpaddfixfix")
-		}
-		mpsetovf(a)
-		return
-	}
-
-	a.Val.Add(&a.Val, &b.Val)
-
-	if mptestovf(a, 0) && quiet == 0 {
-		Yyerror("constant addition overflow")
-	}
-}
-
-func mpsubfixfix(a, b *Mpint) {
-	if a.Ovf || b.Ovf {
-		if nsavederrors+nerrors == 0 {
-			Yyerror("ovf in mpsubfixfix")
-		}
-		mpsetovf(a)
-		return
-	}
-
-	a.Val.Sub(&a.Val, &b.Val)
-
-	if mptestovf(a, 0) {
-		Yyerror("constant subtraction overflow")
-	}
-}
-
-func mpmulfixfix(a, b *Mpint) {
-	if a.Ovf || b.Ovf {
-		if nsavederrors+nerrors == 0 {
-			Yyerror("ovf in mpmulfixfix")
-		}
-		mpsetovf(a)
-		return
-	}
-
-	a.Val.Mul(&a.Val, &b.Val)
-
-	if mptestovf(a, 0) {
-		Yyerror("constant multiplication overflow")
-	}
-}
-
-func mpdivfixfix(a, b *Mpint) {
-	if a.Ovf || b.Ovf {
-		if nsavederrors+nerrors == 0 {
-			Yyerror("ovf in mpdivfixfix")
-		}
-		mpsetovf(a)
-		return
-	}
-
-	a.Val.Quo(&a.Val, &b.Val)
-
-	if mptestovf(a, 0) {
-		// can only happen for div-0 which should be checked elsewhere
-		Yyerror("constant division overflow")
-	}
-}
-
-func mpmodfixfix(a, b *Mpint) {
-	if a.Ovf || b.Ovf {
-		if nsavederrors+nerrors == 0 {
-			Yyerror("ovf in mpmodfixfix")
-		}
-		mpsetovf(a)
-		return
-	}
-
-	a.Val.Rem(&a.Val, &b.Val)
-
-	if mptestovf(a, 0) {
-		// should never happen
-		Yyerror("constant modulo overflow")
-	}
-}
-
-func mporfixfix(a, b *Mpint) {
-	if a.Ovf || b.Ovf {
-		if nsavederrors+nerrors == 0 {
-			Yyerror("ovf in mporfixfix")
-		}
-		mpsetovf(a)
-		return
-	}
-
-	a.Val.Or(&a.Val, &b.Val)
-}
-
-func mpandfixfix(a, b *Mpint) {
-	if a.Ovf || b.Ovf {
-		if nsavederrors+nerrors == 0 {
-			Yyerror("ovf in mpandfixfix")
-		}
-		mpsetovf(a)
-		return
-	}
-
-	a.Val.And(&a.Val, &b.Val)
-}
-
-func mpandnotfixfix(a, b *Mpint) {
-	if a.Ovf || b.Ovf {
-		if nsavederrors+nerrors == 0 {
-			Yyerror("ovf in mpandnotfixfix")
-		}
-		mpsetovf(a)
-		return
-	}
-
-	a.Val.AndNot(&a.Val, &b.Val)
-}
-
-func mpxorfixfix(a, b *Mpint) {
-	if a.Ovf || b.Ovf {
-		if nsavederrors+nerrors == 0 {
-			Yyerror("ovf in mpxorfixfix")
-		}
-		mpsetovf(a)
-		return
-	}
-
-	a.Val.Xor(&a.Val, &b.Val)
-}
-
-// shift left by s (or right by -s)
-func Mpshiftfix(a *Mpint, s int) {
-	switch {
-	case s > 0:
-		if mptestovf(a, s) {
-			Yyerror("constant shift overflow")
-			return
-		}
-		a.Val.Lsh(&a.Val, uint(s))
-	case s < 0:
-		a.Val.Rsh(&a.Val, uint(-s))
-	}
-}
-
-func mplshfixfix(a, b *Mpint) {
-	if a.Ovf || b.Ovf {
-		if nsavederrors+nerrors == 0 {
-			Yyerror("ovf in mplshfixfix")
-		}
-		mpsetovf(a)
-		return
-	}
-
-	s := Mpgetfix(b)
-	if s < 0 || s >= Mpprec {
-		Yyerror("stupid shift: %d", s)
-		Mpmovecfix(a, 0)
-		return
-	}
-
-	Mpshiftfix(a, int(s))
-}
-
-func mprshfixfix(a, b *Mpint) {
-	if a.Ovf || b.Ovf {
-		if nsavederrors+nerrors == 0 {
-			Yyerror("ovf in mprshfixfix")
-		}
-		mpsetovf(a)
-		return
-	}
-
-	s := Mpgetfix(b)
-	if s < 0 || s >= Mpprec {
-		Yyerror("stupid shift: %d", s)
-		if a.Val.Sign() < 0 {
-			Mpmovecfix(a, -1)
-		} else {
-			Mpmovecfix(a, 0)
-		}
-		return
-	}
-
-	Mpshiftfix(a, int(-s))
-}
-
-func Mpcmpfixfix(a, b *Mpint) int {
-	return a.Val.Cmp(&b.Val)
-}
-
-func mpcmpfixc(b *Mpint, c int64) int {
-	return b.Val.Cmp(big.NewInt(c))
-}
-
-func mpnegfix(a *Mpint) {
-	a.Val.Neg(&a.Val)
-}
-
-func Mpgetfix(a *Mpint) int64 {
-	if a.Ovf {
-		if nsavederrors+nerrors == 0 {
-			Yyerror("constant overflow")
-		}
-		return 0
-	}
-
-	return a.Val.Int64()
-}
-
-func Mpmovecfix(a *Mpint, c int64) {
-	a.Val.SetInt64(c)
-}
-
-func mpatofix(a *Mpint, as string) {
-	_, ok := a.Val.SetString(as, 0)
-	if !ok {
-		// required syntax is [+-][0[x]]d*
-		// At the moment we lose precise error cause;
-		// the old code distinguished between:
-		// - malformed hex constant
-		// - malformed octal constant
-		// - malformed decimal constant
-		// TODO(gri) use different conversion function
-		Yyerror("malformed integer constant: %s", as)
-		a.Val.SetUint64(0)
-		return
-	}
-	if mptestovf(a, 0) {
-		Yyerror("constant too large: %s", as)
-	}
-}
-
-func (x *Mpint) String() string {
-	return Bconv(x, 0)
-}
-
-func Bconv(xval *Mpint, flag int) string {
-	if flag&obj.FmtSharp != 0 {
-		return fmt.Sprintf("%#x", &xval.Val)
-	}
-	return xval.Val.String()
-}
diff --git a/src/cmd/compile/internal/gc/mparith3.go b/src/cmd/compile/internal/gc/mparith3.go
deleted file mode 100644
index bf37f2d..0000000
--- a/src/cmd/compile/internal/gc/mparith3.go
+++ /dev/null
@@ -1,250 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import (
-	"cmd/compile/internal/big"
-	"cmd/internal/obj"
-	"fmt"
-	"math"
-	"strings"
-)
-
-/// implements float arihmetic
-
-func newMpflt() *Mpflt {
-	var a Mpflt
-	a.Val.SetPrec(Mpprec)
-	return &a
-}
-
-func Mpmovefixflt(a *Mpflt, b *Mpint) {
-	if b.Ovf {
-		// sign doesn't really matter but copy anyway
-		a.Val.SetInf(b.Val.Sign() < 0)
-		return
-	}
-	a.Val.SetInt(&b.Val)
-}
-
-func mpmovefltflt(a *Mpflt, b *Mpflt) {
-	a.Val.Set(&b.Val)
-}
-
-func mpaddfltflt(a *Mpflt, b *Mpflt) {
-	if Mpdebug {
-		fmt.Printf("\n%v + %v", a, b)
-	}
-
-	a.Val.Add(&a.Val, &b.Val)
-
-	if Mpdebug {
-		fmt.Printf(" = %v\n\n", a)
-	}
-}
-
-func mpaddcflt(a *Mpflt, c float64) {
-	var b Mpflt
-
-	Mpmovecflt(&b, c)
-	mpaddfltflt(a, &b)
-}
-
-func mpsubfltflt(a *Mpflt, b *Mpflt) {
-	if Mpdebug {
-		fmt.Printf("\n%v - %v", a, b)
-	}
-
-	a.Val.Sub(&a.Val, &b.Val)
-
-	if Mpdebug {
-		fmt.Printf(" = %v\n\n", a)
-	}
-}
-
-func mpmulfltflt(a *Mpflt, b *Mpflt) {
-	if Mpdebug {
-		fmt.Printf("%v\n * %v\n", a, b)
-	}
-
-	a.Val.Mul(&a.Val, &b.Val)
-
-	if Mpdebug {
-		fmt.Printf(" = %v\n\n", a)
-	}
-}
-
-func mpmulcflt(a *Mpflt, c float64) {
-	var b Mpflt
-
-	Mpmovecflt(&b, c)
-	mpmulfltflt(a, &b)
-}
-
-func mpdivfltflt(a *Mpflt, b *Mpflt) {
-	if Mpdebug {
-		fmt.Printf("%v\n / %v\n", a, b)
-	}
-
-	a.Val.Quo(&a.Val, &b.Val)
-
-	if Mpdebug {
-		fmt.Printf(" = %v\n\n", a)
-	}
-}
-
-func mpcmpfltflt(a *Mpflt, b *Mpflt) int {
-	return a.Val.Cmp(&b.Val)
-}
-
-func mpcmpfltc(b *Mpflt, c float64) int {
-	var a Mpflt
-
-	Mpmovecflt(&a, c)
-	return mpcmpfltflt(b, &a)
-}
-
-func mpgetflt(a *Mpflt) float64 {
-	x, _ := a.Val.Float64()
-
-	// check for overflow
-	if math.IsInf(x, 0) && nsavederrors+nerrors == 0 {
-		Yyerror("mpgetflt ovf")
-	}
-
-	return x
-}
-
-func mpgetflt32(a *Mpflt) float64 {
-	x32, _ := a.Val.Float32()
-	x := float64(x32)
-
-	// check for overflow
-	if math.IsInf(x, 0) && nsavederrors+nerrors == 0 {
-		Yyerror("mpgetflt32 ovf")
-	}
-
-	return x
-}
-
-func Mpmovecflt(a *Mpflt, c float64) {
-	if Mpdebug {
-		fmt.Printf("\nconst %g", c)
-	}
-
-	a.Val.SetFloat64(c)
-
-	if Mpdebug {
-		fmt.Printf(" = %v\n", a)
-	}
-}
-
-func mpnegflt(a *Mpflt) {
-	a.Val.Neg(&a.Val)
-}
-
-//
-// floating point input
-// required syntax is [+-]d*[.]d*[e[+-]d*] or [+-]0xH*[e[+-]d*]
-//
-func mpatoflt(a *Mpflt, as string) {
-	for len(as) > 0 && (as[0] == ' ' || as[0] == '\t') {
-		as = as[1:]
-	}
-
-	// The spec requires accepting exponents that fit in int32.
-	// Don't accept much more than that.
-	// Count digits in exponent and stop early if there are too many.
-	if i := strings.Index(as, "e"); i >= 0 {
-		i++
-		if i < len(as) && (as[i] == '-' || as[i] == '+') {
-			i++
-		}
-		for i < len(as) && as[i] == '0' {
-			i++
-		}
-		// TODO(rsc): This should be > 10, because we're supposed
-		// to accept any signed 32-bit int as an exponent.
-		// But that's not working terribly well, so we deviate from the
-		// spec in order to make sure that what we accept works.
-		// We can remove this restriction once those larger exponents work.
-		// See golang.org/issue/11326 and test/fixedbugs/issue11326*.go.
-		if len(as)-i > 8 {
-			Yyerror("malformed constant: %s (exponent too large)", as)
-			a.Val.SetUint64(0)
-			return
-		}
-	}
-
-	f, ok := a.Val.SetString(as)
-	if !ok {
-		// At the moment we lose precise error cause;
-		// the old code additionally distinguished between:
-		// - malformed hex constant
-		// - decimal point in hex constant
-		// - constant exponent out of range
-		// - decimal point and binary point in constant
-		// TODO(gri) use different conversion function or check separately
-		Yyerror("malformed constant: %s", as)
-		a.Val.SetUint64(0)
-		return
-	}
-
-	if f.IsInf() {
-		Yyerror("constant too large: %s", as)
-		a.Val.SetUint64(0)
-		return
-	}
-}
-
-func (f *Mpflt) String() string {
-	return Fconv(f, 0)
-}
-
-func Fconv(fvp *Mpflt, flag int) string {
-	if flag&obj.FmtSharp == 0 {
-		return fvp.Val.Text('b', 0)
-	}
-
-	// use decimal format for error messages
-
-	// determine sign
-	f := &fvp.Val
-	var sign string
-	if fvp.Val.Signbit() {
-		sign = "-"
-		f = new(big.Float).Abs(f)
-	} else if flag&obj.FmtSign != 0 {
-		sign = "+"
-	}
-
-	// Use fmt formatting if in float64 range (common case).
-	if x, _ := f.Float64(); !math.IsInf(x, 0) {
-		return fmt.Sprintf("%s%.6g", sign, x)
-	}
-
-	// Out of float64 range. Do approximate manual to decimal
-	// conversion to avoid precise but possibly slow Float
-	// formatting. The exponent is > 0 since a negative out-
-	// of-range exponent would have underflowed and led to 0.
-	// f = mant * 2**exp
-	var mant big.Float
-	exp := float64(f.MantExp(&mant)) // 0.5 <= mant < 1.0, exp > 0
-
-	// approximate float64 mantissa m and decimal exponent d
-	// f ~ m * 10**d
-	m, _ := mant.Float64()            // 0.5 <= m < 1.0
-	d := exp * (math.Ln2 / math.Ln10) // log_10(2)
-
-	// adjust m for truncated (integer) decimal exponent e
-	e := int64(d)
-	m *= math.Pow(10, d-float64(e))
-	for m >= 10 {
-		m /= 10
-		e++
-	}
-
-	return fmt.Sprintf("%s%.5fe+%d", sign, m, e)
-}
diff --git a/src/cmd/compile/internal/gc/obj.go b/src/cmd/compile/internal/gc/obj.go
deleted file mode 100644
index d2ac813..0000000
--- a/src/cmd/compile/internal/gc/obj.go
+++ /dev/null
@@ -1,450 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-	"strconv"
-)
-
-/*
- * architecture-independent object file output
- */
-const (
-	ArhdrSize = 60
-)
-
-func formathdr(arhdr []byte, name string, size int64) {
-	copy(arhdr[:], fmt.Sprintf("%-16s%-12d%-6d%-6d%-8o%-10d`\n", name, 0, 0, 0, 0644, size))
-}
-
-func dumpobj() {
-	var err error
-	bout, err = obj.Bopenw(outfile)
-	if err != nil {
-		Flusherrors()
-		fmt.Printf("can't create %s: %v\n", outfile, err)
-		errorexit()
-	}
-
-	startobj := int64(0)
-	var arhdr [ArhdrSize]byte
-	if writearchive != 0 {
-		obj.Bwritestring(bout, "!<arch>\n")
-		arhdr = [ArhdrSize]byte{}
-		bout.Write(arhdr[:])
-		startobj = obj.Boffset(bout)
-	}
-
-	fmt.Fprintf(bout, "go object %s %s %s %s\n", obj.Getgoos(), obj.Getgoarch(), obj.Getgoversion(), obj.Expstring())
-	dumpexport()
-
-	if writearchive != 0 {
-		bout.Flush()
-		size := obj.Boffset(bout) - startobj
-		if size&1 != 0 {
-			obj.Bputc(bout, 0)
-		}
-		obj.Bseek(bout, startobj-ArhdrSize, 0)
-		formathdr(arhdr[:], "__.PKGDEF", size)
-		bout.Write(arhdr[:])
-		bout.Flush()
-
-		obj.Bseek(bout, startobj+size+(size&1), 0)
-		arhdr = [ArhdrSize]byte{}
-		bout.Write(arhdr[:])
-		startobj = obj.Boffset(bout)
-		fmt.Fprintf(bout, "go object %s %s %s %s\n", obj.Getgoos(), obj.Getgoarch(), obj.Getgoversion(), obj.Expstring())
-	}
-
-	if pragcgobuf != "" {
-		if writearchive != 0 {
-			// write empty export section; must be before cgo section
-			fmt.Fprintf(bout, "\n$$\n\n$$\n\n")
-		}
-
-		fmt.Fprintf(bout, "\n$$  // cgo\n")
-		fmt.Fprintf(bout, "%s\n$$\n\n", pragcgobuf)
-	}
-
-	fmt.Fprintf(bout, "\n!\n")
-
-	var externs *NodeList
-	if externdcl != nil {
-		externs = externdcl.End
-	}
-
-	dumpglobls()
-	dumptypestructs()
-
-	// Dump extra globals.
-	tmp := externdcl
-
-	if externs != nil {
-		externdcl = externs.Next
-	}
-	dumpglobls()
-	externdcl = tmp
-
-	zero := Pkglookup("zerovalue", Runtimepkg)
-	ggloblsym(zero, int32(zerosize), obj.DUPOK|obj.RODATA)
-
-	dumpdata()
-	obj.Writeobjdirect(Ctxt, bout)
-
-	if writearchive != 0 {
-		bout.Flush()
-		size := obj.Boffset(bout) - startobj
-		if size&1 != 0 {
-			obj.Bputc(bout, 0)
-		}
-		obj.Bseek(bout, startobj-ArhdrSize, 0)
-		formathdr(arhdr[:], "_go_.o", size)
-		bout.Write(arhdr[:])
-	}
-
-	obj.Bterm(bout)
-}
-
-func dumpglobls() {
-	var n *Node
-
-	// add globals
-	for l := externdcl; l != nil; l = l.Next {
-		n = l.N
-		if n.Op != ONAME {
-			continue
-		}
-
-		if n.Type == nil {
-			Fatal("external %v nil type\n", n)
-		}
-		if n.Class == PFUNC {
-			continue
-		}
-		if n.Sym.Pkg != localpkg {
-			continue
-		}
-		dowidth(n.Type)
-
-		ggloblnod(n)
-	}
-
-	for l := funcsyms; l != nil; l = l.Next {
-		n = l.N
-		dsymptr(n.Sym, 0, n.Sym.Def.Func.Shortname.Sym, 0)
-		ggloblsym(n.Sym, int32(Widthptr), obj.DUPOK|obj.RODATA)
-	}
-
-	// Do not reprocess funcsyms on next dumpglobls call.
-	funcsyms = nil
-}
-
-func Bputname(b *obj.Biobuf, s *obj.LSym) {
-	obj.Bwritestring(b, s.Name)
-	obj.Bputc(b, 0)
-}
-
-func Linksym(s *Sym) *obj.LSym {
-	if s == nil {
-		return nil
-	}
-	if s.Lsym != nil {
-		return s.Lsym
-	}
-	var name string
-	if isblanksym(s) {
-		name = "_"
-	} else if s.Linkname != "" {
-		name = s.Linkname
-	} else {
-		name = s.Pkg.Prefix + "." + s.Name
-	}
-
-	ls := obj.Linklookup(Ctxt, name, 0)
-	s.Lsym = ls
-	return ls
-}
-
-func duintxx(s *Sym, off int, v uint64, wid int) int {
-	// Update symbol data directly instead of generating a
-	// DATA instruction that liblink will have to interpret later.
-	// This reduces compilation time and memory usage.
-	off = int(Rnd(int64(off), int64(wid)))
-
-	return int(obj.Setuintxx(Ctxt, Linksym(s), int64(off), v, int64(wid)))
-}
-
-func duint8(s *Sym, off int, v uint8) int {
-	return duintxx(s, off, uint64(v), 1)
-}
-
-func duint16(s *Sym, off int, v uint16) int {
-	return duintxx(s, off, uint64(v), 2)
-}
-
-func duint32(s *Sym, off int, v uint32) int {
-	return duintxx(s, off, uint64(v), 4)
-}
-
-func duint64(s *Sym, off int, v uint64) int {
-	return duintxx(s, off, v, 8)
-}
-
-func duintptr(s *Sym, off int, v uint64) int {
-	return duintxx(s, off, v, Widthptr)
-}
-
-var stringsym_gen int
-
-func stringsym(s string) (hdr, data *Sym) {
-	var symname string
-	var pkg *Pkg
-	if len(s) > 100 {
-		// huge strings are made static to avoid long names
-		stringsym_gen++
-		symname = fmt.Sprintf(".gostring.%d", stringsym_gen)
-
-		pkg = localpkg
-	} else {
-		// small strings get named by their contents,
-		// so that multiple modules using the same string
-		// can share it.
-		symname = strconv.Quote(s)
-		pkg = gostringpkg
-	}
-
-	symhdr := Pkglookup("hdr."+symname, pkg)
-	symdata := Pkglookup(symname, pkg)
-
-	// SymUniq flag indicates that data is generated already
-	if symhdr.Flags&SymUniq != 0 {
-		return symhdr, symdata
-	}
-	symhdr.Flags |= SymUniq
-	symhdr.Def = newname(symhdr)
-
-	// string header
-	off := 0
-	off = dsymptr(symhdr, off, symdata, 0)
-	off = duintxx(symhdr, off, uint64(len(s)), Widthint)
-	ggloblsym(symhdr, int32(off), obj.DUPOK|obj.RODATA|obj.LOCAL)
-
-	// string data
-	if symdata.Flags&SymUniq != 0 {
-		return symhdr, symdata
-	}
-	symdata.Flags |= SymUniq
-	symdata.Def = newname(symdata)
-
-	off = 0
-	var m int
-	for n := 0; n < len(s); n += m {
-		m = 8
-		if m > len(s)-n {
-			m = len(s) - n
-		}
-		off = dsname(symdata, off, s[n:n+m])
-	}
-
-	off = duint8(symdata, off, 0)                // terminating NUL for runtime
-	off = (off + Widthptr - 1) &^ (Widthptr - 1) // round to pointer alignment
-	ggloblsym(symdata, int32(off), obj.DUPOK|obj.RODATA|obj.LOCAL)
-
-	return symhdr, symdata
-}
-
-var slicebytes_gen int
-
-func slicebytes(nam *Node, s string, len int) {
-	var m int
-
-	slicebytes_gen++
-	symname := fmt.Sprintf(".gobytes.%d", slicebytes_gen)
-	sym := Pkglookup(symname, localpkg)
-	sym.Def = newname(sym)
-
-	off := 0
-	for n := 0; n < len; n += m {
-		m = 8
-		if m > len-n {
-			m = len - n
-		}
-		off = dsname(sym, off, s[n:n+m])
-	}
-
-	ggloblsym(sym, int32(off), obj.NOPTR|obj.LOCAL)
-
-	if nam.Op != ONAME {
-		Fatal("slicebytes %v", nam)
-	}
-	off = int(nam.Xoffset)
-	off = dsymptr(nam.Sym, off, sym, 0)
-	off = duintxx(nam.Sym, off, uint64(len), Widthint)
-	duintxx(nam.Sym, off, uint64(len), Widthint)
-}
-
-func dstringptr(s *Sym, off int, str string) int {
-	off = int(Rnd(int64(off), int64(Widthptr)))
-	p := Thearch.Gins(obj.ADATA, nil, nil)
-	p.From.Type = obj.TYPE_MEM
-	p.From.Name = obj.NAME_EXTERN
-	p.From.Sym = Linksym(s)
-	p.From.Offset = int64(off)
-	p.From3 = new(obj.Addr)
-	p.From3.Type = obj.TYPE_CONST
-	p.From3.Offset = int64(Widthptr)
-
-	Datastring(str+"\x00", &p.To) // TODO(rsc): Remove NUL
-	p.To.Type = obj.TYPE_ADDR
-	p.To.Etype = Simtype[TINT]
-	off += Widthptr
-
-	return off
-}
-
-func Datastring(s string, a *obj.Addr) {
-	_, symdata := stringsym(s)
-	a.Type = obj.TYPE_MEM
-	a.Name = obj.NAME_EXTERN
-	a.Sym = Linksym(symdata)
-	a.Node = symdata.Def
-	a.Offset = 0
-	a.Etype = Simtype[TINT]
-}
-
-func datagostring(sval string, a *obj.Addr) {
-	symhdr, _ := stringsym(sval)
-	a.Type = obj.TYPE_MEM
-	a.Name = obj.NAME_EXTERN
-	a.Sym = Linksym(symhdr)
-	a.Node = symhdr.Def
-	a.Offset = 0
-	a.Etype = TSTRING
-}
-
-func dgostringptr(s *Sym, off int, str string) int {
-	if str == "" {
-		return duintptr(s, off, 0)
-	}
-	return dgostrlitptr(s, off, &str)
-}
-
-func dgostrlitptr(s *Sym, off int, lit *string) int {
-	if lit == nil {
-		return duintptr(s, off, 0)
-	}
-	off = int(Rnd(int64(off), int64(Widthptr)))
-	p := Thearch.Gins(obj.ADATA, nil, nil)
-	p.From.Type = obj.TYPE_MEM
-	p.From.Name = obj.NAME_EXTERN
-	p.From.Sym = Linksym(s)
-	p.From.Offset = int64(off)
-	p.From3 = new(obj.Addr)
-	p.From3.Type = obj.TYPE_CONST
-	p.From3.Offset = int64(Widthptr)
-	datagostring(*lit, &p.To)
-	p.To.Type = obj.TYPE_ADDR
-	p.To.Etype = Simtype[TINT]
-	off += Widthptr
-
-	return off
-}
-
-func dsname(s *Sym, off int, t string) int {
-	p := Thearch.Gins(obj.ADATA, nil, nil)
-	p.From.Type = obj.TYPE_MEM
-	p.From.Name = obj.NAME_EXTERN
-	p.From.Offset = int64(off)
-	p.From.Sym = Linksym(s)
-	p.From3 = new(obj.Addr)
-	p.From3.Type = obj.TYPE_CONST
-	p.From3.Offset = int64(len(t))
-
-	p.To.Type = obj.TYPE_SCONST
-	p.To.Val = t
-	return off + len(t)
-}
-
-func dsymptr(s *Sym, off int, x *Sym, xoff int) int {
-	off = int(Rnd(int64(off), int64(Widthptr)))
-
-	p := Thearch.Gins(obj.ADATA, nil, nil)
-	p.From.Type = obj.TYPE_MEM
-	p.From.Name = obj.NAME_EXTERN
-	p.From.Sym = Linksym(s)
-	p.From.Offset = int64(off)
-	p.From3 = new(obj.Addr)
-	p.From3.Type = obj.TYPE_CONST
-	p.From3.Offset = int64(Widthptr)
-	p.To.Type = obj.TYPE_ADDR
-	p.To.Name = obj.NAME_EXTERN
-	p.To.Sym = Linksym(x)
-	p.To.Offset = int64(xoff)
-	off += Widthptr
-
-	return off
-}
-
-func gdata(nam *Node, nr *Node, wid int) {
-	if nr.Op == OLITERAL {
-		switch nr.Val().Ctype() {
-		case CTCPLX:
-			gdatacomplex(nam, nr.Val().U.(*Mpcplx))
-			return
-
-		case CTSTR:
-			gdatastring(nam, nr.Val().U.(string))
-			return
-		}
-	}
-
-	p := Thearch.Gins(obj.ADATA, nam, nr)
-	p.From3 = new(obj.Addr)
-	p.From3.Type = obj.TYPE_CONST
-	p.From3.Offset = int64(wid)
-}
-
-func gdatacomplex(nam *Node, cval *Mpcplx) {
-	w := cplxsubtype(int(nam.Type.Etype))
-	w = int(Types[w].Width)
-
-	p := Thearch.Gins(obj.ADATA, nam, nil)
-	p.From3 = new(obj.Addr)
-	p.From3.Type = obj.TYPE_CONST
-	p.From3.Offset = int64(w)
-	p.To.Type = obj.TYPE_FCONST
-	p.To.Val = mpgetflt(&cval.Real)
-
-	p = Thearch.Gins(obj.ADATA, nam, nil)
-	p.From3 = new(obj.Addr)
-	p.From3.Type = obj.TYPE_CONST
-	p.From3.Offset = int64(w)
-	p.From.Offset += int64(w)
-	p.To.Type = obj.TYPE_FCONST
-	p.To.Val = mpgetflt(&cval.Imag)
-}
-
-func gdatastring(nam *Node, sval string) {
-	var nod1 Node
-
-	p := Thearch.Gins(obj.ADATA, nam, nil)
-	Datastring(sval, &p.To)
-	p.From3 = new(obj.Addr)
-	p.From3.Type = obj.TYPE_CONST
-	p.From3.Offset = Types[Tptr].Width
-	p.To.Type = obj.TYPE_ADDR
-
-	//print("%v\n", p);
-
-	Nodconst(&nod1, Types[TINT], int64(len(sval)))
-
-	p = Thearch.Gins(obj.ADATA, nam, &nod1)
-	p.From3 = new(obj.Addr)
-	p.From3.Type = obj.TYPE_CONST
-	p.From3.Offset = int64(Widthint)
-	p.From.Offset += int64(Widthptr)
-}
diff --git a/src/cmd/compile/internal/gc/opnames.go b/src/cmd/compile/internal/gc/opnames.go
deleted file mode 100644
index 9134bd4..0000000
--- a/src/cmd/compile/internal/gc/opnames.go
+++ /dev/null
@@ -1,163 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-// auto generated by go tool dist
-var opnames = []string{
-	OXXX:             "XXX",
-	ONAME:            "NAME",
-	ONONAME:          "NONAME",
-	OTYPE:            "TYPE",
-	OPACK:            "PACK",
-	OLITERAL:         "LITERAL",
-	OADD:             "ADD",
-	OSUB:             "SUB",
-	OOR:              "OR",
-	OXOR:             "XOR",
-	OADDSTR:          "ADDSTR",
-	OADDR:            "ADDR",
-	OANDAND:          "ANDAND",
-	OAPPEND:          "APPEND",
-	OARRAYBYTESTR:    "ARRAYBYTESTR",
-	OARRAYBYTESTRTMP: "ARRAYBYTESTRTMP",
-	OARRAYRUNESTR:    "ARRAYRUNESTR",
-	OSTRARRAYBYTE:    "STRARRAYBYTE",
-	OSTRARRAYBYTETMP: "STRARRAYBYTETMP",
-	OSTRARRAYRUNE:    "STRARRAYRUNE",
-	OAS:              "AS",
-	OAS2:             "AS2",
-	OAS2FUNC:         "AS2FUNC",
-	OAS2RECV:         "AS2RECV",
-	OAS2MAPR:         "AS2MAPR",
-	OAS2DOTTYPE:      "AS2DOTTYPE",
-	OASOP:            "ASOP",
-	OASWB:            "ASWB",
-	OCALL:            "CALL",
-	OCALLFUNC:        "CALLFUNC",
-	OCALLMETH:        "CALLMETH",
-	OCALLINTER:       "CALLINTER",
-	OCALLPART:        "CALLPART",
-	OCAP:             "CAP",
-	OCLOSE:           "CLOSE",
-	OCLOSURE:         "CLOSURE",
-	OCMPIFACE:        "CMPIFACE",
-	OCMPSTR:          "CMPSTR",
-	OCOMPLIT:         "COMPLIT",
-	OMAPLIT:          "MAPLIT",
-	OSTRUCTLIT:       "STRUCTLIT",
-	OARRAYLIT:        "ARRAYLIT",
-	OPTRLIT:          "PTRLIT",
-	OCONV:            "CONV",
-	OCONVIFACE:       "CONVIFACE",
-	OCONVNOP:         "CONVNOP",
-	OCOPY:            "COPY",
-	ODCL:             "DCL",
-	ODCLFUNC:         "DCLFUNC",
-	ODCLFIELD:        "DCLFIELD",
-	ODCLCONST:        "DCLCONST",
-	ODCLTYPE:         "DCLTYPE",
-	ODELETE:          "DELETE",
-	ODOT:             "DOT",
-	ODOTPTR:          "DOTPTR",
-	ODOTMETH:         "DOTMETH",
-	ODOTINTER:        "DOTINTER",
-	OXDOT:            "XDOT",
-	ODOTTYPE:         "DOTTYPE",
-	ODOTTYPE2:        "DOTTYPE2",
-	OEQ:              "EQ",
-	ONE:              "NE",
-	OLT:              "LT",
-	OLE:              "LE",
-	OGE:              "GE",
-	OGT:              "GT",
-	OIND:             "IND",
-	OINDEX:           "INDEX",
-	OINDEXMAP:        "INDEXMAP",
-	OKEY:             "KEY",
-	OPARAM:           "PARAM",
-	OLEN:             "LEN",
-	OMAKE:            "MAKE",
-	OMAKECHAN:        "MAKECHAN",
-	OMAKEMAP:         "MAKEMAP",
-	OMAKESLICE:       "MAKESLICE",
-	OMUL:             "MUL",
-	ODIV:             "DIV",
-	OMOD:             "MOD",
-	OLSH:             "LSH",
-	ORSH:             "RSH",
-	OAND:             "AND",
-	OANDNOT:          "ANDNOT",
-	ONEW:             "NEW",
-	ONOT:             "NOT",
-	OCOM:             "COM",
-	OPLUS:            "PLUS",
-	OMINUS:           "MINUS",
-	OOROR:            "OROR",
-	OPANIC:           "PANIC",
-	OPRINT:           "PRINT",
-	OPRINTN:          "PRINTN",
-	OPAREN:           "PAREN",
-	OSEND:            "SEND",
-	OSLICE:           "SLICE",
-	OSLICEARR:        "SLICEARR",
-	OSLICESTR:        "SLICESTR",
-	OSLICE3:          "SLICE3",
-	OSLICE3ARR:       "SLICE3ARR",
-	ORECOVER:         "RECOVER",
-	ORECV:            "RECV",
-	ORUNESTR:         "RUNESTR",
-	OSELRECV:         "SELRECV",
-	OSELRECV2:        "SELRECV2",
-	OIOTA:            "IOTA",
-	OREAL:            "REAL",
-	OIMAG:            "IMAG",
-	OCOMPLEX:         "COMPLEX",
-	OBLOCK:           "BLOCK",
-	OBREAK:           "BREAK",
-	OCASE:            "CASE",
-	OXCASE:           "XCASE",
-	OCONTINUE:        "CONTINUE",
-	ODEFER:           "DEFER",
-	OEMPTY:           "EMPTY",
-	OFALL:            "FALL",
-	OXFALL:           "XFALL",
-	OFOR:             "FOR",
-	OGOTO:            "GOTO",
-	OIF:              "IF",
-	OLABEL:           "LABEL",
-	OPROC:            "PROC",
-	ORANGE:           "RANGE",
-	ORETURN:          "RETURN",
-	OSELECT:          "SELECT",
-	OSWITCH:          "SWITCH",
-	OTYPESW:          "TYPESW",
-	OTCHAN:           "TCHAN",
-	OTMAP:            "TMAP",
-	OTSTRUCT:         "TSTRUCT",
-	OTINTER:          "TINTER",
-	OTFUNC:           "TFUNC",
-	OTARRAY:          "TARRAY",
-	ODDD:             "DDD",
-	ODDDARG:          "DDDARG",
-	OINLCALL:         "INLCALL",
-	OEFACE:           "EFACE",
-	OITAB:            "ITAB",
-	OSPTR:            "SPTR",
-	OCLOSUREVAR:      "CLOSUREVAR",
-	OCFUNC:           "CFUNC",
-	OCHECKNIL:        "CHECKNIL",
-	OVARKILL:         "VARKILL",
-	OREGISTER:        "REGISTER",
-	OINDREG:          "INDREG",
-	OCMP:             "CMP",
-	ODEC:             "DEC",
-	OINC:             "INC",
-	OEXTEND:          "EXTEND",
-	OHMUL:            "HMUL",
-	OLROT:            "LROT",
-	ORROTC:           "RROTC",
-	ORETJMP:          "RETJMP",
-	OEND:             "END",
-}
diff --git a/src/cmd/compile/internal/gc/order.go b/src/cmd/compile/internal/gc/order.go
deleted file mode 100644
index 799a17e..0000000
--- a/src/cmd/compile/internal/gc/order.go
+++ /dev/null
@@ -1,1179 +0,0 @@
-// Copyright 2012 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import (
-	"fmt"
-	"strings"
-)
-
-// Rewrite tree to use separate statements to enforce
-// order of evaluation.  Makes walk easier, because it
-// can (after this runs) reorder at will within an expression.
-//
-// Rewrite x op= y into x = x op y.
-//
-// Introduce temporaries as needed by runtime routines.
-// For example, the map runtime routines take the map key
-// by reference, so make sure all map keys are addressable
-// by copying them to temporaries as needed.
-// The same is true for channel operations.
-//
-// Arrange that map index expressions only appear in direct
-// assignments x = m[k] or m[k] = x, never in larger expressions.
-//
-// Arrange that receive expressions only appear in direct assignments
-// x = <-c or as standalone statements <-c, never in larger expressions.
-
-// TODO(rsc): The temporary introduction during multiple assignments
-// should be moved into this file, so that the temporaries can be cleaned
-// and so that conversions implicit in the OAS2FUNC and OAS2RECV
-// nodes can be made explicit and then have their temporaries cleaned.
-
-// TODO(rsc): Goto and multilevel break/continue can jump over
-// inserted VARKILL annotations. Work out a way to handle these.
-// The current implementation is safe, in that it will execute correctly.
-// But it won't reuse temporaries as aggressively as it might, and
-// it can result in unnecessary zeroing of those variables in the function
-// prologue.
-
-// Order holds state during the ordering process.
-type Order struct {
-	out  *NodeList // list of generated statements
-	temp *NodeList // head of stack of temporary variables
-	free *NodeList // free list of NodeList* structs (for use in temp)
-}
-
-// Order rewrites fn->nbody to apply the ordering constraints
-// described in the comment at the top of the file.
-func order(fn *Node) {
-	if Debug['W'] > 1 {
-		s := fmt.Sprintf("\nbefore order %v", fn.Func.Nname.Sym)
-		dumplist(s, fn.Nbody)
-	}
-
-	orderblock(&fn.Nbody)
-}
-
-// Ordertemp allocates a new temporary with the given type,
-// pushes it onto the temp stack, and returns it.
-// If clear is true, ordertemp emits code to zero the temporary.
-func ordertemp(t *Type, order *Order, clear bool) *Node {
-	var_ := temp(t)
-	if clear {
-		a := Nod(OAS, var_, nil)
-		typecheck(&a, Etop)
-		order.out = list(order.out, a)
-	}
-
-	l := order.free
-	if l == nil {
-		l = new(NodeList)
-	}
-	order.free = l.Next
-	l.Next = order.temp
-	l.N = var_
-	order.temp = l
-	return var_
-}
-
-// Ordercopyexpr behaves like ordertemp but also emits
-// code to initialize the temporary to the value n.
-//
-// The clear argument is provided for use when the evaluation
-// of tmp = n turns into a function call that is passed a pointer
-// to the temporary as the output space. If the call blocks before
-// tmp has been written, the garbage collector will still treat the
-// temporary as live, so we must zero it before entering that call.
-// Today, this only happens for channel receive operations.
-// (The other candidate would be map access, but map access
-// returns a pointer to the result data instead of taking a pointer
-// to be filled in.)
-func ordercopyexpr(n *Node, t *Type, order *Order, clear int) *Node {
-	var_ := ordertemp(t, order, clear != 0)
-	a := Nod(OAS, var_, n)
-	typecheck(&a, Etop)
-	order.out = list(order.out, a)
-	return var_
-}
-
-// Ordercheapexpr returns a cheap version of n.
-// The definition of cheap is that n is a variable or constant.
-// If not, ordercheapexpr allocates a new tmp, emits tmp = n,
-// and then returns tmp.
-func ordercheapexpr(n *Node, order *Order) *Node {
-	if n == nil {
-		return nil
-	}
-	switch n.Op {
-	case ONAME, OLITERAL:
-		return n
-	case OLEN, OCAP:
-		l := ordercheapexpr(n.Left, order)
-		if l == n.Left {
-			return n
-		}
-		a := Nod(OXXX, nil, nil)
-		*a = *n
-		a.Orig = a
-		a.Left = l
-		typecheck(&a, Erv)
-		return a
-	}
-
-	return ordercopyexpr(n, n.Type, order, 0)
-}
-
-// Ordersafeexpr returns a safe version of n.
-// The definition of safe is that n can appear multiple times
-// without violating the semantics of the original program,
-// and that assigning to the safe version has the same effect
-// as assigning to the original n.
-//
-// The intended use is to apply to x when rewriting x += y into x = x + y.
-func ordersafeexpr(n *Node, order *Order) *Node {
-	switch n.Op {
-	case ONAME, OLITERAL:
-		return n
-
-	case ODOT, OLEN, OCAP:
-		l := ordersafeexpr(n.Left, order)
-		if l == n.Left {
-			return n
-		}
-		a := Nod(OXXX, nil, nil)
-		*a = *n
-		a.Orig = a
-		a.Left = l
-		typecheck(&a, Erv)
-		return a
-
-	case ODOTPTR, OIND:
-		l := ordercheapexpr(n.Left, order)
-		if l == n.Left {
-			return n
-		}
-		a := Nod(OXXX, nil, nil)
-		*a = *n
-		a.Orig = a
-		a.Left = l
-		typecheck(&a, Erv)
-		return a
-
-	case OINDEX, OINDEXMAP:
-		var l *Node
-		if Isfixedarray(n.Left.Type) {
-			l = ordersafeexpr(n.Left, order)
-		} else {
-			l = ordercheapexpr(n.Left, order)
-		}
-		r := ordercheapexpr(n.Right, order)
-		if l == n.Left && r == n.Right {
-			return n
-		}
-		a := Nod(OXXX, nil, nil)
-		*a = *n
-		a.Orig = a
-		a.Left = l
-		a.Right = r
-		typecheck(&a, Erv)
-		return a
-	}
-
-	Fatal("ordersafeexpr %v", Oconv(int(n.Op), 0))
-	return nil // not reached
-}
-
-// Istemp reports whether n is a temporary variable.
-func istemp(n *Node) bool {
-	if n.Op != ONAME {
-		return false
-	}
-	return strings.HasPrefix(n.Sym.Name, "autotmp_")
-}
-
-// Isaddrokay reports whether it is okay to pass n's address to runtime routines.
-// Taking the address of a variable makes the liveness and optimization analyses
-// lose track of where the variable's lifetime ends. To avoid hurting the analyses
-// of ordinary stack variables, those are not 'isaddrokay'. Temporaries are okay,
-// because we emit explicit VARKILL instructions marking the end of those
-// temporaries' lifetimes.
-func isaddrokay(n *Node) bool {
-	return islvalue(n) && (n.Op != ONAME || n.Class == PEXTERN || istemp(n))
-}
-
-// Orderaddrtemp ensures that *np is okay to pass by address to runtime routines.
-// If the original argument *np is not okay, orderaddrtemp creates a tmp, emits
-// tmp = *np, and then sets *np to the tmp variable.
-func orderaddrtemp(np **Node, order *Order) {
-	n := *np
-	if isaddrokay(n) {
-		return
-	}
-	*np = ordercopyexpr(n, n.Type, order, 0)
-}
-
-// Marktemp returns the top of the temporary variable stack.
-func marktemp(order *Order) *NodeList {
-	return order.temp
-}
-
-// Poptemp pops temporaries off the stack until reaching the mark,
-// which must have been returned by marktemp.
-func poptemp(mark *NodeList, order *Order) {
-	var l *NodeList
-
-	for {
-		l = order.temp
-		if l == mark {
-			break
-		}
-		order.temp = l.Next
-		l.Next = order.free
-		order.free = l
-	}
-}
-
-// Cleantempnopop emits to *out VARKILL instructions for each temporary
-// above the mark on the temporary stack, but it does not pop them
-// from the stack.
-func cleantempnopop(mark *NodeList, order *Order, out **NodeList) {
-	var kill *Node
-
-	for l := order.temp; l != mark; l = l.Next {
-		kill = Nod(OVARKILL, l.N, nil)
-		typecheck(&kill, Etop)
-		*out = list(*out, kill)
-	}
-}
-
-// Cleantemp emits VARKILL instructions for each temporary above the
-// mark on the temporary stack and removes them from the stack.
-func cleantemp(top *NodeList, order *Order) {
-	cleantempnopop(top, order, &order.out)
-	poptemp(top, order)
-}
-
-// Orderstmtlist orders each of the statements in the list.
-func orderstmtlist(l *NodeList, order *Order) {
-	for ; l != nil; l = l.Next {
-		orderstmt(l.N, order)
-	}
-}
-
-// Orderblock orders the block of statements *l onto a new list,
-// and then replaces *l with that list.
-func orderblock(l **NodeList) {
-	var order Order
-	mark := marktemp(&order)
-	orderstmtlist(*l, &order)
-	cleantemp(mark, &order)
-	*l = order.out
-}
-
-// Orderexprinplace orders the side effects in *np and
-// leaves them as the init list of the final *np.
-func orderexprinplace(np **Node, outer *Order) {
-	n := *np
-	var order Order
-	orderexpr(&n, &order, nil)
-	addinit(&n, order.out)
-
-	// insert new temporaries from order
-	// at head of outer list.
-	lp := &order.temp
-
-	for *lp != nil {
-		lp = &(*lp).Next
-	}
-	*lp = outer.temp
-	outer.temp = order.temp
-
-	*np = n
-}
-
-// Orderstmtinplace orders the side effects of the single statement *np
-// and replaces it with the resulting statement list.
-func orderstmtinplace(np **Node) {
-	n := *np
-	var order Order
-	mark := marktemp(&order)
-	orderstmt(n, &order)
-	cleantemp(mark, &order)
-	*np = liststmt(order.out)
-}
-
-// Orderinit moves n's init list to order->out.
-func orderinit(n *Node, order *Order) {
-	orderstmtlist(n.Ninit, order)
-	n.Ninit = nil
-}
-
-// Ismulticall reports whether the list l is f() for a multi-value function.
-// Such an f() could appear as the lone argument to a multi-arg function.
-func ismulticall(l *NodeList) bool {
-	// one arg only
-	if l == nil || l.Next != nil {
-		return false
-	}
-	n := l.N
-
-	// must be call
-	switch n.Op {
-	default:
-		return false
-
-	case OCALLFUNC, OCALLMETH, OCALLINTER:
-		break
-	}
-
-	// call must return multiple values
-	return n.Left.Type.Outtuple > 1
-}
-
-// Copyret emits t1, t2, ... = n, where n is a function call,
-// and then returns the list t1, t2, ....
-func copyret(n *Node, order *Order) *NodeList {
-	if n.Type.Etype != TSTRUCT || n.Type.Funarg == 0 {
-		Fatal("copyret %v %d", n.Type, n.Left.Type.Outtuple)
-	}
-
-	var l1 *NodeList
-	var l2 *NodeList
-	var tl Iter
-	var tmp *Node
-	for t := Structfirst(&tl, &n.Type); t != nil; t = structnext(&tl) {
-		tmp = temp(t.Type)
-		l1 = list(l1, tmp)
-		l2 = list(l2, tmp)
-	}
-
-	as := Nod(OAS2, nil, nil)
-	as.List = l1
-	as.Rlist = list1(n)
-	typecheck(&as, Etop)
-	orderstmt(as, order)
-
-	return l2
-}
-
-// Ordercallargs orders the list of call arguments *l.
-func ordercallargs(l **NodeList, order *Order) {
-	if ismulticall(*l) {
-		// return f() where f() is multiple values.
-		*l = copyret((*l).N, order)
-	} else {
-		orderexprlist(*l, order)
-	}
-}
-
-// Ordercall orders the call expression n.
-// n->op is OCALLMETH/OCALLFUNC/OCALLINTER or a builtin like OCOPY.
-func ordercall(n *Node, order *Order) {
-	orderexpr(&n.Left, order, nil)
-	orderexpr(&n.Right, order, nil) // ODDDARG temp
-	ordercallargs(&n.List, order)
-}
-
-// Ordermapassign appends n to order->out, introducing temporaries
-// to make sure that all map assignments have the form m[k] = x,
-// where x is adressable.
-// (Orderexpr has already been called on n, so we know k is addressable.)
-//
-// If n is m[k] = x where x is not addressable, the rewrite is:
-//	tmp = x
-//	m[k] = tmp
-//
-// If n is the multiple assignment form ..., m[k], ... = ..., the rewrite is
-//	t1 = m
-//	t2 = k
-//	...., t3, ... = x
-//	t1[t2] = t3
-//
-// The temporaries t1, t2 are needed in case the ... being assigned
-// contain m or k. They are usually unnecessary, but in the unnecessary
-// cases they are also typically registerizable, so not much harm done.
-// And this only applies to the multiple-assignment form.
-// We could do a more precise analysis if needed, like in walk.c.
-//
-// Ordermapassign also inserts these temporaries if needed for
-// calling writebarrierfat with a pointer to n->right.
-func ordermapassign(n *Node, order *Order) {
-	switch n.Op {
-	default:
-		Fatal("ordermapassign %v", Oconv(int(n.Op), 0))
-
-	case OAS:
-		order.out = list(order.out, n)
-
-		// We call writebarrierfat only for values > 4 pointers long. See walk.c.
-		if (n.Left.Op == OINDEXMAP || (needwritebarrier(n.Left, n.Right) && n.Left.Type.Width > int64(4*Widthptr))) && !isaddrokay(n.Right) {
-			m := n.Left
-			n.Left = ordertemp(m.Type, order, false)
-			a := Nod(OAS, m, n.Left)
-			typecheck(&a, Etop)
-			order.out = list(order.out, a)
-		}
-
-	case OAS2, OAS2DOTTYPE, OAS2MAPR, OAS2FUNC:
-		var post *NodeList
-		var m *Node
-		var a *Node
-		for l := n.List; l != nil; l = l.Next {
-			if l.N.Op == OINDEXMAP {
-				m = l.N
-				if !istemp(m.Left) {
-					m.Left = ordercopyexpr(m.Left, m.Left.Type, order, 0)
-				}
-				if !istemp(m.Right) {
-					m.Right = ordercopyexpr(m.Right, m.Right.Type, order, 0)
-				}
-				l.N = ordertemp(m.Type, order, false)
-				a = Nod(OAS, m, l.N)
-				typecheck(&a, Etop)
-				post = list(post, a)
-			} else if flag_race != 0 && n.Op == OAS2FUNC && !isblank(l.N) {
-				m = l.N
-				l.N = ordertemp(m.Type, order, false)
-				a = Nod(OAS, m, l.N)
-				typecheck(&a, Etop)
-				post = list(post, a)
-			}
-		}
-
-		order.out = list(order.out, n)
-		order.out = concat(order.out, post)
-	}
-}
-
-// Orderstmt orders the statement n, appending to order->out.
-// Temporaries created during the statement are cleaned
-// up using VARKILL instructions as possible.
-func orderstmt(n *Node, order *Order) {
-	if n == nil {
-		return
-	}
-
-	lno := int(setlineno(n))
-
-	orderinit(n, order)
-
-	switch n.Op {
-	default:
-		Fatal("orderstmt %v", Oconv(int(n.Op), 0))
-
-	case OVARKILL:
-		order.out = list(order.out, n)
-
-	case OAS:
-		t := marktemp(order)
-		orderexpr(&n.Left, order, nil)
-		orderexpr(&n.Right, order, n.Left)
-		ordermapassign(n, order)
-		cleantemp(t, order)
-
-	case OAS2,
-		OCLOSE,
-		OCOPY,
-		OPRINT,
-		OPRINTN,
-		ORECOVER,
-		ORECV:
-		t := marktemp(order)
-		orderexpr(&n.Left, order, nil)
-		orderexpr(&n.Right, order, nil)
-		orderexprlist(n.List, order)
-		orderexprlist(n.Rlist, order)
-		switch n.Op {
-		case OAS2, OAS2DOTTYPE:
-			ordermapassign(n, order)
-		default:
-			order.out = list(order.out, n)
-		}
-		cleantemp(t, order)
-
-	case OASOP:
-		// Special: rewrite l op= r into l = l op r.
-		// This simplifies quite a few operations;
-		// most important is that it lets us separate
-		// out map read from map write when l is
-		// a map index expression.
-		t := marktemp(order)
-
-		orderexpr(&n.Left, order, nil)
-		n.Left = ordersafeexpr(n.Left, order)
-		tmp1 := treecopy(n.Left, 0)
-		if tmp1.Op == OINDEXMAP {
-			tmp1.Etype = 0 // now an rvalue not an lvalue
-		}
-		tmp1 = ordercopyexpr(tmp1, n.Left.Type, order, 0)
-		n.Right = Nod(int(n.Etype), tmp1, n.Right)
-		typecheck(&n.Right, Erv)
-		orderexpr(&n.Right, order, nil)
-		n.Etype = 0
-		n.Op = OAS
-		ordermapassign(n, order)
-		cleantemp(t, order)
-
-		// Special: make sure key is addressable,
-	// and make sure OINDEXMAP is not copied out.
-	case OAS2MAPR:
-		t := marktemp(order)
-
-		orderexprlist(n.List, order)
-		r := n.Rlist.N
-		orderexpr(&r.Left, order, nil)
-		orderexpr(&r.Right, order, nil)
-
-		// See case OINDEXMAP below.
-		if r.Right.Op == OARRAYBYTESTR {
-			r.Right.Op = OARRAYBYTESTRTMP
-		}
-		orderaddrtemp(&r.Right, order)
-		ordermapassign(n, order)
-		cleantemp(t, order)
-
-		// Special: avoid copy of func call n->rlist->n.
-	case OAS2FUNC:
-		t := marktemp(order)
-
-		orderexprlist(n.List, order)
-		ordercall(n.Rlist.N, order)
-		ordermapassign(n, order)
-		cleantemp(t, order)
-
-		// Special: use temporary variables to hold result,
-	// so that assertI2Tetc can take address of temporary.
-	// No temporary for blank assignment.
-	case OAS2DOTTYPE:
-		t := marktemp(order)
-
-		orderexprlist(n.List, order)
-		orderexpr(&n.Rlist.N.Left, order, nil) // i in i.(T)
-		if isblank(n.List.N) {
-			order.out = list(order.out, n)
-		} else {
-			typ := n.Rlist.N.Type
-			tmp1 := ordertemp(typ, order, haspointers(typ))
-			order.out = list(order.out, n)
-			r := Nod(OAS, n.List.N, tmp1)
-			typecheck(&r, Etop)
-			ordermapassign(r, order)
-			n.List = list(list1(tmp1), n.List.Next.N)
-		}
-
-		cleantemp(t, order)
-
-		// Special: use temporary variables to hold result,
-	// so that chanrecv can take address of temporary.
-	case OAS2RECV:
-		t := marktemp(order)
-
-		orderexprlist(n.List, order)
-		orderexpr(&n.Rlist.N.Left, order, nil) // arg to recv
-		ch := n.Rlist.N.Left.Type
-		tmp1 := ordertemp(ch.Type, order, haspointers(ch.Type))
-		var tmp2 *Node
-		if !isblank(n.List.Next.N) {
-			tmp2 = ordertemp(n.List.Next.N.Type, order, false)
-		} else {
-			tmp2 = ordertemp(Types[TBOOL], order, false)
-		}
-		order.out = list(order.out, n)
-		r := Nod(OAS, n.List.N, tmp1)
-		typecheck(&r, Etop)
-		ordermapassign(r, order)
-		r = Nod(OAS, n.List.Next.N, tmp2)
-		typecheck(&r, Etop)
-		ordermapassign(r, order)
-		n.List = list(list1(tmp1), tmp2)
-		cleantemp(t, order)
-
-		// Special: does not save n onto out.
-	case OBLOCK, OEMPTY:
-		orderstmtlist(n.List, order)
-
-		// Special: n->left is not an expression; save as is.
-	case OBREAK,
-		OCONTINUE,
-		ODCL,
-		ODCLCONST,
-		ODCLTYPE,
-		OFALL,
-		OXFALL,
-		OGOTO,
-		OLABEL,
-		ORETJMP:
-		order.out = list(order.out, n)
-
-		// Special: handle call arguments.
-	case OCALLFUNC, OCALLINTER, OCALLMETH:
-		t := marktemp(order)
-
-		ordercall(n, order)
-		order.out = list(order.out, n)
-		cleantemp(t, order)
-
-		// Special: order arguments to inner call but not call itself.
-	case ODEFER, OPROC:
-		t := marktemp(order)
-
-		switch n.Left.Op {
-		// Delete will take the address of the key.
-		// Copy key into new temp and do not clean it
-		// (it persists beyond the statement).
-		case ODELETE:
-			orderexprlist(n.Left.List, order)
-
-			t1 := marktemp(order)
-			np := &n.Left.List.Next.N // map key
-			*np = ordercopyexpr(*np, (*np).Type, order, 0)
-			poptemp(t1, order)
-
-		default:
-			ordercall(n.Left, order)
-		}
-
-		order.out = list(order.out, n)
-		cleantemp(t, order)
-
-	case ODELETE:
-		t := marktemp(order)
-		orderexpr(&n.List.N, order, nil)
-		orderexpr(&n.List.Next.N, order, nil)
-		orderaddrtemp(&n.List.Next.N, order) // map key
-		order.out = list(order.out, n)
-		cleantemp(t, order)
-
-		// Clean temporaries from condition evaluation at
-	// beginning of loop body and after for statement.
-	case OFOR:
-		t := marktemp(order)
-
-		orderexprinplace(&n.Left, order)
-		var l *NodeList
-		cleantempnopop(t, order, &l)
-		n.Nbody = concat(l, n.Nbody)
-		orderblock(&n.Nbody)
-		orderstmtinplace(&n.Right)
-		order.out = list(order.out, n)
-		cleantemp(t, order)
-
-		// Clean temporaries from condition at
-	// beginning of both branches.
-	case OIF:
-		t := marktemp(order)
-
-		orderexprinplace(&n.Left, order)
-		var l *NodeList
-		cleantempnopop(t, order, &l)
-		n.Nbody = concat(l, n.Nbody)
-		l = nil
-		cleantempnopop(t, order, &l)
-		n.Rlist = concat(l, n.Rlist)
-		poptemp(t, order)
-		orderblock(&n.Nbody)
-		orderblock(&n.Rlist)
-		order.out = list(order.out, n)
-
-		// Special: argument will be converted to interface using convT2E
-	// so make sure it is an addressable temporary.
-	case OPANIC:
-		t := marktemp(order)
-
-		orderexpr(&n.Left, order, nil)
-		if !Isinter(n.Left.Type) {
-			orderaddrtemp(&n.Left, order)
-		}
-		order.out = list(order.out, n)
-		cleantemp(t, order)
-
-		// n->right is the expression being ranged over.
-	// order it, and then make a copy if we need one.
-	// We almost always do, to ensure that we don't
-	// see any value changes made during the loop.
-	// Usually the copy is cheap (e.g., array pointer, chan, slice, string are all tiny).
-	// The exception is ranging over an array value (not a slice, not a pointer to array),
-	// which must make a copy to avoid seeing updates made during
-	// the range body. Ranging over an array value is uncommon though.
-	case ORANGE:
-		t := marktemp(order)
-
-		orderexpr(&n.Right, order, nil)
-		switch n.Type.Etype {
-		default:
-			Fatal("orderstmt range %v", n.Type)
-
-			// Mark []byte(str) range expression to reuse string backing storage.
-		// It is safe because the storage cannot be mutated.
-		case TARRAY:
-			if n.Right.Op == OSTRARRAYBYTE {
-				n.Right.Op = OSTRARRAYBYTETMP
-			}
-			if count(n.List) < 2 || isblank(n.List.Next.N) {
-				// for i := range x will only use x once, to compute len(x).
-				// No need to copy it.
-				break
-			}
-			fallthrough
-
-			// chan, string, slice, array ranges use value multiple times.
-		// make copy.
-		// fall through
-		case TCHAN, TSTRING:
-			r := n.Right
-
-			if r.Type.Etype == TSTRING && r.Type != Types[TSTRING] {
-				r = Nod(OCONV, r, nil)
-				r.Type = Types[TSTRING]
-				typecheck(&r, Erv)
-			}
-
-			n.Right = ordercopyexpr(r, r.Type, order, 0)
-
-			// copy the map value in case it is a map literal.
-		// TODO(rsc): Make tmp = literal expressions reuse tmp.
-		// For maps tmp is just one word so it hardly matters.
-		case TMAP:
-			r := n.Right
-
-			n.Right = ordercopyexpr(r, r.Type, order, 0)
-
-			// n->alloc is the temp for the iterator.
-			prealloc[n] = ordertemp(Types[TUINT8], order, true)
-		}
-
-		for l := n.List; l != nil; l = l.Next {
-			orderexprinplace(&l.N, order)
-		}
-		orderblock(&n.Nbody)
-		order.out = list(order.out, n)
-		cleantemp(t, order)
-
-	case ORETURN:
-		ordercallargs(&n.List, order)
-		order.out = list(order.out, n)
-
-		// Special: clean case temporaries in each block entry.
-	// Select must enter one of its blocks, so there is no
-	// need for a cleaning at the end.
-	// Doubly special: evaluation order for select is stricter
-	// than ordinary expressions. Even something like p.c
-	// has to be hoisted into a temporary, so that it cannot be
-	// reordered after the channel evaluation for a different
-	// case (if p were nil, then the timing of the fault would
-	// give this away).
-	case OSELECT:
-		t := marktemp(order)
-
-		var tmp1 *Node
-		var tmp2 *Node
-		var r *Node
-		for l := n.List; l != nil; l = l.Next {
-			if l.N.Op != OXCASE {
-				Fatal("order select case %v", Oconv(int(l.N.Op), 0))
-			}
-			r = l.N.Left
-			setlineno(l.N)
-
-			// Append any new body prologue to ninit.
-			// The next loop will insert ninit into nbody.
-			if l.N.Ninit != nil {
-				Fatal("order select ninit")
-			}
-			if r != nil {
-				switch r.Op {
-				default:
-					Yyerror("unknown op in select %v", Oconv(int(r.Op), 0))
-					Dump("select case", r)
-
-					// If this is case x := <-ch or case x, y := <-ch, the case has
-				// the ODCL nodes to declare x and y. We want to delay that
-				// declaration (and possible allocation) until inside the case body.
-				// Delete the ODCL nodes here and recreate them inside the body below.
-				case OSELRECV, OSELRECV2:
-					if r.Colas {
-						t = r.Ninit
-						if t != nil && t.N.Op == ODCL && t.N.Left == r.Left {
-							t = t.Next
-						}
-						if t != nil && t.N.Op == ODCL && r.List != nil && t.N.Left == r.List.N {
-							t = t.Next
-						}
-						if t == nil {
-							r.Ninit = nil
-						}
-					}
-
-					if r.Ninit != nil {
-						Yyerror("ninit on select recv")
-						dumplist("ninit", r.Ninit)
-					}
-
-					// case x = <-c
-					// case x, ok = <-c
-					// r->left is x, r->ntest is ok, r->right is ORECV, r->right->left is c.
-					// r->left == N means 'case <-c'.
-					// c is always evaluated; x and ok are only evaluated when assigned.
-					orderexpr(&r.Right.Left, order, nil)
-
-					if r.Right.Left.Op != ONAME {
-						r.Right.Left = ordercopyexpr(r.Right.Left, r.Right.Left.Type, order, 0)
-					}
-
-					// Introduce temporary for receive and move actual copy into case body.
-					// avoids problems with target being addressed, as usual.
-					// NOTE: If we wanted to be clever, we could arrange for just one
-					// temporary per distinct type, sharing the temp among all receives
-					// with that temp. Similarly one ok bool could be shared among all
-					// the x,ok receives. Not worth doing until there's a clear need.
-					if r.Left != nil && isblank(r.Left) {
-						r.Left = nil
-					}
-					if r.Left != nil {
-						// use channel element type for temporary to avoid conversions,
-						// such as in case interfacevalue = <-intchan.
-						// the conversion happens in the OAS instead.
-						tmp1 = r.Left
-
-						if r.Colas {
-							tmp2 = Nod(ODCL, tmp1, nil)
-							typecheck(&tmp2, Etop)
-							l.N.Ninit = list(l.N.Ninit, tmp2)
-						}
-
-						r.Left = ordertemp(r.Right.Left.Type.Type, order, haspointers(r.Right.Left.Type.Type))
-						tmp2 = Nod(OAS, tmp1, r.Left)
-						typecheck(&tmp2, Etop)
-						l.N.Ninit = list(l.N.Ninit, tmp2)
-					}
-
-					if r.List != nil && isblank(r.List.N) {
-						r.List = nil
-					}
-					if r.List != nil {
-						tmp1 = r.List.N
-						if r.Colas {
-							tmp2 = Nod(ODCL, tmp1, nil)
-							typecheck(&tmp2, Etop)
-							l.N.Ninit = list(l.N.Ninit, tmp2)
-						}
-
-						r.List = list1(ordertemp(tmp1.Type, order, false))
-						tmp2 = Nod(OAS, tmp1, r.List.N)
-						typecheck(&tmp2, Etop)
-						l.N.Ninit = list(l.N.Ninit, tmp2)
-					}
-
-					orderblock(&l.N.Ninit)
-
-				case OSEND:
-					if r.Ninit != nil {
-						Yyerror("ninit on select send")
-						dumplist("ninit", r.Ninit)
-					}
-
-					// case c <- x
-					// r->left is c, r->right is x, both are always evaluated.
-					orderexpr(&r.Left, order, nil)
-
-					if !istemp(r.Left) {
-						r.Left = ordercopyexpr(r.Left, r.Left.Type, order, 0)
-					}
-					orderexpr(&r.Right, order, nil)
-					if !istemp(r.Right) {
-						r.Right = ordercopyexpr(r.Right, r.Right.Type, order, 0)
-					}
-				}
-			}
-
-			orderblock(&l.N.Nbody)
-		}
-
-		// Now that we have accumulated all the temporaries, clean them.
-		// Also insert any ninit queued during the previous loop.
-		// (The temporary cleaning must follow that ninit work.)
-		for l := n.List; l != nil; l = l.Next {
-			cleantempnopop(t, order, &l.N.Ninit)
-			l.N.Nbody = concat(l.N.Ninit, l.N.Nbody)
-			l.N.Ninit = nil
-		}
-
-		order.out = list(order.out, n)
-		poptemp(t, order)
-
-		// Special: value being sent is passed as a pointer; make it addressable.
-	case OSEND:
-		t := marktemp(order)
-
-		orderexpr(&n.Left, order, nil)
-		orderexpr(&n.Right, order, nil)
-		orderaddrtemp(&n.Right, order)
-		order.out = list(order.out, n)
-		cleantemp(t, order)
-
-		// TODO(rsc): Clean temporaries more aggressively.
-	// Note that because walkswitch will rewrite some of the
-	// switch into a binary search, this is not as easy as it looks.
-	// (If we ran that code here we could invoke orderstmt on
-	// the if-else chain instead.)
-	// For now just clean all the temporaries at the end.
-	// In practice that's fine.
-	case OSWITCH:
-		t := marktemp(order)
-
-		orderexpr(&n.Left, order, nil)
-		for l := n.List; l != nil; l = l.Next {
-			if l.N.Op != OXCASE {
-				Fatal("order switch case %v", Oconv(int(l.N.Op), 0))
-			}
-			orderexprlistinplace(l.N.List, order)
-			orderblock(&l.N.Nbody)
-		}
-
-		order.out = list(order.out, n)
-		cleantemp(t, order)
-	}
-
-	lineno = int32(lno)
-}
-
-// Orderexprlist orders the expression list l into order.
-func orderexprlist(l *NodeList, order *Order) {
-	for ; l != nil; l = l.Next {
-		orderexpr(&l.N, order, nil)
-	}
-}
-
-// Orderexprlist orders the expression list l but saves
-// the side effects on the individual expression ninit lists.
-func orderexprlistinplace(l *NodeList, order *Order) {
-	for ; l != nil; l = l.Next {
-		orderexprinplace(&l.N, order)
-	}
-}
-
-// prealloc[x] records the allocation to use for x.
-var prealloc = map[*Node]*Node{}
-
-// Orderexpr orders a single expression, appending side
-// effects to order->out as needed.
-// If this is part of an assignment lhs = *np, lhs is given.
-// Otherwise lhs == nil. (When lhs != nil it may be possible
-// to avoid copying the result of the expression to a temporary.)
-func orderexpr(np **Node, order *Order, lhs *Node) {
-	n := *np
-	if n == nil {
-		return
-	}
-
-	lno := int(setlineno(n))
-	orderinit(n, order)
-
-	switch n.Op {
-	default:
-		orderexpr(&n.Left, order, nil)
-		orderexpr(&n.Right, order, nil)
-		orderexprlist(n.List, order)
-		orderexprlist(n.Rlist, order)
-
-		// Addition of strings turns into a function call.
-	// Allocate a temporary to hold the strings.
-	// Fewer than 5 strings use direct runtime helpers.
-	case OADDSTR:
-		orderexprlist(n.List, order)
-
-		if count(n.List) > 5 {
-			t := typ(TARRAY)
-			t.Bound = int64(count(n.List))
-			t.Type = Types[TSTRING]
-			prealloc[n] = ordertemp(t, order, false)
-		}
-
-		// Mark string(byteSlice) arguments to reuse byteSlice backing
-		// buffer during conversion. String concatenation does not
-		// memorize the strings for later use, so it is safe.
-		// However, we can do it only if there is at least one non-empty string literal.
-		// Otherwise if all other arguments are empty strings,
-		// concatstrings will return the reference to the temp string
-		// to the caller.
-		hasbyte := false
-
-		haslit := false
-		for l := n.List; l != nil; l = l.Next {
-			hasbyte = hasbyte || l.N.Op == OARRAYBYTESTR
-			haslit = haslit || l.N.Op == OLITERAL && len(l.N.Val().U.(string)) != 0
-		}
-
-		if haslit && hasbyte {
-			for l := n.List; l != nil; l = l.Next {
-				if l.N.Op == OARRAYBYTESTR {
-					l.N.Op = OARRAYBYTESTRTMP
-				}
-			}
-		}
-
-	case OCMPSTR:
-		orderexpr(&n.Left, order, nil)
-		orderexpr(&n.Right, order, nil)
-
-		// Mark string(byteSlice) arguments to reuse byteSlice backing
-		// buffer during conversion. String comparison does not
-		// memorize the strings for later use, so it is safe.
-		if n.Left.Op == OARRAYBYTESTR {
-			n.Left.Op = OARRAYBYTESTRTMP
-		}
-		if n.Right.Op == OARRAYBYTESTR {
-			n.Right.Op = OARRAYBYTESTRTMP
-		}
-
-		// key must be addressable
-	case OINDEXMAP:
-		orderexpr(&n.Left, order, nil)
-
-		orderexpr(&n.Right, order, nil)
-
-		// For x = m[string(k)] where k is []byte, the allocation of
-		// backing bytes for the string can be avoided by reusing
-		// the []byte backing array. This is a special case that it
-		// would be nice to handle more generally, but because
-		// there are no []byte-keyed maps, this specific case comes
-		// up in important cases in practice. See issue 3512.
-		// Nothing can change the []byte we are not copying before
-		// the map index, because the map access is going to
-		// be forced to happen immediately following this
-		// conversion (by the ordercopyexpr a few lines below).
-		if n.Etype == 0 && n.Right.Op == OARRAYBYTESTR {
-			n.Right.Op = OARRAYBYTESTRTMP
-		}
-
-		orderaddrtemp(&n.Right, order)
-		if n.Etype == 0 {
-			// use of value (not being assigned);
-			// make copy in temporary.
-			n = ordercopyexpr(n, n.Type, order, 0)
-		}
-
-		// concrete type (not interface) argument must be addressable
-	// temporary to pass to runtime.
-	case OCONVIFACE:
-		orderexpr(&n.Left, order, nil)
-
-		if !Isinter(n.Left.Type) {
-			orderaddrtemp(&n.Left, order)
-		}
-
-	case OANDAND, OOROR:
-		mark := marktemp(order)
-		orderexpr(&n.Left, order, nil)
-
-		// Clean temporaries from first branch at beginning of second.
-		// Leave them on the stack so that they can be killed in the outer
-		// context in case the short circuit is taken.
-		var l *NodeList
-
-		cleantempnopop(mark, order, &l)
-		n.Right.Ninit = concat(l, n.Right.Ninit)
-		orderexprinplace(&n.Right, order)
-
-	case OCALLFUNC,
-		OCALLINTER,
-		OCALLMETH,
-		OCAP,
-		OCOMPLEX,
-		OCOPY,
-		OIMAG,
-		OLEN,
-		OMAKECHAN,
-		OMAKEMAP,
-		OMAKESLICE,
-		ONEW,
-		OREAL,
-		ORECOVER:
-		ordercall(n, order)
-		if lhs == nil || lhs.Op != ONAME || flag_race != 0 {
-			n = ordercopyexpr(n, n.Type, order, 0)
-		}
-
-	case OAPPEND:
-		ordercallargs(&n.List, order)
-		if lhs == nil || lhs.Op != ONAME && !samesafeexpr(lhs, n.List.N) {
-			n = ordercopyexpr(n, n.Type, order, 0)
-		}
-
-	case OSLICE, OSLICEARR, OSLICESTR:
-		orderexpr(&n.Left, order, nil)
-		orderexpr(&n.Right.Left, order, nil)
-		n.Right.Left = ordercheapexpr(n.Right.Left, order)
-		orderexpr(&n.Right.Right, order, nil)
-		n.Right.Right = ordercheapexpr(n.Right.Right, order)
-		if lhs == nil || lhs.Op != ONAME && !samesafeexpr(lhs, n.Left) {
-			n = ordercopyexpr(n, n.Type, order, 0)
-		}
-
-	case OSLICE3, OSLICE3ARR:
-		orderexpr(&n.Left, order, nil)
-		orderexpr(&n.Right.Left, order, nil)
-		n.Right.Left = ordercheapexpr(n.Right.Left, order)
-		orderexpr(&n.Right.Right.Left, order, nil)
-		n.Right.Right.Left = ordercheapexpr(n.Right.Right.Left, order)
-		orderexpr(&n.Right.Right.Right, order, nil)
-		n.Right.Right.Right = ordercheapexpr(n.Right.Right.Right, order)
-		if lhs == nil || lhs.Op != ONAME && !samesafeexpr(lhs, n.Left) {
-			n = ordercopyexpr(n, n.Type, order, 0)
-		}
-
-	case OCLOSURE:
-		if n.Noescape && n.Func.Cvars != nil {
-			prealloc[n] = ordertemp(Types[TUINT8], order, false) // walk will fill in correct type
-		}
-
-	case OARRAYLIT, OCALLPART:
-		orderexpr(&n.Left, order, nil)
-		orderexpr(&n.Right, order, nil)
-		orderexprlist(n.List, order)
-		orderexprlist(n.Rlist, order)
-		if n.Noescape {
-			prealloc[n] = ordertemp(Types[TUINT8], order, false) // walk will fill in correct type
-		}
-
-	case ODDDARG:
-		if n.Noescape {
-			// The ddd argument does not live beyond the call it is created for.
-			// Allocate a temporary that will be cleaned up when this statement
-			// completes. We could be more aggressive and try to arrange for it
-			// to be cleaned up when the call completes.
-			prealloc[n] = ordertemp(n.Type.Type, order, false)
-		}
-
-	case ODOTTYPE, ODOTTYPE2:
-		orderexpr(&n.Left, order, nil)
-		// TODO(rsc): The Isfat is for consistency with componentgen and walkexpr.
-		// It needs to be removed in all three places.
-		// That would allow inlining x.(struct{*int}) the same as x.(*int).
-		if !isdirectiface(n.Type) || Isfat(n.Type) || flag_race != 0 {
-			n = ordercopyexpr(n, n.Type, order, 1)
-		}
-
-	case ORECV:
-		orderexpr(&n.Left, order, nil)
-		n = ordercopyexpr(n, n.Type, order, 1)
-
-	case OEQ, ONE:
-		orderexpr(&n.Left, order, nil)
-		orderexpr(&n.Right, order, nil)
-		t := n.Left.Type
-		if t.Etype == TSTRUCT || Isfixedarray(t) {
-			// for complex comparisons, we need both args to be
-			// addressable so we can pass them to the runtime.
-			orderaddrtemp(&n.Left, order)
-			orderaddrtemp(&n.Right, order)
-		}
-	}
-
-	lineno = int32(lno)
-
-	*np = n
-}
diff --git a/src/cmd/compile/internal/gc/pgen.go b/src/cmd/compile/internal/gc/pgen.go
deleted file mode 100644
index 47cb8b1..0000000
--- a/src/cmd/compile/internal/gc/pgen.go
+++ /dev/null
@@ -1,544 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import (
-	"cmd/internal/obj"
-	"crypto/md5"
-	"fmt"
-	"strings"
-)
-
-// "Portable" code generation.
-
-var makefuncdatasym_nsym int32
-
-func makefuncdatasym(namefmt string, funcdatakind int64) *Sym {
-	var nod Node
-
-	sym := Lookupf(namefmt, makefuncdatasym_nsym)
-	makefuncdatasym_nsym++
-	pnod := newname(sym)
-	pnod.Class = PEXTERN
-	Nodconst(&nod, Types[TINT32], funcdatakind)
-	Thearch.Gins(obj.AFUNCDATA, &nod, pnod)
-	return sym
-}
-
-// gvardef inserts a VARDEF for n into the instruction stream.
-// VARDEF is an annotation for the liveness analysis, marking a place
-// where a complete initialization (definition) of a variable begins.
-// Since the liveness analysis can see initialization of single-word
-// variables quite easy, gvardef is usually only called for multi-word
-// or 'fat' variables, those satisfying isfat(n->type).
-// However, gvardef is also called when a non-fat variable is initialized
-// via a block move; the only time this happens is when you have
-//	return f()
-// for a function with multiple return values exactly matching the return
-// types of the current function.
-//
-// A 'VARDEF x' annotation in the instruction stream tells the liveness
-// analysis to behave as though the variable x is being initialized at that
-// point in the instruction stream. The VARDEF must appear before the
-// actual (multi-instruction) initialization, and it must also appear after
-// any uses of the previous value, if any. For example, if compiling:
-//
-//	x = x[1:]
-//
-// it is important to generate code like:
-//
-//	base, len, cap = pieces of x[1:]
-//	VARDEF x
-//	x = {base, len, cap}
-//
-// If instead the generated code looked like:
-//
-//	VARDEF x
-//	base, len, cap = pieces of x[1:]
-//	x = {base, len, cap}
-//
-// then the liveness analysis would decide the previous value of x was
-// unnecessary even though it is about to be used by the x[1:] computation.
-// Similarly, if the generated code looked like:
-//
-//	base, len, cap = pieces of x[1:]
-//	x = {base, len, cap}
-//	VARDEF x
-//
-// then the liveness analysis will not preserve the new value of x, because
-// the VARDEF appears to have "overwritten" it.
-//
-// VARDEF is a bit of a kludge to work around the fact that the instruction
-// stream is working on single-word values but the liveness analysis
-// wants to work on individual variables, which might be multi-word
-// aggregates. It might make sense at some point to look into letting
-// the liveness analysis work on single-word values as well, although
-// there are complications around interface values, slices, and strings,
-// all of which cannot be treated as individual words.
-//
-// VARKILL is the opposite of VARDEF: it marks a value as no longer needed,
-// even if its address has been taken. That is, a VARKILL annotation asserts
-// that its argument is certainly dead, for use when the liveness analysis
-// would not otherwise be able to deduce that fact.
-
-func gvardefx(n *Node, as int) {
-	if n == nil {
-		Fatal("gvardef nil")
-	}
-	if n.Op != ONAME {
-		Yyerror("gvardef %v; %v", Oconv(int(n.Op), obj.FmtSharp), n)
-		return
-	}
-
-	switch n.Class {
-	case PAUTO, PPARAM, PPARAMOUT:
-		Thearch.Gins(as, nil, n)
-	}
-}
-
-func Gvardef(n *Node) {
-	gvardefx(n, obj.AVARDEF)
-}
-
-func gvarkill(n *Node) {
-	gvardefx(n, obj.AVARKILL)
-}
-
-func removevardef(firstp *obj.Prog) {
-	for p := firstp; p != nil; p = p.Link {
-		for p.Link != nil && (p.Link.As == obj.AVARDEF || p.Link.As == obj.AVARKILL) {
-			p.Link = p.Link.Link
-		}
-		if p.To.Type == obj.TYPE_BRANCH {
-			for p.To.Val.(*obj.Prog) != nil && (p.To.Val.(*obj.Prog).As == obj.AVARDEF || p.To.Val.(*obj.Prog).As == obj.AVARKILL) {
-				p.To.Val = p.To.Val.(*obj.Prog).Link
-			}
-		}
-	}
-}
-
-func gcsymdup(s *Sym) {
-	ls := Linksym(s)
-	if len(ls.R) > 0 {
-		Fatal("cannot rosymdup %s with relocations", ls.Name)
-	}
-	ls.Name = fmt.Sprintf("gclocals·%x", md5.Sum(ls.P))
-	ls.Dupok = 1
-}
-
-func emitptrargsmap() {
-	sym := Lookup(fmt.Sprintf("%s.args_stackmap", Curfn.Func.Nname.Sym.Name))
-
-	nptr := int(Curfn.Type.Argwid / int64(Widthptr))
-	bv := bvalloc(int32(nptr) * 2)
-	nbitmap := 1
-	if Curfn.Type.Outtuple > 0 {
-		nbitmap = 2
-	}
-	off := duint32(sym, 0, uint32(nbitmap))
-	off = duint32(sym, off, uint32(bv.n))
-	var xoffset int64
-	if Curfn.Type.Thistuple > 0 {
-		xoffset = 0
-		onebitwalktype1(getthisx(Curfn.Type), &xoffset, bv)
-	}
-
-	if Curfn.Type.Intuple > 0 {
-		xoffset = 0
-		onebitwalktype1(getinargx(Curfn.Type), &xoffset, bv)
-	}
-
-	for j := 0; int32(j) < bv.n; j += 32 {
-		off = duint32(sym, off, bv.b[j/32])
-	}
-	if Curfn.Type.Outtuple > 0 {
-		xoffset = 0
-		onebitwalktype1(getoutargx(Curfn.Type), &xoffset, bv)
-		for j := 0; int32(j) < bv.n; j += 32 {
-			off = duint32(sym, off, bv.b[j/32])
-		}
-	}
-
-	ggloblsym(sym, int32(off), obj.RODATA|obj.LOCAL)
-}
-
-// Sort the list of stack variables. Autos after anything else,
-// within autos, unused after used, within used, things with
-// pointers first, zeroed things first, and then decreasing size.
-// Because autos are laid out in decreasing addresses
-// on the stack, pointers first, zeroed things first and decreasing size
-// really means, in memory, things with pointers needing zeroing at
-// the top of the stack and increasing in size.
-// Non-autos sort on offset.
-func cmpstackvar(a *Node, b *Node) int {
-	if a.Class != b.Class {
-		if a.Class == PAUTO {
-			return +1
-		}
-		return -1
-	}
-
-	if a.Class != PAUTO {
-		if a.Xoffset < b.Xoffset {
-			return -1
-		}
-		if a.Xoffset > b.Xoffset {
-			return +1
-		}
-		return 0
-	}
-
-	if a.Used != b.Used {
-		return obj.Bool2int(b.Used) - obj.Bool2int(a.Used)
-	}
-
-	ap := obj.Bool2int(haspointers(a.Type))
-	bp := obj.Bool2int(haspointers(b.Type))
-	if ap != bp {
-		return bp - ap
-	}
-
-	ap = obj.Bool2int(a.Name.Needzero)
-	bp = obj.Bool2int(b.Name.Needzero)
-	if ap != bp {
-		return bp - ap
-	}
-
-	if a.Type.Width < b.Type.Width {
-		return +1
-	}
-	if a.Type.Width > b.Type.Width {
-		return -1
-	}
-
-	return stringsCompare(a.Sym.Name, b.Sym.Name)
-}
-
-// stkdelta records the stack offset delta for a node
-// during the compaction of the stack frame to remove
-// unused stack slots.
-var stkdelta = map[*Node]int64{}
-
-// TODO(lvd) find out where the PAUTO/OLITERAL nodes come from.
-func allocauto(ptxt *obj.Prog) {
-	Stksize = 0
-	stkptrsize = 0
-
-	if Curfn.Func.Dcl == nil {
-		return
-	}
-
-	// Mark the PAUTO's unused.
-	for ll := Curfn.Func.Dcl; ll != nil; ll = ll.Next {
-		if ll.N.Class == PAUTO {
-			ll.N.Used = false
-		}
-	}
-
-	markautoused(ptxt)
-
-	listsort(&Curfn.Func.Dcl, cmpstackvar)
-
-	// Unused autos are at the end, chop 'em off.
-	ll := Curfn.Func.Dcl
-
-	n := ll.N
-	if n.Class == PAUTO && n.Op == ONAME && !n.Used {
-		// No locals used at all
-		Curfn.Func.Dcl = nil
-
-		fixautoused(ptxt)
-		return
-	}
-
-	for ll := Curfn.Func.Dcl; ll.Next != nil; ll = ll.Next {
-		n = ll.Next.N
-		if n.Class == PAUTO && n.Op == ONAME && !n.Used {
-			ll.Next = nil
-			Curfn.Func.Dcl.End = ll
-			break
-		}
-	}
-
-	// Reassign stack offsets of the locals that are still there.
-	var w int64
-	for ll := Curfn.Func.Dcl; ll != nil; ll = ll.Next {
-		n = ll.N
-		if n.Class != PAUTO || n.Op != ONAME {
-			continue
-		}
-
-		dowidth(n.Type)
-		w = n.Type.Width
-		if w >= Thearch.MAXWIDTH || w < 0 {
-			Fatal("bad width")
-		}
-		Stksize += w
-		Stksize = Rnd(Stksize, int64(n.Type.Align))
-		if haspointers(n.Type) {
-			stkptrsize = Stksize
-		}
-		if Thearch.Thechar == '5' || Thearch.Thechar == '7' || Thearch.Thechar == '9' {
-			Stksize = Rnd(Stksize, int64(Widthptr))
-		}
-		if Stksize >= 1<<31 {
-			setlineno(Curfn)
-			Yyerror("stack frame too large (>2GB)")
-		}
-
-		stkdelta[n] = -Stksize - n.Xoffset
-	}
-
-	Stksize = Rnd(Stksize, int64(Widthreg))
-	stkptrsize = Rnd(stkptrsize, int64(Widthreg))
-
-	fixautoused(ptxt)
-
-	// The debug information needs accurate offsets on the symbols.
-	for ll := Curfn.Func.Dcl; ll != nil; ll = ll.Next {
-		if ll.N.Class != PAUTO || ll.N.Op != ONAME {
-			continue
-		}
-		ll.N.Xoffset += stkdelta[ll.N]
-		delete(stkdelta, ll.N)
-	}
-}
-
-func Cgen_checknil(n *Node) {
-	if Disable_checknil != 0 {
-		return
-	}
-
-	// Ideally we wouldn't see any integer types here, but we do.
-	if n.Type == nil || (!Isptr[n.Type.Etype] && !Isint[n.Type.Etype] && n.Type.Etype != TUNSAFEPTR) {
-		Dump("checknil", n)
-		Fatal("bad checknil")
-	}
-
-	if ((Thearch.Thechar == '5' || Thearch.Thechar == '7' || Thearch.Thechar == '9') && n.Op != OREGISTER) || !n.Addable || n.Op == OLITERAL {
-		var reg Node
-		Regalloc(&reg, Types[Tptr], n)
-		Cgen(n, &reg)
-		Thearch.Gins(obj.ACHECKNIL, &reg, nil)
-		Regfree(&reg)
-		return
-	}
-
-	Thearch.Gins(obj.ACHECKNIL, n, nil)
-}
-
-func compile(fn *Node) {
-	if Newproc == nil {
-		Newproc = Sysfunc("newproc")
-		Deferproc = Sysfunc("deferproc")
-		Deferreturn = Sysfunc("deferreturn")
-		Panicindex = Sysfunc("panicindex")
-		panicslice = Sysfunc("panicslice")
-		throwreturn = Sysfunc("throwreturn")
-	}
-
-	lno := setlineno(fn)
-
-	Curfn = fn
-	dowidth(Curfn.Type)
-
-	var oldstksize int64
-	var nod1 Node
-	var ptxt *obj.Prog
-	var pl *obj.Plist
-	var p *obj.Prog
-	var n *Node
-	var nam *Node
-	var gcargs *Sym
-	var gclocals *Sym
-	if fn.Nbody == nil {
-		if pure_go != 0 || strings.HasPrefix(fn.Func.Nname.Sym.Name, "init.") {
-			Yyerror("missing function body for %q", fn.Func.Nname.Sym.Name)
-			goto ret
-		}
-
-		if Debug['A'] != 0 {
-			goto ret
-		}
-		emitptrargsmap()
-		goto ret
-	}
-
-	saveerrors()
-
-	// set up domain for labels
-	clearlabels()
-
-	if Curfn.Type.Outnamed != 0 {
-		// add clearing of the output parameters
-		var save Iter
-		t := Structfirst(&save, Getoutarg(Curfn.Type))
-
-		for t != nil {
-			if t.Nname != nil {
-				n = Nod(OAS, t.Nname, nil)
-				typecheck(&n, Etop)
-				Curfn.Nbody = concat(list1(n), Curfn.Nbody)
-			}
-
-			t = structnext(&save)
-		}
-	}
-
-	order(Curfn)
-	if nerrors != 0 {
-		goto ret
-	}
-
-	Hasdefer = 0
-	walk(Curfn)
-	if nerrors != 0 {
-		goto ret
-	}
-	if flag_race != 0 {
-		racewalk(Curfn)
-	}
-	if nerrors != 0 {
-		goto ret
-	}
-
-	continpc = nil
-	breakpc = nil
-
-	pl = newplist()
-	pl.Name = Linksym(Curfn.Func.Nname.Sym)
-
-	setlineno(Curfn)
-
-	Nodconst(&nod1, Types[TINT32], 0)
-	nam = Curfn.Func.Nname
-	if isblank(nam) {
-		nam = nil
-	}
-	ptxt = Thearch.Gins(obj.ATEXT, nam, &nod1)
-	Afunclit(&ptxt.From, Curfn.Func.Nname)
-	ptxt.From3 = new(obj.Addr)
-	if fn.Func.Dupok {
-		ptxt.From3.Offset |= obj.DUPOK
-	}
-	if fn.Func.Wrapper {
-		ptxt.From3.Offset |= obj.WRAPPER
-	}
-	if fn.Func.Needctxt {
-		ptxt.From3.Offset |= obj.NEEDCTXT
-	}
-	if fn.Func.Nosplit {
-		ptxt.From3.Offset |= obj.NOSPLIT
-	}
-	if fn.Func.Systemstack {
-		ptxt.From.Sym.Cfunc = 1
-	}
-
-	// Clumsy but important.
-	// See test/recover.go for test cases and src/reflect/value.go
-	// for the actual functions being considered.
-	if myimportpath != "" && myimportpath == "reflect" {
-		if Curfn.Func.Nname.Sym.Name == "callReflect" || Curfn.Func.Nname.Sym.Name == "callMethod" {
-			ptxt.From3.Offset |= obj.WRAPPER
-		}
-	}
-
-	ginit()
-
-	gcargs = makefuncdatasym("gcargs·%d", obj.FUNCDATA_ArgsPointerMaps)
-	gclocals = makefuncdatasym("gclocals·%d", obj.FUNCDATA_LocalsPointerMaps)
-
-	for _, t := range Curfn.Func.Fieldtrack {
-		gtrack(tracksym(t))
-	}
-
-	for l := fn.Func.Dcl; l != nil; l = l.Next {
-		n = l.N
-		if n.Op != ONAME { // might be OTYPE or OLITERAL
-			continue
-		}
-		switch n.Class {
-		case PAUTO, PPARAM, PPARAMOUT:
-			Nodconst(&nod1, Types[TUINTPTR], l.N.Type.Width)
-			p = Thearch.Gins(obj.ATYPE, l.N, &nod1)
-			p.From.Gotype = Linksym(ngotype(l.N))
-		}
-	}
-
-	Genlist(Curfn.Func.Enter)
-	Genlist(Curfn.Nbody)
-	gclean()
-	checklabels()
-	if nerrors != 0 {
-		goto ret
-	}
-	if Curfn.Func.Endlineno != 0 {
-		lineno = Curfn.Func.Endlineno
-	}
-
-	if Curfn.Type.Outtuple != 0 {
-		Ginscall(throwreturn, 0)
-	}
-
-	ginit()
-
-	// TODO: Determine when the final cgen_ret can be omitted. Perhaps always?
-	cgen_ret(nil)
-
-	if Hasdefer != 0 {
-		// deferreturn pretends to have one uintptr argument.
-		// Reserve space for it so stack scanner is happy.
-		if Maxarg < int64(Widthptr) {
-			Maxarg = int64(Widthptr)
-		}
-	}
-
-	gclean()
-	if nerrors != 0 {
-		goto ret
-	}
-
-	Pc.As = obj.ARET // overwrite AEND
-	Pc.Lineno = lineno
-
-	fixjmp(ptxt)
-	if Debug['N'] == 0 || Debug['R'] != 0 || Debug['P'] != 0 {
-		regopt(ptxt)
-		nilopt(ptxt)
-	}
-
-	Thearch.Expandchecks(ptxt)
-
-	oldstksize = Stksize
-	allocauto(ptxt)
-
-	if false {
-		fmt.Printf("allocauto: %d to %d\n", oldstksize, int64(Stksize))
-	}
-
-	setlineno(Curfn)
-	if int64(Stksize)+Maxarg > 1<<31 {
-		Yyerror("stack frame too large (>2GB)")
-		goto ret
-	}
-
-	// Emit garbage collection symbols.
-	liveness(Curfn, ptxt, gcargs, gclocals)
-
-	gcsymdup(gcargs)
-	gcsymdup(gclocals)
-
-	Thearch.Defframe(ptxt)
-
-	if Debug['f'] != 0 {
-		frame(0)
-	}
-
-	// Remove leftover instrumentation from the instruction stream.
-	removevardef(ptxt)
-
-ret:
-	lineno = lno
-}
diff --git a/src/cmd/compile/internal/gc/plive.go b/src/cmd/compile/internal/gc/plive.go
deleted file mode 100644
index efaf69f..0000000
--- a/src/cmd/compile/internal/gc/plive.go
+++ /dev/null
@@ -1,1830 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Garbage collector liveness bitmap generation.
-
-// The command line flag -live causes this code to print debug information.
-// The levels are:
-//
-//	-live (aka -live=1): print liveness lists as code warnings at safe points
-//	-live=2: print an assembly listing with liveness annotations
-//	-live=3: print information during each computation phase (much chattier)
-//
-// Each level includes the earlier output as well.
-
-package gc
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-	"sort"
-)
-
-const (
-	UNVISITED = 0
-	VISITED   = 1
-)
-
-// An ordinary basic block.
-//
-// Instructions are threaded together in a doubly-linked list.  To iterate in
-// program order follow the link pointer from the first node and stop after the
-// last node has been visited
-//
-//   for(p = bb->first;; p = p->link) {
-//     ...
-//     if(p == bb->last)
-//       break;
-//   }
-//
-// To iterate in reverse program order by following the opt pointer from the
-// last node
-//
-//   for(p = bb->last; p != nil; p = p->opt) {
-//     ...
-//   }
-type BasicBlock struct {
-	pred            []*BasicBlock // predecessors; if none, probably start of CFG
-	succ            []*BasicBlock // successors; if none, probably ends in return statement
-	first           *obj.Prog     // first instruction in block
-	last            *obj.Prog     // last instruction in block
-	rpo             int           // reverse post-order number (also index in cfg)
-	mark            int           // mark bit for traversals
-	lastbitmapindex int           // for livenessepilogue
-
-	// Summary sets of block effects.
-
-	// Computed during livenessprologue using only the content of
-	// individual blocks:
-	//
-	//	uevar: upward exposed variables (used before set in block)
-	//	varkill: killed variables (set in block)
-	//	avarinit: addrtaken variables set or used (proof of initialization)
-	uevar    Bvec
-	varkill  Bvec
-	avarinit Bvec
-
-	// Computed during livenesssolve using control flow information:
-	//
-	//	livein: variables live at block entry
-	//	liveout: variables live at block exit
-	//	avarinitany: addrtaken variables possibly initialized at block exit
-	//		(initialized in block or at exit from any predecessor block)
-	//	avarinitall: addrtaken variables certainly initialized at block exit
-	//		(initialized in block or at exit from all predecessor blocks)
-	livein      Bvec
-	liveout     Bvec
-	avarinitany Bvec
-	avarinitall Bvec
-}
-
-// A collection of global state used by liveness analysis.
-type Liveness struct {
-	fn   *Node
-	ptxt *obj.Prog
-	vars []*Node
-	cfg  []*BasicBlock
-
-	// An array with a bit vector for each safe point tracking live pointers
-	// in the arguments and locals area, indexed by bb.rpo.
-	argslivepointers []Bvec
-	livepointers     []Bvec
-}
-
-func xmalloc(size uint32) interface{} {
-	result := (interface{})(make([]byte, size))
-	if result == nil {
-		Fatal("malloc failed")
-	}
-	return result
-}
-
-// Constructs a new basic block containing a single instruction.
-func newblock(prog *obj.Prog) *BasicBlock {
-	if prog == nil {
-		Fatal("newblock: prog cannot be nil")
-	}
-	result := new(BasicBlock)
-	result.rpo = -1
-	result.mark = UNVISITED
-	result.first = prog
-	result.last = prog
-	result.pred = make([]*BasicBlock, 0, 2)
-	result.succ = make([]*BasicBlock, 0, 2)
-	return result
-}
-
-// Frees a basic block and all of its leaf data structures.
-func freeblock(bb *BasicBlock) {
-	if bb == nil {
-		Fatal("freeblock: cannot free nil")
-	}
-}
-
-// Adds an edge between two basic blocks by making from a predecessor of to and
-// to a successor of from.
-func addedge(from *BasicBlock, to *BasicBlock) {
-	if from == nil {
-		Fatal("addedge: from is nil")
-	}
-	if to == nil {
-		Fatal("addedge: to is nil")
-	}
-	from.succ = append(from.succ, to)
-	to.pred = append(to.pred, from)
-}
-
-// Inserts prev before curr in the instruction
-// stream.  Any control flow, such as branches or fall throughs, that target the
-// existing instruction are adjusted to target the new instruction.
-func splicebefore(lv *Liveness, bb *BasicBlock, prev *obj.Prog, curr *obj.Prog) {
-	// There may be other instructions pointing at curr,
-	// and we want them to now point at prev. Instead of
-	// trying to find all such instructions, swap the contents
-	// so that the problem becomes inserting next after curr.
-	// The "opt" field is the backward link in the linked list.
-
-	// Overwrite curr's data with prev, but keep the list links.
-	tmp := *curr
-
-	*curr = *prev
-	curr.Opt = tmp.Opt
-	curr.Link = tmp.Link
-
-	// Overwrite prev (now next) with curr's old data.
-	next := prev
-
-	*next = tmp
-	next.Opt = nil
-	next.Link = nil
-
-	// Now insert next after curr.
-	next.Link = curr.Link
-
-	next.Opt = curr
-	curr.Link = next
-	if next.Link != nil && next.Link.Opt == curr {
-		next.Link.Opt = next
-	}
-
-	if bb.last == curr {
-		bb.last = next
-	}
-}
-
-// A pretty printer for basic blocks.
-func printblock(bb *BasicBlock) {
-	fmt.Printf("basic block %d\n", bb.rpo)
-	fmt.Printf("\tpred:")
-	for _, pred := range bb.pred {
-		fmt.Printf(" %d", pred.rpo)
-	}
-	fmt.Printf("\n")
-	fmt.Printf("\tsucc:")
-	for _, succ := range bb.succ {
-		fmt.Printf(" %d", succ.rpo)
-	}
-	fmt.Printf("\n")
-	fmt.Printf("\tprog:\n")
-	for prog := bb.first; ; prog = prog.Link {
-		fmt.Printf("\t\t%v\n", prog)
-		if prog == bb.last {
-			break
-		}
-	}
-}
-
-// Iterates over a basic block applying a callback to each instruction.  There
-// are two criteria for termination.  If the end of basic block is reached a
-// value of zero is returned.  If the callback returns a non-zero value, the
-// iteration is stopped and the value of the callback is returned.
-func blockany(bb *BasicBlock, f func(*obj.Prog) bool) bool {
-	for p := bb.last; p != nil; p = p.Opt.(*obj.Prog) {
-		if f(p) {
-			return true
-		}
-	}
-	return false
-}
-
-// Collects and returns and array of Node*s for functions arguments and local
-// variables.
-func getvariables(fn *Node) []*Node {
-	result := make([]*Node, 0, 0)
-	for ll := fn.Func.Dcl; ll != nil; ll = ll.Next {
-		if ll.N.Op == ONAME {
-			// In order for GODEBUG=gcdead=1 to work, each bitmap needs
-			// to contain information about all variables covered by the bitmap.
-			// For local variables, the bitmap only covers the stkptrsize
-			// bytes in the frame where variables containing pointers live.
-			// For arguments and results, the bitmap covers all variables,
-			// so we must include all the variables, even the ones without
-			// pointers.
-			//
-			// The Node.opt field is available for use by optimization passes.
-			// We use it to hold the index of the node in the variables array, plus 1
-			// (so that 0 means the Node is not in the variables array).
-			// Each pass should clear opt when done, but you never know,
-			// so clear them all ourselves too.
-			// The Node.curfn field is supposed to be set to the current function
-			// already, but for some compiler-introduced names it seems not to be,
-			// so fix that here.
-			// Later, when we want to find the index of a node in the variables list,
-			// we will check that n->curfn == curfn and n->opt > 0. Then n->opt - 1
-			// is the index in the variables list.
-			ll.N.SetOpt(nil)
-
-			// The compiler doesn't emit initializations for zero-width parameters or results.
-			if ll.N.Type.Width == 0 {
-				continue
-			}
-
-			ll.N.Name.Curfn = Curfn
-			switch ll.N.Class {
-			case PAUTO:
-				if haspointers(ll.N.Type) {
-					ll.N.SetOpt(int32(len(result)))
-					result = append(result, ll.N)
-				}
-
-			case PPARAM, PPARAMOUT:
-				ll.N.SetOpt(int32(len(result)))
-				result = append(result, ll.N)
-			}
-		}
-	}
-
-	return result
-}
-
-// A pretty printer for control flow graphs.  Takes an array of BasicBlock*s.
-func printcfg(cfg []*BasicBlock) {
-	for _, bb := range cfg {
-		printblock(bb)
-	}
-}
-
-// Assigns a reverse post order number to each connected basic block using the
-// standard algorithm.  Unconnected blocks will not be affected.
-func reversepostorder(root *BasicBlock, rpo *int32) {
-	root.mark = VISITED
-	for _, bb := range root.succ {
-		if bb.mark == UNVISITED {
-			reversepostorder(bb, rpo)
-		}
-	}
-	*rpo -= 1
-	root.rpo = int(*rpo)
-}
-
-// Comparison predicate used for sorting basic blocks by their rpo in ascending
-// order.
-type blockrpocmp []*BasicBlock
-
-func (x blockrpocmp) Len() int           { return len(x) }
-func (x blockrpocmp) Swap(i, j int)      { x[i], x[j] = x[j], x[i] }
-func (x blockrpocmp) Less(i, j int) bool { return x[i].rpo < x[j].rpo }
-
-// A pattern matcher for call instructions.  Returns true when the instruction
-// is a call to a specific package qualified function name.
-func iscall(prog *obj.Prog, name *obj.LSym) bool {
-	if prog == nil {
-		Fatal("iscall: prog is nil")
-	}
-	if name == nil {
-		Fatal("iscall: function name is nil")
-	}
-	if prog.As != obj.ACALL {
-		return false
-	}
-	return name == prog.To.Sym
-}
-
-// Returns true for instructions that call a runtime function implementing a
-// select communication clause.
-
-var selectNames [4]*obj.LSym
-
-func isselectcommcasecall(prog *obj.Prog) bool {
-	if selectNames[0] == nil {
-		selectNames[0] = Linksym(Pkglookup("selectsend", Runtimepkg))
-		selectNames[1] = Linksym(Pkglookup("selectrecv", Runtimepkg))
-		selectNames[2] = Linksym(Pkglookup("selectrecv2", Runtimepkg))
-		selectNames[3] = Linksym(Pkglookup("selectdefault", Runtimepkg))
-	}
-
-	for _, name := range selectNames {
-		if iscall(prog, name) {
-			return true
-		}
-	}
-	return false
-}
-
-// Returns true for call instructions that target runtime·newselect.
-
-var isnewselect_sym *obj.LSym
-
-func isnewselect(prog *obj.Prog) bool {
-	if isnewselect_sym == nil {
-		isnewselect_sym = Linksym(Pkglookup("newselect", Runtimepkg))
-	}
-	return iscall(prog, isnewselect_sym)
-}
-
-// Returns true for call instructions that target runtime·selectgo.
-
-var isselectgocall_sym *obj.LSym
-
-func isselectgocall(prog *obj.Prog) bool {
-	if isselectgocall_sym == nil {
-		isselectgocall_sym = Linksym(Pkglookup("selectgo", Runtimepkg))
-	}
-	return iscall(prog, isselectgocall_sym)
-}
-
-var isdeferreturn_sym *obj.LSym
-
-func isdeferreturn(prog *obj.Prog) bool {
-	if isdeferreturn_sym == nil {
-		isdeferreturn_sym = Linksym(Pkglookup("deferreturn", Runtimepkg))
-	}
-	return iscall(prog, isdeferreturn_sym)
-}
-
-// Walk backwards from a runtime·selectgo call up to its immediately dominating
-// runtime·newselect call.  Any successor nodes of communication clause nodes
-// are implicit successors of the runtime·selectgo call node.  The goal of this
-// analysis is to add these missing edges to complete the control flow graph.
-func addselectgosucc(selectgo *BasicBlock) {
-	var succ *BasicBlock
-
-	pred := selectgo
-	for {
-		if len(pred.pred) == 0 {
-			Fatal("selectgo does not have a newselect")
-		}
-		pred = pred.pred[0]
-		if blockany(pred, isselectcommcasecall) {
-			// A select comm case block should have exactly one
-			// successor.
-			if len(pred.succ) != 1 {
-				Fatal("select comm case has too many successors")
-			}
-			succ = pred.succ[0]
-
-			// Its successor should have exactly two successors.
-			// The drop through should flow to the selectgo block
-			// and the branch should lead to the select case
-			// statements block.
-			if len(succ.succ) != 2 {
-				Fatal("select comm case successor has too many successors")
-			}
-
-			// Add the block as a successor of the selectgo block.
-			addedge(selectgo, succ)
-		}
-
-		if blockany(pred, isnewselect) {
-			// Reached the matching newselect.
-			break
-		}
-	}
-}
-
-// The entry point for the missing selectgo control flow algorithm.  Takes an
-// array of BasicBlock*s containing selectgo calls.
-func fixselectgo(selectgo []*BasicBlock) {
-	for _, bb := range selectgo {
-		addselectgosucc(bb)
-	}
-}
-
-// Constructs a control flow graph from a sequence of instructions.  This
-// procedure is complicated by various sources of implicit control flow that are
-// not accounted for using the standard cfg construction algorithm.  Returns an
-// array of BasicBlock*s in control flow graph form (basic blocks ordered by
-// their RPO number).
-func newcfg(firstp *obj.Prog) []*BasicBlock {
-	// Reset the opt field of each prog to nil.  In the first and second
-	// passes, instructions that are labels temporarily use the opt field to
-	// point to their basic block.  In the third pass, the opt field reset
-	// to point to the predecessor of an instruction in its basic block.
-	for p := firstp; p != nil; p = p.Link {
-		p.Opt = nil
-	}
-
-	// Allocate an array to remember where we have seen selectgo calls.
-	// These blocks will be revisited to add successor control flow edges.
-	selectgo := make([]*BasicBlock, 0, 0)
-
-	// Loop through all instructions identifying branch targets
-	// and fall-throughs and allocate basic blocks.
-	cfg := make([]*BasicBlock, 0, 0)
-
-	bb := newblock(firstp)
-	cfg = append(cfg, bb)
-	for p := firstp; p != nil; p = p.Link {
-		Thearch.Proginfo(p)
-		if p.To.Type == obj.TYPE_BRANCH {
-			if p.To.Val == nil {
-				Fatal("prog branch to nil")
-			}
-			if p.To.Val.(*obj.Prog).Opt == nil {
-				p.To.Val.(*obj.Prog).Opt = newblock(p.To.Val.(*obj.Prog))
-				cfg = append(cfg, p.To.Val.(*obj.Prog).Opt.(*BasicBlock))
-			}
-
-			if p.As != obj.AJMP && p.Link != nil && p.Link.Opt == nil {
-				p.Link.Opt = newblock(p.Link)
-				cfg = append(cfg, p.Link.Opt.(*BasicBlock))
-			}
-		} else if isselectcommcasecall(p) || isselectgocall(p) {
-			// Accommodate implicit selectgo control flow.
-			if p.Link.Opt == nil {
-				p.Link.Opt = newblock(p.Link)
-				cfg = append(cfg, p.Link.Opt.(*BasicBlock))
-			}
-		}
-	}
-
-	// Loop through all basic blocks maximally growing the list of
-	// contained instructions until a label is reached.  Add edges
-	// for branches and fall-through instructions.
-	for _, bb := range cfg {
-		for p := bb.last; p != nil; p = p.Link {
-			if p.Opt != nil && p != bb.last {
-				break
-			}
-			bb.last = p
-
-			// Stop before an unreachable RET, to avoid creating
-			// unreachable control flow nodes.
-			if p.Link != nil && p.Link.As == obj.ARET && p.Link.Mode == 1 {
-				break
-			}
-
-			// Collect basic blocks with selectgo calls.
-			if isselectgocall(p) {
-				selectgo = append(selectgo, bb)
-			}
-		}
-
-		if bb.last.To.Type == obj.TYPE_BRANCH {
-			addedge(bb, bb.last.To.Val.(*obj.Prog).Opt.(*BasicBlock))
-		}
-		if bb.last.Link != nil {
-			// Add a fall-through when the instruction is
-			// not an unconditional control transfer.
-			if bb.last.As != obj.AJMP && bb.last.As != obj.ARET && bb.last.As != obj.AUNDEF {
-				addedge(bb, bb.last.Link.Opt.(*BasicBlock))
-			}
-		}
-	}
-
-	// Add back links so the instructions in a basic block can be traversed
-	// backward.  This is the final state of the instruction opt field.
-	for _, bb := range cfg {
-		p := bb.first
-		var prev *obj.Prog
-		for {
-			p.Opt = prev
-			if p == bb.last {
-				break
-			}
-			prev = p
-			p = p.Link
-		}
-	}
-
-	// Add missing successor edges to the selectgo blocks.
-	if len(selectgo) != 0 {
-		fixselectgo([]*BasicBlock(selectgo))
-	}
-
-	// Find a depth-first order and assign a depth-first number to
-	// all basic blocks.
-	for _, bb := range cfg {
-		bb.mark = UNVISITED
-	}
-	bb = cfg[0]
-	rpo := int32(len(cfg))
-	reversepostorder(bb, &rpo)
-
-	// Sort the basic blocks by their depth first number.  The
-	// array is now a depth-first spanning tree with the first
-	// node being the root.
-	sort.Sort(blockrpocmp(cfg))
-
-	// Unreachable control flow nodes are indicated by a -1 in the rpo
-	// field.  If we see these nodes something must have gone wrong in an
-	// upstream compilation phase.
-	bb = cfg[0]
-	if bb.rpo == -1 {
-		fmt.Printf("newcfg: unreachable basic block for %v\n", bb.last)
-		printcfg(cfg)
-		Fatal("newcfg: invalid control flow graph")
-	}
-
-	return cfg
-}
-
-// Frees a control flow graph (an array of BasicBlock*s) and all of its leaf
-// data structures.
-func freecfg(cfg []*BasicBlock) {
-	if len(cfg) > 0 {
-		bb0 := cfg[0]
-		for p := bb0.first; p != nil; p = p.Link {
-			p.Opt = nil
-		}
-	}
-}
-
-// Returns true if the node names a variable that is otherwise uninteresting to
-// the liveness computation.
-func isfunny(n *Node) bool {
-	return n.Sym != nil && (n.Sym.Name == ".fp" || n.Sym.Name == ".args")
-}
-
-// Computes the effects of an instruction on a set of
-// variables.  The vars argument is an array of Node*s.
-//
-// The output vectors give bits for variables:
-//	uevar - used by this instruction
-//	varkill - killed by this instruction
-//		for variables without address taken, means variable was set
-//		for variables with address taken, means variable was marked dead
-//	avarinit - initialized or referred to by this instruction,
-//		only for variables with address taken but not escaping to heap
-//
-// The avarinit output serves as a signal that the data has been
-// initialized, because any use of a variable must come after its
-// initialization.
-func progeffects(prog *obj.Prog, vars []*Node, uevar Bvec, varkill Bvec, avarinit Bvec) {
-	bvresetall(uevar)
-	bvresetall(varkill)
-	bvresetall(avarinit)
-
-	if prog.As == obj.ARET {
-		// Return instructions implicitly read all the arguments.  For
-		// the sake of correctness, out arguments must be read.  For the
-		// sake of backtrace quality, we read in arguments as well.
-		//
-		// A return instruction with a p->to is a tail return, which brings
-		// the stack pointer back up (if it ever went down) and then jumps
-		// to a new function entirely. That form of instruction must read
-		// all the parameters for correctness, and similarly it must not
-		// read the out arguments - they won't be set until the new
-		// function runs.
-		for i, node := range vars {
-			switch node.Class &^ PHEAP {
-			case PPARAM:
-				bvset(uevar, int32(i))
-
-				// If the result had its address taken, it is being tracked
-			// by the avarinit code, which does not use uevar.
-			// If we added it to uevar too, we'd not see any kill
-			// and decide that the variable was live entry, which it is not.
-			// So only use uevar in the non-addrtaken case.
-			// The p->to.type == thearch.D_NONE limits the bvset to
-			// non-tail-call return instructions; see note above
-			// the for loop for details.
-			case PPARAMOUT:
-				if !node.Addrtaken && prog.To.Type == obj.TYPE_NONE {
-					bvset(uevar, int32(i))
-				}
-			}
-		}
-
-		return
-	}
-
-	if prog.As == obj.ATEXT {
-		// A text instruction marks the entry point to a function and
-		// the definition point of all in arguments.
-		for i, node := range vars {
-			switch node.Class &^ PHEAP {
-			case PPARAM:
-				if node.Addrtaken {
-					bvset(avarinit, int32(i))
-				}
-				bvset(varkill, int32(i))
-			}
-		}
-
-		return
-	}
-
-	if prog.Info.Flags&(LeftRead|LeftWrite|LeftAddr) != 0 {
-		from := &prog.From
-		if from.Node != nil && from.Sym != nil && ((from.Node).(*Node)).Name.Curfn == Curfn {
-			switch ((from.Node).(*Node)).Class &^ PHEAP {
-			case PAUTO, PPARAM, PPARAMOUT:
-				pos, ok := from.Node.(*Node).Opt().(int32) // index in vars
-				if !ok {
-					goto Next
-				}
-				if pos >= int32(len(vars)) || vars[pos] != from.Node {
-					Fatal("bad bookkeeping in liveness %v %d", Nconv(from.Node.(*Node), 0), pos)
-				}
-				if ((from.Node).(*Node)).Addrtaken {
-					bvset(avarinit, pos)
-				} else {
-					if prog.Info.Flags&(LeftRead|LeftAddr) != 0 {
-						bvset(uevar, pos)
-					}
-					if prog.Info.Flags&LeftWrite != 0 {
-						if from.Node != nil && !Isfat(((from.Node).(*Node)).Type) {
-							bvset(varkill, pos)
-						}
-					}
-				}
-			}
-		}
-	}
-
-Next:
-	if prog.Info.Flags&(RightRead|RightWrite|RightAddr) != 0 {
-		to := &prog.To
-		if to.Node != nil && to.Sym != nil && ((to.Node).(*Node)).Name.Curfn == Curfn {
-			switch ((to.Node).(*Node)).Class &^ PHEAP {
-			case PAUTO, PPARAM, PPARAMOUT:
-				pos, ok := to.Node.(*Node).Opt().(int32) // index in vars
-				if !ok {
-					return
-				}
-				if pos >= int32(len(vars)) || vars[pos] != to.Node {
-					Fatal("bad bookkeeping in liveness %v %d", Nconv(to.Node.(*Node), 0), pos)
-				}
-				if ((to.Node).(*Node)).Addrtaken {
-					if prog.As != obj.AVARKILL {
-						bvset(avarinit, pos)
-					}
-					if prog.As == obj.AVARDEF || prog.As == obj.AVARKILL {
-						bvset(varkill, pos)
-					}
-				} else {
-					// RightRead is a read, obviously.
-					// RightAddr by itself is also implicitly a read.
-					//
-					// RightAddr|RightWrite means that the address is being taken
-					// but only so that the instruction can write to the value.
-					// It is not a read. It is equivalent to RightWrite except that
-					// having the RightAddr bit set keeps the registerizer from
-					// trying to substitute a register for the memory location.
-					if (prog.Info.Flags&RightRead != 0) || prog.Info.Flags&(RightAddr|RightWrite) == RightAddr {
-						bvset(uevar, pos)
-					}
-					if prog.Info.Flags&RightWrite != 0 {
-						if to.Node != nil && (!Isfat(((to.Node).(*Node)).Type) || prog.As == obj.AVARDEF) {
-							bvset(varkill, pos)
-						}
-					}
-				}
-			}
-		}
-	}
-}
-
-// Constructs a new liveness structure used to hold the global state of the
-// liveness computation.  The cfg argument is an array of BasicBlock*s and the
-// vars argument is an array of Node*s.
-func newliveness(fn *Node, ptxt *obj.Prog, cfg []*BasicBlock, vars []*Node) *Liveness {
-	result := new(Liveness)
-	result.fn = fn
-	result.ptxt = ptxt
-	result.cfg = cfg
-	result.vars = vars
-
-	nblocks := int32(len(cfg))
-	nvars := int32(len(vars))
-	bulk := bvbulkalloc(nvars, nblocks*7)
-	for _, bb := range cfg {
-		bb.uevar = bulk.next()
-		bb.varkill = bulk.next()
-		bb.livein = bulk.next()
-		bb.liveout = bulk.next()
-		bb.avarinit = bulk.next()
-		bb.avarinitany = bulk.next()
-		bb.avarinitall = bulk.next()
-	}
-
-	result.livepointers = make([]Bvec, 0, 0)
-	result.argslivepointers = make([]Bvec, 0, 0)
-	return result
-}
-
-// Frees the liveness structure and all of its leaf data structures.
-func freeliveness(lv *Liveness) {
-	if lv == nil {
-		Fatal("freeliveness: cannot free nil")
-	}
-}
-
-func printeffects(p *obj.Prog, uevar Bvec, varkill Bvec, avarinit Bvec) {
-	fmt.Printf("effects of %v", p)
-	fmt.Printf("\nuevar: ")
-	bvprint(uevar)
-	fmt.Printf("\nvarkill: ")
-	bvprint(varkill)
-	fmt.Printf("\navarinit: ")
-	bvprint(avarinit)
-	fmt.Printf("\n")
-}
-
-// Pretty print a variable node.  Uses Pascal like conventions for pointers and
-// addresses to avoid confusing the C like conventions used in the node variable
-// names.
-func printnode(node *Node) {
-	p := ""
-	if haspointers(node.Type) {
-		p = "^"
-	}
-	a := ""
-	if node.Addrtaken {
-		a = "@"
-	}
-	fmt.Printf(" %v%s%s", node, p, a)
-}
-
-// Pretty print a list of variables.  The vars argument is an array of Node*s.
-func printvars(name string, bv Bvec, vars []*Node) {
-	fmt.Printf("%s:", name)
-	for i, node := range vars {
-		if bvget(bv, int32(i)) != 0 {
-			printnode(node)
-		}
-	}
-	fmt.Printf("\n")
-}
-
-// Prints a basic block annotated with the information computed by liveness
-// analysis.
-func livenessprintblock(lv *Liveness, bb *BasicBlock) {
-	fmt.Printf("basic block %d\n", bb.rpo)
-
-	fmt.Printf("\tpred:")
-	for _, pred := range bb.pred {
-		fmt.Printf(" %d", pred.rpo)
-	}
-	fmt.Printf("\n")
-
-	fmt.Printf("\tsucc:")
-	for _, succ := range bb.succ {
-		fmt.Printf(" %d", succ.rpo)
-	}
-	fmt.Printf("\n")
-
-	printvars("\tuevar", bb.uevar, []*Node(lv.vars))
-	printvars("\tvarkill", bb.varkill, []*Node(lv.vars))
-	printvars("\tlivein", bb.livein, []*Node(lv.vars))
-	printvars("\tliveout", bb.liveout, []*Node(lv.vars))
-	printvars("\tavarinit", bb.avarinit, []*Node(lv.vars))
-	printvars("\tavarinitany", bb.avarinitany, []*Node(lv.vars))
-	printvars("\tavarinitall", bb.avarinitall, []*Node(lv.vars))
-
-	fmt.Printf("\tprog:\n")
-	for prog := bb.first; ; prog = prog.Link {
-		fmt.Printf("\t\t%v", prog)
-		if prog.As == obj.APCDATA && prog.From.Offset == obj.PCDATA_StackMapIndex {
-			pos := int32(prog.To.Offset)
-			live := lv.livepointers[pos]
-			fmt.Printf(" ")
-			bvprint(live)
-		}
-
-		fmt.Printf("\n")
-		if prog == bb.last {
-			break
-		}
-	}
-}
-
-// Prints a control flow graph annotated with any information computed by
-// liveness analysis.
-func livenessprintcfg(lv *Liveness) {
-	for _, bb := range lv.cfg {
-		livenessprintblock(lv, bb)
-	}
-}
-
-func checkauto(fn *Node, p *obj.Prog, n *Node) {
-	for l := fn.Func.Dcl; l != nil; l = l.Next {
-		if l.N.Op == ONAME && l.N.Class == PAUTO && l.N == n {
-			return
-		}
-	}
-
-	if n == nil {
-		fmt.Printf("%v: checkauto %v: nil node in %v\n", p.Line(), Curfn, p)
-		return
-	}
-
-	fmt.Printf("checkauto %v: %v (%p; class=%d) not found in %v\n", Curfn, n, n, n.Class, p)
-	for l := fn.Func.Dcl; l != nil; l = l.Next {
-		fmt.Printf("\t%v (%p; class=%d)\n", l.N, l.N, l.N.Class)
-	}
-	Yyerror("checkauto: invariant lost")
-}
-
-func checkparam(fn *Node, p *obj.Prog, n *Node) {
-	if isfunny(n) {
-		return
-	}
-	var a *Node
-	var class uint8
-	for l := fn.Func.Dcl; l != nil; l = l.Next {
-		a = l.N
-		class = a.Class &^ PHEAP
-		if a.Op == ONAME && (class == PPARAM || class == PPARAMOUT) && a == n {
-			return
-		}
-	}
-
-	fmt.Printf("checkparam %v: %v (%p; class=%d) not found in %v\n", Curfn, n, n, n.Class, p)
-	for l := fn.Func.Dcl; l != nil; l = l.Next {
-		fmt.Printf("\t%v (%p; class=%d)\n", l.N, l.N, l.N.Class)
-	}
-	Yyerror("checkparam: invariant lost")
-}
-
-func checkprog(fn *Node, p *obj.Prog) {
-	if p.From.Name == obj.NAME_AUTO {
-		checkauto(fn, p, p.From.Node.(*Node))
-	}
-	if p.From.Name == obj.NAME_PARAM {
-		checkparam(fn, p, p.From.Node.(*Node))
-	}
-	if p.To.Name == obj.NAME_AUTO {
-		checkauto(fn, p, p.To.Node.(*Node))
-	}
-	if p.To.Name == obj.NAME_PARAM {
-		checkparam(fn, p, p.To.Node.(*Node))
-	}
-}
-
-// Check instruction invariants.  We assume that the nodes corresponding to the
-// sources and destinations of memory operations will be declared in the
-// function.  This is not strictly true, as is the case for the so-called funny
-// nodes and there are special cases to skip over that stuff.  The analysis will
-// fail if this invariant blindly changes.
-func checkptxt(fn *Node, firstp *obj.Prog) {
-	if debuglive == 0 {
-		return
-	}
-
-	for p := firstp; p != nil; p = p.Link {
-		if false {
-			fmt.Printf("analyzing '%v'\n", p)
-		}
-		if p.As != obj.ADATA && p.As != obj.AGLOBL && p.As != obj.ATYPE {
-			checkprog(fn, p)
-		}
-	}
-}
-
-// NOTE: The bitmap for a specific type t should be cached in t after the first run
-// and then simply copied into bv at the correct offset on future calls with
-// the same type t. On https://rsc.googlecode.com/hg/testdata/slow.go, onebitwalktype1
-// accounts for 40% of the 6g execution time.
-func onebitwalktype1(t *Type, xoffset *int64, bv Bvec) {
-	if t.Align > 0 && *xoffset&int64(t.Align-1) != 0 {
-		Fatal("onebitwalktype1: invalid initial alignment, %v", t)
-	}
-
-	switch t.Etype {
-	case TINT8,
-		TUINT8,
-		TINT16,
-		TUINT16,
-		TINT32,
-		TUINT32,
-		TINT64,
-		TUINT64,
-		TINT,
-		TUINT,
-		TUINTPTR,
-		TBOOL,
-		TFLOAT32,
-		TFLOAT64,
-		TCOMPLEX64,
-		TCOMPLEX128:
-		*xoffset += t.Width
-
-	case TPTR32,
-		TPTR64,
-		TUNSAFEPTR,
-		TFUNC,
-		TCHAN,
-		TMAP:
-		if *xoffset&int64(Widthptr-1) != 0 {
-			Fatal("onebitwalktype1: invalid alignment, %v", t)
-		}
-		bvset(bv, int32(*xoffset/int64(Widthptr))) // pointer
-		*xoffset += t.Width
-
-	case TSTRING:
-		// struct { byte *str; intgo len; }
-		if *xoffset&int64(Widthptr-1) != 0 {
-			Fatal("onebitwalktype1: invalid alignment, %v", t)
-		}
-		bvset(bv, int32(*xoffset/int64(Widthptr))) //pointer in first slot
-		*xoffset += t.Width
-
-	case TINTER:
-		// struct { Itab *tab;	void *data; }
-		// or, when isnilinter(t)==true:
-		// struct { Type *type; void *data; }
-		if *xoffset&int64(Widthptr-1) != 0 {
-			Fatal("onebitwalktype1: invalid alignment, %v", t)
-		}
-		bvset(bv, int32(*xoffset/int64(Widthptr)))   // pointer in first slot
-		bvset(bv, int32(*xoffset/int64(Widthptr)+1)) // pointer in second slot
-		*xoffset += t.Width
-
-	case TARRAY:
-		// The value of t->bound is -1 for slices types and >=0 for
-		// for fixed array types.  All other values are invalid.
-		if t.Bound < -1 {
-			Fatal("onebitwalktype1: invalid bound, %v", t)
-		}
-		if Isslice(t) {
-			// struct { byte *array; uintgo len; uintgo cap; }
-			if *xoffset&int64(Widthptr-1) != 0 {
-				Fatal("onebitwalktype1: invalid TARRAY alignment, %v", t)
-			}
-			bvset(bv, int32(*xoffset/int64(Widthptr))) // pointer in first slot (BitsPointer)
-			*xoffset += t.Width
-		} else {
-			for i := int64(0); i < t.Bound; i++ {
-				onebitwalktype1(t.Type, xoffset, bv)
-			}
-		}
-
-	case TSTRUCT:
-		o := int64(0)
-		var fieldoffset int64
-		for t1 := t.Type; t1 != nil; t1 = t1.Down {
-			fieldoffset = t1.Width
-			*xoffset += fieldoffset - o
-			onebitwalktype1(t1.Type, xoffset, bv)
-			o = fieldoffset + t1.Type.Width
-		}
-
-		*xoffset += t.Width - o
-
-	default:
-		Fatal("onebitwalktype1: unexpected type, %v", t)
-	}
-}
-
-// Returns the number of words of local variables.
-func localswords() int32 {
-	return int32(stkptrsize / int64(Widthptr))
-}
-
-// Returns the number of words of in and out arguments.
-func argswords() int32 {
-	return int32(Curfn.Type.Argwid / int64(Widthptr))
-}
-
-// Generates live pointer value maps for arguments and local variables.  The
-// this argument and the in arguments are always assumed live.  The vars
-// argument is an array of Node*s.
-func onebitlivepointermap(lv *Liveness, liveout Bvec, vars []*Node, args Bvec, locals Bvec) {
-	var node *Node
-	var xoffset int64
-
-	for i := int32(0); ; i++ {
-		i = int32(bvnext(liveout, i))
-		if i < 0 {
-			break
-		}
-		node = vars[i]
-		switch node.Class {
-		case PAUTO:
-			xoffset = node.Xoffset + stkptrsize
-			onebitwalktype1(node.Type, &xoffset, locals)
-
-		case PPARAM, PPARAMOUT:
-			xoffset = node.Xoffset
-			onebitwalktype1(node.Type, &xoffset, args)
-		}
-	}
-
-	// The node list only contains declared names.
-	// If the receiver or arguments are unnamed, they will be omitted
-	// from the list above. Preserve those values - even though they are unused -
-	// in order to keep their addresses live for use in stack traces.
-	thisargtype := getthisx(lv.fn.Type)
-
-	if thisargtype != nil {
-		xoffset = 0
-		onebitwalktype1(thisargtype, &xoffset, args)
-	}
-
-	inargtype := getinargx(lv.fn.Type)
-	if inargtype != nil {
-		xoffset = 0
-		onebitwalktype1(inargtype, &xoffset, args)
-	}
-}
-
-// Construct a disembodied instruction.
-func unlinkedprog(as int) *obj.Prog {
-	p := Ctxt.NewProg()
-	Clearp(p)
-	p.As = int16(as)
-	return p
-}
-
-// Construct a new PCDATA instruction associated with and for the purposes of
-// covering an existing instruction.
-func newpcdataprog(prog *obj.Prog, index int32) *obj.Prog {
-	var from Node
-	var to Node
-
-	Nodconst(&from, Types[TINT32], obj.PCDATA_StackMapIndex)
-	Nodconst(&to, Types[TINT32], int64(index))
-	pcdata := unlinkedprog(obj.APCDATA)
-	pcdata.Lineno = prog.Lineno
-	Naddr(&pcdata.From, &from)
-	Naddr(&pcdata.To, &to)
-	return pcdata
-}
-
-// Returns true for instructions that are safe points that must be annotated
-// with liveness information.
-func issafepoint(prog *obj.Prog) bool {
-	return prog.As == obj.ATEXT || prog.As == obj.ACALL
-}
-
-// Initializes the sets for solving the live variables.  Visits all the
-// instructions in each basic block to summarizes the information at each basic
-// block
-func livenessprologue(lv *Liveness) {
-	nvars := int32(len(lv.vars))
-	uevar := bvalloc(nvars)
-	varkill := bvalloc(nvars)
-	avarinit := bvalloc(nvars)
-	for _, bb := range lv.cfg {
-		// Walk the block instructions backward and update the block
-		// effects with the each prog effects.
-		for p := bb.last; p != nil; p = p.Opt.(*obj.Prog) {
-			progeffects(p, []*Node(lv.vars), uevar, varkill, avarinit)
-			if debuglive >= 3 {
-				printeffects(p, uevar, varkill, avarinit)
-			}
-			bvor(bb.varkill, bb.varkill, varkill)
-			bvandnot(bb.uevar, bb.uevar, varkill)
-			bvor(bb.uevar, bb.uevar, uevar)
-		}
-
-		// Walk the block instructions forward to update avarinit bits.
-		// avarinit describes the effect at the end of the block, not the beginning.
-		bvresetall(varkill)
-
-		for p := bb.first; ; p = p.Link {
-			progeffects(p, []*Node(lv.vars), uevar, varkill, avarinit)
-			if debuglive >= 3 {
-				printeffects(p, uevar, varkill, avarinit)
-			}
-			bvandnot(bb.avarinit, bb.avarinit, varkill)
-			bvor(bb.avarinit, bb.avarinit, avarinit)
-			if p == bb.last {
-				break
-			}
-		}
-	}
-}
-
-// Solve the liveness dataflow equations.
-func livenesssolve(lv *Liveness) {
-	// These temporary bitvectors exist to avoid successive allocations and
-	// frees within the loop.
-	newlivein := bvalloc(int32(len(lv.vars)))
-
-	newliveout := bvalloc(int32(len(lv.vars)))
-	any := bvalloc(int32(len(lv.vars)))
-	all := bvalloc(int32(len(lv.vars)))
-
-	// Push avarinitall, avarinitany forward.
-	// avarinitall says the addressed var is initialized along all paths reaching the block exit.
-	// avarinitany says the addressed var is initialized along some path reaching the block exit.
-	for i, bb := range lv.cfg {
-		if i == 0 {
-			bvcopy(bb.avarinitall, bb.avarinit)
-		} else {
-			bvresetall(bb.avarinitall)
-			bvnot(bb.avarinitall)
-		}
-		bvcopy(bb.avarinitany, bb.avarinit)
-	}
-
-	change := int32(1)
-	for change != 0 {
-		change = 0
-		for _, bb := range lv.cfg {
-			bvresetall(any)
-			bvresetall(all)
-			for j, pred := range bb.pred {
-				if j == 0 {
-					bvcopy(any, pred.avarinitany)
-					bvcopy(all, pred.avarinitall)
-				} else {
-					bvor(any, any, pred.avarinitany)
-					bvand(all, all, pred.avarinitall)
-				}
-			}
-
-			bvandnot(any, any, bb.varkill)
-			bvandnot(all, all, bb.varkill)
-			bvor(any, any, bb.avarinit)
-			bvor(all, all, bb.avarinit)
-			if bvcmp(any, bb.avarinitany) != 0 {
-				change = 1
-				bvcopy(bb.avarinitany, any)
-			}
-
-			if bvcmp(all, bb.avarinitall) != 0 {
-				change = 1
-				bvcopy(bb.avarinitall, all)
-			}
-		}
-	}
-
-	// Iterate through the blocks in reverse round-robin fashion.  A work
-	// queue might be slightly faster.  As is, the number of iterations is
-	// so low that it hardly seems to be worth the complexity.
-	change = 1
-
-	for change != 0 {
-		change = 0
-
-		// Walk blocks in the general direction of propagation.  This
-		// improves convergence.
-		for i := len(lv.cfg) - 1; i >= 0; i-- {
-			bb := lv.cfg[i]
-
-			// A variable is live on output from this block
-			// if it is live on input to some successor.
-			//
-			// out[b] = \bigcup_{s \in succ[b]} in[s]
-			bvresetall(newliveout)
-			for _, succ := range bb.succ {
-				bvor(newliveout, newliveout, succ.livein)
-			}
-
-			if bvcmp(bb.liveout, newliveout) != 0 {
-				change = 1
-				bvcopy(bb.liveout, newliveout)
-			}
-
-			// A variable is live on input to this block
-			// if it is live on output from this block and
-			// not set by the code in this block.
-			//
-			// in[b] = uevar[b] \cup (out[b] \setminus varkill[b])
-			bvandnot(newlivein, bb.liveout, bb.varkill)
-
-			bvor(bb.livein, newlivein, bb.uevar)
-		}
-	}
-}
-
-// This function is slow but it is only used for generating debug prints.
-// Check whether n is marked live in args/locals.
-func islive(n *Node, args Bvec, locals Bvec) bool {
-	switch n.Class {
-	case PPARAM, PPARAMOUT:
-		for i := 0; int64(i) < n.Type.Width/int64(Widthptr); i++ {
-			if bvget(args, int32(n.Xoffset/int64(Widthptr)+int64(i))) != 0 {
-				return true
-			}
-		}
-
-	case PAUTO:
-		for i := 0; int64(i) < n.Type.Width/int64(Widthptr); i++ {
-			if bvget(locals, int32((n.Xoffset+stkptrsize)/int64(Widthptr)+int64(i))) != 0 {
-				return true
-			}
-		}
-	}
-
-	return false
-}
-
-// Visits all instructions in a basic block and computes a bit vector of live
-// variables at each safe point locations.
-func livenessepilogue(lv *Liveness) {
-	var pred *BasicBlock
-	var args Bvec
-	var locals Bvec
-	var n *Node
-	var p *obj.Prog
-	var j int32
-	var pos int32
-	var xoffset int64
-
-	nvars := int32(len(lv.vars))
-	livein := bvalloc(nvars)
-	liveout := bvalloc(nvars)
-	uevar := bvalloc(nvars)
-	varkill := bvalloc(nvars)
-	avarinit := bvalloc(nvars)
-	any := bvalloc(nvars)
-	all := bvalloc(nvars)
-	ambig := bvalloc(localswords())
-	nmsg := int32(0)
-	startmsg := int32(0)
-
-	for _, bb := range lv.cfg {
-		// Compute avarinitany and avarinitall for entry to block.
-		// This duplicates information known during livenesssolve
-		// but avoids storing two more vectors for each block.
-		bvresetall(any)
-
-		bvresetall(all)
-		for j = 0; j < int32(len(bb.pred)); j++ {
-			pred = bb.pred[j]
-			if j == 0 {
-				bvcopy(any, pred.avarinitany)
-				bvcopy(all, pred.avarinitall)
-			} else {
-				bvor(any, any, pred.avarinitany)
-				bvand(all, all, pred.avarinitall)
-			}
-		}
-
-		// Walk forward through the basic block instructions and
-		// allocate liveness maps for those instructions that need them.
-		// Seed the maps with information about the addrtaken variables.
-		for p = bb.first; ; p = p.Link {
-			progeffects(p, []*Node(lv.vars), uevar, varkill, avarinit)
-			bvandnot(any, any, varkill)
-			bvandnot(all, all, varkill)
-			bvor(any, any, avarinit)
-			bvor(all, all, avarinit)
-
-			if issafepoint(p) {
-				// Annotate ambiguously live variables so that they can
-				// be zeroed at function entry.
-				// livein and liveout are dead here and used as temporaries.
-				bvresetall(livein)
-
-				bvandnot(liveout, any, all)
-				if !bvisempty(liveout) {
-					for pos = 0; pos < liveout.n; pos++ {
-						if bvget(liveout, pos) == 0 {
-							continue
-						}
-						bvset(all, pos) // silence future warnings in this block
-						n = lv.vars[pos]
-						if !n.Name.Needzero {
-							n.Name.Needzero = true
-							if debuglive >= 1 {
-								Warnl(int(p.Lineno), "%v: %v is ambiguously live", Curfn.Func.Nname, Nconv(n, obj.FmtLong))
-							}
-
-							// Record in 'ambiguous' bitmap.
-							xoffset = n.Xoffset + stkptrsize
-
-							onebitwalktype1(n.Type, &xoffset, ambig)
-						}
-					}
-				}
-
-				// Allocate a bit vector for each class and facet of
-				// value we are tracking.
-
-				// Live stuff first.
-				args = bvalloc(argswords())
-
-				lv.argslivepointers = append(lv.argslivepointers, args)
-				locals = bvalloc(localswords())
-				lv.livepointers = append(lv.livepointers, locals)
-
-				if debuglive >= 3 {
-					fmt.Printf("%v\n", p)
-					printvars("avarinitany", any, lv.vars)
-				}
-
-				// Record any values with an "address taken" reaching
-				// this code position as live. Must do now instead of below
-				// because the any/all calculation requires walking forward
-				// over the block (as this loop does), while the liveout
-				// requires walking backward (as the next loop does).
-				onebitlivepointermap(lv, any, lv.vars, args, locals)
-			}
-
-			if p == bb.last {
-				break
-			}
-		}
-
-		bb.lastbitmapindex = len(lv.livepointers) - 1
-	}
-
-	var fmt_ string
-	var next *obj.Prog
-	var numlive int32
-	var msg []string
-	for _, bb := range lv.cfg {
-		if debuglive >= 1 && Curfn.Func.Nname.Sym.Name != "init" && Curfn.Func.Nname.Sym.Name[0] != '.' {
-			nmsg = int32(len(lv.livepointers))
-			startmsg = nmsg
-			msg = make([]string, nmsg)
-			for j = 0; j < nmsg; j++ {
-				msg[j] = ""
-			}
-		}
-
-		// walk backward, emit pcdata and populate the maps
-		pos = int32(bb.lastbitmapindex)
-
-		if pos < 0 {
-			// the first block we encounter should have the ATEXT so
-			// at no point should pos ever be less than zero.
-			Fatal("livenessepilogue")
-		}
-
-		bvcopy(livein, bb.liveout)
-		for p = bb.last; p != nil; p = next {
-			next = p.Opt.(*obj.Prog) // splicebefore modifies p->opt
-
-			// Propagate liveness information
-			progeffects(p, lv.vars, uevar, varkill, avarinit)
-
-			bvcopy(liveout, livein)
-			bvandnot(livein, liveout, varkill)
-			bvor(livein, livein, uevar)
-			if debuglive >= 3 && issafepoint(p) {
-				fmt.Printf("%v\n", p)
-				printvars("uevar", uevar, lv.vars)
-				printvars("varkill", varkill, lv.vars)
-				printvars("livein", livein, lv.vars)
-				printvars("liveout", liveout, lv.vars)
-			}
-
-			if issafepoint(p) {
-				// Found an interesting instruction, record the
-				// corresponding liveness information.
-
-				// Useful sanity check: on entry to the function,
-				// the only things that can possibly be live are the
-				// input parameters.
-				if p.As == obj.ATEXT {
-					for j = 0; j < liveout.n; j++ {
-						if bvget(liveout, j) == 0 {
-							continue
-						}
-						n = lv.vars[j]
-						if n.Class != PPARAM {
-							yyerrorl(int(p.Lineno), "internal error: %v %v recorded as live on entry", Curfn.Func.Nname, Nconv(n, obj.FmtLong))
-						}
-					}
-				}
-
-				// Record live pointers.
-				args = lv.argslivepointers[pos]
-
-				locals = lv.livepointers[pos]
-				onebitlivepointermap(lv, liveout, lv.vars, args, locals)
-
-				// Ambiguously live variables are zeroed immediately after
-				// function entry. Mark them live for all the non-entry bitmaps
-				// so that GODEBUG=gcdead=1 mode does not poison them.
-				if p.As == obj.ACALL {
-					bvor(locals, locals, ambig)
-				}
-
-				// Show live pointer bitmaps.
-				// We're interpreting the args and locals bitmap instead of liveout so that we
-				// include the bits added by the avarinit logic in the
-				// previous loop.
-				if msg != nil {
-					fmt_ = ""
-					fmt_ += fmt.Sprintf("%v: live at ", p.Line())
-					if p.As == obj.ACALL && p.To.Node != nil {
-						fmt_ += fmt.Sprintf("call to %s:", ((p.To.Node).(*Node)).Sym.Name)
-					} else if p.As == obj.ACALL {
-						fmt_ += "indirect call:"
-					} else {
-						fmt_ += fmt.Sprintf("entry to %s:", ((p.From.Node).(*Node)).Sym.Name)
-					}
-					numlive = 0
-					for j = 0; j < int32(len(lv.vars)); j++ {
-						n = lv.vars[j]
-						if islive(n, args, locals) {
-							fmt_ += fmt.Sprintf(" %v", n)
-							numlive++
-						}
-					}
-
-					fmt_ += "\n"
-					if numlive == 0 { // squelch message
-
-					} else {
-						startmsg--
-						msg[startmsg] = fmt_
-					}
-				}
-
-				// Only CALL instructions need a PCDATA annotation.
-				// The TEXT instruction annotation is implicit.
-				if p.As == obj.ACALL {
-					if isdeferreturn(p) {
-						// runtime.deferreturn modifies its return address to return
-						// back to the CALL, not to the subsequent instruction.
-						// Because the return comes back one instruction early,
-						// the PCDATA must begin one instruction early too.
-						// The instruction before a call to deferreturn is always a
-						// no-op, to keep PC-specific data unambiguous.
-						splicebefore(lv, bb, newpcdataprog(p.Opt.(*obj.Prog), pos), p.Opt.(*obj.Prog))
-					} else {
-						splicebefore(lv, bb, newpcdataprog(p, pos), p)
-					}
-				}
-
-				pos--
-			}
-		}
-
-		if msg != nil {
-			for j = startmsg; j < nmsg; j++ {
-				if msg[j] != "" {
-					fmt.Printf("%s", msg[j])
-				}
-			}
-
-			msg = nil
-			nmsg = 0
-			startmsg = 0
-		}
-	}
-
-	Flusherrors()
-}
-
-// FNV-1 hash function constants.
-const (
-	H0 = 2166136261
-	Hp = 16777619
-)
-
-func hashbitmap(h uint32, bv Bvec) uint32 {
-	var w uint32
-
-	n := int((bv.n + 31) / 32)
-	for i := 0; i < n; i++ {
-		w = bv.b[i]
-		h = (h * Hp) ^ (w & 0xff)
-		h = (h * Hp) ^ ((w >> 8) & 0xff)
-		h = (h * Hp) ^ ((w >> 16) & 0xff)
-		h = (h * Hp) ^ ((w >> 24) & 0xff)
-	}
-
-	return h
-}
-
-// Compact liveness information by coalescing identical per-call-site bitmaps.
-// The merging only happens for a single function, not across the entire binary.
-//
-// There are actually two lists of bitmaps, one list for the local variables and one
-// list for the function arguments. Both lists are indexed by the same PCDATA
-// index, so the corresponding pairs must be considered together when
-// merging duplicates. The argument bitmaps change much less often during
-// function execution than the local variable bitmaps, so it is possible that
-// we could introduce a separate PCDATA index for arguments vs locals and
-// then compact the set of argument bitmaps separately from the set of
-// local variable bitmaps. As of 2014-04-02, doing this to the godoc binary
-// is actually a net loss: we save about 50k of argument bitmaps but the new
-// PCDATA tables cost about 100k. So for now we keep using a single index for
-// both bitmap lists.
-func livenesscompact(lv *Liveness) {
-	// Linear probing hash table of bitmaps seen so far.
-	// The hash table has 4n entries to keep the linear
-	// scan short. An entry of -1 indicates an empty slot.
-	n := len(lv.livepointers)
-
-	tablesize := 4 * n
-	table := make([]int, tablesize)
-	for i := range table {
-		table[i] = -1
-	}
-
-	// remap[i] = the new index of the old bit vector #i.
-	remap := make([]int, n)
-
-	for i := range remap {
-		remap[i] = -1
-	}
-	uniq := 0 // unique tables found so far
-
-	// Consider bit vectors in turn.
-	// If new, assign next number using uniq,
-	// record in remap, record in lv->livepointers and lv->argslivepointers
-	// under the new index, and add entry to hash table.
-	// If already seen, record earlier index in remap and free bitmaps.
-	var jarg Bvec
-	var j int
-	var h uint32
-	var arg Bvec
-	var jlocal Bvec
-	var local Bvec
-	for i := 0; i < n; i++ {
-		local = lv.livepointers[i]
-		arg = lv.argslivepointers[i]
-		h = hashbitmap(hashbitmap(H0, local), arg) % uint32(tablesize)
-
-		for {
-			j = table[h]
-			if j < 0 {
-				break
-			}
-			jlocal = lv.livepointers[j]
-			jarg = lv.argslivepointers[j]
-			if bvcmp(local, jlocal) == 0 && bvcmp(arg, jarg) == 0 {
-				remap[i] = j
-				goto Next
-			}
-
-			h++
-			if h == uint32(tablesize) {
-				h = 0
-			}
-		}
-
-		table[h] = uniq
-		remap[i] = uniq
-		lv.livepointers[uniq] = local
-		lv.argslivepointers[uniq] = arg
-		uniq++
-	Next:
-	}
-
-	// We've already reordered lv->livepointers[0:uniq]
-	// and lv->argslivepointers[0:uniq] and freed the bitmaps
-	// we don't need anymore. Clear the pointers later in the
-	// array so that we can tell where the coalesced bitmaps stop
-	// and so that we don't double-free when cleaning up.
-	for j := uniq; j < n; j++ {
-		lv.livepointers[j] = Bvec{}
-		lv.argslivepointers[j] = Bvec{}
-	}
-
-	// Rewrite PCDATA instructions to use new numbering.
-	var i int
-	for p := lv.ptxt; p != nil; p = p.Link {
-		if p.As == obj.APCDATA && p.From.Offset == obj.PCDATA_StackMapIndex {
-			i = int(p.To.Offset)
-			if i >= 0 {
-				p.To.Offset = int64(remap[i])
-			}
-		}
-	}
-}
-
-func printbitset(printed int, name string, vars []*Node, bits Bvec) int {
-	started := 0
-	for i, n := range vars {
-		if bvget(bits, int32(i)) == 0 {
-			continue
-		}
-		if started == 0 {
-			if printed == 0 {
-				fmt.Printf("\t")
-			} else {
-				fmt.Printf(" ")
-			}
-			started = 1
-			printed = 1
-			fmt.Printf("%s=", name)
-		} else {
-			fmt.Printf(",")
-		}
-
-		fmt.Printf("%s", n.Sym.Name)
-	}
-
-	return printed
-}
-
-// Prints the computed liveness information and inputs, for debugging.
-// This format synthesizes the information used during the multiple passes
-// into a single presentation.
-func livenessprintdebug(lv *Liveness) {
-	var j int
-	var printed int
-	var p *obj.Prog
-	var args Bvec
-	var locals Bvec
-	var n *Node
-
-	fmt.Printf("liveness: %s\n", Curfn.Func.Nname.Sym.Name)
-
-	uevar := bvalloc(int32(len(lv.vars)))
-	varkill := bvalloc(int32(len(lv.vars)))
-	avarinit := bvalloc(int32(len(lv.vars)))
-
-	pcdata := 0
-	for i, bb := range lv.cfg {
-		if i > 0 {
-			fmt.Printf("\n")
-		}
-
-		// bb#0 pred=1,2 succ=3,4
-		fmt.Printf("bb#%d pred=", i)
-
-		for j = 0; j < len(bb.pred); j++ {
-			if j > 0 {
-				fmt.Printf(",")
-			}
-			fmt.Printf("%d", (bb.pred[j]).rpo)
-		}
-
-		fmt.Printf(" succ=")
-		for j = 0; j < len(bb.succ); j++ {
-			if j > 0 {
-				fmt.Printf(",")
-			}
-			fmt.Printf("%d", (bb.succ[j]).rpo)
-		}
-
-		fmt.Printf("\n")
-
-		// initial settings
-		printed = 0
-
-		printed = printbitset(printed, "uevar", lv.vars, bb.uevar)
-		printed = printbitset(printed, "livein", lv.vars, bb.livein)
-		if printed != 0 {
-			fmt.Printf("\n")
-		}
-
-		// program listing, with individual effects listed
-		for p = bb.first; ; p = p.Link {
-			fmt.Printf("%v\n", p)
-			if p.As == obj.APCDATA && p.From.Offset == obj.PCDATA_StackMapIndex {
-				pcdata = int(p.To.Offset)
-			}
-			progeffects(p, lv.vars, uevar, varkill, avarinit)
-			printed = 0
-			printed = printbitset(printed, "uevar", lv.vars, uevar)
-			printed = printbitset(printed, "varkill", lv.vars, varkill)
-			printed = printbitset(printed, "avarinit", lv.vars, avarinit)
-			if printed != 0 {
-				fmt.Printf("\n")
-			}
-			if issafepoint(p) {
-				args = lv.argslivepointers[pcdata]
-				locals = lv.livepointers[pcdata]
-				fmt.Printf("\tlive=")
-				printed = 0
-				for j = 0; j < len(lv.vars); j++ {
-					n = lv.vars[j]
-					if islive(n, args, locals) {
-						tmp9 := printed
-						printed++
-						if tmp9 != 0 {
-							fmt.Printf(",")
-						}
-						fmt.Printf("%v", n)
-					}
-				}
-
-				fmt.Printf("\n")
-			}
-
-			if p == bb.last {
-				break
-			}
-		}
-
-		// bb bitsets
-		fmt.Printf("end\n")
-
-		printed = printbitset(printed, "varkill", lv.vars, bb.varkill)
-		printed = printbitset(printed, "liveout", lv.vars, bb.liveout)
-		printed = printbitset(printed, "avarinit", lv.vars, bb.avarinit)
-		printed = printbitset(printed, "avarinitany", lv.vars, bb.avarinitany)
-		printed = printbitset(printed, "avarinitall", lv.vars, bb.avarinitall)
-		if printed != 0 {
-			fmt.Printf("\n")
-		}
-	}
-
-	fmt.Printf("\n")
-}
-
-// Dumps an array of bitmaps to a symbol as a sequence of uint32 values.  The
-// first word dumped is the total number of bitmaps.  The second word is the
-// length of the bitmaps.  All bitmaps are assumed to be of equal length.  The
-// words that are followed are the raw bitmap words.  The arr argument is an
-// array of Node*s.
-func onebitwritesymbol(arr []Bvec, sym *Sym) {
-	var i int
-	var j int
-	var word uint32
-
-	n := len(arr)
-	off := 0
-	off += 4 // number of bitmaps, to fill in later
-	bv := arr[0]
-	off = duint32(sym, off, uint32(bv.n)) // number of bits in each bitmap
-	for i = 0; i < n; i++ {
-		// bitmap words
-		bv = arr[i]
-
-		if bv.b == nil {
-			break
-		}
-		for j = 0; int32(j) < bv.n; j += 32 {
-			word = bv.b[j/32]
-
-			// Runtime reads the bitmaps as byte arrays. Oblige.
-			off = duint8(sym, off, uint8(word))
-
-			off = duint8(sym, off, uint8(word>>8))
-			off = duint8(sym, off, uint8(word>>16))
-			off = duint8(sym, off, uint8(word>>24))
-		}
-	}
-
-	duint32(sym, 0, uint32(i)) // number of bitmaps
-	ggloblsym(sym, int32(off), obj.RODATA)
-}
-
-func printprog(p *obj.Prog) {
-	for p != nil {
-		fmt.Printf("%v\n", p)
-		p = p.Link
-	}
-}
-
-// Entry pointer for liveness analysis.  Constructs a complete CFG, solves for
-// the liveness of pointer variables in the function, and emits a runtime data
-// structure read by the garbage collector.
-func liveness(fn *Node, firstp *obj.Prog, argssym *Sym, livesym *Sym) {
-	// Change name to dump debugging information only for a specific function.
-	debugdelta := 0
-
-	if Curfn.Func.Nname.Sym.Name == "!" {
-		debugdelta = 2
-	}
-
-	debuglive += debugdelta
-	if debuglive >= 3 {
-		fmt.Printf("liveness: %s\n", Curfn.Func.Nname.Sym.Name)
-		printprog(firstp)
-	}
-
-	checkptxt(fn, firstp)
-
-	// Construct the global liveness state.
-	cfg := newcfg(firstp)
-
-	if debuglive >= 3 {
-		printcfg([]*BasicBlock(cfg))
-	}
-	vars := getvariables(fn)
-	lv := newliveness(fn, firstp, cfg, vars)
-
-	// Run the dataflow framework.
-	livenessprologue(lv)
-
-	if debuglive >= 3 {
-		livenessprintcfg(lv)
-	}
-	livenesssolve(lv)
-	if debuglive >= 3 {
-		livenessprintcfg(lv)
-	}
-	livenessepilogue(lv)
-	if debuglive >= 3 {
-		livenessprintcfg(lv)
-	}
-	livenesscompact(lv)
-
-	if debuglive >= 2 {
-		livenessprintdebug(lv)
-	}
-
-	// Emit the live pointer map data structures
-	onebitwritesymbol(lv.livepointers, livesym)
-
-	onebitwritesymbol(lv.argslivepointers, argssym)
-
-	// Free everything.
-	for l := fn.Func.Dcl; l != nil; l = l.Next {
-		if l.N != nil {
-			l.N.SetOpt(nil)
-		}
-	}
-	freeliveness(lv)
-
-	freecfg([]*BasicBlock(cfg))
-
-	debuglive -= debugdelta
-}
diff --git a/src/cmd/compile/internal/gc/popt.go b/src/cmd/compile/internal/gc/popt.go
deleted file mode 100644
index 4fc562c..0000000
--- a/src/cmd/compile/internal/gc/popt.go
+++ /dev/null
@@ -1,1086 +0,0 @@
-// Derived from Inferno utils/6c/gc.h
-// http://code.google.com/p/inferno-os/source/browse/utils/6c/gc.h
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-// "Portable" optimizations.
-
-package gc
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-	"sort"
-	"strings"
-)
-
-type OptStats struct {
-	Ncvtreg int32
-	Nspill  int32
-	Nreload int32
-	Ndelmov int32
-	Nvar    int32
-	Naddr   int32
-}
-
-var Ostats OptStats
-
-var noreturn_symlist [10]*Sym
-
-// p is a call instruction. Does the call fail to return?
-func Noreturn(p *obj.Prog) bool {
-	if noreturn_symlist[0] == nil {
-		noreturn_symlist[0] = Pkglookup("panicindex", Runtimepkg)
-		noreturn_symlist[1] = Pkglookup("panicslice", Runtimepkg)
-		noreturn_symlist[2] = Pkglookup("throwinit", Runtimepkg)
-		noreturn_symlist[3] = Pkglookup("gopanic", Runtimepkg)
-		noreturn_symlist[4] = Pkglookup("panicwrap", Runtimepkg)
-		noreturn_symlist[5] = Pkglookup("throwreturn", Runtimepkg)
-		noreturn_symlist[6] = Pkglookup("selectgo", Runtimepkg)
-		noreturn_symlist[7] = Pkglookup("block", Runtimepkg)
-	}
-
-	if p.To.Node == nil {
-		return false
-	}
-	s := ((p.To.Node).(*Node)).Sym
-	if s == nil {
-		return false
-	}
-	for i := 0; noreturn_symlist[i] != nil; i++ {
-		if s == noreturn_symlist[i] {
-			return true
-		}
-	}
-	return false
-}
-
-// JMP chasing and removal.
-//
-// The code generator depends on being able to write out jump
-// instructions that it can jump to now but fill in later.
-// the linker will resolve them nicely, but they make the code
-// longer and more difficult to follow during debugging.
-// Remove them.
-
-/* what instruction does a JMP to p eventually land on? */
-func chasejmp(p *obj.Prog, jmploop *int) *obj.Prog {
-	n := 0
-	for p != nil && p.As == obj.AJMP && p.To.Type == obj.TYPE_BRANCH {
-		n++
-		if n > 10 {
-			*jmploop = 1
-			break
-		}
-
-		p = p.To.Val.(*obj.Prog)
-	}
-
-	return p
-}
-
-/*
- * reuse reg pointer for mark/sweep state.
- * leave reg==nil at end because alive==nil.
- */
-var alive interface{} = nil
-var dead interface{} = 1
-
-/* mark all code reachable from firstp as alive */
-func mark(firstp *obj.Prog) {
-	for p := firstp; p != nil; p = p.Link {
-		if p.Opt != dead {
-			break
-		}
-		p.Opt = alive
-		if p.As != obj.ACALL && p.To.Type == obj.TYPE_BRANCH && p.To.Val.(*obj.Prog) != nil {
-			mark(p.To.Val.(*obj.Prog))
-		}
-		if p.As == obj.AJMP || p.As == obj.ARET || p.As == obj.AUNDEF {
-			break
-		}
-	}
-}
-
-func fixjmp(firstp *obj.Prog) {
-	if Debug['R'] != 0 && Debug['v'] != 0 {
-		fmt.Printf("\nfixjmp\n")
-	}
-
-	// pass 1: resolve jump to jump, mark all code as dead.
-	jmploop := 0
-
-	for p := firstp; p != nil; p = p.Link {
-		if Debug['R'] != 0 && Debug['v'] != 0 {
-			fmt.Printf("%v\n", p)
-		}
-		if p.As != obj.ACALL && p.To.Type == obj.TYPE_BRANCH && p.To.Val.(*obj.Prog) != nil && p.To.Val.(*obj.Prog).As == obj.AJMP {
-			p.To.Val = chasejmp(p.To.Val.(*obj.Prog), &jmploop)
-			if Debug['R'] != 0 && Debug['v'] != 0 {
-				fmt.Printf("->%v\n", p)
-			}
-		}
-
-		p.Opt = dead
-	}
-
-	if Debug['R'] != 0 && Debug['v'] != 0 {
-		fmt.Printf("\n")
-	}
-
-	// pass 2: mark all reachable code alive
-	mark(firstp)
-
-	// pass 3: delete dead code (mostly JMPs).
-	var last *obj.Prog
-
-	for p := firstp; p != nil; p = p.Link {
-		if p.Opt == dead {
-			if p.Link == nil && p.As == obj.ARET && last != nil && last.As != obj.ARET {
-				// This is the final ARET, and the code so far doesn't have one.
-				// Let it stay. The register allocator assumes that all live code in
-				// the function can be traversed by starting at all the RET instructions
-				// and following predecessor links. If we remove the final RET,
-				// this assumption will not hold in the case of an infinite loop
-				// at the end of a function.
-				// Keep the RET but mark it dead for the liveness analysis.
-				p.Mode = 1
-			} else {
-				if Debug['R'] != 0 && Debug['v'] != 0 {
-					fmt.Printf("del %v\n", p)
-				}
-				continue
-			}
-		}
-
-		if last != nil {
-			last.Link = p
-		}
-		last = p
-	}
-
-	last.Link = nil
-
-	// pass 4: elide JMP to next instruction.
-	// only safe if there are no jumps to JMPs anymore.
-	if jmploop == 0 {
-		var last *obj.Prog
-		for p := firstp; p != nil; p = p.Link {
-			if p.As == obj.AJMP && p.To.Type == obj.TYPE_BRANCH && p.To.Val == p.Link {
-				if Debug['R'] != 0 && Debug['v'] != 0 {
-					fmt.Printf("del %v\n", p)
-				}
-				continue
-			}
-
-			if last != nil {
-				last.Link = p
-			}
-			last = p
-		}
-
-		last.Link = nil
-	}
-
-	if Debug['R'] != 0 && Debug['v'] != 0 {
-		fmt.Printf("\n")
-		for p := firstp; p != nil; p = p.Link {
-			fmt.Printf("%v\n", p)
-		}
-		fmt.Printf("\n")
-	}
-}
-
-// Control flow analysis. The Flow structures hold predecessor and successor
-// information as well as basic loop analysis.
-//
-//	graph = flowstart(firstp, 0);
-//	... use flow graph ...
-//	flowend(graph); // free graph
-//
-// Typical uses of the flow graph are to iterate over all the flow-relevant instructions:
-//
-//	for(f = graph->start; f != nil; f = f->link)
-//
-// or, given an instruction f, to iterate over all the predecessors, which is
-// f->p1 and this list:
-//
-//	for(f2 = f->p2; f2 != nil; f2 = f2->p2link)
-//
-// The size argument to flowstart specifies an amount of zeroed memory
-// to allocate in every f->data field, for use by the client.
-// If size == 0, f->data will be nil.
-
-var flowmark int
-
-// MaxFlowProg is the maximum size program (counted in instructions)
-// for which the flow code will build a graph. Functions larger than this limit
-// will not have flow graphs and consequently will not be optimized.
-const MaxFlowProg = 50000
-
-func Flowstart(firstp *obj.Prog, newData func() interface{}) *Graph {
-	// Count and mark instructions to annotate.
-	nf := 0
-
-	for p := firstp; p != nil; p = p.Link {
-		p.Opt = nil // should be already, but just in case
-		Thearch.Proginfo(p)
-		if p.Info.Flags&Skip != 0 {
-			continue
-		}
-		p.Opt = &flowmark
-		nf++
-	}
-
-	if nf == 0 {
-		return nil
-	}
-
-	if nf >= MaxFlowProg {
-		if Debug['v'] != 0 {
-			Warn("%v is too big (%d instructions)", Curfn.Func.Nname.Sym, nf)
-		}
-		return nil
-	}
-
-	// Allocate annotations and assign to instructions.
-	graph := new(Graph)
-	ff := make([]Flow, nf)
-	start := &ff[0]
-	id := 0
-	var last *Flow
-	for p := firstp; p != nil; p = p.Link {
-		if p.Opt == nil {
-			continue
-		}
-		f := &ff[0]
-		ff = ff[1:]
-		p.Opt = f
-		f.Prog = p
-		if last != nil {
-			last.Link = f
-		}
-		last = f
-		if newData != nil {
-			f.Data = newData()
-		}
-		f.Id = int32(id)
-		id++
-	}
-
-	// Fill in pred/succ information.
-	var f1 *Flow
-	var p *obj.Prog
-	for f := start; f != nil; f = f.Link {
-		p = f.Prog
-		if p.Info.Flags&Break == 0 {
-			f1 = f.Link
-			f.S1 = f1
-			f1.P1 = f
-		}
-
-		if p.To.Type == obj.TYPE_BRANCH {
-			if p.To.Val == nil {
-				Fatal("pnil %v", p)
-			}
-			f1 = p.To.Val.(*obj.Prog).Opt.(*Flow)
-			if f1 == nil {
-				Fatal("fnil %v / %v", p, p.To.Val.(*obj.Prog))
-			}
-			if f1 == f {
-				//fatal("self loop %v", p);
-				continue
-			}
-
-			f.S2 = f1
-			f.P2link = f1.P2
-			f1.P2 = f
-		}
-	}
-
-	graph.Start = start
-	graph.Num = nf
-	return graph
-}
-
-func Flowend(graph *Graph) {
-	for f := graph.Start; f != nil; f = f.Link {
-		f.Prog.Info.Flags = 0 // drop cached proginfo
-		f.Prog.Opt = nil
-	}
-}
-
-/*
- * find looping structure
- *
- * 1) find reverse postordering
- * 2) find approximate dominators,
- *	the actual dominators if the flow graph is reducible
- *	otherwise, dominators plus some other non-dominators.
- *	See Matthew S. Hecht and Jeffrey D. Ullman,
- *	"Analysis of a Simple Algorithm for Global Data Flow Problems",
- *	Conf.  Record of ACM Symp. on Principles of Prog. Langs, Boston, Massachusetts,
- *	Oct. 1-3, 1973, pp.  207-217.
- * 3) find all nodes with a predecessor dominated by the current node.
- *	such a node is a loop head.
- *	recursively, all preds with a greater rpo number are in the loop
- */
-func postorder(r *Flow, rpo2r []*Flow, n int32) int32 {
-	r.Rpo = 1
-	r1 := r.S1
-	if r1 != nil && r1.Rpo == 0 {
-		n = postorder(r1, rpo2r, n)
-	}
-	r1 = r.S2
-	if r1 != nil && r1.Rpo == 0 {
-		n = postorder(r1, rpo2r, n)
-	}
-	rpo2r[n] = r
-	n++
-	return n
-}
-
-func rpolca(idom []int32, rpo1 int32, rpo2 int32) int32 {
-	if rpo1 == -1 {
-		return rpo2
-	}
-	var t int32
-	for rpo1 != rpo2 {
-		if rpo1 > rpo2 {
-			t = rpo2
-			rpo2 = rpo1
-			rpo1 = t
-		}
-
-		for rpo1 < rpo2 {
-			t = idom[rpo2]
-			if t >= rpo2 {
-				Fatal("bad idom")
-			}
-			rpo2 = t
-		}
-	}
-
-	return rpo1
-}
-
-func doms(idom []int32, r int32, s int32) bool {
-	for s > r {
-		s = idom[s]
-	}
-	return s == r
-}
-
-func loophead(idom []int32, r *Flow) bool {
-	src := r.Rpo
-	if r.P1 != nil && doms(idom, src, r.P1.Rpo) {
-		return true
-	}
-	for r = r.P2; r != nil; r = r.P2link {
-		if doms(idom, src, r.Rpo) {
-			return true
-		}
-	}
-	return false
-}
-
-func loopmark(rpo2r **Flow, head int32, r *Flow) {
-	if r.Rpo < head || r.Active == head {
-		return
-	}
-	r.Active = head
-	r.Loop += LOOP
-	if r.P1 != nil {
-		loopmark(rpo2r, head, r.P1)
-	}
-	for r = r.P2; r != nil; r = r.P2link {
-		loopmark(rpo2r, head, r)
-	}
-}
-
-func flowrpo(g *Graph) {
-	g.Rpo = make([]*Flow, g.Num)
-	idom := make([]int32, g.Num)
-
-	for r1 := g.Start; r1 != nil; r1 = r1.Link {
-		r1.Active = 0
-	}
-
-	rpo2r := g.Rpo
-	d := postorder(g.Start, rpo2r, 0)
-	nr := int32(g.Num)
-	if d > nr {
-		Fatal("too many reg nodes %d %d", d, nr)
-	}
-	nr = d
-	var r1 *Flow
-	for i := int32(0); i < nr/2; i++ {
-		r1 = rpo2r[i]
-		rpo2r[i] = rpo2r[nr-1-i]
-		rpo2r[nr-1-i] = r1
-	}
-
-	for i := int32(0); i < nr; i++ {
-		rpo2r[i].Rpo = i
-	}
-
-	idom[0] = 0
-	var me int32
-	for i := int32(0); i < nr; i++ {
-		r1 = rpo2r[i]
-		me = r1.Rpo
-		d = -1
-
-		// rpo2r[r->rpo] == r protects against considering dead code,
-		// which has r->rpo == 0.
-		if r1.P1 != nil && rpo2r[r1.P1.Rpo] == r1.P1 && r1.P1.Rpo < me {
-			d = r1.P1.Rpo
-		}
-		for r1 = r1.P2; r1 != nil; r1 = r1.P2link {
-			if rpo2r[r1.Rpo] == r1 && r1.Rpo < me {
-				d = rpolca(idom, d, r1.Rpo)
-			}
-		}
-		idom[i] = d
-	}
-
-	for i := int32(0); i < nr; i++ {
-		r1 = rpo2r[i]
-		r1.Loop++
-		if r1.P2 != nil && loophead(idom, r1) {
-			loopmark(&rpo2r[0], i, r1)
-		}
-	}
-
-	for r1 := g.Start; r1 != nil; r1 = r1.Link {
-		r1.Active = 0
-	}
-}
-
-func Uniqp(r *Flow) *Flow {
-	r1 := r.P1
-	if r1 == nil {
-		r1 = r.P2
-		if r1 == nil || r1.P2link != nil {
-			return nil
-		}
-	} else if r.P2 != nil {
-		return nil
-	}
-	return r1
-}
-
-func Uniqs(r *Flow) *Flow {
-	r1 := r.S1
-	if r1 == nil {
-		r1 = r.S2
-		if r1 == nil {
-			return nil
-		}
-	} else if r.S2 != nil {
-		return nil
-	}
-	return r1
-}
-
-// The compilers assume they can generate temporary variables
-// as needed to preserve the right semantics or simplify code
-// generation and the back end will still generate good code.
-// This results in a large number of ephemeral temporary variables.
-// Merge temps with non-overlapping lifetimes and equal types using the
-// greedy algorithm in Poletto and Sarkar, "Linear Scan Register Allocation",
-// ACM TOPLAS 1999.
-
-type TempVar struct {
-	node    *Node
-	def     *Flow    // definition of temp var
-	use     *Flow    // use list, chained through Flow.data
-	merge   *TempVar // merge var with this one
-	start   int64    // smallest Prog.pc in live range
-	end     int64    // largest Prog.pc in live range
-	addr    uint8    // address taken - no accurate end
-	removed uint8    // removed from program
-}
-
-type startcmp []*TempVar
-
-func (x startcmp) Len() int {
-	return len(x)
-}
-
-func (x startcmp) Swap(i, j int) {
-	x[i], x[j] = x[j], x[i]
-}
-
-func (x startcmp) Less(i, j int) bool {
-	a := x[i]
-	b := x[j]
-
-	if a.start < b.start {
-		return true
-	}
-	if a.start > b.start {
-		return false
-	}
-
-	// Order what's left by id or symbol name,
-	// just so that sort is forced into a specific ordering,
-	// so that the result of the sort does not depend on
-	// the sort implementation.
-	if a.def != b.def {
-		return int(a.def.Id-b.def.Id) < 0
-	}
-	if a.node != b.node {
-		return stringsCompare(a.node.Sym.Name, b.node.Sym.Name) < 0
-	}
-	return false
-}
-
-// Is n available for merging?
-func canmerge(n *Node) bool {
-	return n.Class == PAUTO && strings.HasPrefix(n.Sym.Name, "autotmp")
-}
-
-func mergetemp(firstp *obj.Prog) {
-	const (
-		debugmerge = 0
-	)
-
-	g := Flowstart(firstp, nil)
-	if g == nil {
-		return
-	}
-
-	// Build list of all mergeable variables.
-	nvar := 0
-	for l := Curfn.Func.Dcl; l != nil; l = l.Next {
-		if canmerge(l.N) {
-			nvar++
-		}
-	}
-
-	var_ := make([]TempVar, nvar)
-	nvar = 0
-	var n *Node
-	var v *TempVar
-	for l := Curfn.Func.Dcl; l != nil; l = l.Next {
-		n = l.N
-		if canmerge(n) {
-			v = &var_[nvar]
-			nvar++
-			n.SetOpt(v)
-			v.node = n
-		}
-	}
-
-	// Build list of uses.
-	// We assume that the earliest reference to a temporary is its definition.
-	// This is not true of variables in general but our temporaries are all
-	// single-use (that's why we have so many!).
-	for f := g.Start; f != nil; f = f.Link {
-		p := f.Prog
-		if p.From.Node != nil && ((p.From.Node).(*Node)).Opt() != nil && p.To.Node != nil && ((p.To.Node).(*Node)).Opt() != nil {
-			Fatal("double node %v", p)
-		}
-		v = nil
-		n, _ = p.From.Node.(*Node)
-		if n != nil {
-			v, _ = n.Opt().(*TempVar)
-		}
-		if v == nil {
-			n, _ = p.To.Node.(*Node)
-			if n != nil {
-				v, _ = n.Opt().(*TempVar)
-			}
-		}
-		if v != nil {
-			if v.def == nil {
-				v.def = f
-			}
-			f.Data = v.use
-			v.use = f
-			if n == p.From.Node && (p.Info.Flags&LeftAddr != 0) {
-				v.addr = 1
-			}
-		}
-	}
-
-	if debugmerge > 1 && Debug['v'] != 0 {
-		Dumpit("before", g.Start, 0)
-	}
-
-	nkill := 0
-
-	// Special case.
-	for i := 0; i < len(var_); i++ {
-		v = &var_[i]
-		if v.addr != 0 {
-			continue
-		}
-
-		// Used in only one instruction, which had better be a write.
-		f := v.use
-		if f != nil && f.Data.(*Flow) == nil {
-			p := f.Prog
-			if p.To.Node == v.node && (p.Info.Flags&RightWrite != 0) && p.Info.Flags&RightRead == 0 {
-				p.As = obj.ANOP
-				p.To = obj.Addr{}
-				v.removed = 1
-				if debugmerge > 0 && Debug['v'] != 0 {
-					fmt.Printf("drop write-only %v\n", v.node.Sym)
-				}
-			} else {
-				Fatal("temp used and not set: %v", p)
-			}
-			nkill++
-			continue
-		}
-
-		// Written in one instruction, read in the next, otherwise unused,
-		// no jumps to the next instruction. Happens mainly in 386 compiler.
-		f = v.use
-		if f != nil && f.Link == f.Data.(*Flow) && (f.Data.(*Flow)).Data.(*Flow) == nil && Uniqp(f.Link) == f {
-			p := f.Prog
-			p1 := f.Link.Prog
-			const (
-				SizeAny = SizeB | SizeW | SizeL | SizeQ | SizeF | SizeD
-			)
-			if p.From.Node == v.node && p1.To.Node == v.node && (p.Info.Flags&Move != 0) && (p.Info.Flags|p1.Info.Flags)&(LeftAddr|RightAddr) == 0 && p.Info.Flags&SizeAny == p1.Info.Flags&SizeAny {
-				p1.From = p.From
-				Thearch.Excise(f)
-				v.removed = 1
-				if debugmerge > 0 && Debug['v'] != 0 {
-					fmt.Printf("drop immediate-use %v\n", v.node.Sym)
-				}
-			}
-
-			nkill++
-			continue
-		}
-	}
-
-	// Traverse live range of each variable to set start, end.
-	// Each flood uses a new value of gen so that we don't have
-	// to clear all the r->active words after each variable.
-	gen := int32(0)
-
-	for i := 0; i < len(var_); i++ {
-		v = &var_[i]
-		gen++
-		for f := v.use; f != nil; f = f.Data.(*Flow) {
-			mergewalk(v, f, uint32(gen))
-		}
-		if v.addr != 0 {
-			gen++
-			for f := v.use; f != nil; f = f.Data.(*Flow) {
-				varkillwalk(v, f, uint32(gen))
-			}
-		}
-	}
-
-	// Sort variables by start.
-	bystart := make([]*TempVar, len(var_))
-
-	for i := 0; i < len(var_); i++ {
-		bystart[i] = &var_[i]
-	}
-	sort.Sort(startcmp(bystart[:len(var_)]))
-
-	// List of in-use variables, sorted by end, so that the ones that
-	// will last the longest are the earliest ones in the array.
-	// The tail inuse[nfree:] holds no-longer-used variables.
-	// In theory we should use a sorted tree so that insertions are
-	// guaranteed O(log n) and then the loop is guaranteed O(n log n).
-	// In practice, it doesn't really matter.
-	inuse := make([]*TempVar, len(var_))
-
-	ninuse := 0
-	nfree := len(var_)
-	var t *Type
-	var v1 *TempVar
-	var j int
-	for i := 0; i < len(var_); i++ {
-		v = bystart[i]
-		if debugmerge > 0 && Debug['v'] != 0 {
-			fmt.Printf("consider %v: removed=%d\n", Nconv(v.node, obj.FmtSharp), v.removed)
-		}
-
-		if v.removed != 0 {
-			continue
-		}
-
-		// Expire no longer in use.
-		for ninuse > 0 && inuse[ninuse-1].end < v.start {
-			ninuse--
-			v1 = inuse[ninuse]
-			nfree--
-			inuse[nfree] = v1
-		}
-
-		if debugmerge > 0 && Debug['v'] != 0 {
-			fmt.Printf("consider %v: removed=%d nfree=%d nvar=%d\n", Nconv(v.node, obj.FmtSharp), v.removed, nfree, len(var_))
-		}
-
-		// Find old temp to reuse if possible.
-		t = v.node.Type
-
-		for j = nfree; j < len(var_); j++ {
-			v1 = inuse[j]
-			if debugmerge > 0 && Debug['v'] != 0 {
-				fmt.Printf("consider %v: maybe %v: type=%v,%v addrtaken=%v,%v\n", Nconv(v.node, obj.FmtSharp), Nconv(v1.node, obj.FmtSharp), t, v1.node.Type, v.node.Addrtaken, v1.node.Addrtaken)
-			}
-
-			// Require the types to match but also require the addrtaken bits to match.
-			// If a variable's address is taken, that disables registerization for the individual
-			// words of the variable (for example, the base,len,cap of a slice).
-			// We don't want to merge a non-addressed var with an addressed one and
-			// inhibit registerization of the former.
-			if Eqtype(t, v1.node.Type) && v.node.Addrtaken == v1.node.Addrtaken {
-				inuse[j] = inuse[nfree]
-				nfree++
-				if v1.merge != nil {
-					v.merge = v1.merge
-				} else {
-					v.merge = v1
-				}
-				nkill++
-				break
-			}
-		}
-
-		// Sort v into inuse.
-		j = ninuse
-		ninuse++
-
-		for j > 0 && inuse[j-1].end < v.end {
-			inuse[j] = inuse[j-1]
-			j--
-		}
-
-		inuse[j] = v
-	}
-
-	if debugmerge > 0 && Debug['v'] != 0 {
-		fmt.Printf("%v [%d - %d]\n", Curfn.Func.Nname.Sym, len(var_), nkill)
-		var v *TempVar
-		for i := 0; i < len(var_); i++ {
-			v = &var_[i]
-			fmt.Printf("var %v %v %d-%d", Nconv(v.node, obj.FmtSharp), v.node.Type, v.start, v.end)
-			if v.addr != 0 {
-				fmt.Printf(" addr=1")
-			}
-			if v.removed != 0 {
-				fmt.Printf(" dead=1")
-			}
-			if v.merge != nil {
-				fmt.Printf(" merge %v", Nconv(v.merge.node, obj.FmtSharp))
-			}
-			if v.start == v.end && v.def != nil {
-				fmt.Printf(" %v", v.def.Prog)
-			}
-			fmt.Printf("\n")
-		}
-
-		if debugmerge > 1 && Debug['v'] != 0 {
-			Dumpit("after", g.Start, 0)
-		}
-	}
-
-	// Update node references to use merged temporaries.
-	for f := g.Start; f != nil; f = f.Link {
-		p := f.Prog
-		n, _ = p.From.Node.(*Node)
-		if n != nil {
-			v, _ = n.Opt().(*TempVar)
-			if v != nil && v.merge != nil {
-				p.From.Node = v.merge.node
-			}
-		}
-		n, _ = p.To.Node.(*Node)
-		if n != nil {
-			v, _ = n.Opt().(*TempVar)
-			if v != nil && v.merge != nil {
-				p.To.Node = v.merge.node
-			}
-		}
-	}
-
-	// Delete merged nodes from declaration list.
-	var l *NodeList
-	for lp := &Curfn.Func.Dcl; ; {
-		l = *lp
-		if l == nil {
-			break
-		}
-
-		Curfn.Func.Dcl.End = l
-		n = l.N
-		v, _ = n.Opt().(*TempVar)
-		if v != nil && (v.merge != nil || v.removed != 0) {
-			*lp = l.Next
-			continue
-		}
-
-		lp = &l.Next
-	}
-
-	// Clear aux structures.
-	for i := 0; i < len(var_); i++ {
-		var_[i].node.SetOpt(nil)
-	}
-
-	Flowend(g)
-}
-
-func mergewalk(v *TempVar, f0 *Flow, gen uint32) {
-	var p *obj.Prog
-	var f1 *Flow
-
-	for f1 = f0; f1 != nil; f1 = f1.P1 {
-		if uint32(f1.Active) == gen {
-			break
-		}
-		f1.Active = int32(gen)
-		p = f1.Prog
-		if v.end < p.Pc {
-			v.end = p.Pc
-		}
-		if f1 == v.def {
-			v.start = p.Pc
-			break
-		}
-	}
-
-	var f2 *Flow
-	for f := f0; f != f1; f = f.P1 {
-		for f2 = f.P2; f2 != nil; f2 = f2.P2link {
-			mergewalk(v, f2, gen)
-		}
-	}
-}
-
-func varkillwalk(v *TempVar, f0 *Flow, gen uint32) {
-	var p *obj.Prog
-	var f1 *Flow
-
-	for f1 = f0; f1 != nil; f1 = f1.S1 {
-		if uint32(f1.Active) == gen {
-			break
-		}
-		f1.Active = int32(gen)
-		p = f1.Prog
-		if v.end < p.Pc {
-			v.end = p.Pc
-		}
-		if v.start > p.Pc {
-			v.start = p.Pc
-		}
-		if p.As == obj.ARET || (p.As == obj.AVARKILL && p.To.Node == v.node) {
-			break
-		}
-	}
-
-	for f := f0; f != f1; f = f.S1 {
-		varkillwalk(v, f.S2, gen)
-	}
-}
-
-// Eliminate redundant nil pointer checks.
-//
-// The code generation pass emits a CHECKNIL for every possibly nil pointer.
-// This pass removes a CHECKNIL if every predecessor path has already
-// checked this value for nil.
-//
-// Simple backwards flood from check to definition.
-// Run prog loop backward from end of program to beginning to avoid quadratic
-// behavior removing a run of checks.
-//
-// Assume that stack variables with address not taken can be loaded multiple times
-// from memory without being rechecked. Other variables need to be checked on
-// each load.
-
-var killed int // f->data is either nil or &killed
-
-func nilopt(firstp *obj.Prog) {
-	g := Flowstart(firstp, nil)
-	if g == nil {
-		return
-	}
-
-	if Debug_checknil > 1 { /* || strcmp(curfn->nname->sym->name, "f1") == 0 */
-		Dumpit("nilopt", g.Start, 0)
-	}
-
-	ncheck := 0
-	nkill := 0
-	var p *obj.Prog
-	for f := g.Start; f != nil; f = f.Link {
-		p = f.Prog
-		if p.As != obj.ACHECKNIL || !Thearch.Regtyp(&p.From) {
-			continue
-		}
-		ncheck++
-		if Thearch.Stackaddr(&p.From) {
-			if Debug_checknil != 0 && p.Lineno > 1 {
-				Warnl(int(p.Lineno), "removed nil check of SP address")
-			}
-			f.Data = &killed
-			continue
-		}
-
-		nilwalkfwd(f)
-		if f.Data != nil {
-			if Debug_checknil != 0 && p.Lineno > 1 {
-				Warnl(int(p.Lineno), "removed nil check before indirect")
-			}
-			continue
-		}
-
-		nilwalkback(f)
-		if f.Data != nil {
-			if Debug_checknil != 0 && p.Lineno > 1 {
-				Warnl(int(p.Lineno), "removed repeated nil check")
-			}
-			continue
-		}
-	}
-
-	for f := g.Start; f != nil; f = f.Link {
-		if f.Data != nil {
-			nkill++
-			Thearch.Excise(f)
-		}
-	}
-
-	Flowend(g)
-
-	if Debug_checknil > 1 {
-		fmt.Printf("%v: removed %d of %d nil checks\n", Curfn.Func.Nname.Sym, nkill, ncheck)
-	}
-}
-
-func nilwalkback(fcheck *Flow) {
-	for f := fcheck; f != nil; f = Uniqp(f) {
-		p := f.Prog
-		if (p.Info.Flags&RightWrite != 0) && Thearch.Sameaddr(&p.To, &fcheck.Prog.From) {
-			// Found initialization of value we're checking for nil.
-			// without first finding the check, so this one is unchecked.
-			return
-		}
-
-		if f != fcheck && p.As == obj.ACHECKNIL && Thearch.Sameaddr(&p.From, &fcheck.Prog.From) {
-			fcheck.Data = &killed
-			return
-		}
-	}
-}
-
-// Here is a more complex version that scans backward across branches.
-// It assumes fcheck->kill = 1 has been set on entry, and its job is to find a reason
-// to keep the check (setting fcheck->kill = 0).
-// It doesn't handle copying of aggregates as well as I would like,
-// nor variables with their address taken,
-// and it's too subtle to turn on this late in Go 1.2. Perhaps for Go 1.3.
-/*
-for(f1 = f0; f1 != nil; f1 = f1->p1) {
-	if(f1->active == gen)
-		break;
-	f1->active = gen;
-	p = f1->prog;
-
-	// If same check, stop this loop but still check
-	// alternate predecessors up to this point.
-	if(f1 != fcheck && p->as == ACHECKNIL && thearch.sameaddr(&p->from, &fcheck->prog->from))
-		break;
-
-	if((p.Info.flags & RightWrite) && thearch.sameaddr(&p->to, &fcheck->prog->from)) {
-		// Found initialization of value we're checking for nil.
-		// without first finding the check, so this one is unchecked.
-		fcheck->kill = 0;
-		return;
-	}
-
-	if(f1->p1 == nil && f1->p2 == nil) {
-		print("lost pred for %v\n", fcheck->prog);
-		for(f1=f0; f1!=nil; f1=f1->p1) {
-			thearch.proginfo(&info, f1->prog);
-			print("\t%v %d %d %D %D\n", r1->prog, info.flags&RightWrite, thearch.sameaddr(&f1->prog->to, &fcheck->prog->from), &f1->prog->to, &fcheck->prog->from);
-		}
-		fatal("lost pred trail");
-	}
-}
-
-for(f = f0; f != f1; f = f->p1)
-	for(f2 = f->p2; f2 != nil; f2 = f2->p2link)
-		nilwalkback(fcheck, f2, gen);
-*/
-
-func nilwalkfwd(fcheck *Flow) {
-	// If the path down from rcheck dereferences the address
-	// (possibly with a small offset) before writing to memory
-	// and before any subsequent checks, it's okay to wait for
-	// that implicit check. Only consider this basic block to
-	// avoid problems like:
-	//	_ = *x // should panic
-	//	for {} // no writes but infinite loop may be considered visible
-
-	var last *Flow
-	for f := Uniqs(fcheck); f != nil; f = Uniqs(f) {
-		p := f.Prog
-		if (p.Info.Flags&LeftRead != 0) && Thearch.Smallindir(&p.From, &fcheck.Prog.From) {
-			fcheck.Data = &killed
-			return
-		}
-
-		if (p.Info.Flags&(RightRead|RightWrite) != 0) && Thearch.Smallindir(&p.To, &fcheck.Prog.From) {
-			fcheck.Data = &killed
-			return
-		}
-
-		// Stop if another nil check happens.
-		if p.As == obj.ACHECKNIL {
-			return
-		}
-
-		// Stop if value is lost.
-		if (p.Info.Flags&RightWrite != 0) && Thearch.Sameaddr(&p.To, &fcheck.Prog.From) {
-			return
-		}
-
-		// Stop if memory write.
-		if (p.Info.Flags&RightWrite != 0) && !Thearch.Regtyp(&p.To) {
-			return
-		}
-
-		// Stop if we jump backward.
-		if last != nil && f.Id <= last.Id {
-			return
-		}
-		last = f
-	}
-}
diff --git a/src/cmd/compile/internal/gc/racewalk.go b/src/cmd/compile/internal/gc/racewalk.go
deleted file mode 100644
index f53e8ec..0000000
--- a/src/cmd/compile/internal/gc/racewalk.go
+++ /dev/null
@@ -1,622 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import (
-	"fmt"
-	"strings"
-)
-
-// The racewalk pass modifies the code tree for the function as follows:
-//
-// 1. It inserts a call to racefuncenter at the beginning of each function.
-// 2. It inserts a call to racefuncexit at the end of each function.
-// 3. It inserts a call to raceread before each memory read.
-// 4. It inserts a call to racewrite before each memory write.
-//
-// The rewriting is not yet complete. Certain nodes are not rewritten
-// but should be.
-
-// TODO(dvyukov): do not instrument initialization as writes:
-// a := make([]int, 10)
-
-// Do not instrument the following packages at all,
-// at best instrumentation would cause infinite recursion.
-var omit_pkgs = []string{"runtime", "runtime/race"}
-
-// Only insert racefuncenter/racefuncexit into the following packages.
-// Memory accesses in the packages are either uninteresting or will cause false positives.
-var noinst_pkgs = []string{"sync", "sync/atomic"}
-
-func ispkgin(pkgs []string) bool {
-	if myimportpath != "" {
-		for i := 0; i < len(pkgs); i++ {
-			if myimportpath == pkgs[i] {
-				return true
-			}
-		}
-	}
-
-	return false
-}
-
-// TODO(rsc): Remove. Put //go:norace on forkAndExecInChild instead.
-func isforkfunc(fn *Node) bool {
-	// Special case for syscall.forkAndExecInChild.
-	// In the child, this function must not acquire any locks, because
-	// they might have been locked at the time of the fork.  This means
-	// no rescheduling, no malloc calls, and no new stack segments.
-	// Race instrumentation does all of the above.
-	return myimportpath != "" && myimportpath == "syscall" && fn.Func.Nname.Sym.Name == "forkAndExecInChild"
-}
-
-func racewalk(fn *Node) {
-	if ispkgin(omit_pkgs) || isforkfunc(fn) || fn.Func.Norace {
-		return
-	}
-
-	if !ispkgin(noinst_pkgs) {
-		racewalklist(fn.Nbody, nil)
-
-		// nothing interesting for race detector in fn->enter
-		racewalklist(fn.Func.Exit, nil)
-	}
-
-	// nodpc is the PC of the caller as extracted by
-	// getcallerpc. We use -widthptr(FP) for x86.
-	// BUG: this will not work on arm.
-	nodpc := Nod(OXXX, nil, nil)
-
-	*nodpc = *nodfp
-	nodpc.Type = Types[TUINTPTR]
-	nodpc.Xoffset = int64(-Widthptr)
-	nd := mkcall("racefuncenter", nil, nil, nodpc)
-	fn.Func.Enter = concat(list1(nd), fn.Func.Enter)
-	nd = mkcall("racefuncexit", nil, nil)
-	fn.Func.Exit = list(fn.Func.Exit, nd)
-
-	if Debug['W'] != 0 {
-		s := fmt.Sprintf("after racewalk %v", fn.Func.Nname.Sym)
-		dumplist(s, fn.Nbody)
-		s = fmt.Sprintf("enter %v", fn.Func.Nname.Sym)
-		dumplist(s, fn.Func.Enter)
-		s = fmt.Sprintf("exit %v", fn.Func.Nname.Sym)
-		dumplist(s, fn.Func.Exit)
-	}
-}
-
-func racewalklist(l *NodeList, init **NodeList) {
-	var instr *NodeList
-
-	for ; l != nil; l = l.Next {
-		instr = nil
-		racewalknode(&l.N, &instr, 0, 0)
-		if init == nil {
-			l.N.Ninit = concat(l.N.Ninit, instr)
-		} else {
-			*init = concat(*init, instr)
-		}
-	}
-}
-
-// walkexpr and walkstmt combined
-// walks the tree and adds calls to the
-// instrumentation code to top-level (statement) nodes' init
-func racewalknode(np **Node, init **NodeList, wr int, skip int) {
-	n := *np
-
-	if n == nil {
-		return
-	}
-
-	if Debug['w'] > 1 {
-		Dump("racewalk-before", n)
-	}
-	setlineno(n)
-	if init == nil {
-		Fatal("racewalk: bad init list")
-	}
-	if init == &n.Ninit {
-		// If init == &n->ninit and n->ninit is non-nil,
-		// racewalknode might append it to itself.
-		// nil it out and handle it separately before putting it back.
-		l := n.Ninit
-
-		n.Ninit = nil
-		racewalklist(l, nil)
-		racewalknode(&n, &l, wr, skip) // recurse with nil n->ninit
-		appendinit(&n, l)
-		*np = n
-		return
-	}
-
-	racewalklist(n.Ninit, nil)
-
-	switch n.Op {
-	default:
-		Fatal("racewalk: unknown node type %v", Oconv(int(n.Op), 0))
-
-	case OAS, OASWB, OAS2FUNC:
-		racewalknode(&n.Left, init, 1, 0)
-		racewalknode(&n.Right, init, 0, 0)
-		goto ret
-
-		// can't matter
-	case OCFUNC, OVARKILL:
-		goto ret
-
-	case OBLOCK:
-		var out *NodeList
-		for l := n.List; l != nil; l = l.Next {
-			switch l.N.Op {
-			case OCALLFUNC, OCALLMETH, OCALLINTER:
-				racewalknode(&l.N, &out, 0, 0)
-				out = list(out, l.N)
-				// Scan past OAS nodes copying results off stack.
-				// Those must not be instrumented, because the
-				// instrumentation calls will smash the results.
-				// The assignments are to temporaries, so they cannot
-				// be involved in races and need not be instrumented.
-				for l.Next != nil && l.Next.N.Op == OAS && iscallret(l.Next.N.Right) {
-					l = l.Next
-					out = list(out, l.N)
-				}
-			default:
-				racewalknode(&l.N, &out, 0, 0)
-				out = list(out, l.N)
-			}
-		}
-		n.List = out
-		goto ret
-
-	case ODEFER:
-		racewalknode(&n.Left, init, 0, 0)
-		goto ret
-
-	case OPROC:
-		racewalknode(&n.Left, init, 0, 0)
-		goto ret
-
-	case OCALLINTER:
-		racewalknode(&n.Left, init, 0, 0)
-		goto ret
-
-		// Instrument dst argument of runtime.writebarrier* calls
-	// as we do not instrument runtime code.
-	// typedslicecopy is instrumented in runtime.
-	case OCALLFUNC:
-		racewalknode(&n.Left, init, 0, 0)
-		goto ret
-
-	case ONOT,
-		OMINUS,
-		OPLUS,
-		OREAL,
-		OIMAG,
-		OCOM,
-		OSQRT:
-		racewalknode(&n.Left, init, wr, 0)
-		goto ret
-
-	case ODOTINTER:
-		racewalknode(&n.Left, init, 0, 0)
-		goto ret
-
-	case ODOT:
-		racewalknode(&n.Left, init, 0, 1)
-		callinstr(&n, init, wr, skip)
-		goto ret
-
-	case ODOTPTR: // dst = (*x).f with implicit *; otherwise it's ODOT+OIND
-		racewalknode(&n.Left, init, 0, 0)
-
-		callinstr(&n, init, wr, skip)
-		goto ret
-
-	case OIND: // *p
-		racewalknode(&n.Left, init, 0, 0)
-
-		callinstr(&n, init, wr, skip)
-		goto ret
-
-	case OSPTR, OLEN, OCAP:
-		racewalknode(&n.Left, init, 0, 0)
-		if Istype(n.Left.Type, TMAP) {
-			n1 := Nod(OCONVNOP, n.Left, nil)
-			n1.Type = Ptrto(Types[TUINT8])
-			n1 = Nod(OIND, n1, nil)
-			typecheck(&n1, Erv)
-			callinstr(&n1, init, 0, skip)
-		}
-
-		goto ret
-
-	case OLSH,
-		ORSH,
-		OLROT,
-		OAND,
-		OANDNOT,
-		OOR,
-		OXOR,
-		OSUB,
-		OMUL,
-		OHMUL,
-		OEQ,
-		ONE,
-		OLT,
-		OLE,
-		OGE,
-		OGT,
-		OADD,
-		OCOMPLEX:
-		racewalknode(&n.Left, init, wr, 0)
-		racewalknode(&n.Right, init, wr, 0)
-		goto ret
-
-	case OANDAND, OOROR:
-		racewalknode(&n.Left, init, wr, 0)
-
-		// walk has ensured the node has moved to a location where
-		// side effects are safe.
-		// n->right may not be executed,
-		// so instrumentation goes to n->right->ninit, not init.
-		racewalknode(&n.Right, &n.Right.Ninit, wr, 0)
-
-		goto ret
-
-	case ONAME:
-		callinstr(&n, init, wr, skip)
-		goto ret
-
-	case OCONV:
-		racewalknode(&n.Left, init, wr, 0)
-		goto ret
-
-	case OCONVNOP:
-		racewalknode(&n.Left, init, wr, 0)
-		goto ret
-
-	case ODIV, OMOD:
-		racewalknode(&n.Left, init, wr, 0)
-		racewalknode(&n.Right, init, wr, 0)
-		goto ret
-
-	case OINDEX:
-		if !Isfixedarray(n.Left.Type) {
-			racewalknode(&n.Left, init, 0, 0)
-		} else if !islvalue(n.Left) {
-			// index of unaddressable array, like Map[k][i].
-			racewalknode(&n.Left, init, wr, 0)
-
-			racewalknode(&n.Right, init, 0, 0)
-			goto ret
-		}
-
-		racewalknode(&n.Right, init, 0, 0)
-		if n.Left.Type.Etype != TSTRING {
-			callinstr(&n, init, wr, skip)
-		}
-		goto ret
-
-	case OSLICE, OSLICEARR, OSLICE3, OSLICE3ARR, OSLICESTR:
-		racewalknode(&n.Left, init, 0, 0)
-		racewalknode(&n.Right, init, 0, 0)
-		goto ret
-
-	case OKEY:
-		racewalknode(&n.Left, init, 0, 0)
-		racewalknode(&n.Right, init, 0, 0)
-		goto ret
-
-	case OADDR:
-		racewalknode(&n.Left, init, 0, 1)
-		goto ret
-
-		// n->left is Type* which is not interesting.
-	case OEFACE:
-		racewalknode(&n.Right, init, 0, 0)
-
-		goto ret
-
-	case OITAB:
-		racewalknode(&n.Left, init, 0, 0)
-		goto ret
-
-		// should not appear in AST by now
-	case OSEND,
-		ORECV,
-		OCLOSE,
-		ONEW,
-		OXCASE,
-		OXFALL,
-		OCASE,
-		OPANIC,
-		ORECOVER,
-		OCONVIFACE,
-		OCMPIFACE,
-		OMAKECHAN,
-		OMAKEMAP,
-		OMAKESLICE,
-		OCALL,
-		OCOPY,
-		OAPPEND,
-		ORUNESTR,
-		OARRAYBYTESTR,
-		OARRAYRUNESTR,
-		OSTRARRAYBYTE,
-		OSTRARRAYRUNE,
-		OINDEXMAP,
-		// lowered to call
-		OCMPSTR,
-		OADDSTR,
-		ODOTTYPE,
-		ODOTTYPE2,
-		OAS2DOTTYPE,
-		OCALLPART,
-		// lowered to PTRLIT
-		OCLOSURE,  // lowered to PTRLIT
-		ORANGE,    // lowered to ordinary for loop
-		OARRAYLIT, // lowered to assignments
-		OMAPLIT,
-		OSTRUCTLIT,
-		OAS2,
-		OAS2RECV,
-		OAS2MAPR,
-		OASOP:
-		Yyerror("racewalk: %v must be lowered by now", Oconv(int(n.Op), 0))
-
-		goto ret
-
-		// impossible nodes: only appear in backend.
-	case ORROTC, OEXTEND:
-		Yyerror("racewalk: %v cannot exist now", Oconv(int(n.Op), 0))
-		goto ret
-
-	case OGETG:
-		Yyerror("racewalk: OGETG can happen only in runtime which we don't instrument")
-		goto ret
-
-	case OFOR:
-		if n.Left != nil {
-			racewalknode(&n.Left, &n.Left.Ninit, 0, 0)
-		}
-		if n.Right != nil {
-			racewalknode(&n.Right, &n.Right.Ninit, 0, 0)
-		}
-		goto ret
-
-	case OIF, OSWITCH:
-		if n.Left != nil {
-			racewalknode(&n.Left, &n.Left.Ninit, 0, 0)
-		}
-		goto ret
-
-		// just do generic traversal
-	case OCALLMETH,
-		ORETURN,
-		ORETJMP,
-		OSELECT,
-		OEMPTY,
-		OBREAK,
-		OCONTINUE,
-		OFALL,
-		OGOTO,
-		OLABEL:
-		goto ret
-
-		// does not require instrumentation
-	case OPRINT, // don't bother instrumenting it
-		OPRINTN,     // don't bother instrumenting it
-		OCHECKNIL,   // always followed by a read.
-		OPARAM,      // it appears only in fn->exit to copy heap params back
-		OCLOSUREVAR, // immutable pointer to captured variable
-		ODOTMETH,    // either part of CALLMETH or CALLPART (lowered to PTRLIT)
-		OINDREG,     // at this stage, only n(SP) nodes from nodarg
-		ODCL,        // declarations (without value) cannot be races
-		ODCLCONST,
-		ODCLTYPE,
-		OTYPE,
-		ONONAME,
-		OLITERAL,
-		OTYPESW: // ignored by code generation, do not instrument.
-		goto ret
-	}
-
-ret:
-	if n.Op != OBLOCK { // OBLOCK is handled above in a special way.
-		racewalklist(n.List, init)
-	}
-	racewalklist(n.Nbody, nil)
-	racewalklist(n.Rlist, nil)
-	*np = n
-}
-
-func isartificial(n *Node) bool {
-	// compiler-emitted artificial things that we do not want to instrument,
-	// cant' possibly participate in a data race.
-	if n.Op == ONAME && n.Sym != nil && n.Sym.Name != "" {
-		if n.Sym.Name == "_" {
-			return true
-		}
-
-		// autotmp's are always local
-		if strings.HasPrefix(n.Sym.Name, "autotmp_") {
-			return true
-		}
-
-		// statictmp's are read-only
-		if strings.HasPrefix(n.Sym.Name, "statictmp_") {
-			return true
-		}
-
-		// go.itab is accessed only by the compiler and runtime (assume safe)
-		if n.Sym.Pkg != nil && n.Sym.Pkg.Name != "" && n.Sym.Pkg.Name == "go.itab" {
-			return true
-		}
-	}
-
-	return false
-}
-
-func callinstr(np **Node, init **NodeList, wr int, skip int) bool {
-	n := *np
-
-	//print("callinstr for %+N [ %O ] etype=%E class=%d\n",
-	//	  n, n->op, n->type ? n->type->etype : -1, n->class);
-
-	if skip != 0 || n.Type == nil || n.Type.Etype >= TIDEAL {
-		return false
-	}
-	t := n.Type
-	if isartificial(n) {
-		return false
-	}
-
-	b := outervalue(n)
-
-	// it skips e.g. stores to ... parameter array
-	if isartificial(b) {
-		return false
-	}
-	class := b.Class
-
-	// BUG: we _may_ want to instrument PAUTO sometimes
-	// e.g. if we've got a local variable/method receiver
-	// that has got a pointer inside. Whether it points to
-	// the heap or not is impossible to know at compile time
-	if (class&PHEAP != 0) || class == PPARAMREF || class == PEXTERN || b.Op == OINDEX || b.Op == ODOTPTR || b.Op == OIND {
-		hascalls := 0
-		foreach(n, hascallspred, &hascalls)
-		if hascalls != 0 {
-			n = detachexpr(n, init)
-			*np = n
-		}
-
-		n = treecopy(n, 0)
-		makeaddable(n)
-		var f *Node
-		if t.Etype == TSTRUCT || Isfixedarray(t) {
-			name := "racereadrange"
-			if wr != 0 {
-				name = "racewriterange"
-			}
-			f = mkcall(name, nil, init, uintptraddr(n), Nodintconst(t.Width))
-		} else {
-			name := "raceread"
-			if wr != 0 {
-				name = "racewrite"
-			}
-			f = mkcall(name, nil, init, uintptraddr(n))
-		}
-
-		*init = list(*init, f)
-		return true
-	}
-
-	return false
-}
-
-// makeaddable returns a node whose memory location is the
-// same as n, but which is addressable in the Go language
-// sense.
-// This is different from functions like cheapexpr that may make
-// a copy of their argument.
-func makeaddable(n *Node) {
-	// The arguments to uintptraddr technically have an address but
-	// may not be addressable in the Go sense: for example, in the case
-	// of T(v).Field where T is a struct type and v is
-	// an addressable value.
-	switch n.Op {
-	case OINDEX:
-		if Isfixedarray(n.Left.Type) {
-			makeaddable(n.Left)
-		}
-
-		// Turn T(v).Field into v.Field
-	case ODOT, OXDOT:
-		if n.Left.Op == OCONVNOP {
-			n.Left = n.Left.Left
-		}
-		makeaddable(n.Left)
-
-		// nothing to do
-	case ODOTPTR:
-		fallthrough
-	default:
-		break
-	}
-}
-
-func uintptraddr(n *Node) *Node {
-	r := Nod(OADDR, n, nil)
-	r.Bounded = true
-	r = conv(r, Types[TUNSAFEPTR])
-	r = conv(r, Types[TUINTPTR])
-	return r
-}
-
-func detachexpr(n *Node, init **NodeList) *Node {
-	addr := Nod(OADDR, n, nil)
-	l := temp(Ptrto(n.Type))
-	as := Nod(OAS, l, addr)
-	typecheck(&as, Etop)
-	walkexpr(&as, init)
-	*init = list(*init, as)
-	ind := Nod(OIND, l, nil)
-	typecheck(&ind, Erv)
-	walkexpr(&ind, init)
-	return ind
-}
-
-func foreachnode(n *Node, f func(*Node, interface{}), c interface{}) {
-	if n != nil {
-		f(n, c)
-	}
-}
-
-func foreachlist(l *NodeList, f func(*Node, interface{}), c interface{}) {
-	for ; l != nil; l = l.Next {
-		foreachnode(l.N, f, c)
-	}
-}
-
-func foreach(n *Node, f func(*Node, interface{}), c interface{}) {
-	foreachlist(n.Ninit, f, c)
-	foreachnode(n.Left, f, c)
-	foreachnode(n.Right, f, c)
-	foreachlist(n.List, f, c)
-	foreachlist(n.Nbody, f, c)
-	foreachlist(n.Rlist, f, c)
-}
-
-func hascallspred(n *Node, c interface{}) {
-	switch n.Op {
-	case OCALL, OCALLFUNC, OCALLMETH, OCALLINTER:
-		(*c.(*int))++
-	}
-}
-
-// appendinit is like addinit in subr.go
-// but appends rather than prepends.
-func appendinit(np **Node, init *NodeList) {
-	if init == nil {
-		return
-	}
-
-	n := *np
-	switch n.Op {
-	// There may be multiple refs to this node;
-	// introduce OCONVNOP to hold init list.
-	case ONAME, OLITERAL:
-		n = Nod(OCONVNOP, n, nil)
-
-		n.Type = n.Left.Type
-		n.Typecheck = 1
-		*np = n
-	}
-
-	n.Ninit = concat(n.Ninit, init)
-	n.Ullman = UINF
-}
diff --git a/src/cmd/compile/internal/gc/range.go b/src/cmd/compile/internal/gc/range.go
deleted file mode 100644
index 26f05d9..0000000
--- a/src/cmd/compile/internal/gc/range.go
+++ /dev/null
@@ -1,406 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import "cmd/internal/obj"
-
-/*
- * range
- */
-func typecheckrange(n *Node) {
-	var toomany int
-	var why string
-	var t1 *Type
-	var t2 *Type
-	var v1 *Node
-	var v2 *Node
-
-	// Typechecking order is important here:
-	// 0. first typecheck range expression (slice/map/chan),
-	//	it is evaluated only once and so logically it is not part of the loop.
-	// 1. typcheck produced values,
-	//	this part can declare new vars and so it must be typechecked before body,
-	//	because body can contain a closure that captures the vars.
-	// 2. decldepth++ to denote loop body.
-	// 3. typecheck body.
-	// 4. decldepth--.
-
-	typecheck(&n.Right, Erv)
-
-	t := n.Right.Type
-	if t == nil {
-		goto out
-	}
-
-	// delicate little dance.  see typecheckas2
-	for ll := n.List; ll != nil; ll = ll.Next {
-		if ll.N.Name == nil || ll.N.Name.Defn != n {
-			typecheck(&ll.N, Erv|Easgn)
-		}
-	}
-
-	if Isptr[t.Etype] && Isfixedarray(t.Type) {
-		t = t.Type
-	}
-	n.Type = t
-
-	toomany = 0
-	switch t.Etype {
-	default:
-		Yyerror("cannot range over %v", Nconv(n.Right, obj.FmtLong))
-		goto out
-
-	case TARRAY:
-		t1 = Types[TINT]
-		t2 = t.Type
-
-	case TMAP:
-		t1 = t.Down
-		t2 = t.Type
-
-	case TCHAN:
-		if t.Chan&Crecv == 0 {
-			Yyerror("invalid operation: range %v (receive from send-only type %v)", n.Right, n.Right.Type)
-			goto out
-		}
-
-		t1 = t.Type
-		t2 = nil
-		if count(n.List) == 2 {
-			toomany = 1
-		}
-
-	case TSTRING:
-		t1 = Types[TINT]
-		t2 = runetype
-	}
-
-	if count(n.List) > 2 || toomany != 0 {
-		Yyerror("too many variables in range")
-	}
-
-	v1 = nil
-	if n.List != nil {
-		v1 = n.List.N
-	}
-	v2 = nil
-	if n.List != nil && n.List.Next != nil {
-		v2 = n.List.Next.N
-	}
-
-	// this is not only a optimization but also a requirement in the spec.
-	// "if the second iteration variable is the blank identifier, the range
-	// clause is equivalent to the same clause with only the first variable
-	// present."
-	if isblank(v2) {
-		if v1 != nil {
-			n.List = list1(v1)
-		}
-		v2 = nil
-	}
-
-	if v1 != nil {
-		if v1.Name != nil && v1.Name.Defn == n {
-			v1.Type = t1
-		} else if v1.Type != nil && assignop(t1, v1.Type, &why) == 0 {
-			Yyerror("cannot assign type %v to %v in range%s", t1, Nconv(v1, obj.FmtLong), why)
-		}
-		checkassign(n, v1)
-	}
-
-	if v2 != nil {
-		if v2.Name != nil && v2.Name.Defn == n {
-			v2.Type = t2
-		} else if v2.Type != nil && assignop(t2, v2.Type, &why) == 0 {
-			Yyerror("cannot assign type %v to %v in range%s", t2, Nconv(v2, obj.FmtLong), why)
-		}
-		checkassign(n, v2)
-	}
-
-	// second half of dance
-out:
-	n.Typecheck = 1
-
-	for ll := n.List; ll != nil; ll = ll.Next {
-		if ll.N.Typecheck == 0 {
-			typecheck(&ll.N, Erv|Easgn)
-		}
-	}
-
-	decldepth++
-	typechecklist(n.Nbody, Etop)
-	decldepth--
-}
-
-func walkrange(n *Node) {
-	// variable name conventions:
-	//	ohv1, hv1, hv2: hidden (old) val 1, 2
-	//	ha, hit: hidden aggregate, iterator
-	//	hn, hp: hidden len, pointer
-	//	hb: hidden bool
-	//	a, v1, v2: not hidden aggregate, val 1, 2
-
-	t := n.Type
-
-	a := n.Right
-	lno := int(setlineno(a))
-	n.Right = nil
-
-	var v1 *Node
-	if n.List != nil {
-		v1 = n.List.N
-	}
-	var v2 *Node
-	if n.List != nil && n.List.Next != nil && !isblank(n.List.Next.N) {
-		v2 = n.List.Next.N
-	}
-
-	// n->list has no meaning anymore, clear it
-	// to avoid erroneous processing by racewalk.
-	n.List = nil
-
-	var body *NodeList
-	var init *NodeList
-	switch t.Etype {
-	default:
-		Fatal("walkrange")
-
-		// Lower n into runtime·memclr if possible, for
-	// fast zeroing of slices and arrays (issue 5373).
-	// Look for instances of
-	//
-	// for i := range a {
-	// 	a[i] = zero
-	// }
-	//
-	// in which the evaluation of a is side-effect-free.
-	case TARRAY:
-		if Debug['N'] == 0 {
-			if flag_race == 0 {
-				if v1 != nil {
-					if v2 == nil {
-						if n.Nbody != nil {
-							if n.Nbody.N != nil { // at least one statement in body
-								if n.Nbody.Next == nil { // at most one statement in body
-									tmp := n.Nbody.N // first statement of body
-									if tmp.Op == OAS {
-										if tmp.Left.Op == OINDEX {
-											if samesafeexpr(tmp.Left.Left, a) {
-												if samesafeexpr(tmp.Left.Right, v1) {
-													if t.Type.Width > 0 {
-														if iszero(tmp.Right) {
-															// Convert to
-															// if len(a) != 0 {
-															// 	hp = &a[0]
-															// 	hn = len(a)*sizeof(elem(a))
-															// 	memclr(hp, hn)
-															// 	i = len(a) - 1
-															// }
-															n.Op = OIF
-
-															n.Nbody = nil
-															n.Left = Nod(ONE, Nod(OLEN, a, nil), Nodintconst(0))
-
-															// hp = &a[0]
-															hp := temp(Ptrto(Types[TUINT8]))
-
-															tmp := Nod(OINDEX, a, Nodintconst(0))
-															tmp.Bounded = true
-															tmp = Nod(OADDR, tmp, nil)
-															tmp = Nod(OCONVNOP, tmp, nil)
-															tmp.Type = Ptrto(Types[TUINT8])
-															n.Nbody = list(n.Nbody, Nod(OAS, hp, tmp))
-
-															// hn = len(a) * sizeof(elem(a))
-															hn := temp(Types[TUINTPTR])
-
-															tmp = Nod(OLEN, a, nil)
-															tmp = Nod(OMUL, tmp, Nodintconst(t.Type.Width))
-															tmp = conv(tmp, Types[TUINTPTR])
-															n.Nbody = list(n.Nbody, Nod(OAS, hn, tmp))
-
-															// memclr(hp, hn)
-															fn := mkcall("memclr", nil, nil, hp, hn)
-
-															n.Nbody = list(n.Nbody, fn)
-
-															// i = len(a) - 1
-															v1 = Nod(OAS, v1, Nod(OSUB, Nod(OLEN, a, nil), Nodintconst(1)))
-
-															n.Nbody = list(n.Nbody, v1)
-
-															typecheck(&n.Left, Erv)
-															typechecklist(n.Nbody, Etop)
-															walkstmt(&n)
-															lineno = int32(lno)
-															return
-														}
-													}
-												}
-											}
-										}
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-
-		// orderstmt arranged for a copy of the array/slice variable if needed.
-		ha := a
-
-		hv1 := temp(Types[TINT])
-		hn := temp(Types[TINT])
-		var hp *Node
-
-		init = list(init, Nod(OAS, hv1, nil))
-		init = list(init, Nod(OAS, hn, Nod(OLEN, ha, nil)))
-		if v2 != nil {
-			hp = temp(Ptrto(n.Type.Type))
-			tmp := Nod(OINDEX, ha, Nodintconst(0))
-			tmp.Bounded = true
-			init = list(init, Nod(OAS, hp, Nod(OADDR, tmp, nil)))
-		}
-
-		n.Left = Nod(OLT, hv1, hn)
-		n.Right = Nod(OAS, hv1, Nod(OADD, hv1, Nodintconst(1)))
-		if v1 == nil {
-			body = nil
-		} else if v2 == nil {
-			body = list1(Nod(OAS, v1, hv1))
-		} else {
-			a := Nod(OAS2, nil, nil)
-			a.List = list(list1(v1), v2)
-			a.Rlist = list(list1(hv1), Nod(OIND, hp, nil))
-			body = list1(a)
-
-			// Advance pointer as part of increment.
-			// We used to advance the pointer before executing the loop body,
-			// but doing so would make the pointer point past the end of the
-			// array during the final iteration, possibly causing another unrelated
-			// piece of memory not to be garbage collected until the loop finished.
-			// Advancing during the increment ensures that the pointer p only points
-			// pass the end of the array during the final "p++; i++; if(i >= len(x)) break;",
-			// after which p is dead, so it cannot confuse the collector.
-			tmp := Nod(OADD, hp, Nodintconst(t.Type.Width))
-
-			tmp.Type = hp.Type
-			tmp.Typecheck = 1
-			tmp.Right.Type = Types[Tptr]
-			tmp.Right.Typecheck = 1
-			a = Nod(OAS, hp, tmp)
-			typecheck(&a, Etop)
-			n.Right.Ninit = list1(a)
-		}
-
-		// orderstmt allocated the iterator for us.
-	// we only use a once, so no copy needed.
-	case TMAP:
-		ha := a
-
-		th := hiter(t)
-		hit := prealloc[n]
-		hit.Type = th
-		n.Left = nil
-		keyname := newname(th.Type.Sym)      // depends on layout of iterator struct.  See reflect.go:hiter
-		valname := newname(th.Type.Down.Sym) // ditto
-
-		fn := syslook("mapiterinit", 1)
-
-		substArgTypes(fn, t.Down, t.Type, th)
-		init = list(init, mkcall1(fn, nil, nil, typename(t), ha, Nod(OADDR, hit, nil)))
-		n.Left = Nod(ONE, Nod(ODOT, hit, keyname), nodnil())
-
-		fn = syslook("mapiternext", 1)
-		substArgTypes(fn, th)
-		n.Right = mkcall1(fn, nil, nil, Nod(OADDR, hit, nil))
-
-		key := Nod(ODOT, hit, keyname)
-		key = Nod(OIND, key, nil)
-		if v1 == nil {
-			body = nil
-		} else if v2 == nil {
-			body = list1(Nod(OAS, v1, key))
-		} else {
-			val := Nod(ODOT, hit, valname)
-			val = Nod(OIND, val, nil)
-			a := Nod(OAS2, nil, nil)
-			a.List = list(list1(v1), v2)
-			a.Rlist = list(list1(key), val)
-			body = list1(a)
-		}
-
-		// orderstmt arranged for a copy of the channel variable.
-	case TCHAN:
-		ha := a
-
-		n.Left = nil
-
-		hv1 := temp(t.Type)
-		hv1.Typecheck = 1
-		if haspointers(t.Type) {
-			init = list(init, Nod(OAS, hv1, nil))
-		}
-		hb := temp(Types[TBOOL])
-
-		n.Left = Nod(ONE, hb, Nodbool(false))
-		a := Nod(OAS2RECV, nil, nil)
-		a.Typecheck = 1
-		a.List = list(list1(hv1), hb)
-		a.Rlist = list1(Nod(ORECV, ha, nil))
-		n.Left.Ninit = list1(a)
-		if v1 == nil {
-			body = nil
-		} else {
-			body = list1(Nod(OAS, v1, hv1))
-		}
-
-		// orderstmt arranged for a copy of the string variable.
-	case TSTRING:
-		ha := a
-
-		ohv1 := temp(Types[TINT])
-
-		hv1 := temp(Types[TINT])
-		init = list(init, Nod(OAS, hv1, nil))
-
-		var a *Node
-		var hv2 *Node
-		if v2 == nil {
-			a = Nod(OAS, hv1, mkcall("stringiter", Types[TINT], nil, ha, hv1))
-		} else {
-			hv2 = temp(runetype)
-			a = Nod(OAS2, nil, nil)
-			a.List = list(list1(hv1), hv2)
-			fn := syslook("stringiter2", 0)
-			a.Rlist = list1(mkcall1(fn, getoutargx(fn.Type), nil, ha, hv1))
-		}
-
-		n.Left = Nod(ONE, hv1, Nodintconst(0))
-		n.Left.Ninit = list(list1(Nod(OAS, ohv1, hv1)), a)
-
-		body = nil
-		if v1 != nil {
-			body = list1(Nod(OAS, v1, ohv1))
-		}
-		if v2 != nil {
-			body = list(body, Nod(OAS, v2, hv2))
-		}
-	}
-
-	n.Op = OFOR
-	typechecklist(init, Etop)
-	n.Ninit = concat(n.Ninit, init)
-	typechecklist(n.Left.Ninit, Etop)
-	typecheck(&n.Left, Erv)
-	typecheck(&n.Right, Etop)
-	typechecklist(body, Etop)
-	n.Nbody = concat(body, n.Nbody)
-	walkstmt(&n)
-
-	lineno = int32(lno)
-}
diff --git a/src/cmd/compile/internal/gc/reflect.go b/src/cmd/compile/internal/gc/reflect.go
deleted file mode 100644
index 1ac4a03..0000000
--- a/src/cmd/compile/internal/gc/reflect.go
+++ /dev/null
@@ -1,1607 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import (
-	"cmd/internal/gcprog"
-	"cmd/internal/obj"
-	"fmt"
-	"os"
-)
-
-/*
- * runtime interface and reflection data structures
- */
-var signatlist *NodeList
-
-func sigcmp(a *Sig, b *Sig) int {
-	i := stringsCompare(a.name, b.name)
-	if i != 0 {
-		return i
-	}
-	if a.pkg == b.pkg {
-		return 0
-	}
-	if a.pkg == nil {
-		return -1
-	}
-	if b.pkg == nil {
-		return +1
-	}
-	return stringsCompare(a.pkg.Path, b.pkg.Path)
-}
-
-func lsort(l *Sig, f func(*Sig, *Sig) int) *Sig {
-	if l == nil || l.link == nil {
-		return l
-	}
-
-	l1 := l
-	l2 := l
-	for {
-		l2 = l2.link
-		if l2 == nil {
-			break
-		}
-		l2 = l2.link
-		if l2 == nil {
-			break
-		}
-		l1 = l1.link
-	}
-
-	l2 = l1.link
-	l1.link = nil
-	l1 = lsort(l, f)
-	l2 = lsort(l2, f)
-
-	/* set up lead element */
-	if f(l1, l2) < 0 {
-		l = l1
-		l1 = l1.link
-	} else {
-		l = l2
-		l2 = l2.link
-	}
-
-	le := l
-
-	for {
-		if l1 == nil {
-			for l2 != nil {
-				le.link = l2
-				le = l2
-				l2 = l2.link
-			}
-
-			le.link = nil
-			break
-		}
-
-		if l2 == nil {
-			for l1 != nil {
-				le.link = l1
-				le = l1
-				l1 = l1.link
-			}
-
-			break
-		}
-
-		if f(l1, l2) < 0 {
-			le.link = l1
-			le = l1
-			l1 = l1.link
-		} else {
-			le.link = l2
-			le = l2
-			l2 = l2.link
-		}
-	}
-
-	le.link = nil
-	return l
-}
-
-// Builds a type representing a Bucket structure for
-// the given map type.  This type is not visible to users -
-// we include only enough information to generate a correct GC
-// program for it.
-// Make sure this stays in sync with ../../runtime/hashmap.go!
-const (
-	BUCKETSIZE = 8
-	MAXKEYSIZE = 128
-	MAXVALSIZE = 128
-)
-
-func makefield(name string, t *Type) *Type {
-	f := typ(TFIELD)
-	f.Type = t
-	f.Sym = new(Sym)
-	f.Sym.Name = name
-	return f
-}
-
-func mapbucket(t *Type) *Type {
-	if t.Bucket != nil {
-		return t.Bucket
-	}
-
-	bucket := typ(TSTRUCT)
-	keytype := t.Down
-	valtype := t.Type
-	dowidth(keytype)
-	dowidth(valtype)
-	if keytype.Width > MAXKEYSIZE {
-		keytype = Ptrto(keytype)
-	}
-	if valtype.Width > MAXVALSIZE {
-		valtype = Ptrto(valtype)
-	}
-
-	// The first field is: uint8 topbits[BUCKETSIZE].
-	arr := typ(TARRAY)
-
-	arr.Type = Types[TUINT8]
-	arr.Bound = BUCKETSIZE
-	field := make([]*Type, 0, 5)
-	field = append(field, makefield("topbits", arr))
-	arr = typ(TARRAY)
-	arr.Type = keytype
-	arr.Bound = BUCKETSIZE
-	field = append(field, makefield("keys", arr))
-	arr = typ(TARRAY)
-	arr.Type = valtype
-	arr.Bound = BUCKETSIZE
-	field = append(field, makefield("values", arr))
-
-	// Make sure the overflow pointer is the last memory in the struct,
-	// because the runtime assumes it can use size-ptrSize as the
-	// offset of the overflow pointer. We double-check that property
-	// below once the offsets and size are computed.
-	//
-	// BUCKETSIZE is 8, so the struct is aligned to 64 bits to this point.
-	// On 32-bit systems, the max alignment is 32-bit, and the
-	// overflow pointer will add another 32-bit field, and the struct
-	// will end with no padding.
-	// On 64-bit systems, the max alignment is 64-bit, and the
-	// overflow pointer will add another 64-bit field, and the struct
-	// will end with no padding.
-	// On nacl/amd64p32, however, the max alignment is 64-bit,
-	// but the overflow pointer will add only a 32-bit field,
-	// so if the struct needs 64-bit padding (because a key or value does)
-	// then it would end with an extra 32-bit padding field.
-	// Preempt that by emitting the padding here.
-	if int(t.Type.Align) > Widthptr || int(t.Down.Align) > Widthptr {
-		field = append(field, makefield("pad", Types[TUINTPTR]))
-	}
-
-	// If keys and values have no pointers, the map implementation
-	// can keep a list of overflow pointers on the side so that
-	// buckets can be marked as having no pointers.
-	// Arrange for the bucket to have no pointers by changing
-	// the type of the overflow field to uintptr in this case.
-	// See comment on hmap.overflow in ../../../../runtime/hashmap.go.
-	otyp := Ptrto(bucket)
-	if !haspointers(t.Type) && !haspointers(t.Down) && t.Type.Width <= MAXKEYSIZE && t.Down.Width <= MAXVALSIZE {
-		otyp = Types[TUINTPTR]
-	}
-	ovf := makefield("overflow", otyp)
-	field = append(field, ovf)
-
-	// link up fields
-	bucket.Noalg = 1
-	bucket.Local = t.Local
-	bucket.Type = field[0]
-	for n := int32(0); n < int32(len(field)-1); n++ {
-		field[n].Down = field[n+1]
-	}
-	field[len(field)-1].Down = nil
-	dowidth(bucket)
-
-	// Double-check that overflow field is final memory in struct,
-	// with no padding at end. See comment above.
-	if ovf.Width != bucket.Width-int64(Widthptr) {
-		Yyerror("bad math in mapbucket for %v", t)
-	}
-
-	t.Bucket = bucket
-
-	bucket.Map = t
-	return bucket
-}
-
-// Builds a type representing a Hmap structure for the given map type.
-// Make sure this stays in sync with ../../runtime/hashmap.go!
-func hmap(t *Type) *Type {
-	if t.Hmap != nil {
-		return t.Hmap
-	}
-
-	bucket := mapbucket(t)
-	var field [8]*Type
-	field[0] = makefield("count", Types[TINT])
-	field[1] = makefield("flags", Types[TUINT8])
-	field[2] = makefield("B", Types[TUINT8])
-	field[3] = makefield("hash0", Types[TUINT32])
-	field[4] = makefield("buckets", Ptrto(bucket))
-	field[5] = makefield("oldbuckets", Ptrto(bucket))
-	field[6] = makefield("nevacuate", Types[TUINTPTR])
-	field[7] = makefield("overflow", Types[TUNSAFEPTR])
-
-	h := typ(TSTRUCT)
-	h.Noalg = 1
-	h.Local = t.Local
-	h.Type = field[0]
-	for n := int32(0); n < int32(len(field)-1); n++ {
-		field[n].Down = field[n+1]
-	}
-	field[len(field)-1].Down = nil
-	dowidth(h)
-	t.Hmap = h
-	h.Map = t
-	return h
-}
-
-func hiter(t *Type) *Type {
-	if t.Hiter != nil {
-		return t.Hiter
-	}
-
-	// build a struct:
-	// hash_iter {
-	//    key *Key
-	//    val *Value
-	//    t *MapType
-	//    h *Hmap
-	//    buckets *Bucket
-	//    bptr *Bucket
-	//    overflow0 unsafe.Pointer
-	//    overflow1 unsafe.Pointer
-	//    startBucket uintptr
-	//    stuff uintptr
-	//    bucket uintptr
-	//    checkBucket uintptr
-	// }
-	// must match ../../runtime/hashmap.go:hash_iter.
-	var field [12]*Type
-	field[0] = makefield("key", Ptrto(t.Down))
-
-	field[1] = makefield("val", Ptrto(t.Type))
-	field[2] = makefield("t", Ptrto(Types[TUINT8]))
-	field[3] = makefield("h", Ptrto(hmap(t)))
-	field[4] = makefield("buckets", Ptrto(mapbucket(t)))
-	field[5] = makefield("bptr", Ptrto(mapbucket(t)))
-	field[6] = makefield("overflow0", Types[TUNSAFEPTR])
-	field[7] = makefield("overflow1", Types[TUNSAFEPTR])
-	field[8] = makefield("startBucket", Types[TUINTPTR])
-	field[9] = makefield("stuff", Types[TUINTPTR]) // offset+wrapped+B+I
-	field[10] = makefield("bucket", Types[TUINTPTR])
-	field[11] = makefield("checkBucket", Types[TUINTPTR])
-
-	// build iterator struct holding the above fields
-	i := typ(TSTRUCT)
-
-	i.Noalg = 1
-	i.Type = field[0]
-	for n := int32(0); n < int32(len(field)-1); n++ {
-		field[n].Down = field[n+1]
-	}
-	field[len(field)-1].Down = nil
-	dowidth(i)
-	if i.Width != int64(12*Widthptr) {
-		Yyerror("hash_iter size not correct %d %d", i.Width, 12*Widthptr)
-	}
-	t.Hiter = i
-	i.Map = t
-	return i
-}
-
-/*
- * f is method type, with receiver.
- * return function type, receiver as first argument (or not).
- */
-func methodfunc(f *Type, receiver *Type) *Type {
-	var in *NodeList
-	if receiver != nil {
-		d := Nod(ODCLFIELD, nil, nil)
-		d.Type = receiver
-		in = list(in, d)
-	}
-
-	var d *Node
-	for t := getinargx(f).Type; t != nil; t = t.Down {
-		d = Nod(ODCLFIELD, nil, nil)
-		d.Type = t.Type
-		d.Isddd = t.Isddd
-		in = list(in, d)
-	}
-
-	var out *NodeList
-	for t := getoutargx(f).Type; t != nil; t = t.Down {
-		d = Nod(ODCLFIELD, nil, nil)
-		d.Type = t.Type
-		out = list(out, d)
-	}
-
-	t := functype(nil, in, out)
-	if f.Nname != nil {
-		// Link to name of original method function.
-		t.Nname = f.Nname
-	}
-
-	return t
-}
-
-/*
- * return methods of non-interface type t, sorted by name.
- * generates stub functions as needed.
- */
-func methods(t *Type) *Sig {
-	// method type
-	mt := methtype(t, 0)
-
-	if mt == nil {
-		return nil
-	}
-	expandmeth(mt)
-
-	// type stored in interface word
-	it := t
-
-	if !isdirectiface(it) {
-		it = Ptrto(t)
-	}
-
-	// make list of methods for t,
-	// generating code if necessary.
-	var a *Sig
-
-	var this *Type
-	var b *Sig
-	var method *Sym
-	for f := mt.Xmethod; f != nil; f = f.Down {
-		if f.Etype != TFIELD {
-			Fatal("methods: not field %v", f)
-		}
-		if f.Type.Etype != TFUNC || f.Type.Thistuple == 0 {
-			Fatal("non-method on %v method %v %v\n", mt, f.Sym, f)
-		}
-		if getthisx(f.Type).Type == nil {
-			Fatal("receiver with no type on %v method %v %v\n", mt, f.Sym, f)
-		}
-		if f.Nointerface {
-			continue
-		}
-
-		method = f.Sym
-		if method == nil {
-			continue
-		}
-
-		// get receiver type for this particular method.
-		// if pointer receiver but non-pointer t and
-		// this is not an embedded pointer inside a struct,
-		// method does not apply.
-		this = getthisx(f.Type).Type.Type
-
-		if Isptr[this.Etype] && this.Type == t {
-			continue
-		}
-		if Isptr[this.Etype] && !Isptr[t.Etype] && f.Embedded != 2 && !isifacemethod(f.Type) {
-			continue
-		}
-
-		b = new(Sig)
-		b.link = a
-		a = b
-
-		a.name = method.Name
-		if !exportname(method.Name) {
-			if method.Pkg == nil {
-				Fatal("methods: missing package")
-			}
-			a.pkg = method.Pkg
-		}
-
-		a.isym = methodsym(method, it, 1)
-		a.tsym = methodsym(method, t, 0)
-		a.type_ = methodfunc(f.Type, t)
-		a.mtype = methodfunc(f.Type, nil)
-
-		if a.isym.Flags&SymSiggen == 0 {
-			a.isym.Flags |= SymSiggen
-			if !Eqtype(this, it) || this.Width < Types[Tptr].Width {
-				compiling_wrappers = 1
-				genwrapper(it, f, a.isym, 1)
-				compiling_wrappers = 0
-			}
-		}
-
-		if a.tsym.Flags&SymSiggen == 0 {
-			a.tsym.Flags |= SymSiggen
-			if !Eqtype(this, t) {
-				compiling_wrappers = 1
-				genwrapper(t, f, a.tsym, 0)
-				compiling_wrappers = 0
-			}
-		}
-	}
-
-	return lsort(a, sigcmp)
-}
-
-/*
- * return methods of interface type t, sorted by name.
- */
-func imethods(t *Type) *Sig {
-	var a *Sig
-	var method *Sym
-	var isym *Sym
-
-	var all *Sig
-	var last *Sig
-	for f := t.Type; f != nil; f = f.Down {
-		if f.Etype != TFIELD {
-			Fatal("imethods: not field")
-		}
-		if f.Type.Etype != TFUNC || f.Sym == nil {
-			continue
-		}
-		method = f.Sym
-		a = new(Sig)
-		a.name = method.Name
-		if !exportname(method.Name) {
-			if method.Pkg == nil {
-				Fatal("imethods: missing package")
-			}
-			a.pkg = method.Pkg
-		}
-
-		a.mtype = f.Type
-		a.offset = 0
-		a.type_ = methodfunc(f.Type, nil)
-
-		if last != nil && sigcmp(last, a) >= 0 {
-			Fatal("sigcmp vs sortinter %s %s", last.name, a.name)
-		}
-		if last == nil {
-			all = a
-		} else {
-			last.link = a
-		}
-		last = a
-
-		// Compiler can only refer to wrappers for non-blank methods.
-		if isblanksym(method) {
-			continue
-		}
-
-		// NOTE(rsc): Perhaps an oversight that
-		// IfaceType.Method is not in the reflect data.
-		// Generate the method body, so that compiled
-		// code can refer to it.
-		isym = methodsym(method, t, 0)
-
-		if isym.Flags&SymSiggen == 0 {
-			isym.Flags |= SymSiggen
-			genwrapper(t, f, isym, 0)
-		}
-	}
-
-	return all
-}
-
-var dimportpath_gopkg *Pkg
-
-func dimportpath(p *Pkg) {
-	if p.Pathsym != nil {
-		return
-	}
-
-	// If we are compiling the runtime package, there are two runtime packages around
-	// -- localpkg and Runtimepkg.  We don't want to produce import path symbols for
-	// both of them, so just produce one for localpkg.
-	if myimportpath == "runtime" && p == Runtimepkg {
-		return
-	}
-
-	if dimportpath_gopkg == nil {
-		dimportpath_gopkg = mkpkg("go")
-		dimportpath_gopkg.Name = "go"
-	}
-
-	nam := "importpath." + p.Prefix + "."
-
-	n := Nod(ONAME, nil, nil)
-	n.Sym = Pkglookup(nam, dimportpath_gopkg)
-
-	n.Class = PEXTERN
-	n.Xoffset = 0
-	p.Pathsym = n.Sym
-
-	if p == localpkg {
-		// Note: myimportpath != "", or else dgopkgpath won't call dimportpath.
-		gdatastring(n, myimportpath)
-	} else {
-		gdatastring(n, p.Path)
-	}
-	ggloblsym(n.Sym, int32(Types[TSTRING].Width), obj.DUPOK|obj.RODATA)
-}
-
-func dgopkgpath(s *Sym, ot int, pkg *Pkg) int {
-	if pkg == nil {
-		return dgostringptr(s, ot, "")
-	}
-
-	if pkg == localpkg && myimportpath == "" {
-		// If we don't know the full path of the package being compiled (i.e. -p
-		// was not passed on the compiler command line), emit reference to
-		// go.importpath.""., which 6l will rewrite using the correct import path.
-		// Every package that imports this one directly defines the symbol.
-		var ns *Sym
-
-		if ns == nil {
-			ns = Pkglookup("importpath.\"\".", mkpkg("go"))
-		}
-		return dsymptr(s, ot, ns, 0)
-	}
-
-	dimportpath(pkg)
-	return dsymptr(s, ot, pkg.Pathsym, 0)
-}
-
-/*
- * uncommonType
- * ../../runtime/type.go:/uncommonType
- */
-func dextratype(sym *Sym, off int, t *Type, ptroff int) int {
-	m := methods(t)
-	if t.Sym == nil && m == nil {
-		return off
-	}
-
-	// fill in *extraType pointer in header
-	off = int(Rnd(int64(off), int64(Widthptr)))
-
-	dsymptr(sym, ptroff, sym, off)
-
-	n := 0
-	for a := m; a != nil; a = a.link {
-		dtypesym(a.type_)
-		n++
-	}
-
-	ot := off
-	s := sym
-	if t.Sym != nil {
-		ot = dgostringptr(s, ot, t.Sym.Name)
-		if t != Types[t.Etype] && t != errortype {
-			ot = dgopkgpath(s, ot, t.Sym.Pkg)
-		} else {
-			ot = dgostringptr(s, ot, "")
-		}
-	} else {
-		ot = dgostringptr(s, ot, "")
-		ot = dgostringptr(s, ot, "")
-	}
-
-	// slice header
-	ot = dsymptr(s, ot, s, ot+Widthptr+2*Widthint)
-
-	ot = duintxx(s, ot, uint64(n), Widthint)
-	ot = duintxx(s, ot, uint64(n), Widthint)
-
-	// methods
-	for a := m; a != nil; a = a.link {
-		// method
-		// ../../runtime/type.go:/method
-		ot = dgostringptr(s, ot, a.name)
-
-		ot = dgopkgpath(s, ot, a.pkg)
-		ot = dsymptr(s, ot, dtypesym(a.mtype), 0)
-		ot = dsymptr(s, ot, dtypesym(a.type_), 0)
-		if a.isym != nil {
-			ot = dsymptr(s, ot, a.isym, 0)
-		} else {
-			ot = duintptr(s, ot, 0)
-		}
-		if a.tsym != nil {
-			ot = dsymptr(s, ot, a.tsym, 0)
-		} else {
-			ot = duintptr(s, ot, 0)
-		}
-	}
-
-	return ot
-}
-
-var kinds = []int{
-	TINT:        obj.KindInt,
-	TUINT:       obj.KindUint,
-	TINT8:       obj.KindInt8,
-	TUINT8:      obj.KindUint8,
-	TINT16:      obj.KindInt16,
-	TUINT16:     obj.KindUint16,
-	TINT32:      obj.KindInt32,
-	TUINT32:     obj.KindUint32,
-	TINT64:      obj.KindInt64,
-	TUINT64:     obj.KindUint64,
-	TUINTPTR:    obj.KindUintptr,
-	TFLOAT32:    obj.KindFloat32,
-	TFLOAT64:    obj.KindFloat64,
-	TBOOL:       obj.KindBool,
-	TSTRING:     obj.KindString,
-	TPTR32:      obj.KindPtr,
-	TPTR64:      obj.KindPtr,
-	TSTRUCT:     obj.KindStruct,
-	TINTER:      obj.KindInterface,
-	TCHAN:       obj.KindChan,
-	TMAP:        obj.KindMap,
-	TARRAY:      obj.KindArray,
-	TFUNC:       obj.KindFunc,
-	TCOMPLEX64:  obj.KindComplex64,
-	TCOMPLEX128: obj.KindComplex128,
-	TUNSAFEPTR:  obj.KindUnsafePointer,
-}
-
-func haspointers(t *Type) bool {
-	if t.Haspointers != 0 {
-		return t.Haspointers-1 != 0
-	}
-
-	var ret bool
-	switch t.Etype {
-	case TINT,
-		TUINT,
-		TINT8,
-		TUINT8,
-		TINT16,
-		TUINT16,
-		TINT32,
-		TUINT32,
-		TINT64,
-		TUINT64,
-		TUINTPTR,
-		TFLOAT32,
-		TFLOAT64,
-		TCOMPLEX64,
-		TCOMPLEX128,
-		TBOOL:
-		ret = false
-
-	case TARRAY:
-		if t.Bound < 0 { // slice
-			ret = true
-			break
-		}
-
-		if t.Bound == 0 { // empty array
-			ret = false
-			break
-		}
-
-		ret = haspointers(t.Type)
-
-	case TSTRUCT:
-		ret = false
-		for t1 := t.Type; t1 != nil; t1 = t1.Down {
-			if haspointers(t1.Type) {
-				ret = true
-				break
-			}
-		}
-
-	case TSTRING,
-		TPTR32,
-		TPTR64,
-		TUNSAFEPTR,
-		TINTER,
-		TCHAN,
-		TMAP,
-		TFUNC:
-		fallthrough
-	default:
-		ret = true
-
-	case TFIELD:
-		Fatal("haspointers: unexpected type, %v", t)
-	}
-
-	t.Haspointers = 1 + uint8(obj.Bool2int(ret))
-	return ret
-}
-
-// typeptrdata returns the length in bytes of the prefix of t
-// containing pointer data. Anything after this offset is scalar data.
-func typeptrdata(t *Type) int64 {
-	if !haspointers(t) {
-		return 0
-	}
-
-	switch t.Etype {
-	case TPTR32,
-		TPTR64,
-		TUNSAFEPTR,
-		TFUNC,
-		TCHAN,
-		TMAP:
-		return int64(Widthptr)
-
-	case TSTRING:
-		// struct { byte *str; intgo len; }
-		return int64(Widthptr)
-
-	case TINTER:
-		// struct { Itab *tab;	void *data; } or
-		// struct { Type *type; void *data; }
-		return 2 * int64(Widthptr)
-
-	case TARRAY:
-		if Isslice(t) {
-			// struct { byte *array; uintgo len; uintgo cap; }
-			return int64(Widthptr)
-		}
-		// haspointers already eliminated t.Bound == 0.
-		return (t.Bound-1)*t.Type.Width + typeptrdata(t.Type)
-
-	case TSTRUCT:
-		// Find the last field that has pointers.
-		var lastPtrField *Type
-		for t1 := t.Type; t1 != nil; t1 = t1.Down {
-			if haspointers(t1.Type) {
-				lastPtrField = t1
-			}
-		}
-		return lastPtrField.Width + typeptrdata(lastPtrField.Type)
-
-	default:
-		Fatal("typeptrdata: unexpected type, %v", t)
-		return 0
-	}
-}
-
-/*
- * commonType
- * ../../runtime/type.go:/commonType
- */
-
-var dcommontype_algarray *Sym
-
-func dcommontype(s *Sym, ot int, t *Type) int {
-	if ot != 0 {
-		Fatal("dcommontype %d", ot)
-	}
-
-	sizeofAlg := 2 * Widthptr
-	if dcommontype_algarray == nil {
-		dcommontype_algarray = Pkglookup("algarray", Runtimepkg)
-	}
-	dowidth(t)
-	alg := algtype(t)
-	var algsym *Sym
-	if alg < 0 || alg == AMEM {
-		algsym = dalgsym(t)
-	}
-
-	var sptr *Sym
-	tptr := Ptrto(t)
-	if !Isptr[t.Etype] && (t.Sym != nil || methods(tptr) != nil) {
-		sptr = dtypesym(tptr)
-	} else {
-		sptr = weaktypesym(tptr)
-	}
-
-	// All (non-reflect-allocated) Types share the same zero object.
-	// Each place in the compiler where a pointer to the zero object
-	// might be returned by a runtime call (map access return value,
-	// 2-arg type cast) declares the size of the zerovalue it needs.
-	// The linker magically takes the max of all the sizes.
-	zero := Pkglookup("zerovalue", Runtimepkg)
-
-	gcsym, useGCProg, ptrdata := dgcsym(t)
-
-	// We use size 0 here so we get the pointer to the zero value,
-	// but don't allocate space for the zero value unless we need it.
-	// TODO: how do we get this symbol into bss?  We really want
-	// a read-only bss, but I don't think such a thing exists.
-
-	// ../../pkg/reflect/type.go:/^type.commonType
-	// actual type structure
-	//	type commonType struct {
-	//		size          uintptr
-	//		ptrsize       uintptr
-	//		hash          uint32
-	//		_             uint8
-	//		align         uint8
-	//		fieldAlign    uint8
-	//		kind          uint8
-	//		alg           unsafe.Pointer
-	//		gcdata        unsafe.Pointer
-	//		string        *string
-	//		*extraType
-	//		ptrToThis     *Type
-	//		zero          unsafe.Pointer
-	//	}
-	ot = duintptr(s, ot, uint64(t.Width))
-	ot = duintptr(s, ot, uint64(ptrdata))
-
-	ot = duint32(s, ot, typehash(t))
-	ot = duint8(s, ot, 0) // unused
-
-	// runtime (and common sense) expects alignment to be a power of two.
-	i := int(t.Align)
-
-	if i == 0 {
-		i = 1
-	}
-	if i&(i-1) != 0 {
-		Fatal("invalid alignment %d for %v", t.Align, t)
-	}
-	ot = duint8(s, ot, t.Align) // align
-	ot = duint8(s, ot, t.Align) // fieldAlign
-
-	i = kinds[t.Etype]
-	if t.Etype == TARRAY && t.Bound < 0 {
-		i = obj.KindSlice
-	}
-	if !haspointers(t) {
-		i |= obj.KindNoPointers
-	}
-	if isdirectiface(t) {
-		i |= obj.KindDirectIface
-	}
-	if useGCProg {
-		i |= obj.KindGCProg
-	}
-	ot = duint8(s, ot, uint8(i)) // kind
-	if algsym == nil {
-		ot = dsymptr(s, ot, dcommontype_algarray, alg*sizeofAlg)
-	} else {
-		ot = dsymptr(s, ot, algsym, 0)
-	}
-	ot = dsymptr(s, ot, gcsym, 0)
-
-	p := Tconv(t, obj.FmtLeft|obj.FmtUnsigned)
-
-	//print("dcommontype: %s\n", p);
-	ot = dgostringptr(s, ot, p) // string
-
-	// skip pointer to extraType,
-	// which follows the rest of this type structure.
-	// caller will fill in if needed.
-	// otherwise linker will assume 0.
-	ot += Widthptr
-
-	ot = dsymptr(s, ot, sptr, 0) // ptrto type
-	ot = dsymptr(s, ot, zero, 0) // ptr to zero value
-	return ot
-}
-
-func typesym(t *Type) *Sym {
-	return Pkglookup(Tconv(t, obj.FmtLeft), typepkg)
-}
-
-func tracksym(t *Type) *Sym {
-	return Pkglookup(Tconv(t.Outer, obj.FmtLeft)+"."+t.Sym.Name, trackpkg)
-}
-
-func typelinksym(t *Type) *Sym {
-	// %-uT is what the generated Type's string field says.
-	// It uses (ambiguous) package names instead of import paths.
-	// %-T is the complete, unambiguous type name.
-	// We want the types to end up sorted by string field,
-	// so use that first in the name, and then add :%-T to
-	// disambiguate. We use a tab character as the separator to
-	// ensure the types appear sorted by their string field. The
-	// names are a little long but they are discarded by the linker
-	// and do not end up in the symbol table of the final binary.
-	p := Tconv(t, obj.FmtLeft|obj.FmtUnsigned) + "\t" + Tconv(t, obj.FmtLeft)
-
-	s := Pkglookup(p, typelinkpkg)
-
-	//print("typelinksym: %s -> %+S\n", p, s);
-
-	return s
-}
-
-func typesymprefix(prefix string, t *Type) *Sym {
-	p := prefix + "." + Tconv(t, obj.FmtLeft)
-	s := Pkglookup(p, typepkg)
-
-	//print("algsym: %s -> %+S\n", p, s);
-
-	return s
-}
-
-func typenamesym(t *Type) *Sym {
-	if t == nil || (Isptr[t.Etype] && t.Type == nil) || isideal(t) {
-		Fatal("typename %v", t)
-	}
-	s := typesym(t)
-	if s.Def == nil {
-		n := Nod(ONAME, nil, nil)
-		n.Sym = s
-		n.Type = Types[TUINT8]
-		n.Addable = true
-		n.Ullman = 1
-		n.Class = PEXTERN
-		n.Xoffset = 0
-		n.Typecheck = 1
-		s.Def = n
-
-		signatlist = list(signatlist, typenod(t))
-	}
-
-	return s.Def.Sym
-}
-
-func typename(t *Type) *Node {
-	s := typenamesym(t)
-	n := Nod(OADDR, s.Def, nil)
-	n.Type = Ptrto(s.Def.Type)
-	n.Addable = true
-	n.Ullman = 2
-	n.Typecheck = 1
-	return n
-}
-
-func weaktypesym(t *Type) *Sym {
-	p := Tconv(t, obj.FmtLeft)
-	s := Pkglookup(p, weaktypepkg)
-
-	//print("weaktypesym: %s -> %+S\n", p, s);
-
-	return s
-}
-
-/*
- * Returns 1 if t has a reflexive equality operator.
- * That is, if x==x for all x of type t.
- */
-func isreflexive(t *Type) bool {
-	switch t.Etype {
-	case TBOOL,
-		TINT,
-		TUINT,
-		TINT8,
-		TUINT8,
-		TINT16,
-		TUINT16,
-		TINT32,
-		TUINT32,
-		TINT64,
-		TUINT64,
-		TUINTPTR,
-		TPTR32,
-		TPTR64,
-		TUNSAFEPTR,
-		TSTRING,
-		TCHAN:
-		return true
-
-	case TFLOAT32,
-		TFLOAT64,
-		TCOMPLEX64,
-		TCOMPLEX128,
-		TINTER:
-		return false
-
-	case TARRAY:
-		if Isslice(t) {
-			Fatal("slice can't be a map key: %v", t)
-		}
-		return isreflexive(t.Type)
-
-	case TSTRUCT:
-		for t1 := t.Type; t1 != nil; t1 = t1.Down {
-			if !isreflexive(t1.Type) {
-				return false
-			}
-		}
-
-		return true
-
-	default:
-		Fatal("bad type for map key: %v", t)
-		return false
-	}
-}
-
-func dtypesym(t *Type) *Sym {
-	// Replace byte, rune aliases with real type.
-	// They've been separate internally to make error messages
-	// better, but we have to merge them in the reflect tables.
-	if t == bytetype || t == runetype {
-		t = Types[t.Etype]
-	}
-
-	if isideal(t) {
-		Fatal("dtypesym %v", t)
-	}
-
-	s := typesym(t)
-	if s.Flags&SymSiggen != 0 {
-		return s
-	}
-	s.Flags |= SymSiggen
-
-	// special case (look for runtime below):
-	// when compiling package runtime,
-	// emit the type structures for int, float, etc.
-	tbase := t
-
-	if Isptr[t.Etype] && t.Sym == nil && t.Type.Sym != nil {
-		tbase = t.Type
-	}
-	dupok := 0
-	if tbase.Sym == nil {
-		dupok = obj.DUPOK
-	}
-
-	if compiling_runtime != 0 && (tbase == Types[tbase.Etype] || tbase == bytetype || tbase == runetype || tbase == errortype) { // int, float, etc
-		goto ok
-	}
-
-	// named types from other files are defined only by those files
-	if tbase.Sym != nil && !tbase.Local {
-		return s
-	}
-	if isforw[tbase.Etype] {
-		return s
-	}
-
-ok:
-	ot := 0
-	xt := 0
-	switch t.Etype {
-	default:
-		ot = dcommontype(s, ot, t)
-		xt = ot - 3*Widthptr
-
-	case TARRAY:
-		if t.Bound >= 0 {
-			// ../../runtime/type.go:/ArrayType
-			s1 := dtypesym(t.Type)
-
-			t2 := typ(TARRAY)
-			t2.Type = t.Type
-			t2.Bound = -1 // slice
-			s2 := dtypesym(t2)
-			ot = dcommontype(s, ot, t)
-			xt = ot - 3*Widthptr
-			ot = dsymptr(s, ot, s1, 0)
-			ot = dsymptr(s, ot, s2, 0)
-			ot = duintptr(s, ot, uint64(t.Bound))
-		} else {
-			// ../../runtime/type.go:/SliceType
-			s1 := dtypesym(t.Type)
-
-			ot = dcommontype(s, ot, t)
-			xt = ot - 3*Widthptr
-			ot = dsymptr(s, ot, s1, 0)
-		}
-
-		// ../../runtime/type.go:/ChanType
-	case TCHAN:
-		s1 := dtypesym(t.Type)
-
-		ot = dcommontype(s, ot, t)
-		xt = ot - 3*Widthptr
-		ot = dsymptr(s, ot, s1, 0)
-		ot = duintptr(s, ot, uint64(t.Chan))
-
-	case TFUNC:
-		for t1 := getthisx(t).Type; t1 != nil; t1 = t1.Down {
-			dtypesym(t1.Type)
-		}
-		isddd := false
-		for t1 := getinargx(t).Type; t1 != nil; t1 = t1.Down {
-			isddd = t1.Isddd
-			dtypesym(t1.Type)
-		}
-
-		for t1 := getoutargx(t).Type; t1 != nil; t1 = t1.Down {
-			dtypesym(t1.Type)
-		}
-
-		ot = dcommontype(s, ot, t)
-		xt = ot - 3*Widthptr
-		ot = duint8(s, ot, uint8(obj.Bool2int(isddd)))
-
-		// two slice headers: in and out.
-		ot = int(Rnd(int64(ot), int64(Widthptr)))
-
-		ot = dsymptr(s, ot, s, ot+2*(Widthptr+2*Widthint))
-		n := t.Thistuple + t.Intuple
-		ot = duintxx(s, ot, uint64(n), Widthint)
-		ot = duintxx(s, ot, uint64(n), Widthint)
-		ot = dsymptr(s, ot, s, ot+1*(Widthptr+2*Widthint)+n*Widthptr)
-		ot = duintxx(s, ot, uint64(t.Outtuple), Widthint)
-		ot = duintxx(s, ot, uint64(t.Outtuple), Widthint)
-
-		// slice data
-		for t1 := getthisx(t).Type; t1 != nil; t1 = t1.Down {
-			ot = dsymptr(s, ot, dtypesym(t1.Type), 0)
-			n++
-		}
-		for t1 := getinargx(t).Type; t1 != nil; t1 = t1.Down {
-			ot = dsymptr(s, ot, dtypesym(t1.Type), 0)
-			n++
-		}
-		for t1 := getoutargx(t).Type; t1 != nil; t1 = t1.Down {
-			ot = dsymptr(s, ot, dtypesym(t1.Type), 0)
-			n++
-		}
-
-	case TINTER:
-		m := imethods(t)
-		n := 0
-		for a := m; a != nil; a = a.link {
-			dtypesym(a.type_)
-			n++
-		}
-
-		// ../../runtime/type.go:/InterfaceType
-		ot = dcommontype(s, ot, t)
-
-		xt = ot - 3*Widthptr
-		ot = dsymptr(s, ot, s, ot+Widthptr+2*Widthint)
-		ot = duintxx(s, ot, uint64(n), Widthint)
-		ot = duintxx(s, ot, uint64(n), Widthint)
-		for a := m; a != nil; a = a.link {
-			// ../../runtime/type.go:/imethod
-			ot = dgostringptr(s, ot, a.name)
-
-			ot = dgopkgpath(s, ot, a.pkg)
-			ot = dsymptr(s, ot, dtypesym(a.type_), 0)
-		}
-
-		// ../../runtime/type.go:/MapType
-	case TMAP:
-		s1 := dtypesym(t.Down)
-
-		s2 := dtypesym(t.Type)
-		s3 := dtypesym(mapbucket(t))
-		s4 := dtypesym(hmap(t))
-		ot = dcommontype(s, ot, t)
-		xt = ot - 3*Widthptr
-		ot = dsymptr(s, ot, s1, 0)
-		ot = dsymptr(s, ot, s2, 0)
-		ot = dsymptr(s, ot, s3, 0)
-		ot = dsymptr(s, ot, s4, 0)
-		if t.Down.Width > MAXKEYSIZE {
-			ot = duint8(s, ot, uint8(Widthptr))
-			ot = duint8(s, ot, 1) // indirect
-		} else {
-			ot = duint8(s, ot, uint8(t.Down.Width))
-			ot = duint8(s, ot, 0) // not indirect
-		}
-
-		if t.Type.Width > MAXVALSIZE {
-			ot = duint8(s, ot, uint8(Widthptr))
-			ot = duint8(s, ot, 1) // indirect
-		} else {
-			ot = duint8(s, ot, uint8(t.Type.Width))
-			ot = duint8(s, ot, 0) // not indirect
-		}
-
-		ot = duint16(s, ot, uint16(mapbucket(t).Width))
-		ot = duint8(s, ot, uint8(obj.Bool2int(isreflexive(t.Down))))
-
-	case TPTR32, TPTR64:
-		if t.Type.Etype == TANY {
-			// ../../runtime/type.go:/UnsafePointerType
-			ot = dcommontype(s, ot, t)
-
-			break
-		}
-
-		// ../../runtime/type.go:/PtrType
-		s1 := dtypesym(t.Type)
-
-		ot = dcommontype(s, ot, t)
-		xt = ot - 3*Widthptr
-		ot = dsymptr(s, ot, s1, 0)
-
-		// ../../runtime/type.go:/StructType
-	// for security, only the exported fields.
-	case TSTRUCT:
-		n := 0
-
-		for t1 := t.Type; t1 != nil; t1 = t1.Down {
-			dtypesym(t1.Type)
-			n++
-		}
-
-		ot = dcommontype(s, ot, t)
-		xt = ot - 3*Widthptr
-		ot = dsymptr(s, ot, s, ot+Widthptr+2*Widthint)
-		ot = duintxx(s, ot, uint64(n), Widthint)
-		ot = duintxx(s, ot, uint64(n), Widthint)
-		for t1 := t.Type; t1 != nil; t1 = t1.Down {
-			// ../../runtime/type.go:/structField
-			if t1.Sym != nil && t1.Embedded == 0 {
-				ot = dgostringptr(s, ot, t1.Sym.Name)
-				if exportname(t1.Sym.Name) {
-					ot = dgostringptr(s, ot, "")
-				} else {
-					ot = dgopkgpath(s, ot, t1.Sym.Pkg)
-				}
-			} else {
-				ot = dgostringptr(s, ot, "")
-				if t1.Type.Sym != nil && t1.Type.Sym.Pkg == builtinpkg {
-					ot = dgopkgpath(s, ot, localpkg)
-				} else {
-					ot = dgostringptr(s, ot, "")
-				}
-			}
-
-			ot = dsymptr(s, ot, dtypesym(t1.Type), 0)
-			ot = dgostrlitptr(s, ot, t1.Note)
-			ot = duintptr(s, ot, uint64(t1.Width)) // field offset
-		}
-	}
-
-	ot = dextratype(s, ot, t, xt)
-	ggloblsym(s, int32(ot), int16(dupok|obj.RODATA))
-
-	// generate typelink.foo pointing at s = type.foo.
-	// The linker will leave a table of all the typelinks for
-	// types in the binary, so reflect can find them.
-	// We only need the link for unnamed composites that
-	// we want be able to find.
-	if t.Sym == nil {
-		switch t.Etype {
-		case TPTR32, TPTR64:
-			// The ptrto field of the type data cannot be relied on when
-			// dynamic linking: a type T may be defined in a module that makes
-			// no use of pointers to that type, but another module can contain
-			// a package that imports the first one and does use *T pointers.
-			// The second module will end up defining type data for *T and a
-			// type.*T symbol pointing at it. It's important that calling
-			// .PtrTo() on the reflect.Type for T returns this type data and
-			// not some synthesized object, so we need reflect to be able to
-			// find it!
-			if !Ctxt.Flag_dynlink {
-				break
-			}
-			fallthrough
-		case TARRAY, TCHAN, TFUNC, TMAP:
-			slink := typelinksym(t)
-			dsymptr(slink, 0, s, 0)
-			ggloblsym(slink, int32(Widthptr), int16(dupok|obj.RODATA))
-		}
-	}
-
-	return s
-}
-
-func dumptypestructs() {
-	var n *Node
-
-	// copy types from externdcl list to signatlist
-	for l := externdcl; l != nil; l = l.Next {
-		n = l.N
-		if n.Op != OTYPE {
-			continue
-		}
-		signatlist = list(signatlist, n)
-	}
-
-	// process signatlist
-	var t *Type
-	for l := signatlist; l != nil; l = l.Next {
-		n = l.N
-		if n.Op != OTYPE {
-			continue
-		}
-		t = n.Type
-		dtypesym(t)
-		if t.Sym != nil {
-			dtypesym(Ptrto(t))
-		}
-	}
-
-	// generate import strings for imported packages
-	for _, p := range pkgs {
-		if p.Direct != 0 {
-			dimportpath(p)
-		}
-	}
-
-	// do basic types if compiling package runtime.
-	// they have to be in at least one package,
-	// and runtime is always loaded implicitly,
-	// so this is as good as any.
-	// another possible choice would be package main,
-	// but using runtime means fewer copies in .6 files.
-	if compiling_runtime != 0 {
-		for i := 1; i <= TBOOL; i++ {
-			dtypesym(Ptrto(Types[i]))
-		}
-		dtypesym(Ptrto(Types[TSTRING]))
-		dtypesym(Ptrto(Types[TUNSAFEPTR]))
-
-		// emit type structs for error and func(error) string.
-		// The latter is the type of an auto-generated wrapper.
-		dtypesym(Ptrto(errortype))
-
-		dtypesym(functype(nil, list1(Nod(ODCLFIELD, nil, typenod(errortype))), list1(Nod(ODCLFIELD, nil, typenod(Types[TSTRING])))))
-
-		// add paths for runtime and main, which 6l imports implicitly.
-		dimportpath(Runtimepkg)
-
-		if flag_race != 0 {
-			dimportpath(racepkg)
-		}
-		dimportpath(mkpkg("main"))
-	}
-}
-
-func dalgsym(t *Type) *Sym {
-	var s *Sym
-	var hashfunc *Sym
-	var eqfunc *Sym
-
-	// dalgsym is only called for a type that needs an algorithm table,
-	// which implies that the type is comparable (or else it would use ANOEQ).
-
-	if algtype(t) == AMEM {
-		// we use one algorithm table for all AMEM types of a given size
-		p := fmt.Sprintf(".alg%d", t.Width)
-
-		s = Pkglookup(p, typepkg)
-
-		if s.Flags&SymAlgGen != 0 {
-			return s
-		}
-		s.Flags |= SymAlgGen
-
-		// make hash closure
-		p = fmt.Sprintf(".hashfunc%d", t.Width)
-
-		hashfunc = Pkglookup(p, typepkg)
-
-		ot := 0
-		ot = dsymptr(hashfunc, ot, Pkglookup("memhash_varlen", Runtimepkg), 0)
-		ot = duintxx(hashfunc, ot, uint64(t.Width), Widthptr) // size encoded in closure
-		ggloblsym(hashfunc, int32(ot), obj.DUPOK|obj.RODATA)
-
-		// make equality closure
-		p = fmt.Sprintf(".eqfunc%d", t.Width)
-
-		eqfunc = Pkglookup(p, typepkg)
-
-		ot = 0
-		ot = dsymptr(eqfunc, ot, Pkglookup("memequal_varlen", Runtimepkg), 0)
-		ot = duintxx(eqfunc, ot, uint64(t.Width), Widthptr)
-		ggloblsym(eqfunc, int32(ot), obj.DUPOK|obj.RODATA)
-	} else {
-		// generate an alg table specific to this type
-		s = typesymprefix(".alg", t)
-
-		hash := typesymprefix(".hash", t)
-		eq := typesymprefix(".eq", t)
-		hashfunc = typesymprefix(".hashfunc", t)
-		eqfunc = typesymprefix(".eqfunc", t)
-
-		genhash(hash, t)
-		geneq(eq, t)
-
-		// make Go funcs (closures) for calling hash and equal from Go
-		dsymptr(hashfunc, 0, hash, 0)
-
-		ggloblsym(hashfunc, int32(Widthptr), obj.DUPOK|obj.RODATA)
-		dsymptr(eqfunc, 0, eq, 0)
-		ggloblsym(eqfunc, int32(Widthptr), obj.DUPOK|obj.RODATA)
-	}
-
-	// ../../runtime/alg.go:/typeAlg
-	ot := 0
-
-	ot = dsymptr(s, ot, hashfunc, 0)
-	ot = dsymptr(s, ot, eqfunc, 0)
-	ggloblsym(s, int32(ot), obj.DUPOK|obj.RODATA)
-	return s
-}
-
-// maxPtrmaskBytes is the maximum length of a GC ptrmask bitmap,
-// which holds 1-bit entries describing where pointers are in a given type.
-// 16 bytes is enough to describe 128 pointer-sized words, 512 or 1024 bytes
-// depending on the system. Above this length, the GC information is
-// recorded as a GC program, which can express repetition compactly.
-// In either form, the information is used by the runtime to initialize the
-// heap bitmap, and for large types (like 128 or more words), they are
-// roughly the same speed. GC programs are never much larger and often
-// more compact. (If large arrays are involved, they can be arbitrarily more
-// compact.)
-//
-// The cutoff must be large enough that any allocation large enough to
-// use a GC program is large enough that it does not share heap bitmap
-// bytes with any other objects, allowing the GC program execution to
-// assume an aligned start and not use atomic operations. In the current
-// runtime, this means all malloc size classes larger than the cutoff must
-// be multiples of four words. On 32-bit systems that's 16 bytes, and
-// all size classes >= 16 bytes are 16-byte aligned, so no real constraint.
-// On 64-bit systems, that's 32 bytes, and 32-byte alignment is guaranteed
-// for size classes >= 256 bytes. On a 64-bit sytem, 256 bytes allocated
-// is 32 pointers, the bits for which fit in 4 bytes. So maxPtrmaskBytes
-// must be >= 4.
-//
-// We used to use 16 because the GC programs do have some constant overhead
-// to get started, and processing 128 pointers seems to be enough to
-// amortize that overhead well.
-//
-// To make sure that the runtime's chansend can call typeBitsBulkBarrier,
-// we raised the limit to 2048, so that even 32-bit systems are guaranteed to
-// use bitmaps for objects up to 64 kB in size.
-//
-// Also known to reflect/type.go.
-//
-const maxPtrmaskBytes = 2048
-
-// dgcsym emits and returns a data symbol containing GC information for type t,
-// along with a boolean reporting whether the UseGCProg bit should be set in
-// the type kind, and the ptrdata field to record in the reflect type information.
-func dgcsym(t *Type) (sym *Sym, useGCProg bool, ptrdata int64) {
-	ptrdata = typeptrdata(t)
-	if ptrdata/int64(Widthptr) <= maxPtrmaskBytes*8 {
-		sym = dgcptrmask(t)
-		return
-	}
-
-	useGCProg = true
-	sym, ptrdata = dgcprog(t)
-	return
-}
-
-// dgcptrmask emits and returns the symbol containing a pointer mask for type t.
-func dgcptrmask(t *Type) *Sym {
-	ptrmask := make([]byte, (typeptrdata(t)/int64(Widthptr)+7)/8)
-	fillptrmask(t, ptrmask)
-	p := fmt.Sprintf("gcbits.%x", ptrmask)
-
-	sym := Pkglookup(p, Runtimepkg)
-	if sym.Flags&SymUniq == 0 {
-		sym.Flags |= SymUniq
-		for i, x := range ptrmask {
-			duint8(sym, i, x)
-		}
-		ggloblsym(sym, int32(len(ptrmask)), obj.DUPOK|obj.RODATA|obj.LOCAL)
-	}
-	return sym
-}
-
-// fillptrmask fills in ptrmask with 1s corresponding to the
-// word offsets in t that hold pointers.
-// ptrmask is assumed to fit at least typeptrdata(t)/Widthptr bits.
-func fillptrmask(t *Type, ptrmask []byte) {
-	for i := range ptrmask {
-		ptrmask[i] = 0
-	}
-	if !haspointers(t) {
-		return
-	}
-
-	vec := bvalloc(8 * int32(len(ptrmask)))
-	xoffset := int64(0)
-	onebitwalktype1(t, &xoffset, vec)
-
-	nptr := typeptrdata(t) / int64(Widthptr)
-	for i := int64(0); i < nptr; i++ {
-		if bvget(vec, int32(i)) == 1 {
-			ptrmask[i/8] |= 1 << (uint(i) % 8)
-		}
-	}
-}
-
-// dgcprog emits and returns the symbol containing a GC program for type t
-// along with the size of the data described by the program (in the range [typeptrdata(t), t.Width]).
-// In practice, the size is typeptrdata(t) except for non-trivial arrays.
-// For non-trivial arrays, the program describes the full t.Width size.
-func dgcprog(t *Type) (*Sym, int64) {
-	dowidth(t)
-	if t.Width == BADWIDTH {
-		Fatal("dgcprog: %v badwidth", t)
-	}
-	sym := typesymprefix(".gcprog", t)
-	var p GCProg
-	p.init(sym)
-	p.emit(t, 0)
-	offset := p.w.BitIndex() * int64(Widthptr)
-	p.end()
-	if ptrdata := typeptrdata(t); offset < ptrdata || offset > t.Width {
-		Fatal("dgcprog: %v: offset=%d but ptrdata=%d size=%d", t, offset, ptrdata, t.Width)
-	}
-	return sym, offset
-}
-
-type GCProg struct {
-	sym    *Sym
-	symoff int
-	w      gcprog.Writer
-}
-
-var Debug_gcprog int // set by -d gcprog
-
-func (p *GCProg) init(sym *Sym) {
-	p.sym = sym
-	p.symoff = 4 // first 4 bytes hold program length
-	p.w.Init(p.writeByte)
-	if Debug_gcprog > 0 {
-		fmt.Fprintf(os.Stderr, "compile: start GCProg for %v\n", sym)
-		p.w.Debug(os.Stderr)
-	}
-}
-
-func (p *GCProg) writeByte(x byte) {
-	p.symoff = duint8(p.sym, p.symoff, x)
-}
-
-func (p *GCProg) end() {
-	p.w.End()
-	duint32(p.sym, 0, uint32(p.symoff-4))
-	ggloblsym(p.sym, int32(p.symoff), obj.DUPOK|obj.RODATA|obj.LOCAL)
-	if Debug_gcprog > 0 {
-		fmt.Fprintf(os.Stderr, "compile: end GCProg for %v\n", p.sym)
-	}
-}
-
-func (p *GCProg) emit(t *Type, offset int64) {
-	dowidth(t)
-	if !haspointers(t) {
-		return
-	}
-	if t.Width == int64(Widthptr) {
-		p.w.Ptr(offset / int64(Widthptr))
-		return
-	}
-	switch t.Etype {
-	default:
-		Fatal("GCProg.emit: unexpected type %v", t)
-
-	case TSTRING:
-		p.w.Ptr(offset / int64(Widthptr))
-
-	case TINTER:
-		p.w.Ptr(offset / int64(Widthptr))
-		p.w.Ptr(offset/int64(Widthptr) + 1)
-
-	case TARRAY:
-		if Isslice(t) {
-			p.w.Ptr(offset / int64(Widthptr))
-			return
-		}
-		if t.Bound == 0 {
-			// should have been handled by haspointers check above
-			Fatal("GCProg.emit: empty array")
-		}
-
-		// Flatten array-of-array-of-array to just a big array by multiplying counts.
-		count := t.Bound
-		elem := t.Type
-		for Isfixedarray(elem) {
-			count *= elem.Bound
-			elem = elem.Type
-		}
-
-		if !p.w.ShouldRepeat(elem.Width/int64(Widthptr), count) {
-			// Cheaper to just emit the bits.
-			for i := int64(0); i < count; i++ {
-				p.emit(elem, offset+i*elem.Width)
-			}
-			return
-		}
-		p.emit(elem, offset)
-		p.w.ZeroUntil((offset + elem.Width) / int64(Widthptr))
-		p.w.Repeat(elem.Width/int64(Widthptr), count-1)
-
-	case TSTRUCT:
-		for t1 := t.Type; t1 != nil; t1 = t1.Down {
-			p.emit(t1.Type, offset+t1.Width)
-		}
-	}
-}
diff --git a/src/cmd/compile/internal/gc/reg.go b/src/cmd/compile/internal/gc/reg.go
deleted file mode 100644
index 0fa0535..0000000
--- a/src/cmd/compile/internal/gc/reg.go
+++ /dev/null
@@ -1,1559 +0,0 @@
-// Derived from Inferno utils/6c/reg.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6c/reg.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package gc
-
-import (
-	"bytes"
-	"cmd/internal/obj"
-	"fmt"
-	"sort"
-	"strings"
-)
-
-// A Var represents a single variable that may be stored in a register.
-// That variable may itself correspond to a hardware register,
-// to represent the use of registers in the unoptimized instruction stream.
-type Var struct {
-	offset     int64
-	node       *Node
-	nextinnode *Var
-	width      int
-	id         int // index in vars
-	name       int8
-	etype      int8
-	addr       int8
-}
-
-// Bits represents a set of Vars, stored as a bit set of var numbers
-// (the index in vars, or equivalently v.id).
-type Bits struct {
-	b [BITS]uint64
-}
-
-const (
-	BITS = 3
-	NVAR = BITS * 64
-)
-
-var (
-	vars [NVAR]Var // variables under consideration
-	nvar int       // number of vars
-
-	regbits uint64 // bits for hardware registers
-
-	zbits   Bits // zero
-	externs Bits // global variables
-	params  Bits // function parameters and results
-	ivar    Bits // function parameters (inputs)
-	ovar    Bits // function results (outputs)
-	consts  Bits // constant values
-	addrs   Bits // variables with address taken
-)
-
-// A Reg is a wrapper around a single Prog (one instruction) that holds
-// register optimization information while the optimizer runs.
-// r->prog is the instruction.
-type Reg struct {
-	set  Bits // regopt variables written by this instruction.
-	use1 Bits // regopt variables read by prog->from.
-	use2 Bits // regopt variables read by prog->to.
-
-	// refahead/refbehind are the regopt variables whose current
-	// value may be used in the following/preceding instructions
-	// up to a CALL (or the value is clobbered).
-	refbehind Bits
-	refahead  Bits
-
-	// calahead/calbehind are similar, but for variables in
-	// instructions that are reachable after hitting at least one
-	// CALL.
-	calbehind Bits
-	calahead  Bits
-
-	regdiff Bits
-	act     Bits
-	regu    uint64 // register used bitmap
-}
-
-// A Rgn represents a single regopt variable over a region of code
-// where a register could potentially be dedicated to that variable.
-// The code encompassed by a Rgn is defined by the flow graph,
-// starting at enter, flood-filling forward while varno is refahead
-// and backward while varno is refbehind, and following branches.
-// A single variable may be represented by multiple disjoint Rgns and
-// each Rgn may choose a different register for that variable.
-// Registers are allocated to regions greedily in order of descending
-// cost.
-type Rgn struct {
-	enter *Flow
-	cost  int16
-	varno int16
-	regno int16
-}
-
-// The Plan 9 C compilers used a limit of 600 regions,
-// but the yacc-generated parser in y.go has 3100 regions.
-// We set MaxRgn large enough to handle that.
-// There's not a huge cost to having too many regions:
-// the main processing traces the live area for each variable,
-// which is limited by the number of variables times the area,
-// not the raw region count. If there are many regions, they
-// are almost certainly small and easy to trace.
-// The only operation that scales with region count is the
-// sorting by cost, which uses sort.Sort and is therefore
-// guaranteed n log n.
-const MaxRgn = 6000
-
-var (
-	region  []Rgn
-	nregion int
-)
-
-type rcmp []Rgn
-
-func (x rcmp) Len() int {
-	return len(x)
-}
-
-func (x rcmp) Swap(i, j int) {
-	x[i], x[j] = x[j], x[i]
-}
-
-func (x rcmp) Less(i, j int) bool {
-	p1 := &x[i]
-	p2 := &x[j]
-	if p1.cost != p2.cost {
-		return int(p2.cost)-int(p1.cost) < 0
-	}
-	if p1.varno != p2.varno {
-		return int(p2.varno)-int(p1.varno) < 0
-	}
-	if p1.enter != p2.enter {
-		return int(p2.enter.Id-p1.enter.Id) < 0
-	}
-	return false
-}
-
-func setaddrs(bit Bits) {
-	var i int
-	var n int
-	var v *Var
-	var node *Node
-
-	for bany(&bit) {
-		// convert each bit to a variable
-		i = bnum(bit)
-
-		node = vars[i].node
-		n = int(vars[i].name)
-		biclr(&bit, uint(i))
-
-		// disable all pieces of that variable
-		for i = 0; i < nvar; i++ {
-			v = &vars[i]
-			if v.node == node && int(v.name) == n {
-				v.addr = 2
-			}
-		}
-	}
-}
-
-var regnodes [64]*Node
-
-func walkvardef(n *Node, f *Flow, active int) {
-	var f1 *Flow
-	var bn int
-	var v *Var
-
-	for f1 = f; f1 != nil; f1 = f1.S1 {
-		if f1.Active == int32(active) {
-			break
-		}
-		f1.Active = int32(active)
-		if f1.Prog.As == obj.AVARKILL && f1.Prog.To.Node == n {
-			break
-		}
-		for v, _ = n.Opt().(*Var); v != nil; v = v.nextinnode {
-			bn = v.id
-			biset(&(f1.Data.(*Reg)).act, uint(bn))
-		}
-
-		if f1.Prog.As == obj.ACALL {
-			break
-		}
-	}
-
-	for f2 := f; f2 != f1; f2 = f2.S1 {
-		if f2.S2 != nil {
-			walkvardef(n, f2.S2, active)
-		}
-	}
-}
-
-/*
- * add mov b,rn
- * just after r
- */
-func addmove(r *Flow, bn int, rn int, f int) {
-	p1 := Ctxt.NewProg()
-	Clearp(p1)
-	p1.Pc = 9999
-
-	p := r.Prog
-	p1.Link = p.Link
-	p.Link = p1
-	p1.Lineno = p.Lineno
-
-	v := &vars[bn]
-
-	a := &p1.To
-	a.Offset = v.offset
-	a.Etype = uint8(v.etype)
-	a.Type = obj.TYPE_MEM
-	a.Name = v.name
-	a.Node = v.node
-	a.Sym = Linksym(v.node.Sym)
-
-	/* NOTE(rsc): 9g did
-	if(a->etype == TARRAY)
-		a->type = TYPE_ADDR;
-	else if(a->sym == nil)
-		a->type = TYPE_CONST;
-	*/
-	p1.As = int16(Thearch.Optoas(OAS, Types[uint8(v.etype)]))
-
-	// TODO(rsc): Remove special case here.
-	if (Thearch.Thechar == '5' || Thearch.Thechar == '7' || Thearch.Thechar == '9') && v.etype == TBOOL {
-		p1.As = int16(Thearch.Optoas(OAS, Types[TUINT8]))
-	}
-	p1.From.Type = obj.TYPE_REG
-	p1.From.Reg = int16(rn)
-	p1.From.Name = obj.NAME_NONE
-	if f == 0 {
-		p1.From = *a
-		*a = obj.Addr{}
-		a.Type = obj.TYPE_REG
-		a.Reg = int16(rn)
-	}
-
-	if Debug['R'] != 0 && Debug['v'] != 0 {
-		fmt.Printf("%v ===add=== %v\n", p, p1)
-	}
-	Ostats.Nspill++
-}
-
-func overlap_reg(o1 int64, w1 int, o2 int64, w2 int) bool {
-	t1 := o1 + int64(w1)
-	t2 := o2 + int64(w2)
-
-	if t1 <= o2 || t2 <= o1 {
-		return false
-	}
-
-	return true
-}
-
-func mkvar(f *Flow, a *obj.Addr) Bits {
-	/*
-	 * mark registers used
-	 */
-	if a.Type == obj.TYPE_NONE {
-		return zbits
-	}
-
-	r := f.Data.(*Reg)
-	r.use1.b[0] |= Thearch.Doregbits(int(a.Index)) // TODO: Use RtoB
-
-	var n int
-	switch a.Type {
-	default:
-		regu := Thearch.Doregbits(int(a.Reg)) | Thearch.RtoB(int(a.Reg)) // TODO: Use RtoB
-		if regu == 0 {
-			return zbits
-		}
-		bit := zbits
-		bit.b[0] = regu
-		return bit
-
-		// TODO(rsc): Remove special case here.
-	case obj.TYPE_ADDR:
-		var bit Bits
-		if Thearch.Thechar == '5' || Thearch.Thechar == '7' || Thearch.Thechar == '9' {
-			goto memcase
-		}
-		a.Type = obj.TYPE_MEM
-		bit = mkvar(f, a)
-		setaddrs(bit)
-		a.Type = obj.TYPE_ADDR
-		Ostats.Naddr++
-		return zbits
-
-	memcase:
-		fallthrough
-
-	case obj.TYPE_MEM:
-		if r != nil {
-			r.use1.b[0] |= Thearch.RtoB(int(a.Reg))
-		}
-
-		/* NOTE: 5g did
-		if(r->f.prog->scond & (C_PBIT|C_WBIT))
-			r->set.b[0] |= RtoB(a->reg);
-		*/
-		switch a.Name {
-		default:
-			// Note: This case handles NAME_EXTERN and NAME_STATIC.
-			// We treat these as requiring eager writes to memory, due to
-			// the possibility of a fault handler looking at them, so there is
-			// not much point in registerizing the loads.
-			// If we later choose the set of candidate variables from a
-			// larger list, these cases could be deprioritized instead of
-			// removed entirely.
-			return zbits
-
-		case obj.NAME_PARAM,
-			obj.NAME_AUTO:
-			n = int(a.Name)
-		}
-	}
-
-	node, _ := a.Node.(*Node)
-	if node == nil || node.Op != ONAME || node.Orig == nil {
-		return zbits
-	}
-	node = node.Orig
-	if node.Orig != node {
-		Fatal("%v: bad node", Ctxt.Dconv(a))
-	}
-	if node.Sym == nil || node.Sym.Name[0] == '.' {
-		return zbits
-	}
-	et := int(a.Etype)
-	o := a.Offset
-	w := a.Width
-	if w < 0 {
-		Fatal("bad width %d for %v", w, Ctxt.Dconv(a))
-	}
-
-	flag := 0
-	var v *Var
-	for i := 0; i < nvar; i++ {
-		v = &vars[i]
-		if v.node == node && int(v.name) == n {
-			if v.offset == o {
-				if int(v.etype) == et {
-					if int64(v.width) == w {
-						// TODO(rsc): Remove special case for arm here.
-						if flag == 0 || Thearch.Thechar != '5' {
-							return blsh(uint(i))
-						}
-					}
-				}
-			}
-
-			// if they overlap, disable both
-			if overlap_reg(v.offset, v.width, o, int(w)) {
-				//				print("disable overlap %s %d %d %d %d, %E != %E\n", s->name, v->offset, v->width, o, w, v->etype, et);
-				v.addr = 1
-
-				flag = 1
-			}
-		}
-	}
-
-	switch et {
-	case 0, TFUNC:
-		return zbits
-	}
-
-	if nvar >= NVAR {
-		if Debug['w'] > 1 && node != nil {
-			Fatal("variable not optimized: %v", Nconv(node, obj.FmtSharp))
-		}
-		if Debug['v'] > 0 {
-			Warn("variable not optimized: %v", Nconv(node, obj.FmtSharp))
-		}
-
-		// If we're not tracking a word in a variable, mark the rest as
-		// having its address taken, so that we keep the whole thing
-		// live at all calls. otherwise we might optimize away part of
-		// a variable but not all of it.
-		var v *Var
-		for i := 0; i < nvar; i++ {
-			v = &vars[i]
-			if v.node == node {
-				v.addr = 1
-			}
-		}
-
-		return zbits
-	}
-
-	i := nvar
-	nvar++
-	v = &vars[i]
-	v.id = i
-	v.offset = o
-	v.name = int8(n)
-	v.etype = int8(et)
-	v.width = int(w)
-	v.addr = int8(flag) // funny punning
-	v.node = node
-
-	// node->opt is the head of a linked list
-	// of Vars within the given Node, so that
-	// we can start at a Var and find all the other
-	// Vars in the same Go variable.
-	v.nextinnode, _ = node.Opt().(*Var)
-
-	node.SetOpt(v)
-
-	bit := blsh(uint(i))
-	if n == obj.NAME_EXTERN || n == obj.NAME_STATIC {
-		for z := 0; z < BITS; z++ {
-			externs.b[z] |= bit.b[z]
-		}
-	}
-	if n == obj.NAME_PARAM {
-		for z := 0; z < BITS; z++ {
-			params.b[z] |= bit.b[z]
-		}
-	}
-
-	if node.Class == PPARAM {
-		for z := 0; z < BITS; z++ {
-			ivar.b[z] |= bit.b[z]
-		}
-	}
-	if node.Class == PPARAMOUT {
-		for z := 0; z < BITS; z++ {
-			ovar.b[z] |= bit.b[z]
-		}
-	}
-
-	// Treat values with their address taken as live at calls,
-	// because the garbage collector's liveness analysis in ../gc/plive.c does.
-	// These must be consistent or else we will elide stores and the garbage
-	// collector will see uninitialized data.
-	// The typical case where our own analysis is out of sync is when the
-	// node appears to have its address taken but that code doesn't actually
-	// get generated and therefore doesn't show up as an address being
-	// taken when we analyze the instruction stream.
-	// One instance of this case is when a closure uses the same name as
-	// an outer variable for one of its own variables declared with :=.
-	// The parser flags the outer variable as possibly shared, and therefore
-	// sets addrtaken, even though it ends up not being actually shared.
-	// If we were better about _ elision, _ = &x would suffice too.
-	// The broader := in a closure problem is mentioned in a comment in
-	// closure.c:/^typecheckclosure and dcl.c:/^oldname.
-	if node.Addrtaken {
-		v.addr = 1
-	}
-
-	// Disable registerization for globals, because:
-	// (1) we might panic at any time and we want the recovery code
-	// to see the latest values (issue 1304).
-	// (2) we don't know what pointers might point at them and we want
-	// loads via those pointers to see updated values and vice versa (issue 7995).
-	//
-	// Disable registerization for results if using defer, because the deferred func
-	// might recover and return, causing the current values to be used.
-	if node.Class == PEXTERN || (Hasdefer != 0 && node.Class == PPARAMOUT) {
-		v.addr = 1
-	}
-
-	if Debug['R'] != 0 {
-		fmt.Printf("bit=%2d et=%v w=%d+%d %v %v flag=%d\n", i, Econv(int(et), 0), o, w, Nconv(node, obj.FmtSharp), Ctxt.Dconv(a), v.addr)
-	}
-	Ostats.Nvar++
-
-	return bit
-}
-
-var change int
-
-func prop(f *Flow, ref Bits, cal Bits) {
-	var f1 *Flow
-	var r1 *Reg
-	var z int
-	var i int
-	var v *Var
-	var v1 *Var
-
-	for f1 = f; f1 != nil; f1 = f1.P1 {
-		r1 = f1.Data.(*Reg)
-		for z = 0; z < BITS; z++ {
-			ref.b[z] |= r1.refahead.b[z]
-			if ref.b[z] != r1.refahead.b[z] {
-				r1.refahead.b[z] = ref.b[z]
-				change = 1
-			}
-
-			cal.b[z] |= r1.calahead.b[z]
-			if cal.b[z] != r1.calahead.b[z] {
-				r1.calahead.b[z] = cal.b[z]
-				change = 1
-			}
-		}
-
-		switch f1.Prog.As {
-		case obj.ACALL:
-			if Noreturn(f1.Prog) {
-				break
-			}
-
-			// Mark all input variables (ivar) as used, because that's what the
-			// liveness bitmaps say. The liveness bitmaps say that so that a
-			// panic will not show stale values in the parameter dump.
-			// Mark variables with a recent VARDEF (r1->act) as used,
-			// so that the optimizer flushes initializations to memory,
-			// so that if a garbage collection happens during this CALL,
-			// the collector will see initialized memory. Again this is to
-			// match what the liveness bitmaps say.
-			for z = 0; z < BITS; z++ {
-				cal.b[z] |= ref.b[z] | externs.b[z] | ivar.b[z] | r1.act.b[z]
-				ref.b[z] = 0
-			}
-
-			// cal.b is the current approximation of what's live across the call.
-			// Every bit in cal.b is a single stack word. For each such word,
-			// find all the other tracked stack words in the same Go variable
-			// (struct/slice/string/interface) and mark them live too.
-			// This is necessary because the liveness analysis for the garbage
-			// collector works at variable granularity, not at word granularity.
-			// It is fundamental for slice/string/interface: the garbage collector
-			// needs the whole value, not just some of the words, in order to
-			// interpret the other bits correctly. Specifically, slice needs a consistent
-			// ptr and cap, string needs a consistent ptr and len, and interface
-			// needs a consistent type word and data word.
-			for z = 0; z < BITS; z++ {
-				if cal.b[z] == 0 {
-					continue
-				}
-				for i = 0; i < 64; i++ {
-					if z*64+i >= nvar || (cal.b[z]>>uint(i))&1 == 0 {
-						continue
-					}
-					v = &vars[z*64+i]
-					if v.node.Opt() == nil { // v represents fixed register, not Go variable
-						continue
-					}
-
-					// v->node->opt is the head of a linked list of Vars
-					// corresponding to tracked words from the Go variable v->node.
-					// Walk the list and set all the bits.
-					// For a large struct this could end up being quadratic:
-					// after the first setting, the outer loop (for z, i) would see a 1 bit
-					// for all of the remaining words in the struct, and for each such
-					// word would go through and turn on all the bits again.
-					// To avoid the quadratic behavior, we only turn on the bits if
-					// v is the head of the list or if the head's bit is not yet turned on.
-					// This will set the bits at most twice, keeping the overall loop linear.
-					v1, _ = v.node.Opt().(*Var)
-
-					if v == v1 || !btest(&cal, uint(v1.id)) {
-						for ; v1 != nil; v1 = v1.nextinnode {
-							biset(&cal, uint(v1.id))
-						}
-					}
-				}
-			}
-
-		case obj.ATEXT:
-			for z = 0; z < BITS; z++ {
-				cal.b[z] = 0
-				ref.b[z] = 0
-			}
-
-		case obj.ARET:
-			for z = 0; z < BITS; z++ {
-				cal.b[z] = externs.b[z] | ovar.b[z]
-				ref.b[z] = 0
-			}
-		}
-
-		for z = 0; z < BITS; z++ {
-			ref.b[z] = ref.b[z]&^r1.set.b[z] | r1.use1.b[z] | r1.use2.b[z]
-			cal.b[z] &^= (r1.set.b[z] | r1.use1.b[z] | r1.use2.b[z])
-			r1.refbehind.b[z] = ref.b[z]
-			r1.calbehind.b[z] = cal.b[z]
-		}
-
-		if f1.Active != 0 {
-			break
-		}
-		f1.Active = 1
-	}
-
-	var r *Reg
-	var f2 *Flow
-	for ; f != f1; f = f.P1 {
-		r = f.Data.(*Reg)
-		for f2 = f.P2; f2 != nil; f2 = f2.P2link {
-			prop(f2, r.refbehind, r.calbehind)
-		}
-	}
-}
-
-func synch(f *Flow, dif Bits) {
-	var r1 *Reg
-	var z int
-
-	for f1 := f; f1 != nil; f1 = f1.S1 {
-		r1 = f1.Data.(*Reg)
-		for z = 0; z < BITS; z++ {
-			dif.b[z] = dif.b[z]&^(^r1.refbehind.b[z]&r1.refahead.b[z]) | r1.set.b[z] | r1.regdiff.b[z]
-			if dif.b[z] != r1.regdiff.b[z] {
-				r1.regdiff.b[z] = dif.b[z]
-				change = 1
-			}
-		}
-
-		if f1.Active != 0 {
-			break
-		}
-		f1.Active = 1
-		for z = 0; z < BITS; z++ {
-			dif.b[z] &^= (^r1.calbehind.b[z] & r1.calahead.b[z])
-		}
-		if f1.S2 != nil {
-			synch(f1.S2, dif)
-		}
-	}
-}
-
-func allreg(b uint64, r *Rgn) uint64 {
-	v := &vars[r.varno]
-	r.regno = 0
-	switch v.etype {
-	default:
-		Fatal("unknown etype %d/%v", Bitno(b), Econv(int(v.etype), 0))
-
-	case TINT8,
-		TUINT8,
-		TINT16,
-		TUINT16,
-		TINT32,
-		TUINT32,
-		TINT64,
-		TUINT64,
-		TINT,
-		TUINT,
-		TUINTPTR,
-		TBOOL,
-		TPTR32,
-		TPTR64:
-		i := Thearch.BtoR(^b)
-		if i != 0 && r.cost > 0 {
-			r.regno = int16(i)
-			return Thearch.RtoB(i)
-		}
-
-	case TFLOAT32, TFLOAT64:
-		i := Thearch.BtoF(^b)
-		if i != 0 && r.cost > 0 {
-			r.regno = int16(i)
-			return Thearch.FtoB(i)
-		}
-	}
-
-	return 0
-}
-
-func LOAD(r *Reg, z int) uint64 {
-	return ^r.refbehind.b[z] & r.refahead.b[z]
-}
-
-func STORE(r *Reg, z int) uint64 {
-	return ^r.calbehind.b[z] & r.calahead.b[z]
-}
-
-// Cost parameters
-const (
-	CLOAD = 5 // cost of load
-	CREF  = 5 // cost of reference if not registerized
-	LOOP  = 3 // loop execution count (applied in popt.go)
-)
-
-func paint1(f *Flow, bn int) {
-	z := bn / 64
-	bb := uint64(1 << uint(bn%64))
-	r := f.Data.(*Reg)
-	if r.act.b[z]&bb != 0 {
-		return
-	}
-	var f1 *Flow
-	var r1 *Reg
-	for {
-		if r.refbehind.b[z]&bb == 0 {
-			break
-		}
-		f1 = f.P1
-		if f1 == nil {
-			break
-		}
-		r1 = f1.Data.(*Reg)
-		if r1.refahead.b[z]&bb == 0 {
-			break
-		}
-		if r1.act.b[z]&bb != 0 {
-			break
-		}
-		f = f1
-		r = r1
-	}
-
-	if LOAD(r, z)&^(r.set.b[z]&^(r.use1.b[z]|r.use2.b[z]))&bb != 0 {
-		change -= CLOAD * int(f.Loop)
-	}
-
-	for {
-		r.act.b[z] |= bb
-
-		if f.Prog.As != obj.ANOP { // don't give credit for NOPs
-			if r.use1.b[z]&bb != 0 {
-				change += CREF * int(f.Loop)
-			}
-			if (r.use2.b[z]|r.set.b[z])&bb != 0 {
-				change += CREF * int(f.Loop)
-			}
-		}
-
-		if STORE(r, z)&r.regdiff.b[z]&bb != 0 {
-			change -= CLOAD * int(f.Loop)
-		}
-
-		if r.refbehind.b[z]&bb != 0 {
-			for f1 = f.P2; f1 != nil; f1 = f1.P2link {
-				if (f1.Data.(*Reg)).refahead.b[z]&bb != 0 {
-					paint1(f1, bn)
-				}
-			}
-		}
-
-		if r.refahead.b[z]&bb == 0 {
-			break
-		}
-		f1 = f.S2
-		if f1 != nil {
-			if (f1.Data.(*Reg)).refbehind.b[z]&bb != 0 {
-				paint1(f1, bn)
-			}
-		}
-		f = f.S1
-		if f == nil {
-			break
-		}
-		r = f.Data.(*Reg)
-		if r.act.b[z]&bb != 0 {
-			break
-		}
-		if r.refbehind.b[z]&bb == 0 {
-			break
-		}
-	}
-}
-
-func paint2(f *Flow, bn int, depth int) uint64 {
-	z := bn / 64
-	bb := uint64(1 << uint(bn%64))
-	vreg := regbits
-	r := f.Data.(*Reg)
-	if r.act.b[z]&bb == 0 {
-		return vreg
-	}
-	var r1 *Reg
-	var f1 *Flow
-	for {
-		if r.refbehind.b[z]&bb == 0 {
-			break
-		}
-		f1 = f.P1
-		if f1 == nil {
-			break
-		}
-		r1 = f1.Data.(*Reg)
-		if r1.refahead.b[z]&bb == 0 {
-			break
-		}
-		if r1.act.b[z]&bb == 0 {
-			break
-		}
-		f = f1
-		r = r1
-	}
-
-	for {
-		if Debug['R'] != 0 && Debug['v'] != 0 {
-			fmt.Printf("  paint2 %d %v\n", depth, f.Prog)
-		}
-
-		r.act.b[z] &^= bb
-
-		vreg |= r.regu
-
-		if r.refbehind.b[z]&bb != 0 {
-			for f1 = f.P2; f1 != nil; f1 = f1.P2link {
-				if (f1.Data.(*Reg)).refahead.b[z]&bb != 0 {
-					vreg |= paint2(f1, bn, depth+1)
-				}
-			}
-		}
-
-		if r.refahead.b[z]&bb == 0 {
-			break
-		}
-		f1 = f.S2
-		if f1 != nil {
-			if (f1.Data.(*Reg)).refbehind.b[z]&bb != 0 {
-				vreg |= paint2(f1, bn, depth+1)
-			}
-		}
-		f = f.S1
-		if f == nil {
-			break
-		}
-		r = f.Data.(*Reg)
-		if r.act.b[z]&bb == 0 {
-			break
-		}
-		if r.refbehind.b[z]&bb == 0 {
-			break
-		}
-	}
-
-	return vreg
-}
-
-func paint3(f *Flow, bn int, rb uint64, rn int) {
-	z := bn / 64
-	bb := uint64(1 << uint(bn%64))
-	r := f.Data.(*Reg)
-	if r.act.b[z]&bb != 0 {
-		return
-	}
-	var r1 *Reg
-	var f1 *Flow
-	for {
-		if r.refbehind.b[z]&bb == 0 {
-			break
-		}
-		f1 = f.P1
-		if f1 == nil {
-			break
-		}
-		r1 = f1.Data.(*Reg)
-		if r1.refahead.b[z]&bb == 0 {
-			break
-		}
-		if r1.act.b[z]&bb != 0 {
-			break
-		}
-		f = f1
-		r = r1
-	}
-
-	if LOAD(r, z)&^(r.set.b[z]&^(r.use1.b[z]|r.use2.b[z]))&bb != 0 {
-		addmove(f, bn, rn, 0)
-	}
-	var p *obj.Prog
-	for {
-		r.act.b[z] |= bb
-		p = f.Prog
-
-		if r.use1.b[z]&bb != 0 {
-			if Debug['R'] != 0 && Debug['v'] != 0 {
-				fmt.Printf("%v", p)
-			}
-			addreg(&p.From, rn)
-			if Debug['R'] != 0 && Debug['v'] != 0 {
-				fmt.Printf(" ===change== %v\n", p)
-			}
-		}
-
-		if (r.use2.b[z]|r.set.b[z])&bb != 0 {
-			if Debug['R'] != 0 && Debug['v'] != 0 {
-				fmt.Printf("%v", p)
-			}
-			addreg(&p.To, rn)
-			if Debug['R'] != 0 && Debug['v'] != 0 {
-				fmt.Printf(" ===change== %v\n", p)
-			}
-		}
-
-		if STORE(r, z)&r.regdiff.b[z]&bb != 0 {
-			addmove(f, bn, rn, 1)
-		}
-		r.regu |= rb
-
-		if r.refbehind.b[z]&bb != 0 {
-			for f1 = f.P2; f1 != nil; f1 = f1.P2link {
-				if (f1.Data.(*Reg)).refahead.b[z]&bb != 0 {
-					paint3(f1, bn, rb, rn)
-				}
-			}
-		}
-
-		if r.refahead.b[z]&bb == 0 {
-			break
-		}
-		f1 = f.S2
-		if f1 != nil {
-			if (f1.Data.(*Reg)).refbehind.b[z]&bb != 0 {
-				paint3(f1, bn, rb, rn)
-			}
-		}
-		f = f.S1
-		if f == nil {
-			break
-		}
-		r = f.Data.(*Reg)
-		if r.act.b[z]&bb != 0 {
-			break
-		}
-		if r.refbehind.b[z]&bb == 0 {
-			break
-		}
-	}
-}
-
-func addreg(a *obj.Addr, rn int) {
-	a.Sym = nil
-	a.Node = nil
-	a.Offset = 0
-	a.Type = obj.TYPE_REG
-	a.Reg = int16(rn)
-	a.Name = 0
-
-	Ostats.Ncvtreg++
-}
-
-func dumpone(f *Flow, isreg int) {
-	fmt.Printf("%d:%v", f.Loop, f.Prog)
-	if isreg != 0 {
-		r := f.Data.(*Reg)
-		var bit Bits
-		for z := 0; z < BITS; z++ {
-			bit.b[z] = r.set.b[z] | r.use1.b[z] | r.use2.b[z] | r.refbehind.b[z] | r.refahead.b[z] | r.calbehind.b[z] | r.calahead.b[z] | r.regdiff.b[z] | r.act.b[z] | 0
-		}
-		if bany(&bit) {
-			fmt.Printf("\t")
-			if bany(&r.set) {
-				fmt.Printf(" s:%v", &r.set)
-			}
-			if bany(&r.use1) {
-				fmt.Printf(" u1:%v", &r.use1)
-			}
-			if bany(&r.use2) {
-				fmt.Printf(" u2:%v", &r.use2)
-			}
-			if bany(&r.refbehind) {
-				fmt.Printf(" rb:%v ", &r.refbehind)
-			}
-			if bany(&r.refahead) {
-				fmt.Printf(" ra:%v ", &r.refahead)
-			}
-			if bany(&r.calbehind) {
-				fmt.Printf(" cb:%v ", &r.calbehind)
-			}
-			if bany(&r.calahead) {
-				fmt.Printf(" ca:%v ", &r.calahead)
-			}
-			if bany(&r.regdiff) {
-				fmt.Printf(" d:%v ", &r.regdiff)
-			}
-			if bany(&r.act) {
-				fmt.Printf(" a:%v ", &r.act)
-			}
-		}
-	}
-
-	fmt.Printf("\n")
-}
-
-func Dumpit(str string, r0 *Flow, isreg int) {
-	var r1 *Flow
-
-	fmt.Printf("\n%s\n", str)
-	for r := r0; r != nil; r = r.Link {
-		dumpone(r, isreg)
-		r1 = r.P2
-		if r1 != nil {
-			fmt.Printf("\tpred:")
-			for ; r1 != nil; r1 = r1.P2link {
-				fmt.Printf(" %.4d", uint(int(r1.Prog.Pc)))
-			}
-			if r.P1 != nil {
-				fmt.Printf(" (and %.4d)", uint(int(r.P1.Prog.Pc)))
-			} else {
-				fmt.Printf(" (only)")
-			}
-			fmt.Printf("\n")
-		}
-
-		// Print successors if it's not just the next one
-		if r.S1 != r.Link || r.S2 != nil {
-			fmt.Printf("\tsucc:")
-			if r.S1 != nil {
-				fmt.Printf(" %.4d", uint(int(r.S1.Prog.Pc)))
-			}
-			if r.S2 != nil {
-				fmt.Printf(" %.4d", uint(int(r.S2.Prog.Pc)))
-			}
-			fmt.Printf("\n")
-		}
-	}
-}
-
-func regopt(firstp *obj.Prog) {
-	mergetemp(firstp)
-
-	/*
-	 * control flow is more complicated in generated go code
-	 * than in generated c code.  define pseudo-variables for
-	 * registers, so we have complete register usage information.
-	 */
-	var nreg int
-	regnames := Thearch.Regnames(&nreg)
-
-	nvar = nreg
-	for i := 0; i < nreg; i++ {
-		vars[i] = Var{}
-	}
-	for i := 0; i < nreg; i++ {
-		if regnodes[i] == nil {
-			regnodes[i] = newname(Lookup(regnames[i]))
-		}
-		vars[i].node = regnodes[i]
-	}
-
-	regbits = Thearch.Excludedregs()
-	externs = zbits
-	params = zbits
-	consts = zbits
-	addrs = zbits
-	ivar = zbits
-	ovar = zbits
-
-	/*
-	 * pass 1
-	 * build aux data structure
-	 * allocate pcs
-	 * find use and set of variables
-	 */
-	g := Flowstart(firstp, func() interface{} { return new(Reg) })
-	if g == nil {
-		for i := 0; i < nvar; i++ {
-			vars[i].node.SetOpt(nil)
-		}
-		return
-	}
-
-	firstf := g.Start
-
-	for f := firstf; f != nil; f = f.Link {
-		p := f.Prog
-		if p.As == obj.AVARDEF || p.As == obj.AVARKILL {
-			continue
-		}
-
-		// Avoid making variables for direct-called functions.
-		if p.As == obj.ACALL && p.To.Type == obj.TYPE_MEM && p.To.Name == obj.NAME_EXTERN {
-			continue
-		}
-
-		// from vs to doesn't matter for registers.
-		r := f.Data.(*Reg)
-		r.use1.b[0] |= p.Info.Reguse | p.Info.Regindex
-		r.set.b[0] |= p.Info.Regset
-
-		bit := mkvar(f, &p.From)
-		if bany(&bit) {
-			if p.Info.Flags&LeftAddr != 0 {
-				setaddrs(bit)
-			}
-			if p.Info.Flags&LeftRead != 0 {
-				for z := 0; z < BITS; z++ {
-					r.use1.b[z] |= bit.b[z]
-				}
-			}
-			if p.Info.Flags&LeftWrite != 0 {
-				for z := 0; z < BITS; z++ {
-					r.set.b[z] |= bit.b[z]
-				}
-			}
-		}
-
-		// Compute used register for reg
-		if p.Info.Flags&RegRead != 0 {
-			r.use1.b[0] |= Thearch.RtoB(int(p.Reg))
-		}
-
-		// Currently we never generate three register forms.
-		// If we do, this will need to change.
-		if p.From3Type() != obj.TYPE_NONE {
-			Fatal("regopt not implemented for from3")
-		}
-
-		bit = mkvar(f, &p.To)
-		if bany(&bit) {
-			if p.Info.Flags&RightAddr != 0 {
-				setaddrs(bit)
-			}
-			if p.Info.Flags&RightRead != 0 {
-				for z := 0; z < BITS; z++ {
-					r.use2.b[z] |= bit.b[z]
-				}
-			}
-			if p.Info.Flags&RightWrite != 0 {
-				for z := 0; z < BITS; z++ {
-					r.set.b[z] |= bit.b[z]
-				}
-			}
-		}
-	}
-
-	for i := 0; i < nvar; i++ {
-		v := &vars[i]
-		if v.addr != 0 {
-			bit := blsh(uint(i))
-			for z := 0; z < BITS; z++ {
-				addrs.b[z] |= bit.b[z]
-			}
-		}
-
-		if Debug['R'] != 0 && Debug['v'] != 0 {
-			fmt.Printf("bit=%2d addr=%d et=%v w=%-2d s=%v + %d\n", i, v.addr, Econv(int(v.etype), 0), v.width, v.node, v.offset)
-		}
-	}
-
-	if Debug['R'] != 0 && Debug['v'] != 0 {
-		Dumpit("pass1", firstf, 1)
-	}
-
-	/*
-	 * pass 2
-	 * find looping structure
-	 */
-	flowrpo(g)
-
-	if Debug['R'] != 0 && Debug['v'] != 0 {
-		Dumpit("pass2", firstf, 1)
-	}
-
-	/*
-	 * pass 2.5
-	 * iterate propagating fat vardef covering forward
-	 * r->act records vars with a VARDEF since the last CALL.
-	 * (r->act will be reused in pass 5 for something else,
-	 * but we'll be done with it by then.)
-	 */
-	active := 0
-
-	for f := firstf; f != nil; f = f.Link {
-		f.Active = 0
-		r := f.Data.(*Reg)
-		r.act = zbits
-	}
-
-	for f := firstf; f != nil; f = f.Link {
-		p := f.Prog
-		if p.As == obj.AVARDEF && Isfat(((p.To.Node).(*Node)).Type) && ((p.To.Node).(*Node)).Opt() != nil {
-			active++
-			walkvardef(p.To.Node.(*Node), f, active)
-		}
-	}
-
-	/*
-	 * pass 3
-	 * iterate propagating usage
-	 * 	back until flow graph is complete
-	 */
-	var f1 *Flow
-	var i int
-	var f *Flow
-loop1:
-	change = 0
-
-	for f = firstf; f != nil; f = f.Link {
-		f.Active = 0
-	}
-	for f = firstf; f != nil; f = f.Link {
-		if f.Prog.As == obj.ARET {
-			prop(f, zbits, zbits)
-		}
-	}
-
-	/* pick up unreachable code */
-loop11:
-	i = 0
-
-	for f = firstf; f != nil; f = f1 {
-		f1 = f.Link
-		if f1 != nil && f1.Active != 0 && f.Active == 0 {
-			prop(f, zbits, zbits)
-			i = 1
-		}
-	}
-
-	if i != 0 {
-		goto loop11
-	}
-	if change != 0 {
-		goto loop1
-	}
-
-	if Debug['R'] != 0 && Debug['v'] != 0 {
-		Dumpit("pass3", firstf, 1)
-	}
-
-	/*
-	 * pass 4
-	 * iterate propagating register/variable synchrony
-	 * 	forward until graph is complete
-	 */
-loop2:
-	change = 0
-
-	for f = firstf; f != nil; f = f.Link {
-		f.Active = 0
-	}
-	synch(firstf, zbits)
-	if change != 0 {
-		goto loop2
-	}
-
-	if Debug['R'] != 0 && Debug['v'] != 0 {
-		Dumpit("pass4", firstf, 1)
-	}
-
-	/*
-	 * pass 4.5
-	 * move register pseudo-variables into regu.
-	 */
-	mask := uint64((1 << uint(nreg)) - 1)
-	for f := firstf; f != nil; f = f.Link {
-		r := f.Data.(*Reg)
-		r.regu = (r.refbehind.b[0] | r.set.b[0]) & mask
-		r.set.b[0] &^= mask
-		r.use1.b[0] &^= mask
-		r.use2.b[0] &^= mask
-		r.refbehind.b[0] &^= mask
-		r.refahead.b[0] &^= mask
-		r.calbehind.b[0] &^= mask
-		r.calahead.b[0] &^= mask
-		r.regdiff.b[0] &^= mask
-		r.act.b[0] &^= mask
-	}
-
-	if Debug['R'] != 0 && Debug['v'] != 0 {
-		Dumpit("pass4.5", firstf, 1)
-	}
-
-	/*
-	 * pass 5
-	 * isolate regions
-	 * calculate costs (paint1)
-	 */
-	var bit Bits
-	if f := firstf; f != nil {
-		r := f.Data.(*Reg)
-		for z := 0; z < BITS; z++ {
-			bit.b[z] = (r.refahead.b[z] | r.calahead.b[z]) &^ (externs.b[z] | params.b[z] | addrs.b[z] | consts.b[z])
-		}
-		if bany(&bit) && f.Refset == 0 {
-			// should never happen - all variables are preset
-			if Debug['w'] != 0 {
-				fmt.Printf("%v: used and not set: %v\n", f.Prog.Line(), &bit)
-			}
-			f.Refset = 1
-		}
-	}
-
-	for f := firstf; f != nil; f = f.Link {
-		(f.Data.(*Reg)).act = zbits
-	}
-	nregion = 0
-	region = region[:0]
-	var rgp *Rgn
-	for f := firstf; f != nil; f = f.Link {
-		r := f.Data.(*Reg)
-		for z := 0; z < BITS; z++ {
-			bit.b[z] = r.set.b[z] &^ (r.refahead.b[z] | r.calahead.b[z] | addrs.b[z])
-		}
-		if bany(&bit) && f.Refset == 0 {
-			if Debug['w'] != 0 {
-				fmt.Printf("%v: set and not used: %v\n", f.Prog.Line(), &bit)
-			}
-			f.Refset = 1
-			Thearch.Excise(f)
-		}
-
-		for z := 0; z < BITS; z++ {
-			bit.b[z] = LOAD(r, z) &^ (r.act.b[z] | addrs.b[z])
-		}
-		for bany(&bit) {
-			i = bnum(bit)
-			change = 0
-			paint1(f, i)
-			biclr(&bit, uint(i))
-			if change <= 0 {
-				continue
-			}
-			if nregion >= MaxRgn {
-				nregion++
-				continue
-			}
-
-			region = append(region, Rgn{
-				enter: f,
-				cost:  int16(change),
-				varno: int16(i),
-			})
-			nregion++
-		}
-	}
-
-	if false && Debug['v'] != 0 && strings.Contains(Curfn.Func.Nname.Sym.Name, "Parse") {
-		Warn("regions: %d\n", nregion)
-	}
-	if nregion >= MaxRgn {
-		if Debug['v'] != 0 {
-			Warn("too many regions: %d\n", nregion)
-		}
-		nregion = MaxRgn
-	}
-
-	sort.Sort(rcmp(region[:nregion]))
-
-	if Debug['R'] != 0 && Debug['v'] != 0 {
-		Dumpit("pass5", firstf, 1)
-	}
-
-	/*
-	 * pass 6
-	 * determine used registers (paint2)
-	 * replace code (paint3)
-	 */
-	if Debug['R'] != 0 && Debug['v'] != 0 {
-		fmt.Printf("\nregisterizing\n")
-	}
-	var usedreg uint64
-	var vreg uint64
-	for i := 0; i < nregion; i++ {
-		rgp = &region[i]
-		if Debug['R'] != 0 && Debug['v'] != 0 {
-			fmt.Printf("region %d: cost %d varno %d enter %d\n", i, rgp.cost, rgp.varno, rgp.enter.Prog.Pc)
-		}
-		bit = blsh(uint(rgp.varno))
-		usedreg = paint2(rgp.enter, int(rgp.varno), 0)
-		vreg = allreg(usedreg, rgp)
-		if rgp.regno != 0 {
-			if Debug['R'] != 0 && Debug['v'] != 0 {
-				v := &vars[rgp.varno]
-				fmt.Printf("registerize %v+%d (bit=%2d et=%v) in %v usedreg=%#x vreg=%#x\n", v.node, v.offset, rgp.varno, Econv(int(v.etype), 0), obj.Rconv(int(rgp.regno)), usedreg, vreg)
-			}
-
-			paint3(rgp.enter, int(rgp.varno), vreg, int(rgp.regno))
-		}
-	}
-
-	/*
-	 * free aux structures. peep allocates new ones.
-	 */
-	for i := 0; i < nvar; i++ {
-		vars[i].node.SetOpt(nil)
-	}
-	Flowend(g)
-	firstf = nil
-
-	if Debug['R'] != 0 && Debug['v'] != 0 {
-		// Rebuild flow graph, since we inserted instructions
-		g := Flowstart(firstp, nil)
-		firstf = g.Start
-		Dumpit("pass6", firstf, 0)
-		Flowend(g)
-		firstf = nil
-	}
-
-	/*
-	 * pass 7
-	 * peep-hole on basic block
-	 */
-	if Debug['R'] == 0 || Debug['P'] != 0 {
-		Thearch.Peep(firstp)
-	}
-
-	/*
-	 * eliminate nops
-	 */
-	for p := firstp; p != nil; p = p.Link {
-		for p.Link != nil && p.Link.As == obj.ANOP {
-			p.Link = p.Link.Link
-		}
-		if p.To.Type == obj.TYPE_BRANCH {
-			for p.To.Val.(*obj.Prog) != nil && p.To.Val.(*obj.Prog).As == obj.ANOP {
-				p.To.Val = p.To.Val.(*obj.Prog).Link
-			}
-		}
-	}
-
-	if Debug['R'] != 0 {
-		if Ostats.Ncvtreg != 0 || Ostats.Nspill != 0 || Ostats.Nreload != 0 || Ostats.Ndelmov != 0 || Ostats.Nvar != 0 || Ostats.Naddr != 0 || false {
-			fmt.Printf("\nstats\n")
-		}
-
-		if Ostats.Ncvtreg != 0 {
-			fmt.Printf("\t%4d cvtreg\n", Ostats.Ncvtreg)
-		}
-		if Ostats.Nspill != 0 {
-			fmt.Printf("\t%4d spill\n", Ostats.Nspill)
-		}
-		if Ostats.Nreload != 0 {
-			fmt.Printf("\t%4d reload\n", Ostats.Nreload)
-		}
-		if Ostats.Ndelmov != 0 {
-			fmt.Printf("\t%4d delmov\n", Ostats.Ndelmov)
-		}
-		if Ostats.Nvar != 0 {
-			fmt.Printf("\t%4d var\n", Ostats.Nvar)
-		}
-		if Ostats.Naddr != 0 {
-			fmt.Printf("\t%4d addr\n", Ostats.Naddr)
-		}
-
-		Ostats = OptStats{}
-	}
-}
-
-// bany reports whether any bits in a are set.
-func bany(a *Bits) bool {
-	for _, x := range &a.b { // & to avoid making a copy of a.b
-		if x != 0 {
-			return true
-		}
-	}
-	return false
-}
-
-// bnum reports the lowest index of a 1 bit in a.
-func bnum(a Bits) int {
-	for i, x := range &a.b { // & to avoid making a copy of a.b
-		if x != 0 {
-			return 64*i + Bitno(x)
-		}
-	}
-
-	Fatal("bad in bnum")
-	return 0
-}
-
-// blsh returns a Bits with 1 at index n, 0 elsewhere (1<<n).
-func blsh(n uint) Bits {
-	c := zbits
-	c.b[n/64] = 1 << (n % 64)
-	return c
-}
-
-// btest reports whether bit n is 1.
-func btest(a *Bits, n uint) bool {
-	return a.b[n/64]&(1<<(n%64)) != 0
-}
-
-// biset sets bit n to 1.
-func biset(a *Bits, n uint) {
-	a.b[n/64] |= 1 << (n % 64)
-}
-
-// biclr sets bit n to 0.
-func biclr(a *Bits, n uint) {
-	a.b[n/64] &^= (1 << (n % 64))
-}
-
-// Bitno reports the lowest index of a 1 bit in b.
-// It calls Fatal if there is no 1 bit.
-func Bitno(b uint64) int {
-	if b == 0 {
-		Fatal("bad in bitno")
-	}
-	n := 0
-	if b&(1<<32-1) == 0 {
-		n += 32
-		b >>= 32
-	}
-	if b&(1<<16-1) == 0 {
-		n += 16
-		b >>= 16
-	}
-	if b&(1<<8-1) == 0 {
-		n += 8
-		b >>= 8
-	}
-	if b&(1<<4-1) == 0 {
-		n += 4
-		b >>= 4
-	}
-	if b&(1<<2-1) == 0 {
-		n += 2
-		b >>= 2
-	}
-	if b&1 == 0 {
-		n++
-	}
-	return n
-}
-
-// String returns a space-separated list of the variables represented by bits.
-func (bits Bits) String() string {
-	// Note: This method takes a value receiver, both for convenience
-	// and to make it safe to modify the bits as we process them.
-	// Even so, most prints above use &bits, because then the value
-	// being stored in the interface{} is a pointer and does not require
-	// an allocation and copy to create the interface{}.
-	var buf bytes.Buffer
-	sep := ""
-	for bany(&bits) {
-		i := bnum(bits)
-		buf.WriteString(sep)
-		sep = " "
-		v := &vars[i]
-		if v.node == nil || v.node.Sym == nil {
-			fmt.Fprintf(&buf, "$%d", i)
-		} else {
-			fmt.Fprintf(&buf, "%s(%d)", v.node.Sym.Name, i)
-			if v.offset != 0 {
-				fmt.Fprintf(&buf, "%+d", int64(v.offset))
-			}
-		}
-		biclr(&bits, uint(i))
-	}
-	return buf.String()
-}
diff --git a/src/cmd/compile/internal/gc/select.go b/src/cmd/compile/internal/gc/select.go
deleted file mode 100644
index db20778..0000000
--- a/src/cmd/compile/internal/gc/select.go
+++ /dev/null
@@ -1,369 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-/*
- * select
- */
-func typecheckselect(sel *Node) {
-	var ncase *Node
-	var n *Node
-
-	var def *Node
-	lno := int(setlineno(sel))
-	count := 0
-	typechecklist(sel.Ninit, Etop)
-	for l := sel.List; l != nil; l = l.Next {
-		count++
-		ncase = l.N
-		setlineno(ncase)
-		if ncase.Op != OXCASE {
-			Fatal("typecheckselect %v", Oconv(int(ncase.Op), 0))
-		}
-
-		if ncase.List == nil {
-			// default
-			if def != nil {
-				Yyerror("multiple defaults in select (first at %v)", def.Line())
-			} else {
-				def = ncase
-			}
-		} else if ncase.List.Next != nil {
-			Yyerror("select cases cannot be lists")
-		} else {
-			n = typecheck(&ncase.List.N, Etop)
-			ncase.Left = n
-			ncase.List = nil
-			setlineno(n)
-			switch n.Op {
-			default:
-				Yyerror("select case must be receive, send or assign recv")
-
-				// convert x = <-c into OSELRECV(x, <-c).
-			// remove implicit conversions; the eventual assignment
-			// will reintroduce them.
-			case OAS:
-				if (n.Right.Op == OCONVNOP || n.Right.Op == OCONVIFACE) && n.Right.Implicit {
-					n.Right = n.Right.Left
-				}
-
-				if n.Right.Op != ORECV {
-					Yyerror("select assignment must have receive on right hand side")
-					break
-				}
-
-				n.Op = OSELRECV
-
-				// convert x, ok = <-c into OSELRECV2(x, <-c) with ntest=ok
-			case OAS2RECV:
-				if n.Rlist.N.Op != ORECV {
-					Yyerror("select assignment must have receive on right hand side")
-					break
-				}
-
-				n.Op = OSELRECV2
-				n.Left = n.List.N
-				n.List = list1(n.List.Next.N)
-				n.Right = n.Rlist.N
-				n.Rlist = nil
-
-				// convert <-c into OSELRECV(N, <-c)
-			case ORECV:
-				n = Nod(OSELRECV, nil, n)
-
-				n.Typecheck = 1
-				ncase.Left = n
-
-			case OSEND:
-				break
-			}
-		}
-
-		typechecklist(ncase.Nbody, Etop)
-	}
-
-	sel.Xoffset = int64(count)
-	lineno = int32(lno)
-}
-
-func walkselect(sel *Node) {
-	if sel.List == nil && sel.Xoffset != 0 {
-		Fatal("double walkselect") // already rewrote
-	}
-
-	lno := int(setlineno(sel))
-	i := count(sel.List)
-
-	// optimization: zero-case select
-	var init *NodeList
-	var r *Node
-	var n *Node
-	var var_ *Node
-	var selv *Node
-	var cas *Node
-	if i == 0 {
-		sel.Nbody = list1(mkcall("block", nil, nil))
-		goto out
-	}
-
-	// optimization: one-case select: single op.
-	// TODO(rsc): Reenable optimization once order.c can handle it.
-	// golang.org/issue/7672.
-	if i == 1 {
-		cas := sel.List.N
-		setlineno(cas)
-		l := cas.Ninit
-		if cas.Left != nil { // not default:
-			n := cas.Left
-			l = concat(l, n.Ninit)
-			n.Ninit = nil
-			var ch *Node
-			switch n.Op {
-			default:
-				Fatal("select %v", Oconv(int(n.Op), 0))
-
-				// ok already
-			case OSEND:
-				ch = n.Left
-
-			case OSELRECV, OSELRECV2:
-				ch = n.Right.Left
-				if n.Op == OSELRECV || n.List == nil {
-					if n.Left == nil {
-						n = n.Right
-					} else {
-						n.Op = OAS
-					}
-					break
-				}
-
-				if n.Left == nil {
-					typecheck(&nblank, Erv|Easgn)
-					n.Left = nblank
-				}
-
-				n.Op = OAS2
-				n.List = concat(list1(n.Left), n.List)
-				n.Rlist = list1(n.Right)
-				n.Right = nil
-				n.Left = nil
-				n.Typecheck = 0
-				typecheck(&n, Etop)
-			}
-
-			// if ch == nil { block() }; n;
-			a := Nod(OIF, nil, nil)
-
-			a.Left = Nod(OEQ, ch, nodnil())
-			a.Nbody = list1(mkcall("block", nil, &l))
-			typecheck(&a, Etop)
-			l = list(l, a)
-			l = list(l, n)
-		}
-
-		l = concat(l, cas.Nbody)
-		sel.Nbody = l
-		goto out
-	}
-
-	// convert case value arguments to addresses.
-	// this rewrite is used by both the general code and the next optimization.
-	for l := sel.List; l != nil; l = l.Next {
-		cas = l.N
-		setlineno(cas)
-		n = cas.Left
-		if n == nil {
-			continue
-		}
-		switch n.Op {
-		case OSEND:
-			n.Right = Nod(OADDR, n.Right, nil)
-			typecheck(&n.Right, Erv)
-
-		case OSELRECV, OSELRECV2:
-			if n.Op == OSELRECV2 && n.List == nil {
-				n.Op = OSELRECV
-			}
-			if n.Op == OSELRECV2 {
-				n.List.N = Nod(OADDR, n.List.N, nil)
-				typecheck(&n.List.N, Erv)
-			}
-
-			if n.Left == nil {
-				n.Left = nodnil()
-			} else {
-				n.Left = Nod(OADDR, n.Left, nil)
-				typecheck(&n.Left, Erv)
-			}
-		}
-	}
-
-	// optimization: two-case select but one is default: single non-blocking op.
-	if i == 2 && (sel.List.N.Left == nil || sel.List.Next.N.Left == nil) {
-		var cas *Node
-		var dflt *Node
-		if sel.List.N.Left == nil {
-			cas = sel.List.Next.N
-			dflt = sel.List.N
-		} else {
-			dflt = sel.List.Next.N
-			cas = sel.List.N
-		}
-
-		n := cas.Left
-		setlineno(n)
-		r := Nod(OIF, nil, nil)
-		r.Ninit = cas.Ninit
-		switch n.Op {
-		default:
-			Fatal("select %v", Oconv(int(n.Op), 0))
-
-			// if selectnbsend(c, v) { body } else { default body }
-		case OSEND:
-			ch := n.Left
-
-			r.Left = mkcall1(chanfn("selectnbsend", 2, ch.Type), Types[TBOOL], &r.Ninit, typename(ch.Type), ch, n.Right)
-
-			// if c != nil && selectnbrecv(&v, c) { body } else { default body }
-		case OSELRECV:
-			r = Nod(OIF, nil, nil)
-
-			r.Ninit = cas.Ninit
-			ch := n.Right.Left
-			r.Left = mkcall1(chanfn("selectnbrecv", 2, ch.Type), Types[TBOOL], &r.Ninit, typename(ch.Type), n.Left, ch)
-
-			// if c != nil && selectnbrecv2(&v, c) { body } else { default body }
-		case OSELRECV2:
-			r = Nod(OIF, nil, nil)
-
-			r.Ninit = cas.Ninit
-			ch := n.Right.Left
-			r.Left = mkcall1(chanfn("selectnbrecv2", 2, ch.Type), Types[TBOOL], &r.Ninit, typename(ch.Type), n.Left, n.List.N, ch)
-		}
-
-		typecheck(&r.Left, Erv)
-		r.Nbody = cas.Nbody
-		r.Rlist = concat(dflt.Ninit, dflt.Nbody)
-		sel.Nbody = list1(r)
-		goto out
-	}
-
-	init = sel.Ninit
-	sel.Ninit = nil
-
-	// generate sel-struct
-	setlineno(sel)
-
-	selv = temp(selecttype(int32(sel.Xoffset)))
-	r = Nod(OAS, selv, nil)
-	typecheck(&r, Etop)
-	init = list(init, r)
-	var_ = conv(conv(Nod(OADDR, selv, nil), Types[TUNSAFEPTR]), Ptrto(Types[TUINT8]))
-	r = mkcall("newselect", nil, nil, var_, Nodintconst(selv.Type.Width), Nodintconst(sel.Xoffset))
-	typecheck(&r, Etop)
-	init = list(init, r)
-
-	// register cases
-	for l := sel.List; l != nil; l = l.Next {
-		cas = l.N
-		setlineno(cas)
-		n = cas.Left
-		r = Nod(OIF, nil, nil)
-		r.Ninit = cas.Ninit
-		cas.Ninit = nil
-		if n != nil {
-			r.Ninit = concat(r.Ninit, n.Ninit)
-			n.Ninit = nil
-		}
-
-		if n == nil {
-			// selectdefault(sel *byte);
-			r.Left = mkcall("selectdefault", Types[TBOOL], &r.Ninit, var_)
-		} else {
-			switch n.Op {
-			default:
-				Fatal("select %v", Oconv(int(n.Op), 0))
-
-				// selectsend(sel *byte, hchan *chan any, elem *any) (selected bool);
-			case OSEND:
-				r.Left = mkcall1(chanfn("selectsend", 2, n.Left.Type), Types[TBOOL], &r.Ninit, var_, n.Left, n.Right)
-
-				// selectrecv(sel *byte, hchan *chan any, elem *any) (selected bool);
-			case OSELRECV:
-				r.Left = mkcall1(chanfn("selectrecv", 2, n.Right.Left.Type), Types[TBOOL], &r.Ninit, var_, n.Right.Left, n.Left)
-
-				// selectrecv2(sel *byte, hchan *chan any, elem *any, received *bool) (selected bool);
-			case OSELRECV2:
-				r.Left = mkcall1(chanfn("selectrecv2", 2, n.Right.Left.Type), Types[TBOOL], &r.Ninit, var_, n.Right.Left, n.Left, n.List.N)
-			}
-		}
-
-		// selv is no longer alive after use.
-		r.Nbody = list(r.Nbody, Nod(OVARKILL, selv, nil))
-
-		r.Nbody = concat(r.Nbody, cas.Nbody)
-		r.Nbody = list(r.Nbody, Nod(OBREAK, nil, nil))
-		init = list(init, r)
-	}
-
-	// run the select
-	setlineno(sel)
-
-	init = list(init, mkcall("selectgo", nil, nil, var_))
-	sel.Nbody = init
-
-out:
-	sel.List = nil
-	walkstmtlist(sel.Nbody)
-	lineno = int32(lno)
-}
-
-// Keep in sync with src/runtime/runtime2.go and src/runtime/select.go.
-func selecttype(size int32) *Type {
-	// TODO(dvyukov): it's possible to generate SudoG and Scase only once
-	// and then cache; and also cache Select per size.
-	sudog := Nod(OTSTRUCT, nil, nil)
-
-	sudog.List = list(sudog.List, Nod(ODCLFIELD, newname(Lookup("g")), typenod(Ptrto(Types[TUINT8]))))
-	sudog.List = list(sudog.List, Nod(ODCLFIELD, newname(Lookup("selectdone")), typenod(Ptrto(Types[TUINT8]))))
-	sudog.List = list(sudog.List, Nod(ODCLFIELD, newname(Lookup("next")), typenod(Ptrto(Types[TUINT8]))))
-	sudog.List = list(sudog.List, Nod(ODCLFIELD, newname(Lookup("prev")), typenod(Ptrto(Types[TUINT8]))))
-	sudog.List = list(sudog.List, Nod(ODCLFIELD, newname(Lookup("elem")), typenod(Ptrto(Types[TUINT8]))))
-	sudog.List = list(sudog.List, Nod(ODCLFIELD, newname(Lookup("releasetime")), typenod(Types[TUINT64])))
-	sudog.List = list(sudog.List, Nod(ODCLFIELD, newname(Lookup("nrelease")), typenod(Types[TINT32])))
-	sudog.List = list(sudog.List, Nod(ODCLFIELD, newname(Lookup("waitlink")), typenod(Ptrto(Types[TUINT8]))))
-	typecheck(&sudog, Etype)
-	sudog.Type.Noalg = 1
-	sudog.Type.Local = true
-
-	scase := Nod(OTSTRUCT, nil, nil)
-	scase.List = list(scase.List, Nod(ODCLFIELD, newname(Lookup("elem")), typenod(Ptrto(Types[TUINT8]))))
-	scase.List = list(scase.List, Nod(ODCLFIELD, newname(Lookup("chan")), typenod(Ptrto(Types[TUINT8]))))
-	scase.List = list(scase.List, Nod(ODCLFIELD, newname(Lookup("pc")), typenod(Types[TUINTPTR])))
-	scase.List = list(scase.List, Nod(ODCLFIELD, newname(Lookup("kind")), typenod(Types[TUINT16])))
-	scase.List = list(scase.List, Nod(ODCLFIELD, newname(Lookup("so")), typenod(Types[TUINT16])))
-	scase.List = list(scase.List, Nod(ODCLFIELD, newname(Lookup("receivedp")), typenod(Ptrto(Types[TUINT8]))))
-	scase.List = list(scase.List, Nod(ODCLFIELD, newname(Lookup("releasetime")), typenod(Types[TUINT64])))
-	typecheck(&scase, Etype)
-	scase.Type.Noalg = 1
-	scase.Type.Local = true
-
-	sel := Nod(OTSTRUCT, nil, nil)
-	sel.List = list(sel.List, Nod(ODCLFIELD, newname(Lookup("tcase")), typenod(Types[TUINT16])))
-	sel.List = list(sel.List, Nod(ODCLFIELD, newname(Lookup("ncase")), typenod(Types[TUINT16])))
-	sel.List = list(sel.List, Nod(ODCLFIELD, newname(Lookup("pollorder")), typenod(Ptrto(Types[TUINT8]))))
-	sel.List = list(sel.List, Nod(ODCLFIELD, newname(Lookup("lockorder")), typenod(Ptrto(Types[TUINT8]))))
-	arr := Nod(OTARRAY, Nodintconst(int64(size)), scase)
-	sel.List = list(sel.List, Nod(ODCLFIELD, newname(Lookup("scase")), arr))
-	arr = Nod(OTARRAY, Nodintconst(int64(size)), typenod(Ptrto(Types[TUINT8])))
-	sel.List = list(sel.List, Nod(ODCLFIELD, newname(Lookup("lockorderarr")), arr))
-	arr = Nod(OTARRAY, Nodintconst(int64(size)), typenod(Types[TUINT16]))
-	sel.List = list(sel.List, Nod(ODCLFIELD, newname(Lookup("pollorderarr")), arr))
-	typecheck(&sel, Etype)
-	sel.Type.Noalg = 1
-	sel.Type.Local = true
-
-	return sel.Type
-}
diff --git a/src/cmd/compile/internal/gc/sinit.go b/src/cmd/compile/internal/gc/sinit.go
deleted file mode 100644
index 0ced4ef..0000000
--- a/src/cmd/compile/internal/gc/sinit.go
+++ /dev/null
@@ -1,1551 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-)
-
-/*
- * static initialization
- */
-const (
-	InitNotStarted = 0
-	InitDone       = 1
-	InitPending    = 2
-)
-
-var (
-	initlist  *NodeList
-	initplans map[*Node]*InitPlan
-	inittemps = make(map[*Node]*Node)
-)
-
-// init1 walks the AST starting at n, and accumulates in out
-// the list of definitions needing init code in dependency order.
-func init1(n *Node, out **NodeList) {
-	if n == nil {
-		return
-	}
-	init1(n.Left, out)
-	init1(n.Right, out)
-	for l := n.List; l != nil; l = l.Next {
-		init1(l.N, out)
-	}
-
-	if n.Left != nil && n.Type != nil && n.Left.Op == OTYPE && n.Class == PFUNC {
-		// Methods called as Type.Method(receiver, ...).
-		// Definitions for method expressions are stored in type->nname.
-		init1(n.Type.Nname, out)
-	}
-
-	if n.Op != ONAME {
-		return
-	}
-	switch n.Class {
-	case PEXTERN, PFUNC:
-		break
-
-	default:
-		if isblank(n) && n.Name.Curfn == nil && n.Name.Defn != nil && n.Name.Defn.Initorder == InitNotStarted {
-			// blank names initialization is part of init() but not
-			// when they are inside a function.
-			break
-		}
-
-		return
-	}
-
-	if n.Initorder == InitDone {
-		return
-	}
-	if n.Initorder == InitPending {
-		// Since mutually recursive sets of functions are allowed,
-		// we don't necessarily raise an error if n depends on a node
-		// which is already waiting for its dependencies to be visited.
-		//
-		// initlist contains a cycle of identifiers referring to each other.
-		// If this cycle contains a variable, then this variable refers to itself.
-		// Conversely, if there exists an initialization cycle involving
-		// a variable in the program, the tree walk will reach a cycle
-		// involving that variable.
-		var nv *Node
-		if n.Class != PFUNC {
-			nv = n
-			goto foundinitloop
-		}
-
-		for l := initlist; l.N != n; l = l.Next {
-			if l.N.Class != PFUNC {
-				nv = l.N
-				goto foundinitloop
-			}
-		}
-
-		// The loop involves only functions, ok.
-		return
-
-		// if there have already been errors printed,
-		// those errors probably confused us and
-		// there might not be a loop.  let the user
-		// fix those first.
-	foundinitloop:
-		Flusherrors()
-
-		if nerrors > 0 {
-			errorexit()
-		}
-
-		// There is a loop involving nv. We know about
-		// n and initlist = n1 <- ... <- nv <- ... <- n <- ...
-		fmt.Printf("%v: initialization loop:\n", nv.Line())
-
-		// Build back pointers in initlist.
-		for l := initlist; l != nil; l = l.Next {
-			if l.Next != nil {
-				l.Next.End = l
-			}
-		}
-
-		// Print nv -> ... -> n1 -> n.
-		var l *NodeList
-		for l = initlist; l.N != nv; l = l.Next {
-		}
-		for ; l != nil; l = l.End {
-			fmt.Printf("\t%v %v refers to\n", l.N.Line(), l.N.Sym)
-		}
-
-		// Print n -> ... -> nv.
-		for l = initlist; l.N != n; l = l.Next {
-		}
-		for ; l.N != nv; l = l.End {
-			fmt.Printf("\t%v %v refers to\n", l.N.Line(), l.N.Sym)
-		}
-		fmt.Printf("\t%v %v\n", nv.Line(), nv.Sym)
-		errorexit()
-	}
-
-	// reached a new unvisited node.
-	n.Initorder = InitPending
-
-	l := new(NodeList)
-	if l == nil {
-		Flusherrors()
-		Yyerror("out of memory")
-		errorexit()
-	}
-
-	l.Next = initlist
-	l.N = n
-	l.End = nil
-	initlist = l
-
-	// make sure that everything n depends on is initialized.
-	// n->defn is an assignment to n
-	if defn := n.Name.Defn; defn != nil {
-		switch defn.Op {
-		default:
-			goto bad
-
-		case ODCLFUNC:
-			init2list(defn.Nbody, out)
-
-		case OAS:
-			if defn.Left != n {
-				goto bad
-			}
-			if isblank(defn.Left) && candiscard(defn.Right) {
-				defn.Op = OEMPTY
-				defn.Left = nil
-				defn.Right = nil
-				break
-			}
-
-			init2(defn.Right, out)
-			if Debug['j'] != 0 {
-				fmt.Printf("%v\n", n.Sym)
-			}
-			if isblank(n) || !staticinit(n, out) {
-				if Debug['%'] != 0 {
-					Dump("nonstatic", defn)
-				}
-				*out = list(*out, defn)
-			}
-
-		case OAS2FUNC, OAS2MAPR, OAS2DOTTYPE, OAS2RECV:
-			if defn.Initorder != InitNotStarted {
-				break
-			}
-			defn.Initorder = InitDone
-			for l := defn.Rlist; l != nil; l = l.Next {
-				init1(l.N, out)
-			}
-			if Debug['%'] != 0 {
-				Dump("nonstatic", defn)
-			}
-			*out = list(*out, defn)
-		}
-	}
-
-	l = initlist
-	initlist = l.Next
-	if l.N != n {
-		Fatal("bad initlist")
-	}
-
-	n.Initorder = InitDone
-	return
-
-bad:
-	Dump("defn", n.Name.Defn)
-	Fatal("init1: bad defn")
-}
-
-// recurse over n, doing init1 everywhere.
-func init2(n *Node, out **NodeList) {
-	if n == nil || n.Initorder == InitDone {
-		return
-	}
-
-	if n.Op == ONAME && n.Ninit != nil {
-		Fatal("name %v with ninit: %v\n", n.Sym, Nconv(n, obj.FmtSign))
-	}
-
-	init1(n, out)
-	init2(n.Left, out)
-	init2(n.Right, out)
-	init2list(n.Ninit, out)
-	init2list(n.List, out)
-	init2list(n.Rlist, out)
-	init2list(n.Nbody, out)
-
-	if n.Op == OCLOSURE {
-		init2list(n.Func.Closure.Nbody, out)
-	}
-	if n.Op == ODOTMETH || n.Op == OCALLPART {
-		init2(n.Type.Nname, out)
-	}
-}
-
-func init2list(l *NodeList, out **NodeList) {
-	for ; l != nil; l = l.Next {
-		init2(l.N, out)
-	}
-}
-
-func initreorder(l *NodeList, out **NodeList) {
-	var n *Node
-
-	for ; l != nil; l = l.Next {
-		n = l.N
-		switch n.Op {
-		case ODCLFUNC, ODCLCONST, ODCLTYPE:
-			continue
-		}
-
-		initreorder(n.Ninit, out)
-		n.Ninit = nil
-		init1(n, out)
-	}
-}
-
-// initfix computes initialization order for a list l of top-level
-// declarations and outputs the corresponding list of statements
-// to include in the init() function body.
-func initfix(l *NodeList) *NodeList {
-	var lout *NodeList
-	initplans = make(map[*Node]*InitPlan)
-	lno := int(lineno)
-	initreorder(l, &lout)
-	lineno = int32(lno)
-	initplans = nil
-	return lout
-}
-
-/*
- * compilation of top-level (static) assignments
- * into DATA statements if at all possible.
- */
-func staticinit(n *Node, out **NodeList) bool {
-	if n.Op != ONAME || n.Class != PEXTERN || n.Name.Defn == nil || n.Name.Defn.Op != OAS {
-		Fatal("staticinit")
-	}
-
-	lineno = n.Lineno
-	l := n.Name.Defn.Left
-	r := n.Name.Defn.Right
-	return staticassign(l, r, out)
-}
-
-// like staticassign but we are copying an already
-// initialized value r.
-func staticcopy(l *Node, r *Node, out **NodeList) bool {
-	if r.Op != ONAME {
-		return false
-	}
-	if r.Class == PFUNC {
-		gdata(l, r, Widthptr)
-		return true
-	}
-	if r.Class != PEXTERN || r.Sym.Pkg != localpkg {
-		return false
-	}
-	if r.Name.Defn == nil { // probably zeroed but perhaps supplied externally and of unknown value
-		return false
-	}
-	if r.Name.Defn.Op != OAS {
-		return false
-	}
-	orig := r
-	r = r.Name.Defn.Right
-
-	for r.Op == OCONVNOP {
-		r = r.Left
-	}
-
-	switch r.Op {
-	case ONAME:
-		if staticcopy(l, r, out) {
-			return true
-		}
-		*out = list(*out, Nod(OAS, l, r))
-		return true
-
-	case OLITERAL:
-		if iszero(r) {
-			return true
-		}
-		gdata(l, r, int(l.Type.Width))
-		return true
-
-	case OADDR:
-		switch r.Left.Op {
-		case ONAME:
-			gdata(l, r, int(l.Type.Width))
-			return true
-		}
-
-	case OPTRLIT:
-		switch r.Left.Op {
-		//dump("not static addr", r);
-		default:
-			break
-
-			// copy pointer
-		case OARRAYLIT, OSTRUCTLIT, OMAPLIT:
-			gdata(l, Nod(OADDR, inittemps[r], nil), int(l.Type.Width))
-
-			return true
-		}
-
-	case OARRAYLIT:
-		if Isslice(r.Type) {
-			// copy slice
-			a := inittemps[r]
-
-			n1 := *l
-			n1.Xoffset = l.Xoffset + int64(Array_array)
-			gdata(&n1, Nod(OADDR, a, nil), Widthptr)
-			n1.Xoffset = l.Xoffset + int64(Array_nel)
-			gdata(&n1, r.Right, Widthint)
-			n1.Xoffset = l.Xoffset + int64(Array_cap)
-			gdata(&n1, r.Right, Widthint)
-			return true
-		}
-		fallthrough
-
-		// fall through
-	case OSTRUCTLIT:
-		p := initplans[r]
-
-		n1 := *l
-		var e *InitEntry
-		var ll *Node
-		var rr *Node
-		for i := 0; i < len(p.E); i++ {
-			e = &p.E[i]
-			n1.Xoffset = l.Xoffset + e.Xoffset
-			n1.Type = e.Expr.Type
-			if e.Expr.Op == OLITERAL {
-				gdata(&n1, e.Expr, int(n1.Type.Width))
-			} else {
-				ll = Nod(OXXX, nil, nil)
-				*ll = n1
-				ll.Orig = ll // completely separate copy
-				if !staticassign(ll, e.Expr, out) {
-					// Requires computation, but we're
-					// copying someone else's computation.
-					rr = Nod(OXXX, nil, nil)
-
-					*rr = *orig
-					rr.Orig = rr // completely separate copy
-					rr.Type = ll.Type
-					rr.Xoffset += e.Xoffset
-					setlineno(rr)
-					*out = list(*out, Nod(OAS, ll, rr))
-				}
-			}
-		}
-
-		return true
-	}
-
-	return false
-}
-
-func staticassign(l *Node, r *Node, out **NodeList) bool {
-	var n1 Node
-
-	for r.Op == OCONVNOP {
-		r = r.Left
-	}
-
-	switch r.Op {
-	//dump("not static", r);
-	default:
-		break
-
-	case ONAME:
-		return staticcopy(l, r, out)
-
-	case OLITERAL:
-		if iszero(r) {
-			return true
-		}
-		gdata(l, r, int(l.Type.Width))
-		return true
-
-	case OADDR:
-		var nam Node
-		if stataddr(&nam, r.Left) {
-			n1 := *r
-			n1.Left = &nam
-			gdata(l, &n1, int(l.Type.Width))
-			return true
-		}
-		fallthrough
-
-	case OPTRLIT:
-		switch r.Left.Op {
-		//dump("not static ptrlit", r);
-		default:
-			break
-
-			// Init pointer.
-		case OARRAYLIT, OMAPLIT, OSTRUCTLIT:
-			a := staticname(r.Left.Type, 1)
-
-			inittemps[r] = a
-			gdata(l, Nod(OADDR, a, nil), int(l.Type.Width))
-
-			// Init underlying literal.
-			if !staticassign(a, r.Left, out) {
-				*out = list(*out, Nod(OAS, a, r.Left))
-			}
-			return true
-		}
-
-	case OSTRARRAYBYTE:
-		if l.Class == PEXTERN && r.Left.Op == OLITERAL {
-			sval := r.Left.Val().U.(string)
-			slicebytes(l, sval, len(sval))
-			return true
-		}
-
-	case OARRAYLIT:
-		initplan(r)
-		if Isslice(r.Type) {
-			// Init slice.
-			ta := typ(TARRAY)
-
-			ta.Type = r.Type.Type
-			ta.Bound = Mpgetfix(r.Right.Val().U.(*Mpint))
-			a := staticname(ta, 1)
-			inittemps[r] = a
-			n1 = *l
-			n1.Xoffset = l.Xoffset + int64(Array_array)
-			gdata(&n1, Nod(OADDR, a, nil), Widthptr)
-			n1.Xoffset = l.Xoffset + int64(Array_nel)
-			gdata(&n1, r.Right, Widthint)
-			n1.Xoffset = l.Xoffset + int64(Array_cap)
-			gdata(&n1, r.Right, Widthint)
-
-			// Fall through to init underlying array.
-			l = a
-		}
-		fallthrough
-
-		// fall through
-	case OSTRUCTLIT:
-		initplan(r)
-
-		p := initplans[r]
-		n1 = *l
-		var e *InitEntry
-		var a *Node
-		for i := 0; i < len(p.E); i++ {
-			e = &p.E[i]
-			n1.Xoffset = l.Xoffset + e.Xoffset
-			n1.Type = e.Expr.Type
-			if e.Expr.Op == OLITERAL {
-				gdata(&n1, e.Expr, int(n1.Type.Width))
-			} else {
-				setlineno(e.Expr)
-				a = Nod(OXXX, nil, nil)
-				*a = n1
-				a.Orig = a // completely separate copy
-				if !staticassign(a, e.Expr, out) {
-					*out = list(*out, Nod(OAS, a, e.Expr))
-				}
-			}
-		}
-
-		return true
-
-		// TODO: Table-driven map insert.
-	case OMAPLIT:
-		break
-	}
-
-	return false
-}
-
-/*
- * from here down is the walk analysis
- * of composite literals.
- * most of the work is to generate
- * data statements for the constant
- * part of the composite literal.
- */
-func staticname(t *Type, ctxt int) *Node {
-	n := newname(Lookupf("statictmp_%.4d", statuniqgen))
-	statuniqgen++
-	if ctxt == 0 {
-		n.Name.Readonly = true
-	}
-	addvar(n, t, PEXTERN)
-	return n
-}
-
-func isliteral(n *Node) bool {
-	if n.Op == OLITERAL {
-		if n.Val().Ctype() != CTNIL {
-			return true
-		}
-	}
-	return false
-}
-
-func simplename(n *Node) bool {
-	if n.Op != ONAME {
-		return false
-	}
-	if !n.Addable {
-		return false
-	}
-	if n.Class&PHEAP != 0 {
-		return false
-	}
-	if n.Class == PPARAMREF {
-		return false
-	}
-	return true
-}
-
-func litas(l *Node, r *Node, init **NodeList) {
-	a := Nod(OAS, l, r)
-	typecheck(&a, Etop)
-	walkexpr(&a, init)
-	*init = list(*init, a)
-}
-
-const (
-	MODEDYNAM = 1
-	MODECONST = 2
-)
-
-func getdyn(n *Node, top int) int {
-	mode := 0
-	switch n.Op {
-	default:
-		if isliteral(n) {
-			return MODECONST
-		}
-		return MODEDYNAM
-
-	case OARRAYLIT:
-		if top == 0 && n.Type.Bound < 0 {
-			return MODEDYNAM
-		}
-		fallthrough
-
-	case OSTRUCTLIT:
-		break
-	}
-
-	var value *Node
-	for nl := n.List; nl != nil; nl = nl.Next {
-		value = nl.N.Right
-		mode |= getdyn(value, 0)
-		if mode == MODEDYNAM|MODECONST {
-			break
-		}
-	}
-
-	return mode
-}
-
-func structlit(ctxt int, pass int, n *Node, var_ *Node, init **NodeList) {
-	var r *Node
-	var a *Node
-	var index *Node
-	var value *Node
-
-	for nl := n.List; nl != nil; nl = nl.Next {
-		r = nl.N
-		if r.Op != OKEY {
-			Fatal("structlit: rhs not OKEY: %v", r)
-		}
-		index = r.Left
-		value = r.Right
-
-		switch value.Op {
-		case OARRAYLIT:
-			if value.Type.Bound < 0 {
-				if pass == 1 && ctxt != 0 {
-					a = Nod(ODOT, var_, newname(index.Sym))
-					slicelit(ctxt, value, a, init)
-				} else if pass == 2 && ctxt == 0 {
-					a = Nod(ODOT, var_, newname(index.Sym))
-					slicelit(ctxt, value, a, init)
-				} else if pass == 3 {
-					break
-				}
-				continue
-			}
-
-			a = Nod(ODOT, var_, newname(index.Sym))
-			arraylit(ctxt, pass, value, a, init)
-			continue
-
-		case OSTRUCTLIT:
-			a = Nod(ODOT, var_, newname(index.Sym))
-			structlit(ctxt, pass, value, a, init)
-			continue
-		}
-
-		if isliteral(value) {
-			if pass == 2 {
-				continue
-			}
-		} else if pass == 1 {
-			continue
-		}
-
-		// build list of var.field = expr
-		setlineno(value)
-		a = Nod(ODOT, var_, newname(index.Sym))
-
-		a = Nod(OAS, a, value)
-		typecheck(&a, Etop)
-		if pass == 1 {
-			walkexpr(&a, init) // add any assignments in r to top
-			if a.Op != OAS {
-				Fatal("structlit: not as")
-			}
-			a.Dodata = 2
-		} else {
-			orderstmtinplace(&a)
-			walkstmt(&a)
-		}
-
-		*init = list(*init, a)
-	}
-}
-
-func arraylit(ctxt int, pass int, n *Node, var_ *Node, init **NodeList) {
-	var r *Node
-	var a *Node
-	var index *Node
-	var value *Node
-
-	for l := n.List; l != nil; l = l.Next {
-		r = l.N
-		if r.Op != OKEY {
-			Fatal("arraylit: rhs not OKEY: %v", r)
-		}
-		index = r.Left
-		value = r.Right
-
-		switch value.Op {
-		case OARRAYLIT:
-			if value.Type.Bound < 0 {
-				if pass == 1 && ctxt != 0 {
-					a = Nod(OINDEX, var_, index)
-					slicelit(ctxt, value, a, init)
-				} else if pass == 2 && ctxt == 0 {
-					a = Nod(OINDEX, var_, index)
-					slicelit(ctxt, value, a, init)
-				} else if pass == 3 {
-					break
-				}
-				continue
-			}
-
-			a = Nod(OINDEX, var_, index)
-			arraylit(ctxt, pass, value, a, init)
-			continue
-
-		case OSTRUCTLIT:
-			a = Nod(OINDEX, var_, index)
-			structlit(ctxt, pass, value, a, init)
-			continue
-		}
-
-		if isliteral(index) && isliteral(value) {
-			if pass == 2 {
-				continue
-			}
-		} else if pass == 1 {
-			continue
-		}
-
-		// build list of var[index] = value
-		setlineno(value)
-		a = Nod(OINDEX, var_, index)
-
-		a = Nod(OAS, a, value)
-		typecheck(&a, Etop)
-		if pass == 1 {
-			walkexpr(&a, init)
-			if a.Op != OAS {
-				Fatal("arraylit: not as")
-			}
-			a.Dodata = 2
-		} else {
-			orderstmtinplace(&a)
-			walkstmt(&a)
-		}
-
-		*init = list(*init, a)
-	}
-}
-
-func slicelit(ctxt int, n *Node, var_ *Node, init **NodeList) {
-	// make an array type
-	t := shallow(n.Type)
-
-	t.Bound = Mpgetfix(n.Right.Val().U.(*Mpint))
-	t.Width = 0
-	t.Sym = nil
-	t.Haspointers = 0
-	dowidth(t)
-
-	if ctxt != 0 {
-		// put everything into static array
-		vstat := staticname(t, ctxt)
-
-		arraylit(ctxt, 1, n, vstat, init)
-		arraylit(ctxt, 2, n, vstat, init)
-
-		// copy static to slice
-		a := Nod(OSLICE, vstat, Nod(OKEY, nil, nil))
-
-		a = Nod(OAS, var_, a)
-		typecheck(&a, Etop)
-		a.Dodata = 2
-		*init = list(*init, a)
-		return
-	}
-
-	// recipe for var = []t{...}
-	// 1. make a static array
-	//	var vstat [...]t
-	// 2. assign (data statements) the constant part
-	//	vstat = constpart{}
-	// 3. make an auto pointer to array and allocate heap to it
-	//	var vauto *[...]t = new([...]t)
-	// 4. copy the static array to the auto array
-	//	*vauto = vstat
-	// 5. assign slice of allocated heap to var
-	//	var = [0:]*auto
-	// 6. for each dynamic part assign to the slice
-	//	var[i] = dynamic part
-	//
-	// an optimization is done if there is no constant part
-	//	3. var vauto *[...]t = new([...]t)
-	//	5. var = [0:]*auto
-	//	6. var[i] = dynamic part
-
-	// if the literal contains constants,
-	// make static initialized array (1),(2)
-	var vstat *Node
-
-	mode := getdyn(n, 1)
-	if mode&MODECONST != 0 {
-		vstat = staticname(t, ctxt)
-		arraylit(ctxt, 1, n, vstat, init)
-	}
-
-	// make new auto *array (3 declare)
-	vauto := temp(Ptrto(t))
-
-	// set auto to point at new temp or heap (3 assign)
-	var a *Node
-	if x := prealloc[n]; x != nil {
-		// temp allocated during order.c for dddarg
-		x.Type = t
-
-		if vstat == nil {
-			a = Nod(OAS, x, nil)
-			typecheck(&a, Etop)
-			*init = list(*init, a) // zero new temp
-		}
-
-		a = Nod(OADDR, x, nil)
-	} else if n.Esc == EscNone {
-		a = temp(t)
-		if vstat == nil {
-			a = Nod(OAS, temp(t), nil)
-			typecheck(&a, Etop)
-			*init = list(*init, a) // zero new temp
-			a = a.Left
-		}
-
-		a = Nod(OADDR, a, nil)
-	} else {
-		a = Nod(ONEW, nil, nil)
-		a.List = list1(typenod(t))
-	}
-
-	a = Nod(OAS, vauto, a)
-	typecheck(&a, Etop)
-	walkexpr(&a, init)
-	*init = list(*init, a)
-
-	if vstat != nil {
-		// copy static to heap (4)
-		a = Nod(OIND, vauto, nil)
-
-		a = Nod(OAS, a, vstat)
-		typecheck(&a, Etop)
-		walkexpr(&a, init)
-		*init = list(*init, a)
-	}
-
-	// make slice out of heap (5)
-	a = Nod(OAS, var_, Nod(OSLICE, vauto, Nod(OKEY, nil, nil)))
-
-	typecheck(&a, Etop)
-	orderstmtinplace(&a)
-	walkstmt(&a)
-	*init = list(*init, a)
-
-	// put dynamics into slice (6)
-	var value *Node
-	var r *Node
-	var index *Node
-	for l := n.List; l != nil; l = l.Next {
-		r = l.N
-		if r.Op != OKEY {
-			Fatal("slicelit: rhs not OKEY: %v", r)
-		}
-		index = r.Left
-		value = r.Right
-		a = Nod(OINDEX, var_, index)
-		a.Bounded = true
-
-		// TODO need to check bounds?
-
-		switch value.Op {
-		case OARRAYLIT:
-			if value.Type.Bound < 0 {
-				break
-			}
-			arraylit(ctxt, 2, value, a, init)
-			continue
-
-		case OSTRUCTLIT:
-			structlit(ctxt, 2, value, a, init)
-			continue
-		}
-
-		if isliteral(index) && isliteral(value) {
-			continue
-		}
-
-		// build list of var[c] = expr
-		setlineno(value)
-		a = Nod(OAS, a, value)
-
-		typecheck(&a, Etop)
-		orderstmtinplace(&a)
-		walkstmt(&a)
-		*init = list(*init, a)
-	}
-}
-
-func maplit(ctxt int, n *Node, var_ *Node, init **NodeList) {
-	var r *Node
-	var index *Node
-	var value *Node
-
-	ctxt = 0
-
-	// make the map var
-	nerr := nerrors
-
-	a := Nod(OMAKE, nil, nil)
-	a.List = list1(typenod(n.Type))
-	litas(var_, a, init)
-
-	// count the initializers
-	b := int64(0)
-
-	for l := n.List; l != nil; l = l.Next {
-		r = l.N
-
-		if r.Op != OKEY {
-			Fatal("maplit: rhs not OKEY: %v", r)
-		}
-		index = r.Left
-		value = r.Right
-
-		if isliteral(index) && isliteral(value) {
-			b++
-		}
-	}
-
-	if b != 0 {
-		// build type [count]struct { a Tindex, b Tvalue }
-		t := n.Type
-
-		tk := t.Down
-		tv := t.Type
-
-		symb := Lookup("b")
-		t = typ(TFIELD)
-		t.Type = tv
-		t.Sym = symb
-
-		syma := Lookup("a")
-		t1 := t
-		t = typ(TFIELD)
-		t.Type = tk
-		t.Sym = syma
-		t.Down = t1
-
-		t1 = t
-		t = typ(TSTRUCT)
-		t.Type = t1
-
-		t1 = t
-		t = typ(TARRAY)
-		t.Bound = b
-		t.Type = t1
-
-		dowidth(t)
-
-		// make and initialize static array
-		vstat := staticname(t, ctxt)
-
-		b := int64(0)
-		var index *Node
-		var r *Node
-		var value *Node
-		for l := n.List; l != nil; l = l.Next {
-			r = l.N
-
-			if r.Op != OKEY {
-				Fatal("maplit: rhs not OKEY: %v", r)
-			}
-			index = r.Left
-			value = r.Right
-
-			if isliteral(index) && isliteral(value) {
-				// build vstat[b].a = key;
-				setlineno(index)
-				a = Nodintconst(b)
-
-				a = Nod(OINDEX, vstat, a)
-				a = Nod(ODOT, a, newname(syma))
-				a = Nod(OAS, a, index)
-				typecheck(&a, Etop)
-				walkexpr(&a, init)
-				a.Dodata = 2
-				*init = list(*init, a)
-
-				// build vstat[b].b = value;
-				setlineno(value)
-				a = Nodintconst(b)
-
-				a = Nod(OINDEX, vstat, a)
-				a = Nod(ODOT, a, newname(symb))
-				a = Nod(OAS, a, value)
-				typecheck(&a, Etop)
-				walkexpr(&a, init)
-				a.Dodata = 2
-				*init = list(*init, a)
-
-				b++
-			}
-		}
-
-		// loop adding structure elements to map
-		// for i = 0; i < len(vstat); i++ {
-		//	map[vstat[i].a] = vstat[i].b
-		// }
-		index = temp(Types[TINT])
-
-		a = Nod(OINDEX, vstat, index)
-		a.Bounded = true
-		a = Nod(ODOT, a, newname(symb))
-
-		r = Nod(OINDEX, vstat, index)
-		r.Bounded = true
-		r = Nod(ODOT, r, newname(syma))
-		r = Nod(OINDEX, var_, r)
-
-		r = Nod(OAS, r, a)
-
-		a = Nod(OFOR, nil, nil)
-		a.Nbody = list1(r)
-
-		a.Ninit = list1(Nod(OAS, index, Nodintconst(0)))
-		a.Left = Nod(OLT, index, Nodintconst(t.Bound))
-		a.Right = Nod(OAS, index, Nod(OADD, index, Nodintconst(1)))
-
-		typecheck(&a, Etop)
-		walkstmt(&a)
-		*init = list(*init, a)
-	}
-
-	// put in dynamic entries one-at-a-time
-	var key *Node
-
-	var val *Node
-	for l := n.List; l != nil; l = l.Next {
-		r = l.N
-
-		if r.Op != OKEY {
-			Fatal("maplit: rhs not OKEY: %v", r)
-		}
-		index = r.Left
-		value = r.Right
-
-		if isliteral(index) && isliteral(value) {
-			continue
-		}
-
-		// build list of var[c] = expr.
-		// use temporary so that mapassign1 can have addressable key, val.
-		if key == nil {
-			key = temp(var_.Type.Down)
-			val = temp(var_.Type.Type)
-		}
-
-		setlineno(r.Left)
-		a = Nod(OAS, key, r.Left)
-		typecheck(&a, Etop)
-		walkstmt(&a)
-		*init = list(*init, a)
-		setlineno(r.Right)
-		a = Nod(OAS, val, r.Right)
-		typecheck(&a, Etop)
-		walkstmt(&a)
-		*init = list(*init, a)
-
-		setlineno(val)
-		a = Nod(OAS, Nod(OINDEX, var_, key), val)
-		typecheck(&a, Etop)
-		walkstmt(&a)
-		*init = list(*init, a)
-
-		if nerr != nerrors {
-			break
-		}
-	}
-
-	if key != nil {
-		a = Nod(OVARKILL, key, nil)
-		typecheck(&a, Etop)
-		*init = list(*init, a)
-		a = Nod(OVARKILL, val, nil)
-		typecheck(&a, Etop)
-		*init = list(*init, a)
-	}
-}
-
-func anylit(ctxt int, n *Node, var_ *Node, init **NodeList) {
-	t := n.Type
-	switch n.Op {
-	default:
-		Fatal("anylit: not lit")
-
-	case OPTRLIT:
-		if !Isptr[t.Etype] {
-			Fatal("anylit: not ptr")
-		}
-
-		var r *Node
-		if n.Right != nil {
-			r = Nod(OADDR, n.Right, nil)
-			typecheck(&r, Erv)
-		} else {
-			r = Nod(ONEW, nil, nil)
-			r.Typecheck = 1
-			r.Type = t
-			r.Esc = n.Esc
-		}
-
-		walkexpr(&r, init)
-		a := Nod(OAS, var_, r)
-
-		typecheck(&a, Etop)
-		*init = list(*init, a)
-
-		var_ = Nod(OIND, var_, nil)
-		typecheck(&var_, Erv|Easgn)
-		anylit(ctxt, n.Left, var_, init)
-
-	case OSTRUCTLIT:
-		if t.Etype != TSTRUCT {
-			Fatal("anylit: not struct")
-		}
-
-		if simplename(var_) && count(n.List) > 4 {
-			if ctxt == 0 {
-				// lay out static data
-				vstat := staticname(t, ctxt)
-
-				structlit(ctxt, 1, n, vstat, init)
-
-				// copy static to var
-				a := Nod(OAS, var_, vstat)
-
-				typecheck(&a, Etop)
-				walkexpr(&a, init)
-				*init = list(*init, a)
-
-				// add expressions to automatic
-				structlit(ctxt, 2, n, var_, init)
-
-				break
-			}
-
-			structlit(ctxt, 1, n, var_, init)
-			structlit(ctxt, 2, n, var_, init)
-			break
-		}
-
-		// initialize of not completely specified
-		if simplename(var_) || count(n.List) < structcount(t) {
-			a := Nod(OAS, var_, nil)
-			typecheck(&a, Etop)
-			walkexpr(&a, init)
-			*init = list(*init, a)
-		}
-
-		structlit(ctxt, 3, n, var_, init)
-
-	case OARRAYLIT:
-		if t.Etype != TARRAY {
-			Fatal("anylit: not array")
-		}
-		if t.Bound < 0 {
-			slicelit(ctxt, n, var_, init)
-			break
-		}
-
-		if simplename(var_) && count(n.List) > 4 {
-			if ctxt == 0 {
-				// lay out static data
-				vstat := staticname(t, ctxt)
-
-				arraylit(1, 1, n, vstat, init)
-
-				// copy static to automatic
-				a := Nod(OAS, var_, vstat)
-
-				typecheck(&a, Etop)
-				walkexpr(&a, init)
-				*init = list(*init, a)
-
-				// add expressions to automatic
-				arraylit(ctxt, 2, n, var_, init)
-
-				break
-			}
-
-			arraylit(ctxt, 1, n, var_, init)
-			arraylit(ctxt, 2, n, var_, init)
-			break
-		}
-
-		// initialize of not completely specified
-		if simplename(var_) || int64(count(n.List)) < t.Bound {
-			a := Nod(OAS, var_, nil)
-			typecheck(&a, Etop)
-			walkexpr(&a, init)
-			*init = list(*init, a)
-		}
-
-		arraylit(ctxt, 3, n, var_, init)
-
-	case OMAPLIT:
-		if t.Etype != TMAP {
-			Fatal("anylit: not map")
-		}
-		maplit(ctxt, n, var_, init)
-	}
-}
-
-func oaslit(n *Node, init **NodeList) bool {
-	if n.Left == nil || n.Right == nil {
-		// not a special composit literal assignment
-		return false
-	}
-	if n.Left.Type == nil || n.Right.Type == nil {
-		// not a special composit literal assignment
-		return false
-	}
-	if !simplename(n.Left) {
-		// not a special composit literal assignment
-		return false
-	}
-	if !Eqtype(n.Left.Type, n.Right.Type) {
-		// not a special composit literal assignment
-		return false
-	}
-
-	// context is init() function.
-	// implies generated data executed
-	// exactly once and not subject to races.
-	ctxt := 0
-
-	//	if(n->dodata == 1)
-	//		ctxt = 1;
-
-	switch n.Right.Op {
-	default:
-		// not a special composit literal assignment
-		return false
-
-	case OSTRUCTLIT, OARRAYLIT, OMAPLIT:
-		if vmatch1(n.Left, n.Right) {
-			// not a special composit literal assignment
-			return false
-		}
-		anylit(ctxt, n.Right, n.Left, init)
-	}
-
-	n.Op = OEMPTY
-	n.Right = nil
-	return true
-}
-
-func getlit(lit *Node) int {
-	if Smallintconst(lit) {
-		return int(Mpgetfix(lit.Val().U.(*Mpint)))
-	}
-	return -1
-}
-
-func stataddr(nam *Node, n *Node) bool {
-	if n == nil {
-		return false
-	}
-
-	switch n.Op {
-	case ONAME:
-		*nam = *n
-		return n.Addable
-
-	case ODOT:
-		if !stataddr(nam, n.Left) {
-			break
-		}
-		nam.Xoffset += n.Xoffset
-		nam.Type = n.Type
-		return true
-
-	case OINDEX:
-		if n.Left.Type.Bound < 0 {
-			break
-		}
-		if !stataddr(nam, n.Left) {
-			break
-		}
-		l := getlit(n.Right)
-		if l < 0 {
-			break
-		}
-
-		// Check for overflow.
-		if n.Type.Width != 0 && Thearch.MAXWIDTH/n.Type.Width <= int64(l) {
-			break
-		}
-		nam.Xoffset += int64(l) * n.Type.Width
-		nam.Type = n.Type
-		return true
-	}
-
-	return false
-}
-
-func initplan(n *Node) {
-	if initplans[n] != nil {
-		return
-	}
-	p := new(InitPlan)
-	initplans[n] = p
-	switch n.Op {
-	default:
-		Fatal("initplan")
-
-	case OARRAYLIT:
-		var a *Node
-		for l := n.List; l != nil; l = l.Next {
-			a = l.N
-			if a.Op != OKEY || !Smallintconst(a.Left) {
-				Fatal("initplan arraylit")
-			}
-			addvalue(p, n.Type.Type.Width*Mpgetfix(a.Left.Val().U.(*Mpint)), nil, a.Right)
-		}
-
-	case OSTRUCTLIT:
-		var a *Node
-		for l := n.List; l != nil; l = l.Next {
-			a = l.N
-			if a.Op != OKEY || a.Left.Type == nil {
-				Fatal("initplan structlit")
-			}
-			addvalue(p, a.Left.Type.Width, nil, a.Right)
-		}
-
-	case OMAPLIT:
-		var a *Node
-		for l := n.List; l != nil; l = l.Next {
-			a = l.N
-			if a.Op != OKEY {
-				Fatal("initplan maplit")
-			}
-			addvalue(p, -1, a.Left, a.Right)
-		}
-	}
-}
-
-func addvalue(p *InitPlan, xoffset int64, key *Node, n *Node) {
-	// special case: zero can be dropped entirely
-	if iszero(n) {
-		p.Zero += n.Type.Width
-		return
-	}
-
-	// special case: inline struct and array (not slice) literals
-	if isvaluelit(n) {
-		initplan(n)
-		q := initplans[n]
-		var e *InitEntry
-		for i := 0; i < len(q.E); i++ {
-			e = entry(p)
-			*e = q.E[i]
-			e.Xoffset += xoffset
-		}
-
-		return
-	}
-
-	// add to plan
-	if n.Op == OLITERAL {
-		p.Lit += n.Type.Width
-	} else {
-		p.Expr += n.Type.Width
-	}
-
-	e := entry(p)
-	e.Xoffset = xoffset
-	e.Expr = n
-}
-
-func iszero(n *Node) bool {
-	switch n.Op {
-	case OLITERAL:
-		switch n.Val().Ctype() {
-		default:
-			Dump("unexpected literal", n)
-			Fatal("iszero")
-
-		case CTNIL:
-			return true
-
-		case CTSTR:
-			return n.Val().U.(string) == ""
-
-		case CTBOOL:
-			return !n.Val().U.(bool)
-
-		case CTINT, CTRUNE:
-			return mpcmpfixc(n.Val().U.(*Mpint), 0) == 0
-
-		case CTFLT:
-			return mpcmpfltc(n.Val().U.(*Mpflt), 0) == 0
-
-		case CTCPLX:
-			return mpcmpfltc(&n.Val().U.(*Mpcplx).Real, 0) == 0 && mpcmpfltc(&n.Val().U.(*Mpcplx).Imag, 0) == 0
-		}
-
-	case OARRAYLIT:
-		if Isslice(n.Type) {
-			break
-		}
-		fallthrough
-
-		// fall through
-	case OSTRUCTLIT:
-		for l := n.List; l != nil; l = l.Next {
-			if !iszero(l.N.Right) {
-				return false
-			}
-		}
-		return true
-	}
-
-	return false
-}
-
-func isvaluelit(n *Node) bool {
-	return (n.Op == OARRAYLIT && Isfixedarray(n.Type)) || n.Op == OSTRUCTLIT
-}
-
-func entry(p *InitPlan) *InitEntry {
-	p.E = append(p.E, InitEntry{})
-	return &p.E[len(p.E)-1]
-}
-
-func gen_as_init(n *Node) bool {
-	var nr *Node
-	var nl *Node
-	var nam Node
-
-	if n.Dodata == 0 {
-		goto no
-	}
-
-	nr = n.Right
-	nl = n.Left
-	if nr == nil {
-		var nam Node
-		if !stataddr(&nam, nl) {
-			goto no
-		}
-		if nam.Class != PEXTERN {
-			goto no
-		}
-		return true
-	}
-
-	if nr.Type == nil || !Eqtype(nl.Type, nr.Type) {
-		goto no
-	}
-
-	if !stataddr(&nam, nl) {
-		goto no
-	}
-
-	if nam.Class != PEXTERN {
-		goto no
-	}
-
-	switch nr.Op {
-	default:
-		goto no
-
-	case OCONVNOP:
-		nr = nr.Left
-		if nr == nil || nr.Op != OSLICEARR {
-			goto no
-		}
-		fallthrough
-
-		// fall through
-	case OSLICEARR:
-		if nr.Right.Op == OKEY && nr.Right.Left == nil && nr.Right.Right == nil {
-			nr = nr.Left
-			gused(nil) // in case the data is the dest of a goto
-			nl := nr
-			if nr == nil || nr.Op != OADDR {
-				goto no
-			}
-			nr = nr.Left
-			if nr == nil || nr.Op != ONAME {
-				goto no
-			}
-
-			// nr is the array being converted to a slice
-			if nr.Type == nil || nr.Type.Etype != TARRAY || nr.Type.Bound < 0 {
-				goto no
-			}
-
-			nam.Xoffset += int64(Array_array)
-			gdata(&nam, nl, int(Types[Tptr].Width))
-
-			nam.Xoffset += int64(Array_nel) - int64(Array_array)
-			var nod1 Node
-			Nodconst(&nod1, Types[TINT], nr.Type.Bound)
-			gdata(&nam, &nod1, Widthint)
-
-			nam.Xoffset += int64(Array_cap) - int64(Array_nel)
-			gdata(&nam, &nod1, Widthint)
-
-			return true
-		}
-
-		goto no
-
-	case OLITERAL:
-		break
-	}
-
-	switch nr.Type.Etype {
-	default:
-		goto no
-
-	case TBOOL,
-		TINT8,
-		TUINT8,
-		TINT16,
-		TUINT16,
-		TINT32,
-		TUINT32,
-		TINT64,
-		TUINT64,
-		TINT,
-		TUINT,
-		TUINTPTR,
-		TPTR32,
-		TPTR64,
-		TFLOAT32,
-		TFLOAT64:
-		gdata(&nam, nr, int(nr.Type.Width))
-
-	case TCOMPLEX64, TCOMPLEX128:
-		gdatacomplex(&nam, nr.Val().U.(*Mpcplx))
-
-	case TSTRING:
-		gdatastring(&nam, nr.Val().U.(string))
-	}
-
-	return true
-
-no:
-	if n.Dodata == 2 {
-		Dump("\ngen_as_init", n)
-		Fatal("gen_as_init couldnt make data statement")
-	}
-
-	return false
-}
diff --git a/src/cmd/compile/internal/gc/subr.go b/src/cmd/compile/internal/gc/subr.go
deleted file mode 100644
index 866d8e1..0000000
--- a/src/cmd/compile/internal/gc/subr.go
+++ /dev/null
@@ -1,3589 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import (
-	"bytes"
-	"cmd/internal/obj"
-	"crypto/md5"
-	"encoding/binary"
-	"fmt"
-	"os"
-	"sort"
-	"strings"
-	"unicode"
-	"unicode/utf8"
-)
-
-type Error struct {
-	lineno int
-	seq    int
-	msg    string
-}
-
-var errors []Error
-
-func errorexit() {
-	Flusherrors()
-	if outfile != "" {
-		os.Remove(outfile)
-	}
-	os.Exit(2)
-}
-
-func parserline() int {
-	if parsing && theparser.Lookahead() > 0 {
-		// parser has one symbol lookahead
-		return int(prevlineno)
-	}
-	return int(lineno)
-}
-
-func adderrorname(n *Node) {
-	if n.Op != ODOT {
-		return
-	}
-	old := fmt.Sprintf("%v: undefined: %v\n", n.Line(), n.Left)
-	if len(errors) > 0 && int32(errors[len(errors)-1].lineno) == n.Lineno && errors[len(errors)-1].msg == old {
-		errors[len(errors)-1].msg = fmt.Sprintf("%v: undefined: %v in %v\n", n.Line(), n.Left, n)
-	}
-}
-
-func adderr(line int, format string, args ...interface{}) {
-	errors = append(errors, Error{
-		seq:    len(errors),
-		lineno: line,
-		msg:    fmt.Sprintf("%v: %s\n", Ctxt.Line(line), fmt.Sprintf(format, args...)),
-	})
-}
-
-type errcmp []Error
-
-func (x errcmp) Len() int {
-	return len(x)
-}
-
-func (x errcmp) Swap(i, j int) {
-	x[i], x[j] = x[j], x[i]
-}
-
-func (x errcmp) Less(i, j int) bool {
-	a := &x[i]
-	b := &x[j]
-	if a.lineno != b.lineno {
-		return a.lineno-b.lineno < 0
-	}
-	if a.seq != b.seq {
-		return a.seq-b.seq < 0
-	}
-	return stringsCompare(a.msg, b.msg) < 0
-}
-
-func Flusherrors() {
-	bstdout.Flush()
-	if len(errors) == 0 {
-		return
-	}
-	sort.Sort(errcmp(errors[:len(errors)]))
-	for i := 0; i < len(errors); i++ {
-		if i == 0 || errors[i].msg != errors[i-1].msg {
-			fmt.Printf("%s", errors[i].msg)
-		}
-	}
-	errors = errors[:0]
-}
-
-func hcrash() {
-	if Debug['h'] != 0 {
-		Flusherrors()
-		if outfile != "" {
-			os.Remove(outfile)
-		}
-		var x *int
-		*x = 0
-	}
-}
-
-func yyerrorl(line int, format string, args ...interface{}) {
-	adderr(line, format, args...)
-
-	hcrash()
-	nerrors++
-	if nsavederrors+nerrors >= 10 && Debug['e'] == 0 {
-		Flusherrors()
-		fmt.Printf("%v: too many errors\n", Ctxt.Line(line))
-		errorexit()
-	}
-}
-
-var yyerror_lastsyntax int
-
-func Yyerror(format string, args ...interface{}) {
-	msg := fmt.Sprintf(format, args...)
-	if strings.HasPrefix(msg, "syntax error") {
-		nsyntaxerrors++
-
-		// An unexpected EOF caused a syntax error. Use the previous
-		// line number since getc generated a fake newline character.
-		if curio.eofnl != 0 {
-			lexlineno = prevlineno
-		}
-
-		// only one syntax error per line
-		if int32(yyerror_lastsyntax) == lexlineno {
-			return
-		}
-		yyerror_lastsyntax = int(lexlineno)
-
-		// plain "syntax error" gets "near foo" added
-		if msg == "syntax error" {
-			yyerrorl(int(lexlineno), "syntax error near %s", lexbuf.String())
-			return
-		}
-
-		// The grammar has { and LBRACE but both show up as {.
-		// Rewrite syntax error referring to "{ or {" to say just "{".
-		// The grammar has ? and @ but only for reading imports.
-		// Silence them in ordinary errors.
-		msg = strings.Replace(msg, "{ or {", "{", -1)
-		msg = strings.Replace(msg, " or ?", "", -1)
-		msg = strings.Replace(msg, " or @", "", -1)
-
-		msg = strings.Replace(msg, "LLITERAL", litbuf, -1)
-
-		yyerrorl(int(lexlineno), "%s", msg)
-		return
-	}
-
-	adderr(parserline(), "%s", msg)
-
-	hcrash()
-	nerrors++
-	if nsavederrors+nerrors >= 10 && Debug['e'] == 0 {
-		Flusherrors()
-		fmt.Printf("%v: too many errors\n", Ctxt.Line(parserline()))
-		errorexit()
-	}
-}
-
-func Warn(fmt_ string, args ...interface{}) {
-	adderr(parserline(), fmt_, args...)
-
-	hcrash()
-}
-
-func Warnl(line int, fmt_ string, args ...interface{}) {
-	adderr(line, fmt_, args...)
-	if Debug['m'] != 0 {
-		Flusherrors()
-	}
-}
-
-func Fatal(fmt_ string, args ...interface{}) {
-	Flusherrors()
-
-	fmt.Printf("%v: internal compiler error: ", Ctxt.Line(int(lineno)))
-	fmt.Printf(fmt_, args...)
-	fmt.Printf("\n")
-
-	// If this is a released compiler version, ask for a bug report.
-	if strings.HasPrefix(obj.Getgoversion(), "release") {
-		fmt.Printf("\n")
-		fmt.Printf("Please file a bug report including a short program that triggers the error.\n")
-		fmt.Printf("https://golang.org/issue/new\n")
-	}
-
-	hcrash()
-	errorexit()
-}
-
-func linehistpragma(file string) {
-	if Debug['i'] != 0 {
-		fmt.Printf("pragma %s at line %v\n", file, Ctxt.Line(int(lexlineno)))
-	}
-	Ctxt.AddImport(file)
-}
-
-func linehistpush(file string) {
-	if Debug['i'] != 0 {
-		fmt.Printf("import %s at line %v\n", file, Ctxt.Line(int(lexlineno)))
-	}
-	Ctxt.LineHist.Push(int(lexlineno), file)
-}
-
-func linehistpop() {
-	if Debug['i'] != 0 {
-		fmt.Printf("end of import at line %v\n", Ctxt.Line(int(lexlineno)))
-	}
-	Ctxt.LineHist.Pop(int(lexlineno))
-}
-
-func linehistupdate(file string, off int) {
-	if Debug['i'] != 0 {
-		fmt.Printf("line %s at line %v\n", file, Ctxt.Line(int(lexlineno)))
-	}
-	Ctxt.LineHist.Update(int(lexlineno), file, off)
-}
-
-func setlineno(n *Node) int32 {
-	lno := lineno
-	if n != nil {
-		switch n.Op {
-		case ONAME, OTYPE, OPACK:
-			break
-
-		case OLITERAL:
-			if n.Sym != nil {
-				break
-			}
-			fallthrough
-
-		default:
-			lineno = n.Lineno
-			if lineno == 0 {
-				if Debug['K'] != 0 {
-					Warn("setlineno: line 0")
-				}
-				lineno = lno
-			}
-		}
-	}
-
-	return lno
-}
-
-func Lookup(name string) *Sym {
-	return localpkg.Lookup(name)
-}
-
-func Lookupf(format string, a ...interface{}) *Sym {
-	return Lookup(fmt.Sprintf(format, a...))
-}
-
-func LookupBytes(name []byte) *Sym {
-	return localpkg.LookupBytes(name)
-}
-
-var initSyms []*Sym
-
-var nopkg = &Pkg{
-	Syms: make(map[string]*Sym),
-}
-
-func (pkg *Pkg) Lookup(name string) *Sym {
-	if pkg == nil {
-		pkg = nopkg
-	}
-	if s := pkg.Syms[name]; s != nil {
-		return s
-	}
-
-	s := &Sym{
-		Name:    name,
-		Pkg:     pkg,
-		Lexical: LNAME,
-	}
-	if name == "init" {
-		initSyms = append(initSyms, s)
-	}
-	pkg.Syms[name] = s
-	return s
-}
-
-func (pkg *Pkg) LookupBytes(name []byte) *Sym {
-	if pkg == nil {
-		pkg = nopkg
-	}
-	if s := pkg.Syms[string(name)]; s != nil {
-		return s
-	}
-	str := internString(name)
-	return pkg.Lookup(str)
-}
-
-func Pkglookup(name string, pkg *Pkg) *Sym {
-	return pkg.Lookup(name)
-}
-
-func restrictlookup(name string, pkg *Pkg) *Sym {
-	if !exportname(name) && pkg != localpkg {
-		Yyerror("cannot refer to unexported name %s.%s", pkg.Name, name)
-	}
-	return Pkglookup(name, pkg)
-}
-
-// find all the exported symbols in package opkg
-// and make them available in the current package
-func importdot(opkg *Pkg, pack *Node) {
-	var s1 *Sym
-	var pkgerror string
-
-	n := 0
-	for _, s := range opkg.Syms {
-		if s.Def == nil {
-			continue
-		}
-		if !exportname(s.Name) || strings.ContainsRune(s.Name, 0xb7) { // 0xb7 = center dot
-			continue
-		}
-		s1 = Lookup(s.Name)
-		if s1.Def != nil {
-			pkgerror = fmt.Sprintf("during import %q", opkg.Path)
-			redeclare(s1, pkgerror)
-			continue
-		}
-
-		s1.Def = s.Def
-		s1.Block = s.Block
-		if s1.Def.Name == nil {
-			Dump("s1def", s1.Def)
-			Fatal("missing Name")
-		}
-		s1.Def.Name.Pack = pack
-		s1.Origpkg = opkg
-		n++
-	}
-
-	if n == 0 {
-		// can't possibly be used - there were no symbols
-		yyerrorl(int(pack.Lineno), "imported and not used: %q", opkg.Path)
-	}
-}
-
-func gethunk() {
-	nh := int32(NHUNK)
-	if thunk >= 10*NHUNK {
-		nh = 10 * NHUNK
-	}
-	h := string(make([]byte, nh))
-	if h == "" {
-		Flusherrors()
-		Yyerror("out of memory")
-		errorexit()
-	}
-
-	hunk = h
-	nhunk = nh
-	thunk += nh
-}
-
-func Nod(op int, nleft *Node, nright *Node) *Node {
-	n := new(Node)
-	n.Op = uint8(op)
-	n.Left = nleft
-	n.Right = nright
-	n.Lineno = int32(parserline())
-	n.Xoffset = BADWIDTH
-	n.Orig = n
-	switch op {
-	case OCLOSURE, ODCLFUNC:
-		n.Func = new(Func)
-		n.Func.FCurfn = Curfn
-	case ONAME:
-		n.Name = new(Name)
-		n.Name.Param = new(Param)
-	case OLABEL, OPACK:
-		n.Name = new(Name)
-	case ODCLFIELD:
-		if nleft != nil {
-			n.Name = nleft.Name
-		} else {
-			n.Name = new(Name)
-			n.Name.Param = new(Param)
-		}
-	}
-	if n.Name != nil {
-		n.Name.Curfn = Curfn
-	}
-	return n
-}
-
-func saveorignode(n *Node) {
-	if n.Orig != nil {
-		return
-	}
-	norig := Nod(int(n.Op), nil, nil)
-	*norig = *n
-	n.Orig = norig
-}
-
-// ispaddedfield reports whether the given field
-// is followed by padding. For the case where t is
-// the last field, total gives the size of the enclosing struct.
-func ispaddedfield(t *Type, total int64) bool {
-	if t.Etype != TFIELD {
-		Fatal("ispaddedfield called non-field %v", t)
-	}
-	if t.Down == nil {
-		return t.Width+t.Type.Width != total
-	}
-	return t.Width+t.Type.Width != t.Down.Width
-}
-
-func algtype1(t *Type, bad **Type) int {
-	if bad != nil {
-		*bad = nil
-	}
-	if t.Broke != 0 {
-		return AMEM
-	}
-	if t.Noalg != 0 {
-		return ANOEQ
-	}
-
-	switch t.Etype {
-	// will be defined later.
-	case TANY, TFORW:
-		*bad = t
-
-		return -1
-
-	case TINT8,
-		TUINT8,
-		TINT16,
-		TUINT16,
-		TINT32,
-		TUINT32,
-		TINT64,
-		TUINT64,
-		TINT,
-		TUINT,
-		TUINTPTR,
-		TBOOL,
-		TPTR32,
-		TPTR64,
-		TCHAN,
-		TUNSAFEPTR:
-		return AMEM
-
-	case TFUNC, TMAP:
-		if bad != nil {
-			*bad = t
-		}
-		return ANOEQ
-
-	case TFLOAT32:
-		return AFLOAT32
-
-	case TFLOAT64:
-		return AFLOAT64
-
-	case TCOMPLEX64:
-		return ACPLX64
-
-	case TCOMPLEX128:
-		return ACPLX128
-
-	case TSTRING:
-		return ASTRING
-
-	case TINTER:
-		if isnilinter(t) {
-			return ANILINTER
-		}
-		return AINTER
-
-	case TARRAY:
-		if Isslice(t) {
-			if bad != nil {
-				*bad = t
-			}
-			return ANOEQ
-		}
-
-		a := algtype1(t.Type, bad)
-		if a == ANOEQ || a == AMEM {
-			if a == ANOEQ && bad != nil {
-				*bad = t
-			}
-			return a
-		}
-
-		return -1 // needs special compare
-
-	case TSTRUCT:
-		if t.Type != nil && t.Type.Down == nil && !isblanksym(t.Type.Sym) {
-			// One-field struct is same as that one field alone.
-			return algtype1(t.Type.Type, bad)
-		}
-
-		ret := AMEM
-		var a int
-		for t1 := t.Type; t1 != nil; t1 = t1.Down {
-			// All fields must be comparable.
-			a = algtype1(t1.Type, bad)
-
-			if a == ANOEQ {
-				return ANOEQ
-			}
-
-			// Blank fields, padded fields, fields with non-memory
-			// equality need special compare.
-			if a != AMEM || isblanksym(t1.Sym) || ispaddedfield(t1, t.Width) {
-				ret = -1
-				continue
-			}
-		}
-
-		return ret
-	}
-
-	Fatal("algtype1: unexpected type %v", t)
-	return 0
-}
-
-func algtype(t *Type) int {
-	a := algtype1(t, nil)
-	if a == AMEM || a == ANOEQ {
-		if Isslice(t) {
-			return ASLICE
-		}
-		switch t.Width {
-		case 0:
-			return a + AMEM0 - AMEM
-
-		case 1:
-			return a + AMEM8 - AMEM
-
-		case 2:
-			return a + AMEM16 - AMEM
-
-		case 4:
-			return a + AMEM32 - AMEM
-
-		case 8:
-			return a + AMEM64 - AMEM
-
-		case 16:
-			return a + AMEM128 - AMEM
-		}
-	}
-
-	return a
-}
-
-func maptype(key *Type, val *Type) *Type {
-	if key != nil {
-		var bad *Type
-		atype := algtype1(key, &bad)
-		var mtype int
-		if bad == nil {
-			mtype = int(key.Etype)
-		} else {
-			mtype = int(bad.Etype)
-		}
-		switch mtype {
-		default:
-			if atype == ANOEQ {
-				Yyerror("invalid map key type %v", key)
-			}
-
-			// will be resolved later.
-		case TANY:
-			break
-
-			// map[key] used during definition of key.
-		// postpone check until key is fully defined.
-		// if there are multiple uses of map[key]
-		// before key is fully defined, the error
-		// will only be printed for the first one.
-		// good enough.
-		case TFORW:
-			if key.Maplineno == 0 {
-				key.Maplineno = lineno
-			}
-		}
-	}
-
-	t := typ(TMAP)
-	t.Down = key
-	t.Type = val
-	return t
-}
-
-func typ(et int) *Type {
-	t := new(Type)
-	t.Etype = uint8(et)
-	t.Width = BADWIDTH
-	t.Lineno = int(lineno)
-	t.Orig = t
-	return t
-}
-
-type methcmp []*Type
-
-func (x methcmp) Len() int {
-	return len(x)
-}
-
-func (x methcmp) Swap(i, j int) {
-	x[i], x[j] = x[j], x[i]
-}
-
-func (x methcmp) Less(i, j int) bool {
-	a := x[i]
-	b := x[j]
-	if a.Sym == nil && b.Sym == nil {
-		return false
-	}
-	if a.Sym == nil {
-		return true
-	}
-	if b.Sym == nil {
-		return 1 < 0
-	}
-	k := stringsCompare(a.Sym.Name, b.Sym.Name)
-	if k != 0 {
-		return k < 0
-	}
-	if !exportname(a.Sym.Name) {
-		k := stringsCompare(a.Sym.Pkg.Path, b.Sym.Pkg.Path)
-		if k != 0 {
-			return k < 0
-		}
-	}
-
-	return false
-}
-
-func sortinter(t *Type) *Type {
-	if t.Type == nil || t.Type.Down == nil {
-		return t
-	}
-
-	i := 0
-	for f := t.Type; f != nil; f = f.Down {
-		i++
-	}
-	a := make([]*Type, i)
-	i = 0
-	var f *Type
-	for f = t.Type; f != nil; f = f.Down {
-		a[i] = f
-		i++
-	}
-	sort.Sort(methcmp(a[:i]))
-	for {
-		tmp11 := i
-		i--
-		if tmp11 <= 0 {
-			break
-		}
-		a[i].Down = f
-		f = a[i]
-	}
-
-	t.Type = f
-	return t
-}
-
-func Nodintconst(v int64) *Node {
-	c := Nod(OLITERAL, nil, nil)
-	c.Addable = true
-	c.SetVal(Val{new(Mpint)})
-	Mpmovecfix(c.Val().U.(*Mpint), v)
-	c.Type = Types[TIDEAL]
-	ullmancalc(c)
-	return c
-}
-
-func nodfltconst(v *Mpflt) *Node {
-	c := Nod(OLITERAL, nil, nil)
-	c.Addable = true
-	c.SetVal(Val{newMpflt()})
-	mpmovefltflt(c.Val().U.(*Mpflt), v)
-	c.Type = Types[TIDEAL]
-	ullmancalc(c)
-	return c
-}
-
-func Nodconst(n *Node, t *Type, v int64) {
-	*n = Node{}
-	n.Op = OLITERAL
-	n.Addable = true
-	ullmancalc(n)
-	n.SetVal(Val{new(Mpint)})
-	Mpmovecfix(n.Val().U.(*Mpint), v)
-	n.Type = t
-
-	if Isfloat[t.Etype] {
-		Fatal("nodconst: bad type %v", t)
-	}
-}
-
-func nodnil() *Node {
-	c := Nodintconst(0)
-	c.SetVal(Val{new(NilVal)})
-	c.Type = Types[TNIL]
-	return c
-}
-
-func Nodbool(b bool) *Node {
-	c := Nodintconst(0)
-	c.SetVal(Val{b})
-	c.Type = idealbool
-	return c
-}
-
-func aindex(b *Node, t *Type) *Type {
-	bound := int64(-1) // open bound
-	typecheck(&b, Erv)
-	if b != nil {
-		switch consttype(b) {
-		default:
-			Yyerror("array bound must be an integer expression")
-
-		case CTINT, CTRUNE:
-			bound = Mpgetfix(b.Val().U.(*Mpint))
-			if bound < 0 {
-				Yyerror("array bound must be non negative")
-			}
-		}
-	}
-
-	// fixed array
-	r := typ(TARRAY)
-
-	r.Type = t
-	r.Bound = bound
-	return r
-}
-
-// treecopy recursively copies n, with the exception of
-// ONAME, OLITERAL, OTYPE, and non-iota ONONAME leaves.
-// Copies of iota ONONAME nodes are assigned the current
-// value of iota_. If lineno != 0, it sets the line number
-// of newly allocated nodes to lineno.
-func treecopy(n *Node, lineno int32) *Node {
-	if n == nil {
-		return nil
-	}
-
-	var m *Node
-	switch n.Op {
-	default:
-		m = Nod(OXXX, nil, nil)
-		*m = *n
-		m.Orig = m
-		m.Left = treecopy(n.Left, lineno)
-		m.Right = treecopy(n.Right, lineno)
-		m.List = listtreecopy(n.List, lineno)
-		if lineno != 0 {
-			m.Lineno = lineno
-		}
-		if m.Name != nil && n.Op != ODCLFIELD {
-			Dump("treecopy", n)
-			Fatal("treecopy Name")
-		}
-
-	case ONONAME:
-		if n.Sym == Lookup("iota") {
-			// Not sure yet whether this is the real iota,
-			// but make a copy of the Node* just in case,
-			// so that all the copies of this const definition
-			// don't have the same iota value.
-			m = Nod(OXXX, nil, nil)
-			*m = *n
-			if lineno != 0 {
-				m.Lineno = lineno
-			}
-			m.Name = new(Name)
-			*m.Name = *n.Name
-			m.Name.Iota = iota_
-			break
-		}
-		fallthrough
-
-	case ONAME, OLITERAL, OTYPE:
-		m = n
-	}
-
-	return m
-}
-
-func isnil(n *Node) bool {
-	if n == nil {
-		return false
-	}
-	if n.Op != OLITERAL {
-		return false
-	}
-	if n.Val().Ctype() != CTNIL {
-		return false
-	}
-	return true
-}
-
-func isptrto(t *Type, et int) bool {
-	if t == nil {
-		return false
-	}
-	if !Isptr[t.Etype] {
-		return false
-	}
-	t = t.Type
-	if t == nil {
-		return false
-	}
-	if int(t.Etype) != et {
-		return false
-	}
-	return true
-}
-
-func Istype(t *Type, et int) bool {
-	return t != nil && int(t.Etype) == et
-}
-
-func Isfixedarray(t *Type) bool {
-	return t != nil && t.Etype == TARRAY && t.Bound >= 0
-}
-
-func Isslice(t *Type) bool {
-	return t != nil && t.Etype == TARRAY && t.Bound < 0
-}
-
-func isblank(n *Node) bool {
-	if n == nil {
-		return false
-	}
-	return isblanksym(n.Sym)
-}
-
-func isblanksym(s *Sym) bool {
-	return s != nil && s.Name == "_"
-}
-
-func Isinter(t *Type) bool {
-	return t != nil && t.Etype == TINTER
-}
-
-func isnilinter(t *Type) bool {
-	if !Isinter(t) {
-		return false
-	}
-	if t.Type != nil {
-		return false
-	}
-	return true
-}
-
-func isideal(t *Type) bool {
-	if t == nil {
-		return false
-	}
-	if t == idealstring || t == idealbool {
-		return true
-	}
-	switch t.Etype {
-	case TNIL, TIDEAL:
-		return true
-	}
-
-	return false
-}
-
-/*
- * given receiver of type t (t == r or t == *r)
- * return type to hang methods off (r).
- */
-func methtype(t *Type, mustname int) *Type {
-	if t == nil {
-		return nil
-	}
-
-	// strip away pointer if it's there
-	if Isptr[t.Etype] {
-		if t.Sym != nil {
-			return nil
-		}
-		t = t.Type
-		if t == nil {
-			return nil
-		}
-	}
-
-	// need a type name
-	if t.Sym == nil && (mustname != 0 || t.Etype != TSTRUCT) {
-		return nil
-	}
-
-	// check types
-	if !issimple[t.Etype] {
-		switch t.Etype {
-		default:
-			return nil
-
-		case TSTRUCT,
-			TARRAY,
-			TMAP,
-			TCHAN,
-			TSTRING,
-			TFUNC:
-			break
-		}
-	}
-
-	return t
-}
-
-func cplxsubtype(et int) int {
-	switch et {
-	case TCOMPLEX64:
-		return TFLOAT32
-
-	case TCOMPLEX128:
-		return TFLOAT64
-	}
-
-	Fatal("cplxsubtype: %v\n", Econv(int(et), 0))
-	return 0
-}
-
-func eqnote(a, b *string) bool {
-	return a == b || a != nil && b != nil && *a == *b
-}
-
-type TypePairList struct {
-	t1   *Type
-	t2   *Type
-	next *TypePairList
-}
-
-func onlist(l *TypePairList, t1 *Type, t2 *Type) bool {
-	for ; l != nil; l = l.next {
-		if (l.t1 == t1 && l.t2 == t2) || (l.t1 == t2 && l.t2 == t1) {
-			return true
-		}
-	}
-	return false
-}
-
-// Return 1 if t1 and t2 are identical, following the spec rules.
-//
-// Any cyclic type must go through a named type, and if one is
-// named, it is only identical to the other if they are the same
-// pointer (t1 == t2), so there's no chance of chasing cycles
-// ad infinitum, so no need for a depth counter.
-func Eqtype(t1 *Type, t2 *Type) bool {
-	return eqtype1(t1, t2, nil)
-}
-
-func eqtype1(t1 *Type, t2 *Type, assumed_equal *TypePairList) bool {
-	if t1 == t2 {
-		return true
-	}
-	if t1 == nil || t2 == nil || t1.Etype != t2.Etype {
-		return false
-	}
-	if t1.Sym != nil || t2.Sym != nil {
-		// Special case: we keep byte and uint8 separate
-		// for error messages.  Treat them as equal.
-		switch t1.Etype {
-		case TUINT8:
-			if (t1 == Types[TUINT8] || t1 == bytetype) && (t2 == Types[TUINT8] || t2 == bytetype) {
-				return true
-			}
-
-		case TINT, TINT32:
-			if (t1 == Types[runetype.Etype] || t1 == runetype) && (t2 == Types[runetype.Etype] || t2 == runetype) {
-				return true
-			}
-		}
-
-		return false
-	}
-
-	if onlist(assumed_equal, t1, t2) {
-		return true
-	}
-	var l TypePairList
-	l.next = assumed_equal
-	l.t1 = t1
-	l.t2 = t2
-
-	switch t1.Etype {
-	case TINTER, TSTRUCT:
-		t1 = t1.Type
-		t2 = t2.Type
-		for ; t1 != nil && t2 != nil; t1, t2 = t1.Down, t2.Down {
-			if t1.Etype != TFIELD || t2.Etype != TFIELD {
-				Fatal("struct/interface missing field: %v %v", t1, t2)
-			}
-			if t1.Sym != t2.Sym || t1.Embedded != t2.Embedded || !eqtype1(t1.Type, t2.Type, &l) || !eqnote(t1.Note, t2.Note) {
-				return false
-			}
-		}
-
-		if t1 == nil && t2 == nil {
-			return true
-		}
-		return false
-
-		// Loop over structs: receiver, in, out.
-	case TFUNC:
-		t1 = t1.Type
-		t2 = t2.Type
-		for ; t1 != nil && t2 != nil; t1, t2 = t1.Down, t2.Down {
-			if t1.Etype != TSTRUCT || t2.Etype != TSTRUCT {
-				Fatal("func missing struct: %v %v", t1, t2)
-			}
-
-			// Loop over fields in structs, ignoring argument names.
-			ta := t1.Type
-			tb := t2.Type
-			for ; ta != nil && tb != nil; ta, tb = ta.Down, tb.Down {
-				if ta.Etype != TFIELD || tb.Etype != TFIELD {
-					Fatal("func struct missing field: %v %v", ta, tb)
-				}
-				if ta.Isddd != tb.Isddd || !eqtype1(ta.Type, tb.Type, &l) {
-					return false
-				}
-			}
-
-			if ta != nil || tb != nil {
-				return false
-			}
-		}
-
-		if t1 == nil && t2 == nil {
-			return true
-		}
-		return false
-
-	case TARRAY:
-		if t1.Bound != t2.Bound {
-			return false
-		}
-
-	case TCHAN:
-		if t1.Chan != t2.Chan {
-			return false
-		}
-	}
-
-	if eqtype1(t1.Down, t2.Down, &l) && eqtype1(t1.Type, t2.Type, &l) {
-		return true
-	}
-	return false
-}
-
-// Are t1 and t2 equal struct types when field names are ignored?
-// For deciding whether the result struct from g can be copied
-// directly when compiling f(g()).
-func eqtypenoname(t1 *Type, t2 *Type) bool {
-	if t1 == nil || t2 == nil || t1.Etype != TSTRUCT || t2.Etype != TSTRUCT {
-		return false
-	}
-
-	t1 = t1.Type
-	t2 = t2.Type
-	for {
-		if !Eqtype(t1, t2) {
-			return false
-		}
-		if t1 == nil {
-			return true
-		}
-		t1 = t1.Down
-		t2 = t2.Down
-	}
-}
-
-// Is type src assignment compatible to type dst?
-// If so, return op code to use in conversion.
-// If not, return 0.
-func assignop(src *Type, dst *Type, why *string) int {
-	if why != nil {
-		*why = ""
-	}
-
-	// TODO(rsc,lvd): This behaves poorly in the presence of inlining.
-	// https://golang.org/issue/2795
-	if safemode != 0 && importpkg == nil && src != nil && src.Etype == TUNSAFEPTR {
-		Yyerror("cannot use unsafe.Pointer")
-		errorexit()
-	}
-
-	if src == dst {
-		return OCONVNOP
-	}
-	if src == nil || dst == nil || src.Etype == TFORW || dst.Etype == TFORW || src.Orig == nil || dst.Orig == nil {
-		return 0
-	}
-
-	// 1. src type is identical to dst.
-	if Eqtype(src, dst) {
-		return OCONVNOP
-	}
-
-	// 2. src and dst have identical underlying types
-	// and either src or dst is not a named type or
-	// both are empty interface types.
-	// For assignable but different non-empty interface types,
-	// we want to recompute the itab.
-	if Eqtype(src.Orig, dst.Orig) && (src.Sym == nil || dst.Sym == nil || isnilinter(src)) {
-		return OCONVNOP
-	}
-
-	// 3. dst is an interface type and src implements dst.
-	if dst.Etype == TINTER && src.Etype != TNIL {
-		var missing *Type
-		var ptr int
-		var have *Type
-		if implements(src, dst, &missing, &have, &ptr) {
-			return OCONVIFACE
-		}
-
-		// we'll have complained about this method anyway, suppress spurious messages.
-		if have != nil && have.Sym == missing.Sym && (have.Type.Broke != 0 || missing.Type.Broke != 0) {
-			return OCONVIFACE
-		}
-
-		if why != nil {
-			if isptrto(src, TINTER) {
-				*why = fmt.Sprintf(":\n\t%v is pointer to interface, not interface", src)
-			} else if have != nil && have.Sym == missing.Sym && have.Nointerface {
-				*why = fmt.Sprintf(":\n\t%v does not implement %v (%v method is marked 'nointerface')", src, dst, missing.Sym)
-			} else if have != nil && have.Sym == missing.Sym {
-				*why = fmt.Sprintf(":\n\t%v does not implement %v (wrong type for %v method)\n"+"\t\thave %v%v\n\t\twant %v%v", src, dst, missing.Sym, have.Sym, Tconv(have.Type, obj.FmtShort|obj.FmtByte), missing.Sym, Tconv(missing.Type, obj.FmtShort|obj.FmtByte))
-			} else if ptr != 0 {
-				*why = fmt.Sprintf(":\n\t%v does not implement %v (%v method has pointer receiver)", src, dst, missing.Sym)
-			} else if have != nil {
-				*why = fmt.Sprintf(":\n\t%v does not implement %v (missing %v method)\n"+"\t\thave %v%v\n\t\twant %v%v", src, dst, missing.Sym, have.Sym, Tconv(have.Type, obj.FmtShort|obj.FmtByte), missing.Sym, Tconv(missing.Type, obj.FmtShort|obj.FmtByte))
-			} else {
-				*why = fmt.Sprintf(":\n\t%v does not implement %v (missing %v method)", src, dst, missing.Sym)
-			}
-		}
-
-		return 0
-	}
-
-	if isptrto(dst, TINTER) {
-		if why != nil {
-			*why = fmt.Sprintf(":\n\t%v is pointer to interface, not interface", dst)
-		}
-		return 0
-	}
-
-	if src.Etype == TINTER && dst.Etype != TBLANK {
-		var have *Type
-		var ptr int
-		var missing *Type
-		if why != nil && implements(dst, src, &missing, &have, &ptr) {
-			*why = ": need type assertion"
-		}
-		return 0
-	}
-
-	// 4. src is a bidirectional channel value, dst is a channel type,
-	// src and dst have identical element types, and
-	// either src or dst is not a named type.
-	if src.Etype == TCHAN && src.Chan == Cboth && dst.Etype == TCHAN {
-		if Eqtype(src.Type, dst.Type) && (src.Sym == nil || dst.Sym == nil) {
-			return OCONVNOP
-		}
-	}
-
-	// 5. src is the predeclared identifier nil and dst is a nillable type.
-	if src.Etype == TNIL {
-		switch dst.Etype {
-		case TARRAY:
-			if dst.Bound != -100 { // not slice
-				break
-			}
-			fallthrough
-
-		case TPTR32,
-			TPTR64,
-			TFUNC,
-			TMAP,
-			TCHAN,
-			TINTER:
-			return OCONVNOP
-		}
-	}
-
-	// 6. rule about untyped constants - already converted by defaultlit.
-
-	// 7. Any typed value can be assigned to the blank identifier.
-	if dst.Etype == TBLANK {
-		return OCONVNOP
-	}
-
-	return 0
-}
-
-// Can we convert a value of type src to a value of type dst?
-// If so, return op code to use in conversion (maybe OCONVNOP).
-// If not, return 0.
-func convertop(src *Type, dst *Type, why *string) int {
-	if why != nil {
-		*why = ""
-	}
-
-	if src == dst {
-		return OCONVNOP
-	}
-	if src == nil || dst == nil {
-		return 0
-	}
-
-	// 1. src can be assigned to dst.
-	op := assignop(src, dst, why)
-	if op != 0 {
-		return op
-	}
-
-	// The rules for interfaces are no different in conversions
-	// than assignments.  If interfaces are involved, stop now
-	// with the good message from assignop.
-	// Otherwise clear the error.
-	if src.Etype == TINTER || dst.Etype == TINTER {
-		return 0
-	}
-	if why != nil {
-		*why = ""
-	}
-
-	// 2. src and dst have identical underlying types.
-	if Eqtype(src.Orig, dst.Orig) {
-		return OCONVNOP
-	}
-
-	// 3. src and dst are unnamed pointer types
-	// and their base types have identical underlying types.
-	if Isptr[src.Etype] && Isptr[dst.Etype] && src.Sym == nil && dst.Sym == nil {
-		if Eqtype(src.Type.Orig, dst.Type.Orig) {
-			return OCONVNOP
-		}
-	}
-
-	// 4. src and dst are both integer or floating point types.
-	if (Isint[src.Etype] || Isfloat[src.Etype]) && (Isint[dst.Etype] || Isfloat[dst.Etype]) {
-		if Simtype[src.Etype] == Simtype[dst.Etype] {
-			return OCONVNOP
-		}
-		return OCONV
-	}
-
-	// 5. src and dst are both complex types.
-	if Iscomplex[src.Etype] && Iscomplex[dst.Etype] {
-		if Simtype[src.Etype] == Simtype[dst.Etype] {
-			return OCONVNOP
-		}
-		return OCONV
-	}
-
-	// 6. src is an integer or has type []byte or []rune
-	// and dst is a string type.
-	if Isint[src.Etype] && dst.Etype == TSTRING {
-		return ORUNESTR
-	}
-
-	if Isslice(src) && dst.Etype == TSTRING {
-		if src.Type.Etype == bytetype.Etype {
-			return OARRAYBYTESTR
-		}
-		if src.Type.Etype == runetype.Etype {
-			return OARRAYRUNESTR
-		}
-	}
-
-	// 7. src is a string and dst is []byte or []rune.
-	// String to slice.
-	if src.Etype == TSTRING && Isslice(dst) {
-		if dst.Type.Etype == bytetype.Etype {
-			return OSTRARRAYBYTE
-		}
-		if dst.Type.Etype == runetype.Etype {
-			return OSTRARRAYRUNE
-		}
-	}
-
-	// 8. src is a pointer or uintptr and dst is unsafe.Pointer.
-	if (Isptr[src.Etype] || src.Etype == TUINTPTR) && dst.Etype == TUNSAFEPTR {
-		return OCONVNOP
-	}
-
-	// 9. src is unsafe.Pointer and dst is a pointer or uintptr.
-	if src.Etype == TUNSAFEPTR && (Isptr[dst.Etype] || dst.Etype == TUINTPTR) {
-		return OCONVNOP
-	}
-
-	return 0
-}
-
-func assignconv(n *Node, t *Type, context string) *Node {
-	return assignconvfn(n, t, func() string { return context })
-}
-
-// Convert node n for assignment to type t.
-func assignconvfn(n *Node, t *Type, context func() string) *Node {
-	if n == nil || n.Type == nil || n.Type.Broke != 0 {
-		return n
-	}
-
-	if t.Etype == TBLANK && n.Type.Etype == TNIL {
-		Yyerror("use of untyped nil")
-	}
-
-	old := n
-	old.Diag++ // silence errors about n; we'll issue one below
-	defaultlit(&n, t)
-	old.Diag--
-	if t.Etype == TBLANK {
-		return n
-	}
-
-	// Convert ideal bool from comparison to plain bool
-	// if the next step is non-bool (like interface{}).
-	if n.Type == idealbool && t.Etype != TBOOL {
-		if n.Op == ONAME || n.Op == OLITERAL {
-			r := Nod(OCONVNOP, n, nil)
-			r.Type = Types[TBOOL]
-			r.Typecheck = 1
-			r.Implicit = true
-			n = r
-		}
-	}
-
-	if Eqtype(n.Type, t) {
-		return n
-	}
-
-	var why string
-	op := assignop(n.Type, t, &why)
-	if op == 0 {
-		Yyerror("cannot use %v as type %v in %s%s", Nconv(n, obj.FmtLong), t, context(), why)
-		op = OCONV
-	}
-
-	r := Nod(op, n, nil)
-	r.Type = t
-	r.Typecheck = 1
-	r.Implicit = true
-	r.Orig = n.Orig
-	return r
-}
-
-// substArgTypes substitutes the given list of types for
-// successive occurrences of the "any" placeholder in the
-// type syntax expression n.Type.
-func substArgTypes(n *Node, types ...*Type) {
-	for _, t := range types {
-		dowidth(t)
-	}
-	substAny(&n.Type, &types)
-	if len(types) > 0 {
-		Fatal("substArgTypes: too many argument types")
-	}
-}
-
-// substAny walks *tp, replacing instances of "any" with successive
-// elements removed from types.
-func substAny(tp **Type, types *[]*Type) {
-	for {
-		t := *tp
-		if t == nil {
-			return
-		}
-		if t.Etype == TANY && t.Copyany != 0 {
-			if len(*types) == 0 {
-				Fatal("substArgTypes: not enough argument types")
-			}
-			*tp = (*types)[0]
-			*types = (*types)[1:]
-		}
-
-		switch t.Etype {
-		case TPTR32, TPTR64, TCHAN, TARRAY:
-			tp = &t.Type
-			continue
-
-		case TMAP:
-			substAny(&t.Down, types)
-			tp = &t.Type
-			continue
-
-		case TFUNC:
-			substAny(&t.Type, types)
-			substAny(&t.Type.Down.Down, types)
-			substAny(&t.Type.Down, types)
-
-		case TSTRUCT:
-			for t = t.Type; t != nil; t = t.Down {
-				substAny(&t.Type, types)
-			}
-		}
-		return
-	}
-}
-
-/*
- * Is this a 64-bit type?
- */
-func Is64(t *Type) bool {
-	if t == nil {
-		return false
-	}
-	switch Simtype[t.Etype] {
-	case TINT64, TUINT64, TPTR64:
-		return true
-	}
-
-	return false
-}
-
-/*
- * Is a conversion between t1 and t2 a no-op?
- */
-func Noconv(t1 *Type, t2 *Type) bool {
-	e1 := int(Simtype[t1.Etype])
-	e2 := int(Simtype[t2.Etype])
-
-	switch e1 {
-	case TINT8, TUINT8:
-		return e2 == TINT8 || e2 == TUINT8
-
-	case TINT16, TUINT16:
-		return e2 == TINT16 || e2 == TUINT16
-
-	case TINT32, TUINT32, TPTR32:
-		return e2 == TINT32 || e2 == TUINT32 || e2 == TPTR32
-
-	case TINT64, TUINT64, TPTR64:
-		return e2 == TINT64 || e2 == TUINT64 || e2 == TPTR64
-
-	case TFLOAT32:
-		return e2 == TFLOAT32
-
-	case TFLOAT64:
-		return e2 == TFLOAT64
-	}
-
-	return false
-}
-
-func shallow(t *Type) *Type {
-	if t == nil {
-		return nil
-	}
-	nt := typ(0)
-	*nt = *t
-	if t.Orig == t {
-		nt.Orig = nt
-	}
-	return nt
-}
-
-func deep(t *Type) *Type {
-	if t == nil {
-		return nil
-	}
-
-	var nt *Type
-	switch t.Etype {
-	default:
-		nt = t // share from here down
-
-	case TANY:
-		nt = shallow(t)
-		nt.Copyany = 1
-
-	case TPTR32, TPTR64, TCHAN, TARRAY:
-		nt = shallow(t)
-		nt.Type = deep(t.Type)
-
-	case TMAP:
-		nt = shallow(t)
-		nt.Down = deep(t.Down)
-		nt.Type = deep(t.Type)
-
-	case TFUNC:
-		nt = shallow(t)
-		nt.Type = deep(t.Type)
-		nt.Type.Down = deep(t.Type.Down)
-		nt.Type.Down.Down = deep(t.Type.Down.Down)
-
-	case TSTRUCT:
-		nt = shallow(t)
-		nt.Type = shallow(t.Type)
-		xt := nt.Type
-
-		for t = t.Type; t != nil; t = t.Down {
-			xt.Type = deep(t.Type)
-			xt.Down = shallow(t.Down)
-			xt = xt.Down
-		}
-	}
-
-	return nt
-}
-
-func syslook(name string, copy int) *Node {
-	s := Pkglookup(name, Runtimepkg)
-	if s == nil || s.Def == nil {
-		Fatal("syslook: can't find runtime.%s", name)
-	}
-
-	if copy == 0 {
-		return s.Def
-	}
-
-	n := Nod(0, nil, nil)
-	*n = *s.Def
-	n.Type = deep(s.Def.Type)
-
-	return n
-}
-
-/*
- * compute a hash value for type t.
- * if t is a method type, ignore the receiver
- * so that the hash can be used in interface checks.
- * %T already contains
- * all the necessary logic to generate a representation
- * of the type that completely describes it.
- * using smprint here avoids duplicating that code.
- * using md5 here is overkill, but i got tired of
- * accidental collisions making the runtime think
- * two types are equal when they really aren't.
- */
-func typehash(t *Type) uint32 {
-	var p string
-
-	if t.Thistuple != 0 {
-		// hide method receiver from Tpretty
-		t.Thistuple = 0
-
-		p = Tconv(t, obj.FmtLeft|obj.FmtUnsigned)
-		t.Thistuple = 1
-	} else {
-		p = Tconv(t, obj.FmtLeft|obj.FmtUnsigned)
-	}
-
-	//print("typehash: %s\n", p);
-	h := md5.Sum([]byte(p))
-	return binary.LittleEndian.Uint32(h[:4])
-}
-
-var initPtrtoDone bool
-
-var (
-	ptrToUint8  *Type
-	ptrToAny    *Type
-	ptrToString *Type
-	ptrToBool   *Type
-	ptrToInt32  *Type
-)
-
-func initPtrto() {
-	ptrToUint8 = ptrto1(Types[TUINT8])
-	ptrToAny = ptrto1(Types[TANY])
-	ptrToString = ptrto1(Types[TSTRING])
-	ptrToBool = ptrto1(Types[TBOOL])
-	ptrToInt32 = ptrto1(Types[TINT32])
-}
-
-func ptrto1(t *Type) *Type {
-	t1 := typ(Tptr)
-	t1.Type = t
-	t1.Width = int64(Widthptr)
-	t1.Align = uint8(Widthptr)
-	return t1
-}
-
-// Ptrto returns the Type *t.
-// The returned struct must not be modified.
-func Ptrto(t *Type) *Type {
-	if Tptr == 0 {
-		Fatal("ptrto: no tptr")
-	}
-	// Reduce allocations by pre-creating common cases.
-	if !initPtrtoDone {
-		initPtrto()
-		initPtrtoDone = true
-	}
-	switch t {
-	case Types[TUINT8]:
-		return ptrToUint8
-	case Types[TINT32]:
-		return ptrToInt32
-	case Types[TANY]:
-		return ptrToAny
-	case Types[TSTRING]:
-		return ptrToString
-	case Types[TBOOL]:
-		return ptrToBool
-	}
-	return ptrto1(t)
-}
-
-func frame(context int) {
-	var l *NodeList
-
-	if context != 0 {
-		fmt.Printf("--- external frame ---\n")
-		l = externdcl
-	} else if Curfn != nil {
-		fmt.Printf("--- %v frame ---\n", Curfn.Func.Nname.Sym)
-		l = Curfn.Func.Dcl
-	} else {
-		return
-	}
-
-	var n *Node
-	var w int64
-	for ; l != nil; l = l.Next {
-		n = l.N
-		w = -1
-		if n.Type != nil {
-			w = n.Type.Width
-		}
-		switch n.Op {
-		case ONAME:
-			fmt.Printf("%v %v G%d %v width=%d\n", Oconv(int(n.Op), 0), n.Sym, n.Name.Vargen, n.Type, w)
-
-		case OTYPE:
-			fmt.Printf("%v %v width=%d\n", Oconv(int(n.Op), 0), n.Type, w)
-		}
-	}
-}
-
-/*
- * calculate sethi/ullman number
- * roughly how many registers needed to
- * compile a node. used to compile the
- * hardest side first to minimize registers.
- */
-func ullmancalc(n *Node) {
-	if n == nil {
-		return
-	}
-
-	var ul int
-	var ur int
-	if n.Ninit != nil {
-		ul = UINF
-		goto out
-	}
-
-	switch n.Op {
-	case OREGISTER, OLITERAL, ONAME:
-		ul = 1
-		if n.Class == PPARAMREF || (n.Class&PHEAP != 0) {
-			ul++
-		}
-		goto out
-
-	case OCALL, OCALLFUNC, OCALLMETH, OCALLINTER, OASWB:
-		ul = UINF
-		goto out
-
-		// hard with race detector
-	case OANDAND, OOROR:
-		if flag_race != 0 {
-			ul = UINF
-			goto out
-		}
-	}
-
-	ul = 1
-	if n.Left != nil {
-		ul = int(n.Left.Ullman)
-	}
-	ur = 1
-	if n.Right != nil {
-		ur = int(n.Right.Ullman)
-	}
-	if ul == ur {
-		ul += 1
-	}
-	if ur > ul {
-		ul = ur
-	}
-
-out:
-	if ul > 200 {
-		ul = 200 // clamp to uchar with room to grow
-	}
-	n.Ullman = uint8(ul)
-}
-
-func badtype(o int, tl *Type, tr *Type) {
-	fmt_ := ""
-	if tl != nil {
-		fmt_ += fmt.Sprintf("\n\t%v", tl)
-	}
-	if tr != nil {
-		fmt_ += fmt.Sprintf("\n\t%v", tr)
-	}
-
-	// common mistake: *struct and *interface.
-	if tl != nil && tr != nil && Isptr[tl.Etype] && Isptr[tr.Etype] {
-		if tl.Type.Etype == TSTRUCT && tr.Type.Etype == TINTER {
-			fmt_ += "\n\t(*struct vs *interface)"
-		} else if tl.Type.Etype == TINTER && tr.Type.Etype == TSTRUCT {
-			fmt_ += "\n\t(*interface vs *struct)"
-		}
-	}
-
-	s := fmt_
-	Yyerror("illegal types for operand: %v%s", Oconv(int(o), 0), s)
-}
-
-/*
- * iterator to walk a structure declaration
- */
-func Structfirst(s *Iter, nn **Type) *Type {
-	var t *Type
-
-	n := *nn
-	if n == nil {
-		goto bad
-	}
-
-	switch n.Etype {
-	default:
-		goto bad
-
-	case TSTRUCT, TINTER, TFUNC:
-		break
-	}
-
-	t = n.Type
-	if t == nil {
-		return nil
-	}
-
-	if t.Etype != TFIELD {
-		Fatal("structfirst: not field %v", t)
-	}
-
-	s.T = t
-	return t
-
-bad:
-	Fatal("structfirst: not struct %v", n)
-
-	return nil
-}
-
-func structnext(s *Iter) *Type {
-	n := s.T
-	t := n.Down
-	if t == nil {
-		return nil
-	}
-
-	if t.Etype != TFIELD {
-		Fatal("structnext: not struct %v", n)
-
-		return nil
-	}
-
-	s.T = t
-	return t
-}
-
-/*
- * iterator to this and inargs in a function
- */
-func funcfirst(s *Iter, t *Type) *Type {
-	var fp *Type
-
-	if t == nil {
-		goto bad
-	}
-
-	if t.Etype != TFUNC {
-		goto bad
-	}
-
-	s.Tfunc = t
-	s.Done = 0
-	fp = Structfirst(s, getthis(t))
-	if fp == nil {
-		s.Done = 1
-		fp = Structfirst(s, getinarg(t))
-	}
-
-	return fp
-
-bad:
-	Fatal("funcfirst: not func %v", t)
-	return nil
-}
-
-func funcnext(s *Iter) *Type {
-	fp := structnext(s)
-	if fp == nil && s.Done == 0 {
-		s.Done = 1
-		fp = Structfirst(s, getinarg(s.Tfunc))
-	}
-
-	return fp
-}
-
-func getthis(t *Type) **Type {
-	if t.Etype != TFUNC {
-		Fatal("getthis: not a func %v", t)
-	}
-	return &t.Type
-}
-
-func Getoutarg(t *Type) **Type {
-	if t.Etype != TFUNC {
-		Fatal("getoutarg: not a func %v", t)
-	}
-	return &t.Type.Down
-}
-
-func getinarg(t *Type) **Type {
-	if t.Etype != TFUNC {
-		Fatal("getinarg: not a func %v", t)
-	}
-	return &t.Type.Down.Down
-}
-
-func getthisx(t *Type) *Type {
-	return *getthis(t)
-}
-
-func getoutargx(t *Type) *Type {
-	return *Getoutarg(t)
-}
-
-func getinargx(t *Type) *Type {
-	return *getinarg(t)
-}
-
-// Brcom returns !(op).
-// For example, Brcom(==) is !=.
-func Brcom(a int) int {
-	switch a {
-	case OEQ:
-		return ONE
-	case ONE:
-		return OEQ
-	case OLT:
-		return OGE
-	case OGT:
-		return OLE
-	case OLE:
-		return OGT
-	case OGE:
-		return OLT
-	}
-	Fatal("brcom: no com for %v\n", Oconv(a, 0))
-	return a
-}
-
-// Brrev returns reverse(op).
-// For example, Brrev(<) is >.
-func Brrev(a int) int {
-	switch a {
-	case OEQ:
-		return OEQ
-	case ONE:
-		return ONE
-	case OLT:
-		return OGT
-	case OGT:
-		return OLT
-	case OLE:
-		return OGE
-	case OGE:
-		return OLE
-	}
-	Fatal("brrev: no rev for %v\n", Oconv(a, 0))
-	return a
-}
-
-/*
- * return side effect-free n, appending side effects to init.
- * result is assignable if n is.
- */
-func safeexpr(n *Node, init **NodeList) *Node {
-	if n == nil {
-		return nil
-	}
-
-	if n.Ninit != nil {
-		walkstmtlist(n.Ninit)
-		*init = concat(*init, n.Ninit)
-		n.Ninit = nil
-	}
-
-	switch n.Op {
-	case ONAME, OLITERAL:
-		return n
-
-	case ODOT, OLEN, OCAP:
-		l := safeexpr(n.Left, init)
-		if l == n.Left {
-			return n
-		}
-		r := Nod(OXXX, nil, nil)
-		*r = *n
-		r.Left = l
-		typecheck(&r, Erv)
-		walkexpr(&r, init)
-		return r
-
-	case ODOTPTR, OIND:
-		l := safeexpr(n.Left, init)
-		if l == n.Left {
-			return n
-		}
-		a := Nod(OXXX, nil, nil)
-		*a = *n
-		a.Left = l
-		walkexpr(&a, init)
-		return a
-
-	case OINDEX, OINDEXMAP:
-		l := safeexpr(n.Left, init)
-		r := safeexpr(n.Right, init)
-		if l == n.Left && r == n.Right {
-			return n
-		}
-		a := Nod(OXXX, nil, nil)
-		*a = *n
-		a.Left = l
-		a.Right = r
-		walkexpr(&a, init)
-		return a
-	}
-
-	// make a copy; must not be used as an lvalue
-	if islvalue(n) {
-		Fatal("missing lvalue case in safeexpr: %v", n)
-	}
-	return cheapexpr(n, init)
-}
-
-func copyexpr(n *Node, t *Type, init **NodeList) *Node {
-	l := temp(t)
-	a := Nod(OAS, l, n)
-	typecheck(&a, Etop)
-	walkexpr(&a, init)
-	*init = list(*init, a)
-	return l
-}
-
-/*
- * return side-effect free and cheap n, appending side effects to init.
- * result may not be assignable.
- */
-func cheapexpr(n *Node, init **NodeList) *Node {
-	switch n.Op {
-	case ONAME, OLITERAL:
-		return n
-	}
-
-	return copyexpr(n, n.Type, init)
-}
-
-/*
- * return n in a local variable of type t if it is not already.
- * the value is guaranteed not to change except by direct
- * assignment to it.
- */
-func localexpr(n *Node, t *Type, init **NodeList) *Node {
-	if n.Op == ONAME && (!n.Addrtaken || strings.HasPrefix(n.Sym.Name, "autotmp_")) && (n.Class == PAUTO || n.Class == PPARAM || n.Class == PPARAMOUT) && convertop(n.Type, t, nil) == OCONVNOP {
-		return n
-	}
-
-	return copyexpr(n, t, init)
-}
-
-func Setmaxarg(t *Type, extra int32) {
-	dowidth(t)
-	w := t.Argwid
-	if w >= Thearch.MAXWIDTH {
-		Fatal("bad argwid %v", t)
-	}
-	w += int64(extra)
-	if w >= Thearch.MAXWIDTH {
-		Fatal("bad argwid %d + %v", extra, t)
-	}
-	if w > Maxarg {
-		Maxarg = w
-	}
-}
-
-/*
- * unicode-aware case-insensitive strcmp
- */
-
-/*
- * code to resolve elided DOTs
- * in embedded types
- */
-
-// search depth 0 --
-// return count of fields+methods
-// found with a given name
-func lookdot0(s *Sym, t *Type, save **Type, ignorecase int) int {
-	u := t
-	if Isptr[u.Etype] {
-		u = u.Type
-	}
-
-	c := 0
-	if u.Etype == TSTRUCT || u.Etype == TINTER {
-		for f := u.Type; f != nil; f = f.Down {
-			if f.Sym == s || (ignorecase != 0 && f.Type.Etype == TFUNC && f.Type.Thistuple > 0 && strings.EqualFold(f.Sym.Name, s.Name)) {
-				if save != nil {
-					*save = f
-				}
-				c++
-			}
-		}
-	}
-
-	u = methtype(t, 0)
-	if u != nil {
-		for f := u.Method; f != nil; f = f.Down {
-			if f.Embedded == 0 && (f.Sym == s || (ignorecase != 0 && strings.EqualFold(f.Sym.Name, s.Name))) {
-				if save != nil {
-					*save = f
-				}
-				c++
-			}
-		}
-	}
-
-	return c
-}
-
-// search depth d for field/method s --
-// return count of fields+methods
-// found at search depth.
-// answer is in dotlist array and
-// count of number of ways is returned.
-func adddot1(s *Sym, t *Type, d int, save **Type, ignorecase int) int {
-	if t.Trecur != 0 {
-		return 0
-	}
-	t.Trecur = 1
-
-	var c int
-	var u *Type
-	var a int
-	if d == 0 {
-		c = lookdot0(s, t, save, ignorecase)
-		goto out
-	}
-
-	c = 0
-	u = t
-	if Isptr[u.Etype] {
-		u = u.Type
-	}
-	if u.Etype != TSTRUCT && u.Etype != TINTER {
-		goto out
-	}
-
-	d--
-	for f := u.Type; f != nil; f = f.Down {
-		if f.Embedded == 0 {
-			continue
-		}
-		if f.Sym == nil {
-			continue
-		}
-		a = adddot1(s, f.Type, d, save, ignorecase)
-		if a != 0 && c == 0 {
-			dotlist[d].field = f
-		}
-		c += a
-	}
-
-out:
-	t.Trecur = 0
-	return c
-}
-
-// in T.field
-// find missing fields that
-// will give shortest unique addressing.
-// modify the tree with missing type names.
-func adddot(n *Node) *Node {
-	typecheck(&n.Left, Etype|Erv)
-	n.Diag |= n.Left.Diag
-	t := n.Left.Type
-	if t == nil {
-		return n
-	}
-
-	if n.Left.Op == OTYPE {
-		return n
-	}
-
-	if n.Right.Op != ONAME {
-		return n
-	}
-	s := n.Right.Sym
-	if s == nil {
-		return n
-	}
-
-	var c int
-	for d := 0; d < len(dotlist); d++ {
-		c = adddot1(s, t, d, nil, 0)
-		if c > 0 {
-			if c > 1 {
-				Yyerror("ambiguous selector %v", n)
-				n.Left = nil
-				return n
-			}
-
-			// rebuild elided dots
-			for c := d - 1; c >= 0; c-- {
-				n.Left = Nod(ODOT, n.Left, newname(dotlist[c].field.Sym))
-				n.Left.Implicit = true
-			}
-
-			return n
-		}
-	}
-
-	return n
-}
-
-/*
- * code to help generate trampoline
- * functions for methods on embedded
- * subtypes.
- * these are approx the same as
- * the corresponding adddot routines
- * except that they expect to be called
- * with unique tasks and they return
- * the actual methods.
- */
-type Symlink struct {
-	field     *Type
-	good      uint8
-	followptr uint8
-	link      *Symlink
-}
-
-var slist *Symlink
-
-func expand0(t *Type, followptr int) {
-	u := t
-	if Isptr[u.Etype] {
-		followptr = 1
-		u = u.Type
-	}
-
-	if u.Etype == TINTER {
-		var sl *Symlink
-		for f := u.Type; f != nil; f = f.Down {
-			if f.Sym.Flags&SymUniq != 0 {
-				continue
-			}
-			f.Sym.Flags |= SymUniq
-			sl = new(Symlink)
-			sl.field = f
-			sl.link = slist
-			sl.followptr = uint8(followptr)
-			slist = sl
-		}
-
-		return
-	}
-
-	u = methtype(t, 0)
-	if u != nil {
-		var sl *Symlink
-		for f := u.Method; f != nil; f = f.Down {
-			if f.Sym.Flags&SymUniq != 0 {
-				continue
-			}
-			f.Sym.Flags |= SymUniq
-			sl = new(Symlink)
-			sl.field = f
-			sl.link = slist
-			sl.followptr = uint8(followptr)
-			slist = sl
-		}
-	}
-}
-
-func expand1(t *Type, d int, followptr int) {
-	if t.Trecur != 0 {
-		return
-	}
-	if d == 0 {
-		return
-	}
-	t.Trecur = 1
-
-	if d != len(dotlist)-1 {
-		expand0(t, followptr)
-	}
-
-	u := t
-	if Isptr[u.Etype] {
-		followptr = 1
-		u = u.Type
-	}
-
-	if u.Etype != TSTRUCT && u.Etype != TINTER {
-		goto out
-	}
-
-	for f := u.Type; f != nil; f = f.Down {
-		if f.Embedded == 0 {
-			continue
-		}
-		if f.Sym == nil {
-			continue
-		}
-		expand1(f.Type, d-1, followptr)
-	}
-
-out:
-	t.Trecur = 0
-}
-
-func expandmeth(t *Type) {
-	if t == nil || t.Xmethod != nil {
-		return
-	}
-
-	// mark top-level method symbols
-	// so that expand1 doesn't consider them.
-	var f *Type
-	for f = t.Method; f != nil; f = f.Down {
-		f.Sym.Flags |= SymUniq
-	}
-
-	// generate all reachable methods
-	slist = nil
-
-	expand1(t, len(dotlist)-1, 0)
-
-	// check each method to be uniquely reachable
-	var c int
-	var d int
-	for sl := slist; sl != nil; sl = sl.link {
-		sl.field.Sym.Flags &^= SymUniq
-		for d = 0; d < len(dotlist); d++ {
-			c = adddot1(sl.field.Sym, t, d, &f, 0)
-			if c == 0 {
-				continue
-			}
-			if c == 1 {
-				// addot1 may have dug out arbitrary fields, we only want methods.
-				if f.Type.Etype == TFUNC && f.Type.Thistuple > 0 {
-					sl.good = 1
-					sl.field = f
-				}
-			}
-
-			break
-		}
-	}
-
-	for f = t.Method; f != nil; f = f.Down {
-		f.Sym.Flags &^= SymUniq
-	}
-
-	t.Xmethod = t.Method
-	for sl := slist; sl != nil; sl = sl.link {
-		if sl.good != 0 {
-			// add it to the base type method list
-			f = typ(TFIELD)
-
-			*f = *sl.field
-			f.Embedded = 1 // needs a trampoline
-			if sl.followptr != 0 {
-				f.Embedded = 2
-			}
-			f.Down = t.Xmethod
-			t.Xmethod = f
-		}
-	}
-}
-
-/*
- * Given funarg struct list, return list of ODCLFIELD Node fn args.
- */
-func structargs(tl **Type, mustname int) *NodeList {
-	var savet Iter
-	var a *Node
-	var n *Node
-	var buf string
-
-	var args *NodeList
-	gen := 0
-	for t := Structfirst(&savet, tl); t != nil; t = structnext(&savet) {
-		n = nil
-		if mustname != 0 && (t.Sym == nil || t.Sym.Name == "_") {
-			// invent a name so that we can refer to it in the trampoline
-			buf = fmt.Sprintf(".anon%d", gen)
-			gen++
-
-			n = newname(Lookup(buf))
-		} else if t.Sym != nil {
-			n = newname(t.Sym)
-		}
-		a = Nod(ODCLFIELD, n, typenod(t.Type))
-		a.Isddd = t.Isddd
-		if n != nil {
-			n.Isddd = t.Isddd
-		}
-		args = list(args, a)
-	}
-
-	return args
-}
-
-/*
- * Generate a wrapper function to convert from
- * a receiver of type T to a receiver of type U.
- * That is,
- *
- *	func (t T) M() {
- *		...
- *	}
- *
- * already exists; this function generates
- *
- *	func (u U) M() {
- *		u.M()
- *	}
- *
- * where the types T and U are such that u.M() is valid
- * and calls the T.M method.
- * The resulting function is for use in method tables.
- *
- *	rcvr - U
- *	method - M func (t T)(), a TFIELD type struct
- *	newnam - the eventual mangled name of this function
- */
-
-var genwrapper_linehistdone int = 0
-
-func genwrapper(rcvr *Type, method *Type, newnam *Sym, iface int) {
-	if false && Debug['r'] != 0 {
-		fmt.Printf("genwrapper rcvrtype=%v method=%v newnam=%v\n", rcvr, method, newnam)
-	}
-
-	lexlineno++
-	lineno = lexlineno
-	if genwrapper_linehistdone == 0 {
-		// All the wrappers can share the same linehist entry.
-		linehistpush("<autogenerated>")
-
-		genwrapper_linehistdone = 1
-	}
-
-	dclcontext = PEXTERN
-	markdcl()
-
-	this := Nod(ODCLFIELD, newname(Lookup(".this")), typenod(rcvr))
-	this.Left.Name.Param.Ntype = this.Right
-	in := structargs(getinarg(method.Type), 1)
-	out := structargs(Getoutarg(method.Type), 0)
-
-	t := Nod(OTFUNC, nil, nil)
-	l := list1(this)
-	if iface != 0 && rcvr.Width < Types[Tptr].Width {
-		// Building method for interface table and receiver
-		// is smaller than the single pointer-sized word
-		// that the interface call will pass in.
-		// Add a dummy padding argument after the
-		// receiver to make up the difference.
-		tpad := typ(TARRAY)
-
-		tpad.Type = Types[TUINT8]
-		tpad.Bound = Types[Tptr].Width - rcvr.Width
-		pad := Nod(ODCLFIELD, newname(Lookup(".pad")), typenod(tpad))
-		l = list(l, pad)
-	}
-
-	t.List = concat(l, in)
-	t.Rlist = out
-
-	fn := Nod(ODCLFUNC, nil, nil)
-	fn.Func.Nname = newname(newnam)
-	fn.Func.Nname.Name.Defn = fn
-	fn.Func.Nname.Name.Param.Ntype = t
-	declare(fn.Func.Nname, PFUNC)
-	funchdr(fn)
-
-	// arg list
-	var args *NodeList
-
-	isddd := false
-	for l := in; l != nil; l = l.Next {
-		args = list(args, l.N.Left)
-		isddd = l.N.Left.Isddd
-	}
-
-	methodrcvr := getthisx(method.Type).Type.Type
-
-	// generate nil pointer check for better error
-	if Isptr[rcvr.Etype] && rcvr.Type == methodrcvr {
-		// generating wrapper from *T to T.
-		n := Nod(OIF, nil, nil)
-
-		n.Left = Nod(OEQ, this.Left, nodnil())
-
-		// these strings are already in the reflect tables,
-		// so no space cost to use them here.
-		var l *NodeList
-
-		var v Val
-		v.U = rcvr.Type.Sym.Pkg.Name // package name
-		l = list(l, nodlit(v))
-		v.U = rcvr.Type.Sym.Name // type name
-		l = list(l, nodlit(v))
-		v.U = method.Sym.Name
-		l = list(l, nodlit(v)) // method name
-		call := Nod(OCALL, syslook("panicwrap", 0), nil)
-		call.List = l
-		n.Nbody = list1(call)
-		fn.Nbody = list(fn.Nbody, n)
-	}
-
-	dot := adddot(Nod(OXDOT, this.Left, newname(method.Sym)))
-
-	// generate call
-	if flag_race == 0 && Isptr[rcvr.Etype] && Isptr[methodrcvr.Etype] && method.Embedded != 0 && !isifacemethod(method.Type) {
-		// generate tail call: adjust pointer receiver and jump to embedded method.
-		dot = dot.Left // skip final .M
-		if !Isptr[dotlist[0].field.Type.Etype] {
-			dot = Nod(OADDR, dot, nil)
-		}
-		as := Nod(OAS, this.Left, Nod(OCONVNOP, dot, nil))
-		as.Right.Type = rcvr
-		fn.Nbody = list(fn.Nbody, as)
-		n := Nod(ORETJMP, nil, nil)
-		n.Left = newname(methodsym(method.Sym, methodrcvr, 0))
-		fn.Nbody = list(fn.Nbody, n)
-	} else {
-		fn.Func.Wrapper = true // ignore frame for panic+recover matching
-		call := Nod(OCALL, dot, nil)
-		call.List = args
-		call.Isddd = isddd
-		if method.Type.Outtuple > 0 {
-			n := Nod(ORETURN, nil, nil)
-			n.List = list1(call)
-			call = n
-		}
-
-		fn.Nbody = list(fn.Nbody, call)
-	}
-
-	if false && Debug['r'] != 0 {
-		dumplist("genwrapper body", fn.Nbody)
-	}
-
-	funcbody(fn)
-	Curfn = fn
-
-	// wrappers where T is anonymous (struct or interface) can be duplicated.
-	if rcvr.Etype == TSTRUCT || rcvr.Etype == TINTER || Isptr[rcvr.Etype] && rcvr.Type.Etype == TSTRUCT {
-		fn.Func.Dupok = true
-	}
-	typecheck(&fn, Etop)
-	typechecklist(fn.Nbody, Etop)
-
-	inlcalls(fn)
-	escAnalyze(list1(fn), false)
-
-	Curfn = nil
-	funccompile(fn)
-}
-
-func hashmem(t *Type) *Node {
-	sym := Pkglookup("memhash", Runtimepkg)
-
-	n := newname(sym)
-	n.Class = PFUNC
-	tfn := Nod(OTFUNC, nil, nil)
-	tfn.List = list(tfn.List, Nod(ODCLFIELD, nil, typenod(Ptrto(t))))
-	tfn.List = list(tfn.List, Nod(ODCLFIELD, nil, typenod(Types[TUINTPTR])))
-	tfn.List = list(tfn.List, Nod(ODCLFIELD, nil, typenod(Types[TUINTPTR])))
-	tfn.Rlist = list(tfn.Rlist, Nod(ODCLFIELD, nil, typenod(Types[TUINTPTR])))
-	typecheck(&tfn, Etype)
-	n.Type = tfn.Type
-	return n
-}
-
-func hashfor(t *Type) *Node {
-	var sym *Sym
-
-	a := algtype1(t, nil)
-	switch a {
-	case AMEM:
-		Fatal("hashfor with AMEM type")
-
-	case AINTER:
-		sym = Pkglookup("interhash", Runtimepkg)
-
-	case ANILINTER:
-		sym = Pkglookup("nilinterhash", Runtimepkg)
-
-	case ASTRING:
-		sym = Pkglookup("strhash", Runtimepkg)
-
-	case AFLOAT32:
-		sym = Pkglookup("f32hash", Runtimepkg)
-
-	case AFLOAT64:
-		sym = Pkglookup("f64hash", Runtimepkg)
-
-	case ACPLX64:
-		sym = Pkglookup("c64hash", Runtimepkg)
-
-	case ACPLX128:
-		sym = Pkglookup("c128hash", Runtimepkg)
-
-	default:
-		sym = typesymprefix(".hash", t)
-	}
-
-	n := newname(sym)
-	n.Class = PFUNC
-	tfn := Nod(OTFUNC, nil, nil)
-	tfn.List = list(tfn.List, Nod(ODCLFIELD, nil, typenod(Ptrto(t))))
-	tfn.List = list(tfn.List, Nod(ODCLFIELD, nil, typenod(Types[TUINTPTR])))
-	tfn.Rlist = list(tfn.Rlist, Nod(ODCLFIELD, nil, typenod(Types[TUINTPTR])))
-	typecheck(&tfn, Etype)
-	n.Type = tfn.Type
-	return n
-}
-
-/*
- * Generate a helper function to compute the hash of a value of type t.
- */
-func genhash(sym *Sym, t *Type) {
-	if Debug['r'] != 0 {
-		fmt.Printf("genhash %v %v\n", sym, t)
-	}
-
-	lineno = 1 // less confusing than end of input
-	dclcontext = PEXTERN
-	markdcl()
-
-	// func sym(p *T, h uintptr) uintptr
-	fn := Nod(ODCLFUNC, nil, nil)
-
-	fn.Func.Nname = newname(sym)
-	fn.Func.Nname.Class = PFUNC
-	tfn := Nod(OTFUNC, nil, nil)
-	fn.Func.Nname.Name.Param.Ntype = tfn
-
-	n := Nod(ODCLFIELD, newname(Lookup("p")), typenod(Ptrto(t)))
-	tfn.List = list(tfn.List, n)
-	np := n.Left
-	n = Nod(ODCLFIELD, newname(Lookup("h")), typenod(Types[TUINTPTR]))
-	tfn.List = list(tfn.List, n)
-	nh := n.Left
-	n = Nod(ODCLFIELD, nil, typenod(Types[TUINTPTR])) // return value
-	tfn.Rlist = list(tfn.Rlist, n)
-
-	funchdr(fn)
-	typecheck(&fn.Func.Nname.Name.Param.Ntype, Etype)
-
-	// genhash is only called for types that have equality but
-	// cannot be handled by the standard algorithms,
-	// so t must be either an array or a struct.
-	switch t.Etype {
-	default:
-		Fatal("genhash %v", t)
-
-	case TARRAY:
-		if Isslice(t) {
-			Fatal("genhash %v", t)
-		}
-
-		// An array of pure memory would be handled by the
-		// standard algorithm, so the element type must not be
-		// pure memory.
-		hashel := hashfor(t.Type)
-
-		n := Nod(ORANGE, nil, Nod(OIND, np, nil))
-		ni := newname(Lookup("i"))
-		ni.Type = Types[TINT]
-		n.List = list1(ni)
-		n.Colas = true
-		colasdefn(n.List, n)
-		ni = n.List.N
-
-		// TODO: with aeshash we don't need these shift/mul parts
-
-		// h = h<<3 | h>>61
-		n.Nbody = list(n.Nbody, Nod(OAS, nh, Nod(OOR, Nod(OLSH, nh, Nodintconst(3)), Nod(ORSH, nh, Nodintconst(int64(Widthptr)*8-3)))))
-
-		// h *= mul
-		// Same multipliers as in runtime.memhash.
-		var mul int64
-		if Widthptr == 4 {
-			mul = 3267000013
-		} else {
-			mul = 23344194077549503
-		}
-		n.Nbody = list(n.Nbody, Nod(OAS, nh, Nod(OMUL, nh, Nodintconst(mul))))
-
-		// h = hashel(&p[i], h)
-		call := Nod(OCALL, hashel, nil)
-
-		nx := Nod(OINDEX, np, ni)
-		nx.Bounded = true
-		na := Nod(OADDR, nx, nil)
-		na.Etype = 1 // no escape to heap
-		call.List = list(call.List, na)
-		call.List = list(call.List, nh)
-		n.Nbody = list(n.Nbody, Nod(OAS, nh, call))
-
-		fn.Nbody = list(fn.Nbody, n)
-
-		// Walk the struct using memhash for runs of AMEM
-	// and calling specific hash functions for the others.
-	case TSTRUCT:
-		var first *Type
-
-		offend := int64(0)
-		var size int64
-		var call *Node
-		var nx *Node
-		var na *Node
-		var hashel *Node
-		for t1 := t.Type; ; t1 = t1.Down {
-			if t1 != nil && algtype1(t1.Type, nil) == AMEM && !isblanksym(t1.Sym) {
-				offend = t1.Width + t1.Type.Width
-				if first == nil {
-					first = t1
-				}
-
-				// If it's a memory field but it's padded, stop here.
-				if ispaddedfield(t1, t.Width) {
-					t1 = t1.Down
-				} else {
-					continue
-				}
-			}
-
-			// Run memhash for fields up to this one.
-			if first != nil {
-				size = offend - first.Width // first->width is offset
-				hashel = hashmem(first.Type)
-
-				// h = hashel(&p.first, size, h)
-				call = Nod(OCALL, hashel, nil)
-
-				nx = Nod(OXDOT, np, newname(first.Sym)) // TODO: fields from other packages?
-				na = Nod(OADDR, nx, nil)
-				na.Etype = 1 // no escape to heap
-				call.List = list(call.List, na)
-				call.List = list(call.List, nh)
-				call.List = list(call.List, Nodintconst(size))
-				fn.Nbody = list(fn.Nbody, Nod(OAS, nh, call))
-
-				first = nil
-			}
-
-			if t1 == nil {
-				break
-			}
-			if isblanksym(t1.Sym) {
-				continue
-			}
-
-			// Run hash for this field.
-			if algtype1(t1.Type, nil) == AMEM {
-				hashel = hashmem(t1.Type)
-
-				// h = memhash(&p.t1, h, size)
-				call = Nod(OCALL, hashel, nil)
-
-				nx = Nod(OXDOT, np, newname(t1.Sym)) // TODO: fields from other packages?
-				na = Nod(OADDR, nx, nil)
-				na.Etype = 1 // no escape to heap
-				call.List = list(call.List, na)
-				call.List = list(call.List, nh)
-				call.List = list(call.List, Nodintconst(t1.Type.Width))
-				fn.Nbody = list(fn.Nbody, Nod(OAS, nh, call))
-			} else {
-				hashel = hashfor(t1.Type)
-
-				// h = hashel(&p.t1, h)
-				call = Nod(OCALL, hashel, nil)
-
-				nx = Nod(OXDOT, np, newname(t1.Sym)) // TODO: fields from other packages?
-				na = Nod(OADDR, nx, nil)
-				na.Etype = 1 // no escape to heap
-				call.List = list(call.List, na)
-				call.List = list(call.List, nh)
-				fn.Nbody = list(fn.Nbody, Nod(OAS, nh, call))
-			}
-		}
-	}
-
-	r := Nod(ORETURN, nil, nil)
-	r.List = list(r.List, nh)
-	fn.Nbody = list(fn.Nbody, r)
-
-	if Debug['r'] != 0 {
-		dumplist("genhash body", fn.Nbody)
-	}
-
-	funcbody(fn)
-	Curfn = fn
-	fn.Func.Dupok = true
-	typecheck(&fn, Etop)
-	typechecklist(fn.Nbody, Etop)
-	Curfn = nil
-
-	// Disable safemode while compiling this code: the code we
-	// generate internally can refer to unsafe.Pointer.
-	// In this case it can happen if we need to generate an ==
-	// for a struct containing a reflect.Value, which itself has
-	// an unexported field of type unsafe.Pointer.
-	old_safemode := safemode
-
-	safemode = 0
-	funccompile(fn)
-	safemode = old_safemode
-}
-
-// Return node for
-//	if p.field != q.field { return false }
-func eqfield(p *Node, q *Node, field *Node) *Node {
-	nx := Nod(OXDOT, p, field)
-	ny := Nod(OXDOT, q, field)
-	nif := Nod(OIF, nil, nil)
-	nif.Left = Nod(ONE, nx, ny)
-	r := Nod(ORETURN, nil, nil)
-	r.List = list(r.List, Nodbool(false))
-	nif.Nbody = list(nif.Nbody, r)
-	return nif
-}
-
-func eqmemfunc(size int64, type_ *Type, needsize *int) *Node {
-	var fn *Node
-
-	switch size {
-	default:
-		fn = syslook("memequal", 1)
-		*needsize = 1
-
-	case 1, 2, 4, 8, 16:
-		buf := fmt.Sprintf("memequal%d", int(size)*8)
-		fn = syslook(buf, 1)
-		*needsize = 0
-	}
-
-	substArgTypes(fn, type_, type_)
-	return fn
-}
-
-// Return node for
-//	if !memequal(&p.field, &q.field [, size]) { return false }
-func eqmem(p *Node, q *Node, field *Node, size int64) *Node {
-	var needsize int
-
-	nx := Nod(OADDR, Nod(OXDOT, p, field), nil)
-	nx.Etype = 1 // does not escape
-	ny := Nod(OADDR, Nod(OXDOT, q, field), nil)
-	ny.Etype = 1 // does not escape
-	typecheck(&nx, Erv)
-	typecheck(&ny, Erv)
-
-	call := Nod(OCALL, eqmemfunc(size, nx.Type.Type, &needsize), nil)
-	call.List = list(call.List, nx)
-	call.List = list(call.List, ny)
-	if needsize != 0 {
-		call.List = list(call.List, Nodintconst(size))
-	}
-
-	nif := Nod(OIF, nil, nil)
-	nif.Left = Nod(ONOT, call, nil)
-	r := Nod(ORETURN, nil, nil)
-	r.List = list(r.List, Nodbool(false))
-	nif.Nbody = list(nif.Nbody, r)
-	return nif
-}
-
-/*
- * Generate a helper function to check equality of two values of type t.
- */
-func geneq(sym *Sym, t *Type) {
-	if Debug['r'] != 0 {
-		fmt.Printf("geneq %v %v\n", sym, t)
-	}
-
-	lineno = 1 // less confusing than end of input
-	dclcontext = PEXTERN
-	markdcl()
-
-	// func sym(p, q *T) bool
-	fn := Nod(ODCLFUNC, nil, nil)
-
-	fn.Func.Nname = newname(sym)
-	fn.Func.Nname.Class = PFUNC
-	tfn := Nod(OTFUNC, nil, nil)
-	fn.Func.Nname.Name.Param.Ntype = tfn
-
-	n := Nod(ODCLFIELD, newname(Lookup("p")), typenod(Ptrto(t)))
-	tfn.List = list(tfn.List, n)
-	np := n.Left
-	n = Nod(ODCLFIELD, newname(Lookup("q")), typenod(Ptrto(t)))
-	tfn.List = list(tfn.List, n)
-	nq := n.Left
-	n = Nod(ODCLFIELD, nil, typenod(Types[TBOOL]))
-	tfn.Rlist = list(tfn.Rlist, n)
-
-	funchdr(fn)
-
-	// geneq is only called for types that have equality but
-	// cannot be handled by the standard algorithms,
-	// so t must be either an array or a struct.
-	switch t.Etype {
-	default:
-		Fatal("geneq %v", t)
-
-	case TARRAY:
-		if Isslice(t) {
-			Fatal("geneq %v", t)
-		}
-
-		// An array of pure memory would be handled by the
-		// standard memequal, so the element type must not be
-		// pure memory.  Even if we unrolled the range loop,
-		// each iteration would be a function call, so don't bother
-		// unrolling.
-		nrange := Nod(ORANGE, nil, Nod(OIND, np, nil))
-
-		ni := newname(Lookup("i"))
-		ni.Type = Types[TINT]
-		nrange.List = list1(ni)
-		nrange.Colas = true
-		colasdefn(nrange.List, nrange)
-		ni = nrange.List.N
-
-		// if p[i] != q[i] { return false }
-		nx := Nod(OINDEX, np, ni)
-
-		nx.Bounded = true
-		ny := Nod(OINDEX, nq, ni)
-		ny.Bounded = true
-
-		nif := Nod(OIF, nil, nil)
-		nif.Left = Nod(ONE, nx, ny)
-		r := Nod(ORETURN, nil, nil)
-		r.List = list(r.List, Nodbool(false))
-		nif.Nbody = list(nif.Nbody, r)
-		nrange.Nbody = list(nrange.Nbody, nif)
-		fn.Nbody = list(fn.Nbody, nrange)
-
-		// Walk the struct using memequal for runs of AMEM
-	// and calling specific equality tests for the others.
-	// Skip blank-named fields.
-	case TSTRUCT:
-		var first *Type
-
-		offend := int64(0)
-		var size int64
-		for t1 := t.Type; ; t1 = t1.Down {
-			if t1 != nil && algtype1(t1.Type, nil) == AMEM && !isblanksym(t1.Sym) {
-				offend = t1.Width + t1.Type.Width
-				if first == nil {
-					first = t1
-				}
-
-				// If it's a memory field but it's padded, stop here.
-				if ispaddedfield(t1, t.Width) {
-					t1 = t1.Down
-				} else {
-					continue
-				}
-			}
-
-			// Run memequal for fields up to this one.
-			// TODO(rsc): All the calls to newname are wrong for
-			// cross-package unexported fields.
-			if first != nil {
-				if first.Down == t1 {
-					fn.Nbody = list(fn.Nbody, eqfield(np, nq, newname(first.Sym)))
-				} else if first.Down.Down == t1 {
-					fn.Nbody = list(fn.Nbody, eqfield(np, nq, newname(first.Sym)))
-					first = first.Down
-					if !isblanksym(first.Sym) {
-						fn.Nbody = list(fn.Nbody, eqfield(np, nq, newname(first.Sym)))
-					}
-				} else {
-					// More than two fields: use memequal.
-					size = offend - first.Width // first->width is offset
-					fn.Nbody = list(fn.Nbody, eqmem(np, nq, newname(first.Sym), size))
-				}
-
-				first = nil
-			}
-
-			if t1 == nil {
-				break
-			}
-			if isblanksym(t1.Sym) {
-				continue
-			}
-
-			// Check this field, which is not just memory.
-			fn.Nbody = list(fn.Nbody, eqfield(np, nq, newname(t1.Sym)))
-		}
-	}
-
-	// return true
-	r := Nod(ORETURN, nil, nil)
-
-	r.List = list(r.List, Nodbool(true))
-	fn.Nbody = list(fn.Nbody, r)
-
-	if Debug['r'] != 0 {
-		dumplist("geneq body", fn.Nbody)
-	}
-
-	funcbody(fn)
-	Curfn = fn
-	fn.Func.Dupok = true
-	typecheck(&fn, Etop)
-	typechecklist(fn.Nbody, Etop)
-	Curfn = nil
-
-	// Disable safemode while compiling this code: the code we
-	// generate internally can refer to unsafe.Pointer.
-	// In this case it can happen if we need to generate an ==
-	// for a struct containing a reflect.Value, which itself has
-	// an unexported field of type unsafe.Pointer.
-	old_safemode := safemode
-
-	safemode = 0
-	funccompile(fn)
-	safemode = old_safemode
-}
-
-func ifacelookdot(s *Sym, t *Type, followptr *int, ignorecase int) *Type {
-	*followptr = 0
-
-	if t == nil {
-		return nil
-	}
-
-	var m *Type
-	var i int
-	var c int
-	for d := 0; d < len(dotlist); d++ {
-		c = adddot1(s, t, d, &m, ignorecase)
-		if c > 1 {
-			Yyerror("%v.%v is ambiguous", t, s)
-			return nil
-		}
-
-		if c == 1 {
-			for i = 0; i < d; i++ {
-				if Isptr[dotlist[i].field.Type.Etype] {
-					*followptr = 1
-					break
-				}
-			}
-
-			if m.Type.Etype != TFUNC || m.Type.Thistuple == 0 {
-				Yyerror("%v.%v is a field, not a method", t, s)
-				return nil
-			}
-
-			return m
-		}
-	}
-
-	return nil
-}
-
-func implements(t *Type, iface *Type, m **Type, samename **Type, ptr *int) bool {
-	t0 := t
-	if t == nil {
-		return false
-	}
-
-	// if this is too slow,
-	// could sort these first
-	// and then do one loop.
-
-	if t.Etype == TINTER {
-		var tm *Type
-		for im := iface.Type; im != nil; im = im.Down {
-			for tm = t.Type; tm != nil; tm = tm.Down {
-				if tm.Sym == im.Sym {
-					if Eqtype(tm.Type, im.Type) {
-						goto found
-					}
-					*m = im
-					*samename = tm
-					*ptr = 0
-					return false
-				}
-			}
-
-			*m = im
-			*samename = nil
-			*ptr = 0
-			return false
-		found:
-		}
-
-		return true
-	}
-
-	t = methtype(t, 0)
-	if t != nil {
-		expandmeth(t)
-	}
-	var tm *Type
-	var imtype *Type
-	var followptr int
-	var rcvr *Type
-	for im := iface.Type; im != nil; im = im.Down {
-		imtype = methodfunc(im.Type, nil)
-		tm = ifacelookdot(im.Sym, t, &followptr, 0)
-		if tm == nil || tm.Nointerface || !Eqtype(methodfunc(tm.Type, nil), imtype) {
-			if tm == nil {
-				tm = ifacelookdot(im.Sym, t, &followptr, 1)
-			}
-			*m = im
-			*samename = tm
-			*ptr = 0
-			return false
-		}
-
-		// if pointer receiver in method,
-		// the method does not exist for value types.
-		rcvr = getthisx(tm.Type).Type.Type
-
-		if Isptr[rcvr.Etype] && !Isptr[t0.Etype] && followptr == 0 && !isifacemethod(tm.Type) {
-			if false && Debug['r'] != 0 {
-				Yyerror("interface pointer mismatch")
-			}
-
-			*m = im
-			*samename = nil
-			*ptr = 1
-			return false
-		}
-	}
-
-	return true
-}
-
-/*
- * even simpler simtype; get rid of ptr, bool.
- * assuming that the front end has rejected
- * all the invalid conversions (like ptr -> bool)
- */
-func Simsimtype(t *Type) int {
-	if t == nil {
-		return 0
-	}
-
-	et := int(Simtype[t.Etype])
-	switch et {
-	case TPTR32:
-		et = TUINT32
-
-	case TPTR64:
-		et = TUINT64
-
-	case TBOOL:
-		et = TUINT8
-	}
-
-	return et
-}
-
-func listtreecopy(l *NodeList, lineno int32) *NodeList {
-	var out *NodeList
-	for ; l != nil; l = l.Next {
-		out = list(out, treecopy(l.N, lineno))
-	}
-	return out
-}
-
-func liststmt(l *NodeList) *Node {
-	n := Nod(OBLOCK, nil, nil)
-	n.List = l
-	if l != nil {
-		n.Lineno = l.N.Lineno
-	}
-	return n
-}
-
-/*
- * return nelem of list
- */
-func structcount(t *Type) int {
-	var s Iter
-
-	v := 0
-	for t = Structfirst(&s, &t); t != nil; t = structnext(&s) {
-		v++
-	}
-	return v
-}
-
-/*
- * return power of 2 of the constant
- * operand. -1 if it is not a power of 2.
- * 1000+ if it is a -(power of 2)
- */
-func powtwo(n *Node) int {
-	if n == nil || n.Op != OLITERAL || n.Type == nil {
-		return -1
-	}
-	if !Isint[n.Type.Etype] {
-		return -1
-	}
-
-	v := uint64(Mpgetfix(n.Val().U.(*Mpint)))
-	b := uint64(1)
-	for i := 0; i < 64; i++ {
-		if b == v {
-			return i
-		}
-		b = b << 1
-	}
-
-	if !Issigned[n.Type.Etype] {
-		return -1
-	}
-
-	v = -v
-	b = 1
-	for i := 0; i < 64; i++ {
-		if b == v {
-			return i + 1000
-		}
-		b = b << 1
-	}
-
-	return -1
-}
-
-/*
- * return the unsigned type for
- * a signed integer type.
- * returns T if input is not a
- * signed integer type.
- */
-func tounsigned(t *Type) *Type {
-	// this is types[et+1], but not sure
-	// that this relation is immutable
-	switch t.Etype {
-	default:
-		fmt.Printf("tounsigned: unknown type %v\n", t)
-		t = nil
-
-	case TINT:
-		t = Types[TUINT]
-
-	case TINT8:
-		t = Types[TUINT8]
-
-	case TINT16:
-		t = Types[TUINT16]
-
-	case TINT32:
-		t = Types[TUINT32]
-
-	case TINT64:
-		t = Types[TUINT64]
-	}
-
-	return t
-}
-
-/*
- * magic number for signed division
- * see hacker's delight chapter 10
- */
-func Smagic(m *Magic) {
-	var mask uint64
-
-	m.Bad = 0
-	switch m.W {
-	default:
-		m.Bad = 1
-		return
-
-	case 8:
-		mask = 0xff
-
-	case 16:
-		mask = 0xffff
-
-	case 32:
-		mask = 0xffffffff
-
-	case 64:
-		mask = 0xffffffffffffffff
-	}
-
-	two31 := mask ^ (mask >> 1)
-
-	p := m.W - 1
-	ad := uint64(m.Sd)
-	if m.Sd < 0 {
-		ad = -uint64(m.Sd)
-	}
-
-	// bad denominators
-	if ad == 0 || ad == 1 || ad == two31 {
-		m.Bad = 1
-		return
-	}
-
-	t := two31
-	ad &= mask
-
-	anc := t - 1 - t%ad
-	anc &= mask
-
-	q1 := two31 / anc
-	r1 := two31 - q1*anc
-	q1 &= mask
-	r1 &= mask
-
-	q2 := two31 / ad
-	r2 := two31 - q2*ad
-	q2 &= mask
-	r2 &= mask
-
-	var delta uint64
-	for {
-		p++
-		q1 <<= 1
-		r1 <<= 1
-		q1 &= mask
-		r1 &= mask
-		if r1 >= anc {
-			q1++
-			r1 -= anc
-			q1 &= mask
-			r1 &= mask
-		}
-
-		q2 <<= 1
-		r2 <<= 1
-		q2 &= mask
-		r2 &= mask
-		if r2 >= ad {
-			q2++
-			r2 -= ad
-			q2 &= mask
-			r2 &= mask
-		}
-
-		delta = ad - r2
-		delta &= mask
-		if q1 < delta || (q1 == delta && r1 == 0) {
-			continue
-		}
-
-		break
-	}
-
-	m.Sm = int64(q2 + 1)
-	if uint64(m.Sm)&two31 != 0 {
-		m.Sm |= ^int64(mask)
-	}
-	m.S = p - m.W
-}
-
-/*
- * magic number for unsigned division
- * see hacker's delight chapter 10
- */
-func Umagic(m *Magic) {
-	var mask uint64
-
-	m.Bad = 0
-	m.Ua = 0
-
-	switch m.W {
-	default:
-		m.Bad = 1
-		return
-
-	case 8:
-		mask = 0xff
-
-	case 16:
-		mask = 0xffff
-
-	case 32:
-		mask = 0xffffffff
-
-	case 64:
-		mask = 0xffffffffffffffff
-	}
-
-	two31 := mask ^ (mask >> 1)
-
-	m.Ud &= mask
-	if m.Ud == 0 || m.Ud == two31 {
-		m.Bad = 1
-		return
-	}
-
-	nc := mask - (-m.Ud&mask)%m.Ud
-	p := m.W - 1
-
-	q1 := two31 / nc
-	r1 := two31 - q1*nc
-	q1 &= mask
-	r1 &= mask
-
-	q2 := (two31 - 1) / m.Ud
-	r2 := (two31 - 1) - q2*m.Ud
-	q2 &= mask
-	r2 &= mask
-
-	var delta uint64
-	for {
-		p++
-		if r1 >= nc-r1 {
-			q1 <<= 1
-			q1++
-			r1 <<= 1
-			r1 -= nc
-		} else {
-			q1 <<= 1
-			r1 <<= 1
-		}
-
-		q1 &= mask
-		r1 &= mask
-		if r2+1 >= m.Ud-r2 {
-			if q2 >= two31-1 {
-				m.Ua = 1
-			}
-
-			q2 <<= 1
-			q2++
-			r2 <<= 1
-			r2++
-			r2 -= m.Ud
-		} else {
-			if q2 >= two31 {
-				m.Ua = 1
-			}
-
-			q2 <<= 1
-			r2 <<= 1
-			r2++
-		}
-
-		q2 &= mask
-		r2 &= mask
-
-		delta = m.Ud - 1 - r2
-		delta &= mask
-
-		if p < m.W+m.W {
-			if q1 < delta || (q1 == delta && r1 == 0) {
-				continue
-			}
-		}
-
-		break
-	}
-
-	m.Um = q2 + 1
-	m.S = p - m.W
-}
-
-func ngotype(n *Node) *Sym {
-	if n.Type != nil {
-		return typenamesym(n.Type)
-	}
-	return nil
-}
-
-/*
- * Convert raw string to the prefix that will be used in the symbol
- * table.  All control characters, space, '%' and '"', as well as
- * non-7-bit clean bytes turn into %xx.  The period needs escaping
- * only in the last segment of the path, and it makes for happier
- * users if we escape that as little as possible.
- *
- * If you edit this, edit ../ld/lib.c:/^pathtoprefix too.
- * If you edit this, edit ../../debug/goobj/read.go:/importPathToPrefix too.
- */
-func pathtoprefix(s string) string {
-	slash := strings.LastIndex(s, "/")
-	for i := 0; i < len(s); i++ {
-		c := s[i]
-		if c <= ' ' || i >= slash && c == '.' || c == '%' || c == '"' || c >= 0x7F {
-			var buf bytes.Buffer
-			for i := 0; i < len(s); i++ {
-				c := s[i]
-				if c <= ' ' || i >= slash && c == '.' || c == '%' || c == '"' || c >= 0x7F {
-					fmt.Fprintf(&buf, "%%%02x", c)
-					continue
-				}
-				buf.WriteByte(c)
-			}
-			return buf.String()
-		}
-	}
-	return s
-}
-
-var pkgMap = make(map[string]*Pkg)
-var pkgs []*Pkg
-
-func mkpkg(path string) *Pkg {
-	if p := pkgMap[path]; p != nil {
-		return p
-	}
-
-	p := new(Pkg)
-	p.Path = path
-	p.Prefix = pathtoprefix(path)
-	p.Syms = make(map[string]*Sym)
-	pkgMap[path] = p
-	pkgs = append(pkgs, p)
-	return p
-}
-
-func addinit(np **Node, init *NodeList) {
-	if init == nil {
-		return
-	}
-
-	n := *np
-	switch n.Op {
-	// There may be multiple refs to this node;
-	// introduce OCONVNOP to hold init list.
-	case ONAME, OLITERAL:
-		n = Nod(OCONVNOP, n, nil)
-
-		n.Type = n.Left.Type
-		n.Typecheck = 1
-		*np = n
-	}
-
-	n.Ninit = concat(init, n.Ninit)
-	n.Ullman = UINF
-}
-
-var reservedimports = []string{
-	"go",
-	"type",
-}
-
-func isbadimport(path string) bool {
-	if strings.Contains(path, "\x00") {
-		Yyerror("import path contains NUL")
-		return true
-	}
-
-	for i := 0; i < len(reservedimports); i++ {
-		if path == reservedimports[i] {
-			Yyerror("import path %q is reserved and cannot be used", path)
-			return true
-		}
-	}
-
-	var s string
-	_ = s
-	var r uint
-	_ = r
-	for _, r := range path {
-		if r == utf8.RuneError {
-			Yyerror("import path contains invalid UTF-8 sequence: %q", path)
-			return true
-		}
-
-		if r < 0x20 || r == 0x7f {
-			Yyerror("import path contains control character: %q", path)
-			return true
-		}
-
-		if r == '\\' {
-			Yyerror("import path contains backslash; use slash: %q", path)
-			return true
-		}
-
-		if unicode.IsSpace(rune(r)) {
-			Yyerror("import path contains space character: %q", path)
-			return true
-		}
-
-		if strings.ContainsRune("!\"#$%&'()*,:;<=>?[]^`{|}", r) {
-			Yyerror("import path contains invalid character '%c': %q", r, path)
-			return true
-		}
-	}
-
-	return false
-}
-
-func checknil(x *Node, init **NodeList) {
-	if Isinter(x.Type) {
-		x = Nod(OITAB, x, nil)
-		typecheck(&x, Erv)
-	}
-
-	n := Nod(OCHECKNIL, x, nil)
-	n.Typecheck = 1
-	*init = list(*init, n)
-}
-
-/*
- * Can this type be stored directly in an interface word?
- * Yes, if the representation is a single pointer.
- */
-func isdirectiface(t *Type) bool {
-	switch t.Etype {
-	case TPTR32,
-		TPTR64,
-		TCHAN,
-		TMAP,
-		TFUNC,
-		TUNSAFEPTR:
-		return true
-
-		// Array of 1 direct iface type can be direct.
-	case TARRAY:
-		return t.Bound == 1 && isdirectiface(t.Type)
-
-		// Struct with 1 field of direct iface type can be direct.
-	case TSTRUCT:
-		return t.Type != nil && t.Type.Down == nil && isdirectiface(t.Type.Type)
-	}
-
-	return false
-}
-
-// type2IET returns "T" if t is a concrete type,
-// "I" if t is an interface type, and "E" if t is an empty interface type.
-// It is used to build calls to the conv* and assert* runtime routines.
-func type2IET(t *Type) string {
-	if isnilinter(t) {
-		return "E"
-	}
-	if Isinter(t) {
-		return "I"
-	}
-	return "T"
-}
diff --git a/src/cmd/compile/internal/gc/swt.go b/src/cmd/compile/internal/gc/swt.go
deleted file mode 100644
index f34b1c6..0000000
--- a/src/cmd/compile/internal/gc/swt.go
+++ /dev/null
@@ -1,848 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-	"sort"
-	"strconv"
-)
-
-const (
-	// expression switch
-	switchKindExpr  = iota // switch a {...} or switch 5 {...}
-	switchKindTrue         // switch true {...} or switch {...}
-	switchKindFalse        // switch false {...}
-
-	// type switch
-	switchKindType // switch a.(type) {...}
-)
-
-const (
-	caseKindDefault = iota // default:
-
-	// expression switch
-	caseKindExprConst // case 5:
-	caseKindExprVar   // case x:
-
-	// type switch
-	caseKindTypeNil   // case nil:
-	caseKindTypeConst // case time.Time: (concrete type, has type hash)
-	caseKindTypeVar   // case io.Reader: (interface type)
-)
-
-const binarySearchMin = 4 // minimum number of cases for binary search
-
-// An exprSwitch walks an expression switch.
-type exprSwitch struct {
-	exprname *Node // node for the expression being switched on
-	kind     int   // kind of switch statement (switchKind*)
-}
-
-// A typeSwitch walks a type switch.
-type typeSwitch struct {
-	hashname *Node // node for the hash of the type of the variable being switched on
-	facename *Node // node for the concrete type of the variable being switched on
-	okname   *Node // boolean node used for comma-ok type assertions
-}
-
-// A caseClause is a single case clause in a switch statement.
-type caseClause struct {
-	node    *Node  // points at case statement
-	ordinal int    // position in switch
-	hash    uint32 // hash of a type switch
-	typ     uint8  // type of case
-}
-
-// typecheckswitch typechecks a switch statement.
-func typecheckswitch(n *Node) {
-	lno := int(lineno)
-	typechecklist(n.Ninit, Etop)
-
-	var nilonly string
-	var top int
-	var t *Type
-
-	if n.Left != nil && n.Left.Op == OTYPESW {
-		// type switch
-		top = Etype
-		typecheck(&n.Left.Right, Erv)
-		t = n.Left.Right.Type
-		if t != nil && t.Etype != TINTER {
-			Yyerror("cannot type switch on non-interface value %v", Nconv(n.Left.Right, obj.FmtLong))
-		}
-	} else {
-		// expression switch
-		top = Erv
-		if n.Left != nil {
-			typecheck(&n.Left, Erv)
-			defaultlit(&n.Left, nil)
-			t = n.Left.Type
-		} else {
-			t = Types[TBOOL]
-		}
-		if t != nil {
-			var badtype *Type
-			switch {
-			case !okforeq[t.Etype]:
-				Yyerror("cannot switch on %v", Nconv(n.Left, obj.FmtLong))
-			case t.Etype == TARRAY && !Isfixedarray(t):
-				nilonly = "slice"
-			case t.Etype == TARRAY && Isfixedarray(t) && algtype1(t, nil) == ANOEQ:
-				Yyerror("cannot switch on %v", Nconv(n.Left, obj.FmtLong))
-			case t.Etype == TSTRUCT && algtype1(t, &badtype) == ANOEQ:
-				Yyerror("cannot switch on %v (struct containing %v cannot be compared)", Nconv(n.Left, obj.FmtLong), badtype)
-			case t.Etype == TFUNC:
-				nilonly = "func"
-			case t.Etype == TMAP:
-				nilonly = "map"
-			}
-		}
-	}
-
-	n.Type = t
-
-	var def *Node
-	var ll *NodeList
-	for l := n.List; l != nil; l = l.Next {
-		ncase := l.N
-		setlineno(n)
-		if ncase.List == nil {
-			// default
-			if def != nil {
-				Yyerror("multiple defaults in switch (first at %v)", def.Line())
-			} else {
-				def = ncase
-			}
-		} else {
-			for ll = ncase.List; ll != nil; ll = ll.Next {
-				setlineno(ll.N)
-				typecheck(&ll.N, Erv|Etype)
-				if ll.N.Type == nil || t == nil {
-					continue
-				}
-				setlineno(ncase)
-				switch top {
-				// expression switch
-				case Erv:
-					defaultlit(&ll.N, t)
-					switch {
-					case ll.N.Op == OTYPE:
-						Yyerror("type %v is not an expression", ll.N.Type)
-					case ll.N.Type != nil && assignop(ll.N.Type, t, nil) == 0 && assignop(t, ll.N.Type, nil) == 0:
-						if n.Left != nil {
-							Yyerror("invalid case %v in switch on %v (mismatched types %v and %v)", ll.N, n.Left, ll.N.Type, t)
-						} else {
-							Yyerror("invalid case %v in switch (mismatched types %v and bool)", ll.N, ll.N.Type)
-						}
-					case nilonly != "" && !Isconst(ll.N, CTNIL):
-						Yyerror("invalid case %v in switch (can only compare %s %v to nil)", ll.N, nilonly, n.Left)
-					}
-
-				// type switch
-				case Etype:
-					var missing, have *Type
-					var ptr int
-					switch {
-					case ll.N.Op == OLITERAL && Istype(ll.N.Type, TNIL):
-					case ll.N.Op != OTYPE && ll.N.Type != nil: // should this be ||?
-						Yyerror("%v is not a type", Nconv(ll.N, obj.FmtLong))
-						// reset to original type
-						ll.N = n.Left.Right
-					case ll.N.Type.Etype != TINTER && t.Etype == TINTER && !implements(ll.N.Type, t, &missing, &have, &ptr):
-						if have != nil && missing.Broke == 0 && have.Broke == 0 {
-							Yyerror("impossible type switch case: %v cannot have dynamic type %v"+" (wrong type for %v method)\n\thave %v%v\n\twant %v%v", Nconv(n.Left.Right, obj.FmtLong), ll.N.Type, missing.Sym, have.Sym, Tconv(have.Type, obj.FmtShort), missing.Sym, Tconv(missing.Type, obj.FmtShort))
-						} else if missing.Broke == 0 {
-							Yyerror("impossible type switch case: %v cannot have dynamic type %v"+" (missing %v method)", Nconv(n.Left.Right, obj.FmtLong), ll.N.Type, missing.Sym)
-						}
-					}
-				}
-			}
-		}
-
-		if top == Etype && n.Type != nil {
-			ll = ncase.List
-			if ncase.Rlist != nil {
-				nvar := ncase.Rlist.N
-				if ll != nil && ll.Next == nil && ll.N.Type != nil && !Istype(ll.N.Type, TNIL) {
-					// single entry type switch
-					nvar.Name.Param.Ntype = typenod(ll.N.Type)
-				} else {
-					// multiple entry type switch or default
-					nvar.Name.Param.Ntype = typenod(n.Type)
-				}
-
-				typecheck(&nvar, Erv|Easgn)
-				ncase.Rlist.N = nvar
-			}
-		}
-
-		typechecklist(ncase.Nbody, Etop)
-	}
-
-	lineno = int32(lno)
-}
-
-// walkswitch walks a switch statement.
-func walkswitch(sw *Node) {
-	// convert switch {...} to switch true {...}
-	if sw.Left == nil {
-		sw.Left = Nodbool(true)
-		typecheck(&sw.Left, Erv)
-	}
-
-	if sw.Left.Op == OTYPESW {
-		var s typeSwitch
-		s.walk(sw)
-	} else {
-		var s exprSwitch
-		s.walk(sw)
-	}
-}
-
-// walk generates an AST implementing sw.
-// sw is an expression switch.
-// The AST is generally of the form of a linear
-// search using if..goto, although binary search
-// is used with long runs of constants.
-func (s *exprSwitch) walk(sw *Node) {
-	casebody(sw, nil)
-
-	cond := sw.Left
-	sw.Left = nil
-
-	s.kind = switchKindExpr
-	if Isconst(cond, CTBOOL) {
-		s.kind = switchKindTrue
-		if !cond.Val().U.(bool) {
-			s.kind = switchKindFalse
-		}
-	}
-
-	walkexpr(&cond, &sw.Ninit)
-	t := sw.Type
-	if t == nil {
-		return
-	}
-
-	// convert the switch into OIF statements
-	var cas *NodeList
-	if s.kind == switchKindTrue || s.kind == switchKindFalse {
-		s.exprname = Nodbool(s.kind == switchKindTrue)
-	} else if consttype(cond) >= 0 {
-		// leave constants to enable dead code elimination (issue 9608)
-		s.exprname = cond
-	} else {
-		s.exprname = temp(cond.Type)
-		cas = list1(Nod(OAS, s.exprname, cond))
-		typechecklist(cas, Etop)
-	}
-
-	// enumerate the cases, and lop off the default case
-	cc := caseClauses(sw, s.kind)
-	sw.List = nil
-	var def *Node
-	if len(cc) > 0 && cc[0].typ == caseKindDefault {
-		def = cc[0].node.Right
-		cc = cc[1:]
-	} else {
-		def = Nod(OBREAK, nil, nil)
-	}
-
-	// handle the cases in order
-	for len(cc) > 0 {
-		// deal with expressions one at a time
-		if !okforcmp[t.Etype] || cc[0].typ != caseKindExprConst {
-			a := s.walkCases(cc[:1])
-			cas = list(cas, a)
-			cc = cc[1:]
-			continue
-		}
-
-		// do binary search on runs of constants
-		var run int
-		for run = 1; run < len(cc) && cc[run].typ == caseKindExprConst; run++ {
-		}
-
-		// sort and compile constants
-		sort.Sort(caseClauseByExpr(cc[:run]))
-		a := s.walkCases(cc[:run])
-		cas = list(cas, a)
-		cc = cc[run:]
-	}
-
-	// handle default case
-	if nerrors == 0 {
-		cas = list(cas, def)
-		sw.Nbody = concat(cas, sw.Nbody)
-		walkstmtlist(sw.Nbody)
-	}
-}
-
-// walkCases generates an AST implementing the cases in cc.
-func (s *exprSwitch) walkCases(cc []*caseClause) *Node {
-	if len(cc) < binarySearchMin {
-		// linear search
-		var cas *NodeList
-		for _, c := range cc {
-			n := c.node
-			lno := int(setlineno(n))
-
-			a := Nod(OIF, nil, nil)
-			if (s.kind != switchKindTrue && s.kind != switchKindFalse) || assignop(n.Left.Type, s.exprname.Type, nil) == OCONVIFACE || assignop(s.exprname.Type, n.Left.Type, nil) == OCONVIFACE {
-				a.Left = Nod(OEQ, s.exprname, n.Left) // if name == val
-				typecheck(&a.Left, Erv)
-			} else if s.kind == switchKindTrue {
-				a.Left = n.Left // if val
-			} else {
-				// s.kind == switchKindFalse
-				a.Left = Nod(ONOT, n.Left, nil) // if !val
-				typecheck(&a.Left, Erv)
-			}
-			a.Nbody = list1(n.Right) // goto l
-
-			cas = list(cas, a)
-			lineno = int32(lno)
-		}
-		return liststmt(cas)
-	}
-
-	// find the middle and recur
-	half := len(cc) / 2
-	a := Nod(OIF, nil, nil)
-	mid := cc[half-1].node.Left
-	le := Nod(OLE, s.exprname, mid)
-	if Isconst(mid, CTSTR) {
-		// Search by length and then by value; see exprcmp.
-		lenlt := Nod(OLT, Nod(OLEN, s.exprname, nil), Nod(OLEN, mid, nil))
-		leneq := Nod(OEQ, Nod(OLEN, s.exprname, nil), Nod(OLEN, mid, nil))
-		a.Left = Nod(OOROR, lenlt, Nod(OANDAND, leneq, le))
-	} else {
-		a.Left = le
-	}
-	typecheck(&a.Left, Erv)
-	a.Nbody = list1(s.walkCases(cc[:half]))
-	a.Rlist = list1(s.walkCases(cc[half:]))
-	return a
-}
-
-// casebody builds separate lists of statements and cases.
-// It makes labels between cases and statements
-// and deals with fallthrough, break, and unreachable statements.
-func casebody(sw *Node, typeswvar *Node) {
-	if sw.List == nil {
-		return
-	}
-
-	lno := setlineno(sw)
-
-	var cas *NodeList  // cases
-	var stat *NodeList // statements
-	var def *Node      // defaults
-	br := Nod(OBREAK, nil, nil)
-
-	for l := sw.List; l != nil; l = l.Next {
-		n := l.N
-		setlineno(n)
-		if n.Op != OXCASE {
-			Fatal("casebody %v", Oconv(int(n.Op), 0))
-		}
-		n.Op = OCASE
-		needvar := count(n.List) != 1 || n.List.N.Op == OLITERAL
-
-		jmp := Nod(OGOTO, newCaseLabel(), nil)
-		if n.List == nil {
-			if def != nil {
-				Yyerror("more than one default case")
-			}
-			// reuse original default case
-			n.Right = jmp
-			def = n
-		}
-
-		if n.List != nil && n.List.Next == nil {
-			// one case -- reuse OCASE node
-			n.Left = n.List.N
-			n.Right = jmp
-			n.List = nil
-			cas = list(cas, n)
-		} else {
-			// expand multi-valued cases
-			for lc := n.List; lc != nil; lc = lc.Next {
-				cas = list(cas, Nod(OCASE, lc.N, jmp))
-			}
-		}
-
-		stat = list(stat, Nod(OLABEL, jmp.Left, nil))
-		if typeswvar != nil && needvar && n.Rlist != nil {
-			l := list1(Nod(ODCL, n.Rlist.N, nil))
-			l = list(l, Nod(OAS, n.Rlist.N, typeswvar))
-			typechecklist(l, Etop)
-			stat = concat(stat, l)
-		}
-		stat = concat(stat, n.Nbody)
-
-		// botch - shouldn't fall thru declaration
-		last := stat.End.N
-		if last.Xoffset == n.Xoffset && last.Op == OXFALL {
-			if typeswvar != nil {
-				setlineno(last)
-				Yyerror("cannot fallthrough in type switch")
-			}
-
-			if l.Next == nil {
-				setlineno(last)
-				Yyerror("cannot fallthrough final case in switch")
-			}
-
-			last.Op = OFALL
-		} else {
-			stat = list(stat, br)
-		}
-	}
-
-	stat = list(stat, br)
-	if def != nil {
-		cas = list(cas, def)
-	}
-
-	sw.List = cas
-	sw.Nbody = stat
-	lineno = lno
-}
-
-// nSwitchLabel is the number of switch labels generated.
-// This should be per-function, but it is a global counter for now.
-var nSwitchLabel int
-
-func newCaseLabel() *Node {
-	label := strconv.Itoa(nSwitchLabel)
-	nSwitchLabel++
-	return newname(Lookup(label))
-}
-
-// caseClauses generates a slice of caseClauses
-// corresponding to the clauses in the switch statement sw.
-// Kind is the kind of switch statement.
-func caseClauses(sw *Node, kind int) []*caseClause {
-	var cc []*caseClause
-	for l := sw.List; l != nil; l = l.Next {
-		n := l.N
-		c := new(caseClause)
-		cc = append(cc, c)
-		c.ordinal = len(cc)
-		c.node = n
-
-		if n.Left == nil {
-			c.typ = caseKindDefault
-			continue
-		}
-
-		if kind == switchKindType {
-			// type switch
-			switch {
-			case n.Left.Op == OLITERAL:
-				c.typ = caseKindTypeNil
-			case Istype(n.Left.Type, TINTER):
-				c.typ = caseKindTypeVar
-			default:
-				c.typ = caseKindTypeConst
-				c.hash = typehash(n.Left.Type)
-			}
-		} else {
-			// expression switch
-			switch consttype(n.Left) {
-			case CTFLT, CTINT, CTRUNE, CTSTR:
-				c.typ = caseKindExprConst
-			default:
-				c.typ = caseKindExprVar
-			}
-		}
-	}
-
-	if cc == nil {
-		return nil
-	}
-
-	// sort by value and diagnose duplicate cases
-	if kind == switchKindType {
-		// type switch
-		sort.Sort(caseClauseByType(cc))
-		for i, c1 := range cc {
-			if c1.typ == caseKindTypeNil || c1.typ == caseKindDefault {
-				break
-			}
-			for _, c2 := range cc[i+1:] {
-				if c2.typ == caseKindTypeNil || c2.typ == caseKindDefault || c1.hash != c2.hash {
-					break
-				}
-				if Eqtype(c1.node.Left.Type, c2.node.Left.Type) {
-					yyerrorl(int(c2.node.Lineno), "duplicate case %v in type switch\n\tprevious case at %v", c2.node.Left.Type, c1.node.Line())
-				}
-			}
-		}
-	} else {
-		// expression switch
-		sort.Sort(caseClauseByExpr(cc))
-		for i, c1 := range cc {
-			if i+1 == len(cc) {
-				break
-			}
-			c2 := cc[i+1]
-			if exprcmp(c1, c2) != 0 {
-				continue
-			}
-			setlineno(c2.node)
-			Yyerror("duplicate case %v in switch\n\tprevious case at %v", c1.node.Left, c1.node.Line())
-		}
-	}
-
-	// put list back in processing order
-	sort.Sort(caseClauseByOrd(cc))
-	return cc
-}
-
-// walk generates an AST that implements sw,
-// where sw is a type switch.
-// The AST is generally of the form of a linear
-// search using if..goto, although binary search
-// is used with long runs of concrete types.
-func (s *typeSwitch) walk(sw *Node) {
-	cond := sw.Left
-	sw.Left = nil
-
-	if cond == nil {
-		sw.List = nil
-		return
-	}
-	if cond.Right == nil {
-		setlineno(sw)
-		Yyerror("type switch must have an assignment")
-		return
-	}
-
-	walkexpr(&cond.Right, &sw.Ninit)
-	if !Istype(cond.Right.Type, TINTER) {
-		Yyerror("type switch must be on an interface")
-		return
-	}
-
-	var cas *NodeList
-
-	// predeclare temporary variables and the boolean var
-	s.facename = temp(cond.Right.Type)
-
-	a := Nod(OAS, s.facename, cond.Right)
-	typecheck(&a, Etop)
-	cas = list(cas, a)
-
-	s.okname = temp(Types[TBOOL])
-	typecheck(&s.okname, Erv)
-
-	s.hashname = temp(Types[TUINT32])
-	typecheck(&s.hashname, Erv)
-
-	// set up labels and jumps
-	casebody(sw, s.facename)
-
-	// calculate type hash
-	t := cond.Right.Type
-	if isnilinter(t) {
-		a = syslook("efacethash", 1)
-	} else {
-		a = syslook("ifacethash", 1)
-	}
-	substArgTypes(a, t)
-	a = Nod(OCALL, a, nil)
-	a.List = list1(s.facename)
-	a = Nod(OAS, s.hashname, a)
-	typecheck(&a, Etop)
-	cas = list(cas, a)
-
-	cc := caseClauses(sw, switchKindType)
-	sw.List = nil
-	var def *Node
-	if len(cc) > 0 && cc[0].typ == caseKindDefault {
-		def = cc[0].node.Right
-		cc = cc[1:]
-	} else {
-		def = Nod(OBREAK, nil, nil)
-	}
-
-	// insert type equality check into each case block
-	for _, c := range cc {
-		n := c.node
-		switch c.typ {
-		case caseKindTypeNil:
-			var v Val
-			v.U = new(NilVal)
-			a = Nod(OIF, nil, nil)
-			a.Left = Nod(OEQ, s.facename, nodlit(v))
-			typecheck(&a.Left, Erv)
-			a.Nbody = list1(n.Right) // if i==nil { goto l }
-			n.Right = a
-
-		case caseKindTypeVar, caseKindTypeConst:
-			n.Right = s.typeone(n)
-		}
-	}
-
-	// generate list of if statements, binary search for constant sequences
-	for len(cc) > 0 {
-		if cc[0].typ != caseKindTypeConst {
-			n := cc[0].node
-			cas = list(cas, n.Right)
-			cc = cc[1:]
-			continue
-		}
-
-		// identify run of constants
-		var run int
-		for run = 1; run < len(cc) && cc[run].typ == caseKindTypeConst; run++ {
-		}
-
-		// sort by hash
-		sort.Sort(caseClauseByType(cc[:run]))
-
-		// for debugging: linear search
-		if false {
-			for i := 0; i < run; i++ {
-				n := cc[i].node
-				cas = list(cas, n.Right)
-			}
-			continue
-		}
-
-		// combine adjacent cases with the same hash
-		ncase := 0
-		for i := 0; i < run; i++ {
-			ncase++
-			hash := list1(cc[i].node.Right)
-			for j := i + 1; j < run && cc[i].hash == cc[j].hash; j++ {
-				hash = list(hash, cc[j].node.Right)
-			}
-			cc[i].node.Right = liststmt(hash)
-		}
-
-		// binary search among cases to narrow by hash
-		cas = list(cas, s.walkCases(cc[:ncase]))
-		cc = cc[ncase:]
-	}
-
-	// handle default case
-	if nerrors == 0 {
-		cas = list(cas, def)
-		sw.Nbody = concat(cas, sw.Nbody)
-		sw.List = nil
-		walkstmtlist(sw.Nbody)
-	}
-}
-
-// typeone generates an AST that jumps to the
-// case body if the variable is of type t.
-func (s *typeSwitch) typeone(t *Node) *Node {
-	var name *Node
-	var init *NodeList
-	if t.Rlist == nil {
-		name = nblank
-		typecheck(&nblank, Erv|Easgn)
-	} else {
-		name = t.Rlist.N
-		init = list1(Nod(ODCL, name, nil))
-		a := Nod(OAS, name, nil)
-		typecheck(&a, Etop)
-		init = list(init, a)
-	}
-
-	a := Nod(OAS2, nil, nil)
-	a.List = list(list1(name), s.okname) // name, ok =
-	b := Nod(ODOTTYPE, s.facename, nil)
-	b.Type = t.Left.Type // interface.(type)
-	a.Rlist = list1(b)
-	typecheck(&a, Etop)
-	init = list(init, a)
-
-	c := Nod(OIF, nil, nil)
-	c.Left = s.okname
-	c.Nbody = list1(t.Right) // if ok { goto l }
-
-	return liststmt(list(init, c))
-}
-
-// walkCases generates an AST implementing the cases in cc.
-func (s *typeSwitch) walkCases(cc []*caseClause) *Node {
-	if len(cc) < binarySearchMin {
-		var cas *NodeList
-		for _, c := range cc {
-			n := c.node
-			if c.typ != caseKindTypeConst {
-				Fatal("typeSwitch walkCases")
-			}
-			a := Nod(OIF, nil, nil)
-			a.Left = Nod(OEQ, s.hashname, Nodintconst(int64(c.hash)))
-			typecheck(&a.Left, Erv)
-			a.Nbody = list1(n.Right)
-			cas = list(cas, a)
-		}
-		return liststmt(cas)
-	}
-
-	// find the middle and recur
-	half := len(cc) / 2
-	a := Nod(OIF, nil, nil)
-	a.Left = Nod(OLE, s.hashname, Nodintconst(int64(cc[half-1].hash)))
-	typecheck(&a.Left, Erv)
-	a.Nbody = list1(s.walkCases(cc[:half]))
-	a.Rlist = list1(s.walkCases(cc[half:]))
-	return a
-}
-
-type caseClauseByOrd []*caseClause
-
-func (x caseClauseByOrd) Len() int      { return len(x) }
-func (x caseClauseByOrd) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
-func (x caseClauseByOrd) Less(i, j int) bool {
-	c1, c2 := x[i], x[j]
-	switch {
-	// sort default first
-	case c1.typ == caseKindDefault:
-		return true
-	case c2.typ == caseKindDefault:
-		return false
-
-	// sort nil second
-	case c1.typ == caseKindTypeNil:
-		return true
-	case c2.typ == caseKindTypeNil:
-		return false
-	}
-
-	// sort by ordinal
-	return c1.ordinal < c2.ordinal
-}
-
-type caseClauseByExpr []*caseClause
-
-func (x caseClauseByExpr) Len() int      { return len(x) }
-func (x caseClauseByExpr) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
-func (x caseClauseByExpr) Less(i, j int) bool {
-	return exprcmp(x[i], x[j]) < 0
-}
-
-func exprcmp(c1, c2 *caseClause) int {
-	// sort non-constants last
-	if c1.typ != caseKindExprConst {
-		return +1
-	}
-	if c2.typ != caseKindExprConst {
-		return -1
-	}
-
-	n1 := c1.node.Left
-	n2 := c2.node.Left
-
-	// sort by type (for switches on interface)
-	ct := int(n1.Val().Ctype())
-	if ct > int(n2.Val().Ctype()) {
-		return +1
-	}
-	if ct < int(n2.Val().Ctype()) {
-		return -1
-	}
-	if !Eqtype(n1.Type, n2.Type) {
-		if n1.Type.Vargen > n2.Type.Vargen {
-			return +1
-		} else {
-			return -1
-		}
-	}
-
-	// sort by constant value to enable binary search
-	switch ct {
-	case CTFLT:
-		return mpcmpfltflt(n1.Val().U.(*Mpflt), n2.Val().U.(*Mpflt))
-	case CTINT, CTRUNE:
-		return Mpcmpfixfix(n1.Val().U.(*Mpint), n2.Val().U.(*Mpint))
-	case CTSTR:
-		// Sort strings by length and then by value.
-		// It is much cheaper to compare lengths than values,
-		// and all we need here is consistency.
-		// We respect this sorting in exprSwitch.walkCases.
-		a := n1.Val().U.(string)
-		b := n2.Val().U.(string)
-		if len(a) < len(b) {
-			return -1
-		}
-		if len(a) > len(b) {
-			return +1
-		}
-		return stringsCompare(a, b)
-	}
-
-	return 0
-}
-
-type caseClauseByType []*caseClause
-
-func (x caseClauseByType) Len() int      { return len(x) }
-func (x caseClauseByType) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
-func (x caseClauseByType) Less(i, j int) bool {
-	c1, c2 := x[i], x[j]
-	switch {
-	// sort non-constants last
-	case c1.typ != caseKindTypeConst:
-		return false
-	case c2.typ != caseKindTypeConst:
-		return true
-
-	// sort by hash code
-	case c1.hash != c2.hash:
-		return c1.hash < c2.hash
-	}
-
-	// sort by ordinal
-	return c1.ordinal < c2.ordinal
-}
-
-func dumpcase(cc []*caseClause) {
-	for _, c := range cc {
-		switch c.typ {
-		case caseKindDefault:
-			fmt.Printf("case-default\n")
-			fmt.Printf("\tord=%d\n", c.ordinal)
-
-		case caseKindExprConst:
-			fmt.Printf("case-exprconst\n")
-			fmt.Printf("\tord=%d\n", c.ordinal)
-
-		case caseKindExprVar:
-			fmt.Printf("case-exprvar\n")
-			fmt.Printf("\tord=%d\n", c.ordinal)
-			fmt.Printf("\top=%v\n", Oconv(int(c.node.Left.Op), 0))
-
-		case caseKindTypeNil:
-			fmt.Printf("case-typenil\n")
-			fmt.Printf("\tord=%d\n", c.ordinal)
-
-		case caseKindTypeConst:
-			fmt.Printf("case-typeconst\n")
-			fmt.Printf("\tord=%d\n", c.ordinal)
-			fmt.Printf("\thash=%x\n", c.hash)
-
-		case caseKindTypeVar:
-			fmt.Printf("case-typevar\n")
-			fmt.Printf("\tord=%d\n", c.ordinal)
-
-		default:
-			fmt.Printf("case-???\n")
-			fmt.Printf("\tord=%d\n", c.ordinal)
-			fmt.Printf("\top=%v\n", Oconv(int(c.node.Left.Op), 0))
-			fmt.Printf("\thash=%x\n", c.hash)
-		}
-	}
-
-	fmt.Printf("\n")
-}
diff --git a/src/cmd/compile/internal/gc/syntax.go b/src/cmd/compile/internal/gc/syntax.go
deleted file mode 100644
index 7f03a4e..0000000
--- a/src/cmd/compile/internal/gc/syntax.go
+++ /dev/null
@@ -1,484 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// “Abstract” syntax representation.
-
-package gc
-
-// A Node is a single node in the syntax tree.
-// Actually the syntax tree is a syntax DAG, because there is only one
-// node with Op=ONAME for a given instance of a variable x.
-// The same is true for Op=OTYPE and Op=OLITERAL.
-type Node struct {
-	// Tree structure.
-	// Generic recursive walks should follow these fields.
-	Left  *Node
-	Right *Node
-	Ninit *NodeList
-	Nbody *NodeList
-	List  *NodeList
-	Rlist *NodeList
-
-	// most nodes
-	Type *Type
-	Orig *Node // original form, for printing, and tracking copies of ONAMEs
-
-	// func
-	Func *Func
-
-	// ONAME
-	Name *Name
-
-	Sym *Sym        // various
-	E   interface{} // Opt or Val, see methods below
-
-	Xoffset int64
-
-	Lineno int32
-
-	// OREGISTER, OINDREG
-	Reg int16
-
-	Esc uint16 // EscXXX
-
-	Op          uint8
-	Nointerface bool
-	Ullman      uint8 // sethi/ullman number
-	Addable     bool  // addressable
-	Etype       uint8 // op for OASOP, etype for OTYPE, exclam for export, 6g saved reg
-	Bounded     bool  // bounds check unnecessary
-	Class       uint8 // PPARAM, PAUTO, PEXTERN, etc
-	Embedded    uint8 // ODCLFIELD embedded type
-	Colas       bool  // OAS resulting from :=
-	Diag        uint8 // already printed error about this
-	Noescape    bool  // func arguments do not escape; TODO(rsc): move Noescape to Func struct (see CL 7360)
-	Walkdef     uint8
-	Typecheck   uint8
-	Local       bool
-	Dodata      uint8
-	Initorder   uint8
-	Used        bool
-	Isddd       bool // is the argument variadic
-	Implicit    bool
-	Addrtaken   bool // address taken, even if not moved to heap
-	Assigned    bool // is the variable ever assigned to
-	Likely      int8 // likeliness of if statement
-	Hasbreak    bool // has break statement
-	hasVal      int8 // +1 for Val, -1 for Opt, 0 for not yet set
-}
-
-// Val returns the Val for the node.
-func (n *Node) Val() Val {
-	if n.hasVal != +1 {
-		return Val{}
-	}
-	return Val{n.E}
-}
-
-// SetVal sets the Val for the node, which must not have been used with SetOpt.
-func (n *Node) SetVal(v Val) {
-	if n.hasVal == -1 {
-		Debug['h'] = 1
-		Dump("have Opt", n)
-		Fatal("have Opt")
-	}
-	n.hasVal = +1
-	n.E = v.U
-}
-
-// Opt returns the optimizer data for the node.
-func (n *Node) Opt() interface{} {
-	if n.hasVal != -1 {
-		return nil
-	}
-	return n.E
-}
-
-// SetOpt sets the optimizer data for the node, which must not have been used with SetVal.
-// SetOpt(nil) is ignored for Vals to simplify call sites that are clearing Opts.
-func (n *Node) SetOpt(x interface{}) {
-	if x == nil && n.hasVal >= 0 {
-		return
-	}
-	if n.hasVal == +1 {
-		Debug['h'] = 1
-		Dump("have Val", n)
-		Fatal("have Val")
-	}
-	n.hasVal = -1
-	n.E = x
-}
-
-// Name holds Node fields used only by named nodes (ONAME, OPACK, some OLITERAL).
-type Name struct {
-	Pack      *Node // real package for import . names
-	Pkg       *Pkg  // pkg for OPACK nodes
-	Heapaddr  *Node // temp holding heap address of param
-	Inlvar    *Node // ONAME substitute while inlining
-	Defn      *Node // initializing assignment
-	Curfn     *Node // function for local variables
-	Param     *Param
-	Decldepth int32 // declaration loop depth, increased for every loop or label
-	Vargen    int32 // unique name for ONAME within a function.  Function outputs are numbered starting at one.
-	Iota      int32 // value if this name is iota
-	Funcdepth int32
-	Method    bool // OCALLMETH name
-	Readonly  bool
-	Captured  bool // is the variable captured by a closure
-	Byval     bool // is the variable captured by value or by reference
-	Needzero  bool // if it contains pointers, needs to be zeroed on function entry
-}
-
-type Param struct {
-	Ntype *Node
-
-	// ONAME func param with PHEAP
-	Outerexpr  *Node // expression copied into closure for variable
-	Stackparam *Node // OPARAM node referring to stack copy of param
-
-	// ONAME PPARAM
-	Field *Type // TFIELD in arg struct
-
-	// ONAME closure param with PPARAMREF
-	Outer   *Node // outer PPARAMREF in nested closure
-	Closure *Node // ONAME/PHEAP <-> ONAME/PPARAMREF
-}
-
-// Func holds Node fields used only with function-like nodes.
-type Func struct {
-	Shortname  *Node
-	Enter      *NodeList
-	Exit       *NodeList
-	Cvars      *NodeList // closure params
-	Dcl        *NodeList // autodcl for this func/closure
-	Inldcl     *NodeList // copy of dcl for use in inlining
-	Closgen    int
-	Outerfunc  *Node
-	Fieldtrack []*Type
-	Outer      *Node // outer func for closure
-	Ntype      *Node // signature
-	Top        int   // top context (Ecall, Eproc, etc)
-	Closure    *Node // OCLOSURE <-> ODCLFUNC
-	FCurfn     *Node
-	Nname      *Node
-
-	Inl     *NodeList // copy of the body for use in inlining
-	InlCost int32
-	Depth   int32
-
-	Endlineno int32
-
-	Norace         bool // func must not have race detector annotations
-	Nosplit        bool // func should not execute on separate stack
-	Nowritebarrier bool // emit compiler error instead of write barrier
-	Dupok          bool // duplicate definitions ok
-	Wrapper        bool // is method wrapper
-	Needctxt       bool // function uses context register (has closure variables)
-	Systemstack    bool // must run on system stack
-}
-
-// Node ops.
-const (
-	OXXX = iota
-
-	// names
-	ONAME    // var, const or func name
-	ONONAME  // unnamed arg or return value: f(int, string) (int, error) { etc }
-	OTYPE    // type name
-	OPACK    // import
-	OLITERAL // literal
-
-	// expressions
-	OADD             // Left + Right
-	OSUB             // Left - Right
-	OOR              // Left | Right
-	OXOR             // Left ^ Right
-	OADDSTR          // Left + Right (string addition)
-	OADDR            // &Left
-	OANDAND          // Left && Right
-	OAPPEND          // append(List)
-	OARRAYBYTESTR    // Type(Left) (Type is string, Left is a []byte)
-	OARRAYBYTESTRTMP // Type(Left) (Type is string, Left is a []byte, ephemeral)
-	OARRAYRUNESTR    // Type(Left) (Type is string, Left is a []rune)
-	OSTRARRAYBYTE    // Type(Left) (Type is []byte, Left is a string)
-	OSTRARRAYBYTETMP // Type(Left) (Type is []byte, Left is a string, ephemeral)
-	OSTRARRAYRUNE    // Type(Left) (Type is []rune, Left is a string)
-	OAS              // Left = Right or (if Colas=true) Left := Right
-	OAS2             // List = Rlist (x, y, z = a, b, c)
-	OAS2FUNC         // List = Rlist (x, y = f())
-	OAS2RECV         // List = Rlist (x, ok = <-c)
-	OAS2MAPR         // List = Rlist (x, ok = m["foo"])
-	OAS2DOTTYPE      // List = Rlist (x, ok = I.(int))
-	OASOP            // Left Etype= Right (x += y)
-	OASWB            // Left = Right (with write barrier)
-	OCALL            // Left(List) (function call, method call or type conversion)
-	OCALLFUNC        // Left(List) (function call f(args))
-	OCALLMETH        // Left(List) (direct method call x.Method(args))
-	OCALLINTER       // Left(List) (interface method call x.Method(args))
-	OCALLPART        // Left.Right (method expression x.Method, not called)
-	OCAP             // cap(Left)
-	OCLOSE           // close(Left)
-	OCLOSURE         // func Type { Body } (func literal)
-	OCMPIFACE        // Left Etype Right (interface comparison, x == y or x != y)
-	OCMPSTR          // Left Etype Right (string comparison, x == y, x < y, etc)
-	OCOMPLIT         // Right{List} (composite literal, not yet lowered to specific form)
-	OMAPLIT          // Type{List} (composite literal, Type is map)
-	OSTRUCTLIT       // Type{List} (composite literal, Type is struct)
-	OARRAYLIT        // Type{List} (composite literal, Type is array or slice)
-	OPTRLIT          // &Left (left is composite literal)
-	OCONV            // Type(Left) (type conversion)
-	OCONVIFACE       // Type(Left) (type conversion, to interface)
-	OCONVNOP         // Type(Left) (type conversion, no effect)
-	OCOPY            // copy(Left, Right)
-	ODCL             // var Left (declares Left of type Left.Type)
-
-	// Used during parsing but don't last.
-	ODCLFUNC  // func f() or func (r) f()
-	ODCLFIELD // struct field, interface field, or func/method argument/return value.
-	ODCLCONST // const pi = 3.14
-	ODCLTYPE  // type Int int
-
-	ODELETE    // delete(Left, Right)
-	ODOT       // Left.Right (Left is of struct type)
-	ODOTPTR    // Left.Right (Left is of pointer to struct type)
-	ODOTMETH   // Left.Right (Left is non-interface, Right is method name)
-	ODOTINTER  // Left.Right (Left is interface, Right is method name)
-	OXDOT      // Left.Right (before rewrite to one of the preceding)
-	ODOTTYPE   // Left.Right or Left.Type (.Right during parsing, .Type once resolved)
-	ODOTTYPE2  // Left.Right or Left.Type (.Right during parsing, .Type once resolved; on rhs of OAS2DOTTYPE)
-	OEQ        // Left == Right
-	ONE        // Left != Right
-	OLT        // Left < Right
-	OLE        // Left <= Right
-	OGE        // Left >= Right
-	OGT        // Left > Right
-	OIND       // *Left
-	OINDEX     // Left[Right] (index of array or slice)
-	OINDEXMAP  // Left[Right] (index of map)
-	OKEY       // Left:Right (key:value in struct/array/map literal, or slice index pair)
-	OPARAM     // variant of ONAME for on-stack copy of a parameter or return value that escapes.
-	OLEN       // len(Left)
-	OMAKE      // make(List) (before type checking converts to one of the following)
-	OMAKECHAN  // make(Type, Left) (type is chan)
-	OMAKEMAP   // make(Type, Left) (type is map)
-	OMAKESLICE // make(Type, Left, Right) (type is slice)
-	OMUL       // Left * Right
-	ODIV       // Left / Right
-	OMOD       // Left % Right
-	OLSH       // Left << Right
-	ORSH       // Left >> Right
-	OAND       // Left & Right
-	OANDNOT    // Left &^ Right
-	ONEW       // new(Left)
-	ONOT       // !Left
-	OCOM       // ^Left
-	OPLUS      // +Left
-	OMINUS     // -Left
-	OOROR      // Left || Right
-	OPANIC     // panic(Left)
-	OPRINT     // print(List)
-	OPRINTN    // println(List)
-	OPAREN     // (Left)
-	OSEND      // Left <- Right
-	OSLICE     // Left[Right.Left : Right.Right] (Left is untypechecked or slice; Right.Op==OKEY)
-	OSLICEARR  // Left[Right.Left : Right.Right] (Left is array)
-	OSLICESTR  // Left[Right.Left : Right.Right] (Left is string)
-	OSLICE3    // Left[R.Left : R.R.Left : R.R.R] (R=Right; Left is untypedchecked or slice; R.Op and R.R.Op==OKEY)
-	OSLICE3ARR // Left[R.Left : R.R.Left : R.R.R] (R=Right; Left is array; R.Op and R.R.Op==OKEY)
-	ORECOVER   // recover()
-	ORECV      // <-Left
-	ORUNESTR   // Type(Left) (Type is string, Left is rune)
-	OSELRECV   // Left = <-Right.Left: (appears as .Left of OCASE; Right.Op == ORECV)
-	OSELRECV2  // List = <-Right.Left: (apperas as .Left of OCASE; count(List) == 2, Right.Op == ORECV)
-	OIOTA      // iota
-	OREAL      // real(Left)
-	OIMAG      // imag(Left)
-	OCOMPLEX   // complex(Left, Right)
-
-	// statements
-	OBLOCK    // { List } (block of code)
-	OBREAK    // break
-	OCASE     // case List: Nbody (select case after processing; List==nil means default)
-	OXCASE    // case List: Nbody (select case before processing; List==nil means default)
-	OCONTINUE // continue
-	ODEFER    // defer Left (Left must be call)
-	OEMPTY    // no-op (empty statement)
-	OFALL     // fallthrough (after processing)
-	OXFALL    // fallthrough (before processing)
-	OFOR      // for Ninit; Left; Right { Nbody }
-	OGOTO     // goto Left
-	OIF       // if Ninit; Left { Nbody } else { Rlist }
-	OLABEL    // Left:
-	OPROC     // go Left (Left must be call)
-	ORANGE    // for List = range Right { Nbody }
-	ORETURN   // return List
-	OSELECT   // select { List } (List is list of OXCASE or OCASE)
-	OSWITCH   // switch Ninit; Left { List } (List is a list of OXCASE or OCASE)
-	OTYPESW   // List = Left.(type) (appears as .Left of OSWITCH)
-
-	// types
-	OTCHAN   // chan int
-	OTMAP    // map[string]int
-	OTSTRUCT // struct{}
-	OTINTER  // interface{}
-	OTFUNC   // func()
-	OTARRAY  // []int, [8]int, [N]int or [...]int
-
-	// misc
-	ODDD        // func f(args ...int) or f(l...) or var a = [...]int{0, 1, 2}.
-	ODDDARG     // func f(args ...int), introduced by escape analysis.
-	OINLCALL    // intermediary representation of an inlined call.
-	OEFACE      // itable and data words of an empty-interface value.
-	OITAB       // itable word of an interface value.
-	OSPTR       // base pointer of a slice or string.
-	OCLOSUREVAR // variable reference at beginning of closure function
-	OCFUNC      // reference to c function pointer (not go func value)
-	OCHECKNIL   // emit code to ensure pointer/interface not nil
-	OVARKILL    // variable is dead
-
-	// thearch-specific registers
-	OREGISTER // a register, such as AX.
-	OINDREG   // offset plus indirect of a register, such as 8(SP).
-
-	// arch-specific opcodes
-	OCMP    // compare: ACMP.
-	ODEC    // decrement: ADEC.
-	OINC    // increment: AINC.
-	OEXTEND // extend: ACWD/ACDQ/ACQO.
-	OHMUL   // high mul: AMUL/AIMUL for unsigned/signed (OMUL uses AIMUL for both).
-	OLROT   // left rotate: AROL.
-	ORROTC  // right rotate-carry: ARCR.
-	ORETJMP // return to other function
-	OPS     // compare parity set (for x86 NaN check)
-	OPC     // compare parity clear (for x86 NaN check)
-	OSQRT   // sqrt(float64), on systems that have hw support
-	OGETG   // runtime.getg() (read g pointer)
-
-	OEND
-)
-
-// A NodeList is a linked list of nodes.
-// TODO(rsc): Some uses of NodeList should be made into slices.
-// The remaining ones probably just need a simple linked list,
-// not one with concatenation support.
-type NodeList struct {
-	N    *Node
-	Next *NodeList
-	End  *NodeList
-}
-
-// concat returns the concatenation of the lists a and b.
-// The storage taken by both is reused for the result.
-func concat(a *NodeList, b *NodeList) *NodeList {
-	if a == nil {
-		return b
-	}
-	if b == nil {
-		return a
-	}
-
-	a.End.Next = b
-	a.End = b.End
-	b.End = nil
-	return a
-}
-
-// list1 returns a one-element list containing n.
-func list1(n *Node) *NodeList {
-	if n == nil {
-		return nil
-	}
-	if n.Op == OBLOCK && n.Ninit == nil {
-		// Flatten list and steal storage.
-		// Poison pointer to catch errant uses.
-		l := n.List
-
-		n.List = nil
-		return l
-	}
-
-	l := new(NodeList)
-	l.N = n
-	l.End = l
-	return l
-}
-
-// list returns the result of appending n to l.
-func list(l *NodeList, n *Node) *NodeList {
-	return concat(l, list1(n))
-}
-
-// listsort sorts *l in place according to the 3-way comparison function f.
-// The algorithm is mergesort, so it is guaranteed to be O(n log n).
-func listsort(l **NodeList, f func(*Node, *Node) int) {
-	if *l == nil || (*l).Next == nil {
-		return
-	}
-
-	l1 := *l
-	l2 := *l
-	for {
-		l2 = l2.Next
-		if l2 == nil {
-			break
-		}
-		l2 = l2.Next
-		if l2 == nil {
-			break
-		}
-		l1 = l1.Next
-	}
-
-	l2 = l1.Next
-	l1.Next = nil
-	l2.End = (*l).End
-	(*l).End = l1
-
-	l1 = *l
-	listsort(&l1, f)
-	listsort(&l2, f)
-
-	if f(l1.N, l2.N) < 0 {
-		*l = l1
-	} else {
-		*l = l2
-		l2 = l1
-		l1 = *l
-	}
-
-	// now l1 == *l; and l1 < l2
-
-	var le *NodeList
-	for (l1 != nil) && (l2 != nil) {
-		for (l1.Next != nil) && f(l1.Next.N, l2.N) < 0 {
-			l1 = l1.Next
-		}
-
-		// l1 is last one from l1 that is < l2
-		le = l1.Next // le is the rest of l1, first one that is >= l2
-		if le != nil {
-			le.End = (*l).End
-		}
-
-		(*l).End = l1       // cut *l at l1
-		*l = concat(*l, l2) // glue l2 to *l's tail
-
-		l1 = l2 // l1 is the first element of *l that is < the new l2
-		l2 = le // ... because l2 now is the old tail of l1
-	}
-
-	*l = concat(*l, l2) // any remainder
-}
-
-// count returns the length of the list l.
-func count(l *NodeList) int {
-	n := int64(0)
-	for ; l != nil; l = l.Next {
-		n++
-	}
-	if int64(int(n)) != n { // Overflow.
-		Yyerror("too many elements in list")
-	}
-	return int(n)
-}
diff --git a/src/cmd/compile/internal/gc/typecheck.go b/src/cmd/compile/internal/gc/typecheck.go
deleted file mode 100644
index befe3b2..0000000
--- a/src/cmd/compile/internal/gc/typecheck.go
+++ /dev/null
@@ -1,4035 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-	"math"
-	"strings"
-)
-
-/*
- * type check the whole tree of an expression.
- * calculates expression types.
- * evaluates compile time constants.
- * marks variables that escape the local frame.
- * rewrites n->op to be more specific in some cases.
- */
-var typecheckdefstack *NodeList
-
-/*
- * resolve ONONAME to definition, if any.
- */
-func resolve(n *Node) *Node {
-	if n != nil && n.Op == ONONAME && n.Sym != nil {
-		r := n.Sym.Def
-		if r != nil {
-			if r.Op != OIOTA {
-				n = r
-			} else if n.Name.Iota >= 0 {
-				n = Nodintconst(int64(n.Name.Iota))
-			}
-		}
-	}
-
-	return n
-}
-
-func typechecklist(l *NodeList, top int) {
-	for ; l != nil; l = l.Next {
-		typecheck(&l.N, top)
-	}
-}
-
-var _typekind = []string{
-	TINT:        "int",
-	TUINT:       "uint",
-	TINT8:       "int8",
-	TUINT8:      "uint8",
-	TINT16:      "int16",
-	TUINT16:     "uint16",
-	TINT32:      "int32",
-	TUINT32:     "uint32",
-	TINT64:      "int64",
-	TUINT64:     "uint64",
-	TUINTPTR:    "uintptr",
-	TCOMPLEX64:  "complex64",
-	TCOMPLEX128: "complex128",
-	TFLOAT32:    "float32",
-	TFLOAT64:    "float64",
-	TBOOL:       "bool",
-	TSTRING:     "string",
-	TPTR32:      "pointer",
-	TPTR64:      "pointer",
-	TUNSAFEPTR:  "unsafe.Pointer",
-	TSTRUCT:     "struct",
-	TINTER:      "interface",
-	TCHAN:       "chan",
-	TMAP:        "map",
-	TARRAY:      "array",
-	TFUNC:       "func",
-	TNIL:        "nil",
-	TIDEAL:      "untyped number",
-}
-
-func typekind(t *Type) string {
-	if Isslice(t) {
-		return "slice"
-	}
-	et := int(t.Etype)
-	if 0 <= et && et < len(_typekind) {
-		s := _typekind[et]
-		if s != "" {
-			return s
-		}
-	}
-	return fmt.Sprintf("etype=%d", et)
-}
-
-/*
- * sprint_depchain prints a dependency chain
- * of nodes into fmt.
- * It is used by typecheck in the case of OLITERAL nodes
- * to print constant definition loops.
- */
-func sprint_depchain(fmt_ *string, stack *NodeList, cur *Node, first *Node) {
-	for l := stack; l != nil; l = l.Next {
-		if l.N.Op == cur.Op {
-			if l.N != first {
-				sprint_depchain(fmt_, l.Next, l.N, first)
-			}
-			*fmt_ += fmt.Sprintf("\n\t%v: %v uses %v", l.N.Line(), l.N, cur)
-			return
-		}
-	}
-}
-
-/*
- * type check node *np.
- * replaces *np with a new pointer in some cases.
- * returns the final value of *np as a convenience.
- */
-
-var typecheck_tcstack *NodeList
-var typecheck_tcfree *NodeList
-
-func typecheck(np **Node, top int) *Node {
-	// cannot type check until all the source has been parsed
-	if typecheckok == 0 {
-		Fatal("early typecheck")
-	}
-
-	n := *np
-	if n == nil {
-		return nil
-	}
-
-	lno := int(setlineno(n))
-
-	// Skip over parens.
-	for n.Op == OPAREN {
-		n = n.Left
-	}
-
-	// Resolve definition of name and value of iota lazily.
-	n = resolve(n)
-
-	*np = n
-
-	// Skip typecheck if already done.
-	// But re-typecheck ONAME/OTYPE/OLITERAL/OPACK node in case context has changed.
-	if n.Typecheck == 1 {
-		switch n.Op {
-		case ONAME, OTYPE, OLITERAL, OPACK:
-			break
-
-		default:
-			lineno = int32(lno)
-			return n
-		}
-	}
-
-	if n.Typecheck == 2 {
-		// Typechecking loop. Trying printing a meaningful message,
-		// otherwise a stack trace of typechecking.
-		var fmt_ string
-		switch n.Op {
-		// We can already diagnose variables used as types.
-		case ONAME:
-			if top&(Erv|Etype) == Etype {
-				Yyerror("%v is not a type", n)
-			}
-
-		case OLITERAL:
-			if top&(Erv|Etype) == Etype {
-				Yyerror("%v is not a type", n)
-				break
-			}
-
-			fmt_ = ""
-			sprint_depchain(&fmt_, typecheck_tcstack, n, n)
-			yyerrorl(int(n.Lineno), "constant definition loop%s", fmt_)
-		}
-
-		if nsavederrors+nerrors == 0 {
-			fmt_ = ""
-			for l := typecheck_tcstack; l != nil; l = l.Next {
-				fmt_ += fmt.Sprintf("\n\t%v %v", l.N.Line(), l.N)
-			}
-			Yyerror("typechecking loop involving %v%s", n, fmt_)
-		}
-
-		lineno = int32(lno)
-		return n
-	}
-
-	n.Typecheck = 2
-
-	var l *NodeList
-	if typecheck_tcfree != nil {
-		l = typecheck_tcfree
-		typecheck_tcfree = l.Next
-	} else {
-		l = new(NodeList)
-	}
-	l.Next = typecheck_tcstack
-	l.N = n
-	typecheck_tcstack = l
-
-	typecheck1(&n, top)
-	*np = n
-	n.Typecheck = 1
-
-	if typecheck_tcstack != l {
-		Fatal("typecheck stack out of sync")
-	}
-	typecheck_tcstack = l.Next
-	l.Next = typecheck_tcfree
-	typecheck_tcfree = l
-
-	lineno = int32(lno)
-	return n
-}
-
-/*
- * does n contain a call or receive operation?
- */
-func callrecv(n *Node) bool {
-	if n == nil {
-		return false
-	}
-
-	switch n.Op {
-	case OCALL,
-		OCALLMETH,
-		OCALLINTER,
-		OCALLFUNC,
-		ORECV,
-		OCAP,
-		OLEN,
-		OCOPY,
-		ONEW,
-		OAPPEND,
-		ODELETE:
-		return true
-	}
-
-	return callrecv(n.Left) || callrecv(n.Right) || callrecvlist(n.Ninit) || callrecvlist(n.Nbody) || callrecvlist(n.List) || callrecvlist(n.Rlist)
-}
-
-func callrecvlist(l *NodeList) bool {
-	for ; l != nil; l = l.Next {
-		if callrecv(l.N) {
-			return true
-		}
-	}
-	return false
-}
-
-// indexlit implements typechecking of untyped values as
-// array/slice indexes. It is equivalent to defaultlit
-// except for constants of numerical kind, which are acceptable
-// whenever they can be represented by a value of type int.
-func indexlit(np **Node) {
-	n := *np
-	if n == nil || !isideal(n.Type) {
-		return
-	}
-	switch consttype(n) {
-	case CTINT, CTRUNE, CTFLT, CTCPLX:
-		defaultlit(np, Types[TINT])
-	}
-
-	defaultlit(np, nil)
-}
-
-func typecheck1(np **Node, top int) {
-	n := *np
-	defer func() {
-		*np = n
-	}()
-
-	if n.Sym != nil {
-		if n.Op == ONAME && n.Etype != 0 && top&Ecall == 0 {
-			Yyerror("use of builtin %v not in function call", n.Sym)
-			n.Type = nil
-			return
-		}
-
-		typecheckdef(n)
-		if n.Op == ONONAME {
-			n.Type = nil
-			return
-		}
-	}
-
-	ok := 0
-OpSwitch:
-	switch n.Op {
-	// until typecheck is complete, do nothing.
-	default:
-		Dump("typecheck", n)
-
-		Fatal("typecheck %v", Oconv(int(n.Op), 0))
-
-		/*
-		 * names
-		 */
-	case OLITERAL:
-		ok |= Erv
-
-		if n.Type == nil && n.Val().Ctype() == CTSTR {
-			n.Type = idealstring
-		}
-		break OpSwitch
-
-	case ONONAME:
-		ok |= Erv
-		break OpSwitch
-
-	case ONAME:
-		if n.Name.Decldepth == 0 {
-			n.Name.Decldepth = decldepth
-		}
-		if n.Etype != 0 {
-			ok |= Ecall
-			break OpSwitch
-		}
-
-		if top&Easgn == 0 {
-			// not a write to the variable
-			if isblank(n) {
-				Yyerror("cannot use _ as value")
-				n.Type = nil
-				return
-			}
-
-			n.Used = true
-		}
-
-		if top&Ecall == 0 && isunsafebuiltin(n) {
-			Yyerror("%v is not an expression, must be called", n)
-			n.Type = nil
-			return
-		}
-
-		ok |= Erv
-		break OpSwitch
-
-	case OPACK:
-		Yyerror("use of package %v without selector", n.Sym)
-		n.Type = nil
-		return
-
-	case ODDD:
-		break
-
-		/*
-		 * types (OIND is with exprs)
-		 */
-	case OTYPE:
-		ok |= Etype
-
-		if n.Type == nil {
-			n.Type = nil
-			return
-		}
-
-	case OTARRAY:
-		ok |= Etype
-		t := typ(TARRAY)
-		l := n.Left
-		r := n.Right
-		if l == nil {
-			t.Bound = -1 // slice
-		} else if l.Op == ODDD {
-			t.Bound = -100 // to be filled in
-			if top&Ecomplit == 0 && n.Diag == 0 {
-				t.Broke = 1
-				n.Diag = 1
-				Yyerror("use of [...] array outside of array literal")
-			}
-		} else {
-			l := typecheck(&n.Left, Erv)
-			var v Val
-			switch consttype(l) {
-			case CTINT, CTRUNE:
-				v = l.Val()
-
-			case CTFLT:
-				v = toint(l.Val())
-
-			default:
-				if l.Type != nil && Isint[l.Type.Etype] && l.Op != OLITERAL {
-					Yyerror("non-constant array bound %v", l)
-				} else {
-					Yyerror("invalid array bound %v", l)
-				}
-				n.Type = nil
-				return
-			}
-
-			t.Bound = Mpgetfix(v.U.(*Mpint))
-			if doesoverflow(v, Types[TINT]) {
-				Yyerror("array bound is too large")
-				n.Type = nil
-				return
-			} else if t.Bound < 0 {
-				Yyerror("array bound must be non-negative")
-				n.Type = nil
-				return
-			}
-		}
-
-		typecheck(&r, Etype)
-		if r.Type == nil {
-			n.Type = nil
-			return
-		}
-		t.Type = r.Type
-		n.Op = OTYPE
-		n.Type = t
-		n.Left = nil
-		n.Right = nil
-		if t.Bound != -100 {
-			checkwidth(t)
-		}
-
-	case OTMAP:
-		ok |= Etype
-		l := typecheck(&n.Left, Etype)
-		r := typecheck(&n.Right, Etype)
-		if l.Type == nil || r.Type == nil {
-			n.Type = nil
-			return
-		}
-		n.Op = OTYPE
-		n.Type = maptype(l.Type, r.Type)
-		n.Left = nil
-		n.Right = nil
-
-	case OTCHAN:
-		ok |= Etype
-		l := typecheck(&n.Left, Etype)
-		if l.Type == nil {
-			n.Type = nil
-			return
-		}
-		t := typ(TCHAN)
-		t.Type = l.Type
-		t.Chan = n.Etype
-		n.Op = OTYPE
-		n.Type = t
-		n.Left = nil
-		n.Etype = 0
-
-	case OTSTRUCT:
-		ok |= Etype
-		n.Op = OTYPE
-		n.Type = tostruct(n.List)
-		if n.Type == nil || n.Type.Broke != 0 {
-			n.Type = nil
-			return
-		}
-		n.List = nil
-
-	case OTINTER:
-		ok |= Etype
-		n.Op = OTYPE
-		n.Type = tointerface(n.List)
-		if n.Type == nil {
-			n.Type = nil
-			return
-		}
-
-	case OTFUNC:
-		ok |= Etype
-		n.Op = OTYPE
-		n.Type = functype(n.Left, n.List, n.Rlist)
-		if n.Type == nil {
-			n.Type = nil
-			return
-		}
-
-		/*
-		 * type or expr
-		 */
-	case OIND:
-		ntop := Erv | Etype
-
-		if top&Eaddr == 0 { // The *x in &*x is not an indirect.
-			ntop |= Eindir
-		}
-		ntop |= top & Ecomplit
-		l := typecheck(&n.Left, ntop)
-		t := l.Type
-		if t == nil {
-			n.Type = nil
-			return
-		}
-		if l.Op == OTYPE {
-			ok |= Etype
-			n.Op = OTYPE
-			n.Type = Ptrto(l.Type)
-			n.Left = nil
-			break OpSwitch
-		}
-
-		if !Isptr[t.Etype] {
-			if top&(Erv|Etop) != 0 {
-				Yyerror("invalid indirect of %v", Nconv(n.Left, obj.FmtLong))
-				n.Type = nil
-				return
-			}
-
-			break OpSwitch
-		}
-
-		ok |= Erv
-		n.Type = t.Type
-		break OpSwitch
-
-		/*
-		 * arithmetic exprs
-		 */
-	case OASOP,
-		OADD,
-		OAND,
-		OANDAND,
-		OANDNOT,
-		ODIV,
-		OEQ,
-		OGE,
-		OGT,
-		OHMUL,
-		OLE,
-		OLT,
-		OLSH,
-		ORSH,
-		OMOD,
-		OMUL,
-		ONE,
-		OOR,
-		OOROR,
-		OSUB,
-		OXOR:
-		var l *Node
-		var op int
-		var r *Node
-		if n.Op == OASOP {
-			ok |= Etop
-			l = typecheck(&n.Left, Erv)
-			r = typecheck(&n.Right, Erv)
-			checkassign(n, n.Left)
-			if l.Type == nil || r.Type == nil {
-				n.Type = nil
-				return
-			}
-			op = int(n.Etype)
-		} else {
-			ok |= Erv
-			l = typecheck(&n.Left, Erv|top&Eiota)
-			r = typecheck(&n.Right, Erv|top&Eiota)
-			if l.Type == nil || r.Type == nil {
-				n.Type = nil
-				return
-			}
-			op = int(n.Op)
-		}
-		if op == OLSH || op == ORSH {
-			defaultlit(&r, Types[TUINT])
-			n.Right = r
-			t := r.Type
-			if !Isint[t.Etype] || Issigned[t.Etype] {
-				Yyerror("invalid operation: %v (shift count type %v, must be unsigned integer)", n, r.Type)
-				n.Type = nil
-				return
-			}
-
-			t = l.Type
-			if t != nil && t.Etype != TIDEAL && !Isint[t.Etype] {
-				Yyerror("invalid operation: %v (shift of type %v)", n, t)
-				n.Type = nil
-				return
-			}
-
-			// no defaultlit for left
-			// the outer context gives the type
-			n.Type = l.Type
-
-			break OpSwitch
-		}
-
-		// ideal mixed with non-ideal
-		defaultlit2(&l, &r, 0)
-
-		n.Left = l
-		n.Right = r
-		if l.Type == nil || r.Type == nil {
-			n.Type = nil
-			return
-		}
-		t := l.Type
-		if t.Etype == TIDEAL {
-			t = r.Type
-		}
-		et := int(t.Etype)
-		if et == TIDEAL {
-			et = TINT
-		}
-		aop := 0
-		if iscmp[n.Op] && t.Etype != TIDEAL && !Eqtype(l.Type, r.Type) {
-			// comparison is okay as long as one side is
-			// assignable to the other.  convert so they have
-			// the same type.
-			//
-			// the only conversion that isn't a no-op is concrete == interface.
-			// in that case, check comparability of the concrete type.
-			// The conversion allocates, so only do it if the concrete type is huge.
-			if r.Type.Etype != TBLANK {
-				aop = assignop(l.Type, r.Type, nil)
-				if aop != 0 {
-					if Isinter(r.Type) && !Isinter(l.Type) && algtype1(l.Type, nil) == ANOEQ {
-						Yyerror("invalid operation: %v (operator %v not defined on %s)", n, Oconv(int(op), 0), typekind(l.Type))
-						n.Type = nil
-						return
-					}
-
-					dowidth(l.Type)
-					if Isinter(r.Type) == Isinter(l.Type) || l.Type.Width >= 1<<16 {
-						l = Nod(aop, l, nil)
-						l.Type = r.Type
-						l.Typecheck = 1
-						n.Left = l
-					}
-
-					t = r.Type
-					goto converted
-				}
-			}
-
-			if l.Type.Etype != TBLANK {
-				aop = assignop(r.Type, l.Type, nil)
-				if aop != 0 {
-					if Isinter(l.Type) && !Isinter(r.Type) && algtype1(r.Type, nil) == ANOEQ {
-						Yyerror("invalid operation: %v (operator %v not defined on %s)", n, Oconv(int(op), 0), typekind(r.Type))
-						n.Type = nil
-						return
-					}
-
-					dowidth(r.Type)
-					if Isinter(r.Type) == Isinter(l.Type) || r.Type.Width >= 1<<16 {
-						r = Nod(aop, r, nil)
-						r.Type = l.Type
-						r.Typecheck = 1
-						n.Right = r
-					}
-
-					t = l.Type
-				}
-			}
-
-		converted:
-			et = int(t.Etype)
-		}
-
-		if t.Etype != TIDEAL && !Eqtype(l.Type, r.Type) {
-			defaultlit2(&l, &r, 1)
-			if n.Op == OASOP && n.Implicit {
-				Yyerror("invalid operation: %v (non-numeric type %v)", n, l.Type)
-				n.Type = nil
-				return
-			}
-
-			if Isinter(r.Type) == Isinter(l.Type) || aop == 0 {
-				Yyerror("invalid operation: %v (mismatched types %v and %v)", n, l.Type, r.Type)
-				n.Type = nil
-				return
-			}
-		}
-
-		if !okfor[op][et] {
-			Yyerror("invalid operation: %v (operator %v not defined on %s)", n, Oconv(int(op), 0), typekind(t))
-			n.Type = nil
-			return
-		}
-
-		// okfor allows any array == array, map == map, func == func.
-		// restrict to slice/map/func == nil and nil == slice/map/func.
-		if Isfixedarray(l.Type) && algtype1(l.Type, nil) == ANOEQ {
-			Yyerror("invalid operation: %v (%v cannot be compared)", n, l.Type)
-			n.Type = nil
-			return
-		}
-
-		if Isslice(l.Type) && !isnil(l) && !isnil(r) {
-			Yyerror("invalid operation: %v (slice can only be compared to nil)", n)
-			n.Type = nil
-			return
-		}
-
-		if l.Type.Etype == TMAP && !isnil(l) && !isnil(r) {
-			Yyerror("invalid operation: %v (map can only be compared to nil)", n)
-			n.Type = nil
-			return
-		}
-
-		if l.Type.Etype == TFUNC && !isnil(l) && !isnil(r) {
-			Yyerror("invalid operation: %v (func can only be compared to nil)", n)
-			n.Type = nil
-			return
-		}
-
-		var badtype *Type
-		if l.Type.Etype == TSTRUCT && algtype1(l.Type, &badtype) == ANOEQ {
-			Yyerror("invalid operation: %v (struct containing %v cannot be compared)", n, badtype)
-			n.Type = nil
-			return
-		}
-
-		t = l.Type
-		if iscmp[n.Op] {
-			evconst(n)
-			t = idealbool
-			if n.Op != OLITERAL {
-				defaultlit2(&l, &r, 1)
-				n.Left = l
-				n.Right = r
-			}
-		} else if n.Op == OANDAND || n.Op == OOROR {
-			if l.Type == r.Type {
-				t = l.Type
-			} else if l.Type == idealbool {
-				t = r.Type
-			} else if r.Type == idealbool {
-				t = l.Type
-			}
-		} else
-		// non-comparison operators on ideal bools should make them lose their ideal-ness
-		if t == idealbool {
-			t = Types[TBOOL]
-		}
-
-		if et == TSTRING {
-			if iscmp[n.Op] {
-				n.Etype = n.Op
-				n.Op = OCMPSTR
-			} else if n.Op == OADD {
-				// create OADDSTR node with list of strings in x + y + z + (w + v) + ...
-				n.Op = OADDSTR
-
-				if l.Op == OADDSTR {
-					n.List = l.List
-				} else {
-					n.List = list1(l)
-				}
-				if r.Op == OADDSTR {
-					n.List = concat(n.List, r.List)
-				} else {
-					n.List = list(n.List, r)
-				}
-				n.Left = nil
-				n.Right = nil
-			}
-		}
-
-		if et == TINTER {
-			if l.Op == OLITERAL && l.Val().Ctype() == CTNIL {
-				// swap for back end
-				n.Left = r
-
-				n.Right = l
-			} else if r.Op == OLITERAL && r.Val().Ctype() == CTNIL {
-			} else // leave alone for back end
-			if Isinter(r.Type) == Isinter(l.Type) {
-				n.Etype = n.Op
-				n.Op = OCMPIFACE
-			}
-		}
-
-		if (op == ODIV || op == OMOD) && Isconst(r, CTINT) {
-			if mpcmpfixc(r.Val().U.(*Mpint), 0) == 0 {
-				Yyerror("division by zero")
-				n.Type = nil
-				return
-			}
-		}
-
-		n.Type = t
-		break OpSwitch
-
-	case OCOM, OMINUS, ONOT, OPLUS:
-		ok |= Erv
-		l := typecheck(&n.Left, Erv|top&Eiota)
-		t := l.Type
-		if t == nil {
-			n.Type = nil
-			return
-		}
-		if !okfor[n.Op][t.Etype] {
-			Yyerror("invalid operation: %v %v", Oconv(int(n.Op), 0), t)
-			n.Type = nil
-			return
-		}
-
-		n.Type = t
-		break OpSwitch
-
-		/*
-		 * exprs
-		 */
-	case OADDR:
-		ok |= Erv
-
-		typecheck(&n.Left, Erv|Eaddr)
-		if n.Left.Type == nil {
-			n.Type = nil
-			return
-		}
-		checklvalue(n.Left, "take the address of")
-		r := outervalue(n.Left)
-		var l *Node
-		for l = n.Left; l != r; l = l.Left {
-			l.Addrtaken = true
-			if l.Name != nil && l.Name.Param != nil && l.Name.Param.Closure != nil {
-				l.Name.Param.Closure.Addrtaken = true
-			}
-		}
-
-		if l.Orig != l && l.Op == ONAME {
-			Fatal("found non-orig name node %v", l)
-		}
-		l.Addrtaken = true
-		if l.Name != nil && l.Name.Param != nil && l.Name.Param.Closure != nil {
-			l.Name.Param.Closure.Addrtaken = true
-		}
-		defaultlit(&n.Left, nil)
-		l = n.Left
-		t := l.Type
-		if t == nil {
-			n.Type = nil
-			return
-		}
-		n.Type = Ptrto(t)
-		break OpSwitch
-
-	case OCOMPLIT:
-		ok |= Erv
-		typecheckcomplit(&n)
-		if n.Type == nil {
-			n.Type = nil
-			return
-		}
-		break OpSwitch
-
-	case OXDOT, ODOT:
-		if n.Op == OXDOT {
-			n = adddot(n)
-			n.Op = ODOT
-			if n.Left == nil {
-				n.Type = nil
-				return
-			}
-		}
-
-		typecheck(&n.Left, Erv|Etype)
-
-		defaultlit(&n.Left, nil)
-		if n.Right.Op != ONAME {
-			Yyerror("rhs of . must be a name") // impossible
-			n.Type = nil
-			return
-		}
-
-		t := n.Left.Type
-		if t == nil {
-			adderrorname(n)
-			n.Type = nil
-			return
-		}
-
-		r := n.Right
-
-		if n.Left.Op == OTYPE {
-			if !looktypedot(n, t, 0) {
-				if looktypedot(n, t, 1) {
-					Yyerror("%v undefined (cannot refer to unexported method %v)", n, n.Right.Sym)
-				} else {
-					Yyerror("%v undefined (type %v has no method %v)", n, t, n.Right.Sym)
-				}
-				n.Type = nil
-				return
-			}
-
-			if n.Type.Etype != TFUNC || n.Type.Thistuple != 1 {
-				Yyerror("type %v has no method %v", n.Left.Type, Sconv(n.Right.Sym, obj.FmtShort))
-				n.Type = nil
-				n.Type = nil
-				return
-			}
-
-			n.Op = ONAME
-			if n.Name == nil {
-				n.Name = new(Name)
-			}
-			n.Sym = n.Right.Sym
-			n.Type = methodfunc(n.Type, n.Left.Type)
-			n.Xoffset = 0
-			n.Class = PFUNC
-			ok = Erv
-			break OpSwitch
-		}
-
-		if Isptr[t.Etype] && t.Type.Etype != TINTER {
-			t = t.Type
-			if t == nil {
-				n.Type = nil
-				return
-			}
-			n.Op = ODOTPTR
-			checkwidth(t)
-		}
-
-		if isblank(n.Right) {
-			Yyerror("cannot refer to blank field or method")
-			n.Type = nil
-			return
-		}
-
-		if lookdot(n, t, 0) == nil {
-			// Legitimate field or method lookup failed, try to explain the error
-			switch {
-			case isnilinter(t):
-				Yyerror("%v undefined (type %v is interface with no methods)", n, n.Left.Type)
-
-			case Isptr[t.Etype] && Isinter(t.Type):
-				// Pointer to interface is almost always a mistake.
-				Yyerror("%v undefined (type %v is pointer to interface, not interface)", n, n.Left.Type)
-
-			case lookdot(n, t, 1) != nil:
-				// Field or method matches by name, but it is not exported.
-				Yyerror("%v undefined (cannot refer to unexported field or method %v)", n, n.Right.Sym)
-
-			default:
-				if mt := lookdot(n, t, 2); mt != nil { // Case-insensitive lookup.
-					Yyerror("%v undefined (type %v has no field or method %v, but does have %v)", n, n.Left.Type, n.Right.Sym, mt.Sym)
-				} else {
-					Yyerror("%v undefined (type %v has no field or method %v)", n, n.Left.Type, n.Right.Sym)
-				}
-			}
-			n.Type = nil
-			return
-		}
-
-		switch n.Op {
-		case ODOTINTER, ODOTMETH:
-			if top&Ecall != 0 {
-				ok |= Ecall
-			} else {
-				typecheckpartialcall(n, r)
-				ok |= Erv
-			}
-
-		default:
-			ok |= Erv
-		}
-
-		break OpSwitch
-
-	case ODOTTYPE:
-		ok |= Erv
-		typecheck(&n.Left, Erv)
-		defaultlit(&n.Left, nil)
-		l := n.Left
-		t := l.Type
-		if t == nil {
-			n.Type = nil
-			return
-		}
-		if !Isinter(t) {
-			Yyerror("invalid type assertion: %v (non-interface type %v on left)", n, t)
-			n.Type = nil
-			return
-		}
-
-		if n.Right != nil {
-			typecheck(&n.Right, Etype)
-			n.Type = n.Right.Type
-			n.Right = nil
-			if n.Type == nil {
-				n.Type = nil
-				return
-			}
-		}
-
-		if n.Type != nil && n.Type.Etype != TINTER {
-			var have *Type
-			var missing *Type
-			var ptr int
-			if !implements(n.Type, t, &missing, &have, &ptr) {
-				if have != nil && have.Sym == missing.Sym {
-					Yyerror("impossible type assertion:\n\t%v does not implement %v (wrong type for %v method)\n"+"\t\thave %v%v\n\t\twant %v%v", n.Type, t, missing.Sym, have.Sym, Tconv(have.Type, obj.FmtShort|obj.FmtByte), missing.Sym, Tconv(missing.Type, obj.FmtShort|obj.FmtByte))
-				} else if ptr != 0 {
-					Yyerror("impossible type assertion:\n\t%v does not implement %v (%v method has pointer receiver)", n.Type, t, missing.Sym)
-				} else if have != nil {
-					Yyerror("impossible type assertion:\n\t%v does not implement %v (missing %v method)\n"+"\t\thave %v%v\n\t\twant %v%v", n.Type, t, missing.Sym, have.Sym, Tconv(have.Type, obj.FmtShort|obj.FmtByte), missing.Sym, Tconv(missing.Type, obj.FmtShort|obj.FmtByte))
-				} else {
-					Yyerror("impossible type assertion:\n\t%v does not implement %v (missing %v method)", n.Type, t, missing.Sym)
-				}
-				n.Type = nil
-				return
-			}
-		}
-
-		break OpSwitch
-
-	case OINDEX:
-		ok |= Erv
-		typecheck(&n.Left, Erv)
-		defaultlit(&n.Left, nil)
-		implicitstar(&n.Left)
-		l := n.Left
-		typecheck(&n.Right, Erv)
-		r := n.Right
-		t := l.Type
-		if t == nil || r.Type == nil {
-			n.Type = nil
-			return
-		}
-		switch t.Etype {
-		default:
-			Yyerror("invalid operation: %v (type %v does not support indexing)", n, t)
-			n.Type = nil
-			return
-
-		case TSTRING, TARRAY:
-			indexlit(&n.Right)
-			if t.Etype == TSTRING {
-				n.Type = bytetype
-			} else {
-				n.Type = t.Type
-			}
-			why := "string"
-			if t.Etype == TARRAY {
-				if Isfixedarray(t) {
-					why = "array"
-				} else {
-					why = "slice"
-				}
-			}
-
-			if n.Right.Type != nil && !Isint[n.Right.Type.Etype] {
-				Yyerror("non-integer %s index %v", why, n.Right)
-				break
-			}
-
-			if Isconst(n.Right, CTINT) {
-				x := Mpgetfix(n.Right.Val().U.(*Mpint))
-				if x < 0 {
-					Yyerror("invalid %s index %v (index must be non-negative)", why, n.Right)
-				} else if Isfixedarray(t) && t.Bound > 0 && x >= t.Bound {
-					Yyerror("invalid array index %v (out of bounds for %d-element array)", n.Right, t.Bound)
-				} else if Isconst(n.Left, CTSTR) && x >= int64(len(n.Left.Val().U.(string))) {
-					Yyerror("invalid string index %v (out of bounds for %d-byte string)", n.Right, len(n.Left.Val().U.(string)))
-				} else if Mpcmpfixfix(n.Right.Val().U.(*Mpint), Maxintval[TINT]) > 0 {
-					Yyerror("invalid %s index %v (index too large)", why, n.Right)
-				}
-			}
-
-		case TMAP:
-			n.Etype = 0
-			defaultlit(&n.Right, t.Down)
-			if n.Right.Type != nil {
-				n.Right = assignconv(n.Right, t.Down, "map index")
-			}
-			n.Type = t.Type
-			n.Op = OINDEXMAP
-		}
-
-		break OpSwitch
-
-	case ORECV:
-		ok |= Etop | Erv
-		typecheck(&n.Left, Erv)
-		defaultlit(&n.Left, nil)
-		l := n.Left
-		t := l.Type
-		if t == nil {
-			n.Type = nil
-			return
-		}
-		if t.Etype != TCHAN {
-			Yyerror("invalid operation: %v (receive from non-chan type %v)", n, t)
-			n.Type = nil
-			return
-		}
-
-		if t.Chan&Crecv == 0 {
-			Yyerror("invalid operation: %v (receive from send-only type %v)", n, t)
-			n.Type = nil
-			return
-		}
-
-		n.Type = t.Type
-		break OpSwitch
-
-	case OSEND:
-		ok |= Etop
-		l := typecheck(&n.Left, Erv)
-		typecheck(&n.Right, Erv)
-		defaultlit(&n.Left, nil)
-		l = n.Left
-		t := l.Type
-		if t == nil {
-			n.Type = nil
-			return
-		}
-		if t.Etype != TCHAN {
-			Yyerror("invalid operation: %v (send to non-chan type %v)", n, t)
-			n.Type = nil
-			return
-		}
-
-		if t.Chan&Csend == 0 {
-			Yyerror("invalid operation: %v (send to receive-only type %v)", n, t)
-			n.Type = nil
-			return
-		}
-
-		defaultlit(&n.Right, t.Type)
-		r := n.Right
-		if r.Type == nil {
-			n.Type = nil
-			return
-		}
-		n.Right = assignconv(r, l.Type.Type, "send")
-
-		// TODO: more aggressive
-		n.Etype = 0
-
-		n.Type = nil
-		break OpSwitch
-
-	case OSLICE:
-		ok |= Erv
-		typecheck(&n.Left, top)
-		typecheck(&n.Right.Left, Erv)
-		typecheck(&n.Right.Right, Erv)
-		defaultlit(&n.Left, nil)
-		indexlit(&n.Right.Left)
-		indexlit(&n.Right.Right)
-		l := n.Left
-		if Isfixedarray(l.Type) {
-			if !islvalue(n.Left) {
-				Yyerror("invalid operation %v (slice of unaddressable value)", n)
-				n.Type = nil
-				return
-			}
-
-			n.Left = Nod(OADDR, n.Left, nil)
-			n.Left.Implicit = true
-			typecheck(&n.Left, Erv)
-			l = n.Left
-		}
-
-		t := l.Type
-		if t == nil {
-			n.Type = nil
-			return
-		}
-		var tp *Type
-		if Istype(t, TSTRING) {
-			n.Type = t
-			n.Op = OSLICESTR
-		} else if Isptr[t.Etype] && Isfixedarray(t.Type) {
-			tp = t.Type
-			n.Type = typ(TARRAY)
-			n.Type.Type = tp.Type
-			n.Type.Bound = -1
-			dowidth(n.Type)
-			n.Op = OSLICEARR
-		} else if Isslice(t) {
-			n.Type = t
-		} else {
-			Yyerror("cannot slice %v (type %v)", l, t)
-			n.Type = nil
-			return
-		}
-
-		lo := n.Right.Left
-		if lo != nil && checksliceindex(l, lo, tp) < 0 {
-			n.Type = nil
-			return
-		}
-		hi := n.Right.Right
-		if hi != nil && checksliceindex(l, hi, tp) < 0 {
-			n.Type = nil
-			return
-		}
-		if checksliceconst(lo, hi) < 0 {
-			n.Type = nil
-			return
-		}
-		break OpSwitch
-
-	case OSLICE3:
-		ok |= Erv
-		typecheck(&n.Left, top)
-		typecheck(&n.Right.Left, Erv)
-		typecheck(&n.Right.Right.Left, Erv)
-		typecheck(&n.Right.Right.Right, Erv)
-		defaultlit(&n.Left, nil)
-		indexlit(&n.Right.Left)
-		indexlit(&n.Right.Right.Left)
-		indexlit(&n.Right.Right.Right)
-		l := n.Left
-		if Isfixedarray(l.Type) {
-			if !islvalue(n.Left) {
-				Yyerror("invalid operation %v (slice of unaddressable value)", n)
-				n.Type = nil
-				return
-			}
-
-			n.Left = Nod(OADDR, n.Left, nil)
-			n.Left.Implicit = true
-			typecheck(&n.Left, Erv)
-			l = n.Left
-		}
-
-		t := l.Type
-		if t == nil {
-			n.Type = nil
-			return
-		}
-		if Istype(t, TSTRING) {
-			Yyerror("invalid operation %v (3-index slice of string)", n)
-			n.Type = nil
-			return
-		}
-
-		var tp *Type
-		if Isptr[t.Etype] && Isfixedarray(t.Type) {
-			tp = t.Type
-			n.Type = typ(TARRAY)
-			n.Type.Type = tp.Type
-			n.Type.Bound = -1
-			dowidth(n.Type)
-			n.Op = OSLICE3ARR
-		} else if Isslice(t) {
-			n.Type = t
-		} else {
-			Yyerror("cannot slice %v (type %v)", l, t)
-			n.Type = nil
-			return
-		}
-
-		lo := n.Right.Left
-		if lo != nil && checksliceindex(l, lo, tp) < 0 {
-			n.Type = nil
-			return
-		}
-		mid := n.Right.Right.Left
-		if mid != nil && checksliceindex(l, mid, tp) < 0 {
-			n.Type = nil
-			return
-		}
-		hi := n.Right.Right.Right
-		if hi != nil && checksliceindex(l, hi, tp) < 0 {
-			n.Type = nil
-			return
-		}
-		if checksliceconst(lo, hi) < 0 || checksliceconst(lo, mid) < 0 || checksliceconst(mid, hi) < 0 {
-			n.Type = nil
-			return
-		}
-		break OpSwitch
-
-		/*
-		 * call and call like
-		 */
-	case OCALL:
-		l := n.Left
-
-		if l.Op == ONAME {
-			r := unsafenmagic(n)
-			if r != nil {
-				if n.Isddd {
-					Yyerror("invalid use of ... with builtin %v", l)
-				}
-				n = r
-				typecheck1(&n, top)
-				return
-			}
-		}
-
-		typecheck(&n.Left, Erv|Etype|Ecall|top&Eproc)
-		n.Diag |= n.Left.Diag
-		l = n.Left
-		if l.Op == ONAME && l.Etype != 0 {
-			if n.Isddd && l.Etype != OAPPEND {
-				Yyerror("invalid use of ... with builtin %v", l)
-			}
-
-			// builtin: OLEN, OCAP, etc.
-			n.Op = l.Etype
-
-			n.Left = n.Right
-			n.Right = nil
-			typecheck1(&n, top)
-			return
-		}
-
-		defaultlit(&n.Left, nil)
-		l = n.Left
-		if l.Op == OTYPE {
-			if n.Isddd || l.Type.Bound == -100 {
-				if l.Type.Broke == 0 {
-					Yyerror("invalid use of ... in type conversion to %v", l.Type)
-				}
-				n.Diag = 1
-			}
-
-			// pick off before type-checking arguments
-			ok |= Erv
-
-			// turn CALL(type, arg) into CONV(arg) w/ type
-			n.Left = nil
-
-			n.Op = OCONV
-			n.Type = l.Type
-			if onearg(n, "conversion to %v", l.Type) < 0 {
-				n.Type = nil
-				return
-			}
-			typecheck1(&n, top)
-			return
-		}
-
-		if count(n.List) == 1 && !n.Isddd {
-			typecheck(&n.List.N, Erv|Efnstruct)
-		} else {
-			typechecklist(n.List, Erv)
-		}
-		t := l.Type
-		if t == nil {
-			n.Type = nil
-			return
-		}
-		checkwidth(t)
-
-		switch l.Op {
-		case ODOTINTER:
-			n.Op = OCALLINTER
-
-		case ODOTMETH:
-			n.Op = OCALLMETH
-
-			// typecheckaste was used here but there wasn't enough
-			// information further down the call chain to know if we
-			// were testing a method receiver for unexported fields.
-			// It isn't necessary, so just do a sanity check.
-			tp := getthisx(t).Type.Type
-
-			if l.Left == nil || !Eqtype(l.Left.Type, tp) {
-				Fatal("method receiver")
-			}
-
-		default:
-			n.Op = OCALLFUNC
-			if t.Etype != TFUNC {
-				Yyerror("cannot call non-function %v (type %v)", l, t)
-				n.Type = nil
-				return
-			}
-		}
-
-		typecheckaste(OCALL, n.Left, n.Isddd, getinargx(t), n.List, func() string { return fmt.Sprintf("argument to %v", n.Left) })
-		ok |= Etop
-		if t.Outtuple == 0 {
-			break OpSwitch
-		}
-		ok |= Erv
-		if t.Outtuple == 1 {
-			t := getoutargx(l.Type).Type
-			if t == nil {
-				n.Type = nil
-				return
-			}
-			if t.Etype == TFIELD {
-				t = t.Type
-			}
-			n.Type = t
-
-			if n.Op == OCALLFUNC && n.Left.Op == ONAME && (compiling_runtime != 0 || n.Left.Sym.Pkg == Runtimepkg) && n.Left.Sym.Name == "getg" {
-				// Emit code for runtime.getg() directly instead of calling function.
-				// Most such rewrites (for example the similar one for math.Sqrt) should be done in walk,
-				// so that the ordering pass can make sure to preserve the semantics of the original code
-				// (in particular, the exact time of the function call) by introducing temporaries.
-				// In this case, we know getg() always returns the same result within a given function
-				// and we want to avoid the temporaries, so we do the rewrite earlier than is typical.
-				n.Op = OGETG
-			}
-
-			break OpSwitch
-		}
-
-		// multiple return
-		if top&(Efnstruct|Etop) == 0 {
-			Yyerror("multiple-value %v() in single-value context", l)
-			break OpSwitch
-		}
-
-		n.Type = getoutargx(l.Type)
-
-		break OpSwitch
-
-	case OCAP, OLEN, OREAL, OIMAG:
-		ok |= Erv
-		if onearg(n, "%v", Oconv(int(n.Op), 0)) < 0 {
-			n.Type = nil
-			return
-		}
-		typecheck(&n.Left, Erv)
-		defaultlit(&n.Left, nil)
-		implicitstar(&n.Left)
-		l := n.Left
-		t := l.Type
-		if t == nil {
-			n.Type = nil
-			return
-		}
-		switch n.Op {
-		case OCAP:
-			if !okforcap[t.Etype] {
-				goto badcall1
-			}
-
-		case OLEN:
-			if !okforlen[t.Etype] {
-				goto badcall1
-			}
-
-		case OREAL, OIMAG:
-			if !Iscomplex[t.Etype] {
-				goto badcall1
-			}
-			if Isconst(l, CTCPLX) {
-				r := n
-				if n.Op == OREAL {
-					n = nodfltconst(&l.Val().U.(*Mpcplx).Real)
-				} else {
-					n = nodfltconst(&l.Val().U.(*Mpcplx).Imag)
-				}
-				n.Orig = r
-			}
-
-			n.Type = Types[cplxsubtype(int(t.Etype))]
-			break OpSwitch
-		}
-
-		// might be constant
-		switch t.Etype {
-		case TSTRING:
-			if Isconst(l, CTSTR) {
-				r := Nod(OXXX, nil, nil)
-				Nodconst(r, Types[TINT], int64(len(l.Val().U.(string))))
-				r.Orig = n
-				n = r
-			}
-
-		case TARRAY:
-			if t.Bound < 0 { // slice
-				break
-			}
-			if callrecv(l) { // has call or receive
-				break
-			}
-			r := Nod(OXXX, nil, nil)
-			Nodconst(r, Types[TINT], t.Bound)
-			r.Orig = n
-			n = r
-		}
-
-		n.Type = Types[TINT]
-		break OpSwitch
-
-	badcall1:
-		Yyerror("invalid argument %v for %v", Nconv(n.Left, obj.FmtLong), Oconv(int(n.Op), 0))
-		n.Type = nil
-		return
-
-	case OCOMPLEX:
-		ok |= Erv
-		var r *Node
-		var l *Node
-		if count(n.List) == 1 {
-			typechecklist(n.List, Efnstruct)
-			if n.List.N.Op != OCALLFUNC && n.List.N.Op != OCALLMETH {
-				Yyerror("invalid operation: complex expects two arguments")
-				n.Type = nil
-				return
-			}
-
-			t := n.List.N.Left.Type
-			if t.Outtuple != 2 {
-				Yyerror("invalid operation: complex expects two arguments, %v returns %d results", n.List.N, t.Outtuple)
-				n.Type = nil
-				return
-			}
-
-			t = n.List.N.Type.Type
-			l = t.Nname
-			r = t.Down.Nname
-		} else {
-			if twoarg(n) < 0 {
-				n.Type = nil
-				return
-			}
-			l = typecheck(&n.Left, Erv|top&Eiota)
-			r = typecheck(&n.Right, Erv|top&Eiota)
-			if l.Type == nil || r.Type == nil {
-				n.Type = nil
-				return
-			}
-			defaultlit2(&l, &r, 0)
-			if l.Type == nil || r.Type == nil {
-				n.Type = nil
-				return
-			}
-			n.Left = l
-			n.Right = r
-		}
-
-		if !Eqtype(l.Type, r.Type) {
-			Yyerror("invalid operation: %v (mismatched types %v and %v)", n, l.Type, r.Type)
-			n.Type = nil
-			return
-		}
-
-		var t *Type
-		switch l.Type.Etype {
-		default:
-			Yyerror("invalid operation: %v (arguments have type %v, expected floating-point)", n, l.Type)
-			n.Type = nil
-			return
-
-		case TIDEAL:
-			t = Types[TIDEAL]
-
-		case TFLOAT32:
-			t = Types[TCOMPLEX64]
-
-		case TFLOAT64:
-			t = Types[TCOMPLEX128]
-		}
-
-		if l.Op == OLITERAL && r.Op == OLITERAL {
-			// make it a complex literal
-			r = nodcplxlit(l.Val(), r.Val())
-
-			r.Orig = n
-			n = r
-		}
-
-		n.Type = t
-		break OpSwitch
-
-	case OCLOSE:
-		if onearg(n, "%v", Oconv(int(n.Op), 0)) < 0 {
-			n.Type = nil
-			return
-		}
-		typecheck(&n.Left, Erv)
-		defaultlit(&n.Left, nil)
-		l := n.Left
-		t := l.Type
-		if t == nil {
-			n.Type = nil
-			return
-		}
-		if t.Etype != TCHAN {
-			Yyerror("invalid operation: %v (non-chan type %v)", n, t)
-			n.Type = nil
-			return
-		}
-
-		if t.Chan&Csend == 0 {
-			Yyerror("invalid operation: %v (cannot close receive-only channel)", n)
-			n.Type = nil
-			return
-		}
-
-		ok |= Etop
-		break OpSwitch
-
-	case ODELETE:
-		args := n.List
-		if args == nil {
-			Yyerror("missing arguments to delete")
-			n.Type = nil
-			return
-		}
-
-		if args.Next == nil {
-			Yyerror("missing second (key) argument to delete")
-			n.Type = nil
-			return
-		}
-
-		if args.Next.Next != nil {
-			Yyerror("too many arguments to delete")
-			n.Type = nil
-			return
-		}
-
-		ok |= Etop
-		typechecklist(args, Erv)
-		l := args.N
-		r := args.Next.N
-		if l.Type != nil && l.Type.Etype != TMAP {
-			Yyerror("first argument to delete must be map; have %v", Tconv(l.Type, obj.FmtLong))
-			n.Type = nil
-			return
-		}
-
-		args.Next.N = assignconv(r, l.Type.Down, "delete")
-		break OpSwitch
-
-	case OAPPEND:
-		ok |= Erv
-		args := n.List
-		if args == nil {
-			Yyerror("missing arguments to append")
-			n.Type = nil
-			return
-		}
-
-		if count(args) == 1 && !n.Isddd {
-			typecheck(&args.N, Erv|Efnstruct)
-		} else {
-			typechecklist(args, Erv)
-		}
-
-		t := args.N.Type
-		if t == nil {
-			n.Type = nil
-			return
-		}
-
-		// Unpack multiple-return result before type-checking.
-		var funarg *Type
-		if Istype(t, TSTRUCT) && t.Funarg != 0 {
-			funarg = t
-			t = t.Type.Type
-		}
-
-		n.Type = t
-		if !Isslice(t) {
-			if Isconst(args.N, CTNIL) {
-				Yyerror("first argument to append must be typed slice; have untyped nil")
-				n.Type = nil
-				return
-			}
-
-			Yyerror("first argument to append must be slice; have %v", Tconv(t, obj.FmtLong))
-			n.Type = nil
-			return
-		}
-
-		if n.Isddd {
-			if args.Next == nil {
-				Yyerror("cannot use ... on first argument to append")
-				n.Type = nil
-				return
-			}
-
-			if args.Next.Next != nil {
-				Yyerror("too many arguments to append")
-				n.Type = nil
-				return
-			}
-
-			if Istype(t.Type, TUINT8) && Istype(args.Next.N.Type, TSTRING) {
-				defaultlit(&args.Next.N, Types[TSTRING])
-				break OpSwitch
-			}
-
-			args.Next.N = assignconv(args.Next.N, t.Orig, "append")
-			break OpSwitch
-		}
-
-		if funarg != nil {
-			for t := funarg.Type.Down; t != nil; t = t.Down {
-				if assignop(t.Type, n.Type.Type, nil) == 0 {
-					Yyerror("cannot append %v value to []%v", t.Type, n.Type.Type)
-				}
-			}
-		} else {
-			for args = args.Next; args != nil; args = args.Next {
-				if args.N.Type == nil {
-					continue
-				}
-				args.N = assignconv(args.N, t.Type, "append")
-			}
-		}
-
-		break OpSwitch
-
-	case OCOPY:
-		ok |= Etop | Erv
-		args := n.List
-		if args == nil || args.Next == nil {
-			Yyerror("missing arguments to copy")
-			n.Type = nil
-			return
-		}
-
-		if args.Next.Next != nil {
-			Yyerror("too many arguments to copy")
-			n.Type = nil
-			return
-		}
-
-		n.Left = args.N
-		n.Right = args.Next.N
-		n.List = nil
-		n.Type = Types[TINT]
-		typecheck(&n.Left, Erv)
-		typecheck(&n.Right, Erv)
-		if n.Left.Type == nil || n.Right.Type == nil {
-			n.Type = nil
-			return
-		}
-		defaultlit(&n.Left, nil)
-		defaultlit(&n.Right, nil)
-		if n.Left.Type == nil || n.Right.Type == nil {
-			n.Type = nil
-			return
-		}
-
-		// copy([]byte, string)
-		if Isslice(n.Left.Type) && n.Right.Type.Etype == TSTRING {
-			if Eqtype(n.Left.Type.Type, bytetype) {
-				break OpSwitch
-			}
-			Yyerror("arguments to copy have different element types: %v and string", Tconv(n.Left.Type, obj.FmtLong))
-			n.Type = nil
-			return
-		}
-
-		if !Isslice(n.Left.Type) || !Isslice(n.Right.Type) {
-			if !Isslice(n.Left.Type) && !Isslice(n.Right.Type) {
-				Yyerror("arguments to copy must be slices; have %v, %v", Tconv(n.Left.Type, obj.FmtLong), Tconv(n.Right.Type, obj.FmtLong))
-			} else if !Isslice(n.Left.Type) {
-				Yyerror("first argument to copy should be slice; have %v", Tconv(n.Left.Type, obj.FmtLong))
-			} else {
-				Yyerror("second argument to copy should be slice or string; have %v", Tconv(n.Right.Type, obj.FmtLong))
-			}
-			n.Type = nil
-			return
-		}
-
-		if !Eqtype(n.Left.Type.Type, n.Right.Type.Type) {
-			Yyerror("arguments to copy have different element types: %v and %v", Tconv(n.Left.Type, obj.FmtLong), Tconv(n.Right.Type, obj.FmtLong))
-			n.Type = nil
-			return
-		}
-
-		break OpSwitch
-
-	case OCONV:
-		ok |= Erv
-		saveorignode(n)
-		typecheck(&n.Left, Erv|top&(Eindir|Eiota))
-		convlit1(&n.Left, n.Type, true)
-		t := n.Left.Type
-		if t == nil || n.Type == nil {
-			n.Type = nil
-			return
-		}
-		var why string
-		n.Op = uint8(convertop(t, n.Type, &why))
-		if (n.Op) == 0 {
-			if n.Diag == 0 && n.Type.Broke == 0 {
-				Yyerror("cannot convert %v to type %v%s", Nconv(n.Left, obj.FmtLong), n.Type, why)
-				n.Diag = 1
-			}
-
-			n.Op = OCONV
-		}
-
-		switch n.Op {
-		case OCONVNOP:
-			if n.Left.Op == OLITERAL && n.Type != Types[TBOOL] {
-				r := Nod(OXXX, nil, nil)
-				n.Op = OCONV
-				n.Orig = r
-				*r = *n
-				n.Op = OLITERAL
-				n.SetVal(n.Left.Val())
-			}
-
-			// do not use stringtoarraylit.
-		// generated code and compiler memory footprint is better without it.
-		case OSTRARRAYBYTE:
-			break
-
-		case OSTRARRAYRUNE:
-			if n.Left.Op == OLITERAL {
-				stringtoarraylit(&n)
-			}
-		}
-
-		break OpSwitch
-
-	case OMAKE:
-		ok |= Erv
-		args := n.List
-		if args == nil {
-			Yyerror("missing argument to make")
-			n.Type = nil
-			return
-		}
-
-		n.List = nil
-		l := args.N
-		args = args.Next
-		typecheck(&l, Etype)
-		t := l.Type
-		if t == nil {
-			n.Type = nil
-			return
-		}
-
-		switch t.Etype {
-		default:
-			Yyerror("cannot make type %v", t)
-			n.Type = nil
-			return
-
-		case TARRAY:
-			if !Isslice(t) {
-				Yyerror("cannot make type %v", t)
-				n.Type = nil
-				return
-			}
-
-			if args == nil {
-				Yyerror("missing len argument to make(%v)", t)
-				n.Type = nil
-				return
-			}
-
-			l = args.N
-			args = args.Next
-			typecheck(&l, Erv)
-			var r *Node
-			if args != nil {
-				r = args.N
-				args = args.Next
-				typecheck(&r, Erv)
-			}
-
-			if l.Type == nil || (r != nil && r.Type == nil) {
-				n.Type = nil
-				return
-			}
-			et := obj.Bool2int(checkmake(t, "len", l) < 0)
-			et |= obj.Bool2int(r != nil && checkmake(t, "cap", r) < 0)
-			if et != 0 {
-				n.Type = nil
-				return
-			}
-			if Isconst(l, CTINT) && r != nil && Isconst(r, CTINT) && Mpcmpfixfix(l.Val().U.(*Mpint), r.Val().U.(*Mpint)) > 0 {
-				Yyerror("len larger than cap in make(%v)", t)
-				n.Type = nil
-				return
-			}
-
-			n.Left = l
-			n.Right = r
-			n.Op = OMAKESLICE
-
-		case TMAP:
-			if args != nil {
-				l = args.N
-				args = args.Next
-				typecheck(&l, Erv)
-				defaultlit(&l, Types[TINT])
-				if l.Type == nil {
-					n.Type = nil
-					return
-				}
-				if checkmake(t, "size", l) < 0 {
-					n.Type = nil
-					return
-				}
-				n.Left = l
-			} else {
-				n.Left = Nodintconst(0)
-			}
-			n.Op = OMAKEMAP
-
-		case TCHAN:
-			l = nil
-			if args != nil {
-				l = args.N
-				args = args.Next
-				typecheck(&l, Erv)
-				defaultlit(&l, Types[TINT])
-				if l.Type == nil {
-					n.Type = nil
-					return
-				}
-				if checkmake(t, "buffer", l) < 0 {
-					n.Type = nil
-					return
-				}
-				n.Left = l
-			} else {
-				n.Left = Nodintconst(0)
-			}
-			n.Op = OMAKECHAN
-		}
-
-		if args != nil {
-			Yyerror("too many arguments to make(%v)", t)
-			n.Op = OMAKE
-			n.Type = nil
-			return
-		}
-
-		n.Type = t
-		break OpSwitch
-
-	case ONEW:
-		ok |= Erv
-		args := n.List
-		if args == nil {
-			Yyerror("missing argument to new")
-			n.Type = nil
-			return
-		}
-
-		l := args.N
-		typecheck(&l, Etype)
-		t := l.Type
-		if t == nil {
-			n.Type = nil
-			return
-		}
-		if args.Next != nil {
-			Yyerror("too many arguments to new(%v)", t)
-			n.Type = nil
-			return
-		}
-
-		n.Left = l
-		n.Type = Ptrto(t)
-		break OpSwitch
-
-	case OPRINT, OPRINTN:
-		ok |= Etop
-		typechecklist(n.List, Erv|Eindir) // Eindir: address does not escape
-		for args := n.List; args != nil; args = args.Next {
-			// Special case for print: int constant is int64, not int.
-			if Isconst(args.N, CTINT) {
-				defaultlit(&args.N, Types[TINT64])
-			} else {
-				defaultlit(&args.N, nil)
-			}
-		}
-
-		break OpSwitch
-
-	case OPANIC:
-		ok |= Etop
-		if onearg(n, "panic") < 0 {
-			n.Type = nil
-			return
-		}
-		typecheck(&n.Left, Erv)
-		defaultlit(&n.Left, Types[TINTER])
-		if n.Left.Type == nil {
-			n.Type = nil
-			return
-		}
-		break OpSwitch
-
-	case ORECOVER:
-		ok |= Erv | Etop
-		if n.List != nil {
-			Yyerror("too many arguments to recover")
-			n.Type = nil
-			return
-		}
-
-		n.Type = Types[TINTER]
-		break OpSwitch
-
-	case OCLOSURE:
-		ok |= Erv
-		typecheckclosure(n, top)
-		if n.Type == nil {
-			n.Type = nil
-			return
-		}
-		break OpSwitch
-
-	case OITAB:
-		ok |= Erv
-		typecheck(&n.Left, Erv)
-		t := n.Left.Type
-		if t == nil {
-			n.Type = nil
-			return
-		}
-		if t.Etype != TINTER {
-			Fatal("OITAB of %v", t)
-		}
-		n.Type = Ptrto(Types[TUINTPTR])
-		break OpSwitch
-
-	case OSPTR:
-		ok |= Erv
-		typecheck(&n.Left, Erv)
-		t := n.Left.Type
-		if t == nil {
-			n.Type = nil
-			return
-		}
-		if !Isslice(t) && t.Etype != TSTRING {
-			Fatal("OSPTR of %v", t)
-		}
-		if t.Etype == TSTRING {
-			n.Type = Ptrto(Types[TUINT8])
-		} else {
-			n.Type = Ptrto(t.Type)
-		}
-		break OpSwitch
-
-	case OCLOSUREVAR:
-		ok |= Erv
-		break OpSwitch
-
-	case OCFUNC:
-		ok |= Erv
-		typecheck(&n.Left, Erv)
-		n.Type = Types[TUINTPTR]
-		break OpSwitch
-
-	case OCONVNOP:
-		ok |= Erv
-		typecheck(&n.Left, Erv)
-		break OpSwitch
-
-		/*
-		 * statements
-		 */
-	case OAS:
-		ok |= Etop
-
-		typecheckas(n)
-
-		// Code that creates temps does not bother to set defn, so do it here.
-		if n.Left.Op == ONAME && strings.HasPrefix(n.Left.Sym.Name, "autotmp_") {
-			n.Left.Name.Defn = n
-		}
-		break OpSwitch
-
-	case OAS2:
-		ok |= Etop
-		typecheckas2(n)
-		break OpSwitch
-
-	case OBREAK,
-		OCONTINUE,
-		ODCL,
-		OEMPTY,
-		OGOTO,
-		OXFALL,
-		OVARKILL:
-		ok |= Etop
-		break OpSwitch
-
-	case OLABEL:
-		ok |= Etop
-		decldepth++
-		break OpSwitch
-
-	case ODEFER:
-		ok |= Etop
-		typecheck(&n.Left, Etop|Erv)
-		if n.Left.Diag == 0 {
-			checkdefergo(n)
-		}
-		break OpSwitch
-
-	case OPROC:
-		ok |= Etop
-		typecheck(&n.Left, Etop|Eproc|Erv)
-		checkdefergo(n)
-		break OpSwitch
-
-	case OFOR:
-		ok |= Etop
-		typechecklist(n.Ninit, Etop)
-		decldepth++
-		typecheck(&n.Left, Erv)
-		if n.Left != nil {
-			t := n.Left.Type
-			if t != nil && t.Etype != TBOOL {
-				Yyerror("non-bool %v used as for condition", Nconv(n.Left, obj.FmtLong))
-			}
-		}
-		typecheck(&n.Right, Etop)
-		typechecklist(n.Nbody, Etop)
-		decldepth--
-		break OpSwitch
-
-	case OIF:
-		ok |= Etop
-		typechecklist(n.Ninit, Etop)
-		typecheck(&n.Left, Erv)
-		if n.Left != nil {
-			t := n.Left.Type
-			if t != nil && t.Etype != TBOOL {
-				Yyerror("non-bool %v used as if condition", Nconv(n.Left, obj.FmtLong))
-			}
-		}
-		typechecklist(n.Nbody, Etop)
-		typechecklist(n.Rlist, Etop)
-		break OpSwitch
-
-	case ORETURN:
-		ok |= Etop
-		if count(n.List) == 1 {
-			typechecklist(n.List, Erv|Efnstruct)
-		} else {
-			typechecklist(n.List, Erv)
-		}
-		if Curfn == nil {
-			Yyerror("return outside function")
-			n.Type = nil
-			return
-		}
-
-		if Curfn.Type.Outnamed != 0 && n.List == nil {
-			break OpSwitch
-		}
-		typecheckaste(ORETURN, nil, false, getoutargx(Curfn.Type), n.List, func() string { return "return argument" })
-		break OpSwitch
-
-	case ORETJMP:
-		ok |= Etop
-		break OpSwitch
-
-	case OSELECT:
-		ok |= Etop
-		typecheckselect(n)
-		break OpSwitch
-
-	case OSWITCH:
-		ok |= Etop
-		typecheckswitch(n)
-		break OpSwitch
-
-	case ORANGE:
-		ok |= Etop
-		typecheckrange(n)
-		break OpSwitch
-
-	case OTYPESW:
-		Yyerror("use of .(type) outside type switch")
-		n.Type = nil
-		return
-
-	case OXCASE:
-		ok |= Etop
-		typechecklist(n.List, Erv)
-		typechecklist(n.Nbody, Etop)
-		break OpSwitch
-
-	case ODCLFUNC:
-		ok |= Etop
-		typecheckfunc(n)
-		break OpSwitch
-
-	case ODCLCONST:
-		ok |= Etop
-		typecheck(&n.Left, Erv)
-		break OpSwitch
-
-	case ODCLTYPE:
-		ok |= Etop
-		typecheck(&n.Left, Etype)
-		if incannedimport == 0 {
-			checkwidth(n.Left.Type)
-		}
-		break OpSwitch
-	}
-
-	t := n.Type
-	if t != nil && t.Funarg == 0 && n.Op != OTYPE {
-		switch t.Etype {
-		case TFUNC, // might have TANY; wait until its called
-			TANY,
-			TFORW,
-			TIDEAL,
-			TNIL,
-			TBLANK:
-			break
-
-		default:
-			checkwidth(t)
-		}
-	}
-
-	if safemode != 0 && incannedimport == 0 && importpkg == nil && compiling_wrappers == 0 && t != nil && t.Etype == TUNSAFEPTR {
-		Yyerror("cannot use unsafe.Pointer")
-	}
-
-	evconst(n)
-	if n.Op == OTYPE && top&Etype == 0 {
-		Yyerror("type %v is not an expression", n.Type)
-		n.Type = nil
-		return
-	}
-
-	if top&(Erv|Etype) == Etype && n.Op != OTYPE {
-		Yyerror("%v is not a type", n)
-		n.Type = nil
-		return
-	}
-
-	// TODO(rsc): simplify
-	if (top&(Ecall|Erv|Etype) != 0) && top&Etop == 0 && ok&(Erv|Etype|Ecall) == 0 {
-		Yyerror("%v used as value", n)
-		n.Type = nil
-		return
-	}
-
-	if (top&Etop != 0) && top&(Ecall|Erv|Etype) == 0 && ok&Etop == 0 {
-		if n.Diag == 0 {
-			Yyerror("%v evaluated but not used", n)
-			n.Diag = 1
-		}
-
-		n.Type = nil
-		return
-	}
-
-	/* TODO
-	if(n->type == T)
-		fatal("typecheck nil type");
-	*/
-}
-
-func checksliceindex(l *Node, r *Node, tp *Type) int {
-	t := r.Type
-	if t == nil {
-		return -1
-	}
-	if !Isint[t.Etype] {
-		Yyerror("invalid slice index %v (type %v)", r, t)
-		return -1
-	}
-
-	if r.Op == OLITERAL {
-		if Mpgetfix(r.Val().U.(*Mpint)) < 0 {
-			Yyerror("invalid slice index %v (index must be non-negative)", r)
-			return -1
-		} else if tp != nil && tp.Bound > 0 && Mpgetfix(r.Val().U.(*Mpint)) > tp.Bound {
-			Yyerror("invalid slice index %v (out of bounds for %d-element array)", r, tp.Bound)
-			return -1
-		} else if Isconst(l, CTSTR) && Mpgetfix(r.Val().U.(*Mpint)) > int64(len(l.Val().U.(string))) {
-			Yyerror("invalid slice index %v (out of bounds for %d-byte string)", r, len(l.Val().U.(string)))
-			return -1
-		} else if Mpcmpfixfix(r.Val().U.(*Mpint), Maxintval[TINT]) > 0 {
-			Yyerror("invalid slice index %v (index too large)", r)
-			return -1
-		}
-	}
-
-	return 0
-}
-
-func checksliceconst(lo *Node, hi *Node) int {
-	if lo != nil && hi != nil && lo.Op == OLITERAL && hi.Op == OLITERAL && Mpcmpfixfix(lo.Val().U.(*Mpint), hi.Val().U.(*Mpint)) > 0 {
-		Yyerror("invalid slice index: %v > %v", lo, hi)
-		return -1
-	}
-
-	return 0
-}
-
-func checkdefergo(n *Node) {
-	what := "defer"
-	if n.Op == OPROC {
-		what = "go"
-	}
-
-	switch n.Left.Op {
-	// ok
-	case OCALLINTER,
-		OCALLMETH,
-		OCALLFUNC,
-		OCLOSE,
-		OCOPY,
-		ODELETE,
-		OPANIC,
-		OPRINT,
-		OPRINTN,
-		ORECOVER:
-		return
-
-	case OAPPEND,
-		OCAP,
-		OCOMPLEX,
-		OIMAG,
-		OLEN,
-		OMAKE,
-		OMAKESLICE,
-		OMAKECHAN,
-		OMAKEMAP,
-		ONEW,
-		OREAL,
-		OLITERAL: // conversion or unsafe.Alignof, Offsetof, Sizeof
-		if n.Left.Orig != nil && n.Left.Orig.Op == OCONV {
-			break
-		}
-		Yyerror("%s discards result of %v", what, n.Left)
-		return
-	}
-
-	// type is broken or missing, most likely a method call on a broken type
-	// we will warn about the broken type elsewhere. no need to emit a potentially confusing error
-	if n.Left.Type == nil || n.Left.Type.Broke != 0 {
-		return
-	}
-
-	if n.Diag == 0 {
-		// The syntax made sure it was a call, so this must be
-		// a conversion.
-		n.Diag = 1
-
-		Yyerror("%s requires function call, not conversion", what)
-	}
-}
-
-func implicitstar(nn **Node) {
-	// insert implicit * if needed for fixed array
-	n := *nn
-
-	t := n.Type
-	if t == nil || !Isptr[t.Etype] {
-		return
-	}
-	t = t.Type
-	if t == nil {
-		return
-	}
-	if !Isfixedarray(t) {
-		return
-	}
-	n = Nod(OIND, n, nil)
-	n.Implicit = true
-	typecheck(&n, Erv)
-	*nn = n
-}
-
-func onearg(n *Node, f string, args ...interface{}) int {
-	if n.Left != nil {
-		return 0
-	}
-	if n.List == nil {
-		p := fmt.Sprintf(f, args...)
-		Yyerror("missing argument to %s: %v", p, n)
-		return -1
-	}
-
-	if n.List.Next != nil {
-		p := fmt.Sprintf(f, args...)
-		Yyerror("too many arguments to %s: %v", p, n)
-		n.Left = n.List.N
-		n.List = nil
-		return -1
-	}
-
-	n.Left = n.List.N
-	n.List = nil
-	return 0
-}
-
-func twoarg(n *Node) int {
-	if n.Left != nil {
-		return 0
-	}
-	if n.List == nil {
-		Yyerror("missing argument to %v - %v", Oconv(int(n.Op), 0), n)
-		return -1
-	}
-
-	n.Left = n.List.N
-	if n.List.Next == nil {
-		Yyerror("missing argument to %v - %v", Oconv(int(n.Op), 0), n)
-		n.List = nil
-		return -1
-	}
-
-	if n.List.Next.Next != nil {
-		Yyerror("too many arguments to %v - %v", Oconv(int(n.Op), 0), n)
-		n.List = nil
-		return -1
-	}
-
-	n.Right = n.List.Next.N
-	n.List = nil
-	return 0
-}
-
-func lookdot1(errnode *Node, s *Sym, t *Type, f *Type, dostrcmp int) *Type {
-	var r *Type
-	for ; f != nil; f = f.Down {
-		if dostrcmp != 0 && f.Sym.Name == s.Name {
-			return f
-		}
-		if dostrcmp == 2 && strings.EqualFold(f.Sym.Name, s.Name) {
-			return f
-		}
-		if f.Sym != s {
-			continue
-		}
-		if r != nil {
-			if errnode != nil {
-				Yyerror("ambiguous selector %v", errnode)
-			} else if Isptr[t.Etype] {
-				Yyerror("ambiguous selector (%v).%v", t, s)
-			} else {
-				Yyerror("ambiguous selector %v.%v", t, s)
-			}
-			break
-		}
-
-		r = f
-	}
-
-	return r
-}
-
-func looktypedot(n *Node, t *Type, dostrcmp int) bool {
-	s := n.Right.Sym
-
-	if t.Etype == TINTER {
-		f1 := lookdot1(n, s, t, t.Type, dostrcmp)
-		if f1 == nil {
-			return false
-		}
-
-		n.Right = methodname(n.Right, t)
-		n.Xoffset = f1.Width
-		n.Type = f1.Type
-		n.Op = ODOTINTER
-		return true
-	}
-
-	// Find the base type: methtype will fail if t
-	// is not of the form T or *T.
-	f2 := methtype(t, 0)
-
-	if f2 == nil {
-		return false
-	}
-
-	expandmeth(f2)
-	f2 = lookdot1(n, s, f2, f2.Xmethod, dostrcmp)
-	if f2 == nil {
-		return false
-	}
-
-	// disallow T.m if m requires *T receiver
-	if Isptr[getthisx(f2.Type).Type.Type.Etype] && !Isptr[t.Etype] && f2.Embedded != 2 && !isifacemethod(f2.Type) {
-		Yyerror("invalid method expression %v (needs pointer receiver: (*%v).%v)", n, t, Sconv(f2.Sym, obj.FmtShort))
-		return false
-	}
-
-	n.Right = methodname(n.Right, t)
-	n.Xoffset = f2.Width
-	n.Type = f2.Type
-	n.Op = ODOTMETH
-	return true
-}
-
-func derefall(t *Type) *Type {
-	for t != nil && int(t.Etype) == Tptr {
-		t = t.Type
-	}
-	return t
-}
-
-type typeSym struct {
-	t *Type
-	s *Sym
-}
-
-// dotField maps (*Type, *Sym) pairs to the corresponding struct field (*Type with Etype==TFIELD).
-// It is a cache for use during usefield in walk.go, only enabled when field tracking.
-var dotField = map[typeSym]*Type{}
-
-func lookdot(n *Node, t *Type, dostrcmp int) *Type {
-	s := n.Right.Sym
-
-	dowidth(t)
-	var f1 *Type
-	if t.Etype == TSTRUCT || t.Etype == TINTER {
-		f1 = lookdot1(n, s, t, t.Type, dostrcmp)
-	}
-
-	var f2 *Type
-	if n.Left.Type == t || n.Left.Type.Sym == nil {
-		f2 = methtype(t, 0)
-		if f2 != nil {
-			// Use f2->method, not f2->xmethod: adddot has
-			// already inserted all the necessary embedded dots.
-			f2 = lookdot1(n, s, f2, f2.Method, dostrcmp)
-		}
-	}
-
-	if f1 != nil {
-		if dostrcmp > 1 {
-			// Already in the process of diagnosing an error.
-			return f1
-		}
-		if f2 != nil {
-			Yyerror("%v is both field and method", n.Right.Sym)
-		}
-		if f1.Width == BADWIDTH {
-			Fatal("lookdot badwidth %v %p", f1, f1)
-		}
-		n.Xoffset = f1.Width
-		n.Type = f1.Type
-		if obj.Fieldtrack_enabled > 0 {
-			dotField[typeSym{t.Orig, s}] = f1
-		}
-		if t.Etype == TINTER {
-			if Isptr[n.Left.Type.Etype] {
-				n.Left = Nod(OIND, n.Left, nil) // implicitstar
-				n.Left.Implicit = true
-				typecheck(&n.Left, Erv)
-			}
-
-			n.Op = ODOTINTER
-		}
-
-		return f1
-	}
-
-	if f2 != nil {
-		if dostrcmp > 1 {
-			// Already in the process of diagnosing an error.
-			return f2
-		}
-		tt := n.Left.Type
-		dowidth(tt)
-		rcvr := getthisx(f2.Type).Type.Type
-		if !Eqtype(rcvr, tt) {
-			if int(rcvr.Etype) == Tptr && Eqtype(rcvr.Type, tt) {
-				checklvalue(n.Left, "call pointer method on")
-				n.Left = Nod(OADDR, n.Left, nil)
-				n.Left.Implicit = true
-				typecheck(&n.Left, Etype|Erv)
-			} else if int(tt.Etype) == Tptr && int(rcvr.Etype) != Tptr && Eqtype(tt.Type, rcvr) {
-				n.Left = Nod(OIND, n.Left, nil)
-				n.Left.Implicit = true
-				typecheck(&n.Left, Etype|Erv)
-			} else if int(tt.Etype) == Tptr && int(tt.Type.Etype) == Tptr && Eqtype(derefall(tt), derefall(rcvr)) {
-				Yyerror("calling method %v with receiver %v requires explicit dereference", n.Right, Nconv(n.Left, obj.FmtLong))
-				for int(tt.Etype) == Tptr {
-					// Stop one level early for method with pointer receiver.
-					if int(rcvr.Etype) == Tptr && int(tt.Type.Etype) != Tptr {
-						break
-					}
-					n.Left = Nod(OIND, n.Left, nil)
-					n.Left.Implicit = true
-					typecheck(&n.Left, Etype|Erv)
-					tt = tt.Type
-				}
-			} else {
-				Fatal("method mismatch: %v for %v", rcvr, tt)
-			}
-		}
-
-		pll := n
-		ll := n.Left
-		for ll.Left != nil && (ll.Op == ODOT || ll.Op == ODOTPTR || ll.Op == OIND) {
-			pll = ll
-			ll = ll.Left
-		}
-		if pll.Implicit && Isptr[ll.Type.Etype] && ll.Type.Sym != nil && ll.Type.Sym.Def != nil && ll.Type.Sym.Def.Op == OTYPE {
-			// It is invalid to automatically dereference a named pointer type when selecting a method.
-			// Make n->left == ll to clarify error message.
-			n.Left = ll
-			return nil
-		}
-
-		n.Right = methodname(n.Right, n.Left.Type)
-		n.Xoffset = f2.Width
-		n.Type = f2.Type
-
-		//		print("lookdot found [%p] %T\n", f2->type, f2->type);
-		n.Op = ODOTMETH
-
-		return f2
-	}
-
-	return nil
-}
-
-func nokeys(l *NodeList) bool {
-	for ; l != nil; l = l.Next {
-		if l.N.Op == OKEY {
-			return false
-		}
-	}
-	return true
-}
-
-func hasddd(t *Type) bool {
-	for tl := t.Type; tl != nil; tl = tl.Down {
-		if tl.Isddd {
-			return true
-		}
-	}
-
-	return false
-}
-
-func downcount(t *Type) int {
-	n := 0
-	for tl := t.Type; tl != nil; tl = tl.Down {
-		n++
-	}
-
-	return n
-}
-
-/*
- * typecheck assignment: type list = expression list
- */
-func typecheckaste(op int, call *Node, isddd bool, tstruct *Type, nl *NodeList, desc func() string) {
-	var t *Type
-	var n *Node
-	var n1 int
-	var n2 int
-
-	lno := int(lineno)
-
-	if tstruct.Broke != 0 {
-		goto out
-	}
-
-	n = nil
-	if nl != nil && nl.Next == nil {
-		n = nl.N
-		if n.Type != nil {
-			if n.Type.Etype == TSTRUCT && n.Type.Funarg != 0 {
-				if !hasddd(tstruct) {
-					n1 := downcount(tstruct)
-					n2 := downcount(n.Type)
-					if n2 > n1 {
-						goto toomany
-					}
-					if n2 < n1 {
-						goto notenough
-					}
-				}
-
-				tn := n.Type.Type
-				var why string
-				for tl := tstruct.Type; tl != nil; tl = tl.Down {
-					if tl.Isddd {
-						for ; tn != nil; tn = tn.Down {
-							if assignop(tn.Type, tl.Type.Type, &why) == 0 {
-								if call != nil {
-									Yyerror("cannot use %v as type %v in argument to %v%s", tn.Type, tl.Type.Type, call, why)
-								} else {
-									Yyerror("cannot use %v as type %v in %s%s", tn.Type, tl.Type.Type, desc(), why)
-								}
-							}
-						}
-
-						goto out
-					}
-
-					if tn == nil {
-						goto notenough
-					}
-					if assignop(tn.Type, tl.Type, &why) == 0 {
-						if call != nil {
-							Yyerror("cannot use %v as type %v in argument to %v%s", tn.Type, tl.Type, call, why)
-						} else {
-							Yyerror("cannot use %v as type %v in %s%s", tn.Type, tl.Type, desc(), why)
-						}
-					}
-
-					tn = tn.Down
-				}
-
-				if tn != nil {
-					goto toomany
-				}
-				goto out
-			}
-		}
-	}
-
-	n1 = downcount(tstruct)
-	n2 = count(nl)
-	if !hasddd(tstruct) {
-		if n2 > n1 {
-			goto toomany
-		}
-		if n2 < n1 {
-			goto notenough
-		}
-	} else {
-		if !isddd {
-			if n2 < n1-1 {
-				goto notenough
-			}
-		} else {
-			if n2 > n1 {
-				goto toomany
-			}
-			if n2 < n1 {
-				goto notenough
-			}
-		}
-	}
-
-	for tl := tstruct.Type; tl != nil; tl = tl.Down {
-		t = tl.Type
-		if tl.Isddd {
-			if isddd {
-				if nl == nil {
-					goto notenough
-				}
-				if nl.Next != nil {
-					goto toomany
-				}
-				n = nl.N
-				setlineno(n)
-				if n.Type != nil {
-					nl.N = assignconvfn(n, t, desc)
-				}
-				goto out
-			}
-
-			for ; nl != nil; nl = nl.Next {
-				n = nl.N
-				setlineno(nl.N)
-				if n.Type != nil {
-					nl.N = assignconvfn(n, t.Type, desc)
-				}
-			}
-
-			goto out
-		}
-
-		if nl == nil {
-			goto notenough
-		}
-		n = nl.N
-		setlineno(n)
-		if n.Type != nil {
-			nl.N = assignconvfn(n, t, desc)
-		}
-		nl = nl.Next
-	}
-
-	if nl != nil {
-		goto toomany
-	}
-	if isddd {
-		if call != nil {
-			Yyerror("invalid use of ... in call to %v", call)
-		} else {
-			Yyerror("invalid use of ... in %v", Oconv(int(op), 0))
-		}
-	}
-
-out:
-	lineno = int32(lno)
-	return
-
-notenough:
-	if n == nil || n.Diag == 0 {
-		if call != nil {
-			// call is the expression being called, not the overall call.
-			// Method expressions have the form T.M, and the compiler has
-			// rewritten those to ONAME nodes but left T in Left.
-			if call.Op == ONAME && call.Left != nil && call.Left.Op == OTYPE {
-				Yyerror("not enough arguments in call to method expression %v", call)
-			} else {
-				Yyerror("not enough arguments in call to %v", call)
-			}
-		} else {
-			Yyerror("not enough arguments to %v", Oconv(int(op), 0))
-		}
-		if n != nil {
-			n.Diag = 1
-		}
-	}
-
-	goto out
-
-toomany:
-	if call != nil {
-		Yyerror("too many arguments in call to %v", call)
-	} else {
-		Yyerror("too many arguments to %v", Oconv(int(op), 0))
-	}
-	goto out
-}
-
-/*
- * type check composite
- */
-func fielddup(n *Node, hash map[string]bool) {
-	if n.Op != ONAME {
-		Fatal("fielddup: not ONAME")
-	}
-	name := n.Sym.Name
-	if hash[name] {
-		Yyerror("duplicate field name in struct literal: %s", name)
-		return
-	}
-	hash[name] = true
-}
-
-func keydup(n *Node, hash map[uint32][]*Node) {
-	orign := n
-	if n.Op == OCONVIFACE {
-		n = n.Left
-	}
-	evconst(n)
-	if n.Op != OLITERAL {
-		return // we don't check variables
-	}
-
-	var h uint32
-	switch n.Val().Ctype() {
-	default: // unknown, bool, nil
-		h = 23
-
-	case CTINT, CTRUNE:
-		h = uint32(Mpgetfix(n.Val().U.(*Mpint)))
-
-	case CTFLT:
-		d := mpgetflt(n.Val().U.(*Mpflt))
-		x := math.Float64bits(d)
-		for i := 0; i < 8; i++ {
-			h = h*PRIME1 + uint32(x&0xFF)
-			x >>= 8
-		}
-
-	case CTSTR:
-		h = 0
-		s := n.Val().U.(string)
-		for i := len(n.Val().U.(string)); i > 0; i-- {
-			h = h*PRIME1 + uint32(s[0])
-			s = s[1:]
-		}
-	}
-
-	var cmp Node
-	for _, a := range hash[h] {
-		cmp.Op = OEQ
-		cmp.Left = n
-		b := uint32(0)
-		if a.Op == OCONVIFACE && orign.Op == OCONVIFACE {
-			if Eqtype(a.Left.Type, n.Type) {
-				cmp.Right = a.Left
-				evconst(&cmp)
-				b = uint32(obj.Bool2int(cmp.Val().U.(bool)))
-			}
-		} else if Eqtype(a.Type, n.Type) {
-			cmp.Right = a
-			evconst(&cmp)
-			b = uint32(obj.Bool2int(cmp.Val().U.(bool)))
-		}
-
-		if b != 0 {
-			Yyerror("duplicate key %v in map literal", n)
-			return
-		}
-	}
-
-	hash[h] = append(hash[h], orign)
-}
-
-func indexdup(n *Node, hash map[int64]*Node) {
-	if n.Op != OLITERAL {
-		Fatal("indexdup: not OLITERAL")
-	}
-
-	v := Mpgetfix(n.Val().U.(*Mpint))
-	if hash[v] != nil {
-		Yyerror("duplicate index in array literal: %d", v)
-		return
-	}
-	hash[v] = n
-}
-
-func iscomptype(t *Type) bool {
-	switch t.Etype {
-	case TARRAY, TSTRUCT, TMAP:
-		return true
-
-	case TPTR32, TPTR64:
-		switch t.Type.Etype {
-		case TARRAY, TSTRUCT, TMAP:
-			return true
-		}
-	}
-
-	return false
-}
-
-func pushtype(n *Node, t *Type) {
-	if n == nil || n.Op != OCOMPLIT || !iscomptype(t) {
-		return
-	}
-
-	if n.Right == nil {
-		n.Right = typenod(t)
-		n.Implicit = true       // don't print
-		n.Right.Implicit = true // * is okay
-	} else if Debug['s'] != 0 {
-		typecheck(&n.Right, Etype)
-		if n.Right.Type != nil && Eqtype(n.Right.Type, t) {
-			fmt.Printf("%v: redundant type: %v\n", n.Line(), t)
-		}
-	}
-}
-
-func typecheckcomplit(np **Node) {
-	n := *np
-	lno := lineno
-	defer func() {
-		lineno = lno
-		*np = n
-	}()
-
-	if n.Right == nil {
-		if n.List != nil {
-			setlineno(n.List.N)
-		}
-		Yyerror("missing type in composite literal")
-		n.Type = nil
-		return
-	}
-
-	// Save original node (including n->right)
-	norig := Nod(int(n.Op), nil, nil)
-
-	*norig = *n
-
-	setlineno(n.Right)
-	l := typecheck(&n.Right, Etype|Ecomplit) /* sic */
-	t := l.Type
-	if t == nil {
-		n.Type = nil
-		return
-	}
-	nerr := nerrors
-	n.Type = t
-
-	if Isptr[t.Etype] {
-		// For better or worse, we don't allow pointers as the composite literal type,
-		// except when using the &T syntax, which sets implicit on the OIND.
-		if !n.Right.Implicit {
-			Yyerror("invalid pointer type %v for composite literal (use &%v instead)", t, t.Type)
-			n.Type = nil
-			return
-		}
-
-		// Also, the underlying type must be a struct, map, slice, or array.
-		if !iscomptype(t) {
-			Yyerror("invalid pointer type %v for composite literal", t)
-			n.Type = nil
-			return
-		}
-
-		t = t.Type
-	}
-
-	var r *Node
-	switch t.Etype {
-	default:
-		Yyerror("invalid type for composite literal: %v", t)
-		n.Type = nil
-
-	case TARRAY:
-		// Only allocate hash if there are some key/value pairs.
-		var hash map[int64]*Node
-		for ll := n.List; ll != nil; ll = ll.Next {
-			if ll.N.Op == OKEY {
-				hash = make(map[int64]*Node)
-				break
-			}
-		}
-		length := int64(0)
-		i := 0
-		var l *Node
-		for ll := n.List; ll != nil; ll = ll.Next {
-			l = ll.N
-			setlineno(l)
-			if l.Op != OKEY {
-				l = Nod(OKEY, Nodintconst(int64(i)), l)
-				l.Left.Type = Types[TINT]
-				l.Left.Typecheck = 1
-				ll.N = l
-			}
-
-			typecheck(&l.Left, Erv)
-			evconst(l.Left)
-			i = nonnegconst(l.Left)
-			if i < 0 && l.Left.Diag == 0 {
-				Yyerror("array index must be non-negative integer constant")
-				l.Left.Diag = 1
-				i = -(1 << 30) // stay negative for a while
-			}
-
-			if i >= 0 && hash != nil {
-				indexdup(l.Left, hash)
-			}
-			i++
-			if int64(i) > length {
-				length = int64(i)
-				if t.Bound >= 0 && length > t.Bound {
-					setlineno(l)
-					Yyerror("array index %d out of bounds [0:%d]", length-1, t.Bound)
-					t.Bound = -1 // no more errors
-				}
-			}
-
-			r = l.Right
-			pushtype(r, t.Type)
-			typecheck(&r, Erv)
-			defaultlit(&r, t.Type)
-			l.Right = assignconv(r, t.Type, "array element")
-		}
-
-		if t.Bound == -100 {
-			t.Bound = length
-		}
-		if t.Bound < 0 {
-			n.Right = Nodintconst(length)
-		}
-		n.Op = OARRAYLIT
-
-	case TMAP:
-		hash := make(map[uint32][]*Node)
-		var l *Node
-		for ll := n.List; ll != nil; ll = ll.Next {
-			l = ll.N
-			setlineno(l)
-			if l.Op != OKEY {
-				typecheck(&ll.N, Erv)
-				Yyerror("missing key in map literal")
-				continue
-			}
-
-			r = l.Left
-			pushtype(r, t.Down)
-			typecheck(&r, Erv)
-			defaultlit(&r, t.Down)
-			l.Left = assignconv(r, t.Down, "map key")
-			if l.Left.Op != OCONV {
-				keydup(l.Left, hash)
-			}
-
-			r = l.Right
-			pushtype(r, t.Type)
-			typecheck(&r, Erv)
-			defaultlit(&r, t.Type)
-			l.Right = assignconv(r, t.Type, "map value")
-		}
-
-		n.Op = OMAPLIT
-
-	case TSTRUCT:
-		bad := 0
-		if n.List != nil && nokeys(n.List) {
-			// simple list of variables
-			f := t.Type
-
-			var s *Sym
-			for ll := n.List; ll != nil; ll = ll.Next {
-				setlineno(ll.N)
-				typecheck(&ll.N, Erv)
-				if f == nil {
-					tmp12 := bad
-					bad++
-					if tmp12 == 0 {
-						Yyerror("too many values in struct initializer")
-					}
-					continue
-				}
-
-				s = f.Sym
-				if s != nil && !exportname(s.Name) && s.Pkg != localpkg {
-					Yyerror("implicit assignment of unexported field '%s' in %v literal", s.Name, t)
-				}
-
-				// No pushtype allowed here.  Must name fields for that.
-				ll.N = assignconv(ll.N, f.Type, "field value")
-
-				ll.N = Nod(OKEY, newname(f.Sym), ll.N)
-				ll.N.Left.Type = f
-				ll.N.Left.Typecheck = 1
-				f = f.Down
-			}
-
-			if f != nil {
-				Yyerror("too few values in struct initializer")
-			}
-		} else {
-			hash := make(map[string]bool)
-
-			// keyed list
-			var s *Sym
-			var f *Type
-			var l *Node
-			var s1 *Sym
-			for ll := n.List; ll != nil; ll = ll.Next {
-				l = ll.N
-				setlineno(l)
-				if l.Op != OKEY {
-					tmp13 := bad
-					bad++
-					if tmp13 == 0 {
-						Yyerror("mixture of field:value and value initializers")
-					}
-					typecheck(&ll.N, Erv)
-					continue
-				}
-
-				s = l.Left.Sym
-				if s == nil {
-					Yyerror("invalid field name %v in struct initializer", l.Left)
-					typecheck(&l.Right, Erv)
-					continue
-				}
-
-				// Sym might have resolved to name in other top-level
-				// package, because of import dot.  Redirect to correct sym
-				// before we do the lookup.
-				if s.Pkg != localpkg && exportname(s.Name) {
-					s1 = Lookup(s.Name)
-					if s1.Origpkg == s.Pkg {
-						s = s1
-					}
-				}
-
-				f = lookdot1(nil, s, t, t.Type, 0)
-				if f == nil {
-					Yyerror("unknown %v field '%v' in struct literal", t, s)
-					continue
-				}
-
-				l.Left = newname(s)
-				l.Left.Typecheck = 1
-				l.Left.Type = f
-				s = f.Sym
-				fielddup(newname(s), hash)
-				r = l.Right
-
-				// No pushtype allowed here.  Tried and rejected.
-				typecheck(&r, Erv)
-
-				l.Right = assignconv(r, f.Type, "field value")
-			}
-		}
-
-		n.Op = OSTRUCTLIT
-	}
-
-	if nerr != nerrors {
-		n.Type = nil
-		return
-	}
-
-	n.Orig = norig
-	if Isptr[n.Type.Etype] {
-		n = Nod(OPTRLIT, n, nil)
-		n.Typecheck = 1
-		n.Type = n.Left.Type
-		n.Left.Type = t
-		n.Left.Typecheck = 1
-	}
-
-	n.Orig = norig
-	return
-}
-
-/*
- * lvalue etc
- */
-func islvalue(n *Node) bool {
-	switch n.Op {
-	case OINDEX:
-		if Isfixedarray(n.Left.Type) {
-			return islvalue(n.Left)
-		}
-		if n.Left.Type != nil && n.Left.Type.Etype == TSTRING {
-			return false
-		}
-		fallthrough
-
-		// fall through
-	case OIND, ODOTPTR, OCLOSUREVAR, OPARAM:
-		return true
-
-	case ODOT:
-		return islvalue(n.Left)
-
-	case ONAME:
-		if n.Class == PFUNC {
-			return false
-		}
-		return true
-	}
-
-	return false
-}
-
-func checklvalue(n *Node, verb string) {
-	if !islvalue(n) {
-		Yyerror("cannot %s %v", verb, n)
-	}
-}
-
-func checkassign(stmt *Node, n *Node) {
-	// Variables declared in ORANGE are assigned on every iteration.
-	if n.Name == nil || n.Name.Defn != stmt || stmt.Op == ORANGE {
-		r := outervalue(n)
-		var l *Node
-		for l = n; l != r; l = l.Left {
-			l.Assigned = true
-			if l.Name != nil && l.Name.Param != nil && l.Name.Param.Closure != nil {
-				l.Name.Param.Closure.Assigned = true
-			}
-		}
-
-		l.Assigned = true
-		if l.Name != nil && l.Name.Param != nil && l.Name.Param.Closure != nil {
-			l.Name.Param.Closure.Assigned = true
-		}
-	}
-
-	if islvalue(n) {
-		return
-	}
-	if n.Op == OINDEXMAP {
-		n.Etype = 1
-		return
-	}
-
-	// have already complained about n being undefined
-	if n.Op == ONONAME {
-		return
-	}
-
-	Yyerror("cannot assign to %v", n)
-}
-
-func checkassignlist(stmt *Node, l *NodeList) {
-	for ; l != nil; l = l.Next {
-		checkassign(stmt, l.N)
-	}
-}
-
-// Check whether l and r are the same side effect-free expression,
-// so that it is safe to reuse one instead of computing both.
-func samesafeexpr(l *Node, r *Node) bool {
-	if l.Op != r.Op || !Eqtype(l.Type, r.Type) {
-		return false
-	}
-
-	switch l.Op {
-	case ONAME, OCLOSUREVAR:
-		return l == r
-
-	case ODOT, ODOTPTR:
-		return l.Right != nil && r.Right != nil && l.Right.Sym == r.Right.Sym && samesafeexpr(l.Left, r.Left)
-
-	case OIND:
-		return samesafeexpr(l.Left, r.Left)
-
-	case OINDEX:
-		return samesafeexpr(l.Left, r.Left) && samesafeexpr(l.Right, r.Right)
-	}
-
-	return false
-}
-
-/*
- * type check assignment.
- * if this assignment is the definition of a var on the left side,
- * fill in the var's type.
- */
-func typecheckas(n *Node) {
-	// delicate little dance.
-	// the definition of n may refer to this assignment
-	// as its definition, in which case it will call typecheckas.
-	// in that case, do not call typecheck back, or it will cycle.
-	// if the variable has a type (ntype) then typechecking
-	// will not look at defn, so it is okay (and desirable,
-	// so that the conversion below happens).
-	n.Left = resolve(n.Left)
-
-	if n.Left.Name == nil || n.Left.Name.Defn != n || n.Left.Name.Param.Ntype != nil {
-		typecheck(&n.Left, Erv|Easgn)
-	}
-
-	typecheck(&n.Right, Erv)
-	checkassign(n, n.Left)
-	if n.Right != nil && n.Right.Type != nil {
-		if n.Left.Type != nil {
-			n.Right = assignconv(n.Right, n.Left.Type, "assignment")
-		}
-	}
-
-	if n.Left.Name != nil && n.Left.Name.Defn == n && n.Left.Name.Param.Ntype == nil {
-		defaultlit(&n.Right, nil)
-		n.Left.Type = n.Right.Type
-	}
-
-	// second half of dance.
-	// now that right is done, typecheck the left
-	// just to get it over with.  see dance above.
-	n.Typecheck = 1
-
-	if n.Left.Typecheck == 0 {
-		typecheck(&n.Left, Erv|Easgn)
-	}
-}
-
-func checkassignto(src *Type, dst *Node) {
-	var why string
-
-	if assignop(src, dst.Type, &why) == 0 {
-		Yyerror("cannot assign %v to %v in multiple assignment%s", src, Nconv(dst, obj.FmtLong), why)
-		return
-	}
-}
-
-func typecheckas2(n *Node) {
-	for ll := n.List; ll != nil; ll = ll.Next {
-		// delicate little dance.
-		ll.N = resolve(ll.N)
-
-		if ll.N.Name == nil || ll.N.Name.Defn != n || ll.N.Name.Param.Ntype != nil {
-			typecheck(&ll.N, Erv|Easgn)
-		}
-	}
-
-	cl := count(n.List)
-	cr := count(n.Rlist)
-	if cl > 1 && cr == 1 {
-		typecheck(&n.Rlist.N, Erv|Efnstruct)
-	} else {
-		typechecklist(n.Rlist, Erv)
-	}
-	checkassignlist(n, n.List)
-
-	var l *Node
-	var r *Node
-	if cl == cr {
-		// easy
-		ll := n.List
-		lr := n.Rlist
-		for ; ll != nil; ll, lr = ll.Next, lr.Next {
-			if ll.N.Type != nil && lr.N.Type != nil {
-				lr.N = assignconv(lr.N, ll.N.Type, "assignment")
-			}
-			if ll.N.Name != nil && ll.N.Name.Defn == n && ll.N.Name.Param.Ntype == nil {
-				defaultlit(&lr.N, nil)
-				ll.N.Type = lr.N.Type
-			}
-		}
-
-		goto out
-	}
-
-	l = n.List.N
-	r = n.Rlist.N
-
-	// x,y,z = f()
-	if cr == 1 {
-		if r.Type == nil {
-			goto out
-		}
-		switch r.Op {
-		case OCALLMETH, OCALLINTER, OCALLFUNC:
-			if r.Type.Etype != TSTRUCT || r.Type.Funarg == 0 {
-				break
-			}
-			cr = structcount(r.Type)
-			if cr != cl {
-				goto mismatch
-			}
-			n.Op = OAS2FUNC
-			var s Iter
-			t := Structfirst(&s, &r.Type)
-			for ll := n.List; ll != nil; ll = ll.Next {
-				if t.Type != nil && ll.N.Type != nil {
-					checkassignto(t.Type, ll.N)
-				}
-				if ll.N.Name != nil && ll.N.Name.Defn == n && ll.N.Name.Param.Ntype == nil {
-					ll.N.Type = t.Type
-				}
-				t = structnext(&s)
-			}
-
-			goto out
-		}
-	}
-
-	// x, ok = y
-	if cl == 2 && cr == 1 {
-		if r.Type == nil {
-			goto out
-		}
-		switch r.Op {
-		case OINDEXMAP, ORECV, ODOTTYPE:
-			switch r.Op {
-			case OINDEXMAP:
-				n.Op = OAS2MAPR
-
-			case ORECV:
-				n.Op = OAS2RECV
-
-			case ODOTTYPE:
-				n.Op = OAS2DOTTYPE
-				r.Op = ODOTTYPE2
-			}
-
-			if l.Type != nil {
-				checkassignto(r.Type, l)
-			}
-			if l.Name != nil && l.Name.Defn == n {
-				l.Type = r.Type
-			}
-			l := n.List.Next.N
-			if l.Type != nil && l.Type.Etype != TBOOL {
-				checkassignto(Types[TBOOL], l)
-			}
-			if l.Name != nil && l.Name.Defn == n && l.Name.Param.Ntype == nil {
-				l.Type = Types[TBOOL]
-			}
-			goto out
-		}
-	}
-
-mismatch:
-	Yyerror("assignment count mismatch: %d = %d", cl, cr)
-
-	// second half of dance
-out:
-	n.Typecheck = 1
-
-	for ll := n.List; ll != nil; ll = ll.Next {
-		if ll.N.Typecheck == 0 {
-			typecheck(&ll.N, Erv|Easgn)
-		}
-	}
-}
-
-/*
- * type check function definition
- */
-func typecheckfunc(n *Node) {
-	typecheck(&n.Func.Nname, Erv|Easgn)
-	t := n.Func.Nname.Type
-	if t == nil {
-		return
-	}
-	n.Type = t
-	t.Nname = n.Func.Nname
-	rcvr := getthisx(t).Type
-	if rcvr != nil && n.Func.Shortname != nil && !isblank(n.Func.Shortname) {
-		addmethod(n.Func.Shortname.Sym, t, true, n.Func.Nname.Nointerface)
-	}
-
-	for l := n.Func.Dcl; l != nil; l = l.Next {
-		if l.N.Op == ONAME && (l.N.Class == PPARAM || l.N.Class == PPARAMOUT) {
-			l.N.Name.Decldepth = 1
-		}
-	}
-}
-
-func stringtoarraylit(np **Node) {
-	n := *np
-	if n.Left.Op != OLITERAL || n.Left.Val().Ctype() != CTSTR {
-		Fatal("stringtoarraylit %v", n)
-	}
-
-	s := n.Left.Val().U.(string)
-	var l *NodeList
-	if n.Type.Type.Etype == TUINT8 {
-		// []byte
-		for i := 0; i < len(s); i++ {
-			l = list(l, Nod(OKEY, Nodintconst(int64(i)), Nodintconst(int64(s[0]))))
-		}
-	} else {
-		// []rune
-		i := 0
-		for _, r := range s {
-			l = list(l, Nod(OKEY, Nodintconst(int64(i)), Nodintconst(int64(r))))
-			i++
-		}
-	}
-
-	nn := Nod(OCOMPLIT, nil, typenod(n.Type))
-	nn.List = l
-	typecheck(&nn, Erv)
-	*np = nn
-}
-
-var ntypecheckdeftype int
-
-var methodqueue *NodeList
-
-func domethod(n *Node) {
-	nt := n.Type.Nname
-	typecheck(&nt, Etype)
-	if nt.Type == nil {
-		// type check failed; leave empty func
-		n.Type.Etype = TFUNC
-
-		n.Type.Nod = nil
-		return
-	}
-
-	// If we have
-	//	type I interface {
-	//		M(_ int)
-	//	}
-	// then even though I.M looks like it doesn't care about the
-	// value of its argument, a specific implementation of I may
-	// care.  The _ would suppress the assignment to that argument
-	// while generating a call, so remove it.
-	for t := getinargx(nt.Type).Type; t != nil; t = t.Down {
-		if t.Sym != nil && t.Sym.Name == "_" {
-			t.Sym = nil
-		}
-	}
-
-	*n.Type = *nt.Type
-	n.Type.Nod = nil
-	checkwidth(n.Type)
-}
-
-var mapqueue *NodeList
-
-func copytype(n *Node, t *Type) {
-	if t.Etype == TFORW {
-		// This type isn't computed yet; when it is, update n.
-		t.Copyto = list(t.Copyto, n)
-
-		return
-	}
-
-	maplineno := int(n.Type.Maplineno)
-	embedlineno := int(n.Type.Embedlineno)
-
-	l := n.Type.Copyto
-	*n.Type = *t
-
-	t = n.Type
-	t.Sym = n.Sym
-	t.Local = n.Local
-	if n.Name != nil {
-		t.Vargen = n.Name.Vargen
-	}
-	t.Siggen = 0
-	t.Method = nil
-	t.Xmethod = nil
-	t.Nod = nil
-	t.Printed = 0
-	t.Deferwidth = 0
-	t.Copyto = nil
-
-	// Update nodes waiting on this type.
-	for ; l != nil; l = l.Next {
-		copytype(l.N, t)
-	}
-
-	// Double-check use of type as embedded type.
-	lno := int(lineno)
-
-	if embedlineno != 0 {
-		lineno = int32(embedlineno)
-		if Isptr[t.Etype] {
-			Yyerror("embedded type cannot be a pointer")
-		}
-	}
-
-	lineno = int32(lno)
-
-	// Queue check for map until all the types are done settling.
-	if maplineno != 0 {
-		t.Maplineno = int32(maplineno)
-		mapqueue = list(mapqueue, n)
-	}
-}
-
-func typecheckdeftype(n *Node) {
-	ntypecheckdeftype++
-	lno := int(lineno)
-	setlineno(n)
-	n.Type.Sym = n.Sym
-	n.Typecheck = 1
-	typecheck(&n.Name.Param.Ntype, Etype)
-	t := n.Name.Param.Ntype.Type
-	if t == nil {
-		n.Diag = 1
-		n.Type = nil
-		goto ret
-	}
-
-	if n.Type == nil {
-		n.Diag = 1
-		goto ret
-	}
-
-	// copy new type and clear fields
-	// that don't come along.
-	// anything zeroed here must be zeroed in
-	// typedcl2 too.
-	copytype(n, t)
-
-ret:
-	lineno = int32(lno)
-
-	// if there are no type definitions going on, it's safe to
-	// try to resolve the method types for the interfaces
-	// we just read.
-	if ntypecheckdeftype == 1 {
-		var l *NodeList
-		for {
-			l = methodqueue
-			if l == nil {
-				break
-			}
-			methodqueue = nil
-			for ; l != nil; l = l.Next {
-				domethod(l.N)
-			}
-		}
-
-		for l := mapqueue; l != nil; l = l.Next {
-			lineno = l.N.Type.Maplineno
-			maptype(l.N.Type, Types[TBOOL])
-		}
-
-		lineno = int32(lno)
-	}
-
-	ntypecheckdeftype--
-}
-
-func queuemethod(n *Node) {
-	if ntypecheckdeftype == 0 {
-		domethod(n)
-		return
-	}
-
-	methodqueue = list(methodqueue, n)
-}
-
-func typecheckdef(n *Node) *Node {
-	lno := int(lineno)
-	setlineno(n)
-
-	if n.Op == ONONAME {
-		if n.Diag == 0 {
-			n.Diag = 1
-			if n.Lineno != 0 {
-				lineno = n.Lineno
-			}
-
-			// Note: adderrorname looks for this string and
-			// adds context about the outer expression
-			Yyerror("undefined: %v", n.Sym)
-		}
-
-		return n
-	}
-
-	if n.Walkdef == 1 {
-		return n
-	}
-
-	l := new(NodeList)
-	l.N = n
-	l.Next = typecheckdefstack
-	typecheckdefstack = l
-
-	if n.Walkdef == 2 {
-		Flusherrors()
-		fmt.Printf("typecheckdef loop:")
-		for l := typecheckdefstack; l != nil; l = l.Next {
-			fmt.Printf(" %v", l.N.Sym)
-		}
-		fmt.Printf("\n")
-		Fatal("typecheckdef loop")
-	}
-
-	n.Walkdef = 2
-
-	if n.Type != nil || n.Sym == nil { // builtin or no name
-		goto ret
-	}
-
-	switch n.Op {
-	default:
-		Fatal("typecheckdef %v", Oconv(int(n.Op), 0))
-
-		// not really syms
-	case OGOTO, OLABEL:
-		break
-
-	case OLITERAL:
-		if n.Name.Param.Ntype != nil {
-			typecheck(&n.Name.Param.Ntype, Etype)
-			n.Type = n.Name.Param.Ntype.Type
-			n.Name.Param.Ntype = nil
-			if n.Type == nil {
-				n.Diag = 1
-				goto ret
-			}
-		}
-
-		e := n.Name.Defn
-		n.Name.Defn = nil
-		if e == nil {
-			lineno = n.Lineno
-			Dump("typecheckdef nil defn", n)
-			Yyerror("xxx")
-		}
-
-		typecheck(&e, Erv|Eiota)
-		if Isconst(e, CTNIL) {
-			Yyerror("const initializer cannot be nil")
-			goto ret
-		}
-
-		if e.Type != nil && e.Op != OLITERAL || !isgoconst(e) {
-			if e.Diag == 0 {
-				Yyerror("const initializer %v is not a constant", e)
-				e.Diag = 1
-			}
-
-			goto ret
-		}
-
-		t := n.Type
-		if t != nil {
-			if !okforconst[t.Etype] {
-				Yyerror("invalid constant type %v", t)
-				goto ret
-			}
-
-			if !isideal(e.Type) && !Eqtype(t, e.Type) {
-				Yyerror("cannot use %v as type %v in const initializer", Nconv(e, obj.FmtLong), t)
-				goto ret
-			}
-
-			Convlit(&e, t)
-		}
-
-		n.SetVal(e.Val())
-		n.Type = e.Type
-
-	case ONAME:
-		if n.Name.Param.Ntype != nil {
-			typecheck(&n.Name.Param.Ntype, Etype)
-			n.Type = n.Name.Param.Ntype.Type
-			if n.Type == nil {
-				n.Diag = 1
-				goto ret
-			}
-		}
-
-		if n.Type != nil {
-			break
-		}
-		if n.Name.Defn == nil {
-			if n.Etype != 0 { // like OPRINTN
-				break
-			}
-			if nsavederrors+nerrors > 0 {
-				// Can have undefined variables in x := foo
-				// that make x have an n->ndefn == nil.
-				// If there are other errors anyway, don't
-				// bother adding to the noise.
-				break
-			}
-
-			Fatal("var without type, init: %v", n.Sym)
-		}
-
-		if n.Name.Defn.Op == ONAME {
-			typecheck(&n.Name.Defn, Erv)
-			n.Type = n.Name.Defn.Type
-			break
-		}
-
-		typecheck(&n.Name.Defn, Etop) // fills in n->type
-
-	case OTYPE:
-		if Curfn != nil {
-			defercheckwidth()
-		}
-		n.Walkdef = 1
-		n.Type = typ(TFORW)
-		n.Type.Sym = n.Sym
-		nerrors0 := nerrors
-		typecheckdeftype(n)
-		if n.Type.Etype == TFORW && nerrors > nerrors0 {
-			// Something went wrong during type-checking,
-			// but it was reported. Silence future errors.
-			n.Type.Broke = 1
-		}
-
-		if Curfn != nil {
-			resumecheckwidth()
-		}
-
-		// nothing to see here
-	case OPACK:
-		break
-	}
-
-ret:
-	if n.Op != OLITERAL && n.Type != nil && isideal(n.Type) {
-		Fatal("got %v for %v", n.Type, n)
-	}
-	if typecheckdefstack.N != n {
-		Fatal("typecheckdefstack mismatch")
-	}
-	l = typecheckdefstack
-	typecheckdefstack = l.Next
-
-	lineno = int32(lno)
-	n.Walkdef = 1
-	return n
-}
-
-func checkmake(t *Type, arg string, n *Node) int {
-	if n.Op == OLITERAL {
-		switch n.Val().Ctype() {
-		case CTINT, CTRUNE, CTFLT, CTCPLX:
-			n.SetVal(toint(n.Val()))
-			if mpcmpfixc(n.Val().U.(*Mpint), 0) < 0 {
-				Yyerror("negative %s argument in make(%v)", arg, t)
-				return -1
-			}
-
-			if Mpcmpfixfix(n.Val().U.(*Mpint), Maxintval[TINT]) > 0 {
-				Yyerror("%s argument too large in make(%v)", arg, t)
-				return -1
-			}
-
-			// Delay defaultlit until after we've checked range, to avoid
-			// a redundant "constant NNN overflows int" error.
-			defaultlit(&n, Types[TINT])
-
-			return 0
-
-		default:
-			break
-		}
-	}
-
-	if !Isint[n.Type.Etype] && n.Type.Etype != TIDEAL {
-		Yyerror("non-integer %s argument in make(%v) - %v", arg, t, n.Type)
-		return -1
-	}
-
-	// Defaultlit still necessary for non-constant: n might be 1<<k.
-	defaultlit(&n, Types[TINT])
-
-	return 0
-}
-
-func markbreak(n *Node, implicit *Node) {
-	if n == nil {
-		return
-	}
-
-	switch n.Op {
-	case OBREAK:
-		if n.Left == nil {
-			if implicit != nil {
-				implicit.Hasbreak = true
-			}
-		} else {
-			lab := n.Left.Sym.Label
-			if lab != nil {
-				lab.Def.Hasbreak = true
-			}
-		}
-
-	case OFOR,
-		OSWITCH,
-		OTYPESW,
-		OSELECT,
-		ORANGE:
-		implicit = n
-		fallthrough
-
-		// fall through
-	default:
-		markbreak(n.Left, implicit)
-
-		markbreak(n.Right, implicit)
-		markbreaklist(n.Ninit, implicit)
-		markbreaklist(n.Nbody, implicit)
-		markbreaklist(n.List, implicit)
-		markbreaklist(n.Rlist, implicit)
-	}
-}
-
-func markbreaklist(l *NodeList, implicit *Node) {
-	var n *Node
-	var lab *Label
-
-	for ; l != nil; l = l.Next {
-		n = l.N
-		if n.Op == OLABEL && l.Next != nil && n.Name.Defn == l.Next.N {
-			switch n.Name.Defn.Op {
-			case OFOR,
-				OSWITCH,
-				OTYPESW,
-				OSELECT,
-				ORANGE:
-				lab = new(Label)
-				lab.Def = n.Name.Defn
-				n.Left.Sym.Label = lab
-				markbreak(n.Name.Defn, n.Name.Defn)
-				n.Left.Sym.Label = nil
-				l = l.Next
-				continue
-			}
-		}
-
-		markbreak(n, implicit)
-	}
-}
-
-func isterminating(l *NodeList, top int) bool {
-	if l == nil {
-		return false
-	}
-	if top != 0 {
-		for l.Next != nil && l.N.Op != OLABEL {
-			l = l.Next
-		}
-		markbreaklist(l, nil)
-	}
-
-	for l.Next != nil {
-		l = l.Next
-	}
-	n := l.N
-
-	if n == nil {
-		return false
-	}
-
-	switch n.Op {
-	// NOTE: OLABEL is treated as a separate statement,
-	// not a separate prefix, so skipping to the last statement
-	// in the block handles the labeled statement case by
-	// skipping over the label. No case OLABEL here.
-
-	case OBLOCK:
-		return isterminating(n.List, 0)
-
-	case OGOTO,
-		ORETURN,
-		ORETJMP,
-		OPANIC,
-		OXFALL:
-		return true
-
-	case OFOR:
-		if n.Left != nil {
-			return false
-		}
-		if n.Hasbreak {
-			return false
-		}
-		return true
-
-	case OIF:
-		return isterminating(n.Nbody, 0) && isterminating(n.Rlist, 0)
-
-	case OSWITCH, OTYPESW, OSELECT:
-		if n.Hasbreak {
-			return false
-		}
-		def := 0
-		for l = n.List; l != nil; l = l.Next {
-			if !isterminating(l.N.Nbody, 0) {
-				return false
-			}
-			if l.N.List == nil { // default
-				def = 1
-			}
-		}
-
-		if n.Op != OSELECT && def == 0 {
-			return false
-		}
-		return true
-	}
-
-	return false
-}
-
-func checkreturn(fn *Node) {
-	if fn.Type.Outtuple != 0 && fn.Nbody != nil {
-		if !isterminating(fn.Nbody, 1) {
-			yyerrorl(int(fn.Func.Endlineno), "missing return at end of function")
-		}
-	}
-}
diff --git a/src/cmd/compile/internal/gc/unsafe.go b/src/cmd/compile/internal/gc/unsafe.go
deleted file mode 100644
index a01765b..0000000
--- a/src/cmd/compile/internal/gc/unsafe.go
+++ /dev/null
@@ -1,165 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import "cmd/internal/obj"
-
-/*
- * look for
- *	unsafe.Sizeof
- *	unsafe.Offsetof
- *	unsafe.Alignof
- * rewrite with a constant
- */
-func unsafenmagic(nn *Node) *Node {
-	fn := nn.Left
-	args := nn.List
-
-	if safemode != 0 || fn == nil || fn.Op != ONAME {
-		return nil
-	}
-	s := fn.Sym
-	if s == nil {
-		return nil
-	}
-	if s.Pkg != unsafepkg {
-		return nil
-	}
-
-	if args == nil {
-		Yyerror("missing argument for %v", s)
-		return nil
-	}
-
-	r := args.N
-
-	var v int64
-	if s.Name == "Sizeof" {
-		typecheck(&r, Erv)
-		defaultlit(&r, nil)
-		tr := r.Type
-		if tr == nil {
-			goto bad
-		}
-		dowidth(tr)
-		v = tr.Width
-		goto yes
-	}
-
-	if s.Name == "Offsetof" {
-		// must be a selector.
-		if r.Op != OXDOT {
-			goto bad
-		}
-
-		// Remember base of selector to find it back after dot insertion.
-		// Since r->left may be mutated by typechecking, check it explicitly
-		// first to track it correctly.
-		typecheck(&r.Left, Erv)
-
-		base := r.Left
-		typecheck(&r, Erv)
-		switch r.Op {
-		case ODOT, ODOTPTR:
-			break
-
-		case OCALLPART:
-			Yyerror("invalid expression %v: argument is a method value", nn)
-			v = 0
-			goto ret
-
-		default:
-			goto bad
-		}
-
-		v = 0
-
-		// add offsets for inserted dots.
-		var r1 *Node
-		for r1 = r; r1.Left != base; r1 = r1.Left {
-			switch r1.Op {
-			case ODOT:
-				v += r1.Xoffset
-
-			case ODOTPTR:
-				Yyerror("invalid expression %v: selector implies indirection of embedded %v", nn, r1.Left)
-				goto ret
-
-			default:
-				Dump("unsafenmagic", r)
-				Fatal("impossible %v node after dot insertion", Oconv(int(r1.Op), obj.FmtSharp))
-				goto bad
-			}
-		}
-
-		v += r1.Xoffset
-		goto yes
-	}
-
-	if s.Name == "Alignof" {
-		typecheck(&r, Erv)
-		defaultlit(&r, nil)
-		tr := r.Type
-		if tr == nil {
-			goto bad
-		}
-
-		// make struct { byte; T; }
-		t := typ(TSTRUCT)
-
-		t.Type = typ(TFIELD)
-		t.Type.Type = Types[TUINT8]
-		t.Type.Down = typ(TFIELD)
-		t.Type.Down.Type = tr
-
-		// compute struct widths
-		dowidth(t)
-
-		// the offset of T is its required alignment
-		v = t.Type.Down.Width
-
-		goto yes
-	}
-
-	return nil
-
-bad:
-	Yyerror("invalid expression %v", nn)
-	v = 0
-	goto ret
-
-yes:
-	if args.Next != nil {
-		Yyerror("extra arguments for %v", s)
-	}
-
-	// any side effects disappear; ignore init
-ret:
-	var val Val
-	val.U = new(Mpint)
-	Mpmovecfix(val.U.(*Mpint), v)
-	n := Nod(OLITERAL, nil, nil)
-	n.Orig = nn
-	n.SetVal(val)
-	n.Type = Types[TUINTPTR]
-	nn.Type = Types[TUINTPTR]
-	return n
-}
-
-func isunsafebuiltin(n *Node) bool {
-	if n == nil || n.Op != ONAME || n.Sym == nil || n.Sym.Pkg != unsafepkg {
-		return false
-	}
-	if n.Sym.Name == "Sizeof" {
-		return true
-	}
-	if n.Sym.Name == "Offsetof" {
-		return true
-	}
-	if n.Sym.Name == "Alignof" {
-		return true
-	}
-	return false
-}
diff --git a/src/cmd/compile/internal/gc/util.go b/src/cmd/compile/internal/gc/util.go
deleted file mode 100644
index c59af06..0000000
--- a/src/cmd/compile/internal/gc/util.go
+++ /dev/null
@@ -1,103 +0,0 @@
-package gc
-
-import (
-	"os"
-	"runtime"
-	"runtime/pprof"
-	"strconv"
-	"strings"
-)
-
-func (n *Node) Line() string {
-	return Ctxt.LineHist.LineString(int(n.Lineno))
-}
-
-func atoi(s string) int {
-	// NOTE: Not strconv.Atoi, accepts hex and octal prefixes.
-	n, _ := strconv.ParseInt(s, 0, 0)
-	return int(n)
-}
-
-func isalnum(c int) bool {
-	return isalpha(c) || isdigit(c)
-}
-
-func isalpha(c int) bool {
-	return 'A' <= c && c <= 'Z' || 'a' <= c && c <= 'z'
-}
-
-func isdigit(c int) bool {
-	return '0' <= c && c <= '9'
-}
-
-func plan9quote(s string) string {
-	if s == "" {
-		return "'" + strings.Replace(s, "'", "''", -1) + "'"
-	}
-	for i := 0; i < len(s); i++ {
-		if s[i] <= ' ' || s[i] == '\'' {
-			return "'" + strings.Replace(s, "'", "''", -1) + "'"
-		}
-	}
-	return s
-}
-
-// strings.Compare, introduced in Go 1.5.
-func stringsCompare(a, b string) int {
-	if a == b {
-		return 0
-	}
-	if a < b {
-		return -1
-	}
-	return +1
-}
-
-var atExitFuncs []func()
-
-func AtExit(f func()) {
-	atExitFuncs = append(atExitFuncs, f)
-}
-
-func Exit(code int) {
-	for i := len(atExitFuncs) - 1; i >= 0; i-- {
-		f := atExitFuncs[i]
-		atExitFuncs = atExitFuncs[:i]
-		f()
-	}
-	os.Exit(code)
-}
-
-var (
-	cpuprofile     string
-	memprofile     string
-	memprofilerate int64
-)
-
-func startProfile() {
-	if cpuprofile != "" {
-		f, err := os.Create(cpuprofile)
-		if err != nil {
-			Fatal("%v", err)
-		}
-		if err := pprof.StartCPUProfile(f); err != nil {
-			Fatal("%v", err)
-		}
-		AtExit(pprof.StopCPUProfile)
-	}
-	if memprofile != "" {
-		if memprofilerate != 0 {
-			runtime.MemProfileRate = int(memprofilerate)
-		}
-		f, err := os.Create(memprofile)
-		if err != nil {
-			Fatal("%v", err)
-		}
-		AtExit(func() {
-			runtime.GC() // profile all outstanding allocations
-			if err := pprof.WriteHeapProfile(f); err != nil {
-				Fatal("%v", err)
-			}
-		})
-	}
-}
diff --git a/src/cmd/compile/internal/gc/walk.go b/src/cmd/compile/internal/gc/walk.go
deleted file mode 100644
index ce73018..0000000
--- a/src/cmd/compile/internal/gc/walk.go
+++ /dev/null
@@ -1,4069 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gc
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-	"strings"
-)
-
-var mpzero Mpint
-
-// The constant is known to runtime.
-const (
-	tmpstringbufsize = 32
-)
-
-func walk(fn *Node) {
-	Curfn = fn
-
-	if Debug['W'] != 0 {
-		s := fmt.Sprintf("\nbefore %v", Curfn.Func.Nname.Sym)
-		dumplist(s, Curfn.Nbody)
-	}
-
-	lno := int(lineno)
-
-	// Final typecheck for any unused variables.
-	// It's hard to be on the heap when not-used, but best to be consistent about &~PHEAP here and below.
-	for l := fn.Func.Dcl; l != nil; l = l.Next {
-		if l.N.Op == ONAME && l.N.Class&^PHEAP == PAUTO {
-			typecheck(&l.N, Erv|Easgn)
-		}
-	}
-
-	// Propagate the used flag for typeswitch variables up to the NONAME in it's definition.
-	for l := fn.Func.Dcl; l != nil; l = l.Next {
-		if l.N.Op == ONAME && l.N.Class&^PHEAP == PAUTO && l.N.Name.Defn != nil && l.N.Name.Defn.Op == OTYPESW && l.N.Used {
-			l.N.Name.Defn.Left.Used = true
-		}
-	}
-
-	for l := fn.Func.Dcl; l != nil; l = l.Next {
-		if l.N.Op != ONAME || l.N.Class&^PHEAP != PAUTO || l.N.Sym.Name[0] == '&' || l.N.Used {
-			continue
-		}
-		if defn := l.N.Name.Defn; defn != nil && defn.Op == OTYPESW {
-			if defn.Left.Used {
-				continue
-			}
-			lineno = defn.Left.Lineno
-			Yyerror("%v declared and not used", l.N.Sym)
-			defn.Left.Used = true // suppress repeats
-		} else {
-			lineno = l.N.Lineno
-			Yyerror("%v declared and not used", l.N.Sym)
-		}
-	}
-
-	lineno = int32(lno)
-	if nerrors != 0 {
-		return
-	}
-	walkstmtlist(Curfn.Nbody)
-	if Debug['W'] != 0 {
-		s := fmt.Sprintf("after walk %v", Curfn.Func.Nname.Sym)
-		dumplist(s, Curfn.Nbody)
-	}
-
-	heapmoves()
-	if Debug['W'] != 0 && Curfn.Func.Enter != nil {
-		s := fmt.Sprintf("enter %v", Curfn.Func.Nname.Sym)
-		dumplist(s, Curfn.Func.Enter)
-	}
-}
-
-func walkstmtlist(l *NodeList) {
-	for ; l != nil; l = l.Next {
-		walkstmt(&l.N)
-	}
-}
-
-func samelist(a *NodeList, b *NodeList) bool {
-	for ; a != nil && b != nil; a, b = a.Next, b.Next {
-		if a.N != b.N {
-			return false
-		}
-	}
-	return a == b
-}
-
-func paramoutheap(fn *Node) bool {
-	for l := fn.Func.Dcl; l != nil; l = l.Next {
-		switch l.N.Class {
-		case PPARAMOUT,
-			PPARAMOUT | PHEAP:
-			return l.N.Addrtaken
-
-			// stop early - parameters are over
-		case PAUTO,
-			PAUTO | PHEAP:
-			return false
-		}
-	}
-
-	return false
-}
-
-// adds "adjust" to all the argument locations for the call n.
-// n must be a defer or go node that has already been walked.
-func adjustargs(n *Node, adjust int) {
-	var arg *Node
-	var lhs *Node
-
-	callfunc := n.Left
-	for args := callfunc.List; args != nil; args = args.Next {
-		arg = args.N
-		if arg.Op != OAS {
-			Yyerror("call arg not assignment")
-		}
-		lhs = arg.Left
-		if lhs.Op == ONAME {
-			// This is a temporary introduced by reorder1.
-			// The real store to the stack appears later in the arg list.
-			continue
-		}
-
-		if lhs.Op != OINDREG {
-			Yyerror("call argument store does not use OINDREG")
-		}
-
-		// can't really check this in machine-indep code.
-		//if(lhs->val.u.reg != D_SP)
-		//      yyerror("call arg assign not indreg(SP)");
-		lhs.Xoffset += int64(adjust)
-	}
-}
-
-func walkstmt(np **Node) {
-	n := *np
-	if n == nil {
-		return
-	}
-	if n.Dodata == 2 { // don't walk, generated by anylit.
-		return
-	}
-
-	setlineno(n)
-
-	walkstmtlist(n.Ninit)
-
-	switch n.Op {
-	default:
-		if n.Op == ONAME {
-			Yyerror("%v is not a top level statement", n.Sym)
-		} else {
-			Yyerror("%v is not a top level statement", Oconv(int(n.Op), 0))
-		}
-		Dump("nottop", n)
-
-	case OAS,
-		OASOP,
-		OAS2,
-		OAS2DOTTYPE,
-		OAS2RECV,
-		OAS2FUNC,
-		OAS2MAPR,
-		OCLOSE,
-		OCOPY,
-		OCALLMETH,
-		OCALLINTER,
-		OCALL,
-		OCALLFUNC,
-		ODELETE,
-		OSEND,
-		OPRINT,
-		OPRINTN,
-		OPANIC,
-		OEMPTY,
-		ORECOVER,
-		OGETG:
-		if n.Typecheck == 0 {
-			Fatal("missing typecheck: %v", Nconv(n, obj.FmtSign))
-		}
-		init := n.Ninit
-		n.Ninit = nil
-		walkexpr(&n, &init)
-		addinit(&n, init)
-		if (*np).Op == OCOPY && n.Op == OCONVNOP {
-			n.Op = OEMPTY // don't leave plain values as statements.
-		}
-
-		// special case for a receive where we throw away
-	// the value received.
-	case ORECV:
-		if n.Typecheck == 0 {
-			Fatal("missing typecheck: %v", Nconv(n, obj.FmtSign))
-		}
-		init := n.Ninit
-		n.Ninit = nil
-
-		walkexpr(&n.Left, &init)
-		n = mkcall1(chanfn("chanrecv1", 2, n.Left.Type), nil, &init, typename(n.Left.Type), n.Left, nodnil())
-		walkexpr(&n, &init)
-
-		addinit(&n, init)
-
-	case OBREAK,
-		ODCL,
-		OCONTINUE,
-		OFALL,
-		OGOTO,
-		OLABEL,
-		ODCLCONST,
-		ODCLTYPE,
-		OCHECKNIL,
-		OVARKILL:
-		break
-
-	case OBLOCK:
-		walkstmtlist(n.List)
-
-	case OXCASE:
-		Yyerror("case statement out of place")
-		n.Op = OCASE
-		fallthrough
-
-	case OCASE:
-		walkstmt(&n.Right)
-
-	case ODEFER:
-		Hasdefer = 1
-		switch n.Left.Op {
-		case OPRINT, OPRINTN:
-			walkprintfunc(&n.Left, &n.Ninit)
-
-		case OCOPY:
-			n.Left = copyany(n.Left, &n.Ninit, 1)
-
-		default:
-			walkexpr(&n.Left, &n.Ninit)
-		}
-
-		// make room for size & fn arguments.
-		adjustargs(n, 2*Widthptr)
-
-	case OFOR:
-		if n.Left != nil {
-			walkstmtlist(n.Left.Ninit)
-			init := n.Left.Ninit
-			n.Left.Ninit = nil
-			walkexpr(&n.Left, &init)
-			addinit(&n.Left, init)
-		}
-
-		walkstmt(&n.Right)
-		walkstmtlist(n.Nbody)
-
-	case OIF:
-		walkexpr(&n.Left, &n.Ninit)
-		walkstmtlist(n.Nbody)
-		walkstmtlist(n.Rlist)
-
-	case OPROC:
-		switch n.Left.Op {
-		case OPRINT, OPRINTN:
-			walkprintfunc(&n.Left, &n.Ninit)
-
-		case OCOPY:
-			n.Left = copyany(n.Left, &n.Ninit, 1)
-
-		default:
-			walkexpr(&n.Left, &n.Ninit)
-		}
-
-		// make room for size & fn arguments.
-		adjustargs(n, 2*Widthptr)
-
-	case ORETURN:
-		walkexprlist(n.List, &n.Ninit)
-		if n.List == nil {
-			break
-		}
-		if (Curfn.Type.Outnamed != 0 && count(n.List) > 1) || paramoutheap(Curfn) {
-			// assign to the function out parameters,
-			// so that reorder3 can fix up conflicts
-			var rl *NodeList
-
-			var cl uint8
-			for ll := Curfn.Func.Dcl; ll != nil; ll = ll.Next {
-				cl = ll.N.Class &^ PHEAP
-				if cl == PAUTO {
-					break
-				}
-				if cl == PPARAMOUT {
-					rl = list(rl, ll.N)
-				}
-			}
-
-			if samelist(rl, n.List) {
-				// special return in disguise
-				n.List = nil
-
-				break
-			}
-
-			if count(n.List) == 1 && count(rl) > 1 {
-				// OAS2FUNC in disguise
-				f := n.List.N
-
-				if f.Op != OCALLFUNC && f.Op != OCALLMETH && f.Op != OCALLINTER {
-					Fatal("expected return of call, have %v", f)
-				}
-				n.List = concat(list1(f), ascompatet(int(n.Op), rl, &f.Type, 0, &n.Ninit))
-				break
-			}
-
-			// move function calls out, to make reorder3's job easier.
-			walkexprlistsafe(n.List, &n.Ninit)
-
-			ll := ascompatee(int(n.Op), rl, n.List, &n.Ninit)
-			n.List = reorder3(ll)
-			break
-		}
-
-		ll := ascompatte(int(n.Op), nil, false, Getoutarg(Curfn.Type), n.List, 1, &n.Ninit)
-		n.List = ll
-
-	case ORETJMP:
-		break
-
-	case OSELECT:
-		walkselect(n)
-
-	case OSWITCH:
-		walkswitch(n)
-
-	case ORANGE:
-		walkrange(n)
-
-	case OXFALL:
-		Yyerror("fallthrough statement out of place")
-		n.Op = OFALL
-	}
-
-	if n.Op == ONAME {
-		Fatal("walkstmt ended up with name: %v", Nconv(n, obj.FmtSign))
-	}
-
-	*np = n
-}
-
-func isSmallMakeSlice(n *Node) bool {
-	if n.Op != OMAKESLICE {
-		return false
-	}
-	l := n.Left
-	r := n.Right
-	if r == nil {
-		r = l
-	}
-	t := n.Type
-
-	return Smallintconst(l) && Smallintconst(r) && (t.Type.Width == 0 || Mpgetfix(r.Val().U.(*Mpint)) < (1<<16)/t.Type.Width)
-}
-
-/*
- * walk the whole tree of the body of an
- * expression or simple statement.
- * the types expressions are calculated.
- * compile-time constants are evaluated.
- * complex side effects like statements are appended to init
- */
-func walkexprlist(l *NodeList, init **NodeList) {
-	for ; l != nil; l = l.Next {
-		walkexpr(&l.N, init)
-	}
-}
-
-func walkexprlistsafe(l *NodeList, init **NodeList) {
-	for ; l != nil; l = l.Next {
-		l.N = safeexpr(l.N, init)
-		walkexpr(&l.N, init)
-	}
-}
-
-func walkexprlistcheap(l *NodeList, init **NodeList) {
-	for ; l != nil; l = l.Next {
-		l.N = cheapexpr(l.N, init)
-		walkexpr(&l.N, init)
-	}
-}
-
-func walkexpr(np **Node, init **NodeList) {
-	n := *np
-
-	if n == nil {
-		return
-	}
-
-	if init == &n.Ninit {
-		// not okay to use n->ninit when walking n,
-		// because we might replace n with some other node
-		// and would lose the init list.
-		Fatal("walkexpr init == &n->ninit")
-	}
-
-	if n.Ninit != nil {
-		walkstmtlist(n.Ninit)
-		*init = concat(*init, n.Ninit)
-		n.Ninit = nil
-	}
-
-	// annoying case - not typechecked
-	if n.Op == OKEY {
-		walkexpr(&n.Left, init)
-		walkexpr(&n.Right, init)
-		return
-	}
-
-	lno := setlineno(n)
-
-	if Debug['w'] > 1 {
-		Dump("walk-before", n)
-	}
-
-	if n.Typecheck != 1 {
-		Fatal("missed typecheck: %v\n", Nconv(n, obj.FmtSign))
-	}
-
-	switch n.Op {
-	default:
-		Dump("walk", n)
-		Fatal("walkexpr: switch 1 unknown op %v", Nconv(n, obj.FmtShort|obj.FmtSign))
-
-	case OTYPE,
-		ONONAME,
-		OINDREG,
-		OEMPTY,
-		OPARAM,
-		OGETG:
-		goto ret
-
-	case ONOT,
-		OMINUS,
-		OPLUS,
-		OCOM,
-		OREAL,
-		OIMAG,
-		ODOTMETH,
-		ODOTINTER:
-		walkexpr(&n.Left, init)
-		goto ret
-
-	case OIND:
-		walkexpr(&n.Left, init)
-		goto ret
-
-	case ODOT:
-		usefield(n)
-		walkexpr(&n.Left, init)
-		goto ret
-
-	case ODOTPTR:
-		usefield(n)
-		if n.Op == ODOTPTR && n.Left.Type.Type.Width == 0 {
-			// No actual copy will be generated, so emit an explicit nil check.
-			n.Left = cheapexpr(n.Left, init)
-
-			checknil(n.Left, init)
-		}
-
-		walkexpr(&n.Left, init)
-		goto ret
-
-	case OEFACE:
-		walkexpr(&n.Left, init)
-		walkexpr(&n.Right, init)
-		goto ret
-
-	case OSPTR, OITAB:
-		walkexpr(&n.Left, init)
-		goto ret
-
-	case OLEN, OCAP:
-		walkexpr(&n.Left, init)
-
-		// replace len(*[10]int) with 10.
-		// delayed until now to preserve side effects.
-		t := n.Left.Type
-
-		if Isptr[t.Etype] {
-			t = t.Type
-		}
-		if Isfixedarray(t) {
-			safeexpr(n.Left, init)
-			Nodconst(n, n.Type, t.Bound)
-			n.Typecheck = 1
-		}
-
-		goto ret
-
-	case OLSH, ORSH:
-		walkexpr(&n.Left, init)
-		walkexpr(&n.Right, init)
-		t := n.Left.Type
-		n.Bounded = bounded(n.Right, 8*t.Width)
-		if Debug['m'] != 0 && n.Etype != 0 && !Isconst(n.Right, CTINT) {
-			Warn("shift bounds check elided")
-		}
-		goto ret
-
-		// Use results from call expression as arguments for complex.
-	case OAND,
-		OSUB,
-		OHMUL,
-		OLT,
-		OLE,
-		OGE,
-		OGT,
-		OADD,
-		OCOMPLEX,
-		OLROT:
-		if n.Op == OCOMPLEX && n.Left == nil && n.Right == nil {
-			n.Left = n.List.N
-			n.Right = n.List.Next.N
-		}
-
-		walkexpr(&n.Left, init)
-		walkexpr(&n.Right, init)
-		goto ret
-
-	case OOR, OXOR:
-		walkexpr(&n.Left, init)
-		walkexpr(&n.Right, init)
-		walkrotate(&n)
-		goto ret
-
-	case OEQ, ONE:
-		walkexpr(&n.Left, init)
-		walkexpr(&n.Right, init)
-
-		// Disable safemode while compiling this code: the code we
-		// generate internally can refer to unsafe.Pointer.
-		// In this case it can happen if we need to generate an ==
-		// for a struct containing a reflect.Value, which itself has
-		// an unexported field of type unsafe.Pointer.
-		old_safemode := safemode
-
-		safemode = 0
-		walkcompare(&n, init)
-		safemode = old_safemode
-		goto ret
-
-	case OANDAND, OOROR:
-		walkexpr(&n.Left, init)
-
-		// cannot put side effects from n.Right on init,
-		// because they cannot run before n.Left is checked.
-		// save elsewhere and store on the eventual n.Right.
-		var ll *NodeList
-
-		walkexpr(&n.Right, &ll)
-		addinit(&n.Right, ll)
-		goto ret
-
-	case OPRINT, OPRINTN:
-		walkexprlist(n.List, init)
-		n = walkprint(n, init)
-		goto ret
-
-	case OPANIC:
-		n = mkcall("gopanic", nil, init, n.Left)
-		goto ret
-
-	case ORECOVER:
-		n = mkcall("gorecover", n.Type, init, Nod(OADDR, nodfp, nil))
-		goto ret
-
-	case OLITERAL:
-		n.Addable = true
-		goto ret
-
-	case OCLOSUREVAR, OCFUNC:
-		n.Addable = true
-		goto ret
-
-	case ONAME:
-		if n.Class&PHEAP == 0 && n.Class != PPARAMREF {
-			n.Addable = true
-		}
-		goto ret
-
-	case OCALLINTER:
-		t := n.Left.Type
-		if n.List != nil && n.List.N.Op == OAS {
-			goto ret
-		}
-		walkexpr(&n.Left, init)
-		walkexprlist(n.List, init)
-		ll := ascompatte(int(n.Op), n, n.Isddd, getinarg(t), n.List, 0, init)
-		n.List = reorder1(ll)
-		goto ret
-
-	case OCALLFUNC:
-		if n.Left.Op == OCLOSURE {
-			// Transform direct call of a closure to call of a normal function.
-			// transformclosure already did all preparation work.
-
-			// Prepend captured variables to argument list.
-			n.List = concat(n.Left.Func.Enter, n.List)
-
-			n.Left.Func.Enter = nil
-
-			// Replace OCLOSURE with ONAME/PFUNC.
-			n.Left = n.Left.Func.Closure.Func.Nname
-
-			// Update type of OCALLFUNC node.
-			// Output arguments had not changed, but their offsets could.
-			if n.Left.Type.Outtuple == 1 {
-				t := getoutargx(n.Left.Type).Type
-				if t.Etype == TFIELD {
-					t = t.Type
-				}
-				n.Type = t
-			} else {
-				n.Type = getoutargx(n.Left.Type)
-			}
-		}
-
-		t := n.Left.Type
-		if n.List != nil && n.List.N.Op == OAS {
-			goto ret
-		}
-
-		walkexpr(&n.Left, init)
-		walkexprlist(n.List, init)
-
-		if n.Left.Op == ONAME && n.Left.Sym.Name == "Sqrt" && n.Left.Sym.Pkg.Path == "math" {
-			switch Thearch.Thechar {
-			case '5', '6', '7':
-				n.Op = OSQRT
-				n.Left = n.List.N
-				n.List = nil
-				goto ret
-			}
-		}
-
-		ll := ascompatte(int(n.Op), n, n.Isddd, getinarg(t), n.List, 0, init)
-		n.List = reorder1(ll)
-		goto ret
-
-	case OCALLMETH:
-		t := n.Left.Type
-		if n.List != nil && n.List.N.Op == OAS {
-			goto ret
-		}
-		walkexpr(&n.Left, init)
-		walkexprlist(n.List, init)
-		ll := ascompatte(int(n.Op), n, false, getthis(t), list1(n.Left.Left), 0, init)
-		lr := ascompatte(int(n.Op), n, n.Isddd, getinarg(t), n.List, 0, init)
-		ll = concat(ll, lr)
-		n.Left.Left = nil
-		ullmancalc(n.Left)
-		n.List = reorder1(ll)
-		goto ret
-
-	case OAS:
-		*init = concat(*init, n.Ninit)
-		n.Ninit = nil
-
-		walkexpr(&n.Left, init)
-		n.Left = safeexpr(n.Left, init)
-
-		if oaslit(n, init) {
-			goto ret
-		}
-
-		if n.Right == nil || iszero(n.Right) && flag_race == 0 {
-			goto ret
-		}
-
-		switch n.Right.Op {
-		default:
-			walkexpr(&n.Right, init)
-
-		case ODOTTYPE:
-			// TODO(rsc): The Isfat is for consistency with componentgen and orderexpr.
-			// It needs to be removed in all three places.
-			// That would allow inlining x.(struct{*int}) the same as x.(*int).
-			if isdirectiface(n.Right.Type) && !Isfat(n.Right.Type) && flag_race == 0 {
-				// handled directly during cgen
-				walkexpr(&n.Right, init)
-				break
-			}
-
-			// x = i.(T); n.Left is x, n.Right.Left is i.
-			// orderstmt made sure x is addressable.
-			walkexpr(&n.Right.Left, init)
-
-			n1 := Nod(OADDR, n.Left, nil)
-			r := n.Right // i.(T)
-
-			if Debug_typeassert > 0 {
-				Warn("type assertion not inlined")
-			}
-
-			buf := "assert" + type2IET(r.Left.Type) + "2" + type2IET(r.Type)
-			fn := syslook(buf, 1)
-			substArgTypes(fn, r.Left.Type, r.Type)
-
-			n = mkcall1(fn, nil, init, typename(r.Type), r.Left, n1)
-			walkexpr(&n, init)
-			goto ret
-
-		case ORECV:
-			// x = <-c; n.Left is x, n.Right.Left is c.
-			// orderstmt made sure x is addressable.
-			walkexpr(&n.Right.Left, init)
-
-			n1 := Nod(OADDR, n.Left, nil)
-			r := n.Right.Left // the channel
-			n = mkcall1(chanfn("chanrecv1", 2, r.Type), nil, init, typename(r.Type), r, n1)
-			walkexpr(&n, init)
-			goto ret
-
-		case OAPPEND:
-			// x = append(...)
-			r := n.Right
-			if r.Isddd {
-				r = appendslice(r, init) // also works for append(slice, string).
-			} else {
-				r = walkappend(r, init, n)
-			}
-			n.Right = r
-			if r.Op == OAPPEND {
-				// Left in place for back end.
-				// Do not add a new write barrier.
-				goto ret
-			}
-			// Otherwise, lowered for race detector.
-			// Treat as ordinary assignment.
-		}
-
-		if n.Left != nil && n.Right != nil {
-			r := convas(Nod(OAS, n.Left, n.Right), init)
-			r.Dodata = n.Dodata
-			n = r
-			n = applywritebarrier(n, init)
-		}
-
-		goto ret
-
-	case OAS2:
-		*init = concat(*init, n.Ninit)
-		n.Ninit = nil
-		walkexprlistsafe(n.List, init)
-		walkexprlistsafe(n.Rlist, init)
-		ll := ascompatee(OAS, n.List, n.Rlist, init)
-		ll = reorder3(ll)
-		for lr := ll; lr != nil; lr = lr.Next {
-			lr.N = applywritebarrier(lr.N, init)
-		}
-		n = liststmt(ll)
-		goto ret
-
-		// a,b,... = fn()
-	case OAS2FUNC:
-		*init = concat(*init, n.Ninit)
-
-		n.Ninit = nil
-		r := n.Rlist.N
-		walkexprlistsafe(n.List, init)
-		walkexpr(&r, init)
-
-		ll := ascompatet(int(n.Op), n.List, &r.Type, 0, init)
-		for lr := ll; lr != nil; lr = lr.Next {
-			lr.N = applywritebarrier(lr.N, init)
-		}
-		n = liststmt(concat(list1(r), ll))
-		goto ret
-
-		// x, y = <-c
-	// orderstmt made sure x is addressable.
-	case OAS2RECV:
-		*init = concat(*init, n.Ninit)
-
-		n.Ninit = nil
-		r := n.Rlist.N
-		walkexprlistsafe(n.List, init)
-		walkexpr(&r.Left, init)
-		var n1 *Node
-		if isblank(n.List.N) {
-			n1 = nodnil()
-		} else {
-			n1 = Nod(OADDR, n.List.N, nil)
-		}
-		n1.Etype = 1 // addr does not escape
-		fn := chanfn("chanrecv2", 2, r.Left.Type)
-		r = mkcall1(fn, n.List.Next.N.Type, init, typename(r.Left.Type), r.Left, n1)
-		n = Nod(OAS, n.List.Next.N, r)
-		typecheck(&n, Etop)
-		goto ret
-
-		// a,b = m[i];
-	case OAS2MAPR:
-		*init = concat(*init, n.Ninit)
-
-		n.Ninit = nil
-		r := n.Rlist.N
-		walkexprlistsafe(n.List, init)
-		walkexpr(&r.Left, init)
-		walkexpr(&r.Right, init)
-		t := r.Left.Type
-		p := ""
-		if t.Type.Width <= 128 { // Check ../../runtime/hashmap.go:maxValueSize before changing.
-			switch Simsimtype(t.Down) {
-			case TINT32, TUINT32:
-				p = "mapaccess2_fast32"
-
-			case TINT64, TUINT64:
-				p = "mapaccess2_fast64"
-
-			case TSTRING:
-				p = "mapaccess2_faststr"
-			}
-		}
-
-		var key *Node
-		if p != "" {
-			// fast versions take key by value
-			key = r.Right
-		} else {
-			// standard version takes key by reference
-			// orderexpr made sure key is addressable.
-			key = Nod(OADDR, r.Right, nil)
-
-			p = "mapaccess2"
-		}
-
-		// from:
-		//   a,b = m[i]
-		// to:
-		//   var,b = mapaccess2*(t, m, i)
-		//   a = *var
-		a := n.List.N
-
-		fn := mapfn(p, t)
-		r = mkcall1(fn, getoutargx(fn.Type), init, typename(t), r.Left, key)
-
-		// mapaccess2* returns a typed bool, but due to spec changes,
-		// the boolean result of i.(T) is now untyped so we make it the
-		// same type as the variable on the lhs.
-		if !isblank(n.List.Next.N) {
-			r.Type.Type.Down.Type = n.List.Next.N.Type
-		}
-		n.Rlist = list1(r)
-		n.Op = OAS2FUNC
-
-		// don't generate a = *var if a is _
-		if !isblank(a) {
-			var_ := temp(Ptrto(t.Type))
-			var_.Typecheck = 1
-			n.List.N = var_
-			walkexpr(&n, init)
-			*init = list(*init, n)
-			n = Nod(OAS, a, Nod(OIND, var_, nil))
-		}
-
-		typecheck(&n, Etop)
-		walkexpr(&n, init)
-
-		// mapaccess needs a zero value to be at least this big.
-		if zerosize < t.Type.Width {
-			zerosize = t.Type.Width
-		}
-
-		// TODO: ptr is always non-nil, so disable nil check for this OIND op.
-		goto ret
-
-	case ODELETE:
-		*init = concat(*init, n.Ninit)
-		n.Ninit = nil
-		map_ := n.List.N
-		key := n.List.Next.N
-		walkexpr(&map_, init)
-		walkexpr(&key, init)
-
-		// orderstmt made sure key is addressable.
-		key = Nod(OADDR, key, nil)
-
-		t := map_.Type
-		n = mkcall1(mapfndel("mapdelete", t), nil, init, typename(t), map_, key)
-		goto ret
-
-	case OAS2DOTTYPE:
-		e := n.Rlist.N // i.(T)
-		// TODO(rsc): The Isfat is for consistency with componentgen and orderexpr.
-		// It needs to be removed in all three places.
-		// That would allow inlining x.(struct{*int}) the same as x.(*int).
-		if isdirectiface(e.Type) && !Isfat(e.Type) && flag_race == 0 {
-			// handled directly during gen.
-			walkexprlistsafe(n.List, init)
-			walkexpr(&e.Left, init)
-			goto ret
-		}
-
-		// res, ok = i.(T)
-		// orderstmt made sure a is addressable.
-		*init = concat(*init, n.Ninit)
-		n.Ninit = nil
-
-		walkexprlistsafe(n.List, init)
-		walkexpr(&e.Left, init)
-		t := e.Type    // T
-		from := e.Left // i
-
-		oktype := Types[TBOOL]
-		ok := n.List.Next.N
-		if !isblank(ok) {
-			oktype = ok.Type
-		}
-
-		fromKind := type2IET(from.Type)
-		toKind := type2IET(t)
-
-		// Avoid runtime calls in a few cases of the form _, ok := i.(T).
-		// This is faster and shorter and allows the corresponding assertX2X2
-		// routines to skip nil checks on their last argument.
-		if isblank(n.List.N) {
-			var fast *Node
-			switch {
-			case fromKind == "E" && toKind == "T":
-				tab := Nod(OITAB, from, nil) // type:eface::tab:iface
-				typ := Nod(OCONVNOP, typename(t), nil)
-				typ.Type = Ptrto(Types[TUINTPTR])
-				fast = Nod(OEQ, tab, typ)
-			case fromKind == "I" && toKind == "E",
-				fromKind == "E" && toKind == "E":
-				tab := Nod(OITAB, from, nil)
-				fast = Nod(ONE, nodnil(), tab)
-			}
-			if fast != nil {
-				if Debug_typeassert > 0 {
-					Warn("type assertion (ok only) inlined")
-				}
-				n = Nod(OAS, ok, fast)
-				typecheck(&n, Etop)
-				goto ret
-			}
-		}
-
-		var resptr *Node // &res
-		if isblank(n.List.N) {
-			resptr = nodnil()
-		} else {
-			resptr = Nod(OADDR, n.List.N, nil)
-		}
-		resptr.Etype = 1 // addr does not escape
-
-		if Debug_typeassert > 0 {
-			Warn("type assertion not inlined")
-		}
-		buf := "assert" + fromKind + "2" + toKind + "2"
-		fn := syslook(buf, 1)
-		substArgTypes(fn, from.Type, t)
-		call := mkcall1(fn, oktype, init, typename(t), from, resptr)
-		n = Nod(OAS, ok, call)
-		typecheck(&n, Etop)
-		goto ret
-
-	case ODOTTYPE, ODOTTYPE2:
-		if !isdirectiface(n.Type) || Isfat(n.Type) {
-			Fatal("walkexpr ODOTTYPE") // should see inside OAS only
-		}
-		walkexpr(&n.Left, init)
-		goto ret
-
-	case OCONVIFACE:
-		walkexpr(&n.Left, init)
-
-		// Optimize convT2E as a two-word copy when T is pointer-shaped.
-		if isnilinter(n.Type) && isdirectiface(n.Left.Type) {
-			l := Nod(OEFACE, typename(n.Left.Type), n.Left)
-			l.Type = n.Type
-			l.Typecheck = n.Typecheck
-			n = l
-			goto ret
-		}
-
-		// Build name of function: convI2E etc.
-		// Not all names are possible
-		// (e.g., we'll never generate convE2E or convE2I).
-		buf := "conv" + type2IET(n.Left.Type) + "2" + type2IET(n.Type)
-		fn := syslook(buf, 1)
-		var ll *NodeList
-		if !Isinter(n.Left.Type) {
-			ll = list(ll, typename(n.Left.Type))
-		}
-		if !isnilinter(n.Type) {
-			ll = list(ll, typename(n.Type))
-		}
-		if !Isinter(n.Left.Type) && !isnilinter(n.Type) {
-			sym := Pkglookup(Tconv(n.Left.Type, obj.FmtLeft)+"."+Tconv(n.Type, obj.FmtLeft), itabpkg)
-			if sym.Def == nil {
-				l := Nod(ONAME, nil, nil)
-				l.Sym = sym
-				l.Type = Ptrto(Types[TUINT8])
-				l.Addable = true
-				l.Class = PEXTERN
-				l.Xoffset = 0
-				sym.Def = l
-				ggloblsym(sym, int32(Widthptr), obj.DUPOK|obj.NOPTR)
-			}
-
-			l := Nod(OADDR, sym.Def, nil)
-			l.Addable = true
-			ll = list(ll, l)
-
-			if isdirectiface(n.Left.Type) {
-				/* For pointer types, we can make a special form of optimization
-				 *
-				 * These statements are put onto the expression init list:
-				 * 	Itab *tab = atomicloadtype(&cache);
-				 * 	if(tab == nil)
-				 * 		tab = typ2Itab(type, itype, &cache);
-				 *
-				 * The CONVIFACE expression is replaced with this:
-				 * 	OEFACE{tab, ptr};
-				 */
-				l := temp(Ptrto(Types[TUINT8]))
-
-				n1 := Nod(OAS, l, sym.Def)
-				typecheck(&n1, Etop)
-				*init = list(*init, n1)
-
-				fn := syslook("typ2Itab", 1)
-				n1 = Nod(OCALL, fn, nil)
-				n1.List = ll
-				typecheck(&n1, Erv)
-				walkexpr(&n1, init)
-
-				n2 := Nod(OIF, nil, nil)
-				n2.Left = Nod(OEQ, l, nodnil())
-				n2.Nbody = list1(Nod(OAS, l, n1))
-				n2.Likely = -1
-				typecheck(&n2, Etop)
-				*init = list(*init, n2)
-
-				l = Nod(OEFACE, l, n.Left)
-				l.Typecheck = n.Typecheck
-				l.Type = n.Type
-				n = l
-				goto ret
-			}
-		}
-
-		if Isinter(n.Left.Type) {
-			ll = list(ll, n.Left)
-		} else {
-			// regular types are passed by reference to avoid C vararg calls
-			// orderexpr arranged for n.Left to be a temporary for all
-			// the conversions it could see. comparison of an interface
-			// with a non-interface, especially in a switch on interface value
-			// with non-interface cases, is not visible to orderstmt, so we
-			// have to fall back on allocating a temp here.
-			if islvalue(n.Left) {
-				ll = list(ll, Nod(OADDR, n.Left, nil))
-			} else {
-				ll = list(ll, Nod(OADDR, copyexpr(n.Left, n.Left.Type, init), nil))
-			}
-			dowidth(n.Left.Type)
-			r := nodnil()
-			if n.Esc == EscNone && n.Left.Type.Width <= 1024 {
-				// Allocate stack buffer for value stored in interface.
-				r = temp(n.Left.Type)
-				r = Nod(OAS, r, nil) // zero temp
-				typecheck(&r, Etop)
-				*init = list(*init, r)
-				r = Nod(OADDR, r.Left, nil)
-				typecheck(&r, Erv)
-			}
-			ll = list(ll, r)
-		}
-
-		if !Isinter(n.Left.Type) {
-			substArgTypes(fn, n.Left.Type, n.Left.Type, n.Type)
-		} else {
-			substArgTypes(fn, n.Left.Type, n.Type)
-		}
-		dowidth(fn.Type)
-		n = Nod(OCALL, fn, nil)
-		n.List = ll
-		typecheck(&n, Erv)
-		walkexpr(&n, init)
-		goto ret
-
-	case OCONV, OCONVNOP:
-		if Thearch.Thechar == '5' {
-			if Isfloat[n.Left.Type.Etype] {
-				if n.Type.Etype == TINT64 {
-					n = mkcall("float64toint64", n.Type, init, conv(n.Left, Types[TFLOAT64]))
-					goto ret
-				}
-
-				if n.Type.Etype == TUINT64 {
-					n = mkcall("float64touint64", n.Type, init, conv(n.Left, Types[TFLOAT64]))
-					goto ret
-				}
-			}
-
-			if Isfloat[n.Type.Etype] {
-				if n.Left.Type.Etype == TINT64 {
-					n = mkcall("int64tofloat64", n.Type, init, conv(n.Left, Types[TINT64]))
-					goto ret
-				}
-
-				if n.Left.Type.Etype == TUINT64 {
-					n = mkcall("uint64tofloat64", n.Type, init, conv(n.Left, Types[TUINT64]))
-					goto ret
-				}
-			}
-		}
-
-		walkexpr(&n.Left, init)
-		goto ret
-
-	case OANDNOT:
-		walkexpr(&n.Left, init)
-		n.Op = OAND
-		n.Right = Nod(OCOM, n.Right, nil)
-		typecheck(&n.Right, Erv)
-		walkexpr(&n.Right, init)
-		goto ret
-
-	case OMUL:
-		walkexpr(&n.Left, init)
-		walkexpr(&n.Right, init)
-		walkmul(&n, init)
-		goto ret
-
-	case ODIV, OMOD:
-		walkexpr(&n.Left, init)
-		walkexpr(&n.Right, init)
-
-		/*
-		 * rewrite complex div into function call.
-		 */
-		et := int(n.Left.Type.Etype)
-
-		if Iscomplex[et] && n.Op == ODIV {
-			t := n.Type
-			n = mkcall("complex128div", Types[TCOMPLEX128], init, conv(n.Left, Types[TCOMPLEX128]), conv(n.Right, Types[TCOMPLEX128]))
-			n = conv(n, t)
-			goto ret
-		}
-
-		// Nothing to do for float divisions.
-		if Isfloat[et] {
-			goto ret
-		}
-
-		// Try rewriting as shifts or magic multiplies.
-		walkdiv(&n, init)
-
-		/*
-		 * rewrite 64-bit div and mod into function calls
-		 * on 32-bit architectures.
-		 */
-		switch n.Op {
-		case OMOD, ODIV:
-			if Widthreg >= 8 || (et != TUINT64 && et != TINT64) {
-				goto ret
-			}
-			var fn string
-			if et == TINT64 {
-				fn = "int64"
-			} else {
-				fn = "uint64"
-			}
-			if n.Op == ODIV {
-				fn += "div"
-			} else {
-				fn += "mod"
-			}
-			n = mkcall(fn, n.Type, init, conv(n.Left, Types[et]), conv(n.Right, Types[et]))
-
-		default:
-			break
-		}
-
-		goto ret
-
-	case OINDEX:
-		walkexpr(&n.Left, init)
-
-		// save the original node for bounds checking elision.
-		// If it was a ODIV/OMOD walk might rewrite it.
-		r := n.Right
-
-		walkexpr(&n.Right, init)
-
-		// if range of type cannot exceed static array bound,
-		// disable bounds check.
-		if n.Bounded {
-			goto ret
-		}
-		t := n.Left.Type
-		if t != nil && Isptr[t.Etype] {
-			t = t.Type
-		}
-		if Isfixedarray(t) {
-			n.Bounded = bounded(r, t.Bound)
-			if Debug['m'] != 0 && n.Bounded && !Isconst(n.Right, CTINT) {
-				Warn("index bounds check elided")
-			}
-			if Smallintconst(n.Right) && !n.Bounded {
-				Yyerror("index out of bounds")
-			}
-		} else if Isconst(n.Left, CTSTR) {
-			n.Bounded = bounded(r, int64(len(n.Left.Val().U.(string))))
-			if Debug['m'] != 0 && n.Bounded && !Isconst(n.Right, CTINT) {
-				Warn("index bounds check elided")
-			}
-			if Smallintconst(n.Right) {
-				if !n.Bounded {
-					Yyerror("index out of bounds")
-				} else {
-					// replace "abc"[1] with 'b'.
-					// delayed until now because "abc"[1] is not
-					// an ideal constant.
-					v := Mpgetfix(n.Right.Val().U.(*Mpint))
-
-					Nodconst(n, n.Type, int64(n.Left.Val().U.(string)[v]))
-					n.Typecheck = 1
-				}
-			}
-		}
-
-		if Isconst(n.Right, CTINT) {
-			if Mpcmpfixfix(n.Right.Val().U.(*Mpint), &mpzero) < 0 || Mpcmpfixfix(n.Right.Val().U.(*Mpint), Maxintval[TINT]) > 0 {
-				Yyerror("index out of bounds")
-			}
-		}
-		goto ret
-
-	case OINDEXMAP:
-		if n.Etype == 1 {
-			goto ret
-		}
-		walkexpr(&n.Left, init)
-		walkexpr(&n.Right, init)
-
-		t := n.Left.Type
-		p := ""
-		if t.Type.Width <= 128 { // Check ../../runtime/hashmap.go:maxValueSize before changing.
-			switch Simsimtype(t.Down) {
-			case TINT32, TUINT32:
-				p = "mapaccess1_fast32"
-
-			case TINT64, TUINT64:
-				p = "mapaccess1_fast64"
-
-			case TSTRING:
-				p = "mapaccess1_faststr"
-			}
-		}
-
-		var key *Node
-		if p != "" {
-			// fast versions take key by value
-			key = n.Right
-		} else {
-			// standard version takes key by reference.
-			// orderexpr made sure key is addressable.
-			key = Nod(OADDR, n.Right, nil)
-
-			p = "mapaccess1"
-		}
-
-		n = mkcall1(mapfn(p, t), Ptrto(t.Type), init, typename(t), n.Left, key)
-		n = Nod(OIND, n, nil)
-		n.Type = t.Type
-		n.Typecheck = 1
-
-		// mapaccess needs a zero value to be at least this big.
-		if zerosize < t.Type.Width {
-			zerosize = t.Type.Width
-		}
-		goto ret
-
-	case ORECV:
-		Fatal("walkexpr ORECV") // should see inside OAS only
-
-	case OSLICE, OSLICEARR, OSLICESTR:
-		walkexpr(&n.Left, init)
-		walkexpr(&n.Right.Left, init)
-		if n.Right.Left != nil && iszero(n.Right.Left) {
-			// Reduce x[0:j] to x[:j].
-			n.Right.Left = nil
-		}
-		walkexpr(&n.Right.Right, init)
-		n = reduceSlice(n)
-		goto ret
-
-	case OSLICE3, OSLICE3ARR:
-		walkexpr(&n.Left, init)
-		walkexpr(&n.Right.Left, init)
-		if n.Right.Left != nil && iszero(n.Right.Left) {
-			// Reduce x[0:j:k] to x[:j:k].
-			n.Right.Left = nil
-		}
-		walkexpr(&n.Right.Right.Left, init)
-		walkexpr(&n.Right.Right.Right, init)
-
-		r := n.Right.Right.Right
-		if r != nil && r.Op == OCAP && samesafeexpr(n.Left, r.Left) {
-			// Reduce x[i:j:cap(x)] to x[i:j].
-			n.Right.Right = n.Right.Right.Left
-			if n.Op == OSLICE3 {
-				n.Op = OSLICE
-			} else {
-				n.Op = OSLICEARR
-			}
-			n = reduceSlice(n)
-			goto ret
-		}
-		goto ret
-
-	case OADDR:
-		walkexpr(&n.Left, init)
-		goto ret
-
-	case ONEW:
-		if n.Esc == EscNone {
-			if n.Type.Type.Width >= 1<<16 {
-				Fatal("large ONEW with EscNone: %v", n)
-			}
-			r := temp(n.Type.Type)
-			r = Nod(OAS, r, nil) // zero temp
-			typecheck(&r, Etop)
-			*init = list(*init, r)
-			r = Nod(OADDR, r.Left, nil)
-			typecheck(&r, Erv)
-			n = r
-		} else {
-			n = callnew(n.Type.Type)
-		}
-
-		goto ret
-
-		// If one argument to the comparison is an empty string,
-	// comparing the lengths instead will yield the same result
-	// without the function call.
-	case OCMPSTR:
-		if (Isconst(n.Left, CTSTR) && len(n.Left.Val().U.(string)) == 0) || (Isconst(n.Right, CTSTR) && len(n.Right.Val().U.(string)) == 0) {
-			r := Nod(int(n.Etype), Nod(OLEN, n.Left, nil), Nod(OLEN, n.Right, nil))
-			typecheck(&r, Erv)
-			walkexpr(&r, init)
-			r.Type = n.Type
-			n = r
-			goto ret
-		}
-
-		// s + "badgerbadgerbadger" == "badgerbadgerbadger"
-		if (n.Etype == OEQ || n.Etype == ONE) && Isconst(n.Right, CTSTR) && n.Left.Op == OADDSTR && count(n.Left.List) == 2 && Isconst(n.Left.List.Next.N, CTSTR) && cmpslit(n.Right, n.Left.List.Next.N) == 0 {
-			r := Nod(int(n.Etype), Nod(OLEN, n.Left.List.N, nil), Nodintconst(0))
-			typecheck(&r, Erv)
-			walkexpr(&r, init)
-			r.Type = n.Type
-			n = r
-			goto ret
-		}
-
-		var r *Node
-		if n.Etype == OEQ || n.Etype == ONE {
-			// prepare for rewrite below
-			n.Left = cheapexpr(n.Left, init)
-
-			n.Right = cheapexpr(n.Right, init)
-
-			r = mkcall("eqstring", Types[TBOOL], init, conv(n.Left, Types[TSTRING]), conv(n.Right, Types[TSTRING]))
-
-			// quick check of len before full compare for == or !=
-			// eqstring assumes that the lengths are equal
-			if n.Etype == OEQ {
-				// len(left) == len(right) && eqstring(left, right)
-				r = Nod(OANDAND, Nod(OEQ, Nod(OLEN, n.Left, nil), Nod(OLEN, n.Right, nil)), r)
-			} else {
-				// len(left) != len(right) || !eqstring(left, right)
-				r = Nod(ONOT, r, nil)
-
-				r = Nod(OOROR, Nod(ONE, Nod(OLEN, n.Left, nil), Nod(OLEN, n.Right, nil)), r)
-			}
-
-			typecheck(&r, Erv)
-			walkexpr(&r, nil)
-		} else {
-			// sys_cmpstring(s1, s2) :: 0
-			r = mkcall("cmpstring", Types[TINT], init, conv(n.Left, Types[TSTRING]), conv(n.Right, Types[TSTRING]))
-
-			r = Nod(int(n.Etype), r, Nodintconst(0))
-		}
-
-		typecheck(&r, Erv)
-		if n.Type.Etype != TBOOL {
-			Fatal("cmp %v", n.Type)
-		}
-		r.Type = n.Type
-		n = r
-		goto ret
-
-	case OADDSTR:
-		n = addstr(n, init)
-		goto ret
-
-	case OAPPEND:
-		// order should make sure we only see OAS(node, OAPPEND), which we handle above.
-		Fatal("append outside assignment")
-
-	case OCOPY:
-		n = copyany(n, init, flag_race)
-		goto ret
-
-		// cannot use chanfn - closechan takes any, not chan any
-	case OCLOSE:
-		fn := syslook("closechan", 1)
-
-		substArgTypes(fn, n.Left.Type)
-		n = mkcall1(fn, nil, init, n.Left)
-		goto ret
-
-	case OMAKECHAN:
-		n = mkcall1(chanfn("makechan", 1, n.Type), n.Type, init, typename(n.Type), conv(n.Left, Types[TINT64]))
-		goto ret
-
-	case OMAKEMAP:
-		t := n.Type
-
-		fn := syslook("makemap", 1)
-
-		a := nodnil() // hmap buffer
-		r := nodnil() // bucket buffer
-		if n.Esc == EscNone {
-			// Allocate hmap buffer on stack.
-			var_ := temp(hmap(t))
-
-			a = Nod(OAS, var_, nil) // zero temp
-			typecheck(&a, Etop)
-			*init = list(*init, a)
-			a = Nod(OADDR, var_, nil)
-
-			// Allocate one bucket on stack.
-			// Maximum key/value size is 128 bytes, larger objects
-			// are stored with an indirection. So max bucket size is 2048+eps.
-			var_ = temp(mapbucket(t))
-
-			r = Nod(OAS, var_, nil) // zero temp
-			typecheck(&r, Etop)
-			*init = list(*init, r)
-			r = Nod(OADDR, var_, nil)
-		}
-
-		substArgTypes(fn, hmap(t), mapbucket(t), t.Down, t.Type)
-		n = mkcall1(fn, n.Type, init, typename(n.Type), conv(n.Left, Types[TINT64]), a, r)
-		goto ret
-
-	case OMAKESLICE:
-		l := n.Left
-		r := n.Right
-		if r == nil {
-			r = safeexpr(l, init)
-			l = r
-		}
-		t := n.Type
-		if n.Esc == EscNone {
-			if !isSmallMakeSlice(n) {
-				Fatal("non-small OMAKESLICE with EscNone: %v", n)
-			}
-			// var arr [r]T
-			// n = arr[:l]
-			t = aindex(r, t.Type) // [r]T
-			var_ := temp(t)
-			a := Nod(OAS, var_, nil) // zero temp
-			typecheck(&a, Etop)
-			*init = list(*init, a)
-			r := Nod(OSLICE, var_, Nod(OKEY, nil, l)) // arr[:l]
-			r = conv(r, n.Type)                       // in case n.Type is named.
-			typecheck(&r, Erv)
-			walkexpr(&r, init)
-			n = r
-		} else {
-			// makeslice(t *Type, nel int64, max int64) (ary []any)
-			fn := syslook("makeslice", 1)
-
-			substArgTypes(fn, t.Type) // any-1
-			n = mkcall1(fn, n.Type, init, typename(n.Type), conv(l, Types[TINT64]), conv(r, Types[TINT64]))
-		}
-
-		goto ret
-
-	case ORUNESTR:
-		a := nodnil()
-		if n.Esc == EscNone {
-			t := aindex(Nodintconst(4), Types[TUINT8])
-			var_ := temp(t)
-			a = Nod(OADDR, var_, nil)
-		}
-
-		// intstring(*[4]byte, rune)
-		n = mkcall("intstring", n.Type, init, a, conv(n.Left, Types[TINT64]))
-
-		goto ret
-
-	case OARRAYBYTESTR:
-		a := nodnil()
-		if n.Esc == EscNone {
-			// Create temporary buffer for string on stack.
-			t := aindex(Nodintconst(tmpstringbufsize), Types[TUINT8])
-
-			a = Nod(OADDR, temp(t), nil)
-		}
-
-		// slicebytetostring(*[32]byte, []byte) string;
-		n = mkcall("slicebytetostring", n.Type, init, a, n.Left)
-
-		goto ret
-
-		// slicebytetostringtmp([]byte) string;
-	case OARRAYBYTESTRTMP:
-		n = mkcall("slicebytetostringtmp", n.Type, init, n.Left)
-
-		goto ret
-
-		// slicerunetostring(*[32]byte, []rune) string;
-	case OARRAYRUNESTR:
-		a := nodnil()
-
-		if n.Esc == EscNone {
-			// Create temporary buffer for string on stack.
-			t := aindex(Nodintconst(tmpstringbufsize), Types[TUINT8])
-
-			a = Nod(OADDR, temp(t), nil)
-		}
-
-		n = mkcall("slicerunetostring", n.Type, init, a, n.Left)
-		goto ret
-
-		// stringtoslicebyte(*32[byte], string) []byte;
-	case OSTRARRAYBYTE:
-		a := nodnil()
-
-		if n.Esc == EscNone {
-			// Create temporary buffer for slice on stack.
-			t := aindex(Nodintconst(tmpstringbufsize), Types[TUINT8])
-
-			a = Nod(OADDR, temp(t), nil)
-		}
-
-		n = mkcall("stringtoslicebyte", n.Type, init, a, conv(n.Left, Types[TSTRING]))
-		goto ret
-
-		// stringtoslicebytetmp(string) []byte;
-	case OSTRARRAYBYTETMP:
-		n = mkcall("stringtoslicebytetmp", n.Type, init, conv(n.Left, Types[TSTRING]))
-
-		goto ret
-
-		// stringtoslicerune(*[32]rune, string) []rune
-	case OSTRARRAYRUNE:
-		a := nodnil()
-
-		if n.Esc == EscNone {
-			// Create temporary buffer for slice on stack.
-			t := aindex(Nodintconst(tmpstringbufsize), Types[TINT32])
-
-			a = Nod(OADDR, temp(t), nil)
-		}
-
-		n = mkcall("stringtoslicerune", n.Type, init, a, n.Left)
-		goto ret
-
-		// ifaceeq(i1 any-1, i2 any-2) (ret bool);
-	case OCMPIFACE:
-		if !Eqtype(n.Left.Type, n.Right.Type) {
-			Fatal("ifaceeq %v %v %v", Oconv(int(n.Op), 0), n.Left.Type, n.Right.Type)
-		}
-		var fn *Node
-		if isnilinter(n.Left.Type) {
-			fn = syslook("efaceeq", 1)
-		} else {
-			fn = syslook("ifaceeq", 1)
-		}
-
-		n.Right = cheapexpr(n.Right, init)
-		n.Left = cheapexpr(n.Left, init)
-		substArgTypes(fn, n.Right.Type, n.Left.Type)
-		r := mkcall1(fn, n.Type, init, n.Left, n.Right)
-		if n.Etype == ONE {
-			r = Nod(ONOT, r, nil)
-		}
-
-		// check itable/type before full compare.
-		if n.Etype == OEQ {
-			r = Nod(OANDAND, Nod(OEQ, Nod(OITAB, n.Left, nil), Nod(OITAB, n.Right, nil)), r)
-		} else {
-			r = Nod(OOROR, Nod(ONE, Nod(OITAB, n.Left, nil), Nod(OITAB, n.Right, nil)), r)
-		}
-		typecheck(&r, Erv)
-		walkexpr(&r, init)
-		r.Type = n.Type
-		n = r
-		goto ret
-
-	case OARRAYLIT, OMAPLIT, OSTRUCTLIT, OPTRLIT:
-		var_ := temp(n.Type)
-		anylit(0, n, var_, init)
-		n = var_
-		goto ret
-
-	case OSEND:
-		n1 := n.Right
-		n1 = assignconv(n1, n.Left.Type.Type, "chan send")
-		walkexpr(&n1, init)
-		n1 = Nod(OADDR, n1, nil)
-		n = mkcall1(chanfn("chansend1", 2, n.Left.Type), nil, init, typename(n.Left.Type), n.Left, n1)
-		goto ret
-
-	case OCLOSURE:
-		n = walkclosure(n, init)
-		goto ret
-
-	case OCALLPART:
-		n = walkpartialcall(n, init)
-		goto ret
-	}
-
-	Fatal("missing switch %v", Oconv(int(n.Op), 0))
-
-	// Expressions that are constant at run time but not
-	// considered const by the language spec are not turned into
-	// constants until walk. For example, if n is y%1 == 0, the
-	// walk of y%1 may have replaced it by 0.
-	// Check whether n with its updated args is itself now a constant.
-ret:
-	t := n.Type
-
-	evconst(n)
-	n.Type = t
-	if n.Op == OLITERAL {
-		typecheck(&n, Erv)
-	}
-
-	ullmancalc(n)
-
-	if Debug['w'] != 0 && n != nil {
-		Dump("walk", n)
-	}
-
-	lineno = lno
-	*np = n
-}
-
-func reduceSlice(n *Node) *Node {
-	r := n.Right.Right
-	if r != nil && r.Op == OLEN && samesafeexpr(n.Left, r.Left) {
-		// Reduce x[i:len(x)] to x[i:].
-		n.Right.Right = nil
-	}
-	if (n.Op == OSLICE || n.Op == OSLICESTR) && n.Right.Left == nil && n.Right.Right == nil {
-		// Reduce x[:] to x.
-		if Debug_slice > 0 {
-			Warn("slice: omit slice operation")
-		}
-		return n.Left
-	}
-	return n
-}
-
-func ascompatee1(op int, l *Node, r *Node, init **NodeList) *Node {
-	// convas will turn map assigns into function calls,
-	// making it impossible for reorder3 to work.
-	n := Nod(OAS, l, r)
-
-	if l.Op == OINDEXMAP {
-		return n
-	}
-
-	return convas(n, init)
-}
-
-func ascompatee(op int, nl *NodeList, nr *NodeList, init **NodeList) *NodeList {
-	/*
-	 * check assign expression list to
-	 * a expression list. called in
-	 *	expr-list = expr-list
-	 */
-
-	// ensure order of evaluation for function calls
-	for ll := nl; ll != nil; ll = ll.Next {
-		ll.N = safeexpr(ll.N, init)
-	}
-	for lr := nr; lr != nil; lr = lr.Next {
-		lr.N = safeexpr(lr.N, init)
-	}
-
-	var nn *NodeList
-	ll := nl
-	lr := nr
-	for ; ll != nil && lr != nil; ll, lr = ll.Next, lr.Next {
-		// Do not generate 'x = x' during return. See issue 4014.
-		if op == ORETURN && ll.N == lr.N {
-			continue
-		}
-		nn = list(nn, ascompatee1(op, ll.N, lr.N, init))
-	}
-
-	// cannot happen: caller checked that lists had same length
-	if ll != nil || lr != nil {
-		Yyerror("error in shape across %v %v %v / %d %d [%s]", Hconv(nl, obj.FmtSign), Oconv(int(op), 0), Hconv(nr, obj.FmtSign), count(nl), count(nr), Curfn.Func.Nname.Sym.Name)
-	}
-	return nn
-}
-
-/*
- * l is an lv and rt is the type of an rv
- * return 1 if this implies a function call
- * evaluating the lv or a function call
- * in the conversion of the types
- */
-func fncall(l *Node, rt *Type) bool {
-	if l.Ullman >= UINF || l.Op == OINDEXMAP {
-		return true
-	}
-	var r Node
-	if needwritebarrier(l, &r) {
-		return true
-	}
-	if Eqtype(l.Type, rt) {
-		return false
-	}
-	return true
-}
-
-func ascompatet(op int, nl *NodeList, nr **Type, fp int, init **NodeList) *NodeList {
-	var l *Node
-	var tmp *Node
-	var a *Node
-	var ll *NodeList
-	var saver Iter
-
-	/*
-	 * check assign type list to
-	 * a expression list. called in
-	 *	expr-list = func()
-	 */
-	r := Structfirst(&saver, nr)
-
-	var nn *NodeList
-	var mm *NodeList
-	ucount := 0
-	for ll = nl; ll != nil; ll = ll.Next {
-		if r == nil {
-			break
-		}
-		l = ll.N
-		if isblank(l) {
-			r = structnext(&saver)
-			continue
-		}
-
-		// any lv that causes a fn call must be
-		// deferred until all the return arguments
-		// have been pulled from the output arguments
-		if fncall(l, r.Type) {
-			tmp = temp(r.Type)
-			typecheck(&tmp, Erv)
-			a = Nod(OAS, l, tmp)
-			a = convas(a, init)
-			mm = list(mm, a)
-			l = tmp
-		}
-
-		a = Nod(OAS, l, nodarg(r, fp))
-		a = convas(a, init)
-		ullmancalc(a)
-		if a.Ullman >= UINF {
-			Dump("ascompatet ucount", a)
-			ucount++
-		}
-
-		nn = list(nn, a)
-		r = structnext(&saver)
-	}
-
-	if ll != nil || r != nil {
-		Yyerror("ascompatet: assignment count mismatch: %d = %d", count(nl), structcount(*nr))
-	}
-
-	if ucount != 0 {
-		Fatal("ascompatet: too many function calls evaluating parameters")
-	}
-	return concat(nn, mm)
-}
-
-/*
-* package all the arguments that match a ... T parameter into a []T.
- */
-func mkdotargslice(lr0 *NodeList, nn *NodeList, l *Type, fp int, init **NodeList, ddd *Node) *NodeList {
-	esc := uint16(EscUnknown)
-	if ddd != nil {
-		esc = ddd.Esc
-	}
-
-	tslice := typ(TARRAY)
-	tslice.Type = l.Type.Type
-	tslice.Bound = -1
-
-	var n *Node
-	if count(lr0) == 0 {
-		n = nodnil()
-		n.Type = tslice
-	} else {
-		n = Nod(OCOMPLIT, nil, typenod(tslice))
-		if ddd != nil && prealloc[ddd] != nil {
-			prealloc[n] = prealloc[ddd] // temporary to use
-		}
-		n.List = lr0
-		n.Esc = esc
-		typecheck(&n, Erv)
-		if n.Type == nil {
-			Fatal("mkdotargslice: typecheck failed")
-		}
-		walkexpr(&n, init)
-	}
-
-	a := Nod(OAS, nodarg(l, fp), n)
-	nn = list(nn, convas(a, init))
-	return nn
-}
-
-/*
- * helpers for shape errors
- */
-func dumptypes(nl **Type, what string) string {
-	var savel Iter
-
-	fmt_ := ""
-	fmt_ += "\t"
-	first := 1
-	for l := Structfirst(&savel, nl); l != nil; l = structnext(&savel) {
-		if first != 0 {
-			first = 0
-		} else {
-			fmt_ += ", "
-		}
-		fmt_ += Tconv(l, 0)
-	}
-
-	if first != 0 {
-		fmt_ += fmt.Sprintf("[no arguments %s]", what)
-	}
-	return fmt_
-}
-
-func dumpnodetypes(l *NodeList, what string) string {
-	var r *Node
-
-	fmt_ := ""
-	fmt_ += "\t"
-	first := 1
-	for ; l != nil; l = l.Next {
-		r = l.N
-		if first != 0 {
-			first = 0
-		} else {
-			fmt_ += ", "
-		}
-		fmt_ += Tconv(r.Type, 0)
-	}
-
-	if first != 0 {
-		fmt_ += fmt.Sprintf("[no arguments %s]", what)
-	}
-	return fmt_
-}
-
-/*
- * check assign expression list to
- * a type list. called in
- *	return expr-list
- *	func(expr-list)
- */
-func ascompatte(op int, call *Node, isddd bool, nl **Type, lr *NodeList, fp int, init **NodeList) *NodeList {
-	var savel Iter
-
-	lr0 := lr
-	l := Structfirst(&savel, nl)
-	var r *Node
-	if lr != nil {
-		r = lr.N
-	}
-	var nn *NodeList
-
-	// f(g()) where g has multiple return values
-	var a *Node
-	var l2 string
-	var ll *Type
-	var l1 string
-	if r != nil && lr.Next == nil && r.Type.Etype == TSTRUCT && r.Type.Funarg != 0 {
-		// optimization - can do block copy
-		if eqtypenoname(r.Type, *nl) {
-			a := nodarg(*nl, fp)
-			r = Nod(OCONVNOP, r, nil)
-			r.Type = a.Type
-			nn = list1(convas(Nod(OAS, a, r), init))
-			goto ret
-		}
-
-		// conversions involved.
-		// copy into temporaries.
-		var alist *NodeList
-
-		for l := Structfirst(&savel, &r.Type); l != nil; l = structnext(&savel) {
-			a = temp(l.Type)
-			alist = list(alist, a)
-		}
-
-		a = Nod(OAS2, nil, nil)
-		a.List = alist
-		a.Rlist = lr
-		typecheck(&a, Etop)
-		walkstmt(&a)
-		*init = list(*init, a)
-		lr = alist
-		r = lr.N
-		l = Structfirst(&savel, nl)
-	}
-
-loop:
-	if l != nil && l.Isddd {
-		// the ddd parameter must be last
-		ll = structnext(&savel)
-
-		if ll != nil {
-			Yyerror("... must be last argument")
-		}
-
-		// special case --
-		// only if we are assigning a single ddd
-		// argument to a ddd parameter then it is
-		// passed thru unencapsulated
-		if r != nil && lr.Next == nil && isddd && Eqtype(l.Type, r.Type) {
-			a = Nod(OAS, nodarg(l, fp), r)
-			a = convas(a, init)
-			nn = list(nn, a)
-			goto ret
-		}
-
-		// normal case -- make a slice of all
-		// remaining arguments and pass it to
-		// the ddd parameter.
-		nn = mkdotargslice(lr, nn, l, fp, init, call.Right)
-
-		goto ret
-	}
-
-	if l == nil || r == nil {
-		if l != nil || r != nil {
-			l1 = dumptypes(nl, "expected")
-			l2 = dumpnodetypes(lr0, "given")
-			if l != nil {
-				Yyerror("not enough arguments to %v\n%s\n%s", Oconv(int(op), 0), l1, l2)
-			} else {
-				Yyerror("too many arguments to %v\n%s\n%s", Oconv(int(op), 0), l1, l2)
-			}
-		}
-
-		goto ret
-	}
-
-	a = Nod(OAS, nodarg(l, fp), r)
-	a = convas(a, init)
-	nn = list(nn, a)
-
-	l = structnext(&savel)
-	r = nil
-	lr = lr.Next
-	if lr != nil {
-		r = lr.N
-	}
-	goto loop
-
-ret:
-	for lr = nn; lr != nil; lr = lr.Next {
-		lr.N.Typecheck = 1
-	}
-	return nn
-}
-
-// generate code for print
-func walkprint(nn *Node, init **NodeList) *Node {
-	var r *Node
-	var n *Node
-	var on *Node
-	var t *Type
-	var et int
-
-	op := int(nn.Op)
-	all := nn.List
-	var calls *NodeList
-	notfirst := false
-
-	// Hoist all the argument evaluation up before the lock.
-	walkexprlistcheap(all, init)
-
-	calls = list(calls, mkcall("printlock", nil, init))
-
-	for l := all; l != nil; l = l.Next {
-		if notfirst {
-			calls = list(calls, mkcall("printsp", nil, init))
-		}
-
-		notfirst = op == OPRINTN
-
-		n = l.N
-		if n.Op == OLITERAL {
-			switch n.Val().Ctype() {
-			case CTRUNE:
-				defaultlit(&n, runetype)
-
-			case CTINT:
-				defaultlit(&n, Types[TINT64])
-
-			case CTFLT:
-				defaultlit(&n, Types[TFLOAT64])
-			}
-		}
-
-		if n.Op != OLITERAL && n.Type != nil && n.Type.Etype == TIDEAL {
-			defaultlit(&n, Types[TINT64])
-		}
-		defaultlit(&n, nil)
-		l.N = n
-		if n.Type == nil || n.Type.Etype == TFORW {
-			continue
-		}
-
-		t = n.Type
-		et = int(n.Type.Etype)
-		if Isinter(n.Type) {
-			if isnilinter(n.Type) {
-				on = syslook("printeface", 1)
-			} else {
-				on = syslook("printiface", 1)
-			}
-			substArgTypes(on, n.Type) // any-1
-		} else if Isptr[et] || et == TCHAN || et == TMAP || et == TFUNC || et == TUNSAFEPTR {
-			on = syslook("printpointer", 1)
-			substArgTypes(on, n.Type) // any-1
-		} else if Isslice(n.Type) {
-			on = syslook("printslice", 1)
-			substArgTypes(on, n.Type) // any-1
-		} else if Isint[et] {
-			if et == TUINT64 {
-				if (t.Sym.Pkg == Runtimepkg || compiling_runtime != 0) && t.Sym.Name == "hex" {
-					on = syslook("printhex", 0)
-				} else {
-					on = syslook("printuint", 0)
-				}
-			} else {
-				on = syslook("printint", 0)
-			}
-		} else if Isfloat[et] {
-			on = syslook("printfloat", 0)
-		} else if Iscomplex[et] {
-			on = syslook("printcomplex", 0)
-		} else if et == TBOOL {
-			on = syslook("printbool", 0)
-		} else if et == TSTRING {
-			on = syslook("printstring", 0)
-		} else {
-			badtype(OPRINT, n.Type, nil)
-			continue
-		}
-
-		t = *getinarg(on.Type)
-		if t != nil {
-			t = t.Type
-		}
-		if t != nil {
-			t = t.Type
-		}
-
-		if !Eqtype(t, n.Type) {
-			n = Nod(OCONV, n, nil)
-			n.Type = t
-		}
-
-		r = Nod(OCALL, on, nil)
-		r.List = list1(n)
-		calls = list(calls, r)
-	}
-
-	if op == OPRINTN {
-		calls = list(calls, mkcall("printnl", nil, nil))
-	}
-
-	calls = list(calls, mkcall("printunlock", nil, init))
-
-	typechecklist(calls, Etop)
-	walkexprlist(calls, init)
-
-	r = Nod(OEMPTY, nil, nil)
-	typecheck(&r, Etop)
-	walkexpr(&r, init)
-	r.Ninit = calls
-	return r
-}
-
-func callnew(t *Type) *Node {
-	dowidth(t)
-	fn := syslook("newobject", 1)
-	substArgTypes(fn, t)
-	return mkcall1(fn, Ptrto(t), nil, typename(t))
-}
-
-func iscallret(n *Node) bool {
-	n = outervalue(n)
-	return n.Op == OINDREG && n.Reg == int16(Thearch.REGSP)
-}
-
-func isstack(n *Node) bool {
-	n = outervalue(n)
-
-	// If n is *autotmp and autotmp = &foo, replace n with foo.
-	// We introduce such temps when initializing struct literals.
-	if n.Op == OIND && n.Left.Op == ONAME && strings.HasPrefix(n.Left.Sym.Name, "autotmp_") {
-		defn := n.Left.Name.Defn
-		if defn != nil && defn.Op == OAS && defn.Right.Op == OADDR {
-			n = defn.Right.Left
-		}
-	}
-
-	switch n.Op {
-	case OINDREG:
-		return n.Reg == int16(Thearch.REGSP)
-
-	case ONAME:
-		switch n.Class {
-		case PAUTO, PPARAM, PPARAMOUT:
-			return true
-		}
-	}
-
-	return false
-}
-
-func isglobal(n *Node) bool {
-	n = outervalue(n)
-
-	switch n.Op {
-	case ONAME:
-		switch n.Class {
-		case PEXTERN:
-			return true
-		}
-	}
-
-	return false
-}
-
-// Do we need a write barrier for the assignment l = r?
-func needwritebarrier(l *Node, r *Node) bool {
-	if use_writebarrier == 0 {
-		return false
-	}
-
-	if l == nil || isblank(l) {
-		return false
-	}
-
-	// No write barrier for write of non-pointers.
-	dowidth(l.Type)
-
-	if !haspointers(l.Type) {
-		return false
-	}
-
-	// No write barrier for write to stack.
-	if isstack(l) {
-		return false
-	}
-
-	// No write barrier for implicit zeroing.
-	if r == nil {
-		return false
-	}
-
-	// Ignore no-op conversions when making decision.
-	// Ensures that xp = unsafe.Pointer(&x) is treated
-	// the same as xp = &x.
-	for r.Op == OCONVNOP {
-		r = r.Left
-	}
-
-	// No write barrier for zeroing or initialization to constant.
-	if iszero(r) || r.Op == OLITERAL {
-		return false
-	}
-
-	// No write barrier for storing static (read-only) data.
-	if r.Op == ONAME && strings.HasPrefix(r.Sym.Name, "statictmp_") {
-		return false
-	}
-
-	// No write barrier for storing address of stack values,
-	// which are guaranteed only to be written to the stack.
-	if r.Op == OADDR && isstack(r.Left) {
-		return false
-	}
-
-	// No write barrier for storing address of global, which
-	// is live no matter what.
-	if r.Op == OADDR && isglobal(r.Left) {
-		return false
-	}
-
-	// Otherwise, be conservative and use write barrier.
-	return true
-}
-
-// TODO(rsc): Perhaps componentgen should run before this.
-
-var applywritebarrier_bv Bvec
-
-func applywritebarrier(n *Node, init **NodeList) *Node {
-	if n.Left != nil && n.Right != nil && needwritebarrier(n.Left, n.Right) {
-		if Debug_wb > 1 {
-			Warnl(int(n.Lineno), "marking %v for barrier", Nconv(n.Left, 0))
-		}
-		n.Op = OASWB
-		return n
-	}
-	return n
-}
-
-func convas(n *Node, init **NodeList) *Node {
-	if n.Op != OAS {
-		Fatal("convas: not OAS %v", Oconv(int(n.Op), 0))
-	}
-
-	n.Typecheck = 1
-
-	var lt *Type
-	var rt *Type
-	if n.Left == nil || n.Right == nil {
-		goto out
-	}
-
-	lt = n.Left.Type
-	rt = n.Right.Type
-	if lt == nil || rt == nil {
-		goto out
-	}
-
-	if isblank(n.Left) {
-		defaultlit(&n.Right, nil)
-		goto out
-	}
-
-	if n.Left.Op == OINDEXMAP {
-		map_ := n.Left.Left
-		key := n.Left.Right
-		val := n.Right
-		walkexpr(&map_, init)
-		walkexpr(&key, init)
-		walkexpr(&val, init)
-
-		// orderexpr made sure key and val are addressable.
-		key = Nod(OADDR, key, nil)
-
-		val = Nod(OADDR, val, nil)
-		n = mkcall1(mapfn("mapassign1", map_.Type), nil, init, typename(map_.Type), map_, key, val)
-		goto out
-	}
-
-	if !Eqtype(lt, rt) {
-		n.Right = assignconv(n.Right, lt, "assignment")
-		walkexpr(&n.Right, init)
-	}
-
-out:
-	ullmancalc(n)
-	return n
-}
-
-/*
- * from ascompat[te]
- * evaluating actual function arguments.
- *	f(a,b)
- * if there is exactly one function expr,
- * then it is done first. otherwise must
- * make temp variables
- */
-func reorder1(all *NodeList) *NodeList {
-	var n *Node
-
-	c := 0 // function calls
-	t := 0 // total parameters
-
-	for l := all; l != nil; l = l.Next {
-		n = l.N
-		t++
-		ullmancalc(n)
-		if n.Ullman >= UINF {
-			c++
-		}
-	}
-
-	if c == 0 || t == 1 {
-		return all
-	}
-
-	var g *NodeList // fncalls assigned to tempnames
-	var f *Node     // last fncall assigned to stack
-	var r *NodeList // non fncalls and tempnames assigned to stack
-	d := 0
-	var a *Node
-	for l := all; l != nil; l = l.Next {
-		n = l.N
-		if n.Ullman < UINF {
-			r = list(r, n)
-			continue
-		}
-
-		d++
-		if d == c {
-			f = n
-			continue
-		}
-
-		// make assignment of fncall to tempname
-		a = temp(n.Right.Type)
-
-		a = Nod(OAS, a, n.Right)
-		g = list(g, a)
-
-		// put normal arg assignment on list
-		// with fncall replaced by tempname
-		n.Right = a.Left
-
-		r = list(r, n)
-	}
-
-	if f != nil {
-		g = list(g, f)
-	}
-	return concat(g, r)
-}
-
-/*
- * from ascompat[ee]
- *	a,b = c,d
- * simultaneous assignment. there cannot
- * be later use of an earlier lvalue.
- *
- * function calls have been removed.
- */
-func reorder3(all *NodeList) *NodeList {
-	var l *Node
-
-	// If a needed expression may be affected by an
-	// earlier assignment, make an early copy of that
-	// expression and use the copy instead.
-	var early *NodeList
-
-	var mapinit *NodeList
-	for list := all; list != nil; list = list.Next {
-		l = list.N.Left
-
-		// Save subexpressions needed on left side.
-		// Drill through non-dereferences.
-		for {
-			if l.Op == ODOT || l.Op == OPAREN {
-				l = l.Left
-				continue
-			}
-
-			if l.Op == OINDEX && Isfixedarray(l.Left.Type) {
-				reorder3save(&l.Right, all, list, &early)
-				l = l.Left
-				continue
-			}
-
-			break
-		}
-
-		switch l.Op {
-		default:
-			Fatal("reorder3 unexpected lvalue %v", Oconv(int(l.Op), obj.FmtSharp))
-
-		case ONAME:
-			break
-
-		case OINDEX, OINDEXMAP:
-			reorder3save(&l.Left, all, list, &early)
-			reorder3save(&l.Right, all, list, &early)
-			if l.Op == OINDEXMAP {
-				list.N = convas(list.N, &mapinit)
-			}
-
-		case OIND, ODOTPTR:
-			reorder3save(&l.Left, all, list, &early)
-		}
-
-		// Save expression on right side.
-		reorder3save(&list.N.Right, all, list, &early)
-	}
-
-	early = concat(mapinit, early)
-	return concat(early, all)
-}
-
-/*
- * if the evaluation of *np would be affected by the
- * assignments in all up to but not including stop,
- * copy into a temporary during *early and
- * replace *np with that temp.
- */
-func reorder3save(np **Node, all *NodeList, stop *NodeList, early **NodeList) {
-	n := *np
-	if !aliased(n, all, stop) {
-		return
-	}
-
-	q := temp(n.Type)
-	q = Nod(OAS, q, n)
-	typecheck(&q, Etop)
-	*early = list(*early, q)
-	*np = q.Left
-}
-
-/*
- * what's the outer value that a write to n affects?
- * outer value means containing struct or array.
- */
-func outervalue(n *Node) *Node {
-	for {
-		if n.Op == OXDOT {
-			Fatal("OXDOT in walk")
-		}
-		if n.Op == ODOT || n.Op == OPAREN || n.Op == OCONVNOP {
-			n = n.Left
-			continue
-		}
-
-		if n.Op == OINDEX && Isfixedarray(n.Left.Type) {
-			n = n.Left
-			continue
-		}
-
-		break
-	}
-
-	return n
-}
-
-/*
- * Is it possible that the computation of n might be
- * affected by writes in as up to but not including stop?
- */
-func aliased(n *Node, all *NodeList, stop *NodeList) bool {
-	if n == nil {
-		return false
-	}
-
-	// Look for obvious aliasing: a variable being assigned
-	// during the all list and appearing in n.
-	// Also record whether there are any writes to main memory.
-	// Also record whether there are any writes to variables
-	// whose addresses have been taken.
-	memwrite := 0
-
-	varwrite := 0
-	var a *Node
-	for l := all; l != stop; l = l.Next {
-		a = outervalue(l.N.Left)
-		if a.Op != ONAME {
-			memwrite = 1
-			continue
-		}
-
-		switch n.Class {
-		default:
-			varwrite = 1
-			continue
-
-		case PAUTO, PPARAM, PPARAMOUT:
-			if n.Addrtaken {
-				varwrite = 1
-				continue
-			}
-
-			if vmatch2(a, n) {
-				// Direct hit.
-				return true
-			}
-		}
-	}
-
-	// The variables being written do not appear in n.
-	// However, n might refer to computed addresses
-	// that are being written.
-
-	// If no computed addresses are affected by the writes, no aliasing.
-	if memwrite == 0 && varwrite == 0 {
-		return false
-	}
-
-	// If n does not refer to computed addresses
-	// (that is, if n only refers to variables whose addresses
-	// have not been taken), no aliasing.
-	if varexpr(n) {
-		return false
-	}
-
-	// Otherwise, both the writes and n refer to computed memory addresses.
-	// Assume that they might conflict.
-	return true
-}
-
-/*
- * does the evaluation of n only refer to variables
- * whose addresses have not been taken?
- * (and no other memory)
- */
-func varexpr(n *Node) bool {
-	if n == nil {
-		return true
-	}
-
-	switch n.Op {
-	case OLITERAL:
-		return true
-
-	case ONAME:
-		switch n.Class {
-		case PAUTO, PPARAM, PPARAMOUT:
-			if !n.Addrtaken {
-				return true
-			}
-		}
-
-		return false
-
-	case OADD,
-		OSUB,
-		OOR,
-		OXOR,
-		OMUL,
-		ODIV,
-		OMOD,
-		OLSH,
-		ORSH,
-		OAND,
-		OANDNOT,
-		OPLUS,
-		OMINUS,
-		OCOM,
-		OPAREN,
-		OANDAND,
-		OOROR,
-		ODOT, // but not ODOTPTR
-		OCONV,
-		OCONVNOP,
-		OCONVIFACE,
-		ODOTTYPE:
-		return varexpr(n.Left) && varexpr(n.Right)
-	}
-
-	// Be conservative.
-	return false
-}
-
-/*
- * is the name l mentioned in r?
- */
-func vmatch2(l *Node, r *Node) bool {
-	if r == nil {
-		return false
-	}
-	switch r.Op {
-	// match each right given left
-	case ONAME:
-		return l == r
-
-	case OLITERAL:
-		return false
-	}
-
-	if vmatch2(l, r.Left) {
-		return true
-	}
-	if vmatch2(l, r.Right) {
-		return true
-	}
-	for ll := r.List; ll != nil; ll = ll.Next {
-		if vmatch2(l, ll.N) {
-			return true
-		}
-	}
-	return false
-}
-
-/*
- * is any name mentioned in l also mentioned in r?
- * called by sinit.go
- */
-func vmatch1(l *Node, r *Node) bool {
-	/*
-	 * isolate all left sides
-	 */
-	if l == nil || r == nil {
-		return false
-	}
-	switch l.Op {
-	case ONAME:
-		switch l.Class {
-		case PPARAM, PPARAMREF, PAUTO:
-			break
-
-			// assignment to non-stack variable
-		// must be delayed if right has function calls.
-		default:
-			if r.Ullman >= UINF {
-				return true
-			}
-		}
-
-		return vmatch2(l, r)
-
-	case OLITERAL:
-		return false
-	}
-
-	if vmatch1(l.Left, r) {
-		return true
-	}
-	if vmatch1(l.Right, r) {
-		return true
-	}
-	for ll := l.List; ll != nil; ll = ll.Next {
-		if vmatch1(ll.N, r) {
-			return true
-		}
-	}
-	return false
-}
-
-/*
- * walk through argin parameters.
- * generate and return code to allocate
- * copies of escaped parameters to the heap.
- */
-func paramstoheap(argin **Type, out int) *NodeList {
-	var savet Iter
-	var v *Node
-	var as *Node
-
-	var nn *NodeList
-	for t := Structfirst(&savet, argin); t != nil; t = structnext(&savet) {
-		v = t.Nname
-		if v != nil && v.Sym != nil && v.Sym.Name[0] == '~' && v.Sym.Name[1] == 'r' { // unnamed result
-			v = nil
-		}
-
-		// For precise stacks, the garbage collector assumes results
-		// are always live, so zero them always.
-		if out != 0 {
-			// Defer might stop a panic and show the
-			// return values as they exist at the time of panic.
-			// Make sure to zero them on entry to the function.
-			nn = list(nn, Nod(OAS, nodarg(t, 1), nil))
-		}
-
-		if v == nil || v.Class&PHEAP == 0 {
-			continue
-		}
-
-		// generate allocation & copying code
-		if compiling_runtime != 0 {
-			Yyerror("%v escapes to heap, not allowed in runtime.", v)
-		}
-		if prealloc[v] == nil {
-			prealloc[v] = callnew(v.Type)
-		}
-		nn = list(nn, Nod(OAS, v.Name.Heapaddr, prealloc[v]))
-		if v.Class&^PHEAP != PPARAMOUT {
-			as = Nod(OAS, v, v.Name.Param.Stackparam)
-			v.Name.Param.Stackparam.Typecheck = 1
-			typecheck(&as, Etop)
-			as = applywritebarrier(as, &nn)
-			nn = list(nn, as)
-		}
-	}
-
-	return nn
-}
-
-/*
- * walk through argout parameters copying back to stack
- */
-func returnsfromheap(argin **Type) *NodeList {
-	var savet Iter
-	var v *Node
-
-	var nn *NodeList
-	for t := Structfirst(&savet, argin); t != nil; t = structnext(&savet) {
-		v = t.Nname
-		if v == nil || v.Class != PHEAP|PPARAMOUT {
-			continue
-		}
-		nn = list(nn, Nod(OAS, v.Name.Param.Stackparam, v))
-	}
-
-	return nn
-}
-
-/*
- * take care of migrating any function in/out args
- * between the stack and the heap.  adds code to
- * curfn's before and after lists.
- */
-func heapmoves() {
-	lno := lineno
-	lineno = Curfn.Lineno
-	nn := paramstoheap(getthis(Curfn.Type), 0)
-	nn = concat(nn, paramstoheap(getinarg(Curfn.Type), 0))
-	nn = concat(nn, paramstoheap(Getoutarg(Curfn.Type), 1))
-	Curfn.Func.Enter = concat(Curfn.Func.Enter, nn)
-	lineno = Curfn.Func.Endlineno
-	Curfn.Func.Exit = returnsfromheap(Getoutarg(Curfn.Type))
-	lineno = lno
-}
-
-func vmkcall(fn *Node, t *Type, init **NodeList, va []*Node) *Node {
-	if fn.Type == nil || fn.Type.Etype != TFUNC {
-		Fatal("mkcall %v %v", fn, fn.Type)
-	}
-
-	var args *NodeList
-	n := fn.Type.Intuple
-	for i := 0; i < n; i++ {
-		args = list(args, va[i])
-	}
-
-	r := Nod(OCALL, fn, nil)
-	r.List = args
-	if fn.Type.Outtuple > 0 {
-		typecheck(&r, Erv|Efnstruct)
-	} else {
-		typecheck(&r, Etop)
-	}
-	walkexpr(&r, init)
-	r.Type = t
-	return r
-}
-
-func mkcall(name string, t *Type, init **NodeList, args ...*Node) *Node {
-	return vmkcall(syslook(name, 0), t, init, args)
-}
-
-func mkcall1(fn *Node, t *Type, init **NodeList, args ...*Node) *Node {
-	return vmkcall(fn, t, init, args)
-}
-
-func conv(n *Node, t *Type) *Node {
-	if Eqtype(n.Type, t) {
-		return n
-	}
-	n = Nod(OCONV, n, nil)
-	n.Type = t
-	typecheck(&n, Erv)
-	return n
-}
-
-func chanfn(name string, n int, t *Type) *Node {
-	if t.Etype != TCHAN {
-		Fatal("chanfn %v", t)
-	}
-	fn := syslook(name, 1)
-	switch n {
-	default:
-		Fatal("chanfn %d", n)
-	case 1:
-		substArgTypes(fn, t.Type)
-	case 2:
-		substArgTypes(fn, t.Type, t.Type)
-	}
-	return fn
-}
-
-func mapfn(name string, t *Type) *Node {
-	if t.Etype != TMAP {
-		Fatal("mapfn %v", t)
-	}
-	fn := syslook(name, 1)
-	substArgTypes(fn, t.Down, t.Type, t.Down, t.Type)
-	return fn
-}
-
-func mapfndel(name string, t *Type) *Node {
-	if t.Etype != TMAP {
-		Fatal("mapfn %v", t)
-	}
-	fn := syslook(name, 1)
-	substArgTypes(fn, t.Down, t.Type, t.Down)
-	return fn
-}
-
-func writebarrierfn(name string, l *Type, r *Type) *Node {
-	fn := syslook(name, 1)
-	substArgTypes(fn, l, r)
-	return fn
-}
-
-func addstr(n *Node, init **NodeList) *Node {
-	// orderexpr rewrote OADDSTR to have a list of strings.
-	c := count(n.List)
-
-	if c < 2 {
-		Yyerror("addstr count %d too small", c)
-	}
-
-	buf := nodnil()
-	if n.Esc == EscNone {
-		sz := int64(0)
-		for l := n.List; l != nil; l = l.Next {
-			if n.Op == OLITERAL {
-				sz += int64(len(n.Val().U.(string)))
-			}
-		}
-
-		// Don't allocate the buffer if the result won't fit.
-		if sz < tmpstringbufsize {
-			// Create temporary buffer for result string on stack.
-			t := aindex(Nodintconst(tmpstringbufsize), Types[TUINT8])
-
-			buf = Nod(OADDR, temp(t), nil)
-		}
-	}
-
-	// build list of string arguments
-	args := list1(buf)
-
-	for l := n.List; l != nil; l = l.Next {
-		args = list(args, conv(l.N, Types[TSTRING]))
-	}
-
-	var fn string
-	if c <= 5 {
-		// small numbers of strings use direct runtime helpers.
-		// note: orderexpr knows this cutoff too.
-		fn = fmt.Sprintf("concatstring%d", c)
-	} else {
-		// large numbers of strings are passed to the runtime as a slice.
-		fn = "concatstrings"
-
-		t := typ(TARRAY)
-		t.Type = Types[TSTRING]
-		t.Bound = -1
-		slice := Nod(OCOMPLIT, nil, typenod(t))
-		if prealloc[n] != nil {
-			prealloc[slice] = prealloc[n]
-		}
-		slice.List = args.Next // skip buf arg
-		args = list1(buf)
-		args = list(args, slice)
-		slice.Esc = EscNone
-	}
-
-	cat := syslook(fn, 1)
-	r := Nod(OCALL, cat, nil)
-	r.List = args
-	typecheck(&r, Erv)
-	walkexpr(&r, init)
-	r.Type = n.Type
-
-	return r
-}
-
-// expand append(l1, l2...) to
-//   init {
-//     s := l1
-//     if n := len(l1) + len(l2) - cap(s); n > 0 {
-//       s = growslice_n(s, n)
-//     }
-//     s = s[:len(l1)+len(l2)]
-//     memmove(&s[len(l1)], &l2[0], len(l2)*sizeof(T))
-//   }
-//   s
-//
-// l2 is allowed to be a string.
-func appendslice(n *Node, init **NodeList) *Node {
-	walkexprlistsafe(n.List, init)
-
-	// walkexprlistsafe will leave OINDEX (s[n]) alone if both s
-	// and n are name or literal, but those may index the slice we're
-	// modifying here.  Fix explicitly.
-	for l := n.List; l != nil; l = l.Next {
-		l.N = cheapexpr(l.N, init)
-	}
-
-	l1 := n.List.N
-	l2 := n.List.Next.N
-
-	s := temp(l1.Type) // var s []T
-	var l *NodeList
-	l = list(l, Nod(OAS, s, l1)) // s = l1
-
-	nt := temp(Types[TINT])
-
-	nif := Nod(OIF, nil, nil)
-
-	// n := len(s) + len(l2) - cap(s)
-	nif.Ninit = list1(Nod(OAS, nt, Nod(OSUB, Nod(OADD, Nod(OLEN, s, nil), Nod(OLEN, l2, nil)), Nod(OCAP, s, nil))))
-
-	nif.Left = Nod(OGT, nt, Nodintconst(0))
-
-	// instantiate growslice_n(Type*, []any, int) []any
-	fn := syslook("growslice_n", 1) //   growslice_n(<type>, old []T, n int64) (ret []T)
-	substArgTypes(fn, s.Type.Type, s.Type.Type)
-
-	// s = growslice_n(T, s, n)
-	nif.Nbody = list1(Nod(OAS, s, mkcall1(fn, s.Type, &nif.Ninit, typename(s.Type), s, nt)))
-
-	l = list(l, nif)
-
-	if haspointers(l1.Type.Type) {
-		// copy(s[len(l1):len(l1)+len(l2)], l2)
-		nptr1 := Nod(OSLICE, s, Nod(OKEY, Nod(OLEN, l1, nil), Nod(OADD, Nod(OLEN, l1, nil), Nod(OLEN, l2, nil))))
-
-		nptr1.Etype = 1
-		nptr2 := l2
-		fn := syslook("typedslicecopy", 1)
-		substArgTypes(fn, l1.Type, l2.Type)
-		nt := mkcall1(fn, Types[TINT], &l, typename(l1.Type.Type), nptr1, nptr2)
-		l = list(l, nt)
-	} else if flag_race != 0 {
-		// rely on runtime to instrument copy.
-		// copy(s[len(l1):len(l1)+len(l2)], l2)
-		nptr1 := Nod(OSLICE, s, Nod(OKEY, Nod(OLEN, l1, nil), Nod(OADD, Nod(OLEN, l1, nil), Nod(OLEN, l2, nil))))
-
-		nptr1.Etype = 1
-		nptr2 := l2
-		var fn *Node
-		if l2.Type.Etype == TSTRING {
-			fn = syslook("slicestringcopy", 1)
-		} else {
-			fn = syslook("slicecopy", 1)
-		}
-		substArgTypes(fn, l1.Type, l2.Type)
-		nt := mkcall1(fn, Types[TINT], &l, nptr1, nptr2, Nodintconst(s.Type.Type.Width))
-		l = list(l, nt)
-	} else {
-		// memmove(&s[len(l1)], &l2[0], len(l2)*sizeof(T))
-		nptr1 := Nod(OINDEX, s, Nod(OLEN, l1, nil))
-
-		nptr1.Bounded = true
-		nptr1 = Nod(OADDR, nptr1, nil)
-
-		nptr2 := Nod(OSPTR, l2, nil)
-
-		fn := syslook("memmove", 1)
-		substArgTypes(fn, s.Type.Type, s.Type.Type)
-
-		nwid := cheapexpr(conv(Nod(OLEN, l2, nil), Types[TUINTPTR]), &l)
-
-		nwid = Nod(OMUL, nwid, Nodintconst(s.Type.Type.Width))
-		nt := mkcall1(fn, nil, &l, nptr1, nptr2, nwid)
-		l = list(l, nt)
-	}
-
-	// s = s[:len(l1)+len(l2)]
-	nt = Nod(OADD, Nod(OLEN, l1, nil), Nod(OLEN, l2, nil))
-
-	nt = Nod(OSLICE, s, Nod(OKEY, nil, nt))
-	nt.Etype = 1
-	l = list(l, Nod(OAS, s, nt))
-
-	typechecklist(l, Etop)
-	walkstmtlist(l)
-	*init = concat(*init, l)
-	return s
-}
-
-// Rewrite append(src, x, y, z) so that any side effects in
-// x, y, z (including runtime panics) are evaluated in
-// initialization statements before the append.
-// For normal code generation, stop there and leave the
-// rest to cgen_append.
-//
-// For race detector, expand append(src, a [, b]* ) to
-//
-//   init {
-//     s := src
-//     const argc = len(args) - 1
-//     if cap(s) - len(s) < argc {
-//	    s = growslice(s, len(s)+argc)
-//     }
-//     n := len(s)
-//     s = s[:n+argc]
-//     s[n] = a
-//     s[n+1] = b
-//     ...
-//   }
-//   s
-func walkappend(n *Node, init **NodeList, dst *Node) *Node {
-	if !samesafeexpr(dst, n.List.N) {
-		l := n.List
-		l.N = safeexpr(l.N, init)
-		walkexpr(&l.N, init)
-	}
-	walkexprlistsafe(n.List.Next, init)
-
-	// walkexprlistsafe will leave OINDEX (s[n]) alone if both s
-	// and n are name or literal, but those may index the slice we're
-	// modifying here.  Fix explicitly.
-	// Using cheapexpr also makes sure that the evaluation
-	// of all arguments (and especially any panics) happen
-	// before we begin to modify the slice in a visible way.
-	for l := n.List.Next; l != nil; l = l.Next {
-		l.N = cheapexpr(l.N, init)
-	}
-
-	nsrc := n.List.N
-
-	// Resolve slice type of multi-valued return.
-	if Istype(nsrc.Type, TSTRUCT) {
-		nsrc.Type = nsrc.Type.Type.Type
-	}
-	argc := count(n.List) - 1
-	if argc < 1 {
-		return nsrc
-	}
-
-	// General case, with no function calls left as arguments.
-	// Leave for gen, except that race detector requires old form
-	if flag_race == 0 {
-		return n
-	}
-
-	var l *NodeList
-
-	ns := temp(nsrc.Type)
-	l = list(l, Nod(OAS, ns, nsrc)) // s = src
-
-	na := Nodintconst(int64(argc)) // const argc
-	nx := Nod(OIF, nil, nil)       // if cap(s) - len(s) < argc
-	nx.Left = Nod(OLT, Nod(OSUB, Nod(OCAP, ns, nil), Nod(OLEN, ns, nil)), na)
-
-	fn := syslook("growslice", 1) //   growslice(<type>, old []T, mincap int) (ret []T)
-	substArgTypes(fn, ns.Type.Type, ns.Type.Type)
-
-	nx.Nbody = list1(Nod(OAS, ns, mkcall1(fn, ns.Type, &nx.Ninit, typename(ns.Type), ns, Nod(OADD, Nod(OLEN, ns, nil), na))))
-
-	l = list(l, nx)
-
-	nn := temp(Types[TINT])
-	l = list(l, Nod(OAS, nn, Nod(OLEN, ns, nil))) // n = len(s)
-
-	nx = Nod(OSLICE, ns, Nod(OKEY, nil, Nod(OADD, nn, na))) // ...s[:n+argc]
-	nx.Etype = 1
-	l = list(l, Nod(OAS, ns, nx)) // s = s[:n+argc]
-
-	for a := n.List.Next; a != nil; a = a.Next {
-		nx = Nod(OINDEX, ns, nn) // s[n] ...
-		nx.Bounded = true
-		l = list(l, Nod(OAS, nx, a.N)) // s[n] = arg
-		if a.Next != nil {
-			l = list(l, Nod(OAS, nn, Nod(OADD, nn, Nodintconst(1)))) // n = n + 1
-		}
-	}
-
-	typechecklist(l, Etop)
-	walkstmtlist(l)
-	*init = concat(*init, l)
-	return ns
-}
-
-// Lower copy(a, b) to a memmove call or a runtime call.
-//
-// init {
-//   n := len(a)
-//   if n > len(b) { n = len(b) }
-//   memmove(a.ptr, b.ptr, n*sizeof(elem(a)))
-// }
-// n;
-//
-// Also works if b is a string.
-//
-func copyany(n *Node, init **NodeList, runtimecall int) *Node {
-	if haspointers(n.Left.Type.Type) {
-		fn := writebarrierfn("typedslicecopy", n.Left.Type, n.Right.Type)
-		return mkcall1(fn, n.Type, init, typename(n.Left.Type.Type), n.Left, n.Right)
-	}
-
-	if runtimecall != 0 {
-		var fn *Node
-		if n.Right.Type.Etype == TSTRING {
-			fn = syslook("slicestringcopy", 1)
-		} else {
-			fn = syslook("slicecopy", 1)
-		}
-		substArgTypes(fn, n.Left.Type, n.Right.Type)
-		return mkcall1(fn, n.Type, init, n.Left, n.Right, Nodintconst(n.Left.Type.Type.Width))
-	}
-
-	walkexpr(&n.Left, init)
-	walkexpr(&n.Right, init)
-	nl := temp(n.Left.Type)
-	nr := temp(n.Right.Type)
-	var l *NodeList
-	l = list(l, Nod(OAS, nl, n.Left))
-	l = list(l, Nod(OAS, nr, n.Right))
-
-	nfrm := Nod(OSPTR, nr, nil)
-	nto := Nod(OSPTR, nl, nil)
-
-	nlen := temp(Types[TINT])
-
-	// n = len(to)
-	l = list(l, Nod(OAS, nlen, Nod(OLEN, nl, nil)))
-
-	// if n > len(frm) { n = len(frm) }
-	nif := Nod(OIF, nil, nil)
-
-	nif.Left = Nod(OGT, nlen, Nod(OLEN, nr, nil))
-	nif.Nbody = list(nif.Nbody, Nod(OAS, nlen, Nod(OLEN, nr, nil)))
-	l = list(l, nif)
-
-	// Call memmove.
-	fn := syslook("memmove", 1)
-
-	substArgTypes(fn, nl.Type.Type, nl.Type.Type)
-	nwid := temp(Types[TUINTPTR])
-	l = list(l, Nod(OAS, nwid, conv(nlen, Types[TUINTPTR])))
-	nwid = Nod(OMUL, nwid, Nodintconst(nl.Type.Type.Width))
-	l = list(l, mkcall1(fn, nil, init, nto, nfrm, nwid))
-
-	typechecklist(l, Etop)
-	walkstmtlist(l)
-	*init = concat(*init, l)
-	return nlen
-}
-
-func eqfor(t *Type, needsize *int) *Node {
-	// Should only arrive here with large memory or
-	// a struct/array containing a non-memory field/element.
-	// Small memory is handled inline, and single non-memory
-	// is handled during type check (OCMPSTR etc).
-	a := algtype1(t, nil)
-
-	if a != AMEM && a != -1 {
-		Fatal("eqfor %v", t)
-	}
-
-	if a == AMEM {
-		n := syslook("memequal", 1)
-		substArgTypes(n, t, t)
-		*needsize = 1
-		return n
-	}
-
-	sym := typesymprefix(".eq", t)
-	n := newname(sym)
-	n.Class = PFUNC
-	ntype := Nod(OTFUNC, nil, nil)
-	ntype.List = list(ntype.List, Nod(ODCLFIELD, nil, typenod(Ptrto(t))))
-	ntype.List = list(ntype.List, Nod(ODCLFIELD, nil, typenod(Ptrto(t))))
-	ntype.Rlist = list(ntype.Rlist, Nod(ODCLFIELD, nil, typenod(Types[TBOOL])))
-	typecheck(&ntype, Etype)
-	n.Type = ntype.Type
-	*needsize = 0
-	return n
-}
-
-func countfield(t *Type) int {
-	n := 0
-	for t1 := t.Type; t1 != nil; t1 = t1.Down {
-		n++
-	}
-	return n
-}
-
-func walkcompare(np **Node, init **NodeList) {
-	n := *np
-
-	// Given interface value l and concrete value r, rewrite
-	//   l == r
-	// to
-	//   x, ok := l.(type(r)); ok && x == r
-	// Handle != similarly.
-	// This avoids the allocation that would be required
-	// to convert r to l for comparison.
-	var l *Node
-
-	var r *Node
-	if Isinter(n.Left.Type) && !Isinter(n.Right.Type) {
-		l = n.Left
-		r = n.Right
-	} else if !Isinter(n.Left.Type) && Isinter(n.Right.Type) {
-		l = n.Right
-		r = n.Left
-	}
-
-	if l != nil {
-		x := temp(r.Type)
-		ok := temp(Types[TBOOL])
-
-		// l.(type(r))
-		a := Nod(ODOTTYPE, l, nil)
-
-		a.Type = r.Type
-
-		// x, ok := l.(type(r))
-		expr := Nod(OAS2, nil, nil)
-
-		expr.List = list1(x)
-		expr.List = list(expr.List, ok)
-		expr.Rlist = list1(a)
-		typecheck(&expr, Etop)
-		walkexpr(&expr, init)
-
-		if n.Op == OEQ {
-			r = Nod(OANDAND, ok, Nod(OEQ, x, r))
-		} else {
-			r = Nod(OOROR, Nod(ONOT, ok, nil), Nod(ONE, x, r))
-		}
-		*init = list(*init, expr)
-		finishcompare(np, n, r, init)
-		return
-	}
-
-	// Must be comparison of array or struct.
-	// Otherwise back end handles it.
-	t := n.Left.Type
-
-	switch t.Etype {
-	default:
-		return
-
-	case TARRAY:
-		if Isslice(t) {
-			return
-		}
-
-	case TSTRUCT:
-		break
-	}
-
-	cmpl := n.Left
-	for cmpl != nil && cmpl.Op == OCONVNOP {
-		cmpl = cmpl.Left
-	}
-	cmpr := n.Right
-	for cmpr != nil && cmpr.Op == OCONVNOP {
-		cmpr = cmpr.Left
-	}
-
-	if !islvalue(cmpl) || !islvalue(cmpr) {
-		Fatal("arguments of comparison must be lvalues - %v %v", cmpl, cmpr)
-	}
-
-	l = temp(Ptrto(t))
-	a := Nod(OAS, l, Nod(OADDR, cmpl, nil))
-	a.Right.Etype = 1 // addr does not escape
-	typecheck(&a, Etop)
-	*init = list(*init, a)
-
-	r = temp(Ptrto(t))
-	a = Nod(OAS, r, Nod(OADDR, cmpr, nil))
-	a.Right.Etype = 1 // addr does not escape
-	typecheck(&a, Etop)
-	*init = list(*init, a)
-
-	andor := OANDAND
-	if n.Op == ONE {
-		andor = OOROR
-	}
-
-	var expr *Node
-	if t.Etype == TARRAY && t.Bound <= 4 && issimple[t.Type.Etype] {
-		// Four or fewer elements of a basic type.
-		// Unroll comparisons.
-		var li *Node
-		var ri *Node
-		for i := 0; int64(i) < t.Bound; i++ {
-			li = Nod(OINDEX, l, Nodintconst(int64(i)))
-			ri = Nod(OINDEX, r, Nodintconst(int64(i)))
-			a = Nod(int(n.Op), li, ri)
-			if expr == nil {
-				expr = a
-			} else {
-				expr = Nod(andor, expr, a)
-			}
-		}
-
-		if expr == nil {
-			expr = Nodbool(n.Op == OEQ)
-		}
-		finishcompare(np, n, expr, init)
-		return
-	}
-
-	if t.Etype == TSTRUCT && countfield(t) <= 4 {
-		// Struct of four or fewer fields.
-		// Inline comparisons.
-		var li *Node
-		var ri *Node
-		for t1 := t.Type; t1 != nil; t1 = t1.Down {
-			if isblanksym(t1.Sym) {
-				continue
-			}
-			li = Nod(OXDOT, l, newname(t1.Sym))
-			ri = Nod(OXDOT, r, newname(t1.Sym))
-			a = Nod(int(n.Op), li, ri)
-			if expr == nil {
-				expr = a
-			} else {
-				expr = Nod(andor, expr, a)
-			}
-		}
-
-		if expr == nil {
-			expr = Nodbool(n.Op == OEQ)
-		}
-		finishcompare(np, n, expr, init)
-		return
-	}
-
-	// Chose not to inline.  Call equality function directly.
-	var needsize int
-	call := Nod(OCALL, eqfor(t, &needsize), nil)
-
-	call.List = list(call.List, l)
-	call.List = list(call.List, r)
-	if needsize != 0 {
-		call.List = list(call.List, Nodintconst(t.Width))
-	}
-	r = call
-	if n.Op != OEQ {
-		r = Nod(ONOT, r, nil)
-	}
-
-	finishcompare(np, n, r, init)
-	return
-}
-
-func finishcompare(np **Node, n, r *Node, init **NodeList) {
-	// Using np here to avoid passing &r to typecheck.
-	*np = r
-	typecheck(np, Erv)
-	walkexpr(np, init)
-	r = *np
-	if r.Type != n.Type {
-		r = Nod(OCONVNOP, r, nil)
-		r.Type = n.Type
-		r.Typecheck = 1
-		*np = r
-	}
-}
-
-func samecheap(a *Node, b *Node) bool {
-	var ar *Node
-	var br *Node
-	for a != nil && b != nil && a.Op == b.Op {
-		switch a.Op {
-		default:
-			return false
-
-		case ONAME:
-			return a == b
-
-		case ODOT, ODOTPTR:
-			ar = a.Right
-			br = b.Right
-			if ar.Op != ONAME || br.Op != ONAME || ar.Sym != br.Sym {
-				return false
-			}
-
-		case OINDEX:
-			ar = a.Right
-			br = b.Right
-			if !Isconst(ar, CTINT) || !Isconst(br, CTINT) || Mpcmpfixfix(ar.Val().U.(*Mpint), br.Val().U.(*Mpint)) != 0 {
-				return false
-			}
-		}
-
-		a = a.Left
-		b = b.Left
-	}
-
-	return false
-}
-
-func walkrotate(np **Node) {
-	if Thearch.Thechar == '7' || Thearch.Thechar == '9' {
-		return
-	}
-
-	n := *np
-
-	// Want << | >> or >> | << or << ^ >> or >> ^ << on unsigned value.
-	l := n.Left
-
-	r := n.Right
-	if (n.Op != OOR && n.Op != OXOR) || (l.Op != OLSH && l.Op != ORSH) || (r.Op != OLSH && r.Op != ORSH) || n.Type == nil || Issigned[n.Type.Etype] || l.Op == r.Op {
-		return
-	}
-
-	// Want same, side effect-free expression on lhs of both shifts.
-	if !samecheap(l.Left, r.Left) {
-		return
-	}
-
-	// Constants adding to width?
-	w := int(l.Type.Width * 8)
-
-	if Smallintconst(l.Right) && Smallintconst(r.Right) {
-		sl := int(Mpgetfix(l.Right.Val().U.(*Mpint)))
-		if sl >= 0 {
-			sr := int(Mpgetfix(r.Right.Val().U.(*Mpint)))
-			if sr >= 0 && sl+sr == w {
-				// Rewrite left shift half to left rotate.
-				if l.Op == OLSH {
-					n = l
-				} else {
-					n = r
-				}
-				n.Op = OLROT
-
-				// Remove rotate 0 and rotate w.
-				s := int(Mpgetfix(n.Right.Val().U.(*Mpint)))
-
-				if s == 0 || s == w {
-					n = n.Left
-				}
-
-				*np = n
-				return
-			}
-		}
-		return
-	}
-
-	// TODO: Could allow s and 32-s if s is bounded (maybe s&31 and 32-s&31).
-	return
-}
-
-/*
- * walkmul rewrites integer multiplication by powers of two as shifts.
- */
-func walkmul(np **Node, init **NodeList) {
-	n := *np
-	if !Isint[n.Type.Etype] {
-		return
-	}
-
-	var nr *Node
-	var nl *Node
-	if n.Right.Op == OLITERAL {
-		nl = n.Left
-		nr = n.Right
-	} else if n.Left.Op == OLITERAL {
-		nl = n.Right
-		nr = n.Left
-	} else {
-		return
-	}
-
-	neg := 0
-
-	// x*0 is 0 (and side effects of x).
-	var pow int
-	var w int
-	if Mpgetfix(nr.Val().U.(*Mpint)) == 0 {
-		cheapexpr(nl, init)
-		Nodconst(n, n.Type, 0)
-		goto ret
-	}
-
-	// nr is a constant.
-	pow = powtwo(nr)
-
-	if pow < 0 {
-		return
-	}
-	if pow >= 1000 {
-		// negative power of 2, like -16
-		neg = 1
-
-		pow -= 1000
-	}
-
-	w = int(nl.Type.Width * 8)
-	if pow+1 >= w { // too big, shouldn't happen
-		return
-	}
-
-	nl = cheapexpr(nl, init)
-
-	if pow == 0 {
-		// x*1 is x
-		n = nl
-
-		goto ret
-	}
-
-	n = Nod(OLSH, nl, Nodintconst(int64(pow)))
-
-ret:
-	if neg != 0 {
-		n = Nod(OMINUS, n, nil)
-	}
-
-	typecheck(&n, Erv)
-	walkexpr(&n, init)
-	*np = n
-}
-
-/*
- * walkdiv rewrites division by a constant as less expensive
- * operations.
- */
-func walkdiv(np **Node, init **NodeList) {
-	// if >= 0, nr is 1<<pow // 1 if nr is negative.
-
-	// TODO(minux)
-	if Thearch.Thechar == '7' || Thearch.Thechar == '9' {
-		return
-	}
-
-	n := *np
-	if n.Right.Op != OLITERAL {
-		return
-	}
-
-	// nr is a constant.
-	nl := cheapexpr(n.Left, init)
-
-	nr := n.Right
-
-	// special cases of mod/div
-	// by a constant
-	w := int(nl.Type.Width * 8)
-
-	s := 0            // 1 if nr is negative.
-	pow := powtwo(nr) // if >= 0, nr is 1<<pow
-	if pow >= 1000 {
-		// negative power of 2
-		s = 1
-
-		pow -= 1000
-	}
-
-	if pow+1 >= w {
-		// divisor too large.
-		return
-	}
-
-	if pow < 0 {
-		// try to do division by multiply by (2^w)/d
-		// see hacker's delight chapter 10
-		// TODO: support 64-bit magic multiply here.
-		var m Magic
-		m.W = w
-
-		if Issigned[nl.Type.Etype] {
-			m.Sd = Mpgetfix(nr.Val().U.(*Mpint))
-			Smagic(&m)
-		} else {
-			m.Ud = uint64(Mpgetfix(nr.Val().U.(*Mpint)))
-			Umagic(&m)
-		}
-
-		if m.Bad != 0 {
-			return
-		}
-
-		// We have a quick division method so use it
-		// for modulo too.
-		if n.Op == OMOD {
-			// rewrite as A%B = A - (A/B*B).
-			n1 := Nod(ODIV, nl, nr)
-
-			n2 := Nod(OMUL, n1, nr)
-			n = Nod(OSUB, nl, n2)
-			goto ret
-		}
-
-		switch Simtype[nl.Type.Etype] {
-		default:
-			return
-
-			// n1 = nl * magic >> w (HMUL)
-		case TUINT8, TUINT16, TUINT32:
-			nc := Nod(OXXX, nil, nil)
-
-			Nodconst(nc, nl.Type, int64(m.Um))
-			n1 := Nod(OHMUL, nl, nc)
-			typecheck(&n1, Erv)
-			if m.Ua != 0 {
-				// Select a Go type with (at least) twice the width.
-				var twide *Type
-				switch Simtype[nl.Type.Etype] {
-				default:
-					return
-
-				case TUINT8, TUINT16:
-					twide = Types[TUINT32]
-
-				case TUINT32:
-					twide = Types[TUINT64]
-
-				case TINT8, TINT16:
-					twide = Types[TINT32]
-
-				case TINT32:
-					twide = Types[TINT64]
-				}
-
-				// add numerator (might overflow).
-				// n2 = (n1 + nl)
-				n2 := Nod(OADD, conv(n1, twide), conv(nl, twide))
-
-				// shift by m.s
-				nc := Nod(OXXX, nil, nil)
-
-				Nodconst(nc, Types[TUINT], int64(m.S))
-				n = conv(Nod(ORSH, n2, nc), nl.Type)
-			} else {
-				// n = n1 >> m.s
-				nc := Nod(OXXX, nil, nil)
-
-				Nodconst(nc, Types[TUINT], int64(m.S))
-				n = Nod(ORSH, n1, nc)
-			}
-
-			// n1 = nl * magic >> w
-		case TINT8, TINT16, TINT32:
-			nc := Nod(OXXX, nil, nil)
-
-			Nodconst(nc, nl.Type, m.Sm)
-			n1 := Nod(OHMUL, nl, nc)
-			typecheck(&n1, Erv)
-			if m.Sm < 0 {
-				// add the numerator.
-				n1 = Nod(OADD, n1, nl)
-			}
-
-			// shift by m.s
-			nc = Nod(OXXX, nil, nil)
-
-			Nodconst(nc, Types[TUINT], int64(m.S))
-			n2 := conv(Nod(ORSH, n1, nc), nl.Type)
-
-			// add 1 iff n1 is negative.
-			nc = Nod(OXXX, nil, nil)
-
-			Nodconst(nc, Types[TUINT], int64(w)-1)
-			n3 := Nod(ORSH, nl, nc) // n4 = -1 iff n1 is negative.
-			n = Nod(OSUB, n2, n3)
-
-			// apply sign.
-			if m.Sd < 0 {
-				n = Nod(OMINUS, n, nil)
-			}
-		}
-
-		goto ret
-	}
-
-	switch pow {
-	case 0:
-		if n.Op == OMOD {
-			// nl % 1 is zero.
-			Nodconst(n, n.Type, 0)
-		} else if s != 0 {
-			// divide by -1
-			n.Op = OMINUS
-
-			n.Right = nil
-		} else {
-			// divide by 1
-			n = nl
-		}
-
-	default:
-		if Issigned[n.Type.Etype] {
-			if n.Op == OMOD {
-				// signed modulo 2^pow is like ANDing
-				// with the last pow bits, but if nl < 0,
-				// nl & (2^pow-1) is (nl+1)%2^pow - 1.
-				nc := Nod(OXXX, nil, nil)
-
-				Nodconst(nc, Types[Simtype[TUINT]], int64(w)-1)
-				n1 := Nod(ORSH, nl, nc) // n1 = -1 iff nl < 0.
-				if pow == 1 {
-					typecheck(&n1, Erv)
-					n1 = cheapexpr(n1, init)
-
-					// n = (nl+ε)&1 -ε where ε=1 iff nl<0.
-					n2 := Nod(OSUB, nl, n1)
-
-					nc := Nod(OXXX, nil, nil)
-					Nodconst(nc, nl.Type, 1)
-					n3 := Nod(OAND, n2, nc)
-					n = Nod(OADD, n3, n1)
-				} else {
-					// n = (nl+ε)&(nr-1) - ε where ε=2^pow-1 iff nl<0.
-					nc := Nod(OXXX, nil, nil)
-
-					Nodconst(nc, nl.Type, (1<<uint(pow))-1)
-					n2 := Nod(OAND, n1, nc) // n2 = 2^pow-1 iff nl<0.
-					typecheck(&n2, Erv)
-					n2 = cheapexpr(n2, init)
-
-					n3 := Nod(OADD, nl, n2)
-					n4 := Nod(OAND, n3, nc)
-					n = Nod(OSUB, n4, n2)
-				}
-
-				break
-			} else {
-				// arithmetic right shift does not give the correct rounding.
-				// if nl >= 0, nl >> n == nl / nr
-				// if nl < 0, we want to add 2^n-1 first.
-				nc := Nod(OXXX, nil, nil)
-
-				Nodconst(nc, Types[Simtype[TUINT]], int64(w)-1)
-				n1 := Nod(ORSH, nl, nc) // n1 = -1 iff nl < 0.
-				if pow == 1 {
-					// nl+1 is nl-(-1)
-					n.Left = Nod(OSUB, nl, n1)
-				} else {
-					// Do a logical right right on -1 to keep pow bits.
-					nc := Nod(OXXX, nil, nil)
-
-					Nodconst(nc, Types[Simtype[TUINT]], int64(w)-int64(pow))
-					n2 := Nod(ORSH, conv(n1, tounsigned(nl.Type)), nc)
-					n.Left = Nod(OADD, nl, conv(n2, nl.Type))
-				}
-
-				// n = (nl + 2^pow-1) >> pow
-				n.Op = ORSH
-
-				nc = Nod(OXXX, nil, nil)
-				Nodconst(nc, Types[Simtype[TUINT]], int64(pow))
-				n.Right = nc
-				n.Typecheck = 0
-			}
-
-			if s != 0 {
-				n = Nod(OMINUS, n, nil)
-			}
-			break
-		}
-
-		nc := Nod(OXXX, nil, nil)
-		if n.Op == OMOD {
-			// n = nl & (nr-1)
-			n.Op = OAND
-
-			Nodconst(nc, nl.Type, Mpgetfix(nr.Val().U.(*Mpint))-1)
-		} else {
-			// n = nl >> pow
-			n.Op = ORSH
-
-			Nodconst(nc, Types[Simtype[TUINT]], int64(pow))
-		}
-
-		n.Typecheck = 0
-		n.Right = nc
-	}
-
-	goto ret
-
-ret:
-	typecheck(&n, Erv)
-	walkexpr(&n, init)
-	*np = n
-}
-
-// return 1 if integer n must be in range [0, max), 0 otherwise
-func bounded(n *Node, max int64) bool {
-	if n.Type == nil || !Isint[n.Type.Etype] {
-		return false
-	}
-
-	sign := Issigned[n.Type.Etype]
-	bits := int32(8 * n.Type.Width)
-
-	if Smallintconst(n) {
-		v := Mpgetfix(n.Val().U.(*Mpint))
-		return 0 <= v && v < max
-	}
-
-	switch n.Op {
-	case OAND:
-		v := int64(-1)
-		if Smallintconst(n.Left) {
-			v = Mpgetfix(n.Left.Val().U.(*Mpint))
-		} else if Smallintconst(n.Right) {
-			v = Mpgetfix(n.Right.Val().U.(*Mpint))
-		}
-
-		if 0 <= v && v < max {
-			return true
-		}
-
-	case OMOD:
-		if !sign && Smallintconst(n.Right) {
-			v := Mpgetfix(n.Right.Val().U.(*Mpint))
-			if 0 <= v && v <= max {
-				return true
-			}
-		}
-
-	case ODIV:
-		if !sign && Smallintconst(n.Right) {
-			v := Mpgetfix(n.Right.Val().U.(*Mpint))
-			for bits > 0 && v >= 2 {
-				bits--
-				v >>= 1
-			}
-		}
-
-	case ORSH:
-		if !sign && Smallintconst(n.Right) {
-			v := Mpgetfix(n.Right.Val().U.(*Mpint))
-			if v > int64(bits) {
-				return true
-			}
-			bits -= int32(v)
-		}
-	}
-
-	if !sign && bits <= 62 && 1<<uint(bits) <= max {
-		return true
-	}
-
-	return false
-}
-
-func usefield(n *Node) {
-	if obj.Fieldtrack_enabled == 0 {
-		return
-	}
-
-	switch n.Op {
-	default:
-		Fatal("usefield %v", Oconv(int(n.Op), 0))
-
-	case ODOT, ODOTPTR:
-		break
-	}
-
-	t := n.Left.Type
-	if Isptr[t.Etype] {
-		t = t.Type
-	}
-	field := dotField[typeSym{t.Orig, n.Right.Sym}]
-	if field == nil {
-		Fatal("usefield %v %v without paramfld", n.Left.Type, n.Right.Sym)
-	}
-	if field.Note == nil || !strings.Contains(*field.Note, "go:\"track\"") {
-		return
-	}
-
-	// dedup on list
-	if field.Lastfn == Curfn {
-		return
-	}
-	field.Lastfn = Curfn
-	field.Outer = n.Left.Type
-	if Isptr[field.Outer.Etype] {
-		field.Outer = field.Outer.Type
-	}
-	if field.Outer.Sym == nil {
-		Yyerror("tracked field must be in named struct type")
-	}
-	if !exportname(field.Sym.Name) {
-		Yyerror("tracked field must be exported (upper case)")
-	}
-
-	Curfn.Func.Fieldtrack = append(Curfn.Func.Fieldtrack, field)
-}
-
-func candiscardlist(l *NodeList) bool {
-	for ; l != nil; l = l.Next {
-		if !candiscard(l.N) {
-			return false
-		}
-	}
-	return true
-}
-
-func candiscard(n *Node) bool {
-	if n == nil {
-		return true
-	}
-
-	switch n.Op {
-	default:
-		return false
-
-		// Discardable as long as the subpieces are.
-	case ONAME,
-		ONONAME,
-		OTYPE,
-		OPACK,
-		OLITERAL,
-		OADD,
-		OSUB,
-		OOR,
-		OXOR,
-		OADDSTR,
-		OADDR,
-		OANDAND,
-		OARRAYBYTESTR,
-		OARRAYRUNESTR,
-		OSTRARRAYBYTE,
-		OSTRARRAYRUNE,
-		OCAP,
-		OCMPIFACE,
-		OCMPSTR,
-		OCOMPLIT,
-		OMAPLIT,
-		OSTRUCTLIT,
-		OARRAYLIT,
-		OPTRLIT,
-		OCONV,
-		OCONVIFACE,
-		OCONVNOP,
-		ODOT,
-		OEQ,
-		ONE,
-		OLT,
-		OLE,
-		OGT,
-		OGE,
-		OKEY,
-		OLEN,
-		OMUL,
-		OLSH,
-		ORSH,
-		OAND,
-		OANDNOT,
-		ONEW,
-		ONOT,
-		OCOM,
-		OPLUS,
-		OMINUS,
-		OOROR,
-		OPAREN,
-		ORUNESTR,
-		OREAL,
-		OIMAG,
-		OCOMPLEX:
-		break
-
-		// Discardable as long as we know it's not division by zero.
-	case ODIV, OMOD:
-		if Isconst(n.Right, CTINT) && mpcmpfixc(n.Right.Val().U.(*Mpint), 0) != 0 {
-			break
-		}
-		if Isconst(n.Right, CTFLT) && mpcmpfltc(n.Right.Val().U.(*Mpflt), 0) != 0 {
-			break
-		}
-		return false
-
-		// Discardable as long as we know it won't fail because of a bad size.
-	case OMAKECHAN, OMAKEMAP:
-		if Isconst(n.Left, CTINT) && mpcmpfixc(n.Left.Val().U.(*Mpint), 0) == 0 {
-			break
-		}
-		return false
-
-		// Difficult to tell what sizes are okay.
-	case OMAKESLICE:
-		return false
-	}
-
-	if !candiscard(n.Left) || !candiscard(n.Right) || !candiscardlist(n.Ninit) || !candiscardlist(n.Nbody) || !candiscardlist(n.List) || !candiscardlist(n.Rlist) {
-		return false
-	}
-
-	return true
-}
-
-// rewrite
-//	print(x, y, z)
-// into
-//	func(a1, a2, a3) {
-//		print(a1, a2, a3)
-//	}(x, y, z)
-// and same for println.
-
-var walkprintfunc_prgen int
-
-func walkprintfunc(np **Node, init **NodeList) {
-	n := *np
-
-	if n.Ninit != nil {
-		walkstmtlist(n.Ninit)
-		*init = concat(*init, n.Ninit)
-		n.Ninit = nil
-	}
-
-	t := Nod(OTFUNC, nil, nil)
-	num := 0
-	var printargs *NodeList
-	var a *Node
-	var buf string
-	for l := n.List; l != nil; l = l.Next {
-		buf = fmt.Sprintf("a%d", num)
-		num++
-		a = Nod(ODCLFIELD, newname(Lookup(buf)), typenod(l.N.Type))
-		t.List = list(t.List, a)
-		printargs = list(printargs, a.Left)
-	}
-
-	fn := Nod(ODCLFUNC, nil, nil)
-	walkprintfunc_prgen++
-	buf = fmt.Sprintf("print·%d", walkprintfunc_prgen)
-	fn.Func.Nname = newname(Lookup(buf))
-	fn.Func.Nname.Name.Defn = fn
-	fn.Func.Nname.Name.Param.Ntype = t
-	declare(fn.Func.Nname, PFUNC)
-
-	oldfn := Curfn
-	Curfn = nil
-	funchdr(fn)
-
-	a = Nod(int(n.Op), nil, nil)
-	a.List = printargs
-	typecheck(&a, Etop)
-	walkstmt(&a)
-
-	fn.Nbody = list1(a)
-
-	funcbody(fn)
-
-	typecheck(&fn, Etop)
-	typechecklist(fn.Nbody, Etop)
-	xtop = list(xtop, fn)
-	Curfn = oldfn
-
-	a = Nod(OCALL, nil, nil)
-	a.Left = fn.Func.Nname
-	a.List = n.List
-	typecheck(&a, Etop)
-	walkexpr(&a, init)
-	*np = a
-}
diff --git a/src/cmd/compile/internal/gc/y.go b/src/cmd/compile/internal/gc/y.go
deleted file mode 100644
index 2b61c07..0000000
--- a/src/cmd/compile/internal/gc/y.go
+++ /dev/null
@@ -1,3526 +0,0 @@
-//line go.y:21
-package gc
-
-import __yyfmt__ "fmt"
-
-//line go.y:21
-import (
-	"fmt"
-	"strings"
-)
-
-//line go.y:28
-type yySymType struct {
-	yys  int
-	node *Node
-	list *NodeList
-	typ  *Type
-	sym  *Sym
-	val  Val
-	i    int
-}
-
-const LLITERAL = 57346
-const LASOP = 57347
-const LCOLAS = 57348
-const LBREAK = 57349
-const LCASE = 57350
-const LCHAN = 57351
-const LCONST = 57352
-const LCONTINUE = 57353
-const LDDD = 57354
-const LDEFAULT = 57355
-const LDEFER = 57356
-const LELSE = 57357
-const LFALL = 57358
-const LFOR = 57359
-const LFUNC = 57360
-const LGO = 57361
-const LGOTO = 57362
-const LIF = 57363
-const LIMPORT = 57364
-const LINTERFACE = 57365
-const LMAP = 57366
-const LNAME = 57367
-const LPACKAGE = 57368
-const LRANGE = 57369
-const LRETURN = 57370
-const LSELECT = 57371
-const LSTRUCT = 57372
-const LSWITCH = 57373
-const LTYPE = 57374
-const LVAR = 57375
-const LANDAND = 57376
-const LANDNOT = 57377
-const LBODY = 57378
-const LCOMM = 57379
-const LDEC = 57380
-const LEQ = 57381
-const LGE = 57382
-const LGT = 57383
-const LIGNORE = 57384
-const LINC = 57385
-const LLE = 57386
-const LLSH = 57387
-const LLT = 57388
-const LNE = 57389
-const LOROR = 57390
-const LRSH = 57391
-const NotPackage = 57392
-const NotParen = 57393
-const PreferToRightParen = 57394
-
-var yyToknames = [...]string{
-	"$end",
-	"error",
-	"$unk",
-	"LLITERAL",
-	"LASOP",
-	"LCOLAS",
-	"LBREAK",
-	"LCASE",
-	"LCHAN",
-	"LCONST",
-	"LCONTINUE",
-	"LDDD",
-	"LDEFAULT",
-	"LDEFER",
-	"LELSE",
-	"LFALL",
-	"LFOR",
-	"LFUNC",
-	"LGO",
-	"LGOTO",
-	"LIF",
-	"LIMPORT",
-	"LINTERFACE",
-	"LMAP",
-	"LNAME",
-	"LPACKAGE",
-	"LRANGE",
-	"LRETURN",
-	"LSELECT",
-	"LSTRUCT",
-	"LSWITCH",
-	"LTYPE",
-	"LVAR",
-	"LANDAND",
-	"LANDNOT",
-	"LBODY",
-	"LCOMM",
-	"LDEC",
-	"LEQ",
-	"LGE",
-	"LGT",
-	"LIGNORE",
-	"LINC",
-	"LLE",
-	"LLSH",
-	"LLT",
-	"LNE",
-	"LOROR",
-	"LRSH",
-	"'+'",
-	"'-'",
-	"'|'",
-	"'^'",
-	"'*'",
-	"'/'",
-	"'%'",
-	"'&'",
-	"NotPackage",
-	"NotParen",
-	"'('",
-	"')'",
-	"PreferToRightParen",
-	"';'",
-	"'.'",
-	"'$'",
-	"'='",
-	"':'",
-	"'{'",
-	"'}'",
-	"'!'",
-	"'~'",
-	"'['",
-	"']'",
-	"'?'",
-	"'@'",
-	"','",
-}
-var yyStatenames = [...]string{}
-
-const yyEofCode = 1
-const yyErrCode = 2
-const yyMaxDepth = 200
-
-//line go.y:2308
-func fixlbrace(lbr int) {
-	// If the opening brace was an LBODY,
-	// set up for another one now that we're done.
-	// See comment in lex.C about loophack.
-	if lbr == LBODY {
-		loophack = 1
-	}
-}
-
-//line yacctab:1
-var yyExca = [...]int{
-	-1, 1,
-	1, -1,
-	-2, 0,
-	-1, 17,
-	1, 1,
-	63, 23,
-	-2, 0,
-	-1, 48,
-	6, 276,
-	66, 276,
-	76, 276,
-	-2, 49,
-	-1, 56,
-	67, 153,
-	-2, 162,
-	-1, 74,
-	60, 181,
-	-2, 215,
-	-1, 75,
-	60, 182,
-	-2, 183,
-	-1, 121,
-	60, 134,
-	64, 134,
-	68, 134,
-	72, 134,
-	-2, 266,
-	-1, 125,
-	60, 134,
-	64, 134,
-	68, 134,
-	72, 134,
-	-2, 267,
-	-1, 176,
-	2, 215,
-	36, 215,
-	60, 181,
-	68, 215,
-	-2, 173,
-	-1, 177,
-	36, 183,
-	60, 182,
-	68, 183,
-	-2, 174,
-	-1, 184,
-	63, 251,
-	69, 251,
-	-2, 0,
-	-1, 242,
-	63, 251,
-	69, 251,
-	-2, 0,
-	-1, 252,
-	8, 251,
-	13, 251,
-	63, 251,
-	69, 251,
-	-2, 0,
-	-1, 325,
-	4, 236,
-	63, 236,
-	69, 236,
-	-2, 157,
-	-1, 403,
-	67, 144,
-	-2, 142,
-	-1, 408,
-	36, 176,
-	60, 176,
-	68, 176,
-	-2, 167,
-	-1, 409,
-	36, 177,
-	60, 177,
-	68, 177,
-	-2, 168,
-	-1, 410,
-	36, 178,
-	60, 178,
-	68, 178,
-	-2, 169,
-	-1, 411,
-	36, 179,
-	60, 179,
-	68, 179,
-	-2, 170,
-	-1, 417,
-	8, 251,
-	13, 251,
-	63, 251,
-	69, 251,
-	-2, 0,
-	-1, 418,
-	63, 251,
-	69, 251,
-	-2, 0,
-	-1, 498,
-	63, 251,
-	69, 251,
-	-2, 0,
-	-1, 553,
-	60, 157,
-	-2, 318,
-	-1, 554,
-	60, 158,
-	-2, 317,
-	-1, 579,
-	8, 251,
-	13, 251,
-	63, 251,
-	69, 251,
-	-2, 0,
-	-1, 593,
-	36, 180,
-	60, 180,
-	68, 180,
-	-2, 171,
-	-1, 632,
-	67, 145,
-	-2, 143,
-}
-
-const yyNprod = 352
-const yyPrivate = 57344
-
-var yyTokenNames []string
-var yyStates []string
-
-const yyLast = 2321
-
-var yyAct = [...]int{
-
-	74, 304, 381, 291, 487, 611, 459, 285, 546, 229,
-	398, 467, 34, 296, 75, 302, 402, 550, 290, 186,
-	286, 479, 458, 356, 400, 401, 389, 338, 103, 318,
-	328, 245, 303, 339, 324, 243, 337, 468, 101, 374,
-	109, 104, 248, 85, 14, 246, 241, 174, 480, 212,
-	6, 181, 325, 155, 470, 469, 325, 385, 332, 517,
-	108, 627, 414, 373, 13, 208, 585, 11, 176, 461,
-	470, 172, 584, 461, 652, 600, 230, 219, 392, 191,
-	106, 322, 177, 542, 226, 322, 423, 321, 193, 88,
-	10, 321, 13, 192, 10, 310, 317, 309, 154, 160,
-	447, 12, 13, 161, 227, 12, 13, 446, 198, 227,
-	10, 162, 227, 320, 209, 227, 462, 384, 228, 663,
-	462, 626, 625, 228, 55, 460, 228, 155, 184, 228,
-	203, 628, 205, 633, 199, 200, 108, 632, 204, 12,
-	13, 222, 393, 12, 13, 86, 214, 216, 218, 90,
-	604, 239, 175, 10, 449, 194, 233, 88, 153, 12,
-	13, 176, 661, 213, 213, 213, 213, 288, 155, 282,
-	282, 601, 282, 537, 417, 177, 445, 280, 10, 176,
-	621, 528, 295, 163, 164, 165, 166, 167, 168, 169,
-	170, 227, 417, 177, 417, 301, 227, 227, 594, 227,
-	485, 88, 12, 13, 185, 228, 417, 524, 48, 308,
-	228, 228, 416, 228, 202, 347, 516, 90, 472, 448,
-	405, 428, 10, 242, 349, 171, 298, 12, 13, 345,
-	343, 341, 227, 581, 507, 330, 344, 507, 182, 508,
-	519, 397, 508, 348, 116, 175, 228, 367, 227, 334,
-	464, 227, 227, 360, 227, 129, 325, 355, 371, 210,
-	346, 90, 228, 175, 353, 228, 228, 362, 228, 182,
-	183, 12, 13, 54, 435, 314, 173, 10, 342, 358,
-	340, 13, 340, 340, 91, 379, 188, 378, 325, 380,
-	376, 331, 365, 375, 176, 623, 369, 394, 505, 417,
-	408, 183, 610, 163, 170, 12, 13, 605, 177, 410,
-	227, 227, 415, 238, 409, 118, 118, 602, 575, 126,
-	227, 569, 559, 331, 228, 228, 12, 13, 466, 465,
-	391, 444, 327, 443, 228, 437, 425, 12, 13, 254,
-	413, 388, 255, 256, 257, 258, 259, 260, 261, 262,
-	263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
-	273, 274, 129, 129, 277, 227, 440, 383, 370, 173,
-	366, 294, 359, 491, 227, 424, 411, 442, 175, 228,
-	10, 455, 493, 333, 454, 436, 100, 492, 228, 300,
-	99, 84, 10, 509, 176, 481, 282, 512, 474, 20,
-	657, 282, 656, 655, 499, 495, 614, 227, 177, 503,
-	654, 484, 10, 227, 340, 340, 234, 515, 520, 521,
-	646, 228, 620, 617, 227, 340, 608, 228, 221, 12,
-	13, 607, 511, 129, 526, 430, 433, 69, 228, 518,
-	227, 12, 13, 598, 597, 129, 596, 293, 96, 494,
-	525, 593, 583, 563, 228, 529, 98, 490, 540, 532,
-	94, 12, 13, 523, 514, 513, 510, 560, 538, 558,
-	97, 95, 330, 323, 329, 539, 497, 496, 175, 483,
-	555, 477, 227, 476, 10, 473, 441, 562, 432, 421,
-	227, 372, 297, 386, 565, 615, 228, 491, 491, 606,
-	571, 573, 173, 92, 228, 403, 493, 493, 176, 10,
-	403, 492, 492, 340, 574, 340, 197, 554, 10, 114,
-	457, 340, 177, 434, 340, 572, 580, 439, 10, 578,
-	354, 591, 592, 12, 13, 253, 588, 568, 251, 180,
-	340, 197, 586, 587, 110, 533, 197, 609, 535, 197,
-	432, 348, 197, 107, 117, 382, 70, 502, 12, 13,
-	287, 7, 5, 102, 432, 211, 24, 12, 13, 129,
-	16, 19, 227, 494, 494, 651, 129, 12, 13, 431,
-	456, 490, 490, 364, 429, 561, 228, 335, 282, 207,
-	206, 618, 175, 129, 129, 624, 622, 120, 481, 491,
-	121, 125, 173, 636, 631, 630, 188, 619, 493, 21,
-	340, 638, 305, 492, 642, 340, 643, 306, 641, 336,
-	57, 351, 352, 640, 93, 644, 252, 645, 197, 176,
-	26, 340, 512, 197, 197, 28, 197, 76, 158, 387,
-	157, 666, 653, 177, 582, 390, 159, 491, 530, 156,
-	498, 658, 579, 662, 418, 534, 493, 31, 22, 15,
-	664, 492, 23, 665, 122, 122, 201, 18, 340, 197,
-	668, 3, 123, 554, 667, 494, 340, 8, 9, 282,
-	4, 2, 1, 490, 451, 197, 215, 544, 197, 197,
-	56, 197, 89, 566, 545, 548, 549, 612, 488, 323,
-	249, 531, 189, 105, 105, 112, 115, 80, 81, 576,
-	577, 329, 438, 175, 119, 119, 173, 72, 119, 71,
-	237, 478, 340, 494, 149, 340, 403, 316, 589, 403,
-	403, 490, 220, 326, 150, 244, 649, 197, 151, 141,
-	142, 143, 144, 145, 146, 147, 148, 197, 197, 629,
-	650, 127, 17, 450, 595, 399, 319, 197, 25, 89,
-	27, 36, 37, 78, 471, 281, 49, 66, 111, 39,
-	38, 35, 124, 279, 278, 105, 149, 83, 79, 10,
-	105, 73, 217, 112, 82, 113, 150, 247, 504, 616,
-	151, 232, 506, 87, 188, 145, 146, 147, 148, 0,
-	0, 0, 197, 0, 223, 0, 0, 0, 196, 235,
-	197, 197, 240, 128, 231, 0, 0, 0, 634, 635,
-	236, 0, 0, 0, 0, 639, 77, 0, 12, 13,
-	225, 0, 0, 0, 292, 647, 648, 173, 0, 0,
-	403, 0, 0, 0, 197, 0, 0, 0, 0, 0,
-	197, 0, 541, 0, 543, 0, 552, 56, 0, 0,
-	556, 197, 0, 557, 0, 0, 0, 347, 0, 0,
-	0, 0, 119, 119, 0, 0, 349, 197, 0, 567,
-	0, 345, 343, 341, 0, 0, 0, 0, 344, 0,
-	0, 311, 357, 0, 0, 348, 312, 313, 105, 315,
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-	0, 0, 346, 0, 0, 56, 0, 0, 613, 197,
-	275, 276, 0, 283, 247, 56, 247, 197, 0, 0,
-	342, 0, 363, 13, 197, 197, 0, 0, 0, 0,
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 599,
-	0, 377, 134, 149, 603, 152, 0, 135, 139, 140,
-	0, 0, 138, 150, 137, 136, 133, 151, 141, 142,
-	143, 144, 145, 146, 147, 148, 0, 0, 0, 0,
-	0, 0, 0, 0, 0, 0, 0, 422, 0, 0,
-	0, 361, 0, 0, 414, 0, 0, 0, 0, 0,
-	407, 0, 0, 368, 0, 0, 89, 637, 0, 197,
-	419, 420, 552, 0, 0, 0, 0, 0, 0, 347,
-	426, 0, 0, 463, 0, 0, 0, 357, 349, 0,
-	0, 0, 105, 345, 343, 341, 197, 0, 0, 105,
-	344, 0, 0, 112, 0, 486, 247, 348, 0, 0,
-	0, 0, 0, 0, 0, 0, 134, 149, 0, 152,
-	0, 135, 139, 140, 346, 407, 138, 150, 137, 136,
-	133, 151, 141, 142, 143, 144, 145, 146, 147, 148,
-	0, 0, 342, 0, 197, 13, 0, 0, 0, 0,
-	56, 56, 0, 0, 0, 396, 0, 0, 119, 0,
-	119, 0, 0, 0, 0, 0, 0, 311, 536, 0,
-	119, 0, 247, 522, 0, 0, 0, 0, 0, 0,
-	0, 547, 551, 0, 527, 0, 0, 475, 0, 0,
-	357, 0, 0, 463, 482, 0, 0, 463, 0, 0,
-	0, 0, 564, 357, 0, 0, 0, 0, 0, 0,
-	0, 275, 276, 0, 0, 0, 0, 0, 307, 0,
-	68, 0, 247, 41, 0, 78, 47, 42, 0, 0,
-	44, 56, 40, 50, 124, 43, 45, 53, 0, 83,
-	79, 10, 570, 0, 46, 52, 82, 51, 32, 30,
-	0, 0, 0, 65, 0, 0, 0, 0, 0, 0,
-	0, 0, 0, 0, 0, 0, 60, 61, 0, 64,
-	58, 0, 0, 59, 0, 0, 67, 0, 0, 0,
-	0, 0, 0, 0, 308, 0, 62, 63, 77, 0,
-	12, 13, 0, 0, 0, 0, 0, 0, 0, 0,
-	0, 29, 105, 68, 247, 0, 41, 0, 78, 47,
-	42, 0, 56, 44, 0, 40, 50, 33, 43, 45,
-	53, 0, 83, 79, 10, 0, 0, 46, 52, 82,
-	51, 32, 30, 0, 0, 547, 65, 0, 551, 357,
-	0, 0, 463, 0, 0, 0, 357, 0, 357, 60,
-	61, 0, 64, 58, 0, 0, 59, 0, 68, 67,
-	0, 0, 0, 78, 0, 0, 0, 0, 0, 62,
-	63, 77, 124, 12, 13, 0, 0, 83, 79, 10,
-	68, 0, 0, 0, 82, 78, 0, 0, 0, 0,
-	0, 65, 0, 0, 124, 0, 0, 0, 0, 83,
-	79, 10, 0, 0, 60, 61, 82, 64, 58, 0,
-	0, 59, 0, 68, 67, 0, 0, 0, 78, 0,
-	0, 0, 404, 0, 62, 63, 77, 124, 12, 13,
-	0, 0, 83, 79, 10, 0, 67, 0, 0, 82,
-	0, 0, 0, 0, 0, 0, 65, 0, 77, 0,
-	12, 13, 0, 0, 0, 0, 0, 0, 0, 60,
-	61, 0, 64, 58, 0, 0, 59, 0, 68, 67,
-	0, 0, 0, 78, 0, 0, 0, 590, 0, 62,
-	63, 77, 124, 12, 13, 0, 0, 83, 79, 10,
-	0, 501, 0, 0, 82, 0, 0, 0, 0, 0,
-	0, 65, 0, 0, 0, 0, 0, 0, 0, 0,
-	0, 0, 0, 0, 60, 61, 0, 64, 58, 0,
-	0, 59, 0, 68, 67, 0, 0, 0, 78, 0,
-	0, 0, 0, 0, 62, 63, 77, 124, 12, 13,
-	0, 0, 83, 79, 10, 0, 500, 0, 0, 82,
-	0, 0, 0, 0, 0, 0, 65, 0, 0, 0,
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 60,
-	61, 0, 64, 58, 0, 0, 59, 0, 68, 67,
-	0, 0, 0, 78, 0, 0, 0, 78, 0, 62,
-	63, 77, 124, 12, 13, 0, 124, 83, 79, 10,
-	0, 83, 79, 10, 82, 0, 395, 0, 82, 0,
-	0, 179, 0, 0, 0, 232, 0, 0, 0, 0,
-	0, 68, 0, 0, 60, 61, 78, 64, 178, 0,
-	0, 59, 196, 0, 67, 124, 0, 0, 489, 0,
-	83, 79, 10, 0, 62, 63, 77, 82, 12, 13,
-	77, 0, 12, 13, 179, 0, 0, 0, 0, 0,
-	0, 0, 0, 0, 0, 0, 0, 60, 61, 0,
-	64, 178, 0, 0, 59, 0, 68, 67, 289, 0,
-	0, 78, 0, 0, 0, 0, 0, 62, 63, 77,
-	124, 12, 13, 0, 0, 83, 79, 10, 0, 284,
-	0, 0, 82, 0, 0, 0, 0, 0, 0, 65,
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 68,
-	0, 0, 60, 61, 78, 64, 58, 187, 0, 59,
-	0, 0, 67, 124, 0, 0, 0, 0, 83, 79,
-	10, 0, 62, 63, 77, 82, 12, 13, 0, 0,
-	0, 0, 65, 0, 0, 0, 0, 0, 0, 0,
-	0, 0, 68, 0, 0, 60, 61, 78, 64, 58,
-	0, 0, 59, 0, 0, 67, 124, 0, 0, 0,
-	0, 83, 79, 10, 0, 62, 63, 77, 82, 12,
-	13, 0, 0, 0, 0, 65, 0, 0, 0, 0,
-	0, 0, 0, 0, 0, 68, 0, 0, 60, 61,
-	78, 64, 58, 0, 0, 59, 0, 0, 67, 124,
-	0, 0, 0, 0, 83, 79, 10, 0, 62, 63,
-	77, 82, 12, 13, 0, 0, 0, 0, 179, 0,
-	0, 0, 0, 0, 0, 0, 0, 0, 68, 0,
-	0, 60, 61, 299, 64, 178, 0, 0, 59, 0,
-	0, 67, 124, 0, 0, 0, 0, 83, 79, 10,
-	0, 62, 63, 77, 82, 12, 13, 0, 0, 0,
-	0, 65, 0, 0, 0, 0, 0, 0, 0, 0,
-	0, 0, 0, 0, 60, 61, 78, 64, 58, 0,
-	0, 59, 0, 0, 67, 124, 0, 0, 0, 0,
-	83, 79, 10, 0, 62, 63, 77, 82, 12, 13,
-	0, 78, 0, 0, 232, 0, 0, 0, 0, 0,
-	124, 0, 0, 0, 0, 83, 79, 10, 0, 0,
-	0, 196, 82, 0, 0, 0, 0, 231, 0, 232,
-	0, 0, 0, 224, 0, 0, 0, 0, 0, 77,
-	0, 12, 13, 225, 0, 0, 196, 0, 0, 0,
-	0, 0, 231, 0, 0, 0, 0, 0, 0, 0,
-	0, 0, 0, 0, 77, 0, 12, 13, 427, 134,
-	149, 0, 152, 0, 135, 139, 140, 0, 0, 138,
-	150, 137, 136, 133, 151, 141, 142, 143, 144, 145,
-	146, 147, 148, 134, 149, 0, 152, 0, 135, 139,
-	140, 0, 660, 138, 150, 137, 136, 133, 151, 141,
-	142, 143, 144, 145, 146, 147, 148, 0, 78, 0,
-	0, 250, 78, 0, 0, 0, 659, 124, 0, 0,
-	0, 124, 83, 79, 10, 0, 83, 79, 10, 82,
-	0, 0, 0, 82, 299, 0, 232, 0, 0, 0,
-	232, 0, 0, 124, 0, 0, 0, 0, 83, 79,
-	10, 0, 0, 196, 0, 82, 0, 196, 0, 231,
-	0, 0, 232, 231, 0, 0, 0, 78, 0, 0,
-	0, 77, 0, 12, 13, 77, 124, 12, 13, 196,
-	0, 83, 79, 10, 0, 231, 0, 0, 82, 78,
-	0, 0, 0, 347, 0, 406, 0, 77, 124, 12,
-	13, 0, 349, 83, 79, 10, 0, 345, 343, 553,
-	82, 0, 196, 0, 344, 0, 0, 190, 412, 0,
-	0, 348, 0, 0, 0, 0, 0, 0, 0, 0,
-	77, 0, 12, 13, 196, 0, 0, 0, 346, 0,
-	195, 0, 0, 0, 0, 0, 0, 0, 347, 0,
-	0, 0, 77, 0, 12, 13, 342, 349, 12, 13,
-	0, 0, 345, 343, 341, 0, 0, 0, 347, 344,
-	0, 0, 0, 0, 0, 0, 453, 349, 0, 0,
-	0, 0, 345, 343, 341, 0, 0, 0, 0, 344,
-	0, 0, 0, 346, 0, 0, 348, 0, 0, 452,
-	0, 0, 0, 130, 0, 0, 0, 0, 0, 0,
-	0, 342, 0, 346, 13, 0, 0, 0, 0, 0,
-	0, 0, 0, 0, 0, 350, 0, 0, 0, 0,
-	0, 342, 134, 149, 13, 152, 132, 135, 139, 140,
-	0, 131, 138, 150, 137, 136, 133, 151, 141, 142,
-	143, 144, 145, 146, 147, 148, 134, 149, 0, 152,
-	0, 135, 139, 140, 0, 0, 138, 150, 137, 136,
-	133, 151, 141, 142, 143, 144, 145, 146, 147, 148,
-	134, 149, 0, 0, 0, 135, 139, 140, 0, 0,
-	138, 150, 137, 136, 133, 151, 141, 142, 143, 144,
-	145, 146, 147, 148, 134, 149, 0, 0, 0, 135,
-	139, 140, 0, 0, 138, 150, 137, 136, 0, 151,
-	141, 142, 143, 144, 145, 146, 147, 148, 149, 0,
-	0, 0, 135, 139, 140, 0, 0, 138, 150, 137,
-	136, 0, 151, 141, 142, 143, 144, 145, 146, 147,
-	148,
-}
-var yyPact = [...]int{
-
-	-1000, -1000, 536, 535, -1000, 128, -1000, 545, 549, 336,
-	-1000, -1000, -1000, 605, -1000, -1000, 541, 1239, 328, 85,
-	-1000, 220, 438, 327, -1000, 323, -1000, -1000, -1000, -1000,
-	503, 493, 484, 459, -1000, -1000, -1000, -1000, -1000, 177,
-	-1000, 128, 128, 1316, 1316, 128, 1698, -1000, 2168, 92,
-	-1000, -1000, -1000, -1000, -1000, -1000, -1000, 39, 1698, 1698,
-	1698, 1698, 1698, 1698, 1698, 1698, 157, 1741, -1000, -1000,
-	-1000, 479, 233, -1000, -1000, -1000, 202, 1655, 2050, 36,
-	-1000, -1000, 233, 233, -1000, -1000, 153, 535, -1000, 586,
-	585, 40, 194, -1000, 540, -11, -11, -11, 17, -1000,
-	-1000, -1000, 367, 1827, -1000, -1000, -1000, 355, 754, -1000,
-	252, 1973, -1000, 155, 1969, 478, -1000, -1000, -1000, -1000,
-	-1000, -1000, 39, -1000, 475, -1000, -1000, -1000, -23, 2192,
-	1698, -1000, -1000, 1698, 1698, 1698, 1698, 1698, 1698, 1698,
-	1698, 1698, 1698, 1698, 1698, 1698, 1698, 1698, 1698, 1698,
-	1698, 1698, 1698, 1698, 1698, 1698, 1612, 1698, 524, 1698,
-	1557, 387, 1698, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-	-1000, -1000, 431, 2192, -1000, -1000, -1000, -1000, 1741, 1784,
-	1698, -1000, -1000, -1000, 1156, -1000, 24, 22, 2192, -1000,
-	1973, -1000, -1000, -1000, -1000, 1973, 1973, 211, 1973, 27,
-	263, 320, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-	-1000, 583, 1010, -1000, 2129, 1010, -1000, 155, 470, 128,
-	309, -1000, -1000, 187, 1698, 128, -1000, -1000, -1000, -1000,
-	-1000, 1973, 574, 307, -1000, 181, 1698, 305, -1000, -1000,
-	-1000, -1000, 1156, 430, -13, -1000, -1000, 1969, -1000, -1000,
-	1973, 1969, 1156, 1969, 2192, 2240, 2263, 689, 689, 689,
-	689, 689, 689, 741, 741, 741, 741, -1000, -1000, -1000,
-	-1000, -1000, -1000, -1000, 2216, -23, -23, 2192, -1000, 519,
-	304, -1000, -1000, 51, 1698, -1000, 278, -1000, -1000, -1000,
-	66, -1000, -1000, 1514, 1022, 174, 1294, 152, -1000, 2028,
-	918, 1294, 143, -1000, -1000, -1000, -1000, -1000, -1000, 1973,
-	1973, -1000, 428, -1000, 128, 13, 273, -1000, -1000, 1852,
-	580, 525, 463, -1000, -1000, 210, 272, -1000, -1000, 467,
-	-1000, 539, 425, 197, -1000, 270, 268, -1000, -1000, -1000,
-	-1000, -1000, 103, 28, 151, 86, 1010, 2109, 571, 460,
-	65, 184, 266, 265, 128, -6, -1000, 206, 424, 128,
-	1698, -23, -1000, 422, 1973, 420, 128, 1698, -23, 418,
-	128, 131, 1518, 1969, -1000, -1000, -1000, -1000, 416, -1000,
-	415, -1000, -1000, 1698, 1459, 1404, 2192, 521, 1698, 229,
-	519, 405, -14, 1741, 404, 403, -1000, 1698, 147, -17,
-	-1000, -1000, 173, 2192, -1000, -1000, 1995, -1000, -1000, -1000,
-	-1000, -1000, 1973, 402, -1000, 138, -1000, 1156, 1156, -1000,
-	-1000, -1000, -1000, 1973, 112, 31, 580, 128, -1000, -1000,
-	398, 539, 210, 580, 539, 128, 104, 231, -1000, 1969,
-	397, -1000, -1000, -1000, -1000, 1010, 10, 1010, 128, 2054,
-	-1000, -1000, 514, 1010, -1000, -1000, 1010, 128, 259, -1000,
-	69, -1000, 581, -1000, 65, -1000, -1000, 392, -22, 128,
-	128, 580, 1010, -1000, -1000, -23, -1000, -1000, 258, -1000,
-	-1000, 754, -23, -1000, -1000, -1000, 440, -1000, -1000, 1969,
-	-1000, -1000, -1000, -1000, -1000, -1000, 1518, 1518, 1156, 255,
-	1698, 1698, -1000, -1000, -1000, -1000, -1000, 1741, 166, -1000,
-	-1000, 391, -1000, -1000, -1000, -1, -1000, 1294, -1000, 1349,
-	1294, 1294, 390, -1000, -1000, -1000, 129, -1000, -1000, -1000,
-	-1000, -1000, 580, 385, -1000, 383, -1000, -1000, -1000, 382,
-	-1000, -1000, 1010, 2, 102, 254, -1000, 1010, 81, 244,
-	-1000, 439, -1000, -1000, -1000, 370, -1000, -1000, 365, -1000,
-	497, -1000, 239, 858, 435, -1000, -1000, 580, 362, 128,
-	181, 1969, 361, -1000, 111, 1698, 2192, 2192, 226, 1156,
-	55, -1000, -1000, -1000, -1000, 1698, -1000, -1000, -1000, 2192,
-	-1000, 68, 64, -1000, -1000, -1000, 580, 580, 1518, -1000,
-	1010, -1000, 128, 580, -1000, 2054, 128, -1000, 858, 69,
-	-1000, -1000, -1000, 128, -1000, 128, -1000, -1000, -1000, 359,
-	-1000, -1000, -1000, -1000, 236, -1000, 1698, 1698, 1741, 560,
-	1, 1294, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
-	-1000, 349, -1000, 342, 341, 339, 1518, 1919, 1895, -1000,
-	-1000, 141, -1000, 50, 858, -1000, -1000, 858, -1000, -1000,
-	-1000, -1000, -1000, -1000, -1000, -1000, 1698, 519, -1000,
-}
-var yyPgo = [...]int{
-
-	0, 51, 793, 672, 34, 221, 32, 700, 31, 792,
-	788, 1, 76, 113, 208, 16, 25, 3, 785, 782,
-	781, 774, 773, 771, 7, 770, 617, 30, 24, 769,
-	437, 45, 47, 273, 41, 19, 768, 554, 20, 620,
-	767, 556, 765, 762, 12, 761, 124, 760, 40, 13,
-	758, 46, 4, 2, 28, 756, 766, 755, 10, 18,
-	752, 751, 26, 750, 749, 736, 15, 35, 735, 733,
-	38, 732, 29, 727, 612, 48, 21, 721, 720, 719,
-	717, 42, 712, 708, 707, 9, 84, 702, 14, 698,
-	0, 67, 49, 22, 6, 23, 17, 8, 697, 5,
-	37, 11, 696, 695, 694, 687, 406, 36, 686, 33,
-	27, 684, 682, 681, 680, 677, 671, 50, 44, 667,
-	43, 666, 58, 662, 659, 658, 657, 654, 652, 650,
-	649, 646, 645, 644, 641, 640, 639, 638, 39, 637,
-	626, 624,
-}
-var yyR1 = [...]int{
-
-	0, 112, 114, 114, 116, 113, 115, 115, 119, 119,
-	119, 120, 120, 121, 121, 2, 2, 2, 117, 123,
-	123, 124, 118, 50, 50, 50, 50, 50, 74, 74,
-	74, 74, 74, 74, 74, 74, 74, 74, 126, 70,
-	70, 70, 75, 75, 76, 76, 76, 36, 48, 44,
-	44, 44, 44, 44, 44, 9, 9, 9, 9, 127,
-	11, 128, 10, 62, 62, 129, 53, 42, 42, 42,
-	22, 22, 22, 21, 130, 23, 24, 24, 131, 132,
-	133, 25, 134, 63, 64, 64, 65, 65, 135, 136,
-	45, 137, 43, 14, 14, 14, 14, 14, 14, 14,
-	14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-	14, 14, 14, 14, 46, 46, 46, 46, 46, 46,
-	46, 46, 46, 41, 41, 41, 40, 40, 40, 40,
-	40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
-	49, 28, 16, 16, 15, 15, 39, 39, 17, 17,
-	31, 1, 1, 33, 34, 37, 37, 3, 3, 3,
-	91, 91, 30, 29, 81, 81, 7, 7, 7, 7,
-	7, 7, 32, 32, 32, 32, 87, 87, 87, 87,
-	87, 79, 79, 80, 89, 89, 89, 89, 89, 12,
-	12, 88, 88, 88, 88, 88, 88, 88, 85, 86,
-	84, 84, 83, 83, 47, 18, 18, 19, 19, 90,
-	51, 51, 52, 52, 52, 139, 20, 20, 60, 60,
-	71, 71, 77, 77, 78, 78, 73, 73, 69, 69,
-	72, 72, 72, 72, 72, 72, 4, 4, 13, 27,
-	27, 27, 82, 8, 8, 8, 8, 68, 68, 67,
-	67, 6, 6, 6, 6, 6, 26, 26, 26, 26,
-	26, 140, 26, 26, 26, 26, 26, 26, 26, 26,
-	66, 66, 55, 55, 54, 54, 56, 56, 59, 59,
-	57, 57, 57, 57, 58, 58, 122, 122, 138, 138,
-	35, 35, 61, 61, 38, 38, 101, 101, 105, 105,
-	103, 103, 5, 5, 141, 141, 141, 141, 141, 141,
-	92, 108, 106, 106, 106, 111, 111, 107, 107, 107,
-	107, 107, 107, 107, 107, 107, 107, 107, 110, 109,
-	95, 95, 97, 96, 96, 99, 99, 98, 98, 94,
-	94, 94, 93, 93, 125, 125, 100, 100, 104, 104,
-	102, 102,
-}
-var yyR2 = [...]int{
-
-	0, 4, 0, 3, 0, 3, 0, 3, 2, 5,
-	3, 3, 2, 1, 3, 1, 2, 2, 4, 0,
-	1, 0, 4, 0, 1, 1, 1, 1, 2, 5,
-	3, 2, 5, 7, 3, 2, 5, 3, 1, 2,
-	4, 3, 4, 3, 1, 2, 1, 1, 2, 1,
-	3, 3, 3, 2, 2, 3, 5, 5, 2, 0,
-	4, 0, 3, 0, 2, 0, 4, 4, 4, 2,
-	5, 1, 1, 2, 0, 3, 1, 3, 0, 0,
-	0, 8, 0, 5, 0, 2, 0, 2, 0, 0,
-	7, 0, 5, 1, 3, 3, 3, 3, 3, 3,
-	3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
-	3, 3, 3, 3, 1, 2, 2, 2, 2, 2,
-	2, 2, 2, 3, 5, 6, 1, 1, 3, 5,
-	5, 4, 6, 8, 1, 5, 5, 5, 7, 1,
-	0, 3, 1, 4, 1, 4, 1, 3, 1, 1,
-	1, 1, 1, 1, 1, 0, 1, 1, 1, 1,
-	4, 4, 1, 1, 1, 2, 1, 1, 1, 1,
-	1, 3, 1, 1, 1, 2, 1, 1, 1, 1,
-	3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-	3, 4, 4, 2, 3, 5, 1, 1, 2, 3,
-	5, 3, 5, 3, 3, 5, 8, 5, 8, 5,
-	0, 3, 0, 1, 3, 1, 4, 2, 0, 3,
-	1, 3, 1, 3, 1, 3, 1, 3, 1, 3,
-	3, 2, 4, 3, 5, 5, 1, 3, 1, 2,
-	1, 3, 4, 1, 2, 2, 1, 1, 3, 0,
-	2, 0, 1, 1, 1, 1, 1, 1, 1, 1,
-	1, 0, 4, 1, 2, 2, 2, 2, 2, 2,
-	1, 3, 1, 3, 1, 3, 1, 3, 1, 3,
-	1, 1, 3, 3, 0, 2, 0, 1, 0, 1,
-	0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
-	0, 1, 0, 1, 4, 4, 5, 6, 4, 4,
-	1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
-	4, 5, 4, 4, 2, 2, 4, 3, 3, 5,
-	3, 4, 3, 5, 1, 0, 1, 3, 1, 1,
-	2, 1, 1, 5, 0, 2, 1, 3, 1, 3,
-	1, 3,
-}
-var yyChk = [...]int{
-
-	-1000, -112, -113, -116, -114, 26, -117, 26, -115, -3,
-	25, -91, 74, 75, -118, -124, 25, -60, -119, 22,
-	63, 4, -125, -123, 25, -50, -74, -47, -26, 2,
-	33, -126, 32, 18, -44, -23, -45, -43, -25, -29,
-	16, 7, 11, 19, 14, 20, 28, 10, -14, -56,
-	17, 31, 29, 21, -33, -46, -3, -39, 54, 57,
-	50, 51, 70, 71, 53, 37, -40, 60, 4, -30,
-	-41, -79, -80, -20, -90, -88, -139, 72, 9, 24,
-	-84, -83, 30, 23, 63, -120, 60, -2, 4, -3,
-	64, 64, 65, -141, 22, 33, 10, 32, 18, 63,
-	63, -70, 60, -54, -34, -3, -75, 60, -54, -48,
-	60, -36, -3, -18, 60, -3, 67, -37, -33, -3,
-	-37, -41, -39, -3, 18, -41, -33, -61, -56, -14,
-	5, 43, 38, 48, 34, 39, 47, 46, 44, 40,
-	41, 50, 51, 52, 53, 54, 55, 56, 57, 35,
-	45, 49, 37, 66, 6, 76, -130, -135, -137, -131,
-	60, 64, 72, -46, -46, -46, -46, -46, -46, -46,
-	-46, 68, -17, -14, -32, -86, -90, -88, 54, 37,
-	60, -1, 36, 68, -1, 2, -35, 12, -14, -87,
-	37, -90, -88, -85, -12, 60, 54, -30, 72, -1,
-	-1, -121, 61, -120, -117, -118, 4, 4, 25, 74,
-	65, 25, -92, -91, -92, -108, -92, -19, -92, 60,
-	-71, 61, -70, -7, 66, 76, -86, -90, -88, -85,
-	-12, 60, 37, -75, 61, -7, 66, -78, 61, -48,
-	-7, -51, 68, -67, -68, -8, -31, -3, -81, -7,
-	12, 60, -140, 60, -14, -14, -14, -14, -14, -14,
-	-14, -14, -14, -14, -14, -14, -14, -14, -14, -14,
-	-14, -14, -14, -14, -14, -56, -56, -14, -21, -22,
-	-38, -42, -44, -56, 27, -24, -38, 36, -24, 61,
-	-59, -17, -3, 60, -14, -35, -49, 61, -32, 9,
-	-14, -49, -66, -6, -11, -74, -26, 2, 68, 73,
-	73, -7, -7, -7, 64, -7, -73, 69, -72, -55,
-	-13, 60, 54, -33, -4, 25, -69, 69, -27, -33,
-	-4, 60, -122, 63, -118, 4, -106, -107, -110, -109,
-	-91, 25, 72, 24, 30, 23, 54, 9, 37, 18,
-	66, -106, -106, -51, 60, -100, -95, -3, -122, 63,
-	66, -56, -34, -7, 9, -122, 63, 66, -56, -122,
-	63, -66, 61, 76, -138, -31, -81, -7, -67, -6,
-	-67, -53, 36, 63, 66, 6, -14, -136, 63, -62,
-	-132, -138, 12, 76, -17, 32, 73, 67, -58, -57,
-	-28, -16, -15, -14, 68, 68, 37, -7, -90, -88,
-	-85, -12, 60, -138, 76, -58, 69, 63, -127, -7,
-	-7, 61, -3, 73, -122, 63, -7, 76, -5, 4,
-	-13, 54, 25, -13, 60, 64, -122, 63, -82, 60,
-	-4, 61, -120, 63, 63, 73, 4, 72, 68, 68,
-	-106, -111, 60, 37, -107, -109, 9, 60, -93, -94,
-	60, 4, 51, -3, 66, 63, 63, -101, -100, 61,
-	76, -106, 12, 61, -70, -56, 61, 61, -77, -76,
-	-75, -54, -56, 61, -48, 69, -3, -52, -89, 60,
-	-86, -90, -88, -85, -12, -8, 61, 61, -129, -38,
-	27, 27, 36, -38, -10, 69, -9, 8, 13, -53,
-	61, -138, -17, 61, 61, -35, 69, 76, -138, 67,
-	-49, -49, -7, 61, 69, -6, -66, -7, 69, -72,
-	-5, -33, 61, -13, -5, -13, -3, 69, -27, -67,
-	61, -106, 73, -106, -105, -104, -97, -3, -103, -102,
-	-96, -3, -106, 25, -91, -110, -106, -106, -101, 63,
-	-94, 4, -93, 61, -3, -95, -5, -106, -122, 63,
-	-7, 60, -67, -52, -66, 63, -14, -14, -62, -128,
-	-59, 67, -133, 61, 73, 67, -28, -16, -15, -14,
-	68, -58, -58, 61, 69, -5, 61, 61, 61, -106,
-	73, 69, 63, -106, 69, 63, 60, 61, 61, 50,
-	63, -99, -98, 60, -106, 60, -5, 61, -76, -67,
-	61, 69, -38, 69, -66, 67, 66, 6, 76, -64,
-	-35, -49, 69, 69, -5, -5, -52, -106, -97, -5,
-	-96, -101, -99, -94, -101, -101, 61, -14, -14, -65,
-	-63, 15, 73, -58, 61, 61, 61, 61, -52, 67,
-	67, 21, -11, 69, -99, -99, -134, -24, -53,
-}
-var yyDef = [...]int{
-
-	4, -2, 2, 0, 6, 0, 21, 0, 218, 0,
-	157, 158, 159, 0, 5, 344, 19, -2, 0, 0,
-	3, 0, 0, 0, 20, 0, 24, 25, 26, 27,
-	0, 0, 0, 0, 256, 257, 258, 259, 260, 0,
-	263, 155, 155, 0, 0, 0, 292, 38, -2, 0,
-	74, 88, 91, 78, 163, 93, -2, 114, 0, 0,
-	0, 0, 0, 0, 0, 0, 146, 0, 126, 127,
-	134, 0, 0, 139, -2, -2, 0, 290, 0, 0,
-	196, 197, 0, 0, 7, 8, 0, 21, 15, 0,
-	0, 0, 0, 345, 0, 0, 0, 0, 0, 18,
-	219, 28, 0, 0, 274, 154, 31, 0, 0, 35,
-	0, 0, 47, 210, 249, 0, 261, 264, 156, 153,
-	265, -2, 0, 162, 0, -2, 268, 269, 293, 276,
-	0, 53, 54, 0, 0, 0, 0, 0, 0, 0,
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-	0, 0, 0, 0, 0, 0, 294, 294, 0, 294,
-	0, 0, 290, 115, 116, 117, 118, 119, 120, 121,
-	122, 140, 0, 148, 149, 172, -2, -2, 0, 0,
-	0, 140, 151, 152, -2, 217, 0, 0, 291, 193,
-	0, 176, 177, 178, 179, 0, 0, 189, 0, 0,
-	0, 286, 10, 13, 21, 12, 16, 17, 160, 161,
-	22, 0, 0, 310, 0, 0, 311, 210, 0, 0,
-	286, 30, 220, 39, 0, 0, 166, 167, 168, 169,
-	170, 0, 0, 286, 34, 0, 0, 286, 37, 224,
-	48, 204, -2, 0, 288, 247, 243, 162, 246, 150,
-	164, 249, -2, 249, 50, 94, 95, 96, 97, 98,
-	99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
-	109, 110, 111, 112, 113, 51, 52, 277, 75, 0,
-	71, 72, 295, 0, 0, 89, 76, 63, 79, 123,
-	288, 278, 128, 0, 291, 0, 284, 147, 175, 0,
-	288, 284, 0, 270, 252, 253, 254, 255, 59, 0,
-	0, 194, 0, 198, 0, 0, 286, 201, 226, 0,
-	302, 0, 0, 272, 238, -2, 286, 203, 228, 0,
-	240, 0, 0, 287, 11, 0, 0, 312, 313, 314,
-	317, 318, 0, 0, 0, 0, 0, 0, 0, 0,
-	0, 0, 0, 0, 296, 0, 346, 0, 0, 287,
-	0, 41, 275, 0, 0, 0, 287, 0, 43, 0,
-	287, 0, 212, 289, 250, 244, 245, 165, 0, 262,
-	0, 73, 65, 294, 0, 0, 69, 0, 294, 0,
-	0, 0, 288, 289, 0, 0, 131, 290, 0, 288,
-	280, 281, 0, -2, 140, 140, 0, 199, -2, -2,
-	-2, -2, 0, 0, 289, 0, 216, -2, -2, 191,
-	192, 180, 190, 0, 0, 287, 302, 0, 231, 303,
-	0, 0, 236, 302, 0, 0, 0, 287, 239, 249,
-	0, 9, 14, 304, 305, 0, 0, 0, 298, 300,
-	324, 325, 0, 0, 315, 316, 0, 296, 0, 342,
-	0, 339, 0, 341, 0, 308, 309, 0, 297, 0,
-	0, 302, 0, 29, 221, 40, 171, 32, 286, 222,
-	44, 46, 42, 36, 225, 211, 162, 209, 213, 249,
-	184, 185, 186, 187, 188, 248, 212, 212, -2, 0,
-	0, 0, 63, 77, 64, 92, 61, 0, 0, 80,
-	124, 0, 279, 129, 130, 0, 137, 289, 285, 0,
-	284, 284, 0, 135, 136, 271, 0, 195, 200, 227,
-	230, 273, 302, 0, 233, 0, 237, 202, 229, 0,
-	241, 319, 0, 0, 0, 299, 348, 0, 0, 301,
-	350, 0, 334, -2, -2, 0, 327, 328, 0, 306,
-	0, 340, 0, 335, 0, 347, 330, 302, 0, 287,
-	45, 249, 0, 205, 0, 294, 67, 68, 0, -2,
-	0, 58, 84, 125, 132, 290, 282, 283, 141, 144,
-	140, 0, 0, -2, 60, 232, 302, 302, 212, 320,
-	0, 322, 0, 302, 323, 0, 296, 326, 335, 0,
-	307, 207, 336, 296, 338, 296, 331, 33, 223, 0,
-	214, 66, 70, 90, 62, 55, 0, 0, 0, 86,
-	0, 284, -2, 138, 234, 235, 242, 321, 349, 332,
-	351, 0, 329, 0, 0, 0, 212, 0, 0, 81,
-	85, 0, 133, 0, 335, 343, 337, 335, 206, 56,
-	57, 82, 87, 145, 333, 208, 294, 0, 83,
-}
-var yyTok1 = [...]int{
-
-	1, 3, 3, 3, 3, 3, 3, 3, 3, 3,
-	3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
-	3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
-	3, 3, 3, 70, 3, 3, 65, 56, 57, 3,
-	60, 61, 54, 50, 76, 51, 64, 55, 3, 3,
-	3, 3, 3, 3, 3, 3, 3, 3, 67, 63,
-	3, 66, 3, 74, 75, 3, 3, 3, 3, 3,
-	3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
-	3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
-	3, 72, 3, 73, 53, 3, 3, 3, 3, 3,
-	3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
-	3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
-	3, 3, 3, 68, 52, 69, 71,
-}
-var yyTok2 = [...]int{
-
-	2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
-	12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
-	22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
-	32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
-	42, 43, 44, 45, 46, 47, 48, 49, 58, 59,
-	62,
-}
-var yyTok3 = [...]int{
-	0,
-}
-
-var yyErrorMessages = [...]struct {
-	state int
-	token int
-	msg   string
-}{
-	{332, 76, "unexpected comma during import block"},
-	{89, 63, "missing import path; require quoted string"},
-	{390, 63, "missing { after if clause"},
-	{387, 63, "missing { after switch clause"},
-	{279, 63, "missing { after for clause"},
-	{499, 36, "missing { after for clause"},
-	{17, 68, "unexpected semicolon or newline before {"},
-	{111, 63, "unexpected semicolon or newline in type declaration"},
-	{78, 69, "unexpected } in channel type"},
-	{78, 61, "unexpected ) in channel type"},
-	{78, 76, "unexpected comma in channel type"},
-	{417, 15, "unexpected semicolon or newline before else"},
-	{329, 76, "name list not allowed in interface type"},
-	{279, 33, "var declaration not allowed in for initializer"},
-	{25, 68, "unexpected { at end of statement"},
-	{371, 68, "unexpected { at end of statement"},
-	{122, 63, "argument to go/defer must be function call"},
-	{398, 63, "need trailing comma before newline in composite literal"},
-	{415, 63, "need trailing comma before newline in composite literal"},
-	{124, 25, "nested func not allowed"},
-	{651, 63, "else must be followed by if or statement block"},
-}
-
-//line yaccpar:1
-
-/*	parser for yacc output	*/
-
-var (
-	yyDebug        = 0
-	yyErrorVerbose = false
-)
-
-type yyLexer interface {
-	Lex(lval *yySymType) int
-	Error(s string)
-}
-
-type yyParser interface {
-	Parse(yyLexer) int
-	Lookahead() int
-}
-
-type yyParserImpl struct {
-	lookahead func() int
-}
-
-func (p *yyParserImpl) Lookahead() int {
-	return p.lookahead()
-}
-
-func yyNewParser() yyParser {
-	p := &yyParserImpl{
-		lookahead: func() int { return -1 },
-	}
-	return p
-}
-
-const yyFlag = -1000
-
-func yyTokname(c int) string {
-	if c >= 1 && c-1 < len(yyToknames) {
-		if yyToknames[c-1] != "" {
-			return yyToknames[c-1]
-		}
-	}
-	return __yyfmt__.Sprintf("tok-%v", c)
-}
-
-func yyStatname(s int) string {
-	if s >= 0 && s < len(yyStatenames) {
-		if yyStatenames[s] != "" {
-			return yyStatenames[s]
-		}
-	}
-	return __yyfmt__.Sprintf("state-%v", s)
-}
-
-func yyErrorMessage(state, lookAhead int) string {
-	const TOKSTART = 4
-
-	if !yyErrorVerbose {
-		return "syntax error"
-	}
-
-	for _, e := range yyErrorMessages {
-		if e.state == state && e.token == lookAhead {
-			return "syntax error: " + e.msg
-		}
-	}
-
-	res := "syntax error: unexpected " + yyTokname(lookAhead)
-
-	// To match Bison, suggest at most four expected tokens.
-	expected := make([]int, 0, 4)
-
-	// Look for shiftable tokens.
-	base := yyPact[state]
-	for tok := TOKSTART; tok-1 < len(yyToknames); tok++ {
-		if n := base + tok; n >= 0 && n < yyLast && yyChk[yyAct[n]] == tok {
-			if len(expected) == cap(expected) {
-				return res
-			}
-			expected = append(expected, tok)
-		}
-	}
-
-	if yyDef[state] == -2 {
-		i := 0
-		for yyExca[i] != -1 || yyExca[i+1] != state {
-			i += 2
-		}
-
-		// Look for tokens that we accept or reduce.
-		for i += 2; yyExca[i] >= 0; i += 2 {
-			tok := yyExca[i]
-			if tok < TOKSTART || yyExca[i+1] == 0 {
-				continue
-			}
-			if len(expected) == cap(expected) {
-				return res
-			}
-			expected = append(expected, tok)
-		}
-
-		// If the default action is to accept or reduce, give up.
-		if yyExca[i+1] != 0 {
-			return res
-		}
-	}
-
-	for i, tok := range expected {
-		if i == 0 {
-			res += ", expecting "
-		} else {
-			res += " or "
-		}
-		res += yyTokname(tok)
-	}
-	return res
-}
-
-func yylex1(lex yyLexer, lval *yySymType) (char, token int) {
-	token = 0
-	char = lex.Lex(lval)
-	if char <= 0 {
-		token = yyTok1[0]
-		goto out
-	}
-	if char < len(yyTok1) {
-		token = yyTok1[char]
-		goto out
-	}
-	if char >= yyPrivate {
-		if char < yyPrivate+len(yyTok2) {
-			token = yyTok2[char-yyPrivate]
-			goto out
-		}
-	}
-	for i := 0; i < len(yyTok3); i += 2 {
-		token = yyTok3[i+0]
-		if token == char {
-			token = yyTok3[i+1]
-			goto out
-		}
-	}
-
-out:
-	if token == 0 {
-		token = yyTok2[1] /* unknown char */
-	}
-	if yyDebug >= 3 {
-		__yyfmt__.Printf("lex %s(%d)\n", yyTokname(token), uint(char))
-	}
-	return char, token
-}
-
-func yyParse(yylex yyLexer) int {
-	return yyNewParser().Parse(yylex)
-}
-
-func (yyrcvr *yyParserImpl) Parse(yylex yyLexer) int {
-	var yyn int
-	var yylval yySymType
-	var yyVAL yySymType
-	var yyDollar []yySymType
-	yyS := make([]yySymType, yyMaxDepth)
-
-	Nerrs := 0   /* number of errors */
-	Errflag := 0 /* error recovery flag */
-	yystate := 0
-	yychar := -1
-	yytoken := -1 // yychar translated into internal numbering
-	yyrcvr.lookahead = func() int { return yychar }
-	defer func() {
-		// Make sure we report no lookahead when not parsing.
-		yystate = -1
-		yychar = -1
-		yytoken = -1
-	}()
-	yyp := -1
-	goto yystack
-
-ret0:
-	return 0
-
-ret1:
-	return 1
-
-yystack:
-	/* put a state and value onto the stack */
-	if yyDebug >= 4 {
-		__yyfmt__.Printf("char %v in %v\n", yyTokname(yytoken), yyStatname(yystate))
-	}
-
-	yyp++
-	if yyp >= len(yyS) {
-		nyys := make([]yySymType, len(yyS)*2)
-		copy(nyys, yyS)
-		yyS = nyys
-	}
-	yyS[yyp] = yyVAL
-	yyS[yyp].yys = yystate
-
-yynewstate:
-	yyn = yyPact[yystate]
-	if yyn <= yyFlag {
-		goto yydefault /* simple state */
-	}
-	if yychar < 0 {
-		yychar, yytoken = yylex1(yylex, &yylval)
-	}
-	yyn += yytoken
-	if yyn < 0 || yyn >= yyLast {
-		goto yydefault
-	}
-	yyn = yyAct[yyn]
-	if yyChk[yyn] == yytoken { /* valid shift */
-		yychar = -1
-		yytoken = -1
-		yyVAL = yylval
-		yystate = yyn
-		if Errflag > 0 {
-			Errflag--
-		}
-		goto yystack
-	}
-
-yydefault:
-	/* default state action */
-	yyn = yyDef[yystate]
-	if yyn == -2 {
-		if yychar < 0 {
-			yychar, yytoken = yylex1(yylex, &yylval)
-		}
-
-		/* look through exception table */
-		xi := 0
-		for {
-			if yyExca[xi+0] == -1 && yyExca[xi+1] == yystate {
-				break
-			}
-			xi += 2
-		}
-		for xi += 2; ; xi += 2 {
-			yyn = yyExca[xi+0]
-			if yyn < 0 || yyn == yytoken {
-				break
-			}
-		}
-		yyn = yyExca[xi+1]
-		if yyn < 0 {
-			goto ret0
-		}
-	}
-	if yyn == 0 {
-		/* error ... attempt to resume parsing */
-		switch Errflag {
-		case 0: /* brand new error */
-			yylex.Error(yyErrorMessage(yystate, yytoken))
-			Nerrs++
-			if yyDebug >= 1 {
-				__yyfmt__.Printf("%s", yyStatname(yystate))
-				__yyfmt__.Printf(" saw %s\n", yyTokname(yytoken))
-			}
-			fallthrough
-
-		case 1, 2: /* incompletely recovered error ... try again */
-			Errflag = 3
-
-			/* find a state where "error" is a legal shift action */
-			for yyp >= 0 {
-				yyn = yyPact[yyS[yyp].yys] + yyErrCode
-				if yyn >= 0 && yyn < yyLast {
-					yystate = yyAct[yyn] /* simulate a shift of "error" */
-					if yyChk[yystate] == yyErrCode {
-						goto yystack
-					}
-				}
-
-				/* the current p has no shift on "error", pop stack */
-				if yyDebug >= 2 {
-					__yyfmt__.Printf("error recovery pops state %d\n", yyS[yyp].yys)
-				}
-				yyp--
-			}
-			/* there is no state on the stack with an error shift ... abort */
-			goto ret1
-
-		case 3: /* no shift yet; clobber input char */
-			if yyDebug >= 2 {
-				__yyfmt__.Printf("error recovery discards %s\n", yyTokname(yytoken))
-			}
-			if yytoken == yyEofCode {
-				goto ret1
-			}
-			yychar = -1
-			yytoken = -1
-			goto yynewstate /* try again in the same state */
-		}
-	}
-
-	/* reduction by production yyn */
-	if yyDebug >= 2 {
-		__yyfmt__.Printf("reduce %v in:\n\t%v\n", yyn, yyStatname(yystate))
-	}
-
-	yynt := yyn
-	yypt := yyp
-	_ = yypt // guard against "declared and not used"
-
-	yyp -= yyR2[yyn]
-	// yyp is now the index of $0. Perform the default action. Iff the
-	// reduced production is ε, $1 is possibly out of range.
-	if yyp+1 >= len(yyS) {
-		nyys := make([]yySymType, len(yyS)*2)
-		copy(nyys, yyS)
-		yyS = nyys
-	}
-	yyVAL = yyS[yyp+1]
-
-	/* consult goto table to find next state */
-	yyn = yyR1[yyn]
-	yyg := yyPgo[yyn]
-	yyj := yyg + yyS[yyp].yys + 1
-
-	if yyj >= yyLast {
-		yystate = yyAct[yyg]
-	} else {
-		yystate = yyAct[yyj]
-		if yyChk[yystate] != -yyn {
-			yystate = yyAct[yyg]
-		}
-	}
-	// dummy call; replaced with literal code
-	switch yynt {
-
-	case 1:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:189
-		{
-			xtop = concat(xtop, yyDollar[4].list)
-		}
-	case 2:
-		yyDollar = yyS[yypt-0 : yypt+1]
-		//line go.y:195
-		{
-			prevlineno = lineno
-			Yyerror("package statement must be first")
-			errorexit()
-		}
-	case 3:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:201
-		{
-			mkpackage(yyDollar[2].sym.Name)
-		}
-	case 4:
-		yyDollar = yyS[yypt-0 : yypt+1]
-		//line go.y:211
-		{
-			importpkg = Runtimepkg
-
-			if Debug['A'] != 0 {
-				cannedimports("runtime.Builtin", "package runtime\n\n$$\n\n")
-			} else {
-				cannedimports("runtime.Builtin", runtimeimport)
-			}
-			curio.importsafe = true
-		}
-	case 5:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:223
-		{
-			importpkg = nil
-		}
-	case 11:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:237
-		{
-			ipkg := importpkg
-			my := importmyname
-			importpkg = nil
-			importmyname = nil
-
-			if my == nil {
-				my = Lookup(ipkg.Name)
-			}
-
-			pack := Nod(OPACK, nil, nil)
-			pack.Sym = my
-			pack.Name.Pkg = ipkg
-			pack.Lineno = int32(yyDollar[1].i)
-
-			if strings.HasPrefix(my.Name, ".") {
-				importdot(ipkg, pack)
-				break
-			}
-			if my.Name == "init" {
-				Yyerror("cannot import package as init - init must be a func")
-				break
-			}
-			if my.Name == "_" {
-				break
-			}
-			if my.Def != nil {
-				lineno = int32(yyDollar[1].i)
-				redeclare(my, "as imported package name")
-			}
-			my.Def = pack
-			my.Lastlineno = int32(yyDollar[1].i)
-			my.Block = 1 // at top level
-		}
-	case 12:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:272
-		{
-			// When an invalid import path is passed to importfile,
-			// it calls Yyerror and then sets up a fake import with
-			// no package statement. This allows us to test more
-			// than one invalid import statement in a single file.
-			if nerrors == 0 {
-				Fatal("phase error in import")
-			}
-		}
-	case 15:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:288
-		{
-			// import with original name
-			yyVAL.i = parserline()
-			importmyname = nil
-			importfile(&yyDollar[1].val, yyVAL.i)
-		}
-	case 16:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:295
-		{
-			// import with given name
-			yyVAL.i = parserline()
-			importmyname = yyDollar[1].sym
-			importfile(&yyDollar[2].val, yyVAL.i)
-		}
-	case 17:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:302
-		{
-			// import into my name space
-			yyVAL.i = parserline()
-			importmyname = Lookup(".")
-			importfile(&yyDollar[2].val, yyVAL.i)
-		}
-	case 18:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:311
-		{
-			if importpkg.Name == "" {
-				importpkg.Name = yyDollar[2].sym.Name
-				numImport[yyDollar[2].sym.Name]++
-			} else if importpkg.Name != yyDollar[2].sym.Name {
-				Yyerror("conflicting names %s and %s for package %q", importpkg.Name, yyDollar[2].sym.Name, importpkg.Path)
-			}
-			importpkg.Direct = 1
-			importpkg.Safe = curio.importsafe
-
-			if safemode != 0 && !curio.importsafe {
-				Yyerror("cannot import unsafe package %q", importpkg.Path)
-			}
-		}
-	case 20:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:328
-		{
-			if yyDollar[1].sym.Name == "safe" {
-				curio.importsafe = true
-			}
-		}
-	case 21:
-		yyDollar = yyS[yypt-0 : yypt+1]
-		//line go.y:335
-		{
-			defercheckwidth()
-		}
-	case 22:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:339
-		{
-			resumecheckwidth()
-			unimportfile()
-		}
-	case 23:
-		yyDollar = yyS[yypt-0 : yypt+1]
-		//line go.y:348
-		{
-			Yyerror("empty top-level declaration")
-			yyVAL.list = nil
-		}
-	case 25:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:354
-		{
-			yyVAL.list = list1(yyDollar[1].node)
-		}
-	case 26:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:358
-		{
-			Yyerror("non-declaration statement outside function body")
-			yyVAL.list = nil
-		}
-	case 27:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:363
-		{
-			yyVAL.list = nil
-		}
-	case 28:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:369
-		{
-			yyVAL.list = yyDollar[2].list
-		}
-	case 29:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:373
-		{
-			yyVAL.list = yyDollar[3].list
-		}
-	case 30:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:377
-		{
-			yyVAL.list = nil
-		}
-	case 31:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:381
-		{
-			yyVAL.list = yyDollar[2].list
-			iota_ = -100000
-			lastconst = nil
-		}
-	case 32:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:387
-		{
-			yyVAL.list = yyDollar[3].list
-			iota_ = -100000
-			lastconst = nil
-		}
-	case 33:
-		yyDollar = yyS[yypt-7 : yypt+1]
-		//line go.y:393
-		{
-			yyVAL.list = concat(yyDollar[3].list, yyDollar[5].list)
-			iota_ = -100000
-			lastconst = nil
-		}
-	case 34:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:399
-		{
-			yyVAL.list = nil
-			iota_ = -100000
-		}
-	case 35:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:404
-		{
-			yyVAL.list = list1(yyDollar[2].node)
-		}
-	case 36:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:408
-		{
-			yyVAL.list = yyDollar[3].list
-		}
-	case 37:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:412
-		{
-			yyVAL.list = nil
-		}
-	case 38:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:418
-		{
-			iota_ = 0
-		}
-	case 39:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:424
-		{
-			yyVAL.list = variter(yyDollar[1].list, yyDollar[2].node, nil)
-		}
-	case 40:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:428
-		{
-			yyVAL.list = variter(yyDollar[1].list, yyDollar[2].node, yyDollar[4].list)
-		}
-	case 41:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:432
-		{
-			yyVAL.list = variter(yyDollar[1].list, nil, yyDollar[3].list)
-		}
-	case 42:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:438
-		{
-			yyVAL.list = constiter(yyDollar[1].list, yyDollar[2].node, yyDollar[4].list)
-		}
-	case 43:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:442
-		{
-			yyVAL.list = constiter(yyDollar[1].list, nil, yyDollar[3].list)
-		}
-	case 45:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:449
-		{
-			yyVAL.list = constiter(yyDollar[1].list, yyDollar[2].node, nil)
-		}
-	case 46:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:453
-		{
-			yyVAL.list = constiter(yyDollar[1].list, nil, nil)
-		}
-	case 47:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:459
-		{
-			// different from dclname because the name
-			// becomes visible right here, not at the end
-			// of the declaration.
-			yyVAL.node = typedcl0(yyDollar[1].sym)
-		}
-	case 48:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:468
-		{
-			yyVAL.node = typedcl1(yyDollar[1].node, yyDollar[2].node, true)
-		}
-	case 49:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:474
-		{
-			yyVAL.node = yyDollar[1].node
-
-			// These nodes do not carry line numbers.
-			// Since a bare name used as an expression is an error,
-			// introduce a wrapper node to give the correct line.
-			switch yyVAL.node.Op {
-			case ONAME, ONONAME, OTYPE, OPACK, OLITERAL:
-				yyVAL.node = Nod(OPAREN, yyVAL.node, nil)
-				yyVAL.node.Implicit = true
-				break
-			}
-		}
-	case 50:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:488
-		{
-			yyVAL.node = Nod(OASOP, yyDollar[1].node, yyDollar[3].node)
-			yyVAL.node.Etype = uint8(yyDollar[2].i) // rathole to pass opcode
-		}
-	case 51:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:493
-		{
-			if yyDollar[1].list.Next == nil && yyDollar[3].list.Next == nil {
-				// simple
-				yyVAL.node = Nod(OAS, yyDollar[1].list.N, yyDollar[3].list.N)
-				break
-			}
-			// multiple
-			yyVAL.node = Nod(OAS2, nil, nil)
-			yyVAL.node.List = yyDollar[1].list
-			yyVAL.node.Rlist = yyDollar[3].list
-		}
-	case 52:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:505
-		{
-			if yyDollar[3].list.N.Op == OTYPESW {
-				yyVAL.node = Nod(OTYPESW, nil, yyDollar[3].list.N.Right)
-				if yyDollar[3].list.Next != nil {
-					Yyerror("expr.(type) must be alone in list")
-				}
-				if yyDollar[1].list.Next != nil {
-					Yyerror("argument count mismatch: %d = %d", count(yyDollar[1].list), 1)
-				} else if (yyDollar[1].list.N.Op != ONAME && yyDollar[1].list.N.Op != OTYPE && yyDollar[1].list.N.Op != ONONAME) || isblank(yyDollar[1].list.N) {
-					Yyerror("invalid variable name %s in type switch", yyDollar[1].list.N)
-				} else {
-					yyVAL.node.Left = dclname(yyDollar[1].list.N.Sym)
-				} // it's a colas, so must not re-use an oldname.
-				break
-			}
-			yyVAL.node = colas(yyDollar[1].list, yyDollar[3].list, int32(yyDollar[2].i))
-		}
-	case 53:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:523
-		{
-			yyVAL.node = Nod(OASOP, yyDollar[1].node, Nodintconst(1))
-			yyVAL.node.Implicit = true
-			yyVAL.node.Etype = OADD
-		}
-	case 54:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:529
-		{
-			yyVAL.node = Nod(OASOP, yyDollar[1].node, Nodintconst(1))
-			yyVAL.node.Implicit = true
-			yyVAL.node.Etype = OSUB
-		}
-	case 55:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:537
-		{
-			var n, nn *Node
-
-			// will be converted to OCASE
-			// right will point to next case
-			// done in casebody()
-			markdcl()
-			yyVAL.node = Nod(OXCASE, nil, nil)
-			yyVAL.node.List = yyDollar[2].list
-			if typesw != nil && typesw.Right != nil {
-				n = typesw.Right.Left
-				if n != nil {
-					// type switch - declare variable
-					nn = newname(n.Sym)
-					declare(nn, dclcontext)
-					yyVAL.node.Rlist = list1(nn)
-
-					// keep track of the instances for reporting unused
-					nn.Name.Defn = typesw.Right
-				}
-			}
-		}
-	case 56:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:560
-		{
-			var n *Node
-
-			// will be converted to OCASE
-			// right will point to next case
-			// done in casebody()
-			markdcl()
-			yyVAL.node = Nod(OXCASE, nil, nil)
-			if yyDollar[2].list.Next == nil {
-				n = Nod(OAS, yyDollar[2].list.N, yyDollar[4].node)
-			} else {
-				n = Nod(OAS2, nil, nil)
-				n.List = yyDollar[2].list
-				n.Rlist = list1(yyDollar[4].node)
-			}
-			yyVAL.node.List = list1(n)
-		}
-	case 57:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:578
-		{
-			// will be converted to OCASE
-			// right will point to next case
-			// done in casebody()
-			markdcl()
-			yyVAL.node = Nod(OXCASE, nil, nil)
-			yyVAL.node.List = list1(colas(yyDollar[2].list, list1(yyDollar[4].node), int32(yyDollar[3].i)))
-		}
-	case 58:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:587
-		{
-			var n, nn *Node
-
-			markdcl()
-			yyVAL.node = Nod(OXCASE, nil, nil)
-			if typesw != nil && typesw.Right != nil {
-				n = typesw.Right.Left
-				if n != nil {
-					// type switch - declare variable
-					nn = newname(n.Sym)
-					declare(nn, dclcontext)
-					yyVAL.node.Rlist = list1(nn)
-
-					// keep track of the instances for reporting unused
-					nn.Name.Defn = typesw.Right
-				}
-			}
-		}
-	case 59:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:608
-		{
-			markdcl()
-		}
-	case 60:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:612
-		{
-			if yyDollar[3].list == nil {
-				yyVAL.node = Nod(OEMPTY, nil, nil)
-			} else {
-				yyVAL.node = liststmt(yyDollar[3].list)
-			}
-			popdcl()
-		}
-	case 61:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:623
-		{
-			// If the last token read by the lexer was consumed
-			// as part of the case, clear it (parser has cleared yychar).
-			// If the last token read by the lexer was the lookahead
-			// leave it alone (parser has it cached in yychar).
-			// This is so that the stmt_list action doesn't look at
-			// the case tokens if the stmt_list is empty.
-			yylast = yychar
-			yyDollar[1].node.Xoffset = int64(block)
-		}
-	case 62:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:634
-		{
-			// This is the only place in the language where a statement
-			// list is not allowed to drop the final semicolon, because
-			// it's the only place where a statement list is not followed
-			// by a closing brace.  Handle the error for pedantry.
-
-			// Find the final token of the statement list.
-			// yylast is lookahead; yyprev is last of stmt_list
-			last := yyprev
-
-			if last > 0 && last != ';' && yychar != '}' {
-				Yyerror("missing statement after label")
-			}
-			yyVAL.node = yyDollar[1].node
-			yyVAL.node.Nbody = yyDollar[3].list
-			popdcl()
-		}
-	case 63:
-		yyDollar = yyS[yypt-0 : yypt+1]
-		//line go.y:653
-		{
-			yyVAL.list = nil
-		}
-	case 64:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:657
-		{
-			yyVAL.list = list(yyDollar[1].list, yyDollar[2].node)
-		}
-	case 65:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:663
-		{
-			markdcl()
-		}
-	case 66:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:667
-		{
-			yyVAL.list = yyDollar[3].list
-			popdcl()
-		}
-	case 67:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:674
-		{
-			yyVAL.node = Nod(ORANGE, nil, yyDollar[4].node)
-			yyVAL.node.List = yyDollar[1].list
-			yyVAL.node.Etype = 0 // := flag
-		}
-	case 68:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:680
-		{
-			yyVAL.node = Nod(ORANGE, nil, yyDollar[4].node)
-			yyVAL.node.List = yyDollar[1].list
-			yyVAL.node.Colas = true
-			colasdefn(yyDollar[1].list, yyVAL.node)
-		}
-	case 69:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:687
-		{
-			yyVAL.node = Nod(ORANGE, nil, yyDollar[2].node)
-			yyVAL.node.Etype = 0 // := flag
-		}
-	case 70:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:694
-		{
-			// init ; test ; incr
-			if yyDollar[5].node != nil && yyDollar[5].node.Colas {
-				Yyerror("cannot declare in the for-increment")
-			}
-			yyVAL.node = Nod(OFOR, nil, nil)
-			if yyDollar[1].node != nil {
-				yyVAL.node.Ninit = list1(yyDollar[1].node)
-			}
-			yyVAL.node.Left = yyDollar[3].node
-			yyVAL.node.Right = yyDollar[5].node
-		}
-	case 71:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:707
-		{
-			// normal test
-			yyVAL.node = Nod(OFOR, nil, nil)
-			yyVAL.node.Left = yyDollar[1].node
-		}
-	case 73:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:716
-		{
-			yyVAL.node = yyDollar[1].node
-			yyVAL.node.Nbody = concat(yyVAL.node.Nbody, yyDollar[2].list)
-		}
-	case 74:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:723
-		{
-			markdcl()
-		}
-	case 75:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:727
-		{
-			yyVAL.node = yyDollar[3].node
-			popdcl()
-		}
-	case 76:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:734
-		{
-			// test
-			yyVAL.node = Nod(OIF, nil, nil)
-			yyVAL.node.Left = yyDollar[1].node
-		}
-	case 77:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:740
-		{
-			// init ; test
-			yyVAL.node = Nod(OIF, nil, nil)
-			if yyDollar[1].node != nil {
-				yyVAL.node.Ninit = list1(yyDollar[1].node)
-			}
-			yyVAL.node.Left = yyDollar[3].node
-		}
-	case 78:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:752
-		{
-			markdcl()
-		}
-	case 79:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:756
-		{
-			if yyDollar[3].node.Left == nil {
-				Yyerror("missing condition in if statement")
-			}
-		}
-	case 80:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:762
-		{
-			yyDollar[3].node.Nbody = yyDollar[5].list
-		}
-	case 81:
-		yyDollar = yyS[yypt-8 : yypt+1]
-		//line go.y:766
-		{
-			var n *Node
-			var nn *NodeList
-
-			yyVAL.node = yyDollar[3].node
-			n = yyDollar[3].node
-			popdcl()
-			for nn = concat(yyDollar[7].list, yyDollar[8].list); nn != nil; nn = nn.Next {
-				if nn.N.Op == OIF {
-					popdcl()
-				}
-				n.Rlist = list1(nn.N)
-				n = nn.N
-			}
-		}
-	case 82:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:784
-		{
-			markdcl()
-		}
-	case 83:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:788
-		{
-			if yyDollar[4].node.Left == nil {
-				Yyerror("missing condition in if statement")
-			}
-			yyDollar[4].node.Nbody = yyDollar[5].list
-			yyVAL.list = list1(yyDollar[4].node)
-		}
-	case 84:
-		yyDollar = yyS[yypt-0 : yypt+1]
-		//line go.y:797
-		{
-			yyVAL.list = nil
-		}
-	case 85:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:801
-		{
-			yyVAL.list = concat(yyDollar[1].list, yyDollar[2].list)
-		}
-	case 86:
-		yyDollar = yyS[yypt-0 : yypt+1]
-		//line go.y:806
-		{
-			yyVAL.list = nil
-		}
-	case 87:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:810
-		{
-			l := &NodeList{N: yyDollar[2].node}
-			l.End = l
-			yyVAL.list = l
-		}
-	case 88:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:818
-		{
-			markdcl()
-		}
-	case 89:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:822
-		{
-			var n *Node
-			n = yyDollar[3].node.Left
-			if n != nil && n.Op != OTYPESW {
-				n = nil
-			}
-			typesw = Nod(OXXX, typesw, n)
-		}
-	case 90:
-		yyDollar = yyS[yypt-7 : yypt+1]
-		//line go.y:831
-		{
-			yyVAL.node = yyDollar[3].node
-			yyVAL.node.Op = OSWITCH
-			yyVAL.node.List = yyDollar[6].list
-			typesw = typesw.Left
-			popdcl()
-		}
-	case 91:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:841
-		{
-			typesw = Nod(OXXX, typesw, nil)
-		}
-	case 92:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:845
-		{
-			yyVAL.node = Nod(OSELECT, nil, nil)
-			yyVAL.node.Lineno = typesw.Lineno
-			yyVAL.node.List = yyDollar[4].list
-			typesw = typesw.Left
-		}
-	case 94:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:858
-		{
-			yyVAL.node = Nod(OOROR, yyDollar[1].node, yyDollar[3].node)
-		}
-	case 95:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:862
-		{
-			yyVAL.node = Nod(OANDAND, yyDollar[1].node, yyDollar[3].node)
-		}
-	case 96:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:866
-		{
-			yyVAL.node = Nod(OEQ, yyDollar[1].node, yyDollar[3].node)
-		}
-	case 97:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:870
-		{
-			yyVAL.node = Nod(ONE, yyDollar[1].node, yyDollar[3].node)
-		}
-	case 98:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:874
-		{
-			yyVAL.node = Nod(OLT, yyDollar[1].node, yyDollar[3].node)
-		}
-	case 99:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:878
-		{
-			yyVAL.node = Nod(OLE, yyDollar[1].node, yyDollar[3].node)
-		}
-	case 100:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:882
-		{
-			yyVAL.node = Nod(OGE, yyDollar[1].node, yyDollar[3].node)
-		}
-	case 101:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:886
-		{
-			yyVAL.node = Nod(OGT, yyDollar[1].node, yyDollar[3].node)
-		}
-	case 102:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:890
-		{
-			yyVAL.node = Nod(OADD, yyDollar[1].node, yyDollar[3].node)
-		}
-	case 103:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:894
-		{
-			yyVAL.node = Nod(OSUB, yyDollar[1].node, yyDollar[3].node)
-		}
-	case 104:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:898
-		{
-			yyVAL.node = Nod(OOR, yyDollar[1].node, yyDollar[3].node)
-		}
-	case 105:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:902
-		{
-			yyVAL.node = Nod(OXOR, yyDollar[1].node, yyDollar[3].node)
-		}
-	case 106:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:906
-		{
-			yyVAL.node = Nod(OMUL, yyDollar[1].node, yyDollar[3].node)
-		}
-	case 107:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:910
-		{
-			yyVAL.node = Nod(ODIV, yyDollar[1].node, yyDollar[3].node)
-		}
-	case 108:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:914
-		{
-			yyVAL.node = Nod(OMOD, yyDollar[1].node, yyDollar[3].node)
-		}
-	case 109:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:918
-		{
-			yyVAL.node = Nod(OAND, yyDollar[1].node, yyDollar[3].node)
-		}
-	case 110:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:922
-		{
-			yyVAL.node = Nod(OANDNOT, yyDollar[1].node, yyDollar[3].node)
-		}
-	case 111:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:926
-		{
-			yyVAL.node = Nod(OLSH, yyDollar[1].node, yyDollar[3].node)
-		}
-	case 112:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:930
-		{
-			yyVAL.node = Nod(ORSH, yyDollar[1].node, yyDollar[3].node)
-		}
-	case 113:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:935
-		{
-			yyVAL.node = Nod(OSEND, yyDollar[1].node, yyDollar[3].node)
-		}
-	case 115:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:942
-		{
-			yyVAL.node = Nod(OIND, yyDollar[2].node, nil)
-		}
-	case 116:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:946
-		{
-			if yyDollar[2].node.Op == OCOMPLIT {
-				// Special case for &T{...}: turn into (*T){...}.
-				yyVAL.node = yyDollar[2].node
-				yyVAL.node.Right = Nod(OIND, yyVAL.node.Right, nil)
-				yyVAL.node.Right.Implicit = true
-			} else {
-				yyVAL.node = Nod(OADDR, yyDollar[2].node, nil)
-			}
-		}
-	case 117:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:957
-		{
-			yyVAL.node = Nod(OPLUS, yyDollar[2].node, nil)
-		}
-	case 118:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:961
-		{
-			yyVAL.node = Nod(OMINUS, yyDollar[2].node, nil)
-		}
-	case 119:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:965
-		{
-			yyVAL.node = Nod(ONOT, yyDollar[2].node, nil)
-		}
-	case 120:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:969
-		{
-			Yyerror("the bitwise complement operator is ^")
-			yyVAL.node = Nod(OCOM, yyDollar[2].node, nil)
-		}
-	case 121:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:974
-		{
-			yyVAL.node = Nod(OCOM, yyDollar[2].node, nil)
-		}
-	case 122:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:978
-		{
-			yyVAL.node = Nod(ORECV, yyDollar[2].node, nil)
-		}
-	case 123:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:988
-		{
-			yyVAL.node = Nod(OCALL, yyDollar[1].node, nil)
-		}
-	case 124:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:992
-		{
-			yyVAL.node = Nod(OCALL, yyDollar[1].node, nil)
-			yyVAL.node.List = yyDollar[3].list
-		}
-	case 125:
-		yyDollar = yyS[yypt-6 : yypt+1]
-		//line go.y:997
-		{
-			yyVAL.node = Nod(OCALL, yyDollar[1].node, nil)
-			yyVAL.node.List = yyDollar[3].list
-			yyVAL.node.Isddd = true
-		}
-	case 126:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1005
-		{
-			yyVAL.node = nodlit(yyDollar[1].val)
-		}
-	case 128:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1010
-		{
-			if yyDollar[1].node.Op == OPACK {
-				var s *Sym
-				s = restrictlookup(yyDollar[3].sym.Name, yyDollar[1].node.Name.Pkg)
-				yyDollar[1].node.Used = true
-				yyVAL.node = oldname(s)
-				break
-			}
-			yyVAL.node = Nod(OXDOT, yyDollar[1].node, newname(yyDollar[3].sym))
-		}
-	case 129:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:1021
-		{
-			yyVAL.node = Nod(ODOTTYPE, yyDollar[1].node, yyDollar[4].node)
-		}
-	case 130:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:1025
-		{
-			yyVAL.node = Nod(OTYPESW, nil, yyDollar[1].node)
-		}
-	case 131:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:1029
-		{
-			yyVAL.node = Nod(OINDEX, yyDollar[1].node, yyDollar[3].node)
-		}
-	case 132:
-		yyDollar = yyS[yypt-6 : yypt+1]
-		//line go.y:1033
-		{
-			yyVAL.node = Nod(OSLICE, yyDollar[1].node, Nod(OKEY, yyDollar[3].node, yyDollar[5].node))
-		}
-	case 133:
-		yyDollar = yyS[yypt-8 : yypt+1]
-		//line go.y:1037
-		{
-			if yyDollar[5].node == nil {
-				Yyerror("middle index required in 3-index slice")
-			}
-			if yyDollar[7].node == nil {
-				Yyerror("final index required in 3-index slice")
-			}
-			yyVAL.node = Nod(OSLICE3, yyDollar[1].node, Nod(OKEY, yyDollar[3].node, Nod(OKEY, yyDollar[5].node, yyDollar[7].node)))
-		}
-	case 135:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:1048
-		{
-			// conversion
-			yyVAL.node = Nod(OCALL, yyDollar[1].node, nil)
-			yyVAL.node.List = list1(yyDollar[3].node)
-		}
-	case 136:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:1054
-		{
-			yyVAL.node = yyDollar[3].node
-			yyVAL.node.Right = yyDollar[1].node
-			yyVAL.node.List = yyDollar[4].list
-			fixlbrace(yyDollar[2].i)
-		}
-	case 137:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:1061
-		{
-			yyVAL.node = yyDollar[3].node
-			yyVAL.node.Right = yyDollar[1].node
-			yyVAL.node.List = yyDollar[4].list
-		}
-	case 138:
-		yyDollar = yyS[yypt-7 : yypt+1]
-		//line go.y:1067
-		{
-			Yyerror("cannot parenthesize type in composite literal")
-			yyVAL.node = yyDollar[5].node
-			yyVAL.node.Right = yyDollar[2].node
-			yyVAL.node.List = yyDollar[6].list
-		}
-	case 140:
-		yyDollar = yyS[yypt-0 : yypt+1]
-		//line go.y:1076
-		{
-			// composite expression.
-			// make node early so we get the right line number.
-			yyVAL.node = Nod(OCOMPLIT, nil, nil)
-		}
-	case 141:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1084
-		{
-			yyVAL.node = Nod(OKEY, yyDollar[1].node, yyDollar[3].node)
-		}
-	case 142:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1090
-		{
-			// These nodes do not carry line numbers.
-			// Since a composite literal commonly spans several lines,
-			// the line number on errors may be misleading.
-			// Introduce a wrapper node to give the correct line.
-			yyVAL.node = yyDollar[1].node
-			switch yyVAL.node.Op {
-			case ONAME, ONONAME, OTYPE, OPACK, OLITERAL:
-				yyVAL.node = Nod(OPAREN, yyVAL.node, nil)
-				yyVAL.node.Implicit = true
-			}
-		}
-	case 143:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:1103
-		{
-			yyVAL.node = yyDollar[2].node
-			yyVAL.node.List = yyDollar[3].list
-		}
-	case 145:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:1111
-		{
-			yyVAL.node = yyDollar[2].node
-			yyVAL.node.List = yyDollar[3].list
-		}
-	case 147:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1119
-		{
-			yyVAL.node = yyDollar[2].node
-
-			// Need to know on lhs of := whether there are ( ).
-			// Don't bother with the OPAREN in other cases:
-			// it's just a waste of memory and time.
-			switch yyVAL.node.Op {
-			case ONAME, ONONAME, OPACK, OTYPE, OLITERAL, OTYPESW:
-				yyVAL.node = Nod(OPAREN, yyVAL.node, nil)
-			}
-		}
-	case 151:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1140
-		{
-			yyVAL.i = LBODY
-		}
-	case 152:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1144
-		{
-			yyVAL.i = '{'
-		}
-	case 153:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1155
-		{
-			if yyDollar[1].sym == nil {
-				yyVAL.node = nil
-			} else {
-				yyVAL.node = newname(yyDollar[1].sym)
-			}
-		}
-	case 154:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1165
-		{
-			yyVAL.node = dclname(yyDollar[1].sym)
-		}
-	case 155:
-		yyDollar = yyS[yypt-0 : yypt+1]
-		//line go.y:1170
-		{
-			yyVAL.node = nil
-		}
-	case 157:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1177
-		{
-			yyVAL.sym = yyDollar[1].sym
-			// during imports, unqualified non-exported identifiers are from builtinpkg
-			if importpkg != nil && !exportname(yyDollar[1].sym.Name) {
-				yyVAL.sym = Pkglookup(yyDollar[1].sym.Name, builtinpkg)
-			}
-		}
-	case 159:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1186
-		{
-			yyVAL.sym = nil
-		}
-	case 160:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:1192
-		{
-			var p *Pkg
-
-			if yyDollar[2].val.U.(string) == "" {
-				p = importpkg
-			} else {
-				if isbadimport(yyDollar[2].val.U.(string)) {
-					errorexit()
-				}
-				p = mkpkg(yyDollar[2].val.U.(string))
-			}
-			yyVAL.sym = Pkglookup(yyDollar[4].sym.Name, p)
-		}
-	case 161:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:1206
-		{
-			var p *Pkg
-
-			if yyDollar[2].val.U.(string) == "" {
-				p = importpkg
-			} else {
-				if isbadimport(yyDollar[2].val.U.(string)) {
-					errorexit()
-				}
-				p = mkpkg(yyDollar[2].val.U.(string))
-			}
-			yyVAL.sym = Pkglookup("?", p)
-		}
-	case 162:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1222
-		{
-			yyVAL.node = oldname(yyDollar[1].sym)
-			if yyVAL.node.Name != nil && yyVAL.node.Name.Pack != nil {
-				yyVAL.node.Name.Pack.Used = true
-			}
-		}
-	case 164:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1243
-		{
-			Yyerror("final argument in variadic function missing type")
-			yyVAL.node = Nod(ODDD, typenod(typ(TINTER)), nil)
-		}
-	case 165:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:1248
-		{
-			yyVAL.node = Nod(ODDD, yyDollar[2].node, nil)
-		}
-	case 171:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1259
-		{
-			yyVAL.node = yyDollar[2].node
-		}
-	case 175:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:1268
-		{
-			yyVAL.node = Nod(OIND, yyDollar[2].node, nil)
-		}
-	case 180:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1278
-		{
-			yyVAL.node = yyDollar[2].node
-		}
-	case 190:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1299
-		{
-			if yyDollar[1].node.Op == OPACK {
-				var s *Sym
-				s = restrictlookup(yyDollar[3].sym.Name, yyDollar[1].node.Name.Pkg)
-				yyDollar[1].node.Used = true
-				yyVAL.node = oldname(s)
-				break
-			}
-			yyVAL.node = Nod(OXDOT, yyDollar[1].node, newname(yyDollar[3].sym))
-		}
-	case 191:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:1312
-		{
-			yyVAL.node = Nod(OTARRAY, yyDollar[2].node, yyDollar[4].node)
-		}
-	case 192:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:1316
-		{
-			// array literal of nelem
-			yyVAL.node = Nod(OTARRAY, Nod(ODDD, nil, nil), yyDollar[4].node)
-		}
-	case 193:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:1321
-		{
-			yyVAL.node = Nod(OTCHAN, yyDollar[2].node, nil)
-			yyVAL.node.Etype = Cboth
-		}
-	case 194:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1326
-		{
-			yyVAL.node = Nod(OTCHAN, yyDollar[3].node, nil)
-			yyVAL.node.Etype = Csend
-		}
-	case 195:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:1331
-		{
-			yyVAL.node = Nod(OTMAP, yyDollar[3].node, yyDollar[5].node)
-		}
-	case 198:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:1339
-		{
-			yyVAL.node = Nod(OIND, yyDollar[2].node, nil)
-		}
-	case 199:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1345
-		{
-			yyVAL.node = Nod(OTCHAN, yyDollar[3].node, nil)
-			yyVAL.node.Etype = Crecv
-		}
-	case 200:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:1352
-		{
-			yyVAL.node = Nod(OTSTRUCT, nil, nil)
-			yyVAL.node.List = yyDollar[3].list
-			fixlbrace(yyDollar[2].i)
-		}
-	case 201:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1358
-		{
-			yyVAL.node = Nod(OTSTRUCT, nil, nil)
-			fixlbrace(yyDollar[2].i)
-		}
-	case 202:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:1365
-		{
-			yyVAL.node = Nod(OTINTER, nil, nil)
-			yyVAL.node.List = yyDollar[3].list
-			fixlbrace(yyDollar[2].i)
-		}
-	case 203:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1371
-		{
-			yyVAL.node = Nod(OTINTER, nil, nil)
-			fixlbrace(yyDollar[2].i)
-		}
-	case 204:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1382
-		{
-			yyVAL.node = yyDollar[2].node
-			if yyVAL.node == nil {
-				break
-			}
-			if noescape && yyDollar[3].list != nil {
-				Yyerror("can only use //go:noescape with external func implementations")
-			}
-			yyVAL.node.Nbody = yyDollar[3].list
-			yyVAL.node.Func.Endlineno = lineno
-			yyVAL.node.Noescape = noescape
-			yyVAL.node.Func.Norace = norace
-			yyVAL.node.Func.Nosplit = nosplit
-			yyVAL.node.Func.Nowritebarrier = nowritebarrier
-			yyVAL.node.Func.Systemstack = systemstack
-			funcbody(yyVAL.node)
-		}
-	case 205:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:1402
-		{
-			var t *Node
-
-			yyVAL.node = nil
-			yyDollar[3].list = checkarglist(yyDollar[3].list, 1)
-
-			if yyDollar[1].sym.Name == "init" {
-				yyDollar[1].sym = renameinit()
-				if yyDollar[3].list != nil || yyDollar[5].list != nil {
-					Yyerror("func init must have no arguments and no return values")
-				}
-			}
-			if localpkg.Name == "main" && yyDollar[1].sym.Name == "main" {
-				if yyDollar[3].list != nil || yyDollar[5].list != nil {
-					Yyerror("func main must have no arguments and no return values")
-				}
-			}
-
-			t = Nod(OTFUNC, nil, nil)
-			t.List = yyDollar[3].list
-			t.Rlist = yyDollar[5].list
-
-			yyVAL.node = Nod(ODCLFUNC, nil, nil)
-			yyVAL.node.Func.Nname = newfuncname(yyDollar[1].sym)
-			yyVAL.node.Func.Nname.Name.Defn = yyVAL.node
-			yyVAL.node.Func.Nname.Name.Param.Ntype = t // TODO: check if nname already has an ntype
-			declare(yyVAL.node.Func.Nname, PFUNC)
-
-			funchdr(yyVAL.node)
-		}
-	case 206:
-		yyDollar = yyS[yypt-8 : yypt+1]
-		//line go.y:1433
-		{
-			var rcvr, t *Node
-
-			yyVAL.node = nil
-			yyDollar[2].list = checkarglist(yyDollar[2].list, 0)
-			yyDollar[6].list = checkarglist(yyDollar[6].list, 1)
-
-			if yyDollar[2].list == nil {
-				Yyerror("method has no receiver")
-				break
-			}
-			if yyDollar[2].list.Next != nil {
-				Yyerror("method has multiple receivers")
-				break
-			}
-			rcvr = yyDollar[2].list.N
-			if rcvr.Op != ODCLFIELD {
-				Yyerror("bad receiver in method")
-				break
-			}
-
-			t = Nod(OTFUNC, rcvr, nil)
-			t.List = yyDollar[6].list
-			t.Rlist = yyDollar[8].list
-
-			yyVAL.node = Nod(ODCLFUNC, nil, nil)
-			yyVAL.node.Func.Shortname = newfuncname(yyDollar[4].sym)
-			yyVAL.node.Func.Nname = methodname1(yyVAL.node.Func.Shortname, rcvr.Right)
-			yyVAL.node.Func.Nname.Name.Defn = yyVAL.node
-			yyVAL.node.Func.Nname.Name.Param.Ntype = t
-			yyVAL.node.Func.Nname.Nointerface = nointerface
-			declare(yyVAL.node.Func.Nname, PFUNC)
-
-			funchdr(yyVAL.node)
-		}
-	case 207:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:1471
-		{
-			var s *Sym
-			var t *Type
-
-			yyVAL.node = nil
-
-			s = yyDollar[1].sym
-			t = functype(nil, yyDollar[3].list, yyDollar[5].list)
-
-			importsym(s, ONAME)
-			if s.Def != nil && s.Def.Op == ONAME {
-				if Eqtype(t, s.Def.Type) {
-					dclcontext = PDISCARD // since we skip funchdr below
-					break
-				}
-				Yyerror("inconsistent definition for func %v during import\n\t%v\n\t%v", s, s.Def.Type, t)
-			}
-
-			yyVAL.node = newfuncname(s)
-			yyVAL.node.Type = t
-			declare(yyVAL.node, PFUNC)
-
-			funchdr(yyVAL.node)
-		}
-	case 208:
-		yyDollar = yyS[yypt-8 : yypt+1]
-		//line go.y:1496
-		{
-			yyVAL.node = methodname1(newname(yyDollar[4].sym), yyDollar[2].list.N.Right)
-			yyVAL.node.Type = functype(yyDollar[2].list.N, yyDollar[6].list, yyDollar[8].list)
-
-			checkwidth(yyVAL.node.Type)
-			addmethod(yyDollar[4].sym, yyVAL.node.Type, false, nointerface)
-			nointerface = false
-			funchdr(yyVAL.node)
-
-			// inl.C's inlnode in on a dotmeth node expects to find the inlineable body as
-			// (dotmeth's type).Nname.Inl, and dotmeth's type has been pulled
-			// out by typecheck's lookdot as this $$.ttype.  So by providing
-			// this back link here we avoid special casing there.
-			yyVAL.node.Type.Nname = yyVAL.node
-		}
-	case 209:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:1514
-		{
-			yyDollar[3].list = checkarglist(yyDollar[3].list, 1)
-			yyVAL.node = Nod(OTFUNC, nil, nil)
-			yyVAL.node.List = yyDollar[3].list
-			yyVAL.node.Rlist = yyDollar[5].list
-		}
-	case 210:
-		yyDollar = yyS[yypt-0 : yypt+1]
-		//line go.y:1522
-		{
-			yyVAL.list = nil
-		}
-	case 211:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1526
-		{
-			yyVAL.list = yyDollar[2].list
-			if yyVAL.list == nil {
-				yyVAL.list = list1(Nod(OEMPTY, nil, nil))
-			}
-		}
-	case 212:
-		yyDollar = yyS[yypt-0 : yypt+1]
-		//line go.y:1535
-		{
-			yyVAL.list = nil
-		}
-	case 213:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1539
-		{
-			yyVAL.list = list1(Nod(ODCLFIELD, nil, yyDollar[1].node))
-		}
-	case 214:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1543
-		{
-			yyDollar[2].list = checkarglist(yyDollar[2].list, 0)
-			yyVAL.list = yyDollar[2].list
-		}
-	case 215:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1550
-		{
-			closurehdr(yyDollar[1].node)
-		}
-	case 216:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:1556
-		{
-			yyVAL.node = closurebody(yyDollar[3].list)
-			fixlbrace(yyDollar[2].i)
-		}
-	case 217:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:1561
-		{
-			yyVAL.node = closurebody(nil)
-		}
-	case 218:
-		yyDollar = yyS[yypt-0 : yypt+1]
-		//line go.y:1572
-		{
-			yyVAL.list = nil
-		}
-	case 219:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1576
-		{
-			yyVAL.list = concat(yyDollar[1].list, yyDollar[2].list)
-			if nsyntaxerrors == 0 {
-				testdclstack()
-			}
-			nointerface = false
-			noescape = false
-			norace = false
-			nosplit = false
-			nowritebarrier = false
-			systemstack = false
-		}
-	case 221:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1592
-		{
-			yyVAL.list = concat(yyDollar[1].list, yyDollar[3].list)
-		}
-	case 223:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1599
-		{
-			yyVAL.list = concat(yyDollar[1].list, yyDollar[3].list)
-		}
-	case 224:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1605
-		{
-			yyVAL.list = list1(yyDollar[1].node)
-		}
-	case 225:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1609
-		{
-			yyVAL.list = list(yyDollar[1].list, yyDollar[3].node)
-		}
-	case 227:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1616
-		{
-			yyVAL.list = concat(yyDollar[1].list, yyDollar[3].list)
-		}
-	case 228:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1622
-		{
-			yyVAL.list = list1(yyDollar[1].node)
-		}
-	case 229:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1626
-		{
-			yyVAL.list = list(yyDollar[1].list, yyDollar[3].node)
-		}
-	case 230:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1632
-		{
-			var l *NodeList
-
-			var n *Node
-			l = yyDollar[1].list
-			if l == nil || l.N.Sym.Name == "?" {
-				// ? symbol, during import (list1(nil) == nil)
-				n = yyDollar[2].node
-				if n.Op == OIND {
-					n = n.Left
-				}
-				n = embedded(n.Sym, importpkg)
-				n.Right = yyDollar[2].node
-				n.SetVal(yyDollar[3].val)
-				yyVAL.list = list1(n)
-				break
-			}
-
-			for l = yyDollar[1].list; l != nil; l = l.Next {
-				l.N = Nod(ODCLFIELD, l.N, yyDollar[2].node)
-				l.N.SetVal(yyDollar[3].val)
-			}
-		}
-	case 231:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:1656
-		{
-			yyDollar[1].node.SetVal(yyDollar[2].val)
-			yyVAL.list = list1(yyDollar[1].node)
-		}
-	case 232:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:1661
-		{
-			yyDollar[2].node.SetVal(yyDollar[4].val)
-			yyVAL.list = list1(yyDollar[2].node)
-			Yyerror("cannot parenthesize embedded type")
-		}
-	case 233:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1667
-		{
-			yyDollar[2].node.Right = Nod(OIND, yyDollar[2].node.Right, nil)
-			yyDollar[2].node.SetVal(yyDollar[3].val)
-			yyVAL.list = list1(yyDollar[2].node)
-		}
-	case 234:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:1673
-		{
-			yyDollar[3].node.Right = Nod(OIND, yyDollar[3].node.Right, nil)
-			yyDollar[3].node.SetVal(yyDollar[5].val)
-			yyVAL.list = list1(yyDollar[3].node)
-			Yyerror("cannot parenthesize embedded type")
-		}
-	case 235:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:1680
-		{
-			yyDollar[3].node.Right = Nod(OIND, yyDollar[3].node.Right, nil)
-			yyDollar[3].node.SetVal(yyDollar[5].val)
-			yyVAL.list = list1(yyDollar[3].node)
-			Yyerror("cannot parenthesize embedded type")
-		}
-	case 236:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1689
-		{
-			var n *Node
-
-			yyVAL.sym = yyDollar[1].sym
-			n = oldname(yyDollar[1].sym)
-			if n.Name != nil && n.Name.Pack != nil {
-				n.Name.Pack.Used = true
-			}
-		}
-	case 237:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1699
-		{
-			var pkg *Pkg
-
-			if yyDollar[1].sym.Def == nil || yyDollar[1].sym.Def.Op != OPACK {
-				Yyerror("%v is not a package", yyDollar[1].sym)
-				pkg = localpkg
-			} else {
-				yyDollar[1].sym.Def.Used = true
-				pkg = yyDollar[1].sym.Def.Name.Pkg
-			}
-			yyVAL.sym = restrictlookup(yyDollar[3].sym.Name, pkg)
-		}
-	case 238:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1714
-		{
-			yyVAL.node = embedded(yyDollar[1].sym, localpkg)
-		}
-	case 239:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:1720
-		{
-			yyVAL.node = Nod(ODCLFIELD, yyDollar[1].node, yyDollar[2].node)
-			ifacedcl(yyVAL.node)
-		}
-	case 240:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1725
-		{
-			yyVAL.node = Nod(ODCLFIELD, nil, oldname(yyDollar[1].sym))
-		}
-	case 241:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1729
-		{
-			yyVAL.node = Nod(ODCLFIELD, nil, oldname(yyDollar[2].sym))
-			Yyerror("cannot parenthesize embedded type")
-		}
-	case 242:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:1736
-		{
-			// without func keyword
-			yyDollar[2].list = checkarglist(yyDollar[2].list, 1)
-			yyVAL.node = Nod(OTFUNC, fakethis(), nil)
-			yyVAL.node.List = yyDollar[2].list
-			yyVAL.node.Rlist = yyDollar[4].list
-		}
-	case 244:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:1750
-		{
-			yyVAL.node = Nod(ONONAME, nil, nil)
-			yyVAL.node.Sym = yyDollar[1].sym
-			yyVAL.node = Nod(OKEY, yyVAL.node, yyDollar[2].node)
-		}
-	case 245:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:1756
-		{
-			yyVAL.node = Nod(ONONAME, nil, nil)
-			yyVAL.node.Sym = yyDollar[1].sym
-			yyVAL.node = Nod(OKEY, yyVAL.node, yyDollar[2].node)
-		}
-	case 247:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1765
-		{
-			yyVAL.list = list1(yyDollar[1].node)
-		}
-	case 248:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1769
-		{
-			yyVAL.list = list(yyDollar[1].list, yyDollar[3].node)
-		}
-	case 249:
-		yyDollar = yyS[yypt-0 : yypt+1]
-		//line go.y:1774
-		{
-			yyVAL.list = nil
-		}
-	case 250:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:1778
-		{
-			yyVAL.list = yyDollar[1].list
-		}
-	case 251:
-		yyDollar = yyS[yypt-0 : yypt+1]
-		//line go.y:1786
-		{
-			yyVAL.node = nil
-		}
-	case 253:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1791
-		{
-			yyVAL.node = liststmt(yyDollar[1].list)
-		}
-	case 255:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1796
-		{
-			yyVAL.node = nil
-		}
-	case 261:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:1807
-		{
-			yyDollar[1].node = Nod(OLABEL, yyDollar[1].node, nil)
-			yyDollar[1].node.Sym = dclstack // context, for goto restrictions
-		}
-	case 262:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:1812
-		{
-			var l *NodeList
-
-			yyDollar[1].node.Name.Defn = yyDollar[4].node
-			l = list1(yyDollar[1].node)
-			if yyDollar[4].node != nil {
-				l = list(l, yyDollar[4].node)
-			}
-			yyVAL.node = liststmt(l)
-		}
-	case 263:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1823
-		{
-			// will be converted to OFALL
-			yyVAL.node = Nod(OXFALL, nil, nil)
-			yyVAL.node.Xoffset = int64(block)
-		}
-	case 264:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:1829
-		{
-			yyVAL.node = Nod(OBREAK, yyDollar[2].node, nil)
-		}
-	case 265:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:1833
-		{
-			yyVAL.node = Nod(OCONTINUE, yyDollar[2].node, nil)
-		}
-	case 266:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:1837
-		{
-			yyVAL.node = Nod(OPROC, yyDollar[2].node, nil)
-		}
-	case 267:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:1841
-		{
-			yyVAL.node = Nod(ODEFER, yyDollar[2].node, nil)
-		}
-	case 268:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:1845
-		{
-			yyVAL.node = Nod(OGOTO, yyDollar[2].node, nil)
-			yyVAL.node.Sym = dclstack // context, for goto restrictions
-		}
-	case 269:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:1850
-		{
-			yyVAL.node = Nod(ORETURN, nil, nil)
-			yyVAL.node.List = yyDollar[2].list
-			if yyVAL.node.List == nil && Curfn != nil {
-				var l *NodeList
-
-				for l = Curfn.Func.Dcl; l != nil; l = l.Next {
-					if l.N.Class == PPARAM {
-						continue
-					}
-					if l.N.Class != PPARAMOUT {
-						break
-					}
-					if l.N.Sym.Def != l.N {
-						Yyerror("%s is shadowed during return", l.N.Sym.Name)
-					}
-				}
-			}
-		}
-	case 270:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1872
-		{
-			yyVAL.list = nil
-			if yyDollar[1].node != nil {
-				yyVAL.list = list1(yyDollar[1].node)
-			}
-		}
-	case 271:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1879
-		{
-			yyVAL.list = yyDollar[1].list
-			if yyDollar[3].node != nil {
-				yyVAL.list = list(yyVAL.list, yyDollar[3].node)
-			}
-		}
-	case 272:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1888
-		{
-			yyVAL.list = list1(yyDollar[1].node)
-		}
-	case 273:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1892
-		{
-			yyVAL.list = list(yyDollar[1].list, yyDollar[3].node)
-		}
-	case 274:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1898
-		{
-			yyVAL.list = list1(yyDollar[1].node)
-		}
-	case 275:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1902
-		{
-			yyVAL.list = list(yyDollar[1].list, yyDollar[3].node)
-		}
-	case 276:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1908
-		{
-			yyVAL.list = list1(yyDollar[1].node)
-		}
-	case 277:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1912
-		{
-			yyVAL.list = list(yyDollar[1].list, yyDollar[3].node)
-		}
-	case 278:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1918
-		{
-			yyVAL.list = list1(yyDollar[1].node)
-		}
-	case 279:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1922
-		{
-			yyVAL.list = list(yyDollar[1].list, yyDollar[3].node)
-		}
-	case 280:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1931
-		{
-			yyVAL.list = list1(yyDollar[1].node)
-		}
-	case 281:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:1935
-		{
-			yyVAL.list = list1(yyDollar[1].node)
-		}
-	case 282:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1939
-		{
-			yyVAL.list = list(yyDollar[1].list, yyDollar[3].node)
-		}
-	case 283:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:1943
-		{
-			yyVAL.list = list(yyDollar[1].list, yyDollar[3].node)
-		}
-	case 284:
-		yyDollar = yyS[yypt-0 : yypt+1]
-		//line go.y:1948
-		{
-			yyVAL.list = nil
-		}
-	case 285:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:1952
-		{
-			yyVAL.list = yyDollar[1].list
-		}
-	case 290:
-		yyDollar = yyS[yypt-0 : yypt+1]
-		//line go.y:1966
-		{
-			yyVAL.node = nil
-		}
-	case 292:
-		yyDollar = yyS[yypt-0 : yypt+1]
-		//line go.y:1972
-		{
-			yyVAL.list = nil
-		}
-	case 294:
-		yyDollar = yyS[yypt-0 : yypt+1]
-		//line go.y:1978
-		{
-			yyVAL.node = nil
-		}
-	case 296:
-		yyDollar = yyS[yypt-0 : yypt+1]
-		//line go.y:1984
-		{
-			yyVAL.list = nil
-		}
-	case 298:
-		yyDollar = yyS[yypt-0 : yypt+1]
-		//line go.y:1990
-		{
-			yyVAL.list = nil
-		}
-	case 300:
-		yyDollar = yyS[yypt-0 : yypt+1]
-		//line go.y:1996
-		{
-			yyVAL.list = nil
-		}
-	case 302:
-		yyDollar = yyS[yypt-0 : yypt+1]
-		//line go.y:2002
-		{
-			yyVAL.val.U = nil
-		}
-	case 304:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:2012
-		{
-			importimport(yyDollar[2].sym, yyDollar[3].val.U.(string))
-		}
-	case 305:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:2016
-		{
-			importvar(yyDollar[2].sym, yyDollar[3].typ)
-		}
-	case 306:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:2020
-		{
-			importconst(yyDollar[2].sym, Types[TIDEAL], yyDollar[4].node)
-		}
-	case 307:
-		yyDollar = yyS[yypt-6 : yypt+1]
-		//line go.y:2024
-		{
-			importconst(yyDollar[2].sym, yyDollar[3].typ, yyDollar[5].node)
-		}
-	case 308:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:2028
-		{
-			importtype(yyDollar[2].typ, yyDollar[3].typ)
-		}
-	case 309:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:2032
-		{
-			if yyDollar[2].node == nil {
-				dclcontext = PEXTERN // since we skip the funcbody below
-				break
-			}
-
-			yyDollar[2].node.Func.Inl = yyDollar[3].list
-
-			funcbody(yyDollar[2].node)
-			importlist = list(importlist, yyDollar[2].node)
-
-			if Debug['E'] > 0 {
-				fmt.Printf("import [%q] func %v \n", importpkg.Path, yyDollar[2].node)
-				if Debug['m'] > 2 && yyDollar[2].node.Func.Inl != nil {
-					fmt.Printf("inl body:%v\n", yyDollar[2].node.Func.Inl)
-				}
-			}
-		}
-	case 310:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:2053
-		{
-			yyVAL.sym = yyDollar[1].sym
-			structpkg = yyVAL.sym.Pkg
-		}
-	case 311:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:2060
-		{
-			yyVAL.typ = pkgtype(yyDollar[1].sym)
-			importsym(yyDollar[1].sym, OTYPE)
-		}
-	case 317:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:2080
-		{
-			yyVAL.typ = pkgtype(yyDollar[1].sym)
-		}
-	case 318:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:2084
-		{
-			// predefined name like uint8
-			yyDollar[1].sym = Pkglookup(yyDollar[1].sym.Name, builtinpkg)
-			if yyDollar[1].sym.Def == nil || yyDollar[1].sym.Def.Op != OTYPE {
-				Yyerror("%s is not a type", yyDollar[1].sym.Name)
-				yyVAL.typ = nil
-			} else {
-				yyVAL.typ = yyDollar[1].sym.Def.Type
-			}
-		}
-	case 319:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:2095
-		{
-			yyVAL.typ = aindex(nil, yyDollar[3].typ)
-		}
-	case 320:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:2099
-		{
-			yyVAL.typ = aindex(nodlit(yyDollar[2].val), yyDollar[4].typ)
-		}
-	case 321:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:2103
-		{
-			yyVAL.typ = maptype(yyDollar[3].typ, yyDollar[5].typ)
-		}
-	case 322:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:2107
-		{
-			yyVAL.typ = tostruct(yyDollar[3].list)
-		}
-	case 323:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:2111
-		{
-			yyVAL.typ = tointerface(yyDollar[3].list)
-		}
-	case 324:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:2115
-		{
-			yyVAL.typ = Ptrto(yyDollar[2].typ)
-		}
-	case 325:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:2119
-		{
-			yyVAL.typ = typ(TCHAN)
-			yyVAL.typ.Type = yyDollar[2].typ
-			yyVAL.typ.Chan = Cboth
-		}
-	case 326:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:2125
-		{
-			yyVAL.typ = typ(TCHAN)
-			yyVAL.typ.Type = yyDollar[3].typ
-			yyVAL.typ.Chan = Cboth
-		}
-	case 327:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:2131
-		{
-			yyVAL.typ = typ(TCHAN)
-			yyVAL.typ.Type = yyDollar[3].typ
-			yyVAL.typ.Chan = Csend
-		}
-	case 328:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:2139
-		{
-			yyVAL.typ = typ(TCHAN)
-			yyVAL.typ.Type = yyDollar[3].typ
-			yyVAL.typ.Chan = Crecv
-		}
-	case 329:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:2147
-		{
-			yyVAL.typ = functype(nil, yyDollar[3].list, yyDollar[5].list)
-		}
-	case 330:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:2153
-		{
-			yyVAL.node = Nod(ODCLFIELD, nil, typenod(yyDollar[2].typ))
-			if yyDollar[1].sym != nil {
-				yyVAL.node.Left = newname(yyDollar[1].sym)
-			}
-			yyVAL.node.SetVal(yyDollar[3].val)
-		}
-	case 331:
-		yyDollar = yyS[yypt-4 : yypt+1]
-		//line go.y:2161
-		{
-			var t *Type
-
-			t = typ(TARRAY)
-			t.Bound = -1
-			t.Type = yyDollar[3].typ
-
-			yyVAL.node = Nod(ODCLFIELD, nil, typenod(t))
-			if yyDollar[1].sym != nil {
-				yyVAL.node.Left = newname(yyDollar[1].sym)
-			}
-			yyVAL.node.Isddd = true
-			yyVAL.node.SetVal(yyDollar[4].val)
-		}
-	case 332:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:2178
-		{
-			var s *Sym
-			var p *Pkg
-
-			if yyDollar[1].sym != nil && yyDollar[1].sym.Name != "?" {
-				yyVAL.node = Nod(ODCLFIELD, newname(yyDollar[1].sym), typenod(yyDollar[2].typ))
-				yyVAL.node.SetVal(yyDollar[3].val)
-			} else {
-				s = yyDollar[2].typ.Sym
-				if s == nil && Isptr[yyDollar[2].typ.Etype] {
-					s = yyDollar[2].typ.Type.Sym
-				}
-				p = importpkg
-				if yyDollar[1].sym != nil {
-					p = yyDollar[1].sym.Pkg
-				}
-				yyVAL.node = embedded(s, p)
-				yyVAL.node.Right = typenod(yyDollar[2].typ)
-				yyVAL.node.SetVal(yyDollar[3].val)
-			}
-		}
-	case 333:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:2202
-		{
-			yyVAL.node = Nod(ODCLFIELD, newname(yyDollar[1].sym), typenod(functype(fakethis(), yyDollar[3].list, yyDollar[5].list)))
-		}
-	case 334:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:2206
-		{
-			yyVAL.node = Nod(ODCLFIELD, nil, typenod(yyDollar[1].typ))
-		}
-	case 335:
-		yyDollar = yyS[yypt-0 : yypt+1]
-		//line go.y:2211
-		{
-			yyVAL.list = nil
-		}
-	case 337:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:2218
-		{
-			yyVAL.list = yyDollar[2].list
-		}
-	case 338:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:2222
-		{
-			yyVAL.list = list1(Nod(ODCLFIELD, nil, typenod(yyDollar[1].typ)))
-		}
-	case 339:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:2232
-		{
-			yyVAL.node = nodlit(yyDollar[1].val)
-		}
-	case 340:
-		yyDollar = yyS[yypt-2 : yypt+1]
-		//line go.y:2236
-		{
-			yyVAL.node = nodlit(yyDollar[2].val)
-			switch yyVAL.node.Val().Ctype() {
-			case CTINT, CTRUNE:
-				mpnegfix(yyVAL.node.Val().U.(*Mpint))
-				break
-			case CTFLT:
-				mpnegflt(yyVAL.node.Val().U.(*Mpflt))
-				break
-			case CTCPLX:
-				mpnegflt(&yyVAL.node.Val().U.(*Mpcplx).Real)
-				mpnegflt(&yyVAL.node.Val().U.(*Mpcplx).Imag)
-				break
-			default:
-				Yyerror("bad negated constant")
-			}
-		}
-	case 341:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:2254
-		{
-			yyVAL.node = oldname(Pkglookup(yyDollar[1].sym.Name, builtinpkg))
-			if yyVAL.node.Op != OLITERAL {
-				Yyerror("bad constant %v", yyVAL.node.Sym)
-			}
-		}
-	case 343:
-		yyDollar = yyS[yypt-5 : yypt+1]
-		//line go.y:2264
-		{
-			if yyDollar[2].node.Val().Ctype() == CTRUNE && yyDollar[4].node.Val().Ctype() == CTINT {
-				yyVAL.node = yyDollar[2].node
-				mpaddfixfix(yyDollar[2].node.Val().U.(*Mpint), yyDollar[4].node.Val().U.(*Mpint), 0)
-				break
-			}
-			yyDollar[4].node.Val().U.(*Mpcplx).Real = yyDollar[4].node.Val().U.(*Mpcplx).Imag
-			Mpmovecflt(&yyDollar[4].node.Val().U.(*Mpcplx).Imag, 0.0)
-			yyVAL.node = nodcplxlit(yyDollar[2].node.Val(), yyDollar[4].node.Val())
-		}
-	case 346:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:2280
-		{
-			yyVAL.list = list1(yyDollar[1].node)
-		}
-	case 347:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:2284
-		{
-			yyVAL.list = list(yyDollar[1].list, yyDollar[3].node)
-		}
-	case 348:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:2290
-		{
-			yyVAL.list = list1(yyDollar[1].node)
-		}
-	case 349:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:2294
-		{
-			yyVAL.list = list(yyDollar[1].list, yyDollar[3].node)
-		}
-	case 350:
-		yyDollar = yyS[yypt-1 : yypt+1]
-		//line go.y:2300
-		{
-			yyVAL.list = list1(yyDollar[1].node)
-		}
-	case 351:
-		yyDollar = yyS[yypt-3 : yypt+1]
-		//line go.y:2304
-		{
-			yyVAL.list = list(yyDollar[1].list, yyDollar[3].node)
-		}
-	}
-	goto yystack /* stack new state and value */
-}
diff --git a/src/cmd/compile/internal/ppc64/cgen.go b/src/cmd/compile/internal/ppc64/cgen.go
deleted file mode 100644
index 37dd6ce..0000000
--- a/src/cmd/compile/internal/ppc64/cgen.go
+++ /dev/null
@@ -1,149 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package ppc64
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/ppc64"
-)
-
-func blockcopy(n, res *gc.Node, osrc, odst, w int64) {
-	// determine alignment.
-	// want to avoid unaligned access, so have to use
-	// smaller operations for less aligned types.
-	// for example moving [4]byte must use 4 MOVB not 1 MOVW.
-	align := int(n.Type.Align)
-
-	var op int
-	switch align {
-	default:
-		gc.Fatal("sgen: invalid alignment %d for %v", align, n.Type)
-
-	case 1:
-		op = ppc64.AMOVBU
-
-	case 2:
-		op = ppc64.AMOVHU
-
-	case 4:
-		op = ppc64.AMOVWZU // there is no lwau, only lwaux
-
-	case 8:
-		op = ppc64.AMOVDU
-	}
-
-	if w%int64(align) != 0 {
-		gc.Fatal("sgen: unaligned size %d (align=%d) for %v", w, align, n.Type)
-	}
-	c := int32(w / int64(align))
-
-	// if we are copying forward on the stack and
-	// the src and dst overlap, then reverse direction
-	dir := align
-
-	if osrc < odst && int64(odst) < int64(osrc)+w {
-		dir = -dir
-	}
-
-	var dst gc.Node
-	var src gc.Node
-	if n.Ullman >= res.Ullman {
-		gc.Agenr(n, &dst, res) // temporarily use dst
-		gc.Regalloc(&src, gc.Types[gc.Tptr], nil)
-		gins(ppc64.AMOVD, &dst, &src)
-		if res.Op == gc.ONAME {
-			gc.Gvardef(res)
-		}
-		gc.Agen(res, &dst)
-	} else {
-		if res.Op == gc.ONAME {
-			gc.Gvardef(res)
-		}
-		gc.Agenr(res, &dst, res)
-		gc.Agenr(n, &src, nil)
-	}
-
-	var tmp gc.Node
-	gc.Regalloc(&tmp, gc.Types[gc.Tptr], nil)
-
-	// set up end marker
-	var nend gc.Node
-
-	// move src and dest to the end of block if necessary
-	if dir < 0 {
-		if c >= 4 {
-			gc.Regalloc(&nend, gc.Types[gc.Tptr], nil)
-			gins(ppc64.AMOVD, &src, &nend)
-		}
-
-		p := gins(ppc64.AADD, nil, &src)
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = w
-
-		p = gins(ppc64.AADD, nil, &dst)
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = w
-	} else {
-		p := gins(ppc64.AADD, nil, &src)
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = int64(-dir)
-
-		p = gins(ppc64.AADD, nil, &dst)
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = int64(-dir)
-
-		if c >= 4 {
-			gc.Regalloc(&nend, gc.Types[gc.Tptr], nil)
-			p := gins(ppc64.AMOVD, &src, &nend)
-			p.From.Type = obj.TYPE_ADDR
-			p.From.Offset = w
-		}
-	}
-
-	// move
-	// TODO: enable duffcopy for larger copies.
-	if c >= 4 {
-		p := gins(op, &src, &tmp)
-		p.From.Type = obj.TYPE_MEM
-		p.From.Offset = int64(dir)
-		ploop := p
-
-		p = gins(op, &tmp, &dst)
-		p.To.Type = obj.TYPE_MEM
-		p.To.Offset = int64(dir)
-
-		p = gins(ppc64.ACMP, &src, &nend)
-
-		gc.Patch(gc.Gbranch(ppc64.ABNE, nil, 0), ploop)
-		gc.Regfree(&nend)
-	} else {
-		// TODO(austin): Instead of generating ADD $-8,R8; ADD
-		// $-8,R7; n*(MOVDU 8(R8),R9; MOVDU R9,8(R7);) just
-		// generate the offsets directly and eliminate the
-		// ADDs.  That will produce shorter, more
-		// pipeline-able code.
-		var p *obj.Prog
-		for {
-			tmp14 := c
-			c--
-			if tmp14 <= 0 {
-				break
-			}
-
-			p = gins(op, &src, &tmp)
-			p.From.Type = obj.TYPE_MEM
-			p.From.Offset = int64(dir)
-
-			p = gins(op, &tmp, &dst)
-			p.To.Type = obj.TYPE_MEM
-			p.To.Offset = int64(dir)
-		}
-	}
-
-	gc.Regfree(&dst)
-	gc.Regfree(&src)
-	gc.Regfree(&tmp)
-}
diff --git a/src/cmd/compile/internal/ppc64/galign.go b/src/cmd/compile/internal/ppc64/galign.go
deleted file mode 100644
index 73aef6f..0000000
--- a/src/cmd/compile/internal/ppc64/galign.go
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package ppc64
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/ppc64"
-)
-
-var thechar int = '9'
-
-var thestring string = "ppc64"
-
-var thelinkarch *obj.LinkArch
-
-func linkarchinit() {
-	thestring = obj.Getgoarch()
-	gc.Thearch.Thestring = thestring
-	if thestring == "ppc64le" {
-		thelinkarch = &ppc64.Linkppc64le
-	} else {
-		thelinkarch = &ppc64.Linkppc64
-	}
-	gc.Thearch.Thelinkarch = thelinkarch
-}
-
-var MAXWIDTH int64 = 1 << 50
-
-/*
- * go declares several platform-specific type aliases:
- * int, uint, and uintptr
- */
-var typedefs = []gc.Typedef{
-	gc.Typedef{"int", gc.TINT, gc.TINT64},
-	gc.Typedef{"uint", gc.TUINT, gc.TUINT64},
-	gc.Typedef{"uintptr", gc.TUINTPTR, gc.TUINT64},
-}
-
-func betypeinit() {
-	gc.Widthptr = 8
-	gc.Widthint = 8
-	gc.Widthreg = 8
-}
-
-func Main() {
-	gc.Thearch.Thechar = thechar
-	gc.Thearch.Thestring = thestring
-	gc.Thearch.Thelinkarch = thelinkarch
-	gc.Thearch.Typedefs = typedefs
-	gc.Thearch.REGSP = ppc64.REGSP
-	gc.Thearch.REGCTXT = ppc64.REGCTXT
-	gc.Thearch.REGCALLX = ppc64.REG_R3
-	gc.Thearch.REGCALLX2 = ppc64.REG_R4
-	gc.Thearch.REGRETURN = ppc64.REG_R3
-	gc.Thearch.REGMIN = ppc64.REG_R0
-	gc.Thearch.REGMAX = ppc64.REG_R31
-	gc.Thearch.FREGMIN = ppc64.REG_F0
-	gc.Thearch.FREGMAX = ppc64.REG_F31
-	gc.Thearch.MAXWIDTH = MAXWIDTH
-	gc.Thearch.ReservedRegs = resvd
-
-	gc.Thearch.Betypeinit = betypeinit
-	gc.Thearch.Cgen_hmul = cgen_hmul
-	gc.Thearch.Cgen_shift = cgen_shift
-	gc.Thearch.Clearfat = clearfat
-	gc.Thearch.Defframe = defframe
-	gc.Thearch.Dodiv = dodiv
-	gc.Thearch.Excise = excise
-	gc.Thearch.Expandchecks = expandchecks
-	gc.Thearch.Getg = getg
-	gc.Thearch.Gins = gins
-	gc.Thearch.Ginscmp = ginscmp
-	gc.Thearch.Ginscon = ginscon
-	gc.Thearch.Ginsnop = ginsnop
-	gc.Thearch.Gmove = gmove
-	gc.Thearch.Linkarchinit = linkarchinit
-	gc.Thearch.Peep = peep
-	gc.Thearch.Proginfo = proginfo
-	gc.Thearch.Regtyp = regtyp
-	gc.Thearch.Sameaddr = sameaddr
-	gc.Thearch.Smallindir = smallindir
-	gc.Thearch.Stackaddr = stackaddr
-	gc.Thearch.Blockcopy = blockcopy
-	gc.Thearch.Sudoaddable = sudoaddable
-	gc.Thearch.Sudoclean = sudoclean
-	gc.Thearch.Excludedregs = excludedregs
-	gc.Thearch.RtoB = RtoB
-	gc.Thearch.FtoB = RtoB
-	gc.Thearch.BtoR = BtoR
-	gc.Thearch.BtoF = BtoF
-	gc.Thearch.Optoas = optoas
-	gc.Thearch.Doregbits = doregbits
-	gc.Thearch.Regnames = regnames
-
-	gc.Main()
-	gc.Exit(0)
-}
diff --git a/src/cmd/compile/internal/ppc64/ggen.go b/src/cmd/compile/internal/ppc64/ggen.go
deleted file mode 100644
index 5b282eb..0000000
--- a/src/cmd/compile/internal/ppc64/ggen.go
+++ /dev/null
@@ -1,564 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package ppc64
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/ppc64"
-	"fmt"
-)
-
-func defframe(ptxt *obj.Prog) {
-	var n *gc.Node
-
-	// fill in argument size, stack size
-	ptxt.To.Type = obj.TYPE_TEXTSIZE
-
-	ptxt.To.Val = int32(gc.Rnd(gc.Curfn.Type.Argwid, int64(gc.Widthptr)))
-	frame := uint32(gc.Rnd(gc.Stksize+gc.Maxarg, int64(gc.Widthreg)))
-	ptxt.To.Offset = int64(frame)
-
-	// insert code to zero ambiguously live variables
-	// so that the garbage collector only sees initialized values
-	// when it looks for pointers.
-	p := ptxt
-
-	hi := int64(0)
-	lo := hi
-
-	// iterate through declarations - they are sorted in decreasing xoffset order.
-	for l := gc.Curfn.Func.Dcl; l != nil; l = l.Next {
-		n = l.N
-		if !n.Name.Needzero {
-			continue
-		}
-		if n.Class != gc.PAUTO {
-			gc.Fatal("needzero class %d", n.Class)
-		}
-		if n.Type.Width%int64(gc.Widthptr) != 0 || n.Xoffset%int64(gc.Widthptr) != 0 || n.Type.Width == 0 {
-			gc.Fatal("var %v has size %d offset %d", gc.Nconv(n, obj.FmtLong), int(n.Type.Width), int(n.Xoffset))
-		}
-
-		if lo != hi && n.Xoffset+n.Type.Width >= lo-int64(2*gc.Widthreg) {
-			// merge with range we already have
-			lo = n.Xoffset
-
-			continue
-		}
-
-		// zero old range
-		p = zerorange(p, int64(frame), lo, hi)
-
-		// set new range
-		hi = n.Xoffset + n.Type.Width
-
-		lo = n.Xoffset
-	}
-
-	// zero final range
-	zerorange(p, int64(frame), lo, hi)
-}
-
-func zerorange(p *obj.Prog, frame int64, lo int64, hi int64) *obj.Prog {
-	cnt := hi - lo
-	if cnt == 0 {
-		return p
-	}
-	if cnt < int64(4*gc.Widthptr) {
-		for i := int64(0); i < cnt; i += int64(gc.Widthptr) {
-			p = appendpp(p, ppc64.AMOVD, obj.TYPE_REG, ppc64.REGZERO, 0, obj.TYPE_MEM, ppc64.REGSP, 8+frame+lo+i)
-		}
-		// TODO(dfc): https://golang.org/issue/12108
-		// If DUFFZERO is used inside a tail call (see genwrapper) it will
-		// overwrite the link register.
-	} else if false && cnt <= int64(128*gc.Widthptr) {
-		p = appendpp(p, ppc64.AADD, obj.TYPE_CONST, 0, 8+frame+lo-8, obj.TYPE_REG, ppc64.REGRT1, 0)
-		p.Reg = ppc64.REGSP
-		p = appendpp(p, obj.ADUFFZERO, obj.TYPE_NONE, 0, 0, obj.TYPE_MEM, 0, 0)
-		f := gc.Sysfunc("duffzero")
-		gc.Naddr(&p.To, f)
-		gc.Afunclit(&p.To, f)
-		p.To.Offset = 4 * (128 - cnt/int64(gc.Widthptr))
-	} else {
-		p = appendpp(p, ppc64.AMOVD, obj.TYPE_CONST, 0, 8+frame+lo-8, obj.TYPE_REG, ppc64.REGTMP, 0)
-		p = appendpp(p, ppc64.AADD, obj.TYPE_REG, ppc64.REGTMP, 0, obj.TYPE_REG, ppc64.REGRT1, 0)
-		p.Reg = ppc64.REGSP
-		p = appendpp(p, ppc64.AMOVD, obj.TYPE_CONST, 0, cnt, obj.TYPE_REG, ppc64.REGTMP, 0)
-		p = appendpp(p, ppc64.AADD, obj.TYPE_REG, ppc64.REGTMP, 0, obj.TYPE_REG, ppc64.REGRT2, 0)
-		p.Reg = ppc64.REGRT1
-		p = appendpp(p, ppc64.AMOVDU, obj.TYPE_REG, ppc64.REGZERO, 0, obj.TYPE_MEM, ppc64.REGRT1, int64(gc.Widthptr))
-		p1 := p
-		p = appendpp(p, ppc64.ACMP, obj.TYPE_REG, ppc64.REGRT1, 0, obj.TYPE_REG, ppc64.REGRT2, 0)
-		p = appendpp(p, ppc64.ABNE, obj.TYPE_NONE, 0, 0, obj.TYPE_BRANCH, 0, 0)
-		gc.Patch(p, p1)
-	}
-
-	return p
-}
-
-func appendpp(p *obj.Prog, as int, ftype int, freg int, foffset int64, ttype int, treg int, toffset int64) *obj.Prog {
-	q := gc.Ctxt.NewProg()
-	gc.Clearp(q)
-	q.As = int16(as)
-	q.Lineno = p.Lineno
-	q.From.Type = int16(ftype)
-	q.From.Reg = int16(freg)
-	q.From.Offset = foffset
-	q.To.Type = int16(ttype)
-	q.To.Reg = int16(treg)
-	q.To.Offset = toffset
-	q.Link = p.Link
-	p.Link = q
-	return q
-}
-
-func ginsnop() {
-	var reg gc.Node
-	gc.Nodreg(&reg, gc.Types[gc.TINT], ppc64.REG_R0)
-	gins(ppc64.AOR, &reg, &reg)
-}
-
-var panicdiv *gc.Node
-
-/*
- * generate division.
- * generates one of:
- *	res = nl / nr
- *	res = nl % nr
- * according to op.
- */
-func dodiv(op int, nl *gc.Node, nr *gc.Node, res *gc.Node) {
-	// Have to be careful about handling
-	// most negative int divided by -1 correctly.
-	// The hardware will generate undefined result.
-	// Also need to explicitly trap on division on zero,
-	// the hardware will silently generate undefined result.
-	// DIVW will leave unpredicable result in higher 32-bit,
-	// so always use DIVD/DIVDU.
-	t := nl.Type
-
-	t0 := t
-	check := 0
-	if gc.Issigned[t.Etype] {
-		check = 1
-		if gc.Isconst(nl, gc.CTINT) && nl.Int() != -(1<<uint64(t.Width*8-1)) {
-			check = 0
-		} else if gc.Isconst(nr, gc.CTINT) && nr.Int() != -1 {
-			check = 0
-		}
-	}
-
-	if t.Width < 8 {
-		if gc.Issigned[t.Etype] {
-			t = gc.Types[gc.TINT64]
-		} else {
-			t = gc.Types[gc.TUINT64]
-		}
-		check = 0
-	}
-
-	a := optoas(gc.ODIV, t)
-
-	var tl gc.Node
-	gc.Regalloc(&tl, t0, nil)
-	var tr gc.Node
-	gc.Regalloc(&tr, t0, nil)
-	if nl.Ullman >= nr.Ullman {
-		gc.Cgen(nl, &tl)
-		gc.Cgen(nr, &tr)
-	} else {
-		gc.Cgen(nr, &tr)
-		gc.Cgen(nl, &tl)
-	}
-
-	if t != t0 {
-		// Convert
-		tl2 := tl
-
-		tr2 := tr
-		tl.Type = t
-		tr.Type = t
-		gmove(&tl2, &tl)
-		gmove(&tr2, &tr)
-	}
-
-	// Handle divide-by-zero panic.
-	p1 := gins(optoas(gc.OCMP, t), &tr, nil)
-
-	p1.To.Type = obj.TYPE_REG
-	p1.To.Reg = ppc64.REGZERO
-	p1 = gc.Gbranch(optoas(gc.ONE, t), nil, +1)
-	if panicdiv == nil {
-		panicdiv = gc.Sysfunc("panicdivide")
-	}
-	gc.Ginscall(panicdiv, -1)
-	gc.Patch(p1, gc.Pc)
-
-	var p2 *obj.Prog
-	if check != 0 {
-		var nm1 gc.Node
-		gc.Nodconst(&nm1, t, -1)
-		gins(optoas(gc.OCMP, t), &tr, &nm1)
-		p1 := gc.Gbranch(optoas(gc.ONE, t), nil, +1)
-		if op == gc.ODIV {
-			// a / (-1) is -a.
-			gins(optoas(gc.OMINUS, t), nil, &tl)
-
-			gmove(&tl, res)
-		} else {
-			// a % (-1) is 0.
-			var nz gc.Node
-			gc.Nodconst(&nz, t, 0)
-
-			gmove(&nz, res)
-		}
-
-		p2 = gc.Gbranch(obj.AJMP, nil, 0)
-		gc.Patch(p1, gc.Pc)
-	}
-
-	p1 = gins(a, &tr, &tl)
-	if op == gc.ODIV {
-		gc.Regfree(&tr)
-		gmove(&tl, res)
-	} else {
-		// A%B = A-(A/B*B)
-		var tm gc.Node
-		gc.Regalloc(&tm, t, nil)
-
-		// patch div to use the 3 register form
-		// TODO(minux): add gins3?
-		p1.Reg = p1.To.Reg
-
-		p1.To.Reg = tm.Reg
-		gins(optoas(gc.OMUL, t), &tr, &tm)
-		gc.Regfree(&tr)
-		gins(optoas(gc.OSUB, t), &tm, &tl)
-		gc.Regfree(&tm)
-		gmove(&tl, res)
-	}
-
-	gc.Regfree(&tl)
-	if check != 0 {
-		gc.Patch(p2, gc.Pc)
-	}
-}
-
-/*
- * generate high multiply:
- *   res = (nl*nr) >> width
- */
-func cgen_hmul(nl *gc.Node, nr *gc.Node, res *gc.Node) {
-	// largest ullman on left.
-	if nl.Ullman < nr.Ullman {
-		tmp := (*gc.Node)(nl)
-		nl = nr
-		nr = tmp
-	}
-
-	t := (*gc.Type)(nl.Type)
-	w := int(int(t.Width * 8))
-	var n1 gc.Node
-	gc.Cgenr(nl, &n1, res)
-	var n2 gc.Node
-	gc.Cgenr(nr, &n2, nil)
-	switch gc.Simtype[t.Etype] {
-	case gc.TINT8,
-		gc.TINT16,
-		gc.TINT32:
-		gins(optoas(gc.OMUL, t), &n2, &n1)
-		p := (*obj.Prog)(gins(ppc64.ASRAD, nil, &n1))
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = int64(w)
-
-	case gc.TUINT8,
-		gc.TUINT16,
-		gc.TUINT32:
-		gins(optoas(gc.OMUL, t), &n2, &n1)
-		p := (*obj.Prog)(gins(ppc64.ASRD, nil, &n1))
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = int64(w)
-
-	case gc.TINT64,
-		gc.TUINT64:
-		if gc.Issigned[t.Etype] {
-			gins(ppc64.AMULHD, &n2, &n1)
-		} else {
-			gins(ppc64.AMULHDU, &n2, &n1)
-		}
-
-	default:
-		gc.Fatal("cgen_hmul %v", t)
-	}
-
-	gc.Cgen(&n1, res)
-	gc.Regfree(&n1)
-	gc.Regfree(&n2)
-}
-
-/*
- * generate shift according to op, one of:
- *	res = nl << nr
- *	res = nl >> nr
- */
-func cgen_shift(op int, bounded bool, nl *gc.Node, nr *gc.Node, res *gc.Node) {
-	a := int(optoas(op, nl.Type))
-
-	if nr.Op == gc.OLITERAL {
-		var n1 gc.Node
-		gc.Regalloc(&n1, nl.Type, res)
-		gc.Cgen(nl, &n1)
-		sc := uint64(nr.Int())
-		if sc >= uint64(nl.Type.Width*8) {
-			// large shift gets 2 shifts by width-1
-			var n3 gc.Node
-			gc.Nodconst(&n3, gc.Types[gc.TUINT32], nl.Type.Width*8-1)
-
-			gins(a, &n3, &n1)
-			gins(a, &n3, &n1)
-		} else {
-			gins(a, nr, &n1)
-		}
-		gmove(&n1, res)
-		gc.Regfree(&n1)
-		return
-	}
-
-	if nl.Ullman >= gc.UINF {
-		var n4 gc.Node
-		gc.Tempname(&n4, nl.Type)
-		gc.Cgen(nl, &n4)
-		nl = &n4
-	}
-
-	if nr.Ullman >= gc.UINF {
-		var n5 gc.Node
-		gc.Tempname(&n5, nr.Type)
-		gc.Cgen(nr, &n5)
-		nr = &n5
-	}
-
-	// Allow either uint32 or uint64 as shift type,
-	// to avoid unnecessary conversion from uint32 to uint64
-	// just to do the comparison.
-	tcount := gc.Types[gc.Simtype[nr.Type.Etype]]
-
-	if tcount.Etype < gc.TUINT32 {
-		tcount = gc.Types[gc.TUINT32]
-	}
-
-	var n1 gc.Node
-	gc.Regalloc(&n1, nr.Type, nil) // to hold the shift type in CX
-	var n3 gc.Node
-	gc.Regalloc(&n3, tcount, &n1) // to clear high bits of CX
-
-	var n2 gc.Node
-	gc.Regalloc(&n2, nl.Type, res)
-
-	if nl.Ullman >= nr.Ullman {
-		gc.Cgen(nl, &n2)
-		gc.Cgen(nr, &n1)
-		gmove(&n1, &n3)
-	} else {
-		gc.Cgen(nr, &n1)
-		gmove(&n1, &n3)
-		gc.Cgen(nl, &n2)
-	}
-
-	gc.Regfree(&n3)
-
-	// test and fix up large shifts
-	if !bounded {
-		gc.Nodconst(&n3, tcount, nl.Type.Width*8)
-		gins(optoas(gc.OCMP, tcount), &n1, &n3)
-		p1 := (*obj.Prog)(gc.Gbranch(optoas(gc.OLT, tcount), nil, +1))
-		if op == gc.ORSH && gc.Issigned[nl.Type.Etype] {
-			gc.Nodconst(&n3, gc.Types[gc.TUINT32], nl.Type.Width*8-1)
-			gins(a, &n3, &n2)
-		} else {
-			gc.Nodconst(&n3, nl.Type, 0)
-			gmove(&n3, &n2)
-		}
-
-		gc.Patch(p1, gc.Pc)
-	}
-
-	gins(a, &n1, &n2)
-
-	gmove(&n2, res)
-
-	gc.Regfree(&n1)
-	gc.Regfree(&n2)
-}
-
-func clearfat(nl *gc.Node) {
-	/* clear a fat object */
-	if gc.Debug['g'] != 0 {
-		fmt.Printf("clearfat %v (%v, size: %d)\n", nl, nl.Type, nl.Type.Width)
-	}
-
-	w := uint64(uint64(nl.Type.Width))
-
-	// Avoid taking the address for simple enough types.
-	if gc.Componentgen(nil, nl) {
-		return
-	}
-
-	c := uint64(w % 8) // bytes
-	q := uint64(w / 8) // dwords
-
-	if gc.Reginuse(ppc64.REGRT1) {
-		gc.Fatal("%v in use during clearfat", obj.Rconv(ppc64.REGRT1))
-	}
-
-	var r0 gc.Node
-	gc.Nodreg(&r0, gc.Types[gc.TUINT64], ppc64.REGZERO)
-	var dst gc.Node
-	gc.Nodreg(&dst, gc.Types[gc.Tptr], ppc64.REGRT1)
-	gc.Regrealloc(&dst)
-	gc.Agen(nl, &dst)
-
-	var boff uint64
-	if q > 128 {
-		p := gins(ppc64.ASUB, nil, &dst)
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = 8
-
-		var end gc.Node
-		gc.Regalloc(&end, gc.Types[gc.Tptr], nil)
-		p = gins(ppc64.AMOVD, &dst, &end)
-		p.From.Type = obj.TYPE_ADDR
-		p.From.Offset = int64(q * 8)
-
-		p = gins(ppc64.AMOVDU, &r0, &dst)
-		p.To.Type = obj.TYPE_MEM
-		p.To.Offset = 8
-		pl := (*obj.Prog)(p)
-
-		p = gins(ppc64.ACMP, &dst, &end)
-		gc.Patch(gc.Gbranch(ppc64.ABNE, nil, 0), pl)
-
-		gc.Regfree(&end)
-
-		// The loop leaves R3 on the last zeroed dword
-		boff = 8
-		// TODO(dfc): https://golang.org/issue/12108
-		// If DUFFZERO is used inside a tail call (see genwrapper) it will
-		// overwrite the link register.
-	} else if false && q >= 4 {
-		p := gins(ppc64.ASUB, nil, &dst)
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = 8
-		f := (*gc.Node)(gc.Sysfunc("duffzero"))
-		p = gins(obj.ADUFFZERO, nil, f)
-		gc.Afunclit(&p.To, f)
-
-		// 4 and 128 = magic constants: see ../../runtime/asm_ppc64x.s
-		p.To.Offset = int64(4 * (128 - q))
-
-		// duffzero leaves R3 on the last zeroed dword
-		boff = 8
-	} else {
-		var p *obj.Prog
-		for t := uint64(0); t < q; t++ {
-			p = gins(ppc64.AMOVD, &r0, &dst)
-			p.To.Type = obj.TYPE_MEM
-			p.To.Offset = int64(8 * t)
-		}
-
-		boff = 8 * q
-	}
-
-	var p *obj.Prog
-	for t := uint64(0); t < c; t++ {
-		p = gins(ppc64.AMOVB, &r0, &dst)
-		p.To.Type = obj.TYPE_MEM
-		p.To.Offset = int64(t + boff)
-	}
-
-	gc.Regfree(&dst)
-}
-
-// Called after regopt and peep have run.
-// Expand CHECKNIL pseudo-op into actual nil pointer check.
-func expandchecks(firstp *obj.Prog) {
-	var p1 *obj.Prog
-	var p2 *obj.Prog
-
-	for p := (*obj.Prog)(firstp); p != nil; p = p.Link {
-		if gc.Debug_checknil != 0 && gc.Ctxt.Debugvlog != 0 {
-			fmt.Printf("expandchecks: %v\n", p)
-		}
-		if p.As != obj.ACHECKNIL {
-			continue
-		}
-		if gc.Debug_checknil != 0 && p.Lineno > 1 { // p->lineno==1 in generated wrappers
-			gc.Warnl(int(p.Lineno), "generated nil check")
-		}
-		if p.From.Type != obj.TYPE_REG {
-			gc.Fatal("invalid nil check %v\n", p)
-		}
-
-		/*
-			// check is
-			//	TD $4, R0, arg (R0 is always zero)
-			// eqv. to:
-			// 	tdeq r0, arg
-			// NOTE: this needs special runtime support to make SIGTRAP recoverable.
-			reg = p->from.reg;
-			p->as = ATD;
-			p->from = p->to = p->from3 = zprog.from;
-			p->from.type = TYPE_CONST;
-			p->from.offset = 4;
-			p->from.reg = 0;
-			p->reg = REGZERO;
-			p->to.type = TYPE_REG;
-			p->to.reg = reg;
-		*/
-		// check is
-		//	CMP arg, R0
-		//	BNE 2(PC) [likely]
-		//	MOVD R0, 0(R0)
-		p1 = gc.Ctxt.NewProg()
-
-		p2 = gc.Ctxt.NewProg()
-		gc.Clearp(p1)
-		gc.Clearp(p2)
-		p1.Link = p2
-		p2.Link = p.Link
-		p.Link = p1
-		p1.Lineno = p.Lineno
-		p2.Lineno = p.Lineno
-		p1.Pc = 9999
-		p2.Pc = 9999
-		p.As = ppc64.ACMP
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = ppc64.REGZERO
-		p1.As = ppc64.ABNE
-
-		//p1->from.type = TYPE_CONST;
-		//p1->from.offset = 1; // likely
-		p1.To.Type = obj.TYPE_BRANCH
-
-		p1.To.Val = p2.Link
-
-		// crash by write to memory address 0.
-		p2.As = ppc64.AMOVD
-
-		p2.From.Type = obj.TYPE_REG
-		p2.From.Reg = ppc64.REGZERO
-		p2.To.Type = obj.TYPE_MEM
-		p2.To.Reg = ppc64.REGZERO
-		p2.To.Offset = 0
-	}
-}
-
-// res = runtime.getg()
-func getg(res *gc.Node) {
-	var n1 gc.Node
-	gc.Nodreg(&n1, res.Type, ppc64.REGG)
-	gmove(&n1, res)
-}
diff --git a/src/cmd/compile/internal/ppc64/gsubr.go b/src/cmd/compile/internal/ppc64/gsubr.go
deleted file mode 100644
index 2501972..0000000
--- a/src/cmd/compile/internal/ppc64/gsubr.go
+++ /dev/null
@@ -1,1031 +0,0 @@
-// Derived from Inferno utils/6c/txt.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6c/txt.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package ppc64
-
-import (
-	"cmd/compile/internal/big"
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/ppc64"
-	"fmt"
-)
-
-var resvd = []int{
-	ppc64.REGZERO,
-	ppc64.REGSP, // reserved for SP
-	// We need to preserve the C ABI TLS pointer because sigtramp
-	// may happen during C code and needs to access the g.  C
-	// clobbers REGG, so if Go were to clobber REGTLS, sigtramp
-	// won't know which convention to use.  By preserving REGTLS,
-	// we can just retrieve g from TLS when we aren't sure.
-	ppc64.REGTLS,
-
-	// TODO(austin): Consolidate REGTLS and REGG?
-	ppc64.REGG,
-	ppc64.REGTMP, // REGTMP
-	ppc64.FREGCVI,
-	ppc64.FREGZERO,
-	ppc64.FREGHALF,
-	ppc64.FREGONE,
-	ppc64.FREGTWO,
-}
-
-/*
- * generate
- *	as $c, n
- */
-func ginscon(as int, c int64, n2 *gc.Node) {
-	var n1 gc.Node
-
-	gc.Nodconst(&n1, gc.Types[gc.TINT64], c)
-
-	if as != ppc64.AMOVD && (c < -ppc64.BIG || c > ppc64.BIG) || n2.Op != gc.OREGISTER || as == ppc64.AMULLD {
-		// cannot have more than 16-bit of immediate in ADD, etc.
-		// instead, MOV into register first.
-		var ntmp gc.Node
-		gc.Regalloc(&ntmp, gc.Types[gc.TINT64], nil)
-
-		rawgins(ppc64.AMOVD, &n1, &ntmp)
-		rawgins(as, &ntmp, n2)
-		gc.Regfree(&ntmp)
-		return
-	}
-
-	rawgins(as, &n1, n2)
-}
-
-/*
- * generate
- *	as n, $c (CMP/CMPU)
- */
-func ginscon2(as int, n2 *gc.Node, c int64) {
-	var n1 gc.Node
-
-	gc.Nodconst(&n1, gc.Types[gc.TINT64], c)
-
-	switch as {
-	default:
-		gc.Fatal("ginscon2")
-
-	case ppc64.ACMP:
-		if -ppc64.BIG <= c && c <= ppc64.BIG {
-			rawgins(as, n2, &n1)
-			return
-		}
-
-	case ppc64.ACMPU:
-		if 0 <= c && c <= 2*ppc64.BIG {
-			rawgins(as, n2, &n1)
-			return
-		}
-	}
-
-	// MOV n1 into register first
-	var ntmp gc.Node
-	gc.Regalloc(&ntmp, gc.Types[gc.TINT64], nil)
-
-	rawgins(ppc64.AMOVD, &n1, &ntmp)
-	rawgins(as, n2, &ntmp)
-	gc.Regfree(&ntmp)
-}
-
-func ginscmp(op int, t *gc.Type, n1, n2 *gc.Node, likely int) *obj.Prog {
-	if gc.Isint[t.Etype] && n1.Op == gc.OLITERAL && n2.Op != gc.OLITERAL {
-		// Reverse comparison to place constant last.
-		op = gc.Brrev(op)
-		n1, n2 = n2, n1
-	}
-
-	var r1, r2, g1, g2 gc.Node
-	gc.Regalloc(&r1, t, n1)
-	gc.Regalloc(&g1, n1.Type, &r1)
-	gc.Cgen(n1, &g1)
-	gmove(&g1, &r1)
-	if gc.Isint[t.Etype] && gc.Isconst(n2, gc.CTINT) {
-		ginscon2(optoas(gc.OCMP, t), &r1, n2.Int())
-	} else {
-		gc.Regalloc(&r2, t, n2)
-		gc.Regalloc(&g2, n1.Type, &r2)
-		gc.Cgen(n2, &g2)
-		gmove(&g2, &r2)
-		rawgins(optoas(gc.OCMP, t), &r1, &r2)
-		gc.Regfree(&g2)
-		gc.Regfree(&r2)
-	}
-	gc.Regfree(&g1)
-	gc.Regfree(&r1)
-	return gc.Gbranch(optoas(op, t), nil, likely)
-}
-
-// set up nodes representing 2^63
-var (
-	bigi         gc.Node
-	bigf         gc.Node
-	bignodes_did bool
-)
-
-func bignodes() {
-	if bignodes_did {
-		return
-	}
-	bignodes_did = true
-
-	var i big.Int
-	i.SetInt64(1)
-	i.Lsh(&i, 63)
-
-	gc.Nodconst(&bigi, gc.Types[gc.TUINT64], 0)
-	bigi.SetBigInt(&i)
-
-	bigi.Convconst(&bigf, gc.Types[gc.TFLOAT64])
-}
-
-/*
- * generate move:
- *	t = f
- * hard part is conversions.
- */
-func gmove(f *gc.Node, t *gc.Node) {
-	if gc.Debug['M'] != 0 {
-		fmt.Printf("gmove %v -> %v\n", gc.Nconv(f, obj.FmtLong), gc.Nconv(t, obj.FmtLong))
-	}
-
-	ft := int(gc.Simsimtype(f.Type))
-	tt := int(gc.Simsimtype(t.Type))
-	cvt := (*gc.Type)(t.Type)
-
-	if gc.Iscomplex[ft] || gc.Iscomplex[tt] {
-		gc.Complexmove(f, t)
-		return
-	}
-
-	// cannot have two memory operands
-	var r2 gc.Node
-	var r1 gc.Node
-	var a int
-	if gc.Ismem(f) && gc.Ismem(t) {
-		goto hard
-	}
-
-	// convert constant to desired type
-	if f.Op == gc.OLITERAL {
-		var con gc.Node
-		switch tt {
-		default:
-			f.Convconst(&con, t.Type)
-
-		case gc.TINT32,
-			gc.TINT16,
-			gc.TINT8:
-			var con gc.Node
-			f.Convconst(&con, gc.Types[gc.TINT64])
-			var r1 gc.Node
-			gc.Regalloc(&r1, con.Type, t)
-			gins(ppc64.AMOVD, &con, &r1)
-			gmove(&r1, t)
-			gc.Regfree(&r1)
-			return
-
-		case gc.TUINT32,
-			gc.TUINT16,
-			gc.TUINT8:
-			var con gc.Node
-			f.Convconst(&con, gc.Types[gc.TUINT64])
-			var r1 gc.Node
-			gc.Regalloc(&r1, con.Type, t)
-			gins(ppc64.AMOVD, &con, &r1)
-			gmove(&r1, t)
-			gc.Regfree(&r1)
-			return
-		}
-
-		f = &con
-		ft = tt // so big switch will choose a simple mov
-
-		// constants can't move directly to memory.
-		if gc.Ismem(t) {
-			goto hard
-		}
-	}
-
-	// float constants come from memory.
-	//if(isfloat[tt])
-	//	goto hard;
-
-	// 64-bit immediates are also from memory.
-	//if(isint[tt])
-	//	goto hard;
-	//// 64-bit immediates are really 32-bit sign-extended
-	//// unless moving into a register.
-	//if(isint[tt]) {
-	//	if(mpcmpfixfix(con.val.u.xval, minintval[TINT32]) < 0)
-	//		goto hard;
-	//	if(mpcmpfixfix(con.val.u.xval, maxintval[TINT32]) > 0)
-	//		goto hard;
-	//}
-
-	// value -> value copy, only one memory operand.
-	// figure out the instruction to use.
-	// break out of switch for one-instruction gins.
-	// goto rdst for "destination must be register".
-	// goto hard for "convert to cvt type first".
-	// otherwise handle and return.
-
-	switch uint32(ft)<<16 | uint32(tt) {
-	default:
-		gc.Fatal("gmove %v -> %v", gc.Tconv(f.Type, obj.FmtLong), gc.Tconv(t.Type, obj.FmtLong))
-
-		/*
-		 * integer copy and truncate
-		 */
-	case gc.TINT8<<16 | gc.TINT8, // same size
-		gc.TUINT8<<16 | gc.TINT8,
-		gc.TINT16<<16 | gc.TINT8,
-		// truncate
-		gc.TUINT16<<16 | gc.TINT8,
-		gc.TINT32<<16 | gc.TINT8,
-		gc.TUINT32<<16 | gc.TINT8,
-		gc.TINT64<<16 | gc.TINT8,
-		gc.TUINT64<<16 | gc.TINT8:
-		a = ppc64.AMOVB
-
-	case gc.TINT8<<16 | gc.TUINT8, // same size
-		gc.TUINT8<<16 | gc.TUINT8,
-		gc.TINT16<<16 | gc.TUINT8,
-		// truncate
-		gc.TUINT16<<16 | gc.TUINT8,
-		gc.TINT32<<16 | gc.TUINT8,
-		gc.TUINT32<<16 | gc.TUINT8,
-		gc.TINT64<<16 | gc.TUINT8,
-		gc.TUINT64<<16 | gc.TUINT8:
-		a = ppc64.AMOVBZ
-
-	case gc.TINT16<<16 | gc.TINT16, // same size
-		gc.TUINT16<<16 | gc.TINT16,
-		gc.TINT32<<16 | gc.TINT16,
-		// truncate
-		gc.TUINT32<<16 | gc.TINT16,
-		gc.TINT64<<16 | gc.TINT16,
-		gc.TUINT64<<16 | gc.TINT16:
-		a = ppc64.AMOVH
-
-	case gc.TINT16<<16 | gc.TUINT16, // same size
-		gc.TUINT16<<16 | gc.TUINT16,
-		gc.TINT32<<16 | gc.TUINT16,
-		// truncate
-		gc.TUINT32<<16 | gc.TUINT16,
-		gc.TINT64<<16 | gc.TUINT16,
-		gc.TUINT64<<16 | gc.TUINT16:
-		a = ppc64.AMOVHZ
-
-	case gc.TINT32<<16 | gc.TINT32, // same size
-		gc.TUINT32<<16 | gc.TINT32,
-		gc.TINT64<<16 | gc.TINT32,
-		// truncate
-		gc.TUINT64<<16 | gc.TINT32:
-		a = ppc64.AMOVW
-
-	case gc.TINT32<<16 | gc.TUINT32, // same size
-		gc.TUINT32<<16 | gc.TUINT32,
-		gc.TINT64<<16 | gc.TUINT32,
-		gc.TUINT64<<16 | gc.TUINT32:
-		a = ppc64.AMOVWZ
-
-	case gc.TINT64<<16 | gc.TINT64, // same size
-		gc.TINT64<<16 | gc.TUINT64,
-		gc.TUINT64<<16 | gc.TINT64,
-		gc.TUINT64<<16 | gc.TUINT64:
-		a = ppc64.AMOVD
-
-		/*
-		 * integer up-conversions
-		 */
-	case gc.TINT8<<16 | gc.TINT16, // sign extend int8
-		gc.TINT8<<16 | gc.TUINT16,
-		gc.TINT8<<16 | gc.TINT32,
-		gc.TINT8<<16 | gc.TUINT32,
-		gc.TINT8<<16 | gc.TINT64,
-		gc.TINT8<<16 | gc.TUINT64:
-		a = ppc64.AMOVB
-
-		goto rdst
-
-	case gc.TUINT8<<16 | gc.TINT16, // zero extend uint8
-		gc.TUINT8<<16 | gc.TUINT16,
-		gc.TUINT8<<16 | gc.TINT32,
-		gc.TUINT8<<16 | gc.TUINT32,
-		gc.TUINT8<<16 | gc.TINT64,
-		gc.TUINT8<<16 | gc.TUINT64:
-		a = ppc64.AMOVBZ
-
-		goto rdst
-
-	case gc.TINT16<<16 | gc.TINT32, // sign extend int16
-		gc.TINT16<<16 | gc.TUINT32,
-		gc.TINT16<<16 | gc.TINT64,
-		gc.TINT16<<16 | gc.TUINT64:
-		a = ppc64.AMOVH
-
-		goto rdst
-
-	case gc.TUINT16<<16 | gc.TINT32, // zero extend uint16
-		gc.TUINT16<<16 | gc.TUINT32,
-		gc.TUINT16<<16 | gc.TINT64,
-		gc.TUINT16<<16 | gc.TUINT64:
-		a = ppc64.AMOVHZ
-
-		goto rdst
-
-	case gc.TINT32<<16 | gc.TINT64, // sign extend int32
-		gc.TINT32<<16 | gc.TUINT64:
-		a = ppc64.AMOVW
-
-		goto rdst
-
-	case gc.TUINT32<<16 | gc.TINT64, // zero extend uint32
-		gc.TUINT32<<16 | gc.TUINT64:
-		a = ppc64.AMOVWZ
-
-		goto rdst
-
-		//warn("gmove: convert float to int not implemented: %N -> %N\n", f, t);
-	//return;
-	// algorithm is:
-	//	if small enough, use native float64 -> int64 conversion.
-	//	otherwise, subtract 2^63, convert, and add it back.
-	/*
-	* float to integer
-	 */
-	case gc.TFLOAT32<<16 | gc.TINT32,
-		gc.TFLOAT64<<16 | gc.TINT32,
-		gc.TFLOAT32<<16 | gc.TINT64,
-		gc.TFLOAT64<<16 | gc.TINT64,
-		gc.TFLOAT32<<16 | gc.TINT16,
-		gc.TFLOAT32<<16 | gc.TINT8,
-		gc.TFLOAT32<<16 | gc.TUINT16,
-		gc.TFLOAT32<<16 | gc.TUINT8,
-		gc.TFLOAT64<<16 | gc.TINT16,
-		gc.TFLOAT64<<16 | gc.TINT8,
-		gc.TFLOAT64<<16 | gc.TUINT16,
-		gc.TFLOAT64<<16 | gc.TUINT8,
-		gc.TFLOAT32<<16 | gc.TUINT32,
-		gc.TFLOAT64<<16 | gc.TUINT32,
-		gc.TFLOAT32<<16 | gc.TUINT64,
-		gc.TFLOAT64<<16 | gc.TUINT64:
-		bignodes()
-
-		var r1 gc.Node
-		gc.Regalloc(&r1, gc.Types[ft], f)
-		gmove(f, &r1)
-		if tt == gc.TUINT64 {
-			gc.Regalloc(&r2, gc.Types[gc.TFLOAT64], nil)
-			gmove(&bigf, &r2)
-			gins(ppc64.AFCMPU, &r1, &r2)
-			p1 := (*obj.Prog)(gc.Gbranch(optoas(gc.OLT, gc.Types[gc.TFLOAT64]), nil, +1))
-			gins(ppc64.AFSUB, &r2, &r1)
-			gc.Patch(p1, gc.Pc)
-			gc.Regfree(&r2)
-		}
-
-		gc.Regalloc(&r2, gc.Types[gc.TFLOAT64], nil)
-		var r3 gc.Node
-		gc.Regalloc(&r3, gc.Types[gc.TINT64], t)
-		gins(ppc64.AFCTIDZ, &r1, &r2)
-		p1 := (*obj.Prog)(gins(ppc64.AFMOVD, &r2, nil))
-		p1.To.Type = obj.TYPE_MEM
-		p1.To.Reg = ppc64.REGSP
-		p1.To.Offset = -8
-		p1 = gins(ppc64.AMOVD, nil, &r3)
-		p1.From.Type = obj.TYPE_MEM
-		p1.From.Reg = ppc64.REGSP
-		p1.From.Offset = -8
-		gc.Regfree(&r2)
-		gc.Regfree(&r1)
-		if tt == gc.TUINT64 {
-			p1 := (*obj.Prog)(gc.Gbranch(optoas(gc.OLT, gc.Types[gc.TFLOAT64]), nil, +1)) // use CR0 here again
-			gc.Nodreg(&r1, gc.Types[gc.TINT64], ppc64.REGTMP)
-			gins(ppc64.AMOVD, &bigi, &r1)
-			gins(ppc64.AADD, &r1, &r3)
-			gc.Patch(p1, gc.Pc)
-		}
-
-		gmove(&r3, t)
-		gc.Regfree(&r3)
-		return
-
-		//warn("gmove: convert int to float not implemented: %N -> %N\n", f, t);
-	//return;
-	// algorithm is:
-	//	if small enough, use native int64 -> uint64 conversion.
-	//	otherwise, halve (rounding to odd?), convert, and double.
-	/*
-	 * integer to float
-	 */
-	case gc.TINT32<<16 | gc.TFLOAT32,
-		gc.TINT32<<16 | gc.TFLOAT64,
-		gc.TINT64<<16 | gc.TFLOAT32,
-		gc.TINT64<<16 | gc.TFLOAT64,
-		gc.TINT16<<16 | gc.TFLOAT32,
-		gc.TINT16<<16 | gc.TFLOAT64,
-		gc.TINT8<<16 | gc.TFLOAT32,
-		gc.TINT8<<16 | gc.TFLOAT64,
-		gc.TUINT16<<16 | gc.TFLOAT32,
-		gc.TUINT16<<16 | gc.TFLOAT64,
-		gc.TUINT8<<16 | gc.TFLOAT32,
-		gc.TUINT8<<16 | gc.TFLOAT64,
-		gc.TUINT32<<16 | gc.TFLOAT32,
-		gc.TUINT32<<16 | gc.TFLOAT64,
-		gc.TUINT64<<16 | gc.TFLOAT32,
-		gc.TUINT64<<16 | gc.TFLOAT64:
-		bignodes()
-
-		var r1 gc.Node
-		gc.Regalloc(&r1, gc.Types[gc.TINT64], nil)
-		gmove(f, &r1)
-		if ft == gc.TUINT64 {
-			gc.Nodreg(&r2, gc.Types[gc.TUINT64], ppc64.REGTMP)
-			gmove(&bigi, &r2)
-			gins(ppc64.ACMPU, &r1, &r2)
-			p1 := (*obj.Prog)(gc.Gbranch(optoas(gc.OLT, gc.Types[gc.TUINT64]), nil, +1))
-			p2 := (*obj.Prog)(gins(ppc64.ASRD, nil, &r1))
-			p2.From.Type = obj.TYPE_CONST
-			p2.From.Offset = 1
-			gc.Patch(p1, gc.Pc)
-		}
-
-		gc.Regalloc(&r2, gc.Types[gc.TFLOAT64], t)
-		p1 := (*obj.Prog)(gins(ppc64.AMOVD, &r1, nil))
-		p1.To.Type = obj.TYPE_MEM
-		p1.To.Reg = ppc64.REGSP
-		p1.To.Offset = -8
-		p1 = gins(ppc64.AFMOVD, nil, &r2)
-		p1.From.Type = obj.TYPE_MEM
-		p1.From.Reg = ppc64.REGSP
-		p1.From.Offset = -8
-		gins(ppc64.AFCFID, &r2, &r2)
-		gc.Regfree(&r1)
-		if ft == gc.TUINT64 {
-			p1 := (*obj.Prog)(gc.Gbranch(optoas(gc.OLT, gc.Types[gc.TUINT64]), nil, +1)) // use CR0 here again
-			gc.Nodreg(&r1, gc.Types[gc.TFLOAT64], ppc64.FREGTWO)
-			gins(ppc64.AFMUL, &r1, &r2)
-			gc.Patch(p1, gc.Pc)
-		}
-
-		gmove(&r2, t)
-		gc.Regfree(&r2)
-		return
-
-		/*
-		 * float to float
-		 */
-	case gc.TFLOAT32<<16 | gc.TFLOAT32:
-		a = ppc64.AFMOVS
-
-	case gc.TFLOAT64<<16 | gc.TFLOAT64:
-		a = ppc64.AFMOVD
-
-	case gc.TFLOAT32<<16 | gc.TFLOAT64:
-		a = ppc64.AFMOVS
-		goto rdst
-
-	case gc.TFLOAT64<<16 | gc.TFLOAT32:
-		a = ppc64.AFRSP
-		goto rdst
-	}
-
-	gins(a, f, t)
-	return
-
-	// requires register destination
-rdst:
-	{
-		gc.Regalloc(&r1, t.Type, t)
-
-		gins(a, f, &r1)
-		gmove(&r1, t)
-		gc.Regfree(&r1)
-		return
-	}
-
-	// requires register intermediate
-hard:
-	gc.Regalloc(&r1, cvt, t)
-
-	gmove(f, &r1)
-	gmove(&r1, t)
-	gc.Regfree(&r1)
-	return
-}
-
-func intLiteral(n *gc.Node) (x int64, ok bool) {
-	switch {
-	case n == nil:
-		return
-	case gc.Isconst(n, gc.CTINT):
-		return n.Int(), true
-	case gc.Isconst(n, gc.CTBOOL):
-		return int64(obj.Bool2int(n.Bool())), true
-	}
-	return
-}
-
-// gins is called by the front end.
-// It synthesizes some multiple-instruction sequences
-// so the front end can stay simpler.
-func gins(as int, f, t *gc.Node) *obj.Prog {
-	if as >= obj.A_ARCHSPECIFIC {
-		if x, ok := intLiteral(f); ok {
-			ginscon(as, x, t)
-			return nil // caller must not use
-		}
-	}
-	if as == ppc64.ACMP || as == ppc64.ACMPU {
-		if x, ok := intLiteral(t); ok {
-			ginscon2(as, f, x)
-			return nil // caller must not use
-		}
-	}
-	return rawgins(as, f, t)
-}
-
-/*
- * generate one instruction:
- *	as f, t
- */
-func rawgins(as int, f *gc.Node, t *gc.Node) *obj.Prog {
-	// TODO(austin): Add self-move test like in 6g (but be careful
-	// of truncation moves)
-
-	p := gc.Prog(as)
-	gc.Naddr(&p.From, f)
-	gc.Naddr(&p.To, t)
-
-	switch as {
-	case obj.ACALL:
-		if p.To.Type == obj.TYPE_REG && p.To.Reg != ppc64.REG_CTR {
-			// Allow front end to emit CALL REG, and rewrite into MOV REG, CTR; CALL CTR.
-			pp := gc.Prog(as)
-			pp.From = p.From
-			pp.To.Type = obj.TYPE_REG
-			pp.To.Reg = ppc64.REG_CTR
-
-			p.As = ppc64.AMOVD
-			p.From = p.To
-			p.To.Type = obj.TYPE_REG
-			p.To.Reg = ppc64.REG_CTR
-
-			if gc.Debug['g'] != 0 {
-				fmt.Printf("%v\n", p)
-				fmt.Printf("%v\n", pp)
-			}
-
-			return pp
-		}
-
-	// Bad things the front end has done to us. Crash to find call stack.
-	case ppc64.AAND, ppc64.AMULLD:
-		if p.From.Type == obj.TYPE_CONST {
-			gc.Debug['h'] = 1
-			gc.Fatal("bad inst: %v", p)
-		}
-	case ppc64.ACMP, ppc64.ACMPU:
-		if p.From.Type == obj.TYPE_MEM || p.To.Type == obj.TYPE_MEM {
-			gc.Debug['h'] = 1
-			gc.Fatal("bad inst: %v", p)
-		}
-	}
-
-	if gc.Debug['g'] != 0 {
-		fmt.Printf("%v\n", p)
-	}
-
-	w := int32(0)
-	switch as {
-	case ppc64.AMOVB,
-		ppc64.AMOVBU,
-		ppc64.AMOVBZ,
-		ppc64.AMOVBZU:
-		w = 1
-
-	case ppc64.AMOVH,
-		ppc64.AMOVHU,
-		ppc64.AMOVHZ,
-		ppc64.AMOVHZU:
-		w = 2
-
-	case ppc64.AMOVW,
-		ppc64.AMOVWU,
-		ppc64.AMOVWZ,
-		ppc64.AMOVWZU:
-		w = 4
-
-	case ppc64.AMOVD,
-		ppc64.AMOVDU:
-		if p.From.Type == obj.TYPE_CONST || p.From.Type == obj.TYPE_ADDR {
-			break
-		}
-		w = 8
-	}
-
-	if w != 0 && ((f != nil && p.From.Width < int64(w)) || (t != nil && p.To.Type != obj.TYPE_REG && p.To.Width > int64(w))) {
-		gc.Dump("f", f)
-		gc.Dump("t", t)
-		gc.Fatal("bad width: %v (%d, %d)\n", p, p.From.Width, p.To.Width)
-	}
-
-	return p
-}
-
-/*
- * return Axxx for Oxxx on type t.
- */
-func optoas(op int, t *gc.Type) int {
-	if t == nil {
-		gc.Fatal("optoas: t is nil")
-	}
-
-	a := int(obj.AXXX)
-	switch uint32(op)<<16 | uint32(gc.Simtype[t.Etype]) {
-	default:
-		gc.Fatal("optoas: no entry for op=%v type=%v", gc.Oconv(int(op), 0), t)
-
-	case gc.OEQ<<16 | gc.TBOOL,
-		gc.OEQ<<16 | gc.TINT8,
-		gc.OEQ<<16 | gc.TUINT8,
-		gc.OEQ<<16 | gc.TINT16,
-		gc.OEQ<<16 | gc.TUINT16,
-		gc.OEQ<<16 | gc.TINT32,
-		gc.OEQ<<16 | gc.TUINT32,
-		gc.OEQ<<16 | gc.TINT64,
-		gc.OEQ<<16 | gc.TUINT64,
-		gc.OEQ<<16 | gc.TPTR32,
-		gc.OEQ<<16 | gc.TPTR64,
-		gc.OEQ<<16 | gc.TFLOAT32,
-		gc.OEQ<<16 | gc.TFLOAT64:
-		a = ppc64.ABEQ
-
-	case gc.ONE<<16 | gc.TBOOL,
-		gc.ONE<<16 | gc.TINT8,
-		gc.ONE<<16 | gc.TUINT8,
-		gc.ONE<<16 | gc.TINT16,
-		gc.ONE<<16 | gc.TUINT16,
-		gc.ONE<<16 | gc.TINT32,
-		gc.ONE<<16 | gc.TUINT32,
-		gc.ONE<<16 | gc.TINT64,
-		gc.ONE<<16 | gc.TUINT64,
-		gc.ONE<<16 | gc.TPTR32,
-		gc.ONE<<16 | gc.TPTR64,
-		gc.ONE<<16 | gc.TFLOAT32,
-		gc.ONE<<16 | gc.TFLOAT64:
-		a = ppc64.ABNE
-
-	case gc.OLT<<16 | gc.TINT8, // ACMP
-		gc.OLT<<16 | gc.TINT16,
-		gc.OLT<<16 | gc.TINT32,
-		gc.OLT<<16 | gc.TINT64,
-		gc.OLT<<16 | gc.TUINT8,
-		// ACMPU
-		gc.OLT<<16 | gc.TUINT16,
-		gc.OLT<<16 | gc.TUINT32,
-		gc.OLT<<16 | gc.TUINT64,
-		gc.OLT<<16 | gc.TFLOAT32,
-		// AFCMPU
-		gc.OLT<<16 | gc.TFLOAT64:
-		a = ppc64.ABLT
-
-	case gc.OLE<<16 | gc.TINT8, // ACMP
-		gc.OLE<<16 | gc.TINT16,
-		gc.OLE<<16 | gc.TINT32,
-		gc.OLE<<16 | gc.TINT64,
-		gc.OLE<<16 | gc.TUINT8,
-		// ACMPU
-		gc.OLE<<16 | gc.TUINT16,
-		gc.OLE<<16 | gc.TUINT32,
-		gc.OLE<<16 | gc.TUINT64:
-		// No OLE for floats, because it mishandles NaN.
-		// Front end must reverse comparison or use OLT and OEQ together.
-		a = ppc64.ABLE
-
-	case gc.OGT<<16 | gc.TINT8,
-		gc.OGT<<16 | gc.TINT16,
-		gc.OGT<<16 | gc.TINT32,
-		gc.OGT<<16 | gc.TINT64,
-		gc.OGT<<16 | gc.TUINT8,
-		gc.OGT<<16 | gc.TUINT16,
-		gc.OGT<<16 | gc.TUINT32,
-		gc.OGT<<16 | gc.TUINT64,
-		gc.OGT<<16 | gc.TFLOAT32,
-		gc.OGT<<16 | gc.TFLOAT64:
-		a = ppc64.ABGT
-
-	case gc.OGE<<16 | gc.TINT8,
-		gc.OGE<<16 | gc.TINT16,
-		gc.OGE<<16 | gc.TINT32,
-		gc.OGE<<16 | gc.TINT64,
-		gc.OGE<<16 | gc.TUINT8,
-		gc.OGE<<16 | gc.TUINT16,
-		gc.OGE<<16 | gc.TUINT32,
-		gc.OGE<<16 | gc.TUINT64:
-		// No OGE for floats, because it mishandles NaN.
-		// Front end must reverse comparison or use OLT and OEQ together.
-		a = ppc64.ABGE
-
-	case gc.OCMP<<16 | gc.TBOOL,
-		gc.OCMP<<16 | gc.TINT8,
-		gc.OCMP<<16 | gc.TINT16,
-		gc.OCMP<<16 | gc.TINT32,
-		gc.OCMP<<16 | gc.TPTR32,
-		gc.OCMP<<16 | gc.TINT64:
-		a = ppc64.ACMP
-
-	case gc.OCMP<<16 | gc.TUINT8,
-		gc.OCMP<<16 | gc.TUINT16,
-		gc.OCMP<<16 | gc.TUINT32,
-		gc.OCMP<<16 | gc.TUINT64,
-		gc.OCMP<<16 | gc.TPTR64:
-		a = ppc64.ACMPU
-
-	case gc.OCMP<<16 | gc.TFLOAT32,
-		gc.OCMP<<16 | gc.TFLOAT64:
-		a = ppc64.AFCMPU
-
-	case gc.OAS<<16 | gc.TBOOL,
-		gc.OAS<<16 | gc.TINT8:
-		a = ppc64.AMOVB
-
-	case gc.OAS<<16 | gc.TUINT8:
-		a = ppc64.AMOVBZ
-
-	case gc.OAS<<16 | gc.TINT16:
-		a = ppc64.AMOVH
-
-	case gc.OAS<<16 | gc.TUINT16:
-		a = ppc64.AMOVHZ
-
-	case gc.OAS<<16 | gc.TINT32:
-		a = ppc64.AMOVW
-
-	case gc.OAS<<16 | gc.TUINT32,
-		gc.OAS<<16 | gc.TPTR32:
-		a = ppc64.AMOVWZ
-
-	case gc.OAS<<16 | gc.TINT64,
-		gc.OAS<<16 | gc.TUINT64,
-		gc.OAS<<16 | gc.TPTR64:
-		a = ppc64.AMOVD
-
-	case gc.OAS<<16 | gc.TFLOAT32:
-		a = ppc64.AFMOVS
-
-	case gc.OAS<<16 | gc.TFLOAT64:
-		a = ppc64.AFMOVD
-
-	case gc.OADD<<16 | gc.TINT8,
-		gc.OADD<<16 | gc.TUINT8,
-		gc.OADD<<16 | gc.TINT16,
-		gc.OADD<<16 | gc.TUINT16,
-		gc.OADD<<16 | gc.TINT32,
-		gc.OADD<<16 | gc.TUINT32,
-		gc.OADD<<16 | gc.TPTR32,
-		gc.OADD<<16 | gc.TINT64,
-		gc.OADD<<16 | gc.TUINT64,
-		gc.OADD<<16 | gc.TPTR64:
-		a = ppc64.AADD
-
-	case gc.OADD<<16 | gc.TFLOAT32:
-		a = ppc64.AFADDS
-
-	case gc.OADD<<16 | gc.TFLOAT64:
-		a = ppc64.AFADD
-
-	case gc.OSUB<<16 | gc.TINT8,
-		gc.OSUB<<16 | gc.TUINT8,
-		gc.OSUB<<16 | gc.TINT16,
-		gc.OSUB<<16 | gc.TUINT16,
-		gc.OSUB<<16 | gc.TINT32,
-		gc.OSUB<<16 | gc.TUINT32,
-		gc.OSUB<<16 | gc.TPTR32,
-		gc.OSUB<<16 | gc.TINT64,
-		gc.OSUB<<16 | gc.TUINT64,
-		gc.OSUB<<16 | gc.TPTR64:
-		a = ppc64.ASUB
-
-	case gc.OSUB<<16 | gc.TFLOAT32:
-		a = ppc64.AFSUBS
-
-	case gc.OSUB<<16 | gc.TFLOAT64:
-		a = ppc64.AFSUB
-
-	case gc.OMINUS<<16 | gc.TINT8,
-		gc.OMINUS<<16 | gc.TUINT8,
-		gc.OMINUS<<16 | gc.TINT16,
-		gc.OMINUS<<16 | gc.TUINT16,
-		gc.OMINUS<<16 | gc.TINT32,
-		gc.OMINUS<<16 | gc.TUINT32,
-		gc.OMINUS<<16 | gc.TPTR32,
-		gc.OMINUS<<16 | gc.TINT64,
-		gc.OMINUS<<16 | gc.TUINT64,
-		gc.OMINUS<<16 | gc.TPTR64:
-		a = ppc64.ANEG
-
-	case gc.OAND<<16 | gc.TINT8,
-		gc.OAND<<16 | gc.TUINT8,
-		gc.OAND<<16 | gc.TINT16,
-		gc.OAND<<16 | gc.TUINT16,
-		gc.OAND<<16 | gc.TINT32,
-		gc.OAND<<16 | gc.TUINT32,
-		gc.OAND<<16 | gc.TPTR32,
-		gc.OAND<<16 | gc.TINT64,
-		gc.OAND<<16 | gc.TUINT64,
-		gc.OAND<<16 | gc.TPTR64:
-		a = ppc64.AAND
-
-	case gc.OOR<<16 | gc.TINT8,
-		gc.OOR<<16 | gc.TUINT8,
-		gc.OOR<<16 | gc.TINT16,
-		gc.OOR<<16 | gc.TUINT16,
-		gc.OOR<<16 | gc.TINT32,
-		gc.OOR<<16 | gc.TUINT32,
-		gc.OOR<<16 | gc.TPTR32,
-		gc.OOR<<16 | gc.TINT64,
-		gc.OOR<<16 | gc.TUINT64,
-		gc.OOR<<16 | gc.TPTR64:
-		a = ppc64.AOR
-
-	case gc.OXOR<<16 | gc.TINT8,
-		gc.OXOR<<16 | gc.TUINT8,
-		gc.OXOR<<16 | gc.TINT16,
-		gc.OXOR<<16 | gc.TUINT16,
-		gc.OXOR<<16 | gc.TINT32,
-		gc.OXOR<<16 | gc.TUINT32,
-		gc.OXOR<<16 | gc.TPTR32,
-		gc.OXOR<<16 | gc.TINT64,
-		gc.OXOR<<16 | gc.TUINT64,
-		gc.OXOR<<16 | gc.TPTR64:
-		a = ppc64.AXOR
-
-		// TODO(minux): handle rotates
-	//case CASE(OLROT, TINT8):
-	//case CASE(OLROT, TUINT8):
-	//case CASE(OLROT, TINT16):
-	//case CASE(OLROT, TUINT16):
-	//case CASE(OLROT, TINT32):
-	//case CASE(OLROT, TUINT32):
-	//case CASE(OLROT, TPTR32):
-	//case CASE(OLROT, TINT64):
-	//case CASE(OLROT, TUINT64):
-	//case CASE(OLROT, TPTR64):
-	//	a = 0//???; RLDC?
-	//	break;
-
-	case gc.OLSH<<16 | gc.TINT8,
-		gc.OLSH<<16 | gc.TUINT8,
-		gc.OLSH<<16 | gc.TINT16,
-		gc.OLSH<<16 | gc.TUINT16,
-		gc.OLSH<<16 | gc.TINT32,
-		gc.OLSH<<16 | gc.TUINT32,
-		gc.OLSH<<16 | gc.TPTR32,
-		gc.OLSH<<16 | gc.TINT64,
-		gc.OLSH<<16 | gc.TUINT64,
-		gc.OLSH<<16 | gc.TPTR64:
-		a = ppc64.ASLD
-
-	case gc.ORSH<<16 | gc.TUINT8,
-		gc.ORSH<<16 | gc.TUINT16,
-		gc.ORSH<<16 | gc.TUINT32,
-		gc.ORSH<<16 | gc.TPTR32,
-		gc.ORSH<<16 | gc.TUINT64,
-		gc.ORSH<<16 | gc.TPTR64:
-		a = ppc64.ASRD
-
-	case gc.ORSH<<16 | gc.TINT8,
-		gc.ORSH<<16 | gc.TINT16,
-		gc.ORSH<<16 | gc.TINT32,
-		gc.ORSH<<16 | gc.TINT64:
-		a = ppc64.ASRAD
-
-		// TODO(minux): handle rotates
-	//case CASE(ORROTC, TINT8):
-	//case CASE(ORROTC, TUINT8):
-	//case CASE(ORROTC, TINT16):
-	//case CASE(ORROTC, TUINT16):
-	//case CASE(ORROTC, TINT32):
-	//case CASE(ORROTC, TUINT32):
-	//case CASE(ORROTC, TINT64):
-	//case CASE(ORROTC, TUINT64):
-	//	a = 0//??? RLDC??
-	//	break;
-
-	case gc.OHMUL<<16 | gc.TINT64:
-		a = ppc64.AMULHD
-
-	case gc.OHMUL<<16 | gc.TUINT64,
-		gc.OHMUL<<16 | gc.TPTR64:
-		a = ppc64.AMULHDU
-
-	case gc.OMUL<<16 | gc.TINT8,
-		gc.OMUL<<16 | gc.TINT16,
-		gc.OMUL<<16 | gc.TINT32,
-		gc.OMUL<<16 | gc.TINT64:
-		a = ppc64.AMULLD
-
-	case gc.OMUL<<16 | gc.TUINT8,
-		gc.OMUL<<16 | gc.TUINT16,
-		gc.OMUL<<16 | gc.TUINT32,
-		gc.OMUL<<16 | gc.TPTR32,
-		// don't use word multiply, the high 32-bit are undefined.
-		gc.OMUL<<16 | gc.TUINT64,
-		gc.OMUL<<16 | gc.TPTR64:
-		// for 64-bit multiplies, signedness doesn't matter.
-		a = ppc64.AMULLD
-
-	case gc.OMUL<<16 | gc.TFLOAT32:
-		a = ppc64.AFMULS
-
-	case gc.OMUL<<16 | gc.TFLOAT64:
-		a = ppc64.AFMUL
-
-	case gc.ODIV<<16 | gc.TINT8,
-		gc.ODIV<<16 | gc.TINT16,
-		gc.ODIV<<16 | gc.TINT32,
-		gc.ODIV<<16 | gc.TINT64:
-		a = ppc64.ADIVD
-
-	case gc.ODIV<<16 | gc.TUINT8,
-		gc.ODIV<<16 | gc.TUINT16,
-		gc.ODIV<<16 | gc.TUINT32,
-		gc.ODIV<<16 | gc.TPTR32,
-		gc.ODIV<<16 | gc.TUINT64,
-		gc.ODIV<<16 | gc.TPTR64:
-		a = ppc64.ADIVDU
-
-	case gc.ODIV<<16 | gc.TFLOAT32:
-		a = ppc64.AFDIVS
-
-	case gc.ODIV<<16 | gc.TFLOAT64:
-		a = ppc64.AFDIV
-	}
-
-	return a
-}
-
-const (
-	ODynam   = 1 << 0
-	OAddable = 1 << 1
-)
-
-func xgen(n *gc.Node, a *gc.Node, o int) bool {
-	// TODO(minux)
-
-	return -1 != 0 /*TypeKind(100016)*/
-}
-
-func sudoclean() {
-	return
-}
-
-/*
- * generate code to compute address of n,
- * a reference to a (perhaps nested) field inside
- * an array or struct.
- * return 0 on failure, 1 on success.
- * on success, leaves usable address in a.
- *
- * caller is responsible for calling sudoclean
- * after successful sudoaddable,
- * to release the register used for a.
- */
-func sudoaddable(as int, n *gc.Node, a *obj.Addr) bool {
-	// TODO(minux)
-
-	*a = obj.Addr{}
-	return false
-}
diff --git a/src/cmd/compile/internal/ppc64/opt.go b/src/cmd/compile/internal/ppc64/opt.go
deleted file mode 100644
index 1704f63..0000000
--- a/src/cmd/compile/internal/ppc64/opt.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package ppc64
-
-// Many Power ISA arithmetic and logical instructions come in four
-// standard variants.  These bits let us map between variants.
-const (
-	V_CC = 1 << 0 // xCC (affect CR field 0 flags)
-	V_V  = 1 << 1 // xV (affect SO and OV flags)
-)
diff --git a/src/cmd/compile/internal/ppc64/peep.go b/src/cmd/compile/internal/ppc64/peep.go
deleted file mode 100644
index 9c3f1ed..0000000
--- a/src/cmd/compile/internal/ppc64/peep.go
+++ /dev/null
@@ -1,1051 +0,0 @@
-// Derived from Inferno utils/6c/peep.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6c/peep.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package ppc64
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/ppc64"
-	"fmt"
-)
-
-var gactive uint32
-
-func peep(firstp *obj.Prog) {
-	g := (*gc.Graph)(gc.Flowstart(firstp, nil))
-	if g == nil {
-		return
-	}
-	gactive = 0
-
-	var p *obj.Prog
-	var r *gc.Flow
-	var t int
-loop1:
-	if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-		gc.Dumpit("loop1", g.Start, 0)
-	}
-
-	t = 0
-	for r = g.Start; r != nil; r = r.Link {
-		p = r.Prog
-
-		// TODO(austin) Handle smaller moves.  arm and amd64
-		// distinguish between moves that moves that *must*
-		// sign/zero extend and moves that don't care so they
-		// can eliminate moves that don't care without
-		// breaking moves that do care.  This might let us
-		// simplify or remove the next peep loop, too.
-		if p.As == ppc64.AMOVD || p.As == ppc64.AFMOVD {
-			if regtyp(&p.To) {
-				// Try to eliminate reg->reg moves
-				if regtyp(&p.From) {
-					if p.From.Type == p.To.Type {
-						if copyprop(r) {
-							excise(r)
-							t++
-						} else if subprop(r) && copyprop(r) {
-							excise(r)
-							t++
-						}
-					}
-				}
-
-				// Convert uses to $0 to uses of R0 and
-				// propagate R0
-				if regzer(&p.From) != 0 {
-					if p.To.Type == obj.TYPE_REG {
-						p.From.Type = obj.TYPE_REG
-						p.From.Reg = ppc64.REGZERO
-						if copyprop(r) {
-							excise(r)
-							t++
-						} else if subprop(r) && copyprop(r) {
-							excise(r)
-							t++
-						}
-					}
-				}
-			}
-		}
-	}
-
-	if t != 0 {
-		goto loop1
-	}
-
-	/*
-	 * look for MOVB x,R; MOVB R,R (for small MOVs not handled above)
-	 */
-	var p1 *obj.Prog
-	var r1 *gc.Flow
-	for r := (*gc.Flow)(g.Start); r != nil; r = r.Link {
-		p = r.Prog
-		switch p.As {
-		default:
-			continue
-
-		case ppc64.AMOVH,
-			ppc64.AMOVHZ,
-			ppc64.AMOVB,
-			ppc64.AMOVBZ,
-			ppc64.AMOVW,
-			ppc64.AMOVWZ:
-			if p.To.Type != obj.TYPE_REG {
-				continue
-			}
-		}
-
-		r1 = r.Link
-		if r1 == nil {
-			continue
-		}
-		p1 = r1.Prog
-		if p1.As != p.As {
-			continue
-		}
-		if p1.From.Type != obj.TYPE_REG || p1.From.Reg != p.To.Reg {
-			continue
-		}
-		if p1.To.Type != obj.TYPE_REG || p1.To.Reg != p.To.Reg {
-			continue
-		}
-		excise(r1)
-	}
-
-	if gc.Debug['D'] > 1 {
-		goto ret /* allow following code improvement to be suppressed */
-	}
-
-	/*
-	 * look for OP x,y,R; CMP R, $0 -> OPCC x,y,R
-	 * when OP can set condition codes correctly
-	 */
-	for r := (*gc.Flow)(g.Start); r != nil; r = r.Link {
-		p = r.Prog
-		switch p.As {
-		case ppc64.ACMP,
-			ppc64.ACMPW: /* always safe? */
-			if regzer(&p.To) == 0 {
-				continue
-			}
-			r1 = r.S1
-			if r1 == nil {
-				continue
-			}
-			switch r1.Prog.As {
-			default:
-				continue
-
-				/* the conditions can be complex and these are currently little used */
-			case ppc64.ABCL,
-				ppc64.ABC:
-				continue
-
-			case ppc64.ABEQ,
-				ppc64.ABGE,
-				ppc64.ABGT,
-				ppc64.ABLE,
-				ppc64.ABLT,
-				ppc64.ABNE,
-				ppc64.ABVC,
-				ppc64.ABVS:
-				break
-			}
-
-			r1 = r
-			for {
-				r1 = gc.Uniqp(r1)
-				if r1 == nil || r1.Prog.As != obj.ANOP {
-					break
-				}
-			}
-
-			if r1 == nil {
-				continue
-			}
-			p1 = r1.Prog
-			if p1.To.Type != obj.TYPE_REG || p1.To.Reg != p.From.Reg {
-				continue
-			}
-			switch p1.As {
-			/* irregular instructions */
-			case ppc64.ASUB,
-				ppc64.AADD,
-				ppc64.AXOR,
-				ppc64.AOR:
-				if p1.From.Type == obj.TYPE_CONST || p1.From.Type == obj.TYPE_ADDR {
-					continue
-				}
-			}
-
-			switch p1.As {
-			default:
-				continue
-
-			case ppc64.AMOVW,
-				ppc64.AMOVD:
-				if p1.From.Type != obj.TYPE_REG {
-					continue
-				}
-				continue
-
-			case ppc64.AANDCC,
-				ppc64.AANDNCC,
-				ppc64.AORCC,
-				ppc64.AORNCC,
-				ppc64.AXORCC,
-				ppc64.ASUBCC,
-				ppc64.ASUBECC,
-				ppc64.ASUBMECC,
-				ppc64.ASUBZECC,
-				ppc64.AADDCC,
-				ppc64.AADDCCC,
-				ppc64.AADDECC,
-				ppc64.AADDMECC,
-				ppc64.AADDZECC,
-				ppc64.ARLWMICC,
-				ppc64.ARLWNMCC,
-				/* don't deal with floating point instructions for now */
-				/*
-					case AFABS:
-					case AFADD:
-					case AFADDS:
-					case AFCTIW:
-					case AFCTIWZ:
-					case AFDIV:
-					case AFDIVS:
-					case AFMADD:
-					case AFMADDS:
-					case AFMOVD:
-					case AFMSUB:
-					case AFMSUBS:
-					case AFMUL:
-					case AFMULS:
-					case AFNABS:
-					case AFNEG:
-					case AFNMADD:
-					case AFNMADDS:
-					case AFNMSUB:
-					case AFNMSUBS:
-					case AFRSP:
-					case AFSUB:
-					case AFSUBS:
-					case ACNTLZW:
-					case AMTFSB0:
-					case AMTFSB1:
-				*/
-				ppc64.AADD,
-				ppc64.AADDV,
-				ppc64.AADDC,
-				ppc64.AADDCV,
-				ppc64.AADDME,
-				ppc64.AADDMEV,
-				ppc64.AADDE,
-				ppc64.AADDEV,
-				ppc64.AADDZE,
-				ppc64.AADDZEV,
-				ppc64.AAND,
-				ppc64.AANDN,
-				ppc64.ADIVW,
-				ppc64.ADIVWV,
-				ppc64.ADIVWU,
-				ppc64.ADIVWUV,
-				ppc64.ADIVD,
-				ppc64.ADIVDV,
-				ppc64.ADIVDU,
-				ppc64.ADIVDUV,
-				ppc64.AEQV,
-				ppc64.AEXTSB,
-				ppc64.AEXTSH,
-				ppc64.AEXTSW,
-				ppc64.AMULHW,
-				ppc64.AMULHWU,
-				ppc64.AMULLW,
-				ppc64.AMULLWV,
-				ppc64.AMULHD,
-				ppc64.AMULHDU,
-				ppc64.AMULLD,
-				ppc64.AMULLDV,
-				ppc64.ANAND,
-				ppc64.ANEG,
-				ppc64.ANEGV,
-				ppc64.ANOR,
-				ppc64.AOR,
-				ppc64.AORN,
-				ppc64.AREM,
-				ppc64.AREMV,
-				ppc64.AREMU,
-				ppc64.AREMUV,
-				ppc64.AREMD,
-				ppc64.AREMDV,
-				ppc64.AREMDU,
-				ppc64.AREMDUV,
-				ppc64.ARLWMI,
-				ppc64.ARLWNM,
-				ppc64.ASLW,
-				ppc64.ASRAW,
-				ppc64.ASRW,
-				ppc64.ASLD,
-				ppc64.ASRAD,
-				ppc64.ASRD,
-				ppc64.ASUB,
-				ppc64.ASUBV,
-				ppc64.ASUBC,
-				ppc64.ASUBCV,
-				ppc64.ASUBME,
-				ppc64.ASUBMEV,
-				ppc64.ASUBE,
-				ppc64.ASUBEV,
-				ppc64.ASUBZE,
-				ppc64.ASUBZEV,
-				ppc64.AXOR:
-				t = variant2as(int(p1.As), as2variant(int(p1.As))|V_CC)
-			}
-
-			if gc.Debug['D'] != 0 {
-				fmt.Printf("cmp %v; %v -> ", p1, p)
-			}
-			p1.As = int16(t)
-			if gc.Debug['D'] != 0 {
-				fmt.Printf("%v\n", p1)
-			}
-			excise(r)
-			continue
-		}
-	}
-
-ret:
-	gc.Flowend(g)
-}
-
-func excise(r *gc.Flow) {
-	p := (*obj.Prog)(r.Prog)
-	if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-		fmt.Printf("%v ===delete===\n", p)
-	}
-	obj.Nopout(p)
-	gc.Ostats.Ndelmov++
-}
-
-/*
- * regzer returns 1 if a's value is 0 (a is R0 or $0)
- */
-func regzer(a *obj.Addr) int {
-	if a.Type == obj.TYPE_CONST || a.Type == obj.TYPE_ADDR {
-		if a.Sym == nil && a.Reg == 0 {
-			if a.Offset == 0 {
-				return 1
-			}
-		}
-	}
-	if a.Type == obj.TYPE_REG {
-		if a.Reg == ppc64.REGZERO {
-			return 1
-		}
-	}
-	return 0
-}
-
-func regtyp(a *obj.Addr) bool {
-	// TODO(rsc): Floating point register exclusions?
-	return a.Type == obj.TYPE_REG && ppc64.REG_R0 <= a.Reg && a.Reg <= ppc64.REG_F31 && a.Reg != ppc64.REGZERO
-}
-
-/*
- * the idea is to substitute
- * one register for another
- * from one MOV to another
- *	MOV	a, R1
- *	ADD	b, R1	/ no use of R2
- *	MOV	R1, R2
- * would be converted to
- *	MOV	a, R2
- *	ADD	b, R2
- *	MOV	R2, R1
- * hopefully, then the former or latter MOV
- * will be eliminated by copy propagation.
- *
- * r0 (the argument, not the register) is the MOV at the end of the
- * above sequences.  This returns 1 if it modified any instructions.
- */
-func subprop(r0 *gc.Flow) bool {
-	p := (*obj.Prog)(r0.Prog)
-	v1 := (*obj.Addr)(&p.From)
-	if !regtyp(v1) {
-		return false
-	}
-	v2 := (*obj.Addr)(&p.To)
-	if !regtyp(v2) {
-		return false
-	}
-	for r := gc.Uniqp(r0); r != nil; r = gc.Uniqp(r) {
-		if gc.Uniqs(r) == nil {
-			break
-		}
-		p = r.Prog
-		if p.As == obj.AVARDEF || p.As == obj.AVARKILL {
-			continue
-		}
-		if p.Info.Flags&gc.Call != 0 {
-			return false
-		}
-
-		if p.Info.Flags&(gc.RightRead|gc.RightWrite) == gc.RightWrite {
-			if p.To.Type == v1.Type {
-				if p.To.Reg == v1.Reg {
-					copysub(&p.To, v1, v2, 1)
-					if gc.Debug['P'] != 0 {
-						fmt.Printf("gotit: %v->%v\n%v", gc.Ctxt.Dconv(v1), gc.Ctxt.Dconv(v2), r.Prog)
-						if p.From.Type == v2.Type {
-							fmt.Printf(" excise")
-						}
-						fmt.Printf("\n")
-					}
-
-					for r = gc.Uniqs(r); r != r0; r = gc.Uniqs(r) {
-						p = r.Prog
-						copysub(&p.From, v1, v2, 1)
-						copysub1(p, v1, v2, 1)
-						copysub(&p.To, v1, v2, 1)
-						if gc.Debug['P'] != 0 {
-							fmt.Printf("%v\n", r.Prog)
-						}
-					}
-
-					t := int(int(v1.Reg))
-					v1.Reg = v2.Reg
-					v2.Reg = int16(t)
-					if gc.Debug['P'] != 0 {
-						fmt.Printf("%v last\n", r.Prog)
-					}
-					return true
-				}
-			}
-		}
-
-		if copyau(&p.From, v2) || copyau1(p, v2) || copyau(&p.To, v2) {
-			break
-		}
-		if copysub(&p.From, v1, v2, 0) != 0 || copysub1(p, v1, v2, 0) != 0 || copysub(&p.To, v1, v2, 0) != 0 {
-			break
-		}
-	}
-
-	return false
-}
-
-/*
- * The idea is to remove redundant copies.
- *	v1->v2	F=0
- *	(use v2	s/v2/v1/)*
- *	set v1	F=1
- *	use v2	return fail (v1->v2 move must remain)
- *	-----------------
- *	v1->v2	F=0
- *	(use v2	s/v2/v1/)*
- *	set v1	F=1
- *	set v2	return success (caller can remove v1->v2 move)
- */
-func copyprop(r0 *gc.Flow) bool {
-	p := (*obj.Prog)(r0.Prog)
-	v1 := (*obj.Addr)(&p.From)
-	v2 := (*obj.Addr)(&p.To)
-	if copyas(v1, v2) {
-		if gc.Debug['P'] != 0 {
-			fmt.Printf("eliminating self-move: %v\n", r0.Prog)
-		}
-		return true
-	}
-
-	gactive++
-	if gc.Debug['P'] != 0 {
-		fmt.Printf("trying to eliminate %v->%v move from:\n%v\n", gc.Ctxt.Dconv(v1), gc.Ctxt.Dconv(v2), r0.Prog)
-	}
-	return copy1(v1, v2, r0.S1, 0)
-}
-
-// copy1 replaces uses of v2 with v1 starting at r and returns 1 if
-// all uses were rewritten.
-func copy1(v1 *obj.Addr, v2 *obj.Addr, r *gc.Flow, f int) bool {
-	if uint32(r.Active) == gactive {
-		if gc.Debug['P'] != 0 {
-			fmt.Printf("act set; return 1\n")
-		}
-		return true
-	}
-
-	r.Active = int32(gactive)
-	if gc.Debug['P'] != 0 {
-		fmt.Printf("copy1 replace %v with %v f=%d\n", gc.Ctxt.Dconv(v2), gc.Ctxt.Dconv(v1), f)
-	}
-	var t int
-	var p *obj.Prog
-	for ; r != nil; r = r.S1 {
-		p = r.Prog
-		if gc.Debug['P'] != 0 {
-			fmt.Printf("%v", p)
-		}
-		if f == 0 && gc.Uniqp(r) == nil {
-			// Multiple predecessors; conservatively
-			// assume v1 was set on other path
-			f = 1
-
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("; merge; f=%d", f)
-			}
-		}
-
-		t = copyu(p, v2, nil)
-		switch t {
-		case 2: /* rar, can't split */
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("; %v rar; return 0\n", gc.Ctxt.Dconv(v2))
-			}
-			return false
-
-		case 3: /* set */
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("; %v set; return 1\n", gc.Ctxt.Dconv(v2))
-			}
-			return true
-
-		case 1, /* used, substitute */
-			4: /* use and set */
-			if f != 0 {
-				if gc.Debug['P'] == 0 {
-					return false
-				}
-				if t == 4 {
-					fmt.Printf("; %v used+set and f=%d; return 0\n", gc.Ctxt.Dconv(v2), f)
-				} else {
-					fmt.Printf("; %v used and f=%d; return 0\n", gc.Ctxt.Dconv(v2), f)
-				}
-				return false
-			}
-
-			if copyu(p, v2, v1) != 0 {
-				if gc.Debug['P'] != 0 {
-					fmt.Printf("; sub fail; return 0\n")
-				}
-				return false
-			}
-
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("; sub %v->%v\n => %v", gc.Ctxt.Dconv(v2), gc.Ctxt.Dconv(v1), p)
-			}
-			if t == 4 {
-				if gc.Debug['P'] != 0 {
-					fmt.Printf("; %v used+set; return 1\n", gc.Ctxt.Dconv(v2))
-				}
-				return true
-			}
-		}
-
-		if f == 0 {
-			t = copyu(p, v1, nil)
-			if f == 0 && (t == 2 || t == 3 || t == 4) {
-				f = 1
-				if gc.Debug['P'] != 0 {
-					fmt.Printf("; %v set and !f; f=%d", gc.Ctxt.Dconv(v1), f)
-				}
-			}
-		}
-
-		if gc.Debug['P'] != 0 {
-			fmt.Printf("\n")
-		}
-		if r.S2 != nil {
-			if !copy1(v1, v2, r.S2, f) {
-				return false
-			}
-		}
-	}
-
-	return true
-}
-
-// If s==nil, copyu returns the set/use of v in p; otherwise, it
-// modifies p to replace reads of v with reads of s and returns 0 for
-// success or non-zero for failure.
-//
-// If s==nil, copy returns one of the following values:
-// 	1 if v only used
-//	2 if v is set and used in one address (read-alter-rewrite;
-// 	  can't substitute)
-//	3 if v is only set
-//	4 if v is set in one address and used in another (so addresses
-// 	  can be rewritten independently)
-//	0 otherwise (not touched)
-func copyu(p *obj.Prog, v *obj.Addr, s *obj.Addr) int {
-	if p.From3Type() != obj.TYPE_NONE {
-		// 9g never generates a from3
-		fmt.Printf("copyu: from3 (%v) not implemented\n", gc.Ctxt.Dconv(p.From3))
-	}
-
-	switch p.As {
-	default:
-		fmt.Printf("copyu: can't find %v\n", obj.Aconv(int(p.As)))
-		return 2
-
-	case obj.ANOP, /* read p->from, write p->to */
-		ppc64.AMOVH,
-		ppc64.AMOVHZ,
-		ppc64.AMOVB,
-		ppc64.AMOVBZ,
-		ppc64.AMOVW,
-		ppc64.AMOVWZ,
-		ppc64.AMOVD,
-		ppc64.ANEG,
-		ppc64.ANEGCC,
-		ppc64.AADDME,
-		ppc64.AADDMECC,
-		ppc64.AADDZE,
-		ppc64.AADDZECC,
-		ppc64.ASUBME,
-		ppc64.ASUBMECC,
-		ppc64.ASUBZE,
-		ppc64.ASUBZECC,
-		ppc64.AFCTIW,
-		ppc64.AFCTIWZ,
-		ppc64.AFCTID,
-		ppc64.AFCTIDZ,
-		ppc64.AFCFID,
-		ppc64.AFCFIDCC,
-		ppc64.AFMOVS,
-		ppc64.AFMOVD,
-		ppc64.AFRSP,
-		ppc64.AFNEG,
-		ppc64.AFNEGCC:
-		if s != nil {
-			if copysub(&p.From, v, s, 1) != 0 {
-				return 1
-			}
-
-			// Update only indirect uses of v in p->to
-			if !copyas(&p.To, v) {
-				if copysub(&p.To, v, s, 1) != 0 {
-					return 1
-				}
-			}
-			return 0
-		}
-
-		if copyas(&p.To, v) {
-			// Fix up implicit from
-			if p.From.Type == obj.TYPE_NONE {
-				p.From = p.To
-			}
-			if copyau(&p.From, v) {
-				return 4
-			}
-			return 3
-		}
-
-		if copyau(&p.From, v) {
-			return 1
-		}
-		if copyau(&p.To, v) {
-			// p->to only indirectly uses v
-			return 1
-		}
-
-		return 0
-
-	case ppc64.AMOVBU, /* rar p->from, write p->to or read p->from, rar p->to */
-		ppc64.AMOVBZU,
-		ppc64.AMOVHU,
-		ppc64.AMOVHZU,
-		ppc64.AMOVWZU,
-		ppc64.AMOVDU:
-		if p.From.Type == obj.TYPE_MEM {
-			if copyas(&p.From, v) {
-				// No s!=nil check; need to fail
-				// anyway in that case
-				return 2
-			}
-
-			if s != nil {
-				if copysub(&p.To, v, s, 1) != 0 {
-					return 1
-				}
-				return 0
-			}
-
-			if copyas(&p.To, v) {
-				return 3
-			}
-		} else if p.To.Type == obj.TYPE_MEM {
-			if copyas(&p.To, v) {
-				return 2
-			}
-			if s != nil {
-				if copysub(&p.From, v, s, 1) != 0 {
-					return 1
-				}
-				return 0
-			}
-
-			if copyau(&p.From, v) {
-				return 1
-			}
-		} else {
-			fmt.Printf("copyu: bad %v\n", p)
-		}
-
-		return 0
-
-	case ppc64.ARLWMI, /* read p->from, read p->reg, rar p->to */
-		ppc64.ARLWMICC:
-		if copyas(&p.To, v) {
-			return 2
-		}
-		fallthrough
-
-		/* fall through */
-	case ppc64.AADD,
-		/* read p->from, read p->reg, write p->to */
-		ppc64.AADDC,
-		ppc64.AADDE,
-		ppc64.ASUB,
-		ppc64.ASLW,
-		ppc64.ASRW,
-		ppc64.ASRAW,
-		ppc64.ASLD,
-		ppc64.ASRD,
-		ppc64.ASRAD,
-		ppc64.AOR,
-		ppc64.AORCC,
-		ppc64.AORN,
-		ppc64.AORNCC,
-		ppc64.AAND,
-		ppc64.AANDCC,
-		ppc64.AANDN,
-		ppc64.AANDNCC,
-		ppc64.ANAND,
-		ppc64.ANANDCC,
-		ppc64.ANOR,
-		ppc64.ANORCC,
-		ppc64.AXOR,
-		ppc64.AMULHW,
-		ppc64.AMULHWU,
-		ppc64.AMULLW,
-		ppc64.AMULLD,
-		ppc64.ADIVW,
-		ppc64.ADIVD,
-		ppc64.ADIVWU,
-		ppc64.ADIVDU,
-		ppc64.AREM,
-		ppc64.AREMU,
-		ppc64.AREMD,
-		ppc64.AREMDU,
-		ppc64.ARLWNM,
-		ppc64.ARLWNMCC,
-		ppc64.AFADDS,
-		ppc64.AFADD,
-		ppc64.AFSUBS,
-		ppc64.AFSUB,
-		ppc64.AFMULS,
-		ppc64.AFMUL,
-		ppc64.AFDIVS,
-		ppc64.AFDIV:
-		if s != nil {
-			if copysub(&p.From, v, s, 1) != 0 {
-				return 1
-			}
-			if copysub1(p, v, s, 1) != 0 {
-				return 1
-			}
-
-			// Update only indirect uses of v in p->to
-			if !copyas(&p.To, v) {
-				if copysub(&p.To, v, s, 1) != 0 {
-					return 1
-				}
-			}
-			return 0
-		}
-
-		if copyas(&p.To, v) {
-			if p.Reg == 0 {
-				// Fix up implicit reg (e.g., ADD
-				// R3,R4 -> ADD R3,R4,R4) so we can
-				// update reg and to separately.
-				p.Reg = p.To.Reg
-			}
-
-			if copyau(&p.From, v) {
-				return 4
-			}
-			if copyau1(p, v) {
-				return 4
-			}
-			return 3
-		}
-
-		if copyau(&p.From, v) {
-			return 1
-		}
-		if copyau1(p, v) {
-			return 1
-		}
-		if copyau(&p.To, v) {
-			return 1
-		}
-		return 0
-
-	case ppc64.ABEQ,
-		ppc64.ABGT,
-		ppc64.ABGE,
-		ppc64.ABLT,
-		ppc64.ABLE,
-		ppc64.ABNE,
-		ppc64.ABVC,
-		ppc64.ABVS:
-		return 0
-
-	case obj.ACHECKNIL, /* read p->from */
-		ppc64.ACMP, /* read p->from, read p->to */
-		ppc64.ACMPU,
-		ppc64.ACMPW,
-		ppc64.ACMPWU,
-		ppc64.AFCMPO,
-		ppc64.AFCMPU:
-		if s != nil {
-			if copysub(&p.From, v, s, 1) != 0 {
-				return 1
-			}
-			return copysub(&p.To, v, s, 1)
-		}
-
-		if copyau(&p.From, v) {
-			return 1
-		}
-		if copyau(&p.To, v) {
-			return 1
-		}
-		return 0
-
-		// 9g never generates a branch to a GPR (this isn't
-	// even a normal instruction; liblink turns it in to a
-	// mov and a branch).
-	case ppc64.ABR: /* read p->to */
-		if s != nil {
-			if copysub(&p.To, v, s, 1) != 0 {
-				return 1
-			}
-			return 0
-		}
-
-		if copyau(&p.To, v) {
-			return 1
-		}
-		return 0
-
-	case obj.ARET: /* funny */
-		if s != nil {
-			return 0
-		}
-
-		// All registers die at this point, so claim
-		// everything is set (and not used).
-		return 3
-
-	case ppc64.ABL: /* funny */
-		if v.Type == obj.TYPE_REG {
-			// TODO(rsc): REG_R0 and REG_F0 used to be
-			// (when register numbers started at 0) exregoffset and exfregoffset,
-			// which are unset entirely.
-			// It's strange that this handles R0 and F0 differently from the other
-			// registers. Possible failure to optimize?
-			if ppc64.REG_R0 < v.Reg && v.Reg <= ppc64.REGEXT {
-				return 2
-			}
-			if v.Reg == ppc64.REGARG {
-				return 2
-			}
-			if ppc64.REG_F0 < v.Reg && v.Reg <= ppc64.FREGEXT {
-				return 2
-			}
-		}
-
-		if p.From.Type == obj.TYPE_REG && v.Type == obj.TYPE_REG && p.From.Reg == v.Reg {
-			return 2
-		}
-
-		if s != nil {
-			if copysub(&p.To, v, s, 1) != 0 {
-				return 1
-			}
-			return 0
-		}
-
-		if copyau(&p.To, v) {
-			return 4
-		}
-		return 3
-
-		// R0 is zero, used by DUFFZERO, cannot be substituted.
-	// R3 is ptr to memory, used and set, cannot be substituted.
-	case obj.ADUFFZERO:
-		if v.Type == obj.TYPE_REG {
-			if v.Reg == 0 {
-				return 1
-			}
-			if v.Reg == 3 {
-				return 2
-			}
-		}
-
-		return 0
-
-		// R3, R4 are ptr to src, dst, used and set, cannot be substituted.
-	// R5 is scratch, set by DUFFCOPY, cannot be substituted.
-	case obj.ADUFFCOPY:
-		if v.Type == obj.TYPE_REG {
-			if v.Reg == 3 || v.Reg == 4 {
-				return 2
-			}
-			if v.Reg == 5 {
-				return 3
-			}
-		}
-
-		return 0
-
-	case obj.ATEXT: /* funny */
-		if v.Type == obj.TYPE_REG {
-			if v.Reg == ppc64.REGARG {
-				return 3
-			}
-		}
-		return 0
-
-	case obj.APCDATA,
-		obj.AFUNCDATA,
-		obj.AVARDEF,
-		obj.AVARKILL:
-		return 0
-	}
-}
-
-// copyas returns 1 if a and v address the same register.
-//
-// If a is the from operand, this means this operation reads the
-// register in v.  If a is the to operand, this means this operation
-// writes the register in v.
-func copyas(a *obj.Addr, v *obj.Addr) bool {
-	if regtyp(v) {
-		if a.Type == v.Type {
-			if a.Reg == v.Reg {
-				return true
-			}
-		}
-	}
-	return false
-}
-
-// copyau returns 1 if a either directly or indirectly addresses the
-// same register as v.
-//
-// If a is the from operand, this means this operation reads the
-// register in v.  If a is the to operand, this means the operation
-// either reads or writes the register in v (if !copyas(a, v), then
-// the operation reads the register in v).
-func copyau(a *obj.Addr, v *obj.Addr) bool {
-	if copyas(a, v) {
-		return true
-	}
-	if v.Type == obj.TYPE_REG {
-		if a.Type == obj.TYPE_MEM || (a.Type == obj.TYPE_ADDR && a.Reg != 0) {
-			if v.Reg == a.Reg {
-				return true
-			}
-		}
-	}
-	return false
-}
-
-// copyau1 returns 1 if p->reg references the same register as v and v
-// is a direct reference.
-func copyau1(p *obj.Prog, v *obj.Addr) bool {
-	if regtyp(v) && v.Reg != 0 {
-		if p.Reg == v.Reg {
-			return true
-		}
-	}
-	return false
-}
-
-// copysub replaces v with s in a if f!=0 or indicates it if could if f==0.
-// Returns 1 on failure to substitute (it always succeeds on ppc64).
-func copysub(a *obj.Addr, v *obj.Addr, s *obj.Addr, f int) int {
-	if f != 0 {
-		if copyau(a, v) {
-			a.Reg = s.Reg
-		}
-	}
-	return 0
-}
-
-// copysub1 replaces v with s in p1->reg if f!=0 or indicates if it could if f==0.
-// Returns 1 on failure to substitute (it always succeeds on ppc64).
-func copysub1(p1 *obj.Prog, v *obj.Addr, s *obj.Addr, f int) int {
-	if f != 0 {
-		if copyau1(p1, v) {
-			p1.Reg = s.Reg
-		}
-	}
-	return 0
-}
-
-func sameaddr(a *obj.Addr, v *obj.Addr) bool {
-	if a.Type != v.Type {
-		return false
-	}
-	if regtyp(v) && a.Reg == v.Reg {
-		return true
-	}
-	if v.Type == obj.NAME_AUTO || v.Type == obj.NAME_PARAM {
-		if v.Offset == a.Offset {
-			return true
-		}
-	}
-	return false
-}
-
-func smallindir(a *obj.Addr, reg *obj.Addr) bool {
-	return reg.Type == obj.TYPE_REG && a.Type == obj.TYPE_MEM && a.Reg == reg.Reg && 0 <= a.Offset && a.Offset < 4096
-}
-
-func stackaddr(a *obj.Addr) bool {
-	return a.Type == obj.TYPE_REG && a.Reg == ppc64.REGSP
-}
diff --git a/src/cmd/compile/internal/ppc64/prog.go b/src/cmd/compile/internal/ppc64/prog.go
deleted file mode 100644
index 328b2ce..0000000
--- a/src/cmd/compile/internal/ppc64/prog.go
+++ /dev/null
@@ -1,314 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package ppc64
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/ppc64"
-)
-
-const (
-	LeftRdwr  uint32 = gc.LeftRead | gc.LeftWrite
-	RightRdwr uint32 = gc.RightRead | gc.RightWrite
-)
-
-// This table gives the basic information about instruction
-// generated by the compiler and processed in the optimizer.
-// See opt.h for bit definitions.
-//
-// Instructions not generated need not be listed.
-// As an exception to that rule, we typically write down all the
-// size variants of an operation even if we just use a subset.
-//
-// The table is formatted for 8-space tabs.
-var progtable = [ppc64.ALAST]obj.ProgInfo{
-	obj.ATYPE:     {gc.Pseudo | gc.Skip, 0, 0, 0},
-	obj.ATEXT:     {gc.Pseudo, 0, 0, 0},
-	obj.AFUNCDATA: {gc.Pseudo, 0, 0, 0},
-	obj.APCDATA:   {gc.Pseudo, 0, 0, 0},
-	obj.AUNDEF:    {gc.Break, 0, 0, 0},
-	obj.AUSEFIELD: {gc.OK, 0, 0, 0},
-	obj.ACHECKNIL: {gc.LeftRead, 0, 0, 0},
-	obj.AVARDEF:   {gc.Pseudo | gc.RightWrite, 0, 0, 0},
-	obj.AVARKILL:  {gc.Pseudo | gc.RightWrite, 0, 0, 0},
-
-	// NOP is an internal no-op that also stands
-	// for USED and SET annotations, not the Power opcode.
-	obj.ANOP: {gc.LeftRead | gc.RightWrite, 0, 0, 0},
-
-	// Integer
-	ppc64.AADD:    {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	ppc64.ASUB:    {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	ppc64.ANEG:    {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	ppc64.AAND:    {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	ppc64.AOR:     {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	ppc64.AXOR:    {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	ppc64.AMULLD:  {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	ppc64.AMULLW:  {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	ppc64.AMULHD:  {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	ppc64.AMULHDU: {gc.SizeL | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	ppc64.ADIVD:   {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	ppc64.ADIVDU:  {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	ppc64.ASLD:    {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	ppc64.ASRD:    {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	ppc64.ASRAD:   {gc.SizeQ | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	ppc64.ACMP:    {gc.SizeQ | gc.LeftRead | gc.RightRead, 0, 0, 0},
-	ppc64.ACMPU:   {gc.SizeQ | gc.LeftRead | gc.RightRead, 0, 0, 0},
-	ppc64.ATD:     {gc.SizeQ | gc.RightRead, 0, 0, 0},
-
-	// Floating point.
-	ppc64.AFADD:   {gc.SizeD | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	ppc64.AFADDS:  {gc.SizeF | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	ppc64.AFSUB:   {gc.SizeD | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	ppc64.AFSUBS:  {gc.SizeF | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	ppc64.AFMUL:   {gc.SizeD | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	ppc64.AFMULS:  {gc.SizeF | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	ppc64.AFDIV:   {gc.SizeD | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	ppc64.AFDIVS:  {gc.SizeF | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	ppc64.AFCTIDZ: {gc.SizeF | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	ppc64.AFCFID:  {gc.SizeF | gc.LeftRead | gc.RegRead | gc.RightWrite, 0, 0, 0},
-	ppc64.AFCMPU:  {gc.SizeD | gc.LeftRead | gc.RightRead, 0, 0, 0},
-	ppc64.AFRSP:   {gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-
-	// Moves
-	ppc64.AMOVB:  {gc.SizeB | gc.LeftRead | gc.RightWrite | gc.Move | gc.Conv, 0, 0, 0},
-	ppc64.AMOVBU: {gc.SizeB | gc.LeftRead | gc.RightWrite | gc.Move | gc.Conv | gc.PostInc, 0, 0, 0},
-	ppc64.AMOVBZ: {gc.SizeB | gc.LeftRead | gc.RightWrite | gc.Move | gc.Conv, 0, 0, 0},
-	ppc64.AMOVH:  {gc.SizeW | gc.LeftRead | gc.RightWrite | gc.Move | gc.Conv, 0, 0, 0},
-	ppc64.AMOVHU: {gc.SizeW | gc.LeftRead | gc.RightWrite | gc.Move | gc.Conv | gc.PostInc, 0, 0, 0},
-	ppc64.AMOVHZ: {gc.SizeW | gc.LeftRead | gc.RightWrite | gc.Move | gc.Conv, 0, 0, 0},
-	ppc64.AMOVW:  {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Move | gc.Conv, 0, 0, 0},
-
-	// there is no AMOVWU.
-	ppc64.AMOVWZU: {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Move | gc.Conv | gc.PostInc, 0, 0, 0},
-	ppc64.AMOVWZ:  {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Move | gc.Conv, 0, 0, 0},
-	ppc64.AMOVD:   {gc.SizeQ | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
-	ppc64.AMOVDU:  {gc.SizeQ | gc.LeftRead | gc.RightWrite | gc.Move | gc.PostInc, 0, 0, 0},
-	ppc64.AFMOVS:  {gc.SizeF | gc.LeftRead | gc.RightWrite | gc.Move | gc.Conv, 0, 0, 0},
-	ppc64.AFMOVD:  {gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
-
-	// Jumps
-	ppc64.ABR:     {gc.Jump | gc.Break, 0, 0, 0},
-	ppc64.ABL:     {gc.Call, 0, 0, 0},
-	ppc64.ABEQ:    {gc.Cjmp, 0, 0, 0},
-	ppc64.ABNE:    {gc.Cjmp, 0, 0, 0},
-	ppc64.ABGE:    {gc.Cjmp, 0, 0, 0},
-	ppc64.ABLT:    {gc.Cjmp, 0, 0, 0},
-	ppc64.ABGT:    {gc.Cjmp, 0, 0, 0},
-	ppc64.ABLE:    {gc.Cjmp, 0, 0, 0},
-	obj.ARET:      {gc.Break, 0, 0, 0},
-	obj.ADUFFZERO: {gc.Call, 0, 0, 0},
-	obj.ADUFFCOPY: {gc.Call, 0, 0, 0},
-}
-
-var initproginfo_initialized int
-
-func initproginfo() {
-	var addvariant = []int{V_CC, V_V, V_CC | V_V}
-
-	if initproginfo_initialized != 0 {
-		return
-	}
-	initproginfo_initialized = 1
-
-	// Perform one-time expansion of instructions in progtable to
-	// their CC, V, and VCC variants
-	var as2 int
-	var i int
-	var variant int
-	for as := int(0); as < len(progtable); as++ {
-		if progtable[as].Flags == 0 {
-			continue
-		}
-		variant = as2variant(as)
-		for i = 0; i < len(addvariant); i++ {
-			as2 = variant2as(as, variant|addvariant[i])
-			if as2 != 0 && progtable[as2].Flags == 0 {
-				progtable[as2] = progtable[as]
-			}
-		}
-	}
-}
-
-func proginfo(p *obj.Prog) {
-	initproginfo()
-
-	info := &p.Info
-	*info = progtable[p.As]
-	if info.Flags == 0 {
-		gc.Fatal("proginfo: unknown instruction %v", p)
-	}
-
-	if (info.Flags&gc.RegRead != 0) && p.Reg == 0 {
-		info.Flags &^= gc.RegRead
-		info.Flags |= gc.RightRead /*CanRegRead |*/
-	}
-
-	if (p.From.Type == obj.TYPE_MEM || p.From.Type == obj.TYPE_ADDR) && p.From.Reg != 0 {
-		info.Regindex |= RtoB(int(p.From.Reg))
-		if info.Flags&gc.PostInc != 0 {
-			info.Regset |= RtoB(int(p.From.Reg))
-		}
-	}
-
-	if (p.To.Type == obj.TYPE_MEM || p.To.Type == obj.TYPE_ADDR) && p.To.Reg != 0 {
-		info.Regindex |= RtoB(int(p.To.Reg))
-		if info.Flags&gc.PostInc != 0 {
-			info.Regset |= RtoB(int(p.To.Reg))
-		}
-	}
-
-	if p.From.Type == obj.TYPE_ADDR && p.From.Sym != nil && (info.Flags&gc.LeftRead != 0) {
-		info.Flags &^= gc.LeftRead
-		info.Flags |= gc.LeftAddr
-	}
-
-	if p.As == obj.ADUFFZERO {
-		info.Reguse |= 1<<0 | RtoB(ppc64.REG_R3)
-		info.Regset |= RtoB(ppc64.REG_R3)
-	}
-
-	if p.As == obj.ADUFFCOPY {
-		// TODO(austin) Revisit when duffcopy is implemented
-		info.Reguse |= RtoB(ppc64.REG_R3) | RtoB(ppc64.REG_R4) | RtoB(ppc64.REG_R5)
-
-		info.Regset |= RtoB(ppc64.REG_R3) | RtoB(ppc64.REG_R4)
-	}
-}
-
-// Instruction variants table.  Initially this contains entries only
-// for the "base" form of each instruction.  On the first call to
-// as2variant or variant2as, we'll add the variants to the table.
-var varianttable = [ppc64.ALAST][4]int{
-	ppc64.AADD:     [4]int{ppc64.AADD, ppc64.AADDCC, ppc64.AADDV, ppc64.AADDVCC},
-	ppc64.AADDC:    [4]int{ppc64.AADDC, ppc64.AADDCCC, ppc64.AADDCV, ppc64.AADDCVCC},
-	ppc64.AADDE:    [4]int{ppc64.AADDE, ppc64.AADDECC, ppc64.AADDEV, ppc64.AADDEVCC},
-	ppc64.AADDME:   [4]int{ppc64.AADDME, ppc64.AADDMECC, ppc64.AADDMEV, ppc64.AADDMEVCC},
-	ppc64.AADDZE:   [4]int{ppc64.AADDZE, ppc64.AADDZECC, ppc64.AADDZEV, ppc64.AADDZEVCC},
-	ppc64.AAND:     [4]int{ppc64.AAND, ppc64.AANDCC, 0, 0},
-	ppc64.AANDN:    [4]int{ppc64.AANDN, ppc64.AANDNCC, 0, 0},
-	ppc64.ACNTLZD:  [4]int{ppc64.ACNTLZD, ppc64.ACNTLZDCC, 0, 0},
-	ppc64.ACNTLZW:  [4]int{ppc64.ACNTLZW, ppc64.ACNTLZWCC, 0, 0},
-	ppc64.ADIVD:    [4]int{ppc64.ADIVD, ppc64.ADIVDCC, ppc64.ADIVDV, ppc64.ADIVDVCC},
-	ppc64.ADIVDU:   [4]int{ppc64.ADIVDU, ppc64.ADIVDUCC, ppc64.ADIVDUV, ppc64.ADIVDUVCC},
-	ppc64.ADIVW:    [4]int{ppc64.ADIVW, ppc64.ADIVWCC, ppc64.ADIVWV, ppc64.ADIVWVCC},
-	ppc64.ADIVWU:   [4]int{ppc64.ADIVWU, ppc64.ADIVWUCC, ppc64.ADIVWUV, ppc64.ADIVWUVCC},
-	ppc64.AEQV:     [4]int{ppc64.AEQV, ppc64.AEQVCC, 0, 0},
-	ppc64.AEXTSB:   [4]int{ppc64.AEXTSB, ppc64.AEXTSBCC, 0, 0},
-	ppc64.AEXTSH:   [4]int{ppc64.AEXTSH, ppc64.AEXTSHCC, 0, 0},
-	ppc64.AEXTSW:   [4]int{ppc64.AEXTSW, ppc64.AEXTSWCC, 0, 0},
-	ppc64.AFABS:    [4]int{ppc64.AFABS, ppc64.AFABSCC, 0, 0},
-	ppc64.AFADD:    [4]int{ppc64.AFADD, ppc64.AFADDCC, 0, 0},
-	ppc64.AFADDS:   [4]int{ppc64.AFADDS, ppc64.AFADDSCC, 0, 0},
-	ppc64.AFCFID:   [4]int{ppc64.AFCFID, ppc64.AFCFIDCC, 0, 0},
-	ppc64.AFCTID:   [4]int{ppc64.AFCTID, ppc64.AFCTIDCC, 0, 0},
-	ppc64.AFCTIDZ:  [4]int{ppc64.AFCTIDZ, ppc64.AFCTIDZCC, 0, 0},
-	ppc64.AFCTIW:   [4]int{ppc64.AFCTIW, ppc64.AFCTIWCC, 0, 0},
-	ppc64.AFCTIWZ:  [4]int{ppc64.AFCTIWZ, ppc64.AFCTIWZCC, 0, 0},
-	ppc64.AFDIV:    [4]int{ppc64.AFDIV, ppc64.AFDIVCC, 0, 0},
-	ppc64.AFDIVS:   [4]int{ppc64.AFDIVS, ppc64.AFDIVSCC, 0, 0},
-	ppc64.AFMADD:   [4]int{ppc64.AFMADD, ppc64.AFMADDCC, 0, 0},
-	ppc64.AFMADDS:  [4]int{ppc64.AFMADDS, ppc64.AFMADDSCC, 0, 0},
-	ppc64.AFMOVD:   [4]int{ppc64.AFMOVD, ppc64.AFMOVDCC, 0, 0},
-	ppc64.AFMSUB:   [4]int{ppc64.AFMSUB, ppc64.AFMSUBCC, 0, 0},
-	ppc64.AFMSUBS:  [4]int{ppc64.AFMSUBS, ppc64.AFMSUBSCC, 0, 0},
-	ppc64.AFMUL:    [4]int{ppc64.AFMUL, ppc64.AFMULCC, 0, 0},
-	ppc64.AFMULS:   [4]int{ppc64.AFMULS, ppc64.AFMULSCC, 0, 0},
-	ppc64.AFNABS:   [4]int{ppc64.AFNABS, ppc64.AFNABSCC, 0, 0},
-	ppc64.AFNEG:    [4]int{ppc64.AFNEG, ppc64.AFNEGCC, 0, 0},
-	ppc64.AFNMADD:  [4]int{ppc64.AFNMADD, ppc64.AFNMADDCC, 0, 0},
-	ppc64.AFNMADDS: [4]int{ppc64.AFNMADDS, ppc64.AFNMADDSCC, 0, 0},
-	ppc64.AFNMSUB:  [4]int{ppc64.AFNMSUB, ppc64.AFNMSUBCC, 0, 0},
-	ppc64.AFNMSUBS: [4]int{ppc64.AFNMSUBS, ppc64.AFNMSUBSCC, 0, 0},
-	ppc64.AFRES:    [4]int{ppc64.AFRES, ppc64.AFRESCC, 0, 0},
-	ppc64.AFRSP:    [4]int{ppc64.AFRSP, ppc64.AFRSPCC, 0, 0},
-	ppc64.AFRSQRTE: [4]int{ppc64.AFRSQRTE, ppc64.AFRSQRTECC, 0, 0},
-	ppc64.AFSEL:    [4]int{ppc64.AFSEL, ppc64.AFSELCC, 0, 0},
-	ppc64.AFSQRT:   [4]int{ppc64.AFSQRT, ppc64.AFSQRTCC, 0, 0},
-	ppc64.AFSQRTS:  [4]int{ppc64.AFSQRTS, ppc64.AFSQRTSCC, 0, 0},
-	ppc64.AFSUB:    [4]int{ppc64.AFSUB, ppc64.AFSUBCC, 0, 0},
-	ppc64.AFSUBS:   [4]int{ppc64.AFSUBS, ppc64.AFSUBSCC, 0, 0},
-	ppc64.AMTFSB0:  [4]int{ppc64.AMTFSB0, ppc64.AMTFSB0CC, 0, 0},
-	ppc64.AMTFSB1:  [4]int{ppc64.AMTFSB1, ppc64.AMTFSB1CC, 0, 0},
-	ppc64.AMULHD:   [4]int{ppc64.AMULHD, ppc64.AMULHDCC, 0, 0},
-	ppc64.AMULHDU:  [4]int{ppc64.AMULHDU, ppc64.AMULHDUCC, 0, 0},
-	ppc64.AMULHW:   [4]int{ppc64.AMULHW, ppc64.AMULHWCC, 0, 0},
-	ppc64.AMULHWU:  [4]int{ppc64.AMULHWU, ppc64.AMULHWUCC, 0, 0},
-	ppc64.AMULLD:   [4]int{ppc64.AMULLD, ppc64.AMULLDCC, ppc64.AMULLDV, ppc64.AMULLDVCC},
-	ppc64.AMULLW:   [4]int{ppc64.AMULLW, ppc64.AMULLWCC, ppc64.AMULLWV, ppc64.AMULLWVCC},
-	ppc64.ANAND:    [4]int{ppc64.ANAND, ppc64.ANANDCC, 0, 0},
-	ppc64.ANEG:     [4]int{ppc64.ANEG, ppc64.ANEGCC, ppc64.ANEGV, ppc64.ANEGVCC},
-	ppc64.ANOR:     [4]int{ppc64.ANOR, ppc64.ANORCC, 0, 0},
-	ppc64.AOR:      [4]int{ppc64.AOR, ppc64.AORCC, 0, 0},
-	ppc64.AORN:     [4]int{ppc64.AORN, ppc64.AORNCC, 0, 0},
-	ppc64.AREM:     [4]int{ppc64.AREM, ppc64.AREMCC, ppc64.AREMV, ppc64.AREMVCC},
-	ppc64.AREMD:    [4]int{ppc64.AREMD, ppc64.AREMDCC, ppc64.AREMDV, ppc64.AREMDVCC},
-	ppc64.AREMDU:   [4]int{ppc64.AREMDU, ppc64.AREMDUCC, ppc64.AREMDUV, ppc64.AREMDUVCC},
-	ppc64.AREMU:    [4]int{ppc64.AREMU, ppc64.AREMUCC, ppc64.AREMUV, ppc64.AREMUVCC},
-	ppc64.ARLDC:    [4]int{ppc64.ARLDC, ppc64.ARLDCCC, 0, 0},
-	ppc64.ARLDCL:   [4]int{ppc64.ARLDCL, ppc64.ARLDCLCC, 0, 0},
-	ppc64.ARLDCR:   [4]int{ppc64.ARLDCR, ppc64.ARLDCRCC, 0, 0},
-	ppc64.ARLDMI:   [4]int{ppc64.ARLDMI, ppc64.ARLDMICC, 0, 0},
-	ppc64.ARLWMI:   [4]int{ppc64.ARLWMI, ppc64.ARLWMICC, 0, 0},
-	ppc64.ARLWNM:   [4]int{ppc64.ARLWNM, ppc64.ARLWNMCC, 0, 0},
-	ppc64.ASLD:     [4]int{ppc64.ASLD, ppc64.ASLDCC, 0, 0},
-	ppc64.ASLW:     [4]int{ppc64.ASLW, ppc64.ASLWCC, 0, 0},
-	ppc64.ASRAD:    [4]int{ppc64.ASRAD, ppc64.ASRADCC, 0, 0},
-	ppc64.ASRAW:    [4]int{ppc64.ASRAW, ppc64.ASRAWCC, 0, 0},
-	ppc64.ASRD:     [4]int{ppc64.ASRD, ppc64.ASRDCC, 0, 0},
-	ppc64.ASRW:     [4]int{ppc64.ASRW, ppc64.ASRWCC, 0, 0},
-	ppc64.ASUB:     [4]int{ppc64.ASUB, ppc64.ASUBCC, ppc64.ASUBV, ppc64.ASUBVCC},
-	ppc64.ASUBC:    [4]int{ppc64.ASUBC, ppc64.ASUBCCC, ppc64.ASUBCV, ppc64.ASUBCVCC},
-	ppc64.ASUBE:    [4]int{ppc64.ASUBE, ppc64.ASUBECC, ppc64.ASUBEV, ppc64.ASUBEVCC},
-	ppc64.ASUBME:   [4]int{ppc64.ASUBME, ppc64.ASUBMECC, ppc64.ASUBMEV, ppc64.ASUBMEVCC},
-	ppc64.ASUBZE:   [4]int{ppc64.ASUBZE, ppc64.ASUBZECC, ppc64.ASUBZEV, ppc64.ASUBZEVCC},
-	ppc64.AXOR:     [4]int{ppc64.AXOR, ppc64.AXORCC, 0, 0},
-}
-
-var initvariants_initialized int
-
-func initvariants() {
-	if initvariants_initialized != 0 {
-		return
-	}
-	initvariants_initialized = 1
-
-	var j int
-	for i := int(0); i < len(varianttable); i++ {
-		if varianttable[i][0] == 0 {
-			// Instruction has no variants
-			varianttable[i][0] = i
-
-			continue
-		}
-
-		// Copy base form to other variants
-		if varianttable[i][0] == i {
-			for j = 0; j < len(varianttable[i]); j++ {
-				varianttable[varianttable[i][j]] = varianttable[i]
-			}
-		}
-	}
-}
-
-// as2variant returns the variant (V_*) flags of instruction as.
-func as2variant(as int) int {
-	initvariants()
-	for i := int(0); i < len(varianttable[as]); i++ {
-		if varianttable[as][i] == as {
-			return i
-		}
-	}
-	gc.Fatal("as2variant: instruction %v is not a variant of itself", obj.Aconv(as))
-	return 0
-}
-
-// variant2as returns the instruction as with the given variant (V_*) flags.
-// If no such variant exists, this returns 0.
-func variant2as(as int, flags int) int {
-	initvariants()
-	return varianttable[as][flags]
-}
diff --git a/src/cmd/compile/internal/ppc64/reg.go b/src/cmd/compile/internal/ppc64/reg.go
deleted file mode 100644
index fa1cb71..0000000
--- a/src/cmd/compile/internal/ppc64/reg.go
+++ /dev/null
@@ -1,162 +0,0 @@
-// Derived from Inferno utils/6c/reg.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6c/reg.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package ppc64
-
-import "cmd/internal/obj/ppc64"
-import "cmd/compile/internal/gc"
-
-const (
-	NREGVAR = 64 /* 32 general + 32 floating */
-)
-
-var regname = []string{
-	".R0",
-	".R1",
-	".R2",
-	".R3",
-	".R4",
-	".R5",
-	".R6",
-	".R7",
-	".R8",
-	".R9",
-	".R10",
-	".R11",
-	".R12",
-	".R13",
-	".R14",
-	".R15",
-	".R16",
-	".R17",
-	".R18",
-	".R19",
-	".R20",
-	".R21",
-	".R22",
-	".R23",
-	".R24",
-	".R25",
-	".R26",
-	".R27",
-	".R28",
-	".R29",
-	".R30",
-	".R31",
-	".F0",
-	".F1",
-	".F2",
-	".F3",
-	".F4",
-	".F5",
-	".F6",
-	".F7",
-	".F8",
-	".F9",
-	".F10",
-	".F11",
-	".F12",
-	".F13",
-	".F14",
-	".F15",
-	".F16",
-	".F17",
-	".F18",
-	".F19",
-	".F20",
-	".F21",
-	".F22",
-	".F23",
-	".F24",
-	".F25",
-	".F26",
-	".F27",
-	".F28",
-	".F29",
-	".F30",
-	".F31",
-}
-
-func regnames(n *int) []string {
-	*n = NREGVAR
-	return regname
-}
-
-func excludedregs() uint64 {
-	// Exclude registers with fixed functions
-	regbits := uint64(1<<0 | RtoB(ppc64.REGSP) | RtoB(ppc64.REGG) | RtoB(ppc64.REGTLS))
-
-	// Also exclude floating point registers with fixed constants
-	regbits |= RtoB(ppc64.REG_F27) | RtoB(ppc64.REG_F28) | RtoB(ppc64.REG_F29) | RtoB(ppc64.REG_F30) | RtoB(ppc64.REG_F31)
-
-	return regbits
-}
-
-func doregbits(r int) uint64 {
-	return 0
-}
-
-/*
- * track register variables including external registers:
- *	bit	reg
- *	0	R0
- *	1	R1
- *	...	...
- *	31	R31
- *	32+0	F0
- *	32+1	F1
- *	...	...
- *	32+31	F31
- */
-func RtoB(r int) uint64 {
-	if r > ppc64.REG_R0 && r <= ppc64.REG_R31 {
-		return 1 << uint(r-ppc64.REG_R0)
-	}
-	if r >= ppc64.REG_F0 && r <= ppc64.REG_F31 {
-		return 1 << uint(32+r-ppc64.REG_F0)
-	}
-	return 0
-}
-
-func BtoR(b uint64) int {
-	b &= 0xffffffff
-	if b == 0 {
-		return 0
-	}
-	return gc.Bitno(b) + ppc64.REG_R0
-}
-
-func BtoF(b uint64) int {
-	b >>= 32
-	if b == 0 {
-		return 0
-	}
-	return gc.Bitno(b) + ppc64.REG_F0
-}
diff --git a/src/cmd/compile/internal/x86/cgen.go b/src/cmd/compile/internal/x86/cgen.go
deleted file mode 100644
index 1768674..0000000
--- a/src/cmd/compile/internal/x86/cgen.go
+++ /dev/null
@@ -1,159 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package x86
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/x86"
-)
-
-/*
- * generate an addressable node in res, containing the value of n.
- * n is an array index, and might be any size; res width is <= 32-bit.
- * returns Prog* to patch to panic call.
- */
-func igenindex(n *gc.Node, res *gc.Node, bounded bool) *obj.Prog {
-	if !gc.Is64(n.Type) {
-		if n.Addable && (gc.Simtype[n.Etype] == gc.TUINT32 || gc.Simtype[n.Etype] == gc.TINT32) {
-			// nothing to do.
-			*res = *n
-		} else {
-			gc.Tempname(res, gc.Types[gc.TUINT32])
-			gc.Cgen(n, res)
-		}
-
-		return nil
-	}
-
-	var tmp gc.Node
-	gc.Tempname(&tmp, gc.Types[gc.TINT64])
-	gc.Cgen(n, &tmp)
-	var lo gc.Node
-	var hi gc.Node
-	split64(&tmp, &lo, &hi)
-	gc.Tempname(res, gc.Types[gc.TUINT32])
-	gmove(&lo, res)
-	if bounded {
-		splitclean()
-		return nil
-	}
-
-	var zero gc.Node
-	gc.Nodconst(&zero, gc.Types[gc.TINT32], 0)
-	gins(x86.ACMPL, &hi, &zero)
-	splitclean()
-	return gc.Gbranch(x86.AJNE, nil, +1)
-}
-
-func blockcopy(n, res *gc.Node, osrc, odst, w int64) {
-	var dst gc.Node
-	gc.Nodreg(&dst, gc.Types[gc.Tptr], x86.REG_DI)
-	var src gc.Node
-	gc.Nodreg(&src, gc.Types[gc.Tptr], x86.REG_SI)
-
-	var tsrc gc.Node
-	gc.Tempname(&tsrc, gc.Types[gc.Tptr])
-	var tdst gc.Node
-	gc.Tempname(&tdst, gc.Types[gc.Tptr])
-	if !n.Addable {
-		gc.Agen(n, &tsrc)
-	}
-	if !res.Addable {
-		gc.Agen(res, &tdst)
-	}
-	if n.Addable {
-		gc.Agen(n, &src)
-	} else {
-		gmove(&tsrc, &src)
-	}
-
-	if res.Op == gc.ONAME {
-		gc.Gvardef(res)
-	}
-
-	if res.Addable {
-		gc.Agen(res, &dst)
-	} else {
-		gmove(&tdst, &dst)
-	}
-
-	c := int32(w % 4) // bytes
-	q := int32(w / 4) // doublewords
-
-	// if we are copying forward on the stack and
-	// the src and dst overlap, then reverse direction
-	if osrc < odst && int64(odst) < int64(osrc)+w {
-		// reverse direction
-		gins(x86.ASTD, nil, nil) // set direction flag
-		if c > 0 {
-			gconreg(x86.AADDL, w-1, x86.REG_SI)
-			gconreg(x86.AADDL, w-1, x86.REG_DI)
-
-			gconreg(x86.AMOVL, int64(c), x86.REG_CX)
-			gins(x86.AREP, nil, nil)   // repeat
-			gins(x86.AMOVSB, nil, nil) // MOVB *(SI)-,*(DI)-
-		}
-
-		if q > 0 {
-			if c > 0 {
-				gconreg(x86.AADDL, -3, x86.REG_SI)
-				gconreg(x86.AADDL, -3, x86.REG_DI)
-			} else {
-				gconreg(x86.AADDL, w-4, x86.REG_SI)
-				gconreg(x86.AADDL, w-4, x86.REG_DI)
-			}
-
-			gconreg(x86.AMOVL, int64(q), x86.REG_CX)
-			gins(x86.AREP, nil, nil)   // repeat
-			gins(x86.AMOVSL, nil, nil) // MOVL *(SI)-,*(DI)-
-		}
-
-		// we leave with the flag clear
-		gins(x86.ACLD, nil, nil)
-	} else {
-		gins(x86.ACLD, nil, nil) // paranoia.  TODO(rsc): remove?
-
-		// normal direction
-		if q > 128 || (q >= 4 && gc.Nacl) {
-			gconreg(x86.AMOVL, int64(q), x86.REG_CX)
-			gins(x86.AREP, nil, nil)   // repeat
-			gins(x86.AMOVSL, nil, nil) // MOVL *(SI)+,*(DI)+
-		} else if q >= 4 {
-			p := gins(obj.ADUFFCOPY, nil, nil)
-			p.To.Type = obj.TYPE_ADDR
-			p.To.Sym = gc.Linksym(gc.Pkglookup("duffcopy", gc.Runtimepkg))
-
-			// 10 and 128 = magic constants: see ../../runtime/asm_386.s
-			p.To.Offset = 10 * (128 - int64(q))
-		} else if !gc.Nacl && c == 0 {
-			var cx gc.Node
-			gc.Nodreg(&cx, gc.Types[gc.TINT32], x86.REG_CX)
-
-			// We don't need the MOVSL side-effect of updating SI and DI,
-			// and issuing a sequence of MOVLs directly is faster.
-			src.Op = gc.OINDREG
-
-			dst.Op = gc.OINDREG
-			for q > 0 {
-				gmove(&src, &cx) // MOVL x+(SI),CX
-				gmove(&cx, &dst) // MOVL CX,x+(DI)
-				src.Xoffset += 4
-				dst.Xoffset += 4
-				q--
-			}
-		} else {
-			for q > 0 {
-				gins(x86.AMOVSL, nil, nil) // MOVL *(SI)+,*(DI)+
-				q--
-			}
-		}
-
-		for c > 0 {
-			gins(x86.AMOVSB, nil, nil) // MOVB *(SI)+,*(DI)+
-			c--
-		}
-	}
-}
diff --git a/src/cmd/compile/internal/x86/cgen64.go b/src/cmd/compile/internal/x86/cgen64.go
deleted file mode 100644
index 0b061ff..0000000
--- a/src/cmd/compile/internal/x86/cgen64.go
+++ /dev/null
@@ -1,598 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package x86
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/x86"
-)
-
-/*
- * attempt to generate 64-bit
- *	res = n
- * return 1 on success, 0 if op not handled.
- */
-func cgen64(n *gc.Node, res *gc.Node) {
-	if res.Op != gc.OINDREG && res.Op != gc.ONAME {
-		gc.Dump("n", n)
-		gc.Dump("res", res)
-		gc.Fatal("cgen64 %v of %v", gc.Oconv(int(n.Op), 0), gc.Oconv(int(res.Op), 0))
-	}
-
-	switch n.Op {
-	default:
-		gc.Fatal("cgen64 %v", gc.Oconv(int(n.Op), 0))
-
-	case gc.OMINUS:
-		gc.Cgen(n.Left, res)
-		var hi1 gc.Node
-		var lo1 gc.Node
-		split64(res, &lo1, &hi1)
-		gins(x86.ANEGL, nil, &lo1)
-		gins(x86.AADCL, ncon(0), &hi1)
-		gins(x86.ANEGL, nil, &hi1)
-		splitclean()
-		return
-
-	case gc.OCOM:
-		gc.Cgen(n.Left, res)
-		var lo1 gc.Node
-		var hi1 gc.Node
-		split64(res, &lo1, &hi1)
-		gins(x86.ANOTL, nil, &lo1)
-		gins(x86.ANOTL, nil, &hi1)
-		splitclean()
-		return
-
-		// binary operators.
-	// common setup below.
-	case gc.OADD,
-		gc.OSUB,
-		gc.OMUL,
-		gc.OLROT,
-		gc.OLSH,
-		gc.ORSH,
-		gc.OAND,
-		gc.OOR,
-		gc.OXOR:
-		break
-	}
-
-	l := n.Left
-	r := n.Right
-	if !l.Addable {
-		var t1 gc.Node
-		gc.Tempname(&t1, l.Type)
-		gc.Cgen(l, &t1)
-		l = &t1
-	}
-
-	if r != nil && !r.Addable {
-		var t2 gc.Node
-		gc.Tempname(&t2, r.Type)
-		gc.Cgen(r, &t2)
-		r = &t2
-	}
-
-	var ax gc.Node
-	gc.Nodreg(&ax, gc.Types[gc.TINT32], x86.REG_AX)
-	var cx gc.Node
-	gc.Nodreg(&cx, gc.Types[gc.TINT32], x86.REG_CX)
-	var dx gc.Node
-	gc.Nodreg(&dx, gc.Types[gc.TINT32], x86.REG_DX)
-
-	// Setup for binary operation.
-	var hi1 gc.Node
-	var lo1 gc.Node
-	split64(l, &lo1, &hi1)
-
-	var lo2 gc.Node
-	var hi2 gc.Node
-	if gc.Is64(r.Type) {
-		split64(r, &lo2, &hi2)
-	}
-
-	// Do op.  Leave result in DX:AX.
-	switch n.Op {
-	// TODO: Constants
-	case gc.OADD:
-		gins(x86.AMOVL, &lo1, &ax)
-
-		gins(x86.AMOVL, &hi1, &dx)
-		gins(x86.AADDL, &lo2, &ax)
-		gins(x86.AADCL, &hi2, &dx)
-
-		// TODO: Constants.
-	case gc.OSUB:
-		gins(x86.AMOVL, &lo1, &ax)
-
-		gins(x86.AMOVL, &hi1, &dx)
-		gins(x86.ASUBL, &lo2, &ax)
-		gins(x86.ASBBL, &hi2, &dx)
-
-		// let's call the next two EX and FX.
-	case gc.OMUL:
-		var ex gc.Node
-		gc.Regalloc(&ex, gc.Types[gc.TPTR32], nil)
-
-		var fx gc.Node
-		gc.Regalloc(&fx, gc.Types[gc.TPTR32], nil)
-
-		// load args into DX:AX and EX:CX.
-		gins(x86.AMOVL, &lo1, &ax)
-
-		gins(x86.AMOVL, &hi1, &dx)
-		gins(x86.AMOVL, &lo2, &cx)
-		gins(x86.AMOVL, &hi2, &ex)
-
-		// if DX and EX are zero, use 32 x 32 -> 64 unsigned multiply.
-		gins(x86.AMOVL, &dx, &fx)
-
-		gins(x86.AORL, &ex, &fx)
-		p1 := gc.Gbranch(x86.AJNE, nil, 0)
-		gins(x86.AMULL, &cx, nil) // implicit &ax
-		p2 := gc.Gbranch(obj.AJMP, nil, 0)
-		gc.Patch(p1, gc.Pc)
-
-		// full 64x64 -> 64, from 32x32 -> 64.
-		gins(x86.AIMULL, &cx, &dx)
-
-		gins(x86.AMOVL, &ax, &fx)
-		gins(x86.AIMULL, &ex, &fx)
-		gins(x86.AADDL, &dx, &fx)
-		gins(x86.AMOVL, &cx, &dx)
-		gins(x86.AMULL, &dx, nil) // implicit &ax
-		gins(x86.AADDL, &fx, &dx)
-		gc.Patch(p2, gc.Pc)
-
-		gc.Regfree(&ex)
-		gc.Regfree(&fx)
-
-		// We only rotate by a constant c in [0,64).
-	// if c >= 32:
-	//	lo, hi = hi, lo
-	//	c -= 32
-	// if c == 0:
-	//	no-op
-	// else:
-	//	t = hi
-	//	shld hi:lo, c
-	//	shld lo:t, c
-	case gc.OLROT:
-		v := uint64(r.Int())
-
-		if v >= 32 {
-			// reverse during load to do the first 32 bits of rotate
-			v -= 32
-
-			gins(x86.AMOVL, &lo1, &dx)
-			gins(x86.AMOVL, &hi1, &ax)
-		} else {
-			gins(x86.AMOVL, &lo1, &ax)
-			gins(x86.AMOVL, &hi1, &dx)
-		}
-
-		if v == 0 {
-		} else // done
-		{
-			gins(x86.AMOVL, &dx, &cx)
-			p1 := gins(x86.ASHLL, ncon(uint32(v)), &dx)
-			p1.From.Index = x86.REG_AX // double-width shift
-			p1.From.Scale = 0
-			p1 = gins(x86.ASHLL, ncon(uint32(v)), &ax)
-			p1.From.Index = x86.REG_CX // double-width shift
-			p1.From.Scale = 0
-		}
-
-	case gc.OLSH:
-		if r.Op == gc.OLITERAL {
-			v := uint64(r.Int())
-			if v >= 64 {
-				if gc.Is64(r.Type) {
-					splitclean()
-				}
-				splitclean()
-				split64(res, &lo2, &hi2)
-				gins(x86.AMOVL, ncon(0), &lo2)
-				gins(x86.AMOVL, ncon(0), &hi2)
-				splitclean()
-				return
-			}
-
-			if v >= 32 {
-				if gc.Is64(r.Type) {
-					splitclean()
-				}
-				split64(res, &lo2, &hi2)
-				gmove(&lo1, &hi2)
-				if v > 32 {
-					gins(x86.ASHLL, ncon(uint32(v-32)), &hi2)
-				}
-
-				gins(x86.AMOVL, ncon(0), &lo2)
-				splitclean()
-				splitclean()
-				return
-			}
-
-			// general shift
-			gins(x86.AMOVL, &lo1, &ax)
-
-			gins(x86.AMOVL, &hi1, &dx)
-			p1 := gins(x86.ASHLL, ncon(uint32(v)), &dx)
-			p1.From.Index = x86.REG_AX // double-width shift
-			p1.From.Scale = 0
-			gins(x86.ASHLL, ncon(uint32(v)), &ax)
-			break
-		}
-
-		// load value into DX:AX.
-		gins(x86.AMOVL, &lo1, &ax)
-
-		gins(x86.AMOVL, &hi1, &dx)
-
-		// load shift value into register.
-		// if high bits are set, zero value.
-		var p1 *obj.Prog
-
-		if gc.Is64(r.Type) {
-			gins(x86.ACMPL, &hi2, ncon(0))
-			p1 = gc.Gbranch(x86.AJNE, nil, +1)
-			gins(x86.AMOVL, &lo2, &cx)
-		} else {
-			cx.Type = gc.Types[gc.TUINT32]
-			gmove(r, &cx)
-		}
-
-		// if shift count is >=64, zero value
-		gins(x86.ACMPL, &cx, ncon(64))
-
-		p2 := gc.Gbranch(optoas(gc.OLT, gc.Types[gc.TUINT32]), nil, +1)
-		if p1 != nil {
-			gc.Patch(p1, gc.Pc)
-		}
-		gins(x86.AXORL, &dx, &dx)
-		gins(x86.AXORL, &ax, &ax)
-		gc.Patch(p2, gc.Pc)
-
-		// if shift count is >= 32, zero low.
-		gins(x86.ACMPL, &cx, ncon(32))
-
-		p1 = gc.Gbranch(optoas(gc.OLT, gc.Types[gc.TUINT32]), nil, +1)
-		gins(x86.AMOVL, &ax, &dx)
-		gins(x86.ASHLL, &cx, &dx) // SHLL only uses bottom 5 bits of count
-		gins(x86.AXORL, &ax, &ax)
-		p2 = gc.Gbranch(obj.AJMP, nil, 0)
-		gc.Patch(p1, gc.Pc)
-
-		// general shift
-		p1 = gins(x86.ASHLL, &cx, &dx)
-
-		p1.From.Index = x86.REG_AX // double-width shift
-		p1.From.Scale = 0
-		gins(x86.ASHLL, &cx, &ax)
-		gc.Patch(p2, gc.Pc)
-
-	case gc.ORSH:
-		if r.Op == gc.OLITERAL {
-			v := uint64(r.Int())
-			if v >= 64 {
-				if gc.Is64(r.Type) {
-					splitclean()
-				}
-				splitclean()
-				split64(res, &lo2, &hi2)
-				if hi1.Type.Etype == gc.TINT32 {
-					gmove(&hi1, &lo2)
-					gins(x86.ASARL, ncon(31), &lo2)
-					gmove(&hi1, &hi2)
-					gins(x86.ASARL, ncon(31), &hi2)
-				} else {
-					gins(x86.AMOVL, ncon(0), &lo2)
-					gins(x86.AMOVL, ncon(0), &hi2)
-				}
-
-				splitclean()
-				return
-			}
-
-			if v >= 32 {
-				if gc.Is64(r.Type) {
-					splitclean()
-				}
-				split64(res, &lo2, &hi2)
-				gmove(&hi1, &lo2)
-				if v > 32 {
-					gins(optoas(gc.ORSH, hi1.Type), ncon(uint32(v-32)), &lo2)
-				}
-				if hi1.Type.Etype == gc.TINT32 {
-					gmove(&hi1, &hi2)
-					gins(x86.ASARL, ncon(31), &hi2)
-				} else {
-					gins(x86.AMOVL, ncon(0), &hi2)
-				}
-				splitclean()
-				splitclean()
-				return
-			}
-
-			// general shift
-			gins(x86.AMOVL, &lo1, &ax)
-
-			gins(x86.AMOVL, &hi1, &dx)
-			p1 := gins(x86.ASHRL, ncon(uint32(v)), &ax)
-			p1.From.Index = x86.REG_DX // double-width shift
-			p1.From.Scale = 0
-			gins(optoas(gc.ORSH, hi1.Type), ncon(uint32(v)), &dx)
-			break
-		}
-
-		// load value into DX:AX.
-		gins(x86.AMOVL, &lo1, &ax)
-
-		gins(x86.AMOVL, &hi1, &dx)
-
-		// load shift value into register.
-		// if high bits are set, zero value.
-		var p1 *obj.Prog
-
-		if gc.Is64(r.Type) {
-			gins(x86.ACMPL, &hi2, ncon(0))
-			p1 = gc.Gbranch(x86.AJNE, nil, +1)
-			gins(x86.AMOVL, &lo2, &cx)
-		} else {
-			cx.Type = gc.Types[gc.TUINT32]
-			gmove(r, &cx)
-		}
-
-		// if shift count is >=64, zero or sign-extend value
-		gins(x86.ACMPL, &cx, ncon(64))
-
-		p2 := gc.Gbranch(optoas(gc.OLT, gc.Types[gc.TUINT32]), nil, +1)
-		if p1 != nil {
-			gc.Patch(p1, gc.Pc)
-		}
-		if hi1.Type.Etype == gc.TINT32 {
-			gins(x86.ASARL, ncon(31), &dx)
-			gins(x86.AMOVL, &dx, &ax)
-		} else {
-			gins(x86.AXORL, &dx, &dx)
-			gins(x86.AXORL, &ax, &ax)
-		}
-
-		gc.Patch(p2, gc.Pc)
-
-		// if shift count is >= 32, sign-extend hi.
-		gins(x86.ACMPL, &cx, ncon(32))
-
-		p1 = gc.Gbranch(optoas(gc.OLT, gc.Types[gc.TUINT32]), nil, +1)
-		gins(x86.AMOVL, &dx, &ax)
-		if hi1.Type.Etype == gc.TINT32 {
-			gins(x86.ASARL, &cx, &ax) // SARL only uses bottom 5 bits of count
-			gins(x86.ASARL, ncon(31), &dx)
-		} else {
-			gins(x86.ASHRL, &cx, &ax)
-			gins(x86.AXORL, &dx, &dx)
-		}
-
-		p2 = gc.Gbranch(obj.AJMP, nil, 0)
-		gc.Patch(p1, gc.Pc)
-
-		// general shift
-		p1 = gins(x86.ASHRL, &cx, &ax)
-
-		p1.From.Index = x86.REG_DX // double-width shift
-		p1.From.Scale = 0
-		gins(optoas(gc.ORSH, hi1.Type), &cx, &dx)
-		gc.Patch(p2, gc.Pc)
-
-		// make constant the right side (it usually is anyway).
-	case gc.OXOR,
-		gc.OAND,
-		gc.OOR:
-		if lo1.Op == gc.OLITERAL {
-			nswap(&lo1, &lo2)
-			nswap(&hi1, &hi2)
-		}
-
-		if lo2.Op == gc.OLITERAL {
-			// special cases for constants.
-			lv := uint32(lo2.Int())
-			hv := uint32(hi2.Int())
-			splitclean() // right side
-			split64(res, &lo2, &hi2)
-			switch n.Op {
-			case gc.OXOR:
-				gmove(&lo1, &lo2)
-				gmove(&hi1, &hi2)
-				switch lv {
-				case 0:
-					break
-
-				case 0xffffffff:
-					gins(x86.ANOTL, nil, &lo2)
-
-				default:
-					gins(x86.AXORL, ncon(lv), &lo2)
-				}
-
-				switch hv {
-				case 0:
-					break
-
-				case 0xffffffff:
-					gins(x86.ANOTL, nil, &hi2)
-
-				default:
-					gins(x86.AXORL, ncon(hv), &hi2)
-				}
-
-			case gc.OAND:
-				switch lv {
-				case 0:
-					gins(x86.AMOVL, ncon(0), &lo2)
-
-				default:
-					gmove(&lo1, &lo2)
-					if lv != 0xffffffff {
-						gins(x86.AANDL, ncon(lv), &lo2)
-					}
-				}
-
-				switch hv {
-				case 0:
-					gins(x86.AMOVL, ncon(0), &hi2)
-
-				default:
-					gmove(&hi1, &hi2)
-					if hv != 0xffffffff {
-						gins(x86.AANDL, ncon(hv), &hi2)
-					}
-				}
-
-			case gc.OOR:
-				switch lv {
-				case 0:
-					gmove(&lo1, &lo2)
-
-				case 0xffffffff:
-					gins(x86.AMOVL, ncon(0xffffffff), &lo2)
-
-				default:
-					gmove(&lo1, &lo2)
-					gins(x86.AORL, ncon(lv), &lo2)
-				}
-
-				switch hv {
-				case 0:
-					gmove(&hi1, &hi2)
-
-				case 0xffffffff:
-					gins(x86.AMOVL, ncon(0xffffffff), &hi2)
-
-				default:
-					gmove(&hi1, &hi2)
-					gins(x86.AORL, ncon(hv), &hi2)
-				}
-			}
-
-			splitclean()
-			splitclean()
-			return
-		}
-
-		gins(x86.AMOVL, &lo1, &ax)
-		gins(x86.AMOVL, &hi1, &dx)
-		gins(optoas(int(n.Op), lo1.Type), &lo2, &ax)
-		gins(optoas(int(n.Op), lo1.Type), &hi2, &dx)
-	}
-
-	if gc.Is64(r.Type) {
-		splitclean()
-	}
-	splitclean()
-
-	split64(res, &lo1, &hi1)
-	gins(x86.AMOVL, &ax, &lo1)
-	gins(x86.AMOVL, &dx, &hi1)
-	splitclean()
-}
-
-/*
- * generate comparison of nl, nr, both 64-bit.
- * nl is memory; nr is constant or memory.
- */
-func cmp64(nl *gc.Node, nr *gc.Node, op int, likely int, to *obj.Prog) {
-	var lo1 gc.Node
-	var hi1 gc.Node
-	var lo2 gc.Node
-	var hi2 gc.Node
-	var rr gc.Node
-
-	split64(nl, &lo1, &hi1)
-	split64(nr, &lo2, &hi2)
-
-	// compare most significant word;
-	// if they differ, we're done.
-	t := hi1.Type
-
-	if nl.Op == gc.OLITERAL || nr.Op == gc.OLITERAL {
-		gins(x86.ACMPL, &hi1, &hi2)
-	} else {
-		gc.Regalloc(&rr, gc.Types[gc.TINT32], nil)
-		gins(x86.AMOVL, &hi1, &rr)
-		gins(x86.ACMPL, &rr, &hi2)
-		gc.Regfree(&rr)
-	}
-
-	var br *obj.Prog
-	switch op {
-	default:
-		gc.Fatal("cmp64 %v %v", gc.Oconv(int(op), 0), t)
-
-		// cmp hi
-	// jne L
-	// cmp lo
-	// jeq to
-	// L:
-	case gc.OEQ:
-		br = gc.Gbranch(x86.AJNE, nil, -likely)
-
-		// cmp hi
-	// jne to
-	// cmp lo
-	// jne to
-	case gc.ONE:
-		gc.Patch(gc.Gbranch(x86.AJNE, nil, likely), to)
-
-		// cmp hi
-	// jgt to
-	// jlt L
-	// cmp lo
-	// jge to (or jgt to)
-	// L:
-	case gc.OGE,
-		gc.OGT:
-		gc.Patch(gc.Gbranch(optoas(gc.OGT, t), nil, likely), to)
-
-		br = gc.Gbranch(optoas(gc.OLT, t), nil, -likely)
-
-		// cmp hi
-	// jlt to
-	// jgt L
-	// cmp lo
-	// jle to (or jlt to)
-	// L:
-	case gc.OLE,
-		gc.OLT:
-		gc.Patch(gc.Gbranch(optoas(gc.OLT, t), nil, likely), to)
-
-		br = gc.Gbranch(optoas(gc.OGT, t), nil, -likely)
-	}
-
-	// compare least significant word
-	t = lo1.Type
-
-	if nl.Op == gc.OLITERAL || nr.Op == gc.OLITERAL {
-		gins(x86.ACMPL, &lo1, &lo2)
-	} else {
-		gc.Regalloc(&rr, gc.Types[gc.TINT32], nil)
-		gins(x86.AMOVL, &lo1, &rr)
-		gins(x86.ACMPL, &rr, &lo2)
-		gc.Regfree(&rr)
-	}
-
-	// jump again
-	gc.Patch(gc.Gbranch(optoas(op, t), nil, likely), to)
-
-	// point first branch down here if appropriate
-	if br != nil {
-		gc.Patch(br, gc.Pc)
-	}
-
-	splitclean()
-	splitclean()
-}
diff --git a/src/cmd/compile/internal/x86/galign.go b/src/cmd/compile/internal/x86/galign.go
deleted file mode 100644
index 2b602e1..0000000
--- a/src/cmd/compile/internal/x86/galign.go
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package x86
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/x86"
-	"fmt"
-	"os"
-)
-
-var thechar int = '8'
-
-var thestring string = "386"
-
-var thelinkarch *obj.LinkArch = &x86.Link386
-
-func linkarchinit() {
-}
-
-var MAXWIDTH int64 = (1 << 32) - 1
-
-/*
- * go declares several platform-specific type aliases:
- * int, uint, and uintptr
- */
-var typedefs = []gc.Typedef{
-	gc.Typedef{"int", gc.TINT, gc.TINT32},
-	gc.Typedef{"uint", gc.TUINT, gc.TUINT32},
-	gc.Typedef{"uintptr", gc.TUINTPTR, gc.TUINT32},
-}
-
-func betypeinit() {
-	gc.Widthptr = 4
-	gc.Widthint = 4
-	gc.Widthreg = 4
-}
-
-func Main() {
-	gc.Thearch.Thechar = thechar
-	gc.Thearch.Thestring = thestring
-	gc.Thearch.Thelinkarch = thelinkarch
-	gc.Thearch.Typedefs = typedefs
-	gc.Thearch.REGSP = x86.REGSP
-	gc.Thearch.REGCTXT = x86.REGCTXT
-	gc.Thearch.REGCALLX = x86.REG_BX
-	gc.Thearch.REGCALLX2 = x86.REG_AX
-	gc.Thearch.REGRETURN = x86.REG_AX
-	gc.Thearch.REGMIN = x86.REG_AX
-	gc.Thearch.REGMAX = x86.REG_DI
-	switch v := obj.Getgo386(); v {
-	case "387":
-		gc.Thearch.FREGMIN = x86.REG_F0
-		gc.Thearch.FREGMAX = x86.REG_F7
-		gc.Thearch.Use387 = true
-	case "sse2":
-		gc.Thearch.FREGMIN = x86.REG_X0
-		gc.Thearch.FREGMAX = x86.REG_X7
-	default:
-		fmt.Fprintf(os.Stderr, "unsupported setting GO386=%s\n", v)
-		gc.Exit(1)
-	}
-	gc.Thearch.MAXWIDTH = MAXWIDTH
-	gc.Thearch.ReservedRegs = resvd
-
-	gc.Thearch.Betypeinit = betypeinit
-	gc.Thearch.Bgen_float = bgen_float
-	gc.Thearch.Cgen64 = cgen64
-	gc.Thearch.Cgen_bmul = cgen_bmul
-	gc.Thearch.Cgen_float = cgen_float
-	gc.Thearch.Cgen_hmul = cgen_hmul
-	gc.Thearch.Cgen_shift = cgen_shift
-	gc.Thearch.Clearfat = clearfat
-	gc.Thearch.Cmp64 = cmp64
-	gc.Thearch.Defframe = defframe
-	gc.Thearch.Dodiv = cgen_div
-	gc.Thearch.Excise = excise
-	gc.Thearch.Expandchecks = expandchecks
-	gc.Thearch.Getg = getg
-	gc.Thearch.Gins = gins
-	gc.Thearch.Ginscmp = ginscmp
-	gc.Thearch.Ginscon = ginscon
-	gc.Thearch.Ginsnop = ginsnop
-	gc.Thearch.Gmove = gmove
-	gc.Thearch.Igenindex = igenindex
-	gc.Thearch.Linkarchinit = linkarchinit
-	gc.Thearch.Peep = peep
-	gc.Thearch.Proginfo = proginfo
-	gc.Thearch.Regtyp = regtyp
-	gc.Thearch.Sameaddr = sameaddr
-	gc.Thearch.Smallindir = smallindir
-	gc.Thearch.Stackaddr = stackaddr
-	gc.Thearch.Blockcopy = blockcopy
-	gc.Thearch.Sudoaddable = sudoaddable
-	gc.Thearch.Sudoclean = sudoclean
-	gc.Thearch.Excludedregs = excludedregs
-	gc.Thearch.RtoB = RtoB
-	gc.Thearch.FtoB = FtoB
-	gc.Thearch.BtoR = BtoR
-	gc.Thearch.BtoF = BtoF
-	gc.Thearch.Optoas = optoas
-	gc.Thearch.Doregbits = doregbits
-	gc.Thearch.Regnames = regnames
-
-	gc.Main()
-	gc.Exit(0)
-}
diff --git a/src/cmd/compile/internal/x86/ggen.go b/src/cmd/compile/internal/x86/ggen.go
deleted file mode 100644
index ae9881d..0000000
--- a/src/cmd/compile/internal/x86/ggen.go
+++ /dev/null
@@ -1,940 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package x86
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/x86"
-)
-
-func defframe(ptxt *obj.Prog) {
-	var n *gc.Node
-
-	// fill in argument size, stack size
-	ptxt.To.Type = obj.TYPE_TEXTSIZE
-
-	ptxt.To.Val = int32(gc.Rnd(gc.Curfn.Type.Argwid, int64(gc.Widthptr)))
-	frame := uint32(gc.Rnd(gc.Stksize+gc.Maxarg, int64(gc.Widthreg)))
-	ptxt.To.Offset = int64(frame)
-
-	// insert code to zero ambiguously live variables
-	// so that the garbage collector only sees initialized values
-	// when it looks for pointers.
-	p := ptxt
-
-	hi := int64(0)
-	lo := hi
-	ax := uint32(0)
-	for l := gc.Curfn.Func.Dcl; l != nil; l = l.Next {
-		n = l.N
-		if !n.Name.Needzero {
-			continue
-		}
-		if n.Class != gc.PAUTO {
-			gc.Fatal("needzero class %d", n.Class)
-		}
-		if n.Type.Width%int64(gc.Widthptr) != 0 || n.Xoffset%int64(gc.Widthptr) != 0 || n.Type.Width == 0 {
-			gc.Fatal("var %v has size %d offset %d", gc.Nconv(n, obj.FmtLong), int(n.Type.Width), int(n.Xoffset))
-		}
-		if lo != hi && n.Xoffset+n.Type.Width == lo-int64(2*gc.Widthptr) {
-			// merge with range we already have
-			lo = n.Xoffset
-
-			continue
-		}
-
-		// zero old range
-		p = zerorange(p, int64(frame), lo, hi, &ax)
-
-		// set new range
-		hi = n.Xoffset + n.Type.Width
-
-		lo = n.Xoffset
-	}
-
-	// zero final range
-	zerorange(p, int64(frame), lo, hi, &ax)
-}
-
-func zerorange(p *obj.Prog, frame int64, lo int64, hi int64, ax *uint32) *obj.Prog {
-	cnt := hi - lo
-	if cnt == 0 {
-		return p
-	}
-	if *ax == 0 {
-		p = appendpp(p, x86.AMOVL, obj.TYPE_CONST, 0, 0, obj.TYPE_REG, x86.REG_AX, 0)
-		*ax = 1
-	}
-
-	if cnt <= int64(4*gc.Widthreg) {
-		for i := int64(0); i < cnt; i += int64(gc.Widthreg) {
-			p = appendpp(p, x86.AMOVL, obj.TYPE_REG, x86.REG_AX, 0, obj.TYPE_MEM, x86.REG_SP, frame+lo+i)
-		}
-	} else if !gc.Nacl && cnt <= int64(128*gc.Widthreg) {
-		p = appendpp(p, x86.ALEAL, obj.TYPE_MEM, x86.REG_SP, frame+lo, obj.TYPE_REG, x86.REG_DI, 0)
-		p = appendpp(p, obj.ADUFFZERO, obj.TYPE_NONE, 0, 0, obj.TYPE_ADDR, 0, 1*(128-cnt/int64(gc.Widthreg)))
-		p.To.Sym = gc.Linksym(gc.Pkglookup("duffzero", gc.Runtimepkg))
-	} else {
-		p = appendpp(p, x86.AMOVL, obj.TYPE_CONST, 0, cnt/int64(gc.Widthreg), obj.TYPE_REG, x86.REG_CX, 0)
-		p = appendpp(p, x86.ALEAL, obj.TYPE_MEM, x86.REG_SP, frame+lo, obj.TYPE_REG, x86.REG_DI, 0)
-		p = appendpp(p, x86.AREP, obj.TYPE_NONE, 0, 0, obj.TYPE_NONE, 0, 0)
-		p = appendpp(p, x86.ASTOSL, obj.TYPE_NONE, 0, 0, obj.TYPE_NONE, 0, 0)
-	}
-
-	return p
-}
-
-func appendpp(p *obj.Prog, as int, ftype int, freg int, foffset int64, ttype int, treg int, toffset int64) *obj.Prog {
-	q := gc.Ctxt.NewProg()
-	gc.Clearp(q)
-	q.As = int16(as)
-	q.Lineno = p.Lineno
-	q.From.Type = int16(ftype)
-	q.From.Reg = int16(freg)
-	q.From.Offset = foffset
-	q.To.Type = int16(ttype)
-	q.To.Reg = int16(treg)
-	q.To.Offset = toffset
-	q.Link = p.Link
-	p.Link = q
-	return q
-}
-
-func clearfat(nl *gc.Node) {
-	/* clear a fat object */
-	if gc.Debug['g'] != 0 {
-		gc.Dump("\nclearfat", nl)
-	}
-
-	w := uint32(nl.Type.Width)
-
-	// Avoid taking the address for simple enough types.
-	if gc.Componentgen(nil, nl) {
-		return
-	}
-
-	c := w % 4 // bytes
-	q := w / 4 // quads
-
-	if q < 4 {
-		// Write sequence of MOV 0, off(base) instead of using STOSL.
-		// The hope is that although the code will be slightly longer,
-		// the MOVs will have no dependencies and pipeline better
-		// than the unrolled STOSL loop.
-		// NOTE: Must use agen, not igen, so that optimizer sees address
-		// being taken. We are not writing on field boundaries.
-		var n1 gc.Node
-		gc.Regalloc(&n1, gc.Types[gc.Tptr], nil)
-
-		gc.Agen(nl, &n1)
-		n1.Op = gc.OINDREG
-		var z gc.Node
-		gc.Nodconst(&z, gc.Types[gc.TUINT64], 0)
-		for {
-			tmp14 := q
-			q--
-			if tmp14 <= 0 {
-				break
-			}
-			n1.Type = z.Type
-			gins(x86.AMOVL, &z, &n1)
-			n1.Xoffset += 4
-		}
-
-		gc.Nodconst(&z, gc.Types[gc.TUINT8], 0)
-		for {
-			tmp15 := c
-			c--
-			if tmp15 <= 0 {
-				break
-			}
-			n1.Type = z.Type
-			gins(x86.AMOVB, &z, &n1)
-			n1.Xoffset++
-		}
-
-		gc.Regfree(&n1)
-		return
-	}
-
-	var n1 gc.Node
-	gc.Nodreg(&n1, gc.Types[gc.Tptr], x86.REG_DI)
-	gc.Agen(nl, &n1)
-	gconreg(x86.AMOVL, 0, x86.REG_AX)
-
-	if q > 128 || (q >= 4 && gc.Nacl) {
-		gconreg(x86.AMOVL, int64(q), x86.REG_CX)
-		gins(x86.AREP, nil, nil)   // repeat
-		gins(x86.ASTOSL, nil, nil) // STOL AL,*(DI)+
-	} else if q >= 4 {
-		p := gins(obj.ADUFFZERO, nil, nil)
-		p.To.Type = obj.TYPE_ADDR
-		p.To.Sym = gc.Linksym(gc.Pkglookup("duffzero", gc.Runtimepkg))
-
-		// 1 and 128 = magic constants: see ../../runtime/asm_386.s
-		p.To.Offset = 1 * (128 - int64(q))
-	} else {
-		for q > 0 {
-			gins(x86.ASTOSL, nil, nil) // STOL AL,*(DI)+
-			q--
-		}
-	}
-
-	for c > 0 {
-		gins(x86.ASTOSB, nil, nil) // STOB AL,*(DI)+
-		c--
-	}
-}
-
-var panicdiv *gc.Node
-
-/*
- * generate division.
- * caller must set:
- *	ax = allocated AX register
- *	dx = allocated DX register
- * generates one of:
- *	res = nl / nr
- *	res = nl % nr
- * according to op.
- */
-func dodiv(op int, nl *gc.Node, nr *gc.Node, res *gc.Node, ax *gc.Node, dx *gc.Node) {
-	// Have to be careful about handling
-	// most negative int divided by -1 correctly.
-	// The hardware will trap.
-	// Also the byte divide instruction needs AH,
-	// which we otherwise don't have to deal with.
-	// Easiest way to avoid for int8, int16: use int32.
-	// For int32 and int64, use explicit test.
-	// Could use int64 hw for int32.
-	t := nl.Type
-
-	t0 := t
-	check := 0
-	if gc.Issigned[t.Etype] {
-		check = 1
-		if gc.Isconst(nl, gc.CTINT) && nl.Int() != -1<<uint64(t.Width*8-1) {
-			check = 0
-		} else if gc.Isconst(nr, gc.CTINT) && nr.Int() != -1 {
-			check = 0
-		}
-	}
-
-	if t.Width < 4 {
-		if gc.Issigned[t.Etype] {
-			t = gc.Types[gc.TINT32]
-		} else {
-			t = gc.Types[gc.TUINT32]
-		}
-		check = 0
-	}
-
-	var t1 gc.Node
-	gc.Tempname(&t1, t)
-	var t2 gc.Node
-	gc.Tempname(&t2, t)
-	if t0 != t {
-		var t3 gc.Node
-		gc.Tempname(&t3, t0)
-		var t4 gc.Node
-		gc.Tempname(&t4, t0)
-		gc.Cgen(nl, &t3)
-		gc.Cgen(nr, &t4)
-
-		// Convert.
-		gmove(&t3, &t1)
-
-		gmove(&t4, &t2)
-	} else {
-		gc.Cgen(nl, &t1)
-		gc.Cgen(nr, &t2)
-	}
-
-	var n1 gc.Node
-	if !gc.Samereg(ax, res) && !gc.Samereg(dx, res) {
-		gc.Regalloc(&n1, t, res)
-	} else {
-		gc.Regalloc(&n1, t, nil)
-	}
-	gmove(&t2, &n1)
-	gmove(&t1, ax)
-	var p2 *obj.Prog
-	var n4 gc.Node
-	if gc.Nacl {
-		// Native Client does not relay the divide-by-zero trap
-		// to the executing program, so we must insert a check
-		// for ourselves.
-		gc.Nodconst(&n4, t, 0)
-
-		gins(optoas(gc.OCMP, t), &n1, &n4)
-		p1 := gc.Gbranch(optoas(gc.ONE, t), nil, +1)
-		if panicdiv == nil {
-			panicdiv = gc.Sysfunc("panicdivide")
-		}
-		gc.Ginscall(panicdiv, -1)
-		gc.Patch(p1, gc.Pc)
-	}
-
-	if check != 0 {
-		gc.Nodconst(&n4, t, -1)
-		gins(optoas(gc.OCMP, t), &n1, &n4)
-		p1 := gc.Gbranch(optoas(gc.ONE, t), nil, +1)
-		if op == gc.ODIV {
-			// a / (-1) is -a.
-			gins(optoas(gc.OMINUS, t), nil, ax)
-
-			gmove(ax, res)
-		} else {
-			// a % (-1) is 0.
-			gc.Nodconst(&n4, t, 0)
-
-			gmove(&n4, res)
-		}
-
-		p2 = gc.Gbranch(obj.AJMP, nil, 0)
-		gc.Patch(p1, gc.Pc)
-	}
-
-	if !gc.Issigned[t.Etype] {
-		var nz gc.Node
-		gc.Nodconst(&nz, t, 0)
-		gmove(&nz, dx)
-	} else {
-		gins(optoas(gc.OEXTEND, t), nil, nil)
-	}
-	gins(optoas(op, t), &n1, nil)
-	gc.Regfree(&n1)
-
-	if op == gc.ODIV {
-		gmove(ax, res)
-	} else {
-		gmove(dx, res)
-	}
-	if check != 0 {
-		gc.Patch(p2, gc.Pc)
-	}
-}
-
-func savex(dr int, x *gc.Node, oldx *gc.Node, res *gc.Node, t *gc.Type) {
-	r := gc.GetReg(dr)
-	gc.Nodreg(x, gc.Types[gc.TINT32], dr)
-
-	// save current ax and dx if they are live
-	// and not the destination
-	*oldx = gc.Node{}
-
-	if r > 0 && !gc.Samereg(x, res) {
-		gc.Tempname(oldx, gc.Types[gc.TINT32])
-		gmove(x, oldx)
-	}
-
-	gc.Regalloc(x, t, x)
-}
-
-func restx(x *gc.Node, oldx *gc.Node) {
-	gc.Regfree(x)
-
-	if oldx.Op != 0 {
-		x.Type = gc.Types[gc.TINT32]
-		gmove(oldx, x)
-	}
-}
-
-/*
- * generate division according to op, one of:
- *	res = nl / nr
- *	res = nl % nr
- */
-func cgen_div(op int, nl *gc.Node, nr *gc.Node, res *gc.Node) {
-	if gc.Is64(nl.Type) {
-		gc.Fatal("cgen_div %v", nl.Type)
-	}
-
-	var t *gc.Type
-	if gc.Issigned[nl.Type.Etype] {
-		t = gc.Types[gc.TINT32]
-	} else {
-		t = gc.Types[gc.TUINT32]
-	}
-	var ax gc.Node
-	var oldax gc.Node
-	savex(x86.REG_AX, &ax, &oldax, res, t)
-	var olddx gc.Node
-	var dx gc.Node
-	savex(x86.REG_DX, &dx, &olddx, res, t)
-	dodiv(op, nl, nr, res, &ax, &dx)
-	restx(&dx, &olddx)
-	restx(&ax, &oldax)
-}
-
-/*
- * generate shift according to op, one of:
- *	res = nl << nr
- *	res = nl >> nr
- */
-func cgen_shift(op int, bounded bool, nl *gc.Node, nr *gc.Node, res *gc.Node) {
-	if nl.Type.Width > 4 {
-		gc.Fatal("cgen_shift %v", nl.Type)
-	}
-
-	w := int(nl.Type.Width * 8)
-
-	a := optoas(op, nl.Type)
-
-	if nr.Op == gc.OLITERAL {
-		var n2 gc.Node
-		gc.Tempname(&n2, nl.Type)
-		gc.Cgen(nl, &n2)
-		var n1 gc.Node
-		gc.Regalloc(&n1, nl.Type, res)
-		gmove(&n2, &n1)
-		sc := uint64(nr.Int())
-		if sc >= uint64(nl.Type.Width*8) {
-			// large shift gets 2 shifts by width-1
-			gins(a, ncon(uint32(w)-1), &n1)
-
-			gins(a, ncon(uint32(w)-1), &n1)
-		} else {
-			gins(a, nr, &n1)
-		}
-		gmove(&n1, res)
-		gc.Regfree(&n1)
-		return
-	}
-
-	var oldcx gc.Node
-	var cx gc.Node
-	gc.Nodreg(&cx, gc.Types[gc.TUINT32], x86.REG_CX)
-	if gc.GetReg(x86.REG_CX) > 1 && !gc.Samereg(&cx, res) {
-		gc.Tempname(&oldcx, gc.Types[gc.TUINT32])
-		gmove(&cx, &oldcx)
-	}
-
-	var n1 gc.Node
-	var nt gc.Node
-	if nr.Type.Width > 4 {
-		gc.Tempname(&nt, nr.Type)
-		n1 = nt
-	} else {
-		gc.Nodreg(&n1, gc.Types[gc.TUINT32], x86.REG_CX)
-		gc.Regalloc(&n1, nr.Type, &n1) // to hold the shift type in CX
-	}
-
-	var n2 gc.Node
-	if gc.Samereg(&cx, res) {
-		gc.Regalloc(&n2, nl.Type, nil)
-	} else {
-		gc.Regalloc(&n2, nl.Type, res)
-	}
-	if nl.Ullman >= nr.Ullman {
-		gc.Cgen(nl, &n2)
-		gc.Cgen(nr, &n1)
-	} else {
-		gc.Cgen(nr, &n1)
-		gc.Cgen(nl, &n2)
-	}
-
-	// test and fix up large shifts
-	if bounded {
-		if nr.Type.Width > 4 {
-			// delayed reg alloc
-			gc.Nodreg(&n1, gc.Types[gc.TUINT32], x86.REG_CX)
-
-			gc.Regalloc(&n1, gc.Types[gc.TUINT32], &n1) // to hold the shift type in CX
-			var lo gc.Node
-			var hi gc.Node
-			split64(&nt, &lo, &hi)
-			gmove(&lo, &n1)
-			splitclean()
-		}
-	} else {
-		var p1 *obj.Prog
-		if nr.Type.Width > 4 {
-			// delayed reg alloc
-			gc.Nodreg(&n1, gc.Types[gc.TUINT32], x86.REG_CX)
-
-			gc.Regalloc(&n1, gc.Types[gc.TUINT32], &n1) // to hold the shift type in CX
-			var lo gc.Node
-			var hi gc.Node
-			split64(&nt, &lo, &hi)
-			gmove(&lo, &n1)
-			gins(optoas(gc.OCMP, gc.Types[gc.TUINT32]), &hi, ncon(0))
-			p2 := gc.Gbranch(optoas(gc.ONE, gc.Types[gc.TUINT32]), nil, +1)
-			gins(optoas(gc.OCMP, gc.Types[gc.TUINT32]), &n1, ncon(uint32(w)))
-			p1 = gc.Gbranch(optoas(gc.OLT, gc.Types[gc.TUINT32]), nil, +1)
-			splitclean()
-			gc.Patch(p2, gc.Pc)
-		} else {
-			gins(optoas(gc.OCMP, nr.Type), &n1, ncon(uint32(w)))
-			p1 = gc.Gbranch(optoas(gc.OLT, gc.Types[gc.TUINT32]), nil, +1)
-		}
-
-		if op == gc.ORSH && gc.Issigned[nl.Type.Etype] {
-			gins(a, ncon(uint32(w)-1), &n2)
-		} else {
-			gmove(ncon(0), &n2)
-		}
-
-		gc.Patch(p1, gc.Pc)
-	}
-
-	gins(a, &n1, &n2)
-
-	if oldcx.Op != 0 {
-		gmove(&oldcx, &cx)
-	}
-
-	gmove(&n2, res)
-
-	gc.Regfree(&n1)
-	gc.Regfree(&n2)
-}
-
-/*
- * generate byte multiply:
- *	res = nl * nr
- * there is no 2-operand byte multiply instruction so
- * we do a full-width multiplication and truncate afterwards.
- */
-func cgen_bmul(op int, nl *gc.Node, nr *gc.Node, res *gc.Node) bool {
-	if optoas(op, nl.Type) != x86.AIMULB {
-		return false
-	}
-
-	// copy from byte to full registers
-	t := gc.Types[gc.TUINT32]
-
-	if gc.Issigned[nl.Type.Etype] {
-		t = gc.Types[gc.TINT32]
-	}
-
-	// largest ullman on left.
-	if nl.Ullman < nr.Ullman {
-		tmp := nl
-		nl = nr
-		nr = tmp
-	}
-
-	var nt gc.Node
-	gc.Tempname(&nt, nl.Type)
-	gc.Cgen(nl, &nt)
-	var n1 gc.Node
-	gc.Regalloc(&n1, t, res)
-	gc.Cgen(nr, &n1)
-	var n2 gc.Node
-	gc.Regalloc(&n2, t, nil)
-	gmove(&nt, &n2)
-	a := optoas(op, t)
-	gins(a, &n2, &n1)
-	gc.Regfree(&n2)
-	gmove(&n1, res)
-	gc.Regfree(&n1)
-
-	return true
-}
-
-/*
- * generate high multiply:
- *   res = (nl*nr) >> width
- */
-func cgen_hmul(nl *gc.Node, nr *gc.Node, res *gc.Node) {
-	var n1 gc.Node
-	var n2 gc.Node
-	var ax gc.Node
-	var dx gc.Node
-
-	t := nl.Type
-	a := optoas(gc.OHMUL, t)
-
-	// gen nl in n1.
-	gc.Tempname(&n1, t)
-
-	gc.Cgen(nl, &n1)
-
-	// gen nr in n2.
-	gc.Regalloc(&n2, t, res)
-
-	gc.Cgen(nr, &n2)
-
-	// multiply.
-	gc.Nodreg(&ax, t, x86.REG_AX)
-
-	gmove(&n2, &ax)
-	gins(a, &n1, nil)
-	gc.Regfree(&n2)
-
-	if t.Width == 1 {
-		// byte multiply behaves differently.
-		gc.Nodreg(&ax, t, x86.REG_AH)
-
-		gc.Nodreg(&dx, t, x86.REG_DX)
-		gmove(&ax, &dx)
-	}
-
-	gc.Nodreg(&dx, t, x86.REG_DX)
-	gmove(&dx, res)
-}
-
-/*
- * generate floating-point operation.
- */
-func cgen_float(n *gc.Node, res *gc.Node) {
-	nl := n.Left
-	switch n.Op {
-	case gc.OEQ,
-		gc.ONE,
-		gc.OLT,
-		gc.OLE,
-		gc.OGE:
-		p1 := gc.Gbranch(obj.AJMP, nil, 0)
-		p2 := gc.Pc
-		gmove(gc.Nodbool(true), res)
-		p3 := gc.Gbranch(obj.AJMP, nil, 0)
-		gc.Patch(p1, gc.Pc)
-		gc.Bgen(n, true, 0, p2)
-		gmove(gc.Nodbool(false), res)
-		gc.Patch(p3, gc.Pc)
-		return
-
-	case gc.OPLUS:
-		gc.Cgen(nl, res)
-		return
-
-	case gc.OCONV:
-		if gc.Eqtype(n.Type, nl.Type) || gc.Noconv(n.Type, nl.Type) {
-			gc.Cgen(nl, res)
-			return
-		}
-
-		var n2 gc.Node
-		gc.Tempname(&n2, n.Type)
-		var n1 gc.Node
-		gc.Mgen(nl, &n1, res)
-		gmove(&n1, &n2)
-		gmove(&n2, res)
-		gc.Mfree(&n1)
-		return
-	}
-
-	if gc.Thearch.Use387 {
-		cgen_float387(n, res)
-	} else {
-		cgen_floatsse(n, res)
-	}
-}
-
-// floating-point.  387 (not SSE2)
-func cgen_float387(n *gc.Node, res *gc.Node) {
-	var f0 gc.Node
-	var f1 gc.Node
-
-	nl := n.Left
-	nr := n.Right
-	gc.Nodreg(&f0, nl.Type, x86.REG_F0)
-	gc.Nodreg(&f1, n.Type, x86.REG_F0+1)
-	if nr != nil {
-		// binary
-		if nl.Ullman >= nr.Ullman {
-			gc.Cgen(nl, &f0)
-			if nr.Addable {
-				gins(foptoas(int(n.Op), n.Type, 0), nr, &f0)
-			} else {
-				gc.Cgen(nr, &f0)
-				gins(foptoas(int(n.Op), n.Type, Fpop), &f0, &f1)
-			}
-		} else {
-			gc.Cgen(nr, &f0)
-			if nl.Addable {
-				gins(foptoas(int(n.Op), n.Type, Frev), nl, &f0)
-			} else {
-				gc.Cgen(nl, &f0)
-				gins(foptoas(int(n.Op), n.Type, Frev|Fpop), &f0, &f1)
-			}
-		}
-
-		gmove(&f0, res)
-		return
-	}
-
-	// unary
-	gc.Cgen(nl, &f0)
-
-	if n.Op != gc.OCONV && n.Op != gc.OPLUS {
-		gins(foptoas(int(n.Op), n.Type, 0), nil, nil)
-	}
-	gmove(&f0, res)
-	return
-}
-
-func cgen_floatsse(n *gc.Node, res *gc.Node) {
-	var a int
-
-	nl := n.Left
-	nr := n.Right
-	switch n.Op {
-	default:
-		gc.Dump("cgen_floatsse", n)
-		gc.Fatal("cgen_floatsse %v", gc.Oconv(int(n.Op), 0))
-		return
-
-	case gc.OMINUS,
-		gc.OCOM:
-		nr = gc.Nodintconst(-1)
-		gc.Convlit(&nr, n.Type)
-		a = foptoas(gc.OMUL, nl.Type, 0)
-		goto sbop
-
-		// symmetric binary
-	case gc.OADD,
-		gc.OMUL:
-		a = foptoas(int(n.Op), nl.Type, 0)
-
-		goto sbop
-
-		// asymmetric binary
-	case gc.OSUB,
-		gc.OMOD,
-		gc.ODIV:
-		a = foptoas(int(n.Op), nl.Type, 0)
-
-		goto abop
-	}
-
-sbop: // symmetric binary
-	if nl.Ullman < nr.Ullman || nl.Op == gc.OLITERAL {
-		r := nl
-		nl = nr
-		nr = r
-	}
-
-abop: // asymmetric binary
-	if nl.Ullman >= nr.Ullman {
-		var nt gc.Node
-		gc.Tempname(&nt, nl.Type)
-		gc.Cgen(nl, &nt)
-		var n2 gc.Node
-		gc.Mgen(nr, &n2, nil)
-		var n1 gc.Node
-		gc.Regalloc(&n1, nl.Type, res)
-		gmove(&nt, &n1)
-		gins(a, &n2, &n1)
-		gmove(&n1, res)
-		gc.Regfree(&n1)
-		gc.Mfree(&n2)
-	} else {
-		var n2 gc.Node
-		gc.Regalloc(&n2, nr.Type, res)
-		gc.Cgen(nr, &n2)
-		var n1 gc.Node
-		gc.Regalloc(&n1, nl.Type, nil)
-		gc.Cgen(nl, &n1)
-		gins(a, &n2, &n1)
-		gc.Regfree(&n2)
-		gmove(&n1, res)
-		gc.Regfree(&n1)
-	}
-
-	return
-}
-
-func bgen_float(n *gc.Node, wantTrue bool, likely int, to *obj.Prog) {
-	nl := n.Left
-	nr := n.Right
-	a := int(n.Op)
-	if !wantTrue {
-		// brcom is not valid on floats when NaN is involved.
-		p1 := gc.Gbranch(obj.AJMP, nil, 0)
-		p2 := gc.Gbranch(obj.AJMP, nil, 0)
-		gc.Patch(p1, gc.Pc)
-
-		// No need to avoid re-genning ninit.
-		bgen_float(n, true, -likely, p2)
-
-		gc.Patch(gc.Gbranch(obj.AJMP, nil, 0), to)
-		gc.Patch(p2, gc.Pc)
-		return
-	}
-
-	if gc.Thearch.Use387 {
-		a = gc.Brrev(a) // because the args are stacked
-		if a == gc.OGE || a == gc.OGT {
-			// only < and <= work right with NaN; reverse if needed
-			nl, nr = nr, nl
-			a = gc.Brrev(a)
-		}
-
-		var ax, n2, tmp gc.Node
-		gc.Nodreg(&tmp, nr.Type, x86.REG_F0)
-		gc.Nodreg(&n2, nr.Type, x86.REG_F0+1)
-		gc.Nodreg(&ax, gc.Types[gc.TUINT16], x86.REG_AX)
-		if gc.Simsimtype(nr.Type) == gc.TFLOAT64 {
-			if nl.Ullman > nr.Ullman {
-				gc.Cgen(nl, &tmp)
-				gc.Cgen(nr, &tmp)
-				gins(x86.AFXCHD, &tmp, &n2)
-			} else {
-				gc.Cgen(nr, &tmp)
-				gc.Cgen(nl, &tmp)
-			}
-
-			gins(x86.AFUCOMIP, &tmp, &n2)
-			gins(x86.AFMOVDP, &tmp, &tmp) // annoying pop but still better than STSW+SAHF
-		} else {
-			// TODO(rsc): The moves back and forth to memory
-			// here are for truncating the value to 32 bits.
-			// This handles 32-bit comparison but presumably
-			// all the other ops have the same problem.
-			// We need to figure out what the right general
-			// solution is, besides telling people to use float64.
-			var t1 gc.Node
-			gc.Tempname(&t1, gc.Types[gc.TFLOAT32])
-
-			var t2 gc.Node
-			gc.Tempname(&t2, gc.Types[gc.TFLOAT32])
-			gc.Cgen(nr, &t1)
-			gc.Cgen(nl, &t2)
-			gmove(&t2, &tmp)
-			gins(x86.AFCOMFP, &t1, &tmp)
-			gins(x86.AFSTSW, nil, &ax)
-			gins(x86.ASAHF, nil, nil)
-		}
-	} else {
-		// Not 387
-		if !nl.Addable {
-			nl = gc.CgenTemp(nl)
-		}
-		if !nr.Addable {
-			nr = gc.CgenTemp(nr)
-		}
-
-		var n2 gc.Node
-		gc.Regalloc(&n2, nr.Type, nil)
-		gmove(nr, &n2)
-		nr = &n2
-
-		if nl.Op != gc.OREGISTER {
-			var n3 gc.Node
-			gc.Regalloc(&n3, nl.Type, nil)
-			gmove(nl, &n3)
-			nl = &n3
-		}
-
-		if a == gc.OGE || a == gc.OGT {
-			// only < and <= work right with NaN; reverse if needed
-			nl, nr = nr, nl
-			a = gc.Brrev(a)
-		}
-
-		gins(foptoas(gc.OCMP, nr.Type, 0), nl, nr)
-		if nl.Op == gc.OREGISTER {
-			gc.Regfree(nl)
-		}
-		gc.Regfree(nr)
-	}
-
-	switch a {
-	case gc.OEQ:
-		// neither NE nor P
-		p1 := gc.Gbranch(x86.AJNE, nil, -likely)
-		p2 := gc.Gbranch(x86.AJPS, nil, -likely)
-		gc.Patch(gc.Gbranch(obj.AJMP, nil, 0), to)
-		gc.Patch(p1, gc.Pc)
-		gc.Patch(p2, gc.Pc)
-	case gc.ONE:
-		// either NE or P
-		gc.Patch(gc.Gbranch(x86.AJNE, nil, likely), to)
-		gc.Patch(gc.Gbranch(x86.AJPS, nil, likely), to)
-	default:
-		gc.Patch(gc.Gbranch(optoas(a, nr.Type), nil, likely), to)
-	}
-}
-
-// Called after regopt and peep have run.
-// Expand CHECKNIL pseudo-op into actual nil pointer check.
-func expandchecks(firstp *obj.Prog) {
-	var p1 *obj.Prog
-	var p2 *obj.Prog
-
-	for p := firstp; p != nil; p = p.Link {
-		if p.As != obj.ACHECKNIL {
-			continue
-		}
-		if gc.Debug_checknil != 0 && p.Lineno > 1 { // p->lineno==1 in generated wrappers
-			gc.Warnl(int(p.Lineno), "generated nil check")
-		}
-
-		// check is
-		//	CMP arg, $0
-		//	JNE 2(PC) (likely)
-		//	MOV AX, 0
-		p1 = gc.Ctxt.NewProg()
-
-		p2 = gc.Ctxt.NewProg()
-		gc.Clearp(p1)
-		gc.Clearp(p2)
-		p1.Link = p2
-		p2.Link = p.Link
-		p.Link = p1
-		p1.Lineno = p.Lineno
-		p2.Lineno = p.Lineno
-		p1.Pc = 9999
-		p2.Pc = 9999
-		p.As = x86.ACMPL
-		p.To.Type = obj.TYPE_CONST
-		p.To.Offset = 0
-		p1.As = x86.AJNE
-		p1.From.Type = obj.TYPE_CONST
-		p1.From.Offset = 1 // likely
-		p1.To.Type = obj.TYPE_BRANCH
-		p1.To.Val = p2.Link
-
-		// crash by write to memory address 0.
-		// if possible, since we know arg is 0, use 0(arg),
-		// which will be shorter to encode than plain 0.
-		p2.As = x86.AMOVL
-
-		p2.From.Type = obj.TYPE_REG
-		p2.From.Reg = x86.REG_AX
-		if regtyp(&p.From) {
-			p2.To.Type = obj.TYPE_MEM
-			p2.To.Reg = p.From.Reg
-		} else {
-			p2.To.Type = obj.TYPE_MEM
-		}
-		p2.To.Offset = 0
-	}
-}
-
-// addr += index*width if possible.
-func addindex(index *gc.Node, width int64, addr *gc.Node) bool {
-	switch width {
-	case 1, 2, 4, 8:
-		p1 := gins(x86.ALEAL, index, addr)
-		p1.From.Type = obj.TYPE_MEM
-		p1.From.Scale = int16(width)
-		p1.From.Index = p1.From.Reg
-		p1.From.Reg = p1.To.Reg
-		return true
-	}
-	return false
-}
-
-// res = runtime.getg()
-func getg(res *gc.Node) {
-	var n1 gc.Node
-	gc.Regalloc(&n1, res.Type, res)
-	mov := optoas(gc.OAS, gc.Types[gc.Tptr])
-	p := gins(mov, nil, &n1)
-	p.From.Type = obj.TYPE_REG
-	p.From.Reg = x86.REG_TLS
-	p = gins(mov, nil, &n1)
-	p.From = p.To
-	p.From.Type = obj.TYPE_MEM
-	p.From.Index = x86.REG_TLS
-	p.From.Scale = 1
-	gmove(&n1, res)
-	gc.Regfree(&n1)
-}
diff --git a/src/cmd/compile/internal/x86/gsubr.go b/src/cmd/compile/internal/x86/gsubr.go
deleted file mode 100644
index 7593d04..0000000
--- a/src/cmd/compile/internal/x86/gsubr.go
+++ /dev/null
@@ -1,1801 +0,0 @@
-// Derived from Inferno utils/8c/txt.c
-// http://code.google.com/p/inferno-os/source/browse/utils/8c/txt.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package x86
-
-import (
-	"cmd/compile/internal/big"
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/x86"
-	"fmt"
-)
-
-// TODO(rsc): Can make this bigger if we move
-// the text segment up higher in 8l for all GOOS.
-// At the same time, can raise StackBig in ../../runtime/stack.h.
-var unmappedzero uint32 = 4096
-
-// foptoas flags
-const (
-	Frev  = 1 << 0
-	Fpop  = 1 << 1
-	Fpop2 = 1 << 2
-)
-
-/*
- * return Axxx for Oxxx on type t.
- */
-func optoas(op int, t *gc.Type) int {
-	if t == nil {
-		gc.Fatal("optoas: t is nil")
-	}
-
-	a := obj.AXXX
-	switch uint32(op)<<16 | uint32(gc.Simtype[t.Etype]) {
-	default:
-		gc.Fatal("optoas: no entry %v-%v", gc.Oconv(int(op), 0), t)
-
-	case gc.OADDR<<16 | gc.TPTR32:
-		a = x86.ALEAL
-
-	case gc.OEQ<<16 | gc.TBOOL,
-		gc.OEQ<<16 | gc.TINT8,
-		gc.OEQ<<16 | gc.TUINT8,
-		gc.OEQ<<16 | gc.TINT16,
-		gc.OEQ<<16 | gc.TUINT16,
-		gc.OEQ<<16 | gc.TINT32,
-		gc.OEQ<<16 | gc.TUINT32,
-		gc.OEQ<<16 | gc.TINT64,
-		gc.OEQ<<16 | gc.TUINT64,
-		gc.OEQ<<16 | gc.TPTR32,
-		gc.OEQ<<16 | gc.TPTR64,
-		gc.OEQ<<16 | gc.TFLOAT32,
-		gc.OEQ<<16 | gc.TFLOAT64:
-		a = x86.AJEQ
-
-	case gc.ONE<<16 | gc.TBOOL,
-		gc.ONE<<16 | gc.TINT8,
-		gc.ONE<<16 | gc.TUINT8,
-		gc.ONE<<16 | gc.TINT16,
-		gc.ONE<<16 | gc.TUINT16,
-		gc.ONE<<16 | gc.TINT32,
-		gc.ONE<<16 | gc.TUINT32,
-		gc.ONE<<16 | gc.TINT64,
-		gc.ONE<<16 | gc.TUINT64,
-		gc.ONE<<16 | gc.TPTR32,
-		gc.ONE<<16 | gc.TPTR64,
-		gc.ONE<<16 | gc.TFLOAT32,
-		gc.ONE<<16 | gc.TFLOAT64:
-		a = x86.AJNE
-
-	case gc.OLT<<16 | gc.TINT8,
-		gc.OLT<<16 | gc.TINT16,
-		gc.OLT<<16 | gc.TINT32,
-		gc.OLT<<16 | gc.TINT64:
-		a = x86.AJLT
-
-	case gc.OLT<<16 | gc.TUINT8,
-		gc.OLT<<16 | gc.TUINT16,
-		gc.OLT<<16 | gc.TUINT32,
-		gc.OLT<<16 | gc.TUINT64:
-		a = x86.AJCS
-
-	case gc.OLE<<16 | gc.TINT8,
-		gc.OLE<<16 | gc.TINT16,
-		gc.OLE<<16 | gc.TINT32,
-		gc.OLE<<16 | gc.TINT64:
-		a = x86.AJLE
-
-	case gc.OLE<<16 | gc.TUINT8,
-		gc.OLE<<16 | gc.TUINT16,
-		gc.OLE<<16 | gc.TUINT32,
-		gc.OLE<<16 | gc.TUINT64:
-		a = x86.AJLS
-
-	case gc.OGT<<16 | gc.TINT8,
-		gc.OGT<<16 | gc.TINT16,
-		gc.OGT<<16 | gc.TINT32,
-		gc.OGT<<16 | gc.TINT64:
-		a = x86.AJGT
-
-	case gc.OGT<<16 | gc.TUINT8,
-		gc.OGT<<16 | gc.TUINT16,
-		gc.OGT<<16 | gc.TUINT32,
-		gc.OGT<<16 | gc.TUINT64,
-		gc.OLT<<16 | gc.TFLOAT32,
-		gc.OLT<<16 | gc.TFLOAT64:
-		a = x86.AJHI
-
-	case gc.OGE<<16 | gc.TINT8,
-		gc.OGE<<16 | gc.TINT16,
-		gc.OGE<<16 | gc.TINT32,
-		gc.OGE<<16 | gc.TINT64:
-		a = x86.AJGE
-
-	case gc.OGE<<16 | gc.TUINT8,
-		gc.OGE<<16 | gc.TUINT16,
-		gc.OGE<<16 | gc.TUINT32,
-		gc.OGE<<16 | gc.TUINT64,
-		gc.OLE<<16 | gc.TFLOAT32,
-		gc.OLE<<16 | gc.TFLOAT64:
-		a = x86.AJCC
-
-	case gc.OCMP<<16 | gc.TBOOL,
-		gc.OCMP<<16 | gc.TINT8,
-		gc.OCMP<<16 | gc.TUINT8:
-		a = x86.ACMPB
-
-	case gc.OCMP<<16 | gc.TINT16,
-		gc.OCMP<<16 | gc.TUINT16:
-		a = x86.ACMPW
-
-	case gc.OCMP<<16 | gc.TINT32,
-		gc.OCMP<<16 | gc.TUINT32,
-		gc.OCMP<<16 | gc.TPTR32:
-		a = x86.ACMPL
-
-	case gc.OAS<<16 | gc.TBOOL,
-		gc.OAS<<16 | gc.TINT8,
-		gc.OAS<<16 | gc.TUINT8:
-		a = x86.AMOVB
-
-	case gc.OAS<<16 | gc.TINT16,
-		gc.OAS<<16 | gc.TUINT16:
-		a = x86.AMOVW
-
-	case gc.OAS<<16 | gc.TINT32,
-		gc.OAS<<16 | gc.TUINT32,
-		gc.OAS<<16 | gc.TPTR32:
-		a = x86.AMOVL
-
-	case gc.OAS<<16 | gc.TFLOAT32:
-		a = x86.AMOVSS
-
-	case gc.OAS<<16 | gc.TFLOAT64:
-		a = x86.AMOVSD
-
-	case gc.OADD<<16 | gc.TINT8,
-		gc.OADD<<16 | gc.TUINT8:
-		a = x86.AADDB
-
-	case gc.OADD<<16 | gc.TINT16,
-		gc.OADD<<16 | gc.TUINT16:
-		a = x86.AADDW
-
-	case gc.OADD<<16 | gc.TINT32,
-		gc.OADD<<16 | gc.TUINT32,
-		gc.OADD<<16 | gc.TPTR32:
-		a = x86.AADDL
-
-	case gc.OSUB<<16 | gc.TINT8,
-		gc.OSUB<<16 | gc.TUINT8:
-		a = x86.ASUBB
-
-	case gc.OSUB<<16 | gc.TINT16,
-		gc.OSUB<<16 | gc.TUINT16:
-		a = x86.ASUBW
-
-	case gc.OSUB<<16 | gc.TINT32,
-		gc.OSUB<<16 | gc.TUINT32,
-		gc.OSUB<<16 | gc.TPTR32:
-		a = x86.ASUBL
-
-	case gc.OINC<<16 | gc.TINT8,
-		gc.OINC<<16 | gc.TUINT8:
-		a = x86.AINCB
-
-	case gc.OINC<<16 | gc.TINT16,
-		gc.OINC<<16 | gc.TUINT16:
-		a = x86.AINCW
-
-	case gc.OINC<<16 | gc.TINT32,
-		gc.OINC<<16 | gc.TUINT32,
-		gc.OINC<<16 | gc.TPTR32:
-		a = x86.AINCL
-
-	case gc.ODEC<<16 | gc.TINT8,
-		gc.ODEC<<16 | gc.TUINT8:
-		a = x86.ADECB
-
-	case gc.ODEC<<16 | gc.TINT16,
-		gc.ODEC<<16 | gc.TUINT16:
-		a = x86.ADECW
-
-	case gc.ODEC<<16 | gc.TINT32,
-		gc.ODEC<<16 | gc.TUINT32,
-		gc.ODEC<<16 | gc.TPTR32:
-		a = x86.ADECL
-
-	case gc.OCOM<<16 | gc.TINT8,
-		gc.OCOM<<16 | gc.TUINT8:
-		a = x86.ANOTB
-
-	case gc.OCOM<<16 | gc.TINT16,
-		gc.OCOM<<16 | gc.TUINT16:
-		a = x86.ANOTW
-
-	case gc.OCOM<<16 | gc.TINT32,
-		gc.OCOM<<16 | gc.TUINT32,
-		gc.OCOM<<16 | gc.TPTR32:
-		a = x86.ANOTL
-
-	case gc.OMINUS<<16 | gc.TINT8,
-		gc.OMINUS<<16 | gc.TUINT8:
-		a = x86.ANEGB
-
-	case gc.OMINUS<<16 | gc.TINT16,
-		gc.OMINUS<<16 | gc.TUINT16:
-		a = x86.ANEGW
-
-	case gc.OMINUS<<16 | gc.TINT32,
-		gc.OMINUS<<16 | gc.TUINT32,
-		gc.OMINUS<<16 | gc.TPTR32:
-		a = x86.ANEGL
-
-	case gc.OAND<<16 | gc.TINT8,
-		gc.OAND<<16 | gc.TUINT8:
-		a = x86.AANDB
-
-	case gc.OAND<<16 | gc.TINT16,
-		gc.OAND<<16 | gc.TUINT16:
-		a = x86.AANDW
-
-	case gc.OAND<<16 | gc.TINT32,
-		gc.OAND<<16 | gc.TUINT32,
-		gc.OAND<<16 | gc.TPTR32:
-		a = x86.AANDL
-
-	case gc.OOR<<16 | gc.TINT8,
-		gc.OOR<<16 | gc.TUINT8:
-		a = x86.AORB
-
-	case gc.OOR<<16 | gc.TINT16,
-		gc.OOR<<16 | gc.TUINT16:
-		a = x86.AORW
-
-	case gc.OOR<<16 | gc.TINT32,
-		gc.OOR<<16 | gc.TUINT32,
-		gc.OOR<<16 | gc.TPTR32:
-		a = x86.AORL
-
-	case gc.OXOR<<16 | gc.TINT8,
-		gc.OXOR<<16 | gc.TUINT8:
-		a = x86.AXORB
-
-	case gc.OXOR<<16 | gc.TINT16,
-		gc.OXOR<<16 | gc.TUINT16:
-		a = x86.AXORW
-
-	case gc.OXOR<<16 | gc.TINT32,
-		gc.OXOR<<16 | gc.TUINT32,
-		gc.OXOR<<16 | gc.TPTR32:
-		a = x86.AXORL
-
-	case gc.OLROT<<16 | gc.TINT8,
-		gc.OLROT<<16 | gc.TUINT8:
-		a = x86.AROLB
-
-	case gc.OLROT<<16 | gc.TINT16,
-		gc.OLROT<<16 | gc.TUINT16:
-		a = x86.AROLW
-
-	case gc.OLROT<<16 | gc.TINT32,
-		gc.OLROT<<16 | gc.TUINT32,
-		gc.OLROT<<16 | gc.TPTR32:
-		a = x86.AROLL
-
-	case gc.OLSH<<16 | gc.TINT8,
-		gc.OLSH<<16 | gc.TUINT8:
-		a = x86.ASHLB
-
-	case gc.OLSH<<16 | gc.TINT16,
-		gc.OLSH<<16 | gc.TUINT16:
-		a = x86.ASHLW
-
-	case gc.OLSH<<16 | gc.TINT32,
-		gc.OLSH<<16 | gc.TUINT32,
-		gc.OLSH<<16 | gc.TPTR32:
-		a = x86.ASHLL
-
-	case gc.ORSH<<16 | gc.TUINT8:
-		a = x86.ASHRB
-
-	case gc.ORSH<<16 | gc.TUINT16:
-		a = x86.ASHRW
-
-	case gc.ORSH<<16 | gc.TUINT32,
-		gc.ORSH<<16 | gc.TPTR32:
-		a = x86.ASHRL
-
-	case gc.ORSH<<16 | gc.TINT8:
-		a = x86.ASARB
-
-	case gc.ORSH<<16 | gc.TINT16:
-		a = x86.ASARW
-
-	case gc.ORSH<<16 | gc.TINT32:
-		a = x86.ASARL
-
-	case gc.OHMUL<<16 | gc.TINT8,
-		gc.OMUL<<16 | gc.TINT8,
-		gc.OMUL<<16 | gc.TUINT8:
-		a = x86.AIMULB
-
-	case gc.OHMUL<<16 | gc.TINT16,
-		gc.OMUL<<16 | gc.TINT16,
-		gc.OMUL<<16 | gc.TUINT16:
-		a = x86.AIMULW
-
-	case gc.OHMUL<<16 | gc.TINT32,
-		gc.OMUL<<16 | gc.TINT32,
-		gc.OMUL<<16 | gc.TUINT32,
-		gc.OMUL<<16 | gc.TPTR32:
-		a = x86.AIMULL
-
-	case gc.OHMUL<<16 | gc.TUINT8:
-		a = x86.AMULB
-
-	case gc.OHMUL<<16 | gc.TUINT16:
-		a = x86.AMULW
-
-	case gc.OHMUL<<16 | gc.TUINT32,
-		gc.OHMUL<<16 | gc.TPTR32:
-		a = x86.AMULL
-
-	case gc.ODIV<<16 | gc.TINT8,
-		gc.OMOD<<16 | gc.TINT8:
-		a = x86.AIDIVB
-
-	case gc.ODIV<<16 | gc.TUINT8,
-		gc.OMOD<<16 | gc.TUINT8:
-		a = x86.ADIVB
-
-	case gc.ODIV<<16 | gc.TINT16,
-		gc.OMOD<<16 | gc.TINT16:
-		a = x86.AIDIVW
-
-	case gc.ODIV<<16 | gc.TUINT16,
-		gc.OMOD<<16 | gc.TUINT16:
-		a = x86.ADIVW
-
-	case gc.ODIV<<16 | gc.TINT32,
-		gc.OMOD<<16 | gc.TINT32:
-		a = x86.AIDIVL
-
-	case gc.ODIV<<16 | gc.TUINT32,
-		gc.ODIV<<16 | gc.TPTR32,
-		gc.OMOD<<16 | gc.TUINT32,
-		gc.OMOD<<16 | gc.TPTR32:
-		a = x86.ADIVL
-
-	case gc.OEXTEND<<16 | gc.TINT16:
-		a = x86.ACWD
-
-	case gc.OEXTEND<<16 | gc.TINT32:
-		a = x86.ACDQ
-	}
-
-	return a
-}
-
-func foptoas(op int, t *gc.Type, flg int) int {
-	a := obj.AXXX
-	et := int(gc.Simtype[t.Etype])
-
-	if !gc.Thearch.Use387 {
-		switch uint32(op)<<16 | uint32(et) {
-		default:
-			gc.Fatal("foptoas-sse: no entry %v-%v", gc.Oconv(int(op), 0), t)
-
-		case gc.OCMP<<16 | gc.TFLOAT32:
-			a = x86.AUCOMISS
-
-		case gc.OCMP<<16 | gc.TFLOAT64:
-			a = x86.AUCOMISD
-
-		case gc.OAS<<16 | gc.TFLOAT32:
-			a = x86.AMOVSS
-
-		case gc.OAS<<16 | gc.TFLOAT64:
-			a = x86.AMOVSD
-
-		case gc.OADD<<16 | gc.TFLOAT32:
-			a = x86.AADDSS
-
-		case gc.OADD<<16 | gc.TFLOAT64:
-			a = x86.AADDSD
-
-		case gc.OSUB<<16 | gc.TFLOAT32:
-			a = x86.ASUBSS
-
-		case gc.OSUB<<16 | gc.TFLOAT64:
-			a = x86.ASUBSD
-
-		case gc.OMUL<<16 | gc.TFLOAT32:
-			a = x86.AMULSS
-
-		case gc.OMUL<<16 | gc.TFLOAT64:
-			a = x86.AMULSD
-
-		case gc.ODIV<<16 | gc.TFLOAT32:
-			a = x86.ADIVSS
-
-		case gc.ODIV<<16 | gc.TFLOAT64:
-			a = x86.ADIVSD
-		}
-
-		return a
-	}
-
-	// If we need Fpop, it means we're working on
-	// two different floating-point registers, not memory.
-	// There the instruction only has a float64 form.
-	if flg&Fpop != 0 {
-		et = gc.TFLOAT64
-	}
-
-	// clear Frev if unneeded
-	switch op {
-	case gc.OADD,
-		gc.OMUL:
-		flg &^= Frev
-	}
-
-	switch uint32(op)<<16 | (uint32(et)<<8 | uint32(flg)) {
-	case gc.OADD<<16 | (gc.TFLOAT32<<8 | 0):
-		return x86.AFADDF
-
-	case gc.OADD<<16 | (gc.TFLOAT64<<8 | 0):
-		return x86.AFADDD
-
-	case gc.OADD<<16 | (gc.TFLOAT64<<8 | Fpop):
-		return x86.AFADDDP
-
-	case gc.OSUB<<16 | (gc.TFLOAT32<<8 | 0):
-		return x86.AFSUBF
-
-	case gc.OSUB<<16 | (gc.TFLOAT32<<8 | Frev):
-		return x86.AFSUBRF
-
-	case gc.OSUB<<16 | (gc.TFLOAT64<<8 | 0):
-		return x86.AFSUBD
-
-	case gc.OSUB<<16 | (gc.TFLOAT64<<8 | Frev):
-		return x86.AFSUBRD
-
-	case gc.OSUB<<16 | (gc.TFLOAT64<<8 | Fpop):
-		return x86.AFSUBDP
-
-	case gc.OSUB<<16 | (gc.TFLOAT64<<8 | (Fpop | Frev)):
-		return x86.AFSUBRDP
-
-	case gc.OMUL<<16 | (gc.TFLOAT32<<8 | 0):
-		return x86.AFMULF
-
-	case gc.OMUL<<16 | (gc.TFLOAT64<<8 | 0):
-		return x86.AFMULD
-
-	case gc.OMUL<<16 | (gc.TFLOAT64<<8 | Fpop):
-		return x86.AFMULDP
-
-	case gc.ODIV<<16 | (gc.TFLOAT32<<8 | 0):
-		return x86.AFDIVF
-
-	case gc.ODIV<<16 | (gc.TFLOAT32<<8 | Frev):
-		return x86.AFDIVRF
-
-	case gc.ODIV<<16 | (gc.TFLOAT64<<8 | 0):
-		return x86.AFDIVD
-
-	case gc.ODIV<<16 | (gc.TFLOAT64<<8 | Frev):
-		return x86.AFDIVRD
-
-	case gc.ODIV<<16 | (gc.TFLOAT64<<8 | Fpop):
-		return x86.AFDIVDP
-
-	case gc.ODIV<<16 | (gc.TFLOAT64<<8 | (Fpop | Frev)):
-		return x86.AFDIVRDP
-
-	case gc.OCMP<<16 | (gc.TFLOAT32<<8 | 0):
-		return x86.AFCOMF
-
-	case gc.OCMP<<16 | (gc.TFLOAT32<<8 | Fpop):
-		return x86.AFCOMFP
-
-	case gc.OCMP<<16 | (gc.TFLOAT64<<8 | 0):
-		return x86.AFCOMD
-
-	case gc.OCMP<<16 | (gc.TFLOAT64<<8 | Fpop):
-		return x86.AFCOMDP
-
-	case gc.OCMP<<16 | (gc.TFLOAT64<<8 | Fpop2):
-		return x86.AFCOMDPP
-
-	case gc.OMINUS<<16 | (gc.TFLOAT32<<8 | 0):
-		return x86.AFCHS
-
-	case gc.OMINUS<<16 | (gc.TFLOAT64<<8 | 0):
-		return x86.AFCHS
-	}
-
-	gc.Fatal("foptoas %v %v %#x", gc.Oconv(int(op), 0), t, flg)
-	return 0
-}
-
-var resvd = []int{
-	//	REG_DI,	// for movstring
-	//	REG_SI,	// for movstring
-
-	x86.REG_AX, // for divide
-	x86.REG_CX, // for shift
-	x86.REG_DX, // for divide, context
-	x86.REG_SP, // for stack
-}
-
-/*
- * generate
- *	as $c, reg
- */
-func gconreg(as int, c int64, reg int) {
-	var n1 gc.Node
-	var n2 gc.Node
-
-	gc.Nodconst(&n1, gc.Types[gc.TINT64], c)
-	gc.Nodreg(&n2, gc.Types[gc.TINT64], reg)
-	gins(as, &n1, &n2)
-}
-
-/*
- * generate
- *	as $c, n
- */
-func ginscon(as int, c int64, n2 *gc.Node) {
-	var n1 gc.Node
-	gc.Nodconst(&n1, gc.Types[gc.TINT32], c)
-	gins(as, &n1, n2)
-}
-
-func ginscmp(op int, t *gc.Type, n1, n2 *gc.Node, likely int) *obj.Prog {
-	if gc.Isint[t.Etype] || int(t.Etype) == gc.Tptr {
-		if (n1.Op == gc.OLITERAL || n1.Op == gc.OADDR && n1.Left.Op == gc.ONAME) && n2.Op != gc.OLITERAL {
-			// Reverse comparison to place constant (including address constant) last.
-			op = gc.Brrev(op)
-			n1, n2 = n2, n1
-		}
-	}
-
-	// General case.
-	var r1, r2, g1, g2 gc.Node
-	if n1.Op == gc.ONAME && n1.Class&gc.PHEAP == 0 || n1.Op == gc.OINDREG {
-		r1 = *n1
-	} else {
-		gc.Regalloc(&r1, t, n1)
-		gc.Regalloc(&g1, n1.Type, &r1)
-		gc.Cgen(n1, &g1)
-		gmove(&g1, &r1)
-	}
-	if n2.Op == gc.OLITERAL && gc.Isint[t.Etype] || n2.Op == gc.OADDR && n2.Left.Op == gc.ONAME && n2.Left.Class == gc.PEXTERN {
-		r2 = *n2
-	} else {
-		gc.Regalloc(&r2, t, n2)
-		gc.Regalloc(&g2, n1.Type, &r2)
-		gc.Cgen(n2, &g2)
-		gmove(&g2, &r2)
-	}
-	gins(optoas(gc.OCMP, t), &r1, &r2)
-	if r1.Op == gc.OREGISTER {
-		gc.Regfree(&g1)
-		gc.Regfree(&r1)
-	}
-	if r2.Op == gc.OREGISTER {
-		gc.Regfree(&g2)
-		gc.Regfree(&r2)
-	}
-	return gc.Gbranch(optoas(op, t), nil, likely)
-}
-
-/*
- * swap node contents
- */
-func nswap(a *gc.Node, b *gc.Node) {
-	t := *a
-	*a = *b
-	*b = t
-}
-
-/*
- * return constant i node.
- * overwritten by next call, but useful in calls to gins.
- */
-
-var ncon_n gc.Node
-
-func ncon(i uint32) *gc.Node {
-	if ncon_n.Type == nil {
-		gc.Nodconst(&ncon_n, gc.Types[gc.TUINT32], 0)
-	}
-	ncon_n.SetInt(int64(i))
-	return &ncon_n
-}
-
-var sclean [10]gc.Node
-
-var nsclean int
-
-/*
- * n is a 64-bit value.  fill in lo and hi to refer to its 32-bit halves.
- */
-func split64(n *gc.Node, lo *gc.Node, hi *gc.Node) {
-	if !gc.Is64(n.Type) {
-		gc.Fatal("split64 %v", n.Type)
-	}
-
-	if nsclean >= len(sclean) {
-		gc.Fatal("split64 clean")
-	}
-	sclean[nsclean].Op = gc.OEMPTY
-	nsclean++
-	switch n.Op {
-	default:
-		switch n.Op {
-		default:
-			var n1 gc.Node
-			if !dotaddable(n, &n1) {
-				gc.Igen(n, &n1, nil)
-				sclean[nsclean-1] = n1
-			}
-
-			n = &n1
-
-		case gc.ONAME:
-			if n.Class == gc.PPARAMREF {
-				var n1 gc.Node
-				gc.Cgen(n.Name.Heapaddr, &n1)
-				sclean[nsclean-1] = n1
-				n = &n1
-			}
-
-			// nothing
-		case gc.OINDREG:
-			break
-		}
-
-		*lo = *n
-		*hi = *n
-		lo.Type = gc.Types[gc.TUINT32]
-		if n.Type.Etype == gc.TINT64 {
-			hi.Type = gc.Types[gc.TINT32]
-		} else {
-			hi.Type = gc.Types[gc.TUINT32]
-		}
-		hi.Xoffset += 4
-
-	case gc.OLITERAL:
-		var n1 gc.Node
-		n.Convconst(&n1, n.Type)
-		i := n1.Int()
-		gc.Nodconst(lo, gc.Types[gc.TUINT32], int64(uint32(i)))
-		i >>= 32
-		if n.Type.Etype == gc.TINT64 {
-			gc.Nodconst(hi, gc.Types[gc.TINT32], int64(int32(i)))
-		} else {
-			gc.Nodconst(hi, gc.Types[gc.TUINT32], int64(uint32(i)))
-		}
-	}
-}
-
-func splitclean() {
-	if nsclean <= 0 {
-		gc.Fatal("splitclean")
-	}
-	nsclean--
-	if sclean[nsclean].Op != gc.OEMPTY {
-		gc.Regfree(&sclean[nsclean])
-	}
-}
-
-// set up nodes representing fp constants
-var (
-	zerof        gc.Node
-	two63f       gc.Node
-	two64f       gc.Node
-	bignodes_did bool
-)
-
-func bignodes() {
-	if bignodes_did {
-		return
-	}
-	bignodes_did = true
-
-	gc.Nodconst(&zerof, gc.Types[gc.TINT64], 0)
-	zerof.Convconst(&zerof, gc.Types[gc.TFLOAT64])
-
-	var i big.Int
-	i.SetInt64(1)
-	i.Lsh(&i, 63)
-	var bigi gc.Node
-
-	gc.Nodconst(&bigi, gc.Types[gc.TUINT64], 0)
-	bigi.SetBigInt(&i)
-	bigi.Convconst(&two63f, gc.Types[gc.TFLOAT64])
-
-	gc.Nodconst(&bigi, gc.Types[gc.TUINT64], 0)
-	i.Lsh(&i, 1)
-	bigi.SetBigInt(&i)
-	bigi.Convconst(&two64f, gc.Types[gc.TFLOAT64])
-}
-
-func memname(n *gc.Node, t *gc.Type) {
-	gc.Tempname(n, t)
-	n.Sym = gc.Lookup("." + n.Sym.Name[1:]) // keep optimizer from registerizing
-	n.Orig.Sym = n.Sym
-}
-
-func gmove(f *gc.Node, t *gc.Node) {
-	if gc.Debug['M'] != 0 {
-		fmt.Printf("gmove %v -> %v\n", f, t)
-	}
-
-	ft := gc.Simsimtype(f.Type)
-	tt := gc.Simsimtype(t.Type)
-	cvt := t.Type
-
-	if gc.Iscomplex[ft] || gc.Iscomplex[tt] {
-		gc.Complexmove(f, t)
-		return
-	}
-
-	if gc.Isfloat[ft] || gc.Isfloat[tt] {
-		floatmove(f, t)
-		return
-	}
-
-	// cannot have two integer memory operands;
-	// except 64-bit, which always copies via registers anyway.
-	var r1 gc.Node
-	var a int
-	if gc.Isint[ft] && gc.Isint[tt] && !gc.Is64(f.Type) && !gc.Is64(t.Type) && gc.Ismem(f) && gc.Ismem(t) {
-		goto hard
-	}
-
-	// convert constant to desired type
-	if f.Op == gc.OLITERAL {
-		var con gc.Node
-		f.Convconst(&con, t.Type)
-		f = &con
-		ft = gc.Simsimtype(con.Type)
-	}
-
-	// value -> value copy, only one memory operand.
-	// figure out the instruction to use.
-	// break out of switch for one-instruction gins.
-	// goto rdst for "destination must be register".
-	// goto hard for "convert to cvt type first".
-	// otherwise handle and return.
-
-	switch uint32(ft)<<16 | uint32(tt) {
-	default:
-		// should not happen
-		gc.Fatal("gmove %v -> %v", f, t)
-		return
-
-		/*
-		 * integer copy and truncate
-		 */
-	case gc.TINT8<<16 | gc.TINT8, // same size
-		gc.TINT8<<16 | gc.TUINT8,
-		gc.TUINT8<<16 | gc.TINT8,
-		gc.TUINT8<<16 | gc.TUINT8:
-		a = x86.AMOVB
-
-	case gc.TINT16<<16 | gc.TINT8, // truncate
-		gc.TUINT16<<16 | gc.TINT8,
-		gc.TINT32<<16 | gc.TINT8,
-		gc.TUINT32<<16 | gc.TINT8,
-		gc.TINT16<<16 | gc.TUINT8,
-		gc.TUINT16<<16 | gc.TUINT8,
-		gc.TINT32<<16 | gc.TUINT8,
-		gc.TUINT32<<16 | gc.TUINT8:
-		a = x86.AMOVB
-
-		goto rsrc
-
-	case gc.TINT64<<16 | gc.TINT8, // truncate low word
-		gc.TUINT64<<16 | gc.TINT8,
-		gc.TINT64<<16 | gc.TUINT8,
-		gc.TUINT64<<16 | gc.TUINT8:
-		var flo gc.Node
-		var fhi gc.Node
-		split64(f, &flo, &fhi)
-
-		var r1 gc.Node
-		gc.Nodreg(&r1, t.Type, x86.REG_AX)
-		gmove(&flo, &r1)
-		gins(x86.AMOVB, &r1, t)
-		splitclean()
-		return
-
-	case gc.TINT16<<16 | gc.TINT16, // same size
-		gc.TINT16<<16 | gc.TUINT16,
-		gc.TUINT16<<16 | gc.TINT16,
-		gc.TUINT16<<16 | gc.TUINT16:
-		a = x86.AMOVW
-
-	case gc.TINT32<<16 | gc.TINT16, // truncate
-		gc.TUINT32<<16 | gc.TINT16,
-		gc.TINT32<<16 | gc.TUINT16,
-		gc.TUINT32<<16 | gc.TUINT16:
-		a = x86.AMOVW
-
-		goto rsrc
-
-	case gc.TINT64<<16 | gc.TINT16, // truncate low word
-		gc.TUINT64<<16 | gc.TINT16,
-		gc.TINT64<<16 | gc.TUINT16,
-		gc.TUINT64<<16 | gc.TUINT16:
-		var flo gc.Node
-		var fhi gc.Node
-		split64(f, &flo, &fhi)
-
-		var r1 gc.Node
-		gc.Nodreg(&r1, t.Type, x86.REG_AX)
-		gmove(&flo, &r1)
-		gins(x86.AMOVW, &r1, t)
-		splitclean()
-		return
-
-	case gc.TINT32<<16 | gc.TINT32, // same size
-		gc.TINT32<<16 | gc.TUINT32,
-		gc.TUINT32<<16 | gc.TINT32,
-		gc.TUINT32<<16 | gc.TUINT32:
-		a = x86.AMOVL
-
-	case gc.TINT64<<16 | gc.TINT32, // truncate
-		gc.TUINT64<<16 | gc.TINT32,
-		gc.TINT64<<16 | gc.TUINT32,
-		gc.TUINT64<<16 | gc.TUINT32:
-		var fhi gc.Node
-		var flo gc.Node
-		split64(f, &flo, &fhi)
-
-		var r1 gc.Node
-		gc.Nodreg(&r1, t.Type, x86.REG_AX)
-		gmove(&flo, &r1)
-		gins(x86.AMOVL, &r1, t)
-		splitclean()
-		return
-
-	case gc.TINT64<<16 | gc.TINT64, // same size
-		gc.TINT64<<16 | gc.TUINT64,
-		gc.TUINT64<<16 | gc.TINT64,
-		gc.TUINT64<<16 | gc.TUINT64:
-		var fhi gc.Node
-		var flo gc.Node
-		split64(f, &flo, &fhi)
-
-		var tlo gc.Node
-		var thi gc.Node
-		split64(t, &tlo, &thi)
-		if f.Op == gc.OLITERAL {
-			gins(x86.AMOVL, &flo, &tlo)
-			gins(x86.AMOVL, &fhi, &thi)
-		} else {
-			// Implementation of conversion-free x = y for int64 or uint64 x.
-			// This is generated by the code that copies small values out of closures,
-			// and that code has DX live, so avoid DX and use CX instead.
-			var r1 gc.Node
-			gc.Nodreg(&r1, gc.Types[gc.TUINT32], x86.REG_AX)
-			var r2 gc.Node
-			gc.Nodreg(&r2, gc.Types[gc.TUINT32], x86.REG_CX)
-			gins(x86.AMOVL, &flo, &r1)
-			gins(x86.AMOVL, &fhi, &r2)
-			gins(x86.AMOVL, &r1, &tlo)
-			gins(x86.AMOVL, &r2, &thi)
-		}
-
-		splitclean()
-		splitclean()
-		return
-
-		/*
-		 * integer up-conversions
-		 */
-	case gc.TINT8<<16 | gc.TINT16, // sign extend int8
-		gc.TINT8<<16 | gc.TUINT16:
-		a = x86.AMOVBWSX
-
-		goto rdst
-
-	case gc.TINT8<<16 | gc.TINT32,
-		gc.TINT8<<16 | gc.TUINT32:
-		a = x86.AMOVBLSX
-		goto rdst
-
-	case gc.TINT8<<16 | gc.TINT64, // convert via int32
-		gc.TINT8<<16 | gc.TUINT64:
-		cvt = gc.Types[gc.TINT32]
-
-		goto hard
-
-	case gc.TUINT8<<16 | gc.TINT16, // zero extend uint8
-		gc.TUINT8<<16 | gc.TUINT16:
-		a = x86.AMOVBWZX
-
-		goto rdst
-
-	case gc.TUINT8<<16 | gc.TINT32,
-		gc.TUINT8<<16 | gc.TUINT32:
-		a = x86.AMOVBLZX
-		goto rdst
-
-	case gc.TUINT8<<16 | gc.TINT64, // convert via uint32
-		gc.TUINT8<<16 | gc.TUINT64:
-		cvt = gc.Types[gc.TUINT32]
-
-		goto hard
-
-	case gc.TINT16<<16 | gc.TINT32, // sign extend int16
-		gc.TINT16<<16 | gc.TUINT32:
-		a = x86.AMOVWLSX
-
-		goto rdst
-
-	case gc.TINT16<<16 | gc.TINT64, // convert via int32
-		gc.TINT16<<16 | gc.TUINT64:
-		cvt = gc.Types[gc.TINT32]
-
-		goto hard
-
-	case gc.TUINT16<<16 | gc.TINT32, // zero extend uint16
-		gc.TUINT16<<16 | gc.TUINT32:
-		a = x86.AMOVWLZX
-
-		goto rdst
-
-	case gc.TUINT16<<16 | gc.TINT64, // convert via uint32
-		gc.TUINT16<<16 | gc.TUINT64:
-		cvt = gc.Types[gc.TUINT32]
-
-		goto hard
-
-	case gc.TINT32<<16 | gc.TINT64, // sign extend int32
-		gc.TINT32<<16 | gc.TUINT64:
-		var thi gc.Node
-		var tlo gc.Node
-		split64(t, &tlo, &thi)
-
-		var flo gc.Node
-		gc.Nodreg(&flo, tlo.Type, x86.REG_AX)
-		var fhi gc.Node
-		gc.Nodreg(&fhi, thi.Type, x86.REG_DX)
-		gmove(f, &flo)
-		gins(x86.ACDQ, nil, nil)
-		gins(x86.AMOVL, &flo, &tlo)
-		gins(x86.AMOVL, &fhi, &thi)
-		splitclean()
-		return
-
-	case gc.TUINT32<<16 | gc.TINT64, // zero extend uint32
-		gc.TUINT32<<16 | gc.TUINT64:
-		var tlo gc.Node
-		var thi gc.Node
-		split64(t, &tlo, &thi)
-
-		gmove(f, &tlo)
-		gins(x86.AMOVL, ncon(0), &thi)
-		splitclean()
-		return
-	}
-
-	gins(a, f, t)
-	return
-
-	// requires register source
-rsrc:
-	gc.Regalloc(&r1, f.Type, t)
-
-	gmove(f, &r1)
-	gins(a, &r1, t)
-	gc.Regfree(&r1)
-	return
-
-	// requires register destination
-rdst:
-	{
-		gc.Regalloc(&r1, t.Type, t)
-
-		gins(a, f, &r1)
-		gmove(&r1, t)
-		gc.Regfree(&r1)
-		return
-	}
-
-	// requires register intermediate
-hard:
-	gc.Regalloc(&r1, cvt, t)
-
-	gmove(f, &r1)
-	gmove(&r1, t)
-	gc.Regfree(&r1)
-	return
-}
-
-func floatmove(f *gc.Node, t *gc.Node) {
-	var r1 gc.Node
-
-	ft := gc.Simsimtype(f.Type)
-	tt := gc.Simsimtype(t.Type)
-	cvt := t.Type
-
-	// cannot have two floating point memory operands.
-	if gc.Isfloat[ft] && gc.Isfloat[tt] && gc.Ismem(f) && gc.Ismem(t) {
-		goto hard
-	}
-
-	// convert constant to desired type
-	if f.Op == gc.OLITERAL {
-		var con gc.Node
-		f.Convconst(&con, t.Type)
-		f = &con
-		ft = gc.Simsimtype(con.Type)
-
-		// some constants can't move directly to memory.
-		if gc.Ismem(t) {
-			// float constants come from memory.
-			if gc.Isfloat[tt] {
-				goto hard
-			}
-		}
-	}
-
-	// value -> value copy, only one memory operand.
-	// figure out the instruction to use.
-	// break out of switch for one-instruction gins.
-	// goto rdst for "destination must be register".
-	// goto hard for "convert to cvt type first".
-	// otherwise handle and return.
-
-	switch uint32(ft)<<16 | uint32(tt) {
-	default:
-		if gc.Thearch.Use387 {
-			floatmove_387(f, t)
-		} else {
-			floatmove_sse(f, t)
-		}
-		return
-
-		// float to very long integer.
-	case gc.TFLOAT32<<16 | gc.TINT64,
-		gc.TFLOAT64<<16 | gc.TINT64:
-		if f.Op == gc.OREGISTER {
-			cvt = f.Type
-			goto hardmem
-		}
-
-		var r1 gc.Node
-		gc.Nodreg(&r1, gc.Types[ft], x86.REG_F0)
-		if ft == gc.TFLOAT32 {
-			gins(x86.AFMOVF, f, &r1)
-		} else {
-			gins(x86.AFMOVD, f, &r1)
-		}
-
-		// set round to zero mode during conversion
-		var t1 gc.Node
-		memname(&t1, gc.Types[gc.TUINT16])
-
-		var t2 gc.Node
-		memname(&t2, gc.Types[gc.TUINT16])
-		gins(x86.AFSTCW, nil, &t1)
-		gins(x86.AMOVW, ncon(0xf7f), &t2)
-		gins(x86.AFLDCW, &t2, nil)
-		if tt == gc.TINT16 {
-			gins(x86.AFMOVWP, &r1, t)
-		} else if tt == gc.TINT32 {
-			gins(x86.AFMOVLP, &r1, t)
-		} else {
-			gins(x86.AFMOVVP, &r1, t)
-		}
-		gins(x86.AFLDCW, &t1, nil)
-		return
-
-	case gc.TFLOAT32<<16 | gc.TUINT64,
-		gc.TFLOAT64<<16 | gc.TUINT64:
-		if !gc.Ismem(f) {
-			cvt = f.Type
-			goto hardmem
-		}
-
-		bignodes()
-		var f0 gc.Node
-		gc.Nodreg(&f0, gc.Types[ft], x86.REG_F0)
-		var f1 gc.Node
-		gc.Nodreg(&f1, gc.Types[ft], x86.REG_F0+1)
-		var ax gc.Node
-		gc.Nodreg(&ax, gc.Types[gc.TUINT16], x86.REG_AX)
-
-		if ft == gc.TFLOAT32 {
-			gins(x86.AFMOVF, f, &f0)
-		} else {
-			gins(x86.AFMOVD, f, &f0)
-		}
-
-		// if 0 > v { answer = 0 }
-		gins(x86.AFMOVD, &zerof, &f0)
-
-		gins(x86.AFUCOMIP, &f0, &f1)
-		p1 := gc.Gbranch(optoas(gc.OGT, gc.Types[tt]), nil, 0)
-
-		// if 1<<64 <= v { answer = 0 too }
-		gins(x86.AFMOVD, &two64f, &f0)
-
-		gins(x86.AFUCOMIP, &f0, &f1)
-		p2 := gc.Gbranch(optoas(gc.OGT, gc.Types[tt]), nil, 0)
-		gc.Patch(p1, gc.Pc)
-		gins(x86.AFMOVVP, &f0, t) // don't care about t, but will pop the stack
-		var thi gc.Node
-		var tlo gc.Node
-		split64(t, &tlo, &thi)
-		gins(x86.AMOVL, ncon(0), &tlo)
-		gins(x86.AMOVL, ncon(0), &thi)
-		splitclean()
-		p1 = gc.Gbranch(obj.AJMP, nil, 0)
-		gc.Patch(p2, gc.Pc)
-
-		// in range; algorithm is:
-		//	if small enough, use native float64 -> int64 conversion.
-		//	otherwise, subtract 2^63, convert, and add it back.
-
-		// set round to zero mode during conversion
-		var t1 gc.Node
-		memname(&t1, gc.Types[gc.TUINT16])
-
-		var t2 gc.Node
-		memname(&t2, gc.Types[gc.TUINT16])
-		gins(x86.AFSTCW, nil, &t1)
-		gins(x86.AMOVW, ncon(0xf7f), &t2)
-		gins(x86.AFLDCW, &t2, nil)
-
-		// actual work
-		gins(x86.AFMOVD, &two63f, &f0)
-
-		gins(x86.AFUCOMIP, &f0, &f1)
-		p2 = gc.Gbranch(optoas(gc.OLE, gc.Types[tt]), nil, 0)
-		gins(x86.AFMOVVP, &f0, t)
-		p3 := gc.Gbranch(obj.AJMP, nil, 0)
-		gc.Patch(p2, gc.Pc)
-		gins(x86.AFMOVD, &two63f, &f0)
-		gins(x86.AFSUBDP, &f0, &f1)
-		gins(x86.AFMOVVP, &f0, t)
-		split64(t, &tlo, &thi)
-		gins(x86.AXORL, ncon(0x80000000), &thi) // + 2^63
-		gc.Patch(p3, gc.Pc)
-		splitclean()
-
-		// restore rounding mode
-		gins(x86.AFLDCW, &t1, nil)
-
-		gc.Patch(p1, gc.Pc)
-		return
-
-		/*
-		 * integer to float
-		 */
-	case gc.TINT64<<16 | gc.TFLOAT32,
-		gc.TINT64<<16 | gc.TFLOAT64:
-		if t.Op == gc.OREGISTER {
-			goto hardmem
-		}
-		var f0 gc.Node
-		gc.Nodreg(&f0, t.Type, x86.REG_F0)
-		gins(x86.AFMOVV, f, &f0)
-		if tt == gc.TFLOAT32 {
-			gins(x86.AFMOVFP, &f0, t)
-		} else {
-			gins(x86.AFMOVDP, &f0, t)
-		}
-		return
-
-		// algorithm is:
-	//	if small enough, use native int64 -> float64 conversion.
-	//	otherwise, halve (rounding to odd?), convert, and double.
-	case gc.TUINT64<<16 | gc.TFLOAT32,
-		gc.TUINT64<<16 | gc.TFLOAT64:
-		var ax gc.Node
-		gc.Nodreg(&ax, gc.Types[gc.TUINT32], x86.REG_AX)
-
-		var dx gc.Node
-		gc.Nodreg(&dx, gc.Types[gc.TUINT32], x86.REG_DX)
-		var cx gc.Node
-		gc.Nodreg(&cx, gc.Types[gc.TUINT32], x86.REG_CX)
-		var t1 gc.Node
-		gc.Tempname(&t1, f.Type)
-		var tlo gc.Node
-		var thi gc.Node
-		split64(&t1, &tlo, &thi)
-		gmove(f, &t1)
-		gins(x86.ACMPL, &thi, ncon(0))
-		p1 := gc.Gbranch(x86.AJLT, nil, 0)
-
-		// native
-		var r1 gc.Node
-		gc.Nodreg(&r1, gc.Types[tt], x86.REG_F0)
-
-		gins(x86.AFMOVV, &t1, &r1)
-		if tt == gc.TFLOAT32 {
-			gins(x86.AFMOVFP, &r1, t)
-		} else {
-			gins(x86.AFMOVDP, &r1, t)
-		}
-		p2 := gc.Gbranch(obj.AJMP, nil, 0)
-
-		// simulated
-		gc.Patch(p1, gc.Pc)
-
-		gmove(&tlo, &ax)
-		gmove(&thi, &dx)
-		p1 = gins(x86.ASHRL, ncon(1), &ax)
-		p1.From.Index = x86.REG_DX // double-width shift DX -> AX
-		p1.From.Scale = 0
-		gins(x86.AMOVL, ncon(0), &cx)
-		gins(x86.ASETCC, nil, &cx)
-		gins(x86.AORL, &cx, &ax)
-		gins(x86.ASHRL, ncon(1), &dx)
-		gmove(&dx, &thi)
-		gmove(&ax, &tlo)
-		gc.Nodreg(&r1, gc.Types[tt], x86.REG_F0)
-		var r2 gc.Node
-		gc.Nodreg(&r2, gc.Types[tt], x86.REG_F0+1)
-		gins(x86.AFMOVV, &t1, &r1)
-		gins(x86.AFMOVD, &r1, &r1)
-		gins(x86.AFADDDP, &r1, &r2)
-		if tt == gc.TFLOAT32 {
-			gins(x86.AFMOVFP, &r1, t)
-		} else {
-			gins(x86.AFMOVDP, &r1, t)
-		}
-		gc.Patch(p2, gc.Pc)
-		splitclean()
-		return
-	}
-
-	// requires register intermediate
-hard:
-	gc.Regalloc(&r1, cvt, t)
-
-	gmove(f, &r1)
-	gmove(&r1, t)
-	gc.Regfree(&r1)
-	return
-
-	// requires memory intermediate
-hardmem:
-	gc.Tempname(&r1, cvt)
-
-	gmove(f, &r1)
-	gmove(&r1, t)
-	return
-}
-
-func floatmove_387(f *gc.Node, t *gc.Node) {
-	var r1 gc.Node
-	var a int
-
-	ft := gc.Simsimtype(f.Type)
-	tt := gc.Simsimtype(t.Type)
-	cvt := t.Type
-
-	switch uint32(ft)<<16 | uint32(tt) {
-	default:
-		goto fatal
-
-		/*
-		* float to integer
-		 */
-	case gc.TFLOAT32<<16 | gc.TINT16,
-		gc.TFLOAT32<<16 | gc.TINT32,
-		gc.TFLOAT32<<16 | gc.TINT64,
-		gc.TFLOAT64<<16 | gc.TINT16,
-		gc.TFLOAT64<<16 | gc.TINT32,
-		gc.TFLOAT64<<16 | gc.TINT64:
-		if t.Op == gc.OREGISTER {
-			goto hardmem
-		}
-		var r1 gc.Node
-		gc.Nodreg(&r1, gc.Types[ft], x86.REG_F0)
-		if f.Op != gc.OREGISTER {
-			if ft == gc.TFLOAT32 {
-				gins(x86.AFMOVF, f, &r1)
-			} else {
-				gins(x86.AFMOVD, f, &r1)
-			}
-		}
-
-		// set round to zero mode during conversion
-		var t1 gc.Node
-		memname(&t1, gc.Types[gc.TUINT16])
-
-		var t2 gc.Node
-		memname(&t2, gc.Types[gc.TUINT16])
-		gins(x86.AFSTCW, nil, &t1)
-		gins(x86.AMOVW, ncon(0xf7f), &t2)
-		gins(x86.AFLDCW, &t2, nil)
-		if tt == gc.TINT16 {
-			gins(x86.AFMOVWP, &r1, t)
-		} else if tt == gc.TINT32 {
-			gins(x86.AFMOVLP, &r1, t)
-		} else {
-			gins(x86.AFMOVVP, &r1, t)
-		}
-		gins(x86.AFLDCW, &t1, nil)
-		return
-
-		// convert via int32.
-	case gc.TFLOAT32<<16 | gc.TINT8,
-		gc.TFLOAT32<<16 | gc.TUINT16,
-		gc.TFLOAT32<<16 | gc.TUINT8,
-		gc.TFLOAT64<<16 | gc.TINT8,
-		gc.TFLOAT64<<16 | gc.TUINT16,
-		gc.TFLOAT64<<16 | gc.TUINT8:
-		var t1 gc.Node
-		gc.Tempname(&t1, gc.Types[gc.TINT32])
-
-		gmove(f, &t1)
-		switch tt {
-		default:
-			gc.Fatal("gmove %v", t)
-
-		case gc.TINT8:
-			gins(x86.ACMPL, &t1, ncon(-0x80&(1<<32-1)))
-			p1 := gc.Gbranch(optoas(gc.OLT, gc.Types[gc.TINT32]), nil, -1)
-			gins(x86.ACMPL, &t1, ncon(0x7f))
-			p2 := gc.Gbranch(optoas(gc.OGT, gc.Types[gc.TINT32]), nil, -1)
-			p3 := gc.Gbranch(obj.AJMP, nil, 0)
-			gc.Patch(p1, gc.Pc)
-			gc.Patch(p2, gc.Pc)
-			gmove(ncon(-0x80&(1<<32-1)), &t1)
-			gc.Patch(p3, gc.Pc)
-			gmove(&t1, t)
-
-		case gc.TUINT8:
-			gins(x86.ATESTL, ncon(0xffffff00), &t1)
-			p1 := gc.Gbranch(x86.AJEQ, nil, +1)
-			gins(x86.AMOVL, ncon(0), &t1)
-			gc.Patch(p1, gc.Pc)
-			gmove(&t1, t)
-
-		case gc.TUINT16:
-			gins(x86.ATESTL, ncon(0xffff0000), &t1)
-			p1 := gc.Gbranch(x86.AJEQ, nil, +1)
-			gins(x86.AMOVL, ncon(0), &t1)
-			gc.Patch(p1, gc.Pc)
-			gmove(&t1, t)
-		}
-
-		return
-
-		// convert via int64.
-	case gc.TFLOAT32<<16 | gc.TUINT32,
-		gc.TFLOAT64<<16 | gc.TUINT32:
-		cvt = gc.Types[gc.TINT64]
-
-		goto hardmem
-
-		/*
-		 * integer to float
-		 */
-	case gc.TINT16<<16 | gc.TFLOAT32,
-		gc.TINT16<<16 | gc.TFLOAT64,
-		gc.TINT32<<16 | gc.TFLOAT32,
-		gc.TINT32<<16 | gc.TFLOAT64,
-		gc.TINT64<<16 | gc.TFLOAT32,
-		gc.TINT64<<16 | gc.TFLOAT64:
-		if t.Op != gc.OREGISTER {
-			goto hard
-		}
-		if f.Op == gc.OREGISTER {
-			cvt = f.Type
-			goto hardmem
-		}
-
-		switch ft {
-		case gc.TINT16:
-			a = x86.AFMOVW
-
-		case gc.TINT32:
-			a = x86.AFMOVL
-
-		default:
-			a = x86.AFMOVV
-		}
-
-		// convert via int32 memory
-	case gc.TINT8<<16 | gc.TFLOAT32,
-		gc.TINT8<<16 | gc.TFLOAT64,
-		gc.TUINT16<<16 | gc.TFLOAT32,
-		gc.TUINT16<<16 | gc.TFLOAT64,
-		gc.TUINT8<<16 | gc.TFLOAT32,
-		gc.TUINT8<<16 | gc.TFLOAT64:
-		cvt = gc.Types[gc.TINT32]
-
-		goto hardmem
-
-		// convert via int64 memory
-	case gc.TUINT32<<16 | gc.TFLOAT32,
-		gc.TUINT32<<16 | gc.TFLOAT64:
-		cvt = gc.Types[gc.TINT64]
-
-		goto hardmem
-
-		// The way the code generator uses floating-point
-	// registers, a move from F0 to F0 is intended as a no-op.
-	// On the x86, it's not: it pushes a second copy of F0
-	// on the floating point stack.  So toss it away here.
-	// Also, F0 is the *only* register we ever evaluate
-	// into, so we should only see register/register as F0/F0.
-	/*
-	 * float to float
-	 */
-	case gc.TFLOAT32<<16 | gc.TFLOAT32,
-		gc.TFLOAT64<<16 | gc.TFLOAT64:
-		if gc.Ismem(f) && gc.Ismem(t) {
-			goto hard
-		}
-		if f.Op == gc.OREGISTER && t.Op == gc.OREGISTER {
-			if f.Reg != x86.REG_F0 || t.Reg != x86.REG_F0 {
-				goto fatal
-			}
-			return
-		}
-
-		a = x86.AFMOVF
-		if ft == gc.TFLOAT64 {
-			a = x86.AFMOVD
-		}
-		if gc.Ismem(t) {
-			if f.Op != gc.OREGISTER || f.Reg != x86.REG_F0 {
-				gc.Fatal("gmove %v", f)
-			}
-			a = x86.AFMOVFP
-			if ft == gc.TFLOAT64 {
-				a = x86.AFMOVDP
-			}
-		}
-
-	case gc.TFLOAT32<<16 | gc.TFLOAT64:
-		if gc.Ismem(f) && gc.Ismem(t) {
-			goto hard
-		}
-		if f.Op == gc.OREGISTER && t.Op == gc.OREGISTER {
-			if f.Reg != x86.REG_F0 || t.Reg != x86.REG_F0 {
-				goto fatal
-			}
-			return
-		}
-
-		if f.Op == gc.OREGISTER {
-			gins(x86.AFMOVDP, f, t)
-		} else {
-			gins(x86.AFMOVF, f, t)
-		}
-		return
-
-	case gc.TFLOAT64<<16 | gc.TFLOAT32:
-		if gc.Ismem(f) && gc.Ismem(t) {
-			goto hard
-		}
-		if f.Op == gc.OREGISTER && t.Op == gc.OREGISTER {
-			var r1 gc.Node
-			gc.Tempname(&r1, gc.Types[gc.TFLOAT32])
-			gins(x86.AFMOVFP, f, &r1)
-			gins(x86.AFMOVF, &r1, t)
-			return
-		}
-
-		if f.Op == gc.OREGISTER {
-			gins(x86.AFMOVFP, f, t)
-		} else {
-			gins(x86.AFMOVD, f, t)
-		}
-		return
-	}
-
-	gins(a, f, t)
-	return
-
-	// requires register intermediate
-hard:
-	gc.Regalloc(&r1, cvt, t)
-
-	gmove(f, &r1)
-	gmove(&r1, t)
-	gc.Regfree(&r1)
-	return
-
-	// requires memory intermediate
-hardmem:
-	gc.Tempname(&r1, cvt)
-
-	gmove(f, &r1)
-	gmove(&r1, t)
-	return
-
-	// should not happen
-fatal:
-	gc.Fatal("gmove %v -> %v", gc.Nconv(f, obj.FmtLong), gc.Nconv(t, obj.FmtLong))
-
-	return
-}
-
-func floatmove_sse(f *gc.Node, t *gc.Node) {
-	var r1 gc.Node
-	var cvt *gc.Type
-	var a int
-
-	ft := gc.Simsimtype(f.Type)
-	tt := gc.Simsimtype(t.Type)
-
-	switch uint32(ft)<<16 | uint32(tt) {
-	// should not happen
-	default:
-		gc.Fatal("gmove %v -> %v", f, t)
-
-		return
-
-		// convert via int32.
-	/*
-	* float to integer
-	 */
-	case gc.TFLOAT32<<16 | gc.TINT16,
-		gc.TFLOAT32<<16 | gc.TINT8,
-		gc.TFLOAT32<<16 | gc.TUINT16,
-		gc.TFLOAT32<<16 | gc.TUINT8,
-		gc.TFLOAT64<<16 | gc.TINT16,
-		gc.TFLOAT64<<16 | gc.TINT8,
-		gc.TFLOAT64<<16 | gc.TUINT16,
-		gc.TFLOAT64<<16 | gc.TUINT8:
-		cvt = gc.Types[gc.TINT32]
-
-		goto hard
-
-		// convert via int64.
-	case gc.TFLOAT32<<16 | gc.TUINT32,
-		gc.TFLOAT64<<16 | gc.TUINT32:
-		cvt = gc.Types[gc.TINT64]
-
-		goto hardmem
-
-	case gc.TFLOAT32<<16 | gc.TINT32:
-		a = x86.ACVTTSS2SL
-		goto rdst
-
-	case gc.TFLOAT64<<16 | gc.TINT32:
-		a = x86.ACVTTSD2SL
-		goto rdst
-
-		// convert via int32 memory
-	/*
-	 * integer to float
-	 */
-	case gc.TINT8<<16 | gc.TFLOAT32,
-		gc.TINT8<<16 | gc.TFLOAT64,
-		gc.TINT16<<16 | gc.TFLOAT32,
-		gc.TINT16<<16 | gc.TFLOAT64,
-		gc.TUINT16<<16 | gc.TFLOAT32,
-		gc.TUINT16<<16 | gc.TFLOAT64,
-		gc.TUINT8<<16 | gc.TFLOAT32,
-		gc.TUINT8<<16 | gc.TFLOAT64:
-		cvt = gc.Types[gc.TINT32]
-
-		goto hard
-
-		// convert via int64 memory
-	case gc.TUINT32<<16 | gc.TFLOAT32,
-		gc.TUINT32<<16 | gc.TFLOAT64:
-		cvt = gc.Types[gc.TINT64]
-
-		goto hardmem
-
-	case gc.TINT32<<16 | gc.TFLOAT32:
-		a = x86.ACVTSL2SS
-		goto rdst
-
-	case gc.TINT32<<16 | gc.TFLOAT64:
-		a = x86.ACVTSL2SD
-		goto rdst
-
-		/*
-		 * float to float
-		 */
-	case gc.TFLOAT32<<16 | gc.TFLOAT32:
-		a = x86.AMOVSS
-
-	case gc.TFLOAT64<<16 | gc.TFLOAT64:
-		a = x86.AMOVSD
-
-	case gc.TFLOAT32<<16 | gc.TFLOAT64:
-		a = x86.ACVTSS2SD
-		goto rdst
-
-	case gc.TFLOAT64<<16 | gc.TFLOAT32:
-		a = x86.ACVTSD2SS
-		goto rdst
-	}
-
-	gins(a, f, t)
-	return
-
-	// requires register intermediate
-hard:
-	gc.Regalloc(&r1, cvt, t)
-
-	gmove(f, &r1)
-	gmove(&r1, t)
-	gc.Regfree(&r1)
-	return
-
-	// requires memory intermediate
-hardmem:
-	gc.Tempname(&r1, cvt)
-
-	gmove(f, &r1)
-	gmove(&r1, t)
-	return
-
-	// requires register destination
-rdst:
-	gc.Regalloc(&r1, t.Type, t)
-
-	gins(a, f, &r1)
-	gmove(&r1, t)
-	gc.Regfree(&r1)
-	return
-}
-
-func samaddr(f *gc.Node, t *gc.Node) bool {
-	if f.Op != t.Op {
-		return false
-	}
-
-	switch f.Op {
-	case gc.OREGISTER:
-		if f.Reg != t.Reg {
-			break
-		}
-		return true
-	}
-
-	return false
-}
-
-/*
- * generate one instruction:
- *	as f, t
- */
-func gins(as int, f *gc.Node, t *gc.Node) *obj.Prog {
-	if as == x86.AFMOVF && f != nil && f.Op == gc.OREGISTER && t != nil && t.Op == gc.OREGISTER {
-		gc.Fatal("gins MOVF reg, reg")
-	}
-	if as == x86.ACVTSD2SS && f != nil && f.Op == gc.OLITERAL {
-		gc.Fatal("gins CVTSD2SS const")
-	}
-	if as == x86.AMOVSD && t != nil && t.Op == gc.OREGISTER && t.Reg == x86.REG_F0 {
-		gc.Fatal("gins MOVSD into F0")
-	}
-
-	if as == x86.AMOVL && f != nil && f.Op == gc.OADDR && f.Left.Op == gc.ONAME && f.Left.Class != gc.PEXTERN && f.Left.Class != gc.PFUNC {
-		// Turn MOVL $xxx(FP/SP) into LEAL xxx.
-		// These should be equivalent but most of the backend
-		// only expects to see LEAL, because that's what we had
-		// historically generated. Various hidden assumptions are baked in by now.
-		as = x86.ALEAL
-		f = f.Left
-	}
-
-	switch as {
-	case x86.AMOVB,
-		x86.AMOVW,
-		x86.AMOVL:
-		if f != nil && t != nil && samaddr(f, t) {
-			return nil
-		}
-
-	case x86.ALEAL:
-		if f != nil && gc.Isconst(f, gc.CTNIL) {
-			gc.Fatal("gins LEAL nil %v", f.Type)
-		}
-	}
-
-	p := gc.Prog(as)
-	gc.Naddr(&p.From, f)
-	gc.Naddr(&p.To, t)
-
-	if gc.Debug['g'] != 0 {
-		fmt.Printf("%v\n", p)
-	}
-
-	w := 0
-	switch as {
-	case x86.AMOVB:
-		w = 1
-
-	case x86.AMOVW:
-		w = 2
-
-	case x86.AMOVL:
-		w = 4
-	}
-
-	if true && w != 0 && f != nil && (p.From.Width > int64(w) || p.To.Width > int64(w)) {
-		gc.Dump("bad width from:", f)
-		gc.Dump("bad width to:", t)
-		gc.Fatal("bad width: %v (%d, %d)\n", p, p.From.Width, p.To.Width)
-	}
-
-	if p.To.Type == obj.TYPE_ADDR && w > 0 {
-		gc.Fatal("bad use of addr: %v", p)
-	}
-
-	return p
-}
-
-func ginsnop() {
-	var reg gc.Node
-	gc.Nodreg(&reg, gc.Types[gc.TINT], x86.REG_AX)
-	gins(x86.AXCHGL, &reg, &reg)
-}
-
-func dotaddable(n *gc.Node, n1 *gc.Node) bool {
-	if n.Op != gc.ODOT {
-		return false
-	}
-
-	var oary [10]int64
-	var nn *gc.Node
-	o := gc.Dotoffset(n, oary[:], &nn)
-	if nn != nil && nn.Addable && o == 1 && oary[0] >= 0 {
-		*n1 = *nn
-		n1.Type = n.Type
-		n1.Xoffset += oary[0]
-		return true
-	}
-
-	return false
-}
-
-func sudoclean() {
-}
-
-func sudoaddable(as int, n *gc.Node, a *obj.Addr) bool {
-	*a = obj.Addr{}
-	return false
-}
diff --git a/src/cmd/compile/internal/x86/peep.go b/src/cmd/compile/internal/x86/peep.go
deleted file mode 100644
index 8b50eab..0000000
--- a/src/cmd/compile/internal/x86/peep.go
+++ /dev/null
@@ -1,814 +0,0 @@
-// Derived from Inferno utils/6c/peep.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6c/peep.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package x86
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/x86"
-	"fmt"
-)
-
-const (
-	REGEXT      = 0
-	exregoffset = x86.REG_DI
-)
-
-var gactive uint32
-
-// do we need the carry bit
-func needc(p *obj.Prog) bool {
-	for p != nil {
-		if p.Info.Flags&gc.UseCarry != 0 {
-			return true
-		}
-		if p.Info.Flags&(gc.SetCarry|gc.KillCarry) != 0 {
-			return false
-		}
-		p = p.Link
-	}
-
-	return false
-}
-
-func rnops(r *gc.Flow) *gc.Flow {
-	if r != nil {
-		var p *obj.Prog
-		var r1 *gc.Flow
-		for {
-			p = r.Prog
-			if p.As != obj.ANOP || p.From.Type != obj.TYPE_NONE || p.To.Type != obj.TYPE_NONE {
-				break
-			}
-			r1 = gc.Uniqs(r)
-			if r1 == nil {
-				break
-			}
-			r = r1
-		}
-	}
-
-	return r
-}
-
-func peep(firstp *obj.Prog) {
-	g := gc.Flowstart(firstp, nil)
-	if g == nil {
-		return
-	}
-	gactive = 0
-
-	// byte, word arithmetic elimination.
-	elimshortmov(g)
-
-	// constant propagation
-	// find MOV $con,R followed by
-	// another MOV $con,R without
-	// setting R in the interim
-	var p *obj.Prog
-	for r := g.Start; r != nil; r = r.Link {
-		p = r.Prog
-		switch p.As {
-		case x86.ALEAL:
-			if regtyp(&p.To) {
-				if p.From.Sym != nil {
-					if p.From.Index == x86.REG_NONE {
-						conprop(r)
-					}
-				}
-			}
-
-		case x86.AMOVB,
-			x86.AMOVW,
-			x86.AMOVL,
-			x86.AMOVSS,
-			x86.AMOVSD:
-			if regtyp(&p.To) {
-				if p.From.Type == obj.TYPE_CONST || p.From.Type == obj.TYPE_FCONST {
-					conprop(r)
-				}
-			}
-		}
-	}
-
-	var r1 *gc.Flow
-	var p1 *obj.Prog
-	var r *gc.Flow
-	var t int
-loop1:
-	if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-		gc.Dumpit("loop1", g.Start, 0)
-	}
-
-	t = 0
-	for r = g.Start; r != nil; r = r.Link {
-		p = r.Prog
-		switch p.As {
-		case x86.AMOVL,
-			x86.AMOVSS,
-			x86.AMOVSD:
-			if regtyp(&p.To) {
-				if regtyp(&p.From) {
-					if copyprop(g, r) {
-						excise(r)
-						t++
-					} else if subprop(r) && copyprop(g, r) {
-						excise(r)
-						t++
-					}
-				}
-			}
-
-		case x86.AMOVBLZX,
-			x86.AMOVWLZX,
-			x86.AMOVBLSX,
-			x86.AMOVWLSX:
-			if regtyp(&p.To) {
-				r1 = rnops(gc.Uniqs(r))
-				if r1 != nil {
-					p1 = r1.Prog
-					if p.As == p1.As && p.To.Type == p1.From.Type && p.To.Reg == p1.From.Reg {
-						p1.As = x86.AMOVL
-						t++
-					}
-				}
-			}
-
-		case x86.AADDL,
-			x86.AADDW:
-			if p.From.Type != obj.TYPE_CONST || needc(p.Link) {
-				break
-			}
-			if p.From.Offset == -1 {
-				if p.As == x86.AADDL {
-					p.As = x86.ADECL
-				} else {
-					p.As = x86.ADECW
-				}
-				p.From = obj.Addr{}
-				break
-			}
-
-			if p.From.Offset == 1 {
-				if p.As == x86.AADDL {
-					p.As = x86.AINCL
-				} else {
-					p.As = x86.AINCW
-				}
-				p.From = obj.Addr{}
-				break
-			}
-
-		case x86.ASUBL,
-			x86.ASUBW:
-			if p.From.Type != obj.TYPE_CONST || needc(p.Link) {
-				break
-			}
-			if p.From.Offset == -1 {
-				if p.As == x86.ASUBL {
-					p.As = x86.AINCL
-				} else {
-					p.As = x86.AINCW
-				}
-				p.From = obj.Addr{}
-				break
-			}
-
-			if p.From.Offset == 1 {
-				if p.As == x86.ASUBL {
-					p.As = x86.ADECL
-				} else {
-					p.As = x86.ADECW
-				}
-				p.From = obj.Addr{}
-				break
-			}
-		}
-	}
-
-	if t != 0 {
-		goto loop1
-	}
-
-	// MOVSD removal.
-	// We never use packed registers, so a MOVSD between registers
-	// can be replaced by MOVAPD, which moves the pair of float64s
-	// instead of just the lower one.  We only use the lower one, but
-	// the processor can do better if we do moves using both.
-	for r := g.Start; r != nil; r = r.Link {
-		p = r.Prog
-		if p.As == x86.AMOVSD {
-			if regtyp(&p.From) {
-				if regtyp(&p.To) {
-					p.As = x86.AMOVAPD
-				}
-			}
-		}
-	}
-
-	gc.Flowend(g)
-}
-
-func excise(r *gc.Flow) {
-	p := r.Prog
-	if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-		fmt.Printf("%v ===delete===\n", p)
-	}
-
-	obj.Nopout(p)
-
-	gc.Ostats.Ndelmov++
-}
-
-func regtyp(a *obj.Addr) bool {
-	return a.Type == obj.TYPE_REG && (x86.REG_AX <= a.Reg && a.Reg <= x86.REG_DI || x86.REG_X0 <= a.Reg && a.Reg <= x86.REG_X7)
-}
-
-// movb elimination.
-// movb is simulated by the linker
-// when a register other than ax, bx, cx, dx
-// is used, so rewrite to other instructions
-// when possible.  a movb into a register
-// can smash the entire 64-bit register without
-// causing any trouble.
-func elimshortmov(g *gc.Graph) {
-	var p *obj.Prog
-
-	for r := g.Start; r != nil; r = r.Link {
-		p = r.Prog
-		if regtyp(&p.To) {
-			switch p.As {
-			case x86.AINCB,
-				x86.AINCW:
-				p.As = x86.AINCL
-
-			case x86.ADECB,
-				x86.ADECW:
-				p.As = x86.ADECL
-
-			case x86.ANEGB,
-				x86.ANEGW:
-				p.As = x86.ANEGL
-
-			case x86.ANOTB,
-				x86.ANOTW:
-				p.As = x86.ANOTL
-			}
-
-			if regtyp(&p.From) || p.From.Type == obj.TYPE_CONST {
-				// move or artihmetic into partial register.
-				// from another register or constant can be movl.
-				// we don't switch to 32-bit arithmetic if it can
-				// change how the carry bit is set (and the carry bit is needed).
-				switch p.As {
-				case x86.AMOVB,
-					x86.AMOVW:
-					p.As = x86.AMOVL
-
-				case x86.AADDB,
-					x86.AADDW:
-					if !needc(p.Link) {
-						p.As = x86.AADDL
-					}
-
-				case x86.ASUBB,
-					x86.ASUBW:
-					if !needc(p.Link) {
-						p.As = x86.ASUBL
-					}
-
-				case x86.AMULB,
-					x86.AMULW:
-					p.As = x86.AMULL
-
-				case x86.AIMULB,
-					x86.AIMULW:
-					p.As = x86.AIMULL
-
-				case x86.AANDB,
-					x86.AANDW:
-					p.As = x86.AANDL
-
-				case x86.AORB,
-					x86.AORW:
-					p.As = x86.AORL
-
-				case x86.AXORB,
-					x86.AXORW:
-					p.As = x86.AXORL
-
-				case x86.ASHLB,
-					x86.ASHLW:
-					p.As = x86.ASHLL
-				}
-			} else {
-				// explicit zero extension
-				switch p.As {
-				case x86.AMOVB:
-					p.As = x86.AMOVBLZX
-
-				case x86.AMOVW:
-					p.As = x86.AMOVWLZX
-				}
-			}
-		}
-	}
-}
-
-/*
- * the idea is to substitute
- * one register for another
- * from one MOV to another
- *	MOV	a, R0
- *	ADD	b, R0	/ no use of R1
- *	MOV	R0, R1
- * would be converted to
- *	MOV	a, R1
- *	ADD	b, R1
- *	MOV	R1, R0
- * hopefully, then the former or latter MOV
- * will be eliminated by copy propagation.
- */
-func subprop(r0 *gc.Flow) bool {
-	p := r0.Prog
-	v1 := &p.From
-	if !regtyp(v1) {
-		return false
-	}
-	v2 := &p.To
-	if !regtyp(v2) {
-		return false
-	}
-	for r := gc.Uniqp(r0); r != nil; r = gc.Uniqp(r) {
-		if gc.Debug['P'] != 0 && gc.Debug['v'] != 0 {
-			fmt.Printf("\t? %v\n", r.Prog)
-		}
-		if gc.Uniqs(r) == nil {
-			break
-		}
-		p = r.Prog
-		if p.As == obj.AVARDEF || p.As == obj.AVARKILL {
-			continue
-		}
-		if p.Info.Flags&gc.Call != 0 {
-			return false
-		}
-
-		if p.Info.Reguse|p.Info.Regset != 0 {
-			return false
-		}
-
-		if (p.Info.Flags&gc.Move != 0) && (p.Info.Flags&(gc.SizeL|gc.SizeQ|gc.SizeF|gc.SizeD) != 0) && p.To.Type == v1.Type && p.To.Reg == v1.Reg {
-			copysub(&p.To, v1, v2, 1)
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("gotit: %v->%v\n%v", gc.Ctxt.Dconv(v1), gc.Ctxt.Dconv(v2), r.Prog)
-				if p.From.Type == v2.Type && p.From.Reg == v2.Reg {
-					fmt.Printf(" excise")
-				}
-				fmt.Printf("\n")
-			}
-
-			for r = gc.Uniqs(r); r != r0; r = gc.Uniqs(r) {
-				p = r.Prog
-				copysub(&p.From, v1, v2, 1)
-				copysub(&p.To, v1, v2, 1)
-				if gc.Debug['P'] != 0 {
-					fmt.Printf("%v\n", r.Prog)
-				}
-			}
-
-			t := int(v1.Reg)
-			v1.Reg = v2.Reg
-			v2.Reg = int16(t)
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("%v last\n", r.Prog)
-			}
-			return true
-		}
-
-		if copyau(&p.From, v2) || copyau(&p.To, v2) {
-			break
-		}
-		if copysub(&p.From, v1, v2, 0) != 0 || copysub(&p.To, v1, v2, 0) != 0 {
-			break
-		}
-	}
-
-	return false
-}
-
-/*
- * The idea is to remove redundant copies.
- *	v1->v2	F=0
- *	(use v2	s/v2/v1/)*
- *	set v1	F=1
- *	use v2	return fail
- *	-----------------
- *	v1->v2	F=0
- *	(use v2	s/v2/v1/)*
- *	set v1	F=1
- *	set v2	return success
- */
-func copyprop(g *gc.Graph, r0 *gc.Flow) bool {
-	p := r0.Prog
-	v1 := &p.From
-	v2 := &p.To
-	if copyas(v1, v2) {
-		return true
-	}
-	gactive++
-	return copy1(v1, v2, r0.S1, 0)
-}
-
-func copy1(v1 *obj.Addr, v2 *obj.Addr, r *gc.Flow, f int) bool {
-	if uint32(r.Active) == gactive {
-		if gc.Debug['P'] != 0 {
-			fmt.Printf("act set; return 1\n")
-		}
-		return true
-	}
-
-	r.Active = int32(gactive)
-	if gc.Debug['P'] != 0 {
-		fmt.Printf("copy %v->%v f=%d\n", gc.Ctxt.Dconv(v1), gc.Ctxt.Dconv(v2), f)
-	}
-	var t int
-	var p *obj.Prog
-	for ; r != nil; r = r.S1 {
-		p = r.Prog
-		if gc.Debug['P'] != 0 {
-			fmt.Printf("%v", p)
-		}
-		if f == 0 && gc.Uniqp(r) == nil {
-			f = 1
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("; merge; f=%d", f)
-			}
-		}
-
-		t = copyu(p, v2, nil)
-		switch t {
-		case 2: /* rar, can't split */
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("; %v rar; return 0\n", gc.Ctxt.Dconv(v2))
-			}
-			return false
-
-		case 3: /* set */
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("; %v set; return 1\n", gc.Ctxt.Dconv(v2))
-			}
-			return true
-
-		case 1, /* used, substitute */
-			4: /* use and set */
-			if f != 0 {
-				if gc.Debug['P'] == 0 {
-					return false
-				}
-				if t == 4 {
-					fmt.Printf("; %v used+set and f=%d; return 0\n", gc.Ctxt.Dconv(v2), f)
-				} else {
-					fmt.Printf("; %v used and f=%d; return 0\n", gc.Ctxt.Dconv(v2), f)
-				}
-				return false
-			}
-
-			if copyu(p, v2, v1) != 0 {
-				if gc.Debug['P'] != 0 {
-					fmt.Printf("; sub fail; return 0\n")
-				}
-				return false
-			}
-
-			if gc.Debug['P'] != 0 {
-				fmt.Printf("; sub %v/%v", gc.Ctxt.Dconv(v2), gc.Ctxt.Dconv(v1))
-			}
-			if t == 4 {
-				if gc.Debug['P'] != 0 {
-					fmt.Printf("; %v used+set; return 1\n", gc.Ctxt.Dconv(v2))
-				}
-				return true
-			}
-		}
-
-		if f == 0 {
-			t = copyu(p, v1, nil)
-			if f == 0 && (t == 2 || t == 3 || t == 4) {
-				f = 1
-				if gc.Debug['P'] != 0 {
-					fmt.Printf("; %v set and !f; f=%d", gc.Ctxt.Dconv(v1), f)
-				}
-			}
-		}
-
-		if gc.Debug['P'] != 0 {
-			fmt.Printf("\n")
-		}
-		if r.S2 != nil {
-			if !copy1(v1, v2, r.S2, f) {
-				return false
-			}
-		}
-	}
-
-	return true
-}
-
-/*
- * return
- * 1 if v only used (and substitute),
- * 2 if read-alter-rewrite
- * 3 if set
- * 4 if set and used
- * 0 otherwise (not touched)
- */
-func copyu(p *obj.Prog, v *obj.Addr, s *obj.Addr) int {
-	switch p.As {
-	case obj.AJMP:
-		if s != nil {
-			if copysub(&p.To, v, s, 1) != 0 {
-				return 1
-			}
-			return 0
-		}
-
-		if copyau(&p.To, v) {
-			return 1
-		}
-		return 0
-
-	case obj.ARET:
-		if s != nil {
-			return 1
-		}
-		return 3
-
-	case obj.ACALL:
-		if REGEXT != 0 /*TypeKind(100016)*/ && v.Type == obj.TYPE_REG && v.Reg <= REGEXT && v.Reg > exregoffset {
-			return 2
-		}
-		if x86.REGARG >= 0 && v.Type == obj.TYPE_REG && v.Reg == x86.REGARG {
-			return 2
-		}
-		if v.Type == p.From.Type && v.Reg == p.From.Reg {
-			return 2
-		}
-
-		if s != nil {
-			if copysub(&p.To, v, s, 1) != 0 {
-				return 1
-			}
-			return 0
-		}
-
-		if copyau(&p.To, v) {
-			return 4
-		}
-		return 3
-
-	case obj.ATEXT:
-		if x86.REGARG >= 0 && v.Type == obj.TYPE_REG && v.Reg == x86.REGARG {
-			return 3
-		}
-		return 0
-	}
-
-	if p.As == obj.AVARDEF || p.As == obj.AVARKILL {
-		return 0
-	}
-
-	if (p.Info.Reguse|p.Info.Regset)&RtoB(int(v.Reg)) != 0 {
-		return 2
-	}
-
-	if p.Info.Flags&gc.LeftAddr != 0 {
-		if copyas(&p.From, v) {
-			return 2
-		}
-	}
-
-	if p.Info.Flags&(gc.RightRead|gc.RightWrite) == gc.RightRead|gc.RightWrite {
-		if copyas(&p.To, v) {
-			return 2
-		}
-	}
-
-	if p.Info.Flags&gc.RightWrite != 0 {
-		if copyas(&p.To, v) {
-			if s != nil {
-				return copysub(&p.From, v, s, 1)
-			}
-			if copyau(&p.From, v) {
-				return 4
-			}
-			return 3
-		}
-	}
-
-	if p.Info.Flags&(gc.LeftAddr|gc.LeftRead|gc.LeftWrite|gc.RightAddr|gc.RightRead|gc.RightWrite) != 0 {
-		if s != nil {
-			if copysub(&p.From, v, s, 1) != 0 {
-				return 1
-			}
-			return copysub(&p.To, v, s, 1)
-		}
-
-		if copyau(&p.From, v) {
-			return 1
-		}
-		if copyau(&p.To, v) {
-			return 1
-		}
-	}
-
-	return 0
-}
-
-/*
- * direct reference,
- * could be set/use depending on
- * semantics
- */
-func copyas(a *obj.Addr, v *obj.Addr) bool {
-	if x86.REG_AL <= a.Reg && a.Reg <= x86.REG_BL {
-		gc.Fatal("use of byte register")
-	}
-	if x86.REG_AL <= v.Reg && v.Reg <= x86.REG_BL {
-		gc.Fatal("use of byte register")
-	}
-
-	if a.Type != v.Type || a.Name != v.Name || a.Reg != v.Reg {
-		return false
-	}
-	if regtyp(v) {
-		return true
-	}
-	if (v.Type == obj.TYPE_MEM || v.Type == obj.TYPE_ADDR) && (v.Name == obj.NAME_AUTO || v.Name == obj.NAME_PARAM) {
-		if v.Offset == a.Offset {
-			return true
-		}
-	}
-	return false
-}
-
-func sameaddr(a *obj.Addr, v *obj.Addr) bool {
-	if a.Type != v.Type || a.Name != v.Name || a.Reg != v.Reg {
-		return false
-	}
-	if regtyp(v) {
-		return true
-	}
-	if (v.Type == obj.TYPE_MEM || v.Type == obj.TYPE_ADDR) && (v.Name == obj.NAME_AUTO || v.Name == obj.NAME_PARAM) {
-		if v.Offset == a.Offset {
-			return true
-		}
-	}
-	return false
-}
-
-/*
- * either direct or indirect
- */
-func copyau(a *obj.Addr, v *obj.Addr) bool {
-	if copyas(a, v) {
-		return true
-	}
-	if regtyp(v) {
-		if (a.Type == obj.TYPE_MEM || a.Type == obj.TYPE_ADDR) && a.Reg == v.Reg {
-			return true
-		}
-		if a.Index == v.Reg {
-			return true
-		}
-	}
-
-	return false
-}
-
-/*
- * substitute s for v in a
- * return failure to substitute
- */
-func copysub(a *obj.Addr, v *obj.Addr, s *obj.Addr, f int) int {
-	if copyas(a, v) {
-		reg := int(s.Reg)
-		if reg >= x86.REG_AX && reg <= x86.REG_DI || reg >= x86.REG_X0 && reg <= x86.REG_X7 {
-			if f != 0 {
-				a.Reg = int16(reg)
-			}
-		}
-
-		return 0
-	}
-
-	if regtyp(v) {
-		reg := int(v.Reg)
-		if (a.Type == obj.TYPE_MEM || a.Type == obj.TYPE_ADDR) && int(a.Reg) == reg {
-			if (s.Reg == x86.REG_BP) && a.Index != obj.TYPE_NONE {
-				return 1 /* can't use BP-base with index */
-			}
-			if f != 0 {
-				a.Reg = s.Reg
-			}
-		}
-
-		//			return 0;
-		if int(a.Index) == reg {
-			if f != 0 {
-				a.Index = s.Reg
-			}
-			return 0
-		}
-
-		return 0
-	}
-
-	return 0
-}
-
-func conprop(r0 *gc.Flow) {
-	var p *obj.Prog
-	var t int
-
-	p0 := r0.Prog
-	v0 := &p0.To
-	r := r0
-
-loop:
-	r = gc.Uniqs(r)
-	if r == nil || r == r0 {
-		return
-	}
-	if gc.Uniqp(r) == nil {
-		return
-	}
-
-	p = r.Prog
-	t = copyu(p, v0, nil)
-	switch t {
-	case 0, // miss
-		1: // use
-		goto loop
-
-	case 2, // rar
-		4: // use and set
-		break
-
-	case 3: // set
-		if p.As == p0.As {
-			if p.From.Type == p0.From.Type {
-				if p.From.Reg == p0.From.Reg {
-					if p.From.Node == p0.From.Node {
-						if p.From.Offset == p0.From.Offset {
-							if p.From.Scale == p0.From.Scale {
-								if p.From.Type == obj.TYPE_FCONST && p.From.Val.(float64) == p0.From.Val.(float64) {
-									if p.From.Index == p0.From.Index {
-										excise(r)
-										goto loop
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-	}
-}
-
-func smallindir(a *obj.Addr, reg *obj.Addr) bool {
-	return regtyp(reg) && a.Type == obj.TYPE_MEM && a.Reg == reg.Reg && a.Index == x86.REG_NONE && 0 <= a.Offset && a.Offset < 4096
-}
-
-func stackaddr(a *obj.Addr) bool {
-	return a.Type == obj.TYPE_REG && a.Reg == x86.REG_SP
-}
diff --git a/src/cmd/compile/internal/x86/prog.go b/src/cmd/compile/internal/x86/prog.go
deleted file mode 100644
index f96a1aa..0000000
--- a/src/cmd/compile/internal/x86/prog.go
+++ /dev/null
@@ -1,292 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package x86
-
-import (
-	"cmd/compile/internal/gc"
-	"cmd/internal/obj"
-	"cmd/internal/obj/x86"
-)
-
-var (
-	AX               = RtoB(x86.REG_AX)
-	BX               = RtoB(x86.REG_BX)
-	CX               = RtoB(x86.REG_CX)
-	DX               = RtoB(x86.REG_DX)
-	DI               = RtoB(x86.REG_DI)
-	SI               = RtoB(x86.REG_SI)
-	LeftRdwr  uint32 = gc.LeftRead | gc.LeftWrite
-	RightRdwr uint32 = gc.RightRead | gc.RightWrite
-)
-
-// This table gives the basic information about instruction
-// generated by the compiler and processed in the optimizer.
-// See opt.h for bit definitions.
-//
-// Instructions not generated need not be listed.
-// As an exception to that rule, we typically write down all the
-// size variants of an operation even if we just use a subset.
-//
-// The table is formatted for 8-space tabs.
-var progtable = [x86.ALAST]obj.ProgInfo{
-	obj.ATYPE:     {gc.Pseudo | gc.Skip, 0, 0, 0},
-	obj.ATEXT:     {gc.Pseudo, 0, 0, 0},
-	obj.AFUNCDATA: {gc.Pseudo, 0, 0, 0},
-	obj.APCDATA:   {gc.Pseudo, 0, 0, 0},
-	obj.AUNDEF:    {gc.Break, 0, 0, 0},
-	obj.AUSEFIELD: {gc.OK, 0, 0, 0},
-	obj.ACHECKNIL: {gc.LeftRead, 0, 0, 0},
-	obj.AVARDEF:   {gc.Pseudo | gc.RightWrite, 0, 0, 0},
-	obj.AVARKILL:  {gc.Pseudo | gc.RightWrite, 0, 0, 0},
-
-	// NOP is an internal no-op that also stands
-	// for USED and SET annotations, not the Intel opcode.
-	obj.ANOP:       {gc.LeftRead | gc.RightWrite, 0, 0, 0},
-	x86.AADCL:      {gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.AADCW:      {gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.AADDB:      {gc.SizeB | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.AADDL:      {gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.AADDW:      {gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.AADDSD:     {gc.SizeD | gc.LeftRead | RightRdwr, 0, 0, 0},
-	x86.AADDSS:     {gc.SizeF | gc.LeftRead | RightRdwr, 0, 0, 0},
-	x86.AANDB:      {gc.SizeB | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.AANDL:      {gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.AANDW:      {gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	obj.ACALL:      {gc.RightAddr | gc.Call | gc.KillCarry, 0, 0, 0},
-	x86.ACDQ:       {gc.OK, AX, AX | DX, 0},
-	x86.ACWD:       {gc.OK, AX, AX | DX, 0},
-	x86.ACLD:       {gc.OK, 0, 0, 0},
-	x86.ASTD:       {gc.OK, 0, 0, 0},
-	x86.ACMPB:      {gc.SizeB | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
-	x86.ACMPL:      {gc.SizeL | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
-	x86.ACMPW:      {gc.SizeW | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
-	x86.ACOMISD:    {gc.SizeD | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
-	x86.ACOMISS:    {gc.SizeF | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
-	x86.ACVTSD2SL:  {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.ACVTSD2SS:  {gc.SizeF | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.ACVTSL2SD:  {gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.ACVTSL2SS:  {gc.SizeF | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.ACVTSS2SD:  {gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.ACVTSS2SL:  {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.ACVTTSD2SL: {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.ACVTTSS2SL: {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.ADECB:      {gc.SizeB | RightRdwr, 0, 0, 0},
-	x86.ADECL:      {gc.SizeL | RightRdwr, 0, 0, 0},
-	x86.ADECW:      {gc.SizeW | RightRdwr, 0, 0, 0},
-	x86.ADIVB:      {gc.SizeB | gc.LeftRead | gc.SetCarry, AX, AX, 0},
-	x86.ADIVL:      {gc.SizeL | gc.LeftRead | gc.SetCarry, AX | DX, AX | DX, 0},
-	x86.ADIVW:      {gc.SizeW | gc.LeftRead | gc.SetCarry, AX | DX, AX | DX, 0},
-	x86.ADIVSD:     {gc.SizeD | gc.LeftRead | RightRdwr, 0, 0, 0},
-	x86.ADIVSS:     {gc.SizeF | gc.LeftRead | RightRdwr, 0, 0, 0},
-	x86.AFLDCW:     {gc.SizeW | gc.LeftAddr, 0, 0, 0},
-	x86.AFSTCW:     {gc.SizeW | gc.RightAddr, 0, 0, 0},
-	x86.AFSTSW:     {gc.SizeW | gc.RightAddr | gc.RightWrite, 0, 0, 0},
-	x86.AFADDD:     {gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0},
-	x86.AFADDDP:    {gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0},
-	x86.AFADDF:     {gc.SizeF | gc.LeftAddr | RightRdwr, 0, 0, 0},
-	x86.AFCOMD:     {gc.SizeD | gc.LeftAddr | gc.RightRead, 0, 0, 0},
-	x86.AFCOMDP:    {gc.SizeD | gc.LeftAddr | gc.RightRead, 0, 0, 0},
-	x86.AFCOMDPP:   {gc.SizeD | gc.LeftAddr | gc.RightRead, 0, 0, 0},
-	x86.AFCOMF:     {gc.SizeF | gc.LeftAddr | gc.RightRead, 0, 0, 0},
-	x86.AFCOMFP:    {gc.SizeF | gc.LeftAddr | gc.RightRead, 0, 0, 0},
-	x86.AFUCOMIP:   {gc.SizeF | gc.LeftAddr | gc.RightRead, 0, 0, 0},
-	x86.AFCHS:      {gc.SizeD | RightRdwr, 0, 0, 0}, // also SizeF
-
-	x86.AFDIVDP:  {gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0},
-	x86.AFDIVF:   {gc.SizeF | gc.LeftAddr | RightRdwr, 0, 0, 0},
-	x86.AFDIVD:   {gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0},
-	x86.AFDIVRDP: {gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0},
-	x86.AFDIVRF:  {gc.SizeF | gc.LeftAddr | RightRdwr, 0, 0, 0},
-	x86.AFDIVRD:  {gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0},
-	x86.AFXCHD:   {gc.SizeD | LeftRdwr | RightRdwr, 0, 0, 0},
-	x86.AFSUBD:   {gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0},
-	x86.AFSUBDP:  {gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0},
-	x86.AFSUBF:   {gc.SizeF | gc.LeftAddr | RightRdwr, 0, 0, 0},
-	x86.AFSUBRD:  {gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0},
-	x86.AFSUBRDP: {gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0},
-	x86.AFSUBRF:  {gc.SizeF | gc.LeftAddr | RightRdwr, 0, 0, 0},
-	x86.AFMOVD:   {gc.SizeD | gc.LeftAddr | gc.RightWrite, 0, 0, 0},
-	x86.AFMOVF:   {gc.SizeF | gc.LeftAddr | gc.RightWrite, 0, 0, 0},
-	x86.AFMOVL:   {gc.SizeL | gc.LeftAddr | gc.RightWrite, 0, 0, 0},
-	x86.AFMOVW:   {gc.SizeW | gc.LeftAddr | gc.RightWrite, 0, 0, 0},
-	x86.AFMOVV:   {gc.SizeQ | gc.LeftAddr | gc.RightWrite, 0, 0, 0},
-
-	// These instructions are marked as RightAddr
-	// so that the register optimizer does not try to replace the
-	// memory references with integer register references.
-	// But they do not use the previous value at the address, so
-	// we also mark them RightWrite.
-	x86.AFMOVDP:   {gc.SizeD | gc.LeftRead | gc.RightWrite | gc.RightAddr, 0, 0, 0},
-	x86.AFMOVFP:   {gc.SizeF | gc.LeftRead | gc.RightWrite | gc.RightAddr, 0, 0, 0},
-	x86.AFMOVLP:   {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.RightAddr, 0, 0, 0},
-	x86.AFMOVWP:   {gc.SizeW | gc.LeftRead | gc.RightWrite | gc.RightAddr, 0, 0, 0},
-	x86.AFMOVVP:   {gc.SizeQ | gc.LeftRead | gc.RightWrite | gc.RightAddr, 0, 0, 0},
-	x86.AFMULD:    {gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0},
-	x86.AFMULDP:   {gc.SizeD | gc.LeftAddr | RightRdwr, 0, 0, 0},
-	x86.AFMULF:    {gc.SizeF | gc.LeftAddr | RightRdwr, 0, 0, 0},
-	x86.AIDIVB:    {gc.SizeB | gc.LeftRead | gc.SetCarry, AX, AX, 0},
-	x86.AIDIVL:    {gc.SizeL | gc.LeftRead | gc.SetCarry, AX | DX, AX | DX, 0},
-	x86.AIDIVW:    {gc.SizeW | gc.LeftRead | gc.SetCarry, AX | DX, AX | DX, 0},
-	x86.AIMULB:    {gc.SizeB | gc.LeftRead | gc.SetCarry, AX, AX, 0},
-	x86.AIMULL:    {gc.SizeL | gc.LeftRead | gc.ImulAXDX | gc.SetCarry, 0, 0, 0},
-	x86.AIMULW:    {gc.SizeW | gc.LeftRead | gc.ImulAXDX | gc.SetCarry, 0, 0, 0},
-	x86.AINCB:     {gc.SizeB | RightRdwr, 0, 0, 0},
-	x86.AINCL:     {gc.SizeL | RightRdwr, 0, 0, 0},
-	x86.AINCW:     {gc.SizeW | RightRdwr, 0, 0, 0},
-	x86.AJCC:      {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJCS:      {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJEQ:      {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJGE:      {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJGT:      {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJHI:      {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJLE:      {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJLS:      {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJLT:      {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJMI:      {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJNE:      {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJOC:      {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJOS:      {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJPC:      {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJPL:      {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	x86.AJPS:      {gc.Cjmp | gc.UseCarry, 0, 0, 0},
-	obj.AJMP:      {gc.Jump | gc.Break | gc.KillCarry, 0, 0, 0},
-	x86.ALEAL:     {gc.LeftAddr | gc.RightWrite, 0, 0, 0},
-	x86.AMOVBLSX:  {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.AMOVBLZX:  {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.AMOVBWSX:  {gc.SizeW | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.AMOVBWZX:  {gc.SizeW | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.AMOVWLSX:  {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.AMOVWLZX:  {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Conv, 0, 0, 0},
-	x86.AMOVB:     {gc.SizeB | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
-	x86.AMOVL:     {gc.SizeL | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
-	x86.AMOVW:     {gc.SizeW | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
-	x86.AMOVSB:    {gc.OK, DI | SI, DI | SI, 0},
-	x86.AMOVSL:    {gc.OK, DI | SI, DI | SI, 0},
-	x86.AMOVSW:    {gc.OK, DI | SI, DI | SI, 0},
-	obj.ADUFFCOPY: {gc.OK, DI | SI, DI | SI | CX, 0},
-	x86.AMOVSD:    {gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
-	x86.AMOVSS:    {gc.SizeF | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
-
-	// We use MOVAPD as a faster synonym for MOVSD.
-	x86.AMOVAPD:   {gc.SizeD | gc.LeftRead | gc.RightWrite | gc.Move, 0, 0, 0},
-	x86.AMULB:     {gc.SizeB | gc.LeftRead | gc.SetCarry, AX, AX, 0},
-	x86.AMULL:     {gc.SizeL | gc.LeftRead | gc.SetCarry, AX, AX | DX, 0},
-	x86.AMULW:     {gc.SizeW | gc.LeftRead | gc.SetCarry, AX, AX | DX, 0},
-	x86.AMULSD:    {gc.SizeD | gc.LeftRead | RightRdwr, 0, 0, 0},
-	x86.AMULSS:    {gc.SizeF | gc.LeftRead | RightRdwr, 0, 0, 0},
-	x86.ANEGB:     {gc.SizeB | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.ANEGL:     {gc.SizeL | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.ANEGW:     {gc.SizeW | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.ANOTB:     {gc.SizeB | RightRdwr, 0, 0, 0},
-	x86.ANOTL:     {gc.SizeL | RightRdwr, 0, 0, 0},
-	x86.ANOTW:     {gc.SizeW | RightRdwr, 0, 0, 0},
-	x86.AORB:      {gc.SizeB | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.AORL:      {gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.AORW:      {gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.APOPL:     {gc.SizeL | gc.RightWrite, 0, 0, 0},
-	x86.APUSHL:    {gc.SizeL | gc.LeftRead, 0, 0, 0},
-	x86.ARCLB:     {gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.ARCLL:     {gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.ARCLW:     {gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.ARCRB:     {gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.ARCRL:     {gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.ARCRW:     {gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.AREP:      {gc.OK, CX, CX, 0},
-	x86.AREPN:     {gc.OK, CX, CX, 0},
-	obj.ARET:      {gc.Break | gc.KillCarry, 0, 0, 0},
-	x86.AROLB:     {gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.AROLL:     {gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.AROLW:     {gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ARORB:     {gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ARORL:     {gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ARORW:     {gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASAHF:     {gc.OK, AX, AX, 0},
-	x86.ASALB:     {gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASALL:     {gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASALW:     {gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASARB:     {gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASARL:     {gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASARW:     {gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASBBB:     {gc.SizeB | gc.LeftRead | RightRdwr | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.ASBBL:     {gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.ASBBW:     {gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry | gc.UseCarry, 0, 0, 0},
-	x86.ASETCC:    {gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
-	x86.ASETCS:    {gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
-	x86.ASETEQ:    {gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
-	x86.ASETGE:    {gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
-	x86.ASETGT:    {gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
-	x86.ASETHI:    {gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
-	x86.ASETLE:    {gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
-	x86.ASETLS:    {gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
-	x86.ASETLT:    {gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
-	x86.ASETMI:    {gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
-	x86.ASETNE:    {gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
-	x86.ASETOC:    {gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
-	x86.ASETOS:    {gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
-	x86.ASETPC:    {gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
-	x86.ASETPL:    {gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
-	x86.ASETPS:    {gc.SizeB | RightRdwr | gc.UseCarry, 0, 0, 0},
-	x86.ASHLB:     {gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASHLL:     {gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASHLW:     {gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASHRB:     {gc.SizeB | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASHRL:     {gc.SizeL | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASHRW:     {gc.SizeW | gc.LeftRead | RightRdwr | gc.ShiftCX | gc.SetCarry, 0, 0, 0},
-	x86.ASTOSB:    {gc.OK, AX | DI, DI, 0},
-	x86.ASTOSL:    {gc.OK, AX | DI, DI, 0},
-	x86.ASTOSW:    {gc.OK, AX | DI, DI, 0},
-	obj.ADUFFZERO: {gc.OK, AX | DI, DI, 0},
-	x86.ASUBB:     {gc.SizeB | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.ASUBL:     {gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.ASUBW:     {gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.ASUBSD:    {gc.SizeD | gc.LeftRead | RightRdwr, 0, 0, 0},
-	x86.ASUBSS:    {gc.SizeF | gc.LeftRead | RightRdwr, 0, 0, 0},
-	x86.ATESTB:    {gc.SizeB | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
-	x86.ATESTL:    {gc.SizeL | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
-	x86.ATESTW:    {gc.SizeW | gc.LeftRead | gc.RightRead | gc.SetCarry, 0, 0, 0},
-	x86.AUCOMISD:  {gc.SizeD | gc.LeftRead | gc.RightRead, 0, 0, 0},
-	x86.AUCOMISS:  {gc.SizeF | gc.LeftRead | gc.RightRead, 0, 0, 0},
-	x86.AXCHGB:    {gc.SizeB | LeftRdwr | RightRdwr, 0, 0, 0},
-	x86.AXCHGL:    {gc.SizeL | LeftRdwr | RightRdwr, 0, 0, 0},
-	x86.AXCHGW:    {gc.SizeW | LeftRdwr | RightRdwr, 0, 0, 0},
-	x86.AXORB:     {gc.SizeB | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.AXORL:     {gc.SizeL | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-	x86.AXORW:     {gc.SizeW | gc.LeftRead | RightRdwr | gc.SetCarry, 0, 0, 0},
-}
-
-func proginfo(p *obj.Prog) {
-	info := &p.Info
-	*info = progtable[p.As]
-	if info.Flags == 0 {
-		gc.Fatal("unknown instruction %v", p)
-	}
-
-	if (info.Flags&gc.ShiftCX != 0) && p.From.Type != obj.TYPE_CONST {
-		info.Reguse |= CX
-	}
-
-	if info.Flags&gc.ImulAXDX != 0 {
-		if p.To.Type == obj.TYPE_NONE {
-			info.Reguse |= AX
-			info.Regset |= AX | DX
-		} else {
-			info.Flags |= RightRdwr
-		}
-	}
-
-	// Addressing makes some registers used.
-	if p.From.Type == obj.TYPE_MEM && p.From.Name == obj.NAME_NONE {
-		info.Regindex |= RtoB(int(p.From.Reg))
-	}
-	if p.From.Index != x86.REG_NONE {
-		info.Regindex |= RtoB(int(p.From.Index))
-	}
-	if p.To.Type == obj.TYPE_MEM && p.To.Name == obj.NAME_NONE {
-		info.Regindex |= RtoB(int(p.To.Reg))
-	}
-	if p.To.Index != x86.REG_NONE {
-		info.Regindex |= RtoB(int(p.To.Index))
-	}
-}
diff --git a/src/cmd/compile/internal/x86/reg.go b/src/cmd/compile/internal/x86/reg.go
deleted file mode 100644
index b3a5fdf..0000000
--- a/src/cmd/compile/internal/x86/reg.go
+++ /dev/null
@@ -1,110 +0,0 @@
-// Derived from Inferno utils/6c/reg.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6c/reg.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package x86
-
-import "cmd/internal/obj/x86"
-import "cmd/compile/internal/gc"
-
-const (
-	NREGVAR = 16 /* 8 integer + 8 floating */
-)
-
-var regname = []string{
-	".ax",
-	".cx",
-	".dx",
-	".bx",
-	".sp",
-	".bp",
-	".si",
-	".di",
-	".x0",
-	".x1",
-	".x2",
-	".x3",
-	".x4",
-	".x5",
-	".x6",
-	".x7",
-}
-
-func regnames(n *int) []string {
-	*n = NREGVAR
-	return regname
-}
-
-func excludedregs() uint64 {
-	return RtoB(x86.REG_SP)
-}
-
-func doregbits(r int) uint64 {
-	b := uint64(0)
-	if r >= x86.REG_AX && r <= x86.REG_DI {
-		b |= RtoB(r)
-	} else if r >= x86.REG_AL && r <= x86.REG_BL {
-		b |= RtoB(r - x86.REG_AL + x86.REG_AX)
-	} else if r >= x86.REG_AH && r <= x86.REG_BH {
-		b |= RtoB(r - x86.REG_AH + x86.REG_AX)
-	} else if r >= x86.REG_X0 && r <= x86.REG_X0+7 {
-		b |= FtoB(r)
-	}
-	return b
-}
-
-func RtoB(r int) uint64 {
-	if r < x86.REG_AX || r > x86.REG_DI {
-		return 0
-	}
-	return 1 << uint(r-x86.REG_AX)
-}
-
-func BtoR(b uint64) int {
-	b &= 0xff
-	if b == 0 {
-		return 0
-	}
-	return gc.Bitno(b) + x86.REG_AX
-}
-
-func FtoB(f int) uint64 {
-	if f < x86.REG_X0 || f > x86.REG_X7 {
-		return 0
-	}
-	return 1 << uint(f-x86.REG_X0+8)
-}
-
-func BtoF(b uint64) int {
-	b &= 0xFF00
-	if b == 0 {
-		return 0
-	}
-	return gc.Bitno(b) - 8 + x86.REG_X0
-}
diff --git a/src/cmd/compile/main.go b/src/cmd/compile/main.go
deleted file mode 100644
index 7b69c34..0000000
--- a/src/cmd/compile/main.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
-	"cmd/compile/internal/amd64"
-	"cmd/compile/internal/arm"
-	"cmd/compile/internal/arm64"
-	"cmd/compile/internal/ppc64"
-	"cmd/compile/internal/x86"
-	"cmd/internal/obj"
-	"fmt"
-	"os"
-)
-
-func main() {
-	switch obj.Getgoarch() {
-	default:
-		fmt.Fprintf(os.Stderr, "compile: unknown architecture %q\n", obj.Getgoarch())
-		os.Exit(2)
-	case "386":
-		x86.Main()
-	case "amd64", "amd64p32":
-		amd64.Main()
-	case "arm":
-		arm.Main()
-	case "arm64":
-		arm64.Main()
-	case "ppc64", "ppc64le":
-		ppc64.Main()
-	}
-}
diff --git a/src/cmd/cover/cover.go b/src/cmd/cover/cover.go
deleted file mode 100644
index 31ec434..0000000
--- a/src/cmd/cover/cover.go
+++ /dev/null
@@ -1,722 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
-	"bytes"
-	"flag"
-	"fmt"
-	"go/ast"
-	"go/parser"
-	"go/printer"
-	"go/token"
-	"io"
-	"io/ioutil"
-	"log"
-	"os"
-	"path/filepath"
-	"sort"
-	"strconv"
-	"strings"
-)
-
-const usageMessage = "" +
-	`Usage of 'go tool cover':
-Given a coverage profile produced by 'go test':
-	go test -coverprofile=c.out
-
-Open a web browser displaying annotated source code:
-	go tool cover -html=c.out
-
-Write out an HTML file instead of launching a web browser:
-	go tool cover -html=c.out -o coverage.html
-
-Display coverage percentages to stdout for each function:
-	go tool cover -func=c.out
-
-Finally, to generate modified source code with coverage annotations
-(what go test -cover does):
-	go tool cover -mode=set -var=CoverageVariableName program.go
-`
-
-func usage() {
-	fmt.Fprintln(os.Stderr, usageMessage)
-	fmt.Fprintln(os.Stderr, "Flags:")
-	flag.PrintDefaults()
-	fmt.Fprintln(os.Stderr, "\n  Only one of -html, -func, or -mode may be set.")
-	os.Exit(2)
-}
-
-var (
-	mode    = flag.String("mode", "", "coverage mode: set, count, atomic")
-	varVar  = flag.String("var", "GoCover", "name of coverage variable to generate")
-	output  = flag.String("o", "", "file for output; default: stdout")
-	htmlOut = flag.String("html", "", "generate HTML representation of coverage profile")
-	funcOut = flag.String("func", "", "output coverage profile information for each function")
-)
-
-var profile string // The profile to read; the value of -html or -func
-
-var counterStmt func(*File, ast.Expr) ast.Stmt
-
-const (
-	atomicPackagePath = "sync/atomic"
-	atomicPackageName = "_cover_atomic_"
-)
-
-func main() {
-	flag.Usage = usage
-	flag.Parse()
-
-	// Usage information when no arguments.
-	if flag.NFlag() == 0 && flag.NArg() == 0 {
-		flag.Usage()
-	}
-
-	err := parseFlags()
-	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
-		fmt.Fprintln(os.Stderr, `For usage information, run "go tool cover -help"`)
-		os.Exit(2)
-	}
-
-	// Generate coverage-annotated source.
-	if *mode != "" {
-		annotate(flag.Arg(0))
-		return
-	}
-
-	// Output HTML or function coverage information.
-	if *htmlOut != "" {
-		err = htmlOutput(profile, *output)
-	} else {
-		err = funcOutput(profile, *output)
-	}
-
-	if err != nil {
-		fmt.Fprintf(os.Stderr, "cover: %v\n", err)
-		os.Exit(2)
-	}
-}
-
-// parseFlags sets the profile and counterStmt globals and performs validations.
-func parseFlags() error {
-	profile = *htmlOut
-	if *funcOut != "" {
-		if profile != "" {
-			return fmt.Errorf("too many options")
-		}
-		profile = *funcOut
-	}
-
-	// Must either display a profile or rewrite Go source.
-	if (profile == "") == (*mode == "") {
-		return fmt.Errorf("too many options")
-	}
-
-	if *mode != "" {
-		switch *mode {
-		case "set":
-			counterStmt = setCounterStmt
-		case "count":
-			counterStmt = incCounterStmt
-		case "atomic":
-			counterStmt = atomicCounterStmt
-		default:
-			return fmt.Errorf("unknown -mode %v", *mode)
-		}
-
-		if flag.NArg() == 0 {
-			return fmt.Errorf("missing source file")
-		} else if flag.NArg() == 1 {
-			return nil
-		}
-	} else if flag.NArg() == 0 {
-		return nil
-	}
-	return fmt.Errorf("too many arguments")
-}
-
-// Block represents the information about a basic block to be recorded in the analysis.
-// Note: Our definition of basic block is based on control structures; we don't break
-// apart && and ||. We could but it doesn't seem important enough to bother.
-type Block struct {
-	startByte token.Pos
-	endByte   token.Pos
-	numStmt   int
-}
-
-// File is a wrapper for the state of a file used in the parser.
-// The basic parse tree walker is a method of this type.
-type File struct {
-	fset      *token.FileSet
-	name      string // Name of file.
-	astFile   *ast.File
-	blocks    []Block
-	atomicPkg string // Package name for "sync/atomic" in this file.
-}
-
-// Visit implements the ast.Visitor interface.
-func (f *File) Visit(node ast.Node) ast.Visitor {
-	switch n := node.(type) {
-	case *ast.BlockStmt:
-		// If it's a switch or select, the body is a list of case clauses; don't tag the block itself.
-		if len(n.List) > 0 {
-			switch n.List[0].(type) {
-			case *ast.CaseClause: // switch
-				for _, n := range n.List {
-					clause := n.(*ast.CaseClause)
-					clause.Body = f.addCounters(clause.Pos(), clause.End(), clause.Body, false)
-				}
-				return f
-			case *ast.CommClause: // select
-				for _, n := range n.List {
-					clause := n.(*ast.CommClause)
-					clause.Body = f.addCounters(clause.Pos(), clause.End(), clause.Body, false)
-				}
-				return f
-			}
-		}
-		n.List = f.addCounters(n.Lbrace, n.Rbrace+1, n.List, true) // +1 to step past closing brace.
-	case *ast.IfStmt:
-		ast.Walk(f, n.Body)
-		if n.Else == nil {
-			return nil
-		}
-		// The elses are special, because if we have
-		//	if x {
-		//	} else if y {
-		//	}
-		// we want to cover the "if y". To do this, we need a place to drop the counter,
-		// so we add a hidden block:
-		//	if x {
-		//	} else {
-		//		if y {
-		//		}
-		//	}
-		switch stmt := n.Else.(type) {
-		case *ast.IfStmt:
-			block := &ast.BlockStmt{
-				Lbrace: n.Body.End(), // Start at end of the "if" block so the covered part looks like it starts at the "else".
-				List:   []ast.Stmt{stmt},
-				Rbrace: stmt.End(),
-			}
-			n.Else = block
-		case *ast.BlockStmt:
-			stmt.Lbrace = n.Body.End() // Start at end of the "if" block so the covered part looks like it starts at the "else".
-		default:
-			panic("unexpected node type in if")
-		}
-		ast.Walk(f, n.Else)
-		return nil
-	case *ast.SelectStmt:
-		// Don't annotate an empty select - creates a syntax error.
-		if n.Body == nil || len(n.Body.List) == 0 {
-			return nil
-		}
-	case *ast.SwitchStmt:
-		// Don't annotate an empty switch - creates a syntax error.
-		if n.Body == nil || len(n.Body.List) == 0 {
-			return nil
-		}
-	case *ast.TypeSwitchStmt:
-		// Don't annotate an empty type switch - creates a syntax error.
-		if n.Body == nil || len(n.Body.List) == 0 {
-			return nil
-		}
-	}
-	return f
-}
-
-// unquote returns the unquoted string.
-func unquote(s string) string {
-	t, err := strconv.Unquote(s)
-	if err != nil {
-		log.Fatalf("cover: improperly quoted string %q\n", s)
-	}
-	return t
-}
-
-// addImport adds an import for the specified path, if one does not already exist, and returns
-// the local package name.
-func (f *File) addImport(path string) string {
-	// Does the package already import it?
-	for _, s := range f.astFile.Imports {
-		if unquote(s.Path.Value) == path {
-			if s.Name != nil {
-				return s.Name.Name
-			}
-			return filepath.Base(path)
-		}
-	}
-	newImport := &ast.ImportSpec{
-		Name: ast.NewIdent(atomicPackageName),
-		Path: &ast.BasicLit{
-			Kind:  token.STRING,
-			Value: fmt.Sprintf("%q", path),
-		},
-	}
-	impDecl := &ast.GenDecl{
-		Tok: token.IMPORT,
-		Specs: []ast.Spec{
-			newImport,
-		},
-	}
-	// Make the new import the first Decl in the file.
-	astFile := f.astFile
-	astFile.Decls = append(astFile.Decls, nil)
-	copy(astFile.Decls[1:], astFile.Decls[0:])
-	astFile.Decls[0] = impDecl
-	astFile.Imports = append(astFile.Imports, newImport)
-
-	// Now refer to the package, just in case it ends up unused.
-	// That is, append to the end of the file the declaration
-	//	var _ = _cover_atomic_.AddUint32
-	reference := &ast.GenDecl{
-		Tok: token.VAR,
-		Specs: []ast.Spec{
-			&ast.ValueSpec{
-				Names: []*ast.Ident{
-					ast.NewIdent("_"),
-				},
-				Values: []ast.Expr{
-					&ast.SelectorExpr{
-						X:   ast.NewIdent(atomicPackageName),
-						Sel: ast.NewIdent("AddUint32"),
-					},
-				},
-			},
-		},
-	}
-	astFile.Decls = append(astFile.Decls, reference)
-	return atomicPackageName
-}
-
-var slashslash = []byte("//")
-
-// initialComments returns the prefix of content containing only
-// whitespace and line comments.  Any +build directives must appear
-// within this region.  This approach is more reliable than using
-// go/printer to print a modified AST containing comments.
-//
-func initialComments(content []byte) []byte {
-	// Derived from go/build.Context.shouldBuild.
-	end := 0
-	p := content
-	for len(p) > 0 {
-		line := p
-		if i := bytes.IndexByte(line, '\n'); i >= 0 {
-			line, p = line[:i], p[i+1:]
-		} else {
-			p = p[len(p):]
-		}
-		line = bytes.TrimSpace(line)
-		if len(line) == 0 { // Blank line.
-			end = len(content) - len(p)
-			continue
-		}
-		if !bytes.HasPrefix(line, slashslash) { // Not comment line.
-			break
-		}
-	}
-	return content[:end]
-}
-
-func annotate(name string) {
-	fset := token.NewFileSet()
-	content, err := ioutil.ReadFile(name)
-	if err != nil {
-		log.Fatalf("cover: %s: %s", name, err)
-	}
-	parsedFile, err := parser.ParseFile(fset, name, content, parser.ParseComments)
-	if err != nil {
-		log.Fatalf("cover: %s: %s", name, err)
-	}
-	parsedFile.Comments = trimComments(parsedFile, fset)
-
-	file := &File{
-		fset:    fset,
-		name:    name,
-		astFile: parsedFile,
-	}
-	if *mode == "atomic" {
-		file.atomicPkg = file.addImport(atomicPackagePath)
-	}
-	ast.Walk(file, file.astFile)
-	fd := os.Stdout
-	if *output != "" {
-		var err error
-		fd, err = os.Create(*output)
-		if err != nil {
-			log.Fatalf("cover: %s", err)
-		}
-	}
-	fd.Write(initialComments(content)) // Retain '// +build' directives.
-	file.print(fd)
-	// After printing the source tree, add some declarations for the counters etc.
-	// We could do this by adding to the tree, but it's easier just to print the text.
-	file.addVariables(fd)
-}
-
-// trimComments drops all but the //go: comments, some of which are semantically important.
-// We drop all others because they can appear in places that cause our counters
-// to appear in syntactically incorrect places. //go: appears at the beginning of
-// the line and is syntactically safe.
-func trimComments(file *ast.File, fset *token.FileSet) []*ast.CommentGroup {
-	var comments []*ast.CommentGroup
-	for _, group := range file.Comments {
-		var list []*ast.Comment
-		for _, comment := range group.List {
-			if strings.HasPrefix(comment.Text, "//go:") && fset.Position(comment.Slash).Column == 1 {
-				list = append(list, comment)
-			}
-		}
-		if list != nil {
-			comments = append(comments, &ast.CommentGroup{list})
-		}
-	}
-	return comments
-}
-
-func (f *File) print(w io.Writer) {
-	printer.Fprint(w, f.fset, f.astFile)
-}
-
-// intLiteral returns an ast.BasicLit representing the integer value.
-func (f *File) intLiteral(i int) *ast.BasicLit {
-	node := &ast.BasicLit{
-		Kind:  token.INT,
-		Value: fmt.Sprint(i),
-	}
-	return node
-}
-
-// index returns an ast.BasicLit representing the number of counters present.
-func (f *File) index() *ast.BasicLit {
-	return f.intLiteral(len(f.blocks))
-}
-
-// setCounterStmt returns the expression: __count[23] = 1.
-func setCounterStmt(f *File, counter ast.Expr) ast.Stmt {
-	return &ast.AssignStmt{
-		Lhs: []ast.Expr{counter},
-		Tok: token.ASSIGN,
-		Rhs: []ast.Expr{f.intLiteral(1)},
-	}
-}
-
-// incCounterStmt returns the expression: __count[23]++.
-func incCounterStmt(f *File, counter ast.Expr) ast.Stmt {
-	return &ast.IncDecStmt{
-		X:   counter,
-		Tok: token.INC,
-	}
-}
-
-// atomicCounterStmt returns the expression: atomic.AddUint32(&__count[23], 1)
-func atomicCounterStmt(f *File, counter ast.Expr) ast.Stmt {
-	return &ast.ExprStmt{
-		X: &ast.CallExpr{
-			Fun: &ast.SelectorExpr{
-				X:   ast.NewIdent(f.atomicPkg),
-				Sel: ast.NewIdent("AddUint32"),
-			},
-			Args: []ast.Expr{&ast.UnaryExpr{
-				Op: token.AND,
-				X:  counter,
-			},
-				f.intLiteral(1),
-			},
-		},
-	}
-}
-
-// newCounter creates a new counter expression of the appropriate form.
-func (f *File) newCounter(start, end token.Pos, numStmt int) ast.Stmt {
-	counter := &ast.IndexExpr{
-		X: &ast.SelectorExpr{
-			X:   ast.NewIdent(*varVar),
-			Sel: ast.NewIdent("Count"),
-		},
-		Index: f.index(),
-	}
-	stmt := counterStmt(f, counter)
-	f.blocks = append(f.blocks, Block{start, end, numStmt})
-	return stmt
-}
-
-// addCounters takes a list of statements and adds counters to the beginning of
-// each basic block at the top level of that list. For instance, given
-//
-//	S1
-//	if cond {
-//		S2
-// 	}
-//	S3
-//
-// counters will be added before S1 and before S3. The block containing S2
-// will be visited in a separate call.
-// TODO: Nested simple blocks get unnecessary (but correct) counters
-func (f *File) addCounters(pos, blockEnd token.Pos, list []ast.Stmt, extendToClosingBrace bool) []ast.Stmt {
-	// Special case: make sure we add a counter to an empty block. Can't do this below
-	// or we will add a counter to an empty statement list after, say, a return statement.
-	if len(list) == 0 {
-		return []ast.Stmt{f.newCounter(pos, blockEnd, 0)}
-	}
-	// We have a block (statement list), but it may have several basic blocks due to the
-	// appearance of statements that affect the flow of control.
-	var newList []ast.Stmt
-	for {
-		// Find first statement that affects flow of control (break, continue, if, etc.).
-		// It will be the last statement of this basic block.
-		var last int
-		end := blockEnd
-		for last = 0; last < len(list); last++ {
-			end = f.statementBoundary(list[last])
-			if f.endsBasicSourceBlock(list[last]) {
-				extendToClosingBrace = false // Block is broken up now.
-				last++
-				break
-			}
-		}
-		if extendToClosingBrace {
-			end = blockEnd
-		}
-		if pos != end { // Can have no source to cover if e.g. blocks abut.
-			newList = append(newList, f.newCounter(pos, end, last))
-		}
-		newList = append(newList, list[0:last]...)
-		list = list[last:]
-		if len(list) == 0 {
-			break
-		}
-		pos = list[0].Pos()
-	}
-	return newList
-}
-
-// hasFuncLiteral reports the existence and position of the first func literal
-// in the node, if any. If a func literal appears, it usually marks the termination
-// of a basic block because the function body is itself a block.
-// Therefore we draw a line at the start of the body of the first function literal we find.
-// TODO: what if there's more than one? Probably doesn't matter much.
-func hasFuncLiteral(n ast.Node) (bool, token.Pos) {
-	if n == nil {
-		return false, 0
-	}
-	var literal funcLitFinder
-	ast.Walk(&literal, n)
-	return literal.found(), token.Pos(literal)
-}
-
-// statementBoundary finds the location in s that terminates the current basic
-// block in the source.
-func (f *File) statementBoundary(s ast.Stmt) token.Pos {
-	// Control flow statements are easy.
-	switch s := s.(type) {
-	case *ast.BlockStmt:
-		// Treat blocks like basic blocks to avoid overlapping counters.
-		return s.Lbrace
-	case *ast.IfStmt:
-		found, pos := hasFuncLiteral(s.Init)
-		if found {
-			return pos
-		}
-		found, pos = hasFuncLiteral(s.Cond)
-		if found {
-			return pos
-		}
-		return s.Body.Lbrace
-	case *ast.ForStmt:
-		found, pos := hasFuncLiteral(s.Init)
-		if found {
-			return pos
-		}
-		found, pos = hasFuncLiteral(s.Cond)
-		if found {
-			return pos
-		}
-		found, pos = hasFuncLiteral(s.Post)
-		if found {
-			return pos
-		}
-		return s.Body.Lbrace
-	case *ast.LabeledStmt:
-		return f.statementBoundary(s.Stmt)
-	case *ast.RangeStmt:
-		found, pos := hasFuncLiteral(s.X)
-		if found {
-			return pos
-		}
-		return s.Body.Lbrace
-	case *ast.SwitchStmt:
-		found, pos := hasFuncLiteral(s.Init)
-		if found {
-			return pos
-		}
-		found, pos = hasFuncLiteral(s.Tag)
-		if found {
-			return pos
-		}
-		return s.Body.Lbrace
-	case *ast.SelectStmt:
-		return s.Body.Lbrace
-	case *ast.TypeSwitchStmt:
-		found, pos := hasFuncLiteral(s.Init)
-		if found {
-			return pos
-		}
-		return s.Body.Lbrace
-	}
-	// If not a control flow statement, it is a declaration, expression, call, etc. and it may have a function literal.
-	// If it does, that's tricky because we want to exclude the body of the function from this block.
-	// Draw a line at the start of the body of the first function literal we find.
-	// TODO: what if there's more than one? Probably doesn't matter much.
-	found, pos := hasFuncLiteral(s)
-	if found {
-		return pos
-	}
-	return s.End()
-}
-
-// endsBasicSourceBlock reports whether s changes the flow of control: break, if, etc.,
-// or if it's just problematic, for instance contains a function literal, which will complicate
-// accounting due to the block-within-an expression.
-func (f *File) endsBasicSourceBlock(s ast.Stmt) bool {
-	switch s := s.(type) {
-	case *ast.BlockStmt:
-		// Treat blocks like basic blocks to avoid overlapping counters.
-		return true
-	case *ast.BranchStmt:
-		return true
-	case *ast.ForStmt:
-		return true
-	case *ast.IfStmt:
-		return true
-	case *ast.LabeledStmt:
-		return f.endsBasicSourceBlock(s.Stmt)
-	case *ast.RangeStmt:
-		return true
-	case *ast.SwitchStmt:
-		return true
-	case *ast.SelectStmt:
-		return true
-	case *ast.TypeSwitchStmt:
-		return true
-	case *ast.ExprStmt:
-		// Calls to panic change the flow.
-		// We really should verify that "panic" is the predefined function,
-		// but without type checking we can't and the likelihood of it being
-		// an actual problem is vanishingly small.
-		if call, ok := s.X.(*ast.CallExpr); ok {
-			if ident, ok := call.Fun.(*ast.Ident); ok && ident.Name == "panic" && len(call.Args) == 1 {
-				return true
-			}
-		}
-	}
-	found, _ := hasFuncLiteral(s)
-	return found
-}
-
-// funcLitFinder implements the ast.Visitor pattern to find the location of any
-// function literal in a subtree.
-type funcLitFinder token.Pos
-
-func (f *funcLitFinder) Visit(node ast.Node) (w ast.Visitor) {
-	if f.found() {
-		return nil // Prune search.
-	}
-	switch n := node.(type) {
-	case *ast.FuncLit:
-		*f = funcLitFinder(n.Body.Lbrace)
-		return nil // Prune search.
-	}
-	return f
-}
-
-func (f *funcLitFinder) found() bool {
-	return token.Pos(*f) != token.NoPos
-}
-
-// Sort interface for []block1; used for self-check in addVariables.
-
-type block1 struct {
-	Block
-	index int
-}
-
-type blockSlice []block1
-
-func (b blockSlice) Len() int           { return len(b) }
-func (b blockSlice) Less(i, j int) bool { return b[i].startByte < b[j].startByte }
-func (b blockSlice) Swap(i, j int)      { b[i], b[j] = b[j], b[i] }
-
-// offset translates a token position into a 0-indexed byte offset.
-func (f *File) offset(pos token.Pos) int {
-	return f.fset.Position(pos).Offset
-}
-
-// addVariables adds to the end of the file the declarations to set up the counter and position variables.
-func (f *File) addVariables(w io.Writer) {
-	// Self-check: Verify that the instrumented basic blocks are disjoint.
-	t := make([]block1, len(f.blocks))
-	for i := range f.blocks {
-		t[i].Block = f.blocks[i]
-		t[i].index = i
-	}
-	sort.Sort(blockSlice(t))
-	for i := 1; i < len(t); i++ {
-		if t[i-1].endByte > t[i].startByte {
-			fmt.Fprintf(os.Stderr, "cover: internal error: block %d overlaps block %d\n", t[i-1].index, t[i].index)
-			// Note: error message is in byte positions, not token positions.
-			fmt.Fprintf(os.Stderr, "\t%s:#%d,#%d %s:#%d,#%d\n",
-				f.name, f.offset(t[i-1].startByte), f.offset(t[i-1].endByte),
-				f.name, f.offset(t[i].startByte), f.offset(t[i].endByte))
-		}
-	}
-
-	// Declare the coverage struct as a package-level variable.
-	fmt.Fprintf(w, "\nvar %s = struct {\n", *varVar)
-	fmt.Fprintf(w, "\tCount     [%d]uint32\n", len(f.blocks))
-	fmt.Fprintf(w, "\tPos       [3 * %d]uint32\n", len(f.blocks))
-	fmt.Fprintf(w, "\tNumStmt   [%d]uint16\n", len(f.blocks))
-	fmt.Fprintf(w, "} {\n")
-
-	// Initialize the position array field.
-	fmt.Fprintf(w, "\tPos: [3 * %d]uint32{\n", len(f.blocks))
-
-	// A nice long list of positions. Each position is encoded as follows to reduce size:
-	// - 32-bit starting line number
-	// - 32-bit ending line number
-	// - (16 bit ending column number << 16) | (16-bit starting column number).
-	for i, block := range f.blocks {
-		start := f.fset.Position(block.startByte)
-		end := f.fset.Position(block.endByte)
-		fmt.Fprintf(w, "\t\t%d, %d, %#x, // [%d]\n", start.Line, end.Line, (end.Column&0xFFFF)<<16|(start.Column&0xFFFF), i)
-	}
-
-	// Close the position array.
-	fmt.Fprintf(w, "\t},\n")
-
-	// Initialize the position array field.
-	fmt.Fprintf(w, "\tNumStmt: [%d]uint16{\n", len(f.blocks))
-
-	// A nice long list of statements-per-block, so we can give a conventional
-	// valuation of "percent covered". To save space, it's a 16-bit number, so we
-	// clamp it if it overflows - won't matter in practice.
-	for i, block := range f.blocks {
-		n := block.numStmt
-		if n > 1<<16-1 {
-			n = 1<<16 - 1
-		}
-		fmt.Fprintf(w, "\t\t%d, // %d\n", n, i)
-	}
-
-	// Close the statements-per-block array.
-	fmt.Fprintf(w, "\t},\n")
-
-	// Close the struct initialization.
-	fmt.Fprintf(w, "}\n")
-}
diff --git a/src/cmd/cover/cover_test.go b/src/cmd/cover/cover_test.go
deleted file mode 100644
index f01f138..0000000
--- a/src/cmd/cover/cover_test.go
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main_test
-
-import (
-	"bytes"
-	"fmt"
-	"internal/testenv"
-	"io/ioutil"
-	"os"
-	"os/exec"
-	"path/filepath"
-	"testing"
-)
-
-const (
-	// Data directory, also the package directory for the test.
-	testdata = "testdata"
-
-	// Binaries we compile.
-	testcover = "./testcover.exe"
-)
-
-var (
-	// Files we use.
-	testMain    = filepath.Join(testdata, "main.go")
-	testTest    = filepath.Join(testdata, "test.go")
-	coverInput  = filepath.Join(testdata, "test_line.go")
-	coverOutput = filepath.Join(testdata, "test_cover.go")
-)
-
-var debug = false // Keeps the rewritten files around if set.
-
-// Run this shell script, but do it in Go so it can be run by "go test".
-//
-//	replace the word LINE with the line number < testdata/test.go > testdata/test_line.go
-// 	go build -o ./testcover
-// 	./testcover -mode=count -var=CoverTest -o ./testdata/test_cover.go testdata/test_line.go
-//	go run ./testdata/main.go ./testdata/test.go
-//
-func TestCover(t *testing.T) {
-	testenv.MustHaveGoBuild(t)
-
-	// Read in the test file (testTest) and write it, with LINEs specified, to coverInput.
-	file, err := ioutil.ReadFile(testTest)
-	if err != nil {
-		t.Fatal(err)
-	}
-	lines := bytes.Split(file, []byte("\n"))
-	for i, line := range lines {
-		lines[i] = bytes.Replace(line, []byte("LINE"), []byte(fmt.Sprint(i+1)), -1)
-	}
-	if err := ioutil.WriteFile(coverInput, bytes.Join(lines, []byte("\n")), 0666); err != nil {
-		t.Fatal(err)
-	}
-
-	// defer removal of test_line.go
-	if !debug {
-		defer os.Remove(coverInput)
-	}
-
-	// go build -o testcover
-	cmd := exec.Command("go", "build", "-o", testcover)
-	run(cmd, t)
-
-	// defer removal of testcover
-	defer os.Remove(testcover)
-
-	// ./testcover -mode=count -var=coverTest -o ./testdata/test_cover.go testdata/test_line.go
-	cmd = exec.Command(testcover, "-mode=count", "-var=coverTest", "-o", coverOutput, coverInput)
-	run(cmd, t)
-
-	// defer removal of ./testdata/test_cover.go
-	if !debug {
-		defer os.Remove(coverOutput)
-	}
-
-	// go run ./testdata/main.go ./testdata/test.go
-	cmd = exec.Command("go", "run", testMain, coverOutput)
-	run(cmd, t)
-}
-
-func run(c *exec.Cmd, t *testing.T) {
-	c.Stdout = os.Stdout
-	c.Stderr = os.Stderr
-	err := c.Run()
-	if err != nil {
-		t.Fatal(err)
-	}
-}
diff --git a/src/cmd/cover/doc.go b/src/cmd/cover/doc.go
deleted file mode 100644
index 636d7e0..0000000
--- a/src/cmd/cover/doc.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-/*
-Cover is a program for analyzing the coverage profiles generated by
-'go test -coverprofile=cover.out'.
-
-Cover is also used by 'go test -cover' to rewrite the source code with
-annotations to track which parts of each function are executed.
-It operates on one Go source file at a time, computing approximate
-basic block information by studying the source. It is thus more portable
-than binary-rewriting coverage tools, but also a little less capable.
-For instance, it does not probe inside && and || expressions, and can
-be mildly confused by single statements with multiple function literals.
-
-For usage information, please see:
-	go help testflag
-	go tool cover -help
-*/
-package main
diff --git a/src/cmd/cover/func.go b/src/cmd/cover/func.go
deleted file mode 100644
index 66ec242..0000000
--- a/src/cmd/cover/func.go
+++ /dev/null
@@ -1,164 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements the visitor that computes the (line, column)-(line-column) range for each function.
-
-package main
-
-import (
-	"bufio"
-	"fmt"
-	"go/ast"
-	"go/build"
-	"go/parser"
-	"go/token"
-	"os"
-	"path/filepath"
-	"text/tabwriter"
-)
-
-// funcOutput takes two file names as arguments, a coverage profile to read as input and an output
-// file to write ("" means to write to standard output). The function reads the profile and produces
-// as output the coverage data broken down by function, like this:
-//
-//	fmt/format.go:30:	init			100.0%
-//	fmt/format.go:57:	clearflags		100.0%
-//	...
-//	fmt/scan.go:1046:	doScan			100.0%
-//	fmt/scan.go:1075:	advance			96.2%
-//	fmt/scan.go:1119:	doScanf			96.8%
-//	total:		(statements)			91.9%
-
-func funcOutput(profile, outputFile string) error {
-	profiles, err := ParseProfiles(profile)
-	if err != nil {
-		return err
-	}
-
-	var out *bufio.Writer
-	if outputFile == "" {
-		out = bufio.NewWriter(os.Stdout)
-	} else {
-		fd, err := os.Create(outputFile)
-		if err != nil {
-			return err
-		}
-		defer fd.Close()
-		out = bufio.NewWriter(fd)
-	}
-	defer out.Flush()
-
-	tabber := tabwriter.NewWriter(out, 1, 8, 1, '\t', 0)
-	defer tabber.Flush()
-
-	var total, covered int64
-	for _, profile := range profiles {
-		fn := profile.FileName
-		file, err := findFile(fn)
-		if err != nil {
-			return err
-		}
-		funcs, err := findFuncs(file)
-		if err != nil {
-			return err
-		}
-		// Now match up functions and profile blocks.
-		for _, f := range funcs {
-			c, t := f.coverage(profile)
-			fmt.Fprintf(tabber, "%s:%d:\t%s\t%.1f%%\n", fn, f.startLine, f.name, 100.0*float64(c)/float64(t))
-			total += t
-			covered += c
-		}
-	}
-	fmt.Fprintf(tabber, "total:\t(statements)\t%.1f%%\n", 100.0*float64(covered)/float64(total))
-
-	return nil
-}
-
-// findFuncs parses the file and returns a slice of FuncExtent descriptors.
-func findFuncs(name string) ([]*FuncExtent, error) {
-	fset := token.NewFileSet()
-	parsedFile, err := parser.ParseFile(fset, name, nil, 0)
-	if err != nil {
-		return nil, err
-	}
-	visitor := &FuncVisitor{
-		fset:    fset,
-		name:    name,
-		astFile: parsedFile,
-	}
-	ast.Walk(visitor, visitor.astFile)
-	return visitor.funcs, nil
-}
-
-// FuncExtent describes a function's extent in the source by file and position.
-type FuncExtent struct {
-	name      string
-	startLine int
-	startCol  int
-	endLine   int
-	endCol    int
-}
-
-// FuncVisitor implements the visitor that builds the function position list for a file.
-type FuncVisitor struct {
-	fset    *token.FileSet
-	name    string // Name of file.
-	astFile *ast.File
-	funcs   []*FuncExtent
-}
-
-// Visit implements the ast.Visitor interface.
-func (v *FuncVisitor) Visit(node ast.Node) ast.Visitor {
-	switch n := node.(type) {
-	case *ast.FuncDecl:
-		start := v.fset.Position(n.Pos())
-		end := v.fset.Position(n.End())
-		fe := &FuncExtent{
-			name:      n.Name.Name,
-			startLine: start.Line,
-			startCol:  start.Column,
-			endLine:   end.Line,
-			endCol:    end.Column,
-		}
-		v.funcs = append(v.funcs, fe)
-	}
-	return v
-}
-
-// coverage returns the fraction of the statements in the function that were covered, as a numerator and denominator.
-func (f *FuncExtent) coverage(profile *Profile) (num, den int64) {
-	// We could avoid making this n^2 overall by doing a single scan and annotating the functions,
-	// but the sizes of the data structures is never very large and the scan is almost instantaneous.
-	var covered, total int64
-	// The blocks are sorted, so we can stop counting as soon as we reach the end of the relevant block.
-	for _, b := range profile.Blocks {
-		if b.StartLine > f.endLine || (b.StartLine == f.endLine && b.StartCol >= f.endCol) {
-			// Past the end of the function.
-			break
-		}
-		if b.EndLine < f.startLine || (b.EndLine == f.startLine && b.EndCol <= f.startCol) {
-			// Before the beginning of the function
-			continue
-		}
-		total += int64(b.NumStmt)
-		if b.Count > 0 {
-			covered += int64(b.NumStmt)
-		}
-	}
-	if total == 0 {
-		total = 1 // Avoid zero denominator.
-	}
-	return covered, total
-}
-
-// findFile finds the location of the named file in GOROOT, GOPATH etc.
-func findFile(file string) (string, error) {
-	dir, file := filepath.Split(file)
-	pkg, err := build.Import(dir, ".", build.FindOnly)
-	if err != nil {
-		return "", fmt.Errorf("can't find %q: %v", file, err)
-	}
-	return filepath.Join(pkg.Dir, file), nil
-}
diff --git a/src/cmd/cover/html.go b/src/cmd/cover/html.go
deleted file mode 100644
index bb0a495..0000000
--- a/src/cmd/cover/html.go
+++ /dev/null
@@ -1,279 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
-	"bufio"
-	"bytes"
-	"fmt"
-	"html/template"
-	"io"
-	"io/ioutil"
-	"math"
-	"os"
-	"os/exec"
-	"path/filepath"
-	"runtime"
-)
-
-// htmlOutput reads the profile data from profile and generates an HTML
-// coverage report, writing it to outfile. If outfile is empty,
-// it writes the report to a temporary file and opens it in a web browser.
-func htmlOutput(profile, outfile string) error {
-	profiles, err := ParseProfiles(profile)
-	if err != nil {
-		return err
-	}
-
-	var d templateData
-
-	for _, profile := range profiles {
-		fn := profile.FileName
-		if profile.Mode == "set" {
-			d.Set = true
-		}
-		file, err := findFile(fn)
-		if err != nil {
-			return err
-		}
-		src, err := ioutil.ReadFile(file)
-		if err != nil {
-			return fmt.Errorf("can't read %q: %v", fn, err)
-		}
-		var buf bytes.Buffer
-		err = htmlGen(&buf, src, profile.Boundaries(src))
-		if err != nil {
-			return err
-		}
-		d.Files = append(d.Files, &templateFile{
-			Name:     fn,
-			Body:     template.HTML(buf.String()),
-			Coverage: percentCovered(profile),
-		})
-	}
-
-	var out *os.File
-	if outfile == "" {
-		var dir string
-		dir, err = ioutil.TempDir("", "cover")
-		if err != nil {
-			return err
-		}
-		out, err = os.Create(filepath.Join(dir, "coverage.html"))
-	} else {
-		out, err = os.Create(outfile)
-	}
-	err = htmlTemplate.Execute(out, d)
-	if err == nil {
-		err = out.Close()
-	}
-	if err != nil {
-		return err
-	}
-
-	if outfile == "" {
-		if !startBrowser("file://" + out.Name()) {
-			fmt.Fprintf(os.Stderr, "HTML output written to %s\n", out.Name())
-		}
-	}
-
-	return nil
-}
-
-// percentCovered returns, as a percentage, the fraction of the statements in
-// the profile covered by the test run.
-// In effect, it reports the coverage of a given source file.
-func percentCovered(p *Profile) float64 {
-	var total, covered int64
-	for _, b := range p.Blocks {
-		total += int64(b.NumStmt)
-		if b.Count > 0 {
-			covered += int64(b.NumStmt)
-		}
-	}
-	if total == 0 {
-		return 0
-	}
-	return float64(covered) / float64(total) * 100
-}
-
-// htmlGen generates an HTML coverage report with the provided filename,
-// source code, and tokens, and writes it to the given Writer.
-func htmlGen(w io.Writer, src []byte, boundaries []Boundary) error {
-	dst := bufio.NewWriter(w)
-	for i := range src {
-		for len(boundaries) > 0 && boundaries[0].Offset == i {
-			b := boundaries[0]
-			if b.Start {
-				n := 0
-				if b.Count > 0 {
-					n = int(math.Floor(b.Norm*9)) + 1
-				}
-				fmt.Fprintf(dst, `<span class="cov%v" title="%v">`, n, b.Count)
-			} else {
-				dst.WriteString("</span>")
-			}
-			boundaries = boundaries[1:]
-		}
-		switch b := src[i]; b {
-		case '>':
-			dst.WriteString(">")
-		case '<':
-			dst.WriteString("<")
-		case '&':
-			dst.WriteString("&")
-		case '\t':
-			dst.WriteString("        ")
-		default:
-			dst.WriteByte(b)
-		}
-	}
-	return dst.Flush()
-}
-
-// startBrowser tries to open the URL in a browser
-// and reports whether it succeeds.
-func startBrowser(url string) bool {
-	// try to start the browser
-	var args []string
-	switch runtime.GOOS {
-	case "darwin":
-		args = []string{"open"}
-	case "windows":
-		args = []string{"cmd", "/c", "start"}
-	default:
-		args = []string{"xdg-open"}
-	}
-	cmd := exec.Command(args[0], append(args[1:], url)...)
-	return cmd.Start() == nil
-}
-
-// rgb returns an rgb value for the specified coverage value
-// between 0 (no coverage) and 10 (max coverage).
-func rgb(n int) string {
-	if n == 0 {
-		return "rgb(192, 0, 0)" // Red
-	}
-	// Gradient from gray to green.
-	r := 128 - 12*(n-1)
-	g := 128 + 12*(n-1)
-	b := 128 + 3*(n-1)
-	return fmt.Sprintf("rgb(%v, %v, %v)", r, g, b)
-}
-
-// colors generates the CSS rules for coverage colors.
-func colors() template.CSS {
-	var buf bytes.Buffer
-	for i := 0; i < 11; i++ {
-		fmt.Fprintf(&buf, ".cov%v { color: %v }\n", i, rgb(i))
-	}
-	return template.CSS(buf.String())
-}
-
-var htmlTemplate = template.Must(template.New("html").Funcs(template.FuncMap{
-	"colors": colors,
-}).Parse(tmplHTML))
-
-type templateData struct {
-	Files []*templateFile
-	Set   bool
-}
-
-type templateFile struct {
-	Name     string
-	Body     template.HTML
-	Coverage float64
-}
-
-const tmplHTML = `
-<!DOCTYPE html>
-<html>
-	<head>
-		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-		<style>
-			body {
-				background: black;
-				color: rgb(80, 80, 80);
-			}
-			body, pre, #legend span {
-				font-family: Menlo, monospace;
-				font-weight: bold;
-			}
-			#topbar {
-				background: black;
-				position: fixed;
-				top: 0; left: 0; right: 0;
-				height: 42px;
-				border-bottom: 1px solid rgb(80, 80, 80);
-			}
-			#content {
-				margin-top: 50px;
-			}
-			#nav, #legend {
-				float: left;
-				margin-left: 10px;
-			}
-			#legend {
-				margin-top: 12px;
-			}
-			#nav {
-				margin-top: 10px;
-			}
-			#legend span {
-				margin: 0 5px;
-			}
-			{{colors}}
-		</style>
-	</head>
-	<body>
-		<div id="topbar">
-			<div id="nav">
-				<select id="files">
-				{{range $i, $f := .Files}}
-				<option value="file{{$i}}">{{$f.Name}} ({{printf "%.1f" $f.Coverage}}%)</option>
-				{{end}}
-				</select>
-			</div>
-			<div id="legend">
-				<span>not tracked</span>
-			{{if .Set}}
-				<span class="cov0">not covered</span>
-				<span class="cov8">covered</span>
-			{{else}}
-				<span class="cov0">no coverage</span>
-				<span class="cov1">low coverage</span>
-				<span class="cov2">*</span>
-				<span class="cov3">*</span>
-				<span class="cov4">*</span>
-				<span class="cov5">*</span>
-				<span class="cov6">*</span>
-				<span class="cov7">*</span>
-				<span class="cov8">*</span>
-				<span class="cov9">*</span>
-				<span class="cov10">high coverage</span>
-			{{end}}
-			</div>
-		</div>
-		<div id="content">
-		{{range $i, $f := .Files}}
-		<pre class="file" id="file{{$i}}" {{if $i}}style="display: none"{{end}}>{{$f.Body}}</pre>
-		{{end}}
-		</div>
-	</body>
-	<script>
-	(function() {
-		var files = document.getElementById('files');
-		var visible = document.getElementById('file0');
-		files.addEventListener('change', onChange, false);
-		function onChange() {
-			visible.style.display = 'none';
-			visible = document.getElementById(files.value);
-			visible.style.display = 'block';
-			window.scrollTo(0, 0);
-		}
-	})();
-	</script>
-</html>
-`
diff --git a/src/cmd/cover/profile.go b/src/cmd/cover/profile.go
deleted file mode 100644
index a03b5d5..0000000
--- a/src/cmd/cover/profile.go
+++ /dev/null
@@ -1,192 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file provides support for parsing coverage profiles
-// generated by "go test -coverprofile=cover.out".
-// It is a copy of golang.org/x/tools/cover/profile.go.
-
-package main
-
-import (
-	"bufio"
-	"fmt"
-	"math"
-	"os"
-	"regexp"
-	"sort"
-	"strconv"
-	"strings"
-)
-
-// Profile represents the profiling data for a specific file.
-type Profile struct {
-	FileName string
-	Mode     string
-	Blocks   []ProfileBlock
-}
-
-// ProfileBlock represents a single block of profiling data.
-type ProfileBlock struct {
-	StartLine, StartCol int
-	EndLine, EndCol     int
-	NumStmt, Count      int
-}
-
-type byFileName []*Profile
-
-func (p byFileName) Len() int           { return len(p) }
-func (p byFileName) Less(i, j int) bool { return p[i].FileName < p[j].FileName }
-func (p byFileName) Swap(i, j int)      { p[i], p[j] = p[j], p[i] }
-
-// ParseProfiles parses profile data in the specified file and returns a
-// Profile for each source file described therein.
-func ParseProfiles(fileName string) ([]*Profile, error) {
-	pf, err := os.Open(fileName)
-	if err != nil {
-		return nil, err
-	}
-	defer pf.Close()
-
-	files := make(map[string]*Profile)
-	buf := bufio.NewReader(pf)
-	// First line is "mode: foo", where foo is "set", "count", or "atomic".
-	// Rest of file is in the format
-	//	encoding/base64/base64.go:34.44,37.40 3 1
-	// where the fields are: name.go:line.column,line.column numberOfStatements count
-	s := bufio.NewScanner(buf)
-	mode := ""
-	for s.Scan() {
-		line := s.Text()
-		if mode == "" {
-			const p = "mode: "
-			if !strings.HasPrefix(line, p) || line == p {
-				return nil, fmt.Errorf("bad mode line: %v", line)
-			}
-			mode = line[len(p):]
-			continue
-		}
-		m := lineRe.FindStringSubmatch(line)
-		if m == nil {
-			return nil, fmt.Errorf("line %q doesn't match expected format: %v", m, lineRe)
-		}
-		fn := m[1]
-		p := files[fn]
-		if p == nil {
-			p = &Profile{
-				FileName: fn,
-				Mode:     mode,
-			}
-			files[fn] = p
-		}
-		p.Blocks = append(p.Blocks, ProfileBlock{
-			StartLine: toInt(m[2]),
-			StartCol:  toInt(m[3]),
-			EndLine:   toInt(m[4]),
-			EndCol:    toInt(m[5]),
-			NumStmt:   toInt(m[6]),
-			Count:     toInt(m[7]),
-		})
-	}
-	if err := s.Err(); err != nil {
-		return nil, err
-	}
-	for _, p := range files {
-		sort.Sort(blocksByStart(p.Blocks))
-	}
-	// Generate a sorted slice.
-	profiles := make([]*Profile, 0, len(files))
-	for _, profile := range files {
-		profiles = append(profiles, profile)
-	}
-	sort.Sort(byFileName(profiles))
-	return profiles, nil
-}
-
-type blocksByStart []ProfileBlock
-
-func (b blocksByStart) Len() int      { return len(b) }
-func (b blocksByStart) Swap(i, j int) { b[i], b[j] = b[j], b[i] }
-func (b blocksByStart) Less(i, j int) bool {
-	bi, bj := b[i], b[j]
-	return bi.StartLine < bj.StartLine || bi.StartLine == bj.StartLine && bi.StartCol < bj.StartCol
-}
-
-var lineRe = regexp.MustCompile(`^(.+):([0-9]+).([0-9]+),([0-9]+).([0-9]+) ([0-9]+) ([0-9]+)$`)
-
-func toInt(s string) int {
-	i, err := strconv.Atoi(s)
-	if err != nil {
-		panic(err)
-	}
-	return i
-}
-
-// Boundary represents the position in a source file of the beginning or end of a
-// block as reported by the coverage profile. In HTML mode, it will correspond to
-// the opening or closing of a <span> tag and will be used to colorize the source
-type Boundary struct {
-	Offset int     // Location as a byte offset in the source file.
-	Start  bool    // Is this the start of a block?
-	Count  int     // Event count from the cover profile.
-	Norm   float64 // Count normalized to [0..1].
-}
-
-// Boundaries returns a Profile as a set of Boundary objects within the provided src.
-func (p *Profile) Boundaries(src []byte) (boundaries []Boundary) {
-	// Find maximum count.
-	max := 0
-	for _, b := range p.Blocks {
-		if b.Count > max {
-			max = b.Count
-		}
-	}
-	// Divisor for normalization.
-	divisor := math.Log(float64(max))
-
-	// boundary returns a Boundary, populating the Norm field with a normalized Count.
-	boundary := func(offset int, start bool, count int) Boundary {
-		b := Boundary{Offset: offset, Start: start, Count: count}
-		if !start || count == 0 {
-			return b
-		}
-		if max <= 1 {
-			b.Norm = 0.8 // Profile is in"set" mode; we want a heat map. Use cov8 in the CSS.
-		} else if count > 0 {
-			b.Norm = math.Log(float64(count)) / divisor
-		}
-		return b
-	}
-
-	line, col := 1, 2 // TODO: Why is this 2?
-	for si, bi := 0, 0; si < len(src) && bi < len(p.Blocks); {
-		b := p.Blocks[bi]
-		if b.StartLine == line && b.StartCol == col {
-			boundaries = append(boundaries, boundary(si, true, b.Count))
-		}
-		if b.EndLine == line && b.EndCol == col || line > b.EndLine {
-			boundaries = append(boundaries, boundary(si, false, 0))
-			bi++
-			continue // Don't advance through src; maybe the next block starts here.
-		}
-		if src[si] == '\n' {
-			line++
-			col = 0
-		}
-		col++
-		si++
-	}
-	sort.Sort(boundariesByPos(boundaries))
-	return
-}
-
-type boundariesByPos []Boundary
-
-func (b boundariesByPos) Len() int      { return len(b) }
-func (b boundariesByPos) Swap(i, j int) { b[i], b[j] = b[j], b[i] }
-func (b boundariesByPos) Less(i, j int) bool {
-	if b[i].Offset == b[j].Offset {
-		return !b[i].Start && b[j].Start
-	}
-	return b[i].Offset < b[j].Offset
-}
diff --git a/src/cmd/cover/testdata/main.go b/src/cmd/cover/testdata/main.go
deleted file mode 100644
index 6ed39c4..0000000
--- a/src/cmd/cover/testdata/main.go
+++ /dev/null
@@ -1,112 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test runner for coverage test. This file is not coverage-annotated; test.go is.
-// It knows the coverage counter is called "coverTest".
-
-package main
-
-import (
-	"fmt"
-	"os"
-)
-
-func main() {
-	testAll()
-	verify()
-}
-
-type block struct {
-	count uint32
-	line  uint32
-}
-
-var counters = make(map[block]bool)
-
-// check records the location and expected value for a counter.
-func check(line, count uint32) {
-	b := block{
-		count,
-		line,
-	}
-	counters[b] = true
-}
-
-// checkVal is a version of check that returns its extra argument,
-// so it can be used in conditionals.
-func checkVal(line, count uint32, val int) int {
-	b := block{
-		count,
-		line,
-	}
-	counters[b] = true
-	return val
-}
-
-var PASS = true
-
-// verify checks the expected counts against the actual. It runs after the test has completed.
-func verify() {
-	for b := range counters {
-		got, index := count(b.line)
-		if b.count == anything && got != 0 {
-			got = anything
-		}
-		if got != b.count {
-			fmt.Fprintf(os.Stderr, "test_go:%d expected count %d got %d [counter %d]\n", b.line, b.count, got, index)
-			PASS = false
-		}
-	}
-	verifyPanic()
-	if !PASS {
-		fmt.Fprintf(os.Stderr, "FAIL\n")
-		os.Exit(2)
-	}
-}
-
-// verifyPanic is a special check for the known counter that should be
-// after the panic call in testPanic.
-func verifyPanic() {
-	if coverTest.Count[panicIndex-1] != 1 {
-		// Sanity check for test before panic.
-		fmt.Fprintf(os.Stderr, "bad before panic")
-		PASS = false
-	}
-	if coverTest.Count[panicIndex] != 0 {
-		fmt.Fprintf(os.Stderr, "bad at panic: %d should be 0\n", coverTest.Count[panicIndex])
-		PASS = false
-	}
-	if coverTest.Count[panicIndex+1] != 1 {
-		fmt.Fprintf(os.Stderr, "bad after panic")
-		PASS = false
-	}
-}
-
-// count returns the count and index for the counter at the specified line.
-func count(line uint32) (uint32, int) {
-	// Linear search is fine. Choose perfect fit over approximate.
-	// We can have a closing brace for a range on the same line as a condition for an "else if"
-	// and we don't want that brace to steal the count for the condition on the "if".
-	// Therefore we test for a perfect (lo==line && hi==line) match, but if we can't
-	// find that we take the first imperfect match.
-	index := -1
-	indexLo := uint32(1e9)
-	for i := range coverTest.Count {
-		lo, hi := coverTest.Pos[3*i], coverTest.Pos[3*i+1]
-		if lo == line && line == hi {
-			return coverTest.Count[i], i
-		}
-		// Choose the earliest match (the counters are in unpredictable order).
-		if lo <= line && line <= hi && indexLo > lo {
-			index = i
-			indexLo = lo
-		}
-	}
-	if index == -1 {
-		fmt.Fprintln(os.Stderr, "cover_test: no counter for line", line)
-		PASS = false
-		return 0, 0
-	}
-	return coverTest.Count[index], index
-}
diff --git a/src/cmd/cover/testdata/test.go b/src/cmd/cover/testdata/test.go
deleted file mode 100644
index 9013950..0000000
--- a/src/cmd/cover/testdata/test.go
+++ /dev/null
@@ -1,218 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This program is processed by the cover command, and then testAll is called.
-// The test driver in main.go can then compare the coverage statistics with expectation.
-
-// The word LINE is replaced by the line number in this file. When the file is executed,
-// the coverage processing has changed the line numbers, so we can't use runtime.Caller.
-
-package main
-
-const anything = 1e9 // Just some unlikely value that means "we got here, don't care how often"
-
-func testAll() {
-	testSimple()
-	testBlockRun()
-	testIf()
-	testFor()
-	testRange()
-	testSwitch()
-	testTypeSwitch()
-	testSelect1()
-	testSelect2()
-	testPanic()
-	testEmptySwitches()
-}
-
-// The indexes of the counters in testPanic are known to main.go
-const panicIndex = 3
-
-// This test appears first because the index of its counters is known to main.go
-func testPanic() {
-	defer func() {
-		recover()
-	}()
-	check(LINE, 1)
-	panic("should not get next line")
-	check(LINE, 0) // this is GoCover.Count[panicIndex]
-	// The next counter is in testSimple and it will be non-zero.
-	// If the panic above does not trigger a counter, the test will fail
-	// because GoCover.Count[panicIndex] will be the one in testSimple.
-}
-
-func testSimple() {
-	check(LINE, 1)
-}
-
-func testIf() {
-	if true {
-		check(LINE, 1)
-	} else {
-		check(LINE, 0)
-	}
-	if false {
-		check(LINE, 0)
-	} else {
-		check(LINE, 1)
-	}
-	for i := 0; i < 3; i++ {
-		if checkVal(LINE, 3, i) <= 2 {
-			check(LINE, 3)
-		}
-		if checkVal(LINE, 3, i) <= 1 {
-			check(LINE, 2)
-		}
-		if checkVal(LINE, 3, i) <= 0 {
-			check(LINE, 1)
-		}
-	}
-	for i := 0; i < 3; i++ {
-		if checkVal(LINE, 3, i) <= 1 {
-			check(LINE, 2)
-		} else {
-			check(LINE, 1)
-		}
-	}
-	for i := 0; i < 3; i++ {
-		if checkVal(LINE, 3, i) <= 0 {
-			check(LINE, 1)
-		} else if checkVal(LINE, 2, i) <= 1 {
-			check(LINE, 1)
-		} else if checkVal(LINE, 1, i) <= 2 {
-			check(LINE, 1)
-		} else if checkVal(LINE, 0, i) <= 3 {
-			check(LINE, 0)
-		}
-	}
-	if func(a, b int) bool { return a < b }(3, 4) {
-		check(LINE, 1)
-	}
-}
-
-func testFor() {
-	for i := 0; i < 10; func() { i++; check(LINE, 10) }() {
-		check(LINE, 10)
-	}
-}
-
-func testRange() {
-	for _, f := range []func(){
-		func() { check(LINE, 1) },
-	} {
-		f()
-		check(LINE, 1)
-	}
-}
-
-func testBlockRun() {
-	check(LINE, 1)
-	{
-		check(LINE, 1)
-	}
-	{
-		check(LINE, 1)
-	}
-	check(LINE, 1)
-	{
-		check(LINE, 1)
-	}
-	{
-		check(LINE, 1)
-	}
-	check(LINE, 1)
-}
-
-func testSwitch() {
-	for i := 0; i < 5; func() { i++; check(LINE, 5) }() {
-		switch i {
-		case 0:
-			check(LINE, 1)
-		case 1:
-			check(LINE, 1)
-		case 2:
-			check(LINE, 1)
-		default:
-			check(LINE, 2)
-		}
-	}
-}
-
-func testTypeSwitch() {
-	var x = []interface{}{1, 2.0, "hi"}
-	for _, v := range x {
-		switch func() { check(LINE, 3) }(); v.(type) {
-		case int:
-			check(LINE, 1)
-		case float64:
-			check(LINE, 1)
-		case string:
-			check(LINE, 1)
-		case complex128:
-			check(LINE, 0)
-		default:
-			check(LINE, 0)
-		}
-	}
-}
-
-func testSelect1() {
-	c := make(chan int)
-	go func() {
-		for i := 0; i < 1000; i++ {
-			c <- i
-		}
-	}()
-	for {
-		select {
-		case <-c:
-			check(LINE, anything)
-		case <-c:
-			check(LINE, anything)
-		default:
-			check(LINE, 1)
-			return
-		}
-	}
-}
-
-func testSelect2() {
-	c1 := make(chan int, 1000)
-	c2 := make(chan int, 1000)
-	for i := 0; i < 1000; i++ {
-		c1 <- i
-		c2 <- i
-	}
-	for {
-		select {
-		case <-c1:
-			check(LINE, 1000)
-		case <-c2:
-			check(LINE, 1000)
-		default:
-			check(LINE, 1)
-			return
-		}
-	}
-}
-
-// Empty control statements created syntax errors. This function
-// is here just to be sure that those are handled correctly now.
-func testEmptySwitches() {
-	check(LINE, 1)
-	switch 3 {
-	}
-	check(LINE, 1)
-	switch i := (interface{})(3).(int); i {
-	}
-	check(LINE, 1)
-	c := make(chan int)
-	go func() {
-		check(LINE, 1)
-		c <- 1
-		select {}
-	}()
-	<-c
-	check(LINE, 1)
-}
diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
deleted file mode 100644
index 184f973..0000000
--- a/src/cmd/dist/build.go
+++ /dev/null
@@ -1,1202 +0,0 @@
-// Copyright 2012 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
-	"bytes"
-	"flag"
-	"fmt"
-	"os"
-	"os/exec"
-	"path/filepath"
-	"strings"
-)
-
-// Initialization for any invocation.
-
-// The usual variables.
-var (
-	goarch           string
-	gobin            string
-	gohostarch       string
-	gohostos         string
-	goos             string
-	goarm            string
-	go386            string
-	goroot           string
-	goroot_final     string
-	goextlinkenabled string
-	workdir          string
-	tooldir          string
-	oldgoos          string
-	oldgoarch        string
-	slash            string
-	exe              string
-	defaultcc        string
-	defaultcflags    string
-	defaultldflags   string
-	defaultcxxtarget string
-	defaultcctarget  string
-	rebuildall       bool
-	defaultclang     bool
-
-	sflag bool // build static binaries
-	vflag int  // verbosity
-)
-
-// The known architectures.
-var okgoarch = []string{
-	"386",
-	"amd64",
-	"amd64p32",
-	"arm",
-	"arm64",
-	"ppc64",
-	"ppc64le",
-}
-
-// The known operating systems.
-var okgoos = []string{
-	"darwin",
-	"dragonfly",
-	"linux",
-	"android",
-	"solaris",
-	"freebsd",
-	"nacl",
-	"netbsd",
-	"openbsd",
-	"plan9",
-	"windows",
-}
-
-// find reports the first index of p in l[0:n], or else -1.
-func find(p string, l []string) int {
-	for i, s := range l {
-		if p == s {
-			return i
-		}
-	}
-	return -1
-}
-
-// xinit handles initialization of the various global state, like goroot and goarch.
-func xinit() {
-	goroot = os.Getenv("GOROOT")
-	if slash == "/" && len(goroot) > 1 || slash == `\` && len(goroot) > 3 {
-		// if not "/" or "c:\", then strip trailing path separator
-		goroot = strings.TrimSuffix(goroot, slash)
-	}
-	if goroot == "" {
-		fatal("$GOROOT must be set")
-	}
-
-	goroot_final = os.Getenv("GOROOT_FINAL")
-	if goroot_final == "" {
-		goroot_final = goroot
-	}
-
-	b := os.Getenv("GOBIN")
-	if b == "" {
-		b = goroot + slash + "bin"
-	}
-	gobin = b
-
-	b = os.Getenv("GOOS")
-	if b == "" {
-		b = gohostos
-	}
-	goos = b
-	if find(goos, okgoos) < 0 {
-		fatal("unknown $GOOS %s", goos)
-	}
-
-	b = os.Getenv("GOARM")
-	if b == "" {
-		b = xgetgoarm()
-	}
-	goarm = b
-
-	b = os.Getenv("GO386")
-	if b == "" {
-		if cansse2() {
-			b = "sse2"
-		} else {
-			b = "387"
-		}
-	}
-	go386 = b
-
-	p := pathf("%s/src/all.bash", goroot)
-	if !isfile(p) {
-		fatal("$GOROOT is not set correctly or not exported\n"+
-			"\tGOROOT=%s\n"+
-			"\t%s does not exist", goroot, p)
-	}
-
-	b = os.Getenv("GOHOSTARCH")
-	if b != "" {
-		gohostarch = b
-	}
-
-	if find(gohostarch, okgoarch) < 0 {
-		fatal("unknown $GOHOSTARCH %s", gohostarch)
-	}
-
-	b = os.Getenv("GOARCH")
-	if b == "" {
-		b = gohostarch
-	}
-	goarch = b
-	if find(goarch, okgoarch) < 0 {
-		fatal("unknown $GOARCH %s", goarch)
-	}
-
-	b = os.Getenv("GO_EXTLINK_ENABLED")
-	if b != "" {
-		if b != "0" && b != "1" {
-			fatal("unknown $GO_EXTLINK_ENABLED %s", b)
-		}
-		goextlinkenabled = b
-	}
-
-	b = os.Getenv("CC")
-	if b == "" {
-		// Use clang on OS X, because gcc is deprecated there.
-		// Xcode for OS X 10.9 Mavericks will ship a fake "gcc" binary that
-		// actually runs clang. We prepare different command
-		// lines for the two binaries, so it matters what we call it.
-		// See golang.org/issue/5822.
-		if defaultclang {
-			b = "clang"
-		} else {
-			b = "gcc"
-		}
-	}
-	defaultcc = b
-
-	defaultcflags = os.Getenv("CFLAGS")
-
-	defaultldflags = os.Getenv("LDFLAGS")
-
-	b = os.Getenv("CC_FOR_TARGET")
-	if b == "" {
-		b = defaultcc
-	}
-	defaultcctarget = b
-
-	b = os.Getenv("CXX_FOR_TARGET")
-	if b == "" {
-		b = os.Getenv("CXX")
-		if b == "" {
-			if defaultclang {
-				b = "clang++"
-			} else {
-				b = "g++"
-			}
-		}
-	}
-	defaultcxxtarget = b
-
-	// For tools being invoked but also for os.ExpandEnv.
-	os.Setenv("GO386", go386)
-	os.Setenv("GOARCH", goarch)
-	os.Setenv("GOARM", goarm)
-	os.Setenv("GOHOSTARCH", gohostarch)
-	os.Setenv("GOHOSTOS", gohostos)
-	os.Setenv("GOOS", goos)
-	os.Setenv("GOROOT", goroot)
-	os.Setenv("GOROOT_FINAL", goroot_final)
-
-	// Make the environment more predictable.
-	os.Setenv("LANG", "C")
-	os.Setenv("LANGUAGE", "en_US.UTF8")
-
-	workdir = xworkdir()
-	xatexit(rmworkdir)
-
-	tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch)
-}
-
-// rmworkdir deletes the work directory.
-func rmworkdir() {
-	if vflag > 1 {
-		errprintf("rm -rf %s\n", workdir)
-	}
-	xremoveall(workdir)
-}
-
-// Remove trailing spaces.
-func chomp(s string) string {
-	return strings.TrimRight(s, " \t\r\n")
-}
-
-func branchtag(branch string) (tag string, precise bool) {
-	b := run(goroot, CheckExit, "git", "log", "--decorate=full", "--format=format:%d", "master.."+branch)
-	tag = branch
-	for _, line := range splitlines(b) {
-		// Each line is either blank, or looks like
-		//	  (tag: refs/tags/go1.4rc2, refs/remotes/origin/release-branch.go1.4, refs/heads/release-branch.go1.4)
-		// We need to find an element starting with refs/tags/.
-		i := strings.Index(line, " refs/tags/")
-		if i < 0 {
-			continue
-		}
-		i += len(" refs/tags/")
-		// The tag name ends at a comma or paren (prefer the first).
-		j := strings.Index(line[i:], ",")
-		if j < 0 {
-			j = strings.Index(line[i:], ")")
-		}
-		if j < 0 {
-			continue // malformed line; ignore it
-		}
-		tag = line[i : i+j]
-		if i == 0 {
-			precise = true // tag denotes HEAD
-		}
-		break
-	}
-	return
-}
-
-// findgoversion determines the Go version to use in the version string.
-func findgoversion() string {
-	// The $GOROOT/VERSION file takes priority, for distributions
-	// without the source repo.
-	path := pathf("%s/VERSION", goroot)
-	if isfile(path) {
-		b := chomp(readfile(path))
-		// Commands such as "dist version > VERSION" will cause
-		// the shell to create an empty VERSION file and set dist's
-		// stdout to its fd. dist in turn looks at VERSION and uses
-		// its content if available, which is empty at this point.
-		// Only use the VERSION file if it is non-empty.
-		if b != "" {
-			return b
-		}
-	}
-
-	// The $GOROOT/VERSION.cache file is a cache to avoid invoking
-	// git every time we run this command.  Unlike VERSION, it gets
-	// deleted by the clean command.
-	path = pathf("%s/VERSION.cache", goroot)
-	if isfile(path) {
-		return chomp(readfile(path))
-	}
-
-	// Show a nicer error message if this isn't a Git repo.
-	if !isGitRepo() {
-		fatal("FAILED: not a Git repo; must put a VERSION file in $GOROOT")
-	}
-
-	// Otherwise, use Git.
-	// What is the current branch?
-	branch := chomp(run(goroot, CheckExit, "git", "rev-parse", "--abbrev-ref", "HEAD"))
-
-	// What are the tags along the current branch?
-	tag := "devel"
-	precise := false
-
-	// If we're on a release branch, use the closest matching tag
-	// that is on the release branch (and not on the master branch).
-	if strings.HasPrefix(branch, "release-branch.") {
-		tag, precise = branchtag(branch)
-	}
-
-	if !precise {
-		// Tag does not point at HEAD; add hash and date to version.
-		tag += chomp(run(goroot, CheckExit, "git", "log", "-n", "1", "--format=format: +%h %cd", "HEAD"))
-	}
-
-	// Cache version.
-	writefile(tag, path, 0)
-
-	return tag
-}
-
-// isGitRepo reports whether the working directory is inside a Git repository.
-func isGitRepo() bool {
-	p := ".git"
-	for {
-		fi, err := os.Stat(p)
-		if os.IsNotExist(err) {
-			p = filepath.Join("..", p)
-			continue
-		}
-		if err != nil || !fi.IsDir() {
-			return false
-		}
-		return true
-	}
-}
-
-/*
- * Initial tree setup.
- */
-
-// The old tools that no longer live in $GOBIN or $GOROOT/bin.
-var oldtool = []string{
-	"5a", "5c", "5g", "5l",
-	"6a", "6c", "6g", "6l",
-	"8a", "8c", "8g", "8l",
-	"9a", "9c", "9g", "9l",
-	"6cov",
-	"6nm",
-	"6prof",
-	"cgo",
-	"ebnflint",
-	"goapi",
-	"gofix",
-	"goinstall",
-	"gomake",
-	"gopack",
-	"gopprof",
-	"gotest",
-	"gotype",
-	"govet",
-	"goyacc",
-	"quietgcc",
-}
-
-// Unreleased directories (relative to $GOROOT) that should
-// not be in release branches.
-var unreleased = []string{
-	"src/cmd/newlink",
-	"src/cmd/objwriter",
-	"src/debug/goobj",
-	"src/old",
-}
-
-// setup sets up the tree for the initial build.
-func setup() {
-	// Create bin directory.
-	if p := pathf("%s/bin", goroot); !isdir(p) {
-		xmkdir(p)
-	}
-
-	// Create package directory.
-	if p := pathf("%s/pkg", goroot); !isdir(p) {
-		xmkdir(p)
-	}
-
-	p := pathf("%s/pkg/%s_%s", goroot, gohostos, gohostarch)
-	if rebuildall {
-		xremoveall(p)
-	}
-	xmkdirall(p)
-
-	if goos != gohostos || goarch != gohostarch {
-		p := pathf("%s/pkg/%s_%s", goroot, goos, goarch)
-		if rebuildall {
-			xremoveall(p)
-		}
-		xmkdirall(p)
-	}
-
-	// Create object directory.
-	// We keep it in pkg/ so that all the generated binaries
-	// are in one tree.  If pkg/obj/libgc.a exists, it is a dreg from
-	// before we used subdirectories of obj.  Delete all of obj
-	// to clean up.
-	if p := pathf("%s/pkg/obj/libgc.a", goroot); isfile(p) {
-		xremoveall(pathf("%s/pkg/obj", goroot))
-	}
-	p = pathf("%s/pkg/obj/%s_%s", goroot, gohostos, gohostarch)
-	if rebuildall {
-		xremoveall(p)
-	}
-	xmkdirall(p)
-
-	// Create tool directory.
-	// We keep it in pkg/, just like the object directory above.
-	if rebuildall {
-		xremoveall(tooldir)
-	}
-	xmkdirall(tooldir)
-
-	// Remove tool binaries from before the tool/gohostos_gohostarch
-	xremoveall(pathf("%s/bin/tool", goroot))
-
-	// Remove old pre-tool binaries.
-	for _, old := range oldtool {
-		xremove(pathf("%s/bin/%s", goroot, old))
-	}
-
-	// If $GOBIN is set and has a Go compiler, it must be cleaned.
-	for _, char := range "56789" {
-		if isfile(pathf("%s%s%c%s", gobin, slash, char, "g")) {
-			for _, old := range oldtool {
-				xremove(pathf("%s/%s", gobin, old))
-			}
-			break
-		}
-	}
-
-	// For release, make sure excluded things are excluded.
-	goversion := findgoversion()
-	if strings.HasPrefix(goversion, "release.") || (strings.HasPrefix(goversion, "go") && !strings.Contains(goversion, "beta")) {
-		for _, dir := range unreleased {
-			if p := pathf("%s/%s", goroot, dir); isdir(p) {
-				fatal("%s should not exist in release build", p)
-			}
-		}
-	}
-}
-
-/*
- * Tool building
- */
-
-// deptab lists changes to the default dependencies for a given prefix.
-// deps ending in /* read the whole directory; deps beginning with -
-// exclude files with that prefix.
-var deptab = []struct {
-	prefix string   // prefix of target
-	dep    []string // dependency tweaks for targets with that prefix
-}{
-	{"cmd/go", []string{
-		"zdefaultcc.go",
-	}},
-	{"runtime", []string{
-		"zversion.go",
-	}},
-}
-
-// depsuffix records the allowed suffixes for source files.
-var depsuffix = []string{
-	".s",
-	".go",
-}
-
-// gentab records how to generate some trivial files.
-var gentab = []struct {
-	nameprefix string
-	gen        func(string, string)
-}{
-	{"zdefaultcc.go", mkzdefaultcc},
-	{"zversion.go", mkzversion},
-
-	// not generated anymore, but delete the file if we see it
-	{"enam.c", nil},
-	{"anames5.c", nil},
-	{"anames6.c", nil},
-	{"anames8.c", nil},
-	{"anames9.c", nil},
-}
-
-// install installs the library, package, or binary associated with dir,
-// which is relative to $GOROOT/src.
-func install(dir string) {
-	if vflag > 0 {
-		if goos != gohostos || goarch != gohostarch {
-			errprintf("%s (%s/%s)\n", dir, goos, goarch)
-		} else {
-			errprintf("%s\n", dir)
-		}
-	}
-
-	var clean []string
-	defer func() {
-		for _, name := range clean {
-			xremove(name)
-		}
-	}()
-
-	// path = full path to dir.
-	path := pathf("%s/src/%s", goroot, dir)
-	name := filepath.Base(dir)
-
-	ispkg := !strings.HasPrefix(dir, "cmd/") || strings.HasPrefix(dir, "cmd/internal/") || strings.HasPrefix(dir, "cmd/asm/internal/")
-
-	// Start final link command line.
-	// Note: code below knows that link.p[targ] is the target.
-	var (
-		link      []string
-		targ      int
-		ispackcmd bool
-	)
-	if ispkg {
-		// Go library (package).
-		ispackcmd = true
-		link = []string{"pack", pathf("%s/pkg/%s_%s/%s.a", goroot, goos, goarch, dir)}
-		targ = len(link) - 1
-		xmkdirall(filepath.Dir(link[targ]))
-	} else {
-		// Go command.
-		elem := name
-		if elem == "go" {
-			elem = "go_bootstrap"
-		}
-		link = []string{pathf("%s/link", tooldir), "-o", pathf("%s/%s%s", tooldir, elem, exe)}
-		targ = len(link) - 1
-	}
-	ttarg := mtime(link[targ])
-
-	// Gather files that are sources for this target.
-	// Everything in that directory, and any target-specific
-	// additions.
-	files := xreaddir(path)
-
-	// Remove files beginning with . or _,
-	// which are likely to be editor temporary files.
-	// This is the same heuristic build.ScanDir uses.
-	// There do exist real C files beginning with _,
-	// so limit that check to just Go files.
-	files = filter(files, func(p string) bool {
-		return !strings.HasPrefix(p, ".") && (!strings.HasPrefix(p, "_") || !strings.HasSuffix(p, ".go"))
-	})
-
-	for _, dt := range deptab {
-		if dir == dt.prefix || strings.HasSuffix(dt.prefix, "/") && strings.HasPrefix(dir, dt.prefix) {
-			for _, p := range dt.dep {
-				p = os.ExpandEnv(p)
-				files = append(files, p)
-			}
-		}
-	}
-	files = uniq(files)
-
-	// Convert to absolute paths.
-	for i, p := range files {
-		if !isabs(p) {
-			files[i] = pathf("%s/%s", path, p)
-		}
-	}
-
-	// Is the target up-to-date?
-	var gofiles, missing []string
-	stale := rebuildall
-	files = filter(files, func(p string) bool {
-		for _, suf := range depsuffix {
-			if strings.HasSuffix(p, suf) {
-				goto ok
-			}
-		}
-		return false
-	ok:
-		t := mtime(p)
-		if !t.IsZero() && !strings.HasSuffix(p, ".a") && !shouldbuild(p, dir) {
-			return false
-		}
-		if strings.HasSuffix(p, ".go") {
-			gofiles = append(gofiles, p)
-		}
-		if t.After(ttarg) {
-			stale = true
-		}
-		if t.IsZero() {
-			missing = append(missing, p)
-		}
-		return true
-	})
-
-	// If there are no files to compile, we're done.
-	if len(files) == 0 {
-		return
-	}
-
-	if !stale {
-		return
-	}
-
-	// For package runtime, copy some files into the work space.
-	if dir == "runtime" {
-		xmkdirall(pathf("%s/pkg/include", goroot))
-		// For use by assembly and C files.
-		copyfile(pathf("%s/pkg/include/textflag.h", goroot),
-			pathf("%s/src/runtime/textflag.h", goroot), 0)
-		copyfile(pathf("%s/pkg/include/funcdata.h", goroot),
-			pathf("%s/src/runtime/funcdata.h", goroot), 0)
-	}
-
-	// Generate any missing files; regenerate existing ones.
-	for _, p := range files {
-		elem := filepath.Base(p)
-		for _, gt := range gentab {
-			if gt.gen == nil {
-				continue
-			}
-			if strings.HasPrefix(elem, gt.nameprefix) {
-				if vflag > 1 {
-					errprintf("generate %s\n", p)
-				}
-				gt.gen(path, p)
-				// Do not add generated file to clean list.
-				// In runtime, we want to be able to
-				// build the package with the go tool,
-				// and it assumes these generated files already
-				// exist (it does not know how to build them).
-				// The 'clean' command can remove
-				// the generated files.
-				goto built
-			}
-		}
-		// Did not rebuild p.
-		if find(p, missing) >= 0 {
-			fatal("missing file %s", p)
-		}
-	built:
-	}
-
-	if goos != gohostos || goarch != gohostarch {
-		// We've generated the right files; the go command can do the build.
-		if vflag > 1 {
-			errprintf("skip build for cross-compile %s\n", dir)
-		}
-		return
-	}
-
-	var archive string
-	// The next loop will compile individual non-Go files.
-	// Hand the Go files to the compiler en masse.
-	// For package runtime, this writes go_asm.h, which
-	// the assembly files will need.
-	pkg := dir
-	if strings.HasPrefix(dir, "cmd/") {
-		pkg = "main"
-	}
-	b := pathf("%s/_go_.a", workdir)
-	clean = append(clean, b)
-	if !ispackcmd {
-		link = append(link, b)
-	} else {
-		archive = b
-	}
-	compile := []string{pathf("%s/compile", tooldir), "-pack", "-o", b, "-p", pkg}
-	if dir == "runtime" {
-		compile = append(compile, "-+", "-asmhdr", pathf("%s/go_asm.h", workdir))
-	}
-	compile = append(compile, gofiles...)
-	run(path, CheckExit|ShowOutput, compile...)
-
-	// Compile the files.
-	for _, p := range files {
-		if !strings.HasSuffix(p, ".s") {
-			continue
-		}
-
-		var compile []string
-		// Assembly file for a Go package.
-		compile = []string{
-			pathf("%s/asm", tooldir),
-			"-I", workdir,
-			"-I", pathf("%s/pkg/include", goroot),
-			"-D", "GOOS_" + goos,
-			"-D", "GOARCH_" + goarch,
-			"-D", "GOOS_GOARCH_" + goos + "_" + goarch,
-		}
-
-		doclean := true
-		b := pathf("%s/%s", workdir, filepath.Base(p))
-
-		// Change the last character of the output file (which was c or s).
-		b = b[:len(b)-1] + "o"
-		compile = append(compile, "-o", b, p)
-		bgrun(path, compile...)
-
-		link = append(link, b)
-		if doclean {
-			clean = append(clean, b)
-		}
-	}
-	bgwait()
-
-	if ispackcmd {
-		xremove(link[targ])
-		dopack(link[targ], archive, link[targ+1:])
-		return
-	}
-
-	// Remove target before writing it.
-	xremove(link[targ])
-	run("", CheckExit|ShowOutput, link...)
-}
-
-// matchfield reports whether the field (x,y,z) matches this build.
-// all the elements in the field must be satisfied.
-func matchfield(f string) bool {
-	for _, tag := range strings.Split(f, ",") {
-		if !matchtag(tag) {
-			return false
-		}
-	}
-	return true
-}
-
-// matchtag reports whether the tag (x or !x) matches this build.
-func matchtag(tag string) bool {
-	if tag == "" {
-		return false
-	}
-	if tag[0] == '!' {
-		if len(tag) == 1 || tag[1] == '!' {
-			return false
-		}
-		return !matchtag(tag[1:])
-	}
-	return tag == goos || tag == goarch || tag == "cmd_go_bootstrap" || tag == "go1.1" || (goos == "android" && tag == "linux")
-}
-
-// shouldbuild reports whether we should build this file.
-// It applies the same rules that are used with context tags
-// in package go/build, except that the GOOS and GOARCH
-// can appear anywhere in the file name, not just after _.
-// In particular, they can be the entire file name (like windows.c).
-// We also allow the special tag cmd_go_bootstrap.
-// See ../go/bootstrap.go and package go/build.
-func shouldbuild(file, dir string) bool {
-	// Check file name for GOOS or GOARCH.
-	name := filepath.Base(file)
-	excluded := func(list []string, ok string) bool {
-		for _, x := range list {
-			if x == ok {
-				continue
-			}
-			i := strings.Index(name, x)
-			if i < 0 {
-				continue
-			}
-			i += len(x)
-			if i == len(name) || name[i] == '.' || name[i] == '_' {
-				return true
-			}
-		}
-		return false
-	}
-	if excluded(okgoos, goos) || excluded(okgoarch, goarch) {
-		return false
-	}
-
-	// Omit test files.
-	if strings.Contains(name, "_test") {
-		return false
-	}
-
-	// Check file contents for // +build lines.
-	for _, p := range splitlines(readfile(file)) {
-		p = strings.TrimSpace(p)
-		if p == "" {
-			continue
-		}
-		if strings.Contains(p, "package documentation") {
-			return false
-		}
-		if strings.Contains(p, "package main") && dir != "cmd/go" && dir != "cmd/cgo" {
-			return false
-		}
-		if !strings.HasPrefix(p, "//") {
-			break
-		}
-		if !strings.Contains(p, "+build") {
-			continue
-		}
-		fields := splitfields(p)
-		if len(fields) < 2 || fields[1] != "+build" {
-			continue
-		}
-		for _, p := range fields[2:] {
-			if matchfield(p) {
-				goto fieldmatch
-			}
-		}
-		return false
-	fieldmatch:
-	}
-
-	return true
-}
-
-// copy copies the file src to dst, via memory (so only good for small files).
-func copyfile(dst, src string, flag int) {
-	if vflag > 1 {
-		errprintf("cp %s %s\n", src, dst)
-	}
-	writefile(readfile(src), dst, flag)
-}
-
-// dopack copies the package src to dst,
-// appending the files listed in extra.
-// The archive format is the traditional Unix ar format.
-func dopack(dst, src string, extra []string) {
-	bdst := bytes.NewBufferString(readfile(src))
-	for _, file := range extra {
-		b := readfile(file)
-		// find last path element for archive member name
-		i := strings.LastIndex(file, "/") + 1
-		j := strings.LastIndex(file, `\`) + 1
-		if i < j {
-			i = j
-		}
-		fmt.Fprintf(bdst, "%-16.16s%-12d%-6d%-6d%-8o%-10d`\n", file[i:], 0, 0, 0, 0644, len(b))
-		bdst.WriteString(b)
-		if len(b)&1 != 0 {
-			bdst.WriteByte(0)
-		}
-	}
-	writefile(bdst.String(), dst, 0)
-}
-
-// buildorder records the order of builds for the 'go bootstrap' command.
-// The Go packages and commands must be in dependency order,
-// maintained by hand, but the order doesn't change often.
-var buildorder = []string{
-	// Go libraries and programs for bootstrap.
-	"runtime",
-	"errors",
-	"sync/atomic",
-	"sync",
-	"internal/singleflight",
-	"io",
-	"unicode",
-	"unicode/utf8",
-	"unicode/utf16",
-	"bytes",
-	"math",
-	"strings",
-	"strconv",
-	"bufio",
-	"sort",
-	"container/heap",
-	"encoding/base64",
-	"syscall",
-	"internal/syscall/windows/registry",
-	"time",
-	"internal/syscall/windows",
-	"os",
-	"reflect",
-	"fmt",
-	"encoding",
-	"encoding/binary",
-	"encoding/json",
-	"flag",
-	"path/filepath",
-	"path",
-	"io/ioutil",
-	"log",
-	"regexp/syntax",
-	"regexp",
-	"go/token",
-	"go/scanner",
-	"go/ast",
-	"go/parser",
-	"os/exec",
-	"os/signal",
-	"net/url",
-	"text/template/parse",
-	"text/template",
-	"go/doc",
-	"go/build",
-	"hash",
-	"crypto",
-	"crypto/sha1",
-	"debug/dwarf",
-	"debug/elf",
-	"cmd/go",
-}
-
-var runtimegen = []string{
-	"zaexperiment.h",
-	"zversion.go",
-}
-
-func clean() {
-	for _, name := range buildorder {
-		path := pathf("%s/src/%s", goroot, name)
-		// Remove generated files.
-		for _, elem := range xreaddir(path) {
-			for _, gt := range gentab {
-				if strings.HasPrefix(elem, gt.nameprefix) {
-					xremove(pathf("%s/%s", path, elem))
-				}
-			}
-		}
-		// Remove generated binary named for directory.
-		if strings.HasPrefix(name, "cmd/") {
-			xremove(pathf("%s/%s", path, name[4:]))
-		}
-	}
-
-	// remove runtimegen files.
-	path := pathf("%s/src/runtime", goroot)
-	for _, elem := range runtimegen {
-		xremove(pathf("%s/%s", path, elem))
-	}
-
-	if rebuildall {
-		// Remove object tree.
-		xremoveall(pathf("%s/pkg/obj/%s_%s", goroot, gohostos, gohostarch))
-
-		// Remove installed packages and tools.
-		xremoveall(pathf("%s/pkg/%s_%s", goroot, gohostos, gohostarch))
-		xremoveall(pathf("%s/pkg/%s_%s", goroot, goos, goarch))
-		xremoveall(tooldir)
-
-		// Remove cached version info.
-		xremove(pathf("%s/VERSION.cache", goroot))
-	}
-}
-
-/*
- * command implementations
- */
-
-func usage() {
-	xprintf("usage: go tool dist [command]\n" +
-		"Commands are:\n" +
-		"\n" +
-		"banner         print installation banner\n" +
-		"bootstrap      rebuild everything\n" +
-		"clean          deletes all built files\n" +
-		"env [-p]       print environment (-p: include $PATH)\n" +
-		"install [dir]  install individual directory\n" +
-		"test [-h]      run Go test(s)\n" +
-		"version        print Go version\n" +
-		"\n" +
-		"All commands take -v flags to emit extra information.\n",
-	)
-	xexit(2)
-}
-
-// The env command prints the default environment.
-func cmdenv() {
-	path := flag.Bool("p", false, "emit updated PATH")
-	plan9 := flag.Bool("9", false, "emit plan 9 syntax")
-	windows := flag.Bool("w", false, "emit windows syntax")
-	xflagparse(0)
-
-	format := "%s=\"%s\"\n"
-	switch {
-	case *plan9:
-		format = "%s='%s'\n"
-	case *windows:
-		format = "set %s=%s\r\n"
-	}
-
-	xprintf(format, "CC", defaultcc)
-	xprintf(format, "CC_FOR_TARGET", defaultcctarget)
-	xprintf(format, "GOROOT", goroot)
-	xprintf(format, "GOBIN", gobin)
-	xprintf(format, "GOARCH", goarch)
-	xprintf(format, "GOOS", goos)
-	xprintf(format, "GOHOSTARCH", gohostarch)
-	xprintf(format, "GOHOSTOS", gohostos)
-	xprintf(format, "GOTOOLDIR", tooldir)
-	if goarch == "arm" {
-		xprintf(format, "GOARM", goarm)
-	}
-	if goarch == "386" {
-		xprintf(format, "GO386", go386)
-	}
-
-	if *path {
-		sep := ":"
-		if gohostos == "windows" {
-			sep = ";"
-		}
-		xprintf(format, "PATH", fmt.Sprintf("%s%s%s", gobin, sep, os.Getenv("PATH")))
-	}
-}
-
-// The bootstrap command runs a build from scratch,
-// stopping at having installed the go_bootstrap command.
-func cmdbootstrap() {
-	flag.BoolVar(&rebuildall, "a", rebuildall, "rebuild all")
-	flag.BoolVar(&sflag, "s", sflag, "build static binaries")
-	xflagparse(0)
-
-	if isdir(pathf("%s/src/pkg", goroot)) {
-		fatal("\n\n"+
-			"The Go package sources have moved to $GOROOT/src.\n"+
-			"*** %s still exists. ***\n"+
-			"It probably contains stale files that may confuse the build.\n"+
-			"Please (check what's there and) remove it and try again.\n"+
-			"See https://golang.org/s/go14nopkg\n",
-			pathf("%s/src/pkg", goroot))
-	}
-
-	if rebuildall {
-		clean()
-	}
-
-	setup()
-
-	checkCC()
-	bootstrapBuildTools()
-
-	// For the main bootstrap, building for host os/arch.
-	oldgoos = goos
-	oldgoarch = goarch
-	goos = gohostos
-	goarch = gohostarch
-	os.Setenv("GOHOSTARCH", gohostarch)
-	os.Setenv("GOHOSTOS", gohostos)
-	os.Setenv("GOARCH", goarch)
-	os.Setenv("GOOS", goos)
-
-	// TODO(rsc): Enable when appropriate.
-	// This step is only needed if we believe that the Go compiler built from Go 1.4
-	// will produce different object files than the Go compiler built from itself.
-	// In the absence of bugs, that should not happen.
-	// And if there are bugs, they're more likely in the current development tree
-	// than in a standard release like Go 1.4, so don't do this rebuild by default.
-	if false {
-		xprintf("##### Building Go toolchain using itself.\n")
-		for _, dir := range buildorder {
-			if dir == "cmd/go" {
-				break
-			}
-			install(dir)
-		}
-		xprintf("\n")
-	}
-
-	xprintf("##### Building go_bootstrap for host, %s/%s.\n", gohostos, gohostarch)
-	for _, dir := range buildorder {
-		install(dir)
-	}
-
-	goos = oldgoos
-	goarch = oldgoarch
-	os.Setenv("GOARCH", goarch)
-	os.Setenv("GOOS", goos)
-
-	// Build runtime for actual goos/goarch too.
-	if goos != gohostos || goarch != gohostarch {
-		install("runtime")
-	}
-}
-
-// Copied from go/build/build.go.
-// Cannot use go/build directly because cmd/dist for a new release
-// builds against an old release's go/build, which may be out of sync.
-var cgoEnabled = map[string]bool{
-	"darwin/386":      true,
-	"darwin/amd64":    true,
-	"darwin/arm":      true,
-	"darwin/arm64":    true,
-	"dragonfly/amd64": true,
-	"freebsd/386":     true,
-	"freebsd/amd64":   true,
-	"linux/386":       true,
-	"linux/amd64":     true,
-	"linux/arm":       true,
-	"linux/arm64":     true,
-	"linux/ppc64le":   true,
-	"android/386":     true,
-	"android/amd64":   true,
-	"android/arm":     true,
-	"netbsd/386":      true,
-	"netbsd/amd64":    true,
-	"netbsd/arm":      true,
-	"openbsd/386":     true,
-	"openbsd/amd64":   true,
-	"solaris/amd64":   true,
-	"windows/386":     true,
-	"windows/amd64":   true,
-}
-
-func needCC() bool {
-	switch os.Getenv("CGO_ENABLED") {
-	case "1":
-		return true
-	case "0":
-		return false
-	}
-	return cgoEnabled[gohostos+"/"+gohostarch]
-}
-
-func checkCC() {
-	if !needCC() {
-		return
-	}
-	if _, err := exec.Command(defaultcc, "--help").Output(); err != nil {
-		fatal("cannot invoke C compiler %q: %v\n\n"+
-			"Go needs a system C compiler for use with cgo.\n"+
-			"To set a C compiler, export CC=the-compiler.\n"+
-			"To disable cgo, export CGO_ENABLED=0.\n", defaultcc, err)
-	}
-}
-
-func defaulttarg() string {
-	// xgetwd might return a path with symlinks fully resolved, and if
-	// there happens to be symlinks in goroot, then the hasprefix test
-	// will never succeed. Instead, we use xrealwd to get a canonical
-	// goroot/src before the comparison to avoid this problem.
-	pwd := xgetwd()
-	src := pathf("%s/src/", goroot)
-	real_src := xrealwd(src)
-	if !strings.HasPrefix(pwd, real_src) {
-		fatal("current directory %s is not under %s", pwd, real_src)
-	}
-	pwd = pwd[len(real_src):]
-	// guard againt xrealwd return the directory without the trailing /
-	pwd = strings.TrimPrefix(pwd, "/")
-
-	return pwd
-}
-
-// Install installs the list of packages named on the command line.
-func cmdinstall() {
-	flag.BoolVar(&sflag, "s", sflag, "build static binaries")
-	xflagparse(-1)
-
-	if flag.NArg() == 0 {
-		install(defaulttarg())
-	}
-
-	for _, arg := range flag.Args() {
-		install(arg)
-	}
-}
-
-// Clean deletes temporary objects.
-func cmdclean() {
-	xflagparse(0)
-	clean()
-}
-
-// Banner prints the 'now you've installed Go' banner.
-func cmdbanner() {
-	xflagparse(0)
-
-	xprintf("\n")
-	xprintf("---\n")
-	xprintf("Installed Go for %s/%s in %s\n", goos, goarch, goroot)
-	xprintf("Installed commands in %s\n", gobin)
-
-	if !xsamefile(goroot_final, goroot) {
-		// If the files are to be moved, don't check that gobin
-		// is on PATH; assume they know what they are doing.
-	} else if gohostos == "plan9" {
-		// Check that gobin is bound before /bin.
-		pid := strings.Replace(readfile("#c/pid"), " ", "", -1)
-		ns := fmt.Sprintf("/proc/%s/ns", pid)
-		if !strings.Contains(readfile(ns), fmt.Sprintf("bind -b %s /bin", gobin)) {
-			xprintf("*** You need to bind %s before /bin.\n", gobin)
-		}
-	} else {
-		// Check that gobin appears in $PATH.
-		pathsep := ":"
-		if gohostos == "windows" {
-			pathsep = ";"
-		}
-		if !strings.Contains(pathsep+os.Getenv("PATH")+pathsep, pathsep+gobin+pathsep) {
-			xprintf("*** You need to add %s to your PATH.\n", gobin)
-		}
-	}
-
-	if !xsamefile(goroot_final, goroot) {
-		xprintf("\n"+
-			"The binaries expect %s to be copied or moved to %s\n",
-			goroot, goroot_final)
-	}
-}
-
-// Version prints the Go version.
-func cmdversion() {
-	xflagparse(0)
-	xprintf("%s\n", findgoversion())
-}
diff --git a/src/cmd/dist/buildgo.go b/src/cmd/dist/buildgo.go
deleted file mode 100644
index 437e9dd..0000000
--- a/src/cmd/dist/buildgo.go
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2012 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import "fmt"
-
-/*
- * Helpers for building cmd/go and cmd/cgo.
- */
-
-// mkzdefaultcc writes zdefaultcc.go:
-//
-//	package main
-//	const defaultCC = <defaultcc>
-//	const defaultCXX = <defaultcxx>
-//
-// It is invoked to write cmd/go/zdefaultcc.go
-// but we also write cmd/cgo/zdefaultcc.go
-func mkzdefaultcc(dir, file string) {
-	var out string
-
-	out = fmt.Sprintf(
-		"// auto generated by go tool dist\n"+
-			"\n"+
-			"package main\n"+
-			"\n"+
-			"const defaultCC = `%s`\n"+
-			"const defaultCXX = `%s`\n",
-		defaultcctarget, defaultcxxtarget)
-
-	writefile(out, file, writeSkipSame)
-
-	// Convert file name to replace: turn go into cgo.
-	i := len(file) - len("go/zdefaultcc.go")
-	file = file[:i] + "c" + file[i:]
-	writefile(out, file, writeSkipSame)
-}
diff --git a/src/cmd/dist/buildruntime.go b/src/cmd/dist/buildruntime.go
deleted file mode 100644
index 4e9bede..0000000
--- a/src/cmd/dist/buildruntime.go
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright 2012 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
-	"fmt"
-	"os"
-	"strings"
-)
-
-/*
- * Helpers for building runtime.
- */
-
-// mkzversion writes zversion.go:
-//
-//	package runtime
-//	const defaultGoroot = <goroot>
-//	const theVersion = <version>
-//	const goexperiment = <goexperiment>
-//	const stackGuardMultiplier = <multiplier value>
-//	const buildVersion = <build version>
-//
-func mkzversion(dir, file string) {
-	out := fmt.Sprintf(
-		"// auto generated by go tool dist\n"+
-			"\n"+
-			"package runtime\n"+
-			"\n"+
-			"const defaultGoroot = `%s`\n"+
-			"const theVersion = `%s`\n"+
-			"const goexperiment = `%s`\n"+
-			"const stackGuardMultiplier = %d\n"+
-			"var buildVersion = theVersion\n", goroot_final, findgoversion(), os.Getenv("GOEXPERIMENT"), stackGuardMultiplier())
-
-	writefile(out, file, writeSkipSame)
-}
-
-// mkzbootstrap writes cmd/internal/obj/zbootstrap.go:
-//
-//	package obj
-//
-//	const defaultGOROOT = <goroot>
-//	const defaultGO386 = <go386>
-//	const defaultGOARM = <goarm>
-//	const defaultGOOS = runtime.GOOS
-//	const defaultGOARCH = runtime.GOARCH
-//	const defaultGO_EXTLINK_ENABLED = <goextlinkenabled>
-//	const version = <version>
-//	const stackGuardMultiplier = <multiplier value>
-//	const goexperiment = <goexperiment>
-//
-// The use of runtime.GOOS and runtime.GOARCH makes sure that
-// a cross-compiled compiler expects to compile for its own target
-// system. That is, if on a Mac you do:
-//
-//	GOOS=linux GOARCH=ppc64 go build cmd/compile
-//
-// the resulting compiler will default to generating linux/ppc64 object files.
-// This is more useful than having it default to generating objects for the
-// original target (in this example, a Mac).
-func mkzbootstrap(file string) {
-	out := fmt.Sprintf(
-		"// auto generated by go tool dist\n"+
-			"\n"+
-			"package obj\n"+
-			"\n"+
-			"import \"runtime\"\n"+
-			"\n"+
-			"const defaultGOROOT = `%s`\n"+
-			"const defaultGO386 = `%s`\n"+
-			"const defaultGOARM = `%s`\n"+
-			"const defaultGOOS = runtime.GOOS\n"+
-			"const defaultGOARCH = runtime.GOARCH\n"+
-			"const defaultGO_EXTLINK_ENABLED = `%s`\n"+
-			"const version = `%s`\n"+
-			"const stackGuardMultiplier = %d\n"+
-			"const goexperiment = `%s`\n",
-		goroot_final, go386, goarm, goextlinkenabled, findgoversion(), stackGuardMultiplier(), os.Getenv("GOEXPERIMENT"))
-
-	writefile(out, file, writeSkipSame)
-}
-
-// stackGuardMultiplier returns a multiplier to apply to the default
-// stack guard size.  Larger multipliers are used for non-optimized
-// builds that have larger stack frames.
-func stackGuardMultiplier() int {
-	for _, s := range strings.Split(os.Getenv("GO_GCFLAGS"), " ") {
-		if s == "-N" {
-			return 2
-		}
-	}
-	return 1
-}
diff --git a/src/cmd/dist/buildtool.go b/src/cmd/dist/buildtool.go
deleted file mode 100644
index 8a55b5d..0000000
--- a/src/cmd/dist/buildtool.go
+++ /dev/null
@@ -1,144 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Build toolchain using Go 1.4.
-//
-// The general strategy is to copy the source files we need into
-// a new GOPATH workspace, adjust import paths appropriately,
-// invoke the Go 1.4 go command to build those sources,
-// and then copy the binaries back.
-
-package main
-
-import (
-	"os"
-	"strings"
-)
-
-// bootstrapDirs is a list of directories holding code that must be
-// compiled with a Go 1.4 toolchain to produce the bootstrapTargets.
-// All directories in this list are relative to and must be below $GOROOT/src/cmd.
-// The list is assumed to have two kinds of entries: names without slashes,
-// which are commands, and entries beginning with internal/, which are
-// packages supporting the commands.
-var bootstrapDirs = []string{
-	"asm",
-	"asm/internal/arch",
-	"asm/internal/asm",
-	"asm/internal/flags",
-	"asm/internal/lex",
-	"compile",
-	"compile/internal/amd64",
-	"compile/internal/arm",
-	"compile/internal/arm64",
-	"compile/internal/big",
-	"compile/internal/gc",
-	"compile/internal/ppc64",
-	"compile/internal/x86",
-	"internal/gcprog",
-	"internal/obj",
-	"internal/obj/arm",
-	"internal/obj/arm64",
-	"internal/obj/ppc64",
-	"internal/obj/x86",
-	"link",
-	"link/internal/amd64",
-	"link/internal/arm",
-	"link/internal/arm64",
-	"link/internal/ld",
-	"link/internal/ppc64",
-	"link/internal/x86",
-}
-
-func bootstrapBuildTools() {
-	goroot_bootstrap := os.Getenv("GOROOT_BOOTSTRAP")
-	if goroot_bootstrap == "" {
-		goroot_bootstrap = pathf("%s/go1.4", os.Getenv("HOME"))
-	}
-	xprintf("##### Building Go toolchain using %s.\n", goroot_bootstrap)
-
-	mkzbootstrap(pathf("%s/src/cmd/internal/obj/zbootstrap.go", goroot))
-
-	// Use $GOROOT/pkg/bootstrap as the bootstrap workspace root.
-	// We use a subdirectory of $GOROOT/pkg because that's the
-	// space within $GOROOT where we store all generated objects.
-	// We could use a temporary directory outside $GOROOT instead,
-	// but it is easier to debug on failure if the files are in a known location.
-	workspace := pathf("%s/pkg/bootstrap", goroot)
-	xremoveall(workspace)
-	base := pathf("%s/src/bootstrap", workspace)
-	xmkdirall(base)
-
-	// Copy source code into $GOROOT/pkg/bootstrap and rewrite import paths.
-	for _, dir := range bootstrapDirs {
-		src := pathf("%s/src/cmd/%s", goroot, dir)
-		dst := pathf("%s/%s", base, dir)
-		xmkdirall(dst)
-		for _, name := range xreaddirfiles(src) {
-			srcFile := pathf("%s/%s", src, name)
-			text := readfile(srcFile)
-			text = bootstrapFixImports(text, srcFile)
-			writefile(text, pathf("%s/%s", dst, name), 0)
-		}
-	}
-
-	// Set up environment for invoking Go 1.4 go command.
-	// GOROOT points at Go 1.4 GOROOT,
-	// GOPATH points at our bootstrap workspace,
-	// GOBIN is empty, so that binaries are installed to GOPATH/bin,
-	// and GOOS, GOHOSTOS, GOARCH, and GOHOSTOS are empty,
-	// so that Go 1.4 builds whatever kind of binary it knows how to build.
-	// Restore GOROOT, GOPATH, and GOBIN when done.
-	// Don't bother with GOOS, GOHOSTOS, GOARCH, and GOHOSTARCH,
-	// because setup will take care of those when bootstrapBuildTools returns.
-
-	defer os.Setenv("GOROOT", os.Getenv("GOROOT"))
-	os.Setenv("GOROOT", goroot_bootstrap)
-
-	defer os.Setenv("GOPATH", os.Getenv("GOPATH"))
-	os.Setenv("GOPATH", workspace)
-
-	defer os.Setenv("GOBIN", os.Getenv("GOBIN"))
-	os.Setenv("GOBIN", "")
-
-	os.Setenv("GOOS", "")
-	os.Setenv("GOHOSTOS", "")
-	os.Setenv("GOARCH", "")
-	os.Setenv("GOHOSTARCH", "")
-
-	// Run Go 1.4 to build binaries.
-	run(workspace, ShowOutput|CheckExit, pathf("%s/bin/go", goroot_bootstrap), "install", "-v", "bootstrap/...")
-
-	// Copy binaries into tool binary directory.
-	for _, name := range bootstrapDirs {
-		if !strings.Contains(name, "/") {
-			copyfile(pathf("%s/%s%s", tooldir, name, exe), pathf("%s/bin/%s%s", workspace, name, exe), writeExec)
-		}
-	}
-
-	xprintf("\n")
-}
-
-func bootstrapFixImports(text, srcFile string) string {
-	lines := strings.SplitAfter(text, "\n")
-	inBlock := false
-	for i, line := range lines {
-		if strings.HasPrefix(line, "import (") {
-			inBlock = true
-			continue
-		}
-		if inBlock && strings.HasPrefix(line, ")") {
-			inBlock = false
-			continue
-		}
-		if strings.HasPrefix(line, `import "`) || strings.HasPrefix(line, `import . "`) ||
-			inBlock && (strings.HasPrefix(line, "\t\"") || strings.HasPrefix(line, "\t. \"")) {
-			lines[i] = strings.Replace(line, `"cmd/`, `"bootstrap/`, -1)
-		}
-	}
-
-	lines[0] = "// Do not edit. Bootstrap copy of " + srcFile + "\n\n//line " + srcFile + ":1\n" + lines[0]
-
-	return strings.Join(lines, "")
-}
diff --git a/src/cmd/dist/cpuid_386.s b/src/cmd/dist/cpuid_386.s
deleted file mode 100644
index ed4fb52..0000000
--- a/src/cmd/dist/cpuid_386.s
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-TEXT ·cpuid(SB),$0-8
-	MOVL ax+4(FP), AX
-	CPUID
-	MOVL info+0(FP), DI
-	MOVL AX, 0(DI)
-	MOVL BX, 4(DI)
-	MOVL CX, 8(DI)
-	MOVL DX, 12(DI)
-	RET
-
diff --git a/src/cmd/dist/cpuid_amd64.s b/src/cmd/dist/cpuid_amd64.s
deleted file mode 100644
index b6cdfed..0000000
--- a/src/cmd/dist/cpuid_amd64.s
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-TEXT ·cpuid(SB),$0-12
-	MOVL ax+8(FP), AX
-	CPUID
-	MOVQ info+0(FP), DI
-	MOVL AX, 0(DI)
-	MOVL BX, 4(DI)
-	MOVL CX, 8(DI)
-	MOVL DX, 12(DI)
-	RET
-
diff --git a/src/cmd/dist/cpuid_default.s b/src/cmd/dist/cpuid_default.s
deleted file mode 100644
index 165b4a9..0000000
--- a/src/cmd/dist/cpuid_default.s
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !386,!amd64,!gccgo
-
-#include "textflag.h"
-
-TEXT ·cpuid(SB),NOSPLIT,$0-0
-	RET
diff --git a/src/cmd/dist/main.go b/src/cmd/dist/main.go
deleted file mode 100644
index 1f19a7c..0000000
--- a/src/cmd/dist/main.go
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright 2012 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
-	"flag"
-	"fmt"
-	"os"
-	"strconv"
-)
-
-// cmdtab records the available commands.
-var cmdtab = []struct {
-	name string
-	f    func()
-}{
-	{"banner", cmdbanner},
-	{"bootstrap", cmdbootstrap},
-	{"clean", cmdclean},
-	{"env", cmdenv},
-	{"install", cmdinstall},
-	{"test", cmdtest},
-	{"version", cmdversion},
-}
-
-// The OS-specific main calls into the portable code here.
-func xmain() {
-	if len(os.Args) < 2 {
-		usage()
-	}
-	cmd := os.Args[1]
-	os.Args = os.Args[1:] // for flag parsing during cmd
-	for _, ct := range cmdtab {
-		if ct.name == cmd {
-			flag.Usage = func() {
-				fmt.Fprintf(os.Stderr, "usage: go tool dist %s [options]\n", cmd)
-				flag.PrintDefaults()
-				os.Exit(2)
-			}
-			ct.f()
-			return
-		}
-	}
-
-	xprintf("unknown command %s\n", cmd)
-	usage()
-}
-
-func xflagparse(maxargs int) {
-	flag.Var((*count)(&vflag), "v", "verbosity")
-	flag.Parse()
-	if maxargs >= 0 && flag.NArg() > maxargs {
-		flag.Usage()
-	}
-}
-
-// count is a flag.Value that is like a flag.Bool and a flag.Int.
-// If used as -name, it increments the count, but -name=x sets the count.
-// Used for verbose flag -v.
-type count int
-
-func (c *count) String() string {
-	return fmt.Sprint(int(*c))
-}
-
-func (c *count) Set(s string) error {
-	switch s {
-	case "true":
-		*c++
-	case "false":
-		*c = 0
-	default:
-		n, err := strconv.Atoi(s)
-		if err != nil {
-			return fmt.Errorf("invalid count %q", s)
-		}
-		*c = count(n)
-	}
-	return nil
-}
-
-func (c *count) IsBoolFlag() bool {
-	return true
-}
diff --git a/src/cmd/dist/sys_default.go b/src/cmd/dist/sys_default.go
deleted file mode 100644
index d7bc464..0000000
--- a/src/cmd/dist/sys_default.go
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !windows
-
-package main
-
-func sysinit() {
-}
diff --git a/src/cmd/dist/sys_windows.go b/src/cmd/dist/sys_windows.go
deleted file mode 100644
index e9bfe9e..0000000
--- a/src/cmd/dist/sys_windows.go
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-var (
-	modkernel32       = syscall.NewLazyDLL("kernel32.dll")
-	procGetSystemInfo = modkernel32.NewProc("GetSystemInfo")
-)
-
-// see http://msdn.microsoft.com/en-us/library/windows/desktop/ms724958(v=vs.85).aspx
-type systeminfo struct {
-	wProcessorArchitecture      uint16
-	wReserved                   uint16
-	dwPageSize                  uint32
-	lpMinimumApplicationAddress uintptr
-	lpMaximumApplicationAddress uintptr
-	dwActiveProcessorMask       uintptr
-	dwNumberOfProcessors        uint32
-	dwProcessorType             uint32
-	dwAllocationGranularity     uint32
-	wProcessorLevel             uint16
-	wProcessorRevision          uint16
-}
-
-const (
-	PROCESSOR_ARCHITECTURE_AMD64 = 9
-	PROCESSOR_ARCHITECTURE_INTEL = 0
-)
-
-var sysinfo systeminfo
-
-func sysinit() {
-	syscall.Syscall(procGetSystemInfo.Addr(), 1, uintptr(unsafe.Pointer(&sysinfo)), 0, 0)
-	switch sysinfo.wProcessorArchitecture {
-	case PROCESSOR_ARCHITECTURE_AMD64:
-		gohostarch = "amd64"
-	case PROCESSOR_ARCHITECTURE_INTEL:
-		gohostarch = "386"
-	default:
-		fatal("unknown processor architecture")
-	}
-}
diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
deleted file mode 100755
index d0e6346..0000000
--- a/src/cmd/dist/test.go
+++ /dev/null
@@ -1,866 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
-	"bytes"
-	"errors"
-	"flag"
-	"fmt"
-	"log"
-	"os"
-	"os/exec"
-	"path/filepath"
-	"regexp"
-	"strconv"
-	"strings"
-	"time"
-)
-
-func cmdtest() {
-	var t tester
-	flag.BoolVar(&t.listMode, "list", false, "list available tests")
-	flag.BoolVar(&t.noRebuild, "no-rebuild", false, "don't rebuild std and cmd packages")
-	flag.BoolVar(&t.keepGoing, "k", false, "keep going even when error occurred")
-	flag.BoolVar(&t.race, "race", false, "run in race builder mode (different set of tests)")
-	flag.StringVar(&t.banner, "banner", "##### ", "banner prefix; blank means no section banners")
-	flag.StringVar(&t.runRxStr, "run", os.Getenv("GOTESTONLY"),
-		"run only those tests matching the regular expression; empty means to run all. "+
-			"Special exception: if the string begins with '!', the match is inverted.")
-	xflagparse(-1) // any number of args
-	t.run()
-}
-
-// tester executes cmdtest.
-type tester struct {
-	race      bool
-	listMode  bool
-	noRebuild bool
-	keepGoing bool
-	runRxStr  string
-	runRx     *regexp.Regexp
-	runRxWant bool     // want runRx to match (true) or not match (false)
-	runNames  []string // tests to run, exclusive with runRx; empty means all
-	banner    string   // prefix, or "" for none
-
-	goroot     string
-	goarch     string
-	gohostarch string
-	goos       string
-	gohostos   string
-	cgoEnabled bool
-	partial    bool
-	haveTime   bool // the 'time' binary is available
-
-	tests        []distTest
-	timeoutScale int
-}
-
-// A distTest is a test run by dist test.
-// Each test has a unique name and belongs to a group (heading)
-type distTest struct {
-	name    string // unique test name; may be filtered with -run flag
-	heading string // group section; this header is printed before the test is run.
-	fn      func() error
-}
-
-func mustEnv(k string) string {
-	v := os.Getenv(k)
-	if v == "" {
-		log.Fatalf("Unset environment variable %v", k)
-	}
-	return v
-}
-
-func (t *tester) run() {
-	t.goroot = mustEnv("GOROOT")
-	t.goos = mustEnv("GOOS")
-	t.gohostos = mustEnv("GOHOSTOS")
-	t.goarch = mustEnv("GOARCH")
-	t.gohostarch = mustEnv("GOHOSTARCH")
-	slurp, err := exec.Command("go", "env", "CGO_ENABLED").Output()
-	if err != nil {
-		log.Fatalf("Error running go env CGO_ENABLED: %v", err)
-	}
-	t.cgoEnabled, _ = strconv.ParseBool(strings.TrimSpace(string(slurp)))
-	if flag.NArg() > 0 && t.runRxStr != "" {
-		log.Fatalf("the -run regular expression flag is mutually exclusive with test name arguments")
-	}
-	t.runNames = flag.Args()
-
-	if t.hasBash() {
-		if _, err := exec.LookPath("time"); err == nil {
-			t.haveTime = true
-		}
-	}
-
-	if !t.noRebuild {
-		t.out("Building packages and commands.")
-		cmd := exec.Command("go", "install", "-a", "-v", "std", "cmd")
-		cmd.Stdout = os.Stdout
-		cmd.Stderr = os.Stderr
-		if err := cmd.Run(); err != nil {
-			log.Fatalf("building packages and commands: %v", err)
-		}
-	}
-
-	if t.iOS() {
-		// Install the Mach exception handler used to intercept
-		// EXC_BAD_ACCESS and convert it into a Go panic. This is
-		// necessary for a Go program running under lldb (the way
-		// we run tests). It is disabled by default because iOS
-		// apps are not allowed to access the exc_server symbol.
-		cmd := exec.Command("go", "install", "-a", "-tags", "lldb", "runtime/cgo")
-		cmd.Stdout = os.Stdout
-		cmd.Stderr = os.Stderr
-		if err := cmd.Run(); err != nil {
-			log.Fatalf("building mach exception handler: %v", err)
-		}
-
-		defer func() {
-			cmd := exec.Command("go", "install", "-a", "runtime/cgo")
-			cmd.Stdout = os.Stdout
-			cmd.Stderr = os.Stderr
-			if err := cmd.Run(); err != nil {
-				log.Fatalf("reverting mach exception handler: %v", err)
-			}
-		}()
-	}
-
-	t.timeoutScale = 1
-	if t.goarch == "arm" || t.goos == "windows" {
-		t.timeoutScale = 2
-	}
-	if s := os.Getenv("GO_TEST_TIMEOUT_SCALE"); s != "" {
-		t.timeoutScale, err = strconv.Atoi(s)
-		if err != nil {
-			log.Fatalf("failed to parse $GO_TEST_TIMEOUT_SCALE = %q as integer: %v", s, err)
-		}
-	}
-
-	if t.runRxStr != "" {
-		if t.runRxStr[0] == '!' {
-			t.runRxWant = false
-			t.runRxStr = t.runRxStr[1:]
-		} else {
-			t.runRxWant = true
-		}
-		t.runRx = regexp.MustCompile(t.runRxStr)
-	}
-
-	t.registerTests()
-	if t.listMode {
-		for _, tt := range t.tests {
-			fmt.Println(tt.name)
-		}
-		return
-	}
-
-	// we must unset GOROOT_FINAL before tests, because runtime/debug requires
-	// correct access to source code, so if we have GOROOT_FINAL in effect,
-	// at least runtime/debug test will fail.
-	os.Unsetenv("GOROOT_FINAL")
-
-	for _, name := range t.runNames {
-		if !t.isRegisteredTestName(name) {
-			log.Fatalf("unknown test %q", name)
-		}
-	}
-
-	var lastHeading string
-	ok := true
-	for _, dt := range t.tests {
-		if !t.shouldRunTest(dt.name) {
-			t.partial = true
-			continue
-		}
-		if dt.heading != "" && lastHeading != dt.heading {
-			lastHeading = dt.heading
-			t.out(dt.heading)
-		}
-		if vflag > 0 {
-			fmt.Printf("# go tool dist test -run=^%s$\n", dt.name)
-		}
-		if err := dt.fn(); err != nil {
-			ok = false
-			if t.keepGoing {
-				log.Printf("Failed: %v", err)
-			} else {
-				log.Fatalf("Failed: %v", err)
-			}
-		}
-	}
-	if !ok {
-		fmt.Println("\nFAILED")
-		os.Exit(1)
-	} else if t.partial {
-		fmt.Println("\nALL TESTS PASSED (some were excluded)")
-	} else {
-		fmt.Println("\nALL TESTS PASSED")
-	}
-}
-
-func (t *tester) shouldRunTest(name string) bool {
-	if t.runRx != nil {
-		return t.runRx.MatchString(name) == t.runRxWant
-	}
-	if len(t.runNames) == 0 {
-		return true
-	}
-	for _, runName := range t.runNames {
-		if runName == name {
-			return true
-		}
-	}
-	return false
-}
-
-func (t *tester) tags() string {
-	if t.iOS() {
-		return "-tags=lldb"
-	}
-	return "-tags="
-}
-
-func (t *tester) timeout(sec int) string {
-	return "-timeout=" + fmt.Sprint(time.Duration(sec)*time.Second*time.Duration(t.timeoutScale))
-}
-
-// ranGoTest and stdMatches are state closed over by the stdlib
-// testing func in registerStdTest below. The tests are run
-// sequentially, so there's no need for locks.
-//
-// ranGoBench and benchMatches are the same, but are only used
-// in -race mode.
-var (
-	ranGoTest  bool
-	stdMatches []string
-
-	ranGoBench   bool
-	benchMatches []string
-)
-
-func (t *tester) registerStdTest(pkg string) {
-	testName := "go_test:" + pkg
-	if t.runRx == nil || t.runRx.MatchString(testName) {
-		stdMatches = append(stdMatches, pkg)
-	}
-	t.tests = append(t.tests, distTest{
-		name:    testName,
-		heading: "Testing packages.",
-		fn: func() error {
-			if ranGoTest {
-				return nil
-			}
-			ranGoTest = true
-			args := []string{
-				"test",
-				"-short",
-				t.tags(),
-				t.timeout(180),
-				"-gcflags=" + os.Getenv("GO_GCFLAGS"),
-			}
-			if t.race {
-				args = append(args, "-race")
-			}
-			args = append(args, stdMatches...)
-			cmd := exec.Command("go", args...)
-			cmd.Stdout = os.Stdout
-			cmd.Stderr = os.Stderr
-			return cmd.Run()
-		},
-	})
-}
-
-func (t *tester) registerRaceBenchTest(pkg string) {
-	testName := "go_test_bench:" + pkg
-	if t.runRx == nil || t.runRx.MatchString(testName) {
-		benchMatches = append(benchMatches, pkg)
-	}
-	t.tests = append(t.tests, distTest{
-		name:    testName,
-		heading: "Running benchmarks briefly.",
-		fn: func() error {
-			if ranGoBench {
-				return nil
-			}
-			ranGoBench = true
-			args := []string{
-				"test",
-				"-short",
-				"-race",
-				"-run=^$", // nothing. only benchmarks.
-				"-bench=.*",
-				"-benchtime=.1s",
-				"-cpu=4",
-			}
-			args = append(args, benchMatches...)
-			cmd := exec.Command("go", args...)
-			cmd.Stdout = os.Stdout
-			cmd.Stderr = os.Stderr
-			return cmd.Run()
-		},
-	})
-}
-
-func (t *tester) registerTests() {
-	// Fast path to avoid the ~1 second of `go list std cmd` when
-	// the caller lists specific tests to run. (as the continuous
-	// build coordinator does).
-	if len(t.runNames) > 0 {
-		for _, name := range t.runNames {
-			if strings.HasPrefix(name, "go_test:") {
-				t.registerStdTest(strings.TrimPrefix(name, "go_test:"))
-			}
-			if strings.HasPrefix(name, "go_test_bench:") {
-				t.registerRaceBenchTest(strings.TrimPrefix(name, "go_test_bench:"))
-			}
-		}
-	} else {
-		// Use a format string to only list packages and commands that have tests.
-		const format = "{{if (or .TestGoFiles .XTestGoFiles)}}{{.ImportPath}}{{end}}"
-		cmd := exec.Command("go", "list", "-f", format, "std")
-		if !t.race {
-			cmd.Args = append(cmd.Args, "cmd")
-		}
-		all, err := cmd.CombinedOutput()
-		if err != nil {
-			log.Fatalf("Error running go list std cmd: %v, %s", err, all)
-		}
-		pkgs := strings.Fields(string(all))
-		for _, pkg := range pkgs {
-			t.registerStdTest(pkg)
-		}
-		if t.race {
-			for _, pkg := range pkgs {
-				t.registerRaceBenchTest(pkg)
-			}
-		}
-	}
-
-	if t.race {
-		return
-	}
-
-	// Runtime CPU tests.
-	testName := "runtime:cpu124"
-	t.tests = append(t.tests, distTest{
-		name:    testName,
-		heading: "GOMAXPROCS=2 runtime -cpu=1,2,4",
-		fn: func() error {
-			cmd := t.dirCmd("src", "go", "test", "-short", t.timeout(300), t.tags(), "runtime", "-cpu=1,2,4")
-			// We set GOMAXPROCS=2 in addition to -cpu=1,2,4 in order to test runtime bootstrap code,
-			// creation of first goroutines and first garbage collections in the parallel setting.
-			cmd.Env = mergeEnvLists([]string{"GOMAXPROCS=2"}, os.Environ())
-			return cmd.Run()
-		},
-	})
-
-	// sync tests
-	t.tests = append(t.tests, distTest{
-		name:    "sync_cpu",
-		heading: "sync -cpu=10",
-		fn: func() error {
-			return t.dirCmd("src", "go", "test", "sync", "-short", t.timeout(120), t.tags(), "-cpu=10").Run()
-		},
-	})
-
-	if t.cgoEnabled && t.goos != "android" && !t.iOS() {
-		// Disabled on android and iOS. golang.org/issue/8345
-		t.tests = append(t.tests, distTest{
-			name:    "cgo_stdio",
-			heading: "../misc/cgo/stdio",
-			fn: func() error {
-				return t.dirCmd("misc/cgo/stdio",
-					"go", "run", filepath.Join(os.Getenv("GOROOT"), "test/run.go"), "-", ".").Run()
-			},
-		})
-		t.tests = append(t.tests, distTest{
-			name:    "cgo_life",
-			heading: "../misc/cgo/life",
-			fn: func() error {
-				return t.dirCmd("misc/cgo/life",
-					"go", "run", filepath.Join(os.Getenv("GOROOT"), "test/run.go"), "-", ".").Run()
-			},
-		})
-	}
-	if t.cgoEnabled && t.goos != "android" && !t.iOS() {
-		// TODO(crawshaw): reenable on android and iOS
-		// golang.org/issue/8345
-		//
-		// These tests are not designed to run off the host.
-		t.tests = append(t.tests, distTest{
-			name:    "cgo_test",
-			heading: "../misc/cgo/test",
-			fn:      t.cgoTest,
-		})
-	}
-
-	if t.raceDetectorSupported() {
-		t.tests = append(t.tests, distTest{
-			name:    "race",
-			heading: "Testing race detector",
-			fn:      t.raceTest,
-		})
-	}
-
-	if t.hasBash() && t.cgoEnabled && t.goos != "android" && t.goos != "darwin" {
-		t.registerTest("testgodefs", "../misc/cgo/testgodefs", "./test.bash")
-	}
-	if t.cgoEnabled {
-		if t.cgoTestSOSupported() {
-			t.tests = append(t.tests, distTest{
-				name:    "testso",
-				heading: "../misc/cgo/testso",
-				fn: func() error {
-					return t.cgoTestSO("misc/cgo/testso")
-				},
-			})
-			t.tests = append(t.tests, distTest{
-				name:    "testsovar",
-				heading: "../misc/cgo/testsovar",
-				fn: func() error {
-					return t.cgoTestSO("misc/cgo/testsovar")
-				},
-			})
-		}
-		if t.supportedBuildmode("c-archive") {
-			t.registerTest("testcarchive", "../misc/cgo/testcarchive", "./test.bash")
-		}
-		if t.supportedBuildmode("c-shared") {
-			t.registerTest("testcshared", "../misc/cgo/testcshared", "./test.bash")
-		}
-		if t.supportedBuildmode("shared") {
-			t.registerTest("testshared", "../misc/cgo/testshared", "go", "test")
-		}
-		if t.gohostos == "linux" && t.goarch == "amd64" {
-			t.registerTest("testasan", "../misc/cgo/testasan", "go", "run", "main.go")
-		}
-		if t.hasBash() && t.goos != "android" && !t.iOS() && t.gohostos != "windows" {
-			t.registerTest("cgo_errors", "../misc/cgo/errors", "./test.bash")
-		}
-		if t.gohostos == "linux" && t.extLink() {
-			t.registerTest("testsigfwd", "../misc/cgo/testsigfwd", "go", "run", "main.go")
-		}
-	}
-	if t.hasBash() && t.goos != "nacl" && t.goos != "android" && !t.iOS() {
-		t.registerTest("doc_progs", "../doc/progs", "time", "go", "run", "run.go")
-		t.registerTest("wiki", "../doc/articles/wiki", "./test.bash")
-		t.registerTest("codewalk", "../doc/codewalk", "time", "./run")
-		t.registerTest("shootout", "../test/bench/shootout", "time", "./timing.sh", "-test")
-	}
-	if t.goos != "android" && !t.iOS() {
-		t.registerTest("bench_go1", "../test/bench/go1", "go", "test")
-	}
-	if t.goos != "android" && !t.iOS() {
-		const nShards = 5
-		for shard := 0; shard < nShards; shard++ {
-			shard := shard
-			t.tests = append(t.tests, distTest{
-				name:    fmt.Sprintf("test:%d_%d", shard, nShards),
-				heading: "../test",
-				fn:      func() error { return t.testDirTest(shard, nShards) },
-			})
-		}
-	}
-	if t.goos != "nacl" && t.goos != "android" && !t.iOS() {
-		t.tests = append(t.tests, distTest{
-			name:    "api",
-			heading: "API check",
-			fn: func() error {
-				return t.dirCmd("src", "go", "run", filepath.Join(t.goroot, "src/cmd/api/run.go")).Run()
-			},
-		})
-	}
-}
-
-// isRegisteredTestName reports whether a test named testName has already
-// been registered.
-func (t *tester) isRegisteredTestName(testName string) bool {
-	for _, tt := range t.tests {
-		if tt.name == testName {
-			return true
-		}
-	}
-	return false
-}
-
-func (t *tester) registerTest(name, dirBanner, bin string, args ...string) {
-	if bin == "time" && !t.haveTime {
-		bin, args = args[0], args[1:]
-	}
-	if t.isRegisteredTestName(name) {
-		panic("duplicate registered test name " + name)
-	}
-	t.tests = append(t.tests, distTest{
-		name:    name,
-		heading: dirBanner,
-		fn: func() error {
-			return t.dirCmd(filepath.Join(t.goroot, "src", dirBanner), bin, args...).Run()
-		},
-	})
-}
-
-func (t *tester) dirCmd(dir string, bin string, args ...string) *exec.Cmd {
-	cmd := exec.Command(bin, args...)
-	if filepath.IsAbs(dir) {
-		cmd.Dir = dir
-	} else {
-		cmd.Dir = filepath.Join(t.goroot, dir)
-	}
-	cmd.Stdout = os.Stdout
-	cmd.Stderr = os.Stderr
-	if vflag > 1 {
-		errprintf("%s\n", strings.Join(cmd.Args, " "))
-	}
-	return cmd
-}
-
-func (t *tester) iOS() bool {
-	return t.goos == "darwin" && (t.goarch == "arm" || t.goarch == "arm64")
-}
-
-func (t *tester) out(v string) {
-	if t.banner == "" {
-		return
-	}
-	fmt.Println("\n" + t.banner + v)
-}
-
-func (t *tester) extLink() bool {
-	pair := t.gohostos + "-" + t.goarch
-	switch pair {
-	case "android-arm",
-		"darwin-arm", "darwin-arm64",
-		"dragonfly-386", "dragonfly-amd64",
-		"freebsd-386", "freebsd-amd64", "freebsd-arm",
-		"linux-386", "linux-amd64", "linux-arm", "linux-arm64",
-		"netbsd-386", "netbsd-amd64",
-		"openbsd-386", "openbsd-amd64",
-		"windows-386", "windows-amd64":
-		return true
-	case "darwin-386", "darwin-amd64":
-		// linkmode=external fails on OS X 10.6 and earlier == Darwin
-		// 10.8 and earlier.
-		unameR, err := exec.Command("uname", "-r").Output()
-		if err != nil {
-			log.Fatalf("uname -r: %v", err)
-		}
-		major, _ := strconv.Atoi(string(unameR[:bytes.IndexByte(unameR, '.')]))
-		return major > 10
-	}
-	return false
-}
-
-func (t *tester) supportedBuildmode(mode string) bool {
-	pair := t.goos + "-" + t.goarch
-	switch mode {
-	case "c-archive":
-		if !t.extLink() {
-			return false
-		}
-		switch pair {
-		case "darwin-amd64", "darwin-arm", "darwin-arm64",
-			"linux-amd64", "linux-386":
-			return true
-		}
-		return false
-	case "c-shared":
-		// TODO(hyangah): add linux-386.
-		switch pair {
-		case "linux-amd64", "darwin-amd64", "android-arm":
-			return true
-		}
-		return false
-	case "shared":
-		switch pair {
-		case "linux-amd64":
-			return true
-		}
-		return false
-	default:
-		log.Fatal("internal error: unknown buildmode %s", mode)
-		return false
-	}
-}
-
-func (t *tester) cgoTest() error {
-	env := mergeEnvLists([]string{"GOTRACEBACK=2"}, os.Environ())
-
-	if t.goos == "android" || t.iOS() {
-		cmd := t.dirCmd("misc/cgo/test", "go", "test", t.tags())
-		cmd.Env = env
-		return cmd.Run()
-	}
-
-	cmd := t.dirCmd("misc/cgo/test", "go", "test", t.tags(), "-ldflags", "-linkmode=auto")
-	cmd.Env = env
-	if err := cmd.Run(); err != nil {
-		return err
-	}
-
-	if t.gohostos != "dragonfly" {
-		// linkmode=internal fails on dragonfly since errno is a TLS relocation.
-		cmd := t.dirCmd("misc/cgo/test", "go", "test", "-ldflags", "-linkmode=internal")
-		cmd.Env = env
-		if err := cmd.Run(); err != nil {
-			return err
-		}
-	}
-
-	pair := t.gohostos + "-" + t.goarch
-	switch pair {
-	case "darwin-386", "darwin-amd64",
-		"openbsd-386", "openbsd-amd64",
-		"windows-386", "windows-amd64":
-		// test linkmode=external, but __thread not supported, so skip testtls.
-		if !t.extLink() {
-			break
-		}
-		cmd := t.dirCmd("misc/cgo/test", "go", "test", "-ldflags", "-linkmode=external")
-		cmd.Env = env
-		if err := cmd.Run(); err != nil {
-			return err
-		}
-		cmd = t.dirCmd("misc/cgo/test", "go", "test", "-ldflags", "-linkmode=external -s")
-		cmd.Env = env
-		if err := cmd.Run(); err != nil {
-			return err
-		}
-	case "android-arm",
-		"dragonfly-386", "dragonfly-amd64",
-		"freebsd-386", "freebsd-amd64", "freebsd-arm",
-		"linux-386", "linux-amd64", "linux-arm",
-		"netbsd-386", "netbsd-amd64":
-
-		cmd := t.dirCmd("misc/cgo/test", "go", "test", "-ldflags", "-linkmode=external")
-		cmd.Env = env
-		if err := cmd.Run(); err != nil {
-			return err
-		}
-		cmd = t.dirCmd("misc/cgo/testtls", "go", "test", "-ldflags", "-linkmode=auto")
-		cmd.Env = env
-		if err := cmd.Run(); err != nil {
-			return err
-		}
-		cmd = t.dirCmd("misc/cgo/testtls", "go", "test", "-ldflags", "-linkmode=external")
-		cmd.Env = env
-		if err := cmd.Run(); err != nil {
-			return err
-		}
-
-		switch pair {
-		case "netbsd-386", "netbsd-amd64":
-			// no static linking
-		case "freebsd-arm":
-			// -fPIC compiled tls code will use __tls_get_addr instead
-			// of __aeabi_read_tp, however, on FreeBSD/ARM, __tls_get_addr
-			// is implemented in rtld-elf, so -fPIC isn't compatible with
-			// static linking on FreeBSD/ARM with clang. (cgo depends on
-			// -fPIC fundamentally.)
-		default:
-			cc := mustEnv("CC")
-			cmd := t.dirCmd("misc/cgo/test",
-				cc, "-xc", "-o", "/dev/null", "-static", "-")
-			cmd.Env = env
-			cmd.Stdin = strings.NewReader("int main() {}")
-			if err := cmd.Run(); err != nil {
-				fmt.Println("No support for static linking found (lacks libc.a?), skip cgo static linking test.")
-			} else {
-				cmd = t.dirCmd("misc/cgo/testtls", "go", "test", "-ldflags", `-linkmode=external -extldflags "-static -pthread"`)
-				cmd.Env = env
-				if err := cmd.Run(); err != nil {
-					return err
-				}
-
-				cmd = t.dirCmd("misc/cgo/nocgo", "go", "test")
-				cmd.Env = env
-				if err := cmd.Run(); err != nil {
-					return err
-				}
-
-				cmd = t.dirCmd("misc/cgo/nocgo", "go", "test", "-ldflags", `-linkmode=external`)
-				cmd.Env = env
-				if err := cmd.Run(); err != nil {
-					return err
-				}
-
-				cmd = t.dirCmd("misc/cgo/nocgo", "go", "test", "-ldflags", `-linkmode=external -extldflags "-static -pthread"`)
-				cmd.Env = env
-				if err := cmd.Run(); err != nil {
-					return err
-				}
-			}
-
-			if pair != "freebsd-amd64" { // clang -pie fails to link misc/cgo/test
-				cmd := t.dirCmd("misc/cgo/test",
-					cc, "-xc", "-o", "/dev/null", "-pie", "-")
-				cmd.Env = env
-				cmd.Stdin = strings.NewReader("int main() {}")
-				if err := cmd.Run(); err != nil {
-					fmt.Println("No support for -pie found, skip cgo PIE test.")
-				} else {
-					cmd = t.dirCmd("misc/cgo/test", "go", "test", "-ldflags", `-linkmode=external -extldflags "-pie"`)
-					cmd.Env = env
-					if err := cmd.Run(); err != nil {
-						return fmt.Errorf("pie cgo/test: %v", err)
-					}
-					cmd = t.dirCmd("misc/cgo/testtls", "go", "test", "-ldflags", `-linkmode=external -extldflags "-pie"`)
-					cmd.Env = env
-					if err := cmd.Run(); err != nil {
-						return fmt.Errorf("pie cgo/testtls: %v", err)
-					}
-					cmd = t.dirCmd("misc/cgo/nocgo", "go", "test", "-ldflags", `-linkmode=external -extldflags "-pie"`)
-					cmd.Env = env
-					if err := cmd.Run(); err != nil {
-						return fmt.Errorf("pie cgo/nocgo: %v", err)
-					}
-				}
-			}
-		}
-	}
-
-	return nil
-}
-
-func (t *tester) cgoTestSOSupported() bool {
-	if t.goos == "android" || t.iOS() {
-		// No exec facility on Android or iOS.
-		return false
-	}
-	if t.goarch == "ppc64le" || t.goarch == "ppc64" {
-		// External linking not implemented on ppc64 (issue #8912).
-		return false
-	}
-	return true
-}
-
-func (t *tester) cgoTestSO(testpath string) error {
-	dir := filepath.Join(t.goroot, testpath)
-
-	// build shared object
-	output, err := exec.Command("go", "env", "CC").Output()
-	if err != nil {
-		return fmt.Errorf("Error running go env CC: %v", err)
-	}
-	cc := strings.TrimSuffix(string(output), "\n")
-	if cc == "" {
-		return errors.New("CC environment variable (go env CC) cannot be empty")
-	}
-	output, err = exec.Command("go", "env", "GOGCCFLAGS").Output()
-	if err != nil {
-		return fmt.Errorf("Error running go env GOGCCFLAGS: %v", err)
-	}
-	gogccflags := strings.Split(strings.TrimSuffix(string(output), "\n"), " ")
-
-	ext := "so"
-	args := append(gogccflags, "-shared")
-	switch t.goos {
-	case "darwin":
-		ext = "dylib"
-		args = append(args, "-undefined", "suppress", "-flat_namespace")
-	case "windows":
-		ext = "dll"
-		args = append(args, "-DEXPORT_DLL")
-	}
-	sofname := "libcgosotest." + ext
-	args = append(args, "-o", sofname, "cgoso_c.c")
-
-	if err := t.dirCmd(dir, cc, args...).Run(); err != nil {
-		return err
-	}
-	defer os.Remove(filepath.Join(dir, sofname))
-
-	if err := t.dirCmd(dir, "go", "build", "-o", "main.exe", "main.go").Run(); err != nil {
-		return err
-	}
-	defer os.Remove(filepath.Join(dir, "main.exe"))
-
-	cmd := t.dirCmd(dir, "./main.exe")
-	if t.goos != "windows" {
-		s := "LD_LIBRARY_PATH"
-		if t.goos == "darwin" {
-			s = "DYLD_LIBRARY_PATH"
-		}
-		cmd.Env = mergeEnvLists([]string{s + "=."}, os.Environ())
-	}
-	return cmd.Run()
-}
-
-func (t *tester) hasBash() bool {
-	switch t.gohostos {
-	case "windows", "plan9":
-		return false
-	}
-	return true
-}
-
-func (t *tester) raceDetectorSupported() bool {
-	switch t.gohostos {
-	case "linux", "darwin", "freebsd", "windows":
-		return t.cgoEnabled && t.goarch == "amd64" && t.gohostos == t.goos
-	}
-	return false
-}
-
-func (t *tester) raceTest() error {
-	if err := t.dirCmd("src", "go", "test", "-race", "-i", "runtime/race", "flag", "os/exec").Run(); err != nil {
-		return err
-	}
-	if err := t.dirCmd("src", "go", "test", "-race", "-run=Output", "runtime/race").Run(); err != nil {
-		return err
-	}
-	if err := t.dirCmd("src", "go", "test", "-race", "-short", "flag", "os/exec").Run(); err != nil {
-		return err
-	}
-	if t.cgoEnabled {
-		env := mergeEnvLists([]string{"GOTRACEBACK=2"}, os.Environ())
-		cmd := t.dirCmd("misc/cgo/test", "go", "test", "-race", "-short")
-		cmd.Env = env
-		if err := cmd.Run(); err != nil {
-			return err
-		}
-	}
-	if t.extLink() {
-		// Test with external linking; see issue 9133.
-		if err := t.dirCmd("src", "go", "test", "-race", "-short", "-ldflags=-linkmode=external", "flag", "os/exec").Run(); err != nil {
-			return err
-		}
-	}
-	return nil
-}
-
-func (t *tester) testDirTest(shard, shards int) error {
-	const runExe = "runtest.exe" // named exe for Windows, but harmless elsewhere
-	cmd := t.dirCmd("test", "go", "build", "-o", runExe, "run.go")
-	cmd.Env = mergeEnvLists([]string{"GOOS=" + t.gohostos, "GOARCH=" + t.gohostarch, "GOMAXPROCS="}, os.Environ())
-	if err := cmd.Run(); err != nil {
-		return err
-	}
-	absExe := filepath.Join(cmd.Dir, runExe)
-	defer os.Remove(absExe)
-	return t.dirCmd("test", absExe,
-		fmt.Sprintf("--shard=%d", shard),
-		fmt.Sprintf("--shards=%d", shards),
-	).Run()
-}
-
-// mergeEnvLists merges the two environment lists such that
-// variables with the same name in "in" replace those in "out".
-// out may be mutated.
-func mergeEnvLists(in, out []string) []string {
-NextVar:
-	for _, inkv := range in {
-		k := strings.SplitAfterN(inkv, "=", 2)[0]
-		for i, outkv := range out {
-			if strings.HasPrefix(outkv, k) {
-				out[i] = inkv
-				continue NextVar
-			}
-		}
-		out = append(out, inkv)
-	}
-	return out
-}
diff --git a/src/cmd/dist/util.go b/src/cmd/dist/util.go
deleted file mode 100644
index f13210f..0000000
--- a/src/cmd/dist/util.go
+++ /dev/null
@@ -1,559 +0,0 @@
-// Copyright 2012 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
-	"bytes"
-	"fmt"
-	"io/ioutil"
-	"os"
-	"os/exec"
-	"path/filepath"
-	"runtime"
-	"sort"
-	"strconv"
-	"strings"
-	"sync"
-	"sync/atomic"
-	"time"
-)
-
-// pathf is fmt.Sprintf for generating paths
-// (on windows it turns / into \ after the printf).
-func pathf(format string, args ...interface{}) string {
-	return filepath.Clean(fmt.Sprintf(format, args...))
-}
-
-// filter returns a slice containing the elements x from list for which f(x) == true.
-func filter(list []string, f func(string) bool) []string {
-	var out []string
-	for _, x := range list {
-		if f(x) {
-			out = append(out, x)
-		}
-	}
-	return out
-}
-
-// uniq returns a sorted slice containing the unique elements of list.
-func uniq(list []string) []string {
-	out := make([]string, len(list))
-	copy(out, list)
-	sort.Strings(out)
-	keep := out[:0]
-	for _, x := range out {
-		if len(keep) == 0 || keep[len(keep)-1] != x {
-			keep = append(keep, x)
-		}
-	}
-	return keep
-}
-
-// splitlines returns a slice with the result of splitting
-// the input p after each \n.
-func splitlines(p string) []string {
-	return strings.SplitAfter(p, "\n")
-}
-
-// splitfields replaces the vector v with the result of splitting
-// the input p into non-empty fields containing no spaces.
-func splitfields(p string) []string {
-	return strings.Fields(p)
-}
-
-const (
-	CheckExit = 1 << iota
-	ShowOutput
-	Background
-)
-
-var outputLock sync.Mutex
-
-// run runs the command line cmd in dir.
-// If mode has ShowOutput set, run collects cmd's output and returns it as a string;
-// otherwise, run prints cmd's output to standard output after the command finishes.
-// If mode has CheckExit set and the command fails, run calls fatal.
-// If mode has Background set, this command is being run as a
-// Background job. Only bgrun should use the Background mode,
-// not other callers.
-func run(dir string, mode int, cmd ...string) string {
-	if vflag > 1 {
-		errprintf("run: %s\n", strings.Join(cmd, " "))
-	}
-
-	xcmd := exec.Command(cmd[0], cmd[1:]...)
-	xcmd.Dir = dir
-	var data []byte
-	var err error
-
-	// If we want to show command output and this is not
-	// a background command, assume it's the only thing
-	// running, so we can just let it write directly stdout/stderr
-	// as it runs without fear of mixing the output with some
-	// other command's output. Not buffering lets the output
-	// appear as it is printed instead of once the command exits.
-	// This is most important for the invocation of 'go1.4 build -v bootstrap/...'.
-	if mode&(Background|ShowOutput) == ShowOutput {
-		xcmd.Stdout = os.Stdout
-		xcmd.Stderr = os.Stderr
-		err = xcmd.Run()
-	} else {
-		data, err = xcmd.CombinedOutput()
-	}
-	if err != nil && mode&CheckExit != 0 {
-		outputLock.Lock()
-		if len(data) > 0 {
-			xprintf("%s\n", data)
-		}
-		outputLock.Unlock()
-		if mode&Background != 0 {
-			bgdied.Done()
-		}
-		fatal("FAILED: %v: %v", strings.Join(cmd, " "), err)
-	}
-	if mode&ShowOutput != 0 {
-		outputLock.Lock()
-		os.Stdout.Write(data)
-		outputLock.Unlock()
-	}
-	if vflag > 2 {
-		errprintf("run: %s DONE\n", strings.Join(cmd, " "))
-	}
-	return string(data)
-}
-
-var maxbg = 4 /* maximum number of jobs to run at once */
-
-var (
-	bgwork = make(chan func(), 1e5)
-	bgdone = make(chan struct{}, 1e5)
-
-	bgdied sync.WaitGroup
-	nwork  int32
-	ndone  int32
-
-	dying  = make(chan bool)
-	nfatal int32
-)
-
-func bginit() {
-	bgdied.Add(maxbg)
-	for i := 0; i < maxbg; i++ {
-		go bghelper()
-	}
-}
-
-func bghelper() {
-	for {
-		w := <-bgwork
-		w()
-
-		// Stop if we're dying.
-		if atomic.LoadInt32(&nfatal) > 0 {
-			bgdied.Done()
-			return
-		}
-	}
-}
-
-// bgrun is like run but runs the command in the background.
-// CheckExit|ShowOutput mode is implied (since output cannot be returned).
-func bgrun(dir string, cmd ...string) {
-	bgwork <- func() {
-		run(dir, CheckExit|ShowOutput|Background, cmd...)
-	}
-}
-
-// bgwait waits for pending bgruns to finish.
-// bgwait must be called from only a single goroutine at a time.
-func bgwait() {
-	var wg sync.WaitGroup
-	wg.Add(maxbg)
-	done := make(chan bool)
-	for i := 0; i < maxbg; i++ {
-		bgwork <- func() {
-			wg.Done()
-
-			// Hold up bg goroutine until either the wait finishes
-			// or the program starts dying due to a call to fatal.
-			select {
-			case <-dying:
-			case <-done:
-			}
-		}
-	}
-	wg.Wait()
-	close(done)
-}
-
-// xgetwd returns the current directory.
-func xgetwd() string {
-	wd, err := os.Getwd()
-	if err != nil {
-		fatal("%s", err)
-	}
-	return wd
-}
-
-// xrealwd returns the 'real' name for the given path.
-// real is defined as what xgetwd returns in that directory.
-func xrealwd(path string) string {
-	old := xgetwd()
-	if err := os.Chdir(path); err != nil {
-		fatal("chdir %s: %v", path, err)
-	}
-	real := xgetwd()
-	if err := os.Chdir(old); err != nil {
-		fatal("chdir %s: %v", old, err)
-	}
-	return real
-}
-
-// isdir reports whether p names an existing directory.
-func isdir(p string) bool {
-	fi, err := os.Stat(p)
-	return err == nil && fi.IsDir()
-}
-
-// isfile reports whether p names an existing file.
-func isfile(p string) bool {
-	fi, err := os.Stat(p)
-	return err == nil && fi.Mode().IsRegular()
-}
-
-// mtime returns the modification time of the file p.
-func mtime(p string) time.Time {
-	fi, err := os.Stat(p)
-	if err != nil {
-		return time.Time{}
-	}
-	return fi.ModTime()
-}
-
-// isabs reports whether p is an absolute path.
-func isabs(p string) bool {
-	return filepath.IsAbs(p)
-}
-
-// readfile returns the content of the named file.
-func readfile(file string) string {
-	data, err := ioutil.ReadFile(file)
-	if err != nil {
-		fatal("%v", err)
-	}
-	return string(data)
-}
-
-const (
-	writeExec = 1 << iota
-	writeSkipSame
-)
-
-// writefile writes b to the named file, creating it if needed.
-// if exec is non-zero, marks the file as executable.
-// If the file already exists and has the expected content,
-// it is not rewritten, to avoid changing the time stamp.
-func writefile(b, file string, flag int) {
-	new := []byte(b)
-	if flag&writeSkipSame != 0 {
-		old, err := ioutil.ReadFile(file)
-		if err == nil && bytes.Equal(old, new) {
-			return
-		}
-	}
-	mode := os.FileMode(0666)
-	if flag&writeExec != 0 {
-		mode = 0777
-	}
-	err := ioutil.WriteFile(file, new, mode)
-	if err != nil {
-		fatal("%v", err)
-	}
-}
-
-// xmkdir creates the directory p.
-func xmkdir(p string) {
-	err := os.Mkdir(p, 0777)
-	if err != nil {
-		fatal("%v", err)
-	}
-}
-
-// xmkdirall creates the directory p and its parents, as needed.
-func xmkdirall(p string) {
-	err := os.MkdirAll(p, 0777)
-	if err != nil {
-		fatal("%v", err)
-	}
-}
-
-// xremove removes the file p.
-func xremove(p string) {
-	if vflag > 2 {
-		errprintf("rm %s\n", p)
-	}
-	os.Remove(p)
-}
-
-// xremoveall removes the file or directory tree rooted at p.
-func xremoveall(p string) {
-	if vflag > 2 {
-		errprintf("rm -r %s\n", p)
-	}
-	os.RemoveAll(p)
-}
-
-// xreaddir replaces dst with a list of the names of the files and subdirectories in dir.
-// The names are relative to dir; they are not full paths.
-func xreaddir(dir string) []string {
-	f, err := os.Open(dir)
-	if err != nil {
-		fatal("%v", err)
-	}
-	defer f.Close()
-	names, err := f.Readdirnames(-1)
-	if err != nil {
-		fatal("reading %s: %v", dir, err)
-	}
-	return names
-}
-
-// xreaddir replaces dst with a list of the names of the files in dir.
-// The names are relative to dir; they are not full paths.
-func xreaddirfiles(dir string) []string {
-	f, err := os.Open(dir)
-	if err != nil {
-		fatal("%v", err)
-	}
-	defer f.Close()
-	infos, err := f.Readdir(-1)
-	if err != nil {
-		fatal("reading %s: %v", dir, err)
-	}
-	var names []string
-	for _, fi := range infos {
-		if !fi.IsDir() {
-			names = append(names, fi.Name())
-		}
-	}
-	return names
-}
-
-// xworkdir creates a new temporary directory to hold object files
-// and returns the name of that directory.
-func xworkdir() string {
-	name, err := ioutil.TempDir("", "go-tool-dist-")
-	if err != nil {
-		fatal("%v", err)
-	}
-	return name
-}
-
-// fatal prints an error message to standard error and exits.
-func fatal(format string, args ...interface{}) {
-	fmt.Fprintf(os.Stderr, "go tool dist: %s\n", fmt.Sprintf(format, args...))
-
-	// Wait for background goroutines to finish,
-	// so that exit handler that removes the work directory
-	// is not fighting with active writes or open files.
-	if atomic.AddInt32(&nfatal, 1) == 1 {
-		close(dying)
-	}
-	for i := 0; i < maxbg; i++ {
-		bgwork <- func() {} // wake up workers so they notice nfatal > 0
-	}
-	bgdied.Wait()
-
-	xexit(2)
-}
-
-var atexits []func()
-
-// xexit exits the process with return code n.
-func xexit(n int) {
-	for i := len(atexits) - 1; i >= 0; i-- {
-		atexits[i]()
-	}
-	os.Exit(n)
-}
-
-// xatexit schedules the exit-handler f to be run when the program exits.
-func xatexit(f func()) {
-	atexits = append(atexits, f)
-}
-
-// xprintf prints a message to standard output.
-func xprintf(format string, args ...interface{}) {
-	fmt.Printf(format, args...)
-}
-
-// errprintf prints a message to standard output.
-func errprintf(format string, args ...interface{}) {
-	fmt.Fprintf(os.Stderr, format, args...)
-}
-
-// main takes care of OS-specific startup and dispatches to xmain.
-func main() {
-	os.Setenv("TERM", "dumb") // disable escape codes in clang errors
-
-	slash = string(filepath.Separator)
-
-	gohostos = runtime.GOOS
-	switch gohostos {
-	case "darwin":
-		// Even on 64-bit platform, darwin uname -m prints i386.
-		if strings.Contains(run("", CheckExit, "sysctl", "machdep.cpu.extfeatures"), "EM64T") {
-			gohostarch = "amd64"
-		}
-	case "solaris":
-		// Even on 64-bit platform, solaris uname -m prints i86pc.
-		out := run("", CheckExit, "isainfo", "-n")
-		if strings.Contains(out, "amd64") {
-			gohostarch = "amd64"
-		}
-		if strings.Contains(out, "i386") {
-			gohostarch = "386"
-		}
-	case "plan9":
-		gohostarch = os.Getenv("objtype")
-		if gohostarch == "" {
-			fatal("$objtype is unset")
-		}
-	case "windows":
-		exe = ".exe"
-	}
-
-	sysinit()
-
-	if gohostarch == "" {
-		// Default Unix system.
-		out := run("", CheckExit, "uname", "-m")
-		switch {
-		case strings.Contains(out, "x86_64"), strings.Contains(out, "amd64"):
-			gohostarch = "amd64"
-		case strings.Contains(out, "86"):
-			gohostarch = "386"
-		case strings.Contains(out, "arm"):
-			gohostarch = "arm"
-		case strings.Contains(out, "aarch64"):
-			gohostarch = "arm64"
-		case strings.Contains(out, "ppc64le"):
-			gohostarch = "ppc64le"
-		case strings.Contains(out, "ppc64"):
-			gohostarch = "ppc64"
-		case gohostos == "darwin":
-			if strings.Contains(run("", CheckExit, "uname", "-v"), "RELEASE_ARM_") {
-				gohostarch = "arm"
-			}
-		default:
-			fatal("unknown architecture: %s", out)
-		}
-	}
-
-	if gohostarch == "arm" {
-		maxbg = min(maxbg, runtime.NumCPU())
-	}
-	bginit()
-
-	// The OS X 10.6 linker does not support external linking mode.
-	// See golang.org/issue/5130.
-	//
-	// OS X 10.6 does not work with clang either, but OS X 10.9 requires it.
-	// It seems to work with OS X 10.8, so we default to clang for 10.8 and later.
-	// See golang.org/issue/5822.
-	//
-	// Roughly, OS X 10.N shows up as uname release (N+4),
-	// so OS X 10.6 is uname version 10 and OS X 10.8 is uname version 12.
-	if gohostos == "darwin" {
-		rel := run("", CheckExit, "uname", "-r")
-		if i := strings.Index(rel, "."); i >= 0 {
-			rel = rel[:i]
-		}
-		osx, _ := strconv.Atoi(rel)
-		if osx <= 6+4 {
-			goextlinkenabled = "0"
-		}
-		if osx >= 8+4 {
-			defaultclang = true
-		}
-	}
-
-	xinit()
-	xmain()
-	xexit(0)
-}
-
-// xsamefile reports whether f1 and f2 are the same file (or dir)
-func xsamefile(f1, f2 string) bool {
-	fi1, err1 := os.Stat(f1)
-	fi2, err2 := os.Stat(f2)
-	if err1 != nil || err2 != nil {
-		return f1 == f2
-	}
-	return os.SameFile(fi1, fi2)
-}
-
-func xgetgoarm() string {
-	if goos == "nacl" {
-		// NaCl guarantees VFPv3 and is always cross-compiled.
-		return "7"
-	}
-	if goos == "darwin" {
-		// Assume all darwin/arm devices are have VFPv3. This
-		// port is also mostly cross-compiled, so it makes little
-		// sense to auto-detect the setting.
-		return "7"
-	}
-	if gohostarch != "arm" || goos != gohostos {
-		// Conservative default for cross-compilation.
-		return "5"
-	}
-	if goos == "freebsd" || goos == "openbsd" {
-		// FreeBSD has broken VFP support.
-		// OpenBSD currently only supports softfloat.
-		return "5"
-	}
-	if goos != "linux" {
-		// All other arm platforms that we support
-		// require ARMv7.
-		return "7"
-	}
-	cpuinfo := readfile("/proc/cpuinfo")
-	goarm := "5"
-	for _, line := range splitlines(cpuinfo) {
-		line := strings.SplitN(line, ":", 2)
-		if len(line) < 2 {
-			continue
-		}
-		if strings.TrimSpace(line[0]) != "Features" {
-			continue
-		}
-		features := splitfields(line[1])
-		sort.Strings(features) // so vfpv3 sorts after vfp
-
-		// Infer GOARM value from the vfp features available
-		// on this host. Values of GOARM detected are:
-		// 5: no vfp support was found
-		// 6: vfp (v1) support was detected, but no higher
-		// 7: vfpv3 support was detected.
-		// This matches the assertions in runtime.checkarm.
-		for _, f := range features {
-			switch f {
-			case "vfp":
-				goarm = "6"
-			case "vfpv3":
-				goarm = "7"
-			}
-		}
-	}
-	return goarm
-}
-
-func min(a, b int) int {
-	if a < b {
-		return a
-	}
-	return b
-}
diff --git a/src/cmd/dist/util_gc.go b/src/cmd/dist/util_gc.go
deleted file mode 100644
index 9f6cfd0..0000000
--- a/src/cmd/dist/util_gc.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-package main
-
-func cpuid(info *[4]uint32, ax uint32)
-
-func cansse2() bool {
-	if gohostarch != "386" && gohostarch != "amd64" {
-		return false
-	}
-
-	var info [4]uint32
-	cpuid(&info, 1)
-	return info[3]&(1<<26) != 0 // SSE2
-}
diff --git a/src/cmd/dist/util_gccgo.go b/src/cmd/dist/util_gccgo.go
deleted file mode 100644
index 14ac70b..0000000
--- a/src/cmd/dist/util_gccgo.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gccgo
-
-package main
-
-/*
-int supports_sse2() {
-#if defined(__i386__) || defined(__x86_64__)
-	return __builtin_cpu_supports("sse2");
-#else
-	return 0;
-#endif
-}
-*/
-import "C"
-
-func cansse2() bool { return C.supports_sse2() != 0 }
diff --git a/src/cmd/doc/doc_test.go b/src/cmd/doc/doc_test.go
deleted file mode 100644
index b97cc76..0000000
--- a/src/cmd/doc/doc_test.go
+++ /dev/null
@@ -1,348 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
-	"bytes"
-	"flag"
-	"os"
-	"os/exec"
-	"regexp"
-	"runtime"
-	"testing"
-)
-
-const (
-	dataDir = "testdata"
-	binary  = "testdoc"
-)
-
-type test struct {
-	name string
-	args []string // Arguments to "[go] doc".
-	yes  []string // Regular expressions that should match.
-	no   []string // Regular expressions that should not match.
-}
-
-const p = "cmd/doc/testdata"
-
-var tests = []test{
-	// Sanity check.
-	{
-		"sanity check",
-		[]string{p},
-		[]string{`type ExportedType struct`},
-		nil,
-	},
-
-	// Package dump includes import, package statement.
-	{
-		"package clause",
-		[]string{p},
-		[]string{`package pkg.*cmd/doc/testdata`},
-		nil,
-	},
-
-	// Constants.
-	// Package dump
-	{
-		"full package",
-		[]string{p},
-		[]string{
-			`Package comment`,
-			`const ExportedConstant = 1`,                            // Simple constant.
-			`const ConstOne = 1`,                                    // First entry in constant block.
-			`var ExportedVariable = 1`,                              // Simple variable.
-			`var VarOne = 1`,                                        // First entry in variable block.
-			`func ExportedFunc\(a int\) bool`,                       // Function.
-			`type ExportedType struct { ... }`,                      // Exported type.
-			`const ExportedTypedConstant ExportedType = iota`,       // Typed constant.
-			`const ExportedTypedConstant_unexported unexportedType`, // Typed constant, exported for unexported type.
-		},
-		[]string{
-			`const internalConstant = 2`,        // No internal constants.
-			`var internalVariable = 2`,          // No internal variables.
-			`func internalFunc(a int) bool`,     // No internal functions.
-			`Comment about exported constant`,   // No comment for single constant.
-			`Comment about exported variable`,   // No comment for single variable.
-			`Comment about block of constants.`, // No comment for constant block.
-			`Comment about block of variables.`, // No comment for variable block.
-			`Comment before ConstOne`,           // No comment for first entry in constant block.
-			`Comment before VarOne`,             // No comment for first entry in variable block.
-			`ConstTwo = 2`,                      // No second entry in constant block.
-			`VarTwo = 2`,                        // No second entry in variable block.
-			`type unexportedType`,               // No unexported type.
-			`unexportedTypedConstant`,           // No unexported typed constant.
-			`Field`,                             // No fields.
-			`Method`,                            // No methods.
-		},
-	},
-	// Package dump -u
-	{
-		"full package with u",
-		[]string{`-u`, p},
-		[]string{
-			`const ExportedConstant = 1`,      // Simple constant.
-			`const internalConstant = 2`,      // Internal constants.
-			`func internalFunc\(a int\) bool`, // Internal functions.
-		},
-		[]string{
-			`Comment about exported constant`,  // No comment for simple constant.
-			`Comment about block of constants`, // No comment for constant block.
-			`Comment about internal function`,  // No comment for internal function.
-		},
-	},
-
-	// Single constant.
-	{
-		"single constant",
-		[]string{p, `ExportedConstant`},
-		[]string{
-			`Comment about exported constant`, // Include comment.
-			`const ExportedConstant = 1`,
-		},
-		nil,
-	},
-	// Single constant -u.
-	{
-		"single constant with -u",
-		[]string{`-u`, p, `internalConstant`},
-		[]string{
-			`Comment about internal constant`, // Include comment.
-			`const internalConstant = 2`,
-		},
-		nil,
-	},
-	// Block of constants.
-	{
-		"block of constants",
-		[]string{p, `ConstTwo`},
-		[]string{
-			`Comment before ConstOne.\n.*ConstOne = 1`,    // First...
-			`ConstTwo = 2.*Comment on line with ConstTwo`, // And second show up.
-			`Comment about block of constants`,            // Comment does too.
-		},
-		[]string{
-			`constThree`, // No unexported constant.
-		},
-	},
-	// Block of constants -u.
-	{
-		"block of constants with -u",
-		[]string{"-u", p, `constThree`},
-		[]string{
-			`constThree = 3.*Comment on line with constThree`,
-		},
-		nil,
-	},
-
-	// Single variable.
-	{
-		"single variable",
-		[]string{p, `ExportedVariable`},
-		[]string{
-			`ExportedVariable`, // Include comment.
-			`var ExportedVariable = 1`,
-		},
-		nil,
-	},
-	// Single variable -u.
-	{
-		"single variable with -u",
-		[]string{`-u`, p, `internalVariable`},
-		[]string{
-			`Comment about internal variable`, // Include comment.
-			`var internalVariable = 2`,
-		},
-		nil,
-	},
-	// Block of variables.
-	{
-		"block of variables",
-		[]string{p, `VarTwo`},
-		[]string{
-			`Comment before VarOne.\n.*VarOne = 1`,    // First...
-			`VarTwo = 2.*Comment on line with VarTwo`, // And second show up.
-			`Comment about block of variables`,        // Comment does too.
-		},
-		[]string{
-			`varThree= 3`, // No unexported variable.
-		},
-	},
-	// Block of variables -u.
-	{
-		"block of variables with -u",
-		[]string{"-u", p, `varThree`},
-		[]string{
-			`varThree = 3.*Comment on line with varThree`,
-		},
-		nil,
-	},
-
-	// Function.
-	{
-		"function",
-		[]string{p, `ExportedFunc`},
-		[]string{
-			`Comment about exported function`, // Include comment.
-			`func ExportedFunc\(a int\) bool`,
-		},
-		nil,
-	},
-	// Function -u.
-	{
-		"function with -u",
-		[]string{"-u", p, `internalFunc`},
-		[]string{
-			`Comment about internal function`, // Include comment.
-			`func internalFunc\(a int\) bool`,
-		},
-		nil,
-	},
-
-	// Type.
-	{
-		"type",
-		[]string{p, `ExportedType`},
-		[]string{
-			`Comment about exported type`, // Include comment.
-			`type ExportedType struct`,    // Type definition.
-			`Comment before exported field.*\n.*ExportedField +int`,
-			`Has unexported fields`,
-			`func \(ExportedType\) ExportedMethod\(a int\) bool`,
-			`const ExportedTypedConstant ExportedType = iota`, // Must include associated constant.
-			`func ExportedTypeConstructor\(\) \*ExportedType`, // Must include constructor.
-		},
-		[]string{
-			`unexportedField`,                // No unexported field.
-			`Comment about exported method.`, // No comment about exported method.
-			`unexportedMethod`,               // No unexported method.
-			`unexportedTypedConstant`,        // No unexported constant.
-		},
-	},
-	// Type -u with unexported fields.
-	{
-		"type with unexported fields and -u",
-		[]string{"-u", p, `ExportedType`},
-		[]string{
-			`Comment about exported type`, // Include comment.
-			`type ExportedType struct`,    // Type definition.
-			`Comment before exported field.*\n.*ExportedField +int`,
-			`unexportedField int.*Comment on line with unexported field.`,
-			`func \(ExportedType\) unexportedMethod\(a int\) bool`,
-			`unexportedTypedConstant`,
-		},
-		[]string{
-			`Has unexported fields`,
-		},
-	},
-	// Unexported type with -u.
-	{
-		"unexported type with -u",
-		[]string{"-u", p, `unexportedType`},
-		[]string{
-			`Comment about unexported type`, // Include comment.
-			`type unexportedType int`,       // Type definition.
-			`func \(unexportedType\) ExportedMethod\(\) bool`,
-			`func \(unexportedType\) unexportedMethod\(\) bool`,
-			`ExportedTypedConstant_unexported unexportedType = iota`,
-			`const unexportedTypedConstant unexportedType = 1`,
-		},
-		nil,
-	},
-
-	// Method.
-	{
-		"method",
-		[]string{p, `ExportedType.ExportedMethod`},
-		[]string{
-			`func \(ExportedType\) ExportedMethod\(a int\) bool`,
-			`Comment about exported method.`,
-		},
-		nil,
-	},
-	// Method  with -u.
-	{
-		"method with -u",
-		[]string{"-u", p, `ExportedType.unexportedMethod`},
-		[]string{
-			`func \(ExportedType\) unexportedMethod\(a int\) bool`,
-			`Comment about unexported method.`,
-		},
-		nil,
-	},
-
-	// Case matching off.
-	{
-		"case matching off",
-		[]string{p, `casematch`},
-		[]string{
-			`CaseMatch`,
-			`Casematch`,
-		},
-		nil,
-	},
-
-	// Case matching on.
-	{
-		"case matching on",
-		[]string{"-c", p, `Casematch`},
-		[]string{
-			`Casematch`,
-		},
-		[]string{
-			`CaseMatch`,
-		},
-	},
-}
-
-func TestDoc(t *testing.T) {
-	if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") {
-		t.Skip("TODO: on darwin/arm, test fails: no such package cmd/doc/testdata")
-	}
-	for _, test := range tests {
-		var b bytes.Buffer
-		var flagSet flag.FlagSet
-		err := do(&b, &flagSet, test.args)
-		if err != nil {
-			t.Fatalf("%s: %s\n", test.name, err)
-		}
-		output := b.Bytes()
-		failed := false
-		for j, yes := range test.yes {
-			re, err := regexp.Compile(yes)
-			if err != nil {
-				t.Fatalf("%s.%d: compiling %#q: %s", test.name, j, yes, err)
-			}
-			if !re.Match(output) {
-				t.Errorf("%s.%d: no match for %s %#q", test.name, j, test.args, yes)
-				failed = true
-			}
-		}
-		for j, no := range test.no {
-			re, err := regexp.Compile(no)
-			if err != nil {
-				t.Fatalf("%s.%d: compiling %#q: %s", test.name, j, no, err)
-			}
-			if re.Match(output) {
-				t.Errorf("%s.%d: incorrect match for %s %#q", test.name, j, test.args, no)
-				failed = true
-			}
-		}
-		if failed {
-			t.Logf("\n%s", output)
-		}
-	}
-}
-
-// run runs the command, but calls t.Fatal if there is an error.
-func run(c *exec.Cmd, t *testing.T) []byte {
-	output, err := c.CombinedOutput()
-	if err != nil {
-		os.Stdout.Write(output)
-		t.Fatal(err)
-	}
-	return output
-}
diff --git a/src/cmd/doc/main.go b/src/cmd/doc/main.go
deleted file mode 100644
index dda6aec..0000000
--- a/src/cmd/doc/main.go
+++ /dev/null
@@ -1,354 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Doc (usually run as go doc) accepts zero, one or two arguments.
-//
-// Zero arguments:
-//	go doc
-// Show the documentation for the package in the current directory.
-//
-// One argument:
-//	go doc <pkg>
-//	go doc <sym>[.<method>]
-//	go doc [<pkg>].<sym>[.<method>]
-// The first item in this list that succeeds is the one whose documentation
-// is printed. If there is a symbol but no package, the package in the current
-// directory is chosen.
-//
-// Two arguments:
-//	go doc <pkg> <sym>[.<method>]
-//
-// Show the documentation for the package, symbol, and method. The
-// first argument must be a full package path. This is similar to the
-// command-line usage for the godoc command.
-//
-// For commands, unless the -cmd flag is present "go doc command"
-// shows only the package-level docs for the package.
-//
-// For complete documentation, run "go help doc".
-package main
-
-import (
-	"flag"
-	"fmt"
-	"go/build"
-	"io"
-	"log"
-	"os"
-	"path"
-	"path/filepath"
-	"strings"
-	"unicode"
-	"unicode/utf8"
-)
-
-var (
-	unexported bool // -u flag
-	matchCase  bool // -c flag
-	showCmd    bool // -cmd flag
-)
-
-// usage is a replacement usage function for the flags package.
-func usage() {
-	fmt.Fprintf(os.Stderr, "Usage of [go] doc:\n")
-	fmt.Fprintf(os.Stderr, "\tgo doc\n")
-	fmt.Fprintf(os.Stderr, "\tgo doc <pkg>\n")
-	fmt.Fprintf(os.Stderr, "\tgo doc <sym>[.<method>]\n")
-	fmt.Fprintf(os.Stderr, "\tgo doc [<pkg>].<sym>[.<method>]\n")
-	fmt.Fprintf(os.Stderr, "\tgo doc <pkg> <sym>[.<method>]\n")
-	fmt.Fprintf(os.Stderr, "For more information run\n")
-	fmt.Fprintf(os.Stderr, "\tgo help doc\n\n")
-	fmt.Fprintf(os.Stderr, "Flags:\n")
-	flag.PrintDefaults()
-	os.Exit(2)
-}
-
-func main() {
-	log.SetFlags(0)
-	log.SetPrefix("doc: ")
-	err := do(os.Stdout, flag.CommandLine, os.Args[1:])
-	if err != nil {
-		log.Fatal(err)
-	}
-}
-
-// do is the workhorse, broken out of main to make testing easier.
-func do(writer io.Writer, flagSet *flag.FlagSet, args []string) (err error) {
-	flagSet.Usage = usage
-	unexported = false
-	matchCase = false
-	flagSet.BoolVar(&unexported, "u", false, "show unexported symbols as well as exported")
-	flagSet.BoolVar(&matchCase, "c", false, "symbol matching honors case (paths not affected)")
-	flagSet.BoolVar(&showCmd, "cmd", false, "show symbols with package docs even if package is a command")
-	flagSet.Parse(args)
-	buildPackage, userPath, symbol := parseArgs(flagSet.Args())
-	symbol, method := parseSymbol(symbol)
-	pkg := parsePackage(writer, buildPackage, userPath)
-	defer func() {
-		pkg.flush()
-		e := recover()
-		if e == nil {
-			return
-		}
-		pkgError, ok := e.(PackageError)
-		if ok {
-			err = pkgError
-			return
-		}
-		panic(e)
-	}()
-	switch {
-	case symbol == "":
-		pkg.packageDoc()
-		return
-	case method == "":
-		pkg.symbolDoc(symbol)
-	default:
-		pkg.methodDoc(symbol, method)
-	}
-	return nil
-}
-
-// parseArgs analyzes the arguments (if any) and returns the package
-// it represents, the part of the argument the user used to identify
-// the path (or "" if it's the current package) and the symbol
-// (possibly with a .method) within that package.
-// parseSymbol is used to analyze the symbol itself.
-func parseArgs(args []string) (*build.Package, string, string) {
-	switch len(args) {
-	default:
-		usage()
-	case 0:
-		// Easy: current directory.
-		return importDir(pwd()), "", ""
-	case 1:
-		// Done below.
-	case 2:
-		// Package must be importable.
-		pkg, err := build.Import(args[0], "", build.ImportComment)
-		if err != nil {
-			log.Fatalf("%s", err)
-		}
-		return pkg, args[0], args[1]
-	}
-	// Usual case: one argument.
-	arg := args[0]
-	// If it contains slashes, it begins with a package path.
-	// First, is it a complete package path as it is? If so, we are done.
-	// This avoids confusion over package paths that have other
-	// package paths as their prefix.
-	pkg, err := build.Import(arg, "", build.ImportComment)
-	if err == nil {
-		return pkg, arg, ""
-	}
-	// Another disambiguator: If the symbol starts with an upper
-	// case letter, it can only be a symbol in the current directory.
-	// Kills the problem caused by case-insensitive file systems
-	// matching an upper case name as a package name.
-	if isUpper(arg) {
-		pkg, err := build.ImportDir(".", build.ImportComment)
-		if err == nil {
-			return pkg, "", arg
-		}
-	}
-	// If it has a slash, it must be a package path but there is a symbol.
-	// It's the last package path we care about.
-	slash := strings.LastIndex(arg, "/")
-	// There may be periods in the package path before or after the slash
-	// and between a symbol and method.
-	// Split the string at various periods to see what we find.
-	// In general there may be ambiguities but this should almost always
-	// work.
-	var period int
-	// slash+1: if there's no slash, the value is -1 and start is 0; otherwise
-	// start is the byte after the slash.
-	for start := slash + 1; start < len(arg); start = period + 1 {
-		period = strings.Index(arg[start:], ".")
-		symbol := ""
-		if period < 0 {
-			period = len(arg)
-		} else {
-			period += start
-			symbol = arg[period+1:]
-		}
-		// Have we identified a package already?
-		pkg, err := build.Import(arg[0:period], "", build.ImportComment)
-		if err == nil {
-			return pkg, arg[0:period], symbol
-		}
-		// See if we have the basename or tail of a package, as in json for encoding/json
-		// or ivy/value for robpike.io/ivy/value.
-		path := findPackage(arg[0:period])
-		if path != "" {
-			return importDir(path), arg[0:period], symbol
-		}
-	}
-	// If it has a slash, we've failed.
-	if slash >= 0 {
-		log.Fatalf("no such package %s", arg[0:period])
-	}
-	// Guess it's a symbol in the current directory.
-	return importDir(pwd()), "", arg
-}
-
-// importDir is just an error-catching wrapper for build.ImportDir.
-func importDir(dir string) *build.Package {
-	pkg, err := build.ImportDir(dir, build.ImportComment)
-	if err != nil {
-		log.Fatal(err)
-	}
-	return pkg
-}
-
-// parseSymbol breaks str apart into a symbol and method.
-// Both may be missing or the method may be missing.
-// If present, each must be a valid Go identifier.
-func parseSymbol(str string) (symbol, method string) {
-	if str == "" {
-		return
-	}
-	elem := strings.Split(str, ".")
-	switch len(elem) {
-	case 1:
-	case 2:
-		method = elem[1]
-		isIdentifier(method)
-	default:
-		log.Printf("too many periods in symbol specification")
-		usage()
-	}
-	symbol = elem[0]
-	isIdentifier(symbol)
-	return
-}
-
-// isIdentifier checks that the name is valid Go identifier, and
-// logs and exits if it is not.
-func isIdentifier(name string) {
-	if len(name) == 0 {
-		log.Fatal("empty symbol")
-	}
-	for i, ch := range name {
-		if unicode.IsLetter(ch) || ch == '_' || i > 0 && unicode.IsDigit(ch) {
-			continue
-		}
-		log.Fatalf("invalid identifier %q", name)
-	}
-}
-
-// isExported reports whether the name is an exported identifier.
-// If the unexported flag (-u) is true, isExported returns true because
-// it means that we treat the name as if it is exported.
-func isExported(name string) bool {
-	return unexported || isUpper(name)
-}
-
-// isUpper reports whether the name starts with an upper case letter.
-func isUpper(name string) bool {
-	ch, _ := utf8.DecodeRuneInString(name)
-	return unicode.IsUpper(ch)
-}
-
-// findPackage returns the full file name path specified by the
-// (perhaps partial) package path pkg.
-func findPackage(pkg string) string {
-	if pkg == "" {
-		return ""
-	}
-	if isUpper(pkg) {
-		return "" // Upper case symbol cannot be a package name.
-	}
-	path := pathFor(build.Default.GOROOT, pkg)
-	if path != "" {
-		return path
-	}
-	for _, root := range splitGopath() {
-		path = pathFor(root, pkg)
-		if path != "" {
-			return path
-		}
-	}
-	return ""
-}
-
-// splitGopath splits $GOPATH into a list of roots.
-func splitGopath() []string {
-	return filepath.SplitList(build.Default.GOPATH)
-}
-
-// pathsFor recursively walks the tree at root looking for possible directories for the package:
-// those whose package path is pkg or which have a proper suffix pkg.
-func pathFor(root, pkg string) (result string) {
-	root = path.Join(root, "src")
-	slashDot := string(filepath.Separator) + "."
-	// We put a slash on the pkg so can use simple string comparison below
-	// yet avoid inadvertent matches, like /foobar matching bar.
-	pkgString := filepath.Clean(string(filepath.Separator) + pkg)
-
-	// We use panic/defer to short-circuit processing at the first match.
-	// A nil panic reports that the path has been found.
-	defer func() {
-		err := recover()
-		if err != nil {
-			panic(err)
-		}
-	}()
-
-	visit := func(pathName string, f os.FileInfo, err error) error {
-		if err != nil {
-			return nil
-		}
-		// One package per directory. Ignore the files themselves.
-		if !f.IsDir() {
-			return nil
-		}
-		// No .git or other dot nonsense please.
-		if strings.Contains(pathName, slashDot) {
-			return filepath.SkipDir
-		}
-		// Is the tail of the path correct?
-		if strings.HasSuffix(pathName, pkgString) && hasGoFiles(pathName) {
-			result = pathName
-			panic(nil)
-		}
-		return nil
-	}
-
-	filepath.Walk(root, visit)
-	return "" // Call to panic above sets the real value.
-}
-
-// hasGoFiles tests whether the directory contains at least one file with ".go"
-// extension
-func hasGoFiles(path string) bool {
-	dir, err := os.Open(path)
-	if err != nil {
-		// ignore unreadable directories
-		return false
-	}
-	defer dir.Close()
-
-	names, err := dir.Readdirnames(0)
-	if err != nil {
-		// ignore unreadable directories
-		return false
-	}
-
-	for _, name := range names {
-		if strings.HasSuffix(name, ".go") {
-			return true
-		}
-	}
-
-	return false
-}
-
-// pwd returns the current directory.
-func pwd() string {
-	wd, err := os.Getwd()
-	if err != nil {
-		log.Fatal(err)
-	}
-	return wd
-}
diff --git a/src/cmd/doc/pkg.go b/src/cmd/doc/pkg.go
deleted file mode 100644
index 569c7a3..0000000
--- a/src/cmd/doc/pkg.go
+++ /dev/null
@@ -1,552 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
-	"bytes"
-	"fmt"
-	"go/ast"
-	"go/build"
-	"go/doc"
-	"go/format"
-	"go/parser"
-	"go/token"
-	"io"
-	"log"
-	"os"
-	"unicode"
-	"unicode/utf8"
-)
-
-const (
-	punchedCardWidth = 80 // These things just won't leave us alone.
-	indentedWidth    = punchedCardWidth - len(indent)
-	indent           = "    "
-)
-
-type Package struct {
-	writer     io.Writer // Destination for output.
-	name       string    // Package name, json for encoding/json.
-	userPath   string    // String the user used to find this package.
-	unexported bool
-	matchCase  bool
-	pkg        *ast.Package // Parsed package.
-	file       *ast.File    // Merged from all files in the package
-	doc        *doc.Package
-	build      *build.Package
-	fs         *token.FileSet // Needed for printing.
-	buf        bytes.Buffer
-}
-
-type PackageError string // type returned by pkg.Fatalf.
-
-func (p PackageError) Error() string {
-	return string(p)
-}
-
-// pkg.Fatalf is like log.Fatalf, but panics so it can be recovered in the
-// main do function, so it doesn't cause an exit. Allows testing to work
-// without running a subprocess. The log prefix will be added when
-// logged in main; it is not added here.
-func (pkg *Package) Fatalf(format string, args ...interface{}) {
-	panic(PackageError(fmt.Sprintf(format, args...)))
-}
-
-// parsePackage turns the build package we found into a parsed package
-// we can then use to generate documentation.
-func parsePackage(writer io.Writer, pkg *build.Package, userPath string) *Package {
-	fs := token.NewFileSet()
-	// include tells parser.ParseDir which files to include.
-	// That means the file must be in the build package's GoFiles or CgoFiles
-	// list only (no tag-ignored files, tests, swig or other non-Go files).
-	include := func(info os.FileInfo) bool {
-		for _, name := range pkg.GoFiles {
-			if name == info.Name() {
-				return true
-			}
-		}
-		for _, name := range pkg.CgoFiles {
-			if name == info.Name() {
-				return true
-			}
-		}
-		return false
-	}
-	pkgs, err := parser.ParseDir(fs, pkg.Dir, include, parser.ParseComments)
-	if err != nil {
-		log.Fatal(err)
-	}
-	// Make sure they are all in one package.
-	if len(pkgs) != 1 {
-		log.Fatalf("multiple packages in directory %s", pkg.Dir)
-	}
-	astPkg := pkgs[pkg.Name]
-
-	// TODO: go/doc does not include typed constants in the constants
-	// list, which is what we want. For instance, time.Sunday is of type
-	// time.Weekday, so it is defined in the type but not in the
-	// Consts list for the package. This prevents
-	//	go doc time.Sunday
-	// from finding the symbol. Work around this for now, but we
-	// should fix it in go/doc.
-	// A similar story applies to factory functions.
-	docPkg := doc.New(astPkg, pkg.ImportPath, doc.AllDecls)
-	for _, typ := range docPkg.Types {
-		docPkg.Consts = append(docPkg.Consts, typ.Consts...)
-		docPkg.Vars = append(docPkg.Vars, typ.Vars...)
-		docPkg.Funcs = append(docPkg.Funcs, typ.Funcs...)
-	}
-
-	return &Package{
-		writer:   writer,
-		name:     pkg.Name,
-		userPath: userPath,
-		pkg:      astPkg,
-		file:     ast.MergePackageFiles(astPkg, 0),
-		doc:      docPkg,
-		build:    pkg,
-		fs:       fs,
-	}
-}
-
-func (pkg *Package) Printf(format string, args ...interface{}) {
-	fmt.Fprintf(&pkg.buf, format, args...)
-}
-
-func (pkg *Package) flush() {
-	_, err := pkg.writer.Write(pkg.buf.Bytes())
-	if err != nil {
-		log.Fatal(err)
-	}
-	pkg.buf.Reset() // Not needed, but it's a flush.
-}
-
-var newlineBytes = []byte("\n\n") // We never ask for more than 2.
-
-// newlines guarantees there are n newlines at the end of the buffer.
-func (pkg *Package) newlines(n int) {
-	for !bytes.HasSuffix(pkg.buf.Bytes(), newlineBytes[:n]) {
-		pkg.buf.WriteRune('\n')
-	}
-}
-
-// emit prints the node.
-func (pkg *Package) emit(comment string, node ast.Node) {
-	if node != nil {
-		err := format.Node(&pkg.buf, pkg.fs, node)
-		if err != nil {
-			log.Fatal(err)
-		}
-		if comment != "" {
-			pkg.newlines(2) // Guarantee blank line before comment.
-			doc.ToText(&pkg.buf, comment, "    ", indent, indentedWidth)
-		}
-		pkg.newlines(1)
-	}
-}
-
-var formatBuf bytes.Buffer // Reusable to avoid allocation.
-
-// formatNode is a helper function for printing.
-func (pkg *Package) formatNode(node ast.Node) []byte {
-	formatBuf.Reset()
-	format.Node(&formatBuf, pkg.fs, node)
-	return formatBuf.Bytes()
-}
-
-// oneLineFunc prints a function declaration as a single line.
-func (pkg *Package) oneLineFunc(decl *ast.FuncDecl) {
-	decl.Doc = nil
-	decl.Body = nil
-	pkg.emit("", decl)
-}
-
-// oneLineValueGenDecl prints a var or const declaration as a single line.
-func (pkg *Package) oneLineValueGenDecl(decl *ast.GenDecl) {
-	decl.Doc = nil
-	dotDotDot := ""
-	if len(decl.Specs) > 1 {
-		dotDotDot = " ..."
-	}
-	// Find the first relevant spec.
-	for i, spec := range decl.Specs {
-		valueSpec := spec.(*ast.ValueSpec) // Must succeed; we can't mix types in one genDecl.
-		if !isExported(valueSpec.Names[0].Name) {
-			continue
-		}
-		typ := ""
-		if valueSpec.Type != nil {
-			typ = fmt.Sprintf(" %s", pkg.formatNode(valueSpec.Type))
-		}
-		val := ""
-		if i < len(valueSpec.Values) && valueSpec.Values[i] != nil {
-			val = fmt.Sprintf(" = %s", pkg.formatNode(valueSpec.Values[i]))
-		}
-		pkg.Printf("%s %s%s%s%s\n", decl.Tok, valueSpec.Names[0], typ, val, dotDotDot)
-		break
-	}
-}
-
-// oneLineTypeDecl prints a type declaration as a single line.
-func (pkg *Package) oneLineTypeDecl(spec *ast.TypeSpec) {
-	spec.Doc = nil
-	spec.Comment = nil
-	switch spec.Type.(type) {
-	case *ast.InterfaceType:
-		pkg.Printf("type %s interface { ... }\n", spec.Name)
-	case *ast.StructType:
-		pkg.Printf("type %s struct { ... }\n", spec.Name)
-	default:
-		pkg.Printf("type %s %s\n", spec.Name, pkg.formatNode(spec.Type))
-	}
-}
-
-// packageDoc prints the docs for the package (package doc plus one-liners of the rest).
-func (pkg *Package) packageDoc() {
-	defer pkg.flush()
-	if pkg.showInternals() {
-		pkg.packageClause(false)
-	}
-
-	doc.ToText(&pkg.buf, pkg.doc.Doc, "", indent, indentedWidth)
-	pkg.newlines(1)
-
-	if !pkg.showInternals() {
-		// Show only package docs for commands.
-		return
-	}
-
-	pkg.newlines(1)
-	pkg.valueSummary(pkg.doc.Consts)
-	pkg.valueSummary(pkg.doc.Vars)
-	pkg.funcSummary(pkg.doc.Funcs)
-	pkg.typeSummary()
-	pkg.bugs()
-}
-
-// showInternals reports whether we should show the internals
-// of a package as opposed to just the package docs.
-// Used to decide whether to suppress internals for commands.
-// Called only by Package.packageDoc.
-func (pkg *Package) showInternals() bool {
-	return pkg.pkg.Name != "main" || showCmd
-}
-
-// packageClause prints the package clause.
-// The argument boolean, if true, suppresses the output if the
-// user's argument is identical to the actual package path or
-// is empty, meaning it's the current directory.
-func (pkg *Package) packageClause(checkUserPath bool) {
-	if checkUserPath {
-		if pkg.userPath == "" || pkg.userPath == pkg.build.ImportPath {
-			return
-		}
-	}
-	importPath := pkg.build.ImportComment
-	if importPath == "" {
-		importPath = pkg.build.ImportPath
-	}
-	pkg.Printf("package %s // import %q\n\n", pkg.name, importPath)
-	if importPath != pkg.build.ImportPath {
-		pkg.Printf("WARNING: package source is installed in %q\n", pkg.build.ImportPath)
-	}
-}
-
-// valueSummary prints a one-line summary for each set of values and constants.
-func (pkg *Package) valueSummary(values []*doc.Value) {
-	for _, value := range values {
-		// Only print first item in spec, show ... to stand for the rest.
-		spec := value.Decl.Specs[0].(*ast.ValueSpec) // Must succeed.
-		exported := true
-		for _, name := range spec.Names {
-			if !isExported(name.Name) {
-				exported = false
-				break
-			}
-		}
-		if exported {
-			pkg.oneLineValueGenDecl(value.Decl)
-		}
-	}
-}
-
-// funcSummary prints a one-line summary for each function.
-func (pkg *Package) funcSummary(funcs []*doc.Func) {
-	for _, fun := range funcs {
-		decl := fun.Decl
-		// Exported functions only. The go/doc package does not include methods here.
-		if isExported(fun.Name) {
-			pkg.oneLineFunc(decl)
-		}
-	}
-}
-
-// typeSummary prints a one-line summary for each type.
-func (pkg *Package) typeSummary() {
-	for _, typ := range pkg.doc.Types {
-		for _, spec := range typ.Decl.Specs {
-			typeSpec := spec.(*ast.TypeSpec) // Must succeed.
-			if isExported(typeSpec.Name.Name) {
-				pkg.oneLineTypeDecl(typeSpec)
-			}
-		}
-	}
-}
-
-// bugs prints the BUGS information for the package.
-// TODO: Provide access to TODOs and NOTEs as well (very noisy so off by default)?
-func (pkg *Package) bugs() {
-	if pkg.doc.Notes["BUG"] == nil {
-		return
-	}
-	pkg.Printf("\n")
-	for _, note := range pkg.doc.Notes["BUG"] {
-		pkg.Printf("%s: %v\n", "BUG", note.Body)
-	}
-}
-
-// findValues finds the doc.Values that describe the symbol.
-func (pkg *Package) findValues(symbol string, docValues []*doc.Value) (values []*doc.Value) {
-	for _, value := range docValues {
-		for _, name := range value.Names {
-			if match(symbol, name) {
-				values = append(values, value)
-			}
-		}
-	}
-	return
-}
-
-// findFuncs finds the doc.Funcs that describes the symbol.
-func (pkg *Package) findFuncs(symbol string) (funcs []*doc.Func) {
-	for _, fun := range pkg.doc.Funcs {
-		if match(symbol, fun.Name) {
-			funcs = append(funcs, fun)
-		}
-	}
-	return
-}
-
-// findTypes finds the doc.Types that describes the symbol.
-// If symbol is empty, it finds all exported types.
-func (pkg *Package) findTypes(symbol string) (types []*doc.Type) {
-	for _, typ := range pkg.doc.Types {
-		if symbol == "" && isExported(typ.Name) || match(symbol, typ.Name) {
-			types = append(types, typ)
-		}
-	}
-	return
-}
-
-// findTypeSpec returns the ast.TypeSpec within the declaration that defines the symbol.
-// The name must match exactly.
-func (pkg *Package) findTypeSpec(decl *ast.GenDecl, symbol string) *ast.TypeSpec {
-	for _, spec := range decl.Specs {
-		typeSpec := spec.(*ast.TypeSpec) // Must succeed.
-		if symbol == typeSpec.Name.Name {
-			return typeSpec
-		}
-	}
-	return nil
-}
-
-// symbolDoc prints the docs for symbol. There may be multiple matches.
-// If symbol matches a type, output includes its methods factories and associated constants.
-// If there is no top-level symbol, symbolDoc looks for methods that match.
-func (pkg *Package) symbolDoc(symbol string) {
-	defer pkg.flush()
-	found := false
-	// Functions.
-	for _, fun := range pkg.findFuncs(symbol) {
-		if !found {
-			pkg.packageClause(true)
-		}
-		// Symbol is a function.
-		decl := fun.Decl
-		decl.Body = nil
-		pkg.emit(fun.Doc, decl)
-		found = true
-	}
-	// Constants and variables behave the same.
-	values := pkg.findValues(symbol, pkg.doc.Consts)
-	values = append(values, pkg.findValues(symbol, pkg.doc.Vars)...)
-	for _, value := range values {
-		// Print each spec only if there is at least one exported symbol in it.
-		// (See issue 11008.)
-		// TODO: Should we elide unexported symbols from a single spec?
-		// It's an unlikely scenario, probably not worth the trouble.
-		// TODO: Would be nice if go/doc did this for us.
-		specs := make([]ast.Spec, 0, len(value.Decl.Specs))
-		for _, spec := range value.Decl.Specs {
-			vspec := spec.(*ast.ValueSpec)
-			for _, ident := range vspec.Names {
-				if isExported(ident.Name) {
-					specs = append(specs, vspec)
-					break
-				}
-			}
-		}
-		if len(specs) == 0 {
-			continue
-		}
-		value.Decl.Specs = specs
-		if !found {
-			pkg.packageClause(true)
-		}
-		pkg.emit(value.Doc, value.Decl)
-		found = true
-	}
-	// Types.
-	for _, typ := range pkg.findTypes(symbol) {
-		if !found {
-			pkg.packageClause(true)
-		}
-		decl := typ.Decl
-		spec := pkg.findTypeSpec(decl, typ.Name)
-		trimUnexportedElems(spec)
-		// If there are multiple types defined, reduce to just this one.
-		if len(decl.Specs) > 1 {
-			decl.Specs = []ast.Spec{spec}
-		}
-		pkg.emit(typ.Doc, decl)
-		// Show associated methods, constants, etc.
-		if len(typ.Consts) > 0 || len(typ.Vars) > 0 || len(typ.Funcs) > 0 || len(typ.Methods) > 0 {
-			pkg.Printf("\n")
-		}
-		pkg.valueSummary(typ.Consts)
-		pkg.valueSummary(typ.Vars)
-		pkg.funcSummary(typ.Funcs)
-		pkg.funcSummary(typ.Methods)
-		found = true
-	}
-	if !found {
-		// See if there are methods.
-		if !pkg.printMethodDoc("", symbol) {
-			log.Printf("symbol %s not present in package %s installed in %q", symbol, pkg.name, pkg.build.ImportPath)
-		}
-	}
-}
-
-// trimUnexportedElems modifies spec in place to elide unexported fields from
-// structs and methods from interfaces (unless the unexported flag is set).
-func trimUnexportedElems(spec *ast.TypeSpec) {
-	if unexported {
-		return
-	}
-	switch typ := spec.Type.(type) {
-	case *ast.StructType:
-		typ.Fields = trimUnexportedFields(typ.Fields, "fields")
-	case *ast.InterfaceType:
-		typ.Methods = trimUnexportedFields(typ.Methods, "methods")
-	}
-}
-
-// trimUnexportedFields returns the field list trimmed of unexported fields.
-func trimUnexportedFields(fields *ast.FieldList, what string) *ast.FieldList {
-	trimmed := false
-	list := make([]*ast.Field, 0, len(fields.List))
-	for _, field := range fields.List {
-		// Trims if any is unexported. Good enough in practice.
-		ok := true
-		for _, name := range field.Names {
-			if !isExported(name.Name) {
-				trimmed = true
-				ok = false
-				break
-			}
-		}
-		if ok {
-			list = append(list, field)
-		}
-	}
-	if !trimmed {
-		return fields
-	}
-	unexportedField := &ast.Field{
-		Type: ast.NewIdent(""), // Hack: printer will treat this as a field with a named type.
-		Comment: &ast.CommentGroup{
-			List: []*ast.Comment{
-				&ast.Comment{
-					Text: fmt.Sprintf("// Has unexported %s.\n", what),
-				},
-			},
-		},
-	}
-	return &ast.FieldList{
-		Opening: fields.Opening,
-		List:    append(list, unexportedField),
-		Closing: fields.Closing,
-	}
-}
-
-// printMethodDoc prints the docs for matches of symbol.method.
-// If symbol is empty, it prints all methods that match the name.
-// It reports whether it found any methods.
-func (pkg *Package) printMethodDoc(symbol, method string) bool {
-	defer pkg.flush()
-	types := pkg.findTypes(symbol)
-	if types == nil {
-		if symbol == "" {
-			return false
-		}
-		pkg.Fatalf("symbol %s is not a type in package %s installed in %q", symbol, pkg.name, pkg.build.ImportPath)
-	}
-	found := false
-	for _, typ := range types {
-		for _, meth := range typ.Methods {
-			if match(method, meth.Name) {
-				decl := meth.Decl
-				decl.Body = nil
-				pkg.emit(meth.Doc, decl)
-				found = true
-			}
-		}
-	}
-	return found
-}
-
-// methodDoc prints the docs for matches of symbol.method.
-func (pkg *Package) methodDoc(symbol, method string) {
-	defer pkg.flush()
-	if !pkg.printMethodDoc(symbol, method) {
-		pkg.Fatalf("no method %s.%s in package %s installed in %q", symbol, method, pkg.name, pkg.build.ImportPath)
-	}
-}
-
-// match reports whether the user's symbol matches the program's.
-// A lower-case character in the user's string matches either case in the program's.
-// The program string must be exported.
-func match(user, program string) bool {
-	if !isExported(program) {
-		return false
-	}
-	if matchCase {
-		return user == program
-	}
-	for _, u := range user {
-		p, w := utf8.DecodeRuneInString(program)
-		program = program[w:]
-		if u == p {
-			continue
-		}
-		if unicode.IsLower(u) && simpleFold(u) == simpleFold(p) {
-			continue
-		}
-		return false
-	}
-	return program == ""
-}
-
-// simpleFold returns the minimum rune equivalent to r
-// under Unicode-defined simple case folding.
-func simpleFold(r rune) rune {
-	for {
-		r1 := unicode.SimpleFold(r)
-		if r1 <= r {
-			return r1 // wrapped around, found min
-		}
-		r = r1
-	}
-}
diff --git a/src/cmd/doc/testdata/pkg.go b/src/cmd/doc/testdata/pkg.go
deleted file mode 100644
index ebefb50..0000000
--- a/src/cmd/doc/testdata/pkg.go
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package comment.
-package pkg
-
-// Constants
-
-// Comment about exported constant.
-const ExportedConstant = 1
-
-// Comment about internal constant.
-const internalConstant = 2
-
-// Comment about block of constants.
-const (
-	// Comment before ConstOne.
-	ConstOne   = 1
-	ConstTwo   = 2 // Comment on line with ConstTwo.
-	constThree = 3 // Comment on line with constThree.
-)
-
-// Variables
-
-// Comment about exported variable.
-var ExportedVariable = 1
-
-// Comment about internal variable.
-var internalVariable = 2
-
-// Comment about block of variables.
-var (
-	// Comment before VarOne.
-	VarOne   = 1
-	VarTwo   = 2 // Comment on line with VarTwo.
-	varThree = 3 // Comment on line with varThree.
-)
-
-// Comment about exported function.
-func ExportedFunc(a int) bool
-
-// Comment about internal function.
-func internalFunc(a int) bool
-
-// Comment about exported type.
-type ExportedType struct {
-	// Comment before exported field.
-	ExportedField   int
-	unexportedField int // Comment on line with unexported field.
-}
-
-// Comment about exported method.
-func (ExportedType) ExportedMethod(a int) bool {
-	return true
-}
-
-// Comment about unexported method.
-func (ExportedType) unexportedMethod(a int) bool {
-	return true
-}
-
-// Constants tied to ExportedType. (The type is a struct so this isn't valid Go,
-// but it parses and that's all we need.)
-const (
-	ExportedTypedConstant ExportedType = iota
-)
-
-// Comment about constructor for exported type.
-func ExportedTypeConstructor() *ExportedType {
-	return nil
-}
-
-const unexportedTypedConstant ExportedType = 1 // In a separate section to test -u.
-
-// Comment about unexported type.
-type unexportedType int
-
-func (unexportedType) ExportedMethod() bool {
-	return true
-}
-
-func (unexportedType) unexportedMethod() bool {
-	return true
-}
-
-// Constants tied to unexportedType.
-const (
-	ExportedTypedConstant_unexported unexportedType = iota
-)
-
-const unexportedTypedConstant unexportedType = 1 // In a separate section to test -u.
-
-// For case matching.
-const CaseMatch = 1
-const Casematch = 2
diff --git a/src/cmd/fix/gotypes.go b/src/cmd/fix/gotypes.go
deleted file mode 100644
index 8c7b466..0000000
--- a/src/cmd/fix/gotypes.go
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
-	"go/ast"
-	"strconv"
-)
-
-func init() {
-	register(gotypesFix)
-}
-
-var gotypesFix = fix{
-	"gotypes",
-	"2015-07-16",
-	gotypes,
-	`Change imports of golang.org/x/tools/go/{exact,types} to go/{constant,types}`,
-}
-
-func gotypes(f *ast.File) bool {
-	truth := fixGoTypes(f)
-	if fixGoExact(f) {
-		truth = true
-	}
-	return truth
-}
-
-func fixGoTypes(f *ast.File) bool {
-	return rewriteImport(f, "golang.org/x/tools/go/types", "go/types")
-}
-
-func fixGoExact(f *ast.File) bool {
-	// This one is harder because the import name changes.
-	// First find the import spec.
-	var importSpec *ast.ImportSpec
-	walk(f, func(n interface{}) {
-		if importSpec != nil {
-			return
-		}
-		spec, ok := n.(*ast.ImportSpec)
-		if !ok {
-			return
-		}
-		path, err := strconv.Unquote(spec.Path.Value)
-		if err != nil {
-			return
-		}
-		if path == "golang.org/x/tools/go/exact" {
-			importSpec = spec
-		}
-
-	})
-	if importSpec == nil {
-		return false
-	}
-
-	// We are about to rename exact.* to constant.*, but constant is a common
-	// name. See if it will conflict. This is a hack but it is effective.
-	exists := renameTop(f, "constant", "constant")
-	suffix := ""
-	if exists {
-		suffix = "_"
-	}
-	// Now we need to rename all the uses of the import. RewriteImport
-	// affects renameTop, but not vice versa, so do them in this order.
-	renameTop(f, "exact", "constant"+suffix)
-	rewriteImport(f, "golang.org/x/tools/go/exact", "go/constant")
-	// renameTop will also rewrite the imported package name. Fix that;
-	// we know it should be missing.
-	importSpec.Name = nil
-	return true
-}
diff --git a/src/cmd/fix/gotypes_test.go b/src/cmd/fix/gotypes_test.go
deleted file mode 100644
index 1ecb7a2..0000000
--- a/src/cmd/fix/gotypes_test.go
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright 2012 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-func init() {
-	addTestCases(gotypesTests, gotypes)
-}
-
-var gotypesTests = []testCase{
-	{
-		Name: "gotypes.0",
-		In: `package main
-
-import "golang.org/x/tools/go/types"
-import "golang.org/x/tools/go/exact"
-
-var _ = exact.Kind
-
-func f() {
-	_ = exact.MakeBool(true)
-}
-`,
-		Out: `package main
-
-import "go/types"
-import "go/constant"
-
-var _ = constant.Kind
-
-func f() {
-	_ = constant.MakeBool(true)
-}
-`,
-	},
-	{
-		Name: "gotypes.1",
-		In: `package main
-
-import "golang.org/x/tools/go/types"
-import foo "golang.org/x/tools/go/exact"
-
-var _ = foo.Kind
-
-func f() {
-	_ = foo.MakeBool(true)
-}
-`,
-		Out: `package main
-
-import "go/types"
-import "go/constant"
-
-var _ = foo.Kind
-
-func f() {
-	_ = foo.MakeBool(true)
-}
-`,
-	},
-	{
-		Name: "gotypes.0",
-		In: `package main
-
-import "golang.org/x/tools/go/types"
-import "golang.org/x/tools/go/exact"
-
-var _ = exact.Kind
-var constant = 23 // Use of new package name.
-
-func f() {
-	_ = exact.MakeBool(true)
-}
-`,
-		Out: `package main
-
-import "go/types"
-import "go/constant"
-
-var _ = constant_.Kind
-var constant = 23 // Use of new package name.
-
-func f() {
-	_ = constant_.MakeBool(true)
-}
-`,
-	},
-}
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go
deleted file mode 100644
index 6077d93..0000000
--- a/src/cmd/go/alldocs.go
+++ /dev/null
@@ -1,1482 +0,0 @@
-// Copyright 2011 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// DO NOT EDIT THIS FILE. GENERATED BY mkalldocs.sh.
-// Edit the documentation in other files and rerun mkalldocs.sh to generate this one.
-
-/*
-Go is a tool for managing Go source code.
-
-Usage:
-
-	go command [arguments]
-
-The commands are:
-
-	build       compile packages and dependencies
-	clean       remove object files
-	doc         show documentation for package or symbol
-	env         print Go environment information
-	fix         run go tool fix on packages
-	fmt         run gofmt on package sources
-	generate    generate Go files by processing source
-	get         download and install packages and dependencies
-	install     compile and install packages and dependencies
-	list        list packages
-	run         compile and run Go program
-	test        test packages
-	tool        run specified go tool
-	version     print Go version
-	vet         run go tool vet on packages
-
-Use "go help [command]" for more information about a command.
-
-Additional help topics:
-
-	c           calling between Go and C
-	buildmode   description of build modes
-	filetype    file types
-	gopath      GOPATH environment variable
-	environment environment variables
-	importpath  import path syntax
-	packages    description of package lists
-	testflag    description of testing flags
-	testfunc    description of testing functions
-
-Use "go help [topic]" for more information about that topic.
-
-
-Compile packages and dependencies
-
-Usage:
-
-	go build [-o output] [-i] [build flags] [packages]
-
-Build compiles the packages named by the import paths,
-along with their dependencies, but it does not install the results.
-
-If the arguments to build are a list of .go files, build treats
-them as a list of source files specifying a single package.
-
-When compiling a single main package, build writes
-the resulting executable to an output file named after
-the first source file ('go build ed.go rx.go' writes 'ed' or 'ed.exe')
-or the source code directory ('go build unix/sam' writes 'sam' or 'sam.exe').
-The '.exe' suffix is added when writing a Windows executable.
-
-When compiling multiple packages or a single non-main package,
-build compiles the packages but discards the resulting object,
-serving only as a check that the packages can be built.
-
-The -o flag, only allowed when compiling a single package,
-forces build to write the resulting executable or object
-to the named output file, instead of the default behavior described
-in the last two paragraphs.
-
-The -i flag installs the packages that are dependencies of the target.
-
-The build flags are shared by the build, clean, get, install, list, run,
-and test commands:
-
-	-a
-		force rebuilding of packages that are already up-to-date.
-		In Go releases, does not apply to the standard library.
-	-n
-		print the commands but do not run them.
-	-p n
-		the number of builds that can be run in parallel.
-		The default is the number of CPUs available, except
-		on darwin/arm which defaults to 1.
-	-race
-		enable data race detection.
-		Supported only on linux/amd64, freebsd/amd64, darwin/amd64 and windows/amd64.
-	-v
-		print the names of packages as they are compiled.
-	-work
-		print the name of the temporary work directory and
-		do not delete it when exiting.
-	-x
-		print the commands.
-
-	-asmflags 'flag list'
-		arguments to pass on each go tool asm invocation.
-	-buildmode mode
-		build mode to use. See 'go help buildmode' for more.
-	-compiler name
-		name of compiler to use, as in runtime.Compiler (gccgo or gc).
-	-gccgoflags 'arg list'
-		arguments to pass on each gccgo compiler/linker invocation.
-	-gcflags 'arg list'
-		arguments to pass on each go tool compile invocation.
-	-installsuffix suffix
-		a suffix to use in the name of the package installation directory,
-		in order to keep output separate from default builds.
-		If using the -race flag, the install suffix is automatically set to race
-		or, if set explicitly, has _race appended to it.  Using a -buildmode
-		option that requires non-default compile flags has a similar effect.
-	-ldflags 'flag list'
-		arguments to pass on each go tool link invocation.
-	-linkshared
-		link against shared libraries previously created with
-		-buildmode=shared
-	-pkgdir dir
-		install and load all packages from dir instead of the usual locations.
-		For example, when building with a non-standard configuration,
-		use -pkgdir to keep generated packages in a separate location.
-	-tags 'tag list'
-		a list of build tags to consider satisfied during the build.
-		For more information about build tags, see the description of
-		build constraints in the documentation for the go/build package.
-	-toolexec 'cmd args'
-		a program to use to invoke toolchain programs like vet and asm.
-		For example, instead of running asm, the go command will run
-		'cmd args /path/to/asm <arguments for asm>'.
-
-The list flags accept a space-separated list of strings. To embed spaces
-in an element in the list, surround it with either single or double quotes.
-
-For more about specifying packages, see 'go help packages'.
-For more about where packages and binaries are installed,
-run 'go help gopath'.
-For more about calling between Go and C/C++, run 'go help c'.
-
-Note: Build adheres to certain conventions such as those described
-by 'go help gopath'. Not all projects can follow these conventions,
-however. Installations that have their own conventions or that use
-a separate software build system may choose to use lower-level
-invocations such as 'go tool compile' and 'go tool link' to avoid
-some of the overheads and design decisions of the build tool.
-
-See also: go install, go get, go clean.
-
-
-Remove object files
-
-Usage:
-
-	go clean [-i] [-r] [-n] [-x] [build flags] [packages]
-
-Clean removes object files from package source directories.
-The go command builds most objects in a temporary directory,
-so go clean is mainly concerned with object files left by other
-tools or by manual invocations of go build.
-
-Specifically, clean removes the following files from each of the
-source directories corresponding to the import paths:
-
-	_obj/            old object directory, left from Makefiles
-	_test/           old test directory, left from Makefiles
-	_testmain.go     old gotest file, left from Makefiles
-	test.out         old test log, left from Makefiles
-	build.out        old test log, left from Makefiles
-	*.[568ao]        object files, left from Makefiles
-
-	DIR(.exe)        from go build
-	DIR.test(.exe)   from go test -c
-	MAINFILE(.exe)   from go build MAINFILE.go
-	*.so             from SWIG
-
-In the list, DIR represents the final path element of the
-directory, and MAINFILE is the base name of any Go source
-file in the directory that is not included when building
-the package.
-
-The -i flag causes clean to remove the corresponding installed
-archive or binary (what 'go install' would create).
-
-The -n flag causes clean to print the remove commands it would execute,
-but not run them.
-
-The -r flag causes clean to be applied recursively to all the
-dependencies of the packages named by the import paths.
-
-The -x flag causes clean to print remove commands as it executes them.
-
-For more about build flags, see 'go help build'.
-
-For more about specifying packages, see 'go help packages'.
-
-
-Show documentation for package or symbol
-
-Usage:
-
-	go doc [-u] [-c] [package|[package.]symbol[.method]]
-
-Doc prints the documentation comments associated with the item identified by its
-arguments (a package, const, func, type, var, or method) followed by a one-line
-summary of each of the first-level items "under" that item (package-level
-declarations for a package, methods for a type, etc.).
-
-Doc accepts zero, one, or two arguments.
-
-Given no arguments, that is, when run as
-
-	go doc
-
-it prints the package documentation for the package in the current directory.
-If the package is a command (package main), the exported symbols of the package
-are elided from the presentation unless the -cmd flag is provided.
-
-When run with one argument, the argument is treated as a Go-syntax-like
-representation of the item to be documented. What the argument selects depends
-on what is installed in GOROOT and GOPATH, as well as the form of the argument,
-which is schematically one of these:
-
-	go doc <pkg>
-	go doc <sym>[.<method>]
-	go doc [<pkg>].<sym>[.<method>]
-
-The first item in this list matched by the argument is the one whose
-documentation is printed. (See the examples below.) For packages, the order of
-scanning is determined lexically, but the GOROOT tree is always scanned before
-GOPATH.
-
-If there is no package specified or matched, the package in the current
-directory is selected, so "go doc Foo" shows the documentation for symbol Foo in
-the current package.
-
-The package path must be either a qualified path or a proper suffix of a
-path. The go tool's usual package mechanism does not apply: package path
-elements like . and ... are not implemented by go doc.
-
-When run with two arguments, the first must be a full package path (not just a
-suffix), and the second is a symbol or symbol and method; this is similar to the
-syntax accepted by godoc:
-
-	go doc <pkg> <sym>[.<method>]
-
-In all forms, when matching symbols, lower-case letters in the argument match
-either case but upper-case letters match exactly. This means that there may be
-multiple matches of a lower-case argument in a package if different symbols have
-different cases. If this occurs, documentation for all matches is printed.
-
-Examples:
-	go doc
-		Show documentation for current package.
-	go doc Foo
-		Show documentation for Foo in the current package.
-		(Foo starts with a capital letter so it cannot match
-		a package path.)
-	go doc encoding/json
-		Show documentation for the encoding/json package.
-	go doc json
-		Shorthand for encoding/json.
-	go doc json.Number (or go doc json.number)
-		Show documentation and method summary for json.Number.
-	go doc json.Number.Int64 (or go doc json.number.int64)
-		Show documentation for json.Number's Int64 method.
-	go doc cmd/doc
-		Show package docs for the doc command.
-	go doc -cmd cmd/doc
-		Show package docs and exported symbols within the doc command.
-	go doc template.new
-		Show documentation for html/template's New function.
-		(html/template is lexically before text/template)
-	go doc text/template.new # One argument
-		Show documentation for text/template's New function.
-	go doc text/template new # Two arguments
-		Show documentation for text/template's New function.
-
-Flags:
-	-c
-		Respect case when matching symbols.
-	-cmd
-		Treat a command (package main) like a regular package.
-		Otherwise package main's exported symbols are hidden
-		when showing the package's top-level documentation.
-	-u
-		Show documentation for unexported as well as exported
-		symbols and methods.
-
-
-Print Go environment information
-
-Usage:
-
-	go env [var ...]
-
-Env prints Go environment information.
-
-By default env prints information as a shell script
-(on Windows, a batch file).  If one or more variable
-names is given as arguments,  env prints the value of
-each named variable on its own line.
-
-
-Run go tool fix on packages
-
-Usage:
-
-	go fix [packages]
-
-Fix runs the Go fix command on the packages named by the import paths.
-
-For more about fix, see 'go doc cmd/fix'.
-For more about specifying packages, see 'go help packages'.
-
-To run fix with specific options, run 'go tool fix'.
-
-See also: go fmt, go vet.
-
-
-Run gofmt on package sources
-
-Usage:
-
-	go fmt [-n] [-x] [packages]
-
-Fmt runs the command 'gofmt -l -w' on the packages named
-by the import paths.  It prints the names of the files that are modified.
-
-For more about gofmt, see 'go doc cmd/gofmt'.
-For more about specifying packages, see 'go help packages'.
-
-The -n flag prints commands that would be executed.
-The -x flag prints commands as they are executed.
-
-To run gofmt with specific options, run gofmt itself.
-
-See also: go fix, go vet.
-
-
-Generate Go files by processing source
-
-Usage:
-
-	go generate [-run regexp] [file.go... | packages]
-
-Generate runs commands described by directives within existing
-files. Those commands can run any process but the intent is to
-create or update Go source files, for instance by running yacc.
-
-Go generate is never run automatically by go build, go get, go test,
-and so on. It must be run explicitly.
-
-Go generate scans the file for directives, which are lines of
-the form,
-
-	//go:generate command argument...
-
-(note: no leading spaces and no space in "//go") where command
-is the generator to be run, corresponding to an executable file
-that can be run locally. It must either be in the shell path
-(gofmt), a fully qualified path (/usr/you/bin/mytool), or a
-command alias, described below.
-
-Note that go generate does not parse the file, so lines that look
-like directives in comments or multiline strings will be treated
-as directives.
-
-The arguments to the directive are space-separated tokens or
-double-quoted strings passed to the generator as individual
-arguments when it is run.
-
-Quoted strings use Go syntax and are evaluated before execution; a
-quoted string appears as a single argument to the generator.
-
-Go generate sets several variables when it runs the generator:
-
-	$GOARCH
-		The execution architecture (arm, amd64, etc.)
-	$GOOS
-		The execution operating system (linux, windows, etc.)
-	$GOFILE
-		The base name of the file.
-	$GOLINE
-		The line number of the directive in the source file.
-	$GOPACKAGE
-		The name of the package of the file containing the directive.
-	$DOLLAR
-		A dollar sign.
-
-Other than variable substitution and quoted-string evaluation, no
-special processing such as "globbing" is performed on the command
-line.
-
-As a last step before running the command, any invocations of any
-environment variables with alphanumeric names, such as $GOFILE or
-$HOME, are expanded throughout the command line. The syntax for
-variable expansion is $NAME on all operating systems.  Due to the
-order of evaluation, variables are expanded even inside quoted
-strings. If the variable NAME is not set, $NAME expands to the
-empty string.
-
-A directive of the form,
-
-	//go:generate -command xxx args...
-
-specifies, for the remainder of this source file only, that the
-string xxx represents the command identified by the arguments. This
-can be used to create aliases or to handle multiword generators.
-For example,
-
-	//go:generate -command yacc go tool yacc
-
-specifies that the command "yacc" represents the generator
-"go tool yacc".
-
-Generate processes packages in the order given on the command line,
-one at a time. If the command line lists .go files, they are treated
-as a single package. Within a package, generate processes the
-source files in a package in file name order, one at a time. Within
-a source file, generate runs generators in the order they appear
-in the file, one at a time.
-
-If any generator returns an error exit status, "go generate" skips
-all further processing for that package.
-
-The generator is run in the package's source directory.
-
-Go generate accepts one specific flag:
-
-	-run=""
-		if non-empty, specifies a regular expression to select
-		directives whose full original source text (excluding
-		any trailing spaces and final newline) matches the
-		expression.
-
-It also accepts the standard build flags -v, -n, and -x.
-The -v flag prints the names of packages and files as they are
-processed.
-The -n flag prints commands that would be executed.
-The -x flag prints commands as they are executed.
-
-For more about specifying packages, see 'go help packages'.
-
-
-Download and install packages and dependencies
-
-Usage:
-
-	go get [-d] [-f] [-fix] [-insecure] [-t] [-u] [build flags] [packages]
-
-Get downloads and installs the packages named by the import paths,
-along with their dependencies.
-
-The -d flag instructs get to stop after downloading the packages; that is,
-it instructs get not to install the packages.
-
-The -f flag, valid only when -u is set, forces get -u not to verify that
-each package has been checked out from the source control repository
-implied by its import path. This can be useful if the source is a local fork
-of the original.
-
-The -fix flag instructs get to run the fix tool on the downloaded packages
-before resolving dependencies or building the code.
-
-The -insecure flag permits fetching from repositories and resolving
-custom domains using insecure schemes such as HTTP. Use with caution.
-
-The -t flag instructs get to also download the packages required to build
-the tests for the specified packages.
-
-The -u flag instructs get to use the network to update the named packages
-and their dependencies.  By default, get uses the network to check out
-missing packages but does not use it to look for updates to existing packages.
-
-Get also accepts build flags to control the installation. See 'go help build'.
-
-When checking out or updating a package, get looks for a branch or tag
-that matches the locally installed version of Go. The most important
-rule is that if the local installation is running version "go1", get
-searches for a branch or tag named "go1". If no such version exists it
-retrieves the most recent version of the package.
-
-If the vendoring experiment is enabled (see 'go help gopath'),
-then when go get checks out or updates a Git repository,
-it also updates any git submodules referenced by the repository.
-
-For more about specifying packages, see 'go help packages'.
-
-For more about how 'go get' finds source code to
-download, see 'go help importpath'.
-
-See also: go build, go install, go clean.
-
-
-Compile and install packages and dependencies
-
-Usage:
-
-	go install [build flags] [packages]
-
-Install compiles and installs the packages named by the import paths,
-along with their dependencies.
-
-For more about the build flags, see 'go help build'.
-For more about specifying packages, see 'go help packages'.
-
-See also: go build, go get, go clean.
-
-
-List packages
-
-Usage:
-
-	go list [-e] [-f format] [-json] [build flags] [packages]
-
-List lists the packages named by the import paths, one per line.
-
-The default output shows the package import path:
-
-    bytes
-    encoding/json
-    github.com/gorilla/mux
-    golang.org/x/net/html
-
-The -f flag specifies an alternate format for the list, using the
-syntax of package template.  The default output is equivalent to -f
-'{{.ImportPath}}'. The struct being passed to the template is:
-
-    type Package struct {
-        Dir           string // directory containing package sources
-        ImportPath    string // import path of package in dir
-        ImportComment string // path in import comment on package statement
-        Name          string // package name
-        Doc           string // package documentation string
-        Target        string // install path
-        Shlib         string // the shared library that contains this package (only set when -linkshared)
-        Goroot        bool   // is this package in the Go root?
-        Standard      bool   // is this package part of the standard Go library?
-        Stale         bool   // would 'go install' do anything for this package?
-        Root          string // Go root or Go path dir containing this package
-
-        // Source files
-        GoFiles        []string // .go source files (excluding CgoFiles, TestGoFiles, XTestGoFiles)
-        CgoFiles       []string // .go sources files that import "C"
-        IgnoredGoFiles []string // .go sources ignored due to build constraints
-        CFiles         []string // .c source files
-        CXXFiles       []string // .cc, .cxx and .cpp source files
-        MFiles         []string // .m source files
-        HFiles         []string // .h, .hh, .hpp and .hxx source files
-        SFiles         []string // .s source files
-        SwigFiles      []string // .swig files
-        SwigCXXFiles   []string // .swigcxx files
-        SysoFiles      []string // .syso object files to add to archive
-
-        // Cgo directives
-        CgoCFLAGS    []string // cgo: flags for C compiler
-        CgoCPPFLAGS  []string // cgo: flags for C preprocessor
-        CgoCXXFLAGS  []string // cgo: flags for C++ compiler
-        CgoLDFLAGS   []string // cgo: flags for linker
-        CgoPkgConfig []string // cgo: pkg-config names
-
-        // Dependency information
-        Imports []string // import paths used by this package
-        Deps    []string // all (recursively) imported dependencies
-
-        // Error information
-        Incomplete bool            // this package or a dependency has an error
-        Error      *PackageError   // error loading package
-        DepsErrors []*PackageError // errors loading dependencies
-
-        TestGoFiles  []string // _test.go files in package
-        TestImports  []string // imports from TestGoFiles
-        XTestGoFiles []string // _test.go files outside package
-        XTestImports []string // imports from XTestGoFiles
-    }
-
-The template function "join" calls strings.Join.
-
-The template function "context" returns the build context, defined as:
-
-	type Context struct {
-		GOARCH        string   // target architecture
-		GOOS          string   // target operating system
-		GOROOT        string   // Go root
-		GOPATH        string   // Go path
-		CgoEnabled    bool     // whether cgo can be used
-		UseAllFiles   bool     // use files regardless of +build lines, file names
-		Compiler      string   // compiler to assume when computing target paths
-		BuildTags     []string // build constraints to match in +build lines
-		ReleaseTags   []string // releases the current release is compatible with
-		InstallSuffix string   // suffix to use in the name of the install dir
-	}
-
-For more information about the meaning of these fields see the documentation
-for the go/build package's Context type.
-
-The -json flag causes the package data to be printed in JSON format
-instead of using the template format.
-
-The -e flag changes the handling of erroneous packages, those that
-cannot be found or are malformed.  By default, the list command
-prints an error to standard error for each erroneous package and
-omits the packages from consideration during the usual printing.
-With the -e flag, the list command never prints errors to standard
-error and instead processes the erroneous packages with the usual
-printing.  Erroneous packages will have a non-empty ImportPath and
-a non-nil Error field; other information may or may not be missing
-(zeroed).
-
-For more about build flags, see 'go help build'.
-
-For more about specifying packages, see 'go help packages'.
-
-
-Compile and run Go program
-
-Usage:
-
-	go run [build flags] [-exec xprog] gofiles... [arguments...]
-
-Run compiles and runs the main package comprising the named Go source files.
-A Go source file is defined to be a file ending in a literal ".go" suffix.
-
-By default, 'go run' runs the compiled binary directly: 'a.out arguments...'.
-If the -exec flag is given, 'go run' invokes the binary using xprog:
-	'xprog a.out arguments...'.
-If the -exec flag is not given, GOOS or GOARCH is different from the system
-default, and a program named go_$GOOS_$GOARCH_exec can be found
-on the current search path, 'go run' invokes the binary using that program,
-for example 'go_nacl_386_exec a.out arguments...'. This allows execution of
-cross-compiled programs when a simulator or other execution method is
-available.
-
-For more about build flags, see 'go help build'.
-
-See also: go build.
-
-
-Test packages
-
-Usage:
-
-	go test [-c] [-i] [build and test flags] [packages] [flags for test binary]
-
-'Go test' automates testing the packages named by the import paths.
-It prints a summary of the test results in the format:
-
-	ok   archive/tar   0.011s
-	FAIL archive/zip   0.022s
-	ok   compress/gzip 0.033s
-	...
-
-followed by detailed output for each failed package.
-
-'Go test' recompiles each package along with any files with names matching
-the file pattern "*_test.go".
-Files whose names begin with "_" (including "_test.go") or "." are ignored.
-These additional files can contain test functions, benchmark functions, and
-example functions.  See 'go help testfunc' for more.
-Each listed package causes the execution of a separate test binary.
-
-Test files that declare a package with the suffix "_test" will be compiled as a
-separate package, and then linked and run with the main test binary.
-
-By default, go test needs no arguments.  It compiles and tests the package
-with source in the current directory, including tests, and runs the tests.
-
-The package is built in a temporary directory so it does not interfere with the
-non-test installation.
-
-In addition to the build flags, the flags handled by 'go test' itself are:
-
-	-c
-		Compile the test binary to pkg.test but do not run it
-		(where pkg is the last element of the package's import path).
-		The file name can be changed with the -o flag.
-
-	-exec xprog
-	    Run the test binary using xprog. The behavior is the same as
-	    in 'go run'. See 'go help run' for details.
-
-	-i
-	    Install packages that are dependencies of the test.
-	    Do not run the test.
-
-	-o file
-		Compile the test binary to the named file.
-		The test still runs (unless -c or -i is specified).
-
-The test binary also accepts flags that control execution of the test; these
-flags are also accessible by 'go test'. See 'go help testflag' for details.
-
-If the test binary needs any other flags, they should be presented after the
-package names. The go tool treats as a flag the first argument that begins with
-a minus sign that it does not recognize itself; that argument and all subsequent
-arguments are passed as arguments to the test binary.
-
-For more about build flags, see 'go help build'.
-For more about specifying packages, see 'go help packages'.
-
-See also: go build, go vet.
-
-
-Run specified go tool
-
-Usage:
-
-	go tool [-n] command [args...]
-
-Tool runs the go tool command identified by the arguments.
-With no arguments it prints the list of known tools.
-
-The -n flag causes tool to print the command that would be
-executed but not execute it.
-
-For more about each tool command, see 'go tool command -h'.
-
-
-Print Go version
-
-Usage:
-
-	go version
-
-Version prints the Go version, as reported by runtime.Version.
-
-
-Run go tool vet on packages
-
-Usage:
-
-	go vet [-n] [-x] [build flags] [packages]
-
-Vet runs the Go vet command on the packages named by the import paths.
-
-For more about vet, see 'go doc cmd/vet'.
-For more about specifying packages, see 'go help packages'.
-
-To run the vet tool with specific options, run 'go tool vet'.
-
-The -n flag prints commands that would be executed.
-The -x flag prints commands as they are executed.
-
-For more about build flags, see 'go help build'.
-
-See also: go fmt, go fix.
-
-
-Calling between Go and C
-
-There are two different ways to call between Go and C/C++ code.
-
-The first is the cgo tool, which is part of the Go distribution.  For
-information on how to use it see the cgo documentation (go doc cmd/cgo).
-
-The second is the SWIG program, which is a general tool for
-interfacing between languages.  For information on SWIG see
-http://swig.org/.  When running go build, any file with a .swig
-extension will be passed to SWIG.  Any file with a .swigcxx extension
-will be passed to SWIG with the -c++ option.
-
-When either cgo or SWIG is used, go build will pass any .c, .m, .s,
-or .S files to the C compiler, and any .cc, .cpp, .cxx files to the C++
-compiler.  The CC or CXX environment variables may be set to determine
-the C or C++ compiler, respectively, to use.
-
-
-Description of build modes
-
-The 'go build' and 'go install' commands take a -buildmode argument which
-indicates which kind of object file is to be built. Currently supported values
-are:
-
-	-buildmode=archive
-		Build the listed non-main packages into .a files. Packages named
-		main are ignored.
-
-	-buildmode=c-archive
-		Build the listed main package, plus all packages it imports,
-		into a C archive file. The only callable symbols will be those
-		functions exported using a cgo //export comment. Requires
-		exactly one main package to be listed.
-
-	-buildmode=c-shared
-		Build the listed main packages, plus all packages that they
-		import, into C shared libraries. The only callable symbols will
-		be those functions exported using a cgo //export comment.
-		Non-main packages are ignored.
-
-	-buildmode=default
-		Listed main packages are built into executables and listed
-		non-main packages are built into .a files (the default
-		behavior).
-
-	-buildmode=shared
-		Combine all the listed non-main packages into a single shared
-		library that will be used when building with the -linkshared
-		option. Packages named main are ignored.
-
-	-buildmode=exe
-		Build the listed main packages and everything they import into
-		executables. Packages not named main are ignored.
-
-
-File types
-
-The go command examines the contents of a restricted set of files
-in each directory. It identifies which files to examine based on
-the extension of the file name. These extensions are:
-
-	.go
-		Go source files.
-	.c, .h
-		C source files.
-		If the package uses cgo or SWIG, these will be compiled with the
-		OS-native compiler (typically gcc); otherwise they will
-		trigger an error.
-	.cc, .cpp, .cxx, .hh, .hpp, .hxx
-		C++ source files. Only useful with cgo or SWIG, and always
-		compiled with the OS-native compiler.
-	.m
-		Objective-C source files. Only useful with cgo, and always
-		compiled with the OS-native compiler.
-	.s, .S
-		Assembler source files.
-		If the package uses cgo or SWIG, these will be assembled with the
-		OS-native assembler (typically gcc (sic)); otherwise they
-		will be assembled with the Go assembler.
-	.swig, .swigcxx
-		SWIG definition files.
-	.syso
-		System object files.
-
-Files of each of these types except .syso may contain build
-constraints, but the go command stops scanning for build constraints
-at the first item in the file that is not a blank line or //-style
-line comment.
-
-
-GOPATH environment variable
-
-The Go path is used to resolve import statements.
-It is implemented by and documented in the go/build package.
-
-The GOPATH environment variable lists places to look for Go code.
-On Unix, the value is a colon-separated string.
-On Windows, the value is a semicolon-separated string.
-On Plan 9, the value is a list.
-
-GOPATH must be set to get, build and install packages outside the
-standard Go tree.
-
-Each directory listed in GOPATH must have a prescribed structure:
-
-The src directory holds source code.  The path below src
-determines the import path or executable name.
-
-The pkg directory holds installed package objects.
-As in the Go tree, each target operating system and
-architecture pair has its own subdirectory of pkg
-(pkg/GOOS_GOARCH).
-
-If DIR is a directory listed in the GOPATH, a package with
-source in DIR/src/foo/bar can be imported as "foo/bar" and
-has its compiled form installed to "DIR/pkg/GOOS_GOARCH/foo/bar.a".
-
-The bin directory holds compiled commands.
-Each command is named for its source directory, but only
-the final element, not the entire path.  That is, the
-command with source in DIR/src/foo/quux is installed into
-DIR/bin/quux, not DIR/bin/foo/quux.  The "foo/" prefix is stripped
-so that you can add DIR/bin to your PATH to get at the
-installed commands.  If the GOBIN environment variable is
-set, commands are installed to the directory it names instead
-of DIR/bin.
-
-Here's an example directory layout:
-
-    GOPATH=/home/user/gocode
-
-    /home/user/gocode/
-        src/
-            foo/
-                bar/               (go code in package bar)
-                    x.go
-                quux/              (go code in package main)
-                    y.go
-        bin/
-            quux                   (installed command)
-        pkg/
-            linux_amd64/
-                foo/
-                    bar.a          (installed package object)
-
-Go searches each directory listed in GOPATH to find source code,
-but new packages are always downloaded into the first directory
-in the list.
-
-See https://golang.org/doc/code.html for an example.
-
-Internal Directories
-
-Code in or below a directory named "internal" is importable only
-by code in the directory tree rooted at the parent of "internal".
-Here's an extended version of the directory layout above:
-
-    /home/user/gocode/
-        src/
-            crash/
-                bang/              (go code in package bang)
-                    b.go
-            foo/                   (go code in package foo)
-                f.go
-                bar/               (go code in package bar)
-                    x.go
-                internal/
-                    baz/           (go code in package baz)
-                        z.go
-                quux/              (go code in package main)
-                    y.go
-
-
-The code in z.go is imported as "foo/internal/baz", but that
-import statement can only appear in source files in the subtree
-rooted at foo. The source files foo/f.go, foo/bar/x.go, and
-foo/quux/y.go can all import "foo/internal/baz", but the source file
-crash/bang/b.go cannot.
-
-See https://golang.org/s/go14internal for details.
-
-Vendor Directories
-
-Go 1.5 includes experimental support for using local copies
-of external dependencies to satisfy imports of those dependencies,
-often referred to as vendoring. Setting the environment variable
-GO15VENDOREXPERIMENT=1 enables that experimental support.
-
-When the vendor experiment is enabled,
-code below a directory named "vendor" is importable only
-by code in the directory tree rooted at the parent of "vendor",
-and only using an import path that omits the prefix up to and
-including the vendor element.
-
-Here's the example from the previous section,
-but with the "internal" directory renamed to "vendor"
-and a new foo/vendor/crash/bang directory added:
-
-    /home/user/gocode/
-        src/
-            crash/
-                bang/              (go code in package bang)
-                    b.go
-            foo/                   (go code in package foo)
-                f.go
-                bar/               (go code in package bar)
-                    x.go
-                vendor/
-                    crash/
-                        bang/      (go code in package bang)
-                            b.go
-                    baz/           (go code in package baz)
-                        z.go
-                quux/              (go code in package main)
-                    y.go
-
-The same visibility rules apply as for internal, but the code
-in z.go is imported as "baz", not as "foo/vendor/baz".
-
-Code in vendor directories deeper in the source tree shadows
-code in higher directories. Within the subtree rooted at foo, an import
-of "crash/bang" resolves to "foo/vendor/crash/bang", not the
-top-level "crash/bang".
-
-Code in vendor directories is not subject to import path
-checking (see 'go help importpath').
-
-When the vendor experiment is enabled, 'go get' checks out
-submodules when checking out or updating a git repository
-(see 'go help get').
-
-The vendoring semantics are an experiment, and they may change
-in future releases. Once settled, they will be on by default.
-
-See https://golang.org/s/go15vendor for details.
-
-
-Environment variables
-
-The go command, and the tools it invokes, examine a few different
-environment variables. For many of these, you can see the default
-value of on your system by running 'go env NAME', where NAME is the
-name of the variable.
-
-General-purpose environment variables:
-
-	GCCGO
-		The gccgo command to run for 'go build -compiler=gccgo'.
-	GOARCH
-		The architecture, or processor, for which to compile code.
-		Examples are amd64, 386, arm, ppc64.
-	GOBIN
-		The directory where 'go install' will install a command.
-	GOOS
-		The operating system for which to compile code.
-		Examples are linux, darwin, windows, netbsd.
-	GOPATH
-		See 'go help gopath'.
-	GORACE
-		Options for the race detector.
-		See https://golang.org/doc/articles/race_detector.html.
-	GOROOT
-		The root of the go tree.
-
-Environment variables for use with cgo:
-
-	CC
-		The command to use to compile C code.
-	CGO_ENABLED
-		Whether the cgo command is supported.  Either 0 or 1.
-	CGO_CFLAGS
-		Flags that cgo will pass to the compiler when compiling
-		C code.
-	CGO_CPPFLAGS
-		Flags that cgo will pass to the compiler when compiling
-		C or C++ code.
-	CGO_CXXFLAGS
-		Flags that cgo will pass to the compiler when compiling
-		C++ code.
-	CGO_LDFLAGS
-		Flags that cgo will pass to the compiler when linking.
-	CXX
-		The command to use to compile C++ code.
-
-Architecture-specific environment variables:
-
-	GOARM
-		For GOARCH=arm, the ARM architecture for which to compile.
-		Valid values are 5, 6, 7.
-	GO386
-		For GOARCH=386, the floating point instruction set.
-		Valid values are 387, sse2.
-
-Special-purpose environment variables:
-
-	GOROOT_FINAL
-		The root of the installed Go tree, when it is
-		installed in a location other than where it is built.
-		File names in stack traces are rewritten from GOROOT to
-		GOROOT_FINAL.
-	GO15VENDOREXPERIMENT
-		Set to 1 to enable the Go 1.5 vendoring experiment.
-	GO_EXTLINK_ENABLED
-		Whether the linker should use external linking mode
-		when using -linkmode=auto with code that uses cgo.
-		Set to 0 to disable external linking mode, 1 to enable it.
-
-
-Import path syntax
-
-An import path (see 'go help packages') denotes a package
-stored in the local file system.  In general, an import path denotes
-either a standard package (such as "unicode/utf8") or a package
-found in one of the work spaces (see 'go help gopath').
-
-Relative import paths
-
-An import path beginning with ./ or ../ is called a relative path.
-The toolchain supports relative import paths as a shortcut in two ways.
-
-First, a relative path can be used as a shorthand on the command line.
-If you are working in the directory containing the code imported as
-"unicode" and want to run the tests for "unicode/utf8", you can type
-"go test ./utf8" instead of needing to specify the full path.
-Similarly, in the reverse situation, "go test .." will test "unicode" from
-the "unicode/utf8" directory. Relative patterns are also allowed, like
-"go test ./..." to test all subdirectories. See 'go help packages' for details
-on the pattern syntax.
-
-Second, if you are compiling a Go program not in a work space,
-you can use a relative path in an import statement in that program
-to refer to nearby code also not in a work space.
-This makes it easy to experiment with small multipackage programs
-outside of the usual work spaces, but such programs cannot be
-installed with "go install" (there is no work space in which to install them),
-so they are rebuilt from scratch each time they are built.
-To avoid ambiguity, Go programs cannot use relative import paths
-within a work space.
-
-Remote import paths
-
-Certain import paths also
-describe how to obtain the source code for the package using
-a revision control system.
-
-A few common code hosting sites have special syntax:
-
-	Bitbucket (Git, Mercurial)
-
-		import "bitbucket.org/user/project"
-		import "bitbucket.org/user/project/sub/directory"
-
-	GitHub (Git)
-
-		import "github.com/user/project"
-		import "github.com/user/project/sub/directory"
-
-	Google Code Project Hosting (Git, Mercurial, Subversion)
-
-		import "code.google.com/p/project"
-		import "code.google.com/p/project/sub/directory"
-
-		import "code.google.com/p/project.subrepository"
-		import "code.google.com/p/project.subrepository/sub/directory"
-
-	Launchpad (Bazaar)
-
-		import "launchpad.net/project"
-		import "launchpad.net/project/series"
-		import "launchpad.net/project/series/sub/directory"
-
-		import "launchpad.net/~user/project/branch"
-		import "launchpad.net/~user/project/branch/sub/directory"
-
-	IBM DevOps Services (Git)
-
-		import "hub.jazz.net/git/user/project"
-		import "hub.jazz.net/git/user/project/sub/directory"
-
-For code hosted on other servers, import paths may either be qualified
-with the version control type, or the go tool can dynamically fetch
-the import path over https/http and discover where the code resides
-from a <meta> tag in the HTML.
-
-To declare the code location, an import path of the form
-
-	repository.vcs/path
-
-specifies the given repository, with or without the .vcs suffix,
-using the named version control system, and then the path inside
-that repository.  The supported version control systems are:
-
-	Bazaar      .bzr
-	Git         .git
-	Mercurial   .hg
-	Subversion  .svn
-
-For example,
-
-	import "example.org/user/foo.hg"
-
-denotes the root directory of the Mercurial repository at
-example.org/user/foo or foo.hg, and
-
-	import "example.org/repo.git/foo/bar"
-
-denotes the foo/bar directory of the Git repository at
-example.org/repo or repo.git.
-
-When a version control system supports multiple protocols,
-each is tried in turn when downloading.  For example, a Git
-download tries https://, then git+ssh://.
-
-If the import path is not a known code hosting site and also lacks a
-version control qualifier, the go tool attempts to fetch the import
-over https/http and looks for a <meta> tag in the document's HTML
-<head>.
-
-The meta tag has the form:
-
-	<meta name="go-import" content="import-prefix vcs repo-root">
-
-The import-prefix is the import path corresponding to the repository
-root. It must be a prefix or an exact match of the package being
-fetched with "go get". If it's not an exact match, another http
-request is made at the prefix to verify the <meta> tags match.
-
-The meta tag should appear as early in the file as possible.
-In particular, it should appear before any raw JavaScript or CSS,
-to avoid confusing the go command's restricted parser.
-
-The vcs is one of "git", "hg", "svn", etc,
-
-The repo-root is the root of the version control system
-containing a scheme and not containing a .vcs qualifier.
-
-For example,
-
-	import "example.org/pkg/foo"
-
-will result in the following requests:
-
-	https://example.org/pkg/foo?go-get=1 (preferred)
-	http://example.org/pkg/foo?go-get=1  (fallback, only with -insecure)
-
-If that page contains the meta tag
-
-	<meta name="go-import" content="example.org git https://code.org/r/p/exproj">
-
-the go tool will verify that https://example.org/?go-get=1 contains the
-same meta tag and then git clone https://code.org/r/p/exproj into
-GOPATH/src/example.org.
-
-New downloaded packages are written to the first directory
-listed in the GOPATH environment variable (see 'go help gopath').
-
-The go command attempts to download the version of the
-package appropriate for the Go release being used.
-Run 'go help get' for more.
-
-Import path checking
-
-When the custom import path feature described above redirects to a
-known code hosting site, each of the resulting packages has two possible
-import paths, using the custom domain or the known hosting site.
-
-A package statement is said to have an "import comment" if it is immediately
-followed (before the next newline) by a comment of one of these two forms:
-
-	package math // import "path"
-	package math /* import "path" * /
-
-The go command will refuse to install a package with an import comment
-unless it is being referred to by that import path. In this way, import comments
-let package authors make sure the custom import path is used and not a
-direct path to the underlying code hosting site.
-
-If the vendoring experiment is enabled (see 'go help gopath'),
-then import path checking is disabled for code found within vendor trees.
-This makes it possible to copy code into alternate locations in vendor trees
-without needing to update import comments.
-
-See https://golang.org/s/go14customimport for details.
-
-
-Description of package lists
-
-Many commands apply to a set of packages:
-
-	go action [packages]
-
-Usually, [packages] is a list of import paths.
-
-An import path that is a rooted path or that begins with
-a . or .. element is interpreted as a file system path and
-denotes the package in that directory.
-
-Otherwise, the import path P denotes the package found in
-the directory DIR/src/P for some DIR listed in the GOPATH
-environment variable (see 'go help gopath').
-
-If no import paths are given, the action applies to the
-package in the current directory.
-
-There are four reserved names for paths that should not be used
-for packages to be built with the go tool:
-
-- "main" denotes the top-level package in a stand-alone executable.
-
-- "all" expands to all package directories found in all the GOPATH
-trees. For example, 'go list all' lists all the packages on the local
-system.
-
-- "std" is like all but expands to just the packages in the standard
-Go library.
-
-- "cmd" expands to the Go repository's commands and their
-internal libraries.
-
-An import path is a pattern if it includes one or more "..." wildcards,
-each of which can match any string, including the empty string and
-strings containing slashes.  Such a pattern expands to all package
-directories found in the GOPATH trees with names matching the
-patterns.  As a special case, x/... matches x as well as x's subdirectories.
-For example, net/... expands to net and packages in its subdirectories.
-
-An import path can also name a package to be downloaded from
-a remote repository.  Run 'go help importpath' for details.
-
-Every package in a program must have a unique import path.
-By convention, this is arranged by starting each path with a
-unique prefix that belongs to you.  For example, paths used
-internally at Google all begin with 'google', and paths
-denoting remote repositories begin with the path to the code,
-such as 'github.com/user/repo'.
-
-As a special case, if the package list is a list of .go files from a
-single directory, the command is applied to a single synthesized
-package made up of exactly those files, ignoring any build constraints
-in those files and ignoring any other files in the directory.
-
-Directory and file names that begin with "." or "_" are ignored
-by the go tool, as are directories named "testdata".
-
-
-Description of testing flags
-
-The 'go test' command takes both flags that apply to 'go test' itself
-and flags that apply to the resulting test binary.
-
-Several of the flags control profiling and write an execution profile
-suitable for "go tool pprof"; run "go tool pprof -h" for more
-information.  The --alloc_space, --alloc_objects, and --show_bytes
-options of pprof control how the information is presented.
-
-The following flags are recognized by the 'go test' command and
-control the execution of any test:
-
-	-bench regexp
-	    Run benchmarks matching the regular expression.
-	    By default, no benchmarks run. To run all benchmarks,
-	    use '-bench .' or '-bench=.'.
-
-	-benchmem
-	    Print memory allocation statistics for benchmarks.
-
-	-benchtime t
-	    Run enough iterations of each benchmark to take t, specified
-	    as a time.Duration (for example, -benchtime 1h30s).
-	    The default is 1 second (1s).
-
-	-blockprofile block.out
-	    Write a goroutine blocking profile to the specified file
-	    when all tests are complete.
-	    Writes test binary as -c would.
-
-	-blockprofilerate n
-	    Control the detail provided in goroutine blocking profiles by
-	    calling runtime.SetBlockProfileRate with n.
-	    See 'go doc runtime.SetBlockProfileRate'.
-	    The profiler aims to sample, on average, one blocking event every
-	    n nanoseconds the program spends blocked.  By default,
-	    if -test.blockprofile is set without this flag, all blocking events
-	    are recorded, equivalent to -test.blockprofilerate=1.
-
-	-count n
-	    Run each test and benchmark n times (default 1).
-	    If -cpu is set, run n times for each GOMAXPROCS value.
-	    Examples are always run once.
-
-	-cover
-	    Enable coverage analysis.
-
-	-covermode set,count,atomic
-	    Set the mode for coverage analysis for the package[s]
-	    being tested. The default is "set" unless -race is enabled,
-	    in which case it is "atomic".
-	    The values:
-		set: bool: does this statement run?
-		count: int: how many times does this statement run?
-		atomic: int: count, but correct in multithreaded tests;
-			significantly more expensive.
-	    Sets -cover.
-
-	-coverpkg pkg1,pkg2,pkg3
-	    Apply coverage analysis in each test to the given list of packages.
-	    The default is for each test to analyze only the package being tested.
-	    Packages are specified as import paths.
-	    Sets -cover.
-
-	-coverprofile cover.out
-	    Write a coverage profile to the file after all tests have passed.
-	    Sets -cover.
-
-	-cpu 1,2,4
-	    Specify a list of GOMAXPROCS values for which the tests or
-	    benchmarks should be executed.  The default is the current value
-	    of GOMAXPROCS.
-
-	-cpuprofile cpu.out
-	    Write a CPU profile to the specified file before exiting.
-	    Writes test binary as -c would.
-
-	-memprofile mem.out
-	    Write a memory profile to the file after all tests have passed.
-	    Writes test binary as -c would.
-
-	-memprofilerate n
-	    Enable more precise (and expensive) memory profiles by setting
-	    runtime.MemProfileRate.  See 'go doc runtime.MemProfileRate'.
-	    To profile all memory allocations, use -test.memprofilerate=1
-	    and pass --alloc_space flag to the pprof tool.
-
-	-outputdir directory
-	    Place output files from profiling in the specified directory,
-	    by default the directory in which "go test" is running.
-
-	-parallel n
-	    Allow parallel execution of test functions that call t.Parallel.
-	    The value of this flag is the maximum number of tests to run
-	    simultaneously; by default, it is set to the value of GOMAXPROCS.
-
-	-run regexp
-	    Run only those tests and examples matching the regular
-	    expression.
-
-	-short
-	    Tell long-running tests to shorten their run time.
-	    It is off by default but set during all.bash so that installing
-	    the Go tree can run a sanity check but not spend time running
-	    exhaustive tests.
-
-	-timeout t
-	    If a test runs longer than t, panic.
-	    The default is 10 minutes (10m).
-
-	-trace trace.out
-	    Write an execution trace to the specified file before exiting.
-	    Writes test binary as -c would.
-
-	-v
-	    Verbose output: log all tests as they are run. Also print all
-	    text from Log and Logf calls even if the test succeeds.
-
-The test binary, called pkg.test where pkg is the name of the
-directory containing the package sources, can be invoked directly
-after building it with 'go test -c'. When invoking the test binary
-directly, each of the standard flag names must be prefixed with 'test.',
-as in -test.run=TestMyFunc or -test.v.
-
-When running 'go test', flags not listed above are passed through
-unaltered. For instance, the command
-
-	go test -x -v -cpuprofile=prof.out -dir=testdata -update
-
-will compile the test binary and then run it as
-
-	pkg.test -test.v -test.cpuprofile=prof.out -dir=testdata -update
-
-The test flags that generate profiles (other than for coverage) also
-leave the test binary in pkg.test for use when analyzing the profiles.
-
-Flags not recognized by 'go test' must be placed after any specified packages.
-
-
-Description of testing functions
-
-The 'go test' command expects to find test, benchmark, and example functions
-in the "*_test.go" files corresponding to the package under test.
-
-A test function is one named TestXXX (where XXX is any alphanumeric string
-not starting with a lower case letter) and should have the signature,
-
-	func TestXXX(t *testing.T) { ... }
-
-A benchmark function is one named BenchmarkXXX and should have the signature,
-
-	func BenchmarkXXX(b *testing.B) { ... }
-
-An example function is similar to a test function but, instead of using
-*testing.T to report success or failure, prints output to os.Stdout.
-That output is compared against the function's "Output:" comment, which
-must be the last comment in the function body (see example below). An
-example with no such comment, or with no text after "Output:" is compiled
-but not executed.
-
-Godoc displays the body of ExampleXXX to demonstrate the use
-of the function, constant, or variable XXX.  An example of a method M with
-receiver type T or *T is named ExampleT_M.  There may be multiple examples
-for a given function, constant, or variable, distinguished by a trailing _xxx,
-where xxx is a suffix not beginning with an upper case letter.
-
-Here is an example of an example:
-
-	func ExamplePrintln() {
-		Println("The output of\nthis example.")
-		// Output: The output of
-		// this example.
-	}
-
-The entire test file is presented as the example when it contains a single
-example function, at least one other function, type, variable, or constant
-declaration, and no test or benchmark functions.
-
-See the documentation of the testing package for more information.
-
-
-*/
-package main
diff --git a/src/cmd/go/go_test.go b/src/cmd/go/go_test.go
deleted file mode 100644
index 77b2628..0000000
--- a/src/cmd/go/go_test.go
+++ /dev/null
@@ -1,2389 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main_test
-
-import (
-	"bytes"
-	"flag"
-	"fmt"
-	"go/build"
-	"go/format"
-	"internal/testenv"
-	"io"
-	"io/ioutil"
-	"os"
-	"os/exec"
-	"path/filepath"
-	"regexp"
-	"runtime"
-	"strconv"
-	"strings"
-	"testing"
-	"time"
-)
-
-var (
-	canRun  = true  // whether we can run go or ./testgo
-	canRace = false // whether we can run the race detector
-	canCgo  = false // whether we can use cgo
-
-	exeSuffix string // ".exe" on Windows
-
-	builder             = testenv.Builder()
-	skipExternalBuilder = false // skip external tests on this builder
-)
-
-func init() {
-	switch runtime.GOOS {
-	case "android", "nacl":
-		canRun = false
-	case "darwin":
-		switch runtime.GOARCH {
-		case "arm", "arm64":
-			canRun = false
-		}
-	}
-
-	if strings.HasPrefix(builder+"-", "freebsd-arm-") {
-		skipExternalBuilder = true
-		canRun = false
-	}
-
-	switch runtime.GOOS {
-	case "windows":
-		exeSuffix = ".exe"
-	}
-}
-
-// The TestMain function creates a go command for testing purposes and
-// deletes it after the tests have been run.
-func TestMain(m *testing.M) {
-	flag.Parse()
-
-	if canRun {
-		out, err := exec.Command("go", "build", "-tags", "testgo", "-o", "testgo"+exeSuffix).CombinedOutput()
-		if err != nil {
-			fmt.Fprintf(os.Stderr, "building testgo failed: %v\n%s", err, out)
-			os.Exit(2)
-		}
-
-		if out, err := exec.Command("./testgo"+exeSuffix, "env", "CGO_ENABLED").Output(); err != nil {
-			fmt.Fprintf(os.Stderr, "running testgo failed: %v\n", err)
-			canRun = false
-		} else {
-			canCgo, err = strconv.ParseBool(strings.TrimSpace(string(out)))
-			if err != nil {
-				fmt.Fprintf(os.Stderr, "can't parse go env CGO_ENABLED output: %v\n", strings.TrimSpace(string(out)))
-			}
-		}
-
-		switch runtime.GOOS {
-		case "linux", "darwin", "freebsd", "windows":
-			canRace = canCgo && runtime.GOARCH == "amd64"
-		}
-
-		measureTick("./testgo" + exeSuffix)
-	}
-
-	// Don't let these environment variables confuse the test.
-	os.Unsetenv("GOBIN")
-	os.Unsetenv("GOPATH")
-
-	r := m.Run()
-
-	if canRun {
-		os.Remove("testgo" + exeSuffix)
-	}
-
-	os.Exit(r)
-}
-
-// The length of an mtime tick on this system.  This is an estimate of
-// how long we need to sleep to ensure that the mtime of two files is
-// different.
-var mtimeTick time.Duration
-
-// measureTick sets mtimeTick by looking at the rounding of the mtime
-// of a file.
-func measureTick(path string) {
-	st, err := os.Stat(path)
-	if err != nil {
-		// Default to one second, the most conservative value.
-		mtimeTick = time.Second
-		return
-	}
-	mtime := st.ModTime()
-	t := time.Microsecond
-	for mtime.Round(t).Equal(mtime) && t < time.Second {
-		t *= 10
-	}
-	mtimeTick = t
-}
-
-// Manage a single run of the testgo binary.
-type testgoData struct {
-	t              *testing.T
-	temps          []string
-	wd             string
-	env            []string
-	tempdir        string
-	ran            bool
-	inParallel     bool
-	stdout, stderr bytes.Buffer
-}
-
-// testgo sets up for a test that runs testgo.
-func testgo(t *testing.T) *testgoData {
-	testenv.MustHaveGoBuild(t)
-
-	if skipExternalBuilder {
-		t.Skip("skipping external tests on %s builder", builder)
-	}
-
-	return &testgoData{t: t}
-}
-
-// must gives a fatal error if err is not nil.
-func (tg *testgoData) must(err error) {
-	if err != nil {
-		tg.t.Fatal(err)
-	}
-}
-
-// check gives a test non-fatal error if err is not nil.
-func (tg *testgoData) check(err error) {
-	if err != nil {
-		tg.t.Error(err)
-	}
-}
-
-// parallel runs the test in parallel by calling t.Parallel.
-func (tg *testgoData) parallel() {
-	if tg.ran {
-		tg.t.Fatal("internal testsuite error: call to parallel after run")
-	}
-	if tg.wd != "" {
-		tg.t.Fatal("internal testsuite error: call to parallel after cd")
-	}
-	for _, e := range tg.env {
-		if strings.HasPrefix(e, "GOROOT=") || strings.HasPrefix(e, "GOPATH=") || strings.HasPrefix(e, "GOBIN=") {
-			val := e[strings.Index(e, "=")+1:]
-			if strings.HasPrefix(val, "testdata") || strings.HasPrefix(val, "./testdata") {
-				tg.t.Fatalf("internal testsuite error: call to parallel with testdata in environment (%s)", e)
-			}
-		}
-	}
-	tg.inParallel = true
-	tg.t.Parallel()
-}
-
-// pwd returns the current directory.
-func (tg *testgoData) pwd() string {
-	wd, err := os.Getwd()
-	if err != nil {
-		tg.t.Fatalf("could not get working directory: %v", err)
-	}
-	return wd
-}
-
-// cd changes the current directory to the named directory.  Note that
-// using this means that the test must not be run in parallel with any
-// other tests.
-func (tg *testgoData) cd(dir string) {
-	if tg.inParallel {
-		tg.t.Fatal("internal testsuite error: changing directory when running in parallel")
-	}
-	if tg.wd == "" {
-		tg.wd = tg.pwd()
-	}
-	abs, err := filepath.Abs(dir)
-	tg.must(os.Chdir(dir))
-	if err == nil {
-		tg.setenv("PWD", abs)
-	}
-}
-
-// sleep sleeps for one tick, where a tick is a conservative estimate
-// of how long it takes for a file modification to get a different
-// mtime.
-func (tg *testgoData) sleep() {
-	time.Sleep(mtimeTick)
-}
-
-// setenv sets an environment variable to use when running the test go
-// command.
-func (tg *testgoData) setenv(name, val string) {
-	if tg.inParallel && (name == "GOROOT" || name == "GOPATH" || name == "GOBIN") && (strings.HasPrefix(val, "testdata") || strings.HasPrefix(val, "./testdata")) {
-		tg.t.Fatalf("internal testsuite error: call to setenv with testdata (%s=%s) after parallel", name, val)
-	}
-	tg.unsetenv(name)
-	tg.env = append(tg.env, name+"="+val)
-}
-
-// unsetenv removes an environment variable.
-func (tg *testgoData) unsetenv(name string) {
-	if tg.env == nil {
-		tg.env = append([]string(nil), os.Environ()...)
-	}
-	for i, v := range tg.env {
-		if strings.HasPrefix(v, name+"=") {
-			tg.env = append(tg.env[:i], tg.env[i+1:]...)
-			break
-		}
-	}
-}
-
-// doRun runs the test go command, recording stdout and stderr and
-// returning exit status.
-func (tg *testgoData) doRun(args []string) error {
-	if !canRun {
-		panic("testgoData.doRun called but canRun false")
-	}
-	if tg.inParallel {
-		for _, arg := range args {
-			if strings.HasPrefix(arg, "testdata") || strings.HasPrefix(arg, "./testdata") {
-				tg.t.Fatal("internal testsuite error: parallel run using testdata")
-			}
-		}
-	}
-	tg.t.Logf("running testgo %v", args)
-	var prog string
-	if tg.wd == "" {
-		prog = "./testgo" + exeSuffix
-	} else {
-		prog = filepath.Join(tg.wd, "testgo"+exeSuffix)
-	}
-	cmd := exec.Command(prog, args...)
-	tg.stdout.Reset()
-	tg.stderr.Reset()
-	cmd.Stdout = &tg.stdout
-	cmd.Stderr = &tg.stderr
-	cmd.Env = tg.env
-	status := cmd.Run()
-	if tg.stdout.Len() > 0 {
-		tg.t.Log("standard output:")
-		tg.t.Log(tg.stdout.String())
-	}
-	if tg.stderr.Len() > 0 {
-		tg.t.Log("standard error:")
-		tg.t.Log(tg.stderr.String())
-	}
-	tg.ran = true
-	return status
-}
-
-// run runs the test go command, and expects it to succeed.
-func (tg *testgoData) run(args ...string) {
-	if status := tg.doRun(args); status != nil {
-		tg.t.Logf("go %v failed unexpectedly: %v", args, status)
-		tg.t.FailNow()
-	}
-}
-
-// runFail runs the test go command, and expects it to fail.
-func (tg *testgoData) runFail(args ...string) {
-	if status := tg.doRun(args); status == nil {
-		tg.t.Fatal("testgo succeeded unexpectedly")
-	} else {
-		tg.t.Log("testgo failed as expected:", status)
-	}
-}
-
-// runGit runs a git command, and expects it to succeed.
-func (tg *testgoData) runGit(dir string, args ...string) {
-	cmd := exec.Command("git", args...)
-	tg.stdout.Reset()
-	tg.stderr.Reset()
-	cmd.Stdout = &tg.stdout
-	cmd.Stderr = &tg.stderr
-	cmd.Dir = dir
-	cmd.Env = tg.env
-	status := cmd.Run()
-	if tg.stdout.Len() > 0 {
-		tg.t.Log("git standard output:")
-		tg.t.Log(tg.stdout.String())
-	}
-	if tg.stderr.Len() > 0 {
-		tg.t.Log("git standard error:")
-		tg.t.Log(tg.stderr.String())
-	}
-	if status != nil {
-		tg.t.Logf("git %v failed unexpectedly: %v", args, status)
-		tg.t.FailNow()
-	}
-}
-
-// getStdout returns standard output of the testgo run as a string.
-func (tg *testgoData) getStdout() string {
-	if !tg.ran {
-		tg.t.Fatal("internal testsuite error: stdout called before run")
-	}
-	return tg.stdout.String()
-}
-
-// getStderr returns standard error of the testgo run as a string.
-func (tg *testgoData) getStderr() string {
-	if !tg.ran {
-		tg.t.Fatal("internal testsuite error: stdout called before run")
-	}
-	return tg.stderr.String()
-}
-
-// doGrepMatch looks for a regular expression in a buffer, and returns
-// whether it is found.  The regular expression is matched against
-// each line separately, as with the grep command.
-func (tg *testgoData) doGrepMatch(match string, b *bytes.Buffer) bool {
-	if !tg.ran {
-		tg.t.Fatal("internal testsuite error: grep called before run")
-	}
-	re := regexp.MustCompile(match)
-	for _, ln := range bytes.Split(b.Bytes(), []byte{'\n'}) {
-		if re.Match(ln) {
-			return true
-		}
-	}
-	return false
-}
-
-// doGrep looks for a regular expression in a buffer and fails if it
-// is not found.  The name argument is the name of the output we are
-// searching, "output" or "error".  The msg argument is logged on
-// failure.
-func (tg *testgoData) doGrep(match string, b *bytes.Buffer, name, msg string) {
-	if !tg.doGrepMatch(match, b) {
-		tg.t.Log(msg)
-		tg.t.Logf("pattern %v not found in standard %s", match, name)
-		tg.t.FailNow()
-	}
-}
-
-// grepStdout looks for a regular expression in the test run's
-// standard output and fails, logging msg, if it is not found.
-func (tg *testgoData) grepStdout(match, msg string) {
-	tg.doGrep(match, &tg.stdout, "output", msg)
-}
-
-// grepStderr looks for a regular expression in the test run's
-// standard error and fails, logging msg, if it is not found.
-func (tg *testgoData) grepStderr(match, msg string) {
-	tg.doGrep(match, &tg.stderr, "error", msg)
-}
-
-// grepBoth looks for a regular expression in the test run's standard
-// output or stand error and fails, logging msg, if it is not found.
-func (tg *testgoData) grepBoth(match, msg string) {
-	if !tg.doGrepMatch(match, &tg.stdout) && !tg.doGrepMatch(match, &tg.stderr) {
-		tg.t.Log(msg)
-		tg.t.Logf("pattern %v not found in standard output or standard error", match)
-		tg.t.FailNow()
-	}
-}
-
-// doGrepNot looks for a regular expression in a buffer and fails if
-// it is found.  The name and msg arguments are as for doGrep.
-func (tg *testgoData) doGrepNot(match string, b *bytes.Buffer, name, msg string) {
-	if tg.doGrepMatch(match, b) {
-		tg.t.Log(msg)
-		tg.t.Logf("pattern %v found unexpectedly in standard %s", match, name)
-		tg.t.FailNow()
-	}
-}
-
-// grepStdoutNot looks for a regular expression in the test run's
-// standard output and fails, logging msg, if it is found.
-func (tg *testgoData) grepStdoutNot(match, msg string) {
-	tg.doGrepNot(match, &tg.stdout, "output", msg)
-}
-
-// grepStderrNot looks for a regular expression in the test run's
-// standard error and fails, logging msg, if it is found.
-func (tg *testgoData) grepStderrNot(match, msg string) {
-	tg.doGrepNot(match, &tg.stderr, "error", msg)
-}
-
-// grepBothNot looks for a regular expression in the test run's
-// standard output or stand error and fails, logging msg, if it is
-// found.
-func (tg *testgoData) grepBothNot(match, msg string) {
-	if tg.doGrepMatch(match, &tg.stdout) || tg.doGrepMatch(match, &tg.stderr) {
-		tg.t.Log(msg)
-		tg.t.Fatalf("pattern %v found unexpectedly in standard output or standard error", match)
-	}
-}
-
-// doGrepCount counts the number of times a regexp is seen in a buffer.
-func (tg *testgoData) doGrepCount(match string, b *bytes.Buffer) int {
-	if !tg.ran {
-		tg.t.Fatal("internal testsuite error: doGrepCount called before run")
-	}
-	re := regexp.MustCompile(match)
-	c := 0
-	for _, ln := range bytes.Split(b.Bytes(), []byte{'\n'}) {
-		if re.Match(ln) {
-			c++
-		}
-	}
-	return c
-}
-
-// grepCountStdout returns the number of times a regexp is seen in
-// standard output.
-func (tg *testgoData) grepCountStdout(match string) int {
-	return tg.doGrepCount(match, &tg.stdout)
-}
-
-// grepCountStderr returns the number of times a regexp is seen in
-// standard error.
-func (tg *testgoData) grepCountStderr(match string) int {
-	return tg.doGrepCount(match, &tg.stderr)
-}
-
-// grepCountBoth returns the number of times a regexp is seen in both
-// standard output and standard error.
-func (tg *testgoData) grepCountBoth(match string) int {
-	return tg.doGrepCount(match, &tg.stdout) + tg.doGrepCount(match, &tg.stderr)
-}
-
-// creatingTemp records that the test plans to create a temporary file
-// or directory.  If the file or directory exists already, it will be
-// removed.  When the test completes, the file or directory will be
-// removed if it exists.
-func (tg *testgoData) creatingTemp(path string) {
-	if filepath.IsAbs(path) && !strings.HasPrefix(path, tg.tempdir) {
-		tg.t.Fatal("internal testsuite error: creatingTemp(%q) with absolute path not in temporary directory", path)
-	}
-	// If we have changed the working directory, make sure we have
-	// an absolute path, because we are going to change directory
-	// back before we remove the temporary.
-	if tg.wd != "" && !filepath.IsAbs(path) {
-		path = filepath.Join(tg.pwd(), path)
-	}
-	tg.must(os.RemoveAll(path))
-	tg.temps = append(tg.temps, path)
-}
-
-// makeTempdir makes a temporary directory for a run of testgo.  If
-// the temporary directory was already created, this does nothing.
-func (tg *testgoData) makeTempdir() {
-	if tg.tempdir == "" {
-		var err error
-		tg.tempdir, err = ioutil.TempDir("", "gotest")
-		tg.must(err)
-	}
-}
-
-// tempFile adds a temporary file for a run of testgo.
-func (tg *testgoData) tempFile(path, contents string) {
-	tg.makeTempdir()
-	tg.must(os.MkdirAll(filepath.Join(tg.tempdir, filepath.Dir(path)), 0755))
-	bytes := []byte(contents)
-	if strings.HasSuffix(path, ".go") {
-		formatted, err := format.Source(bytes)
-		if err == nil {
-			bytes = formatted
-		}
-	}
-	tg.must(ioutil.WriteFile(filepath.Join(tg.tempdir, path), bytes, 0644))
-}
-
-// tempDir adds a temporary directory for a run of testgo.
-func (tg *testgoData) tempDir(path string) {
-	tg.makeTempdir()
-	if err := os.MkdirAll(filepath.Join(tg.tempdir, path), 0755); err != nil && !os.IsExist(err) {
-		tg.t.Fatal(err)
-	}
-}
-
-// path returns the absolute pathname to file with the temporary
-// directory.
-func (tg *testgoData) path(name string) string {
-	if tg.tempdir == "" {
-		tg.t.Fatalf("internal testsuite error: path(%q) with no tempdir", name)
-	}
-	if name == "." {
-		return tg.tempdir
-	}
-	return filepath.Join(tg.tempdir, name)
-}
-
-// mustNotExist fails if path exists.
-func (tg *testgoData) mustNotExist(path string) {
-	if _, err := os.Stat(path); err == nil || !os.IsNotExist(err) {
-		tg.t.Fatalf("%s exists but should not (%v)", path, err)
-	}
-}
-
-// wantExecutable fails with msg if path is not executable.
-func (tg *testgoData) wantExecutable(path, msg string) {
-	if st, err := os.Stat(path); err != nil {
-		if !os.IsNotExist(err) {
-			tg.t.Log(err)
-		}
-		tg.t.Fatal(msg)
-	} else {
-		if runtime.GOOS != "windows" && st.Mode()&0111 == 0 {
-			tg.t.Fatalf("binary %s exists but is not executable", path)
-		}
-	}
-}
-
-// wantArchive fails if path is not an archive.
-func (tg *testgoData) wantArchive(path string) {
-	f, err := os.Open(path)
-	if err != nil {
-		tg.t.Fatal(err)
-	}
-	buf := make([]byte, 100)
-	io.ReadFull(f, buf)
-	f.Close()
-	if !bytes.HasPrefix(buf, []byte("!<arch>\n")) {
-		tg.t.Fatalf("file %s exists but is not an archive", path)
-	}
-}
-
-// isStale returns whether pkg is stale.
-func (tg *testgoData) isStale(pkg string) bool {
-	tg.run("list", "-f", "{{.Stale}}", pkg)
-	switch v := strings.TrimSpace(tg.getStdout()); v {
-	case "true":
-		return true
-	case "false":
-		return false
-	default:
-		tg.t.Fatalf("unexpected output checking staleness of package %v: %v", pkg, v)
-		panic("unreachable")
-	}
-}
-
-// wantStale fails with msg if pkg is not stale.
-func (tg *testgoData) wantStale(pkg, msg string) {
-	if !tg.isStale(pkg) {
-		tg.t.Fatal(msg)
-	}
-}
-
-// wantNotStale fails with msg if pkg is stale.
-func (tg *testgoData) wantNotStale(pkg, msg string) {
-	if tg.isStale(pkg) {
-		tg.t.Fatal(msg)
-	}
-}
-
-// cleanup cleans up a test that runs testgo.
-func (tg *testgoData) cleanup() {
-	if tg.wd != "" {
-		if err := os.Chdir(tg.wd); err != nil {
-			// We are unlikely to be able to continue.
-			fmt.Fprintln(os.Stderr, "could not restore working directory, crashing:", err)
-			os.Exit(2)
-		}
-	}
-	for _, path := range tg.temps {
-		tg.check(os.RemoveAll(path))
-	}
-	if tg.tempdir != "" {
-		tg.check(os.RemoveAll(tg.tempdir))
-	}
-}
-
-// resetReadOnlyFlagAll resets windows read-only flag
-// set on path and any children it contains.
-// The flag is set by git and has to be removed.
-// os.Remove refuses to remove files with read-only flag set.
-func (tg *testgoData) resetReadOnlyFlagAll(path string) {
-	fi, err := os.Stat(path)
-	if err != nil {
-		tg.t.Fatalf("resetReadOnlyFlagAll(%q) failed: %v", path, err)
-	}
-	if !fi.IsDir() {
-		err := os.Chmod(path, 0666)
-		if err != nil {
-			tg.t.Fatalf("resetReadOnlyFlagAll(%q) failed: %v", path, err)
-		}
-	}
-	fd, err := os.Open(path)
-	if err != nil {
-		tg.t.Fatalf("resetReadOnlyFlagAll(%q) failed: %v", path, err)
-	}
-	defer fd.Close()
-	names, _ := fd.Readdirnames(-1)
-	for _, name := range names {
-		tg.resetReadOnlyFlagAll(path + string(filepath.Separator) + name)
-	}
-}
-
-// failSSH puts an ssh executable in the PATH that always fails.
-// This is to stub out uses of ssh by go get.
-func (tg *testgoData) failSSH() {
-	wd, err := os.Getwd()
-	if err != nil {
-		tg.t.Fatal(err)
-	}
-	fail := filepath.Join(wd, "testdata/failssh")
-	tg.setenv("PATH", fmt.Sprintf("%v%c%v", fail, filepath.ListSeparator, os.Getenv("PATH")))
-}
-
-func TestFileLineInErrorMessages(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.parallel()
-	tg.tempFile("err.go", `package main; import "bar"`)
-	path := tg.path("err.go")
-	tg.runFail("run", path)
-	shortPath := path
-	if rel, err := filepath.Rel(tg.pwd(), path); err == nil && len(rel) < len(path) {
-		shortPath = rel
-	}
-	tg.grepStderr("^"+regexp.QuoteMeta(shortPath)+":", "missing file:line in error message")
-}
-
-func TestProgramNameInCrashMessages(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.parallel()
-	tg.tempFile("triv.go", `package main; func main() {}`)
-	tg.runFail("build", "-ldflags", "-crash_for_testing", tg.path("triv.go"))
-	tg.grepStderr(`[/\\]tool[/\\].*[/\\]link`, "missing linker name in error message")
-}
-
-func TestBrokenTestsWithoutTestFunctionsAllFail(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.runFail("test", "./testdata/src/badtest/...")
-	tg.grepBothNot("^ok", "test passed unexpectedly")
-	tg.grepBoth("FAIL.*badtest/badexec", "test did not run everything")
-	tg.grepBoth("FAIL.*badtest/badsyntax", "test did not run everything")
-	tg.grepBoth("FAIL.*badtest/badvar", "test did not run everything")
-}
-
-func TestGoBuildDashAInDevBranch(t *testing.T) {
-	if testing.Short() {
-		t.Skip("don't rebuild the standard library in short mode")
-	}
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.run("install", "math") // should be up to date already but just in case
-	tg.setenv("TESTGO_IS_GO_RELEASE", "0")
-	tg.run("build", "-v", "-a", "math")
-	tg.grepStderr("runtime", "testgo build -a math in dev branch DID NOT build runtime, but should have")
-}
-
-func TestGoBuilDashAInReleaseBranch(t *testing.T) {
-	if testing.Short() {
-		t.Skip("don't rebuild the standard library in short mode")
-	}
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.run("install", "math") // should be up to date already but just in case
-	tg.setenv("TESTGO_IS_GO_RELEASE", "1")
-	tg.run("build", "-v", "-a", "math")
-	tg.grepStderr("runtime", "testgo build -a math in dev branch did not build runtime, but should have")
-}
-
-func TestGoInstallCleansUpAfterGoBuild(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.tempFile("src/mycmd/main.go", `package main; func main(){}`)
-	tg.setenv("GOPATH", tg.path("."))
-	tg.cd(tg.path("src/mycmd"))
-
-	doesNotExist := func(file, msg string) {
-		if _, err := os.Stat(file); err == nil {
-			t.Fatal(msg)
-		} else if !os.IsNotExist(err) {
-			t.Fatal(msg, "error:", err)
-		}
-	}
-
-	tg.run("build")
-	tg.wantExecutable("mycmd"+exeSuffix, "testgo build did not write command binary")
-	tg.run("install")
-	doesNotExist("mycmd"+exeSuffix, "testgo install did not remove command binary")
-	tg.run("build")
-	tg.wantExecutable("mycmd"+exeSuffix, "testgo build did not write command binary (second time)")
-	// Running install with arguments does not remove the target,
-	// even in the same directory.
-	tg.run("install", "mycmd")
-	tg.wantExecutable("mycmd"+exeSuffix, "testgo install mycmd removed command binary when run in mycmd")
-	tg.run("build")
-	tg.wantExecutable("mycmd"+exeSuffix, "testgo build did not write command binary (third time)")
-	// And especially not outside the directory.
-	tg.cd(tg.path("."))
-	if data, err := ioutil.ReadFile("src/mycmd/mycmd" + exeSuffix); err != nil {
-		t.Fatal("could not read file:", err)
-	} else {
-		if err := ioutil.WriteFile("mycmd"+exeSuffix, data, 0555); err != nil {
-			t.Fatal("could not write file:", err)
-		}
-	}
-	tg.run("install", "mycmd")
-	tg.wantExecutable("src/mycmd/mycmd"+exeSuffix, "testgo install mycmd removed command binary from its source dir when run outside mycmd")
-	tg.wantExecutable("mycmd"+exeSuffix, "testgo install mycmd removed command binary from current dir when run outside mycmd")
-}
-
-func TestGoInstallRebuildsStalePackagesInOtherGOPATH(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.parallel()
-	tg.tempFile("d1/src/p1/p1.go", `package p1
-		import "p2"
-		func F() { p2.F() }`)
-	tg.tempFile("d2/src/p2/p2.go", `package p2
-		func F() {}`)
-	sep := string(filepath.ListSeparator)
-	tg.setenv("GOPATH", tg.path("d1")+sep+tg.path("d2"))
-	tg.run("install", "p1")
-	tg.wantNotStale("p1", "./testgo list mypkg claims p1 is stale, incorrectly")
-	tg.wantNotStale("p2", "./testgo list mypkg claims p2 is stale, incorrectly")
-	tg.sleep()
-	if f, err := os.OpenFile(tg.path("d2/src/p2/p2.go"), os.O_WRONLY|os.O_APPEND, 0); err != nil {
-		t.Fatal(err)
-	} else if _, err = f.WriteString(`func G() {}`); err != nil {
-		t.Fatal(err)
-	} else {
-		tg.must(f.Close())
-	}
-	tg.wantStale("p2", "./testgo list mypkg claims p2 is NOT stale, incorrectly")
-	tg.wantStale("p1", "./testgo list mypkg claims p1 is NOT stale, incorrectly")
-
-	tg.run("install", "p1")
-	tg.wantNotStale("p2", "./testgo list mypkg claims p2 is stale after reinstall, incorrectly")
-	tg.wantNotStale("p1", "./testgo list mypkg claims p1 is stale after reinstall, incorrectly")
-}
-
-func TestGoInstallDetectsRemovedFiles(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.parallel()
-	tg.tempFile("src/mypkg/x.go", `package mypkg`)
-	tg.tempFile("src/mypkg/y.go", `package mypkg`)
-	tg.tempFile("src/mypkg/z.go", `// +build missingtag
-
-		package mypkg`)
-	tg.setenv("GOPATH", tg.path("."))
-	tg.run("install", "mypkg")
-	tg.wantNotStale("mypkg", "./testgo list mypkg claims mypkg is stale, incorrectly")
-	// z.go was not part of the build; removing it is okay.
-	tg.must(os.Remove(tg.path("src/mypkg/z.go")))
-	tg.wantNotStale("mypkg", "./testgo list mypkg claims mypkg is stale after removing z.go; should not be stale")
-	// y.go was part of the package; removing it should be detected.
-	tg.must(os.Remove(tg.path("src/mypkg/y.go")))
-	tg.wantStale("mypkg", "./testgo list mypkg claims mypkg is NOT stale after removing y.go; should be stale")
-}
-
-func TestGoInstallErrorOnCrossCompileToBin(t *testing.T) {
-	if testing.Short() {
-		t.Skip("don't install into GOROOT in short mode")
-	}
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.tempFile("src/mycmd/x.go", `package main
-		func main() {}`)
-	tg.setenv("GOPATH", tg.path("."))
-	tg.cd(tg.path("src/mycmd"))
-
-	tg.run("build", "mycmd")
-
-	goarch := "386"
-	if runtime.GOARCH == "386" {
-		goarch = "amd64"
-	}
-	tg.setenv("GOOS", "linux")
-	tg.setenv("GOARCH", goarch)
-	tg.run("install", "mycmd")
-	tg.setenv("GOBIN", tg.path("."))
-	tg.runFail("install", "mycmd")
-	tg.run("install", "cmd/pack")
-}
-
-func TestGoInstallDetectsRemovedFilesInPackageMain(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.parallel()
-	tg.tempFile("src/mycmd/x.go", `package main
-		func main() {}`)
-	tg.tempFile("src/mycmd/y.go", `package main`)
-	tg.tempFile("src/mycmd/z.go", `// +build missingtag
-
-		package main`)
-	tg.setenv("GOPATH", tg.path("."))
-	tg.run("install", "mycmd")
-	tg.wantNotStale("mycmd", "./testgo list mypkg claims mycmd is stale, incorrectly")
-	// z.go was not part of the build; removing it is okay.
-	tg.must(os.Remove(tg.path("src/mycmd/z.go")))
-	tg.wantNotStale("mycmd", "./testgo list mycmd claims mycmd is stale after removing z.go; should not be stale")
-	// y.go was part of the package; removing it should be detected.
-	tg.must(os.Remove(tg.path("src/mycmd/y.go")))
-	tg.wantStale("mycmd", "./testgo list mycmd claims mycmd is NOT stale after removing y.go; should be stale")
-}
-
-func testLocalRun(tg *testgoData, exepath, local, match string) {
-	out, err := exec.Command(exepath).Output()
-	if err != nil {
-		tg.t.Fatalf("error running %v: %v", exepath, err)
-	}
-	if !regexp.MustCompile(match).Match(out) {
-		tg.t.Log(string(out))
-		tg.t.Errorf("testdata/%s/easy.go did not generate expected output", local)
-	}
-}
-
-func testLocalEasy(tg *testgoData, local string) {
-	exepath := "./easy" + exeSuffix
-	tg.creatingTemp(exepath)
-	tg.run("build", "-o", exepath, filepath.Join("testdata", local, "easy.go"))
-	testLocalRun(tg, exepath, local, `(?m)^easysub\.Hello`)
-}
-
-func testLocalEasySub(tg *testgoData, local string) {
-	exepath := "./easysub" + exeSuffix
-	tg.creatingTemp(exepath)
-	tg.run("build", "-o", exepath, filepath.Join("testdata", local, "easysub", "main.go"))
-	testLocalRun(tg, exepath, local, `(?m)^easysub\.Hello`)
-}
-
-func testLocalHard(tg *testgoData, local string) {
-	exepath := "./hard" + exeSuffix
-	tg.creatingTemp(exepath)
-	tg.run("build", "-o", exepath, filepath.Join("testdata", local, "hard.go"))
-	testLocalRun(tg, exepath, local, `(?m)^sub\.Hello`)
-}
-
-func testLocalInstall(tg *testgoData, local string) {
-	tg.runFail("install", filepath.Join("testdata", local, "easy.go"))
-}
-
-func TestLocalImportsEasy(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	testLocalEasy(tg, "local")
-}
-
-func TestLocalImportsEasySub(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	testLocalEasySub(tg, "local")
-}
-
-func TestLocalImportsHard(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	testLocalHard(tg, "local")
-}
-
-func TestLocalImportsGoInstallShouldFail(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	testLocalInstall(tg, "local")
-}
-
-const badDirName = `#$%:, &()*;<=>?\^{}`
-
-func copyBad(tg *testgoData) {
-	if runtime.GOOS == "windows" {
-		tg.t.Skipf("skipping test because %q is an invalid directory name", badDirName)
-	}
-
-	tg.must(filepath.Walk("testdata/local",
-		func(path string, info os.FileInfo, err error) error {
-			if err != nil {
-				return err
-			}
-			if info.IsDir() {
-				return nil
-			}
-			var data []byte
-			data, err = ioutil.ReadFile(path)
-			if err != nil {
-				return err
-			}
-			newpath := strings.Replace(path, "local", badDirName, 1)
-			tg.tempFile(newpath, string(data))
-			return nil
-		}))
-	tg.cd(tg.path("."))
-}
-
-func TestBadImportsEasy(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	copyBad(tg)
-	testLocalEasy(tg, badDirName)
-}
-
-func TestBadImportsEasySub(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	copyBad(tg)
-	testLocalEasySub(tg, badDirName)
-}
-
-func TestBadImportsHard(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	copyBad(tg)
-	testLocalHard(tg, badDirName)
-}
-
-func TestBadImportsGoInstallShouldFail(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	copyBad(tg)
-	testLocalInstall(tg, badDirName)
-}
-
-func TestInternalPackagesInGOROOTAreRespected(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.runFail("build", "-v", "./testdata/testinternal")
-	tg.grepBoth("use of internal package not allowed", "wrong error message for testdata/testinternal")
-}
-
-func TestInternalPackagesOutsideGOROOTAreRespected(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.runFail("build", "-v", "./testdata/testinternal2")
-	tg.grepBoth("use of internal package not allowed", "wrote error message for testdata/testinternal2")
-}
-
-func testMove(t *testing.T, vcs, url, base, config string) {
-	testenv.MustHaveExternalNetwork(t)
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.parallel()
-	tg.tempDir("src")
-	tg.setenv("GOPATH", tg.path("."))
-	tg.run("get", "-d", url)
-	tg.run("get", "-d", "-u", url)
-	switch vcs {
-	case "svn":
-		// SVN doesn't believe in text files so we can't just edit the config.
-		// Check out a different repo into the wrong place.
-		tg.must(os.RemoveAll(tg.path("src/code.google.com/p/rsc-svn")))
-		tg.run("get", "-d", "-u", "code.google.com/p/rsc-svn2/trunk")
-		tg.must(os.Rename(tg.path("src/code.google.com/p/rsc-svn2"), tg.path("src/code.google.com/p/rsc-svn")))
-	default:
-		path := tg.path(filepath.Join("src", config))
-		data, err := ioutil.ReadFile(path)
-		tg.must(err)
-		data = bytes.Replace(data, []byte(base), []byte(base+"XXX"), -1)
-		tg.must(ioutil.WriteFile(path, data, 0644))
-	}
-	if vcs == "git" {
-		// git will ask for a username and password when we
-		// run go get -d -f -u.  An empty username and
-		// password will work.  Prevent asking by setting
-		// GIT_ASKPASS.
-		tg.creatingTemp("sink" + exeSuffix)
-		tg.tempFile("src/sink/sink.go", `package main; func main() {}`)
-		tg.run("build", "-o", "sink"+exeSuffix, "sink")
-		tg.setenv("GIT_ASKPASS", filepath.Join(tg.pwd(), "sink"+exeSuffix))
-	}
-	tg.runFail("get", "-d", "-u", url)
-	tg.grepStderr("is a custom import path for", "go get -d -u "+url+" failed for wrong reason")
-	tg.runFail("get", "-d", "-f", "-u", url)
-	tg.grepStderr("validating server certificate|not found", "go get -d -f -u "+url+" failed for wrong reason")
-}
-
-func TestInternalPackageErrorsAreHandled(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.run("list", "./testdata/testinternal3")
-}
-
-func TestInternalCache(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata/testinternal4"))
-	tg.runFail("build", "p")
-	tg.grepStderr("internal", "did not fail to build p")
-}
-
-func TestMoveGit(t *testing.T) {
-	testMove(t, "git", "rsc.io/pdf", "pdf", "rsc.io/pdf/.git/config")
-}
-
-// TODO(rsc): Set up a test case on bitbucket for hg.
-// func TestMoveHG(t *testing.T) {
-// 	testMove(t, "hg", "rsc.io/x86/x86asm", "x86", "rsc.io/x86/.hg/hgrc")
-// }
-
-// TODO(rsc): Set up a test case on SourceForge (?) for svn.
-// func testMoveSVN(t *testing.T) {
-//	testMove(t, "svn", "code.google.com/p/rsc-svn/trunk", "-", "-")
-// }
-
-func TestImportCommandMatch(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata/importcom"))
-	tg.run("build", "./testdata/importcom/works.go")
-}
-
-func TestImportCommentMismatch(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata/importcom"))
-	tg.runFail("build", "./testdata/importcom/wrongplace.go")
-	tg.grepStderr(`wrongplace expects import "my/x"`, "go build did not mention incorrect import")
-}
-
-func TestImportCommentSyntaxError(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata/importcom"))
-	tg.runFail("build", "./testdata/importcom/bad.go")
-	tg.grepStderr("cannot parse import comment", "go build did not mention syntax error")
-}
-
-func TestImportCommentConflict(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata/importcom"))
-	tg.runFail("build", "./testdata/importcom/conflict.go")
-	tg.grepStderr("found import comments", "go build did not mention comment conflict")
-}
-
-// cmd/go: custom import path checking should not apply to github.com/xxx/yyy.
-func TestIssue10952(t *testing.T) {
-	testenv.MustHaveExternalNetwork(t)
-
-	if _, err := exec.LookPath("git"); err != nil {
-		t.Skip("skipping because git binary not found")
-	}
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.parallel()
-	tg.tempDir("src")
-	tg.setenv("GOPATH", tg.path("."))
-	const importPath = "github.com/zombiezen/go-get-issue-10952"
-	tg.run("get", "-d", "-u", importPath)
-	repoDir := tg.path("src/" + importPath)
-	defer tg.resetReadOnlyFlagAll(repoDir)
-	tg.runGit(repoDir, "remote", "set-url", "origin", "https://"+importPath+".git")
-	tg.run("get", "-d", "-u", importPath)
-}
-
-func TestDisallowedCSourceFiles(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
-	tg.runFail("build", "badc")
-	tg.grepStderr("C source files not allowed", "go test did not say C source files not allowed")
-}
-
-func TestErrorMessageForSyntaxErrorInTestGoFileSaysFAIL(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
-	tg.runFail("test", "syntaxerror")
-	tg.grepStderr("FAIL", "go test did not say FAIL")
-}
-
-func TestWildcardsDoNotLookInUselessDirectories(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
-	tg.runFail("list", "...")
-	tg.grepBoth("badpkg", "go list ... failure does not mention badpkg")
-	tg.run("list", "m...")
-}
-
-func TestRelativeImportsGoTest(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.run("test", "./testdata/testimport")
-}
-
-func TestRelativeImportsGoTestDashI(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.run("test", "-i", "./testdata/testimport")
-}
-
-func TestRelativeImportsInCommandLinePackage(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	files, err := filepath.Glob("./testdata/testimport/*.go")
-	tg.must(err)
-	tg.run(append([]string{"test"}, files...)...)
-}
-
-func TestVersionControlErrorMessageIncludesCorrectDirectory(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata/shadow/root1"))
-	tg.runFail("get", "-u", "foo")
-
-	// TODO(iant): We should not have to use strconv.Quote here.
-	// The code in vcs.go should be changed so that it is not required.
-	quoted := strconv.Quote(filepath.Join("testdata", "shadow", "root1", "src", "foo"))
-	quoted = quoted[1 : len(quoted)-1]
-
-	tg.grepStderr(regexp.QuoteMeta(quoted), "go get -u error does not mention shadow/root1/src/foo")
-}
-
-func TestInstallFailsWithNoBuildableFiles(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
-	tg.setenv("CGO_ENABLED", "0")
-	tg.runFail("install", "cgotest")
-	tg.grepStderr("no buildable Go source files", "go install cgotest did not report 'no buildable Go Source files'")
-}
-
-// Test that without $GOBIN set, binaries get installed
-// into the GOPATH bin directory.
-func TestInstallIntoGOPATH(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.creatingTemp("testdata/bin/go-cmd-test" + exeSuffix)
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
-	tg.run("install", "go-cmd-test")
-	tg.wantExecutable("testdata/bin/go-cmd-test"+exeSuffix, "go install go-cmd-test did not write to testdata/bin/go-cmd-test")
-}
-
-func TestPackageMainTestImportsArchiveNotBinary(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	gobin := filepath.Join(tg.pwd(), "testdata", "bin")
-	tg.creatingTemp(gobin)
-	tg.setenv("GOBIN", gobin)
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
-	tg.must(os.Chtimes("./testdata/src/main_test/m.go", time.Now(), time.Now()))
-	tg.sleep()
-	tg.run("test", "main_test")
-	tg.run("install", "main_test")
-	tg.wantNotStale("main_test", "after go install, main listed as stale")
-	tg.run("test", "main_test")
-}
-
-// With $GOBIN set, binaries get installed to $GOBIN.
-func TestInstallIntoGOBIN(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	gobin := filepath.Join(tg.pwd(), "testdata", "bin1")
-	tg.creatingTemp(gobin)
-	tg.setenv("GOBIN", gobin)
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
-	tg.run("install", "go-cmd-test")
-	tg.wantExecutable("testdata/bin1/go-cmd-test"+exeSuffix, "go install go-cmd-test did not write to testdata/bin1/go-cmd-test")
-}
-
-// Issue 11065
-func TestInstallToCurrentDirectoryCreatesExecutable(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	pkg := filepath.Join(tg.pwd(), "testdata", "src", "go-cmd-test")
-	tg.creatingTemp(filepath.Join(pkg, "go-cmd-test"+exeSuffix))
-	tg.setenv("GOBIN", pkg)
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
-	tg.cd(pkg)
-	tg.run("install")
-	tg.wantExecutable("go-cmd-test"+exeSuffix, "go install did not write to current directory")
-}
-
-// Without $GOBIN set, installing a program outside $GOPATH should fail
-// (there is nowhere to install it).
-func TestInstallWithoutDestinationFails(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.runFail("install", "testdata/src/go-cmd-test/helloworld.go")
-	tg.grepStderr("no install location for .go files listed on command line", "wrong error")
-}
-
-// With $GOBIN set, should install there.
-func TestInstallToGOBINCommandLinePackage(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	gobin := filepath.Join(tg.pwd(), "testdata", "bin1")
-	tg.creatingTemp(gobin)
-	tg.setenv("GOBIN", gobin)
-	tg.run("install", "testdata/src/go-cmd-test/helloworld.go")
-	tg.wantExecutable("testdata/bin1/helloworld"+exeSuffix, "go install testdata/src/go-cmd-test/helloworld.go did not write testdata/bin1/helloworld")
-}
-
-func TestGodocInstalls(t *testing.T) {
-	testenv.MustHaveExternalNetwork(t)
-
-	// godoc installs into GOBIN
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.parallel()
-	tg.tempDir("gobin")
-	tg.setenv("GOPATH", tg.path("."))
-	tg.setenv("GOBIN", tg.path("gobin"))
-	tg.run("get", "golang.org/x/tools/cmd/godoc")
-	tg.wantExecutable(tg.path("gobin/godoc"), "did not install godoc to $GOBIN")
-	tg.unsetenv("GOBIN")
-
-	// godoc installs into GOROOT
-	goroot := runtime.GOROOT()
-	tg.setenv("GOROOT", goroot)
-	tg.check(os.RemoveAll(filepath.Join(goroot, "bin", "godoc")))
-	tg.run("install", "golang.org/x/tools/cmd/godoc")
-	tg.wantExecutable(filepath.Join(goroot, "bin", "godoc"), "did not install godoc to $GOROOT/bin")
-}
-
-func TestGoGetNonPkg(t *testing.T) {
-	testenv.MustHaveExternalNetwork(t)
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.tempDir("gobin")
-	tg.setenv("GOPATH", tg.path("."))
-	tg.setenv("GOBIN", tg.path("gobin"))
-	tg.runFail("get", "-d", "golang.org/x/tools")
-	tg.grepStderr("golang.org/x/tools: no buildable Go source files", "missing error")
-	tg.runFail("get", "-d", "-u", "golang.org/x/tools")
-	tg.grepStderr("golang.org/x/tools: no buildable Go source files", "missing error")
-	tg.runFail("get", "-d", "golang.org/x/tools")
-	tg.grepStderr("golang.org/x/tools: no buildable Go source files", "missing error")
-}
-
-func TestInstalls(t *testing.T) {
-	if testing.Short() {
-		t.Skip("don't install into GOROOT in short mode")
-	}
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.parallel()
-	tg.tempDir("gobin")
-	tg.setenv("GOPATH", tg.path("."))
-	goroot := runtime.GOROOT()
-	tg.setenv("GOROOT", goroot)
-
-	// cmd/fix installs into tool
-	tg.run("env", "GOOS")
-	goos := strings.TrimSpace(tg.getStdout())
-	tg.setenv("GOOS", goos)
-	tg.run("env", "GOARCH")
-	goarch := strings.TrimSpace(tg.getStdout())
-	tg.setenv("GOARCH", goarch)
-	fixbin := filepath.Join(goroot, "pkg", "tool", goos+"_"+goarch, "fix") + exeSuffix
-	tg.must(os.RemoveAll(fixbin))
-	tg.run("install", "cmd/fix")
-	tg.wantExecutable(fixbin, "did not install cmd/fix to $GOROOT/pkg/tool")
-	tg.must(os.Remove(fixbin))
-	tg.setenv("GOBIN", tg.path("gobin"))
-	tg.run("install", "cmd/fix")
-	tg.wantExecutable(fixbin, "did not install cmd/fix to $GOROOT/pkg/tool with $GOBIN set")
-	tg.unsetenv("GOBIN")
-
-	// gopath program installs into GOBIN
-	tg.tempFile("src/progname/p.go", `package main; func main() {}`)
-	tg.setenv("GOBIN", tg.path("gobin"))
-	tg.run("install", "progname")
-	tg.unsetenv("GOBIN")
-	tg.wantExecutable(tg.path("gobin/progname")+exeSuffix, "did not install progname to $GOBIN/progname")
-
-	// gopath program installs into GOPATH/bin
-	tg.run("install", "progname")
-	tg.wantExecutable(tg.path("bin/progname")+exeSuffix, "did not install progname to $GOPATH/bin/progname")
-}
-
-func TestRejectRelativeDotPathInGOPATHCommandLinePackage(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.setenv("GOPATH", ".")
-	tg.runFail("build", "testdata/src/go-cmd-test/helloworld.go")
-	tg.grepStderr("GOPATH entry is relative", "expected an error message rejecting relative GOPATH entries")
-}
-
-func TestRejectRelativePathsInGOPATH(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	sep := string(filepath.ListSeparator)
-	tg.setenv("GOPATH", sep+filepath.Join(tg.pwd(), "testdata")+sep+".")
-	tg.runFail("build", "go-cmd-test")
-	tg.grepStderr("GOPATH entry is relative", "expected an error message rejecting relative GOPATH entries")
-}
-
-func TestRejectRelativePathsInGOPATHCommandLinePackage(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.setenv("GOPATH", "testdata")
-	tg.runFail("build", "testdata/src/go-cmd-test/helloworld.go")
-	tg.grepStderr("GOPATH entry is relative", "expected an error message rejecting relative GOPATH entries")
-}
-
-// Issue 4104.
-func TestGoTestWithPackageListedMultipleTimes(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.parallel()
-	tg.run("test", "errors", "errors", "errors", "errors", "errors")
-	if strings.Index(strings.TrimSpace(tg.getStdout()), "\n") != -1 {
-		t.Error("go test errors errors errors errors errors tested the same package multiple times")
-	}
-}
-
-func TestGoListHasAConsistentOrder(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.run("list", "std")
-	first := tg.getStdout()
-	tg.run("list", "std")
-	if first != tg.getStdout() {
-		t.Error("go list std ordering is inconsistent")
-	}
-}
-
-func TestGoListStdDoesNotIncludeCommands(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.run("list", "std")
-	tg.grepStdoutNot("cmd/", "go list std shows commands")
-}
-
-func TestGoListCmdOnlyShowsCommands(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.run("list", "cmd")
-	out := strings.TrimSpace(tg.getStdout())
-	for _, line := range strings.Split(out, "\n") {
-		if strings.Index(line, "cmd/") == -1 {
-			t.Error("go list cmd shows non-commands")
-			break
-		}
-	}
-}
-
-// Issue 4096. Validate the output of unsuccessful go install foo/quxx.
-func TestUnsuccessfulGoInstallShouldMentionMissingPackage(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.runFail("install", "foo/quxx")
-	if tg.grepCountBoth(`cannot find package "foo/quxx" in any of`) != 1 {
-		t.Error(`go install foo/quxx expected error: .*cannot find package "foo/quxx" in any of`)
-	}
-}
-
-func TestGOROOTSearchFailureReporting(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.runFail("install", "foo/quxx")
-	if tg.grepCountBoth(regexp.QuoteMeta(filepath.Join("foo", "quxx"))+` \(from \$GOROOT\)$`) != 1 {
-		t.Error(`go install foo/quxx expected error: .*foo/quxx (from $GOROOT)`)
-	}
-}
-
-func TestMultipleGOPATHEntriesReportedSeparately(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	sep := string(filepath.ListSeparator)
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata", "a")+sep+filepath.Join(tg.pwd(), "testdata", "b"))
-	tg.runFail("install", "foo/quxx")
-	if tg.grepCountBoth(`testdata[/\\].[/\\]src[/\\]foo[/\\]quxx`) != 2 {
-		t.Error(`go install foo/quxx expected error: .*testdata/a/src/foo/quxx (from $GOPATH)\n.*testdata/b/src/foo/quxx`)
-	}
-}
-
-// Test (from $GOPATH) annotation is reported for the first GOPATH entry,
-func TestMentionGOPATHInFirstGOPATHEntry(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	sep := string(filepath.ListSeparator)
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata", "a")+sep+filepath.Join(tg.pwd(), "testdata", "b"))
-	tg.runFail("install", "foo/quxx")
-	if tg.grepCountBoth(regexp.QuoteMeta(filepath.Join("testdata", "a", "src", "foo", "quxx"))+` \(from \$GOPATH\)$`) != 1 {
-		t.Error(`go install foo/quxx expected error: .*testdata/a/src/foo/quxx (from $GOPATH)`)
-	}
-}
-
-// but not on the second.
-func TestMentionGOPATHNotOnSecondEntry(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	sep := string(filepath.ListSeparator)
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata", "a")+sep+filepath.Join(tg.pwd(), "testdata", "b"))
-	tg.runFail("install", "foo/quxx")
-	if tg.grepCountBoth(regexp.QuoteMeta(filepath.Join("testdata", "b", "src", "foo", "quxx"))+`$`) != 1 {
-		t.Error(`go install foo/quxx expected error: .*testdata/b/src/foo/quxx`)
-	}
-}
-
-// Test missing GOPATH is reported.
-func TestMissingGOPATHIsReported(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.setenv("GOPATH", "")
-	tg.runFail("install", "foo/quxx")
-	if tg.grepCountBoth(`\(\$GOPATH not set\)$`) != 1 {
-		t.Error(`go install foo/quxx expected error: ($GOPATH not set)`)
-	}
-}
-
-// Issue 4186.  go get cannot be used to download packages to $GOROOT.
-// Test that without GOPATH set, go get should fail.
-func TestWithoutGOPATHGoGetFails(t *testing.T) {
-	testenv.MustHaveExternalNetwork(t)
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.parallel()
-	tg.tempDir("src")
-	tg.setenv("GOPATH", "")
-	tg.setenv("GOROOT", tg.path("."))
-	tg.runFail("get", "-d", "golang.org/x/codereview/cmd/hgpatch")
-}
-
-// Test that with GOPATH=$GOROOT, go get should fail.
-func TestWithGOPATHEqualsGOROOTGoGetFails(t *testing.T) {
-	testenv.MustHaveExternalNetwork(t)
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.parallel()
-	tg.tempDir("src")
-	tg.setenv("GOPATH", tg.path("."))
-	tg.setenv("GOROOT", tg.path("."))
-	tg.runFail("get", "-d", "golang.org/x/codereview/cmd/hgpatch")
-}
-
-func TestLdflagsArgumentsWithSpacesIssue3941(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.parallel()
-	tg.tempFile("main.go", `package main
-		var extern string
-		func main() {
-			println(extern)
-		}`)
-	tg.run("run", "-ldflags", `-X main.extern "hello world"`, tg.path("main.go"))
-	tg.grepStderr("^hello world", `ldflags -X main.extern 'hello world' failed`)
-}
-
-func TestGoTestCpuprofileLeavesBinaryBehind(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.makeTempdir()
-	tg.cd(tg.path("."))
-	tg.run("test", "-cpuprofile", "errors.prof", "errors")
-	tg.wantExecutable("errors.test"+exeSuffix, "go test -cpuprofile did not create errors.test")
-}
-
-func TestGoTestCpuprofileDashOControlsBinaryLocation(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.makeTempdir()
-	tg.cd(tg.path("."))
-	tg.run("test", "-cpuprofile", "errors.prof", "-o", "myerrors.test"+exeSuffix, "errors")
-	tg.wantExecutable("myerrors.test"+exeSuffix, "go test -cpuprofile -o myerrors.test did not create myerrors.test")
-}
-
-func TestGoTestDashCDashOControlsBinaryLocation(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.parallel()
-	tg.makeTempdir()
-	tg.run("test", "-c", "-o", tg.path("myerrors.test"+exeSuffix), "errors")
-	tg.wantExecutable(tg.path("myerrors.test"+exeSuffix), "go test -c -o myerrors.test did not create myerrors.test")
-}
-
-func TestGoTestDashOWritesBinary(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.parallel()
-	tg.makeTempdir()
-	tg.run("test", "-o", tg.path("myerrors.test"+exeSuffix), "errors")
-	tg.wantExecutable(tg.path("myerrors.test"+exeSuffix), "go test -o myerrors.test did not create myerrors.test")
-}
-
-// Issue 4568.
-func TestSymlinksDoNotConfuseGoList(t *testing.T) {
-	switch runtime.GOOS {
-	case "plan9", "windows":
-		t.Skipf("skipping symlink test on %s", runtime.GOOS)
-	}
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.tempDir("src")
-	tg.must(os.Symlink(tg.path("."), tg.path("src/dir1")))
-	tg.tempFile("src/dir1/p.go", "package p")
-	tg.setenv("GOPATH", tg.path("."))
-	tg.cd(tg.path("src"))
-	tg.run("list", "-f", "{{.Root}}", "dir1")
-	if strings.TrimSpace(tg.getStdout()) != tg.path(".") {
-		t.Error("confused by symlinks")
-	}
-}
-
-// Issue 4515.
-func TestInstallWithTags(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.parallel()
-	tg.tempDir("bin")
-	tg.tempFile("src/example/a/main.go", `package main
-		func main() {}`)
-	tg.tempFile("src/example/b/main.go", `// +build mytag
-
-		package main
-		func main() {}`)
-	tg.setenv("GOPATH", tg.path("."))
-	tg.run("install", "-tags", "mytag", "example/a", "example/b")
-	tg.wantExecutable(tg.path("bin/a"+exeSuffix), "go install example/a example/b did not install binaries")
-	tg.wantExecutable(tg.path("bin/b"+exeSuffix), "go install example/a example/b did not install binaries")
-	tg.must(os.Remove(tg.path("bin/a" + exeSuffix)))
-	tg.must(os.Remove(tg.path("bin/b" + exeSuffix)))
-	tg.run("install", "-tags", "mytag", "example/...")
-	tg.wantExecutable(tg.path("bin/a"+exeSuffix), "go install example/... did not install binaries")
-	tg.wantExecutable(tg.path("bin/b"+exeSuffix), "go install example/... did not install binaries")
-	tg.run("list", "-tags", "mytag", "example/b...")
-	if strings.TrimSpace(tg.getStdout()) != "example/b" {
-		t.Error("go list example/b did not find example/b")
-	}
-}
-
-// Issue 4773
-func TestCaseCollisions(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.parallel()
-	tg.tempDir("src/example/a/pkg")
-	tg.tempDir("src/example/a/Pkg")
-	tg.tempDir("src/example/b")
-	tg.setenv("GOPATH", tg.path("."))
-	tg.tempFile("src/example/a/a.go", `package p
-		import (
-			_ "example/a/pkg"
-			_ "example/a/Pkg"
-		)`)
-	tg.tempFile("src/example/a/pkg/pkg.go", `package pkg`)
-	tg.tempFile("src/example/a/Pkg/pkg.go", `package pkg`)
-	tg.runFail("list", "example/a")
-	tg.grepStderr("case-insensitive import collision", "go list example/a did not report import collision")
-	tg.tempFile("src/example/b/file.go", `package b`)
-	tg.tempFile("src/example/b/FILE.go", `package b`)
-	f, err := os.Open(tg.path("src/example/b"))
-	tg.must(err)
-	names, err := f.Readdirnames(0)
-	tg.must(err)
-	tg.check(f.Close())
-	args := []string{"list"}
-	if len(names) == 2 {
-		// case-sensitive file system, let directory read find both files
-		args = append(args, "example/b")
-	} else {
-		// case-insensitive file system, list files explicitly on command line
-		args = append(args, tg.path("src/example/b/file.go"), tg.path("src/example/b/FILE.go"))
-	}
-	tg.runFail(args...)
-	tg.grepStderr("case-insensitive file name collision", "go list example/b did not report file name collision")
-}
-
-// Issue 8181.
-func TestGoGetDashTIssue8181(t *testing.T) {
-	if testing.Short() {
-		t.Skip("skipping test that uses network in short mode")
-	}
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.parallel()
-	tg.makeTempdir()
-	tg.setenv("GOPATH", tg.path("."))
-	tg.run("get", "-v", "-t", "github.com/rsc/go-get-issue-8181/a", "github.com/rsc/go-get-issue-8181/b")
-	tg.run("list", "...")
-	tg.grepStdout("x/build/cmd/cl", "missing expected x/build/cmd/cl")
-}
-
-func TestIssue11307(t *testing.T) {
-	// go get -u was not working except in checkout directory
-	if testing.Short() {
-		t.Skip("skipping test that uses network in short mode")
-	}
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.parallel()
-	tg.makeTempdir()
-	tg.setenv("GOPATH", tg.path("."))
-	tg.run("get", "github.com/rsc/go-get-issue-11307")
-	tg.run("get", "-u", "github.com/rsc/go-get-issue-11307") // was failing
-}
-
-func TestShadowingLogic(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	pwd := tg.pwd()
-	sep := string(filepath.ListSeparator)
-	tg.setenv("GOPATH", filepath.Join(pwd, "testdata", "shadow", "root1")+sep+filepath.Join(pwd, "testdata", "shadow", "root2"))
-
-	// The math in root1 is not "math" because the standard math is.
-	tg.run("list", "-f", "({{.ImportPath}}) ({{.ConflictDir}})", "./testdata/shadow/root1/src/math")
-	pwdForwardSlash := strings.Replace(pwd, string(os.PathSeparator), "/", -1)
-	if !strings.HasPrefix(pwdForwardSlash, "/") {
-		pwdForwardSlash = "/" + pwdForwardSlash
-	}
-	// The output will have makeImportValid applies, but we only
-	// bother to deal with characters we might reasonably see.
-	pwdForwardSlash = strings.Replace(pwdForwardSlash, ":", "_", -1)
-	want := "(_" + pwdForwardSlash + "/testdata/shadow/root1/src/math) (" + filepath.Join(runtime.GOROOT(), "src", "math") + ")"
-	if strings.TrimSpace(tg.getStdout()) != want {
-		t.Error("shadowed math is not shadowed; looking for", want)
-	}
-
-	// The foo in root1 is "foo".
-	tg.run("list", "-f", "({{.ImportPath}}) ({{.ConflictDir}})", "./testdata/shadow/root1/src/foo")
-	if strings.TrimSpace(tg.getStdout()) != "(foo) ()" {
-		t.Error("unshadowed foo is shadowed")
-	}
-
-	// The foo in root2 is not "foo" because the foo in root1 got there first.
-	tg.run("list", "-f", "({{.ImportPath}}) ({{.ConflictDir}})", "./testdata/shadow/root2/src/foo")
-	want = "(_" + pwdForwardSlash + "/testdata/shadow/root2/src/foo) (" + filepath.Join(pwd, "testdata", "shadow", "root1", "src", "foo") + ")"
-	if strings.TrimSpace(tg.getStdout()) != want {
-		t.Error("shadowed foo is not shadowed; looking for", want)
-	}
-
-	// The error for go install should mention the conflicting directory.
-	tg.runFail("install", "./testdata/shadow/root2/src/foo")
-	want = "go install: no install location for " + filepath.Join(pwd, "testdata", "shadow", "root2", "src", "foo") + ": hidden by " + filepath.Join(pwd, "testdata", "shadow", "root1", "src", "foo")
-	if strings.TrimSpace(tg.getStderr()) != want {
-		t.Error("wrong shadowed install error; looking for", want)
-	}
-}
-
-// Only succeeds if source order is preserved.
-func TestSourceFileNameOrderPreserved(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.run("test", "testdata/example1_test.go", "testdata/example2_test.go")
-}
-
-// Check that coverage analysis works at all.
-// Don't worry about the exact numbers but require not 0.0%.
-func checkCoverage(tg *testgoData, data string) {
-	if regexp.MustCompile(`[^0-9]0\.0%`).MatchString(data) {
-		tg.t.Error("some coverage results are 0.0%")
-	}
-	tg.t.Log(data)
-}
-
-func TestCoverageRuns(t *testing.T) {
-	if testing.Short() {
-		t.Skip("don't build libraries for coverage in short mode")
-	}
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.run("test", "-short", "-coverpkg=strings", "strings", "regexp")
-	data := tg.getStdout() + tg.getStderr()
-	tg.run("test", "-short", "-cover", "strings", "math", "regexp")
-	data += tg.getStdout() + tg.getStderr()
-	checkCoverage(tg, data)
-}
-
-// Check that coverage analysis uses set mode.
-func TestCoverageUsesSetMode(t *testing.T) {
-	if testing.Short() {
-		t.Skip("don't build libraries for coverage in short mode")
-	}
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.creatingTemp("testdata/cover.out")
-	tg.run("test", "-short", "-cover", "encoding/binary", "-coverprofile=testdata/cover.out")
-	data := tg.getStdout() + tg.getStderr()
-	if out, err := ioutil.ReadFile("testdata/cover.out"); err != nil {
-		t.Error(err)
-	} else {
-		if !bytes.Contains(out, []byte("mode: set")) {
-			t.Error("missing mode: set")
-		}
-	}
-	checkCoverage(tg, data)
-}
-
-func TestCoverageUsesAtomicModeForRace(t *testing.T) {
-	if testing.Short() {
-		t.Skip("don't build libraries for coverage in short mode")
-	}
-	if !canRace {
-		t.Skip("skipping because race detector not supported")
-	}
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.creatingTemp("testdata/cover.out")
-	tg.run("test", "-short", "-race", "-cover", "encoding/binary", "-coverprofile=testdata/cover.out")
-	data := tg.getStdout() + tg.getStderr()
-	if out, err := ioutil.ReadFile("testdata/cover.out"); err != nil {
-		t.Error(err)
-	} else {
-		if !bytes.Contains(out, []byte("mode: atomic")) {
-			t.Error("missing mode: atomic")
-		}
-	}
-	checkCoverage(tg, data)
-}
-
-func TestCoverageUsesActualSettingToOverrideEvenForRace(t *testing.T) {
-	if testing.Short() {
-		t.Skip("don't build libraries for coverage in short mode")
-	}
-	if !canRace {
-		t.Skip("skipping because race detector not supported")
-	}
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.creatingTemp("testdata/cover.out")
-	tg.run("test", "-short", "-race", "-cover", "encoding/binary", "-covermode=count", "-coverprofile=testdata/cover.out")
-	data := tg.getStdout() + tg.getStderr()
-	if out, err := ioutil.ReadFile("testdata/cover.out"); err != nil {
-		t.Error(err)
-	} else {
-		if !bytes.Contains(out, []byte("mode: count")) {
-			t.Error("missing mode: count")
-		}
-	}
-	checkCoverage(tg, data)
-}
-
-func TestCoverageWithCgo(t *testing.T) {
-	if !canCgo {
-		t.Skip("skipping because cgo not enabled")
-	}
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.run("test", "-short", "-cover", "./testdata/cgocover")
-	data := tg.getStdout() + tg.getStderr()
-	checkCoverage(tg, data)
-}
-
-func TestCgoDependsOnSyscall(t *testing.T) {
-	if testing.Short() {
-		t.Skip("skipping test that removes $GOROOT/pkg/*_race in short mode")
-	}
-	if !canCgo {
-		t.Skip("skipping because cgo not enabled")
-	}
-	if !canRace {
-		t.Skip("skipping because race detector not supported")
-	}
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	files, err := filepath.Glob(filepath.Join(runtime.GOROOT(), "pkg", "*_race"))
-	tg.must(err)
-	for _, file := range files {
-		tg.check(os.RemoveAll(file))
-	}
-	tg.tempFile("src/foo/foo.go", `
-		package foo
-		//#include <stdio.h>
-		import "C"`)
-	tg.setenv("GOPATH", tg.path("."))
-	tg.run("build", "-race", "foo")
-}
-
-func TestCgoShowsFullPathNames(t *testing.T) {
-	if !canCgo {
-		t.Skip("skipping because cgo not enabled")
-	}
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.parallel()
-	tg.tempFile("src/x/y/dirname/foo.go", `
-		package foo
-		import "C"
-		func f() {`)
-	tg.setenv("GOPATH", tg.path("."))
-	tg.runFail("build", "x/y/dirname")
-	tg.grepBoth("x/y/dirname", "error did not use full path")
-}
-
-func TestCgoHandlesWlORIGIN(t *testing.T) {
-	if !canCgo {
-		t.Skip("skipping because cgo not enabled")
-	}
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.parallel()
-	tg.tempFile("src/origin/origin.go", `package origin
-		// #cgo !darwin LDFLAGS: -Wl,-rpath -Wl,$ORIGIN
-		// void f(void) {}
-		import "C"
-		func f() { C.f() }`)
-	tg.setenv("GOPATH", tg.path("."))
-	tg.run("build", "origin")
-}
-
-// "go test -c -test.bench=XXX errors" should not hang
-func TestIssue6480(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.makeTempdir()
-	tg.cd(tg.path("."))
-	tg.run("test", "-c", "-test.bench=XXX", "errors")
-}
-
-// cmd/cgo: undefined reference when linking a C-library using gccgo
-func TestIssue7573(t *testing.T) {
-	if _, err := exec.LookPath("gccgo"); err != nil {
-		t.Skip("skipping because no gccgo compiler found")
-	}
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.parallel()
-	tg.tempFile("src/cgoref/cgoref.go", `
-package main
-// #cgo LDFLAGS: -L alibpath -lalib
-// void f(void) {}
-import "C"
-
-func main() { C.f() }`)
-	tg.setenv("GOPATH", tg.path("."))
-	tg.run("build", "-n", "-compiler", "gccgo", "cgoref")
-	tg.grepStderr(`gccgo.*\-L alibpath \-lalib`, `no Go-inline "#cgo LDFLAGS:" ("-L alibpath -lalib") passed to gccgo linking stage`)
-}
-
-func TestListTemplateCanUseContextFunction(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.run("list", "-f", "GOARCH: {{context.GOARCH}}")
-}
-
-// cmd/go: "go test" should fail if package does not build
-func TestIssue7108(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
-	tg.runFail("test", "notest")
-}
-
-// cmd/go: go test -a foo does not rebuild regexp.
-func TestIssue6844(t *testing.T) {
-	if testing.Short() {
-		t.Skip("don't rebuild the standard libary in short mode")
-	}
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.creatingTemp("deps.test" + exeSuffix)
-	tg.run("test", "-x", "-a", "-c", "testdata/dep_test.go")
-	tg.grepStderr("regexp", "go test -x -a -c testdata/dep-test.go did not rebuild regexp")
-}
-
-func TestBuildDashIInstallsDependencies(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.parallel()
-	tg.tempFile("src/x/y/foo/foo.go", `package foo
-		func F() {}`)
-	tg.tempFile("src/x/y/bar/bar.go", `package bar
-		import "x/y/foo"
-		func F() { foo.F() }`)
-	tg.setenv("GOPATH", tg.path("."))
-
-	checkbar := func(desc string) {
-		tg.sleep()
-		tg.must(os.Chtimes(tg.path("src/x/y/foo/foo.go"), time.Now(), time.Now()))
-		tg.sleep()
-		tg.run("build", "-v", "-i", "x/y/bar")
-		tg.grepBoth("x/y/foo", "first build -i "+desc+" did not build x/y/foo")
-		tg.run("build", "-v", "-i", "x/y/bar")
-		tg.grepBothNot("x/y/foo", "second build -i "+desc+" built x/y/foo")
-	}
-	checkbar("pkg")
-	tg.creatingTemp("bar" + exeSuffix)
-	tg.tempFile("src/x/y/bar/bar.go", `package main
-		import "x/y/foo"
-		func main() { foo.F() }`)
-	checkbar("cmd")
-}
-
-func TestGoBuildInTestOnlyDirectoryFailsWithAGoodError(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.runFail("build", "./testdata/testonly")
-	tg.grepStderr("no buildable Go", "go build ./testdata/testonly produced unexpected error")
-}
-
-func TestGoTestDetectsTestOnlyImportCycles(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
-	tg.runFail("test", "-c", "testcycle/p3")
-	tg.grepStderr("import cycle not allowed in test", "go test testcycle/p3 produced unexpected error")
-
-	tg.runFail("test", "-c", "testcycle/q1")
-	tg.grepStderr("import cycle not allowed in test", "go test testcycle/q1 produced unexpected error")
-}
-
-func TestGoTestFooTestWorks(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.run("test", "testdata/standalone_test.go")
-}
-
-func TestGoTestXtestonlyWorks(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
-	tg.run("clean", "-i", "xtestonly")
-	tg.run("test", "xtestonly")
-}
-
-func TestGoTestBuildsAnXtestContainingOnlyNonRunnableExamples(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.run("test", "-v", "./testdata/norunexample")
-	tg.grepStdout("File with non-runnable example was built.", "file with non-runnable example was not built")
-}
-
-func TestGoGenerateHandlesSimpleCommand(t *testing.T) {
-	if runtime.GOOS == "windows" {
-		t.Skip("skipping because windows has no echo command")
-	}
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.run("generate", "./testdata/generate/test1.go")
-	tg.grepStdout("Success", "go generate ./testdata/generate/test1.go generated wrong output")
-}
-
-func TestGoGenerateHandlesCommandAlias(t *testing.T) {
-	if runtime.GOOS == "windows" {
-		t.Skip("skipping because windows has no echo command")
-	}
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.run("generate", "./testdata/generate/test2.go")
-	tg.grepStdout("Now is the time for all good men", "go generate ./testdata/generate/test2.go generated wrong output")
-}
-
-func TestGoGenerateVariableSubstitution(t *testing.T) {
-	if runtime.GOOS == "windows" {
-		t.Skip("skipping because windows has no echo command")
-	}
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.run("generate", "./testdata/generate/test3.go")
-	tg.grepStdout(runtime.GOARCH+" test3.go:7 pabc xyzp/test3.go/123", "go generate ./testdata/generate/test3.go generated wrong output")
-}
-
-func TestGoGenerateRunFlag(t *testing.T) {
-	if runtime.GOOS == "windows" {
-		t.Skip("skipping because windows has no echo command")
-	}
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.run("generate", "-run", "y.s", "./testdata/generate/test4.go")
-	tg.grepStdout("yes", "go generate -run yes ./testdata/generate/test4.go did not select yes")
-	tg.grepStdoutNot("no", "go generate -run yes ./testdata/generate/test4.go selected no")
-}
-
-func TestGoGetCustomDomainWildcard(t *testing.T) {
-	testenv.MustHaveExternalNetwork(t)
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.makeTempdir()
-	tg.setenv("GOPATH", tg.path("."))
-	tg.run("get", "-u", "rsc.io/pdf/...")
-	tg.wantExecutable(tg.path("bin/pdfpasswd"+exeSuffix), "did not build rsc/io/pdf/pdfpasswd")
-}
-
-func TestGoGetInternalWildcard(t *testing.T) {
-	testenv.MustHaveExternalNetwork(t)
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.makeTempdir()
-	tg.setenv("GOPATH", tg.path("."))
-	// used to fail with errors about internal packages
-	tg.run("get", "github.com/rsc/go-get-issue-11960/...")
-}
-
-func TestGoVetWithExternalTests(t *testing.T) {
-	testenv.MustHaveExternalNetwork(t)
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.makeTempdir()
-	tg.setenv("GOPATH", tg.path("."))
-	tg.run("get", "golang.org/x/tools/cmd/vet")
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
-	tg.runFail("vet", "vetpkg")
-	tg.grepBoth("missing argument for Printf", "go vet vetpkg did not find missing argument for Printf")
-}
-
-func TestGoVetWithTags(t *testing.T) {
-	testenv.MustHaveExternalNetwork(t)
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.makeTempdir()
-	tg.setenv("GOPATH", tg.path("."))
-	tg.run("get", "golang.org/x/tools/cmd/vet")
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
-	tg.runFail("vet", "-tags", "tagtest", "vetpkg")
-	tg.grepBoth(`c\.go.*wrong number of args for format`, "go get vetpkg did not run scan tagged file")
-}
-
-// Issue 9767.
-func TestGoGetRscIoToolstash(t *testing.T) {
-	testenv.MustHaveExternalNetwork(t)
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.tempDir("src/rsc.io")
-	tg.setenv("GOPATH", tg.path("."))
-	tg.cd(tg.path("src/rsc.io"))
-	tg.run("get", "./toolstash")
-}
-
-// Test that you can not import a main package.
-func TestIssue4210(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.tempFile("src/x/main.go", `package main
-		var X int
-		func main() {}`)
-	tg.tempFile("src/y/main.go", `package main
-		import "fmt"
-		import xmain "x"
-		func main() {
-			fmt.Println(xmain.X)
-		}`)
-	tg.setenv("GOPATH", tg.path("."))
-	tg.runFail("build", "y")
-	tg.grepBoth("is a program", `did not find expected error message ("is a program")`)
-}
-
-func TestGoGetInsecure(t *testing.T) {
-	testenv.MustHaveExternalNetwork(t)
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.makeTempdir()
-	tg.setenv("GOPATH", tg.path("."))
-	tg.failSSH()
-
-	const repo = "wh3rd.net/git.git"
-
-	// Try go get -d of HTTP-only repo (should fail).
-	tg.runFail("get", "-d", repo)
-
-	// Try again with -insecure (should succeed).
-	tg.run("get", "-d", "-insecure", repo)
-
-	// Try updating without -insecure (should fail).
-	tg.runFail("get", "-d", "-u", "-f", repo)
-}
-
-func TestGoGetUpdateInsecure(t *testing.T) {
-	testenv.MustHaveExternalNetwork(t)
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.makeTempdir()
-	tg.setenv("GOPATH", tg.path("."))
-
-	const repo = "github.com/golang/example"
-
-	// Clone the repo via HTTP manually.
-	cmd := exec.Command("git", "clone", "-q", "http://"+repo, tg.path("src/"+repo))
-	if out, err := cmd.CombinedOutput(); err != nil {
-		t.Fatalf("cloning %v repo: %v\n%s", repo, err, out)
-	}
-
-	// Update without -insecure should fail.
-	// Update with -insecure should succeed.
-	// We need -f to ignore import comments.
-	const pkg = repo + "/hello"
-	tg.runFail("get", "-d", "-u", "-f", pkg)
-	tg.run("get", "-d", "-u", "-f", "-insecure", pkg)
-}
-
-func TestGoGetInsecureCustomDomain(t *testing.T) {
-	testenv.MustHaveExternalNetwork(t)
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.makeTempdir()
-	tg.setenv("GOPATH", tg.path("."))
-
-	const repo = "wh3rd.net/repo"
-	tg.runFail("get", "-d", repo)
-	tg.run("get", "-d", "-insecure", repo)
-}
-
-func TestIssue10193(t *testing.T) {
-	testenv.MustHaveExternalNetwork(t)
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.parallel()
-	tg.tempDir("src")
-	tg.setenv("GOPATH", tg.path("."))
-	tg.runFail("get", "code.google.com/p/rsc/pdf")
-	tg.grepStderr("is shutting down", "missed warning about code.google.com")
-}
-
-func TestGoRunDirs(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.cd("testdata/rundir")
-	tg.runFail("run", "x.go", "sub/sub.go")
-	tg.grepStderr("named files must all be in one directory; have ./ and sub/", "wrong output")
-	tg.runFail("run", "sub/sub.go", "x.go")
-	tg.grepStderr("named files must all be in one directory; have sub/ and ./", "wrong output")
-}
-
-func TestGoInstallPkgdir(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.makeTempdir()
-	pkg := tg.path(".")
-	tg.run("install", "-pkgdir", pkg, "errors")
-	_, err := os.Stat(filepath.Join(pkg, "errors.a"))
-	tg.must(err)
-	_, err = os.Stat(filepath.Join(pkg, "runtime.a"))
-	tg.must(err)
-}
-
-func TestGoTestRaceInstallCgo(t *testing.T) {
-	switch sys := runtime.GOOS + "/" + runtime.GOARCH; sys {
-	case "darwin/amd64", "freebsd/amd64", "linux/amd64", "windows/amd64":
-		// ok
-	default:
-		t.Skip("no race detector on %s", sys)
-	}
-
-	if !build.Default.CgoEnabled {
-		t.Skip("no race detector without cgo")
-	}
-
-	// golang.org/issue/10500.
-	// This used to install a race-enabled cgo.
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.run("tool", "-n", "cgo")
-	cgo := strings.TrimSpace(tg.stdout.String())
-	old, err := os.Stat(cgo)
-	tg.must(err)
-	tg.run("test", "-race", "-i", "runtime/race")
-	new, err := os.Stat(cgo)
-	tg.must(err)
-	if new.ModTime() != old.ModTime() {
-		t.Fatalf("go test -i runtime/race reinstalled cmd/cgo")
-	}
-}
-
-func TestGoTestImportErrorStack(t *testing.T) {
-	const out = `package testdep/p1 (test)
-	imports testdep/p2
-	imports testdep/p3: no buildable Go source files`
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
-	tg.runFail("test", "testdep/p1")
-	if !strings.Contains(tg.stderr.String(), out) {
-		t.Fatal("did not give full import stack:\n\n%s", tg.stderr.String())
-	}
-}
-
-func TestGoGetUpdate(t *testing.T) {
-	// golang.org/issue/9224.
-	// The recursive updating was trying to walk to
-	// former dependencies, not current ones.
-
-	testenv.MustHaveExternalNetwork(t)
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.makeTempdir()
-	tg.setenv("GOPATH", tg.path("."))
-
-	rewind := func() {
-		tg.run("get", "github.com/rsc/go-get-issue-9224-cmd")
-		cmd := exec.Command("git", "reset", "--hard", "HEAD~")
-		cmd.Dir = tg.path("src/github.com/rsc/go-get-issue-9224-lib")
-		out, err := cmd.CombinedOutput()
-		if err != nil {
-			t.Fatalf("git: %v\n%s", err, out)
-		}
-	}
-
-	rewind()
-	tg.run("get", "-u", "github.com/rsc/go-get-issue-9224-cmd")
-
-	// Again with -d -u.
-	rewind()
-	tg.run("get", "-d", "-u", "github.com/rsc/go-get-issue-9224-cmd")
-}
-
-func TestGoGetDomainRoot(t *testing.T) {
-	// golang.org/issue/9357.
-	// go get foo.io (not foo.io/subdir) was not working consistently.
-
-	testenv.MustHaveExternalNetwork(t)
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.makeTempdir()
-	tg.setenv("GOPATH", tg.path("."))
-
-	// go-get-issue-9357.appspot.com is running
-	// the code at github.com/rsc/go-get-issue-9357,
-	// a trivial Go on App Engine app that serves a
-	// <meta> tag for the domain root.
-	tg.run("get", "-d", "go-get-issue-9357.appspot.com")
-	tg.run("get", "go-get-issue-9357.appspot.com")
-	tg.run("get", "-u", "go-get-issue-9357.appspot.com")
-
-	tg.must(os.RemoveAll(tg.path("src/go-get-issue-9357.appspot.com")))
-	tg.run("get", "go-get-issue-9357.appspot.com")
-
-	tg.must(os.RemoveAll(tg.path("src/go-get-issue-9357.appspot.com")))
-	tg.run("get", "-u", "go-get-issue-9357.appspot.com")
-}
-
-func TestGoInstallShadowedGOPATH(t *testing.T) {
-	// golang.org/issue/3652.
-	// go get foo.io (not foo.io/subdir) was not working consistently.
-
-	testenv.MustHaveExternalNetwork(t)
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.makeTempdir()
-	tg.setenv("GOPATH", tg.path("gopath1")+string(filepath.ListSeparator)+tg.path("gopath2"))
-
-	tg.tempDir("gopath1/src/test")
-	tg.tempDir("gopath2/src/test")
-	tg.tempFile("gopath2/src/test/main.go", "package main\nfunc main(){}\n")
-
-	tg.cd(tg.path("gopath2/src/test"))
-	tg.runFail("install")
-	tg.grepStderr("no install location for.*gopath2.src.test: hidden by .*gopath1.src.test", "missing error")
-}
-
-func TestIssue11709(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.tempFile("run.go", `
-		package main
-		import "os"
-		func main() {
-			if os.Getenv("TERM") != "" {
-				os.Exit(1)
-			}
-		}`)
-	tg.unsetenv("TERM")
-	tg.run("run", tg.path("run.go"))
-}
-
-func TestIssue12096(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.tempFile("test_test.go", `
-		package main
-		import ("os"; "testing")
-		func TestEnv(t *testing.T) {
-			if os.Getenv("TERM") != "" {
-				t.Fatal("TERM is set")
-			}
-		}`)
-	tg.unsetenv("TERM")
-	tg.run("test", tg.path("test_test.go"))
-}
-
-func TestGoBuildOutput(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-
-	tg.makeTempdir()
-	tg.cd(tg.path("."))
-
-	nonExeSuffix := ".exe"
-	if exeSuffix == ".exe" {
-		nonExeSuffix = ""
-	}
-
-	tg.tempFile("x.go", "package main\nfunc main(){}\n")
-	tg.run("build", "x.go")
-	tg.wantExecutable("x"+exeSuffix, "go build x.go did not write x"+exeSuffix)
-	tg.must(os.Remove(tg.path("x" + exeSuffix)))
-	tg.mustNotExist("x" + nonExeSuffix)
-
-	tg.run("build", "-o", "myprog", "x.go")
-	tg.mustNotExist("x")
-	tg.mustNotExist("x.exe")
-	tg.wantExecutable("myprog", "go build -o myprog x.go did not write myprog")
-	tg.mustNotExist("myprog.exe")
-
-	tg.tempFile("p.go", "package p\n")
-	tg.run("build", "p.go")
-	tg.mustNotExist("p")
-	tg.mustNotExist("p.a")
-	tg.mustNotExist("p.o")
-	tg.mustNotExist("p.exe")
-
-	tg.run("build", "-o", "p.a", "p.go")
-	tg.wantArchive("p.a")
-
-	tg.run("build", "cmd/gofmt")
-	tg.wantExecutable("gofmt"+exeSuffix, "go build cmd/gofmt did not write gofmt"+exeSuffix)
-	tg.must(os.Remove(tg.path("gofmt" + exeSuffix)))
-	tg.mustNotExist("gofmt" + nonExeSuffix)
-
-	tg.run("build", "-o", "mygofmt", "cmd/gofmt")
-	tg.wantExecutable("mygofmt", "go build -o mygofmt cmd/gofmt did not write mygofmt")
-	tg.mustNotExist("mygofmt.exe")
-	tg.mustNotExist("gofmt")
-	tg.mustNotExist("gofmt.exe")
-
-	tg.run("build", "sync/atomic")
-	tg.mustNotExist("atomic")
-	tg.mustNotExist("atomic.exe")
-
-	tg.run("build", "-o", "myatomic.a", "sync/atomic")
-	tg.wantArchive("myatomic.a")
-	tg.mustNotExist("atomic")
-	tg.mustNotExist("atomic.a")
-	tg.mustNotExist("atomic.exe")
-
-	tg.runFail("build", "-o", "whatever", "cmd/gofmt", "sync/atomic")
-	tg.grepStderr("multiple packages", "did not reject -o with multiple packages")
-}
-
-func TestGoBuildARM(t *testing.T) {
-	if testing.Short() {
-		t.Skip("skipping cross-compile in short mode")
-	}
-
-	tg := testgo(t)
-	defer tg.cleanup()
-
-	tg.makeTempdir()
-	tg.cd(tg.path("."))
-
-	tg.setenv("GOARCH", "arm")
-	tg.setenv("GOOS", "linux")
-	tg.setenv("GOARM", "5")
-	tg.tempFile("hello.go", `package main
-		func main() {}`)
-	tg.run("build", "hello.go")
-	tg.grepStderrNot("unable to find math.a", "did not build math.a correctly")
-}
diff --git a/src/cmd/go/mkalldocs.sh b/src/cmd/go/mkalldocs.sh
deleted file mode 100755
index 74e3125..0000000
--- a/src/cmd/go/mkalldocs.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-# Copyright 2012 The Go Authors.  All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-set -e
-
-go build -o go.latest
-./go.latest help documentation | sed 's; \*/; * /;' >alldocs.go
-gofmt -w alldocs.go
-rm go.latest
-
diff --git a/src/cmd/go/note.go b/src/cmd/go/note.go
deleted file mode 100644
index 97e1865..0000000
--- a/src/cmd/go/note.go
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
-	"bytes"
-	"debug/elf"
-	"encoding/binary"
-	"fmt"
-	"io"
-	"os"
-)
-
-func readAligned4(r io.Reader, sz int32) ([]byte, error) {
-	full := (sz + 3) &^ 3
-	data := make([]byte, full)
-	_, err := io.ReadFull(r, data)
-	if err != nil {
-		return nil, err
-	}
-	data = data[:sz]
-	return data, nil
-}
-
-func readELFNote(filename, name string, typ int32) ([]byte, error) {
-	f, err := elf.Open(filename)
-	if err != nil {
-		return nil, err
-	}
-	for _, sect := range f.Sections {
-		if sect.Type != elf.SHT_NOTE {
-			continue
-		}
-		r := sect.Open()
-		for {
-			var namesize, descsize, noteType int32
-			err = binary.Read(r, f.ByteOrder, &namesize)
-			if err != nil {
-				if err == io.EOF {
-					break
-				}
-				return nil, fmt.Errorf("read namesize failed: %v", err)
-			}
-			err = binary.Read(r, f.ByteOrder, &descsize)
-			if err != nil {
-				return nil, fmt.Errorf("read descsize failed: %v", err)
-			}
-			err = binary.Read(r, f.ByteOrder, &noteType)
-			if err != nil {
-				return nil, fmt.Errorf("read type failed: %v", err)
-			}
-			noteName, err := readAligned4(r, namesize)
-			if err != nil {
-				return nil, fmt.Errorf("read name failed: %v", err)
-			}
-			desc, err := readAligned4(r, descsize)
-			if err != nil {
-				return nil, fmt.Errorf("read desc failed: %v", err)
-			}
-			if name == string(noteName) && typ == noteType {
-				return desc, nil
-			}
-		}
-	}
-	return nil, nil
-}
-
-var elfGoNote = []byte("Go\x00\x00")
-
-// readELFGoBuildID the Go build ID string from an ELF binary.
-// The Go build ID is stored in a note described by an ELF PT_NOTE prog header.
-// The caller has already opened filename, to get f, and read the first 4 kB out, in data.
-func readELFGoBuildID(filename string, f *os.File, data []byte) (buildid string, err error) {
-	// Assume the note content is in the first 4 kB, already read.
-	// Rewrite the ELF header to set shnum to 0, so that we can pass
-	// the data to elf.NewFile and it will decode the Prog list but not
-	// try to read the section headers and the string table from disk.
-	// That's a waste of I/O when all we care about is the Prog list
-	// and the one ELF note.
-	switch elf.Class(data[elf.EI_CLASS]) {
-	case elf.ELFCLASS32:
-		data[48] = 0
-		data[49] = 0
-	case elf.ELFCLASS64:
-		data[60] = 0
-		data[61] = 0
-	}
-
-	const elfGoBuildIDTag = 4
-
-	ef, err := elf.NewFile(bytes.NewReader(data))
-	if err != nil {
-		return "", &os.PathError{Path: filename, Op: "parse", Err: err}
-	}
-	for _, p := range ef.Progs {
-		if p.Type != elf.PT_NOTE || p.Off >= uint64(len(data)) || p.Off+p.Filesz >= uint64(len(data)) || p.Filesz < 16 {
-			continue
-		}
-
-		note := data[p.Off : p.Off+p.Filesz]
-		nameSize := ef.ByteOrder.Uint32(note)
-		valSize := ef.ByteOrder.Uint32(note[4:])
-		tag := ef.ByteOrder.Uint32(note[8:])
-		name := note[12:16]
-		if nameSize != 4 || 16+valSize > uint32(len(note)) || tag != elfGoBuildIDTag || !bytes.Equal(name, elfGoNote) {
-			continue
-		}
-
-		return string(note[16 : 16+valSize]), nil
-	}
-
-	// No note. Treat as successful but build ID empty.
-	return "", nil
-}
diff --git a/src/cmd/go/note_test.go b/src/cmd/go/note_test.go
deleted file mode 100644
index 3d64451..0000000
--- a/src/cmd/go/note_test.go
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main_test
-
-import (
-	main "cmd/go"
-	"runtime"
-	"testing"
-)
-
-func TestNoteReading(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.tempFile("hello.go", `package main; func main() { print("hello, world\n") }`)
-	const buildID = "TestNoteReading-Build-ID"
-	tg.run("build", "-ldflags", "-buildid="+buildID, "-o", tg.path("hello.exe"), tg.path("hello.go"))
-	id, err := main.ReadBuildIDFromBinary(tg.path("hello.exe"))
-	if err != nil {
-		t.Fatalf("reading build ID from hello binary: %v", err)
-	}
-	if id != buildID {
-		t.Fatalf("buildID in hello binary = %q, want %q", id, buildID)
-	}
-
-	if runtime.GOOS == "linux" && runtime.GOARCH == "ppc64le" {
-		t.Skipf("skipping - golang.org/issue/11184")
-	}
-
-	switch runtime.GOOS {
-	case "plan9":
-		// no external linking
-		t.Logf("no external linking - skipping linkmode=external test")
-
-	case "solaris":
-		t.Logf("skipping - golang.org/issue/12178")
-
-	default:
-		tg.run("build", "-ldflags", "-buildid="+buildID+" -linkmode=external", "-o", tg.path("hello.exe"), tg.path("hello.go"))
-		id, err := main.ReadBuildIDFromBinary(tg.path("hello.exe"))
-		if err != nil {
-			t.Fatalf("reading build ID from hello binary (linkmode=external): %v", err)
-		}
-		if id != buildID {
-			t.Fatalf("buildID in hello binary = %q, want %q (linkmode=external)", id, buildID)
-		}
-	}
-}
diff --git a/src/cmd/go/testdata/failssh/ssh b/src/cmd/go/testdata/failssh/ssh
deleted file mode 100755
index ecdbef9..0000000
--- a/src/cmd/go/testdata/failssh/ssh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exit 1
diff --git a/src/cmd/go/testdata/generate/test4.go b/src/cmd/go/testdata/generate/test4.go
deleted file mode 100644
index a7631c4..0000000
--- a/src/cmd/go/testdata/generate/test4.go
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test -run flag
-
-//go:generate echo oh yes my man
-//go:generate echo no, no, a thousand times no
-
-package p
diff --git a/src/cmd/go/testdata/rundir/sub/sub.go b/src/cmd/go/testdata/rundir/sub/sub.go
deleted file mode 100644
index 06ab7d0..0000000
--- a/src/cmd/go/testdata/rundir/sub/sub.go
+++ /dev/null
@@ -1 +0,0 @@
-package main
diff --git a/src/cmd/go/testdata/rundir/x.go b/src/cmd/go/testdata/rundir/x.go
deleted file mode 100644
index 06ab7d0..0000000
--- a/src/cmd/go/testdata/rundir/x.go
+++ /dev/null
@@ -1 +0,0 @@
-package main
diff --git a/src/cmd/go/testdata/src/testcycle/q1/q1.go b/src/cmd/go/testdata/src/testcycle/q1/q1.go
deleted file mode 100644
index 7a471f0..0000000
--- a/src/cmd/go/testdata/src/testcycle/q1/q1.go
+++ /dev/null
@@ -1 +0,0 @@
-package q1
diff --git a/src/cmd/go/testdata/src/testcycle/q1/q1_test.go b/src/cmd/go/testdata/src/testcycle/q1/q1_test.go
deleted file mode 100644
index ca81bd2..0000000
--- a/src/cmd/go/testdata/src/testcycle/q1/q1_test.go
+++ /dev/null
@@ -1,6 +0,0 @@
-package q1
-
-import "testing"
-import _ "testcycle/q1"
-
-func Test(t *testing.T) {}
diff --git a/src/cmd/go/testdata/src/testdep/p1/p1.go b/src/cmd/go/testdata/src/testdep/p1/p1.go
deleted file mode 100644
index a457035..0000000
--- a/src/cmd/go/testdata/src/testdep/p1/p1.go
+++ /dev/null
@@ -1 +0,0 @@
-package p1
diff --git a/src/cmd/go/testdata/src/testdep/p1/p1_test.go b/src/cmd/go/testdata/src/testdep/p1/p1_test.go
deleted file mode 100644
index 8be7533..0000000
--- a/src/cmd/go/testdata/src/testdep/p1/p1_test.go
+++ /dev/null
@@ -1,3 +0,0 @@
-package p1
-
-import _ "testdep/p2"
diff --git a/src/cmd/go/testdata/src/testdep/p2/p2.go b/src/cmd/go/testdata/src/testdep/p2/p2.go
deleted file mode 100644
index 15ba2ea..0000000
--- a/src/cmd/go/testdata/src/testdep/p2/p2.go
+++ /dev/null
@@ -1,3 +0,0 @@
-package p2
-
-import _ "testdep/p3"
diff --git a/src/cmd/go/testdata/src/testdep/p3/p3.go b/src/cmd/go/testdata/src/testdep/p3/p3.go
deleted file mode 100644
index 0219e7f..0000000
--- a/src/cmd/go/testdata/src/testdep/p3/p3.go
+++ /dev/null
@@ -1,3 +0,0 @@
-// +build ignore
-
-package ignored
diff --git a/src/cmd/go/testdata/src/vend/bad.go b/src/cmd/go/testdata/src/vend/bad.go
deleted file mode 100644
index 57cc595..0000000
--- a/src/cmd/go/testdata/src/vend/bad.go
+++ /dev/null
@@ -1,3 +0,0 @@
-package vend
-
-import _ "r"
diff --git a/src/cmd/go/testdata/src/vend/good.go b/src/cmd/go/testdata/src/vend/good.go
deleted file mode 100644
index 952ada3..0000000
--- a/src/cmd/go/testdata/src/vend/good.go
+++ /dev/null
@@ -1,3 +0,0 @@
-package vend
-
-import _ "p"
diff --git a/src/cmd/go/testdata/src/vend/hello/hello.go b/src/cmd/go/testdata/src/vend/hello/hello.go
deleted file mode 100644
index 41dc03e..0000000
--- a/src/cmd/go/testdata/src/vend/hello/hello.go
+++ /dev/null
@@ -1,10 +0,0 @@
-package main
-
-import (
-	"fmt"
-	"strings" // really ../vendor/strings
-)
-
-func main() {
-	fmt.Printf("%s\n", strings.Msg)
-}
diff --git a/src/cmd/go/testdata/src/vend/hello/hello_test.go b/src/cmd/go/testdata/src/vend/hello/hello_test.go
deleted file mode 100644
index 5e72ada..0000000
--- a/src/cmd/go/testdata/src/vend/hello/hello_test.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package main
-
-import (
-	"strings" // really ../vendor/strings
-	"testing"
-)
-
-func TestMsgInternal(t *testing.T) {
-	if strings.Msg != "hello, world" {
-		t.Fatal("unexpected msg: %v", strings.Msg)
-	}
-}
diff --git a/src/cmd/go/testdata/src/vend/hello/hellox_test.go b/src/cmd/go/testdata/src/vend/hello/hellox_test.go
deleted file mode 100644
index 96e6049..0000000
--- a/src/cmd/go/testdata/src/vend/hello/hellox_test.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package main_test
-
-import (
-	"strings" // really ../vendor/strings
-	"testing"
-)
-
-func TestMsgExternal(t *testing.T) {
-	if strings.Msg != "hello, world" {
-		t.Fatal("unexpected msg: %v", strings.Msg)
-	}
-}
diff --git a/src/cmd/go/testdata/src/vend/subdir/bad.go b/src/cmd/go/testdata/src/vend/subdir/bad.go
deleted file mode 100644
index d0ddaac..0000000
--- a/src/cmd/go/testdata/src/vend/subdir/bad.go
+++ /dev/null
@@ -1,3 +0,0 @@
-package subdir
-
-import _ "r"
diff --git a/src/cmd/go/testdata/src/vend/subdir/good.go b/src/cmd/go/testdata/src/vend/subdir/good.go
deleted file mode 100644
index edd0454..0000000
--- a/src/cmd/go/testdata/src/vend/subdir/good.go
+++ /dev/null
@@ -1,3 +0,0 @@
-package subdir
-
-import _ "p"
diff --git a/src/cmd/go/testdata/src/vend/vendor/p/p.go b/src/cmd/go/testdata/src/vend/vendor/p/p.go
deleted file mode 100644
index c89cd18..0000000
--- a/src/cmd/go/testdata/src/vend/vendor/p/p.go
+++ /dev/null
@@ -1 +0,0 @@
-package p
diff --git a/src/cmd/go/testdata/src/vend/vendor/q/q.go b/src/cmd/go/testdata/src/vend/vendor/q/q.go
deleted file mode 100644
index 946e6d9..0000000
--- a/src/cmd/go/testdata/src/vend/vendor/q/q.go
+++ /dev/null
@@ -1 +0,0 @@
-package q
diff --git a/src/cmd/go/testdata/src/vend/vendor/strings/msg.go b/src/cmd/go/testdata/src/vend/vendor/strings/msg.go
deleted file mode 100644
index 438126b..0000000
--- a/src/cmd/go/testdata/src/vend/vendor/strings/msg.go
+++ /dev/null
@@ -1,3 +0,0 @@
-package strings
-
-var Msg = "hello, world"
diff --git a/src/cmd/go/testdata/src/vend/x/invalid/invalid.go b/src/cmd/go/testdata/src/vend/x/invalid/invalid.go
deleted file mode 100644
index e250d5b..0000000
--- a/src/cmd/go/testdata/src/vend/x/invalid/invalid.go
+++ /dev/null
@@ -1,3 +0,0 @@
-package invalid
-
-import "vend/x/invalid/vendor/foo"
diff --git a/src/cmd/go/testdata/src/vend/x/vendor/p/p.go b/src/cmd/go/testdata/src/vend/x/vendor/p/p.go
deleted file mode 100644
index c89cd18..0000000
--- a/src/cmd/go/testdata/src/vend/x/vendor/p/p.go
+++ /dev/null
@@ -1 +0,0 @@
-package p
diff --git a/src/cmd/go/testdata/src/vend/x/vendor/p/p/p.go b/src/cmd/go/testdata/src/vend/x/vendor/p/p/p.go
deleted file mode 100644
index e12e12c..0000000
--- a/src/cmd/go/testdata/src/vend/x/vendor/p/p/p.go
+++ /dev/null
@@ -1,3 +0,0 @@
-package p
-
-import _ "notfound"
diff --git a/src/cmd/go/testdata/src/vend/x/vendor/r/r.go b/src/cmd/go/testdata/src/vend/x/vendor/r/r.go
deleted file mode 100644
index 838c177..0000000
--- a/src/cmd/go/testdata/src/vend/x/vendor/r/r.go
+++ /dev/null
@@ -1 +0,0 @@
-package r
diff --git a/src/cmd/go/testdata/src/vend/x/x.go b/src/cmd/go/testdata/src/vend/x/x.go
deleted file mode 100644
index ae526eb..0000000
--- a/src/cmd/go/testdata/src/vend/x/x.go
+++ /dev/null
@@ -1,5 +0,0 @@
-package x
-
-import _ "p"
-import _ "q"
-import _ "r"
diff --git a/src/cmd/go/testdata/src/vetpkg/c.go b/src/cmd/go/testdata/src/vetpkg/c.go
deleted file mode 100644
index ef5648f..0000000
--- a/src/cmd/go/testdata/src/vetpkg/c.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// +build tagtest
-
-package p
-
-import "fmt"
-
-func g() {
-	fmt.Printf("%d", 3, 4)
-}
diff --git a/src/cmd/go/testdata/testinternal3/t.go b/src/cmd/go/testdata/testinternal3/t.go
deleted file mode 100644
index 8576a4b..0000000
--- a/src/cmd/go/testdata/testinternal3/t.go
+++ /dev/null
@@ -1,3 +0,0 @@
-package t
-
-import _ "internal/does-not-exist"
diff --git a/src/cmd/go/testdata/testinternal4/src/p/p.go b/src/cmd/go/testdata/testinternal4/src/p/p.go
deleted file mode 100644
index 6bdee27..0000000
--- a/src/cmd/go/testdata/testinternal4/src/p/p.go
+++ /dev/null
@@ -1,6 +0,0 @@
-package p
-
-import (
-	_ "q/internal/x"
-	_ "q/j"
-)
diff --git a/src/cmd/go/testdata/testinternal4/src/q/internal/x/x.go b/src/cmd/go/testdata/testinternal4/src/q/internal/x/x.go
deleted file mode 100644
index 823aafd..0000000
--- a/src/cmd/go/testdata/testinternal4/src/q/internal/x/x.go
+++ /dev/null
@@ -1 +0,0 @@
-package x
diff --git a/src/cmd/go/testdata/testinternal4/src/q/j/j.go b/src/cmd/go/testdata/testinternal4/src/q/j/j.go
deleted file mode 100644
index 9f07543..0000000
--- a/src/cmd/go/testdata/testinternal4/src/q/j/j.go
+++ /dev/null
@@ -1,3 +0,0 @@
-package j
-
-import _ "q/internal/x"
diff --git a/src/cmd/go/testdata/testvendor/src/p/p.go b/src/cmd/go/testdata/testvendor/src/p/p.go
deleted file mode 100644
index e740715..0000000
--- a/src/cmd/go/testdata/testvendor/src/p/p.go
+++ /dev/null
@@ -1,6 +0,0 @@
-package p
-
-import (
-	_ "q/y"
-	_ "q/z"
-)
diff --git a/src/cmd/go/testdata/testvendor/src/q/vendor/x/x.go b/src/cmd/go/testdata/testvendor/src/q/vendor/x/x.go
deleted file mode 100644
index 823aafd..0000000
--- a/src/cmd/go/testdata/testvendor/src/q/vendor/x/x.go
+++ /dev/null
@@ -1 +0,0 @@
-package x
diff --git a/src/cmd/go/testdata/testvendor/src/q/y/y.go b/src/cmd/go/testdata/testvendor/src/q/y/y.go
deleted file mode 100644
index 4f84223..0000000
--- a/src/cmd/go/testdata/testvendor/src/q/y/y.go
+++ /dev/null
@@ -1,3 +0,0 @@
-package y
-
-import _ "x"
diff --git a/src/cmd/go/testdata/testvendor/src/q/z/z.go b/src/cmd/go/testdata/testvendor/src/q/z/z.go
deleted file mode 100644
index a8d4924..0000000
--- a/src/cmd/go/testdata/testvendor/src/q/z/z.go
+++ /dev/null
@@ -1,3 +0,0 @@
-package z
-
-import _ "q/vendor/x"
diff --git a/src/cmd/go/testdata/testvendor2/src/p/p.go b/src/cmd/go/testdata/testvendor2/src/p/p.go
deleted file mode 100644
index 220b2b2..0000000
--- a/src/cmd/go/testdata/testvendor2/src/p/p.go
+++ /dev/null
@@ -1,3 +0,0 @@
-package p
-
-import "x"
diff --git a/src/cmd/go/testdata/testvendor2/vendor/x/x.go b/src/cmd/go/testdata/testvendor2/vendor/x/x.go
deleted file mode 100644
index 823aafd..0000000
--- a/src/cmd/go/testdata/testvendor2/vendor/x/x.go
+++ /dev/null
@@ -1 +0,0 @@
-package x
diff --git a/src/cmd/go/vendor_test.go b/src/cmd/go/vendor_test.go
deleted file mode 100644
index 1e8cf9c..0000000
--- a/src/cmd/go/vendor_test.go
+++ /dev/null
@@ -1,258 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Tests for vendoring semantics.
-
-package main_test
-
-import (
-	"bytes"
-	"fmt"
-	"internal/testenv"
-	"path/filepath"
-	"regexp"
-	"strings"
-	"testing"
-)
-
-func TestVendorImports(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
-	tg.setenv("GO15VENDOREXPERIMENT", "1")
-	tg.run("list", "-f", "{{.ImportPath}} {{.Imports}}", "vend/...")
-	want := `
-		vend [vend/vendor/p r]
-		vend/hello [fmt vend/vendor/strings]
-		vend/subdir [vend/vendor/p r]
-		vend/vendor/p []
-		vend/vendor/q []
-		vend/vendor/strings []
-		vend/x [vend/x/vendor/p vend/vendor/q vend/x/vendor/r]
-		vend/x/invalid [vend/x/invalid/vendor/foo]
-		vend/x/vendor/p []
-		vend/x/vendor/p/p [notfound]
-		vend/x/vendor/r []
-	`
-	want = strings.Replace(want+"\t", "\n\t\t", "\n", -1)
-	want = strings.TrimPrefix(want, "\n")
-
-	have := tg.stdout.String()
-
-	if have != want {
-		t.Errorf("incorrect go list output:\n%s", diffSortedOutputs(have, want))
-	}
-}
-
-func TestVendorRun(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
-	tg.setenv("GO15VENDOREXPERIMENT", "1")
-	tg.cd(filepath.Join(tg.pwd(), "testdata/src/vend/hello"))
-	tg.run("run", "hello.go")
-	tg.grepStdout("hello, world", "missing hello world output")
-}
-
-func TestVendorGOPATH(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	changeVolume := func(s string, f func(s string) string) string {
-		vol := filepath.VolumeName(s)
-		return f(vol) + s[len(vol):]
-	}
-	gopath := changeVolume(filepath.Join(tg.pwd(), "testdata"), strings.ToLower)
-	tg.setenv("GOPATH", gopath)
-	tg.setenv("GO15VENDOREXPERIMENT", "1")
-	cd := changeVolume(filepath.Join(tg.pwd(), "testdata/src/vend/hello"), strings.ToUpper)
-	tg.cd(cd)
-	tg.run("run", "hello.go")
-	tg.grepStdout("hello, world", "missing hello world output")
-}
-
-func TestVendorTest(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
-	tg.setenv("GO15VENDOREXPERIMENT", "1")
-	tg.cd(filepath.Join(tg.pwd(), "testdata/src/vend/hello"))
-	tg.run("test", "-v")
-	tg.grepStdout("TestMsgInternal", "missing use in internal test")
-	tg.grepStdout("TestMsgExternal", "missing use in external test")
-}
-
-func TestVendorInvalid(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
-	tg.setenv("GO15VENDOREXPERIMENT", "1")
-
-	tg.runFail("build", "vend/x/invalid")
-	tg.grepStderr("must be imported as foo", "missing vendor import error")
-}
-
-func TestVendorImportError(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
-	tg.setenv("GO15VENDOREXPERIMENT", "1")
-
-	tg.runFail("build", "vend/x/vendor/p/p")
-
-	re := regexp.MustCompile(`cannot find package "notfound" in any of:
-	.*[\\/]testdata[\\/]src[\\/]vend[\\/]x[\\/]vendor[\\/]notfound \(vendor tree\)
-	.*[\\/]testdata[\\/]src[\\/]vend[\\/]vendor[\\/]notfound \(vendor tree\)
-	.*[\\/]src[\\/]notfound \(from \$GOROOT\)
-	.*[\\/]testdata[\\/]src[\\/]notfound \(from \$GOPATH\)`)
-
-	if !re.MatchString(tg.stderr.String()) {
-		t.Errorf("did not find expected search list in error text")
-	}
-}
-
-// diffSortedOutput prepares a diff of the already sorted outputs haveText and wantText.
-// The diff shows common lines prefixed by a tab, lines present only in haveText
-// prefixed by "unexpected: ", and lines present only in wantText prefixed by "missing: ".
-func diffSortedOutputs(haveText, wantText string) string {
-	var diff bytes.Buffer
-	have := splitLines(haveText)
-	want := splitLines(wantText)
-	for len(have) > 0 || len(want) > 0 {
-		if len(want) == 0 || len(have) > 0 && have[0] < want[0] {
-			fmt.Fprintf(&diff, "unexpected: %s\n", have[0])
-			have = have[1:]
-			continue
-		}
-		if len(have) == 0 || len(want) > 0 && want[0] < have[0] {
-			fmt.Fprintf(&diff, "missing: %s\n", want[0])
-			want = want[1:]
-			continue
-		}
-		fmt.Fprintf(&diff, "\t%s\n", want[0])
-		want = want[1:]
-		have = have[1:]
-	}
-	return diff.String()
-}
-
-func splitLines(s string) []string {
-	x := strings.Split(s, "\n")
-	if x[len(x)-1] == "" {
-		x = x[:len(x)-1]
-	}
-	return x
-}
-
-func TestVendorGet(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.tempFile("src/v/m.go", `
-		package main
-		import ("fmt"; "vendor.org/p")
-		func main() {
-			fmt.Println(p.C)
-		}`)
-	tg.tempFile("src/v/m_test.go", `
-		package main
-		import ("fmt"; "testing"; "vendor.org/p")
-		func TestNothing(t *testing.T) {
-			fmt.Println(p.C)
-		}`)
-	tg.tempFile("src/v/vendor/vendor.org/p/p.go", `
-		package p
-		const C = 1`)
-	tg.setenv("GOPATH", tg.path("."))
-	tg.setenv("GO15VENDOREXPERIMENT", "1")
-	tg.cd(tg.path("src/v"))
-	tg.run("run", "m.go")
-	tg.run("test")
-	tg.run("list", "-f", "{{.Imports}}")
-	tg.grepStdout("v/vendor/vendor.org/p", "import not in vendor directory")
-	tg.run("list", "-f", "{{.TestImports}}")
-	tg.grepStdout("v/vendor/vendor.org/p", "test import not in vendor directory")
-	tg.run("get")
-	tg.run("get", "-t")
-}
-
-func TestVendorGetUpdate(t *testing.T) {
-	testenv.MustHaveExternalNetwork(t)
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.makeTempdir()
-	tg.setenv("GOPATH", tg.path("."))
-	tg.setenv("GO15VENDOREXPERIMENT", "1")
-	tg.run("get", "github.com/rsc/go-get-issue-11864")
-	tg.run("get", "-u", "github.com/rsc/go-get-issue-11864")
-}
-
-func TestVendorCache(t *testing.T) {
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata/testvendor"))
-	tg.setenv("GO15VENDOREXPERIMENT", "1")
-	tg.runFail("build", "p")
-	tg.grepStderr("must be imported as x", "did not fail to build p")
-}
-
-func TestVendorTest2(t *testing.T) {
-	testenv.MustHaveExternalNetwork(t)
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.makeTempdir()
-	tg.setenv("GOPATH", tg.path("."))
-	tg.setenv("GO15VENDOREXPERIMENT", "1")
-	tg.run("get", "github.com/rsc/go-get-issue-11864")
-
-	// build -i should work
-	tg.run("build", "-i", "github.com/rsc/go-get-issue-11864")
-	tg.run("build", "-i", "github.com/rsc/go-get-issue-11864/t")
-
-	// test -i should work like build -i (golang.org/issue/11988)
-	tg.run("test", "-i", "github.com/rsc/go-get-issue-11864")
-	tg.run("test", "-i", "github.com/rsc/go-get-issue-11864/t")
-
-	// test should work too
-	tg.run("test", "github.com/rsc/go-get-issue-11864")
-	tg.run("test", "github.com/rsc/go-get-issue-11864/t")
-
-	// external tests should observe internal test exports (golang.org/issue/11977)
-	tg.run("test", "github.com/rsc/go-get-issue-11864/vendor/vendor.org/tx2")
-}
-
-func TestVendorList(t *testing.T) {
-	testenv.MustHaveExternalNetwork(t)
-
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.makeTempdir()
-	tg.setenv("GOPATH", tg.path("."))
-	tg.setenv("GO15VENDOREXPERIMENT", "1")
-	tg.run("get", "github.com/rsc/go-get-issue-11864")
-
-	tg.run("list", "-f", `{{join .TestImports "\n"}}`, "github.com/rsc/go-get-issue-11864/t")
-	tg.grepStdout("go-get-issue-11864/vendor/vendor.org/p", "did not find vendor-expanded p")
-
-	tg.run("list", "-f", `{{join .XTestImports "\n"}}`, "github.com/rsc/go-get-issue-11864/tx")
-	tg.grepStdout("go-get-issue-11864/vendor/vendor.org/p", "did not find vendor-expanded p")
-
-	tg.run("list", "-f", `{{join .XTestImports "\n"}}`, "github.com/rsc/go-get-issue-11864/vendor/vendor.org/tx2")
-	tg.grepStdout("go-get-issue-11864/vendor/vendor.org/tx2", "did not find vendor-expanded tx2")
-
-	tg.run("list", "-f", `{{join .XTestImports "\n"}}`, "github.com/rsc/go-get-issue-11864/vendor/vendor.org/tx3")
-	tg.grepStdout("go-get-issue-11864/vendor/vendor.org/tx3", "did not find vendor-expanded tx3")
-}
-
-func TestVendor12156(t *testing.T) {
-	// Former index out of range panic.
-	tg := testgo(t)
-	defer tg.cleanup()
-	tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata/testvendor2"))
-	tg.setenv("GO15VENDOREXPERIMENT", "1")
-	tg.cd(filepath.Join(tg.pwd(), "testdata/testvendor2/src/p"))
-	tg.runFail("build", "p.go")
-	tg.grepStderrNot("panic", "panicked")
-	tg.grepStderr(`cannot find package "x"`, "wrong error")
-}
diff --git a/src/cmd/internal/gcprog/gcprog.go b/src/cmd/internal/gcprog/gcprog.go
deleted file mode 100644
index 5845f7d..0000000
--- a/src/cmd/internal/gcprog/gcprog.go
+++ /dev/null
@@ -1,298 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package gcprog implements an encoder for packed GC pointer bitmaps,
-// known as GC programs.
-//
-// Program Format
-//
-// The GC program encodes a sequence of 0 and 1 bits indicating scalar or pointer words in an object.
-// The encoding is a simple Lempel-Ziv program, with codes to emit literal bits and to repeat the
-// last n bits c times.
-//
-// The possible codes are:
-//
-//	00000000: stop
-//	0nnnnnnn: emit n bits copied from the next (n+7)/8 bytes, least significant bit first
-//	10000000 n c: repeat the previous n bits c times; n, c are varints
-//	1nnnnnnn c: repeat the previous n bits c times; c is a varint
-//
-// The numbers n and c, when they follow a code, are encoded as varints
-// using the same encoding as encoding/binary's Uvarint.
-//
-package gcprog
-
-import (
-	"fmt"
-	"io"
-)
-
-const progMaxLiteral = 127 // maximum n for literal n bit code
-
-// A Writer is an encoder for GC programs.
-//
-// The typical use of a Writer is to call Init, maybe call Debug,
-// make a sequence of Ptr, Advance, Repeat, and Append calls
-// to describe the data type, and then finally call End.
-type Writer struct {
-	writeByte func(byte)
-	symoff    int
-	index     int64
-	b         [progMaxLiteral]byte
-	nb        int
-	debug     io.Writer
-	debugBuf  []byte
-}
-
-// Init initializes w to write a new GC program
-// by calling writeByte for each byte in the program.
-func (w *Writer) Init(writeByte func(byte)) {
-	w.writeByte = writeByte
-}
-
-// Debug causes the writer to print a debugging trace to out
-// during future calls to methods like Ptr, Advance, and End.
-// It also enables debugging checks during the encoding.
-func (w *Writer) Debug(out io.Writer) {
-	w.debug = out
-}
-
-// BitIndex returns the number of bits written to the bit stream so far.
-func (w *Writer) BitIndex() int64 {
-	return w.index
-}
-
-// byte writes the byte x to the output.
-func (w *Writer) byte(x byte) {
-	if w.debug != nil {
-		w.debugBuf = append(w.debugBuf, x)
-	}
-	w.writeByte(x)
-}
-
-// End marks the end of the program, writing any remaining bytes.
-func (w *Writer) End() {
-	w.flushlit()
-	w.byte(0)
-	if w.debug != nil {
-		index := progbits(w.debugBuf)
-		if index != w.index {
-			println("gcprog: End wrote program for", index, "bits, but current index is", w.index)
-			panic("gcprog: out of sync")
-		}
-	}
-}
-
-// Ptr emits a 1 into the bit stream at the given bit index.
-// that is, it records that the index'th word in the object memory is a pointer.
-// Any bits between the current index and the new index
-// are set to zero, meaning the corresponding words are scalars.
-func (w *Writer) Ptr(index int64) {
-	if index < w.index {
-		println("gcprog: Ptr at index", index, "but current index is", w.index)
-		panic("gcprog: invalid Ptr index")
-	}
-	w.ZeroUntil(index)
-	if w.debug != nil {
-		fmt.Fprintf(w.debug, "gcprog: ptr at %d\n", index)
-	}
-	w.lit(1)
-}
-
-// ShouldRepeat reports whether it would be worthwhile to
-// use a Repeat to describe c elements of n bits each,
-// compared to just emitting c copies of the n-bit description.
-func (w *Writer) ShouldRepeat(n, c int64) bool {
-	// Should we lay out the bits directly instead of
-	// encoding them as a repetition? Certainly if count==1,
-	// since there's nothing to repeat, but also if the total
-	// size of the plain pointer bits for the type will fit in
-	// 4 or fewer bytes, since using a repetition will require
-	// flushing the current bits plus at least one byte for
-	// the repeat size and one for the repeat count.
-	return c > 1 && c*n > 4*8
-}
-
-// Repeat emits an instruction to repeat the description
-// of the last n words c times (including the initial description, c+1 times in total).
-func (w *Writer) Repeat(n, c int64) {
-	if n == 0 || c == 0 {
-		return
-	}
-	w.flushlit()
-	if w.debug != nil {
-		fmt.Fprintf(w.debug, "gcprog: repeat %d × %d\n", n, c)
-	}
-	if n < 128 {
-		w.byte(0x80 | byte(n))
-	} else {
-		w.byte(0x80)
-		w.varint(n)
-	}
-	w.varint(c)
-	w.index += n * c
-}
-
-// ZeroUntil adds zeros to the bit stream until reaching the given index;
-// that is, it records that the words from the most recent pointer until
-// the index'th word are scalars.
-// ZeroUntil is usually called in preparation for a call to Repeat, Append, or End.
-func (w *Writer) ZeroUntil(index int64) {
-	if index < w.index {
-		println("gcprog: Advance", index, "but index is", w.index)
-		panic("gcprog: invalid Advance index")
-	}
-	skip := (index - w.index)
-	if skip == 0 {
-		return
-	}
-	if skip < 4*8 {
-		if w.debug != nil {
-			fmt.Fprintf(w.debug, "gcprog: advance to %d by literals\n", index)
-		}
-		for i := int64(0); i < skip; i++ {
-			w.lit(0)
-		}
-		return
-	}
-
-	if w.debug != nil {
-		fmt.Fprintf(w.debug, "gcprog: advance to %d by repeat\n", index)
-	}
-	w.lit(0)
-	w.flushlit()
-	w.Repeat(1, skip-1)
-}
-
-// Append emits the given GC program into the current output.
-// The caller asserts that the program emits n bits (describes n words),
-// and Append panics if that is not true.
-func (w *Writer) Append(prog []byte, n int64) {
-	w.flushlit()
-	if w.debug != nil {
-		fmt.Fprintf(w.debug, "gcprog: append prog for %d ptrs\n", n)
-		fmt.Fprintf(w.debug, "\t")
-	}
-	n1 := progbits(prog)
-	if n1 != n {
-		panic("gcprog: wrong bit count in append")
-	}
-	// The last byte of the prog terminates the program.
-	// Don't emit that, or else our own program will end.
-	for i, x := range prog[:len(prog)-1] {
-		if w.debug != nil {
-			if i > 0 {
-				fmt.Fprintf(w.debug, " ")
-			}
-			fmt.Fprintf(w.debug, "%02x", x)
-		}
-		w.byte(x)
-	}
-	if w.debug != nil {
-		fmt.Fprintf(w.debug, "\n")
-	}
-	w.index += n
-}
-
-// progbits returns the length of the bit stream encoded by the program p.
-func progbits(p []byte) int64 {
-	var n int64
-	for len(p) > 0 {
-		x := p[0]
-		p = p[1:]
-		if x == 0 {
-			break
-		}
-		if x&0x80 == 0 {
-			count := x &^ 0x80
-			n += int64(count)
-			p = p[(count+7)/8:]
-			continue
-		}
-		nbit := int64(x &^ 0x80)
-		if nbit == 0 {
-			nbit, p = readvarint(p)
-		}
-		var count int64
-		count, p = readvarint(p)
-		n += nbit * count
-	}
-	if len(p) > 0 {
-		println("gcprog: found end instruction after", n, "ptrs, with", len(p), "bytes remaining")
-		panic("gcprog: extra data at end of program")
-	}
-	return n
-}
-
-// readvarint reads a varint from p, returning the value and the remainder of p.
-func readvarint(p []byte) (int64, []byte) {
-	var v int64
-	var nb uint
-	for {
-		c := p[0]
-		p = p[1:]
-		v |= int64(c&^0x80) << nb
-		nb += 7
-		if c&0x80 == 0 {
-			break
-		}
-	}
-	return v, p
-}
-
-// lit adds a single literal bit to w.
-func (w *Writer) lit(x byte) {
-	if w.nb == progMaxLiteral {
-		w.flushlit()
-	}
-	w.b[w.nb] = x
-	w.nb++
-	w.index++
-}
-
-// varint emits the varint encoding of x.
-func (w *Writer) varint(x int64) {
-	if x < 0 {
-		panic("gcprog: negative varint")
-	}
-	for x >= 0x80 {
-		w.byte(byte(0x80 | x))
-		x >>= 7
-	}
-	w.byte(byte(x))
-}
-
-// flushlit flushes any pending literal bits.
-func (w *Writer) flushlit() {
-	if w.nb == 0 {
-		return
-	}
-	if w.debug != nil {
-		fmt.Fprintf(w.debug, "gcprog: flush %d literals\n", w.nb)
-		fmt.Fprintf(w.debug, "\t%v\n", w.b[:w.nb])
-		fmt.Fprintf(w.debug, "\t%02x", byte(w.nb))
-	}
-	w.byte(byte(w.nb))
-	var bits uint8
-	for i := 0; i < w.nb; i++ {
-		bits |= w.b[i] << uint(i%8)
-		if (i+1)%8 == 0 {
-			if w.debug != nil {
-				fmt.Fprintf(w.debug, " %02x", bits)
-			}
-			w.byte(bits)
-			bits = 0
-		}
-	}
-	if w.nb%8 != 0 {
-		if w.debug != nil {
-			fmt.Fprintf(w.debug, " %02x", bits)
-		}
-		w.byte(bits)
-	}
-	if w.debug != nil {
-		fmt.Fprintf(w.debug, "\n")
-	}
-	w.nb = 0
-}
diff --git a/src/cmd/internal/obj/ar.go b/src/cmd/internal/obj/ar.go
deleted file mode 100644
index 7cbeafd..0000000
--- a/src/cmd/internal/obj/ar.go
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package obj
-
-// Inferno utils/include/ar.h
-// http://code.google.com/p/inferno-os/source/browse/utils/include/ar.h
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-type ar_hdr struct {
-	name string
-	date string
-	uid  string
-	gid  string
-	mode string
-	size string
-	fmag string
-}
diff --git a/src/cmd/internal/obj/arm/a.out.go b/src/cmd/internal/obj/arm/a.out.go
deleted file mode 100644
index 1cb561d..0000000
--- a/src/cmd/internal/obj/arm/a.out.go
+++ /dev/null
@@ -1,328 +0,0 @@
-// Inferno utils/5c/5.out.h
-// http://code.google.com/p/inferno-os/source/browse/utils/5c/5.out.h
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package arm
-
-import "cmd/internal/obj"
-
-//go:generate go run ../stringer.go -i $GOFILE -o anames.go -p arm
-
-const (
-	NSNAME = 8
-	NSYM   = 50
-	NREG   = 16
-)
-
-/* -1 disables use of REGARG */
-const (
-	REGARG = -1
-)
-
-const (
-	REG_R0 = obj.RBaseARM + iota // must be 16-aligned
-	REG_R1
-	REG_R2
-	REG_R3
-	REG_R4
-	REG_R5
-	REG_R6
-	REG_R7
-	REG_R8
-	REG_R9
-	REG_R10
-	REG_R11
-	REG_R12
-	REG_R13
-	REG_R14
-	REG_R15
-
-	REG_F0 // must be 16-aligned
-	REG_F1
-	REG_F2
-	REG_F3
-	REG_F4
-	REG_F5
-	REG_F6
-	REG_F7
-	REG_F8
-	REG_F9
-	REG_F10
-	REG_F11
-	REG_F12
-	REG_F13
-	REG_F14
-	REG_F15
-
-	REG_FPSR // must be 2-aligned
-	REG_FPCR
-
-	REG_CPSR // must be 2-aligned
-	REG_SPSR
-
-	MAXREG
-	REGRET = REG_R0
-	/* compiler allocates R1 up as temps */
-	/* compiler allocates register variables R3 up */
-	/* compiler allocates external registers R10 down */
-	REGEXT = REG_R10
-	/* these two registers are declared in runtime.h */
-	REGG = REGEXT - 0
-	REGM = REGEXT - 1
-
-	REGCTXT = REG_R7
-	REGTMP  = REG_R11
-	REGSP   = REG_R13
-	REGLINK = REG_R14
-	REGPC   = REG_R15
-
-	NFREG = 16
-	/* compiler allocates register variables F0 up */
-	/* compiler allocates external registers F7 down */
-	FREGRET = REG_F0
-	FREGEXT = REG_F7
-	FREGTMP = REG_F15
-)
-
-const (
-	C_NONE = iota
-	C_REG
-	C_REGREG
-	C_REGREG2
-	C_REGLIST
-	C_SHIFT
-	C_FREG
-	C_PSR
-	C_FCR
-
-	C_RCON /* 0xff rotated */
-	C_NCON /* ~RCON */
-	C_SCON /* 0xffff */
-	C_LCON
-	C_LCONADDR
-	C_ZFCON
-	C_SFCON
-	C_LFCON
-
-	C_RACON
-	C_LACON
-
-	C_SBRA
-	C_LBRA
-
-	C_HAUTO  /* halfword insn offset (-0xff to 0xff) */
-	C_FAUTO  /* float insn offset (0 to 0x3fc, word aligned) */
-	C_HFAUTO /* both H and F */
-	C_SAUTO  /* -0xfff to 0xfff */
-	C_LAUTO
-
-	C_HOREG
-	C_FOREG
-	C_HFOREG
-	C_SOREG
-	C_ROREG
-	C_SROREG /* both nil and R */
-	C_LOREG
-
-	C_PC
-	C_SP
-	C_HREG
-
-	C_ADDR /* reference to relocatable address */
-	C_TEXTSIZE
-
-	C_GOK
-
-	C_NCLASS /* must be the last */
-)
-
-const (
-	AAND = obj.ABaseARM + obj.A_ARCHSPECIFIC + iota
-	AEOR
-	ASUB
-	ARSB
-	AADD
-	AADC
-	ASBC
-	ARSC
-	ATST
-	ATEQ
-	ACMP
-	ACMN
-	AORR
-	ABIC
-
-	AMVN
-
-	/*
-	 * Do not reorder or fragment the conditional branch
-	 * opcodes, or the predication code will break
-	 */
-	ABEQ
-	ABNE
-	ABCS
-	ABHS
-	ABCC
-	ABLO
-	ABMI
-	ABPL
-	ABVS
-	ABVC
-	ABHI
-	ABLS
-	ABGE
-	ABLT
-	ABGT
-	ABLE
-
-	AMOVWD
-	AMOVWF
-	AMOVDW
-	AMOVFW
-	AMOVFD
-	AMOVDF
-	AMOVF
-	AMOVD
-
-	ACMPF
-	ACMPD
-	AADDF
-	AADDD
-	ASUBF
-	ASUBD
-	AMULF
-	AMULD
-	ADIVF
-	ADIVD
-	ASQRTF
-	ASQRTD
-	AABSF
-	AABSD
-
-	ASRL
-	ASRA
-	ASLL
-	AMULU
-	ADIVU
-	AMUL
-	ADIV
-	AMOD
-	AMODU
-
-	AMOVB
-	AMOVBS
-	AMOVBU
-	AMOVH
-	AMOVHS
-	AMOVHU
-	AMOVW
-	AMOVM
-	ASWPBU
-	ASWPW
-
-	ARFE
-	ASWI
-	AMULA
-
-	AWORD
-	ABCASE
-	ACASE
-
-	AMULL
-	AMULAL
-	AMULLU
-	AMULALU
-
-	ABX
-	ABXRET
-	ADWORD
-
-	ALDREX
-	ASTREX
-	ALDREXD
-	ASTREXD
-
-	APLD
-
-	ACLZ
-
-	AMULWT
-	AMULWB
-	AMULAWT
-	AMULAWB
-
-	ADATABUNDLE
-	ADATABUNDLEEND
-
-	AMRC // MRC/MCR
-
-	ALAST
-
-	// aliases
-	AB  = obj.AJMP
-	ABL = obj.ACALL
-)
-
-/* scond byte */
-const (
-	C_SCOND = (1 << 4) - 1
-	C_SBIT  = 1 << 4
-	C_PBIT  = 1 << 5
-	C_WBIT  = 1 << 6
-	C_FBIT  = 1 << 7 /* psr flags-only */
-	C_UBIT  = 1 << 7 /* up bit, unsigned bit */
-
-	// These constants are the ARM condition codes encodings,
-	// XORed with 14 so that C_SCOND_NONE has value 0,
-	// so that a zeroed Prog.scond means "always execute".
-	C_SCOND_XOR = 14
-
-	C_SCOND_EQ   = 0 ^ C_SCOND_XOR
-	C_SCOND_NE   = 1 ^ C_SCOND_XOR
-	C_SCOND_HS   = 2 ^ C_SCOND_XOR
-	C_SCOND_LO   = 3 ^ C_SCOND_XOR
-	C_SCOND_MI   = 4 ^ C_SCOND_XOR
-	C_SCOND_PL   = 5 ^ C_SCOND_XOR
-	C_SCOND_VS   = 6 ^ C_SCOND_XOR
-	C_SCOND_VC   = 7 ^ C_SCOND_XOR
-	C_SCOND_HI   = 8 ^ C_SCOND_XOR
-	C_SCOND_LS   = 9 ^ C_SCOND_XOR
-	C_SCOND_GE   = 10 ^ C_SCOND_XOR
-	C_SCOND_LT   = 11 ^ C_SCOND_XOR
-	C_SCOND_GT   = 12 ^ C_SCOND_XOR
-	C_SCOND_LE   = 13 ^ C_SCOND_XOR
-	C_SCOND_NONE = 14 ^ C_SCOND_XOR
-	C_SCOND_NV   = 15 ^ C_SCOND_XOR
-
-	/* D_SHIFT type */
-	SHIFT_LL = 0 << 5
-	SHIFT_LR = 1 << 5
-	SHIFT_AR = 2 << 5
-	SHIFT_RR = 3 << 5
-)
diff --git a/src/cmd/internal/obj/arm/anames.go b/src/cmd/internal/obj/arm/anames.go
deleted file mode 100644
index 1a924f0..0000000
--- a/src/cmd/internal/obj/arm/anames.go
+++ /dev/null
@@ -1,108 +0,0 @@
-// Generated by stringer -i a.out.go -o anames.go -p arm
-// Do not edit.
-
-package arm
-
-import "cmd/internal/obj"
-
-var Anames = []string{
-	obj.A_ARCHSPECIFIC: "AND",
-	"EOR",
-	"SUB",
-	"RSB",
-	"ADD",
-	"ADC",
-	"SBC",
-	"RSC",
-	"TST",
-	"TEQ",
-	"CMP",
-	"CMN",
-	"ORR",
-	"BIC",
-	"MVN",
-	"BEQ",
-	"BNE",
-	"BCS",
-	"BHS",
-	"BCC",
-	"BLO",
-	"BMI",
-	"BPL",
-	"BVS",
-	"BVC",
-	"BHI",
-	"BLS",
-	"BGE",
-	"BLT",
-	"BGT",
-	"BLE",
-	"MOVWD",
-	"MOVWF",
-	"MOVDW",
-	"MOVFW",
-	"MOVFD",
-	"MOVDF",
-	"MOVF",
-	"MOVD",
-	"CMPF",
-	"CMPD",
-	"ADDF",
-	"ADDD",
-	"SUBF",
-	"SUBD",
-	"MULF",
-	"MULD",
-	"DIVF",
-	"DIVD",
-	"SQRTF",
-	"SQRTD",
-	"ABSF",
-	"ABSD",
-	"SRL",
-	"SRA",
-	"SLL",
-	"MULU",
-	"DIVU",
-	"MUL",
-	"DIV",
-	"MOD",
-	"MODU",
-	"MOVB",
-	"MOVBS",
-	"MOVBU",
-	"MOVH",
-	"MOVHS",
-	"MOVHU",
-	"MOVW",
-	"MOVM",
-	"SWPBU",
-	"SWPW",
-	"RFE",
-	"SWI",
-	"MULA",
-	"WORD",
-	"BCASE",
-	"CASE",
-	"MULL",
-	"MULAL",
-	"MULLU",
-	"MULALU",
-	"BX",
-	"BXRET",
-	"DWORD",
-	"LDREX",
-	"STREX",
-	"LDREXD",
-	"STREXD",
-	"PLD",
-	"CLZ",
-	"MULWT",
-	"MULWB",
-	"MULAWT",
-	"MULAWB",
-	"DATABUNDLE",
-	"DATABUNDLEEND",
-	"MRC",
-	"LAST",
-}
diff --git a/src/cmd/internal/obj/arm/anames5.go b/src/cmd/internal/obj/arm/anames5.go
deleted file mode 100644
index 2e3a1f9..0000000
--- a/src/cmd/internal/obj/arm/anames5.go
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package arm
-
-var cnames5 = []string{
-	"NONE",
-	"REG",
-	"REGREG",
-	"REGREG2",
-	"SHIFT",
-	"FREG",
-	"PSR",
-	"FCR",
-	"RCON",
-	"NCON",
-	"SCON",
-	"LCON",
-	"LCONADDR",
-	"ZFCON",
-	"SFCON",
-	"LFCON",
-	"RACON",
-	"LACON",
-	"SBRA",
-	"LBRA",
-	"HAUTO",
-	"FAUTO",
-	"HFAUTO",
-	"SAUTO",
-	"LAUTO",
-	"HOREG",
-	"FOREG",
-	"HFOREG",
-	"SOREG",
-	"ROREG",
-	"SROREG",
-	"LOREG",
-	"PC",
-	"SP",
-	"HREG",
-	"ADDR",
-	"TEXTSIZE",
-	"GOK",
-	"NCLASS",
-	"SCOND = (1<<4)-1",
-	"SBIT = 1<<4",
-	"PBIT = 1<<5",
-	"WBIT = 1<<6",
-	"FBIT = 1<<7",
-	"UBIT = 1<<7",
-	"SCOND_XOR = 14",
-	"SCOND_EQ = 0 ^ C_SCOND_XOR",
-	"SCOND_NE = 1 ^ C_SCOND_XOR",
-	"SCOND_HS = 2 ^ C_SCOND_XOR",
-	"SCOND_LO = 3 ^ C_SCOND_XOR",
-	"SCOND_MI = 4 ^ C_SCOND_XOR",
-	"SCOND_PL = 5 ^ C_SCOND_XOR",
-	"SCOND_VS = 6 ^ C_SCOND_XOR",
-	"SCOND_VC = 7 ^ C_SCOND_XOR",
-	"SCOND_HI = 8 ^ C_SCOND_XOR",
-	"SCOND_LS = 9 ^ C_SCOND_XOR",
-	"SCOND_GE = 10 ^ C_SCOND_XOR",
-	"SCOND_LT = 11 ^ C_SCOND_XOR",
-	"SCOND_GT = 12 ^ C_SCOND_XOR",
-	"SCOND_LE = 13 ^ C_SCOND_XOR",
-	"SCOND_NONE = 14 ^ C_SCOND_XOR",
-	"SCOND_NV = 15 ^ C_SCOND_XOR",
-}
diff --git a/src/cmd/internal/obj/arm/asm5.go b/src/cmd/internal/obj/arm/asm5.go
deleted file mode 100644
index 610637c..0000000
--- a/src/cmd/internal/obj/arm/asm5.go
+++ /dev/null
@@ -1,2855 +0,0 @@
-// Inferno utils/5l/span.c
-// http://code.google.com/p/inferno-os/source/browse/utils/5l/span.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package arm
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-	"log"
-	"math"
-	"sort"
-)
-
-type Optab struct {
-	as       uint16
-	a1       uint8
-	a2       int8
-	a3       uint8
-	type_    uint8
-	size     int8
-	param    int16
-	flag     int8
-	pcrelsiz uint8
-}
-
-type Oprang struct {
-	start []Optab
-	stop  []Optab
-}
-
-type Opcross [32][2][32]uint8
-
-const (
-	LFROM  = 1 << 0
-	LTO    = 1 << 1
-	LPOOL  = 1 << 2
-	LPCREL = 1 << 3
-)
-
-var optab = []Optab{
-	/* struct Optab:
-	OPCODE,	from, prog->reg, to,		 type,size,param,flag */
-	Optab{obj.ATEXT, C_ADDR, C_NONE, C_TEXTSIZE, 0, 0, 0, 0, 0},
-	Optab{AADD, C_REG, C_REG, C_REG, 1, 4, 0, 0, 0},
-	Optab{AADD, C_REG, C_NONE, C_REG, 1, 4, 0, 0, 0},
-	Optab{AMOVW, C_REG, C_NONE, C_REG, 1, 4, 0, 0, 0},
-	Optab{AMVN, C_REG, C_NONE, C_REG, 1, 4, 0, 0, 0},
-	Optab{ACMP, C_REG, C_REG, C_NONE, 1, 4, 0, 0, 0},
-	Optab{AADD, C_RCON, C_REG, C_REG, 2, 4, 0, 0, 0},
-	Optab{AADD, C_RCON, C_NONE, C_REG, 2, 4, 0, 0, 0},
-	Optab{AMOVW, C_RCON, C_NONE, C_REG, 2, 4, 0, 0, 0},
-	Optab{AMVN, C_RCON, C_NONE, C_REG, 2, 4, 0, 0, 0},
-	Optab{ACMP, C_RCON, C_REG, C_NONE, 2, 4, 0, 0, 0},
-	Optab{AADD, C_SHIFT, C_REG, C_REG, 3, 4, 0, 0, 0},
-	Optab{AADD, C_SHIFT, C_NONE, C_REG, 3, 4, 0, 0, 0},
-	Optab{AMVN, C_SHIFT, C_NONE, C_REG, 3, 4, 0, 0, 0},
-	Optab{ACMP, C_SHIFT, C_REG, C_NONE, 3, 4, 0, 0, 0},
-	Optab{AMOVW, C_RACON, C_NONE, C_REG, 4, 4, REGSP, 0, 0},
-	Optab{AB, C_NONE, C_NONE, C_SBRA, 5, 4, 0, LPOOL, 0},
-	Optab{ABL, C_NONE, C_NONE, C_SBRA, 5, 4, 0, 0, 0},
-	Optab{ABX, C_NONE, C_NONE, C_SBRA, 74, 20, 0, 0, 0},
-	Optab{ABEQ, C_NONE, C_NONE, C_SBRA, 5, 4, 0, 0, 0},
-	Optab{ABEQ, C_RCON, C_NONE, C_SBRA, 5, 4, 0, 0, 0}, // prediction hinted form, hint ignored
-
-	Optab{AB, C_NONE, C_NONE, C_ROREG, 6, 4, 0, LPOOL, 0},
-	Optab{ABL, C_NONE, C_NONE, C_ROREG, 7, 4, 0, 0, 0},
-	Optab{ABL, C_REG, C_NONE, C_ROREG, 7, 4, 0, 0, 0},
-	Optab{ABX, C_NONE, C_NONE, C_ROREG, 75, 12, 0, 0, 0},
-	Optab{ABXRET, C_NONE, C_NONE, C_ROREG, 76, 4, 0, 0, 0},
-	Optab{ASLL, C_RCON, C_REG, C_REG, 8, 4, 0, 0, 0},
-	Optab{ASLL, C_RCON, C_NONE, C_REG, 8, 4, 0, 0, 0},
-	Optab{ASLL, C_REG, C_NONE, C_REG, 9, 4, 0, 0, 0},
-	Optab{ASLL, C_REG, C_REG, C_REG, 9, 4, 0, 0, 0},
-	Optab{ASWI, C_NONE, C_NONE, C_NONE, 10, 4, 0, 0, 0},
-	Optab{ASWI, C_NONE, C_NONE, C_LOREG, 10, 4, 0, 0, 0},
-	Optab{ASWI, C_NONE, C_NONE, C_LCON, 10, 4, 0, 0, 0},
-	Optab{AWORD, C_NONE, C_NONE, C_LCON, 11, 4, 0, 0, 0},
-	Optab{AWORD, C_NONE, C_NONE, C_LCONADDR, 11, 4, 0, 0, 0},
-	Optab{AWORD, C_NONE, C_NONE, C_ADDR, 11, 4, 0, 0, 0},
-	Optab{AMOVW, C_NCON, C_NONE, C_REG, 12, 4, 0, 0, 0},
-	Optab{AMOVW, C_LCON, C_NONE, C_REG, 12, 4, 0, LFROM, 0},
-	Optab{AMOVW, C_LCONADDR, C_NONE, C_REG, 12, 4, 0, LFROM | LPCREL, 4},
-	Optab{AADD, C_NCON, C_REG, C_REG, 13, 8, 0, 0, 0},
-	Optab{AADD, C_NCON, C_NONE, C_REG, 13, 8, 0, 0, 0},
-	Optab{AMVN, C_NCON, C_NONE, C_REG, 13, 8, 0, 0, 0},
-	Optab{ACMP, C_NCON, C_REG, C_NONE, 13, 8, 0, 0, 0},
-	Optab{AADD, C_LCON, C_REG, C_REG, 13, 8, 0, LFROM, 0},
-	Optab{AADD, C_LCON, C_NONE, C_REG, 13, 8, 0, LFROM, 0},
-	Optab{AMVN, C_LCON, C_NONE, C_REG, 13, 8, 0, LFROM, 0},
-	Optab{ACMP, C_LCON, C_REG, C_NONE, 13, 8, 0, LFROM, 0},
-	Optab{AMOVB, C_REG, C_NONE, C_REG, 1, 4, 0, 0, 0},
-	Optab{AMOVBS, C_REG, C_NONE, C_REG, 14, 8, 0, 0, 0},
-	Optab{AMOVBU, C_REG, C_NONE, C_REG, 58, 4, 0, 0, 0},
-	Optab{AMOVH, C_REG, C_NONE, C_REG, 1, 4, 0, 0, 0},
-	Optab{AMOVHS, C_REG, C_NONE, C_REG, 14, 8, 0, 0, 0},
-	Optab{AMOVHU, C_REG, C_NONE, C_REG, 14, 8, 0, 0, 0},
-	Optab{AMUL, C_REG, C_REG, C_REG, 15, 4, 0, 0, 0},
-	Optab{AMUL, C_REG, C_NONE, C_REG, 15, 4, 0, 0, 0},
-	Optab{ADIV, C_REG, C_REG, C_REG, 16, 4, 0, 0, 0},
-	Optab{ADIV, C_REG, C_NONE, C_REG, 16, 4, 0, 0, 0},
-	Optab{AMULL, C_REG, C_REG, C_REGREG, 17, 4, 0, 0, 0},
-	Optab{AMULA, C_REG, C_REG, C_REGREG2, 17, 4, 0, 0, 0},
-	Optab{AMOVW, C_REG, C_NONE, C_SAUTO, 20, 4, REGSP, 0, 0},
-	Optab{AMOVW, C_REG, C_NONE, C_SOREG, 20, 4, 0, 0, 0},
-	Optab{AMOVB, C_REG, C_NONE, C_SAUTO, 20, 4, REGSP, 0, 0},
-	Optab{AMOVB, C_REG, C_NONE, C_SOREG, 20, 4, 0, 0, 0},
-	Optab{AMOVBS, C_REG, C_NONE, C_SAUTO, 20, 4, REGSP, 0, 0},
-	Optab{AMOVBS, C_REG, C_NONE, C_SOREG, 20, 4, 0, 0, 0},
-	Optab{AMOVBU, C_REG, C_NONE, C_SAUTO, 20, 4, REGSP, 0, 0},
-	Optab{AMOVBU, C_REG, C_NONE, C_SOREG, 20, 4, 0, 0, 0},
-	Optab{AMOVW, C_SAUTO, C_NONE, C_REG, 21, 4, REGSP, 0, 0},
-	Optab{AMOVW, C_SOREG, C_NONE, C_REG, 21, 4, 0, 0, 0},
-	Optab{AMOVBU, C_SAUTO, C_NONE, C_REG, 21, 4, REGSP, 0, 0},
-	Optab{AMOVBU, C_SOREG, C_NONE, C_REG, 21, 4, 0, 0, 0},
-	Optab{AMOVW, C_REG, C_NONE, C_LAUTO, 30, 8, REGSP, LTO, 0},
-	Optab{AMOVW, C_REG, C_NONE, C_LOREG, 30, 8, 0, LTO, 0},
-	Optab{AMOVW, C_REG, C_NONE, C_ADDR, 64, 8, 0, LTO | LPCREL, 4},
-	Optab{AMOVB, C_REG, C_NONE, C_LAUTO, 30, 8, REGSP, LTO, 0},
-	Optab{AMOVB, C_REG, C_NONE, C_LOREG, 30, 8, 0, LTO, 0},
-	Optab{AMOVB, C_REG, C_NONE, C_ADDR, 64, 8, 0, LTO | LPCREL, 4},
-	Optab{AMOVBS, C_REG, C_NONE, C_LAUTO, 30, 8, REGSP, LTO, 0},
-	Optab{AMOVBS, C_REG, C_NONE, C_LOREG, 30, 8, 0, LTO, 0},
-	Optab{AMOVBS, C_REG, C_NONE, C_ADDR, 64, 8, 0, LTO | LPCREL, 4},
-	Optab{AMOVBU, C_REG, C_NONE, C_LAUTO, 30, 8, REGSP, LTO, 0},
-	Optab{AMOVBU, C_REG, C_NONE, C_LOREG, 30, 8, 0, LTO, 0},
-	Optab{AMOVBU, C_REG, C_NONE, C_ADDR, 64, 8, 0, LTO | LPCREL, 4},
-	Optab{AMOVW, C_LAUTO, C_NONE, C_REG, 31, 8, REGSP, LFROM, 0},
-	Optab{AMOVW, C_LOREG, C_NONE, C_REG, 31, 8, 0, LFROM, 0},
-	Optab{AMOVW, C_ADDR, C_NONE, C_REG, 65, 8, 0, LFROM | LPCREL, 4},
-	Optab{AMOVBU, C_LAUTO, C_NONE, C_REG, 31, 8, REGSP, LFROM, 0},
-	Optab{AMOVBU, C_LOREG, C_NONE, C_REG, 31, 8, 0, LFROM, 0},
-	Optab{AMOVBU, C_ADDR, C_NONE, C_REG, 65, 8, 0, LFROM | LPCREL, 4},
-	Optab{AMOVW, C_LACON, C_NONE, C_REG, 34, 8, REGSP, LFROM, 0},
-	Optab{AMOVW, C_PSR, C_NONE, C_REG, 35, 4, 0, 0, 0},
-	Optab{AMOVW, C_REG, C_NONE, C_PSR, 36, 4, 0, 0, 0},
-	Optab{AMOVW, C_RCON, C_NONE, C_PSR, 37, 4, 0, 0, 0},
-	Optab{AMOVM, C_REGLIST, C_NONE, C_SOREG, 38, 4, 0, 0, 0},
-	Optab{AMOVM, C_SOREG, C_NONE, C_REGLIST, 39, 4, 0, 0, 0},
-	Optab{ASWPW, C_SOREG, C_REG, C_REG, 40, 4, 0, 0, 0},
-	Optab{ARFE, C_NONE, C_NONE, C_NONE, 41, 4, 0, 0, 0},
-	Optab{AMOVF, C_FREG, C_NONE, C_FAUTO, 50, 4, REGSP, 0, 0},
-	Optab{AMOVF, C_FREG, C_NONE, C_FOREG, 50, 4, 0, 0, 0},
-	Optab{AMOVF, C_FAUTO, C_NONE, C_FREG, 51, 4, REGSP, 0, 0},
-	Optab{AMOVF, C_FOREG, C_NONE, C_FREG, 51, 4, 0, 0, 0},
-	Optab{AMOVF, C_FREG, C_NONE, C_LAUTO, 52, 12, REGSP, LTO, 0},
-	Optab{AMOVF, C_FREG, C_NONE, C_LOREG, 52, 12, 0, LTO, 0},
-	Optab{AMOVF, C_LAUTO, C_NONE, C_FREG, 53, 12, REGSP, LFROM, 0},
-	Optab{AMOVF, C_LOREG, C_NONE, C_FREG, 53, 12, 0, LFROM, 0},
-	Optab{AMOVF, C_FREG, C_NONE, C_ADDR, 68, 8, 0, LTO | LPCREL, 4},
-	Optab{AMOVF, C_ADDR, C_NONE, C_FREG, 69, 8, 0, LFROM | LPCREL, 4},
-	Optab{AADDF, C_FREG, C_NONE, C_FREG, 54, 4, 0, 0, 0},
-	Optab{AADDF, C_FREG, C_REG, C_FREG, 54, 4, 0, 0, 0},
-	Optab{AMOVF, C_FREG, C_NONE, C_FREG, 54, 4, 0, 0, 0},
-	Optab{AMOVW, C_REG, C_NONE, C_FCR, 56, 4, 0, 0, 0},
-	Optab{AMOVW, C_FCR, C_NONE, C_REG, 57, 4, 0, 0, 0},
-	Optab{AMOVW, C_SHIFT, C_NONE, C_REG, 59, 4, 0, 0, 0},
-	Optab{AMOVBU, C_SHIFT, C_NONE, C_REG, 59, 4, 0, 0, 0},
-	Optab{AMOVB, C_SHIFT, C_NONE, C_REG, 60, 4, 0, 0, 0},
-	Optab{AMOVBS, C_SHIFT, C_NONE, C_REG, 60, 4, 0, 0, 0},
-	Optab{AMOVW, C_REG, C_NONE, C_SHIFT, 61, 4, 0, 0, 0},
-	Optab{AMOVB, C_REG, C_NONE, C_SHIFT, 61, 4, 0, 0, 0},
-	Optab{AMOVBS, C_REG, C_NONE, C_SHIFT, 61, 4, 0, 0, 0},
-	Optab{AMOVBU, C_REG, C_NONE, C_SHIFT, 61, 4, 0, 0, 0},
-	Optab{ACASE, C_REG, C_NONE, C_NONE, 62, 4, 0, LPCREL, 8},
-	Optab{ABCASE, C_NONE, C_NONE, C_SBRA, 63, 4, 0, LPCREL, 0},
-	Optab{AMOVH, C_REG, C_NONE, C_HAUTO, 70, 4, REGSP, 0, 0},
-	Optab{AMOVH, C_REG, C_NONE, C_HOREG, 70, 4, 0, 0, 0},
-	Optab{AMOVHS, C_REG, C_NONE, C_HAUTO, 70, 4, REGSP, 0, 0},
-	Optab{AMOVHS, C_REG, C_NONE, C_HOREG, 70, 4, 0, 0, 0},
-	Optab{AMOVHU, C_REG, C_NONE, C_HAUTO, 70, 4, REGSP, 0, 0},
-	Optab{AMOVHU, C_REG, C_NONE, C_HOREG, 70, 4, 0, 0, 0},
-	Optab{AMOVB, C_HAUTO, C_NONE, C_REG, 71, 4, REGSP, 0, 0},
-	Optab{AMOVB, C_HOREG, C_NONE, C_REG, 71, 4, 0, 0, 0},
-	Optab{AMOVBS, C_HAUTO, C_NONE, C_REG, 71, 4, REGSP, 0, 0},
-	Optab{AMOVBS, C_HOREG, C_NONE, C_REG, 71, 4, 0, 0, 0},
-	Optab{AMOVH, C_HAUTO, C_NONE, C_REG, 71, 4, REGSP, 0, 0},
-	Optab{AMOVH, C_HOREG, C_NONE, C_REG, 71, 4, 0, 0, 0},
-	Optab{AMOVHS, C_HAUTO, C_NONE, C_REG, 71, 4, REGSP, 0, 0},
-	Optab{AMOVHS, C_HOREG, C_NONE, C_REG, 71, 4, 0, 0, 0},
-	Optab{AMOVHU, C_HAUTO, C_NONE, C_REG, 71, 4, REGSP, 0, 0},
-	Optab{AMOVHU, C_HOREG, C_NONE, C_REG, 71, 4, 0, 0, 0},
-	Optab{AMOVH, C_REG, C_NONE, C_LAUTO, 72, 8, REGSP, LTO, 0},
-	Optab{AMOVH, C_REG, C_NONE, C_LOREG, 72, 8, 0, LTO, 0},
-	Optab{AMOVH, C_REG, C_NONE, C_ADDR, 94, 8, 0, LTO | LPCREL, 4},
-	Optab{AMOVHS, C_REG, C_NONE, C_LAUTO, 72, 8, REGSP, LTO, 0},
-	Optab{AMOVHS, C_REG, C_NONE, C_LOREG, 72, 8, 0, LTO, 0},
-	Optab{AMOVHS, C_REG, C_NONE, C_ADDR, 94, 8, 0, LTO | LPCREL, 4},
-	Optab{AMOVHU, C_REG, C_NONE, C_LAUTO, 72, 8, REGSP, LTO, 0},
-	Optab{AMOVHU, C_REG, C_NONE, C_LOREG, 72, 8, 0, LTO, 0},
-	Optab{AMOVHU, C_REG, C_NONE, C_ADDR, 94, 8, 0, LTO | LPCREL, 4},
-	Optab{AMOVB, C_LAUTO, C_NONE, C_REG, 73, 8, REGSP, LFROM, 0},
-	Optab{AMOVB, C_LOREG, C_NONE, C_REG, 73, 8, 0, LFROM, 0},
-	Optab{AMOVB, C_ADDR, C_NONE, C_REG, 93, 8, 0, LFROM | LPCREL, 4},
-	Optab{AMOVBS, C_LAUTO, C_NONE, C_REG, 73, 8, REGSP, LFROM, 0},
-	Optab{AMOVBS, C_LOREG, C_NONE, C_REG, 73, 8, 0, LFROM, 0},
-	Optab{AMOVBS, C_ADDR, C_NONE, C_REG, 93, 8, 0, LFROM | LPCREL, 4},
-	Optab{AMOVH, C_LAUTO, C_NONE, C_REG, 73, 8, REGSP, LFROM, 0},
-	Optab{AMOVH, C_LOREG, C_NONE, C_REG, 73, 8, 0, LFROM, 0},
-	Optab{AMOVH, C_ADDR, C_NONE, C_REG, 93, 8, 0, LFROM | LPCREL, 4},
-	Optab{AMOVHS, C_LAUTO, C_NONE, C_REG, 73, 8, REGSP, LFROM, 0},
-	Optab{AMOVHS, C_LOREG, C_NONE, C_REG, 73, 8, 0, LFROM, 0},
-	Optab{AMOVHS, C_ADDR, C_NONE, C_REG, 93, 8, 0, LFROM | LPCREL, 4},
-	Optab{AMOVHU, C_LAUTO, C_NONE, C_REG, 73, 8, REGSP, LFROM, 0},
-	Optab{AMOVHU, C_LOREG, C_NONE, C_REG, 73, 8, 0, LFROM, 0},
-	Optab{AMOVHU, C_ADDR, C_NONE, C_REG, 93, 8, 0, LFROM | LPCREL, 4},
-	Optab{ALDREX, C_SOREG, C_NONE, C_REG, 77, 4, 0, 0, 0},
-	Optab{ASTREX, C_SOREG, C_REG, C_REG, 78, 4, 0, 0, 0},
-	Optab{AMOVF, C_ZFCON, C_NONE, C_FREG, 80, 8, 0, 0, 0},
-	Optab{AMOVF, C_SFCON, C_NONE, C_FREG, 81, 4, 0, 0, 0},
-	Optab{ACMPF, C_FREG, C_REG, C_NONE, 82, 8, 0, 0, 0},
-	Optab{ACMPF, C_FREG, C_NONE, C_NONE, 83, 8, 0, 0, 0},
-	Optab{AMOVFW, C_FREG, C_NONE, C_FREG, 84, 4, 0, 0, 0},
-	Optab{AMOVWF, C_FREG, C_NONE, C_FREG, 85, 4, 0, 0, 0},
-	Optab{AMOVFW, C_FREG, C_NONE, C_REG, 86, 8, 0, 0, 0},
-	Optab{AMOVWF, C_REG, C_NONE, C_FREG, 87, 8, 0, 0, 0},
-	Optab{AMOVW, C_REG, C_NONE, C_FREG, 88, 4, 0, 0, 0},
-	Optab{AMOVW, C_FREG, C_NONE, C_REG, 89, 4, 0, 0, 0},
-	Optab{ATST, C_REG, C_NONE, C_NONE, 90, 4, 0, 0, 0},
-	Optab{ALDREXD, C_SOREG, C_NONE, C_REG, 91, 4, 0, 0, 0},
-	Optab{ASTREXD, C_SOREG, C_REG, C_REG, 92, 4, 0, 0, 0},
-	Optab{APLD, C_SOREG, C_NONE, C_NONE, 95, 4, 0, 0, 0},
-	Optab{obj.AUNDEF, C_NONE, C_NONE, C_NONE, 96, 4, 0, 0, 0},
-	Optab{ACLZ, C_REG, C_NONE, C_REG, 97, 4, 0, 0, 0},
-	Optab{AMULWT, C_REG, C_REG, C_REG, 98, 4, 0, 0, 0},
-	Optab{AMULAWT, C_REG, C_REG, C_REGREG2, 99, 4, 0, 0, 0},
-	Optab{obj.AUSEFIELD, C_ADDR, C_NONE, C_NONE, 0, 0, 0, 0, 0},
-	Optab{obj.APCDATA, C_LCON, C_NONE, C_LCON, 0, 0, 0, 0, 0},
-	Optab{obj.AFUNCDATA, C_LCON, C_NONE, C_ADDR, 0, 0, 0, 0, 0},
-	Optab{obj.ANOP, C_NONE, C_NONE, C_NONE, 0, 0, 0, 0, 0},
-	Optab{obj.ADUFFZERO, C_NONE, C_NONE, C_SBRA, 5, 4, 0, 0, 0}, // same as ABL
-	Optab{obj.ADUFFCOPY, C_NONE, C_NONE, C_SBRA, 5, 4, 0, 0, 0}, // same as ABL
-
-	Optab{ADATABUNDLE, C_NONE, C_NONE, C_NONE, 100, 4, 0, 0, 0},
-	Optab{ADATABUNDLEEND, C_NONE, C_NONE, C_NONE, 100, 0, 0, 0, 0},
-	Optab{obj.AXXX, C_NONE, C_NONE, C_NONE, 0, 4, 0, 0, 0},
-}
-
-var pool struct {
-	start uint32
-	size  uint32
-	extra uint32
-}
-
-var oprange [ALAST & obj.AMask]Oprang
-
-var xcmp [C_GOK + 1][C_GOK + 1]uint8
-
-var deferreturn *obj.LSym
-
-/* size of a case statement including jump table */
-func casesz(ctxt *obj.Link, p *obj.Prog) int32 {
-	var jt int = 0
-	var n int32 = 0
-	var o *Optab
-
-	for ; p != nil; p = p.Link {
-		if p.As == ABCASE {
-			jt = 1
-		} else if jt != 0 {
-			break
-		}
-		o = oplook(ctxt, p)
-		n += int32(o.size)
-	}
-
-	return n
-}
-
-// Note about encoding: Prog.scond holds the condition encoding,
-// but XOR'ed with C_SCOND_XOR, so that C_SCOND_NONE == 0.
-// The code that shifts the value << 28 has the responsibility
-// for XORing with C_SCOND_XOR too.
-
-// asmoutnacl assembles the instruction p. It replaces asmout for NaCl.
-// It returns the total number of bytes put in out, and it can change
-// p->pc if extra padding is necessary.
-// In rare cases, asmoutnacl might split p into two instructions.
-// origPC is the PC for this Prog (no padding is taken into account).
-func asmoutnacl(ctxt *obj.Link, origPC int32, p *obj.Prog, o *Optab, out []uint32) int {
-	size := int(o.size)
-
-	// instruction specific
-	switch p.As {
-	default:
-		if out != nil {
-			asmout(ctxt, p, o, out)
-		}
-
-	case ADATABUNDLE, // align to 16-byte boundary
-		ADATABUNDLEEND: // zero width instruction, just to align next instruction to 16-byte boundary
-		p.Pc = (p.Pc + 15) &^ 15
-
-		if out != nil {
-			asmout(ctxt, p, o, out)
-		}
-
-	case obj.AUNDEF,
-		APLD:
-		size = 4
-		if out != nil {
-			switch p.As {
-			case obj.AUNDEF:
-				out[0] = 0xe7fedef0 // NACL_INSTR_ARM_ABORT_NOW (UDF #0xEDE0)
-
-			case APLD:
-				out[0] = 0xe1a01001 // (MOVW R1, R1)
-			}
-		}
-
-	case AB, ABL:
-		if p.To.Type != obj.TYPE_MEM {
-			if out != nil {
-				asmout(ctxt, p, o, out)
-			}
-		} else {
-			if p.To.Offset != 0 || size != 4 || p.To.Reg > REG_R15 || p.To.Reg < REG_R0 {
-				ctxt.Diag("unsupported instruction: %v", p)
-			}
-			if p.Pc&15 == 12 {
-				p.Pc += 4
-			}
-			if out != nil {
-				out[0] = ((uint32(p.Scond)&C_SCOND)^C_SCOND_XOR)<<28 | 0x03c0013f | (uint32(p.To.Reg)&15)<<12 | (uint32(p.To.Reg)&15)<<16 // BIC $0xc000000f, Rx
-				if p.As == AB {
-					out[1] = ((uint32(p.Scond)&C_SCOND)^C_SCOND_XOR)<<28 | 0x012fff10 | (uint32(p.To.Reg)&15)<<0 // BX Rx
-				} else { // ABL
-					out[1] = ((uint32(p.Scond)&C_SCOND)^C_SCOND_XOR)<<28 | 0x012fff30 | (uint32(p.To.Reg)&15)<<0 // BLX Rx
-				}
-			}
-
-			size = 8
-		}
-
-		// align the last instruction (the actual BL) to the last instruction in a bundle
-		if p.As == ABL {
-			if deferreturn == nil {
-				deferreturn = obj.Linklookup(ctxt, "runtime.deferreturn", 0)
-			}
-			if p.To.Sym == deferreturn {
-				p.Pc = ((int64(origPC) + 15) &^ 15) + 16 - int64(size)
-			} else {
-				p.Pc += (16 - ((p.Pc + int64(size)) & 15)) & 15
-			}
-		}
-
-	case ALDREX,
-		ALDREXD,
-		AMOVB,
-		AMOVBS,
-		AMOVBU,
-		AMOVD,
-		AMOVF,
-		AMOVH,
-		AMOVHS,
-		AMOVHU,
-		AMOVM,
-		AMOVW,
-		ASTREX,
-		ASTREXD:
-		if p.To.Type == obj.TYPE_REG && p.To.Reg == REG_R15 && p.From.Reg == REG_R13 { // MOVW.W x(R13), PC
-			if out != nil {
-				asmout(ctxt, p, o, out)
-			}
-			if size == 4 {
-				if out != nil {
-					// Note: 5c and 5g reg.c know that DIV/MOD smashes R12
-					// so that this return instruction expansion is valid.
-					out[0] = out[0] &^ 0x3000                                         // change PC to R12
-					out[1] = ((uint32(p.Scond)&C_SCOND)^C_SCOND_XOR)<<28 | 0x03ccc13f // BIC $0xc000000f, R12
-					out[2] = ((uint32(p.Scond)&C_SCOND)^C_SCOND_XOR)<<28 | 0x012fff1c // BX R12
-				}
-
-				size += 8
-				if (p.Pc+int64(size))&15 == 4 {
-					p.Pc += 4
-				}
-				break
-			} else {
-				// if the instruction used more than 4 bytes, then it must have used a very large
-				// offset to update R13, so we need to additionally mask R13.
-				if out != nil {
-					out[size/4-1] &^= 0x3000                                                 // change PC to R12
-					out[size/4] = ((uint32(p.Scond)&C_SCOND)^C_SCOND_XOR)<<28 | 0x03cdd103   // BIC $0xc0000000, R13
-					out[size/4+1] = ((uint32(p.Scond)&C_SCOND)^C_SCOND_XOR)<<28 | 0x03ccc13f // BIC $0xc000000f, R12
-					out[size/4+2] = ((uint32(p.Scond)&C_SCOND)^C_SCOND_XOR)<<28 | 0x012fff1c // BX R12
-				}
-
-				// p->pc+size is only ok at 4 or 12 mod 16.
-				if (p.Pc+int64(size))%8 == 0 {
-					p.Pc += 4
-				}
-				size += 12
-				break
-			}
-		}
-
-		if p.To.Type == obj.TYPE_REG && p.To.Reg == REG_R15 {
-			ctxt.Diag("unsupported instruction (move to another register and use indirect jump instead): %v", p)
-		}
-
-		if p.To.Type == obj.TYPE_MEM && p.To.Reg == REG_R13 && (p.Scond&C_WBIT != 0) && size > 4 {
-			// function prolog with very large frame size: MOVW.W R14,-100004(R13)
-			// split it into two instructions:
-			// 	ADD $-100004, R13
-			// 	MOVW R14, 0(R13)
-			q := ctxt.NewProg()
-
-			p.Scond &^= C_WBIT
-			*q = *p
-			a := &p.To
-			var a2 *obj.Addr
-			if p.To.Type == obj.TYPE_MEM {
-				a2 = &q.To
-			} else {
-				a2 = &q.From
-			}
-			obj.Nocache(q)
-			obj.Nocache(p)
-
-			// insert q after p
-			q.Link = p.Link
-
-			p.Link = q
-			q.Pcond = nil
-
-			// make p into ADD $X, R13
-			p.As = AADD
-
-			p.From = *a
-			p.From.Reg = 0
-			p.From.Type = obj.TYPE_CONST
-			p.To = obj.Addr{}
-			p.To.Type = obj.TYPE_REG
-			p.To.Reg = REG_R13
-
-			// make q into p but load/store from 0(R13)
-			q.Spadj = 0
-
-			*a2 = obj.Addr{}
-			a2.Type = obj.TYPE_MEM
-			a2.Reg = REG_R13
-			a2.Sym = nil
-			a2.Offset = 0
-			size = int(oplook(ctxt, p).size)
-			break
-		}
-
-		if (p.To.Type == obj.TYPE_MEM && p.To.Reg != REG_R9) || // MOVW Rx, X(Ry), y != 9
-			(p.From.Type == obj.TYPE_MEM && p.From.Reg != REG_R9) { // MOVW X(Rx), Ry, x != 9
-			var a *obj.Addr
-			if p.To.Type == obj.TYPE_MEM {
-				a = &p.To
-			} else {
-				a = &p.From
-			}
-			reg := int(a.Reg)
-			if size == 4 {
-				// if addr.reg == 0, then it is probably load from x(FP) with small x, no need to modify.
-				if reg == 0 {
-					if out != nil {
-						asmout(ctxt, p, o, out)
-					}
-				} else {
-					if out != nil {
-						out[0] = ((uint32(p.Scond)&C_SCOND)^C_SCOND_XOR)<<28 | 0x03c00103 | (uint32(reg)&15)<<16 | (uint32(reg)&15)<<12 // BIC $0xc0000000, Rx
-					}
-					if p.Pc&15 == 12 {
-						p.Pc += 4
-					}
-					size += 4
-					if out != nil {
-						asmout(ctxt, p, o, out[1:])
-					}
-				}
-
-				break
-			} else {
-				// if a load/store instruction takes more than 1 word to implement, then
-				// we need to separate the instruction into two:
-				// 1. explicitly load the address into R11.
-				// 2. load/store from R11.
-				// This won't handle .W/.P, so we should reject such code.
-				if p.Scond&(C_PBIT|C_WBIT) != 0 {
-					ctxt.Diag("unsupported instruction (.P/.W): %v", p)
-				}
-				q := ctxt.NewProg()
-				*q = *p
-				var a2 *obj.Addr
-				if p.To.Type == obj.TYPE_MEM {
-					a2 = &q.To
-				} else {
-					a2 = &q.From
-				}
-				obj.Nocache(q)
-				obj.Nocache(p)
-
-				// insert q after p
-				q.Link = p.Link
-
-				p.Link = q
-				q.Pcond = nil
-
-				// make p into MOVW $X(R), R11
-				p.As = AMOVW
-
-				p.From = *a
-				p.From.Type = obj.TYPE_ADDR
-				p.To = obj.Addr{}
-				p.To.Type = obj.TYPE_REG
-				p.To.Reg = REG_R11
-
-				// make q into p but load/store from 0(R11)
-				*a2 = obj.Addr{}
-
-				a2.Type = obj.TYPE_MEM
-				a2.Reg = REG_R11
-				a2.Sym = nil
-				a2.Offset = 0
-				size = int(oplook(ctxt, p).size)
-				break
-			}
-		} else if out != nil {
-			asmout(ctxt, p, o, out)
-		}
-	}
-
-	// destination register specific
-	if p.To.Type == obj.TYPE_REG {
-		switch p.To.Reg {
-		case REG_R9:
-			ctxt.Diag("invalid instruction, cannot write to R9: %v", p)
-
-		case REG_R13:
-			if out != nil {
-				out[size/4] = 0xe3cdd103 // BIC $0xc0000000, R13
-			}
-			if (p.Pc+int64(size))&15 == 0 {
-				p.Pc += 4
-			}
-			size += 4
-		}
-	}
-
-	return size
-}
-
-func span5(ctxt *obj.Link, cursym *obj.LSym) {
-	var p *obj.Prog
-	var op *obj.Prog
-
-	p = cursym.Text
-	if p == nil || p.Link == nil { // handle external functions and ELF section symbols
-		return
-	}
-
-	if oprange[AAND&obj.AMask].start == nil {
-		buildop(ctxt)
-	}
-
-	ctxt.Cursym = cursym
-
-	ctxt.Autosize = int32(p.To.Offset + 4)
-	c := int32(0)
-
-	op = p
-	p = p.Link
-	var i int
-	var m int
-	var o *Optab
-	for ; p != nil || ctxt.Blitrl != nil; op, p = p, p.Link {
-		if p == nil {
-			if checkpool(ctxt, op, 0) {
-				p = op
-				continue
-			}
-
-			// can't happen: blitrl is not nil, but checkpool didn't flushpool
-			ctxt.Diag("internal inconsistency")
-
-			break
-		}
-
-		ctxt.Curp = p
-		p.Pc = int64(c)
-		o = oplook(ctxt, p)
-		if ctxt.Headtype != obj.Hnacl {
-			m = int(o.size)
-		} else {
-			m = asmoutnacl(ctxt, c, p, o, nil)
-			c = int32(p.Pc)     // asmoutnacl might change pc for alignment
-			o = oplook(ctxt, p) // asmoutnacl might change p in rare cases
-		}
-
-		if m%4 != 0 || p.Pc%4 != 0 {
-			ctxt.Diag("!pc invalid: %v size=%d", p, m)
-		}
-
-		// must check literal pool here in case p generates many instructions
-		if ctxt.Blitrl != nil {
-			i = m
-			if p.As == ACASE {
-				i = int(casesz(ctxt, p))
-			}
-			if checkpool(ctxt, op, i) {
-				p = op
-				continue
-			}
-		}
-
-		if m == 0 && (p.As != obj.AFUNCDATA && p.As != obj.APCDATA && p.As != ADATABUNDLEEND && p.As != obj.ANOP) {
-			ctxt.Diag("zero-width instruction\n%v", p)
-			continue
-		}
-
-		switch o.flag & (LFROM | LTO | LPOOL) {
-		case LFROM:
-			addpool(ctxt, p, &p.From)
-
-		case LTO:
-			addpool(ctxt, p, &p.To)
-
-		case LPOOL:
-			if p.Scond&C_SCOND == C_SCOND_NONE {
-				flushpool(ctxt, p, 0, 0)
-			}
-		}
-
-		if p.As == AMOVW && p.To.Type == obj.TYPE_REG && p.To.Reg == REGPC && p.Scond&C_SCOND == C_SCOND_NONE {
-			flushpool(ctxt, p, 0, 0)
-		}
-		c += int32(m)
-	}
-
-	cursym.Size = int64(c)
-
-	/*
-	 * if any procedure is large enough to
-	 * generate a large SBRA branch, then
-	 * generate extra passes putting branches
-	 * around jmps to fix. this is rare.
-	 */
-	times := 0
-
-	var bflag int
-	var opc int32
-	var out [6 + 3]uint32
-	for {
-		if ctxt.Debugvlog != 0 {
-			fmt.Fprintf(ctxt.Bso, "%5.2f span1\n", obj.Cputime())
-		}
-		bflag = 0
-		c = 0
-		times++
-		cursym.Text.Pc = 0 // force re-layout the code.
-		for p = cursym.Text; p != nil; p = p.Link {
-			ctxt.Curp = p
-			o = oplook(ctxt, p)
-			if int64(c) > p.Pc {
-				p.Pc = int64(c)
-			}
-
-			/* very large branches
-			if(o->type == 6 && p->pcond) {
-				otxt = p->pcond->pc - c;
-				if(otxt < 0)
-					otxt = -otxt;
-				if(otxt >= (1L<<17) - 10) {
-					q = emallocz(sizeof(Prog));
-					q->link = p->link;
-					p->link = q;
-					q->as = AB;
-					q->to.type = TYPE_BRANCH;
-					q->pcond = p->pcond;
-					p->pcond = q;
-					q = emallocz(sizeof(Prog));
-					q->link = p->link;
-					p->link = q;
-					q->as = AB;
-					q->to.type = TYPE_BRANCH;
-					q->pcond = q->link->link;
-					bflag = 1;
-				}
-			}
-			*/
-			opc = int32(p.Pc)
-
-			if ctxt.Headtype != obj.Hnacl {
-				m = int(o.size)
-			} else {
-				m = asmoutnacl(ctxt, c, p, o, nil)
-			}
-			if p.Pc != int64(opc) {
-				bflag = 1
-			}
-
-			//print("%v pc changed %d to %d in iter. %d\n", p, opc, (int32)p->pc, times);
-			c = int32(p.Pc + int64(m))
-
-			if m%4 != 0 || p.Pc%4 != 0 {
-				ctxt.Diag("pc invalid: %v size=%d", p, m)
-			}
-
-			if m/4 > len(out) {
-				ctxt.Diag("instruction size too large: %d > %d", m/4, len(out))
-			}
-			if m == 0 && (p.As != obj.AFUNCDATA && p.As != obj.APCDATA && p.As != ADATABUNDLEEND && p.As != obj.ANOP) {
-				if p.As == obj.ATEXT {
-					ctxt.Autosize = int32(p.To.Offset + 4)
-					continue
-				}
-
-				ctxt.Diag("zero-width instruction\n%v", p)
-				continue
-			}
-		}
-
-		cursym.Size = int64(c)
-		if bflag == 0 {
-			break
-		}
-	}
-
-	if c%4 != 0 {
-		ctxt.Diag("sym->size=%d, invalid", c)
-	}
-
-	/*
-	 * lay out the code.  all the pc-relative code references,
-	 * even cross-function, are resolved now;
-	 * only data references need to be relocated.
-	 * with more work we could leave cross-function
-	 * code references to be relocated too, and then
-	 * perhaps we'd be able to parallelize the span loop above.
-	 */
-	if ctxt.Tlsg == nil {
-		ctxt.Tlsg = obj.Linklookup(ctxt, "runtime.tlsg", 0)
-	}
-
-	p = cursym.Text
-	ctxt.Autosize = int32(p.To.Offset + 4)
-	obj.Symgrow(ctxt, cursym, cursym.Size)
-
-	bp := cursym.P
-	c = int32(p.Pc) // even p->link might need extra padding
-	var v int
-	for p = p.Link; p != nil; p = p.Link {
-		ctxt.Pc = p.Pc
-		ctxt.Curp = p
-		o = oplook(ctxt, p)
-		opc = int32(p.Pc)
-		if ctxt.Headtype != obj.Hnacl {
-			asmout(ctxt, p, o, out[:])
-			m = int(o.size)
-		} else {
-			m = asmoutnacl(ctxt, c, p, o, out[:])
-			if int64(opc) != p.Pc {
-				ctxt.Diag("asmoutnacl broken: pc changed (%d->%d) in last stage: %v", opc, int32(p.Pc), p)
-			}
-		}
-
-		if m%4 != 0 || p.Pc%4 != 0 {
-			ctxt.Diag("final stage: pc invalid: %v size=%d", p, m)
-		}
-
-		if int64(c) > p.Pc {
-			ctxt.Diag("PC padding invalid: want %#d, has %#d: %v", p.Pc, c, p)
-		}
-		for int64(c) != p.Pc {
-			// emit 0xe1a00000 (MOVW R0, R0)
-			bp[0] = 0x00
-			bp = bp[1:]
-
-			bp[0] = 0x00
-			bp = bp[1:]
-			bp[0] = 0xa0
-			bp = bp[1:]
-			bp[0] = 0xe1
-			bp = bp[1:]
-			c += 4
-		}
-
-		for i = 0; i < m/4; i++ {
-			v = int(out[i])
-			bp[0] = byte(v)
-			bp = bp[1:]
-			bp[0] = byte(v >> 8)
-			bp = bp[1:]
-			bp[0] = byte(v >> 16)
-			bp = bp[1:]
-			bp[0] = byte(v >> 24)
-			bp = bp[1:]
-		}
-
-		c += int32(m)
-	}
-}
-
-/*
- * when the first reference to the literal pool threatens
- * to go out of range of a 12-bit PC-relative offset,
- * drop the pool now, and branch round it.
- * this happens only in extended basic blocks that exceed 4k.
- */
-func checkpool(ctxt *obj.Link, p *obj.Prog, sz int) bool {
-	if pool.size >= 0xff0 || immaddr(int32((p.Pc+int64(sz)+4)+4+int64(12+pool.size)-int64(pool.start+8))) == 0 {
-		return flushpool(ctxt, p, 1, 0)
-	} else if p.Link == nil {
-		return flushpool(ctxt, p, 2, 0)
-	}
-	return false
-}
-
-func flushpool(ctxt *obj.Link, p *obj.Prog, skip int, force int) bool {
-	if ctxt.Blitrl != nil {
-		if skip != 0 {
-			if false && skip == 1 {
-				fmt.Printf("note: flush literal pool at %x: len=%d ref=%x\n", uint64(p.Pc+4), pool.size, pool.start)
-			}
-			q := ctxt.NewProg()
-			q.As = AB
-			q.To.Type = obj.TYPE_BRANCH
-			q.Pcond = p.Link
-			q.Link = ctxt.Blitrl
-			q.Lineno = p.Lineno
-			ctxt.Blitrl = q
-		} else if force == 0 && (p.Pc+int64(12+pool.size)-int64(pool.start) < 2048) { // 12 take into account the maximum nacl literal pool alignment padding size
-			return false
-		}
-		if ctxt.Headtype == obj.Hnacl && pool.size%16 != 0 {
-			// if pool is not multiple of 16 bytes, add an alignment marker
-			q := ctxt.NewProg()
-
-			q.As = ADATABUNDLEEND
-			ctxt.Elitrl.Link = q
-			ctxt.Elitrl = q
-		}
-
-		// The line number for constant pool entries doesn't really matter.
-		// We set it to the line number of the preceding instruction so that
-		// there are no deltas to encode in the pc-line tables.
-		for q := ctxt.Blitrl; q != nil; q = q.Link {
-			q.Lineno = p.Lineno
-		}
-
-		ctxt.Elitrl.Link = p.Link
-		p.Link = ctxt.Blitrl
-
-		ctxt.Blitrl = nil /* BUG: should refer back to values until out-of-range */
-		ctxt.Elitrl = nil
-		pool.size = 0
-		pool.start = 0
-		pool.extra = 0
-		return true
-	}
-
-	return false
-}
-
-func addpool(ctxt *obj.Link, p *obj.Prog, a *obj.Addr) {
-	var t obj.Prog
-
-	c := aclass(ctxt, a)
-
-	t.Ctxt = ctxt
-	t.As = AWORD
-
-	switch c {
-	default:
-		t.To.Offset = a.Offset
-		t.To.Sym = a.Sym
-		t.To.Type = a.Type
-		t.To.Name = a.Name
-
-		if ctxt.Flag_shared != 0 && t.To.Sym != nil {
-			t.Rel = p
-		}
-
-	case C_SROREG,
-		C_LOREG,
-		C_ROREG,
-		C_FOREG,
-		C_SOREG,
-		C_HOREG,
-		C_FAUTO,
-		C_SAUTO,
-		C_LAUTO,
-		C_LACON:
-		t.To.Type = obj.TYPE_CONST
-		t.To.Offset = ctxt.Instoffset
-	}
-
-	if t.Rel == nil {
-		for q := ctxt.Blitrl; q != nil; q = q.Link { /* could hash on t.t0.offset */
-			if q.Rel == nil && q.To == t.To {
-				p.Pcond = q
-				return
-			}
-		}
-	}
-
-	if ctxt.Headtype == obj.Hnacl && pool.size%16 == 0 {
-		// start a new data bundle
-		q := ctxt.NewProg()
-		q.As = ADATABUNDLE
-		q.Pc = int64(pool.size)
-		pool.size += 4
-		if ctxt.Blitrl == nil {
-			ctxt.Blitrl = q
-			pool.start = uint32(p.Pc)
-		} else {
-			ctxt.Elitrl.Link = q
-		}
-
-		ctxt.Elitrl = q
-	}
-
-	q := ctxt.NewProg()
-	*q = t
-	q.Pc = int64(pool.size)
-
-	if ctxt.Blitrl == nil {
-		ctxt.Blitrl = q
-		pool.start = uint32(p.Pc)
-	} else {
-		ctxt.Elitrl.Link = q
-	}
-	ctxt.Elitrl = q
-	pool.size += 4
-
-	p.Pcond = q
-}
-
-func regoff(ctxt *obj.Link, a *obj.Addr) int32 {
-	ctxt.Instoffset = 0
-	aclass(ctxt, a)
-	return int32(ctxt.Instoffset)
-}
-
-func immrot(v uint32) int32 {
-	for i := 0; i < 16; i++ {
-		if v&^0xff == 0 {
-			return int32(uint32(int32(i)<<8) | v | 1<<25)
-		}
-		v = v<<2 | v>>30
-	}
-
-	return 0
-}
-
-func immaddr(v int32) int32 {
-	if v >= 0 && v <= 0xfff {
-		return v&0xfff | 1<<24 | 1<<23 /* pre indexing */ /* pre indexing, up */
-	}
-	if v >= -0xfff && v < 0 {
-		return -v&0xfff | 1<<24 /* pre indexing */
-	}
-	return 0
-}
-
-func immfloat(v int32) bool {
-	return v&0xC03 == 0 /* offset will fit in floating-point load/store */
-}
-
-func immhalf(v int32) bool {
-	if v >= 0 && v <= 0xff {
-		return v|1<<24|1<<23 != 0 /* pre indexing */ /* pre indexing, up */
-	}
-	if v >= -0xff && v < 0 {
-		return -v&0xff|1<<24 != 0 /* pre indexing */
-	}
-	return false
-}
-
-func aclass(ctxt *obj.Link, a *obj.Addr) int {
-	switch a.Type {
-	case obj.TYPE_NONE:
-		return C_NONE
-
-	case obj.TYPE_REG:
-		if REG_R0 <= a.Reg && a.Reg <= REG_R15 {
-			return C_REG
-		}
-		if REG_F0 <= a.Reg && a.Reg <= REG_F15 {
-			return C_FREG
-		}
-		if a.Reg == REG_FPSR || a.Reg == REG_FPCR {
-			return C_FCR
-		}
-		if a.Reg == REG_CPSR || a.Reg == REG_SPSR {
-			return C_PSR
-		}
-		return C_GOK
-
-	case obj.TYPE_REGREG:
-		return C_REGREG
-
-	case obj.TYPE_REGREG2:
-		return C_REGREG2
-
-	case obj.TYPE_REGLIST:
-		return C_REGLIST
-
-	case obj.TYPE_SHIFT:
-		return C_SHIFT
-
-	case obj.TYPE_MEM:
-		switch a.Name {
-		case obj.NAME_EXTERN,
-			obj.NAME_STATIC:
-			if a.Sym == nil || a.Sym.Name == "" {
-				fmt.Printf("null sym external\n")
-				return C_GOK
-			}
-
-			ctxt.Instoffset = 0 // s.b. unused but just in case
-			return C_ADDR
-
-		case obj.NAME_AUTO:
-			ctxt.Instoffset = int64(ctxt.Autosize) + a.Offset
-			t := int(immaddr(int32(ctxt.Instoffset)))
-			if t != 0 {
-				if immhalf(int32(ctxt.Instoffset)) {
-					if immfloat(int32(t)) {
-						return C_HFAUTO
-					}
-					return C_HAUTO
-				}
-
-				if immfloat(int32(t)) {
-					return C_FAUTO
-				}
-				return C_SAUTO
-			}
-
-			return C_LAUTO
-
-		case obj.NAME_PARAM:
-			ctxt.Instoffset = int64(ctxt.Autosize) + a.Offset + 4
-			t := int(immaddr(int32(ctxt.Instoffset)))
-			if t != 0 {
-				if immhalf(int32(ctxt.Instoffset)) {
-					if immfloat(int32(t)) {
-						return C_HFAUTO
-					}
-					return C_HAUTO
-				}
-
-				if immfloat(int32(t)) {
-					return C_FAUTO
-				}
-				return C_SAUTO
-			}
-
-			return C_LAUTO
-
-		case obj.TYPE_NONE:
-			ctxt.Instoffset = a.Offset
-			t := int(immaddr(int32(ctxt.Instoffset)))
-			if t != 0 {
-				if immhalf(int32(ctxt.Instoffset)) { /* n.b. that it will also satisfy immrot */
-					if immfloat(int32(t)) {
-						return C_HFOREG
-					}
-					return C_HOREG
-				}
-
-				if immfloat(int32(t)) {
-					return C_FOREG /* n.b. that it will also satisfy immrot */
-				}
-				t := int(immrot(uint32(ctxt.Instoffset)))
-				if t != 0 {
-					return C_SROREG
-				}
-				if immhalf(int32(ctxt.Instoffset)) {
-					return C_HOREG
-				}
-				return C_SOREG
-			}
-
-			t = int(immrot(uint32(ctxt.Instoffset)))
-			if t != 0 {
-				return C_ROREG
-			}
-			return C_LOREG
-		}
-
-		return C_GOK
-
-	case obj.TYPE_FCONST:
-		if chipzero5(ctxt, a.Val.(float64)) >= 0 {
-			return C_ZFCON
-		}
-		if chipfloat5(ctxt, a.Val.(float64)) >= 0 {
-			return C_SFCON
-		}
-		return C_LFCON
-
-	case obj.TYPE_TEXTSIZE:
-		return C_TEXTSIZE
-
-	case obj.TYPE_CONST,
-		obj.TYPE_ADDR:
-		switch a.Name {
-		case obj.TYPE_NONE:
-			ctxt.Instoffset = a.Offset
-			if a.Reg != 0 {
-				return aconsize(ctxt)
-			}
-
-			t := int(immrot(uint32(ctxt.Instoffset)))
-			if t != 0 {
-				return C_RCON
-			}
-			t = int(immrot(^uint32(ctxt.Instoffset)))
-			if t != 0 {
-				return C_NCON
-			}
-			return C_LCON
-
-		case obj.NAME_EXTERN,
-			obj.NAME_STATIC:
-			s := a.Sym
-			if s == nil {
-				break
-			}
-			ctxt.Instoffset = 0 // s.b. unused but just in case
-			return C_LCONADDR
-
-		case obj.NAME_AUTO:
-			ctxt.Instoffset = int64(ctxt.Autosize) + a.Offset
-			return aconsize(ctxt)
-
-		case obj.NAME_PARAM:
-			ctxt.Instoffset = int64(ctxt.Autosize) + a.Offset + 4
-			return aconsize(ctxt)
-		}
-
-		return C_GOK
-
-	case obj.TYPE_BRANCH:
-		return C_SBRA
-	}
-
-	return C_GOK
-}
-
-func aconsize(ctxt *obj.Link) int {
-	t := int(immrot(uint32(ctxt.Instoffset)))
-	if t != 0 {
-		return C_RACON
-	}
-	return C_LACON
-}
-
-func prasm(p *obj.Prog) {
-	fmt.Printf("%v\n", p)
-}
-
-func oplook(ctxt *obj.Link, p *obj.Prog) *Optab {
-	a1 := int(p.Optab)
-	if a1 != 0 {
-		return &optab[a1-1:][0]
-	}
-	a1 = int(p.From.Class)
-	if a1 == 0 {
-		a1 = aclass(ctxt, &p.From) + 1
-		p.From.Class = int8(a1)
-	}
-
-	a1--
-	a3 := int(p.To.Class)
-	if a3 == 0 {
-		a3 = aclass(ctxt, &p.To) + 1
-		p.To.Class = int8(a3)
-	}
-
-	a3--
-	a2 := C_NONE
-	if p.Reg != 0 {
-		a2 = C_REG
-	}
-	r := p.As & obj.AMask
-	o := oprange[r].start
-	if o == nil {
-		o = oprange[r].stop /* just generate an error */
-	}
-
-	if false { /*debug['O']*/
-		fmt.Printf("oplook %v %v %v %v\n", obj.Aconv(int(p.As)), DRconv(a1), DRconv(a2), DRconv(a3))
-		fmt.Printf("\t\t%d %d\n", p.From.Type, p.To.Type)
-	}
-
-	e := oprange[r].stop
-	c1 := xcmp[a1][:]
-	c3 := xcmp[a3][:]
-	for ; -cap(o) < -cap(e); o = o[1:] {
-		if int(o[0].a2) == a2 {
-			if c1[o[0].a1] != 0 {
-				if c3[o[0].a3] != 0 {
-					p.Optab = uint16((-cap(o) + cap(optab)) + 1)
-					return &o[0]
-				}
-			}
-		}
-	}
-
-	ctxt.Diag("illegal combination %v; %v %v %v, %d %d", p, DRconv(a1), DRconv(a2), DRconv(a3), p.From.Type, p.To.Type)
-	ctxt.Diag("from %d %d to %d %d\n", p.From.Type, p.From.Name, p.To.Type, p.To.Name)
-	prasm(p)
-	if o == nil {
-		o = optab
-	}
-	return &o[0]
-}
-
-func cmp(a int, b int) bool {
-	if a == b {
-		return true
-	}
-	switch a {
-	case C_LCON:
-		if b == C_RCON || b == C_NCON {
-			return true
-		}
-
-	case C_LACON:
-		if b == C_RACON {
-			return true
-		}
-
-	case C_LFCON:
-		if b == C_ZFCON || b == C_SFCON {
-			return true
-		}
-
-	case C_HFAUTO:
-		return b == C_HAUTO || b == C_FAUTO
-
-	case C_FAUTO, C_HAUTO:
-		return b == C_HFAUTO
-
-	case C_SAUTO:
-		return cmp(C_HFAUTO, b)
-
-	case C_LAUTO:
-		return cmp(C_SAUTO, b)
-
-	case C_HFOREG:
-		return b == C_HOREG || b == C_FOREG
-
-	case C_FOREG, C_HOREG:
-		return b == C_HFOREG
-
-	case C_SROREG:
-		return cmp(C_SOREG, b) || cmp(C_ROREG, b)
-
-	case C_SOREG, C_ROREG:
-		return b == C_SROREG || cmp(C_HFOREG, b)
-
-	case C_LOREG:
-		return cmp(C_SROREG, b)
-
-	case C_LBRA:
-		if b == C_SBRA {
-			return true
-		}
-
-	case C_HREG:
-		return cmp(C_SP, b) || cmp(C_PC, b)
-	}
-
-	return false
-}
-
-type ocmp []Optab
-
-func (x ocmp) Len() int {
-	return len(x)
-}
-
-func (x ocmp) Swap(i, j int) {
-	x[i], x[j] = x[j], x[i]
-}
-
-func (x ocmp) Less(i, j int) bool {
-	p1 := &x[i]
-	p2 := &x[j]
-	n := int(p1.as) - int(p2.as)
-	if n != 0 {
-		return n < 0
-	}
-	n = int(p1.a1) - int(p2.a1)
-	if n != 0 {
-		return n < 0
-	}
-	n = int(p1.a2) - int(p2.a2)
-	if n != 0 {
-		return n < 0
-	}
-	n = int(p1.a3) - int(p2.a3)
-	if n != 0 {
-		return n < 0
-	}
-	return false
-}
-
-func opset(a, b0 uint16) {
-	oprange[a&obj.AMask] = oprange[b0]
-}
-
-func buildop(ctxt *obj.Link) {
-	var n int
-
-	for i := 0; i < C_GOK; i++ {
-		for n = 0; n < C_GOK; n++ {
-			if cmp(n, i) {
-				xcmp[i][n] = 1
-			}
-		}
-	}
-	for n = 0; optab[n].as != obj.AXXX; n++ {
-		if optab[n].flag&LPCREL != 0 {
-			if ctxt.Flag_shared != 0 {
-				optab[n].size += int8(optab[n].pcrelsiz)
-			} else {
-				optab[n].flag &^= LPCREL
-			}
-		}
-	}
-
-	sort.Sort(ocmp(optab[:n]))
-	for i := 0; i < n; i++ {
-		r := optab[i].as
-		r0 := r & obj.AMask
-		oprange[r0].start = optab[i:]
-		for optab[i].as == r {
-			i++
-		}
-		oprange[r0].stop = optab[i:]
-		i--
-
-		switch r {
-		default:
-			ctxt.Diag("unknown op in build: %v", obj.Aconv(int(r)))
-			log.Fatalf("bad code")
-
-		case AADD:
-			opset(AAND, r0)
-			opset(AEOR, r0)
-			opset(ASUB, r0)
-			opset(ARSB, r0)
-			opset(AADC, r0)
-			opset(ASBC, r0)
-			opset(ARSC, r0)
-			opset(AORR, r0)
-			opset(ABIC, r0)
-
-		case ACMP:
-			opset(ATEQ, r0)
-			opset(ACMN, r0)
-
-		case AMVN:
-			break
-
-		case ABEQ:
-			opset(ABNE, r0)
-			opset(ABCS, r0)
-			opset(ABHS, r0)
-			opset(ABCC, r0)
-			opset(ABLO, r0)
-			opset(ABMI, r0)
-			opset(ABPL, r0)
-			opset(ABVS, r0)
-			opset(ABVC, r0)
-			opset(ABHI, r0)
-			opset(ABLS, r0)
-			opset(ABGE, r0)
-			opset(ABLT, r0)
-			opset(ABGT, r0)
-			opset(ABLE, r0)
-
-		case ASLL:
-			opset(ASRL, r0)
-			opset(ASRA, r0)
-
-		case AMUL:
-			opset(AMULU, r0)
-
-		case ADIV:
-			opset(AMOD, r0)
-			opset(AMODU, r0)
-			opset(ADIVU, r0)
-
-		case AMOVW,
-			AMOVB,
-			AMOVBS,
-			AMOVBU,
-			AMOVH,
-			AMOVHS,
-			AMOVHU:
-			break
-
-		case ASWPW:
-			opset(ASWPBU, r0)
-
-		case AB,
-			ABL,
-			ABX,
-			ABXRET,
-			obj.ADUFFZERO,
-			obj.ADUFFCOPY,
-			ASWI,
-			AWORD,
-			AMOVM,
-			ARFE,
-			obj.ATEXT,
-			obj.AUSEFIELD,
-			ACASE,
-			ABCASE,
-			obj.ATYPE:
-			break
-
-		case AADDF:
-			opset(AADDD, r0)
-			opset(ASUBF, r0)
-			opset(ASUBD, r0)
-			opset(AMULF, r0)
-			opset(AMULD, r0)
-			opset(ADIVF, r0)
-			opset(ADIVD, r0)
-			opset(ASQRTF, r0)
-			opset(ASQRTD, r0)
-			opset(AMOVFD, r0)
-			opset(AMOVDF, r0)
-			opset(AABSF, r0)
-			opset(AABSD, r0)
-
-		case ACMPF:
-			opset(ACMPD, r0)
-
-		case AMOVF:
-			opset(AMOVD, r0)
-
-		case AMOVFW:
-			opset(AMOVDW, r0)
-
-		case AMOVWF:
-			opset(AMOVWD, r0)
-
-		case AMULL:
-			opset(AMULAL, r0)
-			opset(AMULLU, r0)
-			opset(AMULALU, r0)
-
-		case AMULWT:
-			opset(AMULWB, r0)
-
-		case AMULAWT:
-			opset(AMULAWB, r0)
-
-		case AMULA,
-			ALDREX,
-			ASTREX,
-			ALDREXD,
-			ASTREXD,
-			ATST,
-			APLD,
-			obj.AUNDEF,
-			ACLZ,
-			obj.AFUNCDATA,
-			obj.APCDATA,
-			obj.ANOP,
-			ADATABUNDLE,
-			ADATABUNDLEEND:
-			break
-		}
-	}
-}
-
-func asmout(ctxt *obj.Link, p *obj.Prog, o *Optab, out []uint32) {
-	ctxt.Printp = p
-	o1 := uint32(0)
-	o2 := uint32(0)
-	o3 := uint32(0)
-	o4 := uint32(0)
-	o5 := uint32(0)
-	o6 := uint32(0)
-	ctxt.Armsize += int32(o.size)
-	if false { /*debug['P']*/
-		fmt.Printf("%x: %v\ttype %d\n", uint32(p.Pc), p, o.type_)
-	}
-	switch o.type_ {
-	default:
-		ctxt.Diag("unknown asm %d", o.type_)
-		prasm(p)
-
-	case 0: /* pseudo ops */
-		if false { /*debug['G']*/
-			fmt.Printf("%x: %s: arm\n", uint32(p.Pc), p.From.Sym.Name)
-		}
-
-	case 1: /* op R,[R],R */
-		o1 = oprrr(ctxt, int(p.As), int(p.Scond))
-
-		rf := int(p.From.Reg)
-		rt := int(p.To.Reg)
-		r := int(p.Reg)
-		if p.To.Type == obj.TYPE_NONE {
-			rt = 0
-		}
-		if p.As == AMOVB || p.As == AMOVH || p.As == AMOVW || p.As == AMVN {
-			r = 0
-		} else if r == 0 {
-			r = rt
-		}
-		o1 |= (uint32(rf)&15)<<0 | (uint32(r)&15)<<16 | (uint32(rt)&15)<<12
-
-	case 2: /* movbu $I,[R],R */
-		aclass(ctxt, &p.From)
-
-		o1 = oprrr(ctxt, int(p.As), int(p.Scond))
-		o1 |= uint32(immrot(uint32(ctxt.Instoffset)))
-		rt := int(p.To.Reg)
-		r := int(p.Reg)
-		if p.To.Type == obj.TYPE_NONE {
-			rt = 0
-		}
-		if p.As == AMOVW || p.As == AMVN {
-			r = 0
-		} else if r == 0 {
-			r = rt
-		}
-		o1 |= (uint32(r)&15)<<16 | (uint32(rt)&15)<<12
-
-	case 3: /* add R<<[IR],[R],R */
-		o1 = mov(ctxt, p)
-
-	case 4: /* add $I,[R],R */
-		aclass(ctxt, &p.From)
-
-		o1 = oprrr(ctxt, AADD, int(p.Scond))
-		o1 |= uint32(immrot(uint32(ctxt.Instoffset)))
-		r := int(p.From.Reg)
-		if r == 0 {
-			r = int(o.param)
-		}
-		o1 |= (uint32(r) & 15) << 16
-		o1 |= (uint32(p.To.Reg) & 15) << 12
-
-	case 5: /* bra s */
-		o1 = opbra(ctxt, int(p.As), int(p.Scond))
-
-		v := int32(-8)
-		if p.To.Sym != nil {
-			rel := obj.Addrel(ctxt.Cursym)
-			rel.Off = int32(ctxt.Pc)
-			rel.Siz = 4
-			rel.Sym = p.To.Sym
-			v += int32(p.To.Offset)
-			rel.Add = int64(o1) | (int64(v)>>2)&0xffffff
-			rel.Type = obj.R_CALLARM
-			break
-		}
-
-		if p.Pcond != nil {
-			v = int32((p.Pcond.Pc - ctxt.Pc) - 8)
-		}
-		o1 |= (uint32(v) >> 2) & 0xffffff
-
-	case 6: /* b ,O(R) -> add $O,R,PC */
-		aclass(ctxt, &p.To)
-
-		o1 = oprrr(ctxt, AADD, int(p.Scond))
-		o1 |= uint32(immrot(uint32(ctxt.Instoffset)))
-		o1 |= (uint32(p.To.Reg) & 15) << 16
-		o1 |= (REGPC & 15) << 12
-
-	case 7: /* bl (R) -> blx R */
-		aclass(ctxt, &p.To)
-
-		if ctxt.Instoffset != 0 {
-			ctxt.Diag("%v: doesn't support BL offset(REG) where offset != 0", p)
-		}
-		o1 = oprrr(ctxt, ABL, int(p.Scond))
-		o1 |= (uint32(p.To.Reg) & 15) << 0
-		rel := obj.Addrel(ctxt.Cursym)
-		rel.Off = int32(ctxt.Pc)
-		rel.Siz = 0
-		rel.Type = obj.R_CALLIND
-
-	case 8: /* sll $c,[R],R -> mov (R<<$c),R */
-		aclass(ctxt, &p.From)
-
-		o1 = oprrr(ctxt, int(p.As), int(p.Scond))
-		r := int(p.Reg)
-		if r == 0 {
-			r = int(p.To.Reg)
-		}
-		o1 |= (uint32(r) & 15) << 0
-		o1 |= uint32((ctxt.Instoffset & 31) << 7)
-		o1 |= (uint32(p.To.Reg) & 15) << 12
-
-	case 9: /* sll R,[R],R -> mov (R<<R),R */
-		o1 = oprrr(ctxt, int(p.As), int(p.Scond))
-
-		r := int(p.Reg)
-		if r == 0 {
-			r = int(p.To.Reg)
-		}
-		o1 |= (uint32(r) & 15) << 0
-		o1 |= (uint32(p.From.Reg)&15)<<8 | 1<<4
-		o1 |= (uint32(p.To.Reg) & 15) << 12
-
-	case 10: /* swi [$con] */
-		o1 = oprrr(ctxt, int(p.As), int(p.Scond))
-
-		if p.To.Type != obj.TYPE_NONE {
-			aclass(ctxt, &p.To)
-			o1 |= uint32(ctxt.Instoffset & 0xffffff)
-		}
-
-	case 11: /* word */
-		aclass(ctxt, &p.To)
-
-		o1 = uint32(ctxt.Instoffset)
-		if p.To.Sym != nil {
-			// This case happens with words generated
-			// in the PC stream as part of the literal pool.
-			rel := obj.Addrel(ctxt.Cursym)
-
-			rel.Off = int32(ctxt.Pc)
-			rel.Siz = 4
-			rel.Sym = p.To.Sym
-			rel.Add = p.To.Offset
-
-			// runtime.tlsg is special.
-			// Its "address" is the offset from the TLS thread pointer
-			// to the thread-local g and m pointers.
-			// Emit a TLS relocation instead of a standard one if its
-			// type is not explicitly set by runtime. This assumes that
-			// all references to runtime.tlsg should be accompanied with
-			// its type declaration if necessary.
-			if rel.Sym == ctxt.Tlsg && ctxt.Tlsg.Type == 0 {
-				rel.Type = obj.R_TLS
-				if ctxt.Flag_shared != 0 {
-					rel.Add += ctxt.Pc - p.Rel.Pc - 8 - int64(rel.Siz)
-				}
-			} else if ctxt.Flag_shared != 0 {
-				rel.Type = obj.R_PCREL
-				rel.Add += ctxt.Pc - p.Rel.Pc - 8
-			} else {
-				rel.Type = obj.R_ADDR
-			}
-			o1 = 0
-		}
-
-	case 12: /* movw $lcon, reg */
-		o1 = omvl(ctxt, p, &p.From, int(p.To.Reg))
-
-		if o.flag&LPCREL != 0 {
-			o2 = oprrr(ctxt, AADD, int(p.Scond)) | (uint32(p.To.Reg)&15)<<0 | (REGPC&15)<<16 | (uint32(p.To.Reg)&15)<<12
-		}
-
-	case 13: /* op $lcon, [R], R */
-		o1 = omvl(ctxt, p, &p.From, REGTMP)
-
-		if o1 == 0 {
-			break
-		}
-		o2 = oprrr(ctxt, int(p.As), int(p.Scond))
-		o2 |= REGTMP & 15
-		r := int(p.Reg)
-		if p.As == AMOVW || p.As == AMVN {
-			r = 0
-		} else if r == 0 {
-			r = int(p.To.Reg)
-		}
-		o2 |= (uint32(r) & 15) << 16
-		if p.To.Type != obj.TYPE_NONE {
-			o2 |= (uint32(p.To.Reg) & 15) << 12
-		}
-
-	case 14: /* movb/movbu/movh/movhu R,R */
-		o1 = oprrr(ctxt, ASLL, int(p.Scond))
-
-		if p.As == AMOVBU || p.As == AMOVHU {
-			o2 = oprrr(ctxt, ASRL, int(p.Scond))
-		} else {
-			o2 = oprrr(ctxt, ASRA, int(p.Scond))
-		}
-
-		r := int(p.To.Reg)
-		o1 |= (uint32(p.From.Reg)&15)<<0 | (uint32(r)&15)<<12
-		o2 |= uint32(r)&15 | (uint32(r)&15)<<12
-		if p.As == AMOVB || p.As == AMOVBS || p.As == AMOVBU {
-			o1 |= 24 << 7
-			o2 |= 24 << 7
-		} else {
-			o1 |= 16 << 7
-			o2 |= 16 << 7
-		}
-
-	case 15: /* mul r,[r,]r */
-		o1 = oprrr(ctxt, int(p.As), int(p.Scond))
-
-		rf := int(p.From.Reg)
-		rt := int(p.To.Reg)
-		r := int(p.Reg)
-		if r == 0 {
-			r = rt
-		}
-		if rt == r {
-			r = rf
-			rf = rt
-		}
-
-		if false {
-			if rt == r || rf == REGPC&15 || r == REGPC&15 || rt == REGPC&15 {
-				ctxt.Diag("bad registers in MUL")
-				prasm(p)
-			}
-		}
-
-		o1 |= (uint32(rf)&15)<<8 | (uint32(r)&15)<<0 | (uint32(rt)&15)<<16
-
-	case 16: /* div r,[r,]r */
-		o1 = 0xf << 28
-
-		o2 = 0
-
-	case 17:
-		o1 = oprrr(ctxt, int(p.As), int(p.Scond))
-		rf := int(p.From.Reg)
-		rt := int(p.To.Reg)
-		rt2 := int(p.To.Offset)
-		r := int(p.Reg)
-		o1 |= (uint32(rf)&15)<<8 | (uint32(r)&15)<<0 | (uint32(rt)&15)<<16 | (uint32(rt2)&15)<<12
-
-	case 20: /* mov/movb/movbu R,O(R) */
-		aclass(ctxt, &p.To)
-
-		r := int(p.To.Reg)
-		if r == 0 {
-			r = int(o.param)
-		}
-		o1 = osr(ctxt, int(p.As), int(p.From.Reg), int32(ctxt.Instoffset), r, int(p.Scond))
-
-	case 21: /* mov/movbu O(R),R -> lr */
-		aclass(ctxt, &p.From)
-
-		r := int(p.From.Reg)
-		if r == 0 {
-			r = int(o.param)
-		}
-		o1 = olr(ctxt, int32(ctxt.Instoffset), r, int(p.To.Reg), int(p.Scond))
-		if p.As != AMOVW {
-			o1 |= 1 << 22
-		}
-
-	case 30: /* mov/movb/movbu R,L(R) */
-		o1 = omvl(ctxt, p, &p.To, REGTMP)
-
-		if o1 == 0 {
-			break
-		}
-		r := int(p.To.Reg)
-		if r == 0 {
-			r = int(o.param)
-		}
-		o2 = osrr(ctxt, int(p.From.Reg), REGTMP&15, r, int(p.Scond))
-		if p.As != AMOVW {
-			o2 |= 1 << 22
-		}
-
-	case 31: /* mov/movbu L(R),R -> lr[b] */
-		o1 = omvl(ctxt, p, &p.From, REGTMP)
-
-		if o1 == 0 {
-			break
-		}
-		r := int(p.From.Reg)
-		if r == 0 {
-			r = int(o.param)
-		}
-		o2 = olrr(ctxt, REGTMP&15, r, int(p.To.Reg), int(p.Scond))
-		if p.As == AMOVBU || p.As == AMOVBS || p.As == AMOVB {
-			o2 |= 1 << 22
-		}
-
-	case 34: /* mov $lacon,R */
-		o1 = omvl(ctxt, p, &p.From, REGTMP)
-
-		if o1 == 0 {
-			break
-		}
-
-		o2 = oprrr(ctxt, AADD, int(p.Scond))
-		o2 |= REGTMP & 15
-		r := int(p.From.Reg)
-		if r == 0 {
-			r = int(o.param)
-		}
-		o2 |= (uint32(r) & 15) << 16
-		if p.To.Type != obj.TYPE_NONE {
-			o2 |= (uint32(p.To.Reg) & 15) << 12
-		}
-
-	case 35: /* mov PSR,R */
-		o1 = 2<<23 | 0xf<<16 | 0<<0
-
-		o1 |= ((uint32(p.Scond) & C_SCOND) ^ C_SCOND_XOR) << 28
-		o1 |= (uint32(p.From.Reg) & 1) << 22
-		o1 |= (uint32(p.To.Reg) & 15) << 12
-
-	case 36: /* mov R,PSR */
-		o1 = 2<<23 | 0x29f<<12 | 0<<4
-
-		if p.Scond&C_FBIT != 0 {
-			o1 ^= 0x010 << 12
-		}
-		o1 |= ((uint32(p.Scond) & C_SCOND) ^ C_SCOND_XOR) << 28
-		o1 |= (uint32(p.To.Reg) & 1) << 22
-		o1 |= (uint32(p.From.Reg) & 15) << 0
-
-	case 37: /* mov $con,PSR */
-		aclass(ctxt, &p.From)
-
-		o1 = 2<<23 | 0x29f<<12 | 0<<4
-		if p.Scond&C_FBIT != 0 {
-			o1 ^= 0x010 << 12
-		}
-		o1 |= ((uint32(p.Scond) & C_SCOND) ^ C_SCOND_XOR) << 28
-		o1 |= uint32(immrot(uint32(ctxt.Instoffset)))
-		o1 |= (uint32(p.To.Reg) & 1) << 22
-		o1 |= (uint32(p.From.Reg) & 15) << 0
-
-	case 38, 39:
-		switch o.type_ {
-		case 38: /* movm $con,oreg -> stm */
-			o1 = 0x4 << 25
-
-			o1 |= uint32(p.From.Offset & 0xffff)
-			o1 |= (uint32(p.To.Reg) & 15) << 16
-			aclass(ctxt, &p.To)
-
-		case 39: /* movm oreg,$con -> ldm */
-			o1 = 0x4<<25 | 1<<20
-
-			o1 |= uint32(p.To.Offset & 0xffff)
-			o1 |= (uint32(p.From.Reg) & 15) << 16
-			aclass(ctxt, &p.From)
-		}
-
-		if ctxt.Instoffset != 0 {
-			ctxt.Diag("offset must be zero in MOVM; %v", p)
-		}
-		o1 |= ((uint32(p.Scond) & C_SCOND) ^ C_SCOND_XOR) << 28
-		if p.Scond&C_PBIT != 0 {
-			o1 |= 1 << 24
-		}
-		if p.Scond&C_UBIT != 0 {
-			o1 |= 1 << 23
-		}
-		if p.Scond&C_SBIT != 0 {
-			o1 |= 1 << 22
-		}
-		if p.Scond&C_WBIT != 0 {
-			o1 |= 1 << 21
-		}
-
-	case 40: /* swp oreg,reg,reg */
-		aclass(ctxt, &p.From)
-
-		if ctxt.Instoffset != 0 {
-			ctxt.Diag("offset must be zero in SWP")
-		}
-		o1 = 0x2<<23 | 0x9<<4
-		if p.As != ASWPW {
-			o1 |= 1 << 22
-		}
-		o1 |= (uint32(p.From.Reg) & 15) << 16
-		o1 |= (uint32(p.Reg) & 15) << 0
-		o1 |= (uint32(p.To.Reg) & 15) << 12
-		o1 |= ((uint32(p.Scond) & C_SCOND) ^ C_SCOND_XOR) << 28
-
-	case 41: /* rfe -> movm.s.w.u 0(r13),[r15] */
-		o1 = 0xe8fd8000
-
-	case 50: /* floating point store */
-		v := regoff(ctxt, &p.To)
-
-		r := int(p.To.Reg)
-		if r == 0 {
-			r = int(o.param)
-		}
-		o1 = ofsr(ctxt, int(p.As), int(p.From.Reg), v, r, int(p.Scond), p)
-
-	case 51: /* floating point load */
-		v := regoff(ctxt, &p.From)
-
-		r := int(p.From.Reg)
-		if r == 0 {
-			r = int(o.param)
-		}
-		o1 = ofsr(ctxt, int(p.As), int(p.To.Reg), v, r, int(p.Scond), p) | 1<<20
-
-	case 52: /* floating point store, int32 offset UGLY */
-		o1 = omvl(ctxt, p, &p.To, REGTMP)
-
-		if o1 == 0 {
-			break
-		}
-		r := int(p.To.Reg)
-		if r == 0 {
-			r = int(o.param)
-		}
-		o2 = oprrr(ctxt, AADD, int(p.Scond)) | (REGTMP&15)<<12 | (REGTMP&15)<<16 | (uint32(r)&15)<<0
-		o3 = ofsr(ctxt, int(p.As), int(p.From.Reg), 0, REGTMP, int(p.Scond), p)
-
-	case 53: /* floating point load, int32 offset UGLY */
-		o1 = omvl(ctxt, p, &p.From, REGTMP)
-
-		if o1 == 0 {
-			break
-		}
-		r := int(p.From.Reg)
-		if r == 0 {
-			r = int(o.param)
-		}
-		o2 = oprrr(ctxt, AADD, int(p.Scond)) | (REGTMP&15)<<12 | (REGTMP&15)<<16 | (uint32(r)&15)<<0
-		o3 = ofsr(ctxt, int(p.As), int(p.To.Reg), 0, (REGTMP&15), int(p.Scond), p) | 1<<20
-
-	case 54: /* floating point arith */
-		o1 = oprrr(ctxt, int(p.As), int(p.Scond))
-
-		rf := int(p.From.Reg)
-		rt := int(p.To.Reg)
-		r := int(p.Reg)
-		if r == 0 {
-			r = rt
-			if p.As == AMOVF || p.As == AMOVD || p.As == AMOVFD || p.As == AMOVDF || p.As == ASQRTF || p.As == ASQRTD || p.As == AABSF || p.As == AABSD {
-				r = 0
-			}
-		}
-
-		o1 |= (uint32(rf)&15)<<0 | (uint32(r)&15)<<16 | (uint32(rt)&15)<<12
-
-	case 56: /* move to FP[CS]R */
-		o1 = ((uint32(p.Scond)&C_SCOND)^C_SCOND_XOR)<<28 | 0xe<<24 | 1<<8 | 1<<4
-
-		o1 |= ((uint32(p.To.Reg)&1)+1)<<21 | (uint32(p.From.Reg)&15)<<12
-
-	case 57: /* move from FP[CS]R */
-		o1 = ((uint32(p.Scond)&C_SCOND)^C_SCOND_XOR)<<28 | 0xe<<24 | 1<<8 | 1<<4
-
-		o1 |= ((uint32(p.From.Reg)&1)+1)<<21 | (uint32(p.To.Reg)&15)<<12 | 1<<20
-
-	case 58: /* movbu R,R */
-		o1 = oprrr(ctxt, AAND, int(p.Scond))
-
-		o1 |= uint32(immrot(0xff))
-		rt := int(p.To.Reg)
-		r := int(p.From.Reg)
-		if p.To.Type == obj.TYPE_NONE {
-			rt = 0
-		}
-		if r == 0 {
-			r = rt
-		}
-		o1 |= (uint32(r)&15)<<16 | (uint32(rt)&15)<<12
-
-	case 59: /* movw/bu R<<I(R),R -> ldr indexed */
-		if p.From.Reg == 0 {
-			if p.As != AMOVW {
-				ctxt.Diag("byte MOV from shifter operand")
-			}
-			o1 = mov(ctxt, p)
-			break
-		}
-
-		if p.From.Offset&(1<<4) != 0 {
-			ctxt.Diag("bad shift in LDR")
-		}
-		o1 = olrr(ctxt, int(p.From.Offset), int(p.From.Reg), int(p.To.Reg), int(p.Scond))
-		if p.As == AMOVBU {
-			o1 |= 1 << 22
-		}
-
-	case 60: /* movb R(R),R -> ldrsb indexed */
-		if p.From.Reg == 0 {
-			ctxt.Diag("byte MOV from shifter operand")
-			o1 = mov(ctxt, p)
-			break
-		}
-
-		if p.From.Offset&(^0xf) != 0 {
-			ctxt.Diag("bad shift in LDRSB")
-		}
-		o1 = olhrr(ctxt, int(p.From.Offset), int(p.From.Reg), int(p.To.Reg), int(p.Scond))
-		o1 ^= 1<<5 | 1<<6
-
-	case 61: /* movw/b/bu R,R<<[IR](R) -> str indexed */
-		if p.To.Reg == 0 {
-			ctxt.Diag("MOV to shifter operand")
-		}
-		o1 = osrr(ctxt, int(p.From.Reg), int(p.To.Offset), int(p.To.Reg), int(p.Scond))
-		if p.As == AMOVB || p.As == AMOVBS || p.As == AMOVBU {
-			o1 |= 1 << 22
-		}
-
-	case 62: /* case R -> movw	R<<2(PC),PC */
-		if o.flag&LPCREL != 0 {
-			o1 = oprrr(ctxt, AADD, int(p.Scond)) | uint32(immrot(1)) | (uint32(p.From.Reg)&15)<<16 | (REGTMP&15)<<12
-			o2 = olrr(ctxt, REGTMP&15, REGPC, REGTMP, int(p.Scond))
-			o2 |= 2 << 7
-			o3 = oprrr(ctxt, AADD, int(p.Scond)) | REGTMP&15 | (REGPC&15)<<16 | (REGPC&15)<<12
-		} else {
-			o1 = olrr(ctxt, int(p.From.Reg)&15, REGPC, REGPC, int(p.Scond))
-			o1 |= 2 << 7
-		}
-
-	case 63: /* bcase */
-		if p.Pcond != nil {
-			rel := obj.Addrel(ctxt.Cursym)
-			rel.Off = int32(ctxt.Pc)
-			rel.Siz = 4
-			if p.To.Sym != nil && p.To.Sym.Type != 0 {
-				rel.Sym = p.To.Sym
-				rel.Add = p.To.Offset
-			} else {
-				rel.Sym = ctxt.Cursym
-				rel.Add = p.Pcond.Pc
-			}
-
-			if o.flag&LPCREL != 0 {
-				rel.Type = obj.R_PCREL
-				rel.Add += ctxt.Pc - p.Rel.Pc - 16 + int64(rel.Siz)
-			} else {
-				rel.Type = obj.R_ADDR
-			}
-			o1 = 0
-		}
-
-		/* reloc ops */
-	case 64: /* mov/movb/movbu R,addr */
-		o1 = omvl(ctxt, p, &p.To, REGTMP)
-
-		if o1 == 0 {
-			break
-		}
-		o2 = osr(ctxt, int(p.As), int(p.From.Reg), 0, REGTMP, int(p.Scond))
-		if o.flag&LPCREL != 0 {
-			o3 = o2
-			o2 = oprrr(ctxt, AADD, int(p.Scond)) | REGTMP&15 | (REGPC&15)<<16 | (REGTMP&15)<<12
-		}
-
-	case 65: /* mov/movbu addr,R */
-		o1 = omvl(ctxt, p, &p.From, REGTMP)
-
-		if o1 == 0 {
-			break
-		}
-		o2 = olr(ctxt, 0, REGTMP, int(p.To.Reg), int(p.Scond))
-		if p.As == AMOVBU || p.As == AMOVBS || p.As == AMOVB {
-			o2 |= 1 << 22
-		}
-		if o.flag&LPCREL != 0 {
-			o3 = o2
-			o2 = oprrr(ctxt, AADD, int(p.Scond)) | REGTMP&15 | (REGPC&15)<<16 | (REGTMP&15)<<12
-		}
-
-	case 68: /* floating point store -> ADDR */
-		o1 = omvl(ctxt, p, &p.To, REGTMP)
-
-		if o1 == 0 {
-			break
-		}
-		o2 = ofsr(ctxt, int(p.As), int(p.From.Reg), 0, REGTMP, int(p.Scond), p)
-		if o.flag&LPCREL != 0 {
-			o3 = o2
-			o2 = oprrr(ctxt, AADD, int(p.Scond)) | REGTMP&15 | (REGPC&15)<<16 | (REGTMP&15)<<12
-		}
-
-	case 69: /* floating point load <- ADDR */
-		o1 = omvl(ctxt, p, &p.From, REGTMP)
-
-		if o1 == 0 {
-			break
-		}
-		o2 = ofsr(ctxt, int(p.As), int(p.To.Reg), 0, (REGTMP&15), int(p.Scond), p) | 1<<20
-		if o.flag&LPCREL != 0 {
-			o3 = o2
-			o2 = oprrr(ctxt, AADD, int(p.Scond)) | REGTMP&15 | (REGPC&15)<<16 | (REGTMP&15)<<12
-		}
-
-		/* ArmV4 ops: */
-	case 70: /* movh/movhu R,O(R) -> strh */
-		aclass(ctxt, &p.To)
-
-		r := int(p.To.Reg)
-		if r == 0 {
-			r = int(o.param)
-		}
-		o1 = oshr(ctxt, int(p.From.Reg), int32(ctxt.Instoffset), r, int(p.Scond))
-
-	case 71: /* movb/movh/movhu O(R),R -> ldrsb/ldrsh/ldrh */
-		aclass(ctxt, &p.From)
-
-		r := int(p.From.Reg)
-		if r == 0 {
-			r = int(o.param)
-		}
-		o1 = olhr(ctxt, int32(ctxt.Instoffset), r, int(p.To.Reg), int(p.Scond))
-		if p.As == AMOVB || p.As == AMOVBS {
-			o1 ^= 1<<5 | 1<<6
-		} else if p.As == AMOVH || p.As == AMOVHS {
-			o1 ^= (1 << 6)
-		}
-
-	case 72: /* movh/movhu R,L(R) -> strh */
-		o1 = omvl(ctxt, p, &p.To, REGTMP)
-
-		if o1 == 0 {
-			break
-		}
-		r := int(p.To.Reg)
-		if r == 0 {
-			r = int(o.param)
-		}
-		o2 = oshrr(ctxt, int(p.From.Reg), REGTMP&15, r, int(p.Scond))
-
-	case 73: /* movb/movh/movhu L(R),R -> ldrsb/ldrsh/ldrh */
-		o1 = omvl(ctxt, p, &p.From, REGTMP)
-
-		if o1 == 0 {
-			break
-		}
-		r := int(p.From.Reg)
-		if r == 0 {
-			r = int(o.param)
-		}
-		o2 = olhrr(ctxt, REGTMP&15, r, int(p.To.Reg), int(p.Scond))
-		if p.As == AMOVB || p.As == AMOVBS {
-			o2 ^= 1<<5 | 1<<6
-		} else if p.As == AMOVH || p.As == AMOVHS {
-			o2 ^= (1 << 6)
-		}
-
-	case 74: /* bx $I */
-		ctxt.Diag("ABX $I")
-
-	case 75: /* bx O(R) */
-		aclass(ctxt, &p.To)
-
-		if ctxt.Instoffset != 0 {
-			ctxt.Diag("non-zero offset in ABX")
-		}
-
-		/*
-			o1 = 	oprrr(ctxt, AADD, p->scond) | immrot(0) | ((REGPC&15)<<16) | ((REGLINK&15)<<12);	// mov PC, LR
-			o2 = (((p->scond&C_SCOND) ^ C_SCOND_XOR)<<28) | (0x12fff<<8) | (1<<4) | ((p->to.reg&15) << 0);		// BX R
-		*/
-		// p->to.reg may be REGLINK
-		o1 = oprrr(ctxt, AADD, int(p.Scond))
-
-		o1 |= uint32(immrot(uint32(ctxt.Instoffset)))
-		o1 |= (uint32(p.To.Reg) & 15) << 16
-		o1 |= (REGTMP & 15) << 12
-		o2 = oprrr(ctxt, AADD, int(p.Scond)) | uint32(immrot(0)) | (REGPC&15)<<16 | (REGLINK&15)<<12 // mov PC, LR
-		o3 = ((uint32(p.Scond)&C_SCOND)^C_SCOND_XOR)<<28 | 0x12fff<<8 | 1<<4 | REGTMP&15             // BX Rtmp
-
-	case 76: /* bx O(R) when returning from fn*/
-		ctxt.Diag("ABXRET")
-
-	case 77: /* ldrex oreg,reg */
-		aclass(ctxt, &p.From)
-
-		if ctxt.Instoffset != 0 {
-			ctxt.Diag("offset must be zero in LDREX")
-		}
-		o1 = 0x19<<20 | 0xf9f
-		o1 |= (uint32(p.From.Reg) & 15) << 16
-		o1 |= (uint32(p.To.Reg) & 15) << 12
-		o1 |= ((uint32(p.Scond) & C_SCOND) ^ C_SCOND_XOR) << 28
-
-	case 78: /* strex reg,oreg,reg */
-		aclass(ctxt, &p.From)
-
-		if ctxt.Instoffset != 0 {
-			ctxt.Diag("offset must be zero in STREX")
-		}
-		o1 = 0x18<<20 | 0xf90
-		o1 |= (uint32(p.From.Reg) & 15) << 16
-		o1 |= (uint32(p.Reg) & 15) << 0
-		o1 |= (uint32(p.To.Reg) & 15) << 12
-		o1 |= ((uint32(p.Scond) & C_SCOND) ^ C_SCOND_XOR) << 28
-
-	case 80: /* fmov zfcon,freg */
-		if p.As == AMOVD {
-			o1 = 0xeeb00b00 // VMOV imm 64
-			o2 = oprrr(ctxt, ASUBD, int(p.Scond))
-		} else {
-			o1 = 0x0eb00a00 // VMOV imm 32
-			o2 = oprrr(ctxt, ASUBF, int(p.Scond))
-		}
-
-		v := int32(0x70) // 1.0
-		r := (int(p.To.Reg) & 15) << 0
-
-		// movf $1.0, r
-		o1 |= ((uint32(p.Scond) & C_SCOND) ^ C_SCOND_XOR) << 28
-
-		o1 |= (uint32(r) & 15) << 12
-		o1 |= (uint32(v) & 0xf) << 0
-		o1 |= (uint32(v) & 0xf0) << 12
-
-		// subf r,r,r
-		o2 |= (uint32(r)&15)<<0 | (uint32(r)&15)<<16 | (uint32(r)&15)<<12
-
-	case 81: /* fmov sfcon,freg */
-		o1 = 0x0eb00a00 // VMOV imm 32
-		if p.As == AMOVD {
-			o1 = 0xeeb00b00 // VMOV imm 64
-		}
-		o1 |= ((uint32(p.Scond) & C_SCOND) ^ C_SCOND_XOR) << 28
-		o1 |= (uint32(p.To.Reg) & 15) << 12
-		v := int32(chipfloat5(ctxt, p.From.Val.(float64)))
-		o1 |= (uint32(v) & 0xf) << 0
-		o1 |= (uint32(v) & 0xf0) << 12
-
-	case 82: /* fcmp freg,freg, */
-		o1 = oprrr(ctxt, int(p.As), int(p.Scond))
-
-		o1 |= (uint32(p.Reg)&15)<<12 | (uint32(p.From.Reg)&15)<<0
-		o2 = 0x0ef1fa10 // VMRS R15
-		o2 |= ((uint32(p.Scond) & C_SCOND) ^ C_SCOND_XOR) << 28
-
-	case 83: /* fcmp freg,, */
-		o1 = oprrr(ctxt, int(p.As), int(p.Scond))
-
-		o1 |= (uint32(p.From.Reg)&15)<<12 | 1<<16
-		o2 = 0x0ef1fa10 // VMRS R15
-		o2 |= ((uint32(p.Scond) & C_SCOND) ^ C_SCOND_XOR) << 28
-
-	case 84: /* movfw freg,freg - truncate float-to-fix */
-		o1 = oprrr(ctxt, int(p.As), int(p.Scond))
-
-		o1 |= (uint32(p.From.Reg) & 15) << 0
-		o1 |= (uint32(p.To.Reg) & 15) << 12
-
-	case 85: /* movwf freg,freg - fix-to-float */
-		o1 = oprrr(ctxt, int(p.As), int(p.Scond))
-
-		o1 |= (uint32(p.From.Reg) & 15) << 0
-		o1 |= (uint32(p.To.Reg) & 15) << 12
-
-		// macro for movfw freg,FTMP; movw FTMP,reg
-	case 86: /* movfw freg,reg - truncate float-to-fix */
-		o1 = oprrr(ctxt, int(p.As), int(p.Scond))
-
-		o1 |= (uint32(p.From.Reg) & 15) << 0
-		o1 |= (FREGTMP & 15) << 12
-		o2 = oprrr(ctxt, AMOVFW+ALAST, int(p.Scond))
-		o2 |= (FREGTMP & 15) << 16
-		o2 |= (uint32(p.To.Reg) & 15) << 12
-
-		// macro for movw reg,FTMP; movwf FTMP,freg
-	case 87: /* movwf reg,freg - fix-to-float */
-		o1 = oprrr(ctxt, AMOVWF+ALAST, int(p.Scond))
-
-		o1 |= (uint32(p.From.Reg) & 15) << 12
-		o1 |= (FREGTMP & 15) << 16
-		o2 = oprrr(ctxt, int(p.As), int(p.Scond))
-		o2 |= (FREGTMP & 15) << 0
-		o2 |= (uint32(p.To.Reg) & 15) << 12
-
-	case 88: /* movw reg,freg  */
-		o1 = oprrr(ctxt, AMOVWF+ALAST, int(p.Scond))
-
-		o1 |= (uint32(p.From.Reg) & 15) << 12
-		o1 |= (uint32(p.To.Reg) & 15) << 16
-
-	case 89: /* movw freg,reg  */
-		o1 = oprrr(ctxt, AMOVFW+ALAST, int(p.Scond))
-
-		o1 |= (uint32(p.From.Reg) & 15) << 16
-		o1 |= (uint32(p.To.Reg) & 15) << 12
-
-	case 90: /* tst reg  */
-		o1 = oprrr(ctxt, ACMP+ALAST, int(p.Scond))
-
-		o1 |= (uint32(p.From.Reg) & 15) << 16
-
-	case 91: /* ldrexd oreg,reg */
-		aclass(ctxt, &p.From)
-
-		if ctxt.Instoffset != 0 {
-			ctxt.Diag("offset must be zero in LDREX")
-		}
-		o1 = 0x1b<<20 | 0xf9f
-		o1 |= (uint32(p.From.Reg) & 15) << 16
-		o1 |= (uint32(p.To.Reg) & 15) << 12
-		o1 |= ((uint32(p.Scond) & C_SCOND) ^ C_SCOND_XOR) << 28
-
-	case 92: /* strexd reg,oreg,reg */
-		aclass(ctxt, &p.From)
-
-		if ctxt.Instoffset != 0 {
-			ctxt.Diag("offset must be zero in STREX")
-		}
-		o1 = 0x1a<<20 | 0xf90
-		o1 |= (uint32(p.From.Reg) & 15) << 16
-		o1 |= (uint32(p.Reg) & 15) << 0
-		o1 |= (uint32(p.To.Reg) & 15) << 12
-		o1 |= ((uint32(p.Scond) & C_SCOND) ^ C_SCOND_XOR) << 28
-
-	case 93: /* movb/movh/movhu addr,R -> ldrsb/ldrsh/ldrh */
-		o1 = omvl(ctxt, p, &p.From, REGTMP)
-
-		if o1 == 0 {
-			break
-		}
-		o2 = olhr(ctxt, 0, REGTMP, int(p.To.Reg), int(p.Scond))
-		if p.As == AMOVB || p.As == AMOVBS {
-			o2 ^= 1<<5 | 1<<6
-		} else if p.As == AMOVH || p.As == AMOVHS {
-			o2 ^= (1 << 6)
-		}
-		if o.flag&LPCREL != 0 {
-			o3 = o2
-			o2 = oprrr(ctxt, AADD, int(p.Scond)) | REGTMP&15 | (REGPC&15)<<16 | (REGTMP&15)<<12
-		}
-
-	case 94: /* movh/movhu R,addr -> strh */
-		o1 = omvl(ctxt, p, &p.To, REGTMP)
-
-		if o1 == 0 {
-			break
-		}
-		o2 = oshr(ctxt, int(p.From.Reg), 0, REGTMP, int(p.Scond))
-		if o.flag&LPCREL != 0 {
-			o3 = o2
-			o2 = oprrr(ctxt, AADD, int(p.Scond)) | REGTMP&15 | (REGPC&15)<<16 | (REGTMP&15)<<12
-		}
-
-	case 95: /* PLD off(reg) */
-		o1 = 0xf5d0f000
-
-		o1 |= (uint32(p.From.Reg) & 15) << 16
-		if p.From.Offset < 0 {
-			o1 &^= (1 << 23)
-			o1 |= uint32((-p.From.Offset) & 0xfff)
-		} else {
-			o1 |= uint32(p.From.Offset & 0xfff)
-		}
-
-		// This is supposed to be something that stops execution.
-	// It's not supposed to be reached, ever, but if it is, we'd
-	// like to be able to tell how we got there.  Assemble as
-	// 0xf7fabcfd which is guaranteed to raise undefined instruction
-	// exception.
-	case 96: /* UNDEF */
-		o1 = 0xf7fabcfd
-
-	case 97: /* CLZ Rm, Rd */
-		o1 = oprrr(ctxt, int(p.As), int(p.Scond))
-
-		o1 |= (uint32(p.To.Reg) & 15) << 12
-		o1 |= (uint32(p.From.Reg) & 15) << 0
-
-	case 98: /* MULW{T,B} Rs, Rm, Rd */
-		o1 = oprrr(ctxt, int(p.As), int(p.Scond))
-
-		o1 |= (uint32(p.To.Reg) & 15) << 16
-		o1 |= (uint32(p.From.Reg) & 15) << 8
-		o1 |= (uint32(p.Reg) & 15) << 0
-
-	case 99: /* MULAW{T,B} Rs, Rm, Rn, Rd */
-		o1 = oprrr(ctxt, int(p.As), int(p.Scond))
-
-		o1 |= (uint32(p.To.Reg) & 15) << 12
-		o1 |= (uint32(p.From.Reg) & 15) << 8
-		o1 |= (uint32(p.Reg) & 15) << 0
-		o1 |= uint32((p.To.Offset & 15) << 16)
-
-		// DATABUNDLE: BKPT $0x5be0, signify the start of NaCl data bundle;
-	// DATABUNDLEEND: zero width alignment marker
-	case 100:
-		if p.As == ADATABUNDLE {
-			o1 = 0xe125be70
-		}
-	}
-
-	out[0] = o1
-	out[1] = o2
-	out[2] = o3
-	out[3] = o4
-	out[4] = o5
-	out[5] = o6
-	return
-}
-
-func mov(ctxt *obj.Link, p *obj.Prog) uint32 {
-	aclass(ctxt, &p.From)
-	o1 := oprrr(ctxt, int(p.As), int(p.Scond))
-	o1 |= uint32(p.From.Offset)
-	rt := int(p.To.Reg)
-	if p.To.Type == obj.TYPE_NONE {
-		rt = 0
-	}
-	r := int(p.Reg)
-	if p.As == AMOVW || p.As == AMVN {
-		r = 0
-	} else if r == 0 {
-		r = rt
-	}
-	o1 |= (uint32(r)&15)<<16 | (uint32(rt)&15)<<12
-	return o1
-}
-
-func oprrr(ctxt *obj.Link, a int, sc int) uint32 {
-	o := ((uint32(sc) & C_SCOND) ^ C_SCOND_XOR) << 28
-	if sc&C_SBIT != 0 {
-		o |= 1 << 20
-	}
-	if sc&(C_PBIT|C_WBIT) != 0 {
-		ctxt.Diag(".nil/.W on dp instruction")
-	}
-	switch a {
-	case AMULU, AMUL:
-		return o | 0x0<<21 | 0x9<<4
-	case AMULA:
-		return o | 0x1<<21 | 0x9<<4
-	case AMULLU:
-		return o | 0x4<<21 | 0x9<<4
-	case AMULL:
-		return o | 0x6<<21 | 0x9<<4
-	case AMULALU:
-		return o | 0x5<<21 | 0x9<<4
-	case AMULAL:
-		return o | 0x7<<21 | 0x9<<4
-	case AAND:
-		return o | 0x0<<21
-	case AEOR:
-		return o | 0x1<<21
-	case ASUB:
-		return o | 0x2<<21
-	case ARSB:
-		return o | 0x3<<21
-	case AADD:
-		return o | 0x4<<21
-	case AADC:
-		return o | 0x5<<21
-	case ASBC:
-		return o | 0x6<<21
-	case ARSC:
-		return o | 0x7<<21
-	case ATST:
-		return o | 0x8<<21 | 1<<20
-	case ATEQ:
-		return o | 0x9<<21 | 1<<20
-	case ACMP:
-		return o | 0xa<<21 | 1<<20
-	case ACMN:
-		return o | 0xb<<21 | 1<<20
-	case AORR:
-		return o | 0xc<<21
-
-	case AMOVB, AMOVH, AMOVW:
-		return o | 0xd<<21
-	case ABIC:
-		return o | 0xe<<21
-	case AMVN:
-		return o | 0xf<<21
-	case ASLL:
-		return o | 0xd<<21 | 0<<5
-	case ASRL:
-		return o | 0xd<<21 | 1<<5
-	case ASRA:
-		return o | 0xd<<21 | 2<<5
-	case ASWI:
-		return o | 0xf<<24
-
-	case AADDD:
-		return o | 0xe<<24 | 0x3<<20 | 0xb<<8 | 0<<4
-	case AADDF:
-		return o | 0xe<<24 | 0x3<<20 | 0xa<<8 | 0<<4
-	case ASUBD:
-		return o | 0xe<<24 | 0x3<<20 | 0xb<<8 | 4<<4
-	case ASUBF:
-		return o | 0xe<<24 | 0x3<<20 | 0xa<<8 | 4<<4
-	case AMULD:
-		return o | 0xe<<24 | 0x2<<20 | 0xb<<8 | 0<<4
-	case AMULF:
-		return o | 0xe<<24 | 0x2<<20 | 0xa<<8 | 0<<4
-	case ADIVD:
-		return o | 0xe<<24 | 0x8<<20 | 0xb<<8 | 0<<4
-	case ADIVF:
-		return o | 0xe<<24 | 0x8<<20 | 0xa<<8 | 0<<4
-	case ASQRTD:
-		return o | 0xe<<24 | 0xb<<20 | 1<<16 | 0xb<<8 | 0xc<<4
-	case ASQRTF:
-		return o | 0xe<<24 | 0xb<<20 | 1<<16 | 0xa<<8 | 0xc<<4
-	case AABSD:
-		return o | 0xe<<24 | 0xb<<20 | 0<<16 | 0xb<<8 | 0xc<<4
-	case AABSF:
-		return o | 0xe<<24 | 0xb<<20 | 0<<16 | 0xa<<8 | 0xc<<4
-	case ACMPD:
-		return o | 0xe<<24 | 0xb<<20 | 4<<16 | 0xb<<8 | 0xc<<4
-	case ACMPF:
-		return o | 0xe<<24 | 0xb<<20 | 4<<16 | 0xa<<8 | 0xc<<4
-
-	case AMOVF:
-		return o | 0xe<<24 | 0xb<<20 | 0<<16 | 0xa<<8 | 4<<4
-	case AMOVD:
-		return o | 0xe<<24 | 0xb<<20 | 0<<16 | 0xb<<8 | 4<<4
-
-	case AMOVDF:
-		return o | 0xe<<24 | 0xb<<20 | 7<<16 | 0xa<<8 | 0xc<<4 | 1<<8 // dtof
-	case AMOVFD:
-		return o | 0xe<<24 | 0xb<<20 | 7<<16 | 0xa<<8 | 0xc<<4 | 0<<8 // dtof
-
-	case AMOVWF:
-		if sc&C_UBIT == 0 {
-			o |= 1 << 7 /* signed */
-		}
-		return o | 0xe<<24 | 0xb<<20 | 8<<16 | 0xa<<8 | 4<<4 | 0<<18 | 0<<8 // toint, double
-
-	case AMOVWD:
-		if sc&C_UBIT == 0 {
-			o |= 1 << 7 /* signed */
-		}
-		return o | 0xe<<24 | 0xb<<20 | 8<<16 | 0xa<<8 | 4<<4 | 0<<18 | 1<<8 // toint, double
-
-	case AMOVFW:
-		if sc&C_UBIT == 0 {
-			o |= 1 << 16 /* signed */
-		}
-		return o | 0xe<<24 | 0xb<<20 | 8<<16 | 0xa<<8 | 4<<4 | 1<<18 | 0<<8 | 1<<7 // toint, double, trunc
-
-	case AMOVDW:
-		if sc&C_UBIT == 0 {
-			o |= 1 << 16 /* signed */
-		}
-		return o | 0xe<<24 | 0xb<<20 | 8<<16 | 0xa<<8 | 4<<4 | 1<<18 | 1<<8 | 1<<7 // toint, double, trunc
-
-	case AMOVWF + ALAST: // copy WtoF
-		return o | 0xe<<24 | 0x0<<20 | 0xb<<8 | 1<<4
-
-	case AMOVFW + ALAST: // copy FtoW
-		return o | 0xe<<24 | 0x1<<20 | 0xb<<8 | 1<<4
-
-	case ACMP + ALAST: // cmp imm
-		return o | 0x3<<24 | 0x5<<20
-
-		// CLZ doesn't support .nil
-	case ACLZ:
-		return o&(0xf<<28) | 0x16f<<16 | 0xf1<<4
-
-	case AMULWT:
-		return o&(0xf<<28) | 0x12<<20 | 0xe<<4
-
-	case AMULWB:
-		return o&(0xf<<28) | 0x12<<20 | 0xa<<4
-
-	case AMULAWT:
-		return o&(0xf<<28) | 0x12<<20 | 0xc<<4
-
-	case AMULAWB:
-		return o&(0xf<<28) | 0x12<<20 | 0x8<<4
-
-	case ABL: // BLX REG
-		return o&(0xf<<28) | 0x12fff3<<4
-	}
-
-	ctxt.Diag("bad rrr %d", a)
-	prasm(ctxt.Curp)
-	return 0
-}
-
-func opbra(ctxt *obj.Link, a int, sc int) uint32 {
-	if sc&(C_SBIT|C_PBIT|C_WBIT) != 0 {
-		ctxt.Diag(".nil/.nil/.W on bra instruction")
-	}
-	sc &= C_SCOND
-	sc ^= C_SCOND_XOR
-	if a == ABL || a == obj.ADUFFZERO || a == obj.ADUFFCOPY {
-		return uint32(sc)<<28 | 0x5<<25 | 0x1<<24
-	}
-	if sc != 0xe {
-		ctxt.Diag(".COND on bcond instruction")
-	}
-	switch a {
-	case ABEQ:
-		return 0x0<<28 | 0x5<<25
-	case ABNE:
-		return 0x1<<28 | 0x5<<25
-	case ABCS:
-		return 0x2<<28 | 0x5<<25
-	case ABHS:
-		return 0x2<<28 | 0x5<<25
-	case ABCC:
-		return 0x3<<28 | 0x5<<25
-	case ABLO:
-		return 0x3<<28 | 0x5<<25
-	case ABMI:
-		return 0x4<<28 | 0x5<<25
-	case ABPL:
-		return 0x5<<28 | 0x5<<25
-	case ABVS:
-		return 0x6<<28 | 0x5<<25
-	case ABVC:
-		return 0x7<<28 | 0x5<<25
-	case ABHI:
-		return 0x8<<28 | 0x5<<25
-	case ABLS:
-		return 0x9<<28 | 0x5<<25
-	case ABGE:
-		return 0xa<<28 | 0x5<<25
-	case ABLT:
-		return 0xb<<28 | 0x5<<25
-	case ABGT:
-		return 0xc<<28 | 0x5<<25
-	case ABLE:
-		return 0xd<<28 | 0x5<<25
-	case AB:
-		return 0xe<<28 | 0x5<<25
-	}
-
-	ctxt.Diag("bad bra %v", obj.Aconv(a))
-	prasm(ctxt.Curp)
-	return 0
-}
-
-func olr(ctxt *obj.Link, v int32, b int, r int, sc int) uint32 {
-	if sc&C_SBIT != 0 {
-		ctxt.Diag(".nil on LDR/STR instruction")
-	}
-	o := ((uint32(sc) & C_SCOND) ^ C_SCOND_XOR) << 28
-	if sc&C_PBIT == 0 {
-		o |= 1 << 24
-	}
-	if sc&C_UBIT == 0 {
-		o |= 1 << 23
-	}
-	if sc&C_WBIT != 0 {
-		o |= 1 << 21
-	}
-	o |= 1<<26 | 1<<20
-	if v < 0 {
-		if sc&C_UBIT != 0 {
-			ctxt.Diag(".U on neg offset")
-		}
-		v = -v
-		o ^= 1 << 23
-	}
-
-	if v >= 1<<12 || v < 0 {
-		ctxt.Diag("literal span too large: %d (R%d)\n%v", v, b, ctxt.Printp)
-	}
-	o |= uint32(v)
-	o |= (uint32(b) & 15) << 16
-	o |= (uint32(r) & 15) << 12
-	return o
-}
-
-func olhr(ctxt *obj.Link, v int32, b int, r int, sc int) uint32 {
-	if sc&C_SBIT != 0 {
-		ctxt.Diag(".nil on LDRH/STRH instruction")
-	}
-	o := ((uint32(sc) & C_SCOND) ^ C_SCOND_XOR) << 28
-	if sc&C_PBIT == 0 {
-		o |= 1 << 24
-	}
-	if sc&C_WBIT != 0 {
-		o |= 1 << 21
-	}
-	o |= 1<<23 | 1<<20 | 0xb<<4
-	if v < 0 {
-		v = -v
-		o ^= 1 << 23
-	}
-
-	if v >= 1<<8 || v < 0 {
-		ctxt.Diag("literal span too large: %d (R%d)\n%v", v, b, ctxt.Printp)
-	}
-	o |= uint32(v)&0xf | (uint32(v)>>4)<<8 | 1<<22
-	o |= (uint32(b) & 15) << 16
-	o |= (uint32(r) & 15) << 12
-	return o
-}
-
-func osr(ctxt *obj.Link, a int, r int, v int32, b int, sc int) uint32 {
-	o := olr(ctxt, v, b, r, sc) ^ (1 << 20)
-	if a != AMOVW {
-		o |= 1 << 22
-	}
-	return o
-}
-
-func oshr(ctxt *obj.Link, r int, v int32, b int, sc int) uint32 {
-	o := olhr(ctxt, v, b, r, sc) ^ (1 << 20)
-	return o
-}
-
-func osrr(ctxt *obj.Link, r int, i int, b int, sc int) uint32 {
-	return olr(ctxt, int32(i), b, r, sc) ^ (1<<25 | 1<<20)
-}
-
-func oshrr(ctxt *obj.Link, r int, i int, b int, sc int) uint32 {
-	return olhr(ctxt, int32(i), b, r, sc) ^ (1<<22 | 1<<20)
-}
-
-func olrr(ctxt *obj.Link, i int, b int, r int, sc int) uint32 {
-	return olr(ctxt, int32(i), b, r, sc) ^ (1 << 25)
-}
-
-func olhrr(ctxt *obj.Link, i int, b int, r int, sc int) uint32 {
-	return olhr(ctxt, int32(i), b, r, sc) ^ (1 << 22)
-}
-
-func ofsr(ctxt *obj.Link, a int, r int, v int32, b int, sc int, p *obj.Prog) uint32 {
-	if sc&C_SBIT != 0 {
-		ctxt.Diag(".nil on FLDR/FSTR instruction")
-	}
-	o := ((uint32(sc) & C_SCOND) ^ C_SCOND_XOR) << 28
-	if sc&C_PBIT == 0 {
-		o |= 1 << 24
-	}
-	if sc&C_WBIT != 0 {
-		o |= 1 << 21
-	}
-	o |= 6<<25 | 1<<24 | 1<<23 | 10<<8
-	if v < 0 {
-		v = -v
-		o ^= 1 << 23
-	}
-
-	if v&3 != 0 {
-		ctxt.Diag("odd offset for floating point op: %d\n%v", v, p)
-	} else if v >= 1<<10 || v < 0 {
-		ctxt.Diag("literal span too large: %d\n%v", v, p)
-	}
-	o |= (uint32(v) >> 2) & 0xFF
-	o |= (uint32(b) & 15) << 16
-	o |= (uint32(r) & 15) << 12
-
-	switch a {
-	default:
-		ctxt.Diag("bad fst %v", obj.Aconv(a))
-		fallthrough
-
-	case AMOVD:
-		o |= 1 << 8
-		fallthrough
-
-	case AMOVF:
-		break
-	}
-
-	return o
-}
-
-func omvl(ctxt *obj.Link, p *obj.Prog, a *obj.Addr, dr int) uint32 {
-	var o1 uint32
-	if p.Pcond == nil {
-		aclass(ctxt, a)
-		v := immrot(^uint32(ctxt.Instoffset))
-		if v == 0 {
-			ctxt.Diag("missing literal")
-			prasm(p)
-			return 0
-		}
-
-		o1 = oprrr(ctxt, AMVN, int(p.Scond)&C_SCOND)
-		o1 |= uint32(v)
-		o1 |= (uint32(dr) & 15) << 12
-	} else {
-		v := int32(p.Pcond.Pc - p.Pc - 8)
-		o1 = olr(ctxt, v, REGPC, dr, int(p.Scond)&C_SCOND)
-	}
-
-	return o1
-}
-
-func chipzero5(ctxt *obj.Link, e float64) int {
-	// We use GOARM=7 to gate the use of VFPv3 vmov (imm) instructions.
-	if ctxt.Goarm < 7 || e != 0 {
-		return -1
-	}
-	return 0
-}
-
-func chipfloat5(ctxt *obj.Link, e float64) int {
-	// We use GOARM=7 to gate the use of VFPv3 vmov (imm) instructions.
-	if ctxt.Goarm < 7 {
-		return -1
-	}
-
-	ei := math.Float64bits(e)
-	l := uint32(ei)
-	h := uint32(ei >> 32)
-
-	if l != 0 || h&0xffff != 0 {
-		return -1
-	}
-	h1 := h & 0x7fc00000
-	if h1 != 0x40000000 && h1 != 0x3fc00000 {
-		return -1
-	}
-	n := 0
-
-	// sign bit (a)
-	if h&0x80000000 != 0 {
-		n |= 1 << 7
-	}
-
-	// exp sign bit (b)
-	if h1 == 0x3fc00000 {
-		n |= 1 << 6
-	}
-
-	// rest of exp and mantissa (cd-efgh)
-	n |= int((h >> 16) & 0x3f)
-
-	//print("match %.8lux %.8lux %d\n", l, h, n);
-	return n
-}
diff --git a/src/cmd/internal/obj/arm/list5.go b/src/cmd/internal/obj/arm/list5.go
deleted file mode 100644
index bb2ac20..0000000
--- a/src/cmd/internal/obj/arm/list5.go
+++ /dev/null
@@ -1,83 +0,0 @@
-// Inferno utils/5c/list.c
-// http://code.google.com/p/inferno-os/source/browse/utils/5c/list.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package arm
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-)
-
-func init() {
-	obj.RegisterRegister(obj.RBaseARM, MAXREG, Rconv)
-	obj.RegisterOpcode(obj.ABaseARM, Anames)
-}
-
-func Rconv(r int) string {
-	if r == 0 {
-		return "NONE"
-	}
-	if r == REGG {
-		// Special case.
-		return "g"
-	}
-	if REG_R0 <= r && r <= REG_R15 {
-		return fmt.Sprintf("R%d", r-REG_R0)
-	}
-	if REG_F0 <= r && r <= REG_F15 {
-		return fmt.Sprintf("F%d", r-REG_F0)
-	}
-
-	switch r {
-	case REG_FPSR:
-		return "FPSR"
-
-	case REG_FPCR:
-		return "FPCR"
-
-	case REG_CPSR:
-		return "CPSR"
-
-	case REG_SPSR:
-		return "SPSR"
-	}
-
-	return fmt.Sprintf("Rgok(%d)", r-obj.RBaseARM)
-}
-
-func DRconv(a int) string {
-	s := "C_??"
-	if a >= C_NONE && a <= C_NCLASS {
-		s = cnames5[a]
-	}
-	var fp string
-	fp += s
-	return fp
-}
diff --git a/src/cmd/internal/obj/arm/obj5.go b/src/cmd/internal/obj/arm/obj5.go
deleted file mode 100644
index 3ecf6bc..0000000
--- a/src/cmd/internal/obj/arm/obj5.go
+++ /dev/null
@@ -1,1020 +0,0 @@
-// Derived from Inferno utils/5c/swt.c
-// http://code.google.com/p/inferno-os/source/browse/utils/5c/swt.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package arm
-
-import (
-	"cmd/internal/obj"
-	"encoding/binary"
-	"fmt"
-	"log"
-	"math"
-)
-
-var progedit_tlsfallback *obj.LSym
-
-func progedit(ctxt *obj.Link, p *obj.Prog) {
-	p.From.Class = 0
-	p.To.Class = 0
-
-	// Rewrite B/BL to symbol as TYPE_BRANCH.
-	switch p.As {
-	case AB,
-		ABL,
-		obj.ADUFFZERO,
-		obj.ADUFFCOPY:
-		if p.To.Type == obj.TYPE_MEM && (p.To.Name == obj.NAME_EXTERN || p.To.Name == obj.NAME_STATIC) && p.To.Sym != nil {
-			p.To.Type = obj.TYPE_BRANCH
-		}
-	}
-
-	// Replace TLS register fetches on older ARM procesors.
-	switch p.As {
-	// Treat MRC 15, 0, <reg>, C13, C0, 3 specially.
-	case AMRC:
-		if p.To.Offset&0xffff0fff == 0xee1d0f70 {
-			// Because the instruction might be rewriten to a BL which returns in R0
-			// the register must be zero.
-			if p.To.Offset&0xf000 != 0 {
-				ctxt.Diag("%v: TLS MRC instruction must write to R0 as it might get translated into a BL instruction", p.Line())
-			}
-
-			if ctxt.Goarm < 7 {
-				// Replace it with BL runtime.read_tls_fallback(SB) for ARM CPUs that lack the tls extension.
-				if progedit_tlsfallback == nil {
-					progedit_tlsfallback = obj.Linklookup(ctxt, "runtime.read_tls_fallback", 0)
-				}
-
-				// MOVW	LR, R11
-				p.As = AMOVW
-
-				p.From.Type = obj.TYPE_REG
-				p.From.Reg = REGLINK
-				p.To.Type = obj.TYPE_REG
-				p.To.Reg = REGTMP
-
-				// BL	runtime.read_tls_fallback(SB)
-				p = obj.Appendp(ctxt, p)
-
-				p.As = ABL
-				p.To.Type = obj.TYPE_BRANCH
-				p.To.Sym = progedit_tlsfallback
-				p.To.Offset = 0
-
-				// MOVW	R11, LR
-				p = obj.Appendp(ctxt, p)
-
-				p.As = AMOVW
-				p.From.Type = obj.TYPE_REG
-				p.From.Reg = REGTMP
-				p.To.Type = obj.TYPE_REG
-				p.To.Reg = REGLINK
-				break
-			}
-		}
-
-		// Otherwise, MRC/MCR instructions need no further treatment.
-		p.As = AWORD
-	}
-
-	// Rewrite float constants to values stored in memory.
-	switch p.As {
-	case AMOVF:
-		if p.From.Type == obj.TYPE_FCONST && chipfloat5(ctxt, p.From.Val.(float64)) < 0 && (chipzero5(ctxt, p.From.Val.(float64)) < 0 || p.Scond&C_SCOND != C_SCOND_NONE) {
-			f32 := float32(p.From.Val.(float64))
-			i32 := math.Float32bits(f32)
-			literal := fmt.Sprintf("$f32.%08x", i32)
-			s := obj.Linklookup(ctxt, literal, 0)
-			p.From.Type = obj.TYPE_MEM
-			p.From.Sym = s
-			p.From.Name = obj.NAME_EXTERN
-			p.From.Offset = 0
-		}
-
-	case AMOVD:
-		if p.From.Type == obj.TYPE_FCONST && chipfloat5(ctxt, p.From.Val.(float64)) < 0 && (chipzero5(ctxt, p.From.Val.(float64)) < 0 || p.Scond&C_SCOND != C_SCOND_NONE) {
-			i64 := math.Float64bits(p.From.Val.(float64))
-			literal := fmt.Sprintf("$f64.%016x", i64)
-			s := obj.Linklookup(ctxt, literal, 0)
-			p.From.Type = obj.TYPE_MEM
-			p.From.Sym = s
-			p.From.Name = obj.NAME_EXTERN
-			p.From.Offset = 0
-		}
-	}
-
-	if ctxt.Flag_shared != 0 {
-		// Shared libraries use R_ARM_TLS_IE32 instead of
-		// R_ARM_TLS_LE32, replacing the link time constant TLS offset in
-		// runtime.tlsg with an address to a GOT entry containing the
-		// offset. Rewrite $runtime.tlsg(SB) to runtime.tlsg(SB) to
-		// compensate.
-		if ctxt.Tlsg == nil {
-			ctxt.Tlsg = obj.Linklookup(ctxt, "runtime.tlsg", 0)
-		}
-
-		if p.From.Type == obj.TYPE_ADDR && p.From.Name == obj.NAME_EXTERN && p.From.Sym == ctxt.Tlsg {
-			p.From.Type = obj.TYPE_MEM
-		}
-		if p.To.Type == obj.TYPE_ADDR && p.To.Name == obj.NAME_EXTERN && p.To.Sym == ctxt.Tlsg {
-			p.To.Type = obj.TYPE_MEM
-		}
-	}
-}
-
-// Prog.mark
-const (
-	FOLL  = 1 << 0
-	LABEL = 1 << 1
-	LEAF  = 1 << 2
-)
-
-func linkcase(casep *obj.Prog) {
-	for p := casep; p != nil; p = p.Link {
-		if p.As == ABCASE {
-			for ; p != nil && p.As == ABCASE; p = p.Link {
-				p.Rel = casep
-			}
-			break
-		}
-	}
-}
-
-func preprocess(ctxt *obj.Link, cursym *obj.LSym) {
-	autosize := int32(0)
-
-	ctxt.Cursym = cursym
-
-	if cursym.Text == nil || cursym.Text.Link == nil {
-		return
-	}
-
-	softfloat(ctxt, cursym)
-
-	p := cursym.Text
-	autoffset := int32(p.To.Offset)
-	if autoffset < 0 {
-		autoffset = 0
-	}
-	cursym.Locals = autoffset
-	cursym.Args = p.To.Val.(int32)
-
-	if ctxt.Debugzerostack != 0 {
-		if autoffset != 0 && p.From3.Offset&obj.NOSPLIT == 0 {
-			// MOVW $4(R13), R1
-			p = obj.Appendp(ctxt, p)
-
-			p.As = AMOVW
-			p.From.Type = obj.TYPE_ADDR
-			p.From.Reg = REG_R13
-			p.From.Offset = 4
-			p.To.Type = obj.TYPE_REG
-			p.To.Reg = REG_R1
-
-			// MOVW $n(R13), R2
-			p = obj.Appendp(ctxt, p)
-
-			p.As = AMOVW
-			p.From.Type = obj.TYPE_ADDR
-			p.From.Reg = REG_R13
-			p.From.Offset = 4 + int64(autoffset)
-			p.To.Type = obj.TYPE_REG
-			p.To.Reg = REG_R2
-
-			// MOVW $0, R3
-			p = obj.Appendp(ctxt, p)
-
-			p.As = AMOVW
-			p.From.Type = obj.TYPE_CONST
-			p.From.Offset = 0
-			p.To.Type = obj.TYPE_REG
-			p.To.Reg = REG_R3
-
-			// L:
-			//	MOVW.nil R3, 0(R1) +4
-			//	CMP R1, R2
-			//	BNE L
-			pl := obj.Appendp(ctxt, p)
-			p := pl
-
-			p.As = AMOVW
-			p.From.Type = obj.TYPE_REG
-			p.From.Reg = REG_R3
-			p.To.Type = obj.TYPE_MEM
-			p.To.Reg = REG_R1
-			p.To.Offset = 4
-			p.Scond |= C_PBIT
-
-			p = obj.Appendp(ctxt, p)
-			p.As = ACMP
-			p.From.Type = obj.TYPE_REG
-			p.From.Reg = REG_R1
-			p.Reg = REG_R2
-
-			p = obj.Appendp(ctxt, p)
-			p.As = ABNE
-			p.To.Type = obj.TYPE_BRANCH
-			p.Pcond = pl
-		}
-	}
-
-	/*
-	 * find leaf subroutines
-	 * strip NOPs
-	 * expand RET
-	 * expand BECOME pseudo
-	 */
-	var q1 *obj.Prog
-	var q *obj.Prog
-	for p := cursym.Text; p != nil; p = p.Link {
-		switch p.As {
-		case ACASE:
-			if ctxt.Flag_shared != 0 {
-				linkcase(p)
-			}
-
-		case obj.ATEXT:
-			p.Mark |= LEAF
-
-		case obj.ARET:
-			break
-
-		case ADIV, ADIVU, AMOD, AMODU:
-			q = p
-			if ctxt.Sym_div == nil {
-				initdiv(ctxt)
-			}
-			cursym.Text.Mark &^= LEAF
-			continue
-
-		case obj.ANOP:
-			q1 = p.Link
-			q.Link = q1 /* q is non-nop */
-			if q1 != nil {
-				q1.Mark |= p.Mark
-			}
-			continue
-
-		case ABL,
-			ABX,
-			obj.ADUFFZERO,
-			obj.ADUFFCOPY:
-			cursym.Text.Mark &^= LEAF
-			fallthrough
-
-		case ABCASE,
-			AB,
-			ABEQ,
-			ABNE,
-			ABCS,
-			ABHS,
-			ABCC,
-			ABLO,
-			ABMI,
-			ABPL,
-			ABVS,
-			ABVC,
-			ABHI,
-			ABLS,
-			ABGE,
-			ABLT,
-			ABGT,
-			ABLE:
-			q1 = p.Pcond
-			if q1 != nil {
-				for q1.As == obj.ANOP {
-					q1 = q1.Link
-					p.Pcond = q1
-				}
-			}
-		}
-
-		q = p
-	}
-
-	var o int
-	var p1 *obj.Prog
-	var p2 *obj.Prog
-	var q2 *obj.Prog
-	for p := cursym.Text; p != nil; p = p.Link {
-		o = int(p.As)
-		switch o {
-		case obj.ATEXT:
-			autosize = int32(p.To.Offset + 4)
-			if autosize <= 4 {
-				if cursym.Text.Mark&LEAF != 0 {
-					p.To.Offset = -4
-					autosize = 0
-				}
-			}
-
-			if autosize == 0 && cursym.Text.Mark&LEAF == 0 {
-				if ctxt.Debugvlog != 0 {
-					fmt.Fprintf(ctxt.Bso, "save suppressed in: %s\n", cursym.Name)
-					ctxt.Bso.Flush()
-				}
-
-				cursym.Text.Mark |= LEAF
-			}
-
-			if cursym.Text.Mark&LEAF != 0 {
-				cursym.Leaf = 1
-				if autosize == 0 {
-					break
-				}
-			}
-
-			if p.From3.Offset&obj.NOSPLIT == 0 {
-				p = stacksplit(ctxt, p, autosize) // emit split check
-			}
-
-			// MOVW.W		R14,$-autosize(SP)
-			p = obj.Appendp(ctxt, p)
-
-			p.As = AMOVW
-			p.Scond |= C_WBIT
-			p.From.Type = obj.TYPE_REG
-			p.From.Reg = REGLINK
-			p.To.Type = obj.TYPE_MEM
-			p.To.Offset = int64(-autosize)
-			p.To.Reg = REGSP
-			p.Spadj = autosize
-
-			if cursym.Text.From3.Offset&obj.WRAPPER != 0 {
-				// if(g->panic != nil && g->panic->argp == FP) g->panic->argp = bottom-of-frame
-				//
-				//	MOVW g_panic(g), R1
-				//	CMP $0, R1
-				//	B.EQ end
-				//	MOVW panic_argp(R1), R2
-				//	ADD $(autosize+4), R13, R3
-				//	CMP R2, R3
-				//	B.NE end
-				//	ADD $4, R13, R4
-				//	MOVW R4, panic_argp(R1)
-				// end:
-				//	NOP
-				//
-				// The NOP is needed to give the jumps somewhere to land.
-				// It is a liblink NOP, not an ARM NOP: it encodes to 0 instruction bytes.
-
-				p = obj.Appendp(ctxt, p)
-
-				p.As = AMOVW
-				p.From.Type = obj.TYPE_MEM
-				p.From.Reg = REGG
-				p.From.Offset = 4 * int64(ctxt.Arch.Ptrsize) // G.panic
-				p.To.Type = obj.TYPE_REG
-				p.To.Reg = REG_R1
-
-				p = obj.Appendp(ctxt, p)
-				p.As = ACMP
-				p.From.Type = obj.TYPE_CONST
-				p.From.Offset = 0
-				p.Reg = REG_R1
-
-				p = obj.Appendp(ctxt, p)
-				p.As = ABEQ
-				p.To.Type = obj.TYPE_BRANCH
-				p1 = p
-
-				p = obj.Appendp(ctxt, p)
-				p.As = AMOVW
-				p.From.Type = obj.TYPE_MEM
-				p.From.Reg = REG_R1
-				p.From.Offset = 0 // Panic.argp
-				p.To.Type = obj.TYPE_REG
-				p.To.Reg = REG_R2
-
-				p = obj.Appendp(ctxt, p)
-				p.As = AADD
-				p.From.Type = obj.TYPE_CONST
-				p.From.Offset = int64(autosize) + 4
-				p.Reg = REG_R13
-				p.To.Type = obj.TYPE_REG
-				p.To.Reg = REG_R3
-
-				p = obj.Appendp(ctxt, p)
-				p.As = ACMP
-				p.From.Type = obj.TYPE_REG
-				p.From.Reg = REG_R2
-				p.Reg = REG_R3
-
-				p = obj.Appendp(ctxt, p)
-				p.As = ABNE
-				p.To.Type = obj.TYPE_BRANCH
-				p2 = p
-
-				p = obj.Appendp(ctxt, p)
-				p.As = AADD
-				p.From.Type = obj.TYPE_CONST
-				p.From.Offset = 4
-				p.Reg = REG_R13
-				p.To.Type = obj.TYPE_REG
-				p.To.Reg = REG_R4
-
-				p = obj.Appendp(ctxt, p)
-				p.As = AMOVW
-				p.From.Type = obj.TYPE_REG
-				p.From.Reg = REG_R4
-				p.To.Type = obj.TYPE_MEM
-				p.To.Reg = REG_R1
-				p.To.Offset = 0 // Panic.argp
-
-				p = obj.Appendp(ctxt, p)
-
-				p.As = obj.ANOP
-				p1.Pcond = p
-				p2.Pcond = p
-			}
-
-		case obj.ARET:
-			obj.Nocache(p)
-			if cursym.Text.Mark&LEAF != 0 {
-				if autosize == 0 {
-					p.As = AB
-					p.From = obj.Addr{}
-					if p.To.Sym != nil { // retjmp
-						p.To.Type = obj.TYPE_BRANCH
-					} else {
-						p.To.Type = obj.TYPE_MEM
-						p.To.Offset = 0
-						p.To.Reg = REGLINK
-					}
-
-					break
-				}
-			}
-
-			p.As = AMOVW
-			p.Scond |= C_PBIT
-			p.From.Type = obj.TYPE_MEM
-			p.From.Offset = int64(autosize)
-			p.From.Reg = REGSP
-			p.To.Type = obj.TYPE_REG
-			p.To.Reg = REGPC
-
-			// If there are instructions following
-			// this ARET, they come from a branch
-			// with the same stackframe, so no spadj.
-			if p.To.Sym != nil { // retjmp
-				p.To.Reg = REGLINK
-				q2 = obj.Appendp(ctxt, p)
-				q2.As = AB
-				q2.To.Type = obj.TYPE_BRANCH
-				q2.To.Sym = p.To.Sym
-				p.To.Sym = nil
-				p = q2
-			}
-
-		case AADD:
-			if p.From.Type == obj.TYPE_CONST && p.From.Reg == 0 && p.To.Type == obj.TYPE_REG && p.To.Reg == REGSP {
-				p.Spadj = int32(-p.From.Offset)
-			}
-
-		case ASUB:
-			if p.From.Type == obj.TYPE_CONST && p.From.Reg == 0 && p.To.Type == obj.TYPE_REG && p.To.Reg == REGSP {
-				p.Spadj = int32(p.From.Offset)
-			}
-
-		case ADIV, ADIVU, AMOD, AMODU:
-			if cursym.Text.From3.Offset&obj.NOSPLIT != 0 {
-				ctxt.Diag("cannot divide in NOSPLIT function")
-			}
-			if ctxt.Debugdivmod != 0 {
-				break
-			}
-			if p.From.Type != obj.TYPE_REG {
-				break
-			}
-			if p.To.Type != obj.TYPE_REG {
-				break
-			}
-
-			// Make copy because we overwrite p below.
-			q1 := *p
-			if q1.Reg == REGTMP || q1.Reg == 0 && q1.To.Reg == REGTMP {
-				ctxt.Diag("div already using REGTMP: %v", p)
-			}
-
-			/* MOV m(g),REGTMP */
-			p.As = AMOVW
-			p.Lineno = q1.Lineno
-			p.From.Type = obj.TYPE_MEM
-			p.From.Reg = REGG
-			p.From.Offset = 6 * 4 // offset of g.m
-			p.Reg = 0
-			p.To.Type = obj.TYPE_REG
-			p.To.Reg = REGTMP
-
-			/* MOV a,m_divmod(REGTMP) */
-			p = obj.Appendp(ctxt, p)
-			p.As = AMOVW
-			p.Lineno = q1.Lineno
-			p.From.Type = obj.TYPE_REG
-			p.From.Reg = q1.From.Reg
-			p.To.Type = obj.TYPE_MEM
-			p.To.Reg = REGTMP
-			p.To.Offset = 8 * 4 // offset of m.divmod
-
-			/* MOV b,REGTMP */
-			p = obj.Appendp(ctxt, p)
-			p.As = AMOVW
-			p.Lineno = q1.Lineno
-			p.From.Type = obj.TYPE_REG
-			p.From.Reg = q1.Reg
-			if q1.Reg == 0 {
-				p.From.Reg = q1.To.Reg
-			}
-			p.To.Type = obj.TYPE_REG
-			p.To.Reg = REGTMP
-			p.To.Offset = 0
-
-			/* CALL appropriate */
-			p = obj.Appendp(ctxt, p)
-			p.As = ABL
-			p.Lineno = q1.Lineno
-			p.To.Type = obj.TYPE_BRANCH
-			switch o {
-			case ADIV:
-				p.To.Sym = ctxt.Sym_div
-
-			case ADIVU:
-				p.To.Sym = ctxt.Sym_divu
-
-			case AMOD:
-				p.To.Sym = ctxt.Sym_mod
-
-			case AMODU:
-				p.To.Sym = ctxt.Sym_modu
-			}
-
-			/* MOV REGTMP, b */
-			p = obj.Appendp(ctxt, p)
-			p.As = AMOVW
-			p.Lineno = q1.Lineno
-			p.From.Type = obj.TYPE_REG
-			p.From.Reg = REGTMP
-			p.From.Offset = 0
-			p.To.Type = obj.TYPE_REG
-			p.To.Reg = q1.To.Reg
-
-		case AMOVW:
-			if (p.Scond&C_WBIT != 0) && p.To.Type == obj.TYPE_MEM && p.To.Reg == REGSP {
-				p.Spadj = int32(-p.To.Offset)
-			}
-			if (p.Scond&C_PBIT != 0) && p.From.Type == obj.TYPE_MEM && p.From.Reg == REGSP && p.To.Reg != REGPC {
-				p.Spadj = int32(-p.From.Offset)
-			}
-			if p.From.Type == obj.TYPE_ADDR && p.From.Reg == REGSP && p.To.Type == obj.TYPE_REG && p.To.Reg == REGSP {
-				p.Spadj = int32(-p.From.Offset)
-			}
-		}
-	}
-}
-
-func isfloatreg(a *obj.Addr) bool {
-	return a.Type == obj.TYPE_REG && REG_F0 <= a.Reg && a.Reg <= REG_F15
-}
-
-func softfloat(ctxt *obj.Link, cursym *obj.LSym) {
-	if ctxt.Goarm > 5 {
-		return
-	}
-
-	symsfloat := obj.Linklookup(ctxt, "_sfloat", 0)
-
-	wasfloat := 0
-	for p := cursym.Text; p != nil; p = p.Link {
-		if p.Pcond != nil {
-			p.Pcond.Mark |= LABEL
-		}
-	}
-	var next *obj.Prog
-	for p := cursym.Text; p != nil; p = p.Link {
-		switch p.As {
-		case AMOVW:
-			if isfloatreg(&p.To) || isfloatreg(&p.From) {
-				goto soft
-			}
-			goto notsoft
-
-		case AMOVWD,
-			AMOVWF,
-			AMOVDW,
-			AMOVFW,
-			AMOVFD,
-			AMOVDF,
-			AMOVF,
-			AMOVD,
-			ACMPF,
-			ACMPD,
-			AADDF,
-			AADDD,
-			ASUBF,
-			ASUBD,
-			AMULF,
-			AMULD,
-			ADIVF,
-			ADIVD,
-			ASQRTF,
-			ASQRTD,
-			AABSF,
-			AABSD:
-			goto soft
-
-		default:
-			goto notsoft
-		}
-
-	soft:
-		if wasfloat == 0 || (p.Mark&LABEL != 0) {
-			next = ctxt.NewProg()
-			*next = *p
-
-			// BL _sfloat(SB)
-			*p = obj.Prog{}
-			p.Ctxt = ctxt
-			p.Link = next
-			p.As = ABL
-			p.To.Type = obj.TYPE_BRANCH
-			p.To.Sym = symsfloat
-			p.Lineno = next.Lineno
-
-			p = next
-			wasfloat = 1
-		}
-
-		continue
-
-	notsoft:
-		wasfloat = 0
-	}
-}
-
-func stacksplit(ctxt *obj.Link, p *obj.Prog, framesize int32) *obj.Prog {
-	// MOVW			g_stackguard(g), R1
-	p = obj.Appendp(ctxt, p)
-
-	p.As = AMOVW
-	p.From.Type = obj.TYPE_MEM
-	p.From.Reg = REGG
-	p.From.Offset = 2 * int64(ctxt.Arch.Ptrsize) // G.stackguard0
-	if ctxt.Cursym.Cfunc != 0 {
-		p.From.Offset = 3 * int64(ctxt.Arch.Ptrsize) // G.stackguard1
-	}
-	p.To.Type = obj.TYPE_REG
-	p.To.Reg = REG_R1
-
-	if framesize <= obj.StackSmall {
-		// small stack: SP < stackguard
-		//	CMP	stackguard, SP
-		p = obj.Appendp(ctxt, p)
-
-		p.As = ACMP
-		p.From.Type = obj.TYPE_REG
-		p.From.Reg = REG_R1
-		p.Reg = REGSP
-	} else if framesize <= obj.StackBig {
-		// large stack: SP-framesize < stackguard-StackSmall
-		//	MOVW $-framesize(SP), R2
-		//	CMP stackguard, R2
-		p = obj.Appendp(ctxt, p)
-
-		p.As = AMOVW
-		p.From.Type = obj.TYPE_ADDR
-		p.From.Reg = REGSP
-		p.From.Offset = int64(-framesize)
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_R2
-
-		p = obj.Appendp(ctxt, p)
-		p.As = ACMP
-		p.From.Type = obj.TYPE_REG
-		p.From.Reg = REG_R1
-		p.Reg = REG_R2
-	} else {
-		// Such a large stack we need to protect against wraparound
-		// if SP is close to zero.
-		//	SP-stackguard+StackGuard < framesize + (StackGuard-StackSmall)
-		// The +StackGuard on both sides is required to keep the left side positive:
-		// SP is allowed to be slightly below stackguard. See stack.h.
-		//	CMP $StackPreempt, R1
-		//	MOVW.NE $StackGuard(SP), R2
-		//	SUB.NE R1, R2
-		//	MOVW.NE $(framesize+(StackGuard-StackSmall)), R3
-		//	CMP.NE R3, R2
-		p = obj.Appendp(ctxt, p)
-
-		p.As = ACMP
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = int64(uint32(obj.StackPreempt & (1<<32 - 1)))
-		p.Reg = REG_R1
-
-		p = obj.Appendp(ctxt, p)
-		p.As = AMOVW
-		p.From.Type = obj.TYPE_ADDR
-		p.From.Reg = REGSP
-		p.From.Offset = obj.StackGuard
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_R2
-		p.Scond = C_SCOND_NE
-
-		p = obj.Appendp(ctxt, p)
-		p.As = ASUB
-		p.From.Type = obj.TYPE_REG
-		p.From.Reg = REG_R1
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_R2
-		p.Scond = C_SCOND_NE
-
-		p = obj.Appendp(ctxt, p)
-		p.As = AMOVW
-		p.From.Type = obj.TYPE_ADDR
-		p.From.Offset = int64(framesize) + (obj.StackGuard - obj.StackSmall)
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_R3
-		p.Scond = C_SCOND_NE
-
-		p = obj.Appendp(ctxt, p)
-		p.As = ACMP
-		p.From.Type = obj.TYPE_REG
-		p.From.Reg = REG_R3
-		p.Reg = REG_R2
-		p.Scond = C_SCOND_NE
-	}
-
-	// BLS call-to-morestack
-	bls := obj.Appendp(ctxt, p)
-	bls.As = ABLS
-	bls.To.Type = obj.TYPE_BRANCH
-
-	var last *obj.Prog
-	for last = ctxt.Cursym.Text; last.Link != nil; last = last.Link {
-	}
-
-	// MOVW	LR, R3
-	movw := obj.Appendp(ctxt, last)
-	movw.As = AMOVW
-	movw.From.Type = obj.TYPE_REG
-	movw.From.Reg = REGLINK
-	movw.To.Type = obj.TYPE_REG
-	movw.To.Reg = REG_R3
-
-	bls.Pcond = movw
-
-	// BL runtime.morestack
-	call := obj.Appendp(ctxt, movw)
-	call.As = obj.ACALL
-	call.To.Type = obj.TYPE_BRANCH
-	morestack := "runtime.morestack"
-	switch {
-	case ctxt.Cursym.Cfunc != 0:
-		morestack = "runtime.morestackc"
-	case ctxt.Cursym.Text.From3.Offset&obj.NEEDCTXT == 0:
-		morestack = "runtime.morestack_noctxt"
-	}
-	call.To.Sym = obj.Linklookup(ctxt, morestack, 0)
-
-	// B start
-	b := obj.Appendp(ctxt, call)
-	b.As = obj.AJMP
-	b.To.Type = obj.TYPE_BRANCH
-	b.Pcond = ctxt.Cursym.Text.Link
-
-	return bls
-}
-
-func initdiv(ctxt *obj.Link) {
-	if ctxt.Sym_div != nil {
-		return
-	}
-	ctxt.Sym_div = obj.Linklookup(ctxt, "_div", 0)
-	ctxt.Sym_divu = obj.Linklookup(ctxt, "_divu", 0)
-	ctxt.Sym_mod = obj.Linklookup(ctxt, "_mod", 0)
-	ctxt.Sym_modu = obj.Linklookup(ctxt, "_modu", 0)
-}
-
-func follow(ctxt *obj.Link, s *obj.LSym) {
-	ctxt.Cursym = s
-
-	firstp := ctxt.NewProg()
-	lastp := firstp
-	xfol(ctxt, s.Text, &lastp)
-	lastp.Link = nil
-	s.Text = firstp.Link
-}
-
-func relinv(a int) int {
-	switch a {
-	case ABEQ:
-		return ABNE
-	case ABNE:
-		return ABEQ
-	case ABCS:
-		return ABCC
-	case ABHS:
-		return ABLO
-	case ABCC:
-		return ABCS
-	case ABLO:
-		return ABHS
-	case ABMI:
-		return ABPL
-	case ABPL:
-		return ABMI
-	case ABVS:
-		return ABVC
-	case ABVC:
-		return ABVS
-	case ABHI:
-		return ABLS
-	case ABLS:
-		return ABHI
-	case ABGE:
-		return ABLT
-	case ABLT:
-		return ABGE
-	case ABGT:
-		return ABLE
-	case ABLE:
-		return ABGT
-	}
-
-	log.Fatalf("unknown relation: %s", Anames[a])
-	return 0
-}
-
-func xfol(ctxt *obj.Link, p *obj.Prog, last **obj.Prog) {
-	var q *obj.Prog
-	var r *obj.Prog
-	var a int
-	var i int
-
-loop:
-	if p == nil {
-		return
-	}
-	a = int(p.As)
-	if a == AB {
-		q = p.Pcond
-		if q != nil && q.As != obj.ATEXT {
-			p.Mark |= FOLL
-			p = q
-			if p.Mark&FOLL == 0 {
-				goto loop
-			}
-		}
-	}
-
-	if p.Mark&FOLL != 0 {
-		i = 0
-		q = p
-		for ; i < 4; i, q = i+1, q.Link {
-			if q == *last || q == nil {
-				break
-			}
-			a = int(q.As)
-			if a == obj.ANOP {
-				i--
-				continue
-			}
-
-			if a == AB || (a == obj.ARET && q.Scond == C_SCOND_NONE) || a == ARFE || a == obj.AUNDEF {
-				goto copy
-			}
-			if q.Pcond == nil || (q.Pcond.Mark&FOLL != 0) {
-				continue
-			}
-			if a != ABEQ && a != ABNE {
-				continue
-			}
-
-		copy:
-			for {
-				r = ctxt.NewProg()
-				*r = *p
-				if r.Mark&FOLL == 0 {
-					fmt.Printf("can't happen 1\n")
-				}
-				r.Mark |= FOLL
-				if p != q {
-					p = p.Link
-					(*last).Link = r
-					*last = r
-					continue
-				}
-
-				(*last).Link = r
-				*last = r
-				if a == AB || (a == obj.ARET && q.Scond == C_SCOND_NONE) || a == ARFE || a == obj.AUNDEF {
-					return
-				}
-				r.As = ABNE
-				if a == ABNE {
-					r.As = ABEQ
-				}
-				r.Pcond = p.Link
-				r.Link = p.Pcond
-				if r.Link.Mark&FOLL == 0 {
-					xfol(ctxt, r.Link, last)
-				}
-				if r.Pcond.Mark&FOLL == 0 {
-					fmt.Printf("can't happen 2\n")
-				}
-				return
-			}
-		}
-
-		a = AB
-		q = ctxt.NewProg()
-		q.As = int16(a)
-		q.Lineno = p.Lineno
-		q.To.Type = obj.TYPE_BRANCH
-		q.To.Offset = p.Pc
-		q.Pcond = p
-		p = q
-	}
-
-	p.Mark |= FOLL
-	(*last).Link = p
-	*last = p
-	if a == AB || (a == obj.ARET && p.Scond == C_SCOND_NONE) || a == ARFE || a == obj.AUNDEF {
-		return
-	}
-
-	if p.Pcond != nil {
-		if a != ABL && a != ABX && p.Link != nil {
-			q = obj.Brchain(ctxt, p.Link)
-			if a != obj.ATEXT && a != ABCASE {
-				if q != nil && (q.Mark&FOLL != 0) {
-					p.As = int16(relinv(a))
-					p.Link = p.Pcond
-					p.Pcond = q
-				}
-			}
-
-			xfol(ctxt, p.Link, last)
-			q = obj.Brchain(ctxt, p.Pcond)
-			if q == nil {
-				q = p.Pcond
-			}
-			if q.Mark&FOLL != 0 {
-				p.Pcond = q
-				return
-			}
-
-			p = q
-			goto loop
-		}
-	}
-
-	p = p.Link
-	goto loop
-}
-
-var unaryDst = map[int]bool{
-	ASWI:  true,
-	AWORD: true,
-}
-
-var Linkarm = obj.LinkArch{
-	ByteOrder:  binary.LittleEndian,
-	Name:       "arm",
-	Thechar:    '5',
-	Preprocess: preprocess,
-	Assemble:   span5,
-	Follow:     follow,
-	Progedit:   progedit,
-	UnaryDst:   unaryDst,
-	Minlc:      4,
-	Ptrsize:    4,
-	Regsize:    4,
-}
diff --git a/src/cmd/internal/obj/arm64/a.out.go b/src/cmd/internal/obj/arm64/a.out.go
deleted file mode 100644
index 67b37aa..0000000
--- a/src/cmd/internal/obj/arm64/a.out.go
+++ /dev/null
@@ -1,711 +0,0 @@
-// cmd/7c/7.out.h  from Vita Nuova.
-// https://code.google.com/p/ken-cc/source/browse/src/cmd/7c/7.out.h
-//
-// 	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-// 	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-// 	Portions Copyright © 1997-1999 Vita Nuova Limited
-// 	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-// 	Portions Copyright © 2004,2006 Bruce Ellis
-// 	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-// 	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-// 	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package arm64
-
-import "cmd/internal/obj"
-
-const (
-	NSNAME = 8
-	NSYM   = 50
-	NREG   = 32 /* number of general registers */
-	NFREG  = 32 /* number of floating point registers */
-)
-
-// General purpose registers, kept in the low bits of Prog.Reg.
-const (
-	// integer
-	REG_R0 = obj.RBaseARM64 + iota
-	REG_R1
-	REG_R2
-	REG_R3
-	REG_R4
-	REG_R5
-	REG_R6
-	REG_R7
-	REG_R8
-	REG_R9
-	REG_R10
-	REG_R11
-	REG_R12
-	REG_R13
-	REG_R14
-	REG_R15
-	REG_R16
-	REG_R17
-	REG_R18
-	REG_R19
-	REG_R20
-	REG_R21
-	REG_R22
-	REG_R23
-	REG_R24
-	REG_R25
-	REG_R26
-	REG_R27
-	REG_R28
-	REG_R29
-	REG_R30
-	REG_R31
-
-	// scalar floating point
-	REG_F0
-	REG_F1
-	REG_F2
-	REG_F3
-	REG_F4
-	REG_F5
-	REG_F6
-	REG_F7
-	REG_F8
-	REG_F9
-	REG_F10
-	REG_F11
-	REG_F12
-	REG_F13
-	REG_F14
-	REG_F15
-	REG_F16
-	REG_F17
-	REG_F18
-	REG_F19
-	REG_F20
-	REG_F21
-	REG_F22
-	REG_F23
-	REG_F24
-	REG_F25
-	REG_F26
-	REG_F27
-	REG_F28
-	REG_F29
-	REG_F30
-	REG_F31
-
-	// SIMD
-	REG_V0
-	REG_V1
-	REG_V2
-	REG_V3
-	REG_V4
-	REG_V5
-	REG_V6
-	REG_V7
-	REG_V8
-	REG_V9
-	REG_V10
-	REG_V11
-	REG_V12
-	REG_V13
-	REG_V14
-	REG_V15
-	REG_V16
-	REG_V17
-	REG_V18
-	REG_V19
-	REG_V20
-	REG_V21
-	REG_V22
-	REG_V23
-	REG_V24
-	REG_V25
-	REG_V26
-	REG_V27
-	REG_V28
-	REG_V29
-	REG_V30
-	REG_V31
-
-	// The EQ in
-	// 	CSET	EQ, R0
-	// is encoded as TYPE_REG, even though it's not really a register.
-	COND_EQ
-	COND_NE
-	COND_HS
-	COND_LO
-	COND_MI
-	COND_PL
-	COND_VS
-	COND_VC
-	COND_HI
-	COND_LS
-	COND_GE
-	COND_LT
-	COND_GT
-	COND_LE
-	COND_AL
-	COND_NV
-
-	REG_RSP = REG_V31 + 32 // to differentiate ZR/SP, REG_RSP&0x1f = 31
-)
-
-// Not registers, but flags that can be combined with regular register
-// constants to indicate extended register conversion.  When checking,
-// you should subtract obj.RBaseARM64 first. From this difference, bit 11
-// indicates extended register, bits 8-10 select the conversion mode.
-const REG_EXT = obj.RBaseARM64 + 1<<11
-
-const (
-	REG_UXTB = REG_EXT + iota<<8
-	REG_UXTH
-	REG_UXTW
-	REG_UXTX
-	REG_SXTB
-	REG_SXTH
-	REG_SXTW
-	REG_SXTX
-)
-
-// Special registers, after subtracting obj.RBaseARM64, bit 12 indicates
-// a special register and the low bits select the register.
-const (
-	REG_SPECIAL = obj.RBaseARM64 + 1<<12 + iota
-	REG_DAIF
-	REG_NZCV
-	REG_FPSR
-	REG_FPCR
-	REG_SPSR_EL1
-	REG_ELR_EL1
-	REG_SPSR_EL2
-	REG_ELR_EL2
-	REG_CurrentEL
-	REG_SP_EL0
-	REG_SPSel
-	REG_DAIFSet
-	REG_DAIFClr
-)
-
-// Register assignments:
-//
-// compiler allocates R0 up as temps
-// compiler allocates register variables R7-R25
-// compiler allocates external registers R26 down
-//
-// compiler allocates register variables F7-F26
-// compiler allocates external registers F26 down
-const (
-	REGMIN = REG_R7  // register variables allocated from here to REGMAX
-	REGRT1 = REG_R16 // ARM64 IP0, for external linker, runtime, duffzero and duffcopy
-	REGRT2 = REG_R17 // ARM64 IP1, for external linker, runtime, duffcopy
-	REGPR  = REG_R18 // ARM64 platform register, unused in the Go toolchain
-	REGMAX = REG_R25
-
-	REGCTXT = REG_R26 // environment for closures
-	REGTMP  = REG_R27 // reserved for liblink
-	REGG    = REG_R28 // G
-	REGFP   = REG_R29 // frame pointer, unused in the Go toolchain
-	REGLINK = REG_R30
-
-	// ARM64 uses R31 as both stack pointer and zero register,
-	// depending on the instruction. To differentiate RSP from ZR,
-	// we use a different numeric value for REGZERO and REGSP.
-	REGZERO = REG_R31
-	REGSP   = REG_RSP
-
-	FREGRET  = REG_F0
-	FREGMIN  = REG_F7  // first register variable
-	FREGMAX  = REG_F26 // last register variable for 7g only
-	FREGEXT  = REG_F26 // first external register
-	FREGZERO = REG_F28 // both float and double
-	FREGHALF = REG_F29 // double
-	FREGONE  = REG_F30 // double
-	FREGTWO  = REG_F31 // double
-)
-
-const (
-	BIG = 2048 - 8
-)
-
-const (
-	/* mark flags */
-	LABEL = 1 << iota
-	LEAF
-	FLOAT
-	BRANCH
-	LOAD
-	FCMP
-	SYNC
-	LIST
-	FOLL
-	NOSCHED
-)
-
-const (
-	C_NONE   = iota
-	C_REG    // R0..R30
-	C_RSP    // R0..R30, RSP
-	C_FREG   // F0..F31
-	C_VREG   // V0..V31
-	C_PAIR   // (Rn, Rm)
-	C_SHIFT  // Rn<<2
-	C_EXTREG // Rn.UXTB<<3
-	C_SPR    // REG_NZCV
-	C_COND   // EQ, NE, etc
-
-	C_ZCON     // $0 or ZR
-	C_ADDCON0  // 12-bit unsigned, unshifted
-	C_ADDCON   // 12-bit unsigned, shifted left by 0 or 12
-	C_MOVCON   // generated by a 16-bit constant, optionally inverted and/or shifted by multiple of 16
-	C_BITCON   // bitfield and logical immediate masks
-	C_ABCON    // could be C_ADDCON or C_BITCON
-	C_MBCON    // could be C_MOVCON or C_BITCON
-	C_LCON     // 32-bit constant
-	C_VCON     // 64-bit constant
-	C_FCON     // floating-point constant
-	C_VCONADDR // 64-bit memory address
-
-	C_AACON // ADDCON offset in auto constant $a(FP)
-	C_LACON // 32-bit offset in auto constant $a(FP)
-	C_AECON // ADDCON offset in extern constant $e(SB)
-
-	// TODO(aram): only one branch class should be enough
-	C_SBRA // for TYPE_BRANCH
-	C_LBRA
-
-	C_NPAUTO   // -512 <= x < 0, 0 mod 8
-	C_NSAUTO   // -256 <= x < 0
-	C_PSAUTO   // 0 to 255
-	C_PPAUTO   // 0 to 504, 0 mod 8
-	C_UAUTO4K  // 0 to 4095
-	C_UAUTO8K  // 0 to 8190, 0 mod 2
-	C_UAUTO16K // 0 to 16380, 0 mod 4
-	C_UAUTO32K // 0 to 32760, 0 mod 8
-	C_UAUTO64K // 0 to 65520, 0 mod 16
-	C_LAUTO    // any other 32-bit constant
-
-	C_SEXT1  // 0 to 4095, direct
-	C_SEXT2  // 0 to 8190
-	C_SEXT4  // 0 to 16380
-	C_SEXT8  // 0 to 32760
-	C_SEXT16 // 0 to 65520
-	C_LEXT
-
-	// TODO(aram): s/AUTO/INDIR/
-	C_ZOREG  // 0(R)
-	C_NPOREG // mirror NPAUTO, etc
-	C_NSOREG
-	C_PSOREG
-	C_PPOREG
-	C_UOREG4K
-	C_UOREG8K
-	C_UOREG16K
-	C_UOREG32K
-	C_UOREG64K
-	C_LOREG
-
-	C_ADDR // TODO(aram): explain difference from C_VCONADDR
-	C_ROFF // register offset (including register extended)
-
-	C_GOK
-	C_TEXTSIZE
-	C_NCLASS // must be last
-)
-
-const (
-	C_XPRE  = 1 << 6 // match arm.C_WBIT, so Prog.String know how to print it
-	C_XPOST = 1 << 5 // match arm.C_PBIT, so Prog.String know how to print it
-)
-
-//go:generate go run ../stringer.go -i $GOFILE -o anames.go -p arm64
-
-const (
-	AADC = obj.ABaseARM64 + obj.A_ARCHSPECIFIC + iota
-	AADCS
-	AADCSW
-	AADCW
-	AADD
-	AADDS
-	AADDSW
-	AADDW
-	AADR
-	AADRP
-	AAND
-	AANDS
-	AANDSW
-	AANDW
-	AASR
-	AASRW
-	AAT
-	ABFI
-	ABFIW
-	ABFM
-	ABFMW
-	ABFXIL
-	ABFXILW
-	ABIC
-	ABICS
-	ABICSW
-	ABICW
-	ABRK
-	ACBNZ
-	ACBNZW
-	ACBZ
-	ACBZW
-	ACCMN
-	ACCMNW
-	ACCMP
-	ACCMPW
-	ACINC
-	ACINCW
-	ACINV
-	ACINVW
-	ACLREX
-	ACLS
-	ACLSW
-	ACLZ
-	ACLZW
-	ACMN
-	ACMNW
-	ACMP
-	ACMPW
-	ACNEG
-	ACNEGW
-	ACRC32B
-	ACRC32CB
-	ACRC32CH
-	ACRC32CW
-	ACRC32CX
-	ACRC32H
-	ACRC32W
-	ACRC32X
-	ACSEL
-	ACSELW
-	ACSET
-	ACSETM
-	ACSETMW
-	ACSETW
-	ACSINC
-	ACSINCW
-	ACSINV
-	ACSINVW
-	ACSNEG
-	ACSNEGW
-	ADC
-	ADCPS1
-	ADCPS2
-	ADCPS3
-	ADMB
-	ADRPS
-	ADSB
-	AEON
-	AEONW
-	AEOR
-	AEORW
-	AERET
-	AEXTR
-	AEXTRW
-	AHINT
-	AHLT
-	AHVC
-	AIC
-	AISB
-	ALDAR
-	ALDARB
-	ALDARH
-	ALDARW
-	ALDAXP
-	ALDAXPW
-	ALDAXR
-	ALDAXRB
-	ALDAXRH
-	ALDAXRW
-	ALDP
-	ALDXR
-	ALDXRB
-	ALDXRH
-	ALDXRW
-	ALDXP
-	ALDXPW
-	ALSL
-	ALSLW
-	ALSR
-	ALSRW
-	AMADD
-	AMADDW
-	AMNEG
-	AMNEGW
-	AMOVK
-	AMOVKW
-	AMOVN
-	AMOVNW
-	AMOVZ
-	AMOVZW
-	AMRS
-	AMSR
-	AMSUB
-	AMSUBW
-	AMUL
-	AMULW
-	AMVN
-	AMVNW
-	ANEG
-	ANEGS
-	ANEGSW
-	ANEGW
-	ANGC
-	ANGCS
-	ANGCSW
-	ANGCW
-	AORN
-	AORNW
-	AORR
-	AORRW
-	APRFM
-	APRFUM
-	ARBIT
-	ARBITW
-	AREM
-	AREMW
-	AREV
-	AREV16
-	AREV16W
-	AREV32
-	AREVW
-	AROR
-	ARORW
-	ASBC
-	ASBCS
-	ASBCSW
-	ASBCW
-	ASBFIZ
-	ASBFIZW
-	ASBFM
-	ASBFMW
-	ASBFX
-	ASBFXW
-	ASDIV
-	ASDIVW
-	ASEV
-	ASEVL
-	ASMADDL
-	ASMC
-	ASMNEGL
-	ASMSUBL
-	ASMULH
-	ASMULL
-	ASTXR
-	ASTXRB
-	ASTXRH
-	ASTXP
-	ASTXPW
-	ASTXRW
-	ASTLP
-	ASTLPW
-	ASTLR
-	ASTLRB
-	ASTLRH
-	ASTLRW
-	ASTLXP
-	ASTLXPW
-	ASTLXR
-	ASTLXRB
-	ASTLXRH
-	ASTLXRW
-	ASTP
-	ASUB
-	ASUBS
-	ASUBSW
-	ASUBW
-	ASVC
-	ASXTB
-	ASXTBW
-	ASXTH
-	ASXTHW
-	ASXTW
-	ASYS
-	ASYSL
-	ATBNZ
-	ATBZ
-	ATLBI
-	ATST
-	ATSTW
-	AUBFIZ
-	AUBFIZW
-	AUBFM
-	AUBFMW
-	AUBFX
-	AUBFXW
-	AUDIV
-	AUDIVW
-	AUMADDL
-	AUMNEGL
-	AUMSUBL
-	AUMULH
-	AUMULL
-	AUREM
-	AUREMW
-	AUXTB
-	AUXTH
-	AUXTW
-	AUXTBW
-	AUXTHW
-	AWFE
-	AWFI
-	AYIELD
-	AMOVB
-	AMOVBU
-	AMOVH
-	AMOVHU
-	AMOVW
-	AMOVWU
-	AMOVD
-	AMOVNP
-	AMOVNPW
-	AMOVP
-	AMOVPD
-	AMOVPQ
-	AMOVPS
-	AMOVPSW
-	AMOVPW
-	ABEQ
-	ABNE
-	ABCS
-	ABHS
-	ABCC
-	ABLO
-	ABMI
-	ABPL
-	ABVS
-	ABVC
-	ABHI
-	ABLS
-	ABGE
-	ABLT
-	ABGT
-	ABLE
-	AFABSD
-	AFABSS
-	AFADDD
-	AFADDS
-	AFCCMPD
-	AFCCMPED
-	AFCCMPS
-	AFCCMPES
-	AFCMPD
-	AFCMPED
-	AFCMPES
-	AFCMPS
-	AFCVTSD
-	AFCVTDS
-	AFCVTZSD
-	AFCVTZSDW
-	AFCVTZSS
-	AFCVTZSSW
-	AFCVTZUD
-	AFCVTZUDW
-	AFCVTZUS
-	AFCVTZUSW
-	AFDIVD
-	AFDIVS
-	AFMOVD
-	AFMOVS
-	AFMULD
-	AFMULS
-	AFNEGD
-	AFNEGS
-	AFSQRTD
-	AFSQRTS
-	AFSUBD
-	AFSUBS
-	ASCVTFD
-	ASCVTFS
-	ASCVTFWD
-	ASCVTFWS
-	AUCVTFD
-	AUCVTFS
-	AUCVTFWD
-	AUCVTFWS
-	AHISTORY
-	ANAME
-	AWORD
-	ADYNT
-	AINIT
-	ABCASE
-	ACASE
-	ADWORD
-	ASIGNAME
-	AGOK
-	AEND
-	AFCSELS
-	AFCSELD
-	AFMAXS
-	AFMINS
-	AFMAXD
-	AFMIND
-	AFMAXNMS
-	AFMAXNMD
-	AFNMULS
-	AFNMULD
-	AFRINTNS
-	AFRINTND
-	AFRINTPS
-	AFRINTPD
-	AFRINTMS
-	AFRINTMD
-	AFRINTZS
-	AFRINTZD
-	AFRINTAS
-	AFRINTAD
-	AFRINTXS
-	AFRINTXD
-	AFRINTIS
-	AFRINTID
-	AFMADDS
-	AFMADDD
-	AFMSUBS
-	AFMSUBD
-	AFNMADDS
-	AFNMADDD
-	AFNMSUBS
-	AFNMSUBD
-	AFMINNMS
-	AFMINNMD
-	AFCVTDH
-	AFCVTHS
-	AFCVTHD
-	AFCVTSH
-	AAESD
-	AAESE
-	AAESIMC
-	AAESMC
-	ASHA1C
-	ASHA1H
-	ASHA1M
-	ASHA1P
-	ASHA1SU0
-	ASHA1SU1
-	ASHA256H
-	ASHA256H2
-	ASHA256SU0
-	ASHA256SU1
-	ALAST
-	AB  = obj.AJMP
-	ABL = obj.ACALL
-)
diff --git a/src/cmd/internal/obj/arm64/anames.go b/src/cmd/internal/obj/arm64/anames.go
deleted file mode 100644
index 2845418..0000000
--- a/src/cmd/internal/obj/arm64/anames.go
+++ /dev/null
@@ -1,379 +0,0 @@
-// Generated by stringer -i a.out.go -o anames.go -p arm64
-// Do not edit.
-
-package arm64
-
-import "cmd/internal/obj"
-
-var Anames = []string{
-	obj.A_ARCHSPECIFIC: "ADC",
-	"ADCS",
-	"ADCSW",
-	"ADCW",
-	"ADD",
-	"ADDS",
-	"ADDSW",
-	"ADDW",
-	"ADR",
-	"ADRP",
-	"AND",
-	"ANDS",
-	"ANDSW",
-	"ANDW",
-	"ASR",
-	"ASRW",
-	"AT",
-	"BFI",
-	"BFIW",
-	"BFM",
-	"BFMW",
-	"BFXIL",
-	"BFXILW",
-	"BIC",
-	"BICS",
-	"BICSW",
-	"BICW",
-	"BRK",
-	"CBNZ",
-	"CBNZW",
-	"CBZ",
-	"CBZW",
-	"CCMN",
-	"CCMNW",
-	"CCMP",
-	"CCMPW",
-	"CINC",
-	"CINCW",
-	"CINV",
-	"CINVW",
-	"CLREX",
-	"CLS",
-	"CLSW",
-	"CLZ",
-	"CLZW",
-	"CMN",
-	"CMNW",
-	"CMP",
-	"CMPW",
-	"CNEG",
-	"CNEGW",
-	"CRC32B",
-	"CRC32CB",
-	"CRC32CH",
-	"CRC32CW",
-	"CRC32CX",
-	"CRC32H",
-	"CRC32W",
-	"CRC32X",
-	"CSEL",
-	"CSELW",
-	"CSET",
-	"CSETM",
-	"CSETMW",
-	"CSETW",
-	"CSINC",
-	"CSINCW",
-	"CSINV",
-	"CSINVW",
-	"CSNEG",
-	"CSNEGW",
-	"DC",
-	"DCPS1",
-	"DCPS2",
-	"DCPS3",
-	"DMB",
-	"DRPS",
-	"DSB",
-	"EON",
-	"EONW",
-	"EOR",
-	"EORW",
-	"ERET",
-	"EXTR",
-	"EXTRW",
-	"HINT",
-	"HLT",
-	"HVC",
-	"IC",
-	"ISB",
-	"LDAR",
-	"LDARB",
-	"LDARH",
-	"LDARW",
-	"LDAXP",
-	"LDAXPW",
-	"LDAXR",
-	"LDAXRB",
-	"LDAXRH",
-	"LDAXRW",
-	"LDP",
-	"LDXR",
-	"LDXRB",
-	"LDXRH",
-	"LDXRW",
-	"LDXP",
-	"LDXPW",
-	"LSL",
-	"LSLW",
-	"LSR",
-	"LSRW",
-	"MADD",
-	"MADDW",
-	"MNEG",
-	"MNEGW",
-	"MOVK",
-	"MOVKW",
-	"MOVN",
-	"MOVNW",
-	"MOVZ",
-	"MOVZW",
-	"MRS",
-	"MSR",
-	"MSUB",
-	"MSUBW",
-	"MUL",
-	"MULW",
-	"MVN",
-	"MVNW",
-	"NEG",
-	"NEGS",
-	"NEGSW",
-	"NEGW",
-	"NGC",
-	"NGCS",
-	"NGCSW",
-	"NGCW",
-	"ORN",
-	"ORNW",
-	"ORR",
-	"ORRW",
-	"PRFM",
-	"PRFUM",
-	"RBIT",
-	"RBITW",
-	"REM",
-	"REMW",
-	"REV",
-	"REV16",
-	"REV16W",
-	"REV32",
-	"REVW",
-	"ROR",
-	"RORW",
-	"SBC",
-	"SBCS",
-	"SBCSW",
-	"SBCW",
-	"SBFIZ",
-	"SBFIZW",
-	"SBFM",
-	"SBFMW",
-	"SBFX",
-	"SBFXW",
-	"SDIV",
-	"SDIVW",
-	"SEV",
-	"SEVL",
-	"SMADDL",
-	"SMC",
-	"SMNEGL",
-	"SMSUBL",
-	"SMULH",
-	"SMULL",
-	"STXR",
-	"STXRB",
-	"STXRH",
-	"STXP",
-	"STXPW",
-	"STXRW",
-	"STLP",
-	"STLPW",
-	"STLR",
-	"STLRB",
-	"STLRH",
-	"STLRW",
-	"STLXP",
-	"STLXPW",
-	"STLXR",
-	"STLXRB",
-	"STLXRH",
-	"STLXRW",
-	"STP",
-	"SUB",
-	"SUBS",
-	"SUBSW",
-	"SUBW",
-	"SVC",
-	"SXTB",
-	"SXTBW",
-	"SXTH",
-	"SXTHW",
-	"SXTW",
-	"SYS",
-	"SYSL",
-	"TBNZ",
-	"TBZ",
-	"TLBI",
-	"TST",
-	"TSTW",
-	"UBFIZ",
-	"UBFIZW",
-	"UBFM",
-	"UBFMW",
-	"UBFX",
-	"UBFXW",
-	"UDIV",
-	"UDIVW",
-	"UMADDL",
-	"UMNEGL",
-	"UMSUBL",
-	"UMULH",
-	"UMULL",
-	"UREM",
-	"UREMW",
-	"UXTB",
-	"UXTH",
-	"UXTW",
-	"UXTBW",
-	"UXTHW",
-	"WFE",
-	"WFI",
-	"YIELD",
-	"MOVB",
-	"MOVBU",
-	"MOVH",
-	"MOVHU",
-	"MOVW",
-	"MOVWU",
-	"MOVD",
-	"MOVNP",
-	"MOVNPW",
-	"MOVP",
-	"MOVPD",
-	"MOVPQ",
-	"MOVPS",
-	"MOVPSW",
-	"MOVPW",
-	"BEQ",
-	"BNE",
-	"BCS",
-	"BHS",
-	"BCC",
-	"BLO",
-	"BMI",
-	"BPL",
-	"BVS",
-	"BVC",
-	"BHI",
-	"BLS",
-	"BGE",
-	"BLT",
-	"BGT",
-	"BLE",
-	"FABSD",
-	"FABSS",
-	"FADDD",
-	"FADDS",
-	"FCCMPD",
-	"FCCMPED",
-	"FCCMPS",
-	"FCCMPES",
-	"FCMPD",
-	"FCMPED",
-	"FCMPES",
-	"FCMPS",
-	"FCVTSD",
-	"FCVTDS",
-	"FCVTZSD",
-	"FCVTZSDW",
-	"FCVTZSS",
-	"FCVTZSSW",
-	"FCVTZUD",
-	"FCVTZUDW",
-	"FCVTZUS",
-	"FCVTZUSW",
-	"FDIVD",
-	"FDIVS",
-	"FMOVD",
-	"FMOVS",
-	"FMULD",
-	"FMULS",
-	"FNEGD",
-	"FNEGS",
-	"FSQRTD",
-	"FSQRTS",
-	"FSUBD",
-	"FSUBS",
-	"SCVTFD",
-	"SCVTFS",
-	"SCVTFWD",
-	"SCVTFWS",
-	"UCVTFD",
-	"UCVTFS",
-	"UCVTFWD",
-	"UCVTFWS",
-	"HISTORY",
-	"NAME",
-	"WORD",
-	"DYNT",
-	"INIT",
-	"BCASE",
-	"CASE",
-	"DWORD",
-	"SIGNAME",
-	"GOK",
-	"END",
-	"FCSELS",
-	"FCSELD",
-	"FMAXS",
-	"FMINS",
-	"FMAXD",
-	"FMIND",
-	"FMAXNMS",
-	"FMAXNMD",
-	"FNMULS",
-	"FNMULD",
-	"FRINTNS",
-	"FRINTND",
-	"FRINTPS",
-	"FRINTPD",
-	"FRINTMS",
-	"FRINTMD",
-	"FRINTZS",
-	"FRINTZD",
-	"FRINTAS",
-	"FRINTAD",
-	"FRINTXS",
-	"FRINTXD",
-	"FRINTIS",
-	"FRINTID",
-	"FMADDS",
-	"FMADDD",
-	"FMSUBS",
-	"FMSUBD",
-	"FNMADDS",
-	"FNMADDD",
-	"FNMSUBS",
-	"FNMSUBD",
-	"FMINNMS",
-	"FMINNMD",
-	"FCVTDH",
-	"FCVTHS",
-	"FCVTHD",
-	"FCVTSH",
-	"AESD",
-	"AESE",
-	"AESIMC",
-	"AESMC",
-	"SHA1C",
-	"SHA1H",
-	"SHA1M",
-	"SHA1P",
-	"SHA1SU0",
-	"SHA1SU1",
-	"SHA256H",
-	"SHA256H2",
-	"SHA256SU0",
-	"SHA256SU1",
-	"LAST",
-}
diff --git a/src/cmd/internal/obj/arm64/anames7.go b/src/cmd/internal/obj/arm64/anames7.go
deleted file mode 100644
index 3ff429f..0000000
--- a/src/cmd/internal/obj/arm64/anames7.go
+++ /dev/null
@@ -1,62 +0,0 @@
-package arm64
-
-var cnames7 = []string{
-	"NONE",
-	"REG",
-	"RSP",
-	"FREG",
-	"VREG",
-	"PAIR",
-	"SHIFT",
-	"EXTREG",
-	"SPR",
-	"COND",
-	"ZCON",
-	"ADDCON0",
-	"ADDCON",
-	"MOVCON",
-	"BITCON",
-	"ABCON",
-	"MBCON",
-	"LCON",
-	"VCON",
-	"FCON",
-	"VCONADDR",
-	"AACON",
-	"LACON",
-	"AECON",
-	"SBRA",
-	"LBRA",
-	"NPAUTO",
-	"NSAUTO",
-	"PSAUTO",
-	"PPAUTO",
-	"UAUTO4K",
-	"UAUTO8K",
-	"UAUTO16K",
-	"UAUTO32K",
-	"UAUTO64K",
-	"LAUTO",
-	"SEXT1",
-	"SEXT2",
-	"SEXT4",
-	"SEXT8",
-	"SEXT16",
-	"LEXT",
-	"ZOREG",
-	"NPOREG",
-	"NSOREG",
-	"PSOREG",
-	"PPOREG",
-	"UOREG4K",
-	"UOREG8K",
-	"UOREG16K",
-	"UOREG32K",
-	"UOREG64K",
-	"LOREG",
-	"ADDR",
-	"ROFF",
-	"GOK",
-	"TEXTSIZE",
-	"NCLASS",
-}
diff --git a/src/cmd/internal/obj/arm64/asm7.go b/src/cmd/internal/obj/arm64/asm7.go
deleted file mode 100644
index ab0f7ae..0000000
--- a/src/cmd/internal/obj/arm64/asm7.go
+++ /dev/null
@@ -1,4158 +0,0 @@
-// cmd/7l/asm.c, cmd/7l/asmout.c, cmd/7l/optab.c, cmd/7l/span.c, cmd/ld/sub.c, cmd/ld/mod.c, from Vita Nuova.
-// https://code.google.com/p/ken-cc/source/browse/
-//
-// 	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-// 	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-// 	Portions Copyright © 1997-1999 Vita Nuova Limited
-// 	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-// 	Portions Copyright © 2004,2006 Bruce Ellis
-// 	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-// 	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-// 	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package arm64
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-	"log"
-	"math"
-	"sort"
-)
-
-const (
-	FuncAlign = 16
-)
-
-const (
-	REGFROM = 1
-)
-
-type Optab struct {
-	as    uint16
-	a1    uint8
-	a2    uint8
-	a3    uint8
-	type_ int8
-	size  int8
-	param int16
-	flag  int8
-	scond uint16
-}
-
-type Oprange struct {
-	start []Optab
-	stop  []Optab
-}
-
-var oprange [ALAST]Oprange
-
-var xcmp [C_NCLASS][C_NCLASS]uint8
-
-const (
-	S32     = 0 << 31
-	S64     = 1 << 31
-	Sbit    = 1 << 29
-	LSL0_32 = 2 << 13
-	LSL0_64 = 3 << 13
-)
-
-func OPDP2(x uint32) uint32 {
-	return 0<<30 | 0<<29 | 0xd6<<21 | x<<10
-}
-
-func OPDP3(sf uint32, op54 uint32, op31 uint32, o0 uint32) uint32 {
-	return sf<<31 | op54<<29 | 0x1B<<24 | op31<<21 | o0<<15
-}
-
-func OPBcc(x uint32) uint32 {
-	return 0x2A<<25 | 0<<24 | 0<<4 | x&15
-}
-
-func OPBLR(x uint32) uint32 {
-	/* x=0, JMP; 1, CALL; 2, RET */
-	return 0x6B<<25 | 0<<23 | x<<21 | 0x1F<<16 | 0<<10
-}
-
-func SYSOP(l uint32, op0 uint32, op1 uint32, crn uint32, crm uint32, op2 uint32, rt uint32) uint32 {
-	return 0x354<<22 | l<<21 | op0<<19 | op1<<16 | crn&15<<12 | crm&15<<8 | op2<<5 | rt
-}
-
-func SYSHINT(x uint32) uint32 {
-	return SYSOP(0, 0, 3, 2, 0, x, 0x1F)
-}
-
-func LDSTR12U(sz uint32, v uint32, opc uint32) uint32 {
-	return sz<<30 | 7<<27 | v<<26 | 1<<24 | opc<<22
-}
-
-func LDSTR9S(sz uint32, v uint32, opc uint32) uint32 {
-	return sz<<30 | 7<<27 | v<<26 | 0<<24 | opc<<22
-}
-
-func LD2STR(o uint32) uint32 {
-	return o &^ (3 << 22)
-}
-
-func LDSTX(sz uint32, o2 uint32, l uint32, o1 uint32, o0 uint32) uint32 {
-	return sz<<30 | 0x8<<24 | o2<<23 | l<<22 | o1<<21 | o0<<15
-}
-
-func FPCMP(m uint32, s uint32, type_ uint32, op uint32, op2 uint32) uint32 {
-	return m<<31 | s<<29 | 0x1E<<24 | type_<<22 | 1<<21 | op<<14 | 8<<10 | op2
-}
-
-func FPCCMP(m uint32, s uint32, type_ uint32, op uint32) uint32 {
-	return m<<31 | s<<29 | 0x1E<<24 | type_<<22 | 1<<21 | 1<<10 | op<<4
-}
-
-func FPOP1S(m uint32, s uint32, type_ uint32, op uint32) uint32 {
-	return m<<31 | s<<29 | 0x1E<<24 | type_<<22 | 1<<21 | op<<15 | 0x10<<10
-}
-
-func FPOP2S(m uint32, s uint32, type_ uint32, op uint32) uint32 {
-	return m<<31 | s<<29 | 0x1E<<24 | type_<<22 | 1<<21 | op<<12 | 2<<10
-}
-
-func FPCVTI(sf uint32, s uint32, type_ uint32, rmode uint32, op uint32) uint32 {
-	return sf<<31 | s<<29 | 0x1E<<24 | type_<<22 | 1<<21 | rmode<<19 | op<<16 | 0<<10
-}
-
-func ADR(p uint32, o uint32, rt uint32) uint32 {
-	return p<<31 | (o&3)<<29 | 0x10<<24 | ((o>>2)&0x7FFFF)<<5 | rt&31
-}
-
-func OPBIT(x uint32) uint32 {
-	return 1<<30 | 0<<29 | 0xD6<<21 | 0<<16 | x<<10
-}
-
-const (
-	LFROM = 1 << 0
-	LTO   = 1 << 1
-	LPOOL = 1 << 2
-)
-
-var optab = []Optab{
-	/* struct Optab:
-	OPCODE, from, prog->reg, to, type,size,param,flag,scond */
-	{obj.ATEXT, C_ADDR, C_NONE, C_TEXTSIZE, 0, 0, 0, 0, 0},
-
-	/* arithmetic operations */
-	{AADD, C_REG, C_REG, C_REG, 1, 4, 0, 0, 0},
-	{AADD, C_REG, C_NONE, C_REG, 1, 4, 0, 0, 0},
-	{AADC, C_REG, C_REG, C_REG, 1, 4, 0, 0, 0},
-	{AADC, C_REG, C_NONE, C_REG, 1, 4, 0, 0, 0},
-	{ANEG, C_REG, C_NONE, C_REG, 25, 4, 0, 0, 0},
-	{ANGC, C_REG, C_NONE, C_REG, 17, 4, 0, 0, 0},
-	{ACMP, C_REG, C_REG, C_NONE, 1, 4, 0, 0, 0},
-	{AADD, C_ADDCON, C_RSP, C_RSP, 2, 4, 0, 0, 0},
-	{AADD, C_ADDCON, C_NONE, C_RSP, 2, 4, 0, 0, 0},
-	{ACMP, C_ADDCON, C_RSP, C_NONE, 2, 4, 0, 0, 0},
-	// TODO: these don't work properly.
-	// {AADD, C_MBCON, C_RSP, C_RSP, 2, 4, 0, 0, 0},
-	// {AADD, C_MBCON, C_NONE, C_RSP, 2, 4, 0, 0, 0},
-	// {ACMP, C_MBCON, C_RSP, C_NONE, 2, 4, 0, 0, 0},
-	{AADD, C_VCON, C_RSP, C_RSP, 13, 8, 0, LFROM, 0},
-	{AADD, C_VCON, C_NONE, C_RSP, 13, 8, 0, LFROM, 0},
-	{ACMP, C_VCON, C_REG, C_NONE, 13, 8, 0, LFROM, 0},
-	{AADD, C_SHIFT, C_REG, C_REG, 3, 4, 0, 0, 0},
-	{AADD, C_SHIFT, C_NONE, C_REG, 3, 4, 0, 0, 0},
-	{AMVN, C_SHIFT, C_NONE, C_REG, 3, 4, 0, 0, 0},
-	{ACMP, C_SHIFT, C_REG, C_NONE, 3, 4, 0, 0, 0},
-	{ANEG, C_SHIFT, C_NONE, C_REG, 26, 4, 0, 0, 0},
-	{AADD, C_REG, C_RSP, C_RSP, 27, 4, 0, 0, 0},
-	{AADD, C_REG, C_NONE, C_RSP, 27, 4, 0, 0, 0},
-	{ACMP, C_REG, C_RSP, C_NONE, 27, 4, 0, 0, 0},
-	{AADD, C_EXTREG, C_RSP, C_RSP, 27, 4, 0, 0, 0},
-	{AADD, C_EXTREG, C_NONE, C_RSP, 27, 4, 0, 0, 0},
-	{AMVN, C_EXTREG, C_NONE, C_RSP, 27, 4, 0, 0, 0},
-	{ACMP, C_EXTREG, C_RSP, C_NONE, 27, 4, 0, 0, 0},
-	{AADD, C_REG, C_REG, C_REG, 1, 4, 0, 0, 0},
-	{AADD, C_REG, C_NONE, C_REG, 1, 4, 0, 0, 0},
-
-	/* logical operations */
-	{AAND, C_REG, C_REG, C_REG, 1, 4, 0, 0, 0},
-	{AAND, C_REG, C_NONE, C_REG, 1, 4, 0, 0, 0},
-	{ABIC, C_REG, C_REG, C_REG, 1, 4, 0, 0, 0},
-	{ABIC, C_REG, C_NONE, C_REG, 1, 4, 0, 0, 0},
-	// TODO: these don't work properly.
-	// {AAND, C_BITCON, C_REG, C_REG, 53, 4, 0, 0, 0},
-	// {AAND, C_BITCON, C_NONE, C_REG, 53, 4, 0, 0, 0},
-	// {ABIC, C_BITCON, C_REG, C_REG, 53, 4, 0, 0, 0},
-	// {ABIC, C_BITCON, C_NONE, C_REG, 53, 4, 0, 0, 0},
-	{AAND, C_VCON, C_REG, C_REG, 28, 8, 0, LFROM, 0},
-	{AAND, C_VCON, C_NONE, C_REG, 28, 8, 0, LFROM, 0},
-	{ABIC, C_VCON, C_REG, C_REG, 28, 8, 0, LFROM, 0},
-	{ABIC, C_VCON, C_NONE, C_REG, 28, 8, 0, LFROM, 0},
-	{AAND, C_SHIFT, C_REG, C_REG, 3, 4, 0, 0, 0},
-	{AAND, C_SHIFT, C_NONE, C_REG, 3, 4, 0, 0, 0},
-	{ABIC, C_SHIFT, C_REG, C_REG, 3, 4, 0, 0, 0},
-	{ABIC, C_SHIFT, C_NONE, C_REG, 3, 4, 0, 0, 0},
-	{AMOVD, C_RSP, C_NONE, C_RSP, 24, 4, 0, 0, 0},
-	{AMVN, C_REG, C_NONE, C_REG, 24, 4, 0, 0, 0},
-	{AMOVB, C_REG, C_NONE, C_REG, 45, 4, 0, 0, 0},
-	{AMOVBU, C_REG, C_NONE, C_REG, 45, 4, 0, 0, 0},
-	{AMOVH, C_REG, C_NONE, C_REG, 45, 4, 0, 0, 0}, /* also MOVHU */
-	{AMOVW, C_REG, C_NONE, C_REG, 45, 4, 0, 0, 0}, /* also MOVWU */
-	/* TODO: MVN C_SHIFT */
-
-	/* MOVs that become MOVK/MOVN/MOVZ/ADD/SUB/OR */
-	{AMOVW, C_MOVCON, C_NONE, C_REG, 32, 4, 0, 0, 0},
-	{AMOVD, C_MOVCON, C_NONE, C_REG, 32, 4, 0, 0, 0},
-
-	// TODO: these don't work properly.
-	// { AMOVW,		C_ADDCON,	C_NONE,	C_REG,		2, 4, 0 , 0},
-	// { AMOVD,		C_ADDCON,	C_NONE,	C_REG,		2, 4, 0 , 0},
-	// { AMOVW,		C_BITCON,	C_NONE,	C_REG,		53, 4, 0 , 0},
-	// { AMOVD,		C_BITCON,	C_NONE,	C_REG,		53, 4, 0 , 0},
-
-	{AMOVK, C_VCON, C_NONE, C_REG, 33, 4, 0, 0, 0},
-	{AMOVD, C_AACON, C_NONE, C_REG, 4, 4, REGFROM, 0, 0},
-	{ASDIV, C_REG, C_NONE, C_REG, 1, 4, 0, 0, 0},
-	{ASDIV, C_REG, C_REG, C_REG, 1, 4, 0, 0, 0},
-	{AB, C_NONE, C_NONE, C_SBRA, 5, 4, 0, 0, 0},
-	{ABL, C_NONE, C_NONE, C_SBRA, 5, 4, 0, 0, 0},
-	{AB, C_NONE, C_NONE, C_ZOREG, 6, 4, 0, 0, 0},
-	{ABL, C_NONE, C_NONE, C_REG, 6, 4, 0, 0, 0},
-	{ABL, C_REG, C_NONE, C_REG, 6, 4, 0, 0, 0},
-	{ABL, C_NONE, C_NONE, C_ZOREG, 6, 4, 0, 0, 0},
-	{obj.ARET, C_NONE, C_NONE, C_REG, 6, 4, 0, 0, 0},
-	{obj.ARET, C_NONE, C_NONE, C_ZOREG, 6, 4, 0, 0, 0},
-	{AADRP, C_SBRA, C_NONE, C_REG, 60, 4, 0, 0, 0},
-	{AADR, C_SBRA, C_NONE, C_REG, 61, 4, 0, 0, 0},
-	{ABFM, C_VCON, C_REG, C_REG, 42, 4, 0, 0, 0},
-	{ABFI, C_VCON, C_REG, C_REG, 43, 4, 0, 0, 0},
-	{AEXTR, C_VCON, C_REG, C_REG, 44, 4, 0, 0, 0},
-	{ASXTB, C_REG, C_NONE, C_REG, 45, 4, 0, 0, 0},
-	{ACLS, C_REG, C_NONE, C_REG, 46, 4, 0, 0, 0},
-	{ABEQ, C_NONE, C_NONE, C_SBRA, 7, 4, 0, 0, 0},
-	{ALSL, C_VCON, C_REG, C_REG, 8, 4, 0, 0, 0},
-	{ALSL, C_VCON, C_NONE, C_REG, 8, 4, 0, 0, 0},
-	{ALSL, C_REG, C_NONE, C_REG, 9, 4, 0, 0, 0},
-	{ALSL, C_REG, C_REG, C_REG, 9, 4, 0, 0, 0},
-	{ASVC, C_NONE, C_NONE, C_VCON, 10, 4, 0, 0, 0},
-	{ASVC, C_NONE, C_NONE, C_NONE, 10, 4, 0, 0, 0},
-	{ADWORD, C_NONE, C_NONE, C_VCON, 11, 8, 0, 0, 0},
-	{ADWORD, C_NONE, C_NONE, C_LEXT, 11, 8, 0, 0, 0},
-	{ADWORD, C_NONE, C_NONE, C_ADDR, 11, 8, 0, 0, 0},
-	{ADWORD, C_NONE, C_NONE, C_LACON, 11, 8, 0, 0, 0},
-	{AWORD, C_NONE, C_NONE, C_LCON, 14, 4, 0, 0, 0},
-	{AWORD, C_NONE, C_NONE, C_LEXT, 14, 4, 0, 0, 0},
-	{AWORD, C_NONE, C_NONE, C_ADDR, 14, 4, 0, 0, 0},
-	{AMOVW, C_VCON, C_NONE, C_REG, 12, 4, 0, LFROM, 0},
-	{AMOVW, C_VCONADDR, C_NONE, C_REG, 68, 8, 0, 0, 0},
-	{AMOVD, C_VCON, C_NONE, C_REG, 12, 4, 0, LFROM, 0},
-	{AMOVD, C_VCONADDR, C_NONE, C_REG, 68, 8, 0, 0, 0},
-	{AMOVB, C_REG, C_NONE, C_ADDR, 64, 12, 0, 0, 0},
-	{AMOVBU, C_REG, C_NONE, C_ADDR, 64, 12, 0, 0, 0},
-	{AMOVH, C_REG, C_NONE, C_ADDR, 64, 12, 0, 0, 0},
-	{AMOVW, C_REG, C_NONE, C_ADDR, 64, 12, 0, 0, 0},
-	{AMOVD, C_REG, C_NONE, C_ADDR, 64, 12, 0, 0, 0},
-	{AMOVB, C_ADDR, C_NONE, C_REG, 65, 12, 0, 0, 0},
-	{AMOVBU, C_ADDR, C_NONE, C_REG, 65, 12, 0, 0, 0},
-	{AMOVH, C_ADDR, C_NONE, C_REG, 65, 12, 0, 0, 0},
-	{AMOVW, C_ADDR, C_NONE, C_REG, 65, 12, 0, 0, 0},
-	{AMOVD, C_ADDR, C_NONE, C_REG, 65, 12, 0, 0, 0},
-	{AMUL, C_REG, C_REG, C_REG, 15, 4, 0, 0, 0},
-	{AMUL, C_REG, C_NONE, C_REG, 15, 4, 0, 0, 0},
-	{AMADD, C_REG, C_REG, C_REG, 15, 4, 0, 0, 0},
-	{AREM, C_REG, C_REG, C_REG, 16, 8, 0, 0, 0},
-	{AREM, C_REG, C_NONE, C_REG, 16, 8, 0, 0, 0},
-	{ACSEL, C_COND, C_REG, C_REG, 18, 4, 0, 0, 0}, /* from3 optional */
-	{ACSET, C_COND, C_NONE, C_REG, 18, 4, 0, 0, 0},
-	{ACCMN, C_COND, C_REG, C_VCON, 19, 4, 0, 0, 0}, /* from3 either C_REG or C_VCON */
-
-	/* scaled 12-bit unsigned displacement store */
-	{AMOVB, C_REG, C_NONE, C_UAUTO4K, 20, 4, REGSP, 0, 0},
-	{AMOVB, C_REG, C_NONE, C_UOREG4K, 20, 4, 0, 0, 0},
-	{AMOVBU, C_REG, C_NONE, C_UAUTO4K, 20, 4, REGSP, 0, 0},
-	{AMOVBU, C_REG, C_NONE, C_UOREG4K, 20, 4, 0, 0, 0},
-
-	{AMOVH, C_REG, C_NONE, C_UAUTO8K, 20, 4, REGSP, 0, 0},
-	{AMOVH, C_REG, C_NONE, C_ZOREG, 20, 4, 0, 0, 0},
-	{AMOVH, C_REG, C_NONE, C_UOREG8K, 20, 4, 0, 0, 0},
-
-	{AMOVW, C_REG, C_NONE, C_UAUTO16K, 20, 4, REGSP, 0, 0},
-	{AMOVW, C_REG, C_NONE, C_ZOREG, 20, 4, 0, 0, 0},
-	{AMOVW, C_REG, C_NONE, C_UOREG16K, 20, 4, 0, 0, 0},
-
-	/* unscaled 9-bit signed displacement store */
-	{AMOVB, C_REG, C_NONE, C_NSAUTO, 20, 4, REGSP, 0, 0},
-	{AMOVB, C_REG, C_NONE, C_NSOREG, 20, 4, 0, 0, 0},
-	{AMOVBU, C_REG, C_NONE, C_NSAUTO, 20, 4, REGSP, 0, 0},
-	{AMOVBU, C_REG, C_NONE, C_NSOREG, 20, 4, 0, 0, 0},
-
-	{AMOVH, C_REG, C_NONE, C_NSAUTO, 20, 4, REGSP, 0, 0},
-	{AMOVH, C_REG, C_NONE, C_NSOREG, 20, 4, 0, 0, 0},
-	{AMOVW, C_REG, C_NONE, C_NSAUTO, 20, 4, REGSP, 0, 0},
-	{AMOVW, C_REG, C_NONE, C_NSOREG, 20, 4, 0, 0, 0},
-
-	{AMOVD, C_REG, C_NONE, C_UAUTO32K, 20, 4, REGSP, 0, 0},
-	{AMOVD, C_REG, C_NONE, C_ZOREG, 20, 4, 0, 0, 0},
-	{AMOVD, C_REG, C_NONE, C_UOREG32K, 20, 4, 0, 0, 0},
-	{AMOVD, C_REG, C_NONE, C_NSOREG, 20, 4, 0, 0, 0},
-	{AMOVD, C_REG, C_NONE, C_NSAUTO, 20, 4, REGSP, 0, 0},
-
-	/* short displacement load */
-	{AMOVB, C_UAUTO4K, C_NONE, C_REG, 21, 4, REGSP, 0, 0},
-	{AMOVB, C_NSAUTO, C_NONE, C_REG, 21, 4, REGSP, 0, 0},
-	{AMOVB, C_ZOREG, C_NONE, C_REG, 21, 4, 0, 0, 0},
-	{AMOVB, C_UOREG4K, C_NONE, C_REG, 21, 4, REGSP, 0, 0},
-	{AMOVB, C_NSOREG, C_NONE, C_REG, 21, 4, REGSP, 0, 0},
-
-	{AMOVBU, C_UAUTO4K, C_NONE, C_REG, 21, 4, REGSP, 0, 0},
-	{AMOVBU, C_NSAUTO, C_NONE, C_REG, 21, 4, REGSP, 0, 0},
-	{AMOVBU, C_ZOREG, C_NONE, C_REG, 21, 4, 0, 0, 0},
-	{AMOVBU, C_UOREG4K, C_NONE, C_REG, 21, 4, REGSP, 0, 0},
-	{AMOVBU, C_NSOREG, C_NONE, C_REG, 21, 4, REGSP, 0, 0},
-
-	{AMOVH, C_UAUTO8K, C_NONE, C_REG, 21, 4, REGSP, 0, 0},
-	{AMOVH, C_NSAUTO, C_NONE, C_REG, 21, 4, REGSP, 0, 0},
-	{AMOVH, C_ZOREG, C_NONE, C_REG, 21, 4, 0, 0, 0},
-	{AMOVH, C_UOREG8K, C_NONE, C_REG, 21, 4, REGSP, 0, 0},
-	{AMOVH, C_NSOREG, C_NONE, C_REG, 21, 4, REGSP, 0, 0},
-
-	{AMOVW, C_UAUTO16K, C_NONE, C_REG, 21, 4, REGSP, 0, 0},
-	{AMOVW, C_NSAUTO, C_NONE, C_REG, 21, 4, REGSP, 0, 0},
-	{AMOVW, C_ZOREG, C_NONE, C_REG, 21, 4, 0, 0, 0},
-	{AMOVW, C_UOREG16K, C_NONE, C_REG, 21, 4, REGSP, 0, 0},
-	{AMOVW, C_NSOREG, C_NONE, C_REG, 21, 4, REGSP, 0, 0},
-
-	{AMOVD, C_UAUTO32K, C_NONE, C_REG, 21, 4, REGSP, 0, 0},
-	{AMOVD, C_NSAUTO, C_NONE, C_REG, 21, 4, REGSP, 0, 0},
-	{AMOVD, C_ZOREG, C_NONE, C_REG, 21, 4, 0, 0, 0},
-	{AMOVD, C_UOREG32K, C_NONE, C_REG, 21, 4, REGSP, 0, 0},
-	{AMOVD, C_NSOREG, C_NONE, C_REG, 21, 4, REGSP, 0, 0},
-
-	/* long displacement store */
-	{AMOVB, C_REG, C_NONE, C_LAUTO, 30, 8, REGSP, 0, 0},
-	{AMOVB, C_REG, C_NONE, C_LOREG, 30, 8, 0, 0, 0},
-	{AMOVBU, C_REG, C_NONE, C_LAUTO, 30, 8, REGSP, 0, 0},
-	{AMOVBU, C_REG, C_NONE, C_LOREG, 30, 8, 0, 0, 0},
-	{AMOVH, C_REG, C_NONE, C_LAUTO, 30, 8, REGSP, 0, 0},
-	{AMOVH, C_REG, C_NONE, C_LOREG, 30, 8, 0, 0, 0},
-	{AMOVW, C_REG, C_NONE, C_LAUTO, 30, 8, REGSP, 0, 0},
-	{AMOVW, C_REG, C_NONE, C_LOREG, 30, 8, 0, 0, 0},
-	{AMOVD, C_REG, C_NONE, C_LAUTO, 30, 8, REGSP, 0, 0},
-	{AMOVD, C_REG, C_NONE, C_LOREG, 30, 8, 0, 0, 0},
-
-	/* long displacement load */
-	{AMOVB, C_LAUTO, C_NONE, C_REG, 31, 8, REGSP, 0, 0},
-	{AMOVB, C_LOREG, C_NONE, C_REG, 31, 8, 0, 0, 0},
-	{AMOVB, C_LOREG, C_NONE, C_REG, 31, 8, 0, 0, 0},
-	{AMOVBU, C_LAUTO, C_NONE, C_REG, 31, 8, REGSP, 0, 0},
-	{AMOVBU, C_LOREG, C_NONE, C_REG, 31, 8, 0, 0, 0},
-	{AMOVBU, C_LOREG, C_NONE, C_REG, 31, 8, 0, 0, 0},
-	{AMOVH, C_LAUTO, C_NONE, C_REG, 31, 8, REGSP, 0, 0},
-	{AMOVH, C_LOREG, C_NONE, C_REG, 31, 8, 0, 0, 0},
-	{AMOVH, C_LOREG, C_NONE, C_REG, 31, 8, 0, 0, 0},
-	{AMOVW, C_LAUTO, C_NONE, C_REG, 31, 8, REGSP, 0, 0},
-	{AMOVW, C_LOREG, C_NONE, C_REG, 31, 8, 0, 0, 0},
-	{AMOVW, C_LOREG, C_NONE, C_REG, 31, 8, 0, 0, 0},
-	{AMOVD, C_LAUTO, C_NONE, C_REG, 31, 8, REGSP, 0, 0},
-	{AMOVD, C_LOREG, C_NONE, C_REG, 31, 8, 0, 0, 0},
-	{AMOVD, C_LOREG, C_NONE, C_REG, 31, 8, 0, 0, 0},
-
-	/* load long effective stack address (load int32 offset and add) */
-	{AMOVD, C_LACON, C_NONE, C_REG, 34, 8, REGSP, LFROM, 0},
-
-	/* pre/post-indexed load (unscaled, signed 9-bit offset) */
-	{AMOVD, C_LOREG, C_NONE, C_REG, 22, 4, 0, 0, C_XPOST},
-	{AMOVW, C_LOREG, C_NONE, C_REG, 22, 4, 0, 0, C_XPOST},
-	{AMOVH, C_LOREG, C_NONE, C_REG, 22, 4, 0, 0, C_XPOST},
-	{AMOVB, C_LOREG, C_NONE, C_REG, 22, 4, 0, 0, C_XPOST},
-	{AMOVBU, C_LOREG, C_NONE, C_REG, 22, 4, 0, 0, C_XPOST},
-	{AFMOVS, C_LOREG, C_NONE, C_FREG, 22, 4, 0, 0, C_XPOST},
-	{AFMOVD, C_LOREG, C_NONE, C_FREG, 22, 4, 0, 0, C_XPOST},
-	{AMOVD, C_LOREG, C_NONE, C_REG, 22, 4, 0, 0, C_XPRE},
-	{AMOVW, C_LOREG, C_NONE, C_REG, 22, 4, 0, 0, C_XPRE},
-	{AMOVH, C_LOREG, C_NONE, C_REG, 22, 4, 0, 0, C_XPRE},
-	{AMOVB, C_LOREG, C_NONE, C_REG, 22, 4, 0, 0, C_XPRE},
-	{AMOVBU, C_LOREG, C_NONE, C_REG, 22, 4, 0, 0, C_XPRE},
-	{AFMOVS, C_LOREG, C_NONE, C_FREG, 22, 4, 0, 0, C_XPRE},
-	{AFMOVD, C_LOREG, C_NONE, C_FREG, 22, 4, 0, 0, C_XPRE},
-
-	/* pre/post-indexed store (unscaled, signed 9-bit offset) */
-	{AMOVD, C_REG, C_NONE, C_LOREG, 23, 4, 0, 0, C_XPOST},
-	{AMOVW, C_REG, C_NONE, C_LOREG, 23, 4, 0, 0, C_XPOST},
-	{AMOVH, C_REG, C_NONE, C_LOREG, 23, 4, 0, 0, C_XPOST},
-	{AMOVB, C_REG, C_NONE, C_LOREG, 23, 4, 0, 0, C_XPOST},
-	{AMOVBU, C_REG, C_NONE, C_LOREG, 23, 4, 0, 0, C_XPOST},
-	{AFMOVS, C_FREG, C_NONE, C_LOREG, 23, 4, 0, 0, C_XPOST},
-	{AFMOVD, C_FREG, C_NONE, C_LOREG, 23, 4, 0, 0, C_XPOST},
-	{AMOVD, C_REG, C_NONE, C_LOREG, 23, 4, 0, 0, C_XPRE},
-	{AMOVW, C_REG, C_NONE, C_LOREG, 23, 4, 0, 0, C_XPRE},
-	{AMOVH, C_REG, C_NONE, C_LOREG, 23, 4, 0, 0, C_XPRE},
-	{AMOVB, C_REG, C_NONE, C_LOREG, 23, 4, 0, 0, C_XPRE},
-	{AMOVBU, C_REG, C_NONE, C_LOREG, 23, 4, 0, 0, C_XPRE},
-	{AFMOVS, C_FREG, C_NONE, C_LOREG, 23, 4, 0, 0, C_XPRE},
-	{AFMOVD, C_FREG, C_NONE, C_LOREG, 23, 4, 0, 0, C_XPRE},
-
-	/* pre/post-indexed load/store register pair
-	   (unscaled, signed 10-bit quad-aligned offset) */
-	{ALDP, C_LOREG, C_NONE, C_PAIR, 66, 4, 0, 0, C_XPRE},
-	{ALDP, C_LOREG, C_NONE, C_PAIR, 66, 4, 0, 0, C_XPOST},
-	{ASTP, C_PAIR, C_NONE, C_LOREG, 67, 4, 0, 0, C_XPRE},
-	{ASTP, C_PAIR, C_NONE, C_LOREG, 67, 4, 0, 0, C_XPOST},
-
-	/* special */
-	{AMOVD, C_SPR, C_NONE, C_REG, 35, 4, 0, 0, 0},
-	{AMRS, C_SPR, C_NONE, C_REG, 35, 4, 0, 0, 0},
-	{AMOVD, C_REG, C_NONE, C_SPR, 36, 4, 0, 0, 0},
-	{AMSR, C_REG, C_NONE, C_SPR, 36, 4, 0, 0, 0},
-	{AMOVD, C_VCON, C_NONE, C_SPR, 37, 4, 0, 0, 0},
-	{AMSR, C_VCON, C_NONE, C_SPR, 37, 4, 0, 0, 0},
-	{AERET, C_NONE, C_NONE, C_NONE, 41, 4, 0, 0, 0},
-	{AFMOVS, C_FREG, C_NONE, C_UAUTO16K, 20, 4, REGSP, 0, 0},
-	{AFMOVS, C_FREG, C_NONE, C_NSAUTO, 20, 4, REGSP, 0, 0},
-	{AFMOVS, C_FREG, C_NONE, C_ZOREG, 20, 4, 0, 0, 0},
-	{AFMOVS, C_FREG, C_NONE, C_UOREG16K, 20, 4, 0, 0, 0},
-	{AFMOVS, C_FREG, C_NONE, C_NSOREG, 20, 4, 0, 0, 0},
-	{AFMOVD, C_FREG, C_NONE, C_UAUTO32K, 20, 4, REGSP, 0, 0},
-	{AFMOVD, C_FREG, C_NONE, C_NSAUTO, 20, 4, REGSP, 0, 0},
-	{AFMOVD, C_FREG, C_NONE, C_ZOREG, 20, 4, 0, 0, 0},
-	{AFMOVD, C_FREG, C_NONE, C_UOREG32K, 20, 4, 0, 0, 0},
-	{AFMOVD, C_FREG, C_NONE, C_NSOREG, 20, 4, 0, 0, 0},
-	{AFMOVS, C_UAUTO16K, C_NONE, C_FREG, 21, 4, REGSP, 0, 0},
-	{AFMOVS, C_NSAUTO, C_NONE, C_FREG, 21, 4, REGSP, 0, 0},
-	{AFMOVS, C_ZOREG, C_NONE, C_FREG, 21, 4, 0, 0, 0},
-	{AFMOVS, C_UOREG16K, C_NONE, C_FREG, 21, 4, 0, 0, 0},
-	{AFMOVS, C_NSOREG, C_NONE, C_FREG, 21, 4, 0, 0, 0},
-	{AFMOVD, C_UAUTO32K, C_NONE, C_FREG, 21, 4, REGSP, 0, 0},
-	{AFMOVD, C_NSAUTO, C_NONE, C_FREG, 21, 4, REGSP, 0, 0},
-	{AFMOVD, C_ZOREG, C_NONE, C_FREG, 21, 4, 0, 0, 0},
-	{AFMOVD, C_UOREG32K, C_NONE, C_FREG, 21, 4, 0, 0, 0},
-	{AFMOVD, C_NSOREG, C_NONE, C_FREG, 21, 4, 0, 0, 0},
-	{AFMOVS, C_FREG, C_NONE, C_LAUTO, 30, 8, REGSP, LTO, 0},
-	{AFMOVS, C_FREG, C_NONE, C_LOREG, 30, 8, 0, LTO, 0},
-	{AFMOVD, C_FREG, C_NONE, C_LAUTO, 30, 8, REGSP, LTO, 0},
-	{AFMOVD, C_FREG, C_NONE, C_LOREG, 30, 8, 0, LTO, 0},
-	{AFMOVS, C_LAUTO, C_NONE, C_FREG, 31, 8, REGSP, LFROM, 0},
-	{AFMOVS, C_LOREG, C_NONE, C_FREG, 31, 8, 0, LFROM, 0},
-	{AFMOVD, C_LAUTO, C_NONE, C_FREG, 31, 8, REGSP, LFROM, 0},
-	{AFMOVD, C_LOREG, C_NONE, C_FREG, 31, 8, 0, LFROM, 0},
-	{AFMOVS, C_FREG, C_NONE, C_ADDR, 64, 12, 0, 0, 0},
-	{AFMOVS, C_ADDR, C_NONE, C_FREG, 65, 12, 0, 0, 0},
-	{AFMOVD, C_FREG, C_NONE, C_ADDR, 64, 12, 0, 0, 0},
-	{AFMOVD, C_ADDR, C_NONE, C_FREG, 65, 12, 0, 0, 0},
-	{AFADDS, C_FREG, C_NONE, C_FREG, 54, 4, 0, 0, 0},
-	{AFADDS, C_FREG, C_FREG, C_FREG, 54, 4, 0, 0, 0},
-	{AFADDS, C_FCON, C_NONE, C_FREG, 54, 4, 0, 0, 0},
-	{AFADDS, C_FCON, C_FREG, C_FREG, 54, 4, 0, 0, 0},
-	{AFMOVS, C_FCON, C_NONE, C_FREG, 54, 4, 0, 0, 0},
-	{AFMOVS, C_FREG, C_NONE, C_FREG, 54, 4, 0, 0, 0},
-	{AFMOVD, C_FCON, C_NONE, C_FREG, 54, 4, 0, 0, 0},
-	{AFMOVD, C_FREG, C_NONE, C_FREG, 54, 4, 0, 0, 0},
-	{AFCVTZSD, C_FREG, C_NONE, C_REG, 29, 4, 0, 0, 0},
-	{ASCVTFD, C_REG, C_NONE, C_FREG, 29, 4, 0, 0, 0},
-	{AFCMPS, C_FREG, C_FREG, C_NONE, 56, 4, 0, 0, 0},
-	{AFCMPS, C_FCON, C_FREG, C_NONE, 56, 4, 0, 0, 0},
-	{AFCCMPS, C_COND, C_REG, C_VCON, 57, 4, 0, 0, 0},
-	{AFCSELD, C_COND, C_REG, C_FREG, 18, 4, 0, 0, 0},
-	{AFCVTSD, C_FREG, C_NONE, C_FREG, 29, 4, 0, 0, 0},
-	{ACASE, C_REG, C_NONE, C_REG, 62, 4 * 4, 0, 0, 0},
-	{ABCASE, C_NONE, C_NONE, C_SBRA, 63, 4, 0, 0, 0},
-	{ACLREX, C_NONE, C_NONE, C_VCON, 38, 4, 0, 0, 0},
-	{ACLREX, C_NONE, C_NONE, C_NONE, 38, 4, 0, 0, 0},
-	{ACBZ, C_REG, C_NONE, C_SBRA, 39, 4, 0, 0, 0},
-	{ATBZ, C_VCON, C_REG, C_SBRA, 40, 4, 0, 0, 0},
-	{ASYS, C_VCON, C_NONE, C_NONE, 50, 4, 0, 0, 0},
-	{ASYS, C_VCON, C_REG, C_NONE, 50, 4, 0, 0, 0},
-	{ASYSL, C_VCON, C_NONE, C_REG, 50, 4, 0, 0, 0},
-	{ADMB, C_VCON, C_NONE, C_NONE, 51, 4, 0, 0, 0},
-	{AHINT, C_VCON, C_NONE, C_NONE, 52, 4, 0, 0, 0},
-	{ALDAR, C_ZOREG, C_NONE, C_REG, 58, 4, 0, 0, 0},
-	{ALDXR, C_ZOREG, C_NONE, C_REG, 58, 4, 0, 0, 0},
-	{ALDAXR, C_ZOREG, C_NONE, C_REG, 58, 4, 0, 0, 0},
-	{ALDXP, C_ZOREG, C_REG, C_REG, 58, 4, 0, 0, 0},
-	{ASTLR, C_REG, C_NONE, C_ZOREG, 59, 4, 0, 0, 0},  // to3=C_NONE
-	{ASTXR, C_REG, C_NONE, C_ZOREG, 59, 4, 0, 0, 0},  // to3=C_REG
-	{ASTLXR, C_REG, C_NONE, C_ZOREG, 59, 4, 0, 0, 0}, // to3=C_REG
-
-	//	{ ASTXP,		C_REG, C_NONE,	C_ZOREG,		59, 4, 0 , 0}, // TODO(aram):
-
-	{AAESD, C_VREG, C_NONE, C_VREG, 29, 4, 0, 0, 0},
-	{ASHA1C, C_VREG, C_REG, C_VREG, 1, 4, 0, 0, 0},
-
-	{obj.AUNDEF, C_NONE, C_NONE, C_NONE, 90, 4, 0, 0, 0},
-	{obj.AUSEFIELD, C_ADDR, C_NONE, C_NONE, 0, 0, 0, 0, 0},
-	{obj.APCDATA, C_VCON, C_NONE, C_VCON, 0, 0, 0, 0, 0},
-	{obj.AFUNCDATA, C_VCON, C_NONE, C_ADDR, 0, 0, 0, 0, 0},
-	{obj.ANOP, C_NONE, C_NONE, C_NONE, 0, 0, 0, 0, 0},
-	{obj.ADUFFZERO, C_NONE, C_NONE, C_SBRA, 5, 4, 0, 0, 0}, // same as AB/ABL
-	{obj.ADUFFCOPY, C_NONE, C_NONE, C_SBRA, 5, 4, 0, 0, 0}, // same as AB/ABL
-
-	{obj.AXXX, C_NONE, C_NONE, C_NONE, 0, 4, 0, 0, 0},
-}
-
-/*
- * valid pstate field values, and value to use in instruction
- */
-var pstatefield = []struct {
-	a uint32
-	b uint32
-}{
-	{REG_SPSel, 0<<16 | 4<<12 | 5<<5},
-	{REG_DAIFSet, 3<<16 | 4<<12 | 6<<5},
-	{REG_DAIFClr, 3<<16 | 4<<12 | 7<<5},
-}
-
-var pool struct {
-	start uint32
-	size  uint32
-}
-
-func prasm(p *obj.Prog) {
-	fmt.Printf("%v\n", p)
-}
-
-func span7(ctxt *obj.Link, cursym *obj.LSym) {
-	p := cursym.Text
-	if p == nil || p.Link == nil { // handle external functions and ELF section symbols
-		return
-	}
-	ctxt.Cursym = cursym
-	ctxt.Autosize = int32(p.To.Offset&0xffffffff) + 8
-
-	if oprange[AAND].start == nil {
-		buildop(ctxt)
-	}
-
-	bflag := 0
-	c := int32(0)
-	p.Pc = int64(c)
-	var m int
-	var o *Optab
-	for p = p.Link; p != nil; p = p.Link {
-		ctxt.Curp = p
-		if p.As == ADWORD && (c&7) != 0 {
-			c += 4
-		}
-		p.Pc = int64(c)
-		o = oplook(ctxt, p)
-		m = int(o.size)
-		if m == 0 {
-			if p.As != obj.ANOP && p.As != obj.AFUNCDATA && p.As != obj.APCDATA {
-				ctxt.Diag("zero-width instruction\n%v", p)
-			}
-			continue
-		}
-
-		switch o.flag & (LFROM | LTO) {
-		case LFROM:
-			addpool(ctxt, p, &p.From)
-
-		case LTO:
-			addpool(ctxt, p, &p.To)
-			break
-		}
-
-		if p.As == AB || p.As == obj.ARET || p.As == AERET { /* TODO: other unconditional operations */
-			checkpool(ctxt, p, 0)
-		}
-		c += int32(m)
-		if ctxt.Blitrl != nil {
-			checkpool(ctxt, p, 1)
-		}
-	}
-
-	cursym.Size = int64(c)
-
-	/*
-	 * if any procedure is large enough to
-	 * generate a large SBRA branch, then
-	 * generate extra passes putting branches
-	 * around jmps to fix. this is rare.
-	 */
-	for bflag != 0 {
-		bflag = 0
-		c = 0
-		for p = cursym.Text; p != nil; p = p.Link {
-			if p.As == ADWORD && (c&7) != 0 {
-				c += 4
-			}
-			p.Pc = int64(c)
-			o = oplook(ctxt, p)
-
-			/* very large branches
-			if(o->type == 6 && p->cond) {
-				otxt = p->cond->pc - c;
-				if(otxt < 0)
-					otxt = -otxt;
-				if(otxt >= (1L<<17) - 10) {
-					q = ctxt->arch->prg();
-					q->link = p->link;
-					p->link = q;
-					q->as = AB;
-					q->to.type = obj.TYPE_BRANCH;
-					q->cond = p->cond;
-					p->cond = q;
-					q = ctxt->arch->prg();
-					q->link = p->link;
-					p->link = q;
-					q->as = AB;
-					q->to.type = obj.TYPE_BRANCH;
-					q->cond = q->link->link;
-					bflag = 1;
-				}
-			}
-			*/
-			m = int(o.size)
-
-			if m == 0 {
-				if p.As != obj.ANOP && p.As != obj.AFUNCDATA && p.As != obj.APCDATA {
-					ctxt.Diag("zero-width instruction\n%v", p)
-				}
-				continue
-			}
-
-			c += int32(m)
-		}
-	}
-
-	c += -c & (FuncAlign - 1)
-	cursym.Size = int64(c)
-
-	/*
-	 * lay out the code, emitting code and data relocations.
-	 */
-	if ctxt.Tlsg == nil {
-		ctxt.Tlsg = obj.Linklookup(ctxt, "runtime.tlsg", 0)
-	}
-	obj.Symgrow(ctxt, cursym, cursym.Size)
-	bp := cursym.P
-	psz := int32(0)
-	var i int
-	var out [6]uint32
-	for p := cursym.Text.Link; p != nil; p = p.Link {
-		ctxt.Pc = p.Pc
-		ctxt.Curp = p
-		o = oplook(ctxt, p)
-
-		// need to align DWORDs on 8-byte boundary. The ISA doesn't
-		// require it, but the various 64-bit loads we generate assume it.
-		if o.as == ADWORD && psz%8 != 0 {
-			bp[3] = 0
-			bp[2] = bp[3]
-			bp[1] = bp[2]
-			bp[0] = bp[1]
-			bp = bp[4:]
-			psz += 4
-		}
-
-		if int(o.size) > 4*len(out) {
-			log.Fatalf("out array in span7 is too small, need at least %d for %v", o.size/4, p)
-		}
-		asmout(ctxt, p, o, out[:])
-		for i = 0; i < int(o.size/4); i++ {
-			ctxt.Arch.ByteOrder.PutUint32(bp, out[i])
-			bp = bp[4:]
-			psz += 4
-		}
-	}
-}
-
-/*
- * when the first reference to the literal pool threatens
- * to go out of range of a 1Mb PC-relative offset
- * drop the pool now, and branch round it.
- */
-func checkpool(ctxt *obj.Link, p *obj.Prog, skip int) {
-	if pool.size >= 0xffff0 || !(ispcdisp(int32(p.Pc+4+int64(pool.size)-int64(pool.start)+8)) != 0) {
-		flushpool(ctxt, p, skip)
-	} else if p.Link == nil {
-		flushpool(ctxt, p, 2)
-	}
-}
-
-func flushpool(ctxt *obj.Link, p *obj.Prog, skip int) {
-	if ctxt.Blitrl != nil {
-		if skip != 0 {
-			if ctxt.Debugvlog != 0 && skip == 1 {
-				fmt.Printf("note: flush literal pool at %#x: len=%d ref=%x\n", uint64(p.Pc+4), pool.size, pool.start)
-			}
-			q := ctxt.NewProg()
-			q.As = AB
-			q.To.Type = obj.TYPE_BRANCH
-			q.Pcond = p.Link
-			q.Link = ctxt.Blitrl
-			q.Lineno = p.Lineno
-			ctxt.Blitrl = q
-		} else if p.Pc+int64(pool.size)-int64(pool.start) < 1024*1024 {
-			return
-		}
-
-		// The line number for constant pool entries doesn't really matter.
-		// We set it to the line number of the preceding instruction so that
-		// there are no deltas to encode in the pc-line tables.
-		for q := ctxt.Blitrl; q != nil; q = q.Link {
-			q.Lineno = p.Lineno
-		}
-
-		ctxt.Elitrl.Link = p.Link
-		p.Link = ctxt.Blitrl
-
-		ctxt.Blitrl = nil /* BUG: should refer back to values until out-of-range */
-		ctxt.Elitrl = nil
-		pool.size = 0
-		pool.start = 0
-	}
-}
-
-/*
- * TODO: hash
- */
-func addpool(ctxt *obj.Link, p *obj.Prog, a *obj.Addr) {
-	c := aclass(ctxt, a)
-	t := *ctxt.NewProg()
-	t.As = AWORD
-	sz := 4
-
-	// MOVW foo(SB), R is actually
-	//	MOV addr, REGTEMP
-	//	MOVW REGTEMP, R
-	// where addr is the address of the DWORD containing the address of foo.
-	if p.As == AMOVD || c == C_ADDR || c == C_VCON {
-		t.As = ADWORD
-		sz = 8
-	}
-
-	switch c {
-	// TODO(aram): remove.
-	default:
-		if a.Name != obj.NAME_EXTERN {
-			fmt.Printf("addpool: %v in %v shouldn't go to default case\n", DRconv(c), p)
-		}
-
-		t.To.Offset = a.Offset
-		t.To.Sym = a.Sym
-		t.To.Type = a.Type
-		t.To.Name = a.Name
-
-		/* This is here to work around a bug where we generate negative
-		operands that match C_MOVCON, but we use them with
-		instructions that only accept unsigned immediates. This
-		will cause oplook to return a variant of the instruction
-		that loads the negative constant from memory, rather than
-		using the immediate form. Because of that load, we get here,
-		so we need to know what to do with C_MOVCON.
-
-		The correct fix is to use the "negation" instruction variant,
-		e.g. CMN $1, R instead of CMP $-1, R, or SUB $1, R instead
-		of ADD $-1, R. */
-	case C_MOVCON,
-
-		/* This is here because MOV uint12<<12, R is disabled in optab.
-		Because of this, we need to load the constant from memory. */
-		C_ADDCON,
-
-		/* These are here because they are disabled in optab.
-		Because of this, we need to load the constant from memory. */
-		C_BITCON,
-		C_ABCON,
-		C_MBCON,
-		C_PSAUTO,
-		C_PPAUTO,
-		C_UAUTO4K,
-		C_UAUTO8K,
-		C_UAUTO16K,
-		C_UAUTO32K,
-		C_UAUTO64K,
-		C_NSAUTO,
-		C_NPAUTO,
-		C_LAUTO,
-		C_PPOREG,
-		C_PSOREG,
-		C_UOREG4K,
-		C_UOREG8K,
-		C_UOREG16K,
-		C_UOREG32K,
-		C_UOREG64K,
-		C_NSOREG,
-		C_NPOREG,
-		C_LOREG,
-		C_LACON,
-		C_LCON,
-		C_VCON:
-		if a.Name == obj.NAME_EXTERN {
-			fmt.Printf("addpool: %v in %v needs reloc\n", DRconv(c), p)
-		}
-
-		t.To.Type = obj.TYPE_CONST
-		t.To.Offset = ctxt.Instoffset
-		break
-	}
-
-	for q := ctxt.Blitrl; q != nil; q = q.Link { /* could hash on t.t0.offset */
-		if q.To == t.To {
-			p.Pcond = q
-			return
-		}
-	}
-
-	q := ctxt.NewProg()
-	*q = t
-	q.Pc = int64(pool.size)
-	if ctxt.Blitrl == nil {
-		ctxt.Blitrl = q
-		pool.start = uint32(p.Pc)
-	} else {
-		ctxt.Elitrl.Link = q
-	}
-	ctxt.Elitrl = q
-	pool.size = -pool.size & (FuncAlign - 1)
-	pool.size += uint32(sz)
-	p.Pcond = q
-}
-
-func regoff(ctxt *obj.Link, a *obj.Addr) uint32 {
-	ctxt.Instoffset = 0
-	aclass(ctxt, a)
-	return uint32(ctxt.Instoffset)
-}
-
-func ispcdisp(v int32) int {
-	/* pc-relative addressing will reach? */
-	return obj.Bool2int(v >= -0xfffff && v <= 0xfffff && (v&3) == 0)
-}
-
-func isaddcon(v int64) int {
-	/* uimm12 or uimm24? */
-	if v < 0 {
-		return 0
-	}
-	if (v & 0xFFF) == 0 {
-		v >>= 12
-	}
-	return obj.Bool2int(v <= 0xFFF)
-}
-
-func isbitcon(v uint64) int {
-	/*  fancy bimm32 or bimm64? */
-	// TODO(aram):
-	return 0
-	// return obj.Bool2int(findmask(v) != nil || (v>>32) == 0 && findmask(v|(v<<32)) != nil)
-}
-
-func autoclass(l int64) int {
-	if l < 0 {
-		if l >= -256 {
-			return C_NSAUTO
-		}
-		if l >= -512 && (l&7) == 0 {
-			return C_NPAUTO
-		}
-		return C_LAUTO
-	}
-
-	if l <= 255 {
-		return C_PSAUTO
-	}
-	if l <= 504 && (l&7) == 0 {
-		return C_PPAUTO
-	}
-	if l <= 4095 {
-		return C_UAUTO4K
-	}
-	if l <= 8190 && (l&1) == 0 {
-		return C_UAUTO8K
-	}
-	if l <= 16380 && (l&3) == 0 {
-		return C_UAUTO16K
-	}
-	if l <= 32760 && (l&7) == 0 {
-		return C_UAUTO32K
-	}
-	if l <= 65520 && (l&0xF) == 0 {
-		return C_UAUTO64K
-	}
-	return C_LAUTO
-}
-
-func oregclass(l int64) int {
-	if l == 0 {
-		return C_ZOREG
-	}
-	return autoclass(l) - C_NPAUTO + C_NPOREG
-}
-
-/*
- * given an offset v and a class c (see above)
- * return the offset value to use in the instruction,
- * scaled if necessary
- */
-func offsetshift(ctxt *obj.Link, v int64, c int) int64 {
-	s := 0
-	if c >= C_SEXT1 && c <= C_SEXT16 {
-		s = c - C_SEXT1
-	} else if c >= C_UAUTO4K && c <= C_UAUTO64K {
-		s = c - C_UAUTO4K
-	} else if c >= C_UOREG4K && c <= C_UOREG64K {
-		s = c - C_UOREG4K
-	}
-	vs := v >> uint(s)
-	if vs<<uint(s) != v {
-		ctxt.Diag("odd offset: %d\n%v", v, ctxt.Curp)
-	}
-	return vs
-}
-
-/*
- * if v contains a single 16-bit value aligned
- * on a 16-bit field, and thus suitable for movk/movn,
- * return the field index 0 to 3; otherwise return -1
- */
-func movcon(v int64) int {
-	for s := 0; s < 64; s += 16 {
-		if (uint64(v) &^ (uint64(0xFFFF) << uint(s))) == 0 {
-			return s / 16
-		}
-	}
-	return -1
-}
-
-func rclass(r int16) int {
-	switch {
-	case REG_R0 <= r && r <= REG_R30: // not 31
-		return C_REG
-	case r == REGZERO:
-		return C_ZCON
-	case REG_F0 <= r && r <= REG_F31:
-		return C_FREG
-	case REG_V0 <= r && r <= REG_V31:
-		return C_VREG
-	case COND_EQ <= r && r <= COND_NV:
-		return C_COND
-	case r == REGSP:
-		return C_RSP
-	case r&REG_EXT != 0:
-		return C_EXTREG
-	case r >= REG_SPECIAL:
-		return C_SPR
-	}
-	return C_GOK
-}
-
-func aclass(ctxt *obj.Link, a *obj.Addr) int {
-	switch a.Type {
-	case obj.TYPE_NONE:
-		return C_NONE
-
-	case obj.TYPE_REG:
-		return rclass(a.Reg)
-
-	case obj.TYPE_REGREG:
-		return C_PAIR
-
-	case obj.TYPE_SHIFT:
-		return C_SHIFT
-
-	case obj.TYPE_MEM:
-		switch a.Name {
-		case obj.NAME_EXTERN,
-			obj.NAME_STATIC:
-			if a.Sym == nil {
-				break
-			}
-			ctxt.Instoffset = a.Offset
-			if a.Sym != nil { // use relocation
-				return C_ADDR
-			}
-			return C_LEXT
-
-		case obj.NAME_AUTO:
-			ctxt.Instoffset = int64(ctxt.Autosize) + a.Offset
-			return autoclass(ctxt.Instoffset)
-
-		case obj.NAME_PARAM:
-			ctxt.Instoffset = int64(ctxt.Autosize) + a.Offset + 8
-			return autoclass(ctxt.Instoffset)
-
-		case obj.TYPE_NONE:
-			ctxt.Instoffset = a.Offset
-			return oregclass(ctxt.Instoffset)
-		}
-		return C_GOK
-
-	case obj.TYPE_FCONST:
-		return C_FCON
-
-	case obj.TYPE_TEXTSIZE:
-		return C_TEXTSIZE
-
-	case obj.TYPE_CONST,
-		obj.TYPE_ADDR:
-		switch a.Name {
-		case obj.TYPE_NONE:
-			ctxt.Instoffset = a.Offset
-			if a.Reg != 0 && a.Reg != REGZERO {
-				goto aconsize
-			}
-			v := ctxt.Instoffset
-			if v == 0 {
-				return C_ZCON
-			}
-			if isaddcon(v) != 0 {
-				if v <= 0xFFF {
-					return C_ADDCON0
-				}
-				if isbitcon(uint64(v)) != 0 {
-					return C_ABCON
-				}
-				return C_ADDCON
-			}
-
-			t := movcon(v)
-			if t >= 0 {
-				if isbitcon(uint64(v)) != 0 {
-					return C_MBCON
-				}
-				return C_MOVCON
-			}
-
-			t = movcon(^v)
-			if t >= 0 {
-				if isbitcon(uint64(v)) != 0 {
-					return C_MBCON
-				}
-				return C_MOVCON
-			}
-
-			if isbitcon(uint64(v)) != 0 {
-				return C_BITCON
-			}
-
-			if uint64(v) == uint64(uint32(v)) || v == int64(int32(v)) {
-				return C_LCON
-			}
-			return C_VCON
-
-		case obj.NAME_EXTERN,
-			obj.NAME_STATIC:
-			s := a.Sym
-			if s == nil {
-				break
-			}
-			ctxt.Instoffset = a.Offset
-			return C_VCONADDR
-
-		case obj.NAME_AUTO:
-			ctxt.Instoffset = int64(ctxt.Autosize) + a.Offset
-			goto aconsize
-
-		case obj.NAME_PARAM:
-			ctxt.Instoffset = int64(ctxt.Autosize) + a.Offset + 8
-			goto aconsize
-		}
-		return C_GOK
-
-	aconsize:
-		if isaddcon(ctxt.Instoffset) != 0 {
-			return C_AACON
-		}
-		return C_LACON
-
-	case obj.TYPE_BRANCH:
-		return C_SBRA
-	}
-
-	return C_GOK
-}
-
-func oplook(ctxt *obj.Link, p *obj.Prog) *Optab {
-	a1 := int(p.Optab)
-	if a1 != 0 {
-		return &optab[a1-1:][0]
-	}
-	a1 = int(p.From.Class)
-	if a1 == 0 {
-		a1 = aclass(ctxt, &p.From) + 1
-		p.From.Class = int8(a1)
-	}
-
-	a1--
-	a3 := int(p.To.Class)
-	if a3 == 0 {
-		a3 = aclass(ctxt, &p.To) + 1
-		p.To.Class = int8(a3)
-	}
-
-	a3--
-	a2 := C_NONE
-	if p.Reg != 0 {
-		a2 = rclass(p.Reg)
-	}
-	r := int(p.As)
-	o := oprange[r].start
-	if o == nil {
-		o = oprange[r].stop /* just generate an error */
-	}
-
-	if false {
-		fmt.Printf("oplook %v %d %d %d\n", obj.Aconv(int(p.As)), a1, a2, a3)
-		fmt.Printf("\t\t%d %d\n", p.From.Type, p.To.Type)
-	}
-
-	e := oprange[r].stop
-	c1 := xcmp[a1][:]
-	c2 := xcmp[a2][:]
-	c3 := xcmp[a3][:]
-	c4 := xcmp[p.Scond>>5][:]
-	for ; -cap(o) < -cap(e); o = o[1:] {
-		if int(o[0].a2) == a2 || c2[o[0].a2] != 0 {
-			if c4[o[0].scond>>5] != 0 {
-				if c1[o[0].a1] != 0 {
-					if c3[o[0].a3] != 0 {
-						p.Optab = uint16((-cap(o) + cap(optab)) + 1)
-						return &o[0]
-					}
-				}
-			}
-		}
-	}
-
-	ctxt.Diag("illegal combination %v %v %v %v, %d %d", p, DRconv(a1), DRconv(a2), DRconv(a3), p.From.Type, p.To.Type)
-	prasm(p)
-	if o == nil {
-		o = optab
-	}
-	return &o[0]
-}
-
-func cmp(a int, b int) bool {
-	if a == b {
-		return true
-	}
-	switch a {
-	case C_RSP:
-		if b == C_REG {
-			return true
-		}
-
-	case C_REG:
-		if b == C_ZCON {
-			return true
-		}
-
-	case C_ADDCON0:
-		if b == C_ZCON {
-			return true
-		}
-
-	case C_ADDCON:
-		if b == C_ZCON || b == C_ADDCON0 || b == C_ABCON {
-			return true
-		}
-
-	case C_BITCON:
-		if b == C_ABCON || b == C_MBCON {
-			return true
-		}
-
-	case C_MOVCON:
-		if b == C_MBCON || b == C_ZCON || b == C_ADDCON0 {
-			return true
-		}
-
-	case C_LCON:
-		if b == C_ZCON || b == C_BITCON || b == C_ADDCON || b == C_ADDCON0 || b == C_ABCON || b == C_MBCON || b == C_MOVCON {
-			return true
-		}
-
-	case C_VCON:
-		return cmp(C_LCON, b)
-
-	case C_LACON:
-		if b == C_AACON {
-			return true
-		}
-
-	case C_SEXT2:
-		if b == C_SEXT1 {
-			return true
-		}
-
-	case C_SEXT4:
-		if b == C_SEXT1 || b == C_SEXT2 {
-			return true
-		}
-
-	case C_SEXT8:
-		if b >= C_SEXT1 && b <= C_SEXT4 {
-			return true
-		}
-
-	case C_SEXT16:
-		if b >= C_SEXT1 && b <= C_SEXT8 {
-			return true
-		}
-
-	case C_LEXT:
-		if b >= C_SEXT1 && b <= C_SEXT16 {
-			return true
-		}
-
-	case C_PPAUTO:
-		if b == C_PSAUTO {
-			return true
-		}
-
-	case C_UAUTO4K:
-		if b == C_PSAUTO || b == C_PPAUTO {
-			return true
-		}
-
-	case C_UAUTO8K:
-		return cmp(C_UAUTO4K, b)
-
-	case C_UAUTO16K:
-		return cmp(C_UAUTO8K, b)
-
-	case C_UAUTO32K:
-		return cmp(C_UAUTO16K, b)
-
-	case C_UAUTO64K:
-		return cmp(C_UAUTO32K, b)
-
-	case C_NPAUTO:
-		return cmp(C_NSAUTO, b)
-
-	case C_LAUTO:
-		return cmp(C_NPAUTO, b) || cmp(C_UAUTO64K, b)
-
-	case C_PSOREG:
-		if b == C_ZOREG {
-			return true
-		}
-
-	case C_PPOREG:
-		if b == C_ZOREG || b == C_PSOREG {
-			return true
-		}
-
-	case C_UOREG4K:
-		if b == C_ZOREG || b == C_PSAUTO || b == C_PSOREG || b == C_PPAUTO || b == C_PPOREG {
-			return true
-		}
-
-	case C_UOREG8K:
-		return cmp(C_UOREG4K, b)
-
-	case C_UOREG16K:
-		return cmp(C_UOREG8K, b)
-
-	case C_UOREG32K:
-		return cmp(C_UOREG16K, b)
-
-	case C_UOREG64K:
-		return cmp(C_UOREG32K, b)
-
-	case C_NPOREG:
-		return cmp(C_NSOREG, b)
-
-	case C_LOREG:
-		return cmp(C_NPOREG, b) || cmp(C_UOREG64K, b)
-
-	case C_LBRA:
-		if b == C_SBRA {
-			return true
-		}
-	}
-
-	return false
-}
-
-type ocmp []Optab
-
-func (x ocmp) Len() int {
-	return len(x)
-}
-
-func (x ocmp) Swap(i, j int) {
-	x[i], x[j] = x[j], x[i]
-}
-
-func (x ocmp) Less(i, j int) bool {
-	p1 := &x[i]
-	p2 := &x[j]
-	n := int(p1.as) - int(p2.as)
-	if n != 0 {
-		return n < 0
-	}
-	n = int(p1.a1) - int(p2.a1)
-	if n != 0 {
-		return n < 0
-	}
-	n = int(p1.a2) - int(p2.a2)
-	if n != 0 {
-		return n < 0
-	}
-	n = int(p1.a3) - int(p2.a3)
-	if n != 0 {
-		return n < 0
-	}
-	n = int(p1.scond) - int(p2.scond)
-	if n != 0 {
-		return n < 0
-	}
-	return false
-}
-
-func buildop(ctxt *obj.Link) {
-	var n int
-	for i := 0; i < C_GOK; i++ {
-		for n = 0; n < C_GOK; n++ {
-			if cmp(n, i) {
-				xcmp[i][n] = 1
-			}
-		}
-	}
-	for n = 0; optab[n].as != obj.AXXX; n++ {
-	}
-	sort.Sort(ocmp(optab[:n]))
-	var r int
-	var t Oprange
-	for i := 0; i < n; i++ {
-		r = int(optab[i].as)
-		oprange[r].start = optab[i:]
-		for int(optab[i].as) == r {
-			i++
-		}
-		oprange[r].stop = optab[i:]
-		i--
-		t = oprange[r]
-		switch r {
-		default:
-			ctxt.Diag("unknown op in build: %v", obj.Aconv(r))
-			log.Fatalf("bad code")
-
-		case AADD:
-			oprange[AADDS] = t
-			oprange[ASUB] = t
-			oprange[ASUBS] = t
-			oprange[AADDW] = t
-			oprange[AADDSW] = t
-			oprange[ASUBW] = t
-			oprange[ASUBSW] = t
-
-		case AAND: /* logical immediate, logical shifted register */
-			oprange[AANDS] = t
-
-			oprange[AANDSW] = t
-			oprange[AANDW] = t
-			oprange[AEOR] = t
-			oprange[AEORW] = t
-			oprange[AORR] = t
-			oprange[AORRW] = t
-
-		case ABIC: /* only logical shifted register */
-			oprange[ABICS] = t
-
-			oprange[ABICSW] = t
-			oprange[ABICW] = t
-			oprange[AEON] = t
-			oprange[AEONW] = t
-			oprange[AORN] = t
-			oprange[AORNW] = t
-
-		case ANEG:
-			oprange[ANEGS] = t
-			oprange[ANEGSW] = t
-			oprange[ANEGW] = t
-
-		case AADC: /* rn=Rd */
-			oprange[AADCW] = t
-
-			oprange[AADCS] = t
-			oprange[AADCSW] = t
-			oprange[ASBC] = t
-			oprange[ASBCW] = t
-			oprange[ASBCS] = t
-			oprange[ASBCSW] = t
-
-		case ANGC: /* rn=REGZERO */
-			oprange[ANGCW] = t
-
-			oprange[ANGCS] = t
-			oprange[ANGCSW] = t
-
-		case ACMP:
-			oprange[ACMPW] = t
-			oprange[ACMN] = t
-			oprange[ACMNW] = t
-
-		case ATST:
-			oprange[ATSTW] = t
-
-			/* register/register, and shifted */
-		case AMVN:
-			oprange[AMVNW] = t
-
-		case AMOVK:
-			oprange[AMOVKW] = t
-			oprange[AMOVN] = t
-			oprange[AMOVNW] = t
-			oprange[AMOVZ] = t
-			oprange[AMOVZW] = t
-
-		case ABEQ:
-			oprange[ABNE] = t
-			oprange[ABCS] = t
-			oprange[ABHS] = t
-			oprange[ABCC] = t
-			oprange[ABLO] = t
-			oprange[ABMI] = t
-			oprange[ABPL] = t
-			oprange[ABVS] = t
-			oprange[ABVC] = t
-			oprange[ABHI] = t
-			oprange[ABLS] = t
-			oprange[ABGE] = t
-			oprange[ABLT] = t
-			oprange[ABGT] = t
-			oprange[ABLE] = t
-
-		case ALSL:
-			oprange[ALSLW] = t
-			oprange[ALSR] = t
-			oprange[ALSRW] = t
-			oprange[AASR] = t
-			oprange[AASRW] = t
-			oprange[AROR] = t
-			oprange[ARORW] = t
-
-		case ACLS:
-			oprange[ACLSW] = t
-			oprange[ACLZ] = t
-			oprange[ACLZW] = t
-			oprange[ARBIT] = t
-			oprange[ARBITW] = t
-			oprange[AREV] = t
-			oprange[AREVW] = t
-			oprange[AREV16] = t
-			oprange[AREV16W] = t
-			oprange[AREV32] = t
-
-		case ASDIV:
-			oprange[ASDIVW] = t
-			oprange[AUDIV] = t
-			oprange[AUDIVW] = t
-			oprange[ACRC32B] = t
-			oprange[ACRC32CB] = t
-			oprange[ACRC32CH] = t
-			oprange[ACRC32CW] = t
-			oprange[ACRC32CX] = t
-			oprange[ACRC32H] = t
-			oprange[ACRC32W] = t
-			oprange[ACRC32X] = t
-
-		case AMADD:
-			oprange[AMADDW] = t
-			oprange[AMSUB] = t
-			oprange[AMSUBW] = t
-			oprange[ASMADDL] = t
-			oprange[ASMSUBL] = t
-			oprange[AUMADDL] = t
-			oprange[AUMSUBL] = t
-
-		case AREM:
-			oprange[AREMW] = t
-			oprange[AUREM] = t
-			oprange[AUREMW] = t
-
-		case AMUL:
-			oprange[AMULW] = t
-			oprange[AMNEG] = t
-			oprange[AMNEGW] = t
-			oprange[ASMNEGL] = t
-			oprange[ASMULL] = t
-			oprange[ASMULH] = t
-			oprange[AUMNEGL] = t
-			oprange[AUMULH] = t
-			oprange[AUMULL] = t
-
-		case AMOVB:
-			oprange[AMOVBU] = t
-
-		case AMOVH:
-			oprange[AMOVHU] = t
-
-		case AMOVW:
-			oprange[AMOVWU] = t
-
-		case ABFM:
-			oprange[ABFMW] = t
-			oprange[ASBFM] = t
-			oprange[ASBFMW] = t
-			oprange[AUBFM] = t
-			oprange[AUBFMW] = t
-
-		case ABFI:
-			oprange[ABFIW] = t
-			oprange[ABFXIL] = t
-			oprange[ABFXILW] = t
-			oprange[ASBFIZ] = t
-			oprange[ASBFIZW] = t
-			oprange[ASBFX] = t
-			oprange[ASBFXW] = t
-			oprange[AUBFIZ] = t
-			oprange[AUBFIZW] = t
-			oprange[AUBFX] = t
-			oprange[AUBFXW] = t
-
-		case AEXTR:
-			oprange[AEXTRW] = t
-
-		case ASXTB:
-			oprange[ASXTBW] = t
-			oprange[ASXTH] = t
-			oprange[ASXTHW] = t
-			oprange[ASXTW] = t
-			oprange[AUXTB] = t
-			oprange[AUXTH] = t
-			oprange[AUXTW] = t
-			oprange[AUXTBW] = t
-			oprange[AUXTHW] = t
-
-		case ACCMN:
-			oprange[ACCMNW] = t
-			oprange[ACCMP] = t
-			oprange[ACCMPW] = t
-
-		case ACSEL:
-			oprange[ACSELW] = t
-			oprange[ACSINC] = t
-			oprange[ACSINCW] = t
-			oprange[ACSINV] = t
-			oprange[ACSINVW] = t
-			oprange[ACSNEG] = t
-			oprange[ACSNEGW] = t
-
-			// aliases Rm=Rn, !cond
-			oprange[ACINC] = t
-
-			oprange[ACINCW] = t
-			oprange[ACINV] = t
-			oprange[ACINVW] = t
-			oprange[ACNEG] = t
-			oprange[ACNEGW] = t
-
-			// aliases, Rm=Rn=REGZERO, !cond
-		case ACSET:
-			oprange[ACSETW] = t
-
-			oprange[ACSETM] = t
-			oprange[ACSETMW] = t
-
-		case AMOVD,
-			AMOVBU,
-			AB,
-			ABL,
-			AWORD,
-			ADWORD,
-			obj.ARET,
-			obj.ATEXT,
-			ACASE,
-			ABCASE,
-			ASTP,
-			ALDP:
-			break
-
-		case AERET:
-			oprange[AWFE] = t
-			oprange[AWFI] = t
-			oprange[AYIELD] = t
-			oprange[ASEV] = t
-			oprange[ASEVL] = t
-			oprange[ADRPS] = t
-
-		case ACBZ:
-			oprange[ACBZW] = t
-			oprange[ACBNZ] = t
-			oprange[ACBNZW] = t
-
-		case ATBZ:
-			oprange[ATBNZ] = t
-
-		case AADR, AADRP:
-			break
-
-		case ACLREX:
-			break
-
-		case ASVC:
-			oprange[AHLT] = t
-			oprange[AHVC] = t
-			oprange[ASMC] = t
-			oprange[ABRK] = t
-			oprange[ADCPS1] = t
-			oprange[ADCPS2] = t
-			oprange[ADCPS3] = t
-
-		case AFADDS:
-			oprange[AFADDD] = t
-			oprange[AFSUBS] = t
-			oprange[AFSUBD] = t
-			oprange[AFMULS] = t
-			oprange[AFMULD] = t
-			oprange[AFNMULS] = t
-			oprange[AFNMULD] = t
-			oprange[AFDIVS] = t
-			oprange[AFMAXD] = t
-			oprange[AFMAXS] = t
-			oprange[AFMIND] = t
-			oprange[AFMINS] = t
-			oprange[AFMAXNMD] = t
-			oprange[AFMAXNMS] = t
-			oprange[AFMINNMD] = t
-			oprange[AFMINNMS] = t
-			oprange[AFDIVD] = t
-
-		case AFCVTSD:
-			oprange[AFCVTDS] = t
-			oprange[AFABSD] = t
-			oprange[AFABSS] = t
-			oprange[AFNEGD] = t
-			oprange[AFNEGS] = t
-			oprange[AFSQRTD] = t
-			oprange[AFSQRTS] = t
-			oprange[AFRINTNS] = t
-			oprange[AFRINTND] = t
-			oprange[AFRINTPS] = t
-			oprange[AFRINTPD] = t
-			oprange[AFRINTMS] = t
-			oprange[AFRINTMD] = t
-			oprange[AFRINTZS] = t
-			oprange[AFRINTZD] = t
-			oprange[AFRINTAS] = t
-			oprange[AFRINTAD] = t
-			oprange[AFRINTXS] = t
-			oprange[AFRINTXD] = t
-			oprange[AFRINTIS] = t
-			oprange[AFRINTID] = t
-			oprange[AFCVTDH] = t
-			oprange[AFCVTHS] = t
-			oprange[AFCVTHD] = t
-			oprange[AFCVTSH] = t
-
-		case AFCMPS:
-			oprange[AFCMPD] = t
-			oprange[AFCMPES] = t
-			oprange[AFCMPED] = t
-
-		case AFCCMPS:
-			oprange[AFCCMPD] = t
-			oprange[AFCCMPES] = t
-			oprange[AFCCMPED] = t
-
-		case AFCSELD:
-			oprange[AFCSELS] = t
-
-		case AFMOVS, AFMOVD:
-			break
-
-		case AFCVTZSD:
-			oprange[AFCVTZSDW] = t
-			oprange[AFCVTZSS] = t
-			oprange[AFCVTZSSW] = t
-			oprange[AFCVTZUD] = t
-			oprange[AFCVTZUDW] = t
-			oprange[AFCVTZUS] = t
-			oprange[AFCVTZUSW] = t
-
-		case ASCVTFD:
-			oprange[ASCVTFS] = t
-			oprange[ASCVTFWD] = t
-			oprange[ASCVTFWS] = t
-			oprange[AUCVTFD] = t
-			oprange[AUCVTFS] = t
-			oprange[AUCVTFWD] = t
-			oprange[AUCVTFWS] = t
-
-		case ASYS:
-			oprange[AAT] = t
-			oprange[ADC] = t
-			oprange[AIC] = t
-			oprange[ATLBI] = t
-
-		case ASYSL, AHINT:
-			break
-
-		case ADMB:
-			oprange[ADSB] = t
-			oprange[AISB] = t
-
-		case AMRS, AMSR:
-			break
-
-		case ALDAR:
-			oprange[ALDARW] = t
-			fallthrough
-
-		case ALDXR:
-			oprange[ALDXRB] = t
-			oprange[ALDXRH] = t
-			oprange[ALDXRW] = t
-
-		case ALDAXR:
-			oprange[ALDAXRW] = t
-
-		case ALDXP:
-			oprange[ALDXPW] = t
-
-		case ASTLR:
-			oprange[ASTLRW] = t
-
-		case ASTXR:
-			oprange[ASTXRB] = t
-			oprange[ASTXRH] = t
-			oprange[ASTXRW] = t
-
-		case ASTLXR:
-			oprange[ASTLXRW] = t
-
-		case ASTXP:
-			oprange[ASTXPW] = t
-
-		case AAESD:
-			oprange[AAESE] = t
-			oprange[AAESMC] = t
-			oprange[AAESIMC] = t
-			oprange[ASHA1H] = t
-			oprange[ASHA1SU1] = t
-			oprange[ASHA256SU0] = t
-
-		case ASHA1C:
-			oprange[ASHA1P] = t
-			oprange[ASHA1M] = t
-			oprange[ASHA1SU0] = t
-			oprange[ASHA256H] = t
-			oprange[ASHA256H2] = t
-			oprange[ASHA256SU1] = t
-
-		case obj.ANOP,
-			obj.AUNDEF,
-			obj.AUSEFIELD,
-			obj.AFUNCDATA,
-			obj.APCDATA,
-			obj.ADUFFZERO,
-			obj.ADUFFCOPY:
-			break
-		}
-	}
-}
-
-func chipfloat7(ctxt *obj.Link, e float64) int {
-	ei := math.Float64bits(e)
-	l := uint32(int32(ei))
-	h := uint32(int32(ei >> 32))
-
-	if l != 0 || h&0xffff != 0 {
-		return -1
-	}
-	h1 := h & 0x7fc00000
-	if h1 != 0x40000000 && h1 != 0x3fc00000 {
-		return -1
-	}
-	n := 0
-
-	// sign bit (a)
-	if h&0x80000000 != 0 {
-		n |= 1 << 7
-	}
-
-	// exp sign bit (b)
-	if h1 == 0x3fc00000 {
-		n |= 1 << 6
-	}
-
-	// rest of exp and mantissa (cd-efgh)
-	n |= int((h >> 16) & 0x3f)
-
-	//print("match %.8lux %.8lux %d\n", l, h, n);
-	return n
-}
-
-/* form offset parameter to SYS; special register number */
-func SYSARG5(op0 int, op1 int, Cn int, Cm int, op2 int) int {
-	return op0<<19 | op1<<16 | Cn<<12 | Cm<<8 | op2<<5
-}
-
-func SYSARG4(op1 int, Cn int, Cm int, op2 int) int {
-	return SYSARG5(0, op1, Cn, Cm, op2)
-}
-
-func asmout(ctxt *obj.Link, p *obj.Prog, o *Optab, out []uint32) {
-	var lastcase *obj.Prog
-	o1 := uint32(0)
-	o2 := uint32(0)
-	o3 := uint32(0)
-	o4 := uint32(0)
-	o5 := uint32(0)
-	if false { /*debug['P']*/
-		fmt.Printf("%x: %v\ttype %d\n", uint32(p.Pc), p, o.type_)
-	}
-	switch o.type_ {
-	default:
-		ctxt.Diag("unknown asm %d", o.type_)
-		prasm(p)
-
-	case 0: /* pseudo ops */
-		break
-
-	case 1: /* op Rm,[Rn],Rd; default Rn=Rd -> op Rm<<0,[Rn,]Rd (shifted register) */
-		o1 = oprrr(ctxt, int(p.As))
-
-		rf := int(p.From.Reg)
-		rt := int(p.To.Reg)
-		r := int(p.Reg)
-		if p.To.Type == obj.TYPE_NONE {
-			rt = REGZERO
-		}
-		if r == 0 {
-			r = rt
-		}
-		o1 |= (uint32(rf&31) << 16) | (uint32(r&31) << 5) | uint32(rt&31)
-
-	case 2: /* add/sub $(uimm12|uimm24)[,R],R; cmp $(uimm12|uimm24),R */
-		o1 = opirr(ctxt, int(p.As))
-
-		rt := int(p.To.Reg)
-		if p.To.Type == obj.TYPE_NONE {
-			if (o1 & Sbit) == 0 {
-				ctxt.Diag("ineffective ZR destination\n%v", p)
-			}
-			rt = REGZERO
-		}
-
-		r := int(p.Reg)
-		if r == 0 {
-			r = rt
-		}
-		v := int32(regoff(ctxt, &p.From))
-		o1 = oaddi(ctxt, int32(o1), v, r, rt)
-
-	case 3: /* op R<<n[,R],R (shifted register) */
-		o1 = oprrr(ctxt, int(p.As))
-
-		o1 |= uint32(p.From.Offset) /* includes reg, op, etc */
-		rt := int(p.To.Reg)
-		if p.To.Type == obj.TYPE_NONE {
-			rt = REGZERO
-		}
-		r := int(p.Reg)
-		if p.As == AMVN || p.As == AMVNW {
-			r = REGZERO
-		} else if r == 0 {
-			r = rt
-		}
-		o1 |= (uint32(r&31) << 5) | uint32(rt&31)
-
-	case 4: /* mov $addcon, R; mov $recon, R; mov $racon, R */
-		o1 = opirr(ctxt, int(p.As))
-
-		rt := int(p.To.Reg)
-		r := int(o.param)
-		if r == 0 {
-			r = REGZERO
-		} else if r == REGFROM {
-			r = int(p.From.Reg)
-		}
-		if r == 0 {
-			r = REGSP
-		}
-		v := int32(regoff(ctxt, &p.From))
-		if (v & 0xFFF000) != 0 {
-			v >>= 12
-			o1 |= 1 << 22 /* shift, by 12 */
-		}
-
-		o1 |= ((uint32(v) & 0xFFF) << 10) | (uint32(r&31) << 5) | uint32(rt&31)
-
-	case 5: /* b s; bl s */
-		o1 = opbra(ctxt, int(p.As))
-
-		if p.To.Sym == nil {
-			o1 |= uint32(brdist(ctxt, p, 0, 26, 2))
-			break
-		}
-
-		rel := obj.Addrel(ctxt.Cursym)
-		rel.Off = int32(ctxt.Pc)
-		rel.Siz = 4
-		rel.Sym = p.To.Sym
-		rel.Add = int64(o1) | (p.To.Offset>>2)&0x3ffffff
-		rel.Type = obj.R_CALLARM64
-
-	case 6: /* b ,O(R); bl ,O(R) */
-		o1 = opbrr(ctxt, int(p.As))
-
-		o1 |= uint32(p.To.Reg&31) << 5
-		rel := obj.Addrel(ctxt.Cursym)
-		rel.Off = int32(ctxt.Pc)
-		rel.Siz = 0
-		rel.Type = obj.R_CALLIND
-
-	case 7: /* beq s */
-		o1 = opbra(ctxt, int(p.As))
-
-		o1 |= uint32(brdist(ctxt, p, 0, 19, 2) << 5)
-
-	case 8: /* lsl $c,[R],R -> ubfm $(W-1)-c,$(-c MOD (W-1)),Rn,Rd */
-		rt := int(p.To.Reg)
-
-		rf := int(p.Reg)
-		if rf == 0 {
-			rf = rt
-		}
-		v := int32(p.From.Offset)
-		switch p.As {
-		case AASR:
-			o1 = opbfm(ctxt, ASBFM, int(v), 63, rf, rt)
-
-		case AASRW:
-			o1 = opbfm(ctxt, ASBFMW, int(v), 31, rf, rt)
-
-		case ALSL:
-			o1 = opbfm(ctxt, AUBFM, int((64-v)&63), int(63-v), rf, rt)
-
-		case ALSLW:
-			o1 = opbfm(ctxt, AUBFMW, int((32-v)&31), int(31-v), rf, rt)
-
-		case ALSR:
-			o1 = opbfm(ctxt, AUBFM, int(v), 63, rf, rt)
-
-		case ALSRW:
-			o1 = opbfm(ctxt, AUBFMW, int(v), 31, rf, rt)
-
-		case AROR:
-			o1 = opextr(ctxt, AEXTR, v, rf, rf, rt)
-
-		case ARORW:
-			o1 = opextr(ctxt, AEXTRW, v, rf, rf, rt)
-
-		default:
-			ctxt.Diag("bad shift $con\n%v", ctxt.Curp)
-			break
-		}
-
-	case 9: /* lsl Rm,[Rn],Rd -> lslv Rm, Rn, Rd */
-		o1 = oprrr(ctxt, int(p.As))
-
-		r := int(p.Reg)
-		if r == 0 {
-			r = int(p.To.Reg)
-		}
-		o1 |= (uint32(p.From.Reg&31) << 16) | (uint32(r&31) << 5) | uint32(p.To.Reg&31)
-
-	case 10: /* brk/hvc/.../svc [$con] */
-		o1 = opimm(ctxt, int(p.As))
-
-		if p.To.Type != obj.TYPE_NONE {
-			o1 |= uint32((p.To.Offset & 0xffff) << 5)
-		}
-
-	case 11: /* dword */
-		aclass(ctxt, &p.To)
-
-		o1 = uint32(ctxt.Instoffset)
-		o2 = uint32(ctxt.Instoffset >> 32)
-		if p.To.Sym != nil {
-			rel := obj.Addrel(ctxt.Cursym)
-			rel.Off = int32(ctxt.Pc)
-			rel.Siz = 8
-			rel.Sym = p.To.Sym
-			rel.Add = p.To.Offset
-			rel.Type = obj.R_ADDR
-			o2 = 0
-			o1 = o2
-		}
-
-	case 12: /* movT $vcon, reg */
-		o1 = omovlit(ctxt, int(p.As), p, &p.From, int(p.To.Reg))
-
-	case 13: /* addop $vcon, [R], R (64 bit literal); cmp $lcon,R -> addop $lcon,R, ZR */
-		o1 = omovlit(ctxt, AMOVD, p, &p.From, REGTMP)
-
-		if !(o1 != 0) {
-			break
-		}
-		rt := int(p.To.Reg)
-		if p.To.Type == obj.TYPE_NONE {
-			rt = REGZERO
-		}
-		r := int(p.Reg)
-		if r == 0 {
-			r = rt
-		}
-		if p.To.Type != obj.TYPE_NONE && (p.To.Reg == REGSP || r == REGSP) {
-			o2 = opxrrr(ctxt, int(p.As))
-			o2 |= REGTMP & 31 << 16
-			o2 |= LSL0_64
-		} else {
-			o2 = oprrr(ctxt, int(p.As))
-			o2 |= REGTMP & 31 << 16 /* shift is 0 */
-		}
-
-		o2 |= uint32(r&31) << 5
-		o2 |= uint32(rt & 31)
-
-	case 14: /* word */
-		if aclass(ctxt, &p.To) == C_ADDR {
-			ctxt.Diag("address constant needs DWORD\n%v", p)
-		}
-		o1 = uint32(ctxt.Instoffset)
-		if p.To.Sym != nil {
-			// This case happens with words generated
-			// in the PC stream as part of the literal pool.
-			rel := obj.Addrel(ctxt.Cursym)
-
-			rel.Off = int32(ctxt.Pc)
-			rel.Siz = 4
-			rel.Sym = p.To.Sym
-			rel.Add = p.To.Offset
-			rel.Type = obj.R_ADDR
-			o1 = 0
-		}
-
-	case 15: /* mul/mneg/umulh/umull r,[r,]r; madd/msub Rm,Rn,Ra,Rd */
-		o1 = oprrr(ctxt, int(p.As))
-
-		rf := int(p.From.Reg)
-		rt := int(p.To.Reg)
-		var r int
-		var ra int
-		if p.From3Type() == obj.TYPE_REG {
-			r = int(p.From3.Reg)
-			ra = int(p.Reg)
-			if ra == 0 {
-				ra = REGZERO
-			}
-		} else {
-			r = int(p.Reg)
-			if r == 0 {
-				r = rt
-			}
-			ra = REGZERO
-		}
-
-		o1 |= (uint32(rf&31) << 16) | (uint32(ra&31) << 10) | (uint32(r&31) << 5) | uint32(rt&31)
-
-	case 16: /* XremY R[,R],R -> XdivY; XmsubY */
-		o1 = oprrr(ctxt, int(p.As))
-
-		rf := int(p.From.Reg)
-		rt := int(p.To.Reg)
-		r := int(p.Reg)
-		if r == 0 {
-			r = rt
-		}
-		o1 |= (uint32(rf&31) << 16) | (uint32(r&31) << 5) | REGTMP&31
-		o2 = oprrr(ctxt, AMSUBW)
-		o2 |= o1 & (1 << 31) /* same size */
-		o2 |= (uint32(rf&31) << 16) | (uint32(r&31) << 10) | (REGTMP & 31 << 5) | uint32(rt&31)
-
-	case 17: /* op Rm,[Rn],Rd; default Rn=ZR */
-		o1 = oprrr(ctxt, int(p.As))
-
-		rf := int(p.From.Reg)
-		rt := int(p.To.Reg)
-		r := int(p.Reg)
-		if p.To.Type == obj.TYPE_NONE {
-			rt = REGZERO
-		}
-		if r == 0 {
-			r = REGZERO
-		}
-		o1 |= (uint32(rf&31) << 16) | (uint32(r&31) << 5) | uint32(rt&31)
-
-	case 18: /* csel cond,Rn,Rm,Rd; cinc/cinv/cneg cond,Rn,Rd; cset cond,Rd */
-		o1 = oprrr(ctxt, int(p.As))
-
-		cond := int(p.From.Reg)
-		r := int(p.Reg)
-		var rf int
-		if r != 0 {
-			if p.From3Type() == obj.TYPE_NONE {
-				/* CINC/CINV/CNEG */
-				rf = r
-
-				cond ^= 1
-			} else {
-				rf = int(p.From3.Reg) /* CSEL */
-			}
-		} else {
-			/* CSET */
-			if p.From3Type() != obj.TYPE_NONE {
-				ctxt.Diag("invalid combination\n%v", p)
-			}
-			rf = REGZERO
-			r = rf
-			cond ^= 1
-		}
-
-		rt := int(p.To.Reg)
-		o1 |= (uint32(rf&31) << 16) | (uint32(cond&31) << 12) | (uint32(r&31) << 5) | uint32(rt&31)
-
-	case 19: /* CCMN cond, (Rm|uimm5),Rn, uimm4 -> ccmn Rn,Rm,uimm4,cond */
-		nzcv := int(p.To.Offset)
-
-		cond := int(p.From.Reg)
-		var rf int
-		if p.From3.Type == obj.TYPE_REG {
-			o1 = oprrr(ctxt, int(p.As))
-			rf = int(p.From3.Reg) /* Rm */
-		} else {
-			o1 = opirr(ctxt, int(p.As))
-			rf = int(p.From3.Offset & 0x1F)
-		}
-
-		o1 |= (uint32(rf&31) << 16) | (uint32(cond) << 12) | (uint32(p.Reg&31) << 5) | uint32(nzcv)
-
-	case 20: /* movT R,O(R) -> strT */
-		v := int32(regoff(ctxt, &p.To))
-
-		r := int(p.To.Reg)
-		if r == 0 {
-			r = int(o.param)
-		}
-		if v < 0 { /* unscaled 9-bit signed */
-			o1 = olsr9s(ctxt, int32(opstr9(ctxt, int(p.As))), v, r, int(p.From.Reg))
-		} else {
-			v = int32(offsetshift(ctxt, int64(v), int(o.a3)))
-			o1 = olsr12u(ctxt, int32(opstr12(ctxt, int(p.As))), v, r, int(p.From.Reg))
-		}
-
-	case 21: /* movT O(R),R -> ldrT */
-		v := int32(regoff(ctxt, &p.From))
-
-		r := int(p.From.Reg)
-		if r == 0 {
-			r = int(o.param)
-		}
-		if v < 0 { /* unscaled 9-bit signed */
-			o1 = olsr9s(ctxt, int32(opldr9(ctxt, int(p.As))), v, r, int(p.To.Reg))
-		} else {
-			v = int32(offsetshift(ctxt, int64(v), int(o.a1)))
-
-			//print("offset=%lld v=%ld a1=%d\n", instoffset, v, o->a1);
-			o1 = olsr12u(ctxt, int32(opldr12(ctxt, int(p.As))), v, r, int(p.To.Reg))
-		}
-
-	case 22: /* movT (R)O!,R; movT O(R)!, R -> ldrT */
-		v := int32(p.From.Offset)
-
-		if v < -256 || v > 255 {
-			ctxt.Diag("offset out of range\n%v", p)
-		}
-		o1 = opldrpp(ctxt, int(p.As))
-		if o.scond == C_XPOST {
-			o1 |= 1 << 10
-		} else {
-			o1 |= 3 << 10
-		}
-		o1 |= ((uint32(v) & 0x1FF) << 12) | (uint32(p.From.Reg&31) << 5) | uint32(p.To.Reg&31)
-
-	case 23: /* movT R,(R)O!; movT O(R)!, R -> strT */
-		v := int32(p.To.Offset)
-
-		if v < -256 || v > 255 {
-			ctxt.Diag("offset out of range\n%v", p)
-		}
-		o1 = LD2STR(opldrpp(ctxt, int(p.As)))
-		if o.scond == C_XPOST {
-			o1 |= 1 << 10
-		} else {
-			o1 |= 3 << 10
-		}
-		o1 |= ((uint32(v) & 0x1FF) << 12) | (uint32(p.To.Reg&31) << 5) | uint32(p.From.Reg&31)
-
-	case 24: /* mov/mvn Rs,Rd -> add $0,Rs,Rd or orr Rs,ZR,Rd */
-		rf := int(p.From.Reg)
-		rt := int(p.To.Reg)
-		s := obj.Bool2int(rf == REGSP || rt == REGSP)
-		if p.As == AMVN || p.As == AMVNW {
-			if s != 0 {
-				ctxt.Diag("illegal SP reference\n%v", p)
-			}
-			o1 = oprrr(ctxt, int(p.As))
-			o1 |= (uint32(rf&31) << 16) | (REGZERO & 31 << 5) | uint32(rt&31)
-		} else if s != 0 {
-			o1 = opirr(ctxt, int(p.As))
-			o1 |= (uint32(rf&31) << 5) | uint32(rt&31)
-		} else {
-			o1 = oprrr(ctxt, int(p.As))
-			o1 |= (uint32(rf&31) << 16) | (REGZERO & 31 << 5) | uint32(rt&31)
-		}
-
-	case 25: /* negX Rs, Rd -> subX Rs<<0, ZR, Rd */
-		o1 = oprrr(ctxt, int(p.As))
-
-		rf := int(p.From.Reg)
-		rt := int(p.To.Reg)
-		o1 |= (uint32(rf&31) << 16) | (REGZERO & 31 << 5) | uint32(rt&31)
-
-	case 26: /* negX Rm<<s, Rd -> subX Rm<<s, ZR, Rd */
-		o1 = oprrr(ctxt, int(p.As))
-
-		o1 |= uint32(p.From.Offset) /* includes reg, op, etc */
-		rt := int(p.To.Reg)
-		o1 |= (REGZERO & 31 << 5) | uint32(rt&31)
-
-	case 27: /* op Rm<<n[,Rn],Rd (extended register) */
-		o1 = opxrrr(ctxt, int(p.As))
-
-		if (p.From.Reg-obj.RBaseARM64)&REG_EXT != 0 {
-			ctxt.Diag("extended register not implemented\n%v", p)
-			// o1 |= uint32(p.From.Offset) /* includes reg, op, etc */
-		} else {
-			o1 |= uint32(p.From.Reg&31) << 16
-		}
-		rt := int(p.To.Reg)
-		if p.To.Type == obj.TYPE_NONE {
-			rt = REGZERO
-		}
-		r := int(p.Reg)
-		if r == 0 {
-			r = rt
-		}
-		o1 |= (uint32(r&31) << 5) | uint32(rt&31)
-
-	case 28: /* logop $vcon, [R], R (64 bit literal) */
-		o1 = omovlit(ctxt, AMOVD, p, &p.From, REGTMP)
-
-		if !(o1 != 0) {
-			break
-		}
-		r := int(p.Reg)
-		if r == 0 {
-			r = int(p.To.Reg)
-		}
-		o2 = oprrr(ctxt, int(p.As))
-		o2 |= REGTMP & 31 << 16 /* shift is 0 */
-		o2 |= uint32(r&31) << 5
-		o2 |= uint32(p.To.Reg & 31)
-
-	case 29: /* op Rn, Rd */
-		o1 = oprrr(ctxt, int(p.As))
-
-		o1 |= uint32(p.From.Reg&31)<<5 | uint32(p.To.Reg&31)
-
-	case 30: /* movT R,L(R) -> strT */
-		s := movesize(int(o.as))
-
-		if s < 0 {
-			ctxt.Diag("unexpected long move, op %v tab %v\n%v", obj.Aconv(int(p.As)), obj.Aconv(int(o.as)), p)
-		}
-		v := int32(regoff(ctxt, &p.To))
-		if v < 0 {
-			ctxt.Diag("negative large offset\n%v", p)
-		}
-		if (v & ((1 << uint(s)) - 1)) != 0 {
-			ctxt.Diag("misaligned offset\n%v", p)
-		}
-		hi := v - (v & (0xFFF << uint(s)))
-		if (hi & 0xFFF) != 0 {
-			ctxt.Diag("internal: miscalculated offset %d [%d]\n%v", v, s, p)
-		}
-
-		//fprint(2, "v=%ld (%#lux) s=%d hi=%ld (%#lux) v'=%ld (%#lux)\n", v, v, s, hi, hi, ((v-hi)>>s)&0xFFF, ((v-hi)>>s)&0xFFF);
-		r := int(p.To.Reg)
-
-		if r == 0 {
-			r = int(o.param)
-		}
-		o1 = oaddi(ctxt, int32(opirr(ctxt, AADD)), hi, r, REGTMP)
-		o2 = olsr12u(ctxt, int32(opstr12(ctxt, int(p.As))), ((v-hi)>>uint(s))&0xFFF, REGTMP, int(p.From.Reg))
-
-	case 31: /* movT L(R), R -> ldrT */
-		s := movesize(int(o.as))
-
-		if s < 0 {
-			ctxt.Diag("unexpected long move, op %v tab %v\n%v", obj.Aconv(int(p.As)), obj.Aconv(int(o.as)), p)
-		}
-		v := int32(regoff(ctxt, &p.From))
-		if v < 0 {
-			ctxt.Diag("negative large offset\n%v", p)
-		}
-		if (v & ((1 << uint(s)) - 1)) != 0 {
-			ctxt.Diag("misaligned offset\n%v", p)
-		}
-		hi := v - (v & (0xFFF << uint(s)))
-		if (hi & 0xFFF) != 0 {
-			ctxt.Diag("internal: miscalculated offset %d [%d]\n%v", v, s, p)
-		}
-
-		//fprint(2, "v=%ld (%#lux) s=%d hi=%ld (%#lux) v'=%ld (%#lux)\n", v, v, s, hi, hi, ((v-hi)>>s)&0xFFF, ((v-hi)>>s)&0xFFF);
-		r := int(p.From.Reg)
-
-		if r == 0 {
-			r = int(o.param)
-		}
-		o1 = oaddi(ctxt, int32(opirr(ctxt, AADD)), hi, r, REGTMP)
-		o2 = olsr12u(ctxt, int32(opldr12(ctxt, int(p.As))), ((v-hi)>>uint(s))&0xFFF, REGTMP, int(p.To.Reg))
-
-	case 32: /* mov $con, R -> movz/movn */
-		r := 32
-
-		if p.As == AMOVD {
-			r = 64
-		}
-		d := p.From.Offset
-		s := movcon(d)
-		if s < 0 || s >= r {
-			d = ^d
-			s = movcon(d)
-			if s < 0 || s >= r {
-				ctxt.Diag("impossible move wide: %#x\n%v", uint64(p.From.Offset), p)
-			}
-			if p.As == AMOVD {
-				o1 = opirr(ctxt, AMOVN)
-			} else {
-				o1 = opirr(ctxt, AMOVNW)
-			}
-		} else {
-			if p.As == AMOVD {
-				o1 = opirr(ctxt, AMOVZ)
-			} else {
-				o1 = opirr(ctxt, AMOVZW)
-			}
-		}
-
-		rt := int(p.To.Reg)
-		o1 |= uint32((((d >> uint(s*16)) & 0xFFFF) << 5) | int64((uint32(s)&3)<<21) | int64(rt&31))
-
-	case 33: /* movk $uimm16 << pos */
-		o1 = opirr(ctxt, int(p.As))
-
-		d := p.From.Offset
-		if (d >> 16) != 0 {
-			ctxt.Diag("requires uimm16\n%v", p)
-		}
-		s := 0
-		if p.From3Type() != obj.TYPE_NONE {
-			if p.From3.Type != obj.TYPE_CONST {
-				ctxt.Diag("missing bit position\n%v", p)
-			}
-			s = int(p.From3.Offset / 16)
-			if (s*16&0xF) != 0 || s >= 4 || (o1&S64) == 0 && s >= 2 {
-				ctxt.Diag("illegal bit position\n%v", p)
-			}
-		}
-
-		rt := int(p.To.Reg)
-		o1 |= uint32(((d & 0xFFFF) << 5) | int64((uint32(s)&3)<<21) | int64(rt&31))
-
-	case 34: /* mov $lacon,R */
-		o1 = omovlit(ctxt, AMOVD, p, &p.From, REGTMP)
-
-		if !(o1 != 0) {
-			break
-		}
-		o2 = opxrrr(ctxt, AADD)
-		o2 |= REGTMP & 31 << 16
-		o2 |= LSL0_64
-		r := int(p.From.Reg)
-		if r == 0 {
-			r = int(o.param)
-		}
-		o2 |= uint32(r&31) << 5
-		o2 |= uint32(p.To.Reg & 31)
-
-	case 35: /* mov SPR,R -> mrs */
-		o1 = oprrr(ctxt, AMRS)
-
-		v := int32(p.From.Offset)
-		if (o1 & uint32(v&^(3<<19))) != 0 {
-			ctxt.Diag("MRS register value overlap\n%v", p)
-		}
-		o1 |= uint32(v)
-		o1 |= uint32(p.To.Reg & 31)
-
-	case 36: /* mov R,SPR */
-		o1 = oprrr(ctxt, AMSR)
-
-		v := int32(p.To.Offset)
-		if (o1 & uint32(v&^(3<<19))) != 0 {
-			ctxt.Diag("MSR register value overlap\n%v", p)
-		}
-		o1 |= uint32(v)
-		o1 |= uint32(p.From.Reg & 31)
-
-	case 37: /* mov $con,PSTATEfield -> MSR [immediate] */
-		if (uint64(p.From.Offset) &^ uint64(0xF)) != 0 {
-			ctxt.Diag("illegal immediate for PSTATE field\n%v", p)
-		}
-		o1 = opirr(ctxt, AMSR)
-		o1 |= uint32((p.From.Offset & 0xF) << 8) /* Crm */
-		v := int32(0)
-		for i := 0; i < len(pstatefield); i++ {
-			if int64(pstatefield[i].a) == p.To.Offset {
-				v = int32(pstatefield[i].b)
-				break
-			}
-		}
-
-		if v == 0 {
-			ctxt.Diag("illegal PSTATE field for immediate move\n%v", p)
-		}
-		o1 |= uint32(v)
-
-	case 38: /* clrex [$imm] */
-		o1 = opimm(ctxt, int(p.As))
-
-		if p.To.Type == obj.TYPE_NONE {
-			o1 |= 0xF << 8
-		} else {
-			o1 |= uint32((p.To.Offset & 0xF) << 8)
-		}
-
-	case 39: /* cbz R, rel */
-		o1 = opirr(ctxt, int(p.As))
-
-		o1 |= uint32(p.From.Reg & 31)
-		o1 |= uint32(brdist(ctxt, p, 0, 19, 2) << 5)
-
-	case 40: /* tbz */
-		o1 = opirr(ctxt, int(p.As))
-
-		v := int32(p.From.Offset)
-		if v < 0 || v > 63 {
-			ctxt.Diag("illegal bit number\n%v", p)
-		}
-		o1 |= ((uint32(v) & 0x20) << (31 - 5)) | ((uint32(v) & 0x1F) << 19)
-		o1 |= uint32(brdist(ctxt, p, 0, 14, 2) << 5)
-		o1 |= uint32(p.Reg)
-
-	case 41: /* eret, nop, others with no operands */
-		o1 = op0(ctxt, int(p.As))
-
-	case 42: /* bfm R,r,s,R */
-		o1 = opbfm(ctxt, int(p.As), int(p.From.Offset), int(p.From3.Offset), int(p.Reg), int(p.To.Reg))
-
-	case 43: /* bfm aliases */
-		r := int(p.From.Offset)
-
-		s := int(p.From3.Offset)
-		rf := int(p.Reg)
-		rt := int(p.To.Reg)
-		if rf == 0 {
-			rf = rt
-		}
-		switch p.As {
-		case ABFI:
-			o1 = opbfm(ctxt, ABFM, 64-r, s-1, rf, rt)
-
-		case ABFIW:
-			o1 = opbfm(ctxt, ABFMW, 32-r, s-1, rf, rt)
-
-		case ABFXIL:
-			o1 = opbfm(ctxt, ABFM, r, r+s-1, rf, rt)
-
-		case ABFXILW:
-			o1 = opbfm(ctxt, ABFMW, r, r+s-1, rf, rt)
-
-		case ASBFIZ:
-			o1 = opbfm(ctxt, ASBFM, 64-r, s-1, rf, rt)
-
-		case ASBFIZW:
-			o1 = opbfm(ctxt, ASBFMW, 32-r, s-1, rf, rt)
-
-		case ASBFX:
-			o1 = opbfm(ctxt, ASBFM, r, r+s-1, rf, rt)
-
-		case ASBFXW:
-			o1 = opbfm(ctxt, ASBFMW, r, r+s-1, rf, rt)
-
-		case AUBFIZ:
-			o1 = opbfm(ctxt, AUBFM, 64-r, s-1, rf, rt)
-
-		case AUBFIZW:
-			o1 = opbfm(ctxt, AUBFMW, 32-r, s-1, rf, rt)
-
-		case AUBFX:
-			o1 = opbfm(ctxt, AUBFM, r, r+s-1, rf, rt)
-
-		case AUBFXW:
-			o1 = opbfm(ctxt, AUBFMW, r, r+s-1, rf, rt)
-
-		default:
-			ctxt.Diag("bad bfm alias\n%v", ctxt.Curp)
-			break
-		}
-
-	case 44: /* extr $b, Rn, Rm, Rd */
-		o1 = opextr(ctxt, int(p.As), int32(p.From.Offset), int(p.From3.Reg), int(p.Reg), int(p.To.Reg))
-
-	case 45: /* sxt/uxt[bhw] R,R; movT R,R -> sxtT R,R */
-		rf := int(p.From.Reg)
-
-		rt := int(p.To.Reg)
-		as := int(p.As)
-		if rf == REGZERO {
-			as = AMOVWU /* clearer in disassembly */
-		}
-		switch as {
-		case AMOVB, ASXTB:
-			o1 = opbfm(ctxt, ASBFM, 0, 7, rf, rt)
-
-		case AMOVH, ASXTH:
-			o1 = opbfm(ctxt, ASBFM, 0, 15, rf, rt)
-
-		case AMOVW, ASXTW:
-			o1 = opbfm(ctxt, ASBFM, 0, 31, rf, rt)
-
-		case AMOVBU, AUXTB:
-			o1 = opbfm(ctxt, AUBFM, 0, 7, rf, rt)
-
-		case AMOVHU, AUXTH:
-			o1 = opbfm(ctxt, AUBFM, 0, 15, rf, rt)
-
-		case AMOVWU:
-			o1 = oprrr(ctxt, as) | (uint32(rf&31) << 16) | (REGZERO & 31 << 5) | uint32(rt&31)
-
-		case AUXTW:
-			o1 = opbfm(ctxt, AUBFM, 0, 31, rf, rt)
-
-		case ASXTBW:
-			o1 = opbfm(ctxt, ASBFMW, 0, 7, rf, rt)
-
-		case ASXTHW:
-			o1 = opbfm(ctxt, ASBFMW, 0, 15, rf, rt)
-
-		case AUXTBW:
-			o1 = opbfm(ctxt, AUBFMW, 0, 7, rf, rt)
-
-		case AUXTHW:
-			o1 = opbfm(ctxt, AUBFMW, 0, 15, rf, rt)
-
-		default:
-			ctxt.Diag("bad sxt %v", obj.Aconv(as))
-			break
-		}
-
-	case 46: /* cls */
-		o1 = opbit(ctxt, int(p.As))
-
-		o1 |= uint32(p.From.Reg&31) << 5
-		o1 |= uint32(p.To.Reg & 31)
-
-	case 47: /* movT R,V(R) -> strT (huge offset) */
-		o1 = omovlit(ctxt, AMOVW, p, &p.To, REGTMP)
-
-		if !(o1 != 0) {
-			break
-		}
-		r := int(p.To.Reg)
-		if r == 0 {
-			r = int(o.param)
-		}
-		o2 = olsxrr(ctxt, int(p.As), REGTMP, r, int(p.From.Reg))
-
-	case 48: /* movT V(R), R -> ldrT (huge offset) */
-		o1 = omovlit(ctxt, AMOVW, p, &p.From, REGTMP)
-
-		if !(o1 != 0) {
-			break
-		}
-		r := int(p.From.Reg)
-		if r == 0 {
-			r = int(o.param)
-		}
-		o2 = olsxrr(ctxt, int(p.As), REGTMP, r, int(p.To.Reg))
-
-	case 50: /* sys/sysl */
-		o1 = opirr(ctxt, int(p.As))
-
-		if (p.From.Offset &^ int64(SYSARG4(0x7, 0xF, 0xF, 0x7))) != 0 {
-			ctxt.Diag("illegal SYS argument\n%v", p)
-		}
-		o1 |= uint32(p.From.Offset)
-		if p.To.Type == obj.TYPE_REG {
-			o1 |= uint32(p.To.Reg & 31)
-		} else if p.Reg != 0 {
-			o1 |= uint32(p.Reg & 31)
-		} else {
-			o1 |= 0x1F
-		}
-
-	case 51: /* dmb */
-		o1 = opirr(ctxt, int(p.As))
-
-		if p.From.Type == obj.TYPE_CONST {
-			o1 |= uint32((p.From.Offset & 0xF) << 8)
-		}
-
-	case 52: /* hint */
-		o1 = opirr(ctxt, int(p.As))
-
-		o1 |= uint32((p.From.Offset & 0x7F) << 5)
-
-	case 53: /* and/or/eor/bic/... $bimmN, Rn, Rd -> op (N,r,s), Rn, Rd */
-		ctxt.Diag("bitmask immediate not implemented\n%v", p)
-
-	case 54: /* floating point arith */
-		o1 = oprrr(ctxt, int(p.As))
-
-		var rf int
-		if p.From.Type == obj.TYPE_CONST {
-			rf = chipfloat7(ctxt, p.From.Val.(float64))
-			if rf < 0 || true {
-				ctxt.Diag("invalid floating-point immediate\n%v", p)
-				rf = 0
-			}
-
-			rf |= (1 << 3)
-		} else {
-			rf = int(p.From.Reg)
-		}
-		rt := int(p.To.Reg)
-		r := int(p.Reg)
-		if (o1&(0x1F<<24)) == (0x1E<<24) && (o1&(1<<11)) == 0 { /* monadic */
-			r = rf
-			rf = 0
-		} else if r == 0 {
-			r = rt
-		}
-		o1 |= (uint32(rf&31) << 16) | (uint32(r&31) << 5) | uint32(rt&31)
-
-	case 56: /* floating point compare */
-		o1 = oprrr(ctxt, int(p.As))
-
-		var rf int
-		if p.From.Type == obj.TYPE_CONST {
-			o1 |= 8 /* zero */
-			rf = 0
-		} else {
-			rf = int(p.From.Reg)
-		}
-		rt := int(p.Reg)
-		o1 |= uint32(rf&31)<<16 | uint32(rt&31)<<5
-
-	case 57: /* floating point conditional compare */
-		o1 = oprrr(ctxt, int(p.As))
-
-		cond := int(p.From.Reg)
-		nzcv := int(p.To.Offset)
-		if nzcv&^0xF != 0 {
-			ctxt.Diag("implausible condition\n%v", p)
-		}
-		rf := int(p.Reg)
-		if p.From3 == nil || p.From3.Reg < REG_F0 || p.From3.Reg > REG_F31 {
-			ctxt.Diag("illegal FCCMP\n%v", p)
-			break
-		}
-		rt := int(p.From3.Reg)
-		o1 |= uint32(rf&31)<<16 | uint32(cond)<<12 | uint32(rt&31)<<5 | uint32(nzcv)
-
-	case 58: /* ldar/ldxr/ldaxr */
-		o1 = opload(ctxt, int(p.As))
-
-		o1 |= 0x1F << 16
-		o1 |= uint32(p.From.Reg) << 5
-		if p.Reg != 0 {
-			o1 |= uint32(p.Reg) << 10
-		} else {
-			o1 |= 0x1F << 10
-		}
-		o1 |= uint32(p.To.Reg & 31)
-
-	case 59: /* stxr/stlxr */
-		o1 = opstore(ctxt, int(p.As))
-
-		if p.RegTo2 != obj.REG_NONE {
-			o1 |= uint32(p.RegTo2&31) << 16
-		} else {
-			o1 |= 0x1F << 16
-		}
-
-		// TODO(aram): add support for STXP
-		o1 |= uint32(p.To.Reg&31) << 5
-
-		o1 |= uint32(p.From.Reg & 31)
-
-	case 60: /* adrp label,r */
-		d := brdist(ctxt, p, 12, 21, 0)
-
-		o1 = ADR(1, uint32(d), uint32(p.To.Reg))
-
-	case 61: /* adr label, r */
-		d := brdist(ctxt, p, 0, 21, 0)
-
-		o1 = ADR(0, uint32(d), uint32(p.To.Reg))
-
-	case 62: /* case Rv, Rt -> adr tab, Rt; movw Rt[R<<2], Rl; add Rt, Rl; br (Rl) */
-		// adr 4(pc), Rt
-		o1 = ADR(0, 4*4, uint32(p.To.Reg))
-		// movw Rt[Rv<<2], REGTMP
-		o2 = (2 << 30) | (7 << 27) | (2 << 22) | (1 << 21) | (3 << 13) | (1 << 12) | (2 << 10) | (uint32(p.From.Reg&31) << 16) | (uint32(p.To.Reg&31) << 5) | REGTMP&31
-		// add Rt, REGTMP
-		o3 = oprrr(ctxt, AADD) | (uint32(p.To.Reg) << 16) | (REGTMP << 5) | REGTMP
-		// br (REGTMP)
-		o4 = (0x6b << 25) | (0x1F << 16) | (REGTMP & 31 << 5)
-		lastcase = p
-
-	case 63: /* bcase */
-		if lastcase == nil {
-			ctxt.Diag("missing CASE\n%v", p)
-			break
-		}
-
-		if p.Pcond != nil {
-			o1 = uint32(p.Pcond.Pc - (lastcase.Pc + 4*4))
-			ctxt.Diag("FIXME: some relocation needed in bcase\n%v", p)
-		}
-
-		/* reloc ops */
-	case 64: /* movT R,addr -> adrp + add + movT R, (REGTMP) */
-		o1 = ADR(1, 0, REGTMP)
-		o2 = opirr(ctxt, AADD) | REGTMP&31<<5 | REGTMP&31
-		rel := obj.Addrel(ctxt.Cursym)
-		rel.Off = int32(ctxt.Pc)
-		rel.Siz = 8
-		rel.Sym = p.To.Sym
-		rel.Add = p.To.Offset
-		rel.Type = obj.R_ADDRARM64
-		o3 = olsr12u(ctxt, int32(opstr12(ctxt, int(p.As))), 0, REGTMP, int(p.From.Reg))
-
-	case 65: /* movT addr,R -> adrp + add + movT (REGTMP), R */
-		o1 = ADR(1, 0, REGTMP)
-		o2 = opirr(ctxt, AADD) | REGTMP&31<<5 | REGTMP&31
-		rel := obj.Addrel(ctxt.Cursym)
-		rel.Off = int32(ctxt.Pc)
-		rel.Siz = 8
-		rel.Sym = p.From.Sym
-		rel.Add = p.From.Offset
-		rel.Type = obj.R_ADDRARM64
-		o3 = olsr12u(ctxt, int32(opldr12(ctxt, int(p.As))), 0, REGTMP, int(p.To.Reg))
-
-	case 66: /* ldp O(R)!, (r1, r2); ldp (R)O!, (r1, r2) */
-		v := int32(p.From.Offset)
-
-		if v < -512 || v > 504 {
-			ctxt.Diag("offset out of range\n%v", p)
-		}
-		if o.scond == C_XPOST {
-			o1 |= 1 << 23
-		} else {
-			o1 |= 3 << 23
-		}
-		o1 |= 1 << 22
-		o1 |= uint32(int64(2<<30|5<<27|((uint32(v)/8)&0x7f)<<15) | p.To.Offset<<10 | int64(uint32(p.From.Reg&31)<<5) | int64(p.To.Reg&31))
-
-	case 67: /* stp (r1, r2), O(R)!; stp (r1, r2), (R)O! */
-		v := int32(p.To.Offset)
-
-		if v < -512 || v > 504 {
-			ctxt.Diag("offset out of range\n%v", p)
-		}
-		if o.scond == C_XPOST {
-			o1 |= 1 << 23
-		} else {
-			o1 |= 3 << 23
-		}
-		o1 |= uint32(int64(2<<30|5<<27|((uint32(v)/8)&0x7f)<<15) | p.From.Offset<<10 | int64(uint32(p.To.Reg&31)<<5) | int64(p.From.Reg&31))
-
-	case 68: /* movT $vconaddr(SB), reg -> adrp + add + reloc */
-		if p.As == AMOVW {
-			ctxt.Diag("invalid load of 32-bit address: %v", p)
-		}
-		o1 = ADR(1, 0, uint32(p.To.Reg))
-		o2 = opirr(ctxt, AADD) | uint32(p.To.Reg&31)<<5 | uint32(p.To.Reg&31)
-		rel := obj.Addrel(ctxt.Cursym)
-		rel.Off = int32(ctxt.Pc)
-		rel.Siz = 8
-		rel.Sym = p.From.Sym
-		rel.Add = p.From.Offset
-		rel.Type = obj.R_ADDRARM64
-
-	// This is supposed to be something that stops execution.
-	// It's not supposed to be reached, ever, but if it is, we'd
-	// like to be able to tell how we got there.  Assemble as
-	// 0xbea71700 which is guaranteed to raise undefined instruction
-	// exception.
-	case 90:
-		o1 = 0xbea71700
-
-		break
-	}
-
-	out[0] = o1
-	out[1] = o2
-	out[2] = o3
-	out[3] = o4
-	out[4] = o5
-	return
-}
-
-/*
- * basic Rm op Rn -> Rd (using shifted register with 0)
- * also op Rn -> Rt
- * also Rm*Rn op Ra -> Rd
- */
-func oprrr(ctxt *obj.Link, a int) uint32 {
-	switch a {
-	case AADC:
-		return S64 | 0<<30 | 0<<29 | 0xd0<<21 | 0<<10
-
-	case AADCW:
-		return S32 | 0<<30 | 0<<29 | 0xd0<<21 | 0<<10
-
-	case AADCS:
-		return S64 | 0<<30 | 1<<29 | 0xd0<<21 | 0<<10
-
-	case AADCSW:
-		return S32 | 0<<30 | 1<<29 | 0xd0<<21 | 0<<10
-
-	case ANGC, ASBC:
-		return S64 | 1<<30 | 0<<29 | 0xd0<<21 | 0<<10
-
-	case ANGCS, ASBCS:
-		return S64 | 1<<30 | 1<<29 | 0xd0<<21 | 0<<10
-
-	case ANGCW, ASBCW:
-		return S32 | 1<<30 | 0<<29 | 0xd0<<21 | 0<<10
-
-	case ANGCSW, ASBCSW:
-		return S32 | 1<<30 | 1<<29 | 0xd0<<21 | 0<<10
-
-	case AADD:
-		return S64 | 0<<30 | 0<<29 | 0x0b<<24 | 0<<22 | 0<<21 | 0<<10
-
-	case AADDW:
-		return S32 | 0<<30 | 0<<29 | 0x0b<<24 | 0<<22 | 0<<21 | 0<<10
-
-	case ACMN, AADDS:
-		return S64 | 0<<30 | 1<<29 | 0x0b<<24 | 0<<22 | 0<<21 | 0<<10
-
-	case ACMNW, AADDSW:
-		return S32 | 0<<30 | 1<<29 | 0x0b<<24 | 0<<22 | 0<<21 | 0<<10
-
-	case ASUB:
-		return S64 | 1<<30 | 0<<29 | 0x0b<<24 | 0<<22 | 0<<21 | 0<<10
-
-	case ASUBW:
-		return S32 | 1<<30 | 0<<29 | 0x0b<<24 | 0<<22 | 0<<21 | 0<<10
-
-	case ACMP, ASUBS:
-		return S64 | 1<<30 | 1<<29 | 0x0b<<24 | 0<<22 | 0<<21 | 0<<10
-
-	case ACMPW, ASUBSW:
-		return S32 | 1<<30 | 1<<29 | 0x0b<<24 | 0<<22 | 0<<21 | 0<<10
-
-	case AAND:
-		return S64 | 0<<29 | 0xA<<24
-
-	case AANDW:
-		return S32 | 0<<29 | 0xA<<24
-
-	case AMOVD, AORR:
-		return S64 | 1<<29 | 0xA<<24
-
-		//	case AMOVW:
-	case AMOVWU, AORRW:
-		return S32 | 1<<29 | 0xA<<24
-
-	case AEOR:
-		return S64 | 2<<29 | 0xA<<24
-
-	case AEORW:
-		return S32 | 2<<29 | 0xA<<24
-
-	case AANDS:
-		return S64 | 3<<29 | 0xA<<24
-
-	case AANDSW:
-		return S32 | 3<<29 | 0xA<<24
-
-	case ABIC:
-		return S64 | 0<<29 | 0xA<<24 | 1<<21
-
-	case ABICW:
-		return S32 | 0<<29 | 0xA<<24 | 1<<21
-
-	case ABICS:
-		return S64 | 3<<29 | 0xA<<24 | 1<<21
-
-	case ABICSW:
-		return S32 | 3<<29 | 0xA<<24 | 1<<21
-
-	case AEON:
-		return S64 | 2<<29 | 0xA<<24 | 1<<21
-
-	case AEONW:
-		return S32 | 2<<29 | 0xA<<24 | 1<<21
-
-	case AMVN, AORN:
-		return S64 | 1<<29 | 0xA<<24 | 1<<21
-
-	case AMVNW, AORNW:
-		return S32 | 1<<29 | 0xA<<24 | 1<<21
-
-	case AASR:
-		return S64 | OPDP2(10) /* also ASRV */
-
-	case AASRW:
-		return S32 | OPDP2(10)
-
-	case ALSL:
-		return S64 | OPDP2(8)
-
-	case ALSLW:
-		return S32 | OPDP2(8)
-
-	case ALSR:
-		return S64 | OPDP2(9)
-
-	case ALSRW:
-		return S32 | OPDP2(9)
-
-	case AROR:
-		return S64 | OPDP2(11)
-
-	case ARORW:
-		return S32 | OPDP2(11)
-
-	case ACCMN:
-		return S64 | 0<<30 | 1<<29 | 0xD2<<21 | 0<<11 | 0<<10 | 0<<4 /* cond<<12 | nzcv<<0 */
-
-	case ACCMNW:
-		return S32 | 0<<30 | 1<<29 | 0xD2<<21 | 0<<11 | 0<<10 | 0<<4
-
-	case ACCMP:
-		return S64 | 1<<30 | 1<<29 | 0xD2<<21 | 0<<11 | 0<<10 | 0<<4 /* imm5<<16 | cond<<12 | nzcv<<0 */
-
-	case ACCMPW:
-		return S32 | 1<<30 | 1<<29 | 0xD2<<21 | 0<<11 | 0<<10 | 0<<4
-
-	case ACRC32B:
-		return S32 | OPDP2(16)
-
-	case ACRC32H:
-		return S32 | OPDP2(17)
-
-	case ACRC32W:
-		return S32 | OPDP2(18)
-
-	case ACRC32X:
-		return S64 | OPDP2(19)
-
-	case ACRC32CB:
-		return S32 | OPDP2(20)
-
-	case ACRC32CH:
-		return S32 | OPDP2(21)
-
-	case ACRC32CW:
-		return S32 | OPDP2(22)
-
-	case ACRC32CX:
-		return S64 | OPDP2(23)
-
-	case ACSEL:
-		return S64 | 0<<30 | 0<<29 | 0xD4<<21 | 0<<11 | 0<<10
-
-	case ACSELW:
-		return S32 | 0<<30 | 0<<29 | 0xD4<<21 | 0<<11 | 0<<10
-
-	case ACSET:
-		return S64 | 0<<30 | 0<<29 | 0xD4<<21 | 0<<11 | 1<<10
-
-	case ACSETW:
-		return S32 | 0<<30 | 0<<29 | 0xD4<<21 | 0<<11 | 1<<10
-
-	case ACSETM:
-		return S64 | 1<<30 | 0<<29 | 0xD4<<21 | 0<<11 | 0<<10
-
-	case ACSETMW:
-		return S32 | 1<<30 | 0<<29 | 0xD4<<21 | 0<<11 | 0<<10
-
-	case ACINC, ACSINC:
-		return S64 | 0<<30 | 0<<29 | 0xD4<<21 | 0<<11 | 1<<10
-
-	case ACINCW, ACSINCW:
-		return S32 | 0<<30 | 0<<29 | 0xD4<<21 | 0<<11 | 1<<10
-
-	case ACINV, ACSINV:
-		return S64 | 1<<30 | 0<<29 | 0xD4<<21 | 0<<11 | 0<<10
-
-	case ACINVW, ACSINVW:
-		return S32 | 1<<30 | 0<<29 | 0xD4<<21 | 0<<11 | 0<<10
-
-	case ACNEG, ACSNEG:
-		return S64 | 1<<30 | 0<<29 | 0xD4<<21 | 0<<11 | 1<<10
-
-	case ACNEGW, ACSNEGW:
-		return S32 | 1<<30 | 0<<29 | 0xD4<<21 | 0<<11 | 1<<10
-
-	case AMUL, AMADD:
-		return S64 | 0<<29 | 0x1B<<24 | 0<<21 | 0<<15
-
-	case AMULW, AMADDW:
-		return S32 | 0<<29 | 0x1B<<24 | 0<<21 | 0<<15
-
-	case AMNEG, AMSUB:
-		return S64 | 0<<29 | 0x1B<<24 | 0<<21 | 1<<15
-
-	case AMNEGW, AMSUBW:
-		return S32 | 0<<29 | 0x1B<<24 | 0<<21 | 1<<15
-
-	case AMRS:
-		return SYSOP(1, 2, 0, 0, 0, 0, 0)
-
-	case AMSR:
-		return SYSOP(0, 2, 0, 0, 0, 0, 0)
-
-	case ANEG:
-		return S64 | 1<<30 | 0<<29 | 0xB<<24 | 0<<21
-
-	case ANEGW:
-		return S32 | 1<<30 | 0<<29 | 0xB<<24 | 0<<21
-
-	case ANEGS:
-		return S64 | 1<<30 | 1<<29 | 0xB<<24 | 0<<21
-
-	case ANEGSW:
-		return S32 | 1<<30 | 1<<29 | 0xB<<24 | 0<<21
-
-	case AREM, ASDIV:
-		return S64 | OPDP2(3)
-
-	case AREMW, ASDIVW:
-		return S32 | OPDP2(3)
-
-	case ASMULL, ASMADDL:
-		return OPDP3(1, 0, 1, 0)
-
-	case ASMNEGL, ASMSUBL:
-		return OPDP3(1, 0, 1, 1)
-
-	case ASMULH:
-		return OPDP3(1, 0, 2, 0)
-
-	case AUMULL, AUMADDL:
-		return OPDP3(1, 0, 5, 0)
-
-	case AUMNEGL, AUMSUBL:
-		return OPDP3(1, 0, 5, 1)
-
-	case AUMULH:
-		return OPDP3(1, 0, 6, 0)
-
-	case AUREM, AUDIV:
-		return S64 | OPDP2(2)
-
-	case AUREMW, AUDIVW:
-		return S32 | OPDP2(2)
-
-	case AAESE:
-		return 0x4E<<24 | 2<<20 | 8<<16 | 4<<12 | 2<<10
-
-	case AAESD:
-		return 0x4E<<24 | 2<<20 | 8<<16 | 5<<12 | 2<<10
-
-	case AAESMC:
-		return 0x4E<<24 | 2<<20 | 8<<16 | 6<<12 | 2<<10
-
-	case AAESIMC:
-		return 0x4E<<24 | 2<<20 | 8<<16 | 7<<12 | 2<<10
-
-	case ASHA1C:
-		return 0x5E<<24 | 0<<12
-
-	case ASHA1P:
-		return 0x5E<<24 | 1<<12
-
-	case ASHA1M:
-		return 0x5E<<24 | 2<<12
-
-	case ASHA1SU0:
-		return 0x5E<<24 | 3<<12
-
-	case ASHA256H:
-		return 0x5E<<24 | 4<<12
-
-	case ASHA256H2:
-		return 0x5E<<24 | 5<<12
-
-	case ASHA256SU1:
-		return 0x5E<<24 | 6<<12
-
-	case ASHA1H:
-		return 0x5E<<24 | 2<<20 | 8<<16 | 0<<12 | 2<<10
-
-	case ASHA1SU1:
-		return 0x5E<<24 | 2<<20 | 8<<16 | 1<<12 | 2<<10
-
-	case ASHA256SU0:
-		return 0x5E<<24 | 2<<20 | 8<<16 | 2<<12 | 2<<10
-
-	case AFCVTZSD:
-		return FPCVTI(1, 0, 1, 3, 0)
-
-	case AFCVTZSDW:
-		return FPCVTI(0, 0, 1, 3, 0)
-
-	case AFCVTZSS:
-		return FPCVTI(1, 0, 0, 3, 0)
-
-	case AFCVTZSSW:
-		return FPCVTI(0, 0, 0, 3, 0)
-
-	case AFCVTZUD:
-		return FPCVTI(1, 0, 1, 3, 1)
-
-	case AFCVTZUDW:
-		return FPCVTI(0, 0, 1, 3, 1)
-
-	case AFCVTZUS:
-		return FPCVTI(1, 0, 0, 3, 1)
-
-	case AFCVTZUSW:
-		return FPCVTI(0, 0, 0, 3, 1)
-
-	case ASCVTFD:
-		return FPCVTI(1, 0, 1, 0, 2)
-
-	case ASCVTFS:
-		return FPCVTI(1, 0, 0, 0, 2)
-
-	case ASCVTFWD:
-		return FPCVTI(0, 0, 1, 0, 2)
-
-	case ASCVTFWS:
-		return FPCVTI(0, 0, 0, 0, 2)
-
-	case AUCVTFD:
-		return FPCVTI(1, 0, 1, 0, 3)
-
-	case AUCVTFS:
-		return FPCVTI(1, 0, 0, 0, 3)
-
-	case AUCVTFWD:
-		return FPCVTI(0, 0, 1, 0, 3)
-
-	case AUCVTFWS:
-		return FPCVTI(0, 0, 0, 0, 3)
-
-	case AFADDS:
-		return FPOP2S(0, 0, 0, 2)
-
-	case AFADDD:
-		return FPOP2S(0, 0, 1, 2)
-
-	case AFSUBS:
-		return FPOP2S(0, 0, 0, 3)
-
-	case AFSUBD:
-		return FPOP2S(0, 0, 1, 3)
-
-	case AFMULS:
-		return FPOP2S(0, 0, 0, 0)
-
-	case AFMULD:
-		return FPOP2S(0, 0, 1, 0)
-
-	case AFDIVS:
-		return FPOP2S(0, 0, 0, 1)
-
-	case AFDIVD:
-		return FPOP2S(0, 0, 1, 1)
-
-	case AFMAXS:
-		return FPOP2S(0, 0, 0, 4)
-
-	case AFMINS:
-		return FPOP2S(0, 0, 0, 5)
-
-	case AFMAXD:
-		return FPOP2S(0, 0, 1, 4)
-
-	case AFMIND:
-		return FPOP2S(0, 0, 1, 5)
-
-	case AFMAXNMS:
-		return FPOP2S(0, 0, 0, 6)
-
-	case AFMAXNMD:
-		return FPOP2S(0, 0, 1, 6)
-
-	case AFMINNMS:
-		return FPOP2S(0, 0, 0, 7)
-
-	case AFMINNMD:
-		return FPOP2S(0, 0, 1, 7)
-
-	case AFNMULS:
-		return FPOP2S(0, 0, 0, 8)
-
-	case AFNMULD:
-		return FPOP2S(0, 0, 1, 8)
-
-	case AFCMPS:
-		return FPCMP(0, 0, 0, 0, 0)
-
-	case AFCMPD:
-		return FPCMP(0, 0, 1, 0, 0)
-
-	case AFCMPES:
-		return FPCMP(0, 0, 0, 0, 16)
-
-	case AFCMPED:
-		return FPCMP(0, 0, 1, 0, 16)
-
-	case AFCCMPS:
-		return FPCCMP(0, 0, 0, 0)
-
-	case AFCCMPD:
-		return FPCCMP(0, 0, 1, 0)
-
-	case AFCCMPES:
-		return FPCCMP(0, 0, 0, 1)
-
-	case AFCCMPED:
-		return FPCCMP(0, 0, 1, 1)
-
-	case AFCSELS:
-		return 0x1E<<24 | 0<<22 | 1<<21 | 3<<10
-
-	case AFCSELD:
-		return 0x1E<<24 | 1<<22 | 1<<21 | 3<<10
-
-	case AFMOVS:
-		return FPOP1S(0, 0, 0, 0)
-
-	case AFABSS:
-		return FPOP1S(0, 0, 0, 1)
-
-	case AFNEGS:
-		return FPOP1S(0, 0, 0, 2)
-
-	case AFSQRTS:
-		return FPOP1S(0, 0, 0, 3)
-
-	case AFCVTSD:
-		return FPOP1S(0, 0, 0, 5)
-
-	case AFCVTSH:
-		return FPOP1S(0, 0, 0, 7)
-
-	case AFRINTNS:
-		return FPOP1S(0, 0, 0, 8)
-
-	case AFRINTPS:
-		return FPOP1S(0, 0, 0, 9)
-
-	case AFRINTMS:
-		return FPOP1S(0, 0, 0, 10)
-
-	case AFRINTZS:
-		return FPOP1S(0, 0, 0, 11)
-
-	case AFRINTAS:
-		return FPOP1S(0, 0, 0, 12)
-
-	case AFRINTXS:
-		return FPOP1S(0, 0, 0, 14)
-
-	case AFRINTIS:
-		return FPOP1S(0, 0, 0, 15)
-
-	case AFMOVD:
-		return FPOP1S(0, 0, 1, 0)
-
-	case AFABSD:
-		return FPOP1S(0, 0, 1, 1)
-
-	case AFNEGD:
-		return FPOP1S(0, 0, 1, 2)
-
-	case AFSQRTD:
-		return FPOP1S(0, 0, 1, 3)
-
-	case AFCVTDS:
-		return FPOP1S(0, 0, 1, 4)
-
-	case AFCVTDH:
-		return FPOP1S(0, 0, 1, 7)
-
-	case AFRINTND:
-		return FPOP1S(0, 0, 1, 8)
-
-	case AFRINTPD:
-		return FPOP1S(0, 0, 1, 9)
-
-	case AFRINTMD:
-		return FPOP1S(0, 0, 1, 10)
-
-	case AFRINTZD:
-		return FPOP1S(0, 0, 1, 11)
-
-	case AFRINTAD:
-		return FPOP1S(0, 0, 1, 12)
-
-	case AFRINTXD:
-		return FPOP1S(0, 0, 1, 14)
-
-	case AFRINTID:
-		return FPOP1S(0, 0, 1, 15)
-
-	case AFCVTHS:
-		return FPOP1S(0, 0, 3, 4)
-
-	case AFCVTHD:
-		return FPOP1S(0, 0, 3, 5)
-	}
-
-	ctxt.Diag("bad rrr %d %v", a, obj.Aconv(a))
-	prasm(ctxt.Curp)
-	return 0
-}
-
-/*
- * imm -> Rd
- * imm op Rn -> Rd
- */
-func opirr(ctxt *obj.Link, a int) uint32 {
-	switch a {
-	/* op $addcon, Rn, Rd */
-	case AMOVD, AADD:
-		return S64 | 0<<30 | 0<<29 | 0x11<<24
-
-	case ACMN, AADDS:
-		return S64 | 0<<30 | 1<<29 | 0x11<<24
-
-	case AMOVW, AADDW:
-		return S32 | 0<<30 | 0<<29 | 0x11<<24
-
-	case ACMNW, AADDSW:
-		return S32 | 0<<30 | 1<<29 | 0x11<<24
-
-	case ASUB:
-		return S64 | 1<<30 | 0<<29 | 0x11<<24
-
-	case ACMP, ASUBS:
-		return S64 | 1<<30 | 1<<29 | 0x11<<24
-
-	case ASUBW:
-		return S32 | 1<<30 | 0<<29 | 0x11<<24
-
-	case ACMPW, ASUBSW:
-		return S32 | 1<<30 | 1<<29 | 0x11<<24
-
-		/* op $imm(SB), Rd; op label, Rd */
-	case AADR:
-		return 0<<31 | 0x10<<24
-
-	case AADRP:
-		return 1<<31 | 0x10<<24
-
-		/* op $bimm, Rn, Rd */
-	case AAND:
-		return S64 | 0<<29 | 0x24<<23
-
-	case AANDW:
-		return S32 | 0<<29 | 0x24<<23 | 0<<22
-
-	case AORR:
-		return S64 | 1<<29 | 0x24<<23
-
-	case AORRW:
-		return S32 | 1<<29 | 0x24<<23 | 0<<22
-
-	case AEOR:
-		return S64 | 2<<29 | 0x24<<23
-
-	case AEORW:
-		return S32 | 2<<29 | 0x24<<23 | 0<<22
-
-	case AANDS:
-		return S64 | 3<<29 | 0x24<<23
-
-	case AANDSW:
-		return S32 | 3<<29 | 0x24<<23 | 0<<22
-
-	case AASR:
-		return S64 | 0<<29 | 0x26<<23 /* alias of SBFM */
-
-	case AASRW:
-		return S32 | 0<<29 | 0x26<<23 | 0<<22
-
-		/* op $width, $lsb, Rn, Rd */
-	case ABFI:
-		return S64 | 2<<29 | 0x26<<23 | 1<<22
-		/* alias of BFM */
-
-	case ABFIW:
-		return S32 | 2<<29 | 0x26<<23 | 0<<22
-
-		/* op $imms, $immr, Rn, Rd */
-	case ABFM:
-		return S64 | 1<<29 | 0x26<<23 | 1<<22
-
-	case ABFMW:
-		return S32 | 1<<29 | 0x26<<23 | 0<<22
-
-	case ASBFM:
-		return S64 | 0<<29 | 0x26<<23 | 1<<22
-
-	case ASBFMW:
-		return S32 | 0<<29 | 0x26<<23 | 0<<22
-
-	case AUBFM:
-		return S64 | 2<<29 | 0x26<<23 | 1<<22
-
-	case AUBFMW:
-		return S32 | 2<<29 | 0x26<<23 | 0<<22
-
-	case ABFXIL:
-		return S64 | 1<<29 | 0x26<<23 | 1<<22 /* alias of BFM */
-
-	case ABFXILW:
-		return S32 | 1<<29 | 0x26<<23 | 0<<22
-
-	case AEXTR:
-		return S64 | 0<<29 | 0x27<<23 | 1<<22 | 0<<21
-
-	case AEXTRW:
-		return S32 | 0<<29 | 0x27<<23 | 0<<22 | 0<<21
-
-	case ACBNZ:
-		return S64 | 0x1A<<25 | 1<<24
-
-	case ACBNZW:
-		return S32 | 0x1A<<25 | 1<<24
-
-	case ACBZ:
-		return S64 | 0x1A<<25 | 0<<24
-
-	case ACBZW:
-		return S32 | 0x1A<<25 | 0<<24
-
-	case ACCMN:
-		return S64 | 0<<30 | 1<<29 | 0xD2<<21 | 1<<11 | 0<<10 | 0<<4 /* imm5<<16 | cond<<12 | nzcv<<0 */
-
-	case ACCMNW:
-		return S32 | 0<<30 | 1<<29 | 0xD2<<21 | 1<<11 | 0<<10 | 0<<4
-
-	case ACCMP:
-		return S64 | 1<<30 | 1<<29 | 0xD2<<21 | 1<<11 | 0<<10 | 0<<4 /* imm5<<16 | cond<<12 | nzcv<<0 */
-
-	case ACCMPW:
-		return S32 | 1<<30 | 1<<29 | 0xD2<<21 | 1<<11 | 0<<10 | 0<<4
-
-	case AMOVK:
-		return S64 | 3<<29 | 0x25<<23
-
-	case AMOVKW:
-		return S32 | 3<<29 | 0x25<<23
-
-	case AMOVN:
-		return S64 | 0<<29 | 0x25<<23
-
-	case AMOVNW:
-		return S32 | 0<<29 | 0x25<<23
-
-	case AMOVZ:
-		return S64 | 2<<29 | 0x25<<23
-
-	case AMOVZW:
-		return S32 | 2<<29 | 0x25<<23
-
-	case AMSR:
-		return SYSOP(0, 0, 0, 4, 0, 0, 0x1F) /* MSR (immediate) */
-
-	case AAT,
-		ADC,
-		AIC,
-		ATLBI,
-		ASYS:
-		return SYSOP(0, 1, 0, 0, 0, 0, 0)
-
-	case ASYSL:
-		return SYSOP(1, 1, 0, 0, 0, 0, 0)
-
-	case ATBZ:
-		return 0x36 << 24
-
-	case ATBNZ:
-		return 0x37 << 24
-
-	case ADSB:
-		return SYSOP(0, 0, 3, 3, 0, 4, 0x1F)
-
-	case ADMB:
-		return SYSOP(0, 0, 3, 3, 0, 5, 0x1F)
-
-	case AISB:
-		return SYSOP(0, 0, 3, 3, 0, 6, 0x1F)
-
-	case AHINT:
-		return SYSOP(0, 0, 3, 2, 0, 0, 0x1F)
-	}
-
-	ctxt.Diag("bad irr %v", obj.Aconv(a))
-	prasm(ctxt.Curp)
-	return 0
-}
-
-func opbit(ctxt *obj.Link, a int) uint32 {
-	switch a {
-	case ACLS:
-		return S64 | OPBIT(5)
-
-	case ACLSW:
-		return S32 | OPBIT(5)
-
-	case ACLZ:
-		return S64 | OPBIT(4)
-
-	case ACLZW:
-		return S32 | OPBIT(4)
-
-	case ARBIT:
-		return S64 | OPBIT(0)
-
-	case ARBITW:
-		return S32 | OPBIT(0)
-
-	case AREV:
-		return S64 | OPBIT(3)
-
-	case AREVW:
-		return S32 | OPBIT(2)
-
-	case AREV16:
-		return S64 | OPBIT(1)
-
-	case AREV16W:
-		return S32 | OPBIT(1)
-
-	case AREV32:
-		return S64 | OPBIT(2)
-
-	default:
-		ctxt.Diag("bad bit op\n%v", ctxt.Curp)
-		return 0
-	}
-}
-
-/*
- * add/subtract extended register
- */
-func opxrrr(ctxt *obj.Link, a int) uint32 {
-	switch a {
-	case AADD:
-		return S64 | 0<<30 | 0<<29 | 0x0b<<24 | 0<<22 | 1<<21 | LSL0_64
-
-	case AADDW:
-		return S32 | 0<<30 | 0<<29 | 0x0b<<24 | 0<<22 | 1<<21 | LSL0_32
-
-	case ACMN, AADDS:
-		return S64 | 0<<30 | 1<<29 | 0x0b<<24 | 0<<22 | 1<<21 | LSL0_64
-
-	case ACMNW, AADDSW:
-		return S32 | 0<<30 | 1<<29 | 0x0b<<24 | 0<<22 | 1<<21 | LSL0_32
-
-	case ASUB:
-		return S64 | 1<<30 | 0<<29 | 0x0b<<24 | 0<<22 | 1<<21 | LSL0_64
-
-	case ASUBW:
-		return S32 | 1<<30 | 0<<29 | 0x0b<<24 | 0<<22 | 1<<21 | LSL0_32
-
-	case ACMP, ASUBS:
-		return S64 | 1<<30 | 1<<29 | 0x0b<<24 | 0<<22 | 1<<21 | LSL0_64
-
-	case ACMPW, ASUBSW:
-		return S32 | 1<<30 | 1<<29 | 0x0b<<24 | 0<<22 | 1<<21 | LSL0_32
-	}
-
-	ctxt.Diag("bad opxrrr %v\n%v", obj.Aconv(a), ctxt.Curp)
-	return 0
-}
-
-func opimm(ctxt *obj.Link, a int) uint32 {
-	switch a {
-	case ASVC:
-		return 0xD4<<24 | 0<<21 | 1 /* imm16<<5 */
-
-	case AHVC:
-		return 0xD4<<24 | 0<<21 | 2
-
-	case ASMC:
-		return 0xD4<<24 | 0<<21 | 3
-
-	case ABRK:
-		return 0xD4<<24 | 1<<21 | 0
-
-	case AHLT:
-		return 0xD4<<24 | 2<<21 | 0
-
-	case ADCPS1:
-		return 0xD4<<24 | 5<<21 | 1
-
-	case ADCPS2:
-		return 0xD4<<24 | 5<<21 | 2
-
-	case ADCPS3:
-		return 0xD4<<24 | 5<<21 | 3
-
-	case ACLREX:
-		return SYSOP(0, 0, 3, 3, 0, 2, 0x1F)
-	}
-
-	ctxt.Diag("bad imm %v", obj.Aconv(a))
-	prasm(ctxt.Curp)
-	return 0
-}
-
-func brdist(ctxt *obj.Link, p *obj.Prog, preshift int, flen int, shift int) int64 {
-	v := int64(0)
-	t := int64(0)
-	if p.Pcond != nil {
-		v = (p.Pcond.Pc >> uint(preshift)) - (ctxt.Pc >> uint(preshift))
-		if (v & ((1 << uint(shift)) - 1)) != 0 {
-			ctxt.Diag("misaligned label\n%v", p)
-		}
-		v >>= uint(shift)
-		t = int64(1) << uint(flen-1)
-		if v < -t || v >= t {
-			ctxt.Diag("branch too far\n%v", p)
-		}
-	}
-
-	return v & ((t << 1) - 1)
-}
-
-/*
- * pc-relative branches
- */
-func opbra(ctxt *obj.Link, a int) uint32 {
-	switch a {
-	case ABEQ:
-		return OPBcc(0x0)
-
-	case ABNE:
-		return OPBcc(0x1)
-
-	case ABCS:
-		return OPBcc(0x2)
-
-	case ABHS:
-		return OPBcc(0x2)
-
-	case ABCC:
-		return OPBcc(0x3)
-
-	case ABLO:
-		return OPBcc(0x3)
-
-	case ABMI:
-		return OPBcc(0x4)
-
-	case ABPL:
-		return OPBcc(0x5)
-
-	case ABVS:
-		return OPBcc(0x6)
-
-	case ABVC:
-		return OPBcc(0x7)
-
-	case ABHI:
-		return OPBcc(0x8)
-
-	case ABLS:
-		return OPBcc(0x9)
-
-	case ABGE:
-		return OPBcc(0xa)
-
-	case ABLT:
-		return OPBcc(0xb)
-
-	case ABGT:
-		return OPBcc(0xc)
-
-	case ABLE:
-		return OPBcc(0xd) /* imm19<<5 | cond */
-
-	case AB:
-		return 0<<31 | 5<<26 /* imm26 */
-
-	case obj.ADUFFZERO,
-		ABL:
-		return 1<<31 | 5<<26
-	}
-
-	ctxt.Diag("bad bra %v", obj.Aconv(a))
-	prasm(ctxt.Curp)
-	return 0
-}
-
-func opbrr(ctxt *obj.Link, a int) uint32 {
-	switch a {
-	case ABL:
-		return OPBLR(1) /* BLR */
-
-	case AB:
-		return OPBLR(0) /* BR */
-
-	case obj.ARET:
-		return OPBLR(2) /* RET */
-	}
-
-	ctxt.Diag("bad brr %v", obj.Aconv(a))
-	prasm(ctxt.Curp)
-	return 0
-}
-
-func op0(ctxt *obj.Link, a int) uint32 {
-	switch a {
-	case ADRPS:
-		return 0x6B<<25 | 5<<21 | 0x1F<<16 | 0x1F<<5
-
-	case AERET:
-		return 0x6B<<25 | 4<<21 | 0x1F<<16 | 0<<10 | 0x1F<<5
-
-	// case ANOP:
-	// 	return SYSHINT(0)
-
-	case AYIELD:
-		return SYSHINT(1)
-
-	case AWFE:
-		return SYSHINT(2)
-
-	case AWFI:
-		return SYSHINT(3)
-
-	case ASEV:
-		return SYSHINT(4)
-
-	case ASEVL:
-		return SYSHINT(5)
-	}
-
-	ctxt.Diag("bad op0 %v", obj.Aconv(a))
-	prasm(ctxt.Curp)
-	return 0
-}
-
-/*
- * register offset
- */
-func opload(ctxt *obj.Link, a int) uint32 {
-	switch a {
-	case ALDAR:
-		return LDSTX(3, 1, 1, 0, 1) | 0x1F<<10
-
-	case ALDARW:
-		return LDSTX(2, 1, 1, 0, 1) | 0x1F<<10
-
-	case ALDARB:
-		return LDSTX(0, 1, 1, 0, 1) | 0x1F<<10
-
-	case ALDARH:
-		return LDSTX(1, 1, 1, 0, 1) | 0x1F<<10
-
-	case ALDAXP:
-		return LDSTX(3, 0, 1, 1, 1)
-
-	case ALDAXPW:
-		return LDSTX(2, 0, 1, 1, 1)
-
-	case ALDAXR:
-		return LDSTX(3, 0, 1, 0, 1) | 0x1F<<10
-
-	case ALDAXRW:
-		return LDSTX(2, 0, 1, 0, 1) | 0x1F<<10
-
-	case ALDAXRB:
-		return LDSTX(0, 0, 1, 0, 1) | 0x1F<<10
-
-	case ALDAXRH:
-		return LDSTX(1, 0, 1, 0, 1) | 0x1F<<10
-
-	case ALDXR:
-		return LDSTX(3, 0, 1, 0, 0) | 0x1F<<10
-
-	case ALDXRB:
-		return LDSTX(0, 0, 1, 0, 0) | 0x1F<<10
-
-	case ALDXRH:
-		return LDSTX(1, 0, 1, 0, 0) | 0x1F<<10
-
-	case ALDXRW:
-		return LDSTX(2, 0, 1, 0, 0) | 0x1F<<10
-
-	case ALDXP:
-		return LDSTX(3, 0, 1, 1, 0)
-
-	case ALDXPW:
-		return LDSTX(2, 0, 1, 1, 0)
-
-	case AMOVNP:
-		return S64 | 0<<30 | 5<<27 | 0<<26 | 0<<23 | 1<<22
-
-	case AMOVNPW:
-		return S32 | 0<<30 | 5<<27 | 0<<26 | 0<<23 | 1<<22
-	}
-
-	ctxt.Diag("bad opload %v\n%v", obj.Aconv(a), ctxt.Curp)
-	return 0
-}
-
-func opstore(ctxt *obj.Link, a int) uint32 {
-	switch a {
-	case ASTLR:
-		return LDSTX(3, 1, 0, 0, 1) | 0x1F<<10
-
-	case ASTLRB:
-		return LDSTX(0, 1, 0, 0, 1) | 0x1F<<10
-
-	case ASTLRH:
-		return LDSTX(1, 1, 0, 0, 1) | 0x1F<<10
-
-	case ASTLP:
-		return LDSTX(3, 0, 0, 1, 1)
-
-	case ASTLPW:
-		return LDSTX(2, 0, 0, 1, 1)
-
-	case ASTLRW:
-		return LDSTX(2, 1, 0, 0, 1) | 0x1F<<10
-
-	case ASTLXP:
-		return LDSTX(2, 0, 0, 1, 1)
-
-	case ASTLXPW:
-		return LDSTX(3, 0, 0, 1, 1)
-
-	case ASTLXR:
-		return LDSTX(3, 0, 0, 0, 1) | 0x1F<<10
-
-	case ASTLXRB:
-		return LDSTX(0, 0, 0, 0, 1) | 0x1F<<10
-
-	case ASTLXRH:
-		return LDSTX(1, 0, 0, 0, 1) | 0x1F<<10
-
-	case ASTLXRW:
-		return LDSTX(2, 0, 0, 0, 1) | 0x1F<<10
-
-	case ASTXR:
-		return LDSTX(3, 0, 0, 0, 0) | 0x1F<<10
-
-	case ASTXRB:
-		return LDSTX(0, 0, 0, 0, 0) | 0x1F<<10
-
-	case ASTXRH:
-		return LDSTX(1, 0, 0, 0, 0) | 0x1F<<10
-
-	case ASTXP:
-		return LDSTX(3, 0, 0, 1, 0)
-
-	case ASTXPW:
-		return LDSTX(2, 0, 0, 1, 0)
-
-	case ASTXRW:
-		return LDSTX(2, 0, 0, 0, 0) | 0x1F<<10
-
-	case AMOVNP:
-		return S64 | 0<<30 | 5<<27 | 0<<26 | 0<<23 | 1<<22
-
-	case AMOVNPW:
-		return S32 | 0<<30 | 5<<27 | 0<<26 | 0<<23 | 1<<22
-	}
-
-	ctxt.Diag("bad opstore %v\n%v", obj.Aconv(a), ctxt.Curp)
-	return 0
-}
-
-/*
- * load/store register (unsigned immediate) C3.3.13
- *	these produce 64-bit values (when there's an option)
- */
-func olsr12u(ctxt *obj.Link, o int32, v int32, b int, r int) uint32 {
-	if v < 0 || v >= (1<<12) {
-		ctxt.Diag("offset out of range: %d\n%v", v, ctxt.Curp)
-	}
-	o |= (v & 0xFFF) << 10
-	o |= int32(b&31) << 5
-	o |= int32(r & 31)
-	return uint32(o)
-}
-
-func opldr12(ctxt *obj.Link, a int) uint32 {
-	switch a {
-	case AMOVD:
-		return LDSTR12U(3, 0, 1) /* imm12<<10 | Rn<<5 | Rt */
-
-	case AMOVW:
-		return LDSTR12U(2, 0, 2)
-
-	case AMOVWU:
-		return LDSTR12U(2, 0, 1)
-
-	case AMOVH:
-		return LDSTR12U(1, 0, 2)
-
-	case AMOVHU:
-		return LDSTR12U(1, 0, 1)
-
-	case AMOVB:
-		return LDSTR12U(0, 0, 2)
-
-	case AMOVBU:
-		return LDSTR12U(0, 0, 1)
-
-	case AFMOVS:
-		return LDSTR12U(2, 1, 1)
-
-	case AFMOVD:
-		return LDSTR12U(3, 1, 1)
-	}
-
-	ctxt.Diag("bad opldr12 %v\n%v", obj.Aconv(a), ctxt.Curp)
-	return 0
-}
-
-func opstr12(ctxt *obj.Link, a int) uint32 {
-	return LD2STR(opldr12(ctxt, a))
-}
-
-/*
- * load/store register (unscaled immediate) C3.3.12
- */
-func olsr9s(ctxt *obj.Link, o int32, v int32, b int, r int) uint32 {
-	if v < -256 || v > 255 {
-		ctxt.Diag("offset out of range: %d\n%v", v, ctxt.Curp)
-	}
-	o |= (v & 0x1FF) << 12
-	o |= int32(b&31) << 5
-	o |= int32(r & 31)
-	return uint32(o)
-}
-
-func opldr9(ctxt *obj.Link, a int) uint32 {
-	switch a {
-	case AMOVD:
-		return LDSTR9S(3, 0, 1) /* simm9<<12 | Rn<<5 | Rt */
-
-	case AMOVW:
-		return LDSTR9S(2, 0, 2)
-
-	case AMOVWU:
-		return LDSTR9S(2, 0, 1)
-
-	case AMOVH:
-		return LDSTR9S(1, 0, 2)
-
-	case AMOVHU:
-		return LDSTR9S(1, 0, 1)
-
-	case AMOVB:
-		return LDSTR9S(0, 0, 2)
-
-	case AMOVBU:
-		return LDSTR9S(0, 0, 1)
-
-	case AFMOVS:
-		return LDSTR9S(2, 1, 1)
-
-	case AFMOVD:
-		return LDSTR9S(3, 1, 1)
-	}
-
-	ctxt.Diag("bad opldr9 %v\n%v", obj.Aconv(a), ctxt.Curp)
-	return 0
-}
-
-func opstr9(ctxt *obj.Link, a int) uint32 {
-	return LD2STR(opldr9(ctxt, a))
-}
-
-func opldrpp(ctxt *obj.Link, a int) uint32 {
-	switch a {
-	case AMOVD:
-		return 3<<30 | 7<<27 | 0<<26 | 0<<24 | 1<<22 /* simm9<<12 | Rn<<5 | Rt */
-
-	case AMOVW:
-		return 2<<30 | 7<<27 | 0<<26 | 0<<24 | 2<<22
-
-	case AMOVWU:
-		return 2<<30 | 7<<27 | 0<<26 | 0<<24 | 1<<22
-
-	case AMOVH:
-		return 1<<30 | 7<<27 | 0<<26 | 0<<24 | 2<<22
-
-	case AMOVHU:
-		return 1<<30 | 7<<27 | 0<<26 | 0<<24 | 1<<22
-
-	case AMOVB:
-		return 0<<30 | 7<<27 | 0<<26 | 0<<24 | 2<<22
-
-	case AMOVBU:
-		return 0<<30 | 7<<27 | 0<<26 | 0<<24 | 1<<22
-	}
-
-	ctxt.Diag("bad opldr %v\n%v", obj.Aconv(a), ctxt.Curp)
-	return 0
-}
-
-/*
- * load/store register (extended register)
- */
-func olsxrr(ctxt *obj.Link, as int, rt int, r1 int, r2 int) uint32 {
-	ctxt.Diag("need load/store extended register\n%v", ctxt.Curp)
-	return 0xffffffff
-}
-
-func oaddi(ctxt *obj.Link, o1 int32, v int32, r int, rt int) uint32 {
-	if (v & 0xFFF000) != 0 {
-		if v&0xFFF != 0 {
-			ctxt.Diag("%v misuses oaddi", ctxt.Curp)
-		}
-		v >>= 12
-		o1 |= 1 << 22
-	}
-
-	o1 |= ((v & 0xFFF) << 10) | (int32(r&31) << 5) | int32(rt&31)
-	return uint32(o1)
-}
-
-/*
- * load a a literal value into dr
- */
-func omovlit(ctxt *obj.Link, as int, p *obj.Prog, a *obj.Addr, dr int) uint32 {
-	var o1 int32
-	if p.Pcond == nil { /* not in literal pool */
-		aclass(ctxt, a)
-		fmt.Fprintf(ctxt.Bso, "omovlit add %d (%#x)\n", ctxt.Instoffset, uint64(ctxt.Instoffset))
-
-		/* TODO: could be clever, and use general constant builder */
-		o1 = int32(opirr(ctxt, AADD))
-
-		v := int32(ctxt.Instoffset)
-		if v != 0 && (v&0xFFF) == 0 {
-			v >>= 12
-			o1 |= 1 << 22 /* shift, by 12 */
-		}
-
-		o1 |= ((v & 0xFFF) << 10) | (REGZERO & 31 << 5) | int32(dr&31)
-	} else {
-		fp := 0
-		w := 0 /* default: 32 bit, unsigned */
-		switch as {
-		case AFMOVS:
-			fp = 1
-
-		case AFMOVD:
-			fp = 1
-			w = 1 /* 64 bit simd&fp */
-
-		case AMOVD:
-			if p.Pcond.As == ADWORD {
-				w = 1 /* 64 bit */
-			} else if p.Pcond.To.Offset < 0 {
-				w = 2 /* sign extend */
-			}
-
-		case AMOVB, AMOVH, AMOVW:
-			w = 2 /* 32 bit, sign-extended to 64 */
-			break
-		}
-
-		v := int32(brdist(ctxt, p, 0, 19, 2))
-		o1 = (int32(w) << 30) | (int32(fp) << 26) | (3 << 27)
-		o1 |= (v & 0x7FFFF) << 5
-		o1 |= int32(dr & 31)
-	}
-
-	return uint32(o1)
-}
-
-func opbfm(ctxt *obj.Link, a int, r int, s int, rf int, rt int) uint32 {
-	var c uint32
-	o := opirr(ctxt, a)
-	if (o & (1 << 31)) == 0 {
-		c = 32
-	} else {
-		c = 64
-	}
-	if r < 0 || uint32(r) >= c {
-		ctxt.Diag("illegal bit number\n%v", ctxt.Curp)
-	}
-	o |= (uint32(r) & 0x3F) << 16
-	if s < 0 || uint32(s) >= c {
-		ctxt.Diag("illegal bit number\n%v", ctxt.Curp)
-	}
-	o |= (uint32(s) & 0x3F) << 10
-	o |= (uint32(rf&31) << 5) | uint32(rt&31)
-	return o
-}
-
-func opextr(ctxt *obj.Link, a int, v int32, rn int, rm int, rt int) uint32 {
-	var c uint32
-	o := opirr(ctxt, a)
-	if (o & (1 << 31)) != 0 {
-		c = 63
-	} else {
-		c = 31
-	}
-	if v < 0 || uint32(v) > c {
-		ctxt.Diag("illegal bit number\n%v", ctxt.Curp)
-	}
-	o |= uint32(v) << 10
-	o |= uint32(rn&31) << 5
-	o |= uint32(rm&31) << 16
-	o |= uint32(rt & 31)
-	return o
-}
-
-/*
- * size in log2(bytes)
- */
-func movesize(a int) int {
-	switch a {
-	case AMOVD:
-		return 3
-
-	case AMOVW, AMOVWU:
-		return 2
-
-	case AMOVH, AMOVHU:
-		return 1
-
-	case AMOVB, AMOVBU:
-		return 0
-
-	case AFMOVS:
-		return 2
-
-	case AFMOVD:
-		return 3
-
-	default:
-		return -1
-	}
-}
diff --git a/src/cmd/internal/obj/arm64/list7.go b/src/cmd/internal/obj/arm64/list7.go
deleted file mode 100644
index 53d67c9..0000000
--- a/src/cmd/internal/obj/arm64/list7.go
+++ /dev/null
@@ -1,114 +0,0 @@
-// cmd/7l/list.c and cmd/7l/sub.c from Vita Nuova.
-// https://code.google.com/p/ken-cc/source/browse/
-//
-// 	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-// 	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-// 	Portions Copyright © 1997-1999 Vita Nuova Limited
-// 	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-// 	Portions Copyright © 2004,2006 Bruce Ellis
-// 	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-// 	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-// 	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package arm64
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-)
-
-var strcond = [16]string{
-	"EQ",
-	"NE",
-	"HS",
-	"LO",
-	"MI",
-	"PL",
-	"VS",
-	"VC",
-	"HI",
-	"LS",
-	"GE",
-	"LT",
-	"GT",
-	"LE",
-	"AL",
-	"NV",
-}
-
-func init() {
-	obj.RegisterRegister(obj.RBaseARM64, REG_SPECIAL+1024, Rconv)
-	obj.RegisterOpcode(obj.ABaseARM64, Anames)
-}
-
-func Rconv(r int) string {
-	if r == REGG {
-		return "g"
-	}
-	switch {
-	case REG_R0 <= r && r <= REG_R30:
-		return fmt.Sprintf("R%d", r-REG_R0)
-	case r == REG_R31:
-		return "ZR"
-	case REG_F0 <= r && r <= REG_F31:
-		return fmt.Sprintf("F%d", r-REG_F0)
-	case REG_V0 <= r && r <= REG_V31:
-		return fmt.Sprintf("V%d", r-REG_F0)
-	case COND_EQ <= r && r <= COND_NV:
-		return strcond[r-COND_EQ]
-	case r == REGSP:
-		return "RSP"
-	case r == REG_DAIF:
-		return "DAIF"
-	case r == REG_NZCV:
-		return "NZCV"
-	case r == REG_FPSR:
-		return "FPSR"
-	case r == REG_FPCR:
-		return "FPCR"
-	case r == REG_SPSR_EL1:
-		return "SPSR_EL1"
-	case r == REG_ELR_EL1:
-		return "ELR_EL1"
-	case r == REG_SPSR_EL2:
-		return "SPSR_EL2"
-	case r == REG_ELR_EL2:
-		return "ELR_EL2"
-	case r == REG_CurrentEL:
-		return "CurrentEL"
-	case r == REG_SP_EL0:
-		return "SP_EL0"
-	case r == REG_SPSel:
-		return "SPSel"
-	case r == REG_DAIFSet:
-		return "DAIFSet"
-	case r == REG_DAIFClr:
-		return "DAIFClr"
-	}
-	return fmt.Sprintf("badreg(%d)", r)
-}
-
-func DRconv(a int) string {
-	if a >= C_NONE && a <= C_NCLASS {
-		return cnames7[a]
-	}
-	return "C_??"
-}
diff --git a/src/cmd/internal/obj/arm64/obj7.go b/src/cmd/internal/obj/arm64/obj7.go
deleted file mode 100644
index f43ce03..0000000
--- a/src/cmd/internal/obj/arm64/obj7.go
+++ /dev/null
@@ -1,836 +0,0 @@
-// cmd/7l/noop.c, cmd/7l/obj.c, cmd/ld/pass.c from Vita Nuova.
-// https://code.google.com/p/ken-cc/source/browse/
-//
-// 	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-// 	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-// 	Portions Copyright © 1997-1999 Vita Nuova Limited
-// 	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-// 	Portions Copyright © 2004,2006 Bruce Ellis
-// 	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-// 	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-// 	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package arm64
-
-import (
-	"cmd/internal/obj"
-	"encoding/binary"
-	"fmt"
-	"log"
-	"math"
-)
-
-var complements = []int16{
-	AADD:  ASUB,
-	AADDW: ASUBW,
-	ASUB:  AADD,
-	ASUBW: AADDW,
-	ACMP:  ACMN,
-	ACMPW: ACMNW,
-	ACMN:  ACMP,
-	ACMNW: ACMPW,
-}
-
-func stacksplit(ctxt *obj.Link, p *obj.Prog, framesize int32) *obj.Prog {
-	// MOV	g_stackguard(g), R1
-	p = obj.Appendp(ctxt, p)
-
-	p.As = AMOVD
-	p.From.Type = obj.TYPE_MEM
-	p.From.Reg = REGG
-	p.From.Offset = 2 * int64(ctxt.Arch.Ptrsize) // G.stackguard0
-	if ctxt.Cursym.Cfunc != 0 {
-		p.From.Offset = 3 * int64(ctxt.Arch.Ptrsize) // G.stackguard1
-	}
-	p.To.Type = obj.TYPE_REG
-	p.To.Reg = REG_R1
-
-	q := (*obj.Prog)(nil)
-	if framesize <= obj.StackSmall {
-		// small stack: SP < stackguard
-		//	MOV	SP, R2
-		//	CMP	stackguard, R2
-		p = obj.Appendp(ctxt, p)
-
-		p.As = AMOVD
-		p.From.Type = obj.TYPE_REG
-		p.From.Reg = REGSP
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_R2
-
-		p = obj.Appendp(ctxt, p)
-		p.As = ACMP
-		p.From.Type = obj.TYPE_REG
-		p.From.Reg = REG_R1
-		p.Reg = REG_R2
-	} else if framesize <= obj.StackBig {
-		// large stack: SP-framesize < stackguard-StackSmall
-		//	SUB	$framesize, SP, R2
-		//	CMP	stackguard, R2
-		p = obj.Appendp(ctxt, p)
-
-		p.As = ASUB
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = int64(framesize)
-		p.Reg = REGSP
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_R2
-
-		p = obj.Appendp(ctxt, p)
-		p.As = ACMP
-		p.From.Type = obj.TYPE_REG
-		p.From.Reg = REG_R1
-		p.Reg = REG_R2
-	} else {
-		// Such a large stack we need to protect against wraparound
-		// if SP is close to zero.
-		//	SP-stackguard+StackGuard < framesize + (StackGuard-StackSmall)
-		// The +StackGuard on both sides is required to keep the left side positive:
-		// SP is allowed to be slightly below stackguard. See stack.h.
-		//	CMP	$StackPreempt, R1
-		//	BEQ	label_of_call_to_morestack
-		//	ADD	$StackGuard, SP, R2
-		//	SUB	R1, R2
-		//	MOV	$(framesize+(StackGuard-StackSmall)), R3
-		//	CMP	R3, R2
-		p = obj.Appendp(ctxt, p)
-
-		p.As = ACMP
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = obj.StackPreempt
-		p.Reg = REG_R1
-
-		p = obj.Appendp(ctxt, p)
-		q = p
-		p.As = ABEQ
-		p.To.Type = obj.TYPE_BRANCH
-
-		p = obj.Appendp(ctxt, p)
-		p.As = AADD
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = obj.StackGuard
-		p.Reg = REGSP
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_R2
-
-		p = obj.Appendp(ctxt, p)
-		p.As = ASUB
-		p.From.Type = obj.TYPE_REG
-		p.From.Reg = REG_R1
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_R2
-
-		p = obj.Appendp(ctxt, p)
-		p.As = AMOVD
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = int64(framesize) + (obj.StackGuard - obj.StackSmall)
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_R3
-
-		p = obj.Appendp(ctxt, p)
-		p.As = ACMP
-		p.From.Type = obj.TYPE_REG
-		p.From.Reg = REG_R3
-		p.Reg = REG_R2
-	}
-
-	// BLS	do-morestack
-	bls := obj.Appendp(ctxt, p)
-	bls.As = ABLS
-	bls.To.Type = obj.TYPE_BRANCH
-
-	var last *obj.Prog
-	for last = ctxt.Cursym.Text; last.Link != nil; last = last.Link {
-	}
-
-	// MOV	LR, R3
-	movlr := obj.Appendp(ctxt, last)
-	movlr.As = AMOVD
-	movlr.From.Type = obj.TYPE_REG
-	movlr.From.Reg = REGLINK
-	movlr.To.Type = obj.TYPE_REG
-	movlr.To.Reg = REG_R3
-	if q != nil {
-		q.Pcond = movlr
-	}
-	bls.Pcond = movlr
-
-	debug := movlr
-	if false {
-		debug = obj.Appendp(ctxt, debug)
-		debug.As = AMOVD
-		debug.From.Type = obj.TYPE_CONST
-		debug.From.Offset = int64(framesize)
-		debug.To.Type = obj.TYPE_REG
-		debug.To.Reg = REGTMP
-	}
-
-	// BL	runtime.morestack(SB)
-	call := obj.Appendp(ctxt, debug)
-	call.As = ABL
-	call.To.Type = obj.TYPE_BRANCH
-	morestack := "runtime.morestack"
-	switch {
-	case ctxt.Cursym.Cfunc != 0:
-		morestack = "runtime.morestackc"
-	case ctxt.Cursym.Text.From3.Offset&obj.NEEDCTXT == 0:
-		morestack = "runtime.morestack_noctxt"
-	}
-	call.To.Sym = obj.Linklookup(ctxt, morestack, 0)
-
-	// B	start
-	jmp := obj.Appendp(ctxt, call)
-	jmp.As = AB
-	jmp.To.Type = obj.TYPE_BRANCH
-	jmp.Pcond = ctxt.Cursym.Text.Link
-
-	// placeholder for bls's jump target
-	// p = obj.Appendp(ctxt, p)
-	// p.As = obj.ANOP
-
-	return bls
-}
-
-func progedit(ctxt *obj.Link, p *obj.Prog) {
-	p.From.Class = 0
-	p.To.Class = 0
-
-	// $0 results in C_ZCON, which matches both C_REG and various
-	// C_xCON, however the C_REG cases in asmout don't expect a
-	// constant, so they will use the register fields and assemble
-	// a R0. To prevent that, rewrite $0 as ZR.
-	if p.From.Type == obj.TYPE_CONST && p.From.Offset == 0 {
-		p.From.Type = obj.TYPE_REG
-		p.From.Reg = REGZERO
-	}
-	if p.To.Type == obj.TYPE_CONST && p.To.Offset == 0 {
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REGZERO
-	}
-
-	// Rewrite BR/BL to symbol as TYPE_BRANCH.
-	switch p.As {
-	case AB,
-		ABL,
-		obj.ARET,
-		obj.ADUFFZERO,
-		obj.ADUFFCOPY:
-		if p.To.Sym != nil {
-			p.To.Type = obj.TYPE_BRANCH
-		}
-		break
-	}
-
-	// Rewrite float constants to values stored in memory.
-	switch p.As {
-	case AFMOVS:
-		if p.From.Type == obj.TYPE_FCONST {
-			f32 := float32(p.From.Val.(float64))
-			i32 := math.Float32bits(f32)
-			literal := fmt.Sprintf("$f32.%08x", uint32(i32))
-			s := obj.Linklookup(ctxt, literal, 0)
-			s.Size = 4
-			p.From.Type = obj.TYPE_MEM
-			p.From.Sym = s
-			p.From.Name = obj.NAME_EXTERN
-			p.From.Offset = 0
-		}
-
-	case AFMOVD:
-		if p.From.Type == obj.TYPE_FCONST {
-			i64 := math.Float64bits(p.From.Val.(float64))
-			literal := fmt.Sprintf("$f64.%016x", uint64(i64))
-			s := obj.Linklookup(ctxt, literal, 0)
-			s.Size = 8
-			p.From.Type = obj.TYPE_MEM
-			p.From.Sym = s
-			p.From.Name = obj.NAME_EXTERN
-			p.From.Offset = 0
-		}
-
-		break
-	}
-
-	// Rewrite negative immediates as positive immediates with
-	// complementary instruction.
-	switch p.As {
-	case AADD,
-		AADDW,
-		ASUB,
-		ASUBW,
-		ACMP,
-		ACMPW,
-		ACMN,
-		ACMNW:
-		if p.From.Type == obj.NAME_EXTERN && p.From.Offset < 0 {
-			p.From.Offset = -p.From.Offset
-			p.As = complements[p.As]
-		}
-
-		break
-	}
-}
-
-func follow(ctxt *obj.Link, s *obj.LSym) {
-	ctxt.Cursym = s
-
-	firstp := ctxt.NewProg()
-	lastp := firstp
-	xfol(ctxt, s.Text, &lastp)
-	lastp.Link = nil
-	s.Text = firstp.Link
-}
-
-func relinv(a int) int {
-	switch a {
-	case ABEQ:
-		return ABNE
-	case ABNE:
-		return ABEQ
-	case ABCS:
-		return ABCC
-	case ABHS:
-		return ABLO
-	case ABCC:
-		return ABCS
-	case ABLO:
-		return ABHS
-	case ABMI:
-		return ABPL
-	case ABPL:
-		return ABMI
-	case ABVS:
-		return ABVC
-	case ABVC:
-		return ABVS
-	case ABHI:
-		return ABLS
-	case ABLS:
-		return ABHI
-	case ABGE:
-		return ABLT
-	case ABLT:
-		return ABGE
-	case ABGT:
-		return ABLE
-	case ABLE:
-		return ABGT
-	}
-
-	log.Fatalf("unknown relation: %s", Anames[a])
-	return 0
-}
-
-func xfol(ctxt *obj.Link, p *obj.Prog, last **obj.Prog) {
-	var q *obj.Prog
-	var r *obj.Prog
-	var a int
-	var i int
-
-loop:
-	if p == nil {
-		return
-	}
-	a = int(p.As)
-	if a == AB {
-		q = p.Pcond
-		if q != nil {
-			p.Mark |= FOLL
-			p = q
-			if !(p.Mark&FOLL != 0) {
-				goto loop
-			}
-		}
-	}
-
-	if p.Mark&FOLL != 0 {
-		i = 0
-		q = p
-		for ; i < 4; i, q = i+1, q.Link {
-			if q == *last || q == nil {
-				break
-			}
-			a = int(q.As)
-			if a == obj.ANOP {
-				i--
-				continue
-			}
-
-			if a == AB || a == obj.ARET || a == AERET {
-				goto copy
-			}
-			if q.Pcond == nil || (q.Pcond.Mark&FOLL != 0) {
-				continue
-			}
-			if a != ABEQ && a != ABNE {
-				continue
-			}
-
-		copy:
-			for {
-				r = ctxt.NewProg()
-				*r = *p
-				if !(r.Mark&FOLL != 0) {
-					fmt.Printf("cant happen 1\n")
-				}
-				r.Mark |= FOLL
-				if p != q {
-					p = p.Link
-					(*last).Link = r
-					*last = r
-					continue
-				}
-
-				(*last).Link = r
-				*last = r
-				if a == AB || a == obj.ARET || a == AERET {
-					return
-				}
-				if a == ABNE {
-					r.As = ABEQ
-				} else {
-					r.As = ABNE
-				}
-				r.Pcond = p.Link
-				r.Link = p.Pcond
-				if !(r.Link.Mark&FOLL != 0) {
-					xfol(ctxt, r.Link, last)
-				}
-				if !(r.Pcond.Mark&FOLL != 0) {
-					fmt.Printf("cant happen 2\n")
-				}
-				return
-			}
-		}
-
-		a = AB
-		q = ctxt.NewProg()
-		q.As = int16(a)
-		q.Lineno = p.Lineno
-		q.To.Type = obj.TYPE_BRANCH
-		q.To.Offset = p.Pc
-		q.Pcond = p
-		p = q
-	}
-
-	p.Mark |= FOLL
-	(*last).Link = p
-	*last = p
-	if a == AB || a == obj.ARET || a == AERET {
-		return
-	}
-	if p.Pcond != nil {
-		if a != ABL && p.Link != nil {
-			q = obj.Brchain(ctxt, p.Link)
-			if a != obj.ATEXT && a != ABCASE {
-				if q != nil && (q.Mark&FOLL != 0) {
-					p.As = int16(relinv(a))
-					p.Link = p.Pcond
-					p.Pcond = q
-				}
-			}
-
-			xfol(ctxt, p.Link, last)
-			q = obj.Brchain(ctxt, p.Pcond)
-			if q == nil {
-				q = p.Pcond
-			}
-			if q.Mark&FOLL != 0 {
-				p.Pcond = q
-				return
-			}
-
-			p = q
-			goto loop
-		}
-	}
-
-	p = p.Link
-	goto loop
-}
-
-func preprocess(ctxt *obj.Link, cursym *obj.LSym) {
-	ctxt.Cursym = cursym
-
-	if cursym.Text == nil || cursym.Text.Link == nil {
-		return
-	}
-
-	p := cursym.Text
-	textstksiz := p.To.Offset
-	aoffset := int32(textstksiz)
-
-	cursym.Args = p.To.Val.(int32)
-	cursym.Locals = int32(textstksiz)
-
-	/*
-	 * find leaf subroutines
-	 * strip NOPs
-	 * expand RET
-	 */
-	ctxt.Bso.Flush()
-	q := (*obj.Prog)(nil)
-	var q1 *obj.Prog
-	for p := cursym.Text; p != nil; p = p.Link {
-		switch p.As {
-		case obj.ATEXT:
-			p.Mark |= LEAF
-
-		case obj.ARET:
-			break
-
-		case obj.ANOP:
-			q1 = p.Link
-			q.Link = q1 /* q is non-nop */
-			q1.Mark |= p.Mark
-			continue
-
-		case ABL,
-			obj.ADUFFZERO,
-			obj.ADUFFCOPY:
-			cursym.Text.Mark &^= LEAF
-			fallthrough
-
-		case ACBNZ,
-			ACBZ,
-			ACBNZW,
-			ACBZW,
-			ATBZ,
-			ATBNZ,
-			ABCASE,
-			AB,
-			ABEQ,
-			ABNE,
-			ABCS,
-			ABHS,
-			ABCC,
-			ABLO,
-			ABMI,
-			ABPL,
-			ABVS,
-			ABVC,
-			ABHI,
-			ABLS,
-			ABGE,
-			ABLT,
-			ABGT,
-			ABLE,
-			AADR, /* strange */
-			AADRP:
-			q1 = p.Pcond
-
-			if q1 != nil {
-				for q1.As == obj.ANOP {
-					q1 = q1.Link
-					p.Pcond = q1
-				}
-			}
-
-			break
-		}
-
-		q = p
-	}
-
-	var o int
-	var q2 *obj.Prog
-	var retjmp *obj.LSym
-	for p := cursym.Text; p != nil; p = p.Link {
-		o = int(p.As)
-		switch o {
-		case obj.ATEXT:
-			cursym.Text = p
-			if textstksiz < 0 {
-				ctxt.Autosize = 0
-			} else {
-				ctxt.Autosize = int32(textstksiz + 8)
-			}
-			if (cursym.Text.Mark&LEAF != 0) && ctxt.Autosize <= 8 {
-				ctxt.Autosize = 0
-			} else if ctxt.Autosize&(16-1) != 0 {
-				// The frame includes an LR.
-				// If the frame size is 8, it's only an LR,
-				// so there's no potential for breaking references to
-				// local variables by growing the frame size,
-				// because there are no local variables.
-				// But otherwise, if there is a non-empty locals section,
-				// the author of the code is responsible for making sure
-				// that the frame size is 8 mod 16.
-				if ctxt.Autosize == 8 {
-					ctxt.Autosize += 8
-					cursym.Locals += 8
-				} else {
-					ctxt.Diag("%v: unaligned frame size %d - must be 8 mod 16 (or 0)", p, ctxt.Autosize-8)
-				}
-			}
-			p.To.Offset = int64(ctxt.Autosize) - 8
-			if ctxt.Autosize == 0 && !(cursym.Text.Mark&LEAF != 0) {
-				if ctxt.Debugvlog != 0 {
-					fmt.Fprintf(ctxt.Bso, "save suppressed in: %s\n", cursym.Text.From.Sym.Name)
-				}
-				ctxt.Bso.Flush()
-				cursym.Text.Mark |= LEAF
-			}
-
-			if !(p.From3.Offset&obj.NOSPLIT != 0) {
-				p = stacksplit(ctxt, p, ctxt.Autosize) // emit split check
-			}
-
-			aoffset = ctxt.Autosize
-			if aoffset > 0xF0 {
-				aoffset = 0xF0
-			}
-			if cursym.Text.Mark&LEAF != 0 {
-				cursym.Leaf = 1
-				if ctxt.Autosize == 0 {
-					break
-				}
-				aoffset = 0
-			}
-
-			q = p
-			if ctxt.Autosize > aoffset {
-				q = ctxt.NewProg()
-				q.As = ASUB
-				q.Lineno = p.Lineno
-				q.From.Type = obj.TYPE_CONST
-				q.From.Offset = int64(ctxt.Autosize) - int64(aoffset)
-				q.To.Type = obj.TYPE_REG
-				q.To.Reg = REGSP
-				q.Spadj = int32(q.From.Offset)
-				q.Link = p.Link
-				p.Link = q
-				if cursym.Text.Mark&LEAF != 0 {
-					break
-				}
-			}
-
-			q1 = ctxt.NewProg()
-			q1.As = AMOVD
-			q1.Lineno = p.Lineno
-			q1.From.Type = obj.TYPE_REG
-			q1.From.Reg = REGLINK
-			q1.To.Type = obj.TYPE_MEM
-			q1.Scond = C_XPRE
-			q1.To.Offset = int64(-aoffset)
-			q1.To.Reg = REGSP
-			q1.Link = q.Link
-			q1.Spadj = aoffset
-			q.Link = q1
-
-			if cursym.Text.From3.Offset&obj.WRAPPER != 0 {
-				// if(g->panic != nil && g->panic->argp == FP) g->panic->argp = bottom-of-frame
-				//
-				//	MOV g_panic(g), R1
-				//	CMP ZR, R1
-				//	BEQ end
-				//	MOV panic_argp(R1), R2
-				//	ADD $(autosize+8), RSP, R3
-				//	CMP R2, R3
-				//	BNE end
-				//	ADD $8, RSP, R4
-				//	MOVD R4, panic_argp(R1)
-				// end:
-				//	NOP
-				//
-				// The NOP is needed to give the jumps somewhere to land.
-				// It is a liblink NOP, not a ARM64 NOP: it encodes to 0 instruction bytes.
-				q = q1
-
-				q = obj.Appendp(ctxt, q)
-				q.As = AMOVD
-				q.From.Type = obj.TYPE_MEM
-				q.From.Reg = REGG
-				q.From.Offset = 4 * int64(ctxt.Arch.Ptrsize) // G.panic
-				q.To.Type = obj.TYPE_REG
-				q.To.Reg = REG_R1
-
-				q = obj.Appendp(ctxt, q)
-				q.As = ACMP
-				q.From.Type = obj.TYPE_REG
-				q.From.Reg = REGZERO
-				q.Reg = REG_R1
-
-				q = obj.Appendp(ctxt, q)
-				q.As = ABEQ
-				q.To.Type = obj.TYPE_BRANCH
-				q1 = q
-
-				q = obj.Appendp(ctxt, q)
-				q.As = AMOVD
-				q.From.Type = obj.TYPE_MEM
-				q.From.Reg = REG_R1
-				q.From.Offset = 0 // Panic.argp
-				q.To.Type = obj.TYPE_REG
-				q.To.Reg = REG_R2
-
-				q = obj.Appendp(ctxt, q)
-				q.As = AADD
-				q.From.Type = obj.TYPE_CONST
-				q.From.Offset = int64(ctxt.Autosize) + 8
-				q.Reg = REGSP
-				q.To.Type = obj.TYPE_REG
-				q.To.Reg = REG_R3
-
-				q = obj.Appendp(ctxt, q)
-				q.As = ACMP
-				q.From.Type = obj.TYPE_REG
-				q.From.Reg = REG_R2
-				q.Reg = REG_R3
-
-				q = obj.Appendp(ctxt, q)
-				q.As = ABNE
-				q.To.Type = obj.TYPE_BRANCH
-				q2 = q
-
-				q = obj.Appendp(ctxt, q)
-				q.As = AADD
-				q.From.Type = obj.TYPE_CONST
-				q.From.Offset = 8
-				q.Reg = REGSP
-				q.To.Type = obj.TYPE_REG
-				q.To.Reg = REG_R4
-
-				q = obj.Appendp(ctxt, q)
-				q.As = AMOVD
-				q.From.Type = obj.TYPE_REG
-				q.From.Reg = REG_R4
-				q.To.Type = obj.TYPE_MEM
-				q.To.Reg = REG_R1
-				q.To.Offset = 0 // Panic.argp
-
-				q = obj.Appendp(ctxt, q)
-
-				q.As = obj.ANOP
-				q1.Pcond = q
-				q2.Pcond = q
-			}
-
-		case obj.ARET:
-			nocache(p)
-			if p.From.Type == obj.TYPE_CONST {
-				ctxt.Diag("using BECOME (%v) is not supported!", p)
-				break
-			}
-
-			retjmp = p.To.Sym
-			p.To = obj.Addr{}
-			if cursym.Text.Mark&LEAF != 0 {
-				if ctxt.Autosize != 0 {
-					p.As = AADD
-					p.From.Type = obj.TYPE_CONST
-					p.From.Offset = int64(ctxt.Autosize)
-					p.To.Type = obj.TYPE_REG
-					p.To.Reg = REGSP
-					p.Spadj = -ctxt.Autosize
-				}
-			} else {
-				/* want write-back pre-indexed SP+autosize -> SP, loading REGLINK*/
-				aoffset = ctxt.Autosize
-
-				if aoffset > 0xF0 {
-					aoffset = 0xF0
-				}
-				p.As = AMOVD
-				p.From.Type = obj.TYPE_MEM
-				p.Scond = C_XPOST
-				p.From.Offset = int64(aoffset)
-				p.From.Reg = REGSP
-				p.To.Type = obj.TYPE_REG
-				p.To.Reg = REGLINK
-				p.Spadj = -aoffset
-				if ctxt.Autosize > aoffset {
-					q = ctxt.NewProg()
-					q.As = AADD
-					q.From.Type = obj.TYPE_CONST
-					q.From.Offset = int64(ctxt.Autosize) - int64(aoffset)
-					q.To.Type = obj.TYPE_REG
-					q.To.Reg = REGSP
-					q.Link = p.Link
-					q.Spadj = int32(-q.From.Offset)
-					q.Lineno = p.Lineno
-					p.Link = q
-					p = q
-				}
-			}
-
-			if p.As != obj.ARET {
-				q = ctxt.NewProg()
-				q.Lineno = p.Lineno
-				q.Link = p.Link
-				p.Link = q
-				p = q
-			}
-
-			if retjmp != nil { // retjmp
-				p.As = AB
-				p.To.Type = obj.TYPE_BRANCH
-				p.To.Sym = retjmp
-				p.Spadj = +ctxt.Autosize
-				break
-			}
-
-			p.As = obj.ARET
-			p.To.Type = obj.TYPE_MEM
-			p.To.Offset = 0
-			p.To.Reg = REGLINK
-			p.Spadj = +ctxt.Autosize
-
-		case AADD, ASUB:
-			if p.To.Type == obj.TYPE_REG && p.To.Reg == REGSP && p.From.Type == obj.TYPE_CONST {
-				if p.As == AADD {
-					p.Spadj = int32(-p.From.Offset)
-				} else {
-					p.Spadj = int32(+p.From.Offset)
-				}
-			}
-			break
-		}
-	}
-}
-
-func nocache(p *obj.Prog) {
-	p.Optab = 0
-	p.From.Class = 0
-	p.To.Class = 0
-}
-
-var unaryDst = map[int]bool{
-	AWORD:  true,
-	ADWORD: true,
-	ABL:    true,
-	AB:     true,
-	ASVC:   true,
-}
-
-var Linkarm64 = obj.LinkArch{
-	ByteOrder:  binary.LittleEndian,
-	Name:       "arm64",
-	Thechar:    '7',
-	Preprocess: preprocess,
-	Assemble:   span7,
-	Follow:     follow,
-	Progedit:   progedit,
-	UnaryDst:   unaryDst,
-	Minlc:      4,
-	Ptrsize:    8,
-	Regsize:    8,
-}
diff --git a/src/cmd/internal/obj/data.go b/src/cmd/internal/obj/data.go
deleted file mode 100644
index 6e01e6e..0000000
--- a/src/cmd/internal/obj/data.go
+++ /dev/null
@@ -1,268 +0,0 @@
-// Derived from Inferno utils/6l/obj.c and utils/6l/span.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6l/obj.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6l/span.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package obj
-
-import (
-	"log"
-	"math"
-)
-
-func mangle(file string) {
-	log.Fatalf("%s: mangled input file", file)
-}
-
-func Symgrow(ctxt *Link, s *LSym, lsiz int64) {
-	siz := int(lsiz)
-	if int64(siz) != lsiz {
-		log.Fatalf("Symgrow size %d too long", lsiz)
-	}
-	if len(s.P) >= siz {
-		return
-	}
-	for cap(s.P) < siz {
-		s.P = append(s.P[:cap(s.P)], 0)
-	}
-	s.P = s.P[:siz]
-}
-
-func savedata(ctxt *Link, s *LSym, p *Prog, pn string) {
-	off := int32(p.From.Offset)
-	siz := int32(p.From3.Offset)
-	if off < 0 || siz < 0 || off >= 1<<30 || siz >= 100 {
-		mangle(pn)
-	}
-	if ctxt.Enforce_data_order != 0 && off < int32(len(s.P)) {
-		ctxt.Diag("data out of order (already have %d)\n%v", len(s.P), p)
-	}
-	Symgrow(ctxt, s, int64(off+siz))
-
-	switch int(p.To.Type) {
-	default:
-		ctxt.Diag("bad data: %v", p)
-
-	case TYPE_FCONST:
-		switch siz {
-		default:
-			ctxt.Diag("unexpected %d-byte floating point constant", siz)
-
-		case 4:
-			flt := math.Float32bits(float32(p.To.Val.(float64)))
-			ctxt.Arch.ByteOrder.PutUint32(s.P[off:], flt)
-
-		case 8:
-			flt := math.Float64bits(p.To.Val.(float64))
-			ctxt.Arch.ByteOrder.PutUint64(s.P[off:], flt)
-		}
-
-	case TYPE_SCONST:
-		copy(s.P[off:off+siz], p.To.Val.(string))
-
-	case TYPE_CONST, TYPE_ADDR:
-		if p.To.Sym != nil || int(p.To.Type) == TYPE_ADDR {
-			r := Addrel(s)
-			r.Off = off
-			r.Siz = uint8(siz)
-			r.Sym = p.To.Sym
-			r.Type = R_ADDR
-			r.Add = p.To.Offset
-			break
-		}
-		o := p.To.Offset
-		switch siz {
-		default:
-			ctxt.Diag("unexpected %d-byte integer constant", siz)
-		case 1:
-			s.P[off] = byte(o)
-		case 2:
-			ctxt.Arch.ByteOrder.PutUint16(s.P[off:], uint16(o))
-		case 4:
-			ctxt.Arch.ByteOrder.PutUint32(s.P[off:], uint32(o))
-		case 8:
-			ctxt.Arch.ByteOrder.PutUint64(s.P[off:], uint64(o))
-		}
-	}
-}
-
-func Addrel(s *LSym) *Reloc {
-	s.R = append(s.R, Reloc{})
-	return &s.R[len(s.R)-1]
-}
-
-func Setuintxx(ctxt *Link, s *LSym, off int64, v uint64, wid int64) int64 {
-	if s.Type == 0 {
-		s.Type = SDATA
-	}
-	if s.Size < off+wid {
-		s.Size = off + wid
-		Symgrow(ctxt, s, s.Size)
-	}
-
-	switch wid {
-	case 1:
-		s.P[off] = uint8(v)
-	case 2:
-		ctxt.Arch.ByteOrder.PutUint16(s.P[off:], uint16(v))
-	case 4:
-		ctxt.Arch.ByteOrder.PutUint32(s.P[off:], uint32(v))
-	case 8:
-		ctxt.Arch.ByteOrder.PutUint64(s.P[off:], uint64(v))
-	}
-
-	return off + wid
-}
-
-func adduintxx(ctxt *Link, s *LSym, v uint64, wid int) int64 {
-	off := s.Size
-	Setuintxx(ctxt, s, off, v, int64(wid))
-	return off
-}
-
-func adduint8(ctxt *Link, s *LSym, v uint8) int64 {
-	return adduintxx(ctxt, s, uint64(v), 1)
-}
-
-func adduint16(ctxt *Link, s *LSym, v uint16) int64 {
-	return adduintxx(ctxt, s, uint64(v), 2)
-}
-
-func Adduint32(ctxt *Link, s *LSym, v uint32) int64 {
-	return adduintxx(ctxt, s, uint64(v), 4)
-}
-
-func Adduint64(ctxt *Link, s *LSym, v uint64) int64 {
-	return adduintxx(ctxt, s, v, 8)
-}
-
-func setuint8(ctxt *Link, s *LSym, r int64, v uint8) int64 {
-	return Setuintxx(ctxt, s, r, uint64(v), 1)
-}
-
-func setuint16(ctxt *Link, s *LSym, r int64, v uint16) int64 {
-	return Setuintxx(ctxt, s, r, uint64(v), 2)
-}
-
-func setuint32(ctxt *Link, s *LSym, r int64, v uint32) int64 {
-	return Setuintxx(ctxt, s, r, uint64(v), 4)
-}
-
-func setuint64(ctxt *Link, s *LSym, r int64, v uint64) int64 {
-	return Setuintxx(ctxt, s, r, v, 8)
-}
-
-func addaddrplus(ctxt *Link, s *LSym, t *LSym, add int64) int64 {
-	if s.Type == 0 {
-		s.Type = SDATA
-	}
-	i := s.Size
-	s.Size += int64(ctxt.Arch.Ptrsize)
-	Symgrow(ctxt, s, s.Size)
-	r := Addrel(s)
-	r.Sym = t
-	r.Off = int32(i)
-	r.Siz = uint8(ctxt.Arch.Ptrsize)
-	r.Type = R_ADDR
-	r.Add = add
-	return i + int64(r.Siz)
-}
-
-func addpcrelplus(ctxt *Link, s *LSym, t *LSym, add int64) int64 {
-	if s.Type == 0 {
-		s.Type = SDATA
-	}
-	i := s.Size
-	s.Size += 4
-	Symgrow(ctxt, s, s.Size)
-	r := Addrel(s)
-	r.Sym = t
-	r.Off = int32(i)
-	r.Add = add
-	r.Type = R_PCREL
-	r.Siz = 4
-	return i + int64(r.Siz)
-}
-
-func addaddr(ctxt *Link, s *LSym, t *LSym) int64 {
-	return addaddrplus(ctxt, s, t, 0)
-}
-
-func setaddrplus(ctxt *Link, s *LSym, off int64, t *LSym, add int64) int64 {
-	if s.Type == 0 {
-		s.Type = SDATA
-	}
-	if off+int64(ctxt.Arch.Ptrsize) > s.Size {
-		s.Size = off + int64(ctxt.Arch.Ptrsize)
-		Symgrow(ctxt, s, s.Size)
-	}
-
-	r := Addrel(s)
-	r.Sym = t
-	r.Off = int32(off)
-	r.Siz = uint8(ctxt.Arch.Ptrsize)
-	r.Type = R_ADDR
-	r.Add = add
-	return off + int64(r.Siz)
-}
-
-func setaddr(ctxt *Link, s *LSym, off int64, t *LSym) int64 {
-	return setaddrplus(ctxt, s, off, t, 0)
-}
-
-func addsize(ctxt *Link, s *LSym, t *LSym) int64 {
-	if s.Type == 0 {
-		s.Type = SDATA
-	}
-	i := s.Size
-	s.Size += int64(ctxt.Arch.Ptrsize)
-	Symgrow(ctxt, s, s.Size)
-	r := Addrel(s)
-	r.Sym = t
-	r.Off = int32(i)
-	r.Siz = uint8(ctxt.Arch.Ptrsize)
-	r.Type = R_SIZE
-	return i + int64(r.Siz)
-}
-
-func addaddrplus4(ctxt *Link, s *LSym, t *LSym, add int64) int64 {
-	if s.Type == 0 {
-		s.Type = SDATA
-	}
-	i := s.Size
-	s.Size += 4
-	Symgrow(ctxt, s, s.Size)
-	r := Addrel(s)
-	r.Sym = t
-	r.Off = int32(i)
-	r.Siz = 4
-	r.Type = R_ADDR
-	r.Add = add
-	return i + int64(r.Siz)
-}
diff --git a/src/cmd/internal/obj/flag.go b/src/cmd/internal/obj/flag.go
deleted file mode 100644
index 0664f5c..0000000
--- a/src/cmd/internal/obj/flag.go
+++ /dev/null
@@ -1,120 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package obj
-
-import (
-	"flag"
-	"fmt"
-	"os"
-	"strconv"
-)
-
-func Flagfn2(string, string, func(string, string)) { panic("flag") }
-
-func Flagcount(name, usage string, val *int) {
-	flag.Var((*count)(val), name, usage)
-}
-
-func Flagint32(name, usage string, val *int32) {
-	flag.Var((*int32Value)(val), name, usage)
-}
-
-func Flagint64(name, usage string, val *int64) {
-	flag.Int64Var(val, name, *val, usage)
-}
-
-func Flagstr(name, usage string, val *string) {
-	flag.StringVar(val, name, *val, usage)
-}
-
-func Flagfn0(name, usage string, f func()) {
-	flag.Var(fn0(f), name, usage)
-}
-
-func Flagfn1(name, usage string, f func(string)) {
-	flag.Var(fn1(f), name, usage)
-}
-
-func Flagprint(fd int) {
-	if fd == 1 {
-		flag.CommandLine.SetOutput(os.Stdout)
-	}
-	flag.PrintDefaults()
-}
-
-func Flagparse(usage func()) {
-	flag.Usage = usage
-	flag.Parse()
-}
-
-// count is a flag.Value that is like a flag.Bool and a flag.Int.
-// If used as -name, it increments the count, but -name=x sets the count.
-// Used for verbose flag -v.
-type count int
-
-func (c *count) String() string {
-	return fmt.Sprint(int(*c))
-}
-
-func (c *count) Set(s string) error {
-	switch s {
-	case "true":
-		*c++
-	case "false":
-		*c = 0
-	default:
-		n, err := strconv.Atoi(s)
-		if err != nil {
-			return fmt.Errorf("invalid count %q", s)
-		}
-		*c = count(n)
-	}
-	return nil
-}
-
-func (c *count) IsBoolFlag() bool {
-	return true
-}
-
-type int32Value int32
-
-func newIntValue(val int32, p *int32) *int32Value {
-	*p = val
-	return (*int32Value)(p)
-}
-
-func (i *int32Value) Set(s string) error {
-	v, err := strconv.ParseInt(s, 0, 64)
-	*i = int32Value(v)
-	return err
-}
-
-func (i *int32Value) Get() interface{} { return int32(*i) }
-
-func (i *int32Value) String() string { return fmt.Sprint(*i) }
-
-type fn0 func()
-
-func (f fn0) Set(s string) error {
-	f()
-	return nil
-}
-
-func (f fn0) Get() interface{} { return nil }
-
-func (f fn0) String() string { return "" }
-
-func (f fn0) IsBoolFlag() bool {
-	return true
-}
-
-type fn1 func(string)
-
-func (f fn1) Set(s string) error {
-	f(s)
-	return nil
-}
-
-func (f fn1) String() string { return "" }
diff --git a/src/cmd/internal/obj/fmt.go b/src/cmd/internal/obj/fmt.go
deleted file mode 100644
index 1268f42..0000000
--- a/src/cmd/internal/obj/fmt.go
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * The authors of this software are Rob Pike and Ken Thompson.
- *              Copyright (c) 2002 by Lucent Technologies.
- * Permission to use, copy, modify, and distribute this software for any
- * purpose without fee is hereby granted, provided that this entire notice
- * is included in all copies of any software which is or includes a copy
- * or modification of this software and in all copies of the supporting
- * documentation for such software.
- * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTY.  IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES MAKE ANY
- * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
- * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
- */
-
-package obj
-
-const (
-	FmtWidth = 1 << iota
-	FmtLeft
-	FmtPrec
-	FmtSharp
-	FmtSpace
-	FmtSign
-	FmtApost
-	FmtZero
-	FmtUnsigned
-	FmtShort
-	FmtLong
-	FmtVLong
-	FmtComma
-	FmtByte
-	FmtLDouble
-	FmtFlag
-)
diff --git a/src/cmd/internal/obj/funcdata.go b/src/cmd/internal/obj/funcdata.go
deleted file mode 100644
index 44cba7a..0000000
--- a/src/cmd/internal/obj/funcdata.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// Inferno utils/5c/list.c
-// http://code.google.com/p/inferno-os/source/browse/utils/5c/list.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package obj
-
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file defines the IDs for PCDATA and FUNCDATA instructions
-// in Go binaries. It is included by assembly sources, so it must
-// be written using #defines.
-//
-// The Go compiler also #includes this file, for now.
-//
-// symtab.go also contains a copy of these constants.
-
-// Pseudo-assembly statements.
-
-// GO_ARGS, GO_RESULTS_INITIALIZED, and NO_LOCAL_POINTERS are macros
-// that communicate to the runtime information about the location and liveness
-// of pointers in an assembly function's arguments, results, and stack frame.
-// This communication is only required in assembly functions that make calls
-// to other functions that might be preempted or grow the stack.
-// NOSPLIT functions that make no calls do not need to use these macros.
-
-// GO_ARGS indicates that the Go prototype for this assembly function
-// defines the pointer map for the function's arguments.
-// GO_ARGS should be the first instruction in a function that uses it.
-// It can be omitted if there are no arguments at all.
-// GO_ARGS is inserted implicitly by the linker for any function
-// that also has a Go prototype and therefore is usually not necessary
-// to write explicitly.
-
-// GO_RESULTS_INITIALIZED indicates that the assembly function
-// has initialized the stack space for its results and that those results
-// should be considered live for the remainder of the function.
-
-// NO_LOCAL_POINTERS indicates that the assembly function stores
-// no pointers to heap objects in its local stack variables.
-
-// ArgsSizeUnknown is set in Func.argsize to mark all functions
-// whose argument size is unknown (C vararg functions, and
-// assembly code without an explicit specification).
-// This value is generated by the compiler, assembler, or linker.
-const (
-	PCDATA_StackMapIndex       = 0
-	FUNCDATA_ArgsPointerMaps   = 0
-	FUNCDATA_LocalsPointerMaps = 1
-	FUNCDATA_DeadValueMaps     = 2
-	ArgsSizeUnknown            = -0x80000000
-)
diff --git a/src/cmd/internal/obj/go.go b/src/cmd/internal/obj/go.go
deleted file mode 100644
index 3e6cd21..0000000
--- a/src/cmd/internal/obj/go.go
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package obj
-
-import (
-	"fmt"
-	"os"
-	"strings"
-)
-
-// go-specific code shared across loaders (5l, 6l, 8l).
-
-var (
-	Framepointer_enabled int
-	Fieldtrack_enabled   int
-)
-
-// Toolchain experiments.
-// These are controlled by the GOEXPERIMENT environment
-// variable recorded when the toolchain is built.
-// This list is also known to cmd/gc.
-var exper = []struct {
-	name string
-	val  *int
-}{
-	{"fieldtrack", &Fieldtrack_enabled},
-	{"framepointer", &Framepointer_enabled},
-}
-
-func addexp(s string) {
-	for i := 0; i < len(exper); i++ {
-		if exper[i].name == s {
-			if exper[i].val != nil {
-				*exper[i].val = 1
-			}
-			return
-		}
-	}
-
-	fmt.Printf("unknown experiment %s\n", s)
-	os.Exit(2)
-}
-
-func init() {
-	for _, f := range strings.Split(goexperiment, ",") {
-		if f != "" {
-			addexp(f)
-		}
-	}
-}
-
-func Nopout(p *Prog) {
-	p.As = ANOP
-	p.Scond = 0
-	p.From = Addr{}
-	p.From3 = nil
-	p.Reg = 0
-	p.To = Addr{}
-}
-
-func Nocache(p *Prog) {
-	p.Optab = 0
-	p.From.Class = 0
-	if p.From3 != nil {
-		p.From3.Class = 0
-	}
-	p.To.Class = 0
-}
-
-func Expstring() string {
-	buf := "X"
-	for i := range exper {
-		if *exper[i].val != 0 {
-			buf += "," + exper[i].name
-		}
-	}
-	if buf == "X" {
-		buf += ",none"
-	}
-	return "X:" + buf[2:]
-}
diff --git a/src/cmd/internal/obj/ld.go b/src/cmd/internal/obj/ld.go
deleted file mode 100644
index 4d2e429..0000000
--- a/src/cmd/internal/obj/ld.go
+++ /dev/null
@@ -1,92 +0,0 @@
-// Derived from Inferno utils/6l/obj.c and utils/6l/span.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6l/obj.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6l/span.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package obj
-
-/*
- * add library to library list.
- *	srcref: src file referring to package
- *	objref: object file referring to package
- *	file: object file, e.g., /home/rsc/go/pkg/container/vector.a
- *	pkg: package import path, e.g. container/vector
- */
-
-const (
-	LOG = 5
-)
-
-func mkfwd(sym *LSym) {
-	var dwn [LOG]int32
-	var cnt [LOG]int32
-	var lst [LOG]*Prog
-
-	for i := 0; i < LOG; i++ {
-		if i == 0 {
-			cnt[i] = 1
-		} else {
-			cnt[i] = LOG * cnt[i-1]
-		}
-		dwn[i] = 1
-		lst[i] = nil
-	}
-
-	i := 0
-	for p := sym.Text; p != nil && p.Link != nil; p = p.Link {
-		i--
-		if i < 0 {
-			i = LOG - 1
-		}
-		p.Forwd = nil
-		dwn[i]--
-		if dwn[i] <= 0 {
-			dwn[i] = cnt[i]
-			if lst[i] != nil {
-				lst[i].Forwd = p
-			}
-			lst[i] = p
-		}
-	}
-}
-
-func Copyp(ctxt *Link, q *Prog) *Prog {
-	p := ctxt.NewProg()
-	*p = *q
-	return p
-}
-
-func Appendp(ctxt *Link, q *Prog) *Prog {
-	p := ctxt.NewProg()
-	p.Link = q.Link
-	q.Link = p
-	p.Lineno = q.Lineno
-	p.Mode = q.Mode
-	return p
-}
diff --git a/src/cmd/internal/obj/libc.go b/src/cmd/internal/obj/libc.go
deleted file mode 100644
index b200b26..0000000
--- a/src/cmd/internal/obj/libc.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package obj
-
-const (
-	AEXIST = 0
-	BOM    = 0xFEFF
-)
-
-var GOEXPERIMENT string
diff --git a/src/cmd/internal/obj/line_test.go b/src/cmd/internal/obj/line_test.go
deleted file mode 100644
index 5486f0d..0000000
--- a/src/cmd/internal/obj/line_test.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package obj
-
-import (
-	"fmt"
-	"testing"
-)
-
-func TestLineHist(t *testing.T) {
-	ctxt := new(Link)
-	ctxt.Hash = make(map[SymVer]*LSym)
-
-	ctxt.LineHist.Push(1, "a.c")
-	ctxt.LineHist.Push(3, "a.h")
-	ctxt.LineHist.Pop(5)
-	ctxt.LineHist.Update(7, "linedir", 2)
-	ctxt.LineHist.Pop(9)
-	ctxt.LineHist.Push(11, "b.c")
-	ctxt.LineHist.Pop(13)
-
-	var expect = []string{
-		0:  "??:0",
-		1:  "a.c:1",
-		2:  "a.c:2",
-		3:  "a.h:1",
-		4:  "a.h:2",
-		5:  "a.c:3",
-		6:  "a.c:4",
-		7:  "linedir:2",
-		8:  "linedir:3",
-		9:  "??:0",
-		10: "??:0",
-		11: "b.c:1",
-		12: "b.c:2",
-		13: "??:0",
-		14: "??:0",
-	}
-
-	for i, want := range expect {
-		var f *LSym
-		var l int32
-		linkgetline(ctxt, int32(i), &f, &l)
-		have := fmt.Sprintf("%s:%d", f.Name, l)
-		if have != want {
-			t.Errorf("linkgetline(%d) = %q, want %q", i, have, want)
-		}
-	}
-}
diff --git a/src/cmd/internal/obj/link.go b/src/cmd/internal/obj/link.go
deleted file mode 100644
index 688c278..0000000
--- a/src/cmd/internal/obj/link.go
+++ /dev/null
@@ -1,569 +0,0 @@
-// Derived from Inferno utils/6l/l.h and related files.
-// http://code.google.com/p/inferno-os/source/browse/utils/6l/l.h
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package obj
-
-import "encoding/binary"
-
-// An Addr is an argument to an instruction.
-// The general forms and their encodings are:
-//
-//	sym±offset(symkind)(reg)(index*scale)
-//		Memory reference at address &sym(symkind) + offset + reg + index*scale.
-//		Any of sym(symkind), ±offset, (reg), (index*scale), and *scale can be omitted.
-//		If (reg) and *scale are both omitted, the resulting expression (index) is parsed as (reg).
-//		To force a parsing as index*scale, write (index*1).
-//		Encoding:
-//			type = TYPE_MEM
-//			name = symkind (NAME_AUTO, ...) or 0 (NAME_NONE)
-//			sym = sym
-//			offset = ±offset
-//			reg = reg (REG_*)
-//			index = index (REG_*)
-//			scale = scale (1, 2, 4, 8)
-//
-//	$<mem>
-//		Effective address of memory reference <mem>, defined above.
-//		Encoding: same as memory reference, but type = TYPE_ADDR.
-//
-//	$<±integer value>
-//		This is a special case of $<mem>, in which only ±offset is present.
-//		It has a separate type for easy recognition.
-//		Encoding:
-//			type = TYPE_CONST
-//			offset = ±integer value
-//
-//	*<mem>
-//		Indirect reference through memory reference <mem>, defined above.
-//		Only used on x86 for CALL/JMP *sym(SB), which calls/jumps to a function
-//		pointer stored in the data word sym(SB), not a function named sym(SB).
-//		Encoding: same as above, but type = TYPE_INDIR.
-//
-//	$*$<mem>
-//		No longer used.
-//		On machines with actual SB registers, $*$<mem> forced the
-//		instruction encoding to use a full 32-bit constant, never a
-//		reference relative to SB.
-//
-//	$<floating point literal>
-//		Floating point constant value.
-//		Encoding:
-//			type = TYPE_FCONST
-//			val = floating point value
-//
-//	$<string literal, up to 8 chars>
-//		String literal value (raw bytes used for DATA instruction).
-//		Encoding:
-//			type = TYPE_SCONST
-//			val = string
-//
-//	<register name>
-//		Any register: integer, floating point, control, segment, and so on.
-//		If looking for specific register kind, must check type and reg value range.
-//		Encoding:
-//			type = TYPE_REG
-//			reg = reg (REG_*)
-//
-//	x(PC)
-//		Encoding:
-//			type = TYPE_BRANCH
-//			val = Prog* reference OR ELSE offset = target pc (branch takes priority)
-//
-//	$±x-±y
-//		Final argument to TEXT, specifying local frame size x and argument size y.
-//		In this form, x and y are integer literals only, not arbitrary expressions.
-//		This avoids parsing ambiguities due to the use of - as a separator.
-//		The ± are optional.
-//		If the final argument to TEXT omits the -±y, the encoding should still
-//		use TYPE_TEXTSIZE (not TYPE_CONST), with u.argsize = ArgsSizeUnknown.
-//		Encoding:
-//			type = TYPE_TEXTSIZE
-//			offset = x
-//			val = int32(y)
-//
-//	reg<<shift, reg>>shift, reg->shift, reg@>shift
-//		Shifted register value, for ARM.
-//		In this form, reg must be a register and shift can be a register or an integer constant.
-//		Encoding:
-//			type = TYPE_SHIFT
-//			offset = (reg&15) | shifttype<<5 | count
-//			shifttype = 0, 1, 2, 3 for <<, >>, ->, @>
-//			count = (reg&15)<<8 | 1<<4 for a register shift count, (n&31)<<7 for an integer constant.
-//
-//	(reg, reg)
-//		A destination register pair. When used as the last argument of an instruction,
-//		this form makes clear that both registers are destinations.
-//		Encoding:
-//			type = TYPE_REGREG
-//			reg = first register
-//			offset = second register
-//
-//	[reg, reg, reg-reg]
-//		Register list for ARM.
-//		Encoding:
-//			type = TYPE_REGLIST
-//			offset = bit mask of registers in list; R0 is low bit.
-//
-//	reg, reg
-//		Register pair for ARM.
-//		TYPE_REGREG2
-//
-//	(reg+reg)
-//		Register pair for PPC64.
-//		Encoding:
-//			type = TYPE_MEM
-//			reg = first register
-//			index = second register
-//			scale = 1
-//
-type Addr struct {
-	Type   int16
-	Reg    int16
-	Index  int16
-	Scale  int16 // Sometimes holds a register.
-	Name   int8
-	Class  int8
-	Etype  uint8
-	Offset int64
-	Width  int64
-	Sym    *LSym
-	Gotype *LSym
-
-	// argument value:
-	//	for TYPE_SCONST, a string
-	//	for TYPE_FCONST, a float64
-	//	for TYPE_BRANCH, a *Prog (optional)
-	//	for TYPE_TEXTSIZE, an int32 (optional)
-	Val interface{}
-
-	Node interface{} // for use by compiler
-}
-
-const (
-	NAME_NONE = 0 + iota
-	NAME_EXTERN
-	NAME_STATIC
-	NAME_AUTO
-	NAME_PARAM
-	// A reference to name at GOT(SB) is a reference to the entry in the global offset
-	// table for 'name'.
-	NAME_GOTREF
-)
-
-const (
-	TYPE_NONE = 0
-)
-
-const (
-	TYPE_BRANCH = 5 + iota
-	TYPE_TEXTSIZE
-	TYPE_MEM
-	TYPE_CONST
-	TYPE_FCONST
-	TYPE_SCONST
-	TYPE_REG
-	TYPE_ADDR
-	TYPE_SHIFT
-	TYPE_REGREG
-	TYPE_REGREG2
-	TYPE_INDIR
-	TYPE_REGLIST
-)
-
-// TODO(rsc): Describe prog.
-// TODO(rsc): Describe TEXT/GLOBL flag in from3, DATA width in from3.
-type Prog struct {
-	Ctxt   *Link
-	Link   *Prog
-	From   Addr
-	From3  *Addr // optional
-	To     Addr
-	Opt    interface{}
-	Forwd  *Prog
-	Pcond  *Prog
-	Rel    *Prog // Source of forward jumps on x86; pcrel on arm
-	Pc     int64
-	Lineno int32
-	Spadj  int32
-	As     int16
-	Reg    int16
-	RegTo2 int16 // 2nd register output operand
-	Mark   uint16
-	Optab  uint16
-	Scond  uint8
-	Back   uint8
-	Ft     uint8
-	Tt     uint8
-	Isize  uint8
-	Mode   int8
-
-	Info ProgInfo
-}
-
-// From3Type returns From3.Type, or TYPE_NONE when From3 is nil.
-func (p *Prog) From3Type() int16 {
-	if p.From3 == nil {
-		return TYPE_NONE
-	}
-	return p.From3.Type
-}
-
-// From3Offset returns From3.Offset, or 0 when From3 is nil.
-func (p *Prog) From3Offset() int64 {
-	if p.From3 == nil {
-		return 0
-	}
-	return p.From3.Offset
-}
-
-// ProgInfo holds information about the instruction for use
-// by clients such as the compiler. The exact meaning of this
-// data is up to the client and is not interpreted by the cmd/internal/obj/... packages.
-type ProgInfo struct {
-	Flags    uint32 // flag bits
-	Reguse   uint64 // registers implicitly used by this instruction
-	Regset   uint64 // registers implicitly set by this instruction
-	Regindex uint64 // registers used by addressing mode
-}
-
-// Prog.as opcodes.
-// These are the portable opcodes, common to all architectures.
-// Each architecture defines many more arch-specific opcodes,
-// with values starting at A_ARCHSPECIFIC.
-// Each architecture adds an offset to this so each machine has
-// distinct space for its instructions. The offset is a power of
-// two so it can be masked to return to origin zero.
-// See the definitions of ABase386 etc.
-const (
-	AXXX = 0 + iota
-	ACALL
-	ACHECKNIL
-	ADATA
-	ADUFFCOPY
-	ADUFFZERO
-	AEND
-	AFUNCDATA
-	AGLOBL
-	AJMP
-	ANOP
-	APCDATA
-	ARET
-	ATEXT
-	ATYPE
-	AUNDEF
-	AUSEFIELD
-	AVARDEF
-	AVARKILL
-	A_ARCHSPECIFIC
-)
-
-// An LSym is the sort of symbol that is written to an object file.
-type LSym struct {
-	Name      string
-	Type      int16
-	Version   int16
-	Dupok     uint8
-	Cfunc     uint8
-	Nosplit   uint8
-	Leaf      uint8
-	Seenglobl uint8
-	Onlist    uint8
-	// Local means make the symbol local even when compiling Go code to reference Go
-	// symbols in other shared libraries, as in this mode symbols are global by
-	// default. "local" here means in the sense of the dynamic linker, i.e. not
-	// visible outside of the module (shared library or executable) that contains its
-	// definition. (When not compiling to support Go shared libraries, all symbols are
-	// local in this sense unless there is a cgo_export_* directive).
-	Local  bool
-	Args   int32
-	Locals int32
-	Value  int64
-	Size   int64
-	Next   *LSym
-	Gotype *LSym
-	Autom  *Auto
-	Text   *Prog
-	Etext  *Prog
-	Pcln   *Pcln
-	P      []byte
-	R      []Reloc
-}
-
-type Pcln struct {
-	Pcsp        Pcdata
-	Pcfile      Pcdata
-	Pcline      Pcdata
-	Pcdata      []Pcdata
-	Funcdata    []*LSym
-	Funcdataoff []int64
-	File        []*LSym
-	Lastfile    *LSym
-	Lastindex   int
-}
-
-// LSym.type
-const (
-	Sxxx = iota
-	STEXT
-	SELFRXSECT
-	STYPE
-	SSTRING
-	SGOSTRING
-	SGOFUNC
-	SGCBITS
-	SRODATA
-	SFUNCTAB
-	STYPELINK
-	SSYMTAB
-	SPCLNTAB
-	SELFROSECT
-	SMACHOPLT
-	SELFSECT
-	SMACHO
-	SMACHOGOT
-	SWINDOWS
-	SELFGOT
-	SNOPTRDATA
-	SINITARR
-	SDATA
-	SBSS
-	SNOPTRBSS
-	STLSBSS
-	SXREF
-	SMACHOSYMSTR
-	SMACHOSYMTAB
-	SMACHOINDIRECTPLT
-	SMACHOINDIRECTGOT
-	SFILE
-	SFILEPATH
-	SCONST
-	SDYNIMPORT
-	SHOSTOBJ
-	SSUB       = 1 << 8
-	SMASK      = SSUB - 1
-	SHIDDEN    = 1 << 9
-	SCONTAINER = 1 << 10 // has a sub-symbol
-)
-
-type Reloc struct {
-	Off  int32
-	Siz  uint8
-	Type int32
-	Add  int64
-	Sym  *LSym
-}
-
-// Reloc.type
-const (
-	R_ADDR = 1 + iota
-	R_ADDRPOWER
-	R_ADDRARM64
-	R_SIZE
-	R_CALL
-	R_CALLARM
-	R_CALLARM64
-	R_CALLIND
-	R_CALLPOWER
-	R_CONST
-	R_PCREL
-	// R_TLS (only used on arm currently, and not on android and darwin where tlsg is
-	// a regular variable) resolves to data needed to access the thread-local g. It is
-	// interpreted differently depending on toolchain flags to implement either the
-	// "local exec" or "inital exec" model for tls access.
-	// TODO(mwhudson): change to use R_TLS_LE or R_TLS_IE as appropriate, not having
-	// R_TLS do double duty.
-	R_TLS
-	// R_TLS_LE (only used on 386 and amd64 currently) resolves to the offset of the
-	// thread-local g from the thread local base and is used to implement the "local
-	// exec" model for tls access (r.Sym is not set by the compiler for this case but
-	// is set to Tlsg in the linker when externally linking).
-	R_TLS_LE
-	// R_TLS_IE (only used on 386 and amd64 currently) resolves to the PC-relative
-	// offset to a GOT slot containing the offset the thread-local g from the thread
-	// local base and is used to implemented the "initial exec" model for tls access
-	// (r.Sym is not set by the compiler for this case but is set to Tlsg in the
-	// linker when externally linking).
-	R_TLS_IE
-	R_GOTOFF
-	R_PLT0
-	R_PLT1
-	R_PLT2
-	R_USEFIELD
-	R_POWER_TOC
-	R_GOTPCREL
-)
-
-type Auto struct {
-	Asym    *LSym
-	Link    *Auto
-	Aoffset int32
-	Name    int16
-	Gotype  *LSym
-}
-
-// Auto.name
-const (
-	A_AUTO = 1 + iota
-	A_PARAM
-)
-
-type Pcdata struct {
-	P []byte
-}
-
-// Pcdata iterator.
-//      for(pciterinit(ctxt, &it, &pcd); !it.done; pciternext(&it)) { it.value holds in [it.pc, it.nextpc) }
-type Pciter struct {
-	d       Pcdata
-	p       []byte
-	pc      uint32
-	nextpc  uint32
-	pcscale uint32
-	value   int32
-	start   int
-	done    int
-}
-
-// symbol version, incremented each time a file is loaded.
-// version==1 is reserved for savehist.
-const (
-	HistVersion = 1
-)
-
-// Link holds the context for writing object code from a compiler
-// to be linker input or for reading that input into the linker.
-type Link struct {
-	Goarm              int32
-	Headtype           int
-	Arch               *LinkArch
-	Debugasm           int32
-	Debugvlog          int32
-	Debugzerostack     int32
-	Debugdivmod        int32
-	Debugpcln          int32
-	Flag_shared        int32
-	Flag_dynlink       bool
-	Bso                *Biobuf
-	Pathname           string
-	Windows            int32
-	Goroot             string
-	Goroot_final       string
-	Enforce_data_order int32
-	Hash               map[SymVer]*LSym
-	LineHist           LineHist
-	Imports            []string
-	Plist              *Plist
-	Plast              *Plist
-	Sym_div            *LSym
-	Sym_divu           *LSym
-	Sym_mod            *LSym
-	Sym_modu           *LSym
-	Tlsg               *LSym
-	Plan9privates      *LSym
-	Curp               *Prog
-	Printp             *Prog
-	Blitrl             *Prog
-	Elitrl             *Prog
-	Rexflag            int
-	Rep                int
-	Repn               int
-	Lock               int
-	Asmode             int
-	Andptr             []byte
-	And                [100]uint8
-	Instoffset         int64
-	Autosize           int32
-	Armsize            int32
-	Pc                 int64
-	Tlsoffset          int
-	Diag               func(string, ...interface{})
-	Mode               int
-	Cursym             *LSym
-	Version            int
-	Textp              *LSym
-	Etextp             *LSym
-}
-
-type SymVer struct {
-	Name    string
-	Version int // TODO: make int16 to match LSym.Version?
-}
-
-// LinkArch is the definition of a single architecture.
-type LinkArch struct {
-	ByteOrder  binary.ByteOrder
-	Name       string
-	Thechar    int
-	Preprocess func(*Link, *LSym)
-	Assemble   func(*Link, *LSym)
-	Follow     func(*Link, *LSym)
-	Progedit   func(*Link, *Prog)
-	UnaryDst   map[int]bool // Instruction takes one operand, a destination.
-	Minlc      int
-	Ptrsize    int
-	Regsize    int
-}
-
-/* executable header types */
-const (
-	Hunknown = 0 + iota
-	Hdarwin
-	Hdragonfly
-	Helf
-	Hfreebsd
-	Hlinux
-	Hnacl
-	Hnetbsd
-	Hopenbsd
-	Hplan9
-	Hsolaris
-	Hwindows
-)
-
-type Plist struct {
-	Name    *LSym
-	Firstpc *Prog
-	Recur   int
-	Link    *Plist
-}
-
-/*
- * start a new Prog list.
- */
-func Linknewplist(ctxt *Link) *Plist {
-	pl := new(Plist)
-	if ctxt.Plist == nil {
-		ctxt.Plist = pl
-	} else {
-		ctxt.Plast.Link = pl
-	}
-	ctxt.Plast = pl
-	return pl
-}
diff --git a/src/cmd/internal/obj/mgc0.go b/src/cmd/internal/obj/mgc0.go
deleted file mode 100644
index a385d60..0000000
--- a/src/cmd/internal/obj/mgc0.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package obj
-
-// Garbage collector liveness bitmap generation.
-
-// The command line flag -live causes this code to print debug information.
-// The levels are:
-//
-//	-live (aka -live=1): print liveness lists as code warnings at safe points
-//	-live=2: print an assembly listing with liveness annotations
-//	-live=3: print information during each computation phase (much chattier)
-//
-// Each level includes the earlier output as well.
-
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Used by cmd/gc.
-
-const (
-	InsData = 1 + iota
-	InsArray
-	InsArrayEnd
-	InsEnd
-	MaxGCMask = 65536
-)
diff --git a/src/cmd/internal/obj/obj.go b/src/cmd/internal/obj/obj.go
deleted file mode 100644
index af3290d..0000000
--- a/src/cmd/internal/obj/obj.go
+++ /dev/null
@@ -1,283 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package obj
-
-import (
-	"fmt"
-	"path/filepath"
-	"sort"
-	"strings"
-)
-
-// A LineHist records the history of the file input stack, which maps the virtual line number,
-// an incrementing count of lines processed in any input file and typically named lineno,
-// to a stack of file:line pairs showing the path of inclusions that led to that position.
-// The first line directive (//line in Go, #line in assembly) is treated as pushing
-// a new entry on the stack, so that errors can report both the actual and translated
-// line number.
-//
-// In typical use, the virtual lineno begins at 1, and file line numbers also begin at 1,
-// but the only requirements placed upon the numbers by this code are:
-//	- calls to Push, Update, and Pop must be monotonically increasing in lineno
-//	- except as specified by those methods, virtual and file line number increase
-//	  together, so that given (only) calls Push(10, "x.go", 1) and Pop(15),
-//	  virtual line 12 corresponds to x.go line 3.
-type LineHist struct {
-	Top            *LineStack  // current top of stack
-	Ranges         []LineRange // ranges for lookup
-	Dir            string      // directory to qualify relative paths
-	TrimPathPrefix string      // remove leading TrimPath from recorded file names
-	GOROOT         string      // current GOROOT
-	GOROOT_FINAL   string      // target GOROOT
-}
-
-// A LineStack is an entry in the recorded line history.
-// Although the history at any given line number is a stack,
-// the record for all line processed forms a tree, with common
-// stack prefixes acting as parents.
-type LineStack struct {
-	Parent    *LineStack // parent in inclusion stack
-	Lineno    int        // virtual line number where this entry takes effect
-	File      string     // file name used to open source file, for error messages
-	AbsFile   string     // absolute file name, for pcln tables
-	FileLine  int        // line number in file at Lineno
-	Directive bool
-	Sym       *LSym // for linkgetline - TODO(rsc): remove
-}
-
-func (stk *LineStack) fileLineAt(lineno int) int {
-	return stk.FileLine + lineno - stk.Lineno
-}
-
-// The span of valid linenos in the recorded line history can be broken
-// into a set of ranges, each with a particular stack.
-// A LineRange records one such range.
-type LineRange struct {
-	Start int        // starting lineno
-	Stack *LineStack // top of stack for this range
-}
-
-// startRange starts a new range with the given top of stack.
-func (h *LineHist) startRange(lineno int, top *LineStack) {
-	h.Top = top
-	h.Ranges = append(h.Ranges, LineRange{top.Lineno, top})
-}
-
-// setFile sets stk.File = file and also derives stk.AbsFile.
-func (h *LineHist) setFile(stk *LineStack, file string) {
-	// Note: The exclusion of stk.Directive may be wrong but matches what we've done before.
-	// The check for < avoids putting a path prefix on "<autogenerated>".
-	abs := file
-	if h.Dir != "" && !filepath.IsAbs(file) && !strings.HasPrefix(file, "<") && !stk.Directive {
-		abs = filepath.Join(h.Dir, file)
-	}
-
-	// Remove leading TrimPathPrefix, or else rewrite $GOROOT to $GOROOT_FINAL.
-	if h.TrimPathPrefix != "" && hasPathPrefix(abs, h.TrimPathPrefix) {
-		if abs == h.TrimPathPrefix {
-			abs = ""
-		} else {
-			abs = abs[len(h.TrimPathPrefix)+1:]
-		}
-	} else if h.GOROOT_FINAL != "" && h.GOROOT_FINAL != h.GOROOT && hasPathPrefix(abs, h.GOROOT) {
-		abs = h.GOROOT_FINAL + abs[len(h.GOROOT):]
-	}
-	if abs == "" {
-		abs = "??"
-	}
-	abs = filepath.Clean(abs)
-	stk.AbsFile = abs
-
-	if file == "" {
-		file = "??"
-	}
-	stk.File = file
-}
-
-// Does s have t as a path prefix?
-// That is, does s == t or does s begin with t followed by a slash?
-// For portability, we allow ASCII case folding, so that hasPathPrefix("a/b/c", "A/B") is true.
-// Similarly, we allow slash folding, so that hasPathPrefix("a/b/c", "a\\b") is true.
-// We do not allow full Unicode case folding, for fear of causing more confusion
-// or harm than good. (For an example of the kinds of things that can go wrong,
-// see http://article.gmane.org/gmane.linux.kernel/1853266.)
-func hasPathPrefix(s string, t string) bool {
-	if len(t) > len(s) {
-		return false
-	}
-	var i int
-	for i = 0; i < len(t); i++ {
-		cs := int(s[i])
-		ct := int(t[i])
-		if 'A' <= cs && cs <= 'Z' {
-			cs += 'a' - 'A'
-		}
-		if 'A' <= ct && ct <= 'Z' {
-			ct += 'a' - 'A'
-		}
-		if cs == '\\' {
-			cs = '/'
-		}
-		if ct == '\\' {
-			ct = '/'
-		}
-		if cs != ct {
-			return false
-		}
-	}
-	return i >= len(s) || s[i] == '/' || s[i] == '\\'
-}
-
-// Push records that at that lineno a new file with the given name was pushed onto the input stack.
-func (h *LineHist) Push(lineno int, file string) {
-	stk := &LineStack{
-		Parent:   h.Top,
-		Lineno:   lineno,
-		FileLine: 1,
-	}
-	h.setFile(stk, file)
-	h.startRange(lineno, stk)
-}
-
-// Pop records that at lineno the current file was popped from the input stack.
-func (h *LineHist) Pop(lineno int) {
-	top := h.Top
-	if top == nil {
-		return
-	}
-	if top.Directive && top.Parent != nil { // pop #line level too
-		top = top.Parent
-	}
-	next := top.Parent
-	if next == nil {
-		h.Top = nil
-		h.Ranges = append(h.Ranges, LineRange{lineno, nil})
-		return
-	}
-
-	// Popping included file. Update parent offset to account for
-	// the virtual line number range taken by the included file.
-	// Cannot modify the LineStack directly, or else lookups
-	// for the earlier line numbers will get the wrong answers,
-	// so make a new one.
-	stk := new(LineStack)
-	*stk = *next
-	stk.Lineno = lineno
-	stk.FileLine = next.fileLineAt(top.Lineno)
-	h.startRange(lineno, stk)
-}
-
-// Update records that at lineno the file name and line number were changed using
-// a line directive (//line in Go, #line in assembly).
-func (h *LineHist) Update(lineno int, file string, line int) {
-	top := h.Top
-	if top == nil {
-		return // shouldn't happen
-	}
-	var stk *LineStack
-	if top.Directive {
-		// Update existing entry, except make copy to avoid changing earlier history.
-		stk = new(LineStack)
-		*stk = *top
-	} else {
-		// Push new entry.
-		stk = &LineStack{
-			Parent:    top,
-			Directive: true,
-		}
-	}
-	stk.Lineno = lineno
-	if stk.File != file {
-		h.setFile(stk, file) // only retain string if needed
-	}
-	stk.FileLine = line
-	h.startRange(lineno, stk)
-}
-
-// AddImport adds a package to the list of imported packages.
-func (ctxt *Link) AddImport(pkg string) {
-	ctxt.Imports = append(ctxt.Imports, pkg)
-}
-
-// At returns the input stack in effect at lineno.
-func (h *LineHist) At(lineno int) *LineStack {
-	i := sort.Search(len(h.Ranges), func(i int) bool {
-		return h.Ranges[i].Start > lineno
-	})
-	// Found first entry beyond lineno.
-	if i == 0 {
-		return nil
-	}
-	return h.Ranges[i-1].Stack
-}
-
-// LineString returns a string giving the file and line number
-// corresponding to lineno, for use in error messages.
-func (h *LineHist) LineString(lineno int) string {
-	stk := h.At(lineno)
-	if stk == nil {
-		return "<unknown line number>"
-	}
-
-	text := fmt.Sprintf("%s:%d", stk.File, stk.fileLineAt(lineno))
-	if stk.Directive && stk.Parent != nil {
-		stk = stk.Parent
-		text += fmt.Sprintf("[%s:%d]", stk.File, stk.fileLineAt(lineno))
-	}
-	const showFullStack = false // was used by old C compilers
-	if showFullStack {
-		for stk.Parent != nil {
-			lineno = stk.Lineno - 1
-			stk = stk.Parent
-			text += fmt.Sprintf(" %s:%d", stk.File, stk.fileLineAt(lineno))
-			if stk.Directive && stk.Parent != nil {
-				stk = stk.Parent
-				text += fmt.Sprintf("[%s:%d]", stk.File, stk.fileLineAt(lineno))
-			}
-		}
-	}
-	return text
-}
-
-// FileLine returns the file name and line number
-// at the top of the stack for the given lineno.
-func (h *LineHist) FileLine(lineno int) (file string, line int) {
-	stk := h.At(lineno)
-	if stk == nil {
-		return "??", 0
-	}
-	return stk.File, stk.fileLineAt(lineno)
-}
-
-// AbsFileLine returns the absolute file name and line number
-// at the top of the stack for the given lineno.
-func (h *LineHist) AbsFileLine(lineno int) (file string, line int) {
-	stk := h.At(lineno)
-	if stk == nil {
-		return "??", 0
-	}
-	return stk.AbsFile, stk.fileLineAt(lineno)
-}
-
-// This is a simplified copy of linklinefmt above.
-// It doesn't allow printing the full stack, and it returns the file name and line number separately.
-// TODO: Unify with linklinefmt somehow.
-func linkgetline(ctxt *Link, lineno int32, f **LSym, l *int32) {
-	stk := ctxt.LineHist.At(int(lineno))
-	if stk == nil || stk.AbsFile == "" {
-		*f = Linklookup(ctxt, "??", HistVersion)
-		*l = 0
-		return
-	}
-	if stk.Sym == nil {
-		stk.Sym = Linklookup(ctxt, stk.AbsFile, HistVersion)
-	}
-	*f = stk.Sym
-	*l = int32(stk.fileLineAt(int(lineno)))
-}
-
-func Linkprfile(ctxt *Link, line int) {
-	fmt.Printf("%s ", ctxt.LineHist.LineString(line))
-}
diff --git a/src/cmd/internal/obj/objfile.go b/src/cmd/internal/obj/objfile.go
deleted file mode 100644
index c5f4820..0000000
--- a/src/cmd/internal/obj/objfile.go
+++ /dev/null
@@ -1,523 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Writing of Go object files.
-//
-// Originally, Go object files were Plan 9 object files, but no longer.
-// Now they are more like standard object files, in that each symbol is defined
-// by an associated memory image (bytes) and a list of relocations to apply
-// during linking. We do not (yet?) use a standard file format, however.
-// For now, the format is chosen to be as simple as possible to read and write.
-// It may change for reasons of efficiency, or we may even switch to a
-// standard file format if there are compelling benefits to doing so.
-// See golang.org/s/go13linker for more background.
-//
-// The file format is:
-//
-//	- magic header: "\x00\x00go13ld"
-//	- byte 1 - version number
-//	- sequence of strings giving dependencies (imported packages)
-//	- empty string (marks end of sequence)
-//	- sequence of defined symbols
-//	- byte 0xff (marks end of sequence)
-//	- magic footer: "\xff\xffgo13ld"
-//
-// All integers are stored in a zigzag varint format.
-// See golang.org/s/go12symtab for a definition.
-//
-// Data blocks and strings are both stored as an integer
-// followed by that many bytes.
-//
-// A symbol reference is a string name followed by a version.
-// An empty name corresponds to a nil LSym* pointer.
-//
-// Each symbol is laid out as the following fields (taken from LSym*):
-//
-//	- byte 0xfe (sanity check for synchronization)
-//	- type [int]
-//	- name [string]
-//	- version [int]
-//	- flags [int]
-//		1 dupok
-//	- size [int]
-//	- gotype [symbol reference]
-//	- p [data block]
-//	- nr [int]
-//	- r [nr relocations, sorted by off]
-//
-// If type == STEXT, there are a few more fields:
-//
-//	- args [int]
-//	- locals [int]
-//	- nosplit [int]
-//	- flags [int]
-//		1 leaf
-//		2 C function
-//	- nlocal [int]
-//	- local [nlocal automatics]
-//	- pcln [pcln table]
-//
-// Each relocation has the encoding:
-//
-//	- off [int]
-//	- siz [int]
-//	- type [int]
-//	- add [int]
-//	- xadd [int]
-//	- sym [symbol reference]
-//	- xsym [symbol reference]
-//
-// Each local has the encoding:
-//
-//	- asym [symbol reference]
-//	- offset [int]
-//	- type [int]
-//	- gotype [symbol reference]
-//
-// The pcln table has the encoding:
-//
-//	- pcsp [data block]
-//	- pcfile [data block]
-//	- pcline [data block]
-//	- npcdata [int]
-//	- pcdata [npcdata data blocks]
-//	- nfuncdata [int]
-//	- funcdata [nfuncdata symbol references]
-//	- funcdatasym [nfuncdata ints]
-//	- nfile [int]
-//	- file [nfile symbol references]
-//
-// The file layout and meaning of type integers are architecture-independent.
-//
-// TODO(rsc): The file format is good for a first pass but needs work.
-//	- There are SymID in the object file that should really just be strings.
-//	- The actual symbol memory images are interlaced with the symbol
-//	  metadata. They should be separated, to reduce the I/O required to
-//	  load just the metadata.
-//	- The symbol references should be shortened, either with a symbol
-//	  table or by using a simple backward index to an earlier mentioned symbol.
-
-package obj
-
-import (
-	"fmt"
-	"log"
-	"path/filepath"
-	"strings"
-)
-
-var outfile string
-
-// The Go and C compilers, and the assembler, call writeobj to write
-// out a Go object file.  The linker does not call this; the linker
-// does not write out object files.
-func Writeobjdirect(ctxt *Link, b *Biobuf) {
-	var flag int
-	var s *LSym
-	var p *Prog
-	var plink *Prog
-	var a *Auto
-
-	// Build list of symbols, and assign instructions to lists.
-	// Ignore ctxt->plist boundaries. There are no guarantees there,
-	// and the C compilers and assemblers just use one big list.
-	var text *LSym
-
-	var curtext *LSym
-	var data *LSym
-	var etext *LSym
-	var edata *LSym
-	for pl := ctxt.Plist; pl != nil; pl = pl.Link {
-		for p = pl.Firstpc; p != nil; p = plink {
-			if ctxt.Debugasm != 0 && ctxt.Debugvlog != 0 {
-				fmt.Printf("obj: %v\n", p)
-			}
-			plink = p.Link
-			p.Link = nil
-
-			if p.As == AEND {
-				continue
-			}
-
-			if p.As == ATYPE {
-				// Assume each TYPE instruction describes
-				// a different local variable or parameter,
-				// so no dedup.
-				// Using only the TYPE instructions means
-				// that we discard location information about local variables
-				// in C and assembly functions; that information is inferred
-				// from ordinary references, because there are no TYPE
-				// instructions there. Without the type information, gdb can't
-				// use the locations, so we don't bother to save them.
-				// If something else could use them, we could arrange to
-				// preserve them.
-				if curtext == nil {
-					continue
-				}
-				a = new(Auto)
-				a.Asym = p.From.Sym
-				a.Aoffset = int32(p.From.Offset)
-				a.Name = int16(p.From.Name)
-				a.Gotype = p.From.Gotype
-				a.Link = curtext.Autom
-				curtext.Autom = a
-				continue
-			}
-
-			if p.As == AGLOBL {
-				s = p.From.Sym
-				tmp6 := s.Seenglobl
-				s.Seenglobl++
-				if tmp6 != 0 {
-					fmt.Printf("duplicate %v\n", p)
-				}
-				if s.Onlist != 0 {
-					log.Fatalf("symbol %s listed multiple times", s.Name)
-				}
-				s.Onlist = 1
-				if data == nil {
-					data = s
-				} else {
-					edata.Next = s
-				}
-				s.Next = nil
-				s.Size = p.To.Offset
-				if s.Type == 0 || s.Type == SXREF {
-					s.Type = SBSS
-				}
-				flag = int(p.From3.Offset)
-				if flag&DUPOK != 0 {
-					s.Dupok = 1
-				}
-				if flag&RODATA != 0 {
-					s.Type = SRODATA
-				} else if flag&NOPTR != 0 {
-					s.Type = SNOPTRBSS
-				}
-				edata = s
-				continue
-			}
-
-			if p.As == ADATA {
-				savedata(ctxt, p.From.Sym, p, "<input>")
-				continue
-			}
-
-			if p.As == ATEXT {
-				s = p.From.Sym
-				if s == nil {
-					// func _() { }
-					curtext = nil
-
-					continue
-				}
-
-				if s.Text != nil {
-					log.Fatalf("duplicate TEXT for %s", s.Name)
-				}
-				if s.Onlist != 0 {
-					log.Fatalf("symbol %s listed multiple times", s.Name)
-				}
-				s.Onlist = 1
-				if text == nil {
-					text = s
-				} else {
-					etext.Next = s
-				}
-				etext = s
-				flag = int(p.From3Offset())
-				if flag&DUPOK != 0 {
-					s.Dupok = 1
-				}
-				if flag&NOSPLIT != 0 {
-					s.Nosplit = 1
-				}
-				s.Next = nil
-				s.Type = STEXT
-				s.Text = p
-				s.Etext = p
-				curtext = s
-				continue
-			}
-
-			if p.As == AFUNCDATA {
-				// Rewrite reference to go_args_stackmap(SB) to the Go-provided declaration information.
-				if curtext == nil { // func _() {}
-					continue
-				}
-				if p.To.Sym.Name == "go_args_stackmap" {
-					if p.From.Type != TYPE_CONST || p.From.Offset != FUNCDATA_ArgsPointerMaps {
-						ctxt.Diag("FUNCDATA use of go_args_stackmap(SB) without FUNCDATA_ArgsPointerMaps")
-					}
-					p.To.Sym = Linklookup(ctxt, fmt.Sprintf("%s.args_stackmap", curtext.Name), int(curtext.Version))
-				}
-			}
-
-			if curtext == nil {
-				continue
-			}
-			s = curtext
-			s.Etext.Link = p
-			s.Etext = p
-		}
-	}
-
-	// Add reference to Go arguments for C or assembly functions without them.
-	var found int
-	for s := text; s != nil; s = s.Next {
-		if !strings.HasPrefix(s.Name, "\"\".") {
-			continue
-		}
-		found = 0
-		for p = s.Text; p != nil; p = p.Link {
-			if p.As == AFUNCDATA && p.From.Type == TYPE_CONST && p.From.Offset == FUNCDATA_ArgsPointerMaps {
-				found = 1
-				break
-			}
-		}
-
-		if found == 0 {
-			p = Appendp(ctxt, s.Text)
-			p.As = AFUNCDATA
-			p.From.Type = TYPE_CONST
-			p.From.Offset = FUNCDATA_ArgsPointerMaps
-			p.To.Type = TYPE_MEM
-			p.To.Name = NAME_EXTERN
-			p.To.Sym = Linklookup(ctxt, fmt.Sprintf("%s.args_stackmap", s.Name), int(s.Version))
-		}
-	}
-
-	// Turn functions into machine code images.
-	for s := text; s != nil; s = s.Next {
-		mkfwd(s)
-		linkpatch(ctxt, s)
-		ctxt.Arch.Follow(ctxt, s)
-		ctxt.Arch.Preprocess(ctxt, s)
-		ctxt.Arch.Assemble(ctxt, s)
-		linkpcln(ctxt, s)
-	}
-
-	// Emit header.
-	Bputc(b, 0)
-
-	Bputc(b, 0)
-	fmt.Fprintf(b, "go13ld")
-	Bputc(b, 1) // version
-
-	// Emit autolib.
-	for _, pkg := range ctxt.Imports {
-		wrstring(b, pkg)
-	}
-	wrstring(b, "")
-
-	// Emit symbols.
-	for s := text; s != nil; s = s.Next {
-		writesym(ctxt, b, s)
-	}
-	for s := data; s != nil; s = s.Next {
-		writesym(ctxt, b, s)
-	}
-
-	// Emit footer.
-	Bputc(b, 0xff)
-
-	Bputc(b, 0xff)
-	fmt.Fprintf(b, "go13ld")
-}
-
-func writesym(ctxt *Link, b *Biobuf, s *LSym) {
-	if ctxt.Debugasm != 0 {
-		fmt.Fprintf(ctxt.Bso, "%s ", s.Name)
-		if s.Version != 0 {
-			fmt.Fprintf(ctxt.Bso, "v=%d ", s.Version)
-		}
-		if s.Type != 0 {
-			fmt.Fprintf(ctxt.Bso, "t=%d ", s.Type)
-		}
-		if s.Dupok != 0 {
-			fmt.Fprintf(ctxt.Bso, "dupok ")
-		}
-		if s.Cfunc != 0 {
-			fmt.Fprintf(ctxt.Bso, "cfunc ")
-		}
-		if s.Nosplit != 0 {
-			fmt.Fprintf(ctxt.Bso, "nosplit ")
-		}
-		fmt.Fprintf(ctxt.Bso, "size=%d value=%d", int64(s.Size), int64(s.Value))
-		if s.Type == STEXT {
-			fmt.Fprintf(ctxt.Bso, " args=%#x locals=%#x", uint64(s.Args), uint64(s.Locals))
-			if s.Leaf != 0 {
-				fmt.Fprintf(ctxt.Bso, " leaf")
-			}
-		}
-
-		fmt.Fprintf(ctxt.Bso, "\n")
-		for p := s.Text; p != nil; p = p.Link {
-			fmt.Fprintf(ctxt.Bso, "\t%#04x %v\n", uint(int(p.Pc)), p)
-		}
-		var c int
-		var j int
-		for i := 0; i < len(s.P); {
-			fmt.Fprintf(ctxt.Bso, "\t%#04x", uint(i))
-			for j = i; j < i+16 && j < len(s.P); j++ {
-				fmt.Fprintf(ctxt.Bso, " %02x", s.P[j])
-			}
-			for ; j < i+16; j++ {
-				fmt.Fprintf(ctxt.Bso, "   ")
-			}
-			fmt.Fprintf(ctxt.Bso, "  ")
-			for j = i; j < i+16 && j < len(s.P); j++ {
-				c = int(s.P[j])
-				if ' ' <= c && c <= 0x7e {
-					fmt.Fprintf(ctxt.Bso, "%c", c)
-				} else {
-					fmt.Fprintf(ctxt.Bso, ".")
-				}
-			}
-
-			fmt.Fprintf(ctxt.Bso, "\n")
-			i += 16
-		}
-
-		var r *Reloc
-		var name string
-		for i := 0; i < len(s.R); i++ {
-			r = &s.R[i]
-			name = ""
-			if r.Sym != nil {
-				name = r.Sym.Name
-			}
-			if ctxt.Arch.Thechar == '5' || ctxt.Arch.Thechar == '9' {
-				fmt.Fprintf(ctxt.Bso, "\trel %d+%d t=%d %s+%x\n", int(r.Off), r.Siz, r.Type, name, uint64(int64(r.Add)))
-			} else {
-				fmt.Fprintf(ctxt.Bso, "\trel %d+%d t=%d %s+%d\n", int(r.Off), r.Siz, r.Type, name, int64(r.Add))
-			}
-		}
-	}
-
-	Bputc(b, 0xfe)
-	wrint(b, int64(s.Type))
-	wrstring(b, s.Name)
-	wrint(b, int64(s.Version))
-	flags := int64(s.Dupok)
-	if s.Local {
-		flags |= 2
-	}
-	wrint(b, flags)
-	wrint(b, s.Size)
-	wrsym(b, s.Gotype)
-	wrdata(b, s.P)
-
-	wrint(b, int64(len(s.R)))
-	var r *Reloc
-	for i := 0; i < len(s.R); i++ {
-		r = &s.R[i]
-		wrint(b, int64(r.Off))
-		wrint(b, int64(r.Siz))
-		wrint(b, int64(r.Type))
-		wrint(b, r.Add)
-		wrint(b, 0) // Xadd, ignored
-		wrsym(b, r.Sym)
-		wrsym(b, nil) // Xsym, ignored
-	}
-
-	if s.Type == STEXT {
-		wrint(b, int64(s.Args))
-		wrint(b, int64(s.Locals))
-		wrint(b, int64(s.Nosplit))
-		wrint(b, int64(s.Leaf)|int64(s.Cfunc)<<1)
-		n := 0
-		for a := s.Autom; a != nil; a = a.Link {
-			n++
-		}
-		wrint(b, int64(n))
-		for a := s.Autom; a != nil; a = a.Link {
-			wrsym(b, a.Asym)
-			wrint(b, int64(a.Aoffset))
-			if a.Name == NAME_AUTO {
-				wrint(b, A_AUTO)
-			} else if a.Name == NAME_PARAM {
-				wrint(b, A_PARAM)
-			} else {
-				log.Fatalf("%s: invalid local variable type %d", s.Name, a.Name)
-			}
-			wrsym(b, a.Gotype)
-		}
-
-		pc := s.Pcln
-		wrdata(b, pc.Pcsp.P)
-		wrdata(b, pc.Pcfile.P)
-		wrdata(b, pc.Pcline.P)
-		wrint(b, int64(len(pc.Pcdata)))
-		for i := 0; i < len(pc.Pcdata); i++ {
-			wrdata(b, pc.Pcdata[i].P)
-		}
-		wrint(b, int64(len(pc.Funcdataoff)))
-		for i := 0; i < len(pc.Funcdataoff); i++ {
-			wrsym(b, pc.Funcdata[i])
-		}
-		for i := 0; i < len(pc.Funcdataoff); i++ {
-			wrint(b, pc.Funcdataoff[i])
-		}
-		wrint(b, int64(len(pc.File)))
-		for i := 0; i < len(pc.File); i++ {
-			wrpathsym(ctxt, b, pc.File[i])
-		}
-	}
-}
-
-// Reusable buffer to avoid allocations.
-// This buffer was responsible for 15% of gc's allocations.
-var varintbuf [10]uint8
-
-func wrint(b *Biobuf, sval int64) {
-	var v uint64
-	uv := (uint64(sval) << 1) ^ uint64(int64(sval>>63))
-	p := varintbuf[:]
-	for v = uv; v >= 0x80; v >>= 7 {
-		p[0] = uint8(v | 0x80)
-		p = p[1:]
-	}
-	p[0] = uint8(v)
-	p = p[1:]
-	b.Write(varintbuf[:len(varintbuf)-len(p)])
-}
-
-func wrstring(b *Biobuf, s string) {
-	wrint(b, int64(len(s)))
-	b.w.WriteString(s)
-}
-
-// wrpath writes a path just like a string, but on windows, it
-// translates '\\' to '/' in the process.
-func wrpath(ctxt *Link, b *Biobuf, p string) {
-	wrstring(b, filepath.ToSlash(p))
-}
-
-func wrdata(b *Biobuf, v []byte) {
-	wrint(b, int64(len(v)))
-	b.Write(v)
-}
-
-func wrpathsym(ctxt *Link, b *Biobuf, s *LSym) {
-	if s == nil {
-		wrint(b, 0)
-		wrint(b, 0)
-		return
-	}
-
-	wrpath(ctxt, b, s.Name)
-	wrint(b, int64(s.Version))
-}
-
-func wrsym(b *Biobuf, s *LSym) {
-	if s == nil {
-		wrint(b, 0)
-		wrint(b, 0)
-		return
-	}
-
-	wrstring(b, s.Name)
-	wrint(b, int64(s.Version))
-}
diff --git a/src/cmd/internal/obj/pass.go b/src/cmd/internal/obj/pass.go
deleted file mode 100644
index b92dfe2..0000000
--- a/src/cmd/internal/obj/pass.go
+++ /dev/null
@@ -1,216 +0,0 @@
-// Inferno utils/6l/pass.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6l/pass.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package obj
-
-// Code and data passes.
-
-func Brchain(ctxt *Link, p *Prog) *Prog {
-	for i := 0; i < 20; i++ {
-		if p == nil || p.As != AJMP || p.Pcond == nil {
-			return p
-		}
-		p = p.Pcond
-	}
-
-	return nil
-}
-
-func brloop(ctxt *Link, p *Prog) *Prog {
-	var q *Prog
-
-	c := 0
-	for q = p; q != nil; q = q.Pcond {
-		if q.As != AJMP || q.Pcond == nil {
-			break
-		}
-		c++
-		if c >= 5000 {
-			return nil
-		}
-	}
-
-	return q
-}
-
-func checkaddr(ctxt *Link, p *Prog, a *Addr) {
-	// Check expected encoding, especially TYPE_CONST vs TYPE_ADDR.
-	switch a.Type {
-	case TYPE_NONE:
-		return
-
-	case TYPE_BRANCH:
-		if a.Reg != 0 || a.Index != 0 || a.Scale != 0 || a.Name != 0 {
-			break
-		}
-		return
-
-	case TYPE_TEXTSIZE:
-		if a.Reg != 0 || a.Index != 0 || a.Scale != 0 || a.Name != 0 {
-			break
-		}
-		return
-
-		//if(a->u.bits != 0)
-	//	break;
-	case TYPE_MEM:
-		return
-
-		// TODO(rsc): After fixing SHRQ, check a->index != 0 too.
-	case TYPE_CONST:
-		if a.Name != 0 || a.Sym != nil || a.Reg != 0 {
-			ctxt.Diag("argument is TYPE_CONST, should be TYPE_ADDR, in %v", p)
-			return
-		}
-
-		if a.Reg != 0 || a.Scale != 0 || a.Name != 0 || a.Sym != nil || a.Val != nil {
-			break
-		}
-		return
-
-	case TYPE_FCONST, TYPE_SCONST:
-		if a.Reg != 0 || a.Index != 0 || a.Scale != 0 || a.Name != 0 || a.Offset != 0 || a.Sym != nil {
-			break
-		}
-		return
-
-	// TODO(rsc): After fixing PINSRQ, check a->offset != 0 too.
-	// TODO(rsc): After fixing SHRQ, check a->index != 0 too.
-	case TYPE_REG:
-		if a.Scale != 0 || a.Name != 0 || a.Sym != nil {
-			break
-		}
-		return
-
-	case TYPE_ADDR:
-		if a.Val != nil {
-			break
-		}
-		if a.Reg == 0 && a.Index == 0 && a.Scale == 0 && a.Name == 0 && a.Sym == nil {
-			ctxt.Diag("argument is TYPE_ADDR, should be TYPE_CONST, in %v", p)
-		}
-		return
-
-	case TYPE_SHIFT:
-		if a.Index != 0 || a.Scale != 0 || a.Name != 0 || a.Sym != nil || a.Val != nil {
-			break
-		}
-		return
-
-	case TYPE_REGREG:
-		if a.Index != 0 || a.Scale != 0 || a.Name != 0 || a.Sym != nil || a.Val != nil {
-			break
-		}
-		return
-
-	case TYPE_REGREG2:
-		return
-
-	case TYPE_REGLIST:
-		return
-
-	// Expect sym and name to be set, nothing else.
-	// Technically more is allowed, but this is only used for *name(SB).
-	case TYPE_INDIR:
-		if a.Reg != 0 || a.Index != 0 || a.Scale != 0 || a.Name == 0 || a.Offset != 0 || a.Sym == nil || a.Val != nil {
-			break
-		}
-		return
-	}
-
-	ctxt.Diag("invalid encoding for argument %v", p)
-}
-
-func linkpatch(ctxt *Link, sym *LSym) {
-	var c int32
-	var name string
-	var q *Prog
-
-	ctxt.Cursym = sym
-
-	for p := sym.Text; p != nil; p = p.Link {
-		checkaddr(ctxt, p, &p.From)
-		if p.From3 != nil {
-			checkaddr(ctxt, p, p.From3)
-		}
-		checkaddr(ctxt, p, &p.To)
-
-		if ctxt.Arch.Progedit != nil {
-			ctxt.Arch.Progedit(ctxt, p)
-		}
-		if p.To.Type != TYPE_BRANCH {
-			continue
-		}
-		if p.To.Val != nil {
-			// TODO: Remove To.Val.(*Prog) in favor of p->pcond.
-			p.Pcond = p.To.Val.(*Prog)
-			continue
-		}
-
-		if p.To.Sym != nil {
-			continue
-		}
-		c = int32(p.To.Offset)
-		for q = sym.Text; q != nil; {
-			if int64(c) == q.Pc {
-				break
-			}
-			if q.Forwd != nil && int64(c) >= q.Forwd.Pc {
-				q = q.Forwd
-			} else {
-				q = q.Link
-			}
-		}
-
-		if q == nil {
-			name = "<nil>"
-			if p.To.Sym != nil {
-				name = p.To.Sym.Name
-			}
-			ctxt.Diag("branch out of range (%#x)\n%v [%s]", uint32(c), p, name)
-			p.To.Type = TYPE_NONE
-		}
-
-		p.To.Val = q
-		p.Pcond = q
-	}
-
-	for p := sym.Text; p != nil; p = p.Link {
-		p.Mark = 0 /* initialization for follow */
-		if p.Pcond != nil {
-			p.Pcond = brloop(ctxt, p.Pcond)
-			if p.Pcond != nil {
-				if p.To.Type == TYPE_BRANCH {
-					p.To.Offset = p.Pcond.Pc
-				}
-			}
-		}
-	}
-}
diff --git a/src/cmd/internal/obj/pcln.go b/src/cmd/internal/obj/pcln.go
deleted file mode 100644
index 91c9293..0000000
--- a/src/cmd/internal/obj/pcln.go
+++ /dev/null
@@ -1,338 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package obj
-
-import (
-	"fmt"
-	"log"
-)
-
-func addvarint(ctxt *Link, d *Pcdata, val uint32) {
-	var v uint32
-	for v = val; v >= 0x80; v >>= 7 {
-		d.P = append(d.P, uint8(v|0x80))
-	}
-	d.P = append(d.P, uint8(v))
-}
-
-// funcpctab writes to dst a pc-value table mapping the code in func to the values
-// returned by valfunc parameterized by arg. The invocation of valfunc to update the
-// current value is, for each p,
-//
-//	val = valfunc(func, val, p, 0, arg);
-//	record val as value at p->pc;
-//	val = valfunc(func, val, p, 1, arg);
-//
-// where func is the function, val is the current value, p is the instruction being
-// considered, and arg can be used to further parameterize valfunc.
-func funcpctab(ctxt *Link, dst *Pcdata, func_ *LSym, desc string, valfunc func(*Link, *LSym, int32, *Prog, int32, interface{}) int32, arg interface{}) {
-	// To debug a specific function, uncomment second line and change name.
-	dbg := 0
-
-	//dbg = strcmp(func->name, "main.main") == 0;
-	//dbg = strcmp(desc, "pctofile") == 0;
-
-	ctxt.Debugpcln += int32(dbg)
-
-	dst.P = dst.P[:0]
-
-	if ctxt.Debugpcln != 0 {
-		fmt.Fprintf(ctxt.Bso, "funcpctab %s [valfunc=%s]\n", func_.Name, desc)
-	}
-
-	val := int32(-1)
-	oldval := val
-	if func_.Text == nil {
-		ctxt.Debugpcln -= int32(dbg)
-		return
-	}
-
-	pc := func_.Text.Pc
-
-	if ctxt.Debugpcln != 0 {
-		fmt.Fprintf(ctxt.Bso, "%6x %6d %v\n", uint64(pc), val, func_.Text)
-	}
-
-	started := int32(0)
-	var delta uint32
-	for p := func_.Text; p != nil; p = p.Link {
-		// Update val. If it's not changing, keep going.
-		val = valfunc(ctxt, func_, val, p, 0, arg)
-
-		if val == oldval && started != 0 {
-			val = valfunc(ctxt, func_, val, p, 1, arg)
-			if ctxt.Debugpcln != 0 {
-				fmt.Fprintf(ctxt.Bso, "%6x %6s %v\n", uint64(int64(p.Pc)), "", p)
-			}
-			continue
-		}
-
-		// If the pc of the next instruction is the same as the
-		// pc of this instruction, this instruction is not a real
-		// instruction. Keep going, so that we only emit a delta
-		// for a true instruction boundary in the program.
-		if p.Link != nil && p.Link.Pc == p.Pc {
-			val = valfunc(ctxt, func_, val, p, 1, arg)
-			if ctxt.Debugpcln != 0 {
-				fmt.Fprintf(ctxt.Bso, "%6x %6s %v\n", uint64(int64(p.Pc)), "", p)
-			}
-			continue
-		}
-
-		// The table is a sequence of (value, pc) pairs, where each
-		// pair states that the given value is in effect from the current position
-		// up to the given pc, which becomes the new current position.
-		// To generate the table as we scan over the program instructions,
-		// we emit a "(value" when pc == func->value, and then
-		// each time we observe a change in value we emit ", pc) (value".
-		// When the scan is over, we emit the closing ", pc)".
-		//
-		// The table is delta-encoded. The value deltas are signed and
-		// transmitted in zig-zag form, where a complement bit is placed in bit 0,
-		// and the pc deltas are unsigned. Both kinds of deltas are sent
-		// as variable-length little-endian base-128 integers,
-		// where the 0x80 bit indicates that the integer continues.
-
-		if ctxt.Debugpcln != 0 {
-			fmt.Fprintf(ctxt.Bso, "%6x %6d %v\n", uint64(int64(p.Pc)), val, p)
-		}
-
-		if started != 0 {
-			addvarint(ctxt, dst, uint32((p.Pc-pc)/int64(ctxt.Arch.Minlc)))
-			pc = p.Pc
-		}
-
-		delta = uint32(val) - uint32(oldval)
-		if delta>>31 != 0 {
-			delta = 1 | ^(delta << 1)
-		} else {
-			delta <<= 1
-		}
-		addvarint(ctxt, dst, delta)
-		oldval = val
-		started = 1
-		val = valfunc(ctxt, func_, val, p, 1, arg)
-	}
-
-	if started != 0 {
-		if ctxt.Debugpcln != 0 {
-			fmt.Fprintf(ctxt.Bso, "%6x done\n", uint64(int64(func_.Text.Pc)+func_.Size))
-		}
-		addvarint(ctxt, dst, uint32((func_.Value+func_.Size-pc)/int64(ctxt.Arch.Minlc)))
-		addvarint(ctxt, dst, 0) // terminator
-	}
-
-	if ctxt.Debugpcln != 0 {
-		fmt.Fprintf(ctxt.Bso, "wrote %d bytes to %p\n", len(dst.P), dst)
-		for i := 0; i < len(dst.P); i++ {
-			fmt.Fprintf(ctxt.Bso, " %02x", dst.P[i])
-		}
-		fmt.Fprintf(ctxt.Bso, "\n")
-	}
-
-	ctxt.Debugpcln -= int32(dbg)
-}
-
-// pctofileline computes either the file number (arg == 0)
-// or the line number (arg == 1) to use at p.
-// Because p->lineno applies to p, phase == 0 (before p)
-// takes care of the update.
-func pctofileline(ctxt *Link, sym *LSym, oldval int32, p *Prog, phase int32, arg interface{}) int32 {
-	if p.As == ATEXT || p.As == ANOP || p.As == AUSEFIELD || p.Lineno == 0 || phase == 1 {
-		return oldval
-	}
-	var l int32
-	var f *LSym
-	linkgetline(ctxt, p.Lineno, &f, &l)
-	if f == nil {
-		//	print("getline failed for %s %v\n", ctxt->cursym->name, p);
-		return oldval
-	}
-
-	if arg == nil {
-		return l
-	}
-	pcln := arg.(*Pcln)
-
-	if f == pcln.Lastfile {
-		return int32(pcln.Lastindex)
-	}
-
-	var i int32
-	for i = 0; i < int32(len(pcln.File)); i++ {
-		file := pcln.File[i]
-		if file == f {
-			pcln.Lastfile = f
-			pcln.Lastindex = int(i)
-			return int32(i)
-		}
-	}
-	pcln.File = append(pcln.File, f)
-	pcln.Lastfile = f
-	pcln.Lastindex = int(i)
-	return i
-}
-
-// pctospadj computes the sp adjustment in effect.
-// It is oldval plus any adjustment made by p itself.
-// The adjustment by p takes effect only after p, so we
-// apply the change during phase == 1.
-func pctospadj(ctxt *Link, sym *LSym, oldval int32, p *Prog, phase int32, arg interface{}) int32 {
-	if oldval == -1 { // starting
-		oldval = 0
-	}
-	if phase == 0 {
-		return oldval
-	}
-	if oldval+p.Spadj < -10000 || oldval+p.Spadj > 1100000000 {
-		ctxt.Diag("overflow in spadj: %d + %d = %d", oldval, p.Spadj, oldval+p.Spadj)
-		log.Fatalf("bad code")
-	}
-
-	return oldval + p.Spadj
-}
-
-// pctopcdata computes the pcdata value in effect at p.
-// A PCDATA instruction sets the value in effect at future
-// non-PCDATA instructions.
-// Since PCDATA instructions have no width in the final code,
-// it does not matter which phase we use for the update.
-func pctopcdata(ctxt *Link, sym *LSym, oldval int32, p *Prog, phase int32, arg interface{}) int32 {
-	if phase == 0 || p.As != APCDATA || p.From.Offset != int64(arg.(uint32)) {
-		return oldval
-	}
-	if int64(int32(p.To.Offset)) != p.To.Offset {
-		ctxt.Diag("overflow in PCDATA instruction: %v", p)
-		log.Fatalf("bad code")
-	}
-
-	return int32(p.To.Offset)
-}
-
-func linkpcln(ctxt *Link, cursym *LSym) {
-	ctxt.Cursym = cursym
-
-	pcln := new(Pcln)
-	cursym.Pcln = pcln
-
-	npcdata := 0
-	nfuncdata := 0
-	for p := cursym.Text; p != nil; p = p.Link {
-		if p.As == APCDATA && p.From.Offset >= int64(npcdata) {
-			npcdata = int(p.From.Offset + 1)
-		}
-		if p.As == AFUNCDATA && p.From.Offset >= int64(nfuncdata) {
-			nfuncdata = int(p.From.Offset + 1)
-		}
-	}
-
-	pcln.Pcdata = make([]Pcdata, npcdata)
-	pcln.Pcdata = pcln.Pcdata[:npcdata]
-	pcln.Funcdata = make([]*LSym, nfuncdata)
-	pcln.Funcdataoff = make([]int64, nfuncdata)
-	pcln.Funcdataoff = pcln.Funcdataoff[:nfuncdata]
-
-	funcpctab(ctxt, &pcln.Pcsp, cursym, "pctospadj", pctospadj, nil)
-	funcpctab(ctxt, &pcln.Pcfile, cursym, "pctofile", pctofileline, pcln)
-	funcpctab(ctxt, &pcln.Pcline, cursym, "pctoline", pctofileline, nil)
-
-	// tabulate which pc and func data we have.
-	havepc := make([]uint32, (npcdata+31)/32)
-	havefunc := make([]uint32, (nfuncdata+31)/32)
-	for p := cursym.Text; p != nil; p = p.Link {
-		if p.As == AFUNCDATA {
-			if (havefunc[p.From.Offset/32]>>uint64(p.From.Offset%32))&1 != 0 {
-				ctxt.Diag("multiple definitions for FUNCDATA $%d", p.From.Offset)
-			}
-			havefunc[p.From.Offset/32] |= 1 << uint64(p.From.Offset%32)
-		}
-
-		if p.As == APCDATA {
-			havepc[p.From.Offset/32] |= 1 << uint64(p.From.Offset%32)
-		}
-	}
-
-	// pcdata.
-	for i := 0; i < npcdata; i++ {
-		if (havepc[i/32]>>uint(i%32))&1 == 0 {
-			continue
-		}
-		funcpctab(ctxt, &pcln.Pcdata[i], cursym, "pctopcdata", pctopcdata, interface{}(uint32(i)))
-	}
-
-	// funcdata
-	if nfuncdata > 0 {
-		var i int
-		for p := cursym.Text; p != nil; p = p.Link {
-			if p.As == AFUNCDATA {
-				i = int(p.From.Offset)
-				pcln.Funcdataoff[i] = p.To.Offset
-				if p.To.Type != TYPE_CONST {
-					// TODO: Dedup.
-					//funcdata_bytes += p->to.sym->size;
-					pcln.Funcdata[i] = p.To.Sym
-				}
-			}
-		}
-	}
-}
-
-// iteration over encoded pcdata tables.
-
-func getvarint(pp *[]byte) uint32 {
-	v := uint32(0)
-	p := *pp
-	for shift := 0; ; shift += 7 {
-		v |= uint32(p[0]&0x7F) << uint(shift)
-		tmp7 := p
-		p = p[1:]
-		if tmp7[0]&0x80 == 0 {
-			break
-		}
-	}
-
-	*pp = p
-	return v
-}
-
-func pciternext(it *Pciter) {
-	it.pc = it.nextpc
-	if it.done != 0 {
-		return
-	}
-	if -cap(it.p) >= -cap(it.d.P[len(it.d.P):]) {
-		it.done = 1
-		return
-	}
-
-	// value delta
-	v := getvarint(&it.p)
-
-	if v == 0 && it.start == 0 {
-		it.done = 1
-		return
-	}
-
-	it.start = 0
-	dv := int32(v>>1) ^ (int32(v<<31) >> 31)
-	it.value += dv
-
-	// pc delta
-	v = getvarint(&it.p)
-
-	it.nextpc = it.pc + v*it.pcscale
-}
-
-func pciterinit(ctxt *Link, it *Pciter, d *Pcdata) {
-	it.d = *d
-	it.p = it.d.P
-	it.pc = 0
-	it.nextpc = 0
-	it.value = -1
-	it.start = 1
-	it.done = 0
-	it.pcscale = uint32(ctxt.Arch.Minlc)
-	pciternext(it)
-}
diff --git a/src/cmd/internal/obj/ppc64/a.out.go b/src/cmd/internal/obj/ppc64/a.out.go
deleted file mode 100644
index 3028b6c..0000000
--- a/src/cmd/internal/obj/ppc64/a.out.go
+++ /dev/null
@@ -1,538 +0,0 @@
-// cmd/9c/9.out.h from Vita Nuova.
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2008 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2008 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package ppc64
-
-import "cmd/internal/obj"
-
-//go:generate go run ../stringer.go -i $GOFILE -o anames.go -p ppc64
-
-/*
- * powerpc 64
- */
-const (
-	NSNAME = 8
-	NSYM   = 50
-	NREG   = 32 /* number of general registers */
-	NFREG  = 32 /* number of floating point registers */
-)
-
-const (
-	REG_R0 = obj.RBasePPC64 + iota
-	REG_R1
-	REG_R2
-	REG_R3
-	REG_R4
-	REG_R5
-	REG_R6
-	REG_R7
-	REG_R8
-	REG_R9
-	REG_R10
-	REG_R11
-	REG_R12
-	REG_R13
-	REG_R14
-	REG_R15
-	REG_R16
-	REG_R17
-	REG_R18
-	REG_R19
-	REG_R20
-	REG_R21
-	REG_R22
-	REG_R23
-	REG_R24
-	REG_R25
-	REG_R26
-	REG_R27
-	REG_R28
-	REG_R29
-	REG_R30
-	REG_R31
-
-	REG_F0
-	REG_F1
-	REG_F2
-	REG_F3
-	REG_F4
-	REG_F5
-	REG_F6
-	REG_F7
-	REG_F8
-	REG_F9
-	REG_F10
-	REG_F11
-	REG_F12
-	REG_F13
-	REG_F14
-	REG_F15
-	REG_F16
-	REG_F17
-	REG_F18
-	REG_F19
-	REG_F20
-	REG_F21
-	REG_F22
-	REG_F23
-	REG_F24
-	REG_F25
-	REG_F26
-	REG_F27
-	REG_F28
-	REG_F29
-	REG_F30
-	REG_F31
-
-	REG_CR0
-	REG_CR1
-	REG_CR2
-	REG_CR3
-	REG_CR4
-	REG_CR5
-	REG_CR6
-	REG_CR7
-
-	REG_MSR
-	REG_FPSCR
-	REG_CR
-
-	REG_SPECIAL = REG_CR0
-
-	REG_SPR0 = obj.RBasePPC64 + 1024 // first of 1024 registers
-	REG_DCR0 = obj.RBasePPC64 + 2048 // first of 1024 registers
-
-	REG_XER = REG_SPR0 + 1
-	REG_LR  = REG_SPR0 + 8
-	REG_CTR = REG_SPR0 + 9
-
-	REGZERO  = REG_R0 /* set to zero */
-	REGSP    = REG_R1
-	REGSB    = REG_R2
-	REGRET   = REG_R3
-	REGARG   = -1      /* -1 disables passing the first argument in register */
-	REGRT1   = REG_R3  /* reserved for runtime, duffzero and duffcopy */
-	REGRT2   = REG_R4  /* reserved for runtime, duffcopy */
-	REGMIN   = REG_R7  /* register variables allocated from here to REGMAX */
-	REGCTXT  = REG_R11 /* context for closures */
-	REGTLS   = REG_R13 /* C ABI TLS base pointer */
-	REGMAX   = REG_R27
-	REGEXT   = REG_R30 /* external registers allocated from here down */
-	REGG     = REG_R30 /* G */
-	REGTMP   = REG_R31 /* used by the linker */
-	FREGRET  = REG_F0
-	FREGMIN  = REG_F17 /* first register variable */
-	FREGMAX  = REG_F26 /* last register variable for 9g only */
-	FREGEXT  = REG_F26 /* first external register */
-	FREGCVI  = REG_F27 /* floating conversion constant */
-	FREGZERO = REG_F28 /* both float and double */
-	FREGHALF = REG_F29 /* double */
-	FREGONE  = REG_F30 /* double */
-	FREGTWO  = REG_F31 /* double */
-)
-
-/*
- * GENERAL:
- *
- * compiler allocates R3 up as temps
- * compiler allocates register variables R7-R27
- * compiler allocates external registers R30 down
- *
- * compiler allocates register variables F17-F26
- * compiler allocates external registers F26 down
- */
-const (
-	BIG = 32768 - 8
-)
-
-const (
-	/* mark flags */
-	LABEL   = 1 << 0
-	LEAF    = 1 << 1
-	FLOAT   = 1 << 2
-	BRANCH  = 1 << 3
-	LOAD    = 1 << 4
-	FCMP    = 1 << 5
-	SYNC    = 1 << 6
-	LIST    = 1 << 7
-	FOLL    = 1 << 8
-	NOSCHED = 1 << 9
-)
-
-const (
-	C_NONE = iota
-	C_REG
-	C_FREG
-	C_CREG
-	C_SPR /* special processor register */
-	C_ZCON
-	C_SCON   /* 16 bit signed */
-	C_UCON   /* 32 bit signed, low 16 bits 0 */
-	C_ADDCON /* -0x8000 <= v < 0 */
-	C_ANDCON /* 0 < v <= 0xFFFF */
-	C_LCON   /* other 32 */
-	C_DCON   /* other 64 (could subdivide further) */
-	C_SACON  /* $n(REG) where n <= int16 */
-	C_SECON
-	C_LACON /* $n(REG) where int16 < n <= int32 */
-	C_LECON
-	C_DACON /* $n(REG) where int32 < n */
-	C_SBRA
-	C_LBRA
-	C_SAUTO
-	C_LAUTO
-	C_SEXT
-	C_LEXT
-	C_ZOREG
-	C_SOREG
-	C_LOREG
-	C_FPSCR
-	C_MSR
-	C_XER
-	C_LR
-	C_CTR
-	C_ANY
-	C_GOK
-	C_ADDR
-	C_TEXTSIZE
-
-	C_NCLASS /* must be the last */
-)
-
-const (
-	AADD = obj.ABasePPC64 + obj.A_ARCHSPECIFIC + iota
-	AADDCC
-	AADDV
-	AADDVCC
-	AADDC
-	AADDCCC
-	AADDCV
-	AADDCVCC
-	AADDME
-	AADDMECC
-	AADDMEVCC
-	AADDMEV
-	AADDE
-	AADDECC
-	AADDEVCC
-	AADDEV
-	AADDZE
-	AADDZECC
-	AADDZEVCC
-	AADDZEV
-	AAND
-	AANDCC
-	AANDN
-	AANDNCC
-	ABC
-	ABCL
-	ABEQ
-	ABGE
-	ABGT
-	ABLE
-	ABLT
-	ABNE
-	ABVC
-	ABVS
-	ACMP
-	ACMPU
-	ACNTLZW
-	ACNTLZWCC
-	ACRAND
-	ACRANDN
-	ACREQV
-	ACRNAND
-	ACRNOR
-	ACROR
-	ACRORN
-	ACRXOR
-	ADIVW
-	ADIVWCC
-	ADIVWVCC
-	ADIVWV
-	ADIVWU
-	ADIVWUCC
-	ADIVWUVCC
-	ADIVWUV
-	AEQV
-	AEQVCC
-	AEXTSB
-	AEXTSBCC
-	AEXTSH
-	AEXTSHCC
-	AFABS
-	AFABSCC
-	AFADD
-	AFADDCC
-	AFADDS
-	AFADDSCC
-	AFCMPO
-	AFCMPU
-	AFCTIW
-	AFCTIWCC
-	AFCTIWZ
-	AFCTIWZCC
-	AFDIV
-	AFDIVCC
-	AFDIVS
-	AFDIVSCC
-	AFMADD
-	AFMADDCC
-	AFMADDS
-	AFMADDSCC
-	AFMOVD
-	AFMOVDCC
-	AFMOVDU
-	AFMOVS
-	AFMOVSU
-	AFMSUB
-	AFMSUBCC
-	AFMSUBS
-	AFMSUBSCC
-	AFMUL
-	AFMULCC
-	AFMULS
-	AFMULSCC
-	AFNABS
-	AFNABSCC
-	AFNEG
-	AFNEGCC
-	AFNMADD
-	AFNMADDCC
-	AFNMADDS
-	AFNMADDSCC
-	AFNMSUB
-	AFNMSUBCC
-	AFNMSUBS
-	AFNMSUBSCC
-	AFRSP
-	AFRSPCC
-	AFSUB
-	AFSUBCC
-	AFSUBS
-	AFSUBSCC
-	AMOVMW
-	ALSW
-	ALWAR
-	AMOVWBR
-	AMOVB
-	AMOVBU
-	AMOVBZ
-	AMOVBZU
-	AMOVH
-	AMOVHBR
-	AMOVHU
-	AMOVHZ
-	AMOVHZU
-	AMOVW
-	AMOVWU
-	AMOVFL
-	AMOVCRFS
-	AMTFSB0
-	AMTFSB0CC
-	AMTFSB1
-	AMTFSB1CC
-	AMULHW
-	AMULHWCC
-	AMULHWU
-	AMULHWUCC
-	AMULLW
-	AMULLWCC
-	AMULLWVCC
-	AMULLWV
-	ANAND
-	ANANDCC
-	ANEG
-	ANEGCC
-	ANEGVCC
-	ANEGV
-	ANOR
-	ANORCC
-	AOR
-	AORCC
-	AORN
-	AORNCC
-	AREM
-	AREMCC
-	AREMV
-	AREMVCC
-	AREMU
-	AREMUCC
-	AREMUV
-	AREMUVCC
-	ARFI
-	ARLWMI
-	ARLWMICC
-	ARLWNM
-	ARLWNMCC
-	ASLW
-	ASLWCC
-	ASRW
-	ASRAW
-	ASRAWCC
-	ASRWCC
-	ASTSW
-	ASTWCCC
-	ASUB
-	ASUBCC
-	ASUBVCC
-	ASUBC
-	ASUBCCC
-	ASUBCV
-	ASUBCVCC
-	ASUBME
-	ASUBMECC
-	ASUBMEVCC
-	ASUBMEV
-	ASUBV
-	ASUBE
-	ASUBECC
-	ASUBEV
-	ASUBEVCC
-	ASUBZE
-	ASUBZECC
-	ASUBZEVCC
-	ASUBZEV
-	ASYNC
-	AXOR
-	AXORCC
-
-	ADCBF
-	ADCBI
-	ADCBST
-	ADCBT
-	ADCBTST
-	ADCBZ
-	AECIWX
-	AECOWX
-	AEIEIO
-	AICBI
-	AISYNC
-	APTESYNC
-	ATLBIE
-	ATLBIEL
-	ATLBSYNC
-	ATW
-
-	ASYSCALL
-	AWORD
-
-	ARFCI
-
-	/* optional on 32-bit */
-	AFRES
-	AFRESCC
-	AFRSQRTE
-	AFRSQRTECC
-	AFSEL
-	AFSELCC
-	AFSQRT
-	AFSQRTCC
-	AFSQRTS
-	AFSQRTSCC
-
-	/* 64-bit */
-
-	ACNTLZD
-	ACNTLZDCC
-	ACMPW /* CMP with L=0 */
-	ACMPWU
-	ADIVD
-	ADIVDCC
-	ADIVDVCC
-	ADIVDV
-	ADIVDU
-	ADIVDUCC
-	ADIVDUVCC
-	ADIVDUV
-	AEXTSW
-	AEXTSWCC
-	/* AFCFIW; AFCFIWCC */
-	AFCFID
-	AFCFIDCC
-	AFCTID
-	AFCTIDCC
-	AFCTIDZ
-	AFCTIDZCC
-	ALDAR
-	AMOVD
-	AMOVDU
-	AMOVWZ
-	AMOVWZU
-	AMULHD
-	AMULHDCC
-	AMULHDU
-	AMULHDUCC
-	AMULLD
-	AMULLDCC
-	AMULLDVCC
-	AMULLDV
-	ARFID
-	ARLDMI
-	ARLDMICC
-	ARLDC
-	ARLDCCC
-	ARLDCR
-	ARLDCRCC
-	ARLDCL
-	ARLDCLCC
-	ASLBIA
-	ASLBIE
-	ASLBMFEE
-	ASLBMFEV
-	ASLBMTE
-	ASLD
-	ASLDCC
-	ASRD
-	ASRAD
-	ASRADCC
-	ASRDCC
-	ASTDCCC
-	ATD
-
-	/* 64-bit pseudo operation */
-	ADWORD
-	AREMD
-	AREMDCC
-	AREMDV
-	AREMDVCC
-	AREMDU
-	AREMDUCC
-	AREMDUV
-	AREMDUVCC
-
-	/* more 64-bit operations */
-	AHRFID
-
-	ALAST
-
-	// aliases
-	ABR = obj.AJMP
-	ABL = obj.ACALL
-)
diff --git a/src/cmd/internal/obj/ppc64/anames.go b/src/cmd/internal/obj/ppc64/anames.go
deleted file mode 100644
index 1ae7a52..0000000
--- a/src/cmd/internal/obj/ppc64/anames.go
+++ /dev/null
@@ -1,300 +0,0 @@
-// Generated by stringer -i a.out.go -o anames.go -p ppc64
-// Do not edit.
-
-package ppc64
-
-import "cmd/internal/obj"
-
-var Anames = []string{
-	obj.A_ARCHSPECIFIC: "ADD",
-	"ADDCC",
-	"ADDV",
-	"ADDVCC",
-	"ADDC",
-	"ADDCCC",
-	"ADDCV",
-	"ADDCVCC",
-	"ADDME",
-	"ADDMECC",
-	"ADDMEVCC",
-	"ADDMEV",
-	"ADDE",
-	"ADDECC",
-	"ADDEVCC",
-	"ADDEV",
-	"ADDZE",
-	"ADDZECC",
-	"ADDZEVCC",
-	"ADDZEV",
-	"AND",
-	"ANDCC",
-	"ANDN",
-	"ANDNCC",
-	"BC",
-	"BCL",
-	"BEQ",
-	"BGE",
-	"BGT",
-	"BLE",
-	"BLT",
-	"BNE",
-	"BVC",
-	"BVS",
-	"CMP",
-	"CMPU",
-	"CNTLZW",
-	"CNTLZWCC",
-	"CRAND",
-	"CRANDN",
-	"CREQV",
-	"CRNAND",
-	"CRNOR",
-	"CROR",
-	"CRORN",
-	"CRXOR",
-	"DIVW",
-	"DIVWCC",
-	"DIVWVCC",
-	"DIVWV",
-	"DIVWU",
-	"DIVWUCC",
-	"DIVWUVCC",
-	"DIVWUV",
-	"EQV",
-	"EQVCC",
-	"EXTSB",
-	"EXTSBCC",
-	"EXTSH",
-	"EXTSHCC",
-	"FABS",
-	"FABSCC",
-	"FADD",
-	"FADDCC",
-	"FADDS",
-	"FADDSCC",
-	"FCMPO",
-	"FCMPU",
-	"FCTIW",
-	"FCTIWCC",
-	"FCTIWZ",
-	"FCTIWZCC",
-	"FDIV",
-	"FDIVCC",
-	"FDIVS",
-	"FDIVSCC",
-	"FMADD",
-	"FMADDCC",
-	"FMADDS",
-	"FMADDSCC",
-	"FMOVD",
-	"FMOVDCC",
-	"FMOVDU",
-	"FMOVS",
-	"FMOVSU",
-	"FMSUB",
-	"FMSUBCC",
-	"FMSUBS",
-	"FMSUBSCC",
-	"FMUL",
-	"FMULCC",
-	"FMULS",
-	"FMULSCC",
-	"FNABS",
-	"FNABSCC",
-	"FNEG",
-	"FNEGCC",
-	"FNMADD",
-	"FNMADDCC",
-	"FNMADDS",
-	"FNMADDSCC",
-	"FNMSUB",
-	"FNMSUBCC",
-	"FNMSUBS",
-	"FNMSUBSCC",
-	"FRSP",
-	"FRSPCC",
-	"FSUB",
-	"FSUBCC",
-	"FSUBS",
-	"FSUBSCC",
-	"MOVMW",
-	"LSW",
-	"LWAR",
-	"MOVWBR",
-	"MOVB",
-	"MOVBU",
-	"MOVBZ",
-	"MOVBZU",
-	"MOVH",
-	"MOVHBR",
-	"MOVHU",
-	"MOVHZ",
-	"MOVHZU",
-	"MOVW",
-	"MOVWU",
-	"MOVFL",
-	"MOVCRFS",
-	"MTFSB0",
-	"MTFSB0CC",
-	"MTFSB1",
-	"MTFSB1CC",
-	"MULHW",
-	"MULHWCC",
-	"MULHWU",
-	"MULHWUCC",
-	"MULLW",
-	"MULLWCC",
-	"MULLWVCC",
-	"MULLWV",
-	"NAND",
-	"NANDCC",
-	"NEG",
-	"NEGCC",
-	"NEGVCC",
-	"NEGV",
-	"NOR",
-	"NORCC",
-	"OR",
-	"ORCC",
-	"ORN",
-	"ORNCC",
-	"REM",
-	"REMCC",
-	"REMV",
-	"REMVCC",
-	"REMU",
-	"REMUCC",
-	"REMUV",
-	"REMUVCC",
-	"RFI",
-	"RLWMI",
-	"RLWMICC",
-	"RLWNM",
-	"RLWNMCC",
-	"SLW",
-	"SLWCC",
-	"SRW",
-	"SRAW",
-	"SRAWCC",
-	"SRWCC",
-	"STSW",
-	"STWCCC",
-	"SUB",
-	"SUBCC",
-	"SUBVCC",
-	"SUBC",
-	"SUBCCC",
-	"SUBCV",
-	"SUBCVCC",
-	"SUBME",
-	"SUBMECC",
-	"SUBMEVCC",
-	"SUBMEV",
-	"SUBV",
-	"SUBE",
-	"SUBECC",
-	"SUBEV",
-	"SUBEVCC",
-	"SUBZE",
-	"SUBZECC",
-	"SUBZEVCC",
-	"SUBZEV",
-	"SYNC",
-	"XOR",
-	"XORCC",
-	"DCBF",
-	"DCBI",
-	"DCBST",
-	"DCBT",
-	"DCBTST",
-	"DCBZ",
-	"ECIWX",
-	"ECOWX",
-	"EIEIO",
-	"ICBI",
-	"ISYNC",
-	"PTESYNC",
-	"TLBIE",
-	"TLBIEL",
-	"TLBSYNC",
-	"TW",
-	"SYSCALL",
-	"WORD",
-	"RFCI",
-	"FRES",
-	"FRESCC",
-	"FRSQRTE",
-	"FRSQRTECC",
-	"FSEL",
-	"FSELCC",
-	"FSQRT",
-	"FSQRTCC",
-	"FSQRTS",
-	"FSQRTSCC",
-	"CNTLZD",
-	"CNTLZDCC",
-	"CMPW",
-	"CMPWU",
-	"DIVD",
-	"DIVDCC",
-	"DIVDVCC",
-	"DIVDV",
-	"DIVDU",
-	"DIVDUCC",
-	"DIVDUVCC",
-	"DIVDUV",
-	"EXTSW",
-	"EXTSWCC",
-	"FCFID",
-	"FCFIDCC",
-	"FCTID",
-	"FCTIDCC",
-	"FCTIDZ",
-	"FCTIDZCC",
-	"LDAR",
-	"MOVD",
-	"MOVDU",
-	"MOVWZ",
-	"MOVWZU",
-	"MULHD",
-	"MULHDCC",
-	"MULHDU",
-	"MULHDUCC",
-	"MULLD",
-	"MULLDCC",
-	"MULLDVCC",
-	"MULLDV",
-	"RFID",
-	"RLDMI",
-	"RLDMICC",
-	"RLDC",
-	"RLDCCC",
-	"RLDCR",
-	"RLDCRCC",
-	"RLDCL",
-	"RLDCLCC",
-	"SLBIA",
-	"SLBIE",
-	"SLBMFEE",
-	"SLBMFEV",
-	"SLBMTE",
-	"SLD",
-	"SLDCC",
-	"SRD",
-	"SRAD",
-	"SRADCC",
-	"SRDCC",
-	"STDCCC",
-	"TD",
-	"DWORD",
-	"REMD",
-	"REMDCC",
-	"REMDV",
-	"REMDVCC",
-	"REMDU",
-	"REMDUCC",
-	"REMDUV",
-	"REMDUVCC",
-	"HRFID",
-	"LAST",
-}
diff --git a/src/cmd/internal/obj/ppc64/anames9.go b/src/cmd/internal/obj/ppc64/anames9.go
deleted file mode 100644
index b48e516..0000000
--- a/src/cmd/internal/obj/ppc64/anames9.go
+++ /dev/null
@@ -1,40 +0,0 @@
-package ppc64
-
-var cnames9 = []string{
-	"NONE",
-	"REG",
-	"FREG",
-	"CREG",
-	"SPR",
-	"ZCON",
-	"SCON",
-	"UCON",
-	"ADDCON",
-	"ANDCON",
-	"LCON",
-	"DCON",
-	"SACON",
-	"SECON",
-	"LACON",
-	"LECON",
-	"DACON",
-	"SBRA",
-	"LBRA",
-	"SAUTO",
-	"LAUTO",
-	"SEXT",
-	"LEXT",
-	"ZOREG",
-	"SOREG",
-	"LOREG",
-	"FPSCR",
-	"MSR",
-	"XER",
-	"LR",
-	"CTR",
-	"ANY",
-	"GOK",
-	"ADDR",
-	"TEXTSIZE",
-	"NCLASS",
-}
diff --git a/src/cmd/internal/obj/ppc64/asm9.go b/src/cmd/internal/obj/ppc64/asm9.go
deleted file mode 100644
index 2955a00..0000000
--- a/src/cmd/internal/obj/ppc64/asm9.go
+++ /dev/null
@@ -1,3247 +0,0 @@
-// cmd/9l/optab.c, cmd/9l/asmout.c from Vita Nuova.
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2008 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2008 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package ppc64
-
-import (
-	"cmd/internal/obj"
-	"encoding/binary"
-	"fmt"
-	"log"
-	"sort"
-)
-
-// Instruction layout.
-
-const (
-	FuncAlign = 8
-)
-
-const (
-	r0iszero = 1
-)
-
-type Optab struct {
-	as    int16
-	a1    uint8
-	a2    uint8
-	a3    uint8
-	a4    uint8
-	type_ int8
-	size  int8
-	param int16
-}
-
-var optab = []Optab{
-	Optab{obj.ATEXT, C_LEXT, C_NONE, C_NONE, C_TEXTSIZE, 0, 0, 0},
-	Optab{obj.ATEXT, C_LEXT, C_NONE, C_LCON, C_TEXTSIZE, 0, 0, 0},
-	Optab{obj.ATEXT, C_ADDR, C_NONE, C_NONE, C_TEXTSIZE, 0, 0, 0},
-	Optab{obj.ATEXT, C_ADDR, C_NONE, C_LCON, C_TEXTSIZE, 0, 0, 0},
-	/* move register */
-	Optab{AMOVD, C_REG, C_NONE, C_NONE, C_REG, 1, 4, 0},
-	Optab{AMOVB, C_REG, C_NONE, C_NONE, C_REG, 12, 4, 0},
-	Optab{AMOVBZ, C_REG, C_NONE, C_NONE, C_REG, 13, 4, 0},
-	Optab{AMOVW, C_REG, C_NONE, C_NONE, C_REG, 12, 4, 0},
-	Optab{AMOVWZ, C_REG, C_NONE, C_NONE, C_REG, 13, 4, 0},
-	Optab{AADD, C_REG, C_REG, C_NONE, C_REG, 2, 4, 0},
-	Optab{AADD, C_REG, C_NONE, C_NONE, C_REG, 2, 4, 0},
-	Optab{AADD, C_ADDCON, C_REG, C_NONE, C_REG, 4, 4, 0},
-	Optab{AADD, C_ADDCON, C_NONE, C_NONE, C_REG, 4, 4, 0},
-	Optab{AADD, C_UCON, C_REG, C_NONE, C_REG, 20, 4, 0},
-	Optab{AADD, C_UCON, C_NONE, C_NONE, C_REG, 20, 4, 0},
-	Optab{AADD, C_LCON, C_REG, C_NONE, C_REG, 22, 12, 0},
-	Optab{AADD, C_LCON, C_NONE, C_NONE, C_REG, 22, 12, 0},
-	Optab{AADDC, C_REG, C_REG, C_NONE, C_REG, 2, 4, 0},
-	Optab{AADDC, C_REG, C_NONE, C_NONE, C_REG, 2, 4, 0},
-	Optab{AADDC, C_ADDCON, C_REG, C_NONE, C_REG, 4, 4, 0},
-	Optab{AADDC, C_ADDCON, C_NONE, C_NONE, C_REG, 4, 4, 0},
-	Optab{AADDC, C_LCON, C_REG, C_NONE, C_REG, 22, 12, 0},
-	Optab{AADDC, C_LCON, C_NONE, C_NONE, C_REG, 22, 12, 0},
-	Optab{AAND, C_REG, C_REG, C_NONE, C_REG, 6, 4, 0}, /* logical, no literal */
-	Optab{AAND, C_REG, C_NONE, C_NONE, C_REG, 6, 4, 0},
-	Optab{AANDCC, C_REG, C_REG, C_NONE, C_REG, 6, 4, 0},
-	Optab{AANDCC, C_REG, C_NONE, C_NONE, C_REG, 6, 4, 0},
-	Optab{AANDCC, C_ANDCON, C_NONE, C_NONE, C_REG, 58, 4, 0},
-	Optab{AANDCC, C_ANDCON, C_REG, C_NONE, C_REG, 58, 4, 0},
-	Optab{AANDCC, C_UCON, C_NONE, C_NONE, C_REG, 59, 4, 0},
-	Optab{AANDCC, C_UCON, C_REG, C_NONE, C_REG, 59, 4, 0},
-	Optab{AANDCC, C_LCON, C_NONE, C_NONE, C_REG, 23, 12, 0},
-	Optab{AANDCC, C_LCON, C_REG, C_NONE, C_REG, 23, 12, 0},
-	Optab{AMULLW, C_REG, C_REG, C_NONE, C_REG, 2, 4, 0},
-	Optab{AMULLW, C_REG, C_NONE, C_NONE, C_REG, 2, 4, 0},
-	Optab{AMULLW, C_ADDCON, C_REG, C_NONE, C_REG, 4, 4, 0},
-	Optab{AMULLW, C_ADDCON, C_NONE, C_NONE, C_REG, 4, 4, 0},
-	Optab{AMULLW, C_ANDCON, C_REG, C_NONE, C_REG, 4, 4, 0},
-	Optab{AMULLW, C_ANDCON, C_NONE, C_NONE, C_REG, 4, 4, 0},
-	Optab{AMULLW, C_LCON, C_REG, C_NONE, C_REG, 22, 12, 0},
-	Optab{AMULLW, C_LCON, C_NONE, C_NONE, C_REG, 22, 12, 0},
-	Optab{ASUBC, C_REG, C_REG, C_NONE, C_REG, 10, 4, 0},
-	Optab{ASUBC, C_REG, C_NONE, C_NONE, C_REG, 10, 4, 0},
-	Optab{ASUBC, C_REG, C_NONE, C_ADDCON, C_REG, 27, 4, 0},
-	Optab{ASUBC, C_REG, C_NONE, C_LCON, C_REG, 28, 12, 0},
-	Optab{AOR, C_REG, C_REG, C_NONE, C_REG, 6, 4, 0}, /* logical, literal not cc (or/xor) */
-	Optab{AOR, C_REG, C_NONE, C_NONE, C_REG, 6, 4, 0},
-	Optab{AOR, C_ANDCON, C_NONE, C_NONE, C_REG, 58, 4, 0},
-	Optab{AOR, C_ANDCON, C_REG, C_NONE, C_REG, 58, 4, 0},
-	Optab{AOR, C_UCON, C_NONE, C_NONE, C_REG, 59, 4, 0},
-	Optab{AOR, C_UCON, C_REG, C_NONE, C_REG, 59, 4, 0},
-	Optab{AOR, C_LCON, C_NONE, C_NONE, C_REG, 23, 12, 0},
-	Optab{AOR, C_LCON, C_REG, C_NONE, C_REG, 23, 12, 0},
-	Optab{ADIVW, C_REG, C_REG, C_NONE, C_REG, 2, 4, 0}, /* op r1[,r2],r3 */
-	Optab{ADIVW, C_REG, C_NONE, C_NONE, C_REG, 2, 4, 0},
-	Optab{ASUB, C_REG, C_REG, C_NONE, C_REG, 10, 4, 0}, /* op r2[,r1],r3 */
-	Optab{ASUB, C_REG, C_NONE, C_NONE, C_REG, 10, 4, 0},
-	Optab{ASLW, C_REG, C_NONE, C_NONE, C_REG, 6, 4, 0},
-	Optab{ASLW, C_REG, C_REG, C_NONE, C_REG, 6, 4, 0},
-	Optab{ASLD, C_REG, C_NONE, C_NONE, C_REG, 6, 4, 0},
-	Optab{ASLD, C_REG, C_REG, C_NONE, C_REG, 6, 4, 0},
-	Optab{ASLD, C_SCON, C_REG, C_NONE, C_REG, 25, 4, 0},
-	Optab{ASLD, C_SCON, C_NONE, C_NONE, C_REG, 25, 4, 0},
-	Optab{ASLW, C_SCON, C_REG, C_NONE, C_REG, 57, 4, 0},
-	Optab{ASLW, C_SCON, C_NONE, C_NONE, C_REG, 57, 4, 0},
-	Optab{ASRAW, C_REG, C_NONE, C_NONE, C_REG, 6, 4, 0},
-	Optab{ASRAW, C_REG, C_REG, C_NONE, C_REG, 6, 4, 0},
-	Optab{ASRAW, C_SCON, C_REG, C_NONE, C_REG, 56, 4, 0},
-	Optab{ASRAW, C_SCON, C_NONE, C_NONE, C_REG, 56, 4, 0},
-	Optab{ASRAD, C_REG, C_NONE, C_NONE, C_REG, 6, 4, 0},
-	Optab{ASRAD, C_REG, C_REG, C_NONE, C_REG, 6, 4, 0},
-	Optab{ASRAD, C_SCON, C_REG, C_NONE, C_REG, 56, 4, 0},
-	Optab{ASRAD, C_SCON, C_NONE, C_NONE, C_REG, 56, 4, 0},
-	Optab{ARLWMI, C_SCON, C_REG, C_LCON, C_REG, 62, 4, 0},
-	Optab{ARLWMI, C_REG, C_REG, C_LCON, C_REG, 63, 4, 0},
-	Optab{ARLDMI, C_SCON, C_REG, C_LCON, C_REG, 30, 4, 0},
-	Optab{ARLDC, C_SCON, C_REG, C_LCON, C_REG, 29, 4, 0},
-	Optab{ARLDCL, C_SCON, C_REG, C_LCON, C_REG, 29, 4, 0},
-	Optab{ARLDCL, C_REG, C_REG, C_LCON, C_REG, 14, 4, 0},
-	Optab{ARLDCL, C_REG, C_NONE, C_LCON, C_REG, 14, 4, 0},
-	Optab{AFADD, C_FREG, C_NONE, C_NONE, C_FREG, 2, 4, 0},
-	Optab{AFADD, C_FREG, C_REG, C_NONE, C_FREG, 2, 4, 0},
-	Optab{AFABS, C_FREG, C_NONE, C_NONE, C_FREG, 33, 4, 0},
-	Optab{AFABS, C_NONE, C_NONE, C_NONE, C_FREG, 33, 4, 0},
-	Optab{AFMOVD, C_FREG, C_NONE, C_NONE, C_FREG, 33, 4, 0},
-	Optab{AFMADD, C_FREG, C_REG, C_FREG, C_FREG, 34, 4, 0},
-	Optab{AFMUL, C_FREG, C_NONE, C_NONE, C_FREG, 32, 4, 0},
-	Optab{AFMUL, C_FREG, C_REG, C_NONE, C_FREG, 32, 4, 0},
-
-	/* store, short offset */
-	Optab{AMOVD, C_REG, C_REG, C_NONE, C_ZOREG, 7, 4, REGZERO},
-	Optab{AMOVW, C_REG, C_REG, C_NONE, C_ZOREG, 7, 4, REGZERO},
-	Optab{AMOVWZ, C_REG, C_REG, C_NONE, C_ZOREG, 7, 4, REGZERO},
-	Optab{AMOVBZ, C_REG, C_REG, C_NONE, C_ZOREG, 7, 4, REGZERO},
-	Optab{AMOVBZU, C_REG, C_REG, C_NONE, C_ZOREG, 7, 4, REGZERO},
-	Optab{AMOVB, C_REG, C_REG, C_NONE, C_ZOREG, 7, 4, REGZERO},
-	Optab{AMOVBU, C_REG, C_REG, C_NONE, C_ZOREG, 7, 4, REGZERO},
-	Optab{AMOVD, C_REG, C_NONE, C_NONE, C_SEXT, 7, 4, REGSB},
-	Optab{AMOVW, C_REG, C_NONE, C_NONE, C_SEXT, 7, 4, REGSB},
-	Optab{AMOVWZ, C_REG, C_NONE, C_NONE, C_SEXT, 7, 4, REGSB},
-	Optab{AMOVBZ, C_REG, C_NONE, C_NONE, C_SEXT, 7, 4, REGSB},
-	Optab{AMOVB, C_REG, C_NONE, C_NONE, C_SEXT, 7, 4, REGSB},
-	Optab{AMOVD, C_REG, C_NONE, C_NONE, C_SAUTO, 7, 4, REGSP},
-	Optab{AMOVW, C_REG, C_NONE, C_NONE, C_SAUTO, 7, 4, REGSP},
-	Optab{AMOVWZ, C_REG, C_NONE, C_NONE, C_SAUTO, 7, 4, REGSP},
-	Optab{AMOVBZ, C_REG, C_NONE, C_NONE, C_SAUTO, 7, 4, REGSP},
-	Optab{AMOVB, C_REG, C_NONE, C_NONE, C_SAUTO, 7, 4, REGSP},
-	Optab{AMOVD, C_REG, C_NONE, C_NONE, C_SOREG, 7, 4, REGZERO},
-	Optab{AMOVW, C_REG, C_NONE, C_NONE, C_SOREG, 7, 4, REGZERO},
-	Optab{AMOVWZ, C_REG, C_NONE, C_NONE, C_SOREG, 7, 4, REGZERO},
-	Optab{AMOVBZ, C_REG, C_NONE, C_NONE, C_SOREG, 7, 4, REGZERO},
-	Optab{AMOVBZU, C_REG, C_NONE, C_NONE, C_SOREG, 7, 4, REGZERO},
-	Optab{AMOVB, C_REG, C_NONE, C_NONE, C_SOREG, 7, 4, REGZERO},
-	Optab{AMOVBU, C_REG, C_NONE, C_NONE, C_SOREG, 7, 4, REGZERO},
-
-	/* load, short offset */
-	Optab{AMOVD, C_ZOREG, C_REG, C_NONE, C_REG, 8, 4, REGZERO},
-	Optab{AMOVW, C_ZOREG, C_REG, C_NONE, C_REG, 8, 4, REGZERO},
-	Optab{AMOVWZ, C_ZOREG, C_REG, C_NONE, C_REG, 8, 4, REGZERO},
-	Optab{AMOVBZ, C_ZOREG, C_REG, C_NONE, C_REG, 8, 4, REGZERO},
-	Optab{AMOVBZU, C_ZOREG, C_REG, C_NONE, C_REG, 8, 4, REGZERO},
-	Optab{AMOVB, C_ZOREG, C_REG, C_NONE, C_REG, 9, 8, REGZERO},
-	Optab{AMOVBU, C_ZOREG, C_REG, C_NONE, C_REG, 9, 8, REGZERO},
-	Optab{AMOVD, C_SEXT, C_NONE, C_NONE, C_REG, 8, 4, REGSB},
-	Optab{AMOVW, C_SEXT, C_NONE, C_NONE, C_REG, 8, 4, REGSB},
-	Optab{AMOVWZ, C_SEXT, C_NONE, C_NONE, C_REG, 8, 4, REGSB},
-	Optab{AMOVBZ, C_SEXT, C_NONE, C_NONE, C_REG, 8, 4, REGSB},
-	Optab{AMOVB, C_SEXT, C_NONE, C_NONE, C_REG, 9, 8, REGSB},
-	Optab{AMOVD, C_SAUTO, C_NONE, C_NONE, C_REG, 8, 4, REGSP},
-	Optab{AMOVW, C_SAUTO, C_NONE, C_NONE, C_REG, 8, 4, REGSP},
-	Optab{AMOVWZ, C_SAUTO, C_NONE, C_NONE, C_REG, 8, 4, REGSP},
-	Optab{AMOVBZ, C_SAUTO, C_NONE, C_NONE, C_REG, 8, 4, REGSP},
-	Optab{AMOVB, C_SAUTO, C_NONE, C_NONE, C_REG, 9, 8, REGSP},
-	Optab{AMOVD, C_SOREG, C_NONE, C_NONE, C_REG, 8, 4, REGZERO},
-	Optab{AMOVW, C_SOREG, C_NONE, C_NONE, C_REG, 8, 4, REGZERO},
-	Optab{AMOVWZ, C_SOREG, C_NONE, C_NONE, C_REG, 8, 4, REGZERO},
-	Optab{AMOVBZ, C_SOREG, C_NONE, C_NONE, C_REG, 8, 4, REGZERO},
-	Optab{AMOVBZU, C_SOREG, C_NONE, C_NONE, C_REG, 8, 4, REGZERO},
-	Optab{AMOVB, C_SOREG, C_NONE, C_NONE, C_REG, 9, 8, REGZERO},
-	Optab{AMOVBU, C_SOREG, C_NONE, C_NONE, C_REG, 9, 8, REGZERO},
-
-	/* store, long offset */
-	Optab{AMOVD, C_REG, C_NONE, C_NONE, C_LEXT, 35, 8, REGSB},
-	Optab{AMOVW, C_REG, C_NONE, C_NONE, C_LEXT, 35, 8, REGSB},
-	Optab{AMOVWZ, C_REG, C_NONE, C_NONE, C_LEXT, 35, 8, REGSB},
-	Optab{AMOVBZ, C_REG, C_NONE, C_NONE, C_LEXT, 35, 8, REGSB},
-	Optab{AMOVB, C_REG, C_NONE, C_NONE, C_LEXT, 35, 8, REGSB},
-	Optab{AMOVD, C_REG, C_NONE, C_NONE, C_LAUTO, 35, 8, REGSP},
-	Optab{AMOVW, C_REG, C_NONE, C_NONE, C_LAUTO, 35, 8, REGSP},
-	Optab{AMOVWZ, C_REG, C_NONE, C_NONE, C_LAUTO, 35, 8, REGSP},
-	Optab{AMOVBZ, C_REG, C_NONE, C_NONE, C_LAUTO, 35, 8, REGSP},
-	Optab{AMOVB, C_REG, C_NONE, C_NONE, C_LAUTO, 35, 8, REGSP},
-	Optab{AMOVD, C_REG, C_NONE, C_NONE, C_LOREG, 35, 8, REGZERO},
-	Optab{AMOVW, C_REG, C_NONE, C_NONE, C_LOREG, 35, 8, REGZERO},
-	Optab{AMOVWZ, C_REG, C_NONE, C_NONE, C_LOREG, 35, 8, REGZERO},
-	Optab{AMOVBZ, C_REG, C_NONE, C_NONE, C_LOREG, 35, 8, REGZERO},
-	Optab{AMOVB, C_REG, C_NONE, C_NONE, C_LOREG, 35, 8, REGZERO},
-	Optab{AMOVD, C_REG, C_NONE, C_NONE, C_ADDR, 74, 8, 0},
-	Optab{AMOVW, C_REG, C_NONE, C_NONE, C_ADDR, 74, 8, 0},
-	Optab{AMOVWZ, C_REG, C_NONE, C_NONE, C_ADDR, 74, 8, 0},
-	Optab{AMOVBZ, C_REG, C_NONE, C_NONE, C_ADDR, 74, 8, 0},
-	Optab{AMOVB, C_REG, C_NONE, C_NONE, C_ADDR, 74, 8, 0},
-
-	/* load, long offset */
-	Optab{AMOVD, C_LEXT, C_NONE, C_NONE, C_REG, 36, 8, REGSB},
-	Optab{AMOVW, C_LEXT, C_NONE, C_NONE, C_REG, 36, 8, REGSB},
-	Optab{AMOVWZ, C_LEXT, C_NONE, C_NONE, C_REG, 36, 8, REGSB},
-	Optab{AMOVBZ, C_LEXT, C_NONE, C_NONE, C_REG, 36, 8, REGSB},
-	Optab{AMOVB, C_LEXT, C_NONE, C_NONE, C_REG, 37, 12, REGSB},
-	Optab{AMOVD, C_LAUTO, C_NONE, C_NONE, C_REG, 36, 8, REGSP},
-	Optab{AMOVW, C_LAUTO, C_NONE, C_NONE, C_REG, 36, 8, REGSP},
-	Optab{AMOVWZ, C_LAUTO, C_NONE, C_NONE, C_REG, 36, 8, REGSP},
-	Optab{AMOVBZ, C_LAUTO, C_NONE, C_NONE, C_REG, 36, 8, REGSP},
-	Optab{AMOVB, C_LAUTO, C_NONE, C_NONE, C_REG, 37, 12, REGSP},
-	Optab{AMOVD, C_LOREG, C_NONE, C_NONE, C_REG, 36, 8, REGZERO},
-	Optab{AMOVW, C_LOREG, C_NONE, C_NONE, C_REG, 36, 8, REGZERO},
-	Optab{AMOVWZ, C_LOREG, C_NONE, C_NONE, C_REG, 36, 8, REGZERO},
-	Optab{AMOVBZ, C_LOREG, C_NONE, C_NONE, C_REG, 36, 8, REGZERO},
-	Optab{AMOVB, C_LOREG, C_NONE, C_NONE, C_REG, 37, 12, REGZERO},
-	Optab{AMOVD, C_ADDR, C_NONE, C_NONE, C_REG, 75, 8, 0},
-	Optab{AMOVW, C_ADDR, C_NONE, C_NONE, C_REG, 75, 8, 0},
-	Optab{AMOVWZ, C_ADDR, C_NONE, C_NONE, C_REG, 75, 8, 0},
-	Optab{AMOVBZ, C_ADDR, C_NONE, C_NONE, C_REG, 75, 8, 0},
-	Optab{AMOVB, C_ADDR, C_NONE, C_NONE, C_REG, 76, 12, 0},
-
-	/* load constant */
-	Optab{AMOVD, C_SECON, C_NONE, C_NONE, C_REG, 3, 4, REGSB},
-	Optab{AMOVD, C_SACON, C_NONE, C_NONE, C_REG, 3, 4, REGSP},
-	Optab{AMOVD, C_LECON, C_NONE, C_NONE, C_REG, 26, 8, REGSB},
-	Optab{AMOVD, C_LACON, C_NONE, C_NONE, C_REG, 26, 8, REGSP},
-	Optab{AMOVD, C_ADDCON, C_NONE, C_NONE, C_REG, 3, 4, REGZERO},
-	Optab{AMOVW, C_SECON, C_NONE, C_NONE, C_REG, 3, 4, REGSB}, /* TO DO: check */
-	Optab{AMOVW, C_SACON, C_NONE, C_NONE, C_REG, 3, 4, REGSP},
-	Optab{AMOVW, C_LECON, C_NONE, C_NONE, C_REG, 26, 8, REGSB},
-	Optab{AMOVW, C_LACON, C_NONE, C_NONE, C_REG, 26, 8, REGSP},
-	Optab{AMOVW, C_ADDCON, C_NONE, C_NONE, C_REG, 3, 4, REGZERO},
-	Optab{AMOVWZ, C_SECON, C_NONE, C_NONE, C_REG, 3, 4, REGSB}, /* TO DO: check */
-	Optab{AMOVWZ, C_SACON, C_NONE, C_NONE, C_REG, 3, 4, REGSP},
-	Optab{AMOVWZ, C_LECON, C_NONE, C_NONE, C_REG, 26, 8, REGSB},
-	Optab{AMOVWZ, C_LACON, C_NONE, C_NONE, C_REG, 26, 8, REGSP},
-	Optab{AMOVWZ, C_ADDCON, C_NONE, C_NONE, C_REG, 3, 4, REGZERO},
-
-	/* load unsigned/long constants (TO DO: check) */
-	Optab{AMOVD, C_UCON, C_NONE, C_NONE, C_REG, 3, 4, REGZERO},
-	Optab{AMOVD, C_LCON, C_NONE, C_NONE, C_REG, 19, 8, 0},
-	Optab{AMOVW, C_UCON, C_NONE, C_NONE, C_REG, 3, 4, REGZERO},
-	Optab{AMOVW, C_LCON, C_NONE, C_NONE, C_REG, 19, 8, 0},
-	Optab{AMOVWZ, C_UCON, C_NONE, C_NONE, C_REG, 3, 4, REGZERO},
-	Optab{AMOVWZ, C_LCON, C_NONE, C_NONE, C_REG, 19, 8, 0},
-	Optab{AMOVHBR, C_ZOREG, C_REG, C_NONE, C_REG, 45, 4, 0},
-	Optab{AMOVHBR, C_ZOREG, C_NONE, C_NONE, C_REG, 45, 4, 0},
-	Optab{AMOVHBR, C_REG, C_REG, C_NONE, C_ZOREG, 44, 4, 0},
-	Optab{AMOVHBR, C_REG, C_NONE, C_NONE, C_ZOREG, 44, 4, 0},
-	Optab{ASYSCALL, C_NONE, C_NONE, C_NONE, C_NONE, 5, 4, 0},
-	Optab{ASYSCALL, C_REG, C_NONE, C_NONE, C_NONE, 77, 12, 0},
-	Optab{ASYSCALL, C_SCON, C_NONE, C_NONE, C_NONE, 77, 12, 0},
-	Optab{ABEQ, C_NONE, C_NONE, C_NONE, C_SBRA, 16, 4, 0},
-	Optab{ABEQ, C_CREG, C_NONE, C_NONE, C_SBRA, 16, 4, 0},
-	Optab{ABR, C_NONE, C_NONE, C_NONE, C_LBRA, 11, 4, 0},
-	Optab{ABC, C_SCON, C_REG, C_NONE, C_SBRA, 16, 4, 0},
-	Optab{ABC, C_SCON, C_REG, C_NONE, C_LBRA, 17, 4, 0},
-	Optab{ABR, C_NONE, C_NONE, C_NONE, C_LR, 18, 4, 0},
-	Optab{ABR, C_NONE, C_NONE, C_NONE, C_CTR, 18, 4, 0},
-	Optab{ABR, C_REG, C_NONE, C_NONE, C_CTR, 18, 4, 0},
-	Optab{ABR, C_NONE, C_NONE, C_NONE, C_ZOREG, 15, 8, 0},
-	Optab{ABC, C_NONE, C_REG, C_NONE, C_LR, 18, 4, 0},
-	Optab{ABC, C_NONE, C_REG, C_NONE, C_CTR, 18, 4, 0},
-	Optab{ABC, C_SCON, C_REG, C_NONE, C_LR, 18, 4, 0},
-	Optab{ABC, C_SCON, C_REG, C_NONE, C_CTR, 18, 4, 0},
-	Optab{ABC, C_NONE, C_NONE, C_NONE, C_ZOREG, 15, 8, 0},
-	Optab{AFMOVD, C_SEXT, C_NONE, C_NONE, C_FREG, 8, 4, REGSB},
-	Optab{AFMOVD, C_SAUTO, C_NONE, C_NONE, C_FREG, 8, 4, REGSP},
-	Optab{AFMOVD, C_SOREG, C_NONE, C_NONE, C_FREG, 8, 4, REGZERO},
-	Optab{AFMOVD, C_LEXT, C_NONE, C_NONE, C_FREG, 36, 8, REGSB},
-	Optab{AFMOVD, C_LAUTO, C_NONE, C_NONE, C_FREG, 36, 8, REGSP},
-	Optab{AFMOVD, C_LOREG, C_NONE, C_NONE, C_FREG, 36, 8, REGZERO},
-	Optab{AFMOVD, C_ADDR, C_NONE, C_NONE, C_FREG, 75, 8, 0},
-	Optab{AFMOVD, C_FREG, C_NONE, C_NONE, C_SEXT, 7, 4, REGSB},
-	Optab{AFMOVD, C_FREG, C_NONE, C_NONE, C_SAUTO, 7, 4, REGSP},
-	Optab{AFMOVD, C_FREG, C_NONE, C_NONE, C_SOREG, 7, 4, REGZERO},
-	Optab{AFMOVD, C_FREG, C_NONE, C_NONE, C_LEXT, 35, 8, REGSB},
-	Optab{AFMOVD, C_FREG, C_NONE, C_NONE, C_LAUTO, 35, 8, REGSP},
-	Optab{AFMOVD, C_FREG, C_NONE, C_NONE, C_LOREG, 35, 8, REGZERO},
-	Optab{AFMOVD, C_FREG, C_NONE, C_NONE, C_ADDR, 74, 8, 0},
-	Optab{ASYNC, C_NONE, C_NONE, C_NONE, C_NONE, 46, 4, 0},
-	Optab{AWORD, C_LCON, C_NONE, C_NONE, C_NONE, 40, 4, 0},
-	Optab{ADWORD, C_LCON, C_NONE, C_NONE, C_NONE, 31, 8, 0},
-	Optab{ADWORD, C_DCON, C_NONE, C_NONE, C_NONE, 31, 8, 0},
-	Optab{AADDME, C_REG, C_NONE, C_NONE, C_REG, 47, 4, 0},
-	Optab{AEXTSB, C_REG, C_NONE, C_NONE, C_REG, 48, 4, 0},
-	Optab{AEXTSB, C_NONE, C_NONE, C_NONE, C_REG, 48, 4, 0},
-	Optab{ANEG, C_REG, C_NONE, C_NONE, C_REG, 47, 4, 0},
-	Optab{ANEG, C_NONE, C_NONE, C_NONE, C_REG, 47, 4, 0},
-	Optab{AREM, C_REG, C_NONE, C_NONE, C_REG, 50, 12, 0},
-	Optab{AREM, C_REG, C_REG, C_NONE, C_REG, 50, 12, 0},
-	Optab{AREMU, C_REG, C_NONE, C_NONE, C_REG, 50, 16, 0},
-	Optab{AREMU, C_REG, C_REG, C_NONE, C_REG, 50, 16, 0},
-	Optab{AREMD, C_REG, C_NONE, C_NONE, C_REG, 51, 12, 0},
-	Optab{AREMD, C_REG, C_REG, C_NONE, C_REG, 51, 12, 0},
-	Optab{AREMDU, C_REG, C_NONE, C_NONE, C_REG, 51, 12, 0},
-	Optab{AREMDU, C_REG, C_REG, C_NONE, C_REG, 51, 12, 0},
-	Optab{AMTFSB0, C_SCON, C_NONE, C_NONE, C_NONE, 52, 4, 0},
-	Optab{AMOVFL, C_FPSCR, C_NONE, C_NONE, C_FREG, 53, 4, 0},
-	Optab{AMOVFL, C_FREG, C_NONE, C_NONE, C_FPSCR, 64, 4, 0},
-	Optab{AMOVFL, C_FREG, C_NONE, C_LCON, C_FPSCR, 64, 4, 0},
-	Optab{AMOVFL, C_LCON, C_NONE, C_NONE, C_FPSCR, 65, 4, 0},
-	Optab{AMOVD, C_MSR, C_NONE, C_NONE, C_REG, 54, 4, 0},  /* mfmsr */
-	Optab{AMOVD, C_REG, C_NONE, C_NONE, C_MSR, 54, 4, 0},  /* mtmsrd */
-	Optab{AMOVWZ, C_REG, C_NONE, C_NONE, C_MSR, 54, 4, 0}, /* mtmsr */
-
-	/* 64-bit special registers */
-	Optab{AMOVD, C_REG, C_NONE, C_NONE, C_SPR, 66, 4, 0},
-	Optab{AMOVD, C_REG, C_NONE, C_NONE, C_LR, 66, 4, 0},
-	Optab{AMOVD, C_REG, C_NONE, C_NONE, C_CTR, 66, 4, 0},
-	Optab{AMOVD, C_REG, C_NONE, C_NONE, C_XER, 66, 4, 0},
-	Optab{AMOVD, C_SPR, C_NONE, C_NONE, C_REG, 66, 4, 0},
-	Optab{AMOVD, C_LR, C_NONE, C_NONE, C_REG, 66, 4, 0},
-	Optab{AMOVD, C_CTR, C_NONE, C_NONE, C_REG, 66, 4, 0},
-	Optab{AMOVD, C_XER, C_NONE, C_NONE, C_REG, 66, 4, 0},
-
-	/* 32-bit special registers (gloss over sign-extension or not?) */
-	Optab{AMOVW, C_REG, C_NONE, C_NONE, C_SPR, 66, 4, 0},
-	Optab{AMOVW, C_REG, C_NONE, C_NONE, C_CTR, 66, 4, 0},
-	Optab{AMOVW, C_REG, C_NONE, C_NONE, C_XER, 66, 4, 0},
-	Optab{AMOVW, C_SPR, C_NONE, C_NONE, C_REG, 66, 4, 0},
-	Optab{AMOVW, C_XER, C_NONE, C_NONE, C_REG, 66, 4, 0},
-	Optab{AMOVWZ, C_REG, C_NONE, C_NONE, C_SPR, 66, 4, 0},
-	Optab{AMOVWZ, C_REG, C_NONE, C_NONE, C_CTR, 66, 4, 0},
-	Optab{AMOVWZ, C_REG, C_NONE, C_NONE, C_XER, 66, 4, 0},
-	Optab{AMOVWZ, C_SPR, C_NONE, C_NONE, C_REG, 66, 4, 0},
-	Optab{AMOVWZ, C_XER, C_NONE, C_NONE, C_REG, 66, 4, 0},
-	Optab{AMOVFL, C_FPSCR, C_NONE, C_NONE, C_CREG, 73, 4, 0},
-	Optab{AMOVFL, C_CREG, C_NONE, C_NONE, C_CREG, 67, 4, 0},
-	Optab{AMOVW, C_CREG, C_NONE, C_NONE, C_REG, 68, 4, 0},
-	Optab{AMOVWZ, C_CREG, C_NONE, C_NONE, C_REG, 68, 4, 0},
-	Optab{AMOVFL, C_REG, C_NONE, C_LCON, C_CREG, 69, 4, 0},
-	Optab{AMOVFL, C_REG, C_NONE, C_NONE, C_CREG, 69, 4, 0},
-	Optab{AMOVW, C_REG, C_NONE, C_NONE, C_CREG, 69, 4, 0},
-	Optab{AMOVWZ, C_REG, C_NONE, C_NONE, C_CREG, 69, 4, 0},
-	Optab{ACMP, C_REG, C_NONE, C_NONE, C_REG, 70, 4, 0},
-	Optab{ACMP, C_REG, C_REG, C_NONE, C_REG, 70, 4, 0},
-	Optab{ACMP, C_REG, C_NONE, C_NONE, C_ADDCON, 71, 4, 0},
-	Optab{ACMP, C_REG, C_REG, C_NONE, C_ADDCON, 71, 4, 0},
-	Optab{ACMPU, C_REG, C_NONE, C_NONE, C_REG, 70, 4, 0},
-	Optab{ACMPU, C_REG, C_REG, C_NONE, C_REG, 70, 4, 0},
-	Optab{ACMPU, C_REG, C_NONE, C_NONE, C_ANDCON, 71, 4, 0},
-	Optab{ACMPU, C_REG, C_REG, C_NONE, C_ANDCON, 71, 4, 0},
-	Optab{AFCMPO, C_FREG, C_NONE, C_NONE, C_FREG, 70, 4, 0},
-	Optab{AFCMPO, C_FREG, C_REG, C_NONE, C_FREG, 70, 4, 0},
-	Optab{ATW, C_LCON, C_REG, C_NONE, C_REG, 60, 4, 0},
-	Optab{ATW, C_LCON, C_REG, C_NONE, C_ADDCON, 61, 4, 0},
-	Optab{ADCBF, C_ZOREG, C_NONE, C_NONE, C_NONE, 43, 4, 0},
-	Optab{ADCBF, C_ZOREG, C_REG, C_NONE, C_NONE, 43, 4, 0},
-	Optab{AECOWX, C_REG, C_REG, C_NONE, C_ZOREG, 44, 4, 0},
-	Optab{AECIWX, C_ZOREG, C_REG, C_NONE, C_REG, 45, 4, 0},
-	Optab{AECOWX, C_REG, C_NONE, C_NONE, C_ZOREG, 44, 4, 0},
-	Optab{AECIWX, C_ZOREG, C_NONE, C_NONE, C_REG, 45, 4, 0},
-	Optab{AEIEIO, C_NONE, C_NONE, C_NONE, C_NONE, 46, 4, 0},
-	Optab{ATLBIE, C_REG, C_NONE, C_NONE, C_NONE, 49, 4, 0},
-	Optab{ATLBIE, C_SCON, C_NONE, C_NONE, C_REG, 49, 4, 0},
-	Optab{ASLBMFEE, C_REG, C_NONE, C_NONE, C_REG, 55, 4, 0},
-	Optab{ASLBMTE, C_REG, C_NONE, C_NONE, C_REG, 55, 4, 0},
-	Optab{ASTSW, C_REG, C_NONE, C_NONE, C_ZOREG, 44, 4, 0},
-	Optab{ASTSW, C_REG, C_NONE, C_LCON, C_ZOREG, 41, 4, 0},
-	Optab{ALSW, C_ZOREG, C_NONE, C_NONE, C_REG, 45, 4, 0},
-	Optab{ALSW, C_ZOREG, C_NONE, C_LCON, C_REG, 42, 4, 0},
-	Optab{obj.AUNDEF, C_NONE, C_NONE, C_NONE, C_NONE, 78, 4, 0},
-	Optab{obj.AUSEFIELD, C_ADDR, C_NONE, C_NONE, C_NONE, 0, 0, 0},
-	Optab{obj.APCDATA, C_LCON, C_NONE, C_NONE, C_LCON, 0, 0, 0},
-	Optab{obj.AFUNCDATA, C_SCON, C_NONE, C_NONE, C_ADDR, 0, 0, 0},
-	Optab{obj.ANOP, C_NONE, C_NONE, C_NONE, C_NONE, 0, 0, 0},
-	Optab{obj.ADUFFZERO, C_NONE, C_NONE, C_NONE, C_LBRA, 11, 4, 0}, // same as ABR/ABL
-	Optab{obj.ADUFFCOPY, C_NONE, C_NONE, C_NONE, C_LBRA, 11, 4, 0}, // same as ABR/ABL
-
-	Optab{obj.AXXX, C_NONE, C_NONE, C_NONE, C_NONE, 0, 4, 0},
-}
-
-type Oprang struct {
-	start []Optab
-	stop  []Optab
-}
-
-var oprange [ALAST & obj.AMask]Oprang
-
-var xcmp [C_NCLASS][C_NCLASS]uint8
-
-func span9(ctxt *obj.Link, cursym *obj.LSym) {
-	p := cursym.Text
-	if p == nil || p.Link == nil { // handle external functions and ELF section symbols
-		return
-	}
-	ctxt.Cursym = cursym
-	ctxt.Autosize = int32(p.To.Offset + 8)
-
-	if oprange[AANDN&obj.AMask].start == nil {
-		buildop(ctxt)
-	}
-
-	c := int64(0)
-	p.Pc = c
-
-	var m int
-	var o *Optab
-	for p = p.Link; p != nil; p = p.Link {
-		ctxt.Curp = p
-		p.Pc = c
-		o = oplook(ctxt, p)
-		m = int(o.size)
-		if m == 0 {
-			if p.As != obj.ANOP && p.As != obj.AFUNCDATA && p.As != obj.APCDATA {
-				ctxt.Diag("zero-width instruction\n%v", p)
-			}
-			continue
-		}
-
-		c += int64(m)
-	}
-
-	cursym.Size = c
-
-	/*
-	 * if any procedure is large enough to
-	 * generate a large SBRA branch, then
-	 * generate extra passes putting branches
-	 * around jmps to fix. this is rare.
-	 */
-	bflag := 1
-
-	var otxt int64
-	var q *obj.Prog
-	for bflag != 0 {
-		if ctxt.Debugvlog != 0 {
-			fmt.Fprintf(ctxt.Bso, "%5.2f span1\n", obj.Cputime())
-		}
-		bflag = 0
-		c = 0
-		for p = cursym.Text.Link; p != nil; p = p.Link {
-			p.Pc = c
-			o = oplook(ctxt, p)
-
-			// very large conditional branches
-			if (o.type_ == 16 || o.type_ == 17) && p.Pcond != nil {
-				otxt = p.Pcond.Pc - c
-				if otxt < -(1<<15)+10 || otxt >= (1<<15)-10 {
-					q = ctxt.NewProg()
-					q.Link = p.Link
-					p.Link = q
-					q.As = ABR
-					q.To.Type = obj.TYPE_BRANCH
-					q.Pcond = p.Pcond
-					p.Pcond = q
-					q = ctxt.NewProg()
-					q.Link = p.Link
-					p.Link = q
-					q.As = ABR
-					q.To.Type = obj.TYPE_BRANCH
-					q.Pcond = q.Link.Link
-
-					//addnop(p->link);
-					//addnop(p);
-					bflag = 1
-				}
-			}
-
-			m = int(o.size)
-			if m == 0 {
-				if p.As != obj.ANOP && p.As != obj.AFUNCDATA && p.As != obj.APCDATA {
-					ctxt.Diag("zero-width instruction\n%v", p)
-				}
-				continue
-			}
-
-			c += int64(m)
-		}
-
-		cursym.Size = c
-	}
-
-	c += -c & (FuncAlign - 1)
-	cursym.Size = c
-
-	/*
-	 * lay out the code, emitting code and data relocations.
-	 */
-	if ctxt.Tlsg == nil {
-		ctxt.Tlsg = obj.Linklookup(ctxt, "runtime.tlsg", 0)
-	}
-
-	obj.Symgrow(ctxt, cursym, cursym.Size)
-
-	bp := cursym.P
-	var i int32
-	var out [6]uint32
-	for p := cursym.Text.Link; p != nil; p = p.Link {
-		ctxt.Pc = p.Pc
-		ctxt.Curp = p
-		o = oplook(ctxt, p)
-		if int(o.size) > 4*len(out) {
-			log.Fatalf("out array in span9 is too small, need at least %d for %v", o.size/4, p)
-		}
-		asmout(ctxt, p, o, out[:])
-		for i = 0; i < int32(o.size/4); i++ {
-			ctxt.Arch.ByteOrder.PutUint32(bp, out[i])
-			bp = bp[4:]
-		}
-	}
-}
-
-func isint32(v int64) bool {
-	return int64(int32(v)) == v
-}
-
-func isuint32(v uint64) bool {
-	return uint64(uint32(v)) == v
-}
-
-func aclass(ctxt *obj.Link, a *obj.Addr) int {
-	switch a.Type {
-	case obj.TYPE_NONE:
-		return C_NONE
-
-	case obj.TYPE_REG:
-		if REG_R0 <= a.Reg && a.Reg <= REG_R31 {
-			return C_REG
-		}
-		if REG_F0 <= a.Reg && a.Reg <= REG_F31 {
-			return C_FREG
-		}
-		if REG_CR0 <= a.Reg && a.Reg <= REG_CR7 || a.Reg == REG_CR {
-			return C_CREG
-		}
-		if REG_SPR0 <= a.Reg && a.Reg <= REG_SPR0+1023 {
-			switch a.Reg {
-			case REG_LR:
-				return C_LR
-
-			case REG_XER:
-				return C_XER
-
-			case REG_CTR:
-				return C_CTR
-			}
-
-			return C_SPR
-		}
-
-		if REG_DCR0 <= a.Reg && a.Reg <= REG_DCR0+1023 {
-			return C_SPR
-		}
-		if a.Reg == REG_FPSCR {
-			return C_FPSCR
-		}
-		if a.Reg == REG_MSR {
-			return C_MSR
-		}
-		return C_GOK
-
-	case obj.TYPE_MEM:
-		switch a.Name {
-		case obj.NAME_EXTERN,
-			obj.NAME_STATIC:
-			if a.Sym == nil {
-				break
-			}
-			ctxt.Instoffset = a.Offset
-			if a.Sym != nil { // use relocation
-				return C_ADDR
-			}
-			return C_LEXT
-
-		case obj.NAME_AUTO:
-			ctxt.Instoffset = int64(ctxt.Autosize) + a.Offset
-			if ctxt.Instoffset >= -BIG && ctxt.Instoffset < BIG {
-				return C_SAUTO
-			}
-			return C_LAUTO
-
-		case obj.NAME_PARAM:
-			ctxt.Instoffset = int64(ctxt.Autosize) + a.Offset + 8
-			if ctxt.Instoffset >= -BIG && ctxt.Instoffset < BIG {
-				return C_SAUTO
-			}
-			return C_LAUTO
-
-		case obj.NAME_NONE:
-			ctxt.Instoffset = a.Offset
-			if ctxt.Instoffset == 0 {
-				return C_ZOREG
-			}
-			if ctxt.Instoffset >= -BIG && ctxt.Instoffset < BIG {
-				return C_SOREG
-			}
-			return C_LOREG
-		}
-
-		return C_GOK
-
-	case obj.TYPE_TEXTSIZE:
-		return C_TEXTSIZE
-
-	case obj.TYPE_CONST,
-		obj.TYPE_ADDR:
-		switch a.Name {
-		case obj.TYPE_NONE:
-			ctxt.Instoffset = a.Offset
-			if a.Reg != 0 {
-				if -BIG <= ctxt.Instoffset && ctxt.Instoffset <= BIG {
-					return C_SACON
-				}
-				if isint32(ctxt.Instoffset) {
-					return C_LACON
-				}
-				return C_DACON
-			}
-
-			goto consize
-
-		case obj.NAME_EXTERN,
-			obj.NAME_STATIC:
-			s := a.Sym
-			if s == nil {
-				break
-			}
-			if s.Type == obj.SCONST {
-				ctxt.Instoffset = s.Value + a.Offset
-				goto consize
-			}
-
-			ctxt.Instoffset = s.Value + a.Offset
-
-			/* not sure why this barfs */
-			return C_LCON
-
-		case obj.NAME_AUTO:
-			ctxt.Instoffset = int64(ctxt.Autosize) + a.Offset
-			if ctxt.Instoffset >= -BIG && ctxt.Instoffset < BIG {
-				return C_SACON
-			}
-			return C_LACON
-
-		case obj.NAME_PARAM:
-			ctxt.Instoffset = int64(ctxt.Autosize) + a.Offset + 8
-			if ctxt.Instoffset >= -BIG && ctxt.Instoffset < BIG {
-				return C_SACON
-			}
-			return C_LACON
-		}
-
-		return C_GOK
-
-	consize:
-		if ctxt.Instoffset >= 0 {
-			if ctxt.Instoffset == 0 {
-				return C_ZCON
-			}
-			if ctxt.Instoffset <= 0x7fff {
-				return C_SCON
-			}
-			if ctxt.Instoffset <= 0xffff {
-				return C_ANDCON
-			}
-			if ctxt.Instoffset&0xffff == 0 && isuint32(uint64(ctxt.Instoffset)) { /* && (instoffset & (1<<31)) == 0) */
-				return C_UCON
-			}
-			if isint32(ctxt.Instoffset) || isuint32(uint64(ctxt.Instoffset)) {
-				return C_LCON
-			}
-			return C_DCON
-		}
-
-		if ctxt.Instoffset >= -0x8000 {
-			return C_ADDCON
-		}
-		if ctxt.Instoffset&0xffff == 0 && isint32(ctxt.Instoffset) {
-			return C_UCON
-		}
-		if isint32(ctxt.Instoffset) {
-			return C_LCON
-		}
-		return C_DCON
-
-	case obj.TYPE_BRANCH:
-		return C_SBRA
-	}
-
-	return C_GOK
-}
-
-func prasm(p *obj.Prog) {
-	fmt.Printf("%v\n", p)
-}
-
-func oplook(ctxt *obj.Link, p *obj.Prog) *Optab {
-	a1 := int(p.Optab)
-	if a1 != 0 {
-		return &optab[a1-1:][0]
-	}
-	a1 = int(p.From.Class)
-	if a1 == 0 {
-		a1 = aclass(ctxt, &p.From) + 1
-		p.From.Class = int8(a1)
-	}
-
-	a1--
-	a3 := C_NONE + 1
-	if p.From3 != nil {
-		a3 = int(p.From3.Class)
-		if a3 == 0 {
-			a3 = aclass(ctxt, p.From3) + 1
-			p.From3.Class = int8(a3)
-		}
-	}
-
-	a3--
-	a4 := int(p.To.Class)
-	if a4 == 0 {
-		a4 = aclass(ctxt, &p.To) + 1
-		p.To.Class = int8(a4)
-	}
-
-	a4--
-	a2 := C_NONE
-	if p.Reg != 0 {
-		a2 = C_REG
-	}
-
-	//print("oplook %v %d %d %d %d\n", p, a1, a2, a3, a4);
-	r0 := p.As & obj.AMask
-
-	o := oprange[r0].start
-	if o == nil {
-		o = oprange[r0].stop /* just generate an error */
-	}
-	e := oprange[r0].stop
-	c1 := xcmp[a1][:]
-	c3 := xcmp[a3][:]
-	c4 := xcmp[a4][:]
-	for ; -cap(o) < -cap(e); o = o[1:] {
-		if int(o[0].a2) == a2 {
-			if c1[o[0].a1] != 0 {
-				if c3[o[0].a3] != 0 {
-					if c4[o[0].a4] != 0 {
-						p.Optab = uint16((-cap(o) + cap(optab)) + 1)
-						return &o[0]
-					}
-				}
-			}
-		}
-	}
-
-	ctxt.Diag("illegal combination %v %v %v %v %v", obj.Aconv(int(p.As)), DRconv(a1), DRconv(a2), DRconv(a3), DRconv(a4))
-	prasm(p)
-	if o == nil {
-		o = optab
-	}
-	return &o[0]
-}
-
-func cmp(a int, b int) bool {
-	if a == b {
-		return true
-	}
-	switch a {
-	case C_LCON:
-		if b == C_ZCON || b == C_SCON || b == C_UCON || b == C_ADDCON || b == C_ANDCON {
-			return true
-		}
-
-	case C_ADDCON:
-		if b == C_ZCON || b == C_SCON {
-			return true
-		}
-
-	case C_ANDCON:
-		if b == C_ZCON || b == C_SCON {
-			return true
-		}
-
-	case C_SPR:
-		if b == C_LR || b == C_XER || b == C_CTR {
-			return true
-		}
-
-	case C_UCON:
-		if b == C_ZCON {
-			return true
-		}
-
-	case C_SCON:
-		if b == C_ZCON {
-			return true
-		}
-
-	case C_LACON:
-		if b == C_SACON {
-			return true
-		}
-
-	case C_LBRA:
-		if b == C_SBRA {
-			return true
-		}
-
-	case C_LEXT:
-		if b == C_SEXT {
-			return true
-		}
-
-	case C_LAUTO:
-		if b == C_SAUTO {
-			return true
-		}
-
-	case C_REG:
-		if b == C_ZCON {
-			return r0iszero != 0 /*TypeKind(100016)*/
-		}
-
-	case C_LOREG:
-		if b == C_ZOREG || b == C_SOREG {
-			return true
-		}
-
-	case C_SOREG:
-		if b == C_ZOREG {
-			return true
-		}
-
-	case C_ANY:
-		return true
-	}
-
-	return false
-}
-
-type ocmp []Optab
-
-func (x ocmp) Len() int {
-	return len(x)
-}
-
-func (x ocmp) Swap(i, j int) {
-	x[i], x[j] = x[j], x[i]
-}
-
-func (x ocmp) Less(i, j int) bool {
-	p1 := &x[i]
-	p2 := &x[j]
-	n := int(p1.as) - int(p2.as)
-	if n != 0 {
-		return n < 0
-	}
-	n = int(p1.a1) - int(p2.a1)
-	if n != 0 {
-		return n < 0
-	}
-	n = int(p1.a2) - int(p2.a2)
-	if n != 0 {
-		return n < 0
-	}
-	n = int(p1.a3) - int(p2.a3)
-	if n != 0 {
-		return n < 0
-	}
-	n = int(p1.a4) - int(p2.a4)
-	if n != 0 {
-		return n < 0
-	}
-	return false
-}
-func opset(a, b0 int16) {
-	oprange[a&obj.AMask] = oprange[b0]
-}
-
-func buildop(ctxt *obj.Link) {
-	var n int
-
-	for i := 0; i < C_NCLASS; i++ {
-		for n = 0; n < C_NCLASS; n++ {
-			if cmp(n, i) {
-				xcmp[i][n] = 1
-			}
-		}
-	}
-	for n = 0; optab[n].as != obj.AXXX; n++ {
-	}
-	sort.Sort(ocmp(optab[:n]))
-	for i := 0; i < n; i++ {
-		r := optab[i].as
-		r0 := r & obj.AMask
-		oprange[r0].start = optab[i:]
-		for optab[i].as == r {
-			i++
-		}
-		oprange[r0].stop = optab[i:]
-		i--
-
-		switch r {
-		default:
-			ctxt.Diag("unknown op in build: %v", obj.Aconv(int(r)))
-			log.Fatalf("bad code")
-
-		case ADCBF: /* unary indexed: op (b+a); op (b) */
-			opset(ADCBI, r0)
-
-			opset(ADCBST, r0)
-			opset(ADCBT, r0)
-			opset(ADCBTST, r0)
-			opset(ADCBZ, r0)
-			opset(AICBI, r0)
-
-		case AECOWX: /* indexed store: op s,(b+a); op s,(b) */
-			opset(ASTWCCC, r0)
-
-			opset(ASTDCCC, r0)
-
-		case AREM: /* macro */
-			opset(AREMCC, r0)
-
-			opset(AREMV, r0)
-			opset(AREMVCC, r0)
-
-		case AREMU:
-			opset(AREMU, r0)
-			opset(AREMUCC, r0)
-			opset(AREMUV, r0)
-			opset(AREMUVCC, r0)
-
-		case AREMD:
-			opset(AREMDCC, r0)
-			opset(AREMDV, r0)
-			opset(AREMDVCC, r0)
-
-		case AREMDU:
-			opset(AREMDU, r0)
-			opset(AREMDUCC, r0)
-			opset(AREMDUV, r0)
-			opset(AREMDUVCC, r0)
-
-		case ADIVW: /* op Rb[,Ra],Rd */
-			opset(AMULHW, r0)
-
-			opset(AMULHWCC, r0)
-			opset(AMULHWU, r0)
-			opset(AMULHWUCC, r0)
-			opset(AMULLWCC, r0)
-			opset(AMULLWVCC, r0)
-			opset(AMULLWV, r0)
-			opset(ADIVWCC, r0)
-			opset(ADIVWV, r0)
-			opset(ADIVWVCC, r0)
-			opset(ADIVWU, r0)
-			opset(ADIVWUCC, r0)
-			opset(ADIVWUV, r0)
-			opset(ADIVWUVCC, r0)
-			opset(AADDCC, r0)
-			opset(AADDCV, r0)
-			opset(AADDCVCC, r0)
-			opset(AADDV, r0)
-			opset(AADDVCC, r0)
-			opset(AADDE, r0)
-			opset(AADDECC, r0)
-			opset(AADDEV, r0)
-			opset(AADDEVCC, r0)
-			opset(ACRAND, r0)
-			opset(ACRANDN, r0)
-			opset(ACREQV, r0)
-			opset(ACRNAND, r0)
-			opset(ACRNOR, r0)
-			opset(ACROR, r0)
-			opset(ACRORN, r0)
-			opset(ACRXOR, r0)
-			opset(AMULHD, r0)
-			opset(AMULHDCC, r0)
-			opset(AMULHDU, r0)
-			opset(AMULHDUCC, r0)
-			opset(AMULLD, r0)
-			opset(AMULLDCC, r0)
-			opset(AMULLDVCC, r0)
-			opset(AMULLDV, r0)
-			opset(ADIVD, r0)
-			opset(ADIVDCC, r0)
-			opset(ADIVDVCC, r0)
-			opset(ADIVDV, r0)
-			opset(ADIVDU, r0)
-			opset(ADIVDUCC, r0)
-			opset(ADIVDUVCC, r0)
-			opset(ADIVDUCC, r0)
-
-		case AMOVBZ: /* lbz, stz, rlwm(r/r), lhz, lha, stz, and x variants */
-			opset(AMOVH, r0)
-
-			opset(AMOVHZ, r0)
-
-		case AMOVBZU: /* lbz[x]u, stb[x]u, lhz[x]u, lha[x]u, sth[u]x, ld[x]u, std[u]x */
-			opset(AMOVHU, r0)
-
-			opset(AMOVHZU, r0)
-			opset(AMOVWU, r0)
-			opset(AMOVWZU, r0)
-			opset(AMOVDU, r0)
-			opset(AMOVMW, r0)
-
-		case AAND: /* logical op Rb,Rs,Ra; no literal */
-			opset(AANDN, r0)
-
-			opset(AANDNCC, r0)
-			opset(AEQV, r0)
-			opset(AEQVCC, r0)
-			opset(ANAND, r0)
-			opset(ANANDCC, r0)
-			opset(ANOR, r0)
-			opset(ANORCC, r0)
-			opset(AORCC, r0)
-			opset(AORN, r0)
-			opset(AORNCC, r0)
-			opset(AXORCC, r0)
-
-		case AADDME: /* op Ra, Rd */
-			opset(AADDMECC, r0)
-
-			opset(AADDMEV, r0)
-			opset(AADDMEVCC, r0)
-			opset(AADDZE, r0)
-			opset(AADDZECC, r0)
-			opset(AADDZEV, r0)
-			opset(AADDZEVCC, r0)
-			opset(ASUBME, r0)
-			opset(ASUBMECC, r0)
-			opset(ASUBMEV, r0)
-			opset(ASUBMEVCC, r0)
-			opset(ASUBZE, r0)
-			opset(ASUBZECC, r0)
-			opset(ASUBZEV, r0)
-			opset(ASUBZEVCC, r0)
-
-		case AADDC:
-			opset(AADDCCC, r0)
-
-		case ABEQ:
-			opset(ABGE, r0)
-			opset(ABGT, r0)
-			opset(ABLE, r0)
-			opset(ABLT, r0)
-			opset(ABNE, r0)
-			opset(ABVC, r0)
-			opset(ABVS, r0)
-
-		case ABR:
-			opset(ABL, r0)
-
-		case ABC:
-			opset(ABCL, r0)
-
-		case AEXTSB: /* op Rs, Ra */
-			opset(AEXTSBCC, r0)
-
-			opset(AEXTSH, r0)
-			opset(AEXTSHCC, r0)
-			opset(ACNTLZW, r0)
-			opset(ACNTLZWCC, r0)
-			opset(ACNTLZD, r0)
-			opset(AEXTSW, r0)
-			opset(AEXTSWCC, r0)
-			opset(ACNTLZDCC, r0)
-
-		case AFABS: /* fop [s,]d */
-			opset(AFABSCC, r0)
-
-			opset(AFNABS, r0)
-			opset(AFNABSCC, r0)
-			opset(AFNEG, r0)
-			opset(AFNEGCC, r0)
-			opset(AFRSP, r0)
-			opset(AFRSPCC, r0)
-			opset(AFCTIW, r0)
-			opset(AFCTIWCC, r0)
-			opset(AFCTIWZ, r0)
-			opset(AFCTIWZCC, r0)
-			opset(AFCTID, r0)
-			opset(AFCTIDCC, r0)
-			opset(AFCTIDZ, r0)
-			opset(AFCTIDZCC, r0)
-			opset(AFCFID, r0)
-			opset(AFCFIDCC, r0)
-			opset(AFRES, r0)
-			opset(AFRESCC, r0)
-			opset(AFRSQRTE, r0)
-			opset(AFRSQRTECC, r0)
-			opset(AFSQRT, r0)
-			opset(AFSQRTCC, r0)
-			opset(AFSQRTS, r0)
-			opset(AFSQRTSCC, r0)
-
-		case AFADD:
-			opset(AFADDS, r0)
-			opset(AFADDCC, r0)
-			opset(AFADDSCC, r0)
-			opset(AFDIV, r0)
-			opset(AFDIVS, r0)
-			opset(AFDIVCC, r0)
-			opset(AFDIVSCC, r0)
-			opset(AFSUB, r0)
-			opset(AFSUBS, r0)
-			opset(AFSUBCC, r0)
-			opset(AFSUBSCC, r0)
-
-		case AFMADD:
-			opset(AFMADDCC, r0)
-			opset(AFMADDS, r0)
-			opset(AFMADDSCC, r0)
-			opset(AFMSUB, r0)
-			opset(AFMSUBCC, r0)
-			opset(AFMSUBS, r0)
-			opset(AFMSUBSCC, r0)
-			opset(AFNMADD, r0)
-			opset(AFNMADDCC, r0)
-			opset(AFNMADDS, r0)
-			opset(AFNMADDSCC, r0)
-			opset(AFNMSUB, r0)
-			opset(AFNMSUBCC, r0)
-			opset(AFNMSUBS, r0)
-			opset(AFNMSUBSCC, r0)
-			opset(AFSEL, r0)
-			opset(AFSELCC, r0)
-
-		case AFMUL:
-			opset(AFMULS, r0)
-			opset(AFMULCC, r0)
-			opset(AFMULSCC, r0)
-
-		case AFCMPO:
-			opset(AFCMPU, r0)
-
-		case AMTFSB0:
-			opset(AMTFSB0CC, r0)
-			opset(AMTFSB1, r0)
-			opset(AMTFSB1CC, r0)
-
-		case ANEG: /* op [Ra,] Rd */
-			opset(ANEGCC, r0)
-
-			opset(ANEGV, r0)
-			opset(ANEGVCC, r0)
-
-		case AOR: /* or/xor Rb,Rs,Ra; ori/xori $uimm,Rs,Ra; oris/xoris $uimm,Rs,Ra */
-			opset(AXOR, r0)
-
-		case ASLW:
-			opset(ASLWCC, r0)
-			opset(ASRW, r0)
-			opset(ASRWCC, r0)
-
-		case ASLD:
-			opset(ASLDCC, r0)
-			opset(ASRD, r0)
-			opset(ASRDCC, r0)
-
-		case ASRAW: /* sraw Rb,Rs,Ra; srawi sh,Rs,Ra */
-			opset(ASRAWCC, r0)
-
-		case ASRAD: /* sraw Rb,Rs,Ra; srawi sh,Rs,Ra */
-			opset(ASRADCC, r0)
-
-		case ASUB: /* SUB Ra,Rb,Rd => subf Rd,ra,rb */
-			opset(ASUB, r0)
-
-			opset(ASUBCC, r0)
-			opset(ASUBV, r0)
-			opset(ASUBVCC, r0)
-			opset(ASUBCCC, r0)
-			opset(ASUBCV, r0)
-			opset(ASUBCVCC, r0)
-			opset(ASUBE, r0)
-			opset(ASUBECC, r0)
-			opset(ASUBEV, r0)
-			opset(ASUBEVCC, r0)
-
-		case ASYNC:
-			opset(AISYNC, r0)
-			opset(APTESYNC, r0)
-			opset(ATLBSYNC, r0)
-
-		case ARLWMI:
-			opset(ARLWMICC, r0)
-			opset(ARLWNM, r0)
-			opset(ARLWNMCC, r0)
-
-		case ARLDMI:
-			opset(ARLDMICC, r0)
-
-		case ARLDC:
-			opset(ARLDCCC, r0)
-
-		case ARLDCL:
-			opset(ARLDCR, r0)
-			opset(ARLDCLCC, r0)
-			opset(ARLDCRCC, r0)
-
-		case AFMOVD:
-			opset(AFMOVDCC, r0)
-			opset(AFMOVDU, r0)
-			opset(AFMOVS, r0)
-			opset(AFMOVSU, r0)
-
-		case AECIWX:
-			opset(ALWAR, r0)
-			opset(ALDAR, r0)
-
-		case ASYSCALL: /* just the op; flow of control */
-			opset(ARFI, r0)
-
-			opset(ARFCI, r0)
-			opset(ARFID, r0)
-			opset(AHRFID, r0)
-
-		case AMOVHBR:
-			opset(AMOVWBR, r0)
-
-		case ASLBMFEE:
-			opset(ASLBMFEV, r0)
-
-		case ATW:
-			opset(ATD, r0)
-
-		case ATLBIE:
-			opset(ASLBIE, r0)
-			opset(ATLBIEL, r0)
-
-		case AEIEIO:
-			opset(ASLBIA, r0)
-
-		case ACMP:
-			opset(ACMPW, r0)
-
-		case ACMPU:
-			opset(ACMPWU, r0)
-
-		case AADD,
-			AANDCC, /* and. Rb,Rs,Ra; andi. $uimm,Rs,Ra; andis. $uimm,Rs,Ra */
-			ALSW,
-			AMOVW,
-			/* load/store/move word with sign extension; special 32-bit move; move 32-bit literals */
-			AMOVWZ, /* load/store/move word with zero extension; move 32-bit literals  */
-			AMOVD,  /* load/store/move 64-bit values, including 32-bit literals with/without sign-extension */
-			AMOVB,  /* macro: move byte with sign extension */
-			AMOVBU, /* macro: move byte with sign extension & update */
-			AMOVFL,
-			AMULLW,
-			/* op $s[,r2],r3; op r1[,r2],r3; no cc/v */
-			ASUBC, /* op r1,$s,r3; op r1[,r2],r3 */
-			ASTSW,
-			ASLBMTE,
-			AWORD,
-			ADWORD,
-			obj.ANOP,
-			obj.ATEXT,
-			obj.AUNDEF,
-			obj.AUSEFIELD,
-			obj.AFUNCDATA,
-			obj.APCDATA,
-			obj.ADUFFZERO,
-			obj.ADUFFCOPY:
-			break
-		}
-	}
-}
-
-func OPVCC(o uint32, xo uint32, oe uint32, rc uint32) uint32 {
-	return o<<26 | xo<<1 | oe<<10 | rc&1
-}
-
-func OPCC(o uint32, xo uint32, rc uint32) uint32 {
-	return OPVCC(o, xo, 0, rc)
-}
-
-func OP(o uint32, xo uint32) uint32 {
-	return OPVCC(o, xo, 0, 0)
-}
-
-/* the order is dest, a/s, b/imm for both arithmetic and logical operations */
-func AOP_RRR(op uint32, d uint32, a uint32, b uint32) uint32 {
-	return op | (d&31)<<21 | (a&31)<<16 | (b&31)<<11
-}
-
-func AOP_IRR(op uint32, d uint32, a uint32, simm uint32) uint32 {
-	return op | (d&31)<<21 | (a&31)<<16 | simm&0xFFFF
-}
-
-func LOP_RRR(op uint32, a uint32, s uint32, b uint32) uint32 {
-	return op | (s&31)<<21 | (a&31)<<16 | (b&31)<<11
-}
-
-func LOP_IRR(op uint32, a uint32, s uint32, uimm uint32) uint32 {
-	return op | (s&31)<<21 | (a&31)<<16 | uimm&0xFFFF
-}
-
-func OP_BR(op uint32, li uint32, aa uint32) uint32 {
-	return op | li&0x03FFFFFC | aa<<1
-}
-
-func OP_BC(op uint32, bo uint32, bi uint32, bd uint32, aa uint32) uint32 {
-	return op | (bo&0x1F)<<21 | (bi&0x1F)<<16 | bd&0xFFFC | aa<<1
-}
-
-func OP_BCR(op uint32, bo uint32, bi uint32) uint32 {
-	return op | (bo&0x1F)<<21 | (bi&0x1F)<<16
-}
-
-func OP_RLW(op uint32, a uint32, s uint32, sh uint32, mb uint32, me uint32) uint32 {
-	return op | (s&31)<<21 | (a&31)<<16 | (sh&31)<<11 | (mb&31)<<6 | (me&31)<<1
-}
-
-const (
-	/* each rhs is OPVCC(_, _, _, _) */
-	OP_ADD    = 31<<26 | 266<<1 | 0<<10 | 0
-	OP_ADDI   = 14<<26 | 0<<1 | 0<<10 | 0
-	OP_ADDIS  = 15<<26 | 0<<1 | 0<<10 | 0
-	OP_ANDI   = 28<<26 | 0<<1 | 0<<10 | 0
-	OP_EXTSB  = 31<<26 | 954<<1 | 0<<10 | 0
-	OP_EXTSH  = 31<<26 | 922<<1 | 0<<10 | 0
-	OP_EXTSW  = 31<<26 | 986<<1 | 0<<10 | 0
-	OP_MCRF   = 19<<26 | 0<<1 | 0<<10 | 0
-	OP_MCRFS  = 63<<26 | 64<<1 | 0<<10 | 0
-	OP_MCRXR  = 31<<26 | 512<<1 | 0<<10 | 0
-	OP_MFCR   = 31<<26 | 19<<1 | 0<<10 | 0
-	OP_MFFS   = 63<<26 | 583<<1 | 0<<10 | 0
-	OP_MFMSR  = 31<<26 | 83<<1 | 0<<10 | 0
-	OP_MFSPR  = 31<<26 | 339<<1 | 0<<10 | 0
-	OP_MFSR   = 31<<26 | 595<<1 | 0<<10 | 0
-	OP_MFSRIN = 31<<26 | 659<<1 | 0<<10 | 0
-	OP_MTCRF  = 31<<26 | 144<<1 | 0<<10 | 0
-	OP_MTFSF  = 63<<26 | 711<<1 | 0<<10 | 0
-	OP_MTFSFI = 63<<26 | 134<<1 | 0<<10 | 0
-	OP_MTMSR  = 31<<26 | 146<<1 | 0<<10 | 0
-	OP_MTMSRD = 31<<26 | 178<<1 | 0<<10 | 0
-	OP_MTSPR  = 31<<26 | 467<<1 | 0<<10 | 0
-	OP_MTSR   = 31<<26 | 210<<1 | 0<<10 | 0
-	OP_MTSRIN = 31<<26 | 242<<1 | 0<<10 | 0
-	OP_MULLW  = 31<<26 | 235<<1 | 0<<10 | 0
-	OP_MULLD  = 31<<26 | 233<<1 | 0<<10 | 0
-	OP_OR     = 31<<26 | 444<<1 | 0<<10 | 0
-	OP_ORI    = 24<<26 | 0<<1 | 0<<10 | 0
-	OP_ORIS   = 25<<26 | 0<<1 | 0<<10 | 0
-	OP_RLWINM = 21<<26 | 0<<1 | 0<<10 | 0
-	OP_SUBF   = 31<<26 | 40<<1 | 0<<10 | 0
-	OP_RLDIC  = 30<<26 | 4<<1 | 0<<10 | 0
-	OP_RLDICR = 30<<26 | 2<<1 | 0<<10 | 0
-	OP_RLDICL = 30<<26 | 0<<1 | 0<<10 | 0
-)
-
-func oclass(a *obj.Addr) int {
-	return int(a.Class) - 1
-}
-
-// add R_ADDRPOWER relocation to symbol s for the two instructions o1 and o2.
-func addaddrreloc(ctxt *obj.Link, s *obj.LSym, o1 *uint32, o2 *uint32) {
-	rel := obj.Addrel(ctxt.Cursym)
-	rel.Off = int32(ctxt.Pc)
-	rel.Siz = 8
-	rel.Sym = s
-	rel.Add = int64(uint64(*o1)<<32 | uint64(uint32(*o2)))
-	rel.Type = obj.R_ADDRPOWER
-}
-
-/*
- * 32-bit masks
- */
-func getmask(m []byte, v uint32) bool {
-	m[1] = 0
-	m[0] = m[1]
-	if v != ^uint32(0) && v&(1<<31) != 0 && v&1 != 0 { /* MB > ME */
-		if getmask(m, ^v) {
-			i := int(m[0])
-			m[0] = m[1] + 1
-			m[1] = byte(i - 1)
-			return true
-		}
-
-		return false
-	}
-
-	for i := 0; i < 32; i++ {
-		if v&(1<<uint(31-i)) != 0 {
-			m[0] = byte(i)
-			for {
-				m[1] = byte(i)
-				i++
-				if i >= 32 || v&(1<<uint(31-i)) == 0 {
-					break
-				}
-			}
-
-			for ; i < 32; i++ {
-				if v&(1<<uint(31-i)) != 0 {
-					return false
-				}
-			}
-			return true
-		}
-	}
-
-	return false
-}
-
-func maskgen(ctxt *obj.Link, p *obj.Prog, m []byte, v uint32) {
-	if !getmask(m, v) {
-		ctxt.Diag("cannot generate mask #%x\n%v", v, p)
-	}
-}
-
-/*
- * 64-bit masks (rldic etc)
- */
-func getmask64(m []byte, v uint64) bool {
-	m[1] = 0
-	m[0] = m[1]
-	for i := 0; i < 64; i++ {
-		if v&(uint64(1)<<uint(63-i)) != 0 {
-			m[0] = byte(i)
-			for {
-				m[1] = byte(i)
-				i++
-				if i >= 64 || v&(uint64(1)<<uint(63-i)) == 0 {
-					break
-				}
-			}
-
-			for ; i < 64; i++ {
-				if v&(uint64(1)<<uint(63-i)) != 0 {
-					return false
-				}
-			}
-			return true
-		}
-	}
-
-	return false
-}
-
-func maskgen64(ctxt *obj.Link, p *obj.Prog, m []byte, v uint64) {
-	if !getmask64(m, v) {
-		ctxt.Diag("cannot generate mask #%x\n%v", v, p)
-	}
-}
-
-func loadu32(r int, d int64) uint32 {
-	v := int32(d >> 16)
-	if isuint32(uint64(d)) {
-		return LOP_IRR(OP_ORIS, uint32(r), REGZERO, uint32(v))
-	}
-	return AOP_IRR(OP_ADDIS, uint32(r), REGZERO, uint32(v))
-}
-
-func high16adjusted(d int32) uint16 {
-	if d&0x8000 != 0 {
-		return uint16((d >> 16) + 1)
-	}
-	return uint16(d >> 16)
-}
-
-func asmout(ctxt *obj.Link, p *obj.Prog, o *Optab, out []uint32) {
-	o1 := uint32(0)
-	o2 := uint32(0)
-	o3 := uint32(0)
-	o4 := uint32(0)
-	o5 := uint32(0)
-
-	//print("%v => case %d\n", p, o->type);
-	switch o.type_ {
-	default:
-		ctxt.Diag("unknown type %d", o.type_)
-		prasm(p)
-
-	case 0: /* pseudo ops */
-		break
-
-	case 1: /* mov r1,r2 ==> OR Rs,Rs,Ra */
-		if p.To.Reg == REGZERO && p.From.Type == obj.TYPE_CONST {
-			v := regoff(ctxt, &p.From)
-			if r0iszero != 0 /*TypeKind(100016)*/ && v != 0 {
-				//nerrors--;
-				ctxt.Diag("literal operation on R0\n%v", p)
-			}
-
-			o1 = LOP_IRR(OP_ADDI, REGZERO, REGZERO, uint32(v))
-			break
-		}
-
-		o1 = LOP_RRR(OP_OR, uint32(p.To.Reg), uint32(p.From.Reg), uint32(p.From.Reg))
-
-	case 2: /* int/cr/fp op Rb,[Ra],Rd */
-		r := int(p.Reg)
-
-		if r == 0 {
-			r = int(p.To.Reg)
-		}
-		o1 = AOP_RRR(uint32(oprrr(ctxt, int(p.As))), uint32(p.To.Reg), uint32(r), uint32(p.From.Reg))
-
-	case 3: /* mov $soreg/addcon/ucon, r ==> addis/addi $i,reg',r */
-		d := vregoff(ctxt, &p.From)
-
-		v := int32(d)
-		r := int(p.From.Reg)
-		if r == 0 {
-			r = int(o.param)
-		}
-		if r0iszero != 0 /*TypeKind(100016)*/ && p.To.Reg == 0 && (r != 0 || v != 0) {
-			ctxt.Diag("literal operation on R0\n%v", p)
-		}
-		a := OP_ADDI
-		if o.a1 == C_UCON {
-			if d&0xffff != 0 {
-				log.Fatalf("invalid handling of %v", p)
-			}
-			v >>= 16
-			if r == REGZERO && isuint32(uint64(d)) {
-				o1 = LOP_IRR(OP_ORIS, uint32(p.To.Reg), REGZERO, uint32(v))
-				break
-			}
-
-			a = OP_ADDIS
-		} else {
-			if int64(int16(d)) != d {
-				log.Fatalf("invalid handling of %v", p)
-			}
-		}
-
-		o1 = AOP_IRR(uint32(a), uint32(p.To.Reg), uint32(r), uint32(v))
-
-	case 4: /* add/mul $scon,[r1],r2 */
-		v := regoff(ctxt, &p.From)
-
-		r := int(p.Reg)
-		if r == 0 {
-			r = int(p.To.Reg)
-		}
-		if r0iszero != 0 /*TypeKind(100016)*/ && p.To.Reg == 0 {
-			ctxt.Diag("literal operation on R0\n%v", p)
-		}
-		if int32(int16(v)) != v {
-			log.Fatalf("mishandled instruction %v", p)
-		}
-		o1 = AOP_IRR(uint32(opirr(ctxt, int(p.As))), uint32(p.To.Reg), uint32(r), uint32(v))
-
-	case 5: /* syscall */
-		o1 = uint32(oprrr(ctxt, int(p.As)))
-
-	case 6: /* logical op Rb,[Rs,]Ra; no literal */
-		r := int(p.Reg)
-
-		if r == 0 {
-			r = int(p.To.Reg)
-		}
-		o1 = LOP_RRR(uint32(oprrr(ctxt, int(p.As))), uint32(p.To.Reg), uint32(r), uint32(p.From.Reg))
-
-	case 7: /* mov r, soreg ==> stw o(r) */
-		r := int(p.To.Reg)
-
-		if r == 0 {
-			r = int(o.param)
-		}
-		v := regoff(ctxt, &p.To)
-		if p.To.Type == obj.TYPE_MEM && p.To.Index != 0 {
-			if v != 0 {
-				ctxt.Diag("illegal indexed instruction\n%v", p)
-			}
-			o1 = AOP_RRR(uint32(opstorex(ctxt, int(p.As))), uint32(p.From.Reg), uint32(p.To.Index), uint32(r))
-		} else {
-			if int32(int16(v)) != v {
-				log.Fatalf("mishandled instruction %v", p)
-			}
-			o1 = AOP_IRR(uint32(opstore(ctxt, int(p.As))), uint32(p.From.Reg), uint32(r), uint32(v))
-		}
-
-	case 8: /* mov soreg, r ==> lbz/lhz/lwz o(r) */
-		r := int(p.From.Reg)
-
-		if r == 0 {
-			r = int(o.param)
-		}
-		v := regoff(ctxt, &p.From)
-		if p.From.Type == obj.TYPE_MEM && p.From.Index != 0 {
-			if v != 0 {
-				ctxt.Diag("illegal indexed instruction\n%v", p)
-			}
-			o1 = AOP_RRR(uint32(oploadx(ctxt, int(p.As))), uint32(p.To.Reg), uint32(p.From.Index), uint32(r))
-		} else {
-			if int32(int16(v)) != v {
-				log.Fatalf("mishandled instruction %v", p)
-			}
-			o1 = AOP_IRR(uint32(opload(ctxt, int(p.As))), uint32(p.To.Reg), uint32(r), uint32(v))
-		}
-
-	case 9: /* movb soreg, r ==> lbz o(r),r2; extsb r2,r2 */
-		r := int(p.From.Reg)
-
-		if r == 0 {
-			r = int(o.param)
-		}
-		v := regoff(ctxt, &p.From)
-		if p.From.Type == obj.TYPE_MEM && p.From.Index != 0 {
-			if v != 0 {
-				ctxt.Diag("illegal indexed instruction\n%v", p)
-			}
-			o1 = AOP_RRR(uint32(oploadx(ctxt, int(p.As))), uint32(p.To.Reg), uint32(p.From.Index), uint32(r))
-		} else {
-			o1 = AOP_IRR(uint32(opload(ctxt, int(p.As))), uint32(p.To.Reg), uint32(r), uint32(v))
-		}
-		o2 = LOP_RRR(OP_EXTSB, uint32(p.To.Reg), uint32(p.To.Reg), 0)
-
-	case 10: /* sub Ra,[Rb],Rd => subf Rd,Ra,Rb */
-		r := int(p.Reg)
-
-		if r == 0 {
-			r = int(p.To.Reg)
-		}
-		o1 = AOP_RRR(uint32(oprrr(ctxt, int(p.As))), uint32(p.To.Reg), uint32(p.From.Reg), uint32(r))
-
-	case 11: /* br/bl lbra */
-		v := int32(0)
-
-		if p.Pcond != nil {
-			v = int32(p.Pcond.Pc - p.Pc)
-			if v&03 != 0 {
-				ctxt.Diag("odd branch target address\n%v", p)
-				v &^= 03
-			}
-
-			if v < -(1<<25) || v >= 1<<24 {
-				ctxt.Diag("branch too far\n%v", p)
-			}
-		}
-
-		o1 = OP_BR(uint32(opirr(ctxt, int(p.As))), uint32(v), 0)
-		if p.To.Sym != nil {
-			rel := obj.Addrel(ctxt.Cursym)
-			rel.Off = int32(ctxt.Pc)
-			rel.Siz = 4
-			rel.Sym = p.To.Sym
-			v += int32(p.To.Offset)
-			if v&03 != 0 {
-				ctxt.Diag("odd branch target address\n%v", p)
-				v &^= 03
-			}
-
-			rel.Add = int64(v)
-			rel.Type = obj.R_CALLPOWER
-		}
-
-	case 12: /* movb r,r (extsb); movw r,r (extsw) */
-		if p.To.Reg == REGZERO && p.From.Type == obj.TYPE_CONST {
-			v := regoff(ctxt, &p.From)
-			if r0iszero != 0 /*TypeKind(100016)*/ && v != 0 {
-				ctxt.Diag("literal operation on R0\n%v", p)
-			}
-
-			o1 = LOP_IRR(OP_ADDI, REGZERO, REGZERO, uint32(v))
-			break
-		}
-
-		if p.As == AMOVW {
-			o1 = LOP_RRR(OP_EXTSW, uint32(p.To.Reg), uint32(p.From.Reg), 0)
-		} else {
-			o1 = LOP_RRR(OP_EXTSB, uint32(p.To.Reg), uint32(p.From.Reg), 0)
-		}
-
-	case 13: /* mov[bhw]z r,r; uses rlwinm not andi. to avoid changing CC */
-		if p.As == AMOVBZ {
-			o1 = OP_RLW(OP_RLWINM, uint32(p.To.Reg), uint32(p.From.Reg), 0, 24, 31)
-		} else if p.As == AMOVH {
-			o1 = LOP_RRR(OP_EXTSH, uint32(p.To.Reg), uint32(p.From.Reg), 0)
-		} else if p.As == AMOVHZ {
-			o1 = OP_RLW(OP_RLWINM, uint32(p.To.Reg), uint32(p.From.Reg), 0, 16, 31)
-		} else if p.As == AMOVWZ {
-			o1 = OP_RLW(OP_RLDIC, uint32(p.To.Reg), uint32(p.From.Reg), 0, 0, 0) | 1<<5 /* MB=32 */
-		} else {
-			ctxt.Diag("internal: bad mov[bhw]z\n%v", p)
-		}
-
-	case 14: /* rldc[lr] Rb,Rs,$mask,Ra -- left, right give different masks */
-		r := int(p.Reg)
-
-		if r == 0 {
-			r = int(p.To.Reg)
-		}
-		d := vregoff(ctxt, p.From3)
-		var mask [2]uint8
-		maskgen64(ctxt, p, mask[:], uint64(d))
-		var a int
-		switch p.As {
-		case ARLDCL, ARLDCLCC:
-			a = int(mask[0]) /* MB */
-			if mask[1] != 63 {
-				ctxt.Diag("invalid mask for rotate: %x (end != bit 63)\n%v", uint64(d), p)
-			}
-
-		case ARLDCR, ARLDCRCC:
-			a = int(mask[1]) /* ME */
-			if mask[0] != 0 {
-				ctxt.Diag("invalid mask for rotate: %x (start != 0)\n%v", uint64(d), p)
-			}
-
-		default:
-			ctxt.Diag("unexpected op in rldc case\n%v", p)
-			a = 0
-		}
-
-		o1 = LOP_RRR(uint32(oprrr(ctxt, int(p.As))), uint32(p.To.Reg), uint32(r), uint32(p.From.Reg))
-		o1 |= (uint32(a) & 31) << 6
-		if a&0x20 != 0 {
-			o1 |= 1 << 5 /* mb[5] is top bit */
-		}
-
-	case 17, /* bc bo,bi,lbra (same for now) */
-		16: /* bc bo,bi,sbra */
-		a := 0
-
-		if p.From.Type == obj.TYPE_CONST {
-			a = int(regoff(ctxt, &p.From))
-		}
-		r := int(p.Reg)
-		if r == 0 {
-			r = 0
-		}
-		v := int32(0)
-		if p.Pcond != nil {
-			v = int32(p.Pcond.Pc - p.Pc)
-		}
-		if v&03 != 0 {
-			ctxt.Diag("odd branch target address\n%v", p)
-			v &^= 03
-		}
-
-		if v < -(1<<16) || v >= 1<<15 {
-			ctxt.Diag("branch too far\n%v", p)
-		}
-		o1 = OP_BC(uint32(opirr(ctxt, int(p.As))), uint32(a), uint32(r), uint32(v), 0)
-
-	case 15: /* br/bl (r) => mov r,lr; br/bl (lr) */
-		var v int32
-		if p.As == ABC || p.As == ABCL {
-			v = regoff(ctxt, &p.To) & 31
-		} else {
-			v = 20 /* unconditional */
-		}
-		o1 = AOP_RRR(OP_MTSPR, uint32(p.To.Reg), 0, 0) | (REG_LR&0x1f)<<16 | ((REG_LR>>5)&0x1f)<<11
-		o2 = OPVCC(19, 16, 0, 0)
-		if p.As == ABL || p.As == ABCL {
-			o2 |= 1
-		}
-		o2 = OP_BCR(o2, uint32(v), uint32(p.To.Index))
-
-	case 18: /* br/bl (lr/ctr); bc/bcl bo,bi,(lr/ctr) */
-		var v int32
-		if p.As == ABC || p.As == ABCL {
-			v = regoff(ctxt, &p.From) & 31
-		} else {
-			v = 20 /* unconditional */
-		}
-		r := int(p.Reg)
-		if r == 0 {
-			r = 0
-		}
-		switch oclass(&p.To) {
-		case C_CTR:
-			o1 = OPVCC(19, 528, 0, 0)
-
-		case C_LR:
-			o1 = OPVCC(19, 16, 0, 0)
-
-		default:
-			ctxt.Diag("bad optab entry (18): %d\n%v", p.To.Class, p)
-			v = 0
-		}
-
-		if p.As == ABL || p.As == ABCL {
-			o1 |= 1
-		}
-		o1 = OP_BCR(o1, uint32(v), uint32(r))
-
-	case 19: /* mov $lcon,r ==> cau+or */
-		d := vregoff(ctxt, &p.From)
-
-		if p.From.Sym == nil {
-			o1 = loadu32(int(p.To.Reg), d)
-			o2 = LOP_IRR(OP_ORI, uint32(p.To.Reg), uint32(p.To.Reg), uint32(int32(d)))
-		} else {
-			o1 = AOP_IRR(OP_ADDIS, REGTMP, REGZERO, uint32(high16adjusted(int32(d))))
-			o2 = AOP_IRR(OP_ADDI, uint32(p.To.Reg), REGTMP, uint32(d))
-			addaddrreloc(ctxt, p.From.Sym, &o1, &o2)
-		}
-
-	//if(dlm) reloc(&p->from, p->pc, 0);
-
-	case 20: /* add $ucon,,r */
-		v := regoff(ctxt, &p.From)
-
-		r := int(p.Reg)
-		if r == 0 {
-			r = int(p.To.Reg)
-		}
-		if p.As == AADD && (r0iszero == 0 /*TypeKind(100016)*/ && p.Reg == 0 || r0iszero != 0 /*TypeKind(100016)*/ && p.To.Reg == 0) {
-			ctxt.Diag("literal operation on R0\n%v", p)
-		}
-		o1 = AOP_IRR(uint32(opirr(ctxt, int(p.As)+ALAST)), uint32(p.To.Reg), uint32(r), uint32(v)>>16)
-
-	case 22: /* add $lcon,r1,r2 ==> cau+or+add */ /* could do add/sub more efficiently */
-		if p.To.Reg == REGTMP || p.Reg == REGTMP {
-			ctxt.Diag("cant synthesize large constant\n%v", p)
-		}
-		d := vregoff(ctxt, &p.From)
-		o1 = loadu32(REGTMP, d)
-		o2 = LOP_IRR(OP_ORI, REGTMP, REGTMP, uint32(int32(d)))
-		r := int(p.Reg)
-		if r == 0 {
-			r = int(p.To.Reg)
-		}
-		o3 = AOP_RRR(uint32(oprrr(ctxt, int(p.As))), uint32(p.To.Reg), REGTMP, uint32(r))
-		if p.From.Sym != nil {
-			ctxt.Diag("%v is not supported", p)
-		}
-
-	//if(dlm) reloc(&p->from, p->pc, 0);
-
-	case 23: /* and $lcon,r1,r2 ==> cau+or+and */ /* masks could be done using rlnm etc. */
-		if p.To.Reg == REGTMP || p.Reg == REGTMP {
-			ctxt.Diag("cant synthesize large constant\n%v", p)
-		}
-		d := vregoff(ctxt, &p.From)
-		o1 = loadu32(REGTMP, d)
-		o2 = LOP_IRR(OP_ORI, REGTMP, REGTMP, uint32(int32(d)))
-		r := int(p.Reg)
-		if r == 0 {
-			r = int(p.To.Reg)
-		}
-		o3 = LOP_RRR(uint32(oprrr(ctxt, int(p.As))), uint32(p.To.Reg), REGTMP, uint32(r))
-		if p.From.Sym != nil {
-			ctxt.Diag("%v is not supported", p)
-		}
-
-		//if(dlm) reloc(&p->from, p->pc, 0);
-
-		/*24*/
-	case 25:
-		/* sld[.] $sh,rS,rA -> rldicr[.] $sh,rS,mask(0,63-sh),rA; srd[.] -> rldicl */
-		v := regoff(ctxt, &p.From)
-
-		if v < 0 {
-			v = 0
-		} else if v > 63 {
-			v = 63
-		}
-		r := int(p.Reg)
-		if r == 0 {
-			r = int(p.To.Reg)
-		}
-		var a int
-		switch p.As {
-		case ASLD, ASLDCC:
-			a = int(63 - v)
-			o1 = OP_RLDICR
-
-		case ASRD, ASRDCC:
-			a = int(v)
-			v = 64 - v
-			o1 = OP_RLDICL
-
-		default:
-			ctxt.Diag("unexpected op in sldi case\n%v", p)
-			a = 0
-			o1 = 0
-		}
-
-		o1 = AOP_RRR(o1, uint32(r), uint32(p.To.Reg), (uint32(v) & 0x1F))
-		o1 |= (uint32(a) & 31) << 6
-		if v&0x20 != 0 {
-			o1 |= 1 << 1
-		}
-		if a&0x20 != 0 {
-			o1 |= 1 << 5 /* mb[5] is top bit */
-		}
-		if p.As == ASLDCC || p.As == ASRDCC {
-			o1 |= 1 /* Rc */
-		}
-
-	case 26: /* mov $lsext/auto/oreg,,r2 ==> addis+addi */
-		if p.To.Reg == REGTMP {
-			ctxt.Diag("can't synthesize large constant\n%v", p)
-		}
-		v := regoff(ctxt, &p.From)
-		r := int(p.From.Reg)
-		if r == 0 {
-			r = int(o.param)
-		}
-		o1 = AOP_IRR(OP_ADDIS, REGTMP, uint32(r), uint32(high16adjusted(v)))
-		o2 = AOP_IRR(OP_ADDI, uint32(p.To.Reg), REGTMP, uint32(v))
-
-	case 27: /* subc ra,$simm,rd => subfic rd,ra,$simm */
-		v := regoff(ctxt, p.From3)
-
-		r := int(p.From.Reg)
-		o1 = AOP_IRR(uint32(opirr(ctxt, int(p.As))), uint32(p.To.Reg), uint32(r), uint32(v))
-
-	case 28: /* subc r1,$lcon,r2 ==> cau+or+subfc */
-		if p.To.Reg == REGTMP || p.From.Reg == REGTMP {
-			ctxt.Diag("can't synthesize large constant\n%v", p)
-		}
-		v := regoff(ctxt, p.From3)
-		o1 = AOP_IRR(OP_ADDIS, REGTMP, REGZERO, uint32(v)>>16)
-		o2 = LOP_IRR(OP_ORI, REGTMP, REGTMP, uint32(v))
-		o3 = AOP_RRR(uint32(oprrr(ctxt, int(p.As))), uint32(p.To.Reg), uint32(p.From.Reg), REGTMP)
-		if p.From.Sym != nil {
-			ctxt.Diag("%v is not supported", p)
-		}
-
-	//if(dlm) reloc(&p->from3, p->pc, 0);
-
-	case 29: /* rldic[lr]? $sh,s,$mask,a -- left, right, plain give different masks */
-		v := regoff(ctxt, &p.From)
-
-		d := vregoff(ctxt, p.From3)
-		var mask [2]uint8
-		maskgen64(ctxt, p, mask[:], uint64(d))
-		var a int
-		switch p.As {
-		case ARLDC, ARLDCCC:
-			a = int(mask[0]) /* MB */
-			if int32(mask[1]) != (63 - v) {
-				ctxt.Diag("invalid mask for shift: %x (shift %d)\n%v", uint64(d), v, p)
-			}
-
-		case ARLDCL, ARLDCLCC:
-			a = int(mask[0]) /* MB */
-			if mask[1] != 63 {
-				ctxt.Diag("invalid mask for shift: %x (shift %d)\n%v", uint64(d), v, p)
-			}
-
-		case ARLDCR, ARLDCRCC:
-			a = int(mask[1]) /* ME */
-			if mask[0] != 0 {
-				ctxt.Diag("invalid mask for shift: %x (shift %d)\n%v", uint64(d), v, p)
-			}
-
-		default:
-			ctxt.Diag("unexpected op in rldic case\n%v", p)
-			a = 0
-		}
-
-		o1 = AOP_RRR(uint32(opirr(ctxt, int(p.As))), uint32(p.Reg), uint32(p.To.Reg), (uint32(v) & 0x1F))
-		o1 |= (uint32(a) & 31) << 6
-		if v&0x20 != 0 {
-			o1 |= 1 << 1
-		}
-		if a&0x20 != 0 {
-			o1 |= 1 << 5 /* mb[5] is top bit */
-		}
-
-	case 30: /* rldimi $sh,s,$mask,a */
-		v := regoff(ctxt, &p.From)
-
-		d := vregoff(ctxt, p.From3)
-		var mask [2]uint8
-		maskgen64(ctxt, p, mask[:], uint64(d))
-		if int32(mask[1]) != (63 - v) {
-			ctxt.Diag("invalid mask for shift: %x (shift %d)\n%v", uint64(d), v, p)
-		}
-		o1 = AOP_RRR(uint32(opirr(ctxt, int(p.As))), uint32(p.Reg), uint32(p.To.Reg), (uint32(v) & 0x1F))
-		o1 |= (uint32(mask[0]) & 31) << 6
-		if v&0x20 != 0 {
-			o1 |= 1 << 1
-		}
-		if mask[0]&0x20 != 0 {
-			o1 |= 1 << 5 /* mb[5] is top bit */
-		}
-
-	case 31: /* dword */
-		d := vregoff(ctxt, &p.From)
-
-		if ctxt.Arch.ByteOrder == binary.BigEndian {
-			o1 = uint32(d >> 32)
-			o2 = uint32(d)
-		} else {
-			o1 = uint32(d)
-			o2 = uint32(d >> 32)
-		}
-
-		if p.From.Sym != nil {
-			rel := obj.Addrel(ctxt.Cursym)
-			rel.Off = int32(ctxt.Pc)
-			rel.Siz = 8
-			rel.Sym = p.From.Sym
-			rel.Add = p.From.Offset
-			rel.Type = obj.R_ADDR
-			o2 = 0
-			o1 = o2
-		}
-
-	case 32: /* fmul frc,fra,frd */
-		r := int(p.Reg)
-
-		if r == 0 {
-			r = int(p.To.Reg)
-		}
-		o1 = AOP_RRR(uint32(oprrr(ctxt, int(p.As))), uint32(p.To.Reg), uint32(r), 0) | (uint32(p.From.Reg)&31)<<6
-
-	case 33: /* fabs [frb,]frd; fmr. frb,frd */
-		r := int(p.From.Reg)
-
-		if oclass(&p.From) == C_NONE {
-			r = int(p.To.Reg)
-		}
-		o1 = AOP_RRR(uint32(oprrr(ctxt, int(p.As))), uint32(p.To.Reg), 0, uint32(r))
-
-	case 34: /* FMADDx fra,frb,frc,frd (d=a*b+c); FSELx a<0? (d=b): (d=c) */
-		o1 = AOP_RRR(uint32(oprrr(ctxt, int(p.As))), uint32(p.To.Reg), uint32(p.From.Reg), uint32(p.Reg)) | (uint32(p.From3.Reg)&31)<<6
-
-	case 35: /* mov r,lext/lauto/loreg ==> cau $(v>>16),sb,r'; store o(r') */
-		v := regoff(ctxt, &p.To)
-
-		r := int(p.To.Reg)
-		if r == 0 {
-			r = int(o.param)
-		}
-		o1 = AOP_IRR(OP_ADDIS, REGTMP, uint32(r), uint32(high16adjusted(v)))
-		o2 = AOP_IRR(uint32(opstore(ctxt, int(p.As))), uint32(p.From.Reg), REGTMP, uint32(v))
-
-	case 36: /* mov bz/h/hz lext/lauto/lreg,r ==> lbz/lha/lhz etc */
-		v := regoff(ctxt, &p.From)
-
-		r := int(p.From.Reg)
-		if r == 0 {
-			r = int(o.param)
-		}
-		o1 = AOP_IRR(OP_ADDIS, REGTMP, uint32(r), uint32(high16adjusted(v)))
-		o2 = AOP_IRR(uint32(opload(ctxt, int(p.As))), uint32(p.To.Reg), REGTMP, uint32(v))
-
-	case 37: /* movb lext/lauto/lreg,r ==> lbz o(reg),r; extsb r */
-		v := regoff(ctxt, &p.From)
-
-		r := int(p.From.Reg)
-		if r == 0 {
-			r = int(o.param)
-		}
-		o1 = AOP_IRR(OP_ADDIS, REGTMP, uint32(r), uint32(high16adjusted(v)))
-		o2 = AOP_IRR(uint32(opload(ctxt, int(p.As))), uint32(p.To.Reg), REGTMP, uint32(v))
-		o3 = LOP_RRR(OP_EXTSB, uint32(p.To.Reg), uint32(p.To.Reg), 0)
-
-	case 40: /* word */
-		o1 = uint32(regoff(ctxt, &p.From))
-
-	case 41: /* stswi */
-		o1 = AOP_RRR(uint32(opirr(ctxt, int(p.As))), uint32(p.From.Reg), uint32(p.To.Reg), 0) | (uint32(regoff(ctxt, p.From3))&0x7F)<<11
-
-	case 42: /* lswi */
-		o1 = AOP_RRR(uint32(opirr(ctxt, int(p.As))), uint32(p.To.Reg), uint32(p.From.Reg), 0) | (uint32(regoff(ctxt, p.From3))&0x7F)<<11
-
-	case 43: /* unary indexed source: dcbf (b); dcbf (a+b) */
-		o1 = AOP_RRR(uint32(oprrr(ctxt, int(p.As))), 0, uint32(p.From.Index), uint32(p.From.Reg))
-
-	case 44: /* indexed store */
-		o1 = AOP_RRR(uint32(opstorex(ctxt, int(p.As))), uint32(p.From.Reg), uint32(p.To.Index), uint32(p.To.Reg))
-
-	case 45: /* indexed load */
-		o1 = AOP_RRR(uint32(oploadx(ctxt, int(p.As))), uint32(p.To.Reg), uint32(p.From.Index), uint32(p.From.Reg))
-
-	case 46: /* plain op */
-		o1 = uint32(oprrr(ctxt, int(p.As)))
-
-	case 47: /* op Ra, Rd; also op [Ra,] Rd */
-		r := int(p.From.Reg)
-
-		if r == 0 {
-			r = int(p.To.Reg)
-		}
-		o1 = AOP_RRR(uint32(oprrr(ctxt, int(p.As))), uint32(p.To.Reg), uint32(r), 0)
-
-	case 48: /* op Rs, Ra */
-		r := int(p.From.Reg)
-
-		if r == 0 {
-			r = int(p.To.Reg)
-		}
-		o1 = LOP_RRR(uint32(oprrr(ctxt, int(p.As))), uint32(p.To.Reg), uint32(r), 0)
-
-	case 49: /* op Rb; op $n, Rb */
-		if p.From.Type != obj.TYPE_REG { /* tlbie $L, rB */
-			v := regoff(ctxt, &p.From) & 1
-			o1 = AOP_RRR(uint32(oprrr(ctxt, int(p.As))), 0, 0, uint32(p.To.Reg)) | uint32(v)<<21
-		} else {
-			o1 = AOP_RRR(uint32(oprrr(ctxt, int(p.As))), 0, 0, uint32(p.From.Reg))
-		}
-
-	case 50: /* rem[u] r1[,r2],r3 */
-		r := int(p.Reg)
-
-		if r == 0 {
-			r = int(p.To.Reg)
-		}
-		v := oprrr(ctxt, int(p.As))
-		t := v & (1<<10 | 1) /* OE|Rc */
-		o1 = AOP_RRR(uint32(v)&^uint32(t), REGTMP, uint32(r), uint32(p.From.Reg))
-		o2 = AOP_RRR(OP_MULLW, REGTMP, REGTMP, uint32(p.From.Reg))
-		o3 = AOP_RRR(OP_SUBF|uint32(t), uint32(p.To.Reg), REGTMP, uint32(r))
-		if p.As == AREMU {
-			o4 = o3
-
-			/* Clear top 32 bits */
-			o3 = OP_RLW(OP_RLDIC, REGTMP, REGTMP, 0, 0, 0) | 1<<5
-		}
-
-	case 51: /* remd[u] r1[,r2],r3 */
-		r := int(p.Reg)
-
-		if r == 0 {
-			r = int(p.To.Reg)
-		}
-		v := oprrr(ctxt, int(p.As))
-		t := v & (1<<10 | 1) /* OE|Rc */
-		o1 = AOP_RRR(uint32(v)&^uint32(t), REGTMP, uint32(r), uint32(p.From.Reg))
-		o2 = AOP_RRR(OP_MULLD, REGTMP, REGTMP, uint32(p.From.Reg))
-		o3 = AOP_RRR(OP_SUBF|uint32(t), uint32(p.To.Reg), REGTMP, uint32(r))
-
-	case 52: /* mtfsbNx cr(n) */
-		v := regoff(ctxt, &p.From) & 31
-
-		o1 = AOP_RRR(uint32(oprrr(ctxt, int(p.As))), uint32(v), 0, 0)
-
-	case 53: /* mffsX ,fr1 */
-		o1 = AOP_RRR(OP_MFFS, uint32(p.To.Reg), 0, 0)
-
-	case 54: /* mov msr,r1; mov r1, msr*/
-		if oclass(&p.From) == C_REG {
-			if p.As == AMOVD {
-				o1 = AOP_RRR(OP_MTMSRD, uint32(p.From.Reg), 0, 0)
-			} else {
-				o1 = AOP_RRR(OP_MTMSR, uint32(p.From.Reg), 0, 0)
-			}
-		} else {
-			o1 = AOP_RRR(OP_MFMSR, uint32(p.To.Reg), 0, 0)
-		}
-
-	case 55: /* op Rb, Rd */
-		o1 = AOP_RRR(uint32(oprrr(ctxt, int(p.As))), uint32(p.To.Reg), 0, uint32(p.From.Reg))
-
-	case 56: /* sra $sh,[s,]a; srd $sh,[s,]a */
-		v := regoff(ctxt, &p.From)
-
-		r := int(p.Reg)
-		if r == 0 {
-			r = int(p.To.Reg)
-		}
-		o1 = AOP_RRR(uint32(opirr(ctxt, int(p.As))), uint32(r), uint32(p.To.Reg), uint32(v)&31)
-		if p.As == ASRAD && (v&0x20 != 0) {
-			o1 |= 1 << 1 /* mb[5] */
-		}
-
-	case 57: /* slw $sh,[s,]a -> rlwinm ... */
-		v := regoff(ctxt, &p.From)
-
-		r := int(p.Reg)
-		if r == 0 {
-			r = int(p.To.Reg)
-		}
-
-		/*
-			 * Let user (gs) shoot himself in the foot.
-			 * qc has already complained.
-			 *
-			if(v < 0 || v > 31)
-				ctxt->diag("illegal shift %ld\n%v", v, p);
-		*/
-		if v < 0 {
-			v = 0
-		} else if v > 32 {
-			v = 32
-		}
-		var mask [2]uint8
-		if p.As == ASRW || p.As == ASRWCC { /* shift right */
-			mask[0] = uint8(v)
-			mask[1] = 31
-			v = 32 - v
-		} else {
-			mask[0] = 0
-			mask[1] = uint8(31 - v)
-		}
-
-		o1 = OP_RLW(OP_RLWINM, uint32(p.To.Reg), uint32(r), uint32(v), uint32(mask[0]), uint32(mask[1]))
-		if p.As == ASLWCC || p.As == ASRWCC {
-			o1 |= 1 /* Rc */
-		}
-
-	case 58: /* logical $andcon,[s],a */
-		v := regoff(ctxt, &p.From)
-
-		r := int(p.Reg)
-		if r == 0 {
-			r = int(p.To.Reg)
-		}
-		o1 = LOP_IRR(uint32(opirr(ctxt, int(p.As))), uint32(p.To.Reg), uint32(r), uint32(v))
-
-	case 59: /* or/and $ucon,,r */
-		v := regoff(ctxt, &p.From)
-
-		r := int(p.Reg)
-		if r == 0 {
-			r = int(p.To.Reg)
-		}
-		o1 = LOP_IRR(uint32(opirr(ctxt, int(p.As)+ALAST)), uint32(p.To.Reg), uint32(r), uint32(v)>>16) /* oris, xoris, andis */
-
-	case 60: /* tw to,a,b */
-		r := int(regoff(ctxt, &p.From) & 31)
-
-		o1 = AOP_RRR(uint32(oprrr(ctxt, int(p.As))), uint32(r), uint32(p.Reg), uint32(p.To.Reg))
-
-	case 61: /* tw to,a,$simm */
-		r := int(regoff(ctxt, &p.From) & 31)
-
-		v := regoff(ctxt, &p.To)
-		o1 = AOP_IRR(uint32(opirr(ctxt, int(p.As))), uint32(r), uint32(p.Reg), uint32(v))
-
-	case 62: /* rlwmi $sh,s,$mask,a */
-		v := regoff(ctxt, &p.From)
-
-		var mask [2]uint8
-		maskgen(ctxt, p, mask[:], uint32(regoff(ctxt, p.From3)))
-		o1 = AOP_RRR(uint32(opirr(ctxt, int(p.As))), uint32(p.Reg), uint32(p.To.Reg), uint32(v))
-		o1 |= (uint32(mask[0])&31)<<6 | (uint32(mask[1])&31)<<1
-
-	case 63: /* rlwmi b,s,$mask,a */
-		var mask [2]uint8
-		maskgen(ctxt, p, mask[:], uint32(regoff(ctxt, p.From3)))
-
-		o1 = AOP_RRR(uint32(opirr(ctxt, int(p.As))), uint32(p.Reg), uint32(p.To.Reg), uint32(p.From.Reg))
-		o1 |= (uint32(mask[0])&31)<<6 | (uint32(mask[1])&31)<<1
-
-	case 64: /* mtfsf fr[, $m] {,fpcsr} */
-		var v int32
-		if p.From3Type() != obj.TYPE_NONE {
-			v = regoff(ctxt, p.From3) & 255
-		} else {
-			v = 255
-		}
-		o1 = OP_MTFSF | uint32(v)<<17 | uint32(p.From.Reg)<<11
-
-	case 65: /* MOVFL $imm,FPSCR(n) => mtfsfi crfd,imm */
-		if p.To.Reg == 0 {
-			ctxt.Diag("must specify FPSCR(n)\n%v", p)
-		}
-		o1 = OP_MTFSFI | (uint32(p.To.Reg)&15)<<23 | (uint32(regoff(ctxt, &p.From))&31)<<12
-
-	case 66: /* mov spr,r1; mov r1,spr, also dcr */
-		var r int
-		var v int32
-		if REG_R0 <= p.From.Reg && p.From.Reg <= REG_R31 {
-			r = int(p.From.Reg)
-			v = int32(p.To.Reg)
-			if REG_DCR0 <= v && v <= REG_DCR0+1023 {
-				o1 = OPVCC(31, 451, 0, 0) /* mtdcr */
-			} else {
-				o1 = OPVCC(31, 467, 0, 0) /* mtspr */
-			}
-		} else {
-			r = int(p.To.Reg)
-			v = int32(p.From.Reg)
-			if REG_DCR0 <= v && v <= REG_DCR0+1023 {
-				o1 = OPVCC(31, 323, 0, 0) /* mfdcr */
-			} else {
-				o1 = OPVCC(31, 339, 0, 0) /* mfspr */
-			}
-		}
-
-		o1 = AOP_RRR(o1, uint32(r), 0, 0) | (uint32(v)&0x1f)<<16 | ((uint32(v)>>5)&0x1f)<<11
-
-	case 67: /* mcrf crfD,crfS */
-		if p.From.Type != obj.TYPE_REG || p.From.Reg < REG_CR0 || REG_CR7 < p.From.Reg || p.To.Type != obj.TYPE_REG || p.To.Reg < REG_CR0 || REG_CR7 < p.To.Reg {
-			ctxt.Diag("illegal CR field number\n%v", p)
-		}
-		o1 = AOP_RRR(OP_MCRF, ((uint32(p.To.Reg) & 7) << 2), ((uint32(p.From.Reg) & 7) << 2), 0)
-
-	case 68: /* mfcr rD; mfocrf CRM,rD */
-		if p.From.Type == obj.TYPE_REG && REG_CR0 <= p.From.Reg && p.From.Reg <= REG_CR7 {
-			v := int32(1 << uint(7-(p.To.Reg&7)))                                 /* CR(n) */
-			o1 = AOP_RRR(OP_MFCR, uint32(p.To.Reg), 0, 0) | 1<<20 | uint32(v)<<12 /* new form, mfocrf */
-		} else {
-			o1 = AOP_RRR(OP_MFCR, uint32(p.To.Reg), 0, 0) /* old form, whole register */
-		}
-
-	case 69: /* mtcrf CRM,rS */
-		var v int32
-		if p.From3Type() != obj.TYPE_NONE {
-			if p.To.Reg != 0 {
-				ctxt.Diag("can't use both mask and CR(n)\n%v", p)
-			}
-			v = regoff(ctxt, p.From3) & 0xff
-		} else {
-			if p.To.Reg == 0 {
-				v = 0xff /* CR */
-			} else {
-				v = 1 << uint(7-(p.To.Reg&7)) /* CR(n) */
-			}
-		}
-
-		o1 = AOP_RRR(OP_MTCRF, uint32(p.From.Reg), 0, 0) | uint32(v)<<12
-
-	case 70: /* [f]cmp r,r,cr*/
-		var r int
-		if p.Reg == 0 {
-			r = 0
-		} else {
-			r = (int(p.Reg) & 7) << 2
-		}
-		o1 = AOP_RRR(uint32(oprrr(ctxt, int(p.As))), uint32(r), uint32(p.From.Reg), uint32(p.To.Reg))
-
-	case 71: /* cmp[l] r,i,cr*/
-		var r int
-		if p.Reg == 0 {
-			r = 0
-		} else {
-			r = (int(p.Reg) & 7) << 2
-		}
-		o1 = AOP_RRR(uint32(opirr(ctxt, int(p.As))), uint32(r), uint32(p.From.Reg), 0) | uint32(regoff(ctxt, &p.To))&0xffff
-
-	case 72: /* slbmte (Rb+Rs -> slb[Rb]) -> Rs, Rb */
-		o1 = AOP_RRR(uint32(oprrr(ctxt, int(p.As))), uint32(p.From.Reg), 0, uint32(p.To.Reg))
-
-	case 73: /* mcrfs crfD,crfS */
-		if p.From.Type != obj.TYPE_REG || p.From.Reg != REG_FPSCR || p.To.Type != obj.TYPE_REG || p.To.Reg < REG_CR0 || REG_CR7 < p.To.Reg {
-			ctxt.Diag("illegal FPSCR/CR field number\n%v", p)
-		}
-		o1 = AOP_RRR(OP_MCRFS, ((uint32(p.To.Reg) & 7) << 2), ((0 & 7) << 2), 0)
-
-	case 77: /* syscall $scon, syscall Rx */
-		if p.From.Type == obj.TYPE_CONST {
-			if p.From.Offset > BIG || p.From.Offset < -BIG {
-				ctxt.Diag("illegal syscall, sysnum too large: %v", p)
-			}
-			o1 = AOP_IRR(OP_ADDI, REGZERO, REGZERO, uint32(p.From.Offset))
-		} else if p.From.Type == obj.TYPE_REG {
-			o1 = LOP_RRR(OP_OR, REGZERO, uint32(p.From.Reg), uint32(p.From.Reg))
-		} else {
-			ctxt.Diag("illegal syscall: %v", p)
-			o1 = 0x7fe00008 // trap always
-		}
-
-		o2 = uint32(oprrr(ctxt, int(p.As)))
-		o3 = AOP_RRR(uint32(oprrr(ctxt, AXOR)), REGZERO, REGZERO, REGZERO) // XOR R0, R0
-
-	case 78: /* undef */
-		o1 = 0 /* "An instruction consisting entirely of binary 0s is guaranteed
-		   always to be an illegal instruction."  */
-
-		/* relocation operations */
-	case 74:
-		v := regoff(ctxt, &p.To)
-
-		o1 = AOP_IRR(OP_ADDIS, REGTMP, REGZERO, uint32(high16adjusted(v)))
-		o2 = AOP_IRR(uint32(opstore(ctxt, int(p.As))), uint32(p.From.Reg), REGTMP, uint32(v))
-		addaddrreloc(ctxt, p.To.Sym, &o1, &o2)
-
-	//if(dlm) reloc(&p->to, p->pc, 1);
-
-	case 75:
-		v := regoff(ctxt, &p.From)
-		o1 = AOP_IRR(OP_ADDIS, REGTMP, REGZERO, uint32(high16adjusted(v)))
-		o2 = AOP_IRR(uint32(opload(ctxt, int(p.As))), uint32(p.To.Reg), REGTMP, uint32(v))
-		addaddrreloc(ctxt, p.From.Sym, &o1, &o2)
-
-	//if(dlm) reloc(&p->from, p->pc, 1);
-
-	case 76:
-		v := regoff(ctxt, &p.From)
-		o1 = AOP_IRR(OP_ADDIS, REGTMP, REGZERO, uint32(high16adjusted(v)))
-		o2 = AOP_IRR(uint32(opload(ctxt, int(p.As))), uint32(p.To.Reg), REGTMP, uint32(v))
-		addaddrreloc(ctxt, p.From.Sym, &o1, &o2)
-		o3 = LOP_RRR(OP_EXTSB, uint32(p.To.Reg), uint32(p.To.Reg), 0)
-
-		//if(dlm) reloc(&p->from, p->pc, 1);
-
-	}
-
-	out[0] = o1
-	out[1] = o2
-	out[2] = o3
-	out[3] = o4
-	out[4] = o5
-	return
-}
-
-func vregoff(ctxt *obj.Link, a *obj.Addr) int64 {
-	ctxt.Instoffset = 0
-	if a != nil {
-		aclass(ctxt, a)
-	}
-	return ctxt.Instoffset
-}
-
-func regoff(ctxt *obj.Link, a *obj.Addr) int32 {
-	return int32(vregoff(ctxt, a))
-}
-
-func oprrr(ctxt *obj.Link, a int) int32 {
-	switch a {
-	case AADD:
-		return int32(OPVCC(31, 266, 0, 0))
-	case AADDCC:
-		return int32(OPVCC(31, 266, 0, 1))
-	case AADDV:
-		return int32(OPVCC(31, 266, 1, 0))
-	case AADDVCC:
-		return int32(OPVCC(31, 266, 1, 1))
-	case AADDC:
-		return int32(OPVCC(31, 10, 0, 0))
-	case AADDCCC:
-		return int32(OPVCC(31, 10, 0, 1))
-	case AADDCV:
-		return int32(OPVCC(31, 10, 1, 0))
-	case AADDCVCC:
-		return int32(OPVCC(31, 10, 1, 1))
-	case AADDE:
-		return int32(OPVCC(31, 138, 0, 0))
-	case AADDECC:
-		return int32(OPVCC(31, 138, 0, 1))
-	case AADDEV:
-		return int32(OPVCC(31, 138, 1, 0))
-	case AADDEVCC:
-		return int32(OPVCC(31, 138, 1, 1))
-	case AADDME:
-		return int32(OPVCC(31, 234, 0, 0))
-	case AADDMECC:
-		return int32(OPVCC(31, 234, 0, 1))
-	case AADDMEV:
-		return int32(OPVCC(31, 234, 1, 0))
-	case AADDMEVCC:
-		return int32(OPVCC(31, 234, 1, 1))
-	case AADDZE:
-		return int32(OPVCC(31, 202, 0, 0))
-	case AADDZECC:
-		return int32(OPVCC(31, 202, 0, 1))
-	case AADDZEV:
-		return int32(OPVCC(31, 202, 1, 0))
-	case AADDZEVCC:
-		return int32(OPVCC(31, 202, 1, 1))
-
-	case AAND:
-		return int32(OPVCC(31, 28, 0, 0))
-	case AANDCC:
-		return int32(OPVCC(31, 28, 0, 1))
-	case AANDN:
-		return int32(OPVCC(31, 60, 0, 0))
-	case AANDNCC:
-		return int32(OPVCC(31, 60, 0, 1))
-
-	case ACMP:
-		return int32(OPVCC(31, 0, 0, 0) | 1<<21) /* L=1 */
-	case ACMPU:
-		return int32(OPVCC(31, 32, 0, 0) | 1<<21)
-	case ACMPW:
-		return int32(OPVCC(31, 0, 0, 0)) /* L=0 */
-	case ACMPWU:
-		return int32(OPVCC(31, 32, 0, 0))
-
-	case ACNTLZW:
-		return int32(OPVCC(31, 26, 0, 0))
-	case ACNTLZWCC:
-		return int32(OPVCC(31, 26, 0, 1))
-	case ACNTLZD:
-		return int32(OPVCC(31, 58, 0, 0))
-	case ACNTLZDCC:
-		return int32(OPVCC(31, 58, 0, 1))
-
-	case ACRAND:
-		return int32(OPVCC(19, 257, 0, 0))
-	case ACRANDN:
-		return int32(OPVCC(19, 129, 0, 0))
-	case ACREQV:
-		return int32(OPVCC(19, 289, 0, 0))
-	case ACRNAND:
-		return int32(OPVCC(19, 225, 0, 0))
-	case ACRNOR:
-		return int32(OPVCC(19, 33, 0, 0))
-	case ACROR:
-		return int32(OPVCC(19, 449, 0, 0))
-	case ACRORN:
-		return int32(OPVCC(19, 417, 0, 0))
-	case ACRXOR:
-		return int32(OPVCC(19, 193, 0, 0))
-
-	case ADCBF:
-		return int32(OPVCC(31, 86, 0, 0))
-	case ADCBI:
-		return int32(OPVCC(31, 470, 0, 0))
-	case ADCBST:
-		return int32(OPVCC(31, 54, 0, 0))
-	case ADCBT:
-		return int32(OPVCC(31, 278, 0, 0))
-	case ADCBTST:
-		return int32(OPVCC(31, 246, 0, 0))
-	case ADCBZ:
-		return int32(OPVCC(31, 1014, 0, 0))
-
-	case AREM, ADIVW:
-		return int32(OPVCC(31, 491, 0, 0))
-
-	case AREMCC, ADIVWCC:
-		return int32(OPVCC(31, 491, 0, 1))
-
-	case AREMV, ADIVWV:
-		return int32(OPVCC(31, 491, 1, 0))
-
-	case AREMVCC, ADIVWVCC:
-		return int32(OPVCC(31, 491, 1, 1))
-
-	case AREMU, ADIVWU:
-		return int32(OPVCC(31, 459, 0, 0))
-
-	case AREMUCC, ADIVWUCC:
-		return int32(OPVCC(31, 459, 0, 1))
-
-	case AREMUV, ADIVWUV:
-		return int32(OPVCC(31, 459, 1, 0))
-
-	case AREMUVCC, ADIVWUVCC:
-		return int32(OPVCC(31, 459, 1, 1))
-
-	case AREMD, ADIVD:
-		return int32(OPVCC(31, 489, 0, 0))
-
-	case AREMDCC, ADIVDCC:
-		return int32(OPVCC(31, 489, 0, 1))
-
-	case AREMDV, ADIVDV:
-		return int32(OPVCC(31, 489, 1, 0))
-
-	case AREMDVCC, ADIVDVCC:
-		return int32(OPVCC(31, 489, 1, 1))
-
-	case AREMDU, ADIVDU:
-		return int32(OPVCC(31, 457, 0, 0))
-
-	case AREMDUCC, ADIVDUCC:
-		return int32(OPVCC(31, 457, 0, 1))
-
-	case AREMDUV, ADIVDUV:
-		return int32(OPVCC(31, 457, 1, 0))
-
-	case AREMDUVCC, ADIVDUVCC:
-		return int32(OPVCC(31, 457, 1, 1))
-
-	case AEIEIO:
-		return int32(OPVCC(31, 854, 0, 0))
-
-	case AEQV:
-		return int32(OPVCC(31, 284, 0, 0))
-	case AEQVCC:
-		return int32(OPVCC(31, 284, 0, 1))
-
-	case AEXTSB:
-		return int32(OPVCC(31, 954, 0, 0))
-	case AEXTSBCC:
-		return int32(OPVCC(31, 954, 0, 1))
-	case AEXTSH:
-		return int32(OPVCC(31, 922, 0, 0))
-	case AEXTSHCC:
-		return int32(OPVCC(31, 922, 0, 1))
-	case AEXTSW:
-		return int32(OPVCC(31, 986, 0, 0))
-	case AEXTSWCC:
-		return int32(OPVCC(31, 986, 0, 1))
-
-	case AFABS:
-		return int32(OPVCC(63, 264, 0, 0))
-	case AFABSCC:
-		return int32(OPVCC(63, 264, 0, 1))
-	case AFADD:
-		return int32(OPVCC(63, 21, 0, 0))
-	case AFADDCC:
-		return int32(OPVCC(63, 21, 0, 1))
-	case AFADDS:
-		return int32(OPVCC(59, 21, 0, 0))
-	case AFADDSCC:
-		return int32(OPVCC(59, 21, 0, 1))
-	case AFCMPO:
-		return int32(OPVCC(63, 32, 0, 0))
-	case AFCMPU:
-		return int32(OPVCC(63, 0, 0, 0))
-	case AFCFID:
-		return int32(OPVCC(63, 846, 0, 0))
-	case AFCFIDCC:
-		return int32(OPVCC(63, 846, 0, 1))
-	case AFCTIW:
-		return int32(OPVCC(63, 14, 0, 0))
-	case AFCTIWCC:
-		return int32(OPVCC(63, 14, 0, 1))
-	case AFCTIWZ:
-		return int32(OPVCC(63, 15, 0, 0))
-	case AFCTIWZCC:
-		return int32(OPVCC(63, 15, 0, 1))
-	case AFCTID:
-		return int32(OPVCC(63, 814, 0, 0))
-	case AFCTIDCC:
-		return int32(OPVCC(63, 814, 0, 1))
-	case AFCTIDZ:
-		return int32(OPVCC(63, 815, 0, 0))
-	case AFCTIDZCC:
-		return int32(OPVCC(63, 815, 0, 1))
-	case AFDIV:
-		return int32(OPVCC(63, 18, 0, 0))
-	case AFDIVCC:
-		return int32(OPVCC(63, 18, 0, 1))
-	case AFDIVS:
-		return int32(OPVCC(59, 18, 0, 0))
-	case AFDIVSCC:
-		return int32(OPVCC(59, 18, 0, 1))
-	case AFMADD:
-		return int32(OPVCC(63, 29, 0, 0))
-	case AFMADDCC:
-		return int32(OPVCC(63, 29, 0, 1))
-	case AFMADDS:
-		return int32(OPVCC(59, 29, 0, 0))
-	case AFMADDSCC:
-		return int32(OPVCC(59, 29, 0, 1))
-
-	case AFMOVS, AFMOVD:
-		return int32(OPVCC(63, 72, 0, 0)) /* load */
-	case AFMOVDCC:
-		return int32(OPVCC(63, 72, 0, 1))
-	case AFMSUB:
-		return int32(OPVCC(63, 28, 0, 0))
-	case AFMSUBCC:
-		return int32(OPVCC(63, 28, 0, 1))
-	case AFMSUBS:
-		return int32(OPVCC(59, 28, 0, 0))
-	case AFMSUBSCC:
-		return int32(OPVCC(59, 28, 0, 1))
-	case AFMUL:
-		return int32(OPVCC(63, 25, 0, 0))
-	case AFMULCC:
-		return int32(OPVCC(63, 25, 0, 1))
-	case AFMULS:
-		return int32(OPVCC(59, 25, 0, 0))
-	case AFMULSCC:
-		return int32(OPVCC(59, 25, 0, 1))
-	case AFNABS:
-		return int32(OPVCC(63, 136, 0, 0))
-	case AFNABSCC:
-		return int32(OPVCC(63, 136, 0, 1))
-	case AFNEG:
-		return int32(OPVCC(63, 40, 0, 0))
-	case AFNEGCC:
-		return int32(OPVCC(63, 40, 0, 1))
-	case AFNMADD:
-		return int32(OPVCC(63, 31, 0, 0))
-	case AFNMADDCC:
-		return int32(OPVCC(63, 31, 0, 1))
-	case AFNMADDS:
-		return int32(OPVCC(59, 31, 0, 0))
-	case AFNMADDSCC:
-		return int32(OPVCC(59, 31, 0, 1))
-	case AFNMSUB:
-		return int32(OPVCC(63, 30, 0, 0))
-	case AFNMSUBCC:
-		return int32(OPVCC(63, 30, 0, 1))
-	case AFNMSUBS:
-		return int32(OPVCC(59, 30, 0, 0))
-	case AFNMSUBSCC:
-		return int32(OPVCC(59, 30, 0, 1))
-	case AFRES:
-		return int32(OPVCC(59, 24, 0, 0))
-	case AFRESCC:
-		return int32(OPVCC(59, 24, 0, 1))
-	case AFRSP:
-		return int32(OPVCC(63, 12, 0, 0))
-	case AFRSPCC:
-		return int32(OPVCC(63, 12, 0, 1))
-	case AFRSQRTE:
-		return int32(OPVCC(63, 26, 0, 0))
-	case AFRSQRTECC:
-		return int32(OPVCC(63, 26, 0, 1))
-	case AFSEL:
-		return int32(OPVCC(63, 23, 0, 0))
-	case AFSELCC:
-		return int32(OPVCC(63, 23, 0, 1))
-	case AFSQRT:
-		return int32(OPVCC(63, 22, 0, 0))
-	case AFSQRTCC:
-		return int32(OPVCC(63, 22, 0, 1))
-	case AFSQRTS:
-		return int32(OPVCC(59, 22, 0, 0))
-	case AFSQRTSCC:
-		return int32(OPVCC(59, 22, 0, 1))
-	case AFSUB:
-		return int32(OPVCC(63, 20, 0, 0))
-	case AFSUBCC:
-		return int32(OPVCC(63, 20, 0, 1))
-	case AFSUBS:
-		return int32(OPVCC(59, 20, 0, 0))
-	case AFSUBSCC:
-		return int32(OPVCC(59, 20, 0, 1))
-
-	case AICBI:
-		return int32(OPVCC(31, 982, 0, 0))
-	case AISYNC:
-		return int32(OPVCC(19, 150, 0, 0))
-
-	case AMTFSB0:
-		return int32(OPVCC(63, 70, 0, 0))
-	case AMTFSB0CC:
-		return int32(OPVCC(63, 70, 0, 1))
-	case AMTFSB1:
-		return int32(OPVCC(63, 38, 0, 0))
-	case AMTFSB1CC:
-		return int32(OPVCC(63, 38, 0, 1))
-
-	case AMULHW:
-		return int32(OPVCC(31, 75, 0, 0))
-	case AMULHWCC:
-		return int32(OPVCC(31, 75, 0, 1))
-	case AMULHWU:
-		return int32(OPVCC(31, 11, 0, 0))
-	case AMULHWUCC:
-		return int32(OPVCC(31, 11, 0, 1))
-	case AMULLW:
-		return int32(OPVCC(31, 235, 0, 0))
-	case AMULLWCC:
-		return int32(OPVCC(31, 235, 0, 1))
-	case AMULLWV:
-		return int32(OPVCC(31, 235, 1, 0))
-	case AMULLWVCC:
-		return int32(OPVCC(31, 235, 1, 1))
-
-	case AMULHD:
-		return int32(OPVCC(31, 73, 0, 0))
-	case AMULHDCC:
-		return int32(OPVCC(31, 73, 0, 1))
-	case AMULHDU:
-		return int32(OPVCC(31, 9, 0, 0))
-	case AMULHDUCC:
-		return int32(OPVCC(31, 9, 0, 1))
-	case AMULLD:
-		return int32(OPVCC(31, 233, 0, 0))
-	case AMULLDCC:
-		return int32(OPVCC(31, 233, 0, 1))
-	case AMULLDV:
-		return int32(OPVCC(31, 233, 1, 0))
-	case AMULLDVCC:
-		return int32(OPVCC(31, 233, 1, 1))
-
-	case ANAND:
-		return int32(OPVCC(31, 476, 0, 0))
-	case ANANDCC:
-		return int32(OPVCC(31, 476, 0, 1))
-	case ANEG:
-		return int32(OPVCC(31, 104, 0, 0))
-	case ANEGCC:
-		return int32(OPVCC(31, 104, 0, 1))
-	case ANEGV:
-		return int32(OPVCC(31, 104, 1, 0))
-	case ANEGVCC:
-		return int32(OPVCC(31, 104, 1, 1))
-	case ANOR:
-		return int32(OPVCC(31, 124, 0, 0))
-	case ANORCC:
-		return int32(OPVCC(31, 124, 0, 1))
-	case AOR:
-		return int32(OPVCC(31, 444, 0, 0))
-	case AORCC:
-		return int32(OPVCC(31, 444, 0, 1))
-	case AORN:
-		return int32(OPVCC(31, 412, 0, 0))
-	case AORNCC:
-		return int32(OPVCC(31, 412, 0, 1))
-
-	case ARFI:
-		return int32(OPVCC(19, 50, 0, 0))
-	case ARFCI:
-		return int32(OPVCC(19, 51, 0, 0))
-	case ARFID:
-		return int32(OPVCC(19, 18, 0, 0))
-	case AHRFID:
-		return int32(OPVCC(19, 274, 0, 0))
-
-	case ARLWMI:
-		return int32(OPVCC(20, 0, 0, 0))
-	case ARLWMICC:
-		return int32(OPVCC(20, 0, 0, 1))
-	case ARLWNM:
-		return int32(OPVCC(23, 0, 0, 0))
-	case ARLWNMCC:
-		return int32(OPVCC(23, 0, 0, 1))
-
-	case ARLDCL:
-		return int32(OPVCC(30, 8, 0, 0))
-	case ARLDCR:
-		return int32(OPVCC(30, 9, 0, 0))
-
-	case ASYSCALL:
-		return int32(OPVCC(17, 1, 0, 0))
-
-	case ASLW:
-		return int32(OPVCC(31, 24, 0, 0))
-	case ASLWCC:
-		return int32(OPVCC(31, 24, 0, 1))
-	case ASLD:
-		return int32(OPVCC(31, 27, 0, 0))
-	case ASLDCC:
-		return int32(OPVCC(31, 27, 0, 1))
-
-	case ASRAW:
-		return int32(OPVCC(31, 792, 0, 0))
-	case ASRAWCC:
-		return int32(OPVCC(31, 792, 0, 1))
-	case ASRAD:
-		return int32(OPVCC(31, 794, 0, 0))
-	case ASRADCC:
-		return int32(OPVCC(31, 794, 0, 1))
-
-	case ASRW:
-		return int32(OPVCC(31, 536, 0, 0))
-	case ASRWCC:
-		return int32(OPVCC(31, 536, 0, 1))
-	case ASRD:
-		return int32(OPVCC(31, 539, 0, 0))
-	case ASRDCC:
-		return int32(OPVCC(31, 539, 0, 1))
-
-	case ASUB:
-		return int32(OPVCC(31, 40, 0, 0))
-	case ASUBCC:
-		return int32(OPVCC(31, 40, 0, 1))
-	case ASUBV:
-		return int32(OPVCC(31, 40, 1, 0))
-	case ASUBVCC:
-		return int32(OPVCC(31, 40, 1, 1))
-	case ASUBC:
-		return int32(OPVCC(31, 8, 0, 0))
-	case ASUBCCC:
-		return int32(OPVCC(31, 8, 0, 1))
-	case ASUBCV:
-		return int32(OPVCC(31, 8, 1, 0))
-	case ASUBCVCC:
-		return int32(OPVCC(31, 8, 1, 1))
-	case ASUBE:
-		return int32(OPVCC(31, 136, 0, 0))
-	case ASUBECC:
-		return int32(OPVCC(31, 136, 0, 1))
-	case ASUBEV:
-		return int32(OPVCC(31, 136, 1, 0))
-	case ASUBEVCC:
-		return int32(OPVCC(31, 136, 1, 1))
-	case ASUBME:
-		return int32(OPVCC(31, 232, 0, 0))
-	case ASUBMECC:
-		return int32(OPVCC(31, 232, 0, 1))
-	case ASUBMEV:
-		return int32(OPVCC(31, 232, 1, 0))
-	case ASUBMEVCC:
-		return int32(OPVCC(31, 232, 1, 1))
-	case ASUBZE:
-		return int32(OPVCC(31, 200, 0, 0))
-	case ASUBZECC:
-		return int32(OPVCC(31, 200, 0, 1))
-	case ASUBZEV:
-		return int32(OPVCC(31, 200, 1, 0))
-	case ASUBZEVCC:
-		return int32(OPVCC(31, 200, 1, 1))
-
-	case ASYNC:
-		return int32(OPVCC(31, 598, 0, 0))
-	case APTESYNC:
-		return int32(OPVCC(31, 598, 0, 0) | 2<<21)
-
-	case ATLBIE:
-		return int32(OPVCC(31, 306, 0, 0))
-	case ATLBIEL:
-		return int32(OPVCC(31, 274, 0, 0))
-	case ATLBSYNC:
-		return int32(OPVCC(31, 566, 0, 0))
-	case ASLBIA:
-		return int32(OPVCC(31, 498, 0, 0))
-	case ASLBIE:
-		return int32(OPVCC(31, 434, 0, 0))
-	case ASLBMFEE:
-		return int32(OPVCC(31, 915, 0, 0))
-	case ASLBMFEV:
-		return int32(OPVCC(31, 851, 0, 0))
-	case ASLBMTE:
-		return int32(OPVCC(31, 402, 0, 0))
-
-	case ATW:
-		return int32(OPVCC(31, 4, 0, 0))
-	case ATD:
-		return int32(OPVCC(31, 68, 0, 0))
-
-	case AXOR:
-		return int32(OPVCC(31, 316, 0, 0))
-	case AXORCC:
-		return int32(OPVCC(31, 316, 0, 1))
-	}
-
-	ctxt.Diag("bad r/r opcode %v", obj.Aconv(a))
-	return 0
-}
-
-func opirr(ctxt *obj.Link, a int) int32 {
-	switch a {
-	case AADD:
-		return int32(OPVCC(14, 0, 0, 0))
-	case AADDC:
-		return int32(OPVCC(12, 0, 0, 0))
-	case AADDCCC:
-		return int32(OPVCC(13, 0, 0, 0))
-	case AADD + ALAST:
-		return int32(OPVCC(15, 0, 0, 0)) /* ADDIS/CAU */
-
-	case AANDCC:
-		return int32(OPVCC(28, 0, 0, 0))
-	case AANDCC + ALAST:
-		return int32(OPVCC(29, 0, 0, 0)) /* ANDIS./ANDIU. */
-
-	case ABR:
-		return int32(OPVCC(18, 0, 0, 0))
-	case ABL:
-		return int32(OPVCC(18, 0, 0, 0) | 1)
-	case obj.ADUFFZERO:
-		return int32(OPVCC(18, 0, 0, 0) | 1)
-	case obj.ADUFFCOPY:
-		return int32(OPVCC(18, 0, 0, 0) | 1)
-	case ABC:
-		return int32(OPVCC(16, 0, 0, 0))
-	case ABCL:
-		return int32(OPVCC(16, 0, 0, 0) | 1)
-
-	case ABEQ:
-		return int32(AOP_RRR(16<<26, 12, 2, 0))
-	case ABGE:
-		return int32(AOP_RRR(16<<26, 4, 0, 0))
-	case ABGT:
-		return int32(AOP_RRR(16<<26, 12, 1, 0))
-	case ABLE:
-		return int32(AOP_RRR(16<<26, 4, 1, 0))
-	case ABLT:
-		return int32(AOP_RRR(16<<26, 12, 0, 0))
-	case ABNE:
-		return int32(AOP_RRR(16<<26, 4, 2, 0))
-	case ABVC:
-		return int32(AOP_RRR(16<<26, 4, 3, 0))
-	case ABVS:
-		return int32(AOP_RRR(16<<26, 12, 3, 0))
-
-	case ACMP:
-		return int32(OPVCC(11, 0, 0, 0) | 1<<21) /* L=1 */
-	case ACMPU:
-		return int32(OPVCC(10, 0, 0, 0) | 1<<21)
-	case ACMPW:
-		return int32(OPVCC(11, 0, 0, 0)) /* L=0 */
-	case ACMPWU:
-		return int32(OPVCC(10, 0, 0, 0))
-	case ALSW:
-		return int32(OPVCC(31, 597, 0, 0))
-
-	case AMULLW:
-		return int32(OPVCC(7, 0, 0, 0))
-
-	case AOR:
-		return int32(OPVCC(24, 0, 0, 0))
-	case AOR + ALAST:
-		return int32(OPVCC(25, 0, 0, 0)) /* ORIS/ORIU */
-
-	case ARLWMI:
-		return int32(OPVCC(20, 0, 0, 0)) /* rlwimi */
-	case ARLWMICC:
-		return int32(OPVCC(20, 0, 0, 1))
-	case ARLDMI:
-		return int32(OPVCC(30, 0, 0, 0) | 3<<2) /* rldimi */
-	case ARLDMICC:
-		return int32(OPVCC(30, 0, 0, 1) | 3<<2)
-
-	case ARLWNM:
-		return int32(OPVCC(21, 0, 0, 0)) /* rlwinm */
-	case ARLWNMCC:
-		return int32(OPVCC(21, 0, 0, 1))
-
-	case ARLDCL:
-		return int32(OPVCC(30, 0, 0, 0)) /* rldicl */
-	case ARLDCLCC:
-		return int32(OPVCC(30, 0, 0, 1))
-	case ARLDCR:
-		return int32(OPVCC(30, 1, 0, 0)) /* rldicr */
-	case ARLDCRCC:
-		return int32(OPVCC(30, 1, 0, 1))
-	case ARLDC:
-		return int32(OPVCC(30, 0, 0, 0) | 2<<2)
-	case ARLDCCC:
-		return int32(OPVCC(30, 0, 0, 1) | 2<<2)
-
-	case ASRAW:
-		return int32(OPVCC(31, 824, 0, 0))
-	case ASRAWCC:
-		return int32(OPVCC(31, 824, 0, 1))
-	case ASRAD:
-		return int32(OPVCC(31, (413 << 1), 0, 0))
-	case ASRADCC:
-		return int32(OPVCC(31, (413 << 1), 0, 1))
-
-	case ASTSW:
-		return int32(OPVCC(31, 725, 0, 0))
-
-	case ASUBC:
-		return int32(OPVCC(8, 0, 0, 0))
-
-	case ATW:
-		return int32(OPVCC(3, 0, 0, 0))
-	case ATD:
-		return int32(OPVCC(2, 0, 0, 0))
-
-	case AXOR:
-		return int32(OPVCC(26, 0, 0, 0)) /* XORIL */
-	case AXOR + ALAST:
-		return int32(OPVCC(27, 0, 0, 0)) /* XORIU */
-	}
-
-	ctxt.Diag("bad opcode i/r %v", obj.Aconv(a))
-	return 0
-}
-
-/*
- * load o(a),d
- */
-func opload(ctxt *obj.Link, a int) int32 {
-	switch a {
-	case AMOVD:
-		return int32(OPVCC(58, 0, 0, 0)) /* ld */
-	case AMOVDU:
-		return int32(OPVCC(58, 0, 0, 1)) /* ldu */
-	case AMOVWZ:
-		return int32(OPVCC(32, 0, 0, 0)) /* lwz */
-	case AMOVWZU:
-		return int32(OPVCC(33, 0, 0, 0)) /* lwzu */
-	case AMOVW:
-		return int32(OPVCC(58, 0, 0, 0) | 1<<1) /* lwa */
-
-		/* no AMOVWU */
-	case AMOVB, AMOVBZ:
-		return int32(OPVCC(34, 0, 0, 0))
-		/* load */
-
-	case AMOVBU, AMOVBZU:
-		return int32(OPVCC(35, 0, 0, 0))
-	case AFMOVD:
-		return int32(OPVCC(50, 0, 0, 0))
-	case AFMOVDU:
-		return int32(OPVCC(51, 0, 0, 0))
-	case AFMOVS:
-		return int32(OPVCC(48, 0, 0, 0))
-	case AFMOVSU:
-		return int32(OPVCC(49, 0, 0, 0))
-	case AMOVH:
-		return int32(OPVCC(42, 0, 0, 0))
-	case AMOVHU:
-		return int32(OPVCC(43, 0, 0, 0))
-	case AMOVHZ:
-		return int32(OPVCC(40, 0, 0, 0))
-	case AMOVHZU:
-		return int32(OPVCC(41, 0, 0, 0))
-	case AMOVMW:
-		return int32(OPVCC(46, 0, 0, 0)) /* lmw */
-	}
-
-	ctxt.Diag("bad load opcode %v", obj.Aconv(a))
-	return 0
-}
-
-/*
- * indexed load a(b),d
- */
-func oploadx(ctxt *obj.Link, a int) int32 {
-	switch a {
-	case AMOVWZ:
-		return int32(OPVCC(31, 23, 0, 0)) /* lwzx */
-	case AMOVWZU:
-		return int32(OPVCC(31, 55, 0, 0)) /* lwzux */
-	case AMOVW:
-		return int32(OPVCC(31, 341, 0, 0)) /* lwax */
-	case AMOVWU:
-		return int32(OPVCC(31, 373, 0, 0)) /* lwaux */
-
-	case AMOVB, AMOVBZ:
-		return int32(OPVCC(31, 87, 0, 0)) /* lbzx */
-
-	case AMOVBU, AMOVBZU:
-		return int32(OPVCC(31, 119, 0, 0)) /* lbzux */
-	case AFMOVD:
-		return int32(OPVCC(31, 599, 0, 0)) /* lfdx */
-	case AFMOVDU:
-		return int32(OPVCC(31, 631, 0, 0)) /*  lfdux */
-	case AFMOVS:
-		return int32(OPVCC(31, 535, 0, 0)) /* lfsx */
-	case AFMOVSU:
-		return int32(OPVCC(31, 567, 0, 0)) /* lfsux */
-	case AMOVH:
-		return int32(OPVCC(31, 343, 0, 0)) /* lhax */
-	case AMOVHU:
-		return int32(OPVCC(31, 375, 0, 0)) /* lhaux */
-	case AMOVHBR:
-		return int32(OPVCC(31, 790, 0, 0)) /* lhbrx */
-	case AMOVWBR:
-		return int32(OPVCC(31, 534, 0, 0)) /* lwbrx */
-	case AMOVHZ:
-		return int32(OPVCC(31, 279, 0, 0)) /* lhzx */
-	case AMOVHZU:
-		return int32(OPVCC(31, 311, 0, 0)) /* lhzux */
-	case AECIWX:
-		return int32(OPVCC(31, 310, 0, 0)) /* eciwx */
-	case ALWAR:
-		return int32(OPVCC(31, 20, 0, 0)) /* lwarx */
-	case ALDAR:
-		return int32(OPVCC(31, 84, 0, 0))
-	case ALSW:
-		return int32(OPVCC(31, 533, 0, 0)) /* lswx */
-	case AMOVD:
-		return int32(OPVCC(31, 21, 0, 0)) /* ldx */
-	case AMOVDU:
-		return int32(OPVCC(31, 53, 0, 0)) /* ldux */
-	}
-
-	ctxt.Diag("bad loadx opcode %v", obj.Aconv(a))
-	return 0
-}
-
-/*
- * store s,o(d)
- */
-func opstore(ctxt *obj.Link, a int) int32 {
-	switch a {
-	case AMOVB, AMOVBZ:
-		return int32(OPVCC(38, 0, 0, 0)) /* stb */
-
-	case AMOVBU, AMOVBZU:
-		return int32(OPVCC(39, 0, 0, 0)) /* stbu */
-	case AFMOVD:
-		return int32(OPVCC(54, 0, 0, 0)) /* stfd */
-	case AFMOVDU:
-		return int32(OPVCC(55, 0, 0, 0)) /* stfdu */
-	case AFMOVS:
-		return int32(OPVCC(52, 0, 0, 0)) /* stfs */
-	case AFMOVSU:
-		return int32(OPVCC(53, 0, 0, 0)) /* stfsu */
-
-	case AMOVHZ, AMOVH:
-		return int32(OPVCC(44, 0, 0, 0)) /* sth */
-
-	case AMOVHZU, AMOVHU:
-		return int32(OPVCC(45, 0, 0, 0)) /* sthu */
-	case AMOVMW:
-		return int32(OPVCC(47, 0, 0, 0)) /* stmw */
-	case ASTSW:
-		return int32(OPVCC(31, 725, 0, 0)) /* stswi */
-
-	case AMOVWZ, AMOVW:
-		return int32(OPVCC(36, 0, 0, 0)) /* stw */
-
-	case AMOVWZU, AMOVWU:
-		return int32(OPVCC(37, 0, 0, 0)) /* stwu */
-	case AMOVD:
-		return int32(OPVCC(62, 0, 0, 0)) /* std */
-	case AMOVDU:
-		return int32(OPVCC(62, 0, 0, 1)) /* stdu */
-	}
-
-	ctxt.Diag("unknown store opcode %v", obj.Aconv(a))
-	return 0
-}
-
-/*
- * indexed store s,a(b)
- */
-func opstorex(ctxt *obj.Link, a int) int32 {
-	switch a {
-	case AMOVB, AMOVBZ:
-		return int32(OPVCC(31, 215, 0, 0)) /* stbx */
-
-	case AMOVBU, AMOVBZU:
-		return int32(OPVCC(31, 247, 0, 0)) /* stbux */
-	case AFMOVD:
-		return int32(OPVCC(31, 727, 0, 0)) /* stfdx */
-	case AFMOVDU:
-		return int32(OPVCC(31, 759, 0, 0)) /* stfdux */
-	case AFMOVS:
-		return int32(OPVCC(31, 663, 0, 0)) /* stfsx */
-	case AFMOVSU:
-		return int32(OPVCC(31, 695, 0, 0)) /* stfsux */
-
-	case AMOVHZ, AMOVH:
-		return int32(OPVCC(31, 407, 0, 0)) /* sthx */
-	case AMOVHBR:
-		return int32(OPVCC(31, 918, 0, 0)) /* sthbrx */
-
-	case AMOVHZU, AMOVHU:
-		return int32(OPVCC(31, 439, 0, 0)) /* sthux */
-
-	case AMOVWZ, AMOVW:
-		return int32(OPVCC(31, 151, 0, 0)) /* stwx */
-
-	case AMOVWZU, AMOVWU:
-		return int32(OPVCC(31, 183, 0, 0)) /* stwux */
-	case ASTSW:
-		return int32(OPVCC(31, 661, 0, 0)) /* stswx */
-	case AMOVWBR:
-		return int32(OPVCC(31, 662, 0, 0)) /* stwbrx */
-	case ASTWCCC:
-		return int32(OPVCC(31, 150, 0, 1)) /* stwcx. */
-	case ASTDCCC:
-		return int32(OPVCC(31, 214, 0, 1)) /* stwdx. */
-	case AECOWX:
-		return int32(OPVCC(31, 438, 0, 0)) /* ecowx */
-	case AMOVD:
-		return int32(OPVCC(31, 149, 0, 0)) /* stdx */
-	case AMOVDU:
-		return int32(OPVCC(31, 181, 0, 0)) /* stdux */
-	}
-
-	ctxt.Diag("unknown storex opcode %v", obj.Aconv(a))
-	return 0
-}
diff --git a/src/cmd/internal/obj/ppc64/list9.go b/src/cmd/internal/obj/ppc64/list9.go
deleted file mode 100644
index 4cdcfbc..0000000
--- a/src/cmd/internal/obj/ppc64/list9.go
+++ /dev/null
@@ -1,98 +0,0 @@
-// cmd/9l/list.c from Vita Nuova.
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2008 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2008 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package ppc64
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-)
-
-func init() {
-	obj.RegisterRegister(obj.RBasePPC64, REG_DCR0+1024, Rconv)
-	obj.RegisterOpcode(obj.ABasePPC64, Anames)
-}
-
-func Rconv(r int) string {
-	if r == 0 {
-		return "NONE"
-	}
-	if r == REGG {
-		// Special case.
-		return "g"
-	}
-	if REG_R0 <= r && r <= REG_R31 {
-		return fmt.Sprintf("R%d", r-REG_R0)
-	}
-	if REG_F0 <= r && r <= REG_F31 {
-		return fmt.Sprintf("F%d", r-REG_F0)
-	}
-	if REG_CR0 <= r && r <= REG_CR7 {
-		return fmt.Sprintf("CR%d", r-REG_CR0)
-	}
-	if r == REG_CR {
-		return "CR"
-	}
-	if REG_SPR0 <= r && r <= REG_SPR0+1023 {
-		switch r {
-		case REG_XER:
-			return "XER"
-
-		case REG_LR:
-			return "LR"
-
-		case REG_CTR:
-			return "CTR"
-		}
-
-		return fmt.Sprintf("SPR(%d)", r-REG_SPR0)
-	}
-
-	if REG_DCR0 <= r && r <= REG_DCR0+1023 {
-		return fmt.Sprintf("DCR(%d)", r-REG_DCR0)
-	}
-	if r == REG_FPSCR {
-		return "FPSCR"
-	}
-	if r == REG_MSR {
-		return "MSR"
-	}
-
-	return fmt.Sprintf("Rgok(%d)", r-obj.RBasePPC64)
-}
-
-func DRconv(a int) string {
-	s := "C_??"
-	if a >= C_NONE && a <= C_NCLASS {
-		s = cnames9[a]
-	}
-	var fp string
-	fp += s
-	return fp
-}
diff --git a/src/cmd/internal/obj/ppc64/obj9.go b/src/cmd/internal/obj/ppc64/obj9.go
deleted file mode 100644
index 1eddc6f..0000000
--- a/src/cmd/internal/obj/ppc64/obj9.go
+++ /dev/null
@@ -1,968 +0,0 @@
-// cmd/9l/noop.c, cmd/9l/pass.c, cmd/9l/span.c from Vita Nuova.
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2008 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2008 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package ppc64
-
-import (
-	"cmd/internal/obj"
-	"encoding/binary"
-	"fmt"
-	"math"
-)
-
-func progedit(ctxt *obj.Link, p *obj.Prog) {
-	p.From.Class = 0
-	p.To.Class = 0
-
-	// Rewrite BR/BL to symbol as TYPE_BRANCH.
-	switch p.As {
-	case ABR,
-		ABL,
-		obj.ARET,
-		obj.ADUFFZERO,
-		obj.ADUFFCOPY:
-		if p.To.Sym != nil {
-			p.To.Type = obj.TYPE_BRANCH
-		}
-	}
-
-	// Rewrite float constants to values stored in memory.
-	switch p.As {
-	case AFMOVS:
-		if p.From.Type == obj.TYPE_FCONST {
-			f32 := float32(p.From.Val.(float64))
-			i32 := math.Float32bits(f32)
-			literal := fmt.Sprintf("$f32.%08x", i32)
-			s := obj.Linklookup(ctxt, literal, 0)
-			s.Size = 4
-			p.From.Type = obj.TYPE_MEM
-			p.From.Sym = s
-			p.From.Name = obj.NAME_EXTERN
-			p.From.Offset = 0
-		}
-
-	case AFMOVD:
-		if p.From.Type == obj.TYPE_FCONST {
-			i64 := math.Float64bits(p.From.Val.(float64))
-			literal := fmt.Sprintf("$f64.%016x", i64)
-			s := obj.Linklookup(ctxt, literal, 0)
-			s.Size = 8
-			p.From.Type = obj.TYPE_MEM
-			p.From.Sym = s
-			p.From.Name = obj.NAME_EXTERN
-			p.From.Offset = 0
-		}
-
-		// Put >32-bit constants in memory and load them
-	case AMOVD:
-		if p.From.Type == obj.TYPE_CONST && p.From.Name == obj.NAME_NONE && p.From.Reg == 0 && int64(int32(p.From.Offset)) != p.From.Offset {
-			literal := fmt.Sprintf("$i64.%016x", uint64(p.From.Offset))
-			s := obj.Linklookup(ctxt, literal, 0)
-			s.Size = 8
-			p.From.Type = obj.TYPE_MEM
-			p.From.Sym = s
-			p.From.Name = obj.NAME_EXTERN
-			p.From.Offset = 0
-		}
-	}
-
-	// Rewrite SUB constants into ADD.
-	switch p.As {
-	case ASUBC:
-		if p.From.Type == obj.TYPE_CONST {
-			p.From.Offset = -p.From.Offset
-			p.As = AADDC
-		}
-
-	case ASUBCCC:
-		if p.From.Type == obj.TYPE_CONST {
-			p.From.Offset = -p.From.Offset
-			p.As = AADDCCC
-		}
-
-	case ASUB:
-		if p.From.Type == obj.TYPE_CONST {
-			p.From.Offset = -p.From.Offset
-			p.As = AADD
-		}
-	}
-}
-
-func preprocess(ctxt *obj.Link, cursym *obj.LSym) {
-	// TODO(minux): add morestack short-cuts with small fixed frame-size.
-	ctxt.Cursym = cursym
-
-	if cursym.Text == nil || cursym.Text.Link == nil {
-		return
-	}
-
-	p := cursym.Text
-	textstksiz := p.To.Offset
-
-	cursym.Args = p.To.Val.(int32)
-	cursym.Locals = int32(textstksiz)
-
-	/*
-	 * find leaf subroutines
-	 * strip NOPs
-	 * expand RET
-	 * expand BECOME pseudo
-	 */
-	if ctxt.Debugvlog != 0 {
-		fmt.Fprintf(ctxt.Bso, "%5.2f noops\n", obj.Cputime())
-	}
-	ctxt.Bso.Flush()
-
-	var q *obj.Prog
-	var q1 *obj.Prog
-	for p := cursym.Text; p != nil; p = p.Link {
-		switch p.As {
-		/* too hard, just leave alone */
-		case obj.ATEXT:
-			q = p
-
-			p.Mark |= LABEL | LEAF | SYNC
-			if p.Link != nil {
-				p.Link.Mark |= LABEL
-			}
-
-		case ANOR:
-			q = p
-			if p.To.Type == obj.TYPE_REG {
-				if p.To.Reg == REGZERO {
-					p.Mark |= LABEL | SYNC
-				}
-			}
-
-		case ALWAR,
-			ASTWCCC,
-			AECIWX,
-			AECOWX,
-			AEIEIO,
-			AICBI,
-			AISYNC,
-			ATLBIE,
-			ATLBIEL,
-			ASLBIA,
-			ASLBIE,
-			ASLBMFEE,
-			ASLBMFEV,
-			ASLBMTE,
-			ADCBF,
-			ADCBI,
-			ADCBST,
-			ADCBT,
-			ADCBTST,
-			ADCBZ,
-			ASYNC,
-			ATLBSYNC,
-			APTESYNC,
-			ATW,
-			AWORD,
-			ARFI,
-			ARFCI,
-			ARFID,
-			AHRFID:
-			q = p
-			p.Mark |= LABEL | SYNC
-			continue
-
-		case AMOVW, AMOVWZ, AMOVD:
-			q = p
-			if p.From.Reg >= REG_SPECIAL || p.To.Reg >= REG_SPECIAL {
-				p.Mark |= LABEL | SYNC
-			}
-			continue
-
-		case AFABS,
-			AFABSCC,
-			AFADD,
-			AFADDCC,
-			AFCTIW,
-			AFCTIWCC,
-			AFCTIWZ,
-			AFCTIWZCC,
-			AFDIV,
-			AFDIVCC,
-			AFMADD,
-			AFMADDCC,
-			AFMOVD,
-			AFMOVDU,
-			/* case AFMOVDS: */
-			AFMOVS,
-			AFMOVSU,
-
-			/* case AFMOVSD: */
-			AFMSUB,
-			AFMSUBCC,
-			AFMUL,
-			AFMULCC,
-			AFNABS,
-			AFNABSCC,
-			AFNEG,
-			AFNEGCC,
-			AFNMADD,
-			AFNMADDCC,
-			AFNMSUB,
-			AFNMSUBCC,
-			AFRSP,
-			AFRSPCC,
-			AFSUB,
-			AFSUBCC:
-			q = p
-
-			p.Mark |= FLOAT
-			continue
-
-		case ABL,
-			ABCL,
-			obj.ADUFFZERO,
-			obj.ADUFFCOPY:
-			cursym.Text.Mark &^= LEAF
-			fallthrough
-
-		case ABC,
-			ABEQ,
-			ABGE,
-			ABGT,
-			ABLE,
-			ABLT,
-			ABNE,
-			ABR,
-			ABVC,
-			ABVS:
-			p.Mark |= BRANCH
-			q = p
-			q1 = p.Pcond
-			if q1 != nil {
-				for q1.As == obj.ANOP {
-					q1 = q1.Link
-					p.Pcond = q1
-				}
-
-				if q1.Mark&LEAF == 0 {
-					q1.Mark |= LABEL
-				}
-			} else {
-				p.Mark |= LABEL
-			}
-			q1 = p.Link
-			if q1 != nil {
-				q1.Mark |= LABEL
-			}
-			continue
-
-		case AFCMPO, AFCMPU:
-			q = p
-			p.Mark |= FCMP | FLOAT
-			continue
-
-		case obj.ARET:
-			q = p
-			if p.Link != nil {
-				p.Link.Mark |= LABEL
-			}
-			continue
-
-		case obj.ANOP:
-			q1 = p.Link
-			q.Link = q1 /* q is non-nop */
-			q1.Mark |= p.Mark
-			continue
-
-		default:
-			q = p
-			continue
-		}
-	}
-
-	autosize := int32(0)
-	var aoffset int
-	var mov int
-	var o int
-	var p1 *obj.Prog
-	var p2 *obj.Prog
-	for p := cursym.Text; p != nil; p = p.Link {
-		o = int(p.As)
-		switch o {
-		case obj.ATEXT:
-			mov = AMOVD
-			aoffset = 0
-			autosize = int32(textstksiz + 8)
-			if (p.Mark&LEAF != 0) && autosize <= 8 {
-				autosize = 0
-			} else if autosize&4 != 0 {
-				autosize += 4
-			}
-			p.To.Offset = int64(autosize) - 8
-
-			if p.From3.Offset&obj.NOSPLIT == 0 {
-				p = stacksplit(ctxt, p, autosize) // emit split check
-			}
-
-			q = p
-
-			if autosize != 0 {
-				/* use MOVDU to adjust R1 when saving R31, if autosize is small */
-				if cursym.Text.Mark&LEAF == 0 && autosize >= -BIG && autosize <= BIG {
-					mov = AMOVDU
-					aoffset = int(-autosize)
-				} else {
-					q = obj.Appendp(ctxt, p)
-					q.As = AADD
-					q.Lineno = p.Lineno
-					q.From.Type = obj.TYPE_CONST
-					q.From.Offset = int64(-autosize)
-					q.To.Type = obj.TYPE_REG
-					q.To.Reg = REGSP
-					q.Spadj = +autosize
-				}
-			} else if cursym.Text.Mark&LEAF == 0 {
-				if ctxt.Debugvlog != 0 {
-					fmt.Fprintf(ctxt.Bso, "save suppressed in: %s\n", cursym.Name)
-					ctxt.Bso.Flush()
-				}
-
-				cursym.Text.Mark |= LEAF
-			}
-
-			if cursym.Text.Mark&LEAF != 0 {
-				cursym.Leaf = 1
-				break
-			}
-
-			q = obj.Appendp(ctxt, q)
-			q.As = AMOVD
-			q.Lineno = p.Lineno
-			q.From.Type = obj.TYPE_REG
-			q.From.Reg = REG_LR
-			q.To.Type = obj.TYPE_REG
-			q.To.Reg = REGTMP
-
-			q = obj.Appendp(ctxt, q)
-			q.As = int16(mov)
-			q.Lineno = p.Lineno
-			q.From.Type = obj.TYPE_REG
-			q.From.Reg = REGTMP
-			q.To.Type = obj.TYPE_MEM
-			q.To.Offset = int64(aoffset)
-			q.To.Reg = REGSP
-			if q.As == AMOVDU {
-				q.Spadj = int32(-aoffset)
-			}
-
-			if cursym.Text.From3.Offset&obj.WRAPPER != 0 {
-				// if(g->panic != nil && g->panic->argp == FP) g->panic->argp = bottom-of-frame
-				//
-				//	MOVD g_panic(g), R3
-				//	CMP R0, R3
-				//	BEQ end
-				//	MOVD panic_argp(R3), R4
-				//	ADD $(autosize+8), R1, R5
-				//	CMP R4, R5
-				//	BNE end
-				//	ADD $8, R1, R6
-				//	MOVD R6, panic_argp(R3)
-				// end:
-				//	NOP
-				//
-				// The NOP is needed to give the jumps somewhere to land.
-				// It is a liblink NOP, not a ppc64 NOP: it encodes to 0 instruction bytes.
-
-				q = obj.Appendp(ctxt, q)
-
-				q.As = AMOVD
-				q.From.Type = obj.TYPE_MEM
-				q.From.Reg = REGG
-				q.From.Offset = 4 * int64(ctxt.Arch.Ptrsize) // G.panic
-				q.To.Type = obj.TYPE_REG
-				q.To.Reg = REG_R3
-
-				q = obj.Appendp(ctxt, q)
-				q.As = ACMP
-				q.From.Type = obj.TYPE_REG
-				q.From.Reg = REG_R0
-				q.To.Type = obj.TYPE_REG
-				q.To.Reg = REG_R3
-
-				q = obj.Appendp(ctxt, q)
-				q.As = ABEQ
-				q.To.Type = obj.TYPE_BRANCH
-				p1 = q
-
-				q = obj.Appendp(ctxt, q)
-				q.As = AMOVD
-				q.From.Type = obj.TYPE_MEM
-				q.From.Reg = REG_R3
-				q.From.Offset = 0 // Panic.argp
-				q.To.Type = obj.TYPE_REG
-				q.To.Reg = REG_R4
-
-				q = obj.Appendp(ctxt, q)
-				q.As = AADD
-				q.From.Type = obj.TYPE_CONST
-				q.From.Offset = int64(autosize) + 8
-				q.Reg = REGSP
-				q.To.Type = obj.TYPE_REG
-				q.To.Reg = REG_R5
-
-				q = obj.Appendp(ctxt, q)
-				q.As = ACMP
-				q.From.Type = obj.TYPE_REG
-				q.From.Reg = REG_R4
-				q.To.Type = obj.TYPE_REG
-				q.To.Reg = REG_R5
-
-				q = obj.Appendp(ctxt, q)
-				q.As = ABNE
-				q.To.Type = obj.TYPE_BRANCH
-				p2 = q
-
-				q = obj.Appendp(ctxt, q)
-				q.As = AADD
-				q.From.Type = obj.TYPE_CONST
-				q.From.Offset = 8
-				q.Reg = REGSP
-				q.To.Type = obj.TYPE_REG
-				q.To.Reg = REG_R6
-
-				q = obj.Appendp(ctxt, q)
-				q.As = AMOVD
-				q.From.Type = obj.TYPE_REG
-				q.From.Reg = REG_R6
-				q.To.Type = obj.TYPE_MEM
-				q.To.Reg = REG_R3
-				q.To.Offset = 0 // Panic.argp
-
-				q = obj.Appendp(ctxt, q)
-
-				q.As = obj.ANOP
-				p1.Pcond = q
-				p2.Pcond = q
-			}
-
-		case obj.ARET:
-			if p.From.Type == obj.TYPE_CONST {
-				ctxt.Diag("using BECOME (%v) is not supported!", p)
-				break
-			}
-
-			if p.To.Sym != nil { // retjmp
-				p.As = ABR
-				p.To.Type = obj.TYPE_BRANCH
-				break
-			}
-
-			if cursym.Text.Mark&LEAF != 0 {
-				if autosize == 0 {
-					p.As = ABR
-					p.From = obj.Addr{}
-					p.To.Type = obj.TYPE_REG
-					p.To.Reg = REG_LR
-					p.Mark |= BRANCH
-					break
-				}
-
-				p.As = AADD
-				p.From.Type = obj.TYPE_CONST
-				p.From.Offset = int64(autosize)
-				p.To.Type = obj.TYPE_REG
-				p.To.Reg = REGSP
-				p.Spadj = -autosize
-
-				q = ctxt.NewProg()
-				q.As = ABR
-				q.Lineno = p.Lineno
-				q.To.Type = obj.TYPE_REG
-				q.To.Reg = REG_LR
-				q.Mark |= BRANCH
-				q.Spadj = +autosize
-
-				q.Link = p.Link
-				p.Link = q
-				break
-			}
-
-			p.As = AMOVD
-			p.From.Type = obj.TYPE_MEM
-			p.From.Offset = 0
-			p.From.Reg = REGSP
-			p.To.Type = obj.TYPE_REG
-			p.To.Reg = REGTMP
-
-			q = ctxt.NewProg()
-			q.As = AMOVD
-			q.Lineno = p.Lineno
-			q.From.Type = obj.TYPE_REG
-			q.From.Reg = REGTMP
-			q.To.Type = obj.TYPE_REG
-			q.To.Reg = REG_LR
-
-			q.Link = p.Link
-			p.Link = q
-			p = q
-
-			if false {
-				// Debug bad returns
-				q = ctxt.NewProg()
-
-				q.As = AMOVD
-				q.Lineno = p.Lineno
-				q.From.Type = obj.TYPE_MEM
-				q.From.Offset = 0
-				q.From.Reg = REGTMP
-				q.To.Type = obj.TYPE_REG
-				q.To.Reg = REGTMP
-
-				q.Link = p.Link
-				p.Link = q
-				p = q
-			}
-
-			if autosize != 0 {
-				q = ctxt.NewProg()
-				q.As = AADD
-				q.Lineno = p.Lineno
-				q.From.Type = obj.TYPE_CONST
-				q.From.Offset = int64(autosize)
-				q.To.Type = obj.TYPE_REG
-				q.To.Reg = REGSP
-				q.Spadj = -autosize
-
-				q.Link = p.Link
-				p.Link = q
-			}
-
-			q1 = ctxt.NewProg()
-			q1.As = ABR
-			q1.Lineno = p.Lineno
-			q1.To.Type = obj.TYPE_REG
-			q1.To.Reg = REG_LR
-			q1.Mark |= BRANCH
-			q1.Spadj = +autosize
-
-			q1.Link = q.Link
-			q.Link = q1
-
-		case AADD:
-			if p.To.Type == obj.TYPE_REG && p.To.Reg == REGSP && p.From.Type == obj.TYPE_CONST {
-				p.Spadj = int32(-p.From.Offset)
-			}
-		}
-	}
-}
-
-/*
-// instruction scheduling
-	if(debug['Q'] == 0)
-		return;
-
-	curtext = nil;
-	q = nil;	// p - 1
-	q1 = firstp;	// top of block
-	o = 0;		// count of instructions
-	for(p = firstp; p != nil; p = p1) {
-		p1 = p->link;
-		o++;
-		if(p->mark & NOSCHED){
-			if(q1 != p){
-				sched(q1, q);
-			}
-			for(; p != nil; p = p->link){
-				if(!(p->mark & NOSCHED))
-					break;
-				q = p;
-			}
-			p1 = p;
-			q1 = p;
-			o = 0;
-			continue;
-		}
-		if(p->mark & (LABEL|SYNC)) {
-			if(q1 != p)
-				sched(q1, q);
-			q1 = p;
-			o = 1;
-		}
-		if(p->mark & (BRANCH|SYNC)) {
-			sched(q1, p);
-			q1 = p1;
-			o = 0;
-		}
-		if(o >= NSCHED) {
-			sched(q1, p);
-			q1 = p1;
-			o = 0;
-		}
-		q = p;
-	}
-*/
-func stacksplit(ctxt *obj.Link, p *obj.Prog, framesize int32) *obj.Prog {
-	// MOVD	g_stackguard(g), R3
-	p = obj.Appendp(ctxt, p)
-
-	p.As = AMOVD
-	p.From.Type = obj.TYPE_MEM
-	p.From.Reg = REGG
-	p.From.Offset = 2 * int64(ctxt.Arch.Ptrsize) // G.stackguard0
-	if ctxt.Cursym.Cfunc != 0 {
-		p.From.Offset = 3 * int64(ctxt.Arch.Ptrsize) // G.stackguard1
-	}
-	p.To.Type = obj.TYPE_REG
-	p.To.Reg = REG_R3
-
-	var q *obj.Prog
-	if framesize <= obj.StackSmall {
-		// small stack: SP < stackguard
-		//	CMP	stackguard, SP
-		p = obj.Appendp(ctxt, p)
-
-		p.As = ACMPU
-		p.From.Type = obj.TYPE_REG
-		p.From.Reg = REG_R3
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REGSP
-	} else if framesize <= obj.StackBig {
-		// large stack: SP-framesize < stackguard-StackSmall
-		//	ADD $-framesize, SP, R4
-		//	CMP stackguard, R4
-		p = obj.Appendp(ctxt, p)
-
-		p.As = AADD
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = int64(-framesize)
-		p.Reg = REGSP
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_R4
-
-		p = obj.Appendp(ctxt, p)
-		p.As = ACMPU
-		p.From.Type = obj.TYPE_REG
-		p.From.Reg = REG_R3
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_R4
-	} else {
-		// Such a large stack we need to protect against wraparound.
-		// If SP is close to zero:
-		//	SP-stackguard+StackGuard <= framesize + (StackGuard-StackSmall)
-		// The +StackGuard on both sides is required to keep the left side positive:
-		// SP is allowed to be slightly below stackguard. See stack.h.
-		//
-		// Preemption sets stackguard to StackPreempt, a very large value.
-		// That breaks the math above, so we have to check for that explicitly.
-		//	// stackguard is R3
-		//	CMP	R3, $StackPreempt
-		//	BEQ	label-of-call-to-morestack
-		//	ADD	$StackGuard, SP, R4
-		//	SUB	R3, R4
-		//	MOVD	$(framesize+(StackGuard-StackSmall)), R31
-		//	CMPU	R31, R4
-		p = obj.Appendp(ctxt, p)
-
-		p.As = ACMP
-		p.From.Type = obj.TYPE_REG
-		p.From.Reg = REG_R3
-		p.To.Type = obj.TYPE_CONST
-		p.To.Offset = obj.StackPreempt
-
-		p = obj.Appendp(ctxt, p)
-		q = p
-		p.As = ABEQ
-		p.To.Type = obj.TYPE_BRANCH
-
-		p = obj.Appendp(ctxt, p)
-		p.As = AADD
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = obj.StackGuard
-		p.Reg = REGSP
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_R4
-
-		p = obj.Appendp(ctxt, p)
-		p.As = ASUB
-		p.From.Type = obj.TYPE_REG
-		p.From.Reg = REG_R3
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_R4
-
-		p = obj.Appendp(ctxt, p)
-		p.As = AMOVD
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = int64(framesize) + obj.StackGuard - obj.StackSmall
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REGTMP
-
-		p = obj.Appendp(ctxt, p)
-		p.As = ACMPU
-		p.From.Type = obj.TYPE_REG
-		p.From.Reg = REGTMP
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_R4
-	}
-
-	// q1: BLT	done
-	p = obj.Appendp(ctxt, p)
-	q1 := p
-
-	p.As = ABLT
-	p.To.Type = obj.TYPE_BRANCH
-
-	// MOVD	LR, R5
-	p = obj.Appendp(ctxt, p)
-
-	p.As = AMOVD
-	p.From.Type = obj.TYPE_REG
-	p.From.Reg = REG_LR
-	p.To.Type = obj.TYPE_REG
-	p.To.Reg = REG_R5
-	if q != nil {
-		q.Pcond = p
-	}
-
-	// BL	runtime.morestack(SB)
-	p = obj.Appendp(ctxt, p)
-
-	p.As = ABL
-	p.To.Type = obj.TYPE_BRANCH
-	if ctxt.Cursym.Cfunc != 0 {
-		p.To.Sym = obj.Linklookup(ctxt, "runtime.morestackc", 0)
-	} else if ctxt.Cursym.Text.From3.Offset&obj.NEEDCTXT == 0 {
-		p.To.Sym = obj.Linklookup(ctxt, "runtime.morestack_noctxt", 0)
-	} else {
-		p.To.Sym = obj.Linklookup(ctxt, "runtime.morestack", 0)
-	}
-
-	// BR	start
-	p = obj.Appendp(ctxt, p)
-
-	p.As = ABR
-	p.To.Type = obj.TYPE_BRANCH
-	p.Pcond = ctxt.Cursym.Text.Link
-
-	// placeholder for q1's jump target
-	p = obj.Appendp(ctxt, p)
-
-	p.As = obj.ANOP // zero-width place holder
-	q1.Pcond = p
-
-	return p
-}
-
-func follow(ctxt *obj.Link, s *obj.LSym) {
-	ctxt.Cursym = s
-
-	firstp := ctxt.NewProg()
-	lastp := firstp
-	xfol(ctxt, s.Text, &lastp)
-	lastp.Link = nil
-	s.Text = firstp.Link
-}
-
-func relinv(a int) int {
-	switch a {
-	case ABEQ:
-		return ABNE
-	case ABNE:
-		return ABEQ
-
-	case ABGE:
-		return ABLT
-	case ABLT:
-		return ABGE
-
-	case ABGT:
-		return ABLE
-	case ABLE:
-		return ABGT
-
-	case ABVC:
-		return ABVS
-	case ABVS:
-		return ABVC
-	}
-
-	return 0
-}
-
-func xfol(ctxt *obj.Link, p *obj.Prog, last **obj.Prog) {
-	var q *obj.Prog
-	var r *obj.Prog
-	var a int
-	var b int
-	var i int
-
-loop:
-	if p == nil {
-		return
-	}
-	a = int(p.As)
-	if a == ABR {
-		q = p.Pcond
-		if (p.Mark&NOSCHED != 0) || q != nil && (q.Mark&NOSCHED != 0) {
-			p.Mark |= FOLL
-			(*last).Link = p
-			*last = p
-			p = p.Link
-			xfol(ctxt, p, last)
-			p = q
-			if p != nil && p.Mark&FOLL == 0 {
-				goto loop
-			}
-			return
-		}
-
-		if q != nil {
-			p.Mark |= FOLL
-			p = q
-			if p.Mark&FOLL == 0 {
-				goto loop
-			}
-		}
-	}
-
-	if p.Mark&FOLL != 0 {
-		i = 0
-		q = p
-		for ; i < 4; i, q = i+1, q.Link {
-			if q == *last || (q.Mark&NOSCHED != 0) {
-				break
-			}
-			b = 0 /* set */
-			a = int(q.As)
-			if a == obj.ANOP {
-				i--
-				continue
-			}
-
-			if a == ABR || a == obj.ARET || a == ARFI || a == ARFCI || a == ARFID || a == AHRFID {
-				goto copy
-			}
-			if q.Pcond == nil || (q.Pcond.Mark&FOLL != 0) {
-				continue
-			}
-			b = relinv(a)
-			if b == 0 {
-				continue
-			}
-
-		copy:
-			for {
-				r = ctxt.NewProg()
-				*r = *p
-				if r.Mark&FOLL == 0 {
-					fmt.Printf("cant happen 1\n")
-				}
-				r.Mark |= FOLL
-				if p != q {
-					p = p.Link
-					(*last).Link = r
-					*last = r
-					continue
-				}
-
-				(*last).Link = r
-				*last = r
-				if a == ABR || a == obj.ARET || a == ARFI || a == ARFCI || a == ARFID || a == AHRFID {
-					return
-				}
-				r.As = int16(b)
-				r.Pcond = p.Link
-				r.Link = p.Pcond
-				if r.Link.Mark&FOLL == 0 {
-					xfol(ctxt, r.Link, last)
-				}
-				if r.Pcond.Mark&FOLL == 0 {
-					fmt.Printf("cant happen 2\n")
-				}
-				return
-			}
-		}
-
-		a = ABR
-		q = ctxt.NewProg()
-		q.As = int16(a)
-		q.Lineno = p.Lineno
-		q.To.Type = obj.TYPE_BRANCH
-		q.To.Offset = p.Pc
-		q.Pcond = p
-		p = q
-	}
-
-	p.Mark |= FOLL
-	(*last).Link = p
-	*last = p
-	if a == ABR || a == obj.ARET || a == ARFI || a == ARFCI || a == ARFID || a == AHRFID {
-		if p.Mark&NOSCHED != 0 {
-			p = p.Link
-			goto loop
-		}
-
-		return
-	}
-
-	if p.Pcond != nil {
-		if a != ABL && p.Link != nil {
-			xfol(ctxt, p.Link, last)
-			p = p.Pcond
-			if p == nil || (p.Mark&FOLL != 0) {
-				return
-			}
-			goto loop
-		}
-	}
-
-	p = p.Link
-	goto loop
-}
-
-var Linkppc64 = obj.LinkArch{
-	ByteOrder:  binary.BigEndian,
-	Name:       "ppc64",
-	Thechar:    '9',
-	Preprocess: preprocess,
-	Assemble:   span9,
-	Follow:     follow,
-	Progedit:   progedit,
-	Minlc:      4,
-	Ptrsize:    8,
-	Regsize:    8,
-}
-
-var Linkppc64le = obj.LinkArch{
-	ByteOrder:  binary.LittleEndian,
-	Name:       "ppc64le",
-	Thechar:    '9',
-	Preprocess: preprocess,
-	Assemble:   span9,
-	Follow:     follow,
-	Progedit:   progedit,
-	Minlc:      4,
-	Ptrsize:    8,
-	Regsize:    8,
-}
diff --git a/src/cmd/internal/obj/stack.go b/src/cmd/internal/obj/stack.go
deleted file mode 100644
index 87698b3..0000000
--- a/src/cmd/internal/obj/stack.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2011 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Inferno utils/5l/span.c
-// http://code.google.com/p/inferno-os/source/browse/utils/5l/span.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package obj
-
-// For the linkers. Must match Go definitions.
-// TODO(rsc): Share Go definitions with linkers directly.
-
-const (
-	STACKSYSTEM = 0
-	StackSystem = STACKSYSTEM
-	StackBig    = 4096
-	StackGuard  = 640*stackGuardMultiplier + StackSystem
-	StackSmall  = 128
-	StackLimit  = StackGuard - StackSystem - StackSmall
-)
-
-const (
-	StackPreempt = -1314 // 0xfff...fade
-)
diff --git a/src/cmd/internal/obj/stringer.go b/src/cmd/internal/obj/stringer.go
deleted file mode 100644
index c4b3712..0000000
--- a/src/cmd/internal/obj/stringer.go
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-// This is a mini version of the stringer tool customized for the Anames table
-// in the architecture support for obj.
-// This version just generates the slice of strings, not the String method.
-
-package main
-
-import (
-	"bufio"
-	"flag"
-	"fmt"
-	"log"
-	"os"
-	"regexp"
-	"strings"
-)
-
-var (
-	input  = flag.String("i", "", "input file name")
-	output = flag.String("o", "", "output file name")
-	pkg    = flag.String("p", "", "package name")
-)
-
-var Are = regexp.MustCompile(`^\tA([A-Z0-9]+)`)
-
-func main() {
-	flag.Parse()
-	if *input == "" || *output == "" || *pkg == "" {
-		flag.Usage()
-		os.Exit(2)
-	}
-	in, err := os.Open(*input)
-	if err != nil {
-		log.Fatal(err)
-	}
-	fd, err := os.Create(*output)
-	if err != nil {
-		log.Fatal(err)
-	}
-	out := bufio.NewWriter(fd)
-	defer out.Flush()
-	var on = false
-	s := bufio.NewScanner(in)
-	first := true
-	for s.Scan() {
-		line := s.Text()
-		if !on {
-			// First relevant line contains "= obj.ABase".
-			// If we find it, delete the = so we don't stop immediately.
-			const prefix = "= obj.ABase"
-			index := strings.Index(line, prefix)
-			if index < 0 {
-				continue
-			}
-			// It's on. Start with the header.
-			fmt.Fprintf(out, header, *input, *output, *pkg, *pkg)
-			on = true
-			line = line[:index]
-		}
-		// Strip comments so their text won't defeat our heuristic.
-		index := strings.Index(line, "//")
-		if index > 0 {
-			line = line[:index]
-		}
-		index = strings.Index(line, "/*")
-		if index > 0 {
-			line = line[:index]
-		}
-		// Termination condition: Any line with an = changes the sequence,
-		// so stop there, and stop at a closing brace.
-		if strings.HasPrefix(line, "}") || strings.ContainsRune(line, '=') {
-			break
-		}
-		sub := Are.FindStringSubmatch(line)
-		if len(sub) < 2 {
-			continue
-		}
-		if first {
-			fmt.Fprintf(out, "\tobj.A_ARCHSPECIFIC: %q,\n", sub[1])
-			first = false
-		} else {
-			fmt.Fprintf(out, "\t%q,\n", sub[1])
-		}
-	}
-	fmt.Fprintln(out, "}")
-	if s.Err() != nil {
-		log.Fatal(err)
-	}
-}
-
-const header = `// Generated by stringer -i %s -o %s -p %s
-// Do not edit.
-
-package %s
-
-import "cmd/internal/obj"
-
-var Anames = []string{
-`
diff --git a/src/cmd/internal/obj/sym.go b/src/cmd/internal/obj/sym.go
deleted file mode 100644
index 37bb40b..0000000
--- a/src/cmd/internal/obj/sym.go
+++ /dev/null
@@ -1,213 +0,0 @@
-// Derived from Inferno utils/6l/obj.c and utils/6l/span.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6l/obj.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6l/span.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package obj
-
-import (
-	"log"
-	"os"
-	"path/filepath"
-	"runtime"
-	"strconv"
-)
-
-var headers = []struct {
-	name string
-	val  int
-}{
-	{"darwin", Hdarwin},
-	{"dragonfly", Hdragonfly},
-	{"elf", Helf},
-	{"freebsd", Hfreebsd},
-	{"linux", Hlinux},
-	{"android", Hlinux}, // must be after "linux" entry or else headstr(Hlinux) == "android"
-	{"nacl", Hnacl},
-	{"netbsd", Hnetbsd},
-	{"openbsd", Hopenbsd},
-	{"plan9", Hplan9},
-	{"solaris", Hsolaris},
-	{"windows", Hwindows},
-	{"windowsgui", Hwindows},
-}
-
-func headtype(name string) int {
-	for i := 0; i < len(headers); i++ {
-		if name == headers[i].name {
-			return headers[i].val
-		}
-	}
-	return -1
-}
-
-func Headstr(v int) string {
-	for i := 0; i < len(headers); i++ {
-		if v == headers[i].val {
-			return headers[i].name
-		}
-	}
-	return strconv.Itoa(v)
-}
-
-func Linknew(arch *LinkArch) *Link {
-	ctxt := new(Link)
-	ctxt.Hash = make(map[SymVer]*LSym)
-	ctxt.Arch = arch
-	ctxt.Version = HistVersion
-	ctxt.Goroot = Getgoroot()
-	ctxt.Goroot_final = os.Getenv("GOROOT_FINAL")
-	if runtime.GOOS == "windows" {
-		// TODO(rsc): Remove ctxt.Windows and let callers use runtime.GOOS.
-		ctxt.Windows = 1
-	}
-
-	var buf string
-	buf, _ = os.Getwd()
-	if buf == "" {
-		buf = "/???"
-	}
-	buf = filepath.ToSlash(buf)
-	ctxt.Pathname = buf
-
-	ctxt.LineHist.GOROOT = ctxt.Goroot
-	ctxt.LineHist.GOROOT_FINAL = ctxt.Goroot_final
-	ctxt.LineHist.Dir = ctxt.Pathname
-
-	ctxt.Headtype = headtype(Getgoos())
-	if ctxt.Headtype < 0 {
-		log.Fatalf("unknown goos %s", Getgoos())
-	}
-
-	// Record thread-local storage offset.
-	// TODO(rsc): Move tlsoffset back into the linker.
-	switch ctxt.Headtype {
-	default:
-		log.Fatalf("unknown thread-local storage offset for %s", Headstr(ctxt.Headtype))
-
-	case Hplan9, Hwindows:
-		break
-
-		/*
-		 * ELF uses TLS offset negative from FS.
-		 * Translate 0(FS) and 8(FS) into -16(FS) and -8(FS).
-		 * Known to low-level assembly in package runtime and runtime/cgo.
-		 */
-	case Hlinux,
-		Hfreebsd,
-		Hnetbsd,
-		Hopenbsd,
-		Hdragonfly,
-		Hsolaris:
-		ctxt.Tlsoffset = -1 * ctxt.Arch.Ptrsize
-
-	case Hnacl:
-		switch ctxt.Arch.Thechar {
-		default:
-			log.Fatalf("unknown thread-local storage offset for nacl/%s", ctxt.Arch.Name)
-
-		case '5':
-			ctxt.Tlsoffset = 0
-
-		case '6':
-			ctxt.Tlsoffset = 0
-
-		case '8':
-			ctxt.Tlsoffset = -8
-		}
-
-		/*
-		 * OS X system constants - offset from 0(GS) to our TLS.
-		 * Explained in ../../runtime/cgo/gcc_darwin_*.c.
-		 */
-	case Hdarwin:
-		switch ctxt.Arch.Thechar {
-		default:
-			log.Fatalf("unknown thread-local storage offset for darwin/%s", ctxt.Arch.Name)
-
-		case '5':
-			ctxt.Tlsoffset = 0 // dummy value, not needed
-
-		case '6':
-			ctxt.Tlsoffset = 0x8a0
-
-		case '7':
-			ctxt.Tlsoffset = 0 // dummy value, not needed
-
-		case '8':
-			ctxt.Tlsoffset = 0x468
-		}
-	}
-
-	// On arm, record goarm.
-	if ctxt.Arch.Thechar == '5' {
-		p := Getgoarm()
-		if p != "" {
-			ctxt.Goarm = int32(Atoi(p))
-		} else {
-			ctxt.Goarm = 6
-		}
-	}
-
-	return ctxt
-}
-
-func _lookup(ctxt *Link, symb string, v int, create bool) *LSym {
-	s := ctxt.Hash[SymVer{symb, v}]
-	if s != nil || !create {
-		return s
-	}
-
-	s = &LSym{
-		Name:    symb,
-		Type:    0,
-		Version: int16(v),
-		Value:   0,
-		Size:    0,
-	}
-	ctxt.Hash[SymVer{symb, v}] = s
-
-	return s
-}
-
-func Linklookup(ctxt *Link, name string, v int) *LSym {
-	return _lookup(ctxt, name, v, true)
-}
-
-// read-only lookup
-func linkrlookup(ctxt *Link, name string, v int) *LSym {
-	return _lookup(ctxt, name, v, false)
-}
-
-func Linksymfmt(s *LSym) string {
-	if s == nil {
-		return "<nil>"
-	}
-	return s.Name
-}
diff --git a/src/cmd/internal/obj/textflag.go b/src/cmd/internal/obj/textflag.go
deleted file mode 100644
index dbd1bc8..0000000
--- a/src/cmd/internal/obj/textflag.go
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file defines flags attached to various functions
-// and data objects.  The compilers, assemblers, and linker must
-// all agree on these values.
-
-package obj
-
-const (
-	// Don't profile the marked routine.
-	//
-	// Deprecated: Not implemented, do not use.
-	NOPROF = 1
-
-	// It is ok for the linker to get multiple of these symbols.  It will
-	// pick one of the duplicates to use.
-	DUPOK = 2
-
-	// Don't insert stack check preamble.
-	NOSPLIT = 4
-
-	// Put this data in a read-only section.
-	RODATA = 8
-
-	// This data contains no pointers.
-	NOPTR = 16
-
-	// This is a wrapper function and should not count as disabling 'recover'.
-	WRAPPER = 32
-
-	// This function uses its incoming context register.
-	NEEDCTXT = 64
-
-	// When passed to ggloblsym, causes Local to be set to true on the LSym it creates.
-	LOCAL = 128
-)
diff --git a/src/cmd/internal/obj/typekind.go b/src/cmd/internal/obj/typekind.go
deleted file mode 100644
index 2193271..0000000
--- a/src/cmd/internal/obj/typekind.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package obj
-
-// Must match runtime and reflect.
-// Included by cmd/gc.
-
-const (
-	KindBool = 1 + iota
-	KindInt
-	KindInt8
-	KindInt16
-	KindInt32
-	KindInt64
-	KindUint
-	KindUint8
-	KindUint16
-	KindUint32
-	KindUint64
-	KindUintptr
-	KindFloat32
-	KindFloat64
-	KindComplex64
-	KindComplex128
-	KindArray
-	KindChan
-	KindFunc
-	KindInterface
-	KindMap
-	KindPtr
-	KindSlice
-	KindString
-	KindStruct
-	KindUnsafePointer
-	KindDirectIface = 1 << 5
-	KindGCProg      = 1 << 6
-	KindNoPointers  = 1 << 7
-	KindMask        = (1 << 5) - 1
-)
diff --git a/src/cmd/internal/obj/util.go b/src/cmd/internal/obj/util.go
deleted file mode 100644
index 3c3fc88..0000000
--- a/src/cmd/internal/obj/util.go
+++ /dev/null
@@ -1,645 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package obj
-
-import (
-	"bufio"
-	"bytes"
-	"fmt"
-	"io"
-	"log"
-	"os"
-	"strconv"
-	"strings"
-	"time"
-)
-
-const REG_NONE = 0
-
-var start time.Time
-
-func Cputime() float64 {
-	if start.IsZero() {
-		start = time.Now()
-	}
-	return time.Since(start).Seconds()
-}
-
-type Biobuf struct {
-	f       *os.File
-	r       *bufio.Reader
-	w       *bufio.Writer
-	linelen int
-}
-
-func Bopenw(name string) (*Biobuf, error) {
-	f, err := os.Create(name)
-	if err != nil {
-		return nil, err
-	}
-	return &Biobuf{f: f, w: bufio.NewWriter(f)}, nil
-}
-
-func Bopenr(name string) (*Biobuf, error) {
-	f, err := os.Open(name)
-	if err != nil {
-		return nil, err
-	}
-	return &Biobuf{f: f, r: bufio.NewReader(f)}, nil
-}
-
-func Binitw(w io.Writer) *Biobuf {
-	return &Biobuf{w: bufio.NewWriter(w)}
-}
-
-func (b *Biobuf) Write(p []byte) (int, error) {
-	return b.w.Write(p)
-}
-
-func Bwritestring(b *Biobuf, p string) (int, error) {
-	return b.w.WriteString(p)
-}
-
-func Bseek(b *Biobuf, offset int64, whence int) int64 {
-	if b.w != nil {
-		if err := b.w.Flush(); err != nil {
-			log.Fatalf("writing output: %v", err)
-		}
-	} else if b.r != nil {
-		if whence == 1 {
-			offset -= int64(b.r.Buffered())
-		}
-	}
-	off, err := b.f.Seek(offset, whence)
-	if err != nil {
-		log.Fatalf("seeking in output: %v", err)
-	}
-	if b.r != nil {
-		b.r.Reset(b.f)
-	}
-	return off
-}
-
-func Boffset(b *Biobuf) int64 {
-	if b.w != nil {
-		if err := b.w.Flush(); err != nil {
-			log.Fatalf("writing output: %v", err)
-		}
-	}
-	off, err := b.f.Seek(0, 1)
-	if err != nil {
-		log.Fatalf("seeking in output [0, 1]: %v", err)
-	}
-	if b.r != nil {
-		off -= int64(b.r.Buffered())
-	}
-	return off
-}
-
-func (b *Biobuf) Flush() error {
-	return b.w.Flush()
-}
-
-func Bputc(b *Biobuf, c byte) {
-	b.w.WriteByte(c)
-}
-
-const Beof = -1
-
-func Bread(b *Biobuf, p []byte) int {
-	n, err := io.ReadFull(b.r, p)
-	if n == 0 {
-		if err != nil && err != io.EOF {
-			n = -1
-		}
-	}
-	return n
-}
-
-func Bgetc(b *Biobuf) int {
-	c, err := b.r.ReadByte()
-	if err != nil {
-		return -1
-	}
-	return int(c)
-}
-
-func Bgetrune(b *Biobuf) int {
-	r, _, err := b.r.ReadRune()
-	if err != nil {
-		return -1
-	}
-	return int(r)
-}
-
-func Bungetrune(b *Biobuf) {
-	b.r.UnreadRune()
-}
-
-func (b *Biobuf) Read(p []byte) (int, error) {
-	return b.r.Read(p)
-}
-
-func (b *Biobuf) Peek(n int) ([]byte, error) {
-	return b.r.Peek(n)
-}
-
-func Brdline(b *Biobuf, delim int) string {
-	s, err := b.r.ReadBytes(byte(delim))
-	if err != nil {
-		log.Fatalf("reading input: %v", err)
-	}
-	b.linelen = len(s)
-	return string(s)
-}
-
-func Brdstr(b *Biobuf, delim int, cut int) string {
-	s, err := b.r.ReadString(byte(delim))
-	if err != nil {
-		log.Fatalf("reading input: %v", err)
-	}
-	if len(s) > 0 && cut > 0 {
-		s = s[:len(s)-1]
-	}
-	return s
-}
-
-func Access(name string, mode int) int {
-	if mode != 0 {
-		panic("bad access")
-	}
-	_, err := os.Stat(name)
-	if err != nil {
-		return -1
-	}
-	return 0
-}
-
-func Blinelen(b *Biobuf) int {
-	return b.linelen
-}
-
-func Bterm(b *Biobuf) error {
-	var err error
-	if b.w != nil {
-		err = b.w.Flush()
-	}
-	err1 := b.f.Close()
-	if err == nil {
-		err = err1
-	}
-	return err
-}
-
-func envOr(key, value string) string {
-	if x := os.Getenv(key); x != "" {
-		return x
-	}
-	return value
-}
-
-func Getgoroot() string {
-	return envOr("GOROOT", defaultGOROOT)
-}
-
-func Getgoarch() string {
-	return envOr("GOARCH", defaultGOARCH)
-}
-
-func Getgoos() string {
-	return envOr("GOOS", defaultGOOS)
-}
-
-func Getgoarm() string {
-	switch v := envOr("GOARM", defaultGOARM); v {
-	case "5", "6", "7":
-		return v
-	}
-	// Fail here, rather than validate at multiple call sites.
-	log.Fatalf("Invalid GOARM value. Must be 5, 6, or 7.")
-	panic("unreachable")
-}
-
-func Getgo386() string {
-	// Validated by cmd/compile.
-	return envOr("GO386", defaultGO386)
-}
-
-func Getgoextlinkenabled() string {
-	return envOr("GO_EXTLINK_ENABLED", defaultGO_EXTLINK_ENABLED)
-}
-
-func Getgoversion() string {
-	return version
-}
-
-func Atoi(s string) int {
-	i, _ := strconv.Atoi(s)
-	return i
-}
-
-func (p *Prog) Line() string {
-	return p.Ctxt.LineHist.LineString(int(p.Lineno))
-}
-
-var armCondCode = []string{
-	".EQ",
-	".NE",
-	".CS",
-	".CC",
-	".MI",
-	".PL",
-	".VS",
-	".VC",
-	".HI",
-	".LS",
-	".GE",
-	".LT",
-	".GT",
-	".LE",
-	"",
-	".NV",
-}
-
-/* ARM scond byte */
-const (
-	C_SCOND     = (1 << 4) - 1
-	C_SBIT      = 1 << 4
-	C_PBIT      = 1 << 5
-	C_WBIT      = 1 << 6
-	C_FBIT      = 1 << 7
-	C_UBIT      = 1 << 7
-	C_SCOND_XOR = 14
-)
-
-// CConv formats ARM condition codes.
-func CConv(s uint8) string {
-	if s == 0 {
-		return ""
-	}
-	sc := armCondCode[(s&C_SCOND)^C_SCOND_XOR]
-	if s&C_SBIT != 0 {
-		sc += ".S"
-	}
-	if s&C_PBIT != 0 {
-		sc += ".P"
-	}
-	if s&C_WBIT != 0 {
-		sc += ".W"
-	}
-	if s&C_UBIT != 0 { /* ambiguous with FBIT */
-		sc += ".U"
-	}
-	return sc
-}
-
-func (p *Prog) String() string {
-	if p.Ctxt == nil {
-		return "<Prog without ctxt>"
-	}
-
-	sc := CConv(p.Scond)
-
-	var buf bytes.Buffer
-
-	fmt.Fprintf(&buf, "%.5d (%v)\t%v%s", p.Pc, p.Line(), Aconv(int(p.As)), sc)
-	sep := "\t"
-	if p.From.Type != TYPE_NONE {
-		fmt.Fprintf(&buf, "%s%v", sep, Dconv(p, &p.From))
-		sep = ", "
-	}
-	if p.Reg != REG_NONE {
-		// Should not happen but might as well show it if it does.
-		fmt.Fprintf(&buf, "%s%v", sep, Rconv(int(p.Reg)))
-		sep = ", "
-	}
-	if p.From3Type() != TYPE_NONE {
-		if p.From3.Type == TYPE_CONST && (p.As == ADATA || p.As == ATEXT || p.As == AGLOBL) {
-			// Special case - omit $.
-			fmt.Fprintf(&buf, "%s%d", sep, p.From3.Offset)
-		} else {
-			fmt.Fprintf(&buf, "%s%v", sep, Dconv(p, p.From3))
-		}
-		sep = ", "
-	}
-	if p.To.Type != TYPE_NONE {
-		fmt.Fprintf(&buf, "%s%v", sep, Dconv(p, &p.To))
-	}
-	if p.RegTo2 != REG_NONE {
-		fmt.Fprintf(&buf, "%s%v", sep, Rconv(int(p.RegTo2)))
-	}
-	return buf.String()
-}
-
-func (ctxt *Link) NewProg() *Prog {
-	p := new(Prog) // should be the only call to this; all others should use ctxt.NewProg
-	p.Ctxt = ctxt
-	return p
-}
-
-func (ctxt *Link) Line(n int) string {
-	return ctxt.LineHist.LineString(n)
-}
-
-func Getcallerpc(interface{}) uintptr {
-	return 1
-}
-
-func (ctxt *Link) Dconv(a *Addr) string {
-	return Dconv(nil, a)
-}
-
-func Dconv(p *Prog, a *Addr) string {
-	var str string
-
-	switch a.Type {
-	default:
-		str = fmt.Sprintf("type=%d", a.Type)
-
-	case TYPE_NONE:
-		str = ""
-		if a.Name != NAME_NONE || a.Reg != 0 || a.Sym != nil {
-			str = fmt.Sprintf("%v(%v)(NONE)", Mconv(a), Rconv(int(a.Reg)))
-		}
-
-	case TYPE_REG:
-		// TODO(rsc): This special case is for x86 instructions like
-		//	PINSRQ	CX,$1,X6
-		// where the $1 is included in the p->to Addr.
-		// Move into a new field.
-		if a.Offset != 0 {
-			str = fmt.Sprintf("$%d,%v", a.Offset, Rconv(int(a.Reg)))
-			break
-		}
-
-		str = Rconv(int(a.Reg))
-		if a.Name != TYPE_NONE || a.Sym != nil {
-			str = fmt.Sprintf("%v(%v)(REG)", Mconv(a), Rconv(int(a.Reg)))
-		}
-
-	case TYPE_BRANCH:
-		if a.Sym != nil {
-			str = fmt.Sprintf("%s(SB)", a.Sym.Name)
-		} else if p != nil && p.Pcond != nil {
-			str = fmt.Sprint(p.Pcond.Pc)
-		} else if a.Val != nil {
-			str = fmt.Sprint(a.Val.(*Prog).Pc)
-		} else {
-			str = fmt.Sprintf("%d(PC)", a.Offset)
-		}
-
-	case TYPE_INDIR:
-		str = fmt.Sprintf("*%s", Mconv(a))
-
-	case TYPE_MEM:
-		str = Mconv(a)
-		if a.Index != REG_NONE {
-			str += fmt.Sprintf("(%v*%d)", Rconv(int(a.Index)), int(a.Scale))
-		}
-
-	case TYPE_CONST:
-		if a.Reg != 0 {
-			str = fmt.Sprintf("$%v(%v)", Mconv(a), Rconv(int(a.Reg)))
-		} else {
-			str = fmt.Sprintf("$%v", Mconv(a))
-		}
-
-	case TYPE_TEXTSIZE:
-		if a.Val.(int32) == ArgsSizeUnknown {
-			str = fmt.Sprintf("$%d", a.Offset)
-		} else {
-			str = fmt.Sprintf("$%d-%d", a.Offset, a.Val.(int32))
-		}
-
-	case TYPE_FCONST:
-		str = fmt.Sprintf("%.17g", a.Val.(float64))
-		// Make sure 1 prints as 1.0
-		if !strings.ContainsAny(str, ".e") {
-			str += ".0"
-		}
-		str = fmt.Sprintf("$(%s)", str)
-
-	case TYPE_SCONST:
-		str = fmt.Sprintf("$%q", a.Val.(string))
-
-	case TYPE_ADDR:
-		str = fmt.Sprintf("$%s", Mconv(a))
-
-	case TYPE_SHIFT:
-		v := int(a.Offset)
-		op := string("<<>>->@>"[((v>>5)&3)<<1:])
-		if v&(1<<4) != 0 {
-			str = fmt.Sprintf("R%d%c%cR%d", v&15, op[0], op[1], (v>>8)&15)
-		} else {
-			str = fmt.Sprintf("R%d%c%c%d", v&15, op[0], op[1], (v>>7)&31)
-		}
-		if a.Reg != 0 {
-			str += fmt.Sprintf("(%v)", Rconv(int(a.Reg)))
-		}
-
-	case TYPE_REGREG:
-		str = fmt.Sprintf("(%v, %v)", Rconv(int(a.Reg)), Rconv(int(a.Offset)))
-
-	case TYPE_REGREG2:
-		str = fmt.Sprintf("%v, %v", Rconv(int(a.Reg)), Rconv(int(a.Offset)))
-
-	case TYPE_REGLIST:
-		str = regListConv(int(a.Offset))
-	}
-
-	return str
-}
-
-func Mconv(a *Addr) string {
-	var str string
-
-	switch a.Name {
-	default:
-		str = fmt.Sprintf("name=%d", a.Name)
-
-	case NAME_NONE:
-		switch {
-		case a.Reg == REG_NONE:
-			str = fmt.Sprint(a.Offset)
-		case a.Offset == 0:
-			str = fmt.Sprintf("(%v)", Rconv(int(a.Reg)))
-		case a.Offset != 0:
-			str = fmt.Sprintf("%d(%v)", a.Offset, Rconv(int(a.Reg)))
-		}
-
-	case NAME_EXTERN:
-		str = fmt.Sprintf("%s%s(SB)", a.Sym.Name, offConv(a.Offset))
-
-	case NAME_GOTREF:
-		str = fmt.Sprintf("%s%s at GOT(SB)", a.Sym.Name, offConv(a.Offset))
-
-	case NAME_STATIC:
-		str = fmt.Sprintf("%s<>%s(SB)", a.Sym.Name, offConv(a.Offset))
-
-	case NAME_AUTO:
-		if a.Sym != nil {
-			str = fmt.Sprintf("%s%s(SP)", a.Sym.Name, offConv(a.Offset))
-		} else {
-			str = fmt.Sprintf("%s(SP)", offConv(a.Offset))
-		}
-
-	case NAME_PARAM:
-		if a.Sym != nil {
-			str = fmt.Sprintf("%s%s(FP)", a.Sym.Name, offConv(a.Offset))
-		} else {
-			str = fmt.Sprintf("%s(FP)", offConv(a.Offset))
-		}
-	}
-	return str
-}
-
-func offConv(off int64) string {
-	if off == 0 {
-		return ""
-	}
-	return fmt.Sprintf("%+d", off)
-}
-
-type regSet struct {
-	lo    int
-	hi    int
-	Rconv func(int) string
-}
-
-// Few enough architectures that a linear scan is fastest.
-// Not even worth sorting.
-var regSpace []regSet
-
-/*
-	Each architecture defines a register space as a unique
-	integer range.
-	Here is the list of architectures and the base of their register spaces.
-*/
-
-const (
-	// Because of masking operations in the encodings, each register
-	// space should start at 0 modulo some power of 2.
-	RBase386   = 1 * 1024
-	RBaseAMD64 = 2 * 1024
-	RBaseARM   = 3 * 1024
-	RBasePPC64 = 4 * 1024 // range [4k, 8k)
-	RBaseARM64 = 8 * 1024 // range [8k, 12k)
-)
-
-// RegisterRegister binds a pretty-printer (Rconv) for register
-// numbers to a given register number range.  Lo is inclusive,
-// hi exclusive (valid registers are lo through hi-1).
-func RegisterRegister(lo, hi int, Rconv func(int) string) {
-	regSpace = append(regSpace, regSet{lo, hi, Rconv})
-}
-
-func Rconv(reg int) string {
-	if reg == REG_NONE {
-		return "NONE"
-	}
-	for i := range regSpace {
-		rs := &regSpace[i]
-		if rs.lo <= reg && reg < rs.hi {
-			return rs.Rconv(reg)
-		}
-	}
-	return fmt.Sprintf("R???%d", reg)
-}
-
-func regListConv(list int) string {
-	str := ""
-
-	for i := 0; i < 16; i++ { // TODO: 16 is ARM-specific.
-		if list&(1<<uint(i)) != 0 {
-			if str == "" {
-				str += "["
-			} else {
-				str += ","
-			}
-			// This is ARM-specific; R10 is g.
-			if i == 10 {
-				str += "g"
-			} else {
-				str += fmt.Sprintf("R%d", i)
-			}
-		}
-	}
-
-	str += "]"
-	return str
-}
-
-/*
-	Each architecture defines an instruction (A*) space as a unique
-	integer range.
-	Global opcodes like CALL start at 0; the architecture-specific ones
-	start at a distinct, big-maskable offsets.
-	Here is the list of architectures and the base of their opcode spaces.
-*/
-
-const (
-	ABase386 = (1 + iota) << 12
-	ABaseARM
-	ABaseAMD64
-	ABasePPC64
-	ABaseARM64
-	AMask = 1<<12 - 1 // AND with this to use the opcode as an array index.
-)
-
-type opSet struct {
-	lo    int
-	names []string
-}
-
-// Not even worth sorting
-var aSpace []opSet
-
-// RegisterOpcode binds a list of instruction names
-// to a given instruction number range.
-func RegisterOpcode(lo int, Anames []string) {
-	aSpace = append(aSpace, opSet{lo, Anames})
-}
-
-func Aconv(a int) string {
-	if a < A_ARCHSPECIFIC {
-		return Anames[a]
-	}
-	for i := range aSpace {
-		as := &aSpace[i]
-		if as.lo <= a && a < as.lo+len(as.names) {
-			return as.names[a-as.lo]
-		}
-	}
-	return fmt.Sprintf("A???%d", a)
-}
-
-var Anames = []string{
-	"XXX",
-	"CALL",
-	"CHECKNIL",
-	"DATA",
-	"DUFFCOPY",
-	"DUFFZERO",
-	"END",
-	"FUNCDATA",
-	"GLOBL",
-	"JMP",
-	"NOP",
-	"PCDATA",
-	"RET",
-	"TEXT",
-	"TYPE",
-	"UNDEF",
-	"USEFIELD",
-	"VARDEF",
-	"VARKILL",
-}
-
-func Bool2int(b bool) int {
-	if b {
-		return 1
-	}
-	return 0
-}
diff --git a/src/cmd/internal/obj/x86/a.out.go b/src/cmd/internal/obj/x86/a.out.go
deleted file mode 100644
index c7f46e1..0000000
--- a/src/cmd/internal/obj/x86/a.out.go
+++ /dev/null
@@ -1,910 +0,0 @@
-// Inferno utils/6c/6.out.h
-// http://code.google.com/p/inferno-os/source/browse/utils/6c/6.out.h
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package x86
-
-import "cmd/internal/obj"
-
-//go:generate go run ../stringer.go -i $GOFILE -o anames.go -p x86
-
-/*
- *	amd64
- */
-const (
-	AAAA = obj.ABaseAMD64 + obj.A_ARCHSPECIFIC + iota
-	AAAD
-	AAAM
-	AAAS
-	AADCB
-	AADCL
-	AADCW
-	AADDB
-	AADDL
-	AADDW
-	AADJSP
-	AANDB
-	AANDL
-	AANDW
-	AARPL
-	ABOUNDL
-	ABOUNDW
-	ABSFL
-	ABSFW
-	ABSRL
-	ABSRW
-	ABTL
-	ABTW
-	ABTCL
-	ABTCW
-	ABTRL
-	ABTRW
-	ABTSL
-	ABTSW
-	ABYTE
-	ACLC
-	ACLD
-	ACLI
-	ACLTS
-	ACMC
-	ACMPB
-	ACMPL
-	ACMPW
-	ACMPSB
-	ACMPSL
-	ACMPSW
-	ADAA
-	ADAS
-	ADECB
-	ADECL
-	ADECQ
-	ADECW
-	ADIVB
-	ADIVL
-	ADIVW
-	AENTER
-	AHLT
-	AIDIVB
-	AIDIVL
-	AIDIVW
-	AIMULB
-	AIMULL
-	AIMULW
-	AINB
-	AINL
-	AINW
-	AINCB
-	AINCL
-	AINCQ
-	AINCW
-	AINSB
-	AINSL
-	AINSW
-	AINT
-	AINTO
-	AIRETL
-	AIRETW
-	AJCC
-	AJCS
-	AJCXZL
-	AJEQ
-	AJGE
-	AJGT
-	AJHI
-	AJLE
-	AJLS
-	AJLT
-	AJMI
-	AJNE
-	AJOC
-	AJOS
-	AJPC
-	AJPL
-	AJPS
-	ALAHF
-	ALARL
-	ALARW
-	ALEAL
-	ALEAW
-	ALEAVEL
-	ALEAVEW
-	ALOCK
-	ALODSB
-	ALODSL
-	ALODSW
-	ALONG
-	ALOOP
-	ALOOPEQ
-	ALOOPNE
-	ALSLL
-	ALSLW
-	AMOVB
-	AMOVL
-	AMOVW
-	AMOVBLSX
-	AMOVBLZX
-	AMOVBQSX
-	AMOVBQZX
-	AMOVBWSX
-	AMOVBWZX
-	AMOVWLSX
-	AMOVWLZX
-	AMOVWQSX
-	AMOVWQZX
-	AMOVSB
-	AMOVSL
-	AMOVSW
-	AMULB
-	AMULL
-	AMULW
-	ANEGB
-	ANEGL
-	ANEGW
-	ANOTB
-	ANOTL
-	ANOTW
-	AORB
-	AORL
-	AORW
-	AOUTB
-	AOUTL
-	AOUTW
-	AOUTSB
-	AOUTSL
-	AOUTSW
-	APAUSE
-	APOPAL
-	APOPAW
-	APOPFL
-	APOPFW
-	APOPL
-	APOPW
-	APUSHAL
-	APUSHAW
-	APUSHFL
-	APUSHFW
-	APUSHL
-	APUSHW
-	ARCLB
-	ARCLL
-	ARCLW
-	ARCRB
-	ARCRL
-	ARCRW
-	AREP
-	AREPN
-	AROLB
-	AROLL
-	AROLW
-	ARORB
-	ARORL
-	ARORW
-	ASAHF
-	ASALB
-	ASALL
-	ASALW
-	ASARB
-	ASARL
-	ASARW
-	ASBBB
-	ASBBL
-	ASBBW
-	ASCASB
-	ASCASL
-	ASCASW
-	ASETCC
-	ASETCS
-	ASETEQ
-	ASETGE
-	ASETGT
-	ASETHI
-	ASETLE
-	ASETLS
-	ASETLT
-	ASETMI
-	ASETNE
-	ASETOC
-	ASETOS
-	ASETPC
-	ASETPL
-	ASETPS
-	ACDQ
-	ACWD
-	ASHLB
-	ASHLL
-	ASHLW
-	ASHRB
-	ASHRL
-	ASHRW
-	ASTC
-	ASTD
-	ASTI
-	ASTOSB
-	ASTOSL
-	ASTOSW
-	ASUBB
-	ASUBL
-	ASUBW
-	ASYSCALL
-	ATESTB
-	ATESTL
-	ATESTW
-	AVERR
-	AVERW
-	AWAIT
-	AWORD
-	AXCHGB
-	AXCHGL
-	AXCHGW
-	AXLAT
-	AXORB
-	AXORL
-	AXORW
-
-	AFMOVB
-	AFMOVBP
-	AFMOVD
-	AFMOVDP
-	AFMOVF
-	AFMOVFP
-	AFMOVL
-	AFMOVLP
-	AFMOVV
-	AFMOVVP
-	AFMOVW
-	AFMOVWP
-	AFMOVX
-	AFMOVXP
-
-	AFCOMB
-	AFCOMBP
-	AFCOMD
-	AFCOMDP
-	AFCOMDPP
-	AFCOMF
-	AFCOMFP
-	AFCOML
-	AFCOMLP
-	AFCOMW
-	AFCOMWP
-	AFUCOM
-	AFUCOMP
-	AFUCOMPP
-
-	AFADDDP
-	AFADDW
-	AFADDL
-	AFADDF
-	AFADDD
-
-	AFMULDP
-	AFMULW
-	AFMULL
-	AFMULF
-	AFMULD
-
-	AFSUBDP
-	AFSUBW
-	AFSUBL
-	AFSUBF
-	AFSUBD
-
-	AFSUBRDP
-	AFSUBRW
-	AFSUBRL
-	AFSUBRF
-	AFSUBRD
-
-	AFDIVDP
-	AFDIVW
-	AFDIVL
-	AFDIVF
-	AFDIVD
-
-	AFDIVRDP
-	AFDIVRW
-	AFDIVRL
-	AFDIVRF
-	AFDIVRD
-
-	AFXCHD
-	AFFREE
-
-	AFLDCW
-	AFLDENV
-	AFRSTOR
-	AFSAVE
-	AFSTCW
-	AFSTENV
-	AFSTSW
-
-	AF2XM1
-	AFABS
-	AFCHS
-	AFCLEX
-	AFCOS
-	AFDECSTP
-	AFINCSTP
-	AFINIT
-	AFLD1
-	AFLDL2E
-	AFLDL2T
-	AFLDLG2
-	AFLDLN2
-	AFLDPI
-	AFLDZ
-	AFNOP
-	AFPATAN
-	AFPREM
-	AFPREM1
-	AFPTAN
-	AFRNDINT
-	AFSCALE
-	AFSIN
-	AFSINCOS
-	AFSQRT
-	AFTST
-	AFXAM
-	AFXTRACT
-	AFYL2X
-	AFYL2XP1
-
-	// extra 32-bit operations
-	ACMPXCHGB
-	ACMPXCHGL
-	ACMPXCHGW
-	ACMPXCHG8B
-	ACPUID
-	AINVD
-	AINVLPG
-	ALFENCE
-	AMFENCE
-	AMOVNTIL
-	ARDMSR
-	ARDPMC
-	ARDTSC
-	ARSM
-	ASFENCE
-	ASYSRET
-	AWBINVD
-	AWRMSR
-	AXADDB
-	AXADDL
-	AXADDW
-
-	// conditional move
-	ACMOVLCC
-	ACMOVLCS
-	ACMOVLEQ
-	ACMOVLGE
-	ACMOVLGT
-	ACMOVLHI
-	ACMOVLLE
-	ACMOVLLS
-	ACMOVLLT
-	ACMOVLMI
-	ACMOVLNE
-	ACMOVLOC
-	ACMOVLOS
-	ACMOVLPC
-	ACMOVLPL
-	ACMOVLPS
-	ACMOVQCC
-	ACMOVQCS
-	ACMOVQEQ
-	ACMOVQGE
-	ACMOVQGT
-	ACMOVQHI
-	ACMOVQLE
-	ACMOVQLS
-	ACMOVQLT
-	ACMOVQMI
-	ACMOVQNE
-	ACMOVQOC
-	ACMOVQOS
-	ACMOVQPC
-	ACMOVQPL
-	ACMOVQPS
-	ACMOVWCC
-	ACMOVWCS
-	ACMOVWEQ
-	ACMOVWGE
-	ACMOVWGT
-	ACMOVWHI
-	ACMOVWLE
-	ACMOVWLS
-	ACMOVWLT
-	ACMOVWMI
-	ACMOVWNE
-	ACMOVWOC
-	ACMOVWOS
-	ACMOVWPC
-	ACMOVWPL
-	ACMOVWPS
-
-	// 64-bit
-	AADCQ
-	AADDQ
-	AANDQ
-	ABSFQ
-	ABSRQ
-	ABTCQ
-	ABTQ
-	ABTRQ
-	ABTSQ
-	ACMPQ
-	ACMPSQ
-	ACMPXCHGQ
-	ACQO
-	ADIVQ
-	AIDIVQ
-	AIMULQ
-	AIRETQ
-	AJCXZQ
-	ALEAQ
-	ALEAVEQ
-	ALODSQ
-	AMOVQ
-	AMOVLQSX
-	AMOVLQZX
-	AMOVNTIQ
-	AMOVSQ
-	AMULQ
-	ANEGQ
-	ANOTQ
-	AORQ
-	APOPFQ
-	APOPQ
-	APUSHFQ
-	APUSHQ
-	ARCLQ
-	ARCRQ
-	AROLQ
-	ARORQ
-	AQUAD
-	ASALQ
-	ASARQ
-	ASBBQ
-	ASCASQ
-	ASHLQ
-	ASHRQ
-	ASTOSQ
-	ASUBQ
-	ATESTQ
-	AXADDQ
-	AXCHGQ
-	AXORQ
-
-	// media
-	AADDPD
-	AADDPS
-	AADDSD
-	AADDSS
-	AANDNPD
-	AANDNPS
-	AANDPD
-	AANDPS
-	ACMPPD
-	ACMPPS
-	ACMPSD
-	ACMPSS
-	ACOMISD
-	ACOMISS
-	ACVTPD2PL
-	ACVTPD2PS
-	ACVTPL2PD
-	ACVTPL2PS
-	ACVTPS2PD
-	ACVTPS2PL
-	ACVTSD2SL
-	ACVTSD2SQ
-	ACVTSD2SS
-	ACVTSL2SD
-	ACVTSL2SS
-	ACVTSQ2SD
-	ACVTSQ2SS
-	ACVTSS2SD
-	ACVTSS2SL
-	ACVTSS2SQ
-	ACVTTPD2PL
-	ACVTTPS2PL
-	ACVTTSD2SL
-	ACVTTSD2SQ
-	ACVTTSS2SL
-	ACVTTSS2SQ
-	ADIVPD
-	ADIVPS
-	ADIVSD
-	ADIVSS
-	AEMMS
-	AFXRSTOR
-	AFXRSTOR64
-	AFXSAVE
-	AFXSAVE64
-	ALDMXCSR
-	AMASKMOVOU
-	AMASKMOVQ
-	AMAXPD
-	AMAXPS
-	AMAXSD
-	AMAXSS
-	AMINPD
-	AMINPS
-	AMINSD
-	AMINSS
-	AMOVAPD
-	AMOVAPS
-	AMOVOU
-	AMOVHLPS
-	AMOVHPD
-	AMOVHPS
-	AMOVLHPS
-	AMOVLPD
-	AMOVLPS
-	AMOVMSKPD
-	AMOVMSKPS
-	AMOVNTO
-	AMOVNTPD
-	AMOVNTPS
-	AMOVNTQ
-	AMOVO
-	AMOVQOZX
-	AMOVSD
-	AMOVSS
-	AMOVUPD
-	AMOVUPS
-	AMULPD
-	AMULPS
-	AMULSD
-	AMULSS
-	AORPD
-	AORPS
-	APACKSSLW
-	APACKSSWB
-	APACKUSWB
-	APADDB
-	APADDL
-	APADDQ
-	APADDSB
-	APADDSW
-	APADDUSB
-	APADDUSW
-	APADDW
-	APANDB
-	APANDL
-	APANDSB
-	APANDSW
-	APANDUSB
-	APANDUSW
-	APANDW
-	APAND
-	APANDN
-	APAVGB
-	APAVGW
-	APCMPEQB
-	APCMPEQL
-	APCMPEQW
-	APCMPGTB
-	APCMPGTL
-	APCMPGTW
-	APEXTRW
-	APFACC
-	APFADD
-	APFCMPEQ
-	APFCMPGE
-	APFCMPGT
-	APFMAX
-	APFMIN
-	APFMUL
-	APFNACC
-	APFPNACC
-	APFRCP
-	APFRCPIT1
-	APFRCPI2T
-	APFRSQIT1
-	APFRSQRT
-	APFSUB
-	APFSUBR
-	APINSRW
-	APINSRD
-	APINSRQ
-	APMADDWL
-	APMAXSW
-	APMAXUB
-	APMINSW
-	APMINUB
-	APMOVMSKB
-	APMULHRW
-	APMULHUW
-	APMULHW
-	APMULLW
-	APMULULQ
-	APOR
-	APSADBW
-	APSHUFHW
-	APSHUFL
-	APSHUFLW
-	APSHUFW
-	APSHUFB
-	APSLLO
-	APSLLL
-	APSLLQ
-	APSLLW
-	APSRAL
-	APSRAW
-	APSRLO
-	APSRLL
-	APSRLQ
-	APSRLW
-	APSUBB
-	APSUBL
-	APSUBQ
-	APSUBSB
-	APSUBSW
-	APSUBUSB
-	APSUBUSW
-	APSUBW
-	APSWAPL
-	APUNPCKHBW
-	APUNPCKHLQ
-	APUNPCKHQDQ
-	APUNPCKHWL
-	APUNPCKLBW
-	APUNPCKLLQ
-	APUNPCKLQDQ
-	APUNPCKLWL
-	APXOR
-	ARCPPS
-	ARCPSS
-	ARSQRTPS
-	ARSQRTSS
-	ASHUFPD
-	ASHUFPS
-	ASQRTPD
-	ASQRTPS
-	ASQRTSD
-	ASQRTSS
-	ASTMXCSR
-	ASUBPD
-	ASUBPS
-	ASUBSD
-	ASUBSS
-	AUCOMISD
-	AUCOMISS
-	AUNPCKHPD
-	AUNPCKHPS
-	AUNPCKLPD
-	AUNPCKLPS
-	AXORPD
-	AXORPS
-
-	APF2IW
-	APF2IL
-	API2FW
-	API2FL
-	ARETFW
-	ARETFL
-	ARETFQ
-	ASWAPGS
-
-	AMODE
-	ACRC32B
-	ACRC32Q
-	AIMUL3Q
-
-	APREFETCHT0
-	APREFETCHT1
-	APREFETCHT2
-	APREFETCHNTA
-
-	AMOVQL
-	ABSWAPL
-	ABSWAPQ
-
-	AAESENC
-	AAESENCLAST
-	AAESDEC
-	AAESDECLAST
-	AAESIMC
-	AAESKEYGENASSIST
-
-	APSHUFD
-	APCLMULQDQ
-
-	// from 386
-	AJCXZW
-	AFCMOVCC
-	AFCMOVCS
-	AFCMOVEQ
-	AFCMOVHI
-	AFCMOVLS
-	AFCMOVNE
-	AFCMOVNU
-	AFCMOVUN
-	AFCOMI
-	AFCOMIP
-	AFUCOMI
-	AFUCOMIP
-
-	ALAST
-)
-
-const (
-	REG_NONE = 0
-)
-
-const (
-	REG_AL = obj.RBaseAMD64 + iota
-	REG_CL
-	REG_DL
-	REG_BL
-	REG_SPB
-	REG_BPB
-	REG_SIB
-	REG_DIB
-	REG_R8B
-	REG_R9B
-	REG_R10B
-	REG_R11B
-	REG_R12B
-	REG_R13B
-	REG_R14B
-	REG_R15B
-
-	REG_AX
-	REG_CX
-	REG_DX
-	REG_BX
-	REG_SP
-	REG_BP
-	REG_SI
-	REG_DI
-	REG_R8
-	REG_R9
-	REG_R10
-	REG_R11
-	REG_R12
-	REG_R13
-	REG_R14
-	REG_R15
-
-	REG_AH
-	REG_CH
-	REG_DH
-	REG_BH
-
-	REG_F0
-	REG_F1
-	REG_F2
-	REG_F3
-	REG_F4
-	REG_F5
-	REG_F6
-	REG_F7
-
-	REG_M0
-	REG_M1
-	REG_M2
-	REG_M3
-	REG_M4
-	REG_M5
-	REG_M6
-	REG_M7
-
-	REG_X0
-	REG_X1
-	REG_X2
-	REG_X3
-	REG_X4
-	REG_X5
-	REG_X6
-	REG_X7
-	REG_X8
-	REG_X9
-	REG_X10
-	REG_X11
-	REG_X12
-	REG_X13
-	REG_X14
-	REG_X15
-
-	REG_CS
-	REG_SS
-	REG_DS
-	REG_ES
-	REG_FS
-	REG_GS
-
-	REG_GDTR /* global descriptor table register */
-	REG_IDTR /* interrupt descriptor table register */
-	REG_LDTR /* local descriptor table register */
-	REG_MSW  /* machine status word */
-	REG_TASK /* task register */
-
-	REG_CR0
-	REG_CR1
-	REG_CR2
-	REG_CR3
-	REG_CR4
-	REG_CR5
-	REG_CR6
-	REG_CR7
-	REG_CR8
-	REG_CR9
-	REG_CR10
-	REG_CR11
-	REG_CR12
-	REG_CR13
-	REG_CR14
-	REG_CR15
-
-	REG_DR0
-	REG_DR1
-	REG_DR2
-	REG_DR3
-	REG_DR4
-	REG_DR5
-	REG_DR6
-	REG_DR7
-
-	REG_TR0
-	REG_TR1
-	REG_TR2
-	REG_TR3
-	REG_TR4
-	REG_TR5
-	REG_TR6
-	REG_TR7
-
-	REG_TLS
-
-	MAXREG
-
-	REG_CR = REG_CR0
-	REG_DR = REG_DR0
-	REG_TR = REG_TR0
-
-	REGARG   = -1
-	REGRET   = REG_AX
-	FREGRET  = REG_X0
-	REGSP    = REG_SP
-	REGTMP   = REG_DI
-	REGCTXT  = REG_DX
-	REGEXT   = REG_R15     /* compiler allocates external registers R15 down */
-	FREGMIN  = REG_X0 + 5  /* first register variable */
-	FREGEXT  = REG_X0 + 15 /* first external register */
-	T_TYPE   = 1 << 0
-	T_INDEX  = 1 << 1
-	T_OFFSET = 1 << 2
-	T_FCONST = 1 << 3
-	T_SYM    = 1 << 4
-	T_SCONST = 1 << 5
-	T_64     = 1 << 6
-	T_GOTYPE = 1 << 7
-)
diff --git a/src/cmd/internal/obj/x86/anames.go b/src/cmd/internal/obj/x86/anames.go
deleted file mode 100644
index 7f7708c..0000000
--- a/src/cmd/internal/obj/x86/anames.go
+++ /dev/null
@@ -1,696 +0,0 @@
-// Generated by stringer -i a.out.go -o anames.go -p x86
-// Do not edit.
-
-package x86
-
-import "cmd/internal/obj"
-
-var Anames = []string{
-	obj.A_ARCHSPECIFIC: "AAA",
-	"AAD",
-	"AAM",
-	"AAS",
-	"ADCB",
-	"ADCL",
-	"ADCW",
-	"ADDB",
-	"ADDL",
-	"ADDW",
-	"ADJSP",
-	"ANDB",
-	"ANDL",
-	"ANDW",
-	"ARPL",
-	"BOUNDL",
-	"BOUNDW",
-	"BSFL",
-	"BSFW",
-	"BSRL",
-	"BSRW",
-	"BTL",
-	"BTW",
-	"BTCL",
-	"BTCW",
-	"BTRL",
-	"BTRW",
-	"BTSL",
-	"BTSW",
-	"BYTE",
-	"CLC",
-	"CLD",
-	"CLI",
-	"CLTS",
-	"CMC",
-	"CMPB",
-	"CMPL",
-	"CMPW",
-	"CMPSB",
-	"CMPSL",
-	"CMPSW",
-	"DAA",
-	"DAS",
-	"DECB",
-	"DECL",
-	"DECQ",
-	"DECW",
-	"DIVB",
-	"DIVL",
-	"DIVW",
-	"ENTER",
-	"HLT",
-	"IDIVB",
-	"IDIVL",
-	"IDIVW",
-	"IMULB",
-	"IMULL",
-	"IMULW",
-	"INB",
-	"INL",
-	"INW",
-	"INCB",
-	"INCL",
-	"INCQ",
-	"INCW",
-	"INSB",
-	"INSL",
-	"INSW",
-	"INT",
-	"INTO",
-	"IRETL",
-	"IRETW",
-	"JCC",
-	"JCS",
-	"JCXZL",
-	"JEQ",
-	"JGE",
-	"JGT",
-	"JHI",
-	"JLE",
-	"JLS",
-	"JLT",
-	"JMI",
-	"JNE",
-	"JOC",
-	"JOS",
-	"JPC",
-	"JPL",
-	"JPS",
-	"LAHF",
-	"LARL",
-	"LARW",
-	"LEAL",
-	"LEAW",
-	"LEAVEL",
-	"LEAVEW",
-	"LOCK",
-	"LODSB",
-	"LODSL",
-	"LODSW",
-	"LONG",
-	"LOOP",
-	"LOOPEQ",
-	"LOOPNE",
-	"LSLL",
-	"LSLW",
-	"MOVB",
-	"MOVL",
-	"MOVW",
-	"MOVBLSX",
-	"MOVBLZX",
-	"MOVBQSX",
-	"MOVBQZX",
-	"MOVBWSX",
-	"MOVBWZX",
-	"MOVWLSX",
-	"MOVWLZX",
-	"MOVWQSX",
-	"MOVWQZX",
-	"MOVSB",
-	"MOVSL",
-	"MOVSW",
-	"MULB",
-	"MULL",
-	"MULW",
-	"NEGB",
-	"NEGL",
-	"NEGW",
-	"NOTB",
-	"NOTL",
-	"NOTW",
-	"ORB",
-	"ORL",
-	"ORW",
-	"OUTB",
-	"OUTL",
-	"OUTW",
-	"OUTSB",
-	"OUTSL",
-	"OUTSW",
-	"PAUSE",
-	"POPAL",
-	"POPAW",
-	"POPFL",
-	"POPFW",
-	"POPL",
-	"POPW",
-	"PUSHAL",
-	"PUSHAW",
-	"PUSHFL",
-	"PUSHFW",
-	"PUSHL",
-	"PUSHW",
-	"RCLB",
-	"RCLL",
-	"RCLW",
-	"RCRB",
-	"RCRL",
-	"RCRW",
-	"REP",
-	"REPN",
-	"ROLB",
-	"ROLL",
-	"ROLW",
-	"RORB",
-	"RORL",
-	"RORW",
-	"SAHF",
-	"SALB",
-	"SALL",
-	"SALW",
-	"SARB",
-	"SARL",
-	"SARW",
-	"SBBB",
-	"SBBL",
-	"SBBW",
-	"SCASB",
-	"SCASL",
-	"SCASW",
-	"SETCC",
-	"SETCS",
-	"SETEQ",
-	"SETGE",
-	"SETGT",
-	"SETHI",
-	"SETLE",
-	"SETLS",
-	"SETLT",
-	"SETMI",
-	"SETNE",
-	"SETOC",
-	"SETOS",
-	"SETPC",
-	"SETPL",
-	"SETPS",
-	"CDQ",
-	"CWD",
-	"SHLB",
-	"SHLL",
-	"SHLW",
-	"SHRB",
-	"SHRL",
-	"SHRW",
-	"STC",
-	"STD",
-	"STI",
-	"STOSB",
-	"STOSL",
-	"STOSW",
-	"SUBB",
-	"SUBL",
-	"SUBW",
-	"SYSCALL",
-	"TESTB",
-	"TESTL",
-	"TESTW",
-	"VERR",
-	"VERW",
-	"WAIT",
-	"WORD",
-	"XCHGB",
-	"XCHGL",
-	"XCHGW",
-	"XLAT",
-	"XORB",
-	"XORL",
-	"XORW",
-	"FMOVB",
-	"FMOVBP",
-	"FMOVD",
-	"FMOVDP",
-	"FMOVF",
-	"FMOVFP",
-	"FMOVL",
-	"FMOVLP",
-	"FMOVV",
-	"FMOVVP",
-	"FMOVW",
-	"FMOVWP",
-	"FMOVX",
-	"FMOVXP",
-	"FCOMB",
-	"FCOMBP",
-	"FCOMD",
-	"FCOMDP",
-	"FCOMDPP",
-	"FCOMF",
-	"FCOMFP",
-	"FCOML",
-	"FCOMLP",
-	"FCOMW",
-	"FCOMWP",
-	"FUCOM",
-	"FUCOMP",
-	"FUCOMPP",
-	"FADDDP",
-	"FADDW",
-	"FADDL",
-	"FADDF",
-	"FADDD",
-	"FMULDP",
-	"FMULW",
-	"FMULL",
-	"FMULF",
-	"FMULD",
-	"FSUBDP",
-	"FSUBW",
-	"FSUBL",
-	"FSUBF",
-	"FSUBD",
-	"FSUBRDP",
-	"FSUBRW",
-	"FSUBRL",
-	"FSUBRF",
-	"FSUBRD",
-	"FDIVDP",
-	"FDIVW",
-	"FDIVL",
-	"FDIVF",
-	"FDIVD",
-	"FDIVRDP",
-	"FDIVRW",
-	"FDIVRL",
-	"FDIVRF",
-	"FDIVRD",
-	"FXCHD",
-	"FFREE",
-	"FLDCW",
-	"FLDENV",
-	"FRSTOR",
-	"FSAVE",
-	"FSTCW",
-	"FSTENV",
-	"FSTSW",
-	"F2XM1",
-	"FABS",
-	"FCHS",
-	"FCLEX",
-	"FCOS",
-	"FDECSTP",
-	"FINCSTP",
-	"FINIT",
-	"FLD1",
-	"FLDL2E",
-	"FLDL2T",
-	"FLDLG2",
-	"FLDLN2",
-	"FLDPI",
-	"FLDZ",
-	"FNOP",
-	"FPATAN",
-	"FPREM",
-	"FPREM1",
-	"FPTAN",
-	"FRNDINT",
-	"FSCALE",
-	"FSIN",
-	"FSINCOS",
-	"FSQRT",
-	"FTST",
-	"FXAM",
-	"FXTRACT",
-	"FYL2X",
-	"FYL2XP1",
-	"CMPXCHGB",
-	"CMPXCHGL",
-	"CMPXCHGW",
-	"CMPXCHG8B",
-	"CPUID",
-	"INVD",
-	"INVLPG",
-	"LFENCE",
-	"MFENCE",
-	"MOVNTIL",
-	"RDMSR",
-	"RDPMC",
-	"RDTSC",
-	"RSM",
-	"SFENCE",
-	"SYSRET",
-	"WBINVD",
-	"WRMSR",
-	"XADDB",
-	"XADDL",
-	"XADDW",
-	"CMOVLCC",
-	"CMOVLCS",
-	"CMOVLEQ",
-	"CMOVLGE",
-	"CMOVLGT",
-	"CMOVLHI",
-	"CMOVLLE",
-	"CMOVLLS",
-	"CMOVLLT",
-	"CMOVLMI",
-	"CMOVLNE",
-	"CMOVLOC",
-	"CMOVLOS",
-	"CMOVLPC",
-	"CMOVLPL",
-	"CMOVLPS",
-	"CMOVQCC",
-	"CMOVQCS",
-	"CMOVQEQ",
-	"CMOVQGE",
-	"CMOVQGT",
-	"CMOVQHI",
-	"CMOVQLE",
-	"CMOVQLS",
-	"CMOVQLT",
-	"CMOVQMI",
-	"CMOVQNE",
-	"CMOVQOC",
-	"CMOVQOS",
-	"CMOVQPC",
-	"CMOVQPL",
-	"CMOVQPS",
-	"CMOVWCC",
-	"CMOVWCS",
-	"CMOVWEQ",
-	"CMOVWGE",
-	"CMOVWGT",
-	"CMOVWHI",
-	"CMOVWLE",
-	"CMOVWLS",
-	"CMOVWLT",
-	"CMOVWMI",
-	"CMOVWNE",
-	"CMOVWOC",
-	"CMOVWOS",
-	"CMOVWPC",
-	"CMOVWPL",
-	"CMOVWPS",
-	"ADCQ",
-	"ADDQ",
-	"ANDQ",
-	"BSFQ",
-	"BSRQ",
-	"BTCQ",
-	"BTQ",
-	"BTRQ",
-	"BTSQ",
-	"CMPQ",
-	"CMPSQ",
-	"CMPXCHGQ",
-	"CQO",
-	"DIVQ",
-	"IDIVQ",
-	"IMULQ",
-	"IRETQ",
-	"JCXZQ",
-	"LEAQ",
-	"LEAVEQ",
-	"LODSQ",
-	"MOVQ",
-	"MOVLQSX",
-	"MOVLQZX",
-	"MOVNTIQ",
-	"MOVSQ",
-	"MULQ",
-	"NEGQ",
-	"NOTQ",
-	"ORQ",
-	"POPFQ",
-	"POPQ",
-	"PUSHFQ",
-	"PUSHQ",
-	"RCLQ",
-	"RCRQ",
-	"ROLQ",
-	"RORQ",
-	"QUAD",
-	"SALQ",
-	"SARQ",
-	"SBBQ",
-	"SCASQ",
-	"SHLQ",
-	"SHRQ",
-	"STOSQ",
-	"SUBQ",
-	"TESTQ",
-	"XADDQ",
-	"XCHGQ",
-	"XORQ",
-	"ADDPD",
-	"ADDPS",
-	"ADDSD",
-	"ADDSS",
-	"ANDNPD",
-	"ANDNPS",
-	"ANDPD",
-	"ANDPS",
-	"CMPPD",
-	"CMPPS",
-	"CMPSD",
-	"CMPSS",
-	"COMISD",
-	"COMISS",
-	"CVTPD2PL",
-	"CVTPD2PS",
-	"CVTPL2PD",
-	"CVTPL2PS",
-	"CVTPS2PD",
-	"CVTPS2PL",
-	"CVTSD2SL",
-	"CVTSD2SQ",
-	"CVTSD2SS",
-	"CVTSL2SD",
-	"CVTSL2SS",
-	"CVTSQ2SD",
-	"CVTSQ2SS",
-	"CVTSS2SD",
-	"CVTSS2SL",
-	"CVTSS2SQ",
-	"CVTTPD2PL",
-	"CVTTPS2PL",
-	"CVTTSD2SL",
-	"CVTTSD2SQ",
-	"CVTTSS2SL",
-	"CVTTSS2SQ",
-	"DIVPD",
-	"DIVPS",
-	"DIVSD",
-	"DIVSS",
-	"EMMS",
-	"FXRSTOR",
-	"FXRSTOR64",
-	"FXSAVE",
-	"FXSAVE64",
-	"LDMXCSR",
-	"MASKMOVOU",
-	"MASKMOVQ",
-	"MAXPD",
-	"MAXPS",
-	"MAXSD",
-	"MAXSS",
-	"MINPD",
-	"MINPS",
-	"MINSD",
-	"MINSS",
-	"MOVAPD",
-	"MOVAPS",
-	"MOVOU",
-	"MOVHLPS",
-	"MOVHPD",
-	"MOVHPS",
-	"MOVLHPS",
-	"MOVLPD",
-	"MOVLPS",
-	"MOVMSKPD",
-	"MOVMSKPS",
-	"MOVNTO",
-	"MOVNTPD",
-	"MOVNTPS",
-	"MOVNTQ",
-	"MOVO",
-	"MOVQOZX",
-	"MOVSD",
-	"MOVSS",
-	"MOVUPD",
-	"MOVUPS",
-	"MULPD",
-	"MULPS",
-	"MULSD",
-	"MULSS",
-	"ORPD",
-	"ORPS",
-	"PACKSSLW",
-	"PACKSSWB",
-	"PACKUSWB",
-	"PADDB",
-	"PADDL",
-	"PADDQ",
-	"PADDSB",
-	"PADDSW",
-	"PADDUSB",
-	"PADDUSW",
-	"PADDW",
-	"PANDB",
-	"PANDL",
-	"PANDSB",
-	"PANDSW",
-	"PANDUSB",
-	"PANDUSW",
-	"PANDW",
-	"PAND",
-	"PANDN",
-	"PAVGB",
-	"PAVGW",
-	"PCMPEQB",
-	"PCMPEQL",
-	"PCMPEQW",
-	"PCMPGTB",
-	"PCMPGTL",
-	"PCMPGTW",
-	"PEXTRW",
-	"PFACC",
-	"PFADD",
-	"PFCMPEQ",
-	"PFCMPGE",
-	"PFCMPGT",
-	"PFMAX",
-	"PFMIN",
-	"PFMUL",
-	"PFNACC",
-	"PFPNACC",
-	"PFRCP",
-	"PFRCPIT1",
-	"PFRCPI2T",
-	"PFRSQIT1",
-	"PFRSQRT",
-	"PFSUB",
-	"PFSUBR",
-	"PINSRW",
-	"PINSRD",
-	"PINSRQ",
-	"PMADDWL",
-	"PMAXSW",
-	"PMAXUB",
-	"PMINSW",
-	"PMINUB",
-	"PMOVMSKB",
-	"PMULHRW",
-	"PMULHUW",
-	"PMULHW",
-	"PMULLW",
-	"PMULULQ",
-	"POR",
-	"PSADBW",
-	"PSHUFHW",
-	"PSHUFL",
-	"PSHUFLW",
-	"PSHUFW",
-	"PSHUFB",
-	"PSLLO",
-	"PSLLL",
-	"PSLLQ",
-	"PSLLW",
-	"PSRAL",
-	"PSRAW",
-	"PSRLO",
-	"PSRLL",
-	"PSRLQ",
-	"PSRLW",
-	"PSUBB",
-	"PSUBL",
-	"PSUBQ",
-	"PSUBSB",
-	"PSUBSW",
-	"PSUBUSB",
-	"PSUBUSW",
-	"PSUBW",
-	"PSWAPL",
-	"PUNPCKHBW",
-	"PUNPCKHLQ",
-	"PUNPCKHQDQ",
-	"PUNPCKHWL",
-	"PUNPCKLBW",
-	"PUNPCKLLQ",
-	"PUNPCKLQDQ",
-	"PUNPCKLWL",
-	"PXOR",
-	"RCPPS",
-	"RCPSS",
-	"RSQRTPS",
-	"RSQRTSS",
-	"SHUFPD",
-	"SHUFPS",
-	"SQRTPD",
-	"SQRTPS",
-	"SQRTSD",
-	"SQRTSS",
-	"STMXCSR",
-	"SUBPD",
-	"SUBPS",
-	"SUBSD",
-	"SUBSS",
-	"UCOMISD",
-	"UCOMISS",
-	"UNPCKHPD",
-	"UNPCKHPS",
-	"UNPCKLPD",
-	"UNPCKLPS",
-	"XORPD",
-	"XORPS",
-	"PF2IW",
-	"PF2IL",
-	"PI2FW",
-	"PI2FL",
-	"RETFW",
-	"RETFL",
-	"RETFQ",
-	"SWAPGS",
-	"MODE",
-	"CRC32B",
-	"CRC32Q",
-	"IMUL3Q",
-	"PREFETCHT0",
-	"PREFETCHT1",
-	"PREFETCHT2",
-	"PREFETCHNTA",
-	"MOVQL",
-	"BSWAPL",
-	"BSWAPQ",
-	"AESENC",
-	"AESENCLAST",
-	"AESDEC",
-	"AESDECLAST",
-	"AESIMC",
-	"AESKEYGENASSIST",
-	"PSHUFD",
-	"PCLMULQDQ",
-	"JCXZW",
-	"FCMOVCC",
-	"FCMOVCS",
-	"FCMOVEQ",
-	"FCMOVHI",
-	"FCMOVLS",
-	"FCMOVNE",
-	"FCMOVNU",
-	"FCMOVUN",
-	"FCOMI",
-	"FCOMIP",
-	"FUCOMI",
-	"FUCOMIP",
-	"LAST",
-}
diff --git a/src/cmd/internal/obj/x86/asm6.go b/src/cmd/internal/obj/x86/asm6.go
deleted file mode 100644
index 7a69dc8..0000000
--- a/src/cmd/internal/obj/x86/asm6.go
+++ /dev/null
@@ -1,4380 +0,0 @@
-// Inferno utils/6l/span.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6l/span.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package x86
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-	"log"
-	"strings"
-)
-
-// Instruction layout.
-
-const (
-	MaxAlign = 32 // max data alignment
-
-	// Loop alignment constants:
-	// want to align loop entry to LoopAlign-byte boundary,
-	// and willing to insert at most MaxLoopPad bytes of NOP to do so.
-	// We define a loop entry as the target of a backward jump.
-	//
-	// gcc uses MaxLoopPad = 10 for its 'generic x86-64' config,
-	// and it aligns all jump targets, not just backward jump targets.
-	//
-	// As of 6/1/2012, the effect of setting MaxLoopPad = 10 here
-	// is very slight but negative, so the alignment is disabled by
-	// setting MaxLoopPad = 0. The code is here for reference and
-	// for future experiments.
-	//
-	LoopAlign  = 16
-	MaxLoopPad = 0
-	FuncAlign  = 16
-)
-
-type Optab struct {
-	as     int16
-	ytab   []ytab
-	prefix uint8
-	op     [23]uint8
-}
-
-type ytab struct {
-	from    uint8
-	from3   uint8
-	to      uint8
-	zcase   uint8
-	zoffset uint8
-}
-
-type Movtab struct {
-	as   int16
-	ft   uint8
-	f3t  uint8
-	tt   uint8
-	code uint8
-	op   [4]uint8
-}
-
-const (
-	Yxxx = iota
-	Ynone
-	Yi0 // $0
-	Yi1 // $1
-	Yi8 // $x, x fits in int8
-	Yu8 // $x, x fits in uint8
-	Yu7 // $x, x in 0..127 (fits in both int8 and uint8)
-	Ys32
-	Yi32
-	Yi64
-	Yiauto
-	Yal
-	Ycl
-	Yax
-	Ycx
-	Yrb
-	Yrl
-	Yrl32 // Yrl on 32-bit system
-	Yrf
-	Yf0
-	Yrx
-	Ymb
-	Yml
-	Ym
-	Ybr
-	Ycs
-	Yss
-	Yds
-	Yes
-	Yfs
-	Ygs
-	Ygdtr
-	Yidtr
-	Yldtr
-	Ymsw
-	Ytask
-	Ycr0
-	Ycr1
-	Ycr2
-	Ycr3
-	Ycr4
-	Ycr5
-	Ycr6
-	Ycr7
-	Ycr8
-	Ydr0
-	Ydr1
-	Ydr2
-	Ydr3
-	Ydr4
-	Ydr5
-	Ydr6
-	Ydr7
-	Ytr0
-	Ytr1
-	Ytr2
-	Ytr3
-	Ytr4
-	Ytr5
-	Ytr6
-	Ytr7
-	Ymr
-	Ymm
-	Yxr
-	Yxm
-	Ytls
-	Ytextsize
-	Yindir
-	Ymax
-)
-
-const (
-	Zxxx = iota
-	Zlit
-	Zlitm_r
-	Z_rp
-	Zbr
-	Zcall
-	Zcallcon
-	Zcallduff
-	Zcallind
-	Zcallindreg
-	Zib_
-	Zib_rp
-	Zibo_m
-	Zibo_m_xm
-	Zil_
-	Zil_rp
-	Ziq_rp
-	Zilo_m
-	Ziqo_m
-	Zjmp
-	Zjmpcon
-	Zloop
-	Zo_iw
-	Zm_o
-	Zm_r
-	Zm2_r
-	Zm_r_xm
-	Zm_r_i_xm
-	Zm_r_3d
-	Zm_r_xm_nr
-	Zr_m_xm_nr
-	Zibm_r /* mmx1,mmx2/mem64,imm8 */
-	Zmb_r
-	Zaut_r
-	Zo_m
-	Zo_m64
-	Zpseudo
-	Zr_m
-	Zr_m_xm
-	Zrp_
-	Z_ib
-	Z_il
-	Zm_ibo
-	Zm_ilo
-	Zib_rr
-	Zil_rr
-	Zclr
-	Zbyte
-	Zmax
-)
-
-const (
-	Px  = 0
-	Px1 = 1    // symbolic; exact value doesn't matter
-	P32 = 0x32 /* 32-bit only */
-	Pe  = 0x66 /* operand escape */
-	Pm  = 0x0f /* 2byte opcode escape */
-	Pq  = 0xff /* both escapes: 66 0f */
-	Pb  = 0xfe /* byte operands */
-	Pf2 = 0xf2 /* xmm escape 1: f2 0f */
-	Pf3 = 0xf3 /* xmm escape 2: f3 0f */
-	Pq3 = 0x67 /* xmm escape 3: 66 48 0f */
-	Pw  = 0x48 /* Rex.w */
-	Pw8 = 0x90 // symbolic; exact value doesn't matter
-	Py  = 0x80 /* defaults to 64-bit mode */
-	Py1 = 0x81 // symbolic; exact value doesn't matter
-	Py3 = 0x83 // symbolic; exact value doesn't matter
-
-	Rxf = 1 << 9 /* internal flag for Rxr on from */
-	Rxt = 1 << 8 /* internal flag for Rxr on to */
-	Rxw = 1 << 3 /* =1, 64-bit operand size */
-	Rxr = 1 << 2 /* extend modrm reg */
-	Rxx = 1 << 1 /* extend sib index */
-	Rxb = 1 << 0 /* extend modrm r/m, sib base, or opcode reg */
-
-	Maxand = 10 /* in -a output width of the byte codes */
-)
-
-var ycover [Ymax * Ymax]uint8
-
-var reg [MAXREG]int
-
-var regrex [MAXREG + 1]int
-
-var ynone = []ytab{
-	{Ynone, Ynone, Ynone, Zlit, 1},
-}
-
-var ysahf = []ytab{
-	{Ynone, Ynone, Ynone, Zlit, 2},
-	{Ynone, Ynone, Ynone, Zlit, 1},
-}
-
-var ytext = []ytab{
-	{Ymb, Ynone, Ytextsize, Zpseudo, 0},
-	{Ymb, Yi32, Ytextsize, Zpseudo, 1},
-}
-
-var ynop = []ytab{
-	{Ynone, Ynone, Ynone, Zpseudo, 0},
-	{Ynone, Ynone, Yiauto, Zpseudo, 0},
-	{Ynone, Ynone, Yml, Zpseudo, 0},
-	{Ynone, Ynone, Yrf, Zpseudo, 0},
-	{Ynone, Ynone, Yxr, Zpseudo, 0},
-	{Yiauto, Ynone, Ynone, Zpseudo, 0},
-	{Yml, Ynone, Ynone, Zpseudo, 0},
-	{Yrf, Ynone, Ynone, Zpseudo, 0},
-	{Yxr, Ynone, Ynone, Zpseudo, 1},
-}
-
-var yfuncdata = []ytab{
-	{Yi32, Ynone, Ym, Zpseudo, 0},
-}
-
-var ypcdata = []ytab{
-	{Yi32, Ynone, Yi32, Zpseudo, 0},
-}
-
-var yxorb = []ytab{
-	{Yi32, Ynone, Yal, Zib_, 1},
-	{Yi32, Ynone, Ymb, Zibo_m, 2},
-	{Yrb, Ynone, Ymb, Zr_m, 1},
-	{Ymb, Ynone, Yrb, Zm_r, 1},
-}
-
-var yxorl = []ytab{
-	{Yi8, Ynone, Yml, Zibo_m, 2},
-	{Yi32, Ynone, Yax, Zil_, 1},
-	{Yi32, Ynone, Yml, Zilo_m, 2},
-	{Yrl, Ynone, Yml, Zr_m, 1},
-	{Yml, Ynone, Yrl, Zm_r, 1},
-}
-
-var yaddl = []ytab{
-	{Yi8, Ynone, Yml, Zibo_m, 2},
-	{Yi32, Ynone, Yax, Zil_, 1},
-	{Yi32, Ynone, Yml, Zilo_m, 2},
-	{Yrl, Ynone, Yml, Zr_m, 1},
-	{Yml, Ynone, Yrl, Zm_r, 1},
-}
-
-var yincb = []ytab{
-	{Ynone, Ynone, Ymb, Zo_m, 2},
-}
-
-var yincw = []ytab{
-	{Ynone, Ynone, Yml, Zo_m, 2},
-}
-
-var yincl = []ytab{
-	{Ynone, Ynone, Yrl, Z_rp, 1},
-	{Ynone, Ynone, Yml, Zo_m, 2},
-}
-
-var yincq = []ytab{
-	{Ynone, Ynone, Yml, Zo_m, 2},
-}
-
-var ycmpb = []ytab{
-	{Yal, Ynone, Yi32, Z_ib, 1},
-	{Ymb, Ynone, Yi32, Zm_ibo, 2},
-	{Ymb, Ynone, Yrb, Zm_r, 1},
-	{Yrb, Ynone, Ymb, Zr_m, 1},
-}
-
-var ycmpl = []ytab{
-	{Yml, Ynone, Yi8, Zm_ibo, 2},
-	{Yax, Ynone, Yi32, Z_il, 1},
-	{Yml, Ynone, Yi32, Zm_ilo, 2},
-	{Yml, Ynone, Yrl, Zm_r, 1},
-	{Yrl, Ynone, Yml, Zr_m, 1},
-}
-
-var yshb = []ytab{
-	{Yi1, Ynone, Ymb, Zo_m, 2},
-	{Yi32, Ynone, Ymb, Zibo_m, 2},
-	{Ycx, Ynone, Ymb, Zo_m, 2},
-}
-
-var yshl = []ytab{
-	{Yi1, Ynone, Yml, Zo_m, 2},
-	{Yi32, Ynone, Yml, Zibo_m, 2},
-	{Ycl, Ynone, Yml, Zo_m, 2},
-	{Ycx, Ynone, Yml, Zo_m, 2},
-}
-
-var ytestb = []ytab{
-	{Yi32, Ynone, Yal, Zib_, 1},
-	{Yi32, Ynone, Ymb, Zibo_m, 2},
-	{Yrb, Ynone, Ymb, Zr_m, 1},
-	{Ymb, Ynone, Yrb, Zm_r, 1},
-}
-
-var ytestl = []ytab{
-	{Yi32, Ynone, Yax, Zil_, 1},
-	{Yi32, Ynone, Yml, Zilo_m, 2},
-	{Yrl, Ynone, Yml, Zr_m, 1},
-	{Yml, Ynone, Yrl, Zm_r, 1},
-}
-
-var ymovb = []ytab{
-	{Yrb, Ynone, Ymb, Zr_m, 1},
-	{Ymb, Ynone, Yrb, Zm_r, 1},
-	{Yi32, Ynone, Yrb, Zib_rp, 1},
-	{Yi32, Ynone, Ymb, Zibo_m, 2},
-}
-
-var ymbs = []ytab{
-	{Ymb, Ynone, Ynone, Zm_o, 2},
-}
-
-var ybtl = []ytab{
-	{Yi8, Ynone, Yml, Zibo_m, 2},
-	{Yrl, Ynone, Yml, Zr_m, 1},
-}
-
-var ymovw = []ytab{
-	{Yrl, Ynone, Yml, Zr_m, 1},
-	{Yml, Ynone, Yrl, Zm_r, 1},
-	{Yi0, Ynone, Yrl, Zclr, 1},
-	{Yi32, Ynone, Yrl, Zil_rp, 1},
-	{Yi32, Ynone, Yml, Zilo_m, 2},
-	{Yiauto, Ynone, Yrl, Zaut_r, 2},
-}
-
-var ymovl = []ytab{
-	{Yrl, Ynone, Yml, Zr_m, 1},
-	{Yml, Ynone, Yrl, Zm_r, 1},
-	{Yi0, Ynone, Yrl, Zclr, 1},
-	{Yi32, Ynone, Yrl, Zil_rp, 1},
-	{Yi32, Ynone, Yml, Zilo_m, 2},
-	{Yml, Ynone, Ymr, Zm_r_xm, 1}, // MMX MOVD
-	{Ymr, Ynone, Yml, Zr_m_xm, 1}, // MMX MOVD
-	{Yml, Ynone, Yxr, Zm_r_xm, 2}, // XMM MOVD (32 bit)
-	{Yxr, Ynone, Yml, Zr_m_xm, 2}, // XMM MOVD (32 bit)
-	{Yiauto, Ynone, Yrl, Zaut_r, 2},
-}
-
-var yret = []ytab{
-	{Ynone, Ynone, Ynone, Zo_iw, 1},
-	{Yi32, Ynone, Ynone, Zo_iw, 1},
-}
-
-var ymovq = []ytab{
-	// valid in 32-bit mode
-	{Ym, Ynone, Ymr, Zm_r_xm_nr, 1},  // 0x6f MMX MOVQ (shorter encoding)
-	{Ymr, Ynone, Ym, Zr_m_xm_nr, 1},  // 0x7f MMX MOVQ
-	{Yxr, Ynone, Ymr, Zm_r_xm_nr, 2}, // Pf2, 0xd6 MOVDQ2Q
-	{Yxm, Ynone, Yxr, Zm_r_xm_nr, 2}, // Pf3, 0x7e MOVQ xmm1/m64 -> xmm2
-	{Yxr, Ynone, Yxm, Zr_m_xm_nr, 2}, // Pe, 0xd6 MOVQ xmm1 -> xmm2/m64
-
-	// valid only in 64-bit mode, usually with 64-bit prefix
-	{Yrl, Ynone, Yml, Zr_m, 1},      // 0x89
-	{Yml, Ynone, Yrl, Zm_r, 1},      // 0x8b
-	{Yi0, Ynone, Yrl, Zclr, 1},      // 0x31
-	{Ys32, Ynone, Yrl, Zilo_m, 2},   // 32 bit signed 0xc7,(0)
-	{Yi64, Ynone, Yrl, Ziq_rp, 1},   // 0xb8 -- 32/64 bit immediate
-	{Yi32, Ynone, Yml, Zilo_m, 2},   // 0xc7,(0)
-	{Ymm, Ynone, Ymr, Zm_r_xm, 1},   // 0x6e MMX MOVD
-	{Ymr, Ynone, Ymm, Zr_m_xm, 1},   // 0x7e MMX MOVD
-	{Yml, Ynone, Yxr, Zm_r_xm, 2},   // Pe, 0x6e MOVD xmm load
-	{Yxr, Ynone, Yml, Zr_m_xm, 2},   // Pe, 0x7e MOVD xmm store
-	{Yiauto, Ynone, Yrl, Zaut_r, 1}, // 0 built-in LEAQ
-}
-
-var ym_rl = []ytab{
-	{Ym, Ynone, Yrl, Zm_r, 1},
-}
-
-var yrl_m = []ytab{
-	{Yrl, Ynone, Ym, Zr_m, 1},
-}
-
-var ymb_rl = []ytab{
-	{Ymb, Ynone, Yrl, Zmb_r, 1},
-}
-
-var yml_rl = []ytab{
-	{Yml, Ynone, Yrl, Zm_r, 1},
-}
-
-var yrl_ml = []ytab{
-	{Yrl, Ynone, Yml, Zr_m, 1},
-}
-
-var yml_mb = []ytab{
-	{Yrb, Ynone, Ymb, Zr_m, 1},
-	{Ymb, Ynone, Yrb, Zm_r, 1},
-}
-
-var yrb_mb = []ytab{
-	{Yrb, Ynone, Ymb, Zr_m, 1},
-}
-
-var yxchg = []ytab{
-	{Yax, Ynone, Yrl, Z_rp, 1},
-	{Yrl, Ynone, Yax, Zrp_, 1},
-	{Yrl, Ynone, Yml, Zr_m, 1},
-	{Yml, Ynone, Yrl, Zm_r, 1},
-}
-
-var ydivl = []ytab{
-	{Yml, Ynone, Ynone, Zm_o, 2},
-}
-
-var ydivb = []ytab{
-	{Ymb, Ynone, Ynone, Zm_o, 2},
-}
-
-var yimul = []ytab{
-	{Yml, Ynone, Ynone, Zm_o, 2},
-	{Yi8, Ynone, Yrl, Zib_rr, 1},
-	{Yi32, Ynone, Yrl, Zil_rr, 1},
-	{Yml, Ynone, Yrl, Zm_r, 2},
-}
-
-var yimul3 = []ytab{
-	{Yi8, Yml, Yrl, Zibm_r, 2},
-}
-
-var ybyte = []ytab{
-	{Yi64, Ynone, Ynone, Zbyte, 1},
-}
-
-var yin = []ytab{
-	{Yi32, Ynone, Ynone, Zib_, 1},
-	{Ynone, Ynone, Ynone, Zlit, 1},
-}
-
-var yint = []ytab{
-	{Yi32, Ynone, Ynone, Zib_, 1},
-}
-
-var ypushl = []ytab{
-	{Yrl, Ynone, Ynone, Zrp_, 1},
-	{Ym, Ynone, Ynone, Zm_o, 2},
-	{Yi8, Ynone, Ynone, Zib_, 1},
-	{Yi32, Ynone, Ynone, Zil_, 1},
-}
-
-var ypopl = []ytab{
-	{Ynone, Ynone, Yrl, Z_rp, 1},
-	{Ynone, Ynone, Ym, Zo_m, 2},
-}
-
-var ybswap = []ytab{
-	{Ynone, Ynone, Yrl, Z_rp, 2},
-}
-
-var yscond = []ytab{
-	{Ynone, Ynone, Ymb, Zo_m, 2},
-}
-
-var yjcond = []ytab{
-	{Ynone, Ynone, Ybr, Zbr, 0},
-	{Yi0, Ynone, Ybr, Zbr, 0},
-	{Yi1, Ynone, Ybr, Zbr, 1},
-}
-
-var yloop = []ytab{
-	{Ynone, Ynone, Ybr, Zloop, 1},
-}
-
-var ycall = []ytab{
-	{Ynone, Ynone, Yml, Zcallindreg, 0},
-	{Yrx, Ynone, Yrx, Zcallindreg, 2},
-	{Ynone, Ynone, Yindir, Zcallind, 2},
-	{Ynone, Ynone, Ybr, Zcall, 0},
-	{Ynone, Ynone, Yi32, Zcallcon, 1},
-}
-
-var yduff = []ytab{
-	{Ynone, Ynone, Yi32, Zcallduff, 1},
-}
-
-var yjmp = []ytab{
-	{Ynone, Ynone, Yml, Zo_m64, 2},
-	{Ynone, Ynone, Ybr, Zjmp, 0},
-	{Ynone, Ynone, Yi32, Zjmpcon, 1},
-}
-
-var yfmvd = []ytab{
-	{Ym, Ynone, Yf0, Zm_o, 2},
-	{Yf0, Ynone, Ym, Zo_m, 2},
-	{Yrf, Ynone, Yf0, Zm_o, 2},
-	{Yf0, Ynone, Yrf, Zo_m, 2},
-}
-
-var yfmvdp = []ytab{
-	{Yf0, Ynone, Ym, Zo_m, 2},
-	{Yf0, Ynone, Yrf, Zo_m, 2},
-}
-
-var yfmvf = []ytab{
-	{Ym, Ynone, Yf0, Zm_o, 2},
-	{Yf0, Ynone, Ym, Zo_m, 2},
-}
-
-var yfmvx = []ytab{
-	{Ym, Ynone, Yf0, Zm_o, 2},
-}
-
-var yfmvp = []ytab{
-	{Yf0, Ynone, Ym, Zo_m, 2},
-}
-
-var yfcmv = []ytab{
-	{Yrf, Ynone, Yf0, Zm_o, 2},
-}
-
-var yfadd = []ytab{
-	{Ym, Ynone, Yf0, Zm_o, 2},
-	{Yrf, Ynone, Yf0, Zm_o, 2},
-	{Yf0, Ynone, Yrf, Zo_m, 2},
-}
-
-var yfaddp = []ytab{
-	{Yf0, Ynone, Yrf, Zo_m, 2},
-}
-
-var yfxch = []ytab{
-	{Yf0, Ynone, Yrf, Zo_m, 2},
-	{Yrf, Ynone, Yf0, Zm_o, 2},
-}
-
-var ycompp = []ytab{
-	{Yf0, Ynone, Yrf, Zo_m, 2}, /* botch is really f0,f1 */
-}
-
-var ystsw = []ytab{
-	{Ynone, Ynone, Ym, Zo_m, 2},
-	{Ynone, Ynone, Yax, Zlit, 1},
-}
-
-var ystcw = []ytab{
-	{Ynone, Ynone, Ym, Zo_m, 2},
-	{Ym, Ynone, Ynone, Zm_o, 2},
-}
-
-var ysvrs = []ytab{
-	{Ynone, Ynone, Ym, Zo_m, 2},
-	{Ym, Ynone, Ynone, Zm_o, 2},
-}
-
-var ymm = []ytab{
-	{Ymm, Ynone, Ymr, Zm_r_xm, 1},
-	{Yxm, Ynone, Yxr, Zm_r_xm, 2},
-}
-
-var yxm = []ytab{
-	{Yxm, Ynone, Yxr, Zm_r_xm, 1},
-}
-
-var yxcvm1 = []ytab{
-	{Yxm, Ynone, Yxr, Zm_r_xm, 2},
-	{Yxm, Ynone, Ymr, Zm_r_xm, 2},
-}
-
-var yxcvm2 = []ytab{
-	{Yxm, Ynone, Yxr, Zm_r_xm, 2},
-	{Ymm, Ynone, Yxr, Zm_r_xm, 2},
-}
-
-/*
-var yxmq = []ytab{
-	{Yxm, Ynone, Yxr, Zm_r_xm, 2},
-}
-*/
-
-var yxr = []ytab{
-	{Yxr, Ynone, Yxr, Zm_r_xm, 1},
-}
-
-var yxr_ml = []ytab{
-	{Yxr, Ynone, Yml, Zr_m_xm, 1},
-}
-
-var ymr = []ytab{
-	{Ymr, Ynone, Ymr, Zm_r, 1},
-}
-
-var ymr_ml = []ytab{
-	{Ymr, Ynone, Yml, Zr_m_xm, 1},
-}
-
-var yxcmp = []ytab{
-	{Yxm, Ynone, Yxr, Zm_r_xm, 1},
-}
-
-var yxcmpi = []ytab{
-	{Yxm, Yxr, Yi8, Zm_r_i_xm, 2},
-}
-
-var yxmov = []ytab{
-	{Yxm, Ynone, Yxr, Zm_r_xm, 1},
-	{Yxr, Ynone, Yxm, Zr_m_xm, 1},
-}
-
-var yxcvfl = []ytab{
-	{Yxm, Ynone, Yrl, Zm_r_xm, 1},
-}
-
-var yxcvlf = []ytab{
-	{Yml, Ynone, Yxr, Zm_r_xm, 1},
-}
-
-var yxcvfq = []ytab{
-	{Yxm, Ynone, Yrl, Zm_r_xm, 2},
-}
-
-var yxcvqf = []ytab{
-	{Yml, Ynone, Yxr, Zm_r_xm, 2},
-}
-
-var yps = []ytab{
-	{Ymm, Ynone, Ymr, Zm_r_xm, 1},
-	{Yi8, Ynone, Ymr, Zibo_m_xm, 2},
-	{Yxm, Ynone, Yxr, Zm_r_xm, 2},
-	{Yi8, Ynone, Yxr, Zibo_m_xm, 3},
-}
-
-var yxrrl = []ytab{
-	{Yxr, Ynone, Yrl, Zm_r, 1},
-}
-
-var ymfp = []ytab{
-	{Ymm, Ynone, Ymr, Zm_r_3d, 1},
-}
-
-var ymrxr = []ytab{
-	{Ymr, Ynone, Yxr, Zm_r, 1},
-	{Yxm, Ynone, Yxr, Zm_r_xm, 1},
-}
-
-var ymshuf = []ytab{
-	{Yi8, Ymm, Ymr, Zibm_r, 2},
-}
-
-var ymshufb = []ytab{
-	{Yxm, Ynone, Yxr, Zm2_r, 2},
-}
-
-var yxshuf = []ytab{
-	{Yu8, Yxm, Yxr, Zibm_r, 2},
-}
-
-var yextrw = []ytab{
-	{Yu8, Yxr, Yrl, Zibm_r, 2},
-}
-
-var yinsrw = []ytab{
-	{Yu8, Yml, Yxr, Zibm_r, 2},
-}
-
-var yinsr = []ytab{
-	{Yu8, Ymm, Yxr, Zibm_r, 3},
-}
-
-var ypsdq = []ytab{
-	{Yi8, Ynone, Yxr, Zibo_m, 2},
-}
-
-var ymskb = []ytab{
-	{Yxr, Ynone, Yrl, Zm_r_xm, 2},
-	{Ymr, Ynone, Yrl, Zm_r_xm, 1},
-}
-
-var ycrc32l = []ytab{
-	{Yml, Ynone, Yrl, Zlitm_r, 0},
-}
-
-var yprefetch = []ytab{
-	{Ym, Ynone, Ynone, Zm_o, 2},
-}
-
-var yaes = []ytab{
-	{Yxm, Ynone, Yxr, Zlitm_r, 2},
-}
-
-var yaes2 = []ytab{
-	{Yu8, Yxm, Yxr, Zibm_r, 2},
-}
-
-/*
- * You are doasm, holding in your hand a Prog* with p->as set to, say, ACRC32,
- * and p->from and p->to as operands (Addr*).  The linker scans optab to find
- * the entry with the given p->as and then looks through the ytable for that
- * instruction (the second field in the optab struct) for a line whose first
- * two values match the Ytypes of the p->from and p->to operands.  The function
- * oclass in span.c computes the specific Ytype of an operand and then the set
- * of more general Ytypes that it satisfies is implied by the ycover table, set
- * up in instinit.  For example, oclass distinguishes the constants 0 and 1
- * from the more general 8-bit constants, but instinit says
- *
- *        ycover[Yi0*Ymax + Ys32] = 1;
- *        ycover[Yi1*Ymax + Ys32] = 1;
- *        ycover[Yi8*Ymax + Ys32] = 1;
- *
- * which means that Yi0, Yi1, and Yi8 all count as Ys32 (signed 32)
- * if that's what an instruction can handle.
- *
- * In parallel with the scan through the ytable for the appropriate line, there
- * is a z pointer that starts out pointing at the strange magic byte list in
- * the Optab struct.  With each step past a non-matching ytable line, z
- * advances by the 4th entry in the line.  When a matching line is found, that
- * z pointer has the extra data to use in laying down the instruction bytes.
- * The actual bytes laid down are a function of the 3rd entry in the line (that
- * is, the Ztype) and the z bytes.
- *
- * For example, let's look at AADDL.  The optab line says:
- *        { AADDL,        yaddl,  Px, 0x83,(00),0x05,0x81,(00),0x01,0x03 },
- *
- * and yaddl says
- *        uchar   yaddl[] =
- *        {
- *                Yi8,    Yml,    Zibo_m, 2,
- *                Yi32,   Yax,    Zil_,   1,
- *                Yi32,   Yml,    Zilo_m, 2,
- *                Yrl,    Yml,    Zr_m,   1,
- *                Yml,    Yrl,    Zm_r,   1,
- *                0
- *        };
- *
- * so there are 5 possible types of ADDL instruction that can be laid down, and
- * possible states used to lay them down (Ztype and z pointer, assuming z
- * points at {0x83,(00),0x05,0x81,(00),0x01,0x03}) are:
- *
- *        Yi8, Yml -> Zibo_m, z (0x83, 00)
- *        Yi32, Yax -> Zil_, z+2 (0x05)
- *        Yi32, Yml -> Zilo_m, z+2+1 (0x81, 0x00)
- *        Yrl, Yml -> Zr_m, z+2+1+2 (0x01)
- *        Yml, Yrl -> Zm_r, z+2+1+2+1 (0x03)
- *
- * The Pconstant in the optab line controls the prefix bytes to emit.  That's
- * relatively straightforward as this program goes.
- *
- * The switch on t[2] in doasm implements the various Z cases.  Zibo_m, for
- * example, is an opcode byte (z[0]) then an asmando (which is some kind of
- * encoded addressing mode for the Yml arg), and then a single immediate byte.
- * Zilo_m is the same but a long (32-bit) immediate.
- */
-var optab =
-/*	as, ytab, andproto, opcode */
-[]Optab{
-	Optab{obj.AXXX, nil, 0, [23]uint8{}},
-	Optab{AAAA, ynone, P32, [23]uint8{0x37}},
-	Optab{AAAD, ynone, P32, [23]uint8{0xd5, 0x0a}},
-	Optab{AAAM, ynone, P32, [23]uint8{0xd4, 0x0a}},
-	Optab{AAAS, ynone, P32, [23]uint8{0x3f}},
-	Optab{AADCB, yxorb, Pb, [23]uint8{0x14, 0x80, 02, 0x10, 0x10}},
-	Optab{AADCL, yxorl, Px, [23]uint8{0x83, 02, 0x15, 0x81, 02, 0x11, 0x13}},
-	Optab{AADCQ, yxorl, Pw, [23]uint8{0x83, 02, 0x15, 0x81, 02, 0x11, 0x13}},
-	Optab{AADCW, yxorl, Pe, [23]uint8{0x83, 02, 0x15, 0x81, 02, 0x11, 0x13}},
-	Optab{AADDB, yxorb, Pb, [23]uint8{0x04, 0x80, 00, 0x00, 0x02}},
-	Optab{AADDL, yaddl, Px, [23]uint8{0x83, 00, 0x05, 0x81, 00, 0x01, 0x03}},
-	Optab{AADDPD, yxm, Pq, [23]uint8{0x58}},
-	Optab{AADDPS, yxm, Pm, [23]uint8{0x58}},
-	Optab{AADDQ, yaddl, Pw, [23]uint8{0x83, 00, 0x05, 0x81, 00, 0x01, 0x03}},
-	Optab{AADDSD, yxm, Pf2, [23]uint8{0x58}},
-	Optab{AADDSS, yxm, Pf3, [23]uint8{0x58}},
-	Optab{AADDW, yaddl, Pe, [23]uint8{0x83, 00, 0x05, 0x81, 00, 0x01, 0x03}},
-	Optab{AADJSP, nil, 0, [23]uint8{}},
-	Optab{AANDB, yxorb, Pb, [23]uint8{0x24, 0x80, 04, 0x20, 0x22}},
-	Optab{AANDL, yxorl, Px, [23]uint8{0x83, 04, 0x25, 0x81, 04, 0x21, 0x23}},
-	Optab{AANDNPD, yxm, Pq, [23]uint8{0x55}},
-	Optab{AANDNPS, yxm, Pm, [23]uint8{0x55}},
-	Optab{AANDPD, yxm, Pq, [23]uint8{0x54}},
-	Optab{AANDPS, yxm, Pq, [23]uint8{0x54}},
-	Optab{AANDQ, yxorl, Pw, [23]uint8{0x83, 04, 0x25, 0x81, 04, 0x21, 0x23}},
-	Optab{AANDW, yxorl, Pe, [23]uint8{0x83, 04, 0x25, 0x81, 04, 0x21, 0x23}},
-	Optab{AARPL, yrl_ml, P32, [23]uint8{0x63}},
-	Optab{ABOUNDL, yrl_m, P32, [23]uint8{0x62}},
-	Optab{ABOUNDW, yrl_m, Pe, [23]uint8{0x62}},
-	Optab{ABSFL, yml_rl, Pm, [23]uint8{0xbc}},
-	Optab{ABSFQ, yml_rl, Pw, [23]uint8{0x0f, 0xbc}},
-	Optab{ABSFW, yml_rl, Pq, [23]uint8{0xbc}},
-	Optab{ABSRL, yml_rl, Pm, [23]uint8{0xbd}},
-	Optab{ABSRQ, yml_rl, Pw, [23]uint8{0x0f, 0xbd}},
-	Optab{ABSRW, yml_rl, Pq, [23]uint8{0xbd}},
-	Optab{ABSWAPL, ybswap, Px, [23]uint8{0x0f, 0xc8}},
-	Optab{ABSWAPQ, ybswap, Pw, [23]uint8{0x0f, 0xc8}},
-	Optab{ABTCL, ybtl, Pm, [23]uint8{0xba, 07, 0xbb}},
-	Optab{ABTCQ, ybtl, Pw, [23]uint8{0x0f, 0xba, 07, 0x0f, 0xbb}},
-	Optab{ABTCW, ybtl, Pq, [23]uint8{0xba, 07, 0xbb}},
-	Optab{ABTL, ybtl, Pm, [23]uint8{0xba, 04, 0xa3}},
-	Optab{ABTQ, ybtl, Pw, [23]uint8{0x0f, 0xba, 04, 0x0f, 0xa3}},
-	Optab{ABTRL, ybtl, Pm, [23]uint8{0xba, 06, 0xb3}},
-	Optab{ABTRQ, ybtl, Pw, [23]uint8{0x0f, 0xba, 06, 0x0f, 0xb3}},
-	Optab{ABTRW, ybtl, Pq, [23]uint8{0xba, 06, 0xb3}},
-	Optab{ABTSL, ybtl, Pm, [23]uint8{0xba, 05, 0xab}},
-	Optab{ABTSQ, ybtl, Pw, [23]uint8{0x0f, 0xba, 05, 0x0f, 0xab}},
-	Optab{ABTSW, ybtl, Pq, [23]uint8{0xba, 05, 0xab}},
-	Optab{ABTW, ybtl, Pq, [23]uint8{0xba, 04, 0xa3}},
-	Optab{ABYTE, ybyte, Px, [23]uint8{1}},
-	Optab{obj.ACALL, ycall, Px, [23]uint8{0xff, 02, 0xff, 0x15, 0xe8}},
-	Optab{ACDQ, ynone, Px, [23]uint8{0x99}},
-	Optab{ACLC, ynone, Px, [23]uint8{0xf8}},
-	Optab{ACLD, ynone, Px, [23]uint8{0xfc}},
-	Optab{ACLI, ynone, Px, [23]uint8{0xfa}},
-	Optab{ACLTS, ynone, Pm, [23]uint8{0x06}},
-	Optab{ACMC, ynone, Px, [23]uint8{0xf5}},
-	Optab{ACMOVLCC, yml_rl, Pm, [23]uint8{0x43}},
-	Optab{ACMOVLCS, yml_rl, Pm, [23]uint8{0x42}},
-	Optab{ACMOVLEQ, yml_rl, Pm, [23]uint8{0x44}},
-	Optab{ACMOVLGE, yml_rl, Pm, [23]uint8{0x4d}},
-	Optab{ACMOVLGT, yml_rl, Pm, [23]uint8{0x4f}},
-	Optab{ACMOVLHI, yml_rl, Pm, [23]uint8{0x47}},
-	Optab{ACMOVLLE, yml_rl, Pm, [23]uint8{0x4e}},
-	Optab{ACMOVLLS, yml_rl, Pm, [23]uint8{0x46}},
-	Optab{ACMOVLLT, yml_rl, Pm, [23]uint8{0x4c}},
-	Optab{ACMOVLMI, yml_rl, Pm, [23]uint8{0x48}},
-	Optab{ACMOVLNE, yml_rl, Pm, [23]uint8{0x45}},
-	Optab{ACMOVLOC, yml_rl, Pm, [23]uint8{0x41}},
-	Optab{ACMOVLOS, yml_rl, Pm, [23]uint8{0x40}},
-	Optab{ACMOVLPC, yml_rl, Pm, [23]uint8{0x4b}},
-	Optab{ACMOVLPL, yml_rl, Pm, [23]uint8{0x49}},
-	Optab{ACMOVLPS, yml_rl, Pm, [23]uint8{0x4a}},
-	Optab{ACMOVQCC, yml_rl, Pw, [23]uint8{0x0f, 0x43}},
-	Optab{ACMOVQCS, yml_rl, Pw, [23]uint8{0x0f, 0x42}},
-	Optab{ACMOVQEQ, yml_rl, Pw, [23]uint8{0x0f, 0x44}},
-	Optab{ACMOVQGE, yml_rl, Pw, [23]uint8{0x0f, 0x4d}},
-	Optab{ACMOVQGT, yml_rl, Pw, [23]uint8{0x0f, 0x4f}},
-	Optab{ACMOVQHI, yml_rl, Pw, [23]uint8{0x0f, 0x47}},
-	Optab{ACMOVQLE, yml_rl, Pw, [23]uint8{0x0f, 0x4e}},
-	Optab{ACMOVQLS, yml_rl, Pw, [23]uint8{0x0f, 0x46}},
-	Optab{ACMOVQLT, yml_rl, Pw, [23]uint8{0x0f, 0x4c}},
-	Optab{ACMOVQMI, yml_rl, Pw, [23]uint8{0x0f, 0x48}},
-	Optab{ACMOVQNE, yml_rl, Pw, [23]uint8{0x0f, 0x45}},
-	Optab{ACMOVQOC, yml_rl, Pw, [23]uint8{0x0f, 0x41}},
-	Optab{ACMOVQOS, yml_rl, Pw, [23]uint8{0x0f, 0x40}},
-	Optab{ACMOVQPC, yml_rl, Pw, [23]uint8{0x0f, 0x4b}},
-	Optab{ACMOVQPL, yml_rl, Pw, [23]uint8{0x0f, 0x49}},
-	Optab{ACMOVQPS, yml_rl, Pw, [23]uint8{0x0f, 0x4a}},
-	Optab{ACMOVWCC, yml_rl, Pq, [23]uint8{0x43}},
-	Optab{ACMOVWCS, yml_rl, Pq, [23]uint8{0x42}},
-	Optab{ACMOVWEQ, yml_rl, Pq, [23]uint8{0x44}},
-	Optab{ACMOVWGE, yml_rl, Pq, [23]uint8{0x4d}},
-	Optab{ACMOVWGT, yml_rl, Pq, [23]uint8{0x4f}},
-	Optab{ACMOVWHI, yml_rl, Pq, [23]uint8{0x47}},
-	Optab{ACMOVWLE, yml_rl, Pq, [23]uint8{0x4e}},
-	Optab{ACMOVWLS, yml_rl, Pq, [23]uint8{0x46}},
-	Optab{ACMOVWLT, yml_rl, Pq, [23]uint8{0x4c}},
-	Optab{ACMOVWMI, yml_rl, Pq, [23]uint8{0x48}},
-	Optab{ACMOVWNE, yml_rl, Pq, [23]uint8{0x45}},
-	Optab{ACMOVWOC, yml_rl, Pq, [23]uint8{0x41}},
-	Optab{ACMOVWOS, yml_rl, Pq, [23]uint8{0x40}},
-	Optab{ACMOVWPC, yml_rl, Pq, [23]uint8{0x4b}},
-	Optab{ACMOVWPL, yml_rl, Pq, [23]uint8{0x49}},
-	Optab{ACMOVWPS, yml_rl, Pq, [23]uint8{0x4a}},
-	Optab{ACMPB, ycmpb, Pb, [23]uint8{0x3c, 0x80, 07, 0x38, 0x3a}},
-	Optab{ACMPL, ycmpl, Px, [23]uint8{0x83, 07, 0x3d, 0x81, 07, 0x39, 0x3b}},
-	Optab{ACMPPD, yxcmpi, Px, [23]uint8{Pe, 0xc2}},
-	Optab{ACMPPS, yxcmpi, Pm, [23]uint8{0xc2, 0}},
-	Optab{ACMPQ, ycmpl, Pw, [23]uint8{0x83, 07, 0x3d, 0x81, 07, 0x39, 0x3b}},
-	Optab{ACMPSB, ynone, Pb, [23]uint8{0xa6}},
-	Optab{ACMPSD, yxcmpi, Px, [23]uint8{Pf2, 0xc2}},
-	Optab{ACMPSL, ynone, Px, [23]uint8{0xa7}},
-	Optab{ACMPSQ, ynone, Pw, [23]uint8{0xa7}},
-	Optab{ACMPSS, yxcmpi, Px, [23]uint8{Pf3, 0xc2}},
-	Optab{ACMPSW, ynone, Pe, [23]uint8{0xa7}},
-	Optab{ACMPW, ycmpl, Pe, [23]uint8{0x83, 07, 0x3d, 0x81, 07, 0x39, 0x3b}},
-	Optab{ACOMISD, yxcmp, Pe, [23]uint8{0x2f}},
-	Optab{ACOMISS, yxcmp, Pm, [23]uint8{0x2f}},
-	Optab{ACPUID, ynone, Pm, [23]uint8{0xa2}},
-	Optab{ACVTPL2PD, yxcvm2, Px, [23]uint8{Pf3, 0xe6, Pe, 0x2a}},
-	Optab{ACVTPL2PS, yxcvm2, Pm, [23]uint8{0x5b, 0, 0x2a, 0}},
-	Optab{ACVTPD2PL, yxcvm1, Px, [23]uint8{Pf2, 0xe6, Pe, 0x2d}},
-	Optab{ACVTPD2PS, yxm, Pe, [23]uint8{0x5a}},
-	Optab{ACVTPS2PL, yxcvm1, Px, [23]uint8{Pe, 0x5b, Pm, 0x2d}},
-	Optab{ACVTPS2PD, yxm, Pm, [23]uint8{0x5a}},
-	Optab{API2FW, ymfp, Px, [23]uint8{0x0c}},
-	Optab{ACVTSD2SL, yxcvfl, Pf2, [23]uint8{0x2d}},
-	Optab{ACVTSD2SQ, yxcvfq, Pw, [23]uint8{Pf2, 0x2d}},
-	Optab{ACVTSD2SS, yxm, Pf2, [23]uint8{0x5a}},
-	Optab{ACVTSL2SD, yxcvlf, Pf2, [23]uint8{0x2a}},
-	Optab{ACVTSQ2SD, yxcvqf, Pw, [23]uint8{Pf2, 0x2a}},
-	Optab{ACVTSL2SS, yxcvlf, Pf3, [23]uint8{0x2a}},
-	Optab{ACVTSQ2SS, yxcvqf, Pw, [23]uint8{Pf3, 0x2a}},
-	Optab{ACVTSS2SD, yxm, Pf3, [23]uint8{0x5a}},
-	Optab{ACVTSS2SL, yxcvfl, Pf3, [23]uint8{0x2d}},
-	Optab{ACVTSS2SQ, yxcvfq, Pw, [23]uint8{Pf3, 0x2d}},
-	Optab{ACVTTPD2PL, yxcvm1, Px, [23]uint8{Pe, 0xe6, Pe, 0x2c}},
-	Optab{ACVTTPS2PL, yxcvm1, Px, [23]uint8{Pf3, 0x5b, Pm, 0x2c}},
-	Optab{ACVTTSD2SL, yxcvfl, Pf2, [23]uint8{0x2c}},
-	Optab{ACVTTSD2SQ, yxcvfq, Pw, [23]uint8{Pf2, 0x2c}},
-	Optab{ACVTTSS2SL, yxcvfl, Pf3, [23]uint8{0x2c}},
-	Optab{ACVTTSS2SQ, yxcvfq, Pw, [23]uint8{Pf3, 0x2c}},
-	Optab{ACWD, ynone, Pe, [23]uint8{0x99}},
-	Optab{ACQO, ynone, Pw, [23]uint8{0x99}},
-	Optab{ADAA, ynone, P32, [23]uint8{0x27}},
-	Optab{ADAS, ynone, P32, [23]uint8{0x2f}},
-	Optab{obj.ADATA, nil, 0, [23]uint8{}},
-	Optab{ADECB, yincb, Pb, [23]uint8{0xfe, 01}},
-	Optab{ADECL, yincl, Px1, [23]uint8{0x48, 0xff, 01}},
-	Optab{ADECQ, yincq, Pw, [23]uint8{0xff, 01}},
-	Optab{ADECW, yincw, Pe, [23]uint8{0xff, 01}},
-	Optab{ADIVB, ydivb, Pb, [23]uint8{0xf6, 06}},
-	Optab{ADIVL, ydivl, Px, [23]uint8{0xf7, 06}},
-	Optab{ADIVPD, yxm, Pe, [23]uint8{0x5e}},
-	Optab{ADIVPS, yxm, Pm, [23]uint8{0x5e}},
-	Optab{ADIVQ, ydivl, Pw, [23]uint8{0xf7, 06}},
-	Optab{ADIVSD, yxm, Pf2, [23]uint8{0x5e}},
-	Optab{ADIVSS, yxm, Pf3, [23]uint8{0x5e}},
-	Optab{ADIVW, ydivl, Pe, [23]uint8{0xf7, 06}},
-	Optab{AEMMS, ynone, Pm, [23]uint8{0x77}},
-	Optab{AENTER, nil, 0, [23]uint8{}}, /* botch */
-	Optab{AFXRSTOR, ysvrs, Pm, [23]uint8{0xae, 01, 0xae, 01}},
-	Optab{AFXSAVE, ysvrs, Pm, [23]uint8{0xae, 00, 0xae, 00}},
-	Optab{AFXRSTOR64, ysvrs, Pw, [23]uint8{0x0f, 0xae, 01, 0x0f, 0xae, 01}},
-	Optab{AFXSAVE64, ysvrs, Pw, [23]uint8{0x0f, 0xae, 00, 0x0f, 0xae, 00}},
-	Optab{obj.AGLOBL, nil, 0, [23]uint8{}},
-	Optab{AHLT, ynone, Px, [23]uint8{0xf4}},
-	Optab{AIDIVB, ydivb, Pb, [23]uint8{0xf6, 07}},
-	Optab{AIDIVL, ydivl, Px, [23]uint8{0xf7, 07}},
-	Optab{AIDIVQ, ydivl, Pw, [23]uint8{0xf7, 07}},
-	Optab{AIDIVW, ydivl, Pe, [23]uint8{0xf7, 07}},
-	Optab{AIMULB, ydivb, Pb, [23]uint8{0xf6, 05}},
-	Optab{AIMULL, yimul, Px, [23]uint8{0xf7, 05, 0x6b, 0x69, Pm, 0xaf}},
-	Optab{AIMULQ, yimul, Pw, [23]uint8{0xf7, 05, 0x6b, 0x69, Pm, 0xaf}},
-	Optab{AIMULW, yimul, Pe, [23]uint8{0xf7, 05, 0x6b, 0x69, Pm, 0xaf}},
-	Optab{AIMUL3Q, yimul3, Pw, [23]uint8{0x6b, 00}},
-	Optab{AINB, yin, Pb, [23]uint8{0xe4, 0xec}},
-	Optab{AINCB, yincb, Pb, [23]uint8{0xfe, 00}},
-	Optab{AINCL, yincl, Px1, [23]uint8{0x40, 0xff, 00}},
-	Optab{AINCQ, yincq, Pw, [23]uint8{0xff, 00}},
-	Optab{AINCW, yincw, Pe, [23]uint8{0xff, 00}},
-	Optab{AINL, yin, Px, [23]uint8{0xe5, 0xed}},
-	Optab{AINSB, ynone, Pb, [23]uint8{0x6c}},
-	Optab{AINSL, ynone, Px, [23]uint8{0x6d}},
-	Optab{AINSW, ynone, Pe, [23]uint8{0x6d}},
-	Optab{AINT, yint, Px, [23]uint8{0xcd}},
-	Optab{AINTO, ynone, P32, [23]uint8{0xce}},
-	Optab{AINW, yin, Pe, [23]uint8{0xe5, 0xed}},
-	Optab{AIRETL, ynone, Px, [23]uint8{0xcf}},
-	Optab{AIRETQ, ynone, Pw, [23]uint8{0xcf}},
-	Optab{AIRETW, ynone, Pe, [23]uint8{0xcf}},
-	Optab{AJCC, yjcond, Px, [23]uint8{0x73, 0x83, 00}},
-	Optab{AJCS, yjcond, Px, [23]uint8{0x72, 0x82}},
-	Optab{AJCXZL, yloop, Px, [23]uint8{0xe3}},
-	Optab{AJCXZW, yloop, Px, [23]uint8{0xe3}},
-	Optab{AJCXZQ, yloop, Px, [23]uint8{0xe3}},
-	Optab{AJEQ, yjcond, Px, [23]uint8{0x74, 0x84}},
-	Optab{AJGE, yjcond, Px, [23]uint8{0x7d, 0x8d}},
-	Optab{AJGT, yjcond, Px, [23]uint8{0x7f, 0x8f}},
-	Optab{AJHI, yjcond, Px, [23]uint8{0x77, 0x87}},
-	Optab{AJLE, yjcond, Px, [23]uint8{0x7e, 0x8e}},
-	Optab{AJLS, yjcond, Px, [23]uint8{0x76, 0x86}},
-	Optab{AJLT, yjcond, Px, [23]uint8{0x7c, 0x8c}},
-	Optab{AJMI, yjcond, Px, [23]uint8{0x78, 0x88}},
-	Optab{obj.AJMP, yjmp, Px, [23]uint8{0xff, 04, 0xeb, 0xe9}},
-	Optab{AJNE, yjcond, Px, [23]uint8{0x75, 0x85}},
-	Optab{AJOC, yjcond, Px, [23]uint8{0x71, 0x81, 00}},
-	Optab{AJOS, yjcond, Px, [23]uint8{0x70, 0x80, 00}},
-	Optab{AJPC, yjcond, Px, [23]uint8{0x7b, 0x8b}},
-	Optab{AJPL, yjcond, Px, [23]uint8{0x79, 0x89}},
-	Optab{AJPS, yjcond, Px, [23]uint8{0x7a, 0x8a}},
-	Optab{ALAHF, ynone, Px, [23]uint8{0x9f}},
-	Optab{ALARL, yml_rl, Pm, [23]uint8{0x02}},
-	Optab{ALARW, yml_rl, Pq, [23]uint8{0x02}},
-	Optab{ALDMXCSR, ysvrs, Pm, [23]uint8{0xae, 02, 0xae, 02}},
-	Optab{ALEAL, ym_rl, Px, [23]uint8{0x8d}},
-	Optab{ALEAQ, ym_rl, Pw, [23]uint8{0x8d}},
-	Optab{ALEAVEL, ynone, P32, [23]uint8{0xc9}},
-	Optab{ALEAVEQ, ynone, Py, [23]uint8{0xc9}},
-	Optab{ALEAVEW, ynone, Pe, [23]uint8{0xc9}},
-	Optab{ALEAW, ym_rl, Pe, [23]uint8{0x8d}},
-	Optab{ALOCK, ynone, Px, [23]uint8{0xf0}},
-	Optab{ALODSB, ynone, Pb, [23]uint8{0xac}},
-	Optab{ALODSL, ynone, Px, [23]uint8{0xad}},
-	Optab{ALODSQ, ynone, Pw, [23]uint8{0xad}},
-	Optab{ALODSW, ynone, Pe, [23]uint8{0xad}},
-	Optab{ALONG, ybyte, Px, [23]uint8{4}},
-	Optab{ALOOP, yloop, Px, [23]uint8{0xe2}},
-	Optab{ALOOPEQ, yloop, Px, [23]uint8{0xe1}},
-	Optab{ALOOPNE, yloop, Px, [23]uint8{0xe0}},
-	Optab{ALSLL, yml_rl, Pm, [23]uint8{0x03}},
-	Optab{ALSLW, yml_rl, Pq, [23]uint8{0x03}},
-	Optab{AMASKMOVOU, yxr, Pe, [23]uint8{0xf7}},
-	Optab{AMASKMOVQ, ymr, Pm, [23]uint8{0xf7}},
-	Optab{AMAXPD, yxm, Pe, [23]uint8{0x5f}},
-	Optab{AMAXPS, yxm, Pm, [23]uint8{0x5f}},
-	Optab{AMAXSD, yxm, Pf2, [23]uint8{0x5f}},
-	Optab{AMAXSS, yxm, Pf3, [23]uint8{0x5f}},
-	Optab{AMINPD, yxm, Pe, [23]uint8{0x5d}},
-	Optab{AMINPS, yxm, Pm, [23]uint8{0x5d}},
-	Optab{AMINSD, yxm, Pf2, [23]uint8{0x5d}},
-	Optab{AMINSS, yxm, Pf3, [23]uint8{0x5d}},
-	Optab{AMOVAPD, yxmov, Pe, [23]uint8{0x28, 0x29}},
-	Optab{AMOVAPS, yxmov, Pm, [23]uint8{0x28, 0x29}},
-	Optab{AMOVB, ymovb, Pb, [23]uint8{0x88, 0x8a, 0xb0, 0xc6, 00}},
-	Optab{AMOVBLSX, ymb_rl, Pm, [23]uint8{0xbe}},
-	Optab{AMOVBLZX, ymb_rl, Pm, [23]uint8{0xb6}},
-	Optab{AMOVBQSX, ymb_rl, Pw, [23]uint8{0x0f, 0xbe}},
-	Optab{AMOVBQZX, ymb_rl, Pm, [23]uint8{0xb6}},
-	Optab{AMOVBWSX, ymb_rl, Pq, [23]uint8{0xbe}},
-	Optab{AMOVBWZX, ymb_rl, Pq, [23]uint8{0xb6}},
-	Optab{AMOVO, yxmov, Pe, [23]uint8{0x6f, 0x7f}},
-	Optab{AMOVOU, yxmov, Pf3, [23]uint8{0x6f, 0x7f}},
-	Optab{AMOVHLPS, yxr, Pm, [23]uint8{0x12}},
-	Optab{AMOVHPD, yxmov, Pe, [23]uint8{0x16, 0x17}},
-	Optab{AMOVHPS, yxmov, Pm, [23]uint8{0x16, 0x17}},
-	Optab{AMOVL, ymovl, Px, [23]uint8{0x89, 0x8b, 0x31, 0xb8, 0xc7, 00, 0x6e, 0x7e, Pe, 0x6e, Pe, 0x7e, 0}},
-	Optab{AMOVLHPS, yxr, Pm, [23]uint8{0x16}},
-	Optab{AMOVLPD, yxmov, Pe, [23]uint8{0x12, 0x13}},
-	Optab{AMOVLPS, yxmov, Pm, [23]uint8{0x12, 0x13}},
-	Optab{AMOVLQSX, yml_rl, Pw, [23]uint8{0x63}},
-	Optab{AMOVLQZX, yml_rl, Px, [23]uint8{0x8b}},
-	Optab{AMOVMSKPD, yxrrl, Pq, [23]uint8{0x50}},
-	Optab{AMOVMSKPS, yxrrl, Pm, [23]uint8{0x50}},
-	Optab{AMOVNTO, yxr_ml, Pe, [23]uint8{0xe7}},
-	Optab{AMOVNTPD, yxr_ml, Pe, [23]uint8{0x2b}},
-	Optab{AMOVNTPS, yxr_ml, Pm, [23]uint8{0x2b}},
-	Optab{AMOVNTQ, ymr_ml, Pm, [23]uint8{0xe7}},
-	Optab{AMOVQ, ymovq, Pw8, [23]uint8{0x6f, 0x7f, Pf2, 0xd6, Pf3, 0x7e, Pe, 0xd6, 0x89, 0x8b, 0x31, 0xc7, 00, 0xb8, 0xc7, 00, 0x6e, 0x7e, Pe, 0x6e, Pe, 0x7e, 0}},
-	Optab{AMOVQOZX, ymrxr, Pf3, [23]uint8{0xd6, 0x7e}},
-	Optab{AMOVSB, ynone, Pb, [23]uint8{0xa4}},
-	Optab{AMOVSD, yxmov, Pf2, [23]uint8{0x10, 0x11}},
-	Optab{AMOVSL, ynone, Px, [23]uint8{0xa5}},
-	Optab{AMOVSQ, ynone, Pw, [23]uint8{0xa5}},
-	Optab{AMOVSS, yxmov, Pf3, [23]uint8{0x10, 0x11}},
-	Optab{AMOVSW, ynone, Pe, [23]uint8{0xa5}},
-	Optab{AMOVUPD, yxmov, Pe, [23]uint8{0x10, 0x11}},
-	Optab{AMOVUPS, yxmov, Pm, [23]uint8{0x10, 0x11}},
-	Optab{AMOVW, ymovw, Pe, [23]uint8{0x89, 0x8b, 0x31, 0xb8, 0xc7, 00, 0}},
-	Optab{AMOVWLSX, yml_rl, Pm, [23]uint8{0xbf}},
-	Optab{AMOVWLZX, yml_rl, Pm, [23]uint8{0xb7}},
-	Optab{AMOVWQSX, yml_rl, Pw, [23]uint8{0x0f, 0xbf}},
-	Optab{AMOVWQZX, yml_rl, Pw, [23]uint8{0x0f, 0xb7}},
-	Optab{AMULB, ydivb, Pb, [23]uint8{0xf6, 04}},
-	Optab{AMULL, ydivl, Px, [23]uint8{0xf7, 04}},
-	Optab{AMULPD, yxm, Pe, [23]uint8{0x59}},
-	Optab{AMULPS, yxm, Ym, [23]uint8{0x59}},
-	Optab{AMULQ, ydivl, Pw, [23]uint8{0xf7, 04}},
-	Optab{AMULSD, yxm, Pf2, [23]uint8{0x59}},
-	Optab{AMULSS, yxm, Pf3, [23]uint8{0x59}},
-	Optab{AMULW, ydivl, Pe, [23]uint8{0xf7, 04}},
-	Optab{ANEGB, yscond, Pb, [23]uint8{0xf6, 03}},
-	Optab{ANEGL, yscond, Px, [23]uint8{0xf7, 03}},
-	Optab{ANEGQ, yscond, Pw, [23]uint8{0xf7, 03}},
-	Optab{ANEGW, yscond, Pe, [23]uint8{0xf7, 03}},
-	Optab{obj.ANOP, ynop, Px, [23]uint8{0, 0}},
-	Optab{ANOTB, yscond, Pb, [23]uint8{0xf6, 02}},
-	Optab{ANOTL, yscond, Px, [23]uint8{0xf7, 02}}, // TODO(rsc): yscond is wrong here.
-	Optab{ANOTQ, yscond, Pw, [23]uint8{0xf7, 02}},
-	Optab{ANOTW, yscond, Pe, [23]uint8{0xf7, 02}},
-	Optab{AORB, yxorb, Pb, [23]uint8{0x0c, 0x80, 01, 0x08, 0x0a}},
-	Optab{AORL, yxorl, Px, [23]uint8{0x83, 01, 0x0d, 0x81, 01, 0x09, 0x0b}},
-	Optab{AORPD, yxm, Pq, [23]uint8{0x56}},
-	Optab{AORPS, yxm, Pm, [23]uint8{0x56}},
-	Optab{AORQ, yxorl, Pw, [23]uint8{0x83, 01, 0x0d, 0x81, 01, 0x09, 0x0b}},
-	Optab{AORW, yxorl, Pe, [23]uint8{0x83, 01, 0x0d, 0x81, 01, 0x09, 0x0b}},
-	Optab{AOUTB, yin, Pb, [23]uint8{0xe6, 0xee}},
-	Optab{AOUTL, yin, Px, [23]uint8{0xe7, 0xef}},
-	Optab{AOUTSB, ynone, Pb, [23]uint8{0x6e}},
-	Optab{AOUTSL, ynone, Px, [23]uint8{0x6f}},
-	Optab{AOUTSW, ynone, Pe, [23]uint8{0x6f}},
-	Optab{AOUTW, yin, Pe, [23]uint8{0xe7, 0xef}},
-	Optab{APACKSSLW, ymm, Py1, [23]uint8{0x6b, Pe, 0x6b}},
-	Optab{APACKSSWB, ymm, Py1, [23]uint8{0x63, Pe, 0x63}},
-	Optab{APACKUSWB, ymm, Py1, [23]uint8{0x67, Pe, 0x67}},
-	Optab{APADDB, ymm, Py1, [23]uint8{0xfc, Pe, 0xfc}},
-	Optab{APADDL, ymm, Py1, [23]uint8{0xfe, Pe, 0xfe}},
-	Optab{APADDQ, yxm, Pe, [23]uint8{0xd4}},
-	Optab{APADDSB, ymm, Py1, [23]uint8{0xec, Pe, 0xec}},
-	Optab{APADDSW, ymm, Py1, [23]uint8{0xed, Pe, 0xed}},
-	Optab{APADDUSB, ymm, Py1, [23]uint8{0xdc, Pe, 0xdc}},
-	Optab{APADDUSW, ymm, Py1, [23]uint8{0xdd, Pe, 0xdd}},
-	Optab{APADDW, ymm, Py1, [23]uint8{0xfd, Pe, 0xfd}},
-	Optab{APAND, ymm, Py1, [23]uint8{0xdb, Pe, 0xdb}},
-	Optab{APANDN, ymm, Py1, [23]uint8{0xdf, Pe, 0xdf}},
-	Optab{APAUSE, ynone, Px, [23]uint8{0xf3, 0x90}},
-	Optab{APAVGB, ymm, Py1, [23]uint8{0xe0, Pe, 0xe0}},
-	Optab{APAVGW, ymm, Py1, [23]uint8{0xe3, Pe, 0xe3}},
-	Optab{APCMPEQB, ymm, Py1, [23]uint8{0x74, Pe, 0x74}},
-	Optab{APCMPEQL, ymm, Py1, [23]uint8{0x76, Pe, 0x76}},
-	Optab{APCMPEQW, ymm, Py1, [23]uint8{0x75, Pe, 0x75}},
-	Optab{APCMPGTB, ymm, Py1, [23]uint8{0x64, Pe, 0x64}},
-	Optab{APCMPGTL, ymm, Py1, [23]uint8{0x66, Pe, 0x66}},
-	Optab{APCMPGTW, ymm, Py1, [23]uint8{0x65, Pe, 0x65}},
-	Optab{APEXTRW, yextrw, Pq, [23]uint8{0xc5, 00}},
-	Optab{APF2IL, ymfp, Px, [23]uint8{0x1d}},
-	Optab{APF2IW, ymfp, Px, [23]uint8{0x1c}},
-	Optab{API2FL, ymfp, Px, [23]uint8{0x0d}},
-	Optab{APFACC, ymfp, Px, [23]uint8{0xae}},
-	Optab{APFADD, ymfp, Px, [23]uint8{0x9e}},
-	Optab{APFCMPEQ, ymfp, Px, [23]uint8{0xb0}},
-	Optab{APFCMPGE, ymfp, Px, [23]uint8{0x90}},
-	Optab{APFCMPGT, ymfp, Px, [23]uint8{0xa0}},
-	Optab{APFMAX, ymfp, Px, [23]uint8{0xa4}},
-	Optab{APFMIN, ymfp, Px, [23]uint8{0x94}},
-	Optab{APFMUL, ymfp, Px, [23]uint8{0xb4}},
-	Optab{APFNACC, ymfp, Px, [23]uint8{0x8a}},
-	Optab{APFPNACC, ymfp, Px, [23]uint8{0x8e}},
-	Optab{APFRCP, ymfp, Px, [23]uint8{0x96}},
-	Optab{APFRCPIT1, ymfp, Px, [23]uint8{0xa6}},
-	Optab{APFRCPI2T, ymfp, Px, [23]uint8{0xb6}},
-	Optab{APFRSQIT1, ymfp, Px, [23]uint8{0xa7}},
-	Optab{APFRSQRT, ymfp, Px, [23]uint8{0x97}},
-	Optab{APFSUB, ymfp, Px, [23]uint8{0x9a}},
-	Optab{APFSUBR, ymfp, Px, [23]uint8{0xaa}},
-	Optab{APINSRW, yinsrw, Pq, [23]uint8{0xc4, 00}},
-	Optab{APINSRD, yinsr, Pq, [23]uint8{0x3a, 0x22, 00}},
-	Optab{APINSRQ, yinsr, Pq3, [23]uint8{0x3a, 0x22, 00}},
-	Optab{APMADDWL, ymm, Py1, [23]uint8{0xf5, Pe, 0xf5}},
-	Optab{APMAXSW, yxm, Pe, [23]uint8{0xee}},
-	Optab{APMAXUB, yxm, Pe, [23]uint8{0xde}},
-	Optab{APMINSW, yxm, Pe, [23]uint8{0xea}},
-	Optab{APMINUB, yxm, Pe, [23]uint8{0xda}},
-	Optab{APMOVMSKB, ymskb, Px, [23]uint8{Pe, 0xd7, 0xd7}},
-	Optab{APMULHRW, ymfp, Px, [23]uint8{0xb7}},
-	Optab{APMULHUW, ymm, Py1, [23]uint8{0xe4, Pe, 0xe4}},
-	Optab{APMULHW, ymm, Py1, [23]uint8{0xe5, Pe, 0xe5}},
-	Optab{APMULLW, ymm, Py1, [23]uint8{0xd5, Pe, 0xd5}},
-	Optab{APMULULQ, ymm, Py1, [23]uint8{0xf4, Pe, 0xf4}},
-	Optab{APOPAL, ynone, P32, [23]uint8{0x61}},
-	Optab{APOPAW, ynone, Pe, [23]uint8{0x61}},
-	Optab{APOPFL, ynone, P32, [23]uint8{0x9d}},
-	Optab{APOPFQ, ynone, Py, [23]uint8{0x9d}},
-	Optab{APOPFW, ynone, Pe, [23]uint8{0x9d}},
-	Optab{APOPL, ypopl, P32, [23]uint8{0x58, 0x8f, 00}},
-	Optab{APOPQ, ypopl, Py, [23]uint8{0x58, 0x8f, 00}},
-	Optab{APOPW, ypopl, Pe, [23]uint8{0x58, 0x8f, 00}},
-	Optab{APOR, ymm, Py1, [23]uint8{0xeb, Pe, 0xeb}},
-	Optab{APSADBW, yxm, Pq, [23]uint8{0xf6}},
-	Optab{APSHUFHW, yxshuf, Pf3, [23]uint8{0x70, 00}},
-	Optab{APSHUFL, yxshuf, Pq, [23]uint8{0x70, 00}},
-	Optab{APSHUFLW, yxshuf, Pf2, [23]uint8{0x70, 00}},
-	Optab{APSHUFW, ymshuf, Pm, [23]uint8{0x70, 00}},
-	Optab{APSHUFB, ymshufb, Pq, [23]uint8{0x38, 0x00}},
-	Optab{APSLLO, ypsdq, Pq, [23]uint8{0x73, 07}},
-	Optab{APSLLL, yps, Py3, [23]uint8{0xf2, 0x72, 06, Pe, 0xf2, Pe, 0x72, 06}},
-	Optab{APSLLQ, yps, Py3, [23]uint8{0xf3, 0x73, 06, Pe, 0xf3, Pe, 0x73, 06}},
-	Optab{APSLLW, yps, Py3, [23]uint8{0xf1, 0x71, 06, Pe, 0xf1, Pe, 0x71, 06}},
-	Optab{APSRAL, yps, Py3, [23]uint8{0xe2, 0x72, 04, Pe, 0xe2, Pe, 0x72, 04}},
-	Optab{APSRAW, yps, Py3, [23]uint8{0xe1, 0x71, 04, Pe, 0xe1, Pe, 0x71, 04}},
-	Optab{APSRLO, ypsdq, Pq, [23]uint8{0x73, 03}},
-	Optab{APSRLL, yps, Py3, [23]uint8{0xd2, 0x72, 02, Pe, 0xd2, Pe, 0x72, 02}},
-	Optab{APSRLQ, yps, Py3, [23]uint8{0xd3, 0x73, 02, Pe, 0xd3, Pe, 0x73, 02}},
-	Optab{APSRLW, yps, Py3, [23]uint8{0xd1, 0x71, 02, Pe, 0xe1, Pe, 0x71, 02}},
-	Optab{APSUBB, yxm, Pe, [23]uint8{0xf8}},
-	Optab{APSUBL, yxm, Pe, [23]uint8{0xfa}},
-	Optab{APSUBQ, yxm, Pe, [23]uint8{0xfb}},
-	Optab{APSUBSB, yxm, Pe, [23]uint8{0xe8}},
-	Optab{APSUBSW, yxm, Pe, [23]uint8{0xe9}},
-	Optab{APSUBUSB, yxm, Pe, [23]uint8{0xd8}},
-	Optab{APSUBUSW, yxm, Pe, [23]uint8{0xd9}},
-	Optab{APSUBW, yxm, Pe, [23]uint8{0xf9}},
-	Optab{APSWAPL, ymfp, Px, [23]uint8{0xbb}},
-	Optab{APUNPCKHBW, ymm, Py1, [23]uint8{0x68, Pe, 0x68}},
-	Optab{APUNPCKHLQ, ymm, Py1, [23]uint8{0x6a, Pe, 0x6a}},
-	Optab{APUNPCKHQDQ, yxm, Pe, [23]uint8{0x6d}},
-	Optab{APUNPCKHWL, ymm, Py1, [23]uint8{0x69, Pe, 0x69}},
-	Optab{APUNPCKLBW, ymm, Py1, [23]uint8{0x60, Pe, 0x60}},
-	Optab{APUNPCKLLQ, ymm, Py1, [23]uint8{0x62, Pe, 0x62}},
-	Optab{APUNPCKLQDQ, yxm, Pe, [23]uint8{0x6c}},
-	Optab{APUNPCKLWL, ymm, Py1, [23]uint8{0x61, Pe, 0x61}},
-	Optab{APUSHAL, ynone, P32, [23]uint8{0x60}},
-	Optab{APUSHAW, ynone, Pe, [23]uint8{0x60}},
-	Optab{APUSHFL, ynone, P32, [23]uint8{0x9c}},
-	Optab{APUSHFQ, ynone, Py, [23]uint8{0x9c}},
-	Optab{APUSHFW, ynone, Pe, [23]uint8{0x9c}},
-	Optab{APUSHL, ypushl, P32, [23]uint8{0x50, 0xff, 06, 0x6a, 0x68}},
-	Optab{APUSHQ, ypushl, Py, [23]uint8{0x50, 0xff, 06, 0x6a, 0x68}},
-	Optab{APUSHW, ypushl, Pe, [23]uint8{0x50, 0xff, 06, 0x6a, 0x68}},
-	Optab{APXOR, ymm, Py1, [23]uint8{0xef, Pe, 0xef}},
-	Optab{AQUAD, ybyte, Px, [23]uint8{8}},
-	Optab{ARCLB, yshb, Pb, [23]uint8{0xd0, 02, 0xc0, 02, 0xd2, 02}},
-	Optab{ARCLL, yshl, Px, [23]uint8{0xd1, 02, 0xc1, 02, 0xd3, 02, 0xd3, 02}},
-	Optab{ARCLQ, yshl, Pw, [23]uint8{0xd1, 02, 0xc1, 02, 0xd3, 02, 0xd3, 02}},
-	Optab{ARCLW, yshl, Pe, [23]uint8{0xd1, 02, 0xc1, 02, 0xd3, 02, 0xd3, 02}},
-	Optab{ARCPPS, yxm, Pm, [23]uint8{0x53}},
-	Optab{ARCPSS, yxm, Pf3, [23]uint8{0x53}},
-	Optab{ARCRB, yshb, Pb, [23]uint8{0xd0, 03, 0xc0, 03, 0xd2, 03}},
-	Optab{ARCRL, yshl, Px, [23]uint8{0xd1, 03, 0xc1, 03, 0xd3, 03, 0xd3, 03}},
-	Optab{ARCRQ, yshl, Pw, [23]uint8{0xd1, 03, 0xc1, 03, 0xd3, 03, 0xd3, 03}},
-	Optab{ARCRW, yshl, Pe, [23]uint8{0xd1, 03, 0xc1, 03, 0xd3, 03, 0xd3, 03}},
-	Optab{AREP, ynone, Px, [23]uint8{0xf3}},
-	Optab{AREPN, ynone, Px, [23]uint8{0xf2}},
-	Optab{obj.ARET, ynone, Px, [23]uint8{0xc3}},
-	Optab{ARETFW, yret, Pe, [23]uint8{0xcb, 0xca}},
-	Optab{ARETFL, yret, Px, [23]uint8{0xcb, 0xca}},
-	Optab{ARETFQ, yret, Pw, [23]uint8{0xcb, 0xca}},
-	Optab{AROLB, yshb, Pb, [23]uint8{0xd0, 00, 0xc0, 00, 0xd2, 00}},
-	Optab{AROLL, yshl, Px, [23]uint8{0xd1, 00, 0xc1, 00, 0xd3, 00, 0xd3, 00}},
-	Optab{AROLQ, yshl, Pw, [23]uint8{0xd1, 00, 0xc1, 00, 0xd3, 00, 0xd3, 00}},
-	Optab{AROLW, yshl, Pe, [23]uint8{0xd1, 00, 0xc1, 00, 0xd3, 00, 0xd3, 00}},
-	Optab{ARORB, yshb, Pb, [23]uint8{0xd0, 01, 0xc0, 01, 0xd2, 01}},
-	Optab{ARORL, yshl, Px, [23]uint8{0xd1, 01, 0xc1, 01, 0xd3, 01, 0xd3, 01}},
-	Optab{ARORQ, yshl, Pw, [23]uint8{0xd1, 01, 0xc1, 01, 0xd3, 01, 0xd3, 01}},
-	Optab{ARORW, yshl, Pe, [23]uint8{0xd1, 01, 0xc1, 01, 0xd3, 01, 0xd3, 01}},
-	Optab{ARSQRTPS, yxm, Pm, [23]uint8{0x52}},
-	Optab{ARSQRTSS, yxm, Pf3, [23]uint8{0x52}},
-	Optab{ASAHF, ynone, Px1, [23]uint8{0x9e, 00, 0x86, 0xe0, 0x50, 0x9d}}, /* XCHGB AH,AL; PUSH AX; POPFL */
-	Optab{ASALB, yshb, Pb, [23]uint8{0xd0, 04, 0xc0, 04, 0xd2, 04}},
-	Optab{ASALL, yshl, Px, [23]uint8{0xd1, 04, 0xc1, 04, 0xd3, 04, 0xd3, 04}},
-	Optab{ASALQ, yshl, Pw, [23]uint8{0xd1, 04, 0xc1, 04, 0xd3, 04, 0xd3, 04}},
-	Optab{ASALW, yshl, Pe, [23]uint8{0xd1, 04, 0xc1, 04, 0xd3, 04, 0xd3, 04}},
-	Optab{ASARB, yshb, Pb, [23]uint8{0xd0, 07, 0xc0, 07, 0xd2, 07}},
-	Optab{ASARL, yshl, Px, [23]uint8{0xd1, 07, 0xc1, 07, 0xd3, 07, 0xd3, 07}},
-	Optab{ASARQ, yshl, Pw, [23]uint8{0xd1, 07, 0xc1, 07, 0xd3, 07, 0xd3, 07}},
-	Optab{ASARW, yshl, Pe, [23]uint8{0xd1, 07, 0xc1, 07, 0xd3, 07, 0xd3, 07}},
-	Optab{ASBBB, yxorb, Pb, [23]uint8{0x1c, 0x80, 03, 0x18, 0x1a}},
-	Optab{ASBBL, yxorl, Px, [23]uint8{0x83, 03, 0x1d, 0x81, 03, 0x19, 0x1b}},
-	Optab{ASBBQ, yxorl, Pw, [23]uint8{0x83, 03, 0x1d, 0x81, 03, 0x19, 0x1b}},
-	Optab{ASBBW, yxorl, Pe, [23]uint8{0x83, 03, 0x1d, 0x81, 03, 0x19, 0x1b}},
-	Optab{ASCASB, ynone, Pb, [23]uint8{0xae}},
-	Optab{ASCASL, ynone, Px, [23]uint8{0xaf}},
-	Optab{ASCASQ, ynone, Pw, [23]uint8{0xaf}},
-	Optab{ASCASW, ynone, Pe, [23]uint8{0xaf}},
-	Optab{ASETCC, yscond, Pb, [23]uint8{0x0f, 0x93, 00}},
-	Optab{ASETCS, yscond, Pb, [23]uint8{0x0f, 0x92, 00}},
-	Optab{ASETEQ, yscond, Pb, [23]uint8{0x0f, 0x94, 00}},
-	Optab{ASETGE, yscond, Pb, [23]uint8{0x0f, 0x9d, 00}},
-	Optab{ASETGT, yscond, Pb, [23]uint8{0x0f, 0x9f, 00}},
-	Optab{ASETHI, yscond, Pb, [23]uint8{0x0f, 0x97, 00}},
-	Optab{ASETLE, yscond, Pb, [23]uint8{0x0f, 0x9e, 00}},
-	Optab{ASETLS, yscond, Pb, [23]uint8{0x0f, 0x96, 00}},
-	Optab{ASETLT, yscond, Pb, [23]uint8{0x0f, 0x9c, 00}},
-	Optab{ASETMI, yscond, Pb, [23]uint8{0x0f, 0x98, 00}},
-	Optab{ASETNE, yscond, Pb, [23]uint8{0x0f, 0x95, 00}},
-	Optab{ASETOC, yscond, Pb, [23]uint8{0x0f, 0x91, 00}},
-	Optab{ASETOS, yscond, Pb, [23]uint8{0x0f, 0x90, 00}},
-	Optab{ASETPC, yscond, Pb, [23]uint8{0x0f, 0x9b, 00}},
-	Optab{ASETPL, yscond, Pb, [23]uint8{0x0f, 0x99, 00}},
-	Optab{ASETPS, yscond, Pb, [23]uint8{0x0f, 0x9a, 00}},
-	Optab{ASHLB, yshb, Pb, [23]uint8{0xd0, 04, 0xc0, 04, 0xd2, 04}},
-	Optab{ASHLL, yshl, Px, [23]uint8{0xd1, 04, 0xc1, 04, 0xd3, 04, 0xd3, 04}},
-	Optab{ASHLQ, yshl, Pw, [23]uint8{0xd1, 04, 0xc1, 04, 0xd3, 04, 0xd3, 04}},
-	Optab{ASHLW, yshl, Pe, [23]uint8{0xd1, 04, 0xc1, 04, 0xd3, 04, 0xd3, 04}},
-	Optab{ASHRB, yshb, Pb, [23]uint8{0xd0, 05, 0xc0, 05, 0xd2, 05}},
-	Optab{ASHRL, yshl, Px, [23]uint8{0xd1, 05, 0xc1, 05, 0xd3, 05, 0xd3, 05}},
-	Optab{ASHRQ, yshl, Pw, [23]uint8{0xd1, 05, 0xc1, 05, 0xd3, 05, 0xd3, 05}},
-	Optab{ASHRW, yshl, Pe, [23]uint8{0xd1, 05, 0xc1, 05, 0xd3, 05, 0xd3, 05}},
-	Optab{ASHUFPD, yxshuf, Pq, [23]uint8{0xc6, 00}},
-	Optab{ASHUFPS, yxshuf, Pm, [23]uint8{0xc6, 00}},
-	Optab{ASQRTPD, yxm, Pe, [23]uint8{0x51}},
-	Optab{ASQRTPS, yxm, Pm, [23]uint8{0x51}},
-	Optab{ASQRTSD, yxm, Pf2, [23]uint8{0x51}},
-	Optab{ASQRTSS, yxm, Pf3, [23]uint8{0x51}},
-	Optab{ASTC, ynone, Px, [23]uint8{0xf9}},
-	Optab{ASTD, ynone, Px, [23]uint8{0xfd}},
-	Optab{ASTI, ynone, Px, [23]uint8{0xfb}},
-	Optab{ASTMXCSR, ysvrs, Pm, [23]uint8{0xae, 03, 0xae, 03}},
-	Optab{ASTOSB, ynone, Pb, [23]uint8{0xaa}},
-	Optab{ASTOSL, ynone, Px, [23]uint8{0xab}},
-	Optab{ASTOSQ, ynone, Pw, [23]uint8{0xab}},
-	Optab{ASTOSW, ynone, Pe, [23]uint8{0xab}},
-	Optab{ASUBB, yxorb, Pb, [23]uint8{0x2c, 0x80, 05, 0x28, 0x2a}},
-	Optab{ASUBL, yaddl, Px, [23]uint8{0x83, 05, 0x2d, 0x81, 05, 0x29, 0x2b}},
-	Optab{ASUBPD, yxm, Pe, [23]uint8{0x5c}},
-	Optab{ASUBPS, yxm, Pm, [23]uint8{0x5c}},
-	Optab{ASUBQ, yaddl, Pw, [23]uint8{0x83, 05, 0x2d, 0x81, 05, 0x29, 0x2b}},
-	Optab{ASUBSD, yxm, Pf2, [23]uint8{0x5c}},
-	Optab{ASUBSS, yxm, Pf3, [23]uint8{0x5c}},
-	Optab{ASUBW, yaddl, Pe, [23]uint8{0x83, 05, 0x2d, 0x81, 05, 0x29, 0x2b}},
-	Optab{ASWAPGS, ynone, Pm, [23]uint8{0x01, 0xf8}},
-	Optab{ASYSCALL, ynone, Px, [23]uint8{0x0f, 0x05}}, /* fast syscall */
-	Optab{ATESTB, ytestb, Pb, [23]uint8{0xa8, 0xf6, 00, 0x84, 0x84}},
-	Optab{ATESTL, ytestl, Px, [23]uint8{0xa9, 0xf7, 00, 0x85, 0x85}},
-	Optab{ATESTQ, ytestl, Pw, [23]uint8{0xa9, 0xf7, 00, 0x85, 0x85}},
-	Optab{ATESTW, ytestl, Pe, [23]uint8{0xa9, 0xf7, 00, 0x85, 0x85}},
-	Optab{obj.ATEXT, ytext, Px, [23]uint8{}},
-	Optab{AUCOMISD, yxcmp, Pe, [23]uint8{0x2e}},
-	Optab{AUCOMISS, yxcmp, Pm, [23]uint8{0x2e}},
-	Optab{AUNPCKHPD, yxm, Pe, [23]uint8{0x15}},
-	Optab{AUNPCKHPS, yxm, Pm, [23]uint8{0x15}},
-	Optab{AUNPCKLPD, yxm, Pe, [23]uint8{0x14}},
-	Optab{AUNPCKLPS, yxm, Pm, [23]uint8{0x14}},
-	Optab{AVERR, ydivl, Pm, [23]uint8{0x00, 04}},
-	Optab{AVERW, ydivl, Pm, [23]uint8{0x00, 05}},
-	Optab{AWAIT, ynone, Px, [23]uint8{0x9b}},
-	Optab{AWORD, ybyte, Px, [23]uint8{2}},
-	Optab{AXCHGB, yml_mb, Pb, [23]uint8{0x86, 0x86}},
-	Optab{AXCHGL, yxchg, Px, [23]uint8{0x90, 0x90, 0x87, 0x87}},
-	Optab{AXCHGQ, yxchg, Pw, [23]uint8{0x90, 0x90, 0x87, 0x87}},
-	Optab{AXCHGW, yxchg, Pe, [23]uint8{0x90, 0x90, 0x87, 0x87}},
-	Optab{AXLAT, ynone, Px, [23]uint8{0xd7}},
-	Optab{AXORB, yxorb, Pb, [23]uint8{0x34, 0x80, 06, 0x30, 0x32}},
-	Optab{AXORL, yxorl, Px, [23]uint8{0x83, 06, 0x35, 0x81, 06, 0x31, 0x33}},
-	Optab{AXORPD, yxm, Pe, [23]uint8{0x57}},
-	Optab{AXORPS, yxm, Pm, [23]uint8{0x57}},
-	Optab{AXORQ, yxorl, Pw, [23]uint8{0x83, 06, 0x35, 0x81, 06, 0x31, 0x33}},
-	Optab{AXORW, yxorl, Pe, [23]uint8{0x83, 06, 0x35, 0x81, 06, 0x31, 0x33}},
-	Optab{AFMOVB, yfmvx, Px, [23]uint8{0xdf, 04}},
-	Optab{AFMOVBP, yfmvp, Px, [23]uint8{0xdf, 06}},
-	Optab{AFMOVD, yfmvd, Px, [23]uint8{0xdd, 00, 0xdd, 02, 0xd9, 00, 0xdd, 02}},
-	Optab{AFMOVDP, yfmvdp, Px, [23]uint8{0xdd, 03, 0xdd, 03}},
-	Optab{AFMOVF, yfmvf, Px, [23]uint8{0xd9, 00, 0xd9, 02}},
-	Optab{AFMOVFP, yfmvp, Px, [23]uint8{0xd9, 03}},
-	Optab{AFMOVL, yfmvf, Px, [23]uint8{0xdb, 00, 0xdb, 02}},
-	Optab{AFMOVLP, yfmvp, Px, [23]uint8{0xdb, 03}},
-	Optab{AFMOVV, yfmvx, Px, [23]uint8{0xdf, 05}},
-	Optab{AFMOVVP, yfmvp, Px, [23]uint8{0xdf, 07}},
-	Optab{AFMOVW, yfmvf, Px, [23]uint8{0xdf, 00, 0xdf, 02}},
-	Optab{AFMOVWP, yfmvp, Px, [23]uint8{0xdf, 03}},
-	Optab{AFMOVX, yfmvx, Px, [23]uint8{0xdb, 05}},
-	Optab{AFMOVXP, yfmvp, Px, [23]uint8{0xdb, 07}},
-	Optab{AFCMOVCC, yfcmv, Px, [23]uint8{0xdb, 00}},
-	Optab{AFCMOVCS, yfcmv, Px, [23]uint8{0xda, 00}},
-	Optab{AFCMOVEQ, yfcmv, Px, [23]uint8{0xda, 01}},
-	Optab{AFCMOVHI, yfcmv, Px, [23]uint8{0xdb, 02}},
-	Optab{AFCMOVLS, yfcmv, Px, [23]uint8{0xda, 02}},
-	Optab{AFCMOVNE, yfcmv, Px, [23]uint8{0xdb, 01}},
-	Optab{AFCMOVNU, yfcmv, Px, [23]uint8{0xdb, 03}},
-	Optab{AFCMOVUN, yfcmv, Px, [23]uint8{0xda, 03}},
-	Optab{AFCOMB, nil, 0, [23]uint8{}},
-	Optab{AFCOMBP, nil, 0, [23]uint8{}},
-	Optab{AFCOMD, yfadd, Px, [23]uint8{0xdc, 02, 0xd8, 02, 0xdc, 02}},  /* botch */
-	Optab{AFCOMDP, yfadd, Px, [23]uint8{0xdc, 03, 0xd8, 03, 0xdc, 03}}, /* botch */
-	Optab{AFCOMDPP, ycompp, Px, [23]uint8{0xde, 03}},
-	Optab{AFCOMF, yfmvx, Px, [23]uint8{0xd8, 02}},
-	Optab{AFCOMFP, yfmvx, Px, [23]uint8{0xd8, 03}},
-	Optab{AFCOMI, yfmvx, Px, [23]uint8{0xdb, 06}},
-	Optab{AFCOMIP, yfmvx, Px, [23]uint8{0xdf, 06}},
-	Optab{AFCOML, yfmvx, Px, [23]uint8{0xda, 02}},
-	Optab{AFCOMLP, yfmvx, Px, [23]uint8{0xda, 03}},
-	Optab{AFCOMW, yfmvx, Px, [23]uint8{0xde, 02}},
-	Optab{AFCOMWP, yfmvx, Px, [23]uint8{0xde, 03}},
-	Optab{AFUCOM, ycompp, Px, [23]uint8{0xdd, 04}},
-	Optab{AFUCOMI, ycompp, Px, [23]uint8{0xdb, 05}},
-	Optab{AFUCOMIP, ycompp, Px, [23]uint8{0xdf, 05}},
-	Optab{AFUCOMP, ycompp, Px, [23]uint8{0xdd, 05}},
-	Optab{AFUCOMPP, ycompp, Px, [23]uint8{0xda, 13}},
-	Optab{AFADDDP, yfaddp, Px, [23]uint8{0xde, 00}},
-	Optab{AFADDW, yfmvx, Px, [23]uint8{0xde, 00}},
-	Optab{AFADDL, yfmvx, Px, [23]uint8{0xda, 00}},
-	Optab{AFADDF, yfmvx, Px, [23]uint8{0xd8, 00}},
-	Optab{AFADDD, yfadd, Px, [23]uint8{0xdc, 00, 0xd8, 00, 0xdc, 00}},
-	Optab{AFMULDP, yfaddp, Px, [23]uint8{0xde, 01}},
-	Optab{AFMULW, yfmvx, Px, [23]uint8{0xde, 01}},
-	Optab{AFMULL, yfmvx, Px, [23]uint8{0xda, 01}},
-	Optab{AFMULF, yfmvx, Px, [23]uint8{0xd8, 01}},
-	Optab{AFMULD, yfadd, Px, [23]uint8{0xdc, 01, 0xd8, 01, 0xdc, 01}},
-	Optab{AFSUBDP, yfaddp, Px, [23]uint8{0xde, 05}},
-	Optab{AFSUBW, yfmvx, Px, [23]uint8{0xde, 04}},
-	Optab{AFSUBL, yfmvx, Px, [23]uint8{0xda, 04}},
-	Optab{AFSUBF, yfmvx, Px, [23]uint8{0xd8, 04}},
-	Optab{AFSUBD, yfadd, Px, [23]uint8{0xdc, 04, 0xd8, 04, 0xdc, 05}},
-	Optab{AFSUBRDP, yfaddp, Px, [23]uint8{0xde, 04}},
-	Optab{AFSUBRW, yfmvx, Px, [23]uint8{0xde, 05}},
-	Optab{AFSUBRL, yfmvx, Px, [23]uint8{0xda, 05}},
-	Optab{AFSUBRF, yfmvx, Px, [23]uint8{0xd8, 05}},
-	Optab{AFSUBRD, yfadd, Px, [23]uint8{0xdc, 05, 0xd8, 05, 0xdc, 04}},
-	Optab{AFDIVDP, yfaddp, Px, [23]uint8{0xde, 07}},
-	Optab{AFDIVW, yfmvx, Px, [23]uint8{0xde, 06}},
-	Optab{AFDIVL, yfmvx, Px, [23]uint8{0xda, 06}},
-	Optab{AFDIVF, yfmvx, Px, [23]uint8{0xd8, 06}},
-	Optab{AFDIVD, yfadd, Px, [23]uint8{0xdc, 06, 0xd8, 06, 0xdc, 07}},
-	Optab{AFDIVRDP, yfaddp, Px, [23]uint8{0xde, 06}},
-	Optab{AFDIVRW, yfmvx, Px, [23]uint8{0xde, 07}},
-	Optab{AFDIVRL, yfmvx, Px, [23]uint8{0xda, 07}},
-	Optab{AFDIVRF, yfmvx, Px, [23]uint8{0xd8, 07}},
-	Optab{AFDIVRD, yfadd, Px, [23]uint8{0xdc, 07, 0xd8, 07, 0xdc, 06}},
-	Optab{AFXCHD, yfxch, Px, [23]uint8{0xd9, 01, 0xd9, 01}},
-	Optab{AFFREE, nil, 0, [23]uint8{}},
-	Optab{AFLDCW, ystcw, Px, [23]uint8{0xd9, 05, 0xd9, 05}},
-	Optab{AFLDENV, ystcw, Px, [23]uint8{0xd9, 04, 0xd9, 04}},
-	Optab{AFRSTOR, ysvrs, Px, [23]uint8{0xdd, 04, 0xdd, 04}},
-	Optab{AFSAVE, ysvrs, Px, [23]uint8{0xdd, 06, 0xdd, 06}},
-	Optab{AFSTCW, ystcw, Px, [23]uint8{0xd9, 07, 0xd9, 07}},
-	Optab{AFSTENV, ystcw, Px, [23]uint8{0xd9, 06, 0xd9, 06}},
-	Optab{AFSTSW, ystsw, Px, [23]uint8{0xdd, 07, 0xdf, 0xe0}},
-	Optab{AF2XM1, ynone, Px, [23]uint8{0xd9, 0xf0}},
-	Optab{AFABS, ynone, Px, [23]uint8{0xd9, 0xe1}},
-	Optab{AFCHS, ynone, Px, [23]uint8{0xd9, 0xe0}},
-	Optab{AFCLEX, ynone, Px, [23]uint8{0xdb, 0xe2}},
-	Optab{AFCOS, ynone, Px, [23]uint8{0xd9, 0xff}},
-	Optab{AFDECSTP, ynone, Px, [23]uint8{0xd9, 0xf6}},
-	Optab{AFINCSTP, ynone, Px, [23]uint8{0xd9, 0xf7}},
-	Optab{AFINIT, ynone, Px, [23]uint8{0xdb, 0xe3}},
-	Optab{AFLD1, ynone, Px, [23]uint8{0xd9, 0xe8}},
-	Optab{AFLDL2E, ynone, Px, [23]uint8{0xd9, 0xea}},
-	Optab{AFLDL2T, ynone, Px, [23]uint8{0xd9, 0xe9}},
-	Optab{AFLDLG2, ynone, Px, [23]uint8{0xd9, 0xec}},
-	Optab{AFLDLN2, ynone, Px, [23]uint8{0xd9, 0xed}},
-	Optab{AFLDPI, ynone, Px, [23]uint8{0xd9, 0xeb}},
-	Optab{AFLDZ, ynone, Px, [23]uint8{0xd9, 0xee}},
-	Optab{AFNOP, ynone, Px, [23]uint8{0xd9, 0xd0}},
-	Optab{AFPATAN, ynone, Px, [23]uint8{0xd9, 0xf3}},
-	Optab{AFPREM, ynone, Px, [23]uint8{0xd9, 0xf8}},
-	Optab{AFPREM1, ynone, Px, [23]uint8{0xd9, 0xf5}},
-	Optab{AFPTAN, ynone, Px, [23]uint8{0xd9, 0xf2}},
-	Optab{AFRNDINT, ynone, Px, [23]uint8{0xd9, 0xfc}},
-	Optab{AFSCALE, ynone, Px, [23]uint8{0xd9, 0xfd}},
-	Optab{AFSIN, ynone, Px, [23]uint8{0xd9, 0xfe}},
-	Optab{AFSINCOS, ynone, Px, [23]uint8{0xd9, 0xfb}},
-	Optab{AFSQRT, ynone, Px, [23]uint8{0xd9, 0xfa}},
-	Optab{AFTST, ynone, Px, [23]uint8{0xd9, 0xe4}},
-	Optab{AFXAM, ynone, Px, [23]uint8{0xd9, 0xe5}},
-	Optab{AFXTRACT, ynone, Px, [23]uint8{0xd9, 0xf4}},
-	Optab{AFYL2X, ynone, Px, [23]uint8{0xd9, 0xf1}},
-	Optab{AFYL2XP1, ynone, Px, [23]uint8{0xd9, 0xf9}},
-	Optab{ACMPXCHGB, yrb_mb, Pb, [23]uint8{0x0f, 0xb0}},
-	Optab{ACMPXCHGL, yrl_ml, Px, [23]uint8{0x0f, 0xb1}},
-	Optab{ACMPXCHGW, yrl_ml, Pe, [23]uint8{0x0f, 0xb1}},
-	Optab{ACMPXCHGQ, yrl_ml, Pw, [23]uint8{0x0f, 0xb1}},
-	Optab{ACMPXCHG8B, yscond, Pm, [23]uint8{0xc7, 01}},
-	Optab{AINVD, ynone, Pm, [23]uint8{0x08}},
-	Optab{AINVLPG, ymbs, Pm, [23]uint8{0x01, 07}},
-	Optab{ALFENCE, ynone, Pm, [23]uint8{0xae, 0xe8}},
-	Optab{AMFENCE, ynone, Pm, [23]uint8{0xae, 0xf0}},
-	Optab{AMOVNTIL, yrl_ml, Pm, [23]uint8{0xc3}},
-	Optab{AMOVNTIQ, yrl_ml, Pw, [23]uint8{0x0f, 0xc3}},
-	Optab{ARDMSR, ynone, Pm, [23]uint8{0x32}},
-	Optab{ARDPMC, ynone, Pm, [23]uint8{0x33}},
-	Optab{ARDTSC, ynone, Pm, [23]uint8{0x31}},
-	Optab{ARSM, ynone, Pm, [23]uint8{0xaa}},
-	Optab{ASFENCE, ynone, Pm, [23]uint8{0xae, 0xf8}},
-	Optab{ASYSRET, ynone, Pm, [23]uint8{0x07}},
-	Optab{AWBINVD, ynone, Pm, [23]uint8{0x09}},
-	Optab{AWRMSR, ynone, Pm, [23]uint8{0x30}},
-	Optab{AXADDB, yrb_mb, Pb, [23]uint8{0x0f, 0xc0}},
-	Optab{AXADDL, yrl_ml, Px, [23]uint8{0x0f, 0xc1}},
-	Optab{AXADDQ, yrl_ml, Pw, [23]uint8{0x0f, 0xc1}},
-	Optab{AXADDW, yrl_ml, Pe, [23]uint8{0x0f, 0xc1}},
-	Optab{ACRC32B, ycrc32l, Px, [23]uint8{0xf2, 0x0f, 0x38, 0xf0, 0}},
-	Optab{ACRC32Q, ycrc32l, Pw, [23]uint8{0xf2, 0x0f, 0x38, 0xf1, 0}},
-	Optab{APREFETCHT0, yprefetch, Pm, [23]uint8{0x18, 01}},
-	Optab{APREFETCHT1, yprefetch, Pm, [23]uint8{0x18, 02}},
-	Optab{APREFETCHT2, yprefetch, Pm, [23]uint8{0x18, 03}},
-	Optab{APREFETCHNTA, yprefetch, Pm, [23]uint8{0x18, 00}},
-	Optab{AMOVQL, yrl_ml, Px, [23]uint8{0x89}},
-	Optab{obj.AUNDEF, ynone, Px, [23]uint8{0x0f, 0x0b}},
-	Optab{AAESENC, yaes, Pq, [23]uint8{0x38, 0xdc, 0}},
-	Optab{AAESENCLAST, yaes, Pq, [23]uint8{0x38, 0xdd, 0}},
-	Optab{AAESDEC, yaes, Pq, [23]uint8{0x38, 0xde, 0}},
-	Optab{AAESDECLAST, yaes, Pq, [23]uint8{0x38, 0xdf, 0}},
-	Optab{AAESIMC, yaes, Pq, [23]uint8{0x38, 0xdb, 0}},
-	Optab{AAESKEYGENASSIST, yaes2, Pq, [23]uint8{0x3a, 0xdf, 0}},
-	Optab{APSHUFD, yxshuf, Pq, [23]uint8{0x70, 0}},
-	Optab{APCLMULQDQ, yxshuf, Pq, [23]uint8{0x3a, 0x44, 0}},
-	Optab{obj.AUSEFIELD, ynop, Px, [23]uint8{0, 0}},
-	Optab{obj.ATYPE, nil, 0, [23]uint8{}},
-	Optab{obj.AFUNCDATA, yfuncdata, Px, [23]uint8{0, 0}},
-	Optab{obj.APCDATA, ypcdata, Px, [23]uint8{0, 0}},
-	Optab{obj.ACHECKNIL, nil, 0, [23]uint8{}},
-	Optab{obj.AVARDEF, nil, 0, [23]uint8{}},
-	Optab{obj.AVARKILL, nil, 0, [23]uint8{}},
-	Optab{obj.ADUFFCOPY, yduff, Px, [23]uint8{0xe8}},
-	Optab{obj.ADUFFZERO, yduff, Px, [23]uint8{0xe8}},
-	Optab{obj.AEND, nil, 0, [23]uint8{}},
-	Optab{0, nil, 0, [23]uint8{}},
-}
-
-var opindex [(ALAST + 1) & obj.AMask]*Optab
-
-// isextern reports whether s describes an external symbol that must avoid pc-relative addressing.
-// This happens on systems like Solaris that call .so functions instead of system calls.
-// It does not seem to be necessary for any other systems. This is probably working
-// around a Solaris-specific bug that should be fixed differently, but we don't know
-// what that bug is. And this does fix it.
-func isextern(s *obj.LSym) bool {
-	// All the Solaris dynamic imports from libc.so begin with "libc_".
-	return strings.HasPrefix(s.Name, "libc_")
-}
-
-// single-instruction no-ops of various lengths.
-// constructed by hand and disassembled with gdb to verify.
-// see http://www.agner.org/optimize/optimizing_assembly.pdf for discussion.
-var nop = [][16]uint8{
-	[16]uint8{0x90},
-	[16]uint8{0x66, 0x90},
-	[16]uint8{0x0F, 0x1F, 0x00},
-	[16]uint8{0x0F, 0x1F, 0x40, 0x00},
-	[16]uint8{0x0F, 0x1F, 0x44, 0x00, 0x00},
-	[16]uint8{0x66, 0x0F, 0x1F, 0x44, 0x00, 0x00},
-	[16]uint8{0x0F, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00},
-	[16]uint8{0x0F, 0x1F, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00},
-	[16]uint8{0x66, 0x0F, 0x1F, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00},
-}
-
-// Native Client rejects the repeated 0x66 prefix.
-// {0x66, 0x66, 0x0F, 0x1F, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00},
-func fillnop(p []byte, n int) {
-	var m int
-
-	for n > 0 {
-		m = n
-		if m > len(nop) {
-			m = len(nop)
-		}
-		copy(p[:m], nop[m-1][:m])
-		p = p[m:]
-		n -= m
-	}
-}
-
-func naclpad(ctxt *obj.Link, s *obj.LSym, c int32, pad int32) int32 {
-	obj.Symgrow(ctxt, s, int64(c)+int64(pad))
-	fillnop(s.P[c:], int(pad))
-	return c + pad
-}
-
-func spadjop(ctxt *obj.Link, p *obj.Prog, l int, q int) int {
-	if p.Mode != 64 || ctxt.Arch.Ptrsize == 4 {
-		return l
-	}
-	return q
-}
-
-func span6(ctxt *obj.Link, s *obj.LSym) {
-	ctxt.Cursym = s
-
-	if s.P != nil {
-		return
-	}
-
-	if ycover[0] == 0 {
-		instinit()
-	}
-
-	var v int32
-	for p := ctxt.Cursym.Text; p != nil; p = p.Link {
-		if p.To.Type == obj.TYPE_BRANCH {
-			if p.Pcond == nil {
-				p.Pcond = p
-			}
-		}
-		if p.As == AADJSP {
-			p.To.Type = obj.TYPE_REG
-			p.To.Reg = REG_SP
-			v = int32(-p.From.Offset)
-			p.From.Offset = int64(v)
-			p.As = int16(spadjop(ctxt, p, AADDL, AADDQ))
-			if v < 0 {
-				p.As = int16(spadjop(ctxt, p, ASUBL, ASUBQ))
-				v = -v
-				p.From.Offset = int64(v)
-			}
-
-			if v == 0 {
-				p.As = obj.ANOP
-			}
-		}
-	}
-
-	var q *obj.Prog
-	for p := s.Text; p != nil; p = p.Link {
-		p.Back = 2 // use short branches first time through
-		q = p.Pcond
-		if q != nil && (q.Back&2 != 0) {
-			p.Back |= 1 // backward jump
-			q.Back |= 4 // loop head
-		}
-
-		if p.As == AADJSP {
-			p.To.Type = obj.TYPE_REG
-			p.To.Reg = REG_SP
-			v = int32(-p.From.Offset)
-			p.From.Offset = int64(v)
-			p.As = int16(spadjop(ctxt, p, AADDL, AADDQ))
-			if v < 0 {
-				p.As = int16(spadjop(ctxt, p, ASUBL, ASUBQ))
-				v = -v
-				p.From.Offset = int64(v)
-			}
-
-			if v == 0 {
-				p.As = obj.ANOP
-			}
-		}
-	}
-
-	n := 0
-	var bp []byte
-	var c int32
-	var i int
-	var loop int32
-	var m int
-	var p *obj.Prog
-	for {
-		loop = 0
-		for i = 0; i < len(s.R); i++ {
-			s.R[i] = obj.Reloc{}
-		}
-		s.R = s.R[:0]
-		s.P = s.P[:0]
-		c = 0
-		for p = s.Text; p != nil; p = p.Link {
-			if ctxt.Headtype == obj.Hnacl && p.Isize > 0 {
-				var deferreturn *obj.LSym
-
-				if deferreturn == nil {
-					deferreturn = obj.Linklookup(ctxt, "runtime.deferreturn", 0)
-				}
-
-				// pad everything to avoid crossing 32-byte boundary
-				if c>>5 != (c+int32(p.Isize)-1)>>5 {
-					c = naclpad(ctxt, s, c, -c&31)
-				}
-
-				// pad call deferreturn to start at 32-byte boundary
-				// so that subtracting 5 in jmpdefer will jump back
-				// to that boundary and rerun the call.
-				if p.As == obj.ACALL && p.To.Sym == deferreturn {
-					c = naclpad(ctxt, s, c, -c&31)
-				}
-
-				// pad call to end at 32-byte boundary
-				if p.As == obj.ACALL {
-					c = naclpad(ctxt, s, c, -(c+int32(p.Isize))&31)
-				}
-
-				// the linker treats REP and STOSQ as different instructions
-				// but in fact the REP is a prefix on the STOSQ.
-				// make sure REP has room for 2 more bytes, so that
-				// padding will not be inserted before the next instruction.
-				if (p.As == AREP || p.As == AREPN) && c>>5 != (c+3-1)>>5 {
-					c = naclpad(ctxt, s, c, -c&31)
-				}
-
-				// same for LOCK.
-				// various instructions follow; the longest is 4 bytes.
-				// give ourselves 8 bytes so as to avoid surprises.
-				if p.As == ALOCK && c>>5 != (c+8-1)>>5 {
-					c = naclpad(ctxt, s, c, -c&31)
-				}
-			}
-
-			if (p.Back&4 != 0) && c&(LoopAlign-1) != 0 {
-				// pad with NOPs
-				v = -c & (LoopAlign - 1)
-
-				if v <= MaxLoopPad {
-					obj.Symgrow(ctxt, s, int64(c)+int64(v))
-					fillnop(s.P[c:], int(v))
-					c += v
-				}
-			}
-
-			p.Pc = int64(c)
-
-			// process forward jumps to p
-			for q = p.Rel; q != nil; q = q.Forwd {
-				v = int32(p.Pc - (q.Pc + int64(q.Mark)))
-				if q.Back&2 != 0 { // short
-					if v > 127 {
-						loop++
-						q.Back ^= 2
-					}
-
-					if q.As == AJCXZL {
-						s.P[q.Pc+2] = byte(v)
-					} else {
-						s.P[q.Pc+1] = byte(v)
-					}
-				} else {
-					bp = s.P[q.Pc+int64(q.Mark)-4:]
-					bp[0] = byte(v)
-					bp = bp[1:]
-					bp[0] = byte(v >> 8)
-					bp = bp[1:]
-					bp[0] = byte(v >> 16)
-					bp = bp[1:]
-					bp[0] = byte(v >> 24)
-				}
-			}
-
-			p.Rel = nil
-
-			p.Pc = int64(c)
-			asmins(ctxt, p)
-			m = -cap(ctxt.Andptr) + cap(ctxt.And[:])
-			if int(p.Isize) != m {
-				p.Isize = uint8(m)
-				loop++
-			}
-
-			obj.Symgrow(ctxt, s, p.Pc+int64(m))
-			copy(s.P[p.Pc:][:m], ctxt.And[:m])
-			p.Mark = uint16(m)
-			c += int32(m)
-		}
-
-		n++
-		if n > 20 {
-			ctxt.Diag("span must be looping")
-			log.Fatalf("loop")
-		}
-		if loop == 0 {
-			break
-		}
-	}
-
-	if ctxt.Headtype == obj.Hnacl {
-		c = naclpad(ctxt, s, c, -c&31)
-	}
-
-	c += -c & (FuncAlign - 1)
-	s.Size = int64(c)
-
-	if false { /* debug['a'] > 1 */
-		fmt.Printf("span1 %s %d (%d tries)\n %.6x", s.Name, s.Size, n, 0)
-		var i int
-		for i = 0; i < len(s.P); i++ {
-			fmt.Printf(" %.2x", s.P[i])
-			if i%16 == 15 {
-				fmt.Printf("\n  %.6x", uint(i+1))
-			}
-		}
-
-		if i%16 != 0 {
-			fmt.Printf("\n")
-		}
-
-		for i := 0; i < len(s.R); i++ {
-			r := &s.R[i]
-			fmt.Printf(" rel %#.4x/%d %s%+d\n", uint32(r.Off), r.Siz, r.Sym.Name, r.Add)
-		}
-	}
-}
-
-func instinit() {
-	var c int
-
-	for i := 1; optab[i].as != 0; i++ {
-		c = int(optab[i].as)
-		if opindex[c&obj.AMask] != nil {
-			log.Fatalf("phase error in optab: %d (%v)", i, obj.Aconv(c))
-		}
-		opindex[c&obj.AMask] = &optab[i]
-	}
-
-	for i := 0; i < Ymax; i++ {
-		ycover[i*Ymax+i] = 1
-	}
-
-	ycover[Yi0*Ymax+Yi8] = 1
-	ycover[Yi1*Ymax+Yi8] = 1
-	ycover[Yu7*Ymax+Yi8] = 1
-
-	ycover[Yi0*Ymax+Yu7] = 1
-	ycover[Yi1*Ymax+Yu7] = 1
-
-	ycover[Yi0*Ymax+Yu8] = 1
-	ycover[Yi1*Ymax+Yu8] = 1
-	ycover[Yu7*Ymax+Yu8] = 1
-
-	ycover[Yi0*Ymax+Ys32] = 1
-	ycover[Yi1*Ymax+Ys32] = 1
-	ycover[Yu7*Ymax+Ys32] = 1
-	ycover[Yu8*Ymax+Ys32] = 1
-	ycover[Yi8*Ymax+Ys32] = 1
-
-	ycover[Yi0*Ymax+Yi32] = 1
-	ycover[Yi1*Ymax+Yi32] = 1
-	ycover[Yu7*Ymax+Yi32] = 1
-	ycover[Yu8*Ymax+Yi32] = 1
-	ycover[Yi8*Ymax+Yi32] = 1
-	ycover[Ys32*Ymax+Yi32] = 1
-
-	ycover[Yi0*Ymax+Yi64] = 1
-	ycover[Yi1*Ymax+Yi64] = 1
-	ycover[Yu7*Ymax+Yi64] = 1
-	ycover[Yu8*Ymax+Yi64] = 1
-	ycover[Yi8*Ymax+Yi64] = 1
-	ycover[Ys32*Ymax+Yi64] = 1
-	ycover[Yi32*Ymax+Yi64] = 1
-
-	ycover[Yal*Ymax+Yrb] = 1
-	ycover[Ycl*Ymax+Yrb] = 1
-	ycover[Yax*Ymax+Yrb] = 1
-	ycover[Ycx*Ymax+Yrb] = 1
-	ycover[Yrx*Ymax+Yrb] = 1
-	ycover[Yrl*Ymax+Yrb] = 1 // but not Yrl32
-
-	ycover[Ycl*Ymax+Ycx] = 1
-
-	ycover[Yax*Ymax+Yrx] = 1
-	ycover[Ycx*Ymax+Yrx] = 1
-
-	ycover[Yax*Ymax+Yrl] = 1
-	ycover[Ycx*Ymax+Yrl] = 1
-	ycover[Yrx*Ymax+Yrl] = 1
-	ycover[Yrl32*Ymax+Yrl] = 1
-
-	ycover[Yf0*Ymax+Yrf] = 1
-
-	ycover[Yal*Ymax+Ymb] = 1
-	ycover[Ycl*Ymax+Ymb] = 1
-	ycover[Yax*Ymax+Ymb] = 1
-	ycover[Ycx*Ymax+Ymb] = 1
-	ycover[Yrx*Ymax+Ymb] = 1
-	ycover[Yrb*Ymax+Ymb] = 1
-	ycover[Yrl*Ymax+Ymb] = 1 // but not Yrl32
-	ycover[Ym*Ymax+Ymb] = 1
-
-	ycover[Yax*Ymax+Yml] = 1
-	ycover[Ycx*Ymax+Yml] = 1
-	ycover[Yrx*Ymax+Yml] = 1
-	ycover[Yrl*Ymax+Yml] = 1
-	ycover[Yrl32*Ymax+Yml] = 1
-	ycover[Ym*Ymax+Yml] = 1
-
-	ycover[Yax*Ymax+Ymm] = 1
-	ycover[Ycx*Ymax+Ymm] = 1
-	ycover[Yrx*Ymax+Ymm] = 1
-	ycover[Yrl*Ymax+Ymm] = 1
-	ycover[Yrl32*Ymax+Ymm] = 1
-	ycover[Ym*Ymax+Ymm] = 1
-	ycover[Ymr*Ymax+Ymm] = 1
-
-	ycover[Ym*Ymax+Yxm] = 1
-	ycover[Yxr*Ymax+Yxm] = 1
-
-	for i := 0; i < MAXREG; i++ {
-		reg[i] = -1
-		if i >= REG_AL && i <= REG_R15B {
-			reg[i] = (i - REG_AL) & 7
-			if i >= REG_SPB && i <= REG_DIB {
-				regrex[i] = 0x40
-			}
-			if i >= REG_R8B && i <= REG_R15B {
-				regrex[i] = Rxr | Rxx | Rxb
-			}
-		}
-
-		if i >= REG_AH && i <= REG_BH {
-			reg[i] = 4 + ((i - REG_AH) & 7)
-		}
-		if i >= REG_AX && i <= REG_R15 {
-			reg[i] = (i - REG_AX) & 7
-			if i >= REG_R8 {
-				regrex[i] = Rxr | Rxx | Rxb
-			}
-		}
-
-		if i >= REG_F0 && i <= REG_F0+7 {
-			reg[i] = (i - REG_F0) & 7
-		}
-		if i >= REG_M0 && i <= REG_M0+7 {
-			reg[i] = (i - REG_M0) & 7
-		}
-		if i >= REG_X0 && i <= REG_X0+15 {
-			reg[i] = (i - REG_X0) & 7
-			if i >= REG_X0+8 {
-				regrex[i] = Rxr | Rxx | Rxb
-			}
-		}
-
-		if i >= REG_CR+8 && i <= REG_CR+15 {
-			regrex[i] = Rxr
-		}
-	}
-}
-
-func prefixof(ctxt *obj.Link, p *obj.Prog, a *obj.Addr) int {
-	if a.Reg < REG_CS && a.Index < REG_CS { // fast path
-		return 0
-	}
-	if a.Type == obj.TYPE_MEM && a.Name == obj.NAME_NONE {
-		switch a.Reg {
-		case REG_CS:
-			return 0x2e
-
-		case REG_DS:
-			return 0x3e
-
-		case REG_ES:
-			return 0x26
-
-		case REG_FS:
-			return 0x64
-
-		case REG_GS:
-			return 0x65
-
-		case REG_TLS:
-			// NOTE: Systems listed here should be only systems that
-			// support direct TLS references like 8(TLS) implemented as
-			// direct references from FS or GS. Systems that require
-			// the initial-exec model, where you load the TLS base into
-			// a register and then index from that register, do not reach
-			// this code and should not be listed.
-			if p.Mode == 32 {
-				switch ctxt.Headtype {
-				default:
-					log.Fatalf("unknown TLS base register for %s", obj.Headstr(ctxt.Headtype))
-
-				case obj.Hdarwin,
-					obj.Hdragonfly,
-					obj.Hfreebsd,
-					obj.Hnetbsd,
-					obj.Hopenbsd:
-					return 0x65 // GS
-				}
-			}
-
-			switch ctxt.Headtype {
-			default:
-				log.Fatalf("unknown TLS base register for %s", obj.Headstr(ctxt.Headtype))
-
-			case obj.Hlinux:
-				if ctxt.Flag_shared != 0 {
-					log.Fatalf("unknown TLS base register for linux with -shared")
-				} else {
-					return 0x64 // FS
-				}
-
-			case obj.Hdragonfly,
-				obj.Hfreebsd,
-				obj.Hnetbsd,
-				obj.Hopenbsd,
-				obj.Hsolaris:
-				return 0x64 // FS
-
-			case obj.Hdarwin:
-				return 0x65 // GS
-			}
-		}
-	}
-
-	if p.Mode == 32 {
-		return 0
-	}
-
-	switch a.Index {
-	case REG_CS:
-		return 0x2e
-
-	case REG_DS:
-		return 0x3e
-
-	case REG_ES:
-		return 0x26
-
-	case REG_TLS:
-		if ctxt.Flag_shared != 0 {
-			// When building for inclusion into a shared library, an instruction of the form
-			//     MOV 0(CX)(TLS*1), AX
-			// becomes
-			//     mov %fs:(%rcx), %rax
-			// which assumes that the correct TLS offset has been loaded into %rcx (today
-			// there is only one TLS variable -- g -- so this is OK). When not building for
-			// a shared library the instruction does not require a prefix.
-			if a.Offset != 0 {
-				log.Fatalf("cannot handle non-0 offsets to TLS")
-			}
-			return 0x64
-		}
-
-	case REG_FS:
-		return 0x64
-
-	case REG_GS:
-		return 0x65
-	}
-
-	return 0
-}
-
-func oclass(ctxt *obj.Link, p *obj.Prog, a *obj.Addr) int {
-	switch a.Type {
-	case obj.TYPE_NONE:
-		return Ynone
-
-	case obj.TYPE_BRANCH:
-		return Ybr
-
-	case obj.TYPE_INDIR:
-		if a.Name != obj.NAME_NONE && a.Reg == REG_NONE && a.Index == REG_NONE && a.Scale == 0 {
-			return Yindir
-		}
-		return Yxxx
-
-	case obj.TYPE_MEM:
-		return Ym
-
-	case obj.TYPE_ADDR:
-		switch a.Name {
-		case obj.NAME_EXTERN,
-			obj.NAME_GOTREF,
-			obj.NAME_STATIC:
-			if a.Sym != nil && isextern(a.Sym) || p.Mode == 32 {
-				return Yi32
-			}
-			return Yiauto // use pc-relative addressing
-
-		case obj.NAME_AUTO,
-			obj.NAME_PARAM:
-			return Yiauto
-		}
-
-		// TODO(rsc): DUFFZERO/DUFFCOPY encoding forgot to set a->index
-		// and got Yi32 in an earlier version of this code.
-		// Keep doing that until we fix yduff etc.
-		if a.Sym != nil && strings.HasPrefix(a.Sym.Name, "runtime.duff") {
-			return Yi32
-		}
-
-		if a.Sym != nil || a.Name != obj.NAME_NONE {
-			ctxt.Diag("unexpected addr: %v", obj.Dconv(p, a))
-		}
-		fallthrough
-
-		// fall through
-
-	case obj.TYPE_CONST:
-		if a.Sym != nil {
-			ctxt.Diag("TYPE_CONST with symbol: %v", obj.Dconv(p, a))
-		}
-
-		v := a.Offset
-		if p.Mode == 32 {
-			v = int64(int32(v))
-		}
-		if v == 0 {
-			return Yi0
-		}
-		if v == 1 {
-			return Yi1
-		}
-		if v >= 0 && v <= 127 {
-			return Yu7
-		}
-		if v >= 0 && v <= 255 {
-			return Yu8
-		}
-		if v >= -128 && v <= 127 {
-			return Yi8
-		}
-		if p.Mode == 32 {
-			return Yi32
-		}
-		l := int32(v)
-		if int64(l) == v {
-			return Ys32 /* can sign extend */
-		}
-		if v>>32 == 0 {
-			return Yi32 /* unsigned */
-		}
-		return Yi64
-
-	case obj.TYPE_TEXTSIZE:
-		return Ytextsize
-	}
-
-	if a.Type != obj.TYPE_REG {
-		ctxt.Diag("unexpected addr1: type=%d %v", a.Type, obj.Dconv(p, a))
-		return Yxxx
-	}
-
-	switch a.Reg {
-	case REG_AL:
-		return Yal
-
-	case REG_AX:
-		return Yax
-
-		/*
-			case REG_SPB:
-		*/
-	case REG_BPB,
-		REG_SIB,
-		REG_DIB,
-		REG_R8B,
-		REG_R9B,
-		REG_R10B,
-		REG_R11B,
-		REG_R12B,
-		REG_R13B,
-		REG_R14B,
-		REG_R15B:
-		if ctxt.Asmode != 64 {
-			return Yxxx
-		}
-		fallthrough
-
-	case REG_DL,
-		REG_BL,
-		REG_AH,
-		REG_CH,
-		REG_DH,
-		REG_BH:
-		return Yrb
-
-	case REG_CL:
-		return Ycl
-
-	case REG_CX:
-		return Ycx
-
-	case REG_DX, REG_BX:
-		return Yrx
-
-	case REG_R8, /* not really Yrl */
-		REG_R9,
-		REG_R10,
-		REG_R11,
-		REG_R12,
-		REG_R13,
-		REG_R14,
-		REG_R15:
-		if ctxt.Asmode != 64 {
-			return Yxxx
-		}
-		fallthrough
-
-	case REG_SP, REG_BP, REG_SI, REG_DI:
-		if p.Mode == 32 {
-			return Yrl32
-		}
-		return Yrl
-
-	case REG_F0 + 0:
-		return Yf0
-
-	case REG_F0 + 1,
-		REG_F0 + 2,
-		REG_F0 + 3,
-		REG_F0 + 4,
-		REG_F0 + 5,
-		REG_F0 + 6,
-		REG_F0 + 7:
-		return Yrf
-
-	case REG_M0 + 0,
-		REG_M0 + 1,
-		REG_M0 + 2,
-		REG_M0 + 3,
-		REG_M0 + 4,
-		REG_M0 + 5,
-		REG_M0 + 6,
-		REG_M0 + 7:
-		return Ymr
-
-	case REG_X0 + 0,
-		REG_X0 + 1,
-		REG_X0 + 2,
-		REG_X0 + 3,
-		REG_X0 + 4,
-		REG_X0 + 5,
-		REG_X0 + 6,
-		REG_X0 + 7,
-		REG_X0 + 8,
-		REG_X0 + 9,
-		REG_X0 + 10,
-		REG_X0 + 11,
-		REG_X0 + 12,
-		REG_X0 + 13,
-		REG_X0 + 14,
-		REG_X0 + 15:
-		return Yxr
-
-	case REG_CS:
-		return Ycs
-	case REG_SS:
-		return Yss
-	case REG_DS:
-		return Yds
-	case REG_ES:
-		return Yes
-	case REG_FS:
-		return Yfs
-	case REG_GS:
-		return Ygs
-	case REG_TLS:
-		return Ytls
-
-	case REG_GDTR:
-		return Ygdtr
-	case REG_IDTR:
-		return Yidtr
-	case REG_LDTR:
-		return Yldtr
-	case REG_MSW:
-		return Ymsw
-	case REG_TASK:
-		return Ytask
-
-	case REG_CR + 0:
-		return Ycr0
-	case REG_CR + 1:
-		return Ycr1
-	case REG_CR + 2:
-		return Ycr2
-	case REG_CR + 3:
-		return Ycr3
-	case REG_CR + 4:
-		return Ycr4
-	case REG_CR + 5:
-		return Ycr5
-	case REG_CR + 6:
-		return Ycr6
-	case REG_CR + 7:
-		return Ycr7
-	case REG_CR + 8:
-		return Ycr8
-
-	case REG_DR + 0:
-		return Ydr0
-	case REG_DR + 1:
-		return Ydr1
-	case REG_DR + 2:
-		return Ydr2
-	case REG_DR + 3:
-		return Ydr3
-	case REG_DR + 4:
-		return Ydr4
-	case REG_DR + 5:
-		return Ydr5
-	case REG_DR + 6:
-		return Ydr6
-	case REG_DR + 7:
-		return Ydr7
-
-	case REG_TR + 0:
-		return Ytr0
-	case REG_TR + 1:
-		return Ytr1
-	case REG_TR + 2:
-		return Ytr2
-	case REG_TR + 3:
-		return Ytr3
-	case REG_TR + 4:
-		return Ytr4
-	case REG_TR + 5:
-		return Ytr5
-	case REG_TR + 6:
-		return Ytr6
-	case REG_TR + 7:
-		return Ytr7
-	}
-
-	return Yxxx
-}
-
-func asmidx(ctxt *obj.Link, scale int, index int, base int) {
-	var i int
-
-	switch index {
-	default:
-		goto bad
-
-	case REG_NONE:
-		i = 4 << 3
-		goto bas
-
-	case REG_R8,
-		REG_R9,
-		REG_R10,
-		REG_R11,
-		REG_R12,
-		REG_R13,
-		REG_R14,
-		REG_R15:
-		if ctxt.Asmode != 64 {
-			goto bad
-		}
-		fallthrough
-
-	case REG_AX,
-		REG_CX,
-		REG_DX,
-		REG_BX,
-		REG_BP,
-		REG_SI,
-		REG_DI:
-		i = reg[index] << 3
-	}
-
-	switch scale {
-	default:
-		goto bad
-
-	case 1:
-		break
-
-	case 2:
-		i |= 1 << 6
-
-	case 4:
-		i |= 2 << 6
-
-	case 8:
-		i |= 3 << 6
-	}
-
-bas:
-	switch base {
-	default:
-		goto bad
-
-	case REG_NONE: /* must be mod=00 */
-		i |= 5
-
-	case REG_R8,
-		REG_R9,
-		REG_R10,
-		REG_R11,
-		REG_R12,
-		REG_R13,
-		REG_R14,
-		REG_R15:
-		if ctxt.Asmode != 64 {
-			goto bad
-		}
-		fallthrough
-
-	case REG_AX,
-		REG_CX,
-		REG_DX,
-		REG_BX,
-		REG_SP,
-		REG_BP,
-		REG_SI,
-		REG_DI:
-		i |= reg[base]
-	}
-
-	ctxt.Andptr[0] = byte(i)
-	ctxt.Andptr = ctxt.Andptr[1:]
-	return
-
-bad:
-	ctxt.Diag("asmidx: bad address %d/%d/%d", scale, index, base)
-	ctxt.Andptr[0] = 0
-	ctxt.Andptr = ctxt.Andptr[1:]
-	return
-}
-
-func put4(ctxt *obj.Link, v int32) {
-	ctxt.Andptr[0] = byte(v)
-	ctxt.Andptr[1] = byte(v >> 8)
-	ctxt.Andptr[2] = byte(v >> 16)
-	ctxt.Andptr[3] = byte(v >> 24)
-	ctxt.Andptr = ctxt.Andptr[4:]
-}
-
-func relput4(ctxt *obj.Link, p *obj.Prog, a *obj.Addr) {
-	var rel obj.Reloc
-
-	v := vaddr(ctxt, p, a, &rel)
-	if rel.Siz != 0 {
-		if rel.Siz != 4 {
-			ctxt.Diag("bad reloc")
-		}
-		r := obj.Addrel(ctxt.Cursym)
-		*r = rel
-		r.Off = int32(p.Pc + int64(-cap(ctxt.Andptr)+cap(ctxt.And[:])))
-	}
-
-	put4(ctxt, int32(v))
-}
-
-func put8(ctxt *obj.Link, v int64) {
-	ctxt.Andptr[0] = byte(v)
-	ctxt.Andptr[1] = byte(v >> 8)
-	ctxt.Andptr[2] = byte(v >> 16)
-	ctxt.Andptr[3] = byte(v >> 24)
-	ctxt.Andptr[4] = byte(v >> 32)
-	ctxt.Andptr[5] = byte(v >> 40)
-	ctxt.Andptr[6] = byte(v >> 48)
-	ctxt.Andptr[7] = byte(v >> 56)
-	ctxt.Andptr = ctxt.Andptr[8:]
-}
-
-/*
-static void
-relput8(Prog *p, Addr *a)
-{
-	vlong v;
-	Reloc rel, *r;
-
-	v = vaddr(ctxt, p, a, &rel);
-	if(rel.siz != 0) {
-		r = addrel(ctxt->cursym);
-		*r = rel;
-		r->siz = 8;
-		r->off = p->pc + ctxt->andptr - ctxt->and;
-	}
-	put8(ctxt, v);
-}
-*/
-func vaddr(ctxt *obj.Link, p *obj.Prog, a *obj.Addr, r *obj.Reloc) int64 {
-	if r != nil {
-		*r = obj.Reloc{}
-	}
-
-	switch a.Name {
-	case obj.NAME_STATIC,
-		obj.NAME_GOTREF,
-		obj.NAME_EXTERN:
-		s := a.Sym
-		if r == nil {
-			ctxt.Diag("need reloc for %v", obj.Dconv(p, a))
-			log.Fatalf("reloc")
-		}
-
-		if a.Name == obj.NAME_GOTREF {
-			r.Siz = 4
-			r.Type = obj.R_GOTPCREL
-		} else if isextern(s) || p.Mode != 64 {
-			r.Siz = 4
-			r.Type = obj.R_ADDR
-		} else {
-			r.Siz = 4
-			r.Type = obj.R_PCREL
-		}
-
-		r.Off = -1 // caller must fill in
-		r.Sym = s
-		r.Add = a.Offset
-
-		return 0
-	}
-
-	if (a.Type == obj.TYPE_MEM || a.Type == obj.TYPE_ADDR) && a.Reg == REG_TLS {
-		if r == nil {
-			ctxt.Diag("need reloc for %v", obj.Dconv(p, a))
-			log.Fatalf("reloc")
-		}
-
-		r.Type = obj.R_TLS_LE
-		r.Siz = 4
-		r.Off = -1 // caller must fill in
-		r.Add = a.Offset
-		return 0
-	}
-
-	return a.Offset
-}
-
-func asmandsz(ctxt *obj.Link, p *obj.Prog, a *obj.Addr, r int, rex int, m64 int) {
-	var base int
-	var rel obj.Reloc
-
-	rex &= 0x40 | Rxr
-	v := int32(a.Offset)
-	rel.Siz = 0
-
-	switch a.Type {
-	case obj.TYPE_ADDR:
-		if a.Name == obj.NAME_NONE {
-			ctxt.Diag("unexpected TYPE_ADDR with NAME_NONE")
-		}
-		if a.Index == REG_TLS {
-			ctxt.Diag("unexpected TYPE_ADDR with index==REG_TLS")
-		}
-		goto bad
-
-	case obj.TYPE_REG:
-		if a.Reg < REG_AL || REG_X0+15 < a.Reg {
-			goto bad
-		}
-		if v != 0 {
-			goto bad
-		}
-		ctxt.Andptr[0] = byte(3<<6 | reg[a.Reg]<<0 | r<<3)
-		ctxt.Andptr = ctxt.Andptr[1:]
-		ctxt.Rexflag |= regrex[a.Reg]&(0x40|Rxb) | rex
-		return
-	}
-
-	if a.Type != obj.TYPE_MEM {
-		goto bad
-	}
-
-	if a.Index != REG_NONE && a.Index != REG_TLS {
-		base := int(a.Reg)
-		switch a.Name {
-		case obj.NAME_EXTERN,
-			obj.NAME_GOTREF,
-			obj.NAME_STATIC:
-			if !isextern(a.Sym) && p.Mode == 64 {
-				goto bad
-			}
-			base = REG_NONE
-			v = int32(vaddr(ctxt, p, a, &rel))
-
-		case obj.NAME_AUTO,
-			obj.NAME_PARAM:
-			base = REG_SP
-		}
-
-		ctxt.Rexflag |= regrex[int(a.Index)]&Rxx | regrex[base]&Rxb | rex
-		if base == REG_NONE {
-			ctxt.Andptr[0] = byte(0<<6 | 4<<0 | r<<3)
-			ctxt.Andptr = ctxt.Andptr[1:]
-			asmidx(ctxt, int(a.Scale), int(a.Index), base)
-			goto putrelv
-		}
-
-		if v == 0 && rel.Siz == 0 && base != REG_BP && base != REG_R13 {
-			ctxt.Andptr[0] = byte(0<<6 | 4<<0 | r<<3)
-			ctxt.Andptr = ctxt.Andptr[1:]
-			asmidx(ctxt, int(a.Scale), int(a.Index), base)
-			return
-		}
-
-		if v >= -128 && v < 128 && rel.Siz == 0 {
-			ctxt.Andptr[0] = byte(1<<6 | 4<<0 | r<<3)
-			ctxt.Andptr = ctxt.Andptr[1:]
-			asmidx(ctxt, int(a.Scale), int(a.Index), base)
-			ctxt.Andptr[0] = byte(v)
-			ctxt.Andptr = ctxt.Andptr[1:]
-			return
-		}
-
-		ctxt.Andptr[0] = byte(2<<6 | 4<<0 | r<<3)
-		ctxt.Andptr = ctxt.Andptr[1:]
-		asmidx(ctxt, int(a.Scale), int(a.Index), base)
-		goto putrelv
-	}
-
-	base = int(a.Reg)
-	switch a.Name {
-	case obj.NAME_STATIC,
-		obj.NAME_GOTREF,
-		obj.NAME_EXTERN:
-		if a.Sym == nil {
-			ctxt.Diag("bad addr: %v", p)
-		}
-		base = REG_NONE
-		v = int32(vaddr(ctxt, p, a, &rel))
-
-	case obj.NAME_AUTO,
-		obj.NAME_PARAM:
-		base = REG_SP
-	}
-
-	if base == REG_TLS {
-		v = int32(vaddr(ctxt, p, a, &rel))
-	}
-
-	ctxt.Rexflag |= regrex[base]&Rxb | rex
-	if base == REG_NONE || (REG_CS <= base && base <= REG_GS) || base == REG_TLS {
-		if (a.Sym == nil || !isextern(a.Sym)) && base == REG_NONE && (a.Name == obj.NAME_STATIC || a.Name == obj.NAME_EXTERN || a.Name == obj.NAME_GOTREF) || p.Mode != 64 {
-			if a.Name == obj.NAME_GOTREF && (a.Offset != 0 || a.Index != 0 || a.Scale != 0) {
-				ctxt.Diag("%v has offset against gotref", p)
-			}
-			ctxt.Andptr[0] = byte(0<<6 | 5<<0 | r<<3)
-			ctxt.Andptr = ctxt.Andptr[1:]
-			goto putrelv
-		}
-
-		/* temporary */
-		ctxt.Andptr[0] = byte(0<<6 | 4<<0 | r<<3)
-		ctxt.Andptr = ctxt.Andptr[1:] /* sib present */
-		ctxt.Andptr[0] = 0<<6 | 4<<3 | 5<<0
-		ctxt.Andptr = ctxt.Andptr[1:] /* DS:d32 */
-		goto putrelv
-	}
-
-	if base == REG_SP || base == REG_R12 {
-		if v == 0 {
-			ctxt.Andptr[0] = byte(0<<6 | reg[base]<<0 | r<<3)
-			ctxt.Andptr = ctxt.Andptr[1:]
-			asmidx(ctxt, int(a.Scale), REG_NONE, base)
-			return
-		}
-
-		if v >= -128 && v < 128 {
-			ctxt.Andptr[0] = byte(1<<6 | reg[base]<<0 | r<<3)
-			ctxt.Andptr = ctxt.Andptr[1:]
-			asmidx(ctxt, int(a.Scale), REG_NONE, base)
-			ctxt.Andptr[0] = byte(v)
-			ctxt.Andptr = ctxt.Andptr[1:]
-			return
-		}
-
-		ctxt.Andptr[0] = byte(2<<6 | reg[base]<<0 | r<<3)
-		ctxt.Andptr = ctxt.Andptr[1:]
-		asmidx(ctxt, int(a.Scale), REG_NONE, base)
-		goto putrelv
-	}
-
-	if REG_AX <= base && base <= REG_R15 {
-		if a.Index == REG_TLS && ctxt.Flag_shared == 0 {
-			rel = obj.Reloc{}
-			rel.Type = obj.R_TLS_LE
-			rel.Siz = 4
-			rel.Sym = nil
-			rel.Add = int64(v)
-			v = 0
-		}
-
-		if v == 0 && rel.Siz == 0 && base != REG_BP && base != REG_R13 {
-			ctxt.Andptr[0] = byte(0<<6 | reg[base]<<0 | r<<3)
-			ctxt.Andptr = ctxt.Andptr[1:]
-			return
-		}
-
-		if v >= -128 && v < 128 && rel.Siz == 0 {
-			ctxt.Andptr[0] = byte(1<<6 | reg[base]<<0 | r<<3)
-			ctxt.Andptr[1] = byte(v)
-			ctxt.Andptr = ctxt.Andptr[2:]
-			return
-		}
-
-		ctxt.Andptr[0] = byte(2<<6 | reg[base]<<0 | r<<3)
-		ctxt.Andptr = ctxt.Andptr[1:]
-		goto putrelv
-	}
-
-	goto bad
-
-putrelv:
-	if rel.Siz != 0 {
-		if rel.Siz != 4 {
-			ctxt.Diag("bad rel")
-			goto bad
-		}
-
-		r := obj.Addrel(ctxt.Cursym)
-		*r = rel
-		r.Off = int32(ctxt.Curp.Pc + int64(-cap(ctxt.Andptr)+cap(ctxt.And[:])))
-	}
-
-	put4(ctxt, v)
-	return
-
-bad:
-	ctxt.Diag("asmand: bad address %v", obj.Dconv(p, a))
-	return
-}
-
-func asmand(ctxt *obj.Link, p *obj.Prog, a *obj.Addr, ra *obj.Addr) {
-	asmandsz(ctxt, p, a, reg[ra.Reg], regrex[ra.Reg], 0)
-}
-
-func asmando(ctxt *obj.Link, p *obj.Prog, a *obj.Addr, o int) {
-	asmandsz(ctxt, p, a, o, 0, 0)
-}
-
-func bytereg(a *obj.Addr, t *uint8) {
-	if a.Type == obj.TYPE_REG && a.Index == REG_NONE && (REG_AX <= a.Reg && a.Reg <= REG_R15) {
-		a.Reg += REG_AL - REG_AX
-		*t = 0
-	}
-}
-
-func unbytereg(a *obj.Addr, t *uint8) {
-	if a.Type == obj.TYPE_REG && a.Index == REG_NONE && (REG_AL <= a.Reg && a.Reg <= REG_R15B) {
-		a.Reg += REG_AX - REG_AL
-		*t = 0
-	}
-}
-
-const (
-	E = 0xff
-)
-
-var ymovtab = []Movtab{
-	/* push */
-	Movtab{APUSHL, Ycs, Ynone, Ynone, 0, [4]uint8{0x0e, E, 0, 0}},
-	Movtab{APUSHL, Yss, Ynone, Ynone, 0, [4]uint8{0x16, E, 0, 0}},
-	Movtab{APUSHL, Yds, Ynone, Ynone, 0, [4]uint8{0x1e, E, 0, 0}},
-	Movtab{APUSHL, Yes, Ynone, Ynone, 0, [4]uint8{0x06, E, 0, 0}},
-	Movtab{APUSHL, Yfs, Ynone, Ynone, 0, [4]uint8{0x0f, 0xa0, E, 0}},
-	Movtab{APUSHL, Ygs, Ynone, Ynone, 0, [4]uint8{0x0f, 0xa8, E, 0}},
-	Movtab{APUSHQ, Yfs, Ynone, Ynone, 0, [4]uint8{0x0f, 0xa0, E, 0}},
-	Movtab{APUSHQ, Ygs, Ynone, Ynone, 0, [4]uint8{0x0f, 0xa8, E, 0}},
-	Movtab{APUSHW, Ycs, Ynone, Ynone, 0, [4]uint8{Pe, 0x0e, E, 0}},
-	Movtab{APUSHW, Yss, Ynone, Ynone, 0, [4]uint8{Pe, 0x16, E, 0}},
-	Movtab{APUSHW, Yds, Ynone, Ynone, 0, [4]uint8{Pe, 0x1e, E, 0}},
-	Movtab{APUSHW, Yes, Ynone, Ynone, 0, [4]uint8{Pe, 0x06, E, 0}},
-	Movtab{APUSHW, Yfs, Ynone, Ynone, 0, [4]uint8{Pe, 0x0f, 0xa0, E}},
-	Movtab{APUSHW, Ygs, Ynone, Ynone, 0, [4]uint8{Pe, 0x0f, 0xa8, E}},
-
-	/* pop */
-	Movtab{APOPL, Ynone, Ynone, Yds, 0, [4]uint8{0x1f, E, 0, 0}},
-	Movtab{APOPL, Ynone, Ynone, Yes, 0, [4]uint8{0x07, E, 0, 0}},
-	Movtab{APOPL, Ynone, Ynone, Yss, 0, [4]uint8{0x17, E, 0, 0}},
-	Movtab{APOPL, Ynone, Ynone, Yfs, 0, [4]uint8{0x0f, 0xa1, E, 0}},
-	Movtab{APOPL, Ynone, Ynone, Ygs, 0, [4]uint8{0x0f, 0xa9, E, 0}},
-	Movtab{APOPQ, Ynone, Ynone, Yfs, 0, [4]uint8{0x0f, 0xa1, E, 0}},
-	Movtab{APOPQ, Ynone, Ynone, Ygs, 0, [4]uint8{0x0f, 0xa9, E, 0}},
-	Movtab{APOPW, Ynone, Ynone, Yds, 0, [4]uint8{Pe, 0x1f, E, 0}},
-	Movtab{APOPW, Ynone, Ynone, Yes, 0, [4]uint8{Pe, 0x07, E, 0}},
-	Movtab{APOPW, Ynone, Ynone, Yss, 0, [4]uint8{Pe, 0x17, E, 0}},
-	Movtab{APOPW, Ynone, Ynone, Yfs, 0, [4]uint8{Pe, 0x0f, 0xa1, E}},
-	Movtab{APOPW, Ynone, Ynone, Ygs, 0, [4]uint8{Pe, 0x0f, 0xa9, E}},
-
-	/* mov seg */
-	Movtab{AMOVW, Yes, Ynone, Yml, 1, [4]uint8{0x8c, 0, 0, 0}},
-	Movtab{AMOVW, Ycs, Ynone, Yml, 1, [4]uint8{0x8c, 1, 0, 0}},
-	Movtab{AMOVW, Yss, Ynone, Yml, 1, [4]uint8{0x8c, 2, 0, 0}},
-	Movtab{AMOVW, Yds, Ynone, Yml, 1, [4]uint8{0x8c, 3, 0, 0}},
-	Movtab{AMOVW, Yfs, Ynone, Yml, 1, [4]uint8{0x8c, 4, 0, 0}},
-	Movtab{AMOVW, Ygs, Ynone, Yml, 1, [4]uint8{0x8c, 5, 0, 0}},
-	Movtab{AMOVW, Yml, Ynone, Yes, 2, [4]uint8{0x8e, 0, 0, 0}},
-	Movtab{AMOVW, Yml, Ynone, Ycs, 2, [4]uint8{0x8e, 1, 0, 0}},
-	Movtab{AMOVW, Yml, Ynone, Yss, 2, [4]uint8{0x8e, 2, 0, 0}},
-	Movtab{AMOVW, Yml, Ynone, Yds, 2, [4]uint8{0x8e, 3, 0, 0}},
-	Movtab{AMOVW, Yml, Ynone, Yfs, 2, [4]uint8{0x8e, 4, 0, 0}},
-	Movtab{AMOVW, Yml, Ynone, Ygs, 2, [4]uint8{0x8e, 5, 0, 0}},
-
-	/* mov cr */
-	Movtab{AMOVL, Ycr0, Ynone, Yml, 3, [4]uint8{0x0f, 0x20, 0, 0}},
-	Movtab{AMOVL, Ycr2, Ynone, Yml, 3, [4]uint8{0x0f, 0x20, 2, 0}},
-	Movtab{AMOVL, Ycr3, Ynone, Yml, 3, [4]uint8{0x0f, 0x20, 3, 0}},
-	Movtab{AMOVL, Ycr4, Ynone, Yml, 3, [4]uint8{0x0f, 0x20, 4, 0}},
-	Movtab{AMOVL, Ycr8, Ynone, Yml, 3, [4]uint8{0x0f, 0x20, 8, 0}},
-	Movtab{AMOVQ, Ycr0, Ynone, Yml, 3, [4]uint8{0x0f, 0x20, 0, 0}},
-	Movtab{AMOVQ, Ycr2, Ynone, Yml, 3, [4]uint8{0x0f, 0x20, 2, 0}},
-	Movtab{AMOVQ, Ycr3, Ynone, Yml, 3, [4]uint8{0x0f, 0x20, 3, 0}},
-	Movtab{AMOVQ, Ycr4, Ynone, Yml, 3, [4]uint8{0x0f, 0x20, 4, 0}},
-	Movtab{AMOVQ, Ycr8, Ynone, Yml, 3, [4]uint8{0x0f, 0x20, 8, 0}},
-	Movtab{AMOVL, Yml, Ynone, Ycr0, 4, [4]uint8{0x0f, 0x22, 0, 0}},
-	Movtab{AMOVL, Yml, Ynone, Ycr2, 4, [4]uint8{0x0f, 0x22, 2, 0}},
-	Movtab{AMOVL, Yml, Ynone, Ycr3, 4, [4]uint8{0x0f, 0x22, 3, 0}},
-	Movtab{AMOVL, Yml, Ynone, Ycr4, 4, [4]uint8{0x0f, 0x22, 4, 0}},
-	Movtab{AMOVL, Yml, Ynone, Ycr8, 4, [4]uint8{0x0f, 0x22, 8, 0}},
-	Movtab{AMOVQ, Yml, Ynone, Ycr0, 4, [4]uint8{0x0f, 0x22, 0, 0}},
-	Movtab{AMOVQ, Yml, Ynone, Ycr2, 4, [4]uint8{0x0f, 0x22, 2, 0}},
-	Movtab{AMOVQ, Yml, Ynone, Ycr3, 4, [4]uint8{0x0f, 0x22, 3, 0}},
-	Movtab{AMOVQ, Yml, Ynone, Ycr4, 4, [4]uint8{0x0f, 0x22, 4, 0}},
-	Movtab{AMOVQ, Yml, Ynone, Ycr8, 4, [4]uint8{0x0f, 0x22, 8, 0}},
-
-	/* mov dr */
-	Movtab{AMOVL, Ydr0, Ynone, Yml, 3, [4]uint8{0x0f, 0x21, 0, 0}},
-	Movtab{AMOVL, Ydr6, Ynone, Yml, 3, [4]uint8{0x0f, 0x21, 6, 0}},
-	Movtab{AMOVL, Ydr7, Ynone, Yml, 3, [4]uint8{0x0f, 0x21, 7, 0}},
-	Movtab{AMOVQ, Ydr0, Ynone, Yml, 3, [4]uint8{0x0f, 0x21, 0, 0}},
-	Movtab{AMOVQ, Ydr6, Ynone, Yml, 3, [4]uint8{0x0f, 0x21, 6, 0}},
-	Movtab{AMOVQ, Ydr7, Ynone, Yml, 3, [4]uint8{0x0f, 0x21, 7, 0}},
-	Movtab{AMOVL, Yml, Ynone, Ydr0, 4, [4]uint8{0x0f, 0x23, 0, 0}},
-	Movtab{AMOVL, Yml, Ynone, Ydr6, 4, [4]uint8{0x0f, 0x23, 6, 0}},
-	Movtab{AMOVL, Yml, Ynone, Ydr7, 4, [4]uint8{0x0f, 0x23, 7, 0}},
-	Movtab{AMOVQ, Yml, Ynone, Ydr0, 4, [4]uint8{0x0f, 0x23, 0, 0}},
-	Movtab{AMOVQ, Yml, Ynone, Ydr6, 4, [4]uint8{0x0f, 0x23, 6, 0}},
-	Movtab{AMOVQ, Yml, Ynone, Ydr7, 4, [4]uint8{0x0f, 0x23, 7, 0}},
-
-	/* mov tr */
-	Movtab{AMOVL, Ytr6, Ynone, Yml, 3, [4]uint8{0x0f, 0x24, 6, 0}},
-	Movtab{AMOVL, Ytr7, Ynone, Yml, 3, [4]uint8{0x0f, 0x24, 7, 0}},
-	Movtab{AMOVL, Yml, Ynone, Ytr6, 4, [4]uint8{0x0f, 0x26, 6, E}},
-	Movtab{AMOVL, Yml, Ynone, Ytr7, 4, [4]uint8{0x0f, 0x26, 7, E}},
-
-	/* lgdt, sgdt, lidt, sidt */
-	Movtab{AMOVL, Ym, Ynone, Ygdtr, 4, [4]uint8{0x0f, 0x01, 2, 0}},
-	Movtab{AMOVL, Ygdtr, Ynone, Ym, 3, [4]uint8{0x0f, 0x01, 0, 0}},
-	Movtab{AMOVL, Ym, Ynone, Yidtr, 4, [4]uint8{0x0f, 0x01, 3, 0}},
-	Movtab{AMOVL, Yidtr, Ynone, Ym, 3, [4]uint8{0x0f, 0x01, 1, 0}},
-	Movtab{AMOVQ, Ym, Ynone, Ygdtr, 4, [4]uint8{0x0f, 0x01, 2, 0}},
-	Movtab{AMOVQ, Ygdtr, Ynone, Ym, 3, [4]uint8{0x0f, 0x01, 0, 0}},
-	Movtab{AMOVQ, Ym, Ynone, Yidtr, 4, [4]uint8{0x0f, 0x01, 3, 0}},
-	Movtab{AMOVQ, Yidtr, Ynone, Ym, 3, [4]uint8{0x0f, 0x01, 1, 0}},
-
-	/* lldt, sldt */
-	Movtab{AMOVW, Yml, Ynone, Yldtr, 4, [4]uint8{0x0f, 0x00, 2, 0}},
-	Movtab{AMOVW, Yldtr, Ynone, Yml, 3, [4]uint8{0x0f, 0x00, 0, 0}},
-
-	/* lmsw, smsw */
-	Movtab{AMOVW, Yml, Ynone, Ymsw, 4, [4]uint8{0x0f, 0x01, 6, 0}},
-	Movtab{AMOVW, Ymsw, Ynone, Yml, 3, [4]uint8{0x0f, 0x01, 4, 0}},
-
-	/* ltr, str */
-	Movtab{AMOVW, Yml, Ynone, Ytask, 4, [4]uint8{0x0f, 0x00, 3, 0}},
-	Movtab{AMOVW, Ytask, Ynone, Yml, 3, [4]uint8{0x0f, 0x00, 1, 0}},
-
-	/* load full pointer - unsupported
-	Movtab{AMOVL, Yml, Ycol, 5, [4]uint8{0, 0, 0, 0}},
-	Movtab{AMOVW, Yml, Ycol, 5, [4]uint8{Pe, 0, 0, 0}},
-	*/
-
-	/* double shift */
-	Movtab{ASHLL, Yi8, Yrl, Yml, 6, [4]uint8{0xa4, 0xa5, 0, 0}},
-	Movtab{ASHLL, Ycl, Yrl, Yml, 6, [4]uint8{0xa4, 0xa5, 0, 0}},
-	Movtab{ASHLL, Ycx, Yrl, Yml, 6, [4]uint8{0xa4, 0xa5, 0, 0}},
-	Movtab{ASHRL, Yi8, Yrl, Yml, 6, [4]uint8{0xac, 0xad, 0, 0}},
-	Movtab{ASHRL, Ycl, Yrl, Yml, 6, [4]uint8{0xac, 0xad, 0, 0}},
-	Movtab{ASHRL, Ycx, Yrl, Yml, 6, [4]uint8{0xac, 0xad, 0, 0}},
-	Movtab{ASHLQ, Yi8, Yrl, Yml, 6, [4]uint8{Pw, 0xa4, 0xa5, 0}},
-	Movtab{ASHLQ, Ycl, Yrl, Yml, 6, [4]uint8{Pw, 0xa4, 0xa5, 0}},
-	Movtab{ASHLQ, Ycx, Yrl, Yml, 6, [4]uint8{Pw, 0xa4, 0xa5, 0}},
-	Movtab{ASHRQ, Yi8, Yrl, Yml, 6, [4]uint8{Pw, 0xac, 0xad, 0}},
-	Movtab{ASHRQ, Ycl, Yrl, Yml, 6, [4]uint8{Pw, 0xac, 0xad, 0}},
-	Movtab{ASHRQ, Ycx, Yrl, Yml, 6, [4]uint8{Pw, 0xac, 0xad, 0}},
-	Movtab{ASHLW, Yi8, Yrl, Yml, 6, [4]uint8{Pe, 0xa4, 0xa5, 0}},
-	Movtab{ASHLW, Ycl, Yrl, Yml, 6, [4]uint8{Pe, 0xa4, 0xa5, 0}},
-	Movtab{ASHLW, Ycx, Yrl, Yml, 6, [4]uint8{Pe, 0xa4, 0xa5, 0}},
-	Movtab{ASHRW, Yi8, Yrl, Yml, 6, [4]uint8{Pe, 0xac, 0xad, 0}},
-	Movtab{ASHRW, Ycl, Yrl, Yml, 6, [4]uint8{Pe, 0xac, 0xad, 0}},
-	Movtab{ASHRW, Ycx, Yrl, Yml, 6, [4]uint8{Pe, 0xac, 0xad, 0}},
-
-	/* load TLS base */
-	Movtab{AMOVL, Ytls, Ynone, Yrl, 7, [4]uint8{0, 0, 0, 0}},
-	Movtab{AMOVQ, Ytls, Ynone, Yrl, 7, [4]uint8{0, 0, 0, 0}},
-	Movtab{0, 0, 0, 0, 0, [4]uint8{}},
-}
-
-func isax(a *obj.Addr) bool {
-	switch a.Reg {
-	case REG_AX, REG_AL, REG_AH:
-		return true
-	}
-
-	if a.Index == REG_AX {
-		return true
-	}
-	return false
-}
-
-func subreg(p *obj.Prog, from int, to int) {
-	if false { /* debug['Q'] */
-		fmt.Printf("\n%v\ts/%v/%v/\n", p, Rconv(from), Rconv(to))
-	}
-
-	if int(p.From.Reg) == from {
-		p.From.Reg = int16(to)
-		p.Ft = 0
-	}
-
-	if int(p.To.Reg) == from {
-		p.To.Reg = int16(to)
-		p.Tt = 0
-	}
-
-	if int(p.From.Index) == from {
-		p.From.Index = int16(to)
-		p.Ft = 0
-	}
-
-	if int(p.To.Index) == from {
-		p.To.Index = int16(to)
-		p.Tt = 0
-	}
-
-	if false { /* debug['Q'] */
-		fmt.Printf("%v\n", p)
-	}
-}
-
-func mediaop(ctxt *obj.Link, o *Optab, op int, osize int, z int) int {
-	switch op {
-	case Pm, Pe, Pf2, Pf3:
-		if osize != 1 {
-			if op != Pm {
-				ctxt.Andptr[0] = byte(op)
-				ctxt.Andptr = ctxt.Andptr[1:]
-			}
-			ctxt.Andptr[0] = Pm
-			ctxt.Andptr = ctxt.Andptr[1:]
-			z++
-			op = int(o.op[z])
-			break
-		}
-		fallthrough
-
-	default:
-		if -cap(ctxt.Andptr) == -cap(ctxt.And) || ctxt.And[-cap(ctxt.Andptr)+cap(ctxt.And[:])-1] != Pm {
-			ctxt.Andptr[0] = Pm
-			ctxt.Andptr = ctxt.Andptr[1:]
-		}
-	}
-
-	ctxt.Andptr[0] = byte(op)
-	ctxt.Andptr = ctxt.Andptr[1:]
-	return z
-}
-
-var bpduff1 = []byte{
-	0x48, 0x89, 0x6c, 0x24, 0xf0, // MOVQ BP, -16(SP)
-	0x48, 0x8d, 0x6c, 0x24, 0xf0, // LEAQ -16(SP), BP
-}
-
-var bpduff2 = []byte{
-	0x48, 0x8b, 0x6d, 0x00, // MOVQ 0(BP), BP
-}
-
-func doasm(ctxt *obj.Link, p *obj.Prog) {
-	ctxt.Curp = p // TODO
-
-	o := opindex[p.As&obj.AMask]
-
-	if o == nil {
-		ctxt.Diag("asmins: missing op %v", p)
-		return
-	}
-
-	pre := prefixof(ctxt, p, &p.From)
-	if pre != 0 {
-		ctxt.Andptr[0] = byte(pre)
-		ctxt.Andptr = ctxt.Andptr[1:]
-	}
-	pre = prefixof(ctxt, p, &p.To)
-	if pre != 0 {
-		ctxt.Andptr[0] = byte(pre)
-		ctxt.Andptr = ctxt.Andptr[1:]
-	}
-
-	// TODO(rsc): This special case is for SHRQ $3, AX:DX,
-	// which encodes as SHRQ $32(DX*0), AX.
-	// Similarly SHRQ CX, AX:DX is really SHRQ CX(DX*0), AX.
-	// Change encoding generated by assemblers and compilers and remove.
-	if (p.From.Type == obj.TYPE_CONST || p.From.Type == obj.TYPE_REG) && p.From.Index != REG_NONE && p.From.Scale == 0 {
-		p.From3 = new(obj.Addr)
-		p.From3.Type = obj.TYPE_REG
-		p.From3.Reg = p.From.Index
-		p.From.Index = 0
-	}
-
-	// TODO(rsc): This special case is for PINSRQ etc, CMPSD etc.
-	// Change encoding generated by assemblers and compilers (if any) and remove.
-	switch p.As {
-	case AIMUL3Q, APEXTRW, APINSRW, APINSRD, APINSRQ, APSHUFHW, APSHUFL, APSHUFW, ASHUFPD, ASHUFPS, AAESKEYGENASSIST, APSHUFD, APCLMULQDQ:
-		if p.From3Type() == obj.TYPE_NONE {
-			p.From3 = new(obj.Addr)
-			*p.From3 = p.From
-			p.From = obj.Addr{}
-			p.From.Type = obj.TYPE_CONST
-			p.From.Offset = p.To.Offset
-			p.To.Offset = 0
-		}
-	case ACMPSD, ACMPSS, ACMPPS, ACMPPD:
-		if p.From3Type() == obj.TYPE_NONE {
-			p.From3 = new(obj.Addr)
-			*p.From3 = p.To
-			p.To = obj.Addr{}
-			p.To.Type = obj.TYPE_CONST
-			p.To.Offset = p.From3.Offset
-			p.From3.Offset = 0
-		}
-	}
-
-	if p.Ft == 0 {
-		p.Ft = uint8(oclass(ctxt, p, &p.From))
-	}
-	if p.Tt == 0 {
-		p.Tt = uint8(oclass(ctxt, p, &p.To))
-	}
-
-	ft := int(p.Ft) * Ymax
-	f3t := Ynone * Ymax
-	if p.From3 != nil {
-		f3t = oclass(ctxt, p, p.From3) * Ymax
-	}
-	tt := int(p.Tt) * Ymax
-
-	xo := obj.Bool2int(o.op[0] == 0x0f)
-	z := 0
-	var a *obj.Addr
-	var l int
-	var op int
-	var q *obj.Prog
-	var r *obj.Reloc
-	var rel obj.Reloc
-	var v int64
-	for i := range o.ytab {
-		yt := &o.ytab[i]
-		if ycover[ft+int(yt.from)] != 0 && ycover[f3t+int(yt.from3)] != 0 && ycover[tt+int(yt.to)] != 0 {
-			switch o.prefix {
-			case Px1: /* first option valid only in 32-bit mode */
-				if ctxt.Mode == 64 && z == 0 {
-					z += int(yt.zoffset) + xo
-					continue
-				}
-			case Pq: /* 16 bit escape and opcode escape */
-				ctxt.Andptr[0] = Pe
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-				ctxt.Andptr[0] = Pm
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-			case Pq3: /* 16 bit escape, Rex.w, and opcode escape */
-				ctxt.Andptr[0] = Pe
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-				ctxt.Andptr[0] = Pw
-				ctxt.Andptr = ctxt.Andptr[1:]
-				ctxt.Andptr[0] = Pm
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-			case Pf2, /* xmm opcode escape */
-				Pf3:
-				ctxt.Andptr[0] = byte(o.prefix)
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-				ctxt.Andptr[0] = Pm
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-			case Pm: /* opcode escape */
-				ctxt.Andptr[0] = Pm
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-			case Pe: /* 16 bit escape */
-				ctxt.Andptr[0] = Pe
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-			case Pw: /* 64-bit escape */
-				if p.Mode != 64 {
-					ctxt.Diag("asmins: illegal 64: %v", p)
-				}
-				ctxt.Rexflag |= Pw
-
-			case Pw8: /* 64-bit escape if z >= 8 */
-				if z >= 8 {
-					if p.Mode != 64 {
-						ctxt.Diag("asmins: illegal 64: %v", p)
-					}
-					ctxt.Rexflag |= Pw
-				}
-
-			case Pb: /* botch */
-				if p.Mode != 64 && (isbadbyte(&p.From) || isbadbyte(&p.To)) {
-					goto bad
-				}
-				// NOTE(rsc): This is probably safe to do always,
-				// but when enabled it chooses different encodings
-				// than the old cmd/internal/obj/i386 code did,
-				// which breaks our "same bits out" checks.
-				// In particular, CMPB AX, $0 encodes as 80 f8 00
-				// in the original obj/i386, and it would encode
-				// (using a valid, shorter form) as 3c 00 if we enabled
-				// the call to bytereg here.
-				if p.Mode == 64 {
-					bytereg(&p.From, &p.Ft)
-					bytereg(&p.To, &p.Tt)
-				}
-
-			case P32: /* 32 bit but illegal if 64-bit mode */
-				if p.Mode == 64 {
-					ctxt.Diag("asmins: illegal in 64-bit mode: %v", p)
-				}
-
-			case Py: /* 64-bit only, no prefix */
-				if p.Mode != 64 {
-					ctxt.Diag("asmins: illegal in %d-bit mode: %v", p.Mode, p)
-				}
-
-			case Py1: /* 64-bit only if z < 1, no prefix */
-				if z < 1 && p.Mode != 64 {
-					ctxt.Diag("asmins: illegal in %d-bit mode: %v", p.Mode, p)
-				}
-
-			case Py3: /* 64-bit only if z < 3, no prefix */
-				if z < 3 && p.Mode != 64 {
-					ctxt.Diag("asmins: illegal in %d-bit mode: %v", p.Mode, p)
-				}
-			}
-
-			if z >= len(o.op) {
-				log.Fatalf("asmins bad table %v", p)
-			}
-			op = int(o.op[z])
-			if op == 0x0f {
-				ctxt.Andptr[0] = byte(op)
-				ctxt.Andptr = ctxt.Andptr[1:]
-				z++
-				op = int(o.op[z])
-			}
-
-			switch yt.zcase {
-			default:
-				ctxt.Diag("asmins: unknown z %d %v", yt.zcase, p)
-				return
-
-			case Zpseudo:
-				break
-
-			case Zlit:
-				for ; ; z++ {
-					op = int(o.op[z])
-					if op == 0 {
-						break
-					}
-					ctxt.Andptr[0] = byte(op)
-					ctxt.Andptr = ctxt.Andptr[1:]
-				}
-
-			case Zlitm_r:
-				for ; ; z++ {
-					op = int(o.op[z])
-					if op == 0 {
-						break
-					}
-					ctxt.Andptr[0] = byte(op)
-					ctxt.Andptr = ctxt.Andptr[1:]
-				}
-				asmand(ctxt, p, &p.From, &p.To)
-
-			case Zmb_r:
-				bytereg(&p.From, &p.Ft)
-				fallthrough
-
-				/* fall through */
-			case Zm_r:
-				ctxt.Andptr[0] = byte(op)
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-				asmand(ctxt, p, &p.From, &p.To)
-
-			case Zm2_r:
-				ctxt.Andptr[0] = byte(op)
-				ctxt.Andptr = ctxt.Andptr[1:]
-				ctxt.Andptr[0] = byte(o.op[z+1])
-				ctxt.Andptr = ctxt.Andptr[1:]
-				asmand(ctxt, p, &p.From, &p.To)
-
-			case Zm_r_xm:
-				mediaop(ctxt, o, op, int(yt.zoffset), z)
-				asmand(ctxt, p, &p.From, &p.To)
-
-			case Zm_r_xm_nr:
-				ctxt.Rexflag = 0
-				mediaop(ctxt, o, op, int(yt.zoffset), z)
-				asmand(ctxt, p, &p.From, &p.To)
-
-			case Zm_r_i_xm:
-				mediaop(ctxt, o, op, int(yt.zoffset), z)
-				asmand(ctxt, p, &p.From, p.From3)
-				ctxt.Andptr[0] = byte(p.To.Offset)
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-			case Zm_r_3d:
-				ctxt.Andptr[0] = 0x0f
-				ctxt.Andptr = ctxt.Andptr[1:]
-				ctxt.Andptr[0] = 0x0f
-				ctxt.Andptr = ctxt.Andptr[1:]
-				asmand(ctxt, p, &p.From, &p.To)
-				ctxt.Andptr[0] = byte(op)
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-			case Zibm_r:
-				for {
-					tmp1 := z
-					z++
-					op = int(o.op[tmp1])
-					if op == 0 {
-						break
-					}
-					ctxt.Andptr[0] = byte(op)
-					ctxt.Andptr = ctxt.Andptr[1:]
-				}
-				asmand(ctxt, p, p.From3, &p.To)
-				ctxt.Andptr[0] = byte(p.From.Offset)
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-			case Zaut_r:
-				ctxt.Andptr[0] = 0x8d
-				ctxt.Andptr = ctxt.Andptr[1:] /* leal */
-				if p.From.Type != obj.TYPE_ADDR {
-					ctxt.Diag("asmins: Zaut sb type ADDR")
-				}
-				p.From.Type = obj.TYPE_MEM
-				asmand(ctxt, p, &p.From, &p.To)
-				p.From.Type = obj.TYPE_ADDR
-
-			case Zm_o:
-				ctxt.Andptr[0] = byte(op)
-				ctxt.Andptr = ctxt.Andptr[1:]
-				asmando(ctxt, p, &p.From, int(o.op[z+1]))
-
-			case Zr_m:
-				ctxt.Andptr[0] = byte(op)
-				ctxt.Andptr = ctxt.Andptr[1:]
-				asmand(ctxt, p, &p.To, &p.From)
-
-			case Zr_m_xm:
-				mediaop(ctxt, o, op, int(yt.zoffset), z)
-				asmand(ctxt, p, &p.To, &p.From)
-
-			case Zr_m_xm_nr:
-				ctxt.Rexflag = 0
-				mediaop(ctxt, o, op, int(yt.zoffset), z)
-				asmand(ctxt, p, &p.To, &p.From)
-
-			case Zo_m:
-				ctxt.Andptr[0] = byte(op)
-				ctxt.Andptr = ctxt.Andptr[1:]
-				asmando(ctxt, p, &p.To, int(o.op[z+1]))
-
-			case Zcallindreg:
-				r = obj.Addrel(ctxt.Cursym)
-				r.Off = int32(p.Pc)
-				r.Type = obj.R_CALLIND
-				r.Siz = 0
-				fallthrough
-
-			case Zo_m64:
-				ctxt.Andptr[0] = byte(op)
-				ctxt.Andptr = ctxt.Andptr[1:]
-				asmandsz(ctxt, p, &p.To, int(o.op[z+1]), 0, 1)
-
-			case Zm_ibo:
-				ctxt.Andptr[0] = byte(op)
-				ctxt.Andptr = ctxt.Andptr[1:]
-				asmando(ctxt, p, &p.From, int(o.op[z+1]))
-				ctxt.Andptr[0] = byte(vaddr(ctxt, p, &p.To, nil))
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-			case Zibo_m:
-				ctxt.Andptr[0] = byte(op)
-				ctxt.Andptr = ctxt.Andptr[1:]
-				asmando(ctxt, p, &p.To, int(o.op[z+1]))
-				ctxt.Andptr[0] = byte(vaddr(ctxt, p, &p.From, nil))
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-			case Zibo_m_xm:
-				z = mediaop(ctxt, o, op, int(yt.zoffset), z)
-				asmando(ctxt, p, &p.To, int(o.op[z+1]))
-				ctxt.Andptr[0] = byte(vaddr(ctxt, p, &p.From, nil))
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-			case Z_ib, Zib_:
-				if yt.zcase == Zib_ {
-					a = &p.From
-				} else {
-					a = &p.To
-				}
-				ctxt.Andptr[0] = byte(op)
-				ctxt.Andptr = ctxt.Andptr[1:]
-				ctxt.Andptr[0] = byte(vaddr(ctxt, p, a, nil))
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-			case Zib_rp:
-				ctxt.Rexflag |= regrex[p.To.Reg] & (Rxb | 0x40)
-				ctxt.Andptr[0] = byte(op + reg[p.To.Reg])
-				ctxt.Andptr = ctxt.Andptr[1:]
-				ctxt.Andptr[0] = byte(vaddr(ctxt, p, &p.From, nil))
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-			case Zil_rp:
-				ctxt.Rexflag |= regrex[p.To.Reg] & Rxb
-				ctxt.Andptr[0] = byte(op + reg[p.To.Reg])
-				ctxt.Andptr = ctxt.Andptr[1:]
-				if o.prefix == Pe {
-					v = vaddr(ctxt, p, &p.From, nil)
-					ctxt.Andptr[0] = byte(v)
-					ctxt.Andptr = ctxt.Andptr[1:]
-					ctxt.Andptr[0] = byte(v >> 8)
-					ctxt.Andptr = ctxt.Andptr[1:]
-				} else {
-					relput4(ctxt, p, &p.From)
-				}
-
-			case Zo_iw:
-				ctxt.Andptr[0] = byte(op)
-				ctxt.Andptr = ctxt.Andptr[1:]
-				if p.From.Type != obj.TYPE_NONE {
-					v = vaddr(ctxt, p, &p.From, nil)
-					ctxt.Andptr[0] = byte(v)
-					ctxt.Andptr = ctxt.Andptr[1:]
-					ctxt.Andptr[0] = byte(v >> 8)
-					ctxt.Andptr = ctxt.Andptr[1:]
-				}
-
-			case Ziq_rp:
-				v = vaddr(ctxt, p, &p.From, &rel)
-				l = int(v >> 32)
-				if l == 0 && rel.Siz != 8 {
-					//p->mark |= 0100;
-					//print("zero: %llux %v\n", v, p);
-					ctxt.Rexflag &^= (0x40 | Rxw)
-
-					ctxt.Rexflag |= regrex[p.To.Reg] & Rxb
-					ctxt.Andptr[0] = byte(0xb8 + reg[p.To.Reg])
-					ctxt.Andptr = ctxt.Andptr[1:]
-					if rel.Type != 0 {
-						r = obj.Addrel(ctxt.Cursym)
-						*r = rel
-						r.Off = int32(p.Pc + int64(-cap(ctxt.Andptr)+cap(ctxt.And[:])))
-					}
-
-					put4(ctxt, int32(v))
-				} else if l == -1 && uint64(v)&(uint64(1)<<31) != 0 { /* sign extend */
-
-					//p->mark |= 0100;
-					//print("sign: %llux %v\n", v, p);
-					ctxt.Andptr[0] = 0xc7
-					ctxt.Andptr = ctxt.Andptr[1:]
-
-					asmando(ctxt, p, &p.To, 0)
-					put4(ctxt, int32(v)) /* need all 8 */
-				} else {
-					//print("all: %llux %v\n", v, p);
-					ctxt.Rexflag |= regrex[p.To.Reg] & Rxb
-
-					ctxt.Andptr[0] = byte(op + reg[p.To.Reg])
-					ctxt.Andptr = ctxt.Andptr[1:]
-					if rel.Type != 0 {
-						r = obj.Addrel(ctxt.Cursym)
-						*r = rel
-						r.Off = int32(p.Pc + int64(-cap(ctxt.Andptr)+cap(ctxt.And[:])))
-					}
-
-					put8(ctxt, v)
-				}
-
-			case Zib_rr:
-				ctxt.Andptr[0] = byte(op)
-				ctxt.Andptr = ctxt.Andptr[1:]
-				asmand(ctxt, p, &p.To, &p.To)
-				ctxt.Andptr[0] = byte(vaddr(ctxt, p, &p.From, nil))
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-			case Z_il, Zil_:
-				if yt.zcase == Zil_ {
-					a = &p.From
-				} else {
-					a = &p.To
-				}
-				ctxt.Andptr[0] = byte(op)
-				ctxt.Andptr = ctxt.Andptr[1:]
-				if o.prefix == Pe {
-					v = vaddr(ctxt, p, a, nil)
-					ctxt.Andptr[0] = byte(v)
-					ctxt.Andptr = ctxt.Andptr[1:]
-					ctxt.Andptr[0] = byte(v >> 8)
-					ctxt.Andptr = ctxt.Andptr[1:]
-				} else {
-					relput4(ctxt, p, a)
-				}
-
-			case Zm_ilo, Zilo_m:
-				ctxt.Andptr[0] = byte(op)
-				ctxt.Andptr = ctxt.Andptr[1:]
-				if yt.zcase == Zilo_m {
-					a = &p.From
-					asmando(ctxt, p, &p.To, int(o.op[z+1]))
-				} else {
-					a = &p.To
-					asmando(ctxt, p, &p.From, int(o.op[z+1]))
-				}
-
-				if o.prefix == Pe {
-					v = vaddr(ctxt, p, a, nil)
-					ctxt.Andptr[0] = byte(v)
-					ctxt.Andptr = ctxt.Andptr[1:]
-					ctxt.Andptr[0] = byte(v >> 8)
-					ctxt.Andptr = ctxt.Andptr[1:]
-				} else {
-					relput4(ctxt, p, a)
-				}
-
-			case Zil_rr:
-				ctxt.Andptr[0] = byte(op)
-				ctxt.Andptr = ctxt.Andptr[1:]
-				asmand(ctxt, p, &p.To, &p.To)
-				if o.prefix == Pe {
-					v = vaddr(ctxt, p, &p.From, nil)
-					ctxt.Andptr[0] = byte(v)
-					ctxt.Andptr = ctxt.Andptr[1:]
-					ctxt.Andptr[0] = byte(v >> 8)
-					ctxt.Andptr = ctxt.Andptr[1:]
-				} else {
-					relput4(ctxt, p, &p.From)
-				}
-
-			case Z_rp:
-				ctxt.Rexflag |= regrex[p.To.Reg] & (Rxb | 0x40)
-				ctxt.Andptr[0] = byte(op + reg[p.To.Reg])
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-			case Zrp_:
-				ctxt.Rexflag |= regrex[p.From.Reg] & (Rxb | 0x40)
-				ctxt.Andptr[0] = byte(op + reg[p.From.Reg])
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-			case Zclr:
-				ctxt.Rexflag &^= Pw
-				ctxt.Andptr[0] = byte(op)
-				ctxt.Andptr = ctxt.Andptr[1:]
-				asmand(ctxt, p, &p.To, &p.To)
-
-			case Zcallcon, Zjmpcon:
-				if yt.zcase == Zcallcon {
-					ctxt.Andptr[0] = byte(op)
-					ctxt.Andptr = ctxt.Andptr[1:]
-				} else {
-					ctxt.Andptr[0] = byte(o.op[z+1])
-					ctxt.Andptr = ctxt.Andptr[1:]
-				}
-				r = obj.Addrel(ctxt.Cursym)
-				r.Off = int32(p.Pc + int64(-cap(ctxt.Andptr)+cap(ctxt.And[:])))
-				r.Type = obj.R_PCREL
-				r.Siz = 4
-				r.Add = p.To.Offset
-				put4(ctxt, 0)
-
-			case Zcallind:
-				ctxt.Andptr[0] = byte(op)
-				ctxt.Andptr = ctxt.Andptr[1:]
-				ctxt.Andptr[0] = byte(o.op[z+1])
-				ctxt.Andptr = ctxt.Andptr[1:]
-				r = obj.Addrel(ctxt.Cursym)
-				r.Off = int32(p.Pc + int64(-cap(ctxt.Andptr)+cap(ctxt.And[:])))
-				r.Type = obj.R_ADDR
-				r.Siz = 4
-				r.Add = p.To.Offset
-				r.Sym = p.To.Sym
-				put4(ctxt, 0)
-
-			case Zcall, Zcallduff:
-				if p.To.Sym == nil {
-					ctxt.Diag("call without target")
-					log.Fatalf("bad code")
-				}
-
-				if yt.zcase == Zcallduff && ctxt.Flag_dynlink {
-					ctxt.Diag("directly calling duff when dynamically linking Go")
-				}
-
-				if obj.Framepointer_enabled != 0 && yt.zcase == Zcallduff && p.Mode == 64 {
-					// Maintain BP around call, since duffcopy/duffzero can't do it
-					// (the call jumps into the middle of the function).
-					// This makes it possible to see call sites for duffcopy/duffzero in
-					// BP-based profiling tools like Linux perf (which is the
-					// whole point of obj.Framepointer_enabled).
-					// MOVQ BP, -16(SP)
-					// LEAQ -16(SP), BP
-					copy(ctxt.Andptr, bpduff1)
-					ctxt.Andptr = ctxt.Andptr[len(bpduff1):]
-				}
-				ctxt.Andptr[0] = byte(op)
-				ctxt.Andptr = ctxt.Andptr[1:]
-				r = obj.Addrel(ctxt.Cursym)
-				r.Off = int32(p.Pc + int64(-cap(ctxt.Andptr)+cap(ctxt.And[:])))
-				r.Sym = p.To.Sym
-				r.Add = p.To.Offset
-				r.Type = obj.R_CALL
-				r.Siz = 4
-				put4(ctxt, 0)
-
-				if obj.Framepointer_enabled != 0 && yt.zcase == Zcallduff && p.Mode == 64 {
-					// Pop BP pushed above.
-					// MOVQ 0(BP), BP
-					copy(ctxt.Andptr, bpduff2)
-					ctxt.Andptr = ctxt.Andptr[len(bpduff2):]
-				}
-
-			// TODO: jump across functions needs reloc
-			case Zbr, Zjmp, Zloop:
-				if p.To.Sym != nil {
-					if yt.zcase != Zjmp {
-						ctxt.Diag("branch to ATEXT")
-						log.Fatalf("bad code")
-					}
-
-					ctxt.Andptr[0] = byte(o.op[z+1])
-					ctxt.Andptr = ctxt.Andptr[1:]
-					r = obj.Addrel(ctxt.Cursym)
-					r.Off = int32(p.Pc + int64(-cap(ctxt.Andptr)+cap(ctxt.And[:])))
-					r.Sym = p.To.Sym
-					r.Type = obj.R_PCREL
-					r.Siz = 4
-					put4(ctxt, 0)
-					break
-				}
-
-				// Assumes q is in this function.
-				// TODO: Check in input, preserve in brchain.
-
-				// Fill in backward jump now.
-				q = p.Pcond
-
-				if q == nil {
-					ctxt.Diag("jmp/branch/loop without target")
-					log.Fatalf("bad code")
-				}
-
-				if p.Back&1 != 0 {
-					v = q.Pc - (p.Pc + 2)
-					if v >= -128 {
-						if p.As == AJCXZL {
-							ctxt.Andptr[0] = 0x67
-							ctxt.Andptr = ctxt.Andptr[1:]
-						}
-						ctxt.Andptr[0] = byte(op)
-						ctxt.Andptr = ctxt.Andptr[1:]
-						ctxt.Andptr[0] = byte(v)
-						ctxt.Andptr = ctxt.Andptr[1:]
-					} else if yt.zcase == Zloop {
-						ctxt.Diag("loop too far: %v", p)
-					} else {
-						v -= 5 - 2
-						if yt.zcase == Zbr {
-							ctxt.Andptr[0] = 0x0f
-							ctxt.Andptr = ctxt.Andptr[1:]
-							v--
-						}
-
-						ctxt.Andptr[0] = byte(o.op[z+1])
-						ctxt.Andptr = ctxt.Andptr[1:]
-						ctxt.Andptr[0] = byte(v)
-						ctxt.Andptr = ctxt.Andptr[1:]
-						ctxt.Andptr[0] = byte(v >> 8)
-						ctxt.Andptr = ctxt.Andptr[1:]
-						ctxt.Andptr[0] = byte(v >> 16)
-						ctxt.Andptr = ctxt.Andptr[1:]
-						ctxt.Andptr[0] = byte(v >> 24)
-						ctxt.Andptr = ctxt.Andptr[1:]
-					}
-
-					break
-				}
-
-				// Annotate target; will fill in later.
-				p.Forwd = q.Rel
-
-				q.Rel = p
-				if p.Back&2 != 0 { // short
-					if p.As == AJCXZL {
-						ctxt.Andptr[0] = 0x67
-						ctxt.Andptr = ctxt.Andptr[1:]
-					}
-					ctxt.Andptr[0] = byte(op)
-					ctxt.Andptr = ctxt.Andptr[1:]
-					ctxt.Andptr[0] = 0
-					ctxt.Andptr = ctxt.Andptr[1:]
-				} else if yt.zcase == Zloop {
-					ctxt.Diag("loop too far: %v", p)
-				} else {
-					if yt.zcase == Zbr {
-						ctxt.Andptr[0] = 0x0f
-						ctxt.Andptr = ctxt.Andptr[1:]
-					}
-					ctxt.Andptr[0] = byte(o.op[z+1])
-					ctxt.Andptr = ctxt.Andptr[1:]
-					ctxt.Andptr[0] = 0
-					ctxt.Andptr = ctxt.Andptr[1:]
-					ctxt.Andptr[0] = 0
-					ctxt.Andptr = ctxt.Andptr[1:]
-					ctxt.Andptr[0] = 0
-					ctxt.Andptr = ctxt.Andptr[1:]
-					ctxt.Andptr[0] = 0
-					ctxt.Andptr = ctxt.Andptr[1:]
-				}
-
-				break
-
-			/*
-				v = q->pc - p->pc - 2;
-				if((v >= -128 && v <= 127) || p->pc == -1 || q->pc == -1) {
-					*ctxt->andptr++ = op;
-					*ctxt->andptr++ = v;
-				} else {
-					v -= 5-2;
-					if(yt.zcase == Zbr) {
-						*ctxt->andptr++ = 0x0f;
-						v--;
-					}
-					*ctxt->andptr++ = o->op[z+1];
-					*ctxt->andptr++ = v;
-					*ctxt->andptr++ = v>>8;
-					*ctxt->andptr++ = v>>16;
-					*ctxt->andptr++ = v>>24;
-				}
-			*/
-
-			case Zbyte:
-				v = vaddr(ctxt, p, &p.From, &rel)
-				if rel.Siz != 0 {
-					rel.Siz = uint8(op)
-					r = obj.Addrel(ctxt.Cursym)
-					*r = rel
-					r.Off = int32(p.Pc + int64(-cap(ctxt.Andptr)+cap(ctxt.And[:])))
-				}
-
-				ctxt.Andptr[0] = byte(v)
-				ctxt.Andptr = ctxt.Andptr[1:]
-				if op > 1 {
-					ctxt.Andptr[0] = byte(v >> 8)
-					ctxt.Andptr = ctxt.Andptr[1:]
-					if op > 2 {
-						ctxt.Andptr[0] = byte(v >> 16)
-						ctxt.Andptr = ctxt.Andptr[1:]
-						ctxt.Andptr[0] = byte(v >> 24)
-						ctxt.Andptr = ctxt.Andptr[1:]
-						if op > 4 {
-							ctxt.Andptr[0] = byte(v >> 32)
-							ctxt.Andptr = ctxt.Andptr[1:]
-							ctxt.Andptr[0] = byte(v >> 40)
-							ctxt.Andptr = ctxt.Andptr[1:]
-							ctxt.Andptr[0] = byte(v >> 48)
-							ctxt.Andptr = ctxt.Andptr[1:]
-							ctxt.Andptr[0] = byte(v >> 56)
-							ctxt.Andptr = ctxt.Andptr[1:]
-						}
-					}
-				}
-			}
-
-			return
-		}
-		z += int(yt.zoffset) + xo
-	}
-	for mo := ymovtab; mo[0].as != 0; mo = mo[1:] {
-		var pp obj.Prog
-		var t []byte
-		if p.As == mo[0].as {
-			if ycover[ft+int(mo[0].ft)] != 0 && ycover[f3t+int(mo[0].f3t)] != 0 && ycover[tt+int(mo[0].tt)] != 0 {
-				t = mo[0].op[:]
-				switch mo[0].code {
-				default:
-					ctxt.Diag("asmins: unknown mov %d %v", mo[0].code, p)
-
-				case 0: /* lit */
-					for z = 0; t[z] != E; z++ {
-						ctxt.Andptr[0] = t[z]
-						ctxt.Andptr = ctxt.Andptr[1:]
-					}
-
-				case 1: /* r,m */
-					ctxt.Andptr[0] = t[0]
-					ctxt.Andptr = ctxt.Andptr[1:]
-
-					asmando(ctxt, p, &p.To, int(t[1]))
-
-				case 2: /* m,r */
-					ctxt.Andptr[0] = t[0]
-					ctxt.Andptr = ctxt.Andptr[1:]
-
-					asmando(ctxt, p, &p.From, int(t[1]))
-
-				case 3: /* r,m - 2op */
-					ctxt.Andptr[0] = t[0]
-					ctxt.Andptr = ctxt.Andptr[1:]
-
-					ctxt.Andptr[0] = t[1]
-					ctxt.Andptr = ctxt.Andptr[1:]
-					asmando(ctxt, p, &p.To, int(t[2]))
-					ctxt.Rexflag |= regrex[p.From.Reg] & (Rxr | 0x40)
-
-				case 4: /* m,r - 2op */
-					ctxt.Andptr[0] = t[0]
-					ctxt.Andptr = ctxt.Andptr[1:]
-
-					ctxt.Andptr[0] = t[1]
-					ctxt.Andptr = ctxt.Andptr[1:]
-					asmando(ctxt, p, &p.From, int(t[2]))
-					ctxt.Rexflag |= regrex[p.To.Reg] & (Rxr | 0x40)
-
-				case 5: /* load full pointer, trash heap */
-					if t[0] != 0 {
-						ctxt.Andptr[0] = t[0]
-						ctxt.Andptr = ctxt.Andptr[1:]
-					}
-					switch p.To.Index {
-					default:
-						goto bad
-
-					case REG_DS:
-						ctxt.Andptr[0] = 0xc5
-						ctxt.Andptr = ctxt.Andptr[1:]
-
-					case REG_SS:
-						ctxt.Andptr[0] = 0x0f
-						ctxt.Andptr = ctxt.Andptr[1:]
-						ctxt.Andptr[0] = 0xb2
-						ctxt.Andptr = ctxt.Andptr[1:]
-
-					case REG_ES:
-						ctxt.Andptr[0] = 0xc4
-						ctxt.Andptr = ctxt.Andptr[1:]
-
-					case REG_FS:
-						ctxt.Andptr[0] = 0x0f
-						ctxt.Andptr = ctxt.Andptr[1:]
-						ctxt.Andptr[0] = 0xb4
-						ctxt.Andptr = ctxt.Andptr[1:]
-
-					case REG_GS:
-						ctxt.Andptr[0] = 0x0f
-						ctxt.Andptr = ctxt.Andptr[1:]
-						ctxt.Andptr[0] = 0xb5
-						ctxt.Andptr = ctxt.Andptr[1:]
-					}
-
-					asmand(ctxt, p, &p.From, &p.To)
-
-				case 6: /* double shift */
-					if t[0] == Pw {
-						if p.Mode != 64 {
-							ctxt.Diag("asmins: illegal 64: %v", p)
-						}
-						ctxt.Rexflag |= Pw
-						t = t[1:]
-					} else if t[0] == Pe {
-						ctxt.Andptr[0] = Pe
-						ctxt.Andptr = ctxt.Andptr[1:]
-						t = t[1:]
-					}
-
-					switch p.From.Type {
-					default:
-						goto bad
-
-					case obj.TYPE_CONST:
-						ctxt.Andptr[0] = 0x0f
-						ctxt.Andptr = ctxt.Andptr[1:]
-						ctxt.Andptr[0] = t[0]
-						ctxt.Andptr = ctxt.Andptr[1:]
-						asmandsz(ctxt, p, &p.To, reg[p.From3.Reg], regrex[p.From3.Reg], 0)
-						ctxt.Andptr[0] = byte(p.From.Offset)
-						ctxt.Andptr = ctxt.Andptr[1:]
-
-					case obj.TYPE_REG:
-						switch p.From.Reg {
-						default:
-							goto bad
-
-						case REG_CL, REG_CX:
-							ctxt.Andptr[0] = 0x0f
-							ctxt.Andptr = ctxt.Andptr[1:]
-							ctxt.Andptr[0] = t[1]
-							ctxt.Andptr = ctxt.Andptr[1:]
-							asmandsz(ctxt, p, &p.To, reg[p.From3.Reg], regrex[p.From3.Reg], 0)
-						}
-					}
-
-				// NOTE: The systems listed here are the ones that use the "TLS initial exec" model,
-				// where you load the TLS base register into a register and then index off that
-				// register to access the actual TLS variables. Systems that allow direct TLS access
-				// are handled in prefixof above and should not be listed here.
-				case 7: /* mov tls, r */
-					if p.Mode == 64 && p.As != AMOVQ || p.Mode == 32 && p.As != AMOVL {
-						ctxt.Diag("invalid load of TLS: %v", p)
-					}
-
-					if p.Mode == 32 {
-						// NOTE: The systems listed here are the ones that use the "TLS initial exec" model,
-						// where you load the TLS base register into a register and then index off that
-						// register to access the actual TLS variables. Systems that allow direct TLS access
-						// are handled in prefixof above and should not be listed here.
-						switch ctxt.Headtype {
-						default:
-							log.Fatalf("unknown TLS base location for %s", obj.Headstr(ctxt.Headtype))
-
-						case obj.Hlinux,
-							obj.Hnacl:
-							// ELF TLS base is 0(GS).
-							pp.From = p.From
-
-							pp.From.Type = obj.TYPE_MEM
-							pp.From.Reg = REG_GS
-							pp.From.Offset = 0
-							pp.From.Index = REG_NONE
-							pp.From.Scale = 0
-							ctxt.Andptr[0] = 0x65
-							ctxt.Andptr = ctxt.Andptr[1:] // GS
-							ctxt.Andptr[0] = 0x8B
-							ctxt.Andptr = ctxt.Andptr[1:]
-							asmand(ctxt, p, &pp.From, &p.To)
-
-						case obj.Hplan9:
-							if ctxt.Plan9privates == nil {
-								ctxt.Plan9privates = obj.Linklookup(ctxt, "_privates", 0)
-							}
-							pp.From = obj.Addr{}
-							pp.From.Type = obj.TYPE_MEM
-							pp.From.Name = obj.NAME_EXTERN
-							pp.From.Sym = ctxt.Plan9privates
-							pp.From.Offset = 0
-							pp.From.Index = REG_NONE
-							ctxt.Andptr[0] = 0x8B
-							ctxt.Andptr = ctxt.Andptr[1:]
-							asmand(ctxt, p, &pp.From, &p.To)
-
-						case obj.Hwindows:
-							// Windows TLS base is always 0x14(FS).
-							pp.From = p.From
-
-							pp.From.Type = obj.TYPE_MEM
-							pp.From.Reg = REG_FS
-							pp.From.Offset = 0x14
-							pp.From.Index = REG_NONE
-							pp.From.Scale = 0
-							ctxt.Andptr[0] = 0x64
-							ctxt.Andptr = ctxt.Andptr[1:] // FS
-							ctxt.Andptr[0] = 0x8B
-							ctxt.Andptr = ctxt.Andptr[1:]
-							asmand(ctxt, p, &pp.From, &p.To)
-						}
-						break
-					}
-
-					switch ctxt.Headtype {
-					default:
-						log.Fatalf("unknown TLS base location for %s", obj.Headstr(ctxt.Headtype))
-
-					case obj.Hlinux:
-						if ctxt.Flag_shared == 0 {
-							log.Fatalf("unknown TLS base location for linux without -shared")
-						}
-						// Note that this is not generating the same insn as the other cases.
-						//     MOV TLS, R_to
-						// becomes
-						//     movq g at gottpoff(%rip), R_to
-						// which is encoded as
-						//     movq 0(%rip), R_to
-						// and a R_TLS_IE reloc. This all assumes the only tls variable we access
-						// is g, which we can't check here, but will when we assemble the second
-						// instruction.
-						ctxt.Rexflag = Pw | (regrex[p.To.Reg] & Rxr)
-
-						ctxt.Andptr[0] = 0x8B
-						ctxt.Andptr = ctxt.Andptr[1:]
-						ctxt.Andptr[0] = byte(0x05 | (reg[p.To.Reg] << 3))
-						ctxt.Andptr = ctxt.Andptr[1:]
-						r = obj.Addrel(ctxt.Cursym)
-						r.Off = int32(p.Pc + int64(-cap(ctxt.Andptr)+cap(ctxt.And[:])))
-						r.Type = obj.R_TLS_IE
-						r.Siz = 4
-						r.Add = -4
-						put4(ctxt, 0)
-
-					case obj.Hplan9:
-						if ctxt.Plan9privates == nil {
-							ctxt.Plan9privates = obj.Linklookup(ctxt, "_privates", 0)
-						}
-						pp.From = obj.Addr{}
-						pp.From.Type = obj.TYPE_MEM
-						pp.From.Name = obj.NAME_EXTERN
-						pp.From.Sym = ctxt.Plan9privates
-						pp.From.Offset = 0
-						pp.From.Index = REG_NONE
-						ctxt.Rexflag |= Pw
-						ctxt.Andptr[0] = 0x8B
-						ctxt.Andptr = ctxt.Andptr[1:]
-						asmand(ctxt, p, &pp.From, &p.To)
-
-					case obj.Hsolaris: // TODO(rsc): Delete Hsolaris from list. Should not use this code. See progedit in obj6.c.
-						// TLS base is 0(FS).
-						pp.From = p.From
-
-						pp.From.Type = obj.TYPE_MEM
-						pp.From.Name = obj.NAME_NONE
-						pp.From.Reg = REG_NONE
-						pp.From.Offset = 0
-						pp.From.Index = REG_NONE
-						pp.From.Scale = 0
-						ctxt.Rexflag |= Pw
-						ctxt.Andptr[0] = 0x64
-						ctxt.Andptr = ctxt.Andptr[1:] // FS
-						ctxt.Andptr[0] = 0x8B
-						ctxt.Andptr = ctxt.Andptr[1:]
-						asmand(ctxt, p, &pp.From, &p.To)
-
-					case obj.Hwindows:
-						// Windows TLS base is always 0x28(GS).
-						pp.From = p.From
-
-						pp.From.Type = obj.TYPE_MEM
-						pp.From.Name = obj.NAME_NONE
-						pp.From.Reg = REG_GS
-						pp.From.Offset = 0x28
-						pp.From.Index = REG_NONE
-						pp.From.Scale = 0
-						ctxt.Rexflag |= Pw
-						ctxt.Andptr[0] = 0x65
-						ctxt.Andptr = ctxt.Andptr[1:] // GS
-						ctxt.Andptr[0] = 0x8B
-						ctxt.Andptr = ctxt.Andptr[1:]
-						asmand(ctxt, p, &pp.From, &p.To)
-					}
-				}
-				return
-			}
-		}
-	}
-	goto bad
-
-bad:
-	if p.Mode != 64 {
-		/*
-		 * here, the assembly has failed.
-		 * if its a byte instruction that has
-		 * unaddressable registers, try to
-		 * exchange registers and reissue the
-		 * instruction with the operands renamed.
-		 */
-		pp := *p
-
-		unbytereg(&pp.From, &pp.Ft)
-		unbytereg(&pp.To, &pp.Tt)
-
-		z := int(p.From.Reg)
-		if p.From.Type == obj.TYPE_REG && z >= REG_BP && z <= REG_DI {
-			// TODO(rsc): Use this code for x86-64 too. It has bug fixes not present in the amd64 code base.
-			// For now, different to keep bit-for-bit compatibility.
-			if p.Mode == 32 {
-				breg := byteswapreg(ctxt, &p.To)
-				if breg != REG_AX {
-					ctxt.Andptr[0] = 0x87
-					ctxt.Andptr = ctxt.Andptr[1:] /* xchg lhs,bx */
-					asmando(ctxt, p, &p.From, reg[breg])
-					subreg(&pp, z, breg)
-					doasm(ctxt, &pp)
-					ctxt.Andptr[0] = 0x87
-					ctxt.Andptr = ctxt.Andptr[1:] /* xchg lhs,bx */
-					asmando(ctxt, p, &p.From, reg[breg])
-				} else {
-					ctxt.Andptr[0] = byte(0x90 + reg[z])
-					ctxt.Andptr = ctxt.Andptr[1:] /* xchg lsh,ax */
-					subreg(&pp, z, REG_AX)
-					doasm(ctxt, &pp)
-					ctxt.Andptr[0] = byte(0x90 + reg[z])
-					ctxt.Andptr = ctxt.Andptr[1:] /* xchg lsh,ax */
-				}
-				return
-			}
-
-			if isax(&p.To) || p.To.Type == obj.TYPE_NONE {
-				// We certainly don't want to exchange
-				// with AX if the op is MUL or DIV.
-				ctxt.Andptr[0] = 0x87
-				ctxt.Andptr = ctxt.Andptr[1:] /* xchg lhs,bx */
-				asmando(ctxt, p, &p.From, reg[REG_BX])
-				subreg(&pp, z, REG_BX)
-				doasm(ctxt, &pp)
-				ctxt.Andptr[0] = 0x87
-				ctxt.Andptr = ctxt.Andptr[1:] /* xchg lhs,bx */
-				asmando(ctxt, p, &p.From, reg[REG_BX])
-			} else {
-				ctxt.Andptr[0] = byte(0x90 + reg[z])
-				ctxt.Andptr = ctxt.Andptr[1:] /* xchg lsh,ax */
-				subreg(&pp, z, REG_AX)
-				doasm(ctxt, &pp)
-				ctxt.Andptr[0] = byte(0x90 + reg[z])
-				ctxt.Andptr = ctxt.Andptr[1:] /* xchg lsh,ax */
-			}
-			return
-		}
-
-		z = int(p.To.Reg)
-		if p.To.Type == obj.TYPE_REG && z >= REG_BP && z <= REG_DI {
-			// TODO(rsc): Use this code for x86-64 too. It has bug fixes not present in the amd64 code base.
-			// For now, different to keep bit-for-bit compatibility.
-			if p.Mode == 32 {
-				breg := byteswapreg(ctxt, &p.From)
-				if breg != REG_AX {
-					ctxt.Andptr[0] = 0x87
-					ctxt.Andptr = ctxt.Andptr[1:] /* xchg rhs,bx */
-					asmando(ctxt, p, &p.To, reg[breg])
-					subreg(&pp, z, breg)
-					doasm(ctxt, &pp)
-					ctxt.Andptr[0] = 0x87
-					ctxt.Andptr = ctxt.Andptr[1:] /* xchg rhs,bx */
-					asmando(ctxt, p, &p.To, reg[breg])
-				} else {
-					ctxt.Andptr[0] = byte(0x90 + reg[z])
-					ctxt.Andptr = ctxt.Andptr[1:] /* xchg rsh,ax */
-					subreg(&pp, z, REG_AX)
-					doasm(ctxt, &pp)
-					ctxt.Andptr[0] = byte(0x90 + reg[z])
-					ctxt.Andptr = ctxt.Andptr[1:] /* xchg rsh,ax */
-				}
-				return
-			}
-
-			if isax(&p.From) {
-				ctxt.Andptr[0] = 0x87
-				ctxt.Andptr = ctxt.Andptr[1:] /* xchg rhs,bx */
-				asmando(ctxt, p, &p.To, reg[REG_BX])
-				subreg(&pp, z, REG_BX)
-				doasm(ctxt, &pp)
-				ctxt.Andptr[0] = 0x87
-				ctxt.Andptr = ctxt.Andptr[1:] /* xchg rhs,bx */
-				asmando(ctxt, p, &p.To, reg[REG_BX])
-			} else {
-				ctxt.Andptr[0] = byte(0x90 + reg[z])
-				ctxt.Andptr = ctxt.Andptr[1:] /* xchg rsh,ax */
-				subreg(&pp, z, REG_AX)
-				doasm(ctxt, &pp)
-				ctxt.Andptr[0] = byte(0x90 + reg[z])
-				ctxt.Andptr = ctxt.Andptr[1:] /* xchg rsh,ax */
-			}
-			return
-		}
-	}
-
-	ctxt.Diag("doasm: notfound ft=%d tt=%d %v %d %d", p.Ft, p.Tt, p, oclass(ctxt, p, &p.From), oclass(ctxt, p, &p.To))
-	return
-}
-
-// byteswapreg returns a byte-addressable register (AX, BX, CX, DX)
-// which is not referenced in a.
-// If a is empty, it returns BX to account for MULB-like instructions
-// that might use DX and AX.
-func byteswapreg(ctxt *obj.Link, a *obj.Addr) int {
-	cand := 1
-	canc := cand
-	canb := canc
-	cana := canb
-
-	if a.Type == obj.TYPE_NONE {
-		cand = 0
-		cana = cand
-	}
-
-	if a.Type == obj.TYPE_REG || ((a.Type == obj.TYPE_MEM || a.Type == obj.TYPE_ADDR) && a.Name == obj.NAME_NONE) {
-		switch a.Reg {
-		case REG_NONE:
-			cand = 0
-			cana = cand
-
-		case REG_AX, REG_AL, REG_AH:
-			cana = 0
-
-		case REG_BX, REG_BL, REG_BH:
-			canb = 0
-
-		case REG_CX, REG_CL, REG_CH:
-			canc = 0
-
-		case REG_DX, REG_DL, REG_DH:
-			cand = 0
-		}
-	}
-
-	if a.Type == obj.TYPE_MEM || a.Type == obj.TYPE_ADDR {
-		switch a.Index {
-		case REG_AX:
-			cana = 0
-
-		case REG_BX:
-			canb = 0
-
-		case REG_CX:
-			canc = 0
-
-		case REG_DX:
-			cand = 0
-		}
-	}
-
-	if cana != 0 {
-		return REG_AX
-	}
-	if canb != 0 {
-		return REG_BX
-	}
-	if canc != 0 {
-		return REG_CX
-	}
-	if cand != 0 {
-		return REG_DX
-	}
-
-	ctxt.Diag("impossible byte register")
-	log.Fatalf("bad code")
-	return 0
-}
-
-func isbadbyte(a *obj.Addr) bool {
-	return a.Type == obj.TYPE_REG && (REG_BP <= a.Reg && a.Reg <= REG_DI || REG_BPB <= a.Reg && a.Reg <= REG_DIB)
-}
-
-var naclret = []uint8{
-	0x5e, // POPL SI
-	// 0x8b, 0x7d, 0x00, // MOVL (BP), DI - catch return to invalid address, for debugging
-	0x83,
-	0xe6,
-	0xe0, // ANDL $~31, SI
-	0x4c,
-	0x01,
-	0xfe, // ADDQ R15, SI
-	0xff,
-	0xe6, // JMP SI
-}
-
-var naclret8 = []uint8{
-	0x5d, // POPL BP
-	// 0x8b, 0x7d, 0x00, // MOVL (BP), DI - catch return to invalid address, for debugging
-	0x83,
-	0xe5,
-	0xe0, // ANDL $~31, BP
-	0xff,
-	0xe5, // JMP BP
-}
-
-var naclspfix = []uint8{0x4c, 0x01, 0xfc} // ADDQ R15, SP
-
-var naclbpfix = []uint8{0x4c, 0x01, 0xfd} // ADDQ R15, BP
-
-var naclmovs = []uint8{
-	0x89,
-	0xf6, // MOVL SI, SI
-	0x49,
-	0x8d,
-	0x34,
-	0x37, // LEAQ (R15)(SI*1), SI
-	0x89,
-	0xff, // MOVL DI, DI
-	0x49,
-	0x8d,
-	0x3c,
-	0x3f, // LEAQ (R15)(DI*1), DI
-}
-
-var naclstos = []uint8{
-	0x89,
-	0xff, // MOVL DI, DI
-	0x49,
-	0x8d,
-	0x3c,
-	0x3f, // LEAQ (R15)(DI*1), DI
-}
-
-func nacltrunc(ctxt *obj.Link, reg int) {
-	if reg >= REG_R8 {
-		ctxt.Andptr[0] = 0x45
-		ctxt.Andptr = ctxt.Andptr[1:]
-	}
-	reg = (reg - REG_AX) & 7
-	ctxt.Andptr[0] = 0x89
-	ctxt.Andptr = ctxt.Andptr[1:]
-	ctxt.Andptr[0] = byte(3<<6 | reg<<3 | reg)
-	ctxt.Andptr = ctxt.Andptr[1:]
-}
-
-func asmins(ctxt *obj.Link, p *obj.Prog) {
-	ctxt.Andptr = ctxt.And[:]
-	ctxt.Asmode = int(p.Mode)
-
-	if p.As == obj.AUSEFIELD {
-		r := obj.Addrel(ctxt.Cursym)
-		r.Off = 0
-		r.Siz = 0
-		r.Sym = p.From.Sym
-		r.Type = obj.R_USEFIELD
-		return
-	}
-
-	if ctxt.Headtype == obj.Hnacl && p.Mode == 32 {
-		switch p.As {
-		case obj.ARET:
-			copy(ctxt.Andptr, naclret8)
-			ctxt.Andptr = ctxt.Andptr[len(naclret8):]
-			return
-
-		case obj.ACALL,
-			obj.AJMP:
-			if p.To.Type == obj.TYPE_REG && REG_AX <= p.To.Reg && p.To.Reg <= REG_DI {
-				ctxt.Andptr[0] = 0x83
-				ctxt.Andptr = ctxt.Andptr[1:]
-				ctxt.Andptr[0] = byte(0xe0 | (p.To.Reg - REG_AX))
-				ctxt.Andptr = ctxt.Andptr[1:]
-				ctxt.Andptr[0] = 0xe0
-				ctxt.Andptr = ctxt.Andptr[1:]
-			}
-
-		case AINT:
-			ctxt.Andptr[0] = 0xf4
-			ctxt.Andptr = ctxt.Andptr[1:]
-			return
-		}
-	}
-
-	if ctxt.Headtype == obj.Hnacl && p.Mode == 64 {
-		if p.As == AREP {
-			ctxt.Rep++
-			return
-		}
-
-		if p.As == AREPN {
-			ctxt.Repn++
-			return
-		}
-
-		if p.As == ALOCK {
-			ctxt.Lock++
-			return
-		}
-
-		if p.As != ALEAQ && p.As != ALEAL {
-			if p.From.Index != obj.TYPE_NONE && p.From.Scale > 0 {
-				nacltrunc(ctxt, int(p.From.Index))
-			}
-			if p.To.Index != obj.TYPE_NONE && p.To.Scale > 0 {
-				nacltrunc(ctxt, int(p.To.Index))
-			}
-		}
-
-		switch p.As {
-		case obj.ARET:
-			copy(ctxt.Andptr, naclret)
-			ctxt.Andptr = ctxt.Andptr[len(naclret):]
-			return
-
-		case obj.ACALL,
-			obj.AJMP:
-			if p.To.Type == obj.TYPE_REG && REG_AX <= p.To.Reg && p.To.Reg <= REG_DI {
-				// ANDL $~31, reg
-				ctxt.Andptr[0] = 0x83
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-				ctxt.Andptr[0] = byte(0xe0 | (p.To.Reg - REG_AX))
-				ctxt.Andptr = ctxt.Andptr[1:]
-				ctxt.Andptr[0] = 0xe0
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-				// ADDQ R15, reg
-				ctxt.Andptr[0] = 0x4c
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-				ctxt.Andptr[0] = 0x01
-				ctxt.Andptr = ctxt.Andptr[1:]
-				ctxt.Andptr[0] = byte(0xf8 | (p.To.Reg - REG_AX))
-				ctxt.Andptr = ctxt.Andptr[1:]
-			}
-
-			if p.To.Type == obj.TYPE_REG && REG_R8 <= p.To.Reg && p.To.Reg <= REG_R15 {
-				// ANDL $~31, reg
-				ctxt.Andptr[0] = 0x41
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-				ctxt.Andptr[0] = 0x83
-				ctxt.Andptr = ctxt.Andptr[1:]
-				ctxt.Andptr[0] = byte(0xe0 | (p.To.Reg - REG_R8))
-				ctxt.Andptr = ctxt.Andptr[1:]
-				ctxt.Andptr[0] = 0xe0
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-				// ADDQ R15, reg
-				ctxt.Andptr[0] = 0x4d
-				ctxt.Andptr = ctxt.Andptr[1:]
-
-				ctxt.Andptr[0] = 0x01
-				ctxt.Andptr = ctxt.Andptr[1:]
-				ctxt.Andptr[0] = byte(0xf8 | (p.To.Reg - REG_R8))
-				ctxt.Andptr = ctxt.Andptr[1:]
-			}
-
-		case AINT:
-			ctxt.Andptr[0] = 0xf4
-			ctxt.Andptr = ctxt.Andptr[1:]
-			return
-
-		case ASCASB,
-			ASCASW,
-			ASCASL,
-			ASCASQ,
-			ASTOSB,
-			ASTOSW,
-			ASTOSL,
-			ASTOSQ:
-			copy(ctxt.Andptr, naclstos)
-			ctxt.Andptr = ctxt.Andptr[len(naclstos):]
-
-		case AMOVSB, AMOVSW, AMOVSL, AMOVSQ:
-			copy(ctxt.Andptr, naclmovs)
-			ctxt.Andptr = ctxt.Andptr[len(naclmovs):]
-		}
-
-		if ctxt.Rep != 0 {
-			ctxt.Andptr[0] = 0xf3
-			ctxt.Andptr = ctxt.Andptr[1:]
-			ctxt.Rep = 0
-		}
-
-		if ctxt.Repn != 0 {
-			ctxt.Andptr[0] = 0xf2
-			ctxt.Andptr = ctxt.Andptr[1:]
-			ctxt.Repn = 0
-		}
-
-		if ctxt.Lock != 0 {
-			ctxt.Andptr[0] = 0xf0
-			ctxt.Andptr = ctxt.Andptr[1:]
-			ctxt.Lock = 0
-		}
-	}
-
-	ctxt.Rexflag = 0
-	and0 := ctxt.Andptr
-	ctxt.Asmode = int(p.Mode)
-	doasm(ctxt, p)
-	if ctxt.Rexflag != 0 {
-		/*
-		 * as befits the whole approach of the architecture,
-		 * the rex prefix must appear before the first opcode byte
-		 * (and thus after any 66/67/f2/f3/26/2e/3e prefix bytes, but
-		 * before the 0f opcode escape!), or it might be ignored.
-		 * note that the handbook often misleadingly shows 66/f2/f3 in `opcode'.
-		 */
-		if p.Mode != 64 {
-			ctxt.Diag("asmins: illegal in mode %d: %v (%d %d)", p.Mode, p, p.Ft, p.Tt)
-		}
-		n := -cap(ctxt.Andptr) + cap(and0)
-		var c int
-		var np int
-		for np = 0; np < n; np++ {
-			c = int(and0[np])
-			if c != 0xf2 && c != 0xf3 && (c < 0x64 || c > 0x67) && c != 0x2e && c != 0x3e && c != 0x26 {
-				break
-			}
-		}
-
-		copy(and0[np+1:], and0[np:n])
-		and0[np] = byte(0x40 | ctxt.Rexflag)
-		ctxt.Andptr = ctxt.Andptr[1:]
-	}
-
-	n := -cap(ctxt.Andptr) + cap(ctxt.And[:])
-	var r *obj.Reloc
-	for i := len(ctxt.Cursym.R) - 1; i >= 0; i-- {
-		r = &ctxt.Cursym.R[i:][0]
-		if int64(r.Off) < p.Pc {
-			break
-		}
-		if ctxt.Rexflag != 0 {
-			r.Off++
-		}
-		if r.Type == obj.R_PCREL {
-			// PC-relative addressing is relative to the end of the instruction,
-			// but the relocations applied by the linker are relative to the end
-			// of the relocation. Because immediate instruction
-			// arguments can follow the PC-relative memory reference in the
-			// instruction encoding, the two may not coincide. In this case,
-			// adjust addend so that linker can keep relocating relative to the
-			// end of the relocation.
-			r.Add -= p.Pc + int64(n) - (int64(r.Off) + int64(r.Siz))
-		}
-	}
-
-	if p.Mode == 64 && ctxt.Headtype == obj.Hnacl && p.As != ACMPL && p.As != ACMPQ && p.To.Type == obj.TYPE_REG {
-		switch p.To.Reg {
-		case REG_SP:
-			copy(ctxt.Andptr, naclspfix)
-			ctxt.Andptr = ctxt.Andptr[len(naclspfix):]
-
-		case REG_BP:
-			copy(ctxt.Andptr, naclbpfix)
-			ctxt.Andptr = ctxt.Andptr[len(naclbpfix):]
-		}
-	}
-}
diff --git a/src/cmd/internal/obj/x86/list6.go b/src/cmd/internal/obj/x86/list6.go
deleted file mode 100644
index fc79b90..0000000
--- a/src/cmd/internal/obj/x86/list6.go
+++ /dev/null
@@ -1,164 +0,0 @@
-// Inferno utils/6c/list.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6c/list.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package x86
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-)
-
-var Register = []string{
-	"AL", /* [D_AL] */
-	"CL",
-	"DL",
-	"BL",
-	"SPB",
-	"BPB",
-	"SIB",
-	"DIB",
-	"R8B",
-	"R9B",
-	"R10B",
-	"R11B",
-	"R12B",
-	"R13B",
-	"R14B",
-	"R15B",
-	"AX", /* [D_AX] */
-	"CX",
-	"DX",
-	"BX",
-	"SP",
-	"BP",
-	"SI",
-	"DI",
-	"R8",
-	"R9",
-	"R10",
-	"R11",
-	"R12",
-	"R13",
-	"R14",
-	"R15",
-	"AH",
-	"CH",
-	"DH",
-	"BH",
-	"F0", /* [D_F0] */
-	"F1",
-	"F2",
-	"F3",
-	"F4",
-	"F5",
-	"F6",
-	"F7",
-	"M0",
-	"M1",
-	"M2",
-	"M3",
-	"M4",
-	"M5",
-	"M6",
-	"M7",
-	"X0",
-	"X1",
-	"X2",
-	"X3",
-	"X4",
-	"X5",
-	"X6",
-	"X7",
-	"X8",
-	"X9",
-	"X10",
-	"X11",
-	"X12",
-	"X13",
-	"X14",
-	"X15",
-	"CS", /* [D_CS] */
-	"SS",
-	"DS",
-	"ES",
-	"FS",
-	"GS",
-	"GDTR", /* [D_GDTR] */
-	"IDTR", /* [D_IDTR] */
-	"LDTR", /* [D_LDTR] */
-	"MSW",  /* [D_MSW] */
-	"TASK", /* [D_TASK] */
-	"CR0",  /* [D_CR] */
-	"CR1",
-	"CR2",
-	"CR3",
-	"CR4",
-	"CR5",
-	"CR6",
-	"CR7",
-	"CR8",
-	"CR9",
-	"CR10",
-	"CR11",
-	"CR12",
-	"CR13",
-	"CR14",
-	"CR15",
-	"DR0", /* [D_DR] */
-	"DR1",
-	"DR2",
-	"DR3",
-	"DR4",
-	"DR5",
-	"DR6",
-	"DR7",
-	"TR0", /* [D_TR] */
-	"TR1",
-	"TR2",
-	"TR3",
-	"TR4",
-	"TR5",
-	"TR6",
-	"TR7",
-	"TLS",    /* [D_TLS] */
-	"MAXREG", /* [MAXREG] */
-}
-
-func init() {
-	obj.RegisterRegister(REG_AL, REG_AL+len(Register), Rconv)
-	obj.RegisterOpcode(obj.ABaseAMD64, Anames)
-}
-
-func Rconv(r int) string {
-	if REG_AL <= r && r-REG_AL < len(Register) {
-		return Register[r-REG_AL]
-	}
-	return fmt.Sprintf("Rgok(%d)", r-obj.RBaseAMD64)
-}
diff --git a/src/cmd/internal/obj/x86/obj6.go b/src/cmd/internal/obj/x86/obj6.go
deleted file mode 100644
index fa9c474..0000000
--- a/src/cmd/internal/obj/x86/obj6.go
+++ /dev/null
@@ -1,1330 +0,0 @@
-// Inferno utils/6l/pass.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6l/pass.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package x86
-
-import (
-	"cmd/internal/obj"
-	"encoding/binary"
-	"fmt"
-	"log"
-	"math"
-)
-
-func canuse1insntls(ctxt *obj.Link) bool {
-	if ctxt.Arch.Regsize == 4 {
-		switch ctxt.Headtype {
-		case obj.Hlinux,
-			obj.Hnacl,
-			obj.Hplan9,
-			obj.Hwindows:
-			return false
-		}
-
-		return true
-	}
-
-	switch ctxt.Headtype {
-	case obj.Hplan9,
-		obj.Hwindows:
-		return false
-	case obj.Hlinux:
-		return ctxt.Flag_shared == 0
-	}
-
-	return true
-}
-
-func progedit(ctxt *obj.Link, p *obj.Prog) {
-	// Maintain information about code generation mode.
-	if ctxt.Mode == 0 {
-		ctxt.Mode = ctxt.Arch.Regsize * 8
-	}
-	p.Mode = int8(ctxt.Mode)
-
-	switch p.As {
-	case AMODE:
-		if p.From.Type == obj.TYPE_CONST || (p.From.Type == obj.TYPE_MEM && p.From.Reg == REG_NONE) {
-			switch int(p.From.Offset) {
-			case 16, 32, 64:
-				ctxt.Mode = int(p.From.Offset)
-			}
-		}
-		obj.Nopout(p)
-	}
-
-	// Thread-local storage references use the TLS pseudo-register.
-	// As a register, TLS refers to the thread-local storage base, and it
-	// can only be loaded into another register:
-	//
-	//         MOVQ TLS, AX
-	//
-	// An offset from the thread-local storage base is written off(reg)(TLS*1).
-	// Semantically it is off(reg), but the (TLS*1) annotation marks this as
-	// indexing from the loaded TLS base. This emits a relocation so that
-	// if the linker needs to adjust the offset, it can. For example:
-	//
-	//         MOVQ TLS, AX
-	//         MOVQ 0(AX)(TLS*1), CX // load g into CX
-	//
-	// On systems that support direct access to the TLS memory, this
-	// pair of instructions can be reduced to a direct TLS memory reference:
-	//
-	//         MOVQ 0(TLS), CX // load g into CX
-	//
-	// The 2-instruction and 1-instruction forms correspond to the two code
-	// sequences for loading a TLS variable in the local exec model given in "ELF
-	// Handling For Thread-Local Storage".
-	//
-	// We apply this rewrite on systems that support the 1-instruction form.
-	// The decision is made using only the operating system and the -shared flag,
-	// not the link mode. If some link modes on a particular operating system
-	// require the 2-instruction form, then all builds for that operating system
-	// will use the 2-instruction form, so that the link mode decision can be
-	// delayed to link time.
-	//
-	// In this way, all supported systems use identical instructions to
-	// access TLS, and they are rewritten appropriately first here in
-	// liblink and then finally using relocations in the linker.
-	//
-	// When -shared is passed, we leave the code in the 2-instruction form but
-	// assemble (and relocate) them in different ways to generate the initial
-	// exec code sequence. It's a bit of a fluke that this is possible without
-	// rewriting the instructions more comprehensively, and it only does because
-	// we only support a single TLS variable (g).
-
-	if canuse1insntls(ctxt) {
-		// Reduce 2-instruction sequence to 1-instruction sequence.
-		// Sequences like
-		//	MOVQ TLS, BX
-		//	... off(BX)(TLS*1) ...
-		// become
-		//	NOP
-		//	... off(TLS) ...
-		//
-		// TODO(rsc): Remove the Hsolaris special case. It exists only to
-		// guarantee we are producing byte-identical binaries as before this code.
-		// But it should be unnecessary.
-		if (p.As == AMOVQ || p.As == AMOVL) && p.From.Type == obj.TYPE_REG && p.From.Reg == REG_TLS && p.To.Type == obj.TYPE_REG && REG_AX <= p.To.Reg && p.To.Reg <= REG_R15 && ctxt.Headtype != obj.Hsolaris {
-			obj.Nopout(p)
-		}
-		if p.From.Type == obj.TYPE_MEM && p.From.Index == REG_TLS && REG_AX <= p.From.Reg && p.From.Reg <= REG_R15 {
-			p.From.Reg = REG_TLS
-			p.From.Scale = 0
-			p.From.Index = REG_NONE
-		}
-
-		if p.To.Type == obj.TYPE_MEM && p.To.Index == REG_TLS && REG_AX <= p.To.Reg && p.To.Reg <= REG_R15 {
-			p.To.Reg = REG_TLS
-			p.To.Scale = 0
-			p.To.Index = REG_NONE
-		}
-	} else {
-		// load_g_cx, below, always inserts the 1-instruction sequence. Rewrite it
-		// as the 2-instruction sequence if necessary.
-		//	MOVQ 0(TLS), BX
-		// becomes
-		//	MOVQ TLS, BX
-		//	MOVQ 0(BX)(TLS*1), BX
-		if (p.As == AMOVQ || p.As == AMOVL) && p.From.Type == obj.TYPE_MEM && p.From.Reg == REG_TLS && p.To.Type == obj.TYPE_REG && REG_AX <= p.To.Reg && p.To.Reg <= REG_R15 {
-			q := obj.Appendp(ctxt, p)
-			q.As = p.As
-			q.From = p.From
-			q.From.Type = obj.TYPE_MEM
-			q.From.Reg = p.To.Reg
-			q.From.Index = REG_TLS
-			q.From.Scale = 2 // TODO: use 1
-			q.To = p.To
-			p.From.Type = obj.TYPE_REG
-			p.From.Reg = REG_TLS
-			p.From.Index = REG_NONE
-			p.From.Offset = 0
-		}
-	}
-
-	// TODO: Remove.
-	if ctxt.Headtype == obj.Hwindows && p.Mode == 64 || ctxt.Headtype == obj.Hplan9 {
-		if p.From.Scale == 1 && p.From.Index == REG_TLS {
-			p.From.Scale = 2
-		}
-		if p.To.Scale == 1 && p.To.Index == REG_TLS {
-			p.To.Scale = 2
-		}
-	}
-
-	// Rewrite 0 to $0 in 3rd argment to CMPPS etc.
-	// That's what the tables expect.
-	switch p.As {
-	case ACMPPD, ACMPPS, ACMPSD, ACMPSS:
-		if p.To.Type == obj.TYPE_MEM && p.To.Name == obj.NAME_NONE && p.To.Reg == REG_NONE && p.To.Index == REG_NONE && p.To.Sym == nil {
-			p.To.Type = obj.TYPE_CONST
-		}
-	}
-
-	// Rewrite CALL/JMP/RET to symbol as TYPE_BRANCH.
-	switch p.As {
-	case obj.ACALL, obj.AJMP, obj.ARET:
-		if p.To.Type == obj.TYPE_MEM && (p.To.Name == obj.NAME_EXTERN || p.To.Name == obj.NAME_STATIC) && p.To.Sym != nil {
-			p.To.Type = obj.TYPE_BRANCH
-		}
-	}
-
-	// Rewrite MOVL/MOVQ $XXX(FP/SP) as LEAL/LEAQ.
-	if p.From.Type == obj.TYPE_ADDR && (ctxt.Arch.Thechar == '6' || p.From.Name != obj.NAME_EXTERN && p.From.Name != obj.NAME_STATIC) {
-		switch p.As {
-		case AMOVL:
-			p.As = ALEAL
-			p.From.Type = obj.TYPE_MEM
-		case AMOVQ:
-			p.As = ALEAQ
-			p.From.Type = obj.TYPE_MEM
-		}
-	}
-
-	if ctxt.Headtype == obj.Hnacl && p.Mode == 64 {
-		if p.From3 != nil {
-			nacladdr(ctxt, p, p.From3)
-		}
-		nacladdr(ctxt, p, &p.From)
-		nacladdr(ctxt, p, &p.To)
-	}
-
-	// Rewrite float constants to values stored in memory.
-	switch p.As {
-	// Convert AMOVSS $(0), Xx to AXORPS Xx, Xx
-	case AMOVSS:
-		if p.From.Type == obj.TYPE_FCONST {
-			if p.From.Val.(float64) == 0 {
-				if p.To.Type == obj.TYPE_REG && REG_X0 <= p.To.Reg && p.To.Reg <= REG_X15 {
-					p.As = AXORPS
-					p.From = p.To
-					break
-				}
-			}
-		}
-		fallthrough
-
-	case AFMOVF,
-		AFADDF,
-		AFSUBF,
-		AFSUBRF,
-		AFMULF,
-		AFDIVF,
-		AFDIVRF,
-		AFCOMF,
-		AFCOMFP,
-		AADDSS,
-		ASUBSS,
-		AMULSS,
-		ADIVSS,
-		ACOMISS,
-		AUCOMISS:
-		if p.From.Type == obj.TYPE_FCONST {
-			f32 := float32(p.From.Val.(float64))
-			i32 := math.Float32bits(f32)
-			literal := fmt.Sprintf("$f32.%08x", i32)
-			s := obj.Linklookup(ctxt, literal, 0)
-			p.From.Type = obj.TYPE_MEM
-			p.From.Name = obj.NAME_EXTERN
-			p.From.Sym = s
-			p.From.Sym.Local = true
-			p.From.Offset = 0
-		}
-
-	case AMOVSD:
-		// Convert AMOVSD $(0), Xx to AXORPS Xx, Xx
-		if p.From.Type == obj.TYPE_FCONST {
-			if p.From.Val.(float64) == 0 {
-				if p.To.Type == obj.TYPE_REG && REG_X0 <= p.To.Reg && p.To.Reg <= REG_X15 {
-					p.As = AXORPS
-					p.From = p.To
-					break
-				}
-			}
-		}
-		fallthrough
-
-	case AFMOVD,
-		AFADDD,
-		AFSUBD,
-		AFSUBRD,
-		AFMULD,
-		AFDIVD,
-		AFDIVRD,
-		AFCOMD,
-		AFCOMDP,
-		AADDSD,
-		ASUBSD,
-		AMULSD,
-		ADIVSD,
-		ACOMISD,
-		AUCOMISD:
-		if p.From.Type == obj.TYPE_FCONST {
-			i64 := math.Float64bits(p.From.Val.(float64))
-			literal := fmt.Sprintf("$f64.%016x", i64)
-			s := obj.Linklookup(ctxt, literal, 0)
-			p.From.Type = obj.TYPE_MEM
-			p.From.Name = obj.NAME_EXTERN
-			p.From.Sym = s
-			p.From.Sym.Local = true
-			p.From.Offset = 0
-		}
-	}
-
-	if ctxt.Flag_dynlink && (p.As == obj.ADUFFCOPY || p.As == obj.ADUFFZERO) {
-		var sym *obj.LSym
-		if p.As == obj.ADUFFZERO {
-			sym = obj.Linklookup(ctxt, "runtime.duffzero", 0)
-		} else {
-			sym = obj.Linklookup(ctxt, "runtime.duffcopy", 0)
-		}
-		offset := p.To.Offset
-		p.As = AMOVQ
-		p.From.Type = obj.TYPE_MEM
-		p.From.Name = obj.NAME_GOTREF
-		p.From.Sym = sym
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_R15
-		p.To.Offset = 0
-		p.To.Sym = nil
-		p1 := obj.Appendp(ctxt, p)
-		p1.As = AADDQ
-		p1.From.Type = obj.TYPE_CONST
-		p1.From.Offset = offset
-		p1.To.Type = obj.TYPE_REG
-		p1.To.Reg = REG_R15
-		p2 := obj.Appendp(ctxt, p1)
-		p2.As = obj.ACALL
-		p2.To.Type = obj.TYPE_REG
-		p2.To.Reg = REG_R15
-	}
-
-	if ctxt.Flag_dynlink {
-		if p.As == ALEAQ && p.From.Type == obj.TYPE_MEM && p.From.Name == obj.NAME_EXTERN && !p.From.Sym.Local {
-			p.As = AMOVQ
-			p.From.Type = obj.TYPE_ADDR
-		}
-		if p.From.Type == obj.TYPE_ADDR && p.From.Name == obj.NAME_EXTERN && !p.From.Sym.Local {
-			if p.As != AMOVQ {
-				ctxt.Diag("do not know how to handle TYPE_ADDR in %v with -dynlink", p)
-			}
-			if p.To.Type != obj.TYPE_REG {
-				ctxt.Diag("do not know how to handle LEAQ-type insn to non-register in %v with -dynlink", p)
-			}
-			p.From.Type = obj.TYPE_MEM
-			p.From.Name = obj.NAME_GOTREF
-			if p.From.Offset != 0 {
-				q := obj.Appendp(ctxt, p)
-				q.As = AADDQ
-				q.From.Type = obj.TYPE_CONST
-				q.From.Offset = p.From.Offset
-				q.To = p.To
-				p.From.Offset = 0
-			}
-		}
-		if p.From3 != nil && p.From3.Name == obj.NAME_EXTERN {
-			ctxt.Diag("don't know how to handle %v with -dynlink", p)
-		}
-		var source *obj.Addr
-		if p.From.Name == obj.NAME_EXTERN && !p.From.Sym.Local {
-			if p.To.Name == obj.NAME_EXTERN && !p.To.Sym.Local {
-				ctxt.Diag("cannot handle NAME_EXTERN on both sides in %v with -dynlink", p)
-			}
-			source = &p.From
-		} else if p.To.Name == obj.NAME_EXTERN && !p.To.Sym.Local {
-			source = &p.To
-		} else {
-			return
-		}
-		if p.As == obj.ATEXT || p.As == obj.AFUNCDATA || p.As == obj.ACALL || p.As == obj.ARET || p.As == obj.AJMP {
-			return
-		}
-		if source.Type != obj.TYPE_MEM {
-			ctxt.Diag("don't know how to handle %v with -dynlink", p)
-		}
-		p1 := obj.Appendp(ctxt, p)
-		p2 := obj.Appendp(ctxt, p1)
-
-		p1.As = AMOVQ
-		p1.From.Type = obj.TYPE_MEM
-		p1.From.Sym = source.Sym
-		p1.From.Name = obj.NAME_GOTREF
-		p1.To.Type = obj.TYPE_REG
-		p1.To.Reg = REG_R15
-
-		p2.As = p.As
-		p2.From = p.From
-		p2.To = p.To
-		if p.From.Name == obj.NAME_EXTERN {
-			p2.From.Reg = REG_R15
-			p2.From.Name = obj.NAME_NONE
-			p2.From.Sym = nil
-		} else if p.To.Name == obj.NAME_EXTERN {
-			p2.To.Reg = REG_R15
-			p2.To.Name = obj.NAME_NONE
-			p2.To.Sym = nil
-		} else {
-			return
-		}
-		l := p.Link
-		l2 := p2.Link
-		*p = *p1
-		*p1 = *p2
-		p.Link = l
-		p1.Link = l2
-	}
-}
-
-func nacladdr(ctxt *obj.Link, p *obj.Prog, a *obj.Addr) {
-	if p.As == ALEAL || p.As == ALEAQ {
-		return
-	}
-
-	if a.Reg == REG_BP {
-		ctxt.Diag("invalid address: %v", p)
-		return
-	}
-
-	if a.Reg == REG_TLS {
-		a.Reg = REG_BP
-	}
-	if a.Type == obj.TYPE_MEM && a.Name == obj.NAME_NONE {
-		switch a.Reg {
-		// all ok
-		case REG_BP, REG_SP, REG_R15:
-			break
-
-		default:
-			if a.Index != REG_NONE {
-				ctxt.Diag("invalid address %v", p)
-			}
-			a.Index = a.Reg
-			if a.Index != REG_NONE {
-				a.Scale = 1
-			}
-			a.Reg = REG_R15
-		}
-	}
-}
-
-func preprocess(ctxt *obj.Link, cursym *obj.LSym) {
-	if ctxt.Tlsg == nil {
-		ctxt.Tlsg = obj.Linklookup(ctxt, "runtime.tlsg", 0)
-	}
-
-	if ctxt.Headtype == obj.Hplan9 && ctxt.Plan9privates == nil {
-		ctxt.Plan9privates = obj.Linklookup(ctxt, "_privates", 0)
-	}
-
-	ctxt.Cursym = cursym
-
-	if cursym.Text == nil || cursym.Text.Link == nil {
-		return
-	}
-
-	p := cursym.Text
-	autoffset := int32(p.To.Offset)
-	if autoffset < 0 {
-		autoffset = 0
-	}
-
-	var bpsize int
-	if p.Mode == 64 && obj.Framepointer_enabled != 0 && autoffset > 0 {
-		// Make room for to save a base pointer.  If autoffset == 0,
-		// this might do something special like a tail jump to
-		// another function, so in that case we omit this.
-		bpsize = ctxt.Arch.Ptrsize
-
-		autoffset += int32(bpsize)
-		p.To.Offset += int64(bpsize)
-	} else {
-		bpsize = 0
-	}
-
-	textarg := int64(p.To.Val.(int32))
-	cursym.Args = int32(textarg)
-	cursym.Locals = int32(p.To.Offset)
-
-	// TODO(rsc): Remove.
-	if p.Mode == 32 && cursym.Locals < 0 {
-		cursym.Locals = 0
-	}
-
-	// TODO(rsc): Remove 'p.Mode == 64 &&'.
-	if p.Mode == 64 && autoffset < obj.StackSmall && p.From3Offset()&obj.NOSPLIT == 0 {
-		for q := p; q != nil; q = q.Link {
-			if q.As == obj.ACALL {
-				goto noleaf
-			}
-			if (q.As == obj.ADUFFCOPY || q.As == obj.ADUFFZERO) && autoffset >= obj.StackSmall-8 {
-				goto noleaf
-			}
-		}
-
-		p.From3.Offset |= obj.NOSPLIT
-	noleaf:
-	}
-
-	if p.From3Offset()&obj.NOSPLIT == 0 || p.From3Offset()&obj.WRAPPER != 0 {
-		p = obj.Appendp(ctxt, p)
-		p = load_g_cx(ctxt, p) // load g into CX
-	}
-
-	if cursym.Text.From3Offset()&obj.NOSPLIT == 0 {
-		p = stacksplit(ctxt, p, autoffset, int32(textarg)) // emit split check
-	}
-
-	if autoffset != 0 {
-		if autoffset%int32(ctxt.Arch.Regsize) != 0 {
-			ctxt.Diag("unaligned stack size %d", autoffset)
-		}
-		p = obj.Appendp(ctxt, p)
-		p.As = AADJSP
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = int64(autoffset)
-		p.Spadj = autoffset
-	} else {
-		// zero-byte stack adjustment.
-		// Insert a fake non-zero adjustment so that stkcheck can
-		// recognize the end of the stack-splitting prolog.
-		p = obj.Appendp(ctxt, p)
-
-		p.As = obj.ANOP
-		p.Spadj = int32(-ctxt.Arch.Ptrsize)
-		p = obj.Appendp(ctxt, p)
-		p.As = obj.ANOP
-		p.Spadj = int32(ctxt.Arch.Ptrsize)
-	}
-
-	deltasp := autoffset
-
-	if bpsize > 0 {
-		// Save caller's BP
-		p = obj.Appendp(ctxt, p)
-
-		p.As = AMOVQ
-		p.From.Type = obj.TYPE_REG
-		p.From.Reg = REG_BP
-		p.To.Type = obj.TYPE_MEM
-		p.To.Reg = REG_SP
-		p.To.Scale = 1
-		p.To.Offset = int64(autoffset) - int64(bpsize)
-
-		// Move current frame to BP
-		p = obj.Appendp(ctxt, p)
-
-		p.As = ALEAQ
-		p.From.Type = obj.TYPE_MEM
-		p.From.Reg = REG_SP
-		p.From.Scale = 1
-		p.From.Offset = int64(autoffset) - int64(bpsize)
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_BP
-	}
-
-	if cursym.Text.From3Offset()&obj.WRAPPER != 0 {
-		// if(g->panic != nil && g->panic->argp == FP) g->panic->argp = bottom-of-frame
-		//
-		//	MOVQ g_panic(CX), BX
-		//	TESTQ BX, BX
-		//	JEQ end
-		//	LEAQ (autoffset+8)(SP), DI
-		//	CMPQ panic_argp(BX), DI
-		//	JNE end
-		//	MOVQ SP, panic_argp(BX)
-		// end:
-		//	NOP
-		//
-		// The NOP is needed to give the jumps somewhere to land.
-		// It is a liblink NOP, not an x86 NOP: it encodes to 0 instruction bytes.
-
-		p = obj.Appendp(ctxt, p)
-
-		p.As = AMOVQ
-		p.From.Type = obj.TYPE_MEM
-		p.From.Reg = REG_CX
-		p.From.Offset = 4 * int64(ctxt.Arch.Ptrsize) // G.panic
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_BX
-		if ctxt.Headtype == obj.Hnacl && p.Mode == 64 {
-			p.As = AMOVL
-			p.From.Type = obj.TYPE_MEM
-			p.From.Reg = REG_R15
-			p.From.Scale = 1
-			p.From.Index = REG_CX
-		}
-		if p.Mode == 32 {
-			p.As = AMOVL
-		}
-
-		p = obj.Appendp(ctxt, p)
-		p.As = ATESTQ
-		p.From.Type = obj.TYPE_REG
-		p.From.Reg = REG_BX
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_BX
-		if ctxt.Headtype == obj.Hnacl || p.Mode == 32 {
-			p.As = ATESTL
-		}
-
-		p = obj.Appendp(ctxt, p)
-		p.As = AJEQ
-		p.To.Type = obj.TYPE_BRANCH
-		p1 := p
-
-		p = obj.Appendp(ctxt, p)
-		p.As = ALEAQ
-		p.From.Type = obj.TYPE_MEM
-		p.From.Reg = REG_SP
-		p.From.Offset = int64(autoffset) + int64(ctxt.Arch.Regsize)
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_DI
-		if ctxt.Headtype == obj.Hnacl || p.Mode == 32 {
-			p.As = ALEAL
-		}
-
-		p = obj.Appendp(ctxt, p)
-		p.As = ACMPQ
-		p.From.Type = obj.TYPE_MEM
-		p.From.Reg = REG_BX
-		p.From.Offset = 0 // Panic.argp
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_DI
-		if ctxt.Headtype == obj.Hnacl && p.Mode == 64 {
-			p.As = ACMPL
-			p.From.Type = obj.TYPE_MEM
-			p.From.Reg = REG_R15
-			p.From.Scale = 1
-			p.From.Index = REG_BX
-		}
-		if p.Mode == 32 {
-			p.As = ACMPL
-		}
-
-		p = obj.Appendp(ctxt, p)
-		p.As = AJNE
-		p.To.Type = obj.TYPE_BRANCH
-		p2 := p
-
-		p = obj.Appendp(ctxt, p)
-		p.As = AMOVQ
-		p.From.Type = obj.TYPE_REG
-		p.From.Reg = REG_SP
-		p.To.Type = obj.TYPE_MEM
-		p.To.Reg = REG_BX
-		p.To.Offset = 0 // Panic.argp
-		if ctxt.Headtype == obj.Hnacl && p.Mode == 64 {
-			p.As = AMOVL
-			p.To.Type = obj.TYPE_MEM
-			p.To.Reg = REG_R15
-			p.To.Scale = 1
-			p.To.Index = REG_BX
-		}
-		if p.Mode == 32 {
-			p.As = AMOVL
-		}
-
-		p = obj.Appendp(ctxt, p)
-		p.As = obj.ANOP
-		p1.Pcond = p
-		p2.Pcond = p
-	}
-
-	if ctxt.Debugzerostack != 0 && autoffset != 0 && cursym.Text.From3.Offset&obj.NOSPLIT == 0 {
-		// 6l -Z means zero the stack frame on entry.
-		// This slows down function calls but can help avoid
-		// false positives in garbage collection.
-		p = obj.Appendp(ctxt, p)
-
-		p.As = AMOVQ
-		p.From.Type = obj.TYPE_REG
-		p.From.Reg = REG_SP
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_DI
-		if p.Mode == 32 {
-			p.As = AMOVL
-		}
-
-		p = obj.Appendp(ctxt, p)
-		p.As = AMOVQ
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = int64(autoffset) / int64(ctxt.Arch.Regsize)
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_CX
-		if p.Mode == 32 {
-			p.As = AMOVL
-		}
-
-		p = obj.Appendp(ctxt, p)
-		p.As = AMOVQ
-		p.From.Type = obj.TYPE_CONST
-		p.From.Offset = 0
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_AX
-		if p.Mode == 32 {
-			p.As = AMOVL
-		}
-
-		p = obj.Appendp(ctxt, p)
-		p.As = AREP
-
-		p = obj.Appendp(ctxt, p)
-		p.As = ASTOSQ
-		if p.Mode == 32 {
-			p.As = ASTOSL
-		}
-	}
-
-	var a int
-	var pcsize int
-	for ; p != nil; p = p.Link {
-		pcsize = int(p.Mode) / 8
-		a = int(p.From.Name)
-		if a == obj.NAME_AUTO {
-			p.From.Offset += int64(deltasp) - int64(bpsize)
-		}
-		if a == obj.NAME_PARAM {
-			p.From.Offset += int64(deltasp) + int64(pcsize)
-		}
-		if p.From3 != nil {
-			a = int(p.From3.Name)
-			if a == obj.NAME_AUTO {
-				p.From3.Offset += int64(deltasp) - int64(bpsize)
-			}
-			if a == obj.NAME_PARAM {
-				p.From3.Offset += int64(deltasp) + int64(pcsize)
-			}
-		}
-		a = int(p.To.Name)
-		if a == obj.NAME_AUTO {
-			p.To.Offset += int64(deltasp) - int64(bpsize)
-		}
-		if a == obj.NAME_PARAM {
-			p.To.Offset += int64(deltasp) + int64(pcsize)
-		}
-
-		switch p.As {
-		default:
-			continue
-
-		case APUSHL, APUSHFL:
-			deltasp += 4
-			p.Spadj = 4
-			continue
-
-		case APUSHQ, APUSHFQ:
-			deltasp += 8
-			p.Spadj = 8
-			continue
-
-		case APUSHW, APUSHFW:
-			deltasp += 2
-			p.Spadj = 2
-			continue
-
-		case APOPL, APOPFL:
-			deltasp -= 4
-			p.Spadj = -4
-			continue
-
-		case APOPQ, APOPFQ:
-			deltasp -= 8
-			p.Spadj = -8
-			continue
-
-		case APOPW, APOPFW:
-			deltasp -= 2
-			p.Spadj = -2
-			continue
-
-		case obj.ARET:
-			break
-		}
-
-		if autoffset != deltasp {
-			ctxt.Diag("unbalanced PUSH/POP")
-		}
-
-		if autoffset != 0 {
-			if bpsize > 0 {
-				// Restore caller's BP
-				p.As = AMOVQ
-
-				p.From.Type = obj.TYPE_MEM
-				p.From.Reg = REG_SP
-				p.From.Scale = 1
-				p.From.Offset = int64(autoffset) - int64(bpsize)
-				p.To.Type = obj.TYPE_REG
-				p.To.Reg = REG_BP
-				p = obj.Appendp(ctxt, p)
-			}
-
-			p.As = AADJSP
-			p.From.Type = obj.TYPE_CONST
-			p.From.Offset = int64(-autoffset)
-			p.Spadj = -autoffset
-			p = obj.Appendp(ctxt, p)
-			p.As = obj.ARET
-
-			// If there are instructions following
-			// this ARET, they come from a branch
-			// with the same stackframe, so undo
-			// the cleanup.
-			p.Spadj = +autoffset
-		}
-
-		if p.To.Sym != nil { // retjmp
-			p.As = obj.AJMP
-		}
-	}
-}
-
-func indir_cx(ctxt *obj.Link, p *obj.Prog, a *obj.Addr) {
-	if ctxt.Headtype == obj.Hnacl && p.Mode == 64 {
-		a.Type = obj.TYPE_MEM
-		a.Reg = REG_R15
-		a.Index = REG_CX
-		a.Scale = 1
-		return
-	}
-
-	a.Type = obj.TYPE_MEM
-	a.Reg = REG_CX
-}
-
-// Append code to p to load g into cx.
-// Overwrites p with the first instruction (no first appendp).
-// Overwriting p is unusual but it lets use this in both the
-// prologue (caller must call appendp first) and in the epilogue.
-// Returns last new instruction.
-func load_g_cx(ctxt *obj.Link, p *obj.Prog) *obj.Prog {
-	p.As = AMOVQ
-	if ctxt.Arch.Ptrsize == 4 {
-		p.As = AMOVL
-	}
-	p.From.Type = obj.TYPE_MEM
-	p.From.Reg = REG_TLS
-	p.From.Offset = 0
-	p.To.Type = obj.TYPE_REG
-	p.To.Reg = REG_CX
-
-	next := p.Link
-	progedit(ctxt, p)
-	for p.Link != next {
-		p = p.Link
-	}
-
-	if p.From.Index == REG_TLS {
-		p.From.Scale = 2
-	}
-
-	return p
-}
-
-// Append code to p to check for stack split.
-// Appends to (does not overwrite) p.
-// Assumes g is in CX.
-// Returns last new instruction.
-func stacksplit(ctxt *obj.Link, p *obj.Prog, framesize int32, textarg int32) *obj.Prog {
-	cmp := ACMPQ
-	lea := ALEAQ
-	mov := AMOVQ
-	sub := ASUBQ
-
-	if ctxt.Headtype == obj.Hnacl || p.Mode == 32 {
-		cmp = ACMPL
-		lea = ALEAL
-		mov = AMOVL
-		sub = ASUBL
-	}
-
-	var q1 *obj.Prog
-	if framesize <= obj.StackSmall {
-		// small stack: SP <= stackguard
-		//	CMPQ SP, stackguard
-		p = obj.Appendp(ctxt, p)
-
-		p.As = int16(cmp)
-		p.From.Type = obj.TYPE_REG
-		p.From.Reg = REG_SP
-		indir_cx(ctxt, p, &p.To)
-		p.To.Offset = 2 * int64(ctxt.Arch.Ptrsize) // G.stackguard0
-		if ctxt.Cursym.Cfunc != 0 {
-			p.To.Offset = 3 * int64(ctxt.Arch.Ptrsize) // G.stackguard1
-		}
-	} else if framesize <= obj.StackBig {
-		// large stack: SP-framesize <= stackguard-StackSmall
-		//	LEAQ -xxx(SP), AX
-		//	CMPQ AX, stackguard
-		p = obj.Appendp(ctxt, p)
-
-		p.As = int16(lea)
-		p.From.Type = obj.TYPE_MEM
-		p.From.Reg = REG_SP
-		p.From.Offset = -(int64(framesize) - obj.StackSmall)
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_AX
-
-		p = obj.Appendp(ctxt, p)
-		p.As = int16(cmp)
-		p.From.Type = obj.TYPE_REG
-		p.From.Reg = REG_AX
-		indir_cx(ctxt, p, &p.To)
-		p.To.Offset = 2 * int64(ctxt.Arch.Ptrsize) // G.stackguard0
-		if ctxt.Cursym.Cfunc != 0 {
-			p.To.Offset = 3 * int64(ctxt.Arch.Ptrsize) // G.stackguard1
-		}
-	} else {
-		// Such a large stack we need to protect against wraparound.
-		// If SP is close to zero:
-		//	SP-stackguard+StackGuard <= framesize + (StackGuard-StackSmall)
-		// The +StackGuard on both sides is required to keep the left side positive:
-		// SP is allowed to be slightly below stackguard. See stack.h.
-		//
-		// Preemption sets stackguard to StackPreempt, a very large value.
-		// That breaks the math above, so we have to check for that explicitly.
-		//	MOVQ	stackguard, CX
-		//	CMPQ	CX, $StackPreempt
-		//	JEQ	label-of-call-to-morestack
-		//	LEAQ	StackGuard(SP), AX
-		//	SUBQ	CX, AX
-		//	CMPQ	AX, $(framesize+(StackGuard-StackSmall))
-
-		p = obj.Appendp(ctxt, p)
-
-		p.As = int16(mov)
-		indir_cx(ctxt, p, &p.From)
-		p.From.Offset = 2 * int64(ctxt.Arch.Ptrsize) // G.stackguard0
-		if ctxt.Cursym.Cfunc != 0 {
-			p.From.Offset = 3 * int64(ctxt.Arch.Ptrsize) // G.stackguard1
-		}
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_SI
-
-		p = obj.Appendp(ctxt, p)
-		p.As = int16(cmp)
-		p.From.Type = obj.TYPE_REG
-		p.From.Reg = REG_SI
-		p.To.Type = obj.TYPE_CONST
-		p.To.Offset = obj.StackPreempt
-		if p.Mode == 32 {
-			p.To.Offset = int64(uint32(obj.StackPreempt & (1<<32 - 1)))
-		}
-
-		p = obj.Appendp(ctxt, p)
-		p.As = AJEQ
-		p.To.Type = obj.TYPE_BRANCH
-		q1 = p
-
-		p = obj.Appendp(ctxt, p)
-		p.As = int16(lea)
-		p.From.Type = obj.TYPE_MEM
-		p.From.Reg = REG_SP
-		p.From.Offset = obj.StackGuard
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_AX
-
-		p = obj.Appendp(ctxt, p)
-		p.As = int16(sub)
-		p.From.Type = obj.TYPE_REG
-		p.From.Reg = REG_SI
-		p.To.Type = obj.TYPE_REG
-		p.To.Reg = REG_AX
-
-		p = obj.Appendp(ctxt, p)
-		p.As = int16(cmp)
-		p.From.Type = obj.TYPE_REG
-		p.From.Reg = REG_AX
-		p.To.Type = obj.TYPE_CONST
-		p.To.Offset = int64(framesize) + (obj.StackGuard - obj.StackSmall)
-	}
-
-	// common
-	jls := obj.Appendp(ctxt, p)
-	jls.As = AJLS
-	jls.To.Type = obj.TYPE_BRANCH
-
-	var last *obj.Prog
-	for last = ctxt.Cursym.Text; last.Link != nil; last = last.Link {
-	}
-
-	call := obj.Appendp(ctxt, last)
-	call.Lineno = ctxt.Cursym.Text.Lineno
-	call.Mode = ctxt.Cursym.Text.Mode
-	call.As = obj.ACALL
-	call.To.Type = obj.TYPE_BRANCH
-	morestack := "runtime.morestack"
-	switch {
-	case ctxt.Cursym.Cfunc != 0:
-		morestack = "runtime.morestackc"
-	case ctxt.Cursym.Text.From3Offset()&obj.NEEDCTXT == 0:
-		morestack = "runtime.morestack_noctxt"
-	}
-	call.To.Sym = obj.Linklookup(ctxt, morestack, 0)
-
-	jmp := obj.Appendp(ctxt, call)
-	jmp.As = obj.AJMP
-	jmp.To.Type = obj.TYPE_BRANCH
-	jmp.Pcond = ctxt.Cursym.Text.Link
-
-	jls.Pcond = call
-	if q1 != nil {
-		q1.Pcond = call
-	}
-
-	return jls
-}
-
-func follow(ctxt *obj.Link, s *obj.LSym) {
-	ctxt.Cursym = s
-
-	firstp := ctxt.NewProg()
-	lastp := firstp
-	xfol(ctxt, s.Text, &lastp)
-	lastp.Link = nil
-	s.Text = firstp.Link
-}
-
-func nofollow(a int) bool {
-	switch a {
-	case obj.AJMP,
-		obj.ARET,
-		AIRETL,
-		AIRETQ,
-		AIRETW,
-		ARETFL,
-		ARETFQ,
-		ARETFW,
-		obj.AUNDEF:
-		return true
-	}
-
-	return false
-}
-
-func pushpop(a int) bool {
-	switch a {
-	case APUSHL,
-		APUSHFL,
-		APUSHQ,
-		APUSHFQ,
-		APUSHW,
-		APUSHFW,
-		APOPL,
-		APOPFL,
-		APOPQ,
-		APOPFQ,
-		APOPW,
-		APOPFW:
-		return true
-	}
-
-	return false
-}
-
-func relinv(a int16) int16 {
-	switch a {
-	case AJEQ:
-		return AJNE
-	case AJNE:
-		return AJEQ
-	case AJLE:
-		return AJGT
-	case AJLS:
-		return AJHI
-	case AJLT:
-		return AJGE
-	case AJMI:
-		return AJPL
-	case AJGE:
-		return AJLT
-	case AJPL:
-		return AJMI
-	case AJGT:
-		return AJLE
-	case AJHI:
-		return AJLS
-	case AJCS:
-		return AJCC
-	case AJCC:
-		return AJCS
-	case AJPS:
-		return AJPC
-	case AJPC:
-		return AJPS
-	case AJOS:
-		return AJOC
-	case AJOC:
-		return AJOS
-	}
-
-	log.Fatalf("unknown relation: %s", obj.Aconv(int(a)))
-	return 0
-}
-
-func xfol(ctxt *obj.Link, p *obj.Prog, last **obj.Prog) {
-	var q *obj.Prog
-	var i int
-	var a int
-
-loop:
-	if p == nil {
-		return
-	}
-	if p.As == obj.AJMP {
-		q = p.Pcond
-		if q != nil && q.As != obj.ATEXT {
-			/* mark instruction as done and continue layout at target of jump */
-			p.Mark = 1
-
-			p = q
-			if p.Mark == 0 {
-				goto loop
-			}
-		}
-	}
-
-	if p.Mark != 0 {
-		/*
-		 * p goes here, but already used it elsewhere.
-		 * copy up to 4 instructions or else branch to other copy.
-		 */
-		i = 0
-		q = p
-		for ; i < 4; i, q = i+1, q.Link {
-			if q == nil {
-				break
-			}
-			if q == *last {
-				break
-			}
-			a = int(q.As)
-			if a == obj.ANOP {
-				i--
-				continue
-			}
-
-			if nofollow(a) || pushpop(a) {
-				break // NOTE(rsc): arm does goto copy
-			}
-			if q.Pcond == nil || q.Pcond.Mark != 0 {
-				continue
-			}
-			if a == obj.ACALL || a == ALOOP {
-				continue
-			}
-			for {
-				if p.As == obj.ANOP {
-					p = p.Link
-					continue
-				}
-
-				q = obj.Copyp(ctxt, p)
-				p = p.Link
-				q.Mark = 1
-				(*last).Link = q
-				*last = q
-				if int(q.As) != a || q.Pcond == nil || q.Pcond.Mark != 0 {
-					continue
-				}
-
-				q.As = relinv(q.As)
-				p = q.Pcond
-				q.Pcond = q.Link
-				q.Link = p
-				xfol(ctxt, q.Link, last)
-				p = q.Link
-				if p.Mark != 0 {
-					return
-				}
-				goto loop
-				/* */
-			}
-		}
-		q = ctxt.NewProg()
-		q.As = obj.AJMP
-		q.Lineno = p.Lineno
-		q.To.Type = obj.TYPE_BRANCH
-		q.To.Offset = p.Pc
-		q.Pcond = p
-		p = q
-	}
-
-	/* emit p */
-	p.Mark = 1
-
-	(*last).Link = p
-	*last = p
-	a = int(p.As)
-
-	/* continue loop with what comes after p */
-	if nofollow(a) {
-		return
-	}
-	if p.Pcond != nil && a != obj.ACALL {
-		/*
-		 * some kind of conditional branch.
-		 * recurse to follow one path.
-		 * continue loop on the other.
-		 */
-		q = obj.Brchain(ctxt, p.Pcond)
-		if q != nil {
-			p.Pcond = q
-		}
-		q = obj.Brchain(ctxt, p.Link)
-		if q != nil {
-			p.Link = q
-		}
-		if p.From.Type == obj.TYPE_CONST {
-			if p.From.Offset == 1 {
-				/*
-				 * expect conditional jump to be taken.
-				 * rewrite so that's the fall-through case.
-				 */
-				p.As = relinv(int16(a))
-
-				q = p.Link
-				p.Link = p.Pcond
-				p.Pcond = q
-			}
-		} else {
-			q = p.Link
-			if q.Mark != 0 {
-				if a != ALOOP {
-					p.As = relinv(int16(a))
-					p.Link = p.Pcond
-					p.Pcond = q
-				}
-			}
-		}
-
-		xfol(ctxt, p.Link, last)
-		if p.Pcond.Mark != 0 {
-			return
-		}
-		p = p.Pcond
-		goto loop
-	}
-
-	p = p.Link
-	goto loop
-}
-
-var unaryDst = map[int]bool{
-	ABSWAPL:    true,
-	ABSWAPQ:    true,
-	ACMPXCHG8B: true,
-	ADECB:      true,
-	ADECL:      true,
-	ADECQ:      true,
-	ADECW:      true,
-	AINCB:      true,
-	AINCL:      true,
-	AINCQ:      true,
-	AINCW:      true,
-	ANEGB:      true,
-	ANEGL:      true,
-	ANEGQ:      true,
-	ANEGW:      true,
-	ANOTB:      true,
-	ANOTL:      true,
-	ANOTQ:      true,
-	ANOTW:      true,
-	APOPL:      true,
-	APOPQ:      true,
-	APOPW:      true,
-	ASETCC:     true,
-	ASETCS:     true,
-	ASETEQ:     true,
-	ASETGE:     true,
-	ASETGT:     true,
-	ASETHI:     true,
-	ASETLE:     true,
-	ASETLS:     true,
-	ASETLT:     true,
-	ASETMI:     true,
-	ASETNE:     true,
-	ASETOC:     true,
-	ASETOS:     true,
-	ASETPC:     true,
-	ASETPL:     true,
-	ASETPS:     true,
-	AFFREE:     true,
-	AFLDENV:    true,
-	AFSAVE:     true,
-	AFSTCW:     true,
-	AFSTENV:    true,
-	AFSTSW:     true,
-	AFXSAVE:    true,
-	AFXSAVE64:  true,
-	ASTMXCSR:   true,
-}
-
-var Linkamd64 = obj.LinkArch{
-	ByteOrder:  binary.LittleEndian,
-	Name:       "amd64",
-	Thechar:    '6',
-	Preprocess: preprocess,
-	Assemble:   span6,
-	Follow:     follow,
-	Progedit:   progedit,
-	UnaryDst:   unaryDst,
-	Minlc:      1,
-	Ptrsize:    8,
-	Regsize:    8,
-}
-
-var Linkamd64p32 = obj.LinkArch{
-	ByteOrder:  binary.LittleEndian,
-	Name:       "amd64p32",
-	Thechar:    '6',
-	Preprocess: preprocess,
-	Assemble:   span6,
-	Follow:     follow,
-	Progedit:   progedit,
-	UnaryDst:   unaryDst,
-	Minlc:      1,
-	Ptrsize:    4,
-	Regsize:    8,
-}
-
-var Link386 = obj.LinkArch{
-	ByteOrder:  binary.LittleEndian,
-	Name:       "386",
-	Thechar:    '8',
-	Preprocess: preprocess,
-	Assemble:   span6,
-	Follow:     follow,
-	Progedit:   progedit,
-	UnaryDst:   unaryDst,
-	Minlc:      1,
-	Ptrsize:    4,
-	Regsize:    4,
-}
diff --git a/src/cmd/internal/obj/x86/obj6_test.go b/src/cmd/internal/obj/x86/obj6_test.go
deleted file mode 100644
index 6302107..0000000
--- a/src/cmd/internal/obj/x86/obj6_test.go
+++ /dev/null
@@ -1,170 +0,0 @@
-package x86_test
-
-import (
-	"bufio"
-	"bytes"
-	"fmt"
-	"go/build"
-	"internal/testenv"
-	"io/ioutil"
-	"os"
-	"os/exec"
-	"path/filepath"
-	"regexp"
-	"strconv"
-	"strings"
-	"testing"
-)
-
-const testdata = `
-MOVQ AX, AX -> MOVQ AX, AX
-
-LEAQ name(SB), AX -> MOVQ name at GOT(SB), AX
-LEAQ name+10(SB), AX -> MOVQ name at GOT(SB), AX; ADDQ $10, AX
-MOVQ $name(SB), AX -> MOVQ name at GOT(SB), AX
-MOVQ $name+10(SB), AX -> MOVQ name at GOT(SB), AX; ADDQ $10, AX
-
-MOVQ name(SB), AX -> MOVQ name at GOT(SB), R15; MOVQ (R15), AX
-MOVQ name+10(SB), AX -> MOVQ name at GOT(SB), R15; MOVQ 10(R15), AX
-
-CMPQ name(SB), $0 -> MOVQ name at GOT(SB), R15; CMPQ (R15), $0
-
-MOVQ $1, name(SB) -> MOVQ name at GOT(SB), R15; MOVQ $1, (R15)
-MOVQ $1, name+10(SB) -> MOVQ name at GOT(SB), R15; MOVQ $1, 10(R15)
-`
-
-type ParsedTestData struct {
-	input              string
-	marks              []int
-	marker_to_input    map[int][]string
-	marker_to_expected map[int][]string
-	marker_to_output   map[int][]string
-}
-
-const marker_start = 1234
-
-func parseTestData(t *testing.T) *ParsedTestData {
-	r := &ParsedTestData{}
-	scanner := bufio.NewScanner(strings.NewReader(testdata))
-	r.marker_to_input = make(map[int][]string)
-	r.marker_to_expected = make(map[int][]string)
-	marker := marker_start
-	input_insns := []string{}
-	for scanner.Scan() {
-		line := scanner.Text()
-		if len(strings.TrimSpace(line)) == 0 {
-			continue
-		}
-		parts := strings.Split(line, "->")
-		if len(parts) != 2 {
-			t.Fatalf("malformed line %v", line)
-		}
-		r.marks = append(r.marks, marker)
-		marker_insn := fmt.Sprintf("MOVQ $%d, AX", marker)
-		input_insns = append(input_insns, marker_insn)
-		for _, input_insn := range strings.Split(parts[0], ";") {
-			input_insns = append(input_insns, input_insn)
-			r.marker_to_input[marker] = append(r.marker_to_input[marker], normalize(input_insn))
-		}
-		for _, expected_insn := range strings.Split(parts[1], ";") {
-			r.marker_to_expected[marker] = append(r.marker_to_expected[marker], normalize(expected_insn))
-		}
-		marker++
-	}
-	r.input = "TEXT ·foo(SB),$0\n" + strings.Join(input_insns, "\n") + "\n"
-	return r
-}
-
-var spaces_re *regexp.Regexp = regexp.MustCompile("\\s+")
-var marker_re *regexp.Regexp = regexp.MustCompile("MOVQ \\$([0-9]+), AX")
-
-func normalize(s string) string {
-	return spaces_re.ReplaceAllLiteralString(strings.TrimSpace(s), " ")
-}
-
-func asmOutput(t *testing.T, s string) []byte {
-	tmpdir, err := ioutil.TempDir("", "progedittest")
-	if err != nil {
-		t.Fatal(err)
-	}
-	defer os.RemoveAll(tmpdir)
-	tmpfile, err := os.Create(filepath.Join(tmpdir, "input.s"))
-	if err != nil {
-		t.Fatal(err)
-	}
-	defer tmpfile.Close()
-	_, err = tmpfile.WriteString(s)
-	if err != nil {
-		t.Fatal(err)
-	}
-	gofolder := filepath.Join(build.Default.GOROOT, "bin")
-	if gobin := os.Getenv("GOBIN"); len(gobin) != 0 {
-		gofolder = gobin
-	}
-
-	cmd := exec.Command(
-		filepath.Join(gofolder, "go"), "tool", "asm", "-S", "-dynlink",
-		"-o", filepath.Join(tmpdir, "output.6"), tmpfile.Name())
-
-	var env []string
-	for _, v := range os.Environ() {
-		if !strings.HasPrefix(v, "GOARCH=") {
-			env = append(env, v)
-		}
-	}
-	cmd.Env = append(env, "GOARCH=amd64")
-	asmout, err := cmd.CombinedOutput()
-	if err != nil {
-		t.Fatalf("error %s output %s", err, asmout)
-	}
-	return asmout
-}
-
-func parseOutput(t *testing.T, td *ParsedTestData, asmout []byte) {
-	scanner := bufio.NewScanner(bytes.NewReader(asmout))
-	marker := regexp.MustCompile("MOVQ \\$([0-9]+), AX")
-	mark := -1
-	td.marker_to_output = make(map[int][]string)
-	for scanner.Scan() {
-		line := scanner.Text()
-		if line[0] != '\t' {
-			continue
-		}
-		parts := strings.SplitN(line, "\t", 3)
-		if len(parts) != 3 {
-			continue
-		}
-		n := normalize(parts[2])
-		mark_matches := marker.FindStringSubmatch(n)
-		if mark_matches != nil {
-			mark, _ = strconv.Atoi(mark_matches[1])
-			if _, ok := td.marker_to_input[mark]; !ok {
-				t.Fatalf("unexpected marker %d", mark)
-			}
-		} else if mark != -1 {
-			td.marker_to_output[mark] = append(td.marker_to_output[mark], n)
-		}
-	}
-}
-
-func TestDynlink(t *testing.T) {
-	testenv.MustHaveGoBuild(t)
-
-	testdata := parseTestData(t)
-	asmout := asmOutput(t, testdata.input)
-	parseOutput(t, testdata, asmout)
-	for _, m := range testdata.marks {
-		i := strings.Join(testdata.marker_to_input[m], "; ")
-		o := strings.Join(testdata.marker_to_output[m], "; ")
-		e := strings.Join(testdata.marker_to_expected[m], "; ")
-		if o != e {
-			if o == i {
-				t.Errorf("%s was unchanged; should have become %s", i, e)
-			} else {
-				t.Errorf("%s became %s; should have become %s", i, o, e)
-			}
-		} else if i != e {
-			t.Logf("%s correctly became %s", i, o)
-		}
-	}
-}
diff --git a/src/cmd/link/doc.go b/src/cmd/link/doc.go
deleted file mode 100644
index 479988e..0000000
--- a/src/cmd/link/doc.go
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-/*
-Link, typically invoked as ``go tool link,'' reads the Go archive or object
-for a package main, along with its dependencies, and combines them
-into an executable binary.
-
-Command Line
-
-Usage:
-
-	go tool link [flags] main.a
-
-Flags:
-
-	-B note
-		Add an ELF_NT_GNU_BUILD_ID note when using ELF.
-		The value should start with 0x and be an even number of hex digits.
-	-D address
-		Set data segment address.
-	-E entry
-		Set entry symbol name.
-	-H type
-		Set executable format type.
-		The default format is inferred from GOOS and GOARCH.
-		On Windows, -H windowsgui writes a "GUI binary" instead of a "console binary."
-	-I interpreter
-		Set the ELF dynamic linker to use.
-	-L dir1 -L dir2
-		Search for imported packages in dir1, dir2, etc,
-		after consulting $GOROOT/pkg/$GOOS_$GOARCH.
-	-R quantum
-		Set address rounding quantum.
-	-T address
-		Set text segment address.
-	-V
-		Print the linker version and exit.
-	-X importpath.name=value
-		Set the value of the string variable in importpath named name to value.
-		Note that before Go 1.5 this option took two separate arguments.
-		Now it takes one argument split on the first = sign.
-	-buildmode mode
-		Set build mode (default exe).
-	-cpuprofile file
-		Write CPU profile to file.
-	-d
-		Disable generation of dynamic executables.
-		The emitted code is the same in either case; the option
-		controls only whether a dynamic header is included.
-		The dynamic header is on by default, even without any
-		references to dynamic libraries, because many common
-		system tools now assume the presence of the header.
-	-extld linker
-		Set the external linker (default "clang" or "gcc").
-	-extldflags flags
-		Set space-separated flags to pass to the external linker.
-	-f
-		Ignore version mismatch in the linked archives.
-	-g
-		Disable Go package data checks.
-	-installsuffix suffix
-		Look for packages in $GOROOT/pkg/$GOOS_$GOARCH_suffix
-		instead of $GOROOT/pkg/$GOOS_$GOARCH.
-	-linkmode mode
-		Set link mode (internal, external, auto).
-		This sets the linking mode as described in cmd/cgo/doc.go.
-	-linkshared
-		Link against installed Go shared libraries (experimental).
-	-memprofile file
-		Write memory profile to file.
-	-memprofilerate rate
-		Set runtime.MemProfileRate to rate.
-	-o file
-		Write output to file (default a.out, or a.out.exe on Windows).
-	-r dir1:dir2:...
-		Set the ELF dynamic linker search path.
-	-race
-		Link with race detection libraries.
-	-s
-		Omit the symbol table and debug information.
-	-shared
-		Generated shared object (implies -linkmode external; experimental).
-	-tmpdir dir
-		Write temporary files to dir.
-		Temporary files are only used in external linking mode.
-	-v
-		Print trace of linker operations.
-	-w
-		Omit the DWARF symbol table.
-*/
-package main
diff --git a/src/cmd/link/internal/amd64/asm.go b/src/cmd/link/internal/amd64/asm.go
deleted file mode 100644
index 74ec9dd..0000000
--- a/src/cmd/link/internal/amd64/asm.go
+++ /dev/null
@@ -1,817 +0,0 @@
-// Inferno utils/6l/asm.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6l/asm.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package amd64
-
-import (
-	"cmd/internal/obj"
-	"cmd/link/internal/ld"
-	"debug/elf"
-	"fmt"
-	"log"
-)
-
-func PADDR(x uint32) uint32 {
-	return x &^ 0x80000000
-}
-
-var zeroes string
-
-func Addcall(ctxt *ld.Link, s *ld.LSym, t *ld.LSym) int64 {
-	s.Reachable = true
-	i := s.Size
-	s.Size += 4
-	ld.Symgrow(ctxt, s, s.Size)
-	r := ld.Addrel(s)
-	r.Sym = t
-	r.Off = int32(i)
-	r.Type = obj.R_CALL
-	r.Siz = 4
-	return i + int64(r.Siz)
-}
-
-func gentext() {
-	if !ld.DynlinkingGo() {
-		return
-	}
-	addmoduledata := ld.Linklookup(ld.Ctxt, "runtime.addmoduledata", 0)
-	if addmoduledata.Type == obj.STEXT {
-		// we're linking a module containing the runtime -> no need for
-		// an init function
-		return
-	}
-	addmoduledata.Reachable = true
-	initfunc := ld.Linklookup(ld.Ctxt, "go.link.addmoduledata", 0)
-	initfunc.Type = obj.STEXT
-	initfunc.Local = true
-	initfunc.Reachable = true
-	o := func(op ...uint8) {
-		for _, op1 := range op {
-			ld.Adduint8(ld.Ctxt, initfunc, op1)
-		}
-	}
-	// 0000000000000000 <local.dso_init>:
-	//    0:	48 8d 3d 00 00 00 00 	lea    0x0(%rip),%rdi        # 7 <local.dso_init+0x7>
-	// 			3: R_X86_64_PC32	runtime.firstmoduledata-0x4
-	o(0x48, 0x8d, 0x3d)
-	ld.Addpcrelplus(ld.Ctxt, initfunc, ld.Linklookup(ld.Ctxt, "runtime.firstmoduledata", 0), 0)
-	//    7:	e8 00 00 00 00       	callq  c <local.dso_init+0xc>
-	// 			8: R_X86_64_PLT32	runtime.addmoduledata-0x4
-	o(0xe8)
-	Addcall(ld.Ctxt, initfunc, addmoduledata)
-	//    c:	c3                   	retq
-	o(0xc3)
-	if ld.Ctxt.Etextp != nil {
-		ld.Ctxt.Etextp.Next = initfunc
-	} else {
-		ld.Ctxt.Textp = initfunc
-	}
-	ld.Ctxt.Etextp = initfunc
-	initarray_entry := ld.Linklookup(ld.Ctxt, "go.link.addmoduledatainit", 0)
-	initarray_entry.Reachable = true
-	initarray_entry.Local = true
-	initarray_entry.Type = obj.SINITARR
-	ld.Addaddr(ld.Ctxt, initarray_entry, initfunc)
-}
-
-func adddynrela(rela *ld.LSym, s *ld.LSym, r *ld.Reloc) {
-	ld.Addaddrplus(ld.Ctxt, rela, s, int64(r.Off))
-	ld.Adduint64(ld.Ctxt, rela, ld.R_X86_64_RELATIVE)
-	ld.Addaddrplus(ld.Ctxt, rela, r.Sym, r.Add) // Addend
-}
-
-func adddynrel(s *ld.LSym, r *ld.Reloc) {
-	targ := r.Sym
-	ld.Ctxt.Cursym = s
-
-	switch r.Type {
-	default:
-		if r.Type >= 256 {
-			ld.Diag("unexpected relocation type %d", r.Type)
-			return
-		}
-
-		// Handle relocations found in ELF object files.
-	case 256 + ld.R_X86_64_PC32:
-		if targ.Type == obj.SDYNIMPORT {
-			ld.Diag("unexpected R_X86_64_PC32 relocation for dynamic symbol %s", targ.Name)
-		}
-		if targ.Type == 0 || targ.Type == obj.SXREF {
-			ld.Diag("unknown symbol %s in pcrel", targ.Name)
-		}
-		r.Type = obj.R_PCREL
-		r.Add += 4
-		return
-
-	case 256 + ld.R_X86_64_PLT32:
-		r.Type = obj.R_PCREL
-		r.Add += 4
-		if targ.Type == obj.SDYNIMPORT {
-			addpltsym(targ)
-			r.Sym = ld.Linklookup(ld.Ctxt, ".plt", 0)
-			r.Add += int64(targ.Plt)
-		}
-
-		return
-
-	case 256 + ld.R_X86_64_GOTPCREL:
-		if targ.Type != obj.SDYNIMPORT {
-			// have symbol
-			if r.Off >= 2 && s.P[r.Off-2] == 0x8b {
-				// turn MOVQ of GOT entry into LEAQ of symbol itself
-				s.P[r.Off-2] = 0x8d
-
-				r.Type = obj.R_PCREL
-				r.Add += 4
-				return
-			}
-		}
-
-		// fall back to using GOT and hope for the best (CMOV*)
-		// TODO: just needs relocation, no need to put in .dynsym
-		addgotsym(targ)
-
-		r.Type = obj.R_PCREL
-		r.Sym = ld.Linklookup(ld.Ctxt, ".got", 0)
-		r.Add += 4
-		r.Add += int64(targ.Got)
-		return
-
-	case 256 + ld.R_X86_64_64:
-		if targ.Type == obj.SDYNIMPORT {
-			ld.Diag("unexpected R_X86_64_64 relocation for dynamic symbol %s", targ.Name)
-		}
-		r.Type = obj.R_ADDR
-		return
-
-	// Handle relocations found in Mach-O object files.
-	case 512 + ld.MACHO_X86_64_RELOC_UNSIGNED*2 + 0,
-		512 + ld.MACHO_X86_64_RELOC_SIGNED*2 + 0,
-		512 + ld.MACHO_X86_64_RELOC_BRANCH*2 + 0:
-		// TODO: What is the difference between all these?
-		r.Type = obj.R_ADDR
-
-		if targ.Type == obj.SDYNIMPORT {
-			ld.Diag("unexpected reloc for dynamic symbol %s", targ.Name)
-		}
-		return
-
-	case 512 + ld.MACHO_X86_64_RELOC_BRANCH*2 + 1:
-		if targ.Type == obj.SDYNIMPORT {
-			addpltsym(targ)
-			r.Sym = ld.Linklookup(ld.Ctxt, ".plt", 0)
-			r.Add = int64(targ.Plt)
-			r.Type = obj.R_PCREL
-			return
-		}
-		fallthrough
-
-		// fall through
-	case 512 + ld.MACHO_X86_64_RELOC_UNSIGNED*2 + 1,
-		512 + ld.MACHO_X86_64_RELOC_SIGNED*2 + 1,
-		512 + ld.MACHO_X86_64_RELOC_SIGNED_1*2 + 1,
-		512 + ld.MACHO_X86_64_RELOC_SIGNED_2*2 + 1,
-		512 + ld.MACHO_X86_64_RELOC_SIGNED_4*2 + 1:
-		r.Type = obj.R_PCREL
-
-		if targ.Type == obj.SDYNIMPORT {
-			ld.Diag("unexpected pc-relative reloc for dynamic symbol %s", targ.Name)
-		}
-		return
-
-	case 512 + ld.MACHO_X86_64_RELOC_GOT_LOAD*2 + 1:
-		if targ.Type != obj.SDYNIMPORT {
-			// have symbol
-			// turn MOVQ of GOT entry into LEAQ of symbol itself
-			if r.Off < 2 || s.P[r.Off-2] != 0x8b {
-				ld.Diag("unexpected GOT_LOAD reloc for non-dynamic symbol %s", targ.Name)
-				return
-			}
-
-			s.P[r.Off-2] = 0x8d
-			r.Type = obj.R_PCREL
-			return
-		}
-		fallthrough
-
-		// fall through
-	case 512 + ld.MACHO_X86_64_RELOC_GOT*2 + 1:
-		if targ.Type != obj.SDYNIMPORT {
-			ld.Diag("unexpected GOT reloc for non-dynamic symbol %s", targ.Name)
-		}
-		addgotsym(targ)
-		r.Type = obj.R_PCREL
-		r.Sym = ld.Linklookup(ld.Ctxt, ".got", 0)
-		r.Add += int64(targ.Got)
-		return
-	}
-
-	// Handle references to ELF symbols from our own object files.
-	if targ.Type != obj.SDYNIMPORT {
-		return
-	}
-
-	switch r.Type {
-	case obj.R_CALL,
-		obj.R_PCREL:
-		if ld.HEADTYPE == obj.Hwindows {
-			// nothing to do, the relocation will be laid out in pereloc1
-			return
-		} else {
-			// for both ELF and Mach-O
-			addpltsym(targ)
-			r.Sym = ld.Linklookup(ld.Ctxt, ".plt", 0)
-			r.Add = int64(targ.Plt)
-			return
-		}
-
-	case obj.R_ADDR:
-		if s.Type == obj.STEXT && ld.Iself {
-			if ld.HEADTYPE == obj.Hsolaris {
-				addpltsym(targ)
-				r.Sym = ld.Linklookup(ld.Ctxt, ".plt", 0)
-				r.Add += int64(targ.Plt)
-				return
-			}
-			// The code is asking for the address of an external
-			// function.  We provide it with the address of the
-			// correspondent GOT symbol.
-			addgotsym(targ)
-
-			r.Sym = ld.Linklookup(ld.Ctxt, ".got", 0)
-			r.Add += int64(targ.Got)
-			return
-		}
-
-		if s.Type != obj.SDATA {
-			break
-		}
-		if ld.Iself {
-			ld.Adddynsym(ld.Ctxt, targ)
-			rela := ld.Linklookup(ld.Ctxt, ".rela", 0)
-			ld.Addaddrplus(ld.Ctxt, rela, s, int64(r.Off))
-			if r.Siz == 8 {
-				ld.Adduint64(ld.Ctxt, rela, ld.ELF64_R_INFO(uint32(targ.Dynid), ld.R_X86_64_64))
-			} else {
-				ld.Adduint64(ld.Ctxt, rela, ld.ELF64_R_INFO(uint32(targ.Dynid), ld.R_X86_64_32))
-			}
-			ld.Adduint64(ld.Ctxt, rela, uint64(r.Add))
-			r.Type = 256 // ignore during relocsym
-			return
-		}
-
-		if ld.HEADTYPE == obj.Hdarwin && s.Size == int64(ld.Thearch.Ptrsize) && r.Off == 0 {
-			// Mach-O relocations are a royal pain to lay out.
-			// They use a compact stateful bytecode representation
-			// that is too much bother to deal with.
-			// Instead, interpret the C declaration
-			//	void *_Cvar_stderr = &stderr;
-			// as making _Cvar_stderr the name of a GOT entry
-			// for stderr.  This is separate from the usual GOT entry,
-			// just in case the C code assigns to the variable,
-			// and of course it only works for single pointers,
-			// but we only need to support cgo and that's all it needs.
-			ld.Adddynsym(ld.Ctxt, targ)
-
-			got := ld.Linklookup(ld.Ctxt, ".got", 0)
-			s.Type = got.Type | obj.SSUB
-			s.Outer = got
-			s.Sub = got.Sub
-			got.Sub = s
-			s.Value = got.Size
-			ld.Adduint64(ld.Ctxt, got, 0)
-			ld.Adduint32(ld.Ctxt, ld.Linklookup(ld.Ctxt, ".linkedit.got", 0), uint32(targ.Dynid))
-			r.Type = 256 // ignore during relocsym
-			return
-		}
-
-		if ld.HEADTYPE == obj.Hwindows {
-			// nothing to do, the relocation will be laid out in pereloc1
-			return
-		}
-	}
-
-	ld.Ctxt.Cursym = s
-	ld.Diag("unsupported relocation for dynamic symbol %s (type=%d stype=%d)", targ.Name, r.Type, targ.Type)
-}
-
-func elfreloc1(r *ld.Reloc, sectoff int64) int {
-	ld.Thearch.Vput(uint64(sectoff))
-
-	elfsym := r.Xsym.Elfsym
-	switch r.Type {
-	default:
-		return -1
-
-	case obj.R_ADDR:
-		if r.Siz == 4 {
-			ld.Thearch.Vput(ld.R_X86_64_32 | uint64(elfsym)<<32)
-		} else if r.Siz == 8 {
-			ld.Thearch.Vput(ld.R_X86_64_64 | uint64(elfsym)<<32)
-		} else {
-			return -1
-		}
-
-	case obj.R_TLS_LE:
-		if r.Siz == 4 {
-			ld.Thearch.Vput(ld.R_X86_64_TPOFF32 | uint64(elfsym)<<32)
-		} else {
-			return -1
-		}
-
-	case obj.R_TLS_IE:
-		if r.Siz == 4 {
-			ld.Thearch.Vput(ld.R_X86_64_GOTTPOFF | uint64(elfsym)<<32)
-		} else {
-			return -1
-		}
-
-	case obj.R_CALL:
-		if r.Siz == 4 {
-			if r.Xsym.Type == obj.SDYNIMPORT {
-				if ld.DynlinkingGo() {
-					ld.Thearch.Vput(ld.R_X86_64_PLT32 | uint64(elfsym)<<32)
-				} else {
-					ld.Thearch.Vput(ld.R_X86_64_GOTPCREL | uint64(elfsym)<<32)
-				}
-			} else {
-				ld.Thearch.Vput(ld.R_X86_64_PC32 | uint64(elfsym)<<32)
-			}
-		} else {
-			return -1
-		}
-
-	case obj.R_PCREL:
-		if r.Siz == 4 {
-			if r.Xsym.Type == obj.SDYNIMPORT && r.Xsym.ElfType == elf.STT_FUNC {
-				ld.Thearch.Vput(ld.R_X86_64_PLT32 | uint64(elfsym)<<32)
-			} else {
-				ld.Thearch.Vput(ld.R_X86_64_PC32 | uint64(elfsym)<<32)
-			}
-		} else {
-			return -1
-		}
-
-	case obj.R_GOTPCREL:
-		if r.Siz == 4 {
-			ld.Thearch.Vput(ld.R_X86_64_GOTPCREL | uint64(elfsym)<<32)
-		} else {
-			return -1
-		}
-	}
-
-	ld.Thearch.Vput(uint64(r.Xadd))
-	return 0
-}
-
-func machoreloc1(r *ld.Reloc, sectoff int64) int {
-	var v uint32
-
-	rs := r.Xsym
-
-	if rs.Type == obj.SHOSTOBJ || r.Type == obj.R_PCREL {
-		if rs.Dynid < 0 {
-			ld.Diag("reloc %d to non-macho symbol %s type=%d", r.Type, rs.Name, rs.Type)
-			return -1
-		}
-
-		v = uint32(rs.Dynid)
-		v |= 1 << 27 // external relocation
-	} else {
-		v = uint32(rs.Sect.Extnum)
-		if v == 0 {
-			ld.Diag("reloc %d to symbol %s in non-macho section %s type=%d", r.Type, rs.Name, rs.Sect.Name, rs.Type)
-			return -1
-		}
-	}
-
-	switch r.Type {
-	default:
-		return -1
-
-	case obj.R_ADDR:
-		v |= ld.MACHO_X86_64_RELOC_UNSIGNED << 28
-
-	case obj.R_CALL:
-		v |= 1 << 24 // pc-relative bit
-		v |= ld.MACHO_X86_64_RELOC_BRANCH << 28
-
-		// NOTE: Only works with 'external' relocation. Forced above.
-	case obj.R_PCREL:
-		v |= 1 << 24 // pc-relative bit
-		v |= ld.MACHO_X86_64_RELOC_SIGNED << 28
-	}
-
-	switch r.Siz {
-	default:
-		return -1
-
-	case 1:
-		v |= 0 << 25
-
-	case 2:
-		v |= 1 << 25
-
-	case 4:
-		v |= 2 << 25
-
-	case 8:
-		v |= 3 << 25
-	}
-
-	ld.Thearch.Lput(uint32(sectoff))
-	ld.Thearch.Lput(v)
-	return 0
-}
-
-func pereloc1(r *ld.Reloc, sectoff int64) bool {
-	var v uint32
-
-	rs := r.Xsym
-
-	if rs.Dynid < 0 {
-		ld.Diag("reloc %d to non-coff symbol %s type=%d", r.Type, rs.Name, rs.Type)
-		return false
-	}
-
-	ld.Thearch.Lput(uint32(sectoff))
-	ld.Thearch.Lput(uint32(rs.Dynid))
-
-	switch r.Type {
-	default:
-		return false
-
-	case obj.R_ADDR:
-		if r.Siz == 8 {
-			v = ld.IMAGE_REL_AMD64_ADDR64
-		} else {
-			v = ld.IMAGE_REL_AMD64_ADDR32
-		}
-
-	case obj.R_CALL,
-		obj.R_PCREL:
-		v = ld.IMAGE_REL_AMD64_REL32
-	}
-
-	ld.Thearch.Wput(uint16(v))
-
-	return true
-}
-
-func archreloc(r *ld.Reloc, s *ld.LSym, val *int64) int {
-	return -1
-}
-
-func archrelocvariant(r *ld.Reloc, s *ld.LSym, t int64) int64 {
-	log.Fatalf("unexpected relocation variant")
-	return t
-}
-
-func elfsetupplt() {
-	plt := ld.Linklookup(ld.Ctxt, ".plt", 0)
-	got := ld.Linklookup(ld.Ctxt, ".got.plt", 0)
-	if plt.Size == 0 {
-		// pushq got+8(IP)
-		ld.Adduint8(ld.Ctxt, plt, 0xff)
-
-		ld.Adduint8(ld.Ctxt, plt, 0x35)
-		ld.Addpcrelplus(ld.Ctxt, plt, got, 8)
-
-		// jmpq got+16(IP)
-		ld.Adduint8(ld.Ctxt, plt, 0xff)
-
-		ld.Adduint8(ld.Ctxt, plt, 0x25)
-		ld.Addpcrelplus(ld.Ctxt, plt, got, 16)
-
-		// nopl 0(AX)
-		ld.Adduint32(ld.Ctxt, plt, 0x00401f0f)
-
-		// assume got->size == 0 too
-		ld.Addaddrplus(ld.Ctxt, got, ld.Linklookup(ld.Ctxt, ".dynamic", 0), 0)
-
-		ld.Adduint64(ld.Ctxt, got, 0)
-		ld.Adduint64(ld.Ctxt, got, 0)
-	}
-}
-
-func addpltsym(s *ld.LSym) {
-	if s.Plt >= 0 {
-		return
-	}
-
-	ld.Adddynsym(ld.Ctxt, s)
-
-	if ld.Iself {
-		plt := ld.Linklookup(ld.Ctxt, ".plt", 0)
-		got := ld.Linklookup(ld.Ctxt, ".got.plt", 0)
-		rela := ld.Linklookup(ld.Ctxt, ".rela.plt", 0)
-		if plt.Size == 0 {
-			elfsetupplt()
-		}
-
-		// jmpq *got+size(IP)
-		ld.Adduint8(ld.Ctxt, plt, 0xff)
-
-		ld.Adduint8(ld.Ctxt, plt, 0x25)
-		ld.Addpcrelplus(ld.Ctxt, plt, got, got.Size)
-
-		// add to got: pointer to current pos in plt
-		ld.Addaddrplus(ld.Ctxt, got, plt, plt.Size)
-
-		// pushq $x
-		ld.Adduint8(ld.Ctxt, plt, 0x68)
-
-		ld.Adduint32(ld.Ctxt, plt, uint32((got.Size-24-8)/8))
-
-		// jmpq .plt
-		ld.Adduint8(ld.Ctxt, plt, 0xe9)
-
-		ld.Adduint32(ld.Ctxt, plt, uint32(-(plt.Size + 4)))
-
-		// rela
-		ld.Addaddrplus(ld.Ctxt, rela, got, got.Size-8)
-
-		ld.Adduint64(ld.Ctxt, rela, ld.ELF64_R_INFO(uint32(s.Dynid), ld.R_X86_64_JMP_SLOT))
-		ld.Adduint64(ld.Ctxt, rela, 0)
-
-		s.Plt = int32(plt.Size - 16)
-	} else if ld.HEADTYPE == obj.Hdarwin {
-		// To do lazy symbol lookup right, we're supposed
-		// to tell the dynamic loader which library each
-		// symbol comes from and format the link info
-		// section just so.  I'm too lazy (ha!) to do that
-		// so for now we'll just use non-lazy pointers,
-		// which don't need to be told which library to use.
-		//
-		// http://networkpx.blogspot.com/2009/09/about-lcdyldinfoonly-command.html
-		// has details about what we're avoiding.
-
-		addgotsym(s)
-		plt := ld.Linklookup(ld.Ctxt, ".plt", 0)
-
-		ld.Adduint32(ld.Ctxt, ld.Linklookup(ld.Ctxt, ".linkedit.plt", 0), uint32(s.Dynid))
-
-		// jmpq *got+size(IP)
-		s.Plt = int32(plt.Size)
-
-		ld.Adduint8(ld.Ctxt, plt, 0xff)
-		ld.Adduint8(ld.Ctxt, plt, 0x25)
-		ld.Addpcrelplus(ld.Ctxt, plt, ld.Linklookup(ld.Ctxt, ".got", 0), int64(s.Got))
-	} else {
-		ld.Diag("addpltsym: unsupported binary format")
-	}
-}
-
-func addgotsym(s *ld.LSym) {
-	if s.Got >= 0 {
-		return
-	}
-
-	ld.Adddynsym(ld.Ctxt, s)
-	got := ld.Linklookup(ld.Ctxt, ".got", 0)
-	s.Got = int32(got.Size)
-	ld.Adduint64(ld.Ctxt, got, 0)
-
-	if ld.Iself {
-		rela := ld.Linklookup(ld.Ctxt, ".rela", 0)
-		ld.Addaddrplus(ld.Ctxt, rela, got, int64(s.Got))
-		ld.Adduint64(ld.Ctxt, rela, ld.ELF64_R_INFO(uint32(s.Dynid), ld.R_X86_64_GLOB_DAT))
-		ld.Adduint64(ld.Ctxt, rela, 0)
-	} else if ld.HEADTYPE == obj.Hdarwin {
-		ld.Adduint32(ld.Ctxt, ld.Linklookup(ld.Ctxt, ".linkedit.got", 0), uint32(s.Dynid))
-	} else {
-		ld.Diag("addgotsym: unsupported binary format")
-	}
-}
-
-func asmb() {
-	if ld.Debug['v'] != 0 {
-		fmt.Fprintf(&ld.Bso, "%5.2f asmb\n", obj.Cputime())
-	}
-	ld.Bso.Flush()
-
-	if ld.Debug['v'] != 0 {
-		fmt.Fprintf(&ld.Bso, "%5.2f codeblk\n", obj.Cputime())
-	}
-	ld.Bso.Flush()
-
-	if ld.Iself {
-		ld.Asmbelfsetup()
-	}
-
-	sect := ld.Segtext.Sect
-	ld.Cseek(int64(sect.Vaddr - ld.Segtext.Vaddr + ld.Segtext.Fileoff))
-	ld.Codeblk(int64(sect.Vaddr), int64(sect.Length))
-	for sect = sect.Next; sect != nil; sect = sect.Next {
-		ld.Cseek(int64(sect.Vaddr - ld.Segtext.Vaddr + ld.Segtext.Fileoff))
-		ld.Datblk(int64(sect.Vaddr), int64(sect.Length))
-	}
-
-	if ld.Segrodata.Filelen > 0 {
-		if ld.Debug['v'] != 0 {
-			fmt.Fprintf(&ld.Bso, "%5.2f rodatblk\n", obj.Cputime())
-		}
-		ld.Bso.Flush()
-
-		ld.Cseek(int64(ld.Segrodata.Fileoff))
-		ld.Datblk(int64(ld.Segrodata.Vaddr), int64(ld.Segrodata.Filelen))
-	}
-
-	if ld.Debug['v'] != 0 {
-		fmt.Fprintf(&ld.Bso, "%5.2f datblk\n", obj.Cputime())
-	}
-	ld.Bso.Flush()
-
-	ld.Cseek(int64(ld.Segdata.Fileoff))
-	ld.Datblk(int64(ld.Segdata.Vaddr), int64(ld.Segdata.Filelen))
-
-	machlink := int64(0)
-	if ld.HEADTYPE == obj.Hdarwin {
-		if ld.Debug['v'] != 0 {
-			fmt.Fprintf(&ld.Bso, "%5.2f dwarf\n", obj.Cputime())
-		}
-
-		dwarfoff := ld.Rnd(int64(uint64(ld.HEADR)+ld.Segtext.Length), int64(ld.INITRND)) + ld.Rnd(int64(ld.Segdata.Filelen), int64(ld.INITRND))
-		ld.Cseek(dwarfoff)
-
-		ld.Segdwarf.Fileoff = uint64(ld.Cpos())
-		ld.Dwarfemitdebugsections()
-		ld.Segdwarf.Filelen = uint64(ld.Cpos()) - ld.Segdwarf.Fileoff
-
-		machlink = ld.Domacholink()
-	}
-
-	switch ld.HEADTYPE {
-	default:
-		ld.Diag("unknown header type %d", ld.HEADTYPE)
-		fallthrough
-
-	case obj.Hplan9,
-		obj.Helf:
-		break
-
-	case obj.Hdarwin:
-		ld.Debug['8'] = 1 /* 64-bit addresses */
-
-	case obj.Hlinux,
-		obj.Hfreebsd,
-		obj.Hnetbsd,
-		obj.Hopenbsd,
-		obj.Hdragonfly,
-		obj.Hsolaris:
-		ld.Debug['8'] = 1 /* 64-bit addresses */
-
-	case obj.Hnacl,
-		obj.Hwindows:
-		break
-	}
-
-	ld.Symsize = 0
-	ld.Spsize = 0
-	ld.Lcsize = 0
-	symo := int64(0)
-	if ld.Debug['s'] == 0 {
-		if ld.Debug['v'] != 0 {
-			fmt.Fprintf(&ld.Bso, "%5.2f sym\n", obj.Cputime())
-		}
-		ld.Bso.Flush()
-		switch ld.HEADTYPE {
-		default:
-		case obj.Hplan9,
-			obj.Helf:
-			ld.Debug['s'] = 1
-			symo = int64(ld.Segdata.Fileoff + ld.Segdata.Filelen)
-
-		case obj.Hdarwin:
-			symo = int64(ld.Segdwarf.Fileoff + uint64(ld.Rnd(int64(ld.Segdwarf.Filelen), int64(ld.INITRND))) + uint64(machlink))
-
-		case obj.Hlinux,
-			obj.Hfreebsd,
-			obj.Hnetbsd,
-			obj.Hopenbsd,
-			obj.Hdragonfly,
-			obj.Hsolaris,
-			obj.Hnacl:
-			symo = int64(ld.Segdata.Fileoff + ld.Segdata.Filelen)
-			symo = ld.Rnd(symo, int64(ld.INITRND))
-
-		case obj.Hwindows:
-			symo = int64(ld.Segdata.Fileoff + ld.Segdata.Filelen)
-			symo = ld.Rnd(symo, ld.PEFILEALIGN)
-		}
-
-		ld.Cseek(symo)
-		switch ld.HEADTYPE {
-		default:
-			if ld.Iself {
-				ld.Cseek(symo)
-				ld.Asmelfsym()
-				ld.Cflush()
-				ld.Cwrite(ld.Elfstrdat)
-
-				if ld.Debug['v'] != 0 {
-					fmt.Fprintf(&ld.Bso, "%5.2f dwarf\n", obj.Cputime())
-				}
-
-				ld.Dwarfemitdebugsections()
-
-				if ld.Linkmode == ld.LinkExternal {
-					ld.Elfemitreloc()
-				}
-			}
-
-		case obj.Hplan9:
-			ld.Asmplan9sym()
-			ld.Cflush()
-
-			sym := ld.Linklookup(ld.Ctxt, "pclntab", 0)
-			if sym != nil {
-				ld.Lcsize = int32(len(sym.P))
-				for i := 0; int32(i) < ld.Lcsize; i++ {
-					ld.Cput(uint8(sym.P[i]))
-				}
-
-				ld.Cflush()
-			}
-
-		case obj.Hwindows:
-			if ld.Debug['v'] != 0 {
-				fmt.Fprintf(&ld.Bso, "%5.2f dwarf\n", obj.Cputime())
-			}
-
-			ld.Dwarfemitdebugsections()
-
-		case obj.Hdarwin:
-			if ld.Linkmode == ld.LinkExternal {
-				ld.Machoemitreloc()
-			}
-		}
-	}
-
-	if ld.Debug['v'] != 0 {
-		fmt.Fprintf(&ld.Bso, "%5.2f headr\n", obj.Cputime())
-	}
-	ld.Bso.Flush()
-	ld.Cseek(0)
-	switch ld.HEADTYPE {
-	default:
-	case obj.Hplan9: /* plan9 */
-		magic := int32(4*26*26 + 7)
-
-		magic |= 0x00008000                  /* fat header */
-		ld.Lputb(uint32(magic))              /* magic */
-		ld.Lputb(uint32(ld.Segtext.Filelen)) /* sizes */
-		ld.Lputb(uint32(ld.Segdata.Filelen))
-		ld.Lputb(uint32(ld.Segdata.Length - ld.Segdata.Filelen))
-		ld.Lputb(uint32(ld.Symsize)) /* nsyms */
-		vl := ld.Entryvalue()
-		ld.Lputb(PADDR(uint32(vl))) /* va of entry */
-		ld.Lputb(uint32(ld.Spsize)) /* sp offsets */
-		ld.Lputb(uint32(ld.Lcsize)) /* line offsets */
-		ld.Vputb(uint64(vl))        /* va of entry */
-
-	case obj.Hdarwin:
-		ld.Asmbmacho()
-
-	case obj.Hlinux,
-		obj.Hfreebsd,
-		obj.Hnetbsd,
-		obj.Hopenbsd,
-		obj.Hdragonfly,
-		obj.Hsolaris,
-		obj.Hnacl:
-		ld.Asmbelf(symo)
-
-	case obj.Hwindows:
-		ld.Asmbpe()
-	}
-
-	ld.Cflush()
-}
diff --git a/src/cmd/link/internal/amd64/l.go b/src/cmd/link/internal/amd64/l.go
deleted file mode 100644
index 2537419..0000000
--- a/src/cmd/link/internal/amd64/l.go
+++ /dev/null
@@ -1,47 +0,0 @@
-// Inferno utils/6l/l.h
-// http://code.google.com/p/inferno-os/source/browse/utils/6l/l.h
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package amd64
-
-const (
-	thechar   = '6'
-	MaxAlign  = 32 // max data alignment
-	FuncAlign = 16
-)
-
-const (
-	MINLC = 1
-)
-
-/* Used by ../internal/ld/dwarf.go */
-const (
-	DWARFREGSP = 7
-	DWARFREGLR = 16
-)
diff --git a/src/cmd/link/internal/amd64/obj.go b/src/cmd/link/internal/amd64/obj.go
deleted file mode 100644
index 1aa4422..0000000
--- a/src/cmd/link/internal/amd64/obj.go
+++ /dev/null
@@ -1,214 +0,0 @@
-// Inferno utils/6l/obj.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6l/obj.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package amd64
-
-import (
-	"cmd/internal/obj"
-	"cmd/link/internal/ld"
-	"fmt"
-	"log"
-)
-
-// Reading object files.
-
-func Main() {
-	linkarchinit()
-	ld.Ldmain()
-}
-
-func linkarchinit() {
-	ld.Thestring = "amd64"
-	ld.Thelinkarch = &ld.Linkamd64
-	if obj.Getgoarch() == "amd64p32" {
-		ld.Thelinkarch = &ld.Linkamd64p32
-	}
-
-	ld.Thearch.Thechar = thechar
-	ld.Thearch.Ptrsize = ld.Thelinkarch.Ptrsize
-	ld.Thearch.Intsize = ld.Thelinkarch.Ptrsize
-	ld.Thearch.Regsize = ld.Thelinkarch.Regsize
-	ld.Thearch.Funcalign = FuncAlign
-	ld.Thearch.Maxalign = MaxAlign
-	ld.Thearch.Minlc = MINLC
-	ld.Thearch.Dwarfregsp = DWARFREGSP
-	ld.Thearch.Dwarfreglr = DWARFREGLR
-
-	ld.Thearch.Adddynrel = adddynrel
-	ld.Thearch.Archinit = archinit
-	ld.Thearch.Archreloc = archreloc
-	ld.Thearch.Archrelocvariant = archrelocvariant
-	ld.Thearch.Asmb = asmb
-	ld.Thearch.Elfreloc1 = elfreloc1
-	ld.Thearch.Elfsetupplt = elfsetupplt
-	ld.Thearch.Gentext = gentext
-	ld.Thearch.Machoreloc1 = machoreloc1
-	ld.Thearch.PEreloc1 = pereloc1
-	ld.Thearch.Lput = ld.Lputl
-	ld.Thearch.Wput = ld.Wputl
-	ld.Thearch.Vput = ld.Vputl
-
-	ld.Thearch.Linuxdynld = "/lib64/ld-linux-x86-64.so.2"
-	ld.Thearch.Freebsddynld = "/libexec/ld-elf.so.1"
-	ld.Thearch.Openbsddynld = "/usr/libexec/ld.so"
-	ld.Thearch.Netbsddynld = "/libexec/ld.elf_so"
-	ld.Thearch.Dragonflydynld = "/usr/libexec/ld-elf.so.2"
-	ld.Thearch.Solarisdynld = "/lib/amd64/ld.so.1"
-}
-
-func archinit() {
-	// getgoextlinkenabled is based on GO_EXTLINK_ENABLED when
-	// Go was built; see ../../make.bash.
-	if ld.Linkmode == ld.LinkAuto && obj.Getgoextlinkenabled() == "0" {
-		ld.Linkmode = ld.LinkInternal
-	}
-
-	if ld.Buildmode == ld.BuildmodeCArchive || ld.Buildmode == ld.BuildmodeCShared || ld.DynlinkingGo() {
-		ld.Linkmode = ld.LinkExternal
-	}
-
-	switch ld.HEADTYPE {
-	default:
-		if ld.Linkmode == ld.LinkAuto {
-			ld.Linkmode = ld.LinkInternal
-		}
-		if ld.Linkmode == ld.LinkExternal && obj.Getgoextlinkenabled() != "1" {
-			log.Fatalf("cannot use -linkmode=external with -H %s", ld.Headstr(int(ld.HEADTYPE)))
-		}
-
-	case obj.Hdarwin,
-		obj.Hdragonfly,
-		obj.Hfreebsd,
-		obj.Hlinux,
-		obj.Hnacl,
-		obj.Hnetbsd,
-		obj.Hopenbsd,
-		obj.Hsolaris,
-		obj.Hwindows:
-		break
-	}
-
-	switch ld.HEADTYPE {
-	default:
-		ld.Exitf("unknown -H option: %v", ld.HEADTYPE)
-
-	case obj.Hplan9: /* plan 9 */
-		ld.HEADR = 32 + 8
-
-		if ld.INITTEXT == -1 {
-			ld.INITTEXT = 0x200000 + int64(ld.HEADR)
-		}
-		if ld.INITDAT == -1 {
-			ld.INITDAT = 0
-		}
-		if ld.INITRND == -1 {
-			ld.INITRND = 0x200000
-		}
-
-	case obj.Helf: /* elf32 executable */
-		ld.HEADR = int32(ld.Rnd(52+3*32, 16))
-
-		if ld.INITTEXT == -1 {
-			ld.INITTEXT = 0x80110000
-		}
-		if ld.INITDAT == -1 {
-			ld.INITDAT = 0
-		}
-		if ld.INITRND == -1 {
-			ld.INITRND = 4096
-		}
-
-	case obj.Hdarwin: /* apple MACH */
-		ld.Machoinit()
-
-		ld.HEADR = ld.INITIAL_MACHO_HEADR
-		if ld.INITRND == -1 {
-			ld.INITRND = 4096
-		}
-		if ld.INITTEXT == -1 {
-			ld.INITTEXT = 4096 + int64(ld.HEADR)
-		}
-		if ld.INITDAT == -1 {
-			ld.INITDAT = 0
-		}
-
-	case obj.Hlinux, /* elf64 executable */
-		obj.Hfreebsd,   /* freebsd */
-		obj.Hnetbsd,    /* netbsd */
-		obj.Hopenbsd,   /* openbsd */
-		obj.Hdragonfly, /* dragonfly */
-		obj.Hsolaris:   /* solaris */
-		ld.Elfinit()
-
-		ld.HEADR = ld.ELFRESERVE
-		if ld.INITTEXT == -1 {
-			ld.INITTEXT = (1 << 22) + int64(ld.HEADR)
-		}
-		if ld.INITDAT == -1 {
-			ld.INITDAT = 0
-		}
-		if ld.INITRND == -1 {
-			ld.INITRND = 4096
-		}
-
-	case obj.Hnacl:
-		ld.Elfinit()
-		ld.Debug['w']++ // disable dwarf, which gets confused and is useless anyway
-		ld.HEADR = 0x10000
-		ld.Funcalign = 32
-		if ld.INITTEXT == -1 {
-			ld.INITTEXT = 0x20000
-		}
-		if ld.INITDAT == -1 {
-			ld.INITDAT = 0
-		}
-		if ld.INITRND == -1 {
-			ld.INITRND = 0x10000
-		}
-
-	case obj.Hwindows: /* PE executable */
-		ld.Peinit()
-
-		ld.HEADR = ld.PEFILEHEADR
-		if ld.INITTEXT == -1 {
-			ld.INITTEXT = ld.PEBASE + int64(ld.PESECTHEADR)
-		}
-		if ld.INITDAT == -1 {
-			ld.INITDAT = 0
-		}
-		if ld.INITRND == -1 {
-			ld.INITRND = ld.PESECTALIGN
-		}
-	}
-
-	if ld.INITDAT != 0 && ld.INITRND != 0 {
-		fmt.Printf("warning: -D0x%x is ignored because of -R0x%x\n", uint64(ld.INITDAT), uint32(ld.INITRND))
-	}
-}
diff --git a/src/cmd/link/internal/amd64/z.go b/src/cmd/link/internal/amd64/z.go
deleted file mode 100644
index f70035b..0000000
--- a/src/cmd/link/internal/amd64/z.go
+++ /dev/null
@@ -1 +0,0 @@
-package amd64
diff --git a/src/cmd/link/internal/arm/asm.go b/src/cmd/link/internal/arm/asm.go
deleted file mode 100644
index a0e31a3..0000000
--- a/src/cmd/link/internal/arm/asm.go
+++ /dev/null
@@ -1,651 +0,0 @@
-// Inferno utils/5l/asm.c
-// http://code.google.com/p/inferno-os/source/browse/utils/5l/asm.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package arm
-
-import (
-	"cmd/internal/obj"
-	"cmd/link/internal/ld"
-	"fmt"
-	"log"
-)
-
-func gentext() {
-}
-
-// Preserve highest 8 bits of a, and do addition to lower 24-bit
-// of a and b; used to adjust ARM branch intruction's target
-func braddoff(a int32, b int32) int32 {
-	return int32((uint32(a))&0xff000000 | 0x00ffffff&uint32(a+b))
-}
-
-func adddynrela(rel *ld.LSym, s *ld.LSym, r *ld.Reloc) {
-	ld.Addaddrplus(ld.Ctxt, rel, s, int64(r.Off))
-	ld.Adduint32(ld.Ctxt, rel, ld.R_ARM_RELATIVE)
-}
-
-func adddynrel(s *ld.LSym, r *ld.Reloc) {
-	targ := r.Sym
-	ld.Ctxt.Cursym = s
-
-	switch r.Type {
-	default:
-		if r.Type >= 256 {
-			ld.Diag("unexpected relocation type %d", r.Type)
-			return
-		}
-
-		// Handle relocations found in ELF object files.
-	case 256 + ld.R_ARM_PLT32:
-		r.Type = obj.R_CALLARM
-
-		if targ.Type == obj.SDYNIMPORT {
-			addpltsym(ld.Ctxt, targ)
-			r.Sym = ld.Linklookup(ld.Ctxt, ".plt", 0)
-			r.Add = int64(braddoff(int32(r.Add), targ.Plt/4))
-		}
-
-		return
-
-	case 256 + ld.R_ARM_THM_PC22: // R_ARM_THM_CALL
-		ld.Exitf("R_ARM_THM_CALL, are you using -marm?")
-		return
-
-	case 256 + ld.R_ARM_GOT32: // R_ARM_GOT_BREL
-		if targ.Type != obj.SDYNIMPORT {
-			addgotsyminternal(ld.Ctxt, targ)
-		} else {
-			addgotsym(ld.Ctxt, targ)
-		}
-
-		r.Type = obj.R_CONST // write r->add during relocsym
-		r.Sym = nil
-		r.Add += int64(targ.Got)
-		return
-
-	case 256 + ld.R_ARM_GOT_PREL: // GOT(nil) + A - nil
-		if targ.Type != obj.SDYNIMPORT {
-			addgotsyminternal(ld.Ctxt, targ)
-		} else {
-			addgotsym(ld.Ctxt, targ)
-		}
-
-		r.Type = obj.R_PCREL
-		r.Sym = ld.Linklookup(ld.Ctxt, ".got", 0)
-		r.Add += int64(targ.Got) + 4
-		return
-
-	case 256 + ld.R_ARM_GOTOFF: // R_ARM_GOTOFF32
-		r.Type = obj.R_GOTOFF
-
-		return
-
-	case 256 + ld.R_ARM_GOTPC: // R_ARM_BASE_PREL
-		r.Type = obj.R_PCREL
-
-		r.Sym = ld.Linklookup(ld.Ctxt, ".got", 0)
-		r.Add += 4
-		return
-
-	case 256 + ld.R_ARM_CALL:
-		r.Type = obj.R_CALLARM
-		if targ.Type == obj.SDYNIMPORT {
-			addpltsym(ld.Ctxt, targ)
-			r.Sym = ld.Linklookup(ld.Ctxt, ".plt", 0)
-			r.Add = int64(braddoff(int32(r.Add), targ.Plt/4))
-		}
-
-		return
-
-	case 256 + ld.R_ARM_REL32: // R_ARM_REL32
-		r.Type = obj.R_PCREL
-
-		r.Add += 4
-		return
-
-	case 256 + ld.R_ARM_ABS32:
-		if targ.Type == obj.SDYNIMPORT {
-			ld.Diag("unexpected R_ARM_ABS32 relocation for dynamic symbol %s", targ.Name)
-		}
-		r.Type = obj.R_ADDR
-		return
-
-		// we can just ignore this, because we are targeting ARM V5+ anyway
-	case 256 + ld.R_ARM_V4BX:
-		if r.Sym != nil {
-			// R_ARM_V4BX is ABS relocation, so this symbol is a dummy symbol, ignore it
-			r.Sym.Type = 0
-		}
-
-		r.Sym = nil
-		return
-
-	case 256 + ld.R_ARM_PC24,
-		256 + ld.R_ARM_JUMP24:
-		r.Type = obj.R_CALLARM
-		if targ.Type == obj.SDYNIMPORT {
-			addpltsym(ld.Ctxt, targ)
-			r.Sym = ld.Linklookup(ld.Ctxt, ".plt", 0)
-			r.Add = int64(braddoff(int32(r.Add), targ.Plt/4))
-		}
-
-		return
-	}
-
-	// Handle references to ELF symbols from our own object files.
-	if targ.Type != obj.SDYNIMPORT {
-		return
-	}
-
-	switch r.Type {
-	case obj.R_CALLARM:
-		addpltsym(ld.Ctxt, targ)
-		r.Sym = ld.Linklookup(ld.Ctxt, ".plt", 0)
-		r.Add = int64(targ.Plt)
-		return
-
-	case obj.R_ADDR:
-		if s.Type != obj.SDATA {
-			break
-		}
-		if ld.Iself {
-			ld.Adddynsym(ld.Ctxt, targ)
-			rel := ld.Linklookup(ld.Ctxt, ".rel", 0)
-			ld.Addaddrplus(ld.Ctxt, rel, s, int64(r.Off))
-			ld.Adduint32(ld.Ctxt, rel, ld.ELF32_R_INFO(uint32(targ.Dynid), ld.R_ARM_GLOB_DAT)) // we need a nil + A dynamic reloc
-			r.Type = obj.R_CONST                                                               // write r->add during relocsym
-			r.Sym = nil
-			return
-		}
-	}
-
-	ld.Ctxt.Cursym = s
-	ld.Diag("unsupported relocation for dynamic symbol %s (type=%d stype=%d)", targ.Name, r.Type, targ.Type)
-}
-
-func elfreloc1(r *ld.Reloc, sectoff int64) int {
-	ld.Thearch.Lput(uint32(sectoff))
-
-	elfsym := r.Xsym.Elfsym
-	switch r.Type {
-	default:
-		return -1
-
-	case obj.R_ADDR:
-		if r.Siz == 4 {
-			ld.Thearch.Lput(ld.R_ARM_ABS32 | uint32(elfsym)<<8)
-		} else {
-			return -1
-		}
-
-	case obj.R_PCREL:
-		if r.Siz == 4 {
-			ld.Thearch.Lput(ld.R_ARM_REL32 | uint32(elfsym)<<8)
-		} else {
-			return -1
-		}
-
-	case obj.R_CALLARM:
-		if r.Siz == 4 {
-			if r.Add&0xff000000 == 0xeb000000 { // BL
-				ld.Thearch.Lput(ld.R_ARM_CALL | uint32(elfsym)<<8)
-			} else {
-				ld.Thearch.Lput(ld.R_ARM_JUMP24 | uint32(elfsym)<<8)
-			}
-		} else {
-			return -1
-		}
-
-	case obj.R_TLS:
-		if r.Siz == 4 {
-			if ld.Buildmode == ld.BuildmodeCShared {
-				ld.Thearch.Lput(ld.R_ARM_TLS_IE32 | uint32(elfsym)<<8)
-			} else {
-				ld.Thearch.Lput(ld.R_ARM_TLS_LE32 | uint32(elfsym)<<8)
-			}
-		} else {
-			return -1
-		}
-	}
-
-	return 0
-}
-
-func elfsetupplt() {
-	plt := ld.Linklookup(ld.Ctxt, ".plt", 0)
-	got := ld.Linklookup(ld.Ctxt, ".got.plt", 0)
-	if plt.Size == 0 {
-		// str lr, [sp, #-4]!
-		ld.Adduint32(ld.Ctxt, plt, 0xe52de004)
-
-		// ldr lr, [pc, #4]
-		ld.Adduint32(ld.Ctxt, plt, 0xe59fe004)
-
-		// add lr, pc, lr
-		ld.Adduint32(ld.Ctxt, plt, 0xe08fe00e)
-
-		// ldr pc, [lr, #8]!
-		ld.Adduint32(ld.Ctxt, plt, 0xe5bef008)
-
-		// .word &GLOBAL_OFFSET_TABLE[0] - .
-		ld.Addpcrelplus(ld.Ctxt, plt, got, 4)
-
-		// the first .plt entry requires 3 .plt.got entries
-		ld.Adduint32(ld.Ctxt, got, 0)
-
-		ld.Adduint32(ld.Ctxt, got, 0)
-		ld.Adduint32(ld.Ctxt, got, 0)
-	}
-}
-
-func machoreloc1(r *ld.Reloc, sectoff int64) int {
-	var v uint32
-
-	rs := r.Xsym
-
-	if rs.Type == obj.SHOSTOBJ || r.Type == obj.R_CALLARM {
-		if rs.Dynid < 0 {
-			ld.Diag("reloc %d to non-macho symbol %s type=%d", r.Type, rs.Name, rs.Type)
-			return -1
-		}
-
-		v = uint32(rs.Dynid)
-		v |= 1 << 27 // external relocation
-	} else {
-		v = uint32(rs.Sect.Extnum)
-		if v == 0 {
-			ld.Diag("reloc %d to symbol %s in non-macho section %s type=%d", r.Type, rs.Name, rs.Sect.Name, rs.Type)
-			return -1
-		}
-	}
-
-	switch r.Type {
-	default:
-		return -1
-
-	case obj.R_ADDR:
-		v |= ld.MACHO_GENERIC_RELOC_VANILLA << 28
-
-	case obj.R_CALLARM:
-		v |= 1 << 24 // pc-relative bit
-		v |= ld.MACHO_ARM_RELOC_BR24 << 28
-	}
-
-	switch r.Siz {
-	default:
-		return -1
-
-	case 1:
-		v |= 0 << 25
-
-	case 2:
-		v |= 1 << 25
-
-	case 4:
-		v |= 2 << 25
-
-	case 8:
-		v |= 3 << 25
-	}
-
-	ld.Thearch.Lput(uint32(sectoff))
-	ld.Thearch.Lput(v)
-	return 0
-}
-
-func archreloc(r *ld.Reloc, s *ld.LSym, val *int64) int {
-	if ld.Linkmode == ld.LinkExternal {
-		switch r.Type {
-		case obj.R_CALLARM:
-			r.Done = 0
-
-			// set up addend for eventual relocation via outer symbol.
-			rs := r.Sym
-
-			r.Xadd = r.Add
-			if r.Xadd&0x800000 != 0 {
-				r.Xadd |= ^0xffffff
-			}
-			r.Xadd *= 4
-			for rs.Outer != nil {
-				r.Xadd += ld.Symaddr(rs) - ld.Symaddr(rs.Outer)
-				rs = rs.Outer
-			}
-
-			if rs.Type != obj.SHOSTOBJ && rs.Sect == nil {
-				ld.Diag("missing section for %s", rs.Name)
-			}
-			r.Xsym = rs
-
-			// ld64 for arm seems to want the symbol table to contain offset
-			// into the section rather than pseudo virtual address that contains
-			// the section load address.
-			// we need to compensate that by removing the instruction's address
-			// from addend.
-			if ld.HEADTYPE == obj.Hdarwin {
-				r.Xadd -= ld.Symaddr(s) + int64(r.Off)
-			}
-
-			*val = int64(braddoff(int32(0xff000000&uint32(r.Add)), int32(0xffffff&uint32(r.Xadd/4))))
-			return 0
-		}
-
-		return -1
-	}
-
-	switch r.Type {
-	case obj.R_CONST:
-		*val = r.Add
-		return 0
-
-	case obj.R_GOTOFF:
-		*val = ld.Symaddr(r.Sym) + r.Add - ld.Symaddr(ld.Linklookup(ld.Ctxt, ".got", 0))
-		return 0
-
-		// The following three arch specific relocations are only for generation of
-	// Linux/ARM ELF's PLT entry (3 assembler instruction)
-	case obj.R_PLT0: // add ip, pc, #0xXX00000
-		if ld.Symaddr(ld.Linklookup(ld.Ctxt, ".got.plt", 0)) < ld.Symaddr(ld.Linklookup(ld.Ctxt, ".plt", 0)) {
-			ld.Diag(".got.plt should be placed after .plt section.")
-		}
-		*val = 0xe28fc600 + (0xff & (int64(uint32(ld.Symaddr(r.Sym)-(ld.Symaddr(ld.Linklookup(ld.Ctxt, ".plt", 0))+int64(r.Off))+r.Add)) >> 20))
-		return 0
-
-	case obj.R_PLT1: // add ip, ip, #0xYY000
-		*val = 0xe28cca00 + (0xff & (int64(uint32(ld.Symaddr(r.Sym)-(ld.Symaddr(ld.Linklookup(ld.Ctxt, ".plt", 0))+int64(r.Off))+r.Add+4)) >> 12))
-
-		return 0
-
-	case obj.R_PLT2: // ldr pc, [ip, #0xZZZ]!
-		*val = 0xe5bcf000 + (0xfff & int64(uint32(ld.Symaddr(r.Sym)-(ld.Symaddr(ld.Linklookup(ld.Ctxt, ".plt", 0))+int64(r.Off))+r.Add+8)))
-
-		return 0
-
-	case obj.R_CALLARM: // bl XXXXXX or b YYYYYY
-		*val = int64(braddoff(int32(0xff000000&uint32(r.Add)), int32(0xffffff&uint32((ld.Symaddr(r.Sym)+int64((uint32(r.Add))*4)-(s.Value+int64(r.Off)))/4))))
-
-		return 0
-	}
-
-	return -1
-}
-
-func archrelocvariant(r *ld.Reloc, s *ld.LSym, t int64) int64 {
-	log.Fatalf("unexpected relocation variant")
-	return t
-}
-
-func addpltreloc(ctxt *ld.Link, plt *ld.LSym, got *ld.LSym, sym *ld.LSym, typ int) *ld.Reloc {
-	r := ld.Addrel(plt)
-	r.Sym = got
-	r.Off = int32(plt.Size)
-	r.Siz = 4
-	r.Type = int32(typ)
-	r.Add = int64(sym.Got) - 8
-
-	plt.Reachable = true
-	plt.Size += 4
-	ld.Symgrow(ctxt, plt, plt.Size)
-
-	return r
-}
-
-func addpltsym(ctxt *ld.Link, s *ld.LSym) {
-	if s.Plt >= 0 {
-		return
-	}
-
-	ld.Adddynsym(ctxt, s)
-
-	if ld.Iself {
-		plt := ld.Linklookup(ctxt, ".plt", 0)
-		got := ld.Linklookup(ctxt, ".got.plt", 0)
-		rel := ld.Linklookup(ctxt, ".rel.plt", 0)
-		if plt.Size == 0 {
-			elfsetupplt()
-		}
-
-		// .got entry
-		s.Got = int32(got.Size)
-
-		// In theory, all GOT should point to the first PLT entry,
-		// Linux/ARM's dynamic linker will do that for us, but FreeBSD/ARM's
-		// dynamic linker won't, so we'd better do it ourselves.
-		ld.Addaddrplus(ctxt, got, plt, 0)
-
-		// .plt entry, this depends on the .got entry
-		s.Plt = int32(plt.Size)
-
-		addpltreloc(ctxt, plt, got, s, obj.R_PLT0) // add lr, pc, #0xXX00000
-		addpltreloc(ctxt, plt, got, s, obj.R_PLT1) // add lr, lr, #0xYY000
-		addpltreloc(ctxt, plt, got, s, obj.R_PLT2) // ldr pc, [lr, #0xZZZ]!
-
-		// rel
-		ld.Addaddrplus(ctxt, rel, got, int64(s.Got))
-
-		ld.Adduint32(ctxt, rel, ld.ELF32_R_INFO(uint32(s.Dynid), ld.R_ARM_JUMP_SLOT))
-	} else {
-		ld.Diag("addpltsym: unsupported binary format")
-	}
-}
-
-func addgotsyminternal(ctxt *ld.Link, s *ld.LSym) {
-	if s.Got >= 0 {
-		return
-	}
-
-	got := ld.Linklookup(ctxt, ".got", 0)
-	s.Got = int32(got.Size)
-
-	ld.Addaddrplus(ctxt, got, s, 0)
-
-	if ld.Iself {
-	} else {
-		ld.Diag("addgotsyminternal: unsupported binary format")
-	}
-}
-
-func addgotsym(ctxt *ld.Link, s *ld.LSym) {
-	if s.Got >= 0 {
-		return
-	}
-
-	ld.Adddynsym(ctxt, s)
-	got := ld.Linklookup(ctxt, ".got", 0)
-	s.Got = int32(got.Size)
-	ld.Adduint32(ctxt, got, 0)
-
-	if ld.Iself {
-		rel := ld.Linklookup(ctxt, ".rel", 0)
-		ld.Addaddrplus(ctxt, rel, got, int64(s.Got))
-		ld.Adduint32(ctxt, rel, ld.ELF32_R_INFO(uint32(s.Dynid), ld.R_ARM_GLOB_DAT))
-	} else {
-		ld.Diag("addgotsym: unsupported binary format")
-	}
-}
-
-func asmb() {
-	if ld.Debug['v'] != 0 {
-		fmt.Fprintf(&ld.Bso, "%5.2f asmb\n", obj.Cputime())
-	}
-	ld.Bso.Flush()
-
-	if ld.Iself {
-		ld.Asmbelfsetup()
-	}
-
-	sect := ld.Segtext.Sect
-	ld.Cseek(int64(sect.Vaddr - ld.Segtext.Vaddr + ld.Segtext.Fileoff))
-	ld.Codeblk(int64(sect.Vaddr), int64(sect.Length))
-	for sect = sect.Next; sect != nil; sect = sect.Next {
-		ld.Cseek(int64(sect.Vaddr - ld.Segtext.Vaddr + ld.Segtext.Fileoff))
-		ld.Datblk(int64(sect.Vaddr), int64(sect.Length))
-	}
-
-	if ld.Segrodata.Filelen > 0 {
-		if ld.Debug['v'] != 0 {
-			fmt.Fprintf(&ld.Bso, "%5.2f rodatblk\n", obj.Cputime())
-		}
-		ld.Bso.Flush()
-
-		ld.Cseek(int64(ld.Segrodata.Fileoff))
-		ld.Datblk(int64(ld.Segrodata.Vaddr), int64(ld.Segrodata.Filelen))
-	}
-
-	if ld.Debug['v'] != 0 {
-		fmt.Fprintf(&ld.Bso, "%5.2f datblk\n", obj.Cputime())
-	}
-	ld.Bso.Flush()
-
-	ld.Cseek(int64(ld.Segdata.Fileoff))
-	ld.Datblk(int64(ld.Segdata.Vaddr), int64(ld.Segdata.Filelen))
-
-	machlink := uint32(0)
-	if ld.HEADTYPE == obj.Hdarwin {
-		if ld.Debug['v'] != 0 {
-			fmt.Fprintf(&ld.Bso, "%5.2f dwarf\n", obj.Cputime())
-		}
-
-		dwarfoff := uint32(ld.Rnd(int64(uint64(ld.HEADR)+ld.Segtext.Length), int64(ld.INITRND)) + ld.Rnd(int64(ld.Segdata.Filelen), int64(ld.INITRND)))
-		ld.Cseek(int64(dwarfoff))
-
-		ld.Segdwarf.Fileoff = uint64(ld.Cpos())
-		ld.Dwarfemitdebugsections()
-		ld.Segdwarf.Filelen = uint64(ld.Cpos()) - ld.Segdwarf.Fileoff
-
-		machlink = uint32(ld.Domacholink())
-	}
-
-	/* output symbol table */
-	ld.Symsize = 0
-
-	ld.Lcsize = 0
-	symo := uint32(0)
-	if ld.Debug['s'] == 0 {
-		// TODO: rationalize
-		if ld.Debug['v'] != 0 {
-			fmt.Fprintf(&ld.Bso, "%5.2f sym\n", obj.Cputime())
-		}
-		ld.Bso.Flush()
-		switch ld.HEADTYPE {
-		default:
-			if ld.Iself {
-				symo = uint32(ld.Segdata.Fileoff + ld.Segdata.Filelen)
-				symo = uint32(ld.Rnd(int64(symo), int64(ld.INITRND)))
-			}
-
-		case obj.Hplan9:
-			symo = uint32(ld.Segdata.Fileoff + ld.Segdata.Filelen)
-
-		case obj.Hdarwin:
-			symo = uint32(ld.Segdwarf.Fileoff + uint64(ld.Rnd(int64(ld.Segdwarf.Filelen), int64(ld.INITRND))) + uint64(machlink))
-		}
-
-		ld.Cseek(int64(symo))
-		switch ld.HEADTYPE {
-		default:
-			if ld.Iself {
-				if ld.Debug['v'] != 0 {
-					fmt.Fprintf(&ld.Bso, "%5.2f elfsym\n", obj.Cputime())
-				}
-				ld.Asmelfsym()
-				ld.Cflush()
-				ld.Cwrite(ld.Elfstrdat)
-
-				if ld.Debug['v'] != 0 {
-					fmt.Fprintf(&ld.Bso, "%5.2f dwarf\n", obj.Cputime())
-				}
-				ld.Dwarfemitdebugsections()
-
-				if ld.Linkmode == ld.LinkExternal {
-					ld.Elfemitreloc()
-				}
-			}
-
-		case obj.Hplan9:
-			ld.Asmplan9sym()
-			ld.Cflush()
-
-			sym := ld.Linklookup(ld.Ctxt, "pclntab", 0)
-			if sym != nil {
-				ld.Lcsize = int32(len(sym.P))
-				for i := 0; int32(i) < ld.Lcsize; i++ {
-					ld.Cput(uint8(sym.P[i]))
-				}
-
-				ld.Cflush()
-			}
-
-		case obj.Hdarwin:
-			if ld.Linkmode == ld.LinkExternal {
-				ld.Machoemitreloc()
-			}
-		}
-	}
-
-	ld.Ctxt.Cursym = nil
-	if ld.Debug['v'] != 0 {
-		fmt.Fprintf(&ld.Bso, "%5.2f header\n", obj.Cputime())
-	}
-	ld.Bso.Flush()
-	ld.Cseek(0)
-	switch ld.HEADTYPE {
-	default:
-	case obj.Hplan9: /* plan 9 */
-		ld.Thearch.Lput(0x647)                      /* magic */
-		ld.Thearch.Lput(uint32(ld.Segtext.Filelen)) /* sizes */
-		ld.Thearch.Lput(uint32(ld.Segdata.Filelen))
-		ld.Thearch.Lput(uint32(ld.Segdata.Length - ld.Segdata.Filelen))
-		ld.Thearch.Lput(uint32(ld.Symsize))      /* nsyms */
-		ld.Thearch.Lput(uint32(ld.Entryvalue())) /* va of entry */
-		ld.Thearch.Lput(0)
-		ld.Thearch.Lput(uint32(ld.Lcsize))
-
-	case obj.Hlinux,
-		obj.Hfreebsd,
-		obj.Hnetbsd,
-		obj.Hopenbsd,
-		obj.Hnacl:
-		ld.Asmbelf(int64(symo))
-
-	case obj.Hdarwin:
-		ld.Asmbmacho()
-	}
-
-	ld.Cflush()
-	if ld.Debug['c'] != 0 {
-		fmt.Printf("textsize=%d\n", ld.Segtext.Filelen)
-		fmt.Printf("datsize=%d\n", ld.Segdata.Filelen)
-		fmt.Printf("bsssize=%d\n", ld.Segdata.Length-ld.Segdata.Filelen)
-		fmt.Printf("symsize=%d\n", ld.Symsize)
-		fmt.Printf("lcsize=%d\n", ld.Lcsize)
-		fmt.Printf("total=%d\n", ld.Segtext.Filelen+ld.Segdata.Length+uint64(ld.Symsize)+uint64(ld.Lcsize))
-	}
-}
diff --git a/src/cmd/link/internal/arm/l.go b/src/cmd/link/internal/arm/l.go
deleted file mode 100644
index 4973772..0000000
--- a/src/cmd/link/internal/arm/l.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// Inferno utils/5l/asm.c
-// http://code.google.com/p/inferno-os/source/browse/utils/5l/asm.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package arm
-
-// Writing object files.
-
-// Inferno utils/5l/l.h
-// http://code.google.com/p/inferno-os/source/browse/utils/5l/l.h
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-const (
-	thechar   = '5'
-	PtrSize   = 4
-	IntSize   = 4
-	RegSize   = 4
-	MaxAlign  = 8 // max data alignment
-	FuncAlign = 4 // single-instruction alignment
-	MINLC     = 4
-)
-
-/* Used by ../internal/ld/dwarf.go */
-const (
-	DWARFREGSP = 13
-	DWARFREGLR = 14
-)
diff --git a/src/cmd/link/internal/arm/obj.go b/src/cmd/link/internal/arm/obj.go
deleted file mode 100644
index 14fe7a6..0000000
--- a/src/cmd/link/internal/arm/obj.go
+++ /dev/null
@@ -1,178 +0,0 @@
-// Inferno utils/5l/obj.c
-// http://code.google.com/p/inferno-os/source/browse/utils/5l/obj.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package arm
-
-import (
-	"cmd/internal/obj"
-	"cmd/link/internal/ld"
-	"fmt"
-	"log"
-)
-
-// Reading object files.
-
-func Main() {
-	linkarchinit()
-	ld.Ldmain()
-}
-
-func linkarchinit() {
-	ld.Thestring = "arm"
-	ld.Thelinkarch = &ld.Linkarm
-
-	ld.Thearch.Thechar = thechar
-	ld.Thearch.Ptrsize = ld.Thelinkarch.Ptrsize
-	ld.Thearch.Intsize = ld.Thelinkarch.Ptrsize
-	ld.Thearch.Regsize = ld.Thelinkarch.Regsize
-	ld.Thearch.Funcalign = FuncAlign
-	ld.Thearch.Maxalign = MaxAlign
-	ld.Thearch.Minlc = MINLC
-	ld.Thearch.Dwarfregsp = DWARFREGSP
-	ld.Thearch.Dwarfreglr = DWARFREGLR
-
-	ld.Thearch.Adddynrel = adddynrel
-	ld.Thearch.Archinit = archinit
-	ld.Thearch.Archreloc = archreloc
-	ld.Thearch.Archrelocvariant = archrelocvariant
-	ld.Thearch.Asmb = asmb
-	ld.Thearch.Elfreloc1 = elfreloc1
-	ld.Thearch.Elfsetupplt = elfsetupplt
-	ld.Thearch.Gentext = gentext
-	ld.Thearch.Machoreloc1 = machoreloc1
-	ld.Thearch.Lput = ld.Lputl
-	ld.Thearch.Wput = ld.Wputl
-	ld.Thearch.Vput = ld.Vputl
-
-	ld.Thearch.Linuxdynld = "/lib/ld-linux.so.3" // 2 for OABI, 3 for EABI
-	ld.Thearch.Freebsddynld = "/usr/libexec/ld-elf.so.1"
-	ld.Thearch.Openbsddynld = "/usr/libexec/ld.so"
-	ld.Thearch.Netbsddynld = "/libexec/ld.elf_so"
-	ld.Thearch.Dragonflydynld = "XXX"
-	ld.Thearch.Solarisdynld = "XXX"
-}
-
-func archinit() {
-	// getgoextlinkenabled is based on GO_EXTLINK_ENABLED when
-	// Go was built; see ../../make.bash.
-	if ld.Linkmode == ld.LinkAuto && obj.Getgoextlinkenabled() == "0" {
-		ld.Linkmode = ld.LinkInternal
-	}
-
-	switch ld.HEADTYPE {
-	default:
-		if ld.Linkmode == ld.LinkAuto {
-			ld.Linkmode = ld.LinkInternal
-		}
-		if ld.Linkmode == ld.LinkExternal && obj.Getgoextlinkenabled() != "1" {
-			log.Fatalf("cannot use -linkmode=external with -H %s", ld.Headstr(int(ld.HEADTYPE)))
-		}
-
-	case obj.Hlinux,
-		obj.Hfreebsd,
-		obj.Hnacl,
-		obj.Hdarwin:
-		break
-	}
-
-	switch ld.HEADTYPE {
-	default:
-		ld.Exitf("unknown -H option: %v", ld.HEADTYPE)
-
-	case obj.Hplan9: /* plan 9 */
-		ld.HEADR = 32
-
-		if ld.INITTEXT == -1 {
-			ld.INITTEXT = 4128
-		}
-		if ld.INITDAT == -1 {
-			ld.INITDAT = 0
-		}
-		if ld.INITRND == -1 {
-			ld.INITRND = 4096
-		}
-
-	case obj.Hlinux, /* arm elf */
-		obj.Hfreebsd,
-		obj.Hnetbsd,
-		obj.Hopenbsd:
-		ld.Debug['d'] = 0
-		// with dynamic linking
-		ld.Elfinit()
-		ld.HEADR = ld.ELFRESERVE
-		if ld.INITTEXT == -1 {
-			ld.INITTEXT = 0x10000 + int64(ld.HEADR)
-		}
-		if ld.INITDAT == -1 {
-			ld.INITDAT = 0
-		}
-		if ld.INITRND == -1 {
-			ld.INITRND = 4096
-		}
-
-	case obj.Hnacl:
-		ld.Elfinit()
-		ld.HEADR = 0x10000
-		ld.Funcalign = 16
-		if ld.INITTEXT == -1 {
-			ld.INITTEXT = 0x20000
-		}
-		if ld.INITDAT == -1 {
-			ld.INITDAT = 0
-		}
-		if ld.INITRND == -1 {
-			ld.INITRND = 0x10000
-		}
-
-	case obj.Hdarwin: /* apple MACH */
-		ld.Debug['w'] = 1 // disable DWARF generataion
-		ld.Machoinit()
-		ld.HEADR = ld.INITIAL_MACHO_HEADR
-		if ld.INITTEXT == -1 {
-			ld.INITTEXT = 4096 + int64(ld.HEADR)
-		}
-		if ld.INITDAT == -1 {
-			ld.INITDAT = 0
-		}
-		if ld.INITRND == -1 {
-			ld.INITRND = 4096
-		}
-	}
-
-	if ld.INITDAT != 0 && ld.INITRND != 0 {
-		fmt.Printf("warning: -D0x%x is ignored because of -R0x%x\n", uint64(ld.INITDAT), uint32(ld.INITRND))
-	}
-
-	// embed goarm to runtime.goarm
-	s := ld.Linklookup(ld.Ctxt, "runtime.goarm", 0)
-
-	s.Type = obj.SRODATA
-	ld.Adduint8(ld.Ctxt, s, uint8(ld.Ctxt.Goarm))
-}
diff --git a/src/cmd/link/internal/arm64/asm.go b/src/cmd/link/internal/arm64/asm.go
deleted file mode 100644
index 3aebd8a..0000000
--- a/src/cmd/link/internal/arm64/asm.go
+++ /dev/null
@@ -1,435 +0,0 @@
-// Inferno utils/5l/asm.c
-// http://code.google.com/p/inferno-os/source/browse/utils/5l/asm.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package arm64
-
-import (
-	"cmd/internal/obj"
-	"cmd/link/internal/ld"
-	"encoding/binary"
-	"fmt"
-	"log"
-)
-
-func gentext() {}
-
-func adddynrela(rel *ld.LSym, s *ld.LSym, r *ld.Reloc) {
-	log.Fatalf("adddynrela not implemented")
-}
-
-func adddynrel(s *ld.LSym, r *ld.Reloc) {
-	log.Fatalf("adddynrel not implemented")
-}
-
-func elfreloc1(r *ld.Reloc, sectoff int64) int {
-	ld.Thearch.Vput(uint64(sectoff))
-
-	elfsym := r.Xsym.Elfsym
-	switch r.Type {
-	default:
-		return -1
-
-	case obj.R_ADDR:
-		switch r.Siz {
-		case 4:
-			ld.Thearch.Vput(ld.R_AARCH64_ABS32 | uint64(elfsym)<<32)
-		case 8:
-			ld.Thearch.Vput(ld.R_AARCH64_ABS64 | uint64(elfsym)<<32)
-		default:
-			return -1
-		}
-
-	case obj.R_ADDRARM64:
-		// two relocations: R_AARCH64_ADR_PREL_PG_HI21 and R_AARCH64_ADD_ABS_LO12_NC
-		ld.Thearch.Vput(ld.R_AARCH64_ADR_PREL_PG_HI21 | uint64(elfsym)<<32)
-		ld.Thearch.Vput(uint64(r.Xadd))
-		ld.Thearch.Vput(uint64(sectoff + 4))
-		ld.Thearch.Vput(ld.R_AARCH64_ADD_ABS_LO12_NC | uint64(elfsym)<<32)
-
-	case obj.R_CALLARM64:
-		if r.Siz != 4 {
-			return -1
-		}
-		ld.Thearch.Vput(ld.R_AARCH64_CALL26 | uint64(elfsym)<<32)
-
-	}
-	ld.Thearch.Vput(uint64(r.Xadd))
-
-	return 0
-}
-
-func elfsetupplt() {
-	// TODO(aram)
-	return
-}
-
-func machoreloc1(r *ld.Reloc, sectoff int64) int {
-	var v uint32
-
-	rs := r.Xsym
-
-	// ld64 has a bug handling MACHO_ARM64_RELOC_UNSIGNED with !extern relocation.
-	// see cmd/internal/ld/data.go for details. The workarond is that don't use !extern
-	// UNSIGNED relocation at all.
-	if rs.Type == obj.SHOSTOBJ || r.Type == obj.R_CALLARM64 || r.Type == obj.R_ADDRARM64 || r.Type == obj.R_ADDR {
-		if rs.Dynid < 0 {
-			ld.Diag("reloc %d to non-macho symbol %s type=%d", r.Type, rs.Name, rs.Type)
-			return -1
-		}
-
-		v = uint32(rs.Dynid)
-		v |= 1 << 27 // external relocation
-	} else {
-		v = uint32(rs.Sect.Extnum)
-		if v == 0 {
-			ld.Diag("reloc %d to symbol %s in non-macho section %s type=%d", r.Type, rs.Name, rs.Sect.Name, rs.Type)
-			return -1
-		}
-	}
-
-	switch r.Type {
-	default:
-		return -1
-
-	case obj.R_ADDR:
-		v |= ld.MACHO_ARM64_RELOC_UNSIGNED << 28
-
-	case obj.R_CALLARM64:
-		if r.Xadd != 0 {
-			ld.Diag("ld64 doesn't allow BR26 reloc with non-zero addend: %s+%d", rs.Name, r.Xadd)
-		}
-
-		v |= 1 << 24 // pc-relative bit
-		v |= ld.MACHO_ARM64_RELOC_BRANCH26 << 28
-
-	case obj.R_ADDRARM64:
-		r.Siz = 4
-		// Two relocation entries: MACHO_ARM64_RELOC_PAGEOFF12 MACHO_ARM64_RELOC_PAGE21
-		// if r.Xadd is non-zero, add two MACHO_ARM64_RELOC_ADDEND.
-		if r.Xadd != 0 {
-			ld.Thearch.Lput(uint32(sectoff + 4))
-			ld.Thearch.Lput((ld.MACHO_ARM64_RELOC_ADDEND << 28) | (2 << 25) | uint32(r.Xadd&0xffffff))
-		}
-		ld.Thearch.Lput(uint32(sectoff + 4))
-		ld.Thearch.Lput(v | (ld.MACHO_ARM64_RELOC_PAGEOFF12 << 28) | (2 << 25))
-		if r.Xadd != 0 {
-			ld.Thearch.Lput(uint32(sectoff))
-			ld.Thearch.Lput((ld.MACHO_ARM64_RELOC_ADDEND << 28) | (2 << 25) | uint32(r.Xadd&0xffffff))
-		}
-		v |= 1 << 24 // pc-relative bit
-		v |= ld.MACHO_ARM64_RELOC_PAGE21 << 28
-	}
-
-	switch r.Siz {
-	default:
-		return -1
-
-	case 1:
-		v |= 0 << 25
-
-	case 2:
-		v |= 1 << 25
-
-	case 4:
-		v |= 2 << 25
-
-	case 8:
-		v |= 3 << 25
-	}
-
-	ld.Thearch.Lput(uint32(sectoff))
-	ld.Thearch.Lput(v)
-	return 0
-}
-
-func archreloc(r *ld.Reloc, s *ld.LSym, val *int64) int {
-	if ld.Linkmode == ld.LinkExternal {
-		switch r.Type {
-		default:
-			return -1
-
-		case obj.R_ADDRARM64:
-			r.Done = 0
-
-			// set up addend for eventual relocation via outer symbol.
-			rs := r.Sym
-			r.Xadd = r.Add
-			for rs.Outer != nil {
-				r.Xadd += ld.Symaddr(rs) - ld.Symaddr(rs.Outer)
-				rs = rs.Outer
-			}
-
-			if rs.Type != obj.SHOSTOBJ && rs.Sect == nil {
-				ld.Diag("missing section for %s", rs.Name)
-			}
-			r.Xsym = rs
-
-			// the first instruction is always at the lower address, this is endian neutral;
-			// but note that o0 and o1 should still use the target endian.
-			o0 := ld.Thelinkarch.ByteOrder.Uint32(s.P[r.Off : r.Off+4])
-			o1 := ld.Thelinkarch.ByteOrder.Uint32(s.P[r.Off+4 : r.Off+8])
-
-			// Note: ld64 currently has a bug that any non-zero addend for BR26 relocation
-			// will make the linking fail because it thinks the code is not PIC even though
-			// the BR26 relocation should be fully resolved at link time.
-			// That is the reason why the next if block is disabled. When the bug in ld64
-			// is fixed, we can enable this block and also enable duff's device in cmd/7g.
-			if false && ld.HEADTYPE == obj.Hdarwin {
-				// Mach-O wants the addend to be encoded in the instruction
-				// Note that although Mach-O supports ARM64_RELOC_ADDEND, it
-				// can only encode 24-bit of signed addend, but the instructions
-				// supports 33-bit of signed addend, so we always encode the
-				// addend in place.
-				o0 |= (uint32((r.Xadd>>12)&3) << 29) | (uint32((r.Xadd>>12>>2)&0x7ffff) << 5)
-				o1 |= uint32(r.Xadd&0xfff) << 10
-				r.Xadd = 0
-			}
-
-			// when laid out, the instruction order must always be o1, o2.
-			if ld.Ctxt.Arch.ByteOrder == binary.BigEndian {
-				*val = int64(o0)<<32 | int64(o1)
-			} else {
-				*val = int64(o1)<<32 | int64(o0)
-			}
-
-			return 0
-
-		case obj.R_CALLARM64:
-			r.Done = 0
-			r.Xsym = r.Sym
-			*val = int64(0xfc000000 & uint32(r.Add))
-			r.Xadd = int64((uint32(r.Add) &^ 0xfc000000) * 4)
-			r.Add = 0
-			return 0
-		}
-	}
-
-	switch r.Type {
-	case obj.R_CONST:
-		*val = r.Add
-		return 0
-
-	case obj.R_GOTOFF:
-		*val = ld.Symaddr(r.Sym) + r.Add - ld.Symaddr(ld.Linklookup(ld.Ctxt, ".got", 0))
-		return 0
-
-	case obj.R_ADDRARM64:
-		t := ld.Symaddr(r.Sym) + r.Add - ((s.Value + int64(r.Off)) &^ 0xfff)
-		if t >= 1<<32 || t < -1<<32 {
-			ld.Diag("program too large, address relocation distance = %d", t)
-		}
-
-		// the first instruction is always at the lower address, this is endian neutral;
-		// but note that o0 and o1 should still use the target endian.
-		o0 := ld.Thelinkarch.ByteOrder.Uint32(s.P[r.Off : r.Off+4])
-		o1 := ld.Thelinkarch.ByteOrder.Uint32(s.P[r.Off+4 : r.Off+8])
-
-		o0 |= (uint32((t>>12)&3) << 29) | (uint32((t>>12>>2)&0x7ffff) << 5)
-		o1 |= uint32(t&0xfff) << 10
-
-		// when laid out, the instruction order must always be o1, o2.
-		if ld.Ctxt.Arch.ByteOrder == binary.BigEndian {
-			*val = int64(o0)<<32 | int64(o1)
-		} else {
-			*val = int64(o1)<<32 | int64(o0)
-		}
-		return 0
-
-	case obj.R_CALLARM64:
-		*val = int64((0xfc000000 & uint32(r.Add)) | uint32((ld.Symaddr(r.Sym)+r.Add*4-(s.Value+int64(r.Off)))/4))
-		return 0
-	}
-
-	return -1
-}
-
-func archrelocvariant(r *ld.Reloc, s *ld.LSym, t int64) int64 {
-	log.Fatalf("unexpected relocation variant")
-	return -1
-}
-
-func asmb() {
-	if ld.Debug['v'] != 0 {
-		fmt.Fprintf(&ld.Bso, "%5.2f asmb\n", obj.Cputime())
-	}
-	ld.Bso.Flush()
-
-	if ld.Iself {
-		ld.Asmbelfsetup()
-	}
-
-	sect := ld.Segtext.Sect
-	ld.Cseek(int64(sect.Vaddr - ld.Segtext.Vaddr + ld.Segtext.Fileoff))
-	ld.Codeblk(int64(sect.Vaddr), int64(sect.Length))
-	for sect = sect.Next; sect != nil; sect = sect.Next {
-		ld.Cseek(int64(sect.Vaddr - ld.Segtext.Vaddr + ld.Segtext.Fileoff))
-		ld.Datblk(int64(sect.Vaddr), int64(sect.Length))
-	}
-
-	if ld.Segrodata.Filelen > 0 {
-		if ld.Debug['v'] != 0 {
-			fmt.Fprintf(&ld.Bso, "%5.2f rodatblk\n", obj.Cputime())
-		}
-		ld.Bso.Flush()
-
-		ld.Cseek(int64(ld.Segrodata.Fileoff))
-		ld.Datblk(int64(ld.Segrodata.Vaddr), int64(ld.Segrodata.Filelen))
-	}
-
-	if ld.Debug['v'] != 0 {
-		fmt.Fprintf(&ld.Bso, "%5.2f datblk\n", obj.Cputime())
-	}
-	ld.Bso.Flush()
-
-	ld.Cseek(int64(ld.Segdata.Fileoff))
-	ld.Datblk(int64(ld.Segdata.Vaddr), int64(ld.Segdata.Filelen))
-
-	machlink := uint32(0)
-	if ld.HEADTYPE == obj.Hdarwin {
-		if ld.Debug['v'] != 0 {
-			fmt.Fprintf(&ld.Bso, "%5.2f dwarf\n", obj.Cputime())
-		}
-
-		dwarfoff := uint32(ld.Rnd(int64(uint64(ld.HEADR)+ld.Segtext.Length), int64(ld.INITRND)) + ld.Rnd(int64(ld.Segdata.Filelen), int64(ld.INITRND)))
-		ld.Cseek(int64(dwarfoff))
-
-		ld.Segdwarf.Fileoff = uint64(ld.Cpos())
-		ld.Dwarfemitdebugsections()
-		ld.Segdwarf.Filelen = uint64(ld.Cpos()) - ld.Segdwarf.Fileoff
-
-		machlink = uint32(ld.Domacholink())
-	}
-
-	/* output symbol table */
-	ld.Symsize = 0
-
-	ld.Lcsize = 0
-	symo := uint32(0)
-	if ld.Debug['s'] == 0 {
-		// TODO: rationalize
-		if ld.Debug['v'] != 0 {
-			fmt.Fprintf(&ld.Bso, "%5.2f sym\n", obj.Cputime())
-		}
-		ld.Bso.Flush()
-		switch ld.HEADTYPE {
-		default:
-			if ld.Iself {
-				symo = uint32(ld.Segdata.Fileoff + ld.Segdata.Filelen)
-				symo = uint32(ld.Rnd(int64(symo), int64(ld.INITRND)))
-			}
-
-		case obj.Hplan9:
-			symo = uint32(ld.Segdata.Fileoff + ld.Segdata.Filelen)
-
-		case obj.Hdarwin:
-			symo = uint32(ld.Segdwarf.Fileoff + uint64(ld.Rnd(int64(ld.Segdwarf.Filelen), int64(ld.INITRND))) + uint64(machlink))
-		}
-
-		ld.Cseek(int64(symo))
-		switch ld.HEADTYPE {
-		default:
-			if ld.Iself {
-				if ld.Debug['v'] != 0 {
-					fmt.Fprintf(&ld.Bso, "%5.2f elfsym\n", obj.Cputime())
-				}
-				ld.Asmelfsym()
-				ld.Cflush()
-				ld.Cwrite(ld.Elfstrdat)
-
-				if ld.Debug['v'] != 0 {
-					fmt.Fprintf(&ld.Bso, "%5.2f dwarf\n", obj.Cputime())
-				}
-				ld.Dwarfemitdebugsections()
-
-				if ld.Linkmode == ld.LinkExternal {
-					ld.Elfemitreloc()
-				}
-			}
-
-		case obj.Hplan9:
-			ld.Asmplan9sym()
-			ld.Cflush()
-
-			sym := ld.Linklookup(ld.Ctxt, "pclntab", 0)
-			if sym != nil {
-				ld.Lcsize = int32(len(sym.P))
-				for i := 0; int32(i) < ld.Lcsize; i++ {
-					ld.Cput(uint8(sym.P[i]))
-				}
-
-				ld.Cflush()
-			}
-
-		case obj.Hdarwin:
-			if ld.Linkmode == ld.LinkExternal {
-				ld.Machoemitreloc()
-			}
-		}
-	}
-
-	ld.Ctxt.Cursym = nil
-	if ld.Debug['v'] != 0 {
-		fmt.Fprintf(&ld.Bso, "%5.2f header\n", obj.Cputime())
-	}
-	ld.Bso.Flush()
-	ld.Cseek(0)
-	switch ld.HEADTYPE {
-	default:
-	case obj.Hplan9: /* plan 9 */
-		ld.Thearch.Lput(0x647)                      /* magic */
-		ld.Thearch.Lput(uint32(ld.Segtext.Filelen)) /* sizes */
-		ld.Thearch.Lput(uint32(ld.Segdata.Filelen))
-		ld.Thearch.Lput(uint32(ld.Segdata.Length - ld.Segdata.Filelen))
-		ld.Thearch.Lput(uint32(ld.Symsize))      /* nsyms */
-		ld.Thearch.Lput(uint32(ld.Entryvalue())) /* va of entry */
-		ld.Thearch.Lput(0)
-		ld.Thearch.Lput(uint32(ld.Lcsize))
-
-	case obj.Hlinux,
-		obj.Hfreebsd,
-		obj.Hnetbsd,
-		obj.Hopenbsd,
-		obj.Hnacl:
-		ld.Asmbelf(int64(symo))
-
-	case obj.Hdarwin:
-		ld.Asmbmacho()
-	}
-
-	ld.Cflush()
-	if ld.Debug['c'] != 0 {
-		fmt.Printf("textsize=%d\n", ld.Segtext.Filelen)
-		fmt.Printf("datsize=%d\n", ld.Segdata.Filelen)
-		fmt.Printf("bsssize=%d\n", ld.Segdata.Length-ld.Segdata.Filelen)
-		fmt.Printf("symsize=%d\n", ld.Symsize)
-		fmt.Printf("lcsize=%d\n", ld.Lcsize)
-		fmt.Printf("total=%d\n", ld.Segtext.Filelen+ld.Segdata.Length+uint64(ld.Symsize)+uint64(ld.Lcsize))
-	}
-}
diff --git a/src/cmd/link/internal/arm64/l.go b/src/cmd/link/internal/arm64/l.go
deleted file mode 100644
index 8d0d57e..0000000
--- a/src/cmd/link/internal/arm64/l.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// Inferno utils/5l/asm.c
-// http://code.google.com/p/inferno-os/source/browse/utils/5l/asm.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package arm64
-
-// Writing object files.
-
-// cmd/9l/l.h from Vita Nuova.
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2008 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2008 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-const (
-	thechar   = '7'
-	PtrSize   = 8
-	IntSize   = 8
-	RegSize   = 8
-	MaxAlign  = 32 // max data alignment
-	FuncAlign = 8
-	MINLC     = 4
-)
-
-/* Used by ../internal/ld/dwarf.go */
-const (
-	DWARFREGSP = 31
-	DWARFREGLR = 30
-)
diff --git a/src/cmd/link/internal/arm64/obj.go b/src/cmd/link/internal/arm64/obj.go
deleted file mode 100644
index 56f5815..0000000
--- a/src/cmd/link/internal/arm64/obj.go
+++ /dev/null
@@ -1,169 +0,0 @@
-// Inferno utils/5l/obj.c
-// http://code.google.com/p/inferno-os/source/browse/utils/5l/obj.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package arm64
-
-import (
-	"cmd/internal/obj"
-	"cmd/link/internal/ld"
-	"fmt"
-	"log"
-)
-
-// Reading object files.
-
-func Main() {
-	linkarchinit()
-	ld.Ldmain()
-}
-
-func linkarchinit() {
-	ld.Thestring = obj.Getgoarch()
-	ld.Thelinkarch = &ld.Linkarm64
-
-	ld.Thearch.Thechar = thechar
-	ld.Thearch.Ptrsize = ld.Thelinkarch.Ptrsize
-	ld.Thearch.Intsize = ld.Thelinkarch.Ptrsize
-	ld.Thearch.Regsize = ld.Thelinkarch.Regsize
-	ld.Thearch.Funcalign = FuncAlign
-	ld.Thearch.Maxalign = MaxAlign
-	ld.Thearch.Minlc = MINLC
-	ld.Thearch.Dwarfregsp = DWARFREGSP
-	ld.Thearch.Dwarfreglr = DWARFREGLR
-
-	ld.Thearch.Adddynrel = adddynrel
-	ld.Thearch.Archinit = archinit
-	ld.Thearch.Archreloc = archreloc
-	ld.Thearch.Archrelocvariant = archrelocvariant
-	ld.Thearch.Asmb = asmb
-	ld.Thearch.Elfreloc1 = elfreloc1
-	ld.Thearch.Elfsetupplt = elfsetupplt
-	ld.Thearch.Gentext = gentext
-	ld.Thearch.Machoreloc1 = machoreloc1
-	ld.Thearch.Lput = ld.Lputl
-	ld.Thearch.Wput = ld.Wputl
-	ld.Thearch.Vput = ld.Vputl
-
-	ld.Thearch.Linuxdynld = "/lib/ld-linux-aarch64.so.1"
-
-	ld.Thearch.Freebsddynld = "XXX"
-	ld.Thearch.Openbsddynld = "XXX"
-	ld.Thearch.Netbsddynld = "XXX"
-	ld.Thearch.Dragonflydynld = "XXX"
-	ld.Thearch.Solarisdynld = "XXX"
-}
-
-func archinit() {
-	// getgoextlinkenabled is based on GO_EXTLINK_ENABLED when
-	// Go was built; see ../../make.bash.
-	if ld.Linkmode == ld.LinkAuto && obj.Getgoextlinkenabled() == "0" {
-		ld.Linkmode = ld.LinkInternal
-	}
-
-	// Darwin/arm64 only supports external linking
-	if ld.HEADTYPE == obj.Hdarwin {
-		ld.Linkmode = ld.LinkExternal
-	}
-
-	switch ld.HEADTYPE {
-	default:
-		if ld.Linkmode == ld.LinkAuto {
-			ld.Linkmode = ld.LinkInternal
-		}
-		if ld.Linkmode == ld.LinkExternal && obj.Getgoextlinkenabled() != "1" {
-			log.Fatalf("cannot use -linkmode=external with -H %s", ld.Headstr(int(ld.HEADTYPE)))
-		}
-	case obj.Hlinux, obj.Hdarwin:
-		break
-	}
-
-	switch ld.HEADTYPE {
-	default:
-		ld.Exitf("unknown -H option: %v", ld.HEADTYPE)
-
-	case obj.Hplan9: /* plan 9 */
-		ld.HEADR = 32
-
-		if ld.INITTEXT == -1 {
-			ld.INITTEXT = 4128
-		}
-		if ld.INITDAT == -1 {
-			ld.INITDAT = 0
-		}
-		if ld.INITRND == -1 {
-			ld.INITRND = 4096
-		}
-
-	case obj.Hlinux: /* arm64 elf */
-		ld.Elfinit()
-		ld.HEADR = ld.ELFRESERVE
-		if ld.INITTEXT == -1 {
-			ld.INITTEXT = 0x10000 + int64(ld.HEADR)
-		}
-		if ld.INITDAT == -1 {
-			ld.INITDAT = 0
-		}
-		if ld.INITRND == -1 {
-			ld.INITRND = 0x10000
-		}
-
-	case obj.Hdarwin: /* apple MACH */
-		ld.Debug['w'] = 1 // disable DWARF generation
-		ld.Machoinit()
-		ld.HEADR = ld.INITIAL_MACHO_HEADR
-		if ld.INITTEXT == -1 {
-			ld.INITTEXT = 4096 + int64(ld.HEADR)
-		}
-		if ld.INITDAT == -1 {
-			ld.INITDAT = 0
-		}
-		if ld.INITRND == -1 {
-			ld.INITRND = 4096
-		}
-
-	case obj.Hnacl:
-		ld.Elfinit()
-		ld.HEADR = 0x10000
-		ld.Funcalign = 16
-		if ld.INITTEXT == -1 {
-			ld.INITTEXT = 0x20000
-		}
-		if ld.INITDAT == -1 {
-			ld.INITDAT = 0
-		}
-		if ld.INITRND == -1 {
-			ld.INITRND = 0x10000
-		}
-	}
-
-	if ld.INITDAT != 0 && ld.INITRND != 0 {
-		fmt.Printf("warning: -D0x%x is ignored because of -R0x%x\n", uint64(ld.INITDAT), uint32(ld.INITRND))
-	}
-}
diff --git a/src/cmd/link/internal/ld/ar.go b/src/cmd/link/internal/ld/ar.go
deleted file mode 100644
index 0e59016..0000000
--- a/src/cmd/link/internal/ld/ar.go
+++ /dev/null
@@ -1,52 +0,0 @@
-// Inferno utils/include/ar.h
-// http://code.google.com/p/inferno-os/source/browse/utils/include/ar.h
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package ld
-
-const (
-	SARMAG  = 8
-	SARNAME = 16
-	SAR_HDR = 16 + 44
-)
-
-const (
-	ARMAG  = "!<arch>\n"
-	ARFMAG = "`\n"
-)
-
-type ArHdr struct {
-	name string
-	date string
-	uid  string
-	gid  string
-	mode string
-	size string
-	fmag string
-}
diff --git a/src/cmd/link/internal/ld/arch.go b/src/cmd/link/internal/ld/arch.go
deleted file mode 100644
index 1b8e1b1..0000000
--- a/src/cmd/link/internal/ld/arch.go
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package ld
-
-import "encoding/binary"
-
-var Linkarm = LinkArch{
-	ByteOrder: binary.LittleEndian,
-	Name:      "arm",
-	Thechar:   '5',
-	Minlc:     4,
-	Ptrsize:   4,
-	Regsize:   4,
-}
-
-var Linkarm64 = LinkArch{
-	ByteOrder: binary.LittleEndian,
-	Name:      "arm64",
-	Thechar:   '7',
-	Minlc:     4,
-	Ptrsize:   8,
-	Regsize:   8,
-}
-
-var Linkamd64 = LinkArch{
-	ByteOrder: binary.LittleEndian,
-	Name:      "amd64",
-	Thechar:   '6',
-	Minlc:     1,
-	Ptrsize:   8,
-	Regsize:   8,
-}
-
-var Linkamd64p32 = LinkArch{
-	ByteOrder: binary.LittleEndian,
-	Name:      "amd64p32",
-	Thechar:   '6',
-	Minlc:     1,
-	Ptrsize:   4,
-	Regsize:   8,
-}
-
-var Link386 = LinkArch{
-	ByteOrder: binary.LittleEndian,
-	Name:      "386",
-	Thechar:   '8',
-	Minlc:     1,
-	Ptrsize:   4,
-	Regsize:   4,
-}
-
-var Linkppc64 = LinkArch{
-	ByteOrder: binary.BigEndian,
-	Name:      "ppc64",
-	Thechar:   '9',
-	Minlc:     4,
-	Ptrsize:   8,
-	Regsize:   8,
-}
-
-var Linkppc64le = LinkArch{
-	ByteOrder: binary.LittleEndian,
-	Name:      "ppc64le",
-	Thechar:   '9',
-	Minlc:     4,
-	Ptrsize:   8,
-	Regsize:   8,
-}
diff --git a/src/cmd/link/internal/ld/data.go b/src/cmd/link/internal/ld/data.go
deleted file mode 100644
index 55b12e5..0000000
--- a/src/cmd/link/internal/ld/data.go
+++ /dev/null
@@ -1,1764 +0,0 @@
-// Derived from Inferno utils/6l/obj.c and utils/6l/span.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6l/obj.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6l/span.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package ld
-
-import (
-	"cmd/internal/gcprog"
-	"cmd/internal/obj"
-	"fmt"
-	"log"
-	"os"
-	"strconv"
-	"strings"
-)
-
-func Symgrow(ctxt *Link, s *LSym, siz int64) {
-	if int64(int(siz)) != siz {
-		log.Fatalf("symgrow size %d too long", siz)
-	}
-	if int64(len(s.P)) >= siz {
-		return
-	}
-	for cap(s.P) < int(siz) {
-		s.P = append(s.P[:len(s.P)], 0)
-	}
-	s.P = s.P[:siz]
-}
-
-func Addrel(s *LSym) *Reloc {
-	s.R = append(s.R, Reloc{})
-	return &s.R[len(s.R)-1]
-}
-
-func setuintxx(ctxt *Link, s *LSym, off int64, v uint64, wid int64) int64 {
-	if s.Type == 0 {
-		s.Type = obj.SDATA
-	}
-	s.Reachable = true
-	if s.Size < off+wid {
-		s.Size = off + wid
-		Symgrow(ctxt, s, s.Size)
-	}
-
-	switch wid {
-	case 1:
-		s.P[off] = uint8(v)
-	case 2:
-		ctxt.Arch.ByteOrder.PutUint16(s.P[off:], uint16(v))
-	case 4:
-		ctxt.Arch.ByteOrder.PutUint32(s.P[off:], uint32(v))
-	case 8:
-		ctxt.Arch.ByteOrder.PutUint64(s.P[off:], uint64(v))
-	}
-
-	return off + wid
-}
-
-func adduintxx(ctxt *Link, s *LSym, v uint64, wid int) int64 {
-	off := s.Size
-	setuintxx(ctxt, s, off, v, int64(wid))
-	return off
-}
-
-func Adduint8(ctxt *Link, s *LSym, v uint8) int64 {
-	return adduintxx(ctxt, s, uint64(v), 1)
-}
-
-func Adduint16(ctxt *Link, s *LSym, v uint16) int64 {
-	return adduintxx(ctxt, s, uint64(v), 2)
-}
-
-func Adduint32(ctxt *Link, s *LSym, v uint32) int64 {
-	return adduintxx(ctxt, s, uint64(v), 4)
-}
-
-func Adduint64(ctxt *Link, s *LSym, v uint64) int64 {
-	return adduintxx(ctxt, s, v, 8)
-}
-
-func adduint(ctxt *Link, s *LSym, v uint64) int64 {
-	return adduintxx(ctxt, s, v, Thearch.Intsize)
-}
-
-func setuint8(ctxt *Link, s *LSym, r int64, v uint8) int64 {
-	return setuintxx(ctxt, s, r, uint64(v), 1)
-}
-
-func setuint32(ctxt *Link, s *LSym, r int64, v uint32) int64 {
-	return setuintxx(ctxt, s, r, uint64(v), 4)
-}
-
-func Addaddrplus(ctxt *Link, s *LSym, t *LSym, add int64) int64 {
-	if s.Type == 0 {
-		s.Type = obj.SDATA
-	}
-	s.Reachable = true
-	i := s.Size
-	s.Size += int64(ctxt.Arch.Ptrsize)
-	Symgrow(ctxt, s, s.Size)
-	r := Addrel(s)
-	r.Sym = t
-	r.Off = int32(i)
-	r.Siz = uint8(ctxt.Arch.Ptrsize)
-	r.Type = obj.R_ADDR
-	r.Add = add
-	return i + int64(r.Siz)
-}
-
-func Addpcrelplus(ctxt *Link, s *LSym, t *LSym, add int64) int64 {
-	if s.Type == 0 {
-		s.Type = obj.SDATA
-	}
-	s.Reachable = true
-	i := s.Size
-	s.Size += 4
-	Symgrow(ctxt, s, s.Size)
-	r := Addrel(s)
-	r.Sym = t
-	r.Off = int32(i)
-	r.Add = add
-	r.Type = obj.R_PCREL
-	r.Siz = 4
-	return i + int64(r.Siz)
-}
-
-func Addaddr(ctxt *Link, s *LSym, t *LSym) int64 {
-	return Addaddrplus(ctxt, s, t, 0)
-}
-
-func setaddrplus(ctxt *Link, s *LSym, off int64, t *LSym, add int64) int64 {
-	if s.Type == 0 {
-		s.Type = obj.SDATA
-	}
-	s.Reachable = true
-	if off+int64(ctxt.Arch.Ptrsize) > s.Size {
-		s.Size = off + int64(ctxt.Arch.Ptrsize)
-		Symgrow(ctxt, s, s.Size)
-	}
-
-	r := Addrel(s)
-	r.Sym = t
-	r.Off = int32(off)
-	r.Siz = uint8(ctxt.Arch.Ptrsize)
-	r.Type = obj.R_ADDR
-	r.Add = add
-	return off + int64(r.Siz)
-}
-
-func setaddr(ctxt *Link, s *LSym, off int64, t *LSym) int64 {
-	return setaddrplus(ctxt, s, off, t, 0)
-}
-
-func addsize(ctxt *Link, s *LSym, t *LSym) int64 {
-	if s.Type == 0 {
-		s.Type = obj.SDATA
-	}
-	s.Reachable = true
-	i := s.Size
-	s.Size += int64(ctxt.Arch.Ptrsize)
-	Symgrow(ctxt, s, s.Size)
-	r := Addrel(s)
-	r.Sym = t
-	r.Off = int32(i)
-	r.Siz = uint8(ctxt.Arch.Ptrsize)
-	r.Type = obj.R_SIZE
-	return i + int64(r.Siz)
-}
-
-func addaddrplus4(ctxt *Link, s *LSym, t *LSym, add int64) int64 {
-	if s.Type == 0 {
-		s.Type = obj.SDATA
-	}
-	s.Reachable = true
-	i := s.Size
-	s.Size += 4
-	Symgrow(ctxt, s, s.Size)
-	r := Addrel(s)
-	r.Sym = t
-	r.Off = int32(i)
-	r.Siz = 4
-	r.Type = obj.R_ADDR
-	r.Add = add
-	return i + int64(r.Siz)
-}
-
-/*
- * divide-and-conquer list-link
- * sort of LSym* structures.
- * Used for the data block.
- */
-func datcmp(s1 *LSym, s2 *LSym) int {
-	if s1.Type != s2.Type {
-		return int(s1.Type) - int(s2.Type)
-	}
-
-	// For ppc64, we want to interleave the .got and .toc sections
-	// from input files.  Both are type SELFGOT, so in that case
-	// fall through to the name comparison (conveniently, .got
-	// sorts before .toc).
-	if s1.Type != obj.SELFGOT && s1.Size != s2.Size {
-		if s1.Size < s2.Size {
-			return -1
-		}
-		return +1
-	}
-
-	return stringsCompare(s1.Name, s2.Name)
-}
-
-func listnextp(s *LSym) **LSym {
-	return &s.Next
-}
-
-func listsubp(s *LSym) **LSym {
-	return &s.Sub
-}
-
-func listsort(l *LSym, cmp func(*LSym, *LSym) int, nextp func(*LSym) **LSym) *LSym {
-	if l == nil || *nextp(l) == nil {
-		return l
-	}
-
-	l1 := l
-	l2 := l
-	for {
-		l2 = *nextp(l2)
-		if l2 == nil {
-			break
-		}
-		l2 = *nextp(l2)
-		if l2 == nil {
-			break
-		}
-		l1 = *nextp(l1)
-	}
-
-	l2 = *nextp(l1)
-	*nextp(l1) = nil
-	l1 = listsort(l, cmp, nextp)
-	l2 = listsort(l2, cmp, nextp)
-
-	/* set up lead element */
-	if cmp(l1, l2) < 0 {
-		l = l1
-		l1 = *nextp(l1)
-	} else {
-		l = l2
-		l2 = *nextp(l2)
-	}
-
-	le := l
-
-	for {
-		if l1 == nil {
-			for l2 != nil {
-				*nextp(le) = l2
-				le = l2
-				l2 = *nextp(l2)
-			}
-
-			*nextp(le) = nil
-			break
-		}
-
-		if l2 == nil {
-			for l1 != nil {
-				*nextp(le) = l1
-				le = l1
-				l1 = *nextp(l1)
-			}
-
-			break
-		}
-
-		if cmp(l1, l2) < 0 {
-			*nextp(le) = l1
-			le = l1
-			l1 = *nextp(l1)
-		} else {
-			*nextp(le) = l2
-			le = l2
-			l2 = *nextp(l2)
-		}
-	}
-
-	*nextp(le) = nil
-	return l
-}
-
-func relocsym(s *LSym) {
-	var r *Reloc
-	var rs *LSym
-	var i16 int16
-	var off int32
-	var siz int32
-	var fl int32
-	var o int64
-
-	Ctxt.Cursym = s
-	for ri := int32(0); ri < int32(len(s.R)); ri++ {
-		r = &s.R[ri]
-		r.Done = 1
-		off = r.Off
-		siz = int32(r.Siz)
-		if off < 0 || off+siz > int32(len(s.P)) {
-			Diag("%s: invalid relocation %d+%d not in [%d,%d)", s.Name, off, siz, 0, len(s.P))
-			continue
-		}
-
-		if r.Sym != nil && (r.Sym.Type&(obj.SMASK|obj.SHIDDEN) == 0 || r.Sym.Type&obj.SMASK == obj.SXREF) {
-			// When putting the runtime but not main into a shared library
-			// these symbols are undefined and that's OK.
-			if Buildmode == BuildmodeShared && (r.Sym.Name == "main.main" || r.Sym.Name == "main.init") {
-				r.Sym.Type = obj.SDYNIMPORT
-			} else {
-				Diag("%s: not defined", r.Sym.Name)
-				continue
-			}
-		}
-
-		if r.Type >= 256 {
-			continue
-		}
-		if r.Siz == 0 { // informational relocation - no work to do
-			continue
-		}
-
-		// We need to be able to reference dynimport symbols when linking against
-		// shared libraries, and Solaris needs it always
-		if HEADTYPE != obj.Hsolaris && r.Sym != nil && r.Sym.Type == obj.SDYNIMPORT && !DynlinkingGo() {
-			Diag("unhandled relocation for %s (type %d rtype %d)", r.Sym.Name, r.Sym.Type, r.Type)
-		}
-		if r.Sym != nil && r.Sym.Type != obj.STLSBSS && !r.Sym.Reachable {
-			Diag("unreachable sym in relocation: %s %s", s.Name, r.Sym.Name)
-		}
-
-		// Android emulates runtime.tlsg as a regular variable.
-		if r.Type == obj.R_TLS && goos == "android" {
-			r.Type = obj.R_ADDR
-		}
-
-		switch r.Type {
-		default:
-			o = 0
-			if Thearch.Archreloc(r, s, &o) < 0 {
-				Diag("unknown reloc %d", r.Type)
-			}
-
-		case obj.R_TLS:
-			if Linkmode == LinkExternal && Iself && HEADTYPE != obj.Hopenbsd {
-				r.Done = 0
-				r.Sym = Ctxt.Tlsg
-				r.Xsym = Ctxt.Tlsg
-				r.Xadd = r.Add
-				o = r.Add
-				break
-			}
-			if Linkmode == LinkInternal && Iself && Thearch.Thechar == '5' {
-				// On ELF ARM, the thread pointer is 8 bytes before
-				// the start of the thread-local data block, so add 8
-				// to the actual TLS offset (r->sym->value).
-				// This 8 seems to be a fundamental constant of
-				// ELF on ARM (or maybe Glibc on ARM); it is not
-				// related to the fact that our own TLS storage happens
-				// to take up 8 bytes.
-				o = 8 + r.Sym.Value
-
-				break
-			}
-
-			r.Done = 0
-			o = 0
-			if Thearch.Thechar != '6' {
-				o = r.Add
-			}
-
-		case obj.R_TLS_LE:
-			if Linkmode == LinkExternal && Iself && HEADTYPE != obj.Hopenbsd {
-				r.Done = 0
-				r.Sym = Ctxt.Tlsg
-				r.Xsym = Ctxt.Tlsg
-				r.Xadd = r.Add
-				o = 0
-				if Thearch.Thechar != '6' {
-					o = r.Add
-				}
-				break
-			}
-
-			if Iself || Ctxt.Headtype == obj.Hplan9 || Ctxt.Headtype == obj.Hdarwin {
-				o = int64(Ctxt.Tlsoffset) + r.Add
-			} else if Ctxt.Headtype == obj.Hwindows {
-				o = r.Add
-			} else {
-				log.Fatalf("unexpected R_TLS_LE relocation for %s", Headstr(Ctxt.Headtype))
-			}
-
-		case obj.R_TLS_IE:
-			if Linkmode == LinkExternal && Iself && HEADTYPE != obj.Hopenbsd {
-				r.Done = 0
-				r.Sym = Ctxt.Tlsg
-				r.Xsym = Ctxt.Tlsg
-				r.Xadd = r.Add
-				o = 0
-				if Thearch.Thechar != '6' {
-					o = r.Add
-				}
-				break
-			}
-			log.Fatalf("cannot handle R_TLS_IE when linking internally")
-
-		case obj.R_ADDR:
-			if Linkmode == LinkExternal && r.Sym.Type != obj.SCONST {
-				r.Done = 0
-
-				// set up addend for eventual relocation via outer symbol.
-				rs = r.Sym
-
-				r.Xadd = r.Add
-				for rs.Outer != nil {
-					r.Xadd += Symaddr(rs) - Symaddr(rs.Outer)
-					rs = rs.Outer
-				}
-
-				if rs.Type != obj.SHOSTOBJ && rs.Type != obj.SDYNIMPORT && rs.Sect == nil {
-					Diag("missing section for %s", rs.Name)
-				}
-				r.Xsym = rs
-
-				o = r.Xadd
-				if Iself {
-					if Thearch.Thechar == '6' {
-						o = 0
-					}
-				} else if HEADTYPE == obj.Hdarwin {
-					// ld64 for arm64 has a bug where if the address pointed to by o exists in the
-					// symbol table (dynid >= 0), or is inside a symbol that exists in the symbol
-					// table, then it will add o twice into the relocated value.
-					// The workaround is that on arm64 don't ever add symaddr to o and always use
-					// extern relocation by requiring rs->dynid >= 0.
-					if rs.Type != obj.SHOSTOBJ {
-						if Thearch.Thechar == '7' && rs.Dynid < 0 {
-							Diag("R_ADDR reloc to %s+%d is not supported on darwin/arm64", rs.Name, o)
-						}
-						if Thearch.Thechar != '7' {
-							o += Symaddr(rs)
-						}
-					}
-				} else if HEADTYPE == obj.Hwindows {
-					// nothing to do
-				} else {
-					Diag("unhandled pcrel relocation for %s", headstring)
-				}
-
-				break
-			}
-
-			o = Symaddr(r.Sym) + r.Add
-
-			// On amd64, 4-byte offsets will be sign-extended, so it is impossible to
-			// access more than 2GB of static data; fail at link time is better than
-			// fail at runtime. See https://golang.org/issue/7980.
-			// Instead of special casing only amd64, we treat this as an error on all
-			// 64-bit architectures so as to be future-proof.
-			if int32(o) < 0 && Thearch.Ptrsize > 4 && siz == 4 {
-				Diag("non-pc-relative relocation address is too big: %#x (%#x + %#x)", uint64(o), Symaddr(r.Sym), r.Add)
-				errorexit()
-			}
-
-			// r->sym can be null when CALL $(constant) is transformed from absolute PC to relative PC call.
-		case obj.R_CALL, obj.R_GOTPCREL, obj.R_PCREL:
-			if Linkmode == LinkExternal && r.Sym != nil && r.Sym.Type != obj.SCONST && (r.Sym.Sect != Ctxt.Cursym.Sect || r.Type == obj.R_GOTPCREL) {
-				r.Done = 0
-
-				// set up addend for eventual relocation via outer symbol.
-				rs = r.Sym
-
-				r.Xadd = r.Add
-				for rs.Outer != nil {
-					r.Xadd += Symaddr(rs) - Symaddr(rs.Outer)
-					rs = rs.Outer
-				}
-
-				r.Xadd -= int64(r.Siz) // relative to address after the relocated chunk
-				if rs.Type != obj.SHOSTOBJ && rs.Type != obj.SDYNIMPORT && rs.Sect == nil {
-					Diag("missing section for %s", rs.Name)
-				}
-				r.Xsym = rs
-
-				o = r.Xadd
-				if Iself {
-					if Thearch.Thechar == '6' {
-						o = 0
-					}
-				} else if HEADTYPE == obj.Hdarwin {
-					if r.Type == obj.R_CALL {
-						if rs.Type != obj.SHOSTOBJ {
-							o += int64(uint64(Symaddr(rs)) - rs.Sect.Vaddr)
-						}
-						o -= int64(r.Off) // relative to section offset, not symbol
-					} else {
-						o += int64(r.Siz)
-					}
-				} else if HEADTYPE == obj.Hwindows && Thearch.Thechar == '6' { // only amd64 needs PCREL
-					// PE/COFF's PC32 relocation uses the address after the relocated
-					// bytes as the base. Compensate by skewing the addend.
-					o += int64(r.Siz)
-					// GNU ld always add VirtualAddress of the .text section to the
-					// relocated address, compensate that.
-					o -= int64(s.Sect.Vaddr - PEBASE)
-				} else {
-					Diag("unhandled pcrel relocation for %s", headstring)
-				}
-
-				break
-			}
-
-			o = 0
-			if r.Sym != nil {
-				o += Symaddr(r.Sym)
-			}
-
-			// NOTE: The (int32) cast on the next line works around a bug in Plan 9's 8c
-			// compiler. The expression s->value + r->off + r->siz is int32 + int32 +
-			// uchar, and Plan 9 8c incorrectly treats the expression as type uint32
-			// instead of int32, causing incorrect values when sign extended for adding
-			// to o. The bug only occurs on Plan 9, because this C program is compiled by
-			// the standard host compiler (gcc on most other systems).
-			o += r.Add - (s.Value + int64(r.Off) + int64(int32(r.Siz)))
-
-		case obj.R_SIZE:
-			o = r.Sym.Size + r.Add
-		}
-
-		if r.Variant != RV_NONE {
-			o = Thearch.Archrelocvariant(r, s, o)
-		}
-
-		if false {
-			nam := "<nil>"
-			if r.Sym != nil {
-				nam = r.Sym.Name
-			}
-			fmt.Printf("relocate %s %#x (%#x+%#x, size %d) => %s %#x +%#x [type %d/%d, %x]\n", s.Name, s.Value+int64(off), s.Value, r.Off, r.Siz, nam, Symaddr(r.Sym), r.Add, r.Type, r.Variant, o)
-		}
-		switch siz {
-		default:
-			Ctxt.Cursym = s
-			Diag("bad reloc size %#x for %s", uint32(siz), r.Sym.Name)
-			fallthrough
-
-			// TODO(rsc): Remove.
-		case 1:
-			s.P[off] = byte(int8(o))
-
-		case 2:
-			if o != int64(int16(o)) {
-				Diag("relocation address is too big: %#x", o)
-			}
-			i16 = int16(o)
-			Ctxt.Arch.ByteOrder.PutUint16(s.P[off:], uint16(i16))
-
-		case 4:
-			if r.Type == obj.R_PCREL || r.Type == obj.R_CALL {
-				if o != int64(int32(o)) {
-					Diag("pc-relative relocation address is too big: %#x", o)
-				}
-			} else {
-				if o != int64(int32(o)) && o != int64(uint32(o)) {
-					Diag("non-pc-relative relocation address is too big: %#x", uint64(o))
-				}
-			}
-
-			fl = int32(o)
-			Ctxt.Arch.ByteOrder.PutUint32(s.P[off:], uint32(fl))
-
-		case 8:
-			Ctxt.Arch.ByteOrder.PutUint64(s.P[off:], uint64(o))
-		}
-	}
-}
-
-func reloc() {
-	if Debug['v'] != 0 {
-		fmt.Fprintf(&Bso, "%5.2f reloc\n", obj.Cputime())
-	}
-	Bso.Flush()
-
-	for s := Ctxt.Textp; s != nil; s = s.Next {
-		relocsym(s)
-	}
-	for s := datap; s != nil; s = s.Next {
-		relocsym(s)
-	}
-}
-
-func dynrelocsym(s *LSym) {
-	if HEADTYPE == obj.Hwindows && Linkmode != LinkExternal {
-		rel := Linklookup(Ctxt, ".rel", 0)
-		if s == rel {
-			return
-		}
-		var r *Reloc
-		var targ *LSym
-		for ri := 0; ri < len(s.R); ri++ {
-			r = &s.R[ri]
-			targ = r.Sym
-			if targ == nil {
-				continue
-			}
-			if !targ.Reachable {
-				Diag("internal inconsistency: dynamic symbol %s is not reachable.", targ.Name)
-			}
-			if r.Sym.Plt == -2 && r.Sym.Got != -2 { // make dynimport JMP table for PE object files.
-				targ.Plt = int32(rel.Size)
-				r.Sym = rel
-				r.Add = int64(targ.Plt)
-
-				// jmp *addr
-				if Thearch.Thechar == '8' {
-					Adduint8(Ctxt, rel, 0xff)
-					Adduint8(Ctxt, rel, 0x25)
-					Addaddr(Ctxt, rel, targ)
-					Adduint8(Ctxt, rel, 0x90)
-					Adduint8(Ctxt, rel, 0x90)
-				} else {
-					Adduint8(Ctxt, rel, 0xff)
-					Adduint8(Ctxt, rel, 0x24)
-					Adduint8(Ctxt, rel, 0x25)
-					addaddrplus4(Ctxt, rel, targ, 0)
-					Adduint8(Ctxt, rel, 0x90)
-				}
-			} else if r.Sym.Plt >= 0 {
-				r.Sym = rel
-				r.Add = int64(targ.Plt)
-			}
-		}
-
-		return
-	}
-
-	var r *Reloc
-	for ri := 0; ri < len(s.R); ri++ {
-		r = &s.R[ri]
-		if r.Sym != nil && r.Sym.Type == obj.SDYNIMPORT || r.Type >= 256 {
-			if r.Sym != nil && !r.Sym.Reachable {
-				Diag("internal inconsistency: dynamic symbol %s is not reachable.", r.Sym.Name)
-			}
-			Thearch.Adddynrel(s, r)
-		}
-	}
-}
-
-func dynreloc() {
-	// -d suppresses dynamic loader format, so we may as well not
-	// compute these sections or mark their symbols as reachable.
-	if Debug['d'] != 0 && HEADTYPE != obj.Hwindows {
-		return
-	}
-	if Debug['v'] != 0 {
-		fmt.Fprintf(&Bso, "%5.2f reloc\n", obj.Cputime())
-	}
-	Bso.Flush()
-
-	for s := Ctxt.Textp; s != nil; s = s.Next {
-		dynrelocsym(s)
-	}
-	for s := datap; s != nil; s = s.Next {
-		dynrelocsym(s)
-	}
-	if Iself {
-		elfdynhash()
-	}
-}
-
-func blk(start *LSym, addr int64, size int64) {
-	var sym *LSym
-
-	for sym = start; sym != nil; sym = sym.Next {
-		if sym.Type&obj.SSUB == 0 && sym.Value >= addr {
-			break
-		}
-	}
-
-	eaddr := addr + size
-	var ep []byte
-	var p []byte
-	for ; sym != nil; sym = sym.Next {
-		if sym.Type&obj.SSUB != 0 {
-			continue
-		}
-		if sym.Value >= eaddr {
-			break
-		}
-		Ctxt.Cursym = sym
-		if sym.Value < addr {
-			Diag("phase error: addr=%#x but sym=%#x type=%d", int64(addr), int64(sym.Value), sym.Type)
-			errorexit()
-		}
-
-		for ; addr < sym.Value; addr++ {
-			Cput(0)
-		}
-		p = sym.P
-		ep = p[len(sym.P):]
-		for -cap(p) < -cap(ep) {
-			Cput(uint8(p[0]))
-			p = p[1:]
-		}
-		addr += int64(len(sym.P))
-		for ; addr < sym.Value+sym.Size; addr++ {
-			Cput(0)
-		}
-		if addr != sym.Value+sym.Size {
-			Diag("phase error: addr=%#x value+size=%#x", int64(addr), int64(sym.Value)+sym.Size)
-			errorexit()
-		}
-
-		if sym.Value+sym.Size >= eaddr {
-			break
-		}
-	}
-
-	for ; addr < eaddr; addr++ {
-		Cput(0)
-	}
-	Cflush()
-}
-
-func Codeblk(addr int64, size int64) {
-	if Debug['a'] != 0 {
-		fmt.Fprintf(&Bso, "codeblk [%#x,%#x) at offset %#x\n", addr, addr+size, Cpos())
-	}
-
-	blk(Ctxt.Textp, addr, size)
-
-	/* again for printing */
-	if Debug['a'] == 0 {
-		return
-	}
-
-	var sym *LSym
-	for sym = Ctxt.Textp; sym != nil; sym = sym.Next {
-		if !sym.Reachable {
-			continue
-		}
-		if sym.Value >= addr {
-			break
-		}
-	}
-
-	eaddr := addr + size
-	var q []byte
-	for ; sym != nil; sym = sym.Next {
-		if !sym.Reachable {
-			continue
-		}
-		if sym.Value >= eaddr {
-			break
-		}
-
-		if addr < sym.Value {
-			fmt.Fprintf(&Bso, "%-20s %.8x|", "_", uint64(int64(addr)))
-			for ; addr < sym.Value; addr++ {
-				fmt.Fprintf(&Bso, " %.2x", 0)
-			}
-			fmt.Fprintf(&Bso, "\n")
-		}
-
-		fmt.Fprintf(&Bso, "%.6x\t%-20s\n", uint64(int64(addr)), sym.Name)
-		q = sym.P
-
-		for len(q) >= 16 {
-			fmt.Fprintf(&Bso, "%.6x\t% x\n", uint64(addr), q[:16])
-			addr += 16
-			q = q[16:]
-		}
-
-		if len(q) > 0 {
-			fmt.Fprintf(&Bso, "%.6x\t% x\n", uint64(addr), q)
-			addr += int64(len(q))
-		}
-	}
-
-	if addr < eaddr {
-		fmt.Fprintf(&Bso, "%-20s %.8x|", "_", uint64(int64(addr)))
-		for ; addr < eaddr; addr++ {
-			fmt.Fprintf(&Bso, " %.2x", 0)
-		}
-	}
-
-	Bso.Flush()
-}
-
-func Datblk(addr int64, size int64) {
-	if Debug['a'] != 0 {
-		fmt.Fprintf(&Bso, "datblk [%#x,%#x) at offset %#x\n", addr, addr+size, Cpos())
-	}
-
-	blk(datap, addr, size)
-
-	/* again for printing */
-	if Debug['a'] == 0 {
-		return
-	}
-
-	var sym *LSym
-	for sym = datap; sym != nil; sym = sym.Next {
-		if sym.Value >= addr {
-			break
-		}
-	}
-
-	eaddr := addr + size
-	var ep []byte
-	var i int64
-	var p []byte
-	var r *Reloc
-	var rsname string
-	var typ string
-	for ; sym != nil; sym = sym.Next {
-		if sym.Value >= eaddr {
-			break
-		}
-		if addr < sym.Value {
-			fmt.Fprintf(&Bso, "\t%.8x| 00 ...\n", uint64(addr))
-			addr = sym.Value
-		}
-
-		fmt.Fprintf(&Bso, "%s\n\t%.8x|", sym.Name, uint(addr))
-		p = sym.P
-		ep = p[len(sym.P):]
-		for -cap(p) < -cap(ep) {
-			if -cap(p) > -cap(sym.P) && int(-cap(p)+cap(sym.P))%16 == 0 {
-				fmt.Fprintf(&Bso, "\n\t%.8x|", uint(addr+int64(-cap(p)+cap(sym.P))))
-			}
-			fmt.Fprintf(&Bso, " %.2x", p[0])
-			p = p[1:]
-		}
-
-		addr += int64(len(sym.P))
-		for ; addr < sym.Value+sym.Size; addr++ {
-			fmt.Fprintf(&Bso, " %.2x", 0)
-		}
-		fmt.Fprintf(&Bso, "\n")
-
-		if Linkmode == LinkExternal {
-			for i = 0; i < int64(len(sym.R)); i++ {
-				r = &sym.R[i]
-				rsname = ""
-				if r.Sym != nil {
-					rsname = r.Sym.Name
-				}
-				typ = "?"
-				switch r.Type {
-				case obj.R_ADDR:
-					typ = "addr"
-
-				case obj.R_PCREL:
-					typ = "pcrel"
-
-				case obj.R_CALL:
-					typ = "call"
-				}
-
-				fmt.Fprintf(&Bso, "\treloc %.8x/%d %s %s+%#x [%#x]\n", uint(sym.Value+int64(r.Off)), r.Siz, typ, rsname, int64(r.Add), int64(r.Sym.Value+r.Add))
-			}
-		}
-	}
-
-	if addr < eaddr {
-		fmt.Fprintf(&Bso, "\t%.8x| 00 ...\n", uint(addr))
-	}
-	fmt.Fprintf(&Bso, "\t%.8x|\n", uint(eaddr))
-}
-
-func strnput(s string, n int) {
-	for ; n > 0 && s != ""; s = s[1:] {
-		Cput(uint8(s[0]))
-		n--
-	}
-
-	for n > 0 {
-		Cput(0)
-		n--
-	}
-}
-
-var strdata []*LSym
-
-func addstrdata1(arg string) {
-	i := strings.Index(arg, "=")
-	if i < 0 {
-		Exitf("-X flag requires argument of the form importpath.name=value")
-	}
-	addstrdata(arg[:i], arg[i+1:])
-}
-
-func addstrdata(name string, value string) {
-	p := fmt.Sprintf("%s.str", name)
-	sp := Linklookup(Ctxt, p, 0)
-
-	Addstring(sp, value)
-	sp.Type = obj.SRODATA
-
-	s := Linklookup(Ctxt, name, 0)
-	s.Size = 0
-	s.Dupok = 1
-	reachable := s.Reachable
-	Addaddr(Ctxt, s, sp)
-	adduintxx(Ctxt, s, uint64(len(value)), Thearch.Ptrsize)
-
-	// addstring, addaddr, etc., mark the symbols as reachable.
-	// In this case that is not necessarily true, so stick to what
-	// we know before entering this function.
-	s.Reachable = reachable
-
-	strdata = append(strdata, s)
-
-	sp.Reachable = reachable
-}
-
-func checkstrdata() {
-	for _, s := range strdata {
-		if s.Type == obj.STEXT {
-			Diag("cannot use -X with text symbol %s", s.Name)
-		} else if s.Gotype != nil && s.Gotype.Name != "type.string" {
-			Diag("cannot use -X with non-string symbol %s", s.Name)
-		}
-	}
-}
-
-func Addstring(s *LSym, str string) int64 {
-	if s.Type == 0 {
-		s.Type = obj.SNOPTRDATA
-	}
-	s.Reachable = true
-	r := int32(s.Size)
-	n := len(str) + 1
-	if s.Name == ".shstrtab" {
-		elfsetstring(str, int(r))
-	}
-	Symgrow(Ctxt, s, int64(r)+int64(n))
-	copy(s.P[r:], str)
-	s.P[int(r)+len(str)] = 0
-	s.Size += int64(n)
-	return int64(r)
-}
-
-// addgostring adds str, as a Go string value, to s. symname is the name of the
-// symbol used to define the string data and must be unique per linked object.
-func addgostring(s *LSym, symname, str string) {
-	sym := Linklookup(Ctxt, symname, 0)
-	if sym.Type != obj.Sxxx {
-		Diag("duplicate symname in addgostring: %s", symname)
-	}
-	sym.Reachable = true
-	sym.Local = true
-	sym.Type = obj.SRODATA
-	sym.Size = int64(len(str))
-	sym.P = []byte(str)
-	Addaddr(Ctxt, s, sym)
-	adduint(Ctxt, s, uint64(len(str)))
-}
-
-func addinitarrdata(s *LSym) {
-	p := s.Name + ".ptr"
-	sp := Linklookup(Ctxt, p, 0)
-	sp.Type = obj.SINITARR
-	sp.Size = 0
-	sp.Dupok = 1
-	Addaddr(Ctxt, sp, s)
-}
-
-func dosymtype() {
-	for s := Ctxt.Allsym; s != nil; s = s.Allsym {
-		if len(s.P) > 0 {
-			if s.Type == obj.SBSS {
-				s.Type = obj.SDATA
-			}
-			if s.Type == obj.SNOPTRBSS {
-				s.Type = obj.SNOPTRDATA
-			}
-		}
-		// Create a new entry in the .init_array section that points to the
-		// library initializer function.
-		switch Buildmode {
-		case BuildmodeCArchive, BuildmodeCShared:
-			if s.Name == INITENTRY {
-				addinitarrdata(s)
-			}
-		}
-	}
-}
-
-func symalign(s *LSym) int32 {
-	if s.Align != 0 {
-		return s.Align
-	}
-
-	align := int32(Thearch.Maxalign)
-	for int64(align) > s.Size && align > 1 {
-		align >>= 1
-	}
-	if align < s.Align {
-		align = s.Align
-	}
-	return align
-}
-
-func aligndatsize(datsize int64, s *LSym) int64 {
-	return Rnd(datsize, int64(symalign(s)))
-}
-
-// maxalign returns the maximum required alignment for
-// the list of symbols s; the list stops when s->type exceeds type.
-func maxalign(s *LSym, type_ int) int32 {
-	var align int32
-
-	max := int32(0)
-	for ; s != nil && int(s.Type) <= type_; s = s.Next {
-		align = symalign(s)
-		if max < align {
-			max = align
-		}
-	}
-
-	return max
-}
-
-const debugGCProg = false
-
-type GCProg struct {
-	sym *LSym
-	w   gcprog.Writer
-}
-
-func (p *GCProg) Init(name string) {
-	p.sym = Linklookup(Ctxt, name, 0)
-	p.w.Init(p.writeByte)
-	if debugGCProg {
-		fmt.Fprintf(os.Stderr, "ld: start GCProg %s\n", name)
-		p.w.Debug(os.Stderr)
-	}
-}
-
-func (p *GCProg) writeByte(x byte) {
-	Adduint8(Ctxt, p.sym, x)
-}
-
-func (p *GCProg) End(size int64) {
-	p.w.ZeroUntil(size / int64(Thearch.Ptrsize))
-	p.w.End()
-	if debugGCProg {
-		fmt.Fprintf(os.Stderr, "ld: end GCProg\n")
-	}
-}
-
-func (p *GCProg) AddSym(s *LSym) {
-	typ := s.Gotype
-	// Things without pointers should be in SNOPTRDATA or SNOPTRBSS;
-	// everything we see should have pointers and should therefore have a type.
-	if typ == nil {
-		Diag("missing Go type information for global symbol: %s size %d", s.Name, int(s.Size))
-		return
-	}
-
-	ptrsize := int64(Thearch.Ptrsize)
-	nptr := decodetype_ptrdata(typ) / ptrsize
-
-	if debugGCProg {
-		fmt.Fprintf(os.Stderr, "gcprog sym: %s at %d (ptr=%d+%d)\n", s.Name, s.Value, s.Value/ptrsize, nptr)
-	}
-
-	if decodetype_usegcprog(typ) == 0 {
-		// Copy pointers from mask into program.
-		mask := decodetype_gcmask(typ)
-		for i := int64(0); i < nptr; i++ {
-			if (mask[i/8]>>uint(i%8))&1 != 0 {
-				p.w.Ptr(s.Value/ptrsize + i)
-			}
-		}
-		return
-	}
-
-	// Copy program.
-	prog := decodetype_gcprog(typ)
-	p.w.ZeroUntil(s.Value / ptrsize)
-	p.w.Append(prog[4:], nptr)
-}
-
-func growdatsize(datsizep *int64, s *LSym) {
-	datsize := *datsizep
-	const cutoff int64 = 2e9 // 2 GB (or so; looks better in errors than 2^31)
-	switch {
-	case s.Size < 0:
-		Diag("%s: negative size (%d bytes)", s.Name, s.Size)
-	case s.Size > cutoff:
-		Diag("%s: symbol too large (%d bytes)", s.Name, s.Size)
-	case datsize <= cutoff && datsize+s.Size > cutoff:
-		Diag("%s: too much data (over %d bytes)", s.Name, cutoff)
-	}
-	*datsizep = datsize + s.Size
-}
-
-func dodata() {
-	if Debug['v'] != 0 {
-		fmt.Fprintf(&Bso, "%5.2f dodata\n", obj.Cputime())
-	}
-	Bso.Flush()
-
-	var last *LSym
-	datap = nil
-
-	for s := Ctxt.Allsym; s != nil; s = s.Allsym {
-		if !s.Reachable || s.Special != 0 {
-			continue
-		}
-		if obj.STEXT < s.Type && s.Type < obj.SXREF {
-			if s.Onlist != 0 {
-				log.Fatalf("symbol %s listed multiple times", s.Name)
-			}
-			s.Onlist = 1
-			if last == nil {
-				datap = s
-			} else {
-				last.Next = s
-			}
-			s.Next = nil
-			last = s
-		}
-	}
-
-	for s := datap; s != nil; s = s.Next {
-		if int64(len(s.P)) > s.Size {
-			Diag("%s: initialize bounds (%d < %d)", s.Name, int64(s.Size), len(s.P))
-		}
-	}
-
-	/*
-	 * now that we have the datap list, but before we start
-	 * to assign addresses, record all the necessary
-	 * dynamic relocations.  these will grow the relocation
-	 * symbol, which is itself data.
-	 *
-	 * on darwin, we need the symbol table numbers for dynreloc.
-	 */
-	if HEADTYPE == obj.Hdarwin {
-		machosymorder()
-	}
-	dynreloc()
-
-	/* some symbols may no longer belong in datap (Mach-O) */
-	var l **LSym
-	var s *LSym
-	for l = &datap; ; {
-		s = *l
-		if s == nil {
-			break
-		}
-
-		if s.Type <= obj.STEXT || obj.SXREF <= s.Type {
-			*l = s.Next
-		} else {
-			l = &s.Next
-		}
-	}
-
-	*l = nil
-
-	datap = listsort(datap, datcmp, listnextp)
-
-	if Iself {
-		// Make .rela and .rela.plt contiguous, the ELF ABI requires this
-		// and Solaris actually cares.
-		var relplt *LSym
-		for l = &datap; *l != nil; l = &(*l).Next {
-			if (*l).Name == ".rel.plt" || (*l).Name == ".rela.plt" {
-				relplt = (*l)
-				*l = (*l).Next
-				break
-			}
-		}
-		if relplt != nil {
-			for s = datap; s != nil; s = s.Next {
-				if s.Name == ".rel" || s.Name == ".rela" {
-					relplt.Next = s.Next
-					s.Next = relplt
-				}
-			}
-		}
-	}
-
-	/*
-	 * allocate sections.  list is sorted by type,
-	 * so we can just walk it for each piece we want to emit.
-	 * segdata is processed before segtext, because we need
-	 * to see all symbols in the .data and .bss sections in order
-	 * to generate garbage collection information.
-	 */
-
-	/* begin segdata */
-
-	/* skip symbols belonging to segtext */
-	s = datap
-
-	for ; s != nil && s.Type < obj.SELFSECT; s = s.Next {
-	}
-
-	/* writable ELF sections */
-	datsize := int64(0)
-
-	var sect *Section
-	for ; s != nil && s.Type < obj.SELFGOT; s = s.Next {
-		sect = addsection(&Segdata, s.Name, 06)
-		sect.Align = symalign(s)
-		datsize = Rnd(datsize, int64(sect.Align))
-		sect.Vaddr = uint64(datsize)
-		s.Sect = sect
-		s.Type = obj.SDATA
-		s.Value = int64(uint64(datsize) - sect.Vaddr)
-		growdatsize(&datsize, s)
-		sect.Length = uint64(datsize) - sect.Vaddr
-	}
-
-	/* .got (and .toc on ppc64) */
-	if s.Type == obj.SELFGOT {
-		sect := addsection(&Segdata, ".got", 06)
-		sect.Align = maxalign(s, obj.SELFGOT)
-		datsize = Rnd(datsize, int64(sect.Align))
-		sect.Vaddr = uint64(datsize)
-		var toc *LSym
-		for ; s != nil && s.Type == obj.SELFGOT; s = s.Next {
-			datsize = aligndatsize(datsize, s)
-			s.Sect = sect
-			s.Type = obj.SDATA
-			s.Value = int64(uint64(datsize) - sect.Vaddr)
-
-			// Resolve .TOC. symbol for this object file (ppc64)
-			toc = Linkrlookup(Ctxt, ".TOC.", int(s.Version))
-
-			if toc != nil {
-				toc.Sect = sect
-				toc.Outer = s
-				toc.Sub = s.Sub
-				s.Sub = toc
-
-				toc.Value = 0x8000
-			}
-
-			growdatsize(&datsize, s)
-		}
-
-		sect.Length = uint64(datsize) - sect.Vaddr
-	}
-
-	/* pointer-free data */
-	sect = addsection(&Segdata, ".noptrdata", 06)
-
-	sect.Align = maxalign(s, obj.SINITARR-1)
-	datsize = Rnd(datsize, int64(sect.Align))
-	sect.Vaddr = uint64(datsize)
-	Linklookup(Ctxt, "runtime.noptrdata", 0).Sect = sect
-	Linklookup(Ctxt, "runtime.enoptrdata", 0).Sect = sect
-	for ; s != nil && s.Type < obj.SINITARR; s = s.Next {
-		datsize = aligndatsize(datsize, s)
-		s.Sect = sect
-		s.Type = obj.SDATA
-		s.Value = int64(uint64(datsize) - sect.Vaddr)
-		growdatsize(&datsize, s)
-	}
-
-	sect.Length = uint64(datsize) - sect.Vaddr
-
-	hasinitarr := Linkshared
-
-	/* shared library initializer */
-	switch Buildmode {
-	case BuildmodeCArchive, BuildmodeCShared, BuildmodeShared:
-		hasinitarr = true
-	}
-
-	if hasinitarr {
-		sect := addsection(&Segdata, ".init_array", 06)
-		sect.Align = maxalign(s, obj.SINITARR)
-		datsize = Rnd(datsize, int64(sect.Align))
-		sect.Vaddr = uint64(datsize)
-		for ; s != nil && s.Type == obj.SINITARR; s = s.Next {
-			datsize = aligndatsize(datsize, s)
-			s.Sect = sect
-			s.Value = int64(uint64(datsize) - sect.Vaddr)
-			growdatsize(&datsize, s)
-		}
-
-		sect.Length = uint64(datsize) - sect.Vaddr
-	}
-
-	/* data */
-	sect = addsection(&Segdata, ".data", 06)
-	sect.Align = maxalign(s, obj.SBSS-1)
-	datsize = Rnd(datsize, int64(sect.Align))
-	sect.Vaddr = uint64(datsize)
-	Linklookup(Ctxt, "runtime.data", 0).Sect = sect
-	Linklookup(Ctxt, "runtime.edata", 0).Sect = sect
-	var gc GCProg
-	gc.Init("runtime.gcdata")
-	for ; s != nil && s.Type < obj.SBSS; s = s.Next {
-		if s.Type == obj.SINITARR {
-			Ctxt.Cursym = s
-			Diag("unexpected symbol type %d", s.Type)
-		}
-
-		s.Sect = sect
-		s.Type = obj.SDATA
-		datsize = aligndatsize(datsize, s)
-		s.Value = int64(uint64(datsize) - sect.Vaddr)
-		gc.AddSym(s)
-		growdatsize(&datsize, s)
-	}
-	sect.Length = uint64(datsize) - sect.Vaddr
-	gc.End(int64(sect.Length))
-
-	/* bss */
-	sect = addsection(&Segdata, ".bss", 06)
-	sect.Align = maxalign(s, obj.SNOPTRBSS-1)
-	datsize = Rnd(datsize, int64(sect.Align))
-	sect.Vaddr = uint64(datsize)
-	Linklookup(Ctxt, "runtime.bss", 0).Sect = sect
-	Linklookup(Ctxt, "runtime.ebss", 0).Sect = sect
-	gc = GCProg{}
-	gc.Init("runtime.gcbss")
-	for ; s != nil && s.Type < obj.SNOPTRBSS; s = s.Next {
-		s.Sect = sect
-		datsize = aligndatsize(datsize, s)
-		s.Value = int64(uint64(datsize) - sect.Vaddr)
-		gc.AddSym(s)
-		growdatsize(&datsize, s)
-	}
-	sect.Length = uint64(datsize) - sect.Vaddr
-	gc.End(int64(sect.Length))
-
-	/* pointer-free bss */
-	sect = addsection(&Segdata, ".noptrbss", 06)
-
-	sect.Align = maxalign(s, obj.SNOPTRBSS)
-	datsize = Rnd(datsize, int64(sect.Align))
-	sect.Vaddr = uint64(datsize)
-	Linklookup(Ctxt, "runtime.noptrbss", 0).Sect = sect
-	Linklookup(Ctxt, "runtime.enoptrbss", 0).Sect = sect
-	for ; s != nil && s.Type == obj.SNOPTRBSS; s = s.Next {
-		datsize = aligndatsize(datsize, s)
-		s.Sect = sect
-		s.Value = int64(uint64(datsize) - sect.Vaddr)
-		growdatsize(&datsize, s)
-	}
-
-	sect.Length = uint64(datsize) - sect.Vaddr
-	Linklookup(Ctxt, "runtime.end", 0).Sect = sect
-
-	// 6g uses 4-byte relocation offsets, so the entire segment must fit in 32 bits.
-	if datsize != int64(uint32(datsize)) {
-		Diag("data or bss segment too large")
-	}
-
-	if Iself && Linkmode == LinkExternal && s != nil && s.Type == obj.STLSBSS && HEADTYPE != obj.Hopenbsd {
-		sect := addsection(&Segdata, ".tbss", 06)
-		sect.Align = int32(Thearch.Ptrsize)
-		sect.Vaddr = 0
-		datsize = 0
-		for ; s != nil && s.Type == obj.STLSBSS; s = s.Next {
-			datsize = aligndatsize(datsize, s)
-			s.Sect = sect
-			s.Value = int64(uint64(datsize) - sect.Vaddr)
-			growdatsize(&datsize, s)
-		}
-
-		sect.Length = uint64(datsize)
-	} else {
-		// Might be internal linking but still using cgo.
-		// In that case, the only possible STLSBSS symbol is runtime.tlsg.
-		// Give it offset 0, because it's the only thing here.
-		if s != nil && s.Type == obj.STLSBSS && s.Name == "runtime.tlsg" {
-			s.Value = 0
-			s = s.Next
-		}
-	}
-
-	if s != nil {
-		Ctxt.Cursym = nil
-		Diag("unexpected symbol type %d for %s", s.Type, s.Name)
-	}
-
-	/*
-	 * We finished data, begin read-only data.
-	 * Not all systems support a separate read-only non-executable data section.
-	 * ELF systems do.
-	 * OS X and Plan 9 do not.
-	 * Windows PE may, but if so we have not implemented it.
-	 * And if we're using external linking mode, the point is moot,
-	 * since it's not our decision; that code expects the sections in
-	 * segtext.
-	 */
-	var segro *Segment
-	if Iself && Linkmode == LinkInternal {
-		segro = &Segrodata
-	} else {
-		segro = &Segtext
-	}
-
-	s = datap
-
-	datsize = 0
-
-	/* read-only executable ELF, Mach-O sections */
-	for ; s != nil && s.Type < obj.STYPE; s = s.Next {
-		sect = addsection(&Segtext, s.Name, 04)
-		sect.Align = symalign(s)
-		datsize = Rnd(datsize, int64(sect.Align))
-		sect.Vaddr = uint64(datsize)
-		s.Sect = sect
-		s.Type = obj.SRODATA
-		s.Value = int64(uint64(datsize) - sect.Vaddr)
-		growdatsize(&datsize, s)
-		sect.Length = uint64(datsize) - sect.Vaddr
-	}
-
-	/* read-only data */
-	sect = addsection(segro, ".rodata", 04)
-
-	sect.Align = maxalign(s, obj.STYPELINK-1)
-	datsize = Rnd(datsize, int64(sect.Align))
-	sect.Vaddr = 0
-	Linklookup(Ctxt, "runtime.rodata", 0).Sect = sect
-	Linklookup(Ctxt, "runtime.erodata", 0).Sect = sect
-	for ; s != nil && s.Type < obj.STYPELINK; s = s.Next {
-		datsize = aligndatsize(datsize, s)
-		s.Sect = sect
-		s.Type = obj.SRODATA
-		s.Value = int64(uint64(datsize) - sect.Vaddr)
-		growdatsize(&datsize, s)
-	}
-
-	sect.Length = uint64(datsize) - sect.Vaddr
-
-	/* typelink */
-	sect = addsection(segro, ".typelink", 04)
-
-	sect.Align = maxalign(s, obj.STYPELINK)
-	datsize = Rnd(datsize, int64(sect.Align))
-	sect.Vaddr = uint64(datsize)
-	Linklookup(Ctxt, "runtime.typelink", 0).Sect = sect
-	Linklookup(Ctxt, "runtime.etypelink", 0).Sect = sect
-	for ; s != nil && s.Type == obj.STYPELINK; s = s.Next {
-		datsize = aligndatsize(datsize, s)
-		s.Sect = sect
-		s.Type = obj.SRODATA
-		s.Value = int64(uint64(datsize) - sect.Vaddr)
-		growdatsize(&datsize, s)
-	}
-
-	sect.Length = uint64(datsize) - sect.Vaddr
-
-	/* gosymtab */
-	sect = addsection(segro, ".gosymtab", 04)
-
-	sect.Align = maxalign(s, obj.SPCLNTAB-1)
-	datsize = Rnd(datsize, int64(sect.Align))
-	sect.Vaddr = uint64(datsize)
-	Linklookup(Ctxt, "runtime.symtab", 0).Sect = sect
-	Linklookup(Ctxt, "runtime.esymtab", 0).Sect = sect
-	for ; s != nil && s.Type < obj.SPCLNTAB; s = s.Next {
-		datsize = aligndatsize(datsize, s)
-		s.Sect = sect
-		s.Type = obj.SRODATA
-		s.Value = int64(uint64(datsize) - sect.Vaddr)
-		growdatsize(&datsize, s)
-	}
-
-	sect.Length = uint64(datsize) - sect.Vaddr
-
-	/* gopclntab */
-	sect = addsection(segro, ".gopclntab", 04)
-
-	sect.Align = maxalign(s, obj.SELFROSECT-1)
-	datsize = Rnd(datsize, int64(sect.Align))
-	sect.Vaddr = uint64(datsize)
-	Linklookup(Ctxt, "runtime.pclntab", 0).Sect = sect
-	Linklookup(Ctxt, "runtime.epclntab", 0).Sect = sect
-	for ; s != nil && s.Type < obj.SELFROSECT; s = s.Next {
-		datsize = aligndatsize(datsize, s)
-		s.Sect = sect
-		s.Type = obj.SRODATA
-		s.Value = int64(uint64(datsize) - sect.Vaddr)
-		growdatsize(&datsize, s)
-	}
-
-	sect.Length = uint64(datsize) - sect.Vaddr
-
-	/* read-only ELF, Mach-O sections */
-	for ; s != nil && s.Type < obj.SELFSECT; s = s.Next {
-		sect = addsection(segro, s.Name, 04)
-		sect.Align = symalign(s)
-		datsize = Rnd(datsize, int64(sect.Align))
-		sect.Vaddr = uint64(datsize)
-		s.Sect = sect
-		s.Type = obj.SRODATA
-		s.Value = int64(uint64(datsize) - sect.Vaddr)
-		growdatsize(&datsize, s)
-		sect.Length = uint64(datsize) - sect.Vaddr
-	}
-
-	// 6g uses 4-byte relocation offsets, so the entire segment must fit in 32 bits.
-	if datsize != int64(uint32(datsize)) {
-		Diag("read-only data segment too large")
-	}
-
-	/* number the sections */
-	n := int32(1)
-
-	for sect := Segtext.Sect; sect != nil; sect = sect.Next {
-		sect.Extnum = int16(n)
-		n++
-	}
-	for sect := Segrodata.Sect; sect != nil; sect = sect.Next {
-		sect.Extnum = int16(n)
-		n++
-	}
-	for sect := Segdata.Sect; sect != nil; sect = sect.Next {
-		sect.Extnum = int16(n)
-		n++
-	}
-}
-
-// Add buildid to beginning of text segment, on non-ELF systems.
-// Non-ELF binary formats are not always flexible enough to
-// give us a place to put the Go build ID. On those systems, we put it
-// at the very beginning of the text segment.
-// This ``header'' is read by cmd/go.
-func textbuildid() {
-	if Iself || buildid == "" {
-		return
-	}
-
-	sym := Linklookup(Ctxt, "go.buildid", 0)
-	sym.Reachable = true
-	// The \xff is invalid UTF-8, meant to make it less likely
-	// to find one of these accidentally.
-	data := "\xff Go build ID: " + strconv.Quote(buildid) + "\n \xff"
-	sym.Type = obj.STEXT
-	sym.P = []byte(data)
-	sym.Size = int64(len(sym.P))
-
-	sym.Next = Ctxt.Textp
-	Ctxt.Textp = sym
-}
-
-// assign addresses to text
-func textaddress() {
-	var sub *LSym
-
-	addsection(&Segtext, ".text", 05)
-
-	// Assign PCs in text segment.
-	// Could parallelize, by assigning to text
-	// and then letting threads copy down, but probably not worth it.
-	sect := Segtext.Sect
-
-	sect.Align = int32(Funcalign)
-	Linklookup(Ctxt, "runtime.text", 0).Sect = sect
-	Linklookup(Ctxt, "runtime.etext", 0).Sect = sect
-	va := uint64(INITTEXT)
-	sect.Vaddr = va
-	for sym := Ctxt.Textp; sym != nil; sym = sym.Next {
-		sym.Sect = sect
-		if sym.Type&obj.SSUB != 0 {
-			continue
-		}
-		if sym.Align != 0 {
-			va = uint64(Rnd(int64(va), int64(sym.Align)))
-		} else {
-			va = uint64(Rnd(int64(va), int64(Funcalign)))
-		}
-		sym.Value = 0
-		for sub = sym; sub != nil; sub = sub.Sub {
-			sub.Value += int64(va)
-		}
-		if sym.Size == 0 && sym.Sub != nil {
-			Ctxt.Cursym = sym
-		}
-		if sym.Size < MINFUNC {
-			va += MINFUNC // spacing required for findfunctab
-		} else {
-			va += uint64(sym.Size)
-		}
-	}
-
-	sect.Length = va - sect.Vaddr
-}
-
-// assign addresses
-func address() {
-	va := uint64(INITTEXT)
-	Segtext.Rwx = 05
-	Segtext.Vaddr = va
-	Segtext.Fileoff = uint64(HEADR)
-	for s := Segtext.Sect; s != nil; s = s.Next {
-		va = uint64(Rnd(int64(va), int64(s.Align)))
-		s.Vaddr = va
-		va += s.Length
-	}
-
-	Segtext.Length = va - uint64(INITTEXT)
-	Segtext.Filelen = Segtext.Length
-	if HEADTYPE == obj.Hnacl {
-		va += 32 // room for the "halt sled"
-	}
-
-	if Segrodata.Sect != nil {
-		// align to page boundary so as not to mix
-		// rodata and executable text.
-		va = uint64(Rnd(int64(va), int64(INITRND)))
-
-		Segrodata.Rwx = 04
-		Segrodata.Vaddr = va
-		Segrodata.Fileoff = va - Segtext.Vaddr + Segtext.Fileoff
-		Segrodata.Filelen = 0
-		for s := Segrodata.Sect; s != nil; s = s.Next {
-			va = uint64(Rnd(int64(va), int64(s.Align)))
-			s.Vaddr = va
-			va += s.Length
-		}
-
-		Segrodata.Length = va - Segrodata.Vaddr
-		Segrodata.Filelen = Segrodata.Length
-	}
-
-	va = uint64(Rnd(int64(va), int64(INITRND)))
-	Segdata.Rwx = 06
-	Segdata.Vaddr = va
-	Segdata.Fileoff = va - Segtext.Vaddr + Segtext.Fileoff
-	Segdata.Filelen = 0
-	if HEADTYPE == obj.Hwindows {
-		Segdata.Fileoff = Segtext.Fileoff + uint64(Rnd(int64(Segtext.Length), PEFILEALIGN))
-	}
-	if HEADTYPE == obj.Hplan9 {
-		Segdata.Fileoff = Segtext.Fileoff + Segtext.Filelen
-	}
-	var data *Section
-	var noptr *Section
-	var bss *Section
-	var noptrbss *Section
-	var vlen int64
-	for s := Segdata.Sect; s != nil; s = s.Next {
-		vlen = int64(s.Length)
-		if s.Next != nil {
-			vlen = int64(s.Next.Vaddr - s.Vaddr)
-		}
-		s.Vaddr = va
-		va += uint64(vlen)
-		Segdata.Length = va - Segdata.Vaddr
-		if s.Name == ".data" {
-			data = s
-		}
-		if s.Name == ".noptrdata" {
-			noptr = s
-		}
-		if s.Name == ".bss" {
-			bss = s
-		}
-		if s.Name == ".noptrbss" {
-			noptrbss = s
-		}
-	}
-
-	Segdata.Filelen = bss.Vaddr - Segdata.Vaddr
-
-	text := Segtext.Sect
-	var rodata *Section
-	if Segrodata.Sect != nil {
-		rodata = Segrodata.Sect
-	} else {
-		rodata = text.Next
-	}
-	typelink := rodata.Next
-	symtab := typelink.Next
-	pclntab := symtab.Next
-
-	var sub *LSym
-	for sym := datap; sym != nil; sym = sym.Next {
-		Ctxt.Cursym = sym
-		if sym.Sect != nil {
-			sym.Value += int64(sym.Sect.Vaddr)
-		}
-		for sub = sym.Sub; sub != nil; sub = sub.Sub {
-			sub.Value += sym.Value
-		}
-	}
-
-	if Buildmode == BuildmodeShared {
-		s := Linklookup(Ctxt, "go.link.abihashbytes", 0)
-		sectSym := Linklookup(Ctxt, ".note.go.abihash", 0)
-		s.Sect = sectSym.Sect
-		s.Value = int64(sectSym.Sect.Vaddr + 16)
-	}
-
-	xdefine("runtime.text", obj.STEXT, int64(text.Vaddr))
-	xdefine("runtime.etext", obj.STEXT, int64(text.Vaddr+text.Length))
-	xdefine("runtime.rodata", obj.SRODATA, int64(rodata.Vaddr))
-	xdefine("runtime.erodata", obj.SRODATA, int64(rodata.Vaddr+rodata.Length))
-	xdefine("runtime.typelink", obj.SRODATA, int64(typelink.Vaddr))
-	xdefine("runtime.etypelink", obj.SRODATA, int64(typelink.Vaddr+typelink.Length))
-
-	sym := Linklookup(Ctxt, "runtime.gcdata", 0)
-	sym.Local = true
-	xdefine("runtime.egcdata", obj.SRODATA, Symaddr(sym)+sym.Size)
-	Linklookup(Ctxt, "runtime.egcdata", 0).Sect = sym.Sect
-
-	sym = Linklookup(Ctxt, "runtime.gcbss", 0)
-	sym.Local = true
-	xdefine("runtime.egcbss", obj.SRODATA, Symaddr(sym)+sym.Size)
-	Linklookup(Ctxt, "runtime.egcbss", 0).Sect = sym.Sect
-
-	xdefine("runtime.symtab", obj.SRODATA, int64(symtab.Vaddr))
-	xdefine("runtime.esymtab", obj.SRODATA, int64(symtab.Vaddr+symtab.Length))
-	xdefine("runtime.pclntab", obj.SRODATA, int64(pclntab.Vaddr))
-	xdefine("runtime.epclntab", obj.SRODATA, int64(pclntab.Vaddr+pclntab.Length))
-	xdefine("runtime.noptrdata", obj.SNOPTRDATA, int64(noptr.Vaddr))
-	xdefine("runtime.enoptrdata", obj.SNOPTRDATA, int64(noptr.Vaddr+noptr.Length))
-	xdefine("runtime.bss", obj.SBSS, int64(bss.Vaddr))
-	xdefine("runtime.ebss", obj.SBSS, int64(bss.Vaddr+bss.Length))
-	xdefine("runtime.data", obj.SDATA, int64(data.Vaddr))
-	xdefine("runtime.edata", obj.SDATA, int64(data.Vaddr+data.Length))
-	xdefine("runtime.noptrbss", obj.SNOPTRBSS, int64(noptrbss.Vaddr))
-	xdefine("runtime.enoptrbss", obj.SNOPTRBSS, int64(noptrbss.Vaddr+noptrbss.Length))
-	xdefine("runtime.end", obj.SBSS, int64(Segdata.Vaddr+Segdata.Length))
-}
diff --git a/src/cmd/link/internal/ld/decodesym.go b/src/cmd/link/internal/ld/decodesym.go
deleted file mode 100644
index c1cf4d7..0000000
--- a/src/cmd/link/internal/ld/decodesym.go
+++ /dev/null
@@ -1,226 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package ld
-
-import (
-	"cmd/internal/obj"
-	"debug/elf"
-)
-
-// Decoding the type.* symbols.	 This has to be in sync with
-// ../../runtime/type.go, or more specifically, with what
-// ../gc/reflect.c stuffs in these.
-
-func decode_reloc(s *LSym, off int32) *Reloc {
-	for i := 0; i < len(s.R); i++ {
-		if s.R[i].Off == off {
-			return &s.R[i:][0]
-		}
-	}
-	return nil
-}
-
-func decode_reloc_sym(s *LSym, off int32) *LSym {
-	r := decode_reloc(s, off)
-	if r == nil {
-		return nil
-	}
-	return r.Sym
-}
-
-func decode_inuxi(p []byte, sz int) uint64 {
-	switch sz {
-	case 2:
-		return uint64(Ctxt.Arch.ByteOrder.Uint16(p))
-	case 4:
-		return uint64(Ctxt.Arch.ByteOrder.Uint32(p))
-	case 8:
-		return Ctxt.Arch.ByteOrder.Uint64(p)
-	default:
-		Exitf("dwarf: decode inuxi %d", sz)
-		panic("unreachable")
-	}
-}
-
-// commonsize returns the size of the common prefix for all type
-// structures (runtime._type).
-func commonsize() int {
-	return 8*Thearch.Ptrsize + 8
-}
-
-// Type.commonType.kind
-func decodetype_kind(s *LSym) uint8 {
-	return uint8(s.P[2*Thearch.Ptrsize+7] & obj.KindMask) //  0x13 / 0x1f
-}
-
-// Type.commonType.kind
-func decodetype_noptr(s *LSym) uint8 {
-	return uint8(s.P[2*Thearch.Ptrsize+7] & obj.KindNoPointers) //  0x13 / 0x1f
-}
-
-// Type.commonType.kind
-func decodetype_usegcprog(s *LSym) uint8 {
-	return uint8(s.P[2*Thearch.Ptrsize+7] & obj.KindGCProg) //  0x13 / 0x1f
-}
-
-// Type.commonType.size
-func decodetype_size(s *LSym) int64 {
-	return int64(decode_inuxi(s.P, Thearch.Ptrsize)) // 0x8 / 0x10
-}
-
-// Type.commonType.ptrdata
-func decodetype_ptrdata(s *LSym) int64 {
-	return int64(decode_inuxi(s.P[Thearch.Ptrsize:], Thearch.Ptrsize)) // 0x8 / 0x10
-}
-
-// Find the elf.Section of a given shared library that contains a given address.
-func findShlibSection(path string, addr uint64) *elf.Section {
-	for _, shlib := range Ctxt.Shlibs {
-		if shlib.Path == path {
-			for _, sect := range shlib.File.Sections {
-				if sect.Addr <= addr && addr <= sect.Addr+sect.Size {
-					return sect
-				}
-			}
-		}
-	}
-	return nil
-}
-
-// Type.commonType.gc
-func decodetype_gcprog(s *LSym) []byte {
-	if s.Type == obj.SDYNIMPORT {
-		addr := decodetype_gcprog_shlib(s)
-		sect := findShlibSection(s.File, addr)
-		if sect != nil {
-			// A gcprog is a 4-byte uint32 indicating length, followed by
-			// the actual program.
-			progsize := make([]byte, 4)
-			sect.ReadAt(progsize, int64(addr-sect.Addr))
-			progbytes := make([]byte, Ctxt.Arch.ByteOrder.Uint32(progsize))
-			sect.ReadAt(progbytes, int64(addr-sect.Addr+4))
-			return append(progsize, progbytes...)
-		}
-		Exitf("cannot find gcprog for %s", s.Name)
-		return nil
-	}
-	return decode_reloc_sym(s, 2*int32(Thearch.Ptrsize)+8+1*int32(Thearch.Ptrsize)).P
-}
-
-func decodetype_gcprog_shlib(s *LSym) uint64 {
-	return decode_inuxi(s.P[2*int32(Thearch.Ptrsize)+8+1*int32(Thearch.Ptrsize):], Thearch.Ptrsize)
-}
-
-func decodetype_gcmask(s *LSym) []byte {
-	if s.Type == obj.SDYNIMPORT {
-		addr := decodetype_gcprog_shlib(s)
-		ptrdata := decodetype_ptrdata(s)
-		sect := findShlibSection(s.File, addr)
-		if sect != nil {
-			r := make([]byte, ptrdata/int64(Thearch.Ptrsize))
-			sect.ReadAt(r, int64(addr-sect.Addr))
-			return r
-		}
-		Exitf("cannot find gcmask for %s", s.Name)
-		return nil
-	}
-	mask := decode_reloc_sym(s, 2*int32(Thearch.Ptrsize)+8+1*int32(Thearch.Ptrsize))
-	return mask.P
-}
-
-// Type.ArrayType.elem and Type.SliceType.Elem
-func decodetype_arrayelem(s *LSym) *LSym {
-	return decode_reloc_sym(s, int32(commonsize())) // 0x1c / 0x30
-}
-
-func decodetype_arraylen(s *LSym) int64 {
-	return int64(decode_inuxi(s.P[commonsize()+2*Thearch.Ptrsize:], Thearch.Ptrsize))
-}
-
-// Type.PtrType.elem
-func decodetype_ptrelem(s *LSym) *LSym {
-	return decode_reloc_sym(s, int32(commonsize())) // 0x1c / 0x30
-}
-
-// Type.MapType.key, elem
-func decodetype_mapkey(s *LSym) *LSym {
-	return decode_reloc_sym(s, int32(commonsize())) // 0x1c / 0x30
-}
-
-func decodetype_mapvalue(s *LSym) *LSym {
-	return decode_reloc_sym(s, int32(commonsize())+int32(Thearch.Ptrsize)) // 0x20 / 0x38
-}
-
-// Type.ChanType.elem
-func decodetype_chanelem(s *LSym) *LSym {
-	return decode_reloc_sym(s, int32(commonsize())) // 0x1c / 0x30
-}
-
-// Type.FuncType.dotdotdot
-func decodetype_funcdotdotdot(s *LSym) int {
-	return int(s.P[commonsize()])
-}
-
-// Type.FuncType.in.length
-func decodetype_funcincount(s *LSym) int {
-	return int(decode_inuxi(s.P[commonsize()+2*Thearch.Ptrsize:], Thearch.Intsize))
-}
-
-func decodetype_funcoutcount(s *LSym) int {
-	return int(decode_inuxi(s.P[commonsize()+3*Thearch.Ptrsize+2*Thearch.Intsize:], Thearch.Intsize))
-}
-
-func decodetype_funcintype(s *LSym, i int) *LSym {
-	r := decode_reloc(s, int32(commonsize())+int32(Thearch.Ptrsize))
-	if r == nil {
-		return nil
-	}
-	return decode_reloc_sym(r.Sym, int32(r.Add+int64(int32(i)*int32(Thearch.Ptrsize))))
-}
-
-func decodetype_funcouttype(s *LSym, i int) *LSym {
-	r := decode_reloc(s, int32(commonsize())+2*int32(Thearch.Ptrsize)+2*int32(Thearch.Intsize))
-	if r == nil {
-		return nil
-	}
-	return decode_reloc_sym(r.Sym, int32(r.Add+int64(int32(i)*int32(Thearch.Ptrsize))))
-}
-
-// Type.StructType.fields.Slice::length
-func decodetype_structfieldcount(s *LSym) int {
-	return int(decode_inuxi(s.P[commonsize()+Thearch.Ptrsize:], Thearch.Intsize))
-}
-
-func structfieldsize() int {
-	return 5 * Thearch.Ptrsize
-}
-
-// Type.StructType.fields[]-> name, typ and offset.
-func decodetype_structfieldname(s *LSym, i int) string {
-	// go.string."foo"  0x28 / 0x40
-	s = decode_reloc_sym(s, int32(commonsize())+int32(Thearch.Ptrsize)+2*int32(Thearch.Intsize)+int32(i)*int32(structfieldsize()))
-
-	if s == nil { // embedded structs have a nil name.
-		return ""
-	}
-	r := decode_reloc(s, 0) // s has a pointer to the string data at offset 0
-	if r == nil {           // shouldn't happen.
-		return ""
-	}
-	return cstring(r.Sym.P[r.Add:])
-}
-
-func decodetype_structfieldtype(s *LSym, i int) *LSym {
-	return decode_reloc_sym(s, int32(commonsize())+int32(Thearch.Ptrsize)+2*int32(Thearch.Intsize)+int32(i)*int32(structfieldsize())+2*int32(Thearch.Ptrsize))
-}
-
-func decodetype_structfieldoffs(s *LSym, i int) int64 {
-	return int64(decode_inuxi(s.P[commonsize()+Thearch.Ptrsize+2*Thearch.Intsize+i*structfieldsize()+4*Thearch.Ptrsize:], Thearch.Intsize))
-}
-
-// InterfaceType.methods.length
-func decodetype_ifacemethodcount(s *LSym) int64 {
-	return int64(decode_inuxi(s.P[commonsize()+Thearch.Ptrsize:], Thearch.Intsize))
-}
diff --git a/src/cmd/link/internal/ld/dwarf.go b/src/cmd/link/internal/ld/dwarf.go
deleted file mode 100644
index 41d820d..0000000
--- a/src/cmd/link/internal/ld/dwarf.go
+++ /dev/null
@@ -1,2624 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// TODO/NICETOHAVE:
-//   - eliminate DW_CLS_ if not used
-//   - package info in compilation units
-//   - assign global variables and types to their packages
-//   - gdb uses c syntax, meaning clumsy quoting is needed for go identifiers. eg
-//     ptype struct '[]uint8' and qualifiers need to be quoted away
-//   - lexical scoping is lost, so gdb gets confused as to which 'main.i' you mean.
-//   - file:line info for variables
-//   - make strings a typedef so prettyprinters can see the underlying string type
-
-package ld
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-	"os"
-	"strings"
-)
-
-/*
- * Offsets and sizes of the debug_* sections in the cout file.
- */
-var abbrevo int64
-
-var abbrevsize int64
-
-var abbrevsym *LSym
-
-var abbrevsympos int64
-
-var lineo int64
-
-var linesize int64
-
-var linesym *LSym
-
-var linesympos int64
-
-var infoo int64 // also the base for DWDie->offs and reference attributes.
-
-var infosize int64
-
-var infosym *LSym
-
-var infosympos int64
-
-var frameo int64
-
-var framesize int64
-
-var framesym *LSym
-
-var framesympos int64
-
-var pubnameso int64
-
-var pubnamessize int64
-
-var pubtypeso int64
-
-var pubtypessize int64
-
-var arangeso int64
-
-var arangessize int64
-
-var gdbscripto int64
-
-var gdbscriptsize int64
-
-var infosec *LSym
-
-var inforeloco int64
-
-var inforelocsize int64
-
-var arangessec *LSym
-
-var arangesreloco int64
-
-var arangesrelocsize int64
-
-var linesec *LSym
-
-var linereloco int64
-
-var linerelocsize int64
-
-var framesec *LSym
-
-var framereloco int64
-
-var framerelocsize int64
-
-var gdbscript string
-
-/*
- *  Basic I/O
- */
-func addrput(addr int64) {
-	switch Thearch.Ptrsize {
-	case 4:
-		Thearch.Lput(uint32(addr))
-
-	case 8:
-		Thearch.Vput(uint64(addr))
-	}
-}
-
-func uleb128enc(v uint64, dst []byte) int {
-	var c uint8
-
-	length := uint8(0)
-	for {
-		c = uint8(v & 0x7f)
-		v >>= 7
-		if v != 0 {
-			c |= 0x80
-		}
-		if dst != nil {
-			dst[0] = byte(c)
-			dst = dst[1:]
-		}
-		length++
-		if c&0x80 == 0 {
-			break
-		}
-	}
-
-	return int(length)
-}
-
-func sleb128enc(v int64, dst []byte) int {
-	var c uint8
-	var s uint8
-
-	length := uint8(0)
-	for {
-		c = uint8(v & 0x7f)
-		s = uint8(v & 0x40)
-		v >>= 7
-		if (v != -1 || s == 0) && (v != 0 || s != 0) {
-			c |= 0x80
-		}
-		if dst != nil {
-			dst[0] = byte(c)
-			dst = dst[1:]
-		}
-		length++
-		if c&0x80 == 0 {
-			break
-		}
-	}
-
-	return int(length)
-}
-
-var encbuf [10]byte
-
-func uleb128put(v int64) {
-	n := uleb128enc(uint64(v), encbuf[:])
-	Cwrite(encbuf[:n])
-}
-
-func sleb128put(v int64) {
-	n := sleb128enc(v, encbuf[:])
-	Cwrite(encbuf[:n])
-}
-
-/*
- * Defining Abbrevs.  This is hardcoded, and there will be
- * only a handful of them.  The DWARF spec places no restriction on
- * the ordering of attributes in the Abbrevs and DIEs, and we will
- * always write them out in the order of declaration in the abbrev.
- */
-type DWAttrForm struct {
-	attr uint16
-	form uint8
-}
-
-// Go-specific type attributes.
-const (
-	DW_AT_go_kind = 0x2900
-	DW_AT_go_key  = 0x2901
-	DW_AT_go_elem = 0x2902
-
-	DW_AT_internal_location = 253 // params and locals; not emitted
-)
-
-// Index into the abbrevs table below.
-// Keep in sync with ispubname() and ispubtype() below.
-// ispubtype considers >= NULLTYPE public
-const (
-	DW_ABRV_NULL = iota
-	DW_ABRV_COMPUNIT
-	DW_ABRV_FUNCTION
-	DW_ABRV_VARIABLE
-	DW_ABRV_AUTO
-	DW_ABRV_PARAM
-	DW_ABRV_STRUCTFIELD
-	DW_ABRV_FUNCTYPEPARAM
-	DW_ABRV_DOTDOTDOT
-	DW_ABRV_ARRAYRANGE
-	DW_ABRV_NULLTYPE
-	DW_ABRV_BASETYPE
-	DW_ABRV_ARRAYTYPE
-	DW_ABRV_CHANTYPE
-	DW_ABRV_FUNCTYPE
-	DW_ABRV_IFACETYPE
-	DW_ABRV_MAPTYPE
-	DW_ABRV_PTRTYPE
-	DW_ABRV_BARE_PTRTYPE // only for void*, no DW_AT_type attr to please gdb 6.
-	DW_ABRV_SLICETYPE
-	DW_ABRV_STRINGTYPE
-	DW_ABRV_STRUCTTYPE
-	DW_ABRV_TYPEDECL
-	DW_NABRV
-)
-
-type DWAbbrev struct {
-	tag      uint8
-	children uint8
-	attr     []DWAttrForm
-}
-
-var abbrevs = [DW_NABRV]DWAbbrev{
-	/* The mandatory DW_ABRV_NULL entry. */
-	{0, 0, []DWAttrForm{}},
-
-	/* COMPUNIT */
-	{
-		DW_TAG_compile_unit,
-		DW_CHILDREN_yes,
-		[]DWAttrForm{
-			{DW_AT_name, DW_FORM_string},
-			{DW_AT_language, DW_FORM_data1},
-			{DW_AT_low_pc, DW_FORM_addr},
-			{DW_AT_high_pc, DW_FORM_addr},
-			{DW_AT_stmt_list, DW_FORM_data4},
-			{DW_AT_comp_dir, DW_FORM_string},
-		},
-	},
-
-	/* FUNCTION */
-	{
-		DW_TAG_subprogram,
-		DW_CHILDREN_yes,
-		[]DWAttrForm{
-			{DW_AT_name, DW_FORM_string},
-			{DW_AT_low_pc, DW_FORM_addr},
-			{DW_AT_high_pc, DW_FORM_addr},
-			{DW_AT_external, DW_FORM_flag},
-		},
-	},
-
-	/* VARIABLE */
-	{
-		DW_TAG_variable,
-		DW_CHILDREN_no,
-		[]DWAttrForm{
-			{DW_AT_name, DW_FORM_string},
-			{DW_AT_location, DW_FORM_block1},
-			{DW_AT_type, DW_FORM_ref_addr},
-			{DW_AT_external, DW_FORM_flag},
-		},
-	},
-
-	/* AUTO */
-	{
-		DW_TAG_variable,
-		DW_CHILDREN_no,
-		[]DWAttrForm{
-			{DW_AT_name, DW_FORM_string},
-			{DW_AT_location, DW_FORM_block1},
-			{DW_AT_type, DW_FORM_ref_addr},
-		},
-	},
-
-	/* PARAM */
-	{
-		DW_TAG_formal_parameter,
-		DW_CHILDREN_no,
-		[]DWAttrForm{
-			{DW_AT_name, DW_FORM_string},
-			{DW_AT_location, DW_FORM_block1},
-			{DW_AT_type, DW_FORM_ref_addr},
-		},
-	},
-
-	/* STRUCTFIELD */
-	{
-		DW_TAG_member,
-		DW_CHILDREN_no,
-		[]DWAttrForm{
-			{DW_AT_name, DW_FORM_string},
-			{DW_AT_data_member_location, DW_FORM_block1},
-			{DW_AT_type, DW_FORM_ref_addr},
-		},
-	},
-
-	/* FUNCTYPEPARAM */
-	{
-		DW_TAG_formal_parameter,
-		DW_CHILDREN_no,
-
-		// No name!
-		[]DWAttrForm{
-			{DW_AT_type, DW_FORM_ref_addr},
-		},
-	},
-
-	/* DOTDOTDOT */
-	{
-		DW_TAG_unspecified_parameters,
-		DW_CHILDREN_no,
-		[]DWAttrForm{},
-	},
-
-	/* ARRAYRANGE */
-	{
-		DW_TAG_subrange_type,
-		DW_CHILDREN_no,
-
-		// No name!
-		[]DWAttrForm{
-			{DW_AT_type, DW_FORM_ref_addr},
-			{DW_AT_count, DW_FORM_udata},
-		},
-	},
-
-	// Below here are the types considered public by ispubtype
-	/* NULLTYPE */
-	{
-		DW_TAG_unspecified_type,
-		DW_CHILDREN_no,
-		[]DWAttrForm{
-			{DW_AT_name, DW_FORM_string},
-		},
-	},
-
-	/* BASETYPE */
-	{
-		DW_TAG_base_type,
-		DW_CHILDREN_no,
-		[]DWAttrForm{
-			{DW_AT_name, DW_FORM_string},
-			{DW_AT_encoding, DW_FORM_data1},
-			{DW_AT_byte_size, DW_FORM_data1},
-			{DW_AT_go_kind, DW_FORM_data1},
-		},
-	},
-
-	/* ARRAYTYPE */
-	// child is subrange with upper bound
-	{
-		DW_TAG_array_type,
-		DW_CHILDREN_yes,
-		[]DWAttrForm{
-			{DW_AT_name, DW_FORM_string},
-			{DW_AT_type, DW_FORM_ref_addr},
-			{DW_AT_byte_size, DW_FORM_udata},
-			{DW_AT_go_kind, DW_FORM_data1},
-		},
-	},
-
-	/* CHANTYPE */
-	{
-		DW_TAG_typedef,
-		DW_CHILDREN_no,
-		[]DWAttrForm{
-			{DW_AT_name, DW_FORM_string},
-			{DW_AT_type, DW_FORM_ref_addr},
-			{DW_AT_go_kind, DW_FORM_data1},
-			{DW_AT_go_elem, DW_FORM_ref_addr},
-		},
-	},
-
-	/* FUNCTYPE */
-	{
-		DW_TAG_subroutine_type,
-		DW_CHILDREN_yes,
-		[]DWAttrForm{
-			{DW_AT_name, DW_FORM_string},
-			// {DW_AT_type,	DW_FORM_ref_addr},
-			{DW_AT_go_kind, DW_FORM_data1},
-		},
-	},
-
-	/* IFACETYPE */
-	{
-		DW_TAG_typedef,
-		DW_CHILDREN_yes,
-		[]DWAttrForm{
-			{DW_AT_name, DW_FORM_string},
-			{DW_AT_type, DW_FORM_ref_addr},
-			{DW_AT_go_kind, DW_FORM_data1},
-		},
-	},
-
-	/* MAPTYPE */
-	{
-		DW_TAG_typedef,
-		DW_CHILDREN_no,
-		[]DWAttrForm{
-			{DW_AT_name, DW_FORM_string},
-			{DW_AT_type, DW_FORM_ref_addr},
-			{DW_AT_go_kind, DW_FORM_data1},
-			{DW_AT_go_key, DW_FORM_ref_addr},
-			{DW_AT_go_elem, DW_FORM_ref_addr},
-		},
-	},
-
-	/* PTRTYPE */
-	{
-		DW_TAG_pointer_type,
-		DW_CHILDREN_no,
-		[]DWAttrForm{
-			{DW_AT_name, DW_FORM_string},
-			{DW_AT_type, DW_FORM_ref_addr},
-			{DW_AT_go_kind, DW_FORM_data1},
-		},
-	},
-
-	/* BARE_PTRTYPE */
-	{
-		DW_TAG_pointer_type,
-		DW_CHILDREN_no,
-		[]DWAttrForm{
-			{DW_AT_name, DW_FORM_string},
-		},
-	},
-
-	/* SLICETYPE */
-	{
-		DW_TAG_structure_type,
-		DW_CHILDREN_yes,
-		[]DWAttrForm{
-			{DW_AT_name, DW_FORM_string},
-			{DW_AT_byte_size, DW_FORM_udata},
-			{DW_AT_go_kind, DW_FORM_data1},
-			{DW_AT_go_elem, DW_FORM_ref_addr},
-		},
-	},
-
-	/* STRINGTYPE */
-	{
-		DW_TAG_structure_type,
-		DW_CHILDREN_yes,
-		[]DWAttrForm{
-			{DW_AT_name, DW_FORM_string},
-			{DW_AT_byte_size, DW_FORM_udata},
-			{DW_AT_go_kind, DW_FORM_data1},
-		},
-	},
-
-	/* STRUCTTYPE */
-	{
-		DW_TAG_structure_type,
-		DW_CHILDREN_yes,
-		[]DWAttrForm{
-			{DW_AT_name, DW_FORM_string},
-			{DW_AT_byte_size, DW_FORM_udata},
-			{DW_AT_go_kind, DW_FORM_data1},
-		},
-	},
-
-	/* TYPEDECL */
-	{
-		DW_TAG_typedef,
-		DW_CHILDREN_no,
-		[]DWAttrForm{
-			{DW_AT_name, DW_FORM_string},
-			{DW_AT_type, DW_FORM_ref_addr},
-		},
-	},
-}
-
-func writeabbrev() {
-	abbrevo = Cpos()
-	for i := 1; i < DW_NABRV; i++ {
-		// See section 7.5.3
-		uleb128put(int64(i))
-
-		uleb128put(int64(abbrevs[i].tag))
-		Cput(abbrevs[i].children)
-		for _, f := range abbrevs[i].attr {
-			uleb128put(int64(f.attr))
-			uleb128put(int64(f.form))
-		}
-		uleb128put(0)
-		uleb128put(0)
-	}
-
-	Cput(0)
-	abbrevsize = Cpos() - abbrevo
-}
-
-/*
- * Debugging Information Entries and their attributes.
- */
-const (
-	HASHSIZE = 107
-)
-
-func dwarfhashstr(s string) uint32 {
-	h := uint32(0)
-	for s != "" {
-		h = h + h + h + uint32(s[0])
-		s = s[1:]
-	}
-	return h % HASHSIZE
-}
-
-// For DW_CLS_string and _block, value should contain the length, and
-// data the data, for _reference, value is 0 and data is a DWDie* to
-// the referenced instance, for all others, value is the whole thing
-// and data is null.
-
-type DWAttr struct {
-	link  *DWAttr
-	atr   uint16 // DW_AT_
-	cls   uint8  // DW_CLS_
-	value int64
-	data  interface{}
-}
-
-type DWDie struct {
-	abbrev int
-	link   *DWDie
-	child  *DWDie
-	attr   *DWAttr
-	// offset into .debug_info section, i.e relative to
-	// infoo. only valid after call to putdie()
-	offs  int64
-	hash  []*DWDie // optional index of children by name, enabled by mkindex()
-	hlink *DWDie   // bucket chain in parent's index
-}
-
-/*
- * Root DIEs for compilation units, types and global variables.
- */
-var dwroot DWDie
-
-var dwtypes DWDie
-
-var dwglobals DWDie
-
-func newattr(die *DWDie, attr uint16, cls int, value int64, data interface{}) *DWAttr {
-	a := new(DWAttr)
-	a.link = die.attr
-	die.attr = a
-	a.atr = attr
-	a.cls = uint8(cls)
-	a.value = value
-	a.data = data
-	return a
-}
-
-// Each DIE (except the root ones) has at least 1 attribute: its
-// name. getattr moves the desired one to the front so
-// frequently searched ones are found faster.
-func getattr(die *DWDie, attr uint16) *DWAttr {
-	if die.attr.atr == attr {
-		return die.attr
-	}
-
-	a := die.attr
-	b := a.link
-	for b != nil {
-		if b.atr == attr {
-			a.link = b.link
-			b.link = die.attr
-			die.attr = b
-			return b
-		}
-
-		a = b
-		b = b.link
-	}
-
-	return nil
-}
-
-// Every DIE has at least a DW_AT_name attribute (but it will only be
-// written out if it is listed in the abbrev).	If its parent is
-// keeping an index, the new DIE will be inserted there.
-func newdie(parent *DWDie, abbrev int, name string) *DWDie {
-	die := new(DWDie)
-	die.abbrev = abbrev
-	die.link = parent.child
-	parent.child = die
-
-	newattr(die, DW_AT_name, DW_CLS_STRING, int64(len(name)), name)
-
-	if parent.hash != nil {
-		h := int(dwarfhashstr(name))
-		die.hlink = parent.hash[h]
-		parent.hash[h] = die
-	}
-
-	return die
-}
-
-func mkindex(die *DWDie) {
-	die.hash = make([]*DWDie, HASHSIZE)
-}
-
-func walktypedef(die *DWDie) *DWDie {
-	// Resolve typedef if present.
-	if die.abbrev == DW_ABRV_TYPEDECL {
-		for attr := die.attr; attr != nil; attr = attr.link {
-			if attr.atr == DW_AT_type && attr.cls == DW_CLS_REFERENCE && attr.data != nil {
-				return attr.data.(*DWDie)
-			}
-		}
-	}
-
-	return die
-}
-
-// Find child by AT_name using hashtable if available or linear scan
-// if not.
-func find(die *DWDie, name string) *DWDie {
-	var a *DWDie
-	var b *DWDie
-	var die2 *DWDie
-	var h int
-
-top:
-	if die.hash == nil {
-		for a = die.child; a != nil; a = a.link {
-			if name == getattr(a, DW_AT_name).data {
-				return a
-			}
-		}
-		goto notfound
-	}
-
-	h = int(dwarfhashstr(name))
-	a = die.hash[h]
-
-	if a == nil {
-		goto notfound
-	}
-
-	if name == getattr(a, DW_AT_name).data {
-		return a
-	}
-
-	// Move found ones to head of the list.
-	b = a.hlink
-
-	for b != nil {
-		if name == getattr(b, DW_AT_name).data {
-			a.hlink = b.hlink
-			b.hlink = die.hash[h]
-			die.hash[h] = b
-			return b
-		}
-
-		a = b
-		b = b.hlink
-	}
-
-notfound:
-	die2 = walktypedef(die)
-	if die2 != die {
-		die = die2
-		goto top
-	}
-
-	return nil
-}
-
-func mustFind(die *DWDie, name string) *DWDie {
-	r := find(die, name)
-	if r == nil {
-		Exitf("dwarf find: %s %p has no %s", getattr(die, DW_AT_name).data, die, name)
-	}
-	return r
-}
-
-func adddwarfrel(sec *LSym, sym *LSym, offsetbase int64, siz int, addend int64) {
-	r := Addrel(sec)
-	r.Sym = sym
-	r.Xsym = sym
-	r.Off = int32(Cpos() - offsetbase)
-	r.Siz = uint8(siz)
-	r.Type = obj.R_ADDR
-	r.Add = addend
-	r.Xadd = addend
-	if Iself && Thearch.Thechar == '6' {
-		addend = 0
-	}
-	if HEADTYPE == obj.Hdarwin {
-		addend += sym.Value
-	}
-	switch siz {
-	case 4:
-		Thearch.Lput(uint32(addend))
-
-	case 8:
-		Thearch.Vput(uint64(addend))
-
-	default:
-		Diag("bad size in adddwarfrel")
-	}
-}
-
-func newrefattr(die *DWDie, attr uint16, ref *DWDie) *DWAttr {
-	if ref == nil {
-		return nil
-	}
-	return newattr(die, attr, DW_CLS_REFERENCE, 0, ref)
-}
-
-var fwdcount int
-
-func putattr(abbrev int, form int, cls int, value int64, data interface{}) {
-	switch form {
-	case DW_FORM_addr: // address
-		if Linkmode == LinkExternal {
-			value -= (data.(*LSym)).Value
-			adddwarfrel(infosec, data.(*LSym), infoo, Thearch.Ptrsize, value)
-			break
-		}
-
-		addrput(value)
-
-	case DW_FORM_block1: // block
-		if cls == DW_CLS_ADDRESS {
-			Cput(uint8(1 + Thearch.Ptrsize))
-			Cput(DW_OP_addr)
-			if Linkmode == LinkExternal {
-				value -= (data.(*LSym)).Value
-				adddwarfrel(infosec, data.(*LSym), infoo, Thearch.Ptrsize, value)
-				break
-			}
-
-			addrput(value)
-			break
-		}
-
-		value &= 0xff
-		Cput(uint8(value))
-		p := data.([]byte)
-		for i := 0; int64(i) < value; i++ {
-			Cput(uint8(p[i]))
-		}
-
-	case DW_FORM_block2: // block
-		value &= 0xffff
-
-		Thearch.Wput(uint16(value))
-		p := data.([]byte)
-		for i := 0; int64(i) < value; i++ {
-			Cput(uint8(p[i]))
-		}
-
-	case DW_FORM_block4: // block
-		value &= 0xffffffff
-
-		Thearch.Lput(uint32(value))
-		p := data.([]byte)
-		for i := 0; int64(i) < value; i++ {
-			Cput(uint8(p[i]))
-		}
-
-	case DW_FORM_block: // block
-		uleb128put(value)
-
-		p := data.([]byte)
-		for i := 0; int64(i) < value; i++ {
-			Cput(uint8(p[i]))
-		}
-
-	case DW_FORM_data1: // constant
-		Cput(uint8(value))
-
-	case DW_FORM_data2: // constant
-		Thearch.Wput(uint16(value))
-
-	case DW_FORM_data4: // constant, {line,loclist,mac,rangelist}ptr
-		if Linkmode == LinkExternal && cls == DW_CLS_PTR {
-			adddwarfrel(infosec, linesym, infoo, 4, value)
-			break
-		}
-
-		Thearch.Lput(uint32(value))
-
-	case DW_FORM_data8: // constant, {line,loclist,mac,rangelist}ptr
-		Thearch.Vput(uint64(value))
-
-	case DW_FORM_sdata: // constant
-		sleb128put(value)
-
-	case DW_FORM_udata: // constant
-		uleb128put(value)
-
-	case DW_FORM_string: // string
-		strnput(data.(string), int(value+1))
-
-	case DW_FORM_flag: // flag
-		if value != 0 {
-			Cput(1)
-		} else {
-			Cput(0)
-		}
-
-		// In DWARF 2 (which is what we claim to generate),
-	// the ref_addr is the same size as a normal address.
-	// In DWARF 3 it is always 32 bits, unless emitting a large
-	// (> 4 GB of debug info aka "64-bit") unit, which we don't implement.
-	case DW_FORM_ref_addr: // reference to a DIE in the .info section
-		if data == nil {
-			Diag("dwarf: null reference in %d", abbrev)
-			if Thearch.Ptrsize == 8 {
-				Thearch.Vput(0) // invalid dwarf, gdb will complain.
-			} else {
-				Thearch.Lput(0) // invalid dwarf, gdb will complain.
-			}
-		} else {
-			off := (data.(*DWDie)).offs
-			if off == 0 {
-				fwdcount++
-			}
-			if Linkmode == LinkExternal {
-				adddwarfrel(infosec, infosym, infoo, Thearch.Ptrsize, off)
-				break
-			}
-
-			addrput(off)
-		}
-
-	case DW_FORM_ref1, // reference within the compilation unit
-		DW_FORM_ref2,      // reference
-		DW_FORM_ref4,      // reference
-		DW_FORM_ref8,      // reference
-		DW_FORM_ref_udata, // reference
-
-		DW_FORM_strp,     // string
-		DW_FORM_indirect: // (see Section 7.5.3)
-		fallthrough
-	default:
-		Exitf("dwarf: unsupported attribute form %d / class %d", form, cls)
-	}
-}
-
-// Note that we can (and do) add arbitrary attributes to a DIE, but
-// only the ones actually listed in the Abbrev will be written out.
-func putattrs(abbrev int, attr *DWAttr) {
-Outer:
-	for _, f := range abbrevs[abbrev].attr {
-		for ap := attr; ap != nil; ap = ap.link {
-			if ap.atr == f.attr {
-				putattr(abbrev, int(f.form), int(ap.cls), ap.value, ap.data)
-				continue Outer
-			}
-		}
-
-		putattr(abbrev, int(f.form), 0, 0, nil)
-	}
-}
-
-func putdies(die *DWDie) {
-	for ; die != nil; die = die.link {
-		putdie(die)
-	}
-}
-
-func putdie(die *DWDie) {
-	die.offs = Cpos() - infoo
-	uleb128put(int64(die.abbrev))
-	putattrs(die.abbrev, die.attr)
-	if abbrevs[die.abbrev].children != 0 {
-		putdies(die.child)
-		Cput(0)
-	}
-}
-
-func reverselist(list **DWDie) {
-	curr := *list
-	var prev *DWDie
-	for curr != nil {
-		var next *DWDie = curr.link
-		curr.link = prev
-		prev = curr
-		curr = next
-	}
-
-	*list = prev
-}
-
-func reversetree(list **DWDie) {
-	reverselist(list)
-	for die := *list; die != nil; die = die.link {
-		if abbrevs[die.abbrev].children != 0 {
-			reversetree(&die.child)
-		}
-	}
-}
-
-func newmemberoffsetattr(die *DWDie, offs int32) {
-	var block [20]byte
-
-	i := 0
-	block[i] = DW_OP_plus_uconst
-	i++
-	i += uleb128enc(uint64(offs), block[i:])
-	newattr(die, DW_AT_data_member_location, DW_CLS_BLOCK, int64(i), block[:i])
-}
-
-// GDB doesn't like DW_FORM_addr for DW_AT_location, so emit a
-// location expression that evals to a const.
-func newabslocexprattr(die *DWDie, addr int64, sym *LSym) {
-	newattr(die, DW_AT_location, DW_CLS_ADDRESS, addr, sym)
-	// below
-}
-
-// Lookup predefined types
-func lookup_or_diag(n string) *LSym {
-	s := Linkrlookup(Ctxt, n, 0)
-	if s == nil || s.Size == 0 {
-		Exitf("dwarf: missing type: %s", n)
-	}
-
-	return s
-}
-
-func dotypedef(parent *DWDie, name string, def *DWDie) {
-	// Only emit typedefs for real names.
-	if strings.HasPrefix(name, "map[") {
-		return
-	}
-	if strings.HasPrefix(name, "struct {") {
-		return
-	}
-	if strings.HasPrefix(name, "chan ") {
-		return
-	}
-	if name[0] == '[' || name[0] == '*' {
-		return
-	}
-	if def == nil {
-		Diag("dwarf: bad def in dotypedef")
-	}
-
-	// The typedef entry must be created after the def,
-	// so that future lookups will find the typedef instead
-	// of the real definition. This hooks the typedef into any
-	// circular definition loops, so that gdb can understand them.
-	die := newdie(parent, DW_ABRV_TYPEDECL, name)
-
-	newrefattr(die, DW_AT_type, def)
-}
-
-// Define gotype, for composite ones recurse into constituents.
-func defgotype(gotype *LSym) *DWDie {
-	if gotype == nil {
-		return mustFind(&dwtypes, "<unspecified>")
-	}
-
-	if !strings.HasPrefix(gotype.Name, "type.") {
-		Diag("dwarf: type name doesn't start with \".type\": %s", gotype.Name)
-		return mustFind(&dwtypes, "<unspecified>")
-	}
-
-	name := gotype.Name[5:] // could also decode from Type.string
-
-	die := find(&dwtypes, name)
-
-	if die != nil {
-		return die
-	}
-
-	if false && Debug['v'] > 2 {
-		fmt.Printf("new type: %v\n", gotype)
-	}
-
-	kind := decodetype_kind(gotype)
-	bytesize := decodetype_size(gotype)
-
-	switch kind {
-	case obj.KindBool:
-		die = newdie(&dwtypes, DW_ABRV_BASETYPE, name)
-		newattr(die, DW_AT_encoding, DW_CLS_CONSTANT, DW_ATE_boolean, 0)
-		newattr(die, DW_AT_byte_size, DW_CLS_CONSTANT, bytesize, 0)
-
-	case obj.KindInt,
-		obj.KindInt8,
-		obj.KindInt16,
-		obj.KindInt32,
-		obj.KindInt64:
-		die = newdie(&dwtypes, DW_ABRV_BASETYPE, name)
-		newattr(die, DW_AT_encoding, DW_CLS_CONSTANT, DW_ATE_signed, 0)
-		newattr(die, DW_AT_byte_size, DW_CLS_CONSTANT, bytesize, 0)
-
-	case obj.KindUint,
-		obj.KindUint8,
-		obj.KindUint16,
-		obj.KindUint32,
-		obj.KindUint64,
-		obj.KindUintptr:
-		die = newdie(&dwtypes, DW_ABRV_BASETYPE, name)
-		newattr(die, DW_AT_encoding, DW_CLS_CONSTANT, DW_ATE_unsigned, 0)
-		newattr(die, DW_AT_byte_size, DW_CLS_CONSTANT, bytesize, 0)
-
-	case obj.KindFloat32,
-		obj.KindFloat64:
-		die = newdie(&dwtypes, DW_ABRV_BASETYPE, name)
-		newattr(die, DW_AT_encoding, DW_CLS_CONSTANT, DW_ATE_float, 0)
-		newattr(die, DW_AT_byte_size, DW_CLS_CONSTANT, bytesize, 0)
-
-	case obj.KindComplex64,
-		obj.KindComplex128:
-		die = newdie(&dwtypes, DW_ABRV_BASETYPE, name)
-		newattr(die, DW_AT_encoding, DW_CLS_CONSTANT, DW_ATE_complex_float, 0)
-		newattr(die, DW_AT_byte_size, DW_CLS_CONSTANT, bytesize, 0)
-
-	case obj.KindArray:
-		die = newdie(&dwtypes, DW_ABRV_ARRAYTYPE, name)
-		dotypedef(&dwtypes, name, die)
-		newattr(die, DW_AT_byte_size, DW_CLS_CONSTANT, bytesize, 0)
-		s := decodetype_arrayelem(gotype)
-		newrefattr(die, DW_AT_type, defgotype(s))
-		fld := newdie(die, DW_ABRV_ARRAYRANGE, "range")
-
-		// use actual length not upper bound; correct for 0-length arrays.
-		newattr(fld, DW_AT_count, DW_CLS_CONSTANT, decodetype_arraylen(gotype), 0)
-
-		newrefattr(fld, DW_AT_type, mustFind(&dwtypes, "uintptr"))
-
-	case obj.KindChan:
-		die = newdie(&dwtypes, DW_ABRV_CHANTYPE, name)
-		newattr(die, DW_AT_byte_size, DW_CLS_CONSTANT, bytesize, 0)
-		s := decodetype_chanelem(gotype)
-		newrefattr(die, DW_AT_go_elem, defgotype(s))
-
-	case obj.KindFunc:
-		die = newdie(&dwtypes, DW_ABRV_FUNCTYPE, name)
-		dotypedef(&dwtypes, name, die)
-		newrefattr(die, DW_AT_type, mustFind(&dwtypes, "void"))
-		nfields := decodetype_funcincount(gotype)
-		var fld *DWDie
-		var s *LSym
-		for i := 0; i < nfields; i++ {
-			s = decodetype_funcintype(gotype, i)
-			fld = newdie(die, DW_ABRV_FUNCTYPEPARAM, s.Name[5:])
-			newrefattr(fld, DW_AT_type, defgotype(s))
-		}
-
-		if decodetype_funcdotdotdot(gotype) != 0 {
-			newdie(die, DW_ABRV_DOTDOTDOT, "...")
-		}
-		nfields = decodetype_funcoutcount(gotype)
-		for i := 0; i < nfields; i++ {
-			s = decodetype_funcouttype(gotype, i)
-			fld = newdie(die, DW_ABRV_FUNCTYPEPARAM, s.Name[5:])
-			newrefattr(fld, DW_AT_type, defptrto(defgotype(s)))
-		}
-
-	case obj.KindInterface:
-		die = newdie(&dwtypes, DW_ABRV_IFACETYPE, name)
-		dotypedef(&dwtypes, name, die)
-		newattr(die, DW_AT_byte_size, DW_CLS_CONSTANT, bytesize, 0)
-		nfields := int(decodetype_ifacemethodcount(gotype))
-		var s *LSym
-		if nfields == 0 {
-			s = lookup_or_diag("type.runtime.eface")
-		} else {
-			s = lookup_or_diag("type.runtime.iface")
-		}
-		newrefattr(die, DW_AT_type, defgotype(s))
-
-	case obj.KindMap:
-		die = newdie(&dwtypes, DW_ABRV_MAPTYPE, name)
-		s := decodetype_mapkey(gotype)
-		newrefattr(die, DW_AT_go_key, defgotype(s))
-		s = decodetype_mapvalue(gotype)
-		newrefattr(die, DW_AT_go_elem, defgotype(s))
-
-	case obj.KindPtr:
-		die = newdie(&dwtypes, DW_ABRV_PTRTYPE, name)
-		dotypedef(&dwtypes, name, die)
-		s := decodetype_ptrelem(gotype)
-		newrefattr(die, DW_AT_type, defgotype(s))
-
-	case obj.KindSlice:
-		die = newdie(&dwtypes, DW_ABRV_SLICETYPE, name)
-		dotypedef(&dwtypes, name, die)
-		newattr(die, DW_AT_byte_size, DW_CLS_CONSTANT, bytesize, 0)
-		s := decodetype_arrayelem(gotype)
-		newrefattr(die, DW_AT_go_elem, defgotype(s))
-
-	case obj.KindString:
-		die = newdie(&dwtypes, DW_ABRV_STRINGTYPE, name)
-		newattr(die, DW_AT_byte_size, DW_CLS_CONSTANT, bytesize, 0)
-
-	case obj.KindStruct:
-		die = newdie(&dwtypes, DW_ABRV_STRUCTTYPE, name)
-		dotypedef(&dwtypes, name, die)
-		newattr(die, DW_AT_byte_size, DW_CLS_CONSTANT, bytesize, 0)
-		nfields := decodetype_structfieldcount(gotype)
-		var f string
-		var fld *DWDie
-		var s *LSym
-		for i := 0; i < nfields; i++ {
-			f = decodetype_structfieldname(gotype, i)
-			s = decodetype_structfieldtype(gotype, i)
-			if f == "" {
-				f = s.Name[5:] // skip "type."
-			}
-			fld = newdie(die, DW_ABRV_STRUCTFIELD, f)
-			newrefattr(fld, DW_AT_type, defgotype(s))
-			newmemberoffsetattr(fld, int32(decodetype_structfieldoffs(gotype, i)))
-		}
-
-	case obj.KindUnsafePointer:
-		die = newdie(&dwtypes, DW_ABRV_BARE_PTRTYPE, name)
-
-	default:
-		Diag("dwarf: definition of unknown kind %d: %s", kind, gotype.Name)
-		die = newdie(&dwtypes, DW_ABRV_TYPEDECL, name)
-		newrefattr(die, DW_AT_type, mustFind(&dwtypes, "<unspecified>"))
-	}
-
-	newattr(die, DW_AT_go_kind, DW_CLS_CONSTANT, int64(kind), 0)
-
-	return die
-}
-
-// Find or construct *T given T.
-func defptrto(dwtype *DWDie) *DWDie {
-	ptrname := fmt.Sprintf("*%s", getattr(dwtype, DW_AT_name).data)
-	die := find(&dwtypes, ptrname)
-	if die == nil {
-		die = newdie(&dwtypes, DW_ABRV_PTRTYPE, ptrname)
-		newrefattr(die, DW_AT_type, dwtype)
-	}
-
-	return die
-}
-
-// Copies src's children into dst. Copies attributes by value.
-// DWAttr.data is copied as pointer only.  If except is one of
-// the top-level children, it will not be copied.
-func copychildrenexcept(dst *DWDie, src *DWDie, except *DWDie) {
-	var c *DWDie
-	var a *DWAttr
-
-	for src = src.child; src != nil; src = src.link {
-		if src == except {
-			continue
-		}
-		c = newdie(dst, src.abbrev, getattr(src, DW_AT_name).data.(string))
-		for a = src.attr; a != nil; a = a.link {
-			newattr(c, a.atr, int(a.cls), a.value, a.data)
-		}
-		copychildrenexcept(c, src, nil)
-	}
-
-	reverselist(&dst.child)
-}
-
-func copychildren(dst *DWDie, src *DWDie) {
-	copychildrenexcept(dst, src, nil)
-}
-
-// Search children (assumed to have DW_TAG_member) for the one named
-// field and set its DW_AT_type to dwtype
-func substitutetype(structdie *DWDie, field string, dwtype *DWDie) {
-	child := mustFind(structdie, field)
-	if child == nil {
-		return
-	}
-
-	a := getattr(child, DW_AT_type)
-	if a != nil {
-		a.data = dwtype
-	} else {
-		newrefattr(child, DW_AT_type, dwtype)
-	}
-}
-
-func synthesizestringtypes(die *DWDie) {
-	prototype := walktypedef(defgotype(lookup_or_diag("type.runtime._string")))
-	if prototype == nil {
-		return
-	}
-
-	for ; die != nil; die = die.link {
-		if die.abbrev != DW_ABRV_STRINGTYPE {
-			continue
-		}
-		copychildren(die, prototype)
-	}
-}
-
-func synthesizeslicetypes(die *DWDie) {
-	prototype := walktypedef(defgotype(lookup_or_diag("type.runtime.slice")))
-	if prototype == nil {
-		return
-	}
-
-	var elem *DWDie
-	for ; die != nil; die = die.link {
-		if die.abbrev != DW_ABRV_SLICETYPE {
-			continue
-		}
-		copychildren(die, prototype)
-		elem = getattr(die, DW_AT_go_elem).data.(*DWDie)
-		substitutetype(die, "array", defptrto(elem))
-	}
-}
-
-func mkinternaltypename(base string, arg1 string, arg2 string) string {
-	var buf string
-
-	if arg2 == "" {
-		buf = fmt.Sprintf("%s<%s>", base, arg1)
-	} else {
-		buf = fmt.Sprintf("%s<%s,%s>", base, arg1, arg2)
-	}
-	n := buf
-	return n
-}
-
-// synthesizemaptypes is way too closely married to runtime/hashmap.c
-const (
-	MaxKeySize = 128
-	MaxValSize = 128
-	BucketSize = 8
-)
-
-func synthesizemaptypes(die *DWDie) {
-	hash := walktypedef(defgotype(lookup_or_diag("type.runtime.hmap")))
-	bucket := walktypedef(defgotype(lookup_or_diag("type.runtime.bmap")))
-
-	if hash == nil {
-		return
-	}
-
-	var a *DWAttr
-	var dwh *DWDie
-	var dwhb *DWDie
-	var dwhk *DWDie
-	var dwhv *DWDie
-	var fld *DWDie
-	var indirect_key int
-	var indirect_val int
-	var keysize int
-	var keytype *DWDie
-	var t *DWDie
-	var valsize int
-	var valtype *DWDie
-	for ; die != nil; die = die.link {
-		if die.abbrev != DW_ABRV_MAPTYPE {
-			continue
-		}
-
-		keytype = walktypedef(getattr(die, DW_AT_go_key).data.(*DWDie))
-		valtype = walktypedef(getattr(die, DW_AT_go_elem).data.(*DWDie))
-
-		// compute size info like hashmap.c does.
-		a = getattr(keytype, DW_AT_byte_size)
-
-		if a != nil {
-			keysize = int(a.value)
-		} else {
-			keysize = Thearch.Ptrsize
-		}
-		a = getattr(valtype, DW_AT_byte_size)
-		if a != nil {
-			valsize = int(a.value)
-		} else {
-			valsize = Thearch.Ptrsize
-		}
-		indirect_key = 0
-		indirect_val = 0
-		if keysize > MaxKeySize {
-			keysize = Thearch.Ptrsize
-			indirect_key = 1
-		}
-
-		if valsize > MaxValSize {
-			valsize = Thearch.Ptrsize
-			indirect_val = 1
-		}
-
-		// Construct type to represent an array of BucketSize keys
-		dwhk = newdie(&dwtypes, DW_ABRV_ARRAYTYPE, mkinternaltypename("[]key", getattr(keytype, DW_AT_name).data.(string), ""))
-
-		newattr(dwhk, DW_AT_byte_size, DW_CLS_CONSTANT, BucketSize*int64(keysize), 0)
-		t = keytype
-		if indirect_key != 0 {
-			t = defptrto(keytype)
-		}
-		newrefattr(dwhk, DW_AT_type, t)
-		fld = newdie(dwhk, DW_ABRV_ARRAYRANGE, "size")
-		newattr(fld, DW_AT_count, DW_CLS_CONSTANT, BucketSize, 0)
-		newrefattr(fld, DW_AT_type, mustFind(&dwtypes, "uintptr"))
-
-		// Construct type to represent an array of BucketSize values
-		dwhv = newdie(&dwtypes, DW_ABRV_ARRAYTYPE, mkinternaltypename("[]val", getattr(valtype, DW_AT_name).data.(string), ""))
-
-		newattr(dwhv, DW_AT_byte_size, DW_CLS_CONSTANT, BucketSize*int64(valsize), 0)
-		t = valtype
-		if indirect_val != 0 {
-			t = defptrto(valtype)
-		}
-		newrefattr(dwhv, DW_AT_type, t)
-		fld = newdie(dwhv, DW_ABRV_ARRAYRANGE, "size")
-		newattr(fld, DW_AT_count, DW_CLS_CONSTANT, BucketSize, 0)
-		newrefattr(fld, DW_AT_type, mustFind(&dwtypes, "uintptr"))
-
-		// Construct bucket<K,V>
-		dwhb = newdie(&dwtypes, DW_ABRV_STRUCTTYPE, mkinternaltypename("bucket", getattr(keytype, DW_AT_name).data.(string), getattr(valtype, DW_AT_name).data.(string)))
-
-		// Copy over all fields except the field "data" from the generic bucket.
-		// "data" will be replaced with keys/values below.
-		copychildrenexcept(dwhb, bucket, find(bucket, "data"))
-
-		fld = newdie(dwhb, DW_ABRV_STRUCTFIELD, "keys")
-		newrefattr(fld, DW_AT_type, dwhk)
-		newmemberoffsetattr(fld, BucketSize)
-		fld = newdie(dwhb, DW_ABRV_STRUCTFIELD, "values")
-		newrefattr(fld, DW_AT_type, dwhv)
-		newmemberoffsetattr(fld, BucketSize+BucketSize*int32(keysize))
-		fld = newdie(dwhb, DW_ABRV_STRUCTFIELD, "overflow")
-		newrefattr(fld, DW_AT_type, defptrto(dwhb))
-		newmemberoffsetattr(fld, BucketSize+BucketSize*(int32(keysize)+int32(valsize)))
-		if Thearch.Regsize > Thearch.Ptrsize {
-			fld = newdie(dwhb, DW_ABRV_STRUCTFIELD, "pad")
-			newrefattr(fld, DW_AT_type, mustFind(&dwtypes, "uintptr"))
-			newmemberoffsetattr(fld, BucketSize+BucketSize*(int32(keysize)+int32(valsize))+int32(Thearch.Ptrsize))
-		}
-
-		newattr(dwhb, DW_AT_byte_size, DW_CLS_CONSTANT, BucketSize+BucketSize*int64(keysize)+BucketSize*int64(valsize)+int64(Thearch.Regsize), 0)
-
-		// Construct hash<K,V>
-		dwh = newdie(&dwtypes, DW_ABRV_STRUCTTYPE, mkinternaltypename("hash", getattr(keytype, DW_AT_name).data.(string), getattr(valtype, DW_AT_name).data.(string)))
-
-		copychildren(dwh, hash)
-		substitutetype(dwh, "buckets", defptrto(dwhb))
-		substitutetype(dwh, "oldbuckets", defptrto(dwhb))
-		newattr(dwh, DW_AT_byte_size, DW_CLS_CONSTANT, getattr(hash, DW_AT_byte_size).value, nil)
-
-		// make map type a pointer to hash<K,V>
-		newrefattr(die, DW_AT_type, defptrto(dwh))
-	}
-}
-
-func synthesizechantypes(die *DWDie) {
-	sudog := walktypedef(defgotype(lookup_or_diag("type.runtime.sudog")))
-	waitq := walktypedef(defgotype(lookup_or_diag("type.runtime.waitq")))
-	hchan := walktypedef(defgotype(lookup_or_diag("type.runtime.hchan")))
-	if sudog == nil || waitq == nil || hchan == nil {
-		return
-	}
-
-	sudogsize := int(getattr(sudog, DW_AT_byte_size).value)
-
-	var a *DWAttr
-	var dwh *DWDie
-	var dws *DWDie
-	var dww *DWDie
-	var elemsize int
-	var elemtype *DWDie
-	for ; die != nil; die = die.link {
-		if die.abbrev != DW_ABRV_CHANTYPE {
-			continue
-		}
-		elemtype = getattr(die, DW_AT_go_elem).data.(*DWDie)
-		a = getattr(elemtype, DW_AT_byte_size)
-		if a != nil {
-			elemsize = int(a.value)
-		} else {
-			elemsize = Thearch.Ptrsize
-		}
-
-		// sudog<T>
-		dws = newdie(&dwtypes, DW_ABRV_STRUCTTYPE, mkinternaltypename("sudog", getattr(elemtype, DW_AT_name).data.(string), ""))
-
-		copychildren(dws, sudog)
-		substitutetype(dws, "elem", elemtype)
-		if elemsize > 8 {
-			elemsize -= 8
-		} else {
-			elemsize = 0
-		}
-		newattr(dws, DW_AT_byte_size, DW_CLS_CONSTANT, int64(sudogsize)+int64(elemsize), nil)
-
-		// waitq<T>
-		dww = newdie(&dwtypes, DW_ABRV_STRUCTTYPE, mkinternaltypename("waitq", getattr(elemtype, DW_AT_name).data.(string), ""))
-
-		copychildren(dww, waitq)
-		substitutetype(dww, "first", defptrto(dws))
-		substitutetype(dww, "last", defptrto(dws))
-		newattr(dww, DW_AT_byte_size, DW_CLS_CONSTANT, getattr(waitq, DW_AT_byte_size).value, nil)
-
-		// hchan<T>
-		dwh = newdie(&dwtypes, DW_ABRV_STRUCTTYPE, mkinternaltypename("hchan", getattr(elemtype, DW_AT_name).data.(string), ""))
-
-		copychildren(dwh, hchan)
-		substitutetype(dwh, "recvq", dww)
-		substitutetype(dwh, "sendq", dww)
-		newattr(dwh, DW_AT_byte_size, DW_CLS_CONSTANT, getattr(hchan, DW_AT_byte_size).value, nil)
-
-		newrefattr(die, DW_AT_type, defptrto(dwh))
-	}
-}
-
-// For use with pass.c::genasmsym
-func defdwsymb(sym *LSym, s string, t int, v int64, size int64, ver int, gotype *LSym) {
-	if strings.HasPrefix(s, "go.string.") {
-		return
-	}
-	if strings.HasPrefix(s, "runtime.gcbits.") {
-		return
-	}
-
-	if strings.HasPrefix(s, "type.") && s != "type.*" && !strings.HasPrefix(s, "type..") {
-		defgotype(sym)
-		return
-	}
-
-	var dv *DWDie
-
-	var dt *DWDie
-	switch t {
-	default:
-		return
-
-	case 'd', 'b', 'D', 'B':
-		dv = newdie(&dwglobals, DW_ABRV_VARIABLE, s)
-		newabslocexprattr(dv, v, sym)
-		if ver == 0 {
-			newattr(dv, DW_AT_external, DW_CLS_FLAG, 1, 0)
-		}
-		fallthrough
-
-	case 'a', 'p':
-		dt = defgotype(gotype)
-	}
-
-	if dv != nil {
-		newrefattr(dv, DW_AT_type, dt)
-	}
-}
-
-func movetomodule(parent *DWDie) {
-	die := dwroot.child.child
-	for die.link != nil {
-		die = die.link
-	}
-	die.link = parent.child
-}
-
-// If the pcln table contains runtime/runtime.go, use that to set gdbscript path.
-func finddebugruntimepath(s *LSym) {
-	if gdbscript != "" {
-		return
-	}
-
-	var f *LSym
-	var p string
-	for i := 0; i < s.Pcln.Nfile; i++ {
-		f = s.Pcln.File[i]
-		_ = p
-		if i := strings.Index(f.Name, "runtime/runtime.go"); i >= 0 {
-			gdbscript = f.Name[:i] + "runtime/runtime-gdb.py"
-			break
-		}
-	}
-}
-
-/*
- * Generate short opcodes when possible, long ones when necessary.
- * See section 6.2.5
- */
-const (
-	LINE_BASE   = -1
-	LINE_RANGE  = 4
-	OPCODE_BASE = 10
-)
-
-func putpclcdelta(delta_pc int64, delta_lc int64) {
-	if LINE_BASE <= delta_lc && delta_lc < LINE_BASE+LINE_RANGE {
-		var opcode int64 = OPCODE_BASE + (delta_lc - LINE_BASE) + (LINE_RANGE * delta_pc)
-		if OPCODE_BASE <= opcode && opcode < 256 {
-			Cput(uint8(opcode))
-			return
-		}
-	}
-
-	if delta_pc != 0 {
-		Cput(DW_LNS_advance_pc)
-		sleb128put(delta_pc)
-	}
-
-	Cput(DW_LNS_advance_line)
-	sleb128put(delta_lc)
-	Cput(DW_LNS_copy)
-}
-
-func newcfaoffsetattr(die *DWDie, offs int32) {
-	var block [20]byte
-
-	i := 0
-
-	block[i] = DW_OP_call_frame_cfa
-	i++
-	if offs != 0 {
-		block[i] = DW_OP_consts
-		i++
-		i += sleb128enc(int64(offs), block[i:])
-		block[i] = DW_OP_plus
-		i++
-	}
-
-	newattr(die, DW_AT_location, DW_CLS_BLOCK, int64(i), block[:i])
-}
-
-func mkvarname(name string, da int) string {
-	buf := fmt.Sprintf("%s#%d", name, da)
-	n := buf
-	return n
-}
-
-/*
- * Walk prog table, emit line program and build DIE tree.
- */
-
-// flush previous compilation unit.
-func flushunit(dwinfo *DWDie, pc int64, pcsym *LSym, unitstart int64, header_length int32) {
-	if dwinfo != nil && pc != 0 {
-		newattr(dwinfo, DW_AT_high_pc, DW_CLS_ADDRESS, pc+1, pcsym)
-	}
-
-	if unitstart >= 0 {
-		Cput(0) // start extended opcode
-		uleb128put(1)
-		Cput(DW_LNE_end_sequence)
-
-		here := Cpos()
-		Cseek(unitstart)
-		Thearch.Lput(uint32(here - unitstart - 4)) // unit_length
-		Thearch.Wput(2)                            // dwarf version
-		Thearch.Lput(uint32(header_length))        // header length starting here
-		Cseek(here)
-	}
-}
-
-func getCompilationDir() string {
-	if dir, err := os.Getwd(); err == nil {
-		return dir
-	}
-	return "/"
-}
-
-func writelines() {
-	if linesec == nil {
-		linesec = Linklookup(Ctxt, ".dwarfline", 0)
-	}
-	linesec.R = linesec.R[:0]
-
-	unitstart := int64(-1)
-	headerend := int64(-1)
-	epc := int64(0)
-	var epcs *LSym
-	lineo = Cpos()
-	var dwinfo *DWDie
-
-	flushunit(dwinfo, epc, epcs, unitstart, int32(headerend-unitstart-10))
-	unitstart = Cpos()
-
-	lang := DW_LANG_Go
-
-	s := Ctxt.Textp
-
-	dwinfo = newdie(&dwroot, DW_ABRV_COMPUNIT, "go")
-	newattr(dwinfo, DW_AT_language, DW_CLS_CONSTANT, int64(lang), 0)
-	newattr(dwinfo, DW_AT_stmt_list, DW_CLS_PTR, unitstart-lineo, 0)
-	newattr(dwinfo, DW_AT_low_pc, DW_CLS_ADDRESS, s.Value, s)
-	// OS X linker requires compilation dir or absolute path in comp unit name to output debug info.
-	compDir := getCompilationDir()
-	newattr(dwinfo, DW_AT_comp_dir, DW_CLS_STRING, int64(len(compDir)), compDir)
-
-	// Write .debug_line Line Number Program Header (sec 6.2.4)
-	// Fields marked with (*) must be changed for 64-bit dwarf
-	Thearch.Lput(0) // unit_length (*), will be filled in by flushunit.
-	Thearch.Wput(2) // dwarf version (appendix F)
-	Thearch.Lput(0) // header_length (*), filled in by flushunit.
-
-	// cpos == unitstart + 4 + 2 + 4
-	Cput(1)                // minimum_instruction_length
-	Cput(1)                // default_is_stmt
-	Cput(LINE_BASE & 0xFF) // line_base
-	Cput(LINE_RANGE)       // line_range
-	Cput(OPCODE_BASE)      // opcode_base
-	Cput(0)                // standard_opcode_lengths[1]
-	Cput(1)                // standard_opcode_lengths[2]
-	Cput(1)                // standard_opcode_lengths[3]
-	Cput(1)                // standard_opcode_lengths[4]
-	Cput(1)                // standard_opcode_lengths[5]
-	Cput(0)                // standard_opcode_lengths[6]
-	Cput(0)                // standard_opcode_lengths[7]
-	Cput(0)                // standard_opcode_lengths[8]
-	Cput(1)                // standard_opcode_lengths[9]
-	Cput(0)                // include_directories  (empty)
-
-	files := make([]*LSym, Ctxt.Nhistfile)
-
-	for f := Ctxt.Filesyms; f != nil; f = f.Next {
-		files[f.Value-1] = f
-	}
-
-	for i := 0; int32(i) < Ctxt.Nhistfile; i++ {
-		strnput(files[i].Name, len(files[i].Name)+4)
-	}
-
-	// 4 zeros: the string termination + 3 fields.
-	Cput(0)
-	// terminate file_names.
-	headerend = Cpos()
-
-	Cput(0) // start extended opcode
-	uleb128put(1 + int64(Thearch.Ptrsize))
-	Cput(DW_LNE_set_address)
-
-	pc := s.Value
-	line := 1
-	file := 1
-	if Linkmode == LinkExternal {
-		adddwarfrel(linesec, s, lineo, Thearch.Ptrsize, 0)
-	} else {
-		addrput(pc)
-	}
-
-	var a *Auto
-	var da int
-	var dt int
-	var dwfunc *DWDie
-	var dws **DWDie
-	var dwvar *DWDie
-	var n string
-	var nn string
-	var offs int64
-	var pcfile Pciter
-	var pcline Pciter
-	var varhash [HASHSIZE]*DWDie
-	for Ctxt.Cursym = Ctxt.Textp; Ctxt.Cursym != nil; Ctxt.Cursym = Ctxt.Cursym.Next {
-		s = Ctxt.Cursym
-
-		dwfunc = newdie(dwinfo, DW_ABRV_FUNCTION, s.Name)
-		newattr(dwfunc, DW_AT_low_pc, DW_CLS_ADDRESS, s.Value, s)
-		epc = s.Value + s.Size
-		epcs = s
-		newattr(dwfunc, DW_AT_high_pc, DW_CLS_ADDRESS, epc, s)
-		if s.Version == 0 {
-			newattr(dwfunc, DW_AT_external, DW_CLS_FLAG, 1, 0)
-		}
-
-		if s.Pcln == nil {
-			continue
-		}
-
-		finddebugruntimepath(s)
-
-		pciterinit(Ctxt, &pcfile, &s.Pcln.Pcfile)
-		pciterinit(Ctxt, &pcline, &s.Pcln.Pcline)
-		epc = pc
-		for pcfile.done == 0 && pcline.done == 0 {
-			if epc-s.Value >= int64(pcfile.nextpc) {
-				pciternext(&pcfile)
-				continue
-			}
-
-			if epc-s.Value >= int64(pcline.nextpc) {
-				pciternext(&pcline)
-				continue
-			}
-
-			if int32(file) != pcfile.value {
-				Cput(DW_LNS_set_file)
-				uleb128put(int64(pcfile.value))
-				file = int(pcfile.value)
-			}
-
-			putpclcdelta(s.Value+int64(pcline.pc)-pc, int64(pcline.value)-int64(line))
-
-			pc = s.Value + int64(pcline.pc)
-			line = int(pcline.value)
-			if pcfile.nextpc < pcline.nextpc {
-				epc = int64(pcfile.nextpc)
-			} else {
-				epc = int64(pcline.nextpc)
-			}
-			epc += s.Value
-		}
-
-		da = 0
-		dwfunc.hash = varhash[:] // enable indexing of children by name
-		varhash = [HASHSIZE]*DWDie{}
-		for a = s.Autom; a != nil; a = a.Link {
-			switch a.Name {
-			case obj.A_AUTO:
-				dt = DW_ABRV_AUTO
-				offs = int64(a.Aoffset)
-				if !haslinkregister() {
-					offs -= int64(Thearch.Ptrsize)
-				}
-
-			case obj.A_PARAM:
-				dt = DW_ABRV_PARAM
-				offs = int64(a.Aoffset)
-				if haslinkregister() {
-					offs += int64(Thearch.Ptrsize)
-				}
-
-			default:
-				continue
-			}
-
-			if strings.Contains(a.Asym.Name, ".autotmp_") {
-				continue
-			}
-			if find(dwfunc, a.Asym.Name) != nil {
-				n = mkvarname(a.Asym.Name, da)
-			} else {
-				n = a.Asym.Name
-			}
-
-			// Drop the package prefix from locals and arguments.
-			_ = nn
-			if i := strings.LastIndex(n, "."); i >= 0 {
-				n = n[i+1:]
-			}
-
-			dwvar = newdie(dwfunc, dt, n)
-			newcfaoffsetattr(dwvar, int32(offs))
-			newrefattr(dwvar, DW_AT_type, defgotype(a.Gotype))
-
-			// push dwvar down dwfunc->child to preserve order
-			newattr(dwvar, DW_AT_internal_location, DW_CLS_CONSTANT, offs, nil)
-
-			dwfunc.child = dwvar.link // take dwvar out from the top of the list
-			for dws = &dwfunc.child; *dws != nil; dws = &(*dws).link {
-				if offs > getattr(*dws, DW_AT_internal_location).value {
-					break
-				}
-			}
-			dwvar.link = *dws
-			*dws = dwvar
-
-			da++
-		}
-
-		dwfunc.hash = nil
-	}
-
-	flushunit(dwinfo, epc, epcs, unitstart, int32(headerend-unitstart-10))
-	linesize = Cpos() - lineo
-}
-
-/*
- *  Emit .debug_frame
- */
-const (
-	CIERESERVE          = 16
-	DATAALIGNMENTFACTOR = -4
-)
-
-func putpccfadelta(deltapc int64, cfa int64) {
-	Cput(DW_CFA_def_cfa_offset_sf)
-	sleb128put(cfa / DATAALIGNMENTFACTOR)
-
-	if deltapc < 0x40 {
-		Cput(uint8(DW_CFA_advance_loc + deltapc))
-	} else if deltapc < 0x100 {
-		Cput(DW_CFA_advance_loc1)
-		Cput(uint8(deltapc))
-	} else if deltapc < 0x10000 {
-		Cput(DW_CFA_advance_loc2)
-		Thearch.Wput(uint16(deltapc))
-	} else {
-		Cput(DW_CFA_advance_loc4)
-		Thearch.Lput(uint32(deltapc))
-	}
-}
-
-func writeframes() {
-	if framesec == nil {
-		framesec = Linklookup(Ctxt, ".dwarfframe", 0)
-	}
-	framesec.R = framesec.R[:0]
-	frameo = Cpos()
-
-	// Emit the CIE, Section 6.4.1
-	Thearch.Lput(CIERESERVE)              // initial length, must be multiple of thearch.ptrsize
-	Thearch.Lput(0xffffffff)              // cid.
-	Cput(3)                               // dwarf version (appendix F)
-	Cput(0)                               // augmentation ""
-	uleb128put(1)                         // code_alignment_factor
-	sleb128put(DATAALIGNMENTFACTOR)       // guess
-	uleb128put(int64(Thearch.Dwarfreglr)) // return_address_register
-
-	Cput(DW_CFA_def_cfa)
-
-	uleb128put(int64(Thearch.Dwarfregsp)) // register SP (**ABI-dependent, defined in l.h)
-	if haslinkregister() {
-		uleb128put(int64(0)) // offset
-	} else {
-		uleb128put(int64(Thearch.Ptrsize)) // offset
-	}
-
-	Cput(DW_CFA_offset_extended)
-	uleb128put(int64(Thearch.Dwarfreglr)) // return address
-	if haslinkregister() {
-		uleb128put(int64(0) / DATAALIGNMENTFACTOR) // at cfa - 0
-	} else {
-		uleb128put(int64(-Thearch.Ptrsize) / DATAALIGNMENTFACTOR) // at cfa - x*4
-	}
-
-	// 4 is to exclude the length field.
-	pad := CIERESERVE + frameo + 4 - Cpos()
-
-	if pad < 0 {
-		Exitf("dwarf: CIERESERVE too small by %d bytes.", -pad)
-	}
-
-	strnput("", int(pad))
-
-	var fdeo int64
-	var fdesize int64
-	var nextpc uint32
-	var pcsp Pciter
-	var s *LSym
-	for Ctxt.Cursym = Ctxt.Textp; Ctxt.Cursym != nil; Ctxt.Cursym = Ctxt.Cursym.Next {
-		s = Ctxt.Cursym
-		if s.Pcln == nil {
-			continue
-		}
-
-		fdeo = Cpos()
-
-		// Emit a FDE, Section 6.4.1, starting wit a placeholder.
-		Thearch.Lput(0) // length, must be multiple of thearch.ptrsize
-		Thearch.Lput(0) // Pointer to the CIE above, at offset 0
-		addrput(0)      // initial location
-		addrput(0)      // address range
-
-		for pciterinit(Ctxt, &pcsp, &s.Pcln.Pcsp); pcsp.done == 0; pciternext(&pcsp) {
-			nextpc = pcsp.nextpc
-
-			// pciterinit goes up to the end of the function,
-			// but DWARF expects us to stop just before the end.
-			if int64(nextpc) == s.Size {
-				nextpc--
-				if nextpc < pcsp.pc {
-					continue
-				}
-			}
-
-			if haslinkregister() {
-				putpccfadelta(int64(nextpc)-int64(pcsp.pc), int64(pcsp.value))
-			} else {
-				putpccfadelta(int64(nextpc)-int64(pcsp.pc), int64(Thearch.Ptrsize)+int64(pcsp.value))
-			}
-		}
-
-		fdesize = Cpos() - fdeo - 4 // exclude the length field.
-		pad = Rnd(fdesize, int64(Thearch.Ptrsize)) - fdesize
-		strnput("", int(pad))
-		fdesize += pad
-
-		// Emit the FDE header for real, Section 6.4.1.
-		Cseek(fdeo)
-
-		Thearch.Lput(uint32(fdesize))
-		if Linkmode == LinkExternal {
-			adddwarfrel(framesec, framesym, frameo, 4, 0)
-			adddwarfrel(framesec, s, frameo, Thearch.Ptrsize, 0)
-		} else {
-			Thearch.Lput(0)
-			addrput(s.Value)
-		}
-
-		addrput(s.Size)
-		Cseek(fdeo + 4 + fdesize)
-	}
-
-	Cflush()
-	framesize = Cpos() - frameo
-}
-
-/*
- *  Walk DWarfDebugInfoEntries, and emit .debug_info
- */
-const (
-	COMPUNITHEADERSIZE = 4 + 2 + 4 + 1
-)
-
-func writeinfo() {
-	fwdcount = 0
-	if infosec == nil {
-		infosec = Linklookup(Ctxt, ".dwarfinfo", 0)
-	}
-	infosec.R = infosec.R[:0]
-
-	if arangessec == nil {
-		arangessec = Linklookup(Ctxt, ".dwarfaranges", 0)
-	}
-	arangessec.R = arangessec.R[:0]
-
-	var here int64
-	var unitstart int64
-	for compunit := dwroot.child; compunit != nil; compunit = compunit.link {
-		unitstart = Cpos()
-
-		// Write .debug_info Compilation Unit Header (sec 7.5.1)
-		// Fields marked with (*) must be changed for 64-bit dwarf
-		// This must match COMPUNITHEADERSIZE above.
-		Thearch.Lput(0) // unit_length (*), will be filled in later.
-		Thearch.Wput(2) // dwarf version (appendix F)
-
-		// debug_abbrev_offset (*)
-		if Linkmode == LinkExternal {
-			adddwarfrel(infosec, abbrevsym, infoo, 4, 0)
-		} else {
-			Thearch.Lput(0)
-		}
-
-		Cput(uint8(Thearch.Ptrsize)) // address_size
-
-		putdie(compunit)
-
-		here = Cpos()
-		Cseek(unitstart)
-		Thearch.Lput(uint32(here - unitstart - 4)) // exclude the length field.
-		Cseek(here)
-	}
-
-	Cflush()
-}
-
-/*
- *  Emit .debug_pubnames/_types.  _info must have been written before,
- *  because we need die->offs and infoo/infosize;
- */
-func ispubname(die *DWDie) bool {
-	switch die.abbrev {
-	case DW_ABRV_FUNCTION, DW_ABRV_VARIABLE:
-		a := getattr(die, DW_AT_external)
-		return a != nil && a.value != 0
-	}
-
-	return false
-}
-
-func ispubtype(die *DWDie) bool {
-	return die.abbrev >= DW_ABRV_NULLTYPE
-}
-
-func writepub(ispub func(*DWDie) bool) int64 {
-	var die *DWDie
-	var dwa *DWAttr
-	var unitstart int64
-	var unitend int64
-	var here int64
-
-	sectionstart := Cpos()
-
-	for compunit := dwroot.child; compunit != nil; compunit = compunit.link {
-		unitstart = compunit.offs - COMPUNITHEADERSIZE
-		if compunit.link != nil {
-			unitend = compunit.link.offs - COMPUNITHEADERSIZE
-		} else {
-			unitend = infoo + infosize
-		}
-
-		// Write .debug_pubnames/types	Header (sec 6.1.1)
-		Thearch.Lput(0)                           // unit_length (*), will be filled in later.
-		Thearch.Wput(2)                           // dwarf version (appendix F)
-		Thearch.Lput(uint32(unitstart))           // debug_info_offset (of the Comp unit Header)
-		Thearch.Lput(uint32(unitend - unitstart)) // debug_info_length
-
-		for die = compunit.child; die != nil; die = die.link {
-			if !ispub(die) {
-				continue
-			}
-			Thearch.Lput(uint32(die.offs - unitstart))
-			dwa = getattr(die, DW_AT_name)
-			strnput(dwa.data.(string), int(dwa.value+1))
-		}
-
-		Thearch.Lput(0)
-
-		here = Cpos()
-		Cseek(sectionstart)
-		Thearch.Lput(uint32(here - sectionstart - 4)) // exclude the length field.
-		Cseek(here)
-	}
-
-	return sectionstart
-}
-
-/*
- *  emit .debug_aranges.  _info must have been written before,
- *  because we need die->offs of dw_globals.
- */
-func writearanges() int64 {
-	var b *DWAttr
-	var e *DWAttr
-	var value int64
-
-	sectionstart := Cpos()
-	headersize := int(Rnd(4+2+4+1+1, int64(Thearch.Ptrsize))) // don't count unit_length field itself
-
-	for compunit := dwroot.child; compunit != nil; compunit = compunit.link {
-		b = getattr(compunit, DW_AT_low_pc)
-		if b == nil {
-			continue
-		}
-		e = getattr(compunit, DW_AT_high_pc)
-		if e == nil {
-			continue
-		}
-
-		// Write .debug_aranges	 Header + entry	 (sec 6.1.2)
-		Thearch.Lput(uint32(headersize) + 4*uint32(Thearch.Ptrsize) - 4) // unit_length (*)
-		Thearch.Wput(2)                                                  // dwarf version (appendix F)
-
-		value = compunit.offs - COMPUNITHEADERSIZE // debug_info_offset
-		if Linkmode == LinkExternal {
-			adddwarfrel(arangessec, infosym, sectionstart, 4, value)
-		} else {
-			Thearch.Lput(uint32(value))
-		}
-
-		Cput(uint8(Thearch.Ptrsize))        // address_size
-		Cput(0)                             // segment_size
-		strnput("", headersize-(4+2+4+1+1)) // align to thearch.ptrsize
-
-		if Linkmode == LinkExternal {
-			adddwarfrel(arangessec, b.data.(*LSym), sectionstart, Thearch.Ptrsize, b.value-(b.data.(*LSym)).Value)
-		} else {
-			addrput(b.value)
-		}
-
-		addrput(e.value - b.value)
-		addrput(0)
-		addrput(0)
-	}
-
-	Cflush()
-	return sectionstart
-}
-
-func writegdbscript() int64 {
-	sectionstart := Cpos()
-
-	if gdbscript != "" {
-		Cput(1) // magic 1 byte?
-		strnput(gdbscript, len(gdbscript)+1)
-		Cflush()
-	}
-
-	return sectionstart
-}
-
-func align(size int64) {
-	if HEADTYPE == obj.Hwindows { // Only Windows PE need section align.
-		strnput("", int(Rnd(size, PEFILEALIGN)-size))
-	}
-}
-
-func writedwarfreloc(s *LSym) int64 {
-	var i int
-	var r *Reloc
-
-	start := Cpos()
-	for ri := 0; ri < len(s.R); ri++ {
-		r = &s.R[ri]
-		if Iself {
-			i = Thearch.Elfreloc1(r, int64(r.Off))
-		} else if HEADTYPE == obj.Hdarwin {
-			i = Thearch.Machoreloc1(r, int64(r.Off))
-		} else {
-			i = -1
-		}
-		if i < 0 {
-			Diag("unsupported obj reloc %d/%d to %s", r.Type, r.Siz, r.Sym.Name)
-		}
-	}
-
-	return start
-}
-
-func addmachodwarfsect(prev *Section, name string) *Section {
-	sect := addsection(&Segdwarf, name, 04)
-	sect.Extnum = prev.Extnum + 1
-	sym := Linklookup(Ctxt, name, 0)
-	sym.Sect = sect
-	return sect
-}
-
-/*
- * This is the main entry point for generating dwarf.  After emitting
- * the mandatory debug_abbrev section, it calls writelines() to set up
- * the per-compilation unit part of the DIE tree, while simultaneously
- * emitting the debug_line section.  When the final tree contains
- * forward references, it will write the debug_info section in 2
- * passes.
- *
- */
-func Dwarfemitdebugsections() {
-	if Debug['w'] != 0 { // disable dwarf
-		return
-	}
-
-	if Linkmode == LinkExternal {
-		if !Iself && HEADTYPE != obj.Hdarwin {
-			return
-		}
-		if HEADTYPE == obj.Hdarwin {
-			sect := Segdata.Sect
-			// find the last section.
-			for sect.Next != nil {
-				sect = sect.Next
-			}
-			sect = addmachodwarfsect(sect, ".debug_abbrev")
-			sect = addmachodwarfsect(sect, ".debug_line")
-			sect = addmachodwarfsect(sect, ".debug_frame")
-			sect = addmachodwarfsect(sect, ".debug_info")
-
-			infosym = Linklookup(Ctxt, ".debug_info", 0)
-			infosym.Hide = 1
-
-			abbrevsym = Linklookup(Ctxt, ".debug_abbrev", 0)
-			abbrevsym.Hide = 1
-
-			linesym = Linklookup(Ctxt, ".debug_line", 0)
-			linesym.Hide = 1
-
-			framesym = Linklookup(Ctxt, ".debug_frame", 0)
-			framesym.Hide = 1
-		}
-	}
-
-	// For diagnostic messages.
-	newattr(&dwtypes, DW_AT_name, DW_CLS_STRING, int64(len("dwtypes")), "dwtypes")
-
-	mkindex(&dwroot)
-	mkindex(&dwtypes)
-	mkindex(&dwglobals)
-
-	// Some types that must exist to define other ones.
-	newdie(&dwtypes, DW_ABRV_NULLTYPE, "<unspecified>")
-
-	newdie(&dwtypes, DW_ABRV_NULLTYPE, "void")
-	newdie(&dwtypes, DW_ABRV_BARE_PTRTYPE, "unsafe.Pointer")
-
-	die := newdie(&dwtypes, DW_ABRV_BASETYPE, "uintptr") // needed for array size
-	newattr(die, DW_AT_encoding, DW_CLS_CONSTANT, DW_ATE_unsigned, 0)
-	newattr(die, DW_AT_byte_size, DW_CLS_CONSTANT, int64(Thearch.Ptrsize), 0)
-	newattr(die, DW_AT_go_kind, DW_CLS_CONSTANT, obj.KindUintptr, 0)
-
-	// Needed by the prettyprinter code for interface inspection.
-	defgotype(lookup_or_diag("type.runtime._type"))
-
-	defgotype(lookup_or_diag("type.runtime.interfacetype"))
-	defgotype(lookup_or_diag("type.runtime.itab"))
-
-	genasmsym(defdwsymb)
-
-	writeabbrev()
-	align(abbrevsize)
-	writelines()
-	align(linesize)
-	writeframes()
-	align(framesize)
-
-	synthesizestringtypes(dwtypes.child)
-	synthesizeslicetypes(dwtypes.child)
-	synthesizemaptypes(dwtypes.child)
-	synthesizechantypes(dwtypes.child)
-
-	reversetree(&dwroot.child)
-	reversetree(&dwtypes.child)
-	reversetree(&dwglobals.child)
-
-	movetomodule(&dwtypes)
-	movetomodule(&dwglobals)
-
-	infoo = Cpos()
-	writeinfo()
-	infoe := Cpos()
-	pubnameso = infoe
-	pubtypeso = infoe
-	arangeso = infoe
-	gdbscripto = infoe
-
-	if fwdcount > 0 {
-		if Debug['v'] != 0 {
-			fmt.Fprintf(&Bso, "%5.2f dwarf pass 2.\n", obj.Cputime())
-		}
-		Cseek(infoo)
-		writeinfo()
-		if fwdcount > 0 {
-			Exitf("dwarf: unresolved references after first dwarf info pass")
-		}
-
-		if infoe != Cpos() {
-			Exitf("dwarf: inconsistent second dwarf info pass")
-		}
-	}
-
-	infosize = infoe - infoo
-	align(infosize)
-
-	pubnameso = writepub(ispubname)
-	pubnamessize = Cpos() - pubnameso
-	align(pubnamessize)
-
-	pubtypeso = writepub(ispubtype)
-	pubtypessize = Cpos() - pubtypeso
-	align(pubtypessize)
-
-	arangeso = writearanges()
-	arangessize = Cpos() - arangeso
-	align(arangessize)
-
-	gdbscripto = writegdbscript()
-	gdbscriptsize = Cpos() - gdbscripto
-	align(gdbscriptsize)
-
-	for Cpos()&7 != 0 {
-		Cput(0)
-	}
-	if HEADTYPE != obj.Hdarwin {
-		dwarfemitreloc()
-	}
-}
-
-func dwarfemitreloc() {
-	if Debug['w'] != 0 { // disable dwarf
-		return
-	}
-	inforeloco = writedwarfreloc(infosec)
-	inforelocsize = Cpos() - inforeloco
-	align(inforelocsize)
-
-	arangesreloco = writedwarfreloc(arangessec)
-	arangesrelocsize = Cpos() - arangesreloco
-	align(arangesrelocsize)
-
-	linereloco = writedwarfreloc(linesec)
-	linerelocsize = Cpos() - linereloco
-	align(linerelocsize)
-
-	framereloco = writedwarfreloc(framesec)
-	framerelocsize = Cpos() - framereloco
-	align(framerelocsize)
-}
-
-/*
- *  Elf.
- */
-const (
-	ElfStrDebugAbbrev = iota
-	ElfStrDebugAranges
-	ElfStrDebugFrame
-	ElfStrDebugInfo
-	ElfStrDebugLine
-	ElfStrDebugLoc
-	ElfStrDebugMacinfo
-	ElfStrDebugPubNames
-	ElfStrDebugPubTypes
-	ElfStrDebugRanges
-	ElfStrDebugStr
-	ElfStrGDBScripts
-	ElfStrRelDebugInfo
-	ElfStrRelDebugAranges
-	ElfStrRelDebugLine
-	ElfStrRelDebugFrame
-	NElfStrDbg
-)
-
-var elfstrdbg [NElfStrDbg]int64
-
-func dwarfaddshstrings(shstrtab *LSym) {
-	if Debug['w'] != 0 { // disable dwarf
-		return
-	}
-
-	elfstrdbg[ElfStrDebugAbbrev] = Addstring(shstrtab, ".debug_abbrev")
-	elfstrdbg[ElfStrDebugAranges] = Addstring(shstrtab, ".debug_aranges")
-	elfstrdbg[ElfStrDebugFrame] = Addstring(shstrtab, ".debug_frame")
-	elfstrdbg[ElfStrDebugInfo] = Addstring(shstrtab, ".debug_info")
-	elfstrdbg[ElfStrDebugLine] = Addstring(shstrtab, ".debug_line")
-	elfstrdbg[ElfStrDebugLoc] = Addstring(shstrtab, ".debug_loc")
-	elfstrdbg[ElfStrDebugMacinfo] = Addstring(shstrtab, ".debug_macinfo")
-	elfstrdbg[ElfStrDebugPubNames] = Addstring(shstrtab, ".debug_pubnames")
-	elfstrdbg[ElfStrDebugPubTypes] = Addstring(shstrtab, ".debug_pubtypes")
-	elfstrdbg[ElfStrDebugRanges] = Addstring(shstrtab, ".debug_ranges")
-	elfstrdbg[ElfStrDebugStr] = Addstring(shstrtab, ".debug_str")
-	elfstrdbg[ElfStrGDBScripts] = Addstring(shstrtab, ".debug_gdb_scripts")
-	if Linkmode == LinkExternal {
-		switch Thearch.Thechar {
-		case '6', '7', '9':
-			elfstrdbg[ElfStrRelDebugInfo] = Addstring(shstrtab, ".rela.debug_info")
-			elfstrdbg[ElfStrRelDebugAranges] = Addstring(shstrtab, ".rela.debug_aranges")
-			elfstrdbg[ElfStrRelDebugLine] = Addstring(shstrtab, ".rela.debug_line")
-			elfstrdbg[ElfStrRelDebugFrame] = Addstring(shstrtab, ".rela.debug_frame")
-		default:
-			elfstrdbg[ElfStrRelDebugInfo] = Addstring(shstrtab, ".rel.debug_info")
-			elfstrdbg[ElfStrRelDebugAranges] = Addstring(shstrtab, ".rel.debug_aranges")
-			elfstrdbg[ElfStrRelDebugLine] = Addstring(shstrtab, ".rel.debug_line")
-			elfstrdbg[ElfStrRelDebugFrame] = Addstring(shstrtab, ".rel.debug_frame")
-		}
-
-		infosym = Linklookup(Ctxt, ".debug_info", 0)
-		infosym.Hide = 1
-
-		abbrevsym = Linklookup(Ctxt, ".debug_abbrev", 0)
-		abbrevsym.Hide = 1
-
-		linesym = Linklookup(Ctxt, ".debug_line", 0)
-		linesym.Hide = 1
-
-		framesym = Linklookup(Ctxt, ".debug_frame", 0)
-		framesym.Hide = 1
-	}
-}
-
-// Add section symbols for DWARF debug info.  This is called before
-// dwarfaddelfheaders.
-func dwarfaddelfsectionsyms() {
-	if infosym != nil {
-		infosympos = Cpos()
-		putelfsectionsym(infosym, 0)
-	}
-
-	if abbrevsym != nil {
-		abbrevsympos = Cpos()
-		putelfsectionsym(abbrevsym, 0)
-	}
-
-	if linesym != nil {
-		linesympos = Cpos()
-		putelfsectionsym(linesym, 0)
-	}
-
-	if framesym != nil {
-		framesympos = Cpos()
-		putelfsectionsym(framesym, 0)
-	}
-}
-
-func dwarfaddelfrelocheader(elfstr int, shdata *ElfShdr, off int64, size int64) {
-	sh := newElfShdr(elfstrdbg[elfstr])
-	switch Thearch.Thechar {
-	case '6', '7', '9':
-		sh.type_ = SHT_RELA
-	default:
-		sh.type_ = SHT_REL
-	}
-
-	sh.entsize = uint64(Thearch.Ptrsize) * 2
-	if sh.type_ == SHT_RELA {
-		sh.entsize += uint64(Thearch.Ptrsize)
-	}
-	sh.link = uint32(elfshname(".symtab").shnum)
-	sh.info = uint32(shdata.shnum)
-	sh.off = uint64(off)
-	sh.size = uint64(size)
-	sh.addralign = uint64(Thearch.Ptrsize)
-}
-
-func dwarfaddelfheaders() {
-	if Debug['w'] != 0 { // disable dwarf
-		return
-	}
-
-	sh := newElfShdr(elfstrdbg[ElfStrDebugAbbrev])
-	sh.type_ = SHT_PROGBITS
-	sh.off = uint64(abbrevo)
-	sh.size = uint64(abbrevsize)
-	sh.addralign = 1
-	if abbrevsympos > 0 {
-		putelfsymshndx(abbrevsympos, sh.shnum)
-	}
-
-	sh = newElfShdr(elfstrdbg[ElfStrDebugLine])
-	sh.type_ = SHT_PROGBITS
-	sh.off = uint64(lineo)
-	sh.size = uint64(linesize)
-	sh.addralign = 1
-	if linesympos > 0 {
-		putelfsymshndx(linesympos, sh.shnum)
-	}
-	shline := sh
-
-	sh = newElfShdr(elfstrdbg[ElfStrDebugFrame])
-	sh.type_ = SHT_PROGBITS
-	sh.off = uint64(frameo)
-	sh.size = uint64(framesize)
-	sh.addralign = 1
-	if framesympos > 0 {
-		putelfsymshndx(framesympos, sh.shnum)
-	}
-	shframe := sh
-
-	sh = newElfShdr(elfstrdbg[ElfStrDebugInfo])
-	sh.type_ = SHT_PROGBITS
-	sh.off = uint64(infoo)
-	sh.size = uint64(infosize)
-	sh.addralign = 1
-	if infosympos > 0 {
-		putelfsymshndx(infosympos, sh.shnum)
-	}
-	shinfo := sh
-
-	if pubnamessize > 0 {
-		sh := newElfShdr(elfstrdbg[ElfStrDebugPubNames])
-		sh.type_ = SHT_PROGBITS
-		sh.off = uint64(pubnameso)
-		sh.size = uint64(pubnamessize)
-		sh.addralign = 1
-	}
-
-	if pubtypessize > 0 {
-		sh := newElfShdr(elfstrdbg[ElfStrDebugPubTypes])
-		sh.type_ = SHT_PROGBITS
-		sh.off = uint64(pubtypeso)
-		sh.size = uint64(pubtypessize)
-		sh.addralign = 1
-	}
-
-	var sharanges *ElfShdr
-	if arangessize != 0 {
-		sh := newElfShdr(elfstrdbg[ElfStrDebugAranges])
-		sh.type_ = SHT_PROGBITS
-		sh.off = uint64(arangeso)
-		sh.size = uint64(arangessize)
-		sh.addralign = 1
-		sharanges = sh
-	}
-
-	if gdbscriptsize != 0 {
-		sh := newElfShdr(elfstrdbg[ElfStrGDBScripts])
-		sh.type_ = SHT_PROGBITS
-		sh.off = uint64(gdbscripto)
-		sh.size = uint64(gdbscriptsize)
-		sh.addralign = 1
-	}
-
-	if inforelocsize != 0 {
-		dwarfaddelfrelocheader(ElfStrRelDebugInfo, shinfo, inforeloco, inforelocsize)
-	}
-
-	if arangesrelocsize != 0 {
-		dwarfaddelfrelocheader(ElfStrRelDebugAranges, sharanges, arangesreloco, arangesrelocsize)
-	}
-
-	if linerelocsize != 0 {
-		dwarfaddelfrelocheader(ElfStrRelDebugLine, shline, linereloco, linerelocsize)
-	}
-
-	if framerelocsize != 0 {
-		dwarfaddelfrelocheader(ElfStrRelDebugFrame, shframe, framereloco, framerelocsize)
-	}
-}
-
-/*
- * Macho
- */
-func dwarfaddmachoheaders(ms *MachoSeg) {
-	if Debug['w'] != 0 { // disable dwarf
-		return
-	}
-
-	// Zero vsize segments won't be loaded in memory, even so they
-	// have to be page aligned in the file.
-	fakestart := Rnd(int64(Segdwarf.Fileoff), 0x1000)
-	addr := Segdata.Vaddr + Segdata.Length
-
-	nsect := 4
-	if pubnamessize > 0 {
-		nsect++
-	}
-	if pubtypessize > 0 {
-		nsect++
-	}
-	if arangessize > 0 {
-		nsect++
-	}
-	if gdbscriptsize > 0 {
-		nsect++
-	}
-
-	if Linkmode != LinkExternal {
-		ms = newMachoSeg("__DWARF", nsect)
-		ms.fileoffset = uint64(fakestart)
-		ms.filesize = Segdwarf.Filelen
-		ms.vaddr = addr
-	}
-
-	msect := newMachoSect(ms, "__debug_abbrev", "__DWARF")
-	msect.off = uint32(abbrevo)
-	msect.size = uint64(abbrevsize)
-	msect.addr = addr
-	addr += msect.size
-	msect.flag = 0x02000000
-	if abbrevsym != nil {
-		abbrevsym.Value = int64(msect.addr)
-	}
-
-	msect = newMachoSect(ms, "__debug_line", "__DWARF")
-	msect.off = uint32(lineo)
-	msect.size = uint64(linesize)
-	msect.addr = addr
-	addr += msect.size
-	msect.flag = 0x02000000
-	if linesym != nil {
-		linesym.Value = int64(msect.addr)
-	}
-	if linerelocsize > 0 {
-		msect.nreloc = uint32(len(linesec.R))
-		msect.reloc = uint32(linereloco)
-	}
-
-	msect = newMachoSect(ms, "__debug_frame", "__DWARF")
-	msect.off = uint32(frameo)
-	msect.size = uint64(framesize)
-	msect.addr = addr
-	addr += msect.size
-	msect.flag = 0x02000000
-	if framesym != nil {
-		framesym.Value = int64(msect.addr)
-	}
-	if framerelocsize > 0 {
-		msect.nreloc = uint32(len(framesec.R))
-		msect.reloc = uint32(framereloco)
-	}
-
-	msect = newMachoSect(ms, "__debug_info", "__DWARF")
-	msect.off = uint32(infoo)
-	msect.size = uint64(infosize)
-	msect.addr = addr
-	addr += msect.size
-	msect.flag = 0x02000000
-	if infosym != nil {
-		infosym.Value = int64(msect.addr)
-	}
-	if inforelocsize > 0 {
-		msect.nreloc = uint32(len(infosec.R))
-		msect.reloc = uint32(inforeloco)
-	}
-
-	if pubnamessize > 0 {
-		msect := newMachoSect(ms, "__debug_pubnames", "__DWARF")
-		msect.off = uint32(pubnameso)
-		msect.size = uint64(pubnamessize)
-		msect.addr = addr
-		addr += msect.size
-		msect.flag = 0x02000000
-	}
-
-	if pubtypessize > 0 {
-		msect := newMachoSect(ms, "__debug_pubtypes", "__DWARF")
-		msect.off = uint32(pubtypeso)
-		msect.size = uint64(pubtypessize)
-		msect.addr = addr
-		addr += msect.size
-		msect.flag = 0x02000000
-	}
-
-	if arangessize > 0 {
-		msect := newMachoSect(ms, "__debug_aranges", "__DWARF")
-		msect.off = uint32(arangeso)
-		msect.size = uint64(arangessize)
-		msect.addr = addr
-		addr += msect.size
-		msect.flag = 0x02000000
-		if arangesrelocsize > 0 {
-			msect.nreloc = uint32(len(arangessec.R))
-			msect.reloc = uint32(arangesreloco)
-		}
-	}
-
-	// TODO(lvd) fix gdb/python to load MachO (16 char section name limit)
-	if gdbscriptsize > 0 {
-		msect := newMachoSect(ms, "__debug_gdb_scripts", "__DWARF")
-		msect.off = uint32(gdbscripto)
-		msect.size = uint64(gdbscriptsize)
-		msect.addr = addr
-		addr += msect.size
-		msect.flag = 0x02000000
-	}
-}
-
-/*
- * Windows PE
- */
-func dwarfaddpeheaders() {
-	if Debug['w'] != 0 { // disable dwarf
-		return
-	}
-
-	newPEDWARFSection(".debug_abbrev", abbrevsize)
-	newPEDWARFSection(".debug_line", linesize)
-	newPEDWARFSection(".debug_frame", framesize)
-	newPEDWARFSection(".debug_info", infosize)
-	newPEDWARFSection(".debug_pubnames", pubnamessize)
-	newPEDWARFSection(".debug_pubtypes", pubtypessize)
-	newPEDWARFSection(".debug_aranges", arangessize)
-	newPEDWARFSection(".debug_gdb_scripts", gdbscriptsize)
-}
diff --git a/src/cmd/link/internal/ld/dwarf_defs.go b/src/cmd/link/internal/ld/dwarf_defs.go
deleted file mode 100644
index 61389d9..0000000
--- a/src/cmd/link/internal/ld/dwarf_defs.go
+++ /dev/null
@@ -1,516 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package ld
-
-// TODO/NICETOHAVE:
-//   - eliminate DW_CLS_ if not used
-//   - package info in compilation units
-//   - assign global variables and types to their packages
-//   - gdb uses c syntax, meaning clumsy quoting is needed for go identifiers. eg
-//     ptype struct '[]uint8' and qualifiers need to be quoted away
-//   - lexical scoping is lost, so gdb gets confused as to which 'obj.i' you mean.
-//   - file:line info for variables
-//   - make strings a typedef so prettyprinters can see the underlying string type
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-/*
- * Emit debug_abbrevs, debug_info and debug_line sections to current
- * offset in cout.
- */
-
-/*
- * Add the dwarf section names to the ELF
- * s[ection]h[eader]str[ing]tab.  Prerequisite for
- * dwarfaddelfheaders().
- */
-
-/*
- * Add section headers pointing to the sections emitted in
- * dwarfemitdebugsections.
- */
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Cut, pasted, tr-and-awk'ed from tables in
-// http://dwarfstd.org/doc/Dwarf3.pdf
-
-// Table 18
-const (
-	DW_TAG_array_type               = 0x01
-	DW_TAG_class_type               = 0x02
-	DW_TAG_entry_point              = 0x03
-	DW_TAG_enumeration_type         = 0x04
-	DW_TAG_formal_parameter         = 0x05
-	DW_TAG_imported_declaration     = 0x08
-	DW_TAG_label                    = 0x0a
-	DW_TAG_lexical_block            = 0x0b
-	DW_TAG_member                   = 0x0d
-	DW_TAG_pointer_type             = 0x0f
-	DW_TAG_reference_type           = 0x10
-	DW_TAG_compile_unit             = 0x11
-	DW_TAG_string_type              = 0x12
-	DW_TAG_structure_type           = 0x13
-	DW_TAG_subroutine_type          = 0x15
-	DW_TAG_typedef                  = 0x16
-	DW_TAG_union_type               = 0x17
-	DW_TAG_unspecified_parameters   = 0x18
-	DW_TAG_variant                  = 0x19
-	DW_TAG_common_block             = 0x1a
-	DW_TAG_common_inclusion         = 0x1b
-	DW_TAG_inheritance              = 0x1c
-	DW_TAG_inlined_subroutine       = 0x1d
-	DW_TAG_module                   = 0x1e
-	DW_TAG_ptr_to_member_type       = 0x1f
-	DW_TAG_set_type                 = 0x20
-	DW_TAG_subrange_type            = 0x21
-	DW_TAG_with_stmt                = 0x22
-	DW_TAG_access_declaration       = 0x23
-	DW_TAG_base_type                = 0x24
-	DW_TAG_catch_block              = 0x25
-	DW_TAG_const_type               = 0x26
-	DW_TAG_constant                 = 0x27
-	DW_TAG_enumerator               = 0x28
-	DW_TAG_file_type                = 0x29
-	DW_TAG_friend                   = 0x2a
-	DW_TAG_namelist                 = 0x2b
-	DW_TAG_namelist_item            = 0x2c
-	DW_TAG_packed_type              = 0x2d
-	DW_TAG_subprogram               = 0x2e
-	DW_TAG_template_type_parameter  = 0x2f
-	DW_TAG_template_value_parameter = 0x30
-	DW_TAG_thrown_type              = 0x31
-	DW_TAG_try_block                = 0x32
-	DW_TAG_variant_part             = 0x33
-	DW_TAG_variable                 = 0x34
-	DW_TAG_volatile_type            = 0x35
-	// Dwarf3
-	DW_TAG_dwarf_procedure  = 0x36
-	DW_TAG_restrict_type    = 0x37
-	DW_TAG_interface_type   = 0x38
-	DW_TAG_namespace        = 0x39
-	DW_TAG_imported_module  = 0x3a
-	DW_TAG_unspecified_type = 0x3b
-	DW_TAG_partial_unit     = 0x3c
-	DW_TAG_imported_unit    = 0x3d
-	DW_TAG_condition        = 0x3f
-	DW_TAG_shared_type      = 0x40
-	// Dwarf4
-	DW_TAG_type_unit             = 0x41
-	DW_TAG_rvalue_reference_type = 0x42
-	DW_TAG_template_alias        = 0x43
-
-	// User defined
-	DW_TAG_lo_user = 0x4080
-	DW_TAG_hi_user = 0xffff
-)
-
-// Table 19
-const (
-	DW_CHILDREN_no  = 0x00
-	DW_CHILDREN_yes = 0x01
-)
-
-// Not from the spec, but logicaly belongs here
-const (
-	DW_CLS_ADDRESS = 0x01 + iota
-	DW_CLS_BLOCK
-	DW_CLS_CONSTANT
-	DW_CLS_FLAG
-	DW_CLS_PTR // lineptr, loclistptr, macptr, rangelistptr
-	DW_CLS_REFERENCE
-	DW_CLS_ADDRLOC
-	DW_CLS_STRING
-)
-
-// Table 20
-const (
-	DW_AT_sibling              = 0x01 // reference
-	DW_AT_location             = 0x02 // block, loclistptr
-	DW_AT_name                 = 0x03 // string
-	DW_AT_ordering             = 0x09 // constant
-	DW_AT_byte_size            = 0x0b // block, constant, reference
-	DW_AT_bit_offset           = 0x0c // block, constant, reference
-	DW_AT_bit_size             = 0x0d // block, constant, reference
-	DW_AT_stmt_list            = 0x10 // lineptr
-	DW_AT_low_pc               = 0x11 // address
-	DW_AT_high_pc              = 0x12 // address
-	DW_AT_language             = 0x13 // constant
-	DW_AT_discr                = 0x15 // reference
-	DW_AT_discr_value          = 0x16 // constant
-	DW_AT_visibility           = 0x17 // constant
-	DW_AT_import               = 0x18 // reference
-	DW_AT_string_length        = 0x19 // block, loclistptr
-	DW_AT_common_reference     = 0x1a // reference
-	DW_AT_comp_dir             = 0x1b // string
-	DW_AT_const_value          = 0x1c // block, constant, string
-	DW_AT_containing_type      = 0x1d // reference
-	DW_AT_default_value        = 0x1e // reference
-	DW_AT_inline               = 0x20 // constant
-	DW_AT_is_optional          = 0x21 // flag
-	DW_AT_lower_bound          = 0x22 // block, constant, reference
-	DW_AT_producer             = 0x25 // string
-	DW_AT_prototyped           = 0x27 // flag
-	DW_AT_return_addr          = 0x2a // block, loclistptr
-	DW_AT_start_scope          = 0x2c // constant
-	DW_AT_bit_stride           = 0x2e // constant
-	DW_AT_upper_bound          = 0x2f // block, constant, reference
-	DW_AT_abstract_origin      = 0x31 // reference
-	DW_AT_accessibility        = 0x32 // constant
-	DW_AT_address_class        = 0x33 // constant
-	DW_AT_artificial           = 0x34 // flag
-	DW_AT_base_types           = 0x35 // reference
-	DW_AT_calling_convention   = 0x36 // constant
-	DW_AT_count                = 0x37 // block, constant, reference
-	DW_AT_data_member_location = 0x38 // block, constant, loclistptr
-	DW_AT_decl_column          = 0x39 // constant
-	DW_AT_decl_file            = 0x3a // constant
-	DW_AT_decl_line            = 0x3b // constant
-	DW_AT_declaration          = 0x3c // flag
-	DW_AT_discr_list           = 0x3d // block
-	DW_AT_encoding             = 0x3e // constant
-	DW_AT_external             = 0x3f // flag
-	DW_AT_frame_base           = 0x40 // block, loclistptr
-	DW_AT_friend               = 0x41 // reference
-	DW_AT_identifier_case      = 0x42 // constant
-	DW_AT_macro_info           = 0x43 // macptr
-	DW_AT_namelist_item        = 0x44 // block
-	DW_AT_priority             = 0x45 // reference
-	DW_AT_segment              = 0x46 // block, loclistptr
-	DW_AT_specification        = 0x47 // reference
-	DW_AT_static_link          = 0x48 // block, loclistptr
-	DW_AT_type                 = 0x49 // reference
-	DW_AT_use_location         = 0x4a // block, loclistptr
-	DW_AT_variable_parameter   = 0x4b // flag
-	DW_AT_virtuality           = 0x4c // constant
-	DW_AT_vtable_elem_location = 0x4d // block, loclistptr
-	// Dwarf3
-	DW_AT_allocated      = 0x4e // block, constant, reference
-	DW_AT_associated     = 0x4f // block, constant, reference
-	DW_AT_data_location  = 0x50 // block
-	DW_AT_byte_stride    = 0x51 // block, constant, reference
-	DW_AT_entry_pc       = 0x52 // address
-	DW_AT_use_UTF8       = 0x53 // flag
-	DW_AT_extension      = 0x54 // reference
-	DW_AT_ranges         = 0x55 // rangelistptr
-	DW_AT_trampoline     = 0x56 // address, flag, reference, string
-	DW_AT_call_column    = 0x57 // constant
-	DW_AT_call_file      = 0x58 // constant
-	DW_AT_call_line      = 0x59 // constant
-	DW_AT_description    = 0x5a // string
-	DW_AT_binary_scale   = 0x5b // constant
-	DW_AT_decimal_scale  = 0x5c // constant
-	DW_AT_small          = 0x5d // reference
-	DW_AT_decimal_sign   = 0x5e // constant
-	DW_AT_digit_count    = 0x5f // constant
-	DW_AT_picture_string = 0x60 // string
-	DW_AT_mutable        = 0x61 // flag
-	DW_AT_threads_scaled = 0x62 // flag
-	DW_AT_explicit       = 0x63 // flag
-	DW_AT_object_pointer = 0x64 // reference
-	DW_AT_endianity      = 0x65 // constant
-	DW_AT_elemental      = 0x66 // flag
-	DW_AT_pure           = 0x67 // flag
-	DW_AT_recursive      = 0x68 // flag
-
-	DW_AT_lo_user = 0x2000 // ---
-	DW_AT_hi_user = 0x3fff // ---
-)
-
-// Table 21
-const (
-	DW_FORM_addr      = 0x01 // address
-	DW_FORM_block2    = 0x03 // block
-	DW_FORM_block4    = 0x04 // block
-	DW_FORM_data2     = 0x05 // constant
-	DW_FORM_data4     = 0x06 // constant, lineptr, loclistptr, macptr, rangelistptr
-	DW_FORM_data8     = 0x07 // constant, lineptr, loclistptr, macptr, rangelistptr
-	DW_FORM_string    = 0x08 // string
-	DW_FORM_block     = 0x09 // block
-	DW_FORM_block1    = 0x0a // block
-	DW_FORM_data1     = 0x0b // constant
-	DW_FORM_flag      = 0x0c // flag
-	DW_FORM_sdata     = 0x0d // constant
-	DW_FORM_strp      = 0x0e // string
-	DW_FORM_udata     = 0x0f // constant
-	DW_FORM_ref_addr  = 0x10 // reference
-	DW_FORM_ref1      = 0x11 // reference
-	DW_FORM_ref2      = 0x12 // reference
-	DW_FORM_ref4      = 0x13 // reference
-	DW_FORM_ref8      = 0x14 // reference
-	DW_FORM_ref_udata = 0x15 // reference
-	DW_FORM_indirect  = 0x16 // (see Section 7.5.3)
-)
-
-// Table 24 (#operands, notes)
-const (
-	DW_OP_addr                = 0x03 // 1 constant address (size target specific)
-	DW_OP_deref               = 0x06 // 0
-	DW_OP_const1u             = 0x08 // 1 1-byte constant
-	DW_OP_const1s             = 0x09 // 1 1-byte constant
-	DW_OP_const2u             = 0x0a // 1 2-byte constant
-	DW_OP_const2s             = 0x0b // 1 2-byte constant
-	DW_OP_const4u             = 0x0c // 1 4-byte constant
-	DW_OP_const4s             = 0x0d // 1 4-byte constant
-	DW_OP_const8u             = 0x0e // 1 8-byte constant
-	DW_OP_const8s             = 0x0f // 1 8-byte constant
-	DW_OP_constu              = 0x10 // 1 ULEB128 constant
-	DW_OP_consts              = 0x11 // 1 SLEB128 constant
-	DW_OP_dup                 = 0x12 // 0
-	DW_OP_drop                = 0x13 // 0
-	DW_OP_over                = 0x14 // 0
-	DW_OP_pick                = 0x15 // 1 1-byte stack index
-	DW_OP_swap                = 0x16 // 0
-	DW_OP_rot                 = 0x17 // 0
-	DW_OP_xderef              = 0x18 // 0
-	DW_OP_abs                 = 0x19 // 0
-	DW_OP_and                 = 0x1a // 0
-	DW_OP_div                 = 0x1b // 0
-	DW_OP_minus               = 0x1c // 0
-	DW_OP_mod                 = 0x1d // 0
-	DW_OP_mul                 = 0x1e // 0
-	DW_OP_neg                 = 0x1f // 0
-	DW_OP_not                 = 0x20 // 0
-	DW_OP_or                  = 0x21 // 0
-	DW_OP_plus                = 0x22 // 0
-	DW_OP_plus_uconst         = 0x23 // 1 ULEB128 addend
-	DW_OP_shl                 = 0x24 // 0
-	DW_OP_shr                 = 0x25 // 0
-	DW_OP_shra                = 0x26 // 0
-	DW_OP_xor                 = 0x27 // 0
-	DW_OP_skip                = 0x2f // 1 signed 2-byte constant
-	DW_OP_bra                 = 0x28 // 1 signed 2-byte constant
-	DW_OP_eq                  = 0x29 // 0
-	DW_OP_ge                  = 0x2a // 0
-	DW_OP_gt                  = 0x2b // 0
-	DW_OP_le                  = 0x2c // 0
-	DW_OP_lt                  = 0x2d // 0
-	DW_OP_ne                  = 0x2e // 0
-	DW_OP_lit0                = 0x30 // 0 ...
-	DW_OP_lit31               = 0x4f // 0 literals 0..31 = (DW_OP_lit0 + literal)
-	DW_OP_reg0                = 0x50 // 0 ..
-	DW_OP_reg31               = 0x6f // 0 reg 0..31 = (DW_OP_reg0 + regnum)
-	DW_OP_breg0               = 0x70 // 1 ...
-	DW_OP_breg31              = 0x8f // 1 SLEB128 offset base register 0..31 = (DW_OP_breg0 + regnum)
-	DW_OP_regx                = 0x90 // 1 ULEB128 register
-	DW_OP_fbreg               = 0x91 // 1 SLEB128 offset
-	DW_OP_bregx               = 0x92 // 2 ULEB128 register followed by SLEB128 offset
-	DW_OP_piece               = 0x93 // 1 ULEB128 size of piece addressed
-	DW_OP_deref_size          = 0x94 // 1 1-byte size of data retrieved
-	DW_OP_xderef_size         = 0x95 // 1 1-byte size of data retrieved
-	DW_OP_nop                 = 0x96 // 0
-	DW_OP_push_object_address = 0x97 // 0
-	DW_OP_call2               = 0x98 // 1 2-byte offset of DIE
-	DW_OP_call4               = 0x99 // 1 4-byte offset of DIE
-	DW_OP_call_ref            = 0x9a // 1 4- or 8-byte offset of DIE
-	DW_OP_form_tls_address    = 0x9b // 0
-	DW_OP_call_frame_cfa      = 0x9c // 0
-	DW_OP_bit_piece           = 0x9d // 2
-	DW_OP_lo_user             = 0xe0
-	DW_OP_hi_user             = 0xff
-)
-
-// Table 25
-const (
-	DW_ATE_address         = 0x01
-	DW_ATE_boolean         = 0x02
-	DW_ATE_complex_float   = 0x03
-	DW_ATE_float           = 0x04
-	DW_ATE_signed          = 0x05
-	DW_ATE_signed_char     = 0x06
-	DW_ATE_unsigned        = 0x07
-	DW_ATE_unsigned_char   = 0x08
-	DW_ATE_imaginary_float = 0x09
-	DW_ATE_packed_decimal  = 0x0a
-	DW_ATE_numeric_string  = 0x0b
-	DW_ATE_edited          = 0x0c
-	DW_ATE_signed_fixed    = 0x0d
-	DW_ATE_unsigned_fixed  = 0x0e
-	DW_ATE_decimal_float   = 0x0f
-	DW_ATE_lo_user         = 0x80
-	DW_ATE_hi_user         = 0xff
-)
-
-// Table 26
-const (
-	DW_DS_unsigned           = 0x01
-	DW_DS_leading_overpunch  = 0x02
-	DW_DS_trailing_overpunch = 0x03
-	DW_DS_leading_separate   = 0x04
-	DW_DS_trailing_separate  = 0x05
-)
-
-// Table 27
-const (
-	DW_END_default = 0x00
-	DW_END_big     = 0x01
-	DW_END_little  = 0x02
-	DW_END_lo_user = 0x40
-	DW_END_hi_user = 0xff
-)
-
-// Table 28
-const (
-	DW_ACCESS_public    = 0x01
-	DW_ACCESS_protected = 0x02
-	DW_ACCESS_private   = 0x03
-)
-
-// Table 29
-const (
-	DW_VIS_local     = 0x01
-	DW_VIS_exported  = 0x02
-	DW_VIS_qualified = 0x03
-)
-
-// Table 30
-const (
-	DW_VIRTUALITY_none         = 0x00
-	DW_VIRTUALITY_virtual      = 0x01
-	DW_VIRTUALITY_pure_virtual = 0x02
-)
-
-// Table 31
-const (
-	DW_LANG_C89         = 0x0001
-	DW_LANG_C           = 0x0002
-	DW_LANG_Ada83       = 0x0003
-	DW_LANG_C_plus_plus = 0x0004
-	DW_LANG_Cobol74     = 0x0005
-	DW_LANG_Cobol85     = 0x0006
-	DW_LANG_Fortran77   = 0x0007
-	DW_LANG_Fortran90   = 0x0008
-	DW_LANG_Pascal83    = 0x0009
-	DW_LANG_Modula2     = 0x000a
-	// Dwarf3
-	DW_LANG_Java           = 0x000b
-	DW_LANG_C99            = 0x000c
-	DW_LANG_Ada95          = 0x000d
-	DW_LANG_Fortran95      = 0x000e
-	DW_LANG_PLI            = 0x000f
-	DW_LANG_ObjC           = 0x0010
-	DW_LANG_ObjC_plus_plus = 0x0011
-	DW_LANG_UPC            = 0x0012
-	DW_LANG_D              = 0x0013
-	// Dwarf4
-	DW_LANG_Python = 0x0014
-	// Dwarf5
-	DW_LANG_Go = 0x0016
-
-	DW_LANG_lo_user = 0x8000
-	DW_LANG_hi_user = 0xffff
-)
-
-// Table 32
-const (
-	DW_ID_case_sensitive   = 0x00
-	DW_ID_up_case          = 0x01
-	DW_ID_down_case        = 0x02
-	DW_ID_case_insensitive = 0x03
-)
-
-// Table 33
-const (
-	DW_CC_normal  = 0x01
-	DW_CC_program = 0x02
-	DW_CC_nocall  = 0x03
-	DW_CC_lo_user = 0x40
-	DW_CC_hi_user = 0xff
-)
-
-// Table 34
-const (
-	DW_INL_not_inlined          = 0x00
-	DW_INL_inlined              = 0x01
-	DW_INL_declared_not_inlined = 0x02
-	DW_INL_declared_inlined     = 0x03
-)
-
-// Table 35
-const (
-	DW_ORD_row_major = 0x00
-	DW_ORD_col_major = 0x01
-)
-
-// Table 36
-const (
-	DW_DSC_label = 0x00
-	DW_DSC_range = 0x01
-)
-
-// Table 37
-const (
-	DW_LNS_copy             = 0x01
-	DW_LNS_advance_pc       = 0x02
-	DW_LNS_advance_line     = 0x03
-	DW_LNS_set_file         = 0x04
-	DW_LNS_set_column       = 0x05
-	DW_LNS_negate_stmt      = 0x06
-	DW_LNS_set_basic_block  = 0x07
-	DW_LNS_const_add_pc     = 0x08
-	DW_LNS_fixed_advance_pc = 0x09
-	// Dwarf3
-	DW_LNS_set_prologue_end   = 0x0a
-	DW_LNS_set_epilogue_begin = 0x0b
-	DW_LNS_set_isa            = 0x0c
-)
-
-// Table 38
-const (
-	DW_LNE_end_sequence = 0x01
-	DW_LNE_set_address  = 0x02
-	DW_LNE_define_file  = 0x03
-	DW_LNE_lo_user      = 0x80
-	DW_LNE_hi_user      = 0xff
-)
-
-// Table 39
-const (
-	DW_MACINFO_define     = 0x01
-	DW_MACINFO_undef      = 0x02
-	DW_MACINFO_start_file = 0x03
-	DW_MACINFO_end_file   = 0x04
-	DW_MACINFO_vendor_ext = 0xff
-)
-
-// Table 40.
-const (
-	// operand,...
-	DW_CFA_nop              = 0x00
-	DW_CFA_set_loc          = 0x01 // address
-	DW_CFA_advance_loc1     = 0x02 // 1-byte delta
-	DW_CFA_advance_loc2     = 0x03 // 2-byte delta
-	DW_CFA_advance_loc4     = 0x04 // 4-byte delta
-	DW_CFA_offset_extended  = 0x05 // ULEB128 register, ULEB128 offset
-	DW_CFA_restore_extended = 0x06 // ULEB128 register
-	DW_CFA_undefined        = 0x07 // ULEB128 register
-	DW_CFA_same_value       = 0x08 // ULEB128 register
-	DW_CFA_register         = 0x09 // ULEB128 register, ULEB128 register
-	DW_CFA_remember_state   = 0x0a
-	DW_CFA_restore_state    = 0x0b
-
-	DW_CFA_def_cfa            = 0x0c // ULEB128 register, ULEB128 offset
-	DW_CFA_def_cfa_register   = 0x0d // ULEB128 register
-	DW_CFA_def_cfa_offset     = 0x0e // ULEB128 offset
-	DW_CFA_def_cfa_expression = 0x0f // BLOCK
-	DW_CFA_expression         = 0x10 // ULEB128 register, BLOCK
-	DW_CFA_offset_extended_sf = 0x11 // ULEB128 register, SLEB128 offset
-	DW_CFA_def_cfa_sf         = 0x12 // ULEB128 register, SLEB128 offset
-	DW_CFA_def_cfa_offset_sf  = 0x13 // SLEB128 offset
-	DW_CFA_val_offset         = 0x14 // ULEB128, ULEB128
-	DW_CFA_val_offset_sf      = 0x15 // ULEB128, SLEB128
-	DW_CFA_val_expression     = 0x16 // ULEB128, BLOCK
-
-	DW_CFA_lo_user = 0x1c
-	DW_CFA_hi_user = 0x3f
-
-	// Opcodes that take an addend operand.
-	DW_CFA_advance_loc = 0x1 << 6 // +delta
-	DW_CFA_offset      = 0x2 << 6 // +register (ULEB128 offset)
-	DW_CFA_restore     = 0x3 << 6 // +register
-)
diff --git a/src/cmd/link/internal/ld/elf.go b/src/cmd/link/internal/ld/elf.go
deleted file mode 100644
index 508f055..0000000
--- a/src/cmd/link/internal/ld/elf.go
+++ /dev/null
@@ -1,2595 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package ld
-
-import (
-	"cmd/internal/obj"
-	"crypto/sha1"
-	"encoding/binary"
-	"fmt"
-	"path/filepath"
-	"sort"
-	"strings"
-)
-
-/*
- * Derived from:
- * $FreeBSD: src/sys/sys/elf32.h,v 1.8.14.1 2005/12/30 22:13:58 marcel Exp $
- * $FreeBSD: src/sys/sys/elf64.h,v 1.10.14.1 2005/12/30 22:13:58 marcel Exp $
- * $FreeBSD: src/sys/sys/elf_common.h,v 1.15.8.1 2005/12/30 22:13:58 marcel Exp $
- * $FreeBSD: src/sys/alpha/include/elf.h,v 1.14 2003/09/25 01:10:22 peter Exp $
- * $FreeBSD: src/sys/amd64/include/elf.h,v 1.18 2004/08/03 08:21:48 dfr Exp $
- * $FreeBSD: src/sys/arm/include/elf.h,v 1.5.2.1 2006/06/30 21:42:52 cognet Exp $
- * $FreeBSD: src/sys/i386/include/elf.h,v 1.16 2004/08/02 19:12:17 dfr Exp $
- * $FreeBSD: src/sys/powerpc/include/elf.h,v 1.7 2004/11/02 09:47:01 ssouhlal Exp $
- * $FreeBSD: src/sys/sparc64/include/elf.h,v 1.12 2003/09/25 01:10:26 peter Exp $
- *
- * Copyright (c) 1996-1998 John D. Polstra.  All rights reserved.
- * Copyright (c) 2001 David E. O'Brien
- * Portions Copyright 2009 The Go Authors.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-/*
- * ELF definitions that are independent of architecture or word size.
- */
-
-/*
- * Note header.  The ".note" section contains an array of notes.  Each
- * begins with this header, aligned to a word boundary.  Immediately
- * following the note header is n_namesz bytes of name, padded to the
- * next word boundary.  Then comes n_descsz bytes of descriptor, again
- * padded to a word boundary.  The values of n_namesz and n_descsz do
- * not include the padding.
- */
-type Elf_Note struct {
-	n_namesz uint32
-	n_descsz uint32
-	n_type   uint32
-}
-
-const (
-	EI_MAG0              = 0
-	EI_MAG1              = 1
-	EI_MAG2              = 2
-	EI_MAG3              = 3
-	EI_CLASS             = 4
-	EI_DATA              = 5
-	EI_VERSION           = 6
-	EI_OSABI             = 7
-	EI_ABIVERSION        = 8
-	OLD_EI_BRAND         = 8
-	EI_PAD               = 9
-	EI_NIDENT            = 16
-	ELFMAG0              = 0x7f
-	ELFMAG1              = 'E'
-	ELFMAG2              = 'L'
-	ELFMAG3              = 'F'
-	SELFMAG              = 4
-	EV_NONE              = 0
-	EV_CURRENT           = 1
-	ELFCLASSNONE         = 0
-	ELFCLASS32           = 1
-	ELFCLASS64           = 2
-	ELFDATANONE          = 0
-	ELFDATA2LSB          = 1
-	ELFDATA2MSB          = 2
-	ELFOSABI_NONE        = 0
-	ELFOSABI_HPUX        = 1
-	ELFOSABI_NETBSD      = 2
-	ELFOSABI_LINUX       = 3
-	ELFOSABI_HURD        = 4
-	ELFOSABI_86OPEN      = 5
-	ELFOSABI_SOLARIS     = 6
-	ELFOSABI_AIX         = 7
-	ELFOSABI_IRIX        = 8
-	ELFOSABI_FREEBSD     = 9
-	ELFOSABI_TRU64       = 10
-	ELFOSABI_MODESTO     = 11
-	ELFOSABI_OPENBSD     = 12
-	ELFOSABI_OPENVMS     = 13
-	ELFOSABI_NSK         = 14
-	ELFOSABI_ARM         = 97
-	ELFOSABI_STANDALONE  = 255
-	ELFOSABI_SYSV        = ELFOSABI_NONE
-	ELFOSABI_MONTEREY    = ELFOSABI_AIX
-	ET_NONE              = 0
-	ET_REL               = 1
-	ET_EXEC              = 2
-	ET_DYN               = 3
-	ET_CORE              = 4
-	ET_LOOS              = 0xfe00
-	ET_HIOS              = 0xfeff
-	ET_LOPROC            = 0xff00
-	ET_HIPROC            = 0xffff
-	EM_NONE              = 0
-	EM_M32               = 1
-	EM_SPARC             = 2
-	EM_386               = 3
-	EM_68K               = 4
-	EM_88K               = 5
-	EM_860               = 7
-	EM_MIPS              = 8
-	EM_S370              = 9
-	EM_MIPS_RS3_LE       = 10
-	EM_PARISC            = 15
-	EM_VPP500            = 17
-	EM_SPARC32PLUS       = 18
-	EM_960               = 19
-	EM_PPC               = 20
-	EM_PPC64             = 21
-	EM_S390              = 22
-	EM_V800              = 36
-	EM_FR20              = 37
-	EM_RH32              = 38
-	EM_RCE               = 39
-	EM_ARM               = 40
-	EM_SH                = 42
-	EM_SPARCV9           = 43
-	EM_TRICORE           = 44
-	EM_ARC               = 45
-	EM_H8_300            = 46
-	EM_H8_300H           = 47
-	EM_H8S               = 48
-	EM_H8_500            = 49
-	EM_IA_64             = 50
-	EM_MIPS_X            = 51
-	EM_COLDFIRE          = 52
-	EM_68HC12            = 53
-	EM_MMA               = 54
-	EM_PCP               = 55
-	EM_NCPU              = 56
-	EM_NDR1              = 57
-	EM_STARCORE          = 58
-	EM_ME16              = 59
-	EM_ST100             = 60
-	EM_TINYJ             = 61
-	EM_X86_64            = 62
-	EM_AARCH64           = 183
-	EM_486               = 6
-	EM_MIPS_RS4_BE       = 10
-	EM_ALPHA_STD         = 41
-	EM_ALPHA             = 0x9026
-	SHN_UNDEF            = 0
-	SHN_LORESERVE        = 0xff00
-	SHN_LOPROC           = 0xff00
-	SHN_HIPROC           = 0xff1f
-	SHN_LOOS             = 0xff20
-	SHN_HIOS             = 0xff3f
-	SHN_ABS              = 0xfff1
-	SHN_COMMON           = 0xfff2
-	SHN_XINDEX           = 0xffff
-	SHN_HIRESERVE        = 0xffff
-	SHT_NULL             = 0
-	SHT_PROGBITS         = 1
-	SHT_SYMTAB           = 2
-	SHT_STRTAB           = 3
-	SHT_RELA             = 4
-	SHT_HASH             = 5
-	SHT_DYNAMIC          = 6
-	SHT_NOTE             = 7
-	SHT_NOBITS           = 8
-	SHT_REL              = 9
-	SHT_SHLIB            = 10
-	SHT_DYNSYM           = 11
-	SHT_INIT_ARRAY       = 14
-	SHT_FINI_ARRAY       = 15
-	SHT_PREINIT_ARRAY    = 16
-	SHT_GROUP            = 17
-	SHT_SYMTAB_SHNDX     = 18
-	SHT_LOOS             = 0x60000000
-	SHT_HIOS             = 0x6fffffff
-	SHT_GNU_VERDEF       = 0x6ffffffd
-	SHT_GNU_VERNEED      = 0x6ffffffe
-	SHT_GNU_VERSYM       = 0x6fffffff
-	SHT_LOPROC           = 0x70000000
-	SHT_HIPROC           = 0x7fffffff
-	SHT_LOUSER           = 0x80000000
-	SHT_HIUSER           = 0xffffffff
-	SHF_WRITE            = 0x1
-	SHF_ALLOC            = 0x2
-	SHF_EXECINSTR        = 0x4
-	SHF_MERGE            = 0x10
-	SHF_STRINGS          = 0x20
-	SHF_INFO_LINK        = 0x40
-	SHF_LINK_ORDER       = 0x80
-	SHF_OS_NONCONFORMING = 0x100
-	SHF_GROUP            = 0x200
-	SHF_TLS              = 0x400
-	SHF_MASKOS           = 0x0ff00000
-	SHF_MASKPROC         = 0xf0000000
-	PT_NULL              = 0
-	PT_LOAD              = 1
-	PT_DYNAMIC           = 2
-	PT_INTERP            = 3
-	PT_NOTE              = 4
-	PT_SHLIB             = 5
-	PT_PHDR              = 6
-	PT_TLS               = 7
-	PT_LOOS              = 0x60000000
-	PT_HIOS              = 0x6fffffff
-	PT_LOPROC            = 0x70000000
-	PT_HIPROC            = 0x7fffffff
-	PT_GNU_STACK         = 0x6474e551
-	PT_PAX_FLAGS         = 0x65041580
-	PF_X                 = 0x1
-	PF_W                 = 0x2
-	PF_R                 = 0x4
-	PF_MASKOS            = 0x0ff00000
-	PF_MASKPROC          = 0xf0000000
-	DT_NULL              = 0
-	DT_NEEDED            = 1
-	DT_PLTRELSZ          = 2
-	DT_PLTGOT            = 3
-	DT_HASH              = 4
-	DT_STRTAB            = 5
-	DT_SYMTAB            = 6
-	DT_RELA              = 7
-	DT_RELASZ            = 8
-	DT_RELAENT           = 9
-	DT_STRSZ             = 10
-	DT_SYMENT            = 11
-	DT_INIT              = 12
-	DT_FINI              = 13
-	DT_SONAME            = 14
-	DT_RPATH             = 15
-	DT_SYMBOLIC          = 16
-	DT_REL               = 17
-	DT_RELSZ             = 18
-	DT_RELENT            = 19
-	DT_PLTREL            = 20
-	DT_DEBUG             = 21
-	DT_TEXTREL           = 22
-	DT_JMPREL            = 23
-	DT_BIND_NOW          = 24
-	DT_INIT_ARRAY        = 25
-	DT_FINI_ARRAY        = 26
-	DT_INIT_ARRAYSZ      = 27
-	DT_FINI_ARRAYSZ      = 28
-	DT_RUNPATH           = 29
-	DT_FLAGS             = 30
-	DT_ENCODING          = 32
-	DT_PREINIT_ARRAY     = 32
-	DT_PREINIT_ARRAYSZ   = 33
-	DT_LOOS              = 0x6000000d
-	DT_HIOS              = 0x6ffff000
-	DT_LOPROC            = 0x70000000
-	DT_HIPROC            = 0x7fffffff
-	DT_VERNEED           = 0x6ffffffe
-	DT_VERNEEDNUM        = 0x6fffffff
-	DT_VERSYM            = 0x6ffffff0
-	DT_PPC64_GLINK       = DT_LOPROC + 0
-	DT_PPC64_OPT         = DT_LOPROC + 3
-	DF_ORIGIN            = 0x0001
-	DF_SYMBOLIC          = 0x0002
-	DF_TEXTREL           = 0x0004
-	DF_BIND_NOW          = 0x0008
-	DF_STATIC_TLS        = 0x0010
-	NT_PRSTATUS          = 1
-	NT_FPREGSET          = 2
-	NT_PRPSINFO          = 3
-	STB_LOCAL            = 0
-	STB_GLOBAL           = 1
-	STB_WEAK             = 2
-	STB_LOOS             = 10
-	STB_HIOS             = 12
-	STB_LOPROC           = 13
-	STB_HIPROC           = 15
-	STT_NOTYPE           = 0
-	STT_OBJECT           = 1
-	STT_FUNC             = 2
-	STT_SECTION          = 3
-	STT_FILE             = 4
-	STT_COMMON           = 5
-	STT_TLS              = 6
-	STT_LOOS             = 10
-	STT_HIOS             = 12
-	STT_LOPROC           = 13
-	STT_HIPROC           = 15
-	STV_DEFAULT          = 0x0
-	STV_INTERNAL         = 0x1
-	STV_HIDDEN           = 0x2
-	STV_PROTECTED        = 0x3
-	STN_UNDEF            = 0
-)
-
-/* For accessing the fields of r_info. */
-
-/* For constructing r_info from field values. */
-
-/*
- * Relocation types.
- */
-const (
-	R_X86_64_NONE              = 0
-	R_X86_64_64                = 1
-	R_X86_64_PC32              = 2
-	R_X86_64_GOT32             = 3
-	R_X86_64_PLT32             = 4
-	R_X86_64_COPY              = 5
-	R_X86_64_GLOB_DAT          = 6
-	R_X86_64_JMP_SLOT          = 7
-	R_X86_64_RELATIVE          = 8
-	R_X86_64_GOTPCREL          = 9
-	R_X86_64_32                = 10
-	R_X86_64_32S               = 11
-	R_X86_64_16                = 12
-	R_X86_64_PC16              = 13
-	R_X86_64_8                 = 14
-	R_X86_64_PC8               = 15
-	R_X86_64_DTPMOD64          = 16
-	R_X86_64_DTPOFF64          = 17
-	R_X86_64_TPOFF64           = 18
-	R_X86_64_TLSGD             = 19
-	R_X86_64_TLSLD             = 20
-	R_X86_64_DTPOFF32          = 21
-	R_X86_64_GOTTPOFF          = 22
-	R_X86_64_TPOFF32           = 23
-	R_X86_64_COUNT             = 24
-	R_AARCH64_ABS64            = 257
-	R_AARCH64_ABS32            = 258
-	R_AARCH64_CALL26           = 283
-	R_AARCH64_ADR_PREL_PG_HI21 = 275
-	R_AARCH64_ADD_ABS_LO12_NC  = 277
-	R_ALPHA_NONE               = 0
-	R_ALPHA_REFLONG            = 1
-	R_ALPHA_REFQUAD            = 2
-	R_ALPHA_GPREL32            = 3
-	R_ALPHA_LITERAL            = 4
-	R_ALPHA_LITUSE             = 5
-	R_ALPHA_GPDISP             = 6
-	R_ALPHA_BRADDR             = 7
-	R_ALPHA_HINT               = 8
-	R_ALPHA_SREL16             = 9
-	R_ALPHA_SREL32             = 10
-	R_ALPHA_SREL64             = 11
-	R_ALPHA_OP_PUSH            = 12
-	R_ALPHA_OP_STORE           = 13
-	R_ALPHA_OP_PSUB            = 14
-	R_ALPHA_OP_PRSHIFT         = 15
-	R_ALPHA_GPVALUE            = 16
-	R_ALPHA_GPRELHIGH          = 17
-	R_ALPHA_GPRELLOW           = 18
-	R_ALPHA_IMMED_GP_16        = 19
-	R_ALPHA_IMMED_GP_HI32      = 20
-	R_ALPHA_IMMED_SCN_HI32     = 21
-	R_ALPHA_IMMED_BR_HI32      = 22
-	R_ALPHA_IMMED_LO32         = 23
-	R_ALPHA_COPY               = 24
-	R_ALPHA_GLOB_DAT           = 25
-	R_ALPHA_JMP_SLOT           = 26
-	R_ALPHA_RELATIVE           = 27
-	R_ALPHA_COUNT              = 28
-	R_ARM_NONE                 = 0
-	R_ARM_PC24                 = 1
-	R_ARM_ABS32                = 2
-	R_ARM_REL32                = 3
-	R_ARM_PC13                 = 4
-	R_ARM_ABS16                = 5
-	R_ARM_ABS12                = 6
-	R_ARM_THM_ABS5             = 7
-	R_ARM_ABS8                 = 8
-	R_ARM_SBREL32              = 9
-	R_ARM_THM_PC22             = 10
-	R_ARM_THM_PC8              = 11
-	R_ARM_AMP_VCALL9           = 12
-	R_ARM_SWI24                = 13
-	R_ARM_THM_SWI8             = 14
-	R_ARM_XPC25                = 15
-	R_ARM_THM_XPC22            = 16
-	R_ARM_COPY                 = 20
-	R_ARM_GLOB_DAT             = 21
-	R_ARM_JUMP_SLOT            = 22
-	R_ARM_RELATIVE             = 23
-	R_ARM_GOTOFF               = 24
-	R_ARM_GOTPC                = 25
-	R_ARM_GOT32                = 26
-	R_ARM_PLT32                = 27
-	R_ARM_CALL                 = 28
-	R_ARM_JUMP24               = 29
-	R_ARM_V4BX                 = 40
-	R_ARM_GOT_PREL             = 96
-	R_ARM_GNU_VTENTRY          = 100
-	R_ARM_GNU_VTINHERIT        = 101
-	R_ARM_TLS_IE32             = 107
-	R_ARM_TLS_LE32             = 108
-	R_ARM_RSBREL32             = 250
-	R_ARM_THM_RPC22            = 251
-	R_ARM_RREL32               = 252
-	R_ARM_RABS32               = 253
-	R_ARM_RPC24                = 254
-	R_ARM_RBASE                = 255
-	R_ARM_COUNT                = 38
-	R_386_NONE                 = 0
-	R_386_32                   = 1
-	R_386_PC32                 = 2
-	R_386_GOT32                = 3
-	R_386_PLT32                = 4
-	R_386_COPY                 = 5
-	R_386_GLOB_DAT             = 6
-	R_386_JMP_SLOT             = 7
-	R_386_RELATIVE             = 8
-	R_386_GOTOFF               = 9
-	R_386_GOTPC                = 10
-	R_386_TLS_TPOFF            = 14
-	R_386_TLS_IE               = 15
-	R_386_TLS_GOTIE            = 16
-	R_386_TLS_LE               = 17
-	R_386_TLS_GD               = 18
-	R_386_TLS_LDM              = 19
-	R_386_TLS_GD_32            = 24
-	R_386_TLS_GD_PUSH          = 25
-	R_386_TLS_GD_CALL          = 26
-	R_386_TLS_GD_POP           = 27
-	R_386_TLS_LDM_32           = 28
-	R_386_TLS_LDM_PUSH         = 29
-	R_386_TLS_LDM_CALL         = 30
-	R_386_TLS_LDM_POP          = 31
-	R_386_TLS_LDO_32           = 32
-	R_386_TLS_IE_32            = 33
-	R_386_TLS_LE_32            = 34
-	R_386_TLS_DTPMOD32         = 35
-	R_386_TLS_DTPOFF32         = 36
-	R_386_TLS_TPOFF32          = 37
-	R_386_COUNT                = 38
-	R_PPC_NONE                 = 0
-	R_PPC_ADDR32               = 1
-	R_PPC_ADDR24               = 2
-	R_PPC_ADDR16               = 3
-	R_PPC_ADDR16_LO            = 4
-	R_PPC_ADDR16_HI            = 5
-	R_PPC_ADDR16_HA            = 6
-	R_PPC_ADDR14               = 7
-	R_PPC_ADDR14_BRTAKEN       = 8
-	R_PPC_ADDR14_BRNTAKEN      = 9
-	R_PPC_REL24                = 10
-	R_PPC_REL14                = 11
-	R_PPC_REL14_BRTAKEN        = 12
-	R_PPC_REL14_BRNTAKEN       = 13
-	R_PPC_GOT16                = 14
-	R_PPC_GOT16_LO             = 15
-	R_PPC_GOT16_HI             = 16
-	R_PPC_GOT16_HA             = 17
-	R_PPC_PLTREL24             = 18
-	R_PPC_COPY                 = 19
-	R_PPC_GLOB_DAT             = 20
-	R_PPC_JMP_SLOT             = 21
-	R_PPC_RELATIVE             = 22
-	R_PPC_LOCAL24PC            = 23
-	R_PPC_UADDR32              = 24
-	R_PPC_UADDR16              = 25
-	R_PPC_REL32                = 26
-	R_PPC_PLT32                = 27
-	R_PPC_PLTREL32             = 28
-	R_PPC_PLT16_LO             = 29
-	R_PPC_PLT16_HI             = 30
-	R_PPC_PLT16_HA             = 31
-	R_PPC_SDAREL16             = 32
-	R_PPC_SECTOFF              = 33
-	R_PPC_SECTOFF_LO           = 34
-	R_PPC_SECTOFF_HI           = 35
-	R_PPC_SECTOFF_HA           = 36
-	R_PPC_COUNT                = 37
-	R_PPC_TLS                  = 67
-	R_PPC_DTPMOD32             = 68
-	R_PPC_TPREL16              = 69
-	R_PPC_TPREL16_LO           = 70
-	R_PPC_TPREL16_HI           = 71
-	R_PPC_TPREL16_HA           = 72
-	R_PPC_TPREL32              = 73
-	R_PPC_DTPREL16             = 74
-	R_PPC_DTPREL16_LO          = 75
-	R_PPC_DTPREL16_HI          = 76
-	R_PPC_DTPREL16_HA          = 77
-	R_PPC_DTPREL32             = 78
-	R_PPC_GOT_TLSGD16          = 79
-	R_PPC_GOT_TLSGD16_LO       = 80
-	R_PPC_GOT_TLSGD16_HI       = 81
-	R_PPC_GOT_TLSGD16_HA       = 82
-	R_PPC_GOT_TLSLD16          = 83
-	R_PPC_GOT_TLSLD16_LO       = 84
-	R_PPC_GOT_TLSLD16_HI       = 85
-	R_PPC_GOT_TLSLD16_HA       = 86
-	R_PPC_GOT_TPREL16          = 87
-	R_PPC_GOT_TPREL16_LO       = 88
-	R_PPC_GOT_TPREL16_HI       = 89
-	R_PPC_GOT_TPREL16_HA       = 90
-	R_PPC_EMB_NADDR32          = 101
-	R_PPC_EMB_NADDR16          = 102
-	R_PPC_EMB_NADDR16_LO       = 103
-	R_PPC_EMB_NADDR16_HI       = 104
-	R_PPC_EMB_NADDR16_HA       = 105
-	R_PPC_EMB_SDAI16           = 106
-	R_PPC_EMB_SDA2I16          = 107
-	R_PPC_EMB_SDA2REL          = 108
-	R_PPC_EMB_SDA21            = 109
-	R_PPC_EMB_MRKREF           = 110
-	R_PPC_EMB_RELSEC16         = 111
-	R_PPC_EMB_RELST_LO         = 112
-	R_PPC_EMB_RELST_HI         = 113
-	R_PPC_EMB_RELST_HA         = 114
-	R_PPC_EMB_BIT_FLD          = 115
-	R_PPC_EMB_RELSDA           = 116
-	R_PPC_EMB_COUNT            = R_PPC_EMB_RELSDA - R_PPC_EMB_NADDR32 + 1
-	R_PPC64_REL24              = R_PPC_REL24
-	R_PPC64_JMP_SLOT           = R_PPC_JMP_SLOT
-	R_PPC64_ADDR64             = 38
-	R_PPC64_TOC16              = 47
-	R_PPC64_TOC16_LO           = 48
-	R_PPC64_TOC16_HI           = 49
-	R_PPC64_TOC16_HA           = 50
-	R_PPC64_TOC16_DS           = 63
-	R_PPC64_TOC16_LO_DS        = 64
-	R_PPC64_REL16_LO           = 250
-	R_PPC64_REL16_HI           = 251
-	R_PPC64_REL16_HA           = 252
-	R_SPARC_NONE               = 0
-	R_SPARC_8                  = 1
-	R_SPARC_16                 = 2
-	R_SPARC_32                 = 3
-	R_SPARC_DISP8              = 4
-	R_SPARC_DISP16             = 5
-	R_SPARC_DISP32             = 6
-	R_SPARC_WDISP30            = 7
-	R_SPARC_WDISP22            = 8
-	R_SPARC_HI22               = 9
-	R_SPARC_22                 = 10
-	R_SPARC_13                 = 11
-	R_SPARC_LO10               = 12
-	R_SPARC_GOT10              = 13
-	R_SPARC_GOT13              = 14
-	R_SPARC_GOT22              = 15
-	R_SPARC_PC10               = 16
-	R_SPARC_PC22               = 17
-	R_SPARC_WPLT30             = 18
-	R_SPARC_COPY               = 19
-	R_SPARC_GLOB_DAT           = 20
-	R_SPARC_JMP_SLOT           = 21
-	R_SPARC_RELATIVE           = 22
-	R_SPARC_UA32               = 23
-	R_SPARC_PLT32              = 24
-	R_SPARC_HIPLT22            = 25
-	R_SPARC_LOPLT10            = 26
-	R_SPARC_PCPLT32            = 27
-	R_SPARC_PCPLT22            = 28
-	R_SPARC_PCPLT10            = 29
-	R_SPARC_10                 = 30
-	R_SPARC_11                 = 31
-	R_SPARC_64                 = 32
-	R_SPARC_OLO10              = 33
-	R_SPARC_HH22               = 34
-	R_SPARC_HM10               = 35
-	R_SPARC_LM22               = 36
-	R_SPARC_PC_HH22            = 37
-	R_SPARC_PC_HM10            = 38
-	R_SPARC_PC_LM22            = 39
-	R_SPARC_WDISP16            = 40
-	R_SPARC_WDISP19            = 41
-	R_SPARC_GLOB_JMP           = 42
-	R_SPARC_7                  = 43
-	R_SPARC_5                  = 44
-	R_SPARC_6                  = 45
-	R_SPARC_DISP64             = 46
-	R_SPARC_PLT64              = 47
-	R_SPARC_HIX22              = 48
-	R_SPARC_LOX10              = 49
-	R_SPARC_H44                = 50
-	R_SPARC_M44                = 51
-	R_SPARC_L44                = 52
-	R_SPARC_REGISTER           = 53
-	R_SPARC_UA64               = 54
-	R_SPARC_UA16               = 55
-	ARM_MAGIC_TRAMP_NUMBER     = 0x5c000003
-)
-
-/*
- * Symbol table entries.
- */
-
-/* For accessing the fields of st_info. */
-
-/* For constructing st_info from field values. */
-
-/* For accessing the fields of st_other. */
-
-/*
- * ELF header.
- */
-type ElfEhdr struct {
-	ident     [EI_NIDENT]uint8
-	type_     uint16
-	machine   uint16
-	version   uint32
-	entry     uint64
-	phoff     uint64
-	shoff     uint64
-	flags     uint32
-	ehsize    uint16
-	phentsize uint16
-	phnum     uint16
-	shentsize uint16
-	shnum     uint16
-	shstrndx  uint16
-}
-
-/*
- * Section header.
- */
-type ElfShdr struct {
-	name      uint32
-	type_     uint32
-	flags     uint64
-	addr      uint64
-	off       uint64
-	size      uint64
-	link      uint32
-	info      uint32
-	addralign uint64
-	entsize   uint64
-	shnum     int
-	secsym    *LSym
-}
-
-/*
- * Program header.
- */
-type ElfPhdr struct {
-	type_  uint32
-	flags  uint32
-	off    uint64
-	vaddr  uint64
-	paddr  uint64
-	filesz uint64
-	memsz  uint64
-	align  uint64
-}
-
-/* For accessing the fields of r_info. */
-
-/* For constructing r_info from field values. */
-
-/*
- * Symbol table entries.
- */
-
-/* For accessing the fields of st_info. */
-
-/* For constructing st_info from field values. */
-
-/* For accessing the fields of st_other. */
-
-/*
- * Go linker interface
- */
-const (
-	ELF64HDRSIZE  = 64
-	ELF64PHDRSIZE = 56
-	ELF64SHDRSIZE = 64
-	ELF64RELSIZE  = 16
-	ELF64RELASIZE = 24
-	ELF64SYMSIZE  = 24
-	ELF32HDRSIZE  = 52
-	ELF32PHDRSIZE = 32
-	ELF32SHDRSIZE = 40
-	ELF32SYMSIZE  = 16
-	ELF32RELSIZE  = 8
-)
-
-/*
- * The interface uses the 64-bit structures always,
- * to avoid code duplication.  The writers know how to
- * marshal a 32-bit representation from the 64-bit structure.
- */
-
-var Elfstrdat []byte
-
-/*
- * Total amount of space to reserve at the start of the file
- * for Header, PHeaders, SHeaders, and interp.
- * May waste some.
- * On FreeBSD, cannot be larger than a page.
- */
-const (
-	ELFRESERVE = 4096
-)
-
-/*
- * We use the 64-bit data structures on both 32- and 64-bit machines
- * in order to write the code just once.  The 64-bit data structure is
- * written in the 32-bit format on the 32-bit machines.
- */
-const (
-	NSECT = 48
-)
-
-var Iself bool
-
-var Nelfsym int = 1
-
-var elf64 bool
-
-var ehdr ElfEhdr
-
-var phdr [NSECT]*ElfPhdr
-
-var shdr [NSECT]*ElfShdr
-
-var interp string
-
-type Elfstring struct {
-	s   string
-	off int
-}
-
-var elfstr [100]Elfstring
-
-var nelfstr int
-
-var buildinfo []byte
-
-/*
- Initialize the global variable that describes the ELF header. It will be updated as
- we write section and prog headers.
-*/
-func Elfinit() {
-	Iself = true
-
-	switch Thearch.Thechar {
-	// 64-bit architectures
-	case '9':
-		if Ctxt.Arch.ByteOrder == binary.BigEndian {
-			ehdr.flags = 1 /* Version 1 ABI */
-		} else {
-			ehdr.flags = 2 /* Version 2 ABI */
-		}
-		fallthrough
-
-	case '6', '7':
-		elf64 = true
-
-		ehdr.phoff = ELF64HDRSIZE      /* Must be be ELF64HDRSIZE: first PHdr must follow ELF header */
-		ehdr.shoff = ELF64HDRSIZE      /* Will move as we add PHeaders */
-		ehdr.ehsize = ELF64HDRSIZE     /* Must be ELF64HDRSIZE */
-		ehdr.phentsize = ELF64PHDRSIZE /* Must be ELF64PHDRSIZE */
-		ehdr.shentsize = ELF64SHDRSIZE /* Must be ELF64SHDRSIZE */
-
-		// we use EABI on both linux/arm and freebsd/arm.
-	// 32-bit architectures
-	case '5':
-		// we use EABI on both linux/arm and freebsd/arm.
-		if HEADTYPE == obj.Hlinux || HEADTYPE == obj.Hfreebsd {
-			ehdr.flags = 0x5000002 // has entry point, Version5 EABI
-		}
-		fallthrough
-
-	default:
-		ehdr.phoff = ELF32HDRSIZE
-		/* Must be be ELF32HDRSIZE: first PHdr must follow ELF header */
-		ehdr.shoff = ELF32HDRSIZE      /* Will move as we add PHeaders */
-		ehdr.ehsize = ELF32HDRSIZE     /* Must be ELF32HDRSIZE */
-		ehdr.phentsize = ELF32PHDRSIZE /* Must be ELF32PHDRSIZE */
-		ehdr.shentsize = ELF32SHDRSIZE /* Must be ELF32SHDRSIZE */
-	}
-}
-
-func elf64phdr(e *ElfPhdr) {
-	Thearch.Lput(e.type_)
-	Thearch.Lput(e.flags)
-	Thearch.Vput(e.off)
-	Thearch.Vput(e.vaddr)
-	Thearch.Vput(e.paddr)
-	Thearch.Vput(e.filesz)
-	Thearch.Vput(e.memsz)
-	Thearch.Vput(e.align)
-}
-
-func elf32phdr(e *ElfPhdr) {
-	if e.type_ == PT_LOAD {
-		// Correct ELF loaders will do this implicitly,
-		// but buggy ELF loaders like the one in some
-		// versions of QEMU won't.
-		frag := int(e.vaddr & (e.align - 1))
-
-		e.off -= uint64(frag)
-		e.vaddr -= uint64(frag)
-		e.paddr -= uint64(frag)
-		e.filesz += uint64(frag)
-		e.memsz += uint64(frag)
-	}
-
-	Thearch.Lput(e.type_)
-	Thearch.Lput(uint32(e.off))
-	Thearch.Lput(uint32(e.vaddr))
-	Thearch.Lput(uint32(e.paddr))
-	Thearch.Lput(uint32(e.filesz))
-	Thearch.Lput(uint32(e.memsz))
-	Thearch.Lput(e.flags)
-	Thearch.Lput(uint32(e.align))
-}
-
-func elf64shdr(e *ElfShdr) {
-	Thearch.Lput(e.name)
-	Thearch.Lput(e.type_)
-	Thearch.Vput(e.flags)
-	Thearch.Vput(e.addr)
-	Thearch.Vput(e.off)
-	Thearch.Vput(e.size)
-	Thearch.Lput(e.link)
-	Thearch.Lput(e.info)
-	Thearch.Vput(e.addralign)
-	Thearch.Vput(e.entsize)
-}
-
-func elf32shdr(e *ElfShdr) {
-	Thearch.Lput(e.name)
-	Thearch.Lput(e.type_)
-	Thearch.Lput(uint32(e.flags))
-	Thearch.Lput(uint32(e.addr))
-	Thearch.Lput(uint32(e.off))
-	Thearch.Lput(uint32(e.size))
-	Thearch.Lput(e.link)
-	Thearch.Lput(e.info)
-	Thearch.Lput(uint32(e.addralign))
-	Thearch.Lput(uint32(e.entsize))
-}
-
-func elfwriteshdrs() uint32 {
-	if elf64 {
-		for i := 0; i < int(ehdr.shnum); i++ {
-			elf64shdr(shdr[i])
-		}
-		return uint32(ehdr.shnum) * ELF64SHDRSIZE
-	}
-
-	for i := 0; i < int(ehdr.shnum); i++ {
-		elf32shdr(shdr[i])
-	}
-	return uint32(ehdr.shnum) * ELF32SHDRSIZE
-}
-
-func elfsetstring(s string, off int) {
-	if nelfstr >= len(elfstr) {
-		Diag("too many elf strings")
-		errorexit()
-	}
-
-	elfstr[nelfstr].s = s
-	elfstr[nelfstr].off = off
-	nelfstr++
-}
-
-func elfwritephdrs() uint32 {
-	if elf64 {
-		for i := 0; i < int(ehdr.phnum); i++ {
-			elf64phdr(phdr[i])
-		}
-		return uint32(ehdr.phnum) * ELF64PHDRSIZE
-	}
-
-	for i := 0; i < int(ehdr.phnum); i++ {
-		elf32phdr(phdr[i])
-	}
-	return uint32(ehdr.phnum) * ELF32PHDRSIZE
-}
-
-func newElfPhdr() *ElfPhdr {
-	e := new(ElfPhdr)
-	if ehdr.phnum >= NSECT {
-		Diag("too many phdrs")
-	} else {
-		phdr[ehdr.phnum] = e
-		ehdr.phnum++
-	}
-	if elf64 {
-		ehdr.shoff += ELF64PHDRSIZE
-	} else {
-		ehdr.shoff += ELF32PHDRSIZE
-	}
-	return e
-}
-
-func newElfShdr(name int64) *ElfShdr {
-	e := new(ElfShdr)
-	e.name = uint32(name)
-	e.shnum = int(ehdr.shnum)
-	if ehdr.shnum >= NSECT {
-		Diag("too many shdrs")
-	} else {
-		shdr[ehdr.shnum] = e
-		ehdr.shnum++
-	}
-
-	return e
-}
-
-func getElfEhdr() *ElfEhdr {
-	return &ehdr
-}
-
-func elf64writehdr() uint32 {
-	for i := 0; i < EI_NIDENT; i++ {
-		Cput(ehdr.ident[i])
-	}
-	Thearch.Wput(ehdr.type_)
-	Thearch.Wput(ehdr.machine)
-	Thearch.Lput(ehdr.version)
-	Thearch.Vput(ehdr.entry)
-	Thearch.Vput(ehdr.phoff)
-	Thearch.Vput(ehdr.shoff)
-	Thearch.Lput(ehdr.flags)
-	Thearch.Wput(ehdr.ehsize)
-	Thearch.Wput(ehdr.phentsize)
-	Thearch.Wput(ehdr.phnum)
-	Thearch.Wput(ehdr.shentsize)
-	Thearch.Wput(ehdr.shnum)
-	Thearch.Wput(ehdr.shstrndx)
-	return ELF64HDRSIZE
-}
-
-func elf32writehdr() uint32 {
-	for i := 0; i < EI_NIDENT; i++ {
-		Cput(ehdr.ident[i])
-	}
-	Thearch.Wput(ehdr.type_)
-	Thearch.Wput(ehdr.machine)
-	Thearch.Lput(ehdr.version)
-	Thearch.Lput(uint32(ehdr.entry))
-	Thearch.Lput(uint32(ehdr.phoff))
-	Thearch.Lput(uint32(ehdr.shoff))
-	Thearch.Lput(ehdr.flags)
-	Thearch.Wput(ehdr.ehsize)
-	Thearch.Wput(ehdr.phentsize)
-	Thearch.Wput(ehdr.phnum)
-	Thearch.Wput(ehdr.shentsize)
-	Thearch.Wput(ehdr.shnum)
-	Thearch.Wput(ehdr.shstrndx)
-	return ELF32HDRSIZE
-}
-
-func elfwritehdr() uint32 {
-	if elf64 {
-		return elf64writehdr()
-	}
-	return elf32writehdr()
-}
-
-/* Taken directly from the definition document for ELF64 */
-func elfhash(name []byte) uint32 {
-	var h uint32 = 0
-	var g uint32
-	for len(name) != 0 {
-		h = (h << 4) + uint32(name[0])
-		name = name[1:]
-		g = h & 0xf0000000
-		if g != 0 {
-			h ^= g >> 24
-		}
-		h &= 0x0fffffff
-	}
-
-	return h
-}
-
-func Elfwritedynent(s *LSym, tag int, val uint64) {
-	if elf64 {
-		Adduint64(Ctxt, s, uint64(tag))
-		Adduint64(Ctxt, s, val)
-	} else {
-		Adduint32(Ctxt, s, uint32(tag))
-		Adduint32(Ctxt, s, uint32(val))
-	}
-}
-
-func elfwritedynentsym(s *LSym, tag int, t *LSym) {
-	Elfwritedynentsymplus(s, tag, t, 0)
-}
-
-func Elfwritedynentsymplus(s *LSym, tag int, t *LSym, add int64) {
-	if elf64 {
-		Adduint64(Ctxt, s, uint64(tag))
-	} else {
-		Adduint32(Ctxt, s, uint32(tag))
-	}
-	Addaddrplus(Ctxt, s, t, add)
-}
-
-func elfwritedynentsymsize(s *LSym, tag int, t *LSym) {
-	if elf64 {
-		Adduint64(Ctxt, s, uint64(tag))
-	} else {
-		Adduint32(Ctxt, s, uint32(tag))
-	}
-	addsize(Ctxt, s, t)
-}
-
-func elfinterp(sh *ElfShdr, startva uint64, resoff uint64, p string) int {
-	interp = p
-	n := len(interp) + 1
-	sh.addr = startva + resoff - uint64(n)
-	sh.off = resoff - uint64(n)
-	sh.size = uint64(n)
-
-	return n
-}
-
-func elfwriteinterp() int {
-	sh := elfshname(".interp")
-	Cseek(int64(sh.off))
-	coutbuf.WriteString(interp)
-	Cput(0)
-	return int(sh.size)
-}
-
-func elfnote(sh *ElfShdr, startva uint64, resoff uint64, sz int, alloc bool) int {
-	n := 3*4 + uint64(sz) + resoff%4
-
-	sh.type_ = SHT_NOTE
-	if alloc {
-		sh.flags = SHF_ALLOC
-	}
-	sh.addralign = 4
-	sh.addr = startva + resoff - n
-	sh.off = resoff - n
-	sh.size = n - resoff%4
-
-	return int(n)
-}
-
-func elfwritenotehdr(str string, namesz uint32, descsz uint32, tag uint32) *ElfShdr {
-	sh := elfshname(str)
-
-	// Write Elf_Note header.
-	Cseek(int64(sh.off))
-
-	Thearch.Lput(namesz)
-	Thearch.Lput(descsz)
-	Thearch.Lput(tag)
-
-	return sh
-}
-
-// NetBSD Signature (as per sys/exec_elf.h)
-const (
-	ELF_NOTE_NETBSD_NAMESZ  = 7
-	ELF_NOTE_NETBSD_DESCSZ  = 4
-	ELF_NOTE_NETBSD_TAG     = 1
-	ELF_NOTE_NETBSD_VERSION = 599000000 /* NetBSD 5.99 */
-)
-
-var ELF_NOTE_NETBSD_NAME = []byte("NetBSD\x00")
-
-func elfnetbsdsig(sh *ElfShdr, startva uint64, resoff uint64) int {
-	n := int(Rnd(ELF_NOTE_NETBSD_NAMESZ, 4) + Rnd(ELF_NOTE_NETBSD_DESCSZ, 4))
-	return elfnote(sh, startva, resoff, n, true)
-}
-
-func elfwritenetbsdsig() int {
-	// Write Elf_Note header.
-	sh := elfwritenotehdr(".note.netbsd.ident", ELF_NOTE_NETBSD_NAMESZ, ELF_NOTE_NETBSD_DESCSZ, ELF_NOTE_NETBSD_TAG)
-
-	if sh == nil {
-		return 0
-	}
-
-	// Followed by NetBSD string and version.
-	Cwrite(ELF_NOTE_NETBSD_NAME)
-	Cput(0)
-
-	Thearch.Lput(ELF_NOTE_NETBSD_VERSION)
-
-	return int(sh.size)
-}
-
-// OpenBSD Signature
-const (
-	ELF_NOTE_OPENBSD_NAMESZ  = 8
-	ELF_NOTE_OPENBSD_DESCSZ  = 4
-	ELF_NOTE_OPENBSD_TAG     = 1
-	ELF_NOTE_OPENBSD_VERSION = 0
-)
-
-var ELF_NOTE_OPENBSD_NAME = []byte("OpenBSD\x00")
-
-func elfopenbsdsig(sh *ElfShdr, startva uint64, resoff uint64) int {
-	n := ELF_NOTE_OPENBSD_NAMESZ + ELF_NOTE_OPENBSD_DESCSZ
-	return elfnote(sh, startva, resoff, n, true)
-}
-
-func elfwriteopenbsdsig() int {
-	// Write Elf_Note header.
-	sh := elfwritenotehdr(".note.openbsd.ident", ELF_NOTE_OPENBSD_NAMESZ, ELF_NOTE_OPENBSD_DESCSZ, ELF_NOTE_OPENBSD_TAG)
-
-	if sh == nil {
-		return 0
-	}
-
-	// Followed by OpenBSD string and version.
-	Cwrite(ELF_NOTE_OPENBSD_NAME)
-
-	Thearch.Lput(ELF_NOTE_OPENBSD_VERSION)
-
-	return int(sh.size)
-}
-
-func addbuildinfo(val string) {
-	var j int
-
-	if val[0] != '0' || val[1] != 'x' {
-		Exitf("-B argument must start with 0x: %s", val)
-	}
-
-	ov := val
-	val = val[2:]
-	i := 0
-	var b int
-	for val != "" {
-		if len(val) == 1 {
-			Exitf("-B argument must have even number of digits: %s", ov)
-		}
-
-		b = 0
-		for j = 0; j < 2; j, val = j+1, val[1:] {
-			b *= 16
-			if val[0] >= '0' && val[0] <= '9' {
-				b += int(val[0]) - '0'
-			} else if val[0] >= 'a' && val[0] <= 'f' {
-				b += int(val[0]) - 'a' + 10
-			} else if val[0] >= 'A' && val[0] <= 'F' {
-				b += int(val[0]) - 'A' + 10
-			} else {
-				Exitf("-B argument contains invalid hex digit %c: %s", val[0], ov)
-			}
-		}
-
-		const maxLen = 32
-		if i >= maxLen {
-			Exitf("-B option too long (max %d digits): %s", maxLen, ov)
-		}
-
-		buildinfo = append(buildinfo, uint8(b))
-		i++
-	}
-
-	buildinfo = buildinfo[:i]
-}
-
-// Build info note
-const (
-	ELF_NOTE_BUILDINFO_NAMESZ = 4
-	ELF_NOTE_BUILDINFO_TAG    = 3
-)
-
-var ELF_NOTE_BUILDINFO_NAME = []byte("GNU\x00")
-
-func elfbuildinfo(sh *ElfShdr, startva uint64, resoff uint64) int {
-	n := int(ELF_NOTE_BUILDINFO_NAMESZ + Rnd(int64(len(buildinfo)), 4))
-	return elfnote(sh, startva, resoff, n, true)
-}
-
-func elfgobuildid(sh *ElfShdr, startva uint64, resoff uint64) int {
-	n := len(ELF_NOTE_GO_NAME) + int(Rnd(int64(len(buildid)), 4))
-	return elfnote(sh, startva, resoff, n, true)
-}
-
-func elfwritebuildinfo() int {
-	sh := elfwritenotehdr(".note.gnu.build-id", ELF_NOTE_BUILDINFO_NAMESZ, uint32(len(buildinfo)), ELF_NOTE_BUILDINFO_TAG)
-	if sh == nil {
-		return 0
-	}
-
-	Cwrite(ELF_NOTE_BUILDINFO_NAME)
-	Cwrite(buildinfo)
-	var zero = make([]byte, 4)
-	Cwrite(zero[:int(Rnd(int64(len(buildinfo)), 4)-int64(len(buildinfo)))])
-
-	return int(sh.size)
-}
-
-func elfwritegobuildid() int {
-	sh := elfwritenotehdr(".note.go.buildid", uint32(len(ELF_NOTE_GO_NAME)), uint32(len(buildid)), ELF_NOTE_GOBUILDID_TAG)
-	if sh == nil {
-		return 0
-	}
-
-	Cwrite(ELF_NOTE_GO_NAME)
-	Cwrite([]byte(buildid))
-	var zero = make([]byte, 4)
-	Cwrite(zero[:int(Rnd(int64(len(buildid)), 4)-int64(len(buildid)))])
-
-	return int(sh.size)
-}
-
-// Go specific notes
-const (
-	ELF_NOTE_GOPKGLIST_TAG = 1
-	ELF_NOTE_GOABIHASH_TAG = 2
-	ELF_NOTE_GODEPS_TAG    = 3
-	ELF_NOTE_GOBUILDID_TAG = 4
-)
-
-var ELF_NOTE_GO_NAME = []byte("Go\x00\x00")
-
-var elfverneed int
-
-type Elfaux struct {
-	next *Elfaux
-	num  int
-	vers string
-}
-
-type Elflib struct {
-	next *Elflib
-	aux  *Elfaux
-	file string
-}
-
-func addelflib(list **Elflib, file string, vers string) *Elfaux {
-	var lib *Elflib
-
-	for lib = *list; lib != nil; lib = lib.next {
-		if lib.file == file {
-			goto havelib
-		}
-	}
-	lib = new(Elflib)
-	lib.next = *list
-	lib.file = file
-	*list = lib
-
-havelib:
-	for aux := lib.aux; aux != nil; aux = aux.next {
-		if aux.vers == vers {
-			return aux
-		}
-	}
-	aux := new(Elfaux)
-	aux.next = lib.aux
-	aux.vers = vers
-	lib.aux = aux
-
-	return aux
-}
-
-func elfdynhash() {
-	if !Iself {
-		return
-	}
-
-	nsym := Nelfsym
-	s := Linklookup(Ctxt, ".hash", 0)
-	s.Type = obj.SELFROSECT
-	s.Reachable = true
-
-	i := nsym
-	nbucket := 1
-	for i > 0 {
-		nbucket++
-		i >>= 1
-	}
-
-	var needlib *Elflib
-	need := make([]*Elfaux, nsym)
-	chain := make([]uint32, nsym)
-	buckets := make([]uint32, nbucket)
-
-	var b int
-	var hc uint32
-	var name string
-	for sy := Ctxt.Allsym; sy != nil; sy = sy.Allsym {
-		if sy.Dynid <= 0 {
-			continue
-		}
-
-		if sy.Dynimpvers != "" {
-			need[sy.Dynid] = addelflib(&needlib, sy.Dynimplib, sy.Dynimpvers)
-		}
-
-		name = sy.Extname
-		hc = elfhash([]byte(name))
-
-		b = int(hc % uint32(nbucket))
-		chain[sy.Dynid] = buckets[b]
-		buckets[b] = uint32(sy.Dynid)
-	}
-
-	Adduint32(Ctxt, s, uint32(nbucket))
-	Adduint32(Ctxt, s, uint32(nsym))
-	for i := 0; i < nbucket; i++ {
-		Adduint32(Ctxt, s, buckets[i])
-	}
-	for i := 0; i < nsym; i++ {
-		Adduint32(Ctxt, s, chain[i])
-	}
-
-	// version symbols
-	dynstr := Linklookup(Ctxt, ".dynstr", 0)
-
-	s = Linklookup(Ctxt, ".gnu.version_r", 0)
-	i = 2
-	nfile := 0
-	var j int
-	var x *Elfaux
-	for l := needlib; l != nil; l = l.next {
-		nfile++
-
-		// header
-		Adduint16(Ctxt, s, 1) // table version
-		j = 0
-		for x = l.aux; x != nil; x = x.next {
-			j++
-		}
-		Adduint16(Ctxt, s, uint16(j))                         // aux count
-		Adduint32(Ctxt, s, uint32(Addstring(dynstr, l.file))) // file string offset
-		Adduint32(Ctxt, s, 16)                                // offset from header to first aux
-		if l.next != nil {
-			Adduint32(Ctxt, s, 16+uint32(j)*16) // offset from this header to next
-		} else {
-			Adduint32(Ctxt, s, 0)
-		}
-
-		for x = l.aux; x != nil; x = x.next {
-			x.num = i
-			i++
-
-			// aux struct
-			Adduint32(Ctxt, s, elfhash([]byte(x.vers)))           // hash
-			Adduint16(Ctxt, s, 0)                                 // flags
-			Adduint16(Ctxt, s, uint16(x.num))                     // other - index we refer to this by
-			Adduint32(Ctxt, s, uint32(Addstring(dynstr, x.vers))) // version string offset
-			if x.next != nil {
-				Adduint32(Ctxt, s, 16) // offset from this aux to next
-			} else {
-				Adduint32(Ctxt, s, 0)
-			}
-		}
-	}
-
-	// version references
-	s = Linklookup(Ctxt, ".gnu.version", 0)
-
-	for i := 0; i < nsym; i++ {
-		if i == 0 {
-			Adduint16(Ctxt, s, 0) // first entry - no symbol
-		} else if need[i] == nil {
-			Adduint16(Ctxt, s, 1) // global
-		} else {
-			Adduint16(Ctxt, s, uint16(need[i].num))
-		}
-	}
-
-	s = Linklookup(Ctxt, ".dynamic", 0)
-	elfverneed = nfile
-	if elfverneed != 0 {
-		elfwritedynentsym(s, DT_VERNEED, Linklookup(Ctxt, ".gnu.version_r", 0))
-		Elfwritedynent(s, DT_VERNEEDNUM, uint64(nfile))
-		elfwritedynentsym(s, DT_VERSYM, Linklookup(Ctxt, ".gnu.version", 0))
-	}
-
-	switch Thearch.Thechar {
-	case '6', '7', '9':
-		sy := Linklookup(Ctxt, ".rela.plt", 0)
-		if sy.Size > 0 {
-			Elfwritedynent(s, DT_PLTREL, DT_RELA)
-			elfwritedynentsymsize(s, DT_PLTRELSZ, sy)
-			elfwritedynentsym(s, DT_JMPREL, sy)
-		}
-	default:
-		sy := Linklookup(Ctxt, ".rel.plt", 0)
-		if sy.Size > 0 {
-			Elfwritedynent(s, DT_PLTREL, DT_REL)
-			elfwritedynentsymsize(s, DT_PLTRELSZ, sy)
-			elfwritedynentsym(s, DT_JMPREL, sy)
-		}
-	}
-
-	Elfwritedynent(s, DT_NULL, 0)
-}
-
-func elfphload(seg *Segment) *ElfPhdr {
-	ph := newElfPhdr()
-	ph.type_ = PT_LOAD
-	if seg.Rwx&4 != 0 {
-		ph.flags |= PF_R
-	}
-	if seg.Rwx&2 != 0 {
-		ph.flags |= PF_W
-	}
-	if seg.Rwx&1 != 0 {
-		ph.flags |= PF_X
-	}
-	ph.vaddr = seg.Vaddr
-	ph.paddr = seg.Vaddr
-	ph.memsz = seg.Length
-	ph.off = seg.Fileoff
-	ph.filesz = seg.Filelen
-	ph.align = uint64(INITRND)
-
-	return ph
-}
-
-func elfshname(name string) *ElfShdr {
-	var off int
-	var sh *ElfShdr
-
-	for i := 0; i < nelfstr; i++ {
-		if name == elfstr[i].s {
-			off = elfstr[i].off
-			for i = 0; i < int(ehdr.shnum); i++ {
-				sh = shdr[i]
-				if sh.name == uint32(off) {
-					return sh
-				}
-			}
-
-			sh = newElfShdr(int64(off))
-			return sh
-		}
-	}
-
-	Diag("cannot find elf name %s", name)
-	errorexit()
-	return nil
-}
-
-func elfshalloc(sect *Section) *ElfShdr {
-	sh := elfshname(sect.Name)
-	sect.Elfsect = sh
-	return sh
-}
-
-func elfshbits(sect *Section) *ElfShdr {
-	sh := elfshalloc(sect)
-	// If this section has already been set up as a note, we assume type_ and
-	// flags are already correct, but the other fields still need filling in.
-	if sh.type_ == SHT_NOTE {
-		if Linkmode != LinkExternal {
-			// TODO(mwhudson): the approach here will work OK when
-			// linking internally for notes that we want to be included
-			// in a loadable segment (e.g. the abihash note) but not for
-			// notes that we do not want to be mapped (e.g. the package
-			// list note). The real fix is probably to define new values
-			// for LSym.Type corresponding to mapped and unmapped notes
-			// and handle them in dodata().
-			Diag("sh.type_ == SHT_NOTE in elfshbits when linking internally")
-		}
-		sh.addralign = uint64(sect.Align)
-		sh.size = sect.Length
-		sh.off = sect.Seg.Fileoff + sect.Vaddr - sect.Seg.Vaddr
-		return sh
-	}
-	if sh.type_ > 0 {
-		return sh
-	}
-
-	if sect.Vaddr < sect.Seg.Vaddr+sect.Seg.Filelen {
-		sh.type_ = SHT_PROGBITS
-	} else {
-		sh.type_ = SHT_NOBITS
-	}
-	sh.flags = SHF_ALLOC
-	if sect.Rwx&1 != 0 {
-		sh.flags |= SHF_EXECINSTR
-	}
-	if sect.Rwx&2 != 0 {
-		sh.flags |= SHF_WRITE
-	}
-	if sect.Name == ".tbss" {
-		if goos != "android" {
-			sh.flags |= SHF_TLS // no TLS on android
-		}
-		sh.type_ = SHT_NOBITS
-	}
-
-	if Linkmode != LinkExternal {
-		sh.addr = sect.Vaddr
-	}
-	sh.addralign = uint64(sect.Align)
-	sh.size = sect.Length
-	sh.off = sect.Seg.Fileoff + sect.Vaddr - sect.Seg.Vaddr
-
-	return sh
-}
-
-func elfshreloc(sect *Section) *ElfShdr {
-	// If main section is SHT_NOBITS, nothing to relocate.
-	// Also nothing to relocate in .shstrtab or notes.
-	if sect.Vaddr >= sect.Seg.Vaddr+sect.Seg.Filelen {
-		return nil
-	}
-	if sect.Name == ".shstrtab" || sect.Name == ".tbss" {
-		return nil
-	}
-	if sect.Elfsect.type_ == SHT_NOTE {
-		return nil
-	}
-
-	var prefix string
-	var typ int
-	switch Thearch.Thechar {
-	case '6', '7', '9':
-		prefix = ".rela"
-		typ = SHT_RELA
-	default:
-		prefix = ".rel"
-		typ = SHT_REL
-	}
-
-	buf := fmt.Sprintf("%s%s", prefix, sect.Name)
-	sh := elfshname(buf)
-	sh.type_ = uint32(typ)
-	sh.entsize = uint64(Thearch.Regsize) * 2
-	if typ == SHT_RELA {
-		sh.entsize += uint64(Thearch.Regsize)
-	}
-	sh.link = uint32(elfshname(".symtab").shnum)
-	sh.info = uint32(sect.Elfsect.shnum)
-	sh.off = sect.Reloff
-	sh.size = sect.Rellen
-	sh.addralign = uint64(Thearch.Regsize)
-	return sh
-}
-
-func elfrelocsect(sect *Section, first *LSym) {
-	// If main section is SHT_NOBITS, nothing to relocate.
-	// Also nothing to relocate in .shstrtab.
-	if sect.Vaddr >= sect.Seg.Vaddr+sect.Seg.Filelen {
-		return
-	}
-	if sect.Name == ".shstrtab" {
-		return
-	}
-
-	sect.Reloff = uint64(Cpos())
-	var sym *LSym
-	for sym = first; sym != nil; sym = sym.Next {
-		if !sym.Reachable {
-			continue
-		}
-		if uint64(sym.Value) >= sect.Vaddr {
-			break
-		}
-	}
-
-	eaddr := int32(sect.Vaddr + sect.Length)
-	var r *Reloc
-	var ri int
-	for ; sym != nil; sym = sym.Next {
-		if !sym.Reachable {
-			continue
-		}
-		if sym.Value >= int64(eaddr) {
-			break
-		}
-		Ctxt.Cursym = sym
-
-		for ri = 0; ri < len(sym.R); ri++ {
-			r = &sym.R[ri]
-			if r.Done != 0 {
-				continue
-			}
-			if r.Xsym == nil {
-				Diag("missing xsym in relocation")
-				continue
-			}
-
-			if r.Xsym.Elfsym == 0 {
-				Diag("reloc %d to non-elf symbol %s (outer=%s) %d", r.Type, r.Sym.Name, r.Xsym.Name, r.Sym.Type)
-			}
-			if Thearch.Elfreloc1(r, int64(uint64(sym.Value+int64(r.Off))-sect.Vaddr)) < 0 {
-				Diag("unsupported obj reloc %d/%d to %s", r.Type, r.Siz, r.Sym.Name)
-			}
-		}
-	}
-
-	sect.Rellen = uint64(Cpos()) - sect.Reloff
-}
-
-func Elfemitreloc() {
-	for Cpos()&7 != 0 {
-		Cput(0)
-	}
-
-	elfrelocsect(Segtext.Sect, Ctxt.Textp)
-	for sect := Segtext.Sect.Next; sect != nil; sect = sect.Next {
-		elfrelocsect(sect, datap)
-	}
-	for sect := Segrodata.Sect; sect != nil; sect = sect.Next {
-		elfrelocsect(sect, datap)
-	}
-	for sect := Segdata.Sect; sect != nil; sect = sect.Next {
-		elfrelocsect(sect, datap)
-	}
-}
-
-func addgonote(sectionName string, tag uint32, desc []byte) {
-	s := Linklookup(Ctxt, sectionName, 0)
-	s.Reachable = true
-	s.Type = obj.SELFROSECT
-	// namesz
-	Adduint32(Ctxt, s, uint32(len(ELF_NOTE_GO_NAME)))
-	// descsz
-	Adduint32(Ctxt, s, uint32(len(desc)))
-	// tag
-	Adduint32(Ctxt, s, tag)
-	// name + padding
-	s.P = append(s.P, ELF_NOTE_GO_NAME...)
-	for len(s.P)%4 != 0 {
-		s.P = append(s.P, 0)
-	}
-	// desc + padding
-	s.P = append(s.P, desc...)
-	for len(s.P)%4 != 0 {
-		s.P = append(s.P, 0)
-	}
-	s.Size = int64(len(s.P))
-}
-
-func doelf() {
-	if !Iself {
-		return
-	}
-
-	/* predefine strings we need for section headers */
-	shstrtab := Linklookup(Ctxt, ".shstrtab", 0)
-
-	shstrtab.Type = obj.SELFROSECT
-	shstrtab.Reachable = true
-
-	Addstring(shstrtab, "")
-	Addstring(shstrtab, ".text")
-	Addstring(shstrtab, ".noptrdata")
-	Addstring(shstrtab, ".data")
-	Addstring(shstrtab, ".bss")
-	Addstring(shstrtab, ".noptrbss")
-
-	// generate .tbss section (except for OpenBSD where it's not supported)
-	// for dynamic internal linker or external linking, so that various
-	// binutils could correctly calculate PT_TLS size.
-	// see https://golang.org/issue/5200.
-	if HEADTYPE != obj.Hopenbsd {
-		if Debug['d'] == 0 || Linkmode == LinkExternal {
-			Addstring(shstrtab, ".tbss")
-		}
-	}
-	if HEADTYPE == obj.Hnetbsd {
-		Addstring(shstrtab, ".note.netbsd.ident")
-	}
-	if HEADTYPE == obj.Hopenbsd {
-		Addstring(shstrtab, ".note.openbsd.ident")
-	}
-	if len(buildinfo) > 0 {
-		Addstring(shstrtab, ".note.gnu.build-id")
-	}
-	if buildid != "" {
-		Addstring(shstrtab, ".note.go.buildid")
-	}
-	Addstring(shstrtab, ".elfdata")
-	Addstring(shstrtab, ".rodata")
-	Addstring(shstrtab, ".typelink")
-	Addstring(shstrtab, ".gosymtab")
-	Addstring(shstrtab, ".gopclntab")
-
-	if Linkmode == LinkExternal {
-		Debug['d'] = 1
-
-		switch Thearch.Thechar {
-		case '6', '7', '9':
-			Addstring(shstrtab, ".rela.text")
-			Addstring(shstrtab, ".rela.rodata")
-			Addstring(shstrtab, ".rela.typelink")
-			Addstring(shstrtab, ".rela.gosymtab")
-			Addstring(shstrtab, ".rela.gopclntab")
-			Addstring(shstrtab, ".rela.noptrdata")
-			Addstring(shstrtab, ".rela.data")
-
-		default:
-			Addstring(shstrtab, ".rel.text")
-			Addstring(shstrtab, ".rel.rodata")
-			Addstring(shstrtab, ".rel.typelink")
-			Addstring(shstrtab, ".rel.gosymtab")
-			Addstring(shstrtab, ".rel.gopclntab")
-			Addstring(shstrtab, ".rel.noptrdata")
-			Addstring(shstrtab, ".rel.data")
-		}
-
-		// add a .note.GNU-stack section to mark the stack as non-executable
-		Addstring(shstrtab, ".note.GNU-stack")
-
-		if Buildmode == BuildmodeShared {
-			Addstring(shstrtab, ".note.go.abihash")
-			Addstring(shstrtab, ".note.go.pkg-list")
-			Addstring(shstrtab, ".note.go.deps")
-		}
-
-		if buildid != "" {
-			Addstring(shstrtab, ".note.go.buildid")
-		}
-	}
-
-	hasinitarr := Linkshared
-
-	/* shared library initializer */
-	switch Buildmode {
-	case BuildmodeCArchive, BuildmodeCShared, BuildmodeShared:
-		hasinitarr = true
-	}
-
-	if hasinitarr {
-		Addstring(shstrtab, ".init_array")
-		switch Thearch.Thechar {
-		case '6', '7', '9':
-			Addstring(shstrtab, ".rela.init_array")
-		default:
-			Addstring(shstrtab, ".rel.init_array")
-		}
-	}
-
-	if Debug['s'] == 0 {
-		Addstring(shstrtab, ".symtab")
-		Addstring(shstrtab, ".strtab")
-		dwarfaddshstrings(shstrtab)
-	}
-
-	Addstring(shstrtab, ".shstrtab")
-
-	if Debug['d'] == 0 { /* -d suppresses dynamic loader format */
-		Addstring(shstrtab, ".interp")
-		Addstring(shstrtab, ".hash")
-		Addstring(shstrtab, ".got")
-		if Thearch.Thechar == '9' {
-			Addstring(shstrtab, ".glink")
-		}
-		Addstring(shstrtab, ".got.plt")
-		Addstring(shstrtab, ".dynamic")
-		Addstring(shstrtab, ".dynsym")
-		Addstring(shstrtab, ".dynstr")
-		switch Thearch.Thechar {
-		case '6', '7', '9':
-			Addstring(shstrtab, ".rela")
-			Addstring(shstrtab, ".rela.plt")
-		default:
-			Addstring(shstrtab, ".rel")
-			Addstring(shstrtab, ".rel.plt")
-		}
-
-		Addstring(shstrtab, ".plt")
-		Addstring(shstrtab, ".gnu.version")
-		Addstring(shstrtab, ".gnu.version_r")
-
-		/* dynamic symbol table - first entry all zeros */
-		s := Linklookup(Ctxt, ".dynsym", 0)
-
-		s.Type = obj.SELFROSECT
-		s.Reachable = true
-		switch Thearch.Thechar {
-		case '6', '7', '9':
-			s.Size += ELF64SYMSIZE
-		default:
-			s.Size += ELF32SYMSIZE
-		}
-
-		/* dynamic string table */
-		s = Linklookup(Ctxt, ".dynstr", 0)
-
-		s.Type = obj.SELFROSECT
-		s.Reachable = true
-		if s.Size == 0 {
-			Addstring(s, "")
-		}
-		dynstr := s
-
-		/* relocation table */
-		switch Thearch.Thechar {
-		case '6', '7', '9':
-			s = Linklookup(Ctxt, ".rela", 0)
-		default:
-			s = Linklookup(Ctxt, ".rel", 0)
-		}
-		s.Reachable = true
-		s.Type = obj.SELFROSECT
-
-		/* global offset table */
-		s = Linklookup(Ctxt, ".got", 0)
-
-		s.Reachable = true
-		s.Type = obj.SELFGOT // writable
-
-		/* ppc64 glink resolver */
-		if Thearch.Thechar == '9' {
-			s := Linklookup(Ctxt, ".glink", 0)
-			s.Reachable = true
-			s.Type = obj.SELFRXSECT
-		}
-
-		/* hash */
-		s = Linklookup(Ctxt, ".hash", 0)
-
-		s.Reachable = true
-		s.Type = obj.SELFROSECT
-
-		s = Linklookup(Ctxt, ".got.plt", 0)
-		s.Reachable = true
-		s.Type = obj.SELFSECT // writable
-
-		s = Linklookup(Ctxt, ".plt", 0)
-
-		s.Reachable = true
-		if Thearch.Thechar == '9' {
-			// In the ppc64 ABI, .plt is a data section
-			// written by the dynamic linker.
-			s.Type = obj.SELFSECT
-		} else {
-			s.Type = obj.SELFRXSECT
-		}
-
-		Thearch.Elfsetupplt()
-
-		switch Thearch.Thechar {
-		case '6', '7', '9':
-			s = Linklookup(Ctxt, ".rela.plt", 0)
-		default:
-			s = Linklookup(Ctxt, ".rel.plt", 0)
-		}
-		s.Reachable = true
-		s.Type = obj.SELFROSECT
-
-		s = Linklookup(Ctxt, ".gnu.version", 0)
-		s.Reachable = true
-		s.Type = obj.SELFROSECT
-
-		s = Linklookup(Ctxt, ".gnu.version_r", 0)
-		s.Reachable = true
-		s.Type = obj.SELFROSECT
-
-		/* define dynamic elf table */
-		s = Linklookup(Ctxt, ".dynamic", 0)
-
-		s.Reachable = true
-		s.Type = obj.SELFSECT // writable
-
-		/*
-		 * .dynamic table
-		 */
-		elfwritedynentsym(s, DT_HASH, Linklookup(Ctxt, ".hash", 0))
-
-		elfwritedynentsym(s, DT_SYMTAB, Linklookup(Ctxt, ".dynsym", 0))
-		switch Thearch.Thechar {
-		case '6', '7', '9':
-			Elfwritedynent(s, DT_SYMENT, ELF64SYMSIZE)
-		default:
-			Elfwritedynent(s, DT_SYMENT, ELF32SYMSIZE)
-		}
-		elfwritedynentsym(s, DT_STRTAB, Linklookup(Ctxt, ".dynstr", 0))
-		elfwritedynentsymsize(s, DT_STRSZ, Linklookup(Ctxt, ".dynstr", 0))
-		switch Thearch.Thechar {
-		case '6', '7', '9':
-			elfwritedynentsym(s, DT_RELA, Linklookup(Ctxt, ".rela", 0))
-			elfwritedynentsymsize(s, DT_RELASZ, Linklookup(Ctxt, ".rela", 0))
-			Elfwritedynent(s, DT_RELAENT, ELF64RELASIZE)
-		default:
-			elfwritedynentsym(s, DT_REL, Linklookup(Ctxt, ".rel", 0))
-			elfwritedynentsymsize(s, DT_RELSZ, Linklookup(Ctxt, ".rel", 0))
-			Elfwritedynent(s, DT_RELENT, ELF32RELSIZE)
-		}
-
-		if rpath.val != "" {
-			Elfwritedynent(s, DT_RUNPATH, uint64(Addstring(dynstr, rpath.val)))
-		}
-
-		if Thearch.Thechar == '9' {
-			elfwritedynentsym(s, DT_PLTGOT, Linklookup(Ctxt, ".plt", 0))
-		} else {
-			elfwritedynentsym(s, DT_PLTGOT, Linklookup(Ctxt, ".got.plt", 0))
-		}
-
-		if Thearch.Thechar == '9' {
-			Elfwritedynent(s, DT_PPC64_OPT, 0)
-		}
-
-		// Solaris dynamic linker can't handle an empty .rela.plt if
-		// DT_JMPREL is emitted so we have to defer generation of DT_PLTREL,
-		// DT_PLTRELSZ, and DT_JMPREL dynamic entries until after we know the
-		// size of .rel(a).plt section.
-		Elfwritedynent(s, DT_DEBUG, 0)
-	}
-
-	if Buildmode == BuildmodeShared {
-		// The go.link.abihashbytes symbol will be pointed at the appropriate
-		// part of the .note.go.abihash section in data.go:func address().
-		s := Linklookup(Ctxt, "go.link.abihashbytes", 0)
-		s.Local = true
-		s.Type = obj.SRODATA
-		s.Special = 1
-		s.Reachable = true
-		s.Size = int64(sha1.Size)
-
-		sort.Sort(byPkg(Ctxt.Library))
-		h := sha1.New()
-		for _, l := range Ctxt.Library {
-			h.Write(l.hash)
-		}
-		addgonote(".note.go.abihash", ELF_NOTE_GOABIHASH_TAG, h.Sum([]byte{}))
-		addgonote(".note.go.pkg-list", ELF_NOTE_GOPKGLIST_TAG, []byte(pkglistfornote))
-		var deplist []string
-		for _, shlib := range Ctxt.Shlibs {
-			deplist = append(deplist, filepath.Base(shlib.Path))
-		}
-		addgonote(".note.go.deps", ELF_NOTE_GODEPS_TAG, []byte(strings.Join(deplist, "\n")))
-	}
-
-	if Linkmode == LinkExternal && buildid != "" {
-		addgonote(".note.go.buildid", ELF_NOTE_GOBUILDID_TAG, []byte(buildid))
-	}
-}
-
-// Do not write DT_NULL.  elfdynhash will finish it.
-func shsym(sh *ElfShdr, s *LSym) {
-	addr := Symaddr(s)
-	if sh.flags&SHF_ALLOC != 0 {
-		sh.addr = uint64(addr)
-	}
-	sh.off = uint64(datoff(addr))
-	sh.size = uint64(s.Size)
-}
-
-func phsh(ph *ElfPhdr, sh *ElfShdr) {
-	ph.vaddr = sh.addr
-	ph.paddr = ph.vaddr
-	ph.off = sh.off
-	ph.filesz = sh.size
-	ph.memsz = sh.size
-	ph.align = sh.addralign
-}
-
-func Asmbelfsetup() {
-	/* This null SHdr must appear before all others */
-	elfshname("")
-
-	for sect := Segtext.Sect; sect != nil; sect = sect.Next {
-		elfshalloc(sect)
-	}
-	for sect := Segrodata.Sect; sect != nil; sect = sect.Next {
-		elfshalloc(sect)
-	}
-	for sect := Segdata.Sect; sect != nil; sect = sect.Next {
-		elfshalloc(sect)
-	}
-}
-
-func Asmbelf(symo int64) {
-	eh := getElfEhdr()
-	switch Thearch.Thechar {
-	default:
-		Exitf("unknown architecture in asmbelf: %v", Thearch.Thechar)
-	case '5':
-		eh.machine = EM_ARM
-	case '6':
-		eh.machine = EM_X86_64
-	case '7':
-		eh.machine = EM_AARCH64
-	case '8':
-		eh.machine = EM_386
-	case '9':
-		eh.machine = EM_PPC64
-	}
-
-	elfreserve := int64(ELFRESERVE)
-	startva := INITTEXT - int64(HEADR)
-	resoff := elfreserve
-
-	var pph *ElfPhdr
-	var pnote *ElfPhdr
-	if Linkmode == LinkExternal {
-		/* skip program headers */
-		eh.phoff = 0
-
-		eh.phentsize = 0
-
-		if Buildmode == BuildmodeShared {
-			sh := elfshname(".note.go.pkg-list")
-			sh.type_ = SHT_NOTE
-			sh = elfshname(".note.go.abihash")
-			sh.type_ = SHT_NOTE
-			sh.flags = SHF_ALLOC
-			sh = elfshname(".note.go.deps")
-			sh.type_ = SHT_NOTE
-		}
-
-		if buildid != "" {
-			sh := elfshname(".note.go.buildid")
-			sh.type_ = SHT_NOTE
-			sh.flags = SHF_ALLOC
-		}
-
-		goto elfobj
-	}
-
-	/* program header info */
-	pph = newElfPhdr()
-
-	pph.type_ = PT_PHDR
-	pph.flags = PF_R
-	pph.off = uint64(eh.ehsize)
-	pph.vaddr = uint64(INITTEXT) - uint64(HEADR) + pph.off
-	pph.paddr = uint64(INITTEXT) - uint64(HEADR) + pph.off
-	pph.align = uint64(INITRND)
-
-	/*
-	 * PHDR must be in a loaded segment. Adjust the text
-	 * segment boundaries downwards to include it.
-	 * Except on NaCl where it must not be loaded.
-	 */
-	if HEADTYPE != obj.Hnacl {
-		o := int64(Segtext.Vaddr - pph.vaddr)
-		Segtext.Vaddr -= uint64(o)
-		Segtext.Length += uint64(o)
-		o = int64(Segtext.Fileoff - pph.off)
-		Segtext.Fileoff -= uint64(o)
-		Segtext.Filelen += uint64(o)
-	}
-
-	if Debug['d'] == 0 { /* -d suppresses dynamic loader format */
-		/* interpreter */
-		sh := elfshname(".interp")
-
-		sh.type_ = SHT_PROGBITS
-		sh.flags = SHF_ALLOC
-		sh.addralign = 1
-		if interpreter == "" {
-			switch HEADTYPE {
-			case obj.Hlinux:
-				interpreter = Thearch.Linuxdynld
-
-			case obj.Hfreebsd:
-				interpreter = Thearch.Freebsddynld
-
-			case obj.Hnetbsd:
-				interpreter = Thearch.Netbsddynld
-
-			case obj.Hopenbsd:
-				interpreter = Thearch.Openbsddynld
-
-			case obj.Hdragonfly:
-				interpreter = Thearch.Dragonflydynld
-
-			case obj.Hsolaris:
-				interpreter = Thearch.Solarisdynld
-			}
-		}
-
-		resoff -= int64(elfinterp(sh, uint64(startva), uint64(resoff), interpreter))
-
-		ph := newElfPhdr()
-		ph.type_ = PT_INTERP
-		ph.flags = PF_R
-		phsh(ph, sh)
-	}
-
-	pnote = nil
-	if HEADTYPE == obj.Hnetbsd || HEADTYPE == obj.Hopenbsd {
-		var sh *ElfShdr
-		switch HEADTYPE {
-		case obj.Hnetbsd:
-			sh = elfshname(".note.netbsd.ident")
-			resoff -= int64(elfnetbsdsig(sh, uint64(startva), uint64(resoff)))
-
-		case obj.Hopenbsd:
-			sh = elfshname(".note.openbsd.ident")
-			resoff -= int64(elfopenbsdsig(sh, uint64(startva), uint64(resoff)))
-		}
-
-		pnote = newElfPhdr()
-		pnote.type_ = PT_NOTE
-		pnote.flags = PF_R
-		phsh(pnote, sh)
-	}
-
-	if len(buildinfo) > 0 {
-		sh := elfshname(".note.gnu.build-id")
-		resoff -= int64(elfbuildinfo(sh, uint64(startva), uint64(resoff)))
-
-		if pnote == nil {
-			pnote = newElfPhdr()
-			pnote.type_ = PT_NOTE
-			pnote.flags = PF_R
-		}
-
-		phsh(pnote, sh)
-	}
-
-	if buildid != "" {
-		sh := elfshname(".note.go.buildid")
-		resoff -= int64(elfgobuildid(sh, uint64(startva), uint64(resoff)))
-
-		pnote := newElfPhdr()
-		pnote.type_ = PT_NOTE
-		pnote.flags = PF_R
-		phsh(pnote, sh)
-	}
-
-	// Additions to the reserved area must be above this line.
-
-	elfphload(&Segtext)
-	if Segrodata.Sect != nil {
-		elfphload(&Segrodata)
-	}
-	elfphload(&Segdata)
-
-	/* Dynamic linking sections */
-	if Debug['d'] == 0 {
-		sh := elfshname(".dynsym")
-		sh.type_ = SHT_DYNSYM
-		sh.flags = SHF_ALLOC
-		if elf64 {
-			sh.entsize = ELF64SYMSIZE
-		} else {
-			sh.entsize = ELF32SYMSIZE
-		}
-		sh.addralign = uint64(Thearch.Regsize)
-		sh.link = uint32(elfshname(".dynstr").shnum)
-
-		// sh->info = index of first non-local symbol (number of local symbols)
-		shsym(sh, Linklookup(Ctxt, ".dynsym", 0))
-
-		sh = elfshname(".dynstr")
-		sh.type_ = SHT_STRTAB
-		sh.flags = SHF_ALLOC
-		sh.addralign = 1
-		shsym(sh, Linklookup(Ctxt, ".dynstr", 0))
-
-		if elfverneed != 0 {
-			sh := elfshname(".gnu.version")
-			sh.type_ = SHT_GNU_VERSYM
-			sh.flags = SHF_ALLOC
-			sh.addralign = 2
-			sh.link = uint32(elfshname(".dynsym").shnum)
-			sh.entsize = 2
-			shsym(sh, Linklookup(Ctxt, ".gnu.version", 0))
-
-			sh = elfshname(".gnu.version_r")
-			sh.type_ = SHT_GNU_VERNEED
-			sh.flags = SHF_ALLOC
-			sh.addralign = uint64(Thearch.Regsize)
-			sh.info = uint32(elfverneed)
-			sh.link = uint32(elfshname(".dynstr").shnum)
-			shsym(sh, Linklookup(Ctxt, ".gnu.version_r", 0))
-		}
-
-		switch eh.machine {
-		case EM_X86_64, EM_PPC64, EM_AARCH64:
-			sh := elfshname(".rela.plt")
-			sh.type_ = SHT_RELA
-			sh.flags = SHF_ALLOC
-			sh.entsize = ELF64RELASIZE
-			sh.addralign = uint64(Thearch.Regsize)
-			sh.link = uint32(elfshname(".dynsym").shnum)
-			sh.info = uint32(elfshname(".plt").shnum)
-			shsym(sh, Linklookup(Ctxt, ".rela.plt", 0))
-
-			sh = elfshname(".rela")
-			sh.type_ = SHT_RELA
-			sh.flags = SHF_ALLOC
-			sh.entsize = ELF64RELASIZE
-			sh.addralign = 8
-			sh.link = uint32(elfshname(".dynsym").shnum)
-			shsym(sh, Linklookup(Ctxt, ".rela", 0))
-
-		default:
-			sh := elfshname(".rel.plt")
-			sh.type_ = SHT_REL
-			sh.flags = SHF_ALLOC
-			sh.entsize = ELF32RELSIZE
-			sh.addralign = 4
-			sh.link = uint32(elfshname(".dynsym").shnum)
-			shsym(sh, Linklookup(Ctxt, ".rel.plt", 0))
-
-			sh = elfshname(".rel")
-			sh.type_ = SHT_REL
-			sh.flags = SHF_ALLOC
-			sh.entsize = ELF32RELSIZE
-			sh.addralign = 4
-			sh.link = uint32(elfshname(".dynsym").shnum)
-			shsym(sh, Linklookup(Ctxt, ".rel", 0))
-		}
-
-		if eh.machine == EM_PPC64 {
-			sh := elfshname(".glink")
-			sh.type_ = SHT_PROGBITS
-			sh.flags = SHF_ALLOC + SHF_EXECINSTR
-			sh.addralign = 4
-			shsym(sh, Linklookup(Ctxt, ".glink", 0))
-		}
-
-		sh = elfshname(".plt")
-		sh.type_ = SHT_PROGBITS
-		sh.flags = SHF_ALLOC + SHF_EXECINSTR
-		if eh.machine == EM_X86_64 {
-			sh.entsize = 16
-		} else if eh.machine == EM_PPC64 {
-			// On ppc64, this is just a table of addresses
-			// filled by the dynamic linker
-			sh.type_ = SHT_NOBITS
-
-			sh.flags = SHF_ALLOC + SHF_WRITE
-			sh.entsize = 8
-		} else {
-			sh.entsize = 4
-		}
-		sh.addralign = sh.entsize
-		shsym(sh, Linklookup(Ctxt, ".plt", 0))
-
-		// On ppc64, .got comes from the input files, so don't
-		// create it here, and .got.plt is not used.
-		if eh.machine != EM_PPC64 {
-			sh := elfshname(".got")
-			sh.type_ = SHT_PROGBITS
-			sh.flags = SHF_ALLOC + SHF_WRITE
-			sh.entsize = uint64(Thearch.Regsize)
-			sh.addralign = uint64(Thearch.Regsize)
-			shsym(sh, Linklookup(Ctxt, ".got", 0))
-
-			sh = elfshname(".got.plt")
-			sh.type_ = SHT_PROGBITS
-			sh.flags = SHF_ALLOC + SHF_WRITE
-			sh.entsize = uint64(Thearch.Regsize)
-			sh.addralign = uint64(Thearch.Regsize)
-			shsym(sh, Linklookup(Ctxt, ".got.plt", 0))
-		}
-
-		sh = elfshname(".hash")
-		sh.type_ = SHT_HASH
-		sh.flags = SHF_ALLOC
-		sh.entsize = 4
-		sh.addralign = uint64(Thearch.Regsize)
-		sh.link = uint32(elfshname(".dynsym").shnum)
-		shsym(sh, Linklookup(Ctxt, ".hash", 0))
-
-		/* sh and PT_DYNAMIC for .dynamic section */
-		sh = elfshname(".dynamic")
-
-		sh.type_ = SHT_DYNAMIC
-		sh.flags = SHF_ALLOC + SHF_WRITE
-		sh.entsize = 2 * uint64(Thearch.Regsize)
-		sh.addralign = uint64(Thearch.Regsize)
-		sh.link = uint32(elfshname(".dynstr").shnum)
-		shsym(sh, Linklookup(Ctxt, ".dynamic", 0))
-		ph := newElfPhdr()
-		ph.type_ = PT_DYNAMIC
-		ph.flags = PF_R + PF_W
-		phsh(ph, sh)
-
-		/*
-		 * Thread-local storage segment (really just size).
-		 */
-		// Do not emit PT_TLS for OpenBSD since ld.so(1) does
-		// not currently support it. This is handled
-		// appropriately in runtime/cgo.
-		if Ctxt.Tlsoffset != 0 && HEADTYPE != obj.Hopenbsd {
-			ph := newElfPhdr()
-			ph.type_ = PT_TLS
-			ph.flags = PF_R
-			ph.memsz = uint64(-Ctxt.Tlsoffset)
-			ph.align = uint64(Thearch.Regsize)
-		}
-	}
-
-	if HEADTYPE == obj.Hlinux {
-		ph := newElfPhdr()
-		ph.type_ = PT_GNU_STACK
-		ph.flags = PF_W + PF_R
-		ph.align = uint64(Thearch.Regsize)
-
-		ph = newElfPhdr()
-		ph.type_ = PT_PAX_FLAGS
-		ph.flags = 0x2a00 // mprotect, randexec, emutramp disabled
-		ph.align = uint64(Thearch.Regsize)
-	}
-
-elfobj:
-	sh := elfshname(".shstrtab")
-	sh.type_ = SHT_STRTAB
-	sh.addralign = 1
-	shsym(sh, Linklookup(Ctxt, ".shstrtab", 0))
-	eh.shstrndx = uint16(sh.shnum)
-
-	// put these sections early in the list
-	if Debug['s'] == 0 {
-		elfshname(".symtab")
-		elfshname(".strtab")
-	}
-
-	for sect := Segtext.Sect; sect != nil; sect = sect.Next {
-		elfshbits(sect)
-	}
-	for sect := Segrodata.Sect; sect != nil; sect = sect.Next {
-		elfshbits(sect)
-	}
-	for sect := Segdata.Sect; sect != nil; sect = sect.Next {
-		elfshbits(sect)
-	}
-
-	if Linkmode == LinkExternal {
-		for sect := Segtext.Sect; sect != nil; sect = sect.Next {
-			elfshreloc(sect)
-		}
-		for sect := Segrodata.Sect; sect != nil; sect = sect.Next {
-			elfshreloc(sect)
-		}
-		for sect := Segdata.Sect; sect != nil; sect = sect.Next {
-			elfshreloc(sect)
-		}
-
-		// add a .note.GNU-stack section to mark the stack as non-executable
-		sh := elfshname(".note.GNU-stack")
-
-		sh.type_ = SHT_PROGBITS
-		sh.addralign = 1
-		sh.flags = 0
-	}
-
-	// generate .tbss section for dynamic internal linking (except for OpenBSD)
-	// external linking generates .tbss in data.c
-	if Linkmode == LinkInternal && Debug['d'] == 0 && HEADTYPE != obj.Hopenbsd {
-		sh := elfshname(".tbss")
-		sh.type_ = SHT_NOBITS
-		sh.addralign = uint64(Thearch.Regsize)
-		sh.size = uint64(-Ctxt.Tlsoffset)
-		sh.flags = SHF_ALLOC | SHF_TLS | SHF_WRITE
-	}
-
-	if Debug['s'] == 0 {
-		sh := elfshname(".symtab")
-		sh.type_ = SHT_SYMTAB
-		sh.off = uint64(symo)
-		sh.size = uint64(Symsize)
-		sh.addralign = uint64(Thearch.Regsize)
-		sh.entsize = 8 + 2*uint64(Thearch.Regsize)
-		sh.link = uint32(elfshname(".strtab").shnum)
-		sh.info = uint32(elfglobalsymndx)
-
-		sh = elfshname(".strtab")
-		sh.type_ = SHT_STRTAB
-		sh.off = uint64(symo) + uint64(Symsize)
-		sh.size = uint64(len(Elfstrdat))
-		sh.addralign = 1
-
-		dwarfaddelfheaders()
-	}
-
-	/* Main header */
-	eh.ident[EI_MAG0] = '\177'
-
-	eh.ident[EI_MAG1] = 'E'
-	eh.ident[EI_MAG2] = 'L'
-	eh.ident[EI_MAG3] = 'F'
-	if HEADTYPE == obj.Hfreebsd {
-		eh.ident[EI_OSABI] = ELFOSABI_FREEBSD
-	} else if HEADTYPE == obj.Hnetbsd {
-		eh.ident[EI_OSABI] = ELFOSABI_NETBSD
-	} else if HEADTYPE == obj.Hopenbsd {
-		eh.ident[EI_OSABI] = ELFOSABI_OPENBSD
-	} else if HEADTYPE == obj.Hdragonfly {
-		eh.ident[EI_OSABI] = ELFOSABI_NONE
-	}
-	if elf64 {
-		eh.ident[EI_CLASS] = ELFCLASS64
-	} else {
-		eh.ident[EI_CLASS] = ELFCLASS32
-	}
-	if Ctxt.Arch.ByteOrder == binary.BigEndian {
-		eh.ident[EI_DATA] = ELFDATA2MSB
-	} else {
-		eh.ident[EI_DATA] = ELFDATA2LSB
-	}
-	eh.ident[EI_VERSION] = EV_CURRENT
-
-	if Linkmode == LinkExternal {
-		eh.type_ = ET_REL
-	} else {
-		eh.type_ = ET_EXEC
-	}
-
-	if Linkmode != LinkExternal {
-		eh.entry = uint64(Entryvalue())
-	}
-
-	eh.version = EV_CURRENT
-
-	if pph != nil {
-		pph.filesz = uint64(eh.phnum) * uint64(eh.phentsize)
-		pph.memsz = pph.filesz
-	}
-
-	Cseek(0)
-	a := int64(0)
-	a += int64(elfwritehdr())
-	a += int64(elfwritephdrs())
-	a += int64(elfwriteshdrs())
-	if Debug['d'] == 0 {
-		a += int64(elfwriteinterp())
-	}
-	if Linkmode != LinkExternal {
-		if HEADTYPE == obj.Hnetbsd {
-			a += int64(elfwritenetbsdsig())
-		}
-		if HEADTYPE == obj.Hopenbsd {
-			a += int64(elfwriteopenbsdsig())
-		}
-		if len(buildinfo) > 0 {
-			a += int64(elfwritebuildinfo())
-		}
-		if buildid != "" {
-			a += int64(elfwritegobuildid())
-		}
-	}
-
-	if a > elfreserve {
-		Diag("ELFRESERVE too small: %d > %d", a, elfreserve)
-	}
-}
-
-func Elfadddynsym(ctxt *Link, s *LSym) {
-	if elf64 {
-		s.Dynid = int32(Nelfsym)
-		Nelfsym++
-
-		d := Linklookup(ctxt, ".dynsym", 0)
-
-		name := s.Extname
-		Adduint32(ctxt, d, uint32(Addstring(Linklookup(ctxt, ".dynstr", 0), name)))
-
-		/* type */
-		t := STB_GLOBAL << 4
-
-		if s.Cgoexport != 0 && s.Type&obj.SMASK == obj.STEXT {
-			t |= STT_FUNC
-		} else {
-			t |= STT_OBJECT
-		}
-		Adduint8(ctxt, d, uint8(t))
-
-		/* reserved */
-		Adduint8(ctxt, d, 0)
-
-		/* section where symbol is defined */
-		if s.Type == obj.SDYNIMPORT {
-			Adduint16(ctxt, d, SHN_UNDEF)
-		} else {
-			Adduint16(ctxt, d, 1)
-		}
-
-		/* value */
-		if s.Type == obj.SDYNIMPORT {
-			Adduint64(ctxt, d, 0)
-		} else {
-			Addaddr(ctxt, d, s)
-		}
-
-		/* size of object */
-		Adduint64(ctxt, d, uint64(s.Size))
-
-		if Thearch.Thechar == '6' && s.Cgoexport&CgoExportDynamic == 0 && s.Dynimplib != "" && !seenlib[s.Dynimplib] {
-			Elfwritedynent(Linklookup(ctxt, ".dynamic", 0), DT_NEEDED, uint64(Addstring(Linklookup(ctxt, ".dynstr", 0), s.Dynimplib)))
-		}
-	} else {
-		s.Dynid = int32(Nelfsym)
-		Nelfsym++
-
-		d := Linklookup(ctxt, ".dynsym", 0)
-
-		/* name */
-		name := s.Extname
-
-		Adduint32(ctxt, d, uint32(Addstring(Linklookup(ctxt, ".dynstr", 0), name)))
-
-		/* value */
-		if s.Type == obj.SDYNIMPORT {
-			Adduint32(ctxt, d, 0)
-		} else {
-			Addaddr(ctxt, d, s)
-		}
-
-		/* size */
-		Adduint32(ctxt, d, 0)
-
-		/* type */
-		t := STB_GLOBAL << 4
-
-		// TODO(mwhudson): presumably the behaviour should actually be the same on both arm and 386.
-		if Thearch.Thechar == '8' && s.Cgoexport != 0 && s.Type&obj.SMASK == obj.STEXT {
-			t |= STT_FUNC
-		} else if Thearch.Thechar == '5' && s.Cgoexport&CgoExportDynamic != 0 && s.Type&obj.SMASK == obj.STEXT {
-			t |= STT_FUNC
-		} else {
-			t |= STT_OBJECT
-		}
-		Adduint8(ctxt, d, uint8(t))
-		Adduint8(ctxt, d, 0)
-
-		/* shndx */
-		if s.Type == obj.SDYNIMPORT {
-			Adduint16(ctxt, d, SHN_UNDEF)
-		} else {
-			Adduint16(ctxt, d, 1)
-		}
-	}
-}
-
-func ELF32_R_SYM(info uint32) uint32 {
-	return info >> 8
-}
-
-func ELF32_R_TYPE(info uint32) uint32 {
-	return uint32(uint8(info))
-}
-
-func ELF32_R_INFO(sym uint32, type_ uint32) uint32 {
-	return sym<<8 | type_
-}
-
-func ELF32_ST_BIND(info uint8) uint8 {
-	return info >> 4
-}
-
-func ELF32_ST_TYPE(info uint8) uint8 {
-	return info & 0xf
-}
-
-func ELF32_ST_INFO(bind uint8, type_ uint8) uint8 {
-	return bind<<4 | type_&0xf
-}
-
-func ELF32_ST_VISIBILITY(oth uint8) uint8 {
-	return oth & 3
-}
-
-func ELF64_R_SYM(info uint64) uint32 {
-	return uint32(info >> 32)
-}
-
-func ELF64_R_TYPE(info uint64) uint32 {
-	return uint32(info)
-}
-
-func ELF64_R_INFO(sym uint32, type_ uint32) uint64 {
-	return uint64(sym)<<32 | uint64(type_)
-}
-
-func ELF64_ST_BIND(info uint8) uint8 {
-	return info >> 4
-}
-
-func ELF64_ST_TYPE(info uint8) uint8 {
-	return info & 0xf
-}
-
-func ELF64_ST_INFO(bind uint8, type_ uint8) uint8 {
-	return bind<<4 | type_&0xf
-}
-
-func ELF64_ST_VISIBILITY(oth uint8) uint8 {
-	return oth & 3
-}
diff --git a/src/cmd/link/internal/ld/go.go b/src/cmd/link/internal/ld/go.go
deleted file mode 100644
index 80a6c6e..0000000
--- a/src/cmd/link/internal/ld/go.go
+++ /dev/null
@@ -1,869 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// go-specific code shared across loaders (5l, 6l, 8l).
-
-package ld
-
-import (
-	"bytes"
-	"cmd/internal/obj"
-	"fmt"
-	"os"
-	"strconv"
-	"strings"
-)
-
-// go-specific code shared across loaders (5l, 6l, 8l).
-
-// replace all "". with pkg.
-func expandpkg(t0 string, pkg string) string {
-	return strings.Replace(t0, `"".`, pkg+".", -1)
-}
-
-// accumulate all type information from .6 files.
-// check for inconsistencies.
-
-// TODO:
-//	generate debugging section in binary.
-//	once the dust settles, try to move some code to
-//		libmach, so that other linkers and ar can share.
-
-/*
- *	package import data
- */
-type Import struct {
-	prefix string // "type", "var", "func", "const"
-	name   string
-	def    string
-	file   string
-}
-
-// importmap records type information about imported symbols to detect inconsistencies.
-// Entries are keyed by qualified symbol name (e.g., "runtime.Callers" or "net/url.Error").
-var importmap = map[string]*Import{}
-
-func lookupImport(name string) *Import {
-	if x, ok := importmap[name]; ok {
-		return x
-	}
-	x := &Import{name: name}
-	importmap[name] = x
-	return x
-}
-
-func ldpkg(f *obj.Biobuf, pkg string, length int64, filename string, whence int) {
-	var p0, p1 int
-
-	if Debug['g'] != 0 {
-		return
-	}
-
-	if int64(int(length)) != length {
-		fmt.Fprintf(os.Stderr, "%s: too much pkg data in %s\n", os.Args[0], filename)
-		if Debug['u'] != 0 {
-			errorexit()
-		}
-		return
-	}
-
-	bdata := make([]byte, length)
-	if int64(obj.Bread(f, bdata)) != length {
-		fmt.Fprintf(os.Stderr, "%s: short pkg read %s\n", os.Args[0], filename)
-		if Debug['u'] != 0 {
-			errorexit()
-		}
-		return
-	}
-	data := string(bdata)
-
-	// first \n$$ marks beginning of exports - skip rest of line
-	p0 = strings.Index(data, "\n$$")
-	if p0 < 0 {
-		if Debug['u'] != 0 && whence != ArchiveObj {
-			Exitf("cannot find export data in %s", filename)
-		}
-		return
-	}
-
-	p0 += 3
-	for p0 < len(data) && data[p0] != '\n' {
-		p0++
-	}
-
-	// second marks end of exports / beginning of local data
-	p1 = strings.Index(data[p0:], "\n$$")
-	if p1 < 0 {
-		fmt.Fprintf(os.Stderr, "%s: cannot find end of exports in %s\n", os.Args[0], filename)
-		if Debug['u'] != 0 {
-			errorexit()
-		}
-		return
-	}
-	p1 += p0
-
-	for p0 < p1 && (data[p0] == ' ' || data[p0] == '\t' || data[p0] == '\n') {
-		p0++
-	}
-	if p0 < p1 {
-		if !strings.HasPrefix(data[p0:], "package ") {
-			fmt.Fprintf(os.Stderr, "%s: bad package section in %s - %.20s\n", os.Args[0], filename, data[p0:])
-			if Debug['u'] != 0 {
-				errorexit()
-			}
-			return
-		}
-
-		p0 += 8
-		for p0 < p1 && (data[p0] == ' ' || data[p0] == '\t' || data[p0] == '\n') {
-			p0++
-		}
-		pname := p0
-		for p0 < p1 && data[p0] != ' ' && data[p0] != '\t' && data[p0] != '\n' {
-			p0++
-		}
-		if Debug['u'] != 0 && whence != ArchiveObj && (p0+6 > p1 || !strings.HasPrefix(data[p0:], " safe\n")) {
-			Exitf("load of unsafe package %s", filename)
-		}
-
-		name := data[pname:p0]
-		for p0 < p1 && data[p0] != '\n' {
-			p0++
-		}
-		if p0 < p1 {
-			p0++
-		}
-
-		if pkg == "main" && name != "main" {
-			Exitf("%s: not package main (package %s)", filename, name)
-		}
-
-		loadpkgdata(filename, pkg, data[p0:p1])
-	}
-
-	// __.PKGDEF has no cgo section - those are in the C compiler-generated object files.
-	if whence == Pkgdef {
-		return
-	}
-
-	// look for cgo section
-	p0 = strings.Index(data[p1:], "\n$$  // cgo")
-	if p0 >= 0 {
-		p0 += p1
-		i := strings.IndexByte(data[p0+1:], '\n')
-		if i < 0 {
-			fmt.Fprintf(os.Stderr, "%s: found $$ // cgo but no newline in %s\n", os.Args[0], filename)
-			if Debug['u'] != 0 {
-				errorexit()
-			}
-			return
-		}
-		p0 += 1 + i
-
-		p1 = strings.Index(data[p0:], "\n$$")
-		if p1 < 0 {
-			p1 = strings.Index(data[p0:], "\n!\n")
-		}
-		if p1 < 0 {
-			fmt.Fprintf(os.Stderr, "%s: cannot find end of // cgo section in %s\n", os.Args[0], filename)
-			if Debug['u'] != 0 {
-				errorexit()
-			}
-			return
-		}
-		p1 += p0
-
-		loadcgo(filename, pkg, data[p0:p1])
-	}
-}
-
-func loadpkgdata(file string, pkg string, data string) {
-	var prefix string
-	var name string
-	var def string
-
-	p := data
-	for parsepkgdata(file, pkg, &p, &prefix, &name, &def) > 0 {
-		x := lookupImport(name)
-		if x.prefix == "" {
-			x.prefix = prefix
-			x.def = def
-			x.file = file
-		} else if x.prefix != prefix {
-			fmt.Fprintf(os.Stderr, "%s: conflicting definitions for %s\n", os.Args[0], name)
-			fmt.Fprintf(os.Stderr, "%s:\t%s %s ...\n", x.file, x.prefix, name)
-			fmt.Fprintf(os.Stderr, "%s:\t%s %s ...\n", file, prefix, name)
-			nerrors++
-		} else if x.def != def {
-			fmt.Fprintf(os.Stderr, "%s: conflicting definitions for %s\n", os.Args[0], name)
-			fmt.Fprintf(os.Stderr, "%s:\t%s %s %s\n", x.file, x.prefix, name, x.def)
-			fmt.Fprintf(os.Stderr, "%s:\t%s %s %s\n", file, prefix, name, def)
-			nerrors++
-		}
-	}
-}
-
-func parsepkgdata(file string, pkg string, pp *string, prefixp *string, namep *string, defp *string) int {
-	// skip white space
-	p := *pp
-
-loop:
-	for len(p) > 0 && (p[0] == ' ' || p[0] == '\t' || p[0] == '\n') {
-		p = p[1:]
-	}
-	if len(p) == 0 || strings.HasPrefix(p, "$$\n") {
-		return 0
-	}
-
-	// prefix: (var|type|func|const)
-	prefix := p
-
-	if len(p) < 7 {
-		return -1
-	}
-	if strings.HasPrefix(p, "var ") {
-		p = p[4:]
-	} else if strings.HasPrefix(p, "type ") {
-		p = p[5:]
-	} else if strings.HasPrefix(p, "func ") {
-		p = p[5:]
-	} else if strings.HasPrefix(p, "const ") {
-		p = p[6:]
-	} else if strings.HasPrefix(p, "import ") {
-		p = p[7:]
-		for len(p) > 0 && p[0] != ' ' {
-			p = p[1:]
-		}
-		p = p[1:]
-		line := p
-		for len(p) > 0 && p[0] != '\n' {
-			p = p[1:]
-		}
-		if len(p) == 0 {
-			fmt.Fprintf(os.Stderr, "%s: %s: confused in import line\n", os.Args[0], file)
-			nerrors++
-			return -1
-		}
-		line = line[:len(line)-len(p)]
-		line = strings.TrimSuffix(line, " // indirect")
-		path, err := strconv.Unquote(line)
-		if err != nil {
-			fmt.Fprintf(os.Stderr, "%s: %s: confused in import path: %q\n", os.Args[0], file, line)
-			nerrors++
-			return -1
-		}
-		p = p[1:]
-		imported(pkg, path)
-		goto loop
-	} else {
-		fmt.Fprintf(os.Stderr, "%s: %s: confused in pkg data near <<%.40s>>\n", os.Args[0], file, prefix)
-		nerrors++
-		return -1
-	}
-
-	prefix = prefix[:len(prefix)-len(p)-1]
-
-	// name: a.b followed by space
-	name := p
-
-	inquote := false
-	for len(p) > 0 {
-		if p[0] == ' ' && !inquote {
-			break
-		}
-
-		if p[0] == '\\' {
-			p = p[1:]
-		} else if p[0] == '"' {
-			inquote = !inquote
-		}
-
-		p = p[1:]
-	}
-
-	if len(p) == 0 {
-		return -1
-	}
-	name = name[:len(name)-len(p)]
-	p = p[1:]
-
-	// def: free form to new line
-	def := p
-
-	for len(p) > 0 && p[0] != '\n' {
-		p = p[1:]
-	}
-	if len(p) == 0 {
-		return -1
-	}
-	def = def[:len(def)-len(p)]
-	var defbuf *bytes.Buffer
-	p = p[1:]
-
-	// include methods on successive lines in def of named type
-	var meth string
-	for parsemethod(&p, &meth) > 0 {
-		if defbuf == nil {
-			defbuf = new(bytes.Buffer)
-			defbuf.WriteString(def)
-		}
-		defbuf.WriteString("\n\t")
-		defbuf.WriteString(meth)
-	}
-	if defbuf != nil {
-		def = defbuf.String()
-	}
-
-	name = expandpkg(name, pkg)
-	def = expandpkg(def, pkg)
-
-	// done
-	*pp = p
-
-	*prefixp = prefix
-	*namep = name
-	*defp = def
-	return 1
-}
-
-func parsemethod(pp *string, methp *string) int {
-	// skip white space
-	p := *pp
-
-	for len(p) > 0 && (p[0] == ' ' || p[0] == '\t') {
-		p = p[1:]
-	}
-	if len(p) == 0 {
-		return 0
-	}
-
-	// might be a comment about the method
-	if strings.HasPrefix(p, "//") {
-		goto useline
-	}
-
-	// if it says "func (", it's a method
-	if strings.HasPrefix(p, "func (") {
-		goto useline
-	}
-	return 0
-
-	// definition to end of line
-useline:
-	*methp = p
-
-	for len(p) > 0 && p[0] != '\n' {
-		p = p[1:]
-	}
-	if len(p) == 0 {
-		fmt.Fprintf(os.Stderr, "%s: lost end of line in method definition\n", os.Args[0])
-		*pp = ""
-		return -1
-	}
-
-	*methp = (*methp)[:len(*methp)-len(p)]
-	*pp = p[1:]
-	return 1
-}
-
-func loadcgo(file string, pkg string, p string) {
-	var next string
-	var q string
-	var f []string
-	var local string
-	var remote string
-	var lib string
-	var s *LSym
-
-	p0 := ""
-	for ; p != ""; p = next {
-		if i := strings.Index(p, "\n"); i >= 0 {
-			p, next = p[:i], p[i+1:]
-		} else {
-			next = ""
-		}
-
-		p0 = p // save for error message
-		f = tokenize(p)
-		if len(f) == 0 {
-			continue
-		}
-
-		if f[0] == "cgo_import_dynamic" {
-			if len(f) < 2 || len(f) > 4 {
-				goto err
-			}
-
-			local = f[1]
-			remote = local
-			if len(f) > 2 {
-				remote = f[2]
-			}
-			lib = ""
-			if len(f) > 3 {
-				lib = f[3]
-			}
-
-			if Debug['d'] != 0 {
-				fmt.Fprintf(os.Stderr, "%s: %s: cannot use dynamic imports with -d flag\n", os.Args[0], file)
-				nerrors++
-				return
-			}
-
-			if local == "_" && remote == "_" {
-				// allow #pragma dynimport _ _ "foo.so"
-				// to force a link of foo.so.
-				havedynamic = 1
-
-				if HEADTYPE == obj.Hdarwin {
-					Machoadddynlib(lib)
-				} else {
-					dynlib = append(dynlib, lib)
-				}
-				continue
-			}
-
-			local = expandpkg(local, pkg)
-			q = ""
-			if i := strings.Index(remote, "#"); i >= 0 {
-				remote, q = remote[:i], remote[i+1:]
-			}
-			s = Linklookup(Ctxt, local, 0)
-			if local != f[1] {
-			}
-			if s.Type == 0 || s.Type == obj.SXREF || s.Type == obj.SHOSTOBJ {
-				s.Dynimplib = lib
-				s.Extname = remote
-				s.Dynimpvers = q
-				if s.Type != obj.SHOSTOBJ {
-					s.Type = obj.SDYNIMPORT
-				}
-				havedynamic = 1
-			}
-
-			continue
-		}
-
-		if f[0] == "cgo_import_static" {
-			if len(f) != 2 {
-				goto err
-			}
-			local = f[1]
-			s = Linklookup(Ctxt, local, 0)
-			s.Type = obj.SHOSTOBJ
-			s.Size = 0
-			continue
-		}
-
-		if f[0] == "cgo_export_static" || f[0] == "cgo_export_dynamic" {
-			if len(f) < 2 || len(f) > 3 {
-				goto err
-			}
-			local = f[1]
-			if len(f) > 2 {
-				remote = f[2]
-			} else {
-				remote = local
-			}
-			local = expandpkg(local, pkg)
-			s = Linklookup(Ctxt, local, 0)
-
-			switch Buildmode {
-			case BuildmodeCShared, BuildmodeCArchive:
-				if s == Linklookup(Ctxt, "main", 0) {
-					continue
-				}
-			}
-
-			// export overrides import, for openbsd/cgo.
-			// see issue 4878.
-			if s.Dynimplib != "" {
-				s.Dynimplib = ""
-				s.Extname = ""
-				s.Dynimpvers = ""
-				s.Type = 0
-			}
-
-			if s.Cgoexport == 0 {
-				s.Extname = remote
-				dynexp = append(dynexp, s)
-			} else if s.Extname != remote {
-				fmt.Fprintf(os.Stderr, "%s: conflicting cgo_export directives: %s as %s and %s\n", os.Args[0], s.Name, s.Extname, remote)
-				nerrors++
-				return
-			}
-
-			if f[0] == "cgo_export_static" {
-				s.Cgoexport |= CgoExportStatic
-			} else {
-				s.Cgoexport |= CgoExportDynamic
-			}
-			if local != f[1] {
-			}
-			continue
-		}
-
-		if f[0] == "cgo_dynamic_linker" {
-			if len(f) != 2 {
-				goto err
-			}
-
-			if Debug['I'] == 0 {
-				if interpreter != "" && interpreter != f[1] {
-					fmt.Fprintf(os.Stderr, "%s: conflict dynlinker: %s and %s\n", os.Args[0], interpreter, f[1])
-					nerrors++
-					return
-				}
-
-				interpreter = f[1]
-			}
-
-			continue
-		}
-
-		if f[0] == "cgo_ldflag" {
-			if len(f) != 2 {
-				goto err
-			}
-			ldflag = append(ldflag, f[1])
-			continue
-		}
-	}
-
-	return
-
-err:
-	fmt.Fprintf(os.Stderr, "%s: %s: invalid dynimport line: %s\n", os.Args[0], file, p0)
-	nerrors++
-}
-
-var seenlib = make(map[string]bool)
-
-func adddynlib(lib string) {
-	if seenlib[lib] || Linkmode == LinkExternal {
-		return
-	}
-	seenlib[lib] = true
-
-	if Iself {
-		s := Linklookup(Ctxt, ".dynstr", 0)
-		if s.Size == 0 {
-			Addstring(s, "")
-		}
-		Elfwritedynent(Linklookup(Ctxt, ".dynamic", 0), DT_NEEDED, uint64(Addstring(s, lib)))
-	} else {
-		Diag("adddynlib: unsupported binary format")
-	}
-}
-
-func Adddynsym(ctxt *Link, s *LSym) {
-	if s.Dynid >= 0 || Linkmode == LinkExternal {
-		return
-	}
-
-	if Iself {
-		Elfadddynsym(ctxt, s)
-	} else if HEADTYPE == obj.Hdarwin {
-		Diag("adddynsym: missed symbol %s (%s)", s.Name, s.Extname)
-	} else if HEADTYPE == obj.Hwindows {
-		// already taken care of
-	} else {
-		Diag("adddynsym: unsupported binary format")
-	}
-}
-
-var markq *LSym
-
-var emarkq *LSym
-
-func mark1(s *LSym, parent *LSym) {
-	if s == nil || s.Reachable {
-		return
-	}
-	if strings.HasPrefix(s.Name, "go.weak.") {
-		return
-	}
-	s.Reachable = true
-	s.Reachparent = parent
-	if markq == nil {
-		markq = s
-	} else {
-		emarkq.Queue = s
-	}
-	emarkq = s
-}
-
-func mark(s *LSym) {
-	mark1(s, nil)
-}
-
-func markflood() {
-	var a *Auto
-	var i int
-
-	for s := markq; s != nil; s = s.Queue {
-		if s.Type == obj.STEXT {
-			if Debug['v'] > 1 {
-				fmt.Fprintf(&Bso, "marktext %s\n", s.Name)
-			}
-			for a = s.Autom; a != nil; a = a.Link {
-				mark1(a.Gotype, s)
-			}
-		}
-
-		for i = 0; i < len(s.R); i++ {
-			mark1(s.R[i].Sym, s)
-		}
-		if s.Pcln != nil {
-			for i = 0; i < s.Pcln.Nfuncdata; i++ {
-				mark1(s.Pcln.Funcdata[i], s)
-			}
-		}
-
-		mark1(s.Gotype, s)
-		mark1(s.Sub, s)
-		mark1(s.Outer, s)
-	}
-}
-
-var markextra = []string{
-	"runtime.morestack",
-	"runtime.morestackx",
-	"runtime.morestack00",
-	"runtime.morestack10",
-	"runtime.morestack01",
-	"runtime.morestack11",
-	"runtime.morestack8",
-	"runtime.morestack16",
-	"runtime.morestack24",
-	"runtime.morestack32",
-	"runtime.morestack40",
-	"runtime.morestack48",
-	// on arm, lock in the div/mod helpers too
-	"_div",
-	"_divu",
-	"_mod",
-	"_modu",
-}
-
-func deadcode() {
-	if Debug['v'] != 0 {
-		fmt.Fprintf(&Bso, "%5.2f deadcode\n", obj.Cputime())
-	}
-
-	if Buildmode == BuildmodeShared {
-		// Mark all symbols defined in this library as reachable when
-		// building a shared library.
-		for s := Ctxt.Allsym; s != nil; s = s.Allsym {
-			if s.Type != 0 && s.Type != obj.SDYNIMPORT {
-				mark(s)
-			}
-		}
-		markflood()
-	} else {
-		mark(Linklookup(Ctxt, INITENTRY, 0))
-		if Linkshared && Buildmode == BuildmodeExe {
-			mark(Linkrlookup(Ctxt, "main.main", 0))
-			mark(Linkrlookup(Ctxt, "main.init", 0))
-		}
-		for i := 0; i < len(markextra); i++ {
-			mark(Linklookup(Ctxt, markextra[i], 0))
-		}
-
-		for i := 0; i < len(dynexp); i++ {
-			mark(dynexp[i])
-		}
-		markflood()
-
-		// keep each beginning with 'typelink.' if the symbol it points at is being kept.
-		for s := Ctxt.Allsym; s != nil; s = s.Allsym {
-			if strings.HasPrefix(s.Name, "go.typelink.") {
-				s.Reachable = len(s.R) == 1 && s.R[0].Sym.Reachable
-			}
-		}
-
-		// remove dead text but keep file information (z symbols).
-		var last *LSym
-
-		for s := Ctxt.Textp; s != nil; s = s.Next {
-			if !s.Reachable {
-				continue
-			}
-
-			// NOTE: Removing s from old textp and adding to new, shorter textp.
-			if last == nil {
-				Ctxt.Textp = s
-			} else {
-				last.Next = s
-			}
-			last = s
-		}
-
-		if last == nil {
-			Ctxt.Textp = nil
-			Ctxt.Etextp = nil
-		} else {
-			last.Next = nil
-			Ctxt.Etextp = last
-		}
-	}
-
-	for s := Ctxt.Allsym; s != nil; s = s.Allsym {
-		if strings.HasPrefix(s.Name, "go.weak.") {
-			s.Special = 1 // do not lay out in data segment
-			s.Reachable = true
-			s.Hide = 1
-		}
-	}
-
-	// record field tracking references
-	var buf bytes.Buffer
-	var p *LSym
-	for s := Ctxt.Allsym; s != nil; s = s.Allsym {
-		if strings.HasPrefix(s.Name, "go.track.") {
-			s.Special = 1 // do not lay out in data segment
-			s.Hide = 1
-			if s.Reachable {
-				buf.WriteString(s.Name[9:])
-				for p = s.Reachparent; p != nil; p = p.Reachparent {
-					buf.WriteString("\t")
-					buf.WriteString(p.Name)
-				}
-				buf.WriteString("\n")
-			}
-
-			s.Type = obj.SCONST
-			s.Value = 0
-		}
-	}
-
-	if tracksym == "" {
-		return
-	}
-	s := Linklookup(Ctxt, tracksym, 0)
-	if !s.Reachable {
-		return
-	}
-	addstrdata(tracksym, buf.String())
-}
-
-func doweak() {
-	var t *LSym
-
-	// resolve weak references only if
-	// target symbol will be in binary anyway.
-	for s := Ctxt.Allsym; s != nil; s = s.Allsym {
-		if strings.HasPrefix(s.Name, "go.weak.") {
-			t = Linkrlookup(Ctxt, s.Name[8:], int(s.Version))
-			if t != nil && t.Type != 0 && t.Reachable {
-				s.Value = t.Value
-				s.Type = t.Type
-				s.Outer = t
-			} else {
-				s.Type = obj.SCONST
-				s.Value = 0
-			}
-
-			continue
-		}
-	}
-}
-
-func addexport() {
-	if HEADTYPE == obj.Hdarwin {
-		return
-	}
-
-	for _, exp := range dynexp {
-		Adddynsym(Ctxt, exp)
-	}
-	for _, lib := range dynlib {
-		adddynlib(lib)
-	}
-}
-
-type Pkg struct {
-	mark    bool
-	checked bool
-	path    string
-	impby   []*Pkg
-}
-
-var (
-	// pkgmap records the imported-by relationship between packages.
-	// Entries are keyed by package path (e.g., "runtime" or "net/url").
-	pkgmap = map[string]*Pkg{}
-
-	pkgall []*Pkg
-)
-
-func lookupPkg(path string) *Pkg {
-	if p, ok := pkgmap[path]; ok {
-		return p
-	}
-	p := &Pkg{path: path}
-	pkgmap[path] = p
-	pkgall = append(pkgall, p)
-	return p
-}
-
-// imported records that package pkg imports package imp.
-func imported(pkg, imp string) {
-	// everyone imports runtime, even runtime.
-	if imp == "runtime" {
-		return
-	}
-
-	p := lookupPkg(pkg)
-	i := lookupPkg(imp)
-	i.impby = append(i.impby, p)
-}
-
-func (p *Pkg) cycle() *Pkg {
-	if p.checked {
-		return nil
-	}
-
-	if p.mark {
-		nerrors++
-		fmt.Printf("import cycle:\n")
-		fmt.Printf("\t%s\n", p.path)
-		return p
-	}
-
-	p.mark = true
-	for _, q := range p.impby {
-		if bad := q.cycle(); bad != nil {
-			p.mark = false
-			p.checked = true
-			fmt.Printf("\timports %s\n", p.path)
-			if bad == p {
-				return nil
-			}
-			return bad
-		}
-	}
-
-	p.checked = true
-	p.mark = false
-	return nil
-}
-
-func importcycles() {
-	for _, p := range pkgall {
-		p.cycle()
-	}
-}
-
-func setlinkmode(arg string) {
-	if arg == "internal" {
-		Linkmode = LinkInternal
-	} else if arg == "external" {
-		Linkmode = LinkExternal
-	} else if arg == "auto" {
-		Linkmode = LinkAuto
-	} else {
-		Exitf("unknown link mode -linkmode %s", arg)
-	}
-}
diff --git a/src/cmd/link/internal/ld/ld.go b/src/cmd/link/internal/ld/ld.go
deleted file mode 100644
index 1068bdd..0000000
--- a/src/cmd/link/internal/ld/ld.go
+++ /dev/null
@@ -1,130 +0,0 @@
-// Derived from Inferno utils/6l/obj.c and utils/6l/span.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6l/obj.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6l/span.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package ld
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-	"io/ioutil"
-	"os"
-	"path"
-	"strconv"
-	"strings"
-)
-
-func addlib(ctxt *Link, src string, obj string, pathname string) {
-	name := path.Clean(pathname)
-
-	// runtime.a -> runtime, runtime.6 -> runtime
-	pkg := name
-	if len(pkg) >= 2 && pkg[len(pkg)-2] == '.' {
-		pkg = pkg[:len(pkg)-2]
-	}
-
-	// already loaded?
-	for i := 0; i < len(ctxt.Library); i++ {
-		if ctxt.Library[i].Pkg == pkg {
-			return
-		}
-	}
-
-	var pname string
-	isshlib := false
-	if (ctxt.Windows == 0 && strings.HasPrefix(name, "/")) || (ctxt.Windows != 0 && len(name) >= 2 && name[1] == ':') {
-		pname = name
-	} else {
-		// try dot, -L "libdir", and then goroot.
-		for _, dir := range ctxt.Libdir {
-			if Linkshared {
-				pname = dir + "/" + pkg + ".shlibname"
-				if _, err := os.Stat(pname); err == nil {
-					isshlib = true
-					break
-				}
-			}
-			pname = dir + "/" + name
-			if _, err := os.Stat(pname); err == nil {
-				break
-			}
-		}
-	}
-
-	pname = path.Clean(pname)
-
-	if ctxt.Debugvlog > 1 && ctxt.Bso != nil {
-		fmt.Fprintf(ctxt.Bso, "%5.2f addlib: %s %s pulls in %s isshlib %v\n", elapsed(), obj, src, pname, isshlib)
-	}
-
-	if isshlib {
-		addlibpath(ctxt, src, obj, "", pkg, pname)
-	} else {
-		addlibpath(ctxt, src, obj, pname, pkg, "")
-	}
-}
-
-/*
- * add library to library list.
- *	srcref: src file referring to package
- *	objref: object file referring to package
- *	file: object file, e.g., /home/rsc/go/pkg/container/vector.a
- *	pkg: package import path, e.g. container/vector
- */
-func addlibpath(ctxt *Link, srcref string, objref string, file string, pkg string, shlibnamefile string) {
-	for i := 0; i < len(ctxt.Library); i++ {
-		if pkg == ctxt.Library[i].Pkg {
-			return
-		}
-	}
-
-	if ctxt.Debugvlog > 1 && ctxt.Bso != nil {
-		fmt.Fprintf(ctxt.Bso, "%5.2f addlibpath: srcref: %s objref: %s file: %s pkg: %s shlibnamefile: %s\n", obj.Cputime(), srcref, objref, file, pkg, shlibnamefile)
-	}
-
-	ctxt.Library = append(ctxt.Library, &Library{})
-	l := ctxt.Library[len(ctxt.Library)-1]
-	l.Objref = objref
-	l.Srcref = srcref
-	l.File = file
-	l.Pkg = pkg
-	if shlibnamefile != "" {
-		shlibbytes, err := ioutil.ReadFile(shlibnamefile)
-		if err != nil {
-			Diag("cannot read %s: %v", shlibnamefile, err)
-		}
-		l.Shlib = strings.TrimSpace(string(shlibbytes))
-	}
-}
-
-func atolwhex(s string) int64 {
-	n, _ := strconv.ParseInt(s, 0, 64)
-	return n
-}
diff --git a/src/cmd/link/internal/ld/ldelf.go b/src/cmd/link/internal/ld/ldelf.go
deleted file mode 100644
index 3efdb75..0000000
--- a/src/cmd/link/internal/ld/ldelf.go
+++ /dev/null
@@ -1,1019 +0,0 @@
-package ld
-
-import (
-	"bytes"
-	"cmd/internal/obj"
-	"encoding/binary"
-	"fmt"
-	"log"
-	"sort"
-	"strings"
-)
-
-/*
-Derived from Plan 9 from User Space's src/libmach/elf.h, elf.c
-http://code.swtch.com/plan9port/src/tip/src/libmach/
-
-	Copyright © 2004 Russ Cox.
-	Portions Copyright © 2008-2010 Google Inc.
-	Portions Copyright © 2010 The Go Authors.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-*/
-const (
-	ElfClassNone = 0
-	ElfClass32   = 1
-	ElfClass64   = 2
-)
-
-const (
-	ElfDataNone = 0
-	ElfDataLsb  = 1
-	ElfDataMsb  = 2
-)
-
-const (
-	ElfTypeNone         = 0
-	ElfTypeRelocatable  = 1
-	ElfTypeExecutable   = 2
-	ElfTypeSharedObject = 3
-	ElfTypeCore         = 4
-)
-
-const (
-	ElfMachNone        = 0
-	ElfMach32100       = 1
-	ElfMachSparc       = 2
-	ElfMach386         = 3
-	ElfMach68000       = 4
-	ElfMach88000       = 5
-	ElfMach486         = 6
-	ElfMach860         = 7
-	ElfMachMips        = 8
-	ElfMachS370        = 9
-	ElfMachMipsLe      = 10
-	ElfMachParisc      = 15
-	ElfMachVpp500      = 17
-	ElfMachSparc32Plus = 18
-	ElfMach960         = 19
-	ElfMachPower       = 20
-	ElfMachPower64     = 21
-	ElfMachS390        = 22
-	ElfMachV800        = 36
-	ElfMachFr20        = 37
-	ElfMachRh32        = 38
-	ElfMachRce         = 39
-	ElfMachArm         = 40
-	ElfMachAlpha       = 41
-	ElfMachSH          = 42
-	ElfMachSparc9      = 43
-	ElfMachAmd64       = 62
-	ElfMachArm64       = 183
-)
-
-const (
-	ElfAbiNone     = 0
-	ElfAbiSystemV  = 0
-	ElfAbiHPUX     = 1
-	ElfAbiNetBSD   = 2
-	ElfAbiLinux    = 3
-	ElfAbiSolaris  = 6
-	ElfAbiAix      = 7
-	ElfAbiIrix     = 8
-	ElfAbiFreeBSD  = 9
-	ElfAbiTru64    = 10
-	ElfAbiModesto  = 11
-	ElfAbiOpenBSD  = 12
-	ElfAbiARM      = 97
-	ElfAbiEmbedded = 255
-)
-
-const (
-	ElfSectNone      = 0
-	ElfSectProgbits  = 1
-	ElfSectSymtab    = 2
-	ElfSectStrtab    = 3
-	ElfSectRela      = 4
-	ElfSectHash      = 5
-	ElfSectDynamic   = 6
-	ElfSectNote      = 7
-	ElfSectNobits    = 8
-	ElfSectRel       = 9
-	ElfSectShlib     = 10
-	ElfSectDynsym    = 11
-	ElfSectFlagWrite = 0x1
-	ElfSectFlagAlloc = 0x2
-	ElfSectFlagExec  = 0x4
-)
-
-const (
-	ElfSymBindLocal  = 0
-	ElfSymBindGlobal = 1
-	ElfSymBindWeak   = 2
-)
-
-const (
-	ElfSymTypeNone    = 0
-	ElfSymTypeObject  = 1
-	ElfSymTypeFunc    = 2
-	ElfSymTypeSection = 3
-	ElfSymTypeFile    = 4
-)
-
-const (
-	ElfSymShnNone   = 0
-	ElfSymShnAbs    = 0xFFF1
-	ElfSymShnCommon = 0xFFF2
-)
-
-const (
-	ElfProgNone      = 0
-	ElfProgLoad      = 1
-	ElfProgDynamic   = 2
-	ElfProgInterp    = 3
-	ElfProgNote      = 4
-	ElfProgShlib     = 5
-	ElfProgPhdr      = 6
-	ElfProgFlagExec  = 0x1
-	ElfProgFlagWrite = 0x2
-	ElfProgFlagRead  = 0x4
-)
-
-const (
-	ElfNotePrStatus     = 1
-	ElfNotePrFpreg      = 2
-	ElfNotePrPsinfo     = 3
-	ElfNotePrTaskstruct = 4
-	ElfNotePrAuxv       = 6
-	ElfNotePrXfpreg     = 0x46e62b7f
-)
-
-type ElfHdrBytes struct {
-	Ident     [16]uint8
-	Type      [2]uint8
-	Machine   [2]uint8
-	Version   [4]uint8
-	Entry     [4]uint8
-	Phoff     [4]uint8
-	Shoff     [4]uint8
-	Flags     [4]uint8
-	Ehsize    [2]uint8
-	Phentsize [2]uint8
-	Phnum     [2]uint8
-	Shentsize [2]uint8
-	Shnum     [2]uint8
-	Shstrndx  [2]uint8
-}
-
-type ElfSectBytes struct {
-	Name    [4]uint8
-	Type    [4]uint8
-	Flags   [4]uint8
-	Addr    [4]uint8
-	Off     [4]uint8
-	Size    [4]uint8
-	Link    [4]uint8
-	Info    [4]uint8
-	Align   [4]uint8
-	Entsize [4]uint8
-}
-
-type ElfProgBytes struct {
-}
-
-type ElfSymBytes struct {
-	Name  [4]uint8
-	Value [4]uint8
-	Size  [4]uint8
-	Info  uint8
-	Other uint8
-	Shndx [2]uint8
-}
-
-type ElfHdrBytes64 struct {
-	Ident     [16]uint8
-	Type      [2]uint8
-	Machine   [2]uint8
-	Version   [4]uint8
-	Entry     [8]uint8
-	Phoff     [8]uint8
-	Shoff     [8]uint8
-	Flags     [4]uint8
-	Ehsize    [2]uint8
-	Phentsize [2]uint8
-	Phnum     [2]uint8
-	Shentsize [2]uint8
-	Shnum     [2]uint8
-	Shstrndx  [2]uint8
-}
-
-type ElfSectBytes64 struct {
-	Name    [4]uint8
-	Type    [4]uint8
-	Flags   [8]uint8
-	Addr    [8]uint8
-	Off     [8]uint8
-	Size    [8]uint8
-	Link    [4]uint8
-	Info    [4]uint8
-	Align   [8]uint8
-	Entsize [8]uint8
-}
-
-type ElfProgBytes64 struct {
-}
-
-type ElfSymBytes64 struct {
-	Name  [4]uint8
-	Info  uint8
-	Other uint8
-	Shndx [2]uint8
-	Value [8]uint8
-	Size  [8]uint8
-}
-
-type ElfSect struct {
-	name    string
-	nameoff uint32
-	type_   uint32
-	flags   uint64
-	addr    uint64
-	off     uint64
-	size    uint64
-	link    uint32
-	info    uint32
-	align   uint64
-	entsize uint64
-	base    []byte
-	sym     *LSym
-}
-
-type ElfObj struct {
-	f         *obj.Biobuf
-	base      int64 // offset in f where ELF begins
-	length    int64 // length of ELF
-	is64      int
-	name      string
-	e         binary.ByteOrder
-	sect      []ElfSect
-	nsect     uint
-	shstrtab  string
-	nsymtab   int
-	symtab    *ElfSect
-	symstr    *ElfSect
-	type_     uint32
-	machine   uint32
-	version   uint32
-	entry     uint64
-	phoff     uint64
-	shoff     uint64
-	flags     uint32
-	ehsize    uint32
-	phentsize uint32
-	phnum     uint32
-	shentsize uint32
-	shnum     uint32
-	shstrndx  uint32
-}
-
-type ElfSym struct {
-	name  string
-	value uint64
-	size  uint64
-	bind  uint8
-	type_ uint8
-	other uint8
-	shndx uint16
-	sym   *LSym
-}
-
-var ElfMagic = [4]uint8{0x7F, 'E', 'L', 'F'}
-
-func valuecmp(a *LSym, b *LSym) int {
-	if a.Value < b.Value {
-		return -1
-	}
-	if a.Value > b.Value {
-		return +1
-	}
-	return 0
-}
-
-func ldelf(f *obj.Biobuf, pkg string, length int64, pn string) {
-	if Debug['v'] != 0 {
-		fmt.Fprintf(&Bso, "%5.2f ldelf %s\n", obj.Cputime(), pn)
-	}
-
-	Ctxt.Version++
-	base := int32(obj.Boffset(f))
-
-	var add uint64
-	var e binary.ByteOrder
-	var elfobj *ElfObj
-	var err error
-	var flag int
-	var hdr *ElfHdrBytes
-	var hdrbuf [64]uint8
-	var info uint64
-	var is64 int
-	var j int
-	var n int
-	var name string
-	var p []byte
-	var r []Reloc
-	var rela int
-	var rp *Reloc
-	var rsect *ElfSect
-	var s *LSym
-	var sect *ElfSect
-	var sym ElfSym
-	var symbols []*LSym
-	if obj.Bread(f, hdrbuf[:]) != len(hdrbuf) {
-		goto bad
-	}
-	hdr = new(ElfHdrBytes)
-	binary.Read(bytes.NewReader(hdrbuf[:]), binary.BigEndian, hdr) // only byte arrays; byte order doesn't matter
-	if string(hdr.Ident[:4]) != "\x7FELF" {
-		goto bad
-	}
-	switch hdr.Ident[5] {
-	case ElfDataLsb:
-		e = binary.LittleEndian
-
-	case ElfDataMsb:
-		e = binary.BigEndian
-
-	default:
-		goto bad
-	}
-
-	// read header
-	elfobj = new(ElfObj)
-
-	elfobj.e = e
-	elfobj.f = f
-	elfobj.base = int64(base)
-	elfobj.length = length
-	elfobj.name = pn
-
-	is64 = 0
-	if hdr.Ident[4] == ElfClass64 {
-		is64 = 1
-		hdr := new(ElfHdrBytes64)
-		binary.Read(bytes.NewReader(hdrbuf[:]), binary.BigEndian, hdr) // only byte arrays; byte order doesn't matter
-		elfobj.type_ = uint32(e.Uint16(hdr.Type[:]))
-		elfobj.machine = uint32(e.Uint16(hdr.Machine[:]))
-		elfobj.version = e.Uint32(hdr.Version[:])
-		elfobj.phoff = e.Uint64(hdr.Phoff[:])
-		elfobj.shoff = e.Uint64(hdr.Shoff[:])
-		elfobj.flags = e.Uint32(hdr.Flags[:])
-		elfobj.ehsize = uint32(e.Uint16(hdr.Ehsize[:]))
-		elfobj.phentsize = uint32(e.Uint16(hdr.Phentsize[:]))
-		elfobj.phnum = uint32(e.Uint16(hdr.Phnum[:]))
-		elfobj.shentsize = uint32(e.Uint16(hdr.Shentsize[:]))
-		elfobj.shnum = uint32(e.Uint16(hdr.Shnum[:]))
-		elfobj.shstrndx = uint32(e.Uint16(hdr.Shstrndx[:]))
-	} else {
-		elfobj.type_ = uint32(e.Uint16(hdr.Type[:]))
-		elfobj.machine = uint32(e.Uint16(hdr.Machine[:]))
-		elfobj.version = e.Uint32(hdr.Version[:])
-		elfobj.entry = uint64(e.Uint32(hdr.Entry[:]))
-		elfobj.phoff = uint64(e.Uint32(hdr.Phoff[:]))
-		elfobj.shoff = uint64(e.Uint32(hdr.Shoff[:]))
-		elfobj.flags = e.Uint32(hdr.Flags[:])
-		elfobj.ehsize = uint32(e.Uint16(hdr.Ehsize[:]))
-		elfobj.phentsize = uint32(e.Uint16(hdr.Phentsize[:]))
-		elfobj.phnum = uint32(e.Uint16(hdr.Phnum[:]))
-		elfobj.shentsize = uint32(e.Uint16(hdr.Shentsize[:]))
-		elfobj.shnum = uint32(e.Uint16(hdr.Shnum[:]))
-		elfobj.shstrndx = uint32(e.Uint16(hdr.Shstrndx[:]))
-	}
-
-	elfobj.is64 = is64
-
-	if uint32(hdr.Ident[6]) != elfobj.version {
-		goto bad
-	}
-
-	if e.Uint16(hdr.Type[:]) != ElfTypeRelocatable {
-		Diag("%s: elf but not elf relocatable object", pn)
-		return
-	}
-
-	switch Thearch.Thechar {
-	default:
-		Diag("%s: elf %s unimplemented", pn, Thestring)
-		return
-
-	case '5':
-		if e != binary.LittleEndian || elfobj.machine != ElfMachArm || hdr.Ident[4] != ElfClass32 {
-			Diag("%s: elf object but not arm", pn)
-			return
-		}
-
-	case '6':
-		if e != binary.LittleEndian || elfobj.machine != ElfMachAmd64 || hdr.Ident[4] != ElfClass64 {
-			Diag("%s: elf object but not amd64", pn)
-			return
-		}
-
-	case '7':
-		if e != binary.LittleEndian || elfobj.machine != ElfMachArm64 || hdr.Ident[4] != ElfClass64 {
-			Diag("%s: elf object but not arm64", pn)
-			return
-		}
-
-	case '8':
-		if e != binary.LittleEndian || elfobj.machine != ElfMach386 || hdr.Ident[4] != ElfClass32 {
-			Diag("%s: elf object but not 386", pn)
-			return
-		}
-
-	case '9':
-		if elfobj.machine != ElfMachPower64 || hdr.Ident[4] != ElfClass64 {
-			Diag("%s: elf object but not ppc64", pn)
-			return
-		}
-	}
-
-	// load section list into memory.
-	elfobj.sect = make([]ElfSect, elfobj.shnum)
-
-	elfobj.nsect = uint(elfobj.shnum)
-	for i := 0; uint(i) < elfobj.nsect; i++ {
-		if obj.Bseek(f, int64(uint64(base)+elfobj.shoff+uint64(int64(i)*int64(elfobj.shentsize))), 0) < 0 {
-			goto bad
-		}
-		sect = &elfobj.sect[i]
-		if is64 != 0 {
-			var b ElfSectBytes64
-
-			if err = binary.Read(f, e, &b); err != nil {
-				goto bad
-			}
-
-			sect.nameoff = uint32(e.Uint32(b.Name[:]))
-			sect.type_ = e.Uint32(b.Type[:])
-			sect.flags = e.Uint64(b.Flags[:])
-			sect.addr = e.Uint64(b.Addr[:])
-			sect.off = e.Uint64(b.Off[:])
-			sect.size = e.Uint64(b.Size[:])
-			sect.link = e.Uint32(b.Link[:])
-			sect.info = e.Uint32(b.Info[:])
-			sect.align = e.Uint64(b.Align[:])
-			sect.entsize = e.Uint64(b.Entsize[:])
-		} else {
-			var b ElfSectBytes
-
-			if err = binary.Read(f, e, &b); err != nil {
-				goto bad
-			}
-
-			sect.nameoff = uint32(e.Uint32(b.Name[:]))
-			sect.type_ = e.Uint32(b.Type[:])
-			sect.flags = uint64(e.Uint32(b.Flags[:]))
-			sect.addr = uint64(e.Uint32(b.Addr[:]))
-			sect.off = uint64(e.Uint32(b.Off[:]))
-			sect.size = uint64(e.Uint32(b.Size[:]))
-			sect.link = e.Uint32(b.Link[:])
-			sect.info = e.Uint32(b.Info[:])
-			sect.align = uint64(e.Uint32(b.Align[:]))
-			sect.entsize = uint64(e.Uint32(b.Entsize[:]))
-		}
-	}
-
-	// read section string table and translate names
-	if elfobj.shstrndx >= uint32(elfobj.nsect) {
-		err = fmt.Errorf("shstrndx out of range %d >= %d", elfobj.shstrndx, elfobj.nsect)
-		goto bad
-	}
-
-	sect = &elfobj.sect[elfobj.shstrndx]
-	if err = elfmap(elfobj, sect); err != nil {
-		goto bad
-	}
-	for i := 0; uint(i) < elfobj.nsect; i++ {
-		if elfobj.sect[i].nameoff != 0 {
-			elfobj.sect[i].name = cstring(sect.base[elfobj.sect[i].nameoff:])
-		}
-	}
-
-	// load string table for symbols into memory.
-	elfobj.symtab = section(elfobj, ".symtab")
-
-	if elfobj.symtab == nil {
-		// our work is done here - no symbols means nothing can refer to this file
-		return
-	}
-
-	if elfobj.symtab.link <= 0 || elfobj.symtab.link >= uint32(elfobj.nsect) {
-		Diag("%s: elf object has symbol table with invalid string table link", pn)
-		return
-	}
-
-	elfobj.symstr = &elfobj.sect[elfobj.symtab.link]
-	if is64 != 0 {
-		elfobj.nsymtab = int(elfobj.symtab.size / ELF64SYMSIZE)
-	} else {
-		elfobj.nsymtab = int(elfobj.symtab.size / ELF32SYMSIZE)
-	}
-
-	if err = elfmap(elfobj, elfobj.symtab); err != nil {
-		goto bad
-	}
-	if err = elfmap(elfobj, elfobj.symstr); err != nil {
-		goto bad
-	}
-
-	// load text and data segments into memory.
-	// they are not as small as the section lists, but we'll need
-	// the memory anyway for the symbol images, so we might
-	// as well use one large chunk.
-
-	// create symbols for elfmapped sections
-	for i := 0; uint(i) < elfobj.nsect; i++ {
-		sect = &elfobj.sect[i]
-		if (sect.type_ != ElfSectProgbits && sect.type_ != ElfSectNobits) || sect.flags&ElfSectFlagAlloc == 0 {
-			continue
-		}
-		if sect.type_ != ElfSectNobits {
-			if err = elfmap(elfobj, sect); err != nil {
-				goto bad
-			}
-		}
-
-		name = fmt.Sprintf("%s(%s)", pkg, sect.name)
-		s = Linklookup(Ctxt, name, Ctxt.Version)
-
-		switch int(sect.flags) & (ElfSectFlagAlloc | ElfSectFlagWrite | ElfSectFlagExec) {
-		default:
-			err = fmt.Errorf("unexpected flags for ELF section %s", sect.name)
-			goto bad
-
-		case ElfSectFlagAlloc:
-			s.Type = obj.SRODATA
-
-		case ElfSectFlagAlloc + ElfSectFlagWrite:
-			if sect.type_ == ElfSectNobits {
-				s.Type = obj.SNOPTRBSS
-			} else {
-				s.Type = obj.SNOPTRDATA
-			}
-
-		case ElfSectFlagAlloc + ElfSectFlagExec:
-			s.Type = obj.STEXT
-		}
-
-		if sect.name == ".got" || sect.name == ".toc" {
-			s.Type = obj.SELFGOT
-		}
-		if sect.type_ == ElfSectProgbits {
-			s.P = sect.base
-			s.P = s.P[:sect.size]
-		}
-
-		s.Size = int64(sect.size)
-		s.Align = int32(sect.align)
-		sect.sym = s
-	}
-
-	// enter sub-symbols into symbol table.
-	// symbol 0 is the null symbol.
-	symbols = make([]*LSym, elfobj.nsymtab)
-
-	for i := 1; i < elfobj.nsymtab; i++ {
-		if err = readelfsym(elfobj, i, &sym, 1); err != nil {
-			goto bad
-		}
-		symbols[i] = sym.sym
-		if sym.type_ != ElfSymTypeFunc && sym.type_ != ElfSymTypeObject && sym.type_ != ElfSymTypeNone {
-			continue
-		}
-		if sym.shndx == ElfSymShnCommon {
-			s = sym.sym
-			if uint64(s.Size) < sym.size {
-				s.Size = int64(sym.size)
-			}
-			if s.Type == 0 || s.Type == obj.SXREF {
-				s.Type = obj.SNOPTRBSS
-			}
-			continue
-		}
-
-		if uint(sym.shndx) >= elfobj.nsect || sym.shndx == 0 {
-			continue
-		}
-
-		// even when we pass needSym == 1 to readelfsym, it might still return nil to skip some unwanted symbols
-		if sym.sym == nil {
-			continue
-		}
-		sect = &elfobj.sect[sym.shndx:][0]
-		if sect.sym == nil {
-			if strings.HasPrefix(sym.name, ".Linfo_string") { // clang does this
-				continue
-			}
-			Diag("%s: sym#%d: ignoring %s in section %d (type %d)", pn, i, sym.name, sym.shndx, sym.type_)
-			continue
-		}
-
-		s = sym.sym
-		if s.Outer != nil {
-			if s.Dupok != 0 {
-				continue
-			}
-			Exitf("%s: duplicate symbol reference: %s in both %s and %s", pn, s.Name, s.Outer.Name, sect.sym.Name)
-		}
-
-		s.Sub = sect.sym.Sub
-		sect.sym.Sub = s
-		s.Type = sect.sym.Type | s.Type&^obj.SMASK | obj.SSUB
-		if s.Cgoexport&CgoExportDynamic == 0 {
-			s.Dynimplib = "" // satisfy dynimport
-		}
-		s.Value = int64(sym.value)
-		s.Size = int64(sym.size)
-		s.Outer = sect.sym
-		if sect.sym.Type == obj.STEXT {
-			if s.External != 0 && s.Dupok == 0 {
-				Diag("%s: duplicate definition of %s", pn, s.Name)
-			}
-			s.External = 1
-		}
-
-		if elfobj.machine == ElfMachPower64 {
-			flag = int(sym.other) >> 5
-			if 2 <= flag && flag <= 6 {
-				s.Localentry = 1 << uint(flag-2)
-			} else if flag == 7 {
-				Diag("%s: invalid sym.other 0x%x for %s", pn, sym.other, s.Name)
-			}
-		}
-	}
-
-	// Sort outer lists by address, adding to textp.
-	// This keeps textp in increasing address order.
-	for i := 0; uint(i) < elfobj.nsect; i++ {
-		s = elfobj.sect[i].sym
-		if s == nil {
-			continue
-		}
-		if s.Sub != nil {
-			s.Sub = listsort(s.Sub, valuecmp, listsubp)
-		}
-		if s.Type == obj.STEXT {
-			if s.Onlist != 0 {
-				log.Fatalf("symbol %s listed multiple times", s.Name)
-			}
-			s.Onlist = 1
-			if Ctxt.Etextp != nil {
-				Ctxt.Etextp.Next = s
-			} else {
-				Ctxt.Textp = s
-			}
-			Ctxt.Etextp = s
-			for s = s.Sub; s != nil; s = s.Sub {
-				if s.Onlist != 0 {
-					log.Fatalf("symbol %s listed multiple times", s.Name)
-				}
-				s.Onlist = 1
-				Ctxt.Etextp.Next = s
-				Ctxt.Etextp = s
-			}
-		}
-	}
-
-	// load relocations
-	for i := 0; uint(i) < elfobj.nsect; i++ {
-		rsect = &elfobj.sect[i]
-		if rsect.type_ != ElfSectRela && rsect.type_ != ElfSectRel {
-			continue
-		}
-		if rsect.info >= uint32(elfobj.nsect) || elfobj.sect[rsect.info].base == nil {
-			continue
-		}
-		sect = &elfobj.sect[rsect.info]
-		if err = elfmap(elfobj, rsect); err != nil {
-			goto bad
-		}
-		rela = 0
-		if rsect.type_ == ElfSectRela {
-			rela = 1
-		}
-		n = int(rsect.size / uint64(4+4*is64) / uint64(2+rela))
-		r = make([]Reloc, n)
-		p = rsect.base
-		for j = 0; j < n; j++ {
-			add = 0
-			rp = &r[j]
-			if is64 != 0 {
-				// 64-bit rel/rela
-				rp.Off = int32(e.Uint64(p))
-
-				p = p[8:]
-				info = e.Uint64(p)
-				p = p[8:]
-				if rela != 0 {
-					add = e.Uint64(p)
-					p = p[8:]
-				}
-			} else {
-				// 32-bit rel/rela
-				rp.Off = int32(e.Uint32(p))
-
-				p = p[4:]
-				info = uint64(e.Uint32(p))
-				info = info>>8<<32 | info&0xff // convert to 64-bit info
-				p = p[4:]
-				if rela != 0 {
-					add = uint64(e.Uint32(p))
-					p = p[4:]
-				}
-			}
-
-			if info&0xffffffff == 0 { // skip R_*_NONE relocation
-				j--
-				n--
-				continue
-			}
-
-			if info>>32 == 0 { // absolute relocation, don't bother reading the null symbol
-				rp.Sym = nil
-			} else {
-				if err = readelfsym(elfobj, int(info>>32), &sym, 0); err != nil {
-					goto bad
-				}
-				sym.sym = symbols[info>>32]
-				if sym.sym == nil {
-					err = fmt.Errorf("%s#%d: reloc of invalid sym #%d %s shndx=%d type=%d", sect.sym.Name, j, int(info>>32), sym.name, sym.shndx, sym.type_)
-					goto bad
-				}
-
-				rp.Sym = sym.sym
-			}
-
-			rp.Type = int32(reltype(pn, int(uint32(info)), &rp.Siz))
-			if rela != 0 {
-				rp.Add = int64(add)
-			} else {
-				// load addend from image
-				if rp.Siz == 4 {
-					rp.Add = int64(e.Uint32(sect.base[rp.Off:]))
-				} else if rp.Siz == 8 {
-					rp.Add = int64(e.Uint64(sect.base[rp.Off:]))
-				} else {
-					Diag("invalid rela size %d", rp.Siz)
-				}
-			}
-
-			if rp.Siz == 2 {
-				rp.Add = int64(int16(rp.Add))
-			}
-			if rp.Siz == 4 {
-				rp.Add = int64(int32(rp.Add))
-			}
-		}
-
-		//print("rel %s %d %d %s %#llx\n", sect->sym->name, rp->type, rp->siz, rp->sym->name, rp->add);
-		sort.Sort(rbyoff(r[:n]))
-		// just in case
-
-		s = sect.sym
-		s.R = r
-		s.R = s.R[:n]
-	}
-
-	return
-
-bad:
-	Diag("%s: malformed elf file: %v", pn, err)
-}
-
-func section(elfobj *ElfObj, name string) *ElfSect {
-	for i := 0; uint(i) < elfobj.nsect; i++ {
-		if elfobj.sect[i].name != "" && name != "" && elfobj.sect[i].name == name {
-			return &elfobj.sect[i]
-		}
-	}
-	return nil
-}
-
-func elfmap(elfobj *ElfObj, sect *ElfSect) (err error) {
-	if sect.base != nil {
-		return nil
-	}
-
-	if sect.off+sect.size > uint64(elfobj.length) {
-		err = fmt.Errorf("elf section past end of file")
-		return err
-	}
-
-	sect.base = make([]byte, sect.size)
-	err = fmt.Errorf("short read")
-	if obj.Bseek(elfobj.f, int64(uint64(elfobj.base)+sect.off), 0) < 0 || obj.Bread(elfobj.f, sect.base) != len(sect.base) {
-		return err
-	}
-
-	return nil
-}
-
-func readelfsym(elfobj *ElfObj, i int, sym *ElfSym, needSym int) (err error) {
-	if i >= elfobj.nsymtab || i < 0 {
-		err = fmt.Errorf("invalid elf symbol index")
-		return err
-	}
-
-	if i == 0 {
-		Diag("readym: read null symbol!")
-	}
-
-	if elfobj.is64 != 0 {
-		b := new(ElfSymBytes64)
-		binary.Read(bytes.NewReader(elfobj.symtab.base[i*ELF64SYMSIZE:(i+1)*ELF64SYMSIZE]), elfobj.e, b)
-		sym.name = cstring(elfobj.symstr.base[elfobj.e.Uint32(b.Name[:]):])
-		sym.value = elfobj.e.Uint64(b.Value[:])
-		sym.size = elfobj.e.Uint64(b.Size[:])
-		sym.shndx = elfobj.e.Uint16(b.Shndx[:])
-		sym.bind = b.Info >> 4
-		sym.type_ = b.Info & 0xf
-		sym.other = b.Other
-	} else {
-		b := new(ElfSymBytes)
-		binary.Read(bytes.NewReader(elfobj.symtab.base[i*ELF32SYMSIZE:(i+1)*ELF32SYMSIZE]), elfobj.e, b)
-		sym.name = cstring(elfobj.symstr.base[elfobj.e.Uint32(b.Name[:]):])
-		sym.value = uint64(elfobj.e.Uint32(b.Value[:]))
-		sym.size = uint64(elfobj.e.Uint32(b.Size[:]))
-		sym.shndx = elfobj.e.Uint16(b.Shndx[:])
-		sym.bind = b.Info >> 4
-		sym.type_ = b.Info & 0xf
-		sym.other = b.Other
-	}
-
-	var s *LSym
-	if sym.name == "_GLOBAL_OFFSET_TABLE_" {
-		sym.name = ".got"
-	}
-	if sym.name == ".TOC." {
-		// Magic symbol on ppc64.  Will be set to this object
-		// file's .got+0x8000.
-		sym.bind = ElfSymBindLocal
-	}
-
-	switch sym.type_ {
-	case ElfSymTypeSection:
-		s = elfobj.sect[sym.shndx].sym
-
-	case ElfSymTypeObject, ElfSymTypeFunc, ElfSymTypeNone:
-		switch sym.bind {
-		case ElfSymBindGlobal:
-			if needSym != 0 {
-				s = Linklookup(Ctxt, sym.name, 0)
-
-				// for global scoped hidden symbols we should insert it into
-				// symbol hash table, but mark them as hidden.
-				// __i686.get_pc_thunk.bx is allowed to be duplicated, to
-				// workaround that we set dupok.
-				// TODO(minux): correctly handle __i686.get_pc_thunk.bx without
-				// set dupok generally. See http://codereview.appspot.com/5823055/
-				// comment #5 for details.
-				if s != nil && sym.other == 2 {
-					s.Type |= obj.SHIDDEN
-					s.Dupok = 1
-				}
-			}
-
-		case ElfSymBindLocal:
-			if Thearch.Thechar == '5' && (strings.HasPrefix(sym.name, "$a") || strings.HasPrefix(sym.name, "$d")) {
-				// binutils for arm generate these mapping
-				// symbols, ignore these
-				break
-			}
-
-			if sym.name == ".TOC." {
-				// We need to be able to look this up,
-				// so put it in the hash table.
-				if needSym != 0 {
-					s = Linklookup(Ctxt, sym.name, Ctxt.Version)
-					s.Type |= obj.SHIDDEN
-				}
-
-				break
-			}
-
-			if needSym != 0 {
-				// local names and hidden visiblity global names are unique
-				// and should only reference by its index, not name, so we
-				// don't bother to add them into hash table
-				s = linknewsym(Ctxt, sym.name, Ctxt.Version)
-
-				s.Type |= obj.SHIDDEN
-			}
-
-		case ElfSymBindWeak:
-			if needSym != 0 {
-				s = linknewsym(Ctxt, sym.name, 0)
-				if sym.other == 2 {
-					s.Type |= obj.SHIDDEN
-				}
-			}
-
-		default:
-			err = fmt.Errorf("%s: invalid symbol binding %d", sym.name, sym.bind)
-			return err
-		}
-	}
-
-	if s != nil && s.Type == 0 && sym.type_ != ElfSymTypeSection {
-		s.Type = obj.SXREF
-	}
-	sym.sym = s
-
-	return nil
-}
-
-type rbyoff []Reloc
-
-func (x rbyoff) Len() int {
-	return len(x)
-}
-
-func (x rbyoff) Swap(i, j int) {
-	x[i], x[j] = x[j], x[i]
-}
-
-func (x rbyoff) Less(i, j int) bool {
-	a := &x[i]
-	b := &x[j]
-	if a.Off < b.Off {
-		return true
-	}
-	if a.Off > b.Off {
-		return false
-	}
-	return false
-}
-
-func reltype(pn string, elftype int, siz *uint8) int {
-	switch uint32(Thearch.Thechar) | uint32(elftype)<<24 {
-	default:
-		Diag("%s: unknown relocation type %d; compiled without -fpic?", pn, elftype)
-		fallthrough
-
-	case '9' | R_PPC64_TOC16<<24,
-		'9' | R_PPC64_TOC16_LO<<24,
-		'9' | R_PPC64_TOC16_HI<<24,
-		'9' | R_PPC64_TOC16_HA<<24,
-		'9' | R_PPC64_TOC16_DS<<24,
-		'9' | R_PPC64_TOC16_LO_DS<<24,
-		'9' | R_PPC64_REL16_LO<<24,
-		'9' | R_PPC64_REL16_HI<<24,
-		'9' | R_PPC64_REL16_HA<<24:
-		*siz = 2
-
-	case '5' | R_ARM_ABS32<<24,
-		'5' | R_ARM_GOT32<<24,
-		'5' | R_ARM_PLT32<<24,
-		'5' | R_ARM_GOTOFF<<24,
-		'5' | R_ARM_GOTPC<<24,
-		'5' | R_ARM_THM_PC22<<24,
-		'5' | R_ARM_REL32<<24,
-		'5' | R_ARM_CALL<<24,
-		'5' | R_ARM_V4BX<<24,
-		'5' | R_ARM_GOT_PREL<<24,
-		'5' | R_ARM_PC24<<24,
-		'5' | R_ARM_JUMP24<<24,
-		'6' | R_X86_64_PC32<<24,
-		'6' | R_X86_64_PLT32<<24,
-		'6' | R_X86_64_GOTPCREL<<24,
-		'8' | R_386_32<<24,
-		'8' | R_386_PC32<<24,
-		'8' | R_386_GOT32<<24,
-		'8' | R_386_PLT32<<24,
-		'8' | R_386_GOTOFF<<24,
-		'8' | R_386_GOTPC<<24,
-		'9' | R_PPC64_REL24<<24:
-		*siz = 4
-
-	case '6' | R_X86_64_64<<24,
-		'9' | R_PPC64_ADDR64<<24:
-		*siz = 8
-	}
-
-	return 256 + elftype
-}
diff --git a/src/cmd/link/internal/ld/ldmacho.go b/src/cmd/link/internal/ld/ldmacho.go
deleted file mode 100644
index 2abfa33..0000000
--- a/src/cmd/link/internal/ld/ldmacho.go
+++ /dev/null
@@ -1,893 +0,0 @@
-package ld
-
-import (
-	"cmd/internal/obj"
-	"encoding/binary"
-	"fmt"
-	"log"
-	"sort"
-)
-
-/*
-Derived from Plan 9 from User Space's src/libmach/elf.h, elf.c
-http://code.swtch.com/plan9port/src/tip/src/libmach/
-
-	Copyright © 2004 Russ Cox.
-	Portions Copyright © 2008-2010 Google Inc.
-	Portions Copyright © 2010 The Go Authors.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-*/
-const (
-	N_EXT  = 0x01
-	N_TYPE = 0x1e
-	N_STAB = 0xe0
-)
-
-type LdMachoObj struct {
-	f          *obj.Biobuf
-	base       int64 // off in f where Mach-O begins
-	length     int64 // length of Mach-O
-	is64       bool
-	name       string
-	e          binary.ByteOrder
-	cputype    uint
-	subcputype uint
-	filetype   uint32
-	flags      uint32
-	cmd        []LdMachoCmd
-	ncmd       uint
-}
-
-type LdMachoCmd struct {
-	type_ int
-	off   uint32
-	size  uint32
-	seg   LdMachoSeg
-	sym   LdMachoSymtab
-	dsym  LdMachoDysymtab
-}
-
-type LdMachoSeg struct {
-	name     string
-	vmaddr   uint64
-	vmsize   uint64
-	fileoff  uint32
-	filesz   uint32
-	maxprot  uint32
-	initprot uint32
-	nsect    uint32
-	flags    uint32
-	sect     []LdMachoSect
-}
-
-type LdMachoSect struct {
-	name    string
-	segname string
-	addr    uint64
-	size    uint64
-	off     uint32
-	align   uint32
-	reloff  uint32
-	nreloc  uint32
-	flags   uint32
-	res1    uint32
-	res2    uint32
-	sym     *LSym
-	rel     []LdMachoRel
-}
-
-type LdMachoRel struct {
-	addr      uint32
-	symnum    uint32
-	pcrel     uint8
-	length    uint8
-	extrn     uint8
-	type_     uint8
-	scattered uint8
-	value     uint32
-}
-
-type LdMachoSymtab struct {
-	symoff  uint32
-	nsym    uint32
-	stroff  uint32
-	strsize uint32
-	str     []byte
-	sym     []LdMachoSym
-}
-
-type LdMachoSym struct {
-	name    string
-	type_   uint8
-	sectnum uint8
-	desc    uint16
-	kind    int8
-	value   uint64
-	sym     *LSym
-}
-
-type LdMachoDysymtab struct {
-	ilocalsym      uint32
-	nlocalsym      uint32
-	iextdefsym     uint32
-	nextdefsym     uint32
-	iundefsym      uint32
-	nundefsym      uint32
-	tocoff         uint32
-	ntoc           uint32
-	modtaboff      uint32
-	nmodtab        uint32
-	extrefsymoff   uint32
-	nextrefsyms    uint32
-	indirectsymoff uint32
-	nindirectsyms  uint32
-	extreloff      uint32
-	nextrel        uint32
-	locreloff      uint32
-	nlocrel        uint32
-	indir          []uint32
-}
-
-const (
-	LdMachoCpuVax         = 1
-	LdMachoCpu68000       = 6
-	LdMachoCpu386         = 7
-	LdMachoCpuAmd64       = 0x1000007
-	LdMachoCpuMips        = 8
-	LdMachoCpu98000       = 10
-	LdMachoCpuHppa        = 11
-	LdMachoCpuArm         = 12
-	LdMachoCpu88000       = 13
-	LdMachoCpuSparc       = 14
-	LdMachoCpu860         = 15
-	LdMachoCpuAlpha       = 16
-	LdMachoCpuPower       = 18
-	LdMachoCmdSegment     = 1
-	LdMachoCmdSymtab      = 2
-	LdMachoCmdSymseg      = 3
-	LdMachoCmdThread      = 4
-	LdMachoCmdDysymtab    = 11
-	LdMachoCmdSegment64   = 25
-	LdMachoFileObject     = 1
-	LdMachoFileExecutable = 2
-	LdMachoFileFvmlib     = 3
-	LdMachoFileCore       = 4
-	LdMachoFilePreload    = 5
-)
-
-func unpackcmd(p []byte, m *LdMachoObj, c *LdMachoCmd, type_ uint, sz uint) int {
-	e4 := m.e.Uint32
-	e8 := m.e.Uint64
-
-	c.type_ = int(type_)
-	c.size = uint32(sz)
-	switch type_ {
-	default:
-		return -1
-
-	case LdMachoCmdSegment:
-		if sz < 56 {
-			return -1
-		}
-		c.seg.name = cstring(p[8:24])
-		c.seg.vmaddr = uint64(e4(p[24:]))
-		c.seg.vmsize = uint64(e4(p[28:]))
-		c.seg.fileoff = e4(p[32:])
-		c.seg.filesz = e4(p[36:])
-		c.seg.maxprot = e4(p[40:])
-		c.seg.initprot = e4(p[44:])
-		c.seg.nsect = e4(p[48:])
-		c.seg.flags = e4(p[52:])
-		c.seg.sect = make([]LdMachoSect, c.seg.nsect)
-		if uint32(sz) < 56+c.seg.nsect*68 {
-			return -1
-		}
-		p = p[56:]
-		var s *LdMachoSect
-		for i := 0; uint32(i) < c.seg.nsect; i++ {
-			s = &c.seg.sect[i]
-			s.name = cstring(p[0:16])
-			s.segname = cstring(p[16:32])
-			s.addr = uint64(e4(p[32:]))
-			s.size = uint64(e4(p[36:]))
-			s.off = e4(p[40:])
-			s.align = e4(p[44:])
-			s.reloff = e4(p[48:])
-			s.nreloc = e4(p[52:])
-			s.flags = e4(p[56:])
-			s.res1 = e4(p[60:])
-			s.res2 = e4(p[64:])
-			p = p[68:]
-		}
-
-	case LdMachoCmdSegment64:
-		if sz < 72 {
-			return -1
-		}
-		c.seg.name = cstring(p[8:24])
-		c.seg.vmaddr = e8(p[24:])
-		c.seg.vmsize = e8(p[32:])
-		c.seg.fileoff = uint32(e8(p[40:]))
-		c.seg.filesz = uint32(e8(p[48:]))
-		c.seg.maxprot = e4(p[56:])
-		c.seg.initprot = e4(p[60:])
-		c.seg.nsect = e4(p[64:])
-		c.seg.flags = e4(p[68:])
-		c.seg.sect = make([]LdMachoSect, c.seg.nsect)
-		if uint32(sz) < 72+c.seg.nsect*80 {
-			return -1
-		}
-		p = p[72:]
-		var s *LdMachoSect
-		for i := 0; uint32(i) < c.seg.nsect; i++ {
-			s = &c.seg.sect[i]
-			s.name = cstring(p[0:16])
-			s.segname = cstring(p[16:32])
-			s.addr = e8(p[32:])
-			s.size = e8(p[40:])
-			s.off = e4(p[48:])
-			s.align = e4(p[52:])
-			s.reloff = e4(p[56:])
-			s.nreloc = e4(p[60:])
-			s.flags = e4(p[64:])
-			s.res1 = e4(p[68:])
-			s.res2 = e4(p[72:])
-
-			// p+76 is reserved
-			p = p[80:]
-		}
-
-	case LdMachoCmdSymtab:
-		if sz < 24 {
-			return -1
-		}
-		c.sym.symoff = e4(p[8:])
-		c.sym.nsym = e4(p[12:])
-		c.sym.stroff = e4(p[16:])
-		c.sym.strsize = e4(p[20:])
-
-	case LdMachoCmdDysymtab:
-		if sz < 80 {
-			return -1
-		}
-		c.dsym.ilocalsym = e4(p[8:])
-		c.dsym.nlocalsym = e4(p[12:])
-		c.dsym.iextdefsym = e4(p[16:])
-		c.dsym.nextdefsym = e4(p[20:])
-		c.dsym.iundefsym = e4(p[24:])
-		c.dsym.nundefsym = e4(p[28:])
-		c.dsym.tocoff = e4(p[32:])
-		c.dsym.ntoc = e4(p[36:])
-		c.dsym.modtaboff = e4(p[40:])
-		c.dsym.nmodtab = e4(p[44:])
-		c.dsym.extrefsymoff = e4(p[48:])
-		c.dsym.nextrefsyms = e4(p[52:])
-		c.dsym.indirectsymoff = e4(p[56:])
-		c.dsym.nindirectsyms = e4(p[60:])
-		c.dsym.extreloff = e4(p[64:])
-		c.dsym.nextrel = e4(p[68:])
-		c.dsym.locreloff = e4(p[72:])
-		c.dsym.nlocrel = e4(p[76:])
-	}
-
-	return 0
-}
-
-func macholoadrel(m *LdMachoObj, sect *LdMachoSect) int {
-	if sect.rel != nil || sect.nreloc == 0 {
-		return 0
-	}
-	rel := make([]LdMachoRel, sect.nreloc)
-	n := int(sect.nreloc * 8)
-	buf := make([]byte, n)
-	if obj.Bseek(m.f, m.base+int64(sect.reloff), 0) < 0 || obj.Bread(m.f, buf) != n {
-		return -1
-	}
-	var p []byte
-	var r *LdMachoRel
-	var v uint32
-	for i := 0; uint32(i) < sect.nreloc; i++ {
-		r = &rel[i]
-		p = buf[i*8:]
-		r.addr = m.e.Uint32(p)
-
-		// TODO(rsc): Wrong interpretation for big-endian bitfields?
-		if r.addr&0x80000000 != 0 {
-			// scatterbrained relocation
-			r.scattered = 1
-
-			v = r.addr >> 24
-			r.addr &= 0xFFFFFF
-			r.type_ = uint8(v & 0xF)
-			v >>= 4
-			r.length = 1 << (v & 3)
-			v >>= 2
-			r.pcrel = uint8(v & 1)
-			r.value = m.e.Uint32(p[4:])
-		} else {
-			v = m.e.Uint32(p[4:])
-			r.symnum = v & 0xFFFFFF
-			v >>= 24
-			r.pcrel = uint8(v & 1)
-			v >>= 1
-			r.length = 1 << (v & 3)
-			v >>= 2
-			r.extrn = uint8(v & 1)
-			v >>= 1
-			r.type_ = uint8(v)
-		}
-	}
-
-	sect.rel = rel
-	return 0
-}
-
-func macholoaddsym(m *LdMachoObj, d *LdMachoDysymtab) int {
-	n := int(d.nindirectsyms)
-
-	p := make([]byte, n*4)
-	if obj.Bseek(m.f, m.base+int64(d.indirectsymoff), 0) < 0 || obj.Bread(m.f, p) != len(p) {
-		return -1
-	}
-
-	d.indir = make([]uint32, n)
-	for i := 0; i < n; i++ {
-		d.indir[i] = m.e.Uint32(p[4*i:])
-	}
-	return 0
-}
-
-func macholoadsym(m *LdMachoObj, symtab *LdMachoSymtab) int {
-	if symtab.sym != nil {
-		return 0
-	}
-
-	strbuf := make([]byte, symtab.strsize)
-	if obj.Bseek(m.f, m.base+int64(symtab.stroff), 0) < 0 || obj.Bread(m.f, strbuf) != len(strbuf) {
-		return -1
-	}
-
-	symsize := 12
-	if m.is64 {
-		symsize = 16
-	}
-	n := int(symtab.nsym * uint32(symsize))
-	symbuf := make([]byte, n)
-	if obj.Bseek(m.f, m.base+int64(symtab.symoff), 0) < 0 || obj.Bread(m.f, symbuf) != len(symbuf) {
-		return -1
-	}
-	sym := make([]LdMachoSym, symtab.nsym)
-	p := symbuf
-	var s *LdMachoSym
-	var v uint32
-	for i := 0; uint32(i) < symtab.nsym; i++ {
-		s = &sym[i]
-		v = m.e.Uint32(p)
-		if v >= symtab.strsize {
-			return -1
-		}
-		s.name = cstring(strbuf[v:])
-		s.type_ = uint8(p[4])
-		s.sectnum = uint8(p[5])
-		s.desc = m.e.Uint16(p[6:])
-		if m.is64 {
-			s.value = m.e.Uint64(p[8:])
-		} else {
-			s.value = uint64(m.e.Uint32(p[8:]))
-		}
-		p = p[symsize:]
-	}
-
-	symtab.str = strbuf
-	symtab.sym = sym
-	return 0
-}
-
-func ldmacho(f *obj.Biobuf, pkg string, length int64, pn string) {
-	var err error
-	var j int
-	var is64 bool
-	var secaddr uint64
-	var hdr [7 * 4]uint8
-	var cmdp []byte
-	var dat []byte
-	var ncmd uint32
-	var cmdsz uint32
-	var ty uint32
-	var sz uint32
-	var off uint32
-	var m *LdMachoObj
-	var e binary.ByteOrder
-	var sect *LdMachoSect
-	var rel *LdMachoRel
-	var rpi int
-	var s *LSym
-	var s1 *LSym
-	var outer *LSym
-	var c *LdMachoCmd
-	var symtab *LdMachoSymtab
-	var dsymtab *LdMachoDysymtab
-	var sym *LdMachoSym
-	var r []Reloc
-	var rp *Reloc
-	var name string
-
-	Ctxt.Version++
-	base := obj.Boffset(f)
-	if obj.Bread(f, hdr[:]) != len(hdr) {
-		goto bad
-	}
-
-	if binary.BigEndian.Uint32(hdr[:])&^1 == 0xFEEDFACE {
-		e = binary.BigEndian
-	} else if binary.LittleEndian.Uint32(hdr[:])&^1 == 0xFEEDFACE {
-		e = binary.LittleEndian
-	} else {
-		err = fmt.Errorf("bad magic - not mach-o file")
-		goto bad
-	}
-
-	is64 = e.Uint32(hdr[:]) == 0xFEEDFACF
-	ncmd = e.Uint32([]byte(hdr[4*4:]))
-	cmdsz = e.Uint32([]byte(hdr[5*4:]))
-	if ncmd > 0x10000 || cmdsz >= 0x01000000 {
-		err = fmt.Errorf("implausible mach-o header ncmd=%d cmdsz=%d", ncmd, cmdsz)
-		goto bad
-	}
-
-	if is64 {
-		var tmp [4]uint8
-		obj.Bread(f, tmp[:4]) // skip reserved word in header
-	}
-
-	m = new(LdMachoObj)
-
-	m.f = f
-	m.e = e
-	m.cputype = uint(e.Uint32([]byte(hdr[1*4:])))
-	m.subcputype = uint(e.Uint32([]byte(hdr[2*4:])))
-	m.filetype = e.Uint32([]byte(hdr[3*4:]))
-	m.ncmd = uint(ncmd)
-	m.flags = e.Uint32([]byte(hdr[6*4:]))
-	m.is64 = is64
-	m.base = base
-	m.length = length
-	m.name = pn
-
-	switch Thearch.Thechar {
-	default:
-		Diag("%s: mach-o %s unimplemented", pn, Thestring)
-		return
-
-	case '6':
-		if e != binary.LittleEndian || m.cputype != LdMachoCpuAmd64 {
-			Diag("%s: mach-o object but not amd64", pn)
-			return
-		}
-
-	case '8':
-		if e != binary.LittleEndian || m.cputype != LdMachoCpu386 {
-			Diag("%s: mach-o object but not 386", pn)
-			return
-		}
-	}
-
-	m.cmd = make([]LdMachoCmd, ncmd)
-	off = uint32(len(hdr))
-	cmdp = make([]byte, cmdsz)
-	if obj.Bread(f, cmdp) != len(cmdp) {
-		err = fmt.Errorf("reading cmds: %v", err)
-		goto bad
-	}
-
-	// read and parse load commands
-	c = nil
-
-	symtab = nil
-	dsymtab = nil
-
-	for i := 0; uint32(i) < ncmd; i++ {
-		ty = e.Uint32(cmdp)
-		sz = e.Uint32(cmdp[4:])
-		m.cmd[i].off = off
-		unpackcmd(cmdp, m, &m.cmd[i], uint(ty), uint(sz))
-		cmdp = cmdp[sz:]
-		off += sz
-		if ty == LdMachoCmdSymtab {
-			if symtab != nil {
-				err = fmt.Errorf("multiple symbol tables")
-				goto bad
-			}
-
-			symtab = &m.cmd[i].sym
-			macholoadsym(m, symtab)
-		}
-
-		if ty == LdMachoCmdDysymtab {
-			dsymtab = &m.cmd[i].dsym
-			macholoaddsym(m, dsymtab)
-		}
-
-		if (is64 && ty == LdMachoCmdSegment64) || (!is64 && ty == LdMachoCmdSegment) {
-			if c != nil {
-				err = fmt.Errorf("multiple load commands")
-				goto bad
-			}
-
-			c = &m.cmd[i]
-		}
-	}
-
-	// load text and data segments into memory.
-	// they are not as small as the load commands, but we'll need
-	// the memory anyway for the symbol images, so we might
-	// as well use one large chunk.
-	if c == nil {
-		err = fmt.Errorf("no load command")
-		goto bad
-	}
-
-	if symtab == nil {
-		// our work is done here - no symbols means nothing can refer to this file
-		return
-	}
-
-	if int64(c.seg.fileoff+c.seg.filesz) >= length {
-		err = fmt.Errorf("load segment out of range")
-		goto bad
-	}
-
-	dat = make([]byte, c.seg.filesz)
-	if obj.Bseek(f, m.base+int64(c.seg.fileoff), 0) < 0 || obj.Bread(f, dat) != len(dat) {
-		err = fmt.Errorf("cannot load object data: %v", err)
-		goto bad
-	}
-
-	for i := 0; uint32(i) < c.seg.nsect; i++ {
-		sect = &c.seg.sect[i]
-		if sect.segname != "__TEXT" && sect.segname != "__DATA" {
-			continue
-		}
-		if sect.name == "__eh_frame" {
-			continue
-		}
-		name = fmt.Sprintf("%s(%s/%s)", pkg, sect.segname, sect.name)
-		s = Linklookup(Ctxt, name, Ctxt.Version)
-		if s.Type != 0 {
-			err = fmt.Errorf("duplicate %s/%s", sect.segname, sect.name)
-			goto bad
-		}
-
-		if sect.flags&0xff == 1 { // S_ZEROFILL
-			s.P = make([]byte, sect.size)
-		} else {
-			s.P = dat[sect.addr-c.seg.vmaddr:][:sect.size]
-		}
-		s.Size = int64(len(s.P))
-
-		if sect.segname == "__TEXT" {
-			if sect.name == "__text" {
-				s.Type = obj.STEXT
-			} else {
-				s.Type = obj.SRODATA
-			}
-		} else {
-			if sect.name == "__bss" {
-				s.Type = obj.SNOPTRBSS
-				s.P = s.P[:0]
-			} else {
-				s.Type = obj.SNOPTRDATA
-			}
-		}
-
-		sect.sym = s
-	}
-
-	// enter sub-symbols into symbol table.
-	// have to guess sizes from next symbol.
-	for i := 0; uint32(i) < symtab.nsym; i++ {
-		sym = &symtab.sym[i]
-		if sym.type_&N_STAB != 0 {
-			continue
-		}
-
-		// TODO: check sym->type against outer->type.
-		name = sym.name
-
-		if name[0] == '_' && name[1] != '\x00' {
-			name = name[1:]
-		}
-		v := 0
-		if sym.type_&N_EXT == 0 {
-			v = Ctxt.Version
-		}
-		s = Linklookup(Ctxt, name, v)
-		if sym.type_&N_EXT == 0 {
-			s.Dupok = 1
-		}
-		sym.sym = s
-		if sym.sectnum == 0 { // undefined
-			continue
-		}
-		if uint32(sym.sectnum) > c.seg.nsect {
-			err = fmt.Errorf("reference to invalid section %d", sym.sectnum)
-			goto bad
-		}
-
-		sect = &c.seg.sect[sym.sectnum-1]
-		outer = sect.sym
-		if outer == nil {
-			err = fmt.Errorf("reference to invalid section %s/%s", sect.segname, sect.name)
-			continue
-		}
-
-		if s.Outer != nil {
-			if s.Dupok != 0 {
-				continue
-			}
-			Exitf("%s: duplicate symbol reference: %s in both %s and %s", pn, s.Name, s.Outer.Name, sect.sym.Name)
-		}
-
-		s.Type = outer.Type | obj.SSUB
-		s.Sub = outer.Sub
-		outer.Sub = s
-		s.Outer = outer
-		s.Value = int64(sym.value - sect.addr)
-		if s.Cgoexport&CgoExportDynamic == 0 {
-			s.Dynimplib = "" // satisfy dynimport
-		}
-		if outer.Type == obj.STEXT {
-			if s.External != 0 && s.Dupok == 0 {
-				Diag("%s: duplicate definition of %s", pn, s.Name)
-			}
-			s.External = 1
-		}
-
-		sym.sym = s
-	}
-
-	// Sort outer lists by address, adding to textp.
-	// This keeps textp in increasing address order.
-	for i := 0; uint32(i) < c.seg.nsect; i++ {
-		sect = &c.seg.sect[i]
-		s = sect.sym
-		if s == nil {
-			continue
-		}
-		if s.Sub != nil {
-			s.Sub = listsort(s.Sub, valuecmp, listsubp)
-
-			// assign sizes, now that we know symbols in sorted order.
-			for s1 = s.Sub; s1 != nil; s1 = s1.Sub {
-				if s1.Sub != nil {
-					s1.Size = s1.Sub.Value - s1.Value
-				} else {
-					s1.Size = s.Value + s.Size - s1.Value
-				}
-			}
-		}
-
-		if s.Type == obj.STEXT {
-			if s.Onlist != 0 {
-				log.Fatalf("symbol %s listed multiple times", s.Name)
-			}
-			s.Onlist = 1
-			if Ctxt.Etextp != nil {
-				Ctxt.Etextp.Next = s
-			} else {
-				Ctxt.Textp = s
-			}
-			Ctxt.Etextp = s
-			for s1 = s.Sub; s1 != nil; s1 = s1.Sub {
-				if s1.Onlist != 0 {
-					log.Fatalf("symbol %s listed multiple times", s1.Name)
-				}
-				s1.Onlist = 1
-				Ctxt.Etextp.Next = s1
-				Ctxt.Etextp = s1
-			}
-		}
-	}
-
-	// load relocations
-	for i := 0; uint32(i) < c.seg.nsect; i++ {
-		sect = &c.seg.sect[i]
-		s = sect.sym
-		if s == nil {
-			continue
-		}
-		macholoadrel(m, sect)
-		if sect.rel == nil {
-			continue
-		}
-		r = make([]Reloc, sect.nreloc)
-		rpi = 0
-	Reloc:
-		for j = 0; uint32(j) < sect.nreloc; j++ {
-			rp = &r[rpi]
-			rel = &sect.rel[j]
-			if rel.scattered != 0 {
-				if Thearch.Thechar != '8' {
-					// mach-o only uses scattered relocation on 32-bit platforms
-					Diag("unexpected scattered relocation")
-
-					continue
-				}
-
-				// on 386, rewrite scattered 4/1 relocation and some
-				// scattered 2/1 relocation into the pseudo-pc-relative
-				// reference that it is.
-				// assume that the second in the pair is in this section
-				// and use that as the pc-relative base.
-				if uint32(j+1) >= sect.nreloc {
-					err = fmt.Errorf("unsupported scattered relocation %d", int(rel.type_))
-					goto bad
-				}
-
-				if sect.rel[j+1].scattered == 0 || sect.rel[j+1].type_ != 1 || (rel.type_ != 4 && rel.type_ != 2) || uint64(sect.rel[j+1].value) < sect.addr || uint64(sect.rel[j+1].value) >= sect.addr+sect.size {
-					err = fmt.Errorf("unsupported scattered relocation %d/%d", int(rel.type_), int(sect.rel[j+1].type_))
-					goto bad
-				}
-
-				rp.Siz = rel.length
-				rp.Off = int32(rel.addr)
-
-				// NOTE(rsc): I haven't worked out why (really when)
-				// we should ignore the addend on a
-				// scattered relocation, but it seems that the
-				// common case is we ignore it.
-				// It's likely that this is not strictly correct
-				// and that the math should look something
-				// like the non-scattered case below.
-				rp.Add = 0
-
-				// want to make it pc-relative aka relative to rp->off+4
-				// but the scatter asks for relative to off = sect->rel[j+1].value - sect->addr.
-				// adjust rp->add accordingly.
-				rp.Type = obj.R_PCREL
-
-				rp.Add += int64(uint64(int64(rp.Off)+4) - (uint64(sect.rel[j+1].value) - sect.addr))
-
-				// now consider the desired symbol.
-				// find the section where it lives.
-				var ks *LdMachoSect
-				for k := 0; uint32(k) < c.seg.nsect; k++ {
-					ks = &c.seg.sect[k]
-					if ks.addr <= uint64(rel.value) && uint64(rel.value) < ks.addr+ks.size {
-						if ks.sym != nil {
-							rp.Sym = ks.sym
-							rp.Add += int64(uint64(rel.value) - ks.addr)
-						} else if ks.segname == "__IMPORT" && ks.name == "__pointers" {
-							// handle reference to __IMPORT/__pointers.
-							// how much worse can this get?
-							// why are we supporting 386 on the mac anyway?
-							rp.Type = 512 + MACHO_FAKE_GOTPCREL
-
-							// figure out which pointer this is a reference to.
-							k = int(uint64(ks.res1) + (uint64(rel.value)-ks.addr)/4)
-
-							// load indirect table for __pointers
-							// fetch symbol number
-							if dsymtab == nil || k < 0 || uint32(k) >= dsymtab.nindirectsyms || dsymtab.indir == nil {
-								err = fmt.Errorf("invalid scattered relocation: indirect symbol reference out of range")
-								goto bad
-							}
-
-							k = int(dsymtab.indir[k])
-							if k < 0 || uint32(k) >= symtab.nsym {
-								err = fmt.Errorf("invalid scattered relocation: symbol reference out of range")
-								goto bad
-							}
-
-							rp.Sym = symtab.sym[k].sym
-						} else {
-							err = fmt.Errorf("unsupported scattered relocation: reference to %s/%s", ks.segname, ks.name)
-							goto bad
-						}
-
-						rpi++
-
-						// skip #1 of 2 rel; continue skips #2 of 2.
-						j++
-
-						continue Reloc
-					}
-				}
-
-				err = fmt.Errorf("unsupported scattered relocation: invalid address %#x", rel.addr)
-				goto bad
-
-			}
-
-			rp.Siz = rel.length
-			rp.Type = 512 + (int32(rel.type_) << 1) + int32(rel.pcrel)
-			rp.Off = int32(rel.addr)
-
-			// Handle X86_64_RELOC_SIGNED referencing a section (rel->extrn == 0).
-			if Thearch.Thechar == '6' && rel.extrn == 0 && rel.type_ == 1 {
-				// Calculate the addend as the offset into the section.
-				//
-				// The rip-relative offset stored in the object file is encoded
-				// as follows:
-				//
-				//    movsd	0x00000360(%rip),%xmm0
-				//
-				// To get the absolute address of the value this rip-relative address is pointing
-				// to, we must add the address of the next instruction to it. This is done by
-				// taking the address of the relocation and adding 4 to it (since the rip-relative
-				// offset can at most be 32 bits long).  To calculate the offset into the section the
-				// relocation is referencing, we subtract the vaddr of the start of the referenced
-				// section found in the original object file.
-				//
-				// [For future reference, see Darwin's /usr/include/mach-o/x86_64/reloc.h]
-				secaddr = c.seg.sect[rel.symnum-1].addr
-
-				rp.Add = int64(uint64(int64(int32(e.Uint32(s.P[rp.Off:])))+int64(rp.Off)+4) - secaddr)
-			} else {
-				rp.Add = int64(int32(e.Uint32(s.P[rp.Off:])))
-			}
-
-			// For i386 Mach-O PC-relative, the addend is written such that
-			// it *is* the PC being subtracted.  Use that to make
-			// it match our version of PC-relative.
-			if rel.pcrel != 0 && Thearch.Thechar == '8' {
-				rp.Add += int64(rp.Off) + int64(rp.Siz)
-			}
-			if rel.extrn == 0 {
-				if rel.symnum < 1 || rel.symnum > c.seg.nsect {
-					err = fmt.Errorf("invalid relocation: section reference out of range %d vs %d", rel.symnum, c.seg.nsect)
-					goto bad
-				}
-
-				rp.Sym = c.seg.sect[rel.symnum-1].sym
-				if rp.Sym == nil {
-					err = fmt.Errorf("invalid relocation: %s", c.seg.sect[rel.symnum-1].name)
-					goto bad
-				}
-
-				// References to symbols in other sections
-				// include that information in the addend.
-				// We only care about the delta from the
-				// section base.
-				if Thearch.Thechar == '8' {
-					rp.Add -= int64(c.seg.sect[rel.symnum-1].addr)
-				}
-			} else {
-				if rel.symnum >= symtab.nsym {
-					err = fmt.Errorf("invalid relocation: symbol reference out of range")
-					goto bad
-				}
-
-				rp.Sym = symtab.sym[rel.symnum].sym
-			}
-
-			rpi++
-		}
-
-		sort.Sort(rbyoff(r[:rpi]))
-		s.R = r
-		s.R = s.R[:rpi]
-	}
-
-	return
-
-bad:
-	Diag("%s: malformed mach-o file: %v", pn, err)
-}
diff --git a/src/cmd/link/internal/ld/ldpe.go b/src/cmd/link/internal/ld/ldpe.go
deleted file mode 100644
index b98cf02..0000000
--- a/src/cmd/link/internal/ld/ldpe.go
+++ /dev/null
@@ -1,534 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package ld
-
-import (
-	"cmd/internal/obj"
-	"encoding/binary"
-	"fmt"
-	"log"
-	"sort"
-	"strings"
-)
-
-const (
-	IMAGE_SYM_UNDEFINED              = 0
-	IMAGE_SYM_ABSOLUTE               = -1
-	IMAGE_SYM_DEBUG                  = -2
-	IMAGE_SYM_TYPE_NULL              = 0
-	IMAGE_SYM_TYPE_VOID              = 1
-	IMAGE_SYM_TYPE_CHAR              = 2
-	IMAGE_SYM_TYPE_SHORT             = 3
-	IMAGE_SYM_TYPE_INT               = 4
-	IMAGE_SYM_TYPE_LONG              = 5
-	IMAGE_SYM_TYPE_FLOAT             = 6
-	IMAGE_SYM_TYPE_DOUBLE            = 7
-	IMAGE_SYM_TYPE_STRUCT            = 8
-	IMAGE_SYM_TYPE_UNION             = 9
-	IMAGE_SYM_TYPE_ENUM              = 10
-	IMAGE_SYM_TYPE_MOE               = 11
-	IMAGE_SYM_TYPE_BYTE              = 12
-	IMAGE_SYM_TYPE_WORD              = 13
-	IMAGE_SYM_TYPE_UINT              = 14
-	IMAGE_SYM_TYPE_DWORD             = 15
-	IMAGE_SYM_TYPE_PCODE             = 32768
-	IMAGE_SYM_DTYPE_NULL             = 0
-	IMAGE_SYM_DTYPE_POINTER          = 0x10
-	IMAGE_SYM_DTYPE_FUNCTION         = 0x20
-	IMAGE_SYM_DTYPE_ARRAY            = 0x30
-	IMAGE_SYM_CLASS_END_OF_FUNCTION  = -1
-	IMAGE_SYM_CLASS_NULL             = 0
-	IMAGE_SYM_CLASS_AUTOMATIC        = 1
-	IMAGE_SYM_CLASS_EXTERNAL         = 2
-	IMAGE_SYM_CLASS_STATIC           = 3
-	IMAGE_SYM_CLASS_REGISTER         = 4
-	IMAGE_SYM_CLASS_EXTERNAL_DEF     = 5
-	IMAGE_SYM_CLASS_LABEL            = 6
-	IMAGE_SYM_CLASS_UNDEFINED_LABEL  = 7
-	IMAGE_SYM_CLASS_MEMBER_OF_STRUCT = 8
-	IMAGE_SYM_CLASS_ARGUMENT         = 9
-	IMAGE_SYM_CLASS_STRUCT_TAG       = 10
-	IMAGE_SYM_CLASS_MEMBER_OF_UNION  = 11
-	IMAGE_SYM_CLASS_UNION_TAG        = 12
-	IMAGE_SYM_CLASS_TYPE_DEFINITION  = 13
-	IMAGE_SYM_CLASS_UNDEFINED_STATIC = 14
-	IMAGE_SYM_CLASS_ENUM_TAG         = 15
-	IMAGE_SYM_CLASS_MEMBER_OF_ENUM   = 16
-	IMAGE_SYM_CLASS_REGISTER_PARAM   = 17
-	IMAGE_SYM_CLASS_BIT_FIELD        = 18
-	IMAGE_SYM_CLASS_FAR_EXTERNAL     = 68 /* Not in PECOFF v8 spec */
-	IMAGE_SYM_CLASS_BLOCK            = 100
-	IMAGE_SYM_CLASS_FUNCTION         = 101
-	IMAGE_SYM_CLASS_END_OF_STRUCT    = 102
-	IMAGE_SYM_CLASS_FILE             = 103
-	IMAGE_SYM_CLASS_SECTION          = 104
-	IMAGE_SYM_CLASS_WEAK_EXTERNAL    = 105
-	IMAGE_SYM_CLASS_CLR_TOKEN        = 107
-	IMAGE_REL_I386_ABSOLUTE          = 0x0000
-	IMAGE_REL_I386_DIR16             = 0x0001
-	IMAGE_REL_I386_REL16             = 0x0002
-	IMAGE_REL_I386_DIR32             = 0x0006
-	IMAGE_REL_I386_DIR32NB           = 0x0007
-	IMAGE_REL_I386_SEG12             = 0x0009
-	IMAGE_REL_I386_SECTION           = 0x000A
-	IMAGE_REL_I386_SECREL            = 0x000B
-	IMAGE_REL_I386_TOKEN             = 0x000C
-	IMAGE_REL_I386_SECREL7           = 0x000D
-	IMAGE_REL_I386_REL32             = 0x0014
-	IMAGE_REL_AMD64_ABSOLUTE         = 0x0000
-	IMAGE_REL_AMD64_ADDR64           = 0x0001
-	IMAGE_REL_AMD64_ADDR32           = 0x0002
-	IMAGE_REL_AMD64_ADDR32NB         = 0x0003
-	IMAGE_REL_AMD64_REL32            = 0x0004
-	IMAGE_REL_AMD64_REL32_1          = 0x0005
-	IMAGE_REL_AMD64_REL32_2          = 0x0006
-	IMAGE_REL_AMD64_REL32_3          = 0x0007
-	IMAGE_REL_AMD64_REL32_4          = 0x0008
-	IMAGE_REL_AMD64_REL32_5          = 0x0009
-	IMAGE_REL_AMD64_SECTION          = 0x000A
-	IMAGE_REL_AMD64_SECREL           = 0x000B
-	IMAGE_REL_AMD64_SECREL7          = 0x000C
-	IMAGE_REL_AMD64_TOKEN            = 0x000D
-	IMAGE_REL_AMD64_SREL32           = 0x000E
-	IMAGE_REL_AMD64_PAIR             = 0x000F
-	IMAGE_REL_AMD64_SSPAN32          = 0x0010
-)
-
-type PeSym struct {
-	name    string
-	value   uint32
-	sectnum uint16
-	type_   uint16
-	sclass  uint8
-	aux     uint8
-	sym     *LSym
-}
-
-type PeSect struct {
-	name string
-	base []byte
-	size uint64
-	sym  *LSym
-	sh   IMAGE_SECTION_HEADER
-}
-
-type PeObj struct {
-	f      *obj.Biobuf
-	name   string
-	base   uint32
-	sect   []PeSect
-	nsect  uint
-	pesym  []PeSym
-	npesym uint
-	fh     IMAGE_FILE_HEADER
-	snames []byte
-}
-
-func ldpe(f *obj.Biobuf, pkg string, length int64, pn string) {
-	if Debug['v'] != 0 {
-		fmt.Fprintf(&Bso, "%5.2f ldpe %s\n", obj.Cputime(), pn)
-	}
-
-	var sect *PeSect
-	Ctxt.Version++
-	base := int32(obj.Boffset(f))
-
-	peobj := new(PeObj)
-	peobj.f = f
-	peobj.base = uint32(base)
-	peobj.name = pn
-
-	// read header
-	var err error
-	var j int
-	var l uint32
-	var name string
-	var numaux int
-	var r []Reloc
-	var rp *Reloc
-	var rsect *PeSect
-	var s *LSym
-	var sym *PeSym
-	var symbuf [18]uint8
-	if err = binary.Read(f, binary.LittleEndian, &peobj.fh); err != nil {
-		goto bad
-	}
-
-	// load section list
-	peobj.sect = make([]PeSect, peobj.fh.NumberOfSections)
-
-	peobj.nsect = uint(peobj.fh.NumberOfSections)
-	for i := 0; i < int(peobj.fh.NumberOfSections); i++ {
-		if err = binary.Read(f, binary.LittleEndian, &peobj.sect[i].sh); err != nil {
-			goto bad
-		}
-		peobj.sect[i].size = uint64(peobj.sect[i].sh.SizeOfRawData)
-		peobj.sect[i].name = cstring(peobj.sect[i].sh.Name[:])
-	}
-
-	// TODO return error if found .cormeta
-
-	// load string table
-	obj.Bseek(f, int64(base)+int64(peobj.fh.PointerToSymbolTable)+int64(len(symbuf))*int64(peobj.fh.NumberOfSymbols), 0)
-
-	if obj.Bread(f, symbuf[:4]) != 4 {
-		goto bad
-	}
-	l = Le32(symbuf[:])
-	peobj.snames = make([]byte, l)
-	obj.Bseek(f, int64(base)+int64(peobj.fh.PointerToSymbolTable)+int64(len(symbuf))*int64(peobj.fh.NumberOfSymbols), 0)
-	if obj.Bread(f, peobj.snames) != len(peobj.snames) {
-		goto bad
-	}
-
-	// rewrite section names if they start with /
-	for i := 0; i < int(peobj.fh.NumberOfSections); i++ {
-		if peobj.sect[i].name == "" {
-			continue
-		}
-		if peobj.sect[i].name[0] != '/' {
-			continue
-		}
-		l = uint32(obj.Atoi(peobj.sect[i].name[1:]))
-		peobj.sect[i].name = cstring(peobj.snames[l:])
-	}
-
-	// read symbols
-	peobj.pesym = make([]PeSym, peobj.fh.NumberOfSymbols)
-
-	peobj.npesym = uint(peobj.fh.NumberOfSymbols)
-	obj.Bseek(f, int64(base)+int64(peobj.fh.PointerToSymbolTable), 0)
-	for i := 0; uint32(i) < peobj.fh.NumberOfSymbols; i += numaux + 1 {
-		obj.Bseek(f, int64(base)+int64(peobj.fh.PointerToSymbolTable)+int64(len(symbuf))*int64(i), 0)
-		if obj.Bread(f, symbuf[:]) != len(symbuf) {
-			goto bad
-		}
-
-		if (symbuf[0] == 0) && (symbuf[1] == 0) && (symbuf[2] == 0) && (symbuf[3] == 0) {
-			l = Le32(symbuf[4:])
-			peobj.pesym[i].name = cstring(peobj.snames[l:]) // sym name length <= 8
-		} else {
-			peobj.pesym[i].name = cstring(symbuf[:8])
-		}
-
-		peobj.pesym[i].value = Le32(symbuf[8:])
-		peobj.pesym[i].sectnum = Le16(symbuf[12:])
-		peobj.pesym[i].sclass = symbuf[16]
-		peobj.pesym[i].aux = symbuf[17]
-		peobj.pesym[i].type_ = Le16(symbuf[14:])
-		numaux = int(peobj.pesym[i].aux)
-		if numaux < 0 {
-			numaux = 0
-		}
-	}
-
-	// create symbols for mapped sections
-	for i := 0; uint(i) < peobj.nsect; i++ {
-		sect = &peobj.sect[i]
-		if sect.sh.Characteristics&IMAGE_SCN_MEM_DISCARDABLE != 0 {
-			continue
-		}
-
-		if sect.sh.Characteristics&(IMAGE_SCN_CNT_CODE|IMAGE_SCN_CNT_INITIALIZED_DATA|IMAGE_SCN_CNT_UNINITIALIZED_DATA) == 0 {
-			// This has been seen for .idata sections, which we
-			// want to ignore.  See issues 5106 and 5273.
-			continue
-		}
-
-		if pemap(peobj, sect) < 0 {
-			goto bad
-		}
-
-		name = fmt.Sprintf("%s(%s)", pkg, sect.name)
-		s = Linklookup(Ctxt, name, Ctxt.Version)
-
-		switch sect.sh.Characteristics & (IMAGE_SCN_CNT_UNINITIALIZED_DATA | IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE | IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_EXECUTE) {
-		case IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ: //.rdata
-			s.Type = obj.SRODATA
-
-		case IMAGE_SCN_CNT_UNINITIALIZED_DATA | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE: //.bss
-			s.Type = obj.SNOPTRBSS
-
-		case IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE: //.data
-			s.Type = obj.SNOPTRDATA
-
-		case IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_EXECUTE | IMAGE_SCN_MEM_READ: //.text
-			s.Type = obj.STEXT
-
-		default:
-			err = fmt.Errorf("unexpected flags %#06x for PE section %s", sect.sh.Characteristics, sect.name)
-			goto bad
-		}
-
-		s.P = sect.base
-		s.P = s.P[:sect.size]
-		s.Size = int64(sect.size)
-		sect.sym = s
-		if sect.name == ".rsrc" {
-			setpersrc(sect.sym)
-		}
-	}
-
-	// load relocations
-	for i := 0; uint(i) < peobj.nsect; i++ {
-		rsect = &peobj.sect[i]
-		if rsect.sym == nil || rsect.sh.NumberOfRelocations == 0 {
-			continue
-		}
-		if rsect.sh.Characteristics&IMAGE_SCN_MEM_DISCARDABLE != 0 {
-			continue
-		}
-		if sect.sh.Characteristics&(IMAGE_SCN_CNT_CODE|IMAGE_SCN_CNT_INITIALIZED_DATA|IMAGE_SCN_CNT_UNINITIALIZED_DATA) == 0 {
-			// This has been seen for .idata sections, which we
-			// want to ignore.  See issues 5106 and 5273.
-			continue
-		}
-
-		r = make([]Reloc, rsect.sh.NumberOfRelocations)
-		obj.Bseek(f, int64(peobj.base)+int64(rsect.sh.PointerToRelocations), 0)
-		for j = 0; j < int(rsect.sh.NumberOfRelocations); j++ {
-			rp = &r[j]
-			if obj.Bread(f, symbuf[:10]) != 10 {
-				goto bad
-			}
-			rva := Le32(symbuf[0:])
-			symindex := Le32(symbuf[4:])
-			type_ := Le16(symbuf[8:])
-			if err = readpesym(peobj, int(symindex), &sym); err != nil {
-				goto bad
-			}
-			if sym.sym == nil {
-				err = fmt.Errorf("reloc of invalid sym %s idx=%d type=%d", sym.name, symindex, sym.type_)
-				goto bad
-			}
-
-			rp.Sym = sym.sym
-			rp.Siz = 4
-			rp.Off = int32(rva)
-			switch type_ {
-			default:
-				Diag("%s: unknown relocation type %d;", pn, type_)
-				fallthrough
-
-			case IMAGE_REL_I386_REL32, IMAGE_REL_AMD64_REL32,
-				IMAGE_REL_AMD64_ADDR32, // R_X86_64_PC32
-				IMAGE_REL_AMD64_ADDR32NB:
-				rp.Type = obj.R_PCREL
-
-				rp.Add = int64(int32(Le32(rsect.base[rp.Off:])))
-
-			case IMAGE_REL_I386_DIR32NB, IMAGE_REL_I386_DIR32:
-				rp.Type = obj.R_ADDR
-
-				// load addend from image
-				rp.Add = int64(int32(Le32(rsect.base[rp.Off:])))
-
-			case IMAGE_REL_AMD64_ADDR64: // R_X86_64_64
-				rp.Siz = 8
-
-				rp.Type = obj.R_ADDR
-
-				// load addend from image
-				rp.Add = int64(Le64(rsect.base[rp.Off:]))
-			}
-
-			// ld -r could generate multiple section symbols for the
-			// same section but with different values, we have to take
-			// that into account
-			if issect(&peobj.pesym[symindex]) {
-				rp.Add += int64(peobj.pesym[symindex].value)
-			}
-		}
-
-		sort.Sort(rbyoff(r[:rsect.sh.NumberOfRelocations]))
-
-		s = rsect.sym
-		s.R = r
-		s.R = s.R[:rsect.sh.NumberOfRelocations]
-	}
-
-	// enter sub-symbols into symbol table.
-	for i := 0; uint(i) < peobj.npesym; i++ {
-		if peobj.pesym[i].name == "" {
-			continue
-		}
-		if issect(&peobj.pesym[i]) {
-			continue
-		}
-		if uint(peobj.pesym[i].sectnum) > peobj.nsect {
-			continue
-		}
-		if peobj.pesym[i].sectnum > 0 {
-			sect = &peobj.sect[peobj.pesym[i].sectnum-1]
-			if sect.sym == nil {
-				continue
-			}
-		}
-
-		if err = readpesym(peobj, i, &sym); err != nil {
-			goto bad
-		}
-
-		s = sym.sym
-		if sym.sectnum == 0 { // extern
-			if s.Type == obj.SDYNIMPORT {
-				s.Plt = -2 // flag for dynimport in PE object files.
-			}
-			if s.Type == obj.SXREF && sym.value > 0 { // global data
-				s.Type = obj.SNOPTRDATA
-				s.Size = int64(sym.value)
-			}
-
-			continue
-		} else if sym.sectnum > 0 && uint(sym.sectnum) <= peobj.nsect {
-			sect = &peobj.sect[sym.sectnum-1]
-			if sect.sym == nil {
-				Diag("%s: %s sym == 0!", pn, s.Name)
-			}
-		} else {
-			Diag("%s: %s sectnum < 0!", pn, s.Name)
-		}
-
-		if sect == nil {
-			return
-		}
-
-		if s.Outer != nil {
-			if s.Dupok != 0 {
-				continue
-			}
-			Exitf("%s: duplicate symbol reference: %s in both %s and %s", pn, s.Name, s.Outer.Name, sect.sym.Name)
-		}
-
-		s.Sub = sect.sym.Sub
-		sect.sym.Sub = s
-		s.Type = sect.sym.Type | obj.SSUB
-		s.Value = int64(sym.value)
-		s.Size = 4
-		s.Outer = sect.sym
-		if sect.sym.Type == obj.STEXT {
-			if s.External != 0 && s.Dupok == 0 {
-				Diag("%s: duplicate definition of %s", pn, s.Name)
-			}
-			s.External = 1
-		}
-	}
-
-	// Sort outer lists by address, adding to textp.
-	// This keeps textp in increasing address order.
-	for i := 0; uint(i) < peobj.nsect; i++ {
-		s = peobj.sect[i].sym
-		if s == nil {
-			continue
-		}
-		if s.Sub != nil {
-			s.Sub = listsort(s.Sub, valuecmp, listsubp)
-		}
-		if s.Type == obj.STEXT {
-			if s.Onlist != 0 {
-				log.Fatalf("symbol %s listed multiple times", s.Name)
-			}
-			s.Onlist = 1
-			if Ctxt.Etextp != nil {
-				Ctxt.Etextp.Next = s
-			} else {
-				Ctxt.Textp = s
-			}
-			Ctxt.Etextp = s
-			for s = s.Sub; s != nil; s = s.Sub {
-				if s.Onlist != 0 {
-					log.Fatalf("symbol %s listed multiple times", s.Name)
-				}
-				s.Onlist = 1
-				Ctxt.Etextp.Next = s
-				Ctxt.Etextp = s
-			}
-		}
-	}
-
-	return
-
-bad:
-	Diag("%s: malformed pe file: %v", pn, err)
-}
-
-func pemap(peobj *PeObj, sect *PeSect) int {
-	if sect.base != nil {
-		return 0
-	}
-
-	sect.base = make([]byte, sect.sh.SizeOfRawData)
-	if sect.sh.PointerToRawData == 0 { // .bss doesn't have data in object file
-		return 0
-	}
-	if obj.Bseek(peobj.f, int64(peobj.base)+int64(sect.sh.PointerToRawData), 0) < 0 || obj.Bread(peobj.f, sect.base) != len(sect.base) {
-		return -1
-	}
-
-	return 0
-}
-
-func issect(s *PeSym) bool {
-	return s.sclass == IMAGE_SYM_CLASS_STATIC && s.type_ == 0 && s.name[0] == '.'
-}
-
-func readpesym(peobj *PeObj, i int, y **PeSym) (err error) {
-	if uint(i) >= peobj.npesym || i < 0 {
-		err = fmt.Errorf("invalid pe symbol index")
-		return err
-	}
-
-	sym := &peobj.pesym[i]
-	*y = sym
-
-	var name string
-	if issect(sym) {
-		name = peobj.sect[sym.sectnum-1].sym.Name
-	} else {
-		name = sym.name
-		if strings.HasPrefix(name, "__imp_") {
-			name = name[6:] // __imp_Name => Name
-		}
-		if Thearch.Thechar == '8' && name[0] == '_' {
-			name = name[1:] // _Name => Name
-		}
-	}
-
-	// remove last @XXX
-	if i := strings.LastIndex(name, "@"); i >= 0 {
-		name = name[:i]
-	}
-
-	var s *LSym
-	switch sym.type_ {
-	default:
-		err = fmt.Errorf("%s: invalid symbol type %d", sym.name, sym.type_)
-		return err
-
-	case IMAGE_SYM_DTYPE_FUNCTION, IMAGE_SYM_DTYPE_NULL:
-		switch sym.sclass {
-		case IMAGE_SYM_CLASS_EXTERNAL: //global
-			s = Linklookup(Ctxt, name, 0)
-
-		case IMAGE_SYM_CLASS_NULL, IMAGE_SYM_CLASS_STATIC, IMAGE_SYM_CLASS_LABEL:
-			s = Linklookup(Ctxt, name, Ctxt.Version)
-			s.Dupok = 1
-
-		default:
-			err = fmt.Errorf("%s: invalid symbol binding %d", sym.name, sym.sclass)
-			return err
-		}
-	}
-
-	if s != nil && s.Type == 0 && (sym.sclass != IMAGE_SYM_CLASS_STATIC || sym.value != 0) {
-		s.Type = obj.SXREF
-	}
-	if strings.HasPrefix(sym.name, "__imp_") {
-		s.Got = -2 // flag for __imp_
-	}
-	sym.sym = s
-
-	return nil
-}
diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
deleted file mode 100644
index 8ccbec9..0000000
--- a/src/cmd/link/internal/ld/lib.go
+++ /dev/null
@@ -1,2049 +0,0 @@
-// Inferno utils/8l/asm.c
-// http://code.google.com/p/inferno-os/source/browse/utils/8l/asm.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package ld
-
-import (
-	"bufio"
-	"bytes"
-	"cmd/internal/obj"
-	"crypto/sha1"
-	"debug/elf"
-	"encoding/binary"
-	"fmt"
-	"io"
-	"io/ioutil"
-	"log"
-	"os"
-	"os/exec"
-	"path/filepath"
-	"runtime"
-	"strings"
-)
-
-// Data layout and relocation.
-
-// Derived from Inferno utils/6l/l.h
-// http://code.google.com/p/inferno-os/source/browse/utils/6l/l.h
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-type Arch struct {
-	Thechar          int
-	Ptrsize          int
-	Intsize          int
-	Regsize          int
-	Funcalign        int
-	Maxalign         int
-	Minlc            int
-	Dwarfregsp       int
-	Dwarfreglr       int
-	Linuxdynld       string
-	Freebsddynld     string
-	Netbsddynld      string
-	Openbsddynld     string
-	Dragonflydynld   string
-	Solarisdynld     string
-	Adddynrel        func(*LSym, *Reloc)
-	Archinit         func()
-	Archreloc        func(*Reloc, *LSym, *int64) int
-	Archrelocvariant func(*Reloc, *LSym, int64) int64
-	Asmb             func()
-	Elfreloc1        func(*Reloc, int64) int
-	Elfsetupplt      func()
-	Gentext          func()
-	Machoreloc1      func(*Reloc, int64) int
-	PEreloc1         func(*Reloc, int64) bool
-	Lput             func(uint32)
-	Wput             func(uint16)
-	Vput             func(uint64)
-}
-
-type Rpath struct {
-	set bool
-	val string
-}
-
-func (r *Rpath) Set(val string) error {
-	r.set = true
-	r.val = val
-	return nil
-}
-
-func (r *Rpath) String() string {
-	return r.val
-}
-
-var (
-	Thearch Arch
-	datap   *LSym
-	Debug   [128]int
-	Lcsize  int32
-	rpath   Rpath
-	Spsize  int32
-	Symsize int32
-)
-
-// Terrible but standard terminology.
-// A segment describes a block of file to load into memory.
-// A section further describes the pieces of that block for
-// use in debuggers and such.
-
-const (
-	MAXIO   = 8192
-	MINFUNC = 16 // minimum size for a function
-)
-
-type Segment struct {
-	Rwx     uint8  // permission as usual unix bits (5 = r-x etc)
-	Vaddr   uint64 // virtual address
-	Length  uint64 // length in memory
-	Fileoff uint64 // file offset
-	Filelen uint64 // length on disk
-	Sect    *Section
-}
-
-type Section struct {
-	Rwx     uint8
-	Extnum  int16
-	Align   int32
-	Name    string
-	Vaddr   uint64
-	Length  uint64
-	Next    *Section
-	Seg     *Segment
-	Elfsect *ElfShdr
-	Reloff  uint64
-	Rellen  uint64
-}
-
-// DynlinkingGo returns whether we are producing Go code that can live
-// in separate shared libraries linked together at runtime.
-func DynlinkingGo() bool {
-	return Buildmode == BuildmodeShared || Linkshared
-}
-
-var (
-	Thestring          string
-	Thelinkarch        *LinkArch
-	outfile            string
-	dynexp             []*LSym
-	dynlib             []string
-	ldflag             []string
-	havedynamic        int
-	Funcalign          int
-	iscgo              bool
-	elfglobalsymndx    int
-	flag_installsuffix string
-	flag_race          int
-	Buildmode          BuildMode
-	Linkshared         bool
-	tracksym           string
-	interpreter        string
-	tmpdir             string
-	extld              string
-	extldflags         string
-	debug_s            int // backup old value of debug['s']
-	Ctxt               *Link
-	HEADR              int32
-	HEADTYPE           int32
-	INITRND            int32
-	INITTEXT           int64
-	INITDAT            int64
-	INITENTRY          string /* entry point */
-	nerrors            int
-	Linkmode           int
-	liveness           int64
-)
-
-// for dynexport field of LSym
-const (
-	CgoExportDynamic = 1 << 0
-	CgoExportStatic  = 1 << 1
-)
-
-var (
-	Segtext   Segment
-	Segrodata Segment
-	Segdata   Segment
-	Segdwarf  Segment
-)
-
-/* set by call to mywhatsys() */
-
-/* whence for ldpkg */
-const (
-	FileObj = 0 + iota
-	ArchiveObj
-	Pkgdef
-)
-
-var (
-	headstring string
-	// buffered output
-	Bso obj.Biobuf
-)
-
-var coutbuf struct {
-	*bufio.Writer
-	f *os.File
-}
-
-const (
-	// Whether to assume that the external linker is "gold"
-	// (http://sourceware.org/ml/binutils/2008-03/msg00162.html).
-	AssumeGoldLinker = 0
-)
-
-const (
-	symname = "__.GOSYMDEF"
-	pkgname = "__.PKGDEF"
-)
-
-var (
-	// Set if we see an object compiled by the host compiler that is not
-	// from a package that is known to support internal linking mode.
-	externalobj = false
-	goroot      string
-	goarch      string
-	goos        string
-	theline     string
-)
-
-func Lflag(arg string) {
-	Ctxt.Libdir = append(Ctxt.Libdir, arg)
-}
-
-// A BuildMode indicates the sort of object we are building:
-//   "exe": build a main package and everything it imports into an executable.
-//   "c-shared": build a main package, plus all packages that it imports, into a
-//     single C shared library. The only callable symbols will be those functions
-//     marked as exported.
-//   "shared": combine all packages passed on the command line, and their
-//     dependencies, into a single shared library that will be used when
-//     building with the -linkshared option.
-type BuildMode uint8
-
-const (
-	BuildmodeUnset BuildMode = iota
-	BuildmodeExe
-	BuildmodeCArchive
-	BuildmodeCShared
-	BuildmodeShared
-)
-
-func (mode *BuildMode) Set(s string) error {
-	goos := obj.Getgoos()
-	goarch := obj.Getgoarch()
-	badmode := func() error {
-		return fmt.Errorf("buildmode %s not supported on %s/%s", s, goos, goarch)
-	}
-	switch s {
-	default:
-		return fmt.Errorf("invalid buildmode: %q", s)
-	case "exe":
-		*mode = BuildmodeExe
-	case "c-archive":
-		switch goos {
-		case "darwin", "linux":
-		default:
-			return badmode()
-		}
-		*mode = BuildmodeCArchive
-	case "c-shared":
-		if goarch != "amd64" && goarch != "arm" {
-			return badmode()
-		}
-		*mode = BuildmodeCShared
-	case "shared":
-		if goos != "linux" || goarch != "amd64" {
-			return badmode()
-		}
-		*mode = BuildmodeShared
-	}
-	return nil
-}
-
-func (mode *BuildMode) String() string {
-	switch *mode {
-	case BuildmodeUnset:
-		return "" // avoid showing a default in usage message
-	case BuildmodeExe:
-		return "exe"
-	case BuildmodeCArchive:
-		return "c-archive"
-	case BuildmodeCShared:
-		return "c-shared"
-	case BuildmodeShared:
-		return "shared"
-	}
-	return fmt.Sprintf("BuildMode(%d)", uint8(*mode))
-}
-
-/*
- * Unix doesn't like it when we write to a running (or, sometimes,
- * recently run) binary, so remove the output file before writing it.
- * On Windows 7, remove() can force a subsequent create() to fail.
- * S_ISREG() does not exist on Plan 9.
- */
-func mayberemoveoutfile() {
-	if fi, err := os.Lstat(outfile); err == nil && !fi.Mode().IsRegular() {
-		return
-	}
-	os.Remove(outfile)
-}
-
-func libinit() {
-	Funcalign = Thearch.Funcalign
-	mywhatsys() // get goroot, goarch, goos
-
-	// add goroot to the end of the libdir list.
-	suffix := ""
-
-	suffixsep := ""
-	if flag_installsuffix != "" {
-		suffixsep = "_"
-		suffix = flag_installsuffix
-	} else if flag_race != 0 {
-		suffixsep = "_"
-		suffix = "race"
-	}
-
-	Lflag(fmt.Sprintf("%s/pkg/%s_%s%s%s", goroot, goos, goarch, suffixsep, suffix))
-
-	mayberemoveoutfile()
-	f, err := os.OpenFile(outfile, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0775)
-	if err != nil {
-		Exitf("cannot create %s: %v", outfile, err)
-	}
-
-	coutbuf.Writer = bufio.NewWriter(f)
-	coutbuf.f = f
-
-	if INITENTRY == "" {
-		switch Buildmode {
-		case BuildmodeCShared, BuildmodeCArchive:
-			INITENTRY = fmt.Sprintf("_rt0_%s_%s_lib", goarch, goos)
-		case BuildmodeExe:
-			INITENTRY = fmt.Sprintf("_rt0_%s_%s", goarch, goos)
-		case BuildmodeShared:
-			// No INITENTRY for -buildmode=shared
-		default:
-			Diag("unknown INITENTRY for buildmode %v", Buildmode)
-		}
-	}
-
-	if !DynlinkingGo() {
-		Linklookup(Ctxt, INITENTRY, 0).Type = obj.SXREF
-	}
-}
-
-func Exitf(format string, a ...interface{}) {
-	fmt.Fprintf(os.Stderr, os.Args[0]+": "+format+"\n", a...)
-	if coutbuf.f != nil {
-		coutbuf.f.Close()
-		mayberemoveoutfile()
-	}
-	Exit(2)
-}
-
-func errorexit() {
-	if coutbuf.f != nil {
-		if nerrors != 0 {
-			Cflush()
-		}
-		// For rmtemp run at atexit time on Windows.
-		if err := coutbuf.f.Close(); err != nil {
-			Exitf("close: %v", err)
-		}
-	}
-
-	if nerrors != 0 {
-		if coutbuf.f != nil {
-			mayberemoveoutfile()
-		}
-		Exit(2)
-	}
-
-	Exit(0)
-}
-
-func loadinternal(name string) {
-	found := 0
-	for i := 0; i < len(Ctxt.Libdir); i++ {
-		if Linkshared {
-			shlibname := fmt.Sprintf("%s/%s.shlibname", Ctxt.Libdir[i], name)
-			if Debug['v'] != 0 {
-				fmt.Fprintf(&Bso, "searching for %s.a in %s\n", name, shlibname)
-			}
-			if obj.Access(shlibname, obj.AEXIST) >= 0 {
-				addlibpath(Ctxt, "internal", "internal", "", name, shlibname)
-				found = 1
-				break
-			}
-		}
-		pname := fmt.Sprintf("%s/%s.a", Ctxt.Libdir[i], name)
-		if Debug['v'] != 0 {
-			fmt.Fprintf(&Bso, "searching for %s.a in %s\n", name, pname)
-		}
-		if obj.Access(pname, obj.AEXIST) >= 0 {
-			addlibpath(Ctxt, "internal", "internal", pname, name, "")
-			found = 1
-			break
-		}
-	}
-
-	if found == 0 {
-		fmt.Fprintf(&Bso, "warning: unable to find %s.a\n", name)
-	}
-}
-
-func loadlib() {
-	switch Buildmode {
-	case BuildmodeCShared:
-		s := Linklookup(Ctxt, "runtime.islibrary", 0)
-		s.Dupok = 1
-		Adduint8(Ctxt, s, 1)
-	case BuildmodeCArchive:
-		s := Linklookup(Ctxt, "runtime.isarchive", 0)
-		s.Dupok = 1
-		Adduint8(Ctxt, s, 1)
-	}
-
-	loadinternal("runtime")
-	if Thearch.Thechar == '5' {
-		loadinternal("math")
-	}
-	if flag_race != 0 {
-		loadinternal("runtime/race")
-	}
-
-	var i int
-	for i = 0; i < len(Ctxt.Library); i++ {
-		if Debug['v'] > 1 {
-			fmt.Fprintf(&Bso, "%5.2f autolib: %s (from %s)\n", obj.Cputime(), Ctxt.Library[i].File, Ctxt.Library[i].Objref)
-		}
-		iscgo = iscgo || Ctxt.Library[i].Pkg == "runtime/cgo"
-		if Ctxt.Library[i].Shlib != "" {
-			ldshlibsyms(Ctxt.Library[i].Shlib)
-		} else {
-			objfile(Ctxt.Library[i])
-		}
-	}
-
-	if Linkmode == LinkAuto {
-		if iscgo && externalobj {
-			Linkmode = LinkExternal
-		} else {
-			Linkmode = LinkInternal
-		}
-
-		// Force external linking for android.
-		if goos == "android" {
-			Linkmode = LinkExternal
-		}
-
-		// cgo on Darwin must use external linking
-		// we can always use external linking, but then there will be circular
-		// dependency problems when compiling natively (external linking requires
-		// runtime/cgo, runtime/cgo requires cmd/cgo, but cmd/cgo needs to be
-		// compiled using external linking.)
-		if (Thearch.Thechar == '5' || Thearch.Thechar == '7') && HEADTYPE == obj.Hdarwin && iscgo {
-			Linkmode = LinkExternal
-		}
-	}
-
-	// cmd/7l doesn't support cgo internal linking
-	// This is https://golang.org/issue/10373.
-	if iscgo && goarch == "arm64" {
-		Linkmode = LinkExternal
-	}
-
-	if Linkmode == LinkExternal && !iscgo {
-		// This indicates a user requested -linkmode=external.
-		// The startup code uses an import of runtime/cgo to decide
-		// whether to initialize the TLS.  So give it one.  This could
-		// be handled differently but it's an unusual case.
-		loadinternal("runtime/cgo")
-
-		if i < len(Ctxt.Library) {
-			if Ctxt.Library[i].Shlib != "" {
-				ldshlibsyms(Ctxt.Library[i].Shlib)
-			} else {
-				if DynlinkingGo() {
-					Exitf("cannot implicitly include runtime/cgo in a shared library")
-				}
-				objfile(Ctxt.Library[i])
-			}
-		}
-	}
-
-	if Linkmode == LinkInternal {
-		// Drop all the cgo_import_static declarations.
-		// Turns out we won't be needing them.
-		for s := Ctxt.Allsym; s != nil; s = s.Allsym {
-			if s.Type == obj.SHOSTOBJ {
-				// If a symbol was marked both
-				// cgo_import_static and cgo_import_dynamic,
-				// then we want to make it cgo_import_dynamic
-				// now.
-				if s.Extname != "" && s.Dynimplib != "" && s.Cgoexport == 0 {
-					s.Type = obj.SDYNIMPORT
-				} else {
-					s.Type = 0
-				}
-			}
-		}
-	}
-
-	tlsg := Linklookup(Ctxt, "runtime.tlsg", 0)
-
-	// For most ports, runtime.tlsg is a placeholder symbol for TLS
-	// relocation. However, the Android and Darwin arm ports need it
-	// to be a real variable.
-	//
-	// TODO(crawshaw): android should require leaving the tlsg->type
-	// alone (as the runtime-provided SNOPTRBSS) just like darwin/arm.
-	// But some other part of the linker is expecting STLSBSS.
-	if tlsg.Type != obj.SDYNIMPORT && (goos != "darwin" || Thearch.Thechar != '5') {
-		tlsg.Type = obj.STLSBSS
-	}
-	tlsg.Size = int64(Thearch.Ptrsize)
-	tlsg.Reachable = true
-	Ctxt.Tlsg = tlsg
-
-	// Now that we know the link mode, trim the dynexp list.
-	x := CgoExportDynamic
-
-	if Linkmode == LinkExternal {
-		x = CgoExportStatic
-	}
-	w := 0
-	for i := 0; i < len(dynexp); i++ {
-		if int(dynexp[i].Cgoexport)&x != 0 {
-			dynexp[w] = dynexp[i]
-			w++
-		}
-	}
-	dynexp = dynexp[:w]
-
-	// In internal link mode, read the host object files.
-	if Linkmode == LinkInternal {
-		hostobjs()
-	} else {
-		hostlinksetup()
-	}
-
-	// We've loaded all the code now.
-	// If there are no dynamic libraries needed, gcc disables dynamic linking.
-	// Because of this, glibc's dynamic ELF loader occasionally (like in version 2.13)
-	// assumes that a dynamic binary always refers to at least one dynamic library.
-	// Rather than be a source of test cases for glibc, disable dynamic linking
-	// the same way that gcc would.
-	//
-	// Exception: on OS X, programs such as Shark only work with dynamic
-	// binaries, so leave it enabled on OS X (Mach-O) binaries.
-	// Also leave it enabled on Solaris which doesn't support
-	// statically linked binaries.
-	if Buildmode == BuildmodeExe && havedynamic == 0 && HEADTYPE != obj.Hdarwin && HEADTYPE != obj.Hsolaris {
-		Debug['d'] = 1
-	}
-
-	importcycles()
-}
-
-/*
- * look for the next file in an archive.
- * adapted from libmach.
- */
-func nextar(bp *obj.Biobuf, off int64, a *ArHdr) int64 {
-	if off&1 != 0 {
-		off++
-	}
-	obj.Bseek(bp, off, 0)
-	buf := make([]byte, SAR_HDR)
-	if n := obj.Bread(bp, buf); n < len(buf) {
-		if n >= 0 {
-			return 0
-		}
-		return -1
-	}
-
-	a.name = artrim(buf[0:16])
-	a.date = artrim(buf[16:28])
-	a.uid = artrim(buf[28:34])
-	a.gid = artrim(buf[34:40])
-	a.mode = artrim(buf[40:48])
-	a.size = artrim(buf[48:58])
-	a.fmag = artrim(buf[58:60])
-
-	arsize := atolwhex(a.size)
-	if arsize&1 != 0 {
-		arsize++
-	}
-	return int64(arsize) + SAR_HDR
-}
-
-func objfile(lib *Library) {
-	pkg := pathtoprefix(lib.Pkg)
-
-	if Debug['v'] > 1 {
-		fmt.Fprintf(&Bso, "%5.2f ldobj: %s (%s)\n", obj.Cputime(), lib.File, pkg)
-	}
-	Bso.Flush()
-	var err error
-	var f *obj.Biobuf
-	f, err = obj.Bopenr(lib.File)
-	if err != nil {
-		Exitf("cannot open file %s: %v", lib.File, err)
-	}
-
-	magbuf := make([]byte, len(ARMAG))
-	if obj.Bread(f, magbuf) != len(magbuf) || !strings.HasPrefix(string(magbuf), ARMAG) {
-		/* load it as a regular file */
-		l := obj.Bseek(f, 0, 2)
-
-		obj.Bseek(f, 0, 0)
-		ldobj(f, pkg, l, lib.File, lib.File, FileObj)
-		obj.Bterm(f)
-
-		return
-	}
-
-	/* skip over optional __.GOSYMDEF and process __.PKGDEF */
-	off := obj.Boffset(f)
-
-	var arhdr ArHdr
-	l := nextar(f, off, &arhdr)
-	var pname string
-	if l <= 0 {
-		Diag("%s: short read on archive file symbol header", lib.File)
-		goto out
-	}
-
-	if strings.HasPrefix(arhdr.name, symname) {
-		off += l
-		l = nextar(f, off, &arhdr)
-		if l <= 0 {
-			Diag("%s: short read on archive file symbol header", lib.File)
-			goto out
-		}
-	}
-
-	if !strings.HasPrefix(arhdr.name, pkgname) {
-		Diag("%s: cannot find package header", lib.File)
-		goto out
-	}
-
-	if Buildmode == BuildmodeShared {
-		before := obj.Boffset(f)
-		pkgdefBytes := make([]byte, atolwhex(arhdr.size))
-		obj.Bread(f, pkgdefBytes)
-		hash := sha1.Sum(pkgdefBytes)
-		lib.hash = hash[:]
-		obj.Bseek(f, before, 0)
-	}
-
-	off += l
-
-	if Debug['u'] != 0 {
-		ldpkg(f, pkg, atolwhex(arhdr.size), lib.File, Pkgdef)
-	}
-
-	/*
-	 * load all the object files from the archive now.
-	 * this gives us sequential file access and keeps us
-	 * from needing to come back later to pick up more
-	 * objects.  it breaks the usual C archive model, but
-	 * this is Go, not C.  the common case in Go is that
-	 * we need to load all the objects, and then we throw away
-	 * the individual symbols that are unused.
-	 *
-	 * loading every object will also make it possible to
-	 * load foreign objects not referenced by __.GOSYMDEF.
-	 */
-	for {
-		l = nextar(f, off, &arhdr)
-		if l == 0 {
-			break
-		}
-		if l < 0 {
-			Exitf("%s: malformed archive", lib.File)
-		}
-
-		off += l
-
-		pname = fmt.Sprintf("%s(%s)", lib.File, arhdr.name)
-		l = atolwhex(arhdr.size)
-		ldobj(f, pkg, l, pname, lib.File, ArchiveObj)
-	}
-
-out:
-	obj.Bterm(f)
-}
-
-type Hostobj struct {
-	ld     func(*obj.Biobuf, string, int64, string)
-	pkg    string
-	pn     string
-	file   string
-	off    int64
-	length int64
-}
-
-var hostobj []Hostobj
-
-// These packages can use internal linking mode.
-// Others trigger external mode.
-var internalpkg = []string{
-	"crypto/x509",
-	"net",
-	"os/user",
-	"runtime/cgo",
-	"runtime/race",
-}
-
-func ldhostobj(ld func(*obj.Biobuf, string, int64, string), f *obj.Biobuf, pkg string, length int64, pn string, file string) {
-	isinternal := false
-	for i := 0; i < len(internalpkg); i++ {
-		if pkg == internalpkg[i] {
-			isinternal = true
-			break
-		}
-	}
-
-	// DragonFly declares errno with __thread, which results in a symbol
-	// type of R_386_TLS_GD or R_X86_64_TLSGD. The Go linker does not
-	// currently know how to handle TLS relocations, hence we have to
-	// force external linking for any libraries that link in code that
-	// uses errno. This can be removed if the Go linker ever supports
-	// these relocation types.
-	if HEADTYPE == obj.Hdragonfly {
-		if pkg == "net" || pkg == "os/user" {
-			isinternal = false
-		}
-	}
-
-	if !isinternal {
-		externalobj = true
-	}
-
-	hostobj = append(hostobj, Hostobj{})
-	h := &hostobj[len(hostobj)-1]
-	h.ld = ld
-	h.pkg = pkg
-	h.pn = pn
-	h.file = file
-	h.off = obj.Boffset(f)
-	h.length = length
-}
-
-func hostobjs() {
-	var f *obj.Biobuf
-	var h *Hostobj
-
-	for i := 0; i < len(hostobj); i++ {
-		h = &hostobj[i]
-		var err error
-		f, err = obj.Bopenr(h.file)
-		if f == nil {
-			Exitf("cannot reopen %s: %v", h.pn, err)
-		}
-
-		obj.Bseek(f, h.off, 0)
-		h.ld(f, h.pkg, h.length, h.pn)
-		obj.Bterm(f)
-	}
-}
-
-// provided by lib9
-
-func rmtemp() {
-	os.RemoveAll(tmpdir)
-}
-
-func hostlinksetup() {
-	if Linkmode != LinkExternal {
-		return
-	}
-
-	// For external link, record that we need to tell the external linker -s,
-	// and turn off -s internally: the external linker needs the symbol
-	// information for its final link.
-	debug_s = Debug['s']
-	Debug['s'] = 0
-
-	// create temporary directory and arrange cleanup
-	if tmpdir == "" {
-		dir, err := ioutil.TempDir("", "go-link-")
-		if err != nil {
-			log.Fatal(err)
-		}
-		tmpdir = dir
-		AtExit(rmtemp)
-	}
-
-	// change our output to temporary object file
-	coutbuf.f.Close()
-	mayberemoveoutfile()
-
-	p := fmt.Sprintf("%s/go.o", tmpdir)
-	var err error
-	f, err := os.OpenFile(p, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0775)
-	if err != nil {
-		Exitf("cannot create %s: %v", p, err)
-	}
-
-	coutbuf.Writer = bufio.NewWriter(f)
-	coutbuf.f = f
-}
-
-// hostobjCopy creates a copy of the object files in hostobj in a
-// temporary directory.
-func hostobjCopy() (paths []string) {
-	for i, h := range hostobj {
-		f, err := os.Open(h.file)
-		if err != nil {
-			Exitf("cannot reopen %s: %v", h.pn, err)
-		}
-		if _, err := f.Seek(h.off, 0); err != nil {
-			Exitf("cannot seek %s: %v", h.pn, err)
-		}
-
-		p := fmt.Sprintf("%s/%06d.o", tmpdir, i)
-		paths = append(paths, p)
-		w, err := os.Create(p)
-		if err != nil {
-			Exitf("cannot create %s: %v", p, err)
-		}
-		if _, err := io.CopyN(w, f, h.length); err != nil {
-			Exitf("cannot write %s: %v", p, err)
-		}
-		if err := w.Close(); err != nil {
-			Exitf("cannot close %s: %v", p, err)
-		}
-	}
-	return paths
-}
-
-// archive builds a .a archive from the hostobj object files.
-func archive() {
-	if Buildmode != BuildmodeCArchive {
-		return
-	}
-
-	mayberemoveoutfile()
-	argv := []string{"ar", "-q", "-c", "-s", outfile}
-	argv = append(argv, hostobjCopy()...)
-	argv = append(argv, fmt.Sprintf("%s/go.o", tmpdir))
-
-	if Debug['v'] != 0 {
-		fmt.Fprintf(&Bso, "archive: %s\n", strings.Join(argv, " "))
-		Bso.Flush()
-	}
-
-	if out, err := exec.Command(argv[0], argv[1:]...).CombinedOutput(); err != nil {
-		Exitf("running %s failed: %v\n%s", argv[0], err, out)
-	}
-}
-
-func hostlink() {
-	if Linkmode != LinkExternal || nerrors > 0 {
-		return
-	}
-	if Buildmode == BuildmodeCArchive {
-		return
-	}
-
-	if extld == "" {
-		extld = "gcc"
-	}
-
-	var argv []string
-	argv = append(argv, extld)
-	switch Thearch.Thechar {
-	case '8':
-		argv = append(argv, "-m32")
-
-	case '6', '9':
-		argv = append(argv, "-m64")
-
-	case '5':
-		argv = append(argv, "-marm")
-
-	case '7':
-		// nothing needed
-	}
-
-	if Debug['s'] == 0 && debug_s == 0 {
-		argv = append(argv, "-gdwarf-2")
-	} else {
-		argv = append(argv, "-s")
-	}
-
-	if HEADTYPE == obj.Hdarwin {
-		argv = append(argv, "-Wl,-no_pie,-headerpad,1144")
-	}
-	if HEADTYPE == obj.Hopenbsd {
-		argv = append(argv, "-Wl,-nopie")
-	}
-	if HEADTYPE == obj.Hwindows {
-		if headstring == "windowsgui" {
-			argv = append(argv, "-mwindows")
-		} else {
-			argv = append(argv, "-mconsole")
-		}
-	}
-
-	if Iself && AssumeGoldLinker != 0 /*TypeKind(100016)*/ {
-		argv = append(argv, "-Wl,--rosegment")
-	}
-
-	switch Buildmode {
-	case BuildmodeExe:
-		if HEADTYPE == obj.Hdarwin {
-			argv = append(argv, "-Wl,-pagezero_size,4000000")
-		}
-	case BuildmodeCShared:
-		if HEADTYPE == obj.Hdarwin {
-			argv = append(argv, "-dynamiclib")
-		} else {
-			argv = append(argv, "-Wl,-Bsymbolic")
-			argv = append(argv, "-shared")
-		}
-	case BuildmodeShared:
-		// TODO(mwhudson): unless you do this, dynamic relocations fill
-		// out the findfunctab table and for some reason shared libraries
-		// and the executable both define a main function and putting the
-		// address of executable's main into the shared libraries
-		// findfunctab violates the assumptions of the runtime.  TBH, I
-		// think we may well end up wanting to use -Bsymbolic here
-		// anyway.
-		argv = append(argv, "-Wl,-Bsymbolic-functions")
-		argv = append(argv, "-shared")
-	}
-
-	if Linkshared && Iself {
-		// We force all symbol resolution to be done at program startup
-		// because lazy PLT resolution can use large amounts of stack at
-		// times we cannot allow it to do so.
-		argv = append(argv, "-Wl,-znow")
-	}
-
-	if Iself && len(buildinfo) > 0 {
-		argv = append(argv, fmt.Sprintf("-Wl,--build-id=0x%x", buildinfo))
-	}
-
-	// On Windows, given -o foo, GCC will append ".exe" to produce
-	// "foo.exe".  We have decided that we want to honor the -o
-	// option.  To make this work, we append a '.' so that GCC
-	// will decide that the file already has an extension.  We
-	// only want to do this when producing a Windows output file
-	// on a Windows host.
-	outopt := outfile
-	if goos == "windows" && runtime.GOOS == "windows" && filepath.Ext(outopt) == "" {
-		outopt += "."
-	}
-	argv = append(argv, "-o")
-	argv = append(argv, outopt)
-
-	if rpath.val != "" {
-		argv = append(argv, fmt.Sprintf("-Wl,-rpath,%s", rpath.val))
-	}
-
-	// Force global symbols to be exported for dlopen, etc.
-	if Iself {
-		argv = append(argv, "-rdynamic")
-	}
-
-	if strings.Contains(argv[0], "clang") {
-		argv = append(argv, "-Qunused-arguments")
-	}
-
-	argv = append(argv, hostobjCopy()...)
-	argv = append(argv, fmt.Sprintf("%s/go.o", tmpdir))
-
-	if Linkshared {
-		seenDirs := make(map[string]bool)
-		seenLibs := make(map[string]bool)
-		addshlib := func(path string) {
-			dir, base := filepath.Split(path)
-			if !seenDirs[dir] {
-				argv = append(argv, "-L"+dir)
-				if !rpath.set {
-					argv = append(argv, "-Wl,-rpath="+dir)
-				}
-				seenDirs[dir] = true
-			}
-			base = strings.TrimSuffix(base, ".so")
-			base = strings.TrimPrefix(base, "lib")
-			if !seenLibs[base] {
-				argv = append(argv, "-l"+base)
-				seenLibs[base] = true
-			}
-		}
-		for _, shlib := range Ctxt.Shlibs {
-			addshlib(shlib.Path)
-			for _, dep := range shlib.Deps {
-				if dep == "" {
-					continue
-				}
-				libpath := findshlib(dep)
-				if libpath != "" {
-					addshlib(libpath)
-				}
-			}
-		}
-	}
-
-	argv = append(argv, ldflag...)
-
-	for _, p := range strings.Fields(extldflags) {
-		argv = append(argv, p)
-
-		// clang, unlike GCC, passes -rdynamic to the linker
-		// even when linking with -static, causing a linker
-		// error when using GNU ld.  So take out -rdynamic if
-		// we added it.  We do it in this order, rather than
-		// only adding -rdynamic later, so that -extldflags
-		// can override -rdynamic without using -static.
-		if Iself && p == "-static" {
-			for i := range argv {
-				if argv[i] == "-rdynamic" {
-					argv[i] = "-static"
-				}
-			}
-		}
-	}
-	if HEADTYPE == obj.Hwindows {
-		argv = append(argv, peimporteddlls()...)
-	}
-
-	if Debug['v'] != 0 {
-		fmt.Fprintf(&Bso, "host link:")
-		for _, v := range argv {
-			fmt.Fprintf(&Bso, " %q", v)
-		}
-		fmt.Fprintf(&Bso, "\n")
-		Bso.Flush()
-	}
-
-	if out, err := exec.Command(argv[0], argv[1:]...).CombinedOutput(); err != nil {
-		Exitf("running %s failed: %v\n%s", argv[0], err, out)
-	} else if Debug['v'] != 0 && len(out) > 0 {
-		fmt.Fprintf(&Bso, "%s", out)
-		Bso.Flush()
-	}
-
-	if Debug['s'] == 0 && debug_s == 0 && HEADTYPE == obj.Hdarwin {
-		// Skip combining dwarf on arm.
-		if Thearch.Thechar != '5' && Thearch.Thechar != '7' {
-			dsym := fmt.Sprintf("%s/go.dwarf", tmpdir)
-			if out, err := exec.Command("dsymutil", "-f", outfile, "-o", dsym).CombinedOutput(); err != nil {
-				Ctxt.Cursym = nil
-				Exitf("%s: running dsymutil failed: %v\n%s", os.Args[0], err, out)
-			}
-			// For os.Rename to work reliably, must be in same directory as outfile.
-			combinedOutput := outfile + "~"
-			if err := machoCombineDwarf(outfile, dsym, combinedOutput); err != nil {
-				Ctxt.Cursym = nil
-				Exitf("%s: combining dwarf failed: %v", os.Args[0], err)
-			}
-			os.Remove(outfile)
-			if err := os.Rename(combinedOutput, outfile); err != nil {
-				Ctxt.Cursym = nil
-				Exitf("%s: %v", os.Args[0], err)
-			}
-		}
-	}
-}
-
-func ldobj(f *obj.Biobuf, pkg string, length int64, pn string, file string, whence int) {
-	eof := obj.Boffset(f) + length
-
-	start := obj.Boffset(f)
-	c1 := obj.Bgetc(f)
-	c2 := obj.Bgetc(f)
-	c3 := obj.Bgetc(f)
-	c4 := obj.Bgetc(f)
-	obj.Bseek(f, start, 0)
-
-	magic := uint32(c1)<<24 | uint32(c2)<<16 | uint32(c3)<<8 | uint32(c4)
-	if magic == 0x7f454c46 { // \x7F E L F
-		ldhostobj(ldelf, f, pkg, length, pn, file)
-		return
-	}
-
-	if magic&^1 == 0xfeedface || magic&^0x01000000 == 0xcefaedfe {
-		ldhostobj(ldmacho, f, pkg, length, pn, file)
-		return
-	}
-
-	if c1 == 0x4c && c2 == 0x01 || c1 == 0x64 && c2 == 0x86 {
-		ldhostobj(ldpe, f, pkg, length, pn, file)
-		return
-	}
-
-	/* check the header */
-	line := obj.Brdline(f, '\n')
-	if line == "" {
-		if obj.Blinelen(f) > 0 {
-			Diag("%s: not an object file", pn)
-			return
-		}
-		Diag("truncated object file: %s", pn)
-		return
-	}
-
-	if !strings.HasPrefix(line, "go object ") {
-		if strings.HasSuffix(pn, ".go") {
-			Exitf("%cl: input %s is not .%c file (use %cg to compile .go files)", Thearch.Thechar, pn, Thearch.Thechar, Thearch.Thechar)
-		}
-
-		if line == Thestring {
-			// old header format: just $GOOS
-			Diag("%s: stale object file", pn)
-			return
-		}
-
-		Diag("%s: not an object file", pn)
-		return
-	}
-
-	// First, check that the basic goos, goarch, and version match.
-	t := fmt.Sprintf("%s %s %s ", goos, obj.Getgoarch(), obj.Getgoversion())
-
-	line = strings.TrimRight(line, "\n")
-	if !strings.HasPrefix(line[10:]+" ", t) && Debug['f'] == 0 {
-		Diag("%s: object is [%s] expected [%s]", pn, line[10:], t)
-		return
-	}
-
-	// Second, check that longer lines match each other exactly,
-	// so that the Go compiler and write additional information
-	// that must be the same from run to run.
-	if len(line) >= len(t)+10 {
-		if theline == "" {
-			theline = line[10:]
-		} else if theline != line[10:] {
-			Diag("%s: object is [%s] expected [%s]", pn, line[10:], theline)
-			return
-		}
-	}
-
-	/* skip over exports and other info -- ends with \n!\n */
-	import0 := obj.Boffset(f)
-
-	c1 = '\n' // the last line ended in \n
-	c2 = obj.Bgetc(f)
-	c3 = obj.Bgetc(f)
-	for c1 != '\n' || c2 != '!' || c3 != '\n' {
-		c1 = c2
-		c2 = c3
-		c3 = obj.Bgetc(f)
-		if c3 == obj.Beof {
-			Diag("truncated object file: %s", pn)
-			return
-		}
-	}
-
-	import1 := obj.Boffset(f)
-
-	obj.Bseek(f, import0, 0)
-	ldpkg(f, pkg, import1-import0-2, pn, whence) // -2 for !\n
-	obj.Bseek(f, import1, 0)
-
-	ldobjfile(Ctxt, f, pkg, eof-obj.Boffset(f), pn)
-}
-
-func readelfsymboldata(f *elf.File, sym *elf.Symbol) []byte {
-	data := make([]byte, sym.Size)
-	sect := f.Sections[sym.Section]
-	if sect.Type != elf.SHT_PROGBITS && sect.Type != elf.SHT_NOTE {
-		Diag("reading %s from non-data section", sym.Name)
-	}
-	n, err := sect.ReadAt(data, int64(sym.Value-sect.Addr))
-	if uint64(n) != sym.Size {
-		Diag("reading contents of %s: %v", sym.Name, err)
-	}
-	return data
-}
-
-func readwithpad(r io.Reader, sz int32) ([]byte, error) {
-	data := make([]byte, Rnd(int64(sz), 4))
-	_, err := io.ReadFull(r, data)
-	if err != nil {
-		return nil, err
-	}
-	data = data[:sz]
-	return data, nil
-}
-
-func readnote(f *elf.File, name []byte, typ int32) ([]byte, error) {
-	for _, sect := range f.Sections {
-		if sect.Type != elf.SHT_NOTE {
-			continue
-		}
-		r := sect.Open()
-		for {
-			var namesize, descsize, noteType int32
-			err := binary.Read(r, f.ByteOrder, &namesize)
-			if err != nil {
-				if err == io.EOF {
-					break
-				}
-				return nil, fmt.Errorf("read namesize failed:", err)
-			}
-			err = binary.Read(r, f.ByteOrder, &descsize)
-			if err != nil {
-				return nil, fmt.Errorf("read descsize failed:", err)
-			}
-			err = binary.Read(r, f.ByteOrder, &noteType)
-			if err != nil {
-				return nil, fmt.Errorf("read type failed:", err)
-			}
-			noteName, err := readwithpad(r, namesize)
-			if err != nil {
-				return nil, fmt.Errorf("read name failed:", err)
-			}
-			desc, err := readwithpad(r, descsize)
-			if err != nil {
-				return nil, fmt.Errorf("read desc failed:", err)
-			}
-			if string(name) == string(noteName) && typ == noteType {
-				return desc, nil
-			}
-		}
-	}
-	return nil, nil
-}
-
-func findshlib(shlib string) string {
-	for _, libdir := range Ctxt.Libdir {
-		libpath := filepath.Join(libdir, shlib)
-		if _, err := os.Stat(libpath); err == nil {
-			return libpath
-		}
-	}
-	Diag("cannot find shared library: %s", shlib)
-	return ""
-}
-
-func ldshlibsyms(shlib string) {
-	libpath := findshlib(shlib)
-	if libpath == "" {
-		return
-	}
-	for _, processedlib := range Ctxt.Shlibs {
-		if processedlib.Path == libpath {
-			return
-		}
-	}
-	if Ctxt.Debugvlog > 1 && Ctxt.Bso != nil {
-		fmt.Fprintf(Ctxt.Bso, "%5.2f ldshlibsyms: found library with name %s at %s\n", obj.Cputime(), shlib, libpath)
-		Ctxt.Bso.Flush()
-	}
-
-	f, err := elf.Open(libpath)
-	if err != nil {
-		Diag("cannot open shared library: %s", libpath)
-		return
-	}
-
-	hash, err := readnote(f, ELF_NOTE_GO_NAME, ELF_NOTE_GOABIHASH_TAG)
-	if err != nil {
-		Diag("cannot read ABI hash from shared library %s: %v", libpath, err)
-		return
-	}
-
-	depsbytes, err := readnote(f, ELF_NOTE_GO_NAME, ELF_NOTE_GODEPS_TAG)
-	if err != nil {
-		Diag("cannot read dep list from shared library %s: %v", libpath, err)
-		return
-	}
-	deps := strings.Split(string(depsbytes), "\n")
-
-	syms, err := f.DynamicSymbols()
-	if err != nil {
-		Diag("cannot read symbols from shared library: %s", libpath)
-		return
-	}
-	for _, elfsym := range syms {
-		if elf.ST_TYPE(elfsym.Info) == elf.STT_NOTYPE || elf.ST_TYPE(elfsym.Info) == elf.STT_SECTION {
-			continue
-		}
-		lsym := Linklookup(Ctxt, elfsym.Name, 0)
-		if lsym.Type != 0 && lsym.Type != obj.SDYNIMPORT && lsym.Dupok == 0 {
-			if (lsym.Type != obj.SBSS && lsym.Type != obj.SNOPTRBSS) || len(lsym.R) != 0 || len(lsym.P) != 0 || f.Sections[elfsym.Section].Type != elf.SHT_NOBITS {
-				Diag("Found duplicate symbol %s reading from %s, first found in %s", elfsym.Name, shlib, lsym.File)
-			}
-			if lsym.Size > int64(elfsym.Size) {
-				// If the existing symbol is a BSS value that is
-				// larger than the one read from the shared library,
-				// keep references to that.  Conversely, if the
-				// version from the shared libray is larger, we want
-				// to make all references be to that.
-				continue
-			}
-		}
-		lsym.Type = obj.SDYNIMPORT
-		lsym.ElfType = elf.ST_TYPE(elfsym.Info)
-		lsym.Size = int64(elfsym.Size)
-		if elfsym.Section != elf.SHN_UNDEF {
-			// Set .File for the library that actually defines the symbol.
-			lsym.File = libpath
-			// The decodetype_* functions in decodetype.go need access to
-			// the type data.
-			if strings.HasPrefix(lsym.Name, "type.") && !strings.HasPrefix(lsym.Name, "type..") {
-				lsym.P = readelfsymboldata(f, &elfsym)
-			}
-		}
-	}
-
-	// We might have overwritten some functions above (this tends to happen for the
-	// autogenerated type equality/hashing functions) and we don't want to generated
-	// pcln table entries for these any more so unstitch them from the Textp linked
-	// list.
-	var last *LSym
-
-	for s := Ctxt.Textp; s != nil; s = s.Next {
-		if s.Type == obj.SDYNIMPORT {
-			continue
-		}
-
-		if last == nil {
-			Ctxt.Textp = s
-		} else {
-			last.Next = s
-		}
-		last = s
-	}
-
-	if last == nil {
-		Ctxt.Textp = nil
-		Ctxt.Etextp = nil
-	} else {
-		last.Next = nil
-		Ctxt.Etextp = last
-	}
-
-	Ctxt.Shlibs = append(Ctxt.Shlibs, Shlib{Path: libpath, Hash: hash, Deps: deps, File: f})
-}
-
-func mywhatsys() {
-	goroot = obj.Getgoroot()
-	goos = obj.Getgoos()
-	goarch = obj.Getgoarch()
-
-	if !strings.HasPrefix(goarch, Thestring) {
-		log.Fatalf("cannot use %cc with GOARCH=%s", Thearch.Thechar, goarch)
-	}
-}
-
-// Copied from ../gc/subr.c:/^pathtoprefix; must stay in sync.
-/*
- * Convert raw string to the prefix that will be used in the symbol table.
- * Invalid bytes turn into %xx.	 Right now the only bytes that need
- * escaping are %, ., and ", but we escape all control characters too.
- *
- * If you edit this, edit ../gc/subr.c:/^pathtoprefix too.
- * If you edit this, edit ../../debug/goobj/read.go:/importPathToPrefix too.
- */
-func pathtoprefix(s string) string {
-	slash := strings.LastIndex(s, "/")
-	for i := 0; i < len(s); i++ {
-		c := s[i]
-		if c <= ' ' || i >= slash && c == '.' || c == '%' || c == '"' || c >= 0x7F {
-			var buf bytes.Buffer
-			for i := 0; i < len(s); i++ {
-				c := s[i]
-				if c <= ' ' || i >= slash && c == '.' || c == '%' || c == '"' || c >= 0x7F {
-					fmt.Fprintf(&buf, "%%%02x", c)
-					continue
-				}
-				buf.WriteByte(c)
-			}
-			return buf.String()
-		}
-	}
-	return s
-}
-
-func addsection(seg *Segment, name string, rwx int) *Section {
-	var l **Section
-
-	for l = &seg.Sect; *l != nil; l = &(*l).Next {
-	}
-	sect := new(Section)
-	sect.Rwx = uint8(rwx)
-	sect.Name = name
-	sect.Seg = seg
-	sect.Align = int32(Thearch.Ptrsize) // everything is at least pointer-aligned
-	*l = sect
-	return sect
-}
-
-func Le16(b []byte) uint16 {
-	return uint16(b[0]) | uint16(b[1])<<8
-}
-
-func Le32(b []byte) uint32 {
-	return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
-}
-
-func Le64(b []byte) uint64 {
-	return uint64(Le32(b)) | uint64(Le32(b[4:]))<<32
-}
-
-func Be16(b []byte) uint16 {
-	return uint16(b[0])<<8 | uint16(b[1])
-}
-
-func Be32(b []byte) uint32 {
-	return uint32(b[0])<<24 | uint32(b[1])<<16 | uint32(b[2])<<8 | uint32(b[3])
-}
-
-func Be64(b []byte) uint64 {
-	return uint64(Be32(b))<<32 | uint64(Be32(b[4:]))
-}
-
-type Chain struct {
-	sym   *LSym
-	up    *Chain
-	limit int // limit on entry to sym
-}
-
-var morestack *LSym
-
-// TODO: Record enough information in new object files to
-// allow stack checks here.
-
-func haslinkregister() bool {
-	return Thearch.Thechar == '5' || Thearch.Thechar == '9' || Thearch.Thechar == '7'
-}
-
-func callsize() int {
-	if haslinkregister() {
-		return 0
-	}
-	return Thearch.Regsize
-}
-
-func dostkcheck() {
-	var ch Chain
-
-	morestack = Linklookup(Ctxt, "runtime.morestack", 0)
-
-	// Every splitting function ensures that there are at least StackLimit
-	// bytes available below SP when the splitting prologue finishes.
-	// If the splitting function calls F, then F begins execution with
-	// at least StackLimit - callsize() bytes available.
-	// Check that every function behaves correctly with this amount
-	// of stack, following direct calls in order to piece together chains
-	// of non-splitting functions.
-	ch.up = nil
-
-	ch.limit = obj.StackLimit - callsize()
-
-	// Check every function, but do the nosplit functions in a first pass,
-	// to make the printed failure chains as short as possible.
-	for s := Ctxt.Textp; s != nil; s = s.Next {
-		// runtime.racesymbolizethunk is called from gcc-compiled C
-		// code running on the operating system thread stack.
-		// It uses more than the usual amount of stack but that's okay.
-		if s.Name == "runtime.racesymbolizethunk" {
-			continue
-		}
-
-		if s.Nosplit != 0 {
-			Ctxt.Cursym = s
-			ch.sym = s
-			stkcheck(&ch, 0)
-		}
-	}
-
-	for s := Ctxt.Textp; s != nil; s = s.Next {
-		if s.Nosplit == 0 {
-			Ctxt.Cursym = s
-			ch.sym = s
-			stkcheck(&ch, 0)
-		}
-	}
-}
-
-func stkcheck(up *Chain, depth int) int {
-	limit := up.limit
-	s := up.sym
-
-	// Don't duplicate work: only need to consider each
-	// function at top of safe zone once.
-	top := limit == obj.StackLimit-callsize()
-	if top {
-		if s.Stkcheck != 0 {
-			return 0
-		}
-		s.Stkcheck = 1
-	}
-
-	if depth > 100 {
-		Diag("nosplit stack check too deep")
-		stkbroke(up, 0)
-		return -1
-	}
-
-	if s.External != 0 || s.Pcln == nil {
-		// external function.
-		// should never be called directly.
-		// only diagnose the direct caller.
-		// TODO(mwhudson): actually think about this.
-		if depth == 1 && s.Type != obj.SXREF && !DynlinkingGo() {
-			Diag("call to external function %s", s.Name)
-		}
-		return -1
-	}
-
-	if limit < 0 {
-		stkbroke(up, limit)
-		return -1
-	}
-
-	// morestack looks like it calls functions,
-	// but it switches the stack pointer first.
-	if s == morestack {
-		return 0
-	}
-
-	var ch Chain
-	ch.up = up
-
-	if s.Nosplit == 0 {
-		// Ensure we have enough stack to call morestack.
-		ch.limit = limit - callsize()
-		ch.sym = morestack
-		if stkcheck(&ch, depth+1) < 0 {
-			return -1
-		}
-		if !top {
-			return 0
-		}
-		// Raise limit to allow frame.
-		limit = int(obj.StackLimit + s.Locals)
-		if haslinkregister() {
-			limit += Thearch.Regsize
-		}
-	}
-
-	// Walk through sp adjustments in function, consuming relocs.
-	ri := 0
-
-	endr := len(s.R)
-	var ch1 Chain
-	var pcsp Pciter
-	var r *Reloc
-	for pciterinit(Ctxt, &pcsp, &s.Pcln.Pcsp); pcsp.done == 0; pciternext(&pcsp) {
-		// pcsp.value is in effect for [pcsp.pc, pcsp.nextpc).
-
-		// Check stack size in effect for this span.
-		if int32(limit)-pcsp.value < 0 {
-			stkbroke(up, int(int32(limit)-pcsp.value))
-			return -1
-		}
-
-		// Process calls in this span.
-		for ; ri < endr && uint32(s.R[ri].Off) < pcsp.nextpc; ri++ {
-			r = &s.R[ri]
-			switch r.Type {
-			// Direct call.
-			case obj.R_CALL, obj.R_CALLARM, obj.R_CALLARM64, obj.R_CALLPOWER:
-				ch.limit = int(int32(limit) - pcsp.value - int32(callsize()))
-				ch.sym = r.Sym
-				if stkcheck(&ch, depth+1) < 0 {
-					return -1
-				}
-
-			// Indirect call.  Assume it is a call to a splitting function,
-			// so we have to make sure it can call morestack.
-			// Arrange the data structures to report both calls, so that
-			// if there is an error, stkprint shows all the steps involved.
-			case obj.R_CALLIND:
-				ch.limit = int(int32(limit) - pcsp.value - int32(callsize()))
-
-				ch.sym = nil
-				ch1.limit = ch.limit - callsize() // for morestack in called prologue
-				ch1.up = &ch
-				ch1.sym = morestack
-				if stkcheck(&ch1, depth+2) < 0 {
-					return -1
-				}
-			}
-		}
-	}
-
-	return 0
-}
-
-func stkbroke(ch *Chain, limit int) {
-	Diag("nosplit stack overflow")
-	stkprint(ch, limit)
-}
-
-func stkprint(ch *Chain, limit int) {
-	var name string
-
-	if ch.sym != nil {
-		name = ch.sym.Name
-		if ch.sym.Nosplit != 0 {
-			name += " (nosplit)"
-		}
-	} else {
-		name = "function pointer"
-	}
-
-	if ch.up == nil {
-		// top of chain.  ch->sym != nil.
-		if ch.sym.Nosplit != 0 {
-			fmt.Printf("\t%d\tassumed on entry to %s\n", ch.limit, name)
-		} else {
-			fmt.Printf("\t%d\tguaranteed after split check in %s\n", ch.limit, name)
-		}
-	} else {
-		stkprint(ch.up, ch.limit+callsize())
-		if !haslinkregister() {
-			fmt.Printf("\t%d\ton entry to %s\n", ch.limit, name)
-		}
-	}
-
-	if ch.limit != limit {
-		fmt.Printf("\t%d\tafter %s uses %d\n", limit, name, ch.limit-limit)
-	}
-}
-
-func Yconv(s *LSym) string {
-	var fp string
-
-	if s == nil {
-		fp += fmt.Sprintf("<nil>")
-	} else {
-		fmt_ := ""
-		fmt_ += fmt.Sprintf("%s @0x%08x [%d]", s.Name, int64(s.Value), int64(s.Size))
-		for i := 0; int64(i) < s.Size; i++ {
-			if i%8 == 0 {
-				fmt_ += fmt.Sprintf("\n\t0x%04x ", i)
-			}
-			fmt_ += fmt.Sprintf("%02x ", s.P[i])
-		}
-
-		fmt_ += fmt.Sprintf("\n")
-		for i := 0; i < len(s.R); i++ {
-			fmt_ += fmt.Sprintf("\t0x%04x[%x] %d %s[%x]\n", s.R[i].Off, s.R[i].Siz, s.R[i].Type, s.R[i].Sym.Name, int64(s.R[i].Add))
-		}
-
-		str := fmt_
-		fp += str
-	}
-
-	return fp
-}
-
-func Cflush() {
-	if err := coutbuf.Writer.Flush(); err != nil {
-		Exitf("flushing %s: %v", coutbuf.f.Name(), err)
-	}
-}
-
-func Cpos() int64 {
-	off, err := coutbuf.f.Seek(0, 1)
-	if err != nil {
-		Exitf("seeking in output [0, 1]: %v", err)
-	}
-	return off + int64(coutbuf.Buffered())
-}
-
-func Cseek(p int64) {
-	Cflush()
-	if _, err := coutbuf.f.Seek(p, 0); err != nil {
-		Exitf("seeking in output [0, 1]: %v", err)
-	}
-}
-
-func Cwrite(p []byte) {
-	coutbuf.Write(p)
-}
-
-func Cput(c uint8) {
-	coutbuf.WriteByte(c)
-}
-
-func usage() {
-	fmt.Fprintf(os.Stderr, "usage: link [options] main.o\n")
-	obj.Flagprint(2)
-	Exit(2)
-}
-
-func setheadtype(s string) {
-	h := headtype(s)
-	if h < 0 {
-		Exitf("unknown header type -H %s", s)
-	}
-
-	headstring = s
-	HEADTYPE = int32(headtype(s))
-}
-
-func setinterp(s string) {
-	Debug['I'] = 1 // denote cmdline interpreter override
-	interpreter = s
-}
-
-func doversion() {
-	Exitf("version %s", obj.Getgoversion())
-}
-
-func genasmsym(put func(*LSym, string, int, int64, int64, int, *LSym)) {
-	// These symbols won't show up in the first loop below because we
-	// skip STEXT symbols. Normal STEXT symbols are emitted by walking textp.
-	s := Linklookup(Ctxt, "runtime.text", 0)
-
-	if s.Type == obj.STEXT {
-		put(s, s.Name, 'T', s.Value, s.Size, int(s.Version), nil)
-	}
-	s = Linklookup(Ctxt, "runtime.etext", 0)
-	if s.Type == obj.STEXT {
-		put(s, s.Name, 'T', s.Value, s.Size, int(s.Version), nil)
-	}
-
-	for s := Ctxt.Allsym; s != nil; s = s.Allsym {
-		if s.Hide != 0 || (s.Name[0] == '.' && s.Version == 0 && s.Name != ".rathole") {
-			continue
-		}
-		switch s.Type & obj.SMASK {
-		case obj.SCONST,
-			obj.SRODATA,
-			obj.SSYMTAB,
-			obj.SPCLNTAB,
-			obj.SINITARR,
-			obj.SDATA,
-			obj.SNOPTRDATA,
-			obj.SELFROSECT,
-			obj.SMACHOGOT,
-			obj.STYPE,
-			obj.SSTRING,
-			obj.SGOSTRING,
-			obj.SGOFUNC,
-			obj.SGCBITS,
-			obj.SWINDOWS:
-			if !s.Reachable {
-				continue
-			}
-			put(s, s.Name, 'D', Symaddr(s), s.Size, int(s.Version), s.Gotype)
-
-		case obj.SBSS, obj.SNOPTRBSS:
-			if !s.Reachable {
-				continue
-			}
-			if len(s.P) > 0 {
-				Diag("%s should not be bss (size=%d type=%d special=%d)", s.Name, int(len(s.P)), s.Type, s.Special)
-			}
-			put(s, s.Name, 'B', Symaddr(s), s.Size, int(s.Version), s.Gotype)
-
-		case obj.SFILE:
-			put(nil, s.Name, 'f', s.Value, 0, int(s.Version), nil)
-
-		case obj.SHOSTOBJ:
-			if HEADTYPE == obj.Hwindows || Iself {
-				put(s, s.Name, 'U', s.Value, 0, int(s.Version), nil)
-			}
-
-		case obj.SDYNIMPORT:
-			if !s.Reachable {
-				continue
-			}
-			put(s, s.Extname, 'U', 0, 0, int(s.Version), nil)
-
-		case obj.STLSBSS:
-			if Linkmode == LinkExternal && HEADTYPE != obj.Hopenbsd {
-				var type_ int
-				if goos == "android" {
-					type_ = 'B'
-				} else {
-					type_ = 't'
-				}
-				put(s, s.Name, type_, Symaddr(s), s.Size, int(s.Version), s.Gotype)
-			}
-		}
-	}
-
-	var a *Auto
-	var off int32
-	for s := Ctxt.Textp; s != nil; s = s.Next {
-		put(s, s.Name, 'T', s.Value, s.Size, int(s.Version), s.Gotype)
-
-		// NOTE(ality): acid can't produce a stack trace without .frame symbols
-		put(nil, ".frame", 'm', int64(s.Locals)+int64(Thearch.Ptrsize), 0, 0, nil)
-
-		for a = s.Autom; a != nil; a = a.Link {
-			// Emit a or p according to actual offset, even if label is wrong.
-			// This avoids negative offsets, which cannot be encoded.
-			if a.Name != obj.A_AUTO && a.Name != obj.A_PARAM {
-				continue
-			}
-
-			// compute offset relative to FP
-			if a.Name == obj.A_PARAM {
-				off = a.Aoffset
-			} else {
-				off = a.Aoffset - int32(Thearch.Ptrsize)
-			}
-
-			// FP
-			if off >= 0 {
-				put(nil, a.Asym.Name, 'p', int64(off), 0, 0, a.Gotype)
-				continue
-			}
-
-			// SP
-			if off <= int32(-Thearch.Ptrsize) {
-				put(nil, a.Asym.Name, 'a', -(int64(off) + int64(Thearch.Ptrsize)), 0, 0, a.Gotype)
-				continue
-			}
-		}
-	}
-
-	// Otherwise, off is addressing the saved program counter.
-	// Something underhanded is going on. Say nothing.
-	if Debug['v'] != 0 || Debug['n'] != 0 {
-		fmt.Fprintf(&Bso, "%5.2f symsize = %d\n", obj.Cputime(), uint32(Symsize))
-	}
-	Bso.Flush()
-}
-
-func Symaddr(s *LSym) int64 {
-	if !s.Reachable {
-		Diag("unreachable symbol in symaddr - %s", s.Name)
-	}
-	return s.Value
-}
-
-func xdefine(p string, t int, v int64) {
-	s := Linklookup(Ctxt, p, 0)
-	s.Type = int16(t)
-	s.Value = v
-	s.Reachable = true
-	s.Special = 1
-	s.Local = true
-}
-
-func datoff(addr int64) int64 {
-	if uint64(addr) >= Segdata.Vaddr {
-		return int64(uint64(addr) - Segdata.Vaddr + Segdata.Fileoff)
-	}
-	if uint64(addr) >= Segtext.Vaddr {
-		return int64(uint64(addr) - Segtext.Vaddr + Segtext.Fileoff)
-	}
-	Diag("datoff %#x", addr)
-	return 0
-}
-
-func Entryvalue() int64 {
-	a := INITENTRY
-	if a[0] >= '0' && a[0] <= '9' {
-		return atolwhex(a)
-	}
-	s := Linklookup(Ctxt, a, 0)
-	if s.Type == 0 {
-		return INITTEXT
-	}
-	if s.Type != obj.STEXT {
-		Diag("entry not text: %s", s.Name)
-	}
-	return s.Value
-}
-
-func undefsym(s *LSym) {
-	var r *Reloc
-
-	Ctxt.Cursym = s
-	for i := 0; i < len(s.R); i++ {
-		r = &s.R[i]
-		if r.Sym == nil { // happens for some external ARM relocs
-			continue
-		}
-		if r.Sym.Type == obj.Sxxx || r.Sym.Type == obj.SXREF {
-			Diag("undefined: %s", r.Sym.Name)
-		}
-		if !r.Sym.Reachable {
-			Diag("use of unreachable symbol: %s", r.Sym.Name)
-		}
-	}
-}
-
-func undef() {
-	for s := Ctxt.Textp; s != nil; s = s.Next {
-		undefsym(s)
-	}
-	for s := datap; s != nil; s = s.Next {
-		undefsym(s)
-	}
-	if nerrors > 0 {
-		errorexit()
-	}
-}
-
-func callgraph() {
-	if Debug['c'] == 0 {
-		return
-	}
-
-	var i int
-	var r *Reloc
-	for s := Ctxt.Textp; s != nil; s = s.Next {
-		for i = 0; i < len(s.R); i++ {
-			r = &s.R[i]
-			if r.Sym == nil {
-				continue
-			}
-			if (r.Type == obj.R_CALL || r.Type == obj.R_CALLARM || r.Type == obj.R_CALLPOWER) && r.Sym.Type == obj.STEXT {
-				fmt.Fprintf(&Bso, "%s calls %s\n", s.Name, r.Sym.Name)
-			}
-		}
-	}
-}
-
-func Diag(format string, args ...interface{}) {
-	tn := ""
-	sep := ""
-	if Ctxt.Cursym != nil {
-		tn = Ctxt.Cursym.Name
-		sep = ": "
-	}
-	fmt.Printf("%s%s%s\n", tn, sep, fmt.Sprintf(format, args...))
-	nerrors++
-	if Debug['h'] != 0 {
-		panic("error")
-	}
-	if nerrors > 20 {
-		Exitf("too many errors")
-	}
-}
-
-func checkgo() {
-	if Debug['C'] == 0 {
-		return
-	}
-
-	// TODO(rsc,khr): Eventually we want to get to no Go-called C functions at all,
-	// which would simplify this logic quite a bit.
-
-	// Mark every Go-called C function with cfunc=2, recursively.
-	var changed int
-	var i int
-	var r *Reloc
-	var s *LSym
-	for {
-		changed = 0
-		for s = Ctxt.Textp; s != nil; s = s.Next {
-			if s.Cfunc == 0 || (s.Cfunc == 2 && s.Nosplit != 0) {
-				for i = 0; i < len(s.R); i++ {
-					r = &s.R[i]
-					if r.Sym == nil {
-						continue
-					}
-					if (r.Type == obj.R_CALL || r.Type == obj.R_CALLARM) && r.Sym.Type == obj.STEXT {
-						if r.Sym.Cfunc == 1 {
-							changed = 1
-							r.Sym.Cfunc = 2
-						}
-					}
-				}
-			}
-		}
-		if changed == 0 {
-			break
-		}
-	}
-
-	// Complain about Go-called C functions that can split the stack
-	// (that can be preempted for garbage collection or trigger a stack copy).
-	for s := Ctxt.Textp; s != nil; s = s.Next {
-		if s.Cfunc == 0 || (s.Cfunc == 2 && s.Nosplit != 0) {
-			for i = 0; i < len(s.R); i++ {
-				r = &s.R[i]
-				if r.Sym == nil {
-					continue
-				}
-				if (r.Type == obj.R_CALL || r.Type == obj.R_CALLARM) && r.Sym.Type == obj.STEXT {
-					if s.Cfunc == 0 && r.Sym.Cfunc == 2 && r.Sym.Nosplit == 0 {
-						fmt.Printf("Go %s calls C %s\n", s.Name, r.Sym.Name)
-					} else if s.Cfunc == 2 && s.Nosplit != 0 && r.Sym.Nosplit == 0 {
-						fmt.Printf("Go calls C %s calls %s\n", s.Name, r.Sym.Name)
-					}
-				}
-			}
-		}
-	}
-}
-
-func Rnd(v int64, r int64) int64 {
-	if r <= 0 {
-		return v
-	}
-	v += r - 1
-	c := v % r
-	if c < 0 {
-		c += r
-	}
-	v -= c
-	return v
-}
diff --git a/src/cmd/link/internal/ld/link.go b/src/cmd/link/internal/ld/link.go
deleted file mode 100644
index 33b17c5..0000000
--- a/src/cmd/link/internal/ld/link.go
+++ /dev/null
@@ -1,227 +0,0 @@
-// Derived from Inferno utils/6l/l.h and related files.
-// http://code.google.com/p/inferno-os/source/browse/utils/6l/l.h
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package ld
-
-import (
-	"cmd/internal/obj"
-	"debug/elf"
-	"encoding/binary"
-	"fmt"
-)
-
-type LSym struct {
-	Name       string
-	Extname    string
-	Type       int16
-	Version    int16
-	Dupok      uint8
-	Cfunc      uint8
-	External   uint8
-	Nosplit    uint8
-	Reachable  bool
-	Cgoexport  uint8
-	Special    uint8
-	Stkcheck   uint8
-	Hide       uint8
-	Leaf       uint8
-	Localentry uint8
-	Onlist     uint8
-	// ElfType is set for symbols read from shared libraries by ldshlibsyms. It
-	// is not set for symbols defined by the packages being linked or by symbols
-	// read by ldelf (and so is left as elf.STT_NOTYPE).
-	ElfType     elf.SymType
-	Dynid       int32
-	Plt         int32
-	Got         int32
-	Align       int32
-	Elfsym      int32
-	Args        int32
-	Locals      int32
-	Value       int64
-	Size        int64
-	Hash        *LSym
-	Allsym      *LSym
-	Next        *LSym
-	Sub         *LSym
-	Outer       *LSym
-	Gotype      *LSym
-	Reachparent *LSym
-	Queue       *LSym
-	File        string
-	Dynimplib   string
-	Dynimpvers  string
-	Sect        *Section
-	Autom       *Auto
-	Pcln        *Pcln
-	P           []byte
-	R           []Reloc
-	Local       bool
-}
-
-func (s *LSym) String() string {
-	if s.Version == 0 {
-		return s.Name
-	}
-	return fmt.Sprintf("%s<%d>", s.Name, s.Version)
-}
-
-type Reloc struct {
-	Off     int32
-	Siz     uint8
-	Done    uint8
-	Type    int32
-	Variant int32
-	Add     int64
-	Xadd    int64
-	Sym     *LSym
-	Xsym    *LSym
-}
-
-type Auto struct {
-	Asym    *LSym
-	Link    *Auto
-	Aoffset int32
-	Name    int16
-	Gotype  *LSym
-}
-
-type Shlib struct {
-	Path string
-	Hash []byte
-	Deps []string
-	File *elf.File
-}
-
-type Link struct {
-	Thechar   int32
-	Thestring string
-	Goarm     int32
-	Headtype  int
-	Arch      *LinkArch
-	Debugasm  int32
-	Debugvlog int32
-	Bso       *obj.Biobuf
-	Windows   int32
-	Goroot    string
-	Hash      map[symVer]*LSym
-	Allsym    *LSym
-	Nsymbol   int32
-	Tlsg      *LSym
-	Libdir    []string
-	Library   []*Library
-	Shlibs    []Shlib
-	Tlsoffset int
-	Diag      func(string, ...interface{})
-	Cursym    *LSym
-	Version   int
-	Textp     *LSym
-	Etextp    *LSym
-	Nhistfile int32
-	Filesyms  *LSym
-}
-
-type LinkArch struct {
-	ByteOrder binary.ByteOrder
-	Name      string
-	Thechar   int
-	Minlc     int
-	Ptrsize   int
-	Regsize   int
-}
-
-type Library struct {
-	Objref string
-	Srcref string
-	File   string
-	Pkg    string
-	Shlib  string
-	hash   []byte
-}
-
-type Pcln struct {
-	Pcsp        Pcdata
-	Pcfile      Pcdata
-	Pcline      Pcdata
-	Pcdata      []Pcdata
-	Npcdata     int
-	Funcdata    []*LSym
-	Funcdataoff []int64
-	Nfuncdata   int
-	File        []*LSym
-	Nfile       int
-	Mfile       int
-	Lastfile    *LSym
-	Lastindex   int
-}
-
-type Pcdata struct {
-	P []byte
-}
-
-type Pciter struct {
-	d       Pcdata
-	p       []byte
-	pc      uint32
-	nextpc  uint32
-	pcscale uint32
-	value   int32
-	start   int
-	done    int
-}
-
-// Reloc.variant
-const (
-	RV_NONE = iota
-	RV_POWER_LO
-	RV_POWER_HI
-	RV_POWER_HA
-	RV_POWER_DS
-	RV_CHECK_OVERFLOW = 1 << 8
-	RV_TYPE_MASK      = RV_CHECK_OVERFLOW - 1
-)
-
-const (
-	LINKHASH = 100003
-)
-
-// Pcdata iterator.
-//	for(pciterinit(ctxt, &it, &pcd); !it.done; pciternext(&it)) { it.value holds in [it.pc, it.nextpc) }
-
-// Link holds the context for writing object code from a compiler
-// to be linker input or for reading that input into the linker.
-
-// LinkArch is the definition of a single architecture.
-
-const (
-	LinkAuto = 0 + iota
-	LinkInternal
-	LinkExternal
-)
diff --git a/src/cmd/link/internal/ld/macho.go b/src/cmd/link/internal/ld/macho.go
deleted file mode 100644
index ccc8491..0000000
--- a/src/cmd/link/internal/ld/macho.go
+++ /dev/null
@@ -1,860 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package ld
-
-import (
-	"cmd/internal/obj"
-	"sort"
-	"strings"
-)
-
-type MachoHdr struct {
-	cpu    uint32
-	subcpu uint32
-}
-
-type MachoSect struct {
-	name    string
-	segname string
-	addr    uint64
-	size    uint64
-	off     uint32
-	align   uint32
-	reloc   uint32
-	nreloc  uint32
-	flag    uint32
-	res1    uint32
-	res2    uint32
-}
-
-type MachoSeg struct {
-	name       string
-	vsize      uint64
-	vaddr      uint64
-	fileoffset uint64
-	filesize   uint64
-	prot1      uint32
-	prot2      uint32
-	nsect      uint32
-	msect      uint32
-	sect       []MachoSect
-	flag       uint32
-}
-
-type MachoLoad struct {
-	type_ uint32
-	data  []uint32
-}
-
-/*
- * Total amount of space to reserve at the start of the file
- * for Header, PHeaders, and SHeaders.
- * May waste some.
- */
-const (
-	INITIAL_MACHO_HEADR = 4 * 1024
-)
-
-const (
-	MACHO_CPU_AMD64               = 1<<24 | 7
-	MACHO_CPU_386                 = 7
-	MACHO_SUBCPU_X86              = 3
-	MACHO_CPU_ARM                 = 12
-	MACHO_SUBCPU_ARM              = 0
-	MACHO_SUBCPU_ARMV7            = 9
-	MACHO_CPU_ARM64               = 1<<24 | 12
-	MACHO_SUBCPU_ARM64_ALL        = 0
-	MACHO32SYMSIZE                = 12
-	MACHO64SYMSIZE                = 16
-	MACHO_X86_64_RELOC_UNSIGNED   = 0
-	MACHO_X86_64_RELOC_SIGNED     = 1
-	MACHO_X86_64_RELOC_BRANCH     = 2
-	MACHO_X86_64_RELOC_GOT_LOAD   = 3
-	MACHO_X86_64_RELOC_GOT        = 4
-	MACHO_X86_64_RELOC_SUBTRACTOR = 5
-	MACHO_X86_64_RELOC_SIGNED_1   = 6
-	MACHO_X86_64_RELOC_SIGNED_2   = 7
-	MACHO_X86_64_RELOC_SIGNED_4   = 8
-	MACHO_ARM_RELOC_VANILLA       = 0
-	MACHO_ARM_RELOC_BR24          = 5
-	MACHO_ARM64_RELOC_UNSIGNED    = 0
-	MACHO_ARM64_RELOC_BRANCH26    = 2
-	MACHO_ARM64_RELOC_PAGE21      = 3
-	MACHO_ARM64_RELOC_PAGEOFF12   = 4
-	MACHO_ARM64_RELOC_ADDEND      = 10
-	MACHO_GENERIC_RELOC_VANILLA   = 0
-	MACHO_FAKE_GOTPCREL           = 100
-)
-
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Mach-O file writing
-// http://developer.apple.com/mac/library/DOCUMENTATION/DeveloperTools/Conceptual/MachORuntime/Reference/reference.html
-
-var macho64 bool
-
-var machohdr MachoHdr
-
-var load []MachoLoad
-
-var seg [16]MachoSeg
-
-var nseg int
-
-var ndebug int
-
-var nsect int
-
-const (
-	SymKindLocal = 0 + iota
-	SymKindExtdef
-	SymKindUndef
-	NumSymKind
-)
-
-var nkind [NumSymKind]int
-
-var sortsym []*LSym
-
-var nsortsym int
-
-// Amount of space left for adding load commands
-// that refer to dynamic libraries.  Because these have
-// to go in the Mach-O header, we can't just pick a
-// "big enough" header size.  The initial header is
-// one page, the non-dynamic library stuff takes
-// up about 1300 bytes; we overestimate that as 2k.
-var load_budget int = INITIAL_MACHO_HEADR - 2*1024
-
-func Machoinit() {
-	switch Thearch.Thechar {
-	// 64-bit architectures
-	case '6', '7', '9':
-		macho64 = true
-
-		// 32-bit architectures
-	default:
-		break
-	}
-}
-
-func getMachoHdr() *MachoHdr {
-	return &machohdr
-}
-
-func newMachoLoad(type_ uint32, ndata uint32) *MachoLoad {
-	if macho64 && (ndata&1 != 0) {
-		ndata++
-	}
-
-	load = append(load, MachoLoad{})
-	l := &load[len(load)-1]
-	l.type_ = type_
-	l.data = make([]uint32, ndata)
-	return l
-}
-
-func newMachoSeg(name string, msect int) *MachoSeg {
-	if nseg >= len(seg) {
-		Exitf("too many segs")
-	}
-
-	s := &seg[nseg]
-	nseg++
-	s.name = name
-	s.msect = uint32(msect)
-	s.sect = make([]MachoSect, msect)
-	return s
-}
-
-func newMachoSect(seg *MachoSeg, name string, segname string) *MachoSect {
-	if seg.nsect >= seg.msect {
-		Exitf("too many sects in segment %s", seg.name)
-	}
-
-	s := &seg.sect[seg.nsect]
-	seg.nsect++
-	s.name = name
-	s.segname = segname
-	nsect++
-	return s
-}
-
-// Generic linking code.
-
-var dylib []string
-
-var linkoff int64
-
-func machowrite() int {
-	o1 := Cpos()
-
-	loadsize := 4 * 4 * ndebug
-	for i := 0; i < len(load); i++ {
-		loadsize += 4 * (len(load[i].data) + 2)
-	}
-	if macho64 {
-		loadsize += 18 * 4 * nseg
-		loadsize += 20 * 4 * nsect
-	} else {
-		loadsize += 14 * 4 * nseg
-		loadsize += 17 * 4 * nsect
-	}
-
-	if macho64 {
-		Thearch.Lput(0xfeedfacf)
-	} else {
-		Thearch.Lput(0xfeedface)
-	}
-	Thearch.Lput(machohdr.cpu)
-	Thearch.Lput(machohdr.subcpu)
-	if Linkmode == LinkExternal {
-		Thearch.Lput(1) /* file type - mach object */
-	} else {
-		Thearch.Lput(2) /* file type - mach executable */
-	}
-	Thearch.Lput(uint32(len(load)) + uint32(nseg) + uint32(ndebug))
-	Thearch.Lput(uint32(loadsize))
-	Thearch.Lput(1) /* flags - no undefines */
-	if macho64 {
-		Thearch.Lput(0) /* reserved */
-	}
-
-	var j int
-	var s *MachoSeg
-	var t *MachoSect
-	for i := 0; i < nseg; i++ {
-		s = &seg[i]
-		if macho64 {
-			Thearch.Lput(25) /* segment 64 */
-			Thearch.Lput(72 + 80*s.nsect)
-			strnput(s.name, 16)
-			Thearch.Vput(s.vaddr)
-			Thearch.Vput(s.vsize)
-			Thearch.Vput(s.fileoffset)
-			Thearch.Vput(s.filesize)
-			Thearch.Lput(s.prot1)
-			Thearch.Lput(s.prot2)
-			Thearch.Lput(s.nsect)
-			Thearch.Lput(s.flag)
-		} else {
-			Thearch.Lput(1) /* segment 32 */
-			Thearch.Lput(56 + 68*s.nsect)
-			strnput(s.name, 16)
-			Thearch.Lput(uint32(s.vaddr))
-			Thearch.Lput(uint32(s.vsize))
-			Thearch.Lput(uint32(s.fileoffset))
-			Thearch.Lput(uint32(s.filesize))
-			Thearch.Lput(s.prot1)
-			Thearch.Lput(s.prot2)
-			Thearch.Lput(s.nsect)
-			Thearch.Lput(s.flag)
-		}
-
-		for j = 0; uint32(j) < s.nsect; j++ {
-			t = &s.sect[j]
-			if macho64 {
-				strnput(t.name, 16)
-				strnput(t.segname, 16)
-				Thearch.Vput(t.addr)
-				Thearch.Vput(t.size)
-				Thearch.Lput(t.off)
-				Thearch.Lput(t.align)
-				Thearch.Lput(t.reloc)
-				Thearch.Lput(t.nreloc)
-				Thearch.Lput(t.flag)
-				Thearch.Lput(t.res1) /* reserved */
-				Thearch.Lput(t.res2) /* reserved */
-				Thearch.Lput(0)      /* reserved */
-			} else {
-				strnput(t.name, 16)
-				strnput(t.segname, 16)
-				Thearch.Lput(uint32(t.addr))
-				Thearch.Lput(uint32(t.size))
-				Thearch.Lput(t.off)
-				Thearch.Lput(t.align)
-				Thearch.Lput(t.reloc)
-				Thearch.Lput(t.nreloc)
-				Thearch.Lput(t.flag)
-				Thearch.Lput(t.res1) /* reserved */
-				Thearch.Lput(t.res2) /* reserved */
-			}
-		}
-	}
-
-	var l *MachoLoad
-	for i := 0; i < len(load); i++ {
-		l = &load[i]
-		Thearch.Lput(l.type_)
-		Thearch.Lput(4 * (uint32(len(l.data)) + 2))
-		for j = 0; j < len(l.data); j++ {
-			Thearch.Lput(l.data[j])
-		}
-	}
-
-	return int(Cpos() - o1)
-}
-
-func domacho() {
-	if Debug['d'] != 0 {
-		return
-	}
-
-	// empirically, string table must begin with " \x00".
-	s := Linklookup(Ctxt, ".machosymstr", 0)
-
-	s.Type = obj.SMACHOSYMSTR
-	s.Reachable = true
-	Adduint8(Ctxt, s, ' ')
-	Adduint8(Ctxt, s, '\x00')
-
-	s = Linklookup(Ctxt, ".machosymtab", 0)
-	s.Type = obj.SMACHOSYMTAB
-	s.Reachable = true
-
-	if Linkmode != LinkExternal {
-		s := Linklookup(Ctxt, ".plt", 0) // will be __symbol_stub
-		s.Type = obj.SMACHOPLT
-		s.Reachable = true
-
-		s = Linklookup(Ctxt, ".got", 0) // will be __nl_symbol_ptr
-		s.Type = obj.SMACHOGOT
-		s.Reachable = true
-		s.Align = 4
-
-		s = Linklookup(Ctxt, ".linkedit.plt", 0) // indirect table for .plt
-		s.Type = obj.SMACHOINDIRECTPLT
-		s.Reachable = true
-
-		s = Linklookup(Ctxt, ".linkedit.got", 0) // indirect table for .got
-		s.Type = obj.SMACHOINDIRECTGOT
-		s.Reachable = true
-	}
-}
-
-func Machoadddynlib(lib string) {
-	// Will need to store the library name rounded up
-	// and 24 bytes of header metadata.  If not enough
-	// space, grab another page of initial space at the
-	// beginning of the output file.
-	load_budget -= (len(lib)+7)/8*8 + 24
-
-	if load_budget < 0 {
-		HEADR += 4096
-		INITTEXT += 4096
-		load_budget += 4096
-	}
-
-	dylib = append(dylib, lib)
-}
-
-func machoshbits(mseg *MachoSeg, sect *Section, segname string) {
-	buf := "__" + strings.Replace(sect.Name[1:], ".", "_", -1)
-
-	var msect *MachoSect
-	if sect.Rwx&1 == 0 && (Thearch.Thechar == '7' || (Thearch.Thechar == '6' && Buildmode == BuildmodeCShared)) {
-		// Darwin external linker on arm64 and on amd64 in c-shared buildmode
-		// complains about absolute relocs in __TEXT, so if the section is not
-		// executable, put it in __DATA segment.
-		msect = newMachoSect(mseg, buf, "__DATA")
-	} else {
-		msect = newMachoSect(mseg, buf, segname)
-	}
-
-	if sect.Rellen > 0 {
-		msect.reloc = uint32(sect.Reloff)
-		msect.nreloc = uint32(sect.Rellen / 8)
-	}
-
-	for 1<<msect.align < sect.Align {
-		msect.align++
-	}
-	msect.addr = sect.Vaddr
-	msect.size = sect.Length
-
-	if sect.Vaddr < sect.Seg.Vaddr+sect.Seg.Filelen {
-		// data in file
-		if sect.Length > sect.Seg.Vaddr+sect.Seg.Filelen-sect.Vaddr {
-			Diag("macho cannot represent section %s crossing data and bss", sect.Name)
-		}
-		msect.off = uint32(sect.Seg.Fileoff + sect.Vaddr - sect.Seg.Vaddr)
-	} else {
-		// zero fill
-		msect.off = 0
-
-		msect.flag |= 1
-	}
-
-	if sect.Rwx&1 != 0 {
-		msect.flag |= 0x400 /* has instructions */
-	}
-
-	if sect.Name == ".plt" {
-		msect.name = "__symbol_stub1"
-		msect.flag = 0x80000408 /* only instructions, code, symbol stubs */
-		msect.res1 = 0          //nkind[SymKindLocal];
-		msect.res2 = 6
-	}
-
-	if sect.Name == ".got" {
-		msect.name = "__nl_symbol_ptr"
-		msect.flag = 6                                                     /* section with nonlazy symbol pointers */
-		msect.res1 = uint32(Linklookup(Ctxt, ".linkedit.plt", 0).Size / 4) /* offset into indirect symbol table */
-	}
-
-	if sect.Name == ".init_array" {
-		msect.name = "__mod_init_func"
-		msect.flag = 9 // S_MOD_INIT_FUNC_POINTERS
-	}
-}
-
-func Asmbmacho() {
-	/* apple MACH */
-	va := INITTEXT - int64(HEADR)
-
-	mh := getMachoHdr()
-	switch Thearch.Thechar {
-	default:
-		Exitf("unknown macho architecture: %v", Thearch.Thechar)
-
-	case '5':
-		mh.cpu = MACHO_CPU_ARM
-		mh.subcpu = MACHO_SUBCPU_ARMV7
-
-	case '6':
-		mh.cpu = MACHO_CPU_AMD64
-		mh.subcpu = MACHO_SUBCPU_X86
-
-	case '7':
-		mh.cpu = MACHO_CPU_ARM64
-		mh.subcpu = MACHO_SUBCPU_ARM64_ALL
-
-	case '8':
-		mh.cpu = MACHO_CPU_386
-		mh.subcpu = MACHO_SUBCPU_X86
-	}
-
-	var ms *MachoSeg
-	if Linkmode == LinkExternal {
-		/* segment for entire file */
-		ms = newMachoSeg("", 40)
-
-		ms.fileoffset = Segtext.Fileoff
-		if Thearch.Thechar == '5' {
-			ms.filesize = Segdata.Fileoff + Segdata.Filelen - Segtext.Fileoff
-		} else {
-			ms.filesize = Segdwarf.Fileoff + Segdwarf.Filelen - Segtext.Fileoff
-			ms.vsize = ms.filesize
-		}
-	}
-
-	/* segment for zero page */
-	if Linkmode != LinkExternal {
-		ms = newMachoSeg("__PAGEZERO", 0)
-		ms.vsize = uint64(va)
-	}
-
-	/* text */
-	v := Rnd(int64(uint64(HEADR)+Segtext.Length), int64(INITRND))
-
-	if Linkmode != LinkExternal {
-		ms = newMachoSeg("__TEXT", 20)
-		ms.vaddr = uint64(va)
-		ms.vsize = uint64(v)
-		ms.fileoffset = 0
-		ms.filesize = uint64(v)
-		ms.prot1 = 7
-		ms.prot2 = 5
-	}
-
-	for sect := Segtext.Sect; sect != nil; sect = sect.Next {
-		machoshbits(ms, sect, "__TEXT")
-	}
-
-	/* data */
-	if Linkmode != LinkExternal {
-		w := int64(Segdata.Length)
-		ms = newMachoSeg("__DATA", 20)
-		ms.vaddr = uint64(va) + uint64(v)
-		ms.vsize = uint64(w)
-		ms.fileoffset = uint64(v)
-		ms.filesize = Segdata.Filelen
-		ms.prot1 = 3
-		ms.prot2 = 3
-	}
-
-	for sect := Segdata.Sect; sect != nil; sect = sect.Next {
-		machoshbits(ms, sect, "__DATA")
-	}
-
-	if Linkmode != LinkExternal {
-		switch Thearch.Thechar {
-		default:
-			Exitf("unknown macho architecture: %v", Thearch.Thechar)
-
-		case '5':
-			ml := newMachoLoad(5, 17+2)          /* unix thread */
-			ml.data[0] = 1                       /* thread type */
-			ml.data[1] = 17                      /* word count */
-			ml.data[2+15] = uint32(Entryvalue()) /* start pc */
-
-		case '6':
-			ml := newMachoLoad(5, 42+2)          /* unix thread */
-			ml.data[0] = 4                       /* thread type */
-			ml.data[1] = 42                      /* word count */
-			ml.data[2+32] = uint32(Entryvalue()) /* start pc */
-			ml.data[2+32+1] = uint32(Entryvalue() >> 32)
-
-		case '7':
-			ml := newMachoLoad(5, 68+2)          /* unix thread */
-			ml.data[0] = 6                       /* thread type */
-			ml.data[1] = 68                      /* word count */
-			ml.data[2+64] = uint32(Entryvalue()) /* start pc */
-			ml.data[2+64+1] = uint32(Entryvalue() >> 32)
-
-		case '8':
-			ml := newMachoLoad(5, 16+2)          /* unix thread */
-			ml.data[0] = 1                       /* thread type */
-			ml.data[1] = 16                      /* word count */
-			ml.data[2+10] = uint32(Entryvalue()) /* start pc */
-		}
-	}
-
-	if Debug['d'] == 0 {
-		// must match domacholink below
-		s1 := Linklookup(Ctxt, ".machosymtab", 0)
-
-		s2 := Linklookup(Ctxt, ".linkedit.plt", 0)
-		s3 := Linklookup(Ctxt, ".linkedit.got", 0)
-		s4 := Linklookup(Ctxt, ".machosymstr", 0)
-
-		if Linkmode != LinkExternal {
-			ms := newMachoSeg("__LINKEDIT", 0)
-			ms.vaddr = uint64(va) + uint64(v) + uint64(Rnd(int64(Segdata.Length), int64(INITRND)))
-			ms.vsize = uint64(s1.Size) + uint64(s2.Size) + uint64(s3.Size) + uint64(s4.Size)
-			ms.fileoffset = uint64(linkoff)
-			ms.filesize = ms.vsize
-			ms.prot1 = 7
-			ms.prot2 = 3
-		}
-
-		ml := newMachoLoad(2, 4)                                   /* LC_SYMTAB */
-		ml.data[0] = uint32(linkoff)                               /* symoff */
-		ml.data[1] = uint32(nsortsym)                              /* nsyms */
-		ml.data[2] = uint32(linkoff + s1.Size + s2.Size + s3.Size) /* stroff */
-		ml.data[3] = uint32(s4.Size)                               /* strsize */
-
-		machodysymtab()
-
-		if Linkmode != LinkExternal {
-			ml := newMachoLoad(14, 6) /* LC_LOAD_DYLINKER */
-			ml.data[0] = 12           /* offset to string */
-			stringtouint32(ml.data[1:], "/usr/lib/dyld")
-
-			for i := 0; i < len(dylib); i++ {
-				ml = newMachoLoad(12, 4+(uint32(len(dylib[i]))+1+7)/8*2) /* LC_LOAD_DYLIB */
-				ml.data[0] = 24                                          /* offset of string from beginning of load */
-				ml.data[1] = 0                                           /* time stamp */
-				ml.data[2] = 0                                           /* version */
-				ml.data[3] = 0                                           /* compatibility version */
-				stringtouint32(ml.data[4:], dylib[i])
-			}
-		}
-	}
-
-	// TODO: dwarf headers go in ms too
-	if Debug['s'] == 0 {
-		dwarfaddmachoheaders(ms)
-	}
-
-	a := machowrite()
-	if int32(a) > HEADR {
-		Exitf("HEADR too small: %d > %d", a, HEADR)
-	}
-}
-
-func symkind(s *LSym) int {
-	if s.Type == obj.SDYNIMPORT {
-		return SymKindUndef
-	}
-	if s.Cgoexport != 0 {
-		return SymKindExtdef
-	}
-	return SymKindLocal
-}
-
-func addsym(s *LSym, name string, type_ int, addr int64, size int64, ver int, gotype *LSym) {
-	if s == nil {
-		return
-	}
-
-	switch type_ {
-	default:
-		return
-
-	case 'D', 'B', 'T':
-		break
-	}
-
-	if sortsym != nil {
-		sortsym[nsortsym] = s
-		nkind[symkind(s)]++
-	}
-
-	nsortsym++
-}
-
-type machoscmp []*LSym
-
-func (x machoscmp) Len() int {
-	return len(x)
-}
-
-func (x machoscmp) Swap(i, j int) {
-	x[i], x[j] = x[j], x[i]
-}
-
-func (x machoscmp) Less(i, j int) bool {
-	s1 := x[i]
-	s2 := x[j]
-
-	k1 := symkind(s1)
-	k2 := symkind(s2)
-	if k1 != k2 {
-		return k1-k2 < 0
-	}
-
-	return stringsCompare(s1.Extname, s2.Extname) < 0
-}
-
-func machogenasmsym(put func(*LSym, string, int, int64, int64, int, *LSym)) {
-	genasmsym(put)
-	for s := Ctxt.Allsym; s != nil; s = s.Allsym {
-		if s.Type == obj.SDYNIMPORT || s.Type == obj.SHOSTOBJ {
-			if s.Reachable {
-				put(s, "", 'D', 0, 0, 0, nil)
-			}
-		}
-	}
-}
-
-func machosymorder() {
-	// On Mac OS X Mountain Lion, we must sort exported symbols
-	// So we sort them here and pre-allocate dynid for them
-	// See https://golang.org/issue/4029
-	for i := 0; i < len(dynexp); i++ {
-		dynexp[i].Reachable = true
-	}
-	machogenasmsym(addsym)
-	sortsym = make([]*LSym, nsortsym)
-	nsortsym = 0
-	machogenasmsym(addsym)
-	sort.Sort(machoscmp(sortsym[:nsortsym]))
-	for i := 0; i < nsortsym; i++ {
-		sortsym[i].Dynid = int32(i)
-	}
-}
-
-func machosymtab() {
-	var s *LSym
-	var o *LSym
-	var p string
-
-	symtab := Linklookup(Ctxt, ".machosymtab", 0)
-	symstr := Linklookup(Ctxt, ".machosymstr", 0)
-
-	for i := 0; i < nsortsym; i++ {
-		s = sortsym[i]
-		Adduint32(Ctxt, symtab, uint32(symstr.Size))
-
-		// Only add _ to C symbols. Go symbols have dot in the name.
-		if !strings.Contains(s.Extname, ".") {
-			Adduint8(Ctxt, symstr, '_')
-		}
-
-		// replace "·" as ".", because DTrace cannot handle it.
-		if !strings.Contains(s.Extname, "·") {
-			Addstring(symstr, s.Extname)
-		} else {
-			for p = s.Extname; p != ""; p = p[1:] {
-				if uint8(p[0]) == 0xc2 && uint8((p[1:])[0]) == 0xb7 {
-					Adduint8(Ctxt, symstr, '.')
-					p = p[1:]
-				} else {
-					Adduint8(Ctxt, symstr, uint8(p[0]))
-				}
-			}
-
-			Adduint8(Ctxt, symstr, '\x00')
-		}
-
-		if s.Type == obj.SDYNIMPORT || s.Type == obj.SHOSTOBJ {
-			Adduint8(Ctxt, symtab, 0x01)                // type N_EXT, external symbol
-			Adduint8(Ctxt, symtab, 0)                   // no section
-			Adduint16(Ctxt, symtab, 0)                  // desc
-			adduintxx(Ctxt, symtab, 0, Thearch.Ptrsize) // no value
-		} else {
-			if s.Cgoexport != 0 {
-				Adduint8(Ctxt, symtab, 0x0f)
-			} else {
-				Adduint8(Ctxt, symtab, 0x0e)
-			}
-			o = s
-			for o.Outer != nil {
-				o = o.Outer
-			}
-			if o.Sect == nil {
-				Diag("missing section for %s", s.Name)
-				Adduint8(Ctxt, symtab, 0)
-			} else {
-				Adduint8(Ctxt, symtab, uint8(o.Sect.Extnum))
-			}
-			Adduint16(Ctxt, symtab, 0) // desc
-			adduintxx(Ctxt, symtab, uint64(Symaddr(s)), Thearch.Ptrsize)
-		}
-	}
-}
-
-func machodysymtab() {
-	ml := newMachoLoad(11, 18) /* LC_DYSYMTAB */
-
-	n := 0
-	ml.data[0] = uint32(n)                   /* ilocalsym */
-	ml.data[1] = uint32(nkind[SymKindLocal]) /* nlocalsym */
-	n += nkind[SymKindLocal]
-
-	ml.data[2] = uint32(n)                    /* iextdefsym */
-	ml.data[3] = uint32(nkind[SymKindExtdef]) /* nextdefsym */
-	n += nkind[SymKindExtdef]
-
-	ml.data[4] = uint32(n)                   /* iundefsym */
-	ml.data[5] = uint32(nkind[SymKindUndef]) /* nundefsym */
-
-	ml.data[6] = 0  /* tocoffset */
-	ml.data[7] = 0  /* ntoc */
-	ml.data[8] = 0  /* modtaboff */
-	ml.data[9] = 0  /* nmodtab */
-	ml.data[10] = 0 /* extrefsymoff */
-	ml.data[11] = 0 /* nextrefsyms */
-
-	// must match domacholink below
-	s1 := Linklookup(Ctxt, ".machosymtab", 0)
-
-	s2 := Linklookup(Ctxt, ".linkedit.plt", 0)
-	s3 := Linklookup(Ctxt, ".linkedit.got", 0)
-	ml.data[12] = uint32(linkoff + s1.Size)       /* indirectsymoff */
-	ml.data[13] = uint32((s2.Size + s3.Size) / 4) /* nindirectsyms */
-
-	ml.data[14] = 0 /* extreloff */
-	ml.data[15] = 0 /* nextrel */
-	ml.data[16] = 0 /* locreloff */
-	ml.data[17] = 0 /* nlocrel */
-}
-
-func Domacholink() int64 {
-	machosymtab()
-
-	// write data that will be linkedit section
-	s1 := Linklookup(Ctxt, ".machosymtab", 0)
-
-	s2 := Linklookup(Ctxt, ".linkedit.plt", 0)
-	s3 := Linklookup(Ctxt, ".linkedit.got", 0)
-	s4 := Linklookup(Ctxt, ".machosymstr", 0)
-
-	// Force the linkedit section to end on a 16-byte
-	// boundary.  This allows pure (non-cgo) Go binaries
-	// to be code signed correctly.
-	//
-	// Apple's codesign_allocate (a helper utility for
-	// the codesign utility) can do this fine itself if
-	// it is run on a dynamic Mach-O binary.  However,
-	// when it is run on a pure (non-cgo) Go binary, where
-	// the linkedit section is mostly empty, it fails to
-	// account for the extra padding that it itself adds
-	// when adding the LC_CODE_SIGNATURE load command
-	// (which must be aligned on a 16-byte boundary).
-	//
-	// By forcing the linkedit section to end on a 16-byte
-	// boundary, codesign_allocate will not need to apply
-	// any alignment padding itself, working around the
-	// issue.
-	for s4.Size%16 != 0 {
-		Adduint8(Ctxt, s4, 0)
-	}
-
-	size := int(s1.Size + s2.Size + s3.Size + s4.Size)
-
-	if size > 0 {
-		linkoff = Rnd(int64(uint64(HEADR)+Segtext.Length), int64(INITRND)) + Rnd(int64(Segdata.Filelen), int64(INITRND)) + Rnd(int64(Segdwarf.Filelen), int64(INITRND))
-		Cseek(linkoff)
-
-		Cwrite(s1.P[:s1.Size])
-		Cwrite(s2.P[:s2.Size])
-		Cwrite(s3.P[:s3.Size])
-		Cwrite(s4.P[:s4.Size])
-	}
-
-	return Rnd(int64(size), int64(INITRND))
-}
-
-func machorelocsect(sect *Section, first *LSym) {
-	// If main section has no bits, nothing to relocate.
-	if sect.Vaddr >= sect.Seg.Vaddr+sect.Seg.Filelen {
-		return
-	}
-
-	sect.Reloff = uint64(Cpos())
-	var sym *LSym
-	for sym = first; sym != nil; sym = sym.Next {
-		if !sym.Reachable {
-			continue
-		}
-		if uint64(sym.Value) >= sect.Vaddr {
-			break
-		}
-	}
-
-	eaddr := int32(sect.Vaddr + sect.Length)
-	var r *Reloc
-	var ri int
-	for ; sym != nil; sym = sym.Next {
-		if !sym.Reachable {
-			continue
-		}
-		if sym.Value >= int64(eaddr) {
-			break
-		}
-		Ctxt.Cursym = sym
-
-		for ri = 0; ri < len(sym.R); ri++ {
-			r = &sym.R[ri]
-			if r.Done != 0 {
-				continue
-			}
-			if Thearch.Machoreloc1(r, int64(uint64(sym.Value+int64(r.Off))-sect.Vaddr)) < 0 {
-				Diag("unsupported obj reloc %d/%d to %s", r.Type, r.Siz, r.Sym.Name)
-			}
-		}
-	}
-
-	sect.Rellen = uint64(Cpos()) - sect.Reloff
-}
-
-func Machoemitreloc() {
-	for Cpos()&7 != 0 {
-		Cput(0)
-	}
-
-	machorelocsect(Segtext.Sect, Ctxt.Textp)
-	for sect := Segtext.Sect.Next; sect != nil; sect = sect.Next {
-		machorelocsect(sect, datap)
-	}
-	for sect := Segdata.Sect; sect != nil; sect = sect.Next {
-		machorelocsect(sect, datap)
-	}
-	dwarfemitreloc()
-}
diff --git a/src/cmd/link/internal/ld/macho_combine_dwarf.go b/src/cmd/link/internal/ld/macho_combine_dwarf.go
deleted file mode 100644
index b5a5a8d..0000000
--- a/src/cmd/link/internal/ld/macho_combine_dwarf.go
+++ /dev/null
@@ -1,370 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package ld
-
-import (
-	"bytes"
-	"debug/macho"
-	"encoding/binary"
-	"fmt"
-	"io"
-	"os"
-	"reflect"
-	"unsafe"
-)
-
-var fakedwarf, realdwarf, linkseg *macho.Segment
-var dwarfstart, linkstart int64
-var linkoffset uint32
-var machHeader *macho.FileHeader
-var mappedHeader []byte
-
-const (
-	LC_ID_DYLIB             = 0xd
-	LC_LOAD_DYLINKER        = 0xe
-	LC_PREBOUND_DYLIB       = 0x10
-	LC_LOAD_WEAK_DYLIB      = 0x18
-	LC_UUID                 = 0x1b
-	LC_RPATH                = 0x8000001c
-	LC_CODE_SIGNATURE       = 0x1d
-	LC_SEGMENT_SPLIT_INFO   = 0x1e
-	LC_REEXPORT_DYLIB       = 0x8000001f
-	LC_ENCRYPTION_INFO      = 0x21
-	LC_DYLD_INFO            = 0x22
-	LC_DYLD_INFO_ONLY       = 0x80000022
-	LC_VERSION_MIN_MACOSX   = 0x24
-	LC_VERSION_MIN_IPHONEOS = 0x25
-	LC_FUNCTION_STARTS      = 0x26
-	LC_MAIN                 = 0x80000028
-	LC_DATA_IN_CODE         = 0x29
-	LC_SOURCE_VERSION       = 0x2A
-	LC_DYLIB_CODE_SIGN_DRS  = 0x2B
-	LC_ENCRYPTION_INFO_64   = 0x2C
-
-	dwarfMinAlign = 6  // 64 = 1 << 6
-	pageAlign     = 12 // 4096 = 1 << 12
-)
-
-type loadCmd struct {
-	Cmd macho.LoadCmd
-	Len uint32
-}
-
-type dyldInfoCmd struct {
-	Cmd                      macho.LoadCmd
-	Len                      uint32
-	RebaseOff, RebaseLen     uint32
-	BindOff, BindLen         uint32
-	WeakBindOff, WeakBindLen uint32
-	LazyBindOff, LazyBindLen uint32
-	ExportOff, ExportLen     uint32
-}
-
-type linkEditDataCmd struct {
-	Cmd              macho.LoadCmd
-	Len              uint32
-	DataOff, DataLen uint32
-}
-
-type encryptionInfoCmd struct {
-	Cmd                macho.LoadCmd
-	Len                uint32
-	CryptOff, CryptLen uint32
-	CryptId            uint32
-}
-
-type loadCmdReader struct {
-	offset, next int64
-	f            *os.File
-	order        binary.ByteOrder
-}
-
-func (r *loadCmdReader) Next() (cmd loadCmd, err error) {
-	r.offset = r.next
-	if _, err = r.f.Seek(r.offset, 0); err != nil {
-		return
-	}
-	if err = binary.Read(r.f, r.order, &cmd); err != nil {
-		return
-	}
-	r.next = r.offset + int64(cmd.Len)
-	return
-}
-
-func (r loadCmdReader) ReadAt(offset int64, data interface{}) error {
-	if _, err := r.f.Seek(r.offset+offset, 0); err != nil {
-		return err
-	}
-	return binary.Read(r.f, r.order, data)
-}
-
-func (r loadCmdReader) WriteAt(offset int64, data interface{}) error {
-	if _, err := r.f.Seek(r.offset+offset, 0); err != nil {
-		return err
-	}
-	return binary.Write(r.f, r.order, data)
-}
-
-// machoCombineDwarf merges dwarf info generated by dsymutil into a macho executable.
-// With internal linking, DWARF is embedded into the executable, this lets us do the
-// same for external linking.
-// inexe is the path to the executable with no DWARF. It must have enough room in the macho
-// header to add the DWARF sections. (Use ld's -headerpad option)
-// dsym is the path to the macho file containing DWARF from dsymutil.
-// outexe is the path where the combined executable should be saved.
-func machoCombineDwarf(inexe, dsym, outexe string) error {
-	exef, err := os.Open(inexe)
-	if err != nil {
-		return err
-	}
-	dwarff, err := os.Open(dsym)
-	if err != nil {
-		return err
-	}
-	outf, err := os.Create(outexe)
-	if err != nil {
-		return err
-	}
-	outf.Chmod(0755)
-
-	exem, err := macho.NewFile(exef)
-	if err != nil {
-		return err
-	}
-	dwarfm, err := macho.NewFile(dwarff)
-	if err != nil {
-		return err
-	}
-
-	// The string table needs to be the last thing in the file
-	// for code signing to work. So we'll need to move the
-	// linkedit section, but all the others can be copied directly.
-	linkseg = exem.Segment("__LINKEDIT")
-	if linkseg == nil {
-		return fmt.Errorf("missing __LINKEDIT segment")
-	}
-
-	if _, err = exef.Seek(0, 0); err != nil {
-		return err
-	}
-	if _, err := io.CopyN(outf, exef, int64(linkseg.Offset)); err != nil {
-		return err
-	}
-
-	realdwarf = dwarfm.Segment("__DWARF")
-	if realdwarf == nil {
-		return fmt.Errorf("missing __DWARF segment")
-	}
-
-	// Now copy the dwarf data into the output.
-	maxalign := uint32(dwarfMinAlign) //
-	for _, sect := range dwarfm.Sections {
-		if sect.Align > maxalign {
-			maxalign = sect.Align
-		}
-	}
-	dwarfstart = machoCalcStart(realdwarf.Offset, linkseg.Offset, maxalign)
-	if _, err = outf.Seek(dwarfstart, 0); err != nil {
-		return err
-	}
-
-	if _, err = dwarff.Seek(int64(realdwarf.Offset), 0); err != nil {
-		return err
-	}
-	if _, err := io.CopyN(outf, dwarff, int64(realdwarf.Filesz)); err != nil {
-		return err
-	}
-
-	// And finally the linkedit section.
-	if _, err = exef.Seek(int64(linkseg.Offset), 0); err != nil {
-		return err
-	}
-	linkstart = machoCalcStart(linkseg.Offset, uint64(dwarfstart)+realdwarf.Filesz, pageAlign)
-	linkoffset = uint32(linkstart - int64(linkseg.Offset))
-	if _, err = outf.Seek(linkstart, 0); err != nil {
-		return err
-	}
-	if _, err := io.Copy(outf, exef); err != nil {
-		return err
-	}
-
-	// Now we need to update the headers.
-	cmdOffset := unsafe.Sizeof(exem.FileHeader)
-	is64bit := exem.Magic == macho.Magic64
-	if is64bit {
-		// mach_header_64 has one extra uint32.
-		cmdOffset += unsafe.Sizeof(exem.Magic)
-	}
-
-	textsect := exem.Section("__text")
-	if linkseg == nil {
-		return fmt.Errorf("missing __text section")
-	}
-
-	dwarfCmdOffset := int64(cmdOffset) + int64(exem.FileHeader.Cmdsz)
-	availablePadding := int64(textsect.Offset) - dwarfCmdOffset
-	if availablePadding < int64(realdwarf.Len) {
-		return fmt.Errorf("No room to add dwarf info. Need at least %d padding bytes, found %d", realdwarf.Len, availablePadding)
-	}
-	// First, copy the dwarf load command into the header
-	if _, err = outf.Seek(dwarfCmdOffset, 0); err != nil {
-		return err
-	}
-	if _, err := io.CopyN(outf, bytes.NewReader(realdwarf.Raw()), int64(realdwarf.Len)); err != nil {
-		return err
-	}
-
-	if _, err = outf.Seek(int64(unsafe.Offsetof(exem.FileHeader.Ncmd)), 0); err != nil {
-		return err
-	}
-	if err = binary.Write(outf, exem.ByteOrder, exem.Ncmd+1); err != nil {
-		return err
-	}
-	if err = binary.Write(outf, exem.ByteOrder, exem.Cmdsz+realdwarf.Len); err != nil {
-		return err
-	}
-
-	reader := loadCmdReader{next: int64(cmdOffset), f: outf, order: exem.ByteOrder}
-	for i := uint32(0); i < exem.Ncmd; i++ {
-		cmd, err := reader.Next()
-		if err != nil {
-			return err
-		}
-		switch cmd.Cmd {
-		case macho.LoadCmdSegment64:
-			err = machoUpdateSegment(reader, &macho.Segment64{}, &macho.Section64{})
-		case macho.LoadCmdSegment:
-			err = machoUpdateSegment(reader, &macho.Segment32{}, &macho.Section32{})
-		case LC_DYLD_INFO, LC_DYLD_INFO_ONLY:
-			err = machoUpdateLoadCommand(reader, &dyldInfoCmd{}, "RebaseOff", "BindOff", "WeakBindOff", "LazyBindOff", "ExportOff")
-		case macho.LoadCmdSymtab:
-			err = machoUpdateLoadCommand(reader, &macho.SymtabCmd{}, "Symoff", "Stroff")
-		case macho.LoadCmdDysymtab:
-			err = machoUpdateLoadCommand(reader, &macho.DysymtabCmd{}, "Tocoffset", "Modtaboff", "Extrefsymoff", "Indirectsymoff", "Extreloff", "Locreloff")
-		case LC_CODE_SIGNATURE, LC_SEGMENT_SPLIT_INFO, LC_FUNCTION_STARTS, LC_DATA_IN_CODE, LC_DYLIB_CODE_SIGN_DRS:
-			err = machoUpdateLoadCommand(reader, &linkEditDataCmd{}, "DataOff")
-		case LC_ENCRYPTION_INFO, LC_ENCRYPTION_INFO_64:
-			err = machoUpdateLoadCommand(reader, &encryptionInfoCmd{}, "CryptOff")
-		case macho.LoadCmdDylib, macho.LoadCmdThread, macho.LoadCmdUnixThread, LC_PREBOUND_DYLIB, LC_UUID, LC_VERSION_MIN_MACOSX, LC_VERSION_MIN_IPHONEOS, LC_SOURCE_VERSION, LC_MAIN, LC_LOAD_DYLINKER, LC_LOAD_WEAK_DYLIB, LC_REEXPORT_DYLIB, LC_RPATH, LC_ID_DYLIB:
-			// Nothing to update
-		default:
-			err = fmt.Errorf("Unknown load command 0x%x (%s)\n", int(cmd.Cmd), cmd.Cmd)
-		}
-		if err != nil {
-			return err
-		}
-	}
-	return machoUpdateDwarfHeader(&reader)
-}
-
-// machoUpdateSegment updates the load command for a moved segment.
-// Only the linkedit segment should move, and it should have 0 sections.
-// seg should be a macho.Segment32 or macho.Segment64 as appropriate.
-// sect should be a macho.Section32 or macho.Section64 as appropriate.
-func machoUpdateSegment(r loadCmdReader, seg, sect interface{}) error {
-	if err := r.ReadAt(0, seg); err != nil {
-		return err
-	}
-	segValue := reflect.ValueOf(seg)
-	offset := reflect.Indirect(segValue).FieldByName("Offset")
-
-	// Only the linkedit segment moved, any thing before that is fine.
-	if offset.Uint() < linkseg.Offset {
-		return nil
-	}
-	offset.SetUint(offset.Uint() + uint64(linkoffset))
-	if err := r.WriteAt(0, seg); err != nil {
-		return err
-	}
-	// There shouldn't be any sections, but just to make sure...
-	return machoUpdateSections(r, segValue, reflect.ValueOf(sect), uint64(linkoffset))
-}
-
-func machoUpdateSections(r loadCmdReader, seg, sect reflect.Value, delta uint64) error {
-	iseg := reflect.Indirect(seg)
-	nsect := iseg.FieldByName("Nsect").Uint()
-	if nsect == 0 {
-		return nil
-	}
-	sectOffset := int64(iseg.Type().Size())
-
-	isect := reflect.Indirect(sect)
-	offsetField := isect.FieldByName("Offset")
-	reloffField := isect.FieldByName("Reloff")
-	sectSize := int64(isect.Type().Size())
-	for i := uint64(0); i < nsect; i++ {
-		if err := r.ReadAt(sectOffset, sect.Interface()); err != nil {
-			return err
-		}
-		if offsetField.Uint() != 0 {
-			offsetField.SetUint(offsetField.Uint() + delta)
-		}
-		if reloffField.Uint() != 0 {
-			reloffField.SetUint(reloffField.Uint() + delta)
-		}
-		if err := r.WriteAt(sectOffset, sect.Interface()); err != nil {
-			return err
-		}
-		sectOffset += sectSize
-	}
-	return nil
-}
-
-// machoUpdateDwarfHeader updates the DWARF segment load command.
-func machoUpdateDwarfHeader(r *loadCmdReader) error {
-	var seg, sect interface{}
-	cmd, err := r.Next()
-	if err != nil {
-		return err
-	}
-	if cmd.Cmd == macho.LoadCmdSegment64 {
-		seg = new(macho.Segment64)
-		sect = new(macho.Section64)
-	} else {
-		seg = new(macho.Segment32)
-		sect = new(macho.Section32)
-	}
-	if err := r.ReadAt(0, seg); err != nil {
-		return err
-	}
-	segValue := reflect.ValueOf(seg)
-	offset := reflect.Indirect(segValue).FieldByName("Offset")
-
-	delta := uint64(dwarfstart) - realdwarf.Offset
-	offset.SetUint(offset.Uint() + delta)
-	if err := r.WriteAt(0, seg); err != nil {
-		return err
-	}
-	return machoUpdateSections(*r, segValue, reflect.ValueOf(sect), delta)
-}
-
-func machoUpdateLoadCommand(r loadCmdReader, cmd interface{}, fields ...string) error {
-	if err := r.ReadAt(0, cmd); err != nil {
-		return err
-	}
-	value := reflect.Indirect(reflect.ValueOf(cmd))
-
-	for _, name := range fields {
-		field := value.FieldByName(name)
-		fieldval := field.Uint()
-		if fieldval >= linkseg.Offset {
-			field.SetUint(fieldval + uint64(linkoffset))
-		}
-	}
-	if err := r.WriteAt(0, cmd); err != nil {
-		return err
-	}
-	return nil
-}
-
-func machoCalcStart(origAddr, newAddr uint64, alignExp uint32) int64 {
-	align := uint64(1 << alignExp)
-	if (origAddr % align) == (newAddr % align) {
-		return int64(newAddr)
-	}
-	padding := (align - (newAddr % align))
-	padding += origAddr % align
-	return int64(padding + newAddr)
-}
diff --git a/src/cmd/link/internal/ld/objfile.go b/src/cmd/link/internal/ld/objfile.go
deleted file mode 100644
index 36a65ba..0000000
--- a/src/cmd/link/internal/ld/objfile.go
+++ /dev/null
@@ -1,482 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package ld
-
-// Writing and reading of Go object files.
-//
-// Originally, Go object files were Plan 9 object files, but no longer.
-// Now they are more like standard object files, in that each symbol is defined
-// by an associated memory image (bytes) and a list of relocations to apply
-// during linking. We do not (yet?) use a standard file format, however.
-// For now, the format is chosen to be as simple as possible to read and write.
-// It may change for reasons of efficiency, or we may even switch to a
-// standard file format if there are compelling benefits to doing so.
-// See golang.org/s/go13linker for more background.
-//
-// The file format is:
-//
-//	- magic header: "\x00\x00go13ld"
-//	- byte 1 - version number
-//	- sequence of strings giving dependencies (imported packages)
-//	- empty string (marks end of sequence)
-//	- sequence of defined symbols
-//	- byte 0xff (marks end of sequence)
-//	- magic footer: "\xff\xffgo13ld"
-//
-// All integers are stored in a zigzag varint format.
-// See golang.org/s/go12symtab for a definition.
-//
-// Data blocks and strings are both stored as an integer
-// followed by that many bytes.
-//
-// A symbol reference is a string name followed by a version.
-// An empty name corresponds to a nil LSym* pointer.
-//
-// Each symbol is laid out as the following fields (taken from LSym*):
-//
-//	- byte 0xfe (sanity check for synchronization)
-//	- type [int]
-//	- name [string]
-//	- version [int]
-//	- flags [int]
-//		1 dupok
-//	- size [int]
-//	- gotype [symbol reference]
-//	- p [data block]
-//	- nr [int]
-//	- r [nr relocations, sorted by off]
-//
-// If type == STEXT, there are a few more fields:
-//
-//	- args [int]
-//	- locals [int]
-//	- nosplit [int]
-//	- flags [int]
-//		1 leaf
-//		2 C function
-//	- nlocal [int]
-//	- local [nlocal automatics]
-//	- pcln [pcln table]
-//
-// Each relocation has the encoding:
-//
-//	- off [int]
-//	- siz [int]
-//	- type [int]
-//	- add [int]
-//	- xadd [int]
-//	- sym [symbol reference]
-//	- xsym [symbol reference]
-//
-// Each local has the encoding:
-//
-//	- asym [symbol reference]
-//	- offset [int]
-//	- type [int]
-//	- gotype [symbol reference]
-//
-// The pcln table has the encoding:
-//
-//	- pcsp [data block]
-//	- pcfile [data block]
-//	- pcline [data block]
-//	- npcdata [int]
-//	- pcdata [npcdata data blocks]
-//	- nfuncdata [int]
-//	- funcdata [nfuncdata symbol references]
-//	- funcdatasym [nfuncdata ints]
-//	- nfile [int]
-//	- file [nfile symbol references]
-//
-// The file layout and meaning of type integers are architecture-independent.
-//
-// TODO(rsc): The file format is good for a first pass but needs work.
-//	- There are SymID in the object file that should really just be strings.
-//	- The actual symbol memory images are interlaced with the symbol
-//	  metadata. They should be separated, to reduce the I/O required to
-//	  load just the metadata.
-//	- The symbol references should be shortened, either with a symbol
-//	  table or by using a simple backward index to an earlier mentioned symbol.
-
-import (
-	"bytes"
-	"cmd/internal/obj"
-	"fmt"
-	"log"
-	"strconv"
-	"strings"
-)
-
-const (
-	startmagic = "\x00\x00go13ld"
-	endmagic   = "\xff\xffgo13ld"
-)
-
-func ldobjfile(ctxt *Link, f *obj.Biobuf, pkg string, length int64, pn string) {
-	start := obj.Boffset(f)
-	ctxt.Version++
-	var buf [8]uint8
-	obj.Bread(f, buf[:])
-	if string(buf[:]) != startmagic {
-		log.Fatalf("%s: invalid file start %x %x %x %x %x %x %x %x", pn, buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6], buf[7])
-	}
-	c := obj.Bgetc(f)
-	if c != 1 {
-		log.Fatalf("%s: invalid file version number %d", pn, c)
-	}
-
-	var lib string
-	for {
-		lib = rdstring(f)
-		if lib == "" {
-			break
-		}
-		addlib(ctxt, pkg, pn, lib)
-	}
-
-	for {
-		c, err := f.Peek(1)
-		if err != nil {
-			log.Fatalf("%s: peeking: %v", pn, err)
-		}
-		if c[0] == 0xff {
-			break
-		}
-		readsym(ctxt, f, pkg, pn)
-	}
-
-	buf = [8]uint8{}
-	obj.Bread(f, buf[:])
-	if string(buf[:]) != endmagic {
-		log.Fatalf("%s: invalid file end", pn)
-	}
-
-	if obj.Boffset(f) != start+length {
-		log.Fatalf("%s: unexpected end at %d, want %d", pn, int64(obj.Boffset(f)), int64(start+length))
-	}
-}
-
-var readsym_ndup int
-
-func readsym(ctxt *Link, f *obj.Biobuf, pkg string, pn string) {
-	if obj.Bgetc(f) != 0xfe {
-		log.Fatalf("readsym out of sync")
-	}
-	t := rdint(f)
-	name := expandpkg(rdstring(f), pkg)
-	v := rdint(f)
-	if v != 0 && v != 1 {
-		log.Fatalf("invalid symbol version %d", v)
-	}
-	flags := rdint(f)
-	dupok := flags & 1
-	local := false
-	if flags&2 != 0 {
-		local = true
-	}
-	size := rdint(f)
-	typ := rdsym(ctxt, f, pkg)
-	data := rddata(f)
-	nreloc := rdint(f)
-
-	if v != 0 {
-		v = ctxt.Version
-	}
-	s := Linklookup(ctxt, name, v)
-	var dup *LSym
-	if s.Type != 0 && s.Type != obj.SXREF {
-		if (t == obj.SDATA || t == obj.SBSS || t == obj.SNOPTRBSS) && len(data) == 0 && nreloc == 0 {
-			if s.Size < int64(size) {
-				s.Size = int64(size)
-			}
-			if typ != nil && s.Gotype == nil {
-				s.Gotype = typ
-			}
-			return
-		}
-
-		if (s.Type == obj.SDATA || s.Type == obj.SBSS || s.Type == obj.SNOPTRBSS) && len(s.P) == 0 && len(s.R) == 0 {
-			goto overwrite
-		}
-		if s.Type != obj.SBSS && s.Type != obj.SNOPTRBSS && dupok == 0 && s.Dupok == 0 {
-			log.Fatalf("duplicate symbol %s (types %d and %d) in %s and %s", s.Name, s.Type, t, s.File, pn)
-		}
-		if len(s.P) > 0 {
-			dup = s
-			s = linknewsym(ctxt, ".dup", readsym_ndup)
-			readsym_ndup++ // scratch
-		}
-	}
-
-overwrite:
-	s.File = pkg
-	s.Dupok = uint8(dupok)
-	if t == obj.SXREF {
-		log.Fatalf("bad sxref")
-	}
-	if t == 0 {
-		log.Fatalf("missing type for %s in %s", name, pn)
-	}
-	if t == obj.SBSS && (s.Type == obj.SRODATA || s.Type == obj.SNOPTRBSS) {
-		t = int(s.Type)
-	}
-	s.Type = int16(t)
-	if s.Size < int64(size) {
-		s.Size = int64(size)
-	}
-	s.Local = local
-	if typ != nil { // if bss sym defined multiple times, take type from any one def
-		s.Gotype = typ
-	}
-	if dup != nil && typ != nil {
-		dup.Gotype = typ
-	}
-	s.P = data
-	s.P = s.P[:len(data)]
-	if nreloc > 0 {
-		s.R = make([]Reloc, nreloc)
-		s.R = s.R[:nreloc]
-		var r *Reloc
-		for i := 0; i < nreloc; i++ {
-			r = &s.R[i]
-			r.Off = rdint32(f)
-			r.Siz = rduint8(f)
-			r.Type = rdint32(f)
-			r.Add = rdint64(f)
-			rdint64(f) // Xadd, ignored
-			r.Sym = rdsym(ctxt, f, pkg)
-			rdsym(ctxt, f, pkg) // Xsym, ignored
-		}
-	}
-
-	if len(s.P) > 0 && dup != nil && len(dup.P) > 0 && strings.HasPrefix(s.Name, "gclocals·") {
-		// content-addressed garbage collection liveness bitmap symbol.
-		// double check for hash collisions.
-		if !bytes.Equal(s.P, dup.P) {
-			log.Fatalf("dupok hash collision for %s in %s and %s", s.Name, s.File, pn)
-		}
-	}
-
-	if s.Type == obj.STEXT {
-		s.Args = rdint32(f)
-		s.Locals = rdint32(f)
-		s.Nosplit = rduint8(f)
-		v := rdint(f)
-		s.Leaf = uint8(v & 1)
-		s.Cfunc = uint8(v & 2)
-		n := rdint(f)
-		var a *Auto
-		for i := 0; i < n; i++ {
-			a = new(Auto)
-			a.Asym = rdsym(ctxt, f, pkg)
-			a.Aoffset = rdint32(f)
-			a.Name = rdint16(f)
-			a.Gotype = rdsym(ctxt, f, pkg)
-			a.Link = s.Autom
-			s.Autom = a
-		}
-
-		s.Pcln = new(Pcln)
-		pc := s.Pcln
-		pc.Pcsp.P = rddata(f)
-		pc.Pcfile.P = rddata(f)
-		pc.Pcline.P = rddata(f)
-		n = rdint(f)
-		pc.Pcdata = make([]Pcdata, n)
-		pc.Npcdata = n
-		for i := 0; i < n; i++ {
-			pc.Pcdata[i].P = rddata(f)
-		}
-		n = rdint(f)
-		pc.Funcdata = make([]*LSym, n)
-		pc.Funcdataoff = make([]int64, n)
-		pc.Nfuncdata = n
-		for i := 0; i < n; i++ {
-			pc.Funcdata[i] = rdsym(ctxt, f, pkg)
-		}
-		for i := 0; i < n; i++ {
-			pc.Funcdataoff[i] = rdint64(f)
-		}
-		n = rdint(f)
-		pc.File = make([]*LSym, n)
-		pc.Nfile = n
-		for i := 0; i < n; i++ {
-			pc.File[i] = rdsym(ctxt, f, pkg)
-		}
-
-		if dup == nil {
-			if s.Onlist != 0 {
-				log.Fatalf("symbol %s listed multiple times", s.Name)
-			}
-			s.Onlist = 1
-			if ctxt.Etextp != nil {
-				ctxt.Etextp.Next = s
-			} else {
-				ctxt.Textp = s
-			}
-			ctxt.Etextp = s
-		}
-	}
-
-	if ctxt.Debugasm != 0 {
-		fmt.Fprintf(ctxt.Bso, "%s ", s.Name)
-		if s.Version != 0 {
-			fmt.Fprintf(ctxt.Bso, "v=%d ", s.Version)
-		}
-		if s.Type != 0 {
-			fmt.Fprintf(ctxt.Bso, "t=%d ", s.Type)
-		}
-		if s.Dupok != 0 {
-			fmt.Fprintf(ctxt.Bso, "dupok ")
-		}
-		if s.Cfunc != 0 {
-			fmt.Fprintf(ctxt.Bso, "cfunc ")
-		}
-		if s.Nosplit != 0 {
-			fmt.Fprintf(ctxt.Bso, "nosplit ")
-		}
-		fmt.Fprintf(ctxt.Bso, "size=%d value=%d", int64(s.Size), int64(s.Value))
-		if s.Type == obj.STEXT {
-			fmt.Fprintf(ctxt.Bso, " args=%#x locals=%#x", uint64(s.Args), uint64(s.Locals))
-		}
-		fmt.Fprintf(ctxt.Bso, "\n")
-		var c int
-		var j int
-		for i := 0; i < len(s.P); {
-			fmt.Fprintf(ctxt.Bso, "\t%#04x", uint(i))
-			for j = i; j < i+16 && j < len(s.P); j++ {
-				fmt.Fprintf(ctxt.Bso, " %02x", s.P[j])
-			}
-			for ; j < i+16; j++ {
-				fmt.Fprintf(ctxt.Bso, "   ")
-			}
-			fmt.Fprintf(ctxt.Bso, "  ")
-			for j = i; j < i+16 && j < len(s.P); j++ {
-				c = int(s.P[j])
-				if ' ' <= c && c <= 0x7e {
-					fmt.Fprintf(ctxt.Bso, "%c", c)
-				} else {
-					fmt.Fprintf(ctxt.Bso, ".")
-				}
-			}
-
-			fmt.Fprintf(ctxt.Bso, "\n")
-			i += 16
-		}
-
-		var r *Reloc
-		for i := 0; i < len(s.R); i++ {
-			r = &s.R[i]
-			fmt.Fprintf(ctxt.Bso, "\trel %d+%d t=%d %s+%d\n", int(r.Off), r.Siz, r.Type, r.Sym.Name, int64(r.Add))
-		}
-	}
-}
-
-func rdint64(f *obj.Biobuf) int64 {
-	var c int
-
-	uv := uint64(0)
-	for shift := 0; ; shift += 7 {
-		if shift >= 64 {
-			log.Fatalf("corrupt input")
-		}
-		c = obj.Bgetc(f)
-		uv |= uint64(c&0x7F) << uint(shift)
-		if c&0x80 == 0 {
-			break
-		}
-	}
-
-	return int64(uv>>1) ^ (int64(uint64(uv)<<63) >> 63)
-}
-
-func rdint(f *obj.Biobuf) int {
-	n := rdint64(f)
-	if int64(int(n)) != n {
-		log.Panicf("%v out of range for int", n)
-	}
-	return int(n)
-}
-
-func rdint32(f *obj.Biobuf) int32 {
-	n := rdint64(f)
-	if int64(int32(n)) != n {
-		log.Panicf("%v out of range for int32", n)
-	}
-	return int32(n)
-}
-
-func rdint16(f *obj.Biobuf) int16 {
-	n := rdint64(f)
-	if int64(int16(n)) != n {
-		log.Panicf("%v out of range for int16", n)
-	}
-	return int16(n)
-}
-
-func rduint8(f *obj.Biobuf) uint8 {
-	n := rdint64(f)
-	if int64(uint8(n)) != n {
-		log.Panicf("%v out of range for uint8", n)
-	}
-	return uint8(n)
-}
-
-func rdstring(f *obj.Biobuf) string {
-	n := rdint64(f)
-	p := make([]byte, n)
-	obj.Bread(f, p)
-	return string(p)
-}
-
-func rddata(f *obj.Biobuf) []byte {
-	n := rdint64(f)
-	p := make([]byte, n)
-	obj.Bread(f, p)
-	return p
-}
-
-var symbuf []byte
-
-func rdsym(ctxt *Link, f *obj.Biobuf, pkg string) *LSym {
-	n := rdint(f)
-	if n == 0 {
-		rdint64(f)
-		return nil
-	}
-
-	if len(symbuf) < n {
-		symbuf = make([]byte, n)
-	}
-	obj.Bread(f, symbuf[:n])
-	p := string(symbuf[:n])
-	v := rdint(f)
-	if v != 0 {
-		v = ctxt.Version
-	}
-	s := Linklookup(ctxt, expandpkg(p, pkg), v)
-
-	if v == 0 && s.Name[0] == '$' && s.Type == 0 {
-		if strings.HasPrefix(s.Name, "$f32.") {
-			x, _ := strconv.ParseUint(s.Name[5:], 16, 32)
-			i32 := int32(x)
-			s.Type = obj.SRODATA
-			s.Local = true
-			Adduint32(ctxt, s, uint32(i32))
-			s.Reachable = false
-		} else if strings.HasPrefix(s.Name, "$f64.") || strings.HasPrefix(s.Name, "$i64.") {
-			x, _ := strconv.ParseUint(s.Name[5:], 16, 64)
-			i64 := int64(x)
-			s.Type = obj.SRODATA
-			s.Local = true
-			Adduint64(ctxt, s, uint64(i64))
-			s.Reachable = false
-		}
-	}
-	if v == 0 && strings.HasPrefix(s.Name, "runtime.gcbits.") {
-		s.Local = true
-	}
-	return s
-}
diff --git a/src/cmd/link/internal/ld/pcln.go b/src/cmd/link/internal/ld/pcln.go
deleted file mode 100644
index 6697762..0000000
--- a/src/cmd/link/internal/ld/pcln.go
+++ /dev/null
@@ -1,471 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package ld
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-	"log"
-)
-
-// funcpctab writes to dst a pc-value table mapping the code in func to the values
-// returned by valfunc parameterized by arg. The invocation of valfunc to update the
-// current value is, for each p,
-//
-//	val = valfunc(func, val, p, 0, arg);
-//	record val as value at p->pc;
-//	val = valfunc(func, val, p, 1, arg);
-//
-// where func is the function, val is the current value, p is the instruction being
-// considered, and arg can be used to further parameterize valfunc.
-
-// pctofileline computes either the file number (arg == 0)
-// or the line number (arg == 1) to use at p.
-// Because p->lineno applies to p, phase == 0 (before p)
-// takes care of the update.
-
-// pctospadj computes the sp adjustment in effect.
-// It is oldval plus any adjustment made by p itself.
-// The adjustment by p takes effect only after p, so we
-// apply the change during phase == 1.
-
-// pctopcdata computes the pcdata value in effect at p.
-// A PCDATA instruction sets the value in effect at future
-// non-PCDATA instructions.
-// Since PCDATA instructions have no width in the final code,
-// it does not matter which phase we use for the update.
-
-// iteration over encoded pcdata tables.
-
-func getvarint(pp *[]byte) uint32 {
-	v := uint32(0)
-	p := *pp
-	for shift := 0; ; shift += 7 {
-		v |= uint32(p[0]&0x7F) << uint(shift)
-		tmp4 := p
-		p = p[1:]
-		if tmp4[0]&0x80 == 0 {
-			break
-		}
-	}
-
-	*pp = p
-	return v
-}
-
-func pciternext(it *Pciter) {
-	it.pc = it.nextpc
-	if it.done != 0 {
-		return
-	}
-	if -cap(it.p) >= -cap(it.d.P[len(it.d.P):]) {
-		it.done = 1
-		return
-	}
-
-	// value delta
-	v := getvarint(&it.p)
-
-	if v == 0 && it.start == 0 {
-		it.done = 1
-		return
-	}
-
-	it.start = 0
-	dv := int32(v>>1) ^ (int32(v<<31) >> 31)
-	it.value += dv
-
-	// pc delta
-	v = getvarint(&it.p)
-
-	it.nextpc = it.pc + v*it.pcscale
-}
-
-func pciterinit(ctxt *Link, it *Pciter, d *Pcdata) {
-	it.d = *d
-	it.p = it.d.P
-	it.pc = 0
-	it.nextpc = 0
-	it.value = -1
-	it.start = 1
-	it.done = 0
-	it.pcscale = uint32(ctxt.Arch.Minlc)
-	pciternext(it)
-}
-
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-func addvarint(d *Pcdata, val uint32) {
-	n := int32(0)
-	for v := val; v >= 0x80; v >>= 7 {
-		n++
-	}
-	n++
-
-	old := len(d.P)
-	for cap(d.P) < len(d.P)+int(n) {
-		d.P = append(d.P[:cap(d.P)], 0)
-	}
-	d.P = d.P[:old+int(n)]
-
-	p := d.P[old:]
-	var v uint32
-	for v = val; v >= 0x80; v >>= 7 {
-		p[0] = byte(v | 0x80)
-		p = p[1:]
-	}
-	p[0] = byte(v)
-}
-
-func addpctab(ftab *LSym, off int32, d *Pcdata) int32 {
-	var start int32
-	if len(d.P) > 0 {
-		start = int32(len(ftab.P))
-		Symgrow(Ctxt, ftab, int64(start)+int64(len(d.P)))
-		copy(ftab.P[start:], d.P)
-	}
-	return int32(setuint32(Ctxt, ftab, int64(off), uint32(start)))
-}
-
-func ftabaddstring(ftab *LSym, s string) int32 {
-	n := int32(len(s)) + 1
-	start := int32(len(ftab.P))
-	Symgrow(Ctxt, ftab, int64(start)+int64(n)+1)
-	copy(ftab.P[start:], s)
-	return start
-}
-
-func renumberfiles(ctxt *Link, files []*LSym, d *Pcdata) {
-	var f *LSym
-
-	// Give files numbers.
-	for i := 0; i < len(files); i++ {
-		f = files[i]
-		if f.Type != obj.SFILEPATH {
-			ctxt.Nhistfile++
-			f.Value = int64(ctxt.Nhistfile)
-			f.Type = obj.SFILEPATH
-			f.Next = ctxt.Filesyms
-			ctxt.Filesyms = f
-		}
-	}
-
-	newval := int32(-1)
-	var out Pcdata
-
-	var dv int32
-	var it Pciter
-	var oldval int32
-	var v uint32
-	var val int32
-	for pciterinit(ctxt, &it, d); it.done == 0; pciternext(&it) {
-		// value delta
-		oldval = it.value
-
-		if oldval == -1 {
-			val = -1
-		} else {
-			if oldval < 0 || oldval >= int32(len(files)) {
-				log.Fatalf("bad pcdata %d", oldval)
-			}
-			val = int32(files[oldval].Value)
-		}
-
-		dv = val - newval
-		newval = val
-		v = (uint32(dv) << 1) ^ uint32(int32(dv>>31))
-		addvarint(&out, v)
-
-		// pc delta
-		addvarint(&out, (it.nextpc-it.pc)/it.pcscale)
-	}
-
-	// terminating value delta
-	addvarint(&out, 0)
-
-	*d = out
-}
-
-func container(s *LSym) int {
-	// We want to generate func table entries only for the "lowest level" symbols,
-	// not containers of subsymbols.
-	if s != nil && s.Type&obj.SCONTAINER != 0 {
-		return 1
-	}
-	return 0
-}
-
-// pclntab initializes the pclntab symbol with
-// runtime function and file name information.
-
-var pclntab_zpcln Pcln
-
-// These variables are used to initialize runtime.firstmoduledata, see symtab.go:symtab.
-var pclntabNfunc int32
-var pclntabFiletabOffset int32
-var pclntabPclntabOffset int32
-var pclntabFirstFunc *LSym
-var pclntabLastFunc *LSym
-
-func pclntab() {
-	funcdata_bytes := int64(0)
-	ftab := Linklookup(Ctxt, "runtime.pclntab", 0)
-	ftab.Type = obj.SPCLNTAB
-	ftab.Reachable = true
-
-	// See golang.org/s/go12symtab for the format. Briefly:
-	//	8-byte header
-	//	nfunc [thearch.ptrsize bytes]
-	//	function table, alternating PC and offset to func struct [each entry thearch.ptrsize bytes]
-	//	end PC [thearch.ptrsize bytes]
-	//	offset to file table [4 bytes]
-	nfunc := int32(0)
-
-	// Find container symbols, mark them with SCONTAINER
-	for Ctxt.Cursym = Ctxt.Textp; Ctxt.Cursym != nil; Ctxt.Cursym = Ctxt.Cursym.Next {
-		if Ctxt.Cursym.Outer != nil {
-			Ctxt.Cursym.Outer.Type |= obj.SCONTAINER
-		}
-	}
-
-	for Ctxt.Cursym = Ctxt.Textp; Ctxt.Cursym != nil; Ctxt.Cursym = Ctxt.Cursym.Next {
-		if container(Ctxt.Cursym) == 0 {
-			nfunc++
-		}
-	}
-
-	pclntabNfunc = nfunc
-	Symgrow(Ctxt, ftab, 8+int64(Thearch.Ptrsize)+int64(nfunc)*2*int64(Thearch.Ptrsize)+int64(Thearch.Ptrsize)+4)
-	setuint32(Ctxt, ftab, 0, 0xfffffffb)
-	setuint8(Ctxt, ftab, 6, uint8(Thearch.Minlc))
-	setuint8(Ctxt, ftab, 7, uint8(Thearch.Ptrsize))
-	setuintxx(Ctxt, ftab, 8, uint64(nfunc), int64(Thearch.Ptrsize))
-	pclntabPclntabOffset = int32(8 + Thearch.Ptrsize)
-
-	nfunc = 0
-	var last *LSym
-	var end int32
-	var funcstart int32
-	var i int32
-	var it Pciter
-	var off int32
-	var pcln *Pcln
-	for Ctxt.Cursym = Ctxt.Textp; Ctxt.Cursym != nil; Ctxt.Cursym = Ctxt.Cursym.Next {
-		last = Ctxt.Cursym
-		if container(Ctxt.Cursym) != 0 {
-			continue
-		}
-		pcln = Ctxt.Cursym.Pcln
-		if pcln == nil {
-			pcln = &pclntab_zpcln
-		}
-
-		if pclntabFirstFunc == nil {
-			pclntabFirstFunc = Ctxt.Cursym
-		}
-
-		funcstart = int32(len(ftab.P))
-		funcstart += int32(-len(ftab.P)) & (int32(Thearch.Ptrsize) - 1)
-
-		setaddr(Ctxt, ftab, 8+int64(Thearch.Ptrsize)+int64(nfunc)*2*int64(Thearch.Ptrsize), Ctxt.Cursym)
-		setuintxx(Ctxt, ftab, 8+int64(Thearch.Ptrsize)+int64(nfunc)*2*int64(Thearch.Ptrsize)+int64(Thearch.Ptrsize), uint64(funcstart), int64(Thearch.Ptrsize))
-
-		// fixed size of struct, checked below
-		off = funcstart
-
-		end = funcstart + int32(Thearch.Ptrsize) + 3*4 + 5*4 + int32(pcln.Npcdata)*4 + int32(pcln.Nfuncdata)*int32(Thearch.Ptrsize)
-		if pcln.Nfuncdata > 0 && (end&int32(Thearch.Ptrsize-1) != 0) {
-			end += 4
-		}
-		Symgrow(Ctxt, ftab, int64(end))
-
-		// entry uintptr
-		off = int32(setaddr(Ctxt, ftab, int64(off), Ctxt.Cursym))
-
-		// name int32
-		off = int32(setuint32(Ctxt, ftab, int64(off), uint32(ftabaddstring(ftab, Ctxt.Cursym.Name))))
-
-		// args int32
-		// TODO: Move into funcinfo.
-		off = int32(setuint32(Ctxt, ftab, int64(off), uint32(Ctxt.Cursym.Args)))
-
-		// frame int32
-		// This has been removed (it was never set quite correctly anyway).
-		// Nothing should use it.
-		// Leave an obviously incorrect value.
-		// TODO: Remove entirely.
-		off = int32(setuint32(Ctxt, ftab, int64(off), 0x1234567))
-
-		if pcln != &pclntab_zpcln {
-			renumberfiles(Ctxt, pcln.File, &pcln.Pcfile)
-			if false {
-				// Sanity check the new numbering
-				for pciterinit(Ctxt, &it, &pcln.Pcfile); it.done == 0; pciternext(&it) {
-					if it.value < 1 || it.value > Ctxt.Nhistfile {
-						Diag("bad file number in pcfile: %d not in range [1, %d]\n", it.value, Ctxt.Nhistfile)
-						errorexit()
-					}
-				}
-			}
-		}
-
-		// pcdata
-		off = addpctab(ftab, off, &pcln.Pcsp)
-
-		off = addpctab(ftab, off, &pcln.Pcfile)
-		off = addpctab(ftab, off, &pcln.Pcline)
-		off = int32(setuint32(Ctxt, ftab, int64(off), uint32(pcln.Npcdata)))
-		off = int32(setuint32(Ctxt, ftab, int64(off), uint32(pcln.Nfuncdata)))
-		for i = 0; i < int32(pcln.Npcdata); i++ {
-			off = addpctab(ftab, off, &pcln.Pcdata[i])
-		}
-
-		// funcdata, must be pointer-aligned and we're only int32-aligned.
-		// Missing funcdata will be 0 (nil pointer).
-		if pcln.Nfuncdata > 0 {
-			if off&int32(Thearch.Ptrsize-1) != 0 {
-				off += 4
-			}
-			for i = 0; i < int32(pcln.Nfuncdata); i++ {
-				if pcln.Funcdata[i] == nil {
-					setuintxx(Ctxt, ftab, int64(off)+int64(Thearch.Ptrsize)*int64(i), uint64(pcln.Funcdataoff[i]), int64(Thearch.Ptrsize))
-				} else {
-					// TODO: Dedup.
-					funcdata_bytes += pcln.Funcdata[i].Size
-
-					setaddrplus(Ctxt, ftab, int64(off)+int64(Thearch.Ptrsize)*int64(i), pcln.Funcdata[i], pcln.Funcdataoff[i])
-				}
-			}
-
-			off += int32(pcln.Nfuncdata) * int32(Thearch.Ptrsize)
-		}
-
-		if off != end {
-			Diag("bad math in functab: funcstart=%d off=%d but end=%d (npcdata=%d nfuncdata=%d ptrsize=%d)", funcstart, off, end, pcln.Npcdata, pcln.Nfuncdata, Thearch.Ptrsize)
-			errorexit()
-		}
-
-		nfunc++
-	}
-
-	pclntabLastFunc = last
-	// Final entry of table is just end pc.
-	setaddrplus(Ctxt, ftab, 8+int64(Thearch.Ptrsize)+int64(nfunc)*2*int64(Thearch.Ptrsize), last, last.Size)
-
-	// Start file table.
-	start := int32(len(ftab.P))
-
-	start += int32(-len(ftab.P)) & (int32(Thearch.Ptrsize) - 1)
-	pclntabFiletabOffset = start
-	setuint32(Ctxt, ftab, 8+int64(Thearch.Ptrsize)+int64(nfunc)*2*int64(Thearch.Ptrsize)+int64(Thearch.Ptrsize), uint32(start))
-
-	Symgrow(Ctxt, ftab, int64(start)+(int64(Ctxt.Nhistfile)+1)*4)
-	setuint32(Ctxt, ftab, int64(start), uint32(Ctxt.Nhistfile))
-	for s := Ctxt.Filesyms; s != nil; s = s.Next {
-		setuint32(Ctxt, ftab, int64(start)+s.Value*4, uint32(ftabaddstring(ftab, s.Name)))
-	}
-
-	ftab.Size = int64(len(ftab.P))
-
-	if Debug['v'] != 0 {
-		fmt.Fprintf(&Bso, "%5.2f pclntab=%d bytes, funcdata total %d bytes\n", obj.Cputime(), int64(ftab.Size), int64(funcdata_bytes))
-	}
-}
-
-const (
-	BUCKETSIZE    = 256 * MINFUNC
-	SUBBUCKETS    = 16
-	SUBBUCKETSIZE = BUCKETSIZE / SUBBUCKETS
-	NOIDX         = 0x7fffffff
-)
-
-// findfunctab generates a lookup table to quickly find the containing
-// function for a pc.  See src/runtime/symtab.go:findfunc for details.
-func findfunctab() {
-	t := Linklookup(Ctxt, "runtime.findfunctab", 0)
-	t.Type = obj.SRODATA
-	t.Reachable = true
-	t.Local = true
-
-	// find min and max address
-	min := Ctxt.Textp.Value
-
-	max := int64(0)
-	for s := Ctxt.Textp; s != nil; s = s.Next {
-		max = s.Value + s.Size
-	}
-
-	// for each subbucket, compute the minimum of all symbol indexes
-	// that map to that subbucket.
-	n := int32((max - min + SUBBUCKETSIZE - 1) / SUBBUCKETSIZE)
-
-	indexes := make([]int32, n)
-	for i := int32(0); i < n; i++ {
-		indexes[i] = NOIDX
-	}
-	idx := int32(0)
-	var e *LSym
-	var i int32
-	var p int64
-	var q int64
-	for s := Ctxt.Textp; s != nil; s = s.Next {
-		if container(s) != 0 {
-			continue
-		}
-		p = s.Value
-		e = s.Next
-		for container(e) != 0 {
-			e = e.Next
-		}
-		if e != nil {
-			q = e.Value
-		} else {
-			q = max
-		}
-
-		//print("%d: [%lld %lld] %s\n", idx, p, q, s->name);
-		for ; p < q; p += SUBBUCKETSIZE {
-			i = int32((p - min) / SUBBUCKETSIZE)
-			if indexes[i] > idx {
-				indexes[i] = idx
-			}
-		}
-
-		i = int32((q - 1 - min) / SUBBUCKETSIZE)
-		if indexes[i] > idx {
-			indexes[i] = idx
-		}
-		idx++
-	}
-
-	// allocate table
-	nbuckets := int32((max - min + BUCKETSIZE - 1) / BUCKETSIZE)
-
-	Symgrow(Ctxt, t, 4*int64(nbuckets)+int64(n))
-
-	// fill in table
-	var base int32
-	var j int32
-	for i := int32(0); i < nbuckets; i++ {
-		base = indexes[i*SUBBUCKETS]
-		if base == NOIDX {
-			Diag("hole in findfunctab")
-		}
-		setuint32(Ctxt, t, int64(i)*(4+SUBBUCKETS), uint32(base))
-		for j = 0; j < SUBBUCKETS && i*SUBBUCKETS+j < n; j++ {
-			idx = indexes[i*SUBBUCKETS+j]
-			if idx == NOIDX {
-				Diag("hole in findfunctab")
-			}
-			if idx-base >= 256 {
-				Diag("too many functions in a findfunc bucket! %d/%d %d %d", i, nbuckets, j, idx-base)
-			}
-
-			setuint8(Ctxt, t, int64(i)*(4+SUBBUCKETS)+4+int64(j), uint8(idx-base))
-		}
-	}
-}
diff --git a/src/cmd/link/internal/ld/pe.go b/src/cmd/link/internal/ld/pe.go
deleted file mode 100644
index d5f7e62..0000000
--- a/src/cmd/link/internal/ld/pe.go
+++ /dev/null
@@ -1,1254 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package ld
-
-import (
-	"cmd/internal/obj"
-	"encoding/binary"
-	"fmt"
-	"sort"
-	"strconv"
-	"strings"
-)
-
-type IMAGE_FILE_HEADER struct {
-	Machine              uint16
-	NumberOfSections     uint16
-	TimeDateStamp        uint32
-	PointerToSymbolTable uint32
-	NumberOfSymbols      uint32
-	SizeOfOptionalHeader uint16
-	Characteristics      uint16
-}
-
-type IMAGE_DATA_DIRECTORY struct {
-	VirtualAddress uint32
-	Size           uint32
-}
-
-type IMAGE_OPTIONAL_HEADER struct {
-	Magic                       uint16
-	MajorLinkerVersion          uint8
-	MinorLinkerVersion          uint8
-	SizeOfCode                  uint32
-	SizeOfInitializedData       uint32
-	SizeOfUninitializedData     uint32
-	AddressOfEntryPoint         uint32
-	BaseOfCode                  uint32
-	BaseOfData                  uint32
-	ImageBase                   uint32
-	SectionAlignment            uint32
-	FileAlignment               uint32
-	MajorOperatingSystemVersion uint16
-	MinorOperatingSystemVersion uint16
-	MajorImageVersion           uint16
-	MinorImageVersion           uint16
-	MajorSubsystemVersion       uint16
-	MinorSubsystemVersion       uint16
-	Win32VersionValue           uint32
-	SizeOfImage                 uint32
-	SizeOfHeaders               uint32
-	CheckSum                    uint32
-	Subsystem                   uint16
-	DllCharacteristics          uint16
-	SizeOfStackReserve          uint32
-	SizeOfStackCommit           uint32
-	SizeOfHeapReserve           uint32
-	SizeOfHeapCommit            uint32
-	LoaderFlags                 uint32
-	NumberOfRvaAndSizes         uint32
-	DataDirectory               [16]IMAGE_DATA_DIRECTORY
-}
-
-type IMAGE_SECTION_HEADER struct {
-	Name                 [8]uint8
-	VirtualSize          uint32
-	VirtualAddress       uint32
-	SizeOfRawData        uint32
-	PointerToRawData     uint32
-	PointerToRelocations uint32
-	PointerToLineNumbers uint32
-	NumberOfRelocations  uint16
-	NumberOfLineNumbers  uint16
-	Characteristics      uint32
-}
-
-type IMAGE_IMPORT_DESCRIPTOR struct {
-	OriginalFirstThunk uint32
-	TimeDateStamp      uint32
-	ForwarderChain     uint32
-	Name               uint32
-	FirstThunk         uint32
-}
-
-type IMAGE_EXPORT_DIRECTORY struct {
-	Characteristics       uint32
-	TimeDateStamp         uint32
-	MajorVersion          uint16
-	MinorVersion          uint16
-	Name                  uint32
-	Base                  uint32
-	NumberOfFunctions     uint32
-	NumberOfNames         uint32
-	AddressOfFunctions    uint32
-	AddressOfNames        uint32
-	AddressOfNameOrdinals uint32
-}
-
-const (
-	PEBASE = 0x00400000
-
-	// SectionAlignment must be greater than or equal to FileAlignment.
-	// The default is the page size for the architecture.
-	PESECTALIGN = 0x1000
-
-	// FileAlignment should be a power of 2 between 512 and 64 K, inclusive.
-	// The default is 512. If the SectionAlignment is less than
-	// the architecture's page size, then FileAlignment must match SectionAlignment.
-	PEFILEALIGN = 2 << 8
-)
-
-const (
-	IMAGE_FILE_MACHINE_I386              = 0x14c
-	IMAGE_FILE_MACHINE_AMD64             = 0x8664
-	IMAGE_FILE_RELOCS_STRIPPED           = 0x0001
-	IMAGE_FILE_EXECUTABLE_IMAGE          = 0x0002
-	IMAGE_FILE_LINE_NUMS_STRIPPED        = 0x0004
-	IMAGE_FILE_LARGE_ADDRESS_AWARE       = 0x0020
-	IMAGE_FILE_32BIT_MACHINE             = 0x0100
-	IMAGE_FILE_DEBUG_STRIPPED            = 0x0200
-	IMAGE_SCN_CNT_CODE                   = 0x00000020
-	IMAGE_SCN_CNT_INITIALIZED_DATA       = 0x00000040
-	IMAGE_SCN_CNT_UNINITIALIZED_DATA     = 0x00000080
-	IMAGE_SCN_MEM_EXECUTE                = 0x20000000
-	IMAGE_SCN_MEM_READ                   = 0x40000000
-	IMAGE_SCN_MEM_WRITE                  = 0x80000000
-	IMAGE_SCN_MEM_DISCARDABLE            = 0x2000000
-	IMAGE_SCN_LNK_NRELOC_OVFL            = 0x1000000
-	IMAGE_SCN_ALIGN_32BYTES              = 0x600000
-	IMAGE_DIRECTORY_ENTRY_EXPORT         = 0
-	IMAGE_DIRECTORY_ENTRY_IMPORT         = 1
-	IMAGE_DIRECTORY_ENTRY_RESOURCE       = 2
-	IMAGE_DIRECTORY_ENTRY_EXCEPTION      = 3
-	IMAGE_DIRECTORY_ENTRY_SECURITY       = 4
-	IMAGE_DIRECTORY_ENTRY_BASERELOC      = 5
-	IMAGE_DIRECTORY_ENTRY_DEBUG          = 6
-	IMAGE_DIRECTORY_ENTRY_COPYRIGHT      = 7
-	IMAGE_DIRECTORY_ENTRY_ARCHITECTURE   = 7
-	IMAGE_DIRECTORY_ENTRY_GLOBALPTR      = 8
-	IMAGE_DIRECTORY_ENTRY_TLS            = 9
-	IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG    = 10
-	IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT   = 11
-	IMAGE_DIRECTORY_ENTRY_IAT            = 12
-	IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT   = 13
-	IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR = 14
-	IMAGE_SUBSYSTEM_WINDOWS_GUI          = 2
-	IMAGE_SUBSYSTEM_WINDOWS_CUI          = 3
-)
-
-// X64
-type PE64_IMAGE_OPTIONAL_HEADER struct {
-	Magic                       uint16
-	MajorLinkerVersion          uint8
-	MinorLinkerVersion          uint8
-	SizeOfCode                  uint32
-	SizeOfInitializedData       uint32
-	SizeOfUninitializedData     uint32
-	AddressOfEntryPoint         uint32
-	BaseOfCode                  uint32
-	ImageBase                   uint64
-	SectionAlignment            uint32
-	FileAlignment               uint32
-	MajorOperatingSystemVersion uint16
-	MinorOperatingSystemVersion uint16
-	MajorImageVersion           uint16
-	MinorImageVersion           uint16
-	MajorSubsystemVersion       uint16
-	MinorSubsystemVersion       uint16
-	Win32VersionValue           uint32
-	SizeOfImage                 uint32
-	SizeOfHeaders               uint32
-	CheckSum                    uint32
-	Subsystem                   uint16
-	DllCharacteristics          uint16
-	SizeOfStackReserve          uint64
-	SizeOfStackCommit           uint64
-	SizeOfHeapReserve           uint64
-	SizeOfHeapCommit            uint64
-	LoaderFlags                 uint32
-	NumberOfRvaAndSizes         uint32
-	DataDirectory               [16]IMAGE_DATA_DIRECTORY
-}
-
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// PE (Portable Executable) file writing
-// http://www.microsoft.com/whdc/system/platform/firmware/PECOFF.mspx
-
-// DOS stub that prints out
-// "This program cannot be run in DOS mode."
-var dosstub = []uint8{
-	0x4d,
-	0x5a,
-	0x90,
-	0x00,
-	0x03,
-	0x00,
-	0x04,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0xff,
-	0xff,
-	0x00,
-	0x00,
-	0x8b,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x40,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x80,
-	0x00,
-	0x00,
-	0x00,
-	0x0e,
-	0x1f,
-	0xba,
-	0x0e,
-	0x00,
-	0xb4,
-	0x09,
-	0xcd,
-	0x21,
-	0xb8,
-	0x01,
-	0x4c,
-	0xcd,
-	0x21,
-	0x54,
-	0x68,
-	0x69,
-	0x73,
-	0x20,
-	0x70,
-	0x72,
-	0x6f,
-	0x67,
-	0x72,
-	0x61,
-	0x6d,
-	0x20,
-	0x63,
-	0x61,
-	0x6e,
-	0x6e,
-	0x6f,
-	0x74,
-	0x20,
-	0x62,
-	0x65,
-	0x20,
-	0x72,
-	0x75,
-	0x6e,
-	0x20,
-	0x69,
-	0x6e,
-	0x20,
-	0x44,
-	0x4f,
-	0x53,
-	0x20,
-	0x6d,
-	0x6f,
-	0x64,
-	0x65,
-	0x2e,
-	0x0d,
-	0x0d,
-	0x0a,
-	0x24,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-}
-
-var rsrcsym *LSym
-
-var strtbl []byte
-
-var PESECTHEADR int32
-
-var PEFILEHEADR int32
-
-var pe64 int
-
-var pensect int
-
-var nextsectoff int
-
-var nextfileoff int
-
-var textsect int
-
-var datasect int
-
-var bsssect int
-
-var fh IMAGE_FILE_HEADER
-
-var oh IMAGE_OPTIONAL_HEADER
-
-var oh64 PE64_IMAGE_OPTIONAL_HEADER
-
-var sh [16]IMAGE_SECTION_HEADER
-
-var dd []IMAGE_DATA_DIRECTORY
-
-type Imp struct {
-	s       *LSym
-	off     uint64
-	next    *Imp
-	argsize int
-}
-
-type Dll struct {
-	name     string
-	nameoff  uint64
-	thunkoff uint64
-	ms       *Imp
-	next     *Dll
-}
-
-var dr *Dll
-
-var dexport [1024]*LSym
-
-var nexport int
-
-type COFFSym struct {
-	sym       *LSym
-	strtbloff int
-	sect      int
-	value     int64
-	typ       uint16
-}
-
-var coffsym []COFFSym
-
-var ncoffsym int
-
-func addpesection(name string, sectsize int, filesize int) *IMAGE_SECTION_HEADER {
-	if pensect == 16 {
-		Diag("too many sections")
-		errorexit()
-	}
-
-	h := &sh[pensect]
-	pensect++
-	copy(h.Name[:], name)
-	h.VirtualSize = uint32(sectsize)
-	h.VirtualAddress = uint32(nextsectoff)
-	nextsectoff = int(Rnd(int64(nextsectoff)+int64(sectsize), PESECTALIGN))
-	h.PointerToRawData = uint32(nextfileoff)
-	if filesize > 0 {
-		h.SizeOfRawData = uint32(Rnd(int64(filesize), PEFILEALIGN))
-		nextfileoff += int(h.SizeOfRawData)
-	}
-
-	return h
-}
-
-func chksectoff(h *IMAGE_SECTION_HEADER, off int64) {
-	if off != int64(h.PointerToRawData) {
-		Diag("%s.PointerToRawData = %#x, want %#x", cstring(h.Name[:]), uint64(int64(h.PointerToRawData)), uint64(off))
-		errorexit()
-	}
-}
-
-func chksectseg(h *IMAGE_SECTION_HEADER, s *Segment) {
-	if s.Vaddr-PEBASE != uint64(h.VirtualAddress) {
-		Diag("%s.VirtualAddress = %#x, want %#x", cstring(h.Name[:]), uint64(int64(h.VirtualAddress)), uint64(int64(s.Vaddr-PEBASE)))
-		errorexit()
-	}
-
-	if s.Fileoff != uint64(h.PointerToRawData) {
-		Diag("%s.PointerToRawData = %#x, want %#x", cstring(h.Name[:]), uint64(int64(h.PointerToRawData)), uint64(int64(s.Fileoff)))
-		errorexit()
-	}
-}
-
-func Peinit() {
-	var l int
-
-	switch Thearch.Thechar {
-	// 64-bit architectures
-	case '6':
-		pe64 = 1
-
-		l = binary.Size(&oh64)
-		dd = oh64.DataDirectory[:]
-
-	// 32-bit architectures
-	default:
-		l = binary.Size(&oh)
-
-		dd = oh.DataDirectory[:]
-	}
-
-	PEFILEHEADR = int32(Rnd(int64(len(dosstub)+binary.Size(&fh)+l+binary.Size(&sh)), PEFILEALIGN))
-	PESECTHEADR = int32(Rnd(int64(PEFILEHEADR), PESECTALIGN))
-	nextsectoff = int(PESECTHEADR)
-	nextfileoff = int(PEFILEHEADR)
-
-	// some mingw libs depend on this symbol, for example, FindPESectionByName
-	xdefine("__image_base__", obj.SDATA, PEBASE)
-
-	xdefine("_image_base__", obj.SDATA, PEBASE)
-}
-
-func pewrite() {
-	Cseek(0)
-	if Linkmode != LinkExternal {
-		Cwrite(dosstub)
-		strnput("PE", 4)
-	}
-
-	binary.Write(&coutbuf, binary.LittleEndian, &fh)
-
-	if pe64 != 0 {
-		binary.Write(&coutbuf, binary.LittleEndian, &oh64)
-	} else {
-		binary.Write(&coutbuf, binary.LittleEndian, &oh)
-	}
-	binary.Write(&coutbuf, binary.LittleEndian, sh[:pensect])
-}
-
-func strput(s string) {
-	coutbuf.WriteString(s)
-	Cput(0)
-	// string must be padded to even size
-	if (len(s)+1)%2 != 0 {
-		Cput(0)
-	}
-}
-
-func initdynimport() *Dll {
-	var d *Dll
-
-	dr = nil
-	var m *Imp
-	for s := Ctxt.Allsym; s != nil; s = s.Allsym {
-		if !s.Reachable || s.Type != obj.SDYNIMPORT {
-			continue
-		}
-		for d = dr; d != nil; d = d.next {
-			if d.name == s.Dynimplib {
-				m = new(Imp)
-				break
-			}
-		}
-
-		if d == nil {
-			d = new(Dll)
-			d.name = s.Dynimplib
-			d.next = dr
-			dr = d
-			m = new(Imp)
-		}
-
-		// Because external link requires properly stdcall decorated name,
-		// all external symbols in runtime use %n to denote that the number
-		// of uinptrs this function consumes. Store the argsize and discard
-		// the %n suffix if any.
-		m.argsize = -1
-		if i := strings.IndexByte(s.Extname, '%'); i >= 0 {
-			var err error
-			m.argsize, err = strconv.Atoi(s.Extname[i+1:])
-			if err != nil {
-				Diag("failed to parse stdcall decoration: %v", err)
-			}
-			m.argsize *= Thearch.Ptrsize
-			s.Extname = s.Extname[:i]
-		}
-
-		m.s = s
-		m.next = d.ms
-		d.ms = m
-	}
-
-	if Linkmode == LinkExternal {
-		// Add real symbol name
-		for d := dr; d != nil; d = d.next {
-			for m = d.ms; m != nil; m = m.next {
-				m.s.Type = obj.SDATA
-				Symgrow(Ctxt, m.s, int64(Thearch.Ptrsize))
-				dynName := m.s.Extname
-				// only windows/386 requires stdcall decoration
-				if Thearch.Thechar == '8' && m.argsize >= 0 {
-					dynName += fmt.Sprintf("@%d", m.argsize)
-				}
-				dynSym := Linklookup(Ctxt, dynName, 0)
-				dynSym.Reachable = true
-				dynSym.Type = obj.SHOSTOBJ
-				r := Addrel(m.s)
-				r.Sym = dynSym
-				r.Off = 0
-				r.Siz = uint8(Thearch.Ptrsize)
-				r.Type = obj.R_ADDR
-			}
-		}
-	} else {
-		dynamic := Linklookup(Ctxt, ".windynamic", 0)
-		dynamic.Reachable = true
-		dynamic.Type = obj.SWINDOWS
-		for d := dr; d != nil; d = d.next {
-			for m = d.ms; m != nil; m = m.next {
-				m.s.Type = obj.SWINDOWS | obj.SSUB
-				m.s.Sub = dynamic.Sub
-				dynamic.Sub = m.s
-				m.s.Value = dynamic.Size
-				dynamic.Size += int64(Thearch.Ptrsize)
-			}
-
-			dynamic.Size += int64(Thearch.Ptrsize)
-		}
-	}
-
-	return dr
-}
-
-// peimporteddlls returns the gcc command line argument to link all imported
-// DLLs.
-func peimporteddlls() []string {
-	var dlls []string
-
-	for d := dr; d != nil; d = d.next {
-		dlls = append(dlls, "-l"+strings.TrimSuffix(d.name, ".dll"))
-	}
-
-	return dlls
-}
-
-func addimports(datsect *IMAGE_SECTION_HEADER) {
-	startoff := Cpos()
-	dynamic := Linklookup(Ctxt, ".windynamic", 0)
-
-	// skip import descriptor table (will write it later)
-	n := uint64(0)
-
-	for d := dr; d != nil; d = d.next {
-		n++
-	}
-	Cseek(startoff + int64(binary.Size(&IMAGE_IMPORT_DESCRIPTOR{}))*int64(n+1))
-
-	// write dll names
-	for d := dr; d != nil; d = d.next {
-		d.nameoff = uint64(Cpos()) - uint64(startoff)
-		strput(d.name)
-	}
-
-	// write function names
-	var m *Imp
-	for d := dr; d != nil; d = d.next {
-		for m = d.ms; m != nil; m = m.next {
-			m.off = uint64(nextsectoff) + uint64(Cpos()) - uint64(startoff)
-			Wputl(0) // hint
-			strput(m.s.Extname)
-		}
-	}
-
-	// write OriginalFirstThunks
-	oftbase := uint64(Cpos()) - uint64(startoff)
-
-	n = uint64(Cpos())
-	for d := dr; d != nil; d = d.next {
-		d.thunkoff = uint64(Cpos()) - n
-		for m = d.ms; m != nil; m = m.next {
-			if pe64 != 0 {
-				Vputl(m.off)
-			} else {
-				Lputl(uint32(m.off))
-			}
-		}
-
-		if pe64 != 0 {
-			Vputl(0)
-		} else {
-			Lputl(0)
-		}
-	}
-
-	// add pe section and pad it at the end
-	n = uint64(Cpos()) - uint64(startoff)
-
-	isect := addpesection(".idata", int(n), int(n))
-	isect.Characteristics = IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE
-	chksectoff(isect, startoff)
-	strnput("", int(uint64(isect.SizeOfRawData)-n))
-	endoff := Cpos()
-
-	// write FirstThunks (allocated in .data section)
-	ftbase := uint64(dynamic.Value) - uint64(datsect.VirtualAddress) - PEBASE
-
-	Cseek(int64(uint64(datsect.PointerToRawData) + ftbase))
-	for d := dr; d != nil; d = d.next {
-		for m = d.ms; m != nil; m = m.next {
-			if pe64 != 0 {
-				Vputl(m.off)
-			} else {
-				Lputl(uint32(m.off))
-			}
-		}
-
-		if pe64 != 0 {
-			Vputl(0)
-		} else {
-			Lputl(0)
-		}
-	}
-
-	// finally write import descriptor table
-	Cseek(startoff)
-
-	for d := dr; d != nil; d = d.next {
-		Lputl(uint32(uint64(isect.VirtualAddress) + oftbase + d.thunkoff))
-		Lputl(0)
-		Lputl(0)
-		Lputl(uint32(uint64(isect.VirtualAddress) + d.nameoff))
-		Lputl(uint32(uint64(datsect.VirtualAddress) + ftbase + d.thunkoff))
-	}
-
-	Lputl(0) //end
-	Lputl(0)
-	Lputl(0)
-	Lputl(0)
-	Lputl(0)
-
-	// update data directory
-	dd[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress = isect.VirtualAddress
-
-	dd[IMAGE_DIRECTORY_ENTRY_IMPORT].Size = isect.VirtualSize
-	dd[IMAGE_DIRECTORY_ENTRY_IAT].VirtualAddress = uint32(dynamic.Value - PEBASE)
-	dd[IMAGE_DIRECTORY_ENTRY_IAT].Size = uint32(dynamic.Size)
-
-	Cseek(endoff)
-}
-
-type pescmp []*LSym
-
-func (x pescmp) Len() int {
-	return len(x)
-}
-
-func (x pescmp) Swap(i, j int) {
-	x[i], x[j] = x[j], x[i]
-}
-
-func (x pescmp) Less(i, j int) bool {
-	s1 := x[i]
-	s2 := x[j]
-	return stringsCompare(s1.Extname, s2.Extname) < 0
-}
-
-func initdynexport() {
-	nexport = 0
-	for s := Ctxt.Allsym; s != nil; s = s.Allsym {
-		if !s.Reachable || s.Cgoexport&CgoExportDynamic == 0 {
-			continue
-		}
-		if nexport+1 > len(dexport) {
-			Diag("pe dynexport table is full")
-			errorexit()
-		}
-
-		dexport[nexport] = s
-		nexport++
-	}
-
-	sort.Sort(pescmp(dexport[:nexport]))
-}
-
-func addexports() {
-	var e IMAGE_EXPORT_DIRECTORY
-
-	size := binary.Size(&e) + 10*nexport + len(outfile) + 1
-	for i := 0; i < nexport; i++ {
-		size += len(dexport[i].Extname) + 1
-	}
-
-	if nexport == 0 {
-		return
-	}
-
-	sect := addpesection(".edata", size, size)
-	sect.Characteristics = IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ
-	chksectoff(sect, Cpos())
-	va := int(sect.VirtualAddress)
-	dd[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress = uint32(va)
-	dd[IMAGE_DIRECTORY_ENTRY_EXPORT].Size = sect.VirtualSize
-
-	va_name := va + binary.Size(&e) + nexport*4
-	va_addr := va + binary.Size(&e)
-	va_na := va + binary.Size(&e) + nexport*8
-
-	e.Characteristics = 0
-	e.MajorVersion = 0
-	e.MinorVersion = 0
-	e.NumberOfFunctions = uint32(nexport)
-	e.NumberOfNames = uint32(nexport)
-	e.Name = uint32(va+binary.Size(&e)) + uint32(nexport)*10 // Program names.
-	e.Base = 1
-	e.AddressOfFunctions = uint32(va_addr)
-	e.AddressOfNames = uint32(va_name)
-	e.AddressOfNameOrdinals = uint32(va_na)
-
-	// put IMAGE_EXPORT_DIRECTORY
-	binary.Write(&coutbuf, binary.LittleEndian, &e)
-
-	// put EXPORT Address Table
-	for i := 0; i < nexport; i++ {
-		Lputl(uint32(dexport[i].Value - PEBASE))
-	}
-
-	// put EXPORT Name Pointer Table
-	v := int(e.Name + uint32(len(outfile)) + 1)
-
-	for i := 0; i < nexport; i++ {
-		Lputl(uint32(v))
-		v += len(dexport[i].Extname) + 1
-	}
-
-	// put EXPORT Ordinal Table
-	for i := 0; i < nexport; i++ {
-		Wputl(uint16(i))
-	}
-
-	// put Names
-	strnput(outfile, len(outfile)+1)
-
-	for i := 0; i < nexport; i++ {
-		strnput(dexport[i].Extname, len(dexport[i].Extname)+1)
-	}
-	strnput("", int(sect.SizeOfRawData-uint32(size)))
-}
-
-// perelocsect relocates symbols from first in section sect, and returns
-// the total number of relocations emitted.
-func perelocsect(sect *Section, first *LSym) int {
-	// If main section has no bits, nothing to relocate.
-	if sect.Vaddr >= sect.Seg.Vaddr+sect.Seg.Filelen {
-		return 0
-	}
-
-	relocs := 0
-
-	sect.Reloff = uint64(Cpos())
-	var sym *LSym
-	for sym = first; sym != nil; sym = sym.Next {
-		if !sym.Reachable {
-			continue
-		}
-		if uint64(sym.Value) >= sect.Vaddr {
-			break
-		}
-	}
-
-	eaddr := int32(sect.Vaddr + sect.Length)
-	var r *Reloc
-	var ri int
-	for ; sym != nil; sym = sym.Next {
-		if !sym.Reachable {
-			continue
-		}
-		if sym.Value >= int64(eaddr) {
-			break
-		}
-		Ctxt.Cursym = sym
-
-		for ri = 0; ri < len(sym.R); ri++ {
-			r = &sym.R[ri]
-			if r.Done != 0 {
-				continue
-			}
-			if r.Xsym == nil {
-				Diag("missing xsym in relocation")
-				continue
-			}
-
-			if r.Xsym.Dynid < 0 {
-				Diag("reloc %d to non-coff symbol %s (outer=%s) %d", r.Type, r.Sym.Name, r.Xsym.Name, r.Sym.Type)
-			}
-			if !Thearch.PEreloc1(r, int64(uint64(sym.Value+int64(r.Off))-PEBASE)) {
-				Diag("unsupported obj reloc %d/%d to %s", r.Type, r.Siz, r.Sym.Name)
-			}
-
-			relocs++
-		}
-	}
-
-	sect.Rellen = uint64(Cpos()) - sect.Reloff
-
-	return relocs
-}
-
-// peemitreloc emits relocation entries for go.o in external linking.
-func peemitreloc(text, data *IMAGE_SECTION_HEADER) {
-	for Cpos()&7 != 0 {
-		Cput(0)
-	}
-
-	text.PointerToRelocations = uint32(Cpos())
-	// first entry: extended relocs
-	Lputl(0) // placeholder for number of relocation + 1
-	Lputl(0)
-	Wputl(0)
-
-	n := perelocsect(Segtext.Sect, Ctxt.Textp) + 1
-	for sect := Segtext.Sect.Next; sect != nil; sect = sect.Next {
-		n += perelocsect(sect, datap)
-	}
-
-	cpos := Cpos()
-	Cseek(int64(text.PointerToRelocations))
-	Lputl(uint32(n))
-	Cseek(cpos)
-	if n > 0x10000 {
-		n = 0x10000
-		text.Characteristics |= IMAGE_SCN_LNK_NRELOC_OVFL
-	} else {
-		text.PointerToRelocations += 10 // skip the extend reloc entry
-	}
-	text.NumberOfRelocations = uint16(n - 1)
-
-	data.PointerToRelocations = uint32(cpos)
-	// first entry: extended relocs
-	Lputl(0) // placeholder for number of relocation + 1
-	Lputl(0)
-	Wputl(0)
-
-	n = 1
-	for sect := Segdata.Sect; sect != nil; sect = sect.Next {
-		n += perelocsect(sect, datap)
-	}
-
-	cpos = Cpos()
-	Cseek(int64(data.PointerToRelocations))
-	Lputl(uint32(n))
-	Cseek(cpos)
-	if n > 0x10000 {
-		n = 0x10000
-		data.Characteristics |= IMAGE_SCN_LNK_NRELOC_OVFL
-	} else {
-		data.PointerToRelocations += 10 // skip the extend reloc entry
-	}
-	data.NumberOfRelocations = uint16(n - 1)
-}
-
-func dope() {
-	/* relocation table */
-	rel := Linklookup(Ctxt, ".rel", 0)
-
-	rel.Reachable = true
-	rel.Type = obj.SELFROSECT
-
-	initdynimport()
-	initdynexport()
-}
-
-func strtbladd(name string) int {
-	off := len(strtbl) + 4 // offset includes 4-byte length at beginning of table
-	strtbl = append(strtbl, name...)
-	strtbl = append(strtbl, 0)
-	return off
-}
-
-/*
- * For more than 8 characters section names, name contains a slash (/) that is
- * followed by an ASCII representation of a decimal number that is an offset into
- * the string table.
- * reference: pecoff_v8.docx Page 24.
- * <http://www.microsoft.com/whdc/system/platform/firmware/PECOFFdwn.mspx>
- */
-func newPEDWARFSection(name string, size int64) *IMAGE_SECTION_HEADER {
-	if size == 0 {
-		return nil
-	}
-
-	off := strtbladd(name)
-	s := fmt.Sprintf("/%d", off)
-	h := addpesection(s, int(size), int(size))
-	h.Characteristics = IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_DISCARDABLE
-
-	return h
-}
-
-func addpesym(s *LSym, name string, type_ int, addr int64, size int64, ver int, gotype *LSym) {
-	if s == nil {
-		return
-	}
-
-	if s.Sect == nil && type_ != 'U' {
-		return
-	}
-
-	switch type_ {
-	default:
-		return
-
-	case 'D', 'B', 'T', 'U':
-		break
-	}
-
-	if coffsym != nil {
-		// only windows/386 requires underscore prefix on external symbols
-		if Thearch.Thechar == '8' && Linkmode == LinkExternal && (s.Type == obj.SHOSTOBJ || s.Cgoexport != 0) && s.Name == s.Extname {
-			s.Name = "_" + s.Name
-		}
-		cs := &coffsym[ncoffsym]
-		cs.sym = s
-		if len(s.Name) > 8 {
-			cs.strtbloff = strtbladd(s.Name)
-		}
-		// Note: although address of runtime.edata (type SDATA) is at the start of .bss section
-		// it still belongs to the .data section, not the .bss section.
-		if uint64(s.Value) >= Segdata.Vaddr+Segdata.Filelen && s.Type != obj.SDATA && Linkmode == LinkExternal {
-			cs.value = int64(uint64(s.Value) - Segdata.Vaddr - Segdata.Filelen)
-			cs.sect = bsssect
-		} else if uint64(s.Value) >= Segdata.Vaddr {
-			cs.value = int64(uint64(s.Value) - Segdata.Vaddr)
-			cs.sect = datasect
-		} else if uint64(s.Value) >= Segtext.Vaddr {
-			cs.value = int64(uint64(s.Value) - Segtext.Vaddr)
-			cs.sect = textsect
-		} else if type_ == 'U' {
-			cs.value = 0
-			cs.typ = IMAGE_SYM_DTYPE_FUNCTION
-		} else {
-			cs.value = 0
-			cs.sect = 0
-			Diag("addpesym %#x", addr)
-		}
-	}
-
-	s.Dynid = int32(ncoffsym)
-	ncoffsym++
-}
-
-func pegenasmsym(put func(*LSym, string, int, int64, int64, int, *LSym)) {
-	if Linkmode == LinkExternal {
-		for d := dr; d != nil; d = d.next {
-			for m := d.ms; m != nil; m = m.next {
-				s := m.s.R[0].Xsym
-				put(s, s.Name, 'U', 0, int64(Thearch.Ptrsize), 0, nil)
-			}
-		}
-	}
-	genasmsym(put)
-}
-
-func addpesymtable() {
-	if Debug['s'] == 0 || Linkmode == LinkExternal {
-		ncoffsym = 0
-		pegenasmsym(addpesym)
-		coffsym = make([]COFFSym, ncoffsym)
-		ncoffsym = 0
-		pegenasmsym(addpesym)
-	}
-	size := len(strtbl) + 4 + 18*ncoffsym
-
-	var h *IMAGE_SECTION_HEADER
-	if Linkmode != LinkExternal {
-		// We do not really need .symtab for go.o, and if we have one, ld
-		// will also include it in the exe, and that will confuse windows.
-		h = addpesection(".symtab", size, size)
-		h.Characteristics = IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_DISCARDABLE
-		chksectoff(h, Cpos())
-	}
-	fh.PointerToSymbolTable = uint32(Cpos())
-	fh.NumberOfSymbols = uint32(ncoffsym)
-
-	// put COFF symbol table
-	var s *COFFSym
-	for i := 0; i < ncoffsym; i++ {
-		s = &coffsym[i]
-		if s.strtbloff == 0 {
-			strnput(s.sym.Name, 8)
-		} else {
-			Lputl(0)
-			Lputl(uint32(s.strtbloff))
-		}
-
-		Lputl(uint32(s.value))
-		Wputl(uint16(s.sect))
-		if s.typ != 0 {
-			Wputl(s.typ)
-		} else if Linkmode == LinkExternal {
-			Wputl(0)
-		} else {
-			Wputl(0x0308) // "array of structs"
-		}
-		Cput(2) // storage class: external
-		Cput(0) // no aux entries
-	}
-
-	// put COFF string table
-	Lputl(uint32(len(strtbl)) + 4)
-
-	for i := 0; i < len(strtbl); i++ {
-		Cput(uint8(strtbl[i]))
-	}
-	if Linkmode != LinkExternal {
-		strnput("", int(h.SizeOfRawData-uint32(size)))
-	}
-}
-
-func setpersrc(sym *LSym) {
-	if rsrcsym != nil {
-		Diag("too many .rsrc sections")
-	}
-
-	rsrcsym = sym
-}
-
-func addpersrc() {
-	if rsrcsym == nil {
-		return
-	}
-
-	h := addpesection(".rsrc", int(rsrcsym.Size), int(rsrcsym.Size))
-	h.Characteristics = IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE | IMAGE_SCN_CNT_INITIALIZED_DATA
-	chksectoff(h, Cpos())
-
-	// relocation
-	var p []byte
-	var r *Reloc
-	var val uint32
-	for ri := 0; ri < len(rsrcsym.R); ri++ {
-		r = &rsrcsym.R[ri]
-		p = rsrcsym.P[r.Off:]
-		val = uint32(int64(h.VirtualAddress) + r.Add)
-
-		// 32-bit little-endian
-		p[0] = byte(val)
-
-		p[1] = byte(val >> 8)
-		p[2] = byte(val >> 16)
-		p[3] = byte(val >> 24)
-	}
-
-	Cwrite(rsrcsym.P)
-	strnput("", int(int64(h.SizeOfRawData)-rsrcsym.Size))
-
-	// update data directory
-	dd[IMAGE_DIRECTORY_ENTRY_RESOURCE].VirtualAddress = h.VirtualAddress
-
-	dd[IMAGE_DIRECTORY_ENTRY_RESOURCE].Size = h.VirtualSize
-}
-
-func Asmbpe() {
-	switch Thearch.Thechar {
-	default:
-		Exitf("unknown PE architecture: %v", Thearch.Thechar)
-	case '6':
-		fh.Machine = IMAGE_FILE_MACHINE_AMD64
-	case '8':
-		fh.Machine = IMAGE_FILE_MACHINE_I386
-	}
-
-	t := addpesection(".text", int(Segtext.Length), int(Segtext.Length))
-	t.Characteristics = IMAGE_SCN_CNT_CODE | IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_EXECUTE | IMAGE_SCN_MEM_READ
-	chksectseg(t, &Segtext)
-	textsect = pensect
-
-	var d *IMAGE_SECTION_HEADER
-	if Linkmode != LinkExternal {
-		d = addpesection(".data", int(Segdata.Length), int(Segdata.Filelen))
-		d.Characteristics = IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE
-		chksectseg(d, &Segdata)
-		datasect = pensect
-	} else {
-		d = addpesection(".data", int(Segdata.Filelen), int(Segdata.Filelen))
-		d.Characteristics = IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE | IMAGE_SCN_ALIGN_32BYTES
-		chksectseg(d, &Segdata)
-		datasect = pensect
-
-		b := addpesection(".bss", int(Segdata.Length-Segdata.Filelen), 0)
-		b.Characteristics = IMAGE_SCN_CNT_UNINITIALIZED_DATA | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE | IMAGE_SCN_ALIGN_32BYTES
-		b.PointerToRawData = 0
-		bsssect = pensect
-	}
-
-	if Debug['s'] == 0 {
-		dwarfaddpeheaders()
-	}
-
-	Cseek(int64(nextfileoff))
-	if Linkmode != LinkExternal {
-		addimports(d)
-		addexports()
-	}
-	addpesymtable()
-	addpersrc()
-	if Linkmode == LinkExternal {
-		peemitreloc(t, d)
-	}
-
-	fh.NumberOfSections = uint16(pensect)
-
-	// Being able to produce identical output for identical input is
-	// much more beneficial than having build timestamp in the header.
-	fh.TimeDateStamp = 0
-
-	if Linkmode == LinkExternal {
-		fh.Characteristics = IMAGE_FILE_LINE_NUMS_STRIPPED
-	} else {
-		fh.Characteristics = IMAGE_FILE_RELOCS_STRIPPED | IMAGE_FILE_EXECUTABLE_IMAGE | IMAGE_FILE_DEBUG_STRIPPED
-	}
-	if pe64 != 0 {
-		fh.SizeOfOptionalHeader = uint16(binary.Size(&oh64))
-		fh.Characteristics |= IMAGE_FILE_LARGE_ADDRESS_AWARE
-		oh64.Magic = 0x20b // PE32+
-	} else {
-		fh.SizeOfOptionalHeader = uint16(binary.Size(&oh))
-		fh.Characteristics |= IMAGE_FILE_32BIT_MACHINE
-		oh.Magic = 0x10b // PE32
-		oh.BaseOfData = d.VirtualAddress
-	}
-
-	// Fill out both oh64 and oh. We only use one. Oh well.
-	oh64.MajorLinkerVersion = 3
-
-	oh.MajorLinkerVersion = 3
-	oh64.MinorLinkerVersion = 0
-	oh.MinorLinkerVersion = 0
-	oh64.SizeOfCode = t.SizeOfRawData
-	oh.SizeOfCode = t.SizeOfRawData
-	oh64.SizeOfInitializedData = d.SizeOfRawData
-	oh.SizeOfInitializedData = d.SizeOfRawData
-	oh64.SizeOfUninitializedData = 0
-	oh.SizeOfUninitializedData = 0
-	if Linkmode != LinkExternal {
-		oh64.AddressOfEntryPoint = uint32(Entryvalue() - PEBASE)
-		oh.AddressOfEntryPoint = uint32(Entryvalue() - PEBASE)
-	}
-	oh64.BaseOfCode = t.VirtualAddress
-	oh.BaseOfCode = t.VirtualAddress
-	oh64.ImageBase = PEBASE
-	oh.ImageBase = PEBASE
-	oh64.SectionAlignment = PESECTALIGN
-	oh.SectionAlignment = PESECTALIGN
-	oh64.FileAlignment = PEFILEALIGN
-	oh.FileAlignment = PEFILEALIGN
-	oh64.MajorOperatingSystemVersion = 4
-	oh.MajorOperatingSystemVersion = 4
-	oh64.MinorOperatingSystemVersion = 0
-	oh.MinorOperatingSystemVersion = 0
-	oh64.MajorImageVersion = 1
-	oh.MajorImageVersion = 1
-	oh64.MinorImageVersion = 0
-	oh.MinorImageVersion = 0
-	oh64.MajorSubsystemVersion = 4
-	oh.MajorSubsystemVersion = 4
-	oh64.MinorSubsystemVersion = 0
-	oh.MinorSubsystemVersion = 0
-	oh64.SizeOfImage = uint32(nextsectoff)
-	oh.SizeOfImage = uint32(nextsectoff)
-	oh64.SizeOfHeaders = uint32(PEFILEHEADR)
-	oh.SizeOfHeaders = uint32(PEFILEHEADR)
-	if headstring == "windowsgui" {
-		oh64.Subsystem = IMAGE_SUBSYSTEM_WINDOWS_GUI
-		oh.Subsystem = IMAGE_SUBSYSTEM_WINDOWS_GUI
-	} else {
-		oh64.Subsystem = IMAGE_SUBSYSTEM_WINDOWS_CUI
-		oh.Subsystem = IMAGE_SUBSYSTEM_WINDOWS_CUI
-	}
-
-	// Disable stack growth as we don't want Windows to
-	// fiddle with the thread stack limits, which we set
-	// ourselves to circumvent the stack checks in the
-	// Windows exception dispatcher.
-	// Commit size must be strictly less than reserve
-	// size otherwise reserve will be rounded up to a
-	// larger size, as verified with VMMap.
-
-	// Go code would be OK with 64k stacks, but we need larger stacks for cgo.
-	// That default stack reserve size affects only the main thread,
-	// for other threads we specify stack size in runtime explicitly
-	// (runtime knows whether cgo is enabled or not).
-	// If you change stack reserve sizes here,
-	// change STACKSIZE in runtime/cgo/gcc_windows_{386,amd64}.c and correspondent
-	// CreateThread parameter in runtime.newosproc as well.
-	if !iscgo {
-		oh64.SizeOfStackReserve = 0x00020000
-		oh.SizeOfStackReserve = 0x00020000
-		oh64.SizeOfStackCommit = 0x00001000
-		oh.SizeOfStackCommit = 0x00001000
-	} else {
-		oh64.SizeOfStackReserve = 0x00200000
-		oh.SizeOfStackReserve = 0x00100000
-
-		// account for 2 guard pages
-		oh64.SizeOfStackCommit = 0x00200000 - 0x2000
-
-		oh.SizeOfStackCommit = 0x00100000 - 0x2000
-	}
-
-	oh64.SizeOfHeapReserve = 0x00100000
-	oh.SizeOfHeapReserve = 0x00100000
-	oh64.SizeOfHeapCommit = 0x00001000
-	oh.SizeOfHeapCommit = 0x00001000
-	oh64.NumberOfRvaAndSizes = 16
-	oh.NumberOfRvaAndSizes = 16
-
-	pewrite()
-}
diff --git a/src/cmd/link/internal/ld/pobj.go b/src/cmd/link/internal/ld/pobj.go
deleted file mode 100644
index 5ce1977..0000000
--- a/src/cmd/link/internal/ld/pobj.go
+++ /dev/null
@@ -1,259 +0,0 @@
-// Inferno utils/6l/obj.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6l/obj.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package ld
-
-import (
-	"cmd/internal/obj"
-	"flag"
-	"fmt"
-	"os"
-	"strings"
-)
-
-var (
-	pkglistfornote []byte
-	buildid        string
-)
-
-func Ldmain() {
-	Ctxt = linknew(Thelinkarch)
-	Ctxt.Thechar = int32(Thearch.Thechar)
-	Ctxt.Thestring = Thestring
-	Ctxt.Diag = Diag
-	Ctxt.Bso = &Bso
-
-	Bso = *obj.Binitw(os.Stdout)
-	Debug = [128]int{}
-	nerrors = 0
-	outfile = ""
-	HEADTYPE = -1
-	INITTEXT = -1
-	INITDAT = -1
-	INITRND = -1
-	INITENTRY = ""
-	Linkmode = LinkAuto
-
-	// For testing behavior of go command when tools crash silently.
-	// Undocumented, not in standard flag parser to avoid
-	// exposing in usage message.
-	for _, arg := range os.Args {
-		if arg == "-crash_for_testing" {
-			os.Exit(2)
-		}
-	}
-
-	if Thearch.Thechar == '6' && obj.Getgoos() == "plan9" {
-		obj.Flagcount("8", "use 64-bit addresses in symbol table", &Debug['8'])
-	}
-	obj.Flagfn1("B", "add an ELF NT_GNU_BUILD_ID `note` when using ELF", addbuildinfo)
-	obj.Flagcount("C", "check Go calls to C code", &Debug['C'])
-	obj.Flagint64("D", "set data segment `address`", &INITDAT)
-	obj.Flagstr("E", "set `entry` symbol name", &INITENTRY)
-	obj.Flagfn1("I", "use `linker` as ELF dynamic linker", setinterp)
-	obj.Flagfn1("L", "add specified `directory` to library path", Lflag)
-	obj.Flagfn1("H", "set header `type`", setheadtype)
-	obj.Flagint32("R", "set address rounding `quantum`", &INITRND)
-	obj.Flagint64("T", "set text segment `address`", &INITTEXT)
-	obj.Flagfn0("V", "print version and exit", doversion)
-	obj.Flagcount("W", "disassemble input", &Debug['W'])
-	obj.Flagfn1("X", "add string value `definition` of the form importpath.name=value", addstrdata1)
-	obj.Flagcount("a", "disassemble output", &Debug['a'])
-	obj.Flagstr("buildid", "record `id` as Go toolchain build id", &buildid)
-	flag.Var(&Buildmode, "buildmode", "set build `mode`")
-	obj.Flagcount("c", "dump call graph", &Debug['c'])
-	obj.Flagcount("d", "disable dynamic executable", &Debug['d'])
-	obj.Flagstr("extld", "use `linker` when linking in external mode", &extld)
-	obj.Flagstr("extldflags", "pass `flags` to external linker", &extldflags)
-	obj.Flagcount("f", "ignore version mismatch", &Debug['f'])
-	obj.Flagcount("g", "disable go package data checks", &Debug['g'])
-	obj.Flagcount("h", "halt on error", &Debug['h'])
-	obj.Flagstr("installsuffix", "set package directory `suffix`", &flag_installsuffix)
-	obj.Flagstr("k", "set field tracking `symbol`", &tracksym)
-	obj.Flagfn1("linkmode", "set link `mode` (internal, external, auto)", setlinkmode)
-	flag.BoolVar(&Linkshared, "linkshared", false, "link against installed Go shared libraries")
-	obj.Flagcount("n", "dump symbol table", &Debug['n'])
-	obj.Flagstr("o", "write output to `file`", &outfile)
-	flag.Var(&rpath, "r", "set the ELF dynamic linker search `path` to dir1:dir2:...")
-	obj.Flagcount("race", "enable race detector", &flag_race)
-	obj.Flagcount("s", "disable symbol table", &Debug['s'])
-	var flagShared int
-	if Thearch.Thechar == '5' || Thearch.Thechar == '6' {
-		obj.Flagcount("shared", "generate shared object (implies -linkmode external)", &flagShared)
-	}
-	obj.Flagstr("tmpdir", "use `directory` for temporary files", &tmpdir)
-	obj.Flagcount("u", "reject unsafe packages", &Debug['u'])
-	obj.Flagcount("v", "print link trace", &Debug['v'])
-	obj.Flagcount("w", "disable DWARF generation", &Debug['w'])
-
-	obj.Flagstr("cpuprofile", "write cpu profile to `file`", &cpuprofile)
-	obj.Flagstr("memprofile", "write memory profile to `file`", &memprofile)
-	obj.Flagint64("memprofilerate", "set runtime.MemProfileRate to `rate`", &memprofilerate)
-
-	// Clumsy hack to preserve old two-argument -X name val syntax for old scripts.
-	// Rewrite that syntax into new syntax -X name=val.
-	// TODO(rsc): Delete this hack in Go 1.6 or later.
-	var args []string
-	for i := 0; i < len(os.Args); i++ {
-		arg := os.Args[i]
-		if (arg == "-X" || arg == "--X") && i+2 < len(os.Args) && !strings.Contains(os.Args[i+1], "=") {
-			fmt.Fprintf(os.Stderr, "link: warning: option %s %s %s may not work in future releases; use %s %s=%s\n",
-				arg, os.Args[i+1], os.Args[i+2],
-				arg, os.Args[i+1], os.Args[i+2])
-			args = append(args, arg)
-			args = append(args, os.Args[i+1]+"="+os.Args[i+2])
-			i += 2
-			continue
-		}
-		if (strings.HasPrefix(arg, "-X=") || strings.HasPrefix(arg, "--X=")) && i+1 < len(os.Args) && strings.Count(arg, "=") == 1 {
-			fmt.Fprintf(os.Stderr, "link: warning: option %s %s may not work in future releases; use %s=%s\n",
-				arg, os.Args[i+1],
-				arg, os.Args[i+1])
-			args = append(args, arg+"="+os.Args[i+1])
-			i++
-			continue
-		}
-		args = append(args, arg)
-	}
-	os.Args = args
-
-	obj.Flagparse(usage)
-
-	startProfile()
-	Ctxt.Bso = &Bso
-	Ctxt.Debugvlog = int32(Debug['v'])
-	if flagShared != 0 {
-		if Buildmode == BuildmodeUnset {
-			Buildmode = BuildmodeCShared
-		} else if Buildmode != BuildmodeCShared {
-			Exitf("-shared and -buildmode=%s are incompatible", Buildmode.String())
-		}
-	}
-	if Buildmode == BuildmodeUnset {
-		Buildmode = BuildmodeExe
-	}
-
-	if Buildmode != BuildmodeShared && flag.NArg() != 1 {
-		usage()
-	}
-
-	if outfile == "" {
-		outfile = "a.out"
-		if HEADTYPE == obj.Hwindows {
-			outfile += ".exe"
-		}
-	}
-
-	libinit() // creates outfile
-
-	if HEADTYPE == -1 {
-		HEADTYPE = int32(headtype(goos))
-	}
-	Ctxt.Headtype = int(HEADTYPE)
-	if headstring == "" {
-		headstring = Headstr(int(HEADTYPE))
-	}
-
-	Thearch.Archinit()
-
-	if Linkshared && !Iself {
-		Exitf("-linkshared can only be used on elf systems")
-	}
-
-	if Debug['v'] != 0 {
-		fmt.Fprintf(&Bso, "HEADER = -H%d -T0x%x -D0x%x -R0x%x\n", HEADTYPE, uint64(INITTEXT), uint64(INITDAT), uint32(INITRND))
-	}
-	Bso.Flush()
-
-	if Buildmode == BuildmodeShared {
-		for i := 0; i < flag.NArg(); i++ {
-			arg := flag.Arg(i)
-			parts := strings.SplitN(arg, "=", 2)
-			var pkgpath, file string
-			if len(parts) == 1 {
-				pkgpath, file = "main", arg
-			} else {
-				pkgpath, file = parts[0], parts[1]
-			}
-			pkglistfornote = append(pkglistfornote, pkgpath...)
-			pkglistfornote = append(pkglistfornote, '\n')
-			addlibpath(Ctxt, "command line", "command line", file, pkgpath, "")
-		}
-	} else {
-		addlibpath(Ctxt, "command line", "command line", flag.Arg(0), "main", "")
-	}
-	loadlib()
-
-	if Thearch.Thechar == '5' {
-		// mark some functions that are only referenced after linker code editing
-		if Ctxt.Goarm == 5 {
-			mark(Linkrlookup(Ctxt, "_sfloat", 0))
-		}
-		mark(Linklookup(Ctxt, "runtime.read_tls_fallback", 0))
-	}
-
-	checkgo()
-	checkstrdata()
-	deadcode()
-	callgraph()
-
-	doelf()
-	if HEADTYPE == obj.Hdarwin {
-		domacho()
-	}
-	dostkcheck()
-	if HEADTYPE == obj.Hwindows {
-		dope()
-	}
-	addexport()
-	Thearch.Gentext() // trampolines, call stubs, etc.
-	textbuildid()
-	textaddress()
-	pclntab()
-	findfunctab()
-	symtab()
-	dodata()
-	address()
-	doweak()
-	reloc()
-	Thearch.Asmb()
-	undef()
-	hostlink()
-	archive()
-	if Debug['v'] != 0 {
-		fmt.Fprintf(&Bso, "%5.2f cpu time\n", obj.Cputime())
-		fmt.Fprintf(&Bso, "%d symbols\n", Ctxt.Nsymbol)
-		fmt.Fprintf(&Bso, "%d liveness data\n", liveness)
-	}
-
-	Bso.Flush()
-
-	errorexit()
-}
diff --git a/src/cmd/link/internal/ld/sym.go b/src/cmd/link/internal/ld/sym.go
deleted file mode 100644
index 652109d..0000000
--- a/src/cmd/link/internal/ld/sym.go
+++ /dev/null
@@ -1,227 +0,0 @@
-// Derived from Inferno utils/6l/obj.c and utils/6l/span.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6l/obj.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6l/span.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package ld
-
-import (
-	"cmd/internal/obj"
-	"log"
-	"os"
-	"path/filepath"
-	"strconv"
-)
-
-func yy_isalpha(c int) bool {
-	return 'A' <= c && c <= 'Z' || 'a' <= c && c <= 'z'
-}
-
-var headers = []struct {
-	name string
-	val  int
-}{
-	{"darwin", obj.Hdarwin},
-	{"dragonfly", obj.Hdragonfly},
-	{"elf", obj.Helf},
-	{"freebsd", obj.Hfreebsd},
-	{"linux", obj.Hlinux},
-	{"android", obj.Hlinux}, // must be after "linux" entry or else headstr(Hlinux) == "android"
-	{"nacl", obj.Hnacl},
-	{"netbsd", obj.Hnetbsd},
-	{"openbsd", obj.Hopenbsd},
-	{"plan9", obj.Hplan9},
-	{"solaris", obj.Hsolaris},
-	{"windows", obj.Hwindows},
-	{"windowsgui", obj.Hwindows},
-}
-
-func linknew(arch *LinkArch) *Link {
-	ctxt := new(Link)
-	ctxt.Hash = make(map[symVer]*LSym)
-	ctxt.Arch = arch
-	ctxt.Version = obj.HistVersion
-	ctxt.Goroot = obj.Getgoroot()
-
-	p := obj.Getgoarch()
-	if p != arch.Name {
-		log.Fatalf("invalid goarch %s (want %s)", p, arch.Name)
-	}
-
-	var buf string
-	buf, _ = os.Getwd()
-	if buf == "" {
-		buf = "/???"
-	}
-	buf = filepath.ToSlash(buf)
-
-	ctxt.Headtype = headtype(obj.Getgoos())
-	if ctxt.Headtype < 0 {
-		log.Fatalf("unknown goos %s", obj.Getgoos())
-	}
-
-	// Record thread-local storage offset.
-	// TODO(rsc): Move tlsoffset back into the linker.
-	switch ctxt.Headtype {
-	default:
-		log.Fatalf("unknown thread-local storage offset for %s", Headstr(ctxt.Headtype))
-
-	case obj.Hplan9, obj.Hwindows:
-		break
-
-		/*
-		 * ELF uses TLS offset negative from FS.
-		 * Translate 0(FS) and 8(FS) into -16(FS) and -8(FS).
-		 * Known to low-level assembly in package runtime and runtime/cgo.
-		 */
-	case obj.Hlinux,
-		obj.Hfreebsd,
-		obj.Hnetbsd,
-		obj.Hopenbsd,
-		obj.Hdragonfly,
-		obj.Hsolaris:
-		ctxt.Tlsoffset = -1 * ctxt.Arch.Ptrsize
-
-	case obj.Hnacl:
-		switch ctxt.Arch.Thechar {
-		default:
-			log.Fatalf("unknown thread-local storage offset for nacl/%s", ctxt.Arch.Name)
-
-		case '5':
-			ctxt.Tlsoffset = 0
-
-		case '6':
-			ctxt.Tlsoffset = 0
-
-		case '8':
-			ctxt.Tlsoffset = -8
-		}
-
-		/*
-		 * OS X system constants - offset from 0(GS) to our TLS.
-		 * Explained in ../../runtime/cgo/gcc_darwin_*.c.
-		 */
-	case obj.Hdarwin:
-		switch ctxt.Arch.Thechar {
-		default:
-			log.Fatalf("unknown thread-local storage offset for darwin/%s", ctxt.Arch.Name)
-
-		case '5':
-			ctxt.Tlsoffset = 0 // dummy value, not needed
-
-		case '6':
-			ctxt.Tlsoffset = 0x8a0
-
-		case '7':
-			ctxt.Tlsoffset = 0 // dummy value, not needed
-
-		case '8':
-			ctxt.Tlsoffset = 0x468
-		}
-	}
-
-	// On arm, record goarm.
-	if ctxt.Arch.Thechar == '5' {
-		p := obj.Getgoarm()
-		if p != "" {
-			ctxt.Goarm = int32(obj.Atoi(p))
-		} else {
-			ctxt.Goarm = 6
-		}
-	}
-
-	return ctxt
-}
-
-func linknewsym(ctxt *Link, symb string, v int) *LSym {
-	s := new(LSym)
-	*s = LSym{}
-
-	s.Dynid = -1
-	s.Plt = -1
-	s.Got = -1
-	s.Name = symb
-	s.Type = 0
-	s.Version = int16(v)
-	s.Value = 0
-	s.Size = 0
-	ctxt.Nsymbol++
-
-	s.Allsym = ctxt.Allsym
-	ctxt.Allsym = s
-
-	return s
-}
-
-type symVer struct {
-	sym string
-	ver int
-}
-
-func _lookup(ctxt *Link, symb string, v int, creat int) *LSym {
-	s := ctxt.Hash[symVer{symb, v}]
-	if s != nil {
-		return s
-	}
-	if creat == 0 {
-		return nil
-	}
-
-	s = linknewsym(ctxt, symb, v)
-	s.Extname = s.Name
-	ctxt.Hash[symVer{symb, v}] = s
-	return s
-}
-
-func Linklookup(ctxt *Link, name string, v int) *LSym {
-	return _lookup(ctxt, name, v, 1)
-}
-
-// read-only lookup
-func Linkrlookup(ctxt *Link, name string, v int) *LSym {
-	return _lookup(ctxt, name, v, 0)
-}
-
-func Headstr(v int) string {
-	for i := 0; i < len(headers); i++ {
-		if v == headers[i].val {
-			return headers[i].name
-		}
-	}
-	return strconv.Itoa(v)
-}
-
-func headtype(name string) int {
-	for i := 0; i < len(headers); i++ {
-		if name == headers[i].name {
-			return headers[i].val
-		}
-	}
-	return -1
-}
diff --git a/src/cmd/link/internal/ld/symtab.go b/src/cmd/link/internal/ld/symtab.go
deleted file mode 100644
index 5360ec1..0000000
--- a/src/cmd/link/internal/ld/symtab.go
+++ /dev/null
@@ -1,541 +0,0 @@
-// Inferno utils/6l/span.c
-// http://code.google.com/p/inferno-os/source/browse/utils/6l/span.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package ld
-
-import (
-	"cmd/internal/obj"
-	"fmt"
-	"path/filepath"
-	"strings"
-)
-
-// Symbol table.
-
-func putelfstr(s string) int {
-	if len(Elfstrdat) == 0 && s != "" {
-		// first entry must be empty string
-		putelfstr("")
-	}
-
-	// When dynamically linking, we create LSym's by reading the names from
-	// the symbol tables of the shared libraries and so the names need to
-	// match exactly.  Tools like DTrace will have to wait for now.
-	if !DynlinkingGo() {
-		// Rewrite · to . for ASCII-only tools like DTrace (sigh)
-		s = strings.Replace(s, "·", ".", -1)
-	}
-
-	n := len(s) + 1
-	for len(Elfstrdat)+n > cap(Elfstrdat) {
-		Elfstrdat = append(Elfstrdat[:cap(Elfstrdat)], 0)[:len(Elfstrdat)]
-	}
-
-	off := len(Elfstrdat)
-	Elfstrdat = Elfstrdat[:off+n]
-	copy(Elfstrdat[off:], s)
-
-	return off
-}
-
-func putelfsyment(off int, addr int64, size int64, info int, shndx int, other int) {
-	switch Thearch.Thechar {
-	case '6', '7', '9':
-		Thearch.Lput(uint32(off))
-		Cput(uint8(info))
-		Cput(uint8(other))
-		Thearch.Wput(uint16(shndx))
-		Thearch.Vput(uint64(addr))
-		Thearch.Vput(uint64(size))
-		Symsize += ELF64SYMSIZE
-
-	default:
-		Thearch.Lput(uint32(off))
-		Thearch.Lput(uint32(addr))
-		Thearch.Lput(uint32(size))
-		Cput(uint8(info))
-		Cput(uint8(other))
-		Thearch.Wput(uint16(shndx))
-		Symsize += ELF32SYMSIZE
-	}
-}
-
-var numelfsym int = 1 // 0 is reserved
-
-var elfbind int
-
-func putelfsym(x *LSym, s string, t int, addr int64, size int64, ver int, go_ *LSym) {
-	var type_ int
-
-	switch t {
-	default:
-		return
-
-	case 'T':
-		type_ = STT_FUNC
-
-	case 'D':
-		type_ = STT_OBJECT
-
-	case 'B':
-		type_ = STT_OBJECT
-
-	case 'U':
-		// ElfType is only set for symbols read from Go shared libraries, but
-		// for other symbols it is left as STT_NOTYPE which is fine.
-		type_ = int(x.ElfType)
-
-	case 't':
-		type_ = STT_TLS
-	}
-
-	xo := x
-	for xo.Outer != nil {
-		xo = xo.Outer
-	}
-
-	var elfshnum int
-	if xo.Type == obj.SDYNIMPORT || xo.Type == obj.SHOSTOBJ {
-		elfshnum = SHN_UNDEF
-	} else {
-		if xo.Sect == nil {
-			Ctxt.Cursym = x
-			Diag("missing section in putelfsym")
-			return
-		}
-		if xo.Sect.Elfsect == nil {
-			Ctxt.Cursym = x
-			Diag("missing ELF section in putelfsym")
-			return
-		}
-		elfshnum = xo.Sect.Elfsect.shnum
-	}
-
-	// One pass for each binding: STB_LOCAL, STB_GLOBAL,
-	// maybe one day STB_WEAK.
-	bind := STB_GLOBAL
-
-	if ver != 0 || (x.Type&obj.SHIDDEN != 0) || x.Local {
-		bind = STB_LOCAL
-	}
-
-	// In external linking mode, we have to invoke gcc with -rdynamic
-	// to get the exported symbols put into the dynamic symbol table.
-	// To avoid filling the dynamic table with lots of unnecessary symbols,
-	// mark all Go symbols local (not global) in the final executable.
-	// But when we're dynamically linking, we need all those global symbols.
-	if !DynlinkingGo() && Linkmode == LinkExternal && x.Cgoexport&CgoExportStatic == 0 && elfshnum != SHN_UNDEF {
-		bind = STB_LOCAL
-	}
-
-	if bind != elfbind {
-		return
-	}
-
-	off := putelfstr(s)
-	if Linkmode == LinkExternal && elfshnum != SHN_UNDEF {
-		addr -= int64(xo.Sect.Vaddr)
-	}
-	other := STV_DEFAULT
-	if x.Type&obj.SHIDDEN != 0 {
-		other = STV_HIDDEN
-	}
-	putelfsyment(off, addr, size, bind<<4|type_&0xf, elfshnum, other)
-	x.Elfsym = int32(numelfsym)
-	numelfsym++
-}
-
-func putelfsectionsym(s *LSym, shndx int) {
-	putelfsyment(0, 0, 0, STB_LOCAL<<4|STT_SECTION, shndx, 0)
-	s.Elfsym = int32(numelfsym)
-	numelfsym++
-}
-
-func putelfsymshndx(sympos int64, shndx int) {
-	here := Cpos()
-	if elf64 {
-		Cseek(sympos + 6)
-	} else {
-		Cseek(sympos + 14)
-	}
-
-	Thearch.Wput(uint16(shndx))
-	Cseek(here)
-}
-
-func Asmelfsym() {
-	// the first symbol entry is reserved
-	putelfsyment(0, 0, 0, STB_LOCAL<<4|STT_NOTYPE, 0, 0)
-
-	dwarfaddelfsectionsyms()
-
-	elfbind = STB_LOCAL
-	genasmsym(putelfsym)
-
-	elfbind = STB_GLOBAL
-	elfglobalsymndx = numelfsym
-	genasmsym(putelfsym)
-}
-
-func putplan9sym(x *LSym, s string, t int, addr int64, size int64, ver int, go_ *LSym) {
-	switch t {
-	case 'T', 'L', 'D', 'B':
-		if ver != 0 {
-			t += 'a' - 'A'
-		}
-		fallthrough
-
-	case 'a',
-		'p',
-		'f',
-		'z',
-		'Z',
-		'm':
-		l := 4
-		if HEADTYPE == obj.Hplan9 && Thearch.Thechar == '6' && Debug['8'] == 0 {
-			Lputb(uint32(addr >> 32))
-			l = 8
-		}
-
-		Lputb(uint32(addr))
-		Cput(uint8(t + 0x80)) /* 0x80 is variable length */
-
-		var i int
-		if t == 'z' || t == 'Z' {
-			Cput(uint8(s[0]))
-			for i = 1; s[i] != 0 || s[i+1] != 0; i += 2 {
-				Cput(uint8(s[i]))
-				Cput(uint8(s[i+1]))
-			}
-
-			Cput(0)
-			Cput(0)
-			i++
-		} else {
-			/* skip the '<' in filenames */
-			if t == 'f' {
-				s = s[1:]
-			}
-			for i = 0; i < len(s); i++ {
-				Cput(uint8(s[i]))
-			}
-			Cput(0)
-		}
-
-		Symsize += int32(l) + 1 + int32(i) + 1
-
-	default:
-		return
-	}
-}
-
-func Asmplan9sym() {
-	genasmsym(putplan9sym)
-}
-
-var symt *LSym
-
-func Wputl(w uint16) {
-	Cput(uint8(w))
-	Cput(uint8(w >> 8))
-}
-
-func Wputb(w uint16) {
-	Cput(uint8(w >> 8))
-	Cput(uint8(w))
-}
-
-func Lputb(l uint32) {
-	Cput(uint8(l >> 24))
-	Cput(uint8(l >> 16))
-	Cput(uint8(l >> 8))
-	Cput(uint8(l))
-}
-
-func Lputl(l uint32) {
-	Cput(uint8(l))
-	Cput(uint8(l >> 8))
-	Cput(uint8(l >> 16))
-	Cput(uint8(l >> 24))
-}
-
-func Vputb(v uint64) {
-	Lputb(uint32(v >> 32))
-	Lputb(uint32(v))
-}
-
-func Vputl(v uint64) {
-	Lputl(uint32(v))
-	Lputl(uint32(v >> 32))
-}
-
-type byPkg []*Library
-
-func (libs byPkg) Len() int {
-	return len(libs)
-}
-
-func (libs byPkg) Less(a, b int) bool {
-	return libs[a].Pkg < libs[b].Pkg
-}
-
-func (libs byPkg) Swap(a, b int) {
-	libs[a], libs[b] = libs[b], libs[a]
-}
-
-func symtab() {
-	dosymtype()
-
-	// Define these so that they'll get put into the symbol table.
-	// data.c:/^address will provide the actual values.
-	xdefine("runtime.text", obj.STEXT, 0)
-
-	xdefine("runtime.etext", obj.STEXT, 0)
-	xdefine("runtime.typelink", obj.SRODATA, 0)
-	xdefine("runtime.etypelink", obj.SRODATA, 0)
-	xdefine("runtime.rodata", obj.SRODATA, 0)
-	xdefine("runtime.erodata", obj.SRODATA, 0)
-	xdefine("runtime.noptrdata", obj.SNOPTRDATA, 0)
-	xdefine("runtime.enoptrdata", obj.SNOPTRDATA, 0)
-	xdefine("runtime.data", obj.SDATA, 0)
-	xdefine("runtime.edata", obj.SDATA, 0)
-	xdefine("runtime.bss", obj.SBSS, 0)
-	xdefine("runtime.ebss", obj.SBSS, 0)
-	xdefine("runtime.noptrbss", obj.SNOPTRBSS, 0)
-	xdefine("runtime.enoptrbss", obj.SNOPTRBSS, 0)
-	xdefine("runtime.end", obj.SBSS, 0)
-	xdefine("runtime.epclntab", obj.SRODATA, 0)
-	xdefine("runtime.esymtab", obj.SRODATA, 0)
-
-	// garbage collection symbols
-	s := Linklookup(Ctxt, "runtime.gcdata", 0)
-
-	s.Type = obj.SRODATA
-	s.Size = 0
-	s.Reachable = true
-	xdefine("runtime.egcdata", obj.SRODATA, 0)
-
-	s = Linklookup(Ctxt, "runtime.gcbss", 0)
-	s.Type = obj.SRODATA
-	s.Size = 0
-	s.Reachable = true
-	xdefine("runtime.egcbss", obj.SRODATA, 0)
-
-	// pseudo-symbols to mark locations of type, string, and go string data.
-	var symtype *LSym
-	if !DynlinkingGo() {
-		s = Linklookup(Ctxt, "type.*", 0)
-
-		s.Type = obj.STYPE
-		s.Size = 0
-		s.Reachable = true
-		symtype = s
-	}
-
-	s = Linklookup(Ctxt, "go.string.*", 0)
-	s.Type = obj.SGOSTRING
-	s.Local = true
-	s.Size = 0
-	s.Reachable = true
-	symgostring := s
-
-	s = Linklookup(Ctxt, "go.func.*", 0)
-	s.Type = obj.SGOFUNC
-	s.Local = true
-	s.Size = 0
-	s.Reachable = true
-	symgofunc := s
-
-	s = Linklookup(Ctxt, "runtime.gcbits.*", 0)
-	s.Type = obj.SGCBITS
-	s.Local = true
-	s.Size = 0
-	s.Reachable = true
-	symgcbits := s
-
-	symtypelink := Linklookup(Ctxt, "runtime.typelink", 0)
-
-	symt = Linklookup(Ctxt, "runtime.symtab", 0)
-	symt.Local = true
-	symt.Type = obj.SSYMTAB
-	symt.Size = 0
-	symt.Reachable = true
-
-	ntypelinks := 0
-
-	// assign specific types so that they sort together.
-	// within a type they sort by size, so the .* symbols
-	// just defined above will be first.
-	// hide the specific symbols.
-	for s := Ctxt.Allsym; s != nil; s = s.Allsym {
-		if !s.Reachable || s.Special != 0 || s.Type != obj.SRODATA {
-			continue
-		}
-
-		if strings.HasPrefix(s.Name, "type.") && !DynlinkingGo() {
-			s.Type = obj.STYPE
-			s.Hide = 1
-			s.Outer = symtype
-		}
-
-		if strings.HasPrefix(s.Name, "go.typelink.") {
-			ntypelinks++
-			s.Type = obj.STYPELINK
-			s.Hide = 1
-			s.Outer = symtypelink
-		}
-
-		if strings.HasPrefix(s.Name, "go.string.") {
-			s.Type = obj.SGOSTRING
-			s.Hide = 1
-			s.Outer = symgostring
-		}
-
-		if strings.HasPrefix(s.Name, "runtime.gcbits.") {
-			s.Type = obj.SGCBITS
-			s.Hide = 1
-			s.Outer = symgcbits
-		}
-
-		if strings.HasPrefix(s.Name, "go.func.") {
-			s.Type = obj.SGOFUNC
-			s.Hide = 1
-			s.Outer = symgofunc
-		}
-
-		if strings.HasPrefix(s.Name, "gcargs.") || strings.HasPrefix(s.Name, "gclocals.") || strings.HasPrefix(s.Name, "gclocals·") {
-			s.Type = obj.SGOFUNC
-			s.Hide = 1
-			s.Outer = symgofunc
-			s.Align = 4
-			liveness += (s.Size + int64(s.Align) - 1) &^ (int64(s.Align) - 1)
-		}
-	}
-
-	if Buildmode == BuildmodeShared {
-		abihashgostr := Linklookup(Ctxt, "go.link.abihash."+filepath.Base(outfile), 0)
-		abihashgostr.Reachable = true
-		abihashgostr.Type = obj.SRODATA
-		hashsym := Linklookup(Ctxt, "go.link.abihashbytes", 0)
-		Addaddr(Ctxt, abihashgostr, hashsym)
-		adduint(Ctxt, abihashgostr, uint64(hashsym.Size))
-	}
-
-	// Information about the layout of the executable image for the
-	// runtime to use. Any changes here must be matched by changes to
-	// the definition of moduledata in runtime/symtab.go.
-	// This code uses several global variables that are set by pcln.go:pclntab.
-	moduledata := Linklookup(Ctxt, "runtime.firstmoduledata", 0)
-	moduledata.Type = obj.SNOPTRDATA
-	moduledata.Size = 0 // truncate symbol back to 0 bytes to reinitialize
-	moduledata.Reachable = true
-	moduledata.Local = true
-	// The pclntab slice
-	Addaddr(Ctxt, moduledata, Linklookup(Ctxt, "runtime.pclntab", 0))
-	adduint(Ctxt, moduledata, uint64(Linklookup(Ctxt, "runtime.pclntab", 0).Size))
-	adduint(Ctxt, moduledata, uint64(Linklookup(Ctxt, "runtime.pclntab", 0).Size))
-	// The ftab slice
-	Addaddrplus(Ctxt, moduledata, Linklookup(Ctxt, "runtime.pclntab", 0), int64(pclntabPclntabOffset))
-	adduint(Ctxt, moduledata, uint64(pclntabNfunc+1))
-	adduint(Ctxt, moduledata, uint64(pclntabNfunc+1))
-	// The filetab slice
-	Addaddrplus(Ctxt, moduledata, Linklookup(Ctxt, "runtime.pclntab", 0), int64(pclntabFiletabOffset))
-	adduint(Ctxt, moduledata, uint64(Ctxt.Nhistfile))
-	adduint(Ctxt, moduledata, uint64(Ctxt.Nhistfile))
-	// findfunctab
-	Addaddr(Ctxt, moduledata, Linklookup(Ctxt, "runtime.findfunctab", 0))
-	// minpc, maxpc
-	Addaddr(Ctxt, moduledata, pclntabFirstFunc)
-	Addaddrplus(Ctxt, moduledata, pclntabLastFunc, pclntabLastFunc.Size)
-	// pointers to specific parts of the module
-	Addaddr(Ctxt, moduledata, Linklookup(Ctxt, "runtime.text", 0))
-	Addaddr(Ctxt, moduledata, Linklookup(Ctxt, "runtime.etext", 0))
-	Addaddr(Ctxt, moduledata, Linklookup(Ctxt, "runtime.noptrdata", 0))
-	Addaddr(Ctxt, moduledata, Linklookup(Ctxt, "runtime.enoptrdata", 0))
-	Addaddr(Ctxt, moduledata, Linklookup(Ctxt, "runtime.data", 0))
-	Addaddr(Ctxt, moduledata, Linklookup(Ctxt, "runtime.edata", 0))
-	Addaddr(Ctxt, moduledata, Linklookup(Ctxt, "runtime.bss", 0))
-	Addaddr(Ctxt, moduledata, Linklookup(Ctxt, "runtime.ebss", 0))
-	Addaddr(Ctxt, moduledata, Linklookup(Ctxt, "runtime.noptrbss", 0))
-	Addaddr(Ctxt, moduledata, Linklookup(Ctxt, "runtime.enoptrbss", 0))
-	Addaddr(Ctxt, moduledata, Linklookup(Ctxt, "runtime.end", 0))
-	Addaddr(Ctxt, moduledata, Linklookup(Ctxt, "runtime.gcdata", 0))
-	Addaddr(Ctxt, moduledata, Linklookup(Ctxt, "runtime.gcbss", 0))
-	// The typelinks slice
-	Addaddr(Ctxt, moduledata, Linklookup(Ctxt, "runtime.typelink", 0))
-	adduint(Ctxt, moduledata, uint64(ntypelinks))
-	adduint(Ctxt, moduledata, uint64(ntypelinks))
-	if len(Ctxt.Shlibs) > 0 {
-		thismodulename := filepath.Base(outfile)
-		if Buildmode == BuildmodeExe {
-			// When linking an executable, outfile is just "a.out". Make
-			// it something slightly more comprehensible.
-			thismodulename = "the executable"
-		}
-		addgostring(moduledata, "go.link.thismodulename", thismodulename)
-
-		modulehashes := Linklookup(Ctxt, "go.link.abihashes", 0)
-		modulehashes.Reachable = true
-		modulehashes.Local = true
-		modulehashes.Type = obj.SRODATA
-
-		for i, shlib := range Ctxt.Shlibs {
-			// modulehashes[i].modulename
-			modulename := filepath.Base(shlib.Path)
-			addgostring(modulehashes, fmt.Sprintf("go.link.libname.%d", i), modulename)
-
-			// modulehashes[i].linktimehash
-			addgostring(modulehashes, fmt.Sprintf("go.link.linkhash.%d", i), string(shlib.Hash))
-
-			// modulehashes[i].runtimehash
-			abihash := Linklookup(Ctxt, "go.link.abihash."+modulename, 0)
-			abihash.Reachable = true
-			Addaddr(Ctxt, modulehashes, abihash)
-		}
-
-		Addaddr(Ctxt, moduledata, modulehashes)
-		adduint(Ctxt, moduledata, uint64(len(Ctxt.Shlibs)))
-		adduint(Ctxt, moduledata, uint64(len(Ctxt.Shlibs)))
-	}
-	// The rest of moduledata is zero initialized.
-	// When linking an object that does not contain the runtime we are
-	// creating the moduledata from scratch and it does not have a
-	// compiler-provided size, so read it from the type data.
-	moduledatatype := Linkrlookup(Ctxt, "type.runtime.moduledata", 0)
-	moduledata.Size = decodetype_size(moduledatatype)
-	Symgrow(Ctxt, moduledata, moduledata.Size)
-
-	lastmoduledatap := Linklookup(Ctxt, "runtime.lastmoduledatap", 0)
-	if lastmoduledatap.Type != obj.SDYNIMPORT {
-		lastmoduledatap.Type = obj.SNOPTRDATA
-		lastmoduledatap.Size = 0 // overwrite existing value
-		Addaddr(Ctxt, lastmoduledatap, moduledata)
-	}
-}
diff --git a/src/cmd/link/internal/ld/textflag.go b/src/cmd/link/internal/ld/textflag.go
deleted file mode 100644
index 6457fda..0000000
--- a/src/cmd/link/internal/ld/textflag.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package ld
-
-// This file defines flags attached to various functions
-// and data objects.  The compilers, assemblers, and linker must
-// all agree on these values.
-
-const (
-	// Don't profile the marked routine.
-	//
-	// Deprecated: Not implemented, do not use.
-	NOPROF = 1
-	// It is ok for the linker to get multiple of these symbols.  It will
-	// pick one of the duplicates to use.
-	DUPOK = 2
-	// Don't insert stack check preamble.
-	NOSPLIT = 4
-	// Put this data in a read-only section.
-	RODATA = 8
-	// This data contains no pointers.
-	NOPTR = 16
-	// This is a wrapper function and should not count as disabling 'recover'.
-	WRAPPER = 32
-	// This function uses its incoming context register.
-	NEEDCTXT = 64
-)
diff --git a/src/cmd/link/internal/ld/util.go b/src/cmd/link/internal/ld/util.go
deleted file mode 100644
index f38f05c..0000000
--- a/src/cmd/link/internal/ld/util.go
+++ /dev/null
@@ -1,172 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package ld
-
-import (
-	"bytes"
-	"encoding/binary"
-	"log"
-	"os"
-	"runtime"
-	"runtime/pprof"
-	"strings"
-	"time"
-)
-
-func cstring(x []byte) string {
-	i := bytes.IndexByte(x, '\x00')
-	if i >= 0 {
-		x = x[:i]
-	}
-	return string(x)
-}
-
-func tokenize(s string) []string {
-	var f []string
-	for {
-		s = strings.TrimLeft(s, " \t\r\n")
-		if s == "" {
-			break
-		}
-		quote := false
-		i := 0
-		for ; i < len(s); i++ {
-			if s[i] == '\'' {
-				if quote && i+1 < len(s) && s[i+1] == '\'' {
-					i++
-					continue
-				}
-				quote = !quote
-			}
-			if !quote && (s[i] == ' ' || s[i] == '\t' || s[i] == '\r' || s[i] == '\n') {
-				break
-			}
-		}
-		next := s[:i]
-		s = s[i:]
-		if strings.Contains(next, "'") {
-			var buf []byte
-			quote := false
-			for i := 0; i < len(next); i++ {
-				if next[i] == '\'' {
-					if quote && i+1 < len(next) && next[i+1] == '\'' {
-						i++
-						buf = append(buf, '\'')
-					}
-					quote = !quote
-					continue
-				}
-				buf = append(buf, next[i])
-			}
-			next = string(buf)
-		}
-		f = append(f, next)
-	}
-	return f
-}
-
-func cutStringAtNUL(s string) string {
-	if i := strings.Index(s, "\x00"); i >= 0 {
-		s = s[:i]
-	}
-	return s
-}
-
-func Access(name string, mode int) int {
-	if mode != 0 {
-		panic("bad access")
-	}
-	_, err := os.Stat(name)
-	if err != nil {
-		return -1
-	}
-	return 0
-}
-
-// strings.Compare, introduced in Go 1.5.
-func stringsCompare(a, b string) int {
-	if a == b {
-		return 0
-	}
-	if a < b {
-		return -1
-	}
-	return +1
-}
-
-var atExitFuncs []func()
-
-func AtExit(f func()) {
-	atExitFuncs = append(atExitFuncs, f)
-}
-
-func Exit(code int) {
-	for i := len(atExitFuncs) - 1; i >= 0; i-- {
-		f := atExitFuncs[i]
-		atExitFuncs = atExitFuncs[:i]
-		f()
-	}
-	os.Exit(code)
-}
-
-var (
-	cpuprofile     string
-	memprofile     string
-	memprofilerate int64
-)
-
-func startProfile() {
-	if cpuprofile != "" {
-		f, err := os.Create(cpuprofile)
-		if err != nil {
-			log.Fatalf("%v", err)
-		}
-		if err := pprof.StartCPUProfile(f); err != nil {
-			log.Fatalf("%v", err)
-		}
-		AtExit(pprof.StopCPUProfile)
-	}
-	if memprofile != "" {
-		if memprofilerate != 0 {
-			runtime.MemProfileRate = int(memprofilerate)
-		}
-		f, err := os.Create(memprofile)
-		if err != nil {
-			log.Fatalf("%v", err)
-		}
-		AtExit(func() {
-			runtime.GC() // profile all outstanding allocations
-			if err := pprof.WriteHeapProfile(f); err != nil {
-				log.Fatalf("%v", err)
-			}
-		})
-	}
-}
-
-func artrim(x []byte) string {
-	i := 0
-	j := len(x)
-	for i < len(x) && x[i] == ' ' {
-		i++
-	}
-	for j > i && x[j-1] == ' ' {
-		j--
-	}
-	return string(x[i:j])
-}
-
-func stringtouint32(x []uint32, s string) {
-	for i := 0; len(s) > 0; i++ {
-		var buf [4]byte
-		s = s[copy(buf[:], s):]
-		x[i] = binary.LittleEndian.Uint32(buf[:])
-	}
-}
-
-var start = time.Now()
-
-func elapsed() float64 {
-	return time.Since(start).Seconds()
-}
diff --git a/src/cmd/link/internal/ppc64/asm.go b/src/cmd/link/internal/ppc64/asm.go
deleted file mode 100644
index f070921..0000000
--- a/src/cmd/link/internal/ppc64/asm.go
+++ /dev/null
@@ -1,737 +0,0 @@
-// Inferno utils/5l/asm.c
-// http://code.google.com/p/inferno-os/source/browse/utils/5l/asm.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package ppc64
-
-import (
-	"cmd/internal/obj"
-	"cmd/link/internal/ld"
-	"encoding/binary"
-	"fmt"
-	"log"
-)
-
-func gentext() {
-	var s *ld.LSym
-	var stub *ld.LSym
-	var pprevtextp **ld.LSym
-	var r *ld.Reloc
-	var n string
-	var o1 uint32
-	var i int
-
-	// The ppc64 ABI PLT has similar concepts to other
-	// architectures, but is laid out quite differently.  When we
-	// see an R_PPC64_REL24 relocation to a dynamic symbol
-	// (indicating that the call needs to go through the PLT), we
-	// generate up to three stubs and reserve a PLT slot.
-	//
-	// 1) The call site will be bl x; nop (where the relocation
-	//    applies to the bl).  We rewrite this to bl x_stub; ld
-	//    r2,24(r1).  The ld is necessary because x_stub will save
-	//    r2 (the TOC pointer) at 24(r1) (the "TOC save slot").
-	//
-	// 2) We reserve space for a pointer in the .plt section (once
-	//    per referenced dynamic function).  .plt is a data
-	//    section filled solely by the dynamic linker (more like
-	//    .plt.got on other architectures).  Initially, the
-	//    dynamic linker will fill each slot with a pointer to the
-	//    corresponding x at plt entry point.
-	//
-	// 3) We generate the "call stub" x_stub (once per dynamic
-	//    function/object file pair).  This saves the TOC in the
-	//    TOC save slot, reads the function pointer from x's .plt
-	//    slot and calls it like any other global entry point
-	//    (including setting r12 to the function address).
-	//
-	// 4) We generate the "symbol resolver stub" x at plt (once per
-	//    dynamic function).  This is solely a branch to the glink
-	//    resolver stub.
-	//
-	// 5) We generate the glink resolver stub (only once).  This
-	//    computes which symbol resolver stub we came through and
-	//    invokes the dynamic resolver via a pointer provided by
-	//    the dynamic linker.  This will patch up the .plt slot to
-	//    point directly at the function so future calls go
-	//    straight from the call stub to the real function, and
-	//    then call the function.
-
-	// NOTE: It's possible we could make ppc64 closer to other
-	// architectures: ppc64's .plt is like .plt.got on other
-	// platforms and ppc64's .glink is like .plt on other
-	// platforms.
-
-	// Find all R_PPC64_REL24 relocations that reference dynamic
-	// imports.  Reserve PLT entries for these symbols and
-	// generate call stubs.  The call stubs need to live in .text,
-	// which is why we need to do this pass this early.
-	//
-	// This assumes "case 1" from the ABI, where the caller needs
-	// us to save and restore the TOC pointer.
-	pprevtextp = &ld.Ctxt.Textp
-
-	for s = *pprevtextp; s != nil; pprevtextp, s = &s.Next, s.Next {
-		for i = range s.R {
-			r = &s.R[i]
-			if r.Type != 256+ld.R_PPC64_REL24 || r.Sym.Type != obj.SDYNIMPORT {
-				continue
-			}
-
-			// Reserve PLT entry and generate symbol
-			// resolver
-			addpltsym(ld.Ctxt, r.Sym)
-
-			// Generate call stub
-			n = fmt.Sprintf("%s.%s", s.Name, r.Sym.Name)
-
-			stub = ld.Linklookup(ld.Ctxt, n, 0)
-			stub.Reachable = stub.Reachable || s.Reachable
-			if stub.Size == 0 {
-				// Need outer to resolve .TOC.
-				stub.Outer = s
-
-				// Link in to textp before s (we could
-				// do it after, but would have to skip
-				// the subsymbols)
-				*pprevtextp = stub
-
-				stub.Next = s
-				pprevtextp = &stub.Next
-
-				gencallstub(1, stub, r.Sym)
-			}
-
-			// Update the relocation to use the call stub
-			r.Sym = stub
-
-			// Restore TOC after bl.  The compiler put a
-			// nop here for us to overwrite.
-			o1 = 0xe8410018 // ld r2,24(r1)
-			ld.Ctxt.Arch.ByteOrder.PutUint32(s.P[r.Off+4:], o1)
-		}
-	}
-}
-
-// Construct a call stub in stub that calls symbol targ via its PLT
-// entry.
-func gencallstub(abicase int, stub *ld.LSym, targ *ld.LSym) {
-	if abicase != 1 {
-		// If we see R_PPC64_TOCSAVE or R_PPC64_REL24_NOTOC
-		// relocations, we'll need to implement cases 2 and 3.
-		log.Fatalf("gencallstub only implements case 1 calls")
-	}
-
-	plt := ld.Linklookup(ld.Ctxt, ".plt", 0)
-
-	stub.Type = obj.STEXT
-
-	// Save TOC pointer in TOC save slot
-	ld.Adduint32(ld.Ctxt, stub, 0xf8410018) // std r2,24(r1)
-
-	// Load the function pointer from the PLT.
-	r := ld.Addrel(stub)
-
-	r.Off = int32(stub.Size)
-	r.Sym = plt
-	r.Add = int64(targ.Plt)
-	r.Siz = 2
-	if ld.Ctxt.Arch.ByteOrder == binary.BigEndian {
-		r.Off += int32(r.Siz)
-	}
-	r.Type = obj.R_POWER_TOC
-	r.Variant = ld.RV_POWER_HA
-	ld.Adduint32(ld.Ctxt, stub, 0x3d820000) // addis r12,r2,targ at plt@toc at ha
-	r = ld.Addrel(stub)
-	r.Off = int32(stub.Size)
-	r.Sym = plt
-	r.Add = int64(targ.Plt)
-	r.Siz = 2
-	if ld.Ctxt.Arch.ByteOrder == binary.BigEndian {
-		r.Off += int32(r.Siz)
-	}
-	r.Type = obj.R_POWER_TOC
-	r.Variant = ld.RV_POWER_LO
-	ld.Adduint32(ld.Ctxt, stub, 0xe98c0000) // ld r12,targ at plt@toc at l(r12)
-
-	// Jump to the loaded pointer
-	ld.Adduint32(ld.Ctxt, stub, 0x7d8903a6) // mtctr r12
-	ld.Adduint32(ld.Ctxt, stub, 0x4e800420) // bctr
-}
-
-func adddynrela(rel *ld.LSym, s *ld.LSym, r *ld.Reloc) {
-	log.Fatalf("adddynrela not implemented")
-}
-
-func adddynrel(s *ld.LSym, r *ld.Reloc) {
-	targ := r.Sym
-	ld.Ctxt.Cursym = s
-
-	switch r.Type {
-	default:
-		if r.Type >= 256 {
-			ld.Diag("unexpected relocation type %d", r.Type)
-			return
-		}
-
-		// Handle relocations found in ELF object files.
-	case 256 + ld.R_PPC64_REL24:
-		r.Type = obj.R_CALLPOWER
-
-		// This is a local call, so the caller isn't setting
-		// up r12 and r2 is the same for the caller and
-		// callee.  Hence, we need to go to the local entry
-		// point.  (If we don't do this, the callee will try
-		// to use r12 to compute r2.)
-		r.Add += int64(r.Sym.Localentry) * 4
-
-		if targ.Type == obj.SDYNIMPORT {
-			// Should have been handled in elfsetupplt
-			ld.Diag("unexpected R_PPC64_REL24 for dyn import")
-		}
-
-		return
-
-	case 256 + ld.R_PPC64_ADDR64:
-		r.Type = obj.R_ADDR
-		if targ.Type == obj.SDYNIMPORT {
-			// These happen in .toc sections
-			ld.Adddynsym(ld.Ctxt, targ)
-
-			rela := ld.Linklookup(ld.Ctxt, ".rela", 0)
-			ld.Addaddrplus(ld.Ctxt, rela, s, int64(r.Off))
-			ld.Adduint64(ld.Ctxt, rela, ld.ELF64_R_INFO(uint32(targ.Dynid), ld.R_PPC64_ADDR64))
-			ld.Adduint64(ld.Ctxt, rela, uint64(r.Add))
-			r.Type = 256 // ignore during relocsym
-		}
-
-		return
-
-	case 256 + ld.R_PPC64_TOC16:
-		r.Type = obj.R_POWER_TOC
-		r.Variant = ld.RV_POWER_LO | ld.RV_CHECK_OVERFLOW
-		return
-
-	case 256 + ld.R_PPC64_TOC16_LO:
-		r.Type = obj.R_POWER_TOC
-		r.Variant = ld.RV_POWER_LO
-		return
-
-	case 256 + ld.R_PPC64_TOC16_HA:
-		r.Type = obj.R_POWER_TOC
-		r.Variant = ld.RV_POWER_HA | ld.RV_CHECK_OVERFLOW
-		return
-
-	case 256 + ld.R_PPC64_TOC16_HI:
-		r.Type = obj.R_POWER_TOC
-		r.Variant = ld.RV_POWER_HI | ld.RV_CHECK_OVERFLOW
-		return
-
-	case 256 + ld.R_PPC64_TOC16_DS:
-		r.Type = obj.R_POWER_TOC
-		r.Variant = ld.RV_POWER_DS | ld.RV_CHECK_OVERFLOW
-		return
-
-	case 256 + ld.R_PPC64_TOC16_LO_DS:
-		r.Type = obj.R_POWER_TOC
-		r.Variant = ld.RV_POWER_DS
-		return
-
-	case 256 + ld.R_PPC64_REL16_LO:
-		r.Type = obj.R_PCREL
-		r.Variant = ld.RV_POWER_LO
-		r.Add += 2 // Compensate for relocation size of 2
-		return
-
-	case 256 + ld.R_PPC64_REL16_HI:
-		r.Type = obj.R_PCREL
-		r.Variant = ld.RV_POWER_HI | ld.RV_CHECK_OVERFLOW
-		r.Add += 2
-		return
-
-	case 256 + ld.R_PPC64_REL16_HA:
-		r.Type = obj.R_PCREL
-		r.Variant = ld.RV_POWER_HA | ld.RV_CHECK_OVERFLOW
-		r.Add += 2
-		return
-	}
-
-	// Handle references to ELF symbols from our own object files.
-	if targ.Type != obj.SDYNIMPORT {
-		return
-	}
-
-	// TODO(austin): Translate our relocations to ELF
-
-	ld.Diag("unsupported relocation for dynamic symbol %s (type=%d stype=%d)", targ.Name, r.Type, targ.Type)
-}
-
-func elfreloc1(r *ld.Reloc, sectoff int64) int {
-	// TODO(minux)
-	return -1
-}
-
-func elfsetupplt() {
-	plt := ld.Linklookup(ld.Ctxt, ".plt", 0)
-	if plt.Size == 0 {
-		// The dynamic linker stores the address of the
-		// dynamic resolver and the DSO identifier in the two
-		// doublewords at the beginning of the .plt section
-		// before the PLT array.  Reserve space for these.
-		plt.Size = 16
-	}
-}
-
-func machoreloc1(r *ld.Reloc, sectoff int64) int {
-	return -1
-}
-
-// Return the value of .TOC. for symbol s
-func symtoc(s *ld.LSym) int64 {
-	var toc *ld.LSym
-
-	if s.Outer != nil {
-		toc = ld.Linkrlookup(ld.Ctxt, ".TOC.", int(s.Outer.Version))
-	} else {
-		toc = ld.Linkrlookup(ld.Ctxt, ".TOC.", int(s.Version))
-	}
-
-	if toc == nil {
-		ld.Diag("TOC-relative relocation in object without .TOC.")
-		return 0
-	}
-
-	return toc.Value
-}
-
-func archreloc(r *ld.Reloc, s *ld.LSym, val *int64) int {
-	if ld.Linkmode == ld.LinkExternal {
-		// TODO(minux): translate R_ADDRPOWER and R_CALLPOWER into standard ELF relocations.
-		// R_ADDRPOWER corresponds to R_PPC_ADDR16_HA and R_PPC_ADDR16_LO.
-		// R_CALLPOWER corresponds to R_PPC_REL24.
-		return -1
-	}
-
-	switch r.Type {
-	case obj.R_CONST:
-		*val = r.Add
-		return 0
-
-	case obj.R_GOTOFF:
-		*val = ld.Symaddr(r.Sym) + r.Add - ld.Symaddr(ld.Linklookup(ld.Ctxt, ".got", 0))
-		return 0
-
-	case obj.R_ADDRPOWER:
-		// r->add is two ppc64 instructions holding an immediate 32-bit constant.
-		// We want to add r->sym's address to that constant.
-		// The encoding of the immediate x<<16 + y,
-		// where x is the low 16 bits of the first instruction and y is the low 16
-		// bits of the second. Both x and y are signed (int16, not uint16).
-		o1 := uint32(r.Add >> 32)
-		o2 := uint32(r.Add)
-		t := ld.Symaddr(r.Sym)
-		if t < 0 {
-			ld.Ctxt.Diag("relocation for %s is too big (>=2G): %d", s.Name, ld.Symaddr(r.Sym))
-		}
-
-		t += int64((o1&0xffff)<<16 + uint32(int32(o2)<<16>>16))
-		if t&0x8000 != 0 {
-			t += 0x10000
-		}
-		o1 = o1&0xffff0000 | (uint32(t)>>16)&0xffff
-		o2 = o2&0xffff0000 | uint32(t)&0xffff
-
-		// when laid out, the instruction order must always be o1, o2.
-		if ld.Ctxt.Arch.ByteOrder == binary.BigEndian {
-			*val = int64(o1)<<32 | int64(o2)
-		} else {
-			*val = int64(o2)<<32 | int64(o1)
-		}
-		return 0
-
-	case obj.R_CALLPOWER:
-		// Bits 6 through 29 = (S + A - P) >> 2
-		var o1 uint32
-		if ld.Ctxt.Arch.ByteOrder == binary.BigEndian {
-			o1 = ld.Be32(s.P[r.Off:])
-		} else {
-			o1 = ld.Le32(s.P[r.Off:])
-		}
-
-		t := ld.Symaddr(r.Sym) + r.Add - (s.Value + int64(r.Off))
-		if t&3 != 0 {
-			ld.Ctxt.Diag("relocation for %s+%d is not aligned: %d", r.Sym.Name, r.Off, t)
-		}
-		if int64(int32(t<<6)>>6) != t {
-			// TODO(austin) This can happen if text > 32M.
-			// Add a call trampoline to .text in that case.
-			ld.Ctxt.Diag("relocation for %s+%d is too big: %d", r.Sym.Name, r.Off, t)
-		}
-
-		*val = int64(o1&0xfc000003 | uint32(t)&^0xfc000003)
-		return 0
-
-	case obj.R_POWER_TOC: // S + A - .TOC.
-		*val = ld.Symaddr(r.Sym) + r.Add - symtoc(s)
-
-		return 0
-	}
-
-	return -1
-}
-
-func archrelocvariant(r *ld.Reloc, s *ld.LSym, t int64) int64 {
-	switch r.Variant & ld.RV_TYPE_MASK {
-	default:
-		ld.Diag("unexpected relocation variant %d", r.Variant)
-		fallthrough
-
-	case ld.RV_NONE:
-		return t
-
-	case ld.RV_POWER_LO:
-		if r.Variant&ld.RV_CHECK_OVERFLOW != 0 {
-			// Whether to check for signed or unsigned
-			// overflow depends on the instruction
-			var o1 uint32
-			if ld.Ctxt.Arch.ByteOrder == binary.BigEndian {
-				o1 = ld.Be32(s.P[r.Off-2:])
-			} else {
-				o1 = ld.Le32(s.P[r.Off:])
-			}
-			switch o1 >> 26 {
-			case 24, // ori
-				26, // xori
-				28: // andi
-				if t>>16 != 0 {
-					goto overflow
-				}
-
-			default:
-				if int64(int16(t)) != t {
-					goto overflow
-				}
-			}
-		}
-
-		return int64(int16(t))
-
-	case ld.RV_POWER_HA:
-		t += 0x8000
-		fallthrough
-
-		// Fallthrough
-	case ld.RV_POWER_HI:
-		t >>= 16
-
-		if r.Variant&ld.RV_CHECK_OVERFLOW != 0 {
-			// Whether to check for signed or unsigned
-			// overflow depends on the instruction
-			var o1 uint32
-			if ld.Ctxt.Arch.ByteOrder == binary.BigEndian {
-				o1 = ld.Be32(s.P[r.Off-2:])
-			} else {
-				o1 = ld.Le32(s.P[r.Off:])
-			}
-			switch o1 >> 26 {
-			case 25, // oris
-				27, // xoris
-				29: // andis
-				if t>>16 != 0 {
-					goto overflow
-				}
-
-			default:
-				if int64(int16(t)) != t {
-					goto overflow
-				}
-			}
-		}
-
-		return int64(int16(t))
-
-	case ld.RV_POWER_DS:
-		var o1 uint32
-		if ld.Ctxt.Arch.ByteOrder == binary.BigEndian {
-			o1 = uint32(ld.Be16(s.P[r.Off:]))
-		} else {
-			o1 = uint32(ld.Le16(s.P[r.Off:]))
-		}
-		if t&3 != 0 {
-			ld.Diag("relocation for %s+%d is not aligned: %d", r.Sym.Name, r.Off, t)
-		}
-		if (r.Variant&ld.RV_CHECK_OVERFLOW != 0) && int64(int16(t)) != t {
-			goto overflow
-		}
-		return int64(o1)&0x3 | int64(int16(t))
-	}
-
-overflow:
-	ld.Diag("relocation for %s+%d is too big: %d", r.Sym.Name, r.Off, t)
-	return t
-}
-
-func addpltsym(ctxt *ld.Link, s *ld.LSym) {
-	if s.Plt >= 0 {
-		return
-	}
-
-	ld.Adddynsym(ctxt, s)
-
-	if ld.Iself {
-		plt := ld.Linklookup(ctxt, ".plt", 0)
-		rela := ld.Linklookup(ctxt, ".rela.plt", 0)
-		if plt.Size == 0 {
-			elfsetupplt()
-		}
-
-		// Create the glink resolver if necessary
-		glink := ensureglinkresolver()
-
-		// Write symbol resolver stub (just a branch to the
-		// glink resolver stub)
-		r := ld.Addrel(glink)
-
-		r.Sym = glink
-		r.Off = int32(glink.Size)
-		r.Siz = 4
-		r.Type = obj.R_CALLPOWER
-		ld.Adduint32(ctxt, glink, 0x48000000) // b .glink
-
-		// In the ppc64 ABI, the dynamic linker is responsible
-		// for writing the entire PLT.  We just need to
-		// reserve 8 bytes for each PLT entry and generate a
-		// JMP_SLOT dynamic relocation for it.
-		//
-		// TODO(austin): ABI v1 is different
-		s.Plt = int32(plt.Size)
-
-		plt.Size += 8
-
-		ld.Addaddrplus(ctxt, rela, plt, int64(s.Plt))
-		ld.Adduint64(ctxt, rela, ld.ELF64_R_INFO(uint32(s.Dynid), ld.R_PPC64_JMP_SLOT))
-		ld.Adduint64(ctxt, rela, 0)
-	} else {
-		ld.Diag("addpltsym: unsupported binary format")
-	}
-}
-
-// Generate the glink resolver stub if necessary and return the .glink section
-func ensureglinkresolver() *ld.LSym {
-	glink := ld.Linklookup(ld.Ctxt, ".glink", 0)
-	if glink.Size != 0 {
-		return glink
-	}
-
-	// This is essentially the resolver from the ppc64 ELF ABI.
-	// At entry, r12 holds the address of the symbol resolver stub
-	// for the target routine and the argument registers hold the
-	// arguments for the target routine.
-	//
-	// This stub is PIC, so first get the PC of label 1 into r11.
-	// Other things will be relative to this.
-	ld.Adduint32(ld.Ctxt, glink, 0x7c0802a6) // mflr r0
-	ld.Adduint32(ld.Ctxt, glink, 0x429f0005) // bcl 20,31,1f
-	ld.Adduint32(ld.Ctxt, glink, 0x7d6802a6) // 1: mflr r11
-	ld.Adduint32(ld.Ctxt, glink, 0x7c0803a6) // mtlf r0
-
-	// Compute the .plt array index from the entry point address.
-	// Because this is PIC, everything is relative to label 1b (in
-	// r11):
-	//   r0 = ((r12 - r11) - (res_0 - r11)) / 4 = (r12 - res_0) / 4
-	ld.Adduint32(ld.Ctxt, glink, 0x3800ffd0) // li r0,-(res_0-1b)=-48
-	ld.Adduint32(ld.Ctxt, glink, 0x7c006214) // add r0,r0,r12
-	ld.Adduint32(ld.Ctxt, glink, 0x7c0b0050) // sub r0,r0,r11
-	ld.Adduint32(ld.Ctxt, glink, 0x7800f082) // srdi r0,r0,2
-
-	// r11 = address of the first byte of the PLT
-	r := ld.Addrel(glink)
-
-	r.Off = int32(glink.Size)
-	r.Sym = ld.Linklookup(ld.Ctxt, ".plt", 0)
-	r.Siz = 8
-	r.Type = obj.R_ADDRPOWER
-
-	// addis r11,0,.plt at ha; addi r11,r11,.plt at l
-	r.Add = 0x3d600000<<32 | 0x396b0000
-
-	glink.Size += 8
-
-	// Load r12 = dynamic resolver address and r11 = DSO
-	// identifier from the first two doublewords of the PLT.
-	ld.Adduint32(ld.Ctxt, glink, 0xe98b0000) // ld r12,0(r11)
-	ld.Adduint32(ld.Ctxt, glink, 0xe96b0008) // ld r11,8(r11)
-
-	// Jump to the dynamic resolver
-	ld.Adduint32(ld.Ctxt, glink, 0x7d8903a6) // mtctr r12
-	ld.Adduint32(ld.Ctxt, glink, 0x4e800420) // bctr
-
-	// The symbol resolvers must immediately follow.
-	//   res_0:
-
-	// Add DT_PPC64_GLINK .dynamic entry, which points to 32 bytes
-	// before the first symbol resolver stub.
-	s := ld.Linklookup(ld.Ctxt, ".dynamic", 0)
-
-	ld.Elfwritedynentsymplus(s, ld.DT_PPC64_GLINK, glink, glink.Size-32)
-
-	return glink
-}
-
-func asmb() {
-	if ld.Debug['v'] != 0 {
-		fmt.Fprintf(&ld.Bso, "%5.2f asmb\n", obj.Cputime())
-	}
-	ld.Bso.Flush()
-
-	if ld.Iself {
-		ld.Asmbelfsetup()
-	}
-
-	sect := ld.Segtext.Sect
-	ld.Cseek(int64(sect.Vaddr - ld.Segtext.Vaddr + ld.Segtext.Fileoff))
-	ld.Codeblk(int64(sect.Vaddr), int64(sect.Length))
-	for sect = sect.Next; sect != nil; sect = sect.Next {
-		ld.Cseek(int64(sect.Vaddr - ld.Segtext.Vaddr + ld.Segtext.Fileoff))
-		ld.Datblk(int64(sect.Vaddr), int64(sect.Length))
-	}
-
-	if ld.Segrodata.Filelen > 0 {
-		if ld.Debug['v'] != 0 {
-			fmt.Fprintf(&ld.Bso, "%5.2f rodatblk\n", obj.Cputime())
-		}
-		ld.Bso.Flush()
-
-		ld.Cseek(int64(ld.Segrodata.Fileoff))
-		ld.Datblk(int64(ld.Segrodata.Vaddr), int64(ld.Segrodata.Filelen))
-	}
-
-	if ld.Debug['v'] != 0 {
-		fmt.Fprintf(&ld.Bso, "%5.2f datblk\n", obj.Cputime())
-	}
-	ld.Bso.Flush()
-
-	ld.Cseek(int64(ld.Segdata.Fileoff))
-	ld.Datblk(int64(ld.Segdata.Vaddr), int64(ld.Segdata.Filelen))
-
-	/* output symbol table */
-	ld.Symsize = 0
-
-	ld.Lcsize = 0
-	symo := uint32(0)
-	if ld.Debug['s'] == 0 {
-		// TODO: rationalize
-		if ld.Debug['v'] != 0 {
-			fmt.Fprintf(&ld.Bso, "%5.2f sym\n", obj.Cputime())
-		}
-		ld.Bso.Flush()
-		switch ld.HEADTYPE {
-		default:
-			if ld.Iself {
-				symo = uint32(ld.Segdata.Fileoff + ld.Segdata.Filelen)
-				symo = uint32(ld.Rnd(int64(symo), int64(ld.INITRND)))
-			}
-
-		case obj.Hplan9:
-			symo = uint32(ld.Segdata.Fileoff + ld.Segdata.Filelen)
-		}
-
-		ld.Cseek(int64(symo))
-		switch ld.HEADTYPE {
-		default:
-			if ld.Iself {
-				if ld.Debug['v'] != 0 {
-					fmt.Fprintf(&ld.Bso, "%5.2f elfsym\n", obj.Cputime())
-				}
-				ld.Asmelfsym()
-				ld.Cflush()
-				ld.Cwrite(ld.Elfstrdat)
-
-				if ld.Debug['v'] != 0 {
-					fmt.Fprintf(&ld.Bso, "%5.2f dwarf\n", obj.Cputime())
-				}
-				ld.Dwarfemitdebugsections()
-
-				if ld.Linkmode == ld.LinkExternal {
-					ld.Elfemitreloc()
-				}
-			}
-
-		case obj.Hplan9:
-			ld.Asmplan9sym()
-			ld.Cflush()
-
-			sym := ld.Linklookup(ld.Ctxt, "pclntab", 0)
-			if sym != nil {
-				ld.Lcsize = int32(len(sym.P))
-				for i := 0; int32(i) < ld.Lcsize; i++ {
-					ld.Cput(uint8(sym.P[i]))
-				}
-
-				ld.Cflush()
-			}
-		}
-	}
-
-	ld.Ctxt.Cursym = nil
-	if ld.Debug['v'] != 0 {
-		fmt.Fprintf(&ld.Bso, "%5.2f header\n", obj.Cputime())
-	}
-	ld.Bso.Flush()
-	ld.Cseek(0)
-	switch ld.HEADTYPE {
-	default:
-	case obj.Hplan9: /* plan 9 */
-		ld.Thearch.Lput(0x647)                      /* magic */
-		ld.Thearch.Lput(uint32(ld.Segtext.Filelen)) /* sizes */
-		ld.Thearch.Lput(uint32(ld.Segdata.Filelen))
-		ld.Thearch.Lput(uint32(ld.Segdata.Length - ld.Segdata.Filelen))
-		ld.Thearch.Lput(uint32(ld.Symsize))      /* nsyms */
-		ld.Thearch.Lput(uint32(ld.Entryvalue())) /* va of entry */
-		ld.Thearch.Lput(0)
-		ld.Thearch.Lput(uint32(ld.Lcsize))
-
-	case obj.Hlinux,
-		obj.Hfreebsd,
-		obj.Hnetbsd,
-		obj.Hopenbsd,
-		obj.Hnacl:
-		ld.Asmbelf(int64(symo))
-	}
-
-	ld.Cflush()
-	if ld.Debug['c'] != 0 {
-		fmt.Printf("textsize=%d\n", ld.Segtext.Filelen)
-		fmt.Printf("datsize=%d\n", ld.Segdata.Filelen)
-		fmt.Printf("bsssize=%d\n", ld.Segdata.Length-ld.Segdata.Filelen)
-		fmt.Printf("symsize=%d\n", ld.Symsize)
-		fmt.Printf("lcsize=%d\n", ld.Lcsize)
-		fmt.Printf("total=%d\n", ld.Segtext.Filelen+ld.Segdata.Length+uint64(ld.Symsize)+uint64(ld.Lcsize))
-	}
-}
diff --git a/src/cmd/link/internal/ppc64/l.go b/src/cmd/link/internal/ppc64/l.go
deleted file mode 100644
index 1275a34..0000000
--- a/src/cmd/link/internal/ppc64/l.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// Inferno utils/5l/asm.c
-// http://code.google.com/p/inferno-os/source/browse/utils/5l/asm.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package ppc64
-
-// Writing object files.
-
-// cmd/9l/l.h from Vita Nuova.
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2008 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2008 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-const (
-	thechar   = '9'
-	PtrSize   = 8
-	IntSize   = 8
-	RegSize   = 8
-	MaxAlign  = 32 // max data alignment
-	FuncAlign = 8
-	MINLC     = 4
-)
-
-/* Used by ../internal/ld/dwarf.go */
-const (
-	DWARFREGSP = 1
-	DWARFREGLR = 65
-)
diff --git a/src/cmd/link/internal/ppc64/obj.go b/src/cmd/link/internal/ppc64/obj.go
deleted file mode 100644
index d663b6e..0000000
--- a/src/cmd/link/internal/ppc64/obj.go
+++ /dev/null
@@ -1,162 +0,0 @@
-// Inferno utils/5l/obj.c
-// http://code.google.com/p/inferno-os/source/browse/utils/5l/obj.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package ppc64
-
-import (
-	"cmd/internal/obj"
-	"cmd/link/internal/ld"
-	"fmt"
-	"log"
-)
-
-// Reading object files.
-
-func Main() {
-	linkarchinit()
-	ld.Ldmain()
-}
-
-func linkarchinit() {
-	ld.Thestring = obj.Getgoarch()
-	if ld.Thestring == "ppc64le" {
-		ld.Thelinkarch = &ld.Linkppc64le
-	} else {
-		ld.Thelinkarch = &ld.Linkppc64
-	}
-
-	ld.Thearch.Thechar = thechar
-	ld.Thearch.Ptrsize = ld.Thelinkarch.Ptrsize
-	ld.Thearch.Intsize = ld.Thelinkarch.Ptrsize
-	ld.Thearch.Regsize = ld.Thelinkarch.Regsize
-	ld.Thearch.Funcalign = FuncAlign
-	ld.Thearch.Maxalign = MaxAlign
-	ld.Thearch.Minlc = MINLC
-	ld.Thearch.Dwarfregsp = DWARFREGSP
-	ld.Thearch.Dwarfreglr = DWARFREGLR
-
-	ld.Thearch.Adddynrel = adddynrel
-	ld.Thearch.Archinit = archinit
-	ld.Thearch.Archreloc = archreloc
-	ld.Thearch.Archrelocvariant = archrelocvariant
-	ld.Thearch.Asmb = asmb
-	ld.Thearch.Elfreloc1 = elfreloc1
-	ld.Thearch.Elfsetupplt = elfsetupplt
-	ld.Thearch.Gentext = gentext
-	ld.Thearch.Machoreloc1 = machoreloc1
-	if ld.Thelinkarch == &ld.Linkppc64le {
-		ld.Thearch.Lput = ld.Lputl
-		ld.Thearch.Wput = ld.Wputl
-		ld.Thearch.Vput = ld.Vputl
-	} else {
-		ld.Thearch.Lput = ld.Lputb
-		ld.Thearch.Wput = ld.Wputb
-		ld.Thearch.Vput = ld.Vputb
-	}
-
-	// TODO(austin): ABI v1 uses /usr/lib/ld.so.1
-	ld.Thearch.Linuxdynld = "/lib64/ld64.so.1"
-
-	ld.Thearch.Freebsddynld = "XXX"
-	ld.Thearch.Openbsddynld = "XXX"
-	ld.Thearch.Netbsddynld = "XXX"
-	ld.Thearch.Dragonflydynld = "XXX"
-	ld.Thearch.Solarisdynld = "XXX"
-}
-
-func archinit() {
-	// getgoextlinkenabled is based on GO_EXTLINK_ENABLED when
-	// Go was built; see ../../make.bash.
-	if ld.Linkmode == ld.LinkAuto && obj.Getgoextlinkenabled() == "0" {
-		ld.Linkmode = ld.LinkInternal
-	}
-
-	switch ld.HEADTYPE {
-	default:
-		if ld.Linkmode == ld.LinkAuto {
-			ld.Linkmode = ld.LinkInternal
-		}
-		if ld.Linkmode == ld.LinkExternal && obj.Getgoextlinkenabled() != "1" {
-			log.Fatalf("cannot use -linkmode=external with -H %s", ld.Headstr(int(ld.HEADTYPE)))
-		}
-	}
-
-	switch ld.HEADTYPE {
-	default:
-		ld.Exitf("unknown -H option: %v", ld.HEADTYPE)
-
-	case obj.Hplan9: /* plan 9 */
-		ld.HEADR = 32
-
-		if ld.INITTEXT == -1 {
-			ld.INITTEXT = 4128
-		}
-		if ld.INITDAT == -1 {
-			ld.INITDAT = 0
-		}
-		if ld.INITRND == -1 {
-			ld.INITRND = 4096
-		}
-
-	case obj.Hlinux: /* ppc64 elf */
-		if ld.Thestring == "ppc64" {
-			ld.Debug['d'] = 1 // TODO(austin): ELF ABI v1 not supported yet
-		}
-		ld.Elfinit()
-		ld.HEADR = ld.ELFRESERVE
-		if ld.INITTEXT == -1 {
-			ld.INITTEXT = 0x10000 + int64(ld.HEADR)
-		}
-		if ld.INITDAT == -1 {
-			ld.INITDAT = 0
-		}
-		if ld.INITRND == -1 {
-			ld.INITRND = 0x10000
-		}
-
-	case obj.Hnacl:
-		ld.Elfinit()
-		ld.HEADR = 0x10000
-		ld.Funcalign = 16
-		if ld.INITTEXT == -1 {
-			ld.INITTEXT = 0x20000
-		}
-		if ld.INITDAT == -1 {
-			ld.INITDAT = 0
-		}
-		if ld.INITRND == -1 {
-			ld.INITRND = 0x10000
-		}
-	}
-
-	if ld.INITDAT != 0 && ld.INITRND != 0 {
-		fmt.Printf("warning: -D0x%x is ignored because of -R0x%x\n", uint64(ld.INITDAT), uint32(ld.INITRND))
-	}
-}
diff --git a/src/cmd/link/internal/x86/asm.go b/src/cmd/link/internal/x86/asm.go
deleted file mode 100644
index d30bd48..0000000
--- a/src/cmd/link/internal/x86/asm.go
+++ /dev/null
@@ -1,643 +0,0 @@
-// Inferno utils/8l/asm.c
-// http://code.google.com/p/inferno-os/source/browse/utils/8l/asm.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package x86
-
-import (
-	"cmd/internal/obj"
-	"cmd/link/internal/ld"
-	"fmt"
-	"log"
-)
-
-func gentext() {
-}
-
-func adddynrela(rela *ld.LSym, s *ld.LSym, r *ld.Reloc) {
-	log.Fatalf("adddynrela not implemented")
-}
-
-func adddynrel(s *ld.LSym, r *ld.Reloc) {
-	targ := r.Sym
-	ld.Ctxt.Cursym = s
-
-	switch r.Type {
-	default:
-		if r.Type >= 256 {
-			ld.Diag("unexpected relocation type %d", r.Type)
-			return
-		}
-
-		// Handle relocations found in ELF object files.
-	case 256 + ld.R_386_PC32:
-		if targ.Type == obj.SDYNIMPORT {
-			ld.Diag("unexpected R_386_PC32 relocation for dynamic symbol %s", targ.Name)
-		}
-		if targ.Type == 0 || targ.Type == obj.SXREF {
-			ld.Diag("unknown symbol %s in pcrel", targ.Name)
-		}
-		r.Type = obj.R_PCREL
-		r.Add += 4
-		return
-
-	case 256 + ld.R_386_PLT32:
-		r.Type = obj.R_PCREL
-		r.Add += 4
-		if targ.Type == obj.SDYNIMPORT {
-			addpltsym(ld.Ctxt, targ)
-			r.Sym = ld.Linklookup(ld.Ctxt, ".plt", 0)
-			r.Add += int64(targ.Plt)
-		}
-
-		return
-
-	case 256 + ld.R_386_GOT32:
-		if targ.Type != obj.SDYNIMPORT {
-			// have symbol
-			if r.Off >= 2 && s.P[r.Off-2] == 0x8b {
-				// turn MOVL of GOT entry into LEAL of symbol address, relative to GOT.
-				s.P[r.Off-2] = 0x8d
-
-				r.Type = obj.R_GOTOFF
-				return
-			}
-
-			if r.Off >= 2 && s.P[r.Off-2] == 0xff && s.P[r.Off-1] == 0xb3 {
-				// turn PUSHL of GOT entry into PUSHL of symbol itself.
-				// use unnecessary SS prefix to keep instruction same length.
-				s.P[r.Off-2] = 0x36
-
-				s.P[r.Off-1] = 0x68
-				r.Type = obj.R_ADDR
-				return
-			}
-
-			ld.Diag("unexpected GOT reloc for non-dynamic symbol %s", targ.Name)
-			return
-		}
-
-		addgotsym(ld.Ctxt, targ)
-		r.Type = obj.R_CONST // write r->add during relocsym
-		r.Sym = nil
-		r.Add += int64(targ.Got)
-		return
-
-	case 256 + ld.R_386_GOTOFF:
-		r.Type = obj.R_GOTOFF
-		return
-
-	case 256 + ld.R_386_GOTPC:
-		r.Type = obj.R_PCREL
-		r.Sym = ld.Linklookup(ld.Ctxt, ".got", 0)
-		r.Add += 4
-		return
-
-	case 256 + ld.R_386_32:
-		if targ.Type == obj.SDYNIMPORT {
-			ld.Diag("unexpected R_386_32 relocation for dynamic symbol %s", targ.Name)
-		}
-		r.Type = obj.R_ADDR
-		return
-
-	case 512 + ld.MACHO_GENERIC_RELOC_VANILLA*2 + 0:
-		r.Type = obj.R_ADDR
-		if targ.Type == obj.SDYNIMPORT {
-			ld.Diag("unexpected reloc for dynamic symbol %s", targ.Name)
-		}
-		return
-
-	case 512 + ld.MACHO_GENERIC_RELOC_VANILLA*2 + 1:
-		if targ.Type == obj.SDYNIMPORT {
-			addpltsym(ld.Ctxt, targ)
-			r.Sym = ld.Linklookup(ld.Ctxt, ".plt", 0)
-			r.Add = int64(targ.Plt)
-			r.Type = obj.R_PCREL
-			return
-		}
-
-		r.Type = obj.R_PCREL
-		return
-
-	case 512 + ld.MACHO_FAKE_GOTPCREL:
-		if targ.Type != obj.SDYNIMPORT {
-			// have symbol
-			// turn MOVL of GOT entry into LEAL of symbol itself
-			if r.Off < 2 || s.P[r.Off-2] != 0x8b {
-				ld.Diag("unexpected GOT reloc for non-dynamic symbol %s", targ.Name)
-				return
-			}
-
-			s.P[r.Off-2] = 0x8d
-			r.Type = obj.R_PCREL
-			return
-		}
-
-		addgotsym(ld.Ctxt, targ)
-		r.Sym = ld.Linklookup(ld.Ctxt, ".got", 0)
-		r.Add += int64(targ.Got)
-		r.Type = obj.R_PCREL
-		return
-	}
-
-	// Handle references to ELF symbols from our own object files.
-	if targ.Type != obj.SDYNIMPORT {
-		return
-	}
-
-	switch r.Type {
-	case obj.R_CALL,
-		obj.R_PCREL:
-		addpltsym(ld.Ctxt, targ)
-		r.Sym = ld.Linklookup(ld.Ctxt, ".plt", 0)
-		r.Add = int64(targ.Plt)
-		return
-
-	case obj.R_ADDR:
-		if s.Type != obj.SDATA {
-			break
-		}
-		if ld.Iself {
-			ld.Adddynsym(ld.Ctxt, targ)
-			rel := ld.Linklookup(ld.Ctxt, ".rel", 0)
-			ld.Addaddrplus(ld.Ctxt, rel, s, int64(r.Off))
-			ld.Adduint32(ld.Ctxt, rel, ld.ELF32_R_INFO(uint32(targ.Dynid), ld.R_386_32))
-			r.Type = obj.R_CONST // write r->add during relocsym
-			r.Sym = nil
-			return
-		}
-
-		if ld.HEADTYPE == obj.Hdarwin && s.Size == PtrSize && r.Off == 0 {
-			// Mach-O relocations are a royal pain to lay out.
-			// They use a compact stateful bytecode representation
-			// that is too much bother to deal with.
-			// Instead, interpret the C declaration
-			//	void *_Cvar_stderr = &stderr;
-			// as making _Cvar_stderr the name of a GOT entry
-			// for stderr.  This is separate from the usual GOT entry,
-			// just in case the C code assigns to the variable,
-			// and of course it only works for single pointers,
-			// but we only need to support cgo and that's all it needs.
-			ld.Adddynsym(ld.Ctxt, targ)
-
-			got := ld.Linklookup(ld.Ctxt, ".got", 0)
-			s.Type = got.Type | obj.SSUB
-			s.Outer = got
-			s.Sub = got.Sub
-			got.Sub = s
-			s.Value = got.Size
-			ld.Adduint32(ld.Ctxt, got, 0)
-			ld.Adduint32(ld.Ctxt, ld.Linklookup(ld.Ctxt, ".linkedit.got", 0), uint32(targ.Dynid))
-			r.Type = 256 // ignore during relocsym
-			return
-		}
-
-		if ld.HEADTYPE == obj.Hwindows && s.Size == PtrSize {
-			// nothing to do, the relocation will be laid out in pereloc1
-			return
-		}
-	}
-
-	ld.Ctxt.Cursym = s
-	ld.Diag("unsupported relocation for dynamic symbol %s (type=%d stype=%d)", targ.Name, r.Type, targ.Type)
-}
-
-func elfreloc1(r *ld.Reloc, sectoff int64) int {
-	ld.Thearch.Lput(uint32(sectoff))
-
-	elfsym := r.Xsym.Elfsym
-	switch r.Type {
-	default:
-		return -1
-
-	case obj.R_ADDR:
-		if r.Siz == 4 {
-			ld.Thearch.Lput(ld.R_386_32 | uint32(elfsym)<<8)
-		} else {
-			return -1
-		}
-
-	case obj.R_CALL,
-		obj.R_PCREL:
-		if r.Siz == 4 {
-			ld.Thearch.Lput(ld.R_386_PC32 | uint32(elfsym)<<8)
-		} else {
-			return -1
-		}
-
-	case obj.R_TLS_LE:
-		if r.Siz == 4 {
-			ld.Thearch.Lput(ld.R_386_TLS_LE | uint32(elfsym)<<8)
-		} else {
-			return -1
-		}
-	}
-
-	return 0
-}
-
-func machoreloc1(r *ld.Reloc, sectoff int64) int {
-	var v uint32
-
-	rs := r.Xsym
-
-	if rs.Type == obj.SHOSTOBJ {
-		if rs.Dynid < 0 {
-			ld.Diag("reloc %d to non-macho symbol %s type=%d", r.Type, rs.Name, rs.Type)
-			return -1
-		}
-
-		v = uint32(rs.Dynid)
-		v |= 1 << 27 // external relocation
-	} else {
-		v = uint32(rs.Sect.Extnum)
-		if v == 0 {
-			ld.Diag("reloc %d to symbol %s in non-macho section %s type=%d", r.Type, rs.Name, rs.Sect.Name, rs.Type)
-			return -1
-		}
-	}
-
-	switch r.Type {
-	default:
-		return -1
-
-	case obj.R_ADDR:
-		v |= ld.MACHO_GENERIC_RELOC_VANILLA << 28
-
-	case obj.R_CALL,
-		obj.R_PCREL:
-		v |= 1 << 24 // pc-relative bit
-		v |= ld.MACHO_GENERIC_RELOC_VANILLA << 28
-	}
-
-	switch r.Siz {
-	default:
-		return -1
-
-	case 1:
-		v |= 0 << 25
-
-	case 2:
-		v |= 1 << 25
-
-	case 4:
-		v |= 2 << 25
-
-	case 8:
-		v |= 3 << 25
-	}
-
-	ld.Thearch.Lput(uint32(sectoff))
-	ld.Thearch.Lput(v)
-	return 0
-}
-
-func pereloc1(r *ld.Reloc, sectoff int64) bool {
-	var v uint32
-
-	rs := r.Xsym
-
-	if rs.Dynid < 0 {
-		ld.Diag("reloc %d to non-coff symbol %s type=%d", r.Type, rs.Name, rs.Type)
-		return false
-	}
-
-	ld.Thearch.Lput(uint32(sectoff))
-	ld.Thearch.Lput(uint32(rs.Dynid))
-
-	switch r.Type {
-	default:
-		return false
-
-	case obj.R_ADDR:
-		v = ld.IMAGE_REL_I386_DIR32
-
-	case obj.R_CALL,
-		obj.R_PCREL:
-		v = ld.IMAGE_REL_I386_REL32
-	}
-
-	ld.Thearch.Wput(uint16(v))
-
-	return true
-}
-
-func archreloc(r *ld.Reloc, s *ld.LSym, val *int64) int {
-	if ld.Linkmode == ld.LinkExternal {
-		return -1
-	}
-	switch r.Type {
-	case obj.R_CONST:
-		*val = r.Add
-		return 0
-
-	case obj.R_GOTOFF:
-		*val = ld.Symaddr(r.Sym) + r.Add - ld.Symaddr(ld.Linklookup(ld.Ctxt, ".got", 0))
-		return 0
-	}
-
-	return -1
-}
-
-func archrelocvariant(r *ld.Reloc, s *ld.LSym, t int64) int64 {
-	log.Fatalf("unexpected relocation variant")
-	return t
-}
-
-func elfsetupplt() {
-	plt := ld.Linklookup(ld.Ctxt, ".plt", 0)
-	got := ld.Linklookup(ld.Ctxt, ".got.plt", 0)
-	if plt.Size == 0 {
-		// pushl got+4
-		ld.Adduint8(ld.Ctxt, plt, 0xff)
-
-		ld.Adduint8(ld.Ctxt, plt, 0x35)
-		ld.Addaddrplus(ld.Ctxt, plt, got, 4)
-
-		// jmp *got+8
-		ld.Adduint8(ld.Ctxt, plt, 0xff)
-
-		ld.Adduint8(ld.Ctxt, plt, 0x25)
-		ld.Addaddrplus(ld.Ctxt, plt, got, 8)
-
-		// zero pad
-		ld.Adduint32(ld.Ctxt, plt, 0)
-
-		// assume got->size == 0 too
-		ld.Addaddrplus(ld.Ctxt, got, ld.Linklookup(ld.Ctxt, ".dynamic", 0), 0)
-
-		ld.Adduint32(ld.Ctxt, got, 0)
-		ld.Adduint32(ld.Ctxt, got, 0)
-	}
-}
-
-func addpltsym(ctxt *ld.Link, s *ld.LSym) {
-	if s.Plt >= 0 {
-		return
-	}
-
-	ld.Adddynsym(ctxt, s)
-
-	if ld.Iself {
-		plt := ld.Linklookup(ctxt, ".plt", 0)
-		got := ld.Linklookup(ctxt, ".got.plt", 0)
-		rel := ld.Linklookup(ctxt, ".rel.plt", 0)
-		if plt.Size == 0 {
-			elfsetupplt()
-		}
-
-		// jmpq *got+size
-		ld.Adduint8(ctxt, plt, 0xff)
-
-		ld.Adduint8(ctxt, plt, 0x25)
-		ld.Addaddrplus(ctxt, plt, got, got.Size)
-
-		// add to got: pointer to current pos in plt
-		ld.Addaddrplus(ctxt, got, plt, plt.Size)
-
-		// pushl $x
-		ld.Adduint8(ctxt, plt, 0x68)
-
-		ld.Adduint32(ctxt, plt, uint32(rel.Size))
-
-		// jmp .plt
-		ld.Adduint8(ctxt, plt, 0xe9)
-
-		ld.Adduint32(ctxt, plt, uint32(-(plt.Size + 4)))
-
-		// rel
-		ld.Addaddrplus(ctxt, rel, got, got.Size-4)
-
-		ld.Adduint32(ctxt, rel, ld.ELF32_R_INFO(uint32(s.Dynid), ld.R_386_JMP_SLOT))
-
-		s.Plt = int32(plt.Size - 16)
-	} else if ld.HEADTYPE == obj.Hdarwin {
-		// Same laziness as in 6l.
-
-		plt := ld.Linklookup(ctxt, ".plt", 0)
-
-		addgotsym(ctxt, s)
-
-		ld.Adduint32(ctxt, ld.Linklookup(ctxt, ".linkedit.plt", 0), uint32(s.Dynid))
-
-		// jmpq *got+size(IP)
-		s.Plt = int32(plt.Size)
-
-		ld.Adduint8(ctxt, plt, 0xff)
-		ld.Adduint8(ctxt, plt, 0x25)
-		ld.Addaddrplus(ctxt, plt, ld.Linklookup(ctxt, ".got", 0), int64(s.Got))
-	} else {
-		ld.Diag("addpltsym: unsupported binary format")
-	}
-}
-
-func addgotsym(ctxt *ld.Link, s *ld.LSym) {
-	if s.Got >= 0 {
-		return
-	}
-
-	ld.Adddynsym(ctxt, s)
-	got := ld.Linklookup(ctxt, ".got", 0)
-	s.Got = int32(got.Size)
-	ld.Adduint32(ctxt, got, 0)
-
-	if ld.Iself {
-		rel := ld.Linklookup(ctxt, ".rel", 0)
-		ld.Addaddrplus(ctxt, rel, got, int64(s.Got))
-		ld.Adduint32(ctxt, rel, ld.ELF32_R_INFO(uint32(s.Dynid), ld.R_386_GLOB_DAT))
-	} else if ld.HEADTYPE == obj.Hdarwin {
-		ld.Adduint32(ctxt, ld.Linklookup(ctxt, ".linkedit.got", 0), uint32(s.Dynid))
-	} else {
-		ld.Diag("addgotsym: unsupported binary format")
-	}
-}
-
-func asmb() {
-	if ld.Debug['v'] != 0 {
-		fmt.Fprintf(&ld.Bso, "%5.2f asmb\n", obj.Cputime())
-	}
-	ld.Bso.Flush()
-
-	if ld.Iself {
-		ld.Asmbelfsetup()
-	}
-
-	sect := ld.Segtext.Sect
-	ld.Cseek(int64(sect.Vaddr - ld.Segtext.Vaddr + ld.Segtext.Fileoff))
-	ld.Codeblk(int64(sect.Vaddr), int64(sect.Length))
-	for sect = sect.Next; sect != nil; sect = sect.Next {
-		ld.Cseek(int64(sect.Vaddr - ld.Segtext.Vaddr + ld.Segtext.Fileoff))
-		ld.Datblk(int64(sect.Vaddr), int64(sect.Length))
-	}
-
-	if ld.Segrodata.Filelen > 0 {
-		if ld.Debug['v'] != 0 {
-			fmt.Fprintf(&ld.Bso, "%5.2f rodatblk\n", obj.Cputime())
-		}
-		ld.Bso.Flush()
-
-		ld.Cseek(int64(ld.Segrodata.Fileoff))
-		ld.Datblk(int64(ld.Segrodata.Vaddr), int64(ld.Segrodata.Filelen))
-	}
-
-	if ld.Debug['v'] != 0 {
-		fmt.Fprintf(&ld.Bso, "%5.2f datblk\n", obj.Cputime())
-	}
-	ld.Bso.Flush()
-
-	ld.Cseek(int64(ld.Segdata.Fileoff))
-	ld.Datblk(int64(ld.Segdata.Vaddr), int64(ld.Segdata.Filelen))
-
-	machlink := uint32(0)
-	if ld.HEADTYPE == obj.Hdarwin {
-		if ld.Debug['v'] != 0 {
-			fmt.Fprintf(&ld.Bso, "%5.2f dwarf\n", obj.Cputime())
-		}
-
-		dwarfoff := uint32(ld.Rnd(int64(uint64(ld.HEADR)+ld.Segtext.Length), int64(ld.INITRND)) + ld.Rnd(int64(ld.Segdata.Filelen), int64(ld.INITRND)))
-		ld.Cseek(int64(dwarfoff))
-
-		ld.Segdwarf.Fileoff = uint64(ld.Cpos())
-		ld.Dwarfemitdebugsections()
-		ld.Segdwarf.Filelen = uint64(ld.Cpos()) - ld.Segdwarf.Fileoff
-
-		machlink = uint32(ld.Domacholink())
-	}
-
-	ld.Symsize = 0
-	ld.Spsize = 0
-	ld.Lcsize = 0
-	symo := uint32(0)
-	if ld.Debug['s'] == 0 {
-		// TODO: rationalize
-		if ld.Debug['v'] != 0 {
-			fmt.Fprintf(&ld.Bso, "%5.2f sym\n", obj.Cputime())
-		}
-		ld.Bso.Flush()
-		switch ld.HEADTYPE {
-		default:
-			if ld.Iself {
-				symo = uint32(ld.Segdata.Fileoff + ld.Segdata.Filelen)
-				symo = uint32(ld.Rnd(int64(symo), int64(ld.INITRND)))
-			}
-
-		case obj.Hplan9:
-			symo = uint32(ld.Segdata.Fileoff + ld.Segdata.Filelen)
-
-		case obj.Hdarwin:
-			symo = uint32(ld.Segdwarf.Fileoff + uint64(ld.Rnd(int64(ld.Segdwarf.Filelen), int64(ld.INITRND))) + uint64(machlink))
-
-		case obj.Hwindows:
-			symo = uint32(ld.Segdata.Fileoff + ld.Segdata.Filelen)
-			symo = uint32(ld.Rnd(int64(symo), ld.PEFILEALIGN))
-		}
-
-		ld.Cseek(int64(symo))
-		switch ld.HEADTYPE {
-		default:
-			if ld.Iself {
-				if ld.Debug['v'] != 0 {
-					fmt.Fprintf(&ld.Bso, "%5.2f elfsym\n", obj.Cputime())
-				}
-				ld.Asmelfsym()
-				ld.Cflush()
-				ld.Cwrite(ld.Elfstrdat)
-
-				if ld.Debug['v'] != 0 {
-					fmt.Fprintf(&ld.Bso, "%5.2f dwarf\n", obj.Cputime())
-				}
-				ld.Dwarfemitdebugsections()
-
-				if ld.Linkmode == ld.LinkExternal {
-					ld.Elfemitreloc()
-				}
-			}
-
-		case obj.Hplan9:
-			ld.Asmplan9sym()
-			ld.Cflush()
-
-			sym := ld.Linklookup(ld.Ctxt, "pclntab", 0)
-			if sym != nil {
-				ld.Lcsize = int32(len(sym.P))
-				for i := 0; int32(i) < ld.Lcsize; i++ {
-					ld.Cput(uint8(sym.P[i]))
-				}
-
-				ld.Cflush()
-			}
-
-		case obj.Hwindows:
-			if ld.Debug['v'] != 0 {
-				fmt.Fprintf(&ld.Bso, "%5.2f dwarf\n", obj.Cputime())
-			}
-			ld.Dwarfemitdebugsections()
-
-		case obj.Hdarwin:
-			if ld.Linkmode == ld.LinkExternal {
-				ld.Machoemitreloc()
-			}
-		}
-	}
-
-	if ld.Debug['v'] != 0 {
-		fmt.Fprintf(&ld.Bso, "%5.2f headr\n", obj.Cputime())
-	}
-	ld.Bso.Flush()
-	ld.Cseek(0)
-	switch ld.HEADTYPE {
-	default:
-	case obj.Hplan9: /* plan9 */
-		magic := int32(4*11*11 + 7)
-
-		ld.Lputb(uint32(magic))              /* magic */
-		ld.Lputb(uint32(ld.Segtext.Filelen)) /* sizes */
-		ld.Lputb(uint32(ld.Segdata.Filelen))
-		ld.Lputb(uint32(ld.Segdata.Length - ld.Segdata.Filelen))
-		ld.Lputb(uint32(ld.Symsize))      /* nsyms */
-		ld.Lputb(uint32(ld.Entryvalue())) /* va of entry */
-		ld.Lputb(uint32(ld.Spsize))       /* sp offsets */
-		ld.Lputb(uint32(ld.Lcsize))       /* line offsets */
-
-	case obj.Hdarwin:
-		ld.Asmbmacho()
-
-	case obj.Hlinux,
-		obj.Hfreebsd,
-		obj.Hnetbsd,
-		obj.Hopenbsd,
-		obj.Hnacl:
-		ld.Asmbelf(int64(symo))
-
-	case obj.Hwindows:
-		ld.Asmbpe()
-	}
-
-	ld.Cflush()
-}
diff --git a/src/cmd/link/internal/x86/l.go b/src/cmd/link/internal/x86/l.go
deleted file mode 100644
index 8a811ff..0000000
--- a/src/cmd/link/internal/x86/l.go
+++ /dev/null
@@ -1,47 +0,0 @@
-// Inferno utils/8l/l.h
-// http://code.google.com/p/inferno-os/source/browse/utils/8l/l.h
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package x86
-
-const (
-	thechar   = '8'
-	PtrSize   = 4
-	IntSize   = 4
-	RegSize   = 4
-	MaxAlign  = 32 // max data alignment
-	FuncAlign = 16
-	MINLC     = 1
-)
-
-/* Used by ../internal/ld/dwarf.go */
-const (
-	DWARFREGSP = 4
-	DWARFREGLR = 8
-)
diff --git a/src/cmd/link/internal/x86/obj.go b/src/cmd/link/internal/x86/obj.go
deleted file mode 100644
index ee408f7..0000000
--- a/src/cmd/link/internal/x86/obj.go
+++ /dev/null
@@ -1,187 +0,0 @@
-// Inferno utils/8l/obj.c
-// http://code.google.com/p/inferno-os/source/browse/utils/8l/obj.c
-//
-//	Copyright © 1994-1999 Lucent Technologies Inc.  All rights reserved.
-//	Portions Copyright © 1995-1997 C H Forsyth (forsyth at terzarima.net)
-//	Portions Copyright © 1997-1999 Vita Nuova Limited
-//	Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com)
-//	Portions Copyright © 2004,2006 Bruce Ellis
-//	Portions Copyright © 2005-2007 C H Forsyth (forsyth at terzarima.net)
-//	Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
-//	Portions Copyright © 2009 The Go Authors.  All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-package x86
-
-import (
-	"cmd/internal/obj"
-	"cmd/link/internal/ld"
-	"fmt"
-	"log"
-)
-
-// Reading object files.
-
-func Main() {
-	linkarchinit()
-	ld.Ldmain()
-}
-
-func linkarchinit() {
-	ld.Thestring = "386"
-	ld.Thelinkarch = &ld.Link386
-
-	ld.Thearch.Thechar = thechar
-	ld.Thearch.Ptrsize = ld.Thelinkarch.Ptrsize
-	ld.Thearch.Intsize = ld.Thelinkarch.Ptrsize
-	ld.Thearch.Regsize = ld.Thelinkarch.Regsize
-	ld.Thearch.Funcalign = FuncAlign
-	ld.Thearch.Maxalign = MaxAlign
-	ld.Thearch.Minlc = MINLC
-	ld.Thearch.Dwarfregsp = DWARFREGSP
-	ld.Thearch.Dwarfreglr = DWARFREGLR
-
-	ld.Thearch.Adddynrel = adddynrel
-	ld.Thearch.Archinit = archinit
-	ld.Thearch.Archreloc = archreloc
-	ld.Thearch.Archrelocvariant = archrelocvariant
-	ld.Thearch.Asmb = asmb
-	ld.Thearch.Elfreloc1 = elfreloc1
-	ld.Thearch.Elfsetupplt = elfsetupplt
-	ld.Thearch.Gentext = gentext
-	ld.Thearch.Machoreloc1 = machoreloc1
-	ld.Thearch.PEreloc1 = pereloc1
-	ld.Thearch.Lput = ld.Lputl
-	ld.Thearch.Wput = ld.Wputl
-	ld.Thearch.Vput = ld.Vputl
-
-	ld.Thearch.Linuxdynld = "/lib/ld-linux.so.2"
-	ld.Thearch.Freebsddynld = "/usr/libexec/ld-elf.so.1"
-	ld.Thearch.Openbsddynld = "/usr/libexec/ld.so"
-	ld.Thearch.Netbsddynld = "/usr/libexec/ld.elf_so"
-	ld.Thearch.Solarisdynld = "/lib/ld.so.1"
-}
-
-func archinit() {
-	// getgoextlinkenabled is based on GO_EXTLINK_ENABLED when
-	// Go was built; see ../../make.bash.
-	if ld.Linkmode == ld.LinkAuto && obj.Getgoextlinkenabled() == "0" {
-		ld.Linkmode = ld.LinkInternal
-	}
-
-	switch ld.HEADTYPE {
-	default:
-		if ld.Linkmode == ld.LinkAuto {
-			ld.Linkmode = ld.LinkInternal
-		}
-		if ld.Linkmode == ld.LinkExternal && obj.Getgoextlinkenabled() != "1" {
-			log.Fatalf("cannot use -linkmode=external with -H %s", ld.Headstr(int(ld.HEADTYPE)))
-		}
-
-	case obj.Hdarwin,
-		obj.Hfreebsd,
-		obj.Hlinux,
-		obj.Hnetbsd,
-		obj.Hopenbsd,
-		obj.Hwindows:
-		break
-	}
-
-	switch ld.HEADTYPE {
-	default:
-		ld.Exitf("unknown -H option: %v", ld.HEADTYPE)
-
-	case obj.Hplan9: /* plan 9 */
-		ld.HEADR = 32
-
-		if ld.INITTEXT == -1 {
-			ld.INITTEXT = 4096 + 32
-		}
-		if ld.INITDAT == -1 {
-			ld.INITDAT = 0
-		}
-		if ld.INITRND == -1 {
-			ld.INITRND = 4096
-		}
-
-	case obj.Hdarwin: /* apple MACH */
-		ld.Machoinit()
-
-		ld.HEADR = ld.INITIAL_MACHO_HEADR
-		if ld.INITTEXT == -1 {
-			ld.INITTEXT = 4096 + int64(ld.HEADR)
-		}
-		if ld.INITDAT == -1 {
-			ld.INITDAT = 0
-		}
-		if ld.INITRND == -1 {
-			ld.INITRND = 4096
-		}
-
-	case obj.Hlinux, /* elf32 executable */
-		obj.Hfreebsd,
-		obj.Hnetbsd,
-		obj.Hopenbsd:
-		ld.Elfinit()
-
-		ld.HEADR = ld.ELFRESERVE
-		if ld.INITTEXT == -1 {
-			ld.INITTEXT = 0x08048000 + int64(ld.HEADR)
-		}
-		if ld.INITDAT == -1 {
-			ld.INITDAT = 0
-		}
-		if ld.INITRND == -1 {
-			ld.INITRND = 4096
-		}
-
-	case obj.Hnacl:
-		ld.Elfinit()
-		ld.HEADR = 0x10000
-		ld.Funcalign = 32
-		if ld.INITTEXT == -1 {
-			ld.INITTEXT = 0x20000
-		}
-		if ld.INITDAT == -1 {
-			ld.INITDAT = 0
-		}
-		if ld.INITRND == -1 {
-			ld.INITRND = 0x10000
-		}
-
-	case obj.Hwindows: /* PE executable */
-		ld.Peinit()
-
-		ld.HEADR = ld.PEFILEHEADR
-		if ld.INITTEXT == -1 {
-			ld.INITTEXT = ld.PEBASE + int64(ld.PESECTHEADR)
-		}
-		if ld.INITDAT == -1 {
-			ld.INITDAT = 0
-		}
-		if ld.INITRND == -1 {
-			ld.INITRND = ld.PESECTALIGN
-		}
-	}
-
-	if ld.INITDAT != 0 && ld.INITRND != 0 {
-		fmt.Printf("warning: -D0x%x is ignored because of -R0x%x\n", uint64(ld.INITDAT), uint32(ld.INITRND))
-	}
-}
diff --git a/src/cmd/link/main.go b/src/cmd/link/main.go
deleted file mode 100644
index 0e6c34e..0000000
--- a/src/cmd/link/main.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
-	"cmd/internal/obj"
-	"cmd/link/internal/amd64"
-	"cmd/link/internal/arm"
-	"cmd/link/internal/arm64"
-	"cmd/link/internal/ppc64"
-	"cmd/link/internal/x86"
-	"fmt"
-	"os"
-)
-
-func main() {
-	switch obj.Getgoarch() {
-	default:
-		fmt.Fprintf(os.Stderr, "link: unknown architecture %q\n", obj.Getgoarch())
-		os.Exit(2)
-	case "386":
-		x86.Main()
-	case "amd64", "amd64p32":
-		amd64.Main()
-	case "arm":
-		arm.Main()
-	case "arm64":
-		arm64.Main()
-	case "ppc64", "ppc64le":
-		ppc64.Main()
-	}
-}
diff --git a/src/cmd/pprof/internal/profile/profile_test.go b/src/cmd/pprof/internal/profile/profile_test.go
deleted file mode 100644
index 09b11a4..0000000
--- a/src/cmd/pprof/internal/profile/profile_test.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package profile
-
-import (
-	"bytes"
-	"testing"
-)
-
-func TestEmptyProfile(t *testing.T) {
-	var buf bytes.Buffer
-	p, err := Parse(&buf)
-	if err != nil {
-		t.Error("Want no error, got", err)
-	}
-	if p == nil {
-		t.Fatal("Want a valid profile, got <nil>")
-	}
-	if !p.Empty() {
-		t.Errorf("Profile should be empty, got %#v", p)
-	}
-}
diff --git a/src/cmd/pprof/internal/svg/svgpan.go b/src/cmd/pprof/internal/svg/svgpan.go
deleted file mode 100644
index 4975b10..0000000
--- a/src/cmd/pprof/internal/svg/svgpan.go
+++ /dev/null
@@ -1,291 +0,0 @@
-// SVG pan and zoom library.
-// See copyright notice in string constant below.
-
-package svg
-
-// https://www.cyberz.org/projects/SVGPan/SVGPan.js
-
-const svgPanJS = `
-/** 
- *  SVGPan library 1.2.1
- * ======================
- *
- * Given an unique existing element with id "viewport" (or when missing, the first g 
- * element), including the the library into any SVG adds the following capabilities:
- *
- *  - Mouse panning
- *  - Mouse zooming (using the wheel)
- *  - Object dragging
- *
- * You can configure the behaviour of the pan/zoom/drag with the variables
- * listed in the CONFIGURATION section of this file.
- *
- * Known issues:
- *
- *  - Zooming (while panning) on Safari has still some issues
- *
- * Releases:
- *
- * 1.2.1, Mon Jul  4 00:33:18 CEST 2011, Andrea Leofreddi
- *	- Fixed a regression with mouse wheel (now working on Firefox 5)
- *	- Working with viewBox attribute (#4)
- *	- Added "use strict;" and fixed resulting warnings (#5)
- *	- Added configuration variables, dragging is disabled by default (#3)
- *
- * 1.2, Sat Mar 20 08:42:50 GMT 2010, Zeng Xiaohui
- *	Fixed a bug with browser mouse handler interaction
- *
- * 1.1, Wed Feb  3 17:39:33 GMT 2010, Zeng Xiaohui
- *	Updated the zoom code to support the mouse wheel on Safari/Chrome
- *
- * 1.0, Andrea Leofreddi
- *	First release
- *
- * This code is licensed under the following BSD license:
- *
- * Copyright 2009-2010 Andrea Leofreddi <a.leofreddi at itcharm.com>. All rights reserved.
- * 
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- * 
- *    1. Redistributions of source code must retain the above copyright notice, this list of
- *       conditions and the following disclaimer.
- * 
- *    2. Redistributions in binary form must reproduce the above copyright notice, this list
- *       of conditions and the following disclaimer in the documentation and/or other materials
- *       provided with the distribution.
- * 
- * THIS SOFTWARE IS PROVIDED BY Andrea Leofreddi ` + "``AS IS''" + ` AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Andrea Leofreddi OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- * 
- * The views and conclusions contained in the software and documentation are those of the
- * authors and should not be interpreted as representing official policies, either expressed
- * or implied, of Andrea Leofreddi.
- */
-
-"use strict";
-
-/// CONFIGURATION 
-/// ====>
-
-var enablePan = 1; // 1 or 0: enable or disable panning (default enabled)
-var enableZoom = 1; // 1 or 0: enable or disable zooming (default enabled)
-var enableDrag = 0; // 1 or 0: enable or disable dragging (default disabled)
-
-/// <====
-/// END OF CONFIGURATION 
-
-var root = document.documentElement;
-
-var state = 'none', svgRoot, stateTarget, stateOrigin, stateTf;
-
-setupHandlers(root);
-
-/**
- * Register handlers
- */
-function setupHandlers(root){
-	setAttributes(root, {
-		"onmouseup" : "handleMouseUp(evt)",
-		"onmousedown" : "handleMouseDown(evt)",
-		"onmousemove" : "handleMouseMove(evt)",
-		//"onmouseout" : "handleMouseUp(evt)", // Decomment this to stop the pan functionality when dragging out of the SVG element
-	});
-
-	if(navigator.userAgent.toLowerCase().indexOf('webkit') >= 0)
-		window.addEventListener('mousewheel', handleMouseWheel, false); // Chrome/Safari
-	else
-		window.addEventListener('DOMMouseScroll', handleMouseWheel, false); // Others
-}
-
-/**
- * Retrieves the root element for SVG manipulation. The element is then cached into the svgRoot global variable.
- */
-function getRoot(root) {
-	if(typeof(svgRoot) == "undefined") {
-		var g = null;
-
-		g = root.getElementById("viewport");
-
-		if(g == null)
-			g = root.getElementsByTagName('g')[0];
-
-		if(g == null)
-			alert('Unable to obtain SVG root element');
-
-		setCTM(g, g.getCTM());
-
-		g.removeAttribute("viewBox");
-
-		svgRoot = g;
-	}
-
-	return svgRoot;
-}
-
-/**
- * Instance an SVGPoint object with given event coordinates.
- */
-function getEventPoint(evt) {
-	var p = root.createSVGPoint();
-
-	p.x = evt.clientX;
-	p.y = evt.clientY;
-
-	return p;
-}
-
-/**
- * Sets the current transform matrix of an element.
- */
-function setCTM(element, matrix) {
-	var s = "matrix(" + matrix.a + "," + matrix.b + "," + matrix.c + "," + matrix.d + "," + matrix.e + "," + matrix.f + ")";
-
-	element.setAttribute("transform", s);
-}
-
-/**
- * Dumps a matrix to a string (useful for debug).
- */
-function dumpMatrix(matrix) {
-	var s = "[ " + matrix.a + ", " + matrix.c + ", " + matrix.e + "\n  " + matrix.b + ", " + matrix.d + ", " + matrix.f + "\n  0, 0, 1 ]";
-
-	return s;
-}
-
-/**
- * Sets attributes of an element.
- */
-function setAttributes(element, attributes){
-	for (var i in attributes)
-		element.setAttributeNS(null, i, attributes[i]);
-}
-
-/**
- * Handle mouse wheel event.
- */
-function handleMouseWheel(evt) {
-	if(!enableZoom)
-		return;
-
-	if(evt.preventDefault)
-		evt.preventDefault();
-
-	evt.returnValue = false;
-
-	var svgDoc = evt.target.ownerDocument;
-
-	var delta;
-
-	if(evt.wheelDelta)
-		delta = evt.wheelDelta / 3600; // Chrome/Safari
-	else
-		delta = evt.detail / -90; // Mozilla
-
-	var z = 1 + delta; // Zoom factor: 0.9/1.1
-
-	var g = getRoot(svgDoc);
-	
-	var p = getEventPoint(evt);
-
-	p = p.matrixTransform(g.getCTM().inverse());
-
-	// Compute new scale matrix in current mouse position
-	var k = root.createSVGMatrix().translate(p.x, p.y).scale(z).translate(-p.x, -p.y);
-
-        setCTM(g, g.getCTM().multiply(k));
-
-	if(typeof(stateTf) == "undefined")
-		stateTf = g.getCTM().inverse();
-
-	stateTf = stateTf.multiply(k.inverse());
-}
-
-/**
- * Handle mouse move event.
- */
-function handleMouseMove(evt) {
-	if(evt.preventDefault)
-		evt.preventDefault();
-
-	evt.returnValue = false;
-
-	var svgDoc = evt.target.ownerDocument;
-
-	var g = getRoot(svgDoc);
-
-	if(state == 'pan' && enablePan) {
-		// Pan mode
-		var p = getEventPoint(evt).matrixTransform(stateTf);
-
-		setCTM(g, stateTf.inverse().translate(p.x - stateOrigin.x, p.y - stateOrigin.y));
-	} else if(state == 'drag' && enableDrag) {
-		// Drag mode
-		var p = getEventPoint(evt).matrixTransform(g.getCTM().inverse());
-
-		setCTM(stateTarget, root.createSVGMatrix().translate(p.x - stateOrigin.x, p.y - stateOrigin.y).multiply(g.getCTM().inverse()).multiply(stateTarget.getCTM()));
-
-		stateOrigin = p;
-	}
-}
-
-/**
- * Handle click event.
- */
-function handleMouseDown(evt) {
-	if(evt.preventDefault)
-		evt.preventDefault();
-
-	evt.returnValue = false;
-
-	var svgDoc = evt.target.ownerDocument;
-
-	var g = getRoot(svgDoc);
-
-	if(
-		evt.target.tagName == "svg" 
-		|| !enableDrag // Pan anyway when drag is disabled and the user clicked on an element 
-	) {
-		// Pan mode
-		state = 'pan';
-
-		stateTf = g.getCTM().inverse();
-
-		stateOrigin = getEventPoint(evt).matrixTransform(stateTf);
-	} else {
-		// Drag mode
-		state = 'drag';
-
-		stateTarget = evt.target;
-
-		stateTf = g.getCTM().inverse();
-
-		stateOrigin = getEventPoint(evt).matrixTransform(stateTf);
-	}
-}
-
-/**
- * Handle mouse button release event.
- */
-function handleMouseUp(evt) {
-	if(evt.preventDefault)
-		evt.preventDefault();
-
-	evt.returnValue = false;
-
-	var svgDoc = evt.target.ownerDocument;
-
-	if(state == 'pan' || state == 'drag') {
-		// Quit pan mode
-		state = '';
-	}
-}
-
-`
diff --git a/src/cmd/trace/goroutines.go b/src/cmd/trace/goroutines.go
deleted file mode 100644
index f5a4ddb..0000000
--- a/src/cmd/trace/goroutines.go
+++ /dev/null
@@ -1,168 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Goroutine-related profiles.
-
-package main
-
-import (
-	"fmt"
-	"html/template"
-	"internal/trace"
-	"net/http"
-	"sort"
-	"strconv"
-	"sync"
-)
-
-func init() {
-	http.HandleFunc("/goroutines", httpGoroutines)
-	http.HandleFunc("/goroutine", httpGoroutine)
-}
-
-// gtype describes a group of goroutines grouped by start PC.
-type gtype struct {
-	ID       uint64 // Unique identifier (PC).
-	Name     string // Start function.
-	N        int    // Total number of goroutines in this group.
-	ExecTime int64  // Total execution time of all goroutines in this group.
-}
-
-type gtypeList []gtype
-
-func (l gtypeList) Len() int {
-	return len(l)
-}
-
-func (l gtypeList) Less(i, j int) bool {
-	return l[i].ExecTime > l[j].ExecTime
-}
-
-func (l gtypeList) Swap(i, j int) {
-	l[i], l[j] = l[j], l[i]
-}
-
-type gdescList []*trace.GDesc
-
-func (l gdescList) Len() int {
-	return len(l)
-}
-
-func (l gdescList) Less(i, j int) bool {
-	return l[i].TotalTime > l[j].TotalTime
-}
-
-func (l gdescList) Swap(i, j int) {
-	l[i], l[j] = l[j], l[i]
-}
-
-var (
-	gsInit sync.Once
-	gs     map[uint64]*trace.GDesc
-)
-
-// analyzeGoroutines generates statistics about execution of all goroutines and stores them in gs.
-func analyzeGoroutines(events []*trace.Event) {
-	gsInit.Do(func() {
-		gs = trace.GoroutineStats(events)
-	})
-}
-
-// httpGoroutines serves list of goroutine groups.
-func httpGoroutines(w http.ResponseWriter, r *http.Request) {
-	events, err := parseEvents()
-	if err != nil {
-		http.Error(w, err.Error(), http.StatusInternalServerError)
-		return
-	}
-	analyzeGoroutines(events)
-	gss := make(map[uint64]gtype)
-	for _, g := range gs {
-		gs1 := gss[g.PC]
-		gs1.ID = g.PC
-		gs1.Name = g.Name
-		gs1.N++
-		gs1.ExecTime += g.ExecTime
-		gss[g.PC] = gs1
-	}
-	var glist gtypeList
-	for k, v := range gss {
-		v.ID = k
-		glist = append(glist, v)
-	}
-	sort.Sort(glist)
-	templGoroutines.Execute(w, glist)
-}
-
-var templGoroutines = template.Must(template.New("").Parse(`
-<html>
-<body>
-Goroutines: <br>
-{{range $}}
-  <a href="/goroutine?id={{.ID}}">{{.Name}}</a> N={{.N}} <br>
-{{end}}
-</body>
-</html>
-`))
-
-// httpGoroutine serves list of goroutines in a particular group.
-func httpGoroutine(w http.ResponseWriter, r *http.Request) {
-	events, err := parseEvents()
-	if err != nil {
-		http.Error(w, err.Error(), http.StatusInternalServerError)
-		return
-	}
-	pc, err := strconv.ParseUint(r.FormValue("id"), 10, 64)
-	if err != nil {
-		http.Error(w, fmt.Sprintf("failed to parse id parameter '%v': %v", r.FormValue("id"), err), http.StatusInternalServerError)
-		return
-	}
-	analyzeGoroutines(events)
-	var glist gdescList
-	for _, g := range gs {
-		if g.PC != pc || g.ExecTime == 0 {
-			continue
-		}
-		glist = append(glist, g)
-	}
-	sort.Sort(glist)
-	err = templGoroutine.Execute(w, glist)
-	if err != nil {
-		http.Error(w, fmt.Sprintf("failed to execute template: %v", err), http.StatusInternalServerError)
-		return
-	}
-}
-
-var templGoroutine = template.Must(template.New("").Parse(`
-<html>
-<body>
-<table border="1" sortable="1">
-<tr>
-<th> Goroutine </th>
-<th> Total time, ns </th>
-<th> Execution time, ns </th>
-<th> Network wait time, ns </th>
-<th> Sync block time, ns </th>
-<th> Blocking syscall time, ns </th>
-<th> Scheduler wait time, ns </th>
-<th> GC sweeping time, ns </th>
-<th> GC pause time, ns </th>
-</tr>
-{{range $}}
-  <tr>
-    <td> <a href="/trace?goid={{.ID}}">{{.ID}}</a> </td>
-    <td> {{.TotalTime}} </td>
-    <td> {{.ExecTime}} </td>
-    <td> {{.IOTime}} </td>
-    <td> {{.BlockTime}} </td>
-    <td> {{.SyscallTime}} </td>
-    <td> {{.SchedWaitTime}} </td>
-    <td> {{.SweepTime}} </td>
-    <td> {{.GCTime}} </td>
-  </tr>
-{{end}}
-</table>
-</body>
-</html>
-`))
diff --git a/src/cmd/trace/main.go b/src/cmd/trace/main.go
deleted file mode 100644
index 27d8699..0000000
--- a/src/cmd/trace/main.go
+++ /dev/null
@@ -1,156 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-/*
-Trace is a tool for viewing trace files.
-
-Trace files can be generated with:
-	- runtime/trace.Start
-	- net/http/pprof package
-	- go test -trace
-
-Example usage:
-Generate a trace file with 'go test':
-	go test -trace trace.out pkg
-View the trace in a web browser:
-	go tool trace pkg.test trace.out
-*/
-package main
-
-import (
-	"bufio"
-	"flag"
-	"fmt"
-	"internal/trace"
-	"net"
-	"net/http"
-	"os"
-	"os/exec"
-	"runtime"
-	"sync"
-)
-
-const usageMessage = "" +
-	`Usage of 'go tool trace':
-Given a trace file produced by 'go test':
-	go test -trace=trace.out pkg
-
-Open a web browser displaying trace:
-	go tool trace [flags] pkg.test trace.out
-
-Flags:
-	-http=addr: HTTP service address (e.g., ':6060')
-`
-
-var (
-	httpFlag = flag.String("http", "localhost:0", "HTTP service address (e.g., ':6060')")
-
-	// The binary file name, left here for serveSVGProfile.
-	programBinary string
-	traceFile     string
-)
-
-func main() {
-	flag.Usage = func() {
-		fmt.Fprintln(os.Stderr, usageMessage)
-		os.Exit(2)
-	}
-	flag.Parse()
-
-	// Usage information when no arguments.
-	if flag.NArg() != 2 {
-		flag.Usage()
-	}
-	programBinary = flag.Arg(0)
-	traceFile = flag.Arg(1)
-
-	ln, err := net.Listen("tcp", *httpFlag)
-	if err != nil {
-		dief("failed to create server socket: %v\n", err)
-	}
-	// Open browser.
-	if !startBrowser("http://" + ln.Addr().String()) {
-		dief("failed to start browser\n")
-	}
-
-	// Parse and symbolize trace asynchronously while browser opens.
-	go parseEvents()
-
-	// Start http server.
-	http.HandleFunc("/", httpMain)
-	err = http.Serve(ln, nil)
-	dief("failed to start http server: %v\n", err)
-}
-
-var loader struct {
-	once   sync.Once
-	events []*trace.Event
-	err    error
-}
-
-func parseEvents() ([]*trace.Event, error) {
-	loader.once.Do(func() {
-		tracef, err := os.Open(flag.Arg(1))
-		if err != nil {
-			loader.err = fmt.Errorf("failed to open trace file: %v", err)
-			return
-		}
-		defer tracef.Close()
-
-		// Parse and symbolize.
-		events, err := trace.Parse(bufio.NewReader(tracef))
-		if err != nil {
-			loader.err = fmt.Errorf("failed to parse trace: %v", err)
-			return
-		}
-		err = trace.Symbolize(events, programBinary)
-		if err != nil {
-			loader.err = fmt.Errorf("failed to symbolize trace: %v", err)
-			return
-		}
-		loader.events = events
-	})
-	return loader.events, loader.err
-}
-
-// httpMain serves the starting page.
-func httpMain(w http.ResponseWriter, r *http.Request) {
-	w.Write(templMain)
-}
-
-var templMain = []byte(`
-<html>
-<body>
-<a href="/trace">View trace</a><br>
-<a href="/goroutines">Goroutine analysis</a><br>
-<a href="/io">Network blocking profile</a><br>
-<a href="/block">Synchronization blocking profile</a><br>
-<a href="/syscall">Syscall blocking profile</a><br>
-<a href="/sched">Scheduler latency profile</a><br>
-</body>
-</html>
-`)
-
-// startBrowser tries to open the URL in a browser
-// and reports whether it succeeds.
-// Note: copied from x/tools/cmd/cover/html.go
-func startBrowser(url string) bool {
-	// try to start the browser
-	var args []string
-	switch runtime.GOOS {
-	case "darwin":
-		args = []string{"open"}
-	case "windows":
-		args = []string{"cmd", "/c", "start"}
-	default:
-		args = []string{"xdg-open"}
-	}
-	cmd := exec.Command(args[0], append(args[1:], url)...)
-	return cmd.Start() == nil
-}
-
-func dief(msg string, args ...interface{}) {
-	fmt.Fprintf(os.Stderr, msg, args...)
-	os.Exit(1)
-}
diff --git a/src/cmd/trace/pprof.go b/src/cmd/trace/pprof.go
deleted file mode 100644
index 154f04d..0000000
--- a/src/cmd/trace/pprof.go
+++ /dev/null
@@ -1,166 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Serving of pprof-like profiles.
-
-package main
-
-import (
-	"bufio"
-	"fmt"
-	"internal/trace"
-	"io/ioutil"
-	"net/http"
-	"os"
-	"os/exec"
-)
-
-func init() {
-	http.HandleFunc("/io", httpIO)
-	http.HandleFunc("/block", httpBlock)
-	http.HandleFunc("/syscall", httpSyscall)
-	http.HandleFunc("/sched", httpSched)
-}
-
-// Record represents one entry in pprof-like profiles.
-type Record struct {
-	stk  []*trace.Frame
-	n    uint64
-	time int64
-}
-
-// httpIO serves IO pprof-like profile (time spent in IO wait).
-func httpIO(w http.ResponseWriter, r *http.Request) {
-	events, err := parseEvents()
-	if err != nil {
-		http.Error(w, err.Error(), http.StatusInternalServerError)
-		return
-	}
-	prof := make(map[uint64]Record)
-	for _, ev := range events {
-		if ev.Type != trace.EvGoBlockNet || ev.Link == nil || ev.StkID == 0 || len(ev.Stk) == 0 {
-			continue
-		}
-		rec := prof[ev.StkID]
-		rec.stk = ev.Stk
-		rec.n++
-		rec.time += ev.Link.Ts - ev.Ts
-		prof[ev.StkID] = rec
-	}
-	serveSVGProfile(w, r, prof)
-}
-
-// httpBlock serves blocking pprof-like profile (time spent blocked on synchronization primitives).
-func httpBlock(w http.ResponseWriter, r *http.Request) {
-	events, err := parseEvents()
-	if err != nil {
-		http.Error(w, err.Error(), http.StatusInternalServerError)
-		return
-	}
-	prof := make(map[uint64]Record)
-	for _, ev := range events {
-		switch ev.Type {
-		case trace.EvGoBlockSend, trace.EvGoBlockRecv, trace.EvGoBlockSelect,
-			trace.EvGoBlockSync, trace.EvGoBlockCond:
-		default:
-			continue
-		}
-		if ev.Link == nil || ev.StkID == 0 || len(ev.Stk) == 0 {
-			continue
-		}
-		rec := prof[ev.StkID]
-		rec.stk = ev.Stk
-		rec.n++
-		rec.time += ev.Link.Ts - ev.Ts
-		prof[ev.StkID] = rec
-	}
-	serveSVGProfile(w, r, prof)
-}
-
-// httpSyscall serves syscall pprof-like profile (time spent blocked in syscalls).
-func httpSyscall(w http.ResponseWriter, r *http.Request) {
-	events, err := parseEvents()
-	if err != nil {
-		http.Error(w, err.Error(), http.StatusInternalServerError)
-		return
-	}
-	prof := make(map[uint64]Record)
-	for _, ev := range events {
-		if ev.Type != trace.EvGoSysCall || ev.Link == nil || ev.StkID == 0 || len(ev.Stk) == 0 {
-			continue
-		}
-		rec := prof[ev.StkID]
-		rec.stk = ev.Stk
-		rec.n++
-		rec.time += ev.Link.Ts - ev.Ts
-		prof[ev.StkID] = rec
-	}
-	serveSVGProfile(w, r, prof)
-}
-
-// httpSched serves scheduler latency pprof-like profile
-// (time between a goroutine become runnable and actually scheduled for execution).
-func httpSched(w http.ResponseWriter, r *http.Request) {
-	events, err := parseEvents()
-	if err != nil {
-		http.Error(w, err.Error(), http.StatusInternalServerError)
-		return
-	}
-	prof := make(map[uint64]Record)
-	for _, ev := range events {
-		if (ev.Type != trace.EvGoUnblock && ev.Type != trace.EvGoCreate) ||
-			ev.Link == nil || ev.StkID == 0 || len(ev.Stk) == 0 {
-			continue
-		}
-		rec := prof[ev.StkID]
-		rec.stk = ev.Stk
-		rec.n++
-		rec.time += ev.Link.Ts - ev.Ts
-		prof[ev.StkID] = rec
-	}
-	serveSVGProfile(w, r, prof)
-}
-
-// generateSVGProfile generates pprof-like profile stored in prof and writes in to w.
-func serveSVGProfile(w http.ResponseWriter, r *http.Request, prof map[uint64]Record) {
-	if len(prof) == 0 {
-		http.Error(w, "The profile is empty", http.StatusNotFound)
-		return
-	}
-	blockf, err := ioutil.TempFile("", "block")
-	if err != nil {
-		http.Error(w, fmt.Sprintf("failed to create temp file: %v", err), http.StatusInternalServerError)
-		return
-	}
-	defer os.Remove(blockf.Name())
-	blockb := bufio.NewWriter(blockf)
-	fmt.Fprintf(blockb, "--- contention:\ncycles/second=1000000000\n")
-	for _, rec := range prof {
-		fmt.Fprintf(blockb, "%v %v @", rec.time, rec.n)
-		for _, f := range rec.stk {
-			fmt.Fprintf(blockb, " 0x%x", f.PC)
-		}
-		fmt.Fprintf(blockb, "\n")
-	}
-	err = blockb.Flush()
-	if err != nil {
-		http.Error(w, fmt.Sprintf("failed to flush temp file: %v", err), http.StatusInternalServerError)
-		return
-	}
-	err = blockf.Close()
-	if err != nil {
-		http.Error(w, fmt.Sprintf("failed to close temp file: %v", err), http.StatusInternalServerError)
-		return
-	}
-
-	svgFilename := blockf.Name() + ".svg"
-	_, err = exec.Command("go", "tool", "pprof", "-svg", "-output", svgFilename, programBinary, blockf.Name()).CombinedOutput()
-	if err != nil {
-		http.Error(w, fmt.Sprintf("failed to execute go tool pprof: %v", err), http.StatusInternalServerError)
-		return
-	}
-	defer os.Remove(svgFilename)
-	w.Header().Set("Content-Type", "image/svg+xml")
-	http.ServeFile(w, r, svgFilename)
-}
diff --git a/src/cmd/trace/trace.go b/src/cmd/trace/trace.go
deleted file mode 100644
index e6eb320..0000000
--- a/src/cmd/trace/trace.go
+++ /dev/null
@@ -1,445 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
-	"encoding/json"
-	"fmt"
-	"internal/trace"
-	"log"
-	"net/http"
-	"path/filepath"
-	"runtime"
-	"strconv"
-	"strings"
-)
-
-func init() {
-	http.HandleFunc("/trace", httpTrace)
-	http.HandleFunc("/jsontrace", httpJsonTrace)
-	http.HandleFunc("/trace_viewer_html", httpTraceViewerHTML)
-}
-
-// httpTrace serves either whole trace (goid==0) or trace for goid goroutine.
-func httpTrace(w http.ResponseWriter, r *http.Request) {
-	_, err := parseEvents()
-	if err != nil {
-		http.Error(w, err.Error(), http.StatusInternalServerError)
-		return
-	}
-
-	params := ""
-	if goids := r.FormValue("goid"); goids != "" {
-		goid, err := strconv.ParseUint(goids, 10, 64)
-		if err != nil {
-			http.Error(w, fmt.Sprintf("failed to parse goid parameter '%v': %v", goids, err), http.StatusInternalServerError)
-			return
-		}
-		params = fmt.Sprintf("?goid=%v", goid)
-	}
-	html := strings.Replace(templTrace, "{{PARAMS}}", params, -1)
-	w.Write([]byte(html))
-
-}
-
-var templTrace = `
-<html>
-	<head>
-		<link href="/trace_viewer_html" rel="import">
-		<script>
-			document.addEventListener("DOMContentLoaded", function(event) {
-				var viewer = new tr.TraceViewer('/jsontrace{{PARAMS}}');
-				document.body.appendChild(viewer);
-			});
-		</script>
-	</head>
-	<body>
-	</body>
-</html>
-`
-
-// httpTraceViewerHTML serves static part of trace-viewer.
-// This URL is queried from templTrace HTML.
-func httpTraceViewerHTML(w http.ResponseWriter, r *http.Request) {
-	http.ServeFile(w, r, filepath.Join(runtime.GOROOT(), "misc", "trace", "trace_viewer_lean.html"))
-}
-
-// httpJsonTrace serves json trace, requested from within templTrace HTML.
-func httpJsonTrace(w http.ResponseWriter, r *http.Request) {
-	// This is an AJAX handler, so instead of http.Error we use log.Printf to log errors.
-	events, err := parseEvents()
-	if err != nil {
-		log.Printf("failed to parse trace: %v", err)
-		return
-	}
-
-	params := &traceParams{
-		events:  events,
-		endTime: int64(1<<63 - 1),
-	}
-
-	if goids := r.FormValue("goid"); goids != "" {
-		goid, err := strconv.ParseUint(goids, 10, 64)
-		if err != nil {
-			log.Printf("failed to parse goid parameter '%v': %v", goids, err)
-			return
-		}
-		analyzeGoroutines(events)
-		g := gs[goid]
-		params.gtrace = true
-		params.startTime = g.StartTime
-		params.endTime = g.EndTime
-		params.maing = goid
-		params.gs = trace.RelatedGoroutines(events, goid)
-	}
-
-	err = json.NewEncoder(w).Encode(generateTrace(params))
-	if err != nil {
-		log.Printf("failed to serialize trace: %v", err)
-		return
-	}
-}
-
-type traceParams struct {
-	events    []*trace.Event
-	gtrace    bool
-	startTime int64
-	endTime   int64
-	maing     uint64
-	gs        map[uint64]bool
-}
-
-type traceContext struct {
-	*traceParams
-	data      ViewerData
-	frameTree frameNode
-	frameSeq  int
-	arrowSeq  uint64
-	heapAlloc uint64
-	nextGC    uint64
-	gcount    uint64
-	grunnable uint64
-	grunning  uint64
-	insyscall uint64
-	prunning  uint64
-}
-
-type frameNode struct {
-	id       int
-	children map[uint64]frameNode
-}
-
-type ViewerData struct {
-	Events   []*ViewerEvent         `json:"traceEvents"`
-	Frames   map[string]ViewerFrame `json:"stackFrames"`
-	TimeUnit string                 `json:"displayTimeUnit"`
-}
-
-type ViewerEvent struct {
-	Name     string      `json:"name,omitempty"`
-	Phase    string      `json:"ph"`
-	Scope    string      `json:"s,omitempty"`
-	Time     float64     `json:"ts"`
-	Dur      float64     `json:"dur,omitempty"`
-	Pid      uint64      `json:"pid"`
-	Tid      uint64      `json:"tid"`
-	ID       uint64      `json:"id,omitempty"`
-	Stack    int         `json:"sf,omitempty"`
-	EndStack int         `json:"esf,omitempty"`
-	Arg      interface{} `json:"args,omitempty"`
-}
-
-type ViewerFrame struct {
-	Name   string `json:"name"`
-	Parent int    `json:"parent,omitempty"`
-}
-
-type NameArg struct {
-	Name string `json:"name"`
-}
-
-type SortIndexArg struct {
-	Index int `json:"sort_index"`
-}
-
-// generateTrace generates json trace for trace-viewer:
-// https://github.com/google/trace-viewer
-// Trace format is described at:
-// https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/view
-// If gtrace=true, generate trace for goroutine goid, otherwise whole trace.
-// startTime, endTime determine part of the trace that we are interested in.
-// gset restricts goroutines that are included in the resulting trace.
-func generateTrace(params *traceParams) ViewerData {
-	ctx := &traceContext{traceParams: params}
-	ctx.frameTree.children = make(map[uint64]frameNode)
-	ctx.data.Frames = make(map[string]ViewerFrame)
-	ctx.data.TimeUnit = "ns"
-	maxProc := 0
-	gnames := make(map[uint64]string)
-	for _, ev := range ctx.events {
-		// Handle trace.EvGoStart separately, because we need the goroutine name
-		// even if ignore the event otherwise.
-		if ev.Type == trace.EvGoStart {
-			if _, ok := gnames[ev.G]; !ok {
-				if len(ev.Stk) > 0 {
-					gnames[ev.G] = fmt.Sprintf("G%v %s", ev.G, ev.Stk[0].Fn)
-				} else {
-					gnames[ev.G] = fmt.Sprintf("G%v", ev.G)
-				}
-			}
-		}
-
-		// Ignore events that are from uninteresting goroutines
-		// or outside of the interesting timeframe.
-		if ctx.gs != nil && ev.P < trace.FakeP && !ctx.gs[ev.G] {
-			continue
-		}
-		if ev.Ts < ctx.startTime || ev.Ts > ctx.endTime {
-			continue
-		}
-
-		if ev.P < trace.FakeP && ev.P > maxProc {
-			maxProc = ev.P
-		}
-
-		switch ev.Type {
-		case trace.EvProcStart:
-			if ctx.gtrace {
-				continue
-			}
-			ctx.prunning++
-			ctx.emitThreadCounters(ev)
-			ctx.emitInstant(ev, "proc start")
-		case trace.EvProcStop:
-			if ctx.gtrace {
-				continue
-			}
-			ctx.prunning--
-			ctx.emitThreadCounters(ev)
-			ctx.emitInstant(ev, "proc stop")
-		case trace.EvGCStart:
-			ctx.emitSlice(ev, "GC")
-		case trace.EvGCDone:
-		case trace.EvGCScanStart:
-			if ctx.gtrace {
-				continue
-			}
-			ctx.emitSlice(ev, "MARK")
-		case trace.EvGCScanDone:
-		case trace.EvGCSweepStart:
-			ctx.emitSlice(ev, "SWEEP")
-		case trace.EvGCSweepDone:
-		case trace.EvGoStart:
-			ctx.grunnable--
-			ctx.grunning++
-			ctx.emitGoroutineCounters(ev)
-			ctx.emitSlice(ev, gnames[ev.G])
-		case trace.EvGoCreate:
-			ctx.gcount++
-			ctx.grunnable++
-			ctx.emitGoroutineCounters(ev)
-			ctx.emitArrow(ev, "go")
-		case trace.EvGoEnd:
-			ctx.gcount--
-			ctx.grunning--
-			ctx.emitGoroutineCounters(ev)
-		case trace.EvGoUnblock:
-			ctx.grunnable++
-			ctx.emitGoroutineCounters(ev)
-			ctx.emitArrow(ev, "unblock")
-		case trace.EvGoSysCall:
-			ctx.emitInstant(ev, "syscall")
-		case trace.EvGoSysExit:
-			ctx.grunnable++
-			ctx.emitGoroutineCounters(ev)
-			ctx.insyscall--
-			ctx.emitThreadCounters(ev)
-			ctx.emitArrow(ev, "sysexit")
-		case trace.EvGoSysBlock:
-			ctx.grunning--
-			ctx.emitGoroutineCounters(ev)
-			ctx.insyscall++
-			ctx.emitThreadCounters(ev)
-		case trace.EvGoSched, trace.EvGoPreempt:
-			ctx.grunnable++
-			ctx.grunning--
-			ctx.emitGoroutineCounters(ev)
-		case trace.EvGoStop,
-			trace.EvGoSleep, trace.EvGoBlock, trace.EvGoBlockSend, trace.EvGoBlockRecv,
-			trace.EvGoBlockSelect, trace.EvGoBlockSync, trace.EvGoBlockCond, trace.EvGoBlockNet:
-			ctx.grunning--
-			ctx.emitGoroutineCounters(ev)
-		case trace.EvGoWaiting:
-			ctx.grunnable--
-			ctx.emitGoroutineCounters(ev)
-		case trace.EvGoInSyscall:
-			ctx.insyscall++
-			ctx.emitThreadCounters(ev)
-		case trace.EvHeapAlloc:
-			ctx.heapAlloc = ev.Args[0]
-			ctx.emitHeapCounters(ev)
-		case trace.EvNextGC:
-			ctx.nextGC = ev.Args[0]
-			ctx.emitHeapCounters(ev)
-		}
-	}
-
-	ctx.emit(&ViewerEvent{Name: "process_name", Phase: "M", Pid: 0, Arg: &NameArg{"PROCS"}})
-	ctx.emit(&ViewerEvent{Name: "process_sort_index", Phase: "M", Pid: 0, Arg: &SortIndexArg{1}})
-
-	ctx.emit(&ViewerEvent{Name: "process_name", Phase: "M", Pid: 1, Arg: &NameArg{"STATS"}})
-	ctx.emit(&ViewerEvent{Name: "process_sort_index", Phase: "M", Pid: 1, Arg: &SortIndexArg{0}})
-
-	ctx.emit(&ViewerEvent{Name: "thread_name", Phase: "M", Pid: 0, Tid: trace.NetpollP, Arg: &NameArg{"Network"}})
-	ctx.emit(&ViewerEvent{Name: "thread_sort_index", Phase: "M", Pid: 0, Tid: trace.NetpollP, Arg: &SortIndexArg{-5}})
-
-	ctx.emit(&ViewerEvent{Name: "thread_name", Phase: "M", Pid: 0, Tid: trace.TimerP, Arg: &NameArg{"Timers"}})
-	ctx.emit(&ViewerEvent{Name: "thread_sort_index", Phase: "M", Pid: 0, Tid: trace.TimerP, Arg: &SortIndexArg{-4}})
-
-	ctx.emit(&ViewerEvent{Name: "thread_name", Phase: "M", Pid: 0, Tid: trace.SyscallP, Arg: &NameArg{"Syscalls"}})
-	ctx.emit(&ViewerEvent{Name: "thread_sort_index", Phase: "M", Pid: 0, Tid: trace.SyscallP, Arg: &SortIndexArg{-3}})
-
-	if !ctx.gtrace {
-		for i := 0; i <= maxProc; i++ {
-			ctx.emit(&ViewerEvent{Name: "thread_name", Phase: "M", Pid: 0, Tid: uint64(i), Arg: &NameArg{fmt.Sprintf("Proc %v", i)}})
-			ctx.emit(&ViewerEvent{Name: "thread_sort_index", Phase: "M", Pid: 0, Tid: uint64(i), Arg: &SortIndexArg{i}})
-		}
-	}
-
-	if ctx.gtrace && ctx.gs != nil {
-		for k, v := range gnames {
-			if !ctx.gs[k] {
-				continue
-			}
-			ctx.emit(&ViewerEvent{Name: "thread_name", Phase: "M", Pid: 0, Tid: k, Arg: &NameArg{v}})
-		}
-		ctx.emit(&ViewerEvent{Name: "thread_sort_index", Phase: "M", Pid: 0, Tid: ctx.maing, Arg: &SortIndexArg{-2}})
-		ctx.emit(&ViewerEvent{Name: "thread_sort_index", Phase: "M", Pid: 0, Tid: 0, Arg: &SortIndexArg{-1}})
-	}
-
-	return ctx.data
-}
-
-func (ctx *traceContext) emit(e *ViewerEvent) {
-	ctx.data.Events = append(ctx.data.Events, e)
-}
-
-func (ctx *traceContext) time(ev *trace.Event) float64 {
-	// Trace viewer wants timestamps in microseconds.
-	return float64(ev.Ts-ctx.startTime) / 1000
-}
-
-func (ctx *traceContext) proc(ev *trace.Event) uint64 {
-	if ctx.gtrace && ev.P < trace.FakeP {
-		return ev.G
-	} else {
-		return uint64(ev.P)
-	}
-}
-
-func (ctx *traceContext) emitSlice(ev *trace.Event, name string) {
-	ctx.emit(&ViewerEvent{
-		Name:     name,
-		Phase:    "X",
-		Time:     ctx.time(ev),
-		Dur:      ctx.time(ev.Link) - ctx.time(ev),
-		Tid:      ctx.proc(ev),
-		Stack:    ctx.stack(ev.Stk),
-		EndStack: ctx.stack(ev.Link.Stk),
-	})
-}
-
-func (ctx *traceContext) emitHeapCounters(ev *trace.Event) {
-	type Arg struct {
-		Allocated uint64
-		NextGC    uint64
-	}
-	if ctx.gtrace {
-		return
-	}
-	diff := uint64(0)
-	if ctx.nextGC > ctx.heapAlloc {
-		diff = ctx.nextGC - ctx.heapAlloc
-	}
-	ctx.emit(&ViewerEvent{Name: "Heap", Phase: "C", Time: ctx.time(ev), Pid: 1, Arg: &Arg{ctx.heapAlloc, diff}})
-}
-
-func (ctx *traceContext) emitGoroutineCounters(ev *trace.Event) {
-	type Arg struct {
-		Running  uint64
-		Runnable uint64
-	}
-	if ctx.gtrace {
-		return
-	}
-	ctx.emit(&ViewerEvent{Name: "Goroutines", Phase: "C", Time: ctx.time(ev), Pid: 1, Arg: &Arg{ctx.grunning, ctx.grunnable}})
-}
-
-func (ctx *traceContext) emitThreadCounters(ev *trace.Event) {
-	type Arg struct {
-		Running   uint64
-		InSyscall uint64
-	}
-	if ctx.gtrace {
-		return
-	}
-	ctx.emit(&ViewerEvent{Name: "Threads", Phase: "C", Time: ctx.time(ev), Pid: 1, Arg: &Arg{ctx.prunning, ctx.insyscall}})
-}
-
-func (ctx *traceContext) emitInstant(ev *trace.Event, name string) {
-	var arg interface{}
-	if ev.Type == trace.EvProcStart {
-		type Arg struct {
-			ThreadID uint64
-		}
-		arg = &Arg{ev.Args[0]}
-	}
-	ctx.emit(&ViewerEvent{Name: name, Phase: "I", Scope: "t", Time: ctx.time(ev), Tid: ctx.proc(ev), Stack: ctx.stack(ev.Stk), Arg: arg})
-}
-
-func (ctx *traceContext) emitArrow(ev *trace.Event, name string) {
-	if ev.Link == nil {
-		// The other end of the arrow is not captured in the trace.
-		// For example, a goroutine was unblocked but was not scheduled before trace stop.
-		return
-	}
-	if ctx.gtrace && (!ctx.gs[ev.Link.G] || ev.Link.Ts < ctx.startTime || ev.Link.Ts > ctx.endTime) {
-		return
-	}
-
-	if ev.P == trace.NetpollP || ev.P == trace.TimerP || ev.P == trace.SyscallP {
-		// Trace-viewer discards arrows if they don't start/end inside of a slice or instant.
-		// So emit a fake instant at the start of the arrow.
-		ctx.emitInstant(&trace.Event{P: ev.P, Ts: ev.Ts}, "unblock")
-	}
-
-	ctx.arrowSeq++
-	ctx.emit(&ViewerEvent{Name: name, Phase: "s", Tid: ctx.proc(ev), ID: ctx.arrowSeq, Time: ctx.time(ev), Stack: ctx.stack(ev.Stk)})
-	ctx.emit(&ViewerEvent{Name: name, Phase: "t", Tid: ctx.proc(ev.Link), ID: ctx.arrowSeq, Time: ctx.time(ev.Link)})
-}
-
-func (ctx *traceContext) stack(stk []*trace.Frame) int {
-	return ctx.buildBranch(ctx.frameTree, stk)
-}
-
-// buildBranch builds one branch in the prefix tree rooted at ctx.frameTree.
-func (ctx *traceContext) buildBranch(parent frameNode, stk []*trace.Frame) int {
-	if len(stk) == 0 {
-		return parent.id
-	}
-	last := len(stk) - 1
-	frame := stk[last]
-	stk = stk[:last]
-
-	node, ok := parent.children[frame.PC]
-	if !ok {
-		ctx.frameSeq++
-		node.id = ctx.frameSeq
-		node.children = make(map[uint64]frameNode)
-		parent.children[frame.PC] = node
-		ctx.data.Frames[strconv.Itoa(node.id)] = ViewerFrame{fmt.Sprintf("%v:%v", frame.Fn, frame.Line), parent.id}
-	}
-	return ctx.buildBranch(node, stk)
-}
diff --git a/src/cmd/vet/asmdecl.go b/src/cmd/vet/asmdecl.go
deleted file mode 100644
index e4a9871..0000000
--- a/src/cmd/vet/asmdecl.go
+++ /dev/null
@@ -1,662 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Identify mismatches between assembly files and Go func declarations.
-
-package main
-
-import (
-	"bytes"
-	"fmt"
-	"go/ast"
-	"go/token"
-	"regexp"
-	"strconv"
-	"strings"
-)
-
-// 'kind' is a kind of assembly variable.
-// The kinds 1, 2, 4, 8 stand for values of that size.
-type asmKind int
-
-// These special kinds are not valid sizes.
-const (
-	asmString asmKind = 100 + iota
-	asmSlice
-	asmInterface
-	asmEmptyInterface
-)
-
-// An asmArch describes assembly parameters for an architecture
-type asmArch struct {
-	name      string
-	ptrSize   int
-	intSize   int
-	maxAlign  int
-	bigEndian bool
-	stack     string
-	lr        bool
-}
-
-// An asmFunc describes the expected variables for a function on a given architecture.
-type asmFunc struct {
-	arch        *asmArch
-	size        int // size of all arguments
-	vars        map[string]*asmVar
-	varByOffset map[int]*asmVar
-}
-
-// An asmVar describes a single assembly variable.
-type asmVar struct {
-	name  string
-	kind  asmKind
-	typ   string
-	off   int
-	size  int
-	inner []*asmVar
-}
-
-var (
-	asmArch386      = asmArch{"386", 4, 4, 4, false, "SP", false}
-	asmArchArm      = asmArch{"arm", 4, 4, 4, false, "R13", true}
-	asmArchArm64    = asmArch{"arm64", 8, 8, 8, false, "RSP", true}
-	asmArchAmd64    = asmArch{"amd64", 8, 8, 8, false, "SP", false}
-	asmArchAmd64p32 = asmArch{"amd64p32", 4, 4, 8, false, "SP", false}
-	asmArchPpc64    = asmArch{"ppc64", 8, 8, 8, true, "R1", true}
-	asmArchPpc64LE  = asmArch{"ppc64le", 8, 8, 8, false, "R1", true}
-
-	arches = []*asmArch{
-		&asmArch386,
-		&asmArchArm,
-		&asmArchArm64,
-		&asmArchAmd64,
-		&asmArchAmd64p32,
-		&asmArchPpc64,
-		&asmArchPpc64LE,
-	}
-)
-
-var (
-	re           = regexp.MustCompile
-	asmPlusBuild = re(`//\s+\+build\s+([^\n]+)`)
-	asmTEXT      = re(`\bTEXT\b.*·([^\(]+)\(SB\)(?:\s*,\s*([0-9A-Z|+]+))?(?:\s*,\s*\$(-?[0-9]+)(?:-([0-9]+))?)?`)
-	asmDATA      = re(`\b(DATA|GLOBL)\b`)
-	asmNamedFP   = re(`([a-zA-Z0-9_\xFF-\x{10FFFF}]+)(?:\+([0-9]+))\(FP\)`)
-	asmUnnamedFP = re(`[^+\-0-9](([0-9]+)\(FP\))`)
-	asmSP        = re(`[^+\-0-9](([0-9]+)\(([A-Z0-9]+)\))`)
-	asmOpcode    = re(`^\s*(?:[A-Z0-9a-z_]+:)?\s*([A-Z]+)\s*([^,]*)(?:,\s*(.*))?`)
-	ppc64Suff    = re(`([BHWD])(ZU|Z|U|BR)?$`)
-)
-
-func asmCheck(pkg *Package) {
-	if !vet("asmdecl") {
-		return
-	}
-
-	// No work if no assembly files.
-	if !pkg.hasFileWithSuffix(".s") {
-		return
-	}
-
-	// Gather declarations. knownFunc[name][arch] is func description.
-	knownFunc := make(map[string]map[string]*asmFunc)
-
-	for _, f := range pkg.files {
-		if f.file != nil {
-			for _, decl := range f.file.Decls {
-				if decl, ok := decl.(*ast.FuncDecl); ok && decl.Body == nil {
-					knownFunc[decl.Name.Name] = f.asmParseDecl(decl)
-				}
-			}
-		}
-	}
-
-Files:
-	for _, f := range pkg.files {
-		if !strings.HasSuffix(f.name, ".s") {
-			continue
-		}
-		Println("Checking file", f.name)
-
-		// Determine architecture from file name if possible.
-		var arch string
-		var archDef *asmArch
-		for _, a := range arches {
-			if strings.HasSuffix(f.name, "_"+a.name+".s") {
-				arch = a.name
-				archDef = a
-				break
-			}
-		}
-
-		lines := strings.SplitAfter(string(f.content), "\n")
-		var (
-			fn                 *asmFunc
-			fnName             string
-			localSize, argSize int
-			wroteSP            bool
-			haveRetArg         bool
-			retLine            []int
-		)
-
-		flushRet := func() {
-			if fn != nil && fn.vars["ret"] != nil && !haveRetArg && len(retLine) > 0 {
-				v := fn.vars["ret"]
-				for _, line := range retLine {
-					f.Badf(token.NoPos, "%s:%d: [%s] %s: RET without writing to %d-byte ret+%d(FP)", f.name, line, arch, fnName, v.size, v.off)
-				}
-			}
-			retLine = nil
-		}
-		for lineno, line := range lines {
-			lineno++
-
-			badf := func(format string, args ...interface{}) {
-				f.Badf(token.NoPos, "%s:%d: [%s] %s: %s", f.name, lineno, arch, fnName, fmt.Sprintf(format, args...))
-			}
-
-			if arch == "" {
-				// Determine architecture from +build line if possible.
-				if m := asmPlusBuild.FindStringSubmatch(line); m != nil {
-				Fields:
-					for _, fld := range strings.Fields(m[1]) {
-						for _, a := range arches {
-							if a.name == fld {
-								arch = a.name
-								archDef = a
-								break Fields
-							}
-						}
-					}
-				}
-			}
-
-			if m := asmTEXT.FindStringSubmatch(line); m != nil {
-				flushRet()
-				if arch == "" {
-					f.Warnf(token.NoPos, "%s: cannot determine architecture for assembly file", f.name)
-					continue Files
-				}
-				fnName = m[1]
-				fn = knownFunc[m[1]][arch]
-				if fn != nil {
-					size, _ := strconv.Atoi(m[4])
-					if size != fn.size && (m[2] != "7" && !strings.Contains(m[2], "NOSPLIT") || size != 0) {
-						badf("wrong argument size %d; expected $...-%d", size, fn.size)
-					}
-				}
-				localSize, _ = strconv.Atoi(m[3])
-				localSize += archDef.intSize
-				if archDef.lr {
-					// Account for caller's saved LR
-					localSize += archDef.intSize
-				}
-				argSize, _ = strconv.Atoi(m[4])
-				if fn == nil && !strings.Contains(fnName, "<>") {
-					badf("function %s missing Go declaration", fnName)
-				}
-				wroteSP = false
-				haveRetArg = false
-				continue
-			} else if strings.Contains(line, "TEXT") && strings.Contains(line, "SB") {
-				// function, but not visible from Go (didn't match asmTEXT), so stop checking
-				flushRet()
-				fn = nil
-				fnName = ""
-				continue
-			}
-
-			if strings.Contains(line, "RET") {
-				retLine = append(retLine, lineno)
-			}
-
-			if fnName == "" {
-				continue
-			}
-
-			if asmDATA.FindStringSubmatch(line) != nil {
-				fn = nil
-			}
-
-			if archDef == nil {
-				continue
-			}
-
-			if strings.Contains(line, ", "+archDef.stack) || strings.Contains(line, ",\t"+archDef.stack) {
-				wroteSP = true
-				continue
-			}
-
-			for _, m := range asmSP.FindAllStringSubmatch(line, -1) {
-				if m[3] != archDef.stack || wroteSP {
-					continue
-				}
-				off := 0
-				if m[1] != "" {
-					off, _ = strconv.Atoi(m[2])
-				}
-				if off >= localSize {
-					if fn != nil {
-						v := fn.varByOffset[off-localSize]
-						if v != nil {
-							badf("%s should be %s+%d(FP)", m[1], v.name, off-localSize)
-							continue
-						}
-					}
-					if off >= localSize+argSize {
-						badf("use of %s points beyond argument frame", m[1])
-						continue
-					}
-					badf("use of %s to access argument frame", m[1])
-				}
-			}
-
-			if fn == nil {
-				continue
-			}
-
-			for _, m := range asmUnnamedFP.FindAllStringSubmatch(line, -1) {
-				off, _ := strconv.Atoi(m[2])
-				v := fn.varByOffset[off]
-				if v != nil {
-					badf("use of unnamed argument %s; offset %d is %s+%d(FP)", m[1], off, v.name, v.off)
-				} else {
-					badf("use of unnamed argument %s", m[1])
-				}
-			}
-
-			for _, m := range asmNamedFP.FindAllStringSubmatch(line, -1) {
-				name := m[1]
-				off := 0
-				if m[2] != "" {
-					off, _ = strconv.Atoi(m[2])
-				}
-				if name == "ret" || strings.HasPrefix(name, "ret_") {
-					haveRetArg = true
-				}
-				v := fn.vars[name]
-				if v == nil {
-					// Allow argframe+0(FP).
-					if name == "argframe" && off == 0 {
-						continue
-					}
-					v = fn.varByOffset[off]
-					if v != nil {
-						badf("unknown variable %s; offset %d is %s+%d(FP)", name, off, v.name, v.off)
-					} else {
-						badf("unknown variable %s", name)
-					}
-					continue
-				}
-				asmCheckVar(badf, fn, line, m[0], off, v)
-			}
-		}
-		flushRet()
-	}
-}
-
-// asmParseDecl parses a function decl for expected assembly variables.
-func (f *File) asmParseDecl(decl *ast.FuncDecl) map[string]*asmFunc {
-	var (
-		arch   *asmArch
-		fn     *asmFunc
-		offset int
-		failed bool
-	)
-
-	addVar := func(outer string, v asmVar) {
-		if vo := fn.vars[outer]; vo != nil {
-			vo.inner = append(vo.inner, &v)
-		}
-		fn.vars[v.name] = &v
-		for i := 0; i < v.size; i++ {
-			fn.varByOffset[v.off+i] = &v
-		}
-	}
-
-	addParams := func(list []*ast.Field) {
-		for i, fld := range list {
-			// Determine alignment, size, and kind of type in declaration.
-			var align, size int
-			var kind asmKind
-			names := fld.Names
-			typ := f.gofmt(fld.Type)
-			switch t := fld.Type.(type) {
-			default:
-				switch typ {
-				default:
-					f.Warnf(fld.Type.Pos(), "unknown assembly argument type %s", typ)
-					failed = true
-					return
-				case "int8", "uint8", "byte", "bool":
-					size = 1
-				case "int16", "uint16":
-					size = 2
-				case "int32", "uint32", "float32":
-					size = 4
-				case "int64", "uint64", "float64":
-					align = arch.maxAlign
-					size = 8
-				case "int", "uint":
-					size = arch.intSize
-				case "uintptr", "iword", "Word", "Errno", "unsafe.Pointer":
-					size = arch.ptrSize
-				case "string", "ErrorString":
-					size = arch.ptrSize * 2
-					align = arch.ptrSize
-					kind = asmString
-				}
-			case *ast.ChanType, *ast.FuncType, *ast.MapType, *ast.StarExpr:
-				size = arch.ptrSize
-			case *ast.InterfaceType:
-				align = arch.ptrSize
-				size = 2 * arch.ptrSize
-				if len(t.Methods.List) > 0 {
-					kind = asmInterface
-				} else {
-					kind = asmEmptyInterface
-				}
-			case *ast.ArrayType:
-				if t.Len == nil {
-					size = arch.ptrSize + 2*arch.intSize
-					align = arch.ptrSize
-					kind = asmSlice
-					break
-				}
-				f.Warnf(fld.Type.Pos(), "unsupported assembly argument type %s", typ)
-				failed = true
-			case *ast.StructType:
-				f.Warnf(fld.Type.Pos(), "unsupported assembly argument type %s", typ)
-				failed = true
-			}
-			if align == 0 {
-				align = size
-			}
-			if kind == 0 {
-				kind = asmKind(size)
-			}
-			offset += -offset & (align - 1)
-
-			// Create variable for each name being declared with this type.
-			if len(names) == 0 {
-				name := "unnamed"
-				if decl.Type.Results != nil && len(decl.Type.Results.List) > 0 && &list[0] == &decl.Type.Results.List[0] && i == 0 {
-					// Assume assembly will refer to single unnamed result as r.
-					name = "ret"
-				}
-				names = []*ast.Ident{{Name: name}}
-			}
-			for _, id := range names {
-				name := id.Name
-				addVar("", asmVar{
-					name: name,
-					kind: kind,
-					typ:  typ,
-					off:  offset,
-					size: size,
-				})
-				switch kind {
-				case 8:
-					if arch.ptrSize == 4 {
-						w1, w2 := "lo", "hi"
-						if arch.bigEndian {
-							w1, w2 = w2, w1
-						}
-						addVar(name, asmVar{
-							name: name + "_" + w1,
-							kind: 4,
-							typ:  "half " + typ,
-							off:  offset,
-							size: 4,
-						})
-						addVar(name, asmVar{
-							name: name + "_" + w2,
-							kind: 4,
-							typ:  "half " + typ,
-							off:  offset + 4,
-							size: 4,
-						})
-					}
-
-				case asmEmptyInterface:
-					addVar(name, asmVar{
-						name: name + "_type",
-						kind: asmKind(arch.ptrSize),
-						typ:  "interface type",
-						off:  offset,
-						size: arch.ptrSize,
-					})
-					addVar(name, asmVar{
-						name: name + "_data",
-						kind: asmKind(arch.ptrSize),
-						typ:  "interface data",
-						off:  offset + arch.ptrSize,
-						size: arch.ptrSize,
-					})
-
-				case asmInterface:
-					addVar(name, asmVar{
-						name: name + "_itable",
-						kind: asmKind(arch.ptrSize),
-						typ:  "interface itable",
-						off:  offset,
-						size: arch.ptrSize,
-					})
-					addVar(name, asmVar{
-						name: name + "_data",
-						kind: asmKind(arch.ptrSize),
-						typ:  "interface data",
-						off:  offset + arch.ptrSize,
-						size: arch.ptrSize,
-					})
-
-				case asmSlice:
-					addVar(name, asmVar{
-						name: name + "_base",
-						kind: asmKind(arch.ptrSize),
-						typ:  "slice base",
-						off:  offset,
-						size: arch.ptrSize,
-					})
-					addVar(name, asmVar{
-						name: name + "_len",
-						kind: asmKind(arch.intSize),
-						typ:  "slice len",
-						off:  offset + arch.ptrSize,
-						size: arch.intSize,
-					})
-					addVar(name, asmVar{
-						name: name + "_cap",
-						kind: asmKind(arch.intSize),
-						typ:  "slice cap",
-						off:  offset + arch.ptrSize + arch.intSize,
-						size: arch.intSize,
-					})
-
-				case asmString:
-					addVar(name, asmVar{
-						name: name + "_base",
-						kind: asmKind(arch.ptrSize),
-						typ:  "string base",
-						off:  offset,
-						size: arch.ptrSize,
-					})
-					addVar(name, asmVar{
-						name: name + "_len",
-						kind: asmKind(arch.intSize),
-						typ:  "string len",
-						off:  offset + arch.ptrSize,
-						size: arch.intSize,
-					})
-				}
-				offset += size
-			}
-		}
-	}
-
-	m := make(map[string]*asmFunc)
-	for _, arch = range arches {
-		fn = &asmFunc{
-			arch:        arch,
-			vars:        make(map[string]*asmVar),
-			varByOffset: make(map[int]*asmVar),
-		}
-		offset = 0
-		addParams(decl.Type.Params.List)
-		if decl.Type.Results != nil && len(decl.Type.Results.List) > 0 {
-			offset += -offset & (arch.maxAlign - 1)
-			addParams(decl.Type.Results.List)
-		}
-		fn.size = offset
-		m[arch.name] = fn
-	}
-
-	if failed {
-		return nil
-	}
-	return m
-}
-
-// asmCheckVar checks a single variable reference.
-func asmCheckVar(badf func(string, ...interface{}), fn *asmFunc, line, expr string, off int, v *asmVar) {
-	m := asmOpcode.FindStringSubmatch(line)
-	if m == nil {
-		if !strings.HasPrefix(strings.TrimSpace(line), "//") {
-			badf("cannot find assembly opcode")
-		}
-		return
-	}
-
-	// Determine operand sizes from instruction.
-	// Typically the suffix suffices, but there are exceptions.
-	var src, dst, kind asmKind
-	op := m[1]
-	switch fn.arch.name + "." + op {
-	case "386.FMOVLP":
-		src, dst = 8, 4
-	case "arm.MOVD":
-		src = 8
-	case "arm.MOVW":
-		src = 4
-	case "arm.MOVH", "arm.MOVHU":
-		src = 2
-	case "arm.MOVB", "arm.MOVBU":
-		src = 1
-	// LEA* opcodes don't really read the second arg.
-	// They just take the address of it.
-	case "386.LEAL":
-		dst = 4
-	case "amd64.LEAQ":
-		dst = 8
-	case "amd64p32.LEAL":
-		dst = 4
-	default:
-		switch fn.arch.name {
-		case "386", "amd64":
-			if strings.HasPrefix(op, "F") && (strings.HasSuffix(op, "D") || strings.HasSuffix(op, "DP")) {
-				// FMOVDP, FXCHD, etc
-				src = 8
-				break
-			}
-			if strings.HasPrefix(op, "F") && (strings.HasSuffix(op, "F") || strings.HasSuffix(op, "FP")) {
-				// FMOVFP, FXCHF, etc
-				src = 4
-				break
-			}
-			if strings.HasSuffix(op, "SD") {
-				// MOVSD, SQRTSD, etc
-				src = 8
-				break
-			}
-			if strings.HasSuffix(op, "SS") {
-				// MOVSS, SQRTSS, etc
-				src = 4
-				break
-			}
-			if strings.HasPrefix(op, "SET") {
-				// SETEQ, etc
-				src = 1
-				break
-			}
-			switch op[len(op)-1] {
-			case 'B':
-				src = 1
-			case 'W':
-				src = 2
-			case 'L':
-				src = 4
-			case 'D', 'Q':
-				src = 8
-			}
-		case "ppc64", "ppc64le":
-			// Strip standard suffixes to reveal size letter.
-			m := ppc64Suff.FindStringSubmatch(op)
-			if m != nil {
-				switch m[1][0] {
-				case 'B':
-					src = 1
-				case 'H':
-					src = 2
-				case 'W':
-					src = 4
-				case 'D':
-					src = 8
-				}
-			}
-		}
-	}
-	if dst == 0 {
-		dst = src
-	}
-
-	// Determine whether the match we're holding
-	// is the first or second argument.
-	if strings.Index(line, expr) > strings.Index(line, ",") {
-		kind = dst
-	} else {
-		kind = src
-	}
-
-	vk := v.kind
-	vt := v.typ
-	switch vk {
-	case asmInterface, asmEmptyInterface, asmString, asmSlice:
-		// allow reference to first word (pointer)
-		vk = v.inner[0].kind
-		vt = v.inner[0].typ
-	}
-
-	if off != v.off {
-		var inner bytes.Buffer
-		for i, vi := range v.inner {
-			if len(v.inner) > 1 {
-				fmt.Fprintf(&inner, ",")
-			}
-			fmt.Fprintf(&inner, " ")
-			if i == len(v.inner)-1 {
-				fmt.Fprintf(&inner, "or ")
-			}
-			fmt.Fprintf(&inner, "%s+%d(FP)", vi.name, vi.off)
-		}
-		badf("invalid offset %s; expected %s+%d(FP)%s", expr, v.name, v.off, inner.String())
-		return
-	}
-	if kind != 0 && kind != vk {
-		var inner bytes.Buffer
-		if len(v.inner) > 0 {
-			fmt.Fprintf(&inner, " containing")
-			for i, vi := range v.inner {
-				if i > 0 && len(v.inner) > 2 {
-					fmt.Fprintf(&inner, ",")
-				}
-				fmt.Fprintf(&inner, " ")
-				if i > 0 && i == len(v.inner)-1 {
-					fmt.Fprintf(&inner, "and ")
-				}
-				fmt.Fprintf(&inner, "%s+%d(FP)", vi.name, vi.off)
-			}
-		}
-		badf("invalid %s of %s; %s is %d-byte value%s", op, expr, vt, vk, inner.String())
-	}
-}
diff --git a/src/cmd/vet/assign.go b/src/cmd/vet/assign.go
deleted file mode 100644
index 54c1ae1..0000000
--- a/src/cmd/vet/assign.go
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-/*
-This file contains the code to check for useless assignments.
-*/
-
-package main
-
-import (
-	"go/ast"
-	"go/token"
-	"reflect"
-)
-
-func init() {
-	register("assign",
-		"check for useless assignments",
-		checkAssignStmt,
-		assignStmt)
-}
-
-// TODO: should also check for assignments to struct fields inside methods
-// that are on T instead of *T.
-
-// checkAssignStmt checks for assignments of the form "<expr> = <expr>".
-// These are almost always useless, and even when they aren't they are usually a mistake.
-func checkAssignStmt(f *File, node ast.Node) {
-	stmt := node.(*ast.AssignStmt)
-	if stmt.Tok != token.ASSIGN {
-		return // ignore :=
-	}
-	if len(stmt.Lhs) != len(stmt.Rhs) {
-		// If LHS and RHS have different cardinality, they can't be the same.
-		return
-	}
-	for i, lhs := range stmt.Lhs {
-		rhs := stmt.Rhs[i]
-		if reflect.TypeOf(lhs) != reflect.TypeOf(rhs) {
-			continue // short-circuit the heavy-weight gofmt check
-		}
-		le := f.gofmt(lhs)
-		re := f.gofmt(rhs)
-		if le == re {
-			f.Badf(stmt.Pos(), "self-assignment of %s to %s", re, le)
-		}
-	}
-}
diff --git a/src/cmd/vet/atomic.go b/src/cmd/vet/atomic.go
deleted file mode 100644
index c084f13..0000000
--- a/src/cmd/vet/atomic.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
-	"go/ast"
-	"go/token"
-)
-
-func init() {
-	register("atomic",
-		"check for common mistaken usages of the sync/atomic package",
-		checkAtomicAssignment,
-		assignStmt)
-}
-
-// checkAtomicAssignment walks the assignment statement checking for common
-// mistaken usage of atomic package, such as: x = atomic.AddUint64(&x, 1)
-func checkAtomicAssignment(f *File, node ast.Node) {
-	n := node.(*ast.AssignStmt)
-	if len(n.Lhs) != len(n.Rhs) {
-		return
-	}
-
-	for i, right := range n.Rhs {
-		call, ok := right.(*ast.CallExpr)
-		if !ok {
-			continue
-		}
-		sel, ok := call.Fun.(*ast.SelectorExpr)
-		if !ok {
-			continue
-		}
-		pkg, ok := sel.X.(*ast.Ident)
-		if !ok || pkg.Name != "atomic" {
-			continue
-		}
-
-		switch sel.Sel.Name {
-		case "AddInt32", "AddInt64", "AddUint32", "AddUint64", "AddUintptr":
-			f.checkAtomicAddAssignment(n.Lhs[i], call)
-		}
-	}
-}
-
-// checkAtomicAddAssignment walks the atomic.Add* method calls checking for assigning the return value
-// to the same variable being used in the operation
-func (f *File) checkAtomicAddAssignment(left ast.Expr, call *ast.CallExpr) {
-	if len(call.Args) != 2 {
-		return
-	}
-	arg := call.Args[0]
-	broken := false
-
-	if uarg, ok := arg.(*ast.UnaryExpr); ok && uarg.Op == token.AND {
-		broken = f.gofmt(left) == f.gofmt(uarg.X)
-	} else if star, ok := left.(*ast.StarExpr); ok {
-		broken = f.gofmt(star.X) == f.gofmt(arg)
-	}
-
-	if broken {
-		f.Bad(left.Pos(), "direct assignment to atomic value")
-	}
-}
diff --git a/src/cmd/vet/bool.go b/src/cmd/vet/bool.go
deleted file mode 100644
index 07c2a93..0000000
--- a/src/cmd/vet/bool.go
+++ /dev/null
@@ -1,186 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains boolean condition tests.
-
-package main
-
-import (
-	"go/ast"
-	"go/token"
-)
-
-func init() {
-	register("bool",
-		"check for mistakes involving boolean operators",
-		checkBool,
-		binaryExpr)
-}
-
-func checkBool(f *File, n ast.Node) {
-	e := n.(*ast.BinaryExpr)
-
-	var op boolOp
-	switch e.Op {
-	case token.LOR:
-		op = or
-	case token.LAND:
-		op = and
-	default:
-		return
-	}
-
-	comm := op.commutativeSets(e)
-	for _, exprs := range comm {
-		op.checkRedundant(f, exprs)
-		op.checkSuspect(f, exprs)
-	}
-}
-
-type boolOp struct {
-	name  string
-	tok   token.Token // token corresponding to this operator
-	badEq token.Token // token corresponding to the equality test that should not be used with this operator
-}
-
-var (
-	or  = boolOp{"or", token.LOR, token.NEQ}
-	and = boolOp{"and", token.LAND, token.EQL}
-)
-
-// commutativeSets returns all side effect free sets of
-// expressions in e that are connected by op.
-// For example, given 'a || b || f() || c || d' with the or op,
-// commutativeSets returns {{b, a}, {d, c}}.
-func (op boolOp) commutativeSets(e *ast.BinaryExpr) [][]ast.Expr {
-	exprs := op.split(e)
-
-	// Partition the slice of expressions into commutative sets.
-	i := 0
-	var sets [][]ast.Expr
-	for j := 0; j <= len(exprs); j++ {
-		if j == len(exprs) || hasSideEffects(exprs[j]) {
-			if i < j {
-				sets = append(sets, exprs[i:j])
-			}
-			i = j + 1
-		}
-	}
-
-	return sets
-}
-
-// checkRedundant checks for expressions of the form
-//   e && e
-//   e || e
-// Exprs must contain only side effect free expressions.
-func (op boolOp) checkRedundant(f *File, exprs []ast.Expr) {
-	seen := make(map[string]bool)
-	for _, e := range exprs {
-		efmt := f.gofmt(e)
-		if seen[efmt] {
-			f.Badf(e.Pos(), "redundant %s: %s %s %s", op.name, efmt, op.tok, efmt)
-		} else {
-			seen[efmt] = true
-		}
-	}
-}
-
-// checkSuspect checks for expressions of the form
-//   x != c1 || x != c2
-//   x == c1 && x == c2
-// where c1 and c2 are constant expressions.
-// If c1 and c2 are the same then it's redundant;
-// if c1 and c2 are different then it's always true or always false.
-// Exprs must contain only side effect free expressions.
-func (op boolOp) checkSuspect(f *File, exprs []ast.Expr) {
-	// seen maps from expressions 'x' to equality expressions 'x != c'.
-	seen := make(map[string]string)
-
-	for _, e := range exprs {
-		bin, ok := e.(*ast.BinaryExpr)
-		if !ok || bin.Op != op.badEq {
-			continue
-		}
-
-		// In order to avoid false positives, restrict to cases
-		// in which one of the operands is constant. We're then
-		// interested in the other operand.
-		// In the rare case in which both operands are constant
-		// (e.g. runtime.GOOS and "windows"), we'll only catch
-		// mistakes if the LHS is repeated, which is how most
-		// code is written.
-		var x ast.Expr
-		switch {
-		case f.pkg.types[bin.Y].Value != nil:
-			x = bin.X
-		case f.pkg.types[bin.X].Value != nil:
-			x = bin.Y
-		default:
-			continue
-		}
-
-		// e is of the form 'x != c' or 'x == c'.
-		xfmt := f.gofmt(x)
-		efmt := f.gofmt(e)
-		if prev, found := seen[xfmt]; found {
-			// checkRedundant handles the case in which efmt == prev.
-			if efmt != prev {
-				f.Badf(e.Pos(), "suspect %s: %s %s %s", op.name, efmt, op.tok, prev)
-			}
-		} else {
-			seen[xfmt] = efmt
-		}
-	}
-}
-
-// hasSideEffects reports whether evaluation of e has side effects.
-func hasSideEffects(e ast.Expr) bool {
-	safe := true
-	ast.Inspect(e, func(node ast.Node) bool {
-		switch n := node.(type) {
-		// Using CallExpr here will catch conversions
-		// as well as function and method invocations.
-		// We'll live with the false negatives for now.
-		case *ast.CallExpr:
-			safe = false
-			return false
-		case *ast.UnaryExpr:
-			if n.Op == token.ARROW {
-				safe = false
-				return false
-			}
-		}
-		return true
-	})
-	return !safe
-}
-
-// split returns a slice of all subexpressions in e that are connected by op.
-// For example, given 'a || (b || c) || d' with the or op,
-// split returns []{d, c, b, a}.
-func (op boolOp) split(e ast.Expr) (exprs []ast.Expr) {
-	for {
-		e = unparen(e)
-		if b, ok := e.(*ast.BinaryExpr); ok && b.Op == op.tok {
-			exprs = append(exprs, op.split(b.Y)...)
-			e = b.X
-		} else {
-			exprs = append(exprs, e)
-			break
-		}
-	}
-	return
-}
-
-// unparen returns e with any enclosing parentheses stripped.
-func unparen(e ast.Expr) ast.Expr {
-	for {
-		p, ok := e.(*ast.ParenExpr)
-		if !ok {
-			return e
-		}
-		e = p.X
-	}
-}
diff --git a/src/cmd/vet/buildtag.go b/src/cmd/vet/buildtag.go
deleted file mode 100644
index 2d86edf..0000000
--- a/src/cmd/vet/buildtag.go
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
-	"bytes"
-	"fmt"
-	"os"
-	"strings"
-	"unicode"
-)
-
-var (
-	nl         = []byte("\n")
-	slashSlash = []byte("//")
-	plusBuild  = []byte("+build")
-)
-
-// checkBuildTag checks that build tags are in the correct location and well-formed.
-func checkBuildTag(name string, data []byte) {
-	if !vet("buildtags") {
-		return
-	}
-	lines := bytes.SplitAfter(data, nl)
-
-	// Determine cutpoint where +build comments are no longer valid.
-	// They are valid in leading // comments in the file followed by
-	// a blank line.
-	var cutoff int
-	for i, line := range lines {
-		line = bytes.TrimSpace(line)
-		if len(line) == 0 {
-			cutoff = i
-			continue
-		}
-		if bytes.HasPrefix(line, slashSlash) {
-			continue
-		}
-		break
-	}
-
-	for i, line := range lines {
-		line = bytes.TrimSpace(line)
-		if !bytes.HasPrefix(line, slashSlash) {
-			continue
-		}
-		text := bytes.TrimSpace(line[2:])
-		if bytes.HasPrefix(text, plusBuild) {
-			fields := bytes.Fields(text)
-			if !bytes.Equal(fields[0], plusBuild) {
-				// Comment is something like +buildasdf not +build.
-				fmt.Fprintf(os.Stderr, "%s:%d: possible malformed +build comment\n", name, i+1)
-				continue
-			}
-			if i >= cutoff {
-				fmt.Fprintf(os.Stderr, "%s:%d: +build comment must appear before package clause and be followed by a blank line\n", name, i+1)
-				setExit(1)
-				continue
-			}
-			// Check arguments.
-		Args:
-			for _, arg := range fields[1:] {
-				for _, elem := range strings.Split(string(arg), ",") {
-					if strings.HasPrefix(elem, "!!") {
-						fmt.Fprintf(os.Stderr, "%s:%d: invalid double negative in build constraint: %s\n", name, i+1, arg)
-						setExit(1)
-						break Args
-					}
-					if strings.HasPrefix(elem, "!") {
-						elem = elem[1:]
-					}
-					for _, c := range elem {
-						if !unicode.IsLetter(c) && !unicode.IsDigit(c) && c != '_' && c != '.' {
-							fmt.Fprintf(os.Stderr, "%s:%d: invalid non-alphanumeric build constraint: %s\n", name, i+1, arg)
-							setExit(1)
-							break Args
-						}
-					}
-				}
-			}
-			continue
-		}
-		// Comment with +build but not at beginning.
-		if bytes.Contains(line, plusBuild) && i < cutoff {
-			fmt.Fprintf(os.Stderr, "%s:%d: possible malformed +build comment\n", name, i+1)
-			continue
-		}
-	}
-}
diff --git a/src/cmd/vet/composite.go b/src/cmd/vet/composite.go
deleted file mode 100644
index 80b45e2..0000000
--- a/src/cmd/vet/composite.go
+++ /dev/null
@@ -1,124 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains the test for unkeyed struct literals.
-
-package main
-
-import (
-	"cmd/vet/whitelist"
-	"flag"
-	"go/ast"
-	"strings"
-)
-
-var compositeWhiteList = flag.Bool("compositewhitelist", true, "use composite white list; for testing only")
-
-func init() {
-	register("composites",
-		"check that composite literals used field-keyed elements",
-		checkUnkeyedLiteral,
-		compositeLit)
-}
-
-// checkUnkeyedLiteral checks if a composite literal is a struct literal with
-// unkeyed fields.
-func checkUnkeyedLiteral(f *File, node ast.Node) {
-	c := node.(*ast.CompositeLit)
-	typ := c.Type
-	for {
-		if typ1, ok := c.Type.(*ast.ParenExpr); ok {
-			typ = typ1
-			continue
-		}
-		break
-	}
-
-	switch typ.(type) {
-	case *ast.ArrayType:
-		return
-	case *ast.MapType:
-		return
-	case *ast.StructType:
-		return // a literal struct type does not need to use keys
-	case *ast.Ident:
-		// A simple type name like t or T does not need keys either,
-		// since it is almost certainly declared in the current package.
-		// (The exception is names being used via import . "pkg", but
-		// those are already breaking the Go 1 compatibility promise,
-		// so not reporting potential additional breakage seems okay.)
-		return
-	}
-
-	// Otherwise the type is a selector like pkg.Name.
-	// We only care if pkg.Name is a struct, not if it's a map, array, or slice.
-	isStruct, typeString := f.pkg.isStruct(c)
-	if !isStruct {
-		return
-	}
-
-	if typeString == "" { // isStruct doesn't know
-		typeString = f.gofmt(typ)
-	}
-
-	// It's a struct, or we can't tell it's not a struct because we don't have types.
-
-	// Check if the CompositeLit contains an unkeyed field.
-	allKeyValue := true
-	for _, e := range c.Elts {
-		if _, ok := e.(*ast.KeyValueExpr); !ok {
-			allKeyValue = false
-			break
-		}
-	}
-	if allKeyValue {
-		return
-	}
-
-	// Check that the CompositeLit's type has the form pkg.Typ.
-	s, ok := c.Type.(*ast.SelectorExpr)
-	if !ok {
-		return
-	}
-	pkg, ok := s.X.(*ast.Ident)
-	if !ok {
-		return
-	}
-
-	// Convert the package name to an import path, and compare to a whitelist.
-	path := pkgPath(f, pkg.Name)
-	if path == "" {
-		f.Badf(c.Pos(), "unresolvable package for %s.%s literal", pkg.Name, s.Sel.Name)
-		return
-	}
-	typeName := path + "." + s.Sel.Name
-	if *compositeWhiteList && whitelist.UnkeyedLiteral[typeName] {
-		return
-	}
-
-	f.Bad(c.Pos(), typeString+" composite literal uses unkeyed fields")
-}
-
-// pkgPath returns the import path "image/png" for the package name "png".
-//
-// This is based purely on syntax and convention, and not on the imported
-// package's contents. It will be incorrect if a package name differs from the
-// leaf element of the import path, or if the package was a dot import.
-func pkgPath(f *File, pkgName string) (path string) {
-	for _, x := range f.file.Imports {
-		s := strings.Trim(x.Path.Value, `"`)
-		if x.Name != nil {
-			// Catch `import pkgName "foo/bar"`.
-			if x.Name.Name == pkgName {
-				return s
-			}
-		} else {
-			// Catch `import "pkgName"` or `import "foo/bar/pkgName"`.
-			if s == pkgName || strings.HasSuffix(s, "/"+pkgName) {
-				return s
-			}
-		}
-	}
-	return ""
-}
diff --git a/src/cmd/vet/copylock.go b/src/cmd/vet/copylock.go
deleted file mode 100644
index 6c71061..0000000
--- a/src/cmd/vet/copylock.go
+++ /dev/null
@@ -1,156 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains the code to check that locks are not passed by value.
-
-package main
-
-import (
-	"bytes"
-	"fmt"
-	"go/ast"
-	"go/token"
-	"go/types"
-)
-
-func init() {
-	register("copylocks",
-		"check that locks are not passed by value",
-		checkCopyLocks,
-		funcDecl, rangeStmt, funcLit)
-}
-
-// checkCopyLocks checks whether node might
-// inadvertently copy a lock.
-func checkCopyLocks(f *File, node ast.Node) {
-	switch node := node.(type) {
-	case *ast.RangeStmt:
-		checkCopyLocksRange(f, node)
-	case *ast.FuncDecl:
-		checkCopyLocksFunc(f, node.Name.Name, node.Recv, node.Type)
-	case *ast.FuncLit:
-		checkCopyLocksFunc(f, "func", nil, node.Type)
-	}
-}
-
-// checkCopyLocksFunc checks whether a function might
-// inadvertently copy a lock, by checking whether
-// its receiver, parameters, or return values
-// are locks.
-func checkCopyLocksFunc(f *File, name string, recv *ast.FieldList, typ *ast.FuncType) {
-	if recv != nil && len(recv.List) > 0 {
-		expr := recv.List[0].Type
-		if path := lockPath(f.pkg.typesPkg, f.pkg.types[expr].Type); path != nil {
-			f.Badf(expr.Pos(), "%s passes Lock by value: %v", name, path)
-		}
-	}
-
-	if typ.Params != nil {
-		for _, field := range typ.Params.List {
-			expr := field.Type
-			if path := lockPath(f.pkg.typesPkg, f.pkg.types[expr].Type); path != nil {
-				f.Badf(expr.Pos(), "%s passes Lock by value: %v", name, path)
-			}
-		}
-	}
-
-	if typ.Results != nil {
-		for _, field := range typ.Results.List {
-			expr := field.Type
-			if path := lockPath(f.pkg.typesPkg, f.pkg.types[expr].Type); path != nil {
-				f.Badf(expr.Pos(), "%s returns Lock by value: %v", name, path)
-			}
-		}
-	}
-}
-
-// checkCopyLocksRange checks whether a range statement
-// might inadvertently copy a lock by checking whether
-// any of the range variables are locks.
-func checkCopyLocksRange(f *File, r *ast.RangeStmt) {
-	checkCopyLocksRangeVar(f, r.Tok, r.Key)
-	checkCopyLocksRangeVar(f, r.Tok, r.Value)
-}
-
-func checkCopyLocksRangeVar(f *File, rtok token.Token, e ast.Expr) {
-	if e == nil {
-		return
-	}
-	id, isId := e.(*ast.Ident)
-	if isId && id.Name == "_" {
-		return
-	}
-
-	var typ types.Type
-	if rtok == token.DEFINE {
-		if !isId {
-			return
-		}
-		obj := f.pkg.defs[id]
-		if obj == nil {
-			return
-		}
-		typ = obj.Type()
-	} else {
-		typ = f.pkg.types[e].Type
-	}
-
-	if typ == nil {
-		return
-	}
-	if path := lockPath(f.pkg.typesPkg, typ); path != nil {
-		f.Badf(e.Pos(), "range var %s copies Lock: %v", f.gofmt(e), path)
-	}
-}
-
-type typePath []types.Type
-
-// String pretty-prints a typePath.
-func (path typePath) String() string {
-	n := len(path)
-	var buf bytes.Buffer
-	for i := range path {
-		if i > 0 {
-			fmt.Fprint(&buf, " contains ")
-		}
-		// The human-readable path is in reverse order, outermost to innermost.
-		fmt.Fprint(&buf, path[n-i-1].String())
-	}
-	return buf.String()
-}
-
-// lockPath returns a typePath describing the location of a lock value
-// contained in typ. If there is no contained lock, it returns nil.
-func lockPath(tpkg *types.Package, typ types.Type) typePath {
-	if typ == nil {
-		return nil
-	}
-
-	// We're only interested in the case in which the underlying
-	// type is a struct. (Interfaces and pointers are safe to copy.)
-	styp, ok := typ.Underlying().(*types.Struct)
-	if !ok {
-		return nil
-	}
-
-	// We're looking for cases in which a reference to this type
-	// can be locked, but a value cannot. This differentiates
-	// embedded interfaces from embedded values.
-	if plock := types.NewMethodSet(types.NewPointer(typ)).Lookup(tpkg, "Lock"); plock != nil {
-		if lock := types.NewMethodSet(typ).Lookup(tpkg, "Lock"); lock == nil {
-			return []types.Type{typ}
-		}
-	}
-
-	nfields := styp.NumFields()
-	for i := 0; i < nfields; i++ {
-		ftyp := styp.Field(i).Type()
-		subpath := lockPath(tpkg, ftyp)
-		if subpath != nil {
-			return append(subpath, typ)
-		}
-	}
-
-	return nil
-}
diff --git a/src/cmd/vet/deadcode.go b/src/cmd/vet/deadcode.go
deleted file mode 100644
index 3b306c2..0000000
--- a/src/cmd/vet/deadcode.go
+++ /dev/null
@@ -1,296 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Check for syntactically unreachable code.
-
-package main
-
-import (
-	"go/ast"
-	"go/token"
-)
-
-func init() {
-	register("unreachable",
-		"check for unreachable code",
-		checkUnreachable,
-		funcDecl, funcLit)
-}
-
-type deadState struct {
-	f           *File
-	hasBreak    map[ast.Stmt]bool
-	hasGoto     map[string]bool
-	labels      map[string]ast.Stmt
-	breakTarget ast.Stmt
-
-	reachable bool
-}
-
-// checkUnreachable checks a function body for dead code.
-func checkUnreachable(f *File, node ast.Node) {
-	var body *ast.BlockStmt
-	switch n := node.(type) {
-	case *ast.FuncDecl:
-		body = n.Body
-	case *ast.FuncLit:
-		body = n.Body
-	}
-	if body == nil {
-		return
-	}
-
-	d := &deadState{
-		f:        f,
-		hasBreak: make(map[ast.Stmt]bool),
-		hasGoto:  make(map[string]bool),
-		labels:   make(map[string]ast.Stmt),
-	}
-
-	d.findLabels(body)
-
-	d.reachable = true
-	d.findDead(body)
-}
-
-// findLabels gathers information about the labels defined and used by stmt
-// and about which statements break, whether a label is involved or not.
-func (d *deadState) findLabels(stmt ast.Stmt) {
-	switch x := stmt.(type) {
-	default:
-		d.f.Warnf(x.Pos(), "internal error in findLabels: unexpected statement %T", x)
-
-	case *ast.AssignStmt,
-		*ast.BadStmt,
-		*ast.DeclStmt,
-		*ast.DeferStmt,
-		*ast.EmptyStmt,
-		*ast.ExprStmt,
-		*ast.GoStmt,
-		*ast.IncDecStmt,
-		*ast.ReturnStmt,
-		*ast.SendStmt:
-		// no statements inside
-
-	case *ast.BlockStmt:
-		for _, stmt := range x.List {
-			d.findLabels(stmt)
-		}
-
-	case *ast.BranchStmt:
-		switch x.Tok {
-		case token.GOTO:
-			if x.Label != nil {
-				d.hasGoto[x.Label.Name] = true
-			}
-
-		case token.BREAK:
-			stmt := d.breakTarget
-			if x.Label != nil {
-				stmt = d.labels[x.Label.Name]
-			}
-			if stmt != nil {
-				d.hasBreak[stmt] = true
-			}
-		}
-
-	case *ast.IfStmt:
-		d.findLabels(x.Body)
-		if x.Else != nil {
-			d.findLabels(x.Else)
-		}
-
-	case *ast.LabeledStmt:
-		d.labels[x.Label.Name] = x.Stmt
-		d.findLabels(x.Stmt)
-
-	// These cases are all the same, but the x.Body only works
-	// when the specific type of x is known, so the cases cannot
-	// be merged.
-	case *ast.ForStmt:
-		outer := d.breakTarget
-		d.breakTarget = x
-		d.findLabels(x.Body)
-		d.breakTarget = outer
-
-	case *ast.RangeStmt:
-		outer := d.breakTarget
-		d.breakTarget = x
-		d.findLabels(x.Body)
-		d.breakTarget = outer
-
-	case *ast.SelectStmt:
-		outer := d.breakTarget
-		d.breakTarget = x
-		d.findLabels(x.Body)
-		d.breakTarget = outer
-
-	case *ast.SwitchStmt:
-		outer := d.breakTarget
-		d.breakTarget = x
-		d.findLabels(x.Body)
-		d.breakTarget = outer
-
-	case *ast.TypeSwitchStmt:
-		outer := d.breakTarget
-		d.breakTarget = x
-		d.findLabels(x.Body)
-		d.breakTarget = outer
-
-	case *ast.CommClause:
-		for _, stmt := range x.Body {
-			d.findLabels(stmt)
-		}
-
-	case *ast.CaseClause:
-		for _, stmt := range x.Body {
-			d.findLabels(stmt)
-		}
-	}
-}
-
-// findDead walks the statement looking for dead code.
-// If d.reachable is false on entry, stmt itself is dead.
-// When findDead returns, d.reachable tells whether the
-// statement following stmt is reachable.
-func (d *deadState) findDead(stmt ast.Stmt) {
-	// Is this a labeled goto target?
-	// If so, assume it is reachable due to the goto.
-	// This is slightly conservative, in that we don't
-	// check that the goto is reachable, so
-	//	L: goto L
-	// will not provoke a warning.
-	// But it's good enough.
-	if x, isLabel := stmt.(*ast.LabeledStmt); isLabel && d.hasGoto[x.Label.Name] {
-		d.reachable = true
-	}
-
-	if !d.reachable {
-		switch stmt.(type) {
-		case *ast.EmptyStmt:
-			// do not warn about unreachable empty statements
-		default:
-			d.f.Bad(stmt.Pos(), "unreachable code")
-			d.reachable = true // silence error about next statement
-		}
-	}
-
-	switch x := stmt.(type) {
-	default:
-		d.f.Warnf(x.Pos(), "internal error in findDead: unexpected statement %T", x)
-
-	case *ast.AssignStmt,
-		*ast.BadStmt,
-		*ast.DeclStmt,
-		*ast.DeferStmt,
-		*ast.EmptyStmt,
-		*ast.GoStmt,
-		*ast.IncDecStmt,
-		*ast.SendStmt:
-		// no control flow
-
-	case *ast.BlockStmt:
-		for _, stmt := range x.List {
-			d.findDead(stmt)
-		}
-
-	case *ast.BranchStmt:
-		switch x.Tok {
-		case token.BREAK, token.GOTO, token.FALLTHROUGH:
-			d.reachable = false
-		case token.CONTINUE:
-			// NOTE: We accept "continue" statements as terminating.
-			// They are not necessary in the spec definition of terminating,
-			// because a continue statement cannot be the final statement
-			// before a return. But for the more general problem of syntactically
-			// identifying dead code, continue redirects control flow just
-			// like the other terminating statements.
-			d.reachable = false
-		}
-
-	case *ast.ExprStmt:
-		// Call to panic?
-		call, ok := x.X.(*ast.CallExpr)
-		if ok {
-			name, ok := call.Fun.(*ast.Ident)
-			if ok && name.Name == "panic" && name.Obj == nil {
-				d.reachable = false
-			}
-		}
-
-	case *ast.ForStmt:
-		d.findDead(x.Body)
-		d.reachable = x.Cond != nil || d.hasBreak[x]
-
-	case *ast.IfStmt:
-		d.findDead(x.Body)
-		if x.Else != nil {
-			r := d.reachable
-			d.reachable = true
-			d.findDead(x.Else)
-			d.reachable = d.reachable || r
-		} else {
-			// might not have executed if statement
-			d.reachable = true
-		}
-
-	case *ast.LabeledStmt:
-		d.findDead(x.Stmt)
-
-	case *ast.RangeStmt:
-		d.findDead(x.Body)
-		d.reachable = true
-
-	case *ast.ReturnStmt:
-		d.reachable = false
-
-	case *ast.SelectStmt:
-		// NOTE: Unlike switch and type switch below, we don't care
-		// whether a select has a default, because a select without a
-		// default blocks until one of the cases can run. That's different
-		// from a switch without a default, which behaves like it has
-		// a default with an empty body.
-		anyReachable := false
-		for _, comm := range x.Body.List {
-			d.reachable = true
-			for _, stmt := range comm.(*ast.CommClause).Body {
-				d.findDead(stmt)
-			}
-			anyReachable = anyReachable || d.reachable
-		}
-		d.reachable = anyReachable || d.hasBreak[x]
-
-	case *ast.SwitchStmt:
-		anyReachable := false
-		hasDefault := false
-		for _, cas := range x.Body.List {
-			cc := cas.(*ast.CaseClause)
-			if cc.List == nil {
-				hasDefault = true
-			}
-			d.reachable = true
-			for _, stmt := range cc.Body {
-				d.findDead(stmt)
-			}
-			anyReachable = anyReachable || d.reachable
-		}
-		d.reachable = anyReachable || d.hasBreak[x] || !hasDefault
-
-	case *ast.TypeSwitchStmt:
-		anyReachable := false
-		hasDefault := false
-		for _, cas := range x.Body.List {
-			cc := cas.(*ast.CaseClause)
-			if cc.List == nil {
-				hasDefault = true
-			}
-			d.reachable = true
-			for _, stmt := range cc.Body {
-				d.findDead(stmt)
-			}
-			anyReachable = anyReachable || d.reachable
-		}
-		d.reachable = anyReachable || d.hasBreak[x] || !hasDefault
-	}
-}
diff --git a/src/cmd/vet/doc.go b/src/cmd/vet/doc.go
deleted file mode 100644
index ea4654a..0000000
--- a/src/cmd/vet/doc.go
+++ /dev/null
@@ -1,191 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-/*
-
-Vet examines Go source code and reports suspicious constructs, such as Printf
-calls whose arguments do not align with the format string. Vet uses heuristics
-that do not guarantee all reports are genuine problems, but it can find errors
-not caught by the compilers.
-
-It can be invoked three ways:
-
-By package, from the go tool:
-	go vet package/path/name
-vets the package whose path is provided.
-
-By files:
-	go tool vet source/directory/*.go
-vets the files named, all of which must be in the same package.
-
-By directory:
-	go tool vet source/directory
-recursively descends the directory, vetting each package it finds.
-
-Vet's exit code is 2 for erroneous invocation of the tool, 1 if a
-problem was reported, and 0 otherwise. Note that the tool does not
-check every possible problem and depends on unreliable heuristics
-so it should be used as guidance only, not as a firm indicator of
-program correctness.
-
-By default all checks are performed. If any flags are explicitly set
-to true, only those tests are run. Conversely, if any flag is
-explicitly set to false, only those tests are disabled.
-Thus -printf=true runs the printf check, -printf=false runs all checks
-except the printf check.
-
-Available checks:
-
-Printf family
-
-Flag: -printf
-
-Suspicious calls to functions in the Printf family, including any functions
-with these names, disregarding case:
-	Print Printf Println
-	Fprint Fprintf Fprintln
-	Sprint Sprintf Sprintln
-	Error Errorf
-	Fatal Fatalf
-	Log Logf
-	Panic Panicf Panicln
-The -printfuncs flag can be used to redefine this list.
-If the function name ends with an 'f', the function is assumed to take
-a format descriptor string in the manner of fmt.Printf. If not, vet
-complains about arguments that look like format descriptor strings.
-
-It also checks for errors such as using a Writer as the first argument of
-Printf.
-
-Methods
-
-Flag: -methods
-
-Non-standard signatures for methods with familiar names, including:
-	Format GobEncode GobDecode MarshalJSON MarshalXML
-	Peek ReadByte ReadFrom ReadRune Scan Seek
-	UnmarshalJSON UnreadByte UnreadRune WriteByte
-	WriteTo
-
-Struct tags
-
-Flag: -structtags
-
-Struct tags that do not follow the format understood by reflect.StructTag.Get.
-Well-known encoding struct tags (json, xml) used with unexported fields.
-
-Unkeyed composite literals
-
-Flag: -composites
-
-Composite struct literals that do not use the field-keyed syntax.
-
-Assembly declarations
-
-Flag: -asmdecl
-
-Mismatches between assembly files and Go function declarations.
-
-Useless assignments
-
-Flag: -assign
-
-Check for useless assignments.
-
-Atomic mistakes
-
-Flag: -atomic
-
-Common mistaken usages of the sync/atomic package.
-
-Boolean conditions
-
-Flag: -bool
-
-Mistakes involving boolean operators.
-
-Build tags
-
-Flag: -buildtags
-
-Badly formed or misplaced +build tags.
-
-Copying locks
-
-Flag: -copylocks
-
-Locks that are erroneously passed by value.
-
-Nil function comparison
-
-Flag: -nilfunc
-
-Comparisons between functions and nil.
-
-Range loop variables
-
-Flag: -rangeloops
-
-Incorrect uses of range loop variables in closures.
-
-Unreachable code
-
-Flag: -unreachable
-
-Unreachable code.
-
-Shadowed variables
-
-Flag: -shadow=false (experimental; must be set explicitly)
-
-Variables that may have been unintentionally shadowed.
-
-Misuse of unsafe Pointers
-
-Flag: -unsafeptr
-
-Likely incorrect uses of unsafe.Pointer to convert integers to pointers.
-A conversion from uintptr to unsafe.Pointer is invalid if it implies that
-there is a uintptr-typed word in memory that holds a pointer value,
-because that word will be invisible to stack copying and to the garbage
-collector.
-
-Unused result of certain function calls
-
-Flag: -unusedresult
-
-Calls to well-known functions and methods that return a value that is
-discarded.  By default, this includes functions like fmt.Errorf and
-fmt.Sprintf and methods like String and Error. The flags -unusedfuncs
-and -unusedstringmethods control the set.
-
-Shifts
-
-Flag: -shift
-
-Shifts equal to or longer than the variable's length.
-
-Other flags
-
-These flags configure the behavior of vet:
-
-	-all (default true)
-		Check everything; disabled if any explicit check is requested.
-	-v
-		Verbose mode
-	-printfuncs
-		A comma-separated list of print-like functions to supplement the
-		standard list.  Each entry is in the form Name:N where N is the
-		zero-based argument position of the first argument involved in the
-		print: either the format or the first print argument for non-formatted
-		prints.  For example, if you have Warn and Warnf functions that
-		take an io.Writer as their first argument, like Fprintf,
-			-printfuncs=Warn:1,Warnf:1
-		For more information, see the discussion of the -printf flag.
-	-shadowstrict
-		Whether to be strict about shadowing; can be noisy.
-	-test
-		For testing only: sets -all and -shadow.
-*/
-package main // import "golang.org/x/tools/cmd/vet"
diff --git a/src/cmd/vet/main.go b/src/cmd/vet/main.go
deleted file mode 100644
index 453cfe0..0000000
--- a/src/cmd/vet/main.go
+++ /dev/null
@@ -1,486 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Vet is a simple checker for static errors in Go source code.
-// See doc.go for more information.
-package main
-
-import (
-	"bytes"
-	"flag"
-	"fmt"
-	"go/ast"
-	"go/build"
-	"go/parser"
-	"go/printer"
-	"go/token"
-	"go/types"
-	"io/ioutil"
-	"os"
-	"path/filepath"
-	"strconv"
-	"strings"
-)
-
-var (
-	verbose  = flag.Bool("v", false, "verbose")
-	testFlag = flag.Bool("test", false, "for testing only: sets -all and -shadow")
-	tags     = flag.String("tags", "", "comma-separated list of build tags to apply when parsing")
-	tagList  = []string{} // exploded version of tags flag; set in main
-)
-
-var exitCode = 0
-
-// "all" is here only for the appearance of backwards compatibility.
-// It has no effect; the triState flags do the work.
-var all = flag.Bool("all", true, "check everything; disabled if any explicit check is requested")
-
-// Flags to control which individual checks to perform.
-var report = map[string]*triState{
-	// Only unusual checks are written here.
-	// Most checks that operate during the AST walk are added by register.
-	"asmdecl":   triStateFlag("asmdecl", unset, "check assembly against Go declarations"),
-	"buildtags": triStateFlag("buildtags", unset, "check that +build tags are valid"),
-}
-
-// experimental records the flags enabling experimental features. These must be
-// requested explicitly; they are not enabled by -all.
-var experimental = map[string]bool{}
-
-// setTrueCount record how many flags are explicitly set to true.
-var setTrueCount int
-
-// A triState is a boolean that knows whether it has been set to either true or false.
-// It is used to identify if a flag appears; the standard boolean flag cannot
-// distinguish missing from unset. It also satisfies flag.Value.
-type triState int
-
-const (
-	unset triState = iota
-	setTrue
-	setFalse
-)
-
-func triStateFlag(name string, value triState, usage string) *triState {
-	flag.Var(&value, name, usage)
-	return &value
-}
-
-// triState implements flag.Value, flag.Getter, and flag.boolFlag.
-// They work like boolean flags: we can say vet -printf as well as vet -printf=true
-func (ts *triState) Get() interface{} {
-	return *ts == setTrue
-}
-
-func (ts triState) isTrue() bool {
-	return ts == setTrue
-}
-
-func (ts *triState) Set(value string) error {
-	b, err := strconv.ParseBool(value)
-	if err != nil {
-		return err
-	}
-	if b {
-		*ts = setTrue
-		setTrueCount++
-	} else {
-		*ts = setFalse
-	}
-	return nil
-}
-
-func (ts *triState) String() string {
-	switch *ts {
-	case unset:
-		return "unset"
-	case setTrue:
-		return "true"
-	case setFalse:
-		return "false"
-	}
-	panic("not reached")
-}
-
-func (ts triState) IsBoolFlag() bool {
-	return true
-}
-
-// vet tells whether to report errors for the named check, a flag name.
-func vet(name string) bool {
-	if *testFlag {
-		return true
-	}
-	return report[name].isTrue()
-}
-
-// setExit sets the value for os.Exit when it is called, later.  It
-// remembers the highest value.
-func setExit(err int) {
-	if err > exitCode {
-		exitCode = err
-	}
-}
-
-var (
-	// Each of these vars has a corresponding case in (*File).Visit.
-	assignStmt    *ast.AssignStmt
-	binaryExpr    *ast.BinaryExpr
-	callExpr      *ast.CallExpr
-	compositeLit  *ast.CompositeLit
-	exprStmt      *ast.ExprStmt
-	field         *ast.Field
-	funcDecl      *ast.FuncDecl
-	funcLit       *ast.FuncLit
-	genDecl       *ast.GenDecl
-	interfaceType *ast.InterfaceType
-	rangeStmt     *ast.RangeStmt
-
-	// checkers is a two-level map.
-	// The outer level is keyed by a nil pointer, one of the AST vars above.
-	// The inner level is keyed by checker name.
-	checkers = make(map[ast.Node]map[string]func(*File, ast.Node))
-)
-
-func register(name, usage string, fn func(*File, ast.Node), types ...ast.Node) {
-	report[name] = triStateFlag(name, unset, usage)
-	for _, typ := range types {
-		m := checkers[typ]
-		if m == nil {
-			m = make(map[string]func(*File, ast.Node))
-			checkers[typ] = m
-		}
-		m[name] = fn
-	}
-}
-
-// Usage is a replacement usage function for the flags package.
-func Usage() {
-	fmt.Fprintf(os.Stderr, "Usage of %s:\n", os.Args[0])
-	fmt.Fprintf(os.Stderr, "\tvet [flags] directory...\n")
-	fmt.Fprintf(os.Stderr, "\tvet [flags] files... # Must be a single package\n")
-	fmt.Fprintf(os.Stderr, "For more information run\n")
-	fmt.Fprintf(os.Stderr, "\tgodoc golang.org/x/tools/cmd/vet\n\n")
-	fmt.Fprintf(os.Stderr, "Flags:\n")
-	flag.PrintDefaults()
-	os.Exit(2)
-}
-
-// File is a wrapper for the state of a file used in the parser.
-// The parse tree walkers are all methods of this type.
-type File struct {
-	pkg     *Package
-	fset    *token.FileSet
-	name    string
-	content []byte
-	file    *ast.File
-	b       bytes.Buffer // for use by methods
-
-	// The objects that are receivers of a "String() string" method.
-	// This is used by the recursiveStringer method in print.go.
-	stringers map[*ast.Object]bool
-
-	// Registered checkers to run.
-	checkers map[ast.Node][]func(*File, ast.Node)
-}
-
-func main() {
-	flag.Usage = Usage
-	flag.Parse()
-
-	// If any flag is set, we run only those checks requested.
-	// If no flags are set true, set all the non-experimental ones not explicitly set (in effect, set the "-all" flag).
-	if setTrueCount == 0 {
-		for name, setting := range report {
-			if *setting == unset && !experimental[name] {
-				*setting = setTrue
-			}
-		}
-	}
-
-	tagList = strings.Split(*tags, ",")
-
-	initPrintFlags()
-	initUnusedFlags()
-
-	if flag.NArg() == 0 {
-		Usage()
-	}
-	dirs := false
-	files := false
-	for _, name := range flag.Args() {
-		// Is it a directory?
-		fi, err := os.Stat(name)
-		if err != nil {
-			warnf("error walking tree: %s", err)
-			continue
-		}
-		if fi.IsDir() {
-			dirs = true
-		} else {
-			files = true
-		}
-	}
-	if dirs && files {
-		Usage()
-	}
-	if dirs {
-		for _, name := range flag.Args() {
-			walkDir(name)
-		}
-		os.Exit(exitCode)
-	}
-	if !doPackage(".", flag.Args()) {
-		warnf("no files checked")
-	}
-	os.Exit(exitCode)
-}
-
-// prefixDirectory places the directory name on the beginning of each name in the list.
-func prefixDirectory(directory string, names []string) {
-	if directory != "." {
-		for i, name := range names {
-			names[i] = filepath.Join(directory, name)
-		}
-	}
-}
-
-// doPackageDir analyzes the single package found in the directory, if there is one,
-// plus a test package, if there is one.
-func doPackageDir(directory string) {
-	context := build.Default
-	if len(context.BuildTags) != 0 {
-		warnf("build tags %s previously set", context.BuildTags)
-	}
-	context.BuildTags = append(tagList, context.BuildTags...)
-
-	pkg, err := context.ImportDir(directory, 0)
-	if err != nil {
-		// If it's just that there are no go source files, that's fine.
-		if _, nogo := err.(*build.NoGoError); nogo {
-			return
-		}
-		// Non-fatal: we are doing a recursive walk and there may be other directories.
-		warnf("cannot process directory %s: %s", directory, err)
-		return
-	}
-	var names []string
-	names = append(names, pkg.GoFiles...)
-	names = append(names, pkg.CgoFiles...)
-	names = append(names, pkg.TestGoFiles...) // These are also in the "foo" package.
-	names = append(names, pkg.SFiles...)
-	prefixDirectory(directory, names)
-	doPackage(directory, names)
-	// Is there also a "foo_test" package? If so, do that one as well.
-	if len(pkg.XTestGoFiles) > 0 {
-		names = pkg.XTestGoFiles
-		prefixDirectory(directory, names)
-		doPackage(directory, names)
-	}
-}
-
-type Package struct {
-	path      string
-	defs      map[*ast.Ident]types.Object
-	uses      map[*ast.Ident]types.Object
-	selectors map[*ast.SelectorExpr]*types.Selection
-	types     map[ast.Expr]types.TypeAndValue
-	spans     map[types.Object]Span
-	files     []*File
-	typesPkg  *types.Package
-}
-
-// doPackage analyzes the single package constructed from the named files.
-// It returns whether any files were checked.
-func doPackage(directory string, names []string) bool {
-	var files []*File
-	var astFiles []*ast.File
-	fs := token.NewFileSet()
-	for _, name := range names {
-		data, err := ioutil.ReadFile(name)
-		if err != nil {
-			// Warn but continue to next package.
-			warnf("%s: %s", name, err)
-			return false
-		}
-		checkBuildTag(name, data)
-		var parsedFile *ast.File
-		if strings.HasSuffix(name, ".go") {
-			parsedFile, err = parser.ParseFile(fs, name, data, 0)
-			if err != nil {
-				warnf("%s: %s", name, err)
-				return false
-			}
-			astFiles = append(astFiles, parsedFile)
-		}
-		files = append(files, &File{fset: fs, content: data, name: name, file: parsedFile})
-	}
-	if len(astFiles) == 0 {
-		return false
-	}
-	pkg := new(Package)
-	pkg.path = astFiles[0].Name.Name
-	pkg.files = files
-	// Type check the package.
-	err := pkg.check(fs, astFiles)
-	if err != nil && *verbose {
-		warnf("%s", err)
-	}
-
-	// Check.
-	chk := make(map[ast.Node][]func(*File, ast.Node))
-	for typ, set := range checkers {
-		for name, fn := range set {
-			if vet(name) {
-				chk[typ] = append(chk[typ], fn)
-			}
-		}
-	}
-	for _, file := range files {
-		file.pkg = pkg
-		file.checkers = chk
-		if file.file != nil {
-			file.walkFile(file.name, file.file)
-		}
-	}
-	asmCheck(pkg)
-	return true
-}
-
-func visit(path string, f os.FileInfo, err error) error {
-	if err != nil {
-		warnf("walk error: %s", err)
-		return err
-	}
-	// One package per directory. Ignore the files themselves.
-	if !f.IsDir() {
-		return nil
-	}
-	doPackageDir(path)
-	return nil
-}
-
-func (pkg *Package) hasFileWithSuffix(suffix string) bool {
-	for _, f := range pkg.files {
-		if strings.HasSuffix(f.name, suffix) {
-			return true
-		}
-	}
-	return false
-}
-
-// walkDir recursively walks the tree looking for Go packages.
-func walkDir(root string) {
-	filepath.Walk(root, visit)
-}
-
-// errorf formats the error to standard error, adding program
-// identification and a newline, and exits.
-func errorf(format string, args ...interface{}) {
-	fmt.Fprintf(os.Stderr, "vet: "+format+"\n", args...)
-	os.Exit(2)
-}
-
-// warnf formats the error to standard error, adding program
-// identification and a newline, but does not exit.
-func warnf(format string, args ...interface{}) {
-	fmt.Fprintf(os.Stderr, "vet: "+format+"\n", args...)
-	setExit(1)
-}
-
-// Println is fmt.Println guarded by -v.
-func Println(args ...interface{}) {
-	if !*verbose {
-		return
-	}
-	fmt.Println(args...)
-}
-
-// Printf is fmt.Printf guarded by -v.
-func Printf(format string, args ...interface{}) {
-	if !*verbose {
-		return
-	}
-	fmt.Printf(format+"\n", args...)
-}
-
-// Bad reports an error and sets the exit code..
-func (f *File) Bad(pos token.Pos, args ...interface{}) {
-	f.Warn(pos, args...)
-	setExit(1)
-}
-
-// Badf reports a formatted error and sets the exit code.
-func (f *File) Badf(pos token.Pos, format string, args ...interface{}) {
-	f.Warnf(pos, format, args...)
-	setExit(1)
-}
-
-// loc returns a formatted representation of the position.
-func (f *File) loc(pos token.Pos) string {
-	if pos == token.NoPos {
-		return ""
-	}
-	// Do not print columns. Because the pos often points to the start of an
-	// expression instead of the inner part with the actual error, the
-	// precision can mislead.
-	posn := f.fset.Position(pos)
-	return fmt.Sprintf("%s:%d: ", posn.Filename, posn.Line)
-}
-
-// Warn reports an error but does not set the exit code.
-func (f *File) Warn(pos token.Pos, args ...interface{}) {
-	fmt.Fprint(os.Stderr, f.loc(pos)+fmt.Sprintln(args...))
-}
-
-// Warnf reports a formatted error but does not set the exit code.
-func (f *File) Warnf(pos token.Pos, format string, args ...interface{}) {
-	fmt.Fprintf(os.Stderr, f.loc(pos)+format+"\n", args...)
-}
-
-// walkFile walks the file's tree.
-func (f *File) walkFile(name string, file *ast.File) {
-	Println("Checking file", name)
-	ast.Walk(f, file)
-}
-
-// Visit implements the ast.Visitor interface.
-func (f *File) Visit(node ast.Node) ast.Visitor {
-	var key ast.Node
-	switch node.(type) {
-	case *ast.AssignStmt:
-		key = assignStmt
-	case *ast.BinaryExpr:
-		key = binaryExpr
-	case *ast.CallExpr:
-		key = callExpr
-	case *ast.CompositeLit:
-		key = compositeLit
-	case *ast.ExprStmt:
-		key = exprStmt
-	case *ast.Field:
-		key = field
-	case *ast.FuncDecl:
-		key = funcDecl
-	case *ast.FuncLit:
-		key = funcLit
-	case *ast.GenDecl:
-		key = genDecl
-	case *ast.InterfaceType:
-		key = interfaceType
-	case *ast.RangeStmt:
-		key = rangeStmt
-	}
-	for _, fn := range f.checkers[key] {
-		fn(f, node)
-	}
-	return f
-}
-
-// gofmt returns a string representation of the expression.
-func (f *File) gofmt(x ast.Expr) string {
-	f.b.Reset()
-	printer.Fprint(&f.b, f.fset, x)
-	return f.b.String()
-}
diff --git a/src/cmd/vet/method.go b/src/cmd/vet/method.go
deleted file mode 100644
index 00949df..0000000
--- a/src/cmd/vet/method.go
+++ /dev/null
@@ -1,182 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains the code to check canonical methods.
-
-package main
-
-import (
-	"fmt"
-	"go/ast"
-	"go/printer"
-	"strings"
-)
-
-func init() {
-	register("methods",
-		"check that canonically named methods are canonically defined",
-		checkCanonicalMethod,
-		funcDecl, interfaceType)
-}
-
-type MethodSig struct {
-	args    []string
-	results []string
-}
-
-// canonicalMethods lists the input and output types for Go methods
-// that are checked using dynamic interface checks.  Because the
-// checks are dynamic, such methods would not cause a compile error
-// if they have the wrong signature: instead the dynamic check would
-// fail, sometimes mysteriously.  If a method is found with a name listed
-// here but not the input/output types listed here, vet complains.
-//
-// A few of the canonical methods have very common names.
-// For example, a type might implement a Scan method that
-// has nothing to do with fmt.Scanner, but we still want to check
-// the methods that are intended to implement fmt.Scanner.
-// To do that, the arguments that have a = prefix are treated as
-// signals that the canonical meaning is intended: if a Scan
-// method doesn't have a fmt.ScanState as its first argument,
-// we let it go.  But if it does have a fmt.ScanState, then the
-// rest has to match.
-var canonicalMethods = map[string]MethodSig{
-	// "Flush": {{}, {"error"}}, // http.Flusher and jpeg.writer conflict
-	"Format":        {[]string{"=fmt.State", "rune"}, []string{}},                      // fmt.Formatter
-	"GobDecode":     {[]string{"[]byte"}, []string{"error"}},                           // gob.GobDecoder
-	"GobEncode":     {[]string{}, []string{"[]byte", "error"}},                         // gob.GobEncoder
-	"MarshalJSON":   {[]string{}, []string{"[]byte", "error"}},                         // json.Marshaler
-	"MarshalXML":    {[]string{"*xml.Encoder", "xml.StartElement"}, []string{"error"}}, // xml.Marshaler
-	"Peek":          {[]string{"=int"}, []string{"[]byte", "error"}},                   // image.reader (matching bufio.Reader)
-	"ReadByte":      {[]string{}, []string{"byte", "error"}},                           // io.ByteReader
-	"ReadFrom":      {[]string{"=io.Reader"}, []string{"int64", "error"}},              // io.ReaderFrom
-	"ReadRune":      {[]string{}, []string{"rune", "int", "error"}},                    // io.RuneReader
-	"Scan":          {[]string{"=fmt.ScanState", "rune"}, []string{"error"}},           // fmt.Scanner
-	"Seek":          {[]string{"=int64", "int"}, []string{"int64", "error"}},           // io.Seeker
-	"UnmarshalJSON": {[]string{"[]byte"}, []string{"error"}},                           // json.Unmarshaler
-	"UnmarshalXML":  {[]string{"*xml.Decoder", "xml.StartElement"}, []string{"error"}}, // xml.Unmarshaler
-	"UnreadByte":    {[]string{}, []string{"error"}},
-	"UnreadRune":    {[]string{}, []string{"error"}},
-	"WriteByte":     {[]string{"byte"}, []string{"error"}},                // jpeg.writer (matching bufio.Writer)
-	"WriteTo":       {[]string{"=io.Writer"}, []string{"int64", "error"}}, // io.WriterTo
-}
-
-func checkCanonicalMethod(f *File, node ast.Node) {
-	switch n := node.(type) {
-	case *ast.FuncDecl:
-		if n.Recv != nil {
-			canonicalMethod(f, n.Name, n.Type)
-		}
-	case *ast.InterfaceType:
-		for _, field := range n.Methods.List {
-			for _, id := range field.Names {
-				canonicalMethod(f, id, field.Type.(*ast.FuncType))
-			}
-		}
-	}
-}
-
-func canonicalMethod(f *File, id *ast.Ident, t *ast.FuncType) {
-	// Expected input/output.
-	expect, ok := canonicalMethods[id.Name]
-	if !ok {
-		return
-	}
-
-	// Actual input/output
-	args := typeFlatten(t.Params.List)
-	var results []ast.Expr
-	if t.Results != nil {
-		results = typeFlatten(t.Results.List)
-	}
-
-	// Do the =s (if any) all match?
-	if !f.matchParams(expect.args, args, "=") || !f.matchParams(expect.results, results, "=") {
-		return
-	}
-
-	// Everything must match.
-	if !f.matchParams(expect.args, args, "") || !f.matchParams(expect.results, results, "") {
-		expectFmt := id.Name + "(" + argjoin(expect.args) + ")"
-		if len(expect.results) == 1 {
-			expectFmt += " " + argjoin(expect.results)
-		} else if len(expect.results) > 1 {
-			expectFmt += " (" + argjoin(expect.results) + ")"
-		}
-
-		f.b.Reset()
-		if err := printer.Fprint(&f.b, f.fset, t); err != nil {
-			fmt.Fprintf(&f.b, "<%s>", err)
-		}
-		actual := f.b.String()
-		actual = strings.TrimPrefix(actual, "func")
-		actual = id.Name + actual
-
-		f.Badf(id.Pos(), "method %s should have signature %s", actual, expectFmt)
-	}
-}
-
-func argjoin(x []string) string {
-	y := make([]string, len(x))
-	for i, s := range x {
-		if s[0] == '=' {
-			s = s[1:]
-		}
-		y[i] = s
-	}
-	return strings.Join(y, ", ")
-}
-
-// Turn parameter list into slice of types
-// (in the ast, types are Exprs).
-// Have to handle f(int, bool) and f(x, y, z int)
-// so not a simple 1-to-1 conversion.
-func typeFlatten(l []*ast.Field) []ast.Expr {
-	var t []ast.Expr
-	for _, f := range l {
-		if len(f.Names) == 0 {
-			t = append(t, f.Type)
-			continue
-		}
-		for _ = range f.Names {
-			t = append(t, f.Type)
-		}
-	}
-	return t
-}
-
-// Does each type in expect with the given prefix match the corresponding type in actual?
-func (f *File) matchParams(expect []string, actual []ast.Expr, prefix string) bool {
-	for i, x := range expect {
-		if !strings.HasPrefix(x, prefix) {
-			continue
-		}
-		if i >= len(actual) {
-			return false
-		}
-		if !f.matchParamType(x, actual[i]) {
-			return false
-		}
-	}
-	if prefix == "" && len(actual) > len(expect) {
-		return false
-	}
-	return true
-}
-
-// Does this one type match?
-func (f *File) matchParamType(expect string, actual ast.Expr) bool {
-	if strings.HasPrefix(expect, "=") {
-		expect = expect[1:]
-	}
-	// Strip package name if we're in that package.
-	if n := len(f.file.Name.Name); len(expect) > n && expect[:n] == f.file.Name.Name && expect[n] == '.' {
-		expect = expect[n+1:]
-	}
-
-	// Overkill but easy.
-	f.b.Reset()
-	printer.Fprint(&f.b, f.fset, actual)
-	return f.b.String() == expect
-}
diff --git a/src/cmd/vet/nilfunc.go b/src/cmd/vet/nilfunc.go
deleted file mode 100644
index bfe05e3..0000000
--- a/src/cmd/vet/nilfunc.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-/*
-This file contains the code to check for useless function comparisons.
-A useless comparison is one like f == nil as opposed to f() == nil.
-*/
-
-package main
-
-import (
-	"go/ast"
-	"go/token"
-	"go/types"
-)
-
-func init() {
-	register("nilfunc",
-		"check for comparisons between functions and nil",
-		checkNilFuncComparison,
-		binaryExpr)
-}
-
-func checkNilFuncComparison(f *File, node ast.Node) {
-	e := node.(*ast.BinaryExpr)
-
-	// Only want == or != comparisons.
-	if e.Op != token.EQL && e.Op != token.NEQ {
-		return
-	}
-
-	// Only want comparisons with a nil identifier on one side.
-	var e2 ast.Expr
-	switch {
-	case f.isNil(e.X):
-		e2 = e.Y
-	case f.isNil(e.Y):
-		e2 = e.X
-	default:
-		return
-	}
-
-	// Only want identifiers or selector expressions.
-	var obj types.Object
-	switch v := e2.(type) {
-	case *ast.Ident:
-		obj = f.pkg.uses[v]
-	case *ast.SelectorExpr:
-		obj = f.pkg.uses[v.Sel]
-	default:
-		return
-	}
-
-	// Only want functions.
-	if _, ok := obj.(*types.Func); !ok {
-		return
-	}
-
-	f.Badf(e.Pos(), "comparison of function %v %v nil is always %v", obj.Name(), e.Op, e.Op == token.NEQ)
-}
-
-// isNil reports whether the provided expression is the built-in nil
-// identifier.
-func (f *File) isNil(e ast.Expr) bool {
-	return f.pkg.types[e].Type == types.Typ[types.UntypedNil]
-}
diff --git a/src/cmd/vet/print.go b/src/cmd/vet/print.go
deleted file mode 100644
index d79b096..0000000
--- a/src/cmd/vet/print.go
+++ /dev/null
@@ -1,586 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains the printf-checker.
-
-package main
-
-import (
-	"bytes"
-	"flag"
-	"go/ast"
-	"go/constant"
-	"go/token"
-	"go/types"
-	"strconv"
-	"strings"
-	"unicode/utf8"
-)
-
-var printfuncs = flag.String("printfuncs", "", "comma-separated list of print function names to check")
-
-func init() {
-	register("printf",
-		"check printf-like invocations",
-		checkFmtPrintfCall,
-		funcDecl, callExpr)
-}
-
-func initPrintFlags() {
-	if *printfuncs == "" {
-		return
-	}
-	for _, name := range strings.Split(*printfuncs, ",") {
-		if len(name) == 0 {
-			flag.Usage()
-		}
-		skip := 0
-		if colon := strings.LastIndex(name, ":"); colon > 0 {
-			var err error
-			skip, err = strconv.Atoi(name[colon+1:])
-			if err != nil {
-				errorf(`illegal format for "Func:N" argument %q; %s`, name, err)
-			}
-			name = name[:colon]
-		}
-		name = strings.ToLower(name)
-		if name[len(name)-1] == 'f' {
-			printfList[name] = skip
-		} else {
-			printList[name] = skip
-		}
-	}
-}
-
-// printfList records the formatted-print functions. The value is the location
-// of the format parameter. Names are lower-cased so the lookup is
-// case insensitive.
-var printfList = map[string]int{
-	"errorf":  0,
-	"fatalf":  0,
-	"fprintf": 1,
-	"logf":    0,
-	"panicf":  0,
-	"printf":  0,
-	"sprintf": 0,
-}
-
-// printList records the unformatted-print functions. The value is the location
-// of the first parameter to be printed.  Names are lower-cased so the lookup is
-// case insensitive.
-var printList = map[string]int{
-	"error":  0,
-	"fatal":  0,
-	"fprint": 1, "fprintln": 1,
-	"log":   0,
-	"panic": 0, "panicln": 0,
-	"print": 0, "println": 0,
-	"sprint": 0, "sprintln": 0,
-}
-
-// checkCall triggers the print-specific checks if the call invokes a print function.
-func checkFmtPrintfCall(f *File, node ast.Node) {
-	if d, ok := node.(*ast.FuncDecl); ok && isStringer(f, d) {
-		// Remember we saw this.
-		if f.stringers == nil {
-			f.stringers = make(map[*ast.Object]bool)
-		}
-		if l := d.Recv.List; len(l) == 1 {
-			if n := l[0].Names; len(n) == 1 {
-				f.stringers[n[0].Obj] = true
-			}
-		}
-		return
-	}
-
-	call, ok := node.(*ast.CallExpr)
-	if !ok {
-		return
-	}
-	var Name string
-	switch x := call.Fun.(type) {
-	case *ast.Ident:
-		Name = x.Name
-	case *ast.SelectorExpr:
-		Name = x.Sel.Name
-	default:
-		return
-	}
-
-	name := strings.ToLower(Name)
-	if skip, ok := printfList[name]; ok {
-		f.checkPrintf(call, Name, skip)
-		return
-	}
-	if skip, ok := printList[name]; ok {
-		f.checkPrint(call, Name, skip)
-		return
-	}
-}
-
-// isStringer returns true if the provided declaration is a "String() string"
-// method, an implementation of fmt.Stringer.
-func isStringer(f *File, d *ast.FuncDecl) bool {
-	return d.Recv != nil && d.Name.Name == "String" && d.Type.Results != nil &&
-		len(d.Type.Params.List) == 0 && len(d.Type.Results.List) == 1 &&
-		f.pkg.types[d.Type.Results.List[0].Type].Type == types.Typ[types.String]
-}
-
-// formatState holds the parsed representation of a printf directive such as "%3.*[4]d".
-// It is constructed by parsePrintfVerb.
-type formatState struct {
-	verb     rune   // the format verb: 'd' for "%d"
-	format   string // the full format directive from % through verb, "%.3d".
-	name     string // Printf, Sprintf etc.
-	flags    []byte // the list of # + etc.
-	argNums  []int  // the successive argument numbers that are consumed, adjusted to refer to actual arg in call
-	indexed  bool   // whether an indexing expression appears: %[1]d.
-	firstArg int    // Index of first argument after the format in the Printf call.
-	// Used only during parse.
-	file         *File
-	call         *ast.CallExpr
-	argNum       int  // Which argument we're expecting to format now.
-	indexPending bool // Whether we have an indexed argument that has not resolved.
-	nbytes       int  // number of bytes of the format string consumed.
-}
-
-// checkPrintf checks a call to a formatted print routine such as Printf.
-// call.Args[formatIndex] is (well, should be) the format argument.
-func (f *File) checkPrintf(call *ast.CallExpr, name string, formatIndex int) {
-	if formatIndex >= len(call.Args) {
-		f.Bad(call.Pos(), "too few arguments in call to", name)
-		return
-	}
-	lit := f.pkg.types[call.Args[formatIndex]].Value
-	if lit == nil {
-		if *verbose {
-			f.Warn(call.Pos(), "can't check non-constant format in call to", name)
-		}
-		return
-	}
-	if lit.Kind() != constant.String {
-		f.Badf(call.Pos(), "constant %v not a string in call to %s", lit, name)
-		return
-	}
-	format := constant.StringVal(lit)
-	firstArg := formatIndex + 1 // Arguments are immediately after format string.
-	if !strings.Contains(format, "%") {
-		if len(call.Args) > firstArg {
-			f.Badf(call.Pos(), "no formatting directive in %s call", name)
-		}
-		return
-	}
-	// Hard part: check formats against args.
-	argNum := firstArg
-	indexed := false
-	for i, w := 0, 0; i < len(format); i += w {
-		w = 1
-		if format[i] == '%' {
-			state := f.parsePrintfVerb(call, name, format[i:], firstArg, argNum)
-			if state == nil {
-				return
-			}
-			w = len(state.format)
-			if state.indexed {
-				indexed = true
-			}
-			if !f.okPrintfArg(call, state) { // One error per format is enough.
-				return
-			}
-			if len(state.argNums) > 0 {
-				// Continue with the next sequential argument.
-				argNum = state.argNums[len(state.argNums)-1] + 1
-			}
-		}
-	}
-	// Dotdotdot is hard.
-	if call.Ellipsis.IsValid() && argNum >= len(call.Args)-1 {
-		return
-	}
-	// If the arguments were direct indexed, we assume the programmer knows what's up.
-	// Otherwise, there should be no leftover arguments.
-	if !indexed && argNum != len(call.Args) {
-		expect := argNum - firstArg
-		numArgs := len(call.Args) - firstArg
-		f.Badf(call.Pos(), "wrong number of args for format in %s call: %d needed but %d args", name, expect, numArgs)
-	}
-}
-
-// parseFlags accepts any printf flags.
-func (s *formatState) parseFlags() {
-	for s.nbytes < len(s.format) {
-		switch c := s.format[s.nbytes]; c {
-		case '#', '0', '+', '-', ' ':
-			s.flags = append(s.flags, c)
-			s.nbytes++
-		default:
-			return
-		}
-	}
-}
-
-// scanNum advances through a decimal number if present.
-func (s *formatState) scanNum() {
-	for ; s.nbytes < len(s.format); s.nbytes++ {
-		c := s.format[s.nbytes]
-		if c < '0' || '9' < c {
-			return
-		}
-	}
-}
-
-// parseIndex scans an index expression. It returns false if there is a syntax error.
-func (s *formatState) parseIndex() bool {
-	if s.nbytes == len(s.format) || s.format[s.nbytes] != '[' {
-		return true
-	}
-	// Argument index present.
-	s.indexed = true
-	s.nbytes++ // skip '['
-	start := s.nbytes
-	s.scanNum()
-	if s.nbytes == len(s.format) || s.nbytes == start || s.format[s.nbytes] != ']' {
-		s.file.Badf(s.call.Pos(), "illegal syntax for printf argument index")
-		return false
-	}
-	arg32, err := strconv.ParseInt(s.format[start:s.nbytes], 10, 32)
-	if err != nil {
-		s.file.Badf(s.call.Pos(), "illegal syntax for printf argument index: %s", err)
-		return false
-	}
-	s.nbytes++ // skip ']'
-	arg := int(arg32)
-	arg += s.firstArg - 1 // We want to zero-index the actual arguments.
-	s.argNum = arg
-	s.indexPending = true
-	return true
-}
-
-// parseNum scans a width or precision (or *). It returns false if there's a bad index expression.
-func (s *formatState) parseNum() bool {
-	if s.nbytes < len(s.format) && s.format[s.nbytes] == '*' {
-		if s.indexPending { // Absorb it.
-			s.indexPending = false
-		}
-		s.nbytes++
-		s.argNums = append(s.argNums, s.argNum)
-		s.argNum++
-	} else {
-		s.scanNum()
-	}
-	return true
-}
-
-// parsePrecision scans for a precision. It returns false if there's a bad index expression.
-func (s *formatState) parsePrecision() bool {
-	// If there's a period, there may be a precision.
-	if s.nbytes < len(s.format) && s.format[s.nbytes] == '.' {
-		s.flags = append(s.flags, '.') // Treat precision as a flag.
-		s.nbytes++
-		if !s.parseIndex() {
-			return false
-		}
-		if !s.parseNum() {
-			return false
-		}
-	}
-	return true
-}
-
-// parsePrintfVerb looks the formatting directive that begins the format string
-// and returns a formatState that encodes what the directive wants, without looking
-// at the actual arguments present in the call. The result is nil if there is an error.
-func (f *File) parsePrintfVerb(call *ast.CallExpr, name, format string, firstArg, argNum int) *formatState {
-	state := &formatState{
-		format:   format,
-		name:     name,
-		flags:    make([]byte, 0, 5),
-		argNum:   argNum,
-		argNums:  make([]int, 0, 1),
-		nbytes:   1, // There's guaranteed to be a percent sign.
-		indexed:  false,
-		firstArg: firstArg,
-		file:     f,
-		call:     call,
-	}
-	// There may be flags.
-	state.parseFlags()
-	indexPending := false
-	// There may be an index.
-	if !state.parseIndex() {
-		return nil
-	}
-	// There may be a width.
-	if !state.parseNum() {
-		return nil
-	}
-	// There may be a precision.
-	if !state.parsePrecision() {
-		return nil
-	}
-	// Now a verb, possibly prefixed by an index (which we may already have).
-	if !indexPending && !state.parseIndex() {
-		return nil
-	}
-	if state.nbytes == len(state.format) {
-		f.Badf(call.Pos(), "missing verb at end of format string in %s call", name)
-		return nil
-	}
-	verb, w := utf8.DecodeRuneInString(state.format[state.nbytes:])
-	state.verb = verb
-	state.nbytes += w
-	if verb != '%' {
-		state.argNums = append(state.argNums, state.argNum)
-	}
-	state.format = state.format[:state.nbytes]
-	return state
-}
-
-// printfArgType encodes the types of expressions a printf verb accepts. It is a bitmask.
-type printfArgType int
-
-const (
-	argBool printfArgType = 1 << iota
-	argInt
-	argRune
-	argString
-	argFloat
-	argComplex
-	argPointer
-	anyType printfArgType = ^0
-)
-
-type printVerb struct {
-	verb  rune   // User may provide verb through Formatter; could be a rune.
-	flags string // known flags are all ASCII
-	typ   printfArgType
-}
-
-// Common flag sets for printf verbs.
-const (
-	noFlag       = ""
-	numFlag      = " -+.0"
-	sharpNumFlag = " -+.0#"
-	allFlags     = " -+.0#"
-)
-
-// printVerbs identifies which flags are known to printf for each verb.
-// TODO: A type that implements Formatter may do what it wants, and vet
-// will complain incorrectly.
-var printVerbs = []printVerb{
-	// '-' is a width modifier, always valid.
-	// '.' is a precision for float, max width for strings.
-	// '+' is required sign for numbers, Go format for %v.
-	// '#' is alternate format for several verbs.
-	// ' ' is spacer for numbers
-	{'%', noFlag, 0},
-	{'b', numFlag, argInt | argFloat | argComplex},
-	{'c', "-", argRune | argInt},
-	{'d', numFlag, argInt},
-	{'e', numFlag, argFloat | argComplex},
-	{'E', numFlag, argFloat | argComplex},
-	{'f', numFlag, argFloat | argComplex},
-	{'F', numFlag, argFloat | argComplex},
-	{'g', numFlag, argFloat | argComplex},
-	{'G', numFlag, argFloat | argComplex},
-	{'o', sharpNumFlag, argInt},
-	{'p', "-#", argPointer},
-	{'q', " -+.0#", argRune | argInt | argString},
-	{'s', " -+.0", argString},
-	{'t', "-", argBool},
-	{'T', "-", anyType},
-	{'U', "-#", argRune | argInt},
-	{'v', allFlags, anyType},
-	{'x', sharpNumFlag, argRune | argInt | argString},
-	{'X', sharpNumFlag, argRune | argInt | argString},
-}
-
-// okPrintfArg compares the formatState to the arguments actually present,
-// reporting any discrepancies it can discern. If the final argument is ellipsissed,
-// there's little it can do for that.
-func (f *File) okPrintfArg(call *ast.CallExpr, state *formatState) (ok bool) {
-	var v printVerb
-	found := false
-	// Linear scan is fast enough for a small list.
-	for _, v = range printVerbs {
-		if v.verb == state.verb {
-			found = true
-			break
-		}
-	}
-	if !found {
-		f.Badf(call.Pos(), "unrecognized printf verb %q", state.verb)
-		return false
-	}
-	for _, flag := range state.flags {
-		if !strings.ContainsRune(v.flags, rune(flag)) {
-			f.Badf(call.Pos(), "unrecognized printf flag for verb %q: %q", state.verb, flag)
-			return false
-		}
-	}
-	// Verb is good. If len(state.argNums)>trueArgs, we have something like %.*s and all
-	// but the final arg must be an integer.
-	trueArgs := 1
-	if state.verb == '%' {
-		trueArgs = 0
-	}
-	nargs := len(state.argNums)
-	for i := 0; i < nargs-trueArgs; i++ {
-		argNum := state.argNums[i]
-		if !f.argCanBeChecked(call, i, true, state) {
-			return
-		}
-		arg := call.Args[argNum]
-		if !f.matchArgType(argInt, nil, arg) {
-			f.Badf(call.Pos(), "arg %s for * in printf format not of type int", f.gofmt(arg))
-			return false
-		}
-	}
-	if state.verb == '%' {
-		return true
-	}
-	argNum := state.argNums[len(state.argNums)-1]
-	if !f.argCanBeChecked(call, len(state.argNums)-1, false, state) {
-		return false
-	}
-	arg := call.Args[argNum]
-	if !f.matchArgType(v.typ, nil, arg) {
-		typeString := ""
-		if typ := f.pkg.types[arg].Type; typ != nil {
-			typeString = typ.String()
-		}
-		f.Badf(call.Pos(), "arg %s for printf verb %%%c of wrong type: %s", f.gofmt(arg), state.verb, typeString)
-		return false
-	}
-	if v.typ&argString != 0 && v.verb != 'T' && !bytes.Contains(state.flags, []byte{'#'}) && f.recursiveStringer(arg) {
-		f.Badf(call.Pos(), "arg %s for printf causes recursive call to String method", f.gofmt(arg))
-		return false
-	}
-	return true
-}
-
-// recursiveStringer reports whether the provided argument is r or &r for the
-// fmt.Stringer receiver identifier r.
-func (f *File) recursiveStringer(e ast.Expr) bool {
-	if len(f.stringers) == 0 {
-		return false
-	}
-	var obj *ast.Object
-	switch e := e.(type) {
-	case *ast.Ident:
-		obj = e.Obj
-	case *ast.UnaryExpr:
-		if id, ok := e.X.(*ast.Ident); ok && e.Op == token.AND {
-			obj = id.Obj
-		}
-	}
-
-	// It's unlikely to be a recursive stringer if it has a Format method.
-	if typ := f.pkg.types[e].Type; typ != nil {
-		// Not a perfect match; see issue 6259.
-		if f.hasMethod(typ, "Format") {
-			return false
-		}
-	}
-
-	// We compare the underlying Object, which checks that the identifier
-	// is the one we declared as the receiver for the String method in
-	// which this printf appears.
-	return f.stringers[obj]
-}
-
-// argCanBeChecked reports whether the specified argument is statically present;
-// it may be beyond the list of arguments or in a terminal slice... argument, which
-// means we can't see it.
-func (f *File) argCanBeChecked(call *ast.CallExpr, formatArg int, isStar bool, state *formatState) bool {
-	argNum := state.argNums[formatArg]
-	if argNum < 0 {
-		// Shouldn't happen, so catch it with prejudice.
-		panic("negative arg num")
-	}
-	if argNum == 0 {
-		f.Badf(call.Pos(), `index value [0] for %s("%s"); indexes start at 1`, state.name, state.format)
-		return false
-	}
-	if argNum < len(call.Args)-1 {
-		return true // Always OK.
-	}
-	if call.Ellipsis.IsValid() {
-		return false // We just can't tell; there could be many more arguments.
-	}
-	if argNum < len(call.Args) {
-		return true
-	}
-	// There are bad indexes in the format or there are fewer arguments than the format needs.
-	// This is the argument number relative to the format: Printf("%s", "hi") will give 1 for the "hi".
-	arg := argNum - state.firstArg + 1 // People think of arguments as 1-indexed.
-	f.Badf(call.Pos(), `missing argument for %s("%s"): format reads arg %d, have only %d args`, state.name, state.format, arg, len(call.Args)-state.firstArg)
-	return false
-}
-
-// checkPrint checks a call to an unformatted print routine such as Println.
-// call.Args[firstArg] is the first argument to be printed.
-func (f *File) checkPrint(call *ast.CallExpr, name string, firstArg int) {
-	isLn := strings.HasSuffix(name, "ln")
-	isF := strings.HasPrefix(name, "F")
-	args := call.Args
-	if name == "Log" && len(args) > 0 {
-		// Special case: Don't complain about math.Log or cmplx.Log.
-		// Not strictly necessary because the only complaint likely is for Log("%d")
-		// but it feels wrong to check that math.Log is a good print function.
-		if sel, ok := args[0].(*ast.SelectorExpr); ok {
-			if x, ok := sel.X.(*ast.Ident); ok {
-				if x.Name == "math" || x.Name == "cmplx" {
-					return
-				}
-			}
-		}
-	}
-	// check for Println(os.Stderr, ...)
-	if firstArg == 0 && !isF && len(args) > 0 {
-		if sel, ok := args[0].(*ast.SelectorExpr); ok {
-			if x, ok := sel.X.(*ast.Ident); ok {
-				if x.Name == "os" && strings.HasPrefix(sel.Sel.Name, "Std") {
-					f.Badf(call.Pos(), "first argument to %s is %s.%s", name, x.Name, sel.Sel.Name)
-				}
-			}
-		}
-	}
-	if len(args) <= firstArg {
-		// If we have a call to a method called Error that satisfies the Error interface,
-		// then it's ok. Otherwise it's something like (*T).Error from the testing package
-		// and we need to check it.
-		if name == "Error" && f.isErrorMethodCall(call) {
-			return
-		}
-		// If it's an Error call now, it's probably for printing errors.
-		if !isLn {
-			// Check the signature to be sure: there are niladic functions called "error".
-			if firstArg != 0 || f.numArgsInSignature(call) != firstArg {
-				f.Badf(call.Pos(), "no args in %s call", name)
-			}
-		}
-		return
-	}
-	arg := args[firstArg]
-	if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING {
-		if strings.Contains(lit.Value, "%") {
-			f.Badf(call.Pos(), "possible formatting directive in %s call", name)
-		}
-	}
-	if isLn {
-		// The last item, if a string, should not have a newline.
-		arg = args[len(call.Args)-1]
-		if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING {
-			if strings.HasSuffix(lit.Value, `\n"`) {
-				f.Badf(call.Pos(), "%s call ends with newline", name)
-			}
-		}
-	}
-	for _, arg := range args {
-		if f.recursiveStringer(arg) {
-			f.Badf(call.Pos(), "arg %s for print causes recursive call to String method", f.gofmt(arg))
-		}
-	}
-}
diff --git a/src/cmd/vet/rangeloop.go b/src/cmd/vet/rangeloop.go
deleted file mode 100644
index 11eef59..0000000
--- a/src/cmd/vet/rangeloop.go
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-/*
-This file contains the code to check range loop variables bound inside function
-literals that are deferred or launched in new goroutines. We only check
-instances where the defer or go statement is the last statement in the loop
-body, as otherwise we would need whole program analysis.
-
-For example:
-
-	for i, v := range s {
-		go func() {
-			println(i, v) // not what you might expect
-		}()
-	}
-
-See: https://golang.org/doc/go_faq.html#closures_and_goroutines
-*/
-
-package main
-
-import "go/ast"
-
-func init() {
-	register("rangeloops",
-		"check that range loop variables are used correctly",
-		checkRangeLoop,
-		rangeStmt)
-}
-
-// checkRangeLoop walks the body of the provided range statement, checking if
-// its index or value variables are used unsafely inside goroutines or deferred
-// function literals.
-func checkRangeLoop(f *File, node ast.Node) {
-	n := node.(*ast.RangeStmt)
-	key, _ := n.Key.(*ast.Ident)
-	val, _ := n.Value.(*ast.Ident)
-	if key == nil && val == nil {
-		return
-	}
-	sl := n.Body.List
-	if len(sl) == 0 {
-		return
-	}
-	var last *ast.CallExpr
-	switch s := sl[len(sl)-1].(type) {
-	case *ast.GoStmt:
-		last = s.Call
-	case *ast.DeferStmt:
-		last = s.Call
-	default:
-		return
-	}
-	lit, ok := last.Fun.(*ast.FuncLit)
-	if !ok {
-		return
-	}
-	ast.Inspect(lit.Body, func(n ast.Node) bool {
-		id, ok := n.(*ast.Ident)
-		if !ok || id.Obj == nil {
-			return true
-		}
-		if key != nil && id.Obj == key.Obj || val != nil && id.Obj == val.Obj {
-			f.Bad(id.Pos(), "range variable", id.Name, "captured by func literal")
-		}
-		return true
-	})
-}
diff --git a/src/cmd/vet/shadow.go b/src/cmd/vet/shadow.go
deleted file mode 100644
index 2149e70..0000000
--- a/src/cmd/vet/shadow.go
+++ /dev/null
@@ -1,244 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-/*
-This file contains the code to check for shadowed variables.
-A shadowed variable is a variable declared in an inner scope
-with the same name and type as a variable in an outer scope,
-and where the outer variable is mentioned after the inner one
-is declared.
-
-(This definition can be refined; the module generates too many
-false positives and is not yet enabled by default.)
-
-For example:
-
-	func BadRead(f *os.File, buf []byte) error {
-		var err error
-		for {
-			n, err := f.Read(buf) // shadows the function variable 'err'
-			if err != nil {
-				break // causes return of wrong value
-			}
-			foo(buf)
-		}
-		return err
-	}
-
-*/
-
-package main
-
-import (
-	"flag"
-	"go/ast"
-	"go/token"
-	"go/types"
-)
-
-var strictShadowing = flag.Bool("shadowstrict", false, "whether to be strict about shadowing; can be noisy")
-
-func init() {
-	register("shadow",
-		"check for shadowed variables (experimental; must be set explicitly)",
-		checkShadow,
-		assignStmt, genDecl)
-	experimental["shadow"] = true
-}
-
-func checkShadow(f *File, node ast.Node) {
-	switch n := node.(type) {
-	case *ast.AssignStmt:
-		checkShadowAssignment(f, n)
-	case *ast.GenDecl:
-		checkShadowDecl(f, n)
-	}
-}
-
-// Span stores the minimum range of byte positions in the file in which a
-// given variable (types.Object) is mentioned. It is lexically defined: it spans
-// from the beginning of its first mention to the end of its last mention.
-// A variable is considered shadowed (if *strictShadowing is off) only if the
-// shadowing variable is declared within the span of the shadowed variable.
-// In other words, if a variable is shadowed but not used after the shadowed
-// variable is declared, it is inconsequential and not worth complaining about.
-// This simple check dramatically reduces the nuisance rate for the shadowing
-// check, at least until something cleverer comes along.
-//
-// One wrinkle: A "naked return" is a silent use of a variable that the Span
-// will not capture, but the compilers catch naked returns of shadowed
-// variables so we don't need to.
-//
-// Cases this gets wrong (TODO):
-// - If a for loop's continuation statement mentions a variable redeclared in
-// the block, we should complain about it but don't.
-// - A variable declared inside a function literal can falsely be identified
-// as shadowing a variable in the outer function.
-//
-type Span struct {
-	min token.Pos
-	max token.Pos
-}
-
-// contains reports whether the position is inside the span.
-func (s Span) contains(pos token.Pos) bool {
-	return s.min <= pos && pos < s.max
-}
-
-// growSpan expands the span for the object to contain the instance represented
-// by the identifier.
-func (pkg *Package) growSpan(ident *ast.Ident, obj types.Object) {
-	if *strictShadowing {
-		return // No need
-	}
-	pos := ident.Pos()
-	end := ident.End()
-	span, ok := pkg.spans[obj]
-	if ok {
-		if span.min > pos {
-			span.min = pos
-		}
-		if span.max < end {
-			span.max = end
-		}
-	} else {
-		span = Span{pos, end}
-	}
-	pkg.spans[obj] = span
-}
-
-// checkShadowAssignment checks for shadowing in a short variable declaration.
-func checkShadowAssignment(f *File, a *ast.AssignStmt) {
-	if a.Tok != token.DEFINE {
-		return
-	}
-	if f.idiomaticShortRedecl(a) {
-		return
-	}
-	for _, expr := range a.Lhs {
-		ident, ok := expr.(*ast.Ident)
-		if !ok {
-			f.Badf(expr.Pos(), "invalid AST: short variable declaration of non-identifier")
-			return
-		}
-		checkShadowing(f, ident)
-	}
-}
-
-// idiomaticShortRedecl reports whether this short declaration can be ignored for
-// the purposes of shadowing, that is, that any redeclarations it contains are deliberate.
-func (f *File) idiomaticShortRedecl(a *ast.AssignStmt) bool {
-	// Don't complain about deliberate redeclarations of the form
-	//	i := i
-	// Such constructs are idiomatic in range loops to create a new variable
-	// for each iteration. Another example is
-	//	switch n := n.(type)
-	if len(a.Rhs) != len(a.Lhs) {
-		return false
-	}
-	// We know it's an assignment, so the LHS must be all identifiers. (We check anyway.)
-	for i, expr := range a.Lhs {
-		lhs, ok := expr.(*ast.Ident)
-		if !ok {
-			f.Badf(expr.Pos(), "invalid AST: short variable declaration of non-identifier")
-			return true // Don't do any more processing.
-		}
-		switch rhs := a.Rhs[i].(type) {
-		case *ast.Ident:
-			if lhs.Name != rhs.Name {
-				return false
-			}
-		case *ast.TypeAssertExpr:
-			if id, ok := rhs.X.(*ast.Ident); ok {
-				if lhs.Name != id.Name {
-					return false
-				}
-			}
-		}
-	}
-	return true
-}
-
-// idiomaticRedecl reports whether this declaration spec can be ignored for
-// the purposes of shadowing, that is, that any redeclarations it contains are deliberate.
-func (f *File) idiomaticRedecl(d *ast.ValueSpec) bool {
-	// Don't complain about deliberate redeclarations of the form
-	//	var i, j = i, j
-	if len(d.Names) != len(d.Values) {
-		return false
-	}
-	for i, lhs := range d.Names {
-		if rhs, ok := d.Values[i].(*ast.Ident); ok {
-			if lhs.Name != rhs.Name {
-				return false
-			}
-		}
-	}
-	return true
-}
-
-// checkShadowDecl checks for shadowing in a general variable declaration.
-func checkShadowDecl(f *File, d *ast.GenDecl) {
-	if d.Tok != token.VAR {
-		return
-	}
-	for _, spec := range d.Specs {
-		valueSpec, ok := spec.(*ast.ValueSpec)
-		if !ok {
-			f.Badf(spec.Pos(), "invalid AST: var GenDecl not ValueSpec")
-			return
-		}
-		// Don't complain about deliberate redeclarations of the form
-		//	var i = i
-		if f.idiomaticRedecl(valueSpec) {
-			return
-		}
-		for _, ident := range valueSpec.Names {
-			checkShadowing(f, ident)
-		}
-	}
-}
-
-// checkShadowing checks whether the identifier shadows an identifier in an outer scope.
-func checkShadowing(f *File, ident *ast.Ident) {
-	if ident.Name == "_" {
-		// Can't shadow the blank identifier.
-		return
-	}
-	obj := f.pkg.defs[ident]
-	if obj == nil {
-		return
-	}
-	// obj.Parent.Parent is the surrounding scope. If we can find another declaration
-	// starting from there, we have a shadowed identifier.
-	_, shadowed := obj.Parent().Parent().LookupParent(obj.Name(), obj.Pos())
-	if shadowed == nil {
-		return
-	}
-	// Don't complain if it's shadowing a universe-declared identifier; that's fine.
-	if shadowed.Parent() == types.Universe {
-		return
-	}
-	if *strictShadowing {
-		// The shadowed identifier must appear before this one to be an instance of shadowing.
-		if shadowed.Pos() > ident.Pos() {
-			return
-		}
-	} else {
-		// Don't complain if the span of validity of the shadowed identifier doesn't include
-		// the shadowing identifier.
-		span, ok := f.pkg.spans[shadowed]
-		if !ok {
-			f.Badf(ident.Pos(), "internal error: no range for %s", ident.Name)
-			return
-		}
-		if !span.contains(ident.Pos()) {
-			return
-		}
-	}
-	// Don't complain if the types differ: that implies the programmer really wants two different things.
-	if types.Identical(obj.Type(), shadowed.Type()) {
-		f.Badf(ident.Pos(), "declaration of %s shadows declaration at %s", obj.Name(), f.loc(shadowed.Pos()))
-	}
-}
diff --git a/src/cmd/vet/shift.go b/src/cmd/vet/shift.go
deleted file mode 100644
index 8c038b4..0000000
--- a/src/cmd/vet/shift.go
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-/*
-This file contains the code to check for suspicious shifts.
-*/
-
-package main
-
-import (
-	"go/ast"
-	"go/constant"
-	"go/token"
-	"go/types"
-)
-
-func init() {
-	register("shift",
-		"check for useless shifts",
-		checkShift,
-		binaryExpr, assignStmt)
-}
-
-func checkShift(f *File, node ast.Node) {
-	switch node := node.(type) {
-	case *ast.BinaryExpr:
-		if node.Op == token.SHL || node.Op == token.SHR {
-			checkLongShift(f, node, node.X, node.Y)
-		}
-	case *ast.AssignStmt:
-		if len(node.Lhs) != 1 || len(node.Rhs) != 1 {
-			return
-		}
-		if node.Tok == token.SHL_ASSIGN || node.Tok == token.SHR_ASSIGN {
-			checkLongShift(f, node, node.Lhs[0], node.Rhs[0])
-		}
-	}
-}
-
-// checkLongShift checks if shift or shift-assign operations shift by more than
-// the length of the underlying variable.
-func checkLongShift(f *File, node ast.Node, x, y ast.Expr) {
-	v := f.pkg.types[y].Value
-	if v == nil {
-		return
-	}
-	amt, ok := constant.Int64Val(v)
-	if !ok {
-		return
-	}
-	t := f.pkg.types[x].Type
-	if t == nil {
-		return
-	}
-	b, ok := t.Underlying().(*types.Basic)
-	if !ok {
-		return
-	}
-	var size int64
-	var msg string
-	switch b.Kind() {
-	case types.Uint8, types.Int8:
-		size = 8
-	case types.Uint16, types.Int16:
-		size = 16
-	case types.Uint32, types.Int32:
-		size = 32
-	case types.Uint64, types.Int64:
-		size = 64
-	case types.Int, types.Uint, types.Uintptr:
-		// These types may be as small as 32 bits, but no smaller.
-		size = 32
-		msg = "might be "
-	default:
-		return
-	}
-	if amt >= size {
-		ident := f.gofmt(x)
-		f.Badf(node.Pos(), "%s %stoo small for shift of %d", ident, msg, amt)
-	}
-}
diff --git a/src/cmd/vet/structtag.go b/src/cmd/vet/structtag.go
deleted file mode 100644
index e8164a4..0000000
--- a/src/cmd/vet/structtag.go
+++ /dev/null
@@ -1,122 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains the test for canonical struct tags.
-
-package main
-
-import (
-	"errors"
-	"go/ast"
-	"reflect"
-	"strconv"
-)
-
-func init() {
-	register("structtags",
-		"check that struct field tags have canonical format and apply to exported fields as needed",
-		checkCanonicalFieldTag,
-		field)
-}
-
-// checkCanonicalFieldTag checks a struct field tag.
-func checkCanonicalFieldTag(f *File, node ast.Node) {
-	field := node.(*ast.Field)
-	if field.Tag == nil {
-		return
-	}
-
-	tag, err := strconv.Unquote(field.Tag.Value)
-	if err != nil {
-		f.Badf(field.Pos(), "unable to read struct tag %s", field.Tag.Value)
-		return
-	}
-
-	if err := validateStructTag(tag); err != nil {
-		f.Badf(field.Pos(), "struct field tag %s not compatible with reflect.StructTag.Get: %s", field.Tag.Value, err)
-	}
-
-	// Check for use of json or xml tags with unexported fields.
-
-	// Embedded struct. Nothing to do for now, but that
-	// may change, depending on what happens with issue 7363.
-	if len(field.Names) == 0 {
-		return
-	}
-
-	if field.Names[0].IsExported() {
-		return
-	}
-
-	st := reflect.StructTag(tag)
-	for _, enc := range [...]string{"json", "xml"} {
-		if st.Get(enc) != "" {
-			f.Badf(field.Pos(), "struct field %s has %s tag but is not exported", field.Names[0].Name, enc)
-			return
-		}
-	}
-}
-
-var (
-	errTagSyntax      = errors.New("bad syntax for struct tag pair")
-	errTagKeySyntax   = errors.New("bad syntax for struct tag key")
-	errTagValueSyntax = errors.New("bad syntax for struct tag value")
-)
-
-// validateStructTag parses the struct tag and returns an error if it is not
-// in the canonical format, which is a space-separated list of key:"value"
-// settings. The value may contain spaces.
-func validateStructTag(tag string) error {
-	// This code is based on the StructTag.Get code in package reflect.
-
-	for tag != "" {
-		// Skip leading space.
-		i := 0
-		for i < len(tag) && tag[i] == ' ' {
-			i++
-		}
-		tag = tag[i:]
-		if tag == "" {
-			break
-		}
-
-		// Scan to colon. A space, a quote or a control character is a syntax error.
-		// Strictly speaking, control chars include the range [0x7f, 0x9f], not just
-		// [0x00, 0x1f], but in practice, we ignore the multi-byte control characters
-		// as it is simpler to inspect the tag's bytes than the tag's runes.
-		i = 0
-		for i < len(tag) && tag[i] > ' ' && tag[i] != ':' && tag[i] != '"' && tag[i] != 0x7f {
-			i++
-		}
-		if i == 0 {
-			return errTagKeySyntax
-		}
-		if i+1 >= len(tag) || tag[i] != ':' {
-			return errTagSyntax
-		}
-		if tag[i+1] != '"' {
-			return errTagValueSyntax
-		}
-		tag = tag[i+1:]
-
-		// Scan quoted string to find value.
-		i = 1
-		for i < len(tag) && tag[i] != '"' {
-			if tag[i] == '\\' {
-				i++
-			}
-			i++
-		}
-		if i >= len(tag) {
-			return errTagValueSyntax
-		}
-		qvalue := string(tag[:i+1])
-		tag = tag[i+1:]
-
-		if _, err := strconv.Unquote(qvalue); err != nil {
-			return errTagValueSyntax
-		}
-	}
-	return nil
-}
diff --git a/src/cmd/vet/testdata/asm.go b/src/cmd/vet/testdata/asm.go
deleted file mode 100644
index 9a3d531..0000000
--- a/src/cmd/vet/testdata/asm.go
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-// This file contains declarations to test the assembly in test_asm.s.
-
-package testdata
-
-func arg1(x int8, y uint8)
-func arg2(x int16, y uint16)
-func arg4(x int32, y uint32)
-func arg8(x int64, y uint64)
-func argint(x int, y uint)
-func argptr(x *byte, y *byte, c chan int, m map[int]int, f func())
-func argstring(x, y string)
-func argslice(x, y []string)
-func argiface(x interface{}, y interface {
-	m()
-})
-func returnint() int
-func returnbyte(x int) byte
-func returnnamed(x byte) (r1 int, r2 int16, r3 string, r4 byte)
-func returnintmissing() int
-func leaf(x, y int) int
-
-func noprof(x int)
-func dupok(x int)
-func nosplit(x int)
-func rodata(x int)
-func noptr(x int)
-func wrapper(x int)
diff --git a/src/cmd/vet/testdata/asm1.s b/src/cmd/vet/testdata/asm1.s
deleted file mode 100644
index 62f423c..0000000
--- a/src/cmd/vet/testdata/asm1.s
+++ /dev/null
@@ -1,254 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64
-// +build vet_test
-
-TEXT ·arg1(SB),0,$0-2
-	MOVB	x+0(FP), AX
-	// MOVB x+0(FP), AX // commented out instructions used to panic
-	MOVB	y+1(FP), BX
-	MOVW	x+0(FP), AX // ERROR "\[amd64\] arg1: invalid MOVW of x\+0\(FP\); int8 is 1-byte value"
-	MOVW	y+1(FP), AX // ERROR "invalid MOVW of y\+1\(FP\); uint8 is 1-byte value"
-	MOVL	x+0(FP), AX // ERROR "invalid MOVL of x\+0\(FP\); int8 is 1-byte value"
-	MOVL	y+1(FP), AX // ERROR "invalid MOVL of y\+1\(FP\); uint8 is 1-byte value"
-	MOVQ	x+0(FP), AX // ERROR "invalid MOVQ of x\+0\(FP\); int8 is 1-byte value"
-	MOVQ	y+1(FP), AX // ERROR "invalid MOVQ of y\+1\(FP\); uint8 is 1-byte value"
-	MOVB	x+1(FP), AX // ERROR "invalid offset x\+1\(FP\); expected x\+0\(FP\)"
-	MOVB	y+2(FP), AX // ERROR "invalid offset y\+2\(FP\); expected y\+1\(FP\)"
-	TESTB	x+0(FP), AX
-	TESTB	y+1(FP), BX
-	TESTW	x+0(FP), AX // ERROR "invalid TESTW of x\+0\(FP\); int8 is 1-byte value"
-	TESTW	y+1(FP), AX // ERROR "invalid TESTW of y\+1\(FP\); uint8 is 1-byte value"
-	TESTL	x+0(FP), AX // ERROR "invalid TESTL of x\+0\(FP\); int8 is 1-byte value"
-	TESTL	y+1(FP), AX // ERROR "invalid TESTL of y\+1\(FP\); uint8 is 1-byte value"
-	TESTQ	x+0(FP), AX // ERROR "invalid TESTQ of x\+0\(FP\); int8 is 1-byte value"
-	TESTQ	y+1(FP), AX // ERROR "invalid TESTQ of y\+1\(FP\); uint8 is 1-byte value"
-	TESTB	x+1(FP), AX // ERROR "invalid offset x\+1\(FP\); expected x\+0\(FP\)"
-	TESTB	y+2(FP), AX // ERROR "invalid offset y\+2\(FP\); expected y\+1\(FP\)"
-	MOVB	8(SP), AX // ERROR "8\(SP\) should be x\+0\(FP\)"
-	MOVB	9(SP), AX // ERROR "9\(SP\) should be y\+1\(FP\)"
-	MOVB	10(SP), AX // ERROR "use of 10\(SP\) points beyond argument frame"
-	RET
-
-TEXT ·arg2(SB),0,$0-4
-	MOVB	x+0(FP), AX // ERROR "arg2: invalid MOVB of x\+0\(FP\); int16 is 2-byte value"
-	MOVB	y+2(FP), AX // ERROR "invalid MOVB of y\+2\(FP\); uint16 is 2-byte value"
-	MOVW	x+0(FP), AX
-	MOVW	y+2(FP), BX
-	MOVL	x+0(FP), AX // ERROR "invalid MOVL of x\+0\(FP\); int16 is 2-byte value"
-	MOVL	y+2(FP), AX // ERROR "invalid MOVL of y\+2\(FP\); uint16 is 2-byte value"
-	MOVQ	x+0(FP), AX // ERROR "invalid MOVQ of x\+0\(FP\); int16 is 2-byte value"
-	MOVQ	y+2(FP), AX // ERROR "invalid MOVQ of y\+2\(FP\); uint16 is 2-byte value"
-	MOVW	x+2(FP), AX // ERROR "invalid offset x\+2\(FP\); expected x\+0\(FP\)"
-	MOVW	y+0(FP), AX // ERROR "invalid offset y\+0\(FP\); expected y\+2\(FP\)"
-	TESTB	x+0(FP), AX // ERROR "invalid TESTB of x\+0\(FP\); int16 is 2-byte value"
-	TESTB	y+2(FP), AX // ERROR "invalid TESTB of y\+2\(FP\); uint16 is 2-byte value"
-	TESTW	x+0(FP), AX
-	TESTW	y+2(FP), BX
-	TESTL	x+0(FP), AX // ERROR "invalid TESTL of x\+0\(FP\); int16 is 2-byte value"
-	TESTL	y+2(FP), AX // ERROR "invalid TESTL of y\+2\(FP\); uint16 is 2-byte value"
-	TESTQ	x+0(FP), AX // ERROR "invalid TESTQ of x\+0\(FP\); int16 is 2-byte value"
-	TESTQ	y+2(FP), AX // ERROR "invalid TESTQ of y\+2\(FP\); uint16 is 2-byte value"
-	TESTW	x+2(FP), AX // ERROR "invalid offset x\+2\(FP\); expected x\+0\(FP\)"
-	TESTW	y+0(FP), AX // ERROR "invalid offset y\+0\(FP\); expected y\+2\(FP\)"
-	RET
-
-TEXT ·arg4(SB),0,$0-2 // ERROR "arg4: wrong argument size 2; expected \$\.\.\.-8"
-	MOVB	x+0(FP), AX // ERROR "invalid MOVB of x\+0\(FP\); int32 is 4-byte value"
-	MOVB	y+4(FP), BX // ERROR "invalid MOVB of y\+4\(FP\); uint32 is 4-byte value"
-	MOVW	x+0(FP), AX // ERROR "invalid MOVW of x\+0\(FP\); int32 is 4-byte value"
-	MOVW	y+4(FP), AX // ERROR "invalid MOVW of y\+4\(FP\); uint32 is 4-byte value"
-	MOVL	x+0(FP), AX
-	MOVL	y+4(FP), AX
-	MOVQ	x+0(FP), AX // ERROR "invalid MOVQ of x\+0\(FP\); int32 is 4-byte value"
-	MOVQ	y+4(FP), AX // ERROR "invalid MOVQ of y\+4\(FP\); uint32 is 4-byte value"
-	MOVL	x+4(FP), AX // ERROR "invalid offset x\+4\(FP\); expected x\+0\(FP\)"
-	MOVL	y+2(FP), AX // ERROR "invalid offset y\+2\(FP\); expected y\+4\(FP\)"
-	TESTB	x+0(FP), AX // ERROR "invalid TESTB of x\+0\(FP\); int32 is 4-byte value"
-	TESTB	y+4(FP), BX // ERROR "invalid TESTB of y\+4\(FP\); uint32 is 4-byte value"
-	TESTW	x+0(FP), AX // ERROR "invalid TESTW of x\+0\(FP\); int32 is 4-byte value"
-	TESTW	y+4(FP), AX // ERROR "invalid TESTW of y\+4\(FP\); uint32 is 4-byte value"
-	TESTL	x+0(FP), AX
-	TESTL	y+4(FP), AX
-	TESTQ	x+0(FP), AX // ERROR "invalid TESTQ of x\+0\(FP\); int32 is 4-byte value"
-	TESTQ	y+4(FP), AX // ERROR "invalid TESTQ of y\+4\(FP\); uint32 is 4-byte value"
-	TESTL	x+4(FP), AX // ERROR "invalid offset x\+4\(FP\); expected x\+0\(FP\)"
-	TESTL	y+2(FP), AX // ERROR "invalid offset y\+2\(FP\); expected y\+4\(FP\)"
-	RET
-
-TEXT ·arg8(SB),7,$0-2 // ERROR "wrong argument size 2; expected \$\.\.\.-16"
-	MOVB	x+0(FP), AX // ERROR "invalid MOVB of x\+0\(FP\); int64 is 8-byte value"
-	MOVB	y+8(FP), BX // ERROR "invalid MOVB of y\+8\(FP\); uint64 is 8-byte value"
-	MOVW	x+0(FP), AX // ERROR "invalid MOVW of x\+0\(FP\); int64 is 8-byte value"
-	MOVW	y+8(FP), AX // ERROR "invalid MOVW of y\+8\(FP\); uint64 is 8-byte value"
-	MOVL	x+0(FP), AX // ERROR "invalid MOVL of x\+0\(FP\); int64 is 8-byte value"
-	MOVL	y+8(FP), AX // ERROR "invalid MOVL of y\+8\(FP\); uint64 is 8-byte value"
-	MOVQ	x+0(FP), AX
-	MOVQ	y+8(FP), AX
-	MOVQ	x+8(FP), AX // ERROR "invalid offset x\+8\(FP\); expected x\+0\(FP\)"
-	MOVQ	y+2(FP), AX // ERROR "invalid offset y\+2\(FP\); expected y\+8\(FP\)"
-	TESTB	x+0(FP), AX // ERROR "invalid TESTB of x\+0\(FP\); int64 is 8-byte value"
-	TESTB	y+8(FP), BX // ERROR "invalid TESTB of y\+8\(FP\); uint64 is 8-byte value"
-	TESTW	x+0(FP), AX // ERROR "invalid TESTW of x\+0\(FP\); int64 is 8-byte value"
-	TESTW	y+8(FP), AX // ERROR "invalid TESTW of y\+8\(FP\); uint64 is 8-byte value"
-	TESTL	x+0(FP), AX // ERROR "invalid TESTL of x\+0\(FP\); int64 is 8-byte value"
-	TESTL	y+8(FP), AX // ERROR "invalid TESTL of y\+8\(FP\); uint64 is 8-byte value"
-	TESTQ	x+0(FP), AX
-	TESTQ	y+8(FP), AX
-	TESTQ	x+8(FP), AX // ERROR "invalid offset x\+8\(FP\); expected x\+0\(FP\)"
-	TESTQ	y+2(FP), AX // ERROR "invalid offset y\+2\(FP\); expected y\+8\(FP\)"
-	RET
-
-TEXT ·argint(SB),0,$0-2 // ERROR "wrong argument size 2; expected \$\.\.\.-16"
-	MOVB	x+0(FP), AX // ERROR "invalid MOVB of x\+0\(FP\); int is 8-byte value"
-	MOVB	y+8(FP), BX // ERROR "invalid MOVB of y\+8\(FP\); uint is 8-byte value"
-	MOVW	x+0(FP), AX // ERROR "invalid MOVW of x\+0\(FP\); int is 8-byte value"
-	MOVW	y+8(FP), AX // ERROR "invalid MOVW of y\+8\(FP\); uint is 8-byte value"
-	MOVL	x+0(FP), AX // ERROR "invalid MOVL of x\+0\(FP\); int is 8-byte value"
-	MOVL	y+8(FP), AX // ERROR "invalid MOVL of y\+8\(FP\); uint is 8-byte value"
-	MOVQ	x+0(FP), AX
-	MOVQ	y+8(FP), AX
-	MOVQ	x+8(FP), AX // ERROR "invalid offset x\+8\(FP\); expected x\+0\(FP\)"
-	MOVQ	y+2(FP), AX // ERROR "invalid offset y\+2\(FP\); expected y\+8\(FP\)"
-	TESTB	x+0(FP), AX // ERROR "invalid TESTB of x\+0\(FP\); int is 8-byte value"
-	TESTB	y+8(FP), BX // ERROR "invalid TESTB of y\+8\(FP\); uint is 8-byte value"
-	TESTW	x+0(FP), AX // ERROR "invalid TESTW of x\+0\(FP\); int is 8-byte value"
-	TESTW	y+8(FP), AX // ERROR "invalid TESTW of y\+8\(FP\); uint is 8-byte value"
-	TESTL	x+0(FP), AX // ERROR "invalid TESTL of x\+0\(FP\); int is 8-byte value"
-	TESTL	y+8(FP), AX // ERROR "invalid TESTL of y\+8\(FP\); uint is 8-byte value"
-	TESTQ	x+0(FP), AX
-	TESTQ	y+8(FP), AX
-	TESTQ	x+8(FP), AX // ERROR "invalid offset x\+8\(FP\); expected x\+0\(FP\)"
-	TESTQ	y+2(FP), AX // ERROR "invalid offset y\+2\(FP\); expected y\+8\(FP\)"
-	RET
-
-TEXT ·argptr(SB),7,$0-2 // ERROR "wrong argument size 2; expected \$\.\.\.-40"
-	MOVB	x+0(FP), AX // ERROR "invalid MOVB of x\+0\(FP\); \*byte is 8-byte value"
-	MOVB	y+8(FP), BX // ERROR "invalid MOVB of y\+8\(FP\); \*byte is 8-byte value"
-	MOVW	x+0(FP), AX // ERROR "invalid MOVW of x\+0\(FP\); \*byte is 8-byte value"
-	MOVW	y+8(FP), AX // ERROR "invalid MOVW of y\+8\(FP\); \*byte is 8-byte value"
-	MOVL	x+0(FP), AX // ERROR "invalid MOVL of x\+0\(FP\); \*byte is 8-byte value"
-	MOVL	y+8(FP), AX // ERROR "invalid MOVL of y\+8\(FP\); \*byte is 8-byte value"
-	MOVQ	x+0(FP), AX
-	MOVQ	y+8(FP), AX
-	MOVQ	x+8(FP), AX // ERROR "invalid offset x\+8\(FP\); expected x\+0\(FP\)"
-	MOVQ	y+2(FP), AX // ERROR "invalid offset y\+2\(FP\); expected y\+8\(FP\)"
-	TESTB	x+0(FP), AX // ERROR "invalid TESTB of x\+0\(FP\); \*byte is 8-byte value"
-	TESTB	y+8(FP), BX // ERROR "invalid TESTB of y\+8\(FP\); \*byte is 8-byte value"
-	TESTW	x+0(FP), AX // ERROR "invalid TESTW of x\+0\(FP\); \*byte is 8-byte value"
-	TESTW	y+8(FP), AX // ERROR "invalid TESTW of y\+8\(FP\); \*byte is 8-byte value"
-	TESTL	x+0(FP), AX // ERROR "invalid TESTL of x\+0\(FP\); \*byte is 8-byte value"
-	TESTL	y+8(FP), AX // ERROR "invalid TESTL of y\+8\(FP\); \*byte is 8-byte value"
-	TESTQ	x+0(FP), AX
-	TESTQ	y+8(FP), AX
-	TESTQ	x+8(FP), AX // ERROR "invalid offset x\+8\(FP\); expected x\+0\(FP\)"
-	TESTQ	y+2(FP), AX // ERROR "invalid offset y\+2\(FP\); expected y\+8\(FP\)"
-	MOVL	c+16(FP), AX // ERROR "invalid MOVL of c\+16\(FP\); chan int is 8-byte value"
-	MOVL	m+24(FP), AX // ERROR "invalid MOVL of m\+24\(FP\); map\[int\]int is 8-byte value"
-	MOVL	f+32(FP), AX // ERROR "invalid MOVL of f\+32\(FP\); func\(\) is 8-byte value"
-	RET
-
-TEXT ·argstring(SB),0,$32 // ERROR "wrong argument size 0; expected \$\.\.\.-32"
-	MOVW	x+0(FP), AX // ERROR "invalid MOVW of x\+0\(FP\); string base is 8-byte value"
-	MOVL	x+0(FP), AX // ERROR "invalid MOVL of x\+0\(FP\); string base is 8-byte value"
-	MOVQ	x+0(FP), AX
-	MOVW	x_base+0(FP), AX // ERROR "invalid MOVW of x_base\+0\(FP\); string base is 8-byte value"
-	MOVL	x_base+0(FP), AX // ERROR "invalid MOVL of x_base\+0\(FP\); string base is 8-byte value"
-	MOVQ	x_base+0(FP), AX
-	MOVW	x_len+0(FP), AX // ERROR "invalid offset x_len\+0\(FP\); expected x_len\+8\(FP\)"
-	MOVL	x_len+0(FP), AX // ERROR "invalid offset x_len\+0\(FP\); expected x_len\+8\(FP\)"
-	MOVQ	x_len+0(FP), AX // ERROR "invalid offset x_len\+0\(FP\); expected x_len\+8\(FP\)"
-	MOVW	x_len+8(FP), AX // ERROR "invalid MOVW of x_len\+8\(FP\); string len is 8-byte value"
-	MOVL	x_len+8(FP), AX // ERROR "invalid MOVL of x_len\+8\(FP\); string len is 8-byte value"
-	MOVQ	x_len+8(FP), AX
-	MOVQ	y+0(FP), AX // ERROR "invalid offset y\+0\(FP\); expected y\+16\(FP\)"
-	MOVQ	y_len+8(FP), AX // ERROR "invalid offset y_len\+8\(FP\); expected y_len\+24\(FP\)"
-	RET
-
-TEXT ·argslice(SB),0,$48 // ERROR "wrong argument size 0; expected \$\.\.\.-48"
-	MOVW	x+0(FP), AX // ERROR "invalid MOVW of x\+0\(FP\); slice base is 8-byte value"
-	MOVL	x+0(FP), AX // ERROR "invalid MOVL of x\+0\(FP\); slice base is 8-byte value"
-	MOVQ	x+0(FP), AX
-	MOVW	x_base+0(FP), AX // ERROR "invalid MOVW of x_base\+0\(FP\); slice base is 8-byte value"
-	MOVL	x_base+0(FP), AX // ERROR "invalid MOVL of x_base\+0\(FP\); slice base is 8-byte value"
-	MOVQ	x_base+0(FP), AX
-	MOVW	x_len+0(FP), AX // ERROR "invalid offset x_len\+0\(FP\); expected x_len\+8\(FP\)"
-	MOVL	x_len+0(FP), AX // ERROR "invalid offset x_len\+0\(FP\); expected x_len\+8\(FP\)"
-	MOVQ	x_len+0(FP), AX // ERROR "invalid offset x_len\+0\(FP\); expected x_len\+8\(FP\)"
-	MOVW	x_len+8(FP), AX // ERROR "invalid MOVW of x_len\+8\(FP\); slice len is 8-byte value"
-	MOVL	x_len+8(FP), AX // ERROR "invalid MOVL of x_len\+8\(FP\); slice len is 8-byte value"
-	MOVQ	x_len+8(FP), AX
-	MOVW	x_cap+0(FP), AX // ERROR "invalid offset x_cap\+0\(FP\); expected x_cap\+16\(FP\)"
-	MOVL	x_cap+0(FP), AX // ERROR "invalid offset x_cap\+0\(FP\); expected x_cap\+16\(FP\)"
-	MOVQ	x_cap+0(FP), AX // ERROR "invalid offset x_cap\+0\(FP\); expected x_cap\+16\(FP\)"
-	MOVW	x_cap+16(FP), AX // ERROR "invalid MOVW of x_cap\+16\(FP\); slice cap is 8-byte value"
-	MOVL	x_cap+16(FP), AX // ERROR "invalid MOVL of x_cap\+16\(FP\); slice cap is 8-byte value"
-	MOVQ	x_cap+16(FP), AX
-	MOVQ	y+0(FP), AX // ERROR "invalid offset y\+0\(FP\); expected y\+24\(FP\)"
-	MOVQ	y_len+8(FP), AX // ERROR "invalid offset y_len\+8\(FP\); expected y_len\+32\(FP\)"
-	MOVQ	y_cap+16(FP), AX // ERROR "invalid offset y_cap\+16\(FP\); expected y_cap\+40\(FP\)"
-	RET
-
-TEXT ·argiface(SB),0,$0-32
-	MOVW	x+0(FP), AX // ERROR "invalid MOVW of x\+0\(FP\); interface type is 8-byte value"
-	MOVL	x+0(FP), AX // ERROR "invalid MOVL of x\+0\(FP\); interface type is 8-byte value"
-	MOVQ	x+0(FP), AX
-	MOVW	x_type+0(FP), AX // ERROR "invalid MOVW of x_type\+0\(FP\); interface type is 8-byte value"
-	MOVL	x_type+0(FP), AX // ERROR "invalid MOVL of x_type\+0\(FP\); interface type is 8-byte value"
-	MOVQ	x_type+0(FP), AX
-	MOVQ	x_itable+0(FP), AX // ERROR "unknown variable x_itable; offset 0 is x_type\+0\(FP\)"
-	MOVQ	x_itable+1(FP), AX // ERROR "unknown variable x_itable; offset 1 is x_type\+0\(FP\)"
-	MOVW	x_data+0(FP), AX // ERROR "invalid offset x_data\+0\(FP\); expected x_data\+8\(FP\)"
-	MOVL	x_data+0(FP), AX // ERROR "invalid offset x_data\+0\(FP\); expected x_data\+8\(FP\)"
-	MOVQ	x_data+0(FP), AX // ERROR "invalid offset x_data\+0\(FP\); expected x_data\+8\(FP\)"
-	MOVW	x_data+8(FP), AX // ERROR "invalid MOVW of x_data\+8\(FP\); interface data is 8-byte value"
-	MOVL	x_data+8(FP), AX // ERROR "invalid MOVL of x_data\+8\(FP\); interface data is 8-byte value"
-	MOVQ	x_data+8(FP), AX
-	MOVW	y+16(FP), AX // ERROR "invalid MOVW of y\+16\(FP\); interface itable is 8-byte value"
-	MOVL	y+16(FP), AX // ERROR "invalid MOVL of y\+16\(FP\); interface itable is 8-byte value"
-	MOVQ	y+16(FP), AX
-	MOVW	y_itable+16(FP), AX // ERROR "invalid MOVW of y_itable\+16\(FP\); interface itable is 8-byte value"
-	MOVL	y_itable+16(FP), AX // ERROR "invalid MOVL of y_itable\+16\(FP\); interface itable is 8-byte value"
-	MOVQ	y_itable+16(FP), AX
-	MOVQ	y_type+16(FP), AX // ERROR "unknown variable y_type; offset 16 is y_itable\+16\(FP\)"
-	MOVW	y_data+16(FP), AX // ERROR "invalid offset y_data\+16\(FP\); expected y_data\+24\(FP\)"
-	MOVL	y_data+16(FP), AX // ERROR "invalid offset y_data\+16\(FP\); expected y_data\+24\(FP\)"
-	MOVQ	y_data+16(FP), AX // ERROR "invalid offset y_data\+16\(FP\); expected y_data\+24\(FP\)"
-	MOVW	y_data+24(FP), AX // ERROR "invalid MOVW of y_data\+24\(FP\); interface data is 8-byte value"
-	MOVL	y_data+24(FP), AX // ERROR "invalid MOVL of y_data\+24\(FP\); interface data is 8-byte value"
-	MOVQ	y_data+24(FP), AX
-	RET
-
-TEXT ·returnint(SB),0,$0-8
-	MOVB	AX, ret+0(FP) // ERROR "invalid MOVB of ret\+0\(FP\); int is 8-byte value"
-	MOVW	AX, ret+0(FP) // ERROR "invalid MOVW of ret\+0\(FP\); int is 8-byte value"
-	MOVL	AX, ret+0(FP) // ERROR "invalid MOVL of ret\+0\(FP\); int is 8-byte value"
-	MOVQ	AX, ret+0(FP)
-	MOVQ	AX, ret+1(FP) // ERROR "invalid offset ret\+1\(FP\); expected ret\+0\(FP\)"
-	MOVQ	AX, r+0(FP) // ERROR "unknown variable r; offset 0 is ret\+0\(FP\)"
-	RET
-
-TEXT ·returnbyte(SB),0,$0-9
-	MOVQ	x+0(FP), AX
-	MOVB	AX, ret+8(FP)
-	MOVW	AX, ret+8(FP) // ERROR "invalid MOVW of ret\+8\(FP\); byte is 1-byte value"
-	MOVL	AX, ret+8(FP) // ERROR "invalid MOVL of ret\+8\(FP\); byte is 1-byte value"
-	MOVQ	AX, ret+8(FP) // ERROR "invalid MOVQ of ret\+8\(FP\); byte is 1-byte value"
-	MOVB	AX, ret+7(FP) // ERROR "invalid offset ret\+7\(FP\); expected ret\+8\(FP\)"
-	RET
-
-TEXT ·returnnamed(SB),0,$0-41
-	MOVB	x+0(FP), AX
-	MOVQ	AX, r1+8(FP)
-	MOVW	AX, r2+16(FP)
-	MOVQ	AX, r3+24(FP)
-	MOVQ	AX, r3_base+24(FP)
-	MOVQ	AX, r3_len+32(FP)
-	MOVB	AX, r4+40(FP)
-	MOVL	AX, r1+8(FP) // ERROR "invalid MOVL of r1\+8\(FP\); int is 8-byte value"
-	RET
-
-TEXT ·returnintmissing(SB),0,$0-8
-	RET // ERROR "RET without writing to 8-byte ret\+0\(FP\)"
diff --git a/src/cmd/vet/testdata/asm2.s b/src/cmd/vet/testdata/asm2.s
deleted file mode 100644
index c33c02a..0000000
--- a/src/cmd/vet/testdata/asm2.s
+++ /dev/null
@@ -1,257 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build 386
-// +build vet_test
-
-TEXT ·arg1(SB),0,$0-2
-	MOVB	x+0(FP), AX
-	MOVB	y+1(FP), BX
-	MOVW	x+0(FP), AX // ERROR "\[386\] arg1: invalid MOVW of x\+0\(FP\); int8 is 1-byte value"
-	MOVW	y+1(FP), AX // ERROR "invalid MOVW of y\+1\(FP\); uint8 is 1-byte value"
-	MOVL	x+0(FP), AX // ERROR "invalid MOVL of x\+0\(FP\); int8 is 1-byte value"
-	MOVL	y+1(FP), AX // ERROR "invalid MOVL of y\+1\(FP\); uint8 is 1-byte value"
-	MOVQ	x+0(FP), AX // ERROR "invalid MOVQ of x\+0\(FP\); int8 is 1-byte value"
-	MOVQ	y+1(FP), AX // ERROR "invalid MOVQ of y\+1\(FP\); uint8 is 1-byte value"
-	MOVB	x+1(FP), AX // ERROR "invalid offset x\+1\(FP\); expected x\+0\(FP\)"
-	MOVB	y+2(FP), AX // ERROR "invalid offset y\+2\(FP\); expected y\+1\(FP\)"
-	TESTB	x+0(FP), AX
-	TESTB	y+1(FP), BX
-	TESTW	x+0(FP), AX // ERROR "invalid TESTW of x\+0\(FP\); int8 is 1-byte value"
-	TESTW	y+1(FP), AX // ERROR "invalid TESTW of y\+1\(FP\); uint8 is 1-byte value"
-	TESTL	x+0(FP), AX // ERROR "invalid TESTL of x\+0\(FP\); int8 is 1-byte value"
-	TESTL	y+1(FP), AX // ERROR "invalid TESTL of y\+1\(FP\); uint8 is 1-byte value"
-	TESTQ	x+0(FP), AX // ERROR "invalid TESTQ of x\+0\(FP\); int8 is 1-byte value"
-	TESTQ	y+1(FP), AX // ERROR "invalid TESTQ of y\+1\(FP\); uint8 is 1-byte value"
-	TESTB	x+1(FP), AX // ERROR "invalid offset x\+1\(FP\); expected x\+0\(FP\)"
-	TESTB	y+2(FP), AX // ERROR "invalid offset y\+2\(FP\); expected y\+1\(FP\)"
-	MOVB	4(SP), AX // ERROR "4\(SP\) should be x\+0\(FP\)"
-	MOVB	5(SP), AX // ERROR "5\(SP\) should be y\+1\(FP\)"
-	MOVB	6(SP), AX // ERROR "use of 6\(SP\) points beyond argument frame"
-	RET
-
-TEXT ·arg2(SB),0,$0-4
-	MOVB	x+0(FP), AX // ERROR "arg2: invalid MOVB of x\+0\(FP\); int16 is 2-byte value"
-	MOVB	y+2(FP), AX // ERROR "invalid MOVB of y\+2\(FP\); uint16 is 2-byte value"
-	MOVW	x+0(FP), AX
-	MOVW	y+2(FP), BX
-	MOVL	x+0(FP), AX // ERROR "invalid MOVL of x\+0\(FP\); int16 is 2-byte value"
-	MOVL	y+2(FP), AX // ERROR "invalid MOVL of y\+2\(FP\); uint16 is 2-byte value"
-	MOVQ	x+0(FP), AX // ERROR "invalid MOVQ of x\+0\(FP\); int16 is 2-byte value"
-	MOVQ	y+2(FP), AX // ERROR "invalid MOVQ of y\+2\(FP\); uint16 is 2-byte value"
-	MOVW	x+2(FP), AX // ERROR "invalid offset x\+2\(FP\); expected x\+0\(FP\)"
-	MOVW	y+0(FP), AX // ERROR "invalid offset y\+0\(FP\); expected y\+2\(FP\)"
-	TESTB	x+0(FP), AX // ERROR "invalid TESTB of x\+0\(FP\); int16 is 2-byte value"
-	TESTB	y+2(FP), AX // ERROR "invalid TESTB of y\+2\(FP\); uint16 is 2-byte value"
-	TESTW	x+0(FP), AX
-	TESTW	y+2(FP), BX
-	TESTL	x+0(FP), AX // ERROR "invalid TESTL of x\+0\(FP\); int16 is 2-byte value"
-	TESTL	y+2(FP), AX // ERROR "invalid TESTL of y\+2\(FP\); uint16 is 2-byte value"
-	TESTQ	x+0(FP), AX // ERROR "invalid TESTQ of x\+0\(FP\); int16 is 2-byte value"
-	TESTQ	y+2(FP), AX // ERROR "invalid TESTQ of y\+2\(FP\); uint16 is 2-byte value"
-	TESTW	x+2(FP), AX // ERROR "invalid offset x\+2\(FP\); expected x\+0\(FP\)"
-	TESTW	y+0(FP), AX // ERROR "invalid offset y\+0\(FP\); expected y\+2\(FP\)"
-	RET
-
-TEXT ·arg4(SB),0,$0-2 // ERROR "arg4: wrong argument size 2; expected \$\.\.\.-8"
-	MOVB	x+0(FP), AX // ERROR "invalid MOVB of x\+0\(FP\); int32 is 4-byte value"
-	MOVB	y+4(FP), BX // ERROR "invalid MOVB of y\+4\(FP\); uint32 is 4-byte value"
-	MOVW	x+0(FP), AX // ERROR "invalid MOVW of x\+0\(FP\); int32 is 4-byte value"
-	MOVW	y+4(FP), AX // ERROR "invalid MOVW of y\+4\(FP\); uint32 is 4-byte value"
-	MOVL	x+0(FP), AX
-	MOVL	y+4(FP), AX
-	MOVQ	x+0(FP), AX // ERROR "invalid MOVQ of x\+0\(FP\); int32 is 4-byte value"
-	MOVQ	y+4(FP), AX // ERROR "invalid MOVQ of y\+4\(FP\); uint32 is 4-byte value"
-	MOVL	x+4(FP), AX // ERROR "invalid offset x\+4\(FP\); expected x\+0\(FP\)"
-	MOVL	y+2(FP), AX // ERROR "invalid offset y\+2\(FP\); expected y\+4\(FP\)"
-	TESTB	x+0(FP), AX // ERROR "invalid TESTB of x\+0\(FP\); int32 is 4-byte value"
-	TESTB	y+4(FP), BX // ERROR "invalid TESTB of y\+4\(FP\); uint32 is 4-byte value"
-	TESTW	x+0(FP), AX // ERROR "invalid TESTW of x\+0\(FP\); int32 is 4-byte value"
-	TESTW	y+4(FP), AX // ERROR "invalid TESTW of y\+4\(FP\); uint32 is 4-byte value"
-	TESTL	x+0(FP), AX
-	TESTL	y+4(FP), AX
-	TESTQ	x+0(FP), AX // ERROR "invalid TESTQ of x\+0\(FP\); int32 is 4-byte value"
-	TESTQ	y+4(FP), AX // ERROR "invalid TESTQ of y\+4\(FP\); uint32 is 4-byte value"
-	TESTL	x+4(FP), AX // ERROR "invalid offset x\+4\(FP\); expected x\+0\(FP\)"
-	TESTL	y+2(FP), AX // ERROR "invalid offset y\+2\(FP\); expected y\+4\(FP\)"
-	RET
-
-TEXT ·arg8(SB),7,$0-2 // ERROR "wrong argument size 2; expected \$\.\.\.-16"
-	MOVB	x+0(FP), AX // ERROR "invalid MOVB of x\+0\(FP\); int64 is 8-byte value"
-	MOVB	y+8(FP), BX // ERROR "invalid MOVB of y\+8\(FP\); uint64 is 8-byte value"
-	MOVW	x+0(FP), AX // ERROR "invalid MOVW of x\+0\(FP\); int64 is 8-byte value"
-	MOVW	y+8(FP), AX // ERROR "invalid MOVW of y\+8\(FP\); uint64 is 8-byte value"
-	MOVL	x+0(FP), AX // ERROR "invalid MOVL of x\+0\(FP\); int64 is 8-byte value containing x_lo\+0\(FP\) and x_hi\+4\(FP\)"
-	MOVL	x_lo+0(FP), AX
-	MOVL	x_hi+4(FP), AX
-	MOVL	y+8(FP), AX // ERROR "invalid MOVL of y\+8\(FP\); uint64 is 8-byte value containing y_lo\+8\(FP\) and y_hi\+12\(FP\)"
-	MOVL	y_lo+8(FP), AX
-	MOVL	y_hi+12(FP), AX
-	MOVQ	x+0(FP), AX
-	MOVQ	y+8(FP), AX
-	MOVQ	x+8(FP), AX // ERROR "invalid offset x\+8\(FP\); expected x\+0\(FP\)"
-	MOVQ	y+2(FP), AX // ERROR "invalid offset y\+2\(FP\); expected y\+8\(FP\)"
-	TESTB	x+0(FP), AX // ERROR "invalid TESTB of x\+0\(FP\); int64 is 8-byte value"
-	TESTB	y+8(FP), BX // ERROR "invalid TESTB of y\+8\(FP\); uint64 is 8-byte value"
-	TESTW	x+0(FP), AX // ERROR "invalid TESTW of x\+0\(FP\); int64 is 8-byte value"
-	TESTW	y+8(FP), AX // ERROR "invalid TESTW of y\+8\(FP\); uint64 is 8-byte value"
-	TESTL	x+0(FP), AX // ERROR "invalid TESTL of x\+0\(FP\); int64 is 8-byte value containing x_lo\+0\(FP\) and x_hi\+4\(FP\)"
-	TESTL	y+8(FP), AX // ERROR "invalid TESTL of y\+8\(FP\); uint64 is 8-byte value containing y_lo\+8\(FP\) and y_hi\+12\(FP\)"
-	TESTQ	x+0(FP), AX
-	TESTQ	y+8(FP), AX
-	TESTQ	x+8(FP), AX // ERROR "invalid offset x\+8\(FP\); expected x\+0\(FP\)"
-	TESTQ	y+2(FP), AX // ERROR "invalid offset y\+2\(FP\); expected y\+8\(FP\)"
-	RET
-
-TEXT ·argint(SB),0,$0-2 // ERROR "wrong argument size 2; expected \$\.\.\.-8"
-	MOVB	x+0(FP), AX // ERROR "invalid MOVB of x\+0\(FP\); int is 4-byte value"
-	MOVB	y+4(FP), BX // ERROR "invalid MOVB of y\+4\(FP\); uint is 4-byte value"
-	MOVW	x+0(FP), AX // ERROR "invalid MOVW of x\+0\(FP\); int is 4-byte value"
-	MOVW	y+4(FP), AX // ERROR "invalid MOVW of y\+4\(FP\); uint is 4-byte value"
-	MOVL	x+0(FP), AX
-	MOVL	y+4(FP), AX
-	MOVQ	x+0(FP), AX // ERROR "invalid MOVQ of x\+0\(FP\); int is 4-byte value"
-	MOVQ	y+4(FP), AX // ERROR "invalid MOVQ of y\+4\(FP\); uint is 4-byte value"
-	MOVQ	x+4(FP), AX // ERROR "invalid offset x\+4\(FP\); expected x\+0\(FP\)"
-	MOVQ	y+2(FP), AX // ERROR "invalid offset y\+2\(FP\); expected y\+4\(FP\)"
-	TESTB	x+0(FP), AX // ERROR "invalid TESTB of x\+0\(FP\); int is 4-byte value"
-	TESTB	y+4(FP), BX // ERROR "invalid TESTB of y\+4\(FP\); uint is 4-byte value"
-	TESTW	x+0(FP), AX // ERROR "invalid TESTW of x\+0\(FP\); int is 4-byte value"
-	TESTW	y+4(FP), AX // ERROR "invalid TESTW of y\+4\(FP\); uint is 4-byte value"
-	TESTL	x+0(FP), AX
-	TESTL	y+4(FP), AX
-	TESTQ	x+0(FP), AX // ERROR "invalid TESTQ of x\+0\(FP\); int is 4-byte value"
-	TESTQ	y+4(FP), AX // ERROR "invalid TESTQ of y\+4\(FP\); uint is 4-byte value"
-	TESTQ	x+4(FP), AX // ERROR "invalid offset x\+4\(FP\); expected x\+0\(FP\)"
-	TESTQ	y+2(FP), AX // ERROR "invalid offset y\+2\(FP\); expected y\+4\(FP\)"
-	RET
-
-TEXT ·argptr(SB),7,$0-2 // ERROR "wrong argument size 2; expected \$\.\.\.-20"
-	MOVB	x+0(FP), AX // ERROR "invalid MOVB of x\+0\(FP\); \*byte is 4-byte value"
-	MOVB	y+4(FP), BX // ERROR "invalid MOVB of y\+4\(FP\); \*byte is 4-byte value"
-	MOVW	x+0(FP), AX // ERROR "invalid MOVW of x\+0\(FP\); \*byte is 4-byte value"
-	MOVW	y+4(FP), AX // ERROR "invalid MOVW of y\+4\(FP\); \*byte is 4-byte value"
-	MOVL	x+0(FP), AX
-	MOVL	y+4(FP), AX
-	MOVQ	x+0(FP), AX // ERROR "invalid MOVQ of x\+0\(FP\); \*byte is 4-byte value"
-	MOVQ	y+4(FP), AX // ERROR "invalid MOVQ of y\+4\(FP\); \*byte is 4-byte value"
-	MOVQ	x+4(FP), AX // ERROR "invalid offset x\+4\(FP\); expected x\+0\(FP\)"
-	MOVQ	y+2(FP), AX // ERROR "invalid offset y\+2\(FP\); expected y\+4\(FP\)"
-	TESTB	x+0(FP), AX // ERROR "invalid TESTB of x\+0\(FP\); \*byte is 4-byte value"
-	TESTB	y+4(FP), BX // ERROR "invalid TESTB of y\+4\(FP\); \*byte is 4-byte value"
-	TESTW	x+0(FP), AX // ERROR "invalid TESTW of x\+0\(FP\); \*byte is 4-byte value"
-	TESTW	y+4(FP), AX // ERROR "invalid TESTW of y\+4\(FP\); \*byte is 4-byte value"
-	TESTL	x+0(FP), AX
-	TESTL	y+4(FP), AX
-	TESTQ	x+0(FP), AX // ERROR "invalid TESTQ of x\+0\(FP\); \*byte is 4-byte value"
-	TESTQ	y+4(FP), AX // ERROR "invalid TESTQ of y\+4\(FP\); \*byte is 4-byte value"
-	TESTQ	x+4(FP), AX // ERROR "invalid offset x\+4\(FP\); expected x\+0\(FP\)"
-	TESTQ	y+2(FP), AX // ERROR "invalid offset y\+2\(FP\); expected y\+4\(FP\)"
-	MOVW	c+8(FP), AX // ERROR "invalid MOVW of c\+8\(FP\); chan int is 4-byte value"
-	MOVW	m+12(FP), AX // ERROR "invalid MOVW of m\+12\(FP\); map\[int\]int is 4-byte value"
-	MOVW	f+16(FP), AX // ERROR "invalid MOVW of f\+16\(FP\); func\(\) is 4-byte value"
-	RET
-
-TEXT ·argstring(SB),0,$16 // ERROR "wrong argument size 0; expected \$\.\.\.-16"
-	MOVW	x+0(FP), AX // ERROR "invalid MOVW of x\+0\(FP\); string base is 4-byte value"
-	MOVL	x+0(FP), AX
-	MOVQ	x+0(FP), AX // ERROR "invalid MOVQ of x\+0\(FP\); string base is 4-byte value"
-	MOVW	x_base+0(FP), AX // ERROR "invalid MOVW of x_base\+0\(FP\); string base is 4-byte value"
-	MOVL	x_base+0(FP), AX
-	MOVQ	x_base+0(FP), AX // ERROR "invalid MOVQ of x_base\+0\(FP\); string base is 4-byte value"
-	MOVW	x_len+0(FP), AX // ERROR "invalid offset x_len\+0\(FP\); expected x_len\+4\(FP\)"
-	MOVL	x_len+0(FP), AX // ERROR "invalid offset x_len\+0\(FP\); expected x_len\+4\(FP\)"
-	MOVQ	x_len+0(FP), AX // ERROR "invalid offset x_len\+0\(FP\); expected x_len\+4\(FP\)"
-	MOVW	x_len+4(FP), AX // ERROR "invalid MOVW of x_len\+4\(FP\); string len is 4-byte value"
-	MOVL	x_len+4(FP), AX
-	MOVQ	x_len+4(FP), AX // ERROR "invalid MOVQ of x_len\+4\(FP\); string len is 4-byte value"
-	MOVQ	y+0(FP), AX // ERROR "invalid offset y\+0\(FP\); expected y\+8\(FP\)"
-	MOVQ	y_len+4(FP), AX // ERROR "invalid offset y_len\+4\(FP\); expected y_len\+12\(FP\)"
-	RET
-
-TEXT ·argslice(SB),0,$24 // ERROR "wrong argument size 0; expected \$\.\.\.-24"
-	MOVW	x+0(FP), AX // ERROR "invalid MOVW of x\+0\(FP\); slice base is 4-byte value"
-	MOVL	x+0(FP), AX
-	MOVQ	x+0(FP), AX // ERROR "invalid MOVQ of x\+0\(FP\); slice base is 4-byte value"
-	MOVW	x_base+0(FP), AX // ERROR "invalid MOVW of x_base\+0\(FP\); slice base is 4-byte value"
-	MOVL	x_base+0(FP), AX
-	MOVQ	x_base+0(FP), AX // ERROR "invalid MOVQ of x_base\+0\(FP\); slice base is 4-byte value"
-	MOVW	x_len+0(FP), AX // ERROR "invalid offset x_len\+0\(FP\); expected x_len\+4\(FP\)"
-	MOVL	x_len+0(FP), AX // ERROR "invalid offset x_len\+0\(FP\); expected x_len\+4\(FP\)"
-	MOVQ	x_len+0(FP), AX // ERROR "invalid offset x_len\+0\(FP\); expected x_len\+4\(FP\)"
-	MOVW	x_len+4(FP), AX // ERROR "invalid MOVW of x_len\+4\(FP\); slice len is 4-byte value"
-	MOVL	x_len+4(FP), AX
-	MOVQ	x_len+4(FP), AX // ERROR "invalid MOVQ of x_len\+4\(FP\); slice len is 4-byte value"
-	MOVW	x_cap+0(FP), AX // ERROR "invalid offset x_cap\+0\(FP\); expected x_cap\+8\(FP\)"
-	MOVL	x_cap+0(FP), AX // ERROR "invalid offset x_cap\+0\(FP\); expected x_cap\+8\(FP\)"
-	MOVQ	x_cap+0(FP), AX // ERROR "invalid offset x_cap\+0\(FP\); expected x_cap\+8\(FP\)"
-	MOVW	x_cap+8(FP), AX // ERROR "invalid MOVW of x_cap\+8\(FP\); slice cap is 4-byte value"
-	MOVL	x_cap+8(FP), AX
-	MOVQ	x_cap+8(FP), AX // ERROR "invalid MOVQ of x_cap\+8\(FP\); slice cap is 4-byte value"
-	MOVQ	y+0(FP), AX // ERROR "invalid offset y\+0\(FP\); expected y\+12\(FP\)"
-	MOVQ	y_len+4(FP), AX // ERROR "invalid offset y_len\+4\(FP\); expected y_len\+16\(FP\)"
-	MOVQ	y_cap+8(FP), AX // ERROR "invalid offset y_cap\+8\(FP\); expected y_cap\+20\(FP\)"
-	RET
-
-TEXT ·argiface(SB),0,$0-16
-	MOVW	x+0(FP), AX // ERROR "invalid MOVW of x\+0\(FP\); interface type is 4-byte value"
-	MOVL	x+0(FP), AX
-	MOVQ	x+0(FP), AX // ERROR "invalid MOVQ of x\+0\(FP\); interface type is 4-byte value"
-	MOVW	x_type+0(FP), AX // ERROR "invalid MOVW of x_type\+0\(FP\); interface type is 4-byte value"
-	MOVL	x_type+0(FP), AX
-	MOVQ	x_type+0(FP), AX // ERROR "invalid MOVQ of x_type\+0\(FP\); interface type is 4-byte value"
-	MOVQ	x_itable+0(FP), AX // ERROR "unknown variable x_itable; offset 0 is x_type\+0\(FP\)"
-	MOVQ	x_itable+1(FP), AX // ERROR "unknown variable x_itable; offset 1 is x_type\+0\(FP\)"
-	MOVW	x_data+0(FP), AX // ERROR "invalid offset x_data\+0\(FP\); expected x_data\+4\(FP\)"
-	MOVL	x_data+0(FP), AX // ERROR "invalid offset x_data\+0\(FP\); expected x_data\+4\(FP\)"
-	MOVQ	x_data+0(FP), AX // ERROR "invalid offset x_data\+0\(FP\); expected x_data\+4\(FP\)"
-	MOVW	x_data+4(FP), AX // ERROR "invalid MOVW of x_data\+4\(FP\); interface data is 4-byte value"
-	MOVL	x_data+4(FP), AX
-	MOVQ	x_data+4(FP), AX // ERROR "invalid MOVQ of x_data\+4\(FP\); interface data is 4-byte value"
-	MOVW	y+8(FP), AX // ERROR "invalid MOVW of y\+8\(FP\); interface itable is 4-byte value"
-	MOVL	y+8(FP), AX
-	MOVQ	y+8(FP), AX // ERROR "invalid MOVQ of y\+8\(FP\); interface itable is 4-byte value"
-	MOVW	y_itable+8(FP), AX // ERROR "invalid MOVW of y_itable\+8\(FP\); interface itable is 4-byte value"
-	MOVL	y_itable+8(FP), AX
-	MOVQ	y_itable+8(FP), AX // ERROR "invalid MOVQ of y_itable\+8\(FP\); interface itable is 4-byte value"
-	MOVQ	y_type+8(FP), AX // ERROR "unknown variable y_type; offset 8 is y_itable\+8\(FP\)"
-	MOVW	y_data+8(FP), AX // ERROR "invalid offset y_data\+8\(FP\); expected y_data\+12\(FP\)"
-	MOVL	y_data+8(FP), AX // ERROR "invalid offset y_data\+8\(FP\); expected y_data\+12\(FP\)"
-	MOVQ	y_data+8(FP), AX // ERROR "invalid offset y_data\+8\(FP\); expected y_data\+12\(FP\)"
-	MOVW	y_data+12(FP), AX // ERROR "invalid MOVW of y_data\+12\(FP\); interface data is 4-byte value"
-	MOVL	y_data+12(FP), AX
-	MOVQ	y_data+12(FP), AX // ERROR "invalid MOVQ of y_data\+12\(FP\); interface data is 4-byte value"
-	RET
-
-TEXT ·returnint(SB),0,$0-4
-	MOVB	AX, ret+0(FP) // ERROR "invalid MOVB of ret\+0\(FP\); int is 4-byte value"
-	MOVW	AX, ret+0(FP) // ERROR "invalid MOVW of ret\+0\(FP\); int is 4-byte value"
-	MOVL	AX, ret+0(FP)
-	MOVQ	AX, ret+0(FP) // ERROR "invalid MOVQ of ret\+0\(FP\); int is 4-byte value"
-	MOVQ	AX, ret+1(FP) // ERROR "invalid offset ret\+1\(FP\); expected ret\+0\(FP\)"
-	MOVQ	AX, r+0(FP) // ERROR "unknown variable r; offset 0 is ret\+0\(FP\)"
-	RET
-
-TEXT ·returnbyte(SB),0,$0-5
-	MOVL	x+0(FP), AX
-	MOVB	AX, ret+4(FP)
-	MOVW	AX, ret+4(FP) // ERROR "invalid MOVW of ret\+4\(FP\); byte is 1-byte value"
-	MOVL	AX, ret+4(FP) // ERROR "invalid MOVL of ret\+4\(FP\); byte is 1-byte value"
-	MOVQ	AX, ret+4(FP) // ERROR "invalid MOVQ of ret\+4\(FP\); byte is 1-byte value"
-	MOVB	AX, ret+3(FP) // ERROR "invalid offset ret\+3\(FP\); expected ret\+4\(FP\)"
-	RET
-
-TEXT ·returnnamed(SB),0,$0-21
-	MOVB	x+0(FP), AX
-	MOVL	AX, r1+4(FP)
-	MOVW	AX, r2+8(FP)
-	MOVL	AX, r3+12(FP)
-	MOVL	AX, r3_base+12(FP)
-	MOVL	AX, r3_len+16(FP)
-	MOVB	AX, r4+20(FP)
-	MOVQ	AX, r1+4(FP) // ERROR "invalid MOVQ of r1\+4\(FP\); int is 4-byte value"
-	RET
-
-TEXT ·returnintmissing(SB),0,$0-4
-	RET // ERROR "RET without writing to 4-byte ret\+0\(FP\)"
diff --git a/src/cmd/vet/testdata/asm3.s b/src/cmd/vet/testdata/asm3.s
deleted file mode 100644
index 3d69356..0000000
--- a/src/cmd/vet/testdata/asm3.s
+++ /dev/null
@@ -1,178 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build arm
-// +build vet_test
-
-TEXT ·arg1(SB),0,$0-2
-	MOVB	x+0(FP), AX
-	MOVB	y+1(FP), BX
-	MOVH	x+0(FP), AX // ERROR "\[arm\] arg1: invalid MOVH of x\+0\(FP\); int8 is 1-byte value"
-	MOVH	y+1(FP), AX // ERROR "invalid MOVH of y\+1\(FP\); uint8 is 1-byte value"
-	MOVW	x+0(FP), AX // ERROR "invalid MOVW of x\+0\(FP\); int8 is 1-byte value"
-	MOVW	y+1(FP), AX // ERROR "invalid MOVW of y\+1\(FP\); uint8 is 1-byte value"
-	MOVB	x+1(FP), AX // ERROR "invalid offset x\+1\(FP\); expected x\+0\(FP\)"
-	MOVB	y+2(FP), AX // ERROR "invalid offset y\+2\(FP\); expected y\+1\(FP\)"
-	MOVB	8(R13), AX // ERROR "8\(R13\) should be x\+0\(FP\)"
-	MOVB	9(R13), AX // ERROR "9\(R13\) should be y\+1\(FP\)"
-	MOVB	10(R13), AX // ERROR "use of 10\(R13\) points beyond argument frame"
-	RET
-
-TEXT ·arg2(SB),0,$0-4
-	MOVB	x+0(FP), AX // ERROR "arg2: invalid MOVB of x\+0\(FP\); int16 is 2-byte value"
-	MOVB	y+2(FP), AX // ERROR "invalid MOVB of y\+2\(FP\); uint16 is 2-byte value"
-	MOVH	x+0(FP), AX
-	MOVH	y+2(FP), BX
-	MOVW	x+0(FP), AX // ERROR "invalid MOVW of x\+0\(FP\); int16 is 2-byte value"
-	MOVW	y+2(FP), AX // ERROR "invalid MOVW of y\+2\(FP\); uint16 is 2-byte value"
-	MOVH	x+2(FP), AX // ERROR "invalid offset x\+2\(FP\); expected x\+0\(FP\)"
-	MOVH	y+0(FP), AX // ERROR "invalid offset y\+0\(FP\); expected y\+2\(FP\)"
-	RET
-
-TEXT ·arg4(SB),0,$0-2 // ERROR "arg4: wrong argument size 2; expected \$\.\.\.-8"
-	MOVB	x+0(FP), AX // ERROR "invalid MOVB of x\+0\(FP\); int32 is 4-byte value"
-	MOVB	y+4(FP), BX // ERROR "invalid MOVB of y\+4\(FP\); uint32 is 4-byte value"
-	MOVH	x+0(FP), AX // ERROR "invalid MOVH of x\+0\(FP\); int32 is 4-byte value"
-	MOVH	y+4(FP), AX // ERROR "invalid MOVH of y\+4\(FP\); uint32 is 4-byte value"
-	MOVW	x+0(FP), AX
-	MOVW	y+4(FP), AX
-	MOVW	x+4(FP), AX // ERROR "invalid offset x\+4\(FP\); expected x\+0\(FP\)"
-	MOVW	y+2(FP), AX // ERROR "invalid offset y\+2\(FP\); expected y\+4\(FP\)"
-	RET
-
-TEXT ·arg8(SB),7,$0-2 // ERROR "wrong argument size 2; expected \$\.\.\.-16"
-	MOVB	x+0(FP), AX // ERROR "invalid MOVB of x\+0\(FP\); int64 is 8-byte value"
-	MOVB	y+8(FP), BX // ERROR "invalid MOVB of y\+8\(FP\); uint64 is 8-byte value"
-	MOVH	x+0(FP), AX // ERROR "invalid MOVH of x\+0\(FP\); int64 is 8-byte value"
-	MOVH	y+8(FP), AX // ERROR "invalid MOVH of y\+8\(FP\); uint64 is 8-byte value"
-	MOVW	x+0(FP), AX // ERROR "invalid MOVW of x\+0\(FP\); int64 is 8-byte value containing x_lo\+0\(FP\) and x_hi\+4\(FP\)"
-	MOVW	x_lo+0(FP), AX
-	MOVW	x_hi+4(FP), AX
-	MOVW	y+8(FP), AX // ERROR "invalid MOVW of y\+8\(FP\); uint64 is 8-byte value containing y_lo\+8\(FP\) and y_hi\+12\(FP\)"
-	MOVW	y_lo+8(FP), AX
-	MOVW	y_hi+12(FP), AX
-	MOVQ	x+0(FP), AX
-	MOVQ	y+8(FP), AX
-	MOVQ	x+8(FP), AX // ERROR "invalid offset x\+8\(FP\); expected x\+0\(FP\)"
-	MOVQ	y+2(FP), AX // ERROR "invalid offset y\+2\(FP\); expected y\+8\(FP\)"
-	RET
-
-TEXT ·argint(SB),0,$0-2 // ERROR "wrong argument size 2; expected \$\.\.\.-8"
-	MOVB	x+0(FP), AX // ERROR "invalid MOVB of x\+0\(FP\); int is 4-byte value"
-	MOVB	y+4(FP), BX // ERROR "invalid MOVB of y\+4\(FP\); uint is 4-byte value"
-	MOVH	x+0(FP), AX // ERROR "invalid MOVH of x\+0\(FP\); int is 4-byte value"
-	MOVH	y+4(FP), AX // ERROR "invalid MOVH of y\+4\(FP\); uint is 4-byte value"
-	MOVW	x+0(FP), AX
-	MOVW	y+4(FP), AX
-	MOVQ	x+4(FP), AX // ERROR "invalid offset x\+4\(FP\); expected x\+0\(FP\)"
-	MOVQ	y+2(FP), AX // ERROR "invalid offset y\+2\(FP\); expected y\+4\(FP\)"
-	RET
-
-TEXT ·argptr(SB),7,$0-2 // ERROR "wrong argument size 2; expected \$\.\.\.-20"
-	MOVB	x+0(FP), AX // ERROR "invalid MOVB of x\+0\(FP\); \*byte is 4-byte value"
-	MOVB	y+4(FP), BX // ERROR "invalid MOVB of y\+4\(FP\); \*byte is 4-byte value"
-	MOVH	x+0(FP), AX // ERROR "invalid MOVH of x\+0\(FP\); \*byte is 4-byte value"
-	MOVH	y+4(FP), AX // ERROR "invalid MOVH of y\+4\(FP\); \*byte is 4-byte value"
-	MOVW	x+0(FP), AX
-	MOVW	y+4(FP), AX
-	MOVQ	x+4(FP), AX // ERROR "invalid offset x\+4\(FP\); expected x\+0\(FP\)"
-	MOVQ	y+2(FP), AX // ERROR "invalid offset y\+2\(FP\); expected y\+4\(FP\)"
-	MOVH	c+8(FP), AX // ERROR "invalid MOVH of c\+8\(FP\); chan int is 4-byte value"
-	MOVH	m+12(FP), AX // ERROR "invalid MOVH of m\+12\(FP\); map\[int\]int is 4-byte value"
-	MOVH	f+16(FP), AX // ERROR "invalid MOVH of f\+16\(FP\); func\(\) is 4-byte value"
-	RET
-
-TEXT ·argstring(SB),0,$16 // ERROR "wrong argument size 0; expected \$\.\.\.-16"
-	MOVH	x+0(FP), AX // ERROR "invalid MOVH of x\+0\(FP\); string base is 4-byte value"
-	MOVW	x+0(FP), AX
-	MOVH	x_base+0(FP), AX // ERROR "invalid MOVH of x_base\+0\(FP\); string base is 4-byte value"
-	MOVW	x_base+0(FP), AX
-	MOVH	x_len+0(FP), AX // ERROR "invalid offset x_len\+0\(FP\); expected x_len\+4\(FP\)"
-	MOVW	x_len+0(FP), AX // ERROR "invalid offset x_len\+0\(FP\); expected x_len\+4\(FP\)"
-	MOVQ	x_len+0(FP), AX // ERROR "invalid offset x_len\+0\(FP\); expected x_len\+4\(FP\)"
-	MOVH	x_len+4(FP), AX // ERROR "invalid MOVH of x_len\+4\(FP\); string len is 4-byte value"
-	MOVW	x_len+4(FP), AX
-	MOVQ	y+0(FP), AX // ERROR "invalid offset y\+0\(FP\); expected y\+8\(FP\)"
-	MOVQ	y_len+4(FP), AX // ERROR "invalid offset y_len\+4\(FP\); expected y_len\+12\(FP\)"
-	RET
-
-TEXT ·argslice(SB),0,$24 // ERROR "wrong argument size 0; expected \$\.\.\.-24"
-	MOVH	x+0(FP), AX // ERROR "invalid MOVH of x\+0\(FP\); slice base is 4-byte value"
-	MOVW	x+0(FP), AX
-	MOVH	x_base+0(FP), AX // ERROR "invalid MOVH of x_base\+0\(FP\); slice base is 4-byte value"
-	MOVW	x_base+0(FP), AX
-	MOVH	x_len+0(FP), AX // ERROR "invalid offset x_len\+0\(FP\); expected x_len\+4\(FP\)"
-	MOVW	x_len+0(FP), AX // ERROR "invalid offset x_len\+0\(FP\); expected x_len\+4\(FP\)"
-	MOVQ	x_len+0(FP), AX // ERROR "invalid offset x_len\+0\(FP\); expected x_len\+4\(FP\)"
-	MOVH	x_len+4(FP), AX // ERROR "invalid MOVH of x_len\+4\(FP\); slice len is 4-byte value"
-	MOVW	x_len+4(FP), AX
-	MOVH	x_cap+0(FP), AX // ERROR "invalid offset x_cap\+0\(FP\); expected x_cap\+8\(FP\)"
-	MOVW	x_cap+0(FP), AX // ERROR "invalid offset x_cap\+0\(FP\); expected x_cap\+8\(FP\)"
-	MOVQ	x_cap+0(FP), AX // ERROR "invalid offset x_cap\+0\(FP\); expected x_cap\+8\(FP\)"
-	MOVH	x_cap+8(FP), AX // ERROR "invalid MOVH of x_cap\+8\(FP\); slice cap is 4-byte value"
-	MOVW	x_cap+8(FP), AX
-	MOVQ	y+0(FP), AX // ERROR "invalid offset y\+0\(FP\); expected y\+12\(FP\)"
-	MOVQ	y_len+4(FP), AX // ERROR "invalid offset y_len\+4\(FP\); expected y_len\+16\(FP\)"
-	MOVQ	y_cap+8(FP), AX // ERROR "invalid offset y_cap\+8\(FP\); expected y_cap\+20\(FP\)"
-	RET
-
-TEXT ·argiface(SB),0,$0-16
-	MOVH	x+0(FP), AX // ERROR "invalid MOVH of x\+0\(FP\); interface type is 4-byte value"
-	MOVW	x+0(FP), AX
-	MOVH	x_type+0(FP), AX // ERROR "invalid MOVH of x_type\+0\(FP\); interface type is 4-byte value"
-	MOVW	x_type+0(FP), AX
-	MOVQ	x_itable+0(FP), AX // ERROR "unknown variable x_itable; offset 0 is x_type\+0\(FP\)"
-	MOVQ	x_itable+1(FP), AX // ERROR "unknown variable x_itable; offset 1 is x_type\+0\(FP\)"
-	MOVH	x_data+0(FP), AX // ERROR "invalid offset x_data\+0\(FP\); expected x_data\+4\(FP\)"
-	MOVW	x_data+0(FP), AX // ERROR "invalid offset x_data\+0\(FP\); expected x_data\+4\(FP\)"
-	MOVQ	x_data+0(FP), AX // ERROR "invalid offset x_data\+0\(FP\); expected x_data\+4\(FP\)"
-	MOVH	x_data+4(FP), AX // ERROR "invalid MOVH of x_data\+4\(FP\); interface data is 4-byte value"
-	MOVW	x_data+4(FP), AX
-	MOVH	y+8(FP), AX // ERROR "invalid MOVH of y\+8\(FP\); interface itable is 4-byte value"
-	MOVW	y+8(FP), AX
-	MOVH	y_itable+8(FP), AX // ERROR "invalid MOVH of y_itable\+8\(FP\); interface itable is 4-byte value"
-	MOVW	y_itable+8(FP), AX
-	MOVQ	y_type+8(FP), AX // ERROR "unknown variable y_type; offset 8 is y_itable\+8\(FP\)"
-	MOVH	y_data+8(FP), AX // ERROR "invalid offset y_data\+8\(FP\); expected y_data\+12\(FP\)"
-	MOVW	y_data+8(FP), AX // ERROR "invalid offset y_data\+8\(FP\); expected y_data\+12\(FP\)"
-	MOVQ	y_data+8(FP), AX // ERROR "invalid offset y_data\+8\(FP\); expected y_data\+12\(FP\)"
-	MOVH	y_data+12(FP), AX // ERROR "invalid MOVH of y_data\+12\(FP\); interface data is 4-byte value"
-	MOVW	y_data+12(FP), AX
-	RET
-
-TEXT ·returnint(SB),0,$0-4
-	MOVB	AX, ret+0(FP) // ERROR "invalid MOVB of ret\+0\(FP\); int is 4-byte value"
-	MOVH	AX, ret+0(FP) // ERROR "invalid MOVH of ret\+0\(FP\); int is 4-byte value"
-	MOVW	AX, ret+0(FP)
-	MOVQ	AX, ret+1(FP) // ERROR "invalid offset ret\+1\(FP\); expected ret\+0\(FP\)"
-	MOVQ	AX, r+0(FP) // ERROR "unknown variable r; offset 0 is ret\+0\(FP\)"
-	RET
-
-TEXT ·returnbyte(SB),0,$0-5
-	MOVW	x+0(FP), AX
-	MOVB	AX, ret+4(FP)
-	MOVH	AX, ret+4(FP) // ERROR "invalid MOVH of ret\+4\(FP\); byte is 1-byte value"
-	MOVW	AX, ret+4(FP) // ERROR "invalid MOVW of ret\+4\(FP\); byte is 1-byte value"
-	MOVB	AX, ret+3(FP) // ERROR "invalid offset ret\+3\(FP\); expected ret\+4\(FP\)"
-	RET
-
-TEXT ·returnnamed(SB),0,$0-21
-	MOVB	x+0(FP), AX
-	MOVW	AX, r1+4(FP)
-	MOVH	AX, r2+8(FP)
-	MOVW	AX, r3+12(FP)
-	MOVW	AX, r3_base+12(FP)
-	MOVW	AX, r3_len+16(FP)
-	MOVB	AX, r4+20(FP)
-	MOVB	AX, r1+4(FP) // ERROR "invalid MOVB of r1\+4\(FP\); int is 4-byte value"
-	RET
-
-TEXT ·returnintmissing(SB),0,$0-4
-	RET // ERROR "RET without writing to 4-byte ret\+0\(FP\)"
-
-TEXT ·leaf(SB),0,$-4-12
-	MOVW	x+0(FP), AX
-	MOVW	y+4(FP), AX
-	MOVW	AX, ret+8(FP)
-	RET
diff --git a/src/cmd/vet/testdata/asm4.s b/src/cmd/vet/testdata/asm4.s
deleted file mode 100644
index 044b050..0000000
--- a/src/cmd/vet/testdata/asm4.s
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64
-// +build vet_test
-
-// Test cases for symbolic NOSPLIT etc. on TEXT symbols.
-
-TEXT ·noprof(SB),NOPROF,$0-8
-	RET
-
-TEXT ·dupok(SB),DUPOK,$0-8
-	RET
-
-TEXT ·nosplit(SB),NOSPLIT,$0
-	RET
-
-TEXT ·rodata(SB),RODATA,$0-8
-	RET
-
-TEXT ·noptr(SB),NOPTR|NOSPLIT,$0
-	RET
-
-TEXT ·wrapper(SB),WRAPPER,$0-8
-	RET
diff --git a/src/cmd/vet/testdata/assign.go b/src/cmd/vet/testdata/assign.go
deleted file mode 100644
index 32ba868..0000000
--- a/src/cmd/vet/testdata/assign.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains tests for the useless-assignment checker.
-
-package testdata
-
-type ST struct {
-	x int
-}
-
-func (s *ST) SetX(x int) {
-	// Accidental self-assignment; it should be "s.x = x"
-	x = x // ERROR "self-assignment of x to x"
-	// Another mistake
-	s.x = s.x // ERROR "self-assignment of s.x to s.x"
-}
diff --git a/src/cmd/vet/testdata/atomic.go b/src/cmd/vet/testdata/atomic.go
deleted file mode 100644
index 1ba261d..0000000
--- a/src/cmd/vet/testdata/atomic.go
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains tests for the atomic checker.
-
-package testdata
-
-import (
-	"sync/atomic"
-)
-
-type Counter uint64
-
-func AtomicTests() {
-	x := uint64(1)
-	x = atomic.AddUint64(&x, 1)        // ERROR "direct assignment to atomic value"
-	_, x = 10, atomic.AddUint64(&x, 1) // ERROR "direct assignment to atomic value"
-	x, _ = atomic.AddUint64(&x, 1), 10 // ERROR "direct assignment to atomic value"
-
-	y := &x
-	*y = atomic.AddUint64(y, 1) // ERROR "direct assignment to atomic value"
-
-	var su struct{ Counter uint64 }
-	su.Counter = atomic.AddUint64(&su.Counter, 1) // ERROR "direct assignment to atomic value"
-	z1 := atomic.AddUint64(&su.Counter, 1)
-	_ = z1 // Avoid err "z declared and not used"
-
-	var sp struct{ Counter *uint64 }
-	*sp.Counter = atomic.AddUint64(sp.Counter, 1) // ERROR "direct assignment to atomic value"
-	z2 := atomic.AddUint64(sp.Counter, 1)
-	_ = z2 // Avoid err "z declared and not used"
-
-	au := []uint64{10, 20}
-	au[0] = atomic.AddUint64(&au[0], 1) // ERROR "direct assignment to atomic value"
-	au[1] = atomic.AddUint64(&au[0], 1)
-
-	ap := []*uint64{&au[0], &au[1]}
-	*ap[0] = atomic.AddUint64(ap[0], 1) // ERROR "direct assignment to atomic value"
-	*ap[1] = atomic.AddUint64(ap[0], 1)
-
-	x = atomic.AddUint64() // Used to make vet crash; now silently ignored.
-}
diff --git a/src/cmd/vet/testdata/bool.go b/src/cmd/vet/testdata/bool.go
deleted file mode 100644
index af6cc01..0000000
--- a/src/cmd/vet/testdata/bool.go
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains tests for the bool checker.
-
-package testdata
-
-import "io"
-
-func RatherStupidConditions() {
-	var f, g func() int
-	if f() == 0 || f() == 0 { // OK f might have side effects
-	}
-	if v, w := f(), g(); v == w || v == w { // ERROR "redundant or: v == w || v == w"
-	}
-	_ = f == nil || f == nil // ERROR "redundant or: f == nil || f == nil"
-
-	_ = i == byte(1) || i == byte(1) // TODO conversions are treated as if they may have side effects
-
-	var c chan int
-	_ = 0 == <-c || 0 == <-c                                  // OK subsequent receives may yield different values
-	for i, j := <-c, <-c; i == j || i == j; i, j = <-c, <-c { // ERROR "redundant or: i == j || i == j"
-	}
-
-	var i, j, k int
-	_ = i+1 == 1 || i+1 == 1         // ERROR "redundant or: i\+1 == 1 || i\+1 == 1"
-	_ = i == 1 || j+1 == i || i == 1 // ERROR "redundant or: i == 1 || i == 1"
-
-	_ = i == 1 || i == 1 || f() == 1 // ERROR "redundant or: i == 1 || i == 1"
-	_ = i == 1 || f() == 1 || i == 1 // OK f may alter i as a side effect
-	_ = f() == 1 || i == 1 || i == 1 // ERROR "redundant or: i == 1 || i == 1"
-
-	// Test partition edge cases
-	_ = f() == 1 || i == 1 || i == 1 || j == 1 // ERROR "redundant or: i == 1 || i == 1"
-	_ = f() == 1 || j == 1 || i == 1 || i == 1 // ERROR "redundant or: i == 1 || i == 1"
-	_ = i == 1 || f() == 1 || i == 1 || i == 1 // ERROR "redundant or: i == 1 || i == 1"
-	_ = i == 1 || i == 1 || f() == 1 || i == 1 // ERROR "redundant or: i == 1 || i == 1"
-	_ = i == 1 || i == 1 || j == 1 || f() == 1 // ERROR "redundant or: i == 1 || i == 1"
-	_ = j == 1 || i == 1 || i == 1 || f() == 1 // ERROR "redundant or: i == 1 || i == 1"
-	_ = i == 1 || f() == 1 || f() == 1 || i == 1
-
-	_ = i == 1 || (i == 1 || i == 2)             // ERROR "redundant or: i == 1 || i == 1"
-	_ = i == 1 || (f() == 1 || i == 1)           // OK f may alter i as a side effect
-	_ = i == 1 || (i == 1 || f() == 1)           // ERROR "redundant or: i == 1 || i == 1"
-	_ = i == 1 || (i == 2 || (i == 1 || i == 3)) // ERROR "redundant or: i == 1 || i == 1"
-
-	var a, b bool
-	_ = i == 1 || (a || (i == 1 || b)) // ERROR "redundant or: i == 1 || i == 1"
-
-	// Check that all redundant ors are flagged
-	_ = j == 0 ||
-		i == 1 ||
-		f() == 1 ||
-		j == 0 || // ERROR "redundant or: j == 0 || j == 0"
-		i == 1 || // ERROR "redundant or: i == 1 || i == 1"
-		i == 1 || // ERROR "redundant or: i == 1 || i == 1"
-		i == 1 ||
-		j == 0 ||
-		k == 0
-
-	_ = i == 1*2*3 || i == 1*2*3 // ERROR "redundant or: i == 1\*2\*3 || i == 1\*2\*3"
-
-	// These test that redundant, suspect expressions do not trigger multiple errors.
-	_ = i != 0 || i != 0 // ERROR "redundant or: i != 0 || i != 0"
-	_ = i == 0 && i == 0 // ERROR "redundant and: i == 0 && i == 0"
-
-	// and is dual to or; check the basics and
-	// let the or tests pull the rest of the weight.
-	_ = 0 != <-c && 0 != <-c         // OK subsequent receives may yield different values
-	_ = f() != 0 && f() != 0         // OK f might have side effects
-	_ = f != nil && f != nil         // ERROR "redundant and: f != nil && f != nil"
-	_ = i != 1 && i != 1 && f() != 1 // ERROR "redundant and: i != 1 && i != 1"
-	_ = i != 1 && f() != 1 && i != 1 // OK f may alter i as a side effect
-	_ = f() != 1 && i != 1 && i != 1 // ERROR "redundant and: i != 1 && i != 1"
-}
-
-func RoyallySuspectConditions() {
-	var i, j int
-
-	_ = i == 0 || i == 1 // OK
-	_ = i != 0 || i != 1 // ERROR "suspect or: i != 0 || i != 1"
-	_ = i != 0 || 1 != i // ERROR "suspect or: i != 0 || 1 != i"
-	_ = 0 != i || 1 != i // ERROR "suspect or: 0 != i || 1 != i"
-	_ = 0 != i || i != 1 // ERROR "suspect or: 0 != i || i != 1"
-
-	_ = (0 != i) || i != 1 // ERROR "suspect or: 0 != i || i != 1"
-
-	_ = i+3 != 7 || j+5 == 0 || i+3 != 9 // ERROR "suspect or: i\+3 != 7 || i\+3 != 9"
-
-	_ = i != 0 || j == 0 || i != 1 // ERROR "suspect or: i != 0 || i != 1"
-
-	_ = i != 0 || i != 1<<4 // ERROR "suspect or: i != 0 || i != 1<<4"
-
-	_ = i != 0 || j != 0
-	_ = 0 != i || 0 != j
-
-	var s string
-	_ = s != "one" || s != "the other" // ERROR "suspect or: s != .one. || s != .the other."
-
-	_ = "et" != "alii" || "et" != "cetera"         // ERROR "suspect or: .et. != .alii. || .et. != .cetera."
-	_ = "me gustas" != "tu" || "le gustas" != "tu" // OK we could catch this case, but it's not worth the code
-
-	var err error
-	_ = err != nil || err != io.EOF // TODO catch this case?
-
-	// Sanity check and.
-	_ = i != 0 && i != 1 // OK
-	_ = i == 0 && i == 1 // ERROR "suspect and: i == 0 && i == 1"
-	_ = i == 0 && 1 == i // ERROR "suspect and: i == 0 && 1 == i"
-	_ = 0 == i && 1 == i // ERROR "suspect and: 0 == i && 1 == i"
-	_ = 0 == i && i == 1 // ERROR "suspect and: 0 == i && i == 1"
-}
diff --git a/src/cmd/vet/testdata/buildtag.go b/src/cmd/vet/testdata/buildtag.go
deleted file mode 100644
index eb36fd3..0000000
--- a/src/cmd/vet/testdata/buildtag.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains tests for the buildtag checker.
-
-// +builder // ERROR "possible malformed \+build comment"
-// +build !ignore
-
-package testdata
-
-// +build toolate // ERROR "build comment must appear before package clause and be followed by a blank line"
-
-var _ = 3
diff --git a/src/cmd/vet/testdata/buildtag_bad.go b/src/cmd/vet/testdata/buildtag_bad.go
deleted file mode 100644
index fbe10cf..0000000
--- a/src/cmd/vet/testdata/buildtag_bad.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// This file contains misplaced or malformed build constraints.
-// The Go tool will skip it, because the constraints are invalid.
-// It serves only to test the tag checker during make test.
-
-// Mention +build // ERROR "possible malformed \+build comment"
-
-// +build !!bang // ERROR "invalid double negative in build constraint"
-// +build @#$ // ERROR "invalid non-alphanumeric build constraint"
-
-// +build toolate // ERROR "build comment must appear before package clause and be followed by a blank line"
-package bad
-
-// This is package 'bad' rather than 'main' so the erroneous build
-// tag doesn't end up looking like a package doc for the vet command
-// when examined by godoc.
diff --git a/src/cmd/vet/testdata/composite.go b/src/cmd/vet/testdata/composite.go
deleted file mode 100644
index 69e7d7c..0000000
--- a/src/cmd/vet/testdata/composite.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains tests for the untagged struct literal checker.
-
-// This file contains the test for untagged struct literals.
-
-package testdata
-
-import (
-	"flag"
-	"go/scanner"
-)
-
-var Okay1 = []string{
-	"Name",
-	"Usage",
-	"DefValue",
-}
-
-var Okay2 = map[string]bool{
-	"Name":     true,
-	"Usage":    true,
-	"DefValue": true,
-}
-
-var Okay3 = struct {
-	X string
-	Y string
-	Z string
-}{
-	"Name",
-	"Usage",
-	"DefValue",
-}
-
-type MyStruct struct {
-	X string
-	Y string
-	Z string
-}
-
-var Okay4 = MyStruct{
-	"Name",
-	"Usage",
-	"DefValue",
-}
-
-// Testing is awkward because we need to reference things from a separate package
-// to trigger the warnings.
-
-var BadStructLiteralUsedInTests = flag.Flag{ // ERROR "unkeyed fields"
-	"Name",
-	"Usage",
-	nil, // Value
-	"DefValue",
-}
-
-// Used to test the check for slices and arrays: If that test is disabled and
-// vet is run with --compositewhitelist=false, this line triggers an error.
-// Clumsy but sufficient.
-var scannerErrorListTest = scanner.ErrorList{nil, nil}
diff --git a/src/cmd/vet/testdata/copylock_func.go b/src/cmd/vet/testdata/copylock_func.go
deleted file mode 100644
index d83957f..0000000
--- a/src/cmd/vet/testdata/copylock_func.go
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains tests for the copylock checker's
-// function declaration analysis.
-
-package testdata
-
-import "sync"
-
-func OkFunc(*sync.Mutex) {}
-func BadFunc(sync.Mutex) {} // ERROR "BadFunc passes Lock by value: sync.Mutex"
-func OkRet() *sync.Mutex {}
-func BadRet() sync.Mutex {} // ERROR "BadRet returns Lock by value: sync.Mutex"
-
-var (
-	OkClosure  = func(*sync.Mutex) {}
-	BadClosure = func(sync.Mutex) {} // ERROR "func passes Lock by value: sync.Mutex"
-)
-
-type EmbeddedRWMutex struct {
-	sync.RWMutex
-}
-
-func (*EmbeddedRWMutex) OkMeth() {}
-func (EmbeddedRWMutex) BadMeth() {} // ERROR "BadMeth passes Lock by value: testdata.EmbeddedRWMutex"
-func OkFunc(e *EmbeddedRWMutex)  {}
-func BadFunc(EmbeddedRWMutex)    {} // ERROR "BadFunc passes Lock by value: testdata.EmbeddedRWMutex"
-func OkRet() *EmbeddedRWMutex    {}
-func BadRet() EmbeddedRWMutex    {} // ERROR "BadRet returns Lock by value: testdata.EmbeddedRWMutex"
-
-type FieldMutex struct {
-	s sync.Mutex
-}
-
-func (*FieldMutex) OkMeth()   {}
-func (FieldMutex) BadMeth()   {} // ERROR "BadMeth passes Lock by value: testdata.FieldMutex contains sync.Mutex"
-func OkFunc(*FieldMutex)      {}
-func BadFunc(FieldMutex, int) {} // ERROR "BadFunc passes Lock by value: testdata.FieldMutex contains sync.Mutex"
-
-type L0 struct {
-	L1
-}
-
-type L1 struct {
-	l L2
-}
-
-type L2 struct {
-	sync.Mutex
-}
-
-func (*L0) Ok() {}
-func (L0) Bad() {} // ERROR "Bad passes Lock by value: testdata.L0 contains testdata.L1 contains testdata.L2"
-
-type EmbeddedMutexPointer struct {
-	s *sync.Mutex // safe to copy this pointer
-}
-
-func (*EmbeddedMutexPointer) Ok()      {}
-func (EmbeddedMutexPointer) AlsoOk()   {}
-func StillOk(EmbeddedMutexPointer)     {}
-func LookinGood() EmbeddedMutexPointer {}
-
-type EmbeddedLocker struct {
-	sync.Locker // safe to copy interface values
-}
-
-func (*EmbeddedLocker) Ok()    {}
-func (EmbeddedLocker) AlsoOk() {}
-
-type CustomLock struct{}
-
-func (*CustomLock) Lock()   {}
-func (*CustomLock) Unlock() {}
-
-func Ok(*CustomLock) {}
-func Bad(CustomLock) {} // ERROR "Bad passes Lock by value: testdata.CustomLock"
-
-// TODO: Unfortunate cases
-
-// Non-ideal error message:
-// Since we're looking for Lock methods, sync.Once's underlying
-// sync.Mutex gets called out, but without any reference to the sync.Once.
-type LocalOnce sync.Once
-
-func (LocalOnce) Bad() {} // ERROR "Bad passes Lock by value: testdata.LocalOnce contains sync.Mutex"
-
-// False negative:
-// LocalMutex doesn't have a Lock method.
-// Nevertheless, it is probably a bad idea to pass it by value.
-type LocalMutex sync.Mutex
-
-func (LocalMutex) Bad() {} // WANTED: An error here :(
diff --git a/src/cmd/vet/testdata/copylock_range.go b/src/cmd/vet/testdata/copylock_range.go
deleted file mode 100644
index f95b025..0000000
--- a/src/cmd/vet/testdata/copylock_range.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains tests for the copylock checker's
-// range statement analysis.
-
-package testdata
-
-import "sync"
-
-func rangeMutex() {
-	var mu sync.Mutex
-	var i int
-
-	var s []sync.Mutex
-	for range s {
-	}
-	for i = range s {
-	}
-	for i := range s {
-	}
-	for i, _ = range s {
-	}
-	for i, _ := range s {
-	}
-	for _, mu = range s { // ERROR "range var mu copies Lock: sync.Mutex"
-	}
-	for _, m := range s { // ERROR "range var m copies Lock: sync.Mutex"
-	}
-	for i, mu = range s { // ERROR "range var mu copies Lock: sync.Mutex"
-	}
-	for i, m := range s { // ERROR "range var m copies Lock: sync.Mutex"
-	}
-
-	var a [3]sync.Mutex
-	for _, m := range a { // ERROR "range var m copies Lock: sync.Mutex"
-	}
-
-	var m map[sync.Mutex]sync.Mutex
-	for k := range m { // ERROR "range var k copies Lock: sync.Mutex"
-	}
-	for mu, _ = range m { // ERROR "range var mu copies Lock: sync.Mutex"
-	}
-	for k, _ := range m { // ERROR "range var k copies Lock: sync.Mutex"
-	}
-	for _, mu = range m { // ERROR "range var mu copies Lock: sync.Mutex"
-	}
-	for _, v := range m { // ERROR "range var v copies Lock: sync.Mutex"
-	}
-
-	var c chan sync.Mutex
-	for range c {
-	}
-	for mu = range c { // ERROR "range var mu copies Lock: sync.Mutex"
-	}
-	for v := range c { // ERROR "range var v copies Lock: sync.Mutex"
-	}
-
-	// Test non-idents in range variables
-	var t struct {
-		i  int
-		mu sync.Mutex
-	}
-	for t.i, t.mu = range s { // ERROR "range var t.mu copies Lock: sync.Mutex"
-	}
-}
diff --git a/src/cmd/vet/testdata/deadcode.go b/src/cmd/vet/testdata/deadcode.go
deleted file mode 100644
index 5370bc3..0000000
--- a/src/cmd/vet/testdata/deadcode.go
+++ /dev/null
@@ -1,2125 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-// This file contains tests for the dead code checker.
-
-package testdata
-
-type T int
-
-var x interface{}
-var c chan int
-
-func external() int // ok
-
-func _() int {
-}
-
-func _() int {
-	print(1)
-}
-
-func _() int {
-	print(1)
-	return 2
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-L:
-	print(1)
-	goto L
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-	print(1)
-	panic(2)
-	println() // ERROR "unreachable code"
-}
-
-// but only builtin panic
-func _() int {
-	var panic = func(int) {}
-	print(1)
-	panic(2)
-	println() // ok
-}
-
-func _() int {
-	{
-		print(1)
-		return 2
-		println() // ERROR "unreachable code"
-	}
-	println() // ok
-}
-
-func _() int {
-	{
-		print(1)
-		return 2
-	}
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-L:
-	{
-		print(1)
-		goto L
-		println() // ERROR "unreachable code"
-	}
-	println() // ok
-}
-
-func _() int {
-L:
-	{
-		print(1)
-		goto L
-	}
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-	print(1)
-	{
-		panic(2)
-	}
-}
-
-func _() int {
-	print(1)
-	{
-		panic(2)
-		println() // ERROR "unreachable code"
-	}
-}
-
-func _() int {
-	print(1)
-	{
-		panic(2)
-	}
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-	print(1)
-	return 2
-	{ // ERROR "unreachable code"
-	}
-}
-
-func _() int {
-L:
-	print(1)
-	goto L
-	{ // ERROR "unreachable code"
-	}
-}
-
-func _() int {
-	print(1)
-	panic(2)
-	{ // ERROR "unreachable code"
-	}
-}
-
-func _() int {
-	{
-		print(1)
-		return 2
-		{ // ERROR "unreachable code"
-		}
-	}
-}
-
-func _() int {
-L:
-	{
-		print(1)
-		goto L
-		{ // ERROR "unreachable code"
-		}
-	}
-}
-
-func _() int {
-	print(1)
-	{
-		panic(2)
-		{ // ERROR "unreachable code"
-		}
-	}
-}
-
-func _() int {
-	{
-		print(1)
-		return 2
-	}
-	{ // ERROR "unreachable code"
-	}
-}
-
-func _() int {
-L:
-	{
-		print(1)
-		goto L
-	}
-	{ // ERROR "unreachable code"
-	}
-}
-
-func _() int {
-	print(1)
-	{
-		panic(2)
-	}
-	{ // ERROR "unreachable code"
-	}
-}
-
-func _() int {
-	print(1)
-	if x == nil {
-		panic(2)
-	} else {
-		panic(3)
-	}
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-L:
-	print(1)
-	if x == nil {
-		panic(2)
-	} else {
-		goto L
-	}
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-L:
-	print(1)
-	if x == nil {
-		panic(2)
-	} else if x == 1 {
-		return 0
-	} else if x != 2 {
-		panic(3)
-	} else {
-		goto L
-	}
-	println() // ERROR "unreachable code"
-}
-
-// if-else chain missing final else is not okay, even if the
-// conditions cover every possible case.
-
-func _() int {
-	print(1)
-	if x == nil {
-		panic(2)
-	} else if x != nil {
-		panic(3)
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-	if x == nil {
-		panic(2)
-	}
-	println() // ok
-}
-
-func _() int {
-L:
-	print(1)
-	if x == nil {
-		panic(2)
-	} else if x == 1 {
-		return 0
-	} else if x != 1 {
-		panic(3)
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-	for {
-	}
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-	for {
-		for {
-			break
-		}
-	}
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-	for {
-		for {
-			break
-			println() // ERROR "unreachable code"
-		}
-	}
-}
-
-func _() int {
-	for {
-		for {
-			continue
-			println() // ERROR "unreachable code"
-		}
-	}
-}
-
-func _() int {
-	for {
-	L:
-		for {
-			break L
-		}
-	}
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-	print(1)
-	for {
-		break
-	}
-	println() // ok
-}
-
-func _() int {
-	for {
-		for {
-		}
-		break // ERROR "unreachable code"
-	}
-	println() // ok
-}
-
-func _() int {
-L:
-	for {
-		for {
-			break L
-		}
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-	for x == nil {
-	}
-	println() // ok
-}
-
-func _() int {
-	for x == nil {
-		for {
-			break
-		}
-	}
-	println() // ok
-}
-
-func _() int {
-	for x == nil {
-	L:
-		for {
-			break L
-		}
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-	for true {
-	}
-	println() // ok
-}
-
-func _() int {
-	for true {
-		for {
-			break
-		}
-	}
-	println() // ok
-}
-
-func _() int {
-	for true {
-	L:
-		for {
-			break L
-		}
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-	select {}
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-	print(1)
-	select {
-	case <-c:
-		print(2)
-		panic("abc")
-		println() // ERROR "unreachable code"
-	}
-}
-
-func _() int {
-	print(1)
-	select {
-	case <-c:
-		print(2)
-		panic("abc")
-	}
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-	print(1)
-	select {
-	case <-c:
-		print(2)
-		for {
-		}
-		println() // ERROR "unreachable code"
-	}
-}
-
-func _() int {
-	print(1)
-	select {
-	case <-c:
-		print(2)
-		for {
-		}
-	}
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-L:
-	print(1)
-	select {
-	case <-c:
-		print(2)
-		panic("abc")
-		println() // ERROR "unreachable code"
-	case c <- 1:
-		print(2)
-		goto L
-		println() // ERROR "unreachable code"
-	}
-}
-
-func _() int {
-L:
-	print(1)
-	select {
-	case <-c:
-		print(2)
-		panic("abc")
-	case c <- 1:
-		print(2)
-		goto L
-	}
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-	print(1)
-	select {
-	case <-c:
-		print(2)
-		panic("abc")
-		println() // ERROR "unreachable code"
-	default:
-		select {}
-		println() // ERROR "unreachable code"
-	}
-}
-
-func _() int {
-	print(1)
-	select {
-	case <-c:
-		print(2)
-		panic("abc")
-	default:
-		select {}
-	}
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-	print(1)
-	select {
-	case <-c:
-		print(2)
-	}
-	println() // ok
-}
-
-func _() int {
-L:
-	print(1)
-	select {
-	case <-c:
-		print(2)
-		panic("abc")
-		goto L // ERROR "unreachable code"
-	case c <- 1:
-		print(2)
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-	select {
-	case <-c:
-		print(2)
-		panic("abc")
-	default:
-		print(2)
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-	select {
-	default:
-		break
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-	select {
-	case <-c:
-		print(2)
-		panic("abc")
-		break // ERROR "unreachable code"
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-L:
-	select {
-	case <-c:
-		print(2)
-		for {
-			break L
-		}
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-L:
-	select {
-	case <-c:
-		print(2)
-		panic("abc")
-	case c <- 1:
-		print(2)
-		break L
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-	select {
-	case <-c:
-		print(1)
-		panic("abc")
-	default:
-		select {}
-		break // ERROR "unreachable code"
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-	switch x {
-	case 1:
-		print(2)
-		panic(3)
-		println() // ERROR "unreachable code"
-	default:
-		return 4
-		println() // ERROR "unreachable code"
-	}
-}
-
-func _() int {
-	print(1)
-	switch x {
-	case 1:
-		print(2)
-		panic(3)
-	default:
-		return 4
-	}
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-	print(1)
-	switch x {
-	default:
-		return 4
-		println() // ERROR "unreachable code"
-	case 1:
-		print(2)
-		panic(3)
-		println() // ERROR "unreachable code"
-	}
-}
-
-func _() int {
-	print(1)
-	switch x {
-	default:
-		return 4
-	case 1:
-		print(2)
-		panic(3)
-	}
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-	print(1)
-	switch x {
-	case 1:
-		print(2)
-		fallthrough
-	default:
-		return 4
-		println() // ERROR "unreachable code"
-	}
-}
-
-func _() int {
-	print(1)
-	switch x {
-	case 1:
-		print(2)
-		fallthrough
-	default:
-		return 4
-	}
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-	print(1)
-	switch {
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-	switch x {
-	case 1:
-		print(2)
-		panic(3)
-	case 2:
-		return 4
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-	switch x {
-	case 2:
-		return 4
-	case 1:
-		print(2)
-		panic(3)
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-	switch x {
-	case 1:
-		print(2)
-		fallthrough
-	case 2:
-		return 4
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-	switch x {
-	case 1:
-		print(2)
-		panic(3)
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-L:
-	switch x {
-	case 1:
-		print(2)
-		panic(3)
-		break L // ERROR "unreachable code"
-	default:
-		return 4
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-	switch x {
-	default:
-		return 4
-		break // ERROR "unreachable code"
-	case 1:
-		print(2)
-		panic(3)
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-L:
-	switch x {
-	case 1:
-		print(2)
-		for {
-			break L
-		}
-	default:
-		return 4
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-	switch x.(type) {
-	case int:
-		print(2)
-		panic(3)
-		println() // ERROR "unreachable code"
-	default:
-		return 4
-		println() // ERROR "unreachable code"
-	}
-}
-
-func _() int {
-	print(1)
-	switch x.(type) {
-	case int:
-		print(2)
-		panic(3)
-	default:
-		return 4
-	}
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-	print(1)
-	switch x.(type) {
-	default:
-		return 4
-		println() // ERROR "unreachable code"
-	case int:
-		print(2)
-		panic(3)
-		println() // ERROR "unreachable code"
-	}
-}
-
-func _() int {
-	print(1)
-	switch x.(type) {
-	default:
-		return 4
-	case int:
-		print(2)
-		panic(3)
-	}
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-	print(1)
-	switch x.(type) {
-	case int:
-		print(2)
-		fallthrough
-	default:
-		return 4
-		println() // ERROR "unreachable code"
-	}
-}
-
-func _() int {
-	print(1)
-	switch x.(type) {
-	case int:
-		print(2)
-		fallthrough
-	default:
-		return 4
-	}
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-	print(1)
-	switch {
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-	switch x.(type) {
-	case int:
-		print(2)
-		panic(3)
-	case float64:
-		return 4
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-	switch x.(type) {
-	case float64:
-		return 4
-	case int:
-		print(2)
-		panic(3)
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-	switch x.(type) {
-	case int:
-		print(2)
-		fallthrough
-	case float64:
-		return 4
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-	switch x.(type) {
-	case int:
-		print(2)
-		panic(3)
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-L:
-	switch x.(type) {
-	case int:
-		print(2)
-		panic(3)
-		break L // ERROR "unreachable code"
-	default:
-		return 4
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-	switch x.(type) {
-	default:
-		return 4
-		break // ERROR "unreachable code"
-	case int:
-		print(2)
-		panic(3)
-	}
-	println() // ok
-}
-
-func _() int {
-	print(1)
-L:
-	switch x.(type) {
-	case int:
-		print(2)
-		for {
-			break L
-		}
-	default:
-		return 4
-	}
-	println() // ok
-}
-
-// again, but without the leading print(1).
-// testing that everything works when the terminating statement is first.
-
-func _() int {
-	println() // ok
-}
-
-func _() int {
-	return 2
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-L:
-	goto L
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-	panic(2)
-	println() // ERROR "unreachable code"
-}
-
-// but only builtin panic
-func _() int {
-	var panic = func(int) {}
-	panic(2)
-	println() // ok
-}
-
-func _() int {
-	{
-		return 2
-		println() // ERROR "unreachable code"
-	}
-}
-
-func _() int {
-	{
-		return 2
-	}
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-L:
-	{
-		goto L
-		println() // ERROR "unreachable code"
-	}
-}
-
-func _() int {
-L:
-	{
-		goto L
-	}
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-	{
-		panic(2)
-		println() // ERROR "unreachable code"
-	}
-}
-
-func _() int {
-	{
-		panic(2)
-	}
-	println() // ERROR "unreachable code"
-}
-
-func _() int {
-	return 2
-	{ // ERROR "unreachable code"
-	}
-	println() // ok
-}
-
-func _() int {
-L:
-	goto L
-	{ // ERROR "unreachable code"
-	}
-	println() // ok
-}
-
-func _() int {
-	panic(2)
-	{ // ERROR "unreachable code"
-	}
-	println() // ok
-}
-
-func _() int {
-	{
-		return 2
-		{ // ERROR "unreachable code"
-		}
-	}
-	println() // ok
-}
-
-func _() int {
-L:
-	{
-		goto L
-		{ // ERROR "unreachable code"
-		}
-	}
-	println() // ok
-}
-
-func _() int {
-	{
-		panic(2)
-		{ // ERROR "unreachable code"
-		}
-	}
-	println() // ok
-}
-
-func _() int {
-	{
-		return 2
-	}
-	{ // ERROR "unreachable code"
-	}
-	println() // ok
-}
-
-func _() int {
-L:
-	{
-		goto L
-	}
-	{ // ERROR "unreachable code"
-	}
-	println() // ok
-}
-
-func _() int {
-	{
-		panic(2)
-	}
-	{ // ERROR "unreachable code"
-	}
-	println() // ok
-}
-
-// again, with func literals
-
-var _ = func() int {
-}
-
-var _ = func() int {
-	print(1)
-}
-
-var _ = func() int {
-	print(1)
-	return 2
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-L:
-	print(1)
-	goto L
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-	print(1)
-	panic(2)
-	println() // ERROR "unreachable code"
-}
-
-// but only builtin panic
-var _ = func() int {
-	var panic = func(int) {}
-	print(1)
-	panic(2)
-	println() // ok
-}
-
-var _ = func() int {
-	{
-		print(1)
-		return 2
-		println() // ERROR "unreachable code"
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	{
-		print(1)
-		return 2
-	}
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-L:
-	{
-		print(1)
-		goto L
-		println() // ERROR "unreachable code"
-	}
-	println() // ok
-}
-
-var _ = func() int {
-L:
-	{
-		print(1)
-		goto L
-	}
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-	print(1)
-	{
-		panic(2)
-	}
-}
-
-var _ = func() int {
-	print(1)
-	{
-		panic(2)
-		println() // ERROR "unreachable code"
-	}
-}
-
-var _ = func() int {
-	print(1)
-	{
-		panic(2)
-	}
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-	print(1)
-	return 2
-	{ // ERROR "unreachable code"
-	}
-}
-
-var _ = func() int {
-L:
-	print(1)
-	goto L
-	{ // ERROR "unreachable code"
-	}
-}
-
-var _ = func() int {
-	print(1)
-	panic(2)
-	{ // ERROR "unreachable code"
-	}
-}
-
-var _ = func() int {
-	{
-		print(1)
-		return 2
-		{ // ERROR "unreachable code"
-		}
-	}
-}
-
-var _ = func() int {
-L:
-	{
-		print(1)
-		goto L
-		{ // ERROR "unreachable code"
-		}
-	}
-}
-
-var _ = func() int {
-	print(1)
-	{
-		panic(2)
-		{ // ERROR "unreachable code"
-		}
-	}
-}
-
-var _ = func() int {
-	{
-		print(1)
-		return 2
-	}
-	{ // ERROR "unreachable code"
-	}
-}
-
-var _ = func() int {
-L:
-	{
-		print(1)
-		goto L
-	}
-	{ // ERROR "unreachable code"
-	}
-}
-
-var _ = func() int {
-	print(1)
-	{
-		panic(2)
-	}
-	{ // ERROR "unreachable code"
-	}
-}
-
-var _ = func() int {
-	print(1)
-	if x == nil {
-		panic(2)
-	} else {
-		panic(3)
-	}
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-L:
-	print(1)
-	if x == nil {
-		panic(2)
-	} else {
-		goto L
-	}
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-L:
-	print(1)
-	if x == nil {
-		panic(2)
-	} else if x == 1 {
-		return 0
-	} else if x != 2 {
-		panic(3)
-	} else {
-		goto L
-	}
-	println() // ERROR "unreachable code"
-}
-
-// if-else chain missing final else is not okay, even if the
-// conditions cover every possible case.
-
-var _ = func() int {
-	print(1)
-	if x == nil {
-		panic(2)
-	} else if x != nil {
-		panic(3)
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-	if x == nil {
-		panic(2)
-	}
-	println() // ok
-}
-
-var _ = func() int {
-L:
-	print(1)
-	if x == nil {
-		panic(2)
-	} else if x == 1 {
-		return 0
-	} else if x != 1 {
-		panic(3)
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-	for {
-	}
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-	for {
-		for {
-			break
-		}
-	}
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-	for {
-		for {
-			break
-			println() // ERROR "unreachable code"
-		}
-	}
-}
-
-var _ = func() int {
-	for {
-		for {
-			continue
-			println() // ERROR "unreachable code"
-		}
-	}
-}
-
-var _ = func() int {
-	for {
-	L:
-		for {
-			break L
-		}
-	}
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-	print(1)
-	for {
-		break
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	for {
-		for {
-		}
-		break // ERROR "unreachable code"
-	}
-	println() // ok
-}
-
-var _ = func() int {
-L:
-	for {
-		for {
-			break L
-		}
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-	for x == nil {
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	for x == nil {
-		for {
-			break
-		}
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	for x == nil {
-	L:
-		for {
-			break L
-		}
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-	for true {
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	for true {
-		for {
-			break
-		}
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	for true {
-	L:
-		for {
-			break L
-		}
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-	select {}
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-	print(1)
-	select {
-	case <-c:
-		print(2)
-		panic("abc")
-		println() // ERROR "unreachable code"
-	}
-}
-
-var _ = func() int {
-	print(1)
-	select {
-	case <-c:
-		print(2)
-		panic("abc")
-	}
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-	print(1)
-	select {
-	case <-c:
-		print(2)
-		for {
-		}
-		println() // ERROR "unreachable code"
-	}
-}
-
-var _ = func() int {
-	print(1)
-	select {
-	case <-c:
-		print(2)
-		for {
-		}
-	}
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-L:
-	print(1)
-	select {
-	case <-c:
-		print(2)
-		panic("abc")
-		println() // ERROR "unreachable code"
-	case c <- 1:
-		print(2)
-		goto L
-		println() // ERROR "unreachable code"
-	}
-}
-
-var _ = func() int {
-L:
-	print(1)
-	select {
-	case <-c:
-		print(2)
-		panic("abc")
-	case c <- 1:
-		print(2)
-		goto L
-	}
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-	print(1)
-	select {
-	case <-c:
-		print(2)
-		panic("abc")
-		println() // ERROR "unreachable code"
-	default:
-		select {}
-		println() // ERROR "unreachable code"
-	}
-}
-
-var _ = func() int {
-	print(1)
-	select {
-	case <-c:
-		print(2)
-		panic("abc")
-	default:
-		select {}
-	}
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-	print(1)
-	select {
-	case <-c:
-		print(2)
-	}
-	println() // ok
-}
-
-var _ = func() int {
-L:
-	print(1)
-	select {
-	case <-c:
-		print(2)
-		panic("abc")
-		goto L // ERROR "unreachable code"
-	case c <- 1:
-		print(2)
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-	select {
-	case <-c:
-		print(2)
-		panic("abc")
-	default:
-		print(2)
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-	select {
-	default:
-		break
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-	select {
-	case <-c:
-		print(2)
-		panic("abc")
-		break // ERROR "unreachable code"
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-L:
-	select {
-	case <-c:
-		print(2)
-		for {
-			break L
-		}
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-L:
-	select {
-	case <-c:
-		print(2)
-		panic("abc")
-	case c <- 1:
-		print(2)
-		break L
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-	select {
-	case <-c:
-		print(1)
-		panic("abc")
-	default:
-		select {}
-		break // ERROR "unreachable code"
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-	switch x {
-	case 1:
-		print(2)
-		panic(3)
-		println() // ERROR "unreachable code"
-	default:
-		return 4
-		println() // ERROR "unreachable code"
-	}
-}
-
-var _ = func() int {
-	print(1)
-	switch x {
-	case 1:
-		print(2)
-		panic(3)
-	default:
-		return 4
-	}
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-	print(1)
-	switch x {
-	default:
-		return 4
-		println() // ERROR "unreachable code"
-	case 1:
-		print(2)
-		panic(3)
-		println() // ERROR "unreachable code"
-	}
-}
-
-var _ = func() int {
-	print(1)
-	switch x {
-	default:
-		return 4
-	case 1:
-		print(2)
-		panic(3)
-	}
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-	print(1)
-	switch x {
-	case 1:
-		print(2)
-		fallthrough
-	default:
-		return 4
-		println() // ERROR "unreachable code"
-	}
-}
-
-var _ = func() int {
-	print(1)
-	switch x {
-	case 1:
-		print(2)
-		fallthrough
-	default:
-		return 4
-	}
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-	print(1)
-	switch {
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-	switch x {
-	case 1:
-		print(2)
-		panic(3)
-	case 2:
-		return 4
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-	switch x {
-	case 2:
-		return 4
-	case 1:
-		print(2)
-		panic(3)
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-	switch x {
-	case 1:
-		print(2)
-		fallthrough
-	case 2:
-		return 4
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-	switch x {
-	case 1:
-		print(2)
-		panic(3)
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-L:
-	switch x {
-	case 1:
-		print(2)
-		panic(3)
-		break L // ERROR "unreachable code"
-	default:
-		return 4
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-	switch x {
-	default:
-		return 4
-		break // ERROR "unreachable code"
-	case 1:
-		print(2)
-		panic(3)
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-L:
-	switch x {
-	case 1:
-		print(2)
-		for {
-			break L
-		}
-	default:
-		return 4
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-	switch x.(type) {
-	case int:
-		print(2)
-		panic(3)
-		println() // ERROR "unreachable code"
-	default:
-		return 4
-		println() // ERROR "unreachable code"
-	}
-}
-
-var _ = func() int {
-	print(1)
-	switch x.(type) {
-	case int:
-		print(2)
-		panic(3)
-	default:
-		return 4
-	}
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-	print(1)
-	switch x.(type) {
-	default:
-		return 4
-		println() // ERROR "unreachable code"
-	case int:
-		print(2)
-		panic(3)
-		println() // ERROR "unreachable code"
-	}
-}
-
-var _ = func() int {
-	print(1)
-	switch x.(type) {
-	default:
-		return 4
-	case int:
-		print(2)
-		panic(3)
-	}
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-	print(1)
-	switch x.(type) {
-	case int:
-		print(2)
-		fallthrough
-	default:
-		return 4
-		println() // ERROR "unreachable code"
-	}
-}
-
-var _ = func() int {
-	print(1)
-	switch x.(type) {
-	case int:
-		print(2)
-		fallthrough
-	default:
-		return 4
-	}
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-	print(1)
-	switch {
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-	switch x.(type) {
-	case int:
-		print(2)
-		panic(3)
-	case float64:
-		return 4
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-	switch x.(type) {
-	case float64:
-		return 4
-	case int:
-		print(2)
-		panic(3)
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-	switch x.(type) {
-	case int:
-		print(2)
-		fallthrough
-	case float64:
-		return 4
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-	switch x.(type) {
-	case int:
-		print(2)
-		panic(3)
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-L:
-	switch x.(type) {
-	case int:
-		print(2)
-		panic(3)
-		break L // ERROR "unreachable code"
-	default:
-		return 4
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-	switch x.(type) {
-	default:
-		return 4
-		break // ERROR "unreachable code"
-	case int:
-		print(2)
-		panic(3)
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	print(1)
-L:
-	switch x.(type) {
-	case int:
-		print(2)
-		for {
-			break L
-		}
-	default:
-		return 4
-	}
-	println() // ok
-}
-
-// again, but without the leading print(1).
-// testing that everything works when the terminating statement is first.
-
-var _ = func() int {
-	println() // ok
-}
-
-var _ = func() int {
-	return 2
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-L:
-	goto L
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-	panic(2)
-	println() // ERROR "unreachable code"
-}
-
-// but only builtin panic
-var _ = func() int {
-	var panic = func(int) {}
-	panic(2)
-	println() // ok
-}
-
-var _ = func() int {
-	{
-		return 2
-		println() // ERROR "unreachable code"
-	}
-}
-
-var _ = func() int {
-	{
-		return 2
-	}
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-L:
-	{
-		goto L
-		println() // ERROR "unreachable code"
-	}
-}
-
-var _ = func() int {
-L:
-	{
-		goto L
-	}
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-	{
-		panic(2)
-		println() // ERROR "unreachable code"
-	}
-}
-
-var _ = func() int {
-	{
-		panic(2)
-	}
-	println() // ERROR "unreachable code"
-}
-
-var _ = func() int {
-	return 2
-	{ // ERROR "unreachable code"
-	}
-	println() // ok
-}
-
-var _ = func() int {
-L:
-	goto L
-	{ // ERROR "unreachable code"
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	panic(2)
-	{ // ERROR "unreachable code"
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	{
-		return 2
-		{ // ERROR "unreachable code"
-		}
-	}
-	println() // ok
-}
-
-var _ = func() int {
-L:
-	{
-		goto L
-		{ // ERROR "unreachable code"
-		}
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	{
-		panic(2)
-		{ // ERROR "unreachable code"
-		}
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	{
-		return 2
-	}
-	{ // ERROR "unreachable code"
-	}
-	println() // ok
-}
-
-var _ = func() int {
-L:
-	{
-		goto L
-	}
-	{ // ERROR "unreachable code"
-	}
-	println() // ok
-}
-
-var _ = func() int {
-	{
-		panic(2)
-	}
-	{ // ERROR "unreachable code"
-	}
-	println() // ok
-}
-
-var _ = func() {
-	// goto without label used to panic
-	goto
-}
diff --git a/src/cmd/vet/testdata/method.go b/src/cmd/vet/testdata/method.go
deleted file mode 100644
index 52b500d..0000000
--- a/src/cmd/vet/testdata/method.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains tests for the canonical method checker.
-
-// This file contains the code to check canonical methods.
-
-package testdata
-
-import (
-	"fmt"
-)
-
-type MethodTest int
-
-func (t *MethodTest) Scan(x fmt.ScanState, c byte) { // ERROR "should have signature Scan"
-}
-
-type MethodTestInterface interface {
-	ReadByte() byte // ERROR "should have signature ReadByte"
-}
diff --git a/src/cmd/vet/testdata/nilfunc.go b/src/cmd/vet/testdata/nilfunc.go
deleted file mode 100644
index 2ce7bc8..0000000
--- a/src/cmd/vet/testdata/nilfunc.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package testdata
-
-func F() {}
-
-type T struct {
-	F func()
-}
-
-func (T) M() {}
-
-var Fv = F
-
-func Comparison() {
-	var t T
-	var fn func()
-	if fn == nil || Fv == nil || t.F == nil {
-		// no error; these func vars or fields may be nil
-	}
-	if F == nil { // ERROR "comparison of function F == nil is always false"
-		panic("can't happen")
-	}
-	if t.M == nil { // ERROR "comparison of function M == nil is always false"
-		panic("can't happen")
-	}
-	if F != nil { // ERROR "comparison of function F != nil is always true"
-		if t.M != nil { // ERROR "comparison of function M != nil is always true"
-			return
-		}
-	}
-	panic("can't happen")
-}
diff --git a/src/cmd/vet/testdata/print.go b/src/cmd/vet/testdata/print.go
deleted file mode 100644
index 3390a31..0000000
--- a/src/cmd/vet/testdata/print.go
+++ /dev/null
@@ -1,342 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains tests for the printf checker.
-
-package testdata
-
-import (
-	"fmt"
-	"math"
-	"os"
-	"unsafe" // just for test case printing unsafe.Pointer
-)
-
-func UnsafePointerPrintfTest() {
-	var up unsafe.Pointer
-	fmt.Printf("%p, %x %X", up, up, up)
-}
-
-// Error methods that do not satisfy the Error interface and should be checked.
-type errorTest1 int
-
-func (errorTest1) Error(...interface{}) string {
-	return "hi"
-}
-
-type errorTest2 int // Analogous to testing's *T type.
-func (errorTest2) Error(...interface{}) {
-}
-
-type errorTest3 int
-
-func (errorTest3) Error() { // No return value.
-}
-
-type errorTest4 int
-
-func (errorTest4) Error() int { // Different return type.
-	return 3
-}
-
-type errorTest5 int
-
-func (errorTest5) error() { // niladic; don't complain if no args (was bug)
-}
-
-// This function never executes, but it serves as a simple test for the program.
-// Test with make test.
-func PrintfTests() {
-	var b bool
-	var i int
-	var r rune
-	var s string
-	var x float64
-	var p *int
-	var imap map[int]int
-	var fslice []float64
-	var c complex64
-	// Some good format/argtypes
-	fmt.Printf("")
-	fmt.Printf("%b %b %b", 3, i, x)
-	fmt.Printf("%c %c %c %c", 3, i, 'x', r)
-	fmt.Printf("%d %d %d", 3, i, imap)
-	fmt.Printf("%e %e %e %e", 3e9, x, fslice, c)
-	fmt.Printf("%E %E %E %E", 3e9, x, fslice, c)
-	fmt.Printf("%f %f %f %f", 3e9, x, fslice, c)
-	fmt.Printf("%F %F %F %F", 3e9, x, fslice, c)
-	fmt.Printf("%g %g %g %g", 3e9, x, fslice, c)
-	fmt.Printf("%G %G %G %G", 3e9, x, fslice, c)
-	fmt.Printf("%b %b %b %b", 3e9, x, fslice, c)
-	fmt.Printf("%o %o", 3, i)
-	fmt.Printf("%p %p", p, nil)
-	fmt.Printf("%q %q %q %q", 3, i, 'x', r)
-	fmt.Printf("%s %s %s", "hi", s, []byte{65})
-	fmt.Printf("%t %t", true, b)
-	fmt.Printf("%T %T", 3, i)
-	fmt.Printf("%U %U", 3, i)
-	fmt.Printf("%v %v", 3, i)
-	fmt.Printf("%x %x %x %x", 3, i, "hi", s)
-	fmt.Printf("%X %X %X %X", 3, i, "hi", s)
-	fmt.Printf("%.*s %d %g", 3, "hi", 23, 2.3)
-	fmt.Printf("%s", &stringerv)
-	fmt.Printf("%v", &stringerv)
-	fmt.Printf("%T", &stringerv)
-	fmt.Printf("%v", notstringerv)
-	fmt.Printf("%T", notstringerv)
-	fmt.Printf("%q", stringerarrayv)
-	fmt.Printf("%v", stringerarrayv)
-	fmt.Printf("%s", stringerarrayv)
-	fmt.Printf("%v", notstringerarrayv)
-	fmt.Printf("%T", notstringerarrayv)
-	fmt.Printf("%d", new(Formatter))
-	fmt.Printf("%*%", 2)               // Ridiculous but allowed.
-	fmt.Printf("%s", interface{}(nil)) // Nothing useful we can say.
-
-	fmt.Printf("%g", 1+2i)
-	// Some bad format/argTypes
-	fmt.Printf("%b", "hi")                     // ERROR "arg .hi. for printf verb %b of wrong type"
-	fmt.Printf("%t", c)                        // ERROR "arg c for printf verb %t of wrong type"
-	fmt.Printf("%t", 1+2i)                     // ERROR "arg 1 \+ 2i for printf verb %t of wrong type"
-	fmt.Printf("%c", 2.3)                      // ERROR "arg 2.3 for printf verb %c of wrong type"
-	fmt.Printf("%d", 2.3)                      // ERROR "arg 2.3 for printf verb %d of wrong type"
-	fmt.Printf("%e", "hi")                     // ERROR "arg .hi. for printf verb %e of wrong type"
-	fmt.Printf("%E", true)                     // ERROR "arg true for printf verb %E of wrong type"
-	fmt.Printf("%f", "hi")                     // ERROR "arg .hi. for printf verb %f of wrong type"
-	fmt.Printf("%F", 'x')                      // ERROR "arg 'x' for printf verb %F of wrong type"
-	fmt.Printf("%g", "hi")                     // ERROR "arg .hi. for printf verb %g of wrong type"
-	fmt.Printf("%g", imap)                     // ERROR "arg imap for printf verb %g of wrong type"
-	fmt.Printf("%G", i)                        // ERROR "arg i for printf verb %G of wrong type"
-	fmt.Printf("%o", x)                        // ERROR "arg x for printf verb %o of wrong type"
-	fmt.Printf("%p", 23)                       // ERROR "arg 23 for printf verb %p of wrong type"
-	fmt.Printf("%q", x)                        // ERROR "arg x for printf verb %q of wrong type"
-	fmt.Printf("%s", b)                        // ERROR "arg b for printf verb %s of wrong type"
-	fmt.Printf("%s", byte(65))                 // ERROR "arg byte\(65\) for printf verb %s of wrong type"
-	fmt.Printf("%t", 23)                       // ERROR "arg 23 for printf verb %t of wrong type"
-	fmt.Printf("%U", x)                        // ERROR "arg x for printf verb %U of wrong type"
-	fmt.Printf("%x", nil)                      // ERROR "arg nil for printf verb %x of wrong type"
-	fmt.Printf("%X", 2.3)                      // ERROR "arg 2.3 for printf verb %X of wrong type"
-	fmt.Printf("%s", stringerv)                // ERROR "arg stringerv for printf verb %s of wrong type"
-	fmt.Printf("%t", stringerv)                // ERROR "arg stringerv for printf verb %t of wrong type"
-	fmt.Printf("%q", notstringerv)             // ERROR "arg notstringerv for printf verb %q of wrong type"
-	fmt.Printf("%t", notstringerv)             // ERROR "arg notstringerv for printf verb %t of wrong type"
-	fmt.Printf("%t", stringerarrayv)           // ERROR "arg stringerarrayv for printf verb %t of wrong type"
-	fmt.Printf("%t", notstringerarrayv)        // ERROR "arg notstringerarrayv for printf verb %t of wrong type"
-	fmt.Printf("%q", notstringerarrayv)        // ERROR "arg notstringerarrayv for printf verb %q of wrong type"
-	fmt.Printf("%d", Formatter(true))          // correct (the type is responsible for formatting)
-	fmt.Printf("%s", nonemptyinterface)        // correct (the dynamic type of nonemptyinterface may be a stringer)
-	fmt.Printf("%.*s %d %g", 3, "hi", 23, 'x') // ERROR "arg 'x' for printf verb %g of wrong type"
-	fmt.Println()                              // not an error
-	fmt.Println("%s", "hi")                    // ERROR "possible formatting directive in Println call"
-	fmt.Printf("%s", "hi", 3)                  // ERROR "wrong number of args for format in Printf call"
-	_ = fmt.Sprintf("%"+("s"), "hi", 3)        // ERROR "wrong number of args for format in Sprintf call"
-	fmt.Printf("%s%%%d", "hi", 3)              // correct
-	fmt.Printf("%08s", "woo")                  // correct
-	fmt.Printf("% 8s", "woo")                  // correct
-	fmt.Printf("%.*d", 3, 3)                   // correct
-	fmt.Printf("%.*d", 3, 3, 3, 3)             // ERROR "wrong number of args for format in Printf call.*4 args"
-	fmt.Printf("%.*d", "hi", 3)                // ERROR "arg .hi. for \* in printf format not of type int"
-	fmt.Printf("%.*d", i, 3)                   // correct
-	fmt.Printf("%.*d", s, 3)                   // ERROR "arg s for \* in printf format not of type int"
-	fmt.Printf("%*%", 0.22)                    // ERROR "arg 0.22 for \* in printf format not of type int"
-	fmt.Printf("%q %q", multi()...)            // ok
-	fmt.Printf("%#q", `blah`)                  // ok
-	printf("now is the time", "buddy")         // ERROR "no formatting directive"
-	Printf("now is the time", "buddy")         // ERROR "no formatting directive"
-	Printf("hi")                               // ok
-	const format = "%s %s\n"
-	Printf(format, "hi", "there")
-	Printf(format, "hi")              // ERROR "missing argument for Printf..%s..: format reads arg 2, have only 1"
-	Printf("%s %d %.3v %q", "str", 4) // ERROR "missing argument for Printf..%.3v..: format reads arg 3, have only 2"
-	f := new(stringer)
-	f.Warn(0, "%s", "hello", 3)  // ERROR "possible formatting directive in Warn call"
-	f.Warnf(0, "%s", "hello", 3) // ERROR "wrong number of args for format in Warnf call"
-	f.Warnf(0, "%r", "hello")    // ERROR "unrecognized printf verb"
-	f.Warnf(0, "%#s", "hello")   // ERROR "unrecognized printf flag"
-	Printf("d%", 2)              // ERROR "missing verb at end of format string in Printf call"
-	Printf("%d", percentDV)
-	Printf("%d", &percentDV)
-	Printf("%d", notPercentDV)  // ERROR "arg notPercentDV for printf verb %d of wrong type"
-	Printf("%d", &notPercentDV) // ERROR "arg &notPercentDV for printf verb %d of wrong type"
-	Printf("%p", &notPercentDV) // Works regardless: we print it as a pointer.
-	Printf("%s", percentSV)
-	Printf("%s", &percentSV)
-	// Good argument reorderings.
-	Printf("%[1]d", 3)
-	Printf("%[1]*d", 3, 1)
-	Printf("%[2]*[1]d", 1, 3)
-	Printf("%[2]*.[1]*[3]d", 2, 3, 4)
-	fmt.Fprintf(os.Stderr, "%[2]*.[1]*[3]d", 2, 3, 4) // Use Fprintf to make sure we count arguments correctly.
-	// Bad argument reorderings.
-	Printf("%[xd", 3)                    // ERROR "illegal syntax for printf argument index"
-	Printf("%[x]d", 3)                   // ERROR "illegal syntax for printf argument index"
-	Printf("%[3]*s", "hi", 2)            // ERROR "missing argument for Printf.* reads arg 3, have only 2"
-	_ = fmt.Sprintf("%[3]d", 2)          // ERROR "missing argument for Sprintf.* reads arg 3, have only 1"
-	Printf("%[2]*.[1]*[3]d", 2, "hi", 4) // ERROR "arg .hi. for \* in printf format not of type int"
-	Printf("%[0]s", "arg1")              // ERROR "index value \[0\] for Printf.*; indexes start at 1"
-	Printf("%[0]d", 1)                   // ERROR "index value \[0\] for Printf.*; indexes start at 1"
-	// Something that satisfies the error interface.
-	var e error
-	fmt.Println(e.Error()) // ok
-	// Something that looks like an error interface but isn't, such as the (*T).Error method
-	// in the testing package.
-	var et1 errorTest1
-	fmt.Println(et1.Error())        // ERROR "no args in Error call"
-	fmt.Println(et1.Error("hi"))    // ok
-	fmt.Println(et1.Error("%d", 3)) // ERROR "possible formatting directive in Error call"
-	var et2 errorTest2
-	et2.Error()        // ERROR "no args in Error call"
-	et2.Error("hi")    // ok, not an error method.
-	et2.Error("%d", 3) // ERROR "possible formatting directive in Error call"
-	var et3 errorTest3
-	et3.Error() // ok, not an error method.
-	var et4 errorTest4
-	et4.Error() // ok, not an error method.
-	var et5 errorTest5
-	et5.error() // ok, not an error method.
-	// Bug: used to recur forever.
-	Printf("%p %x", recursiveStructV, recursiveStructV.next)
-	Printf("%p %x", recursiveStruct1V, recursiveStruct1V.next)
-	Printf("%p %x", recursiveSliceV, recursiveSliceV)
-	Printf("%p %x", recursiveMapV, recursiveMapV)
-	// Special handling for Log.
-	math.Log(3)  // OK
-	Log(3)       // OK
-	Log("%d", 3) // ERROR "possible formatting directive in Log call"
-	Logf("%d", 3)
-	Logf("%d", "hi") // ERROR "arg .hi. for printf verb %d of wrong type: untyped string"
-
-}
-
-// Printf is used by the test so we must declare it.
-func Printf(format string, args ...interface{}) {
-	panic("don't call - testing only")
-}
-
-// printf is used by the test so we must declare it.
-func printf(format string, args ...interface{}) {
-	panic("don't call - testing only")
-}
-
-// multi is used by the test.
-func multi() []interface{} {
-	panic("don't call - testing only")
-}
-
-type stringer float64
-
-var stringerv stringer
-
-func (*stringer) String() string {
-	return "string"
-}
-
-func (*stringer) Warn(int, ...interface{}) string {
-	return "warn"
-}
-
-func (*stringer) Warnf(int, string, ...interface{}) string {
-	return "warnf"
-}
-
-type notstringer struct {
-	f float64
-}
-
-var notstringerv notstringer
-
-type stringerarray [4]float64
-
-func (stringerarray) String() string {
-	return "string"
-}
-
-var stringerarrayv stringerarray
-
-type notstringerarray [4]float64
-
-var notstringerarrayv notstringerarray
-
-var nonemptyinterface = interface {
-	f()
-}(nil)
-
-// A data type we can print with "%d".
-type percentDStruct struct {
-	a int
-	b []byte
-	c *float64
-}
-
-var percentDV percentDStruct
-
-// A data type we cannot print correctly with "%d".
-type notPercentDStruct struct {
-	a int
-	b []byte
-	c bool
-}
-
-var notPercentDV notPercentDStruct
-
-// A data type we can print with "%s".
-type percentSStruct struct {
-	a string
-	b []byte
-	c stringerarray
-}
-
-var percentSV percentSStruct
-
-type recursiveStringer int
-
-func (s recursiveStringer) String() string {
-	_ = fmt.Sprintf("%d", s)
-	_ = fmt.Sprintf("%#v", s)
-	_ = fmt.Sprintf("%v", s)  // ERROR "arg s for printf causes recursive call to String method"
-	_ = fmt.Sprintf("%v", &s) // ERROR "arg &s for printf causes recursive call to String method"
-	_ = fmt.Sprintf("%T", s)  // ok; does not recursively call String
-	return fmt.Sprintln(s)    // ERROR "arg s for print causes recursive call to String method"
-}
-
-type recursivePtrStringer int
-
-func (p *recursivePtrStringer) String() string {
-	_ = fmt.Sprintf("%v", *p)
-	return fmt.Sprintln(p) // ERROR "arg p for print causes recursive call to String method"
-}
-
-type Formatter bool
-
-func (*Formatter) Format(fmt.State, rune) {
-}
-
-type RecursiveSlice []RecursiveSlice
-
-var recursiveSliceV = &RecursiveSlice{}
-
-type RecursiveMap map[int]RecursiveMap
-
-var recursiveMapV = make(RecursiveMap)
-
-type RecursiveStruct struct {
-	next *RecursiveStruct
-}
-
-var recursiveStructV = &RecursiveStruct{}
-
-type RecursiveStruct1 struct {
-	next *Recursive2Struct
-}
-
-type RecursiveStruct2 struct {
-	next *Recursive1Struct
-}
-
-var recursiveStruct1V = &RecursiveStruct1{}
-
-// Fix for issue 7149: Missing return type on String method caused fault.
-func (int) String() {
-	return ""
-}
diff --git a/src/cmd/vet/testdata/rangeloop.go b/src/cmd/vet/testdata/rangeloop.go
deleted file mode 100644
index 37b5940..0000000
--- a/src/cmd/vet/testdata/rangeloop.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains tests for the rangeloop checker.
-
-package testdata
-
-func RangeLoopTests() {
-	var s []int
-	for i, v := range s {
-		go func() {
-			println(i) // ERROR "range variable i captured by func literal"
-			println(v) // ERROR "range variable v captured by func literal"
-		}()
-	}
-	for i, v := range s {
-		defer func() {
-			println(i) // ERROR "range variable i captured by func literal"
-			println(v) // ERROR "range variable v captured by func literal"
-		}()
-	}
-	for i := range s {
-		go func() {
-			println(i) // ERROR "range variable i captured by func literal"
-		}()
-	}
-	for _, v := range s {
-		go func() {
-			println(v) // ERROR "range variable v captured by func literal"
-		}()
-	}
-	for i, v := range s {
-		go func() {
-			println(i, v)
-		}()
-		println("unfortunately, we don't catch the error above because of this statement")
-	}
-	for i, v := range s {
-		go func(i, v int) {
-			println(i, v)
-		}(i, v)
-	}
-	for i, v := range s {
-		i, v := i, v
-		go func() {
-			println(i, v)
-		}()
-	}
-	// If the key of the range statement is not an identifier
-	// the code should not panic (it used to).
-	var x [2]int
-	var f int
-	for x[0], f = range s {
-		go func() {
-			_ = f // ERROR "range variable f captured by func literal"
-		}()
-	}
-}
diff --git a/src/cmd/vet/testdata/shadow.go b/src/cmd/vet/testdata/shadow.go
deleted file mode 100644
index 34a6806..0000000
--- a/src/cmd/vet/testdata/shadow.go
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains tests for the shadowed variable checker.
-// Some of these errors are caught by the compiler (shadowed return parameters for example)
-// but are nonetheless useful tests.
-
-package testdata
-
-import "os"
-
-func ShadowRead(f *os.File, buf []byte) (err error) {
-	var x int
-	if f != nil {
-		err := 3 // OK - different type.
-		_ = err
-	}
-	if f != nil {
-		_, err := f.Read(buf) // ERROR "declaration of err shadows declaration at testdata/shadow.go:13"
-		if err != nil {
-			return err
-		}
-		i := 3 // OK
-		_ = i
-	}
-	if f != nil {
-		var _, err = f.Read(buf) // ERROR "declaration of err shadows declaration at testdata/shadow.go:13"
-		if err != nil {
-			return err
-		}
-	}
-	for i := 0; i < 10; i++ {
-		i := i // OK: obviously intentional idiomatic redeclaration
-		go func() {
-			println(i)
-		}()
-	}
-	var shadowTemp interface{}
-	switch shadowTemp := shadowTemp.(type) { // OK: obviously intentional idiomatic redeclaration
-	case int:
-		println("OK")
-		_ = shadowTemp
-	}
-	if shadowTemp := shadowTemp; true { // OK: obviously intentional idiomatic redeclaration
-		var f *os.File // OK because f is not mentioned later in the function.
-		// The declaration of x is a shadow because x is mentioned below.
-		var x int // ERROR "declaration of x shadows declaration at testdata/shadow.go:14"
-		_, _, _ = x, f, shadowTemp
-	}
-	// Use a couple of variables to trigger shadowing errors.
-	_, _ = err, x
-	return
-}
diff --git a/src/cmd/vet/testdata/shift.go b/src/cmd/vet/testdata/shift.go
deleted file mode 100644
index 6624f09..0000000
--- a/src/cmd/vet/testdata/shift.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains tests for the suspicious shift checker.
-
-package testdata
-
-func ShiftTest() {
-	var i8 int8
-	_ = i8 << 7
-	_ = (i8 + 1) << 8 // ERROR "\(i8 \+ 1\) too small for shift of 8"
-	_ = i8 << (7 + 1) // ERROR "i8 too small for shift of 8"
-	_ = i8 >> 8       // ERROR "i8 too small for shift of 8"
-	i8 <<= 8          // ERROR "i8 too small for shift of 8"
-	i8 >>= 8          // ERROR "i8 too small for shift of 8"
-	var i16 int16
-	_ = i16 << 15
-	_ = i16 << 16 // ERROR "i16 too small for shift of 16"
-	_ = i16 >> 16 // ERROR "i16 too small for shift of 16"
-	i16 <<= 16    // ERROR "i16 too small for shift of 16"
-	i16 >>= 16    // ERROR "i16 too small for shift of 16"
-	var i32 int32
-	_ = i32 << 31
-	_ = i32 << 32 // ERROR "i32 too small for shift of 32"
-	_ = i32 >> 32 // ERROR "i32 too small for shift of 32"
-	i32 <<= 32    // ERROR "i32 too small for shift of 32"
-	i32 >>= 32    // ERROR "i32 too small for shift of 32"
-	var i64 int64
-	_ = i64 << 63
-	_ = i64 << 64 // ERROR "i64 too small for shift of 64"
-	_ = i64 >> 64 // ERROR "i64 too small for shift of 64"
-	i64 <<= 64    // ERROR "i64 too small for shift of 64"
-	i64 >>= 64    // ERROR "i64 too small for shift of 64"
-	var u8 uint8
-	_ = u8 << 7
-	_ = u8 << 8 // ERROR "u8 too small for shift of 8"
-	_ = u8 >> 8 // ERROR "u8 too small for shift of 8"
-	u8 <<= 8    // ERROR "u8 too small for shift of 8"
-	u8 >>= 8    // ERROR "u8 too small for shift of 8"
-	var u16 uint16
-	_ = u16 << 15
-	_ = u16 << 16 // ERROR "u16 too small for shift of 16"
-	_ = u16 >> 16 // ERROR "u16 too small for shift of 16"
-	u16 <<= 16    // ERROR "u16 too small for shift of 16"
-	u16 >>= 16    // ERROR "u16 too small for shift of 16"
-	var u32 uint32
-	_ = u32 << 31
-	_ = u32 << 32 // ERROR "u32 too small for shift of 32"
-	_ = u32 >> 32 // ERROR "u32 too small for shift of 32"
-	u32 <<= 32    // ERROR "u32 too small for shift of 32"
-	u32 >>= 32    // ERROR "u32 too small for shift of 32"
-	var u64 uint64
-	_ = u64 << 63
-	_ = u64 << 64  // ERROR "u64 too small for shift of 64"
-	_ = u64 >> 64  // ERROR "u64 too small for shift of 64"
-	u64 <<= 64     // ERROR "u64 too small for shift of 64"
-	u64 >>= 64     // ERROR "u64 too small for shift of 64"
-	_ = u64 << u64 // Non-constant shifts should succeed.
-	var i int
-	_ = i << 31
-	_ = i << 32 // ERROR "i might be too small for shift of 32"
-	_ = i >> 32 // ERROR "i might be too small for shift of 32"
-	i <<= 32    // ERROR "i might be too small for shift of 32"
-	i >>= 32    // ERROR "i might be too small for shift of 32"
-	var u uint
-	_ = u << 31
-	_ = u << 32 // ERROR "u might be too small for shift of 32"
-	_ = u >> 32 // ERROR "u might be too small for shift of 32"
-	u <<= 32    // ERROR "u might be too small for shift of 32"
-	u >>= 32    // ERROR "u might be too small for shift of 32"
-	var p uintptr
-	_ = p << 31
-	_ = p << 32 // ERROR "p might be too small for shift of 32"
-	_ = p >> 32 // ERROR "p might be too small for shift of 32"
-	p <<= 32    // ERROR "p might be too small for shift of 32"
-	p >>= 32    // ERROR "p might be too small for shift of 32"
-}
diff --git a/src/cmd/vet/testdata/structtag.go b/src/cmd/vet/testdata/structtag.go
deleted file mode 100644
index 6878f56..0000000
--- a/src/cmd/vet/testdata/structtag.go
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains the test for canonical struct tags.
-
-package testdata
-
-type StructTagTest struct {
-	A   int "hello"            // ERROR "not compatible with reflect.StructTag.Get: bad syntax for struct tag pair"
-	B   int "\tx:\"y\""        // ERROR "not compatible with reflect.StructTag.Get: bad syntax for struct tag key"
-	C   int "x:\"y\"\tx:\"y\"" // ERROR "not compatible with reflect.StructTag.Get"
-	D   int "x:`y`"            // ERROR "not compatible with reflect.StructTag.Get: bad syntax for struct tag value"
-	E   int "ct\brl:\"char\""  // ERROR "not compatible with reflect.StructTag.Get: bad syntax for struct tag pair"
-	F   int `:"emptykey"`      // ERROR "not compatible with reflect.StructTag.Get: bad syntax for struct tag key"
-	G   int `x:"noEndQuote`    // ERROR "not compatible with reflect.StructTag.Get: bad syntax for struct tag value"
-	H   int `x:"trunc\x0"`     // ERROR "not compatible with reflect.StructTag.Get: bad syntax for struct tag value"
-	OK0 int `x:"y" u:"v" w:""`
-	OK1 int `x:"y:z" u:"v" w:""` // note multiple colons.
-	OK2 int "k0:\"values contain spaces\" k1:\"literal\ttabs\" k2:\"and\\tescaped\\tabs\""
-	OK3 int `under_scores:"and" CAPS:"ARE_OK"`
-}
-
-type UnexportedEncodingTagTest struct {
-	x int `json:"xx"` // ERROR "struct field x has json tag but is not exported"
-	y int `xml:"yy"`  // ERROR "struct field y has xml tag but is not exported"
-	z int
-	A int `json:"aa" xml:"bb"`
-}
-
-type unexp struct{}
-
-type JSONEmbeddedField struct {
-	UnexportedEncodingTagTest `is:"embedded"`
-	unexp                     `is:"embedded,notexported" json:"unexp"` // OK for now, see issue 7363
-}
diff --git a/src/cmd/vet/testdata/tagtest/file1.go b/src/cmd/vet/testdata/tagtest/file1.go
deleted file mode 100644
index 22a1509..0000000
--- a/src/cmd/vet/testdata/tagtest/file1.go
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build testtag
-
-package main
-
-func main() {
-}
diff --git a/src/cmd/vet/testdata/tagtest/file2.go b/src/cmd/vet/testdata/tagtest/file2.go
deleted file mode 100644
index ba7dd91..0000000
--- a/src/cmd/vet/testdata/tagtest/file2.go
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !testtag
-
-package main
-
-func ignore() {
-}
diff --git a/src/cmd/vet/testdata/unsafeptr.go b/src/cmd/vet/testdata/unsafeptr.go
deleted file mode 100644
index 8f64030..0000000
--- a/src/cmd/vet/testdata/unsafeptr.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package testdata
-
-import (
-	"reflect"
-	"unsafe"
-)
-
-func f() {
-	var x unsafe.Pointer
-	var y uintptr
-	x = unsafe.Pointer(y) // ERROR "possible misuse of unsafe.Pointer"
-	y = uintptr(x)
-
-	// only allowed pointer arithmetic is ptr +/- num.
-	// num+ptr is technically okay but still flagged: write ptr+num instead.
-	x = unsafe.Pointer(uintptr(x) + 1)
-	x = unsafe.Pointer(1 + uintptr(x))          // ERROR "possible misuse of unsafe.Pointer"
-	x = unsafe.Pointer(uintptr(x) + uintptr(x)) // ERROR "possible misuse of unsafe.Pointer"
-	x = unsafe.Pointer(uintptr(x) - 1)
-	x = unsafe.Pointer(1 - uintptr(x)) // ERROR "possible misuse of unsafe.Pointer"
-
-	// certain uses of reflect are okay
-	var v reflect.Value
-	x = unsafe.Pointer(v.Pointer())
-	x = unsafe.Pointer(v.UnsafeAddr())
-	var s1 *reflect.StringHeader
-	x = unsafe.Pointer(s1.Data)
-	var s2 *reflect.SliceHeader
-	x = unsafe.Pointer(s2.Data)
-	var s3 reflect.StringHeader
-	x = unsafe.Pointer(s3.Data) // ERROR "possible misuse of unsafe.Pointer"
-	var s4 reflect.SliceHeader
-	x = unsafe.Pointer(s4.Data) // ERROR "possible misuse of unsafe.Pointer"
-
-	// but only in reflect
-	var vv V
-	x = unsafe.Pointer(vv.Pointer())    // ERROR "possible misuse of unsafe.Pointer"
-	x = unsafe.Pointer(vv.UnsafeAddr()) // ERROR "possible misuse of unsafe.Pointer"
-	var ss1 *StringHeader
-	x = unsafe.Pointer(ss1.Data) // ERROR "possible misuse of unsafe.Pointer"
-	var ss2 *SliceHeader
-	x = unsafe.Pointer(ss2.Data) // ERROR "possible misuse of unsafe.Pointer"
-
-}
-
-type V interface {
-	Pointer() uintptr
-	UnsafeAddr() uintptr
-}
-
-type StringHeader struct {
-	Data uintptr
-}
-
-type SliceHeader struct {
-	Data uintptr
-}
diff --git a/src/cmd/vet/testdata/unused.go b/src/cmd/vet/testdata/unused.go
deleted file mode 100644
index d50f659..0000000
--- a/src/cmd/vet/testdata/unused.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains tests for the unusedresult checker.
-
-package testdata
-
-import (
-	"bytes"
-	"errors"
-	"fmt"
-)
-
-func _() {
-	fmt.Errorf("") // ERROR "result of fmt.Errorf call not used"
-	_ = fmt.Errorf("")
-
-	errors.New("") // ERROR "result of errors.New call not used"
-
-	err := errors.New("")
-	err.Error() // ERROR "result of \(error\).Error call not used"
-
-	var buf bytes.Buffer
-	buf.String() // ERROR "result of \(bytes.Buffer\).String call not used"
-
-	fmt.Sprint("")  // ERROR "result of fmt.Sprint call not used"
-	fmt.Sprintf("") // ERROR "result of fmt.Sprintf call not used"
-}
diff --git a/src/cmd/vet/types.go b/src/cmd/vet/types.go
deleted file mode 100644
index 692bae6..0000000
--- a/src/cmd/vet/types.go
+++ /dev/null
@@ -1,370 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains the pieces of the tool that use typechecking from the go/types package.
-
-package main
-
-import (
-	"go/ast"
-	"go/importer"
-	"go/token"
-	"go/types"
-)
-
-// stdImporter is the importer we use to import packages.
-// It is created during initialization so that all packages
-// are imported by the same importer.
-var stdImporter = importer.Default()
-
-var (
-	errorType     *types.Interface
-	stringerType  *types.Interface // possibly nil
-	formatterType *types.Interface // possibly nil
-)
-
-func init() {
-	errorType = types.Universe.Lookup("error").Type().Underlying().(*types.Interface)
-
-	if typ := importType("fmt", "Stringer"); typ != nil {
-		stringerType = typ.Underlying().(*types.Interface)
-	}
-
-	if typ := importType("fmt", "Formatter"); typ != nil {
-		formatterType = typ.Underlying().(*types.Interface)
-	}
-}
-
-// importType returns the type denoted by the qualified identifier
-// path.name, and adds the respective package to the imports map
-// as a side effect. In case of an error, importType returns nil.
-func importType(path, name string) types.Type {
-	pkg, err := stdImporter.Import(path)
-	if err != nil {
-		// This can happen if the package at path hasn't been compiled yet.
-		warnf("import failed: %v", err)
-		return nil
-	}
-	if obj, ok := pkg.Scope().Lookup(name).(*types.TypeName); ok {
-		return obj.Type()
-	}
-	warnf("invalid type name %q", name)
-	return nil
-}
-
-func (pkg *Package) check(fs *token.FileSet, astFiles []*ast.File) error {
-	pkg.defs = make(map[*ast.Ident]types.Object)
-	pkg.uses = make(map[*ast.Ident]types.Object)
-	pkg.selectors = make(map[*ast.SelectorExpr]*types.Selection)
-	pkg.spans = make(map[types.Object]Span)
-	pkg.types = make(map[ast.Expr]types.TypeAndValue)
-	config := types.Config{
-		// We use the same importer for all imports to ensure that
-		// everybody sees identical packages for the given paths.
-		Importer: stdImporter,
-		// By providing a Config with our own error function, it will continue
-		// past the first error. There is no need for that function to do anything.
-		Error: func(error) {},
-	}
-	info := &types.Info{
-		Selections: pkg.selectors,
-		Types:      pkg.types,
-		Defs:       pkg.defs,
-		Uses:       pkg.uses,
-	}
-	typesPkg, err := config.Check(pkg.path, fs, astFiles, info)
-	pkg.typesPkg = typesPkg
-	// update spans
-	for id, obj := range pkg.defs {
-		pkg.growSpan(id, obj)
-	}
-	for id, obj := range pkg.uses {
-		pkg.growSpan(id, obj)
-	}
-	return err
-}
-
-// isStruct reports whether the composite literal c is a struct.
-// If it is not (probably a struct), it returns a printable form of the type.
-func (pkg *Package) isStruct(c *ast.CompositeLit) (bool, string) {
-	// Check that the CompositeLit's type is a slice or array (which needs no field keys), if possible.
-	typ := pkg.types[c].Type
-	// If it's a named type, pull out the underlying type. If it's not, the Underlying
-	// method returns the type itself.
-	actual := typ
-	if actual != nil {
-		actual = actual.Underlying()
-	}
-	if actual == nil {
-		// No type information available. Assume true, so we do the check.
-		return true, ""
-	}
-	switch actual.(type) {
-	case *types.Struct:
-		return true, typ.String()
-	default:
-		return false, ""
-	}
-}
-
-// matchArgType reports an error if printf verb t is not appropriate
-// for operand arg.
-//
-// typ is used only for recursive calls; external callers must supply nil.
-//
-// (Recursion arises from the compound types {map,chan,slice} which
-// may be printed with %d etc. if that is appropriate for their element
-// types.)
-func (f *File) matchArgType(t printfArgType, typ types.Type, arg ast.Expr) bool {
-	return f.matchArgTypeInternal(t, typ, arg, make(map[types.Type]bool))
-}
-
-// matchArgTypeInternal is the internal version of matchArgType. It carries a map
-// remembering what types are in progress so we don't recur when faced with recursive
-// types or mutually recursive types.
-func (f *File) matchArgTypeInternal(t printfArgType, typ types.Type, arg ast.Expr, inProgress map[types.Type]bool) bool {
-	// %v, %T accept any argument type.
-	if t == anyType {
-		return true
-	}
-	if typ == nil {
-		// external call
-		typ = f.pkg.types[arg].Type
-		if typ == nil {
-			return true // probably a type check problem
-		}
-	}
-	// If the type implements fmt.Formatter, we have nothing to check.
-	// formatterTyp may be nil - be conservative and check for Format method in that case.
-	if formatterType != nil && types.Implements(typ, formatterType) || f.hasMethod(typ, "Format") {
-		return true
-	}
-	// If we can use a string, might arg (dynamically) implement the Stringer or Error interface?
-	if t&argString != 0 {
-		if types.AssertableTo(errorType, typ) || stringerType != nil && types.AssertableTo(stringerType, typ) {
-			return true
-		}
-	}
-
-	typ = typ.Underlying()
-	if inProgress[typ] {
-		// We're already looking at this type. The call that started it will take care of it.
-		return true
-	}
-	inProgress[typ] = true
-
-	switch typ := typ.(type) {
-	case *types.Signature:
-		return t&argPointer != 0
-
-	case *types.Map:
-		// Recur: map[int]int matches %d.
-		return t&argPointer != 0 ||
-			(f.matchArgTypeInternal(t, typ.Key(), arg, inProgress) && f.matchArgTypeInternal(t, typ.Elem(), arg, inProgress))
-
-	case *types.Chan:
-		return t&argPointer != 0
-
-	case *types.Array:
-		// Same as slice.
-		if types.Identical(typ.Elem().Underlying(), types.Typ[types.Byte]) && t&argString != 0 {
-			return true // %s matches []byte
-		}
-		// Recur: []int matches %d.
-		return t&argPointer != 0 || f.matchArgTypeInternal(t, typ.Elem().Underlying(), arg, inProgress)
-
-	case *types.Slice:
-		// Same as array.
-		if types.Identical(typ.Elem().Underlying(), types.Typ[types.Byte]) && t&argString != 0 {
-			return true // %s matches []byte
-		}
-		// Recur: []int matches %d. But watch out for
-		//	type T []T
-		// If the element is a pointer type (type T[]*T), it's handled fine by the Pointer case below.
-		return t&argPointer != 0 || f.matchArgTypeInternal(t, typ.Elem(), arg, inProgress)
-
-	case *types.Pointer:
-		// Ugly, but dealing with an edge case: a known pointer to an invalid type,
-		// probably something from a failed import.
-		if typ.Elem().String() == "invalid type" {
-			if *verbose {
-				f.Warnf(arg.Pos(), "printf argument %v is pointer to invalid or unknown type", f.gofmt(arg))
-			}
-			return true // special case
-		}
-		// If it's actually a pointer with %p, it prints as one.
-		if t == argPointer {
-			return true
-		}
-		// If it's pointer to struct, that's equivalent in our analysis to whether we can print the struct.
-		if str, ok := typ.Elem().Underlying().(*types.Struct); ok {
-			return f.matchStructArgType(t, str, arg, inProgress)
-		}
-		// The rest can print with %p as pointers, or as integers with %x etc.
-		return t&(argInt|argPointer) != 0
-
-	case *types.Struct:
-		return f.matchStructArgType(t, typ, arg, inProgress)
-
-	case *types.Interface:
-		// If the static type of the argument is empty interface, there's little we can do.
-		// Example:
-		//	func f(x interface{}) { fmt.Printf("%s", x) }
-		// Whether x is valid for %s depends on the type of the argument to f. One day
-		// we will be able to do better. For now, we assume that empty interface is OK
-		// but non-empty interfaces, with Stringer and Error handled above, are errors.
-		return typ.NumMethods() == 0
-
-	case *types.Basic:
-		switch typ.Kind() {
-		case types.UntypedBool,
-			types.Bool:
-			return t&argBool != 0
-
-		case types.UntypedInt,
-			types.Int,
-			types.Int8,
-			types.Int16,
-			types.Int32,
-			types.Int64,
-			types.Uint,
-			types.Uint8,
-			types.Uint16,
-			types.Uint32,
-			types.Uint64,
-			types.Uintptr:
-			return t&argInt != 0
-
-		case types.UntypedFloat,
-			types.Float32,
-			types.Float64:
-			return t&argFloat != 0
-
-		case types.UntypedComplex,
-			types.Complex64,
-			types.Complex128:
-			return t&argComplex != 0
-
-		case types.UntypedString,
-			types.String:
-			return t&argString != 0
-
-		case types.UnsafePointer:
-			return t&(argPointer|argInt) != 0
-
-		case types.UntypedRune:
-			return t&(argInt|argRune) != 0
-
-		case types.UntypedNil:
-			return t&argPointer != 0 // TODO?
-
-		case types.Invalid:
-			if *verbose {
-				f.Warnf(arg.Pos(), "printf argument %v has invalid or unknown type", f.gofmt(arg))
-			}
-			return true // Probably a type check problem.
-		}
-		panic("unreachable")
-	}
-
-	return false
-}
-
-// hasBasicType reports whether x's type is a types.Basic with the given kind.
-func (f *File) hasBasicType(x ast.Expr, kind types.BasicKind) bool {
-	t := f.pkg.types[x].Type
-	if t != nil {
-		t = t.Underlying()
-	}
-	b, ok := t.(*types.Basic)
-	return ok && b.Kind() == kind
-}
-
-// matchStructArgType reports whether all the elements of the struct match the expected
-// type. For instance, with "%d" all the elements must be printable with the "%d" format.
-func (f *File) matchStructArgType(t printfArgType, typ *types.Struct, arg ast.Expr, inProgress map[types.Type]bool) bool {
-	for i := 0; i < typ.NumFields(); i++ {
-		if !f.matchArgTypeInternal(t, typ.Field(i).Type(), arg, inProgress) {
-			return false
-		}
-	}
-	return true
-}
-
-// numArgsInSignature tells how many formal arguments the function type
-// being called has.
-func (f *File) numArgsInSignature(call *ast.CallExpr) int {
-	// Check the type of the function or method declaration
-	typ := f.pkg.types[call.Fun].Type
-	if typ == nil {
-		return 0
-	}
-	// The type must be a signature, but be sure for safety.
-	sig, ok := typ.(*types.Signature)
-	if !ok {
-		return 0
-	}
-	return sig.Params().Len()
-}
-
-// isErrorMethodCall reports whether the call is of a method with signature
-//	func Error() string
-// where "string" is the universe's string type. We know the method is called "Error".
-func (f *File) isErrorMethodCall(call *ast.CallExpr) bool {
-	typ := f.pkg.types[call].Type
-	if typ != nil {
-		// We know it's called "Error", so just check the function signature
-		// (stringerType has exactly one method, String).
-		if stringerType != nil && stringerType.NumMethods() == 1 {
-			return types.Identical(f.pkg.types[call.Fun].Type, stringerType.Method(0).Type())
-		}
-	}
-	// Without types, we can still check by hand.
-	// Is it a selector expression? Otherwise it's a function call, not a method call.
-	sel, ok := call.Fun.(*ast.SelectorExpr)
-	if !ok {
-		return false
-	}
-	// The package is type-checked, so if there are no arguments, we're done.
-	if len(call.Args) > 0 {
-		return false
-	}
-	// Check the type of the method declaration
-	typ = f.pkg.types[sel].Type
-	if typ == nil {
-		return false
-	}
-	// The type must be a signature, but be sure for safety.
-	sig, ok := typ.(*types.Signature)
-	if !ok {
-		return false
-	}
-	// There must be a receiver for it to be a method call. Otherwise it is
-	// a function, not something that satisfies the error interface.
-	if sig.Recv() == nil {
-		return false
-	}
-	// There must be no arguments. Already verified by type checking, but be thorough.
-	if sig.Params().Len() > 0 {
-		return false
-	}
-	// Finally the real questions.
-	// There must be one result.
-	if sig.Results().Len() != 1 {
-		return false
-	}
-	// It must have return type "string" from the universe.
-	return sig.Results().At(0).Type() == types.Typ[types.String]
-}
-
-// hasMethod reports whether the type contains a method with the given name.
-// It is part of the workaround for Formatters and should be deleted when
-// that workaround is no longer necessary.
-// TODO: This could be better once issue 6259 is fixed.
-func (f *File) hasMethod(typ types.Type, name string) bool {
-	// assume we have an addressable variable of type typ
-	obj, _, _ := types.LookupFieldOrMethod(typ, true, f.pkg.typesPkg, name)
-	_, ok := obj.(*types.Func)
-	return ok
-}
diff --git a/src/cmd/vet/unsafeptr.go b/src/cmd/vet/unsafeptr.go
deleted file mode 100644
index 9ca27dc..0000000
--- a/src/cmd/vet/unsafeptr.go
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Check for invalid uintptr -> unsafe.Pointer conversions.
-
-package main
-
-import (
-	"go/ast"
-	"go/token"
-	"go/types"
-)
-
-func init() {
-	register("unsafeptr",
-		"check for misuse of unsafe.Pointer",
-		checkUnsafePointer,
-		callExpr)
-}
-
-func checkUnsafePointer(f *File, node ast.Node) {
-	x := node.(*ast.CallExpr)
-	if len(x.Args) != 1 {
-		return
-	}
-	if f.hasBasicType(x.Fun, types.UnsafePointer) && f.hasBasicType(x.Args[0], types.Uintptr) && !f.isSafeUintptr(x.Args[0]) {
-		f.Badf(x.Pos(), "possible misuse of unsafe.Pointer")
-	}
-}
-
-// isSafeUintptr reports whether x - already known to be a uintptr -
-// is safe to convert to unsafe.Pointer. It is safe if x is itself derived
-// directly from an unsafe.Pointer via conversion and pointer arithmetic
-// or if x is the result of reflect.Value.Pointer or reflect.Value.UnsafeAddr
-// or obtained from the Data field of a *reflect.SliceHeader or *reflect.StringHeader.
-func (f *File) isSafeUintptr(x ast.Expr) bool {
-	switch x := x.(type) {
-	case *ast.ParenExpr:
-		return f.isSafeUintptr(x.X)
-
-	case *ast.SelectorExpr:
-		switch x.Sel.Name {
-		case "Data":
-			// reflect.SliceHeader and reflect.StringHeader are okay,
-			// but only if they are pointing at a real slice or string.
-			// It's not okay to do:
-			//	var x SliceHeader
-			//	x.Data = uintptr(unsafe.Pointer(...))
-			//	... use x ...
-			//	p := unsafe.Pointer(x.Data)
-			// because in the middle the garbage collector doesn't
-			// see x.Data as a pointer and so x.Data may be dangling
-			// by the time we get to the conversion at the end.
-			// For now approximate by saying that *Header is okay
-			// but Header is not.
-			pt, ok := f.pkg.types[x.X].Type.(*types.Pointer)
-			if ok {
-				t, ok := pt.Elem().(*types.Named)
-				if ok && t.Obj().Pkg().Path() == "reflect" {
-					switch t.Obj().Name() {
-					case "StringHeader", "SliceHeader":
-						return true
-					}
-				}
-			}
-		}
-
-	case *ast.CallExpr:
-		switch len(x.Args) {
-		case 0:
-			// maybe call to reflect.Value.Pointer or reflect.Value.UnsafeAddr.
-			sel, ok := x.Fun.(*ast.SelectorExpr)
-			if !ok {
-				break
-			}
-			switch sel.Sel.Name {
-			case "Pointer", "UnsafeAddr":
-				t, ok := f.pkg.types[sel.X].Type.(*types.Named)
-				if ok && t.Obj().Pkg().Path() == "reflect" && t.Obj().Name() == "Value" {
-					return true
-				}
-			}
-
-		case 1:
-			// maybe conversion of uintptr to unsafe.Pointer
-			return f.hasBasicType(x.Fun, types.Uintptr) && f.hasBasicType(x.Args[0], types.UnsafePointer)
-		}
-
-	case *ast.BinaryExpr:
-		switch x.Op {
-		case token.ADD, token.SUB:
-			return f.isSafeUintptr(x.X) && !f.isSafeUintptr(x.Y)
-		}
-	}
-	return false
-}
diff --git a/src/cmd/vet/unused.go b/src/cmd/vet/unused.go
deleted file mode 100644
index df2317a..0000000
--- a/src/cmd/vet/unused.go
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file defines the check for unused results of calls to certain
-// pure functions.
-
-package main
-
-import (
-	"flag"
-	"go/ast"
-	"go/token"
-	"go/types"
-	"strings"
-)
-
-var unusedFuncsFlag = flag.String("unusedfuncs",
-	"errors.New,fmt.Errorf,fmt.Sprintf,fmt.Sprint,sort.Reverse",
-	"comma-separated list of functions whose results must be used")
-
-var unusedStringMethodsFlag = flag.String("unusedstringmethods",
-	"Error,String",
-	"comma-separated list of names of methods of type func() string whose results must be used")
-
-func init() {
-	register("unusedresult",
-		"check for unused result of calls to functions in -unusedfuncs list and methods in -unusedstringmethods list",
-		checkUnusedResult,
-		exprStmt)
-}
-
-// func() string
-var sigNoArgsStringResult = types.NewSignature(nil, nil,
-	types.NewTuple(types.NewVar(token.NoPos, nil, "", types.Typ[types.String])),
-	false)
-
-var unusedFuncs = make(map[string]bool)
-var unusedStringMethods = make(map[string]bool)
-
-func initUnusedFlags() {
-	commaSplit := func(s string, m map[string]bool) {
-		if s != "" {
-			for _, name := range strings.Split(s, ",") {
-				if len(name) == 0 {
-					flag.Usage()
-				}
-				m[name] = true
-			}
-		}
-	}
-	commaSplit(*unusedFuncsFlag, unusedFuncs)
-	commaSplit(*unusedStringMethodsFlag, unusedStringMethods)
-}
-
-func checkUnusedResult(f *File, n ast.Node) {
-	call, ok := unparen(n.(*ast.ExprStmt).X).(*ast.CallExpr)
-	if !ok {
-		return // not a call statement
-	}
-	fun := unparen(call.Fun)
-
-	if f.pkg.types[fun].IsType() {
-		return // a conversion, not a call
-	}
-
-	selector, ok := fun.(*ast.SelectorExpr)
-	if !ok {
-		return // neither a method call nor a qualified ident
-	}
-
-	sel, ok := f.pkg.selectors[selector]
-	if ok && sel.Kind() == types.MethodVal {
-		// method (e.g. foo.String())
-		obj := sel.Obj().(*types.Func)
-		sig := sel.Type().(*types.Signature)
-		if types.Identical(sig, sigNoArgsStringResult) {
-			if unusedStringMethods[obj.Name()] {
-				f.Badf(call.Lparen, "result of (%s).%s call not used",
-					sig.Recv().Type(), obj.Name())
-			}
-		}
-	} else if !ok {
-		// package-qualified function (e.g. fmt.Errorf)
-		obj, _ := f.pkg.uses[selector.Sel]
-		if obj, ok := obj.(*types.Func); ok {
-			qname := obj.Pkg().Path() + "." + obj.Name()
-			if unusedFuncs[qname] {
-				f.Badf(call.Lparen, "result of %v call not used", qname)
-			}
-		}
-	}
-}
diff --git a/src/cmd/vet/vet_test.go b/src/cmd/vet/vet_test.go
deleted file mode 100644
index 9aae8dd..0000000
--- a/src/cmd/vet/vet_test.go
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main_test
-
-import (
-	"bytes"
-	"internal/testenv"
-	"os"
-	"os/exec"
-	"path/filepath"
-	"runtime"
-	"testing"
-)
-
-const (
-	dataDir = "testdata"
-	binary  = "testvet.exe"
-)
-
-// Run this shell script, but do it in Go so it can be run by "go test".
-// 	go build -o testvet
-// 	$(GOROOT)/test/errchk ./testvet -shadow -printfuncs='Warn:1,Warnf:1' testdata/*.go testdata/*.s
-// 	rm testvet
-//
-func TestVet(t *testing.T) {
-	testenv.MustHaveGoBuild(t)
-
-	switch runtime.GOOS {
-	case "plan9", "windows":
-		// Plan 9 and Windows systems can't be guaranteed to have Perl and so can't run errchk.
-		t.Skipf("skipping test; no Perl on %q", runtime.GOOS)
-	}
-
-	// go build
-	cmd := exec.Command("go", "build", "-o", binary)
-	run(cmd, t)
-
-	// defer removal of vet
-	defer os.Remove(binary)
-
-	// errchk ./testvet
-	gos, err := filepath.Glob(filepath.Join(dataDir, "*.go"))
-	if err != nil {
-		t.Fatal(err)
-	}
-	asms, err := filepath.Glob(filepath.Join(dataDir, "*.s"))
-	if err != nil {
-		t.Fatal(err)
-	}
-	files := append(gos, asms...)
-	errchk := filepath.Join(runtime.GOROOT(), "test", "errchk")
-	flags := []string{
-		"./" + binary,
-		"-printfuncs=Warn:1,Warnf:1",
-		"-test", // TODO: Delete once -shadow is part of -all.
-	}
-	cmd = exec.Command(errchk, append(flags, files...)...)
-	if !run(cmd, t) {
-		t.Fatal("vet command failed")
-	}
-}
-
-func run(c *exec.Cmd, t *testing.T) bool {
-	output, err := c.CombinedOutput()
-	os.Stderr.Write(output)
-	if err != nil {
-		t.Fatal(err)
-	}
-	// Errchk delights by not returning non-zero status if it finds errors, so we look at the output.
-	// It prints "BUG" if there is a failure.
-	if !c.ProcessState.Success() {
-		return false
-	}
-	return !bytes.Contains(output, []byte("BUG"))
-}
-
-// TestTags verifies that the -tags argument controls which files to check.
-func TestTags(t *testing.T) {
-	testenv.MustHaveGoBuild(t)
-
-	// go build
-	cmd := exec.Command("go", "build", "-o", binary)
-	run(cmd, t)
-
-	// defer removal of vet
-	defer os.Remove(binary)
-
-	args := []string{
-		"-tags=testtag",
-		"-v", // We're going to look at the files it examines.
-		"testdata/tagtest",
-	}
-	cmd = exec.Command("./"+binary, args...)
-	output, err := cmd.CombinedOutput()
-	if err != nil {
-		t.Fatal(err)
-	}
-	// file1 has testtag and file2 has !testtag.
-	if !bytes.Contains(output, []byte(filepath.Join("tagtest", "file1.go"))) {
-		t.Error("file1 was excluded, should be included")
-	}
-	if bytes.Contains(output, []byte(filepath.Join("tagtest", "file2.go"))) {
-		t.Error("file2 was included, should be excluded")
-	}
-}
diff --git a/src/cmd/vet/whitelist/whitelist.go b/src/cmd/vet/whitelist/whitelist.go
deleted file mode 100644
index bf4b4bf..0000000
--- a/src/cmd/vet/whitelist/whitelist.go
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package whitelist defines exceptions for the vet tool.
-package whitelist // import "cmd/vet/whitelist"
-
-// UnkeyedLiteral are types that are actually slices, but
-// syntactically, we cannot tell whether the Typ in pkg.Typ{1, 2, 3}
-// is a slice or a struct, so we whitelist all the standard package
-// library's exported slice types.
-var UnkeyedLiteral = map[string]bool{
-	/*
-		find $GOROOT/src -type f | grep -v _test.go | xargs grep '^type.*\[\]' | \
-			grep -v ' map\[' | sed 's,/[^/]*go.type,,' | sed 's,.*src/,,' | \
-			sed 's, ,.,' |  sed 's, .*,,' | grep -v '\.[a-z]' | \
-			sort | awk '{ print "\"" $0 "\": true," }'
-	*/
-	"crypto/x509/pkix.RDNSequence":                  true,
-	"crypto/x509/pkix.RelativeDistinguishedNameSET": true,
-	"database/sql.RawBytes":                         true,
-	"debug/macho.LoadBytes":                         true,
-	"encoding/asn1.ObjectIdentifier":                true,
-	"encoding/asn1.RawContent":                      true,
-	"encoding/json.RawMessage":                      true,
-	"encoding/xml.CharData":                         true,
-	"encoding/xml.Comment":                          true,
-	"encoding/xml.Directive":                        true,
-	"go/scanner.ErrorList":                          true,
-	"image/color.Palette":                           true,
-	"net.HardwareAddr":                              true,
-	"net.IP":                                        true,
-	"net.IPMask":                                    true,
-	"sort.Float64Slice":                             true,
-	"sort.IntSlice":                                 true,
-	"sort.StringSlice":                              true,
-	"unicode.SpecialCase":                           true,
-
-	// These image and image/color struct types are frozen. We will never add fields to them.
-	"image/color.Alpha16": true,
-	"image/color.Alpha":   true,
-	"image/color.CMYK":    true,
-	"image/color.Gray16":  true,
-	"image/color.Gray":    true,
-	"image/color.NRGBA64": true,
-	"image/color.NRGBA":   true,
-	"image/color.RGBA64":  true,
-	"image/color.RGBA":    true,
-	"image/color.YCbCr":   true,
-	"image.Point":         true,
-	"image.Rectangle":     true,
-	"image.Uniform":       true,
-}
diff --git a/src/crypto/rand/eagain.go b/src/crypto/rand/eagain.go
deleted file mode 100644
index 2c853d0..0000000
--- a/src/crypto/rand/eagain.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
-
-package rand
-
-import (
-	"os"
-	"syscall"
-)
-
-func init() {
-	isEAGAIN = unixIsEAGAIN
-}
-
-// unixIsEAGAIN reports whether err is a syscall.EAGAIN wrapped in a PathError.
-// See golang.org/issue/9205
-func unixIsEAGAIN(err error) bool {
-	if pe, ok := err.(*os.PathError); ok {
-		if errno, ok := pe.Err.(syscall.Errno); ok && errno == syscall.EAGAIN {
-			return true
-		}
-	}
-	return false
-}
diff --git a/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-AES256-GCM-SHA384 b/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-AES256-GCM-SHA384
deleted file mode 100644
index 52e3bef..0000000
--- a/src/crypto/tls/testdata/Client-TLSv12-ClientCert-RSA-AES256-GCM-SHA384
+++ /dev/null
@@ -1,139 +0,0 @@
->>> Flow 1 (client to server)
-00000000  16 03 01 00 81 01 00 00  7d 03 03 00 00 00 00 00  |........}.......|
-00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
-00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 1e c0 2f  |.............../|
-00000030  c0 2b c0 30 c0 2c c0 11  c0 07 c0 13 c0 09 c0 14  |.+.0.,..........|
-00000040  c0 0a 00 05 00 2f 00 35  c0 12 00 0a 01 00 00 36  |...../.5.......6|
-00000050  00 05 00 05 01 00 00 00  00 00 0a 00 08 00 06 00  |................|
-00000060  17 00 18 00 19 00 0b 00  02 01 00 00 0d 00 0e 00  |................|
-00000070  0c 04 01 04 03 05 01 05  03 02 01 02 03 ff 01 00  |................|
-00000080  01 00 00 12 00 00                                 |......|
->>> Flow 2 (server to client)
-00000000  16 03 03 00 59 02 00 00  55 03 03 74 fe 19 af 4b  |....Y...U..t...K|
-00000010  f3 d8 92 62 5a df 90 2c  cc 09 fd 79 45 26 cd 52  |...bZ..,...yE&.R|
-00000020  9a e6 da 16 99 fe 1d 91  79 a7 a0 20 b3 13 e9 03  |........y.. ....|
-00000030  52 23 5f f0 55 59 f1 9e  00 a7 77 97 90 ed 2b fb  |R#_.UY....w...+.|
-00000040  9c ab fe b1 db ea 16 95  95 68 b0 e9 c0 30 00 00  |.........h...0..|
-00000050  0d ff 01 00 01 00 00 0b  00 04 03 00 01 02 16 03  |................|
-00000060  03 02 be 0b 00 02 ba 00  02 b7 00 02 b4 30 82 02  |.............0..|
-00000070  b0 30 82 02 19 a0 03 02  01 02 02 09 00 85 b0 bb  |.0..............|
-00000080  a4 8a 7f b8 ca 30 0d 06  09 2a 86 48 86 f7 0d 01  |.....0...*.H....|
-00000090  01 05 05 00 30 45 31 0b  30 09 06 03 55 04 06 13  |....0E1.0...U...|
-000000a0  02 41 55 31 13 30 11 06  03 55 04 08 13 0a 53 6f  |.AU1.0...U....So|
-000000b0  6d 65 2d 53 74 61 74 65  31 21 30 1f 06 03 55 04  |me-State1!0...U.|
-000000c0  0a 13 18 49 6e 74 65 72  6e 65 74 20 57 69 64 67  |...Internet Widg|
-000000d0  69 74 73 20 50 74 79 20  4c 74 64 30 1e 17 0d 31  |its Pty Ltd0...1|
-000000e0  30 30 34 32 34 30 39 30  39 33 38 5a 17 0d 31 31  |00424090938Z..11|
-000000f0  30 34 32 34 30 39 30 39  33 38 5a 30 45 31 0b 30  |0424090938Z0E1.0|
-00000100  09 06 03 55 04 06 13 02  41 55 31 13 30 11 06 03  |...U....AU1.0...|
-00000110  55 04 08 13 0a 53 6f 6d  65 2d 53 74 61 74 65 31  |U....Some-State1|
-00000120  21 30 1f 06 03 55 04 0a  13 18 49 6e 74 65 72 6e  |!0...U....Intern|
-00000130  65 74 20 57 69 64 67 69  74 73 20 50 74 79 20 4c  |et Widgits Pty L|
-00000140  74 64 30 81 9f 30 0d 06  09 2a 86 48 86 f7 0d 01  |td0..0...*.H....|
-00000150  01 01 05 00 03 81 8d 00  30 81 89 02 81 81 00 bb  |........0.......|
-00000160  79 d6 f5 17 b5 e5 bf 46  10 d0 dc 69 be e6 2b 07  |y......F...i..+.|
-00000170  43 5a d0 03 2d 8a 7a 43  85 b7 14 52 e7 a5 65 4c  |CZ..-.zC...R..eL|
-00000180  2c 78 b8 23 8c b5 b4 82  e5 de 1f 95 3b 7e 62 a5  |,x.#........;~b.|
-00000190  2c a5 33 d6 fe 12 5c 7a  56 fc f5 06 bf fa 58 7b  |,.3...\zV.....X{|
-000001a0  26 3f b5 cd 04 d3 d0 c9  21 96 4a c7 f4 54 9f 5a  |&?......!.J..T.Z|
-000001b0  bf ef 42 71 00 fe 18 99  07 7f 7e 88 7d 7d f1 04  |..Bq......~.}}..|
-000001c0  39 c4 a2 2e db 51 c9 7c  e3 c0 4c 3b 32 66 01 cf  |9....Q.|..L;2f..|
-000001d0  af b1 1d b8 71 9a 1d db  db 89 6b ae da 2d 79 02  |....q.....k..-y.|
-000001e0  03 01 00 01 a3 81 a7 30  81 a4 30 1d 06 03 55 1d  |.......0..0...U.|
-000001f0  0e 04 16 04 14 b1 ad e2  85 5a cf cb 28 db 69 ce  |.........Z..(.i.|
-00000200  23 69 de d3 26 8e 18 88  39 30 75 06 03 55 1d 23  |#i..&...90u..U.#|
-00000210  04 6e 30 6c 80 14 b1 ad  e2 85 5a cf cb 28 db 69  |.n0l......Z..(.i|
-00000220  ce 23 69 de d3 26 8e 18  88 39 a1 49 a4 47 30 45  |.#i..&...9.I.G0E|
-00000230  31 0b 30 09 06 03 55 04  06 13 02 41 55 31 13 30  |1.0...U....AU1.0|
-00000240  11 06 03 55 04 08 13 0a  53 6f 6d 65 2d 53 74 61  |...U....Some-Sta|
-00000250  74 65 31 21 30 1f 06 03  55 04 0a 13 18 49 6e 74  |te1!0...U....Int|
-00000260  65 72 6e 65 74 20 57 69  64 67 69 74 73 20 50 74  |ernet Widgits Pt|
-00000270  79 20 4c 74 64 82 09 00  85 b0 bb a4 8a 7f b8 ca  |y Ltd...........|
-00000280  30 0c 06 03 55 1d 13 04  05 30 03 01 01 ff 30 0d  |0...U....0....0.|
-00000290  06 09 2a 86 48 86 f7 0d  01 01 05 05 00 03 81 81  |..*.H...........|
-000002a0  00 08 6c 45 24 c7 6b b1  59 ab 0c 52 cc f2 b0 14  |..lE$.k.Y..R....|
-000002b0  d7 87 9d 7a 64 75 b5 5a  95 66 e4 c5 2b 8e ae 12  |...zdu.Z.f..+...|
-000002c0  66 1f eb 4f 38 b3 6e 60  d3 92 fd f7 41 08 b5 25  |f..O8.n`....A..%|
-000002d0  13 b1 18 7a 24 fb 30 1d  ba ed 98 b9 17 ec e7 d7  |...z$.0.........|
-000002e0  31 59 db 95 d3 1d 78 ea  50 56 5c d5 82 5a 2d 5a  |1Y....x.PV\..Z-Z|
-000002f0  5f 33 c4 b6 d8 c9 75 90  96 8c 0f 52 98 b5 cd 98  |_3....u....R....|
-00000300  1f 89 20 5f f2 a0 1c a3  1b 96 94 dd a9 fd 57 e9  |.. _..........W.|
-00000310  70 e8 26 6d 71 99 9b 26  6e 38 50 29 6c 90 a7 bd  |p.&mq..&n8P)l...|
-00000320  d9 16 03 03 00 cd 0c 00  00 c9 03 00 17 41 04 22  |.............A."|
-00000330  84 e9 5e 6e 35 92 a3 83  73 0a d6 0d 1a c1 4d ab  |..^n5...s.....M.|
-00000340  1f ab c2 dc 3f 53 a5 7d  38 c0 92 a4 82 e1 3c c5  |....?S.}8.....<.|
-00000350  24 60 20 a5 3b c5 65 ba  9c f1 b9 a5 b9 c2 70 73  |$` .;.e.......ps|
-00000360  19 74 a6 d1 0f 75 b4 75  e0 e8 60 20 e9 23 fe 04  |.t...u.u..` .#..|
-00000370  01 00 80 92 e0 56 3f 48  0d 10 23 48 b5 95 b6 91  |.....V?H..#H....|
-00000380  3e 8a 2e c7 02 e2 85 0e  59 c8 03 24 d9 1a 1a 25  |>.......Y..$...%|
-00000390  8e 12 bb 0b 83 ac 51 36  81 3f bc 0e be b9 3b 1d  |......Q6.?....;.|
-000003a0  67 56 21 4d 24 36 84 05  61 e7 70 60 d5 8e ae 97  |gV!M$6..a.p`....|
-000003b0  b8 3a d3 b1 94 72 52 cd  b0 0d dd 46 b1 15 3b 58  |.:...rR....F..;X|
-000003c0  c1 a4 63 2c 4c 31 f9 c7  4f 27 c1 0f f0 24 36 72  |..c,L1..O'...$6r|
-000003d0  e0 f8 51 12 86 c2 13 ed  6b 84 a8 15 c3 d0 39 55  |..Q.....k.....9U|
-000003e0  a4 60 50 88 c9 1e 60 60  aa 8d a5 31 3e 35 c3 f8  |.`P...``...1>5..|
-000003f0  2c 90 1c 16 03 03 00 2e  0d 00 00 26 03 01 02 40  |,..........&...@|
-00000400  00 1e 06 01 06 02 06 03  05 01 05 02 05 03 04 01  |................|
-00000410  04 02 04 03 03 01 03 02  03 03 02 01 02 02 02 03  |................|
-00000420  00 00 0e 00 00 00                                 |......|
->>> Flow 3 (client to server)
-00000000  16 03 03 01 fb 0b 00 01  f7 00 01 f4 00 01 f1 30  |...............0|
-00000010  82 01 ed 30 82 01 58 a0  03 02 01 02 02 01 00 30  |...0..X........0|
-00000020  0b 06 09 2a 86 48 86 f7  0d 01 01 05 30 26 31 10  |...*.H......0&1.|
-00000030  30 0e 06 03 55 04 0a 13  07 41 63 6d 65 20 43 6f  |0...U....Acme Co|
-00000040  31 12 30 10 06 03 55 04  03 13 09 31 32 37 2e 30  |1.0...U....127.0|
-00000050  2e 30 2e 31 30 1e 17 0d  31 31 31 32 30 38 30 37  |.0.10...11120807|
-00000060  35 35 31 32 5a 17 0d 31  32 31 32 30 37 30 38 30  |5512Z..121207080|
-00000070  30 31 32 5a 30 26 31 10  30 0e 06 03 55 04 0a 13  |012Z0&1.0...U...|
-00000080  07 41 63 6d 65 20 43 6f  31 12 30 10 06 03 55 04  |.Acme Co1.0...U.|
-00000090  03 13 09 31 32 37 2e 30  2e 30 2e 31 30 81 9c 30  |...127.0.0.10..0|
-000000a0  0b 06 09 2a 86 48 86 f7  0d 01 01 01 03 81 8c 00  |...*.H..........|
-000000b0  30 81 88 02 81 80 4e d0  7b 31 e3 82 64 d9 59 c0  |0.....N.{1..d.Y.|
-000000c0  c2 87 a4 5e 1e 8b 73 33  c7 63 53 df 66 92 06 84  |...^..s3.cS.f...|
-000000d0  f6 64 d5 8f e4 36 a7 1d  2b e8 b3 20 36 45 23 b5  |.d...6..+.. 6E#.|
-000000e0  e3 95 ae ed e0 f5 20 9c  8d 95 df 7f 5a 12 ef 87  |...... .....Z...|
-000000f0  e4 5b 68 e4 e9 0e 74 ec  04 8a 7f de 93 27 c4 01  |.[h...t......'..|
-00000100  19 7a bd f2 dc 3d 14 ab  d0 54 ca 21 0c d0 4d 6e  |.z...=...T.!..Mn|
-00000110  87 2e 5c c5 d2 bb 4d 4b  4f ce b6 2c f7 7e 88 ec  |..\...MKO..,.~..|
-00000120  7c d7 02 91 74 a6 1e 0c  1a da e3 4a 5a 2e de 13  ||...t......JZ...|
-00000130  9c 4c 40 88 59 93 02 03  01 00 01 a3 32 30 30 30  |.L at .Y.......2000|
-00000140  0e 06 03 55 1d 0f 01 01  ff 04 04 03 02 00 a0 30  |...U...........0|
-00000150  0d 06 03 55 1d 0e 04 06  04 04 01 02 03 04 30 0f  |...U..........0.|
-00000160  06 03 55 1d 23 04 08 30  06 80 04 01 02 03 04 30  |..U.#..0.......0|
-00000170  0b 06 09 2a 86 48 86 f7  0d 01 01 05 03 81 81 00  |...*.H..........|
-00000180  36 1f b3 7a 0c 75 c9 6e  37 46 61 2b d5 bd c0 a7  |6..z.u.n7Fa+....|
-00000190  4b cc 46 9a 81 58 7c 85  79 29 c8 c8 c6 67 dd 32  |K.F..X|.y)...g.2|
-000001a0  56 45 2b 75 b6 e9 24 a9  50 9a be 1f 5a fa 1a 15  |VE+u..$.P...Z...|
-000001b0  d9 cc 55 95 72 16 83 b9  c2 b6 8f fd 88 8c 38 84  |..U.r.........8.|
-000001c0  1d ab 5d 92 31 13 4f fd  83 3b c6 9d f1 11 62 b6  |..].1.O..;....b.|
-000001d0  8b ec ab 67 be c8 64 b0  11 50 46 58 17 6b 99 1c  |...g..d..PFX.k..|
-000001e0  d3 1d fc 06 f1 0e e5 96  a8 0c f9 78 20 b7 44 18  |...........x .D.|
-000001f0  51 8d 10 7e 4f 94 67 df  a3 4e 70 73 8e 90 91 85  |Q..~O.g..Nps....|
-00000200  16 03 03 00 46 10 00 00  42 41 04 1e 18 37 ef 0d  |....F...BA...7..|
-00000210  19 51 88 35 75 71 b5 e5  54 5b 12 2e 8f 09 67 fd  |.Q.5uq..T[....g.|
-00000220  a7 24 20 3e b2 56 1c ce  97 28 5e f8 2b 2d 4f 9e  |.$ >.V...(^.+-O.|
-00000230  f1 07 9f 6c 4b 5b 83 56  e2 32 42 e9 58 b6 d7 49  |...lK[.V.2B.X..I|
-00000240  a6 b5 68 1a 41 03 56 6b  dc 5a 89 16 03 03 00 88  |..h.A.Vk.Z......|
-00000250  0f 00 00 84 05 01 00 80  33 bb 8e 67 64 03 e7 7e  |........3..gd..~|
-00000260  be a5 b1 bc cf 7a 07 24  01 17 c3 3d 4b 72 dd c3  |.....z.$...=Kr..|
-00000270  64 a7 36 e8 49 ab b6 87  ce d6 af 9e 07 22 76 e8  |d.6.I........"v.|
-00000280  0d 44 a3 36 c9 eb a4 49  85 cf 72 67 e8 2a a7 5b  |.D.6...I..rg.*.[|
-00000290  d3 f2 46 af 53 48 c6 13  f7 0b 5b 9c c7 4d 3e 05  |..F.SH....[..M>.|
-000002a0  3c 0f 69 a7 40 3a e8 70  04 01 1c 29 b2 42 0f 5f  |<.i.@:.p...).B._|
-000002b0  1c d5 b7 5c c2 17 07 7f  bd a2 b3 9a 95 81 51 24  |...\..........Q$|
-000002c0  54 5c 42 d6 a4 76 c0 d7  54 d2 11 54 bf fd dc a0  |T\B..v..T..T....|
-000002d0  ee 95 26 64 59 a0 fc 51  14 03 03 00 01 01 16 03  |..&dY..Q........|
-000002e0  03 00 28 00 00 00 00 00  00 00 00 af f4 8a be d9  |..(.............|
-000002f0  ff f1 44 e4 41 ab 9b b3  d8 b0 3d 3f 6b c5 1d b6  |..D.A.....=?k...|
-00000300  1d 9e 35 f5 20 f4 2a af  e8 35 77                 |..5. .*..5w|
->>> Flow 4 (server to client)
-00000000  14 03 03 00 01 01 16 03  03 00 28 ff 0d 47 63 2b  |..........(..Gc+|
-00000010  bd 00 3a ad 82 e3 a7 b3  b0 84 4a 26 f4 30 78 20  |..:.......J&.0x |
-00000020  80 f2 2b 15 98 61 1c cb  8b 17 67 8a 11 96 aa 93  |..+..a....g.....|
-00000030  68 f7 fb                                          |h..|
->>> Flow 5 (client to server)
-00000000  17 03 03 00 1e 00 00 00  00 00 00 00 01 a6 8d 7b  |...............{|
-00000010  99 5e a2 e1 95 bb 5f e4  01 f4 0e 20 52 b4 64 4e  |.^...._.... R.dN|
-00000020  86 b1 3f 15 03 03 00 1a  00 00 00 00 00 00 00 02  |..?.............|
-00000030  61 98 eb d0 7c ac bd 00  ac 7a e1 32 20 3e 81 b6  |a...|....z.2 >..|
-00000040  9d d5                                             |..|
diff --git a/src/crypto/tls/testdata/Client-TLSv12-ECDHE-ECDSA-AES256-GCM-SHA384 b/src/crypto/tls/testdata/Client-TLSv12-ECDHE-ECDSA-AES256-GCM-SHA384
deleted file mode 100644
index df2f737..0000000
--- a/src/crypto/tls/testdata/Client-TLSv12-ECDHE-ECDSA-AES256-GCM-SHA384
+++ /dev/null
@@ -1,85 +0,0 @@
->>> Flow 1 (client to server)
-00000000  16 03 01 00 81 01 00 00  7d 03 03 00 00 00 00 00  |........}.......|
-00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
-00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 1e c0 2f  |.............../|
-00000030  c0 2b c0 30 c0 2c c0 11  c0 07 c0 13 c0 09 c0 14  |.+.0.,..........|
-00000040  c0 0a 00 05 00 2f 00 35  c0 12 00 0a 01 00 00 36  |...../.5.......6|
-00000050  00 05 00 05 01 00 00 00  00 00 0a 00 08 00 06 00  |................|
-00000060  17 00 18 00 19 00 0b 00  02 01 00 00 0d 00 0e 00  |................|
-00000070  0c 04 01 04 03 05 01 05  03 02 01 02 03 ff 01 00  |................|
-00000080  01 00 00 12 00 00                                 |......|
->>> Flow 2 (server to client)
-00000000  16 03 03 00 59 02 00 00  55 03 03 11 50 81 a7 ef  |....Y...U...P...|
-00000010  3f bd a5 a9 41 11 e6 86  b2 a3 d8 bf 29 c3 d4 f4  |?...A.......)...|
-00000020  b6 20 2d cb 94 1b 0e dd  99 d1 0b 20 78 92 23 31  |. -........ x.#1|
-00000030  e3 fc 99 67 1f fd f3 2a  fc 9c 4c 74 6e 32 e4 f8  |...g...*..Ltn2..|
-00000040  ed 6d 2e 6d ad a9 a9 bf  63 27 7e 44 c0 2c 00 00  |.m.m....c'~D.,..|
-00000050  0d ff 01 00 01 00 00 0b  00 04 03 00 01 02 16 03  |................|
-00000060  03 02 0e 0b 00 02 0a 00  02 07 00 02 04 30 82 02  |.............0..|
-00000070  00 30 82 01 62 02 09 00  b8 bf 2d 47 a0 d2 eb f4  |.0..b.....-G....|
-00000080  30 09 06 07 2a 86 48 ce  3d 04 01 30 45 31 0b 30  |0...*.H.=..0E1.0|
-00000090  09 06 03 55 04 06 13 02  41 55 31 13 30 11 06 03  |...U....AU1.0...|
-000000a0  55 04 08 13 0a 53 6f 6d  65 2d 53 74 61 74 65 31  |U....Some-State1|
-000000b0  21 30 1f 06 03 55 04 0a  13 18 49 6e 74 65 72 6e  |!0...U....Intern|
-000000c0  65 74 20 57 69 64 67 69  74 73 20 50 74 79 20 4c  |et Widgits Pty L|
-000000d0  74 64 30 1e 17 0d 31 32  31 31 32 32 31 35 30 36  |td0...1211221506|
-000000e0  33 32 5a 17 0d 32 32 31  31 32 30 31 35 30 36 33  |32Z..22112015063|
-000000f0  32 5a 30 45 31 0b 30 09  06 03 55 04 06 13 02 41  |2Z0E1.0...U....A|
-00000100  55 31 13 30 11 06 03 55  04 08 13 0a 53 6f 6d 65  |U1.0...U....Some|
-00000110  2d 53 74 61 74 65 31 21  30 1f 06 03 55 04 0a 13  |-State1!0...U...|
-00000120  18 49 6e 74 65 72 6e 65  74 20 57 69 64 67 69 74  |.Internet Widgit|
-00000130  73 20 50 74 79 20 4c 74  64 30 81 9b 30 10 06 07  |s Pty Ltd0..0...|
-00000140  2a 86 48 ce 3d 02 01 06  05 2b 81 04 00 23 03 81  |*.H.=....+...#..|
-00000150  86 00 04 00 c4 a1 ed be  98 f9 0b 48 73 36 7e c3  |...........Hs6~.|
-00000160  16 56 11 22 f2 3d 53 c3  3b 4d 21 3d cd 6b 75 e6  |.V.".=S.;M!=.ku.|
-00000170  f6 b0 dc 9a df 26 c1 bc  b2 87 f0 72 32 7c b3 64  |.....&.....r2|.d|
-00000180  2f 1c 90 bc ea 68 23 10  7e fe e3 25 c0 48 3a 69  |/....h#.~..%.H:i|
-00000190  e0 28 6d d3 37 00 ef 04  62 dd 0d a0 9c 70 62 83  |.(m.7...b....pb.|
-000001a0  d8 81 d3 64 31 aa 9e 97  31 bd 96 b0 68 c0 9b 23  |...d1...1...h..#|
-000001b0  de 76 64 3f 1a 5c 7f e9  12 0e 58 58 b6 5f 70 dd  |.vd?.\....XX._p.|
-000001c0  9b d8 ea d5 d7 f5 d5 cc  b9 b6 9f 30 66 5b 66 9a  |...........0f[f.|
-000001d0  20 e2 27 e5 bf fe 3b 30  09 06 07 2a 86 48 ce 3d  | .'...;0...*.H.=|
-000001e0  04 01 03 81 8c 00 30 81  88 02 42 01 88 a2 4f eb  |......0...B...O.|
-000001f0  e2 45 c5 48 7d 1b ac f5  ed 98 9d ae 47 70 c0 5e  |.E.H}.......Gp.^|
-00000200  1b b6 2f bd f1 b6 4d b7  61 40 d3 11 a2 ce ee 0b  |../...M.a at ......|
-00000210  7e 92 7e ff 76 9d c3 3b  7e a5 3f ce fa 10 e2 59  |~.~.v..;~.?....Y|
-00000220  ec 47 2d 7c ac da 4e 97  0e 15 a0 6f d0 02 42 01  |.G-|..N....o..B.|
-00000230  4d fc be 67 13 9c 2d 05  0e bd 3f a3 8c 25 c1 33  |M..g..-...?..%.3|
-00000240  13 83 0d 94 06 bb d4 37  7a f6 ec 7a c9 86 2e dd  |.......7z..z....|
-00000250  d7 11 69 7f 85 7c 56 de  fb 31 78 2b e4 c7 78 0d  |..i..|V..1x+..x.|
-00000260  ae cb be 9e 4e 36 24 31  7b 6a 0f 39 95 12 07 8f  |....N6$1{j.9....|
-00000270  2a 16 03 03 00 d7 0c 00  00 d3 03 00 17 41 04 fc  |*............A..|
-00000280  e6 25 27 3c 76 10 a8 9e  d3 a4 a8 68 31 06 85 fc  |.%'<v......h1...|
-00000290  35 2a 76 b3 ad 08 c5 70  ed 3d 61 e0 29 cc 47 52  |5*v....p.=a.).GR|
-000002a0  68 21 ab 48 19 f9 28 ba  54 8c 56 8e b0 7d 55 7f  |h!.H..(.T.V..}U.|
-000002b0  75 f5 42 38 61 ff e2 06  98 1a ae fc bc a0 3a 04  |u.B8a.........:.|
-000002c0  03 00 8a 30 81 87 02 42  01 0c b2 7f c9 d3 1b 83  |...0...B........|
-000002d0  1e 24 a3 d7 1c 81 f0 02  ae ed 42 6f e9 d9 91 4d  |.$........Bo...M|
-000002e0  16 5f aa 8e 5a de 3b 00  0e e6 2d fb 05 30 f3 cf  |._..Z.;...-..0..|
-000002f0  31 a2 ec 99 87 ea 42 03  0a 57 82 e5 12 27 98 8a  |1.....B..W...'..|
-00000300  c6 56 4b 9a 0b d7 37 5f  46 50 02 41 57 61 13 3c  |.VK...7_FP.AWa.<|
-00000310  48 d0 b3 b0 d5 21 72 49  80 7b d7 ef 8f 0d a0 c5  |H....!rI.{......|
-00000320  88 a1 5d ca 61 6d fb 8b  51 15 5d e5 a2 61 c4 78  |..].am..Q.]..a.x|
-00000330  8f d9 e3 78 df 7d a0 8f  0c c0 cc 18 36 41 e6 bb  |...x.}......6A..|
-00000340  6d e3 9d 04 c2 c4 d0 66  35 45 9a 08 b2 16 03 03  |m......f5E......|
-00000350  00 04 0e 00 00 00                                 |......|
->>> Flow 3 (client to server)
-00000000  16 03 03 00 46 10 00 00  42 41 04 1e 18 37 ef 0d  |....F...BA...7..|
-00000010  19 51 88 35 75 71 b5 e5  54 5b 12 2e 8f 09 67 fd  |.Q.5uq..T[....g.|
-00000020  a7 24 20 3e b2 56 1c ce  97 28 5e f8 2b 2d 4f 9e  |.$ >.V...(^.+-O.|
-00000030  f1 07 9f 6c 4b 5b 83 56  e2 32 42 e9 58 b6 d7 49  |...lK[.V.2B.X..I|
-00000040  a6 b5 68 1a 41 03 56 6b  dc 5a 89 14 03 03 00 01  |..h.A.Vk.Z......|
-00000050  01 16 03 03 00 28 00 00  00 00 00 00 00 00 a3 3f  |.....(.........?|
-00000060  be 65 91 cd fe 37 43 e0  ea 6f 15 9d c2 aa 6a 02  |.e...7C..o....j.|
-00000070  20 b8 bc b5 c8 9a 1c d4  c4 e5 9b 2e 39 e7        | ...........9.|
->>> Flow 4 (server to client)
-00000000  14 03 03 00 01 01 16 03  03 00 28 7c b7 1f 13 9e  |..........(|....|
-00000010  21 d2 eb db 32 fc 36 d0  53 e1 11 04 ce d0 61 33  |!...2.6.S.....a3|
-00000020  1e 30 3d 91 c3 6a 0d 98  55 f5 e0 5c ca 77 fa 72  |.0=..j..U..\.w.r|
-00000030  63 6a be                                          |cj.|
->>> Flow 5 (client to server)
-00000000  17 03 03 00 1e 00 00 00  00 00 00 00 01 d9 db db  |................|
-00000010  4b 3a ae 5c a4 dc 96 33  ed b5 a0 70 64 1f 96 2f  |K:.\...3...pd../|
-00000020  b6 cd 1e 15 03 03 00 1a  00 00 00 00 00 00 00 02  |................|
-00000030  18 a0 d1 98 a6 71 c9 56  36 bd 1a 46 4b 5b 45 29  |.....q.V6..FK[E)|
-00000040  1f dd                                             |..|
diff --git a/src/crypto/tls/testdata/Client-TLSv12-SCT b/src/crypto/tls/testdata/Client-TLSv12-SCT
deleted file mode 100644
index 826c9f0..0000000
--- a/src/crypto/tls/testdata/Client-TLSv12-SCT
+++ /dev/null
@@ -1,118 +0,0 @@
->>> Flow 1 (client to server)
-00000000  16 03 01 00 81 01 00 00  7d 03 03 00 00 00 00 00  |........}.......|
-00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
-00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 1e c0 2f  |.............../|
-00000030  c0 2b c0 30 c0 2c c0 11  c0 07 c0 13 c0 09 c0 14  |.+.0.,..........|
-00000040  c0 0a 00 05 00 2f 00 35  c0 12 00 0a 01 00 00 36  |...../.5.......6|
-00000050  00 05 00 05 01 00 00 00  00 00 0a 00 08 00 06 00  |................|
-00000060  17 00 18 00 19 00 0b 00  02 01 00 00 0d 00 0e 00  |................|
-00000070  0c 04 01 04 03 05 01 05  03 02 01 02 03 ff 01 00  |................|
-00000080  01 00 00 12 00 00                                 |......|
->>> Flow 2 (server to client)
-00000000  16 03 03 01 c6 02 00 01  c2 03 03 1b f6 69 c1 c2  |.............i..|
-00000010  36 77 72 32 69 95 c9 e7  db 9b 5d bd 59 ba 08 02  |6wr2i.....].Y...|
-00000020  1e 76 11 c4 8e 49 08 22  8e 8a 5a 20 44 ec d9 13  |.v...I."..Z D...|
-00000030  23 ad 05 45 48 29 00 c6  11 3d 5a 5c a1 ee 34 2b  |#..EH)...=Z\..4+|
-00000040  58 ef 34 5b 7e 42 08 84  23 66 56 ee c0 2f 00 01  |X.4[~B..#fV../..|
-00000050  7a ff 01 00 01 00 00 0b  00 04 03 00 01 02 00 12  |z...............|
-00000060  01 69 01 67 00 75 00 a4  b9 09 90 b4 18 58 14 87  |.i.g.u.......X..|
-00000070  bb 13 a2 cc 67 70 0a 3c  35 98 04 f9 1b df b8 e3  |....gp.<5.......|
-00000080  77 cd 0e c8 0d dc 10 00  00 01 47 97 99 ee 16 00  |w.........G.....|
-00000090  00 04 03 00 46 30 44 02  20 1c 4b 82 5d 95 6e 67  |....F0D. .K.].ng|
-000000a0  5b db 04 95 4b f6 ce f4  32 3e 86 7a 7a 32 ab 18  |[...K...2>.zz2..|
-000000b0  60 74 de 08 da 05 91 4c  2f 02 20 73 54 1b 6e 7f  |`t.....L/. sT.n.|
-000000c0  a1 b0 7d 11 bc e6 f3 85  2f 97 66 1a f7 8a e4 10  |..}...../.f.....|
-000000d0  25 8f 12 f4 6f 39 0f d2  9e 18 f0 00 76 00 68 f6  |%...o9......v.h.|
-000000e0  98 f8 1f 64 82 be 3a 8c  ee b9 28 1d 4c fc 71 51  |...d..:...(.L.qQ|
-000000f0  5d 67 93 d4 44 d1 0a 67  ac bb 4f 4f fb c4 00 00  |]g..D..g..OO....|
-00000100  01 47 97 e1 b5 70 00 00  04 03 00 47 30 45 02 20  |.G...p.....G0E. |
-00000110  32 21 14 38 06 d8 72 2e  00 30 64 1a e2 e8 6d 4e  |2!.8..r..0d...mN|
-00000120  5a e1 d9 42 1e 82 4b 96  25 89 d5 26 13 d3 9c fa  |Z..B..K.%..&....|
-00000130  02 21 00 8f 12 28 64 51  4f 44 d5 8c 18 62 23 b2  |.!...(dQOD...b#.|
-00000140  43 93 33 05 f3 43 55 a1  d9 ee cd c5 71 35 91 dd  |C.3..CU.....q5..|
-00000150  49 d1 0b 00 76 00 ee 4b  bd b7 75 ce 60 ba e1 42  |I...v..K..u.`..B|
-00000160  69 1f ab e1 9e 66 a3 0f  7e 5f b0 72 d8 83 00 c4  |i....f..~_.r....|
-00000170  7b 89 7a a8 fd cb 00 00  01 48 5c 64 8a 87 00 00  |{.z......H\d....|
-00000180  04 03 00 47 30 45 02 20  29 89 d6 b0 53 d3 d2 e9  |...G0E. )...S...|
-00000190  91 bc f1 b5 40 be 1e 2e  e7 5c b4 74 27 ed 8f 9b  |.... at ....\.t'...|
-000001a0  02 e9 fa c2 4c ba a2 be  02 21 00 af 43 64 52 71  |....L....!..CdRq|
-000001b0  15 29 58 40 91 c7 08 16  96 03 a8 73 a5 65 a0 6c  |.)X at .......s.e.l|
-000001c0  b8 48 56 5a b6 29 83 64  6d 2a 9d 16 03 03 02 be  |.HVZ.).dm*......|
-000001d0  0b 00 02 ba 00 02 b7 00  02 b4 30 82 02 b0 30 82  |..........0...0.|
-000001e0  02 19 a0 03 02 01 02 02  09 00 85 b0 bb a4 8a 7f  |................|
-000001f0  b8 ca 30 0d 06 09 2a 86  48 86 f7 0d 01 01 05 05  |..0...*.H.......|
-00000200  00 30 45 31 0b 30 09 06  03 55 04 06 13 02 41 55  |.0E1.0...U....AU|
-00000210  31 13 30 11 06 03 55 04  08 13 0a 53 6f 6d 65 2d  |1.0...U....Some-|
-00000220  53 74 61 74 65 31 21 30  1f 06 03 55 04 0a 13 18  |State1!0...U....|
-00000230  49 6e 74 65 72 6e 65 74  20 57 69 64 67 69 74 73  |Internet Widgits|
-00000240  20 50 74 79 20 4c 74 64  30 1e 17 0d 31 30 30 34  | Pty Ltd0...1004|
-00000250  32 34 30 39 30 39 33 38  5a 17 0d 31 31 30 34 32  |24090938Z..11042|
-00000260  34 30 39 30 39 33 38 5a  30 45 31 0b 30 09 06 03  |4090938Z0E1.0...|
-00000270  55 04 06 13 02 41 55 31  13 30 11 06 03 55 04 08  |U....AU1.0...U..|
-00000280  13 0a 53 6f 6d 65 2d 53  74 61 74 65 31 21 30 1f  |..Some-State1!0.|
-00000290  06 03 55 04 0a 13 18 49  6e 74 65 72 6e 65 74 20  |..U....Internet |
-000002a0  57 69 64 67 69 74 73 20  50 74 79 20 4c 74 64 30  |Widgits Pty Ltd0|
-000002b0  81 9f 30 0d 06 09 2a 86  48 86 f7 0d 01 01 01 05  |..0...*.H.......|
-000002c0  00 03 81 8d 00 30 81 89  02 81 81 00 bb 79 d6 f5  |.....0.......y..|
-000002d0  17 b5 e5 bf 46 10 d0 dc  69 be e6 2b 07 43 5a d0  |....F...i..+.CZ.|
-000002e0  03 2d 8a 7a 43 85 b7 14  52 e7 a5 65 4c 2c 78 b8  |.-.zC...R..eL,x.|
-000002f0  23 8c b5 b4 82 e5 de 1f  95 3b 7e 62 a5 2c a5 33  |#........;~b.,.3|
-00000300  d6 fe 12 5c 7a 56 fc f5  06 bf fa 58 7b 26 3f b5  |...\zV.....X{&?.|
-00000310  cd 04 d3 d0 c9 21 96 4a  c7 f4 54 9f 5a bf ef 42  |.....!.J..T.Z..B|
-00000320  71 00 fe 18 99 07 7f 7e  88 7d 7d f1 04 39 c4 a2  |q......~.}}..9..|
-00000330  2e db 51 c9 7c e3 c0 4c  3b 32 66 01 cf af b1 1d  |..Q.|..L;2f.....|
-00000340  b8 71 9a 1d db db 89 6b  ae da 2d 79 02 03 01 00  |.q.....k..-y....|
-00000350  01 a3 81 a7 30 81 a4 30  1d 06 03 55 1d 0e 04 16  |....0..0...U....|
-00000360  04 14 b1 ad e2 85 5a cf  cb 28 db 69 ce 23 69 de  |......Z..(.i.#i.|
-00000370  d3 26 8e 18 88 39 30 75  06 03 55 1d 23 04 6e 30  |.&...90u..U.#.n0|
-00000380  6c 80 14 b1 ad e2 85 5a  cf cb 28 db 69 ce 23 69  |l......Z..(.i.#i|
-00000390  de d3 26 8e 18 88 39 a1  49 a4 47 30 45 31 0b 30  |..&...9.I.G0E1.0|
-000003a0  09 06 03 55 04 06 13 02  41 55 31 13 30 11 06 03  |...U....AU1.0...|
-000003b0  55 04 08 13 0a 53 6f 6d  65 2d 53 74 61 74 65 31  |U....Some-State1|
-000003c0  21 30 1f 06 03 55 04 0a  13 18 49 6e 74 65 72 6e  |!0...U....Intern|
-000003d0  65 74 20 57 69 64 67 69  74 73 20 50 74 79 20 4c  |et Widgits Pty L|
-000003e0  74 64 82 09 00 85 b0 bb  a4 8a 7f b8 ca 30 0c 06  |td...........0..|
-000003f0  03 55 1d 13 04 05 30 03  01 01 ff 30 0d 06 09 2a  |.U....0....0...*|
-00000400  86 48 86 f7 0d 01 01 05  05 00 03 81 81 00 08 6c  |.H.............l|
-00000410  45 24 c7 6b b1 59 ab 0c  52 cc f2 b0 14 d7 87 9d  |E$.k.Y..R.......|
-00000420  7a 64 75 b5 5a 95 66 e4  c5 2b 8e ae 12 66 1f eb  |zdu.Z.f..+...f..|
-00000430  4f 38 b3 6e 60 d3 92 fd  f7 41 08 b5 25 13 b1 18  |O8.n`....A..%...|
-00000440  7a 24 fb 30 1d ba ed 98  b9 17 ec e7 d7 31 59 db  |z$.0.........1Y.|
-00000450  95 d3 1d 78 ea 50 56 5c  d5 82 5a 2d 5a 5f 33 c4  |...x.PV\..Z-Z_3.|
-00000460  b6 d8 c9 75 90 96 8c 0f  52 98 b5 cd 98 1f 89 20  |...u....R...... |
-00000470  5f f2 a0 1c a3 1b 96 94  dd a9 fd 57 e9 70 e8 26  |_..........W.p.&|
-00000480  6d 71 99 9b 26 6e 38 50  29 6c 90 a7 bd d9 16 03  |mq..&n8P)l......|
-00000490  03 00 cd 0c 00 00 c9 03  00 17 41 04 d7 61 5b 05  |..........A..a[.|
-000004a0  de 22 d3 3d 00 72 a5 be  0a c1 76 94 a1 34 41 6e  |.".=.r....v..4An|
-000004b0  55 f2 74 91 d2 6f 5c 47  87 c8 4b eb ab ab 10 b9  |U.t..o\G..K.....|
-000004c0  f9 0a bc 63 03 5f 90 5b  e3 6f e1 44 97 cc bf d2  |...c._.[.o.D....|
-000004d0  e8 0d f5 9c 2e 9d 07 2c  b2 00 90 0b 04 01 00 80  |.......,........|
-000004e0  67 3d c7 73 42 b9 b2 fd  4b dd 02 57 87 95 20 75  |g=.sB...K..W.. u|
-000004f0  da c1 e7 d3 33 09 01 5d  e9 32 d7 20 7f 92 a9 dd  |....3..].2. ....|
-00000500  bb 17 c5 ee f2 07 b2 04  1d 5e 1f c2 41 66 3f 14  |.........^..Af?.|
-00000510  90 cd 84 ac 49 46 04 3e  ce 89 7d 79 42 2a 8c 56  |....IF.>..}yB*.V|
-00000520  93 d3 9c 3b 57 38 9e 91  af 62 ad 86 40 29 3d 46  |...;W8...b..@)=F|
-00000530  c7 cc f4 3f a1 7d ee 53  3d 94 1c 85 b9 1d a9 5f  |...?.}.S=......_|
-00000540  10 8e ee 38 5e 98 5d 39  31 79 83 cd f9 02 a8 a9  |...8^.]91y......|
-00000550  b8 82 21 33 40 ed 27 54  a3 6e 64 cb e9 ce dd e1  |..!3 at .'T.nd.....|
-00000560  16 03 03 00 04 0e 00 00  00                       |.........|
->>> Flow 3 (client to server)
-00000000  16 03 03 00 46 10 00 00  42 41 04 1e 18 37 ef 0d  |....F...BA...7..|
-00000010  19 51 88 35 75 71 b5 e5  54 5b 12 2e 8f 09 67 fd  |.Q.5uq..T[....g.|
-00000020  a7 24 20 3e b2 56 1c ce  97 28 5e f8 2b 2d 4f 9e  |.$ >.V...(^.+-O.|
-00000030  f1 07 9f 6c 4b 5b 83 56  e2 32 42 e9 58 b6 d7 49  |...lK[.V.2B.X..I|
-00000040  a6 b5 68 1a 41 03 56 6b  dc 5a 89 14 03 03 00 01  |..h.A.Vk.Z......|
-00000050  01 16 03 03 00 28 00 00  00 00 00 00 00 00 60 0e  |.....(........`.|
-00000060  49 99 7a 9f 28 6e 46 03  a8 fd 0e b7 ed bb 9c ba  |I.z.(nF.........|
-00000070  07 9c 4d cc 26 2b c2 70  a0 26 38 a0 f2 a0        |..M.&+.p.&8...|
->>> Flow 4 (server to client)
-00000000  14 03 03 00 01 01 16 03  03 00 28 d2 ef 8f f4 7b  |..........(....{|
-00000010  7a 9b c8 98 a4 36 f2 be  61 46 0e af f4 6f 63 71  |z....6..aF...ocq|
-00000020  6e bd 87 ea 1b f2 95 ad  36 7d a3 52 7f b2 b6 45  |n.......6}.R...E|
-00000030  3f 0b 62                                          |?.b|
->>> Flow 5 (client to server)
-00000000  17 03 03 00 1e 00 00 00  00 00 00 00 01 53 a1 85  |.............S..|
-00000010  ce 3c c1 64 39 80 fb db  67 ec 48 20 7f e9 82 f4  |.<.d9...g.H ....|
-00000020  2d 69 0a 15 03 03 00 1a  00 00 00 00 00 00 00 02  |-i..............|
-00000030  ab 78 11 1b 80 55 23 db  07 c5 7f c3 5e 19 d8 b3  |.x...U#.....^...|
-00000040  f8 c6                                             |..|
diff --git a/src/crypto/tls/testdata/Server-TLSv12-RSA-AES256-GCM-SHA384 b/src/crypto/tls/testdata/Server-TLSv12-RSA-AES256-GCM-SHA384
deleted file mode 100644
index d59645c..0000000
--- a/src/crypto/tls/testdata/Server-TLSv12-RSA-AES256-GCM-SHA384
+++ /dev/null
@@ -1,87 +0,0 @@
->>> Flow 1 (client to server)
-00000000  16 03 01 00 9a 01 00 00  96 03 03 5d 6b 2a ff 74  |...........]k*.t|
-00000010  88 f1 68 8d 1b eb c3 84  34 b5 19 0a 7d f1 9a 0f  |..h.....4...}...|
-00000020  4d c3 0a d7 98 b8 72 e0  73 e4 38 00 00 04 c0 30  |M.....r.s.8....0|
-00000030  00 ff 01 00 00 69 00 0b  00 04 03 00 01 02 00 0a  |.....i..........|
-00000040  00 34 00 32 00 0e 00 0d  00 19 00 0b 00 0c 00 18  |.4.2............|
-00000050  00 09 00 0a 00 16 00 17  00 08 00 06 00 07 00 14  |................|
-00000060  00 15 00 04 00 05 00 12  00 13 00 01 00 02 00 03  |................|
-00000070  00 0f 00 10 00 11 00 0d  00 20 00 1e 06 01 06 02  |......... ......|
-00000080  06 03 05 01 05 02 05 03  04 01 04 02 04 03 03 01  |................|
-00000090  03 02 03 03 02 01 02 02  02 03 00 0f 00 01 01     |...............|
->>> Flow 2 (server to client)
-00000000  16 03 03 00 31 02 00 00  2d 03 03 00 00 00 00 00  |....1...-.......|
-00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
-00000020  00 00 00 00 00 00 00 00  00 00 00 00 c0 30 00 00  |.............0..|
-00000030  05 ff 01 00 01 00 16 03  03 02 71 0b 00 02 6d 00  |..........q...m.|
-00000040  02 6a 00 02 67 30 82 02  63 30 82 01 cc a0 03 02  |.j..g0..c0......|
-00000050  01 02 02 09 00 a2 73 00  0c 81 00 cb f3 30 0d 06  |......s......0..|
-00000060  09 2a 86 48 86 f7 0d 01  01 0b 05 00 30 2b 31 17  |.*.H........0+1.|
-00000070  30 15 06 03 55 04 0a 13  0e 47 6f 6f 67 6c 65 20  |0...U....Google |
-00000080  54 45 53 54 49 4e 47 31  10 30 0e 06 03 55 04 03  |TESTING1.0...U..|
-00000090  13 07 47 6f 20 52 6f 6f  74 30 1e 17 0d 31 35 30  |..Go Root0...150|
-000000a0  31 30 31 30 30 30 30 30  30 5a 17 0d 32 35 30 31  |101000000Z..2501|
-000000b0  30 31 30 30 30 30 30 30  5a 30 26 31 17 30 15 06  |01000000Z0&1.0..|
-000000c0  03 55 04 0a 13 0e 47 6f  6f 67 6c 65 20 54 45 53  |.U....Google TES|
-000000d0  54 49 4e 47 31 0b 30 09  06 03 55 04 03 13 02 47  |TING1.0...U....G|
-000000e0  6f 30 81 9f 30 0d 06 09  2a 86 48 86 f7 0d 01 01  |o0..0...*.H.....|
-000000f0  01 05 00 03 81 8d 00 30  81 89 02 81 81 00 af 87  |.......0........|
-00000100  88 f6 20 1b 95 65 6c 14  ab 44 05 af 3b 45 14 e3  |.. ..el..D..;E..|
-00000110  b7 6d fd 00 63 4d 95 7f  fe 6a 62 35 86 c0 4a f9  |.m..cM...jb5..J.|
-00000120  18 7c f6 aa 25 5e 7a 64  31 66 00 ba f4 8e 92 af  |.|..%^zd1f......|
-00000130  c7 6b d8 76 d4 f3 5f 41  cb 6e 56 15 97 1b 97 c1  |.k.v.._A.nV.....|
-00000140  3c 12 39 21 66 3d 2b 16  d1 bc db 1c c0 a7 da b7  |<.9!f=+.........|
-00000150  ca ad ba da cb d5 21 50  ec de 8d ab d1 6b 81 4b  |......!P.....k.K|
-00000160  89 02 f3 c4 be c1 6c 89  b1 44 84 bd 21 d1 04 7d  |......l..D..!..}|
-00000170  9d 16 4d f9 82 15 f6 ef  fa d6 09 47 f2 fb 02 03  |..M........G....|
-00000180  01 00 01 a3 81 93 30 81  90 30 0e 06 03 55 1d 0f  |......0..0...U..|
-00000190  01 01 ff 04 04 03 02 05  a0 30 1d 06 03 55 1d 25  |.........0...U.%|
-000001a0  04 16 30 14 06 08 2b 06  01 05 05 07 03 01 06 08  |..0...+.........|
-000001b0  2b 06 01 05 05 07 03 02  30 0c 06 03 55 1d 13 01  |+.......0...U...|
-000001c0  01 ff 04 02 30 00 30 19  06 03 55 1d 0e 04 12 04  |....0.0...U.....|
-000001d0  10 12 50 8d 89 6f 1b d1  dc 54 4d 6e cb 69 5e 06  |..P..o...TMn.i^.|
-000001e0  f4 30 1b 06 03 55 1d 23  04 14 30 12 80 10 bf 3d  |.0...U.#..0....=|
-000001f0  b6 a9 66 f2 b8 40 cf ea  b4 03 78 48 1a 41 30 19  |..f.. at ....xH.A0.|
-00000200  06 03 55 1d 11 04 12 30  10 82 0e 65 78 61 6d 70  |..U....0...examp|
-00000210  6c 65 2e 67 6f 6c 61 6e  67 30 0d 06 09 2a 86 48  |le.golang0...*.H|
-00000220  86 f7 0d 01 01 0b 05 00  03 81 81 00 92 7c af 91  |.............|..|
-00000230  55 12 18 96 59 31 a6 48  40 d5 2d d5 ee bb 02 a0  |U...Y1.H at .-.....|
-00000240  f5 c2 1e 7c 9b b3 30 7d  3c dc 76 da 4f 3d c0 fa  |...|..0}<.v.O=..|
-00000250  ae 2d 33 24 6b 03 7b 1b  67 59 11 21 b5 11 bc 77  |.-3$k.{.gY.!...w|
-00000260  b9 d9 e0 6e a8 2d 2e 35  fa 64 5f 22 3e 63 10 6b  |...n.-.5.d_">c.k|
-00000270  be ff 14 86 6d 0d f0 15  31 a8 14 38 1e 3b 84 87  |....m...1..8.;..|
-00000280  2c cb 98 ed 51 76 b9 b1  4f dd db 9b 84 04 86 40  |,...Qv..O......@|
-00000290  fa 51 dd ba b4 8d eb e3  46 de 46 b9 4f 86 c7 f9  |.Q......F.F.O...|
-000002a0  a4 c2 41 34 ac cc f6 ea  b0 ab 39 18 16 03 03 00  |..A4......9.....|
-000002b0  cd 0c 00 00 c9 03 00 17  41 04 1e 18 37 ef 0d 19  |........A...7...|
-000002c0  51 88 35 75 71 b5 e5 54  5b 12 2e 8f 09 67 fd a7  |Q.5uq..T[....g..|
-000002d0  24 20 3e b2 56 1c ce 97  28 5e f8 2b 2d 4f 9e f1  |$ >.V...(^.+-O..|
-000002e0  07 9f 6c 4b 5b 83 56 e2  32 42 e9 58 b6 d7 49 a6  |..lK[.V.2B.X..I.|
-000002f0  b5 68 1a 41 03 56 6b dc  5a 89 05 01 00 80 22 6b  |.h.A.Vk.Z....."k|
-00000300  87 4b f8 ba f2 09 91 ee  ce 81 67 d4 fd d8 b5 07  |.K........g.....|
-00000310  fe c3 88 96 ca e3 3a f0  87 cc ae 44 94 8e 8f 70  |......:....D...p|
-00000320  79 cd de a2 26 4e 17 45  d7 ea 0f 95 a6 c9 7b 17  |y...&N.E......{.|
-00000330  68 7c f5 e8 6c d5 87 6d  5a 7e 53 af 95 0c 42 91  |h|..l..mZ~S...B.|
-00000340  c0 07 18 75 fd 74 1c ad  ef df f8 41 b1 ad fc 36  |...u.t.....A...6|
-00000350  19 31 cf c8 3f 36 55 dd  54 ac 44 a9 3a d1 ae 23  |.1..?6U.T.D.:..#|
-00000360  0a 18 bf b7 6f c7 bc a6  70 50 5e 50 dd da ff 5b  |....o...pP^P...[|
-00000370  67 7d 0a f5 70 a0 8c 88  d9 38 d4 bf a9 c3 16 03  |g}..p....8......|
-00000380  03 00 04 0e 00 00 00                              |.......|
->>> Flow 3 (client to server)
-00000000  16 03 03 00 46 10 00 00  42 41 04 d0 f7 11 ae 9f  |....F...BA......|
-00000010  ec 2e ac 8e 97 6c 58 0e  57 32 8e ac fa 3e af 36  |.....lX.W2...>.6|
-00000020  22 e1 41 2b d3 d1 9c c2  1d 51 c0 e4 20 b3 4c 85  |".A+.....Q.. .L.|
-00000030  b8 bd f2 d1 c6 2f 7d 83  c7 43 d9 31 36 1a 83 ca  |...../}..C.16...|
-00000040  c6 89 f8 ba 8c d1 7e 99  04 6e 92 14 03 03 00 01  |......~..n......|
-00000050  01 16 03 03 00 28 32 67  c1 6e 5e 1e 4b 51 1b 70  |.....(2g.n^.KQ.p|
-00000060  54 b9 1d 69 79 38 bd fa  7c 6b 58 71 af 72 08 2d  |T..iy8..|kXq.r.-|
-00000070  55 df 24 be 5b 41 0a ef  0e 90 cf d9 62 81        |U.$.[A......b.|
->>> Flow 4 (server to client)
-00000000  14 03 03 00 01 01 16 03  03 00 28 00 00 00 00 00  |..........(.....|
-00000010  00 00 00 87 2a 3e 09 54  54 c3 58 c0 5b 7b 91 00  |....*>.TT.X.[{..|
-00000020  c4 07 98 9e de 1f f8 04  bb d7 42 04 55 7d 18 a4  |..........B.U}..|
-00000030  41 7c a6 17 03 03 00 25  00 00 00 00 00 00 00 01  |A|.....%........|
-00000040  ab 23 05 51 b4 60 a2 77  01 58 be a6 9f 89 2b b5  |.#.Q.`.w.X....+.|
-00000050  77 6b 19 23 67 f7 89 f1  ef d6 1b f5 e7 15 03 03  |wk.#g...........|
-00000060  00 1a 00 00 00 00 00 00  00 02 8a bf f0 fb 9f 56  |...............V|
-00000070  36 f1 92 49 a9 e5 40 87  f9 87 9e 4d              |6..I.. at ....M|
diff --git a/src/crypto/tls/testdata/Server-TLSv12-SNI-GetCertificate b/src/crypto/tls/testdata/Server-TLSv12-SNI-GetCertificate
deleted file mode 100644
index 40d3714..0000000
--- a/src/crypto/tls/testdata/Server-TLSv12-SNI-GetCertificate
+++ /dev/null
@@ -1,64 +0,0 @@
->>> Flow 1 (client to server)
-00000000  16 03 01 00 6e 01 00 00  6a 03 03 23 de 75 da 8e  |....n...j..#.u..|
-00000010  0a 4b 7b e4 cb 34 14 83  be d1 6a 95 25 86 f8 91  |.K{..4....j.%...|
-00000020  d8 bb ac 82 9e 19 d6 9f  52 26 f6 00 00 04 00 2f  |........R&...../|
-00000030  00 ff 01 00 00 3d 00 00  00 10 00 0e 00 00 0b 73  |.....=.........s|
-00000040  6e 69 74 65 73 74 2e 63  6f 6d 00 0d 00 20 00 1e  |nitest.com... ..|
-00000050  06 01 06 02 06 03 05 01  05 02 05 03 04 01 04 02  |................|
-00000060  04 03 03 01 03 02 03 03  02 01 02 02 02 03 00 0f  |................|
-00000070  00 01 01                                          |...|
->>> Flow 2 (server to client)
-00000000  16 03 03 00 31 02 00 00  2d 03 03 00 00 00 00 00  |....1...-.......|
-00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
-00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 2f 00 00  |............./..|
-00000030  05 ff 01 00 01 00 16 03  03 02 00 0b 00 01 fc 00  |................|
-00000040  01 f9 00 01 f6 30 82 01  f2 30 82 01 5d a0 03 02  |.....0...0..]...|
-00000050  01 02 02 01 00 30 0b 06  09 2a 86 48 86 f7 0d 01  |.....0...*.H....|
-00000060  01 05 30 28 31 10 30 0e  06 03 55 04 0a 13 07 41  |..0(1.0...U....A|
-00000070  63 6d 65 20 43 6f 31 14  30 12 06 03 55 04 03 13  |cme Co1.0...U...|
-00000080  0b 73 6e 69 74 65 73 74  2e 63 6f 6d 30 1e 17 0d  |.snitest.com0...|
-00000090  31 32 30 34 31 31 31 37  34 30 33 35 5a 17 0d 31  |120411174035Z..1|
-000000a0  33 30 34 31 31 31 37 34  35 33 35 5a 30 28 31 10  |30411174535Z0(1.|
-000000b0  30 0e 06 03 55 04 0a 13  07 41 63 6d 65 20 43 6f  |0...U....Acme Co|
-000000c0  31 14 30 12 06 03 55 04  03 13 0b 73 6e 69 74 65  |1.0...U....snite|
-000000d0  73 74 2e 63 6f 6d 30 81  9d 30 0b 06 09 2a 86 48  |st.com0..0...*.H|
-000000e0  86 f7 0d 01 01 01 03 81  8d 00 30 81 89 02 81 81  |..........0.....|
-000000f0  00 bb 79 d6 f5 17 b5 e5  bf 46 10 d0 dc 69 be e6  |..y......F...i..|
-00000100  2b 07 43 5a d0 03 2d 8a  7a 43 85 b7 14 52 e7 a5  |+.CZ..-.zC...R..|
-00000110  65 4c 2c 78 b8 23 8c b5  b4 82 e5 de 1f 95 3b 7e  |eL,x.#........;~|
-00000120  62 a5 2c a5 33 d6 fe 12  5c 7a 56 fc f5 06 bf fa  |b.,.3...\zV.....|
-00000130  58 7b 26 3f b5 cd 04 d3  d0 c9 21 96 4a c7 f4 54  |X{&?......!.J..T|
-00000140  9f 5a bf ef 42 71 00 fe  18 99 07 7f 7e 88 7d 7d  |.Z..Bq......~.}}|
-00000150  f1 04 39 c4 a2 2e db 51  c9 7c e3 c0 4c 3b 32 66  |..9....Q.|..L;2f|
-00000160  01 cf af b1 1d b8 71 9a  1d db db 89 6b ae da 2d  |......q.....k..-|
-00000170  79 02 03 01 00 01 a3 32  30 30 30 0e 06 03 55 1d  |y......2000...U.|
-00000180  0f 01 01 ff 04 04 03 02  00 a0 30 0d 06 03 55 1d  |..........0...U.|
-00000190  0e 04 06 04 04 01 02 03  04 30 0f 06 03 55 1d 23  |.........0...U.#|
-000001a0  04 08 30 06 80 04 01 02  03 04 30 0b 06 09 2a 86  |..0.......0...*.|
-000001b0  48 86 f7 0d 01 01 05 03  81 81 00 89 c6 45 5f 1c  |H............E_.|
-000001c0  1f 5e f8 eb 1a b1 74 ee  24 39 05 9f 5c 42 59 bb  |.^....t.$9..\BY.|
-000001d0  1a 8d 86 cd b1 d0 56 f5  6a 71 7d a4 0e 95 ab 90  |......V.jq}.....|
-000001e0  f5 9e 8d ea f6 27 c1 57  99 50 94 db 08 02 26 6e  |.....'.W.P....&n|
-000001f0  b3 4f c6 84 2d ea 8a 4b  68 d9 c1 38 91 03 ab 84  |.O..-..Kh..8....|
-00000200  fb 9e 1f 85 d9 b5 d2 3f  f2 31 2c 86 70 fb b5 40  |.......?.1,.p..@|
-00000210  14 82 45 a4 eb af e2 64  d9 0c 8a 4c f4 f8 5b 0f  |..E....d...L..[.|
-00000220  ac 12 ac 2f c4 a3 15 4b  ad 52 46 28 68 af 96 c6  |.../...K.RF(h...|
-00000230  2c 65 25 d6 52 b6 e3 18  45 bd cc 16 03 03 00 04  |,e%.R...E.......|
-00000240  0e 00 00 00                                       |....|
->>> Flow 3 (client to server)
-00000000  16 03 03 00 86 10 00 00  82 00 80 a2 99 61 c5 90  |.............a..|
-00000010  47 1a e7 47 56 51 59 e4  6e ab 82 01 18 78 ee 95  |G..GVQY.n....x..|
-00000020  b8 e2 c7 c7 f9 64 98 dd  84 8d 96 d9 2d 08 62 1e  |.....d......-.b.|
-00000030  4f 29 83 b6 93 68 77 7a  14 1b f0 b3 1a 67 7b 7a  |O)...hwz.....g{z|
-00000040  f9 54 f3 7e 6d eb b6 7a  c9 37 70 6a 83 68 f2 15  |.T.~m..z.7pj.h..|
-00000050  81 07 30 6e b8 fa 19 0e  46 dc d6 9a 4a 8e 8d f1  |..0n....F...J...|
-00000060  05 78 60 75 d4 00 d9 1e  11 5f 16 f7 bc 9f e8 8a  |.x`u....._......|
-00000070  c4 3e bd d9 1a b8 67 50  00 be 5f 43 ee 07 ad be  |.>....gP.._C....|
-00000080  f5 85 67 fc 8f c6 87 47  6d 6e b2 14 03 03 00 01  |..g....Gmn......|
-00000090  01 16 03 03 00 40 91 7d  7b 05 99 48 05 70 a9 67  |..... at .}{..H.p.g|
-000000a0  e9 7a 0a c3 6b bf b0 ad  68 65 17 fb 18 bf 8d bd  |.z..k...he......|
-000000b0  e1 4b 12 bf ea 82 9d a6  1e 3a c8 77 65 32 bd 5e  |.K.......:.we2.^|
-000000c0  c4 46 da e7 e1 ac 09 fe  4a ac bc 57 6a 17 7d dc  |.F......J..Wj.}.|
-000000d0  fe 9c d0 d0 6e fc                                 |....n.|
->>> Flow 4 (server to client)
-00000000  15 03 03 00 02 02 14                              |.......|
diff --git a/src/crypto/tls/testdata/Server-TLSv12-SNI-GetCertificateNotFound b/src/crypto/tls/testdata/Server-TLSv12-SNI-GetCertificateNotFound
deleted file mode 100644
index 904f69e..0000000
--- a/src/crypto/tls/testdata/Server-TLSv12-SNI-GetCertificateNotFound
+++ /dev/null
@@ -1,64 +0,0 @@
->>> Flow 1 (client to server)
-00000000  16 03 01 00 6e 01 00 00  6a 03 03 27 db e3 e8 f4  |....n...j..'....|
-00000010  48 1d 45 d5 20 64 97 b2  20 a6 67 94 7a 1e 87 12  |H.E. d.. .g.z...|
-00000020  25 b1 53 94 27 78 ed ae  58 2f 1b 00 00 04 00 2f  |%.S.'x..X/...../|
-00000030  00 ff 01 00 00 3d 00 00  00 10 00 0e 00 00 0b 73  |.....=.........s|
-00000040  6e 69 74 65 73 74 2e 63  6f 6d 00 0d 00 20 00 1e  |nitest.com... ..|
-00000050  06 01 06 02 06 03 05 01  05 02 05 03 04 01 04 02  |................|
-00000060  04 03 03 01 03 02 03 03  02 01 02 02 02 03 00 0f  |................|
-00000070  00 01 01                                          |...|
->>> Flow 2 (server to client)
-00000000  16 03 03 00 31 02 00 00  2d 03 03 00 00 00 00 00  |....1...-.......|
-00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
-00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 2f 00 00  |............./..|
-00000030  05 ff 01 00 01 00 16 03  03 02 00 0b 00 01 fc 00  |................|
-00000040  01 f9 00 01 f6 30 82 01  f2 30 82 01 5d a0 03 02  |.....0...0..]...|
-00000050  01 02 02 01 00 30 0b 06  09 2a 86 48 86 f7 0d 01  |.....0...*.H....|
-00000060  01 05 30 28 31 10 30 0e  06 03 55 04 0a 13 07 41  |..0(1.0...U....A|
-00000070  63 6d 65 20 43 6f 31 14  30 12 06 03 55 04 03 13  |cme Co1.0...U...|
-00000080  0b 73 6e 69 74 65 73 74  2e 63 6f 6d 30 1e 17 0d  |.snitest.com0...|
-00000090  31 32 30 34 31 31 31 37  34 30 33 35 5a 17 0d 31  |120411174035Z..1|
-000000a0  33 30 34 31 31 31 37 34  35 33 35 5a 30 28 31 10  |30411174535Z0(1.|
-000000b0  30 0e 06 03 55 04 0a 13  07 41 63 6d 65 20 43 6f  |0...U....Acme Co|
-000000c0  31 14 30 12 06 03 55 04  03 13 0b 73 6e 69 74 65  |1.0...U....snite|
-000000d0  73 74 2e 63 6f 6d 30 81  9d 30 0b 06 09 2a 86 48  |st.com0..0...*.H|
-000000e0  86 f7 0d 01 01 01 03 81  8d 00 30 81 89 02 81 81  |..........0.....|
-000000f0  00 bb 79 d6 f5 17 b5 e5  bf 46 10 d0 dc 69 be e6  |..y......F...i..|
-00000100  2b 07 43 5a d0 03 2d 8a  7a 43 85 b7 14 52 e7 a5  |+.CZ..-.zC...R..|
-00000110  65 4c 2c 78 b8 23 8c b5  b4 82 e5 de 1f 95 3b 7e  |eL,x.#........;~|
-00000120  62 a5 2c a5 33 d6 fe 12  5c 7a 56 fc f5 06 bf fa  |b.,.3...\zV.....|
-00000130  58 7b 26 3f b5 cd 04 d3  d0 c9 21 96 4a c7 f4 54  |X{&?......!.J..T|
-00000140  9f 5a bf ef 42 71 00 fe  18 99 07 7f 7e 88 7d 7d  |.Z..Bq......~.}}|
-00000150  f1 04 39 c4 a2 2e db 51  c9 7c e3 c0 4c 3b 32 66  |..9....Q.|..L;2f|
-00000160  01 cf af b1 1d b8 71 9a  1d db db 89 6b ae da 2d  |......q.....k..-|
-00000170  79 02 03 01 00 01 a3 32  30 30 30 0e 06 03 55 1d  |y......2000...U.|
-00000180  0f 01 01 ff 04 04 03 02  00 a0 30 0d 06 03 55 1d  |..........0...U.|
-00000190  0e 04 06 04 04 01 02 03  04 30 0f 06 03 55 1d 23  |.........0...U.#|
-000001a0  04 08 30 06 80 04 01 02  03 04 30 0b 06 09 2a 86  |..0.......0...*.|
-000001b0  48 86 f7 0d 01 01 05 03  81 81 00 89 c6 45 5f 1c  |H............E_.|
-000001c0  1f 5e f8 eb 1a b1 74 ee  24 39 05 9f 5c 42 59 bb  |.^....t.$9..\BY.|
-000001d0  1a 8d 86 cd b1 d0 56 f5  6a 71 7d a4 0e 95 ab 90  |......V.jq}.....|
-000001e0  f5 9e 8d ea f6 27 c1 57  99 50 94 db 08 02 26 6e  |.....'.W.P....&n|
-000001f0  b3 4f c6 84 2d ea 8a 4b  68 d9 c1 38 91 03 ab 84  |.O..-..Kh..8....|
-00000200  fb 9e 1f 85 d9 b5 d2 3f  f2 31 2c 86 70 fb b5 40  |.......?.1,.p..@|
-00000210  14 82 45 a4 eb af e2 64  d9 0c 8a 4c f4 f8 5b 0f  |..E....d...L..[.|
-00000220  ac 12 ac 2f c4 a3 15 4b  ad 52 46 28 68 af 96 c6  |.../...K.RF(h...|
-00000230  2c 65 25 d6 52 b6 e3 18  45 bd cc 16 03 03 00 04  |,e%.R...E.......|
-00000240  0e 00 00 00                                       |....|
->>> Flow 3 (client to server)
-00000000  16 03 03 00 86 10 00 00  82 00 80 72 23 e9 89 70  |...........r#..p|
-00000010  97 02 08 58 0d 28 96 5b  19 73 dd 4f 6e 4c 11 dd  |...X.(.[.s.OnL..|
-00000020  cb 56 14 f4 8f c8 e5 84  03 f5 7e f0 a4 08 44 8c  |.V........~...D.|
-00000030  22 74 01 5c e4 9d e0 38  53 90 66 e3 df bb 09 a8  |"t.\...8S.f.....|
-00000040  11 97 0a 44 01 d2 70 85  14 a1 9a 2f 02 34 40 6d  |...D..p..../.4 at m|
-00000050  66 80 72 9a 97 98 5c 91  0e dc 42 ac c2 90 2f 30  |f.r...\...B.../0|
-00000060  ca 39 25 94 da 6e b6 5f  94 a9 94 66 7f 32 6a bb  |.9%..n._...f.2j.|
-00000070  5d 43 20 c3 74 f7 52 29  1f d5 62 6b a4 a1 8c 25  |]C .t.R)..bk...%|
-00000080  46 69 22 a5 68 54 f4 68  30 e2 52 14 03 03 00 01  |Fi".hT.h0.R.....|
-00000090  01 16 03 03 00 40 51 d2  78 64 e3 59 ee b7 5f 95  |..... at Q.xd.Y.._.|
-000000a0  4c 49 7f 0d 49 3f 55 71  8c 3b 24 e3 81 22 4a d1  |LI..I?Uq.;$.."J.|
-000000b0  ab 84 4e df 02 9d 56 ea  2a 14 71 e1 dc 1d 5c 1d  |..N...V.*.q...\.|
-000000c0  54 ce cb 58 f6 4d e7 73  44 0d 99 95 a5 2d 7c 2f  |T..X.M.sD....-|/|
-000000d0  15 f5 8f fd 97 40                                 |.....@|
->>> Flow 4 (server to client)
-00000000  15 03 03 00 02 02 14                              |.......|
diff --git a/src/crypto/x509/root_bsd.go b/src/crypto/x509/root_bsd.go
deleted file mode 100644
index 9317283..0000000
--- a/src/crypto/x509/root_bsd.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build dragonfly freebsd netbsd openbsd
-
-package x509
-
-// Possible certificate files; stop after finding one.
-var certFiles = []string{
-	"/usr/local/share/certs/ca-root-nss.crt", // FreeBSD/DragonFly
-	"/etc/ssl/cert.pem",                      // OpenBSD
-	"/etc/openssl/certs/ca-certificates.crt", // NetBSD
-}
diff --git a/src/crypto/x509/root_darwin_arm_gen.go b/src/crypto/x509/root_darwin_arm_gen.go
deleted file mode 100644
index 5817158..0000000
--- a/src/crypto/x509/root_darwin_arm_gen.go
+++ /dev/null
@@ -1,191 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-// Generates root_darwin_armx.go.
-//
-// As of iOS 8, there is no API for querying the system trusted X.509 root
-// certificates. We could use SecTrustEvaluate to verify that a trust chain
-// exists for a certificate, but the x509 API requires returning the entire
-// chain.
-//
-// Apple publishes the list of trusted root certificates for iOS on
-// support.apple.com. So we parse the list and extract the certificates from
-// an OS X machine and embed them into the x509 package.
-package main
-
-import (
-	"bytes"
-	"crypto/x509"
-	"encoding/pem"
-	"flag"
-	"fmt"
-	"go/format"
-	"io/ioutil"
-	"log"
-	"math/big"
-	"net/http"
-	"os/exec"
-	"strings"
-)
-
-var output = flag.String("output", "root_darwin_armx.go", "file name to write")
-
-func main() {
-	certs, err := selectCerts()
-	if err != nil {
-		log.Fatal(err)
-	}
-
-	buf := new(bytes.Buffer)
-
-	fmt.Fprintf(buf, "// Created by root_darwin_arm_gen --output %s; DO NOT EDIT\n", *output)
-	fmt.Fprintf(buf, "%s", header)
-
-	fmt.Fprintf(buf, "const systemRootsPEM = `\n")
-	for _, cert := range certs {
-		b := &pem.Block{
-			Type:  "CERTIFICATE",
-			Bytes: cert.Raw,
-		}
-		if err := pem.Encode(buf, b); err != nil {
-			log.Fatal(err)
-		}
-	}
-	fmt.Fprintf(buf, "`")
-
-	source, err := format.Source(buf.Bytes())
-	if err != nil {
-		log.Fatal("source format error:", err)
-	}
-	if err := ioutil.WriteFile(*output, source, 0644); err != nil {
-		log.Fatal(err)
-	}
-}
-
-func selectCerts() ([]*x509.Certificate, error) {
-	ids, err := fetchCertIDs()
-	if err != nil {
-		return nil, err
-	}
-
-	scerts, err := sysCerts()
-	if err != nil {
-		return nil, err
-	}
-
-	var certs []*x509.Certificate
-	for _, id := range ids {
-		sn, ok := big.NewInt(0).SetString(id.serialNumber, 0) // 0x prefix selects hex
-		if !ok {
-			return nil, fmt.Errorf("invalid serial number: %q", id.serialNumber)
-		}
-		ski, ok := big.NewInt(0).SetString(id.subjectKeyID, 0)
-		if !ok {
-			return nil, fmt.Errorf("invalid Subject Key ID: %q", id.subjectKeyID)
-		}
-
-		for _, cert := range scerts {
-			if sn.Cmp(cert.SerialNumber) != 0 {
-				continue
-			}
-			cski := big.NewInt(0).SetBytes(cert.SubjectKeyId)
-			if ski.Cmp(cski) != 0 {
-				continue
-			}
-			certs = append(certs, cert)
-			break
-		}
-	}
-	return certs, nil
-}
-
-func sysCerts() (certs []*x509.Certificate, err error) {
-	cmd := exec.Command("/usr/bin/security", "find-certificate", "-a", "-p", "/System/Library/Keychains/SystemRootCertificates.keychain")
-	data, err := cmd.Output()
-	if err != nil {
-		return nil, err
-	}
-	for len(data) > 0 {
-		var block *pem.Block
-		block, data = pem.Decode(data)
-		if block == nil {
-			break
-		}
-		if block.Type != "CERTIFICATE" || len(block.Headers) != 0 {
-			continue
-		}
-
-		cert, err := x509.ParseCertificate(block.Bytes)
-		if err != nil {
-			continue
-		}
-		certs = append(certs, cert)
-	}
-	return certs, nil
-}
-
-type certID struct {
-	serialNumber string
-	subjectKeyID string
-}
-
-// fetchCertIDs fetches IDs of iOS X509 certificates from apple.com.
-func fetchCertIDs() ([]certID, error) {
-	resp, err := http.Get("https://support.apple.com/en-us/HT204132")
-	if err != nil {
-		return nil, err
-	}
-	defer resp.Body.Close()
-	body, err := ioutil.ReadAll(resp.Body)
-	if err != nil {
-		return nil, err
-	}
-	text := string(body)
-	text = text[strings.Index(text, "<section id=trusted"):]
-	text = text[:strings.Index(text, "</section>")]
-
-	lines := strings.Split(text, "\n")
-	var ids []certID
-	var id certID
-	for i, ln := range lines {
-		if i == len(lines)-1 {
-			break
-		}
-		const sn = "Serial Number:"
-		if ln == sn {
-			id.serialNumber = "0x" + strings.Replace(strings.TrimSpace(lines[i+1]), ":", "", -1)
-			continue
-		}
-		if strings.HasPrefix(ln, sn) {
-			// extract hex value from parentheses.
-			id.serialNumber = ln[strings.Index(ln, "(")+1 : len(ln)-1]
-			continue
-		}
-		if strings.TrimSpace(ln) == "X509v3 Subject Key Identifier:" {
-			id.subjectKeyID = "0x" + strings.Replace(strings.TrimSpace(lines[i+1]), ":", "", -1)
-			ids = append(ids, id)
-			id = certID{}
-		}
-	}
-	return ids, nil
-}
-
-const header = `
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build cgo
-// +build darwin
-// +build arm arm64
-
-package x509
-
-func initSystemRoots() {
-	systemRoots = NewCertPool()
-	systemRoots.AppendCertsFromPEM([]byte(systemRootsPEM))
-}
-`
diff --git a/src/crypto/x509/root_darwin_armx.go b/src/crypto/x509/root_darwin_armx.go
deleted file mode 100644
index 37675b4..0000000
--- a/src/crypto/x509/root_darwin_armx.go
+++ /dev/null
@@ -1,4907 +0,0 @@
-// Created by root_darwin_arm_gen --output root_darwin_armx.go; DO NOT EDIT
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build cgo
-// +build darwin
-// +build arm arm64 ios
-
-package x509
-
-func initSystemRoots() {
-	systemRoots = NewCertPool()
-	systemRoots.AppendCertsFromPEM([]byte(systemRootsPEM))
-}
-
-const systemRootsPEM = `
------BEGIN CERTIFICATE-----
-MIIF8DCCA9igAwIBAgIPBuhGJy8fCo/RhFzjafbVMA0GCSqGSIb3DQEBBQUAMDgx
-CzAJBgNVBAYTAkVTMRQwEgYDVQQKDAtJWkVOUEUgUy5BLjETMBEGA1UEAwwKSXpl
-bnBlLmNvbTAeFw0wNzEyMTMxMzA4MjdaFw0zNzEyMTMwODI3MjVaMDgxCzAJBgNV
-BAYTAkVTMRQwEgYDVQQKDAtJWkVOUEUgUy5BLjETMBEGA1UEAwwKSXplbnBlLmNv
-bTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMnTesoPHqynhugWZWqx
-whtFMnGV2f4QW8yv56V5AY+Jw8ryVXH3d753lPNypCxE2J6SmxQ6oeckkAoKVo7F
-2CaU4dlI4S0+2gpy3aOZFdqBoof0e24md4lYrdbrDLJBenNubdt6eEHpCIgSfocu
-ZhFjbFT7PJ1ywLwu/8K33Q124zrX97RovqL144FuwUZvXY3gTcZUVYkaMzEKsVe5
-o4qYw+w7NMWVQWl+dcI8IMVhulFHoCCQk6GQS/NOfIVFVJrRBSZBsLVNHTO+xAPI
-JXzBcNs79AktVCdIrC/hxKw+yMuSTFM5NyPs0wH54AlETU1kwOENWocivK0bo/4m
-tRXzp/yEGensoYi0RGmEg/OJ0XQGqcwL1sLeJ4VQJsoXuMl6h1YsGgEebL4TrRCs
-tST1OJGh1kva8bvS3ke18byB9llrzxlT6Y0Vy0rLqW9E5RtBz+GGp8rQap+8TI0G
-M1qiheWQNaBiXBZO8OOi+gMatCxxs1gs3nsL2xoP694hHwZ3BgOwye+Z/MC5TwuG
-KP7Suerj2qXDR2kS4Nvw9hmL7Xtw1wLW7YcYKCwEJEx35EiKGsY7mtQPyvp10gFA
-Wo15v4vPS8+qFsGV5K1Mij4XkdSxYuWC5YAEpAN+jb/af6IPl08M0w3719Hlcn4c
-yHf/W5oPt64FRuXxqBbsR6QXAgMBAAGjgfYwgfMwgbAGA1UdEQSBqDCBpYEPaW5m
-b0BpemVucGUuY29tpIGRMIGOMUcwRQYDVQQKDD5JWkVOUEUgUy5BLiAtIENJRiBB
-MDEzMzcyNjAtUk1lcmMuVml0b3JpYS1HYXN0ZWl6IFQxMDU1IEY2MiBTODFDMEEG
-A1UECQw6QXZkYSBkZWwgTWVkaXRlcnJhbmVvIEV0b3JiaWRlYSAxNCAtIDAxMDEw
-IFZpdG9yaWEtR2FzdGVpejAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIB
-BjAdBgNVHQ4EFgQUHRxlDqjyJXu0kc/ksbHmvVV0bAUwDQYJKoZIhvcNAQEFBQAD
-ggIBAMeBRm8hGE+gBe/n1bqXUKJg7aWSFBpSm/nxiEqg3Hh10dUflU7F57dp5iL0
-+CmoKom+z892j+Mxc50m0xwbRxYpB2iEitL7sRskPtKYGCwkjq/2e+pEFhsqxPqg
-l+nqbFik73WrAGLRne0TNtsiC7bw0fRue0aHwp28vb5CO7dz0JoqPLRbEhYArxk5
-ja2DUBzIgU+9Ag89njWW7u/kwgN8KRwCfr00J16vU9adF79XbOnQgxCvv11N75B7
-XSus7Op9ACYXzAJcY9cZGKfsK8eKPlgOiofmg59OsjQerFQJTx0CCzl+gQgVuaBp
-E8gyK+OtbBPWg50jLbJtooiGfqgNASYJQNntKE6MkyQP2/EeTXp6WuKlWPHcj1+Z
-ggwuz7LdmMySlD/5CbOlliVbN/UShUHiGUzGigjB3Bh6Dx4/glmimj4/+eAJn/3B
-kUtdyXvWton83x18hqrNA/ILUpLxYm9/h+qrdslsUMIZgq+qHfUgKGgu1fxkN0/P
-pUTEvnK0jHS0bKf68r10OEMr3q/53NjgnZ/cPcqlY0S/kqJPTIAcuxrDmkoEVU3K
-7iYLHL8CxWTTnn7S05EcS6L1HOUXHA0MUqORH5zwIe0ClG+poEnK6EOMxPQ02nwi
-o8ZmPrgbBYhdurz3vOXcFD2nhqi2WVIhA16L4wTtSyoeo09Q
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEKjCCAxKgAwIBAgIEOGPe+DANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChML
-RW50cnVzdC5uZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBp
-bmNvcnAuIGJ5IHJlZi4gKGxpbWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5
-IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNVBAMTKkVudHJ1c3QubmV0IENlcnRp
-ZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQxNzUwNTFaFw0yOTA3
-MjQxNDE1MTJaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3d3d3
-LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxp
-YWIuKTElMCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEG
-A1UEAxMqRW50cnVzdC5uZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgp
-MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArU1LqRKGsuqjIAcVFmQq
-K0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOLGp18EzoOH1u3Hs/lJBQe
-sYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSrhRSGlVuX
-MlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVT
-XTzWnLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/
-HoZdenoVve8AjhUiVBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH
-4QIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNV
-HQ4EFgQUVeSB0RGAvtiJuQijMfmhJAkWuXAwDQYJKoZIhvcNAQEFBQADggEBADub
-j1abMOdTmXx6eadNl9cZlZD7Bh/KM3xGY4+WZiT6QBshJ8rmcnPyT/4xmf3IDExo
-U8aAghOY+rat2l098c5u9hURlIIM7j+VrxGrD9cv3h8Dj1csHsm7mhpElesYT6Yf
-zX1XEC+bBAlahLVu2B064dae0Wx5XnkcFMXj0EyTO2U87d89vqbllRrDtRnDvV5b
-u/8j72gZyxKTJ1wDLW8w0B62GqzeWvfRqqgnpv55gcR5mTNXuhKwqeBCbJPKVt7+
-bYQLCIt+jerXmCHG8+c8eS9enNFMFY3h7CI3zJpDC5fcgJCNs2ebb0gIFVbPv/Er
-fF6adulZkMV8gzURZVE=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFwTCCA6mgAwIBAgIITrIAZwwDXU8wDQYJKoZIhvcNAQEFBQAwSTELMAkGA1UE
-BhMCQ0gxFTATBgNVBAoTDFN3aXNzU2lnbiBBRzEjMCEGA1UEAxMaU3dpc3NTaWdu
-IFBsYXRpbnVtIENBIC0gRzIwHhcNMDYxMDI1MDgzNjAwWhcNMzYxMDI1MDgzNjAw
-WjBJMQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dpc3NTaWduIEFHMSMwIQYDVQQD
-ExpTd2lzc1NpZ24gUGxhdGludW0gQ0EgLSBHMjCCAiIwDQYJKoZIhvcNAQEBBQAD
-ggIPADCCAgoCggIBAMrfogLi2vj8Bxax3mCq3pZcZB/HL37PZ/pEQtZ2Y5Wu669y
-IIpFR4ZieIbWIDkm9K6j/SPnpZy1IiEZtzeTIsBQnIJ71NUERFzLtMKfkr4k2Htn
-IuJpX+UFeNSH2XFwMyVTtIc7KZAoNppVRDBopIOXfw0enHb/FZ1glwCNioUD7IC+
-6ixuEFGSzH7VozPY1kneWCqv9hbrS3uQMpe5up1Y8fhXSQQeol0GcN1x2/ndi5ob
-jM89o03Oy3z2u5yg+gnOI2Ky6Q0f4nIoj5+saCB9bzuohTEJfwvH6GXp43gOCWcw
-izSC+13gzJ2BbWLuCB4ELE6b7P6pT1/9aXjvCR+htL/68++QHkwFix7qepF6w9fl
-+zC8bBsQWJj3Gl/QKTIDE0ZNYWqFTFJ0LwYfexHihJfGmfNtf9dng34TaNhxKFrY
-zt3oEBSa/m0jh26OWnA81Y0JAKeqvLAxN23IhBQeW71FYyBrS3SMvds6DsHPWhaP
-pZjydomyExI7C3d3rLvlPClKknLKYRorXkzig3R3+jVIeoVNjZpTxN94ypeRSCtF
-KwH3HBqi7Ri6Cr2D+m+8jVeTO9TUps4e8aCxzqv9KyiaTxvXw3LbpMS/XUz13XuW
-ae5ogObnmLo2t/5u7Su9IPhlGdpVCX4l3P5hYnL5fhgC72O00Puv5TtjjGePAgMB
-AAGjgawwgakwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0O
-BBYEFFCvzAeHFUdvOMW0ZdHelarp35zMMB8GA1UdIwQYMBaAFFCvzAeHFUdvOMW0
-ZdHelarp35zMMEYGA1UdIAQ/MD0wOwYJYIV0AVkBAQEBMC4wLAYIKwYBBQUHAgEW
-IGh0dHA6Ly9yZXBvc2l0b3J5LnN3aXNzc2lnbi5jb20vMA0GCSqGSIb3DQEBBQUA
-A4ICAQAIhab1Fgz8RBrBY+D5VUYI/HAcQiiWjrfFwUF1TglxeeVtlspLpYhg0DB0
-uMoI3LQwnkAHFmtllXcBrqS3NQuB2nEVqXQXOHtYyvkv+8Bldo1bAbl93oI9ZLi+
-FHSjClTTLJUYFzX1UWs/j6KWYTl4a0vlpqD4U99REJNi54Av4tHgvI42Rncz7Lj7
-jposiU0xEQ8mngS7twSNC/K5/FqdOxa3L8iYq/6KUFkuozv8KV2LwUvJ4ooTHbG/
-u0IdUt1O2BReEMYxB+9xJ/cbOQncguqLs5WGXv312l0xpuAxtpTmREl0xRbl9x8D
-YSjFyMsSoEJL+WuICI20MhjzdZ/EfwBPBZWcoxcCw7NTm6ogOSkrZvqdr16zktK1
-puEa+S1BaYEUtLS17Yk9zvupnTVCRLEcFHOBzyoBNZox1S2PbYTfgE1X4z/FhHXa
-icYwu+uPyyIIoK6q8QNsOktNCaUOcsZWayFCTiMlFGiudgp8DAdwZPmaL/YFOSbG
-DI8Zf0NebvRbFS/bYV3mZy8/CJT5YLSYMdp08YSTcU1f+2BY0fvEwW2JorsgH51x
-kcsymxM9Pn2SUjWskpSi0xjCfMfqr3YFFt1nJ8J+HAciIfNAChs0B0QTwoRqjt8Z
-Wr9/6x3iGjjRXK9HkmuAtTClyY3YqzGBH9/CZjfTk6mFhnll0g==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFuzCCA6OgAwIBAgIIVwoRl0LE48wwDQYJKoZIhvcNAQELBQAwazELMAkGA1UE
-BhMCSVQxDjAMBgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8w
-MzM1ODUyMDk2NzEnMCUGA1UEAwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290
-IENBMB4XDTExMDkyMjExMjIwMloXDTMwMDkyMjExMjIwMlowazELMAkGA1UEBhMC
-SVQxDjAMBgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8wMzM1
-ODUyMDk2NzEnMCUGA1UEAwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290IENB
-MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAp8bEpSmkLO/lGMWwUKNv
-UTufClrJwkg4CsIcoBh/kbWHuUA/3R1oHwiD1S0eiKD4j1aPbZkCkpAW1V8IbInX
-4ay8IMKx4INRimlNAJZaby/ARH6jDuSRzVju3PvHHkVH3Se5CAGfpiEd9UEtL0z9
-KK3giq0itFZljoZUj5NDKd45RnijMCO6zfB9E1fAXdKDa0hMxKufgFpbOr3JpyI/
-gCczWw63igxdBzcIy2zSekciRDXFzMwujt0q7bd9Zg1fYVEiVRvjRuPjPdA1Yprb
-rxTIW6HMiRvhMCb8oJsfgadHHwTrozmSBp+Z07/T6k9QnBn+locePGX2oxgkg4YQ
-51Q+qDp2JE+BIcXjDwL4k5RHILv+1A7TaLndxHqEguNTVHnd25zS8gebLra8Pu2F
-be8lEfKXGkJh90qX6IuxEAf6ZYGyojnP9zz/GPvG8VqLWeICrHuS0E4UT1lF9gxe
-KF+w6D9Fz8+vm2/7hNN3WpVvrJSEnu68wEqPSpP4RCHiMUVhUE4Q2OM1fEwZtN4F
-v6MGn8i1zeQf1xcGDXqVdFUNaBr8EBtiZJ1t4JWgw5QHVw0U5r0F+7if5t+L4sbn
-fpb2U8WANFAoWPASUHEXMLrmeGO89LKtmyuy/uE5jF66CyCU3nuDuP/jVo23Eek7
-jPKxwV2dpAtMK9myGPW1n0sCAwEAAaNjMGEwHQYDVR0OBBYEFFLYiDrIn3hm7Ynz
-ezhwlMkCAjbQMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUUtiIOsifeGbt
-ifN7OHCUyQICNtAwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBCwUAA4ICAQAL
-e3KHwGCmSUyIWOYdiPcUZEim2FgKDk8TNd81HdTtBjHIgT5q1d07GjLukD0R0i70
-jsNjLiNmsGe+b7bAEzlgqqI0JZN1Ut6nna0Oh4lScWoWPBkdg/iaKWW+9D+a2fDz
-WochcYBNy+A4mz+7+uAwTc+G02UQGRjRlwKxK3JCaKygvU5a2hi/a5iB0P2avl4V
-SM0RFbnAKVy06Ij3Pjaut2L9HmLecHgQHEhb2rykOLpn7VU+Xlff1ANATIGk0k9j
-pwlCCRT8AKnCgHNPLsBA2RF7SOp6AsDT6ygBJlh0wcBzIm2Tlf05fbsq4/aC4yyX
-X04fkZT6/iyj2HYauE2yOE+b+h1IYHkm4vP9qdCa6HCPSXrW5b0KDtst842/6+Ok
-fcvHlXHo2qN8xcL4dJIEG4aspCJTQLas/kx2z/uUMsA1n3Y/buWQbqCmJqK4LL7R
-K4X9p2jIugErsWx0Hbhzlefut8cl8ABMALJ+tguLHPPAUJ4lueAI3jZm/zel0btU
-ZCzJJ7VLkn5l/9Mt4blOvH+kQSGQQXemOR/qnuOf0GZvBeyqdn6/axag67XH/JJU
-LysRJyU3eExRarDzzFhdFPFqSBX/wge2sY0PjlxQRrM9vwGYT7JZVEc+NHt4bVaT
-LnPqZih4zR0Uv6CPLy64Lo7yFIrM6bV8+2ydDKXhlg==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UE
-BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVz
-dCBOZXR3b3JraW5nMB4XDTEwMDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDEL
-MAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZp
-cm1UcnVzdCBOZXR3b3JraW5nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
-AQEAtITMMxcua5Rsa2FSoOujz3mUTOWUgJnLVWREZY9nZOIG41w3SfYvm4SEHi3y
-YJ0wTsyEheIszx6e/jarM3c1RNg1lho9Nuh6DtjVR6FqaYvZ/Ls6rnla1fTWcbua
-kCNrmreIdIcMHl+5ni36q1Mr3Lt2PpNMCAiMHqIjHNRqrSK6mQEubWXLviRmVSRL
-QESxG9fhwoXA3hA/Pe24/PHxI1Pcv2WXb9n5QHGNfb2V1M6+oF4nI979ptAmDgAp
-6zxG8D1gvz9Q0twmQVGeFDdCBKNwV6gbh+0t+nvujArjqWaJGctB+d1ENmHP4ndG
-yH329JKBNv3bNPFyfvMMFr20FQIDAQABo0IwQDAdBgNVHQ4EFgQUBx/S55zawm6i
-QLSwelAQUHTEyL0wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwDQYJ
-KoZIhvcNAQEFBQADggEBAIlXshZ6qML91tmbmzTCnLQyFE2npN/svqe++EPbkTfO
-tDIuUFUaNU52Q3Eg75N3ThVwLofDwR1t3Mu1J9QsVtFSUzpE0nPIxBsFZVpikpzu
-QY0x2+c06lkh1QF612S4ZDnNye2v7UsDSKegmQGA3GWjNq5lWUhPgkvIZfFXHeVZ
-Lgo/bNjR9eUJtGxUAArgFU2HdW23WJZa3W3SAKD0m0i+wzekujbgfIeFlxoVot4u
-olu9rxj5kFDNcFn4J2dHy8egBzp90SxdbBk6ZrV9/ZFvgrG+CJPbFEfxojfHRZ48
-x3evZKiT3/Zpg4Jg8klCNO1aAFSFHBY2kgxc+qatv9s=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEvTCCA6WgAwIBAgIBADANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJFVTEn
-MCUGA1UEChMeQUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQL
-ExpodHRwOi8vd3d3LmNoYW1iZXJzaWduLm9yZzEiMCAGA1UEAxMZQ2hhbWJlcnMg
-b2YgQ29tbWVyY2UgUm9vdDAeFw0wMzA5MzAxNjEzNDNaFw0zNzA5MzAxNjEzNDRa
-MH8xCzAJBgNVBAYTAkVVMScwJQYDVQQKEx5BQyBDYW1lcmZpcm1hIFNBIENJRiBB
-ODI3NDMyODcxIzAhBgNVBAsTGmh0dHA6Ly93d3cuY2hhbWJlcnNpZ24ub3JnMSIw
-IAYDVQQDExlDaGFtYmVycyBvZiBDb21tZXJjZSBSb290MIIBIDANBgkqhkiG9w0B
-AQEFAAOCAQ0AMIIBCAKCAQEAtzZV5aVdGDDg2olUkfzIx1L4L1DZ77F1c2VHfRtb
-unXF/KGIJPov7coISjlUxFF6tdpg6jg8gbLL8bvZkSM/SAFwdakFKq0fcfPJVD0d
-BmpAPrMMhe5cG3nCYsS4No41XQEMIwRHNaqbYE6gZj3LJgqcQKH0XZi/caulAGgq
-7YN6D6IUtdQis4CwPAxaUWktWBiP7Zme8a7ileb2R6jWDA+wWFjbw2Y3npuRVDM3
-0pQcakjJyfKl2qUMI/cjDpwyVV5xnIQFUZot/eZOKjRa3spAN2cMVCFVd9oKDMyX
-roDclDZK9D7ONhMeU+SsTjoF7Nuucpw4i9A5O4kKPnf+dQIBA6OCAUQwggFAMBIG
-A1UdEwEB/wQIMAYBAf8CAQwwPAYDVR0fBDUwMzAxoC+gLYYraHR0cDovL2NybC5j
-aGFtYmVyc2lnbi5vcmcvY2hhbWJlcnNyb290LmNybDAdBgNVHQ4EFgQU45T1sU3p
-26EpW1eLTXYGduHRooowDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIA
-BzAnBgNVHREEIDAegRxjaGFtYmVyc3Jvb3RAY2hhbWJlcnNpZ24ub3JnMCcGA1Ud
-EgQgMB6BHGNoYW1iZXJzcm9vdEBjaGFtYmVyc2lnbi5vcmcwWAYDVR0gBFEwTzBN
-BgsrBgEEAYGHLgoDATA+MDwGCCsGAQUFBwIBFjBodHRwOi8vY3BzLmNoYW1iZXJz
-aWduLm9yZy9jcHMvY2hhbWJlcnNyb290Lmh0bWwwDQYJKoZIhvcNAQEFBQADggEB
-AAxBl8IahsAifJ/7kPMa0QOx7xP5IV8EnNrJpY0nbJaHkb5BkAFyk+cefV/2icZd
-p0AJPaxJRUXcLo0waLIJuvvDL8y6C98/d3tGfToSJI6WjzwFCm/SlCgdbQzALogi
-1djPHRPH8EjX1wWnz8dHnjs8NMiAT9QUu/wNUPf6s+xCX6ndbcj0dc97wXImsQEc
-XCz9ek60AcUFV7nnPKoF2YjpB0ZBzu9Bga5Y34OirsrXdx/nADydb47kMgkdTXg0
-eDQ8lJsm7U9xxhl6vSAiSFr+S30Dt+dYvsYyTnQeaN2oaFuzPu5ifdmA6Ap1erfu
-tGWaIZDgqtCYvDi1czyL+Nw=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEb
-MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow
-GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmlj
-YXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAwMFoXDTI4MTIzMTIzNTk1OVowezEL
-MAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE
-BwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNVBAMM
-GEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEP
-ADCCAQoCggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQua
-BtDFcCLNSS1UY8y2bmhGC1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe
-3M/vg4aijJRPn2jymJBGhCfHdr/jzDUsi14HZGWCwEiwqJH5YZ92IFCokcdmtet4
-YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszWY19zjNoFmag4qMsXeDZR
-rOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjHYpy+g8cm
-ez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQU
-oBEKIz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF
-MAMBAf8wewYDVR0fBHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20v
-QUFBQ2VydGlmaWNhdGVTZXJ2aWNlcy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29t
-b2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2VzLmNybDANBgkqhkiG9w0BAQUF
-AAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm7l3sAg9g1o1Q
-GE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz
-Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2
-G9w84FoVxp7Z8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsi
-l2D4kF501KKaU73yqWjgom7C12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3
-smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCB
-gTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
-A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNV
-BAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjEyMDEwMDAw
-MDBaFw0yOTEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEbMBkGA1UECBMSR3Jl
-YXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFDT01P
-RE8gQ0EgTGltaXRlZDEnMCUGA1UEAxMeQ09NT0RPIENlcnRpZmljYXRpb24gQXV0
-aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ECLi3LjkRv3
-UcEbVASY06m/weaKXTuH+7uIzg3jLz8GlvCiKVCZrts7oVewdFFxze1CkU1B/qnI
-2GqGd0S7WWaXUF601CxwRM/aN5VCaTwwxHGzUvAhTaHYujl8HJ6jJJ3ygxaYqhZ8
-Q5sVW7euNJH+1GImGEaaP+vB+fGQV+useg2L23IwambV4EajcNxo2f8ESIl33rXp
-+2dtQem8Ob0y2WIC8bGoPW43nOIv4tOiJovGuFVDiOEjPqXSJDlqR6sA1KGzqSX+
-DT+nHbrTUcELpNqsOO9VUCQFZUaTNE8tja3G1CEZ0o7KBWFxB3NH5YoZEr0ETc5O
-nKVIrLsm9wIDAQABo4GOMIGLMB0GA1UdDgQWBBQLWOWLxkwVN6RAqTCpIb5HNlpW
-/zAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6g
-PKA6hjhodHRwOi8vY3JsLmNvbW9kb2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9u
-QXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOCAQEAPpiem/Yb6dc5t3iuHXIY
-SdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CPOGEIqB6BCsAv
-IC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/
-RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4
-zJVSk/BwJVmcIGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5dd
-BA6+C4OmF4O5MBKgxTMVBbkN+8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IB
-ZQ==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDcDCCAligAwIBAgIBBTANBgkqhkiG9w0BAQUFADBbMQswCQYDVQQGEwJVUzEY
-MBYGA1UEChMPVS5TLiBHb3Zlcm5tZW50MQwwCgYDVQQLEwNEb0QxDDAKBgNVBAsT
-A1BLSTEWMBQGA1UEAxMNRG9EIFJvb3QgQ0EgMjAeFw0wNDEyMTMxNTAwMTBaFw0y
-OTEyMDUxNTAwMTBaMFsxCzAJBgNVBAYTAlVTMRgwFgYDVQQKEw9VLlMuIEdvdmVy
-bm1lbnQxDDAKBgNVBAsTA0RvRDEMMAoGA1UECxMDUEtJMRYwFAYDVQQDEw1Eb0Qg
-Um9vdCBDQSAyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwCzB9o07
-rP8/PNZxvrh0IgfscEEV/KtA4weqwcPYn/7aTDq/P8jYKHtLNgHArEUlw9IOCo+F
-GGQQPRoTcCpvjtfcjZOzQQ84Ic2tq8I9KgXTVxE3Dc2MUfmT48xGSSGOFLTNyxQ+
-OM1yMe6rEvJl6jQuVl3/7mN1y226kTT8nvP0LRy+UMRC31mI/2qz+qhsPctWcXEF
-lrufgOWARVlnQbDrw61gpIB1BhecDvRD4JkOG/t/9bPMsoGCsf0ywbi+QaRktWA6
-WlEwjM7eQSwZR1xJEGS5dKmHQa99brrBuKG/ZTE6BGf5tbuOkooAY7ix5ow4X4P/
-UNU7ol1rshDMYwIDAQABoz8wPTAdBgNVHQ4EFgQUSXS7DF66ev4CVO97oMaVxgmA
-cJYwCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD
-ggEBAJiRjT+JyLv1wGlzKTs1rLqzCHY9cAmS6YREIQF9FHYb7lFsHY0VNy17MWn0
-mkS4r0bMNPojywMnGdKDIXUr5+AbmSbchECV6KjSzPZYXGbvP0qXEIIdugqi3VsG
-K52nZE7rLgE1pLQ/E61V5NVzqGmbEfGY8jEeb0DU+HifjpGgb3AEkGaqBivO4XqS
-tX3h4NGW56E6LcyxnR8FRO2HmdNNGnA5wQQM5X7Z8a/XIA7xInolpHOZzD+kByeW
-qKKV7YK5FtOeC4fCwfKI9WLfaN/HvGlR7bFc3FRUKQ8JOZqsA8HbDE2ubwp6Fknx
-v5HSOJTT9pUst2zJQraNypCNhdk=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDkjCCAnqgAwIBAgIRAIW9S/PY2uNp9pTXX8OlRCMwDQYJKoZIhvcNAQEFBQAw
-PTELMAkGA1UEBhMCRlIxETAPBgNVBAoTCENlcnRwbHVzMRswGQYDVQQDExJDbGFz
-cyAyIFByaW1hcnkgQ0EwHhcNOTkwNzA3MTcwNTAwWhcNMTkwNzA2MjM1OTU5WjA9
-MQswCQYDVQQGEwJGUjERMA8GA1UEChMIQ2VydHBsdXMxGzAZBgNVBAMTEkNsYXNz
-IDIgUHJpbWFyeSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANxQ
-ltAS+DXSCHh6tlJw/W/uz7kRy1134ezpfgSN1sxvc0NXYKwzCkTsA18cgCSR5aiR
-VhKC9+Ar9NuuYS6JEI1rbLqzAr3VNsVINyPi8Fo3UjMXEuLRYE2+L0ER4/YXJQyL
-kcAbmXuZVg2v7tK8R1fjeUl7NIknJITesezpWE7+Tt9avkGtrAjFGA7v0lPubNCd
-EgETjdyAYveVqUSISnFOYFWe2yMZeVYHDD9jC1yw4r5+FfyUM1hBOHTE4Y+L3yas
-H7WLO7dDWWuwJKZtkIvEcupdM5i3y95ee++U8Rs+yskhwcWYAqqi9lt3m/V+llU0
-HGdpwPFC40es/CgcZlUCAwEAAaOBjDCBiTAPBgNVHRMECDAGAQH/AgEKMAsGA1Ud
-DwQEAwIBBjAdBgNVHQ4EFgQU43Mt38sOKAze3bOkynm4jrvoMIkwEQYJYIZIAYb4
-QgEBBAQDAgEGMDcGA1UdHwQwMC4wLKAqoCiGJmh0dHA6Ly93d3cuY2VydHBsdXMu
-Y29tL0NSTC9jbGFzczIuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQCnVM+IRBnL39R/
-AN9WM2K191EBkOvDP9GIROkkXe/nFL0gt5o8AP5tn9uQ3Nf0YtaLcF3n5QRIqWh8
-yfFC82x/xXp8HVGIutIKPidd3i1RTtMTZGnkLuPT55sJmabglZvOGtd/vjzOUrMR
-FcEPF80Du5wlFbqidon8BvEY0JNLDnyCt6X09l/+7UCmnYR0ObncHoUW2ikbhiMA
-ybuJfm6AiB4vFLQDJKgybwOaRywwvlbGp0ICcBvqQNi6BQNwB6SW//1IMwrh3KWB
-kJtN3X3n57LNXMhqlfil9o3EXXgIvnsG1knPGTZQIy4I5p4FTUcY1Rbpsda2ENW7
-l7+ijrRU
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEPjCCAyagAwIBAgIESlOMKDANBgkqhkiG9w0BAQsFADCBvjELMAkGA1UEBhMC
-VVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50
-cnVzdC5uZXQvbGVnYWwtdGVybXMxOTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3Qs
-IEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25seTEyMDAGA1UEAxMpRW50cnVz
-dCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIwHhcNMDkwNzA3MTcy
-NTU0WhcNMzAxMjA3MTc1NTU0WjCBvjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUVu
-dHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwt
-dGVybXMxOTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0
-aG9yaXplZCB1c2Ugb25seTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmlj
-YXRpb24gQXV0aG9yaXR5IC0gRzIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
-AoIBAQC6hLZy254Ma+KZ6TABp3bqMriVQRrJ2mFOWHLP/vaCeb9zYQYKpSfYs1/T
-RU4cctZOMvJyig/3gxnQaoCAAEUesMfnmr8SVycco2gvCoe9amsOXmXzHHfV1IWN
-cCG0szLni6LVhjkCsbjSR87kyUnEO6fe+1R9V77w6G7CebI6C1XiUJgWMhNcL3hW
-wcKUs/Ja5CeanyTXxuzQmyWC48zCxEXFjJd6BmsqEZ+pCm5IO2/b1BEZQvePB7/1
-U1+cPvQXLOZprE4yTGJ36rfo5bs0vBmLrpxR57d+tVOxMyLlbc9wPBr64ptntoP0
-jaWvYkxN4FisZDQSA/i2jZRjJKRxAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAP
-BgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqciZ60B7vfec7aVHUbI2fkBJmqzAN
-BgkqhkiG9w0BAQsFAAOCAQEAeZ8dlsa2eT8ijYfThwMEYGprmi5ZiXMRrEPR9RP/
-jTkrwPK9T3CMqS/qF8QLVJ7UG5aYMzyorWKiAHarWWluBh1+xLlEjZivEtRh2woZ
-Rkfz6/djwUAFQKXSt/S1mja/qYh2iARVBCuch38aNzx+LaUa2NSJXsq9rD1s2G2v
-1fN2D807iDginWyTmsQ9v4IbZT+mD12q/OWyFcq1rca8PdCE6OoGcrBNOTJ4vz4R
-nAuknZoh8/CbCzB428Hch0P+vGOaysXCHMnHjf87ElgI5rY97HosTvuDls4MPGmH
-VHOkc8KT/1EQrBVUAdj8BbGJoX90g5pJ19xOe4pIb4tF9g==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIID9jCCAt6gAwIBAgIQZIKe/DcedF38l/+XyLH/QTANBgkqhkiG9w0BAQsFADCB
-lDELMAkGA1UEBhMCVVMxHTAbBgNVBAoTFFN5bWFudGVjIENvcnBvcmF0aW9uMR8w
-HQYDVQQLExZTeW1hbnRlYyBUcnVzdCBOZXR3b3JrMUUwQwYDVQQDEzxTeW1hbnRl
-YyBDbGFzcyAyIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5
-IC0gRzYwHhcNMTExMDE4MDAwMDAwWhcNMzcxMjAxMjM1OTU5WjCBlDELMAkGA1UE
-BhMCVVMxHTAbBgNVBAoTFFN5bWFudGVjIENvcnBvcmF0aW9uMR8wHQYDVQQLExZT
-eW1hbnRlYyBUcnVzdCBOZXR3b3JrMUUwQwYDVQQDEzxTeW1hbnRlYyBDbGFzcyAy
-IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzYwggEi
-MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDNzOkFyGOFyz9AYxe9GPo15gRn
-V2WYKaRPyVyPDzTS+NqoE2KquB5QZ3iwFkygOakVeq7t0qLA8JA3KRgmXOgNPLZs
-ST/B4NzZS7YUGQum05bh1gnjGSYc+R9lS/kaQxwAg9bQqkmi1NvmYji6UBRDbfkx
-+FYW2TgCkc/rbN27OU6Z4TBnRfHU8I3D3/7yOAchfQBeVkSz5GC9kSucq1sEcg+y
-KNlyqwUgQiWpWwNqIBDMMfAr2jUs0Pual07wgksr2F82owstr2MNHSV/oW5cYqGN
-KD6h/Bwg+AEvulWaEbAZ0shQeWsOagXXqgQ2sqPy4V93p3ec5R7c6d9qwWVdAgMB
-AAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQW
-BBSHjCCVyJhK0daABkqQNETfHE2/sDANBgkqhkiG9w0BAQsFAAOCAQEAgY6ypWaW
-tyGltu9vI1pf24HFQqV4wWn99DzX+VxrcHIa/FqXTQCAiIiCisNxDY7FiZss7Y0L
-0nJU9X3UXENX6fOupQIR9nYrgVfdfdp0MP1UR/bgFm6mtApI5ud1Bw8pGTnOefS2
-bMVfmdUfS/rfbSw8DVSAcPCIC4DPxmiiuB1w2XaM/O6lyc+tHc+ZJVdaYkXLFmu9
-Sc2lo4xpeSWuuExsi0BmSxY/zwIa3eFsawdhanYVKZl/G92IgMG/tY9zxaaWI4Sm
-KIYkM2oBLldzJbZev4/mHWGoQClnHYebHX+bn5nNMdZUvmK7OaxoEkiRIKXLsd3+
-b/xa5IJVWa8xqQ==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEdDCCA1ygAwIBAgIQRL4Mi1AAJLQR0zYq/mUK/TANBgkqhkiG9w0BAQUFADCB
-lzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug
-Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho
-dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3Qt
-SGFyZHdhcmUwHhcNOTkwNzA5MTgxMDQyWhcNMTkwNzA5MTgxOTIyWjCBlzELMAkG
-A1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEe
-MBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8v
-d3d3LnVzZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdh
-cmUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCx98M4P7Sof885glFn
-0G2f0v9Y8+efK+wNiVSZuTiZFvfgIXlIwrthdBKWHTxqctU8EGc6Oe0rE81m65UJ
-M6Rsl7HoxuzBdXmcRl6Nq9Bq/bkqVRcQVLMZ8Jr28bFdtqdt++BxF2uiiPsA3/4a
-MXcMmgF6sTLjKwEHOG7DpV4jvEWbe1DByTCP2+UretNb+zNAHqDVmBe8i4fDidNd
-oI6yqqr2jmmIBsX6iSHzCJ1pLgkzmykNRg+MzEk0sGlRvfkGzWitZky8PqxhvQqI
-DsjfPe58BEydCl5rkdbux+0ojatNh4lz0G6k0B4WixThdkQDf2Os5M1JnMWS9Ksy
-oUhbAgMBAAGjgbkwgbYwCwYDVR0PBAQDAgHGMA8GA1UdEwEB/wQFMAMBAf8wHQYD
-VR0OBBYEFKFyXyYbKJhDlV0HN9WFlp1L0sNFMEQGA1UdHwQ9MDswOaA3oDWGM2h0
-dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9VVE4tVVNFUkZpcnN0LUhhcmR3YXJlLmNy
-bDAxBgNVHSUEKjAoBggrBgEFBQcDAQYIKwYBBQUHAwUGCCsGAQUFBwMGBggrBgEF
-BQcDBzANBgkqhkiG9w0BAQUFAAOCAQEARxkP3nTGmZev/K0oXnWO6y1n7k57K9cM
-//bey1WiCuFMVGWTYGufEpytXoMs61quwOQt9ABjHbjAbPLPSbtNk28Gpgoiskli
-CE7/yMgUsogWXecB5BKV5UU0s4tpvc+0hY91UZ59Ojg6FEgSxvunOxqNDYJAB+gE
-CJChicsZUN/KHAG8HQQZexB2lzvukJDKxA4fFm517zP4029bHpbj4HR3dHuKom4t
-3XbWOTCC8KucUvIqx69JXn7HaOWCgchqJ/kniCrVWFCVH/A7HFe7fRQ5YiuayZSS
-KqMiDP+JJn1fIytH1xUdqWqeUQ0qUZ6B+dQ7XnASfxAynB67nfhmqA==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDojCCAoqgAwIBAgIQE4Y1TR0/BvLB+WUF1ZAcYjANBgkqhkiG9w0BAQUFADBr
-MQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRl
-cm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNv
-bW1lcmNlIFJvb3QwHhcNMDIwNjI2MDIxODM2WhcNMjIwNjI0MDAxNjEyWjBrMQsw
-CQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRlcm5h
-dGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNvbW1l
-cmNlIFJvb3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvV95WHm6h
-2mCxlCfLF9sHP4CFT8icttD0b0/Pmdjh28JIXDqsOTPHH2qLJj0rNfVIsZHBAk4E
-lpF7sDPwsRROEW+1QK8bRaVK7362rPKgH1g/EkZgPI2h4H3PVz4zHvtH8aoVlwdV
-ZqW1LS7YgFmypw23RuwhY/81q6UCzyr0TP579ZRdhE2o8mCP2w4lPJ9zcc+U30rq
-299yOIzzlr3xF7zSujtFWsan9sYXiwGd/BmoKoMWuDpI/k4+oKsGGelT84ATB+0t
-vz8KPFUgOSwsAGl0lUq8ILKpeeUYiZGo3BxN77t+Nwtd/jmliFKMAGzsGHxBvfaL
-dXe6YJ2E5/4tAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQD
-AgEGMB0GA1UdDgQWBBQVOIMPPyw/cDMezUb+B4wg4NfDtzANBgkqhkiG9w0BAQUF
-AAOCAQEAX/FBfXxcCLkr4NWSR/pnXKUTwwMhmytMiUbPWU3J/qVAtmPN3XEolWcR
-zCSs00Rsca4BIGsDoo8Ytyk6feUWYFN4PMCvFYP3j1IzJL1kk5fui/fbGKhtcbP3
-LBfQdCVp9/5rPJS+TUtBjE7ic9DjkCJzQ83z7+pzzkWKsKZJ/0x9nXGIxHYdkFsd
-7v3M9+79YKWxehZx0RbQfBI8bGmX265fOZpwLwU8GUYEmSA20GBuYQa7FkKMcPcw
-++DbZqMAAb3mLNqRX6BGi01qnD093QVG/na/oAo85ADmJ7f/hC3euiInlhBx6yLt
-398znM/jra6O1I7mT1GvFpLgXPYHDw==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFpDCCA4ygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEc
-MBoGA1UEChMTQW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBP
-bmxpbmUgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAyMB4XDTAyMDUyODA2
-MDAwMFoXDTM3MDkyOTE0MDgwMFowYzELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0Ft
-ZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2EgT25saW5lIFJvb3Qg
-Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIP
-ADCCAgoCggIBAMxBRR3pPU0Q9oyxQcngXssNt79Hc9PwVU3dxgz6sWYFas14tNwC
-206B89enfHG8dWOgXeMHDEjsJcQDIPT/DjsS/5uN4cbVG7RtIuOx238hZK+GvFci
-KtZHgVdEglZTvYYUAQv8f3SkWq7xuhG1m1hagLQ3eAkzfDJHA1zEpYNI9FdWboE2
-JxhP7JsowtS013wMPgwr38oE18aO6lhOqKSlGBxsRZijQdEt0sdtjRnxrXm3gT+9
-BoInLRBYBbV4Bbkv2wxrkJB+FFk4u5QkE+XRnRTf04JNRvCAOVIyD+OEsnpD8l7e
-Xz8d3eOyG6ChKiMDbi4BFYdcpnV1x5dhvt6G3NRI270qv0pV2uh9UPu0gBe4lL8B
-PeraunzgWGcXuVjgiIZGZ2ydEEdYMtA1fHkqkKJaEBEjNa0vzORKW6fIJ/KD3l67
-Xnfn6KVuY8INXWHQjNJsWiEOyiijzirplcdIz5ZvHZIlyMbGwcEMBawmxNJ10uEq
-Z8A9W6Wa6897GqidFEXlD6CaZd4vKL3Ob5Rmg0gp2OpljK+T2WSfVVcmv2/LNzGZ
-o2C7HK2JNDJiuEMhBnIMoVxtRsX6Kc8w3onccVvdtjc+31D1uAclJuW8tf48ArO3
-+L5DwYcRlJ4jbBeKuIonDFRH8KmzwICMoCfrHRnjB453cMor9H124HhnAgMBAAGj
-YzBhMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFE1FwWg4u3OpaaEg5+31IqEj
-FNeeMB8GA1UdIwQYMBaAFE1FwWg4u3OpaaEg5+31IqEjFNeeMA4GA1UdDwEB/wQE
-AwIBhjANBgkqhkiG9w0BAQUFAAOCAgEAZ2sGuV9FOypLM7PmG2tZTiLMubekJcmn
-xPBUlgtk87FYT15R/LKXeydlwuXK5w0MJXti4/qftIe3RUavg6WXSIylvfEWK5t2
-LHo1YGwRgJfMqZJS5ivmae2p+DYtLHe/YUjRYwu5W1LtGLBDQiKmsXeu3mnFzccc
-obGlHBD7GL4acN3Bkku+KVqdPzW+5X1R+FXgJXUjhx5c3LqdsKyzadsXg8n33gy8
-CNyRnqjQ1xU3c6U1uPx+xURABsPr+CKAXEfOAuMRn0T//ZoyzH1kUQ7rVyZ2OuMe
-IjzCpjbdGe+n/BLzJsBZMYVMnNjP36TMzCmT/5RtdlwTCJfy7aULTd3oyWgOZtMA
-DjMSW7yV5TKQqLPGbIOtd+6Lfn6xqavT4fG2wLHqiMDn05DpKJKUe2h7lyoKZy2F
-AjgQ5ANh1NolNscIWC2hp1GvMApJ9aZphwctREZ2jirlmjvXGKL8nDgQzMY70rUX
-Om/9riW99XJZZLF0KjhfGEzfz3EEWjbUvy+ZnOjZurGV5gJLIaFb1cFPj65pbVPb
-AZO1XB4Y3WRayhgoPmMEEf0cjQAPuDffZ4qdZqkCapH/E8ovXYO8h5Ns3CRRFgQl
-Zvqz2cK6Kb6aSDiCmfS/O0oxGfm/jiEzFMpPVF/7zvuPcX/9XhmgD0uRuMRUvAaw
-RY8mkaKO/qk=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIECjCCAvKgAwIBAgIJAMJ+QwRORz8ZMA0GCSqGSIb3DQEBCwUAMIGCMQswCQYD
-VQQGEwJIVTERMA8GA1UEBwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0
-ZC4xJzAlBgNVBAMMHk1pY3Jvc2VjIGUtU3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0G
-CSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5odTAeFw0wOTA2MTYxMTMwMThaFw0y
-OTEyMzAxMTMwMThaMIGCMQswCQYDVQQGEwJIVTERMA8GA1UEBwwIQnVkYXBlc3Qx
-FjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jvc2VjIGUtU3pp
-Z25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5o
-dTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOn4j/NjrdqG2KfgQvvP
-kd6mJviZpWNwrZuuyjNAfW2WbqEORO7hE52UQlKavXWFdCyoDh2Tthi3jCyoz/tc
-cbna7P7ofo/kLx2yqHWH2Leh5TvPmUpG0IMZfcChEhyVbUr02MelTTMuhTlAdX4U
-fIASmFDHQWe4oIBhVKZsTh/gnQ4H6cm6M+f+wFUoLAKApxn1ntxVUwOXewdI/5n7
-N4okxFnMUBBjjqqpGrCEGob5X7uxUG6k0QrM1XF+H6cbfPVTbiJfyyvm1HxdrtbC
-xkzlBQHZ7Vf8wSN5/PrIJIOV87VqUQHQd9bpEqH5GoP7ghu5sJf0dgYzQ0mg/wu1
-+rUCAwEAAaOBgDB+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0G
-A1UdDgQWBBTLD8bfQkPMPcu1SCOhGnqmKrs0aDAfBgNVHSMEGDAWgBTLD8bfQkPM
-Pcu1SCOhGnqmKrs0aDAbBgNVHREEFDASgRBpbmZvQGUtc3ppZ25vLmh1MA0GCSqG
-SIb3DQEBCwUAA4IBAQDJ0Q5eLtXMs3w+y/w9/w0olZMEyL/azXm4Q5DwpL7v8u8h
-mLzU1F0G9u5C7DBsoKqpyvGvivo/C3NqPuouQH4frlRheesuCDfXI/OMn74dseGk
-ddug4lQUsbocKaQY9hK6ohQU4zE1yED/t+AFdlfBHFny+L/k7SViXITwfn4fs775
-tyERzAMBVnCnEJIeGzSBHq2cGsMEPO0CYdYeBvNfOofyK/FFh+U9rNHHV4S9a67c
-2Pm2G2JwCz02yULyMtd6YebS2z3PyKnJm9zbWETXbzivf3jTo60adbocwTZ8jx5t
-HMN1Rq41Bab2XD0h7lbwyYIiLXpUq3DDfSJlgnCW
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIHqTCCBZGgAwIBAgIQYwaGp8U3ZaVDkKhqWMzUMjANBgkqhkiG9w0BAQUFADCB
-jzELMAkGA1UEBhMCTFYxNTAzBgNVBAoTLFZBUyBMYXR2aWphcyBQYXN0cyAtIFZp
-ZW4ucmVnLk5yLjQwMDAzMDUyNzkwMSMwIQYDVQQLExpTZXJ0aWZpa2FjaWphcyBw
-YWthbHBvanVtaTEkMCIGA1UEAxMbVkFTIExhdHZpamFzIFBhc3RzIFNTSShSQ0Ep
-MB4XDTA2MDkxMzA5MjIxMFoXDTI0MDkxMzA5Mjc1N1owgY8xCzAJBgNVBAYTAkxW
-MTUwMwYDVQQKEyxWQVMgTGF0dmlqYXMgUGFzdHMgLSBWaWVuLnJlZy5Oci40MDAw
-MzA1Mjc5MDEjMCEGA1UECxMaU2VydGlmaWthY2lqYXMgcGFrYWxwb2p1bWkxJDAi
-BgNVBAMTG1ZBUyBMYXR2aWphcyBQYXN0cyBTU0koUkNBKTCCAiIwDQYJKoZIhvcN
-AQEBBQADggIPADCCAgoCggIBAJu4+f1hVS9PpKUUtS6OuSSPrPuxVD9A/0/F5YZo
-e1OT+zWCNahQLpRSoNuDPnXaFXCsCc/ugkmtNkm5tHGLtAChQgbKCApjl7YI/O60
-3Jh4GYLJ+H9kPqrJ/rGN67Bk9bzzxD46kOpOjj8bGbxqg8ORPGxV+wpSwOjhXXeF
-M8VJ3+xqv79sN/6OSaIVGM6LjmseOKMwb4iBfnJWRBrEejkP9sSPltSy6wBOXN67
-5zu35iQFk2tN5pFEv+6YG8eFGxFBeyI2p74+6Ho33BjekJ2PzbLXmj/iF39bDOHv
-P2Y9biTksM7DDIhslNo4JXxSOeNzFLMARWOaDEJAXgTG93JkzsluM7Pk020klTeT
-fvIAXRmLH/NDc6ifRdIGqey0Qrv67gzHTz9RH9Gv0KwYf4eBIv6p3QeWbXz4TtlN
-OlBp1UF+xdp02I5z5X6D4cMZgbe9v0COvi6aogyqTgIuuyrhCF0xA8msJ7Cv3NXI
-FH1AnVWJIfmQzNTJYEFzq+jN2DpVOQqCmf6b9fU8HJHLwPpGVK4h/CqsXHveepdx
-/WxrzUiapNuBfBg3L5B9YZS9F8lctlQWd8oJSqrpvE+UdQFaVryS0o+515feVnQB
-9xZxSbH1GEaZQe5i4bMsZXVpKXJDA/ibH/o49J7sQBCOrJfVsDO+nxjcLfdBeFRK
-YkTnAgMBAAGjggH9MIIB+TAOBgNVHQ8BAf8EBAMCAQYwGAYIKwYBBQUHAQMEDDAK
-MAgGBgQAjkYBATAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTMw/Vm/3OsOFqW
-GyGJuIFMH8teJTAQBgkrBgEEAYI3FQEEAwIBADCCAYkGA1UdIASCAYAwggF8MIIB
-eAYLKwYBBAGBxFkBAQIwggFnMIIBOAYIKwYBBQUHAgIwggEqHoIBJgBTAGkAcwAg
-AGkAcgAgAHMAZQByAHQAaQBmAGkAawBhAHQAcwAsACAAawBvACAAaQB6AGQAZQB2
-AGkAcwAgAFYAQQBTACAATABhAHQAdgBpAGoAYQBzACAAUABhAHMAdABzACwAIABu
-AG8AZAByAG8AcwBpAG4AbwB0ACAAYQB0AGIAaQBsAHMAdABpAGIAdQAgAEUAbABl
-AGsAdAByAG8AbgBpAHMAawBvACAAZABvAGsAdQBtAGUAbgB0AHUAIABsAGkAawB1
-AG0AYQBtACAAdQBuACAARQBpAHIAbwBwAGEAcwAgAFAAYQByAGwAYQBtAGUAbgB0
-AGEAIABkAGkAcgBlAGsAdABpAHYAYQBpACAAMQA5ADkAOQAvADkAMwAvAEUASzAp
-BggrBgEFBQcCARYdaHR0cDovL3d3dy5lLW1lLmx2L3JlcG9zaXRvcnkwDQYJKoZI
-hvcNAQEFBQADggIBAB8oSjWQIWNoCi94r6MegiaXoz8nGdJLo0J6BhNlW8EEy+t9
-fO+U8vGJ9bffUgIhadLqljTloM+XuJxVDhCFoxReLAX4tTp28/l6uN62DCdp8suU
-kQsdudWOb5kvzfIZVjk6SFbwAf+Cdbay/dHU9fJjV0xNoX7MELoEae/0FPyzlx9F
-7m9KKH/Rxie8x6Opa3vtghNvq94P+3HrXBEaqSzQMJ/8NjdW75XpurcTtq6fAmGt
-nuxrBG82nw+Z98LJyEwouSjUIdeeVNXAzvSO5FWUe48kxjj8q3qkVnc9qEXvZJKk
-0Ep+u3OL9A1Sc7g6SF5DgNOpcHdi/8coHHMeQ+YnJFtJueY2pI79xS0veqV5EnrX
-IbIlbcgPosNhS+VI4le6n/KKId3bZPDaGd/OwJuAOcJ3d2MVU3KE+qSPBzeGIX1Q
-+j1qN9uRDjez/c4Lynth0Jx0nH04aG3pex3W8Sq07ztgUncF5gLCX4xbvPB9t3PH
-kWuyKrNjozTVq60lcUf/Gj56to2VdsPups0DCWzuRWeYz5lIdsHOinSaaFIBNCLI
-7eIUC4S9bhCMsXKbvugI11fVf+q0AT1O5OLoZ+eMfunnQhHvlUbIkda+JxeAGTSY
-58bfHvwhX56GPbx+8Jy9cp70R4JbcWfz+txUTKhc2FnH0AcOEzMnvPRp8Gsh
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEDzCCAvegAwIBAgIBATANBgkqhkiG9w0BAQUFADBKMQswCQYDVQQGEwJTSzET
-MBEGA1UEBxMKQnJhdGlzbGF2YTETMBEGA1UEChMKRGlzaWcgYS5zLjERMA8GA1UE
-AxMIQ0EgRGlzaWcwHhcNMDYwMzIyMDEzOTM0WhcNMTYwMzIyMDEzOTM0WjBKMQsw
-CQYDVQQGEwJTSzETMBEGA1UEBxMKQnJhdGlzbGF2YTETMBEGA1UEChMKRGlzaWcg
-YS5zLjERMA8GA1UEAxMIQ0EgRGlzaWcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
-ggEKAoIBAQCS9jHBfYj9mQGp2HvycXXxMcbzdWb6UShGhJd4NLxs/LxFWYgmGErE
-Nx+hSkS943EE9UQX4j/8SFhvXJ56CbpRNyIjZkMhsDxkovhqFQ4/61HhVKndBpnX
-mjxUizkDPw/Fzsbrg3ICqB9x8y34dQjbYkzo+s7552oftms1grrijxaSfQUMbEYD
-XcDtab86wYqg6I7ZuUUohwjstMoVvoLdtUSLLa2GDGhibYVW8qwUYzrG0ZmsNHhW
-S8+2rT+MitcE5eN4TPWGqvWP+j1scaMtymfraHtuM6kMgiioTGohQBUgDCZbg8Kp
-FhXAJIJdKxatymP2dACw30PEEGBWZ2NFAgMBAAGjgf8wgfwwDwYDVR0TAQH/BAUw
-AwEB/zAdBgNVHQ4EFgQUjbJJaJ1yCCW5wCf1UJNWSEZx+Y8wDgYDVR0PAQH/BAQD
-AgEGMDYGA1UdEQQvMC2BE2Nhb3BlcmF0b3JAZGlzaWcuc2uGFmh0dHA6Ly93d3cu
-ZGlzaWcuc2svY2EwZgYDVR0fBF8wXTAtoCugKYYnaHR0cDovL3d3dy5kaXNpZy5z
-ay9jYS9jcmwvY2FfZGlzaWcuY3JsMCygKqAohiZodHRwOi8vY2EuZGlzaWcuc2sv
-Y2EvY3JsL2NhX2Rpc2lnLmNybDAaBgNVHSAEEzARMA8GDSuBHpGT5goAAAABAQEw
-DQYJKoZIhvcNAQEFBQADggEBAF00dGFMrzvY/59tWDYcPQuBDRIrRhCA/ec8J9B6
-yKm2fnQwM6M6int0wHl5QpNt/7EpFIKrIYwvF/k/Ji/1WcbvgAa3mkkp7M5+cTxq
-EEHA9tOasnxakZzArFvITV734VP/Q3f8nktnbNfzg9Gg4H8l37iYC5oyOGwwoPP/
-CBUz91BKez6jPiCp3C9WgArtQVCwyfTssuMmRAAOb54GvCKWU3BlxFAKRmukLyeB
-EicTXxChds6KezfqwzlhA5WYOudsiCUI/HloDYd9Yvi0X/vF2Ey9WLw/Q1vUHgFN
-PGO+I++MzVpQuGhU+QqZMxEA4Z7CRneC9VkGjCFMhwnN5ag=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDXTCCAkWgAwIBAgIDAOJCMA0GCSqGSIb3DQEBBQUAMFUxCzAJBgNVBAYTAkFU
-MRAwDgYDVQQKEwdBLVRydXN0MRkwFwYDVQQLExBBLVRydXN0LW5RdWFsLTAxMRkw
-FwYDVQQDExBBLVRydXN0LW5RdWFsLTAxMB4XDTA0MTEzMDIzMDAwMFoXDTE0MTEz
-MDIzMDAwMFowVTELMAkGA1UEBhMCQVQxEDAOBgNVBAoTB0EtVHJ1c3QxGTAXBgNV
-BAsTEEEtVHJ1c3QtblF1YWwtMDExGTAXBgNVBAMTEEEtVHJ1c3QtblF1YWwtMDEw
-ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQD/9RyAEZ6eHmhYzNJ328f0
-jmdSUFi6EqRqOxb3jHNPTIpK82CR6z5lmSnZQNUuCPD+htbNZffd2DKVB06NOyZ1
-2zcOMCgj4GtkZoqE0zPpPT3bpoE55nkZZe/qWEX/64wz/L/4EdkvKDSKG/UsP75M
-tmCVY5m2Eg73RVFRz4ccBIMpHel4lzEqSkdDtZOY5fnkrE333hx67nxq21vY8Eyf
-8O4fPQ5RtN8eohQCcPQ1z6ypU1R7N9jPRpnI+yzMOiwd3+QcKhHi1miCzo0pkOaB
-1CwmfsTyNl8qU0NJUL9Ta6cea7WThwTiWol2yD88cd2cy388xpbNkfrCPmZNGLoV
-AgMBAAGjNjA0MA8GA1UdEwEB/wQFMAMBAf8wEQYDVR0OBAoECE5ZzscCMocwMA4G
-A1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEA69I9R1hU9Gbl9vV7W7AH
-QpUJAlFAvv2It/eY8p2ouQUPVaSZikaKtAYrCD/arzfXB43Qet+dM6CpHsn8ikYR
-vQKePjXv3Evf+C1bxwJAimcnZV6W+bNOTpdo8lXljxkmfN+Z5S+XzvK2ttUtP4Et
-YOVaxHw2mPMNbvDeY+foJkiBn3KYjGabMaR8moZqof5ofj4iS/WyamTZti6v/fKx
-n1vII+/uWkcxV5DT5+r9HLon0NYF0Vg317Wh+gWDV59VZo+dcwJDb+keYqMFYoqp
-77SGkZGu41S8NGYkQY3X9rNHRkDbLfpKYDmy6NanpOE1EHW1/sNSFAs43qZZKJEQ
-xg==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEojCCA4qgAwIBAgIQRL4Mi1AAJLQR0zYlJWfJiTANBgkqhkiG9w0BAQUFADCB
-rjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug
-Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho
-dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xNjA0BgNVBAMTLVVUTi1VU0VSRmlyc3Qt
-Q2xpZW50IEF1dGhlbnRpY2F0aW9uIGFuZCBFbWFpbDAeFw05OTA3MDkxNzI4NTBa
-Fw0xOTA3MDkxNzM2NThaMIGuMQswCQYDVQQGEwJVUzELMAkGA1UECBMCVVQxFzAV
-BgNVBAcTDlNhbHQgTGFrZSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5l
-dHdvcmsxITAfBgNVBAsTGGh0dHA6Ly93d3cudXNlcnRydXN0LmNvbTE2MDQGA1UE
-AxMtVVROLVVTRVJGaXJzdC1DbGllbnQgQXV0aGVudGljYXRpb24gYW5kIEVtYWls
-MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsjmFpPJ9q0E7YkY3rs3B
-YHW8OWX5ShpHornMSMxqmNVNNRm5pELlzkniii8efNIxB8dOtINknS4p1aJkxIW9
-hVE1eaROaJB7HHqkkqgX8pgV8pPMyaQylbsMTzC9mKALi+VuG6JG+ni8om+rWV6l
-L8/K2m2qL+usobNqqrcuZzWLeeEeaYji5kbNoKXqvgvOdjp6Dpvq/NonWz1zHyLm
-SGHGTPNpsaguG7bUMSAsvIKKjqQOpdeJQ/wWWq8dcdcRWdq6hw2v+vPhwvCkxWeM
-1tZUOt4KpLoDd7NlyP0e03RiqhjKaJMeoYV+9Udly/hNVyh00jT/MLbu9mIwFIws
-6wIDAQABo4G5MIG2MAsGA1UdDwQEAwIBxjAPBgNVHRMBAf8EBTADAQH/MB0GA1Ud
-DgQWBBSJgmd9xJ0mcABLtFBIfN49rgRufTBYBgNVHR8EUTBPME2gS6BJhkdodHRw
-Oi8vY3JsLnVzZXJ0cnVzdC5jb20vVVROLVVTRVJGaXJzdC1DbGllbnRBdXRoZW50
-aWNhdGlvbmFuZEVtYWlsLmNybDAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUH
-AwQwDQYJKoZIhvcNAQEFBQADggEBALFtYV2mGn98q0rkMPxTbyUkxsrt4jFcKw7u
-7mFVbwQ+zznexRtJlOTrIEy05p5QLnLZjfWqo7NK2lYcYJeA3IKirUq9iiv/Cwm0
-xtcgBEXkzYABurorbs6q15L+5K/r9CYdFip/bDCVNy8zEqx/3cfREYxRmLLQo5HQ
-rfafnoOTHh1CuEava2bwm3/q4wMC5QJRwarVNZ1yQAOJujEdxRBoUp7fooXFXAim
-eOZTT7Hot9MUnpOmw2TjrH5xzbyf6QMbzPvprDHBr3wVdAKZw7JHpsIyYdfHb0gk
-USeh1YdV8nuPmD0Wnu51tvjQjvLzxq4oW6fw8zYX/MMF08oDSlQ=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFRjCCAy6gAwIBAgIIbYwURrGmCu4wDQYJKoZIhvcNAQEMBQAwQTELMAkGA1UE
-BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVz
-dCBQcmVtaXVtMB4XDTEwMDEyOTE0MTAzNloXDTQwMTIzMTE0MTAzNlowQTELMAkG
-A1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1U
-cnVzdCBQcmVtaXVtMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAxBLf
-qV/+Qd3d9Z+K4/as4Tx4mrzY8H96oDMq3I0gW64tb+eT2TZwamjPjlGjhVtnBKAQ
-JG9dKILBl1fYSCkTtuG+kU3fhQxTGJoeJKJPj/CihQvL9Cl/0qRY7iZNyaqoe5rZ
-+jjeRFcV5fiMyNlI4g0WJx0eyIOFJbe6qlVBzAMiSy2RjYvmia9mx+n/K+k8rNrS
-s8PhaJyJ+HoAVt70VZVs+7pk3WKL3wt3MutizCaam7uqYoNMtAZ6MMgpv+0GTZe5
-HMQxK9VfvFMSF5yZVylmd2EhMQcuJUmdGPLu8ytxjLW6OQdJd/zvLpKQBY0tL3d7
-70O/Nbua2Plzpyzy0FfuKE4mX4+QaAkvuPjcBukumj5Rp9EixAqnOEhss/n/fauG
-V+O61oV4d7pD6kh/9ti+I20ev9E2bFhc8e6kGVQa9QPSdubhjL08s9NIS+LI+H+S
-qHZGnEJlPqQewQcDWkYtuJfzt9WyVSHvutxMAJf7FJUnM7/oQ0dG0giZFmA7mn7S
-5u046uwBHjxIVkkJx0w3AJ6IDsBz4W9m6XJHMD4Q5QsDyZpCAGzFlH5hxIrff4Ia
-C1nEWTJ3s7xgaVY5/bQGeyzWZDbZvUjthB9+pSKPKrhC9IK31FOQeE4tGv2Bb0TX
-OwF0lkLgAOIua+rF7nKsu7/+6qqo+Nz2snmKtmcCAwEAAaNCMEAwHQYDVR0OBBYE
-FJ3AZ6YMItkm9UWrpmVSESfYRaxjMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/
-BAQDAgEGMA0GCSqGSIb3DQEBDAUAA4ICAQCzV00QYk465KzquByvMiPIs0laUZx2
-KI15qldGF9X1Uva3ROgIRL8YhNILgM3FEv0AVQVhh0HctSSePMTYyPtwni94loMg
-Nt58D2kTiKV1NpgIpsbfrM7jWNa3Pt668+s0QNiigfV4Py/VpfzZotReBA4Xrf5B
-8OWycvpEgjNC6C1Y91aMYj+6QrCcDFx+LmUmXFNPALJ4fqENmS2NuB2OosSw/WDQ
-MKSOyARiqcTtNd56l+0OOF6SL5Nwpamcb6d9Ex1+xghIsV5n61EIJenmJWtSKZGc
-0jlzCFfemQa0W50QBuHCAKi4HEoCChTQwUHK+4w1IX2COPKpVJEZNZOUbWo6xbLQ
-u4mGk+ibyQ86p3q4ofB4Rvr8Ny/lioTz3/4E2aFooC8k4gmVBtWVyuEklut89pMF
-u+1z6S3RdTnX5yTb2E5fQ4+e0BQ5v1VwSJlXMbSc7kqYA5YwH2AG7hsj/oFgIxpH
-YoWlzBk0gG+zrBrjn/B7SK3VAdlntqlyk+otZrWyuOQ9PLLvTIzq6we/qzWaVYa8
-GKa1qF60g2xraUDTn9zxw2lrueFtCfTxqlB2Cnp9ehehVZZCmTEJ3WARjQUwfuaO
-RtGdFNrHF+QFlozEJLUbzxQHskD4o55BhrwE0GuWyCqANP2/7waj3VjFhT0+j/6e
-KeC2uAloGRwYQw==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEFTCCAv2gAwIBAgIBATANBgkqhkiG9w0BAQUFADBkMQswCQYDVQQGEwJTRTEU
-MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3
-b3JrMSAwHgYDVQQDExdBZGRUcnVzdCBQdWJsaWMgQ0EgUm9vdDAeFw0wMDA1MzAx
-MDQxNTBaFw0yMDA1MzAxMDQxNTBaMGQxCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtB
-ZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQIE5ldHdvcmsxIDAeBgNV
-BAMTF0FkZFRydXN0IFB1YmxpYyBDQSBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOC
-AQ8AMIIBCgKCAQEA6Rowj4OIFMEg2Dybjxt+A3S72mnTRqX4jsIMEZBRpS9mVEBV
-6tsfSlbunyNu9DnLoblv8n75XYcmYZ4c+OLspoH4IcUkzBEMP9smcnrHAZcHF/nX
-GCwwfQ56HmIexkvA/X1id9NEHif2P0tEs7c42TkfYNVRknMDtABp4/MUTu7R3AnP
-dzRGULD4EfL+OHn3Bzn+UZKXC1sIXzSGAa2Il+tmzV7R/9x98oTaunet3IAIx6eH
-1lWfl2royBFkuucZKT8Rs3iQhCBSWxHveNCD9tVIkNAwHM+A+WD+eeSI8t0A65RF
-62WUaUC6wNW0uLp9BBGo6zEFlpROWCGOn9Bg/QIDAQABo4HRMIHOMB0GA1UdDgQW
-BBSBPjfYkrAfd59ctKtzquf2NGAv+jALBgNVHQ8EBAMCAQYwDwYDVR0TAQH/BAUw
-AwEB/zCBjgYDVR0jBIGGMIGDgBSBPjfYkrAfd59ctKtzquf2NGAv+qFopGYwZDEL
-MAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQLExRBZGRU
-cnVzdCBUVFAgTmV0d29yazEgMB4GA1UEAxMXQWRkVHJ1c3QgUHVibGljIENBIFJv
-b3SCAQEwDQYJKoZIhvcNAQEFBQADggEBAAP3FUr4JNojVhaTdt02KLmuG7jD8WS6
-IBh4lSknVwW8fCr0uVFV2ocC3g8WFzH4qnkuCRO7r7IgGRLlk/lL+YPoRNWyQSW/
-iHVv/xD8SlTQX/D67zZzfRs2RcYhbbQVuE7PnFylPVoAjgbjPGsye/Kf8Lb93/Ao
-GEjwxrzQvzSAlsJKsW2Ox5BF3i9nrEUEo3rcVZLJR2bYGozH7ZxOmuASu7VqTITh
-4SINhwBk/ox9Yjllpu9CtoAlEmEBqCQTcAARJl/6NVDFSMwGR+gn2HCNX2TmoUQm
-XiLsks3/QppEIW1cxeMiHV9HEufOX1362KqxMy3ZdvJOOjMMK7MtkAY=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEajCCA1KgAwIBAgIBATANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJKUDEN
-MAsGA1UECgwESlBLSTEpMCcGA1UECwwgUHJlZmVjdHVyYWwgQXNzb2NpYXRpb24g
-Rm9yIEpQS0kxETAPBgNVBAsMCEJyaWRnZUNBMB4XDTAzMTIyNzA1MDgxNVoXDTEz
-MTIyNjE0NTk1OVowWjELMAkGA1UEBhMCSlAxDTALBgNVBAoMBEpQS0kxKTAnBgNV
-BAsMIFByZWZlY3R1cmFsIEFzc29jaWF0aW9uIEZvciBKUEtJMREwDwYDVQQLDAhC
-cmlkZ2VDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANTnUmg7K3m8
-52vd77kwkq156euwoWm5no8E8kmaTSc7x2RABPpqNTlMKdZ6ttsyYrqREeDkcvPL
-yF7yf/I8+innasNtsytcTAy8xY8Avsbd4JkCGW9dyPjk9pzzc3yLQ64Rx2fujRn2
-agcEVdPCr/XpJygX8FD5bbhkZ0CVoiASBmlHOcC3YpFlfbT1QcpOSOb7o+VdKVEi
-MMfbBuU2IlYIaSr/R1nO7RPNtkqkFWJ1/nKjKHyzZje7j70qSxb+BTGcNgTHa1YA
-UrogKB+UpBftmb4ds+XlkEJ1dvwokiSbCDaWFKD+YD4B2s0bvjCbw8xuZFYGhNyR
-/2D5XfN1s2MCAwEAAaOCATkwggE1MA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8E
-BTADAQH/MG0GA1UdHwRmMGQwYqBgoF6kXDBaMQswCQYDVQQGEwJKUDENMAsGA1UE
-CgwESlBLSTEpMCcGA1UECwwgUHJlZmVjdHVyYWwgQXNzb2NpYXRpb24gRm9yIEpQ
-S0kxETAPBgNVBAsMCEJyaWRnZUNBMIGDBgNVHREEfDB6pHgwdjELMAkGA1UEBhMC
-SlAxJzAlBgNVBAoMHuWFrOeahOWAi+S6uuiqjeiovOOCteODvOODk+OCuTEeMBwG
-A1UECwwV6YO96YGT5bqc55yM5Y2U6K2w5LyaMR4wHAYDVQQLDBXjg5bjg6rjg4Pj
-grjoqo3oqLzlsYAwHQYDVR0OBBYEFNQXMiCqQNkR2OaZmQgLtf8mR8p8MA0GCSqG
-SIb3DQEBBQUAA4IBAQATjJo4reTNPC5CsvAKu1RYT8PyXFVYHbKsEpGt4GR8pDCg
-HEGAiAhHSNrGh9CagZMXADvlG0gmMOnXowriQQixrtpkmx0TB8tNAlZptZWkZC+R
-8TnjOkHrk2nFAEC3ezbdK0R7MR4tJLDQCnhEWbg50rf0wZ/aF8uAaVeEtHXa6W0M
-Xq3dSe0XAcrLbX4zZHQTaWvdpLAIjl6DZ3SCieRMyoWUL+LXaLFdTP5WBCd+No58
-IounD9X4xxze2aeRVaiV/WnQ0OSPNS7n7YXy6xQdnaOU4KRW/Lne1EDf5IfWC/ih
-bVAmhZMbcrkWWcsR6aCPG+2mV3zTD6AUzuKPal8Y
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkG
-A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
-b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAw
-MDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
-YWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYDVQQDExJHbG9iYWxT
-aWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDaDuaZ
-jc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavp
-xy0Sy6scTHAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp
-1Wrjsok6Vjk4bwY8iGlbKk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdG
-snUOhugZitVtbNV4FpWi6cgKOOvyJBNPc1STE4U6G7weNLWLBYy5d4ux2x8gkasJ
-U26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrXgzT/LCrBbBlDSgeF59N8
-9iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8E
-BTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0B
-AQUFAAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOz
-yj1hTdNGCbM+w6DjY1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE
-38NflNUVyRRBnMRddWQVDf9VMOyGj/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymP
-AbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhHhm4qxFYxldBniYUr+WymXUad
-DKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveCX4XSQRjbgbME
-HMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDdTCCAl2gAwIBAgILAgAAAAAA1ni3lAUwDQYJKoZIhvcNAQEEBQAwVzELMAkG
-A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
-b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAw
-MDBaFw0xNDAxMjgxMjAwMDBaMFcxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
-YWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYDVQQDExJHbG9iYWxT
-aWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDaDuaZ
-jc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavp
-xy0Sy6scTHAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp
-1Wrjsok6Vjk4bwY8iGlbKk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdG
-snUOhugZitVtbNV4FpWi6cgKOOvyJBNPc1STE4U6G7weNLWLBYy5d4ux2x8gkasJ
-U26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrXgzT/LCrBbBlDSgeF59N8
-9iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIABjAdBgNVHQ4EFgQU
-YHtmGkUNl8qJUC99BM00qP/8/UswDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0B
-AQQFAAOCAQEArqqf/LfSyx9fOSkoGJ40yWxPbxrwZKJwSk8ThptgKJ7ogUmYfQq7
-5bCdPTbbjwVR/wkxKh/diXeeDy5slQTthsu0AD+EAk2AaioteAuubyuig0SDH81Q
-gkwkr733pbTIWg/050deSY43lv6aiAU62cDbKYfmGZZHpzqmjIs8d/5GY6dT2iHR
-rH5Jokvmw2dZL7OKDrssvamqQnw1wdh/1acxOk5jQzmvCLBhNIzTmKlDNPYPhyk7
-ncJWWJh3w/cbrPad+D6qp1RF8PX51TFl/mtYnHGzHtdS6jIX/EBgHcl5JLL2bP2o
-Zg6C3ZjL2sJETy6ge/L3ayx2EYRGinij4w==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEKzCCAxOgAwIBAgIEOsylTDANBgkqhkiG9w0BAQUFADBDMQswCQYDVQQGEwJE
-SzEVMBMGA1UEChMMVERDIEludGVybmV0MR0wGwYDVQQLExRUREMgSW50ZXJuZXQg
-Um9vdCBDQTAeFw0wMTA0MDUxNjMzMTdaFw0yMTA0MDUxNzAzMTdaMEMxCzAJBgNV
-BAYTAkRLMRUwEwYDVQQKEwxUREMgSW50ZXJuZXQxHTAbBgNVBAsTFFREQyBJbnRl
-cm5ldCBSb290IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxLhA
-vJHVYx/XmaCLDEAedLdInUaMArLgJF/wGROnN4NrXceO+YQwzho7+vvOi20jxsNu
-Zp+Jpd/gQlBn+h9sHvTQBda/ytZO5GhgbEaqHF1j4QeGDmUApy6mcca8uYGoOn0a
-0vnRrEvLznWv3Hv6gXPU/Lq9QYjUdLP5Xjg6PEOo0pVOd20TDJ2PeAG3WiAfAzc1
-4izbSysseLlJ28TQx5yc5IogCSEWVmb/Bexb4/DPqyQkXsN/cHoSxNK1EKC2IeGN
-eGlVRGn1ypYcNIUXJXfi9i8nmHj9eQY6otZaQ8H/7AQ77hPv01ha/5Lr7K7a8jcD
-R0G2l8ktCkEiu7vmpwIDAQABo4IBJTCCASEwEQYJYIZIAYb4QgEBBAQDAgAHMGUG
-A1UdHwReMFwwWqBYoFakVDBSMQswCQYDVQQGEwJESzEVMBMGA1UEChMMVERDIElu
-dGVybmV0MR0wGwYDVQQLExRUREMgSW50ZXJuZXQgUm9vdCBDQTENMAsGA1UEAxME
-Q1JMMTArBgNVHRAEJDAigA8yMDAxMDQwNTE2MzMxN1qBDzIwMjEwNDA1MTcwMzE3
-WjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUbGQBx/2FbazI2p5QCIUItTxWqFAw
-HQYDVR0OBBYEFGxkAcf9hW2syNqeUAiFCLU8VqhQMAwGA1UdEwQFMAMBAf8wHQYJ
-KoZIhvZ9B0EABBAwDhsIVjUuMDo0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4IBAQBO
-Q8zR3R0QGwZ/t6T609lN+yOfI1Rb5osvBCiLtSdtiaHsmGnc540mgwV5dOy0uaOX
-wTUA/RXaOYE6lTGQ3pfphqiZdwzlWqCE/xIWrG64jcN7ksKsLtB9KOy282A4aW8+
-2ARVPp7MVdK6/rtHBNcK2RYKNCn1WBPVT8+PVkuzHu7TmHnaCB4Mb7j4Fifvwm89
-9qNLPg7kbWzbO0ESm70NRyN/PErQr8Cv9u8btRXE64PECV90i9kR+8JWsTz4cMo0
-jUNAE4z9mQNUecYu6oah9jrUCbz0vGbMPVjQV0kK7iXiQe4T+Zs4NNEA9X7nlB38
-aQNiuJkFBT1reBK9sG9l
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIB4TCCAYegAwIBAgIRKjikHJYKBN5CsiilC+g0mAIwCgYIKoZIzj0EAwIwUDEk
-MCIGA1UECxMbR2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpH
-bG9iYWxTaWduMRMwEQYDVQQDEwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoX
-DTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMbR2xvYmFsU2lnbiBFQ0MgUm9vdCBD
-QSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQDEwpHbG9iYWxTaWdu
-MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEuMZ5049sJQ6fLjkZHAOkrprlOQcJ
-FspjsbmG+IpXwVfOQvpzofdlQv8ewQCybnMO/8ch5RikqtlxP6jUuc6MHaNCMEAw
-DgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFFSwe61F
-uOJAf/sKbvu+M8k8o4TVMAoGCCqGSM49BAMCA0gAMEUCIQDckqGgE6bPA7DmxCGX
-kPoUVy0D7O48027KqGx2vKLeuwIgJ6iFJzWbVsaj8kfSt24bAgAXqmemFZHe+pTs
-ewv4n4Q=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIF0DCCBLigAwIBAgIEOrZQizANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJC
-TTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDElMCMGA1UECxMcUm9vdCBDZXJ0
-aWZpY2F0aW9uIEF1dGhvcml0eTEuMCwGA1UEAxMlUXVvVmFkaXMgUm9vdCBDZXJ0
-aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wMTAzMTkxODMzMzNaFw0yMTAzMTcxODMz
-MzNaMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMSUw
-IwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYDVQQDEyVR
-dW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG
-9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv2G1lVO6V/z68mcLOhrfEYBklbTRvM16z/Yp
-li4kVEAkOPcahdxYTMukJ0KX0J+DisPkBgNbAKVRHnAEdOLB1Dqr1607BxgFjv2D
-rOpm2RgbaIr1VxqYuvXtdj182d6UajtLF8HVj71lODqV0D1VNk7feVcxKh7YWWVJ
-WCCYfqtffp/p1k3sg3Spx2zY7ilKhSoGFPlU5tPaZQeLYzcS19Dsw3sgQUSj7cug
-F+FxZc4dZjH3dgEZyH0DWLaVSR2mEiboxgx24ONmy+pdpibu5cxfvWenAScOospU
-xbF6lR1xHkopigPcakXBpBlebzbNw6Kwt/5cOOJSvPhEQ+aQuwIDAQABo4ICUjCC
-Ak4wPQYIKwYBBQUHAQEEMTAvMC0GCCsGAQUFBzABhiFodHRwczovL29jc3AucXVv
-dmFkaXNvZmZzaG9yZS5jb20wDwYDVR0TAQH/BAUwAwEB/zCCARoGA1UdIASCAREw
-ggENMIIBCQYJKwYBBAG+WAABMIH7MIHUBggrBgEFBQcCAjCBxxqBxFJlbGlhbmNl
-IG9uIHRoZSBRdW9WYWRpcyBSb290IENlcnRpZmljYXRlIGJ5IGFueSBwYXJ0eSBh
-c3N1bWVzIGFjY2VwdGFuY2Ugb2YgdGhlIHRoZW4gYXBwbGljYWJsZSBzdGFuZGFy
-ZCB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB1c2UsIGNlcnRpZmljYXRpb24gcHJh
-Y3RpY2VzLCBhbmQgdGhlIFF1b1ZhZGlzIENlcnRpZmljYXRlIFBvbGljeS4wIgYI
-KwYBBQUHAgEWFmh0dHA6Ly93d3cucXVvdmFkaXMuYm0wHQYDVR0OBBYEFItLbe3T
-KbkGGew5Oanwl4Rqy+/fMIGuBgNVHSMEgaYwgaOAFItLbe3TKbkGGew5Oanwl4Rq
-y+/foYGEpIGBMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1p
-dGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYD
-VQQDEyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggQ6tlCL
-MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAitQUtf70mpKnGdSk
-fnIYj9lofFIk3WdvOXrEql494liwTXCYhGHoG+NpGA7O+0dQoE7/8CQfvbLO9Sf8
-7C9TqnN7Az10buYWnuulLsS/VidQK2K6vkscPFVcQR0kvoIgR13VRH56FmjffU1R
-cHhXHTMe/QKZnAzNCgVPx7uOpHX6Sm2xgI4JVrmcGmD+XcHXetwReNDWXcG31a0y
-mQM6isxUJTkxgXsTIlG6Rmyhu576BGxJJnSP0nPrzDCi5upZIof4l/UO/erMkqQW
-xFIY6iHOsfHmhIHluqmGKPJDWl0Snawe2ajlCmqnf6CHKc/yiU3U7MXi5nrQNiOK
-SnQ2+Q==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUx
-KzApBgNVBAoMIlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAd
-BgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNl
-YyBHbG9iYWxSb290IENsYXNzIDIwHhcNMDgxMDAxMTA0MDE0WhcNMzMxMDAxMjM1
-OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lzdGVtcyBFbnRlcnBy
-aXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBDZW50
-ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwggEiMA0G
-CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCqX9obX+hzkeXaXPSi5kfl82hVYAUd
-AqSzm1nzHoqvNK38DcLZSBnuaY/JIPwhqgcZ7bBcrGXHX+0CfHt8LRvWurmAwhiC
-FoT6ZrAIxlQjgeTNuUk/9k9uN0goOA/FvudocP05l03Sx5iRUKrERLMjfTlH6VJi
-1hKTXrcxlkIF+3anHqP1wvzpesVsqXFP6st4vGCvx9702cu+fjOlbpSD8DT6Iavq
-jnKgP6TeMFvvhk1qlVtDRKgQFRzlAVfFmPHmBiiRqiDFt1MmUUOyCxGVWOHAD3bZ
-wI18gfNycJ5v/hqO2V81xrJvNHy+SE/iWjnX2J14np+GPgNeGYtEotXHAgMBAAGj
-QjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS/
-WSA2AHmgoCJrjNXyYdK4LMuCSjANBgkqhkiG9w0BAQsFAAOCAQEAMQOiYQsfdOhy
-NsZt+U2e+iKo4YFWz827n+qrkRk4r6p8FU3ztqONpfSO9kSpp+ghla0+AGIWiPAC
-uvxhI+YzmzB6azZie60EI4RYZeLbK4rnJVM3YlNfvNoBYimipidx5joifsFvHZVw
-IEoHNN/q/xWA5brXethbdXwFeilHfkCoMRN3zUA7tFFHei4R40cR3p1m0IvVVGb6
-g1XqfMIpiRvpb7PO4gWEyS8+eIVibslfwXhjdFjASBgMmTnrpMwatXlajRWc2BQN
-9noHV8cigwUtPJslJj0Ys6lDfMjIq2SPDqO/nBudMNva0Bkuqjzx+zOAduTNrRlP
-BSeOE6Fuwg==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFODCCAyCgAwIBAgIRAJW+FqD3LkbxezmCcvqLzZYwDQYJKoZIhvcNAQEFBQAw
-NzEUMBIGA1UECgwLVGVsaWFTb25lcmExHzAdBgNVBAMMFlRlbGlhU29uZXJhIFJv
-b3QgQ0EgdjEwHhcNMDcxMDE4MTIwMDUwWhcNMzIxMDE4MTIwMDUwWjA3MRQwEgYD
-VQQKDAtUZWxpYVNvbmVyYTEfMB0GA1UEAwwWVGVsaWFTb25lcmEgUm9vdCBDQSB2
-MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMK+6yfwIaPzaSZVfp3F
-VRaRXP3vIb9TgHot0pGMYzHw7CTww6XScnwQbfQ3t+XmfHnqjLWCi65ItqwA3GV1
-7CpNX8GH9SBlK4GoRz6JI5UwFpB/6FcHSOcZrr9FZ7E3GwYq/t75rH2D+1665I+X
-Z75Ljo1kB1c4VWk0Nj0TSO9P4tNmHqTPGrdeNjPUtAa9GAH9d4RQAEX1jF3oI7x+
-/jXh7VB7qTCNGdMJjmhnXb88lxhTuylixcpecsHHltTbLaC0H2kD7OriUPEMPPCs
-81Mt8Bz17Ww5OXOAFshSsCPN4D7c3TxHoLs1iuKYaIu+5b9y7tL6pe0S7fyYGKkm
-dtwoSxAgHNN/Fnct7W+A90m7UwW7XWjH1Mh1Fj+JWov3F0fUTPHSiXk+TT2YqGHe
-Oh7S+F4D4MHJHIzTjU3TlTazN19jY5szFPAtJmtTfImMMsJu7D0hADnJoWjiUIMu
-sDor8zagrC/kb2HCUQk5PotTubtn2txTuXZZNp1D5SDgPTJghSJRt8czu90VL6R4
-pgd7gUY2BIbdeTXHlSw7sKMXNeVzH7RcWe/a6hBle3rQf5+ztCo3O3CLm1u5K7fs
-slESl1MpWtTwEhDcTwK7EpIvYtQ/aUN8Ddb8WHUBiJ1YFkveupD/RwGJBmr2X7KQ
-arMCpgKIv7NHfirZ1fpoeDVNAgMBAAGjPzA9MA8GA1UdEwEB/wQFMAMBAf8wCwYD
-VR0PBAQDAgEGMB0GA1UdDgQWBBTwj1k4ALP1j5qWDNXr+nuqF+gTEjANBgkqhkiG
-9w0BAQUFAAOCAgEAvuRcYk4k9AwI//DTDGjkk0kiP0Qnb7tt3oNmzqjMDfz1mgbl
-dxSR651Be5kqhOX//CHBXfDkH1e3damhXwIm/9fH907eT/j3HEbAek9ALCI18Bmx
-0GtnLLCo4MBANzX2hFxc469CeP6nyQ1Q6g2EdvZR74NTxnr/DlZJLo961gzmJ1Tj
-TQpgcmLNkQfWpb/ImWvtxBnmq0wROMVvMeJuScg/doAmAyYp4Db29iBT4xdwNBed
-Y2gea+zDTYa4EzAvXUYNR0PVG6pZDrlcjQZIrXSHX8f8MVRBE+LHIQ6e4B4N4cB7
-Q4WQxYpYxmUKeFfyxiMPAdkgS94P+5KFdSpcc41teyWRyu5FrgZLAMzTsVlQ2jqI
-OylDRl6XK1TOU2+NSueW+r9xDkKLfP0ooNBIytrEgUy7onOTJsjrDNYmiLbAJM+7
-vVvrdX3pCI6GMyx5dwlppYn8s3CQh3aP0yK7Qs69cwsgJirQmz1wHiRszYd2qReW
-t88NkvuOGKmYSdGe/mBEciG5Ge3C9THxOUiIkCR1VBatzvT4aRRkOfujuLpwQMcn
-HL/EVlP6Y2XQ8xwOFvVrhlhNGNTkDY6lnVuR3HYkUD/GKvvZt5y11ubQ2egZixVx
-SK236thZiNSQvxaz2emsWWFUyBy6ysHK4bkgTI86k4mloMy/0/Z1pHWWbVY=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEIDCCAwigAwIBAgIQNE7VVyDV7exJ9C/ON9srbTANBgkqhkiG9w0BAQUFADCB
-qTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMf
-Q2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIw
-MDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxHzAdBgNV
-BAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwHhcNMDYxMTE3MDAwMDAwWhcNMzYw
-NzE2MjM1OTU5WjCBqTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5j
-LjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYG
-A1UECxMvKGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
-IG9ubHkxHzAdBgNVBAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwggEiMA0GCSqG
-SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCsoPD7gFnUnMekz52hWXMJEEUMDSxuaPFs
-W0hoSVk3/AszGcJ3f8wQLZU0HObrTQmnHNK4yZc2AreJ1CRfBsDMRJSUjQJib+ta
-3RGNKJpchJAQeg29dGYvajig4tVUROsdB58Hum/u6f1OCyn1PoSgAfGcq/gcfomk
-6KHYcWUNo1F77rzSImANuVud37r8UVsLr5iy6S7pBOhih94ryNdOwUxkHt3Ph1i6
-Sk/KaAcdHJ1KxtUvkcx8cXIcxcBn6zL9yZJclNqFwJu/U30rCfSMnZEfl2pSy94J
-NqR32HuHUETVPm4pafs5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBA
-MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XP
-r87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUFAAOCAQEAeRHAS7ORtvzw6WfU
-DW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeEuzLlQRHAd9mz
-YJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX
-xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2
-/qxAeeWsEG89jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/
-LHbTY5xZ3Y+m4Q6gLkH3LpVHz7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7
-jVaMaA==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDhDCCAmygAwIBAgIBCTANBgkqhkiG9w0BAQUFADAzMQswCQYDVQQGEwJDTjER
-MA8GA1UEChMIVW5pVHJ1c3QxETAPBgNVBAMTCFVDQSBSb290MB4XDTA0MDEwMTAw
-MDAwMFoXDTI5MTIzMTAwMDAwMFowMzELMAkGA1UEBhMCQ04xETAPBgNVBAoTCFVu
-aVRydXN0MREwDwYDVQQDEwhVQ0EgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEP
-ADCCAQoCggEBALNdB8qGJn1r4vs4CQ7MgsJqGgCiFV/W6dQBt1YDAVmP9ThpJHbC
-XivF9iu/r/tB/Q9a/KvXg3BNMJjRnrJ2u5LWu+kQKGkoNkTo8SzXWHwk1n8COvCB
-a2FgP/Qz3m3l6ihST/ypHWN8C7rqrsRoRuTej8GnsrZYWm0dLNmMOreIy4XU9+gD
-Xv2yTVDo1h//rgI/i0+WITyb1yXJHT/7mLFZ5PCpO6+zzYUs4mBGzG+OoOvwNMXx
-QhhgrhLtRnUc5dipllq+3lrWeGeWW5N3UPJuG96WUUqm1ktDdSFmjXfsAoR2XEQQ
-th1hbOSjIH23jboPkXXHjd+8AmCoKai9PUMCAwEAAaOBojCBnzALBgNVHQ8EBAMC
-AQYwDAYDVR0TBAUwAwEB/zBjBgNVHSUEXDBaBggrBgEFBQcDAQYIKwYBBQUHAwIG
-CCsGAQUFBwMDBggrBgEFBQcDBAYIKwYBBQUHAwUGCCsGAQUFBwMGBggrBgEFBQcD
-BwYIKwYBBQUHAwgGCCsGAQUFBwMJMB0GA1UdDgQWBBTbHzXza0z/QjFkm827Wh4d
-SBC37jANBgkqhkiG9w0BAQUFAAOCAQEAOGy3iPGt+lg3dNHocN6cJ1nL5BXXoMNg
-14iABMUwTD3UGusGXllH5rxmy+AI/Og17GJ9ysDawXiv5UZv+4mCI4/211NmVaDe
-JRI7cTYWVRJ2+z34VFsxugAG+H1V5ad2g6pcSpemKijfvcZsCyOVjjN/Hl5AHxNU
-LJzltQ7dFyiuawHTUin1Ih+QOfTcYmjwPIZH7LgFRbu3DJaUxmfLI3HQjnQi1kHr
-A6i26r7EARK1s11AdgYg1GS4KUYGis4fk5oQ7vuqWrTcL9Ury/bXBYSYBZELhPc9
-+tb5evosFeo2gkO3t7jj83EB7UNDogVFwygFBzXjAaU4HoDU18PZ3g==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIID8TCCAtmgAwIBAgIQQT1yx/RrH4FDffHSKFTfmjANBgkqhkiG9w0BAQUFADCB
-ijELMAkGA1UEBhMCQ0gxEDAOBgNVBAoTB1dJU2VLZXkxGzAZBgNVBAsTEkNvcHly
-aWdodCAoYykgMjAwNTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNl
-ZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQSBDQTAeFw0w
-NTEyMTExNjAzNDRaFw0zNzEyMTExNjA5NTFaMIGKMQswCQYDVQQGEwJDSDEQMA4G
-A1UEChMHV0lTZUtleTEbMBkGA1UECxMSQ29weXJpZ2h0IChjKSAyMDA1MSIwIAYD
-VQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBX
-SVNlS2V5IEdsb2JhbCBSb290IEdBIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
-MIIBCgKCAQEAy0+zAJs9Nt350UlqaxBJH+zYK7LG+DKBKUOVTJoZIyEVRd7jyBxR
-VVuuk+g3/ytr6dTqvirdqFEr12bDYVxgAsj1znJ7O7jyTmUIms2kahnBAbtzptf2
-w93NvKSLtZlhuAGio9RN1AU9ka34tAhxZK9w8RxrfvbDd50kc3vkDIzh2TbhmYsF
-mQvtRTEJysIA2/dyoJaqlYfQjse2YXMNdmaM3Bu0Y6Kff5MTMPGhJ9vZ/yxViJGg
-4E8HsChWjBgbl0SOid3gF27nKu+POQoxhILYQBRJLnpB5Kf+42TMwVlxSywhp1t9
-4B3RLoGbw9ho972WG6xwsRYUC9tguSYBBQIDAQABo1EwTzALBgNVHQ8EBAMCAYYw
-DwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUswN+rja8sHnR3JQmthG+IbJphpQw
-EAYJKwYBBAGCNxUBBAMCAQAwDQYJKoZIhvcNAQEFBQADggEBAEuh/wuHbrP5wUOx
-SPMowB0uyQlB+pQAHKSkq0lPjz0e701vvbyk9vImMMkQyh2I+3QZH4VFvbBsUfk2
-ftv1TDI6QU9bR8/oCy22xBmddMVHxjtqD6wU2zz0c5ypBd8A3HR4+vg1YFkCExh8
-vPtNsCBtQ7tgMHpnM1zFmdH4LTlSc/uMqpclXHLZCB6rTjzjgTGfA6b7wP4piFXa
-hNVQA7bihKOmNqoROgHhGEvWRGizPflTdISzRpFGlgC3gCy24eMQ4tui5yiPAZZi
-Fj4A4xylNoEYokxSdsARo27mHbrjWr42U8U+dY+GaSlYU7Wcu2+fXMUY7N0v4ZjJ
-/L7fCg0=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDlDCCAnygAwIBAgIQWAsFbFMk27JQVxhf+eWmUDANBgkqhkiG9w0BAQUFADAn
-MQswCQYDVQQGEwJCRTEYMBYGA1UEAxMPQmVsZ2l1bSBSb290IENBMB4XDTAzMDEy
-NjIzMDAwMFoXDTE0MDEyNjIzMDAwMFowJzELMAkGA1UEBhMCQkUxGDAWBgNVBAMT
-D0JlbGdpdW0gUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
-AMihcekcRkJ5eHFvna6pqKsot03HIOswkVp19eLSz8hMFJhCWK3HEcVAQGpa+XQS
-J4fpnOVxTiIs0RIYqjBeoiG52bv/9nTrMQHnO35YD5EWTXaJqAFPrSJmcPpLHZXB
-MFjqvNll2Jq0iOtJRlLf0lMVdssUXRlJsW9q09P9vMIt7EU/CT9YvvzU7wCMgTVy
-v/cY6pZifSsofxVsY9LKyn0FrMhtB20yvmi4BUCuVJhWPmbxMOjvxKuTXgfeMo8S
-dKpbNCNUwOpszv42kqgJF+qhLc9s44Qd3ocuMws8dOIhUDiVLlzg5cYx+dtA+mqh
-pIqTm6chBocdJ9PEoclMsG8CAwEAAaOBuzCBuDAOBgNVHQ8BAf8EBAMCAQYwDwYD
-VR0TAQH/BAUwAwEB/zBCBgNVHSAEOzA5MDcGBWA4AQEBMC4wLAYIKwYBBQUHAgEW
-IGh0dHA6Ly9yZXBvc2l0b3J5LmVpZC5iZWxnaXVtLmJlMB0GA1UdDgQWBBQQ8AxW
-m2HqVzq2NZdtn925FI7b5jARBglghkgBhvhCAQEEBAMCAAcwHwYDVR0jBBgwFoAU
-EPAMVpth6lc6tjWXbZ/duRSO2+YwDQYJKoZIhvcNAQEFBQADggEBAMhtIlGKYfgP
-lm7VILKB+MbcoxYA2s1q52sq+llIp0xJN9dzoWoBZV4yveeX09AuPHPTjHuD79ZC
-wT+oqV0PN7p20kC9zC0/00RBSZz9Wyn0AiMiW3Ebv1jZKE4tRfTa57VjRUQRDSp/
-M382SbTObqkCMa5c/ciJv0J71/Fg8teH9lcuen5qE4Ad3OPQYx49cTGxYNSeCMqr
-8JTHSHVUgfMbrXec6LKP24OsjzRr6L/D2fVDw2RV6xq9NoY2uiGMlxoh1OotO6y6
-7Kcdq765Sps1LxxcHVGnH1TtEpf/8m6HfUbJdNbv6z195lluBpQE5KJVhzgoaiJe
-4r50ErAEQyo=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDTDCCAjSgAwIBAgIId3cGJyapsXwwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UE
-BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVz
-dCBDb21tZXJjaWFsMB4XDTEwMDEyOTE0MDYwNloXDTMwMTIzMTE0MDYwNlowRDEL
-MAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZp
-cm1UcnVzdCBDb21tZXJjaWFsMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
-AQEA9htPZwcroRX1BiLLHwGy43NFBkRJLLtJJRTWzsO3qyxPxkEylFf6EqdbDuKP
-Hx6GGaeqtS25Xw2Kwq+FNXkyLbscYjfysVtKPcrNcV/pQr6U6Mje+SJIZMblq8Yr
-ba0F8PrVC8+a5fBQpIs7R6UjW3p6+DM/uO+Zl+MgwdYoic+U+7lF7eNAFxHUdPAL
-MeIrJmqbTFeurCA+ukV6BfO9m2kVrn1OIGPENXY6BwLJN/3HR+7o8XYdcxXyl6S1
-yHp52UKqK39c/s4mT6NmgTWvRLpUHhwwMmWd5jyTXlBOeuM61G7MGvv50jeuJCqr
-VwMiKA1JdX+3KNp1v47j3A55MQIDAQABo0IwQDAdBgNVHQ4EFgQUnZPGU4teyq8/
-nx4P5ZmVvCT2lI8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwDQYJ
-KoZIhvcNAQELBQADggEBAFis9AQOzcAN/wr91LoWXym9e2iZWEnStB03TX8nfUYG
-XUPGhi4+c7ImfU+TqbbEKpqrIZcUsd6M06uJFdhrJNTxFq7YpFzUf1GO7RgBsZNj
-vbz4YYCanrHOQnDiqX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivt
-Z8SOyUOyXGsViQK8YvxO8rUzqrJv0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9g
-N53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0khsUlHRUe072o0EclNmsxZt9YC
-nlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEQzCCAyugAwIBAgIDCYP0MA0GCSqGSIb3DQEBCwUAMFAxCzAJBgNVBAYTAkRF
-MRUwEwYDVQQKDAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBD
-bGFzcyAzIENBIDIgRVYgMjAwOTAeFw0wOTExMDUwODUwNDZaFw0yOTExMDUwODUw
-NDZaMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxELVRydXN0IEdtYkgxKjAoBgNV
-BAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAwOTCCASIwDQYJKoZI
-hvcNAQEBBQADggEPADCCAQoCggEBAJnxhDRwui+3MKCOvXwEz75ivJn9gpfSegpn
-ljgJ9hBOlSJzmY3aFS3nBfwZcyK3jpgAvDw9rKFs+9Z5JUut8Mxk2og+KbgPCdM0
-3TP1YtHhzRnp7hhPTFiu4h7WDFsVWtg6uMQYZB7jM7K1iXdODL/ZlGsTl28So/6Z
-qQTMFexgaDbtCHu39b+T7WYxg4zGcTSHThfqr4uRjRxWQa4iN1438h3Z0S0NL2lR
-p75mpoo6Kr3HGrHhFPC+Oh25z1uxav60sUYgovseO3Dvk5h9jHOW8sXvhXCtKSb8
-HgQ+HKDYD8tSg2J87otTlZCpV6LqYQXY+U3EJ/pure3511H3a6UCAwEAAaOCASQw
-ggEgMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNOUikxiEyoZLsyvcop9Ntea
-HNxnMA4GA1UdDwEB/wQEAwIBBjCB3QYDVR0fBIHVMIHSMIGHoIGEoIGBhn9sZGFw
-Oi8vZGlyZWN0b3J5LmQtdHJ1c3QubmV0L0NOPUQtVFJVU1QlMjBSb290JTIwQ2xh
-c3MlMjAzJTIwQ0ElMjAyJTIwRVYlMjAyMDA5LE89RC1UcnVzdCUyMEdtYkgsQz1E
-RT9jZXJ0aWZpY2F0ZXJldm9jYXRpb25saXN0MEagRKBChkBodHRwOi8vd3d3LmQt
-dHJ1c3QubmV0L2NybC9kLXRydXN0X3Jvb3RfY2xhc3NfM19jYV8yX2V2XzIwMDku
-Y3JsMA0GCSqGSIb3DQEBCwUAA4IBAQA07XtaPKSUiO8aEXUHL7P+PPoeUSbrh/Yp
-3uDx1MYkCenBz1UbtDDZzhr+BlGmFaQt77JLvyAoJUnRpjZ3NOhk31KxEcdzes05
-nsKtjHEh8lprr988TlWvsoRlFIm5d8sqMb7Po23Pb0iUMkZv53GMoKaEGTcH8gNF
-CSuGdXzfX2lXANtu2KZyIktQ1HWYVt+3GP9DQ1CuekR78HlR10M9p9OB0/DJT7na
-xpeG0ILD5EJt/rDiZE4OJudANCa1CInXCGNjOCd1HjPqbqjdn5lPdE2BiYBL3ZqX
-KVwvvoFBuYz/6n1gBp7N1z3TLqMVvKjmJuVvw9y4AyHqnxbxLFS1
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIF2TCCA8GgAwIBAgIQHp4o6Ejy5e/DfEoeWhhntjANBgkqhkiG9w0BAQsFADBk
-MQswCQYDVQQGEwJjaDERMA8GA1UEChMIU3dpc3Njb20xJTAjBgNVBAsTHERpZ2l0
-YWwgQ2VydGlmaWNhdGUgU2VydmljZXMxGzAZBgNVBAMTElN3aXNzY29tIFJvb3Qg
-Q0EgMjAeFw0xMTA2MjQwODM4MTRaFw0zMTA2MjUwNzM4MTRaMGQxCzAJBgNVBAYT
-AmNoMREwDwYDVQQKEwhTd2lzc2NvbTElMCMGA1UECxMcRGlnaXRhbCBDZXJ0aWZp
-Y2F0ZSBTZXJ2aWNlczEbMBkGA1UEAxMSU3dpc3Njb20gUm9vdCBDQSAyMIICIjAN
-BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAlUJOhJ1R5tMJ6HJaI2nbeHCOFvEr
-jw0DzpPMLgAIe6szjPTpQOYXTKueuEcUMncy3SgM3hhLX3af+Dk7/E6J2HzFZ++r
-0rk0X2s682Q2zsKwzxNoysjL67XiPS4h3+os1OD5cJZM/2pYmLcX5BtS5X4HAB1f
-2uY+lQS3aYg5oUFgJWFLlTloYhyxCwWJwDaCFCE/rtuh/bxvHGCGtlOUSbkrRsVP
-ACu/obvLP+DHVxxX6NZp+MEkUp2IVd3Chy50I9AU/SpHWrumnf2U5NGKpV+GY3aF
-y6//SSj8gO1MedK75MDvAe5QQQg1I3ArqRa0jG6F6bYRzzHdUyYb3y1aSgJA/MTA
-tukxGggo5WDDH8SQjhBiYEQN7Aq+VRhxLKX0srwVYv8c474d2h5Xszx+zYIdkeNL
-6yxSNLCK/RJOlrDrcH+eOfdmQrGrrFLadkBXeyq96G4DsguAhYidDMfCd7Camlf0
-uPoTXGiTOmekl9AbmbeGMktg2M7v0Ax/lZ9vh0+Hio5fCHyqW/xavqGRn1V9TrAL
-acywlKinh/LTSlDcX3KwFnUey7QYYpqwpzmqm59m2I2mbJYV4+by+PGDYmy7Velh
-k6M99bFXi08jsJvllGov34zflVEpYKELKeRcVVi3qPyZ7iVNTA6z00yPhOgpD/0Q
-VAKFyPnlw4vP5w8CAwEAAaOBhjCBgzAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0hBBYw
-FDASBgdghXQBUwIBBgdghXQBUwIBMBIGA1UdEwEB/wQIMAYBAf8CAQcwHQYDVR0O
-BBYEFE0mICKJS9PVpAqhb97iEoHF8TwuMB8GA1UdIwQYMBaAFE0mICKJS9PVpAqh
-b97iEoHF8TwuMA0GCSqGSIb3DQEBCwUAA4ICAQAyCrKkG8t9voJXiblqf/P0wS4R
-fbgZPnm3qKhyN2abGu2sEzsOv2LwnN+ee6FTSA5BesogpxcbtnjsQJHzQq0Qw1zv
-/2BZf82Fo4s9SBwlAjxnffUy6S8w5X2lejjQ82YqZh6NM4OKb3xuqFp1mrjX2lhI
-REeoTPpMSQpKwhI3qEAMw8jh0FcNlzKVxzqfl9NX+Ave5XLzo9v/tdhZsnPdTSpx
-srpJ9csc1fV5yJmz/MFMdOO0vSk3FQQoHt5FRnDsr7p4DooqzgB53MBfGWcsa0vv
-aGgLQ+OswWIJ76bdZWGgr4RVSJFSHMYlkSrQwSIjYVmvRRGFHQEkNI/Ps/8XciAT
-woCqISxxOQ7Qj1zB09GOInJGTB2Wrk9xseEFKZZZ9LuedT3PDTcNYtsmjGOpI99n
-Bjx8Oto0QuFmtEYE3saWmA9LSHokMnWRn6z3aOkquVVlzl1h0ydw2Df+n7mvoC5W
-t6NlUe07qxS/TFED6F+KBZvuim6c779o+sjaC+NCydAXFJy3SuCvkychVSa1ZC+N
-8f+mQAWFBVzKBxlcCxMoTFh/wqXvRdpg065lYZ1Tg3TCrvJcwhbtkj6EPnNgiLx2
-9CzP0H1907he0ZESEOnN3col49XtmS++dYFLJPlFRpTJKSFTnCZFqhMX5OfNeOI5
-wSsSnqaeG8XmDtkx2Q==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEZjCCA06gAwIBAgIQRL4Mi1AAJLQR0zYt4LNfGzANBgkqhkiG9w0BAQUFADCB
-lTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug
-Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho
-dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHTAbBgNVBAMTFFVUTi1VU0VSRmlyc3Qt
-T2JqZWN0MB4XDTk5MDcwOTE4MzEyMFoXDTE5MDcwOTE4NDAzNlowgZUxCzAJBgNV
-BAYTAlVTMQswCQYDVQQIEwJVVDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxHjAc
-BgNVBAoTFVRoZSBVU0VSVFJVU1QgTmV0d29yazEhMB8GA1UECxMYaHR0cDovL3d3
-dy51c2VydHJ1c3QuY29tMR0wGwYDVQQDExRVVE4tVVNFUkZpcnN0LU9iamVjdDCC
-ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM6qgT+jo2F4qjEAVZURnicP
-HxzfOpuCaDDASmEd8S8O+r5596Uj71VRloTN2+O5bj4x2AogZ8f02b+U60cEPgLO
-KqJdhwQJ9jCdGIqXsqoc/EHSoTbL+z2RuufZcDX65OeQw5ujm9M89RKZd7G3CeBo
-5hy485RjiGpq/gt2yb70IuRnuasaXnfBhQfdDWy/7gbHd2pBnqcP1/vulBe3/IW+
-pKvEHDHd17bR5PDv3xaPslKT16HUiaEHLr/hARJCHhrh2JU022R5KP+6LhHC5ehb
-kkj7RwvCbNqtMoNB86XlQXD9ZZBt+vpRxPm9lisZBCzTbafc8H9vg2XiaquHhnUC
-AwEAAaOBrzCBrDALBgNVHQ8EBAMCAcYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4E
-FgQU2u1kdBScFDyr3ZmpvVsoTYs8ydgwQgYDVR0fBDswOTA3oDWgM4YxaHR0cDov
-L2NybC51c2VydHJ1c3QuY29tL1VUTi1VU0VSRmlyc3QtT2JqZWN0LmNybDApBgNV
-HSUEIjAgBggrBgEFBQcDAwYIKwYBBQUHAwgGCisGAQQBgjcKAwQwDQYJKoZIhvcN
-AQEFBQADggEBAAgfUrE3RHjb/c652pWWmKpVZIC1WkDdIaXFwfNfLEzIR1pp6ujw
-NTX00CXzyKakh0q9G7FzCL3Uw8q2NbtZhncxzaeAFK4T7/yxSPlrJSUtUbYsbUXB
-mMiKVl0+7kNOPmsnjtA6S4ULX9Ptaqd1y9Fahy85dRNacrACgZ++8A+EVCBibGnU
-4U3GDZlDAQ0Slox4nb9QorFEqmrPF3rPbw/U+CRVX/A0FklmPlBGyWNxODFiuGK5
-81OtbLUrohKqGU8J2l7nk8aOFAj+8DCAGKCGhU3IfdeLA/5u1fedFqySLKAj5ZyR
-Uh+U3xeUc8OzwcFxBSAAeL0TUh2oPs0AH8g=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDjjCCAnagAwIBAgIIKv++n6Lw6YcwDQYJKoZIhvcNAQEFBQAwKDELMAkGA1UE
-BhMCQkUxGTAXBgNVBAMTEEJlbGdpdW0gUm9vdCBDQTIwHhcNMDcxMDA0MTAwMDAw
-WhcNMjExMjE1MDgwMDAwWjAoMQswCQYDVQQGEwJCRTEZMBcGA1UEAxMQQmVsZ2l1
-bSBSb290IENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMZzQh6S
-/3UPi790hqc/7bIYLS2X+an7mEoj39WN4IzGMhwWLQdC1i22bi+n9fzGhYJdld61
-IgDMqFNAn68KNaJ6x+HK92AQZw6nUHMXU5WfIp8MXW+2QbyM69odRr2nlL/zGsvU
-+40OHjPIltfsjFPekx40HopQcSZYtF3CiInaYNKJIT/e1wEYNm7hLHADBGXvmAYr
-XR5i3FVr/mZkIV/4L+HXmymvb82fqgxG0YjFnaKVn6w/Fa7yYd/vw2uaItgscf1Y
-HewApDgglVrH1Tdjuk+bqv5WRi5j2Qsj1Yr6tSPwiRuhFA0m2kHwOI8w7QUmecFL
-TqG4flVSOmlGhHUCAwEAAaOBuzCBuDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/
-BAUwAwEB/zBCBgNVHSAEOzA5MDcGBWA4CQEBMC4wLAYIKwYBBQUHAgEWIGh0dHA6
-Ly9yZXBvc2l0b3J5LmVpZC5iZWxnaXVtLmJlMB0GA1UdDgQWBBSFiuv0xbu+DlkD
-lN7WgAEV4xCcOTARBglghkgBhvhCAQEEBAMCAAcwHwYDVR0jBBgwFoAUhYrr9MW7
-vg5ZA5Te1oABFeMQnDkwDQYJKoZIhvcNAQEFBQADggEBAFHYhd27V2/MoGy1oyCc
-UwnzSgEMdL8rs5qauhjyC4isHLMzr87lEwEnkoRYmhC598wUkmt0FoqW6FHvv/pK
-JaeJtmMrXZRY0c8RcrYeuTlBFk0pvDVTC9rejg7NqZV3JcqUWumyaa7YwBO+mPyW
-nIR/VRPmPIfjvCCkpDZoa01gZhz5v6yAlGYuuUGK02XThIAC71AdXkbc98m6tTR8
-KvPG2F9fVJ3bTc0R5/0UAoNmXsimABKgX77OFP67H6dh96tK8QYUn8pJQsKpvO2F
-sauBQeYNxUJpU4c5nUwfAA4+Bw11V0SoU7Q2dmSZ3G7rPUZuFF1eR1ONeE3gJ7uO
-hXY=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFyjCCA7KgAwIBAgIEAJiWjDANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJO
-TDEeMBwGA1UECgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFh
-dCBkZXIgTmVkZXJsYW5kZW4gUm9vdCBDQSAtIEcyMB4XDTA4MDMyNjExMTgxN1oX
-DTIwMDMyNTExMDMxMFowWjELMAkGA1UEBhMCTkwxHjAcBgNVBAoMFVN0YWF0IGRl
-ciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5lZGVybGFuZGVuIFJv
-b3QgQ0EgLSBHMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMVZ5291
-qj5LnLW4rJ4L5PnZyqtdj7U5EILXr1HgO+EASGrP2uEGQxGZqhQlEq0i6ABtQ8Sp
-uOUfiUtnvWFI7/3S4GCI5bkYYCjDdyutsDeqN95kWSpGV+RLufg3fNU254DBtvPU
-Z5uW6M7XxgpT0GtJlvOjCwV3SPcl5XCsMBQgJeN/dVrlSPhOewMHBPqCYYdu8DvE
-pMfQ9XQ+pV0aCPKbJdL2rAQmPlU6Yiile7Iwr/g3wtG61jj99O9JMDeZJiFIhQGp
-5Rbn3JBV3w/oOM2ZNyFPXfUib2rFEhZgF1XyZWampzCROME4HYYEhLoaJXhena/M
-UGDWE4dS7WMfbWV9whUYdMrhfmQpjHLYFhN9C0lK8SgbIHRrxT3dsKpICT0ugpTN
-GmXZK4iambwYfp/ufWZ8Pr2UuIHOzZgweMFvZ9C+X+Bo7d7iscksWXiSqt8rYGPy
-5V6548r6f1CGPqI0GAwJaCgRHOThuVw+R7oyPxjMW4T182t0xHJ04eOLoEq9jWYv
-6q012iDTiIJh8BIitrzQ1aTsr1SIJSQ8p22xcik/Plemf1WvbibG/ufMQFxRRIEK
-eN5KzlW/HdXZt1bv8Hb/C3m1r737qWmRRpdogBQ2HbN/uymYNqUg+oJgYjOk7Na6
-B6duxc8UpufWkjTYgfX8HV2qXB72o007uPc5AgMBAAGjgZcwgZQwDwYDVR0TAQH/
-BAUwAwEB/zBSBgNVHSAESzBJMEcGBFUdIAAwPzA9BggrBgEFBQcCARYxaHR0cDov
-L3d3dy5wa2lvdmVyaGVpZC5ubC9wb2xpY2llcy9yb290LXBvbGljeS1HMjAOBgNV
-HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJFoMocVHYnitfGsNig0jQt8YojrMA0GCSqG
-SIb3DQEBCwUAA4ICAQCoQUpnKpKBglBu4dfYszk78wIVCVBR7y29JHuIhjv5tLyS
-CZa59sCrI2AGeYwRTlHSeYAz+51IvuxBQ4EffkdAHOV6CMqqi3WtFMTC6GY8ggen
-5ieCWxjmD27ZUD6KQhgpxrRW/FYQoAUXvQwjf/ST7ZwaUb7dRUG/kSS0H4zpX897
-IZmflZ85OkYcbPnNe5yQzSipx6lVu6xiNGI1E0sUOlWDuYaNkqbG9AclVMwWVxJK
-gnjIFNkXgiYtXSAfea7+1HAWFpWD2DU5/1JddRwWxRNVz0fMdWVSSt7wsKfkCpYL
-+63C4iWEst3kvX5ZbJvw8NjnyvLplzh+ib7M+zkXYT9y2zqR2GUBGR2tUKRXCnxL
-vJxxcypFURmFzI79R6d0lR2o0a9OF7FpJsKqeFdbxU2n5Z4FF5TKsl+gSRiNNOkm
-bEgeqmiSBeGCc1qb3AdbCG19ndeNIdn8FCCqwkXfP+cAslHkwvgFuXkajDTznlvk
-N1trSt8sV4pAWja63XVECDdCcAz+3F4hoKOKwJCcaNpQ5kUQR3i2TtJlycM33+FC
-Y7BXN0Ute4qcvwXqZVUz9zkQxSgqIXobisQk+T8VyJoVIPVVYpbtbZNQvOSqeK3Z
-ywplh6ZmwcSBo3c6WB4L7oOLnR7SUqTMHW+wmG2UMbX4cQrcufx9MmDm66+KAQ==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIICHjCCAaSgAwIBAgIRYFlJ4CYuu1X5CneKcflK2GwwCgYIKoZIzj0EAwMwUDEk
-MCIGA1UECxMbR2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpH
-bG9iYWxTaWduMRMwEQYDVQQDEwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoX
-DTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMbR2xvYmFsU2lnbiBFQ0MgUm9vdCBD
-QSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQDEwpHbG9iYWxTaWdu
-MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAER0UOlvt9Xb/pOdEh+J8LttV7HpI6SFkc
-8GIxLcB6KP4ap1yztsyX50XUWPrRd21DosCHZTQKH3rd6zwzocWdTaRvQZU4f8ke
-hOvRnkmSh5SHDDqFSmafnVmTTZdhBoZKo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYD
-VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUPeYpSJvqB8ohREom3m7e0oPQn1kwCgYI
-KoZIzj0EAwMDaAAwZQIxAOVpEslu28YxuglB4Zf4+/2a4n0Sye18ZNPLBSWLVtmg
-515dTguDnFt2KaAJJiFqYgIwcdK1j1zqO+F4CYWodZI7yFz9SO8NdCKoCOJuxUnO
-xwy8p2Fp8fc74SrL+SvzZpA3
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIHSTCCBTGgAwIBAgIJAMnN0+nVfSPOMA0GCSqGSIb3DQEBBQUAMIGsMQswCQYD
-VQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0
-IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3
-MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xJzAlBgNVBAMTHkdsb2JhbCBD
-aGFtYmVyc2lnbiBSb290IC0gMjAwODAeFw0wODA4MDExMjMxNDBaFw0zODA3MzEx
-MjMxNDBaMIGsMQswCQYDVQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUgY3Vy
-cmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAG
-A1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xJzAl
-BgNVBAMTHkdsb2JhbCBDaGFtYmVyc2lnbiBSb290IC0gMjAwODCCAiIwDQYJKoZI
-hvcNAQEBBQADggIPADCCAgoCggIBAMDfVtPkOpt2RbQT2//BthmLN0EYlVJH6xed
-KYiONWwGMi5HYvNJBL99RDaxccy9Wglz1dmFRP+RVyXfXjaOcNFccUMd2drvXNL7
-G706tcuto8xEpw2uIRU/uXpbknXYpBI4iRmKt4DS4jJvVpyR1ogQC7N0ZJJ0YPP2
-zxhPYLIj0Mc7zmFLmY/CDNBAspjcDahOo7kKrmCgrUVSY7pmvWjg+b4aqIG7HkF4
-ddPB/gBVsIdU6CeQNR1MM62X/JcumIS/LMmjv9GYERTtY/jKmIhYF5ntRQOXfjyG
-HoiMvvKRhI9lNNgATH23MRdaKXoKGCQwoze1eqkBfSbW+Q6OWfH9GzO1KTsXO0G2
-Id3UwD2ln58fQ1DJu7xsepeY7s2MH/ucUa6LcL0nn3HAa6x9kGbo1106DbDVwo3V
-yJ2dwW3Q0L9R5OP4wzg2rtandeavhENdk5IMagfeOx2YItaswTXbo6Al/3K1dh3e
-beksZixShNBFks4c5eUzHdwHU1SjqoI7mjcv3N2gZOnm3b2u/GSFHTynyQbehP9r
-6GsaPMWis0L7iwk+XwhSx2LE1AVxv8Rk5Pihg+g+EpuoHtQ2TS9x9o0o9oOpE9Jh
-wZG7SMA0j0GMS0zbaRL/UJScIINZc+18ofLx/d33SdNDWKBWY8o9PeU1VlnpDsog
-zCtLkykPAgMBAAGjggFqMIIBZjASBgNVHRMBAf8ECDAGAQH/AgEMMB0GA1UdDgQW
-BBS5CcqcHtvTbDprru1U8VuTBjUuXjCB4QYDVR0jBIHZMIHWgBS5CcqcHtvTbDpr
-ru1U8VuTBjUuXqGBsqSBrzCBrDELMAkGA1UEBhMCRVUxQzBBBgNVBAcTOk1hZHJp
-ZCAoc2VlIGN1cnJlbnQgYWRkcmVzcyBhdCB3d3cuY2FtZXJmaXJtYS5jb20vYWRk
-cmVzcykxEjAQBgNVBAUTCUE4Mjc0MzI4NzEbMBkGA1UEChMSQUMgQ2FtZXJmaXJt
-YSBTLkEuMScwJQYDVQQDEx5HbG9iYWwgQ2hhbWJlcnNpZ24gUm9vdCAtIDIwMDiC
-CQDJzdPp1X0jzjAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRVHSAAMCow
-KAYIKwYBBQUHAgEWHGh0dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20wDQYJKoZI
-hvcNAQEFBQADggIBAICIf3DekijZBZRG/5BXqfEv3xoNa/p8DhxJJHkn2EaqbylZ
-UohwEurdPfWbU1Rv4WCiqAm57OtZfMY18dwY6fFn5a+6ReAJ3spED8IXDneRRXoz
-X1+WLGiLwUePmJs9wOzL9dWCkoQ10b42OFZyMVtHLaoXpGNR6woBrX/sdZ7LoR/x
-fxKxueRkf2fWIyr0uDldmOghp+G9PUIadJpwr2hsUF1Jz//7Dl3mLEfXgTpZALVz
-a2Mg9jFFCDkO9HB+QHBaP9BrQql0PSgvAm11cpUJjUhjxsYjV5KTXjXBjfkK9yyd
-Yhz2rXzdpjEetrHHfoUm+qRqtdpjMNHvkzeyZi99Bffnt0uYlDXA2TopwZ2yUDMd
-SqlapskD7+3056huirRXhOukP9DuqqqHW2Pok+JrqNS4cnhrG+055F3Lm6qH1U9O
-AP7Zap88MQ8oAgF9mOinsKJknnn4SPIVqczmyETrP3iZ8ntxPjzxmKfFGBI/5rso
-M0LpRQp8bfKGeS/Fghl9CYl8slR2iK7ewfPM4W7bMdaTrpmg7yVqc5iJWzouE4ge
-v8CSlDQb4ye3ix5vQv/n6TebUB0tovkC7stYWDpxvGjjqsGvHCgfotwjZT+B6q6Z
-09gwzxMNTxXJhLynSC34MCN32EZLeW32jO06f2ARePTpm67VVMB0gNELQp/B
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIF3zCCA8egAwIBAgIOGTMAAQACKBqaBLzyVUUwDQYJKoZIhvcNAQEFBQAwejEL
-MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxJDAiBgNV
-BAsTG1RDIFRydXN0Q2VudGVyIFVuaXZlcnNhbCBDQTEnMCUGA1UEAxMeVEMgVHJ1
-c3RDZW50ZXIgVW5pdmVyc2FsIENBIElJMB4XDTA2MDMyMjE1NTgzNFoXDTMwMTIz
-MTIyNTk1OVowejELMAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVy
-IEdtYkgxJDAiBgNVBAsTG1RDIFRydXN0Q2VudGVyIFVuaXZlcnNhbCBDQTEnMCUG
-A1UEAxMeVEMgVHJ1c3RDZW50ZXIgVW5pdmVyc2FsIENBIElJMIICIjANBgkqhkiG
-9w0BAQEFAAOCAg8AMIICCgKCAgEAi9R3azRs5TbYalxeOO781R15Azt7g2JEgk6I
-7d6D/+7MUGIFBZWZdpj2ufJf2AaRksL2LWYXH/1TA+iojWOpbuHWG4y8mLOLO9Tk
-Lsp9hUkmW3m4GotAnn+7yT9jLM/RWny6KCJBElpN+Rd3/IX9wkngKhh/6aAsnPlE
-/AxoOUL1JwW+jhV6YJ3wO8c85j4WvK923mq3ouGrRkXrjGV90ZfzlxElq1nroCLZ
-gt2Y7X7i+qBhCkoy3iwX921E6oFHWZdXNwM53V6CItQzuPomCba8OYgvURVOm8M7
-3xOCiN1LNPIz1pDp81PcNXzAw9l8eLPNcD+NauCjgUjkKa1juPD8KGQ7mbN9/pqd
-iPaZIgiRRxaJNXhdd6HPv0nh/SSUK2k2e+gc5iqQilvVOzRZQtxtz7sPQRxVzfUN
-Wy4WIibvYR6X/OJTyM9bo8ep8boOhhLLE8oVx+zkNo3aXBM9ZdIOXXB03L+PemrB
-Lg/Txl4PK1lszGFs/sBhTtnmT0ayWuIZFHCE+CAA7QGnl37DvRJckiMXoKUdRRcV
-I5qSCLUiiI3cKyTr4LEXaNOvYb3ZhXj2jbp4yjeNY77nrB/fpUcJucglMVRGURFV
-DYlcjdrSGC1z8rjVJ/VIIjfRYvd7Dcg4i6FKsPzQ8eu3hmPn4A5zf/1yUbXpfeJV
-BWR4Z38CAwEAAaNjMGEwHwYDVR0jBBgwFoAUzdeQoW6jv9sw1toyJZAM5jkegGUw
-DwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFM3XkKFu
-o7/bMNbaMiWQDOY5HoBlMA0GCSqGSIb3DQEBBQUAA4ICAQB+FojoEw42zG4qhQc4
-xlaJeuNHIWZMUAgxWlHQ/KZeFHXeTDvs8e3MfhEHSmHu6rOOOqQzxu2KQmZP8Tx7
-yaUFQZmx7Cxb7tyW0ohTS3g0uW7muw/FeqZ8Dhjfbw90TNGp8aHp2FRkzF6WeKJW
-GsFzshXGVwXf2vdIJIqOf2qp+U3pPmrOYCx9LZAI9mOPFdAtnIz/8f38DBZQVhT7
-upeG7rRJA1TuG1l/MDoCgoYhrv7wFfLfToPmmcW6NfcgkIw47XXP4S73BDD7Ua2O
-giRAyn0pXdXZ92Vk/KqfdLh9kl3ShCngE+qK99CrxK7vFcXCifJ7tjtJmGHzTnKR
-N4xJkunI7Cqg90lufA0kxmts8jgvynAF5X/fxisrgIDV2m/LQLvYG/AkyRDIRAJ+
-LtOYqqIN8SvQ2vqOHP9U6OFKbt2o1ni1N6WsZNUUI8cOpevhCTjXwHxgpV2Yj4wC
-1dxWqPNNWKkL1HxkdAEy8t8PSoqpAqKiHYR3wvHMl700GXRd4nQ+dSf3r7/ufA5t
-VIimVuImrTESPB5BeW0X6hNeH/Vcn0lZo7Ivo0LD+qh+v6WfSMlgYmIK371F3uNC
-tVGW/cT1Gpm4UqJEzS1hjBWPgdVdotSQPYxuQGHDWV3Y2eH2dEcieXR92sqjbzcV
-NvAsGnE8EXbfXRo+VGN4a2V+Hw==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIF2TCCA8GgAwIBAgIQXAuFXAvnWUHfV8w/f52oNjANBgkqhkiG9w0BAQUFADBk
-MQswCQYDVQQGEwJjaDERMA8GA1UEChMIU3dpc3Njb20xJTAjBgNVBAsTHERpZ2l0
-YWwgQ2VydGlmaWNhdGUgU2VydmljZXMxGzAZBgNVBAMTElN3aXNzY29tIFJvb3Qg
-Q0EgMTAeFw0wNTA4MTgxMjA2MjBaFw0yNTA4MTgyMjA2MjBaMGQxCzAJBgNVBAYT
-AmNoMREwDwYDVQQKEwhTd2lzc2NvbTElMCMGA1UECxMcRGlnaXRhbCBDZXJ0aWZp
-Y2F0ZSBTZXJ2aWNlczEbMBkGA1UEAxMSU3dpc3Njb20gUm9vdCBDQSAxMIICIjAN
-BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0LmwqAzZuz8h+BvVM5OAFmUgdbI9
-m2BtRsiMMW8Xw/qabFbtPMWRV8PNq5ZJkCoZSx6jbVfd8StiKHVFXqrWW/oLJdih
-FvkcxC7mlSpnzNApbjyFNDhhSbEAn9Y6cV9Nbc5fuankiX9qUvrKm/LcqfmdmUc/
-TilftKaNXXsLmREDA/7n29uj/x2lzZAeAR81sH8A25Bvxn570e56eqeqDFdvpG3F
-EzuwpdntMhy0XmeLVNxzh+XTF3xmUHJd1BpYwdnP2IkCb6dJtDZd0KTeByy2dbco
-kdaXvij1mB7qWybJvbCXc9qukSbraMH5ORXWZ0sKbU/Lz7DkQnGMU3nn7uHbHaBu
-HYwadzVcFh4rUx80i9Fs/PJnB3r1re3WmquhsUvhzDdf/X/NTa64H5xD+SpYVUNF
-vJbNcA78yeNmuk6NO4HLFWR7uZToXTNShXEuT46iBhFRyePLoW4xCGQMwtI89Tbo
-19AOeCMgkckkKmUpWyL3Ic6DXqTz3kvTaI9GdVyDCW4pa8RwjPWd1yAv/0bSKzjC
-L3UcPX7ape8eYIVpQtPM+GP+HkM5haa2Y0EQs3MevNP6yn0WR+Kn1dCjigoIlmJW
-bjTb2QK5MHXjBNLnj8KwEUAKrNVxAmKLMb7dxiNYMUJDLXT5xp6mig/p/r+D5kNX
-JLrvRjSq1xIBOO0CAwEAAaOBhjCBgzAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0hBBYw
-FDASBgdghXQBUwABBgdghXQBUwABMBIGA1UdEwEB/wQIMAYBAf8CAQcwHwYDVR0j
-BBgwFoAUAyUv3m+CATpcLNwroWm1Z9SM0/0wHQYDVR0OBBYEFAMlL95vggE6XCzc
-K6FptWfUjNP9MA0GCSqGSIb3DQEBBQUAA4ICAQA1EMvspgQNDQ/NwNurqPKIlwzf
-ky9NfEBWMXrrpA9gzXrzvsMnjgM+pN0S734edAY8PzHyHHuRMSG08NBsl9Tpl7Ik
-Vh5WwzW9iAUPWxAaZOHHgjD5Mq2eUCzneAXQMbFamIp1TpBcahQq4FJHgmDmHtqB
-sfsUC1rxn9KVuj7QG9YVHaO+htXbD8BJZLsuUBlL0iT43R4HVtA4oJVwIHaM190e
-3p9xxCPvgxNcoyQVTSlAPGrEqdi3pkSlDfTgnXceQHAm/NrZNuR55LU/vJtlvrsR
-ls/bxig5OgjOR1tTWsWZ/l2p3e9M1MalrQLmjAcSHm8D0W+go/MpvRLHUKKwf4ip
-mXeascClOS5cfGniLLDqN2qk4Vrh9VDlg++luyqI54zb/W1elxmofmZ1a3Hqv7HH
-b6D0jqTsNFFbjCYDcKF31QESVwA12yPeDooomf2xEG9L/zgtYE4snOtnta1J7ksf
-rK/7DZBaZmBwXarNeNQk7shBoJMBkpxqnvy5JMWzFYJ+vq6VK+uxwNrjAWALXmms
-hFZhvnEX/h0TD/7Gh0Xp/jKgGg0TpJRVcaUWi7rKibCyx/yP2FS1k2Kdzs9Z+z0Y
-zirLNRWCXf9UIltxUvu3yf5gmwBBZPCqKuy2QkPOiWaByIufOVQDJdMWNY6E0F/6
-MBr1mmz0DlP5OlvRHA==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEXjCCA0agAwIBAgIQRL4Mi1AAIbQR0ypoBqmtaTANBgkqhkiG9w0BAQUFADCB
-kzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug
-Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho
-dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xGzAZBgNVBAMTElVUTiAtIERBVEFDb3Jw
-IFNHQzAeFw05OTA2MjQxODU3MjFaFw0xOTA2MjQxOTA2MzBaMIGTMQswCQYDVQQG
-EwJVUzELMAkGA1UECBMCVVQxFzAVBgNVBAcTDlNhbHQgTGFrZSBDaXR5MR4wHAYD
-VQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxITAfBgNVBAsTGGh0dHA6Ly93d3cu
-dXNlcnRydXN0LmNvbTEbMBkGA1UEAxMSVVROIC0gREFUQUNvcnAgU0dDMIIBIjAN
-BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3+5YEKIrblXEjr8uRgnn4AgPLit6
-E5Qbvfa2gI5lBZMAHryv4g+OGQ0SR+ysraP6LnD43m77VkIVni5c7yPeIbkFdicZ
-D0/Ww5y0vpQZY/KmEQrrU0icvvIpOxboGqBMpsn0GFlowHDyUwDAXlCCpVZvNvlK
-4ESGoE1O1kduSUrLZ9emxAW5jh70/P/N5zbgnAVssjMiFdC04MwXwLLA9P4yPykq
-lXvY8qdOD1R8oQ2AswkDwf9c3V6aPryuvEeKaq5xyh+xKrhfQgUL7EYw0XILyulW
-bfXv33i+Ybqypa4ETLyorGkVl73v67SMvzX41MPRKA5cOp9wGDMgd8SirwIDAQAB
-o4GrMIGoMAsGA1UdDwQEAwIBxjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRT
-MtGzz3/64PGgXYVOktKeRR20TzA9BgNVHR8ENjA0MDKgMKAuhixodHRwOi8vY3Js
-LnVzZXJ0cnVzdC5jb20vVVROLURBVEFDb3JwU0dDLmNybDAqBgNVHSUEIzAhBggr
-BgEFBQcDAQYKKwYBBAGCNwoDAwYJYIZIAYb4QgQBMA0GCSqGSIb3DQEBBQUAA4IB
-AQAnNZcAiosovcYzMB4p/OL31ZjUQLtgyr+rFywJNn9Q+kHcrpY6CiM+iVnJowft
-Gzet/Hy+UUla3joKVAgWRcKZsYfNjGjgaQPpxE6YsjuMFrMOoAyYUJuTqXAJyCyj
-j98C5OBxOvG0I3KgqgHf35g+FFCgMSa9KOlaMCZ1+XtgHI3zzVAmbQQnmt/VDUVH
-KWss5nbZqSl9Mt3JNjy9rjXxEZ4du5A/EkdOjtd+D2JzHVImOBwYSf0wdJrE5SIv
-2MCN7ZF6TACPcn9d2t0bi0Vr591pl6jFVkwPDPafepE39peC4N1xaf92P2BNPM/3
-mfnGV/TJVTl4uix5yaaIK/QI
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEBDCCAuygAwIBAgIIGHqpqMKWIQwwDQYJKoZIhvcNAQELBQAwYjELMAkGA1UE
-BhMCVVMxEzARBgNVBAoTCkFwcGxlIEluYy4xJjAkBgNVBAsTHUFwcGxlIENlcnRp
-ZmljYXRpb24gQXV0aG9yaXR5MRYwFAYDVQQDEw1BcHBsZSBSb290IENBMB4XDTEy
-MDIwMTIyMTIxNVoXDTI3MDIwMTIyMTIxNVoweTEtMCsGA1UEAwwkRGV2ZWxvcGVy
-IElEIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MSYwJAYDVQQLDB1BcHBsZSBDZXJ0
-aWZpY2F0aW9uIEF1dGhvcml0eTETMBEGA1UECgwKQXBwbGUgSW5jLjELMAkGA1UE
-BhMCVVMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCJdk8GW5pB7qUj
-KwKjX9dzP8A1sIuECj8GJH+nlT/rTw6Tr7QO0Mg+5W0Ysx/oiUe/1wkI5P9WmCkV
-55SduTWjCs20wOHiYPTK7Cl4RWlpYGtfipL8niPmOsIiszFPHLrytjRZQu6wqQID
-GJEEtrN4LjMfgEUNRW+7Dlpbfzrn2AjXCw4ybfuGNuRsq8QRinCEJqqfRNHxuMZ7
-lBebSPcLWBa6I8WfFTl+yl3DMl8P4FJ/QOq+rAhklVvJGpzlgMofakQcbD7EsCYf
-Hex7r16gaj1HqVgSMT8gdihtHRywwk4RaSaLy9bQEYLJTg/xVnTQ2QhLZniiq6yn
-4tJMh1nJAgMBAAGjgaYwgaMwHQYDVR0OBBYEFFcX7aLP3HyYoRDg/L6HLSzy4xdU
-MA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUK9BpR5R2Cf70a40uQKb3R01/
-CF4wLgYDVR0fBCcwJTAjoCGgH4YdaHR0cDovL2NybC5hcHBsZS5jb20vcm9vdC5j
-cmwwDgYDVR0PAQH/BAQDAgGGMBAGCiqGSIb3Y2QGAgYEAgUAMA0GCSqGSIb3DQEB
-CwUAA4IBAQBCOXRrodzGpI83KoyzHQpEvJUsf7xZuKxh+weQkjK51L87wVA5akR0
-ouxbH3Dlqt1LbBwjcS1f0cWTvu6binBlgp0W4xoQF4ktqM39DHhYSQwofzPuAHob
-tHastrW7T9+oG53IGZdKC1ZnL8I+trPEgzrwd210xC4jUe6apQNvYPSlSKcGwrta
-4h8fRkV+5Jf1JxC3ICJyb3LaxlB1xT0lj12jAOmfNoxIOY+zO+qQgC6VmmD0eM70
-DgpTPqL6T9geroSVjTK8Vk2J6XgY4KyaQrp6RhuEoonOFOiI0ViL9q5WxCwFKkWv
-C9lLqQIPNKyIx2FViUTJJ3MH7oLlTvVw
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEvTCCA6WgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBhTELMAkGA1UEBhMCVVMx
-IDAeBgNVBAoMF1dlbGxzIEZhcmdvIFdlbGxzU2VjdXJlMRwwGgYDVQQLDBNXZWxs
-cyBGYXJnbyBCYW5rIE5BMTYwNAYDVQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMgUm9v
-dCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDcxMjEzMTcwNzU0WhcNMjIxMjE0
-MDAwNzU0WjCBhTELMAkGA1UEBhMCVVMxIDAeBgNVBAoMF1dlbGxzIEZhcmdvIFdl
-bGxzU2VjdXJlMRwwGgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYwNAYDVQQD
-DC1XZWxsc1NlY3VyZSBQdWJsaWMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkw
-ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDub7S9eeKPCCGeOARBJe+r
-WxxTkqxtnt3CxC5FlAM1iGd0V+PfjLindo8796jE2yljDpFoNoqXjopxaAkH5OjU
-Dk/41itMpBb570OYj7OeUt9tkTmPOL13i0Nj67eT/DBMHAGTthP796EfvyXhdDcs
-HqRePGj4S78NuR4uNuip5Kf4D8uCdXw1LSLWwr8L87T8bJVhHlfXBIEyg1J55oNj
-z7fLY4sR4r1e6/aN7ZVyKLSsEmLpSjPmgzKuBXWVvYSV2ypcm44uDLiBK0HmOFaf
-SZtsdvqKXfcBeYF8wYNABf5x/Qw/zE5gCQ5lRxAvAcAFP4/4s0HvWkJ+We/Slwxl
-AgMBAAGjggE0MIIBMDAPBgNVHRMBAf8EBTADAQH/MDkGA1UdHwQyMDAwLqAsoCqG
-KGh0dHA6Ly9jcmwucGtpLndlbGxzZmFyZ28uY29tL3dzcHJjYS5jcmwwDgYDVR0P
-AQH/BAQDAgHGMB0GA1UdDgQWBBQmlRkQ2eihl5H/3BnZtQQ+0nMKajCBsgYDVR0j
-BIGqMIGngBQmlRkQ2eihl5H/3BnZtQQ+0nMKaqGBi6SBiDCBhTELMAkGA1UEBhMC
-VVMxIDAeBgNVBAoMF1dlbGxzIEZhcmdvIFdlbGxzU2VjdXJlMRwwGgYDVQQLDBNX
-ZWxscyBGYXJnbyBCYW5rIE5BMTYwNAYDVQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMg
-Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHmCAQEwDQYJKoZIhvcNAQEFBQADggEB
-ALkVsUSRzCPIK0134/iaeycNzXK7mQDKfGYZUMbVmO2rvwNa5U3lHshPcZeG1eMd
-/ZDJPHV3V3p9+N701NX3leZ0bh08rnyd2wIDBSxxSyU+B+NemvVmFymIGjifz6pB
-A4SXa5M4esowRBskRDPQ5NHcKDj0E0M1NSljqHyita04pO2t/caaH/+Xc/77szWn
-k4bGdpEA5qxRFsQnMlzbc9qlk1eOPm01JghZ1edE13YgY+esE2fDbbFwRnzVlhE9
-iW9dqKHrjQrawx0zbKPqZxmamX9LPYNRKh3KL4YMon4QLSvUFpULB6ouFJJJtylv
-2G0xffX8oRAHh84vWdw+WNs=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIICqDCCAi2gAwIBAgIQIW4zpcvTiKRvKQe0JzzE2DAKBggqhkjOPQQDAzCBlDEL
-MAkGA1UEBhMCVVMxHTAbBgNVBAoTFFN5bWFudGVjIENvcnBvcmF0aW9uMR8wHQYD
-VQQLExZTeW1hbnRlYyBUcnVzdCBOZXR3b3JrMUUwQwYDVQQDEzxTeW1hbnRlYyBD
-bGFzcyAxIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0g
-RzQwHhcNMTExMDA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBlDELMAkGA1UEBhMC
-VVMxHTAbBgNVBAoTFFN5bWFudGVjIENvcnBvcmF0aW9uMR8wHQYDVQQLExZTeW1h
-bnRlYyBUcnVzdCBOZXR3b3JrMUUwQwYDVQQDEzxTeW1hbnRlYyBDbGFzcyAxIFB1
-YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzQwdjAQBgcq
-hkjOPQIBBgUrgQQAIgNiAATXZrUb266zYO5G6ohjdTsqlG3zXxL24w+etgoUU0hS
-yNw6s8tIICYSTvqJhNTfkeQpfSgB2dsYQ2mhH7XThhbcx39nI9/fMTGDAzVwsUu3
-yBe7UcvclBfb6gk7dhLeqrWjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8E
-BTADAQH/MB0GA1UdDgQWBBRlwI0l9Qy6l3eQP54u4Fr1ztXh5DAKBggqhkjOPQQD
-AwNpADBmAjEApa7jRlP4mDbjIvouKEkN7jB+M/PsP3FezFWJeJmssv3cHFwzjim5
-axfIEWi13IMHAjEAnMhE2mnCNsNUGRCFAtqdR+9B52wmnQk9922Q0QVEL7C8g5No
-8gxFSTm/mQQc0xCg
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIID3TCCAsWgAwIBAgIOHaIAAQAC7LdggHiNtgYwDQYJKoZIhvcNAQEFBQAweTEL
-MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxJDAiBgNV
-BAsTG1RDIFRydXN0Q2VudGVyIFVuaXZlcnNhbCBDQTEmMCQGA1UEAxMdVEMgVHJ1
-c3RDZW50ZXIgVW5pdmVyc2FsIENBIEkwHhcNMDYwMzIyMTU1NDI4WhcNMjUxMjMx
-MjI1OTU5WjB5MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1c3RDZW50ZXIg
-R21iSDEkMCIGA1UECxMbVEMgVHJ1c3RDZW50ZXIgVW5pdmVyc2FsIENBMSYwJAYD
-VQQDEx1UQyBUcnVzdENlbnRlciBVbml2ZXJzYWwgQ0EgSTCCASIwDQYJKoZIhvcN
-AQEBBQADggEPADCCAQoCggEBAKR3I5ZEr5D0MacQ9CaHnPM42Q9e3s9B6DGtxnSR
-JJZ4Hgmgm5qVSkr1YnwCqMqs+1oEdjneX/H5s7/zA1hV0qq34wQi0fiU2iIIAI3T
-fCZdzHd55yx4Oagmcw6iXSVphU9VDprvxrlE4Vc93x9UIuVvZaozhDrzznq+VZeu
-jRIPFDPiUHDDSYcTvFHe15gSWu86gzOSBnWLknwSaHtwag+1m7Z3W0hZneTvWq3z
-wZ7U10VOylY0Ibw+F1tvdwxIAUMpsN0/lm7mlaoMwCC2/T42J5zjXM9OgdwZu5GQ
-fezmlwQek8wiSdeXhrYTCjxDI3d+8NzmzSQfO4ObNDqDNOMCAwEAAaNjMGEwHwYD
-VR0jBBgwFoAUkqR1LKSevoFE63n8isWVpesQdXMwDwYDVR0TAQH/BAUwAwEB/zAO
-BgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFJKkdSyknr6BROt5/IrFlaXrEHVzMA0G
-CSqGSIb3DQEBBQUAA4IBAQAo0uCG1eb4e/CX3CJrO5UUVg8RMKWaTzqwOuAGy2X1
-7caXJ/4l8lfmXpWMPmRgFVp/Lw0BxbFg/UU1z/CyvwbZ71q+s2IhtNerNXxTPqYn
-8aEt2hojnczd7Dwtnic0XQ/CNnm8yUpiLe1r2X1BQ3y2qsrtYbE3ghUJGooWMNjs
-ydZHcnhLEEYUjl8Or+zHL6sQ17bxbuyGssLoDZJz3KL0Dzq/YSMQiZxIQG5wALPT
-ujdEWBF6AmqI8Dc08BnprNRlc/ZpjGSUOnmFKbAWKwyCPwacx/0QK54PLLae4xW/
-2TYcuiUaUj0a7CIMHOCkoj3w6DnPgcB77V0fb8XQC9eY
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDtjCCAp6gAwIBAgIOBcAAAQACQdAGCk3OdRAwDQYJKoZIhvcNAQEFBQAwdjEL
-MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxIjAgBgNV
-BAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDQgQ0ExJTAjBgNVBAMTHFRDIFRydXN0
-Q2VudGVyIENsYXNzIDQgQ0EgSUkwHhcNMDYwMzIzMTQxMDIzWhcNMjUxMjMxMjI1
-OTU5WjB2MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1c3RDZW50ZXIgR21i
-SDEiMCAGA1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgNCBDQTElMCMGA1UEAxMc
-VEMgVHJ1c3RDZW50ZXIgQ2xhc3MgNCBDQSBJSTCCASIwDQYJKoZIhvcNAQEBBQAD
-ggEPADCCAQoCggEBALXNTJytrlG7fEjFDSmGehSt2VA9CXIgDRS2Y8b+WJ7gIV7z
-jyIZ3E6RIM1viCmis8GsKnK6i1S4QF/yqvhDhsIwXMynXX/GCEnkDjkvjhjWkd0j
-FnmA22xIHbzB3ygQY9GB493fL3l1oht48pQB5hBiecugfQLANIJ7x8CtHUzXapZ2
-W78mhEj9h/aECqqSB5lIPGG8ToVYx5ct/YFKocabEvVCUNFkPologiJw3fX64yhC
-L04y87OjNopq1mJcrPoBbbTgci6VaLTxkwzGioLSHVPqfOA/QrcSWrjN2qUGZ8uh
-d32llvCSHmcOHUJG5vnt+0dTf1cERh9GX8eu4I8CAwEAAaNCMEAwDwYDVR0TAQH/
-BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFB/quz4lGwa9pd1iBX7G
-TFq/6A9DMA0GCSqGSIb3DQEBBQUAA4IBAQBYpCubTPfkpJKknGWYGWIi/HIy6QRd
-xMRwLVpG3kxHiiW5ot3u6hKvSI3vK2fbO8w0mCr3CEf/Iq978fTr4jgCMxh1KBue
-dmWsiANy8jhHHYz1nwqIUxAUu4DlDLNdjRfuHhkcho0UZ3iMksseIUn3f9MYv5x5
-+F0IebWqak2SNmy8eesOPXmK2PajVnBd3ttPedJ60pVchidlvqDTB4FAVd0Qy+BL
-iILAkH0457+W4Ze6mqtCD9Of2J4VMxHL94J59bXAQVaS4d9VA61Iz9PyLrHHLVZM
-ZHQqMc7cdalUR6SnQnIJ5+ECpkeyBM1CE+FhDOB4OiIgohxgQoaH96Xm
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEGDCCAwCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQGEwJTRTEU
-MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3
-b3JrMSEwHwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3QwHhcNMDAwNTMw
-MTAzODMxWhcNMjAwNTMwMTAzODMxWjBlMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
-QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSEwHwYD
-VQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3QwggEiMA0GCSqGSIb3DQEBAQUA
-A4IBDwAwggEKAoIBAQCWltQhSWDia+hBBwzexODcEyPNwTXH+9ZOEQpnXvUGW2ul
-CDtbKRY654eyNAbFvAWlA3yCyykQruGIgb3WntP+LVbBFc7jJp0VLhD7Bo8wBN6n
-tGO0/7Gcrjyvd7ZWxbWroulpOj0OM3kyP3CCkplhbY0wCI9xP6ZIVxn4JdxLZlyl
-dI+Yrsj5wAYi56xz36Uu+1LcsRVlIPo1Zmne3yzxbrww2ywkEtvrNTVokMsAsJch
-PXQhI2U0K7t4WaPW4XY5mqRJjox0r26kmqPZm9I4XJuiGMx1I4S+6+JNM3GOGvDC
-+Mcdoq0Dlyz4zyXG9rgkMbFjXZJ/Y/AlyVMuH79NAgMBAAGjgdIwgc8wHQYDVR0O
-BBYEFJWxtPCUtr3H2tERCSG+wa9J/RB7MAsGA1UdDwQEAwIBBjAPBgNVHRMBAf8E
-BTADAQH/MIGPBgNVHSMEgYcwgYSAFJWxtPCUtr3H2tERCSG+wa9J/RB7oWmkZzBl
-MQswCQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFk
-ZFRydXN0IFRUUCBOZXR3b3JrMSEwHwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENB
-IFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBACxtZBsfzQ3duQH6lmM0MkhHma6X
-7f1yFqZzR1r0693p9db7RcwpiURdv0Y5PejuvE1Uhh4dbOMXJ0PhiVYrqW9yTkkz
-43J8KiOavD7/KCrto/8cI7pDVwlnTUtiBi34/2ydYB7YHEt9tTEv2dB8Xfjea4MY
-eDdXL+gzB2ffHsdrKpV2ro9Xo/D0UrSpUwjP4E/TelOL/bscVjby/rK25Xa71SJl
-pz/+0WatC7xrmYbvP33zGDLKe8bjq2RGlfgmadlVg3sslgf/WSxEo8bl6ancoWOA
-WiFeIc9TVPC6b4nbqKqVz4vjccweGyBECMB6tkD9xOQ14R0WHNC8K47Wcdk=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDpDCCAoygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEc
-MBoGA1UEChMTQW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBP
-bmxpbmUgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAxMB4XDTAyMDUyODA2
-MDAwMFoXDTM3MTExOTIwNDMwMFowYzELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0Ft
-ZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2EgT25saW5lIFJvb3Qg
-Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMTCCASIwDQYJKoZIhvcNAQEBBQADggEP
-ADCCAQoCggEBAKgv6KRpBgNHw+kqmP8ZonCaxlCyfqXfaE0bfA+2l2h9LaaLl+lk
-hsmj76CGv2BlnEtUiMJIxUo5vxTjWVXlGbR0yLQFOVwWpeKVBeASrlmLojNoWBym
-1BW32J/X3HGrfpq/m44zDyL9Hy7nBzbvYjnF3cu6JRQj3gzGPTzOggjmZj7aUTsW
-OqMFf6Dch9Wc/HKpoH145LcxVR5lu9RhsCFg7RAycsWSJR74kEoYeEfffjA3PlAb
-2xzTa5qGUwew76wGePiEmf4hjUyAtgyC9mZweRrTT6PP8c9GsEsPPt2IYriMqQko
-O3rHl+Ee5fSfwMCuJKDIodkP1nsmgmkyPacCAwEAAaNjMGEwDwYDVR0TAQH/BAUw
-AwEB/zAdBgNVHQ4EFgQUAK3Zo/Z59m50qX8zPYEX10zPM94wHwYDVR0jBBgwFoAU
-AK3Zo/Z59m50qX8zPYEX10zPM94wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEB
-BQUAA4IBAQB8itEfGDeC4Liwo+1WlchiYZwFos3CYiZhzRAW18y0ZTTQEYqtqKkF
-Zu90821fnZmv9ov761KyBZiibyrFVL0lvV+uyIbqRizBs73B6UlwGBaXCBOMIOAb
-LjpHyx7kADCVW/RFo8AasAFOq73AI25jP4BKxQft3OJvx8Fi8eNy1gTIdGcL+oir
-oQHIb/AUr9KZzVGTfu0uOMe9zkZQPXLjeSWdm4grECDdpbgyn43gKd8hdIaC2y+C
-MMbHNYaz+ZZfRtsMRf3zUMNvxsNIrUam4SdHCh0Om7bCd39j8uB9Gr784N/Xx6ds
-sPmuujz9dLQR6FgNgLzTqIA6me11zEZ7
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFkDCCA3igAwIBAgIQBZsbV56OITLiOQe9p3d1XDANBgkqhkiG9w0BAQwFADBi
-MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
-d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3Qg
-RzQwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1MTIwMDAwWjBiMQswCQYDVQQGEwJV
-UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQu
-Y29tMSEwHwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwggIiMA0GCSqG
-SIb3DQEBAQUAA4ICDwAwggIKAoICAQC/5pBzaN675F1KPDAiMGkz7MKnJS7JIT3y
-ithZwuEppz1Yq3aaza57G4QNxDAf8xukOBbrVsaXbR2rsnnyyhHS5F/WBTxSD1If
-xp4VpX6+n6lXFllVcq9ok3DCsrp1mWpzMpTREEQQLt+C8weE5nQ7bXHiLQwb7iDV
-ySAdYyktzuxeTsiT+CFhmzTrBcZe7FsavOvJz82sNEBfsXpm7nfISKhmV1efVFiO
-DCu3T6cw2Vbuyntd463JT17lNecxy9qTXtyOj4DatpGYQJB5w3jHtrHEtWoYOAMQ
-jdjUN6QuBX2I9YI+EJFwq1WCQTLX2wRzKm6RAXwhTNS8rhsDdV14Ztk6MUSaM0C/
-CNdaSaTC5qmgZ92kJ7yhTzm1EVgX9yRcRo9k98FpiHaYdj1ZXUJ2h4mXaXpI8OCi
-EhtmmnTK3kse5w5jrubU75KSOp493ADkRSWJtppEGSt+wJS00mFt6zPZxd9LBADM
-fRyVw4/3IbKyEbe7f/LVjHAsQWCqsWMYRJUadmJ+9oCw++hkpjPRiQfhvbfmQ6QY
-uKZ3AeEPlAwhHbJUKSWJbOUOUlFHdL4mrLZBdd56rF+NP8m800ERElvlEFDrMcXK
-chYiCd98THU/Y+whX8QgUWtvsauGi0/C1kVfnSD8oR7FwI+isX4KJpn15GkvmB0t
-9dmpsh3lGwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIB
-hjAdBgNVHQ4EFgQU7NfjgtJxXWRM3y5nP+e6mK4cD08wDQYJKoZIhvcNAQEMBQAD
-ggIBALth2X2pbL4XxJEbw6GiAI3jZGgPVs93rnD5/ZpKmbnJeFwMDF/k5hQpVgs2
-SV1EY+CtnJYYZhsjDT156W1r1lT40jzBQ0CuHVD1UvyQO7uYmWlrx8GnqGikJ9yd
-+SeuMIW59mdNOj6PWTkiU0TryF0Dyu1Qen1iIQqAyHNm0aAFYF/opbSnr6j3bTWc
-fFqK1qI4mfN4i/RN0iAL3gTujJtHgXINwBQy7zBZLq7gcfJW5GqXb5JQbZaNaHqa
-sjYUegbyJLkJEVDXCLG4iXqEI2FCKeWjzaIgQdfRnGTZ6iahixTXTBmyUEFxPT9N
-cCOGDErcgdLMMpSEDQgJlxxPwO5rIHQw0uA5NBCFIRUBCOhVMt5xSdkoF1BN5r5N
-0XWs0Mr7QbhDparTwwVETyw2m+L64kW4I1NsBm9nVX9GtUw/bihaeSbSpKhil9Ie
-4u1Ki7wb/UdKDd9nZn6yW0HQO+T0O/QEY+nvwlQAUaCKKsnOeMzV6ocEGLPOr0mI
-r/OSmbaz5mEP0oUA51Aa5BuVnRmhuZyxm7EAHu/QD09CbMkKvO5D+jpxpchNJqU1
-/YldvIViHTLSoCtU7ZpXwdv6EM8Zt4tKG48BtieVU+i2iW1bvGjUI+iLUaJW+fCm
-gKDWHrO8Dw9TdSmq6hN35N6MgSGtBxBHEa2HPQfRdbzP82Z+
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEuzCCA6OgAwIBAgIBAjANBgkqhkiG9w0BAQUFADBiMQswCQYDVQQGEwJVUzET
-MBEGA1UEChMKQXBwbGUgSW5jLjEmMCQGA1UECxMdQXBwbGUgQ2VydGlmaWNhdGlv
-biBBdXRob3JpdHkxFjAUBgNVBAMTDUFwcGxlIFJvb3QgQ0EwHhcNMDYwNDI1MjE0
-MDM2WhcNMzUwMjA5MjE0MDM2WjBiMQswCQYDVQQGEwJVUzETMBEGA1UEChMKQXBw
-bGUgSW5jLjEmMCQGA1UECxMdQXBwbGUgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkx
-FjAUBgNVBAMTDUFwcGxlIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
-ggEKAoIBAQDkkakJH5HbHkdQ6wXtXnmELes2oldMVeyLGYne+Uts9QerIjAC6Bg+
-+FAJ039BqJj50cpmnCRrEdCju+QbKsMflZ56DKRHi1vUFjczy8QPTc4UadHJGXL1
-XQ7Vf1+b8iUDulWPTV0N8WQ1IxVLFVkds5T39pyez1C6wVhQZ48ItCD3y6wsIG9w
-tj8BMIy3Q88PnT3zK0koGsj+zrW5DtleHNbLPbU6rfQPDgCSC7EhFi501TwN22IW
-q6NxkkdTVcGvL0Gz+PvjcM3mo0xFfh9Ma1CWQYnEdGILEINBhzOKgbEwWOxaBDKM
-aLOPHd5lc/9nXmW8Sdh2nzMUZaF3lMktAgMBAAGjggF6MIIBdjAOBgNVHQ8BAf8E
-BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUK9BpR5R2Cf70a40uQKb3
-R01/CF4wHwYDVR0jBBgwFoAUK9BpR5R2Cf70a40uQKb3R01/CF4wggERBgNVHSAE
-ggEIMIIBBDCCAQAGCSqGSIb3Y2QFATCB8jAqBggrBgEFBQcCARYeaHR0cHM6Ly93
-d3cuYXBwbGUuY29tL2FwcGxlY2EvMIHDBggrBgEFBQcCAjCBthqBs1JlbGlhbmNl
-IG9uIHRoaXMgY2VydGlmaWNhdGUgYnkgYW55IHBhcnR5IGFzc3VtZXMgYWNjZXB0
-YW5jZSBvZiB0aGUgdGhlbiBhcHBsaWNhYmxlIHN0YW5kYXJkIHRlcm1zIGFuZCBj
-b25kaXRpb25zIG9mIHVzZSwgY2VydGlmaWNhdGUgcG9saWN5IGFuZCBjZXJ0aWZp
-Y2F0aW9uIHByYWN0aWNlIHN0YXRlbWVudHMuMA0GCSqGSIb3DQEBBQUAA4IBAQBc
-NplMLXi37Yyb3PN3m/J20ncwT8EfhYOFG5k9RzfyqZtAjizUsZAS2L70c5vu0mQP
-y3lPNNiiPvl4/2vIB+x9OYOLUyDTOMSxv5pPCmv/K/xZpwUJfBdAVhEedNO3iyM7
-R6PVbyTi69G3cN8PReEnyvFteO3ntRcXqNx+IjXKJdXZD9Zr1KIkIxH3oayPc4Fg
-xhtbCS+SsvhESPBgOJ4V9T0mZyCKM2r3DYLP3uujL/lTaltkwGMzd/c6ByxW69oP
-IQ7aunMZT7XZNn/Bh1XZp5m5MkL72NVxnn6hUrcbvZNCJBIqxw8dtk2cXmPIS4AX
-UKqK1drk/NAJBzewdXUh
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIID9zCCAt+gAwIBAgIESJ8AATANBgkqhkiG9w0BAQUFADCBijELMAkGA1UEBhMC
-Q04xMjAwBgNVBAoMKUNoaW5hIEludGVybmV0IE5ldHdvcmsgSW5mb3JtYXRpb24g
-Q2VudGVyMUcwRQYDVQQDDD5DaGluYSBJbnRlcm5ldCBOZXR3b3JrIEluZm9ybWF0
-aW9uIENlbnRlciBFViBDZXJ0aWZpY2F0ZXMgUm9vdDAeFw0xMDA4MzEwNzExMjVa
-Fw0zMDA4MzEwNzExMjVaMIGKMQswCQYDVQQGEwJDTjEyMDAGA1UECgwpQ2hpbmEg
-SW50ZXJuZXQgTmV0d29yayBJbmZvcm1hdGlvbiBDZW50ZXIxRzBFBgNVBAMMPkNo
-aW5hIEludGVybmV0IE5ldHdvcmsgSW5mb3JtYXRpb24gQ2VudGVyIEVWIENlcnRp
-ZmljYXRlcyBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm35z
-7r07eKpkQ0H1UN+U8i6yjUqORlTSIRLIOTJCBumD1Z9S7eVnAztUwYyZmczpwA//
-DdmEEbK40ctb3B75aDFk4Zv6dOtouSCV98YPjUesWgbdYavi7NifFy2cyjw1l1Vx
-zUOFsUcW9SxTgHbP0wBkvUCZ3czY28Sf1hNfQYOL+Q2HklY0bBoQCxfVWhyXWIQ8
-hBouXJE0bhlffxdpxWXvayHG1VA6v2G5BY3vbzQ6sm8UY78WO5upKv23KzhmBsUs
-4qpnHkWnjQRmQvaPK++IIGmPMowUc9orhpFjIpryp9vOiYurXccUwVswah+xt54u
-gQEC7c+WXmPbqOY4twIDAQABo2MwYTAfBgNVHSMEGDAWgBR8cks5x8DbYqVPm6oY
-NJKiyoOCWTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4E
-FgQUfHJLOcfA22KlT5uqGDSSosqDglkwDQYJKoZIhvcNAQEFBQADggEBACrDx0M3
-j92tpLIM7twUbY8opJhJywyA6vPtI2Z1fcXTIWd50XPFtQO3WKwMVC/GVhMPMdoG
-52U7HW8228gd+f2ABsqjPWYWqJ1MFn3AlUa1UeTiH9fqBk1jjZaM7+czV0I664zB
-echNdn3e9rG3geCg+aF4RhcaVpjwTj2rHO3sOdwHSPdj/gauwqRcalsyiMXHM4Ws
-ZkJHwlgkmeHlPuV1LI5D1l08eB6olYIpUNHRFrrvwb562bTYzB5MRuF3sTGrvSrI
-zo9uoV1/A3U05K2JRVRevq4opbs/eHnrc7MKDf2+yfdWrPa37S+bISnHOLaVxATy
-wy39FCqQmbkHzJ8=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFtzCCA5+gAwIBAgICBQkwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0x
-GTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJv
-b3QgQ0EgMjAeFw0wNjExMjQxODI3MDBaFw0zMTExMjQxODIzMzNaMEUxCzAJBgNV
-BAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMRswGQYDVQQDExJRdW9W
-YWRpcyBSb290IENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCa
-GMpLlA0ALa8DKYrwD4HIrkwZhR0In6spRIXzL4GtMh6QRr+jhiYaHv5+HBg6XJxg
-Fyo6dIMzMH1hVBHL7avg5tKifvVrbxi3Cgst/ek+7wrGsxDp3MJGF/hd/aTa/55J
-WpzmM+Yklvc/ulsrHHo1wtZn/qtmUIttKGAr79dgw8eTvI02kfN/+NsRE8Scd3bB
-rrcCaoF6qUWD4gXmuVbBlDePSHFjIuwXZQeVikvfj8ZaCuWw419eaxGrDPmF60Tp
-+ARz8un+XJiM9XOva7R+zdRcAitMOeGylZUtQofX1bOQQ7dsE/He3fbE+Ik/0XX1
-ksOR1YqI0JDs3G3eicJlcZaLDQP9nL9bFqyS2+r+eXyt66/3FsvbzSUr5R/7mp/i
-Ucw6UwxI5g69ybR2BlLmEROFcmMDBOAENisgGQLodKcftslWZvB1JdxnwQ5hYIiz
-PtGo/KPaHbDRsSNU30R2be1B2MGyIrZTHN81Hdyhdyox5C315eXbyOD/5YDXC2Og
-/zOhD7osFRXql7PSorW+8oyWHhqPHWykYTe5hnMz15eWniN9gqRMgeKh0bpnX5UH
-oycR7hYQe7xFSkyyBNKr79X9DFHOUGoIMfmR2gyPZFwDwzqLID9ujWc9Otb+fVuI
-yV77zGHcizN300QyNQliBJIWENieJ0f7OyHj+OsdWwIDAQABo4GwMIGtMA8GA1Ud
-EwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1UdDgQWBBQahGK8SEwzJQTU7tD2
-A8QZRtGUazBuBgNVHSMEZzBlgBQahGK8SEwzJQTU7tD2A8QZRtGUa6FJpEcwRTEL
-MAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMT
-ElF1b1ZhZGlzIFJvb3QgQ0EgMoICBQkwDQYJKoZIhvcNAQEFBQADggIBAD4KFk2f
-BluornFdLwUvZ+YTRYPENvbzwCYMDbVHZF34tHLJRqUDGCdViXh9duqWNIAXINzn
-g/iN/Ae42l9NLmeyhP3ZRPx3UIHmfLTJDQtyU/h2BwdBR5YM++CCJpNVjP4iH2Bl
-fF/nJrP3MpCYUNQ3cVX2kiF495V5+vgtJodmVjB3pjd4M1IQWK4/YY7yarHvGH5K
-WWPKjaJW1acvvFYfzznB4vsKqBUsfU16Y8Zsl0Q80m/DShcK+JDSV6IZUaUtl0Ha
-B0+pUNqQjZRG4T7wlP0QADj1O+hA4bRuVhogzG9Yje0uRY/W6ZM/57Es3zrWIozc
-hLsib9D45MY56QSIPMO661V6bYCZJPVsAfv4l7CUW+v90m/xd2gNNWQjrLhVoQPR
-TUIZ3Ph1WVaj+ahJefivDrkRoHy3au000LYmYjgahwz46P0u05B/B5EqHdZ+XIWD
-mbA4CD/pXvk1B+TJYm5Xf6dQlfe6yJvmjqIBxdZmv3lh8zwc4bmCXF2gw+nYSL0Z
-ohEUGW6yhhtoPkg3Goi3XZZenMfvJ2II4pEZXNLxId26F0KCl3GBUzGpn/Z9Yr9y
-4aOTHcyKJloJONDO1w2AFrR4pTqHTI2KpdVGl/IsELm8VCLAAVBpQ570su9t+Oza
-8eOx79+Rj1QqCyXBJhnEUhAFZdWCEOrCMc0u
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIE5jCCA86gAwIBAgIEO45L/DANBgkqhkiG9w0BAQUFADBdMRgwFgYJKoZIhvcN
-AQkBFglwa2lAc2suZWUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKExlBUyBTZXJ0aWZp
-dHNlZXJpbWlza2Vza3VzMRAwDgYDVQQDEwdKdXVyLVNLMB4XDTAxMDgzMDE0MjMw
-MVoXDTE2MDgyNjE0MjMwMVowXTEYMBYGCSqGSIb3DQEJARYJcGtpQHNrLmVlMQsw
-CQYDVQQGEwJFRTEiMCAGA1UEChMZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1czEQ
-MA4GA1UEAxMHSnV1ci1TSzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
-AIFxNj4zB9bjMI0TfncyRsvPGbJgMUaXhvSYRqTCZUXP00B841oiqBB4M8yIsdOB
-SvZiF3tfTQou0M+LI+5PAk676w7KvRhj6IAcjeEcjT3g/1tf6mTll+g/mX8MCgkz
-ABpTpyHhOEvWgxutr2TC+Rx6jGZITWYfGAriPrsfB2WThbkasLnE+w0R9vXW+RvH
-LCu3GFH+4Hv2qEivbDtPL+/40UceJlfwUR0zlv/vWT3aTdEVNMfqPxZIe5EcgEMP
-PbgFPtGzlc3Yyg/CQ2fbt5PgIoIuvvVoKIO5wTtpeyDaTpxt4brNj3pssAki14sL
-2xzVWiZbDcDq5WDQn/413z8CAwEAAaOCAawwggGoMA8GA1UdEwEB/wQFMAMBAf8w
-ggEWBgNVHSAEggENMIIBCTCCAQUGCisGAQQBzh8BAQEwgfYwgdAGCCsGAQUFBwIC
-MIHDHoHAAFMAZQBlACAAcwBlAHIAdABpAGYAaQBrAGEAYQB0ACAAbwBuACAAdgDk
-AGwAagBhAHMAdABhAHQAdQBkACAAQQBTAC0AaQBzACAAUwBlAHIAdABpAGYAaQB0
-AHMAZQBlAHIAaQBtAGkAcwBrAGUAcwBrAHUAcwAgAGEAbABhAG0ALQBTAEsAIABz
-AGUAcgB0AGkAZgBpAGsAYQBhAHQAaQBkAGUAIABrAGkAbgBuAGkAdABhAG0AaQBz
-AGUAawBzMCEGCCsGAQUFBwIBFhVodHRwOi8vd3d3LnNrLmVlL2Nwcy8wKwYDVR0f
-BCQwIjAgoB6gHIYaaHR0cDovL3d3dy5zay5lZS9qdXVyL2NybC8wHQYDVR0OBBYE
-FASqekej5ImvGs8KQKcYP2/v6X2+MB8GA1UdIwQYMBaAFASqekej5ImvGs8KQKcY
-P2/v6X2+MA4GA1UdDwEB/wQEAwIB5jANBgkqhkiG9w0BAQUFAAOCAQEAe8EYlFOi
-CfP+JmeaUOTDBS8rNXiRTHyoERF5TElZrMj3hWVcRrs7EKACr81Ptcw2Kuxd/u+g
-kcm2k298gFTsxwhwDY77guwqYHhpNjbRxZyLabVAyJRld/JXIWY7zoVAtjNjGr95
-HvxcHdMdkxuLDF2FvZkwMhgJkVLpfKG6/2SSmuz+Ne6ML678IIbsSt4beDI3poHS
-na9aEhbKmVv8b20OxaAehsmR0FyYgl9jDIpaq9iVpszLita/ZEuOyoqysOkhMp6q
-qIWYNIE5ITuoOlIyPfZrN4YGWhWY3PARZv40ILcD9EEQfTmEeZZyY7aWAuVrua0Z
-TbvGRNs2yyqcjg==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIICQzCCAcmgAwIBAgIILcX8iNLFS5UwCgYIKoZIzj0EAwMwZzEbMBkGA1UEAwwS
-QXBwbGUgUm9vdCBDQSAtIEczMSYwJAYDVQQLDB1BcHBsZSBDZXJ0aWZpY2F0aW9u
-IEF1dGhvcml0eTETMBEGA1UECgwKQXBwbGUgSW5jLjELMAkGA1UEBhMCVVMwHhcN
-MTQwNDMwMTgxOTA2WhcNMzkwNDMwMTgxOTA2WjBnMRswGQYDVQQDDBJBcHBsZSBS
-b290IENBIC0gRzMxJjAkBgNVBAsMHUFwcGxlIENlcnRpZmljYXRpb24gQXV0aG9y
-aXR5MRMwEQYDVQQKDApBcHBsZSBJbmMuMQswCQYDVQQGEwJVUzB2MBAGByqGSM49
-AgEGBSuBBAAiA2IABJjpLz1AcqTtkyJygRMc3RCV8cWjTnHcFBbZDuWmBSp3ZHtf
-TjjTuxxEtX/1H7YyYl3J6YRbTzBPEVoA/VhYDKX1DyxNB0cTddqXl5dvMVztK517
-IDvYuVTZXpmkOlEKMaNCMEAwHQYDVR0OBBYEFLuw3qFYM4iapIqZ3r6966/ayySr
-MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMAoGCCqGSM49BAMDA2gA
-MGUCMQCD6cHEFl4aXTQY2e3v9GwOAEZLuN+yRhHFD/3meoyhpmvOwgPUnPWTxnS4
-at+qIxUCMG1mihDK1A3UT82NQz60imOlM27jbdoXt2QfyFMm+YhidDkLF1vLUagM
-6BgD56KyKA==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIExTCCA62gAwIBAgIBADANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJFVTEn
-MCUGA1UEChMeQUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQL
-ExpodHRwOi8vd3d3LmNoYW1iZXJzaWduLm9yZzEgMB4GA1UEAxMXR2xvYmFsIENo
-YW1iZXJzaWduIFJvb3QwHhcNMDMwOTMwMTYxNDE4WhcNMzcwOTMwMTYxNDE4WjB9
-MQswCQYDVQQGEwJFVTEnMCUGA1UEChMeQUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgy
-NzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1iZXJzaWduLm9yZzEgMB4G
-A1UEAxMXR2xvYmFsIENoYW1iZXJzaWduIFJvb3QwggEgMA0GCSqGSIb3DQEBAQUA
-A4IBDQAwggEIAoIBAQCicKLQn0KuWxfH2H3PFIP8T8mhtxOviteePgQKkotgVvq0
-Mi+ITaFgCPS3CU6gSS9J1tPfnZdan5QEcOw/Wdm3zGaLmFIoCQLfxS+EjXqXd7/s
-QJ0lcqu1PzKY+7e3/HKE5TWH+VX6ox8Oby4o3Wmg2UIQxvi1RMLQQ3/bvOSiPGpV
-eAp3qdjqGTK3L/5cPxvusZjsyq16aUXjlg9V9ubtdepl6DJWk0aJqCWKZQbua795
-B9Dxt6/tLE2Su8CoX6dnfQTyFQhwrJLWfQTSM/tMtgsL+xrJxI0DqX5c8lCrEqWh
-z0hQpe/SyBoT+rB/sYIcd2oPX9wLlY/vQ37mRQklAgEDo4IBUDCCAUwwEgYDVR0T
-AQH/BAgwBgEB/wIBDDA/BgNVHR8EODA2MDSgMqAwhi5odHRwOi8vY3JsLmNoYW1i
-ZXJzaWduLm9yZy9jaGFtYmVyc2lnbnJvb3QuY3JsMB0GA1UdDgQWBBRDnDafsJ4w
-TcbOX60Qq+UDpfqpFDAOBgNVHQ8BAf8EBAMCAQYwEQYJYIZIAYb4QgEBBAQDAgAH
-MCoGA1UdEQQjMCGBH2NoYW1iZXJzaWducm9vdEBjaGFtYmVyc2lnbi5vcmcwKgYD
-VR0SBCMwIYEfY2hhbWJlcnNpZ25yb290QGNoYW1iZXJzaWduLm9yZzBbBgNVHSAE
-VDBSMFAGCysGAQQBgYcuCgEBMEEwPwYIKwYBBQUHAgEWM2h0dHA6Ly9jcHMuY2hh
-bWJlcnNpZ24ub3JnL2Nwcy9jaGFtYmVyc2lnbnJvb3QuaHRtbDANBgkqhkiG9w0B
-AQUFAAOCAQEAPDtwkfkEVCeR4e3t/mh/YV3lQWVPMvEYBZRqHN4fcNs+ezICNLUM
-bKGKfKX0j//U2K0X1S0E0T9YgOKBWYi+wONGkyT+kL0mojAt6JcmVzWJdJYY9hXi
-ryQZVgICsroPFOrGimbBhkVVi76SvpykBMdJPJ7oKXqJ1/6v/2j1pReQvayZzKWG
-VwlnRtvWFsJG8eSpUPWP0ZIV018+xgBJOm5YstHRJw0lyDL4IBHNfTIzSJRUTN3c
-ecQwn+uOuFW114hcxWokPbLTBQNRxgfvzBRydD1ucs4YKIxKoHflCStFREest2d/
-AYoFWpO+ocH/+OcOZ6RHSXZddZAa9SaP8A==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEMzCCAxugAwIBAgIDCYPzMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNVBAYTAkRF
-MRUwEwYDVQQKDAxELVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBD
-bGFzcyAzIENBIDIgMjAwOTAeFw0wOTExMDUwODM1NThaFw0yOTExMDUwODM1NTha
-ME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxELVRydXN0IEdtYkgxJzAlBgNVBAMM
-HkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTCCASIwDQYJKoZIhvcNAQEB
-BQADggEPADCCAQoCggEBANOySs96R+91myP6Oi/WUEWJNTrGa9v+2wBoqOADER03
-UAifTUpolDWzU9GUY6cgVq/eUXjsKj3zSEhQPgrfRlWLJ23DEE0NkVJD2IfgXU42
-tSHKXzlABF9bfsyjxiupQB7ZNoTWSPOSHjRGICTBpFGOShrvUD9pXRl/RcPHAY9R
-ySPocq60vFYJfxLLHLGvKZAKyVXMD9O0Gu1HNVpK7ZxzBCHQqr0ME7UAyiZsxGsM
-lFqVlNpQmvH/pStmMaTJOKDfHR+4CS7zp+hnUquVH+BGPtikw8paxTGA6Eian5Rp
-/hnd2HN8gcqW3o7tszIFZYQ05ub9VxC1X3a/L7AQDcUCAwEAAaOCARowggEWMA8G
-A1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFP3aFMSfMN4hvR5COfyrYyNJ4PGEMA4G
-A1UdDwEB/wQEAwIBBjCB0wYDVR0fBIHLMIHIMIGAoH6gfIZ6bGRhcDovL2RpcmVj
-dG9yeS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwUm9vdCUyMENsYXNzJTIwMyUy
-MENBJTIwMiUyMDIwMDksTz1ELVRydXN0JTIwR21iSCxDPURFP2NlcnRpZmljYXRl
-cmV2b2NhdGlvbmxpc3QwQ6BBoD+GPWh0dHA6Ly93d3cuZC10cnVzdC5uZXQvY3Js
-L2QtdHJ1c3Rfcm9vdF9jbGFzc18zX2NhXzJfMjAwOS5jcmwwDQYJKoZIhvcNAQEL
-BQADggEBAH+X2zDI36ScfSF6gHDOFBJpiBSVYEQBrLLpME+bUMJm2H6NMLVwMeni
-acfzcNsgFYbQDfC+rAF1hM5+n02/t2A7nPPKHeJeaNijnZflQGDSNiH+0LS4F9p0
-o3/U37CYAqxva2ssJSRyoWXuJVrl5jLn8t+rSfrzkGkj2wTZ51xY/GXUl77M/C4K
-zCUqNQT4YJEVdT1B/yMfGchs64JTBKbkTCJNjYy6zltz7GRUUG3RnFX7acM2w4y8
-PIWmawomDeCTmGCufsYkl4phX5GOZpIJhzbNi5stPvZR1FDUWSi9g/LMKHtThm3Y
-Johw1+qRzT65ysCQblrGXnRl11z+o+I=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDuDCCAqCgAwIBAgIQDPCOXAgWpa1Cf/DrJxhZ0DANBgkqhkiG9w0BAQUFADBI
-MQswCQYDVQQGEwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24x
-FzAVBgNVBAMTDlNlY3VyZVRydXN0IENBMB4XDTA2MTEwNzE5MzExOFoXDTI5MTIz
-MTE5NDA1NVowSDELMAkGA1UEBhMCVVMxIDAeBgNVBAoTF1NlY3VyZVRydXN0IENv
-cnBvcmF0aW9uMRcwFQYDVQQDEw5TZWN1cmVUcnVzdCBDQTCCASIwDQYJKoZIhvcN
-AQEBBQADggEPADCCAQoCggEBAKukgeWVzfX2FI7CT8rU4niVWJxB4Q2ZQCQXOZEz
-Zum+4YOvYlyJ0fwkW2Gz4BERQRwdbvC4u/jep4G6pkjGnx29vo6pQT64lO0pGtSO
-0gMdA+9tDWccV9cGrcrI9f4Or2YlSASWC12juhbDCE/RRvgUXPLIXgGZbf2IzIao
-wW8xQmxSPmjL8xk037uHGFaAJsTQ3MBv396gwpEWoGQRS0S8Hvbn+mPeZqx2pHGj
-7DaUaHp3pLHnDi+BeuK1cobvomuL8A/b01k/unK8RCSc43Oz969XL0Imnal0ugBS
-8kvNU3xHCzaFDmapCJcWNFfBZveA4+1wVMeT4C4oFVmHursCAwEAAaOBnTCBmjAT
-BgkrBgEEAYI3FAIEBh4EAEMAQTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB
-/zAdBgNVHQ4EFgQUQjK2FvoE/f5dS3rD/fdMQB1aQ68wNAYDVR0fBC0wKzApoCeg
-JYYjaHR0cDovL2NybC5zZWN1cmV0cnVzdC5jb20vU1RDQS5jcmwwEAYJKwYBBAGC
-NxUBBAMCAQAwDQYJKoZIhvcNAQEFBQADggEBADDtT0rhWDpSclu1pqNlGKa7UTt3
-6Z3q059c4EVlew3KW+JwULKUBRSuSceNQQcSc5R+DCMh/bwQf2AQWnL1mA6s7Ll/
-3XpvXdMc9P+IBWlCqQVxyLesJugutIxq/3HcuLHfmbx8IVQr5Fiiu1cprp6poxkm
-D5kuCLDv/WnPmRoJjeOnnyvJNjR7JLN4TJUXpAYmHrZkUjZfYGfZnMUFdAvnZyPS
-CPyI6a6Lf+Ew9Dd+/cYy2i2eRDAwbO4H3tI0/NL/QPZL9GZGBlSm8jIKYyYwa5vR
-3ItHuuG51WLQoqD0ZwV4KWMabwTW+MZMo5qxN7SN5ShLHZ4swrhovO0C7jE=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDczCCAlugAwIBAgIBBDANBgkqhkiG9w0BAQUFADBkMQswCQYDVQQGEwJLUjEN
-MAsGA1UECgwES0lTQTEuMCwGA1UECwwlS29yZWEgQ2VydGlmaWNhdGlvbiBBdXRo
-b3JpdHkgQ2VudHJhbDEWMBQGA1UEAwwNS0lTQSBSb290Q0EgMTAeFw0wNTA4MjQw
-ODA1NDZaFw0yNTA4MjQwODA1NDZaMGQxCzAJBgNVBAYTAktSMQ0wCwYDVQQKDARL
-SVNBMS4wLAYDVQQLDCVLb3JlYSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBDZW50
-cmFsMRYwFAYDVQQDDA1LSVNBIFJvb3RDQSAxMIIBIDANBgkqhkiG9w0BAQEFAAOC
-AQ0AMIIBCAKCAQEAvATk+hM58DSWIGtsaLv623f/J/es7C/n/fB/bW+MKs0lCVsk
-9KFo/CjsySXirO3eyDOE9bClCTqnsUdIxcxPjHmc+QZXfd3uOPbPFLKc6tPAXXdi
-8EcNuRpAU1xkcK8IWsD3z3X5bI1kKB4g/rcbGdNaZoNy4rCbvdMlFQ0yb2Q3lIVG
-yHK+d9VuHygvx2nt54OJM1jT3qC/QOhDUO7cTWu8peqmyGGO9cNkrwYV3CmLP3WM
-vHFE2/yttRcdbYmDz8Yzvb9Fov4Kn6MRXw+5H5wawkbMnChmn3AmPC7fqoD+jMUE
-CSVPzZNHPDfqAmeS/vwiJFys0izgXAEzisEZ2wIBA6MyMDAwHQYDVR0OBBYEFL+2
-J9gDWnZlTGEBQVYx5Yt7OtnMMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEF
-BQADggEBABOvUQveimpb5poKyLGQSk6hAp3MiNKrZr097LuxQpVqslxa/6FjZJap
-aBV/JV6K+KRzwYCKhQoOUugy50X4TmWAkZl0Q+VFnUkq8JSV3enhMNITbslOsXfl
-BM+tWh6UCVrXPAgcrnrpFDLBRa3SJkhyrKhB2vAhhzle3/xk/2F0KpzZm4tfwjeT
-2KM3LzuTa7IbB6d/CVDv0zq+IWuKkDsnSlFOa56ch534eJAx7REnxqhZvvwYC/uO
-fi5C4e3nCSG9uRPFVmf0JqZCQ5BEVLRxm3bkGhKsGigA35vB1fjbXKP4krG9tNT5
-UNkAAk/bg9ART6RCVmE6fhMy04Qfybo=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEMTCCAxmgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBlTELMAkGA1UEBhMCR1Ix
-RDBCBgNVBAoTO0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1
-dGlvbnMgQ2VydC4gQXV0aG9yaXR5MUAwPgYDVQQDEzdIZWxsZW5pYyBBY2FkZW1p
-YyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25zIFJvb3RDQSAyMDExMB4XDTExMTIw
-NjEzNDk1MloXDTMxMTIwMTEzNDk1MlowgZUxCzAJBgNVBAYTAkdSMUQwQgYDVQQK
-EztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25zIENl
-cnQuIEF1dGhvcml0eTFAMD4GA1UEAxM3SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJl
-c2VhcmNoIEluc3RpdHV0aW9ucyBSb290Q0EgMjAxMTCCASIwDQYJKoZIhvcNAQEB
-BQADggEPADCCAQoCggEBAKlTAOMupvaO+mDYLZU++CwqVE7NuYRhlFhPjz2L5EPz
-dYmNUeTDN9KKiE15HrcS3UN4SoqS5tdI1Q+kOilENbgH9mgdVc04UfCMJDGFr4PJ
-fel3r+0ae50X+bOdOFAPplp5kYCvN66m0zH7tSYJnTxa71HFK9+WXesyHgLacEns
-bgzImjeN9/E2YEsmLIKe0HjzDQ9jpFEw4fkrJxIH2Oq9GGKYsFk3fb7u8yBRQlqD
-75O6aRXxYp2fmTmCobd0LovUxQt7L/DICto9eQqakxylKHJzkUOap9FNhYS5qXSP
-FEDH3N6sQWRstBmbAmNtJGSPRLIl6s5ddAxjMlyNh+UCAwEAAaOBiTCBhjAPBgNV
-HRMBAf8EBTADAQH/MAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQUppFC/RNhSiOeCKQp
-5dgTBCPuQSUwRwYDVR0eBEAwPqA8MAWCAy5ncjAFggMuZXUwBoIELmVkdTAGggQu
-b3JnMAWBAy5ncjAFgQMuZXUwBoEELmVkdTAGgQQub3JnMA0GCSqGSIb3DQEBBQUA
-A4IBAQAf73lB4XtuP7KMhjdCSk4cNx6NZrokgclPEg8hwAOXhiVtXdMiKahsog2p
-6z0GW5k6x8zDmjR/qw7IThzh+uTczQ2+vyT+bOdrwg3IBp5OjWEopmr95fZi6hg8
-TqBTnbI6nOulnJEWtk2C4AwFSKls9cz4y51JtPACpf1wA+2KIaWuE4ZJwzNzvoc7
-dIsXRSZMFpGD/md9zU1jZ/rzAxKWeAaNsWftjj++n08C9bMJL/NMh98qy5V8Acys
-Nnq/onN694/BtZqhFLKPM58N7yLcZnuEvUUXBj08yrl3NI/K6s8/MT7jiOOASSXI
-l7WdmplNsDz4SgCbZN2fOUvRJ9e4
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQG
-EwJIVTERMA8GA1UEBwwIQnVkYXBlc3QxFTATBgNVBAoMDE5ldExvY2sgS2Z0LjE3
-MDUGA1UECwwuVGFuw7pzw610dsOhbnlraWFkw7NrIChDZXJ0aWZpY2F0aW9uIFNl
-cnZpY2VzKTE1MDMGA1UEAwwsTmV0TG9jayBBcmFueSAoQ2xhc3MgR29sZCkgRsWR
-dGFuw7pzw610dsOhbnkwHhcNMDgxMjExMTUwODIxWhcNMjgxMjA2MTUwODIxWjCB
-pzELMAkGA1UEBhMCSFUxETAPBgNVBAcMCEJ1ZGFwZXN0MRUwEwYDVQQKDAxOZXRM
-b2NrIEtmdC4xNzA1BgNVBAsMLlRhbsO6c8OtdHbDoW55a2lhZMOzayAoQ2VydGlm
-aWNhdGlvbiBTZXJ2aWNlcykxNTAzBgNVBAMMLE5ldExvY2sgQXJhbnkgKENsYXNz
-IEdvbGQpIEbFkXRhbsO6c8OtdHbDoW55MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
-MIIBCgKCAQEAxCRec75LbRTDofTjl5Bu0jBFHjzuZ9lk4BqKf8owyoPjIMHj9DrT
-lF8afFttvzBPhCf2nx9JvMaZCpDyD/V/Q4Q3Y1GLeqVw/HpYzY6b7cNGbIRwXdrz
-AZAj/E4wqX7hJ2Pn7WQ8oLjJM2P+FpD/sLj916jAwJRDC7bVWaaeVtAkH3B5r9s5
-VA1lddkVQZQBr17s9o3x/61k/iCa11zr/qYfCGSji3ZVrR47KGAuhyXoqq8fxmRG
-ILdwfzzeSNuWU7c5d+Qa4scWhHaXWy+7GRWF+GmF9ZmnqfI0p6m2pgP8b4Y9VHx2
-BJtr+UBdADTHLpl1neWIA6pN+APSQnbAGwIDAKiLo0UwQzASBgNVHRMBAf8ECDAG
-AQH/AgEEMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUzPpnk/C2uNClwB7zU/2M
-U9+D15YwDQYJKoZIhvcNAQELBQADggEBAKt/7hwWqZw8UQCgwBEIBaeZ5m8BiFRh
-bvG5GK1Krf6BQCOUL/t1fC8oS2IkgYIL9WHxHG64YTjrgfpioTtaYtOUZcTh5m2C
-+C8lcLIhJsFyUR+MLMOEkMNaj7rP9KdlpeuY0fsFskZ1FSNqb4VjMIDw1Z4fKRzC
-bLBQWV2QWzuoDTDPv31/zvGdg73JRm4gpvlhUbohL3u+pRVjodSVh/GeufOJ8z2F
-uLjbvrW5KfnaNwUASZQDhETnv0Mxz3WLJdH0pmT1kvarBes96aULNmLazAZfNou2
-XjG4Kvte9nHfRCaexOYNkbQudZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEPzCCAyegAwIBAgIBATANBgkqhkiG9w0BAQUFADB+MQswCQYDVQQGEwJHQjEb
-MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow
-GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEkMCIGA1UEAwwbU2VjdXJlIENlcnRp
-ZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAwMFoXDTI4MTIzMTIzNTk1OVow
-fjELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
-A1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxJDAiBgNV
-BAMMG1NlY3VyZSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEB
-BQADggEPADCCAQoCggEBAMBxM4KK0HDrc4eCQNUd5MvJDkKQ+d40uaG6EfQlhfPM
-cm3ye5drswfxdySRXyWP9nQ95IDC+DwN879A6vfIUtFyb+/Iq0G4bi4XKpVpDM3S
-HpR7LZQdqnXXs5jLrLxkU0C8j6ysNstcrbvd4JQX7NFc0L/vpZXJkMWwrPsbQ996
-CF23uPJAGysnnlDOXmWCiIxe004MeuoIkbY2qitC++rCoznl2yY4rYsK7hljxxwk
-3wN42ubqwUcaCwtGCd0C/N7Lh1/XMGNooa7cMqG6vv5Eq2i2pRcV/b3Vp6ea5EQz
-6YiO/O1R65NxTq0B50SOqy3LqP4BSUjwwN3HaNiS/j0CAwEAAaOBxzCBxDAdBgNV
-HQ4EFgQUPNiTiMLAggnMAZkGkyDpnnAJY08wDgYDVR0PAQH/BAQDAgEGMA8GA1Ud
-EwEB/wQFMAMBAf8wgYEGA1UdHwR6MHgwO6A5oDeGNWh0dHA6Ly9jcmwuY29tb2Rv
-Y2EuY29tL1NlY3VyZUNlcnRpZmljYXRlU2VydmljZXMuY3JsMDmgN6A1hjNodHRw
-Oi8vY3JsLmNvbW9kby5uZXQvU2VjdXJlQ2VydGlmaWNhdGVTZXJ2aWNlcy5jcmww
-DQYJKoZIhvcNAQEFBQADggEBAIcBbSMdflsXfcFhMs+P5/OKlFlm4J4oqF7Tt/Q0
-5qo5spcWxYJvMqTpjOev/e/C6LlLqqP05tqNZSH7uoDrJiiFGv45jN5bBAS0VPmj
-Z55B+glSzAVIqMk/IQQezkhr/IXownuvf7fM+F86/TXGDe+X3EyrEeFryzHRbPtI
-gKvcnDe4IRRLDXE97IMzbtFuMhbsmMcWi1mmNKsFVy2T96oTy9IT4rcuO81rUBcJ
-aD61JlfutuC23bkpgHl9j6PwpCikFcSF9CfUa7/lXORlAnZUtOM3ZiTTGWHIUhDl
-izeauan5Hb/qmZJhlv8BzaFfDbxxvA6sCx1HRR3B7Hzs/Sk=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIF0zCCA7ugAwIBAgIVALhZFHE/V9+PMcAzPdLWGXojF7TrMA0GCSqGSIb3DQEB
-DQUAMIGAMQswCQYDVQQGEwJQTDEiMCAGA1UEChMZVW5pemV0byBUZWNobm9sb2dp
-ZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENlcnRpZmljYXRpb24gQXV0aG9yaXR5
-MSQwIgYDVQQDExtDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENBIDIwHhcNMTExMDA2
-MDgzOTU2WhcNNDYxMDA2MDgzOTU2WjCBgDELMAkGA1UEBhMCUEwxIjAgBgNVBAoT
-GVVuaXpldG8gVGVjaG5vbG9naWVzIFMuQS4xJzAlBgNVBAsTHkNlcnR1bSBDZXJ0
-aWZpY2F0aW9uIEF1dGhvcml0eTEkMCIGA1UEAxMbQ2VydHVtIFRydXN0ZWQgTmV0
-d29yayBDQSAyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAvfl4+ObV
-gAxknYYblmRnPyI6HnUBfe/7XGeMycxca6mR5rlC5SBLm9qbe7mZXdmbgEvXhEAr
-J9PoujC7Pgkap0mV7ytAJMKXx6fumyXvqAoAl4Vaqp3cKcniNQfrcE1K1sGzVrih
-QTib0fsxf4/gX+GxPw+OFklg1waNGPmqJhCrKtPQ0WeNG0a+RzDVLnLRxWPa52N5
-RH5LYySJhi40PylMUosqp8DikSiJucBb+R3Z5yet/5oCl8HGUJKbAiy9qbk0WQq/
-hEr/3/6zn+vZnuCYI+yma3cWKtvMrTscpIfcRnNeGWJoRVfkkIJCu0LW8GHgwaM9
-ZqNd9BjuiMmNF0UpmTJ1AjHuKSbIawLmtWJFfzcVWiNoidQ+3k4nsPBADLxNF8tN
-orMe0AZa3faTz1d1mfX6hhpneLO/lv403L3nUlbls+V1e9dBkQXcXWnjlQ1DufyD
-ljmVe2yAWk8TcsbXfSl6RLpSpCrVQUYJIP4ioLZbMI28iQzV13D4h1L92u+sUS4H
-s07+0AnacO+Y+lbmbdu1V0vc5SwlFcieLnhO+NqcnoYsylfzGuXIkosagpZ6w7xQ
-EmnYDlpGizrrJvojybawgb5CAKT41v4wLsfSRvbljnX98sy50IdbzAYQYLuDNbde
-Z95H7JlI8aShFf6tjGKOOVVPORa5sWOd/7cCAwEAAaNCMEAwDwYDVR0TAQH/BAUw
-AwEB/zAdBgNVHQ4EFgQUtqFUOQLDoD+Oirz61PgcptE6Dv0wDgYDVR0PAQH/BAQD
-AgEGMA0GCSqGSIb3DQEBDQUAA4ICAQCdU8KBJdw1LK4K3VqbRjBWu9S0bEuG5gql
-0pKKmo3cj7TudvQDy+ubAXirKmu1uiNOMXy1LN0taWczbmNdORgS+KAoU0SHq2rE
-kpYfKqIcup3dJ/tSTbCPWujtjcNo45KgJgyHkLAD6mplKAjERnjgW7oO8DPcJ7Z+
-iD29kqSWfkGogAh71jYSvBAVmyS8q619EYkvMe340s9Tjuu0U6fnBMovpiLEEdzr
-mMkiXUFq3ApSBFu8LqB9x7aSuySg8zfRK0OozPFoeBp+b2OQe590yGvZC1X2eQM9
-g8dBQJL7dgs3JRc8rz76PFwbhvlKDD+KxF4OmPGt7s/g/SE1xzNhzKI3GEN8M+mu
-doKCB0VIO8lnbq2jheiWVs+8u/qry7dXJ40aL5nzIzM0jspTY9NXNFBPz0nBBbrF
-qId744aP+0OiEumsUewEdkzw+o+5MRPpCLckCfmgtwc2WFfPxLt+SWaVNQS2dzW4
-qVMpX5KF+FLEWk79BmE5+33QdkeSzOwrvYRu5ptFwX1isVMtnnWg58koUNflvKiq
-B3hquXS0YPOEjQPcrpHadEQNe0Kpd9YrfKHGbBNTIqkSmqX5TyhFNbCXT0ZlhcX0
-/WKiomr8NDAGft8M4HOBlslEKt4fguxscletKWSk8cYpjjVgU85r2QK+OTB14Pdc
-Y2rwQMEsjQ==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDQzCCAiugAwIBAgIQX/h7KCtU3I1CoxW1aMmt/zANBgkqhkiG9w0BAQUFADA1
-MRYwFAYDVQQKEw1DaXNjbyBTeXN0ZW1zMRswGQYDVQQDExJDaXNjbyBSb290IENB
-IDIwNDgwHhcNMDQwNTE0MjAxNzEyWhcNMjkwNTE0MjAyNTQyWjA1MRYwFAYDVQQK
-Ew1DaXNjbyBTeXN0ZW1zMRswGQYDVQQDExJDaXNjbyBSb290IENBIDIwNDgwggEg
-MA0GCSqGSIb3DQEBAQUAA4IBDQAwggEIAoIBAQCwmrmrp68Kd6ficba0ZmKUeIhH
-xmJVhEAyv8CrLqUccda8bnuoqrpu0hWISEWdovyD0My5jOAmaHBKeN8hF570YQXJ
-FcjPFto1YYmUQ6iEqDGYeJu5Tm8sUxJszR2tKyS7McQr/4NEb7Y9JHcJ6r8qqB9q
-VvYgDxFUl4F1pyXOWWqCZe+36ufijXWLbvLdT6ZeYpzPEApk0E5tzivMW/VgpSdH
-jWn0f84bcN5wGyDWbs2mAag8EtKpP6BrXruOIIt6keO1aO6g58QBdKhTCytKmg9l
-Eg6CTY5j/e/rmxrbU6YTYK/CfdfHbBcl1HP7R2RQgYCUTOG/rksc35LtLgXfAgED
-o1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUJ/PI
-FR5umgIJFq0roIlgX9p7L6owEAYJKwYBBAGCNxUBBAMCAQAwDQYJKoZIhvcNAQEF
-BQADggEBAJ2dhISjQal8dwy3U8pORFBi71R803UXHOjgxkhLtv5MOhmBVrBW7hmW
-Yqpao2TB9k5UM8Z3/sUcuuVdJcr18JOagxEu5sv4dEX+5wW4q+ffy0vhN4TauYuX
-cB7w4ovXsNgOnbFp1iqRe6lJT37mjpXYgyc81WhJDtSd9i7rp77rMKSsH0T8lasz
-Bvt9YAretIpjsJyp8qS5UwGH0GikJ3+r/+n6yUA4iGe0OcaEb1fJU9u6ju7AQ7L4
-CYNu/2bPPu8Xs1gYJQk0XuPL1hS27PKSb3TkL4Eq1ZKR4OCXPDJoBYVL0fdX4lId
-kxpUnwVwwEpxYB5DC2Ae/qPOgRnhCzU=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMx
-EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoT
-HFN0YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVs
-ZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAw
-MFoXDTM3MTIzMTIzNTk1OVowgY8xCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6
-b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQgVGVj
-aG5vbG9naWVzLCBJbmMuMTIwMAYDVQQDEylTdGFyZmllbGQgUm9vdCBDZXJ0aWZp
-Y2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
-ggEBAL3twQP89o/8ArFvW59I2Z154qK3A2FWGMNHttfKPTUuiUP3oWmb3ooa/RMg
-nLRJdzIpVv257IzdIvpy3Cdhl+72WoTsbhm5iSzchFvVdPtrX8WJpRBSiUZV9Lh1
-HOZ/5FSuS/hVclcCGfgXcVnrHigHdMWdSL5stPSksPNkN3mSwOxGXn/hbVNMYq/N
-Hwtjuzqd+/x5AJhhdM8mgkBj87JyahkNmcrUDnXMN/uLicFZ8WJ/X7NfZTD4p7dN
-dloedl40wOiWVpmKs/B/pM293DIxfJHP4F8R+GuqSVzRmZTRouNjWwl2tVZi4Ut0
-HZbUJtQIBFnQmA4O5t78w+wfkPECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAO
-BgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFHwMMh+n2TB/xH1oo2Kooc6rB1snMA0G
-CSqGSIb3DQEBCwUAA4IBAQARWfolTwNvlJk7mh+ChTnUdgWUXuEok21iXQnCoKjU
-sHU48TRqneSfioYmUeYs0cYtbpUgSpIB7LiKZ3sx4mcujJUDJi5DnUox9g61DLu3
-4jd/IroAow57UvtruzvE03lRTs2Q9GcHGcg8RnoNAX3FWOdt5oUwF5okxBDgBPfg
-8n/Uqgr/Qh037ZTlZFkSIHc40zI+OIF1lnP6aI+xy84fxez6nH7PfrHxBy22/L/K
-pL/QlwVKvOoYKAKQvVR4CSFx09F9HdkWsKlhPdAKACL8x3vLCWRFCztAgfd9fDL1
-mMpYjn0q7pBZc2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDzzCCAregAwIBAgIDAWweMA0GCSqGSIb3DQEBBQUAMIGNMQswCQYDVQQGEwJB
-VDFIMEYGA1UECgw/QS1UcnVzdCBHZXMuIGYuIFNpY2hlcmhlaXRzc3lzdGVtZSBp
-bSBlbGVrdHIuIERhdGVudmVya2VociBHbWJIMRkwFwYDVQQLDBBBLVRydXN0LW5R
-dWFsLTAzMRkwFwYDVQQDDBBBLVRydXN0LW5RdWFsLTAzMB4XDTA1MDgxNzIyMDAw
-MFoXDTE1MDgxNzIyMDAwMFowgY0xCzAJBgNVBAYTAkFUMUgwRgYDVQQKDD9BLVRy
-dXN0IEdlcy4gZi4gU2ljaGVyaGVpdHNzeXN0ZW1lIGltIGVsZWt0ci4gRGF0ZW52
-ZXJrZWhyIEdtYkgxGTAXBgNVBAsMEEEtVHJ1c3QtblF1YWwtMDMxGTAXBgNVBAMM
-EEEtVHJ1c3QtblF1YWwtMDMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
-AQCtPWFuA/OQO8BBC4SAzewqo51ru27CQoT3URThoKgtUaNR8t4j8DRE/5TrzAUj
-lUC5B3ilJfYKvUWG6Nm9wASOhURh73+nyfrBJcyFLGM/BWBzSQXgYHiVEEvc+RFZ
-znF/QJuKqiTfC0Li21a8StKlDJu3Qz7dg9MmEALP6iPESU7l0+m0iKsMrmKS1GWH
-2WrX9IWf5DMiJaXlyDO6w8dB3F/GaswADm0yqLaHNgBid5seHzTLkDx4iHQF63n1
-k3Flyp3HaxgtPVxO59X4PzF9j4fsCiIvI+n+u33J4PTs63zEsMMtYrWacdaxaujs
-2e3Vcuy+VwHOBVWf3tFgiBCzAgMBAAGjNjA0MA8GA1UdEwEB/wQFMAMBAf8wEQYD
-VR0OBAoECERqlWdVeRFPMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOC
-AQEAVdRU0VlIXLOThaq/Yy/kgM40ozRiPvbY7meIMQQDbwvUB/tOdQ/TLtPAF8fG
-KOwGDREkDg6lXb+MshOWcdzUzg4NCmgybLlBMRmrsQd7TZjTXLDR8KdCoLXEjq/+
-8T/0709GAHbrAvv5ndJAlseIOrifEXnzgGWovR/TeIGgUUw3tKZdJXDRZslo+S4R
-FGjxVJgIrCaSD96JntT6s3kr0qN51OyLrIdTaEJMUVF0HhsnLuP1Hyl0Te2v9+GS
-mYHovjrHF1D2t8b8m7CKa9aIA5GPBnc6hQLdmNVDeD/GMBWsm2vLV7eJUYs66MmE
-DNuxUCAKGkq6ahq97BvIxYSazQ==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEKjCCAxKgAwIBAgIQYAGXt0an6rS0mtZLL/eQ+zANBgkqhkiG9w0BAQsFADCB
-rjELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMf
-Q2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIw
-MDggdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAiBgNV
-BAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMzAeFw0wODA0MDIwMDAwMDBa
-Fw0zNzEyMDEyMzU5NTlaMIGuMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhhd3Rl
-LCBJbmMuMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9u
-MTgwNgYDVQQLEy8oYykgMjAwOCB0aGF3dGUsIEluYy4gLSBGb3IgYXV0aG9yaXpl
-ZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAtIEcz
-MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsr8nLPvb2FvdeHsbnndm
-gcs+vHyu86YnmjSjaDFxODNi5PNxZnmxqWWjpYvVj2AtP0LMqmsywCPLLEHd5N/8
-YZzic7IilRFDGF/Eth9XbAoFWCLINkw6fKXRz4aviKdEAhN0cXMKQlkC+BsUa0Lf
-b1+6a4KinVvnSr0eAXLbS3ToO39/fR8EtCab4LRarEc9VbjXsCZSKAExQGbY2SS9
-9irY7CFJXJv2eul/VTV+lmuNk5Mny5K76qxAwJ/C+IDPXfRa3M50hqY+bAtTyr2S
-zhkGcuYMXDhpxwTWvGzOW/b3aJzcJRVIiKHpqfiYnODz1TEoYRFsZ5aNOZnLwkUk
-OQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNV
-HQ4EFgQUrWyqlGCc7eT/+j4KdCtjA/e2Wb8wDQYJKoZIhvcNAQELBQADggEBABpA
-2JVlrAmSicY59BDlqQ5mU1143vokkbvnRFHfxhY0Cu9qRFHqKweKA3rD6z8KLFIW
-oCtDuSWQP3CpMyVtRRooOyfPqsMpQhvfO0zAMzRbQYi/aytlryjvsvXDqmbOe1bu
-t8jLZ8HJnBoYuMTDSQPxYA5QzUbF83d597YV4Djbxy8ooAw/dyZ02SUS2jHaGh7c
-KUGRIjxpp7sC8rZcJwOJ9Abqm+RyguOhCcHpABnTPtRwa7pxpqpYrvS76Wy274fM
-m7v/OeZWYdMKp8RcTGB7BXcmer/YB1IsYvdwY9k5vG8cwnncdimvzsUsZAReiDZu
-MdRAGmI0Nj81Aa6sY6A=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFHjCCBAagAwIBAgIEAKA3oDANBgkqhkiG9w0BAQsFADCBtzELMAkGA1UEBhMC
-Q1oxOjA4BgNVBAMMMUkuQ0EgLSBRdWFsaWZpZWQgQ2VydGlmaWNhdGlvbiBBdXRo
-b3JpdHksIDA5LzIwMDkxLTArBgNVBAoMJFBydm7DrSBjZXJ0aWZpa2HEjW7DrSBh
-dXRvcml0YSwgYS5zLjE9MDsGA1UECww0SS5DQSAtIEFjY3JlZGl0ZWQgUHJvdmlk
-ZXIgb2YgQ2VydGlmaWNhdGlvbiBTZXJ2aWNlczAeFw0wOTA5MDEwMDAwMDBaFw0x
-OTA5MDEwMDAwMDBaMIG3MQswCQYDVQQGEwJDWjE6MDgGA1UEAwwxSS5DQSAtIFF1
-YWxpZmllZCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSwgMDkvMjAwOTEtMCsGA1UE
-CgwkUHJ2bsOtIGNlcnRpZmlrYcSNbsOtIGF1dG9yaXRhLCBhLnMuMT0wOwYDVQQL
-DDRJLkNBIC0gQWNjcmVkaXRlZCBQcm92aWRlciBvZiBDZXJ0aWZpY2F0aW9uIFNl
-cnZpY2VzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtTaEy0KC8M9l
-4lSaWHMs4+sVV1LwzyJYiIQNeCrv1HHm/YpGIdY/Z640ceankjQvIX7m23BK4OSC
-6KO8kZYA3zopOz6GFCOKV2PvLukbc+c2imF6kLHEv6qNA8WxhPbR3xKwlHDwB2yh
-Wzo7V3QVgDRG83sugqQntKYC3LnlTGbJpNP+Az72gpO9AHUn/IBhFk4ksc8lYS2L
-9GCy9CsmdKSBP78p9w8Lx7vDLqkDgt1/zBrcUWmSSb7AE/BPEeMryQV1IdI6nlGn
-BhWkXOYf6GSdayJw86btuxC7viDKNrbp44HjQRaSxnp6O3eto1x4DfiYdw/YbJFe
-7EjkxSQBywIDAQABo4IBLjCCASowDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8E
-BAMCAQYwgecGA1UdIASB3zCB3DCB2QYEVR0gADCB0DCBzQYIKwYBBQUHAgIwgcAa
-gb1UZW50byBjZXJ0aWZpa2F0IGplIHZ5ZGFuIGpha28ga3ZhbGlmaWtvdmFueSBz
-eXN0ZW1vdnkgY2VydGlmaWthdCBwb2RsZSB6YWtvbmEgYy4gMjI3LzIwMDAgU2Iu
-IHYgcGxhdG5lbSB6bmVuaS9UaGlzIGlzIHF1YWxpZmllZCBzeXN0ZW0gY2VydGlm
-aWNhdGUgYWNjb3JkaW5nIHRvIEN6ZWNoIEFjdCBOby4gMjI3LzIwMDAgQ29sbC4w
-HQYDVR0OBBYEFHnL0CPpOmdwkXRP01Hi4CD94Sj7MA0GCSqGSIb3DQEBCwUAA4IB
-AQB9laU214hYaBHPZftbDS/2dIGLWdmdSbj1OZbJ8LIPBMxYjPoEMqzAR74tw96T
-i6aWRa5WdOWaS6I/qibEKFZhJAVXX5mkx2ewGFLJ+0Go+eTxnjLOnhVF2V2s+57b
-m8c8j6/bS6Ij6DspcHEYpfjjh64hE2r0aSpZDjGzKFM6YpqsCJN8qYe2X1qmGMLQ
-wvNdjG+nPzCJOOuUEypIWt555ZDLXqS5F7ZjBjlfyDZjEfS2Es9Idok8alf563Mi
-9/o+Ba46wMYOkk3P1IlU0RqCajdbliioACKDztAqubONU1guZVzV8tuMASVzbJeL
-/GAB7ECTwe1RuKrLYtglMKI9
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIHyTCCBbGgAwIBAgIBATANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJJTDEW
-MBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwg
-Q2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNh
-dGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0NjM2WhcNMzYwOTE3MTk0NjM2WjB9
-MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMi
-U2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3Rh
-cnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUA
-A4ICDwAwggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZk
-pMyONvg45iPwbm2xPN1yo4UcodM9tDMr0y+v/uqwQVlntsQGfQqedIXWeUyAN3rf
-OQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/Ho/u7TTQEceWzVI9ujPW3U3eCztKS5/C
-Ji/6tRYccjV3yjxd5srhJosaNnZcAdt0FCX+7bWgiA/deMotHweXMAEtcnn6RtYT
-Kqi5pquDSR3l8u/d5AGOGAqPY1MWhWKpDhk6zLVmpsJrdAfkK+F2PrRt2PZE4XNi
-HzvEvqBTViVsUQn3qqvKv3b9bZvzndu/PWa8DFaqr5hIlTpL36dYUNk4dalb6kMM
-Av+Z6+hsTXBbKWWc3apdzK8BMewM69KN6Oqce+Zu9ydmDBpI125C4z/eIT574Q1w
-+2OqqGwaVLRcJXrJosmLFqa7LH4XXgVNWG4SHQHuEhANxjJ/GP/89PrNbpHoNkm+
-Gkhpi8KWTRoSsmkXwQqQ1vp5Iki/untp+HDH+no32NgN0nZPV/+Qt+OR0t3vwmC3
-Zzrd/qqc8NSLf3Iizsafl7b4r4qgEKjZ+xjGtrVcUjyJthkqcwEKDwOzEmDyei+B
-26Nu/yYwl/WL3YlXtq09s68rxbd2AvCl1iuahhQqcvbjM4xdCUsT37uMdBNSSwID
-AQABo4ICUjCCAk4wDAYDVR0TBAUwAwEB/zALBgNVHQ8EBAMCAa4wHQYDVR0OBBYE
-FE4L7xqkQFulF2mHMMo0aEPQQa7yMGQGA1UdHwRdMFswLKAqoCiGJmh0dHA6Ly9j
-ZXJ0LnN0YXJ0Y29tLm9yZy9zZnNjYS1jcmwuY3JsMCugKaAnhiVodHRwOi8vY3Js
-LnN0YXJ0Y29tLm9yZy9zZnNjYS1jcmwuY3JsMIIBXQYDVR0gBIIBVDCCAVAwggFM
-BgsrBgEEAYG1NwEBATCCATswLwYIKwYBBQUHAgEWI2h0dHA6Ly9jZXJ0LnN0YXJ0
-Y29tLm9yZy9wb2xpY3kucGRmMDUGCCsGAQUFBwIBFilodHRwOi8vY2VydC5zdGFy
-dGNvbS5vcmcvaW50ZXJtZWRpYXRlLnBkZjCB0AYIKwYBBQUHAgIwgcMwJxYgU3Rh
-cnQgQ29tbWVyY2lhbCAoU3RhcnRDb20pIEx0ZC4wAwIBARqBl0xpbWl0ZWQgTGlh
-YmlsaXR5LCByZWFkIHRoZSBzZWN0aW9uICpMZWdhbCBMaW1pdGF0aW9ucyogb2Yg
-dGhlIFN0YXJ0Q29tIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IFBvbGljeSBhdmFp
-bGFibGUgYXQgaHR0cDovL2NlcnQuc3RhcnRjb20ub3JnL3BvbGljeS5wZGYwEQYJ
-YIZIAYb4QgEBBAQDAgAHMDgGCWCGSAGG+EIBDQQrFilTdGFydENvbSBGcmVlIFNT
-TCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTANBgkqhkiG9w0BAQUFAAOCAgEAFmyZ
-9GYMNPXQhV59CuzaEE44HF7fpiUFS5Eyweg78T3dRAlbB0mKKctmArexmvclmAk8
-jhvh3TaHK0u7aNM5Zj2gJsfyOZEdUauCe37Vzlrk4gNXcGmXCPleWKYK34wGmkUW
-FjgKXlf2Ysd6AgXmvB618p70qSmD+LIU424oh0TDkBreOKk8rENNZEXO3SipXPJz
-ewT4F+irsfMuXGRuczE6Eri8sxHkfY+BUZo7jYn0TZNmezwD7dOaHZrzZVD1oNB1
-ny+v8OqCQ5j4aZyJecRDjkZy42Q2Eq/3JR44iZB3fsNrarnDy0RLrHiQi+fHLB5L
-EUTINFInzQpdn4XBidUaePKVEFMy3YCEZnXZtWgo+2EuvoSoOMCZEoalHmdkrQYu
-L6lwhceWD3yJZfWOQ1QOq92lgDmUYMA0yZZwLKMS9R9Ie70cfmu3nZD0Ijuu+Pwq
-yvqCUqDvr0tVk+vBtfAii6w0TiYiBKGHLHVKt+V9E9e4DGTANtLJL4YSjCMJwRuC
-O3NJo2pXh5Tl1njFmUNj403gdy3hZZlyaQQaRwnmDwFWJPsfvw55qVguucQJAX6V
-um0ABj6y6koQOdjQK/W/7HW/lwLFCRsI3FU34oH7N4RDYiDK51ZLZer+bMEkkySh
-NOsF/5oirpt9P/FlUQqmMGqz9IgcgA38corog14=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIHhzCCBW+gAwIBAgIBLTANBgkqhkiG9w0BAQsFADB9MQswCQYDVQQGEwJJTDEW
-MBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwg
-Q2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNh
-dGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0NjM3WhcNMzYwOTE3MTk0NjM2WjB9
-MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMi
-U2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3Rh
-cnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUA
-A4ICDwAwggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZk
-pMyONvg45iPwbm2xPN1yo4UcodM9tDMr0y+v/uqwQVlntsQGfQqedIXWeUyAN3rf
-OQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/Ho/u7TTQEceWzVI9ujPW3U3eCztKS5/C
-Ji/6tRYccjV3yjxd5srhJosaNnZcAdt0FCX+7bWgiA/deMotHweXMAEtcnn6RtYT
-Kqi5pquDSR3l8u/d5AGOGAqPY1MWhWKpDhk6zLVmpsJrdAfkK+F2PrRt2PZE4XNi
-HzvEvqBTViVsUQn3qqvKv3b9bZvzndu/PWa8DFaqr5hIlTpL36dYUNk4dalb6kMM
-Av+Z6+hsTXBbKWWc3apdzK8BMewM69KN6Oqce+Zu9ydmDBpI125C4z/eIT574Q1w
-+2OqqGwaVLRcJXrJosmLFqa7LH4XXgVNWG4SHQHuEhANxjJ/GP/89PrNbpHoNkm+
-Gkhpi8KWTRoSsmkXwQqQ1vp5Iki/untp+HDH+no32NgN0nZPV/+Qt+OR0t3vwmC3
-Zzrd/qqc8NSLf3Iizsafl7b4r4qgEKjZ+xjGtrVcUjyJthkqcwEKDwOzEmDyei+B
-26Nu/yYwl/WL3YlXtq09s68rxbd2AvCl1iuahhQqcvbjM4xdCUsT37uMdBNSSwID
-AQABo4ICEDCCAgwwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYD
-VR0OBBYEFE4L7xqkQFulF2mHMMo0aEPQQa7yMB8GA1UdIwQYMBaAFE4L7xqkQFul
-F2mHMMo0aEPQQa7yMIIBWgYDVR0gBIIBUTCCAU0wggFJBgsrBgEEAYG1NwEBATCC
-ATgwLgYIKwYBBQUHAgEWImh0dHA6Ly93d3cuc3RhcnRzc2wuY29tL3BvbGljeS5w
-ZGYwNAYIKwYBBQUHAgEWKGh0dHA6Ly93d3cuc3RhcnRzc2wuY29tL2ludGVybWVk
-aWF0ZS5wZGYwgc8GCCsGAQUFBwICMIHCMCcWIFN0YXJ0IENvbW1lcmNpYWwgKFN0
-YXJ0Q29tKSBMdGQuMAMCAQEagZZMaW1pdGVkIExpYWJpbGl0eSwgcmVhZCB0aGUg
-c2VjdGlvbiAqTGVnYWwgTGltaXRhdGlvbnMqIG9mIHRoZSBTdGFydENvbSBDZXJ0
-aWZpY2F0aW9uIEF1dGhvcml0eSBQb2xpY3kgYXZhaWxhYmxlIGF0IGh0dHA6Ly93
-d3cuc3RhcnRzc2wuY29tL3BvbGljeS5wZGYwEQYJYIZIAYb4QgEBBAQDAgAHMDgG
-CWCGSAGG+EIBDQQrFilTdGFydENvbSBGcmVlIFNTTCBDZXJ0aWZpY2F0aW9uIEF1
-dGhvcml0eTANBgkqhkiG9w0BAQsFAAOCAgEAjo/n3JR5fPGFf59Jb2vKXfuM/gTF
-wWLRfUKKvFO3lANmMD+x5wqnUCBVJX92ehQN6wQOQOY+2IirByeDqXWmN3PH/UvS
-Ta0XQMhGvjt/UfzDtgUx3M2FIk5xt/JxXrAaxrqTi3iSSoX4eA+D/i+tLPfkpLst
-0OcNOrg+zvZ49q5HJMqjNTbOx8aHmNrs++myziebiMMEofYLWWivydsQD032ZGNc
-pRJvkrKTlMeIFw6Ttn5ii5B/q06f/ON1FE8qMt9bDeD1e5MNq6HPh+GlBEXoPBKl
-CcWw0bdT82AUuoVpaiF8H3VhFyAXe2w7QSlc4axa0c2Mm+tgHRns9+Ww2vl5GKVF
-P0lDV9LdJNUso/2RjSe15esUBppMeyG7Oq0wBhjA2MFrLH9ZXF2RsXAiV+uKa0hK
-1Q8p7MZAwC+ITGgBF3f0JBlPvfrhsiAhS90a2Cl9qrjeVOwhVYBsHvUwyKMQ5bLm
-KhQxw4UtjJixhlpPiVktucf3HMiKf8CdBUrmQk9io20ppB+Fq9vlgcitKj1MXVuE
-JnHEhV5xJMqlG2zYYdMa4FTbzrqpMrUi9nNBCV24F10OD5mQ1kfabwo6YigUZ4LZ
-8dCAWZvLMdibD4x3TrVoivJs9iQOLWxwxXPR3hTQcY+203sC9uO41Alua551hDnm
-fyWl8kgAwKQB2j8=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBh
-MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
-d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD
-QTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAwMDAwMDBaMGExCzAJBgNVBAYTAlVT
-MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j
-b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkqhkiG
-9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsB
-CSDMAZOnTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97
-nh6Vfe63SKMI2tavegw5BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt
-43C/dxC//AH2hdmoRBBYMql1GNXRor5H4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7P
-T19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y7vrTC0LUq7dBMtoM1O/4
-gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQABo2MwYTAO
-BgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbR
-TLtm8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUw
-DQYJKoZIhvcNAQEFBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/Esr
-hMAtudXH/vTBH1jLuG2cenTnmCmrEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg
-06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIttep3Sp+dWOIrWcBAI+0tKIJF
-PnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886UAb3LujEV0ls
-YSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk
-CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDkzCCAnugAwIBAgIQFBOWgxRVjOp7Y+X8NId3RDANBgkqhkiG9w0BAQUFADA0
-MRMwEQYDVQQDEwpDb21TaWduIENBMRAwDgYDVQQKEwdDb21TaWduMQswCQYDVQQG
-EwJJTDAeFw0wNDAzMjQxMTMyMThaFw0yOTAzMTkxNTAyMThaMDQxEzARBgNVBAMT
-CkNvbVNpZ24gQ0ExEDAOBgNVBAoTB0NvbVNpZ24xCzAJBgNVBAYTAklMMIIBIjAN
-BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA8ORUaSvTx49qROR+WCf4C9DklBKK
-8Rs4OC8fMZwG1Cyn3gsqrhqg455qv588x26i+YtkbDqthVVRVKU4VbirgwTyP2Q2
-98CNQ0NqZtH3FyrV7zb6MBBC11PN+fozc0yz6YQgitZBJzXkOPqUm7h65HkfM/sb
-2CEJKHxNGGleZIp6GZPKfuzzcuc3B1hZKKxC+cX/zT/npfo4sdAMx9lSGlPWgcxC
-ejVb7Us6eva1jsz/D3zkYDaHL63woSV9/9JLEYhwVKZBqGdTUkJe5DSe5L6j7Kpi
-Xd3DTKaCQeQzC6zJMw9kglcq/QytNuEMrkvF7zuZ2SOzW120V+x0cAwqTwIDAQAB
-o4GgMIGdMAwGA1UdEwQFMAMBAf8wPQYDVR0fBDYwNDAyoDCgLoYsaHR0cDovL2Zl
-ZGlyLmNvbXNpZ24uY28uaWwvY3JsL0NvbVNpZ25DQS5jcmwwDgYDVR0PAQH/BAQD
-AgGGMB8GA1UdIwQYMBaAFEsBmz5WGmU2dst7l6qSBe4y5ygxMB0GA1UdDgQWBBRL
-AZs+VhplNnbLe5eqkgXuMucoMTANBgkqhkiG9w0BAQUFAAOCAQEA0Nmlfv4pYEWd
-foPPbrxHbvUanlR2QnG0PFg/LUAlQvaBnPGJEMgOqnhPOAlXsDzACPw1jvFIUY0M
-cXS6hMTXcpuEfDhOZAYnKuGntewImbQKDdSFc8gS4TXt8QUxHXOZDOuWyt3T5oWq
-8Ir7dcHyCTxlZWTzTNity4hp8+SDtwy9F1qWF8pb/627HOkthIDYIb6FUtnUdLlp
-hbpN7Sgy6/lhSuTENh4Z3G+EER+V9YMoGKgzkkMn3V0TBEVPh9VGzT2ouvDzuFYk
-Res3x+F2T3I5GN9+dHLHcy056mDmrRGiVod7w2ia/viMcKjfZTL0pECMocJEAw6U
-AGegcQCCSA==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEZDCCA0ygAwIBAgIQRL4Mi1AAJLQR0zYwS8AzdzANBgkqhkiG9w0BAQUFADCB
-ozELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug
-Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho
-dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xKzApBgNVBAMTIlVUTi1VU0VSRmlyc3Qt
-TmV0d29yayBBcHBsaWNhdGlvbnMwHhcNOTkwNzA5MTg0ODM5WhcNMTkwNzA5MTg1
-NzQ5WjCBozELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0
-IExha2UgQ2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYD
-VQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xKzApBgNVBAMTIlVUTi1VU0VS
-Rmlyc3QtTmV0d29yayBBcHBsaWNhdGlvbnMwggEiMA0GCSqGSIb3DQEBAQUAA4IB
-DwAwggEKAoIBAQCz+5Gh5DZVhawGNFugmliy+LUPBXeDrjKxdpJo7CNKyXY/45y2
-N3kDuatpjQclthln5LAbGHNhSuh+zdMvZOOmfAz6F4CjDUeJT1FxL+78P/m4FoCH
-iZMlIJpDgmkkdihZNaEdwH+DBmQWICzTSaSFtMBhf1EI+GgVkYDLpdXuOzr0hARe
-YFmnjDRy7rh4xdE7EkpvfmUnuaRVxblvQ6TFHSyZwFKkeEwVs0CYCGtDxgGwenv1
-axwiP8vv/6jQOkt2FZ7S0cYu49tXGzKiuG/ohqY/cKvlcJKrRB5AUPuco2LkbG6g
-yN7igEL66S/ozjIEj3yNtxyjNTwV3Z7DrpelAgMBAAGjgZEwgY4wCwYDVR0PBAQD
-AgHGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFPqGydvguul49Uuo1hXf8NPh
-ahQ8ME8GA1UdHwRIMEYwRKBCoECGPmh0dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9V
-VE4tVVNFUkZpcnN0LU5ldHdvcmtBcHBsaWNhdGlvbnMuY3JsMA0GCSqGSIb3DQEB
-BQUAA4IBAQCk8yXM0dSRgyLQzDKrm5ZONJFUICU0YV8qAhXhi6r/fWRRzwr/vH3Y
-IWp4yy9Rb/hCHTO967V7lMPDqaAt39EpHx3+jz+7qEUqf9FuVSTiuwL7MT++6Lzs
-QCv4AdRWOOTKRIK1YSAhZ2X28AvnNPilwpyjXEAfhZOVBt5P1CeptqX8Fs1zMT+4
-ZSfP1FMa8Kxun08FDAOBp4QpxFq9ZFdyrTvPNximmMatBrTcCKME1SmklpoSZ0qM
-YEWd8SOasACcaLWYUNPvji6SZbFIPiG+FTAqDbUMo2s/rn9X9R+WfN9v3YIwLGUb
-QErNaLly7HF27FSOH4UMAWr6pjisH8SE
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBl
-MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
-d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJv
-b3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzExMTEwMDAwMDAwWjBlMQswCQYDVQQG
-EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNl
-cnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwggEi
-MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7c
-JpSIqvTO9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYP
-mDI2dsze3Tyoou9q+yHyUmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+
-wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW/lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4
-VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpyoeb6pNnVFzF1roV9Iq4/
-AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whfGHdPAgMB
-AAGjYzBhMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQW
-BBRF66Kv9JLLgjEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYun
-pyGd823IDzANBgkqhkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRC
-dWKuh+vy1dneVrOfzM4UKLkNl2BcEkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTf
-fwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38FnSbNd67IJKusm7Xi+fT8r87cm
-NW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i8b5QZ7dsvfPx
-H2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe
-+o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDEL
-MAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjE4MDYGA1UECxMvKGMp
-IDIwMDcgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAi
-BgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMjAeFw0wNzExMDUwMDAw
-MDBaFw0zODAxMTgyMzU5NTlaMIGEMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhh
-d3RlLCBJbmMuMTgwNgYDVQQLEy8oYykgMjAwNyB0aGF3dGUsIEluYy4gLSBGb3Ig
-YXV0aG9yaXplZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9v
-dCBDQSAtIEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEotWcgnuVnfFSeIf+iha/
-BebfowJPDQfGAFG6DAJSLSKkQjnE/o/qycG+1E3/n3qe4rF8mq2nhglzh9HnmuN6
-papu+7qzcMBniKI11KOasf2twu8x+qi58/sIxpHR+ymVo0IwQDAPBgNVHRMBAf8E
-BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUmtgAMADna3+FGO6Lts6K
-DPgR4bswCgYIKoZIzj0EAwMDaQAwZgIxAN344FdHW6fmCsO99YCKlzUNG4k8VIZ3
-KMqh9HneteY4sPBlcIx/AlTCv//YoT7ZzwIxAMSNlPzcU9LcnXgWHxUzI1NS41ox
-XZ3Krr0TKUQNJ1uo52icEvdYPy5yAlejj6EULg==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIETTCCAzWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBtMQswCQYDVQQGEwJDSDEO
-MAwGA1UEChMFYWRtaW4xETAPBgNVBAsTCFNlcnZpY2VzMSIwIAYDVQQLExlDZXJ0
-aWZpY2F0aW9uIEF1dGhvcml0aWVzMRcwFQYDVQQDEw5BZG1pbkNBLUNELVQwMTAe
-Fw0wNjAxMjUxMzM2MTlaFw0xNjAxMjUxMjM2MTlaMG0xCzAJBgNVBAYTAkNIMQ4w
-DAYDVQQKEwVhZG1pbjERMA8GA1UECxMIU2VydmljZXMxIjAgBgNVBAsTGUNlcnRp
-ZmljYXRpb24gQXV0aG9yaXRpZXMxFzAVBgNVBAMTDkFkbWluQ0EtQ0QtVDAxMIIB
-IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0jQlMZmpLDhV+GNR9TAoSNle
-JgQB4xAXJELQf5/ySMfoFA4MmjKqYXQkB6MGPuQKwR9XRRSPf61vqb8YPsdjRmgp
-byHBcUd5t0N8RX6wRZUnPMW+bCCo2VqAU4XFbnlc2gHKaam0wdTtbBTXEkv0ieIH
-fxCfFxXqSsSr60IkF/2/xbrAgV/QD5yHk6Ie8feAVWwi5UtaFqtu4LiFEh2QMyxs
-Oyz1OcvKzkM2g873tyiE7jzMgZP+Ww3tibk2F9+e6ZeiB37TLOmVtvgpmrws4fiI
-rFNXEYSWBVrUTbn81U47yWzOgf5fEHP07bRV5QOCzCm99qNimsbL6CG7nT78CQID
-AQABo4H3MIH0MBIGA1UdEwEB/wQIMAYBAf8CAQAwga4GA1UdIASBpjCBozCBoAYI
-YIV0AREDFQEwgZMwSAYIKwYBBQUHAgIwPBo6VGhpcyBpcyB0aGUgQWRtaW5DQS1D
-RC1UMDEgQ2VydGlmaWNhdGUgUHJhY3RpY2UgU3RhdGVtZW50LjBHBggrBgEFBQcC
-ARY7aHR0cDovL3d3dy5wa2kuYWRtaW4uY2gvcG9saWN5L0NQU18yXzE2Xzc1Nl8x
-XzE3XzNfMjFfMS5wZGYwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBQqxGkKocZV
-xgNucM6GgbOkD6oZ2zANBgkqhkiG9w0BAQUFAAOCAQEAn356bbusjI5glGXRQ1DR
-v21qQf0S4s3GHyZm7cqdOkFleM70ArBT+kOP5Nm7rlSAFyVgEkmBdOg7s9tlXClU
-yeZFnp6UEYRUcijPN8D1VaNRK6PIUObpDBQT0C+kAfxG9z4v29T0SxT4sgAdC/xQ
-Fyv58Fp9bPn7owuKwKcyCH1XSyi/Bp4XFELlLOaigBZO/w+dPBz4FcJSdZjU+BaJ
-0E3nKAjHlShO5ouBSZnaJz3p+nkw2Wyo36s6GxCK0XbkSP45iniIG4FmwwZkonYF
-ypQntHbx2oL7tUQQY0PDo8bGBMcPy/G2j+dciqZRlsnfgMy10SCzQ9MUx92xUG2V
-eg==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFVTCCBD2gAwIBAgIEO/OB0DANBgkqhkiG9w0BAQUFADBsMQswCQYDVQQGEwJj
-aDEOMAwGA1UEChMFYWRtaW4xETAPBgNVBAsTCFNlcnZpY2VzMSIwIAYDVQQLExlD
-ZXJ0aWZpY2F0aW9uIEF1dGhvcml0aWVzMRYwFAYDVQQDEw1BZG1pbi1Sb290LUNB
-MB4XDTAxMTExNTA4NTEwN1oXDTIxMTExMDA3NTEwN1owbDELMAkGA1UEBhMCY2gx
-DjAMBgNVBAoTBWFkbWluMREwDwYDVQQLEwhTZXJ2aWNlczEiMCAGA1UECxMZQ2Vy
-dGlmaWNhdGlvbiBBdXRob3JpdGllczEWMBQGA1UEAxMNQWRtaW4tUm9vdC1DQTCC
-ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMvgr0QUIv5qF0nyXZ3PXAJi
-C4C5Wr+oVTN7oxIkXkxvO0GJToM9n7OVJjSmzBL0zJ2HXj0MDRcvhSY+KiZZc6Go
-vDvr5Ua481l7ILFeQAFtumeza+vvxeL5Nd0Maga2miiacLNAKXbAcUYRa0Ov5VZB
-++YcOYNNt/aisWbJqA2y8He+NsEgJzK5zNdayvYXQTZN+7tVgWOck16Da3+4FXdy
-fH1NCWtZlebtMKtERtkVAaVbiWW24CjZKAiVfggjsiLo3yVMPGj3budLx5D9hEEm
-vlyDOtcjebca+AcZglppWMX/iHIrx7740y0zd6cWEqiLIcZCrnpkr/KzwO135GkC
-AwEAAaOCAf0wggH5MA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIASBkTCBjjCBiwYI
-YIV0AREDAQAwfzArBggrBgEFBQcCAjAfGh1UaGlzIGlzIHRoZSBBZG1pbi1Sb290
-LUNBIENQUzBQBggrBgEFBQcCARZEaHR0cDovL3d3dy5pbmZvcm1hdGlrLmFkbWlu
-LmNoL1BLSS9saW5rcy9DUFNfMl8xNl83NTZfMV8xN18zXzFfMC5wZGYwfwYDVR0f
-BHgwdjB0oHKgcKRuMGwxFjAUBgNVBAMTDUFkbWluLVJvb3QtQ0ExIjAgBgNVBAsT
-GUNlcnRpZmljYXRpb24gQXV0aG9yaXRpZXMxETAPBgNVBAsTCFNlcnZpY2VzMQ4w
-DAYDVQQKEwVhZG1pbjELMAkGA1UEBhMCY2gwHQYDVR0OBBYEFIKf+iNzIPGXi7JM
-Tb5CxX9mzWToMIGZBgNVHSMEgZEwgY6AFIKf+iNzIPGXi7JMTb5CxX9mzWTooXCk
-bjBsMQswCQYDVQQGEwJjaDEOMAwGA1UEChMFYWRtaW4xETAPBgNVBAsTCFNlcnZp
-Y2VzMSIwIAYDVQQLExlDZXJ0aWZpY2F0aW9uIEF1dGhvcml0aWVzMRYwFAYDVQQD
-Ew1BZG1pbi1Sb290LUNBggQ784HQMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0B
-AQUFAAOCAQEAeE96XCYRpy6umkPKXDWCRn7INo96ZrWpMggcDORuofHIwdTkgOeM
-vWOxDN/yuT7CC3FAaUajbPRbDw0hRMcqKz0aC8CgwcyIyhw/rFK29mfNTG3EviP9
-QSsEbnelFnjpm1wjz4EaBiFjatwpUbI6+Zv3XbEt9QQXBn+c6DeFLe4xvC4B+MTr
-a440xTk59pSYux8OHhEvqIwHCkiijGqZhTS3KmGFeBopaR+dJVBRBMoXwzk4B3Hn
-0Zib1dEYFZa84vPJZyvxCbLOnPRDJgH6V2uQqbG+6DXVaf/wORVOvF/wzzv0viM/
-RWbEtJZdvo8N3sdtCULzifnxP/V0T9+4ZQ==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIG0TCCBbmgAwIBAgIBezANBgkqhkiG9w0BAQUFADCByTELMAkGA1UEBhMCSFUx
-ETAPBgNVBAcTCEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0
-b25zYWdpIEtmdC4xGjAYBgNVBAsTEVRhbnVzaXR2YW55a2lhZG9rMUIwQAYDVQQD
-EzlOZXRMb2NrIE1pbm9zaXRldHQgS296amVneXpvaSAoQ2xhc3MgUUEpIFRhbnVz
-aXR2YW55a2lhZG8xHjAcBgkqhkiG9w0BCQEWD2luZm9AbmV0bG9jay5odTAeFw0w
-MzAzMzAwMTQ3MTFaFw0yMjEyMTUwMTQ3MTFaMIHJMQswCQYDVQQGEwJIVTERMA8G
-A1UEBxMIQnVkYXBlc3QxJzAlBgNVBAoTHk5ldExvY2sgSGFsb3phdGJpenRvbnNh
-Z2kgS2Z0LjEaMBgGA1UECxMRVGFudXNpdHZhbnlraWFkb2sxQjBABgNVBAMTOU5l
-dExvY2sgTWlub3NpdGV0dCBLb3pqZWd5em9pIChDbGFzcyBRQSkgVGFudXNpdHZh
-bnlraWFkbzEeMBwGCSqGSIb3DQEJARYPaW5mb0BuZXRsb2NrLmh1MIIBIjANBgkq
-hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx1Ilstg91IRVCacbvWy5FPSKAtt2/Goq
-eKvld/Bu4IwjZ9ulZJm53QE+b+8tmjwi8F3JV6BVQX/yQ15YglMxZc4e8ia6AFQe
-r7C8HORSjKAyr7c3sVNnaHRnUPYtLmTeriZ539+Zhqurf4XsoPuAzPS4DB6TRWO5
-3Lhbm+1bOdRfYrCnjnxmOCyqsQhjF2d9zL2z8cM/z1A57dEZgxXbhxInlrfa6uWd
-vLrqOU+L73Sa58XQ0uqGURzk/mQIKAR5BevKxXEOC++r6uwSEaEYBTJp0QwsGj0l
-mT+1fMptsK6ZmfoIYOcZwvK9UdPM0wKswREMgM6r3JSda6M5UzrWhQIDAMV9o4IC
-wDCCArwwEgYDVR0TAQH/BAgwBgEB/wIBBDAOBgNVHQ8BAf8EBAMCAQYwggJ1Bglg
-hkgBhvhCAQ0EggJmFoICYkZJR1lFTEVNISBFemVuIHRhbnVzaXR2YW55IGEgTmV0
-TG9jayBLZnQuIE1pbm9zaXRldHQgU3pvbGdhbHRhdGFzaSBTemFiYWx5emF0YWJh
-biBsZWlydCBlbGphcmFzb2sgYWxhcGphbiBrZXN6dWx0LiBBIG1pbm9zaXRldHQg
-ZWxla3Ryb25pa3VzIGFsYWlyYXMgam9naGF0YXMgZXJ2ZW55ZXN1bGVzZW5laywg
-dmFsYW1pbnQgZWxmb2dhZGFzYW5hayBmZWx0ZXRlbGUgYSBNaW5vc2l0ZXR0IFN6
-b2xnYWx0YXRhc2kgU3phYmFseXphdGJhbiwgYXogQWx0YWxhbm9zIFN6ZXJ6b2Rl
-c2kgRmVsdGV0ZWxla2JlbiBlbG9pcnQgZWxsZW5vcnplc2kgZWxqYXJhcyBtZWd0
-ZXRlbGUuIEEgZG9rdW1lbnR1bW9rIG1lZ3RhbGFsaGF0b2sgYSBodHRwczovL3d3
-dy5uZXRsb2NrLmh1L2RvY3MvIGNpbWVuIHZhZ3kga2VyaGV0b2sgYXogaW5mb0Bu
-ZXRsb2NrLm5ldCBlLW1haWwgY2ltZW4uIFdBUk5JTkchIFRoZSBpc3N1YW5jZSBh
-bmQgdGhlIHVzZSBvZiB0aGlzIGNlcnRpZmljYXRlIGFyZSBzdWJqZWN0IHRvIHRo
-ZSBOZXRMb2NrIFF1YWxpZmllZCBDUFMgYXZhaWxhYmxlIGF0IGh0dHBzOi8vd3d3
-Lm5ldGxvY2suaHUvZG9jcy8gb3IgYnkgZS1tYWlsIGF0IGluZm9AbmV0bG9jay5u
-ZXQwHQYDVR0OBBYEFAlqYhaSsFq7VQ7LdTI6MuWyIckoMA0GCSqGSIb3DQEBBQUA
-A4IBAQCRalCc23iBmz+LQuM7/KbD7kPgz/PigDVJRXYC4uMvBcXxKufAQTPGtpvQ
-MznNwNuhrWw3AkxYQTvyl5LGSKjN5Yo5iWH5Upfpvfb5lHTocQ68d4bDBsxafEp+
-NFAwLvt/MpqNPfMgW/hqyobzMUwsWYACff44yTB1HLdV47yfuqhthCgFdbOLDcCR
-VCHnpgu0mfVRQdzNo0ci2ccBgcTcR08m6h/t280NmPSjnLRzMkqWmf68f8glWPhY
-83ZmiVSkpj7EUFy6iRiCdUgh0k8T6GB+B3bbELVR5qq5aKrN9p2QdRLqOBrKROi3
-macqaJVmlaut74nLYKkGEsaUR+ko
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIICPzCCAcWgAwIBAgIQBVVWvPJepDU1w6QP1atFcjAKBggqhkjOPQQDAzBhMQsw
-CQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cu
-ZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAe
-Fw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAwMDBaMGExCzAJBgNVBAYTAlVTMRUw
-EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
-IDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEczMHYwEAYHKoZIzj0CAQYF
-K4EEACIDYgAE3afZu4q4C/sLfyHS8L6+c/MzXRq8NOrexpu80JX28MzQC7phW1FG
-fp4tn+6OYwwX7Adw9c+ELkCDnOg/QW07rdOkFFk2eJ0DQ+4QE2xy3q6Ip6FrtUPO
-Z9wj/wMco+I+o0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAd
-BgNVHQ4EFgQUs9tIpPmhxdiuNkHMEWNpYim8S8YwCgYIKoZIzj0EAwMDaAAwZQIx
-AK288mw/EkrRLTnDCgmXc/SINoyIJ7vmiI1Qhadj+Z4y3maTD/HMsQmP3Wyr+mt/
-oAIwOWZbwmSNuJ5Q3KjVSaLtx9zRSX8XAbjIho9OjIgrqJqpisXRAL34VOKa5Vt8
-sycX
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFkjCCA3qgAwIBAgIBCDANBgkqhkiG9w0BAQUFADA6MQswCQYDVQQGEwJDTjER
-MA8GA1UEChMIVW5pVHJ1c3QxGDAWBgNVBAMTD1VDQSBHbG9iYWwgUm9vdDAeFw0w
-ODAxMDEwMDAwMDBaFw0zNzEyMzEwMDAwMDBaMDoxCzAJBgNVBAYTAkNOMREwDwYD
-VQQKEwhVbmlUcnVzdDEYMBYGA1UEAxMPVUNBIEdsb2JhbCBSb290MIICIjANBgkq
-hkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA2rPlBlA/9nP3xDK/RqUlYjOHsGj+p9+I
-A2N9Apb964fJ7uIIu527u+RBj8cwiQ9tJMAEbBSUgU2gDXRm8/CFr/hkGd656YGT
-0CiFmUdCSiw8OCdKzP/5bBnXtfPvm65bNAbXj6ITBpyKhELVs6OQaG2BkO5NhOxM
-cE4t3iQ5zhkAQ5N4+QiGHUPR9HK8BcBn+sBR0smFBySuOR56zUHSNqth6iur8CBV
-mTxtLRwuLnWW2HKX4AzKaXPudSsVCeCObbvaE/9GqOgADKwHLx25urnRoPeZnnRc
-GQVmMc8+KlL+b5/zub35wYH1N9ouTIElXfbZlJrTNYsgKDdfUet9Ysepk9H50DTL
-qScmLCiQkjtVY7cXDlRzq6987DqrcDOsIfsiJrOGrCOp139tywgg8q9A9f9ER3Hd
-J90TKKHqdjn5EKCgTUCkJ7JZFStsLSS3JGN490MYeg9NEePorIdCjedYcaSrbqLA
-l3y74xNLytu7awj5abQEctXDRrl36v+6++nwOgw19o8PrgaEFt2UVdTvyie3AzzF
-HCYq9TyopZWbhvGKiWf4xwxmse1Bv4KmAGg6IjTuHuvlb4l0T2qqaqhXZ1LUIGHB
-zlPL/SR/XybfoQhplqCe/klD4tPq2sTxiDEhbhzhzfN1DiBEFsx9c3Q1RSw7gdQg
-7LYJjD5IskkCAwEAAaOBojCBnzALBgNVHQ8EBAMCAQYwDAYDVR0TBAUwAwEB/zBj
-BgNVHSUEXDBaBggrBgEFBQcDAQYIKwYBBQUHAwIGCCsGAQUFBwMDBggrBgEFBQcD
-BAYIKwYBBQUHAwUGCCsGAQUFBwMGBggrBgEFBQcDBwYIKwYBBQUHAwgGCCsGAQUF
-BwMJMB0GA1UdDgQWBBTZw9P4gJJnzF3SOqLXcaK0xDiALTANBgkqhkiG9w0BAQUF
-AAOCAgEA0Ih5ygiq9ws0oE4Jwul+NUiJcIQjL1HDKy9e21NrW3UIKlS6Mg7VxnGF
-sZdJgPaE0PC6t3GUyHlrpsVE6EKirSUtVy/m1jEp+hmJVCl+t35HNmktbjK81HXa
-QnO4TuWDQHOyXd/URHOmYgvbqm4FjMh/Rk85hZCdvBtUKayl1/7lWFZXbSyZoUkh
-1WHGjGHhdSTBAd0tGzbDLxLMC9Z4i3WA6UG5iLHKPKkWxk4V43I29tSgQYWvimVw
-TbVEEFDs7d9t5tnGwBLxSzovc+k8qe4bqi81pZufTcU0hF8mFGmzI7GJchT46U1R
-IgP/SobEHOh7eQrbRyWBfvw0hKxZuFhD5D1DCVR0wtD92e9uWfdyYJl2b/Unp7uD
-pEqB7CmB9HdL4UISVdSGKhK28FWbAS7d9qjjGcPORy/AeGEYWsdl/J1GW1fcfA67
-loMQfFUYCQSu0feLKj6g5lDWMDbX54s4U+xJRODPpN/xU3uLWrb2EZBL1nXz/gLz
-Ka/wI3J9FO2pXd96gZ6bkiL8HvgBRUGXx2sBYb4zaPKgZYRmvOAqpGjTcezHCN6j
-w8k2SjTxF+KAryAhk5Qe5hXTVGLxtTgv48y5ZwSpuuXu+RBuyy5+E6+SFP7zJ3N7
-OPxzbbm5iPZujAv1/P8JDrMtXnt145Ik4ubhWD5LKAN1axibRww=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDdjCCAl6gAwIBAgIEOhsEBTANBgkqhkiG9w0BAQUFADBRMQswCQYDVQQGEwJE
-SzEMMAoGA1UEChMDS01EMQ8wDQYDVQQLEwZLTUQtQ0ExIzAhBgNVBAMTGktNRC1D
-QSBLdmFsaWZpY2VyZXQgUGVyc29uMB4XDTAwMTEyMTIzMjQ1OVoXDTE1MTEyMjIz
-MjQ1OVowUTELMAkGA1UEBhMCREsxDDAKBgNVBAoTA0tNRDEPMA0GA1UECxMGS01E
-LUNBMSMwIQYDVQQDExpLTUQtQ0EgS3ZhbGlmaWNlcmV0IFBlcnNvbjCCASIwDQYJ
-KoZIhvcNAQEBBQADggEPADCCAQoCggEBANriF4Xd6yD7ZlBE317UBDObn+vRMVc6
-p3wNQODdEDJe2z1ncCz9NJvhoLGdOJhyg7VVPh0P2c+KZ9WI9mWOKZI2bp2WkLju
-jCcxbhTrurY3Wfc6gwLBqqFV8wWgaZKmvVWizjw9Kyi25f3yX4fOho6Qq2lvVbub
-tvVFXAd51GJ+/2Yed+a4Or2bz2RcqHS81B3pywsD4mgJR5xREv5jqPfwNP+V7bkc
-X+pfO4kVhZ/V+8MSPdQHgcV/iB3wP2mwgWyIBNc1reBidGTiz8unnWu55hcNfsvt
-LJbTs9OHhsR7naRuy+S402nDnD5vnONOFEsiHn46w+T0rtu7h6j4OvkCAwEAAaNW
-MFQwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQUeWLqmhI42Jxj7DifDsW+
-DlQhKD0wHwYDVR0jBBgwFoAUeWLqmhI42Jxj7DifDsW+DlQhKD0wDQYJKoZIhvcN
-AQEFBQADggEBANML/P42OuJ9aUV/0fItuIyc1JhqWvSqn5bXj+9eyEegcp8bHLHY
-42D1O+z0lNipdjYPSdMJ0wZOEUhr+150SdDQ1P/zQL8AUaLEBkRt7ZdzXPVH3PER
-qnf9IrpYBknZKfCAoVchA6Rr9WU3Sd8bMoRfMLKg8c0M8G6EPwCTcOFriSkbtvNG
-zd8r8I+WfUYIN/p8DI9JT9qfjVODnYPRMUm6KPvq27TsrGruKrqyaV94kWc8co8A
-v3zFLeCtghvUiRBdx+8Q7m5t4CkuSr0WINrqjIPFW2QrM1r82y09Fd16RkqL4LOg
-Lh6vB5KnTApv62rWdw7zWwYnjY6/vXYY1Aw=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIF4DCCA8igAwIBAgIRAPL6ZOJ0Y9ON/RAdBB92ylgwDQYJKoZIhvcNAQELBQAw
-ZzELMAkGA1UEBhMCY2gxETAPBgNVBAoTCFN3aXNzY29tMSUwIwYDVQQLExxEaWdp
-dGFsIENlcnRpZmljYXRlIFNlcnZpY2VzMR4wHAYDVQQDExVTd2lzc2NvbSBSb290
-IEVWIENBIDIwHhcNMTEwNjI0MDk0NTA4WhcNMzEwNjI1MDg0NTA4WjBnMQswCQYD
-VQQGEwJjaDERMA8GA1UEChMIU3dpc3Njb20xJTAjBgNVBAsTHERpZ2l0YWwgQ2Vy
-dGlmaWNhdGUgU2VydmljZXMxHjAcBgNVBAMTFVN3aXNzY29tIFJvb3QgRVYgQ0Eg
-MjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMT3HS9X6lds93BdY7Bx
-UglgRCgzo3pOCvrY6myLURYaVa5UJsTMRQdBTxB5f3HSek4/OE6zAMaVylvNwSqD
-1ycfMQ4jFrclyxy0uYAyXhqdk/HoPGAsp15XGVhRXrwsVgu42O+LgrQ8uMIkqBPH
-oCE2G3pXKSinLr9xJZDzRINpUKTk4RtiGZQJo/PDvO/0vezbE53PnUgJUmfANykR
-HvvSEaeFGHR55E+FFOtSN+KxRdjMDUN/rhPSays/p8LiqG12W0OfvrSdsyaGOx9/
-5fLoZigWJdBLlzin5M8J0TbDC77aO0RYjb7xnglrPvMyxyuHxuxenPaHZa0zKcQv
-idm5y8kDnftslFGXEBuGCxobP/YCfnvUxVFkKJ3106yDgYjTdLRZncHrYTNaRdHL
-OdAGalNgHa/2+2m8atwBz735j9m9W8E6X47aD0upm50qKGsaCnw8qyIL5XctcfaC
-NYGu+HuB5ur+rPQam3Rc6I8k9l2dRsQs0h4rIWqDJ2dVSqTjyDKXZpBy2uPUZC5f
-46Fq9mDU5zXNysRojddxyNMkM3OxbPlq4SjbX8Y96L5V5jcb7STZDxmPX2MYWFCB
-UWVv8p9+agTnNCRxunZLWB4ZvRVgRaoMEkABnRDixzgHcgplwLa7JSnaFp6LNYth
-7eVxV4O1PHGf40+/fh6Bn0GXAgMBAAGjgYYwgYMwDgYDVR0PAQH/BAQDAgGGMB0G
-A1UdIQQWMBQwEgYHYIV0AVMCAgYHYIV0AVMCAjASBgNVHRMBAf8ECDAGAQH/AgED
-MB0GA1UdDgQWBBRF2aWBbj2ITY1x0kbBbkUe88SAnTAfBgNVHSMEGDAWgBRF2aWB
-bj2ITY1x0kbBbkUe88SAnTANBgkqhkiG9w0BAQsFAAOCAgEAlDpzBp9SSzBc1P6x
-XCX5145v9Ydkn+0UjrgEjihLj6p7jjm02Vj2e6E1CqGdivdj5eu9OYLU43otb98T
-PLr+flaYC/NUn81ETm484T4VvwYmneTwkLbUwp4wLh/vx3rEUMfqe9pQy3omywC0
-Wqu1kx+AiYQElY2NfwmTv9SoqORjbdlk5LgpWgi/UOGED1V7XwgiG/W9mR4U9s70
-WBCCswo9GcG/W6uqmdjyMb3lOGbcWAXH7WMaLgqXfIeTK7KK4/HsGOV1timH59yL
-Gn602MnTihdsfSlEvoqq9X46Lmgxk7lq2prg2+kupYTNHAq4Sgj5nPFhJpiTt3tm
-7JFe3VE/23MPrQRYCd0EApUKPtN236YQHoA96M2kZNEzx5LH4k5E4wnJTsJdhw4S
-nr8PyQUQ3nqjsTzyP6WqJ3mtMX0f/fwZacXduT98zca0wjAefm6S139hdlqP65VN
-vBFuIXxZN5nQBrz5Bm0yFqXZaajh3DyAHmBR3NdUIR7KYndP+tiPsys6DXhyyWhB
-WkdKwqPrGtcKqzwyVcgKEZzfdNbwQBUdyLmPtTbFr/giuMod89a2GQ+fYWVq6nTI
-fI/DT11lgh/ZDYnadXL77/FHZxOzyNEZiCcmmpl5fx7kLD977vHeTYuWl8PVP3wb
-I+2ksx0WckNLIOFZfsLorSa/ovc=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIF8TCCA9mgAwIBAgIQALC3WhZIX7/hy/WL1xnmfTANBgkqhkiG9w0BAQsFADA4
-MQswCQYDVQQGEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6
-ZW5wZS5jb20wHhcNMDcxMjEzMTMwODI4WhcNMzcxMjEzMDgyNzI1WjA4MQswCQYD
-VQQGEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6ZW5wZS5j
-b20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDJ03rKDx6sp4boFmVq
-scIbRTJxldn+EFvMr+eleQGPicPK8lVx93e+d5TzcqQsRNiekpsUOqHnJJAKClaO
-xdgmlOHZSOEtPtoKct2jmRXagaKH9HtuJneJWK3W6wyyQXpzbm3benhB6QiIEn6H
-LmYRY2xU+zydcsC8Lv/Ct90NduM61/e0aL6i9eOBbsFGb12N4E3GVFWJGjMxCrFX
-uaOKmMPsOzTFlUFpfnXCPCDFYbpRR6AgkJOhkEvzTnyFRVSa0QUmQbC1TR0zvsQD
-yCV8wXDbO/QJLVQnSKwv4cSsPsjLkkxTOTcj7NMB+eAJRE1NZMDhDVqHIrytG6P+
-JrUV86f8hBnp7KGItERphIPzidF0BqnMC9bC3ieFUCbKF7jJeodWLBoBHmy+E60Q
-rLUk9TiRodZL2vG70t5HtfG8gfZZa88ZU+mNFctKy6lvROUbQc/hhqfK0GqfvEyN
-BjNaooXlkDWgYlwWTvDjovoDGrQscbNYLN57C9saD+veIR8GdwYDsMnvmfzAuU8L
-hij+0rnq49qlw0dpEuDb8PYZi+17cNcC1u2HGCgsBCRMd+RIihrGO5rUD8r6ddIB
-QFqNeb+Lz0vPqhbBleStTIo+F5HUsWLlguWABKQDfo2/2n+iD5dPDNMN+9fR5XJ+
-HMh3/1uaD7euBUbl8agW7EekFwIDAQABo4H2MIHzMIGwBgNVHREEgagwgaWBD2lu
-Zm9AaXplbnBlLmNvbaSBkTCBjjFHMEUGA1UECgw+SVpFTlBFIFMuQS4gLSBDSUYg
-QTAxMzM3MjYwLVJNZXJjLlZpdG9yaWEtR2FzdGVpeiBUMTA1NSBGNjIgUzgxQzBB
-BgNVBAkMOkF2ZGEgZGVsIE1lZGl0ZXJyYW5lbyBFdG9yYmlkZWEgMTQgLSAwMTAx
-MCBWaXRvcmlhLUdhc3RlaXowDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
-AQYwHQYDVR0OBBYEFB0cZQ6o8iV7tJHP5LGx5r1VdGwFMA0GCSqGSIb3DQEBCwUA
-A4ICAQB4pgwWSp9MiDrAyw6lFn2fuUhfGI8NYjb2zRlrrKvV9pF9rnHzP7MOeIWb
-laQnIUdCSnxIOvVFfLMMjlF4rJUT3sb9fbgakEyrkgPH7UIBzg/YsfqikuFgba56
-awmqxinuaElnMIAkejEWOVt+8Rwu3WwJrfIxwYJOubv5vr8qhT/AQKM6WfxZSzwo
-JNu0FXWuDYi6LnPAvViH5ULy617uHjAimcs30cQhbIHsvm0m5hzkQiCeR7Csg1lw
-LDXWrzY0tM07+DKo7+N4ifuNRSzanLh+QBxh5z6ikixL8s36mLYp//Pye6kfLqCT
-VyvehQP5aTfLnnhqBbTFMXiJ7HqnheG5ezzevh55hM6fcA5ZwjUukCox2eRFekGk
-LhObNA5me0mrZJfQRsN5nXJQY6aYWwa9SG3YOYNw6DXwBdGqvOPbyALqfP2C2sJb
-UjWumDqtujWTI6cfSN01RpiyEGjkpTHCClguGYEQyVB1/OpaFs4R1+7vUIgtYf8/
-QnMFlEPVjjxOAToZpR9GTnfQXeWBIiGH/pR9hNiTrdZoQ0iy2+tzJOeRf1SktoA+
-naM8THLCV8Sg1Mw4J87VBp6iSNnpn86CcDaTmjvfliHjWbcM2pE38P1ZWrOZyGls
-QyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDczCCAlugAwIBAgIQMDAwMDk3Mzc1NzM4NjAwMDANBgkqhkiG9w0BAQUFADBV
-MQswCQYDVQQGEwJGUjETMBEGA1UEChMKQ2VydGlOb21pczEcMBoGA1UECxMTQUMg
-UmFjaW5lIC0gUm9vdCBDQTETMBEGA1UEAxMKQ2VydGlOb21pczAeFw0wMDExMDkw
-MDAwMDBaFw0xMjExMDkwMDAwMDBaMFUxCzAJBgNVBAYTAkZSMRMwEQYDVQQKEwpD
-ZXJ0aU5vbWlzMRwwGgYDVQQLExNBQyBSYWNpbmUgLSBSb290IENBMRMwEQYDVQQD
-EwpDZXJ0aU5vbWlzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA8SWb
-4mS5RXB3ENSIcfrEzCj/TRUQuT1tMCU0YUfXFSgcPdWglIzCv3kvh07QoB+8xMl+
-fQHvSSduAxnNewz0GBY9rApCPKlP6CcnJr74OSVZIiWt9wLfl4wwhNhZOiikIpZp
-EdOXWqRc84P5cUlN3Lwmr1sjCWmHfTSS4cAKxfDbFLfE61etosyoFZUTQbIhb1Bf
-JL5xRXAUZudQiU42n/yAoSUrN4FLUfPQNlOe1AB81pIgX8g2ojwxDjfgqSs1JmBF
-uLKJ45uVLEenQBPmQCGjL3maV86IRmR3a9UGlgvKAk0NBdh8mrQyQvcUlLBIQBCm
-l7wppt6maQHUNEPQSwIDAQABoz8wPTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUw
-AwEB/zAdBgNVHQ4EFgQU+F4ho6ijFeb4tRG7/kIEXU2OgnowDQYJKoZIhvcNAQEF
-BQADggEBACe9FJayK6bXkJQrilBFMh75QPdFOks9PJuo86OMUlBDZGYFTCh9Arex
-N3KYCnAEzazYIALwr7eASJJDIQMu1Q+pkx/7ACde4kP47F27M2rm+v5HnGooCLz2
-s7Fe/WUycTQqgwF5lNp03m1ce/TvovgkEZeVN5wM/7+SsZLJGDigXGeq48j2g2hn
-8OckX9Ciyo0U3/1IVeigNBisiaOlsHSZOEPBZQRiZULob+NVbXVPo8nM1OyP3aHI
-LQex1yYcCr9m93nOiZyKkur3Uedf1yMTBe+fflnPFKGYnVqvTGXCKVdHzQBfpILA
-AuaC+5ykZhSiSMf8nmL2oPMcLO7YQw4=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUx
-KzApBgNVBAoMIlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAd
-BgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNl
-YyBHbG9iYWxSb290IENsYXNzIDMwHhcNMDgxMDAxMTAyOTU2WhcNMzMxMDAxMjM1
-OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lzdGVtcyBFbnRlcnBy
-aXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBDZW50
-ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwggEiMA0G
-CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC9dZPwYiJvJK7genasfb3ZJNW4t/zN
-8ELg63iIVl6bmlQdTQyK9tPPcPRStdiTBONGhnFBSivwKixVA9ZIw+A5OO3yXDw/
-RLyTPWGrTs0NvvAgJ1gORH8EGoel15YUNpDQSXuhdfsaa3Ox+M6pCSzyU9XDFES4
-hqX2iys52qMzVNn6chr3IhUciJFrf2blw2qAsCTz34ZFiP0Zf3WHHx+xGwpzJFu5
-ZeAsVMhg02YXP+HMVDNzkQI6pn97djmiH5a2OK61yJN0HZ65tOVgnS9W0eDrXltM
-EnAMbEQgqxHY9Bn20pxSN+f6tsIxO0rUFJmtxxr1XV/6B7h8DR/Wgx6zAgMBAAGj
-QjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS1
-A/d2O2GCahKqGFPrAyGUv/7OyjANBgkqhkiG9w0BAQsFAAOCAQEAVj3vlNW92nOy
-WL6ukK2YJ5f+AbGwUgC4TeQbIXQbfsDuXmkqJa9c1h3a0nnJ85cp4IaH3gRZD/FZ
-1GSFS5mvJQQeyUapl96Cshtwn5z2r3Ex3XsFpSzTucpH9sry9uetuUg/vBa3wW30
-6gmv7PO15wWeph6KU1HWk4HMdJP2udqmJQV0eVp+QD6CSyYRMG7hP0HHRwA11fXT
-91Q+gT3aSWqas+8QPebrb9HIIkfLzM8BMZLZGOMivgkeGj5asuRrDFR6fUNOuIml
-e9eiPZaGzPImNC1qkp2aGtAw4l1OBLBfiyB+d8E9lYLRRpo7PHi4b6HQDWSieB4p
-TpPDpFQUWw==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4G
-A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNp
-Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1
-MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMjETMBEG
-A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI
-hvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6ErPL
-v4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8
-eoLrvozps6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklq
-tTleiDTsvHgMCJiEbKjNS7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzd
-C9XZzPnqJworc5HGnRusyMvo4KD0L5CLTfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pa
-zq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6CygPCm48CAwEAAaOBnDCB
-mTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUm+IH
-V2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5n
-bG9iYWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG
-3lm0mi3f3BmGLjANBgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4Gs
-J0/WwbgcQ3izDJr86iw8bmEbTUsp9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO
-291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu01yiPqFbQfXf5WRDLenVOavS
-ot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG79G+dwfCMNYxd
-AfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7
-TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDoTCCAomgAwIBAgIQKTZHquOKrIZKI1byyrdhrzANBgkqhkiG9w0BAQUFADBO
-MQswCQYDVQQGEwJ1czEYMBYGA1UEChMPVS5TLiBHb3Zlcm5tZW50MQ0wCwYDVQQL
-EwRGQkNBMRYwFAYDVQQDEw1Db21tb24gUG9saWN5MB4XDTA3MTAxNTE1NTgwMFoX
-DTI3MTAxNTE2MDgwMFowTjELMAkGA1UEBhMCdXMxGDAWBgNVBAoTD1UuUy4gR292
-ZXJubWVudDENMAsGA1UECxMERkJDQTEWMBQGA1UEAxMNQ29tbW9uIFBvbGljeTCC
-ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJeNvTMn5K1b+3i9L0dHbsd4
-6ZOcpN7JHP0vGzk4rEcXwH53KQA7Ax9oD81Npe53uCxiazH2+nIJfTApBnznfKM9
-hBiKHa4skqgf6F5PjY7rPxr4nApnnbBnTfAu0DDew5SwoM8uCjR/VAnTNr2kSVdS
-c+md/uRIeUYbW40y5KVIZPMiDZKdCBW/YDyD90ciJSKtKXG3d+8XyaK2lF7IMJCk
-FEhcVlcLQUwF1CpMP64Sm1kRdXAHImktLNMxzJJ+zM2kfpRHqpwJCPZLr1LoakCR
-xVW9QLHIbVeGlRfmH3O+Ry4+i0wXubklHKVSFzYIWcBCvgortFZRPBtVyYyQd+sC
-AwEAAaN7MHkwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0O
-BBYEFC9Yl9ipBZilVh/72at17wI8NjTHMBIGCSsGAQQBgjcVAQQFAgMBAAEwIwYJ
-KwYBBAGCNxUCBBYEFHa3YJbdFFYprHWF03BjwbxHhhyLMA0GCSqGSIb3DQEBBQUA
-A4IBAQBgrvNIFkBypgiIybxHLCRLXaCRc+1leJDwZ5B6pb8KrbYq+Zln34PFdx80
-CTj5fp5B4Ehg/uKqXYeI6oj9XEWyyWrafaStsU+/HA2fHprA1RRzOCuKeEBuMPdi
-4c2Z/FFpZ2wR3bgQo2jeJqVW/TZsN5hs++58PGxrcD/3SDcJjwtCga1GRrgLgwb0
-Gzigf0/NC++DiYeXHIowZ9z9VKEDfgHLhUyxCynDvux84T8PCVI8L6eaSP436REG
-WOE2QYrEtr+O3c5Ks7wawM36GpnScZv6z7zyxFSjiDV2zBssRm8MtNHDYXaSdBHq
-S4CNHIkRi+xb/xfJSPzn4AYR4oRe
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFYzCCA0ugAwIBAgIBOzANBgkqhkiG9w0BAQsFADBTMQswCQYDVQQGEwJJTDEW
-MBQGA1UEChMNU3RhcnRDb20gTHRkLjEsMCoGA1UEAxMjU3RhcnRDb20gQ2VydGlm
-aWNhdGlvbiBBdXRob3JpdHkgRzIwHhcNMTAwMTAxMDEwMDAxWhcNMzkxMjMxMjM1
-OTAxWjBTMQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjEsMCoG
-A1UEAxMjU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgRzIwggIiMA0G
-CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2iTZbB7cgNr2Cu+EWIAOVeq8Oo1XJ
-JZlKxdBWQYeQTSFgpBSHO839sj60ZwNq7eEPS8CRhXBF4EKe3ikj1AENoBB5uNsD
-vfOpL9HG4A/LnooUCri99lZi8cVytjIl2bLzvWXFDSxu1ZJvGIsAQRSCb0AgJnoo
-D/Uefyf3lLE3PbfHkffiAez9lInhzG7TNtYKGXmu1zSCZf98Qru23QumNK9LYP5/
-Q0kGi4xDuFby2X8hQxfqp0iVAXV16iulQ5XqFYSdCI0mblWbq9zSOdIxHWDirMxW
-RST1HFSr7obdljKF+ExP6JV2tgXdNiNnvP8V4so75qbsO+wmETRIjfaAKxojAuuK
-HDp2KntWFhxyKrOq42ClAJ8Em+JvHhRYW6Vsi1g8w7pOOlz34ZYrPu8HvKTlXcxN
-nw3h3Kq74W4a7I/htkxNeXJdFzULHdfBR9qWJODQcqhaX2YtENwvKhOuJv4KHBnM
-0D4LnMgJLvlblnpHnOl68wVQdJVznjAJ85eCXuaPOQgeWeU1FEIT/wCc976qUM/i
-UUjXuG+v+E5+M5iSFGI6dWPPe/regjupuznixL0sAA7IF6wT700ljtizkC+p2il9
-Ha90OrInwMEePnWjFqmveiJdnxMaz6eg6+OGCtP95paV1yPIN93EfKo2rJgaErHg
-TuixO/XWb/Ew1wIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQE
-AwIBBjAdBgNVHQ4EFgQUS8W0QGutHLOlHGVuRjaJhwUMDrYwDQYJKoZIhvcNAQEL
-BQADggIBAHNXPyzVlTJ+N9uWkusZXn5T50HsEbZH77Xe7XRcxfGOSeD8bpkTzZ+K
-2s06Ctg6Wgk/XzTQLwPSZh0avZyQN8gMjgdalEVGKua+etqhqaRpEpKwfTbURIfX
-UfEpY9Z1zRbkJ4kd+MIySP3bmdCPX1R0zKxnNBFi2QwKN4fRoxdIjtIXHfbX/dtl
-6/2o1PXWT6RbdejF0mCy2wl+JYt7ulKSnj7oxXehPOBKc2thz4bcQ///If4jXSRK
-9dNtD2IEBVeC2m6kMyV5Sy5UGYvMLD0w6dEG/+gyRr61M3Z3qAFdlsHB1b6uJcDJ
-HgoJIIihDsnzb02CVAAgp9KP5DlUFy6NHrgbuxu9mk47EDTcnIhT76IxW1hPkWLI
-wpqazRVdOKnWvvgTtZ8SafJQYqz7Fzf07rh1Z2AQ+4NQ+US1dZxAF7L+/XldblhY
-XzD8AK6vM8EOTmy6p6ahfzLbOOCxchcKK5HsamMm7YnUeMx0HgX4a/6ManY5Ka5l
-IxKVCCIcl85bBu4M4ru8H0ST9tg4RQUh7eStqxK2A6RCLi3ECToDZ2mEmuFZkIoo
-hdVddLHRDiBYmxOlsGOm7XtH/UVVMKTumtTm4ofvmMkyghEpIrwACjFeLQ/Ajulr
-so8uBtjRkcfGEvRM/TAXw8HaOFvjqermobp573PYtlNXLfbQ4ddI
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDIDCCAgigAwIBAgIBHTANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEP
-MA0GA1UEChMGU29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MyIENBMB4XDTAx
-MDQwNjA3Mjk0MFoXDTIxMDQwNjA3Mjk0MFowOTELMAkGA1UEBhMCRkkxDzANBgNV
-BAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJhIENsYXNzMiBDQTCCASIwDQYJKoZI
-hvcNAQEBBQADggEPADCCAQoCggEBAJAXSjWdyvANlsdE+hY3/Ei9vX+ALTU74W+o
-Z6m/AxxNjG8yR9VBaKQTBME1DJqEQ/xcHf+Js+gXGM2RX/uJ4+q/Tl18GybTdXnt
-5oTjV+WtKcT0OijnpXuENmmz/V52vaMtmdOQTiMofRhj8VQ7Jp12W5dCsv+u8E7s
-3TmVToMGf+dJQMjFAbJUWmYdPfz56TwKnoG4cPABi+QjVHzIrviQHgCWctRUz2Ej
-vOr7nQKV0ba5cTppCD8PtOFCx4j1P5iop7oc4HFx71hXgVB6XGt0Rg6DA5jDjqhu
-8nYybieDwnPz3BjotJPqdURrBGAgcVeHnfO+oJAjPYok4doh28MCAwEAAaMzMDEw
-DwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISqCqWITTXjwwCwYDVR0PBAQDAgEG
-MA0GCSqGSIb3DQEBBQUAA4IBAQBazof5FnIVV0sd2ZvnoiYw7JNn39Yt0jSv9zil
-zqsWuasvfDXLrNAPtEwr/IDva4yRXzZ299uzGxnq9LIR/WFxRL8oszodv7ND6J+/
-3DEIcbCdjdY0RzKQxmUk96BKfARzjzlvF4xytb1LyHr4e4PDKE6cCepnP7JnBBvD
-FNr450kkkdAdavphOe9r5yF1BgfYErQhIHBCcYHaPJo2vqZbDWpsmh+Re/n570K6
-Tk6ezAyNlNzZRZxe7EJQY670XcSxEtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2
-ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLHllpwrN9M
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDoDCCAoigAwIBAgIBMTANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJKUDEO
-MAwGA1UEChMFTEdQS0kxGjAYBgNVBAsTEUFwcGxpY2F0aW9uIENBIEcyMB4XDTA2
-MDMzMTE1MDAwMFoXDTE2MDMzMTE0NTk1OVowOTELMAkGA1UEBhMCSlAxDjAMBgNV
-BAoTBUxHUEtJMRowGAYDVQQLExFBcHBsaWNhdGlvbiBDQSBHMjCCASIwDQYJKoZI
-hvcNAQEBBQADggEPADCCAQoCggEBALk1xhD422jbB8RATLAdHjbcw0H2z1UVbQh/
-XMZoVeXnV/GWUebhTXgPbkAVcDtl/hHf59PWWDU74Z8C/JRSRi6znmCbAp7JgtL2
-464JT4REtmKbAFFouDqt7GTRMkvplESDtA7OIYlrsDbAmMZLnMI+W2AqCTErLatM
-3rGg/VhWwoMdILzEhAmHe6iVl8YljoPgPpMN0cd9c6mo/BkAQC4iuHozQfV4/Vpx
-54LZSIhc7KiFhy1tgIlnGmm+EMBaju2IfT5vLDhrN85H2KIxMN5+U2Vsi4ZTQSBs
-vUilfq8AWlYSWIHR3IlZ+bXu+E2a2EQpi3mn9yKq6nxctBaIIA0CAwEAAaOBsjCB
-rzAdBgNVHQ4EFgQUf7hdjsQYa8Z9zC7prs405xdd4KEwDgYDVR0PAQH/BAQDAgEG
-MEwGA1UdHwRFMEMwQaA/oD2kOzA5MQswCQYDVQQGEwJKUDEOMAwGA1UEChMFTEdQ
-S0kxGjAYBgNVBAsTEUFwcGxpY2F0aW9uIENBIEcyMA8GA1UdEwEB/wQFMAMBAf8w
-HwYDVR0jBBgwFoAUf7hdjsQYa8Z9zC7prs405xdd4KEwDQYJKoZIhvcNAQEFBQAD
-ggEBADzYczZABkhKVBn1J0g5JaVuQue2zRvLOTS3m+xPKr535MqE/B3rmyJA1fT7
-aIdy/Eddag5SSuO1XUjGIpbmM21tq/bN18skWoyoRZ4+YYJ9lNUF8Bo1X3EvLlS1
-QQXvhg1S75yYG/EsTDrR84bTjD56L4ZFjoMyJlu/U8oOUVbcmsJaMBkNp57Vqpsg
-OWl4IfSXbdEOEUwu0xtasPmXeFwqj1Jl7kxCJcI3MA5tKzWUgwbor0U7BGanMLv5
-4CE7Y259RF06alPvERck/VSyWmxzViHJbC2XpEKzJ2EFIWNt6ii8TxpvQtyYq1XT
-HhvAkj+bweY7F1bixJhDJe62ywA=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIICZzCCAdCgAwIBAgIBBDANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQGEwJVUzEY
-MBYGA1UEChMPVS5TLiBHb3Zlcm5tZW50MQwwCgYDVQQLEwNEb0QxDDAKBgNVBAsT
-A1BLSTEcMBoGA1UEAxMTRG9EIENMQVNTIDMgUm9vdCBDQTAeFw0wMDA1MTkxMzEz
-MDBaFw0yMDA1MTQxMzEzMDBaMGExCzAJBgNVBAYTAlVTMRgwFgYDVQQKEw9VLlMu
-IEdvdmVybm1lbnQxDDAKBgNVBAsTA0RvRDEMMAoGA1UECxMDUEtJMRwwGgYDVQQD
-ExNEb0QgQ0xBU1MgMyBSb290IENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB
-gQC1MP5kvurMbe2BLPd/6Rm6DmlqKOGpqcuVWB/x5pppU+CIP5HFUbljl6jmIYwT
-XjY8qFf6+HAsTGrLvzCnTBbkMlz4ErBR+BZXjS+0TfouqJToKmHUVw1Hzm4sL36Y
-Z8wACKu2lhY1woWR5VugCsdmUmLzYXWVF668KlYppeArUwIDAQABoy8wLTAdBgNV
-HQ4EFgQUbJyl8FyPbUGNxBc7kFfCD6PNbf4wDAYDVR0TBAUwAwEB/zANBgkqhkiG
-9w0BAQUFAAOBgQCvcUT5lyPMaGmMQwdBuoggsyIAQciYoFUczT9usZNcrfoYmrsc
-c2/9JEKPh59Rz76Gn+nXikhPCNlplKw/5g8tlw8ok3ZPYt//oM1h+KaGDDE0INx/
-L6j7Ob6V7jhZAmLB3mwVT+DfnbvkeXMk/WNklfdKqJkfSGWVx3u/eDLneg==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFUjCCBDqgAwIBAgIBAjANBgkqhkiG9w0BAQUFADBkMQswCQYDVQQGEwJLUjEN
-MAsGA1UEChMES0lTQTEuMCwGA1UECxMlS29yZWEgQ2VydGlmaWNhdGlvbiBBdXRo
-b3JpdHkgQ2VudHJhbDEWMBQGA1UEAxMNS0lTQSBSb290Q0EgMzAeFw0wNDExMTkw
-NjM5NTFaFw0xNDExMTkwNjM5NTFaMGQxCzAJBgNVBAYTAktSMQ0wCwYDVQQKEwRL
-SVNBMS4wLAYDVQQLEyVLb3JlYSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBDZW50
-cmFsMRYwFAYDVQQDEw1LSVNBIFJvb3RDQSAzMIIBIDANBgkqhkiG9w0BAQEFAAOC
-AQ0AMIIBCAKCAQEA3rrtF2Wu0b1KPazbgHLMWOHn4ZPazDB6z+8Lri2nQ6u/p0LP
-CFYIpEcdffqG79gwlyY0YTyADvjU65/8IjAboW0+40zSVU4WQDfC9gdu2we1pYyW
-geKbXH6UYcjOhDyx+gDmctMJhXfp3F4hT7TkTvTiF6tQrxz/oTlYdVsSspa5jfBw
-YkhbVigqpYeRNrkeJPW5unu2UlFbF1pgBWycwubGjD756t08jP+J3kNwrB248XXN
-OMpTDUdoasY8GMq94bS+DvTQ49IT+rBRERHUQavo9DmO4TSETwuTqmo4/OXGeEeu
-dhf6oYA3BgAVCP1rI476cg2V1ktisWjC3TSbXQIBA6OCAg8wggILMB8GA1UdIwQY
-MBaAFI+B8NqmzXQ8vmb0FWtGpP4GKMyqMB0GA1UdDgQWBBSPgfDaps10PL5m9BVr
-RqT+BijMqjAOBgNVHQ8BAf8EBAMCAQYwggEuBgNVHSAEggElMIIBITCCAR0GBFUd
-IAAwggETMDAGCCsGAQUFBwIBFiRodHRwOi8vd3d3LnJvb3RjYS5vci5rci9yY2Ev
-Y3BzLmh0bWwwgd4GCCsGAQUFBwICMIHRHoHOx3QAIMd4yZ3BHLKUACCs9cd4x3jJ
-ncEcx4WyyLLkACgAVABoAGkAcwAgAGMAZQByAHQAaQBmAGkAYwBhAHQAZQAgAGkA
-cwAgAGEAYwBjAHIAZQBkAGkAdABlAGQAIAB1AG4AZABlAHIAIABFAGwAZQBjAHQA
-cgBvAG4AaQBjACAAUwBpAGcAbgBhAHQAdQByAGUAIABBAGMAdAAgAG8AZgAgAHQA
-aABlACAAUgBlAHAAdQBiAGwAaQBjACAAbwBmACAASwBvAHIAZQBhACkwMwYDVR0R
-BCwwKqQoMCYxJDAiBgNVBAMMG+2VnOq1reygleuztOuztO2YuOynhO2dpeybkDAz
-BgNVHRIELDAqpCgwJjEkMCIGA1UEAwwb7ZWc6rWt7KCV67O067O07Zi47KeE7Z2l
-7JuQMA8GA1UdEwEB/wQFMAMBAf8wDAYDVR0kBAUwA4ABADANBgkqhkiG9w0BAQUF
-AAOCAQEAz9b3Dv2wjG4FFY6oXCuyWtEeV6ZeGKqCEQj8mbdbp+PI0qLT+SQ09+Pk
-rolUR9NpScmAwRHr4inH9gaLX7riXs+rw87P7pIl3J85Hg4D9N6QW6FwmVzHc07J
-pHVJeyWhn4KSjU3sYcUMMqfHODiAVToqgx2cZHm5Dac1Smjvj/8F2LpOVmHY+Epw
-mAiWk9hgxzrsX58dKzVPSBShmrtv7tIDhlPxEMcHVGJeNo7iHCsdF03m9VrvirqC
-6HfZKBF+N4dKlArJQOk1pTr7ZD7yXxZ683bXzu4/RB1Fql8RqlMcOh9SUWJUD6OQ
-Nc9Nb7rHviwJ8TX4Absk3TC8SA/u2Q==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4G
-A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNp
-Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4
-MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEG
-A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI
-hvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWtiHL8
-RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsT
-gHeMCOFJ0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmm
-KPZpO/bLyCiR5Z2KYVc3rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zd
-QQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjlOCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZ
-XriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2xmmFghcCAwEAAaNCMEAw
-DgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI/wS3+o
-LkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZU
-RUm7lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMp
-jjM5RcOO5LlXbKr8EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK
-6fBdRoyV3XpYKBovHd7NADdBj+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQX
-mcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs
-Mx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH
-WD9f
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIC+TCCAoCgAwIBAgINAKaLeSkAAAAAUNCR+TAKBggqhkjOPQQDAzCBvzELMAkG
-A1UEBhMCVVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3
-d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVybXMxOTA3BgNVBAsTMChjKSAyMDEyIEVu
-dHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25seTEzMDEGA1UEAxMq
-RW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRUMxMB4XDTEy
-MTIxODE1MjUzNloXDTM3MTIxODE1NTUzNlowgb8xCzAJBgNVBAYTAlVTMRYwFAYD
-VQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3QubmV0
-L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxMiBFbnRydXN0LCBJbmMuIC0g
-Zm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxMzAxBgNVBAMTKkVudHJ1c3QgUm9vdCBD
-ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEVDMTB2MBAGByqGSM49AgEGBSuBBAAi
-A2IABIQTydC6bUF74mzQ61VfZgIaJPRbiWlH47jCffHyAsWfoPZb1YsGGYZPUxBt
-ByQnoaD41UcZYUx9ypMn6nQM72+WCf5j7HBdNq1nd67JnXxVRDqiY1Ef9eNi1KlH
-Bz7MIKNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0O
-BBYEFLdj5xrdjekIplWDpOBqUEFlEUJJMAoGCCqGSM49BAMDA2cAMGQCMGF52OVC
-R98crlOZF7ZvHH3hvxGU0QOIdeSNiaSKd0bebWHvAvX7td/M/k7//qnmpwIwW5nX
-hTcGtXsI/esni0qU+eH6p44mCOh8kmhtc9hvJqwhAriZtyZBWyVgrtBIGu4G
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIHTzCCBTegAwIBAgIJAKPaQn6ksa7aMA0GCSqGSIb3DQEBBQUAMIGuMQswCQYD
-VQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0
-IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3
-MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xKTAnBgNVBAMTIENoYW1iZXJz
-IG9mIENvbW1lcmNlIFJvb3QgLSAyMDA4MB4XDTA4MDgwMTEyMjk1MFoXDTM4MDcz
-MTEyMjk1MFowga4xCzAJBgNVBAYTAkVVMUMwQQYDVQQHEzpNYWRyaWQgKHNlZSBj
-dXJyZW50IGFkZHJlc3MgYXQgd3d3LmNhbWVyZmlybWEuY29tL2FkZHJlc3MpMRIw
-EAYDVQQFEwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENhbWVyZmlybWEgUy5BLjEp
-MCcGA1UEAxMgQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdCAtIDIwMDgwggIiMA0G
-CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCvAMtwNyuAWko6bHiUfaN/Gh/2NdW9
-28sNRHI+JrKQUrpjOyhYb6WzbZSm891kDFX29ufyIiKAXuFixrYp4YFs8r/lfTJq
-VKAyGVn+H4vXPWCGhSRv4xGzdz4gljUha7MI2XAuZPeEklPWDrCQiorjh40G072Q
-DuKZoRuGDtqaCrsLYVAGUvGef3bsyw/QHg3PmTA9HMRFEFis1tPo1+XqxQEHd9ZR
-5gN/ikilTWh1uem8nk4ZcfUyS5xtYBkL+8ydddy/Js2Pk3g5eXNeJQ7KXOt3EgfL
-ZEFHcpOrUMPrCXZkNNI5t3YRCQ12RcSprj1qr7V9ZS+UWBDsXHyvfuK2GNnQm05a
-Sd+pZgvMPMZ4fKecHePOjlO+Bd5gD2vlGts/4+EhySnB8esHnFIbAURRPHsl18Tl
-UlRdJQfKFiC4reRB7noI/plvg6aRArBsNlVq5331lubKgdaX8ZSD6e2wsWsSaR6s
-+12pxZjptFtYer49okQ6Y1nUCyXeG0+95QGezdIp1Z8XGQpvvwyQ0wlf2eOKNcx5
-Wk0ZN5K3xMGtr/R5JJqyAQuxr1yW84Ay+1w9mPGgP0revq+ULtlVmhduYJ1jbLhj
-ya6BXBg14JC7vjxPNyK5fuvPnnchpj04gftI2jE9K+OJ9dC1vX7gUMQSibMjmhAx
-hduub+84Mxh2EQIDAQABo4IBbDCCAWgwEgYDVR0TAQH/BAgwBgEB/wIBDDAdBgNV
-HQ4EFgQU+SSsD7K1+HnA+mCIG8TZTQKeFxkwgeMGA1UdIwSB2zCB2IAU+SSsD7K1
-+HnA+mCIG8TZTQKeFxmhgbSkgbEwga4xCzAJBgNVBAYTAkVVMUMwQQYDVQQHEzpN
-YWRyaWQgKHNlZSBjdXJyZW50IGFkZHJlc3MgYXQgd3d3LmNhbWVyZmlybWEuY29t
-L2FkZHJlc3MpMRIwEAYDVQQFEwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENhbWVy
-ZmlybWEgUy5BLjEpMCcGA1UEAxMgQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdCAt
-IDIwMDiCCQCj2kJ+pLGu2jAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRV
-HSAAMCowKAYIKwYBBQUHAgEWHGh0dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20w
-DQYJKoZIhvcNAQEFBQADggIBAJASryI1wqM58C7e6bXpeHxIvj99RZJe6dqxGfwW
-PJ+0W2aeaufDuV2I6A+tzyMP3iU6XsxPpcG1Lawk0lgH3qLPaYRgM+gQDROpI9CF
-5Y57pp49chNyM/WqfcZjHwj0/gF/JM8rLFQJ3uIrbZLGOU8W6jx+ekbURWpGqOt1
-glanq6B8aBMz9p0w8G8nOSQjKpD9kCk18pPfNKXG9/jvjA9iSnyu0/VU+I22mlaH
-FoI6M6taIgj3grrqLuBHmrS1RaMFO9ncLkVAO+rcf+g769HsJtg1pDDFOqxXnrN2
-pSB7+R5KBWIBpih1YJeSDW4+TTdDDZIVnBgizVGZoCkaPF+KMjNbMMeJL0eYD6MD
-xvbxrN8y8NmBGuScvfaAFPDRLLmF9dijscilIeUcE5fuDr3fKanvNFNb0+RqE4QG
-tjICxFKuItLcsiFCGtpA8CnJ7AoMXOLQusxI0zcKzBIKinmwPQN/aUv0NCB9szTq
-jktk9T79syNnFQ0EuPAtwQlRPLJsFfClI9eDdOTlLsn+mCdCxqvGnrDQWzilm1De
-fhiYtUU79nm06PcaewaD+9CL2rvHvRirCG88gGtAPxkZumWK5r7VXNM21+9AUiRg
-OGcEMeyP84LG3rlV8zsxkVrctQgVrXYlCg17LofiDKYGvCYQbTed7N14jHyAxfDZ
-d0jQ
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV
-BAYTAkNIMRUwEwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3aXNzU2ln
-biBHb2xkIENBIC0gRzIwHhcNMDYxMDI1MDgzMDM1WhcNMzYxMDI1MDgzMDM1WjBF
-MQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dpc3NTaWduIEFHMR8wHQYDVQQDExZT
-d2lzc1NpZ24gR29sZCBDQSAtIEcyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC
-CgKCAgEAr+TufoskDhJuqVAtFkQ7kpJcyrhdhJJCEyq8ZVeCQD5XJM1QiyUqt2/8
-76LQwB8CJEoTlo8jE+YoWACjR8cGp4QjK7u9lit/VcyLwVcfDmJlD909Vopz2q5+
-bbqBHH5CjCA12UNNhPqE21Is8w4ndwtrvxEvcnifLtg+5hg3Wipy+dpikJKVyh+c
-6bM8K8vzARO/Ws/BtQpgvd21mWRTuKCWs2/iJneRjOBiEAKfNA+k1ZIzUd6+jbqE
-emA8atufK+ze3gE/bk3lUIbLtK/tREDFylqM2tIrfKjuvqblCqoOpd8FUrdVxyJd
-MmqXl2MT28nbeTZ7hTpKxVKJ+STnnXepgv9VHKVxaSvRAiTysybUa9oEVeXBCsdt
-MDeQKuSeFDNeFhdVxVu1yzSJkvGdJo+hB9TGsnhQ2wwMC3wLjEHXuendjIj3o02y
-MszYF9rNt85mndT9Xv+9lz4pded+p2JYryU0pUHHPbwNUMoDAw8IWh+Vc3hiv69y
-FGkOpeUDDniOJihC8AcLYiAQZzlG+qkDzAQ4embvIIO1jEpWjpEA/I5cgt6IoMPi
-aG59je883WX0XaxR7ySArqpWl2/5rX3aYT+YdzylkbYcjCbaZaIJbcHiVOO5ykxM
-gI93e2CaHt+28kgeDrpOVG2Y4OGiGqJ3UM/EY5LsRxmd6+ZrzsECAwEAAaOBrDCB
-qTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUWyV7
-lqRlUX64OfPAeGZe6Drn8O4wHwYDVR0jBBgwFoAUWyV7lqRlUX64OfPAeGZe6Drn
-8O4wRgYDVR0gBD8wPTA7BglghXQBWQECAQEwLjAsBggrBgEFBQcCARYgaHR0cDov
-L3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBACe6
-45R88a7A3hfm5djV9VSwg/S7zV4Fe0+fdWavPOhWfvxyeDgD2StiGwC5+OlgzczO
-UYrHUDFu4Up+GC9pWbY9ZIEr44OE5iKHjn3g7gKZYbge9LgriBIWhMIxkziWMaa5
-O1M/wySTVltpkuzFwbs4AOPsF6m43Md8AYOfMke6UiI0HTJ6CVanfCU2qT1L2sCC
-bwq7EsiHSycR+R4tx5M/nttfJmtS2S6K8RTGRI0Vqbe/vd6mGu6uLftIdxf+u+yv
-GPUqUfA5hJeVbG4bwyvEdGB5JbAKJ9/fXtI5z0V9QkvfsywexcZdylU6oJxpmo/a
-77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCC
-hdiDyyJkvC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid3
-92qgQmwLOM7XdVAyksLfKzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEpp
-Ld6leNcG2mqeSz53OiATIgHQv2ieY2BrNU0LbbqhPcCT4H8js1WtciVORvnSFu+w
-ZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6LqjviOvrv1vA+ACOzB2+htt
-Qc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDqDCCApCgAwIBAgIJAP7c4wEPyUj/MA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNV
-BAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hMB4X
-DTA3MDYyOTE1MTMwNVoXDTI3MDYyOTE1MTMwNVowNDELMAkGA1UEBhMCRlIxEjAQ
-BgNVBAoMCURoaW15b3RpczERMA8GA1UEAwwIQ2VydGlnbmEwggEiMA0GCSqGSIb3
-DQEBAQUAA4IBDwAwggEKAoIBAQDIaPHJ1tazNHUmgh7stL7qXOEm7RFHYeGifBZ4
-QCHkYJ5ayGPhxLGWkv8YbWkj4Sti993iNi+RB7lIzw7sebYs5zRLcAglozyHGxny
-gQcPOJAZ0xH+hrTy0V4eHpbNgGzOOzGTtvKg0KmVEn2lmsxryIRWijOp5yIVUxbw
-zBfsV1/pogqYCd7jX5xv3EjjhQsVWqa6n6xI4wmy9/Qy3l40vhx4XUJbzg4ij02Q
-130yGLMLLGq/jj8UEYkgDncUtT2UCIf3JR7VsmAA7G8qKCVuKj4YYxclPz5EIBb2
-JsglrgVKtOdjLPOMFlN+XPsRGgjBRmKfIrjxwo1p3Po6WAbfAgMBAAGjgbwwgbkw
-DwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUGu3+QTmQtCRZvgHyUtVF9lo53BEw
-ZAYDVR0jBF0wW4AUGu3+QTmQtCRZvgHyUtVF9lo53BGhOKQ2MDQxCzAJBgNVBAYT
-AkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hggkA/tzj
-AQ/JSP8wDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG
-9w0BAQUFAAOCAQEAhQMeknH2Qq/ho2Ge6/PAD/Kl1NqV5ta+aDY9fm4fTIrv0Q8h
-bV6lUmPOEvjvKtpv6zf+EwLHyzs+ImvaYS5/1HI93TDhHkxAGYwP15zRgzB7mFnc
-fca5DClMoTOi62c6ZYTTluLtdkVwj7Ur3vkj1kluPBS1xp81HlDQwY9qcEQCYsuu
-HWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY1gkIl2PlwS6w
-t0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw
-WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDUzCCAjugAwIBAgIBAjANBgkqhkiG9w0BAQUFADBLMQswCQYDVQQGEwJOTzEd
-MBsGA1UECgwUQnV5cGFzcyBBUy05ODMxNjMzMjcxHTAbBgNVBAMMFEJ1eXBhc3Mg
-Q2xhc3MgMyBDQSAxMB4XDTA1MDUwOTE0MTMwM1oXDTE1MDUwOTE0MTMwM1owSzEL
-MAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBhc3MgQVMtOTgzMTYzMzI3MR0wGwYD
-VQQDDBRCdXlwYXNzIENsYXNzIDMgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEP
-ADCCAQoCggEBAKSO13TZKWTeXx+HgJHqTjnmGcZEC4DVC69TB4sSveZn8AKxifZg
-isRbsELRwCGoy+Gb72RRtqfPFfV0gGgEkKBYouZ0plNTVUhjP5JW3SROjvi6K//z
-NIqeKNc0n6wv1g/xpC+9UrJJhW05NfBEMJNGJPO251P7vGGvqaMU+8IXF4Rs4HyI
-+MkcVyzwPX6UvCWThOiaAJpFBUJXgPROztmuOfbIUxAMZTpHe2DC1vqRycZxbL2R
-hzyRhkmr8w+gbCZ2Xhysm3HljbybIR6c1jh+JIAVMYKWsUnTYjdbiAwKYjT+p0h+
-mbEwi5A3lRyoH6UsjfRVyNvdWQrCrXig9IsCAwEAAaNCMEAwDwYDVR0TAQH/BAUw
-AwEB/zAdBgNVHQ4EFgQUOBTmyPCppAP0Tj4io1vy1uCtQHQwDgYDVR0PAQH/BAQD
-AgEGMA0GCSqGSIb3DQEBBQUAA4IBAQABZ6OMySU9E2NdFm/soT4JXJEVKirZgCFP
-Bdy7pYmrEzMqnji3jG8CcmPHc3ceCQa6Oyh7pEfJYWsICCD8igWKH7y6xsL+z27s
-EzNxZy5p+qksP2bAEllNC1QCkoS72xLvg3BweMhT+t/Gxv/ciC8HwEmdMldg0/L2
-mSlf56oBzKwzqBwKu5HEA6BvtjT5htOzdlSY9EqBs1OdTUDs5XcTRa9bqh/YL0yC
-e/4qxFi7T/ye/QNlGioOw6UgFpRreaaiErS7GqQjel/wroQk5PMr+4okoyeYZdow
-dXb8GZHo2+ubPzK/QJcHJrrM85SFSnonk8+QQtS4Wxam58tAA915
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDqzCCApOgAwIBAgIRAMcoRwmzuGxFjB36JPU2TukwDQYJKoZIhvcNAQEFBQAw
-PDEbMBkGA1UEAxMSQ29tU2lnbiBTZWN1cmVkIENBMRAwDgYDVQQKEwdDb21TaWdu
-MQswCQYDVQQGEwJJTDAeFw0wNDAzMjQxMTM3MjBaFw0yOTAzMTYxNTA0NTZaMDwx
-GzAZBgNVBAMTEkNvbVNpZ24gU2VjdXJlZCBDQTEQMA4GA1UEChMHQ29tU2lnbjEL
-MAkGA1UEBhMCSUwwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDGtWhf
-HZQVw6QIVS3joFd67+l0Kru5fFdJGhFeTymHDEjWaueP1H5XJLkGieQcPOqs49oh
-gHMhCu95mGwfCP+hUH3ymBvJVG8+pSjsIQQPRbsHPaHA+iqYHU4Gk/v1iDurX8sW
-v+bznkqH7Rnqwp9D5PGBpX8QTz7RSmKtUxvLg/8HZaWSLWapW7ha9B20IZFKF3ue
-Mv5WJDmyVIRD9YTC2LxBkMyd1mja6YJQqTtoz7VdApRgFrFD2UNd3V2Hbuq7s8lr
-9gOUCXDeFhF6K+h2j0kQmHe5Y1yLM5d19guMsqtb3nQgJT/j8xH5h2iGNXHDHYwt
-6+UarA9z1YJZQIDTAgMBAAGjgacwgaQwDAYDVR0TBAUwAwEB/zBEBgNVHR8EPTA7
-MDmgN6A1hjNodHRwOi8vZmVkaXIuY29tc2lnbi5jby5pbC9jcmwvQ29tU2lnblNl
-Y3VyZWRDQS5jcmwwDgYDVR0PAQH/BAQDAgGGMB8GA1UdIwQYMBaAFMFL7XC29z58
-ADsAj8c+DkWfHl3sMB0GA1UdDgQWBBTBS+1wtvc+fAA7AI/HPg5Fnx5d7DANBgkq
-hkiG9w0BAQUFAAOCAQEAFs/ukhNQq3sUnjO2QiBq1BW9Cav8cujvR3qQrFHBZE7p
-iL1DRYHjZiM/EoZNGeQFsOY3wo3aBijJD4mkU6l1P7CW+6tMM1X5eCZGbxs2mPtC
-dsGCuY7e+0X5YxtiOzkGynd6qDwJz2w2PQ8KRUtpFhpFfTMDZflScZAmlaxMDPWL
-kz/MdXSFmLr/YnpNH4n+rr2UAJm/EaXc4HnFFgt9AmEd6oX5AhVP51qJThRv4zdL
-hfXBPGHg/QVBspJ/wx2g0K5SZGBrGMYmnNj1ZOQ2GmKfig8+/21OGVZOIJFsnzQz
-OjRXUDpvgV4GxvU+fE6OK85lBi5d0ipTdF7Tbieejw==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w0BAQsFADCB
-mDELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsT
-MChjKSAyMDA4IEdlb1RydXN0IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25s
-eTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhv
-cml0eSAtIEczMB4XDTA4MDQwMjAwMDAwMFoXDTM3MTIwMTIzNTk1OVowgZgxCzAJ
-BgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykg
-MjAwOCBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0
-BgNVBAMTLUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
-LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANziXmJYHTNXOTIz
-+uvLh4yn1ErdBojqZI4xmKU4kB6Yzy5jK/BGvESyiaHAKAxJcCGVn2TAppMSAmUm
-hsalifD614SgcK9PGpc/BkTVyetyEH3kMSj7HGHmKAdEc5IiaacDiGydY8hS2pgn
-5whMcD60yRLBxWeDXTPzAxHsatBT4tG6NmCUgLthY2xbF37fQJQeqw3CIShwiP/W
-JmxsYAQlTlV+fe+/lEjetx3dcI0FX4ilm/LC7urRQEFtYjgdVgbFA0dRIBn8exAL
-DmKudlW/X3e+PkkBUz2YJQN2JFodtNuJ6nnltrM7P7pMKEF/BqxqjsHQ9gUdfeZC
-huOl1UcCAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYw
-HQYDVR0OBBYEFMR5yo6hTgMdHNxr2zFblD4/MH8tMA0GCSqGSIb3DQEBCwUAA4IB
-AQAtxRPPVoB7eni9n64smefv2t+UXglpp+duaIy9cr5HqQ6XErhK8WTTOd8lNNTB
-zU6B8A8ExCSzNJbGpqow32hhc9f5joWJ7w5elShKKiePEI4ufIbEAp7aDHdlDkQN
-kv39sxY2+hENHYwOB4lqKVb3cvTdFZx3NWZXqxNT2I7BQMXXExZacse3aQHEerGD
-AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUH
-SJsMC8tJP33st/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2G
-spki4cErx5z481+oghLrGREt
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFsDCCA5igAwIBAgIQFci9ZUdcr7iXAF7kBtK8nTANBgkqhkiG9w0BAQUFADBe
-MQswCQYDVQQGEwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0
-ZC4xKjAoBgNVBAsMIWVQS0kgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAe
-Fw0wNDEyMjAwMjMxMjdaFw0zNDEyMjAwMjMxMjdaMF4xCzAJBgNVBAYTAlRXMSMw
-IQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEqMCgGA1UECwwhZVBL
-SSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0BAQEF
-AAOCAg8AMIICCgKCAgEA4SUP7o3biDN1Z82tH306Tm2d0y8U82N0ywEhajfqhFAH
-SyZbCUNsIZ5qyNUD9WBpj8zwIuQf5/dqIjG3LBXy4P4AakP/h2XGtRrBp0xtInAh
-ijHyl3SJCRImHJ7K2RKilTza6We/CKBk49ZCt0Xvl/T29de1ShUCWH2YWEtgvM3X
-DZoTM1PRYfl61dd4s5oz9wCGzh1NlDivqOx4UXCKXBCDUSH3ET00hl7lSM2XgYI1
-TBnsZfZrxQWh7kcT1rMhJ5QQCtkkO7q+RBNGMD+XPNjX12ruOzjjK9SXDrkb5wdJ
-fzcq+Xd4z1TtW0ado4AOkUPB1ltfFLqfpo0kR0BZv3I4sjZsN/+Z0V0OWQqraffA
-sgRFelQArr5T9rXn4fg8ozHSqf4hUmTFpmfwdQcGlBSBVcYn5AGPF8Fqcde+S/uU
-WH1+ETOxQvdibBjWzwloPn9s9h6PYq2lY9sJpx8iQkEeb5mKPtf5P0B6ebClAZLS
-nT0IFaUQAS2zMnaolQ2zepr7BxB4EW/hj8e6DyUadCrlHJhBmd8hh+iVBmoKs2pH
-dmX2Os+PYhcZewoozRrSgx4hxyy/vv9haLdnG7t4TY3OZ+XkwY63I2binZB1NJip
-NiuKmpS5nezMirH4JYlcWrYvjB9teSSnUmjDhDXiZo1jDiVN1Rmy5nk3pyKdVDEC
-AwEAAaNqMGgwHQYDVR0OBBYEFB4M97Zn8uGSJglFwFU5Lnc/QkqiMAwGA1UdEwQF
-MAMBAf8wOQYEZyoHAAQxMC8wLQIBADAJBgUrDgMCGgUAMAcGBWcqAwAABBRFsMLH
-ClZ87lt4DJX5GFPBphzYEDANBgkqhkiG9w0BAQUFAAOCAgEACbODU1kBPpVJufGB
-uvl2ICO1J2B01GqZNF5sAFPZn/KmsSQHRGoqxqWOeBLoR9lYGxMqXnmbnwoqZ6Yl
-PwZpVnPDimZI+ymBV3QGypzqKOg4ZyYr8dW1P2WT+DZdjo2NQCCHGervJ8A9tDkP
-JXtoUHRVnAxZfVo9QZQlUgjgRywVMRnVvwdVxrsStZf0X4OFunHB2WyBEXYKCrC/
-gpf36j36+uwtqSiUO1bd0lEursC9CBWMd1I0ltabrNMdjmEPNXubrjlpC2JgQCA2
-j6/7Nu4tCEoduL+bXPjqpRugc6bY+G7gMwRfaKonh+3ZwZCc7b3jajWvY9+rGNm6
-5ulK6lCKD2GTHuItGeIwlDWSXQ62B68ZgI9HkFFLLk3dheLSClIKF5r8GrBQAuUB
-o2M3IUxExJtRmREOc5wGj1QupyheRDmHVi03vYVElOEMSyycw5KFNGHLD7ibSkNS
-/jQ6fbjpKdx2qcgw+BRxgMYeNkh0IkFch4LoGHGLQYlE535YW6i4jRPpp2zDR+2z
-Gp1iro2C6pSe3VkQw63d4k3jMdXH7OjysP6SHhYKGvzZ8/gntsm+HbRsZJB/9OTE
-W9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmODBCEIZ43ygknQW/2xzQ+D
-hNQ+IIX3Sj0rnP0qCglN6oH4EZw=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEXzCCA0egAwIBAgIBATANBgkqhkiG9w0BAQUFADCB0DELMAkGA1UEBhMCRVMx
-SDBGBgNVBAoTP0laRU5QRSBTLkEuIC0gQ0lGIEEtMDEzMzcyNjAtUk1lcmMuVml0
-b3JpYS1HYXN0ZWl6IFQxMDU1IEY2MiBTODFCMEAGA1UEBxM5QXZkYSBkZWwgTWVk
-aXRlcnJhbmVvIEV0b3JiaWRlYSAzIC0gMDEwMTAgVml0b3JpYS1HYXN0ZWl6MRMw
-EQYDVQQDEwpJemVucGUuY29tMR4wHAYJKoZIhvcNAQkBFg9JbmZvQGl6ZW5wZS5j
-b20wHhcNMDMwMTMwMjMwMDAwWhcNMTgwMTMwMjMwMDAwWjCB0DELMAkGA1UEBhMC
-RVMxSDBGBgNVBAoTP0laRU5QRSBTLkEuIC0gQ0lGIEEtMDEzMzcyNjAtUk1lcmMu
-Vml0b3JpYS1HYXN0ZWl6IFQxMDU1IEY2MiBTODFCMEAGA1UEBxM5QXZkYSBkZWwg
-TWVkaXRlcnJhbmVvIEV0b3JiaWRlYSAzIC0gMDEwMTAgVml0b3JpYS1HYXN0ZWl6
-MRMwEQYDVQQDEwpJemVucGUuY29tMR4wHAYJKoZIhvcNAQkBFg9JbmZvQGl6ZW5w
-ZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC1btoCXXhp3xIW
-D+Bxl8nUCxkyiazWfpt0e68t+Qt9+lZjKZSdEw2Omj4qvr+ovRmDXO3iWpWVOWDl
-3JHJjAzFCe8ZEBNDH+QNYwZHmPBaMYFOYFdbAFVHWvys152C308hcFJ6xWWGmjvl
-2eMiEl9P2nR2LWue368DCu+ak7j3gjAXaCOdP1a7Bfr+RW3X2SC5R4Xyp8iHlL5J
-PHJD/WBkLrezwzQPdACw8m9EG7q9kUwlNpL32mROujS3ZkT6mQTzJieLiE3X04s0
-uIUqVkk5MhjcHFf7al0N5CzjtTcnXYJKN2Z9EDVskk4olAdGi46eSoZXbjUOP5gk
-Ej6wVZAXAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEG
-MB0GA1UdDgQWBBTqVk/sPIOhFIh4gbIrBSLAB0FbQjANBgkqhkiG9w0BAQUFAAOC
-AQEAYp7mEzzhw6o5Hf5+T5kcI+t4BJyiIWy7vHlLs/G8dLYXO81aN/Mzg928eMTR
-TxxYZL8dd9uwsJ50TVfX6L0R4Dyw6wikh3fHRrat9ufXi63j5K91Ysr7aXqnF38d
-iAgHYkrwC3kuxHBb9C0KBz6h8Q45/KCyN7d37wWAq38yyhPDlaOvyoE6bdUuK5hT
-m5EYA5JmPyrhQ1moDOyueWBAjxzMEMj+OAY1H90cLv6wszsqerxRrdTOHBdv7MjB
-EIpvEEQkXUxVXAzFuuT6m2t91Lfnwfl/IvljHaVC7DlyyhRYHD6D4Rx+4QKp4tWL
-vpw6LkI+gKNJ/YdMCsRZQzEEFA==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBi
-MQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu
-MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3Jp
-dHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMxMjM1OTU5WjBiMQswCQYDVQQGEwJV
-UzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydO
-ZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0GCSqG
-SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwz
-c7MEL7xxjOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPP
-OCwGJgl6cvf6UDL4wpPTaaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rl
-mGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXTcrA/vGp97Eh/jcOrqnErU2lBUzS1sLnF
-BgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc/Qzpf14Dl847ABSHJ3A4
-qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMBAAGjgZcw
-gZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIB
-BjAPBgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwu
-bmV0c29sc3NsLmNvbS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3Jp
-dHkuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc8
-6fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q4LqILPxFzBiwmZVRDuwduIj/
-h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/GGUsyfJj4akH
-/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv
-wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHN
-pGxlaKFJdlxDydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCB
-vTELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL
-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwOCBWZXJp
-U2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MTgwNgYDVQQDEy9W
-ZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAe
-Fw0wODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIG9MQswCQYDVQQGEwJVUzEX
-MBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0
-IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAyMDA4IFZlcmlTaWduLCBJbmMuIC0gRm9y
-IGF1dGhvcml6ZWQgdXNlIG9ubHkxODA2BgNVBAMTL1ZlcmlTaWduIFVuaXZlcnNh
-bCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEF
-AAOCAQ8AMIIBCgKCAQEAx2E3XrEBNNti1xWb/1hajCMj1mCOkdeQmIN65lgZOIzF
-9uVkhbSicfvtvbnazU0AtMgtc6XHaXGVHzk8skQHnOgO+k1KxCHfKWGPMiJhgsWH
-H26MfF8WIFFE0XBPV+rjHOPMee5Y2A7Cs0WTwCznmhcrewA3ekEzeOEz4vMQGn+H
-LL729fdC4uW/h2KJXwBL38Xd5HVEMkE6HnFuacsLdUYI0crSK5XQz/u5QGtkjFdN
-/BMReYTtXlT2NJ8IAfMQJQYXStrxHXpma5hgZqTZ79IugvHw7wnqRMkVauIDbjPT
-rJ9VAMf2CGqUuV/c4DPxhGD5WycRtPwW8rtWaoAljQIDAQABo4GyMIGvMA8GA1Ud
-EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMG0GCCsGAQUFBwEMBGEwX6FdoFsw
-WTBXMFUWCWltYWdlL2dpZjAhMB8wBwYFKw4DAhoEFI/l0xqGrI2Oa8PPgGrUSBgs
-exkuMCUWI2h0dHA6Ly9sb2dvLnZlcmlzaWduLmNvbS92c2xvZ28uZ2lmMB0GA1Ud
-DgQWBBS2d/ppSEefUxLVwuoHMnYH0ZcHGTANBgkqhkiG9w0BAQsFAAOCAQEASvj4
-sAPmLGd75JR3Y8xuTPl9Dg3cyLk1uXBPY/ok+myDjEedO2Pzmvl2MpWRsXe8rJq+
-seQxIcaBlVZaDrHC1LGmWazxY8u4TB1ZkErvkBYoH1quEPuBUDgMbMzxPcP1Y+Oz
-4yHJJDnp/RVmRvQbEdBNc6N9Rvk97ahfYtTxP/jgdFcrGJ2BtMQo2pSXpXDrrB2+
-BxHw1dvd5Yzw1TKwg+ZX4o+/vqGqvz0dtdQ46tewXDpPaj+PwGZsY6rp2aQW9IHR
-lRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4mJO3
-7M2CYfE45k+XmCpajQ==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIECTCCAvGgAwIBAgIQDV6ZCtadt3js2AdWO4YV2TANBgkqhkiG9w0BAQUFADBb
-MQswCQYDVQQGEwJVUzEgMB4GA1UEChMXRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3Qx
-ETAPBgNVBAsTCERTVCBBQ0VTMRcwFQYDVQQDEw5EU1QgQUNFUyBDQSBYNjAeFw0w
-MzExMjAyMTE5NThaFw0xNzExMjAyMTE5NThaMFsxCzAJBgNVBAYTAlVTMSAwHgYD
-VQQKExdEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdDERMA8GA1UECxMIRFNUIEFDRVMx
-FzAVBgNVBAMTDkRTVCBBQ0VTIENBIFg2MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
-MIIBCgKCAQEAuT31LMmU3HWKlV1j6IR3dma5WZFcRt2SPp/5DgO0PWGSvSMmtWPu
-ktKe1jzIDZBfZIGxqAgNTNj50wUoUrQBJcWVHAx+PhCEdc/BGZFjz+iokYi5Q1K7
-gLFViYsx+tC3dr5BPTCapCIlF3PoHuLTrCq9Wzgh1SpL11V94zpVvddtawJXa+ZH
-fAjIgrrep4c9oW24MFbCswKBXy314powGCi4ZtPLAZZv6opFVdbgnf9nKxcCpk4a
-ahELfrd755jWjHZvwTvbUJN+5dCOHze4vbrGn2zpfDPyMjwmR/onJALJfh1biEIT
-ajV8fTXpLmaRcpPVMibEdPVTo7NdmvYJywIDAQABo4HIMIHFMA8GA1UdEwEB/wQF
-MAMBAf8wDgYDVR0PAQH/BAQDAgHGMB8GA1UdEQQYMBaBFHBraS1vcHNAdHJ1c3Rk
-c3QuY29tMGIGA1UdIARbMFkwVwYKYIZIAWUDAgEBATBJMEcGCCsGAQUFBwIBFjto
-dHRwOi8vd3d3LnRydXN0ZHN0LmNvbS9jZXJ0aWZpY2F0ZXMvcG9saWN5L0FDRVMt
-aW5kZXguaHRtbDAdBgNVHQ4EFgQUCXIGThhDD+XWzMNqizF7eI+og7gwDQYJKoZI
-hvcNAQEFBQADggEBAKPYjtay284F5zLNAdMEA+V25FYrnJmQ6AgwbN99Pe7lv7Uk
-QIRJ4dEorsTCOlMwiPH1d25Ryvr/ma8kXxug/fKshMrfqfBfBC6tFr8hlxCBPeP/
-h40y3JTlR4peahPJlJU90u7INJXQgNStMgiAVDzgvVJT11J8smk/f3rPanTK+gQq
-nExaBqXpIK1FZg9p8d2/6eMyi/rgwYZNcjwu2JN4Cir42NInPRmJX1p7ijvMDNpR
-rscL9yuwNwXsvFcj4jjSm2jzVhKIT0J8uDHEtdvkyCE06UgRNe76x5JXxZ805Mf2
-9w4LTJxoeHtxMcfrHuBnQfO3oKfN5XozNmr6mis=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDljCCAn6gAwIBAgIQC5McOtY5Z+pnI7/Dr5r0SzANBgkqhkiG9w0BAQsFADBl
-MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
-d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJv
-b3QgRzIwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1MTIwMDAwWjBlMQswCQYDVQQG
-EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNl
-cnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIwggEi
-MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDZ5ygvUj82ckmIkzTz+GoeMVSA
-n61UQbVH35ao1K+ALbkKz3X9iaV9JPrjIgwrvJUXCzO/GU1BBpAAvQxNEP4Htecc
-biJVMWWXvdMX0h5i89vqbFCMP4QMls+3ywPgym2hFEwbid3tALBSfK+RbLE4E9Hp
-EgjAALAcKxHad3A2m67OeYfcgnDmCXRwVWmvo2ifv922ebPynXApVfSr/5Vh88lA
-bx3RvpO704gqu52/clpWcTs/1PPRCv4o76Pu2ZmvA9OPYLfykqGxvYmJHzDNw6Yu
-YjOuFgJ3RFrngQo8p0Quebg/BLxcoIfhG69Rjs3sLPr4/m3wOnyqi+RnlTGNAgMB
-AAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQW
-BBTOw0q5mVXyuNtgv6l+vVa1lzan1jANBgkqhkiG9w0BAQsFAAOCAQEAyqVVjOPI
-QW5pJ6d1Ee88hjZv0p3GeDgdaZaikmkuOGybfQTUiaWxMTeKySHMq2zNixya1r9I
-0jJmwYrA8y8678Dj1JGG0VDjA9tzd29KOVPt3ibHtX2vK0LRdWLjSisCx1BL4Gni
-lmwORGYQRI+tBev4eaymG+g3NJ1TyWGqolKvSnAWhsI6yLETcDbYz+70CjTVW0z9
-B5yiutkBclzzTcHdDrEcDcRjvq30FPuJ7KJBDkzMyFdA0G4Dqs0MjomZmWzwPDCv
-ON9vvKO+KSAnq3T/EyJ43pdSVR6DtVQgA+6uwE9W3jfMw3+qBCe703e4YtsXfJwo
-IhNzbM8m9Yop5w==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDezCCAmOgAwIBAgIBATANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJUVzES
-MBAGA1UECgwJVEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFU
-V0NBIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDgwODI4MDcyNDMz
-WhcNMzAxMjMxMTU1OTU5WjBfMQswCQYDVQQGEwJUVzESMBAGA1UECgwJVEFJV0FO
-LUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NBIFJvb3QgQ2VydGlm
-aWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
-AQCwfnK4pAOU5qfeCTiRShFAh6d8WWQUe7UREN3+v9XAu1bihSX0NXIP+FPQQeFE
-AcK0HMMxQhZHhTMidrIKbw/lJVBPhYa+v5guEGcevhEFhgWQxFnQfHgQsIBct+HH
-K3XLfJ+utdGdIzdjp9xCoi2SBBtQwXu4PhvJVgSLL1KbralW6cH/ralYhzC2gfeX
-RfwZVzsrb+RH9JlF/h3x+JejiB03HFyP4HYlmlD4oFT/RJB2I9IyxsOrBr/8+7/z
-rX2SYgJbKdM1o5OaQ2RgXbL6Mv87BK9NQGr5x+PvI/1ry+UPizgN7gr8/g+YnzAx
-3WxSZfmLgb4i4RxYA7qRG4kHAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV
-HRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqOFsmjd6LWvJPelSDGRjjCDWmujANBgkq
-hkiG9w0BAQUFAAOCAQEAPNV3PdrfibqHDAhUaiBQkr6wQT25JmSDCi/oQMCXKCeC
-MErJk/9q56YAf4lCmtYR5VPOL8zy2gXE/uJQxDqGfczafhAJO5I1KlOy/usrBdls
-XebQ79NqZp4VKIV66IIArB6nCWlWQtNoURi+VJq/REG6Sb4gumlc7rh3zc5sH62D
-lhh9DrUUOYTxKOkto557HnpyWoOzeW/vtPzQCqVYT0bf+215WfKEIlKuD8z7fDvn
-aspHYcN6+NOSBB+4IIThNlQWx0DeO4pz3N/GCUzf7Nr/1FNCocnyYh0igzyXxfkZ
-YiesZSLX0zzG5Y6yU8xJzrww/nsOM5D77dIUkR8Hrw==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIE5zCCA8+gAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjTELMAkGA1UEBhMCQ0Ex
-EDAOBgNVBAgTB09udGFyaW8xEDAOBgNVBAcTB1Rvcm9udG8xHTAbBgNVBAoTFEVj
-aG93b3J4IENvcnBvcmF0aW9uMR8wHQYDVQQLExZDZXJ0aWZpY2F0aW9uIFNlcnZp
-Y2VzMRowGAYDVQQDExFFY2hvd29yeCBSb290IENBMjAeFw0wNTEwMDYxMDQ5MTNa
-Fw0zMDEwMDcxMDQ5MTNaMIGNMQswCQYDVQQGEwJDQTEQMA4GA1UECBMHT250YXJp
-bzEQMA4GA1UEBxMHVG9yb250bzEdMBsGA1UEChMURWNob3dvcnggQ29ycG9yYXRp
-b24xHzAdBgNVBAsTFkNlcnRpZmljYXRpb24gU2VydmljZXMxGjAYBgNVBAMTEUVj
-aG93b3J4IFJvb3QgQ0EyMIIBIDANBgkqhkiG9w0BAQEFAAOCAQ0AMIIBCAKCAQEA
-utU/5BkV15UBf+s+JQruKQxr77s3rjp/RpOtmhHILIiO5gsEWP8MMrfrVEiidjI6
-Qh6ans0KAWc2Dw0/j4qKAQzOSyAZgjcdypNTBZ7muv212DA2Pu41rXqwMrlBrVi/
-KTghfdLlNRu6JrC5y8HarrnRFSKF1Thbzz921kLDRoCi+FVs5eVuK5LvIfkhNAqA
-byrTgO3T9zfZgk8upmEkANPDL1+8y7dGPB/d6lk0I5mv8PESKX02TlvwgRSIiTHR
-k8++iOPLBWlGp7ZfqTEXkPUZhgrQQvxcrwCUo6mk8TqgxCDP5FgPoHFiPLef5szP
-ZLBJDWp7GLyE1PmkQI6WiwIBA6OCAVAwggFMMA8GA1UdEwEB/wQFMAMBAf8wCwYD
-VR0PBAQDAgEGMB0GA1UdDgQWBBQ74YEboKs/OyGC1eISrq5QqxSlEzCBugYDVR0j
-BIGyMIGvgBQ74YEboKs/OyGC1eISrq5QqxSlE6GBk6SBkDCBjTELMAkGA1UEBhMC
-Q0ExEDAOBgNVBAgTB09udGFyaW8xEDAOBgNVBAcTB1Rvcm9udG8xHTAbBgNVBAoT
-FEVjaG93b3J4IENvcnBvcmF0aW9uMR8wHQYDVQQLExZDZXJ0aWZpY2F0aW9uIFNl
-cnZpY2VzMRowGAYDVQQDExFFY2hvd29yeCBSb290IENBMoIBADBQBgNVHSAESTBH
-MEUGCysGAQQB+REKAQMBMDYwNAYIKwYBBQUHAgEWKGh0dHA6Ly93d3cuZWNob3dv
-cnguY29tL2NhL3Jvb3QyL2Nwcy5wZGYwDQYJKoZIhvcNAQEFBQADggEBAG+nrPi/
-0RpfEzrj02C6JGPUar4nbjIhcY6N7DWNeqBoUulBSIH/PYGNHYx7/lnJefiixPGE
-7TQ5xPgElxb9bK8zoAApO7U33OubqZ7M7DlHnFeCoOoIAZnG1kuwKwD5CXKB2a74
-HzcqNnFW0IsBFCYqrVh/rQgJOzDA8POGbH0DeD0xjwBBooAolkKT+7ZItJF1Pb56
-QpDL9G+16F7GkmnKlAIYT3QTS3yFGYChnJcd+6txUPhKi9sSOOmAIaKHnkH9Scz+
-A2cSi4A3wUYXVatuVNHpRb2lygfH3SuCX9MU8Ure3zBlSU1LALtMqI4JmcQmQpIq
-zIzvO2jHyu9PQqo=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEqjCCA5KgAwIBAgIOLmoAAQACH9dSISwRXDswDQYJKoZIhvcNAQEFBQAwdjEL
-MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxIjAgBgNV
-BAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDIgQ0ExJTAjBgNVBAMTHFRDIFRydXN0
-Q2VudGVyIENsYXNzIDIgQ0EgSUkwHhcNMDYwMTEyMTQzODQzWhcNMjUxMjMxMjI1
-OTU5WjB2MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1c3RDZW50ZXIgR21i
-SDEiMCAGA1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMiBDQTElMCMGA1UEAxMc
-VEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMiBDQSBJSTCCASIwDQYJKoZIhvcNAQEBBQAD
-ggEPADCCAQoCggEBAKuAh5uO8MN8h9foJIIRszzdQ2Lu+MNF2ujhoF/RKrLqk2jf
-tMjWQ+nEdVl//OEd+DFwIxuInie5e/060smp6RQvkL4DUsFJzfb95AhmC1eKokKg
-uNV/aVyQMrKXDcpK3EY+AlWJU+MaWss2xgdW94zPEfRMuzBwBJWl9jmM/XOBCH2J
-XjIeIqkiRUuwZi4wzJ9l/fzLganx4Duvo4bRierERXlQXa7pIXSSTYtZgo+U4+lK
-8edJsBTj9WLL1XK9H7nSn6DNqPoByNkN39r8R52zyFTfSUrxIan+GE7uSNQZu+99
-5OKdy1u2bv/jzVrndIIFuoAlOMvkaZ6vQaoahPUCAwEAAaOCATQwggEwMA8GA1Ud
-EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTjq1RMgKHbVkO3
-kUrL84J6E1wIqzCB7QYDVR0fBIHlMIHiMIHfoIHcoIHZhjVodHRwOi8vd3d3LnRy
-dXN0Y2VudGVyLmRlL2NybC92Mi90Y19jbGFzc18yX2NhX0lJLmNybIaBn2xkYXA6
-Ly93d3cudHJ1c3RjZW50ZXIuZGUvQ049VEMlMjBUcnVzdENlbnRlciUyMENsYXNz
-JTIwMiUyMENBJTIwSUksTz1UQyUyMFRydXN0Q2VudGVyJTIwR21iSCxPVT1yb290
-Y2VydHMsREM9dHJ1c3RjZW50ZXIsREM9ZGU/Y2VydGlmaWNhdGVSZXZvY2F0aW9u
-TGlzdD9iYXNlPzANBgkqhkiG9w0BAQUFAAOCAQEAjNfffu4bgBCzg/XbEeprS6iS
-GNn3Bzn1LL4GdXpoUxUc6krtXvwjshOg0wn/9vYua0Fxec3ibf2uWWuFHbhOIprt
-ZjluS5TmVfwLG4t3wVMTZonZKNaL80VKY7f9ewthXbhtvsPcW3nS7Yblok2+XnR8
-au0WOB9/WIFaGusyiC2y8zl3gK9etmF1KdsjTYjKUCjLhdLTEKJZbtOTVAB6okaV
-hgWcqRmY5TFyDADiZ9lA4CQze28suVyrZZ0srHbqNZn1l7kPJOzHdiEoZa5X6AeI
-dUpWoNIFOqTmjZKILPPy4cHGYdtBxceb9w4aUUXCYWvcZCcXjFq32nQozZfkvQ==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCB
-gjELMAkGA1UEBhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEk
-MCIGA1UEChMbWFJhbXAgU2VjdXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRY
-UmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQxMTAxMTcx
-NDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMxHjAcBgNVBAsTFXd3
-dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkgU2Vy
-dmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBB
-dXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCYJB69FbS6
-38eMpSe2OAtp87ZOqCwuIR1cRN8hXX4jdP5efrRKt6atH67gBhbim1vZZ3RrXYCP
-KZ2GG9mcDZhtdhAoWORlsH9KmHmf4MMxfoArtYzAQDsRhtDLooY2YKTVMIJt2W7Q
-DxIEM5dfT2Fa8OT5kavnHTu86M/0ay00fOJIYRyO82FEzG+gSqmUsE3a56k0enI4
-qEHMPJQRfevIpoy3hsvKMzvZPTeL+3o+hiznc9cKV6xkmxnr9A8ECIqsAxcZZPRa
-JSKNNCyy9mgdEm3Tih4U2sSPpuIjhdV6Db1q4Ons7Be7QhtnqiXtRYMh/MHJfNVi
-PvryxS3T/dRlAgMBAAGjgZ8wgZwwEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0P
-BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFMZPoj0GY4QJnM5i5ASs
-jVy16bYbMDYGA1UdHwQvMC0wK6ApoCeGJWh0dHA6Ly9jcmwueHJhbXBzZWN1cml0
-eS5jb20vWEdDQS5jcmwwEAYJKwYBBAGCNxUBBAMCAQEwDQYJKoZIhvcNAQEFBQAD
-ggEBAJEVOQMBG2f7Shz5CmBbodpNl2L5JFMn14JkTpAuw0kbK5rc/Kh4ZzXxHfAR
-vbdI4xD2Dd8/0sm2qlWkSLoC295ZLhVbO50WfUfXN+pfTXYSNrsf16GBBEYgoyxt
-qZ4Bfj8pzgCT3/3JknOJiWSe5yvkHJEs0rnOfc5vMZnT5r7SHpDwCRR5XCOrTdLa
-IR9NmXmd4c8nnxCbHIgNsIpkQTG4DmyQJKSbXHGPurt+HBvbaoAPIbzp26a3QPSy
-i6mx5O+aGtA9aZnuqCij4Tyz8LIRnM98QObd50N9otg6tamN8jSZxNQQ4Qb9CYQQ
-O+7ETPTsJ3xCwnR8gooJybQDJbw=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDOzCCAiOgAwIBAgIRANAeRlAAACmMAAAAAgAAAAIwDQYJKoZIhvcNAQEFBQAw
-PzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQD
-Ew5EU1QgUm9vdCBDQSBYNDAeFw0wMDA5MTMwNjIyNTBaFw0yMDA5MTMwNjIyNTBa
-MD8xJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjEXMBUGA1UE
-AxMORFNUIFJvb3QgQ0EgWDQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
-AQCthX3OFEYY8gSeIYur0O4ypOT68HnDrjLfIutL5PZHRwQGjzCPb9PFo/ihboJ8
-RvfGhBAqpQCo47zwYEhpWm1jB+L/OE/dBBiyn98krfU2NiBKSom2J58RBeAwHGEy
-cO+lewyjVvbDDLUy4CheY059vfMjPAftCRXjqSZIolQb9FdPcAoa90mFwB7rKniE
-J7vppdrUScSS0+eBrHSUPLdvwyn4RGp+lSwbWYcbg5EpSpE0GRJdchic0YDjvIoC
-YHpe7Rkj93PYRTQyU4bhC88ck8tMqbvRYqMRqR+vobbkrj5LLCOQCHV5WEoxWh+0
-E2SpIFe7RkV++MmpIAc0h1tZAgMBAAGjMjAwMA8GA1UdEwEB/wQFMAMBAf8wHQYD
-VR0OBBYEFPCD6nPIP1ubWzdf9UyPWvf0hki9MA0GCSqGSIb3DQEBBQUAA4IBAQCE
-G85wl5eEWd7adH6XW/ikGN5salvpq/Fix6yVTzE6CrhlP5LBdkf6kx1bSPL18M45
-g0rw2zA/MWOhJ3+S6U+BE0zPGCuu8YQaZibR7snm3HiHUaZNMu5c8D0x0bcMxDjY
-AVVcHCoNiL53Q4PLW27nbY6wwG0ffFKmgV3blxrYWfuUDgGpyPwHwkfVFvz9qjaV
-mf12VJffL6W8omBPtgteb6UaT/k1oJ7YI0ldGf+ngpVbRhD+LC3cUtT6GO/BEPZu
-8YTV/hbiDH5v3khVqMIeKT6o8IuXGG7F6a6vKwP1F1FwTXf4UC/ivhme7vdUH7B/
-Vv4AEbT8dNfEeFxrkDbh
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEQzCCAyugAwIBAgIBATANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJHQjEb
-MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow
-GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDElMCMGA1UEAwwcVHJ1c3RlZCBDZXJ0
-aWZpY2F0ZSBTZXJ2aWNlczAeFw0wNDAxMDEwMDAwMDBaFw0yODEyMzEyMzU5NTla
-MH8xCzAJBgNVBAYTAkdCMRswGQYDVQQIDBJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO
-BgNVBAcMB1NhbGZvcmQxGjAYBgNVBAoMEUNvbW9kbyBDQSBMaW1pdGVkMSUwIwYD
-VQQDDBxUcnVzdGVkIENlcnRpZmljYXRlIFNlcnZpY2VzMIIBIjANBgkqhkiG9w0B
-AQEFAAOCAQ8AMIIBCgKCAQEA33FvNlhTWvI2VFeAxHQIIO0Yfyod5jWaHiWsnOWW
-fnJSoBVC21ndZHoa0Lh73TkVvFVIxO06AOoxEbrycXQaZ7jPM8yoMa+j49d/vzMt
-TGo87IvDktJTdyR0nAducPy9C1t2ul/y/9c3S0pgePfw+spwtOpZqqPOSC+pw7IL
-fhdyFgymBwwbOM/JYrc/oJOlh0Hyt3BAd9i+FHzjqMB6juljatEPmsbS9Is6FARW
-1O24zG71++IsWL1/T2sr92AkWCTOJu80kTrV44HQsvAEAtdbtz6SrGsSivnkBbA7
-kUlcsutT6vifR4buv5XAwAaf0lteERv0xwQ1KdJVXOTt6wIDAQABo4HJMIHGMB0G
-A1UdDgQWBBTFe1i97doladL3WRaoszLAeydb9DAOBgNVHQ8BAf8EBAMCAQYwDwYD
-VR0TAQH/BAUwAwEB/zCBgwYDVR0fBHwwejA8oDqgOIY2aHR0cDovL2NybC5jb21v
-ZG9jYS5jb20vVHJ1c3RlZENlcnRpZmljYXRlU2VydmljZXMuY3JsMDqgOKA2hjRo
-dHRwOi8vY3JsLmNvbW9kby5uZXQvVHJ1c3RlZENlcnRpZmljYXRlU2VydmljZXMu
-Y3JsMA0GCSqGSIb3DQEBBQUAA4IBAQDIk4E7ibSvuIQSTI3S8NtwuleGFTQQuS9/
-HrCoiWChisJ3DFBKmwCL2Iv0QeLQg4pKHBQGsKNoBXAxMKdTmw7pSqBYaWcOrp32
-pSxBvzwGa+RZzG0Q8ZZvH9/0BAKkn0U+yNj6NkZEUD+Cl5EfKNsYEYwq5GWDVxIS
-jBc/lDb+XbDABHcTuPQV1T84zJQ6VdCsmPW6AF/ghhmBeC8owH7TzEIK9a5QoNE+
-xqFx7D+gIIxmOom0jtTYsU0lR+4viMi14QVFwL4Ucd56/Y57fU0IlqUSc/Atyjcn
-dBInTMu2l+nZrghtWjlA3QVHdWpaIbOjGM9O9y5Xt5hwXsjEeLBi
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDvDCCAqSgAwIBAgIQB1YipOjUiolN9BPI8PjqpTANBgkqhkiG9w0BAQUFADBK
-MQswCQYDVQQGEwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24x
-GTAXBgNVBAMTEFNlY3VyZSBHbG9iYWwgQ0EwHhcNMDYxMTA3MTk0MjI4WhcNMjkx
-MjMxMTk1MjA2WjBKMQswCQYDVQQGEwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3Qg
-Q29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBHbG9iYWwgQ0EwggEiMA0GCSqG
-SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvNS7YrGxVaQZx5RNoJLNP2MwhR/jxYDiJ
-iQPpvepeRlMJ3Fz1Wuj3RSoC6zFh1ykzTM7HfAo3fg+6MpjhHZevj8fcyTiW89sa
-/FHtaMbQbqR8JNGuQsiWUGMu4P51/pinX0kuleM5M2SOHqRfkNJnPLLZ/kG5VacJ
-jnIFHovdRIWCQtBJwB1g8NEXLJXr9qXBkqPFwqcIYA1gBBCWeZ4WNOaptvolRTnI
-HmX5k/Wq8VLcmZg9pYYaDDUz+kulBAYVHDGA76oYa8J719rO+TMg1fW9ajMtgQT7
-sFzUnKPiXB3jqUJ1XnvUd+85VLrJChgbEplJL4hL/VBi0XPnj3pDAgMBAAGjgZ0w
-gZowEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQF
-MAMBAf8wHQYDVR0OBBYEFK9EBMJBfkiD2045AuzshHrmzsmkMDQGA1UdHwQtMCsw
-KaAnoCWGI2h0dHA6Ly9jcmwuc2VjdXJldHJ1c3QuY29tL1NHQ0EuY3JsMBAGCSsG
-AQQBgjcVAQQDAgEAMA0GCSqGSIb3DQEBBQUAA4IBAQBjGghAfaReUw132HquHw0L
-URYD7xh8yOOvaliTFGCRsoTciE6+OYo68+aCiV0BN7OrJKQVDpI1WkpEXk5X+nXO
-H0jOZvQ8QCaSmGwb7iRGDBezUqXbpZGRzzfTb+cnCDpOGR86p1hcF895P4vkp9Mm
-I50mD1hp/Ed+stCNi5O/KU9DaXR2Z0vPB4zmAve14bRDtUstFJ/53CYNv6ZHdAbY
-iNE6KTCEztI5gGIbqMdXSbxqVVFnFUq+NQfk1XWYN3kwFNspnWzFacxHVaIw98xc
-f8LDmBxrThaA63p4ZUWiABqvDA1VZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIID+TCCAuGgAwIBAgIQW1fXqEywr9nTb0ugMbTW4jANBgkqhkiG9w0BAQUFADB5
-MQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRl
-cm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xKjAoBgNVBAMTIVZpc2EgSW5m
-b3JtYXRpb24gRGVsaXZlcnkgUm9vdCBDQTAeFw0wNTA2MjcxNzQyNDJaFw0yNTA2
-MjkxNzQyNDJaMHkxCzAJBgNVBAYTAlVTMQ0wCwYDVQQKEwRWSVNBMS8wLQYDVQQL
-EyZWaXNhIEludGVybmF0aW9uYWwgU2VydmljZSBBc3NvY2lhdGlvbjEqMCgGA1UE
-AxMhVmlzYSBJbmZvcm1hdGlvbiBEZWxpdmVyeSBSb290IENBMIIBIjANBgkqhkiG
-9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyREA4R/QkkfpLx0cYjga/EhIPZpchH0MZsRZ
-FfP6C2ITtf/Wc+MtgD4yTK0yoiXvni3d+aCtEgK3GDvkdgYrgF76ROJFZwUQjQ9l
-x42gRT05DbXvWFoy7dTglCZ9z/Tt2Cnktv9oxKgmkeHY/CyfpCBg1S8xth2JlGMR
-0ug/GMO5zANuegZOv438p5Lt5So+du2Gl+RMFQqEPwqN5uJSqAe0VtmB4gWdQ8on
-Bj2ZAM2R73QW7UW0Igt2vA4JaSiNtaAG/Y/58VXWHGgbq7rDtNK1R30X0kJV0rGA
-ib3RSwB3LpG7bOjbIucV5mQgJoVjoA1e05w6g1x/KmNTmOGRVwIDAQABo30wezAP
-BgNVHRMBAf8EBTADAQH/MDkGA1UdIAQyMDAwLgYFZ4EDAgEwJTAVBggrBgEFBQcC
-ARYJMS4yLjMuNC41MAwGCCsGAQUFBwICMAAwDgYDVR0PAQH/BAQDAgEGMB0GA1Ud
-DgQWBBRPitp2/2d3I5qmgH1924h1hfeBejANBgkqhkiG9w0BAQUFAAOCAQEACUW1
-QdUHdDJydgDPmYt+telnG/Su+DPaf1cregzlN43bJaJosMP7NwjoJY/H2He4XLWb
-5rXEkl+xH1UyUwF7mtaUoxbGxEvt8hPZSTB4da2mzXgwKvXuHyzF5Qjy1hOB0/pS
-WaF9ARpVKJJ7TOJQdGKBsF2Ty4fSCLqZLgfxbqwMsd9sysXI3rDXjIhekqvbgeLz
-PqZr+pfgFhwCCLSMQWl5Ll3u7Qk9wR094DZ6jj6+JCVCRUS3HyabH4OlM0Vc2K+j
-INsF/64Or7GNtRf9HYEJvrPxHINxl3JVwhYj4ASeaO4KwhVbwtw94Tc/XrGcexDo
-c5lC3rAi4/UZqweYCw==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMx
-EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoT
-HFN0YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVs
-ZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5
-MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNVBAYTAlVTMRAwDgYD
-VQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFy
-ZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2Vy
-dmljZXMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI
-hvcNAQEBBQADggEPADCCAQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20p
-OsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm2
-8xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4PahHQUw2eeBGg6345AWh1K
-Ts9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLPLJGmpufe
-hRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk
-6mFBrMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAw
-DwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+q
-AdcwKziIorhtSpzyEZGDMA0GCSqGSIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMI
-bw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPPE95Dz+I0swSdHynVv/heyNXB
-ve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTyxQGjhdByPq1z
-qwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd
-iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn
-0q23KXB56jzaYyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCN
-sSi6
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzEl
-MCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMp
-U3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQw
-NjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBoMQswCQYDVQQGEwJVUzElMCMGA1UE
-ChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZp
-ZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqGSIb3
-DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf
-8MOh2tTYbitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN
-+lq2cwQlZut3f+dZxkqZJRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0
-X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVmepsZGD3/cVE8MC5fvj13c7JdBmzDI1aa
-K4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSNF4Azbl5KXZnJHoe0nRrA
-1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HFMIHCMB0G
-A1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fR
-zt0fhvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0
-YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBD
-bGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8w
-DQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGsafPzWdqbAYcaT1epoXkJKtv3
-L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLMPUxA2IGvd56D
-eruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl
-xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynp
-VSJYACPq4xJDKVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEY
-WQPJIrSPnNVeKtelttQKbfi3QBFGmh95DmK/D5fs4C8fF5Q=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEqjCCA5KgAwIBAgIOSkcAAQAC5aBd1j8AUb8wDQYJKoZIhvcNAQEFBQAwdjEL
-MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxIjAgBgNV
-BAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDMgQ0ExJTAjBgNVBAMTHFRDIFRydXN0
-Q2VudGVyIENsYXNzIDMgQ0EgSUkwHhcNMDYwMTEyMTQ0MTU3WhcNMjUxMjMxMjI1
-OTU5WjB2MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1c3RDZW50ZXIgR21i
-SDEiMCAGA1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMyBDQTElMCMGA1UEAxMc
-VEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMyBDQSBJSTCCASIwDQYJKoZIhvcNAQEBBQAD
-ggEPADCCAQoCggEBALTgu1G7OVyLBMVMeRwjhjEQY0NVJz/GRcekPewJDRoeIMJW
-Ht4bNwcwIi9v8Qbxq63WyKthoy9DxLCyLfzDlml7forkzMA5EpBCYMnMNWju2l+Q
-Vl/NHE1bWEnrDgFPZPosPIlY2C8u4rBo6SI7dYnWRBpl8huXJh0obazovVkdKyT2
-1oQDZogkAHhg8fir/gKya/si+zXmFtGt9i4S5Po1auUZuV3bOx4a+9P/FRQI2Alq
-ukWdFHlgfa9Aigdzs5OW03Q0jTo3Kd5c7PXuLjHCINy+8U9/I1LZW+Jk2ZyqBwi1
-Rb3R0DHBq1SfqdLDYmAD8bs5SpJKPQq5ncWg/jcCAwEAAaOCATQwggEwMA8GA1Ud
-EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTUovyfs8PYA9NX
-XAek0CSnwPIA1DCB7QYDVR0fBIHlMIHiMIHfoIHcoIHZhjVodHRwOi8vd3d3LnRy
-dXN0Y2VudGVyLmRlL2NybC92Mi90Y19jbGFzc18zX2NhX0lJLmNybIaBn2xkYXA6
-Ly93d3cudHJ1c3RjZW50ZXIuZGUvQ049VEMlMjBUcnVzdENlbnRlciUyMENsYXNz
-JTIwMyUyMENBJTIwSUksTz1UQyUyMFRydXN0Q2VudGVyJTIwR21iSCxPVT1yb290
-Y2VydHMsREM9dHJ1c3RjZW50ZXIsREM9ZGU/Y2VydGlmaWNhdGVSZXZvY2F0aW9u
-TGlzdD9iYXNlPzANBgkqhkiG9w0BAQUFAAOCAQEANmDkcPcGIEPZIxpC8vijsrlN
-irTzwppVMXzEO2eatN9NDoqTSheLG43KieHPOh6sHfGcMrSOWXaiQYUlN6AT0PV8
-TtXqluJucsG7Kv5sbviRmEb8yRtXW+rIGjs/sFGYPAfaLFkB2otE6OF0/ado3VS6
-g0bsyEa1+K+XwDsJHI/OcpY9M1ZwvJbL2NV9IJqDnxrcOfHFcqMRA/07QlIp2+gB
-95tejNaNhk4Z+rwcvsUhpYeeeC422wlxo3I0+GzjBgnyXlal092Y+tTmBvTwtiBj
-S+opvaqCZh77gaqnN60TGOaSw4HBM7uIHqHn4rS9MWwOUT1v+5ZWgOI2F9Hc5A==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBY
-MQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjExMC8GA1UEAxMo
-R2VvVHJ1c3QgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjEx
-MjcwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMFgxCzAJBgNVBAYTAlVTMRYwFAYDVQQK
-Ew1HZW9UcnVzdCBJbmMuMTEwLwYDVQQDEyhHZW9UcnVzdCBQcmltYXJ5IENlcnRp
-ZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
-AQEAvrgVe//UfH1nrYNke8hCUy3f9oQIIGHWAVlqnEQRr+92/ZV+zmEwu3qDXwK9
-AWbK7hWNb6EwnL2hhZ6UOvNWiAAxz9juapYC2e0DjPt1befquFUWBRaa9OBesYjA
-ZIVcFU2Ix7e64HXprQU9nceJSOC7KMgD4TCTZF5SwFlwIjVXiIrxlQqD17wxcwE0
-7e9GceBrAqg1cmuXm2bgyxx5X9gaBGgeRwLmnWDiNpcB3841kt++Z8dtd1k7j53W
-kBWUvEI0EME5+bEnPn7WinXFsq+W06Lem+SYvn3h6YGttm/81w7a4DSwDRp35+MI
-mO9Y+pyEtzavwt+s0vQQBnBxNQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4G
-A1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQULNVQQZcVi/CPNmFbSvtr2ZnJM5IwDQYJ
-KoZIhvcNAQEFBQADggEBAFpwfyzdtzRP9YZRqSa+S7iq8XEN3GHHoOo0Hnp3DwQ1
-6CePbJC/kRYkRj5KTs4rFtULUh38H2eiAkUxT87z+gOneZ1TatnaYzr4gNfTmeGl
-4b7UVXGYNTq+k+qurUKykG/g/CFNNWMziUnWm07Kx+dOCQD32sfvmWKZd7aVIl6K
-oKv0uHiYyjgZmclynnjNS6yvGaBzEi38wkG6gZHaFloxt/m0cYASSJlyc1pZU8Fj
-UjPtp8nSOQJw+uCxQmYpqptR7TBUIhRf2asdweSU8Pj1K/fqynhG1riR/aYNKxoU
-AT6A8EKglQdebc3MS6RFjasS6LPeWuWgfOgPIh1a6Vk=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UE
-BhMCQ0gxFTATBgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWdu
-IFNpbHZlciBDQSAtIEcyMB4XDTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0Nlow
-RzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMY
-U3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
-MIICCgKCAgEAxPGHf9N4Mfc4yfjDmUO8x/e8N+dOcbpLj6VzHVxumK4DV644N0Mv
-Fz0fyM5oEMF4rhkDKxD6LHmD9ui5aLlV8gREpzn5/ASLHvGiTSf5YXu6t+WiE7br
-YT7QbNHm+/pe7R20nqA1W6GSy/BJkv6FCgU+5tkL4k+73JU3/JHpMjUi0R86TieF
-nbAVlDLaYQ1HTWBCrpJH6INaUFjpiou5XaHc3ZlKHzZnu0jkg7Y360g6rw9njxcH
-6ATK72oxh9TAtvmUcXtnZLi2kUpCe2UuMGoM9ZDulebyzYLs2aFK7PayS+VFheZt
-eJMELpyCbTapxDFkH4aDCyr0NQp4yVXPQbBH6TCfmb5hqAaEuSh6XzjZG6k4sIN/
-c8HDO0gqgg8hm7jMqDXDhBuDsz6+pJVpATqJAHgE2cn0mRmrVn5bi4Y5FZGkECwJ
-MoBgs5PAKrYYC51+jUnyEEp/+dVGLxmSo5mnJqy7jDzmDrxHB9xzUfFwZC8I+bRH
-HTBsROopN4WSaGa8gzj+ezku01DwH/teYLappvonQfGbGHLy9YR0SslnxFSuSGTf
-jNFusB3hB48IHpmccelM2KX3RxIfdNFRnobzwqIjQAtz20um53MGjMGg6cFZrEb6
-5i/4z3GcRm25xBWNOHkDRUjvxF3XCO6HOSKGsg0PWEP3calILv3q1h8CAwEAAaOB
-rDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU
-F6DNweRBtjpbO8tFnb0cwpj6hlgwHwYDVR0jBBgwFoAUF6DNweRBtjpbO8tFnb0c
-wpj6hlgwRgYDVR0gBD8wPTA7BglghXQBWQEDAQEwLjAsBggrBgEFBQcCARYgaHR0
-cDovL3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIB
-AHPGgeAn0i0P4JUw4ppBf1AsX19iYamGamkYDHRJ1l2E6kFSGG9YrVBWIGrGvShp
-WJHckRE1qTodvBqlYJ7YH39FkWnZfrt4csEGDyrOj4VwYaygzQu4OSlWhDJOhrs9
-xCrZ1x9y7v5RoSJBsXECYxqCsGKrXlcSH9/L3XWgwF15kIwb4FDm3jH+mHtwX6WQ
-2K34ArZv02DdQEsixT2tOnqfGhpHkXkzuoLcMmkDlm4fS/Bx/uNncqCxv1yL5PqZ
-IseEuRuNI5c/7SXgz2W79WEE790eslpBIlqhn10s6FvJbakMDHiqYMZWjwFaDGi8
-aRl5xB9+lwW/xekkUV7U1UtT7dkjWjYDZaPBA61BMPNGG4WQr2W11bHkFlt4dR2X
-em1ZqSqPe97Dh4kQmUlzeMg9vVE1dCrV8X5pGyq7O70luJpaPXJhkGaH7gzWTdQR
-dAtq/gsD/KNVV4n+SsuuWxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/
-OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJDIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+
-hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ubDgEj8Z+7fNzcbBGXJbLy
-tGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEAzCCAuugAwIBAgIQVID5oHPtPwBMyonY43HmSjANBgkqhkiG9w0BAQUFADB1
-MQswCQYDVQQGEwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1
-czEoMCYGA1UEAwwfRUUgQ2VydGlmaWNhdGlvbiBDZW50cmUgUm9vdCBDQTEYMBYG
-CSqGSIb3DQEJARYJcGtpQHNrLmVlMCIYDzIwMTAxMDMwMTAxMDMwWhgPMjAzMDEy
-MTcyMzU5NTlaMHUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKDBlBUyBTZXJ0aWZpdHNl
-ZXJpbWlza2Vza3VzMSgwJgYDVQQDDB9FRSBDZXJ0aWZpY2F0aW9uIENlbnRyZSBS
-b290IENBMRgwFgYJKoZIhvcNAQkBFglwa2lAc2suZWUwggEiMA0GCSqGSIb3DQEB
-AQUAA4IBDwAwggEKAoIBAQDIIMDs4MVLqwd4lfNE7vsLDP90jmG7sWLqI9iroWUy
-euuOF0+W2Ap7kaJjbMeMTC55v6kF/GlclY1i+blw7cNRfdCT5mzrMEvhvH2/UpvO
-bntl8jixwKIy72KyaOBhU8E2lf/slLo2rpwcpzIP5Xy0xm90/XsY6KxX7QYgSzIw
-WFv9zajmofxwvI6Sc9uXp3whrj3B9UiHbCe9nyV0gVWw93X2PaRka9ZP585ArQ/d
-MtO8ihJTmMmJ+xAdTX7Nfh9WDSFwhfYggx/2uh8Ej+p3iDXE/+pOoYtNP2MbRMNE
-1CV2yreN1x5KZmTNXMWcg+HCCIia7E6j8T4cLNlsHaFLAgMBAAGjgYowgYcwDwYD
-VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBLyWj7qVhy/
-zQas8fElyalL1BSZMEUGA1UdJQQ+MDwGCCsGAQUFBwMCBggrBgEFBQcDAQYIKwYB
-BQUHAwMGCCsGAQUFBwMEBggrBgEFBQcDCAYIKwYBBQUHAwkwDQYJKoZIhvcNAQEF
-BQADggEBAHv25MANqhlHt01Xo/6tu7Fq1Q+e2+RjxY6hUFaTlrg4wCQiZrxTFGGV
-v9DHKpY5P30osxBAIWrEr7BSdxjhlthWXePdNl4dp1BUoMUq5KqMlIpPnTX/dqQG
-E5Gion0ARD9V04I8GtVbvFZMIi5GQ4okQC3zErg7cBqklrkar4dBGmoYDQZPxz5u
-uSlNDUmJEYcyW+ZLBMjkXOZ0c5RdFpgTlf7727FE5TpwrDdr5rMzcijJs1eg9gIW
-iAYLtqZLICjU3j2LrTcFU3T+bsy8QxdxXvnFzBqpYe73dgzzcvRyrc9yAjYHR8/v
-GVCJYMzpJJUPwssd8m92kMfMdcGWxZ0=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCB
-yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL
-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJp
-U2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxW
-ZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0
-aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCByjEL
-MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZW
-ZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2ln
-biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJp
-U2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9y
-aXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvJAgIKXo1
-nmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKzj/i5Vbex
-t0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIz
-SdhDY2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQG
-BO+QueQA5N06tRn/Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+
-rCpSx4/VBEnkjWNHiDxpg8v+R70rfk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/
-NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8E
-BAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEwHzAH
-BgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy
-aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKv
-MzEzMA0GCSqGSIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzE
-p6B4Eq1iDkVwZMXnl2YtmAl+X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y
-5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKEKQsTb47bDN0lAtukixlE0kF6BWlK
-WE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiCKm0oHw0LxOXnGiYZ
-4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vEZV8N
-hnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDoDCCAoigAwIBAgIBMTANBgkqhkiG9w0BAQUFADBDMQswCQYDVQQGEwJKUDEc
-MBoGA1UEChMTSmFwYW5lc2UgR292ZXJubWVudDEWMBQGA1UECxMNQXBwbGljYXRp
-b25DQTAeFw0wNzEyMTIxNTAwMDBaFw0xNzEyMTIxNTAwMDBaMEMxCzAJBgNVBAYT
-AkpQMRwwGgYDVQQKExNKYXBhbmVzZSBHb3Zlcm5tZW50MRYwFAYDVQQLEw1BcHBs
-aWNhdGlvbkNBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAp23gdE6H
-j6UG3mii24aZS2QNcfAKBZuOquHMLtJqO8F6tJdhjYq+xpqcBrSGUeQ3DnR4fl+K
-f5Sk10cI/VBaVuRorChzoHvpfxiSQE8tnfWuREhzNgaeZCw7NCPbXCbkcXmP1G55
-IrmTwcrNwVbtiGrXoDkhBFcsovW8R0FPXjQilbUfKW1eSvNNcr5BViCH/OlQR9cw
-FO5cjFW6WY2H/CPek9AEjP3vbb3QesmlOmpyM8ZKDQUXKi17safY1vC+9D/qDiht
-QWEjdnjDuGWk81quzMKq2edY3rZ+nYVunyoKb58DKTCXKB28t89UKU5RMfkntigm
-/qJj5kEW8DOYRwIDAQABo4GeMIGbMB0GA1UdDgQWBBRUWssmP3HMlEYNllPqa0jQ
-k/5CdTAOBgNVHQ8BAf8EBAMCAQYwWQYDVR0RBFIwUKROMEwxCzAJBgNVBAYTAkpQ
-MRgwFgYDVQQKDA/ml6XmnKzlm73mlL/lupwxIzAhBgNVBAsMGuOCouODl+ODquOC
-seODvOOCt+ODp+ODs0NBMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD
-ggEBADlqRHZ3ODrso2dGD/mLBqj7apAxzn7s2tGJfHrrLgy9mTLnsCTWw//1sogJ
-hyzjVOGjprIIC8CFqMjSnHH2HZ9g/DgzE+Ge3Atf2hZQKXsvcJEPmbo0NI2VdMV+
-eKlmXb3KIXdCEKxmJj3ekav9FfBv7WxfEPjzFvYDio+nEhEMy/0/ecGc/WLuo89U
-DNErXxc+4z6/wCs+CZv+iKZ+tJIX/COUgb1up8WMwusRRdv4QcmWdupwX3kSa+Sj
-B1oF7ydJzyGfikwJcGapJsErEU4z0g781mzSDjJkaP+tBXhfAx2o45CsJOAPQKdL
-rosot4LKGAfmt1t06SAZf7IbiVQ=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDIDCCAgigAwIBAgIBJDANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEP
-MA0GA1UEChMGU29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MxIENBMB4XDTAx
-MDQwNjEwNDkxM1oXDTIxMDQwNjEwNDkxM1owOTELMAkGA1UEBhMCRkkxDzANBgNV
-BAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJhIENsYXNzMSBDQTCCASIwDQYJKoZI
-hvcNAQEBBQADggEPADCCAQoCggEBALWJHytPZwp5/8Ue+H887dF+2rDNbS82rDTG
-29lkFwhjMDMiikzujrsPDUJVyZ0upe/3p4zDq7mXy47vPxVnqIJyY1MPQYx9EJUk
-oVqlBvqSV536pQHydekfvFYmUk54GWVYVQNYwBSujHxVX3BbdyMGNpfzJLWaRpXk
-3w0LBUXl0fIdgrvGE+D+qnr9aTCU89JFhfzyMlsy3uhsXR/LpCJ0sICOXZT3BgBL
-qdReLjVQCfOAl/QMF6452F/NM8EcyonCIvdFEu1eEpOdY6uCLrnrQkFEy0oaAIIN
-nvmLVz5MxxftLItyM19yejhW1ebZrgUaHXVFsculJRwSVzb9IjcCAwEAAaMzMDEw
-DwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQIR+IMi/ZTiFIwCwYDVR0PBAQDAgEG
-MA0GCSqGSIb3DQEBBQUAA4IBAQCLGrLJXWG04bkruVPRsoWdd44W7hE928Jj2VuX
-ZfsSZ9gqXLar5V7DtxYvyOirHYr9qxp81V9jz9yw3Xe5qObSIjiHBxTZ/75Wtf0H
-DjxVyhbMp6Z3N/vbXB9OWQaHowND9Rart4S9Tu+fMTfwRvFAttEMpWT4Y14h21VO
-TzF2nBBhjrZTOqMRvq9tfB69ri3iDGnHhVNoomG6xT60eVR4ngrHAr5i0RGCS2Uv
-kVrCqIexVmiUefkl98HVrhq4uz2PqYo4Ffdz0Fpg0YCw8NzVUM1O7pJIae2yIx4w
-zMiUyLb1O4Z/P6Yun/Y+LLWSlj7fLJOK/4GMDw9ZIRlXvVWa
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/
-MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
-DkRTVCBSb290IENBIFgzMB4XDTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVow
-PzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQD
-Ew5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
-AN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmTrE4O
-rz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEq
-OLl5CjH9UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9b
-xiqKqy69cK3FCxolkHRyxXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw
-7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40dutolucbY38EVAjqr2m7xPi71XAicPNaD
-aeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV
-HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQMA0GCSqG
-SIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69
-ikugdB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXr
-AvHRAosZy5Q6XkjEGB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZz
-R8srzJmwN0jP41ZL9c8PDHIyh8bwRLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5
-JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYo
-Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFGTCCBAGgAwIBAgIEPki9xDANBgkqhkiG9w0BAQUFADAxMQswCQYDVQQGEwJE
-SzEMMAoGA1UEChMDVERDMRQwEgYDVQQDEwtUREMgT0NFUyBDQTAeFw0wMzAyMTEw
-ODM5MzBaFw0zNzAyMTEwOTA5MzBaMDExCzAJBgNVBAYTAkRLMQwwCgYDVQQKEwNU
-REMxFDASBgNVBAMTC1REQyBPQ0VTIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
-MIIBCgKCAQEArGL2YSCyz8DGhdfjeebM7fI5kqSXLmSjhFuHnEz9pPPEXyG9VhDr
-2y5h7JNp46PMvZnDBfwGuMo2HP6QjklMxFaaL1a8z3sM8W9Hpg1DTeLpHTk0zY0s
-2RKY+ePhwUp8hjjEqcRhiNJerxomTdXkoCJHhNlktxmW/OwZ5LKXJk5KTMuPJItU
-GBxIYXvViGjaXbXqzRowwYCDdlCqT9HU3Tjw7xb04QxQBr/q+3pJoSgrHPb8FTKj
-dGqPqcNiKXEx5TukYBdedObaE+3pHx8b0bJoc8YQNHVGEBDjkAB2QMuLt0MJIf+r
-TpPGWOmlgtt3xDqZsXKVSQTwtyv6e1mO3QIDAQABo4ICNzCCAjMwDwYDVR0TAQH/
-BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwgewGA1UdIASB5DCB4TCB3gYIKoFQgSkB
-AQEwgdEwLwYIKwYBBQUHAgEWI2h0dHA6Ly93d3cuY2VydGlmaWthdC5kay9yZXBv
-c2l0b3J5MIGdBggrBgEFBQcCAjCBkDAKFgNUREMwAwIBARqBgUNlcnRpZmlrYXRl
-ciBmcmEgZGVubmUgQ0EgdWRzdGVkZXMgdW5kZXIgT0lEIDEuMi4yMDguMTY5LjEu
-MS4xLiBDZXJ0aWZpY2F0ZXMgZnJvbSB0aGlzIENBIGFyZSBpc3N1ZWQgdW5kZXIg
-T0lEIDEuMi4yMDguMTY5LjEuMS4xLjARBglghkgBhvhCAQEEBAMCAAcwgYEGA1Ud
-HwR6MHgwSKBGoESkQjBAMQswCQYDVQQGEwJESzEMMAoGA1UEChMDVERDMRQwEgYD
-VQQDEwtUREMgT0NFUyBDQTENMAsGA1UEAxMEQ1JMMTAsoCqgKIYmaHR0cDovL2Ny
-bC5vY2VzLmNlcnRpZmlrYXQuZGsvb2Nlcy5jcmwwKwYDVR0QBCQwIoAPMjAwMzAy
-MTEwODM5MzBagQ8yMDM3MDIxMTA5MDkzMFowHwYDVR0jBBgwFoAUYLWF7FZkfhIZ
-J2cdUBVLc647+RIwHQYDVR0OBBYEFGC1hexWZH4SGSdnHVAVS3OuO/kSMB0GCSqG
-SIb2fQdBAAQQMA4bCFY2LjA6NC4wAwIEkDANBgkqhkiG9w0BAQUFAAOCAQEACrom
-JkbTc6gJ82sLMJn9iuFXehHTuJTXCRBuo7E4A9G28kNBKWKnctj7fAXmMXAnVBhO
-inxO5dHKjHiIzxvTkIvmI/gLDjNDfZziChmPyQE+dF10yYscA+UYyAFMP8uXBV2Y
-caaYb7Z8vTd/vuGTJW1v8AqtFxjhA7wHKcitJuj4YfD9IQl+mo6paH1IYnK9AOoB
-mbgGglGBTvH1tJFUuSN6AJqfXY3gPGS5GhKSKseCRHI53OI8xthV9RVOyAUO28bQ
-YqbsFbS1AoLbrIyigfCbmTH1ICCoiGEKB5+U/NDXG8wuF/MEJ3Zn61SD/aSQfgY9
-BKNDLdr8C2LqL19iUw==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDYTCCAkmgAwIBAgIQCgEBAQAAAnwAAAAKAAAAAjANBgkqhkiG9w0BAQUFADA6
-MRkwFwYDVQQKExBSU0EgU2VjdXJpdHkgSW5jMR0wGwYDVQQLExRSU0EgU2VjdXJp
-dHkgMjA0OCBWMzAeFw0wMTAyMjIyMDM5MjNaFw0yNjAyMjIyMDM5MjNaMDoxGTAX
-BgNVBAoTEFJTQSBTZWN1cml0eSBJbmMxHTAbBgNVBAsTFFJTQSBTZWN1cml0eSAy
-MDQ4IFYzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt49VcdKA3Xtp
-eafwGFAyPGJn9gqVB93mG/Oe2dJBVGutn3y+Gc37RqtBaB4Y6lXIL5F4iSj7Jylg
-/9+PjDvJSZu1pJTOAeo+tWN7fyb9Gd3AIb2E0S1PRsNO3Ng3OTsor8udGuorryGl
-wSMiuLgbWhOHV4PR8CDn6E8jQrAApX2J6elhc5SYcSa8LWrg903w8bYqODGBDSnh
-AMFRD0xS+ARaqn1y07iHKrtjEAMqs6FPDVpeRrc9DvV07Jmf+T0kgYim3WBU6JU2
-PcYJk5qjEoAAVZkZR73QpXzDuvsf9/UP+Ky5tfQ3mBMY3oVbtwyCO4dvlTlYMNpu
-AWgXIszACwIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIB
-BjAfBgNVHSMEGDAWgBQHw1EwpKrpRa41JPr/JCwz0LGdjDAdBgNVHQ4EFgQUB8NR
-MKSq6UWuNST6/yQsM9CxnYwwDQYJKoZIhvcNAQEFBQADggEBAF8+hnZuuDU8TjYc
-HnmYv/3VEhF5Ug7uMYm83X/50cYVIeiKAVQNOvtUudZj1LGqlk2iQk3UUx+LEN5/
-Zb5gEydxiKRz44Rj0aRV4VCT5hsOedBnvEbIvz8XDZXmxpBp3ue0L96VfdASPz0+
-f00/FGj1EVDVwfSQpQgdMWD/YIwjVAqv/qFuxdF6Kmh4zx6CCiC0H63lhbJqaHVO
-rSU3lIW+vaHU6rcMSzyd6BIA8F+sDeGscGNz9395nzIlQnQFgCi/vcEkllgVsRch
-6YlL2weIZ/QVrXA+L02FO8K32/6YaCOJ4XQP3vTFhGMpG8zLB8kApKnXwiJPZ9d3
-7CAFYd4=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIGFDCCA/ygAwIBAgIIU+w77vuySF8wDQYJKoZIhvcNAQEFBQAwUTELMAkGA1UE
-BhMCRVMxQjBABgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1h
-cHJvZmVzaW9uYWwgQ0lGIEE2MjYzNDA2ODAeFw0wOTA1MjAwODM4MTVaFw0zMDEy
-MzEwODM4MTVaMFExCzAJBgNVBAYTAkVTMUIwQAYDVQQDDDlBdXRvcmlkYWQgZGUg
-Q2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBBNjI2MzQwNjgwggIi
-MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDDUtd9
-thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQM
-cas9UX4PB99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9qFD0sefG
-L9ItWY16Ck6WaVICqjaY7Pz6FIMMNx/Jkjd/14Et5cS54D40/mf0PmbR0/RAz15i
-NA9wBj4gGFrO93IbJWyTdBSTo3OxDqqHECNZXyAFGUftaI6SEspd/NYrspI8IM/h
-X68gvqB2f3bl7BqGYTM+53u0P6APjqK5am+5hyZvQWyIplD9amML9ZMWGxmPsu2b
-m8mQ9QEM3xk9Dz44I8kvjwzRAv4bVdZO0I08r0+k8/6vKtMFnXkIoctXMbScyJCy
-Z/QYFpM6/EfY0XiWMR+6KwxfXZmtY4laJCB22N/9q06mIqqdXuYnin1oKaPnirja
-EbsXLZmdEyRG98Xi2J+Of8ePdG1asuhy9azuJBCtLxTa/y2aRnFHvkLfuwHb9H/T
-KI8xWVvTyQKmtFLKbpf7Q8UIJm+K9Lv9nyiqDdVF8xM6HdjAeI9BZzwelGSuewvF
-6NkBiDkal4ZkQdU7hwxu+g/GvUgUvzlN1J5Bto+WHWOWk9mVBngxaJ43BjuAiUVh
-OSPHG0SjFeUc+JIwuwIDAQABo4HvMIHsMBIGA1UdEwEB/wQIMAYBAf8CAQEwDgYD
-VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRlzeurNR4APn7VdMActHNHDhpkLzCBpgYD
-VR0gBIGeMIGbMIGYBgRVHSAAMIGPMC8GCCsGAQUFBwIBFiNodHRwOi8vd3d3LmZp
-cm1hcHJvZmVzaW9uYWwuY29tL2NwczBcBggrBgEFBQcCAjBQHk4AUABhAHMAZQBv
-ACAAZABlACAAbABhACAAQgBvAG4AYQBuAG8AdgBhACAANAA3ACAAQgBhAHIAYwBl
-AGwAbwBuAGEAIAAwADgAMAAxADcwDQYJKoZIhvcNAQEFBQADggIBABd9oPm03cXF
-661LJLWhAqvdpYhKsg9VSytXjDvlMd3+xDLx51tkljYyGOylMnfX40S2wBEqgLk9
-am58m9Ot/MPWo+ZkKXzR4Tgegiv/J2Wv+xYVxC5xhOW1//qkR71kMrv2JYSiJ0L1
-ILDCExARzRAVukKQKtJE4ZYm6zFIEv0q2skGz3QeqUvVhyj5eTSSPi5E6PaPT481
-PyWzOdxjKpBrIF/EUhJOlywqrJ2X3kjyo2bbwtKDlaZmp54lD+kLM5FlClrD2VQS
-3a/DTg4fJl4N3LON7NWBcN7STyQF82xO9UxJZo3R/9ILJUFI/lGExkKvgATP0H5k
-SeTy36LssUzAKh3ntLFlosS88Zj0qnAHY7S42jtM+kAiMFsRpvAFDsYCA0irhpuF
-3dvd6qJ2gHN99ZwExEWN57kci57q13XRcrHedUTnQn3iV2t93Jm8PYMo6oCTjcVM
-ZcFwgbg4/EMxsvYDNEeyrPsiBsse3RdHHF9mudMaotoRsaS8I8nkvof/uZS2+F0g
-StRf571oe2XyFR7SOqkt6dhrJKyXWERHrVkY8SFlcN7ONGCoQPHzPKTDKCOM/icz
-Q0CgFzzr6juwcqajuUpLXhZI9LK8yIySxZ2frHI2vDSANGupi5LAuBft7HZT9SQB
-jLMi6Et8Vcad+qMUu2WFbm5PEn4KPJ2V
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU
-MBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFs
-IFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290
-MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFowbzELMAkGA1UEBhMCU0Ux
-FDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5h
-bCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9v
-dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvt
-H7xsD821+iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9
-uMq/NzgtHj6RQa1wVsfwTz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzX
-mk6vBbOmcZSccbNQYArHE504B4YCqOmoaSYYkKtMsE8jqzpPhNjfzp/haW+710LX
-a0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy2xSoRcRdKn23tNbE7qzN
-E0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv77+ldU9U0
-WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYD
-VR0PBAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0
-Jvf6xCZU7wO94CTLVBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRU
-cnVzdCBBQjEmMCQGA1UECxMdQWRkVHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsx
-IjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENBIFJvb3SCAQEwDQYJKoZIhvcN
-AQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZlj7DYd7usQWxH
-YINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5
-6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvC
-Nr4TDea9Y355e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEX
-c4g/VhsxOBi0cQ+azcgOno4uG+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5a
-mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIICgjCCAeugAwIBAgIBBDANBgkqhkiG9w0BAQQFADBTMQswCQYDVQQGEwJVUzEc
-MBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBT
-ZWN1cmUgZUJ1c2luZXNzIENBLTEwHhcNOTkwNjIxMDQwMDAwWhcNMjAwNjIxMDQw
-MDAwWjBTMQswCQYDVQQGEwJVUzEcMBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5j
-LjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNzIENBLTEwgZ8wDQYJ
-KoZIhvcNAQEBBQADgY0AMIGJAoGBAM4vGbwXt3fek6lfWg0XTzQaDJj0ItlZ1MRo
-RvC0NcWFAyDGr0WlIVFFQesWWDYyb+JQYmT5/VGcqiTZ9J2DKocKIdMSODRsjQBu
-WqDZQu4aIZX5UkxVWsUPOE9G+m34LjXWHXzr4vCwdYDIqROsvojvOm6rXyo4YgKw
-Env+j6YDAgMBAAGjZjBkMBEGCWCGSAGG+EIBAQQEAwIABzAPBgNVHRMBAf8EBTAD
-AQH/MB8GA1UdIwQYMBaAFEp4MlIR21kWNl7fwRQ2QGpHfEyhMB0GA1UdDgQWBBRK
-eDJSEdtZFjZe38EUNkBqR3xMoTANBgkqhkiG9w0BAQQFAAOBgQB1W6ibAxHm6VZM
-zfmpTMANmvPMZWnmJXbMWbfWVMMdzZmsGd20hdXgPfxiIKeES1hl8eL5lSE/9dR+
-WB5Hh1Q+WKG1tfgq73HnvMP2sUlG4tega+VWeponmHxGYhTnyfxuAxJ5gDgdSIKN
-/Bf+KpYrtWKmpj29f5JZzVoqgrI3eQ==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNVBAYTAlBM
-MSIwIAYDVQQKExlVbml6ZXRvIFRlY2hub2xvZ2llcyBTLkEuMScwJQYDVQQLEx5D
-ZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxIjAgBgNVBAMTGUNlcnR1bSBU
-cnVzdGVkIE5ldHdvcmsgQ0EwHhcNMDgxMDIyMTIwNzM3WhcNMjkxMjMxMTIwNzM3
-WjB+MQswCQYDVQQGEwJQTDEiMCAGA1UEChMZVW5pemV0byBUZWNobm9sb2dpZXMg
-Uy5BLjEnMCUGA1UECxMeQ2VydHVtIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MSIw
-IAYDVQQDExlDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENBMIIBIjANBgkqhkiG9w0B
-AQEFAAOCAQ8AMIIBCgKCAQEA4/t9o3K6wvDJFIf1awFO4W5AB7ptJ11/91sts1rH
-UV+rpDKmYYe2bg+G0jACl/jXaVehGDldamR5xgFZrDwxSjh80gTSSyjoIF87B6LM
-TXPb865Px1bVWqeWifrzq2jUI4ZZJ88JJ7ysbnKDHDBy3+Ci6dLhdHUZvSqeexVU
-BBvXQzmtVSjF4hq79MDkrjhJM8x2hZ85RdKknvISjFH4fOQtf/WsX+sWn7Et0brM
-kUJ3TCXJkDhv2/DM+44el1k+1WBO5gUo7Ul5E0u6SNsv+XLTOcr+H9g0cvW0QM8x
-AcPs3hEtF10fuFDRXhmnad4HMyjKUJX5p1TLVIZQRan5SQIDAQABo0IwQDAPBgNV
-HRMBAf8EBTADAQH/MB0GA1UdDgQWBBQIds3LB/8k9sXN7buQvOKEN0Z19zAOBgNV
-HQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQEFBQADggEBAKaorSLOAT2mo/9i0Eidi15y
-sHhE49wcrwn9I0j6vSrEuVUEtRCjjSfeC4Jj0O7eDDd5QVsisrCaQVymcODU0HfL
-I9MA4GxWL+FpDQ3Zqr8hgVDZBqWo/5U30Kr+4rP1mS1FhIrlQgnXdAIv94nYmem8
-J9RHjboNRhx3zxSkHLmkMcScKHQDNP8zGSal6Q10tz6XxnboJ5ajZt3hrvJBW8qY
-VoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI
-03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMx
-EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoT
-EUdvRGFkZHkuY29tLCBJbmMuMTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRp
-ZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIz
-NTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQH
-EwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8GA1UE
-AxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIw
-DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKD
-E6bFIEMBO4Tx5oVJnyfq9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH
-/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD+qK+ihVqf94Lw7YZFAXK6sOoBJQ7Rnwy
-DfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutdfMh8+7ArU6SSYmlRJQVh
-GkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMlNAJWJwGR
-tDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEA
-AaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE
-FDqahQcQZyi27/a9BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmX
-WWcDYfF+OwYxdS2hII5PZYe096acvNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu
-9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r5N9ss4UXnT3ZJE95kTXWXwTr
-gIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYVN8Gb5DKj7Tjo
-2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO
-LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI
-4uJEvlz36hz1
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFkjCCA3qgAwIBAgIBATANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJGUjET
-MBEGA1UEChMKQ2VydGlub21pczEXMBUGA1UECxMOMDAwMiA0MzM5OTg5MDMxHTAb
-BgNVBAMTFENlcnRpbm9taXMgLSBSb290IENBMB4XDTEzMTAyMTA5MTcxOFoXDTMz
-MTAyMTA5MTcxOFowWjELMAkGA1UEBhMCRlIxEzARBgNVBAoTCkNlcnRpbm9taXMx
-FzAVBgNVBAsTDjAwMDIgNDMzOTk4OTAzMR0wGwYDVQQDExRDZXJ0aW5vbWlzIC0g
-Um9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANTMCQosP5L2
-fxSeC5yaah1AMGT9qt8OHgZbn1CF6s2Nq0Nn3rD6foCWnoR4kkjW4znuzuRZWJfl
-LieY6pOod5tK8O90gC3rMB+12ceAnGInkYjwSond3IjmFPnVAy//ldu9n+ws+hQV
-WZUKxkd8aRi5pwP5ynapz8dvtF4F/u7BUrJ1Mofs7SlmO/NKFoL21prbcpjp3vDF
-TKWrteoB4owuZH9kb/2jJZOLyKIOSY008B/sWEUuNKqEUL3nskoTuLAPrjhdsKkb
-5nPJWqHZZkCqqU2mNAKthH6yI8H7KsZn9DS2sJVqM09xRLWtwHkziOC/7aOgFLSc
-CbAK42C++PhmiM1b8XcF4LVzbsF9Ri6OSyemzTUK/eVNfaoqoynHWmgE6OXWk6Ri
-wsXm9E/G+Z8ajYJJGYrKWUM66A0ywfRMEwNvbqY/kXPLynNvEiCL7sCCeN5LLsJJ
-wx3tFvYk9CcbXFcx3FXuqB5vbKziRcxXV4p1VxngtViZSTYxPDMBbRZKzbgqg4SG
-m/lg0h9tkQPTYKbVPZrdd5A9NaSfD171UkRpucC63M9933zZxKyGIjK8e2uR73r4
-F2iw4lNVYC2vPsKD2NkJK/DAZNuHi5HMkesE/Xa0lZrmFAYb1TQdvtj/dBxThZng
-WVJKYe2InmtJiUZ+IFrZ50rlau7SZRFDAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIB
-BjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTvkUz1pcMw6C8I6tNxIqSSaHh0
-2TAfBgNVHSMEGDAWgBTvkUz1pcMw6C8I6tNxIqSSaHh02TANBgkqhkiG9w0BAQsF
-AAOCAgEAfj1U2iJdGlg+O1QnurrMyOMaauo++RLrVl89UM7g6kgmJs95Vn6RHJk/
-0KGRHCwPT5iVWVO90CLYiF2cN/z7ZMF4jIuaYAnq1fohX9B0ZedQxb8uuQsLrbWw
-F6YSjNRieOpWauwK0kDDPAUwPk2Ut59KA9N9J0u2/kTO+hkzGm2kQtHdzMjI1xZS
-g081lLMSVX3l4kLr5JyTCcBMWwerx20RoFAXlCOotQqSD7J6wWAsOMwaplv/8gzj
-qh8c3LigkyfeY+N/IZ865Z764BNqdeuWXGKRlI5nU7aJ+BIJy29SWwNyhlCVCNSN
-h4YVH5Uk2KRvms6knZtt0rJ2BobGVgjF6wnaNsIbW0G+YSrjcOa4pvi2WsS9Iff/
-ql+hbHY5ZtbqTFXhADObE5hjyW/QASAJN1LnDE8+zbz1X5YnpyACleAu6AdBBR8V
-btaw5BngDwKTACdyxYvRVB9dSsNAl35VpnzBMwQUAR1JIGkLGZOdblgi90AMRgwj
-Y/M50n92Uaf0yKHxDHYiI0ZSKS3io0EHVmmY0gUJvGnHWmHNj4FgFU2A3ZDifcRQ
-8ow7bkrHxuaAKzyBvBGAFhAn1/DNP3nMcyrDflOR1m749fPH0FFNjkulW+YZFzvW
-gQncItzujrnEj1PhZ7szuIgVRs/taTX/dQ1G885x4cVrhkIGuUE=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFujCCBKKgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBhjELMAkGA1UEBhMCVVMx
-HTAbBgNVBAoTFEFwcGxlIENvbXB1dGVyLCBJbmMuMS0wKwYDVQQLEyRBcHBsZSBD
-b21wdXRlciBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxKTAnBgNVBAMTIEFwcGxlIFJv
-b3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MB4XDTA1MDIxMDAwMTgxNFoXDTI1MDIx
-MDAwMTgxNFowgYYxCzAJBgNVBAYTAlVTMR0wGwYDVQQKExRBcHBsZSBDb21wdXRl
-ciwgSW5jLjEtMCsGA1UECxMkQXBwbGUgQ29tcHV0ZXIgQ2VydGlmaWNhdGUgQXV0
-aG9yaXR5MSkwJwYDVQQDEyBBcHBsZSBSb290IENlcnRpZmljYXRlIEF1dGhvcml0
-eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOSRqQkfkdseR1DrBe1e
-eYQt6zaiV0xV7IsZid75S2z1B6siMALoGD74UAnTf0GomPnRymacJGsR0KO75Bsq
-wx+VnnoMpEeLW9QWNzPLxA9NzhRp0ckZcvVdDtV/X5vyJQO6VY9NXQ3xZDUjFUsV
-WR2zlPf2nJ7PULrBWFBnjwi0IPfLrCwgb3C2PwEwjLdDzw+dPfMrSSgayP7OtbkO
-2V4c1ss9tTqt9A8OAJILsSEWLnTVPA3bYharo3GSR1NVwa8vQbP4++NwzeajTEV+
-H0xrUJZBicR0YgsQg0GHM4qBsTBY7FoEMoxos48d3mVz/2deZbxJ2HafMxRloXeU
-yS0CAwEAAaOCAi8wggIrMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/
-MB0GA1UdDgQWBBQr0GlHlHYJ/vRrjS5ApvdHTX8IXjAfBgNVHSMEGDAWgBQr0GlH
-lHYJ/vRrjS5ApvdHTX8IXjCCASkGA1UdIASCASAwggEcMIIBGAYJKoZIhvdjZAUB
-MIIBCTBBBggrBgEFBQcCARY1aHR0cHM6Ly93d3cuYXBwbGUuY29tL2NlcnRpZmlj
-YXRlYXV0aG9yaXR5L3Rlcm1zLmh0bWwwgcMGCCsGAQUFBwICMIG2GoGzUmVsaWFu
-Y2Ugb24gdGhpcyBjZXJ0aWZpY2F0ZSBieSBhbnkgcGFydHkgYXNzdW1lcyBhY2Nl
-cHRhbmNlIG9mIHRoZSB0aGVuIGFwcGxpY2FibGUgc3RhbmRhcmQgdGVybXMgYW5k
-IGNvbmRpdGlvbnMgb2YgdXNlLCBjZXJ0aWZpY2F0ZSBwb2xpY3kgYW5kIGNlcnRp
-ZmljYXRpb24gcHJhY3RpY2Ugc3RhdGVtZW50cy4wRAYDVR0fBD0wOzA5oDegNYYz
-aHR0cHM6Ly93d3cuYXBwbGUuY29tL2NlcnRpZmljYXRlYXV0aG9yaXR5L3Jvb3Qu
-Y3JsMFUGCCsGAQUFBwEBBEkwRzBFBggrBgEFBQcwAoY5aHR0cHM6Ly93d3cuYXBw
-bGUuY29tL2NlcnRpZmljYXRlYXV0aG9yaXR5L2Nhc2lnbmVycy5odG1sMA0GCSqG
-SIb3DQEBBQUAA4IBAQCd2i0oWC99dgS5BNM+zrdmY06PL9T+S61yvaM5xlJNBZhS
-9YlRASR5vhoy9+VEi0tEBzmC1lrKtCBe2a4VXR2MHTK/ODFiSF3H4ZCx+CRA+F9Y
-m1FdV53B5f88zHIhbsTp6aF31ywXJsM/65roCwO66bNKcuszCVut5mIxauivL9Wv
-Hld2j383LS4CXN1jyfJxuCZA3xWNdUQ/eb3mHZnhQyw+rW++uaT+DjUZUWOxw961
-kj5ReAFziqQjyqSI8R5cH0EWLX6VCqrpiUGYGxrdyyC/R14MJsVVNU3GMIuZZxTH
-CR+6R8faAQmHJEKVvRNgGQrv6n8Obs3BREM6StXj
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIGZjCCBE6gAwIBAgIPB35Sk3vgFeNX8GmMy+wMMA0GCSqGSIb3DQEBBQUAMHsx
-CzAJBgNVBAYTAkNPMUcwRQYDVQQKDD5Tb2NpZWRhZCBDYW1lcmFsIGRlIENlcnRp
-ZmljYWNpw7NuIERpZ2l0YWwgLSBDZXJ0aWPDoW1hcmEgUy5BLjEjMCEGA1UEAwwa
-QUMgUmHDrXogQ2VydGljw6FtYXJhIFMuQS4wHhcNMDYxMTI3MjA0NjI5WhcNMzAw
-NDAyMjE0MjAyWjB7MQswCQYDVQQGEwJDTzFHMEUGA1UECgw+U29jaWVkYWQgQ2Ft
-ZXJhbCBkZSBDZXJ0aWZpY2FjacOzbiBEaWdpdGFsIC0gQ2VydGljw6FtYXJhIFMu
-QS4xIzAhBgNVBAMMGkFDIFJhw616IENlcnRpY8OhbWFyYSBTLkEuMIICIjANBgkq
-hkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAq2uJo1PMSCMI+8PPUZYILrgIem08kBeG
-qentLhM0R7LQcNzJPNCNyu5LF6vQhbCnIwTLqKL85XXbQMpiiY9QngE9JlsYhBzL
-fDe3fezTf3MZsGqy2IiKLUV0qPezuMDU2s0iiXRNWhU5cxh0T7XrmafBHoi0wpOQ
-Y5fzp6cSsgkiBzPZkc0OnB8OIMfuuzONj8LSWKdf/WU34ojC2I+GdV75LaeHM/J4
-Ny+LvB2GNzmxlPLYvEqcgxhaBvzz1NS6jBUJJfD5to0EfhcSM2tXSExP2yYe68yQ
-54v5aHxwD6Mq0Do43zeX4lvegGHTgNiRg0JaTASJaBE8rF9ogEHMYELODVoqDA+b
-MMCm8Ibbq0nXl21Ii/kDwFJnmxL3wvIumGVC2daa49AZMQyth9VXAnow6IYm+48j
-ilSH5L887uvDdUhfHjlvgWJsxS3EF1QZtzeNnDeRyPYL1epjb4OsOMLzP96a++Ej
-YfDIJss2yKHzMI+ko6Kh3VOz3vCaMh+DkXkwwakfU5tTohVTP92dsxA7SH2JD/zt
-A/X7JWR1DhcZDY8AFmd5ekD8LVkH2ZD6mq093ICK5lw1omdMEWux+IBkAC1vImHF
-rEsm5VoQgpukg3s0956JkSCXjrdCx2bD0Omk1vUgjcTDlaxECp1bczwmPS9KvqfJ
-pxAe+59QafMCAwEAAaOB5jCB4zAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQE
-AwIBBjAdBgNVHQ4EFgQU0QnQ6dfOeXRU+Tows/RtLAMDG2gwgaAGA1UdIASBmDCB
-lTCBkgYEVR0gADCBiTArBggrBgEFBQcCARYfaHR0cDovL3d3dy5jZXJ0aWNhbWFy
-YS5jb20vZHBjLzBaBggrBgEFBQcCAjBOGkxMaW1pdGFjaW9uZXMgZGUgZ2FyYW50
-7WFzIGRlIGVzdGUgY2VydGlmaWNhZG8gc2UgcHVlZGVuIGVuY29udHJhciBlbiBs
-YSBEUEMuMA0GCSqGSIb3DQEBBQUAA4ICAQBclLW4RZFNjmEfAygPU3zmpFmps4p6
-xbD/CHwso3EcIRNnoZUSQDWDg4902zNc8El2CoFS3UnUmjIz75uny3XlesuXEpBc
-unvFm9+7OSPI/5jOCk0iAUgHforA1SBClETvv3eiiWdIG0ADBaGJ7M9i4z0ldma/
-Jre7Ir5v/zlXdLp6yQGVwZVR6Kss+LGGIOk/yzVb0hfpKv6DExdA7ohiZVvVO2Dp
-ezy4ydV/NgIlqmjCMRW3MGXrfx1IebHPOeJCgBbT9ZMj/EyXyVo3bHwi2ErN0o42
-gzmRkBDI8ck1fj+404HGIGQatlDCIaR43NAvO2STdPCWkPHv+wlaNECW8DYSwaN0
-jJN+Qd53i+yG2dIPPy3RzECiiWZIHiCznCNZc6lEc7wkeZBWN7PGKX6jD/EpOe9+
-XCgycDWs2rjIdWb8m0w5R44bb5tNAlQiM+9hup4phO9OSzNHdpdqy35f/RWmnkJD
-W2ZaiogN9xa5P1FlK2Zqi9E4UqLWRhH6/JocdJ6PlwsCT2TG9WjTSy3/pDceiz+/
-RL5hRqGEPQgnTIEgd4kI6mdAXmwIUV80WoyWaM3X94nCHNMyAK9Sy9NgWyo6R35r
-MDOhYil/SrnhLecUIw4OGEfhefwVVdCx/CVxY3UzHCMrr1zZ7Ud3YA47Dx7SwNxk
-BYn8eNZcLCZDqQ==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDUzCCAjugAwIBAgIBATANBgkqhkiG9w0BAQUFADBLMQswCQYDVQQGEwJOTzEd
-MBsGA1UECgwUQnV5cGFzcyBBUy05ODMxNjMzMjcxHTAbBgNVBAMMFEJ1eXBhc3Mg
-Q2xhc3MgMiBDQSAxMB4XDTA2MTAxMzEwMjUwOVoXDTE2MTAxMzEwMjUwOVowSzEL
-MAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBhc3MgQVMtOTgzMTYzMzI3MR0wGwYD
-VQQDDBRCdXlwYXNzIENsYXNzIDIgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEP
-ADCCAQoCggEBAIs8B0XY9t/mx8q6jUPFR42wWsE425KEHK8T1A9vNkYgxC7McXA0
-ojTTNy7Y3Tp3L8DrKehc0rWpkTSHIln+zNvnma+WwajHQN2lFYxuyHyXA8vmIPLX
-l18xoS830r7uvqmtqEyeIWZDO6i88wmjONVZJMHCR3axiFyCO7srpgTXjAePzdVB
-HfCuuCkslFJgNJQ72uA40Z0zPhX0kzLFANq1KWYOOngPIVJfAuWSeyXTkh4vFZ2B
-5J2O6O+JzhRMVB0cgRJNcKi+EAUXfh/RuFdV7c27UsKwHnjCTTZoy1YmwVLBvXb3
-WNVyfh9EdrsAiR0WnVE1703CVu9r4Iw7DekCAwEAAaNCMEAwDwYDVR0TAQH/BAUw
-AwEB/zAdBgNVHQ4EFgQUP42aWYv8e3uco684sDntkHGA1sgwDgYDVR0PAQH/BAQD
-AgEGMA0GCSqGSIb3DQEBBQUAA4IBAQAVGn4TirnoB6NLJzKyQJHyIdFkhb5jatLP
-gcIV1Xp+DCmsNx4cfHZSldq1fyOhKXdlyTKdqC5Wq2B2zha0jX94wNWZUYN/Xtm+
-DKhQ7SLHrQVMdvvt7h5HZPb3J31cKA9FxVxiXqaakZG3Uxcu3K1gnZZkOb1naLKu
-BctN518fV4bVIJwo+28TOPX2EZL2fZleHwzoq0QkKXJAPTZSr4xYkHPB7GEseaHs
-h7U/2k3ZIQAw3pDaDtMaSKk+hQsUi4y8QZ5q9w5wwDX3OaJdZtB7WZ+oRxKaJyOk
-LY4ng5IgodcVf/EuGO70SH8vf/GhGLWhC5SgYiAynB321O+/TIho
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFnDCCA4SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJGUjET
-MBEGA1UEChMKQ2VydGlub21pczEXMBUGA1UECxMOMDAwMiA0MzM5OTg5MDMxJjAk
-BgNVBAMMHUNlcnRpbm9taXMgLSBBdXRvcml0w6kgUmFjaW5lMB4XDTA4MDkxNzA4
-Mjg1OVoXDTI4MDkxNzA4Mjg1OVowYzELMAkGA1UEBhMCRlIxEzARBgNVBAoTCkNl
-cnRpbm9taXMxFzAVBgNVBAsTDjAwMDIgNDMzOTk4OTAzMSYwJAYDVQQDDB1DZXJ0
-aW5vbWlzIC0gQXV0b3JpdMOpIFJhY2luZTCCAiIwDQYJKoZIhvcNAQEBBQADggIP
-ADCCAgoCggIBAJ2Fn4bT46/HsmtuM+Cet0I0VZ35gb5j2CN2DpdUzZlMGvE5x4jY
-F1AMnmHawE5V3udauHpOd4cN5bjr+p5eex7Ezyh0x5P1FMYiKAT5kcOrJ3NqDi5N
-8y4oH3DfVS9O7cdxbwlyLu3VMpfQ8Vh30WC8Tl7bmoT2R2FFK/ZQpn9qcSdIhDWe
-rP5pqZ56XjUl+rSnSTV3lqc2W+HN3yNw2F1MpQiD8aYkOBOo7C+ooWfHpi2GR+6K
-/OybDnT0K0kCe5B1jPyZOQE51kqJ5Z52qz6WKDgmi92NjMD2AR5vpTESOH2VwnHu
-7XSu5DaiQ3XV8QCb4uTXzEIDS3h65X27uK4uIJPT5GHfceF2Z5c/tt9qc1pkIuVC
-28+BA5PY9OMQ4HL2AHCs8MF6DwV/zzRpRbWT5BnbUhYjBYkOjUjkJW+zeL9i9Qf6
-lSTClrLooyPCXQP8w9PlfMl1I9f09bze5N/NgL+RiH2nE7Q5uiy6vdFrzPOlKO1E
-nn1So2+WLhl+HPNbxxaOu2B9d2ZHVIIAEWBsMsGoOBvrbpgT1u449fCfDu/+MYHB
-0iSVL1N6aaLwD4ZFjliCK0wi1F6g530mJ0jfJUaNSih8hp75mxpZuWW/Bd22Ql09
-5gBIgl4g9xGC3srYn+Y3RyYe63j3YcNBZFgCQfna4NH4+ej9Uji29YnfAgMBAAGj
-WzBZMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBQN
-jLZh2kS40RR9w759XkjwzspqsDAXBgNVHSAEEDAOMAwGCiqBegFWAgIAAQEwDQYJ
-KoZIhvcNAQEFBQADggIBACQ+YAZ+He86PtvqrxyaLAEL9MW12Ukx9F1BjYkMTv9s
-ov3/4gbIOZ/xWqndIlgVqIrTseYyCYIDbNc/CMf4uboAbbnW/FIyXaR/pDGUu7ZM
-OH8oMDX/nyNTt7buFHAAQCvaR6s0fl6nVjBhK4tDrP22iCj1a7Y+YEq6QpA0Z43q
-619FVDsXrIvkxmUP7tCMXWY5zjKn2BCXwH40nJ+U8/aGH88bc62UeYdocMMzpXDn
-2NU4lG9jeeu/Cg4I58UvD0KgKxRA/yHgBcUn4YQRE7rWhh1BCxMjidPJC+iKunqj
-o3M3NYB9Ergzd0A4wPpeMNLytqOx1qKVl4GbUu1pTP+A5FPbVFsDbVRfsbjvJL1v
-nxHDx2TCDyhihWZeGnuyt++uNckZM6i4J9szVb9o4XVIRFb7zdNIu0eJOqxp9YDG
-5ERQL1TEqkPFMTFYvZbF6nVsmnWxTfj3l/+WFvKXTej28xH5On2KOG4Ey+HTRRWq
-pdEdnV1j6CTmNhTih60bWfVEm/vXd3wfAXBioSAaosUaKPQhA+4u2cGA6rnZgtZb
-dsLLO7XSAPCjDuGtbkD326C00EauFddEwk01+dIL8hf2rGbVJLJP0RyZwG71fet0
-BLj5TXcJ17TPBzAJ8bgAVtkXFhYKK4bfjwEZGuW7gmP/vgt2Fl43N+bYdJeimUV5
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDODCCAiCgAwIBAgIGIAYFFnACMA0GCSqGSIb3DQEBBQUAMDsxCzAJBgNVBAYT
-AlJPMREwDwYDVQQKEwhjZXJ0U0lHTjEZMBcGA1UECxMQY2VydFNJR04gUk9PVCBD
-QTAeFw0wNjA3MDQxNzIwMDRaFw0zMTA3MDQxNzIwMDRaMDsxCzAJBgNVBAYTAlJP
-MREwDwYDVQQKEwhjZXJ0U0lHTjEZMBcGA1UECxMQY2VydFNJR04gUk9PVCBDQTCC
-ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALczuX7IJUqOtdu0KBuqV5Do
-0SLTZLrTk+jUrIZhQGpgV2hUhE28alQCBf/fm5oqrl0Hj0rDKH/v+yv6efHHrfAQ
-UySQi2bJqIirr1qjAOm+ukbuW3N7LBeCgV5iLKECZbO9xSsAfsT8AzNXDe3i+s5d
-RdY4zTW2ssHQnIFKquSyAVwdj1+ZxLGt24gh65AIgoDzMKND5pCCrlUoSe1b16kQ
-OA7+j0xbm0bqQfWwCHTD0IgztnzXdN/chNFDDnU5oSVAKOp4yw4sLjmdjItuFhwv
-JoIQ4uNllAoEwF73XVv4EOLQunpL+943AAAaWyjj0pxzPjKHmKHJUS/X3qwzs08C
-AwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAcYwHQYDVR0O
-BBYEFOCMm9slSbPxfIbWskKHC9BroNnkMA0GCSqGSIb3DQEBBQUAA4IBAQA+0hyJ
-LjX8+HXd5n9liPRyTMks1zJO890ZeUe9jjtbkw9QSSQTaxQGcu8J06Gh40CEyecY
-MnQ8SG4Pn0vU9x7Tk4ZkVJdjclDVVc/6IJMCopvDI5NOFlV2oHB5bc0hH88vLbwZ
-44gx+FkagQnIl6Z0x2DEW8xXjrJ1/RsCCdtZb3KTafcxQdaIOL+Hsr0Wefmq5L6I
-Jd1hJyMctTEHBDa0GpC9oHRxUIltvBTjD4au8as+x6AJzKNI0eDbZOeStc+vckNw
-i/nDhDwTqn6Sm1dTk/pwwpEOMfmbZ13pljheX7NzTogVZ96edhBiIL5VaZVDADlN
-9u6wWk5JRFRYX0KD
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIGnTCCBIWgAwIBAgICBcYwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0x
-GTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJv
-b3QgQ0EgMzAeFw0wNjExMjQxOTExMjNaFw0zMTExMjQxOTA2NDRaMEUxCzAJBgNV
-BAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMRswGQYDVQQDExJRdW9W
-YWRpcyBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDM
-V0IWVJzmmNPTTe7+7cefQzlKZbPoFog02w1ZkXTPkrgEQK0CSzGrvI2RaNggDhoB
-4hp7Thdd4oq3P5kazethq8Jlph+3t723j/z9cI8LoGe+AaJZz3HmDyl2/7FWeUUr
-H556VOijKTVopAFPD6QuN+8bv+OPEKhyq1hX51SGyMnzW9os2l2ObjyjPtr7guXd
-8lyyBTNvijbO0BNO/79KDDRMpsMhvVAEVeuxu537RR5kFd5VAYwCdrXLoT9Cabwv
-vWhDFlaJKjdhkf2mrk7AyxRllDdLkgbvBNDInIjbC3uBr7E9KsRlOni27tyAsdLT
-mZw67mtaa7ONt9XOnMK+pUsvFrGeaDsGb659n/je7Mwpp5ijJUMv7/FfJuGITfhe
-btfZFG4ZM2mnO4SJk8RTVROhUXhA+LjJou57ulJCg54U7QVSWllWp5f8nT8KKdjc
-T5EOE7zelaTfi5m+rJsziO+1ga8bxiJTyPbH7pcUsMV8eFLI8M5ud2CEpukqdiDt
-WAEXMJPpGovgc2PZapKUSU60rUqFxKMiMPwJ7Wgic6aIDFUhWMXhOp8q3crhkODZ
-c6tsgLjoC2SToJyMGf+z0gzskSaHirOi4XCPLArlzW1oUevaPwV/izLmE1xr/l9A
-4iLItLRkT9a6fUg+qGkM17uGcclzuD87nSVL2v9A6wIDAQABo4IBlTCCAZEwDwYD
-VR0TAQH/BAUwAwEB/zCB4QYDVR0gBIHZMIHWMIHTBgkrBgEEAb5YAAMwgcUwgZMG
-CCsGAQUFBwICMIGGGoGDQW55IHVzZSBvZiB0aGlzIENlcnRpZmljYXRlIGNvbnN0
-aXR1dGVzIGFjY2VwdGFuY2Ugb2YgdGhlIFF1b1ZhZGlzIFJvb3QgQ0EgMyBDZXJ0
-aWZpY2F0ZSBQb2xpY3kgLyBDZXJ0aWZpY2F0aW9uIFByYWN0aWNlIFN0YXRlbWVu
-dC4wLQYIKwYBBQUHAgEWIWh0dHA6Ly93d3cucXVvdmFkaXNnbG9iYWwuY29tL2Nw
-czALBgNVHQ8EBAMCAQYwHQYDVR0OBBYEFPLAE+CCQz777i9nMpY1XNu4ywLQMG4G
-A1UdIwRnMGWAFPLAE+CCQz777i9nMpY1XNu4ywLQoUmkRzBFMQswCQYDVQQGEwJC
-TTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDEbMBkGA1UEAxMSUXVvVmFkaXMg
-Um9vdCBDQSAzggIFxjANBgkqhkiG9w0BAQUFAAOCAgEAT62gLEz6wPJv92ZVqyM0
-7ucp2sNbtrCD2dDQ4iH782CnO11gUyeim/YIIirnv6By5ZwkajGxkHon24QRiSem
-d1o417+shvzuXYO8BsbRd2sPbSQvS3pspweWyuOEn62Iix2rFo1bZhfZFvSLgNLd
-+LJ2w/w4E6oM3kJpK27zPOuAJ9v1pkQNn1pVWQvVDVJIxa6f8i+AxeoyUDUSly7B
-4f/xI4hROJ/yZlZ25w9Rl6VSDE1JUZU2Pb+iSwwQHYaZTKrzchGT5Or2m9qoXadN
-t54CrnMAyNojA+j56hl0YgCUyyIgvpSnWbWCar6ZeXqp8kokUvd0/bpO5qgdAm6x
-DYBEwa7TIzdfu4V8K5Iu6H6li92Z4b8nby1dqnuH/grdS/yO9SbkbnBCbjPsMZ57
-k8HkyWkaPcBrTiJt7qtYTcbQQcEr6k8Sh17rRdhs9ZgC06DYVYoGmRmioHfRMJ6s
-zHXug/WwYjnPbFfiTNKRCw51KBuav/0aQ/HKd/s7j2G4aSgWQgRecCocIdiP4b0j
-Wy10QJLZYxkNc91pvGJHvOB0K7Lrfb5BG7XARsWhIstfTsEokt4YutUqKLsRixeT
-mJlglFwjz1onl14LBQaTNx47aTbrqZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK
-4SVhM7JZG+Ju1zdXtg2pEto=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDVTCCAj2gAwIBAgIESTMAATANBgkqhkiG9w0BAQUFADAyMQswCQYDVQQGEwJD
-TjEOMAwGA1UEChMFQ05OSUMxEzARBgNVBAMTCkNOTklDIFJPT1QwHhcNMDcwNDE2
-MDcwOTE0WhcNMjcwNDE2MDcwOTE0WjAyMQswCQYDVQQGEwJDTjEOMAwGA1UEChMF
-Q05OSUMxEzARBgNVBAMTCkNOTklDIFJPT1QwggEiMA0GCSqGSIb3DQEBAQUAA4IB
-DwAwggEKAoIBAQDTNfc/c3et6FtzF8LRb+1VvG7q6KR5smzDo+/hn7E7SIX1mlwh
-IhAsxYLO2uOabjfhhyzcuQxauohV3/2q2x8x6gHx3zkBwRP9SFIhxFXf2tizVHa6
-dLG3fdfA6PZZxU3Iva0fFNrfWEQlMhkqx35+jq44sDB7R3IJMfAw28Mbdim7aXZO
-V/kbZKKTVrdvmW7bCgScEeOAH8tjlBAKqeFkgjH5jCftppkA9nCTGPihNIaj3XrC
-GHn2emU1z5DrvTOTn1OrczvmmzQgLx3vqR1jGqCA2wMv+SYahtKNu6m+UjqHZ0gN
-v7Sg2Ca+I19zN38m5pIEo3/PIKe38zrKy5nLAgMBAAGjczBxMBEGCWCGSAGG+EIB
-AQQEAwIABzAfBgNVHSMEGDAWgBRl8jGtKvf33VKWCscCwQ7vptU7ETAPBgNVHRMB
-Af8EBTADAQH/MAsGA1UdDwQEAwIB/jAdBgNVHQ4EFgQUZfIxrSr3991SlgrHAsEO
-76bVOxEwDQYJKoZIhvcNAQEFBQADggEBAEs17szkrr/Dbq2flTtLP1se31cpolnK
-OOK5Gv+e5m4y3R6u6jW39ZORTtpC4cMXYFDy0VwmuYK36m3knITnA3kXr5g9lNvH
-ugDnuL8BV8F3RTIMO/G0HAiw/VGgod2aHRM2mm23xzy54cXZF/qD1T0VoDy7Hgvi
-yJA/qIYM/PmLXoXLT1tLYhFHxUV8BS9BsZ4QaRuZluBVeftOhpm4lNqGOGqTo+fL
-buXf6iFViZx9fX+Y9QCJ7uOEwFyWtcVG6kbghVW2G8kS1sHNzYDzAgE8yGnLRUhj
-2JTQ7IUOO04RZfSCjKY9ri4ilAnIXOo8gV0WKgOXFlUJ24pBgp5mmxE=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT
-MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
-YWwgQ0EwHhcNMDIwNTIxMDQwMDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQG
-EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMSR2VvVHJ1c3Qg
-R2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD9
-9BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjoBbdq
-fnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDv
-iS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU
-1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+
-bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5aszPeE4uwc2hGKceeoW
-MPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTA
-ephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVkDBF9qn1l
-uMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKIn
-Z57QzxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfS
-tQWVYrmm3ok9Nns4d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcF
-PseKUgzbFbS9bZvlxrFUaKnjaZC2mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Un
-hw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6pXE0zX5IJL4hmXXeXxx12E6nV
-5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvmMw==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDyzCCArOgAwIBAgIDAOJIMA0GCSqGSIb3DQEBBQUAMIGLMQswCQYDVQQGEwJB
-VDFIMEYGA1UECgw/QS1UcnVzdCBHZXMuIGYuIFNpY2hlcmhlaXRzc3lzdGVtZSBp
-bSBlbGVrdHIuIERhdGVudmVya2VociBHbWJIMRgwFgYDVQQLDA9BLVRydXN0LVF1
-YWwtMDIxGDAWBgNVBAMMD0EtVHJ1c3QtUXVhbC0wMjAeFw0wNDEyMDIyMzAwMDBa
-Fw0xNDEyMDIyMzAwMDBaMIGLMQswCQYDVQQGEwJBVDFIMEYGA1UECgw/QS1UcnVz
-dCBHZXMuIGYuIFNpY2hlcmhlaXRzc3lzdGVtZSBpbSBlbGVrdHIuIERhdGVudmVy
-a2VociBHbWJIMRgwFgYDVQQLDA9BLVRydXN0LVF1YWwtMDIxGDAWBgNVBAMMD0Et
-VHJ1c3QtUXVhbC0wMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJaR
-q9eOsFm4Ab20Hq2Z/aH86gyWa48uSUjY6eQkguHYuszr3gdcSMYZggFHQgnhfLmf
-ro/27l5rqKhWiDhWs+b+yZ1PNDhRPJy+86ycHMg9XJqErveULBSyZDdgjhSwOyrN
-ibUir/fkf+4sKzP5jjytTKJXD/uCxY4fAd9TjMEVpN3umpIS0ijpYhclYDHvzzGU
-833z5Dwhq5D8bc9jp8YSAHFJ1xzIoO1jmn3jjyjdYPnY5harJtHQL73nDQnfbtTs
-5ThT9GQLulrMgLU4WeyAWWWEMWpfVZFMJOUkmoOEer6A8e5fIAeqdxdsC+JVqpZ4
-CAKel/Arrlj1gFA//jsCAwEAAaM2MDQwDwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4E
-CgQIQj0rJKbBRc4wDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQBG
-yxFjUA2bPkXUSC2SfJ29tmrbiLKal+g6a9M8Xwd+Ejo+oYkNP6F4GfeDtAXpm7xb
-9Ly8lhdbHcpRhzCUQHJ1tBCiGdLgmhSx7TXjhhanKOdDgkdsC1T+++piuuYL72TD
-gUy2Sb1GHlJ1Nc6rvB4fpxSDAOHqGpUq9LWsc3tFkXqRqmQVtqtR77npKIFBioc6
-2jTBwDMPX3hDJDR1DSPc6BnZliaNw2IHdiMQ0mBoYeRnFdq+TyDKsjmJOOQPLzzL
-/saaw6F891+gBjLFEFquDyR73lAPJS279R3csi8WWk4ZYUC/1V8H3Ktip/J6ac8e
-qhLCbmJ81Lo92JGHz/ot
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJ
-RTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYD
-VQQDExlCYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoX
-DTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMCSUUxEjAQBgNVBAoTCUJhbHRpbW9y
-ZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFsdGltb3JlIEN5YmVy
-VHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKMEuyKr
-mD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjr
-IZ3AQSsBUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeK
-mpYcqWe4PwzV9/lSEy/CG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSu
-XmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9XbIGevOF6uvUA65ehD5f/xXtabz5OTZy
-dc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjprl3RjM71oGDHweI12v/ye
-jl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoIVDaGezq1
-BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3
-DQEBBQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT92
-9hkTI7gQCvlYpNRhcL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3Wgx
-jkzSswF07r51XgdIGn9w/xZchMB5hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0
-Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsaY71k5h+3zvDyny67G7fyUIhz
-ksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9HRCwBXbsdtTLS
-R9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMC
-VVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0
-Lm5ldC9DUFMgaXMgaW5jb3Jwb3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMW
-KGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsGA1UEAxMkRW50cnVzdCBSb290IENl
-cnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0MloXDTI2MTEyNzIw
-NTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMTkw
-NwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29ycG9yYXRlZCBieSBy
-ZWZlcmVuY2UxHzAdBgNVBAsTFihjKSAyMDA2IEVudHJ1c3QsIEluYy4xLTArBgNV
-BAMTJEVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASIwDQYJ
-KoZIhvcNAQEBBQADggEPADCCAQoCggEBALaVtkNC+sZtKm9I35RMOVcF7sN5EUFo
-Nu3s/poBj6E4KPz3EEZmLk0eGrEaTsbRwJWIsMn/MYszA9u3g3s+IIRe7bJWKKf4
-4LlAcTfFy0cOlypowCKVYhXbR9n10Cv/gkvJrT7eTNuQgFA/CYqEAOwwCj0Yzfv9
-KlmaI5UXLEWeH25DeW0MXJj+SKfFI0dcXv1u5x609mhF0YaDW6KKjbHjKYD+JXGI
-rb68j6xSlkuqUY3kEzEZ6E5Nn9uss2rVvDlUccp6en+Q3X0dgNmBu1kmwhH+5pPi
-94DkZfs0Nw4pgHBNrziGLp5/V6+eF67rHMsoIV+2HNjnogQi+dPa2MsCAwEAAaOB
-sDCBrTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zArBgNVHRAEJDAi
-gA8yMDA2MTEyNzIwMjM0MlqBDzIwMjYxMTI3MjA1MzQyWjAfBgNVHSMEGDAWgBRo
-kORnpKZTgMeGZqTx90tD+4S9bTAdBgNVHQ4EFgQUaJDkZ6SmU4DHhmak8fdLQ/uE
-vW0wHQYJKoZIhvZ9B0EABBAwDhsIVjcuMTo0LjADAgSQMA0GCSqGSIb3DQEBBQUA
-A4IBAQCT1DCw1wMgKtD5Y+iRDAUgqV8ZyntyTtSx29CW+1RaGSwMCPeyvIWonX9t
-O1KzKtvn1ISMY/YPyyYBkVBs9F8U4pN0wBOeMDpQ47RgxRzwIkSNcUesyBrJ6Zua
-AGAT/3B+XxFNSRuzFVJ7yVTav52Vr2ua2J7p8eRDjeIRRDq/r72DQnNSi6q7pynP
-9WQcCk3RvKqsnyrQ/39/2n3qse0wJcGE2jTSW3iDVuycNsMm4hH2Z0kdkquM++v/
-eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0tHuu2guQOHXvgR1m
-0vdXcDazv/wor3ElhVsT/h5/WrQ8
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIICpzCCAi2gAwIBAgIQTHm1miicdjFk9YlE0JEC3jAKBggqhkjOPQQDAzCBlDEL
-MAkGA1UEBhMCVVMxHTAbBgNVBAoTFFN5bWFudGVjIENvcnBvcmF0aW9uMR8wHQYD
-VQQLExZTeW1hbnRlYyBUcnVzdCBOZXR3b3JrMUUwQwYDVQQDEzxTeW1hbnRlYyBD
-bGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0g
-RzQwHhcNMTIxMDE4MDAwMDAwWhcNMzcxMjAxMjM1OTU5WjCBlDELMAkGA1UEBhMC
-VVMxHTAbBgNVBAoTFFN5bWFudGVjIENvcnBvcmF0aW9uMR8wHQYDVQQLExZTeW1h
-bnRlYyBUcnVzdCBOZXR3b3JrMUUwQwYDVQQDEzxTeW1hbnRlYyBDbGFzcyAzIFB1
-YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzQwdjAQBgcq
-hkjOPQIBBgUrgQQAIgNiAARXz+qzOU0/oSHgbi84csaHl/OFC0fnD1HI0fSZm8pZ
-Zf9M+eoLtyXV0vbsMS0yYhLXdoan+jjJZdT+c+KEOfhMSWIT3brViKBfPchPsD+P
-oVAR5JNGrcNfy/GkapVW6MCjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8E
-BTADAQH/MB0GA1UdDgQWBBQknbzScfcdwiW+IvGJpSwVOzQeXjAKBggqhkjOPQQD
-AwNoADBlAjEAuWZoZdsF0Dh9DvPIdWG40CjEsUozUVj78jwQyK5HeHbKZiQXhj5Q
-Vm6lLZmIuL0kAjAD6qfnqDzqnWLGX1TamPR3vU+PGJyRXEdrQE0QHbPhicoLIsga
-xcX+i93B3294n5E=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBs
-MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
-d3cuZGlnaWNlcnQuY29tMSswKQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5j
-ZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAwMFoXDTMxMTExMDAwMDAwMFowbDEL
-MAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3
-LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFuY2Ug
-RVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm
-+9S75S0tMqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTW
-PNt0OKRKzE0lgvdKpVMSOO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEM
-xChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFB
-Ik5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQNAQTXKFx01p8VdteZOE3
-hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUeh10aUAsg
-EsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQF
-MAMBAf8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaA
-FLE+w2kD+L9HAdSYJhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3Nec
-nzyIZgYIVyHbIUf4KmeqvxgydkAQV8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6z
-eM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFpmyPInngiK3BD41VHMWEZ71jF
-hS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkKmNEVX58Svnw2
-Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe
-vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep
-+OkuE6N36B9K
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIGHDCCBASgAwIBAgIES45gAzANBgkqhkiG9w0BAQsFADBFMQswCQYDVQQGEwJE
-SzESMBAGA1UEChMJVFJVU1QyNDA4MSIwIAYDVQQDExlUUlVTVDI0MDggT0NFUyBQ
-cmltYXJ5IENBMB4XDTEwMDMwMzEyNDEzNFoXDTM3MTIwMzEzMTEzNFowRTELMAkG
-A1UEBhMCREsxEjAQBgNVBAoTCVRSVVNUMjQwODEiMCAGA1UEAxMZVFJVU1QyNDA4
-IE9DRVMgUHJpbWFyeSBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIB
-AJlJodr3U1Fa+v8HnyACHV81/wLevLS0KUk58VIABl6Wfs3LLNoj5soVAZv4LBi5
-gs7E8CZ9w0F2CopW8vzM8i5HLKE4eedPdnaFqHiBZ0q5aaaQArW+qKJx1rT/AaXt
-alMB63/yvJcYlXS2lpexk5H/zDBUXeEQyvfmK+slAySWT6wKxIPDwVapauFY9QaG
-+VBhCa5jBstWS7A5gQfEvYqn6csZ3jW472kW6OFNz6ftBcTwufomGJBMkonf4ZLr
-6t0AdRi9jflBPz3MNNRGxyjIuAmFqGocYFA/OODBRjvSHB2DygqQ8k+9tlpvzMRr
-kU7jq3RKL+83G1dJ3/LTjCLz4ryEMIC/OJ/gNZfE0qXddpPtzflIPtUFVffXdbFV
-1t6XZFhJ+wBHQCpJobq/BjqLWUA86upsDbfwnePtmIPRCemeXkY0qabC+2Qmd2Fe
-xyZphwTyMnbqy6FG1tB65dYf3mOqStmLa3RcHn9+2dwNfUkh0tjO2FXD7drWcU0O
-I9DW8oAypiPhm/QCjMU6j6t+0pzqJ/S0tdAo+BeiXK5hwk6aR+sRb608QfBbRAs3
-U/q8jSPByenggac2BtTN6cl+AA1Mfcgl8iXWNFVGegzd/VS9vINClJCe3FNVoUnR
-YCKkj+x0fqxvBLopOkJkmuZw/yhgMxljUi2qYYGn90OzAgMBAAGjggESMIIBDjAP
-BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjARBgNVHSAECjAIMAYGBFUd
-IAAwgZcGA1UdHwSBjzCBjDAsoCqgKIYmaHR0cDovL2NybC5vY2VzLnRydXN0MjQw
-OC5jb20vb2Nlcy5jcmwwXKBaoFikVjBUMQswCQYDVQQGEwJESzESMBAGA1UEChMJ
-VFJVU1QyNDA4MSIwIAYDVQQDExlUUlVTVDI0MDggT0NFUyBQcmltYXJ5IENBMQ0w
-CwYDVQQDEwRDUkwxMB8GA1UdIwQYMBaAFPZt+LFIs0FDAduGROUYBbdezAY3MB0G
-A1UdDgQWBBT2bfixSLNBQwHbhkTlGAW3XswGNzANBgkqhkiG9w0BAQsFAAOCAgEA
-VPAQGrT7dIjD3/sIbQW86f9CBPu0c7JKN6oUoRUtKqgJ2KCdcB5ANhCoyznHpu3m
-/dUfVUI5hc31CaPgZyY37hch1q4/c9INcELGZVE/FWfehkH+acpdNr7j8UoRZlkN
-15b/0UUBfGeiiJG/ugo4llfoPrp8bUmXEGggK3wyqIPcJatPtHwlb6ympfC2b/Ld
-v/0IdIOzIOm+A89Q0utx+1cOBq72OHy8gpGb6MfncVFMoL2fjP652Ypgtr8qN9Ka
-/XOazktiIf+2Pzp7hLi92hRc9QMYexrV/nnFSQoWdU8TqULFUoZ3zTEC3F/g2yj+
-FhbrgXHGo5/A4O74X+lpbY2XV47aSuw+DzcPt/EhMj2of7SA55WSgbjPMbmNX0rb
-oenSIte2HRFW5Tr2W+qqkc/StixgkKdyzGLoFx/xeTWdJkZKwyjqge2wJqws2upY
-EiThhC497+/mTiSuXd69eVUwKyqYp9SD2rTtNmF6TCghRM/dNsJOl+osxDVGcwvt
-WIVFF/Onlu5fu1NHXdqNEfzldKDUvCfii3L2iATTZyHwU9CALE+2eIA+PIaLgnM1
-1oCfUnYBkQurTrihvzz9PryCVkLxiqRmBVvUz+D4N5G/wvvKDS6t6cPCS+hqM482
-cbBsn0R9fFLO4El62S9eH1tqOzO20OAOK65yJIsOpSE=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEY
-MBYGA1UEChMPU0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21t
-dW5pY2F0aW9uIFJvb3RDQTEwHhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5
-WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMPU0VDT00gVHJ1c3QubmV0MScwJQYD
-VQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEwggEiMA0GCSqGSIb3
-DQEBAQUAA4IBDwAwggEKAoIBAQCzs/5/022x7xZ8V6UMbXaKL0u/ZPtM7orw8yl8
-9f/uKuDp6bpbZCKamm8sOiZpUQWZJtzVHGpxxpp9Hp3dfGzGjGdnSj74cbAZJ6kJ
-DKaVv0uMDPpVmDvY6CKhS3E4eayXkmmziX7qIWgGmBSWh9JhNrxtJ1aeV+7AwFb9
-Ms+k2Y7CI9eNqPPYJayX5HA49LY6tJ07lyZDo6G8SVlyTCMwhwFY9k6+HGhWZq/N
-QV3Is00qVUarH9oe4kA92819uZKAnDfdDJZkndwi92SL32HeFZRSFaB9UslLqCHJ
-xrHty8OVYNEP8Ktw+N/LTX7s1vqr2b1/VPKl6Xn62dZ2JChzAgMBAAGjPzA9MB0G
-A1UdDgQWBBSgc0mZaNyFW2XjmygvV5+9M7wHSDALBgNVHQ8EBAMCAQYwDwYDVR0T
-AQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaECpqLvkT115swW1F7NgE+vG
-kl3g0dNq/vu+m22/xwVtWSDEHPC32oRYAmP6SBbvT6UL90qY8j+eG61Ha2POCEfr
-Uj94nK9NrvjVT8+amCoQQTlSxN3Zmw7vkwGusi7KaEIkQmywszo+zenaSMQVy+n5
-Bw+SUEmK3TGXX8npN6o7WWWXlDLJs58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJU
-JRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ6rBK+1YWc26sTfcioU+tHXot
-RSflMMFe8toTyyVCUZVHA4xsIcx0Qu1T/zOLjw9XARYvz6buyXAiFL39vmwLAw==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIICkDCCAfmgAwIBAgIBATANBgkqhkiG9w0BAQQFADBaMQswCQYDVQQGEwJVUzEc
-MBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5jLjEtMCsGA1UEAxMkRXF1aWZheCBT
-ZWN1cmUgR2xvYmFsIGVCdXNpbmVzcyBDQS0xMB4XDTk5MDYyMTA0MDAwMFoXDTIw
-MDYyMTA0MDAwMFowWjELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0VxdWlmYXggU2Vj
-dXJlIEluYy4xLTArBgNVBAMTJEVxdWlmYXggU2VjdXJlIEdsb2JhbCBlQnVzaW5l
-c3MgQ0EtMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuucXkAJlsTRVPEnC
-UdXfp9E3j9HngXNBUmCbnaEXJnitx7HoJpQytd4zjTov2/KaelpzmKNc6fuKcxtc
-58O/gGzNqfTWK8D3+ZmqY6KxRwIP1ORROhI8bIpaVIRw28HFkM9yRcuoWcDNM50/
-o5brhTMhHD4ePmBudpxnhcXIw2ECAwEAAaNmMGQwEQYJYIZIAYb4QgEBBAQDAgAH
-MA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUvqigdHJQa0S3ySPY+6j/s1dr
-aGwwHQYDVR0OBBYEFL6ooHRyUGtEt8kj2Puo/7NXa2hsMA0GCSqGSIb3DQEBBAUA
-A4GBADDiAVGqx+pf2rnQZQ8w1j7aDRRJbpGTJxQx78T3LUX47Me/okENI7SS+RkA
-Z70Br83gcfxaz2TE4JaY0KNA4gGK7ycH8WUBikQtBmV1UsCGECAhX2xrD2yuCRyv
-8qIYNMR1pHMc8Y3c7635s3a0kr/clRAevsvIO1qEYBlWlKlV
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIF5zCCA8+gAwIBAgIITK9zQhyOdAIwDQYJKoZIhvcNAQEFBQAwgYAxODA2BgNV
-BAMML0VCRyBFbGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sx
-c8SxMTcwNQYDVQQKDC5FQkcgQmlsacWfaW0gVGVrbm9sb2ppbGVyaSB2ZSBIaXpt
-ZXRsZXJpIEEuxZ4uMQswCQYDVQQGEwJUUjAeFw0wNjA4MTcwMDIxMDlaFw0xNjA4
-MTQwMDMxMDlaMIGAMTgwNgYDVQQDDC9FQkcgRWxla3Ryb25payBTZXJ0aWZpa2Eg
-SGl6bWV0IFNhxJ9sYXnEsWPEsXPEsTE3MDUGA1UECgwuRUJHIEJpbGnFn2ltIFRl
-a25vbG9qaWxlcmkgdmUgSGl6bWV0bGVyaSBBLsWeLjELMAkGA1UEBhMCVFIwggIi
-MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDuoIRh0DpqZhAy2DE4f6en5f2h
-4fuXd7hxlugTlkaDT7byX3JWbhNgpQGR4lvFzVcfd2NR/y8927k/qqk153nQ9dAk
-tiHq6yOU/im/+4mRDGSaBUorzAzu8T2bgmmkTPiab+ci2hC6X5L8GCcKqKpE+i4s
-tPtGmggDg3KriORqcsnlZR9uKg+ds+g75AxuetpX/dfreYteIAbTdgtsApWjluTL
-dlHRKJ2hGvxEok3MenaoDT2/F08iiFD9rrbskFBKW5+VQarKD7JK/oCZTqNGFav4
-c0JqwmZ2sQomFd2TkuzbqV9UIlKRcF0T6kjsbgNs2d1s/OsNA/+mgxKb8amTD8Um
-TDGyY5lhcucqZJnSuOl14nypqZoaqsNW2xCaPINStnuWt6yHd6i58mcLlEOzrz5z
-+kI2sSXFCjEmN1ZnuqMLfdb3ic1nobc6HmZP9qBVFCVMLDMNpkGMvQQxahByCp0O
-Lna9XvNRiYuoP1Vzv9s6xiQFlpJIqkuNKgPlV5EQ9GooFW5Hd4RcUXSfGenmHmMW
-OeMRFeNYGkS9y8RsZteEBt8w9DeiQyJ50hBs37vmExH8nYQKE3vwO9D8owrXieqW
-fo1IhR5kX9tUoqzVegJ5a9KK8GfaZXINFHDk6Y54jzJ0fFfy1tb0Nokb+Clsi7n2
-l9GkLqq+CxnCRelwXQIDAJ3Zo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB
-/wQEAwIBBjAdBgNVHQ4EFgQU587GT/wWZ5b6SqMHwQSny2re2kcwHwYDVR0jBBgw
-FoAU587GT/wWZ5b6SqMHwQSny2re2kcwDQYJKoZIhvcNAQEFBQADggIBAJuYml2+
-8ygjdsZs93/mQJ7ANtyVDR2tFcU22NU57/IeIl6zgrRdu0waypIN30ckHrMk2pGI
-6YNw3ZPX6bqz3xZaPt7gyPvT/Wwp+BVGoGgmzJNSroIBk5DKd8pNSe/iWtkqvTDO
-TLKBtjDOWU/aWR1qeqRFsIImgYZ29fUQALjuswnoT4cCB64kXPBfrAowzIpAoHME
-wfuJJPaaHFy3PApnNgUIMbOv2AFoKuB4j3TeuFGkjGwgPaL7s9QJ/XvCgKqTbCmY
-Iai7FvOpEl90tYeY8pUm3zTvilORiF0alKM/fCL414i6poyWqD1SNGKfAB5UVUJn
-xk1Gj7sURT0KlhaOEKGXmdXTMIXM3rRyt7yKPBgpaP3ccQfuJDlq+u2lrDgv+R4Q
-DgZxGhBM/nV+/x5XOULK1+EVoVZVWRvRo68R2E7DpSvvkL/A7IITW43WciyTTo9q
-Kd+FPNMN4KIYEsxVL0e3p5sC/kH2iExt2qkBR4NkJ2IQgtYSe14DHzSpyZH+r11t
-hie3I6p1GMog57AP14kOpmciY/SDQSsGS7tY1dHXt7kQY9iJSrSq3RZj9W6+YKH4
-7ejWkE8axsWgKdOnIaj1Wjz3x0miIZpKlVIglnKaZsv30oZDfCK+lvm9AahH3eU7
-QPl1K5srRmSGjR70j/sHd9DqSaIcjVIUpgqT
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFFzCCA/+gAwIBAgIBETANBgkqhkiG9w0BAQUFADCCASsxCzAJBgNVBAYTAlRS
-MRgwFgYDVQQHDA9HZWJ6ZSAtIEtvY2FlbGkxRzBFBgNVBAoMPlTDvHJraXllIEJp
-bGltc2VsIHZlIFRla25vbG9qaWsgQXJhxZ90xLFybWEgS3VydW11IC0gVMOcQsSw
-VEFLMUgwRgYDVQQLDD9VbHVzYWwgRWxla3Ryb25payB2ZSBLcmlwdG9sb2ppIEFy
-YcWfdMSxcm1hIEVuc3RpdMO8c8O8IC0gVUVLQUUxIzAhBgNVBAsMGkthbXUgU2Vy
-dGlmaWthc3lvbiBNZXJrZXppMUowSAYDVQQDDEFUw5xCxLBUQUsgVUVLQUUgS8O2
-ayBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsSAtIFPDvHLDvG0gMzAe
-Fw0wNzA4MjQxMTM3MDdaFw0xNzA4MjExMTM3MDdaMIIBKzELMAkGA1UEBhMCVFIx
-GDAWBgNVBAcMD0dlYnplIC0gS29jYWVsaTFHMEUGA1UECgw+VMO8cmtpeWUgQmls
-aW1zZWwgdmUgVGVrbm9sb2ppayBBcmHFn3TEsXJtYSBLdXJ1bXUgLSBUw5xCxLBU
-QUsxSDBGBgNVBAsMP1VsdXNhbCBFbGVrdHJvbmlrIHZlIEtyaXB0b2xvamkgQXJh
-xZ90xLFybWEgRW5zdGl0w7xzw7wgLSBVRUtBRTEjMCEGA1UECwwaS2FtdSBTZXJ0
-aWZpa2FzeW9uIE1lcmtlemkxSjBIBgNVBAMMQVTDnELEsFRBSyBVRUtBRSBLw7Zr
-IFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxIC0gU8O8csO8bSAzMIIB
-IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAim1L/xCIOsP2fpTo6iBkcK4h
-gb46ezzb8R1Sf1n68yJMlaCQvEhOEav7t7WNeoMojCZG2E6VQIdhn8WebYGHV2yK
-O7Rm6sxA/OOqbLLLAdsyv9Lrhc+hDVXDWzhXcLh1xnnRFDDtG1hba+818qEhTsXO
-fJlfbLm4IpNQp81McGq+agV/E5wrHur+R84EpW+sky58K5+eeROR6Oqeyjh1jmKw
-lZMq5d/pXpduIF9fhHpEORlAHLpVK/swsoHvhOPc7Jg4OQOFCKlUAwUp8MmPi+oL
-hmUZEdPpCSPeaJMDyTYcIW7OjGbxmTDY17PDHfiBLqi9ggtm/oLL4eAagsNAgQID
-AQABo0IwQDAdBgNVHQ4EFgQUvYiHyY/2pAoLquvF/pEjnatKijIwDgYDVR0PAQH/
-BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAB18+kmP
-NOm3JpIWmgV050vQbTlswyb2zrgxvMTfvCr4N5EY3ATIZJkrGG2AA1nJrvhY0D7t
-wyOfaTyGOBye79oneNGEN3GKPEs5z35FBtYt2IpNeBLWrcLTy9LQQfMmNkqblWwM
-7uXRQydmwYj3erMgbOqwaSvHIOgMA8RBBZniP+Rr+KCGgceExh/VS4ESshYhLBOh
-gLJeDEoTniDYYkCrkOpkSi+sDQESeUWoL4cZaMjihccwsnX5OD+ywJO0a+IDRM5n
-oN+J1q2MdqMTw5RhK2vZbMEHCiIHhWyFJEapvj+LeISCfiQMnf2BN+MlqO02TpUs
-yZyQ2uypQjyttgI=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEPTCCAyWgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBvzE/MD0GA1UEAww2VMOc
-UktUUlVTVCBFbGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sx
-c8SxMQswCQYDVQQGEwJUUjEPMA0GA1UEBwwGQW5rYXJhMV4wXAYDVQQKDFVUw5xS
-S1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnEn2kg
-SGl6bWV0bGVyaSBBLsWeLiAoYykgQXJhbMSxayAyMDA3MB4XDTA3MTIyNTE4Mzcx
-OVoXDTE3MTIyMjE4MzcxOVowgb8xPzA9BgNVBAMMNlTDnFJLVFJVU1QgRWxla3Ry
-b25payBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsTELMAkGA1UEBhMC
-VFIxDzANBgNVBAcMBkFua2FyYTFeMFwGA1UECgxVVMOcUktUUlVTVCBCaWxnaSDE
-sGxldGnFn2ltIHZlIEJpbGnFn2ltIEfDvHZlbmxpxJ9pIEhpem1ldGxlcmkgQS7F
-ni4gKGMpIEFyYWzEsWsgMjAwNzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
-ggEBAKu3PgqMyKVYFeaK7yc9SrToJdPNM8Ig3BnuiD9NYvDdE3ePYakqtdTyuTFY
-KTsvP2qcb3N2Je40IIDu6rfwxArNK4aUyeNgsURSsloptJGXg9i3phQvKUmi8wUG
-+7RP2qFsmmaf8EMJyupyj+sA1zU511YXRxcw9L6/P8JorzZAwan0qafoEGsIiveG
-HtyaKhUG9qPw9ODHFNRRf8+0222vR5YXm3dx2KdxnSQM9pQ/hTEST7ruToK4uT6P
-IzdezKKqdfcYbwnTrqdUKDT74eA7YH2gvnmJhsifLfkKS8RQouf9eRbHegsYz85M
-733WB2+Y8a+xwXrXgTW4qhe04MsCAwEAAaNCMEAwHQYDVR0OBBYEFCnFkKslrxHk
-Yb+j/4hhkeYO/pyBMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0G
-CSqGSIb3DQEBBQUAA4IBAQAQDdr4Ouwo0RSVgrESLFF6QSU2TJ/sPx+EnWVUXKgW
-AkD6bho3hO9ynYYKVZ1WKKxmLNA6VpM0ByWtCLCPyA8JWcqdmBzlVPi5RX9ql2+I
-aE1KBiY3iAIOtsbWcpnOa3faYjGkVh+uX4132l32iPwa2Z61gfAyuOOI0JzzaqC5
-mxRZNTZPz/OOXl0XrRWV2N2y1RVuAE6zS89mlOTgzbUF2mNXi+WzqtvALhyQRNsa
-XRik7r4EW5nVcV9VZWRi1aKbBFmGyGJ353yCRWo9F7/snXUMrqNvWtMvmDb08PUZ
-qxFdyKbjKlhqQgnDvZImZjINXQhVdP+MmNAKpoRq0Tl9
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEYDCCA0igAwIBAgICATAwDQYJKoZIhvcNAQELBQAwWTELMAkGA1UEBhMCVVMx
-GDAWBgNVBAoTD1UuUy4gR292ZXJubWVudDENMAsGA1UECxMERlBLSTEhMB8GA1UE
-AxMYRmVkZXJhbCBDb21tb24gUG9saWN5IENBMB4XDTEwMTIwMTE2NDUyN1oXDTMw
-MTIwMTE2NDUyN1owWTELMAkGA1UEBhMCVVMxGDAWBgNVBAoTD1UuUy4gR292ZXJu
-bWVudDENMAsGA1UECxMERlBLSTEhMB8GA1UEAxMYRmVkZXJhbCBDb21tb24gUG9s
-aWN5IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2HX7NRY0WkG/
-Wq9cMAQUHK14RLXqJup1YcfNNnn4fNi9KVFmWSHjeavUeL6wLbCh1bI1FiPQzB6+
-Duir3MPJ1hLXp3JoGDG4FyKyPn66CG3G/dFYLGmgA/Aqo/Y/ISU937cyxY4nsyOl
-4FKzXZbpsLjFxZ+7xaBugkC7xScFNknWJidpDDSPzyd6KgqjQV+NHQOGgxXgVcHF
-mCye7Bpy3EjBPvmE0oSCwRvDdDa3ucc2Mnr4MrbQNq4iGDGMUHMhnv6DOzCIJOPp
-wX7e7ZjHH5IQip9bYi+dpLzVhW86/clTpyBLqtsgqyFOHQ1O5piF5asRR12dP8Qj
-wOMUBm7+nQIDAQABo4IBMDCCASwwDwYDVR0TAQH/BAUwAwEB/zCB6QYIKwYBBQUH
-AQsEgdwwgdkwPwYIKwYBBQUHMAWGM2h0dHA6Ly9odHRwLmZwa2kuZ292L2ZjcGNh
-L2NhQ2VydHNJc3N1ZWRCeWZjcGNhLnA3YzCBlQYIKwYBBQUHMAWGgYhsZGFwOi8v
-bGRhcC5mcGtpLmdvdi9jbj1GZWRlcmFsJTIwQ29tbW9uJTIwUG9saWN5JTIwQ0Es
-b3U9RlBLSSxvPVUuUy4lMjBHb3Zlcm5tZW50LGM9VVM/Y0FDZXJ0aWZpY2F0ZTti
-aW5hcnksY3Jvc3NDZXJ0aWZpY2F0ZVBhaXI7YmluYXJ5MA4GA1UdDwEB/wQEAwIB
-BjAdBgNVHQ4EFgQUrQx6dVzl85jEeZgOrCj9l/TnAvwwDQYJKoZIhvcNAQELBQAD
-ggEBAI9z2uF/gLGH9uwsz9GEYx728Yi3mvIRte9UrYpuGDco71wb5O9Qt2wmGCMi
-TR0mRyDpCZzicGJxqxHPkYnos/UqoEfAFMtOQsHdDA4b8Idb7OV316rgVNdF9IU+
-7LQd3nyKf1tNnJaK0KIyn9psMQz4pO9+c+iR3Ah6cFqgr2KBWfgAdKLI3VTKQVZH
-venAT+0g3eOlCd+uKML80cgX2BLHb94u6b2akfI8WpQukSKAiaGMWMyDeiYZdQKl
-Dn0KJnNR6obLB6jI/WNaNZvSr79PMUjBhHDbNXuaGQ/lj/RqDG8z2esccKIN47lQ
-A2EC/0rskqTcLe4qNJMHtyznGI8=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjEL
-MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZW
-ZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2ln
-biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJp
-U2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9y
-aXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjELMAkG
-A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJp
-U2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwg
-SW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2ln
-biBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5
-IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8Utpkmw4tXNherJI9/gHm
-GUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGzrl0Bp3ve
-fLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUw
-AwEB/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJ
-aW1hZ2UvZ2lmMCEwHzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYj
-aHR0cDovL2xvZ28udmVyaXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMW
-kf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMDA2gAMGUCMGYhDBgmYFo4e1ZC
-4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIxAJw9SDkjOVga
-FRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIID4TCCAsmgAwIBAgIOYyUAAQACFI0zFQLkbPQwDQYJKoZIhvcNAQEFBQAwezEL
-MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxJDAiBgNV
-BAsTG1RDIFRydXN0Q2VudGVyIFVuaXZlcnNhbCBDQTEoMCYGA1UEAxMfVEMgVHJ1
-c3RDZW50ZXIgVW5pdmVyc2FsIENBIElJSTAeFw0wOTA5MDkwODE1MjdaFw0yOTEy
-MzEyMzU5NTlaMHsxCzAJBgNVBAYTAkRFMRwwGgYDVQQKExNUQyBUcnVzdENlbnRl
-ciBHbWJIMSQwIgYDVQQLExtUQyBUcnVzdENlbnRlciBVbml2ZXJzYWwgQ0ExKDAm
-BgNVBAMTH1RDIFRydXN0Q2VudGVyIFVuaXZlcnNhbCBDQSBJSUkwggEiMA0GCSqG
-SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDC2pxisLlxErALyBpXsq6DFJmzNEubkKLF
-5+cvAqBNLaT6hdqbJYUtQCggbergvbFIgyIpRJ9Og+41URNzdNW88jBmlFPAQDYv
-DIRlzg9uwliT6CwLOunBjvvya8o84pxOjuT5fdMnnxvVZ3iHLX8LR7PH6MlIfK8v
-zArZQe+f/prhsq75U7Xl6UafYOPfjdN/+5Z+s7Vy+EutCHnNaYlAJ/Uqwa1D7KRT
-yGG299J5KmcYdkhtWyUB0SbFt1dpIxVbYYqt8Bst2a9c8SaQaanVDED1M4BDj5yj
-dipFtK+/fz6HP3bFzSreIMUWWMv5G/UPyw0RUmS40nZid4PxWJ//AgMBAAGjYzBh
-MB8GA1UdIwQYMBaAFFbn4VslQ4Dg9ozhcbyO5YAvxEjiMA8GA1UdEwEB/wQFMAMB
-Af8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRW5+FbJUOA4PaM4XG8juWAL8RI
-4jANBgkqhkiG9w0BAQUFAAOCAQEAg8ev6n9NCjw5sWi+e22JLumzCecYV42Fmhfz
-dkJQEw/HkG8zrcVJYCtsSVgZ1OK+t7+rSbyUyKu+KGwWaODIl0YgoGhnYIg5IFHY
-aAERzqf2EQf27OysGh+yZm5WZ2B6dF7AbZc2rrUNXWZzwCUyRdhKBgePxLcHsU0G
-DeGl6/R1yrqc0L2z0zIkTO5+4nYES0lT2PLpVDP85XEfPRRclkvxOvIAu2y0+pZV
-CIgJwcyRGSmwIC3/yzikQOEXvnlhgP8HA4ZMTnsGnxGGjYnuJ8Tb4rwZjgvDwxPH
-LQNjO9Po5KIqwoIIlBZU8O8fJ5AluA0OKBtHd0e9HKgl8ZS0Zg==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDcTCCAlmgAwIBAgIVAOYJ/nrqAGiM4CS07SAbH+9StETRMA0GCSqGSIb3DQEB
-BQUAMFAxCzAJBgNVBAYTAlBMMSgwJgYDVQQKDB9LcmFqb3dhIEl6YmEgUm96bGlj
-emVuaW93YSBTLkEuMRcwFQYDVQQDDA5TWkFGSVIgUk9PVCBDQTAeFw0xMTEyMDYx
-MTEwNTdaFw0zMTEyMDYxMTEwNTdaMFAxCzAJBgNVBAYTAlBMMSgwJgYDVQQKDB9L
-cmFqb3dhIEl6YmEgUm96bGljemVuaW93YSBTLkEuMRcwFQYDVQQDDA5TWkFGSVIg
-Uk9PVCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKxHL49ZMTml
-6g3wpYwrvQKkvc0Kc6oJ5sxfgmp1qZfluwbv88BdocHSiXlY8NzrVYzuWBp7J/9K
-ULMAoWoTIzOQ6C9TNm4YbA9A1jdX1wYNL5Akylf8W5L/I4BXhT9KnlI6x+a7BVAm
-nr/Ttl+utT/Asms2fRfEsF2vZPMxH4UFqOAhFjxTkmJWf2Cu4nvRQJHcttB+cEAo
-ag/hERt/+tzo4URz6x6r19toYmxx4FjjBkUhWQw1X21re//Hof2+0YgiwYT84zLb
-eqDqCOMOXxvH480yGDkh/QoazWX3U75HQExT/iJlwnu7I1V6HXztKIwCBjsxffbH
-3jOshCJtywcCAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
-AQYwHQYDVR0OBBYEFFOSo33/gnbwM9TrkmdHYTMbaDsqMA0GCSqGSIb3DQEBBQUA
-A4IBAQA5UFWd5EL/pBviIMm1zD2JLUCpp0mJG7JkwznIOzawhGmFFaxGoxAhQBEg
-haP+E0KR66oAwVC6xe32QUVSHfWqWndzbODzLB8yj7WAR0cDM45ZngSBPBuFE3Wu
-GLJX9g100ETfIX+4YBR/4NR/uvTnpnd9ete7Whl0ZfY94yuu4xQqB5QFv+P7IXXV
-lTOjkjuGXEcyQAjQzbFaT9vIABSbeCXWBbjvOXukJy6WgAiclzGNSYprre8Ryydd
-fmjW9HIGwsIO03EldivvqEYL1Hv1w/Pur+6FUEOaL68PEIUovfgwIB2BAw+vZDuw
-cH0mX548PojGyg434cDjkSXa3mHF
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEPDCCAySgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBvjE/MD0GA1UEAww2VMOc
-UktUUlVTVCBFbGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sx
-c8SxMQswCQYDVQQGEwJUUjEPMA0GA1UEBwwGQW5rYXJhMV0wWwYDVQQKDFRUw5xS
-S1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnEn2kg
-SGl6bWV0bGVyaSBBLsWeLiAoYykgS2FzxLFtIDIwMDUwHhcNMDUxMTA3MTAwNzU3
-WhcNMTUwOTE2MTAwNzU3WjCBvjE/MD0GA1UEAww2VMOcUktUUlVTVCBFbGVrdHJv
-bmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGEwJU
-UjEPMA0GA1UEBwwGQW5rYXJhMV0wWwYDVQQKDFRUw5xSS1RSVVNUIEJpbGdpIMSw
-bGV0acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWe
-LiAoYykgS2FzxLFtIDIwMDUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
-AQCpNn7DkUNMwxmYCMjHWHtPFoylzkkBH3MOrHUTpvqeLCDe2JAOCtFp0if7qnef
-J1Il4std2NiDUBd9irWCPwSOtNXwSadktx4uXyCcUHVPr+G1QRT0mJKIx+XlZEdh
-R3n9wFHxwZnn3M5q+6+1ATDcRhzviuyV79z/rxAc653YsKpqhRgNF8k+v/Gb0AmJ
-Qv2gQrSdiVFVKc8bcLyEVK3BEx+Y9C52YItdP5qtygy/p1Zbj3e41Z55SZI/4PGX
-JHpsmxcPbe9TmJEr5A++WXkHeLuXlfSfadRYhwqp48y2WBmfJiGxxFmNskF1wK1p
-zpwACPI2/z7woQ8arBT9pmAPAgMBAAGjQzBBMB0GA1UdDgQWBBTZN7NOBf3Zz58S
-Fq62iS/rJTqIHDAPBgNVHQ8BAf8EBQMDBwYAMA8GA1UdEwEB/wQFMAMBAf8wDQYJ
-KoZIhvcNAQEFBQADggEBAHJglrfJ3NgpXiOFX7KzLXb7iNcX/nttRbj2hWyfIvwq
-ECLsqrkw9qtY1jkQMZkpAL2JZkH7dN6RwRgLn7Vhy506vvWolKMiVW4XSf/SKfE4
-Jl3vpao6+XF75tpYHdN0wgH6PmlYX63LaL4ULptswLbcoCb6dxriJNoaN+BnrdFz
-gw2lGh1uEpJ+hGIAF728JRhX8tepb1mIvDS3LoV4nZbcFMMsilKbloxSZj2GFotH
-uFEJjOp9zYhys2AzsfAKRO8P9Qk3iCQOLGsgOqL6EfJANZxEaGM7rDNvY7wsu/LS
-y3Z9fYjYHcgFHW68lKlmjHdxx/qR+i9Rnuk5UrbnBEI=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDfTCCAmWgAwIBAgIBADANBgkqhkiG9w0BAQUFADBgMQswCQYDVQQGEwJKUDEl
-MCMGA1UEChMcU0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEqMCgGA1UECxMh
-U2VjdXJpdHkgQ29tbXVuaWNhdGlvbiBFViBSb290Q0ExMB4XDTA3MDYwNjAyMTIz
-MloXDTM3MDYwNjAyMTIzMlowYDELMAkGA1UEBhMCSlAxJTAjBgNVBAoTHFNFQ09N
-IFRydXN0IFN5c3RlbXMgQ08uLExURC4xKjAoBgNVBAsTIVNlY3VyaXR5IENvbW11
-bmljYXRpb24gRVYgUm9vdENBMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
-ggEBALx/7FebJOD+nLpCeamIivqA4PUHKUPqjgo0No0c+qe1OXj/l3X3L+SqawSE
-RMqm4miO/VVQYg+kcQ7OBzgtQoVQrTyWb4vVog7P3kmJPdZkLjjlHmy1V4qe70gO
-zXppFodEtZDkBp2uoQSXWHnvIEqCa4wiv+wfD+mEce3xDuS4GBPMVjZd0ZoeUWs5
-bmB2iDQL87PRsJ3KYeJkHcFGB7hj3R4zZbOOCVVSPbW9/wfrrWFVGCypaZhKqkDF
-MxRldAD5kd6vA0jFQFTcD4SQaCDFkpbcLuUCRarAX1T4bepJz11sS6/vmsJWXMY1
-VkJqMF/Cq/biPT+zyRGPMUzXn0kCAwEAAaNCMEAwHQYDVR0OBBYEFDVK9U2vP9eC
-OKyrcWUXdYydVZPmMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0G
-CSqGSIb3DQEBBQUAA4IBAQCoh+ns+EBnXcPBZsdAS5f8hxOQWsTvoMpfi7ent/HW
-tWS3irO4G8za+6xmiEHO6Pzk2x6Ipu0nUBsCMCRGef4Eh3CXQHPRwMFXGZpppSeZ
-q51ihPZRwSzJIxXYKLerJRO1RuGGAv8mjMSIkh1W/hln8lXkgKNrnKt34VFxDSDb
-EJrbvXZ5B3eZKK2aXtqxT0QsNY6llsf9g/BYxnnWmHyojf6GPgcWkuF75x3sM3Z+
-Qi5KhfmRiWiEA4Glm5q+4zfFVKtWOxgtQaQM+ELbmaDgcm+7XeEWT1MKZPlO9L9O
-VL14bIjqv5wTJMJwaaJ/D8g8rQjJsJhAoyrniIPtd490
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIICqDCCAi2gAwIBAgIQNBdlEkA7t1aALYDLeVWmHjAKBggqhkjOPQQDAzCBlDEL
-MAkGA1UEBhMCVVMxHTAbBgNVBAoTFFN5bWFudGVjIENvcnBvcmF0aW9uMR8wHQYD
-VQQLExZTeW1hbnRlYyBUcnVzdCBOZXR3b3JrMUUwQwYDVQQDEzxTeW1hbnRlYyBD
-bGFzcyAyIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0g
-RzQwHhcNMTExMDA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBlDELMAkGA1UEBhMC
-VVMxHTAbBgNVBAoTFFN5bWFudGVjIENvcnBvcmF0aW9uMR8wHQYDVQQLExZTeW1h
-bnRlYyBUcnVzdCBOZXR3b3JrMUUwQwYDVQQDEzxTeW1hbnRlYyBDbGFzcyAyIFB1
-YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzQwdjAQBgcq
-hkjOPQIBBgUrgQQAIgNiAATR2UqOTA2ESlG6fO/TzPo6mrWnYxM9AeBJPvrBR8mS
-szrX/m+c95o6D/UOCgrDP8jnEhSO1dVtmCyzcTIK6yq99tdqIAtnRZzSsr9TImYJ
-XdsR8/EFM1ij4rjPfM2Cm72jQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8E
-BTADAQH/MB0GA1UdDgQWBBQ9MvM6qQyQhPmijGkGYVQvh3L+BTAKBggqhkjOPQQD
-AwNpADBmAjEAyKapr0F/tckRQhZoaUxcuCcYtpjxwH+QbYfTjEYX8D5P/OqwCMR6
-S7wIL8fip29lAjEA1lnehs5fDspU1cbQFQ78i5Ry1I4AWFPPfrFLDeVQhuuea9//
-KabYR9mglhjb8kWz
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEd
-MBsGA1UECgwUQnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3Mg
-Q2xhc3MgMyBSb290IENBMB4XDTEwMTAyNjA4Mjg1OFoXDTQwMTAyNjA4Mjg1OFow
-TjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBhc3MgQVMtOTgzMTYzMzI3MSAw
-HgYDVQQDDBdCdXlwYXNzIENsYXNzIDMgUm9vdCBDQTCCAiIwDQYJKoZIhvcNAQEB
-BQADggIPADCCAgoCggIBAKXaCpUWUOOV8l6ddjEGMnqb8RB2uACatVI2zSRHsJ8Y
-ZLya9vrVediQYkwiL944PdbgqOkcLNt4EemOaFEVcsfzM4fkoF0LXOBXByow9c3E
-N3coTRiR5r/VUv1xLXA+58bEiuPwKAv0dpihi4dVsjoT/Lc+JzeOIuOoTyrvYLs9
-tznDDgFHmV0ST9tD+leh7fmdvhFHJlsTmKtdFoqwNxxXnUX/iJY2v7vKB3tvh2PX
-0DJq1l1sDPGzbjniazEuOQAnFN44wOwZZoYS6J1yFhNkUsepNxz9gjDthBgd9K5c
-/3ATAOux9TN6S9ZV+AWNS2mw9bMoNlwUxFFzTWsL8TQH2xc519woe2v1n/MuwU8X
-KhDzzMro6/1rqy6any2CbgTUUgGTLT2G/H783+9CHaZr77kgxve9oKeV/afmiSTY
-zIw0bOIjL9kSGiG5VZFvC5F5GQytQIgLcOJ60g7YaEi7ghM5EFjp2CoHxhLbWNvS
-O1UQRwUVZ2J+GGOmRj8JDlQyXr8NYnon74Do29lLBlo3WiXQCBJ31G8JUJc9yB3D
-34xFMFbG02SrZvPAXpacw8Tvw3xrizp5f7NJzz3iiZ+gMEuFuZyUJHmPfWupRWgP
-K9Dx2hzLabjKSWJtyNBjYt1gD1iqj6G8BaVmos8bdrKEZLFMOVLAMLrwjEsCsLa3
-AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFEe4zf/lb+74suwv
-Tg75JbCOPGvDMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAACAj
-QTUEkMJAYmDv4jVM1z+s4jSQuKFvdvoWFqRINyzpkMLyPPgKn9iB5btb2iUspKdV
-cSQy9sgL8rxq+JOssgfCX5/bzMiKqr5qb+FJEMwx14C7u8jYog5kV+qi9cKpMRXS
-IGrs/CIBKM+GuIAeqcwRpTzyFrNHnfzSgCHEy9BHcEGhyoMZCCxt8l13nIoUE9Q2
-HJLw5QY33KbmkJs4j1xrG0aGQ0JfPgEHU1RdZX33inOhmlRaHylDFCfChQ+1iHsa
-O5S3HWCntZznKWlXWpuTekMwGwPXYshApqr8ZORK15FTAaggiG6cX0S5y2CBNOxv
-033aSF/rtJC8LakcC6wc1aJoIIAE1vyxjy+7SjENSoYc6+I2KSb12tjE8nVhz36u
-dmNKekBlk4f4HoCMhuWG1o8O/FMsYOgWYRqiPkN7zTlgVGr18okmAWiDSKIz6MkE
-kbIRNBE+6tBDGR8Dk5AM/1E9V/RBbuHLoL7ryWPNbczk+DaqaJ3tvV2XcEQNtg41
-3OEMXbugUZTLfhbrES+jkkXITHHZvMmZUldGL1DPvTVp9D0VzgalLA8+9oG6lLvD
-u79leNKGef9JOxqDDPDeeOzI8k1MGt6CKfjBWtrt7uYnXuhF0J0cUahoq0Tj0Itq
-4/g7u9xN12TyUb7mqqta6THuBrxzvxNiCp/HuZc=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIF9jCCA96gAwIBAgIQZWNxhdNvRcaPfzH5CYeSgjANBgkqhkiG9w0BAQwFADCB
-lDELMAkGA1UEBhMCVVMxHTAbBgNVBAoTFFN5bWFudGVjIENvcnBvcmF0aW9uMR8w
-HQYDVQQLExZTeW1hbnRlYyBUcnVzdCBOZXR3b3JrMUUwQwYDVQQDEzxTeW1hbnRl
-YyBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5
-IC0gRzYwHhcNMTIxMDE4MDAwMDAwWhcNMzcxMjAxMjM1OTU5WjCBlDELMAkGA1UE
-BhMCVVMxHTAbBgNVBAoTFFN5bWFudGVjIENvcnBvcmF0aW9uMR8wHQYDVQQLExZT
-eW1hbnRlYyBUcnVzdCBOZXR3b3JrMUUwQwYDVQQDEzxTeW1hbnRlYyBDbGFzcyAz
-IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzYwggIi
-MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC3DrL6TbyachX7d1vb/UMPywv3
-YC6zK34Mu1PyzE5l8xm7/zUd99Opu0Attd141Kb5N+qFBXttt+YTSwZ8+3ZjjyAd
-LTgrBIXy6LDRX01KIclq2JTqHgJQpqqQB6BHIepm+QSg5oPwxPVeluInTWHDs8GM
-IrZmoQDRVin77cF/JMo9+lqUsITDx7pDHP1kDvEo+0dZ8ibhMblE+avd+76+LDfj
-rAsY0/wBovGkCjWCR0yrvYpe3xOF/CDMSFmvr0FvyyPNypOn3dVfyGQ7/wEDoApP
-LW49hL6vyDKyUymQFfewBZoKPPa5BpDJpeFdoDuw/qi2v/WJKFckOiGGceTciotB
-VeweMCRZ0cBZuHivqlp03iWAMJjtMERvIXAc2xJTDtamKGaTLB/MTzwbgcW59nhv
-0DI6CHLbaw5GF4WU87zvvPekXo7p6bVk5bdLRRIsTDe3YEMKTXEGAJQmNXQfu3o5
-XE475rgD4seTi4QsJUlF3X8jlGAfy+nN9quX92Hn+39igcjcCjBcGHzmzu/Hbh6H
-fLPpysh7avRo/IOlDFa0urKNSgrHl5fFiDAVPRAIVBVycmczM/R8t84AJ1NlziTx
-WmTnNi/yLgLCl99y6AIeoPc9tftoYAP6M6nmEm0G4amoXU48/tnnAGWsthlNe4N/
-NEfq4RhtsYsceavnnQIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/
-BAUwAwEB/zAdBgNVHQ4EFgQUOXEIAD7eyIbnkP/k/SEPziQZFvYwDQYJKoZIhvcN
-AQEMBQADggIBAFBriE1gSM5a4yLOZ3yEp80c/ekMA4w2rwqHDmquV64B0Da78v25
-c8FftaiuTKL6ScsHRhY2vePIVzh+OOS/JTNgxtw3nGO7XpgeGrKC8K6mdxGAREeh
-KcXwszrOmPC47NMOgAZ3IzBM/3lkYyJbd5NDS3Wz2ztuO0rd8ciutTeKlYg6EGhw
-OLlbcH7VQ8n8X0/l5ns27vAg7UdXEyYQXhQGDXt2B8LGLRb0rqdsD7yID08sAraj
-1yLmmUc12I2lT4ESOhF9s8wLdfMecKMbA+r6mujmLjY5zJnOOj8Mt674Q5mwk25v
-qtkPajGRu5zTtCj7g0x6c4JQZ9IOrO1gxbJdNZjPh34eWR0kvFa62qRa2MzmvB4Q
-jxuMjvPB27e+1LBbZY8WaPNWxSoZFk0PuGWHbSSDuGLc4EdhGoh7zk5//dzGDVqa
-pPO1TPbdMaboHREhMzAEYX0c4D5PjT+1ixIAWn2poQDUg+twuxj4pNIcgS23CBHI
-Jnu21OUPA0Zy1CVAHr5JXW2T8VyyO3VUaTqg7kwiuqya4gitRWMFSlI1dsQ09V4H
-Mq3cfCbRW4+t5OaqG3Wf61206MCpFXxOSgdy30bJ1JGSdVaw4e43NmUoxRXIK3bM
-bW8Zg/T92hXiQeczeUaDV/nxpbZt07zXU+fucW14qZen7iCcGRVyFT0E
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIICRjCCAc2gAwIBAgIQC6Fa+h3foLVJRK/NJKBs7DAKBggqhkjOPQQDAzBlMQsw
-CQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cu
-ZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3Qg
-RzMwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1MTIwMDAwWjBlMQswCQYDVQQGEwJV
-UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQu
-Y29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwdjAQBgcq
-hkjOPQIBBgUrgQQAIgNiAAQZ57ysRGXtzbg/WPuNsVepRC0FFfLvC/8QdJ+1YlJf
-Zn4f5dwbRXkLzMZTCp2NXQLZqVneAlr2lSoOjThKiknGvMYDOAdfVdp+CW7if17Q
-RSAPWXYQ1qAk8C3eNvJsKTmjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/
-BAQDAgGGMB0GA1UdDgQWBBTL0L2p4ZgFUaFNN6KDec6NHSrkhDAKBggqhkjOPQQD
-AwNnADBkAjAlpIFFAmsSS3V0T8gj43DydXLefInwz5FyYZ5eEJJZVrmDxxDnOOlY
-JjZ91eQ0hjkCMHw2U/Aw5WJjOpnitqM7mzT6HtoQknFekROn3aRukswy1vUhZscv
-6pZjamVFkpUBtA==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEUzCCAzugAwIBAgIDAOJDMA0GCSqGSIb3DQEBBQUAMIHPMQswCQYDVQQGEwJB
-VDGBizCBiAYDVQQKHoGAAEEALQBUAHIAdQBzAHQAIABHAGUAcwAuACAAZgD8AHIA
-IABTAGkAYwBoAGUAcgBoAGUAaQB0AHMAcwB5AHMAdABlAG0AZQAgAGkAbQAgAGUA
-bABlAGsAdAByAC4AIABEAGEAdABlAG4AdgBlAHIAawBlAGgAcgAgAEcAbQBiAEgx
-GDAWBgNVBAsTD0EtVHJ1c3QtUXVhbC0wMTEYMBYGA1UEAxMPQS1UcnVzdC1RdWFs
-LTAxMB4XDTA0MTEzMDIzMDAwMFoXDTE0MTEzMDIzMDAwMFowgc8xCzAJBgNVBAYT
-AkFUMYGLMIGIBgNVBAoegYAAQQAtAFQAcgB1AHMAdAAgAEcAZQBzAC4AIABmAPwA
-cgAgAFMAaQBjAGgAZQByAGgAZQBpAHQAcwBzAHkAcwB0AGUAbQBlACAAaQBtACAA
-ZQBsAGUAawB0AHIALgAgAEQAYQB0AGUAbgB2AGUAcgBrAGUAaAByACAARwBtAGIA
-SDEYMBYGA1UECxMPQS1UcnVzdC1RdWFsLTAxMRgwFgYDVQQDEw9BLVRydXN0LVF1
-YWwtMDEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCmhgdxIbxTGEOH
-fXGiewI3NFldAWKFWfLofO+5I1UbvA5avt7IgsGXz/tI/f5HGUbascI0i7xG0tqV
-lA5ctQgLRqxgxHtgTkMcqsAEYdsz3LZsCdXO1QrvEBGLTSABdxiL/gSWJ6z77CSw
-x7Xg02HwxPV82cjGkSF3ENGJntuIAAnRDWn/ORHjFatNRymoMbHaOEZXSGhf7Y5F
-rrHEqGyi9E6sv784De/T1aTvskn8cWeUmDzv//omiG/a/V9KQex/61XN8OthUQVn
-X+u/liL2NKx74I2C/GgHX5B0WkPNqsSOgmlvJ/cKuT0PveUgVFDAA0oYBgcE1KDM
-lBbN0kmPAgMBAAGjNjA0MA8GA1UdEwEB/wQFMAMBAf8wEQYDVR0OBAoECEs8jB2F
-6W+tMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAIUusmJzMJRiQ
-8TAHrJAOelfuWoTGcqdIv7Tys/fNl2yF2fjvHT8J01aKialFVpbVeQ2XKb1O2bHO
-QYAKgsdZ2jZ/sdL2UVFRTHmidLu6PdgWCBRhJYQELQophO9QVvfhAA0TwbESYqTz
-+nlI5Gr7CZe8f6HEmhJmCtUQsdQCufGglRh4T+tIGiNGcnyVEHZ93mSVepFr1VA2
-9CTRPteuGjA81jeAz9peYiFE1CXvxK9cJiv0BcALFLWmADCoRLzIRZhA+sAwYUmw
-M1rqVCPA3kBQvIC95tyQvNy2dG0Vs+O6PwLaNX/suSlElQ06X2l1VwMaYb4vZKFq
-N0bOhBXEVg==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIJmzCCB4OgAwIBAgIBATANBgkqhkiG9w0BAQwFADCCAR4xPjA8BgNVBAMTNUF1
-dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIFJhaXogZGVsIEVzdGFkbyBWZW5lem9s
-YW5vMQswCQYDVQQGEwJWRTEQMA4GA1UEBxMHQ2FyYWNhczEZMBcGA1UECBMQRGlz
-dHJpdG8gQ2FwaXRhbDE2MDQGA1UEChMtU2lzdGVtYSBOYWNpb25hbCBkZSBDZXJ0
-aWZpY2FjaW9uIEVsZWN0cm9uaWNhMUMwQQYDVQQLEzpTdXBlcmludGVuZGVuY2lh
-IGRlIFNlcnZpY2lvcyBkZSBDZXJ0aWZpY2FjaW9uIEVsZWN0cm9uaWNhMSUwIwYJ
-KoZIhvcNAQkBFhZhY3JhaXpAc3VzY2VydGUuZ29iLnZlMB4XDTEwMTIyMjE4MDgy
-MVoXDTMwMTIxNzIzNTk1OVowggEeMT4wPAYDVQQDEzVBdXRvcmlkYWQgZGUgQ2Vy
-dGlmaWNhY2lvbiBSYWl6IGRlbCBFc3RhZG8gVmVuZXpvbGFubzELMAkGA1UEBhMC
-VkUxEDAOBgNVBAcTB0NhcmFjYXMxGTAXBgNVBAgTEERpc3RyaXRvIENhcGl0YWwx
-NjA0BgNVBAoTLVNpc3RlbWEgTmFjaW9uYWwgZGUgQ2VydGlmaWNhY2lvbiBFbGVj
-dHJvbmljYTFDMEEGA1UECxM6U3VwZXJpbnRlbmRlbmNpYSBkZSBTZXJ2aWNpb3Mg
-ZGUgQ2VydGlmaWNhY2lvbiBFbGVjdHJvbmljYTElMCMGCSqGSIb3DQEJARYWYWNy
-YWl6QHN1c2NlcnRlLmdvYi52ZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC
-ggIBAME77xNS8ZlW47RsBeEaaRZhJoZ4rw785UAFCuPZOAVMqNS1wMYqzy95q6Gk
-UO81ER/ugiQX/KMcq/4HBn83fwdYWxPZfwBfK7BP2p/JsFgzYeFP0BXOLmvoJIzl
-Jb6FW+1MPwGBjuaZGFImWZsSmGUclb51mRYMZETh9/J5CLThR1exStxHQptwSzra
-zNFpkQY/zmj7+YZNA9yDoroVFv6sybYOZ7OxNDo7zkSLo45I7gMwtxqWZ8VkJZkC
-8+p0dX6mkhUT0QAV64Zc9HsZiH/oLhEkXjhrgZ28cF73MXIqLx1fyM4kPH1yOJi/
-R72nMwL7D+Sd6mZgI035TxuHXc2/uOwXfKrrTjaJDz8Jp6DdessOkxIgkKXRjP+F
-K3ze3n4NUIRGhGRtyvEjK95/2g02t6PeYiYVGur6ruS49n0RAaSS0/LJb6XzaAAe
-0mmO2evnEqxIKwy2mZRNPfAVW1l3wCnWiUwryBU6OsbFcFFrQm+00wOicXvOTHBM
-aiCVAVZTb9RSLyi+LJ1llzJZO3pq3IRiiBj38Nooo+2ZNbMEciSgmig7YXaUcmud
-SVQvLSL+Yw+SqawyezwZuASbp7d/0rutQ59d81zlbMt3J7yB567rT2IqIydQ8qBW
-k+fmXzghX+/FidYsh/aK+zZ7Wy68kKHuzEw1Vqkat5DGs+VzAgMBAAGjggLeMIIC
-2jASBgNVHRMBAf8ECDAGAQH/AgECMDcGA1UdEgQwMC6CD3N1c2NlcnRlLmdvYi52
-ZaAbBgVghl4CAqASDBBSSUYtRy0yMDAwNDAzNi0wMB0GA1UdDgQWBBStuyIdxuDS
-Aaj9dlBSk+2YwU2u0zCCAVAGA1UdIwSCAUcwggFDgBStuyIdxuDSAaj9dlBSk+2Y
-wU2u06GCASakggEiMIIBHjE+MDwGA1UEAxM1QXV0b3JpZGFkIGRlIENlcnRpZmlj
-YWNpb24gUmFpeiBkZWwgRXN0YWRvIFZlbmV6b2xhbm8xCzAJBgNVBAYTAlZFMRAw
-DgYDVQQHEwdDYXJhY2FzMRkwFwYDVQQIExBEaXN0cml0byBDYXBpdGFsMTYwNAYD
-VQQKEy1TaXN0ZW1hIE5hY2lvbmFsIGRlIENlcnRpZmljYWNpb24gRWxlY3Ryb25p
-Y2ExQzBBBgNVBAsTOlN1cGVyaW50ZW5kZW5jaWEgZGUgU2VydmljaW9zIGRlIENl
-cnRpZmljYWNpb24gRWxlY3Ryb25pY2ExJTAjBgkqhkiG9w0BCQEWFmFjcmFpekBz
-dXNjZXJ0ZS5nb2IudmWCAQEwDgYDVR0PAQH/BAQDAgEGMDcGA1UdEQQwMC6CD3N1
-c2NlcnRlLmdvYi52ZaAbBgVghl4CAqASDBBSSUYtRy0yMDAwNDAzNi0wMFQGA1Ud
-HwRNMEswJKAioCCGHmhodHA6Ly93d3cuc3VzY2VydGUuZ29iLnZlL2xjcjAjoCGg
-H4YdbGRhcDovL2FjcmFpei5zdXNjZXJ0ZS5nb2IudmUwNwYIKwYBBQUHAQEEKzAp
-MCcGCCsGAQUFBzABhhtoaHRwOi8vb2NzcC5zdXNjZXJ0ZS5nb2IudmUwQAYDVR0g
-BDkwNzA1BgVghl4BAjAsMCoGCCsGAQUFBwIBFh5odHRwOi8vd3d3LnN1c2NlcnRl
-LmdvYi52ZS9kcGMwDQYJKoZIhvcNAQEMBQADggIBAK4qy/zmZ9zBwfW3yOYtLcBT
-Oy4szJyPz7/RhNH3bPVH7HbDTGpi6JZ4YXdXMBeJE5qBF4a590Kgj8Rlnltt+Rbo
-OFQOU1UDqKuTdBsA//Zry5899fmn8jBUkg4nh09jhHHbLlaUScdz704Zz2+UVg7i
-s/r3Legxap60KzmdrmTAE9VKte1TQRgavQwVX5/2mO/J+SCas//UngI+h8SyOucq
-mjudYEgBrZaodUsagUfn/+AzFNrGLy+al+5nZeHb8JnCfLHWS0M9ZyhgoeO/czyn
-99+5G93VWNv4zfc4KiavHZKrkn8F9pg0ycIZh+OwPT/RE2zq4gTazBMlP3ACIe/p
-olkNaOEa8KvgzW96sjBZpMW49zFmyINYkcj+uaNCJrVGsXgdBmkuRGJNWFZ9r0cG
-woIaxViFBypsz045r1ESfYPlfDOavBhZ/giR/Xocm9CHkPRY2BApMMR0DUCyGETg
-Ql+L3kfdTKzuDjUp2DM9FqysQmaM81YDZufWkMhlZPfHwC7KbNougoLroa5Umeos
-bqAXWmk46SwIdWRPLLqbUpDTKooynZKpSYIkkotdgJoVZUUCY+RCO8jsVPEU6ece
-SxztNUm5UOta1OJPMwSAKRHOo3ilVb9c6lAixDdvV8MeNbqe6asM1mpCHWbJ/0rg
-5Ls9Cxx8hracyp0ev7b0
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIGATCCA+mgAwIBAgIRAI9hcRW6eVgXjH0ROqzW264wDQYJKoZIhvcNAQELBQAw
-RTEfMB0GA1UEAxMWQ29tU2lnbiBHbG9iYWwgUm9vdCBDQTEVMBMGA1UEChMMQ29t
-U2lnbiBMdGQuMQswCQYDVQQGEwJJTDAeFw0xMTA3MTgxMDI0NTRaFw0zNjA3MTYx
-MDI0NTVaMEUxHzAdBgNVBAMTFkNvbVNpZ24gR2xvYmFsIFJvb3QgQ0ExFTATBgNV
-BAoTDENvbVNpZ24gTHRkLjELMAkGA1UEBhMCSUwwggIiMA0GCSqGSIb3DQEBAQUA
-A4ICDwAwggIKAoICAQCyKClzKh3rm6n1nvigmV/VU1D4hSwYW2ro3VqpzpPo0Ph3
-3LguqjXd5juDwN4mpxTpD99d7Xu5X6KGTlMVtfN+bTbA4t3x7DU0Zqn0BE5XuOgs
-3GLH41Vmr5wox1bShVpM+IsjcN4E/hMnDtt/Bkb5s33xCG+ohz5dlq0gA9qfr/g4
-O9lkHZXTCeYrmVzd/il4x79CqNvGkdL3um+OKYl8rg1dPtD8UsytMaDgBAopKR+W
-igc16QJzCbvcinlETlrzP/Ny76BWPnAQgaYBULax/Q5thVU+N3sEOKp6uviTdD+X
-O6i96gARU4H0xxPFI75PK/YdHrHjfjQevXl4J37FJfPMSHAbgPBhHC+qn/014DOx
-46fEGXcdw2BFeIIIwbj2GH70VyJWmuk/xLMCHHpJ/nIF8w25BQtkPpkwESL6esaU
-b1CyB4Vgjyf16/0nRiCAKAyC/DY/Yh+rDWtXK8c6QkXD2XamrVJo43DVNFqGZzbf
-5bsUXqiVDOz71AxqqK+p4ek9374xPNMJ2rB5MLPAPycwI0bUuLHhLy6nAIFHLhut
-TNI+6Y/soYpi5JSaEjcY7pxI8WIkUAzr2r+6UoT0vAdyOt7nt1y8844a7szo/aKf
-woziHl2O1w6ZXUC30K+ptXVaOiW79pBDcbLZ9ZdbONhS7Ea3iH4HJNwktrBJLQID
-AQABo4HrMIHoMA8GA1UdEwEB/wQFMAMBAf8wgYQGA1UdHwR9MHswPKA6oDiGNmh0
-dHA6Ly9mZWRpci5jb21zaWduLmNvLmlsL2NybC9jb21zaWduZ2xvYmFscm9vdGNh
-LmNybDA7oDmgN4Y1aHR0cDovL2NybDEuY29tc2lnbi5jby5pbC9jcmwvY29tc2ln
-bmdsb2JhbHJvb3RjYS5jcmwwDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBQCRZPY
-DUhirGm6rgZbPvuqJpFQsTAfBgNVHSMEGDAWgBQCRZPYDUhirGm6rgZbPvuqJpFQ
-sTANBgkqhkiG9w0BAQsFAAOCAgEAk1V5V9701xsfy4mfX+tP9Ln5e9h3N+QMwUfj
-kr+k3e8iXOqADjTpUHeBkEee5tJq09ZLp/43F5tZ2eHdYq2ZEX7iWHCnOQet6Yw9
-SU1TahsrGDA6JJD9sdPFnNZooGsU1520e0zNB0dNWwxrWAmu4RsBxvEpWCJbvzQL
-dOfyX85RWwli81OiVMBc5XvJ1mxsIIqli45oRynKtsWP7E+b0ISJ1n+XFLdQo/Nm
-WA/5sDfT0F5YPzWdZymudMbXitimxC+n4oQE4mbQ4Zm718Iwg3pP9gMMcSc7Qc1J
-kJHPH9O7gVubkKHuSYj9T3Ym6c6egL1pb4pz/uT7cT26Fiopc/jdqbe2EAfoJZkv
-hlp/zdzOoXTWjiKNA5zmgWnZn943FuE9KMRyKtyi/ezJXCh8ypnqLIKxeFfZl69C
-BwJsPXUTuqj8Fic0s3aZmmr7C4jXycP+Q8V+akMEIoHAxcd960b4wVWKqOcI/kZS
-Q0cYqWOY1LNjznRt9lweWEfwDBL3FhrHOmD4++1N3FkkM4W+Q1b2WOL24clDMj+i
-2n9Iw0lc1llHMSMvA5D0vpsXZpOgcCVahfXczQKi9wQ3oZyonJeWx4/rXdMtagAB
-VBYGFuMEUEQtybI+eIbnp5peO2WAAblQI4eTy/jMVowe5tfMEXovV3sz9ULgmGb3
-DscLP1I=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIICmDCCAgGgAwIBAgIBDjANBgkqhkiG9w0BAQUFADBLMQswCQYDVQQGEwJVUzEY
-MBYGA1UEChMPVS5TLiBHb3Zlcm5tZW50MQwwCgYDVQQLEwNFQ0ExFDASBgNVBAMT
-C0VDQSBSb290IENBMB4XDTA0MDYxNDEwMjAwOVoXDTQwMDYxNDEwMjAwOVowSzEL
-MAkGA1UEBhMCVVMxGDAWBgNVBAoTD1UuUy4gR292ZXJubWVudDEMMAoGA1UECxMD
-RUNBMRQwEgYDVQQDEwtFQ0EgUm9vdCBDQTCBnzANBgkqhkiG9w0BAQEFAAOBjQAw
-gYkCgYEArkr2eXIS6oAKIpDkOlcQZdMGdncoygCEIU+ktqY3of5SVVXU7/it7kJ1
-EUzR4ii2vthQtbww9aAnpQxcEmXZk8eEyiGEPy+cCQMllBY+efOtKgjbQNDZ3lB9
-19qzUJwBl2BMxslU1XsJQw9SK10lPbQm4asa8E8e5zTUknZBWnECAwEAAaOBizCB
-iDAfBgNVHSMEGDAWgBT2uAQnDlYW2blj2f2hVGVBoAhILzAdBgNVHQ4EFgQU9rgE
-Jw5WFtm5Y9n9oVRlQaAISC8wDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMB
-Af8wJQYDVR0gBB4wHDAMBgpghkgBZQMCAQwBMAwGCmCGSAFlAwIBDAIwDQYJKoZI
-hvcNAQEFBQADgYEAHh0EQY2cZ209aBb5q0wW1ER0dc4OGzsLyqjHfaQ4TEaMmUwL
-AJRta/c4KVWLiwbODsvgJk+CaWmSL03gRW/ciVb/qDV7qh9Pyd1cOlanZTAnPog2
-i82yL3i2fK9DCC84uoxEQbgqK2jx9bIjFTwlAqITk9fGAm5mdT84IEwq1Gw=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBh
-MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
-d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBH
-MjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAwMDBaMGExCzAJBgNVBAYTAlVT
-MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j
-b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkqhkiG
-9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI
-2/Ou8jqJkTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx
-1x7e/dfgy5SDN67sH0NO3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQ
-q2EGnI/yuum06ZIya7XzV+hdG82MHauVBJVJ8zUtluNJbd134/tJS7SsVQepj5Wz
-tCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyMUNGPHgm+F6HmIcr9g+UQ
-vIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQABo0IwQDAP
-BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV
-5uNu5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY
-1Yl9PMWLSn/pvtsrF9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4
-NeF22d+mQrvHRAiGfzZ0JFrabA0UWTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NG
-Fdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBHQRFXGU7Aj64GxJUTFy8bJZ91
-8rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/iyK5S9kJRaTe
-pLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl
-MrY=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFSzCCAzOgAwIBAgIRALZLiAfiI+7IXBKtpg4GofIwDQYJKoZIhvcNAQELBQAw
-PzELMAkGA1UEBhMCVFcxMDAuBgNVBAoMJ0dvdmVybm1lbnQgUm9vdCBDZXJ0aWZp
-Y2F0aW9uIEF1dGhvcml0eTAeFw0xMjA5MjgwODU4NTFaFw0zNzEyMzExNTU5NTla
-MD8xCzAJBgNVBAYTAlRXMTAwLgYDVQQKDCdHb3Zlcm5tZW50IFJvb3QgQ2VydGlm
-aWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC
-AQC2/5c8gb4BWCQnr44BK9ZykjAyG1+bfNTUf+ihYHMwVxAA+lCWJP5Q5ow6ldFX
-eYTVZ1MMKoI+GFy4MCYa1l7GLbIEUQ7v3wxjR+vEEghRK5lxXtVpe+FdyXcdIOxW
-juVhYC386RyA3/pqg7sFtR4jEpyCygrzFB0g5AaPQySZn7YKk1pzGxY5vgW28Yyl
-ZJKPBeRcdvc5w88tvQ7Yy6gOMZvJRg9nU0MEj8iyyIOAX7ryD6uBNaIgIZfOD4k0
-eA/PH07p+4woPN405+2f0mb1xcoxeNLOUNFggmOd4Ez3B66DNJ1JSUPUfr0t4urH
-cWWACOQ2nnlwCjyHKenkkpTqBpIpJ3jmrdc96QoLXvTg1oadLXLLi2RW5vSueKWg
-OTNYPNyoj420ai39iHPplVBzBN8RiD5C1gJ0+yzEb7xs1uCAb9GGpTJXA9ZN9E4K
-mSJ2fkpAgvjJ5E7LUy3Hsbbi08J1J265DnGyNPy/HE7CPfg26QrMWJqhGIZO4uGq
-s3NZbl6dtMIIr69c/aQCb/+4DbvVq9dunxpPkUDwH0ZVbaCSw4nNt7H/HLPLo5wK
-4/7NqrwB7N1UypHdTxOHpPaY7/1J1lcqPKZc9mA3v9g+fk5oKiMyOr5u5CI9ByTP
-isubXVGzMNJxbc5Gim18SjNE2hIvNkvy6fFRCW3bapcOFwIDAQABo0IwQDAPBgNV
-HRMBAf8EBTADAQH/MB0GA1UdDgQWBBTVZx3gnHosnMvFmOcdByYqhux0zTAOBgNV
-HQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQELBQADggIBAJA75cJTQijq9TFOjj2Rnk0J
-89ixUuZPrAwxIbvx6pnMg/y2KOTshAcOD06Xu29oRo8OURWV+Do7H1+CDgxxDryR
-T64zLiNB9CZrTxOH+nj2LsIPkQWXqmrBap+8hJ4IKifd2ocXhuGzyl3tOKkpboTe
-Rmv8JxlQpRJ6jH1i/NrnzLyfSa8GuCcn8on3Fj0Y5r3e9YwSkZ/jBI3+BxQaWqw5
-ghvxOBnhY+OvbLamURfr+kvriyL2l/4QOl+UoEtTcT9a4RD4co+WgN2NApgAYT2N
-vC2xR8zaXeEgp4wxXPHj2rkKhkfIoT0Hozymc26Uke1uJDr5yTDRB6iBfSZ9fYTf
-hsmL5a4NHr6JSFEVg5iWL0rrczTXdM3Jb9DCuiv2mv6Z3WAUjhv5nDk8f0OJU+jl
-wqu+Iq0nOJt3KLejY2OngeepaUXrjnhWzAWEx/uttjB8YwWfLYwkf0uLkvw4Hp+g
-pVezbp3YZLhwmmBScMip0P/GnO0QYV7Ngw5u6E0CQUridgR51lQ/ipgyFKDdLZzn
-uoJxo4ZVKZnSKdt1OvfbQ/+2W/u3fjWAjg1srnm3Ni2XUqGwB5wH5Ss2zQOXlL0t
-DjQG/MAWifw3VOTWzz0TBPKR2ck2Lj7FWtClTILD/y58Jnb38/1FoqVuVa4uzM8s
-iTTa9g3nkagQ6hed8vbs
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMC
-VVMxFDASBgNVBAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQ
-cmVtaXVtIEVDQzAeFw0xMDAxMjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJ
-BgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1UcnVzdDEgMB4GA1UEAwwXQWZmaXJt
-VHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQNMF4bFZ0D
-0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQN8O9
-ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0G
-A1UdDgQWBBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4G
-A1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/Vs
-aobgxCd05DhT1wV/GzTjxi+zygk8N53X57hG8f2h4nECMEJZh0PUUd+60wkyWs6I
-flc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKMeQ==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEd
-MBsGA1UECgwUQnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3Mg
-Q2xhc3MgMiBSb290IENBMB4XDTEwMTAyNjA4MzgwM1oXDTQwMTAyNjA4MzgwM1ow
-TjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBhc3MgQVMtOTgzMTYzMzI3MSAw
-HgYDVQQDDBdCdXlwYXNzIENsYXNzIDIgUm9vdCBDQTCCAiIwDQYJKoZIhvcNAQEB
-BQADggIPADCCAgoCggIBANfHXvfBB9R3+0Mh9PT1aeTuMgHbo4Yf5FkNuud1g1Lr
-6hxhFUi7HQfKjK6w3Jad6sNgkoaCKHOcVgb/S2TwDCo3SbXlzwx87vFKu3MwZfPV
-L4O2fuPn9Z6rYPnT8Z2SdIrkHJasW4DptfQxh6NR/Md+oW+OU3fUl8FVM5I+GC91
-1K2GScuVr1QGbNgGE41b/+EmGVnAJLqBcXmQRFBoJJRfuLMR8SlBYaNByyM21cHx
-MlAQTn/0hpPshNOOvEu/XAFOBz3cFIqUCqTqc/sLUegTBxj6DvEr0VQVfTzh97QZ
-QmdiXnfgolXsttlpF9U6r0TtSsWe5HonfOV116rLJeffawrbD02TTqigzXsu8lkB
-arcNuAeBfos4GzjmCleZPe4h6KP1DBbdi+w0jpwqHAAVF41og9JwnxgIzRFo1clr
-Us3ERo/ctfPYV3Me6ZQ5BL/T3jjetFPsaRyifsSP5BtwrfKi+fv3FmRmaZ9JUaLi
-FRhnBkp/1Wy1TbMz4GHrXb7pmA8y1x1LPC5aAVKRCfLf6o3YBkBjqhHk/sM3nhRS
-P/TizPJhk9H9Z2vXUq6/aKtAQ6BXNVN48FP4YUIHZMbXb5tMOA1jrGKvNouicwoN
-9SG9dKpN6nIDSdvHXx1iY8f93ZHsM+71bbRuMGjeyNYmsHVee7QHIJihdjK4TWxP
-AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFMmAd+BikoL1Rpzz
-uvdMw964o605MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAU18h
-9bqwOlI5LJKwbADJ784g7wbylp7ppHR/ehb8t/W2+xUbP6umwHJdELFx7rxP462s
-A20ucS6vxOOto70MEae0/0qyexAQH6dXQbLArvQsWdZHEIjzIVEpMMpghq9Gqx3t
-OluwlN5E40EIosHsHdb9T7bWR9AUC8rmyrV7d35BH16Dx7aMOZawP5aBQW9gkOLo
-+fsicdl9sz1Gv7SEr5AcD48Saq/v7h56rgJKihcrdv6sVIkkLE8/trKnToyokZf7
-KcZ7XC25y2a2t6hbElGFtQl+Ynhw/qlqYLYdDnkM/crqJIByw5c/8nerQyIKx+u2
-DISCLIBrQYoIwOula9+ZEsuK1V6ADJHgJgg2SMX6OBE1/yWDLfJ6v9r9jv6ly0Us
-H8SIU653DtmadsWOLB2jutXsMq7Aqqz30XpN69QH4kj3Io6wpJ9qzo6ysmD0oyLQ
-I+uUWnpp3Q+/QFesa1lQ2aOZ4W7+jQF5JyMV3pKdewlNWudLSDBaGOYKbeaP4NK7
-5t98biGCwWg5TbSYWGZizEqQXsP6JwSxeRV0mcy+rSDeJmAc61ZRpqPq5KM/p/9h
-3PFaTWwyI0PurKju7koSCTxdccK+efrCh2gdC/1cacwG0Jp9VJkqyTkaGa9LKkPz
-Y11aWOIv4x3kqdbQCtCev9eBCfHJxyYNrJgWVqA=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFaTCCA1GgAwIBAgIJAMMDmu5QkG4oMA0GCSqGSIb3DQEBBQUAMFIxCzAJBgNV
-BAYTAlNLMRMwEQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMu
-MRkwFwYDVQQDExBDQSBEaXNpZyBSb290IFIxMB4XDTEyMDcxOTA5MDY1NloXDTQy
-MDcxOTA5MDY1NlowUjELMAkGA1UEBhMCU0sxEzARBgNVBAcTCkJyYXRpc2xhdmEx
-EzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERpc2lnIFJvb3QgUjEw
-ggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCqw3j33Jijp1pedxiy3QRk
-D2P9m5YJgNXoqqXinCaUOuiZc4yd39ffg/N4T0Dhf9Kn0uXKE5Pn7cZ3Xza1lK/o
-OI7bm+V8u8yN63Vz4STN5qctGS7Y1oprFOsIYgrY3LMATcMjfF9DCCMyEtztDK3A
-fQ+lekLZWnDZv6fXARz2m6uOt0qGeKAeVjGu74IKgEH3G8muqzIm1Cxr7X1r5OJe
-IgpFy4QxTaz+29FHuvlglzmxZcfe+5nkCiKxLU3lSCZpq+Kq8/v8kiky6bM+TR8n
-oc2OuRf7JT7JbvN32g0S9l3HuzYQ1VTW8+DiR0jm3hTaYVKvJrT1cU/J19IG32PK
-/yHoWQbgCNWEFVP3Q+V8xaCJmGtzxmjOZd69fwX3se72V6FglcXM6pM6vpmumwKj
-rckWtc7dXpl4fho5frLABaTAgqWjR56M6ly2vGfb5ipN0gTco65F97yLnByn1tUD
-3AjLLhbKXEAz6GfDLuemROoRRRw1ZS0eRWEkG4IupZ0zXWX4Qfkuy5Q/H6MMMSRE
-7cderVC6xkGbrPAXZcD4XW9boAo0PO7X6oifmPmvTiT6l7Jkdtqr9O3jw2Dv1fkC
-yC2fg69naQanMVXVz0tv/wQFx1isXxYb5dKj6zHbHzMVTdDypVP1y+E9Tmgt2BLd
-qvLmTZtJ5cUoobqwWsagtQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud
-DwEB/wQEAwIBBjAdBgNVHQ4EFgQUiQq0OJMa5qvum5EY+fU8PjXQ04IwDQYJKoZI
-hvcNAQEFBQADggIBADKL9p1Kyb4U5YysOMo6CdQbzoaz3evUuii+Eq5FLAR0rBNR
-xVgYZk2C2tXck8An4b58n1KeElb21Zyp9HWc+jcSjxyT7Ff+Bw+r1RL3D65hXlaA
-SfX8MPWbTx9BLxyE04nH4toCdu0Jz2zBuByDHBb6lM19oMgY0sidbvW9adRtPTXo
-HqJPYNcHKfyyo6SdbhWSVhlMCrDpfNIZTUJG7L399ldb3Zh+pE3McgODWF3vkzpB
-emOqfDqo9ayk0d2iLbYq/J8BjuIQscTK5GfbVSUZP/3oNn6z4eGBrxEWi1CXYBmC
-AMBrTXO40RMHPuq2MU/wQppt4hF05ZSsjYSVPCGvxdpHyN85YmLLW1AL14FABZyb
-7bq2ix4Eb5YgOe2kfSnbSM6C3NQCjR0EMVrHS/BsYVLXtFHCgWzN4funodKSds+x
-DzdYpPJScWc/DIh4gInByLUfkmO+p3qKViwaqKactV2zY9ATIKHrkWzQjX2v3wvk
-F7mGnjixlAxYjOBVqjtjbZqJYLhkKpLGN/R+Q0O3c+gB53+XD9fyexn9GtePyfqF
-a3qdnom2piiZk4hA9z7NUaPK6u95RyG1/jLix8NRb76AdPCkwzryT+lf3xkK8jsT
-Q6wxpLPn6/wY1gGp8yqPNg7rtLG8t0zJa7+h89n07eLw4+1knj0vllJPgFOL
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIID9jCCAt6gAwIBAgIQJDJ18h0v0gkz97RqytDzmDANBgkqhkiG9w0BAQsFADCB
-lDELMAkGA1UEBhMCVVMxHTAbBgNVBAoTFFN5bWFudGVjIENvcnBvcmF0aW9uMR8w
-HQYDVQQLExZTeW1hbnRlYyBUcnVzdCBOZXR3b3JrMUUwQwYDVQQDEzxTeW1hbnRl
-YyBDbGFzcyAxIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5
-IC0gRzYwHhcNMTExMDE4MDAwMDAwWhcNMzcxMjAxMjM1OTU5WjCBlDELMAkGA1UE
-BhMCVVMxHTAbBgNVBAoTFFN5bWFudGVjIENvcnBvcmF0aW9uMR8wHQYDVQQLExZT
-eW1hbnRlYyBUcnVzdCBOZXR3b3JrMUUwQwYDVQQDEzxTeW1hbnRlYyBDbGFzcyAx
-IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzYwggEi
-MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDHOddJZKmZgiJM6kXZBxbje/SD
-6Jlz+muxNuCad6BAwoGNAcfMjL2Pffd543pMA03Z+/2HOCgs3ZqLVAjbZ/sbjP4o
-ki++t7JIp4Gh2F6Iw8w5QEFa0dzl2hCfL9oBTf0uRnz5LicKaTfukaMbasxEvxvH
-w9QRslBglwm9LiL1QYRmn81ApqkAgMEflZKf3vNI79sdd2H8f9/ulqRy0LY+/3gn
-r8uSFWkI22MQ4uaXrG7crPaizh5HmbmJtxLmodTNWRFnw2+F2EJOKL5ZVVkElauP
-N4C/DfD8HzpkMViBeNfiNfYgPym4jxZuPkjctUwH4fIa6n4KedaovetdhitNAgMB
-AAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQW
-BBQzQejIORIVk0jyljIuWvXalF9TYDANBgkqhkiG9w0BAQsFAAOCAQEAFeNzV7EX
-tl9JaUSm9l56Z6zS3nVJq/4lVcc6yUQVEG6/MWvL2QeTfxyFYwDjMhLgzMv7OWyP
-4lPiPEAz2aSMR+atWPuJr+PehilWNCxFuBL6RIluLRQlKCQBZdbqUqwFblYSCT3Q
-dPTXvQbKqDqNVkL6jXI+dPEDct+HG14OelWWLDi3mIXNTTNEyZSPWjEwN0ujOhKz
-5zbRIWhLLTjmU64cJVYIVgNnhJ3Gw84kYsdMNs+wBkS39V8C3dlU6S+QTnrIToNA
-DJqXPDe/v+z28LSFdyjBC8hnghAXOKK3Buqbvzr46SMHv3TgmDgVVXjucgBcGaP0
-0jPg/73RVDkpDw==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFaTCCA1GgAwIBAgIJAJK4iNuwisFjMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNV
-BAYTAlNLMRMwEQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMu
-MRkwFwYDVQQDExBDQSBEaXNpZyBSb290IFIyMB4XDTEyMDcxOTA5MTUzMFoXDTQy
-MDcxOTA5MTUzMFowUjELMAkGA1UEBhMCU0sxEzARBgNVBAcTCkJyYXRpc2xhdmEx
-EzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERpc2lnIFJvb3QgUjIw
-ggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCio8QACdaFXS1tFPbCw3Oe
-NcJxVX6B+6tGUODBfEl45qt5WDza/3wcn9iXAng+a0EE6UG9vgMsRfYvZNSrXaNH
-PWSb6WiaxswbP7q+sos0Ai6YVRn8jG+qX9pMzk0DIaPY0jSTVpbLTAwAFjxfGs3I
-x2ymrdMxp7zo5eFm1tL7A7RBZckQrg4FY8aAamkw/dLukO8NJ9+flXP04SXabBbe
-QTg06ov80egEFGEtQX6sx3dOy1FU+16SGBsEWmjGycT6txOgmLcRK7fWV8x8nhfR
-yyX+hk4kLlYMeE2eARKmK6cBZW58Yh2EhN/qwGu1pSqVg8NTEQxzHQuyRpDRQjrO
-QG6Vrf/GlK1ul4SOfW+eioANSW1z4nuSHsPzwfPrLgVv2RvPN3YEyLRa5Beny912
-H9AZdugsBbPWnDTYltxhh5EF5EQIM8HauQhl1K6yNg3ruji6DOWbnuuNZt2Zz9aJ
-QfYEkoopKW1rOhzndX0CcQ7zwOe9yxndnWCywmZgtrEE7snmhrmaZkCo5xHtgUUD
-i/ZnWejBBhG93c+AAk9lQHhcR1DIm+YfgXvkRKhbhZri3lrVx/k6RGZL5DJUfORs
-nLMOPReisjQS1n6yqEm70XooQL6iFh/f5DcfEXP7kAplQ6INfPgGAVUzfbANuPT1
-rqVCV3w2EYx7XsQDnYx5nQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud
-DwEB/wQEAwIBBjAdBgNVHQ4EFgQUtZn4r7CU9eMg1gqtzk5WpC5uQu0wDQYJKoZI
-hvcNAQELBQADggIBACYGXnDnZTPIgm7ZnBc6G3pmsgH2eDtpXi/q/075KMOYKmFM
-tCQSin1tERT3nLXK5ryeJ45MGcipvXrA1zYObYVybqjGom32+nNjf7xueQgcnYqf
-GopTpti72TVVsRHFqQOzVju5hJMiXn7B9hJSi+osZ7z+Nkz1uM/Rs0mSO9MpDpkb
-lvdhuDvEK7Z4bLQjb/D907JedR+Zlais9trhxTF7+9FGs9K8Z7RiVLoJ92Owk6Ka
-+elSLotgEqv89WBW7xBci8QaQtyDW2QOy7W81k/BfDxujRNt+3vrMNDcTa/F1bal
-TFtxyegxvug4BkihGuLq0t4SOVga/4AOgnXmt8kHbA7v/zjxmHHEt38OFdAlab0i
-nSvtBfZGR6ztwPDUO+Ls7pZbkBNOHlY667DvlruWIxG68kOGdGSVyCh13x01utI3
-gzhTODY7z2zp+WsO0PsE6E9312UBeIYMej4hYvF/Y3EMyZ9E26gnonW+boE+18Dr
-G5gPcFw0sorMwIUY6256s/daoQe/qUKS82Ail+QUoQebTnbAjn39pCXHR+3/H3Os
-zMOl6W8KjptlwlCFtaOgUxLMVYdh84GuEEZhvUQhuMI9dM9+JDX6HAcOmz0iyu8x
-L4ysEr3vQCj8KWefshNPZiTEUxnpHikV7+ZtsH8tZ/3zbBt1RqPlShfppNcL
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEh
-MB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBE
-YWRkeSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA0MDYyOTE3
-MDYyMFoXDTM0MDYyOTE3MDYyMFowYzELMAkGA1UEBhMCVVMxITAfBgNVBAoTGFRo
-ZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28gRGFkZHkgQ2xhc3Mg
-MiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASAwDQYJKoZIhvcNAQEBBQADggEN
-ADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWizV3GgXne77ZtJ6XCA
-PVYYYwhv2vLM0D9/AlQiVBDYsoHUwHU9S3/Hd8M+eKsaA7Ugay9qK7HFiH7Eux6w
-wdhFJ2+qN1j3hybX2C32qRe3H3I2TqYXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXi
-EqITLdiOr18SPaAIBQi2XKVlOARFmR6jYGB0xUGlcmIbYsUfb18aQr4CUWWoriMY
-avx4A6lNf4DD+qta/KFApMoZFv6yyO9ecw3ud72a9nmYvLEHZ6IVDd2gWMZEewo+
-YihfukEHU1jPEX44dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0OBBYEFNLE
-sNKR1EwRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h
-/t2oatTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5
-IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmlj
-YXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD
-ggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wimPQoZ+YeAEW5p5JYXMP80kWNy
-OO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKtI3lpjbi2Tc7P
-TMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ
-HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mER
-dEr/VxqHD3VILs9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5Cuf
-ReYNnyicsbkqWletNw+vHX/bvZ8=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEGjCCAwKgAwIBAgIDAYagMA0GCSqGSIb3DQEBBQUAMIGjMQswCQYDVQQGEwJG
-STEQMA4GA1UECBMHRmlubGFuZDEhMB8GA1UEChMYVmFlc3RvcmVraXN0ZXJpa2Vz
-a3VzIENBMSkwJwYDVQQLEyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBTZXJ2aWNl
-czEZMBcGA1UECxMQVmFybWVubmVwYWx2ZWx1dDEZMBcGA1UEAxMQVlJLIEdvdi4g
-Um9vdCBDQTAeFw0wMjEyMTgxMzUzMDBaFw0yMzEyMTgxMzUxMDhaMIGjMQswCQYD
-VQQGEwJGSTEQMA4GA1UECBMHRmlubGFuZDEhMB8GA1UEChMYVmFlc3RvcmVraXN0
-ZXJpa2Vza3VzIENBMSkwJwYDVQQLEyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBT
-ZXJ2aWNlczEZMBcGA1UECxMQVmFybWVubmVwYWx2ZWx1dDEZMBcGA1UEAxMQVlJL
-IEdvdi4gUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALCF
-FdrIAzfQo0Y3bBseljDCWoUSZyPyu5/nioFgJ/gTqTy894aqqvTzJSm0/nWuHoGG
-igWyHWWyOOi0zCia+xc28ZPVec7Bg4shT8MNrUHfeJ1I4x9CRPw8bSEga60ihCRC
-jxdNwlAfZM0tOSJWiP2yY51U2kJpwMhP1xjiPshphJQ9LIDGfM6911Mf64i5psu7
-hVfvV3ZdDIvTXhJBnyHAOfQmbQj6OLOhd7HuFtjQaNq0mKWgZUZKa41+qk1guPjI
-DfxxPu45h4G02fhukO4/DmHXHSto5i7hQkQmeCxY8n0Wf2HASSQqiYe2XS8pGfim
-545SnkFLWg6quMJmQlMCAwEAAaNVMFMwDwYDVR0TAQH/BAUwAwEB/zARBglghkgB
-hvhCAQEEBAMCAAcwDgYDVR0PAQH/BAQDAgHGMB0GA1UdDgQWBBTb6eGb0tEkC/yr
-46Bn6q6cS3f0sDANBgkqhkiG9w0BAQUFAAOCAQEArX1ID1QRnljurw2bEi8hpM2b
-uoRH5sklVSPj3xhYKizbXvfNVPVRJHtiZ+GxH0mvNNDrsczZog1Sf0JLiGCXzyVy
-t08pLWKfT6HAVVdWDsRol5EfnGTCKTIB6dTI2riBmCguGMcs/OubUpbf9MiQGS0j
-8/G7cdqehSO9Gu8u5Hp5t8OdhkktY7ktdM9lDzJmid87Ie4pbzlj2RXBbvbfgD5Q
-eBmK3QOjFKU3p7UsfLYRh+cF8ry23tT/l4EohP7+bEaFEEGfTXWMB9SZZ291im/k
-UJL2mdUQuMSpe/cXjUu/15WfCdxEDx4yw8DP03kN5Mc7h/CQNIghYkmSBAQfvA==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDujCCAqKgAwIBAgIEAJiWijANBgkqhkiG9w0BAQUFADBVMQswCQYDVQQGEwJO
-TDEeMBwGA1UEChMVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSYwJAYDVQQDEx1TdGFh
-dCBkZXIgTmVkZXJsYW5kZW4gUm9vdCBDQTAeFw0wMjEyMTcwOTIzNDlaFw0xNTEy
-MTYwOTE1MzhaMFUxCzAJBgNVBAYTAk5MMR4wHAYDVQQKExVTdGFhdCBkZXIgTmVk
-ZXJsYW5kZW4xJjAkBgNVBAMTHVN0YWF0IGRlciBOZWRlcmxhbmRlbiBSb290IENB
-MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmNK1URF6gaYUmHFtvszn
-ExvWJw56s2oYHLZhWtVhCb/ekBPHZ+7d89rFDBKeNVU+LCeIQGv33N0iYfXCxw71
-9tV2U02PjLwYdjeFnejKScfST5gTCaI+Ioicf9byEGW07l8Y1Rfj+MX94p2i71MO
-hXeiD+EwR+4A5zN9RGcaC1Hoi6CeUJhoNFIfLm0B8mBF8jHrqTFoKbt6QZ7GGX+U
-tFE5A3+y3qcym7RHjm+0Sq7lr7HcsBthvJly3uSJt3omXdozSVtSnA71iq3DuD3o
-BmrC1SoLbHuEvVYFy4ZlkuxEK7COudxwC0barbxjiDn622r+I/q85Ej0ZytqERAh
-SQIDAQABo4GRMIGOMAwGA1UdEwQFMAMBAf8wTwYDVR0gBEgwRjBEBgRVHSAAMDww
-OgYIKwYBBQUHAgEWLmh0dHA6Ly93d3cucGtpb3ZlcmhlaWQubmwvcG9saWNpZXMv
-cm9vdC1wb2xpY3kwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBSofeu8Y6R0E3QA
-7Jbg0zTBLL9s+DANBgkqhkiG9w0BAQUFAAOCAQEABYSHVXQ2YcG70dTGFagTtJ+k
-/rvuFbQvBgwp8qiSpGEN/KtcCFtREytNwiphyPgJWPwtArI5fZlmgb9uXJVFIGzm
-eafR2Bwp/MIgJ1HI8XxdNGdphREwxgDS1/PTfLbwMVcoEoJz6TMvplW0C5GUR5z6
-u3pCMuiufi3IvKwUv9kP2Vv8wfl6leF9fpb8cbDCTMjfRTTJzg3ynGQI0DvDKcWy
-7ZAEwbEpkcUwb8GpcjPM/l0WFywRaed+/sWDCN+83CI6LiBpIzlWYGeQiy52OfsR
-iJf2fL1LuCAWZwWN4jvBcj+UlTfHXbme2JOhF4//DGYVwSR8MnwDHTuhWEUykw==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJKUDEl
-MCMGA1UEChMcU0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UECxMe
-U2VjdXJpdHkgQ29tbXVuaWNhdGlvbiBSb290Q0EyMB4XDTA5MDUyOTA1MDAzOVoX
-DTI5MDUyOTA1MDAzOVowXTELMAkGA1UEBhMCSlAxJTAjBgNVBAoTHFNFQ09NIFRy
-dXN0IFN5c3RlbXMgQ08uLExURC4xJzAlBgNVBAsTHlNlY3VyaXR5IENvbW11bmlj
-YXRpb24gUm9vdENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANAV
-OVKxUrO6xVmCxF1SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGr
-zbl+dp+++T42NKA7wfYxEUV0kz1XgMX5iZnK5atq1LXaQZAQwdbWQonCv/Q4EpVM
-VAX3NuRFg3sUZdbcDE3R3n4MqzvEFb46VqZab3ZpUql6ucjrappdUtAtCms1FgkQ
-hNBqyjoGADdH5H5XTz+L62e4iKrFvlNVspHEfbmwhRkGeC7bYRr6hfVKkaHnFtWO
-ojnflLhwHyg/i/xAXmODPIMqGplrz95Zajv8bxbXH/1KEOtOghY6rCcMU/Gt1SSw
-awNQwS08Ft1ENCcadfsCAwEAAaNCMEAwHQYDVR0OBBYEFAqFqXdlBZh8QIH4D5cs
-OPEK7DzPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3
-DQEBCwUAA4IBAQBMOqNErLlFsceTfsgLCkLfZOoc7llsCLqJX2rKSpWeeo8HxdpF
-coJxDjrSzG+ntKEju/Ykn8sX/oymzsLS28yN/HH8AynBbF0zX2S2ZTuJbxh2ePXc
-okgfGT+Ok+vx+hfuzU7jBBJV1uXk3fs+BXziHV7Gp7yXT2g69ekuCkO2r1dcYmh8
-t/2jioSgrGK+KwmHNPBqAbubKVY8/gA3zyNs8U6qtnRGEmyR7jTV7JqR50S+kDFy
-1UkC9gLl9B/rfNmWVan/7Ir5mUf/NVoCqgTLiluHcSmRvaS0eg29mvVXIwAHIRc/
-SjnRBUkLp7Y3gaVdjKozXoEofKd9J+sAro03
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEHjCCAwagAwIBAgIBATANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJTRTEU
-MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3
-b3JrMSMwIQYDVQQDExpBZGRUcnVzdCBRdWFsaWZpZWQgQ0EgUm9vdDAeFw0wMDA1
-MzAxMDQ0NTBaFw0yMDA1MzAxMDQ0NTBaMGcxCzAJBgNVBAYTAlNFMRQwEgYDVQQK
-EwtBZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQIE5ldHdvcmsxIzAh
-BgNVBAMTGkFkZFRydXN0IFF1YWxpZmllZCBDQSBSb290MIIBIjANBgkqhkiG9w0B
-AQEFAAOCAQ8AMIIBCgKCAQEA5B6a/twJWoekn0e+EV+vhDTbYjx5eLfpMLXsDBwq
-xBb/4Oxx64r1EW7tTw2R0hIYLUkVAcKkIhPHEWT/IhKauY5cLwjPcWqzZwFZ8V1G
-87B4pfYOQnrjfxvM0PC3KP0q6p6zsLkEqv32x7SxuCqg+1jxGaBvcCV+PmlKfw8i
-2O+tCBGaKZnhqkRFmhJePp1tUvznoD1oL/BLcHwTOK28FSXx1s6rosAx1i+f4P8U
-WfyEk9mHfExUE+uf0S0R+Bg6Ot4l2ffTQO2kBhLEO+GRwVY18BTcZTYJbqukB8c1
-0cIDMzZbdSZtQvESa0NvS3GU+jQd7RNuyoB/mC9suWXY6QIDAQABo4HUMIHRMB0G
-A1UdDgQWBBQ5lYtii1zJ1IC6WA+XPxUIQ8yYpzALBgNVHQ8EBAMCAQYwDwYDVR0T
-AQH/BAUwAwEB/zCBkQYDVR0jBIGJMIGGgBQ5lYtii1zJ1IC6WA+XPxUIQ8yYp6Fr
-pGkwZzELMAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQL
-ExRBZGRUcnVzdCBUVFAgTmV0d29yazEjMCEGA1UEAxMaQWRkVHJ1c3QgUXVhbGlm
-aWVkIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBABmrder4i2VhlRO6aQTv
-hsoToMeqT2QbPxj2qC0sVY8FtzDqQmodwCVRLae/DLPt7wh/bDxGGuoYQ992zPlm
-hpwsaPXpF/gxsxjE1kh9I0xowX67ARRvxdlu3rsEQmr49lx95dr6h+sNNVJn0J6X
-dgWTP5XHAeZpVTh/EGGZyeNfpso+gmNIquIISD6q8rKFYqa0p9m9N5xotS1WfbC3
-P6CxB9bpT9zeRXEwMn8bLgn5v1Kh7sKAPgZcLlVAwRv1cEWw3F369nJad9Jjzc9Y
-iQBCYz95OdBEsIJuQRno3eDBiFrRHnGTHyQwdOUeqN48Jzd/g66ed8/wMLH/S5no
-xqE=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIEXDCCA0SgAwIBAgIEOGO5ZjANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChML
-RW50cnVzdC5uZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBp
-bmNvcnAuIGJ5IHJlZi4gKGxpbWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5
-IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNVBAMTKkVudHJ1c3QubmV0IENlcnRp
-ZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQxNzUwNTFaFw0xOTEy
-MjQxODIwNTFaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3d3d3
-LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxp
-YWIuKTElMCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEG
-A1UEAxMqRW50cnVzdC5uZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgp
-MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArU1LqRKGsuqjIAcVFmQq
-K0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOLGp18EzoOH1u3Hs/lJBQe
-sYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSrhRSGlVuX
-MlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVT
-XTzWnLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/
-HoZdenoVve8AjhUiVBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH
-4QIDAQABo3QwcjARBglghkgBhvhCAQEEBAMCAAcwHwYDVR0jBBgwFoAUVeSB0RGA
-vtiJuQijMfmhJAkWuXAwHQYDVR0OBBYEFFXkgdERgL7YibkIozH5oSQJFrlwMB0G
-CSqGSIb2fQdBAAQQMA4bCFY1LjA6NC4wAwIEkDANBgkqhkiG9w0BAQUFAAOCAQEA
-WUesIYSKF8mciVMeuoCFGsY8Tj6xnLZ8xpJdGGQC49MGCBFhfGPjK50xA3B20qMo
-oPS7mmNz7W3lKtvtFKkrxjYR0CvrB4ul2p5cGZ1WEvVUKcgF7bISKo30Axv/55IQ
-h7A6tcOdBTcSo8f0FbnVpDkWm1M6I5HxqIKiaohowXkCIryqptau37AUX7iH0N18
-f3v/rxzP5tsHrV7bhZ3QKw0z2wTR5klAEyt2+z7pnIkPFc4YsIV4IU9rTw76NmfN
-B/L/CNDi3tm/Kq+4h4YhPATKt5Rof8886ZjXOP/swNlQ8C5LWK5Gb9Auw2DaclVy
-vUxFnmG6v4SBkgPR0ml8xQ==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFkjCCA3qgAwIBAgIIAeDltYNno+AwDQYJKoZIhvcNAQEMBQAwZzEbMBkGA1UE
-AwwSQXBwbGUgUm9vdCBDQSAtIEcyMSYwJAYDVQQLDB1BcHBsZSBDZXJ0aWZpY2F0
-aW9uIEF1dGhvcml0eTETMBEGA1UECgwKQXBwbGUgSW5jLjELMAkGA1UEBhMCVVMw
-HhcNMTQwNDMwMTgxMDA5WhcNMzkwNDMwMTgxMDA5WjBnMRswGQYDVQQDDBJBcHBs
-ZSBSb290IENBIC0gRzIxJjAkBgNVBAsMHUFwcGxlIENlcnRpZmljYXRpb24gQXV0
-aG9yaXR5MRMwEQYDVQQKDApBcHBsZSBJbmMuMQswCQYDVQQGEwJVUzCCAiIwDQYJ
-KoZIhvcNAQEBBQADggIPADCCAgoCggIBANgREkhI2imKScUcx+xuM23+TfvgHN6s
-XuI2pyT5f1BrTM65MFQn5bPW7SXmMLYFN14UIhHF6Kob0vuy0gmVOKTvKkmMXT5x
-ZgM4+xb1hYjkWpIMBDLyyED7Ul+f9sDx47pFoFDVEovy3d6RhiPw9bZyLgHaC/Yu
-OQhfGaFjQQscp5TBhsRTL3b2CtcM0YM/GlMZ81fVJ3/8E7j4ko380yhDPLVoACVd
-J2LT3VXdRCCQgzWTxb+4Gftr49wIQuavbfqeQMpOhYV4SbHXw8EwOTKrfl+q04tv
-ny0aIWhwZ7Oj8ZhBbZF8+NfbqOdfIRqMM78xdLe40fTgIvS/cjTf94FNcX1RoeKz
-8NMoFnNvzcytN31O661A4T+B/fc9Cj6i8b0xlilZ3MIZgIxbdMYs0xBTJh0UT8TU
-gWY8h2czJxQI6bR3hDRSj4n4aJgXv8O7qhOTH11UL6jHfPsNFL4VPSQ08prcdUFm
-IrQB1guvkJ4M6mL4m1k8COKWNORj3rw31OsMiANDC1CvoDTdUE0V+1ok2Az6DGOe
-HwOx4e7hqkP0ZmUoNwIx7wHHHtHMn23KVDpA287PT0aLSmWaasZobNfMmRtHsHLD
-d4/E92GcdB/O/WuhwpyUgquUoue9G7q5cDmVF8Up8zlYNPXEpMZ7YLlmQ1A/bmH8
-DvmGqmAMQ0uVAgMBAAGjQjBAMB0GA1UdDgQWBBTEmRNsGAPCe8CjoA1/coB6HHcm
-jTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQwF
-AAOCAgEAUabz4vS4PZO/Lc4Pu1vhVRROTtHlznldgX/+tvCHM/jvlOV+3Gp5pxy+
-8JS3ptEwnMgNCnWefZKVfhidfsJxaXwU6s+DDuQUQp50DhDNqxq6EWGBeNjxtUVA
-eKuowM77fWM3aPbn+6/Gw0vsHzYmE1SGlHKy6gLti23kDKaQwFd1z4xCfVzmMX3z
-ybKSaUYOiPjjLUKyOKimGY3xn83uamW8GrAlvacp/fQ+onVJv57byfenHmOZ4VxG
-/5IFjPoeIPmGlFYl5bRXOJ3riGQUIUkhOb9iZqmxospvPyFgxYnURTbImHy99v6Z
-SYA7LNKmp4gDBDEZt7Y6YUX6yfIjyGNzv1aJMbDZfGKnexWoiIqrOEDCzBL/FePw
-N983csvMmOa/orz6JopxVtfnJBtIRD6e/J/JzBrsQzwBvDR4yGn1xuZW7AYJNpDr
-FEobXsmII9oDMJELuDY++ee1KG++P+w8j2Ud5cAeh6Squpj9kuNsJnfdBrRkBof0
-Tta6SqoWqPQFZ2aWuuJVecMsXUmPgEkrihLHdoBR37q9ZV0+N0djMenl9MU/S60E
-inpxLK8JQzcPqOMyT/RFtm2XNuyE9QoB6he7hY1Ck3DDUOUUi78/w0EP3SIEIwiK
-um1xRKtzCTrJ+VKACd+66eYWyi4uTLLT3OUEVLLUNIAytbwPF+E=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDtDCCApygAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJKUDEc
-MBoGA1UEChMTSmFwYW5lc2UgR292ZXJubWVudDEOMAwGA1UECxMFTVBIUFQxJjAk
-BgNVBAsTHU1QSFBUIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTAyMDMxNDA3
-NTAyNloXDTEyMDMxMzE0NTk1OVowYzELMAkGA1UEBhMCSlAxHDAaBgNVBAoTE0ph
-cGFuZXNlIEdvdmVybm1lbnQxDjAMBgNVBAsTBU1QSFBUMSYwJAYDVQQLEx1NUEhQ
-VCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEP
-ADCCAQoCggEBAI3GUWlK9G9FVm8DhpKu5t37oxZbj6lZcFvEZY07YrYojWO657ub
-z56WE7q/PI/6Sm7i7qYE+Vp80r6thJvfmn7SS3BENrRqiapSenhooYD12jIe3iZQ
-2SXqx7WgYwyBGdQwGaYTijzbRFpgc0K8o4a99fIoHhz9J8AKqXasddMCqfJRaH30
-YJ7HnOvRYGL6HBrGhJ7X4Rzijyk9a9+3VOBsYcnIlx9iODoiYhA6r0ojuIu8/JA1
-oTTZrS0MyU/SLdFdJze2O1wnqTULXQybzJz3ad6oC/F5a69c0m92akYd9nGBrPxj
-EhucaQynC/QoCLs3aciLgioAnEJqy7i3EgUCAwEAAaNzMHEwHwYDVR0jBBgwFoAU
-YML3pLoA0h93Yngl8Gb/UgAh73owHQYDVR0OBBYEFGDC96S6ANIfd2J4JfBm/1IA
-Ie96MAwGA1UdEwQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQE
-AwIABTANBgkqhkiG9w0BAQUFAAOCAQEANPR8DN66iWZBs/lSm1vOzhqRkXDLT6xL
-LvJtjPLqmE469szGyFSKzsof6y+/8YgZlOoeX1inF4ox/SH1ATnwdIIsPbXuRLjt
-axboXvBh5y2ffC3hmzJVvJ87tb6mVWQeL9VFUhNhAI0ib+9OIZVEYI/64MFkDk4e
-iWG5ts6oqIJH1V7dVZg6pQ1Tc0Ckhn6N1m1hD30S0/zoPn/20Wq6OCF3he8VJrRG
-dcW9BD/Bkesko1HKhMBDjHVrJ8cFwbnDSoo+Ki47eJWaz/cOzaSsaMVUsR5POava
-/abhhgHn/eOJdXiVslyK0DYscjsdB3aBUfwZlomxYOzG6CgjQPhJdw==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIID9zCCAt+gAwIBAgILMTI1MzcyODI4MjgwDQYJKoZIhvcNAQELBQAwWDELMAkG
-A1UEBhMCSlAxHDAaBgNVBAoTE0phcGFuZXNlIEdvdmVybm1lbnQxDTALBgNVBAsT
-BEdQS0kxHDAaBgNVBAMTE0FwcGxpY2F0aW9uQ0EyIFJvb3QwHhcNMTMwMzEyMTUw
-MDAwWhcNMzMwMzEyMTUwMDAwWjBYMQswCQYDVQQGEwJKUDEcMBoGA1UEChMTSmFw
-YW5lc2UgR292ZXJubWVudDENMAsGA1UECxMER1BLSTEcMBoGA1UEAxMTQXBwbGlj
-YXRpb25DQTIgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKaq
-rSVl1gAR1uh6dqr05rRL88zDUrSNrKZPtZJxb0a11a2LEiIXJc5F6BR6hZrkIxCo
-+rFnUOVtR+BqiRPjrq418fRCxQX3TZd+PCj8sCaRHoweOBqW3FhEl2LjMsjRFUFN
-dZh4vqtoqV7tR76kuo6hApfek3SZbWe0BSXulMjtqqS6MmxCEeu+yxcGkOGThchk
-KM4fR8fAXWDudjbcMztR63vPctgPeKgZggiQPhqYjY60zxU2pm7dt+JNQCBT2XYq
-0HisifBPizJtROouurCp64ndt295D6uBbrjmiykLWa+2SQ1RLKn9nShjZrhwlXOa
-2Po7M7xCQhsyrLEy+z0CAwEAAaOBwTCBvjAdBgNVHQ4EFgQUVqesqgIdsqw9kA6g
-by5Bxnbne9owDgYDVR0PAQH/BAQDAgEGMHwGA1UdEQR1MHOkcTBvMQswCQYDVQQG
-EwJKUDEYMBYGA1UECgwP5pel5pys5Zu95pS/5bqcMRswGQYDVQQLDBLmlL/lupzo
-qo3oqLzln7rnm6QxKTAnBgNVBAMMIOOCouODl+ODquOCseODvOOCt+ODp+ODs0NB
-MiBSb290MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAH+aCXWs
-B9FydC53VzDCBJzUgKaD56WgG5/+q/OAvdVKo6GPtkxgEefK4WCB10jBIFmlYTKL
-nZ6X02aD2mUuWD7b5S+lzYxzplG+WCigeVxpL0PfY7KJR8q73rk0EWOgDiUX5Yf0
-HbCwpc9BqHTG6FPVQvSCLVMJEWgmcZR1E02qdog8dLHW40xPYsNJTE5t8XB+w3+m
-Bcx4m+mB26jIx1ye/JKSLaaX8ji1bnOVDMA/zqaUMLX6BbfeniCq/BNkyYq6ZO/i
-Y+TYmK5rtT6mVbgzPixy+ywRAPtbFi+E0hOe+gXFwctyTiLdhMpLvNIthhoEdlkf
-SUJiOxMfFui61/0=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV
-UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy
-dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1
-MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx
-dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B
-AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f
-BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A
-cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC
-AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ
-MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm
-aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw
-ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj
-IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF
-MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA
-A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y
-7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh
-1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIICrjCCAjWgAwIBAgIQPLL0SAoA4v7rJDteYD7DazAKBggqhkjOPQQDAzCBmDEL
-MAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChj
-KSAyMDA3IEdlb1RydXN0IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2
-MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0
-eSAtIEcyMB4XDTA3MTEwNTAwMDAwMFoXDTM4MDExODIzNTk1OVowgZgxCzAJBgNV
-BAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykgMjAw
-NyBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNV
-BAMTLUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBH
-MjB2MBAGByqGSM49AgEGBSuBBAAiA2IABBWx6P0DFUPlrOuHNxFi79KDNlJ9RVcL
-So17VDs6bl8VAsBQps8lL33KSLjHUGMcKiEIfJo22Av+0SbFWDEwKCXzXV2juLal
-tJLtbCyf691DiaI8S0iRHVDsJt/WYC69IaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAO
-BgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBVfNVdRVfslsq0DafwBo/q+EVXVMAoG
-CCqGSM49BAMDA2cAMGQCMGSWWaboCd6LuvpaiIjwH5HTRqjySkwCY/tsXzjbLkGT
-qQ7mndwxHLKgpxgceeHHNgIwOlavmnRs9vuD4DPTCF+hnMJbn0bWtsuRBmOiBucz
-rD6ogRLQy7rQkgu2npaqBA+K
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIFcDCCA1igAwIBAgIEAJiWjTANBgkqhkiG9w0BAQsFADBYMQswCQYDVQQGEwJO
-TDEeMBwGA1UECgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSkwJwYDVQQDDCBTdGFh
-dCBkZXIgTmVkZXJsYW5kZW4gRVYgUm9vdCBDQTAeFw0xMDEyMDgxMTE5MjlaFw0y
-MjEyMDgxMTEwMjhaMFgxCzAJBgNVBAYTAk5MMR4wHAYDVQQKDBVTdGFhdCBkZXIg
-TmVkZXJsYW5kZW4xKTAnBgNVBAMMIFN0YWF0IGRlciBOZWRlcmxhbmRlbiBFViBS
-b290IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA48d+ifkkSzrS
-M4M1LGns3Amk41GoJSt5uAg94JG6hIXGhaTK5skuU6TJJB79VWZxXSzFYGgEt9nC
-UiY4iKTWO0Cmws0/zZiTs1QUWJZV1VD+hq2kY39ch/aO5ieSZxeSAgMs3NZmdO3d
-Z//BYY1jTw+bbRcwJu+r0h8QoPnFfxZpgQNH7R5ojXKhTbImxrpsX23Wr9GxE46p
-rfNeaXUmGD5BKyF/7otdBwadQ8QpCiv8Kj6GyzyDOvnJDdrFmeK8eEEzduG/L13l
-pJhQDBXd4Pqcfzho0LKmeqfRMb1+ilgnQ7O6M5HTp5gVXJrm0w912fxBmJc+qiXb
-j5IusHsMX/FjqTf5m3VpTCgmJdrV8hJwRVXj33NeN/UhbJCONVrJ0yPr08C+eKxC
-KFhmpUZtcALXEPlLVPxdhkqHz3/KRawRWrUgUY0viEeXOcDPusBCAUCZSCELa6fS
-/ZbV0b5GnUngC6agIk440ME8MLxwjyx1zNDFjFE7PZQIZCZhfbnDZY8UnCHQqv0X
-cgOPvZuM5l5Tnrmd74K74bzickFbIZTTRTeU0d8JOV3nI6qaHcptqAqGhYqCvkIH
-1vI4gnPah1vlPNOePqc7nvQDs/nxfRN0Av+7oeX6AHkcpmZBiFxgV6YuCcS6/ZrP
-px9Aw7vMWgpVSzs4dlG4Y4uElBbmVvMCAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB
-/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFP6rAJCYniT8qcwaivsnuL8wbqg7
-MA0GCSqGSIb3DQEBCwUAA4ICAQDPdyxuVr5Os7aEAJSrR8kN0nbHhp8dB9O2tLsI
-eK9p0gtJ3jPFrK3CiAJ9Brc1AsFgyb/E6JTe1NOpEyVa/m6irn0F3H3zbPB+po3u
-2dfOWBfoqSmuc0iH55vKbimhZF8ZE/euBhD/UcabTVUlT5OZEAFTdfETzsemQUHS
-v4ilf0X8rLiltTMMgsT7B/Zq5SWEXwbKwYY5EdtYzXc7LMJMD16a4/CrPmEbUCTC
-wPTxGfARKbalGAKb12NMcIxHowNDXLldRqANb/9Zjr7dn3LDWyvfjFvO5QxGbJKy
-CqNMVEIYFRIYvdr8unRu/8G2oGTYqV9Vrp9canaW2HNnh/tNf1zuacpzEPuKqf2e
-vTY4SUmH9A4U8OmHuD+nT3pajnnUk+S7aFKErGzp85hwVXIy+TSrK0m1zSBi5Dp6
-Z2Orltxtrpfs/J92VoguZs9btsmksNcFuuEnL5O7Jiqik7Ab846+HUCjuTaPPoIa
-Gl6I6lD4WeKDRikL40Rc4ZW2aZCaFG+XroHPaO+Zmr615+F/+PoTRxZMzG0IQOeL
-eG9QgkRQP2YGiqtDhFZKDyAthg710tvSeopLzaXoTvFeJiUBWSOgftL2fiFX1ye8
-FVdMpEbB4IMeDExNH08GGeL5qPQ6gqGyeUN51q1veieQA6TqJIc/2b3Z6fJfUEkc
-7uzXLg==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDnzCCAoegAwIBAgIBJjANBgkqhkiG9w0BAQUFADBxMQswCQYDVQQGEwJERTEc
-MBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxlU2Vj
-IFRydXN0IENlbnRlcjEjMCEGA1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBSb290IENB
-IDIwHhcNOTkwNzA5MTIxMTAwWhcNMTkwNzA5MjM1OTAwWjBxMQswCQYDVQQGEwJE
-RTEcMBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxl
-U2VjIFRydXN0IENlbnRlcjEjMCEGA1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBSb290
-IENBIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCrC6M14IspFLEU
-ha88EOQ5bzVdSq7d6mGNlUn0b2SjGmBmpKlAIoTZ1KXleJMOaAGtuU1cOs7TuKhC
-QN/Po7qCWWqSG6wcmtoIKyUn+WkjR/Hg6yx6m/UTAtB+NHzCnjwAWav12gz1Mjwr
-rFDa1sPeg5TKqAyZMg4ISFZbavva4VhYAUlfckE8FQYBjl2tqriTtM2e66foai1S
-NNs671x1Udrb8zH57nGYMsRUFUQM+ZtV7a3fGAigo4aKSe5TBY8ZTNXeWHmb0moc
-QqvF1afPaA+W5OFhmHZhyJF81j4A4pFQh+GdCuatl9Idxjp9y7zaAzTVjlsB9WoH
-txa2bkp/AgMBAAGjQjBAMB0GA1UdDgQWBBQxw3kbuvVT1xfgiXotF2wKsyudMzAP
-BgNVHRMECDAGAQH/AgEFMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOC
-AQEAlGRZrTlk5ynrE/5aw4sTV8gEJPB0d8Bg42f76Ymmg7+Wgnxu1MM9756Abrsp
-tJh6sTtU6zkXR34ajgv8HzFZMQSyzhfzLMdiNlXiItiJVbSYSKpk+tYcNthEeFpa
-IzpXl/V6ME+un2pMSyuOoAPjPuCp1NJ70rOo4nI8rZ7/gFnkm0W09juwzTkZmDLl
-6iFhkOQxIY40sfcvNUqFENrnijchvllj4PKFiDFT1FQUhXB59C4Gdyd1Lx+4ivn+
-xbrYNuSD7Odlt79jWvNGr4GUN9RBjNYj1h7P9WgbRGOiWrqnNVmh5XAFmw4jV5mU
-Cm26OWMohpLzGITY+9HPBVZkVw==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIGSzCCBDOgAwIBAgIIamg+nFGby1MwDQYJKoZIhvcNAQELBQAwgbIxCzAJBgNV
-BAYTAlRSMQ8wDQYDVQQHDAZBbmthcmExQDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBC
-aWxpxZ9pbSBUZWtub2xvamlsZXJpIHZlIEhpem1ldGxlcmkgQS7Fni4xJjAkBgNV
-BAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBNZXJrZXppMSgwJgYDVQQDDB9FLVR1
-Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTEzMDMwNTEyMDk0OFoXDTIz
-MDMwMzEyMDk0OFowgbIxCzAJBgNVBAYTAlRSMQ8wDQYDVQQHDAZBbmthcmExQDA+
-BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamlsZXJpIHZlIEhp
-em1ldGxlcmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBN
-ZXJrZXppMSgwJgYDVQQDDB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5
-MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA4vU/kwVRHoViVF56C/UY
-B4Oufq9899SKa6VjQzm5S/fDxmSJPZQuVIBSOTkHS0vdhQd2h8y/L5VMzH2nPbxH
-D5hw+IyFHnSOkm0bQNGZDbt1bsipa5rAhDGvykPL6ys06I+XawGb1Q5KCKpbknSF
-Q9OArqGIW66z6l7LFpp3RMih9lRozt6Plyu6W0ACDGQXwLWTzeHxE2bODHnv0ZEo
-q1+gElIwcxmOj+GMB6LDu0rw6h8VqO4lzKRG+Bsi77MOQ7osJLjFLFzUHPhdZL3D
-k14opz8n8Y4e0ypQBaNV2cvnOVPAmJ6MVGKLJrD3fY185MaeZkJVgkfnsliNZvcH
-fC425lAcP9tDJMW/hkd5s3kc91r0E+xs+D/iWR+V7kI+ua2oMoVJl0b+SzGPWsut
-dEcf6ZG33ygEIqDUD13ieU/qbIWGvaimzuT6w+Gzrt48Ue7LE3wBf4QOXVGUnhMM
-ti6lTPk5cDZvlsouDERVxcr6XQKj39ZkjFqzAQqptQpHF//vkUAqjqFGOjGY5RH8
-zLtJVor8udBhmm9lbObDyz51Sf6Pp+KJxWfXnUYTTjF2OySznhFlhqt/7x3U+Lzn
-rFpct1pHXFXOVbQicVtbC/DP3KBhZOqp12gKY6fgDT+gr9Oq0n7vUaDmUStVkhUX
-U8u3Zg5mTPj5dUyQ5xJwx0UCAwEAAaNjMGEwHQYDVR0OBBYEFC7j27JJ0JxUeVz6
-Jyr+zE7S6E5UMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAULuPbsknQnFR5
-XPonKv7MTtLoTlQwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBCwUAA4ICAQAF
-Nzr0TbdF4kV1JI+2d1LoHNgQk2Xz8lkGpD4eKexd0dCrfOAKkEh47U6YA5n+KGCR
-HTAduGN8qOY1tfrTYXbm1gdLymmasoR6d5NFFxWfJNCYExL/u6Au/U5Mh/jOXKqY
-GwXgAEZKgoClM4so3O0409/lPun++1ndYYRP0lSWE2ETPo+Aab6TR7U1Q9Jauz1c
-77NCR807VRMGsAnb/WP2OogKmW9+4c4bU2pEZiNRCHu8W1Ki/QY3OEBhj0qWuJA3
-+GbHeJAAFS6LrVE1Uweoa2iu+U48BybNCAVwzDk/dr2l02cmAYamU9JgO3xDf1WK
-vJUawSg5TB9D0pH0clmKuVb8P7Sd2nCcdlqMQ1DujjByTd//SffGqWfZbawCEeI6
-FiWnWAjLb1NBnEg4R2gz0dfHj9R0IdTDBZB6/86WiLEVKV0jq9BgoRJP3vQXzTLl
-yb/IQ639Lo7xr+L0mPoSHyDYwKcMhcWQ9DstliaxLL5Mq+ux0orJ23gTDx4JnW2P
-AJ8C2sH6H3p6CcRK5ogql5+Ji/03X186zjhZhkuvcQu02PJwT58yE+Owp1fl2tpD
-y4Q08ijE6m30Ku/Ba3ba+367hTzSU8JNvnHhRdH9I2cNE3X7z2VnIp2usAnRCf8d
-NL/+I5c30jn6PQ0GC7TbO6Orb1wdtn7os4I07QZcJA==
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDtTCCAp2gAwIBAgIIBhDCeat3PfIwDQYJKoZIhvcNAQEFBQAwdjELMAkGA1UE
-BhMCQ0gxEjAQBgNVBAoTCVN3aXNzU2lnbjEyMDAGA1UEAxMpU3dpc3NTaWduIENB
-IChSU0EgSUsgTWF5IDYgMTk5OSAxODowMDo1OCkxHzAdBgkqhkiG9w0BCQEWEGNh
-QFN3aXNzU2lnbi5jb20wHhcNMDAxMTI2MjMyNzQxWhcNMzExMTI2MjMyNzQxWjB2
-MQswCQYDVQQGEwJDSDESMBAGA1UEChMJU3dpc3NTaWduMTIwMAYDVQQDEylTd2lz
-c1NpZ24gQ0EgKFJTQSBJSyBNYXkgNiAxOTk5IDE4OjAwOjU4KTEfMB0GCSqGSIb3
-DQEJARYQY2FAU3dpc3NTaWduLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
-AQoCggEBAKw5fjnmNneLQlUCQG8jQLwwfbrOZoUwNX8cbNqhxK03/xUloFVgAt+S
-Te2RxNXaCAXLBPn5ZST35TLV57aLmbHCtifv3YZqaaQGvjedltIBMJihJhZ+h3LY
-SKsUb+xEJ3x5ZUf8jP+Q1g57y1s8SnBFWN/ni5NkF1Y1y31VwOi9wiOf/VISL+uu
-SC4i1CP1Kbz3BDs6Hht1GpRYCbJ/K0bc9oJSpWpT5PGONsGIawqMbJuyoDghsXQ1
-pbn2e8K64BSscGZVZTNooSGgNiHmACNJBYXiWVWrwXPF4l6SddmC3Rj0aKXjgECc
-FkHLDQcsM5JsK2ZLryTDUsQFbxVP2ikCAwEAAaNHMEUwCwYDVR0PBAQDAgEGMAwG
-A1UdEwQFMAMBAf8wHQYDVR0OBBYEFJbXcc05KtT8iLGKq1N4ae+PR34WMAkGA1Ud
-IwQCMAAwDQYJKoZIhvcNAQEFBQADggEBAKMy6W8HvZdS1fBpEUzl6Lvw50bgE1Xc
-HU1JypSBG9mhdcXZo5AlPB4sCvx9Dmfwhyrdsshc0TP2V3Vh6eQqnEF5qB4lVziT
-Bko9mW6Ot+pPnwsy4SHpx3rw6jCYnOqfUcZjWqqqRrq/3P1waz+Mn4cLMVEg3Xaz
-qYov/khvSqS0JniwjRlo2H6f/1oVUKZvP+dUhpQepfZrOqMAWZW4otp6FolyQyeU
-NN6UCRNiUKl5vTijbKwUUwfER/1Vci3M1/O1QCfttQ4vRN4Buc0xqYtGL3cd5WiO
-vWzyhlTzAI6VUdNkQhhHJSAyTpj6dmXDRzrryoFGa2PjgESxz7XBaSI=
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDZzCCAk+gAwIBAgIQGx+ttiD5JNM2a/fH8YygWTANBgkqhkiG9w0BAQUFADBF
-MQswCQYDVQQGEwJHQjEYMBYGA1UEChMPVHJ1c3RpcyBMaW1pdGVkMRwwGgYDVQQL
-ExNUcnVzdGlzIEZQUyBSb290IENBMB4XDTAzMTIyMzEyMTQwNloXDTI0MDEyMTEx
-MzY1NFowRTELMAkGA1UEBhMCR0IxGDAWBgNVBAoTD1RydXN0aXMgTGltaXRlZDEc
-MBoGA1UECxMTVHJ1c3RpcyBGUFMgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQAD
-ggEPADCCAQoCggEBAMVQe547NdDfxIzNjpvto8A2mfRC6qc+gIMPpqdZh8mQRUN+
-AOqGeSoDvT03mYlmt+WKVoaTnGhLaASMk5MCPjDSNzoiYYkchU59j9WvezX2fihH
-iTHcDnlkH5nSW7r+f2C/revnPDgpai/lkQtV/+xvWNUtyd5MZnGPDNcE2gfmHhjj
-vSkCqPoc4Vu5g6hBSLwacY3nYuUtsuvffM/bq1rKMfFMIvMFE/eC+XN5DL7XSxzA
-0RU8k0Fk0ea+IxciAIleH2ulrG6nS4zto3Lmr2NNL4XSFDWaLk6M6jKYKIahkQlB
-OrTh4/L68MkKokHdqeMDx4gVOxzUGpTXn2RZEm0CAwEAAaNTMFEwDwYDVR0TAQH/
-BAUwAwEB/zAfBgNVHSMEGDAWgBS6+nEleYtXQSUhhgtx67JkDoshZzAdBgNVHQ4E
-FgQUuvpxJXmLV0ElIYYLceuyZA6LIWcwDQYJKoZIhvcNAQEFBQADggEBAH5Y//01
-GX2cGE+esCu8jowU/yyg2kdbw++BLa8F6nRIW/M+TgfHbcWzk88iNVy2P3UnXwmW
-zaD+vkAMXBJV+JOCyinpXj9WV4s4NvdFGkwozZ5BuO1WTISkQMi4sKUraXAEasP4
-1BIy+Q7DsdwyhEQsb8tGD+pmQQ9P8Vilpg0ND2HepZ5dfWWhPBfnqFVO76DH7cZE
-f1T1o+CP8HxVIo8ptoGj4W1OLBuAZ+ytIJ8MYmHVl/9D7S3B2l0pKoU/rGXuhg8F
-jZBf3+6f9L/uHfuY5H+QK4R4EA5sSVPvFVtlRkpdr7r7OnIdzfYliB6XzCGcKQEN
-ZetX2fNXlrtIzYE=
------END CERTIFICATE-----
-`
diff --git a/src/crypto/x509/root_linux.go b/src/crypto/x509/root_linux.go
deleted file mode 100644
index cfeca69..0000000
--- a/src/crypto/x509/root_linux.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package x509
-
-// Possible certificate files; stop after finding one.
-var certFiles = []string{
-	"/etc/ssl/certs/ca-certificates.crt", // Debian/Ubuntu/Gentoo etc.
-	"/etc/pki/tls/certs/ca-bundle.crt",   // Fedora/RHEL
-	"/etc/ssl/ca-bundle.pem",             // OpenSUSE
-	"/etc/pki/tls/cacert.pem",            // OpenELEC
-}
diff --git a/src/crypto/x509/root_nacl.go b/src/crypto/x509/root_nacl.go
deleted file mode 100644
index 4413f64..0000000
--- a/src/crypto/x509/root_nacl.go
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package x509
-
-// Possible certificate files; stop after finding one.
-var certFiles = []string{}
diff --git a/src/crypto/x509/root_solaris.go b/src/crypto/x509/root_solaris.go
deleted file mode 100644
index e6d4e61..0000000
--- a/src/crypto/x509/root_solaris.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package x509
-
-// Possible certificate files; stop after finding one.
-var certFiles = []string{
-	"/etc/certs/ca-certificates.crt",     // Solaris 11.2+
-	"/etc/ssl/certs/ca-certificates.crt", // Joyent SmartOS
-	"/etc/ssl/cacert.pem",                // OmniOS
-}
diff --git a/src/crypto/x509/sha2_windows_test.go b/src/crypto/x509/sha2_windows_test.go
deleted file mode 100644
index 79dc685..0000000
--- a/src/crypto/x509/sha2_windows_test.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package x509
-
-import "syscall"
-
-func init() {
-	v, err := syscall.GetVersion()
-	if err != nil {
-		return
-	}
-	if major := byte(v); major < 6 {
-		// Windows XP SP2 and Windows 2003 do not support SHA2.
-		// http://blogs.technet.com/b/pki/archive/2010/09/30/sha2-and-windows.aspx
-		supportSHA2 = false
-	}
-}
diff --git a/src/debug/dwarf/class_string.go b/src/debug/dwarf/class_string.go
deleted file mode 100644
index 0b1206b..0000000
--- a/src/debug/dwarf/class_string.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// generated by stringer -type=Class; DO NOT EDIT
-
-package dwarf
-
-import "fmt"
-
-const _Class_name = "ClassAddressClassBlockClassConstantClassExprLocClassFlagClassLinePtrClassLocListPtrClassMacPtrClassRangeListPtrClassReferenceClassReferenceSigClassStringClassReferenceAltClassStringAlt"
-
-var _Class_index = [...]uint8{0, 12, 22, 35, 47, 56, 68, 83, 94, 111, 125, 142, 153, 170, 184}
-
-func (i Class) String() string {
-	i -= 1
-	if i < 0 || i+1 >= Class(len(_Class_index)) {
-		return fmt.Sprintf("Class(%d)", i+1)
-	}
-	return _Class_name[_Class_index[i]:_Class_index[i+1]]
-}
diff --git a/src/debug/dwarf/line.go b/src/debug/dwarf/line.go
deleted file mode 100644
index ca64bbd..0000000
--- a/src/debug/dwarf/line.go
+++ /dev/null
@@ -1,590 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package dwarf
-
-import (
-	"errors"
-	"fmt"
-	"io"
-	"path"
-)
-
-// A LineReader reads a sequence of LineEntry structures from a DWARF
-// "line" section for a single compilation unit. LineEntries occur in
-// order of increasing PC and each LineEntry gives metadata for the
-// instructions from that LineEntry's PC to just before the next
-// LineEntry's PC. The last entry will have its EndSequence field set.
-type LineReader struct {
-	buf buf
-
-	// Original .debug_line section data. Used by Seek.
-	section []byte
-
-	// Header information
-	version              uint16
-	minInstructionLength int
-	maxOpsPerInstruction int
-	defaultIsStmt        bool
-	lineBase             int
-	lineRange            int
-	opcodeBase           int
-	opcodeLengths        []int
-	directories          []string
-	fileEntries          []*LineFile
-
-	programOffset Offset // section offset of line number program
-	endOffset     Offset // section offset of byte following program
-
-	initialFileEntries int // initial length of fileEntries
-
-	// Current line number program state machine registers
-	state     LineEntry // public state
-	fileIndex int       // private state
-}
-
-// A LineEntry is a row in a DWARF line table.
-type LineEntry struct {
-	// Address is the program-counter value of a machine
-	// instruction generated by the compiler. This LineEntry
-	// applies to each instruction from Address to just before the
-	// Address of the next LineEntry.
-	Address uint64
-
-	// OpIndex is the index of an operation within a VLIW
-	// instruction. The index of the first operation is 0. For
-	// non-VLIW architectures, it will always be 0. Address and
-	// OpIndex together form an operation pointer that can
-	// reference any individual operation within the instruction
-	// stream.
-	OpIndex int
-
-	// File is the source file corresponding to these
-	// instructions.
-	File *LineFile
-
-	// Line is the source code line number corresponding to these
-	// instructions. Lines are numbered beginning at 1. It may be
-	// 0 if these instructions cannot be attributed to any source
-	// line.
-	Line int
-
-	// Column is the column number within the source line of these
-	// instructions. Columns are numbered beginning at 1. It may
-	// be 0 to indicate the "left edge" of the line.
-	Column int
-
-	// IsStmt indicates that Address is a recommended breakpoint
-	// location, such as the beginning of a line, statement, or a
-	// distinct subpart of a statement.
-	IsStmt bool
-
-	// BasicBlock indicates that Address is the beginning of a
-	// basic block.
-	BasicBlock bool
-
-	// PrologueEnd indicates that Address is one (of possibly
-	// many) PCs where execution should be suspended for a
-	// breakpoint on entry to the containing function.
-	//
-	// Added in DWARF 3.
-	PrologueEnd bool
-
-	// EpilogueBegin indicates that Address is one (of possibly
-	// many) PCs where execution should be suspended for a
-	// breakpoint on exit from this function.
-	//
-	// Added in DWARF 3.
-	EpilogueBegin bool
-
-	// ISA is the instruction set architecture for these
-	// instructions. Possible ISA values should be defined by the
-	// applicable ABI specification.
-	//
-	// Added in DWARF 3.
-	ISA int
-
-	// Discriminator is an arbitrary integer indicating the block
-	// to which these instructions belong. It serves to
-	// distinguish among multiple blocks that may all have with
-	// the same source file, line, and column. Where only one
-	// block exists for a given source position, it should be 0.
-	//
-	// Added in DWARF 3.
-	Discriminator int
-
-	// EndSequence indicates that Address is the first byte after
-	// the end of a sequence of target machine instructions. If it
-	// is set, only this and the Address field are meaningful. A
-	// line number table may contain information for multiple
-	// potentially disjoint instruction sequences. The last entry
-	// in a line table should always have EndSequence set.
-	EndSequence bool
-}
-
-// A LineFile is a source file referenced by a DWARF line table entry.
-type LineFile struct {
-	Name   string
-	Mtime  uint64 // Implementation defined modification time, or 0 if unknown
-	Length int    // File length, or 0 if unknown
-}
-
-// LineReader returns a new reader for the line table of compilation
-// unit cu, which must be an Entry with tag TagCompileUnit.
-//
-// If this compilation unit has no line table, it returns nil, nil.
-func (d *Data) LineReader(cu *Entry) (*LineReader, error) {
-	if d.line == nil {
-		// No line tables available.
-		return nil, nil
-	}
-
-	// Get line table information from cu.
-	off, ok := cu.Val(AttrStmtList).(int64)
-	if !ok {
-		// cu has no line table.
-		return nil, nil
-	}
-	if off > int64(len(d.line)) {
-		return nil, errors.New("AttrStmtList value out of range")
-	}
-	// AttrCompDir is optional if all file names are absolute. Use
-	// the empty string if it's not present.
-	compDir, _ := cu.Val(AttrCompDir).(string)
-
-	// Create the LineReader.
-	u := &d.unit[d.offsetToUnit(cu.Offset)]
-	buf := makeBuf(d, u, "line", Offset(off), d.line[off:])
-	// The compilation directory is implicitly directories[0].
-	r := LineReader{buf: buf, section: d.line, directories: []string{compDir}}
-
-	// Read the header.
-	if err := r.readHeader(); err != nil {
-		return nil, err
-	}
-
-	// Initialize line reader state.
-	r.Reset()
-
-	return &r, nil
-}
-
-// readHeader reads the line number program header from r.buf and sets
-// all of the header fields in r.
-func (r *LineReader) readHeader() error {
-	buf := &r.buf
-
-	// Read basic header fields [DWARF2 6.2.4].
-	hdrOffset := buf.off
-	unitLength, dwarf64 := buf.unitLength()
-	r.endOffset = buf.off + unitLength
-	if r.endOffset > buf.off+Offset(len(buf.data)) {
-		return DecodeError{"line", hdrOffset, fmt.Sprintf("line table end %d exceeds section size %d", r.endOffset, buf.off+Offset(len(buf.data)))}
-	}
-	r.version = buf.uint16()
-	if buf.err == nil && (r.version < 2 || r.version > 4) {
-		// DWARF goes to all this effort to make new opcodes
-		// backward-compatible, and then adds fields right in
-		// the middle of the header in new versions, so we're
-		// picky about only supporting known line table
-		// versions.
-		return DecodeError{"line", hdrOffset, fmt.Sprintf("unknown line table version %d", r.version)}
-	}
-	var headerLength Offset
-	if dwarf64 {
-		headerLength = Offset(buf.uint64())
-	} else {
-		headerLength = Offset(buf.uint32())
-	}
-	r.programOffset = buf.off + headerLength
-	r.minInstructionLength = int(buf.uint8())
-	if r.version >= 4 {
-		// [DWARF4 6.2.4]
-		r.maxOpsPerInstruction = int(buf.uint8())
-	} else {
-		r.maxOpsPerInstruction = 1
-	}
-	r.defaultIsStmt = buf.uint8() != 0
-	r.lineBase = int(int8(buf.uint8()))
-	r.lineRange = int(buf.uint8())
-
-	// Validate header.
-	if buf.err != nil {
-		return buf.err
-	}
-	if r.maxOpsPerInstruction == 0 {
-		return DecodeError{"line", hdrOffset, "invalid maximum operations per instruction: 0"}
-	}
-	if r.lineRange == 0 {
-		return DecodeError{"line", hdrOffset, "invalid line range: 0"}
-	}
-
-	// Read standard opcode length table. This table starts with opcode 1.
-	r.opcodeBase = int(buf.uint8())
-	r.opcodeLengths = make([]int, r.opcodeBase)
-	for i := 1; i < r.opcodeBase; i++ {
-		r.opcodeLengths[i] = int(buf.uint8())
-	}
-
-	// Validate opcode lengths.
-	if buf.err != nil {
-		return buf.err
-	}
-	for i, length := range r.opcodeLengths {
-		if known, ok := knownOpcodeLengths[i]; ok && known != length {
-			return DecodeError{"line", hdrOffset, fmt.Sprintf("opcode %d expected to have length %d, but has length %d", i, known, length)}
-		}
-	}
-
-	// Read include directories table. The caller already set
-	// directories[0] to the compilation directory.
-	for {
-		directory := buf.string()
-		if buf.err != nil {
-			return buf.err
-		}
-		if len(directory) == 0 {
-			break
-		}
-		if !path.IsAbs(directory) {
-			// Relative paths are implicitly relative to
-			// the compilation directory.
-			directory = path.Join(r.directories[0], directory)
-		}
-		r.directories = append(r.directories, directory)
-	}
-
-	// Read file name list. File numbering starts with 1, so leave
-	// the first entry nil.
-	r.fileEntries = make([]*LineFile, 1)
-	for {
-		if done, err := r.readFileEntry(); err != nil {
-			return err
-		} else if done {
-			break
-		}
-	}
-	r.initialFileEntries = len(r.fileEntries)
-
-	return buf.err
-}
-
-// readFileEntry reads a file entry from either the header or a
-// DW_LNE_define_file extended opcode and adds it to r.fileEntries. A
-// true return value indicates that there are no more entries to read.
-func (r *LineReader) readFileEntry() (bool, error) {
-	name := r.buf.string()
-	if r.buf.err != nil {
-		return false, r.buf.err
-	}
-	if len(name) == 0 {
-		return true, nil
-	}
-	off := r.buf.off
-	dirIndex := int(r.buf.uint())
-	if !path.IsAbs(name) {
-		if dirIndex >= len(r.directories) {
-			return false, DecodeError{"line", off, "directory index too large"}
-		}
-		name = path.Join(r.directories[dirIndex], name)
-	}
-	mtime := r.buf.uint()
-	length := int(r.buf.uint())
-
-	r.fileEntries = append(r.fileEntries, &LineFile{name, mtime, length})
-	return false, nil
-}
-
-// updateFile updates r.state.File after r.fileIndex has
-// changed or r.fileEntries has changed.
-func (r *LineReader) updateFile() {
-	if r.fileIndex < len(r.fileEntries) {
-		r.state.File = r.fileEntries[r.fileIndex]
-	} else {
-		r.state.File = nil
-	}
-}
-
-// Next sets *entry to the next row in this line table and moves to
-// the next row. If there are no more entries and the line table is
-// properly terminated, it returns io.EOF.
-//
-// Rows are always in order of increasing entry.Address, but
-// entry.Line may go forward or backward.
-func (r *LineReader) Next(entry *LineEntry) error {
-	if r.buf.err != nil {
-		return r.buf.err
-	}
-
-	// Execute opcodes until we reach an opcode that emits a line
-	// table entry.
-	for {
-		if len(r.buf.data) == 0 {
-			return io.EOF
-		}
-		emit := r.step(entry)
-		if r.buf.err != nil {
-			return r.buf.err
-		}
-		if emit {
-			return nil
-		}
-	}
-}
-
-// knownOpcodeLengths gives the opcode lengths (in varint arguments)
-// of known standard opcodes.
-var knownOpcodeLengths = map[int]int{
-	lnsCopy:             0,
-	lnsAdvancePC:        1,
-	lnsAdvanceLine:      1,
-	lnsSetFile:          1,
-	lnsNegateStmt:       0,
-	lnsSetBasicBlock:    0,
-	lnsConstAddPC:       0,
-	lnsSetPrologueEnd:   0,
-	lnsSetEpilogueBegin: 0,
-	lnsSetISA:           1,
-	// lnsFixedAdvancePC takes a uint8 rather than a varint; it's
-	// unclear what length the header is supposed to claim, so
-	// ignore it.
-}
-
-// step processes the next opcode and updates r.state. If the opcode
-// emits a row in the line table, this updates *entry and returns
-// true.
-func (r *LineReader) step(entry *LineEntry) bool {
-	opcode := int(r.buf.uint8())
-
-	if opcode >= r.opcodeBase {
-		// Special opcode [DWARF2 6.2.5.1, DWARF4 6.2.5.1]
-		adjustedOpcode := opcode - r.opcodeBase
-		r.advancePC(adjustedOpcode / r.lineRange)
-		lineDelta := r.lineBase + int(adjustedOpcode)%r.lineRange
-		r.state.Line += lineDelta
-		goto emit
-	}
-
-	switch opcode {
-	case 0:
-		// Extended opcode [DWARF2 6.2.5.3]
-		length := Offset(r.buf.uint())
-		startOff := r.buf.off
-		opcode := r.buf.uint8()
-
-		switch opcode {
-		case lneEndSequence:
-			r.state.EndSequence = true
-			*entry = r.state
-			r.resetState()
-
-		case lneSetAddress:
-			r.state.Address = r.buf.addr()
-
-		case lneDefineFile:
-			if done, err := r.readFileEntry(); err != nil {
-				r.buf.err = err
-				return false
-			} else if done {
-				r.buf.err = DecodeError{"line", startOff, "malformed DW_LNE_define_file operation"}
-				return false
-			}
-			r.updateFile()
-
-		case lneSetDiscriminator:
-			// [DWARF4 6.2.5.3]
-			r.state.Discriminator = int(r.buf.uint())
-		}
-
-		r.buf.skip(int(startOff + length - r.buf.off))
-
-		if opcode == lneEndSequence {
-			return true
-		}
-
-	// Standard opcodes [DWARF2 6.2.5.2]
-	case lnsCopy:
-		goto emit
-
-	case lnsAdvancePC:
-		r.advancePC(int(r.buf.uint()))
-
-	case lnsAdvanceLine:
-		r.state.Line += int(r.buf.int())
-
-	case lnsSetFile:
-		r.fileIndex = int(r.buf.uint())
-		r.updateFile()
-
-	case lnsSetColumn:
-		r.state.Column = int(r.buf.uint())
-
-	case lnsNegateStmt:
-		r.state.IsStmt = !r.state.IsStmt
-
-	case lnsSetBasicBlock:
-		r.state.BasicBlock = true
-
-	case lnsConstAddPC:
-		r.advancePC((255 - r.opcodeBase) / r.lineRange)
-
-	case lnsFixedAdvancePC:
-		r.state.Address += uint64(r.buf.uint16())
-
-	// DWARF3 standard opcodes [DWARF3 6.2.5.2]
-	case lnsSetPrologueEnd:
-		r.state.PrologueEnd = true
-
-	case lnsSetEpilogueBegin:
-		r.state.EpilogueBegin = true
-
-	case lnsSetISA:
-		r.state.ISA = int(r.buf.uint())
-
-	default:
-		// Unhandled standard opcode. Skip the number of
-		// arguments that the prologue says this opcode has.
-		for i := 0; i < r.opcodeLengths[opcode]; i++ {
-			r.buf.uint()
-		}
-	}
-	return false
-
-emit:
-	*entry = r.state
-	r.state.BasicBlock = false
-	r.state.PrologueEnd = false
-	r.state.EpilogueBegin = false
-	r.state.Discriminator = 0
-	return true
-}
-
-// advancePC advances "operation pointer" (the combination of Address
-// and OpIndex) in r.state by opAdvance steps.
-func (r *LineReader) advancePC(opAdvance int) {
-	opIndex := r.state.OpIndex + opAdvance
-	r.state.Address += uint64(r.minInstructionLength * (opIndex / r.maxOpsPerInstruction))
-	r.state.OpIndex = opIndex % r.maxOpsPerInstruction
-}
-
-// A LineReaderPos represents a position in a line table.
-type LineReaderPos struct {
-	// off is the current offset in the DWARF line section.
-	off Offset
-	// numFileEntries is the length of fileEntries.
-	numFileEntries int
-	// state and fileIndex are the statement machine state at
-	// offset off.
-	state     LineEntry
-	fileIndex int
-}
-
-// Tell returns the current position in the line table.
-func (r *LineReader) Tell() LineReaderPos {
-	return LineReaderPos{r.buf.off, len(r.fileEntries), r.state, r.fileIndex}
-}
-
-// Seek restores the line table reader to a position returned by Tell.
-//
-// The argument pos must have been returned by a call to Tell on this
-// line table.
-func (r *LineReader) Seek(pos LineReaderPos) {
-	r.buf.off = pos.off
-	r.buf.data = r.section[r.buf.off:r.endOffset]
-	r.fileEntries = r.fileEntries[:pos.numFileEntries]
-	r.state = pos.state
-	r.fileIndex = pos.fileIndex
-}
-
-// Reset repositions the line table reader at the beginning of the
-// line table.
-func (r *LineReader) Reset() {
-	// Reset buffer to the line number program offset.
-	r.buf.off = r.programOffset
-	r.buf.data = r.section[r.buf.off:r.endOffset]
-
-	// Reset file entries list.
-	r.fileEntries = r.fileEntries[:r.initialFileEntries]
-
-	// Reset line number program state.
-	r.resetState()
-}
-
-// resetState resets r.state to its default values
-func (r *LineReader) resetState() {
-	// Reset the state machine registers to the defaults given in
-	// [DWARF4 6.2.2].
-	r.state = LineEntry{
-		Address:       0,
-		OpIndex:       0,
-		File:          nil,
-		Line:          1,
-		Column:        0,
-		IsStmt:        r.defaultIsStmt,
-		BasicBlock:    false,
-		PrologueEnd:   false,
-		EpilogueBegin: false,
-		ISA:           0,
-		Discriminator: 0,
-	}
-	r.fileIndex = 1
-	r.updateFile()
-}
-
-// ErrUnknownPC is the error returned by LineReader.ScanPC when the
-// seek PC is not covered by any entry in the line table.
-var ErrUnknownPC = errors.New("ErrUnknownPC")
-
-// SeekPC sets *entry to the LineEntry that includes pc and positions
-// the reader on the next entry in the line table. If necessary, this
-// will seek backwards to find pc.
-//
-// If pc is not covered by any entry in this line table, SeekPC
-// returns ErrUnknownPC. In this case, *entry and the final seek
-// position are unspecified.
-//
-// Note that DWARF line tables only permit sequential, forward scans.
-// Hence, in the worst case, this takes time linear in the size of the
-// line table. If the caller wishes to do repeated fast PC lookups, it
-// should build an appropriate index of the line table.
-func (r *LineReader) SeekPC(pc uint64, entry *LineEntry) error {
-	if err := r.Next(entry); err != nil {
-		return err
-	}
-	if entry.Address > pc {
-		// We're too far. Start at the beginning of the table.
-		r.Reset()
-		if err := r.Next(entry); err != nil {
-			return err
-		}
-		if entry.Address > pc {
-			// The whole table starts after pc.
-			r.Reset()
-			return ErrUnknownPC
-		}
-	}
-
-	// Scan until we pass pc, then back up one.
-	for {
-		var next LineEntry
-		pos := r.Tell()
-		if err := r.Next(&next); err != nil {
-			if err == io.EOF {
-				return ErrUnknownPC
-			}
-			return err
-		}
-		if next.Address > pc {
-			if entry.EndSequence {
-				// pc is in a hole in the table.
-				return ErrUnknownPC
-			}
-			// entry is the desired entry. Back up the
-			// cursor to "next" and return success.
-			r.Seek(pos)
-			return nil
-		}
-		*entry = next
-	}
-}
diff --git a/src/debug/dwarf/line_test.go b/src/debug/dwarf/line_test.go
deleted file mode 100644
index 4104b5d..0000000
--- a/src/debug/dwarf/line_test.go
+++ /dev/null
@@ -1,229 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package dwarf_test
-
-import (
-	. "debug/dwarf"
-	"io"
-	"testing"
-)
-
-var (
-	file1C = &LineFile{Name: "/home/austin/go.dev/src/debug/dwarf/testdata/line1.c"}
-	file1H = &LineFile{Name: "/home/austin/go.dev/src/debug/dwarf/testdata/line1.h"}
-	file2C = &LineFile{Name: "/home/austin/go.dev/src/debug/dwarf/testdata/line2.c"}
-)
-
-func TestLineELFGCC(t *testing.T) {
-	// Generated by:
-	//   # gcc --version | head -n1
-	//   gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
-	//   # gcc -g -o line-gcc.elf line*.c
-
-	// Line table based on readelf --debug-dump=rawline,decodedline
-	want := []LineEntry{
-		{Address: 0x40059d, File: file1H, Line: 2, IsStmt: true},
-		{Address: 0x4005a5, File: file1H, Line: 2, IsStmt: true},
-		{Address: 0x4005b4, File: file1H, Line: 5, IsStmt: true},
-		{Address: 0x4005bd, File: file1H, Line: 6, IsStmt: true, Discriminator: 2},
-		{Address: 0x4005c7, File: file1H, Line: 5, IsStmt: true, Discriminator: 2},
-		{Address: 0x4005cb, File: file1H, Line: 5, IsStmt: false, Discriminator: 1},
-		{Address: 0x4005d1, File: file1H, Line: 7, IsStmt: true},
-		{Address: 0x4005e7, File: file1C, Line: 6, IsStmt: true},
-		{Address: 0x4005eb, File: file1C, Line: 7, IsStmt: true},
-		{Address: 0x4005f5, File: file1C, Line: 8, IsStmt: true},
-		{Address: 0x4005ff, File: file1C, Line: 9, IsStmt: true},
-		{Address: 0x400601, EndSequence: true},
-
-		{Address: 0x400601, File: file2C, Line: 4, IsStmt: true},
-		{Address: 0x400605, File: file2C, Line: 5, IsStmt: true},
-		{Address: 0x40060f, File: file2C, Line: 6, IsStmt: true},
-		{Address: 0x400611, EndSequence: true},
-	}
-
-	testLineTable(t, want, elfData(t, "testdata/line-gcc.elf"))
-}
-
-func TestLineELFClang(t *testing.T) {
-	// Generated by:
-	//   # clang --version | head -n1
-	//   Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4)
-	//   # clang -g -o line-clang.elf line*.
-
-	want := []LineEntry{
-		{Address: 0x400530, File: file1C, Line: 6, IsStmt: true},
-		{Address: 0x400534, File: file1C, Line: 7, IsStmt: true, PrologueEnd: true},
-		{Address: 0x400539, File: file1C, Line: 8, IsStmt: true},
-		{Address: 0x400545, File: file1C, Line: 9, IsStmt: true},
-		{Address: 0x400550, File: file1H, Line: 2, IsStmt: true},
-		{Address: 0x400554, File: file1H, Line: 5, IsStmt: true, PrologueEnd: true},
-		{Address: 0x400568, File: file1H, Line: 6, IsStmt: true},
-		{Address: 0x400571, File: file1H, Line: 5, IsStmt: true},
-		{Address: 0x400581, File: file1H, Line: 7, IsStmt: true},
-		{Address: 0x400583, EndSequence: true},
-
-		{Address: 0x400590, File: file2C, Line: 4, IsStmt: true},
-		{Address: 0x4005a0, File: file2C, Line: 5, IsStmt: true, PrologueEnd: true},
-		{Address: 0x4005a7, File: file2C, Line: 6, IsStmt: true},
-		{Address: 0x4005b0, EndSequence: true},
-	}
-
-	testLineTable(t, want, elfData(t, "testdata/line-clang.elf"))
-}
-
-func TestLineSeek(t *testing.T) {
-	d := elfData(t, "testdata/line-gcc.elf")
-
-	// Get the line table for the first CU.
-	cu, err := d.Reader().Next()
-	if err != nil {
-		t.Fatal("d.Reader().Next:", err)
-	}
-	lr, err := d.LineReader(cu)
-	if err != nil {
-		t.Fatal("d.LineReader:", err)
-	}
-
-	// Read entries forward.
-	var line LineEntry
-	var posTable []LineReaderPos
-	var table []LineEntry
-	for {
-		posTable = append(posTable, lr.Tell())
-
-		err := lr.Next(&line)
-		if err != nil {
-			if err == io.EOF {
-				break
-			}
-			t.Fatal("lr.Next:", err)
-		}
-		table = append(table, line)
-	}
-
-	// Test that Reset returns to the first line.
-	lr.Reset()
-	if err := lr.Next(&line); err != nil {
-		t.Fatal("lr.Next after Reset failed:", err)
-	} else if line != table[0] {
-		t.Fatal("lr.Next after Reset returned", line, "instead of", table[0])
-	}
-
-	// Check that entries match when seeking backward.
-	for i := len(posTable) - 1; i >= 0; i-- {
-		lr.Seek(posTable[i])
-		err := lr.Next(&line)
-		if i == len(posTable)-1 {
-			if err != io.EOF {
-				t.Fatal("expected io.EOF after seek to end, got", err)
-			}
-		} else if err != nil {
-			t.Fatal("lr.Next after seek to", posTable[i], "failed:", err)
-		} else if line != table[i] {
-			t.Fatal("lr.Next after seek to", posTable[i], "returned", line, "instead of", table[i])
-		}
-	}
-
-	// Check that seeking to a PC returns the right line.
-	if err := lr.SeekPC(table[0].Address-1, &line); err != ErrUnknownPC {
-		t.Fatalf("lr.SeekPC to %#x returned %v instead of ErrUnknownPC", table[0].Address-1, err)
-	}
-	for i, testLine := range table {
-		if testLine.EndSequence {
-			if err := lr.SeekPC(testLine.Address, &line); err != ErrUnknownPC {
-				t.Fatalf("lr.SeekPC to %#x returned %v instead of ErrUnknownPC", testLine.Address, err)
-			}
-			continue
-		}
-
-		nextPC := table[i+1].Address
-		for pc := testLine.Address; pc < nextPC; pc++ {
-			if err := lr.SeekPC(pc, &line); err != nil {
-				t.Fatalf("lr.SeekPC to %#x failed: %v", pc, err)
-			} else if line != testLine {
-				t.Fatalf("lr.SeekPC to %#x returned %v instead of %v", pc, line, testLine)
-			}
-		}
-	}
-}
-
-func testLineTable(t *testing.T, want []LineEntry, d *Data) {
-	// Get line table from d.
-	var got []LineEntry
-	dr := d.Reader()
-	for {
-		ent, err := dr.Next()
-		if err != nil {
-			t.Fatal("dr.Next:", err)
-		} else if ent == nil {
-			break
-		}
-
-		if ent.Tag != TagCompileUnit {
-			dr.SkipChildren()
-			continue
-		}
-
-		// Decode CU's line table.
-		lr, err := d.LineReader(ent)
-		if err != nil {
-			t.Fatal("d.LineReader:", err)
-		} else if lr == nil {
-			continue
-		}
-
-		for {
-			var line LineEntry
-			err := lr.Next(&line)
-			if err != nil {
-				if err == io.EOF {
-					break
-				}
-				t.Fatal("lr.Next:", err)
-			}
-			got = append(got, line)
-		}
-	}
-
-	// Compare line tables.
-	if !compareLines(got, want) {
-		t.Log("Line tables do not match. Got:")
-		dumpLines(t, got)
-		t.Log("Want:")
-		dumpLines(t, want)
-		t.FailNow()
-	}
-}
-
-func compareLines(a, b []LineEntry) bool {
-	if len(a) != len(b) {
-		return false
-	}
-
-	for i := range a {
-		al, bl := a[i], b[i]
-		// If both are EndSequence, then the only other valid
-		// field is Address. Otherwise, test equality of all
-		// fields.
-		if al.EndSequence && bl.EndSequence && al.Address == bl.Address {
-			continue
-		}
-		if al.File.Name != bl.File.Name {
-			return false
-		}
-		al.File = nil
-		bl.File = nil
-		if al != bl {
-			return false
-		}
-	}
-	return true
-}
-
-func dumpLines(t *testing.T, lines []LineEntry) {
-	for _, l := range lines {
-		t.Logf("  %+v File:%+v", l, l.File)
-	}
-}
diff --git a/src/debug/dwarf/testdata/line-clang.elf b/src/debug/dwarf/testdata/line-clang.elf
deleted file mode 100755
index b63cc78..0000000
Binary files a/src/debug/dwarf/testdata/line-clang.elf and /dev/null differ
diff --git a/src/debug/dwarf/testdata/line-gcc.elf b/src/debug/dwarf/testdata/line-gcc.elf
deleted file mode 100755
index 50500a8..0000000
Binary files a/src/debug/dwarf/testdata/line-gcc.elf and /dev/null differ
diff --git a/src/debug/dwarf/testdata/line1.c b/src/debug/dwarf/testdata/line1.c
deleted file mode 100644
index f358647..0000000
--- a/src/debug/dwarf/testdata/line1.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include "line1.h"
-
-void f2();
-
-int main()
-{
-	f1();
-	f2();
-}
diff --git a/src/debug/dwarf/testdata/line1.h b/src/debug/dwarf/testdata/line1.h
deleted file mode 100644
index 974d4c8..0000000
--- a/src/debug/dwarf/testdata/line1.h
+++ /dev/null
@@ -1,7 +0,0 @@
-static void f1()
-{
-	char buf[10];
-	int i;
-	for(i = 0; i < 10; i++)
-		buf[i] = 1;
-}
diff --git a/src/debug/dwarf/testdata/line2.c b/src/debug/dwarf/testdata/line2.c
deleted file mode 100644
index 38d89983..0000000
--- a/src/debug/dwarf/testdata/line2.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <stdio.h>
-
-void f2()
-{
-	printf("hello\n");
-}
diff --git a/src/debug/elf/testdata/go-relocation-test-clang-arm.obj b/src/debug/elf/testdata/go-relocation-test-clang-arm.obj
deleted file mode 100644
index 1cc7e4b..0000000
Binary files a/src/debug/elf/testdata/go-relocation-test-clang-arm.obj and /dev/null differ
diff --git a/src/debug/elf/testdata/go-relocation-test-gcc482-ppc64le.obj b/src/debug/elf/testdata/go-relocation-test-gcc482-ppc64le.obj
deleted file mode 100644
index dad7445..0000000
Binary files a/src/debug/elf/testdata/go-relocation-test-gcc482-ppc64le.obj and /dev/null differ
diff --git a/src/debug/elf/testdata/go-relocation-test-gcc492-arm.obj b/src/debug/elf/testdata/go-relocation-test-gcc492-arm.obj
deleted file mode 100644
index ed45be2..0000000
Binary files a/src/debug/elf/testdata/go-relocation-test-gcc492-arm.obj and /dev/null differ
diff --git a/src/debug/elf/testdata/go-relocation-test-gcc5-ppc.obj b/src/debug/elf/testdata/go-relocation-test-gcc5-ppc.obj
deleted file mode 100644
index f4165af..0000000
Binary files a/src/debug/elf/testdata/go-relocation-test-gcc5-ppc.obj and /dev/null differ
diff --git a/src/encoding/csv/example_test.go b/src/encoding/csv/example_test.go
deleted file mode 100644
index dc227d4..0000000
--- a/src/encoding/csv/example_test.go
+++ /dev/null
@@ -1,131 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package csv_test
-
-import (
-	"encoding/csv"
-	"fmt"
-	"io"
-	"log"
-	"os"
-	"strings"
-)
-
-func ExampleReader() {
-	in := `first_name,last_name,username
-"Rob","Pike",rob
-Ken,Thompson,ken
-"Robert","Griesemer","gri"
-`
-	r := csv.NewReader(strings.NewReader(in))
-
-	for {
-		record, err := r.Read()
-		if err == io.EOF {
-			break
-		}
-		if err != nil {
-			log.Fatal(err)
-		}
-
-		fmt.Println(record)
-	}
-	// Output:
-	// [first_name last_name username]
-	// [Rob Pike rob]
-	// [Ken Thompson ken]
-	// [Robert Griesemer gri]
-}
-
-// This example shows how csv.Reader can be configured to handle other
-// types of CSV files.
-func ExampleReader_options() {
-	in := `first_name;last_name;username
-"Rob";"Pike";rob
-# lines beginning with a # character are ignored
-Ken;Thompson;ken
-"Robert";"Griesemer";"gri"
-`
-	r := csv.NewReader(strings.NewReader(in))
-	r.Comma = ';'
-	r.Comment = '#'
-
-	records, err := r.ReadAll()
-	if err != nil {
-		log.Fatal(err)
-	}
-
-	fmt.Print(records)
-	// Output:
-	// [[first_name last_name username] [Rob Pike rob] [Ken Thompson ken] [Robert Griesemer gri]]
-}
-
-func ExampleReader_ReadAll() {
-	in := `first_name,last_name,username
-"Rob","Pike",rob
-Ken,Thompson,ken
-"Robert","Griesemer","gri"
-`
-	r := csv.NewReader(strings.NewReader(in))
-
-	records, err := r.ReadAll()
-	if err != nil {
-		log.Fatal(err)
-	}
-
-	fmt.Print(records)
-	// Output:
-	// [[first_name last_name username] [Rob Pike rob] [Ken Thompson ken] [Robert Griesemer gri]]
-}
-
-func ExampleWriter() {
-	records := [][]string{
-		{"first_name", "last_name", "username"},
-		{"Rob", "Pike", "rob"},
-		{"Ken", "Thompson", "ken"},
-		{"Robert", "Griesemer", "gri"},
-	}
-
-	w := csv.NewWriter(os.Stdout)
-
-	for _, record := range records {
-		if err := w.Write(record); err != nil {
-			log.Fatalln("error writing record to csv:", err)
-		}
-	}
-
-	// Write any buffered data to the underlying writer (standard output).
-	w.Flush()
-
-	if err := w.Error(); err != nil {
-		log.Fatal(err)
-	}
-	// Output:
-	// first_name,last_name,username
-	// Rob,Pike,rob
-	// Ken,Thompson,ken
-	// Robert,Griesemer,gri
-}
-
-func ExampleWriter_WriteAll() {
-	records := [][]string{
-		{"first_name", "last_name", "username"},
-		{"Rob", "Pike", "rob"},
-		{"Ken", "Thompson", "ken"},
-		{"Robert", "Griesemer", "gri"},
-	}
-
-	w := csv.NewWriter(os.Stdout)
-	w.WriteAll(records) // calls Flush internally
-
-	if err := w.Error(); err != nil {
-		log.Fatalln("error writing csv:", err)
-	}
-	// Output:
-	// first_name,last_name,username
-	// Rob,Pike,rob
-	// Ken,Thompson,ken
-	// Robert,Griesemer,gri
-}
diff --git a/src/fmt/norace_test.go b/src/fmt/norace_test.go
deleted file mode 100644
index 1267cc3..0000000
--- a/src/fmt/norace_test.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !race
-
-package fmt_test
-
-const raceenabled = false
diff --git a/src/fmt/race_test.go b/src/fmt/race_test.go
deleted file mode 100644
index ae3147a..0000000
--- a/src/fmt/race_test.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build race
-
-package fmt_test
-
-const raceenabled = true
diff --git a/src/go/constant/go13.go b/src/go/constant/go13.go
deleted file mode 100644
index a4a838a..0000000
--- a/src/go/constant/go13.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !go1.4
-
-package constant
-
-import (
-	"math"
-	"math/big"
-)
-
-func ratToFloat32(x *big.Rat) (float32, bool) {
-	// Before 1.4, there's no Rat.Float32.
-	// Emulate it, albeit at the cost of
-	// imprecision in corner cases.
-	x64, exact := x.Float64()
-	x32 := float32(x64)
-	if math.IsInf(float64(x32), 0) {
-		exact = false
-	}
-	return x32, exact
-}
diff --git a/src/go/constant/go14.go b/src/go/constant/go14.go
deleted file mode 100644
index 2ab6da0..0000000
--- a/src/go/constant/go14.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build go1.4
-
-package constant
-
-import "math/big"
-
-func ratToFloat32(x *big.Rat) (float32, bool) {
-	return x.Float32()
-}
diff --git a/src/go/constant/value.go b/src/go/constant/value.go
deleted file mode 100644
index 79a80af..0000000
--- a/src/go/constant/value.go
+++ /dev/null
@@ -1,925 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package constant implements Values representing untyped
-// Go constants and the corresponding operations. Values
-// and operations may have arbitrary or unlimited precision.
-//
-// A special Unknown value may be used when a value
-// is unknown due to an error. Operations on unknown
-// values produce unknown values unless specified
-// otherwise.
-//
-package constant // import "go/constant"
-
-import (
-	"fmt"
-	"go/token"
-	"math/big"
-	"strconv"
-)
-
-// Kind specifies the kind of value represented by a Value.
-type Kind int
-
-// Implementation note: Kinds must be enumerated in
-// order of increasing "complexity" (used by match).
-
-const (
-	// unknown values
-	Unknown Kind = iota
-
-	// non-numeric values
-	Bool
-	String
-
-	// numeric values
-	Int
-	Float
-	Complex
-)
-
-// A Value represents a mathematically exact value of a given Kind.
-type Value interface {
-	// Kind returns the value kind; it is always the smallest
-	// kind in which the value can be represented exactly.
-	Kind() Kind
-
-	// String returns a human-readable form of the value.
-	String() string
-
-	// Prevent external implementations.
-	implementsValue()
-}
-
-// ----------------------------------------------------------------------------
-// Implementations
-
-type (
-	unknownVal struct{}
-	boolVal    bool
-	stringVal  string
-	int64Val   int64
-	intVal     struct{ val *big.Int }
-	floatVal   struct{ val *big.Rat }
-	complexVal struct{ re, im *big.Rat }
-)
-
-func (unknownVal) Kind() Kind { return Unknown }
-func (boolVal) Kind() Kind    { return Bool }
-func (stringVal) Kind() Kind  { return String }
-func (int64Val) Kind() Kind   { return Int }
-func (intVal) Kind() Kind     { return Int }
-func (floatVal) Kind() Kind   { return Float }
-func (complexVal) Kind() Kind { return Complex }
-
-func (unknownVal) String() string   { return "unknown" }
-func (x boolVal) String() string    { return fmt.Sprintf("%v", bool(x)) }
-func (x stringVal) String() string  { return strconv.Quote(string(x)) }
-func (x int64Val) String() string   { return strconv.FormatInt(int64(x), 10) }
-func (x intVal) String() string     { return x.val.String() }
-func (x floatVal) String() string   { return x.val.String() }
-func (x complexVal) String() string { return fmt.Sprintf("(%s + %si)", x.re, x.im) }
-
-func (unknownVal) implementsValue() {}
-func (boolVal) implementsValue()    {}
-func (stringVal) implementsValue()  {}
-func (int64Val) implementsValue()   {}
-func (intVal) implementsValue()     {}
-func (floatVal) implementsValue()   {}
-func (complexVal) implementsValue() {}
-
-// int64 bounds
-var (
-	minInt64 = big.NewInt(-1 << 63)
-	maxInt64 = big.NewInt(1<<63 - 1)
-)
-
-func normInt(x *big.Int) Value {
-	if minInt64.Cmp(x) <= 0 && x.Cmp(maxInt64) <= 0 {
-		return int64Val(x.Int64())
-	}
-	return intVal{x}
-}
-
-func normFloat(x *big.Rat) Value {
-	if x.IsInt() {
-		return normInt(x.Num())
-	}
-	return floatVal{x}
-}
-
-func normComplex(re, im *big.Rat) Value {
-	if im.Sign() == 0 {
-		return normFloat(re)
-	}
-	return complexVal{re, im}
-}
-
-// ----------------------------------------------------------------------------
-// Factories
-
-// MakeUnknown returns the Unknown value.
-func MakeUnknown() Value { return unknownVal{} }
-
-// MakeBool returns the Bool value for x.
-func MakeBool(b bool) Value { return boolVal(b) }
-
-// MakeString returns the String value for x.
-func MakeString(s string) Value { return stringVal(s) }
-
-// MakeInt64 returns the Int value for x.
-func MakeInt64(x int64) Value { return int64Val(x) }
-
-// MakeUint64 returns the Int value for x.
-func MakeUint64(x uint64) Value { return normInt(new(big.Int).SetUint64(x)) }
-
-// MakeFloat64 returns the numeric value for x.
-// If x is not finite, the result is unknown.
-func MakeFloat64(x float64) Value {
-	if f := new(big.Rat).SetFloat64(x); f != nil {
-		return normFloat(f)
-	}
-	return unknownVal{}
-}
-
-// MakeFromLiteral returns the corresponding integer, floating-point,
-// imaginary, character, or string value for a Go literal string.
-// If prec > 0, prec specifies an upper limit for the precision of
-// a numeric value. If the literal string is invalid, the result is
-// nil.
-// BUG(gri) Only prec == 0 is supported at the moment.
-func MakeFromLiteral(lit string, tok token.Token, prec uint) Value {
-	if prec != 0 {
-		panic("limited precision not supported")
-	}
-	switch tok {
-	case token.INT:
-		if x, err := strconv.ParseInt(lit, 0, 64); err == nil {
-			return int64Val(x)
-		}
-		if x, ok := new(big.Int).SetString(lit, 0); ok {
-			return intVal{x}
-		}
-
-	case token.FLOAT:
-		if x, ok := new(big.Rat).SetString(lit); ok {
-			return normFloat(x)
-		}
-
-	case token.IMAG:
-		if n := len(lit); n > 0 && lit[n-1] == 'i' {
-			if im, ok := new(big.Rat).SetString(lit[0 : n-1]); ok {
-				return normComplex(big.NewRat(0, 1), im)
-			}
-		}
-
-	case token.CHAR:
-		if n := len(lit); n >= 2 {
-			if code, _, _, err := strconv.UnquoteChar(lit[1:n-1], '\''); err == nil {
-				return int64Val(code)
-			}
-		}
-
-	case token.STRING:
-		if s, err := strconv.Unquote(lit); err == nil {
-			return stringVal(s)
-		}
-	}
-
-	return nil
-}
-
-// ----------------------------------------------------------------------------
-// Accessors
-//
-// For unknown arguments the result is the zero value for the respective
-// accessor type, except for Sign, where the result is 1.
-
-// BoolVal returns the Go boolean value of x, which must be a Bool or an Unknown.
-// If x is Unknown, the result is false.
-func BoolVal(x Value) bool {
-	switch x := x.(type) {
-	case boolVal:
-		return bool(x)
-	case unknownVal:
-		return false
-	}
-	panic(fmt.Sprintf("%v not a Bool", x))
-}
-
-// StringVal returns the Go string value of x, which must be a String or an Unknown.
-// If x is Unknown, the result is "".
-func StringVal(x Value) string {
-	switch x := x.(type) {
-	case stringVal:
-		return string(x)
-	case unknownVal:
-		return ""
-	}
-	panic(fmt.Sprintf("%v not a String", x))
-}
-
-// Int64Val returns the Go int64 value of x and whether the result is exact;
-// x must be an Int or an Unknown. If the result is not exact, its value is undefined.
-// If x is Unknown, the result is (0, false).
-func Int64Val(x Value) (int64, bool) {
-	switch x := x.(type) {
-	case int64Val:
-		return int64(x), true
-	case intVal:
-		return x.val.Int64(), x.val.BitLen() <= 63
-	case unknownVal:
-		return 0, false
-	}
-	panic(fmt.Sprintf("%v not an Int", x))
-}
-
-// Uint64Val returns the Go uint64 value of x and whether the result is exact;
-// x must be an Int or an Unknown. If the result is not exact, its value is undefined.
-// If x is Unknown, the result is (0, false).
-func Uint64Val(x Value) (uint64, bool) {
-	switch x := x.(type) {
-	case int64Val:
-		return uint64(x), x >= 0
-	case intVal:
-		return x.val.Uint64(), x.val.Sign() >= 0 && x.val.BitLen() <= 64
-	case unknownVal:
-		return 0, false
-	}
-	panic(fmt.Sprintf("%v not an Int", x))
-}
-
-// Float32Val is like Float64Val but for float32 instead of float64.
-func Float32Val(x Value) (float32, bool) {
-	switch x := x.(type) {
-	case int64Val:
-		f := float32(x)
-		return f, int64Val(f) == x
-	case intVal:
-		return ratToFloat32(new(big.Rat).SetFrac(x.val, int1))
-	case floatVal:
-		return ratToFloat32(x.val)
-	case unknownVal:
-		return 0, false
-	}
-	panic(fmt.Sprintf("%v not a Float", x))
-}
-
-// Float64Val returns the nearest Go float64 value of x and whether the result is exact;
-// x must be numeric but not Complex, or Unknown. For values too small (too close to 0)
-// to represent as float64, Float64Val silently underflows to 0. The result sign always
-// matches the sign of x, even for 0.
-// If x is Unknown, the result is (0, false).
-func Float64Val(x Value) (float64, bool) {
-	switch x := x.(type) {
-	case int64Val:
-		f := float64(int64(x))
-		return f, int64Val(f) == x
-	case intVal:
-		return new(big.Rat).SetFrac(x.val, int1).Float64()
-	case floatVal:
-		return x.val.Float64()
-	case unknownVal:
-		return 0, false
-	}
-	panic(fmt.Sprintf("%v not a Float", x))
-}
-
-// BitLen returns the number of bits required to represent
-// the absolute value x in binary representation; x must be an Int or an Unknown.
-// If x is Unknown, the result is 0.
-func BitLen(x Value) int {
-	switch x := x.(type) {
-	case int64Val:
-		return new(big.Int).SetInt64(int64(x)).BitLen()
-	case intVal:
-		return x.val.BitLen()
-	case unknownVal:
-		return 0
-	}
-	panic(fmt.Sprintf("%v not an Int", x))
-}
-
-// Sign returns -1, 0, or 1 depending on whether x < 0, x == 0, or x > 0;
-// x must be numeric or Unknown. For complex values x, the sign is 0 if x == 0,
-// otherwise it is != 0. If x is Unknown, the result is 1.
-func Sign(x Value) int {
-	switch x := x.(type) {
-	case int64Val:
-		switch {
-		case x < 0:
-			return -1
-		case x > 0:
-			return 1
-		}
-		return 0
-	case intVal:
-		return x.val.Sign()
-	case floatVal:
-		return x.val.Sign()
-	case complexVal:
-		return x.re.Sign() | x.im.Sign()
-	case unknownVal:
-		return 1 // avoid spurious division by zero errors
-	}
-	panic(fmt.Sprintf("%v not numeric", x))
-}
-
-// ----------------------------------------------------------------------------
-// Support for serializing/deserializing integers
-
-const (
-	// Compute the size of a Word in bytes.
-	_m       = ^big.Word(0)
-	_log     = _m>>8&1 + _m>>16&1 + _m>>32&1
-	wordSize = 1 << _log
-)
-
-// Bytes returns the bytes for the absolute value of x in little-
-// endian binary representation; x must be an Int.
-func Bytes(x Value) []byte {
-	var val *big.Int
-	switch x := x.(type) {
-	case int64Val:
-		val = new(big.Int).SetInt64(int64(x))
-	case intVal:
-		val = x.val
-	default:
-		panic(fmt.Sprintf("%v not an Int", x))
-	}
-
-	words := val.Bits()
-	bytes := make([]byte, len(words)*wordSize)
-
-	i := 0
-	for _, w := range words {
-		for j := 0; j < wordSize; j++ {
-			bytes[i] = byte(w)
-			w >>= 8
-			i++
-		}
-	}
-	// remove leading 0's
-	for i > 0 && bytes[i-1] == 0 {
-		i--
-	}
-
-	return bytes[:i]
-}
-
-// MakeFromBytes returns the Int value given the bytes of its little-endian
-// binary representation. An empty byte slice argument represents 0.
-func MakeFromBytes(bytes []byte) Value {
-	words := make([]big.Word, (len(bytes)+(wordSize-1))/wordSize)
-
-	i := 0
-	var w big.Word
-	var s uint
-	for _, b := range bytes {
-		w |= big.Word(b) << s
-		if s += 8; s == wordSize*8 {
-			words[i] = w
-			i++
-			w = 0
-			s = 0
-		}
-	}
-	// store last word
-	if i < len(words) {
-		words[i] = w
-		i++
-	}
-	// remove leading 0's
-	for i > 0 && words[i-1] == 0 {
-		i--
-	}
-
-	return normInt(new(big.Int).SetBits(words[:i]))
-}
-
-// ----------------------------------------------------------------------------
-// Support for disassembling fractions
-
-// Num returns the numerator of x; x must be Int, Float, or Unknown.
-// If x is Unknown, the result is Unknown, otherwise it is an Int
-// with the same sign as x.
-func Num(x Value) Value {
-	switch x := x.(type) {
-	case unknownVal, int64Val, intVal:
-		return x
-	case floatVal:
-		return normInt(x.val.Num())
-	}
-	panic(fmt.Sprintf("%v not Int or Float", x))
-}
-
-// Denom returns the denominator of x; x must be Int, Float, or Unknown.
-// If x is Unknown, the result is Unknown, otherwise it is an Int >= 1.
-func Denom(x Value) Value {
-	switch x := x.(type) {
-	case unknownVal:
-		return x
-	case int64Val, intVal:
-		return int64Val(1)
-	case floatVal:
-		return normInt(x.val.Denom())
-	}
-	panic(fmt.Sprintf("%v not Int or Float", x))
-}
-
-// ----------------------------------------------------------------------------
-// Support for assembling/disassembling complex numbers
-
-// MakeImag returns the numeric value x*i (possibly 0);
-// x must be Int, Float, or Unknown.
-// If x is Unknown, the result is Unknown.
-func MakeImag(x Value) Value {
-	var im *big.Rat
-	switch x := x.(type) {
-	case unknownVal:
-		return x
-	case int64Val:
-		im = big.NewRat(int64(x), 1)
-	case intVal:
-		im = new(big.Rat).SetFrac(x.val, int1)
-	case floatVal:
-		im = x.val
-	default:
-		panic(fmt.Sprintf("%v not Int or Float", x))
-	}
-	return normComplex(rat0, im)
-}
-
-// Real returns the real part of x, which must be a numeric or unknown value.
-// If x is Unknown, the result is Unknown.
-func Real(x Value) Value {
-	switch x := x.(type) {
-	case unknownVal, int64Val, intVal, floatVal:
-		return x
-	case complexVal:
-		return normFloat(x.re)
-	}
-	panic(fmt.Sprintf("%v not numeric", x))
-}
-
-// Imag returns the imaginary part of x, which must be a numeric or unknown value.
-// If x is Unknown, the result is Unknown.
-func Imag(x Value) Value {
-	switch x := x.(type) {
-	case unknownVal:
-		return x
-	case int64Val, intVal, floatVal:
-		return int64Val(0)
-	case complexVal:
-		return normFloat(x.im)
-	}
-	panic(fmt.Sprintf("%v not numeric", x))
-}
-
-// ----------------------------------------------------------------------------
-// Operations
-
-// is32bit reports whether x can be represented using 32 bits.
-func is32bit(x int64) bool {
-	const s = 32
-	return -1<<(s-1) <= x && x <= 1<<(s-1)-1
-}
-
-// is63bit reports whether x can be represented using 63 bits.
-func is63bit(x int64) bool {
-	const s = 63
-	return -1<<(s-1) <= x && x <= 1<<(s-1)-1
-}
-
-// UnaryOp returns the result of the unary expression op y.
-// The operation must be defined for the operand.
-// If prec > 0 it specifies the ^ (xor) result size in bits.
-// If y is Unknown, the result is Unknown.
-//
-func UnaryOp(op token.Token, y Value, prec uint) Value {
-	switch op {
-	case token.ADD:
-		switch y.(type) {
-		case unknownVal, int64Val, intVal, floatVal, complexVal:
-			return y
-		}
-
-	case token.SUB:
-		switch y := y.(type) {
-		case unknownVal:
-			return y
-		case int64Val:
-			if z := -y; z != y {
-				return z // no overflow
-			}
-			return normInt(new(big.Int).Neg(big.NewInt(int64(y))))
-		case intVal:
-			return normInt(new(big.Int).Neg(y.val))
-		case floatVal:
-			return normFloat(new(big.Rat).Neg(y.val))
-		case complexVal:
-			return normComplex(new(big.Rat).Neg(y.re), new(big.Rat).Neg(y.im))
-		}
-
-	case token.XOR:
-		var z big.Int
-		switch y := y.(type) {
-		case unknownVal:
-			return y
-		case int64Val:
-			z.Not(big.NewInt(int64(y)))
-		case intVal:
-			z.Not(y.val)
-		default:
-			goto Error
-		}
-		// For unsigned types, the result will be negative and
-		// thus "too large": We must limit the result precision
-		// to the type's precision.
-		if prec > 0 {
-			z.AndNot(&z, new(big.Int).Lsh(big.NewInt(-1), prec)) // z &^= (-1)<<prec
-		}
-		return normInt(&z)
-
-	case token.NOT:
-		switch y := y.(type) {
-		case unknownVal:
-			return y
-		case boolVal:
-			return !y
-		}
-	}
-
-Error:
-	panic(fmt.Sprintf("invalid unary operation %s%v", op, y))
-}
-
-var (
-	int1 = big.NewInt(1)
-	rat0 = big.NewRat(0, 1)
-)
-
-func ord(x Value) int {
-	switch x.(type) {
-	default:
-		return 0
-	case boolVal, stringVal:
-		return 1
-	case int64Val:
-		return 2
-	case intVal:
-		return 3
-	case floatVal:
-		return 4
-	case complexVal:
-		return 5
-	}
-}
-
-// match returns the matching representation (same type) with the
-// smallest complexity for two values x and y. If one of them is
-// numeric, both of them must be numeric. If one of them is Unknown,
-// both results are Unknown.
-//
-func match(x, y Value) (_, _ Value) {
-	if ord(x) > ord(y) {
-		y, x = match(y, x)
-		return x, y
-	}
-	// ord(x) <= ord(y)
-
-	switch x := x.(type) {
-	case unknownVal:
-		return x, x
-
-	case boolVal, stringVal, complexVal:
-		return x, y
-
-	case int64Val:
-		switch y := y.(type) {
-		case int64Val:
-			return x, y
-		case intVal:
-			return intVal{big.NewInt(int64(x))}, y
-		case floatVal:
-			return floatVal{big.NewRat(int64(x), 1)}, y
-		case complexVal:
-			return complexVal{big.NewRat(int64(x), 1), rat0}, y
-		}
-
-	case intVal:
-		switch y := y.(type) {
-		case intVal:
-			return x, y
-		case floatVal:
-			return floatVal{new(big.Rat).SetFrac(x.val, int1)}, y
-		case complexVal:
-			return complexVal{new(big.Rat).SetFrac(x.val, int1), rat0}, y
-		}
-
-	case floatVal:
-		switch y := y.(type) {
-		case floatVal:
-			return x, y
-		case complexVal:
-			return complexVal{x.val, rat0}, y
-		}
-	}
-
-	panic("unreachable")
-}
-
-// BinaryOp returns the result of the binary expression x op y.
-// The operation must be defined for the operands. If one of the
-// operands is Unknown, the result is Unknown.
-// To force integer division of Int operands, use op == token.QUO_ASSIGN
-// instead of token.QUO; the result is guaranteed to be Int in this case.
-// Division by zero leads to a run-time panic.
-//
-func BinaryOp(x Value, op token.Token, y Value) Value {
-	x, y = match(x, y)
-
-	switch x := x.(type) {
-	case unknownVal:
-		return x
-
-	case boolVal:
-		y := y.(boolVal)
-		switch op {
-		case token.LAND:
-			return x && y
-		case token.LOR:
-			return x || y
-		}
-
-	case int64Val:
-		a := int64(x)
-		b := int64(y.(int64Val))
-		var c int64
-		switch op {
-		case token.ADD:
-			if !is63bit(a) || !is63bit(b) {
-				return normInt(new(big.Int).Add(big.NewInt(a), big.NewInt(b)))
-			}
-			c = a + b
-		case token.SUB:
-			if !is63bit(a) || !is63bit(b) {
-				return normInt(new(big.Int).Sub(big.NewInt(a), big.NewInt(b)))
-			}
-			c = a - b
-		case token.MUL:
-			if !is32bit(a) || !is32bit(b) {
-				return normInt(new(big.Int).Mul(big.NewInt(a), big.NewInt(b)))
-			}
-			c = a * b
-		case token.QUO:
-			return normFloat(new(big.Rat).SetFrac(big.NewInt(a), big.NewInt(b)))
-		case token.QUO_ASSIGN: // force integer division
-			c = a / b
-		case token.REM:
-			c = a % b
-		case token.AND:
-			c = a & b
-		case token.OR:
-			c = a | b
-		case token.XOR:
-			c = a ^ b
-		case token.AND_NOT:
-			c = a &^ b
-		default:
-			goto Error
-		}
-		return int64Val(c)
-
-	case intVal:
-		a := x.val
-		b := y.(intVal).val
-		var c big.Int
-		switch op {
-		case token.ADD:
-			c.Add(a, b)
-		case token.SUB:
-			c.Sub(a, b)
-		case token.MUL:
-			c.Mul(a, b)
-		case token.QUO:
-			return normFloat(new(big.Rat).SetFrac(a, b))
-		case token.QUO_ASSIGN: // force integer division
-			c.Quo(a, b)
-		case token.REM:
-			c.Rem(a, b)
-		case token.AND:
-			c.And(a, b)
-		case token.OR:
-			c.Or(a, b)
-		case token.XOR:
-			c.Xor(a, b)
-		case token.AND_NOT:
-			c.AndNot(a, b)
-		default:
-			goto Error
-		}
-		return normInt(&c)
-
-	case floatVal:
-		a := x.val
-		b := y.(floatVal).val
-		var c big.Rat
-		switch op {
-		case token.ADD:
-			c.Add(a, b)
-		case token.SUB:
-			c.Sub(a, b)
-		case token.MUL:
-			c.Mul(a, b)
-		case token.QUO:
-			c.Quo(a, b)
-		default:
-			goto Error
-		}
-		return normFloat(&c)
-
-	case complexVal:
-		y := y.(complexVal)
-		a, b := x.re, x.im
-		c, d := y.re, y.im
-		var re, im big.Rat
-		switch op {
-		case token.ADD:
-			// (a+c) + i(b+d)
-			re.Add(a, c)
-			im.Add(b, d)
-		case token.SUB:
-			// (a-c) + i(b-d)
-			re.Sub(a, c)
-			im.Sub(b, d)
-		case token.MUL:
-			// (ac-bd) + i(bc+ad)
-			var ac, bd, bc, ad big.Rat
-			ac.Mul(a, c)
-			bd.Mul(b, d)
-			bc.Mul(b, c)
-			ad.Mul(a, d)
-			re.Sub(&ac, &bd)
-			im.Add(&bc, &ad)
-		case token.QUO:
-			// (ac+bd)/s + i(bc-ad)/s, with s = cc + dd
-			var ac, bd, bc, ad, s, cc, dd big.Rat
-			ac.Mul(a, c)
-			bd.Mul(b, d)
-			bc.Mul(b, c)
-			ad.Mul(a, d)
-			cc.Mul(c, c)
-			dd.Mul(d, d)
-			s.Add(&cc, &dd)
-			re.Add(&ac, &bd)
-			re.Quo(&re, &s)
-			im.Sub(&bc, &ad)
-			im.Quo(&im, &s)
-		default:
-			goto Error
-		}
-		return normComplex(&re, &im)
-
-	case stringVal:
-		if op == token.ADD {
-			return x + y.(stringVal)
-		}
-	}
-
-Error:
-	panic(fmt.Sprintf("invalid binary operation %v %s %v", x, op, y))
-}
-
-// Shift returns the result of the shift expression x op s
-// with op == token.SHL or token.SHR (<< or >>). x must be
-// an Int or an Unknown. If x is Unknown, the result is x.
-//
-func Shift(x Value, op token.Token, s uint) Value {
-	switch x := x.(type) {
-	case unknownVal:
-		return x
-
-	case int64Val:
-		if s == 0 {
-			return x
-		}
-		switch op {
-		case token.SHL:
-			z := big.NewInt(int64(x))
-			return normInt(z.Lsh(z, s))
-		case token.SHR:
-			return x >> s
-		}
-
-	case intVal:
-		if s == 0 {
-			return x
-		}
-		var z big.Int
-		switch op {
-		case token.SHL:
-			return normInt(z.Lsh(x.val, s))
-		case token.SHR:
-			return normInt(z.Rsh(x.val, s))
-		}
-	}
-
-	panic(fmt.Sprintf("invalid shift %v %s %d", x, op, s))
-}
-
-func cmpZero(x int, op token.Token) bool {
-	switch op {
-	case token.EQL:
-		return x == 0
-	case token.NEQ:
-		return x != 0
-	case token.LSS:
-		return x < 0
-	case token.LEQ:
-		return x <= 0
-	case token.GTR:
-		return x > 0
-	case token.GEQ:
-		return x >= 0
-	}
-	panic("unreachable")
-}
-
-// Compare returns the result of the comparison x op y.
-// The comparison must be defined for the operands.
-// If one of the operands is Unknown, the result is
-// false.
-//
-func Compare(x Value, op token.Token, y Value) bool {
-	x, y = match(x, y)
-
-	switch x := x.(type) {
-	case unknownVal:
-		return false
-
-	case boolVal:
-		y := y.(boolVal)
-		switch op {
-		case token.EQL:
-			return x == y
-		case token.NEQ:
-			return x != y
-		}
-
-	case int64Val:
-		y := y.(int64Val)
-		switch op {
-		case token.EQL:
-			return x == y
-		case token.NEQ:
-			return x != y
-		case token.LSS:
-			return x < y
-		case token.LEQ:
-			return x <= y
-		case token.GTR:
-			return x > y
-		case token.GEQ:
-			return x >= y
-		}
-
-	case intVal:
-		return cmpZero(x.val.Cmp(y.(intVal).val), op)
-
-	case floatVal:
-		return cmpZero(x.val.Cmp(y.(floatVal).val), op)
-
-	case complexVal:
-		y := y.(complexVal)
-		re := x.re.Cmp(y.re)
-		im := x.im.Cmp(y.im)
-		switch op {
-		case token.EQL:
-			return re == 0 && im == 0
-		case token.NEQ:
-			return re != 0 || im != 0
-		}
-
-	case stringVal:
-		y := y.(stringVal)
-		switch op {
-		case token.EQL:
-			return x == y
-		case token.NEQ:
-			return x != y
-		case token.LSS:
-			return x < y
-		case token.LEQ:
-			return x <= y
-		case token.GTR:
-			return x > y
-		case token.GEQ:
-			return x >= y
-		}
-	}
-
-	panic(fmt.Sprintf("invalid comparison %v %s %v", x, op, y))
-}
diff --git a/src/go/constant/value_test.go b/src/go/constant/value_test.go
deleted file mode 100644
index 08cdd5e..0000000
--- a/src/go/constant/value_test.go
+++ /dev/null
@@ -1,375 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package constant
-
-import (
-	"go/token"
-	"strings"
-	"testing"
-)
-
-// TODO(gri) expand this test framework
-
-var opTests = []string{
-	// unary operations
-	`+ 0 = 0`,
-	`+ ? = ?`,
-	`- 1 = -1`,
-	`- ? = ?`,
-	`^ 0 = -1`,
-	`^ ? = ?`,
-
-	`! true = false`,
-	`! false = true`,
-	`! ? = ?`,
-
-	// etc.
-
-	// binary operations
-	`"" + "" = ""`,
-	`"foo" + "" = "foo"`,
-	`"" + "bar" = "bar"`,
-	`"foo" + "bar" = "foobar"`,
-
-	`0 + 0 = 0`,
-	`0 + 0.1 = 0.1`,
-	`0 + 0.1i = 0.1i`,
-	`0.1 + 0.9 = 1`,
-	`1e100 + 1e100 = 2e100`,
-	`? + 0 = ?`,
-	`0 + ? = ?`,
-
-	`0 - 0 = 0`,
-	`0 - 0.1 = -0.1`,
-	`0 - 0.1i = -0.1i`,
-	`1e100 - 1e100 = 0`,
-	`? - 0 = ?`,
-	`0 - ? = ?`,
-
-	`0 * 0 = 0`,
-	`1 * 0.1 = 0.1`,
-	`1 * 0.1i = 0.1i`,
-	`1i * 1i = -1`,
-	`? * 0 = ?`,
-	`0 * ? = ?`,
-
-	`0 / 0 = "division_by_zero"`,
-	`10 / 2 = 5`,
-	`5 / 3 = 5/3`,
-	`5i / 3i = 5/3`,
-	`? / 0 = ?`,
-	`0 / ? = ?`,
-
-	`0 % 0 = "runtime_error:_integer_divide_by_zero"`, // TODO(gri) should be the same as for /
-	`10 % 3 = 1`,
-	`? % 0 = ?`,
-	`0 % ? = ?`,
-
-	`0 & 0 = 0`,
-	`12345 & 0 = 0`,
-	`0xff & 0xf = 0xf`,
-	`? & 0 = ?`,
-	`0 & ? = ?`,
-
-	`0 | 0 = 0`,
-	`12345 | 0 = 12345`,
-	`0xb | 0xa0 = 0xab`,
-	`? | 0 = ?`,
-	`0 | ? = ?`,
-
-	`0 ^ 0 = 0`,
-	`1 ^ -1 = -2`,
-	`? ^ 0 = ?`,
-	`0 ^ ? = ?`,
-
-	`0 &^ 0 = 0`,
-	`0xf &^ 1 = 0xe`,
-	`1 &^ 0xf = 0`,
-	// etc.
-
-	// shifts
-	`0 << 0 = 0`,
-	`1 << 10 = 1024`,
-	`0 >> 0 = 0`,
-	`1024 >> 10 == 1`,
-	`? << 0 == ?`,
-	`? >> 10 == ?`,
-	// etc.
-
-	// comparisons
-	`false == false = true`,
-	`false == true = false`,
-	`true == false = false`,
-	`true == true = true`,
-
-	`false != false = false`,
-	`false != true = true`,
-	`true != false = true`,
-	`true != true = false`,
-
-	`"foo" == "bar" = false`,
-	`"foo" != "bar" = true`,
-	`"foo" < "bar" = false`,
-	`"foo" <= "bar" = false`,
-	`"foo" > "bar" = true`,
-	`"foo" >= "bar" = true`,
-
-	`0 == 0 = true`,
-	`0 != 0 = false`,
-	`0 < 10 = true`,
-	`10 <= 10 = true`,
-	`0 > 10 = false`,
-	`10 >= 10 = true`,
-
-	`1/123456789 == 1/123456789 == true`,
-	`1/123456789 != 1/123456789 == false`,
-	`1/123456789 < 1/123456788 == true`,
-	`1/123456788 <= 1/123456789 == false`,
-	`0.11 > 0.11 = false`,
-	`0.11 >= 0.11 = true`,
-
-	`? == 0 = false`,
-	`? != 0 = false`,
-	`? < 10 = false`,
-	`? <= 10 = false`,
-	`? > 10 = false`,
-	`? >= 10 = false`,
-
-	`0 == ? = false`,
-	`0 != ? = false`,
-	`0 < ? = false`,
-	`10 <= ? = false`,
-	`0 > ? = false`,
-	`10 >= ? = false`,
-
-	// etc.
-}
-
-func TestOps(t *testing.T) {
-	for _, test := range opTests {
-		a := strings.Split(test, " ")
-		i := 0 // operator index
-
-		var x, x0 Value
-		switch len(a) {
-		case 4:
-			// unary operation
-		case 5:
-			// binary operation
-			x, x0 = val(a[0]), val(a[0])
-			i = 1
-		default:
-			t.Errorf("invalid test case: %s", test)
-			continue
-		}
-
-		op, ok := optab[a[i]]
-		if !ok {
-			panic("missing optab entry for " + a[i])
-		}
-
-		y, y0 := val(a[i+1]), val(a[i+1])
-
-		got := doOp(x, op, y)
-		want := val(a[i+3])
-		if !eql(got, want) {
-			t.Errorf("%s: got %s; want %s", test, got, want)
-		}
-		if x0 != nil && !eql(x, x0) {
-			t.Errorf("%s: x changed to %s", test, x)
-		}
-		if !eql(y, y0) {
-			t.Errorf("%s: y changed to %s", test, y)
-		}
-	}
-}
-
-func eql(x, y Value) bool {
-	_, ux := x.(unknownVal)
-	_, uy := y.(unknownVal)
-	if ux || uy {
-		return ux == uy
-	}
-	return Compare(x, token.EQL, y)
-}
-
-// ----------------------------------------------------------------------------
-// Support functions
-
-func val(lit string) Value {
-	if len(lit) == 0 {
-		return MakeUnknown()
-	}
-
-	switch lit {
-	case "?":
-		return MakeUnknown()
-	case "true":
-		return MakeBool(true)
-	case "false":
-		return MakeBool(false)
-	}
-
-	tok := token.INT
-	switch first, last := lit[0], lit[len(lit)-1]; {
-	case first == '"' || first == '`':
-		tok = token.STRING
-		lit = strings.Replace(lit, "_", " ", -1)
-	case first == '\'':
-		tok = token.CHAR
-	case last == 'i':
-		tok = token.IMAG
-	default:
-		if !strings.HasPrefix(lit, "0x") && strings.ContainsAny(lit, "./Ee") {
-			tok = token.FLOAT
-		}
-	}
-
-	return MakeFromLiteral(lit, tok, 0)
-}
-
-var optab = map[string]token.Token{
-	"!": token.NOT,
-
-	"+": token.ADD,
-	"-": token.SUB,
-	"*": token.MUL,
-	"/": token.QUO,
-	"%": token.REM,
-
-	"<<": token.SHL,
-	">>": token.SHR,
-
-	"&":  token.AND,
-	"|":  token.OR,
-	"^":  token.XOR,
-	"&^": token.AND_NOT,
-
-	"==": token.EQL,
-	"!=": token.NEQ,
-	"<":  token.LSS,
-	"<=": token.LEQ,
-	">":  token.GTR,
-	">=": token.GEQ,
-}
-
-func panicHandler(v *Value) {
-	switch p := recover().(type) {
-	case nil:
-		// nothing to do
-	case string:
-		*v = MakeString(p)
-	case error:
-		*v = MakeString(p.Error())
-	default:
-		panic(p)
-	}
-}
-
-func doOp(x Value, op token.Token, y Value) (z Value) {
-	defer panicHandler(&z)
-
-	if x == nil {
-		return UnaryOp(op, y, 0)
-	}
-
-	switch op {
-	case token.EQL, token.NEQ, token.LSS, token.LEQ, token.GTR, token.GEQ:
-		return MakeBool(Compare(x, op, y))
-	case token.SHL, token.SHR:
-		s, _ := Int64Val(y)
-		return Shift(x, op, uint(s))
-	default:
-		return BinaryOp(x, op, y)
-	}
-}
-
-// ----------------------------------------------------------------------------
-// Other tests
-
-var fracTests = []string{
-	"0 0 1",
-	"1 1 1",
-	"-1 -1 1",
-	"1.2 6 5",
-	"-0.991 -991 1000",
-	"1e100 1e100 1",
-}
-
-func TestFractions(t *testing.T) {
-	for _, test := range fracTests {
-		a := strings.Split(test, " ")
-		if len(a) != 3 {
-			t.Errorf("invalid test case: %s", test)
-			continue
-		}
-
-		x := val(a[0])
-		n := val(a[1])
-		d := val(a[2])
-
-		if got := Num(x); !eql(got, n) {
-			t.Errorf("%s: got num = %s; want %s", test, got, n)
-		}
-
-		if got := Denom(x); !eql(got, d) {
-			t.Errorf("%s: got denom = %s; want %s", test, got, d)
-		}
-	}
-}
-
-var bytesTests = []string{
-	"0",
-	"1",
-	"123456789",
-	"123456789012345678901234567890123456789012345678901234567890",
-}
-
-func TestBytes(t *testing.T) {
-	for _, test := range bytesTests {
-		x := val(test)
-		bytes := Bytes(x)
-
-		// special case 0
-		if Sign(x) == 0 && len(bytes) != 0 {
-			t.Errorf("%s: got %v; want empty byte slice", test, bytes)
-		}
-
-		if n := len(bytes); n > 0 && bytes[n-1] == 0 {
-			t.Errorf("%s: got %v; want no leading 0 byte", test, bytes)
-		}
-
-		if got := MakeFromBytes(bytes); !eql(got, x) {
-			t.Errorf("%s: got %s; want %s (bytes = %v)", test, got, x, bytes)
-		}
-	}
-}
-
-func TestUnknown(t *testing.T) {
-	u := MakeUnknown()
-	var values = []Value{
-		u,
-		MakeBool(false), // token.ADD ok below, operation is never considered
-		MakeString(""),
-		MakeInt64(1),
-		MakeFromLiteral("-1234567890123456789012345678901234567890", token.INT, 0),
-		MakeFloat64(1.2),
-		MakeImag(MakeFloat64(1.2)),
-	}
-	for _, val := range values {
-		x, y := val, u
-		for i := range [2]int{} {
-			if i == 1 {
-				x, y = y, x
-			}
-			if got := BinaryOp(x, token.ADD, y); got.Kind() != Unknown {
-				t.Errorf("%s + %s: got %s; want %s", x, y, got, u)
-			}
-			if got := Compare(x, token.EQL, y); got {
-				t.Errorf("%s == %s: got true; want false", x, y)
-			}
-		}
-	}
-}
diff --git a/src/go/importer/importer.go b/src/go/importer/importer.go
deleted file mode 100644
index 4590ca3..0000000
--- a/src/go/importer/importer.go
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package importer provides access to export data importers.
-package importer
-
-import (
-	"go/internal/gccgoimporter"
-	"go/internal/gcimporter"
-	"go/types"
-	"io"
-	"runtime"
-)
-
-// A Lookup function returns a reader to access package data for
-// a given import path, or an error if no matching package is found.
-type Lookup func(path string) (io.ReadCloser, error)
-
-// For returns an Importer for the given compiler and lookup interface,
-// or nil. Supported compilers are "gc", and "gccgo". If lookup is nil,
-// the default package lookup mechanism for the given compiler is used.
-func For(compiler string, lookup Lookup) types.Importer {
-	switch compiler {
-	case "gc":
-		if lookup == nil {
-			return make(gcimports)
-		}
-		panic("gc importer for custom import path lookup not yet implemented")
-	case "gccgo":
-		if lookup == nil {
-			var inst gccgoimporter.GccgoInstallation
-			if err := inst.InitFromDriver("gccgo"); err != nil {
-				return nil
-			}
-			return &gccgoimports{
-				packages: make(map[string]*types.Package),
-				importer: inst.GetImporter(nil, nil),
-			}
-		}
-		panic("gccgo importer for custom import path lookup not yet implemented")
-	}
-	// compiler not supported
-	return nil
-}
-
-// Default returns an Importer for the compiler that built the running binary.
-func Default() types.Importer {
-	return For(runtime.Compiler, nil)
-}
-
-// gc support
-
-type gcimports map[string]*types.Package
-
-func (m gcimports) Import(path string) (*types.Package, error) {
-	return gcimporter.Import(m, path)
-}
-
-// gccgo support
-
-type gccgoimports struct {
-	packages map[string]*types.Package
-	importer gccgoimporter.Importer
-}
-
-func (m *gccgoimports) Import(path string) (*types.Package, error) {
-	return m.importer(m.packages, path)
-}
diff --git a/src/go/internal/gccgoimporter/gccgoinstallation.go b/src/go/internal/gccgoimporter/gccgoinstallation.go
deleted file mode 100644
index 622dfc8..0000000
--- a/src/go/internal/gccgoimporter/gccgoinstallation.go
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gccgoimporter
-
-import (
-	"bufio"
-	"go/types"
-	"os"
-	"os/exec"
-	"path/filepath"
-	"strings"
-)
-
-// Information about a specific installation of gccgo.
-type GccgoInstallation struct {
-	// Version of gcc (e.g. 4.8.0).
-	GccVersion string
-
-	// Target triple (e.g. x86_64-unknown-linux-gnu).
-	TargetTriple string
-
-	// Built-in library paths used by this installation.
-	LibPaths []string
-}
-
-// Ask the driver at the given path for information for this GccgoInstallation.
-func (inst *GccgoInstallation) InitFromDriver(gccgoPath string) (err error) {
-	cmd := exec.Command(gccgoPath, "-###", "-S", "-x", "go", "-")
-	stderr, err := cmd.StderrPipe()
-	if err != nil {
-		return
-	}
-
-	err = cmd.Start()
-	if err != nil {
-		return
-	}
-
-	scanner := bufio.NewScanner(stderr)
-	for scanner.Scan() {
-		line := scanner.Text()
-		switch {
-		case strings.HasPrefix(line, "Target: "):
-			inst.TargetTriple = line[8:]
-
-		case line[0] == ' ':
-			args := strings.Fields(line)
-			for _, arg := range args[1:] {
-				if strings.HasPrefix(arg, "-L") {
-					inst.LibPaths = append(inst.LibPaths, arg[2:])
-				}
-			}
-		}
-	}
-
-	stdout, err := exec.Command(gccgoPath, "-dumpversion").Output()
-	if err != nil {
-		return
-	}
-	inst.GccVersion = strings.TrimSpace(string(stdout))
-
-	return
-}
-
-// Return the list of export search paths for this GccgoInstallation.
-func (inst *GccgoInstallation) SearchPaths() (paths []string) {
-	for _, lpath := range inst.LibPaths {
-		spath := filepath.Join(lpath, "go", inst.GccVersion)
-		fi, err := os.Stat(spath)
-		if err != nil || !fi.IsDir() {
-			continue
-		}
-		paths = append(paths, spath)
-
-		spath = filepath.Join(spath, inst.TargetTriple)
-		fi, err = os.Stat(spath)
-		if err != nil || !fi.IsDir() {
-			continue
-		}
-		paths = append(paths, spath)
-	}
-
-	paths = append(paths, inst.LibPaths...)
-
-	return
-}
-
-// Return an importer that searches incpaths followed by the gcc installation's
-// built-in search paths and the current directory.
-func (inst *GccgoInstallation) GetImporter(incpaths []string, initmap map[*types.Package]InitData) Importer {
-	return GetImporter(append(append(incpaths, inst.SearchPaths()...), "."), initmap)
-}
diff --git a/src/go/internal/gccgoimporter/gccgoinstallation_test.go b/src/go/internal/gccgoimporter/gccgoinstallation_test.go
deleted file mode 100644
index ef293ed..0000000
--- a/src/go/internal/gccgoimporter/gccgoinstallation_test.go
+++ /dev/null
@@ -1,193 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gccgoimporter
-
-import (
-	"go/types"
-	"runtime"
-	"testing"
-)
-
-var importablePackages = [...]string{
-	"archive/tar",
-	"archive/zip",
-	"bufio",
-	"bytes",
-	"compress/bzip2",
-	"compress/flate",
-	"compress/gzip",
-	"compress/lzw",
-	"compress/zlib",
-	"container/heap",
-	"container/list",
-	"container/ring",
-	"crypto/aes",
-	"crypto/cipher",
-	"crypto/des",
-	"crypto/dsa",
-	"crypto/ecdsa",
-	"crypto/elliptic",
-	"crypto",
-	"crypto/hmac",
-	"crypto/md5",
-	"crypto/rand",
-	"crypto/rc4",
-	"crypto/rsa",
-	"crypto/sha1",
-	"crypto/sha256",
-	"crypto/sha512",
-	"crypto/subtle",
-	"crypto/tls",
-	"crypto/x509",
-	"crypto/x509/pkix",
-	"database/sql/driver",
-	"database/sql",
-	"debug/dwarf",
-	"debug/elf",
-	"debug/gosym",
-	"debug/macho",
-	"debug/pe",
-	"encoding/ascii85",
-	"encoding/asn1",
-	"encoding/base32",
-	"encoding/base64",
-	"encoding/binary",
-	"encoding/csv",
-	"encoding/gob",
-	"encoding",
-	"encoding/hex",
-	"encoding/json",
-	"encoding/pem",
-	"encoding/xml",
-	"errors",
-	"exp/proxy",
-	"exp/terminal",
-	"expvar",
-	"flag",
-	"fmt",
-	"go/ast",
-	"go/build",
-	"go/doc",
-	"go/format",
-	"go/parser",
-	"go/printer",
-	"go/scanner",
-	"go/token",
-	"hash/adler32",
-	"hash/crc32",
-	"hash/crc64",
-	"hash/fnv",
-	"hash",
-	"html",
-	"html/template",
-	"image/color",
-	"image/color/palette",
-	"image/draw",
-	"image/gif",
-	"image",
-	"image/jpeg",
-	"image/png",
-	"index/suffixarray",
-	"io",
-	"io/ioutil",
-	"log",
-	"log/syslog",
-	"math/big",
-	"math/cmplx",
-	"math",
-	"math/rand",
-	"mime",
-	"mime/multipart",
-	"net",
-	"net/http/cgi",
-	"net/http/cookiejar",
-	"net/http/fcgi",
-	"net/http",
-	"net/http/httptest",
-	"net/http/httputil",
-	"net/http/pprof",
-	"net/mail",
-	"net/rpc",
-	"net/rpc/jsonrpc",
-	"net/smtp",
-	"net/textproto",
-	"net/url",
-	"old/regexp",
-	"old/template",
-	"os/exec",
-	"os",
-	"os/signal",
-	"os/user",
-	"path/filepath",
-	"path",
-	"reflect",
-	"regexp",
-	"regexp/syntax",
-	"runtime/debug",
-	"runtime",
-	"runtime/pprof",
-	"sort",
-	"strconv",
-	"strings",
-	"sync/atomic",
-	"sync",
-	"syscall",
-	"testing",
-	"testing/iotest",
-	"testing/quick",
-	"text/scanner",
-	"text/tabwriter",
-	"text/template",
-	"text/template/parse",
-	"time",
-	"unicode",
-	"unicode/utf16",
-	"unicode/utf8",
-}
-
-func TestInstallationImporter(t *testing.T) {
-	// This test relies on gccgo being around, which it most likely will be if we
-	// were compiled with gccgo.
-	if runtime.Compiler != "gccgo" {
-		t.Skip("This test needs gccgo")
-		return
-	}
-
-	var inst GccgoInstallation
-	err := inst.InitFromDriver("gccgo")
-	if err != nil {
-		t.Fatal(err)
-	}
-	imp := inst.GetImporter(nil, nil)
-
-	// Ensure we don't regress the number of packages we can parse. First import
-	// all packages into the same map and then each individually.
-	pkgMap := make(map[string]*types.Package)
-	for _, pkg := range importablePackages {
-		_, err = imp(pkgMap, pkg)
-		if err != nil {
-			t.Error(err)
-		}
-	}
-
-	for _, pkg := range importablePackages {
-		_, err = imp(make(map[string]*types.Package), pkg)
-		if err != nil {
-			t.Error(err)
-		}
-	}
-
-	// Test for certain specific entities in the imported data.
-	for _, test := range [...]importerTest{
-		{pkgpath: "io", name: "Reader", want: "type Reader interface{Read(p []uint8) (n int, err error)}"},
-		{pkgpath: "io", name: "ReadWriter", want: "type ReadWriter interface{Reader; Writer}"},
-		{pkgpath: "math", name: "Pi", want: "const Pi untyped float"},
-		{pkgpath: "math", name: "Sin", want: "func Sin(x float64) float64"},
-		{pkgpath: "sort", name: "Ints", want: "func Ints(a []int)"},
-		{pkgpath: "unsafe", name: "Pointer", want: "type Pointer unsafe.Pointer"},
-	} {
-		runImporterTest(t, imp, nil, &test)
-	}
-}
diff --git a/src/go/internal/gccgoimporter/importer.go b/src/go/internal/gccgoimporter/importer.go
deleted file mode 100644
index aa0d01a..0000000
--- a/src/go/internal/gccgoimporter/importer.go
+++ /dev/null
@@ -1,212 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package gccgoimporter implements Import for gccgo-generated object files.
-package gccgoimporter // import "go/internal/gccgoimporter"
-
-import (
-	"bytes"
-	"debug/elf"
-	"fmt"
-	"go/types"
-	"io"
-	"os"
-	"os/exec"
-	"path/filepath"
-	"strings"
-)
-
-// A PackageInit describes an imported package that needs initialization.
-type PackageInit struct {
-	Name     string // short package name
-	InitFunc string // name of init function
-	Priority int    // priority of init function, see InitData.Priority
-}
-
-// The gccgo-specific init data for a package.
-type InitData struct {
-	// Initialization priority of this package relative to other packages.
-	// This is based on the maximum depth of the package's dependency graph;
-	// it is guaranteed to be greater than that of its dependencies.
-	Priority int
-
-	// The list of packages which this package depends on to be initialized,
-	// including itself if needed. This is the subset of the transitive closure of
-	// the package's dependencies that need initialization.
-	Inits []PackageInit
-}
-
-// Locate the file from which to read export data.
-// This is intended to replicate the logic in gofrontend.
-func findExportFile(searchpaths []string, pkgpath string) (string, error) {
-	for _, spath := range searchpaths {
-		pkgfullpath := filepath.Join(spath, pkgpath)
-		pkgdir, name := filepath.Split(pkgfullpath)
-
-		for _, filepath := range [...]string{
-			pkgfullpath,
-			pkgfullpath + ".gox",
-			pkgdir + "lib" + name + ".so",
-			pkgdir + "lib" + name + ".a",
-			pkgfullpath + ".o",
-		} {
-			fi, err := os.Stat(filepath)
-			if err == nil && !fi.IsDir() {
-				return filepath, nil
-			}
-		}
-	}
-
-	return "", fmt.Errorf("%s: could not find export data (tried %s)", pkgpath, strings.Join(searchpaths, ":"))
-}
-
-const (
-	gccgov1Magic    = "v1;\n"
-	goimporterMagic = "\n$$ "
-	archiveMagic    = "!<ar"
-)
-
-// Opens the export data file at the given path. If this is an ELF file,
-// searches for and opens the .go_export section. If this is an archive,
-// reads the export data from the first member, which is assumed to be an ELF file.
-// This is intended to replicate the logic in gofrontend.
-func openExportFile(fpath string) (reader io.ReadSeeker, closer io.Closer, err error) {
-	f, err := os.Open(fpath)
-	if err != nil {
-		return
-	}
-	closer = f
-	defer func() {
-		if err != nil && closer != nil {
-			f.Close()
-		}
-	}()
-
-	var magic [4]byte
-	_, err = f.ReadAt(magic[:], 0)
-	if err != nil {
-		return
-	}
-	// reset to offset 0 - needed on Plan 9 (see issue #11265)
-	// TODO: remove once issue #11265 has been resolved.
-	_, err = f.Seek(0, 0)
-	if err != nil {
-		return
-	}
-
-	var elfreader io.ReaderAt
-	switch string(magic[:]) {
-	case gccgov1Magic, goimporterMagic:
-		// Raw export data.
-		reader = f
-		return
-
-	case archiveMagic:
-		// TODO(pcc): Read the archive directly instead of using "ar".
-		f.Close()
-		closer = nil
-
-		cmd := exec.Command("ar", "p", fpath)
-		var out []byte
-		out, err = cmd.Output()
-		if err != nil {
-			return
-		}
-
-		elfreader = bytes.NewReader(out)
-
-	default:
-		elfreader = f
-	}
-
-	ef, err := elf.NewFile(elfreader)
-	if err != nil {
-		return
-	}
-
-	sec := ef.Section(".go_export")
-	if sec == nil {
-		err = fmt.Errorf("%s: .go_export section not found", fpath)
-		return
-	}
-
-	reader = sec.Open()
-	return
-}
-
-// An Importer resolves import paths to Packages. The imports map records
-// packages already known, indexed by package path.
-// An importer must determine the canonical package path and check imports
-// to see if it is already present in the map. If so, the Importer can return
-// the map entry. Otherwise, the importer must load the package data for the
-// given path into a new *Package, record it in imports map, and return the
-// package.
-type Importer func(imports map[string]*types.Package, path string) (*types.Package, error)
-
-func GetImporter(searchpaths []string, initmap map[*types.Package]InitData) Importer {
-	return func(imports map[string]*types.Package, pkgpath string) (pkg *types.Package, err error) {
-		if pkgpath == "unsafe" {
-			return types.Unsafe, nil
-		}
-
-		fpath, err := findExportFile(searchpaths, pkgpath)
-		if err != nil {
-			return
-		}
-
-		reader, closer, err := openExportFile(fpath)
-		if err != nil {
-			return
-		}
-		if closer != nil {
-			defer closer.Close()
-		}
-
-		var magic [4]byte
-		_, err = reader.Read(magic[:])
-		if err != nil {
-			return
-		}
-		_, err = reader.Seek(0, 0)
-		if err != nil {
-			return
-		}
-
-		switch string(magic[:]) {
-		case gccgov1Magic:
-			var p parser
-			p.init(fpath, reader, imports)
-			pkg = p.parsePackage()
-			if initmap != nil {
-				initmap[pkg] = p.initdata
-			}
-
-		// Excluded for now: Standard gccgo doesn't support this import format currently.
-		// case goimporterMagic:
-		// 	var data []byte
-		// 	data, err = ioutil.ReadAll(reader)
-		// 	if err != nil {
-		// 		return
-		// 	}
-		// 	var n int
-		// 	n, pkg, err = importer.ImportData(imports, data)
-		// 	if err != nil {
-		// 		return
-		// 	}
-
-		// 	if initmap != nil {
-		// 		suffixreader := bytes.NewReader(data[n:])
-		// 		var p parser
-		// 		p.init(fpath, suffixreader, nil)
-		// 		p.parseInitData()
-		// 		initmap[pkg] = p.initdata
-		// 	}
-
-		default:
-			err = fmt.Errorf("unrecognized magic string: %q", string(magic[:]))
-		}
-
-		return
-	}
-}
diff --git a/src/go/internal/gccgoimporter/importer_test.go b/src/go/internal/gccgoimporter/importer_test.go
deleted file mode 100644
index f3bcadb..0000000
--- a/src/go/internal/gccgoimporter/importer_test.go
+++ /dev/null
@@ -1,171 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gccgoimporter
-
-import (
-	"go/types"
-	"internal/testenv"
-	"io/ioutil"
-	"os"
-	"os/exec"
-	"path/filepath"
-	"runtime"
-	"testing"
-)
-
-type importerTest struct {
-	pkgpath, name, want, wantval string
-	wantinits                    []string
-}
-
-func runImporterTest(t *testing.T, imp Importer, initmap map[*types.Package]InitData, test *importerTest) {
-	pkg, err := imp(make(map[string]*types.Package), test.pkgpath)
-	if err != nil {
-		t.Error(err)
-		return
-	}
-
-	if test.name != "" {
-		obj := pkg.Scope().Lookup(test.name)
-		if obj == nil {
-			t.Errorf("%s: object not found", test.name)
-			return
-		}
-
-		got := types.ObjectString(obj, types.RelativeTo(pkg))
-		if got != test.want {
-			t.Errorf("%s: got %q; want %q", test.name, got, test.want)
-		}
-
-		if test.wantval != "" {
-			gotval := obj.(*types.Const).Val().String()
-			if gotval != test.wantval {
-				t.Errorf("%s: got val %q; want val %q", test.name, gotval, test.wantval)
-			}
-		}
-	}
-
-	if len(test.wantinits) > 0 {
-		initdata := initmap[pkg]
-		found := false
-		// Check that the package's own init function has the package's priority
-		for _, pkginit := range initdata.Inits {
-			if pkginit.InitFunc == test.wantinits[0] {
-				if initdata.Priority != pkginit.Priority {
-					t.Errorf("%s: got self priority %d; want %d", test.pkgpath, pkginit.Priority, initdata.Priority)
-				}
-				found = true
-				break
-			}
-		}
-
-		if !found {
-			t.Errorf("%s: could not find expected function %q", test.pkgpath, test.wantinits[0])
-		}
-
-		// Each init function in the list other than the first one is a
-		// dependency of the function immediately before it. Check that
-		// the init functions appear in descending priority order.
-		priority := initdata.Priority
-		for _, wantdepinit := range test.wantinits[1:] {
-			found = false
-			for _, pkginit := range initdata.Inits {
-				if pkginit.InitFunc == wantdepinit {
-					if priority <= pkginit.Priority {
-						t.Errorf("%s: got dep priority %d; want less than %d", test.pkgpath, pkginit.Priority, priority)
-					}
-					found = true
-					priority = pkginit.Priority
-					break
-				}
-			}
-
-			if !found {
-				t.Errorf("%s: could not find expected function %q", test.pkgpath, wantdepinit)
-			}
-		}
-	}
-}
-
-var importerTests = [...]importerTest{
-	{pkgpath: "pointer", name: "Int8Ptr", want: "type Int8Ptr *int8"},
-	{pkgpath: "complexnums", name: "NN", want: "const NN untyped complex", wantval: "(-1/1 + -1/1i)"},
-	{pkgpath: "complexnums", name: "NP", want: "const NP untyped complex", wantval: "(-1/1 + 1/1i)"},
-	{pkgpath: "complexnums", name: "PN", want: "const PN untyped complex", wantval: "(1/1 + -1/1i)"},
-	{pkgpath: "complexnums", name: "PP", want: "const PP untyped complex", wantval: "(1/1 + 1/1i)"},
-	// TODO: enable this entry once bug has been tracked down
-	//{pkgpath: "imports", wantinits: []string{"imports..import", "fmt..import", "math..import"}},
-}
-
-func TestGoxImporter(t *testing.T) {
-	testenv.MustHaveGoBuild(t)
-
-	initmap := make(map[*types.Package]InitData)
-	imp := GetImporter([]string{"testdata"}, initmap)
-
-	for _, test := range importerTests {
-		runImporterTest(t, imp, initmap, &test)
-	}
-}
-
-func TestObjImporter(t *testing.T) {
-	testenv.MustHaveGoBuild(t)
-
-	// This test relies on gccgo being around, which it most likely will be if we
-	// were compiled with gccgo.
-	if runtime.Compiler != "gccgo" {
-		t.Skip("This test needs gccgo")
-		return
-	}
-
-	tmpdir, err := ioutil.TempDir("", "")
-	if err != nil {
-		t.Fatal(err)
-	}
-	initmap := make(map[*types.Package]InitData)
-	imp := GetImporter([]string{tmpdir}, initmap)
-
-	artmpdir, err := ioutil.TempDir("", "")
-	if err != nil {
-		t.Fatal(err)
-	}
-	arinitmap := make(map[*types.Package]InitData)
-	arimp := GetImporter([]string{artmpdir}, arinitmap)
-
-	for _, test := range importerTests {
-		gofile := filepath.Join("testdata", test.pkgpath+".go")
-		ofile := filepath.Join(tmpdir, test.pkgpath+".o")
-		afile := filepath.Join(artmpdir, "lib"+test.pkgpath+".a")
-
-		cmd := exec.Command("gccgo", "-fgo-pkgpath="+test.pkgpath, "-c", "-o", ofile, gofile)
-		out, err := cmd.CombinedOutput()
-		if err != nil {
-			t.Logf("%s", out)
-			t.Fatalf("gccgo %s failed: %s", gofile, err)
-		}
-
-		runImporterTest(t, imp, initmap, &test)
-
-		cmd = exec.Command("ar", "cr", afile, ofile)
-		out, err = cmd.CombinedOutput()
-		if err != nil {
-			t.Logf("%s", out)
-			t.Fatalf("ar cr %s %s failed: %s", afile, ofile, err)
-		}
-
-		runImporterTest(t, arimp, arinitmap, &test)
-
-		if err = os.Remove(ofile); err != nil {
-			t.Fatal(err)
-		}
-		if err = os.Remove(afile); err != nil {
-			t.Fatal(err)
-		}
-	}
-
-	if err = os.Remove(tmpdir); err != nil {
-		t.Fatal(err)
-	}
-}
diff --git a/src/go/internal/gccgoimporter/parser.go b/src/go/internal/gccgoimporter/parser.go
deleted file mode 100644
index c06cce4..0000000
--- a/src/go/internal/gccgoimporter/parser.go
+++ /dev/null
@@ -1,855 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gccgoimporter
-
-import (
-	"bytes"
-	"errors"
-	"fmt"
-	"go/constant"
-	"go/token"
-	"go/types"
-	"io"
-	"strconv"
-	"strings"
-	"text/scanner"
-)
-
-type parser struct {
-	scanner  scanner.Scanner
-	tok      rune                      // current token
-	lit      string                    // literal string; only valid for Ident, Int, String tokens
-	pkgpath  string                    // package path of imported package
-	pkgname  string                    // name of imported package
-	pkg      *types.Package            // reference to imported package
-	imports  map[string]*types.Package // package path -> package object
-	typeMap  map[int]types.Type        // type number -> type
-	initdata InitData                  // package init priority data
-}
-
-func (p *parser) init(filename string, src io.Reader, imports map[string]*types.Package) {
-	p.scanner.Init(src)
-	p.scanner.Error = func(_ *scanner.Scanner, msg string) { p.error(msg) }
-	p.scanner.Mode = scanner.ScanIdents | scanner.ScanInts | scanner.ScanFloats | scanner.ScanStrings | scanner.ScanComments | scanner.SkipComments
-	p.scanner.Whitespace = 1<<'\t' | 1<<'\n' | 1<<' '
-	p.scanner.Filename = filename // for good error messages
-	p.next()
-	p.imports = imports
-	p.typeMap = make(map[int]types.Type)
-}
-
-type importError struct {
-	pos scanner.Position
-	err error
-}
-
-func (e importError) Error() string {
-	return fmt.Sprintf("import error %s (byte offset = %d): %s", e.pos, e.pos.Offset, e.err)
-}
-
-func (p *parser) error(err interface{}) {
-	if s, ok := err.(string); ok {
-		err = errors.New(s)
-	}
-	// panic with a runtime.Error if err is not an error
-	panic(importError{p.scanner.Pos(), err.(error)})
-}
-
-func (p *parser) errorf(format string, args ...interface{}) {
-	p.error(fmt.Errorf(format, args...))
-}
-
-func (p *parser) expect(tok rune) string {
-	lit := p.lit
-	if p.tok != tok {
-		p.errorf("expected %s, got %s (%s)", scanner.TokenString(tok), scanner.TokenString(p.tok), lit)
-	}
-	p.next()
-	return lit
-}
-
-func (p *parser) expectKeyword(keyword string) {
-	lit := p.expect(scanner.Ident)
-	if lit != keyword {
-		p.errorf("expected keyword %s, got %q", keyword, lit)
-	}
-}
-
-func (p *parser) parseString() string {
-	str, err := strconv.Unquote(p.expect(scanner.String))
-	if err != nil {
-		p.error(err)
-	}
-	return str
-}
-
-// unquotedString     = { unquotedStringChar } .
-// unquotedStringChar = <neither a whitespace nor a ';' char> .
-func (p *parser) parseUnquotedString() string {
-	if p.tok == scanner.EOF {
-		p.error("unexpected EOF")
-	}
-	var buf bytes.Buffer
-	buf.WriteString(p.scanner.TokenText())
-	// This loop needs to examine each character before deciding whether to consume it. If we see a semicolon,
-	// we need to let it be consumed by p.next().
-	for ch := p.scanner.Peek(); ch != ';' && ch != scanner.EOF && p.scanner.Whitespace&(1<<uint(ch)) == 0; ch = p.scanner.Peek() {
-		buf.WriteRune(ch)
-		p.scanner.Next()
-	}
-	p.next()
-	return buf.String()
-}
-
-func (p *parser) next() {
-	p.tok = p.scanner.Scan()
-	switch p.tok {
-	case scanner.Ident, scanner.Int, scanner.Float, scanner.String, '·':
-		p.lit = p.scanner.TokenText()
-	default:
-		p.lit = ""
-	}
-}
-
-func (p *parser) parseQualifiedName() (path, name string) {
-	return p.parseQualifiedNameStr(p.parseString())
-}
-
-func (p *parser) parseUnquotedQualifiedName() (path, name string) {
-	return p.parseQualifiedNameStr(p.parseUnquotedString())
-}
-
-// qualifiedName = [ ["."] unquotedString "." ] unquotedString .
-//
-// The above production uses greedy matching.
-func (p *parser) parseQualifiedNameStr(unquotedName string) (pkgpath, name string) {
-	parts := strings.Split(unquotedName, ".")
-	if parts[0] == "" {
-		parts = parts[1:]
-	}
-
-	switch len(parts) {
-	case 0:
-		p.errorf("malformed qualified name: %q", unquotedName)
-	case 1:
-		// unqualified name
-		pkgpath = p.pkgpath
-		name = parts[0]
-	default:
-		// qualified name, which may contain periods
-		pkgpath = strings.Join(parts[0:len(parts)-1], ".")
-		name = parts[len(parts)-1]
-	}
-
-	return
-}
-
-// getPkg returns the package for a given path. If the package is
-// not found but we have a package name, create the package and
-// add it to the p.imports map.
-//
-func (p *parser) getPkg(pkgpath, name string) *types.Package {
-	// package unsafe is not in the imports map - handle explicitly
-	if pkgpath == "unsafe" {
-		return types.Unsafe
-	}
-	pkg := p.imports[pkgpath]
-	if pkg == nil && name != "" {
-		pkg = types.NewPackage(pkgpath, name)
-		p.imports[pkgpath] = pkg
-	}
-	return pkg
-}
-
-// parseExportedName is like parseQualifiedName, but
-// the package path is resolved to an imported *types.Package.
-//
-// ExportedName = string [string] .
-func (p *parser) parseExportedName() (pkg *types.Package, name string) {
-	path, name := p.parseQualifiedName()
-	var pkgname string
-	if p.tok == scanner.String {
-		pkgname = p.parseString()
-	}
-	pkg = p.getPkg(path, pkgname)
-	if pkg == nil {
-		p.errorf("package %s (path = %q) not found", name, path)
-	}
-	return
-}
-
-// Name = QualifiedName | "?" .
-func (p *parser) parseName() string {
-	if p.tok == '?' {
-		// Anonymous.
-		p.next()
-		return ""
-	}
-	// The package path is redundant for us. Don't try to parse it.
-	_, name := p.parseUnquotedQualifiedName()
-	return name
-}
-
-func deref(typ types.Type) types.Type {
-	if p, _ := typ.(*types.Pointer); p != nil {
-		typ = p.Elem()
-	}
-	return typ
-}
-
-// Field = Name Type [string] .
-func (p *parser) parseField(pkg *types.Package) (field *types.Var, tag string) {
-	name := p.parseName()
-	typ := p.parseType(pkg)
-	anon := false
-	if name == "" {
-		anon = true
-		switch typ := deref(typ).(type) {
-		case *types.Basic:
-			name = typ.Name()
-		case *types.Named:
-			name = typ.Obj().Name()
-		default:
-			p.error("anonymous field expected")
-		}
-	}
-	field = types.NewField(token.NoPos, pkg, name, typ, anon)
-	if p.tok == scanner.String {
-		tag = p.parseString()
-	}
-	return
-}
-
-// Param = Name ["..."] Type .
-func (p *parser) parseParam(pkg *types.Package) (param *types.Var, isVariadic bool) {
-	name := p.parseName()
-	if p.tok == '.' {
-		p.next()
-		p.expect('.')
-		p.expect('.')
-		isVariadic = true
-	}
-	typ := p.parseType(pkg)
-	if isVariadic {
-		typ = types.NewSlice(typ)
-	}
-	param = types.NewParam(token.NoPos, pkg, name, typ)
-	return
-}
-
-// Var = Name Type .
-func (p *parser) parseVar(pkg *types.Package) *types.Var {
-	name := p.parseName()
-	return types.NewVar(token.NoPos, pkg, name, p.parseType(pkg))
-}
-
-// ConstValue     = string | "false" | "true" | ["-"] (int ["'"] | FloatOrComplex) .
-// FloatOrComplex = float ["i" | ("+"|"-") float "i"] .
-func (p *parser) parseConstValue() (val constant.Value, typ types.Type) {
-	switch p.tok {
-	case scanner.String:
-		str := p.parseString()
-		val = constant.MakeString(str)
-		typ = types.Typ[types.UntypedString]
-		return
-
-	case scanner.Ident:
-		b := false
-		switch p.lit {
-		case "false":
-		case "true":
-			b = true
-
-		default:
-			p.errorf("expected const value, got %s (%q)", scanner.TokenString(p.tok), p.lit)
-		}
-
-		p.next()
-		val = constant.MakeBool(b)
-		typ = types.Typ[types.UntypedBool]
-		return
-	}
-
-	sign := ""
-	if p.tok == '-' {
-		p.next()
-		sign = "-"
-	}
-
-	switch p.tok {
-	case scanner.Int:
-		val = constant.MakeFromLiteral(sign+p.lit, token.INT, 0)
-		if val == nil {
-			p.error("could not parse integer literal")
-		}
-
-		p.next()
-		if p.tok == '\'' {
-			p.next()
-			typ = types.Typ[types.UntypedRune]
-		} else {
-			typ = types.Typ[types.UntypedInt]
-		}
-
-	case scanner.Float:
-		re := sign + p.lit
-		p.next()
-
-		var im string
-		switch p.tok {
-		case '+':
-			p.next()
-			im = p.expect(scanner.Float)
-
-		case '-':
-			p.next()
-			im = "-" + p.expect(scanner.Float)
-
-		case scanner.Ident:
-			// re is in fact the imaginary component. Expect "i" below.
-			im = re
-			re = "0"
-
-		default:
-			val = constant.MakeFromLiteral(re, token.FLOAT, 0)
-			if val == nil {
-				p.error("could not parse float literal")
-			}
-			typ = types.Typ[types.UntypedFloat]
-			return
-		}
-
-		p.expectKeyword("i")
-		reval := constant.MakeFromLiteral(re, token.FLOAT, 0)
-		if reval == nil {
-			p.error("could not parse real component of complex literal")
-		}
-		imval := constant.MakeFromLiteral(im+"i", token.IMAG, 0)
-		if imval == nil {
-			p.error("could not parse imag component of complex literal")
-		}
-		val = constant.BinaryOp(reval, token.ADD, imval)
-		typ = types.Typ[types.UntypedComplex]
-
-	default:
-		p.errorf("expected const value, got %s (%q)", scanner.TokenString(p.tok), p.lit)
-	}
-
-	return
-}
-
-// Const = Name [Type] "=" ConstValue .
-func (p *parser) parseConst(pkg *types.Package) *types.Const {
-	name := p.parseName()
-	var typ types.Type
-	if p.tok == '<' {
-		typ = p.parseType(pkg)
-	}
-	p.expect('=')
-	val, vtyp := p.parseConstValue()
-	if typ == nil {
-		typ = vtyp
-	}
-	return types.NewConst(token.NoPos, pkg, name, typ, val)
-}
-
-// TypeName = ExportedName .
-func (p *parser) parseTypeName() *types.TypeName {
-	pkg, name := p.parseExportedName()
-	scope := pkg.Scope()
-	if obj := scope.Lookup(name); obj != nil {
-		return obj.(*types.TypeName)
-	}
-	obj := types.NewTypeName(token.NoPos, pkg, name, nil)
-	// a named type may be referred to before the underlying type
-	// is known - set it up
-	types.NewNamed(obj, nil, nil)
-	scope.Insert(obj)
-	return obj
-}
-
-// NamedType = TypeName Type { Method } .
-// Method    = "func" "(" Param ")" Name ParamList ResultList ";" .
-func (p *parser) parseNamedType(n int) types.Type {
-	obj := p.parseTypeName()
-
-	pkg := obj.Pkg()
-	typ := obj.Type()
-	p.typeMap[n] = typ
-
-	nt, ok := typ.(*types.Named)
-	if !ok {
-		// This can happen for unsafe.Pointer, which is a TypeName holding a Basic type.
-		pt := p.parseType(pkg)
-		if pt != typ {
-			p.error("unexpected underlying type for non-named TypeName")
-		}
-		return typ
-	}
-
-	underlying := p.parseType(pkg)
-	if nt.Underlying() == nil {
-		nt.SetUnderlying(underlying.Underlying())
-	}
-
-	for p.tok == scanner.Ident {
-		// collect associated methods
-		p.expectKeyword("func")
-		p.expect('(')
-		receiver, _ := p.parseParam(pkg)
-		p.expect(')')
-		name := p.parseName()
-		params, isVariadic := p.parseParamList(pkg)
-		results := p.parseResultList(pkg)
-		p.expect(';')
-
-		sig := types.NewSignature(receiver, params, results, isVariadic)
-		nt.AddMethod(types.NewFunc(token.NoPos, pkg, name, sig))
-	}
-
-	return nt
-}
-
-func (p *parser) parseInt() int64 {
-	lit := p.expect(scanner.Int)
-	n, err := strconv.ParseInt(lit, 10, 0)
-	if err != nil {
-		p.error(err)
-	}
-	return n
-}
-
-// ArrayOrSliceType = "[" [ int ] "]" Type .
-func (p *parser) parseArrayOrSliceType(pkg *types.Package) types.Type {
-	p.expect('[')
-	if p.tok == ']' {
-		p.next()
-		return types.NewSlice(p.parseType(pkg))
-	}
-
-	n := p.parseInt()
-	p.expect(']')
-	return types.NewArray(p.parseType(pkg), n)
-}
-
-// MapType = "map" "[" Type "]" Type .
-func (p *parser) parseMapType(pkg *types.Package) types.Type {
-	p.expectKeyword("map")
-	p.expect('[')
-	key := p.parseType(pkg)
-	p.expect(']')
-	elem := p.parseType(pkg)
-	return types.NewMap(key, elem)
-}
-
-// ChanType = "chan" ["<-" | "-<"] Type .
-func (p *parser) parseChanType(pkg *types.Package) types.Type {
-	p.expectKeyword("chan")
-	dir := types.SendRecv
-	switch p.tok {
-	case '-':
-		p.next()
-		p.expect('<')
-		dir = types.SendOnly
-
-	case '<':
-		// don't consume '<' if it belongs to Type
-		if p.scanner.Peek() == '-' {
-			p.next()
-			p.expect('-')
-			dir = types.RecvOnly
-		}
-	}
-
-	return types.NewChan(dir, p.parseType(pkg))
-}
-
-// StructType = "struct" "{" { Field } "}" .
-func (p *parser) parseStructType(pkg *types.Package) types.Type {
-	p.expectKeyword("struct")
-
-	var fields []*types.Var
-	var tags []string
-
-	p.expect('{')
-	for p.tok != '}' && p.tok != scanner.EOF {
-		field, tag := p.parseField(pkg)
-		p.expect(';')
-		fields = append(fields, field)
-		tags = append(tags, tag)
-	}
-	p.expect('}')
-
-	return types.NewStruct(fields, tags)
-}
-
-// ParamList = "(" [ { Parameter "," } Parameter ] ")" .
-func (p *parser) parseParamList(pkg *types.Package) (*types.Tuple, bool) {
-	var list []*types.Var
-	isVariadic := false
-
-	p.expect('(')
-	for p.tok != ')' && p.tok != scanner.EOF {
-		if len(list) > 0 {
-			p.expect(',')
-		}
-		par, variadic := p.parseParam(pkg)
-		list = append(list, par)
-		if variadic {
-			if isVariadic {
-				p.error("... not on final argument")
-			}
-			isVariadic = true
-		}
-	}
-	p.expect(')')
-
-	return types.NewTuple(list...), isVariadic
-}
-
-// ResultList = Type | ParamList .
-func (p *parser) parseResultList(pkg *types.Package) *types.Tuple {
-	switch p.tok {
-	case '<':
-		return types.NewTuple(types.NewParam(token.NoPos, pkg, "", p.parseType(pkg)))
-
-	case '(':
-		params, _ := p.parseParamList(pkg)
-		return params
-
-	default:
-		return nil
-	}
-}
-
-// FunctionType = ParamList ResultList .
-func (p *parser) parseFunctionType(pkg *types.Package) *types.Signature {
-	params, isVariadic := p.parseParamList(pkg)
-	results := p.parseResultList(pkg)
-	return types.NewSignature(nil, params, results, isVariadic)
-}
-
-// Func = Name FunctionType .
-func (p *parser) parseFunc(pkg *types.Package) *types.Func {
-	name := p.parseName()
-	if strings.ContainsRune(name, '$') {
-		// This is a Type$equal or Type$hash function, which we don't want to parse,
-		// except for the types.
-		p.discardDirectiveWhileParsingTypes(pkg)
-		return nil
-	}
-	return types.NewFunc(token.NoPos, pkg, name, p.parseFunctionType(pkg))
-}
-
-// InterfaceType = "interface" "{" { ("?" Type | Func) ";" } "}" .
-func (p *parser) parseInterfaceType(pkg *types.Package) types.Type {
-	p.expectKeyword("interface")
-
-	var methods []*types.Func
-	var typs []*types.Named
-
-	p.expect('{')
-	for p.tok != '}' && p.tok != scanner.EOF {
-		if p.tok == '?' {
-			p.next()
-			typs = append(typs, p.parseType(pkg).(*types.Named))
-		} else {
-			method := p.parseFunc(pkg)
-			methods = append(methods, method)
-		}
-		p.expect(';')
-	}
-	p.expect('}')
-
-	return types.NewInterface(methods, typs)
-}
-
-// PointerType = "*" ("any" | Type) .
-func (p *parser) parsePointerType(pkg *types.Package) types.Type {
-	p.expect('*')
-	if p.tok == scanner.Ident {
-		p.expectKeyword("any")
-		return types.Typ[types.UnsafePointer]
-	}
-	return types.NewPointer(p.parseType(pkg))
-}
-
-// TypeDefinition = NamedType | MapType | ChanType | StructType | InterfaceType | PointerType | ArrayOrSliceType | FunctionType .
-func (p *parser) parseTypeDefinition(pkg *types.Package, n int) types.Type {
-	var t types.Type
-	switch p.tok {
-	case scanner.String:
-		t = p.parseNamedType(n)
-
-	case scanner.Ident:
-		switch p.lit {
-		case "map":
-			t = p.parseMapType(pkg)
-
-		case "chan":
-			t = p.parseChanType(pkg)
-
-		case "struct":
-			t = p.parseStructType(pkg)
-
-		case "interface":
-			t = p.parseInterfaceType(pkg)
-		}
-
-	case '*':
-		t = p.parsePointerType(pkg)
-
-	case '[':
-		t = p.parseArrayOrSliceType(pkg)
-
-	case '(':
-		t = p.parseFunctionType(pkg)
-	}
-
-	p.typeMap[n] = t
-	return t
-}
-
-const (
-	// From gofrontend/go/export.h
-	// Note that these values are negative in the gofrontend and have been made positive
-	// in the gccgoimporter.
-	gccgoBuiltinINT8       = 1
-	gccgoBuiltinINT16      = 2
-	gccgoBuiltinINT32      = 3
-	gccgoBuiltinINT64      = 4
-	gccgoBuiltinUINT8      = 5
-	gccgoBuiltinUINT16     = 6
-	gccgoBuiltinUINT32     = 7
-	gccgoBuiltinUINT64     = 8
-	gccgoBuiltinFLOAT32    = 9
-	gccgoBuiltinFLOAT64    = 10
-	gccgoBuiltinINT        = 11
-	gccgoBuiltinUINT       = 12
-	gccgoBuiltinUINTPTR    = 13
-	gccgoBuiltinBOOL       = 15
-	gccgoBuiltinSTRING     = 16
-	gccgoBuiltinCOMPLEX64  = 17
-	gccgoBuiltinCOMPLEX128 = 18
-	gccgoBuiltinERROR      = 19
-	gccgoBuiltinBYTE       = 20
-	gccgoBuiltinRUNE       = 21
-)
-
-func lookupBuiltinType(typ int) types.Type {
-	return [...]types.Type{
-		gccgoBuiltinINT8:       types.Typ[types.Int8],
-		gccgoBuiltinINT16:      types.Typ[types.Int16],
-		gccgoBuiltinINT32:      types.Typ[types.Int32],
-		gccgoBuiltinINT64:      types.Typ[types.Int64],
-		gccgoBuiltinUINT8:      types.Typ[types.Uint8],
-		gccgoBuiltinUINT16:     types.Typ[types.Uint16],
-		gccgoBuiltinUINT32:     types.Typ[types.Uint32],
-		gccgoBuiltinUINT64:     types.Typ[types.Uint64],
-		gccgoBuiltinFLOAT32:    types.Typ[types.Float32],
-		gccgoBuiltinFLOAT64:    types.Typ[types.Float64],
-		gccgoBuiltinINT:        types.Typ[types.Int],
-		gccgoBuiltinUINT:       types.Typ[types.Uint],
-		gccgoBuiltinUINTPTR:    types.Typ[types.Uintptr],
-		gccgoBuiltinBOOL:       types.Typ[types.Bool],
-		gccgoBuiltinSTRING:     types.Typ[types.String],
-		gccgoBuiltinCOMPLEX64:  types.Typ[types.Complex64],
-		gccgoBuiltinCOMPLEX128: types.Typ[types.Complex128],
-		gccgoBuiltinERROR:      types.Universe.Lookup("error").Type(),
-		gccgoBuiltinBYTE:       types.Universe.Lookup("byte").Type(),
-		gccgoBuiltinRUNE:       types.Universe.Lookup("rune").Type(),
-	}[typ]
-}
-
-// Type = "<" "type" ( "-" int | int [ TypeDefinition ] ) ">" .
-func (p *parser) parseType(pkg *types.Package) (t types.Type) {
-	p.expect('<')
-	p.expectKeyword("type")
-
-	switch p.tok {
-	case scanner.Int:
-		n := p.parseInt()
-
-		if p.tok == '>' {
-			t = p.typeMap[int(n)]
-		} else {
-			t = p.parseTypeDefinition(pkg, int(n))
-		}
-
-	case '-':
-		p.next()
-		n := p.parseInt()
-		t = lookupBuiltinType(int(n))
-
-	default:
-		p.errorf("expected type number, got %s (%q)", scanner.TokenString(p.tok), p.lit)
-		return nil
-	}
-
-	p.expect('>')
-	return
-}
-
-// PackageInit = unquotedString unquotedString int .
-func (p *parser) parsePackageInit() PackageInit {
-	name := p.parseUnquotedString()
-	initfunc := p.parseUnquotedString()
-	priority := int(p.parseInt())
-	return PackageInit{Name: name, InitFunc: initfunc, Priority: priority}
-}
-
-// Throw away tokens until we see a ';'. If we see a '<', attempt to parse as a type.
-func (p *parser) discardDirectiveWhileParsingTypes(pkg *types.Package) {
-	for {
-		switch p.tok {
-		case ';':
-			return
-		case '<':
-			p.parseType(p.pkg)
-		case scanner.EOF:
-			p.error("unexpected EOF")
-		default:
-			p.next()
-		}
-	}
-}
-
-// Create the package if we have parsed both the package path and package name.
-func (p *parser) maybeCreatePackage() {
-	if p.pkgname != "" && p.pkgpath != "" {
-		p.pkg = p.getPkg(p.pkgpath, p.pkgname)
-	}
-}
-
-// InitDataDirective = "v1" ";" |
-//                     "priority" int ";" |
-//                     "init" { PackageInit } ";" |
-//                     "checksum" unquotedString ";" .
-func (p *parser) parseInitDataDirective() {
-	if p.tok != scanner.Ident {
-		// unexpected token kind; panic
-		p.expect(scanner.Ident)
-	}
-
-	switch p.lit {
-	case "v1":
-		p.next()
-		p.expect(';')
-
-	case "priority":
-		p.next()
-		p.initdata.Priority = int(p.parseInt())
-		p.expect(';')
-
-	case "init":
-		p.next()
-		for p.tok != ';' && p.tok != scanner.EOF {
-			p.initdata.Inits = append(p.initdata.Inits, p.parsePackageInit())
-		}
-		p.expect(';')
-
-	case "checksum":
-		// Don't let the scanner try to parse the checksum as a number.
-		defer func(mode uint) {
-			p.scanner.Mode = mode
-		}(p.scanner.Mode)
-		p.scanner.Mode &^= scanner.ScanInts | scanner.ScanFloats
-		p.next()
-		p.parseUnquotedString()
-		p.expect(';')
-
-	default:
-		p.errorf("unexpected identifier: %q", p.lit)
-	}
-}
-
-// Directive = InitDataDirective |
-//             "package" unquotedString ";" |
-//             "pkgpath" unquotedString ";" |
-//             "import" unquotedString unquotedString string ";" |
-//             "func" Func ";" |
-//             "type" Type ";" |
-//             "var" Var ";" |
-//             "const" Const ";" .
-func (p *parser) parseDirective() {
-	if p.tok != scanner.Ident {
-		// unexpected token kind; panic
-		p.expect(scanner.Ident)
-	}
-
-	switch p.lit {
-	case "v1", "priority", "init", "checksum":
-		p.parseInitDataDirective()
-
-	case "package":
-		p.next()
-		p.pkgname = p.parseUnquotedString()
-		p.maybeCreatePackage()
-		p.expect(';')
-
-	case "pkgpath":
-		p.next()
-		p.pkgpath = p.parseUnquotedString()
-		p.maybeCreatePackage()
-		p.expect(';')
-
-	case "import":
-		p.next()
-		pkgname := p.parseUnquotedString()
-		pkgpath := p.parseUnquotedString()
-		p.getPkg(pkgpath, pkgname)
-		p.parseString()
-		p.expect(';')
-
-	case "func":
-		p.next()
-		fun := p.parseFunc(p.pkg)
-		if fun != nil {
-			p.pkg.Scope().Insert(fun)
-		}
-		p.expect(';')
-
-	case "type":
-		p.next()
-		p.parseType(p.pkg)
-		p.expect(';')
-
-	case "var":
-		p.next()
-		v := p.parseVar(p.pkg)
-		p.pkg.Scope().Insert(v)
-		p.expect(';')
-
-	case "const":
-		p.next()
-		c := p.parseConst(p.pkg)
-		p.pkg.Scope().Insert(c)
-		p.expect(';')
-
-	default:
-		p.errorf("unexpected identifier: %q", p.lit)
-	}
-}
-
-// Package = { Directive } .
-func (p *parser) parsePackage() *types.Package {
-	for p.tok != scanner.EOF {
-		p.parseDirective()
-	}
-	for _, typ := range p.typeMap {
-		if it, ok := typ.(*types.Interface); ok {
-			it.Complete()
-		}
-	}
-	p.pkg.MarkComplete()
-	return p.pkg
-}
-
-// InitData = { InitDataDirective } .
-func (p *parser) parseInitData() {
-	for p.tok != scanner.EOF {
-		p.parseInitDataDirective()
-	}
-}
diff --git a/src/go/internal/gccgoimporter/parser_test.go b/src/go/internal/gccgoimporter/parser_test.go
deleted file mode 100644
index b96486f..0000000
--- a/src/go/internal/gccgoimporter/parser_test.go
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gccgoimporter
-
-import (
-	"bytes"
-	"go/types"
-	"strings"
-	"testing"
-	"text/scanner"
-)
-
-var typeParserTests = []struct {
-	id, typ, want, underlying, methods string
-}{
-	{id: "foo", typ: "<type -1>", want: "int8"},
-	{id: "foo", typ: "<type 1 *<type -19>>", want: "*error"},
-	{id: "foo", typ: "<type 1 *any>", want: "unsafe.Pointer"},
-	{id: "foo", typ: "<type 1 \"Bar\" <type 2 *<type 1>>>", want: "foo.Bar", underlying: "*foo.Bar"},
-	{id: "foo", typ: "<type 1 \"bar.Foo\" \"bar\" <type -1> func (? <type 1>) M (); >", want: "bar.Foo", underlying: "int8", methods: "func (bar.Foo).M()"},
-	{id: "foo", typ: "<type 1 \".bar.foo\" \"bar\" <type -1>>", want: "bar.foo", underlying: "int8"},
-	{id: "foo", typ: "<type 1 []<type -1>>", want: "[]int8"},
-	{id: "foo", typ: "<type 1 [42]<type -1>>", want: "[42]int8"},
-	{id: "foo", typ: "<type 1 map [<type -1>] <type -2>>", want: "map[int8]int16"},
-	{id: "foo", typ: "<type 1 chan <type -1>>", want: "chan int8"},
-	{id: "foo", typ: "<type 1 chan <- <type -1>>", want: "<-chan int8"},
-	{id: "foo", typ: "<type 1 chan -< <type -1>>", want: "chan<- int8"},
-	{id: "foo", typ: "<type 1 struct { I8 <type -1>; I16 <type -2> \"i16\"; }>", want: "struct{I8 int8; I16 int16 \"i16\"}"},
-	{id: "foo", typ: "<type 1 interface { Foo (a <type -1>, b <type -2>) <type -1>; Bar (? <type -2>, ? ...<type -1>) (? <type -2>, ? <type -1>); Baz (); }>", want: "interface{Bar(int16, ...int8) (int16, int8); Baz(); Foo(a int8, b int16) int8}"},
-	{id: "foo", typ: "<type 1 (? <type -1>) <type -2>>", want: "func(int8) int16"},
-}
-
-func TestTypeParser(t *testing.T) {
-	for _, test := range typeParserTests {
-		var p parser
-		p.init("test.gox", strings.NewReader(test.typ), make(map[string]*types.Package))
-		p.pkgname = test.id
-		p.pkgpath = test.id
-		p.maybeCreatePackage()
-		typ := p.parseType(p.pkg)
-
-		if p.tok != scanner.EOF {
-			t.Errorf("expected full parse, stopped at %q", p.lit)
-		}
-
-		got := typ.String()
-		if got != test.want {
-			t.Errorf("got type %q, expected %q", got, test.want)
-		}
-
-		if test.underlying != "" {
-			underlying := typ.Underlying().String()
-			if underlying != test.underlying {
-				t.Errorf("got underlying type %q, expected %q", underlying, test.underlying)
-			}
-		}
-
-		if test.methods != "" {
-			nt := typ.(*types.Named)
-			var buf bytes.Buffer
-			for i := 0; i != nt.NumMethods(); i++ {
-				buf.WriteString(nt.Method(i).String())
-			}
-			methods := buf.String()
-			if methods != test.methods {
-				t.Errorf("got methods %q, expected %q", methods, test.methods)
-			}
-		}
-	}
-}
diff --git a/src/go/internal/gccgoimporter/testdata/complexnums.go b/src/go/internal/gccgoimporter/testdata/complexnums.go
deleted file mode 100644
index a51b6b0..0000000
--- a/src/go/internal/gccgoimporter/testdata/complexnums.go
+++ /dev/null
@@ -1,6 +0,0 @@
-package complexnums
-
-const NN = -1 - 1i
-const NP = -1 + 1i
-const PN = 1 - 1i
-const PP = 1 + 1i
diff --git a/src/go/internal/gccgoimporter/testdata/complexnums.gox b/src/go/internal/gccgoimporter/testdata/complexnums.gox
deleted file mode 100644
index b66524f..0000000
--- a/src/go/internal/gccgoimporter/testdata/complexnums.gox
+++ /dev/null
@@ -1,8 +0,0 @@
-v1;
-package complexnums;
-pkgpath complexnums;
-priority 1;
-const NN = -0.1E1-0.1E1i ;
-const NP = -0.1E1+0.1E1i ;
-const PN = 0.1E1-0.1E1i ;
-const PP = 0.1E1+0.1E1i ;
diff --git a/src/go/internal/gccgoimporter/testdata/imports.go b/src/go/internal/gccgoimporter/testdata/imports.go
deleted file mode 100644
index 7907316..0000000
--- a/src/go/internal/gccgoimporter/testdata/imports.go
+++ /dev/null
@@ -1,5 +0,0 @@
-package imports
-
-import "fmt"
-
-var Hello = fmt.Sprintf("Hello, world")
diff --git a/src/go/internal/gccgoimporter/testdata/imports.gox b/src/go/internal/gccgoimporter/testdata/imports.gox
deleted file mode 100644
index 958a4f5..0000000
--- a/src/go/internal/gccgoimporter/testdata/imports.gox
+++ /dev/null
@@ -1,7 +0,0 @@
-v1;
-package imports;
-pkgpath imports;
-priority 7;
-import fmt fmt "fmt";
-init imports imports..import 7 math math..import 1 runtime runtime..import 1 strconv strconv..import 2 io io..import 3 reflect reflect..import 3 syscall syscall..import 3 time time..import 4 os os..import 5 fmt fmt..import 6;
-var Hello <type -16>;
diff --git a/src/go/internal/gccgoimporter/testdata/pointer.go b/src/go/internal/gccgoimporter/testdata/pointer.go
deleted file mode 100644
index 4ebc671..0000000
--- a/src/go/internal/gccgoimporter/testdata/pointer.go
+++ /dev/null
@@ -1,3 +0,0 @@
-package pointer
-
-type Int8Ptr *int8
diff --git a/src/go/internal/gccgoimporter/testdata/pointer.gox b/src/go/internal/gccgoimporter/testdata/pointer.gox
deleted file mode 100644
index d96ebbd..0000000
--- a/src/go/internal/gccgoimporter/testdata/pointer.gox
+++ /dev/null
@@ -1,4 +0,0 @@
-v1;
-package pointer;
-pkgpath pointer;
-type <type 1 "Int8Ptr" <type 2 *<type -1>>>;
diff --git a/src/go/internal/gcimporter/exportdata.go b/src/go/internal/gcimporter/exportdata.go
deleted file mode 100644
index 657742b..0000000
--- a/src/go/internal/gcimporter/exportdata.go
+++ /dev/null
@@ -1,108 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements FindExportData.
-
-package gcimporter
-
-import (
-	"bufio"
-	"errors"
-	"fmt"
-	"io"
-	"strconv"
-	"strings"
-)
-
-func readGopackHeader(r *bufio.Reader) (name string, size int, err error) {
-	// See $GOROOT/include/ar.h.
-	hdr := make([]byte, 16+12+6+6+8+10+2)
-	_, err = io.ReadFull(r, hdr)
-	if err != nil {
-		return
-	}
-	// leave for debugging
-	if false {
-		fmt.Printf("header: %s", hdr)
-	}
-	s := strings.TrimSpace(string(hdr[16+12+6+6+8:][:10]))
-	size, err = strconv.Atoi(s)
-	if err != nil || hdr[len(hdr)-2] != '`' || hdr[len(hdr)-1] != '\n' {
-		err = errors.New("invalid archive header")
-		return
-	}
-	name = strings.TrimSpace(string(hdr[:16]))
-	return
-}
-
-// FindExportData positions the reader r at the beginning of the
-// export data section of an underlying GC-created object/archive
-// file by reading from it. The reader must be positioned at the
-// start of the file before calling this function.
-//
-func FindExportData(r *bufio.Reader) (err error) {
-	// Read first line to make sure this is an object file.
-	line, err := r.ReadSlice('\n')
-	if err != nil {
-		return
-	}
-	if string(line) == "!<arch>\n" {
-		// Archive file. Scan to __.PKGDEF.
-		var name string
-		var size int
-		if name, size, err = readGopackHeader(r); err != nil {
-			return
-		}
-
-		// Optional leading __.GOSYMDEF or __.SYMDEF.
-		// Read and discard.
-		if name == "__.SYMDEF" || name == "__.GOSYMDEF" {
-			const block = 4096
-			tmp := make([]byte, block)
-			for size > 0 {
-				n := size
-				if n > block {
-					n = block
-				}
-				if _, err = io.ReadFull(r, tmp[:n]); err != nil {
-					return
-				}
-				size -= n
-			}
-
-			if name, size, err = readGopackHeader(r); err != nil {
-				return
-			}
-		}
-
-		// First real entry should be __.PKGDEF.
-		if name != "__.PKGDEF" {
-			err = errors.New("go archive is missing __.PKGDEF")
-			return
-		}
-
-		// Read first line of __.PKGDEF data, so that line
-		// is once again the first line of the input.
-		if line, err = r.ReadSlice('\n'); err != nil {
-			return
-		}
-	}
-
-	// Now at __.PKGDEF in archive or still at beginning of file.
-	// Either way, line should begin with "go object ".
-	if !strings.HasPrefix(string(line), "go object ") {
-		err = errors.New("not a go object file")
-		return
-	}
-
-	// Skip over object header to export data.
-	// Begins after first line with $$.
-	for line[0] != '$' {
-		if line, err = r.ReadSlice('\n'); err != nil {
-			return
-		}
-	}
-
-	return
-}
diff --git a/src/go/internal/gcimporter/gcimporter.go b/src/go/internal/gcimporter/gcimporter.go
deleted file mode 100644
index 1d485cf..0000000
--- a/src/go/internal/gcimporter/gcimporter.go
+++ /dev/null
@@ -1,991 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package gcimporter implements Import for gc-generated object files.
-package gcimporter // import "go/internal/gcimporter"
-
-import (
-	"bufio"
-	"errors"
-	"fmt"
-	"go/build"
-	"go/token"
-	"io"
-	"os"
-	"path/filepath"
-	"sort"
-	"strconv"
-	"strings"
-	"text/scanner"
-
-	exact "go/constant"
-	"go/types"
-)
-
-// debugging/development support
-const debug = false
-
-var pkgExts = [...]string{".a", ".o"}
-
-// FindPkg returns the filename and unique package id for an import
-// path based on package information provided by build.Import (using
-// the build.Default build.Context).
-// If no file was found, an empty filename is returned.
-//
-func FindPkg(path, srcDir string) (filename, id string) {
-	if len(path) == 0 {
-		return
-	}
-
-	id = path
-	var noext string
-	switch {
-	default:
-		// "x" -> "$GOPATH/pkg/$GOOS_$GOARCH/x.ext", "x"
-		// Don't require the source files to be present.
-		bp, _ := build.Import(path, srcDir, build.FindOnly|build.AllowBinary)
-		if bp.PkgObj == "" {
-			return
-		}
-		noext = strings.TrimSuffix(bp.PkgObj, ".a")
-
-	case build.IsLocalImport(path):
-		// "./x" -> "/this/directory/x.ext", "/this/directory/x"
-		noext = filepath.Join(srcDir, path)
-		id = noext
-
-	case filepath.IsAbs(path):
-		// for completeness only - go/build.Import
-		// does not support absolute imports
-		// "/x" -> "/x.ext", "/x"
-		noext = path
-	}
-
-	// try extensions
-	for _, ext := range pkgExts {
-		filename = noext + ext
-		if f, err := os.Stat(filename); err == nil && !f.IsDir() {
-			return
-		}
-	}
-
-	filename = "" // not found
-	return
-}
-
-// ImportData imports a package by reading the gc-generated export data,
-// adds the corresponding package object to the packages map indexed by id,
-// and returns the object.
-//
-// The packages map must contains all packages already imported. The data
-// reader position must be the beginning of the export data section. The
-// filename is only used in error messages.
-//
-// If packages[id] contains the completely imported package, that package
-// can be used directly, and there is no need to call this function (but
-// there is also no harm but for extra time used).
-//
-func ImportData(packages map[string]*types.Package, filename, id string, data io.Reader) (pkg *types.Package, err error) {
-	// support for parser error handling
-	defer func() {
-		switch r := recover().(type) {
-		case nil:
-			// nothing to do
-		case importError:
-			err = r
-		default:
-			panic(r) // internal error
-		}
-	}()
-
-	var p parser
-	p.init(filename, id, data, packages)
-	pkg = p.parseExport()
-
-	return
-}
-
-// Import imports a gc-generated package given its import path, adds the
-// corresponding package object to the packages map, and returns the object.
-// Local import paths are interpreted relative to the current working directory.
-// The packages map must contain all packages already imported.
-//
-func Import(packages map[string]*types.Package, path string) (pkg *types.Package, err error) {
-	// package "unsafe" is handled by the type checker
-	if path == "unsafe" {
-		panic(`gcimporter.Import called for package "unsafe"`)
-	}
-
-	srcDir := "."
-	if build.IsLocalImport(path) {
-		srcDir, err = os.Getwd()
-		if err != nil {
-			return
-		}
-	}
-
-	filename, id := FindPkg(path, srcDir)
-	if filename == "" {
-		err = fmt.Errorf("can't find import: %s", id)
-		return
-	}
-
-	// no need to re-import if the package was imported completely before
-	if pkg = packages[id]; pkg != nil && pkg.Complete() {
-		return
-	}
-
-	// open file
-	f, err := os.Open(filename)
-	if err != nil {
-		return
-	}
-	defer func() {
-		f.Close()
-		if err != nil {
-			// add file name to error
-			err = fmt.Errorf("reading export data: %s: %v", filename, err)
-		}
-	}()
-
-	buf := bufio.NewReader(f)
-	if err = FindExportData(buf); err != nil {
-		return
-	}
-
-	pkg, err = ImportData(packages, filename, id, buf)
-
-	return
-}
-
-// ----------------------------------------------------------------------------
-// Parser
-
-// TODO(gri) Imported objects don't have position information.
-//           Ideally use the debug table line info; alternatively
-//           create some fake position (or the position of the
-//           import). That way error messages referring to imported
-//           objects can print meaningful information.
-
-// parser parses the exports inside a gc compiler-produced
-// object/archive file and populates its scope with the results.
-type parser struct {
-	scanner    scanner.Scanner
-	tok        rune                      // current token
-	lit        string                    // literal string; only valid for Ident, Int, String tokens
-	id         string                    // package id of imported package
-	sharedPkgs map[string]*types.Package // package id -> package object (across importer)
-	localPkgs  map[string]*types.Package // package id -> package object (just this package)
-}
-
-func (p *parser) init(filename, id string, src io.Reader, packages map[string]*types.Package) {
-	p.scanner.Init(src)
-	p.scanner.Error = func(_ *scanner.Scanner, msg string) { p.error(msg) }
-	p.scanner.Mode = scanner.ScanIdents | scanner.ScanInts | scanner.ScanChars | scanner.ScanStrings | scanner.ScanComments | scanner.SkipComments
-	p.scanner.Whitespace = 1<<'\t' | 1<<' '
-	p.scanner.Filename = filename // for good error messages
-	p.next()
-	p.id = id
-	p.sharedPkgs = packages
-	if debug {
-		// check consistency of packages map
-		for _, pkg := range packages {
-			if pkg.Name() == "" {
-				fmt.Printf("no package name for %s\n", pkg.Path())
-			}
-		}
-	}
-}
-
-func (p *parser) next() {
-	p.tok = p.scanner.Scan()
-	switch p.tok {
-	case scanner.Ident, scanner.Int, scanner.Char, scanner.String, '·':
-		p.lit = p.scanner.TokenText()
-	default:
-		p.lit = ""
-	}
-	if debug {
-		fmt.Printf("%s: %q -> %q\n", scanner.TokenString(p.tok), p.scanner.TokenText(), p.lit)
-	}
-}
-
-func declTypeName(pkg *types.Package, name string) *types.TypeName {
-	scope := pkg.Scope()
-	if obj := scope.Lookup(name); obj != nil {
-		return obj.(*types.TypeName)
-	}
-	obj := types.NewTypeName(token.NoPos, pkg, name, nil)
-	// a named type may be referred to before the underlying type
-	// is known - set it up
-	types.NewNamed(obj, nil, nil)
-	scope.Insert(obj)
-	return obj
-}
-
-// ----------------------------------------------------------------------------
-// Error handling
-
-// Internal errors are boxed as importErrors.
-type importError struct {
-	pos scanner.Position
-	err error
-}
-
-func (e importError) Error() string {
-	return fmt.Sprintf("import error %s (byte offset = %d): %s", e.pos, e.pos.Offset, e.err)
-}
-
-func (p *parser) error(err interface{}) {
-	if s, ok := err.(string); ok {
-		err = errors.New(s)
-	}
-	// panic with a runtime.Error if err is not an error
-	panic(importError{p.scanner.Pos(), err.(error)})
-}
-
-func (p *parser) errorf(format string, args ...interface{}) {
-	p.error(fmt.Sprintf(format, args...))
-}
-
-func (p *parser) expect(tok rune) string {
-	lit := p.lit
-	if p.tok != tok {
-		p.errorf("expected %s, got %s (%s)", scanner.TokenString(tok), scanner.TokenString(p.tok), lit)
-	}
-	p.next()
-	return lit
-}
-
-func (p *parser) expectSpecial(tok string) {
-	sep := 'x' // not white space
-	i := 0
-	for i < len(tok) && p.tok == rune(tok[i]) && sep > ' ' {
-		sep = p.scanner.Peek() // if sep <= ' ', there is white space before the next token
-		p.next()
-		i++
-	}
-	if i < len(tok) {
-		p.errorf("expected %q, got %q", tok, tok[0:i])
-	}
-}
-
-func (p *parser) expectKeyword(keyword string) {
-	lit := p.expect(scanner.Ident)
-	if lit != keyword {
-		p.errorf("expected keyword %s, got %q", keyword, lit)
-	}
-}
-
-// ----------------------------------------------------------------------------
-// Qualified and unqualified names
-
-// PackageId = string_lit .
-//
-func (p *parser) parsePackageId() string {
-	id, err := strconv.Unquote(p.expect(scanner.String))
-	if err != nil {
-		p.error(err)
-	}
-	// id == "" stands for the imported package id
-	// (only known at time of package installation)
-	if id == "" {
-		id = p.id
-	}
-	return id
-}
-
-// PackageName = ident .
-//
-func (p *parser) parsePackageName() string {
-	return p.expect(scanner.Ident)
-}
-
-// dotIdentifier = ( ident | '·' ) { ident | int | '·' } .
-func (p *parser) parseDotIdent() string {
-	ident := ""
-	if p.tok != scanner.Int {
-		sep := 'x' // not white space
-		for (p.tok == scanner.Ident || p.tok == scanner.Int || p.tok == '·') && sep > ' ' {
-			ident += p.lit
-			sep = p.scanner.Peek() // if sep <= ' ', there is white space before the next token
-			p.next()
-		}
-	}
-	if ident == "" {
-		p.expect(scanner.Ident) // use expect() for error handling
-	}
-	return ident
-}
-
-// QualifiedName = "@" PackageId "." ( "?" | dotIdentifier ) .
-//
-func (p *parser) parseQualifiedName() (id, name string) {
-	p.expect('@')
-	id = p.parsePackageId()
-	p.expect('.')
-	// Per rev f280b8a485fd (10/2/2013), qualified names may be used for anonymous fields.
-	if p.tok == '?' {
-		p.next()
-	} else {
-		name = p.parseDotIdent()
-	}
-	return
-}
-
-// getPkg returns the package for a given id. If the package is
-// not found but we have a package name, create the package and
-// add it to the p.localPkgs and p.sharedPkgs maps.
-//
-// id identifies a package, usually by a canonical package path like
-// "encoding/json" but possibly by a non-canonical import path like
-// "./json".
-//
-func (p *parser) getPkg(id, name string) *types.Package {
-	// package unsafe is not in the packages maps - handle explicitly
-	if id == "unsafe" {
-		return types.Unsafe
-	}
-
-	pkg := p.localPkgs[id]
-	if pkg == nil && name != "" {
-		// first import of id from this package
-		pkg = p.sharedPkgs[id]
-		if pkg == nil {
-			// first import of id by this importer
-			pkg = types.NewPackage(id, name)
-			p.sharedPkgs[id] = pkg
-		}
-
-		if p.localPkgs == nil {
-			p.localPkgs = make(map[string]*types.Package)
-		}
-		p.localPkgs[id] = pkg
-	}
-	return pkg
-}
-
-// parseExportedName is like parseQualifiedName, but
-// the package id is resolved to an imported *types.Package.
-//
-func (p *parser) parseExportedName() (pkg *types.Package, name string) {
-	id, name := p.parseQualifiedName()
-	pkg = p.getPkg(id, "")
-	if pkg == nil {
-		p.errorf("%s package not found", id)
-	}
-	return
-}
-
-// ----------------------------------------------------------------------------
-// Types
-
-// BasicType = identifier .
-//
-func (p *parser) parseBasicType() types.Type {
-	id := p.expect(scanner.Ident)
-	obj := types.Universe.Lookup(id)
-	if obj, ok := obj.(*types.TypeName); ok {
-		return obj.Type()
-	}
-	p.errorf("not a basic type: %s", id)
-	return nil
-}
-
-// ArrayType = "[" int_lit "]" Type .
-//
-func (p *parser) parseArrayType() types.Type {
-	// "[" already consumed and lookahead known not to be "]"
-	lit := p.expect(scanner.Int)
-	p.expect(']')
-	elem := p.parseType()
-	n, err := strconv.ParseInt(lit, 10, 64)
-	if err != nil {
-		p.error(err)
-	}
-	return types.NewArray(elem, n)
-}
-
-// MapType = "map" "[" Type "]" Type .
-//
-func (p *parser) parseMapType() types.Type {
-	p.expectKeyword("map")
-	p.expect('[')
-	key := p.parseType()
-	p.expect(']')
-	elem := p.parseType()
-	return types.NewMap(key, elem)
-}
-
-// Name = identifier | "?" | QualifiedName .
-//
-// If materializePkg is set, the returned package is guaranteed to be set.
-// For fully qualified names, the returned package may be a fake package
-// (without name, scope, and not in the p.sharedPkgs map), created for the
-// sole purpose of providing a package path. Fake packages are created
-// when the package id is not found in the p.sharedPkgs map; in that case
-// we cannot create a real package because we don't have a package name.
-// For non-qualified names, the returned package is the imported package.
-//
-func (p *parser) parseName(materializePkg bool) (pkg *types.Package, name string) {
-	switch p.tok {
-	case scanner.Ident:
-		pkg = p.sharedPkgs[p.id]
-		name = p.lit
-		p.next()
-	case '?':
-		// anonymous
-		pkg = p.sharedPkgs[p.id]
-		p.next()
-	case '@':
-		// exported name prefixed with package path
-		var id string
-		id, name = p.parseQualifiedName()
-		if materializePkg {
-			// we don't have a package name - if the package
-			// doesn't exist yet, create a fake package instead
-			pkg = p.getPkg(id, "")
-			if pkg == nil {
-				pkg = types.NewPackage(id, "")
-			}
-		}
-	default:
-		p.error("name expected")
-	}
-	return
-}
-
-func deref(typ types.Type) types.Type {
-	if p, _ := typ.(*types.Pointer); p != nil {
-		return p.Elem()
-	}
-	return typ
-}
-
-// Field = Name Type [ string_lit ] .
-//
-func (p *parser) parseField() (*types.Var, string) {
-	pkg, name := p.parseName(true)
-	typ := p.parseType()
-	anonymous := false
-	if name == "" {
-		// anonymous field - typ must be T or *T and T must be a type name
-		switch typ := deref(typ).(type) {
-		case *types.Basic: // basic types are named types
-			pkg = nil
-			name = typ.Name()
-		case *types.Named:
-			name = typ.Obj().Name()
-		default:
-			p.errorf("anonymous field expected")
-		}
-		anonymous = true
-	}
-	tag := ""
-	if p.tok == scanner.String {
-		s := p.expect(scanner.String)
-		var err error
-		tag, err = strconv.Unquote(s)
-		if err != nil {
-			p.errorf("invalid struct tag %s: %s", s, err)
-		}
-	}
-	return types.NewField(token.NoPos, pkg, name, typ, anonymous), tag
-}
-
-// StructType = "struct" "{" [ FieldList ] "}" .
-// FieldList  = Field { ";" Field } .
-//
-func (p *parser) parseStructType() types.Type {
-	var fields []*types.Var
-	var tags []string
-
-	p.expectKeyword("struct")
-	p.expect('{')
-	for i := 0; p.tok != '}' && p.tok != scanner.EOF; i++ {
-		if i > 0 {
-			p.expect(';')
-		}
-		fld, tag := p.parseField()
-		if tag != "" && tags == nil {
-			tags = make([]string, i)
-		}
-		if tags != nil {
-			tags = append(tags, tag)
-		}
-		fields = append(fields, fld)
-	}
-	p.expect('}')
-
-	return types.NewStruct(fields, tags)
-}
-
-// Parameter = ( identifier | "?" ) [ "..." ] Type [ string_lit ] .
-//
-func (p *parser) parseParameter() (par *types.Var, isVariadic bool) {
-	_, name := p.parseName(false)
-	// remove gc-specific parameter numbering
-	if i := strings.Index(name, "·"); i >= 0 {
-		name = name[:i]
-	}
-	if p.tok == '.' {
-		p.expectSpecial("...")
-		isVariadic = true
-	}
-	typ := p.parseType()
-	if isVariadic {
-		typ = types.NewSlice(typ)
-	}
-	// ignore argument tag (e.g. "noescape")
-	if p.tok == scanner.String {
-		p.next()
-	}
-	// TODO(gri) should we provide a package?
-	par = types.NewVar(token.NoPos, nil, name, typ)
-	return
-}
-
-// Parameters    = "(" [ ParameterList ] ")" .
-// ParameterList = { Parameter "," } Parameter .
-//
-func (p *parser) parseParameters() (list []*types.Var, isVariadic bool) {
-	p.expect('(')
-	for p.tok != ')' && p.tok != scanner.EOF {
-		if len(list) > 0 {
-			p.expect(',')
-		}
-		par, variadic := p.parseParameter()
-		list = append(list, par)
-		if variadic {
-			if isVariadic {
-				p.error("... not on final argument")
-			}
-			isVariadic = true
-		}
-	}
-	p.expect(')')
-
-	return
-}
-
-// Signature = Parameters [ Result ] .
-// Result    = Type | Parameters .
-//
-func (p *parser) parseSignature(recv *types.Var) *types.Signature {
-	params, isVariadic := p.parseParameters()
-
-	// optional result type
-	var results []*types.Var
-	if p.tok == '(' {
-		var variadic bool
-		results, variadic = p.parseParameters()
-		if variadic {
-			p.error("... not permitted on result type")
-		}
-	}
-
-	return types.NewSignature(recv, types.NewTuple(params...), types.NewTuple(results...), isVariadic)
-}
-
-// InterfaceType = "interface" "{" [ MethodList ] "}" .
-// MethodList    = Method { ";" Method } .
-// Method        = Name Signature .
-//
-// The methods of embedded interfaces are always "inlined"
-// by the compiler and thus embedded interfaces are never
-// visible in the export data.
-//
-func (p *parser) parseInterfaceType() types.Type {
-	var methods []*types.Func
-
-	p.expectKeyword("interface")
-	p.expect('{')
-	for i := 0; p.tok != '}' && p.tok != scanner.EOF; i++ {
-		if i > 0 {
-			p.expect(';')
-		}
-		pkg, name := p.parseName(true)
-		sig := p.parseSignature(nil)
-		methods = append(methods, types.NewFunc(token.NoPos, pkg, name, sig))
-	}
-	p.expect('}')
-
-	// Complete requires the type's embedded interfaces to be fully defined,
-	// but we do not define any
-	return types.NewInterface(methods, nil).Complete()
-}
-
-// ChanType = ( "chan" [ "<-" ] | "<-" "chan" ) Type .
-//
-func (p *parser) parseChanType() types.Type {
-	dir := types.SendRecv
-	if p.tok == scanner.Ident {
-		p.expectKeyword("chan")
-		if p.tok == '<' {
-			p.expectSpecial("<-")
-			dir = types.SendOnly
-		}
-	} else {
-		p.expectSpecial("<-")
-		p.expectKeyword("chan")
-		dir = types.RecvOnly
-	}
-	elem := p.parseType()
-	return types.NewChan(dir, elem)
-}
-
-// Type =
-//	BasicType | TypeName | ArrayType | SliceType | StructType |
-//      PointerType | FuncType | InterfaceType | MapType | ChanType |
-//      "(" Type ")" .
-//
-// BasicType   = ident .
-// TypeName    = ExportedName .
-// SliceType   = "[" "]" Type .
-// PointerType = "*" Type .
-// FuncType    = "func" Signature .
-//
-func (p *parser) parseType() types.Type {
-	switch p.tok {
-	case scanner.Ident:
-		switch p.lit {
-		default:
-			return p.parseBasicType()
-		case "struct":
-			return p.parseStructType()
-		case "func":
-			// FuncType
-			p.next()
-			return p.parseSignature(nil)
-		case "interface":
-			return p.parseInterfaceType()
-		case "map":
-			return p.parseMapType()
-		case "chan":
-			return p.parseChanType()
-		}
-	case '@':
-		// TypeName
-		pkg, name := p.parseExportedName()
-		return declTypeName(pkg, name).Type()
-	case '[':
-		p.next() // look ahead
-		if p.tok == ']' {
-			// SliceType
-			p.next()
-			return types.NewSlice(p.parseType())
-		}
-		return p.parseArrayType()
-	case '*':
-		// PointerType
-		p.next()
-		return types.NewPointer(p.parseType())
-	case '<':
-		return p.parseChanType()
-	case '(':
-		// "(" Type ")"
-		p.next()
-		typ := p.parseType()
-		p.expect(')')
-		return typ
-	}
-	p.errorf("expected type, got %s (%q)", scanner.TokenString(p.tok), p.lit)
-	return nil
-}
-
-// ----------------------------------------------------------------------------
-// Declarations
-
-// ImportDecl = "import" PackageName PackageId .
-//
-func (p *parser) parseImportDecl() {
-	p.expectKeyword("import")
-	name := p.parsePackageName()
-	p.getPkg(p.parsePackageId(), name)
-}
-
-// int_lit = [ "+" | "-" ] { "0" ... "9" } .
-//
-func (p *parser) parseInt() string {
-	s := ""
-	switch p.tok {
-	case '-':
-		s = "-"
-		p.next()
-	case '+':
-		p.next()
-	}
-	return s + p.expect(scanner.Int)
-}
-
-// number = int_lit [ "p" int_lit ] .
-//
-func (p *parser) parseNumber() (typ *types.Basic, val exact.Value) {
-	// mantissa
-	mant := exact.MakeFromLiteral(p.parseInt(), token.INT, 0)
-	if mant == nil {
-		panic("invalid mantissa")
-	}
-
-	if p.lit == "p" {
-		// exponent (base 2)
-		p.next()
-		exp, err := strconv.ParseInt(p.parseInt(), 10, 0)
-		if err != nil {
-			p.error(err)
-		}
-		if exp < 0 {
-			denom := exact.MakeInt64(1)
-			denom = exact.Shift(denom, token.SHL, uint(-exp))
-			typ = types.Typ[types.UntypedFloat]
-			val = exact.BinaryOp(mant, token.QUO, denom)
-			return
-		}
-		if exp > 0 {
-			mant = exact.Shift(mant, token.SHL, uint(exp))
-		}
-		typ = types.Typ[types.UntypedFloat]
-		val = mant
-		return
-	}
-
-	typ = types.Typ[types.UntypedInt]
-	val = mant
-	return
-}
-
-// ConstDecl   = "const" ExportedName [ Type ] "=" Literal .
-// Literal     = bool_lit | int_lit | float_lit | complex_lit | rune_lit | string_lit .
-// bool_lit    = "true" | "false" .
-// complex_lit = "(" float_lit "+" float_lit "i" ")" .
-// rune_lit    = "(" int_lit "+" int_lit ")" .
-// string_lit  = `"` { unicode_char } `"` .
-//
-func (p *parser) parseConstDecl() {
-	p.expectKeyword("const")
-	pkg, name := p.parseExportedName()
-
-	var typ0 types.Type
-	if p.tok != '=' {
-		typ0 = p.parseType()
-	}
-
-	p.expect('=')
-	var typ types.Type
-	var val exact.Value
-	switch p.tok {
-	case scanner.Ident:
-		// bool_lit
-		if p.lit != "true" && p.lit != "false" {
-			p.error("expected true or false")
-		}
-		typ = types.Typ[types.UntypedBool]
-		val = exact.MakeBool(p.lit == "true")
-		p.next()
-
-	case '-', scanner.Int:
-		// int_lit
-		typ, val = p.parseNumber()
-
-	case '(':
-		// complex_lit or rune_lit
-		p.next()
-		if p.tok == scanner.Char {
-			p.next()
-			p.expect('+')
-			typ = types.Typ[types.UntypedRune]
-			_, val = p.parseNumber()
-			p.expect(')')
-			break
-		}
-		_, re := p.parseNumber()
-		p.expect('+')
-		_, im := p.parseNumber()
-		p.expectKeyword("i")
-		p.expect(')')
-		typ = types.Typ[types.UntypedComplex]
-		val = exact.BinaryOp(re, token.ADD, exact.MakeImag(im))
-
-	case scanner.Char:
-		// rune_lit
-		typ = types.Typ[types.UntypedRune]
-		val = exact.MakeFromLiteral(p.lit, token.CHAR, 0)
-		p.next()
-
-	case scanner.String:
-		// string_lit
-		typ = types.Typ[types.UntypedString]
-		val = exact.MakeFromLiteral(p.lit, token.STRING, 0)
-		p.next()
-
-	default:
-		p.errorf("expected literal got %s", scanner.TokenString(p.tok))
-	}
-
-	if typ0 == nil {
-		typ0 = typ
-	}
-
-	pkg.Scope().Insert(types.NewConst(token.NoPos, pkg, name, typ0, val))
-}
-
-// TypeDecl = "type" ExportedName Type .
-//
-func (p *parser) parseTypeDecl() {
-	p.expectKeyword("type")
-	pkg, name := p.parseExportedName()
-	obj := declTypeName(pkg, name)
-
-	// The type object may have been imported before and thus already
-	// have a type associated with it. We still need to parse the type
-	// structure, but throw it away if the object already has a type.
-	// This ensures that all imports refer to the same type object for
-	// a given type declaration.
-	typ := p.parseType()
-
-	if name := obj.Type().(*types.Named); name.Underlying() == nil {
-		name.SetUnderlying(typ)
-	}
-}
-
-// VarDecl = "var" ExportedName Type .
-//
-func (p *parser) parseVarDecl() {
-	p.expectKeyword("var")
-	pkg, name := p.parseExportedName()
-	typ := p.parseType()
-	pkg.Scope().Insert(types.NewVar(token.NoPos, pkg, name, typ))
-}
-
-// Func = Signature [ Body ] .
-// Body = "{" ... "}" .
-//
-func (p *parser) parseFunc(recv *types.Var) *types.Signature {
-	sig := p.parseSignature(recv)
-	if p.tok == '{' {
-		p.next()
-		for i := 1; i > 0; p.next() {
-			switch p.tok {
-			case '{':
-				i++
-			case '}':
-				i--
-			}
-		}
-	}
-	return sig
-}
-
-// MethodDecl = "func" Receiver Name Func .
-// Receiver   = "(" ( identifier | "?" ) [ "*" ] ExportedName ")" .
-//
-func (p *parser) parseMethodDecl() {
-	// "func" already consumed
-	p.expect('(')
-	recv, _ := p.parseParameter() // receiver
-	p.expect(')')
-
-	// determine receiver base type object
-	base := deref(recv.Type()).(*types.Named)
-
-	// parse method name, signature, and possibly inlined body
-	_, name := p.parseName(true)
-	sig := p.parseFunc(recv)
-
-	// methods always belong to the same package as the base type object
-	pkg := base.Obj().Pkg()
-
-	// add method to type unless type was imported before
-	// and method exists already
-	// TODO(gri) This leads to a quadratic algorithm - ok for now because method counts are small.
-	base.AddMethod(types.NewFunc(token.NoPos, pkg, name, sig))
-}
-
-// FuncDecl = "func" ExportedName Func .
-//
-func (p *parser) parseFuncDecl() {
-	// "func" already consumed
-	pkg, name := p.parseExportedName()
-	typ := p.parseFunc(nil)
-	pkg.Scope().Insert(types.NewFunc(token.NoPos, pkg, name, typ))
-}
-
-// Decl = [ ImportDecl | ConstDecl | TypeDecl | VarDecl | FuncDecl | MethodDecl ] "\n" .
-//
-func (p *parser) parseDecl() {
-	if p.tok == scanner.Ident {
-		switch p.lit {
-		case "import":
-			p.parseImportDecl()
-		case "const":
-			p.parseConstDecl()
-		case "type":
-			p.parseTypeDecl()
-		case "var":
-			p.parseVarDecl()
-		case "func":
-			p.next() // look ahead
-			if p.tok == '(' {
-				p.parseMethodDecl()
-			} else {
-				p.parseFuncDecl()
-			}
-		}
-	}
-	p.expect('\n')
-}
-
-// ----------------------------------------------------------------------------
-// Export
-
-// Export        = "PackageClause { Decl } "$$" .
-// PackageClause = "package" PackageName [ "safe" ] "\n" .
-//
-func (p *parser) parseExport() *types.Package {
-	p.expectKeyword("package")
-	name := p.parsePackageName()
-	if p.tok == scanner.Ident && p.lit == "safe" {
-		// package was compiled with -u option - ignore
-		p.next()
-	}
-	p.expect('\n')
-
-	pkg := p.getPkg(p.id, name)
-
-	for p.tok != '$' && p.tok != scanner.EOF {
-		p.parseDecl()
-	}
-
-	if ch := p.scanner.Peek(); p.tok != '$' || ch != '$' {
-		// don't call next()/expect() since reading past the
-		// export data may cause scanner errors (e.g. NUL chars)
-		p.errorf("expected '$$', got %s %c", scanner.TokenString(p.tok), ch)
-	}
-
-	if n := p.scanner.ErrorCount; n != 0 {
-		p.errorf("expected no scanner errors, got %d", n)
-	}
-
-	// Record all referenced packages as imports.
-	var imports []*types.Package
-	for id, pkg2 := range p.localPkgs {
-		if id == p.id {
-			continue // avoid self-edge
-		}
-		imports = append(imports, pkg2)
-	}
-	sort.Sort(byPath(imports))
-	pkg.SetImports(imports)
-
-	// package was imported completely and without errors
-	pkg.MarkComplete()
-
-	return pkg
-}
-
-type byPath []*types.Package
-
-func (a byPath) Len() int           { return len(a) }
-func (a byPath) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }
-func (a byPath) Less(i, j int) bool { return a[i].Path() < a[j].Path() }
diff --git a/src/go/internal/gcimporter/gcimporter_test.go b/src/go/internal/gcimporter/gcimporter_test.go
deleted file mode 100644
index 07993a8..0000000
--- a/src/go/internal/gcimporter/gcimporter_test.go
+++ /dev/null
@@ -1,225 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package gcimporter
-
-import (
-	"fmt"
-	"internal/testenv"
-	"io/ioutil"
-	"os"
-	"os/exec"
-	"path/filepath"
-	"runtime"
-	"strings"
-	"testing"
-	"time"
-
-	"go/types"
-)
-
-// skipSpecialPlatforms causes the test to be skipped for platforms where
-// builders (build.golang.org) don't have access to compiled packages for
-// import.
-func skipSpecialPlatforms(t *testing.T) {
-	switch platform := runtime.GOOS + "-" + runtime.GOARCH; platform {
-	case "nacl-amd64p32",
-		"nacl-386",
-		"nacl-arm",
-		"darwin-arm",
-		"darwin-arm64":
-		t.Skipf("no compiled packages available for import on %s", platform)
-	}
-}
-
-func compile(t *testing.T, dirname, filename string) string {
-	testenv.MustHaveGoBuild(t)
-	cmd := exec.Command("go", "tool", "compile", filename)
-	cmd.Dir = dirname
-	out, err := cmd.CombinedOutput()
-	if err != nil {
-		t.Logf("%s", out)
-		t.Fatalf("go tool compile %s failed: %s", filename, err)
-	}
-	// filename should end with ".go"
-	return filepath.Join(dirname, filename[:len(filename)-2]+"o")
-}
-
-// Use the same global imports map for all tests. The effect is
-// as if all tested packages were imported into a single package.
-var imports = make(map[string]*types.Package)
-
-func testPath(t *testing.T, path string) *types.Package {
-	t0 := time.Now()
-	pkg, err := Import(imports, path)
-	if err != nil {
-		t.Errorf("testPath(%s): %s", path, err)
-		return nil
-	}
-	t.Logf("testPath(%s): %v", path, time.Since(t0))
-	return pkg
-}
-
-const maxTime = 30 * time.Second
-
-func testDir(t *testing.T, dir string, endTime time.Time) (nimports int) {
-	dirname := filepath.Join(runtime.GOROOT(), "pkg", runtime.GOOS+"_"+runtime.GOARCH, dir)
-	list, err := ioutil.ReadDir(dirname)
-	if err != nil {
-		t.Fatalf("testDir(%s): %s", dirname, err)
-	}
-	for _, f := range list {
-		if time.Now().After(endTime) {
-			t.Log("testing time used up")
-			return
-		}
-		switch {
-		case !f.IsDir():
-			// try extensions
-			for _, ext := range pkgExts {
-				if strings.HasSuffix(f.Name(), ext) {
-					name := f.Name()[0 : len(f.Name())-len(ext)] // remove extension
-					if testPath(t, filepath.Join(dir, name)) != nil {
-						nimports++
-					}
-				}
-			}
-		case f.IsDir():
-			nimports += testDir(t, filepath.Join(dir, f.Name()), endTime)
-		}
-	}
-	return
-}
-
-func TestImport(t *testing.T) {
-	// This package only handles gc export data.
-	if runtime.Compiler != "gc" {
-		t.Skipf("gc-built packages not available (compiler = %s)", runtime.Compiler)
-		return
-	}
-
-	if outFn := compile(t, "testdata", "exports.go"); outFn != "" {
-		defer os.Remove(outFn)
-	}
-
-	nimports := 0
-	if pkg := testPath(t, "./testdata/exports"); pkg != nil {
-		nimports++
-		// The package's Imports should include all the types
-		// referenced by the exportdata, which may be more than
-		// the import statements in the package's source, but
-		// fewer than the transitive closure of dependencies.
-		want := `[package ast ("go/ast") package token ("go/token") package runtime ("runtime")]`
-		got := fmt.Sprint(pkg.Imports())
-		if got != want {
-			t.Errorf(`Package("exports").Imports() = %s, want %s`, got, want)
-		}
-	}
-	nimports += testDir(t, "", time.Now().Add(maxTime)) // installed packages
-	t.Logf("tested %d imports", nimports)
-}
-
-var importedObjectTests = []struct {
-	name string
-	want string
-}{
-	{"math.Pi", "const Pi untyped float"},
-	{"io.Reader", "type Reader interface{Read(p []byte) (n int, err error)}"},
-	{"io.ReadWriter", "type ReadWriter interface{Read(p []byte) (n int, err error); Write(p []byte) (n int, err error)}"},
-	{"math.Sin", "func Sin(x float64) float64"},
-	// TODO(gri) add more tests
-}
-
-func TestImportedTypes(t *testing.T) {
-	skipSpecialPlatforms(t)
-
-	// This package only handles gc export data.
-	if runtime.Compiler != "gc" {
-		t.Skipf("gc-built packages not available (compiler = %s)", runtime.Compiler)
-		return
-	}
-
-	for _, test := range importedObjectTests {
-		s := strings.Split(test.name, ".")
-		if len(s) != 2 {
-			t.Fatal("inconsistent test data")
-		}
-		importPath := s[0]
-		objName := s[1]
-
-		pkg, err := Import(imports, importPath)
-		if err != nil {
-			t.Error(err)
-			continue
-		}
-
-		obj := pkg.Scope().Lookup(objName)
-		if obj == nil {
-			t.Errorf("%s: object not found", test.name)
-			continue
-		}
-
-		got := types.ObjectString(obj, types.RelativeTo(pkg))
-		if got != test.want {
-			t.Errorf("%s: got %q; want %q", test.name, got, test.want)
-		}
-	}
-}
-
-func TestIssue5815(t *testing.T) {
-	skipSpecialPlatforms(t)
-
-	// This package only handles gc export data.
-	if runtime.Compiler != "gc" {
-		t.Skipf("gc-built packages not available (compiler = %s)", runtime.Compiler)
-		return
-	}
-
-	pkg, err := Import(make(map[string]*types.Package), "strings")
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	scope := pkg.Scope()
-	for _, name := range scope.Names() {
-		obj := scope.Lookup(name)
-		if obj.Pkg() == nil {
-			t.Errorf("no pkg for %s", obj)
-		}
-		if tname, _ := obj.(*types.TypeName); tname != nil {
-			named := tname.Type().(*types.Named)
-			for i := 0; i < named.NumMethods(); i++ {
-				m := named.Method(i)
-				if m.Pkg() == nil {
-					t.Errorf("no pkg for %s", m)
-				}
-			}
-		}
-	}
-}
-
-// Smoke test to ensure that imported methods get the correct package.
-func TestCorrectMethodPackage(t *testing.T) {
-	skipSpecialPlatforms(t)
-
-	// This package only handles gc export data.
-	if runtime.Compiler != "gc" {
-		t.Skipf("gc-built packages not available (compiler = %s)", runtime.Compiler)
-		return
-	}
-
-	imports := make(map[string]*types.Package)
-	_, err := Import(imports, "net/http")
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	mutex := imports["sync"].Scope().Lookup("Mutex").(*types.TypeName).Type()
-	mset := types.NewMethodSet(types.NewPointer(mutex)) // methods of *sync.Mutex
-	sel := mset.Lookup(nil, "Lock")
-	lock := sel.Obj().(*types.Func)
-	if got, want := lock.Pkg().Path(), "sync"; got != want {
-		t.Errorf("got package path %q; want %q", got, want)
-	}
-}
diff --git a/src/go/internal/gcimporter/testdata/exports.go b/src/go/internal/gcimporter/testdata/exports.go
deleted file mode 100644
index 8ee28b0..0000000
--- a/src/go/internal/gcimporter/testdata/exports.go
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file is used to generate an object file which
-// serves as test file for gcimporter_test.go.
-
-package exports
-
-import (
-	"go/ast"
-)
-
-// Issue 3682: Correctly read dotted identifiers from export data.
-const init1 = 0
-
-func init() {}
-
-const (
-	C0 int = 0
-	C1     = 3.14159265
-	C2     = 2.718281828i
-	C3     = -123.456e-789
-	C4     = +123.456E+789
-	C5     = 1234i
-	C6     = "foo\n"
-	C7     = `bar\n`
-)
-
-type (
-	T1  int
-	T2  [10]int
-	T3  []int
-	T4  *int
-	T5  chan int
-	T6a chan<- int
-	T6b chan (<-chan int)
-	T6c chan<- (chan int)
-	T7  <-chan *ast.File
-	T8  struct{}
-	T9  struct {
-		a    int
-		b, c float32
-		d    []string `go:"tag"`
-	}
-	T10 struct {
-		T8
-		T9
-		_ *T10
-	}
-	T11 map[int]string
-	T12 interface{}
-	T13 interface {
-		m1()
-		m2(int) float32
-	}
-	T14 interface {
-		T12
-		T13
-		m3(x ...struct{}) []T9
-	}
-	T15 func()
-	T16 func(int)
-	T17 func(x int)
-	T18 func() float32
-	T19 func() (x float32)
-	T20 func(...interface{})
-	T21 struct{ next *T21 }
-	T22 struct{ link *T23 }
-	T23 struct{ link *T22 }
-	T24 *T24
-	T25 *T26
-	T26 *T27
-	T27 *T25
-	T28 func(T28) T28
-)
-
-var (
-	V0 int
-	V1 = -991.0
-)
-
-func F1()         {}
-func F2(x int)    {}
-func F3() int     { return 0 }
-func F4() float32 { return 0 }
-func F5(a, b, c int, u, v, w struct{ x, y T1 }, more ...interface{}) (p, q, r chan<- T10)
-
-func (p *T1) M1()
diff --git a/src/go/types/api.go b/src/go/types/api.go
deleted file mode 100644
index b3bf6f0..0000000
--- a/src/go/types/api.go
+++ /dev/null
@@ -1,336 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package types declares the data types and implements
-// the algorithms for type-checking of Go packages. Use
-// Config.Check to invoke the type checker for a package.
-// Alternatively, create a new type checked with NewChecker
-// and invoke it incrementally by calling Checker.Files.
-//
-// Type-checking consists of several interdependent phases:
-//
-// Name resolution maps each identifier (ast.Ident) in the program to the
-// language object (Object) it denotes.
-// Use Info.{Defs,Uses,Implicits} for the results of name resolution.
-//
-// Constant folding computes the exact constant value (constant.Value)
-// for every expression (ast.Expr) that is a compile-time constant.
-// Use Info.Types[expr].Value for the results of constant folding.
-//
-// Type inference computes the type (Type) of every expression (ast.Expr)
-// and checks for compliance with the language specification.
-// Use Info.Types[expr].Type for the results of type inference.
-//
-package types // import "go/types"
-
-import (
-	"bytes"
-	"fmt"
-	"go/ast"
-	"go/constant"
-	"go/token"
-)
-
-// An Error describes a type-checking error; it implements the error interface.
-// A "soft" error is an error that still permits a valid interpretation of a
-// package (such as "unused variable"); "hard" errors may lead to unpredictable
-// behavior if ignored.
-type Error struct {
-	Fset *token.FileSet // file set for interpretation of Pos
-	Pos  token.Pos      // error position
-	Msg  string         // error message
-	Soft bool           // if set, error is "soft"
-}
-
-// Error returns an error string formatted as follows:
-// filename:line:column: message
-func (err Error) Error() string {
-	return fmt.Sprintf("%s: %s", err.Fset.Position(err.Pos), err.Msg)
-}
-
-// An importer resolves import paths to Packages.
-// See go/importer for existing implementations.
-type Importer interface {
-	// Import returns the imported package for the given import
-	// path, or an error if the package couldn't be imported.
-	// Import is responsible for returning the same package for
-	// matching import paths.
-	Import(path string) (*Package, error)
-}
-
-// A Config specifies the configuration for type checking.
-// The zero value for Config is a ready-to-use default configuration.
-type Config struct {
-	// If IgnoreFuncBodies is set, function bodies are not
-	// type-checked.
-	IgnoreFuncBodies bool
-
-	// If FakeImportC is set, `import "C"` (for packages requiring Cgo)
-	// declares an empty "C" package and errors are omitted for qualified
-	// identifiers referring to package C (which won't find an object).
-	// This feature is intended for the standard library cmd/api tool.
-	//
-	// Caution: Effects may be unpredictable due to follow-up errors.
-	//          Do not use casually!
-	FakeImportC bool
-
-	// If Error != nil, it is called with each error found
-	// during type checking; err has dynamic type Error.
-	// Secondary errors (for instance, to enumerate all types
-	// involved in an invalid recursive type declaration) have
-	// error strings that start with a '\t' character.
-	// If Error == nil, type-checking stops with the first
-	// error found.
-	Error func(err error)
-
-	// Importer is called for each import declaration except when
-	// importing package "unsafe". An error is reported if an
-	// importer is needed but none was installed.
-	Importer Importer
-
-	// If Sizes != nil, it provides the sizing functions for package unsafe.
-	// Otherwise &StdSizes{WordSize: 8, MaxAlign: 8} is used instead.
-	Sizes Sizes
-
-	// If DisableUnusedImportCheck is set, packages are not checked
-	// for unused imports.
-	DisableUnusedImportCheck bool
-}
-
-// Info holds result type information for a type-checked package.
-// Only the information for which a map is provided is collected.
-// If the package has type errors, the collected information may
-// be incomplete.
-type Info struct {
-	// Types maps expressions to their types, and for constant
-	// expressions, their values. Invalid expressions are omitted.
-	//
-	// For (possibly parenthesized) identifiers denoting built-in
-	// functions, the recorded signatures are call-site specific:
-	// if the call result is not a constant, the recorded type is
-	// an argument-specific signature. Otherwise, the recorded type
-	// is invalid.
-	//
-	// Identifiers on the lhs of declarations (i.e., the identifiers
-	// which are being declared) are collected in the Defs map.
-	// Identifiers denoting packages are collected in the Uses maps.
-	Types map[ast.Expr]TypeAndValue
-
-	// Defs maps identifiers to the objects they define (including
-	// package names, dots "." of dot-imports, and blank "_" identifiers).
-	// For identifiers that do not denote objects (e.g., the package name
-	// in package clauses, or symbolic variables t in t := x.(type) of
-	// type switch headers), the corresponding objects are nil.
-	//
-	// For an anonymous field, Defs returns the field *Var it defines.
-	//
-	// Invariant: Defs[id] == nil || Defs[id].Pos() == id.Pos()
-	Defs map[*ast.Ident]Object
-
-	// Uses maps identifiers to the objects they denote.
-	//
-	// For an anonymous field, Uses returns the *TypeName it denotes.
-	//
-	// Invariant: Uses[id].Pos() != id.Pos()
-	Uses map[*ast.Ident]Object
-
-	// Implicits maps nodes to their implicitly declared objects, if any.
-	// The following node and object types may appear:
-	//
-	//	node               declared object
-	//
-	//	*ast.ImportSpec    *PkgName for dot-imports and imports without renames
-	//	*ast.CaseClause    type-specific *Var for each type switch case clause (incl. default)
-	//      *ast.Field         anonymous struct field or parameter *Var
-	//
-	Implicits map[ast.Node]Object
-
-	// Selections maps selector expressions (excluding qualified identifiers)
-	// to their corresponding selections.
-	Selections map[*ast.SelectorExpr]*Selection
-
-	// Scopes maps ast.Nodes to the scopes they define. Package scopes are not
-	// associated with a specific node but with all files belonging to a package.
-	// Thus, the package scope can be found in the type-checked Package object.
-	// Scopes nest, with the Universe scope being the outermost scope, enclosing
-	// the package scope, which contains (one or more) files scopes, which enclose
-	// function scopes which in turn enclose statement and function literal scopes.
-	// Note that even though package-level functions are declared in the package
-	// scope, the function scopes are embedded in the file scope of the file
-	// containing the function declaration.
-	//
-	// The following node types may appear in Scopes:
-	//
-	//	*ast.File
-	//	*ast.FuncType
-	//	*ast.BlockStmt
-	//	*ast.IfStmt
-	//	*ast.SwitchStmt
-	//	*ast.TypeSwitchStmt
-	//	*ast.CaseClause
-	//	*ast.CommClause
-	//	*ast.ForStmt
-	//	*ast.RangeStmt
-	//
-	Scopes map[ast.Node]*Scope
-
-	// InitOrder is the list of package-level initializers in the order in which
-	// they must be executed. Initializers referring to variables related by an
-	// initialization dependency appear in topological order, the others appear
-	// in source order. Variables without an initialization expression do not
-	// appear in this list.
-	InitOrder []*Initializer
-}
-
-// TypeOf returns the type of expression e, or nil if not found.
-// Precondition: the Types, Uses and Defs maps are populated.
-//
-func (info *Info) TypeOf(e ast.Expr) Type {
-	if t, ok := info.Types[e]; ok {
-		return t.Type
-	}
-	if id, _ := e.(*ast.Ident); id != nil {
-		if obj := info.ObjectOf(id); obj != nil {
-			return obj.Type()
-		}
-	}
-	return nil
-}
-
-// ObjectOf returns the object denoted by the specified id,
-// or nil if not found.
-//
-// If id is an anonymous struct field, ObjectOf returns the field (*Var)
-// it uses, not the type (*TypeName) it defines.
-//
-// Precondition: the Uses and Defs maps are populated.
-//
-func (info *Info) ObjectOf(id *ast.Ident) Object {
-	if obj, _ := info.Defs[id]; obj != nil {
-		return obj
-	}
-	return info.Uses[id]
-}
-
-// TypeAndValue reports the type and value (for constants)
-// of the corresponding expression.
-type TypeAndValue struct {
-	mode  operandMode
-	Type  Type
-	Value constant.Value
-}
-
-// TODO(gri) Consider eliminating the IsVoid predicate. Instead, report
-// "void" values as regular values but with the empty tuple type.
-
-// IsVoid reports whether the corresponding expression
-// is a function call without results.
-func (tv TypeAndValue) IsVoid() bool {
-	return tv.mode == novalue
-}
-
-// IsType reports whether the corresponding expression specifies a type.
-func (tv TypeAndValue) IsType() bool {
-	return tv.mode == typexpr
-}
-
-// IsBuiltin reports whether the corresponding expression denotes
-// a (possibly parenthesized) built-in function.
-func (tv TypeAndValue) IsBuiltin() bool {
-	return tv.mode == builtin
-}
-
-// IsValue reports whether the corresponding expression is a value.
-// Builtins are not considered values. Constant values have a non-
-// nil Value.
-func (tv TypeAndValue) IsValue() bool {
-	switch tv.mode {
-	case constant_, variable, mapindex, value, commaok:
-		return true
-	}
-	return false
-}
-
-// IsNil reports whether the corresponding expression denotes the
-// predeclared value nil.
-func (tv TypeAndValue) IsNil() bool {
-	return tv.mode == value && tv.Type == Typ[UntypedNil]
-}
-
-// Addressable reports whether the corresponding expression
-// is addressable (https://golang.org/ref/spec#Address_operators).
-func (tv TypeAndValue) Addressable() bool {
-	return tv.mode == variable
-}
-
-// Assignable reports whether the corresponding expression
-// is assignable to (provided a value of the right type).
-func (tv TypeAndValue) Assignable() bool {
-	return tv.mode == variable || tv.mode == mapindex
-}
-
-// HasOk reports whether the corresponding expression may be
-// used on the lhs of a comma-ok assignment.
-func (tv TypeAndValue) HasOk() bool {
-	return tv.mode == commaok || tv.mode == mapindex
-}
-
-// An Initializer describes a package-level variable, or a list of variables in case
-// of a multi-valued initialization expression, and the corresponding initialization
-// expression.
-type Initializer struct {
-	Lhs []*Var // var Lhs = Rhs
-	Rhs ast.Expr
-}
-
-func (init *Initializer) String() string {
-	var buf bytes.Buffer
-	for i, lhs := range init.Lhs {
-		if i > 0 {
-			buf.WriteString(", ")
-		}
-		buf.WriteString(lhs.Name())
-	}
-	buf.WriteString(" = ")
-	WriteExpr(&buf, init.Rhs)
-	return buf.String()
-}
-
-// Check type-checks a package and returns the resulting package object,
-// the first error if any, and if info != nil, additional type information.
-// The package is marked as complete if no errors occurred, otherwise it is
-// incomplete. See Config.Error for controlling behavior in the presence of
-// errors.
-//
-// The package is specified by a list of *ast.Files and corresponding
-// file set, and the package path the package is identified with.
-// The clean path must not be empty or dot (".").
-func (conf *Config) Check(path string, fset *token.FileSet, files []*ast.File, info *Info) (*Package, error) {
-	pkg := NewPackage(path, "")
-	return pkg, NewChecker(conf, fset, pkg, info).Files(files)
-}
-
-// AssertableTo reports whether a value of type V can be asserted to have type T.
-func AssertableTo(V *Interface, T Type) bool {
-	m, _ := assertableTo(V, T)
-	return m == nil
-}
-
-// AssignableTo reports whether a value of type V is assignable to a variable of type T.
-func AssignableTo(V, T Type) bool {
-	x := operand{mode: value, typ: V}
-	return x.assignableTo(nil, T) // config not needed for non-constant x
-}
-
-// ConvertibleTo reports whether a value of type V is convertible to a value of type T.
-func ConvertibleTo(V, T Type) bool {
-	x := operand{mode: value, typ: V}
-	return x.convertibleTo(nil, T) // config not needed for non-constant x
-}
-
-// Implements reports whether type V implements interface T.
-func Implements(V Type, T *Interface) bool {
-	f, _ := MissingMethod(V, T, true)
-	return f == nil
-}
diff --git a/src/go/types/api_test.go b/src/go/types/api_test.go
deleted file mode 100644
index eeda0d8..0000000
--- a/src/go/types/api_test.go
+++ /dev/null
@@ -1,1044 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package types_test
-
-import (
-	"bytes"
-	"fmt"
-	"go/ast"
-	"go/importer"
-	"go/parser"
-	"go/token"
-	"internal/testenv"
-	"reflect"
-	"regexp"
-	"strings"
-	"testing"
-
-	. "go/types"
-)
-
-func pkgFor(path, source string, info *Info) (*Package, error) {
-	fset := token.NewFileSet()
-	f, err := parser.ParseFile(fset, path, source, 0)
-	if err != nil {
-		return nil, err
-	}
-
-	conf := Config{Importer: importer.Default()}
-	return conf.Check(f.Name.Name, fset, []*ast.File{f}, info)
-}
-
-func mustTypecheck(t *testing.T, path, source string, info *Info) string {
-	pkg, err := pkgFor(path, source, info)
-	if err != nil {
-		name := path
-		if pkg != nil {
-			name = "package " + pkg.Name()
-		}
-		t.Fatalf("%s: didn't type-check (%s)", name, err)
-	}
-	return pkg.Name()
-}
-
-func TestValuesInfo(t *testing.T) {
-	var tests = []struct {
-		src  string
-		expr string // constant expression
-		typ  string // constant type
-		val  string // constant value
-	}{
-		{`package a0; const _ = false`, `false`, `untyped bool`, `false`},
-		{`package a1; const _ = 0`, `0`, `untyped int`, `0`},
-		{`package a2; const _ = 'A'`, `'A'`, `untyped rune`, `65`},
-		{`package a3; const _ = 0.`, `0.`, `untyped float`, `0`},
-		{`package a4; const _ = 0i`, `0i`, `untyped complex`, `0`},
-		{`package a5; const _ = "foo"`, `"foo"`, `untyped string`, `"foo"`},
-
-		{`package b0; var _ = false`, `false`, `bool`, `false`},
-		{`package b1; var _ = 0`, `0`, `int`, `0`},
-		{`package b2; var _ = 'A'`, `'A'`, `rune`, `65`},
-		{`package b3; var _ = 0.`, `0.`, `float64`, `0`},
-		{`package b4; var _ = 0i`, `0i`, `complex128`, `0`},
-		{`package b5; var _ = "foo"`, `"foo"`, `string`, `"foo"`},
-
-		{`package c0a; var _ = bool(false)`, `false`, `bool`, `false`},
-		{`package c0b; var _ = bool(false)`, `bool(false)`, `bool`, `false`},
-		{`package c0c; type T bool; var _ = T(false)`, `T(false)`, `c0c.T`, `false`},
-
-		{`package c1a; var _ = int(0)`, `0`, `int`, `0`},
-		{`package c1b; var _ = int(0)`, `int(0)`, `int`, `0`},
-		{`package c1c; type T int; var _ = T(0)`, `T(0)`, `c1c.T`, `0`},
-
-		{`package c2a; var _ = rune('A')`, `'A'`, `rune`, `65`},
-		{`package c2b; var _ = rune('A')`, `rune('A')`, `rune`, `65`},
-		{`package c2c; type T rune; var _ = T('A')`, `T('A')`, `c2c.T`, `65`},
-
-		{`package c3a; var _ = float32(0.)`, `0.`, `float32`, `0`},
-		{`package c3b; var _ = float32(0.)`, `float32(0.)`, `float32`, `0`},
-		{`package c3c; type T float32; var _ = T(0.)`, `T(0.)`, `c3c.T`, `0`},
-
-		{`package c4a; var _ = complex64(0i)`, `0i`, `complex64`, `0`},
-		{`package c4b; var _ = complex64(0i)`, `complex64(0i)`, `complex64`, `0`},
-		{`package c4c; type T complex64; var _ = T(0i)`, `T(0i)`, `c4c.T`, `0`},
-
-		{`package c5a; var _ = string("foo")`, `"foo"`, `string`, `"foo"`},
-		{`package c5b; var _ = string("foo")`, `string("foo")`, `string`, `"foo"`},
-		{`package c5c; type T string; var _ = T("foo")`, `T("foo")`, `c5c.T`, `"foo"`},
-
-		{`package d0; var _ = []byte("foo")`, `"foo"`, `string`, `"foo"`},
-		{`package d1; var _ = []byte(string("foo"))`, `"foo"`, `string`, `"foo"`},
-		{`package d2; var _ = []byte(string("foo"))`, `string("foo")`, `string`, `"foo"`},
-		{`package d3; type T []byte; var _ = T("foo")`, `"foo"`, `string`, `"foo"`},
-
-		{`package e0; const _ = float32( 1e-200)`, `float32(1e-200)`, `float32`, `0`},
-		{`package e1; const _ = float32(-1e-200)`, `float32(-1e-200)`, `float32`, `0`},
-		{`package e2; const _ = float64( 1e-2000)`, `float64(1e-2000)`, `float64`, `0`},
-		{`package e3; const _ = float64(-1e-2000)`, `float64(-1e-2000)`, `float64`, `0`},
-		{`package e4; const _ = complex64( 1e-200)`, `complex64(1e-200)`, `complex64`, `0`},
-		{`package e5; const _ = complex64(-1e-200)`, `complex64(-1e-200)`, `complex64`, `0`},
-		{`package e6; const _ = complex128( 1e-2000)`, `complex128(1e-2000)`, `complex128`, `0`},
-		{`package e7; const _ = complex128(-1e-2000)`, `complex128(-1e-2000)`, `complex128`, `0`},
-
-		{`package f0 ; var _ float32 =  1e-200`, `1e-200`, `float32`, `0`},
-		{`package f1 ; var _ float32 = -1e-200`, `-1e-200`, `float32`, `0`},
-		{`package f2a; var _ float64 =  1e-2000`, `1e-2000`, `float64`, `0`},
-		{`package f3a; var _ float64 = -1e-2000`, `-1e-2000`, `float64`, `0`},
-		{`package f2b; var _         =  1e-2000`, `1e-2000`, `float64`, `0`},
-		{`package f3b; var _         = -1e-2000`, `-1e-2000`, `float64`, `0`},
-		{`package f4 ; var _ complex64  =  1e-200 `, `1e-200`, `complex64`, `0`},
-		{`package f5 ; var _ complex64  = -1e-200 `, `-1e-200`, `complex64`, `0`},
-		{`package f6a; var _ complex128 =  1e-2000i`, `1e-2000i`, `complex128`, `0`},
-		{`package f7a; var _ complex128 = -1e-2000i`, `-1e-2000i`, `complex128`, `0`},
-		{`package f6b; var _            =  1e-2000i`, `1e-2000i`, `complex128`, `0`},
-		{`package f7b; var _            = -1e-2000i`, `-1e-2000i`, `complex128`, `0`},
-	}
-
-	for _, test := range tests {
-		info := Info{
-			Types: make(map[ast.Expr]TypeAndValue),
-		}
-		name := mustTypecheck(t, "ValuesInfo", test.src, &info)
-
-		// look for constant expression
-		var expr ast.Expr
-		for e := range info.Types {
-			if ExprString(e) == test.expr {
-				expr = e
-				break
-			}
-		}
-		if expr == nil {
-			t.Errorf("package %s: no expression found for %s", name, test.expr)
-			continue
-		}
-		tv := info.Types[expr]
-
-		// check that type is correct
-		if got := tv.Type.String(); got != test.typ {
-			t.Errorf("package %s: got type %s; want %s", name, got, test.typ)
-			continue
-		}
-
-		// check that value is correct
-		if got := tv.Value.String(); got != test.val {
-			t.Errorf("package %s: got value %s; want %s", name, got, test.val)
-		}
-	}
-}
-
-func TestTypesInfo(t *testing.T) {
-	var tests = []struct {
-		src  string
-		expr string // expression
-		typ  string // value type
-	}{
-		// single-valued expressions of untyped constants
-		{`package b0; var x interface{} = false`, `false`, `bool`},
-		{`package b1; var x interface{} = 0`, `0`, `int`},
-		{`package b2; var x interface{} = 0.`, `0.`, `float64`},
-		{`package b3; var x interface{} = 0i`, `0i`, `complex128`},
-		{`package b4; var x interface{} = "foo"`, `"foo"`, `string`},
-
-		// comma-ok expressions
-		{`package p0; var x interface{}; var _, _ = x.(int)`,
-			`x.(int)`,
-			`(int, bool)`,
-		},
-		{`package p1; var x interface{}; func _() { _, _ = x.(int) }`,
-			`x.(int)`,
-			`(int, bool)`,
-		},
-		// TODO(gri): uncomment if we accept issue 8189.
-		// {`package p2; type mybool bool; var m map[string]complex128; var b mybool; func _() { _, b = m["foo"] }`,
-		// 	`m["foo"]`,
-		// 	`(complex128, p2.mybool)`,
-		// },
-		// TODO(gri): remove if we accept issue 8189.
-		{`package p2; var m map[string]complex128; var b bool; func _() { _, b = m["foo"] }`,
-			`m["foo"]`,
-			`(complex128, bool)`,
-		},
-		{`package p3; var c chan string; var _, _ = <-c`,
-			`<-c`,
-			`(string, bool)`,
-		},
-
-		// issue 6796
-		{`package issue6796_a; var x interface{}; var _, _ = (x.(int))`,
-			`x.(int)`,
-			`(int, bool)`,
-		},
-		{`package issue6796_b; var c chan string; var _, _ = (<-c)`,
-			`(<-c)`,
-			`(string, bool)`,
-		},
-		{`package issue6796_c; var c chan string; var _, _ = (<-c)`,
-			`<-c`,
-			`(string, bool)`,
-		},
-		{`package issue6796_d; var c chan string; var _, _ = ((<-c))`,
-			`(<-c)`,
-			`(string, bool)`,
-		},
-		{`package issue6796_e; func f(c chan string) { _, _ = ((<-c)) }`,
-			`(<-c)`,
-			`(string, bool)`,
-		},
-
-		// issue 7060
-		{`package issue7060_a; var ( m map[int]string; x, ok = m[0] )`,
-			`m[0]`,
-			`(string, bool)`,
-		},
-		{`package issue7060_b; var ( m map[int]string; x, ok interface{} = m[0] )`,
-			`m[0]`,
-			`(string, bool)`,
-		},
-		{`package issue7060_c; func f(x interface{}, ok bool, m map[int]string) { x, ok = m[0] }`,
-			`m[0]`,
-			`(string, bool)`,
-		},
-		{`package issue7060_d; var ( ch chan string; x, ok = <-ch )`,
-			`<-ch`,
-			`(string, bool)`,
-		},
-		{`package issue7060_e; var ( ch chan string; x, ok interface{} = <-ch )`,
-			`<-ch`,
-			`(string, bool)`,
-		},
-		{`package issue7060_f; func f(x interface{}, ok bool, ch chan string) { x, ok = <-ch }`,
-			`<-ch`,
-			`(string, bool)`,
-		},
-	}
-
-	for _, test := range tests {
-		info := Info{Types: make(map[ast.Expr]TypeAndValue)}
-		name := mustTypecheck(t, "TypesInfo", test.src, &info)
-
-		// look for expression type
-		var typ Type
-		for e, tv := range info.Types {
-			if ExprString(e) == test.expr {
-				typ = tv.Type
-				break
-			}
-		}
-		if typ == nil {
-			t.Errorf("package %s: no type found for %s", name, test.expr)
-			continue
-		}
-
-		// check that type is correct
-		if got := typ.String(); got != test.typ {
-			t.Errorf("package %s: got %s; want %s", name, got, test.typ)
-		}
-	}
-}
-
-func predString(tv TypeAndValue) string {
-	var buf bytes.Buffer
-	pred := func(b bool, s string) {
-		if b {
-			if buf.Len() > 0 {
-				buf.WriteString(", ")
-			}
-			buf.WriteString(s)
-		}
-	}
-
-	pred(tv.IsVoid(), "void")
-	pred(tv.IsType(), "type")
-	pred(tv.IsBuiltin(), "builtin")
-	pred(tv.IsValue() && tv.Value != nil, "const")
-	pred(tv.IsValue() && tv.Value == nil, "value")
-	pred(tv.IsNil(), "nil")
-	pred(tv.Addressable(), "addressable")
-	pred(tv.Assignable(), "assignable")
-	pred(tv.HasOk(), "hasOk")
-
-	if buf.Len() == 0 {
-		return "invalid"
-	}
-	return buf.String()
-}
-
-func TestPredicatesInfo(t *testing.T) {
-	testenv.MustHaveGoBuild(t)
-
-	var tests = []struct {
-		src  string
-		expr string
-		pred string
-	}{
-		// void
-		{`package n0; func f() { f() }`, `f()`, `void`},
-
-		// types
-		{`package t0; type _ int`, `int`, `type`},
-		{`package t1; type _ []int`, `[]int`, `type`},
-		{`package t2; type _ func()`, `func()`, `type`},
-
-		// built-ins
-		{`package b0; var _ = len("")`, `len`, `builtin`},
-		{`package b1; var _ = (len)("")`, `(len)`, `builtin`},
-
-		// constants
-		{`package c0; var _ = 42`, `42`, `const`},
-		{`package c1; var _ = "foo" + "bar"`, `"foo" + "bar"`, `const`},
-		{`package c2; const (i = 1i; _ = i)`, `i`, `const`},
-
-		// values
-		{`package v0; var (a, b int; _ = a + b)`, `a + b`, `value`},
-		{`package v1; var _ = &[]int{1}`, `([]int literal)`, `value`},
-		{`package v2; var _ = func(){}`, `(func() literal)`, `value`},
-		{`package v4; func f() { _ = f }`, `f`, `value`},
-		{`package v3; var _ *int = nil`, `nil`, `value, nil`},
-		{`package v3; var _ *int = (nil)`, `(nil)`, `value, nil`},
-
-		// addressable (and thus assignable) operands
-		{`package a0; var (x int; _ = x)`, `x`, `value, addressable, assignable`},
-		{`package a1; var (p *int; _ = *p)`, `*p`, `value, addressable, assignable`},
-		{`package a2; var (s []int; _ = s[0])`, `s[0]`, `value, addressable, assignable`},
-		{`package a3; var (s struct{f int}; _ = s.f)`, `s.f`, `value, addressable, assignable`},
-		{`package a4; var (a [10]int; _ = a[0])`, `a[0]`, `value, addressable, assignable`},
-		{`package a5; func _(x int) { _ = x }`, `x`, `value, addressable, assignable`},
-		{`package a6; func _()(x int) { _ = x; return }`, `x`, `value, addressable, assignable`},
-		{`package a7; type T int; func (x T) _() { _ = x }`, `x`, `value, addressable, assignable`},
-		// composite literals are not addressable
-
-		// assignable but not addressable values
-		{`package s0; var (m map[int]int; _ = m[0])`, `m[0]`, `value, assignable, hasOk`},
-		{`package s1; var (m map[int]int; _, _ = m[0])`, `m[0]`, `value, assignable, hasOk`},
-
-		// hasOk expressions
-		{`package k0; var (ch chan int; _ = <-ch)`, `<-ch`, `value, hasOk`},
-		{`package k1; var (ch chan int; _, _ = <-ch)`, `<-ch`, `value, hasOk`},
-
-		// missing entries
-		// - package names are collected in the Uses map
-		// - identifiers being declared are collected in the Defs map
-		{`package m0; import "os"; func _() { _ = os.Stdout }`, `os`, `<missing>`},
-		{`package m1; import p "os"; func _() { _ = p.Stdout }`, `p`, `<missing>`},
-		{`package m2; const c = 0`, `c`, `<missing>`},
-		{`package m3; type T int`, `T`, `<missing>`},
-		{`package m4; var v int`, `v`, `<missing>`},
-		{`package m5; func f() {}`, `f`, `<missing>`},
-		{`package m6; func _(x int) {}`, `x`, `<missing>`},
-		{`package m6; func _()(x int) { return }`, `x`, `<missing>`},
-		{`package m6; type T int; func (x T) _() {}`, `x`, `<missing>`},
-	}
-
-	for _, test := range tests {
-		info := Info{Types: make(map[ast.Expr]TypeAndValue)}
-		name := mustTypecheck(t, "PredicatesInfo", test.src, &info)
-
-		// look for expression predicates
-		got := "<missing>"
-		for e, tv := range info.Types {
-			//println(name, ExprString(e))
-			if ExprString(e) == test.expr {
-				got = predString(tv)
-				break
-			}
-		}
-
-		if got != test.pred {
-			t.Errorf("package %s: got %s; want %s", name, got, test.pred)
-		}
-	}
-}
-
-func TestScopesInfo(t *testing.T) {
-	testenv.MustHaveGoBuild(t)
-
-	var tests = []struct {
-		src    string
-		scopes []string // list of scope descriptors of the form kind:varlist
-	}{
-		{`package p0`, []string{
-			"file:",
-		}},
-		{`package p1; import ( "fmt"; m "math"; _ "os" ); var ( _ = fmt.Println; _ = m.Pi )`, []string{
-			"file:fmt m",
-		}},
-		{`package p2; func _() {}`, []string{
-			"file:", "func:",
-		}},
-		{`package p3; func _(x, y int) {}`, []string{
-			"file:", "func:x y",
-		}},
-		{`package p4; func _(x, y int) { x, z := 1, 2; _ = z }`, []string{
-			"file:", "func:x y z", // redeclaration of x
-		}},
-		{`package p5; func _(x, y int) (u, _ int) { return }`, []string{
-			"file:", "func:u x y",
-		}},
-		{`package p6; func _() { { var x int; _ = x } }`, []string{
-			"file:", "func:", "block:x",
-		}},
-		{`package p7; func _() { if true {} }`, []string{
-			"file:", "func:", "if:", "block:",
-		}},
-		{`package p8; func _() { if x := 0; x < 0 { y := x; _ = y } }`, []string{
-			"file:", "func:", "if:x", "block:y",
-		}},
-		{`package p9; func _() { switch x := 0; x {} }`, []string{
-			"file:", "func:", "switch:x",
-		}},
-		{`package p10; func _() { switch x := 0; x { case 1: y := x; _ = y; default: }}`, []string{
-			"file:", "func:", "switch:x", "case:y", "case:",
-		}},
-		{`package p11; func _(t interface{}) { switch t.(type) {} }`, []string{
-			"file:", "func:t", "type switch:",
-		}},
-		{`package p12; func _(t interface{}) { switch t := t; t.(type) {} }`, []string{
-			"file:", "func:t", "type switch:t",
-		}},
-		{`package p13; func _(t interface{}) { switch x := t.(type) { case int: _ = x } }`, []string{
-			"file:", "func:t", "type switch:", "case:x", // x implicitly declared
-		}},
-		{`package p14; func _() { select{} }`, []string{
-			"file:", "func:",
-		}},
-		{`package p15; func _(c chan int) { select{ case <-c: } }`, []string{
-			"file:", "func:c", "comm:",
-		}},
-		{`package p16; func _(c chan int) { select{ case i := <-c: x := i; _ = x} }`, []string{
-			"file:", "func:c", "comm:i x",
-		}},
-		{`package p17; func _() { for{} }`, []string{
-			"file:", "func:", "for:", "block:",
-		}},
-		{`package p18; func _(n int) { for i := 0; i < n; i++ { _ = i } }`, []string{
-			"file:", "func:n", "for:i", "block:",
-		}},
-		{`package p19; func _(a []int) { for i := range a { _ = i} }`, []string{
-			"file:", "func:a", "range:i", "block:",
-		}},
-		{`package p20; var s int; func _(a []int) { for i, x := range a { s += x; _ = i } }`, []string{
-			"file:", "func:a", "range:i x", "block:",
-		}},
-	}
-
-	for _, test := range tests {
-		info := Info{Scopes: make(map[ast.Node]*Scope)}
-		name := mustTypecheck(t, "ScopesInfo", test.src, &info)
-
-		// number of scopes must match
-		if len(info.Scopes) != len(test.scopes) {
-			t.Errorf("package %s: got %d scopes; want %d", name, len(info.Scopes), len(test.scopes))
-		}
-
-		// scope descriptions must match
-		for node, scope := range info.Scopes {
-			kind := "<unknown node kind>"
-			switch node.(type) {
-			case *ast.File:
-				kind = "file"
-			case *ast.FuncType:
-				kind = "func"
-			case *ast.BlockStmt:
-				kind = "block"
-			case *ast.IfStmt:
-				kind = "if"
-			case *ast.SwitchStmt:
-				kind = "switch"
-			case *ast.TypeSwitchStmt:
-				kind = "type switch"
-			case *ast.CaseClause:
-				kind = "case"
-			case *ast.CommClause:
-				kind = "comm"
-			case *ast.ForStmt:
-				kind = "for"
-			case *ast.RangeStmt:
-				kind = "range"
-			}
-
-			// look for matching scope description
-			desc := kind + ":" + strings.Join(scope.Names(), " ")
-			found := false
-			for _, d := range test.scopes {
-				if desc == d {
-					found = true
-					break
-				}
-			}
-			if !found {
-				t.Errorf("package %s: no matching scope found for %s", name, desc)
-			}
-		}
-	}
-}
-
-func TestInitOrderInfo(t *testing.T) {
-	var tests = []struct {
-		src   string
-		inits []string
-	}{
-		{`package p0; var (x = 1; y = x)`, []string{
-			"x = 1", "y = x",
-		}},
-		{`package p1; var (a = 1; b = 2; c = 3)`, []string{
-			"a = 1", "b = 2", "c = 3",
-		}},
-		{`package p2; var (a, b, c = 1, 2, 3)`, []string{
-			"a = 1", "b = 2", "c = 3",
-		}},
-		{`package p3; var _ = f(); func f() int { return 1 }`, []string{
-			"_ = f()", // blank var
-		}},
-		{`package p4; var (a = 0; x = y; y = z; z = 0)`, []string{
-			"a = 0", "z = 0", "y = z", "x = y",
-		}},
-		{`package p5; var (a, _ = m[0]; m map[int]string)`, []string{
-			"a, _ = m[0]", // blank var
-		}},
-		{`package p6; var a, b = f(); func f() (_, _ int) { return z, z }; var z = 0`, []string{
-			"z = 0", "a, b = f()",
-		}},
-		{`package p7; var (a = func() int { return b }(); b = 1)`, []string{
-			"b = 1", "a = (func() int literal)()",
-		}},
-		{`package p8; var (a, b = func() (_, _ int) { return c, c }(); c = 1)`, []string{
-			"c = 1", "a, b = (func() (_, _ int) literal)()",
-		}},
-		{`package p9; type T struct{}; func (T) m() int { _ = y; return 0 }; var x, y = T.m, 1`, []string{
-			"y = 1", "x = T.m",
-		}},
-		{`package p10; var (d = c + b; a = 0; b = 0; c = 0)`, []string{
-			"a = 0", "b = 0", "c = 0", "d = c + b",
-		}},
-		{`package p11; var (a = e + c; b = d + c; c = 0; d = 0; e = 0)`, []string{
-			"c = 0", "d = 0", "b = d + c", "e = 0", "a = e + c",
-		}},
-		// emit an initializer for n:1 initializations only once (not for each node
-		// on the lhs which may appear in different order in the dependency graph)
-		{`package p12; var (a = x; b = 0; x, y = m[0]; m map[int]int)`, []string{
-			"b = 0", "x, y = m[0]", "a = x",
-		}},
-		// test case from spec section on package initialization
-		{`package p12
-
-		var (
-			a = c + b
-			b = f()
-			c = f()
-			d = 3
-		)
-
-		func f() int {
-			d++
-			return d
-		}`, []string{
-			"d = 3", "b = f()", "c = f()", "a = c + b",
-		}},
-		// test case for issue 7131
-		{`package main
-
-		var counter int
-		func next() int { counter++; return counter }
-
-		var _ = makeOrder()
-		func makeOrder() []int { return []int{f, b, d, e, c, a} }
-
-		var a       = next()
-		var b, c    = next(), next()
-		var d, e, f = next(), next(), next()
-		`, []string{
-			"a = next()", "b = next()", "c = next()", "d = next()", "e = next()", "f = next()", "_ = makeOrder()",
-		}},
-	}
-
-	for _, test := range tests {
-		info := Info{}
-		name := mustTypecheck(t, "InitOrderInfo", test.src, &info)
-
-		// number of initializers must match
-		if len(info.InitOrder) != len(test.inits) {
-			t.Errorf("package %s: got %d initializers; want %d", name, len(info.InitOrder), len(test.inits))
-			continue
-		}
-
-		// initializers must match
-		for i, want := range test.inits {
-			got := info.InitOrder[i].String()
-			if got != want {
-				t.Errorf("package %s, init %d: got %s; want %s", name, i, got, want)
-				continue
-			}
-		}
-	}
-}
-
-func TestMultiFileInitOrder(t *testing.T) {
-	fset := token.NewFileSet()
-	mustParse := func(src string) *ast.File {
-		f, err := parser.ParseFile(fset, "main", src, 0)
-		if err != nil {
-			t.Fatal(err)
-		}
-		return f
-	}
-
-	fileA := mustParse(`package main; var a = 1`)
-	fileB := mustParse(`package main; var b = 2`)
-
-	// The initialization order must not depend on the parse
-	// order of the files, only on the presentation order to
-	// the type-checker.
-	for _, test := range []struct {
-		files []*ast.File
-		want  string
-	}{
-		{[]*ast.File{fileA, fileB}, "[a = 1 b = 2]"},
-		{[]*ast.File{fileB, fileA}, "[b = 2 a = 1]"},
-	} {
-		var info Info
-		if _, err := new(Config).Check("main", fset, test.files, &info); err != nil {
-			t.Fatal(err)
-		}
-		if got := fmt.Sprint(info.InitOrder); got != test.want {
-			t.Fatalf("got %s; want %s", got, test.want)
-		}
-	}
-}
-
-func TestFiles(t *testing.T) {
-	var sources = []string{
-		"package p; type T struct{}; func (T) m1() {}",
-		"package p; func (T) m2() {}; var x interface{ m1(); m2() } = T{}",
-		"package p; func (T) m3() {}; var y interface{ m1(); m2(); m3() } = T{}",
-		"package p",
-	}
-
-	var conf Config
-	fset := token.NewFileSet()
-	pkg := NewPackage("p", "p")
-	var info Info
-	check := NewChecker(&conf, fset, pkg, &info)
-
-	for i, src := range sources {
-		filename := fmt.Sprintf("sources%d", i)
-		f, err := parser.ParseFile(fset, filename, src, 0)
-		if err != nil {
-			t.Fatal(err)
-		}
-		if err := check.Files([]*ast.File{f}); err != nil {
-			t.Error(err)
-		}
-	}
-
-	// check InitOrder is [x y]
-	var vars []string
-	for _, init := range info.InitOrder {
-		for _, v := range init.Lhs {
-			vars = append(vars, v.Name())
-		}
-	}
-	if got, want := fmt.Sprint(vars), "[x y]"; got != want {
-		t.Errorf("InitOrder == %s, want %s", got, want)
-	}
-}
-
-type testImporter map[string]*Package
-
-func (m testImporter) Import(path string) (*Package, error) {
-	if pkg := m[path]; pkg != nil {
-		return pkg, nil
-	}
-	return nil, fmt.Errorf("package %q not found", path)
-}
-
-func TestSelection(t *testing.T) {
-	selections := make(map[*ast.SelectorExpr]*Selection)
-
-	fset := token.NewFileSet()
-	imports := make(testImporter)
-	conf := Config{Importer: imports}
-	makePkg := func(path, src string) {
-		f, err := parser.ParseFile(fset, path+".go", src, 0)
-		if err != nil {
-			t.Fatal(err)
-		}
-		pkg, err := conf.Check(path, fset, []*ast.File{f}, &Info{Selections: selections})
-		if err != nil {
-			t.Fatal(err)
-		}
-		imports[path] = pkg
-	}
-
-	const libSrc = `
-package lib
-type T float64
-const C T = 3
-var V T
-func F() {}
-func (T) M() {}
-`
-	const mainSrc = `
-package main
-import "lib"
-
-type A struct {
-	*B
-	C
-}
-
-type B struct {
-	b int
-}
-
-func (B) f(int)
-
-type C struct {
-	c int
-}
-
-func (C) g()
-func (*C) h()
-
-func main() {
-	// qualified identifiers
-	var _ lib.T
-        _ = lib.C
-        _ = lib.F
-        _ = lib.V
-	_ = lib.T.M
-
-	// fields
-	_ = A{}.B
-	_ = new(A).B
-
-	_ = A{}.C
-	_ = new(A).C
-
-	_ = A{}.b
-	_ = new(A).b
-
-	_ = A{}.c
-	_ = new(A).c
-
-	// methods
-        _ = A{}.f
-        _ = new(A).f
-        _ = A{}.g
-        _ = new(A).g
-        _ = new(A).h
-
-        _ = B{}.f
-        _ = new(B).f
-
-        _ = C{}.g
-        _ = new(C).g
-        _ = new(C).h
-
-	// method expressions
-        _ = A.f
-        _ = (*A).f
-        _ = B.f
-        _ = (*B).f
-}`
-
-	wantOut := map[string][2]string{
-		"lib.T.M": {"method expr (lib.T) M(lib.T)", ".[0]"},
-
-		"A{}.B":    {"field (main.A) B *main.B", ".[0]"},
-		"new(A).B": {"field (*main.A) B *main.B", "->[0]"},
-		"A{}.C":    {"field (main.A) C main.C", ".[1]"},
-		"new(A).C": {"field (*main.A) C main.C", "->[1]"},
-		"A{}.b":    {"field (main.A) b int", "->[0 0]"},
-		"new(A).b": {"field (*main.A) b int", "->[0 0]"},
-		"A{}.c":    {"field (main.A) c int", ".[1 0]"},
-		"new(A).c": {"field (*main.A) c int", "->[1 0]"},
-
-		"A{}.f":    {"method (main.A) f(int)", "->[0 0]"},
-		"new(A).f": {"method (*main.A) f(int)", "->[0 0]"},
-		"A{}.g":    {"method (main.A) g()", ".[1 0]"},
-		"new(A).g": {"method (*main.A) g()", "->[1 0]"},
-		"new(A).h": {"method (*main.A) h()", "->[1 1]"}, // TODO(gri) should this report .[1 1] ?
-		"B{}.f":    {"method (main.B) f(int)", ".[0]"},
-		"new(B).f": {"method (*main.B) f(int)", "->[0]"},
-		"C{}.g":    {"method (main.C) g()", ".[0]"},
-		"new(C).g": {"method (*main.C) g()", "->[0]"},
-		"new(C).h": {"method (*main.C) h()", "->[1]"}, // TODO(gri) should this report .[1] ?
-
-		"A.f":    {"method expr (main.A) f(main.A, int)", "->[0 0]"},
-		"(*A).f": {"method expr (*main.A) f(*main.A, int)", "->[0 0]"},
-		"B.f":    {"method expr (main.B) f(main.B, int)", ".[0]"},
-		"(*B).f": {"method expr (*main.B) f(*main.B, int)", "->[0]"},
-	}
-
-	makePkg("lib", libSrc)
-	makePkg("main", mainSrc)
-
-	for e, sel := range selections {
-		sel.String() // assertion: must not panic
-
-		start := fset.Position(e.Pos()).Offset
-		end := fset.Position(e.End()).Offset
-		syntax := mainSrc[start:end] // (all SelectorExprs are in main, not lib)
-
-		direct := "."
-		if sel.Indirect() {
-			direct = "->"
-		}
-		got := [2]string{
-			sel.String(),
-			fmt.Sprintf("%s%v", direct, sel.Index()),
-		}
-		want := wantOut[syntax]
-		if want != got {
-			t.Errorf("%s: got %q; want %q", syntax, got, want)
-		}
-		delete(wantOut, syntax)
-
-		// We must explicitly assert properties of the
-		// Signature's receiver since it doesn't participate
-		// in Identical() or String().
-		sig, _ := sel.Type().(*Signature)
-		if sel.Kind() == MethodVal {
-			got := sig.Recv().Type()
-			want := sel.Recv()
-			if !Identical(got, want) {
-				t.Errorf("%s: Recv() = %s, want %s", syntax, got, want)
-			}
-		} else if sig != nil && sig.Recv() != nil {
-			t.Errorf("%s: signature has receiver %s", sig, sig.Recv().Type())
-		}
-	}
-	// Assert that all wantOut entries were used exactly once.
-	for syntax := range wantOut {
-		t.Errorf("no ast.Selection found with syntax %q", syntax)
-	}
-}
-
-func TestIssue8518(t *testing.T) {
-	fset := token.NewFileSet()
-	imports := make(testImporter)
-	conf := Config{
-		Error:    func(err error) { t.Log(err) }, // don't exit after first error
-		Importer: imports,
-	}
-	makePkg := func(path, src string) {
-		f, err := parser.ParseFile(fset, path, src, 0)
-		if err != nil {
-			t.Fatal(err)
-		}
-		pkg, _ := conf.Check(path, fset, []*ast.File{f}, nil) // errors logged via conf.Error
-		imports[path] = pkg
-	}
-
-	const libSrc = `
-package a
-import "missing"
-const C1 = foo
-const C2 = missing.C
-`
-
-	const mainSrc = `
-package main
-import "a"
-var _ = a.C1
-var _ = a.C2
-`
-
-	makePkg("a", libSrc)
-	makePkg("main", mainSrc) // don't crash when type-checking this package
-}
-
-func TestLookupFieldOrMethod(t *testing.T) {
-	// Test cases assume a lookup of the form a.f or x.f, where a stands for an
-	// addressable value, and x for a non-addressable value (even though a variable
-	// for ease of test case writing).
-	var tests = []struct {
-		src      string
-		found    bool
-		index    []int
-		indirect bool
-	}{
-		// field lookups
-		{"var x T; type T struct{}", false, nil, false},
-		{"var x T; type T struct{ f int }", true, []int{0}, false},
-		{"var x T; type T struct{ a, b, f, c int }", true, []int{2}, false},
-
-		// method lookups
-		{"var a T; type T struct{}; func (T) f() {}", true, []int{0}, false},
-		{"var a *T; type T struct{}; func (T) f() {}", true, []int{0}, true},
-		{"var a T; type T struct{}; func (*T) f() {}", true, []int{0}, false},
-		{"var a *T; type T struct{}; func (*T) f() {}", true, []int{0}, true}, // TODO(gri) should this report indirect = false?
-
-		// collisions
-		{"type ( E1 struct{ f int }; E2 struct{ f int }; x struct{ E1; *E2 })", false, []int{1, 0}, false},
-		{"type ( E1 struct{ f int }; E2 struct{}; x struct{ E1; *E2 }); func (E2) f() {}", false, []int{1, 0}, false},
-
-		// outside methodset
-		// (*T).f method exists, but value of type T is not addressable
-		{"var x T; type T struct{}; func (*T) f() {}", false, nil, true},
-	}
-
-	for _, test := range tests {
-		pkg, err := pkgFor("test", "package p;"+test.src, nil)
-		if err != nil {
-			t.Errorf("%s: incorrect test case: %s", test.src, err)
-			continue
-		}
-
-		obj := pkg.Scope().Lookup("a")
-		if obj == nil {
-			if obj = pkg.Scope().Lookup("x"); obj == nil {
-				t.Errorf("%s: incorrect test case - no object a or x", test.src)
-				continue
-			}
-		}
-
-		f, index, indirect := LookupFieldOrMethod(obj.Type(), obj.Name() == "a", pkg, "f")
-		if (f != nil) != test.found {
-			if f == nil {
-				t.Errorf("%s: got no object; want one", test.src)
-			} else {
-				t.Errorf("%s: got object = %v; want none", test.src, f)
-			}
-		}
-		if !sameSlice(index, test.index) {
-			t.Errorf("%s: got index = %v; want %v", test.src, index, test.index)
-		}
-		if indirect != test.indirect {
-			t.Errorf("%s: got indirect = %v; want %v", test.src, indirect, test.indirect)
-		}
-	}
-}
-
-func sameSlice(a, b []int) bool {
-	if len(a) != len(b) {
-		return false
-	}
-	for i, x := range a {
-		if x != b[i] {
-			return false
-		}
-	}
-	return true
-}
-
-// TestScopeLookupParent ensures that (*Scope).LookupParent returns
-// the correct result at various positions with the source.
-func TestScopeLookupParent(t *testing.T) {
-	fset := token.NewFileSet()
-	imports := make(testImporter)
-	conf := Config{Importer: imports}
-	mustParse := func(src string) *ast.File {
-		f, err := parser.ParseFile(fset, "dummy.go", src, parser.ParseComments)
-		if err != nil {
-			t.Fatal(err)
-		}
-		return f
-	}
-	var info Info
-	makePkg := func(path string, files ...*ast.File) {
-		imports[path], _ = conf.Check(path, fset, files, &info)
-	}
-
-	makePkg("lib", mustParse("package lib; var X int"))
-	// Each /*name=kind:line*/ comment makes the test look up the
-	// name at that point and checks that it resolves to a decl of
-	// the specified kind and line number.  "undef" means undefined.
-	mainSrc := `
-package main
-import "lib"
-var Y = lib.X
-func f() {
-	print(Y) /*Y=var:4*/
-	z /*z=undef*/ := /*z=undef*/ 1 /*z=var:7*/
-	print(z)
-	/*f=func:5*/ /*lib=pkgname:3*/
-	type /*T=undef*/ T /*T=typename:10*/ *T
-}
-`
-	info.Uses = make(map[*ast.Ident]Object)
-	f := mustParse(mainSrc)
-	makePkg("main", f)
-	mainScope := imports["main"].Scope()
-	rx := regexp.MustCompile(`^/\*(\w*)=([\w:]*)\*/$`)
-	for _, group := range f.Comments {
-		for _, comment := range group.List {
-			// Parse the assertion in the comment.
-			m := rx.FindStringSubmatch(comment.Text)
-			if m == nil {
-				t.Errorf("%s: bad comment: %s",
-					fset.Position(comment.Pos()), comment.Text)
-				continue
-			}
-			name, want := m[1], m[2]
-
-			// Look up the name in the innermost enclosing scope.
-			inner := mainScope.Innermost(comment.Pos())
-			if inner == nil {
-				t.Errorf("%s: at %s: can't find innermost scope",
-					fset.Position(comment.Pos()), comment.Text)
-				continue
-			}
-			got := "undef"
-			if _, obj := inner.LookupParent(name, comment.Pos()); obj != nil {
-				kind := strings.ToLower(strings.TrimPrefix(reflect.TypeOf(obj).String(), "*types."))
-				got = fmt.Sprintf("%s:%d", kind, fset.Position(obj.Pos()).Line)
-			}
-			if got != want {
-				t.Errorf("%s: at %s: %s resolved to %s, want %s",
-					fset.Position(comment.Pos()), comment.Text, name, got, want)
-			}
-		}
-	}
-
-	// Check that for each referring identifier,
-	// a lookup of its name on the innermost
-	// enclosing scope returns the correct object.
-
-	for id, wantObj := range info.Uses {
-		inner := mainScope.Innermost(id.Pos())
-		if inner == nil {
-			t.Errorf("%s: can't find innermost scope enclosing %q",
-				fset.Position(id.Pos()), id.Name)
-			continue
-		}
-
-		// Exclude selectors and qualified identifiers---lexical
-		// refs only.  (Ideally, we'd see if the AST parent is a
-		// SelectorExpr, but that requires PathEnclosingInterval
-		// from golang.org/x/tools/go/ast/astutil.)
-		if id.Name == "X" {
-			continue
-		}
-
-		_, gotObj := inner.LookupParent(id.Name, id.Pos())
-		if gotObj != wantObj {
-			t.Errorf("%s: got %v, want %v",
-				fset.Position(id.Pos()), gotObj, wantObj)
-			continue
-		}
-	}
-}
diff --git a/src/go/types/assignments.go b/src/go/types/assignments.go
deleted file mode 100644
index e88de56..0000000
--- a/src/go/types/assignments.go
+++ /dev/null
@@ -1,328 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements initialization and assignment checks.
-
-package types
-
-import (
-	"go/ast"
-	"go/token"
-)
-
-// assignment reports whether x can be assigned to a variable of type T,
-// if necessary by attempting to convert untyped values to the appropriate
-// type. If x.mode == invalid upon return, then assignment has already
-// issued an error message and the caller doesn't have to report another.
-// Use T == nil to indicate assignment to an untyped blank identifier.
-//
-// TODO(gri) Should find a better way to handle in-band errors.
-//
-func (check *Checker) assignment(x *operand, T Type) bool {
-	switch x.mode {
-	case invalid:
-		return true // error reported before
-	case constant_, variable, mapindex, value, commaok:
-		// ok
-	default:
-		unreachable()
-	}
-
-	// x must be a single value
-	// (tuple types are never named - no need for underlying type)
-	if t, _ := x.typ.(*Tuple); t != nil {
-		assert(t.Len() > 1)
-		check.errorf(x.pos(), "%d-valued expression %s used as single value", t.Len(), x)
-		x.mode = invalid
-		return false
-	}
-
-	if isUntyped(x.typ) {
-		target := T
-		// spec: "If an untyped constant is assigned to a variable of interface
-		// type or the blank identifier, the constant is first converted to type
-		// bool, rune, int, float64, complex128 or string respectively, depending
-		// on whether the value is a boolean, rune, integer, floating-point, complex,
-		// or string constant."
-		if T == nil || IsInterface(T) {
-			if T == nil && x.typ == Typ[UntypedNil] {
-				check.errorf(x.pos(), "use of untyped nil")
-				x.mode = invalid
-				return false
-			}
-			target = defaultType(x.typ)
-		}
-		check.convertUntyped(x, target)
-		if x.mode == invalid {
-			return false
-		}
-	}
-
-	// spec: "If a left-hand side is the blank identifier, any typed or
-	// non-constant value except for the predeclared identifier nil may
-	// be assigned to it."
-	return T == nil || x.assignableTo(check.conf, T)
-}
-
-func (check *Checker) initConst(lhs *Const, x *operand) {
-	if x.mode == invalid || x.typ == Typ[Invalid] || lhs.typ == Typ[Invalid] {
-		if lhs.typ == nil {
-			lhs.typ = Typ[Invalid]
-		}
-		return
-	}
-
-	// rhs must be a constant
-	if x.mode != constant_ {
-		check.errorf(x.pos(), "%s is not constant", x)
-		if lhs.typ == nil {
-			lhs.typ = Typ[Invalid]
-		}
-		return
-	}
-	assert(isConstType(x.typ))
-
-	// If the lhs doesn't have a type yet, use the type of x.
-	if lhs.typ == nil {
-		lhs.typ = x.typ
-	}
-
-	if !check.assignment(x, lhs.typ) {
-		if x.mode != invalid {
-			check.errorf(x.pos(), "cannot define constant %s (type %s) as %s", lhs.Name(), lhs.typ, x)
-		}
-		return
-	}
-
-	lhs.val = x.val
-}
-
-// If result is set, lhs is a function result parameter and x is a return result.
-func (check *Checker) initVar(lhs *Var, x *operand, result bool) Type {
-	if x.mode == invalid || x.typ == Typ[Invalid] || lhs.typ == Typ[Invalid] {
-		if lhs.typ == nil {
-			lhs.typ = Typ[Invalid]
-		}
-		return nil
-	}
-
-	// If the lhs doesn't have a type yet, use the type of x.
-	if lhs.typ == nil {
-		typ := x.typ
-		if isUntyped(typ) {
-			// convert untyped types to default types
-			if typ == Typ[UntypedNil] {
-				check.errorf(x.pos(), "use of untyped nil")
-				lhs.typ = Typ[Invalid]
-				return nil
-			}
-			typ = defaultType(typ)
-		}
-		lhs.typ = typ
-	}
-
-	if !check.assignment(x, lhs.typ) {
-		if x.mode != invalid {
-			if result {
-				// don't refer to lhs.name because it may be an anonymous result parameter
-				check.errorf(x.pos(), "cannot return %s as value of type %s", x, lhs.typ)
-			} else {
-				check.errorf(x.pos(), "cannot initialize %s with %s", lhs, x)
-			}
-		}
-		return nil
-	}
-
-	return x.typ
-}
-
-func (check *Checker) assignVar(lhs ast.Expr, x *operand) Type {
-	if x.mode == invalid || x.typ == Typ[Invalid] {
-		return nil
-	}
-
-	// Determine if the lhs is a (possibly parenthesized) identifier.
-	ident, _ := unparen(lhs).(*ast.Ident)
-
-	// Don't evaluate lhs if it is the blank identifier.
-	if ident != nil && ident.Name == "_" {
-		check.recordDef(ident, nil)
-		if !check.assignment(x, nil) {
-			assert(x.mode == invalid)
-			x.typ = nil
-		}
-		return x.typ
-	}
-
-	// If the lhs is an identifier denoting a variable v, this assignment
-	// is not a 'use' of v. Remember current value of v.used and restore
-	// after evaluating the lhs via check.expr.
-	var v *Var
-	var v_used bool
-	if ident != nil {
-		if _, obj := check.scope.LookupParent(ident.Name, token.NoPos); obj != nil {
-			v, _ = obj.(*Var)
-			if v != nil {
-				v_used = v.used
-			}
-		}
-	}
-
-	var z operand
-	check.expr(&z, lhs)
-	if v != nil {
-		v.used = v_used // restore v.used
-	}
-
-	if z.mode == invalid || z.typ == Typ[Invalid] {
-		return nil
-	}
-
-	// spec: "Each left-hand side operand must be addressable, a map index
-	// expression, or the blank identifier. Operands may be parenthesized."
-	switch z.mode {
-	case invalid:
-		return nil
-	case variable, mapindex:
-		// ok
-	default:
-		check.errorf(z.pos(), "cannot assign to %s", &z)
-		return nil
-	}
-
-	if !check.assignment(x, z.typ) {
-		if x.mode != invalid {
-			check.errorf(x.pos(), "cannot assign %s to %s", x, &z)
-		}
-		return nil
-	}
-
-	return x.typ
-}
-
-// If returnPos is valid, initVars is called to type-check the assignment of
-// return expressions, and returnPos is the position of the return statement.
-func (check *Checker) initVars(lhs []*Var, rhs []ast.Expr, returnPos token.Pos) {
-	l := len(lhs)
-	get, r, commaOk := unpack(func(x *operand, i int) { check.expr(x, rhs[i]) }, len(rhs), l == 2 && !returnPos.IsValid())
-	if get == nil || l != r {
-		// invalidate lhs and use rhs
-		for _, obj := range lhs {
-			if obj.typ == nil {
-				obj.typ = Typ[Invalid]
-			}
-		}
-		if get == nil {
-			return // error reported by unpack
-		}
-		check.useGetter(get, r)
-		if returnPos.IsValid() {
-			check.errorf(returnPos, "wrong number of return values (want %d, got %d)", l, r)
-			return
-		}
-		check.errorf(rhs[0].Pos(), "assignment count mismatch (%d vs %d)", l, r)
-		return
-	}
-
-	var x operand
-	if commaOk {
-		var a [2]Type
-		for i := range a {
-			get(&x, i)
-			a[i] = check.initVar(lhs[i], &x, returnPos.IsValid())
-		}
-		check.recordCommaOkTypes(rhs[0], a)
-		return
-	}
-
-	for i, lhs := range lhs {
-		get(&x, i)
-		check.initVar(lhs, &x, returnPos.IsValid())
-	}
-}
-
-func (check *Checker) assignVars(lhs, rhs []ast.Expr) {
-	l := len(lhs)
-	get, r, commaOk := unpack(func(x *operand, i int) { check.expr(x, rhs[i]) }, len(rhs), l == 2)
-	if get == nil {
-		return // error reported by unpack
-	}
-	if l != r {
-		check.useGetter(get, r)
-		check.errorf(rhs[0].Pos(), "assignment count mismatch (%d vs %d)", l, r)
-		return
-	}
-
-	var x operand
-	if commaOk {
-		var a [2]Type
-		for i := range a {
-			get(&x, i)
-			a[i] = check.assignVar(lhs[i], &x)
-		}
-		check.recordCommaOkTypes(rhs[0], a)
-		return
-	}
-
-	for i, lhs := range lhs {
-		get(&x, i)
-		check.assignVar(lhs, &x)
-	}
-}
-
-func (check *Checker) shortVarDecl(pos token.Pos, lhs, rhs []ast.Expr) {
-	scope := check.scope
-
-	// collect lhs variables
-	var newVars []*Var
-	var lhsVars = make([]*Var, len(lhs))
-	for i, lhs := range lhs {
-		var obj *Var
-		if ident, _ := lhs.(*ast.Ident); ident != nil {
-			// Use the correct obj if the ident is redeclared. The
-			// variable's scope starts after the declaration; so we
-			// must use Scope.Lookup here and call Scope.Insert
-			// (via check.declare) later.
-			name := ident.Name
-			if alt := scope.Lookup(name); alt != nil {
-				// redeclared object must be a variable
-				if alt, _ := alt.(*Var); alt != nil {
-					obj = alt
-				} else {
-					check.errorf(lhs.Pos(), "cannot assign to %s", lhs)
-				}
-				check.recordUse(ident, alt)
-			} else {
-				// declare new variable, possibly a blank (_) variable
-				obj = NewVar(ident.Pos(), check.pkg, name, nil)
-				if name != "_" {
-					newVars = append(newVars, obj)
-				}
-				check.recordDef(ident, obj)
-			}
-		} else {
-			check.errorf(lhs.Pos(), "cannot declare %s", lhs)
-		}
-		if obj == nil {
-			obj = NewVar(lhs.Pos(), check.pkg, "_", nil) // dummy variable
-		}
-		lhsVars[i] = obj
-	}
-
-	check.initVars(lhsVars, rhs, token.NoPos)
-
-	// declare new variables
-	if len(newVars) > 0 {
-		// spec: "The scope of a constant or variable identifier declared inside
-		// a function begins at the end of the ConstSpec or VarSpec (ShortVarDecl
-		// for short variable declarations) and ends at the end of the innermost
-		// containing block."
-		scopePos := rhs[len(rhs)-1].End()
-		for _, obj := range newVars {
-			check.declare(scope, nil, obj, scopePos) // recordObject already called
-		}
-	} else {
-		check.softErrorf(pos, "no new variables on left side of :=")
-	}
-}
diff --git a/src/go/types/builtins.go b/src/go/types/builtins.go
deleted file mode 100644
index 4729591..0000000
--- a/src/go/types/builtins.go
+++ /dev/null
@@ -1,627 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements typechecking of builtin function calls.
-
-package types
-
-import (
-	"go/ast"
-	"go/constant"
-	"go/token"
-)
-
-// builtin type-checks a call to the built-in specified by id and
-// returns true if the call is valid, with *x holding the result;
-// but x.expr is not set. If the call is invalid, the result is
-// false, and *x is undefined.
-//
-func (check *Checker) builtin(x *operand, call *ast.CallExpr, id builtinId) (_ bool) {
-	// append is the only built-in that permits the use of ... for the last argument
-	bin := predeclaredFuncs[id]
-	if call.Ellipsis.IsValid() && id != _Append {
-		check.invalidOp(call.Ellipsis, "invalid use of ... with built-in %s", bin.name)
-		check.use(call.Args...)
-		return
-	}
-
-	// For len(x) and cap(x) we need to know if x contains any function calls or
-	// receive operations. Save/restore current setting and set hasCallOrRecv to
-	// false for the evaluation of x so that we can check it afterwards.
-	// Note: We must do this _before_ calling unpack because unpack evaluates the
-	//       first argument before we even call arg(x, 0)!
-	if id == _Len || id == _Cap {
-		defer func(b bool) {
-			check.hasCallOrRecv = b
-		}(check.hasCallOrRecv)
-		check.hasCallOrRecv = false
-	}
-
-	// determine actual arguments
-	var arg getter
-	nargs := len(call.Args)
-	switch id {
-	default:
-		// make argument getter
-		arg, nargs, _ = unpack(func(x *operand, i int) { check.expr(x, call.Args[i]) }, nargs, false)
-		if arg == nil {
-			return
-		}
-		// evaluate first argument, if present
-		if nargs > 0 {
-			arg(x, 0)
-			if x.mode == invalid {
-				return
-			}
-		}
-	case _Make, _New, _Offsetof, _Trace:
-		// arguments require special handling
-	}
-
-	// check argument count
-	{
-		msg := ""
-		if nargs < bin.nargs {
-			msg = "not enough"
-		} else if !bin.variadic && nargs > bin.nargs {
-			msg = "too many"
-		}
-		if msg != "" {
-			check.invalidOp(call.Rparen, "%s arguments for %s (expected %d, found %d)", msg, call, bin.nargs, nargs)
-			return
-		}
-	}
-
-	switch id {
-	case _Append:
-		// append(s S, x ...T) S, where T is the element type of S
-		// spec: "The variadic function append appends zero or more values x to s of type
-		// S, which must be a slice type, and returns the resulting slice, also of type S.
-		// The values x are passed to a parameter of type ...T where T is the element type
-		// of S and the respective parameter passing rules apply."
-		S := x.typ
-		var T Type
-		if s, _ := S.Underlying().(*Slice); s != nil {
-			T = s.elem
-		} else {
-			check.invalidArg(x.pos(), "%s is not a slice", x)
-			return
-		}
-
-		// remember arguments that have been evaluated already
-		alist := []operand{*x}
-
-		// spec: "As a special case, append also accepts a first argument assignable
-		// to type []byte with a second argument of string type followed by ... .
-		// This form appends the bytes of the string.
-		if nargs == 2 && call.Ellipsis.IsValid() && x.assignableTo(check.conf, NewSlice(universeByte)) {
-			arg(x, 1)
-			if x.mode == invalid {
-				return
-			}
-			if isString(x.typ) {
-				if check.Types != nil {
-					sig := makeSig(S, S, x.typ)
-					sig.variadic = true
-					check.recordBuiltinType(call.Fun, sig)
-				}
-				x.mode = value
-				x.typ = S
-				break
-			}
-			alist = append(alist, *x)
-			// fallthrough
-		}
-
-		// check general case by creating custom signature
-		sig := makeSig(S, S, NewSlice(T)) // []T required for variadic signature
-		sig.variadic = true
-		check.arguments(x, call, sig, func(x *operand, i int) {
-			// only evaluate arguments that have not been evaluated before
-			if i < len(alist) {
-				*x = alist[i]
-				return
-			}
-			arg(x, i)
-		}, nargs)
-		// ok to continue even if check.arguments reported errors
-
-		x.mode = value
-		x.typ = S
-		if check.Types != nil {
-			check.recordBuiltinType(call.Fun, sig)
-		}
-
-	case _Cap, _Len:
-		// cap(x)
-		// len(x)
-		mode := invalid
-		var typ Type
-		var val constant.Value
-		switch typ = implicitArrayDeref(x.typ.Underlying()); t := typ.(type) {
-		case *Basic:
-			if isString(t) && id == _Len {
-				if x.mode == constant_ {
-					mode = constant_
-					val = constant.MakeInt64(int64(len(constant.StringVal(x.val))))
-				} else {
-					mode = value
-				}
-			}
-
-		case *Array:
-			mode = value
-			// spec: "The expressions len(s) and cap(s) are constants
-			// if the type of s is an array or pointer to an array and
-			// the expression s does not contain channel receives or
-			// function calls; in this case s is not evaluated."
-			if !check.hasCallOrRecv {
-				mode = constant_
-				val = constant.MakeInt64(t.len)
-			}
-
-		case *Slice, *Chan:
-			mode = value
-
-		case *Map:
-			if id == _Len {
-				mode = value
-			}
-		}
-
-		if mode == invalid {
-			check.invalidArg(x.pos(), "%s for %s", x, bin.name)
-			return
-		}
-
-		x.mode = mode
-		x.typ = Typ[Int]
-		x.val = val
-		if check.Types != nil && mode != constant_ {
-			check.recordBuiltinType(call.Fun, makeSig(x.typ, typ))
-		}
-
-	case _Close:
-		// close(c)
-		c, _ := x.typ.Underlying().(*Chan)
-		if c == nil {
-			check.invalidArg(x.pos(), "%s is not a channel", x)
-			return
-		}
-		if c.dir == RecvOnly {
-			check.invalidArg(x.pos(), "%s must not be a receive-only channel", x)
-			return
-		}
-
-		x.mode = novalue
-		if check.Types != nil {
-			check.recordBuiltinType(call.Fun, makeSig(nil, c))
-		}
-
-	case _Complex:
-		// complex(x, y realT) complexT
-		if !check.complexArg(x) {
-			return
-		}
-
-		var y operand
-		arg(&y, 1)
-		if y.mode == invalid {
-			return
-		}
-		if !check.complexArg(&y) {
-			return
-		}
-
-		check.convertUntyped(x, y.typ)
-		if x.mode == invalid {
-			return
-		}
-		check.convertUntyped(&y, x.typ)
-		if y.mode == invalid {
-			return
-		}
-
-		if !Identical(x.typ, y.typ) {
-			check.invalidArg(x.pos(), "mismatched types %s and %s", x.typ, y.typ)
-			return
-		}
-
-		if x.mode == constant_ && y.mode == constant_ {
-			x.val = constant.BinaryOp(x.val, token.ADD, constant.MakeImag(y.val))
-		} else {
-			x.mode = value
-		}
-
-		realT := x.typ
-		complexT := Typ[Invalid]
-		switch realT.Underlying().(*Basic).kind {
-		case Float32:
-			complexT = Typ[Complex64]
-		case Float64:
-			complexT = Typ[Complex128]
-		case UntypedInt, UntypedRune, UntypedFloat:
-			if x.mode == constant_ {
-				realT = defaultType(realT).(*Basic)
-				complexT = Typ[UntypedComplex]
-			} else {
-				// untyped but not constant; probably because one
-				// operand is a non-constant shift of untyped lhs
-				realT = Typ[Float64]
-				complexT = Typ[Complex128]
-			}
-		default:
-			check.invalidArg(x.pos(), "float32 or float64 arguments expected")
-			return
-		}
-
-		x.typ = complexT
-		if check.Types != nil && x.mode != constant_ {
-			check.recordBuiltinType(call.Fun, makeSig(complexT, realT, realT))
-		}
-
-		if x.mode != constant_ {
-			// The arguments have now their final types, which at run-
-			// time will be materialized. Update the expression trees.
-			// If the current types are untyped, the materialized type
-			// is the respective default type.
-			// (If the result is constant, the arguments are never
-			// materialized and there is nothing to do.)
-			check.updateExprType(x.expr, realT, true)
-			check.updateExprType(y.expr, realT, true)
-		}
-
-	case _Copy:
-		// copy(x, y []T) int
-		var dst Type
-		if t, _ := x.typ.Underlying().(*Slice); t != nil {
-			dst = t.elem
-		}
-
-		var y operand
-		arg(&y, 1)
-		if y.mode == invalid {
-			return
-		}
-		var src Type
-		switch t := y.typ.Underlying().(type) {
-		case *Basic:
-			if isString(y.typ) {
-				src = universeByte
-			}
-		case *Slice:
-			src = t.elem
-		}
-
-		if dst == nil || src == nil {
-			check.invalidArg(x.pos(), "copy expects slice arguments; found %s and %s", x, &y)
-			return
-		}
-
-		if !Identical(dst, src) {
-			check.invalidArg(x.pos(), "arguments to copy %s and %s have different element types %s and %s", x, &y, dst, src)
-			return
-		}
-
-		if check.Types != nil {
-			check.recordBuiltinType(call.Fun, makeSig(Typ[Int], x.typ, y.typ))
-		}
-		x.mode = value
-		x.typ = Typ[Int]
-
-	case _Delete:
-		// delete(m, k)
-		m, _ := x.typ.Underlying().(*Map)
-		if m == nil {
-			check.invalidArg(x.pos(), "%s is not a map", x)
-			return
-		}
-		arg(x, 1) // k
-		if x.mode == invalid {
-			return
-		}
-
-		if !x.assignableTo(check.conf, m.key) {
-			check.invalidArg(x.pos(), "%s is not assignable to %s", x, m.key)
-			return
-		}
-
-		x.mode = novalue
-		if check.Types != nil {
-			check.recordBuiltinType(call.Fun, makeSig(nil, m, m.key))
-		}
-
-	case _Imag, _Real:
-		// imag(complexT) realT
-		// real(complexT) realT
-		if !isComplex(x.typ) {
-			check.invalidArg(x.pos(), "%s must be a complex number", x)
-			return
-		}
-		if x.mode == constant_ {
-			if id == _Real {
-				x.val = constant.Real(x.val)
-			} else {
-				x.val = constant.Imag(x.val)
-			}
-		} else {
-			x.mode = value
-		}
-		var k BasicKind
-		switch x.typ.Underlying().(*Basic).kind {
-		case Complex64:
-			k = Float32
-		case Complex128:
-			k = Float64
-		case UntypedComplex:
-			k = UntypedFloat
-		default:
-			unreachable()
-		}
-
-		if check.Types != nil && x.mode != constant_ {
-			check.recordBuiltinType(call.Fun, makeSig(Typ[k], x.typ))
-		}
-		x.typ = Typ[k]
-
-	case _Make:
-		// make(T, n)
-		// make(T, n, m)
-		// (no argument evaluated yet)
-		arg0 := call.Args[0]
-		T := check.typ(arg0)
-		if T == Typ[Invalid] {
-			return
-		}
-
-		var min int // minimum number of arguments
-		switch T.Underlying().(type) {
-		case *Slice:
-			min = 2
-		case *Map, *Chan:
-			min = 1
-		default:
-			check.invalidArg(arg0.Pos(), "cannot make %s; type must be slice, map, or channel", arg0)
-			return
-		}
-		if nargs < min || min+1 < nargs {
-			check.errorf(call.Pos(), "%s expects %d or %d arguments; found %d", call, min, min+1, nargs)
-			return
-		}
-		var sizes []int64 // constant integer arguments, if any
-		for _, arg := range call.Args[1:] {
-			if s, ok := check.index(arg, -1); ok && s >= 0 {
-				sizes = append(sizes, s)
-			}
-		}
-		if len(sizes) == 2 && sizes[0] > sizes[1] {
-			check.invalidArg(call.Args[1].Pos(), "length and capacity swapped")
-			// safe to continue
-		}
-		x.mode = value
-		x.typ = T
-		if check.Types != nil {
-			params := [...]Type{T, Typ[Int], Typ[Int]}
-			check.recordBuiltinType(call.Fun, makeSig(x.typ, params[:1+len(sizes)]...))
-		}
-
-	case _New:
-		// new(T)
-		// (no argument evaluated yet)
-		T := check.typ(call.Args[0])
-		if T == Typ[Invalid] {
-			return
-		}
-
-		x.mode = value
-		x.typ = &Pointer{base: T}
-		if check.Types != nil {
-			check.recordBuiltinType(call.Fun, makeSig(x.typ, T))
-		}
-
-	case _Panic:
-		// panic(x)
-		T := new(Interface)
-		if !check.assignment(x, T) {
-			assert(x.mode == invalid)
-			return
-		}
-
-		x.mode = novalue
-		if check.Types != nil {
-			check.recordBuiltinType(call.Fun, makeSig(nil, T))
-		}
-
-	case _Print, _Println:
-		// print(x, y, ...)
-		// println(x, y, ...)
-		var params []Type
-		if nargs > 0 {
-			params = make([]Type, nargs)
-			for i := 0; i < nargs; i++ {
-				if i > 0 {
-					arg(x, i) // first argument already evaluated
-				}
-				if !check.assignment(x, nil) {
-					assert(x.mode == invalid)
-					return
-				}
-				params[i] = x.typ
-			}
-		}
-
-		x.mode = novalue
-		if check.Types != nil {
-			check.recordBuiltinType(call.Fun, makeSig(nil, params...))
-		}
-
-	case _Recover:
-		// recover() interface{}
-		x.mode = value
-		x.typ = new(Interface)
-		if check.Types != nil {
-			check.recordBuiltinType(call.Fun, makeSig(x.typ))
-		}
-
-	case _Alignof:
-		// unsafe.Alignof(x T) uintptr
-		if !check.assignment(x, nil) {
-			assert(x.mode == invalid)
-			return
-		}
-
-		x.mode = constant_
-		x.val = constant.MakeInt64(check.conf.alignof(x.typ))
-		x.typ = Typ[Uintptr]
-		// result is constant - no need to record signature
-
-	case _Offsetof:
-		// unsafe.Offsetof(x T) uintptr, where x must be a selector
-		// (no argument evaluated yet)
-		arg0 := call.Args[0]
-		selx, _ := unparen(arg0).(*ast.SelectorExpr)
-		if selx == nil {
-			check.invalidArg(arg0.Pos(), "%s is not a selector expression", arg0)
-			check.use(arg0)
-			return
-		}
-
-		check.expr(x, selx.X)
-		if x.mode == invalid {
-			return
-		}
-
-		base := derefStructPtr(x.typ)
-		sel := selx.Sel.Name
-		obj, index, indirect := LookupFieldOrMethod(base, false, check.pkg, sel)
-		switch obj.(type) {
-		case nil:
-			check.invalidArg(x.pos(), "%s has no single field %s", base, sel)
-			return
-		case *Func:
-			// TODO(gri) Using derefStructPtr may result in methods being found
-			// that don't actually exist. An error either way, but the error
-			// message is confusing. See: https://play.golang.org/p/al75v23kUy ,
-			// but go/types reports: "invalid argument: x.m is a method value".
-			check.invalidArg(arg0.Pos(), "%s is a method value", arg0)
-			return
-		}
-		if indirect {
-			check.invalidArg(x.pos(), "field %s is embedded via a pointer in %s", sel, base)
-			return
-		}
-
-		// TODO(gri) Should we pass x.typ instead of base (and indirect report if derefStructPtr indirected)?
-		check.recordSelection(selx, FieldVal, base, obj, index, false)
-
-		offs := check.conf.offsetof(base, index)
-		x.mode = constant_
-		x.val = constant.MakeInt64(offs)
-		x.typ = Typ[Uintptr]
-		// result is constant - no need to record signature
-
-	case _Sizeof:
-		// unsafe.Sizeof(x T) uintptr
-		if !check.assignment(x, nil) {
-			assert(x.mode == invalid)
-			return
-		}
-
-		x.mode = constant_
-		x.val = constant.MakeInt64(check.conf.sizeof(x.typ))
-		x.typ = Typ[Uintptr]
-		// result is constant - no need to record signature
-
-	case _Assert:
-		// assert(pred) causes a typechecker error if pred is false.
-		// The result of assert is the value of pred if there is no error.
-		// Note: assert is only available in self-test mode.
-		if x.mode != constant_ || !isBoolean(x.typ) {
-			check.invalidArg(x.pos(), "%s is not a boolean constant", x)
-			return
-		}
-		if x.val.Kind() != constant.Bool {
-			check.errorf(x.pos(), "internal error: value of %s should be a boolean constant", x)
-			return
-		}
-		if !constant.BoolVal(x.val) {
-			check.errorf(call.Pos(), "%s failed", call)
-			// compile-time assertion failure - safe to continue
-		}
-		// result is constant - no need to record signature
-
-	case _Trace:
-		// trace(x, y, z, ...) dumps the positions, expressions, and
-		// values of its arguments. The result of trace is the value
-		// of the first argument.
-		// Note: trace is only available in self-test mode.
-		// (no argument evaluated yet)
-		if nargs == 0 {
-			check.dump("%s: trace() without arguments", call.Pos())
-			x.mode = novalue
-			break
-		}
-		var t operand
-		x1 := x
-		for _, arg := range call.Args {
-			check.rawExpr(x1, arg, nil) // permit trace for types, e.g.: new(trace(T))
-			check.dump("%s: %s", x1.pos(), x1)
-			x1 = &t // use incoming x only for first argument
-		}
-		// trace is only available in test mode - no need to record signature
-
-	default:
-		unreachable()
-	}
-
-	return true
-}
-
-// makeSig makes a signature for the given argument and result types.
-// Default types are used for untyped arguments, and res may be nil.
-func makeSig(res Type, args ...Type) *Signature {
-	list := make([]*Var, len(args))
-	for i, param := range args {
-		list[i] = NewVar(token.NoPos, nil, "", defaultType(param))
-	}
-	params := NewTuple(list...)
-	var result *Tuple
-	if res != nil {
-		assert(!isUntyped(res))
-		result = NewTuple(NewVar(token.NoPos, nil, "", res))
-	}
-	return &Signature{params: params, results: result}
-}
-
-// implicitArrayDeref returns A if typ is of the form *A and A is an array;
-// otherwise it returns typ.
-//
-func implicitArrayDeref(typ Type) Type {
-	if p, ok := typ.(*Pointer); ok {
-		if a, ok := p.base.Underlying().(*Array); ok {
-			return a
-		}
-	}
-	return typ
-}
-
-// unparen returns e with any enclosing parentheses stripped.
-func unparen(e ast.Expr) ast.Expr {
-	for {
-		p, ok := e.(*ast.ParenExpr)
-		if !ok {
-			return e
-		}
-		e = p.X
-	}
-}
-
-func (check *Checker) complexArg(x *operand) bool {
-	t, _ := x.typ.Underlying().(*Basic)
-	if t != nil && (t.info&IsFloat != 0 || t.kind == UntypedInt || t.kind == UntypedRune) {
-		return true
-	}
-	check.invalidArg(x.pos(), "%s must be a float32, float64, or an untyped non-complex numeric constant", x)
-	return false
-}
diff --git a/src/go/types/builtins_test.go b/src/go/types/builtins_test.go
deleted file mode 100644
index 9835a48..0000000
--- a/src/go/types/builtins_test.go
+++ /dev/null
@@ -1,204 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package types_test
-
-import (
-	"fmt"
-	"go/ast"
-	"go/importer"
-	"go/parser"
-	"testing"
-
-	. "go/types"
-)
-
-var builtinCalls = []struct {
-	name, src, sig string
-}{
-	{"append", `var s []int; _ = append(s)`, `func([]int, ...int) []int`},
-	{"append", `var s []int; _ = append(s, 0)`, `func([]int, ...int) []int`},
-	{"append", `var s []int; _ = (append)(s, 0)`, `func([]int, ...int) []int`},
-	{"append", `var s []byte; _ = ((append))(s, 0)`, `func([]byte, ...byte) []byte`},
-	{"append", `var s []byte; _ = append(s, "foo"...)`, `func([]byte, string...) []byte`},
-	{"append", `type T []byte; var s T; var str string; _ = append(s, str...)`, `func(p.T, string...) p.T`},
-	{"append", `type T []byte; type U string; var s T; var str U; _ = append(s, str...)`, `func(p.T, p.U...) p.T`},
-
-	{"cap", `var s [10]int; _ = cap(s)`, `invalid type`},  // constant
-	{"cap", `var s [10]int; _ = cap(&s)`, `invalid type`}, // constant
-	{"cap", `var s []int64; _ = cap(s)`, `func([]int64) int`},
-	{"cap", `var c chan<-bool; _ = cap(c)`, `func(chan<- bool) int`},
-
-	{"len", `_ = len("foo")`, `invalid type`}, // constant
-	{"len", `var s string; _ = len(s)`, `func(string) int`},
-	{"len", `var s [10]int; _ = len(s)`, `invalid type`},  // constant
-	{"len", `var s [10]int; _ = len(&s)`, `invalid type`}, // constant
-	{"len", `var s []int64; _ = len(s)`, `func([]int64) int`},
-	{"len", `var c chan<-bool; _ = len(c)`, `func(chan<- bool) int`},
-	{"len", `var m map[string]float32; _ = len(m)`, `func(map[string]float32) int`},
-
-	{"close", `var c chan int; close(c)`, `func(chan int)`},
-	{"close", `var c chan<- chan string; close(c)`, `func(chan<- chan string)`},
-
-	{"complex", `_ = complex(1, 0)`, `invalid type`}, // constant
-	{"complex", `var re float32; _ = complex(re, 1.0)`, `func(float32, float32) complex64`},
-	{"complex", `var im float64; _ = complex(1, im)`, `func(float64, float64) complex128`},
-	{"complex", `type F32 float32; var re, im F32; _ = complex(re, im)`, `func(p.F32, p.F32) complex64`},
-	{"complex", `type F64 float64; var re, im F64; _ = complex(re, im)`, `func(p.F64, p.F64) complex128`},
-
-	{"copy", `var src, dst []byte; copy(dst, src)`, `func([]byte, []byte) int`},
-	{"copy", `type T [][]int; var src, dst T; _ = copy(dst, src)`, `func(p.T, p.T) int`},
-	{"copy", `var src string; var dst []byte; copy(dst, src)`, `func([]byte, string) int`},
-	{"copy", `type T string; type U []byte; var src T; var dst U; copy(dst, src)`, `func(p.U, p.T) int`},
-	{"copy", `var dst []byte; copy(dst, "hello")`, `func([]byte, string) int`},
-
-	{"delete", `var m map[string]bool; delete(m, "foo")`, `func(map[string]bool, string)`},
-	{"delete", `type (K string; V int); var m map[K]V; delete(m, "foo")`, `func(map[p.K]p.V, p.K)`},
-
-	{"imag", `_ = imag(1i)`, `invalid type`}, // constant
-	{"imag", `var c complex64; _ = imag(c)`, `func(complex64) float32`},
-	{"imag", `var c complex128; _ = imag(c)`, `func(complex128) float64`},
-	{"imag", `type C64 complex64; var c C64; _ = imag(c)`, `func(p.C64) float32`},
-	{"imag", `type C128 complex128; var c C128; _ = imag(c)`, `func(p.C128) float64`},
-
-	{"real", `_ = real(1i)`, `invalid type`}, // constant
-	{"real", `var c complex64; _ = real(c)`, `func(complex64) float32`},
-	{"real", `var c complex128; _ = real(c)`, `func(complex128) float64`},
-	{"real", `type C64 complex64; var c C64; _ = real(c)`, `func(p.C64) float32`},
-	{"real", `type C128 complex128; var c C128; _ = real(c)`, `func(p.C128) float64`},
-
-	{"make", `_ = make([]int, 10)`, `func([]int, int) []int`},
-	{"make", `type T []byte; _ = make(T, 10, 20)`, `func(p.T, int, int) p.T`},
-
-	{"new", `_ = new(int)`, `func(int) *int`},
-	{"new", `type T struct{}; _ = new(T)`, `func(p.T) *p.T`},
-
-	{"panic", `panic(0)`, `func(interface{})`},
-	{"panic", `panic("foo")`, `func(interface{})`},
-
-	{"print", `print()`, `func()`},
-	{"print", `print(0)`, `func(int)`},
-	{"print", `print(1, 2.0, "foo", true)`, `func(int, float64, string, bool)`},
-
-	{"println", `println()`, `func()`},
-	{"println", `println(0)`, `func(int)`},
-	{"println", `println(1, 2.0, "foo", true)`, `func(int, float64, string, bool)`},
-
-	{"recover", `recover()`, `func() interface{}`},
-	{"recover", `_ = recover()`, `func() interface{}`},
-
-	{"Alignof", `_ = unsafe.Alignof(0)`, `invalid type`},                 // constant
-	{"Alignof", `var x struct{}; _ = unsafe.Alignof(x)`, `invalid type`}, // constant
-
-	{"Offsetof", `var x struct{f bool}; _ = unsafe.Offsetof(x.f)`, `invalid type`},           // constant
-	{"Offsetof", `var x struct{_ int; f bool}; _ = unsafe.Offsetof((&x).f)`, `invalid type`}, // constant
-
-	{"Sizeof", `_ = unsafe.Sizeof(0)`, `invalid type`},                 // constant
-	{"Sizeof", `var x struct{}; _ = unsafe.Sizeof(x)`, `invalid type`}, // constant
-
-	{"assert", `assert(true)`, `invalid type`},                                    // constant
-	{"assert", `type B bool; const pred B = 1 < 2; assert(pred)`, `invalid type`}, // constant
-
-	// no tests for trace since it produces output as a side-effect
-}
-
-func TestBuiltinSignatures(t *testing.T) {
-	DefPredeclaredTestFuncs()
-
-	seen := map[string]bool{"trace": true} // no test for trace built-in; add it manually
-	for _, call := range builtinCalls {
-		testBuiltinSignature(t, call.name, call.src, call.sig)
-		seen[call.name] = true
-	}
-
-	// make sure we didn't miss one
-	for _, name := range Universe.Names() {
-		if _, ok := Universe.Lookup(name).(*Builtin); ok && !seen[name] {
-			t.Errorf("missing test for %s", name)
-		}
-	}
-	for _, name := range Unsafe.Scope().Names() {
-		if _, ok := Unsafe.Scope().Lookup(name).(*Builtin); ok && !seen[name] {
-			t.Errorf("missing test for unsafe.%s", name)
-		}
-	}
-}
-
-func testBuiltinSignature(t *testing.T, name, src0, want string) {
-	src := fmt.Sprintf(`package p; import "unsafe"; type _ unsafe.Pointer /* use unsafe */; func _() { %s }`, src0)
-	f, err := parser.ParseFile(fset, "", src, 0)
-	if err != nil {
-		t.Errorf("%s: %s", src0, err)
-		return
-	}
-
-	conf := Config{Importer: importer.Default()}
-	uses := make(map[*ast.Ident]Object)
-	types := make(map[ast.Expr]TypeAndValue)
-	_, err = conf.Check(f.Name.Name, fset, []*ast.File{f}, &Info{Uses: uses, Types: types})
-	if err != nil {
-		t.Errorf("%s: %s", src0, err)
-		return
-	}
-
-	// find called function
-	n := 0
-	var fun ast.Expr
-	for x := range types {
-		if call, _ := x.(*ast.CallExpr); call != nil {
-			fun = call.Fun
-			n++
-		}
-	}
-	if n != 1 {
-		t.Errorf("%s: got %d CallExprs; want 1", src0, n)
-		return
-	}
-
-	// check recorded types for fun and descendents (may be parenthesized)
-	for {
-		// the recorded type for the built-in must match the wanted signature
-		typ := types[fun].Type
-		if typ == nil {
-			t.Errorf("%s: no type recorded for %s", src0, ExprString(fun))
-			return
-		}
-		if got := typ.String(); got != want {
-			t.Errorf("%s: got type %s; want %s", src0, got, want)
-			return
-		}
-
-		// called function must be a (possibly parenthesized, qualified)
-		// identifier denoting the expected built-in
-		switch p := fun.(type) {
-		case *ast.Ident:
-			obj := uses[p]
-			if obj == nil {
-				t.Errorf("%s: no object found for %s", src0, p)
-				return
-			}
-			bin, _ := obj.(*Builtin)
-			if bin == nil {
-				t.Errorf("%s: %s does not denote a built-in", src0, p)
-				return
-			}
-			if bin.Name() != name {
-				t.Errorf("%s: got built-in %s; want %s", src0, bin.Name(), name)
-				return
-			}
-			return // we're done
-
-		case *ast.ParenExpr:
-			fun = p.X // unpack
-
-		case *ast.SelectorExpr:
-			// built-in from package unsafe - ignore details
-			return // we're done
-
-		default:
-			t.Errorf("%s: invalid function call", src0)
-			return
-		}
-	}
-}
diff --git a/src/go/types/call.go b/src/go/types/call.go
deleted file mode 100644
index 62cefc0..0000000
--- a/src/go/types/call.go
+++ /dev/null
@@ -1,441 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements typechecking of call and selector expressions.
-
-package types
-
-import (
-	"go/ast"
-	"go/token"
-)
-
-func (check *Checker) call(x *operand, e *ast.CallExpr) exprKind {
-	check.exprOrType(x, e.Fun)
-
-	switch x.mode {
-	case invalid:
-		check.use(e.Args...)
-		x.mode = invalid
-		x.expr = e
-		return statement
-
-	case typexpr:
-		// conversion
-		T := x.typ
-		x.mode = invalid
-		switch n := len(e.Args); n {
-		case 0:
-			check.errorf(e.Rparen, "missing argument in conversion to %s", T)
-		case 1:
-			check.expr(x, e.Args[0])
-			if x.mode != invalid {
-				check.conversion(x, T)
-			}
-		default:
-			check.errorf(e.Args[n-1].Pos(), "too many arguments in conversion to %s", T)
-		}
-		x.expr = e
-		return conversion
-
-	case builtin:
-		id := x.id
-		if !check.builtin(x, e, id) {
-			x.mode = invalid
-		}
-		x.expr = e
-		// a non-constant result implies a function call
-		if x.mode != invalid && x.mode != constant_ {
-			check.hasCallOrRecv = true
-		}
-		return predeclaredFuncs[id].kind
-
-	default:
-		// function/method call
-		sig, _ := x.typ.Underlying().(*Signature)
-		if sig == nil {
-			check.invalidOp(x.pos(), "cannot call non-function %s", x)
-			x.mode = invalid
-			x.expr = e
-			return statement
-		}
-
-		arg, n, _ := unpack(func(x *operand, i int) { check.expr(x, e.Args[i]) }, len(e.Args), false)
-		if arg == nil {
-			x.mode = invalid
-			x.expr = e
-			return statement
-		}
-
-		check.arguments(x, e, sig, arg, n)
-
-		// determine result
-		switch sig.results.Len() {
-		case 0:
-			x.mode = novalue
-		case 1:
-			x.mode = value
-			x.typ = sig.results.vars[0].typ // unpack tuple
-		default:
-			x.mode = value
-			x.typ = sig.results
-		}
-		x.expr = e
-		check.hasCallOrRecv = true
-
-		return statement
-	}
-}
-
-// use type-checks each argument.
-// Useful to make sure expressions are evaluated
-// (and variables are "used") in the presence of other errors.
-func (check *Checker) use(arg ...ast.Expr) {
-	var x operand
-	for _, e := range arg {
-		check.rawExpr(&x, e, nil)
-	}
-}
-
-// useGetter is like use, but takes a getter instead of a list of expressions.
-// It should be called instead of use if a getter is present to avoid repeated
-// evaluation of the first argument (since the getter was likely obtained via
-// unpack, which may have evaluated the first argument already).
-func (check *Checker) useGetter(get getter, n int) {
-	var x operand
-	for i := 0; i < n; i++ {
-		get(&x, i)
-	}
-}
-
-// A getter sets x as the i'th operand, where 0 <= i < n and n is the total
-// number of operands (context-specific, and maintained elsewhere). A getter
-// type-checks the i'th operand; the details of the actual check are getter-
-// specific.
-type getter func(x *operand, i int)
-
-// unpack takes a getter get and a number of operands n. If n == 1, unpack
-// calls the incoming getter for the first operand. If that operand is
-// invalid, unpack returns (nil, 0, false). Otherwise, if that operand is a
-// function call, or a comma-ok expression and allowCommaOk is set, the result
-// is a new getter and operand count providing access to the function results,
-// or comma-ok values, respectively. The third result value reports if it
-// is indeed the comma-ok case. In all other cases, the incoming getter and
-// operand count are returned unchanged, and the third result value is false.
-//
-// In other words, if there's exactly one operand that - after type-checking
-// by calling get - stands for multiple operands, the resulting getter provides
-// access to those operands instead.
-//
-// If the returned getter is called at most once for a given operand index i
-// (including i == 0), that operand is guaranteed to cause only one call of
-// the incoming getter with that i.
-//
-func unpack(get getter, n int, allowCommaOk bool) (getter, int, bool) {
-	if n == 1 {
-		// possibly result of an n-valued function call or comma,ok value
-		var x0 operand
-		get(&x0, 0)
-		if x0.mode == invalid {
-			return nil, 0, false
-		}
-
-		if t, ok := x0.typ.(*Tuple); ok {
-			// result of an n-valued function call
-			return func(x *operand, i int) {
-				x.mode = value
-				x.expr = x0.expr
-				x.typ = t.At(i).typ
-			}, t.Len(), false
-		}
-
-		if x0.mode == mapindex || x0.mode == commaok {
-			// comma-ok value
-			if allowCommaOk {
-				a := [2]Type{x0.typ, Typ[UntypedBool]}
-				return func(x *operand, i int) {
-					x.mode = value
-					x.expr = x0.expr
-					x.typ = a[i]
-				}, 2, true
-			}
-			x0.mode = value
-		}
-
-		// single value
-		return func(x *operand, i int) {
-			if i != 0 {
-				unreachable()
-			}
-			*x = x0
-		}, 1, false
-	}
-
-	// zero or multiple values
-	return get, n, false
-}
-
-// arguments checks argument passing for the call with the given signature.
-// The arg function provides the operand for the i'th argument.
-func (check *Checker) arguments(x *operand, call *ast.CallExpr, sig *Signature, arg getter, n int) {
-	if call.Ellipsis.IsValid() {
-		// last argument is of the form x...
-		if len(call.Args) == 1 && n > 1 {
-			// f()... is not permitted if f() is multi-valued
-			check.errorf(call.Ellipsis, "cannot use ... with %d-valued expression %s", n, call.Args[0])
-			check.useGetter(arg, n)
-			return
-		}
-		if !sig.variadic {
-			check.errorf(call.Ellipsis, "cannot use ... in call to non-variadic %s", call.Fun)
-			check.useGetter(arg, n)
-			return
-		}
-	}
-
-	// evaluate arguments
-	for i := 0; i < n; i++ {
-		arg(x, i)
-		if x.mode != invalid {
-			var ellipsis token.Pos
-			if i == n-1 && call.Ellipsis.IsValid() {
-				ellipsis = call.Ellipsis
-			}
-			check.argument(sig, i, x, ellipsis)
-		}
-	}
-
-	// check argument count
-	if sig.variadic {
-		// a variadic function accepts an "empty"
-		// last argument: count one extra
-		n++
-	}
-	if n < sig.params.Len() {
-		check.errorf(call.Rparen, "too few arguments in call to %s", call.Fun)
-		// ok to continue
-	}
-}
-
-// argument checks passing of argument x to the i'th parameter of the given signature.
-// If ellipsis is valid, the argument is followed by ... at that position in the call.
-func (check *Checker) argument(sig *Signature, i int, x *operand, ellipsis token.Pos) {
-	n := sig.params.Len()
-
-	// determine parameter type
-	var typ Type
-	switch {
-	case i < n:
-		typ = sig.params.vars[i].typ
-	case sig.variadic:
-		typ = sig.params.vars[n-1].typ
-		if debug {
-			if _, ok := typ.(*Slice); !ok {
-				check.dump("%s: expected unnamed slice type, got %s", sig.params.vars[n-1].Pos(), typ)
-			}
-		}
-	default:
-		check.errorf(x.pos(), "too many arguments")
-		return
-	}
-
-	if ellipsis.IsValid() {
-		// argument is of the form x...
-		if i != n-1 {
-			check.errorf(ellipsis, "can only use ... with matching parameter")
-			return
-		}
-		switch t := x.typ.Underlying().(type) {
-		case *Slice:
-			// ok
-		case *Tuple:
-			check.errorf(ellipsis, "cannot use ... with %d-valued expression %s", t.Len(), x)
-			return
-		default:
-			check.errorf(x.pos(), "cannot use %s as parameter of type %s", x, typ)
-			return
-		}
-	} else if sig.variadic && i >= n-1 {
-		// use the variadic parameter slice's element type
-		typ = typ.(*Slice).elem
-	}
-
-	if !check.assignment(x, typ) && x.mode != invalid {
-		check.errorf(x.pos(), "cannot pass argument %s to parameter of type %s", x, typ)
-	}
-}
-
-func (check *Checker) selector(x *operand, e *ast.SelectorExpr) {
-	// these must be declared before the "goto Error" statements
-	var (
-		obj      Object
-		index    []int
-		indirect bool
-	)
-
-	sel := e.Sel.Name
-	// If the identifier refers to a package, handle everything here
-	// so we don't need a "package" mode for operands: package names
-	// can only appear in qualified identifiers which are mapped to
-	// selector expressions.
-	if ident, ok := e.X.(*ast.Ident); ok {
-		_, obj := check.scope.LookupParent(ident.Name, check.pos)
-		if pkg, _ := obj.(*PkgName); pkg != nil {
-			assert(pkg.pkg == check.pkg)
-			check.recordUse(ident, pkg)
-			pkg.used = true
-			exp := pkg.imported.scope.Lookup(sel)
-			if exp == nil {
-				if !pkg.imported.fake {
-					check.errorf(e.Pos(), "%s not declared by package %s", sel, ident)
-				}
-				goto Error
-			}
-			if !exp.Exported() {
-				check.errorf(e.Pos(), "%s not exported by package %s", sel, ident)
-				// ok to continue
-			}
-			check.recordUse(e.Sel, exp)
-			// Simplified version of the code for *ast.Idents:
-			// - imported objects are always fully initialized
-			switch exp := exp.(type) {
-			case *Const:
-				assert(exp.Val() != nil)
-				x.mode = constant_
-				x.typ = exp.typ
-				x.val = exp.val
-			case *TypeName:
-				x.mode = typexpr
-				x.typ = exp.typ
-			case *Var:
-				x.mode = variable
-				x.typ = exp.typ
-			case *Func:
-				x.mode = value
-				x.typ = exp.typ
-			case *Builtin:
-				x.mode = builtin
-				x.typ = exp.typ
-				x.id = exp.id
-			default:
-				unreachable()
-			}
-			x.expr = e
-			return
-		}
-	}
-
-	check.exprOrType(x, e.X)
-	if x.mode == invalid {
-		goto Error
-	}
-
-	obj, index, indirect = LookupFieldOrMethod(x.typ, x.mode == variable, check.pkg, sel)
-	if obj == nil {
-		switch {
-		case index != nil:
-			// TODO(gri) should provide actual type where the conflict happens
-			check.invalidOp(e.Pos(), "ambiguous selector %s", sel)
-		case indirect:
-			check.invalidOp(e.Pos(), "%s is not in method set of %s", sel, x.typ)
-		default:
-			check.invalidOp(e.Pos(), "%s has no field or method %s", x, sel)
-		}
-		goto Error
-	}
-
-	if x.mode == typexpr {
-		// method expression
-		m, _ := obj.(*Func)
-		if m == nil {
-			check.invalidOp(e.Pos(), "%s has no method %s", x, sel)
-			goto Error
-		}
-
-		check.recordSelection(e, MethodExpr, x.typ, m, index, indirect)
-
-		// the receiver type becomes the type of the first function
-		// argument of the method expression's function type
-		var params []*Var
-		sig := m.typ.(*Signature)
-		if sig.params != nil {
-			params = sig.params.vars
-		}
-		x.mode = value
-		x.typ = &Signature{
-			params:   NewTuple(append([]*Var{NewVar(token.NoPos, check.pkg, "", x.typ)}, params...)...),
-			results:  sig.results,
-			variadic: sig.variadic,
-		}
-
-		check.addDeclDep(m)
-
-	} else {
-		// regular selector
-		switch obj := obj.(type) {
-		case *Var:
-			check.recordSelection(e, FieldVal, x.typ, obj, index, indirect)
-			if x.mode == variable || indirect {
-				x.mode = variable
-			} else {
-				x.mode = value
-			}
-			x.typ = obj.typ
-
-		case *Func:
-			// TODO(gri) If we needed to take into account the receiver's
-			// addressability, should we report the type &(x.typ) instead?
-			check.recordSelection(e, MethodVal, x.typ, obj, index, indirect)
-
-			if debug {
-				// Verify that LookupFieldOrMethod and MethodSet.Lookup agree.
-				typ := x.typ
-				if x.mode == variable {
-					// If typ is not an (unnamed) pointer or an interface,
-					// use *typ instead, because the method set of *typ
-					// includes the methods of typ.
-					// Variables are addressable, so we can always take their
-					// address.
-					if _, ok := typ.(*Pointer); !ok && !IsInterface(typ) {
-						typ = &Pointer{base: typ}
-					}
-				}
-				// If we created a synthetic pointer type above, we will throw
-				// away the method set computed here after use.
-				// TODO(gri) Method set computation should probably always compute
-				// both, the value and the pointer receiver method set and represent
-				// them in a single structure.
-				// TODO(gri) Consider also using a method set cache for the lifetime
-				// of checker once we rely on MethodSet lookup instead of individual
-				// lookup.
-				mset := NewMethodSet(typ)
-				if m := mset.Lookup(check.pkg, sel); m == nil || m.obj != obj {
-					check.dump("%s: (%s).%v -> %s", e.Pos(), typ, obj.name, m)
-					check.dump("%s\n", mset)
-					panic("method sets and lookup don't agree")
-				}
-			}
-
-			x.mode = value
-
-			// remove receiver
-			sig := *obj.typ.(*Signature)
-			sig.recv = nil
-			x.typ = &sig
-
-			check.addDeclDep(obj)
-
-		default:
-			unreachable()
-		}
-	}
-
-	// everything went well
-	x.expr = e
-	return
-
-Error:
-	x.mode = invalid
-	x.expr = e
-}
diff --git a/src/go/types/check.go b/src/go/types/check.go
deleted file mode 100644
index bb0b074..0000000
--- a/src/go/types/check.go
+++ /dev/null
@@ -1,358 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements the Check function, which drives type-checking.
-
-package types
-
-import (
-	"go/ast"
-	"go/constant"
-	"go/token"
-)
-
-// debugging/development support
-const (
-	debug = false // leave on during development
-	trace = false // turn on for detailed type resolution traces
-)
-
-// If Strict is set, the type-checker enforces additional
-// rules not specified by the Go 1 spec, but which will
-// catch guaranteed run-time errors if the respective
-// code is executed. In other words, programs passing in
-// Strict mode are Go 1 compliant, but not all Go 1 programs
-// will pass in Strict mode. The additional rules are:
-//
-// - A type assertion x.(T) where T is an interface type
-//   is invalid if any (statically known) method that exists
-//   for both x and T have different signatures.
-//
-const strict = false
-
-// exprInfo stores information about an untyped expression.
-type exprInfo struct {
-	isLhs bool // expression is lhs operand of a shift with delayed type-check
-	mode  operandMode
-	typ   *Basic
-	val   constant.Value // constant value; or nil (if not a constant)
-}
-
-// funcInfo stores the information required for type-checking a function.
-type funcInfo struct {
-	name string    // for debugging/tracing only
-	decl *declInfo // for cycle detection
-	sig  *Signature
-	body *ast.BlockStmt
-}
-
-// A context represents the context within which an object is type-checked.
-type context struct {
-	decl          *declInfo      // package-level declaration whose init expression/function body is checked
-	scope         *Scope         // top-most scope for lookups
-	iota          constant.Value // value of iota in a constant declaration; nil otherwise
-	sig           *Signature     // function signature if inside a function; nil otherwise
-	hasLabel      bool           // set if a function makes use of labels (only ~1% of functions); unused outside functions
-	hasCallOrRecv bool           // set if an expression contains a function call or channel receive operation
-}
-
-// A Checker maintains the state of the type checker.
-// It must be created with NewChecker.
-type Checker struct {
-	// package information
-	// (initialized by NewChecker, valid for the life-time of checker)
-	conf *Config
-	fset *token.FileSet
-	pkg  *Package
-	*Info
-	objMap map[Object]*declInfo // maps package-level object to declaration info
-
-	// information collected during type-checking of a set of package files
-	// (initialized by Files, valid only for the duration of check.Files;
-	// maps and lists are allocated on demand)
-	files            []*ast.File                       // package files
-	unusedDotImports map[*Scope]map[*Package]token.Pos // positions of unused dot-imported packages for each file scope
-
-	firstErr error                 // first error encountered
-	methods  map[string][]*Func    // maps type names to associated methods
-	untyped  map[ast.Expr]exprInfo // map of expressions without final type
-	funcs    []funcInfo            // list of functions to type-check
-	delayed  []func()              // delayed checks requiring fully setup types
-
-	// context within which the current object is type-checked
-	// (valid only for the duration of type-checking a specific object)
-	context
-	pos token.Pos // if valid, identifiers are looked up as if at position pos (used by Eval)
-
-	// debugging
-	indent int // indentation for tracing
-}
-
-// addUnusedImport adds the position of a dot-imported package
-// pkg to the map of dot imports for the given file scope.
-func (check *Checker) addUnusedDotImport(scope *Scope, pkg *Package, pos token.Pos) {
-	mm := check.unusedDotImports
-	if mm == nil {
-		mm = make(map[*Scope]map[*Package]token.Pos)
-		check.unusedDotImports = mm
-	}
-	m := mm[scope]
-	if m == nil {
-		m = make(map[*Package]token.Pos)
-		mm[scope] = m
-	}
-	m[pkg] = pos
-}
-
-// addDeclDep adds the dependency edge (check.decl -> to) if check.decl exists
-func (check *Checker) addDeclDep(to Object) {
-	from := check.decl
-	if from == nil {
-		return // not in a package-level init expression
-	}
-	if _, found := check.objMap[to]; !found {
-		return // to is not a package-level object
-	}
-	from.addDep(to)
-}
-
-func (check *Checker) assocMethod(tname string, meth *Func) {
-	m := check.methods
-	if m == nil {
-		m = make(map[string][]*Func)
-		check.methods = m
-	}
-	m[tname] = append(m[tname], meth)
-}
-
-func (check *Checker) rememberUntyped(e ast.Expr, lhs bool, mode operandMode, typ *Basic, val constant.Value) {
-	m := check.untyped
-	if m == nil {
-		m = make(map[ast.Expr]exprInfo)
-		check.untyped = m
-	}
-	m[e] = exprInfo{lhs, mode, typ, val}
-}
-
-func (check *Checker) later(name string, decl *declInfo, sig *Signature, body *ast.BlockStmt) {
-	check.funcs = append(check.funcs, funcInfo{name, decl, sig, body})
-}
-
-func (check *Checker) delay(f func()) {
-	check.delayed = append(check.delayed, f)
-}
-
-// NewChecker returns a new Checker instance for a given package.
-// Package files may be added incrementally via checker.Files.
-func NewChecker(conf *Config, fset *token.FileSet, pkg *Package, info *Info) *Checker {
-	// make sure we have a configuration
-	if conf == nil {
-		conf = new(Config)
-	}
-
-	// make sure we have an info struct
-	if info == nil {
-		info = new(Info)
-	}
-
-	return &Checker{
-		conf:   conf,
-		fset:   fset,
-		pkg:    pkg,
-		Info:   info,
-		objMap: make(map[Object]*declInfo),
-	}
-}
-
-// initFiles initializes the files-specific portion of checker.
-// The provided files must all belong to the same package.
-func (check *Checker) initFiles(files []*ast.File) {
-	// start with a clean slate (check.Files may be called multiple times)
-	check.files = nil
-	check.unusedDotImports = nil
-
-	check.firstErr = nil
-	check.methods = nil
-	check.untyped = nil
-	check.funcs = nil
-	check.delayed = nil
-
-	// determine package name and collect valid files
-	pkg := check.pkg
-	for _, file := range files {
-		switch name := file.Name.Name; pkg.name {
-		case "":
-			if name != "_" {
-				pkg.name = name
-			} else {
-				check.errorf(file.Name.Pos(), "invalid package name _")
-			}
-			fallthrough
-
-		case name:
-			check.files = append(check.files, file)
-
-		default:
-			check.errorf(file.Package, "package %s; expected %s", name, pkg.name)
-			// ignore this file
-		}
-	}
-}
-
-// A bailout panic is used for early termination.
-type bailout struct{}
-
-func (check *Checker) handleBailout(err *error) {
-	switch p := recover().(type) {
-	case nil, bailout:
-		// normal return or early exit
-		*err = check.firstErr
-	default:
-		// re-panic
-		panic(p)
-	}
-}
-
-// Files checks the provided files as part of the checker's package.
-func (check *Checker) Files(files []*ast.File) (err error) {
-	defer check.handleBailout(&err)
-
-	check.initFiles(files)
-
-	check.collectObjects()
-
-	check.packageObjects(check.resolveOrder())
-
-	check.functionBodies()
-
-	check.initOrder()
-
-	if !check.conf.DisableUnusedImportCheck {
-		check.unusedImports()
-	}
-
-	// perform delayed checks
-	for _, f := range check.delayed {
-		f()
-	}
-
-	check.recordUntyped()
-
-	check.pkg.complete = true
-	return
-}
-
-func (check *Checker) recordUntyped() {
-	if !debug && check.Types == nil {
-		return // nothing to do
-	}
-
-	for x, info := range check.untyped {
-		if debug && isTyped(info.typ) {
-			check.dump("%s: %s (type %s) is typed", x.Pos(), x, info.typ)
-			unreachable()
-		}
-		check.recordTypeAndValue(x, info.mode, info.typ, info.val)
-	}
-}
-
-func (check *Checker) recordTypeAndValue(x ast.Expr, mode operandMode, typ Type, val constant.Value) {
-	assert(x != nil)
-	assert(typ != nil)
-	if mode == invalid {
-		return // omit
-	}
-	assert(typ != nil)
-	if mode == constant_ {
-		assert(val != nil)
-		assert(typ == Typ[Invalid] || isConstType(typ))
-	}
-	if m := check.Types; m != nil {
-		m[x] = TypeAndValue{mode, typ, val}
-	}
-}
-
-func (check *Checker) recordBuiltinType(f ast.Expr, sig *Signature) {
-	// f must be a (possibly parenthesized) identifier denoting a built-in
-	// (built-ins in package unsafe always produce a constant result and
-	// we don't record their signatures, so we don't see qualified idents
-	// here): record the signature for f and possible children.
-	for {
-		check.recordTypeAndValue(f, builtin, sig, nil)
-		switch p := f.(type) {
-		case *ast.Ident:
-			return // we're done
-		case *ast.ParenExpr:
-			f = p.X
-		default:
-			unreachable()
-		}
-	}
-}
-
-func (check *Checker) recordCommaOkTypes(x ast.Expr, a [2]Type) {
-	assert(x != nil)
-	if a[0] == nil || a[1] == nil {
-		return
-	}
-	assert(isTyped(a[0]) && isTyped(a[1]) && isBoolean(a[1]))
-	if m := check.Types; m != nil {
-		for {
-			tv := m[x]
-			assert(tv.Type != nil) // should have been recorded already
-			pos := x.Pos()
-			tv.Type = NewTuple(
-				NewVar(pos, check.pkg, "", a[0]),
-				NewVar(pos, check.pkg, "", a[1]),
-			)
-			m[x] = tv
-			// if x is a parenthesized expression (p.X), update p.X
-			p, _ := x.(*ast.ParenExpr)
-			if p == nil {
-				break
-			}
-			x = p.X
-		}
-	}
-}
-
-func (check *Checker) recordDef(id *ast.Ident, obj Object) {
-	assert(id != nil)
-	if m := check.Defs; m != nil {
-		m[id] = obj
-	}
-}
-
-func (check *Checker) recordUse(id *ast.Ident, obj Object) {
-	assert(id != nil)
-	assert(obj != nil)
-	if m := check.Uses; m != nil {
-		m[id] = obj
-	}
-}
-
-func (check *Checker) recordImplicit(node ast.Node, obj Object) {
-	assert(node != nil)
-	assert(obj != nil)
-	if m := check.Implicits; m != nil {
-		m[node] = obj
-	}
-}
-
-func (check *Checker) recordSelection(x *ast.SelectorExpr, kind SelectionKind, recv Type, obj Object, index []int, indirect bool) {
-	assert(obj != nil && (recv == nil || len(index) > 0))
-	check.recordUse(x.Sel, obj)
-	// TODO(gri) Should we also call recordTypeAndValue?
-	if m := check.Selections; m != nil {
-		m[x] = &Selection{kind, recv, obj, index, indirect}
-	}
-}
-
-func (check *Checker) recordScope(node ast.Node, scope *Scope) {
-	assert(node != nil)
-	assert(scope != nil)
-	if m := check.Scopes; m != nil {
-		m[node] = scope
-	}
-}
diff --git a/src/go/types/check_test.go b/src/go/types/check_test.go
deleted file mode 100644
index 5e34c65..0000000
--- a/src/go/types/check_test.go
+++ /dev/null
@@ -1,298 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements a typechecker test harness. The packages specified
-// in tests are typechecked. Error messages reported by the typechecker are
-// compared against the error messages expected in the test files.
-//
-// Expected errors are indicated in the test files by putting a comment
-// of the form /* ERROR "rx" */ immediately following an offending token.
-// The harness will verify that an error matching the regular expression
-// rx is reported at that source position. Consecutive comments may be
-// used to indicate multiple errors for the same token position.
-//
-// For instance, the following test file indicates that a "not declared"
-// error should be reported for the undeclared variable x:
-//
-//	package p
-//	func f() {
-//		_ = x /* ERROR "not declared" */ + 1
-//	}
-
-// TODO(gri) Also collect strict mode errors of the form /* STRICT ... */
-//           and test against strict mode.
-
-package types_test
-
-import (
-	"flag"
-	"go/ast"
-	"go/importer"
-	"go/parser"
-	"go/scanner"
-	"go/token"
-	"internal/testenv"
-	"io/ioutil"
-	"regexp"
-	"strings"
-	"testing"
-
-	. "go/types"
-)
-
-var (
-	listErrors = flag.Bool("list", false, "list errors")
-	testFiles  = flag.String("files", "", "space-separated list of test files")
-)
-
-// The test filenames do not end in .go so that they are invisible
-// to gofmt since they contain comments that must not change their
-// positions relative to surrounding tokens.
-
-// Each tests entry is list of files belonging to the same package.
-var tests = [][]string{
-	{"testdata/errors.src"},
-	{"testdata/importdecl0a.src", "testdata/importdecl0b.src"},
-	{"testdata/importdecl1a.src", "testdata/importdecl1b.src"},
-	{"testdata/cycles.src"},
-	{"testdata/cycles1.src"},
-	{"testdata/cycles2.src"},
-	{"testdata/cycles3.src"},
-	{"testdata/cycles4.src"},
-	{"testdata/init0.src"},
-	{"testdata/init1.src"},
-	{"testdata/init2.src"},
-	{"testdata/decls0.src"},
-	{"testdata/decls1.src"},
-	{"testdata/decls2a.src", "testdata/decls2b.src"},
-	{"testdata/decls3.src"},
-	{"testdata/const0.src"},
-	{"testdata/const1.src"},
-	{"testdata/constdecl.src"},
-	{"testdata/vardecl.src"},
-	{"testdata/expr0.src"},
-	{"testdata/expr1.src"},
-	{"testdata/expr2.src"},
-	{"testdata/expr3.src"},
-	{"testdata/methodsets.src"},
-	{"testdata/shifts.src"},
-	{"testdata/builtins.src"},
-	{"testdata/conversions.src"},
-	{"testdata/stmt0.src"},
-	{"testdata/stmt1.src"},
-	{"testdata/gotos.src"},
-	{"testdata/labels.src"},
-	{"testdata/issues.src"},
-	{"testdata/blank.src"},
-}
-
-var fset = token.NewFileSet()
-
-// Positioned errors are of the form filename:line:column: message .
-var posMsgRx = regexp.MustCompile(`^(.*:[0-9]+:[0-9]+): *(.*)`)
-
-// splitError splits an error's error message into a position string
-// and the actual error message. If there's no position information,
-// pos is the empty string, and msg is the entire error message.
-//
-func splitError(err error) (pos, msg string) {
-	msg = err.Error()
-	if m := posMsgRx.FindStringSubmatch(msg); len(m) == 3 {
-		pos = m[1]
-		msg = m[2]
-	}
-	return
-}
-
-func parseFiles(t *testing.T, filenames []string) ([]*ast.File, []error) {
-	var files []*ast.File
-	var errlist []error
-	for _, filename := range filenames {
-		file, err := parser.ParseFile(fset, filename, nil, parser.AllErrors)
-		if file == nil {
-			t.Fatalf("%s: %s", filename, err)
-		}
-		files = append(files, file)
-		if err != nil {
-			if list, _ := err.(scanner.ErrorList); len(list) > 0 {
-				for _, err := range list {
-					errlist = append(errlist, err)
-				}
-			} else {
-				errlist = append(errlist, err)
-			}
-		}
-	}
-	return files, errlist
-}
-
-// ERROR comments must start with text `ERROR "rx"` or `ERROR rx` where
-// rx is a regular expression that matches the expected error message.
-// Space around "rx" or rx is ignored. Use the form `ERROR HERE "rx"`
-// for error messages that are located immediately after rather than
-// at a token's position.
-//
-var errRx = regexp.MustCompile(`^ *ERROR *(HERE)? *"?([^"]*)"?`)
-
-// errMap collects the regular expressions of ERROR comments found
-// in files and returns them as a map of error positions to error messages.
-//
-func errMap(t *testing.T, testname string, files []*ast.File) map[string][]string {
-	// map of position strings to lists of error message patterns
-	errmap := make(map[string][]string)
-
-	for _, file := range files {
-		filename := fset.Position(file.Package).Filename
-		src, err := ioutil.ReadFile(filename)
-		if err != nil {
-			t.Fatalf("%s: could not read %s", testname, filename)
-		}
-
-		var s scanner.Scanner
-		s.Init(fset.AddFile(filename, -1, len(src)), src, nil, scanner.ScanComments)
-		var prev token.Pos // position of last non-comment, non-semicolon token
-		var here token.Pos // position immediately after the token at position prev
-
-	scanFile:
-		for {
-			pos, tok, lit := s.Scan()
-			switch tok {
-			case token.EOF:
-				break scanFile
-			case token.COMMENT:
-				if lit[1] == '*' {
-					lit = lit[:len(lit)-2] // strip trailing */
-				}
-				if s := errRx.FindStringSubmatch(lit[2:]); len(s) == 3 {
-					pos := prev
-					if s[1] == "HERE" {
-						pos = here
-					}
-					p := fset.Position(pos).String()
-					errmap[p] = append(errmap[p], strings.TrimSpace(s[2]))
-				}
-			case token.SEMICOLON:
-				// ignore automatically inserted semicolon
-				if lit == "\n" {
-					continue scanFile
-				}
-				fallthrough
-			default:
-				prev = pos
-				var l int // token length
-				if tok.IsLiteral() {
-					l = len(lit)
-				} else {
-					l = len(tok.String())
-				}
-				here = prev + token.Pos(l)
-			}
-		}
-	}
-
-	return errmap
-}
-
-func eliminate(t *testing.T, errmap map[string][]string, errlist []error) {
-	for _, err := range errlist {
-		pos, gotMsg := splitError(err)
-		list := errmap[pos]
-		index := -1 // list index of matching message, if any
-		// we expect one of the messages in list to match the error at pos
-		for i, wantRx := range list {
-			rx, err := regexp.Compile(wantRx)
-			if err != nil {
-				t.Errorf("%s: %v", pos, err)
-				continue
-			}
-			if rx.MatchString(gotMsg) {
-				index = i
-				break
-			}
-		}
-		if index >= 0 {
-			// eliminate from list
-			if n := len(list) - 1; n > 0 {
-				// not the last entry - swap in last element and shorten list by 1
-				list[index] = list[n]
-				errmap[pos] = list[:n]
-			} else {
-				// last entry - remove list from map
-				delete(errmap, pos)
-			}
-		} else {
-			t.Errorf("%s: no error expected: %q", pos, gotMsg)
-		}
-	}
-}
-
-func checkFiles(t *testing.T, testfiles []string) {
-	// parse files and collect parser errors
-	files, errlist := parseFiles(t, testfiles)
-
-	pkgName := "<no package>"
-	if len(files) > 0 {
-		pkgName = files[0].Name.Name
-	}
-
-	if *listErrors && len(errlist) > 0 {
-		t.Errorf("--- %s:", pkgName)
-		for _, err := range errlist {
-			t.Error(err)
-		}
-	}
-
-	// typecheck and collect typechecker errors
-	var conf Config
-	conf.Importer = importer.Default()
-	conf.Error = func(err error) {
-		if *listErrors {
-			t.Error(err)
-			return
-		}
-		// Ignore secondary error messages starting with "\t";
-		// they are clarifying messages for a primary error.
-		if !strings.Contains(err.Error(), ": \t") {
-			errlist = append(errlist, err)
-		}
-	}
-	conf.Check(pkgName, fset, files, nil)
-
-	if *listErrors {
-		return
-	}
-
-	// match and eliminate errors;
-	// we are expecting the following errors
-	errmap := errMap(t, pkgName, files)
-	eliminate(t, errmap, errlist)
-
-	// there should be no expected errors left
-	if len(errmap) > 0 {
-		t.Errorf("--- %s: %d source positions with expected (but not reported) errors:", pkgName, len(errmap))
-		for pos, list := range errmap {
-			for _, rx := range list {
-				t.Errorf("%s: %q", pos, rx)
-			}
-		}
-	}
-}
-
-func TestCheck(t *testing.T) {
-	testenv.MustHaveGoBuild(t)
-
-	// Declare builtins for testing.
-	DefPredeclaredTestFuncs()
-
-	// If explicit test files are specified, only check those.
-	if files := *testFiles; files != "" {
-		checkFiles(t, strings.Split(files, " "))
-		return
-	}
-
-	// Otherwise, run all the tests.
-	for _, files := range tests {
-		checkFiles(t, files)
-	}
-}
diff --git a/src/go/types/conversions.go b/src/go/types/conversions.go
deleted file mode 100644
index 74826ce..0000000
--- a/src/go/types/conversions.go
+++ /dev/null
@@ -1,146 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements typechecking of conversions.
-
-package types
-
-import "go/constant"
-
-// Conversion type-checks the conversion T(x).
-// The result is in x.
-func (check *Checker) conversion(x *operand, T Type) {
-	constArg := x.mode == constant_
-
-	var ok bool
-	switch {
-	case constArg && isConstType(T):
-		// constant conversion
-		switch t := T.Underlying().(*Basic); {
-		case representableConst(x.val, check.conf, t.kind, &x.val):
-			ok = true
-		case isInteger(x.typ) && isString(t):
-			codepoint := int64(-1)
-			if i, ok := constant.Int64Val(x.val); ok {
-				codepoint = i
-			}
-			// If codepoint < 0 the absolute value is too large (or unknown) for
-			// conversion. This is the same as converting any other out-of-range
-			// value - let string(codepoint) do the work.
-			x.val = constant.MakeString(string(codepoint))
-			ok = true
-		}
-	case x.convertibleTo(check.conf, T):
-		// non-constant conversion
-		x.mode = value
-		ok = true
-	}
-
-	if !ok {
-		check.errorf(x.pos(), "cannot convert %s to %s", x, T)
-		x.mode = invalid
-		return
-	}
-
-	// The conversion argument types are final. For untyped values the
-	// conversion provides the type, per the spec: "A constant may be
-	// given a type explicitly by a constant declaration or conversion,...".
-	final := x.typ
-	if isUntyped(x.typ) {
-		final = T
-		// - For conversions to interfaces, use the argument's default type.
-		// - For conversions of untyped constants to non-constant types, also
-		//   use the default type (e.g., []byte("foo") should report string
-		//   not []byte as type for the constant "foo").
-		// - Keep untyped nil for untyped nil arguments.
-		if IsInterface(T) || constArg && !isConstType(T) {
-			final = defaultType(x.typ)
-		}
-		check.updateExprType(x.expr, final, true)
-	}
-
-	x.typ = T
-}
-
-func (x *operand) convertibleTo(conf *Config, T Type) bool {
-	// "x is assignable to T"
-	if x.assignableTo(conf, T) {
-		return true
-	}
-
-	// "x's type and T have identical underlying types"
-	V := x.typ
-	Vu := V.Underlying()
-	Tu := T.Underlying()
-	if Identical(Vu, Tu) {
-		return true
-	}
-
-	// "x's type and T are unnamed pointer types and their pointer base types have identical underlying types"
-	if V, ok := V.(*Pointer); ok {
-		if T, ok := T.(*Pointer); ok {
-			if Identical(V.base.Underlying(), T.base.Underlying()) {
-				return true
-			}
-		}
-	}
-
-	// "x's type and T are both integer or floating point types"
-	if (isInteger(V) || isFloat(V)) && (isInteger(T) || isFloat(T)) {
-		return true
-	}
-
-	// "x's type and T are both complex types"
-	if isComplex(V) && isComplex(T) {
-		return true
-	}
-
-	// "x is an integer or a slice of bytes or runes and T is a string type"
-	if (isInteger(V) || isBytesOrRunes(Vu)) && isString(T) {
-		return true
-	}
-
-	// "x is a string and T is a slice of bytes or runes"
-	if isString(V) && isBytesOrRunes(Tu) {
-		return true
-	}
-
-	// package unsafe:
-	// "any pointer or value of underlying type uintptr can be converted into a unsafe.Pointer"
-	if (isPointer(Vu) || isUintptr(Vu)) && isUnsafePointer(T) {
-		return true
-	}
-	// "and vice versa"
-	if isUnsafePointer(V) && (isPointer(Tu) || isUintptr(Tu)) {
-		return true
-	}
-
-	return false
-}
-
-func isUintptr(typ Type) bool {
-	t, ok := typ.Underlying().(*Basic)
-	return ok && t.kind == Uintptr
-}
-
-func isUnsafePointer(typ Type) bool {
-	// TODO(gri): Is this (typ.Underlying() instead of just typ) correct?
-	//            The spec does not say so, but gc claims it is. See also
-	//            issue 6326.
-	t, ok := typ.Underlying().(*Basic)
-	return ok && t.kind == UnsafePointer
-}
-
-func isPointer(typ Type) bool {
-	_, ok := typ.Underlying().(*Pointer)
-	return ok
-}
-
-func isBytesOrRunes(typ Type) bool {
-	if s, ok := typ.(*Slice); ok {
-		t, ok := s.elem.Underlying().(*Basic)
-		return ok && (t.kind == Byte || t.kind == Rune)
-	}
-	return false
-}
diff --git a/src/go/types/decl.go b/src/go/types/decl.go
deleted file mode 100644
index 8e9e5f3..0000000
--- a/src/go/types/decl.go
+++ /dev/null
@@ -1,430 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package types
-
-import (
-	"go/ast"
-	"go/constant"
-	"go/token"
-)
-
-func (check *Checker) reportAltDecl(obj Object) {
-	if pos := obj.Pos(); pos.IsValid() {
-		// We use "other" rather than "previous" here because
-		// the first declaration seen may not be textually
-		// earlier in the source.
-		check.errorf(pos, "\tother declaration of %s", obj.Name()) // secondary error, \t indented
-	}
-}
-
-func (check *Checker) declare(scope *Scope, id *ast.Ident, obj Object, pos token.Pos) {
-	// spec: "The blank identifier, represented by the underscore
-	// character _, may be used in a declaration like any other
-	// identifier but the declaration does not introduce a new
-	// binding."
-	if obj.Name() != "_" {
-		if alt := scope.Insert(obj); alt != nil {
-			check.errorf(obj.Pos(), "%s redeclared in this block", obj.Name())
-			check.reportAltDecl(alt)
-			return
-		}
-		obj.setScopePos(pos)
-	}
-	if id != nil {
-		check.recordDef(id, obj)
-	}
-}
-
-// objDecl type-checks the declaration of obj in its respective (file) context.
-// See check.typ for the details on def and path.
-func (check *Checker) objDecl(obj Object, def *Named, path []*TypeName) {
-	if obj.Type() != nil {
-		return // already checked - nothing to do
-	}
-
-	if trace {
-		check.trace(obj.Pos(), "-- declaring %s", obj.Name())
-		check.indent++
-		defer func() {
-			check.indent--
-			check.trace(obj.Pos(), "=> %s", obj)
-		}()
-	}
-
-	d := check.objMap[obj]
-	if d == nil {
-		check.dump("%s: %s should have been declared", obj.Pos(), obj.Name())
-		unreachable()
-	}
-
-	// save/restore current context and setup object context
-	defer func(ctxt context) {
-		check.context = ctxt
-	}(check.context)
-	check.context = context{
-		scope: d.file,
-	}
-
-	// Const and var declarations must not have initialization
-	// cycles. We track them by remembering the current declaration
-	// in check.decl. Initialization expressions depending on other
-	// consts, vars, or functions, add dependencies to the current
-	// check.decl.
-	switch obj := obj.(type) {
-	case *Const:
-		check.decl = d // new package-level const decl
-		check.constDecl(obj, d.typ, d.init)
-	case *Var:
-		check.decl = d // new package-level var decl
-		check.varDecl(obj, d.lhs, d.typ, d.init)
-	case *TypeName:
-		// invalid recursive types are detected via path
-		check.typeDecl(obj, d.typ, def, path)
-	case *Func:
-		// functions may be recursive - no need to track dependencies
-		check.funcDecl(obj, d)
-	default:
-		unreachable()
-	}
-}
-
-func (check *Checker) constDecl(obj *Const, typ, init ast.Expr) {
-	assert(obj.typ == nil)
-
-	if obj.visited {
-		obj.typ = Typ[Invalid]
-		return
-	}
-	obj.visited = true
-
-	// use the correct value of iota
-	assert(check.iota == nil)
-	check.iota = obj.val
-	defer func() { check.iota = nil }()
-
-	// provide valid constant value under all circumstances
-	obj.val = constant.MakeUnknown()
-
-	// determine type, if any
-	if typ != nil {
-		t := check.typ(typ)
-		if !isConstType(t) {
-			check.errorf(typ.Pos(), "invalid constant type %s", t)
-			obj.typ = Typ[Invalid]
-			return
-		}
-		obj.typ = t
-	}
-
-	// check initialization
-	var x operand
-	if init != nil {
-		check.expr(&x, init)
-	}
-	check.initConst(obj, &x)
-}
-
-func (check *Checker) varDecl(obj *Var, lhs []*Var, typ, init ast.Expr) {
-	assert(obj.typ == nil)
-
-	if obj.visited {
-		obj.typ = Typ[Invalid]
-		return
-	}
-	obj.visited = true
-
-	// var declarations cannot use iota
-	assert(check.iota == nil)
-
-	// determine type, if any
-	if typ != nil {
-		obj.typ = check.typ(typ)
-	}
-
-	// check initialization
-	if init == nil {
-		if typ == nil {
-			// error reported before by arityMatch
-			obj.typ = Typ[Invalid]
-		}
-		return
-	}
-
-	if lhs == nil || len(lhs) == 1 {
-		assert(lhs == nil || lhs[0] == obj)
-		var x operand
-		check.expr(&x, init)
-		check.initVar(obj, &x, false)
-		return
-	}
-
-	if debug {
-		// obj must be one of lhs
-		found := false
-		for _, lhs := range lhs {
-			if obj == lhs {
-				found = true
-				break
-			}
-		}
-		if !found {
-			panic("inconsistent lhs")
-		}
-	}
-	check.initVars(lhs, []ast.Expr{init}, token.NoPos)
-}
-
-// underlying returns the underlying type of typ; possibly by following
-// forward chains of named types. Such chains only exist while named types
-// are incomplete.
-func underlying(typ Type) Type {
-	for {
-		n, _ := typ.(*Named)
-		if n == nil {
-			break
-		}
-		typ = n.underlying
-	}
-	return typ
-}
-
-func (n *Named) setUnderlying(typ Type) {
-	if n != nil {
-		n.underlying = typ
-	}
-}
-
-func (check *Checker) typeDecl(obj *TypeName, typ ast.Expr, def *Named, path []*TypeName) {
-	assert(obj.typ == nil)
-
-	// type declarations cannot use iota
-	assert(check.iota == nil)
-
-	named := &Named{obj: obj}
-	def.setUnderlying(named)
-	obj.typ = named // make sure recursive type declarations terminate
-
-	// determine underlying type of named
-	check.typExpr(typ, named, append(path, obj))
-
-	// The underlying type of named may be itself a named type that is
-	// incomplete:
-	//
-	//	type (
-	//		A B
-	//		B *C
-	//		C A
-	//	)
-	//
-	// The type of C is the (named) type of A which is incomplete,
-	// and which has as its underlying type the named type B.
-	// Determine the (final, unnamed) underlying type by resolving
-	// any forward chain (they always end in an unnamed type).
-	named.underlying = underlying(named.underlying)
-
-	// check and add associated methods
-	// TODO(gri) It's easy to create pathological cases where the
-	// current approach is incorrect: In general we need to know
-	// and add all methods _before_ type-checking the type.
-	// See https://play.golang.org/p/WMpE0q2wK8
-	check.addMethodDecls(obj)
-}
-
-func (check *Checker) addMethodDecls(obj *TypeName) {
-	// get associated methods
-	methods := check.methods[obj.name]
-	if len(methods) == 0 {
-		return // no methods
-	}
-	delete(check.methods, obj.name)
-
-	// use an objset to check for name conflicts
-	var mset objset
-
-	// spec: "If the base type is a struct type, the non-blank method
-	// and field names must be distinct."
-	base := obj.typ.(*Named)
-	if t, _ := base.underlying.(*Struct); t != nil {
-		for _, fld := range t.fields {
-			if fld.name != "_" {
-				assert(mset.insert(fld) == nil)
-			}
-		}
-	}
-
-	// Checker.Files may be called multiple times; additional package files
-	// may add methods to already type-checked types. Add pre-existing methods
-	// so that we can detect redeclarations.
-	for _, m := range base.methods {
-		assert(m.name != "_")
-		assert(mset.insert(m) == nil)
-	}
-
-	// type-check methods
-	for _, m := range methods {
-		// spec: "For a base type, the non-blank names of methods bound
-		// to it must be unique."
-		if m.name != "_" {
-			if alt := mset.insert(m); alt != nil {
-				switch alt.(type) {
-				case *Var:
-					check.errorf(m.pos, "field and method with the same name %s", m.name)
-				case *Func:
-					check.errorf(m.pos, "method %s already declared for %s", m.name, base)
-				default:
-					unreachable()
-				}
-				check.reportAltDecl(alt)
-				continue
-			}
-		}
-		check.objDecl(m, nil, nil)
-		// methods with blank _ names cannot be found - don't keep them
-		if m.name != "_" {
-			base.methods = append(base.methods, m)
-		}
-	}
-}
-
-func (check *Checker) funcDecl(obj *Func, decl *declInfo) {
-	assert(obj.typ == nil)
-
-	// func declarations cannot use iota
-	assert(check.iota == nil)
-
-	sig := new(Signature)
-	obj.typ = sig // guard against cycles
-	fdecl := decl.fdecl
-	check.funcType(sig, fdecl.Recv, fdecl.Type)
-	if sig.recv == nil && obj.name == "init" && (sig.params.Len() > 0 || sig.results.Len() > 0) {
-		check.errorf(fdecl.Pos(), "func init must have no arguments and no return values")
-		// ok to continue
-	}
-
-	// function body must be type-checked after global declarations
-	// (functions implemented elsewhere have no body)
-	if !check.conf.IgnoreFuncBodies && fdecl.Body != nil {
-		check.later(obj.name, decl, sig, fdecl.Body)
-	}
-}
-
-func (check *Checker) declStmt(decl ast.Decl) {
-	pkg := check.pkg
-
-	switch d := decl.(type) {
-	case *ast.BadDecl:
-		// ignore
-
-	case *ast.GenDecl:
-		var last *ast.ValueSpec // last ValueSpec with type or init exprs seen
-		for iota, spec := range d.Specs {
-			switch s := spec.(type) {
-			case *ast.ValueSpec:
-				switch d.Tok {
-				case token.CONST:
-					// determine which init exprs to use
-					switch {
-					case s.Type != nil || len(s.Values) > 0:
-						last = s
-					case last == nil:
-						last = new(ast.ValueSpec) // make sure last exists
-					}
-
-					// declare all constants
-					lhs := make([]*Const, len(s.Names))
-					for i, name := range s.Names {
-						obj := NewConst(name.Pos(), pkg, name.Name, nil, constant.MakeInt64(int64(iota)))
-						lhs[i] = obj
-
-						var init ast.Expr
-						if i < len(last.Values) {
-							init = last.Values[i]
-						}
-
-						check.constDecl(obj, last.Type, init)
-					}
-
-					check.arityMatch(s, last)
-
-					// spec: "The scope of a constant or variable identifier declared
-					// inside a function begins at the end of the ConstSpec or VarSpec
-					// (ShortVarDecl for short variable declarations) and ends at the
-					// end of the innermost containing block."
-					scopePos := s.End()
-					for i, name := range s.Names {
-						check.declare(check.scope, name, lhs[i], scopePos)
-					}
-
-				case token.VAR:
-					lhs0 := make([]*Var, len(s.Names))
-					for i, name := range s.Names {
-						lhs0[i] = NewVar(name.Pos(), pkg, name.Name, nil)
-					}
-
-					// initialize all variables
-					for i, obj := range lhs0 {
-						var lhs []*Var
-						var init ast.Expr
-						switch len(s.Values) {
-						case len(s.Names):
-							// lhs and rhs match
-							init = s.Values[i]
-						case 1:
-							// rhs is expected to be a multi-valued expression
-							lhs = lhs0
-							init = s.Values[0]
-						default:
-							if i < len(s.Values) {
-								init = s.Values[i]
-							}
-						}
-						check.varDecl(obj, lhs, s.Type, init)
-						if len(s.Values) == 1 {
-							// If we have a single lhs variable we are done either way.
-							// If we have a single rhs expression, it must be a multi-
-							// valued expression, in which case handling the first lhs
-							// variable will cause all lhs variables to have a type
-							// assigned, and we are done as well.
-							if debug {
-								for _, obj := range lhs0 {
-									assert(obj.typ != nil)
-								}
-							}
-							break
-						}
-					}
-
-					check.arityMatch(s, nil)
-
-					// declare all variables
-					// (only at this point are the variable scopes (parents) set)
-					scopePos := s.End() // see constant declarations
-					for i, name := range s.Names {
-						// see constant declarations
-						check.declare(check.scope, name, lhs0[i], scopePos)
-					}
-
-				default:
-					check.invalidAST(s.Pos(), "invalid token %s", d.Tok)
-				}
-
-			case *ast.TypeSpec:
-				obj := NewTypeName(s.Name.Pos(), pkg, s.Name.Name, nil)
-				// spec: "The scope of a type identifier declared inside a function
-				// begins at the identifier in the TypeSpec and ends at the end of
-				// the innermost containing block."
-				scopePos := s.Name.Pos()
-				check.declare(check.scope, s.Name, obj, scopePos)
-				check.typeDecl(obj, s.Type, nil, nil)
-
-			default:
-				check.invalidAST(s.Pos(), "const, type, or var declaration expected")
-			}
-		}
-
-	default:
-		check.invalidAST(d.Pos(), "unknown ast.Decl node %T", d)
-	}
-}
diff --git a/src/go/types/errors.go b/src/go/types/errors.go
deleted file mode 100644
index 0c0049b..0000000
--- a/src/go/types/errors.go
+++ /dev/null
@@ -1,103 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements various error reporters.
-
-package types
-
-import (
-	"fmt"
-	"go/ast"
-	"go/token"
-	"strings"
-)
-
-func assert(p bool) {
-	if !p {
-		panic("assertion failed")
-	}
-}
-
-func unreachable() {
-	panic("unreachable")
-}
-
-func (check *Checker) qualifier(pkg *Package) string {
-	if pkg != check.pkg {
-		return pkg.path
-	}
-	return ""
-}
-
-func (check *Checker) sprintf(format string, args ...interface{}) string {
-	for i, arg := range args {
-		switch a := arg.(type) {
-		case nil:
-			arg = "<nil>"
-		case operand:
-			panic("internal error: should always pass *operand")
-		case *operand:
-			arg = operandString(a, check.qualifier)
-		case token.Pos:
-			arg = check.fset.Position(a).String()
-		case ast.Expr:
-			arg = ExprString(a)
-		case Object:
-			arg = ObjectString(a, check.qualifier)
-		case Type:
-			arg = TypeString(a, check.qualifier)
-		}
-		args[i] = arg
-	}
-	return fmt.Sprintf(format, args...)
-}
-
-func (check *Checker) trace(pos token.Pos, format string, args ...interface{}) {
-	fmt.Printf("%s:\t%s%s\n",
-		check.fset.Position(pos),
-		strings.Repeat(".  ", check.indent),
-		check.sprintf(format, args...),
-	)
-}
-
-// dump is only needed for debugging
-func (check *Checker) dump(format string, args ...interface{}) {
-	fmt.Println(check.sprintf(format, args...))
-}
-
-func (check *Checker) err(pos token.Pos, msg string, soft bool) {
-	err := Error{check.fset, pos, msg, soft}
-	if check.firstErr == nil {
-		check.firstErr = err
-	}
-	f := check.conf.Error
-	if f == nil {
-		panic(bailout{}) // report only first error
-	}
-	f(err)
-}
-
-func (check *Checker) error(pos token.Pos, msg string) {
-	check.err(pos, msg, false)
-}
-
-func (check *Checker) errorf(pos token.Pos, format string, args ...interface{}) {
-	check.err(pos, check.sprintf(format, args...), false)
-}
-
-func (check *Checker) softErrorf(pos token.Pos, format string, args ...interface{}) {
-	check.err(pos, check.sprintf(format, args...), true)
-}
-
-func (check *Checker) invalidAST(pos token.Pos, format string, args ...interface{}) {
-	check.errorf(pos, "invalid AST: "+format, args...)
-}
-
-func (check *Checker) invalidArg(pos token.Pos, format string, args ...interface{}) {
-	check.errorf(pos, "invalid argument: "+format, args...)
-}
-
-func (check *Checker) invalidOp(pos token.Pos, format string, args ...interface{}) {
-	check.errorf(pos, "invalid operation: "+format, args...)
-}
diff --git a/src/go/types/eval.go b/src/go/types/eval.go
deleted file mode 100644
index 7b42ff1..0000000
--- a/src/go/types/eval.go
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package types
-
-import (
-	"fmt"
-	"go/parser"
-	"go/token"
-)
-
-// Eval returns the type and, if constant, the value for the
-// expression expr, evaluated at position pos of package pkg,
-// which must have been derived from type-checking an AST with
-// complete position information relative to the provided file
-// set.
-//
-// If the expression contains function literals, their bodies
-// are ignored (i.e., the bodies are not type-checked).
-//
-// If pkg == nil, the Universe scope is used and the provided
-// position pos is ignored. If pkg != nil, and pos is invalid,
-// the package scope is used. Otherwise, pos must belong to the
-// package.
-//
-// An error is returned if pos is not within the package or
-// if the node cannot be evaluated.
-//
-// Note: Eval should not be used instead of running Check to compute
-// types and values, but in addition to Check. Eval will re-evaluate
-// its argument each time, and it also does not know about the context
-// in which an expression is used (e.g., an assignment). Thus, top-
-// level untyped constants will return an untyped type rather then the
-// respective context-specific type.
-//
-func Eval(fset *token.FileSet, pkg *Package, pos token.Pos, expr string) (tv TypeAndValue, err error) {
-	// determine scope
-	var scope *Scope
-	if pkg == nil {
-		scope = Universe
-		pos = token.NoPos
-	} else if !pos.IsValid() {
-		scope = pkg.scope
-	} else {
-		// The package scope extent (position information) may be
-		// incorrect (files spread accross a wide range of fset
-		// positions) - ignore it and just consider its children
-		// (file scopes).
-		for _, fscope := range pkg.scope.children {
-			if scope = fscope.Innermost(pos); scope != nil {
-				break
-			}
-		}
-		if scope == nil || debug {
-			s := scope
-			for s != nil && s != pkg.scope {
-				s = s.parent
-			}
-			// s == nil || s == pkg.scope
-			if s == nil {
-				return TypeAndValue{}, fmt.Errorf("no position %s found in package %s", fset.Position(pos), pkg.name)
-			}
-		}
-	}
-
-	// parse expressions
-	node, err := parser.ParseExprFrom(fset, "eval", expr, 0)
-	if err != nil {
-		return TypeAndValue{}, err
-	}
-
-	// initialize checker
-	check := NewChecker(nil, fset, pkg, nil)
-	check.scope = scope
-	check.pos = pos
-	defer check.handleBailout(&err)
-
-	// evaluate node
-	var x operand
-	check.rawExpr(&x, node, nil)
-	return TypeAndValue{x.mode, x.typ, x.val}, err
-}
diff --git a/src/go/types/eval_test.go b/src/go/types/eval_test.go
deleted file mode 100644
index 7e0be43..0000000
--- a/src/go/types/eval_test.go
+++ /dev/null
@@ -1,188 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains tests for Eval.
-
-package types_test
-
-import (
-	"go/ast"
-	"go/importer"
-	"go/parser"
-	"go/token"
-	"internal/testenv"
-	"strings"
-	"testing"
-
-	. "go/types"
-)
-
-func testEval(t *testing.T, fset *token.FileSet, pkg *Package, pos token.Pos, expr string, typ Type, typStr, valStr string) {
-	gotTv, err := Eval(fset, pkg, pos, expr)
-	if err != nil {
-		t.Errorf("Eval(%q) failed: %s", expr, err)
-		return
-	}
-	if gotTv.Type == nil {
-		t.Errorf("Eval(%q) got nil type but no error", expr)
-		return
-	}
-
-	// compare types
-	if typ != nil {
-		// we have a type, check identity
-		if !Identical(gotTv.Type, typ) {
-			t.Errorf("Eval(%q) got type %s, want %s", expr, gotTv.Type, typ)
-			return
-		}
-	} else {
-		// we have a string, compare type string
-		gotStr := gotTv.Type.String()
-		if gotStr != typStr {
-			t.Errorf("Eval(%q) got type %s, want %s", expr, gotStr, typStr)
-			return
-		}
-	}
-
-	// compare values
-	gotStr := ""
-	if gotTv.Value != nil {
-		gotStr = gotTv.Value.String()
-	}
-	if gotStr != valStr {
-		t.Errorf("Eval(%q) got value %s, want %s", expr, gotStr, valStr)
-	}
-}
-
-func TestEvalBasic(t *testing.T) {
-	fset := token.NewFileSet()
-	for _, typ := range Typ[Bool : String+1] {
-		testEval(t, fset, nil, token.NoPos, typ.Name(), typ, "", "")
-	}
-}
-
-func TestEvalComposite(t *testing.T) {
-	fset := token.NewFileSet()
-	for _, test := range independentTestTypes {
-		testEval(t, fset, nil, token.NoPos, test.src, nil, test.str, "")
-	}
-}
-
-func TestEvalArith(t *testing.T) {
-	var tests = []string{
-		`true`,
-		`false == false`,
-		`12345678 + 87654321 == 99999999`,
-		`10 * 20 == 200`,
-		`(1<<1000)*2 >> 100 == 2<<900`,
-		`"foo" + "bar" == "foobar"`,
-		`"abc" <= "bcd"`,
-		`len([10]struct{}{}) == 2*5`,
-	}
-	fset := token.NewFileSet()
-	for _, test := range tests {
-		testEval(t, fset, nil, token.NoPos, test, Typ[UntypedBool], "", "true")
-	}
-}
-
-func TestEvalPos(t *testing.T) {
-	testenv.MustHaveGoBuild(t)
-
-	// The contents of /*-style comments are of the form
-	//	expr => value, type
-	// where value may be the empty string.
-	// Each expr is evaluated at the position of the comment
-	// and the result is compared with the expected value
-	// and type.
-	var sources = []string{
-		`
-		package p
-		import "fmt"
-		import m "math"
-		const c = 3.0
-		type T []int
-		func f(a int, s string) float64 {
-			fmt.Println("calling f")
-			_ = m.Pi // use package math
-			const d int = c + 1
-			var x int
-			x = a + len(s)
-			return float64(x)
-			/* true => true, untyped bool */
-			/* fmt.Println => , func(a ...interface{}) (n int, err error) */
-			/* c => 3, untyped float */
-			/* T => , p.T */
-			/* a => , int */
-			/* s => , string */
-			/* d => 4, int */
-			/* x => , int */
-			/* d/c => 1, int */
-			/* c/2 => 3/2, untyped float */
-			/* m.Pi < m.E => false, untyped bool */
-		}
-		`,
-		`
-		package p
-		/* c => 3, untyped float */
-		type T1 /* T1 => , p.T1 */ struct {}
-		var v1 /* v1 => , int */ = 42
-		func /* f1 => , func(v1 float64) */ f1(v1 float64) {
-			/* f1 => , func(v1 float64) */
-			/* v1 => , float64 */
-			var c /* c => 3, untyped float */ = "foo" /* c => , string */
-			{
-				var c struct {
-					c /* c => , string */ int
-				}
-				/* c => , struct{c int} */
-				_ = c
-			}
-			_ = func(a, b, c int) /* c => , string */ {
-				/* c => , int */
-			}
-			_ = c
-			type FT /* FT => , p.FT */ interface{}
-		}
-		`,
-		`
-		package p
-		/* T => , p.T */
-		`,
-	}
-
-	fset := token.NewFileSet()
-	var files []*ast.File
-	for i, src := range sources {
-		file, err := parser.ParseFile(fset, "p", src, parser.ParseComments)
-		if err != nil {
-			t.Fatalf("could not parse file %d: %s", i, err)
-		}
-		files = append(files, file)
-	}
-
-	conf := Config{Importer: importer.Default()}
-	pkg, err := conf.Check("p", fset, files, nil)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	for _, file := range files {
-		for _, group := range file.Comments {
-			for _, comment := range group.List {
-				s := comment.Text
-				if len(s) >= 4 && s[:2] == "/*" && s[len(s)-2:] == "*/" {
-					str, typ := split(s[2:len(s)-2], ", ")
-					str, val := split(str, "=>")
-					testEval(t, fset, pkg, comment.Pos(), str, nil, typ, val)
-				}
-			}
-		}
-	}
-}
-
-// split splits string s at the first occurrence of s.
-func split(s, sep string) (string, string) {
-	i := strings.Index(s, sep)
-	return strings.TrimSpace(s[:i]), strings.TrimSpace(s[i+len(sep):])
-}
diff --git a/src/go/types/example_test.go b/src/go/types/example_test.go
deleted file mode 100644
index 8882e50..0000000
--- a/src/go/types/example_test.go
+++ /dev/null
@@ -1,312 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Only run where builders (build.golang.org) have
-// access to compiled packages for import.
-//
-// +build !arm,!arm64,!nacl
-
-package types_test
-
-// This file shows examples of basic usage of the go/types API.
-//
-// To locate a Go package, use (*go/build.Context).Import.
-// To load, parse, and type-check a complete Go program
-// from source, use golang.org/x/tools/go/loader.
-
-import (
-	"bytes"
-	"fmt"
-	"go/ast"
-	"go/format"
-	"go/importer"
-	"go/parser"
-	"go/token"
-	"go/types"
-	"log"
-	"regexp"
-	"sort"
-	"strings"
-)
-
-// ExampleScope prints the tree of Scopes of a package created from a
-// set of parsed files.
-func ExampleScope() {
-	// Parse the source files for a package.
-	fset := token.NewFileSet()
-	var files []*ast.File
-	for _, file := range []struct{ name, input string }{
-		{"main.go", `
-package main
-import "fmt"
-func main() {
-	freezing := FToC(-18)
-	fmt.Println(freezing, Boiling) }
-`},
-		{"celsius.go", `
-package main
-import "fmt"
-type Celsius float64
-func (c Celsius) String() string { return fmt.Sprintf("%g°C", c) }
-func FToC(f float64) Celsius { return Celsius(f - 32 / 9 * 5) }
-const Boiling Celsius = 100
-`},
-	} {
-		f, err := parser.ParseFile(fset, file.name, file.input, 0)
-		if err != nil {
-			log.Fatal(err)
-		}
-		files = append(files, f)
-	}
-
-	// Type-check a package consisting of these files.
-	// Type information for the imported "fmt" package
-	// comes from $GOROOT/pkg/$GOOS_$GOOARCH/fmt.a.
-	conf := types.Config{Importer: importer.Default()}
-	pkg, err := conf.Check("temperature", fset, files, nil)
-	if err != nil {
-		log.Fatal(err)
-	}
-
-	// Print the tree of scopes.
-	// For determinism, we redact addresses.
-	var buf bytes.Buffer
-	pkg.Scope().WriteTo(&buf, 0, true)
-	rx := regexp.MustCompile(` 0x[a-fA-F0-9]*`)
-	fmt.Println(rx.ReplaceAllString(buf.String(), ""))
-
-	// Output:
-	// package "temperature" scope {
-	// .  const temperature.Boiling temperature.Celsius
-	// .  type temperature.Celsius float64
-	// .  func temperature.FToC(f float64) temperature.Celsius
-	// .  func temperature.main()
-	//
-	// .  main.go scope {
-	// .  .  package fmt
-	//
-	// .  .  function scope {
-	// .  .  .  var freezing temperature.Celsius
-	// .  .  }.  }
-	// .  celsius.go scope {
-	// .  .  package fmt
-	//
-	// .  .  function scope {
-	// .  .  .  var c temperature.Celsius
-	// .  .  }
-	// .  .  function scope {
-	// .  .  .  var f float64
-	// .  .  }.  }}
-}
-
-// ExampleMethodSet prints the method sets of various types.
-func ExampleMethodSet() {
-	// Parse a single source file.
-	const input = `
-package temperature
-import "fmt"
-type Celsius float64
-func (c Celsius) String() string  { return fmt.Sprintf("%g°C", c) }
-func (c *Celsius) SetF(f float64) { *c = Celsius(f - 32 / 9 * 5) }
-`
-	fset := token.NewFileSet()
-	f, err := parser.ParseFile(fset, "celsius.go", input, 0)
-	if err != nil {
-		log.Fatal(err)
-	}
-
-	// Type-check a package consisting of this file.
-	// Type information for the imported packages
-	// comes from $GOROOT/pkg/$GOOS_$GOOARCH/fmt.a.
-	conf := types.Config{Importer: importer.Default()}
-	pkg, err := conf.Check("temperature", fset, []*ast.File{f}, nil)
-	if err != nil {
-		log.Fatal(err)
-	}
-
-	// Print the method sets of Celsius and *Celsius.
-	celsius := pkg.Scope().Lookup("Celsius").Type()
-	for _, t := range []types.Type{celsius, types.NewPointer(celsius)} {
-		fmt.Printf("Method set of %s:\n", t)
-		mset := types.NewMethodSet(t)
-		for i := 0; i < mset.Len(); i++ {
-			fmt.Println(mset.At(i))
-		}
-		fmt.Println()
-	}
-
-	// Output:
-	// Method set of temperature.Celsius:
-	// method (temperature.Celsius) String() string
-	//
-	// Method set of *temperature.Celsius:
-	// method (*temperature.Celsius) SetF(f float64)
-	// method (*temperature.Celsius) String() string
-}
-
-// ExampleInfo prints various facts recorded by the type checker in a
-// types.Info struct: definitions of and references to each named object,
-// and the type, value, and mode of every expression in the package.
-func ExampleInfo() {
-	// Parse a single source file.
-	const input = `
-package fib
-
-type S string
-
-var a, b, c = len(b), S(c), "hello"
-
-func fib(x int) int {
-	if x < 2 {
-		return x
-	}
-	return fib(x-1) - fib(x-2)
-}`
-	fset := token.NewFileSet()
-	f, err := parser.ParseFile(fset, "fib.go", input, 0)
-	if err != nil {
-		log.Fatal(err)
-	}
-
-	// Type-check the package.
-	// We create an empty map for each kind of input
-	// we're interested in, and Check populates them.
-	info := types.Info{
-		Types: make(map[ast.Expr]types.TypeAndValue),
-		Defs:  make(map[*ast.Ident]types.Object),
-		Uses:  make(map[*ast.Ident]types.Object),
-	}
-	var conf types.Config
-	pkg, err := conf.Check("fib", fset, []*ast.File{f}, &info)
-	if err != nil {
-		log.Fatal(err)
-	}
-
-	// Print package-level variables in initialization order.
-	fmt.Printf("InitOrder: %v\n\n", info.InitOrder)
-
-	// For each named object, print the line and
-	// column of its definition and each of its uses.
-	fmt.Println("Defs and Uses of each named object:")
-	usesByObj := make(map[types.Object][]string)
-	for id, obj := range info.Uses {
-		posn := fset.Position(id.Pos())
-		lineCol := fmt.Sprintf("%d:%d", posn.Line, posn.Column)
-		usesByObj[obj] = append(usesByObj[obj], lineCol)
-	}
-	var items []string
-	for obj, uses := range usesByObj {
-		sort.Strings(uses)
-		item := fmt.Sprintf("%s:\n  defined at %s\n  used at %s",
-			types.ObjectString(obj, types.RelativeTo(pkg)),
-			fset.Position(obj.Pos()),
-			strings.Join(uses, ", "))
-		items = append(items, item)
-	}
-	sort.Strings(items) // sort by line:col, in effect
-	fmt.Println(strings.Join(items, "\n"))
-	fmt.Println()
-
-	fmt.Println("Types and Values of each expression:")
-	items = nil
-	for expr, tv := range info.Types {
-		var buf bytes.Buffer
-		posn := fset.Position(expr.Pos())
-		tvstr := tv.Type.String()
-		if tv.Value != nil {
-			tvstr += " = " + tv.Value.String()
-		}
-		// line:col | expr | mode : type = value
-		fmt.Fprintf(&buf, "%2d:%2d | %-19s | %-7s : %s",
-			posn.Line, posn.Column, exprString(fset, expr),
-			mode(tv), tvstr)
-		items = append(items, buf.String())
-	}
-	sort.Strings(items)
-	fmt.Println(strings.Join(items, "\n"))
-
-	// Output:
-	// InitOrder: [c = "hello" b = S(c) a = len(b)]
-	//
-	// Defs and Uses of each named object:
-	// builtin len:
-	//   defined at -
-	//   used at 6:15
-	// func fib(x int) int:
-	//   defined at fib.go:8:6
-	//   used at 12:20, 12:9
-	// type S string:
-	//   defined at fib.go:4:6
-	//   used at 6:23
-	// type int int:
-	//   defined at -
-	//   used at 8:12, 8:17
-	// type string string:
-	//   defined at -
-	//   used at 4:8
-	// var b S:
-	//   defined at fib.go:6:8
-	//   used at 6:19
-	// var c string:
-	//   defined at fib.go:6:11
-	//   used at 6:25
-	// var x int:
-	//   defined at fib.go:8:10
-	//   used at 10:10, 12:13, 12:24, 9:5
-	//
-	// Types and Values of each expression:
-	//  4: 8 | string              | type    : string
-	//  6:15 | len                 | builtin : func(string) int
-	//  6:15 | len(b)              | value   : int
-	//  6:19 | b                   | var     : fib.S
-	//  6:23 | S                   | type    : fib.S
-	//  6:23 | S(c)                | value   : fib.S
-	//  6:25 | c                   | var     : string
-	//  6:29 | "hello"             | value   : string = "hello"
-	//  8:12 | int                 | type    : int
-	//  8:17 | int                 | type    : int
-	//  9: 5 | x                   | var     : int
-	//  9: 5 | x < 2               | value   : untyped bool
-	//  9: 9 | 2                   | value   : int = 2
-	// 10:10 | x                   | var     : int
-	// 12: 9 | fib                 | value   : func(x int) int
-	// 12: 9 | fib(x - 1)          | value   : int
-	// 12: 9 | fib(x-1) - fib(x-2) | value   : int
-	// 12:13 | x                   | var     : int
-	// 12:13 | x - 1               | value   : int
-	// 12:15 | 1                   | value   : int = 1
-	// 12:20 | fib                 | value   : func(x int) int
-	// 12:20 | fib(x - 2)          | value   : int
-	// 12:24 | x                   | var     : int
-	// 12:24 | x - 2               | value   : int
-	// 12:26 | 2                   | value   : int = 2
-}
-
-func mode(tv types.TypeAndValue) string {
-	switch {
-	case tv.IsVoid():
-		return "void"
-	case tv.IsType():
-		return "type"
-	case tv.IsBuiltin():
-		return "builtin"
-	case tv.IsNil():
-		return "nil"
-	case tv.Assignable():
-		if tv.Addressable() {
-			return "var"
-		}
-		return "mapindex"
-	case tv.IsValue():
-		return "value"
-	default:
-		return "unknown"
-	}
-}
-
-func exprString(fset *token.FileSet, expr ast.Expr) string {
-	var buf bytes.Buffer
-	format.Node(&buf, fset, expr)
-	return buf.String()
-}
diff --git a/src/go/types/expr.go b/src/go/types/expr.go
deleted file mode 100644
index 7d00dd5..0000000
--- a/src/go/types/expr.go
+++ /dev/null
@@ -1,1496 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements typechecking of expressions.
-
-package types
-
-import (
-	"fmt"
-	"go/ast"
-	"go/constant"
-	"go/token"
-	"math"
-)
-
-/*
-Basic algorithm:
-
-Expressions are checked recursively, top down. Expression checker functions
-are generally of the form:
-
-  func f(x *operand, e *ast.Expr, ...)
-
-where e is the expression to be checked, and x is the result of the check.
-The check performed by f may fail in which case x.mode == invalid, and
-related error messages will have been issued by f.
-
-If a hint argument is present, it is the composite literal element type
-of an outer composite literal; it is used to type-check composite literal
-elements that have no explicit type specification in the source
-(e.g.: []T{{...}, {...}}, the hint is the type T in this case).
-
-All expressions are checked via rawExpr, which dispatches according
-to expression kind. Upon returning, rawExpr is recording the types and
-constant values for all expressions that have an untyped type (those types
-may change on the way up in the expression tree). Usually these are constants,
-but the results of comparisons or non-constant shifts of untyped constants
-may also be untyped, but not constant.
-
-Untyped expressions may eventually become fully typed (i.e., not untyped),
-typically when the value is assigned to a variable, or is used otherwise.
-The updateExprType method is used to record this final type and update
-the recorded types: the type-checked expression tree is again traversed down,
-and the new type is propagated as needed. Untyped constant expression values
-that become fully typed must now be representable by the full type (constant
-sub-expression trees are left alone except for their roots). This mechanism
-ensures that a client sees the actual (run-time) type an untyped value would
-have. It also permits type-checking of lhs shift operands "as if the shift
-were not present": when updateExprType visits an untyped lhs shift operand
-and assigns it it's final type, that type must be an integer type, and a
-constant lhs must be representable as an integer.
-
-When an expression gets its final type, either on the way out from rawExpr,
-on the way down in updateExprType, or at the end of the type checker run,
-the type (and constant value, if any) is recorded via Info.Types, if present.
-*/
-
-type opPredicates map[token.Token]func(Type) bool
-
-var unaryOpPredicates = opPredicates{
-	token.ADD: isNumeric,
-	token.SUB: isNumeric,
-	token.XOR: isInteger,
-	token.NOT: isBoolean,
-}
-
-func (check *Checker) op(m opPredicates, x *operand, op token.Token) bool {
-	if pred := m[op]; pred != nil {
-		if !pred(x.typ) {
-			check.invalidOp(x.pos(), "operator %s not defined for %s", op, x)
-			return false
-		}
-	} else {
-		check.invalidAST(x.pos(), "unknown operator %s", op)
-		return false
-	}
-	return true
-}
-
-// The unary expression e may be nil. It's passed in for better error messages only.
-func (check *Checker) unary(x *operand, e *ast.UnaryExpr, op token.Token) {
-	switch op {
-	case token.AND:
-		// spec: "As an exception to the addressability
-		// requirement x may also be a composite literal."
-		if _, ok := unparen(x.expr).(*ast.CompositeLit); !ok && x.mode != variable {
-			check.invalidOp(x.pos(), "cannot take address of %s", x)
-			x.mode = invalid
-			return
-		}
-		x.mode = value
-		x.typ = &Pointer{base: x.typ}
-		return
-
-	case token.ARROW:
-		typ, ok := x.typ.Underlying().(*Chan)
-		if !ok {
-			check.invalidOp(x.pos(), "cannot receive from non-channel %s", x)
-			x.mode = invalid
-			return
-		}
-		if typ.dir == SendOnly {
-			check.invalidOp(x.pos(), "cannot receive from send-only channel %s", x)
-			x.mode = invalid
-			return
-		}
-		x.mode = commaok
-		x.typ = typ.elem
-		check.hasCallOrRecv = true
-		return
-	}
-
-	if !check.op(unaryOpPredicates, x, op) {
-		x.mode = invalid
-		return
-	}
-
-	if x.mode == constant_ {
-		typ := x.typ.Underlying().(*Basic)
-		var prec uint
-		if isUnsigned(typ) {
-			prec = uint(check.conf.sizeof(typ) * 8)
-		}
-		x.val = constant.UnaryOp(op, x.val, prec)
-		// Typed constants must be representable in
-		// their type after each constant operation.
-		if isTyped(typ) {
-			if e != nil {
-				x.expr = e // for better error message
-			}
-			check.representable(x, typ)
-		}
-		return
-	}
-
-	x.mode = value
-	// x.typ remains unchanged
-}
-
-func isShift(op token.Token) bool {
-	return op == token.SHL || op == token.SHR
-}
-
-func isComparison(op token.Token) bool {
-	// Note: tokens are not ordered well to make this much easier
-	switch op {
-	case token.EQL, token.NEQ, token.LSS, token.LEQ, token.GTR, token.GEQ:
-		return true
-	}
-	return false
-}
-
-func fitsFloat32(x constant.Value) bool {
-	f32, _ := constant.Float32Val(x)
-	f := float64(f32)
-	return !math.IsInf(f, 0)
-}
-
-func roundFloat32(x constant.Value) constant.Value {
-	f32, _ := constant.Float32Val(x)
-	f := float64(f32)
-	if !math.IsInf(f, 0) {
-		return constant.MakeFloat64(f)
-	}
-	return nil
-}
-
-func fitsFloat64(x constant.Value) bool {
-	f, _ := constant.Float64Val(x)
-	return !math.IsInf(f, 0)
-}
-
-func roundFloat64(x constant.Value) constant.Value {
-	f, _ := constant.Float64Val(x)
-	if !math.IsInf(f, 0) {
-		return constant.MakeFloat64(f)
-	}
-	return nil
-}
-
-// representableConst reports whether x can be represented as
-// value of the given basic type kind and for the configuration
-// provided (only needed for int/uint sizes).
-//
-// If rounded != nil, *rounded is set to the rounded value of x for
-// representable floating-point values; it is left alone otherwise.
-// It is ok to provide the addressof the first argument for rounded.
-func representableConst(x constant.Value, conf *Config, as BasicKind, rounded *constant.Value) bool {
-	switch x.Kind() {
-	case constant.Unknown:
-		return true
-
-	case constant.Bool:
-		return as == Bool || as == UntypedBool
-
-	case constant.Int:
-		if x, ok := constant.Int64Val(x); ok {
-			switch as {
-			case Int:
-				var s = uint(conf.sizeof(Typ[as])) * 8
-				return int64(-1)<<(s-1) <= x && x <= int64(1)<<(s-1)-1
-			case Int8:
-				const s = 8
-				return -1<<(s-1) <= x && x <= 1<<(s-1)-1
-			case Int16:
-				const s = 16
-				return -1<<(s-1) <= x && x <= 1<<(s-1)-1
-			case Int32:
-				const s = 32
-				return -1<<(s-1) <= x && x <= 1<<(s-1)-1
-			case Int64:
-				return true
-			case Uint, Uintptr:
-				if s := uint(conf.sizeof(Typ[as])) * 8; s < 64 {
-					return 0 <= x && x <= int64(1)<<s-1
-				}
-				return 0 <= x
-			case Uint8:
-				const s = 8
-				return 0 <= x && x <= 1<<s-1
-			case Uint16:
-				const s = 16
-				return 0 <= x && x <= 1<<s-1
-			case Uint32:
-				const s = 32
-				return 0 <= x && x <= 1<<s-1
-			case Uint64:
-				return 0 <= x
-			case Float32, Float64, Complex64, Complex128,
-				UntypedInt, UntypedFloat, UntypedComplex:
-				return true
-			}
-		}
-
-		n := constant.BitLen(x)
-		switch as {
-		case Uint, Uintptr:
-			var s = uint(conf.sizeof(Typ[as])) * 8
-			return constant.Sign(x) >= 0 && n <= int(s)
-		case Uint64:
-			return constant.Sign(x) >= 0 && n <= 64
-		case Float32, Complex64:
-			if rounded == nil {
-				return fitsFloat32(x)
-			}
-			r := roundFloat32(x)
-			if r != nil {
-				*rounded = r
-				return true
-			}
-		case Float64, Complex128:
-			if rounded == nil {
-				return fitsFloat64(x)
-			}
-			r := roundFloat64(x)
-			if r != nil {
-				*rounded = r
-				return true
-			}
-		case UntypedInt, UntypedFloat, UntypedComplex:
-			return true
-		}
-
-	case constant.Float:
-		switch as {
-		case Float32, Complex64:
-			if rounded == nil {
-				return fitsFloat32(x)
-			}
-			r := roundFloat32(x)
-			if r != nil {
-				*rounded = r
-				return true
-			}
-		case Float64, Complex128:
-			if rounded == nil {
-				return fitsFloat64(x)
-			}
-			r := roundFloat64(x)
-			if r != nil {
-				*rounded = r
-				return true
-			}
-		case UntypedFloat, UntypedComplex:
-			return true
-		}
-
-	case constant.Complex:
-		switch as {
-		case Complex64:
-			if rounded == nil {
-				return fitsFloat32(constant.Real(x)) && fitsFloat32(constant.Imag(x))
-			}
-			re := roundFloat32(constant.Real(x))
-			im := roundFloat32(constant.Imag(x))
-			if re != nil && im != nil {
-				*rounded = constant.BinaryOp(re, token.ADD, constant.MakeImag(im))
-				return true
-			}
-		case Complex128:
-			if rounded == nil {
-				return fitsFloat64(constant.Real(x)) && fitsFloat64(constant.Imag(x))
-			}
-			re := roundFloat64(constant.Real(x))
-			im := roundFloat64(constant.Imag(x))
-			if re != nil && im != nil {
-				*rounded = constant.BinaryOp(re, token.ADD, constant.MakeImag(im))
-				return true
-			}
-		case UntypedComplex:
-			return true
-		}
-
-	case constant.String:
-		return as == String || as == UntypedString
-
-	default:
-		unreachable()
-	}
-
-	return false
-}
-
-// representable checks that a constant operand is representable in the given basic type.
-func (check *Checker) representable(x *operand, typ *Basic) {
-	assert(x.mode == constant_)
-	if !representableConst(x.val, check.conf, typ.kind, &x.val) {
-		var msg string
-		if isNumeric(x.typ) && isNumeric(typ) {
-			// numeric conversion : error msg
-			//
-			// integer -> integer : overflows
-			// integer -> float   : overflows (actually not possible)
-			// float   -> integer : truncated
-			// float   -> float   : overflows
-			//
-			if !isInteger(x.typ) && isInteger(typ) {
-				msg = "%s truncated to %s"
-			} else {
-				msg = "%s overflows %s"
-			}
-		} else {
-			msg = "cannot convert %s to %s"
-		}
-		check.errorf(x.pos(), msg, x, typ)
-		x.mode = invalid
-	}
-}
-
-// updateExprType updates the type of x to typ and invokes itself
-// recursively for the operands of x, depending on expression kind.
-// If typ is still an untyped and not the final type, updateExprType
-// only updates the recorded untyped type for x and possibly its
-// operands. Otherwise (i.e., typ is not an untyped type anymore,
-// or it is the final type for x), the type and value are recorded.
-// Also, if x is a constant, it must be representable as a value of typ,
-// and if x is the (formerly untyped) lhs operand of a non-constant
-// shift, it must be an integer value.
-//
-func (check *Checker) updateExprType(x ast.Expr, typ Type, final bool) {
-	old, found := check.untyped[x]
-	if !found {
-		return // nothing to do
-	}
-
-	// update operands of x if necessary
-	switch x := x.(type) {
-	case *ast.BadExpr,
-		*ast.FuncLit,
-		*ast.CompositeLit,
-		*ast.IndexExpr,
-		*ast.SliceExpr,
-		*ast.TypeAssertExpr,
-		*ast.StarExpr,
-		*ast.KeyValueExpr,
-		*ast.ArrayType,
-		*ast.StructType,
-		*ast.FuncType,
-		*ast.InterfaceType,
-		*ast.MapType,
-		*ast.ChanType:
-		// These expression are never untyped - nothing to do.
-		// The respective sub-expressions got their final types
-		// upon assignment or use.
-		if debug {
-			check.dump("%s: found old type(%s): %s (new: %s)", x.Pos(), x, old.typ, typ)
-			unreachable()
-		}
-		return
-
-	case *ast.CallExpr:
-		// Resulting in an untyped constant (e.g., built-in complex).
-		// The respective calls take care of calling updateExprType
-		// for the arguments if necessary.
-
-	case *ast.Ident, *ast.BasicLit, *ast.SelectorExpr:
-		// An identifier denoting a constant, a constant literal,
-		// or a qualified identifier (imported untyped constant).
-		// No operands to take care of.
-
-	case *ast.ParenExpr:
-		check.updateExprType(x.X, typ, final)
-
-	case *ast.UnaryExpr:
-		// If x is a constant, the operands were constants.
-		// They don't need to be updated since they never
-		// get "materialized" into a typed value; and they
-		// will be processed at the end of the type check.
-		if old.val != nil {
-			break
-		}
-		check.updateExprType(x.X, typ, final)
-
-	case *ast.BinaryExpr:
-		if old.val != nil {
-			break // see comment for unary expressions
-		}
-		if isComparison(x.Op) {
-			// The result type is independent of operand types
-			// and the operand types must have final types.
-		} else if isShift(x.Op) {
-			// The result type depends only on lhs operand.
-			// The rhs type was updated when checking the shift.
-			check.updateExprType(x.X, typ, final)
-		} else {
-			// The operand types match the result type.
-			check.updateExprType(x.X, typ, final)
-			check.updateExprType(x.Y, typ, final)
-		}
-
-	default:
-		unreachable()
-	}
-
-	// If the new type is not final and still untyped, just
-	// update the recorded type.
-	if !final && isUntyped(typ) {
-		old.typ = typ.Underlying().(*Basic)
-		check.untyped[x] = old
-		return
-	}
-
-	// Otherwise we have the final (typed or untyped type).
-	// Remove it from the map of yet untyped expressions.
-	delete(check.untyped, x)
-
-	// If x is the lhs of a shift, its final type must be integer.
-	// We already know from the shift check that it is representable
-	// as an integer if it is a constant.
-	if old.isLhs && !isInteger(typ) {
-		check.invalidOp(x.Pos(), "shifted operand %s (type %s) must be integer", x, typ)
-		return
-	}
-
-	// Everything's fine, record final type and value for x.
-	check.recordTypeAndValue(x, old.mode, typ, old.val)
-}
-
-// updateExprVal updates the value of x to val.
-func (check *Checker) updateExprVal(x ast.Expr, val constant.Value) {
-	if info, ok := check.untyped[x]; ok {
-		info.val = val
-		check.untyped[x] = info
-	}
-}
-
-// convertUntyped attempts to set the type of an untyped value to the target type.
-func (check *Checker) convertUntyped(x *operand, target Type) {
-	if x.mode == invalid || isTyped(x.typ) || target == Typ[Invalid] {
-		return
-	}
-
-	// TODO(gri) Sloppy code - clean up. This function is central
-	//           to assignment and expression checking.
-
-	if isUntyped(target) {
-		// both x and target are untyped
-		xkind := x.typ.(*Basic).kind
-		tkind := target.(*Basic).kind
-		if isNumeric(x.typ) && isNumeric(target) {
-			if xkind < tkind {
-				x.typ = target
-				check.updateExprType(x.expr, target, false)
-			}
-		} else if xkind != tkind {
-			goto Error
-		}
-		return
-	}
-
-	// typed target
-	switch t := target.Underlying().(type) {
-	case *Basic:
-		if x.mode == constant_ {
-			check.representable(x, t)
-			if x.mode == invalid {
-				return
-			}
-			// expression value may have been rounded - update if needed
-			// TODO(gri) A floating-point value may silently underflow to
-			// zero. If it was negative, the sign is lost. See issue 6898.
-			check.updateExprVal(x.expr, x.val)
-		} else {
-			// Non-constant untyped values may appear as the
-			// result of comparisons (untyped bool), intermediate
-			// (delayed-checked) rhs operands of shifts, and as
-			// the value nil.
-			switch x.typ.(*Basic).kind {
-			case UntypedBool:
-				if !isBoolean(target) {
-					goto Error
-				}
-			case UntypedInt, UntypedRune, UntypedFloat, UntypedComplex:
-				if !isNumeric(target) {
-					goto Error
-				}
-			case UntypedString:
-				// Non-constant untyped string values are not
-				// permitted by the spec and should not occur.
-				unreachable()
-			case UntypedNil:
-				// Unsafe.Pointer is a basic type that includes nil.
-				if !hasNil(target) {
-					goto Error
-				}
-			default:
-				goto Error
-			}
-		}
-	case *Interface:
-		if !x.isNil() && !t.Empty() /* empty interfaces are ok */ {
-			goto Error
-		}
-		// Update operand types to the default type rather then
-		// the target (interface) type: values must have concrete
-		// dynamic types. If the value is nil, keep it untyped
-		// (this is important for tools such as go vet which need
-		// the dynamic type for argument checking of say, print
-		// functions)
-		if x.isNil() {
-			target = Typ[UntypedNil]
-		} else {
-			// cannot assign untyped values to non-empty interfaces
-			if !t.Empty() {
-				goto Error
-			}
-			target = defaultType(x.typ)
-		}
-	case *Pointer, *Signature, *Slice, *Map, *Chan:
-		if !x.isNil() {
-			goto Error
-		}
-		// keep nil untyped - see comment for interfaces, above
-		target = Typ[UntypedNil]
-	default:
-		goto Error
-	}
-
-	x.typ = target
-	check.updateExprType(x.expr, target, true) // UntypedNils are final
-	return
-
-Error:
-	check.errorf(x.pos(), "cannot convert %s to %s", x, target)
-	x.mode = invalid
-}
-
-func (check *Checker) comparison(x, y *operand, op token.Token) {
-	// spec: "In any comparison, the first operand must be assignable
-	// to the type of the second operand, or vice versa."
-	err := ""
-	if x.assignableTo(check.conf, y.typ) || y.assignableTo(check.conf, x.typ) {
-		defined := false
-		switch op {
-		case token.EQL, token.NEQ:
-			// spec: "The equality operators == and != apply to operands that are comparable."
-			defined = Comparable(x.typ) || x.isNil() && hasNil(y.typ) || y.isNil() && hasNil(x.typ)
-		case token.LSS, token.LEQ, token.GTR, token.GEQ:
-			// spec: The ordering operators <, <=, >, and >= apply to operands that are ordered."
-			defined = isOrdered(x.typ)
-		default:
-			unreachable()
-		}
-		if !defined {
-			typ := x.typ
-			if x.isNil() {
-				typ = y.typ
-			}
-			err = check.sprintf("operator %s not defined for %s", op, typ)
-		}
-	} else {
-		err = check.sprintf("mismatched types %s and %s", x.typ, y.typ)
-	}
-
-	if err != "" {
-		check.errorf(x.pos(), "cannot compare %s %s %s (%s)", x.expr, op, y.expr, err)
-		x.mode = invalid
-		return
-	}
-
-	if x.mode == constant_ && y.mode == constant_ {
-		x.val = constant.MakeBool(constant.Compare(x.val, op, y.val))
-		// The operands are never materialized; no need to update
-		// their types.
-	} else {
-		x.mode = value
-		// The operands have now their final types, which at run-
-		// time will be materialized. Update the expression trees.
-		// If the current types are untyped, the materialized type
-		// is the respective default type.
-		check.updateExprType(x.expr, defaultType(x.typ), true)
-		check.updateExprType(y.expr, defaultType(y.typ), true)
-	}
-
-	// spec: "Comparison operators compare two operands and yield
-	//        an untyped boolean value."
-	x.typ = Typ[UntypedBool]
-}
-
-func (check *Checker) shift(x, y *operand, op token.Token) {
-	untypedx := isUntyped(x.typ)
-
-	// The lhs must be of integer type or be representable
-	// as an integer; otherwise the shift has no chance.
-	if !x.isInteger() {
-		check.invalidOp(x.pos(), "shifted operand %s must be integer", x)
-		x.mode = invalid
-		return
-	}
-
-	// spec: "The right operand in a shift expression must have unsigned
-	// integer type or be an untyped constant that can be converted to
-	// unsigned integer type."
-	switch {
-	case isInteger(y.typ) && isUnsigned(y.typ):
-		// nothing to do
-	case isUntyped(y.typ):
-		check.convertUntyped(y, Typ[UntypedInt])
-		if y.mode == invalid {
-			x.mode = invalid
-			return
-		}
-	default:
-		check.invalidOp(y.pos(), "shift count %s must be unsigned integer", y)
-		x.mode = invalid
-		return
-	}
-
-	if x.mode == constant_ {
-		if y.mode == constant_ {
-			// rhs must be an integer value
-			if !y.isInteger() {
-				check.invalidOp(y.pos(), "shift count %s must be unsigned integer", y)
-				x.mode = invalid
-				return
-			}
-			// rhs must be within reasonable bounds
-			const stupidShift = 1023 - 1 + 52 // so we can express smallestFloat64
-			s, ok := constant.Uint64Val(y.val)
-			if !ok || s > stupidShift {
-				check.invalidOp(y.pos(), "stupid shift count %s", y)
-				x.mode = invalid
-				return
-			}
-			// The lhs is representable as an integer but may not be an integer
-			// (e.g., 2.0, an untyped float) - this can only happen for untyped
-			// non-integer numeric constants. Correct the type so that the shift
-			// result is of integer type.
-			if !isInteger(x.typ) {
-				x.typ = Typ[UntypedInt]
-			}
-			x.val = constant.Shift(x.val, op, uint(s))
-			return
-		}
-
-		// non-constant shift with constant lhs
-		if untypedx {
-			// spec: "If the left operand of a non-constant shift
-			// expression is an untyped constant, the type of the
-			// constant is what it would be if the shift expression
-			// were replaced by its left operand alone.".
-			//
-			// Delay operand checking until we know the final type:
-			// The lhs expression must be in the untyped map, mark
-			// the entry as lhs shift operand.
-			info, found := check.untyped[x.expr]
-			assert(found)
-			info.isLhs = true
-			check.untyped[x.expr] = info
-			// keep x's type
-			x.mode = value
-			return
-		}
-	}
-
-	// constant rhs must be >= 0
-	if y.mode == constant_ && constant.Sign(y.val) < 0 {
-		check.invalidOp(y.pos(), "shift count %s must not be negative", y)
-	}
-
-	// non-constant shift - lhs must be an integer
-	if !isInteger(x.typ) {
-		check.invalidOp(x.pos(), "shifted operand %s must be integer", x)
-		x.mode = invalid
-		return
-	}
-
-	x.mode = value
-}
-
-var binaryOpPredicates = opPredicates{
-	token.ADD: func(typ Type) bool { return isNumeric(typ) || isString(typ) },
-	token.SUB: isNumeric,
-	token.MUL: isNumeric,
-	token.QUO: isNumeric,
-	token.REM: isInteger,
-
-	token.AND:     isInteger,
-	token.OR:      isInteger,
-	token.XOR:     isInteger,
-	token.AND_NOT: isInteger,
-
-	token.LAND: isBoolean,
-	token.LOR:  isBoolean,
-}
-
-// The binary expression e may be nil. It's passed in for better error messages only.
-func (check *Checker) binary(x *operand, e *ast.BinaryExpr, lhs, rhs ast.Expr, op token.Token) {
-	var y operand
-
-	check.expr(x, lhs)
-	check.expr(&y, rhs)
-
-	if x.mode == invalid {
-		return
-	}
-	if y.mode == invalid {
-		x.mode = invalid
-		x.expr = y.expr
-		return
-	}
-
-	if isShift(op) {
-		check.shift(x, &y, op)
-		return
-	}
-
-	check.convertUntyped(x, y.typ)
-	if x.mode == invalid {
-		return
-	}
-	check.convertUntyped(&y, x.typ)
-	if y.mode == invalid {
-		x.mode = invalid
-		return
-	}
-
-	if isComparison(op) {
-		check.comparison(x, &y, op)
-		return
-	}
-
-	if !Identical(x.typ, y.typ) {
-		// only report an error if we have valid types
-		// (otherwise we had an error reported elsewhere already)
-		if x.typ != Typ[Invalid] && y.typ != Typ[Invalid] {
-			check.invalidOp(x.pos(), "mismatched types %s and %s", x.typ, y.typ)
-		}
-		x.mode = invalid
-		return
-	}
-
-	if !check.op(binaryOpPredicates, x, op) {
-		x.mode = invalid
-		return
-	}
-
-	if (op == token.QUO || op == token.REM) && (x.mode == constant_ || isInteger(x.typ)) && y.mode == constant_ && constant.Sign(y.val) == 0 {
-		check.invalidOp(y.pos(), "division by zero")
-		x.mode = invalid
-		return
-	}
-
-	if x.mode == constant_ && y.mode == constant_ {
-		typ := x.typ.Underlying().(*Basic)
-		// force integer division of integer operands
-		if op == token.QUO && isInteger(typ) {
-			op = token.QUO_ASSIGN
-		}
-		x.val = constant.BinaryOp(x.val, op, y.val)
-		// Typed constants must be representable in
-		// their type after each constant operation.
-		if isTyped(typ) {
-			if e != nil {
-				x.expr = e // for better error message
-			}
-			check.representable(x, typ)
-		}
-		return
-	}
-
-	x.mode = value
-	// x.typ is unchanged
-}
-
-// index checks an index expression for validity.
-// If max >= 0, it is the upper bound for index.
-// If index is valid and the result i >= 0, then i is the constant value of index.
-func (check *Checker) index(index ast.Expr, max int64) (i int64, valid bool) {
-	var x operand
-	check.expr(&x, index)
-	if x.mode == invalid {
-		return
-	}
-
-	// an untyped constant must be representable as Int
-	check.convertUntyped(&x, Typ[Int])
-	if x.mode == invalid {
-		return
-	}
-
-	// the index must be of integer type
-	if !isInteger(x.typ) {
-		check.invalidArg(x.pos(), "index %s must be integer", &x)
-		return
-	}
-
-	// a constant index i must be in bounds
-	if x.mode == constant_ {
-		if constant.Sign(x.val) < 0 {
-			check.invalidArg(x.pos(), "index %s must not be negative", &x)
-			return
-		}
-		i, valid = constant.Int64Val(x.val)
-		if !valid || max >= 0 && i >= max {
-			check.errorf(x.pos(), "index %s is out of bounds", &x)
-			return i, false
-		}
-		// 0 <= i [ && i < max ]
-		return i, true
-	}
-
-	return -1, true
-}
-
-// indexElts checks the elements (elts) of an array or slice composite literal
-// against the literal's element type (typ), and the element indices against
-// the literal length if known (length >= 0). It returns the length of the
-// literal (maximum index value + 1).
-//
-func (check *Checker) indexedElts(elts []ast.Expr, typ Type, length int64) int64 {
-	visited := make(map[int64]bool, len(elts))
-	var index, max int64
-	for _, e := range elts {
-		// determine and check index
-		validIndex := false
-		eval := e
-		if kv, _ := e.(*ast.KeyValueExpr); kv != nil {
-			if i, ok := check.index(kv.Key, length); ok {
-				if i >= 0 {
-					index = i
-					validIndex = true
-				} else {
-					check.errorf(e.Pos(), "index %s must be integer constant", kv.Key)
-				}
-			}
-			eval = kv.Value
-		} else if length >= 0 && index >= length {
-			check.errorf(e.Pos(), "index %d is out of bounds (>= %d)", index, length)
-		} else {
-			validIndex = true
-		}
-
-		// if we have a valid index, check for duplicate entries
-		if validIndex {
-			if visited[index] {
-				check.errorf(e.Pos(), "duplicate index %d in array or slice literal", index)
-			}
-			visited[index] = true
-		}
-		index++
-		if index > max {
-			max = index
-		}
-
-		// check element against composite literal element type
-		var x operand
-		check.exprWithHint(&x, eval, typ)
-		if !check.assignment(&x, typ) && x.mode != invalid {
-			check.errorf(x.pos(), "cannot use %s as %s value in array or slice literal", &x, typ)
-		}
-	}
-	return max
-}
-
-// exprKind describes the kind of an expression; the kind
-// determines if an expression is valid in 'statement context'.
-type exprKind int
-
-const (
-	conversion exprKind = iota
-	expression
-	statement
-)
-
-// rawExpr typechecks expression e and initializes x with the expression
-// value or type. If an error occurred, x.mode is set to invalid.
-// If hint != nil, it is the type of a composite literal element.
-//
-func (check *Checker) rawExpr(x *operand, e ast.Expr, hint Type) exprKind {
-	if trace {
-		check.trace(e.Pos(), "%s", e)
-		check.indent++
-		defer func() {
-			check.indent--
-			check.trace(e.Pos(), "=> %s", x)
-		}()
-	}
-
-	kind := check.exprInternal(x, e, hint)
-
-	// convert x into a user-friendly set of values
-	// TODO(gri) this code can be simplified
-	var typ Type
-	var val constant.Value
-	switch x.mode {
-	case invalid:
-		typ = Typ[Invalid]
-	case novalue:
-		typ = (*Tuple)(nil)
-	case constant_:
-		typ = x.typ
-		val = x.val
-	default:
-		typ = x.typ
-	}
-	assert(x.expr != nil && typ != nil)
-
-	if isUntyped(typ) {
-		// delay type and value recording until we know the type
-		// or until the end of type checking
-		check.rememberUntyped(x.expr, false, x.mode, typ.(*Basic), val)
-	} else {
-		check.recordTypeAndValue(e, x.mode, typ, val)
-	}
-
-	return kind
-}
-
-// exprInternal contains the core of type checking of expressions.
-// Must only be called by rawExpr.
-//
-func (check *Checker) exprInternal(x *operand, e ast.Expr, hint Type) exprKind {
-	// make sure x has a valid state in case of bailout
-	// (was issue 5770)
-	x.mode = invalid
-	x.typ = Typ[Invalid]
-
-	switch e := e.(type) {
-	case *ast.BadExpr:
-		goto Error // error was reported before
-
-	case *ast.Ident:
-		check.ident(x, e, nil, nil)
-
-	case *ast.Ellipsis:
-		// ellipses are handled explicitly where they are legal
-		// (array composite literals and parameter lists)
-		check.error(e.Pos(), "invalid use of '...'")
-		goto Error
-
-	case *ast.BasicLit:
-		x.setConst(e.Kind, e.Value)
-		if x.mode == invalid {
-			check.invalidAST(e.Pos(), "invalid literal %v", e.Value)
-			goto Error
-		}
-
-	case *ast.FuncLit:
-		if sig, ok := check.typ(e.Type).(*Signature); ok {
-			// Anonymous functions are considered part of the
-			// init expression/func declaration which contains
-			// them: use existing package-level declaration info.
-			check.funcBody(check.decl, "", sig, e.Body)
-			x.mode = value
-			x.typ = sig
-		} else {
-			check.invalidAST(e.Pos(), "invalid function literal %s", e)
-			goto Error
-		}
-
-	case *ast.CompositeLit:
-		typ := hint
-		openArray := false
-		if e.Type != nil {
-			// [...]T array types may only appear with composite literals.
-			// Check for them here so we don't have to handle ... in general.
-			typ = nil
-			if atyp, _ := e.Type.(*ast.ArrayType); atyp != nil && atyp.Len != nil {
-				if ellip, _ := atyp.Len.(*ast.Ellipsis); ellip != nil && ellip.Elt == nil {
-					// We have an "open" [...]T array type.
-					// Create a new ArrayType with unknown length (-1)
-					// and finish setting it up after analyzing the literal.
-					typ = &Array{len: -1, elem: check.typ(atyp.Elt)}
-					openArray = true
-				}
-			}
-			if typ == nil {
-				typ = check.typ(e.Type)
-			}
-		}
-		if typ == nil {
-			// TODO(gri) provide better error messages depending on context
-			check.error(e.Pos(), "missing type in composite literal")
-			goto Error
-		}
-
-		switch typ, _ := deref(typ); utyp := typ.Underlying().(type) {
-		case *Struct:
-			if len(e.Elts) == 0 {
-				break
-			}
-			fields := utyp.fields
-			if _, ok := e.Elts[0].(*ast.KeyValueExpr); ok {
-				// all elements must have keys
-				visited := make([]bool, len(fields))
-				for _, e := range e.Elts {
-					kv, _ := e.(*ast.KeyValueExpr)
-					if kv == nil {
-						check.error(e.Pos(), "mixture of field:value and value elements in struct literal")
-						continue
-					}
-					key, _ := kv.Key.(*ast.Ident)
-					if key == nil {
-						check.errorf(kv.Pos(), "invalid field name %s in struct literal", kv.Key)
-						continue
-					}
-					i := fieldIndex(utyp.fields, check.pkg, key.Name)
-					if i < 0 {
-						check.errorf(kv.Pos(), "unknown field %s in struct literal", key.Name)
-						continue
-					}
-					fld := fields[i]
-					check.recordUse(key, fld)
-					// 0 <= i < len(fields)
-					if visited[i] {
-						check.errorf(kv.Pos(), "duplicate field name %s in struct literal", key.Name)
-						continue
-					}
-					visited[i] = true
-					check.expr(x, kv.Value)
-					etyp := fld.typ
-					if !check.assignment(x, etyp) {
-						if x.mode != invalid {
-							check.errorf(x.pos(), "cannot use %s as %s value in struct literal", x, etyp)
-						}
-						continue
-					}
-				}
-			} else {
-				// no element must have a key
-				for i, e := range e.Elts {
-					if kv, _ := e.(*ast.KeyValueExpr); kv != nil {
-						check.error(kv.Pos(), "mixture of field:value and value elements in struct literal")
-						continue
-					}
-					check.expr(x, e)
-					if i >= len(fields) {
-						check.error(x.pos(), "too many values in struct literal")
-						break // cannot continue
-					}
-					// i < len(fields)
-					fld := fields[i]
-					if !fld.Exported() && fld.pkg != check.pkg {
-						check.errorf(x.pos(), "implicit assignment to unexported field %s in %s literal", fld.name, typ)
-						continue
-					}
-					etyp := fld.typ
-					if !check.assignment(x, etyp) {
-						if x.mode != invalid {
-							check.errorf(x.pos(), "cannot use %s as %s value in struct literal", x, etyp)
-						}
-						continue
-					}
-				}
-				if len(e.Elts) < len(fields) {
-					check.error(e.Rbrace, "too few values in struct literal")
-					// ok to continue
-				}
-			}
-
-		case *Array:
-			n := check.indexedElts(e.Elts, utyp.elem, utyp.len)
-			// if we have an "open" [...]T array, set the length now that we know it
-			if openArray {
-				utyp.len = n
-			}
-
-		case *Slice:
-			check.indexedElts(e.Elts, utyp.elem, -1)
-
-		case *Map:
-			visited := make(map[interface{}][]Type, len(e.Elts))
-			for _, e := range e.Elts {
-				kv, _ := e.(*ast.KeyValueExpr)
-				if kv == nil {
-					check.error(e.Pos(), "missing key in map literal")
-					continue
-				}
-				check.exprWithHint(x, kv.Key, utyp.key)
-				if !check.assignment(x, utyp.key) {
-					if x.mode != invalid {
-						check.errorf(x.pos(), "cannot use %s as %s key in map literal", x, utyp.key)
-					}
-					continue
-				}
-				if x.mode == constant_ {
-					duplicate := false
-					// if the key is of interface type, the type is also significant when checking for duplicates
-					if _, ok := utyp.key.Underlying().(*Interface); ok {
-						for _, vtyp := range visited[x.val] {
-							if Identical(vtyp, x.typ) {
-								duplicate = true
-								break
-							}
-						}
-						visited[x.val] = append(visited[x.val], x.typ)
-					} else {
-						_, duplicate = visited[x.val]
-						visited[x.val] = nil
-					}
-					if duplicate {
-						check.errorf(x.pos(), "duplicate key %s in map literal", x.val)
-						continue
-					}
-				}
-				check.exprWithHint(x, kv.Value, utyp.elem)
-				if !check.assignment(x, utyp.elem) {
-					if x.mode != invalid {
-						check.errorf(x.pos(), "cannot use %s as %s value in map literal", x, utyp.elem)
-					}
-					continue
-				}
-			}
-
-		default:
-			// if utyp is invalid, an error was reported before
-			if utyp != Typ[Invalid] {
-				check.errorf(e.Pos(), "invalid composite literal type %s", typ)
-				goto Error
-			}
-		}
-
-		x.mode = value
-		x.typ = typ
-
-	case *ast.ParenExpr:
-		kind := check.rawExpr(x, e.X, nil)
-		x.expr = e
-		return kind
-
-	case *ast.SelectorExpr:
-		check.selector(x, e)
-
-	case *ast.IndexExpr:
-		check.expr(x, e.X)
-		if x.mode == invalid {
-			goto Error
-		}
-
-		valid := false
-		length := int64(-1) // valid if >= 0
-		switch typ := x.typ.Underlying().(type) {
-		case *Basic:
-			if isString(typ) {
-				valid = true
-				if x.mode == constant_ {
-					length = int64(len(constant.StringVal(x.val)))
-				}
-				// an indexed string always yields a byte value
-				// (not a constant) even if the string and the
-				// index are constant
-				x.mode = value
-				x.typ = universeByte // use 'byte' name
-			}
-
-		case *Array:
-			valid = true
-			length = typ.len
-			if x.mode != variable {
-				x.mode = value
-			}
-			x.typ = typ.elem
-
-		case *Pointer:
-			if typ, _ := typ.base.Underlying().(*Array); typ != nil {
-				valid = true
-				length = typ.len
-				x.mode = variable
-				x.typ = typ.elem
-			}
-
-		case *Slice:
-			valid = true
-			x.mode = variable
-			x.typ = typ.elem
-
-		case *Map:
-			var key operand
-			check.expr(&key, e.Index)
-			if !check.assignment(&key, typ.key) {
-				if key.mode != invalid {
-					check.invalidOp(key.pos(), "cannot use %s as map index of type %s", &key, typ.key)
-				}
-				goto Error
-			}
-			x.mode = mapindex
-			x.typ = typ.elem
-			x.expr = e
-			return expression
-		}
-
-		if !valid {
-			check.invalidOp(x.pos(), "cannot index %s", x)
-			goto Error
-		}
-
-		if e.Index == nil {
-			check.invalidAST(e.Pos(), "missing index for %s", x)
-			goto Error
-		}
-
-		check.index(e.Index, length)
-		// ok to continue
-
-	case *ast.SliceExpr:
-		check.expr(x, e.X)
-		if x.mode == invalid {
-			goto Error
-		}
-
-		valid := false
-		length := int64(-1) // valid if >= 0
-		switch typ := x.typ.Underlying().(type) {
-		case *Basic:
-			if isString(typ) {
-				if slice3(e) {
-					check.invalidOp(x.pos(), "3-index slice of string")
-					goto Error
-				}
-				valid = true
-				if x.mode == constant_ {
-					length = int64(len(constant.StringVal(x.val)))
-				}
-				// spec: "For untyped string operands the result
-				// is a non-constant value of type string."
-				if typ.kind == UntypedString {
-					x.typ = Typ[String]
-				}
-			}
-
-		case *Array:
-			valid = true
-			length = typ.len
-			if x.mode != variable {
-				check.invalidOp(x.pos(), "cannot slice %s (value not addressable)", x)
-				goto Error
-			}
-			x.typ = &Slice{elem: typ.elem}
-
-		case *Pointer:
-			if typ, _ := typ.base.Underlying().(*Array); typ != nil {
-				valid = true
-				length = typ.len
-				x.typ = &Slice{elem: typ.elem}
-			}
-
-		case *Slice:
-			valid = true
-			// x.typ doesn't change
-		}
-
-		if !valid {
-			check.invalidOp(x.pos(), "cannot slice %s", x)
-			goto Error
-		}
-
-		x.mode = value
-
-		// spec: "Only the first index may be omitted; it defaults to 0."
-		if slice3(e) && (e.High == nil || sliceMax(e) == nil) {
-			check.error(e.Rbrack, "2nd and 3rd index required in 3-index slice")
-			goto Error
-		}
-
-		// check indices
-		var ind [3]int64
-		for i, expr := range []ast.Expr{e.Low, e.High, sliceMax(e)} {
-			x := int64(-1)
-			switch {
-			case expr != nil:
-				// The "capacity" is only known statically for strings, arrays,
-				// and pointers to arrays, and it is the same as the length for
-				// those types.
-				max := int64(-1)
-				if length >= 0 {
-					max = length + 1
-				}
-				if t, ok := check.index(expr, max); ok && t >= 0 {
-					x = t
-				}
-			case i == 0:
-				// default is 0 for the first index
-				x = 0
-			case length >= 0:
-				// default is length (== capacity) otherwise
-				x = length
-			}
-			ind[i] = x
-		}
-
-		// constant indices must be in range
-		// (check.index already checks that existing indices >= 0)
-	L:
-		for i, x := range ind[:len(ind)-1] {
-			if x > 0 {
-				for _, y := range ind[i+1:] {
-					if y >= 0 && x > y {
-						check.errorf(e.Rbrack, "invalid slice indices: %d > %d", x, y)
-						break L // only report one error, ok to continue
-					}
-				}
-			}
-		}
-
-	case *ast.TypeAssertExpr:
-		check.expr(x, e.X)
-		if x.mode == invalid {
-			goto Error
-		}
-		xtyp, _ := x.typ.Underlying().(*Interface)
-		if xtyp == nil {
-			check.invalidOp(x.pos(), "%s is not an interface", x)
-			goto Error
-		}
-		// x.(type) expressions are handled explicitly in type switches
-		if e.Type == nil {
-			check.invalidAST(e.Pos(), "use of .(type) outside type switch")
-			goto Error
-		}
-		T := check.typ(e.Type)
-		if T == Typ[Invalid] {
-			goto Error
-		}
-		check.typeAssertion(x.pos(), x, xtyp, T)
-		x.mode = commaok
-		x.typ = T
-
-	case *ast.CallExpr:
-		return check.call(x, e)
-
-	case *ast.StarExpr:
-		check.exprOrType(x, e.X)
-		switch x.mode {
-		case invalid:
-			goto Error
-		case typexpr:
-			x.typ = &Pointer{base: x.typ}
-		default:
-			if typ, ok := x.typ.Underlying().(*Pointer); ok {
-				x.mode = variable
-				x.typ = typ.base
-			} else {
-				check.invalidOp(x.pos(), "cannot indirect %s", x)
-				goto Error
-			}
-		}
-
-	case *ast.UnaryExpr:
-		check.expr(x, e.X)
-		if x.mode == invalid {
-			goto Error
-		}
-		check.unary(x, e, e.Op)
-		if x.mode == invalid {
-			goto Error
-		}
-		if e.Op == token.ARROW {
-			x.expr = e
-			return statement // receive operations may appear in statement context
-		}
-
-	case *ast.BinaryExpr:
-		check.binary(x, e, e.X, e.Y, e.Op)
-		if x.mode == invalid {
-			goto Error
-		}
-
-	case *ast.KeyValueExpr:
-		// key:value expressions are handled in composite literals
-		check.invalidAST(e.Pos(), "no key:value expected")
-		goto Error
-
-	case *ast.ArrayType, *ast.StructType, *ast.FuncType,
-		*ast.InterfaceType, *ast.MapType, *ast.ChanType:
-		x.mode = typexpr
-		x.typ = check.typ(e)
-		// Note: rawExpr (caller of exprInternal) will call check.recordTypeAndValue
-		// even though check.typ has already called it. This is fine as both
-		// times the same expression and type are recorded. It is also not a
-		// performance issue because we only reach here for composite literal
-		// types, which are comparatively rare.
-
-	default:
-		panic(fmt.Sprintf("%s: unknown expression type %T", check.fset.Position(e.Pos()), e))
-	}
-
-	// everything went well
-	x.expr = e
-	return expression
-
-Error:
-	x.mode = invalid
-	x.expr = e
-	return statement // avoid follow-up errors
-}
-
-// typeAssertion checks that x.(T) is legal; xtyp must be the type of x.
-func (check *Checker) typeAssertion(pos token.Pos, x *operand, xtyp *Interface, T Type) {
-	method, wrongType := assertableTo(xtyp, T)
-	if method == nil {
-		return
-	}
-
-	var msg string
-	if wrongType {
-		msg = "wrong type for method"
-	} else {
-		msg = "missing method"
-	}
-	check.errorf(pos, "%s cannot have dynamic type %s (%s %s)", x, T, msg, method.name)
-}
-
-// expr typechecks expression e and initializes x with the expression value.
-// If an error occurred, x.mode is set to invalid.
-//
-func (check *Checker) expr(x *operand, e ast.Expr) {
-	check.rawExpr(x, e, nil)
-	var msg string
-	switch x.mode {
-	default:
-		return
-	case novalue:
-		msg = "used as value"
-	case builtin:
-		msg = "must be called"
-	case typexpr:
-		msg = "is not an expression"
-	}
-	check.errorf(x.pos(), "%s %s", x, msg)
-	x.mode = invalid
-}
-
-// exprWithHint typechecks expression e and initializes x with the expression value.
-// If an error occurred, x.mode is set to invalid.
-// If hint != nil, it is the type of a composite literal element.
-//
-func (check *Checker) exprWithHint(x *operand, e ast.Expr, hint Type) {
-	assert(hint != nil)
-	check.rawExpr(x, e, hint)
-	var msg string
-	switch x.mode {
-	default:
-		return
-	case novalue:
-		msg = "used as value"
-	case builtin:
-		msg = "must be called"
-	case typexpr:
-		msg = "is not an expression"
-	}
-	check.errorf(x.pos(), "%s %s", x, msg)
-	x.mode = invalid
-}
-
-// exprOrType typechecks expression or type e and initializes x with the expression value or type.
-// If an error occurred, x.mode is set to invalid.
-//
-func (check *Checker) exprOrType(x *operand, e ast.Expr) {
-	check.rawExpr(x, e, nil)
-	if x.mode == novalue {
-		check.errorf(x.pos(), "%s used as value or type", x)
-		x.mode = invalid
-	}
-}
diff --git a/src/go/types/exprstring.go b/src/go/types/exprstring.go
deleted file mode 100644
index 370bdf3..0000000
--- a/src/go/types/exprstring.go
+++ /dev/null
@@ -1,220 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements printing of expressions.
-
-package types
-
-import (
-	"bytes"
-	"go/ast"
-)
-
-// ExprString returns the (possibly simplified) string representation for x.
-func ExprString(x ast.Expr) string {
-	var buf bytes.Buffer
-	WriteExpr(&buf, x)
-	return buf.String()
-}
-
-// WriteExpr writes the (possibly simplified) string representation for x to buf.
-func WriteExpr(buf *bytes.Buffer, x ast.Expr) {
-	// The AST preserves source-level parentheses so there is
-	// no need to introduce them here to correct for different
-	// operator precedences. (This assumes that the AST was
-	// generated by a Go parser.)
-
-	switch x := x.(type) {
-	default:
-		buf.WriteString("(bad expr)") // nil, ast.BadExpr, ast.KeyValueExpr
-
-	case *ast.Ident:
-		buf.WriteString(x.Name)
-
-	case *ast.Ellipsis:
-		buf.WriteString("...")
-		if x.Elt != nil {
-			WriteExpr(buf, x.Elt)
-		}
-
-	case *ast.BasicLit:
-		buf.WriteString(x.Value)
-
-	case *ast.FuncLit:
-		buf.WriteByte('(')
-		WriteExpr(buf, x.Type)
-		buf.WriteString(" literal)") // simplified
-
-	case *ast.CompositeLit:
-		buf.WriteByte('(')
-		WriteExpr(buf, x.Type)
-		buf.WriteString(" literal)") // simplified
-
-	case *ast.ParenExpr:
-		buf.WriteByte('(')
-		WriteExpr(buf, x.X)
-		buf.WriteByte(')')
-
-	case *ast.SelectorExpr:
-		WriteExpr(buf, x.X)
-		buf.WriteByte('.')
-		buf.WriteString(x.Sel.Name)
-
-	case *ast.IndexExpr:
-		WriteExpr(buf, x.X)
-		buf.WriteByte('[')
-		WriteExpr(buf, x.Index)
-		buf.WriteByte(']')
-
-	case *ast.SliceExpr:
-		WriteExpr(buf, x.X)
-		buf.WriteByte('[')
-		if x.Low != nil {
-			WriteExpr(buf, x.Low)
-		}
-		buf.WriteByte(':')
-		if x.High != nil {
-			WriteExpr(buf, x.High)
-		}
-		if x.Slice3 {
-			buf.WriteByte(':')
-			if x.Max != nil {
-				WriteExpr(buf, x.Max)
-			}
-		}
-		buf.WriteByte(']')
-
-	case *ast.TypeAssertExpr:
-		WriteExpr(buf, x.X)
-		buf.WriteString(".(")
-		WriteExpr(buf, x.Type)
-		buf.WriteByte(')')
-
-	case *ast.CallExpr:
-		WriteExpr(buf, x.Fun)
-		buf.WriteByte('(')
-		for i, arg := range x.Args {
-			if i > 0 {
-				buf.WriteString(", ")
-			}
-			WriteExpr(buf, arg)
-		}
-		if x.Ellipsis.IsValid() {
-			buf.WriteString("...")
-		}
-		buf.WriteByte(')')
-
-	case *ast.StarExpr:
-		buf.WriteByte('*')
-		WriteExpr(buf, x.X)
-
-	case *ast.UnaryExpr:
-		buf.WriteString(x.Op.String())
-		WriteExpr(buf, x.X)
-
-	case *ast.BinaryExpr:
-		WriteExpr(buf, x.X)
-		buf.WriteByte(' ')
-		buf.WriteString(x.Op.String())
-		buf.WriteByte(' ')
-		WriteExpr(buf, x.Y)
-
-	case *ast.ArrayType:
-		buf.WriteByte('[')
-		if x.Len != nil {
-			WriteExpr(buf, x.Len)
-		}
-		buf.WriteByte(']')
-		WriteExpr(buf, x.Elt)
-
-	case *ast.StructType:
-		buf.WriteString("struct{")
-		writeFieldList(buf, x.Fields, "; ", false)
-		buf.WriteByte('}')
-
-	case *ast.FuncType:
-		buf.WriteString("func")
-		writeSigExpr(buf, x)
-
-	case *ast.InterfaceType:
-		buf.WriteString("interface{")
-		writeFieldList(buf, x.Methods, "; ", true)
-		buf.WriteByte('}')
-
-	case *ast.MapType:
-		buf.WriteString("map[")
-		WriteExpr(buf, x.Key)
-		buf.WriteByte(']')
-		WriteExpr(buf, x.Value)
-
-	case *ast.ChanType:
-		var s string
-		switch x.Dir {
-		case ast.SEND:
-			s = "chan<- "
-		case ast.RECV:
-			s = "<-chan "
-		default:
-			s = "chan "
-		}
-		buf.WriteString(s)
-		WriteExpr(buf, x.Value)
-	}
-}
-
-func writeSigExpr(buf *bytes.Buffer, sig *ast.FuncType) {
-	buf.WriteByte('(')
-	writeFieldList(buf, sig.Params, ", ", false)
-	buf.WriteByte(')')
-
-	res := sig.Results
-	n := res.NumFields()
-	if n == 0 {
-		// no result
-		return
-	}
-
-	buf.WriteByte(' ')
-	if n == 1 && len(res.List[0].Names) == 0 {
-		// single unnamed result
-		WriteExpr(buf, res.List[0].Type)
-		return
-	}
-
-	// multiple or named result(s)
-	buf.WriteByte('(')
-	writeFieldList(buf, res, ", ", false)
-	buf.WriteByte(')')
-}
-
-func writeFieldList(buf *bytes.Buffer, fields *ast.FieldList, sep string, iface bool) {
-	for i, f := range fields.List {
-		if i > 0 {
-			buf.WriteString(sep)
-		}
-
-		// field list names
-		for i, name := range f.Names {
-			if i > 0 {
-				buf.WriteString(", ")
-			}
-			buf.WriteString(name.Name)
-		}
-
-		// types of interface methods consist of signatures only
-		if sig, _ := f.Type.(*ast.FuncType); sig != nil && iface {
-			writeSigExpr(buf, sig)
-			continue
-		}
-
-		// named fields are separated with a blank from the field type
-		if len(f.Names) > 0 {
-			buf.WriteByte(' ')
-		}
-
-		WriteExpr(buf, f.Type)
-
-		// ignore tag
-	}
-}
diff --git a/src/go/types/exprstring_test.go b/src/go/types/exprstring_test.go
deleted file mode 100644
index 5110288..0000000
--- a/src/go/types/exprstring_test.go
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package types_test
-
-import (
-	"go/parser"
-	"testing"
-
-	. "go/types"
-)
-
-var testExprs = []testEntry{
-	// basic type literals
-	dup("x"),
-	dup("true"),
-	dup("42"),
-	dup("3.1415"),
-	dup("2.71828i"),
-	dup(`'a'`),
-	dup(`"foo"`),
-	dup("`bar`"),
-
-	// func and composite literals
-	{"func(){}", "(func() literal)"},
-	{"func(x int) complex128 {}", "(func(x int) complex128 literal)"},
-	{"[]int{1, 2, 3}", "([]int literal)"},
-
-	// non-type expressions
-	dup("(x)"),
-	dup("x.f"),
-	dup("a[i]"),
-
-	dup("s[:]"),
-	dup("s[i:]"),
-	dup("s[:j]"),
-	dup("s[i:j]"),
-	dup("s[:j:k]"),
-	dup("s[i:j:k]"),
-
-	dup("x.(T)"),
-
-	dup("x.([10]int)"),
-	dup("x.([...]int)"),
-
-	dup("x.(struct{})"),
-	dup("x.(struct{x int; y, z float32; E})"),
-
-	dup("x.(func())"),
-	dup("x.(func(x int))"),
-	dup("x.(func() int)"),
-	dup("x.(func(x, y int, z float32) (r int))"),
-	dup("x.(func(a, b, c int))"),
-	dup("x.(func(x ...T))"),
-
-	dup("x.(interface{})"),
-	dup("x.(interface{m(); n(x int); E})"),
-	dup("x.(interface{m(); n(x int) T; E; F})"),
-
-	dup("x.(map[K]V)"),
-
-	dup("x.(chan E)"),
-	dup("x.(<-chan E)"),
-	dup("x.(chan<- chan int)"),
-	dup("x.(chan<- <-chan int)"),
-	dup("x.(<-chan chan int)"),
-	dup("x.(chan (<-chan int))"),
-
-	dup("f()"),
-	dup("f(x)"),
-	dup("int(x)"),
-	dup("f(x, x + y)"),
-	dup("f(s...)"),
-	dup("f(a, s...)"),
-
-	dup("*x"),
-	dup("&x"),
-	dup("x + y"),
-	dup("x + y << (2 * s)"),
-}
-
-func TestExprString(t *testing.T) {
-	for _, test := range testExprs {
-		x, err := parser.ParseExpr(test.src)
-		if err != nil {
-			t.Errorf("%s: %s", test.src, err)
-			continue
-		}
-		if got := ExprString(x); got != test.str {
-			t.Errorf("%s: got %s, want %s", test.src, got, test.str)
-		}
-	}
-}
diff --git a/src/go/types/go11.go b/src/go/types/go11.go
deleted file mode 100644
index cf41cab..0000000
--- a/src/go/types/go11.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !go1.2
-
-package types
-
-import "go/ast"
-
-func slice3(x *ast.SliceExpr) bool {
-	return false
-}
-
-func sliceMax(x *ast.SliceExpr) ast.Expr {
-	return nil
-}
diff --git a/src/go/types/go12.go b/src/go/types/go12.go
deleted file mode 100644
index 2017442..0000000
--- a/src/go/types/go12.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build go1.2
-
-package types
-
-import "go/ast"
-
-func slice3(x *ast.SliceExpr) bool {
-	return x.Slice3
-}
-
-func sliceMax(x *ast.SliceExpr) ast.Expr {
-	return x.Max
-}
diff --git a/src/go/types/hilbert_test.go b/src/go/types/hilbert_test.go
deleted file mode 100644
index cfd51b1..0000000
--- a/src/go/types/hilbert_test.go
+++ /dev/null
@@ -1,234 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package types_test
-
-import (
-	"bytes"
-	"flag"
-	"fmt"
-	"go/ast"
-	"go/importer"
-	"go/parser"
-	"go/token"
-	"io/ioutil"
-	"testing"
-
-	. "go/types"
-)
-
-var (
-	H   = flag.Int("H", 5, "Hilbert matrix size")
-	out = flag.String("out", "", "write generated program to out")
-)
-
-func TestHilbert(t *testing.T) {
-	// generate source
-	src := program(*H, *out)
-	if *out != "" {
-		ioutil.WriteFile(*out, src, 0666)
-		return
-	}
-
-	// parse source
-	fset := token.NewFileSet()
-	f, err := parser.ParseFile(fset, "hilbert.go", src, 0)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	// type-check file
-	DefPredeclaredTestFuncs() // define assert built-in
-	conf := Config{Importer: importer.Default()}
-	_, err = conf.Check(f.Name.Name, fset, []*ast.File{f}, nil)
-	if err != nil {
-		t.Fatal(err)
-	}
-}
-
-func program(n int, out string) []byte {
-	var g gen
-
-	g.p(`// WARNING: GENERATED FILE - DO NOT MODIFY MANUALLY!
-// (To generate, in go/types directory: go test -run=Hilbert -H=%d -out=%q)
-
-// This program tests arbitrary precision constant arithmetic
-// by generating the constant elements of a Hilbert matrix H,
-// its inverse I, and the product P = H*I. The product should
-// be the identity matrix.
-package main
-
-func main() {
-	if !ok {
-		printProduct()
-		return
-	}
-	println("PASS")
-}
-
-`, n, out)
-	g.hilbert(n)
-	g.inverse(n)
-	g.product(n)
-	g.verify(n)
-	g.printProduct(n)
-	g.binomials(2*n - 1)
-	g.factorials(2*n - 1)
-
-	return g.Bytes()
-}
-
-type gen struct {
-	bytes.Buffer
-}
-
-func (g *gen) p(format string, args ...interface{}) {
-	fmt.Fprintf(&g.Buffer, format, args...)
-}
-
-func (g *gen) hilbert(n int) {
-	g.p(`// Hilbert matrix, n = %d
-const (
-`, n)
-	for i := 0; i < n; i++ {
-		g.p("\t")
-		for j := 0; j < n; j++ {
-			if j > 0 {
-				g.p(", ")
-			}
-			g.p("h%d_%d", i, j)
-		}
-		if i == 0 {
-			g.p(" = ")
-			for j := 0; j < n; j++ {
-				if j > 0 {
-					g.p(", ")
-				}
-				g.p("1.0/(iota + %d)", j+1)
-			}
-		}
-		g.p("\n")
-	}
-	g.p(")\n\n")
-}
-
-func (g *gen) inverse(n int) {
-	g.p(`// Inverse Hilbert matrix
-const (
-`)
-	for i := 0; i < n; i++ {
-		for j := 0; j < n; j++ {
-			s := "+"
-			if (i+j)&1 != 0 {
-				s = "-"
-			}
-			g.p("\ti%d_%d = %s%d * b%d_%d * b%d_%d * b%d_%d * b%d_%d\n",
-				i, j, s, i+j+1, n+i, n-j-1, n+j, n-i-1, i+j, i, i+j, i)
-		}
-		g.p("\n")
-	}
-	g.p(")\n\n")
-}
-
-func (g *gen) product(n int) {
-	g.p(`// Product matrix
-const (
-`)
-	for i := 0; i < n; i++ {
-		for j := 0; j < n; j++ {
-			g.p("\tp%d_%d = ", i, j)
-			for k := 0; k < n; k++ {
-				if k > 0 {
-					g.p(" + ")
-				}
-				g.p("h%d_%d*i%d_%d", i, k, k, j)
-			}
-			g.p("\n")
-		}
-		g.p("\n")
-	}
-	g.p(")\n\n")
-}
-
-func (g *gen) verify(n int) {
-	g.p(`// Verify that product is the identity matrix
-const ok =
-`)
-	for i := 0; i < n; i++ {
-		for j := 0; j < n; j++ {
-			if j == 0 {
-				g.p("\t")
-			} else {
-				g.p(" && ")
-			}
-			v := 0
-			if i == j {
-				v = 1
-			}
-			g.p("p%d_%d == %d", i, j, v)
-		}
-		g.p(" &&\n")
-	}
-	g.p("\ttrue\n\n")
-
-	// verify ok at type-check time
-	if *out == "" {
-		g.p("const _ = assert(ok)\n\n")
-	}
-}
-
-func (g *gen) printProduct(n int) {
-	g.p("func printProduct() {\n")
-	for i := 0; i < n; i++ {
-		g.p("\tprintln(")
-		for j := 0; j < n; j++ {
-			if j > 0 {
-				g.p(", ")
-			}
-			g.p("p%d_%d", i, j)
-		}
-		g.p(")\n")
-	}
-	g.p("}\n\n")
-}
-
-func (g *gen) mulRange(a, b int) {
-	if a > b {
-		g.p("1")
-		return
-	}
-	for i := a; i <= b; i++ {
-		if i > a {
-			g.p("*")
-		}
-		g.p("%d", i)
-	}
-}
-
-func (g *gen) binomials(n int) {
-	g.p(`// Binomials
-const (
-`)
-	for j := 0; j <= n; j++ {
-		if j > 0 {
-			g.p("\n")
-		}
-		for k := 0; k <= j; k++ {
-			g.p("\tb%d_%d = f%d / (f%d*f%d)\n", j, k, j, k, j-k)
-		}
-	}
-	g.p(")\n\n")
-}
-
-func (g *gen) factorials(n int) {
-	g.p(`// Factorials
-const (
-	f0 = 1
-	f1 = 1
-`)
-	for i := 2; i <= n; i++ {
-		g.p("\tf%d = f%d * %d\n", i, i-1, i)
-	}
-	g.p(")\n\n")
-}
diff --git a/src/go/types/initorder.go b/src/go/types/initorder.go
deleted file mode 100644
index 0fd567b..0000000
--- a/src/go/types/initorder.go
+++ /dev/null
@@ -1,222 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package types
-
-import (
-	"container/heap"
-	"fmt"
-)
-
-// initOrder computes the Info.InitOrder for package variables.
-func (check *Checker) initOrder() {
-	// An InitOrder may already have been computed if a package is
-	// built from several calls to (*Checker).Files.  Clear it.
-	check.Info.InitOrder = check.Info.InitOrder[:0]
-
-	// compute the object dependency graph and
-	// initialize a priority queue with the list
-	// of graph nodes
-	pq := nodeQueue(dependencyGraph(check.objMap))
-	heap.Init(&pq)
-
-	const debug = false
-	if debug {
-		fmt.Printf("package %s: object dependency graph\n", check.pkg.Name())
-		for _, n := range pq {
-			for _, o := range n.out {
-				fmt.Printf("\t%s -> %s\n", n.obj.Name(), o.obj.Name())
-			}
-		}
-		fmt.Println()
-		fmt.Printf("package %s: initialization order\n", check.pkg.Name())
-	}
-
-	// determine initialization order by removing the highest priority node
-	// (the one with the fewest dependencies) and its edges from the graph,
-	// repeatedly, until there are no nodes left.
-	// In a valid Go program, those nodes always have zero dependencies (after
-	// removing all incoming dependencies), otherwise there are initialization
-	// cycles.
-	mark := 0
-	emitted := make(map[*declInfo]bool)
-	for len(pq) > 0 {
-		// get the next node
-		n := heap.Pop(&pq).(*objNode)
-
-		// if n still depends on other nodes, we have a cycle
-		if n.in > 0 {
-			mark++ // mark nodes using a different value each time
-			cycle := findPath(n, n, mark)
-			if i := valIndex(cycle); i >= 0 {
-				check.reportCycle(cycle, i)
-			}
-			// ok to continue, but the variable initialization order
-			// will be incorrect at this point since it assumes no
-			// cycle errors
-		}
-
-		// reduce dependency count of all dependent nodes
-		// and update priority queue
-		for _, out := range n.out {
-			out.in--
-			heap.Fix(&pq, out.index)
-		}
-
-		// record the init order for variables with initializers only
-		v, _ := n.obj.(*Var)
-		info := check.objMap[v]
-		if v == nil || !info.hasInitializer() {
-			continue
-		}
-
-		// n:1 variable declarations such as: a, b = f()
-		// introduce a node for each lhs variable (here: a, b);
-		// but they all have the same initializer - emit only
-		// one, for the first variable seen
-		if emitted[info] {
-			continue // initializer already emitted, if any
-		}
-		emitted[info] = true
-
-		infoLhs := info.lhs // possibly nil (see declInfo.lhs field comment)
-		if infoLhs == nil {
-			infoLhs = []*Var{v}
-		}
-		init := &Initializer{infoLhs, info.init}
-		check.Info.InitOrder = append(check.Info.InitOrder, init)
-
-		if debug {
-			fmt.Printf("\t%s\n", init)
-		}
-	}
-
-	if debug {
-		fmt.Println()
-	}
-}
-
-// findPath returns the (reversed) list of nodes z, ... c, b, a,
-// such that there is a path (list of edges) from a to z.
-// If there is no such path, the result is nil.
-// Nodes marked with the value mark are considered "visited";
-// unvisited nodes are marked during the graph search.
-func findPath(a, z *objNode, mark int) []*objNode {
-	if a.mark == mark {
-		return nil // node already seen
-	}
-	a.mark = mark
-
-	for _, n := range a.out {
-		if n == z {
-			return []*objNode{z}
-		}
-		if P := findPath(n, z, mark); P != nil {
-			return append(P, n)
-		}
-	}
-
-	return nil
-}
-
-// valIndex returns the index of the first constant or variable in a,
-// if any; or a value < 0.
-func valIndex(a []*objNode) int {
-	for i, n := range a {
-		switch n.obj.(type) {
-		case *Const, *Var:
-			return i
-		}
-	}
-	return -1
-}
-
-// reportCycle reports an error for the cycle starting at i.
-func (check *Checker) reportCycle(cycle []*objNode, i int) {
-	obj := cycle[i].obj
-	check.errorf(obj.Pos(), "initialization cycle for %s", obj.Name())
-	// print cycle
-	for _ = range cycle {
-		check.errorf(obj.Pos(), "\t%s refers to", obj.Name()) // secondary error, \t indented
-		i++
-		if i >= len(cycle) {
-			i = 0
-		}
-		obj = cycle[i].obj
-	}
-	check.errorf(obj.Pos(), "\t%s", obj.Name())
-}
-
-// An objNode represents a node in the object dependency graph.
-// Each node b in a.out represents an edge a->b indicating that
-// b depends on a.
-// Nodes may be marked for cycle detection. A node n is marked
-// if n.mark corresponds to the current mark value.
-type objNode struct {
-	obj   Object     // object represented by this node
-	in    int        // number of nodes this node depends on
-	out   []*objNode // list of nodes that depend on this node
-	index int        // node index in list of nodes
-	mark  int        // for cycle detection
-}
-
-// dependencyGraph computes the transposed object dependency graph
-// from the given objMap. The transposed graph is returned as a list
-// of nodes; an edge d->n indicates that node n depends on node d.
-func dependencyGraph(objMap map[Object]*declInfo) []*objNode {
-	// M maps each object to its corresponding node
-	M := make(map[Object]*objNode, len(objMap))
-	for obj := range objMap {
-		M[obj] = &objNode{obj: obj}
-	}
-
-	// G is the graph of nodes n
-	G := make([]*objNode, len(M))
-	i := 0
-	for obj, n := range M {
-		deps := objMap[obj].deps
-		n.in = len(deps)
-		for d := range deps {
-			d := M[d]                // node n depends on node d
-			d.out = append(d.out, n) // add edge d->n
-		}
-
-		G[i] = n
-		n.index = i
-		i++
-	}
-
-	return G
-}
-
-// nodeQueue implements the container/heap interface;
-// a nodeQueue may be used as a priority queue.
-type nodeQueue []*objNode
-
-func (a nodeQueue) Len() int { return len(a) }
-
-func (a nodeQueue) Swap(i, j int) {
-	x, y := a[i], a[j]
-	a[i], a[j] = y, x
-	x.index, y.index = j, i
-}
-
-func (a nodeQueue) Less(i, j int) bool {
-	x, y := a[i], a[j]
-	// nodes are prioritized by number of incoming dependencies (1st key)
-	// and source order (2nd key)
-	return x.in < y.in || x.in == y.in && x.obj.order() < y.obj.order()
-}
-
-func (a *nodeQueue) Push(x interface{}) {
-	panic("unreachable")
-}
-
-func (a *nodeQueue) Pop() interface{} {
-	n := len(*a)
-	x := (*a)[n-1]
-	x.index = -1 // for safety
-	*a = (*a)[:n-1]
-	return x
-}
diff --git a/src/go/types/issues_test.go b/src/go/types/issues_test.go
deleted file mode 100644
index 672c78d..0000000
--- a/src/go/types/issues_test.go
+++ /dev/null
@@ -1,206 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements tests for various issues.
-
-package types_test
-
-import (
-	"fmt"
-	"go/ast"
-	"go/importer"
-	"go/parser"
-	"sort"
-	"strings"
-	"testing"
-
-	. "go/types"
-)
-
-func TestIssue5770(t *testing.T) {
-	src := `package p; type S struct{T}`
-	f, err := parser.ParseFile(fset, "", src, 0)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	conf := Config{Importer: importer.Default()}
-	_, err = conf.Check(f.Name.Name, fset, []*ast.File{f}, nil) // do not crash
-	want := "undeclared name: T"
-	if err == nil || !strings.Contains(err.Error(), want) {
-		t.Errorf("got: %v; want: %s", err, want)
-	}
-}
-
-func TestIssue5849(t *testing.T) {
-	src := `
-package p
-var (
-	s uint
-	_ = uint8(8)
-	_ = uint16(16) << s
-	_ = uint32(32 << s)
-	_ = uint64(64 << s + s)
-	_ = (interface{})("foo")
-	_ = (interface{})(nil)
-)`
-	f, err := parser.ParseFile(fset, "", src, 0)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	var conf Config
-	types := make(map[ast.Expr]TypeAndValue)
-	_, err = conf.Check(f.Name.Name, fset, []*ast.File{f}, &Info{Types: types})
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	for x, tv := range types {
-		var want Type
-		switch x := x.(type) {
-		case *ast.BasicLit:
-			switch x.Value {
-			case `8`:
-				want = Typ[Uint8]
-			case `16`:
-				want = Typ[Uint16]
-			case `32`:
-				want = Typ[Uint32]
-			case `64`:
-				want = Typ[Uint] // because of "+ s", s is of type uint
-			case `"foo"`:
-				want = Typ[String]
-			}
-		case *ast.Ident:
-			if x.Name == "nil" {
-				want = Typ[UntypedNil]
-			}
-		}
-		if want != nil && !Identical(tv.Type, want) {
-			t.Errorf("got %s; want %s", tv.Type, want)
-		}
-	}
-}
-
-func TestIssue6413(t *testing.T) {
-	src := `
-package p
-func f() int {
-	defer f()
-	go f()
-	return 0
-}
-`
-	f, err := parser.ParseFile(fset, "", src, 0)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	var conf Config
-	types := make(map[ast.Expr]TypeAndValue)
-	_, err = conf.Check(f.Name.Name, fset, []*ast.File{f}, &Info{Types: types})
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	want := Typ[Int]
-	n := 0
-	for x, tv := range types {
-		if _, ok := x.(*ast.CallExpr); ok {
-			if tv.Type != want {
-				t.Errorf("%s: got %s; want %s", fset.Position(x.Pos()), tv.Type, want)
-			}
-			n++
-		}
-	}
-
-	if n != 2 {
-		t.Errorf("got %d CallExprs; want 2", n)
-	}
-}
-
-func TestIssue7245(t *testing.T) {
-	src := `
-package p
-func (T) m() (res bool) { return }
-type T struct{} // receiver type after method declaration
-`
-	f, err := parser.ParseFile(fset, "", src, 0)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	var conf Config
-	defs := make(map[*ast.Ident]Object)
-	_, err = conf.Check(f.Name.Name, fset, []*ast.File{f}, &Info{Defs: defs})
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	m := f.Decls[0].(*ast.FuncDecl)
-	res1 := defs[m.Name].(*Func).Type().(*Signature).Results().At(0)
-	res2 := defs[m.Type.Results.List[0].Names[0]].(*Var)
-
-	if res1 != res2 {
-		t.Errorf("got %s (%p) != %s (%p)", res1, res2, res1, res2)
-	}
-}
-
-// This tests that uses of existing vars on the LHS of an assignment
-// are Uses, not Defs; and also that the (illegal) use of a non-var on
-// the LHS of an assignment is a Use nonetheless.
-func TestIssue7827(t *testing.T) {
-	const src = `
-package p
-func _() {
-	const w = 1        // defs w
-        x, y := 2, 3       // defs x, y
-        w, x, z := 4, 5, 6 // uses w, x, defs z; error: cannot assign to w
-        _, _, _ = x, y, z  // uses x, y, z
-}
-`
-	const want = `L3 defs func p._()
-L4 defs const w untyped int
-L5 defs var x int
-L5 defs var y int
-L6 defs var z int
-L6 uses const w untyped int
-L6 uses var x int
-L7 uses var x int
-L7 uses var y int
-L7 uses var z int`
-
-	f, err := parser.ParseFile(fset, "", src, 0)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	// don't abort at the first error
-	conf := Config{Error: func(err error) { t.Log(err) }}
-	defs := make(map[*ast.Ident]Object)
-	uses := make(map[*ast.Ident]Object)
-	_, err = conf.Check(f.Name.Name, fset, []*ast.File{f}, &Info{Defs: defs, Uses: uses})
-	if s := fmt.Sprint(err); !strings.HasSuffix(s, "cannot assign to w") {
-		t.Errorf("Check: unexpected error: %s", s)
-	}
-
-	var facts []string
-	for id, obj := range defs {
-		if obj != nil {
-			fact := fmt.Sprintf("L%d defs %s", fset.Position(id.Pos()).Line, obj)
-			facts = append(facts, fact)
-		}
-	}
-	for id, obj := range uses {
-		fact := fmt.Sprintf("L%d uses %s", fset.Position(id.Pos()).Line, obj)
-		facts = append(facts, fact)
-	}
-	sort.Strings(facts)
-
-	got := strings.Join(facts, "\n")
-	if got != want {
-		t.Errorf("Unexpected defs/uses\ngot:\n%s\nwant:\n%s", got, want)
-	}
-}
diff --git a/src/go/types/labels.go b/src/go/types/labels.go
deleted file mode 100644
index 7364d4d..0000000
--- a/src/go/types/labels.go
+++ /dev/null
@@ -1,268 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package types
-
-import (
-	"go/ast"
-	"go/token"
-)
-
-// labels checks correct label use in body.
-func (check *Checker) labels(body *ast.BlockStmt) {
-	// set of all labels in this body
-	all := NewScope(nil, body.Pos(), body.End(), "label")
-
-	fwdJumps := check.blockBranches(all, nil, nil, body.List)
-
-	// If there are any forward jumps left, no label was found for
-	// the corresponding goto statements. Either those labels were
-	// never defined, or they are inside blocks and not reachable
-	// for the respective gotos.
-	for _, jmp := range fwdJumps {
-		var msg string
-		name := jmp.Label.Name
-		if alt := all.Lookup(name); alt != nil {
-			msg = "goto %s jumps into block"
-			alt.(*Label).used = true // avoid another error
-		} else {
-			msg = "label %s not declared"
-		}
-		check.errorf(jmp.Label.Pos(), msg, name)
-	}
-
-	// spec: "It is illegal to define a label that is never used."
-	for _, obj := range all.elems {
-		if lbl := obj.(*Label); !lbl.used {
-			check.softErrorf(lbl.pos, "label %s declared but not used", lbl.name)
-		}
-	}
-}
-
-// A block tracks label declarations in a block and its enclosing blocks.
-type block struct {
-	parent *block                      // enclosing block
-	lstmt  *ast.LabeledStmt            // labeled statement to which this block belongs, or nil
-	labels map[string]*ast.LabeledStmt // allocated lazily
-}
-
-// insert records a new label declaration for the current block.
-// The label must not have been declared before in any block.
-func (b *block) insert(s *ast.LabeledStmt) {
-	name := s.Label.Name
-	if debug {
-		assert(b.gotoTarget(name) == nil)
-	}
-	labels := b.labels
-	if labels == nil {
-		labels = make(map[string]*ast.LabeledStmt)
-		b.labels = labels
-	}
-	labels[name] = s
-}
-
-// gotoTarget returns the labeled statement in the current
-// or an enclosing block with the given label name, or nil.
-func (b *block) gotoTarget(name string) *ast.LabeledStmt {
-	for s := b; s != nil; s = s.parent {
-		if t := s.labels[name]; t != nil {
-			return t
-		}
-	}
-	return nil
-}
-
-// enclosingTarget returns the innermost enclosing labeled
-// statement with the given label name, or nil.
-func (b *block) enclosingTarget(name string) *ast.LabeledStmt {
-	for s := b; s != nil; s = s.parent {
-		if t := s.lstmt; t != nil && t.Label.Name == name {
-			return t
-		}
-	}
-	return nil
-}
-
-// blockBranches processes a block's statement list and returns the set of outgoing forward jumps.
-// all is the scope of all declared labels, parent the set of labels declared in the immediately
-// enclosing block, and lstmt is the labeled statement this block is associated with (or nil).
-func (check *Checker) blockBranches(all *Scope, parent *block, lstmt *ast.LabeledStmt, list []ast.Stmt) []*ast.BranchStmt {
-	b := &block{parent: parent, lstmt: lstmt}
-
-	var (
-		varDeclPos         token.Pos
-		fwdJumps, badJumps []*ast.BranchStmt
-	)
-
-	// All forward jumps jumping over a variable declaration are possibly
-	// invalid (they may still jump out of the block and be ok).
-	// recordVarDecl records them for the given position.
-	recordVarDecl := func(pos token.Pos) {
-		varDeclPos = pos
-		badJumps = append(badJumps[:0], fwdJumps...) // copy fwdJumps to badJumps
-	}
-
-	jumpsOverVarDecl := func(jmp *ast.BranchStmt) bool {
-		if varDeclPos.IsValid() {
-			for _, bad := range badJumps {
-				if jmp == bad {
-					return true
-				}
-			}
-		}
-		return false
-	}
-
-	blockBranches := func(lstmt *ast.LabeledStmt, list []ast.Stmt) {
-		// Unresolved forward jumps inside the nested block
-		// become forward jumps in the current block.
-		fwdJumps = append(fwdJumps, check.blockBranches(all, b, lstmt, list)...)
-	}
-
-	var stmtBranches func(ast.Stmt)
-	stmtBranches = func(s ast.Stmt) {
-		switch s := s.(type) {
-		case *ast.DeclStmt:
-			if d, _ := s.Decl.(*ast.GenDecl); d != nil && d.Tok == token.VAR {
-				recordVarDecl(d.Pos())
-			}
-
-		case *ast.LabeledStmt:
-			// declare non-blank label
-			if name := s.Label.Name; name != "_" {
-				lbl := NewLabel(s.Label.Pos(), check.pkg, name)
-				if alt := all.Insert(lbl); alt != nil {
-					check.softErrorf(lbl.pos, "label %s already declared", name)
-					check.reportAltDecl(alt)
-					// ok to continue
-				} else {
-					b.insert(s)
-					check.recordDef(s.Label, lbl)
-				}
-				// resolve matching forward jumps and remove them from fwdJumps
-				i := 0
-				for _, jmp := range fwdJumps {
-					if jmp.Label.Name == name {
-						// match
-						lbl.used = true
-						check.recordUse(jmp.Label, lbl)
-						if jumpsOverVarDecl(jmp) {
-							check.softErrorf(
-								jmp.Label.Pos(),
-								"goto %s jumps over variable declaration at line %d",
-								name,
-								check.fset.Position(varDeclPos).Line,
-							)
-							// ok to continue
-						}
-					} else {
-						// no match - record new forward jump
-						fwdJumps[i] = jmp
-						i++
-					}
-				}
-				fwdJumps = fwdJumps[:i]
-				lstmt = s
-			}
-			stmtBranches(s.Stmt)
-
-		case *ast.BranchStmt:
-			if s.Label == nil {
-				return // checked in 1st pass (check.stmt)
-			}
-
-			// determine and validate target
-			name := s.Label.Name
-			switch s.Tok {
-			case token.BREAK:
-				// spec: "If there is a label, it must be that of an enclosing
-				// "for", "switch", or "select" statement, and that is the one
-				// whose execution terminates."
-				valid := false
-				if t := b.enclosingTarget(name); t != nil {
-					switch t.Stmt.(type) {
-					case *ast.SwitchStmt, *ast.TypeSwitchStmt, *ast.SelectStmt, *ast.ForStmt, *ast.RangeStmt:
-						valid = true
-					}
-				}
-				if !valid {
-					check.errorf(s.Label.Pos(), "invalid break label %s", name)
-					return
-				}
-
-			case token.CONTINUE:
-				// spec: "If there is a label, it must be that of an enclosing
-				// "for" statement, and that is the one whose execution advances."
-				valid := false
-				if t := b.enclosingTarget(name); t != nil {
-					switch t.Stmt.(type) {
-					case *ast.ForStmt, *ast.RangeStmt:
-						valid = true
-					}
-				}
-				if !valid {
-					check.errorf(s.Label.Pos(), "invalid continue label %s", name)
-					return
-				}
-
-			case token.GOTO:
-				if b.gotoTarget(name) == nil {
-					// label may be declared later - add branch to forward jumps
-					fwdJumps = append(fwdJumps, s)
-					return
-				}
-
-			default:
-				check.invalidAST(s.Pos(), "branch statement: %s %s", s.Tok, name)
-				return
-			}
-
-			// record label use
-			obj := all.Lookup(name)
-			obj.(*Label).used = true
-			check.recordUse(s.Label, obj)
-
-		case *ast.AssignStmt:
-			if s.Tok == token.DEFINE {
-				recordVarDecl(s.Pos())
-			}
-
-		case *ast.BlockStmt:
-			blockBranches(lstmt, s.List)
-
-		case *ast.IfStmt:
-			stmtBranches(s.Body)
-			if s.Else != nil {
-				stmtBranches(s.Else)
-			}
-
-		case *ast.CaseClause:
-			blockBranches(nil, s.Body)
-
-		case *ast.SwitchStmt:
-			stmtBranches(s.Body)
-
-		case *ast.TypeSwitchStmt:
-			stmtBranches(s.Body)
-
-		case *ast.CommClause:
-			blockBranches(nil, s.Body)
-
-		case *ast.SelectStmt:
-			stmtBranches(s.Body)
-
-		case *ast.ForStmt:
-			stmtBranches(s.Body)
-
-		case *ast.RangeStmt:
-			stmtBranches(s.Body)
-		}
-	}
-
-	for _, s := range list {
-		stmtBranches(s)
-	}
-
-	return fwdJumps
-}
diff --git a/src/go/types/lookup.go b/src/go/types/lookup.go
deleted file mode 100644
index 3caca55..0000000
--- a/src/go/types/lookup.go
+++ /dev/null
@@ -1,341 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements various field and method lookup functions.
-
-package types
-
-// LookupFieldOrMethod looks up a field or method with given package and name
-// in T and returns the corresponding *Var or *Func, an index sequence, and a
-// bool indicating if there were any pointer indirections on the path to the
-// field or method. If addressable is set, T is the type of an addressable
-// variable (only matters for method lookups).
-//
-// The last index entry is the field or method index in the (possibly embedded)
-// type where the entry was found, either:
-//
-//	1) the list of declared methods of a named type; or
-//	2) the list of all methods (method set) of an interface type; or
-//	3) the list of fields of a struct type.
-//
-// The earlier index entries are the indices of the anonymous struct fields
-// traversed to get to the found entry, starting at depth 0.
-//
-// If no entry is found, a nil object is returned. In this case, the returned
-// index and indirect values have the following meaning:
-//
-//	- If index != nil, the index sequence points to an ambiguous entry
-//	(the same name appeared more than once at the same embedding level).
-//
-//	- If indirect is set, a method with a pointer receiver type was found
-//      but there was no pointer on the path from the actual receiver type to
-//	the method's formal receiver base type, nor was the receiver addressable.
-//
-func LookupFieldOrMethod(T Type, addressable bool, pkg *Package, name string) (obj Object, index []int, indirect bool) {
-	// Methods cannot be associated to a named pointer type
-	// (spec: "The type denoted by T is called the receiver base type;
-	// it must not be a pointer or interface type and it must be declared
-	// in the same package as the method.").
-	// Thus, if we have a named pointer type, proceed with the underlying
-	// pointer type but discard the result if it is a method since we would
-	// not have found it for T (see also issue 8590).
-	if t, _ := T.(*Named); t != nil {
-		if p, _ := t.underlying.(*Pointer); p != nil {
-			obj, index, indirect = lookupFieldOrMethod(p, false, pkg, name)
-			if _, ok := obj.(*Func); ok {
-				return nil, nil, false
-			}
-			return
-		}
-	}
-
-	return lookupFieldOrMethod(T, addressable, pkg, name)
-}
-
-// TODO(gri) The named type consolidation and seen maps below must be
-//           indexed by unique keys for a given type. Verify that named
-//           types always have only one representation (even when imported
-//           indirectly via different packages.)
-
-func lookupFieldOrMethod(T Type, addressable bool, pkg *Package, name string) (obj Object, index []int, indirect bool) {
-	// WARNING: The code in this function is extremely subtle - do not modify casually!
-	//          This function and NewMethodSet should be kept in sync.
-
-	if name == "_" {
-		return // blank fields/methods are never found
-	}
-
-	typ, isPtr := deref(T)
-	named, _ := typ.(*Named)
-
-	// *typ where typ is an interface has no methods.
-	if isPtr {
-		utyp := typ
-		if named != nil {
-			utyp = named.underlying
-		}
-		if _, ok := utyp.(*Interface); ok {
-			return
-		}
-	}
-
-	// Start with typ as single entry at shallowest depth.
-	// If typ is not a named type, insert a nil type instead.
-	current := []embeddedType{{named, nil, isPtr, false}}
-
-	// named types that we have seen already, allocated lazily
-	var seen map[*Named]bool
-
-	// search current depth
-	for len(current) > 0 {
-		var next []embeddedType // embedded types found at current depth
-
-		// look for (pkg, name) in all types at current depth
-		for _, e := range current {
-			// The very first time only, e.typ may be nil.
-			// In this case, we don't have a named type and
-			// we simply continue with the underlying type.
-			if e.typ != nil {
-				if seen[e.typ] {
-					// We have seen this type before, at a more shallow depth
-					// (note that multiples of this type at the current depth
-					// were consolidated before). The type at that depth shadows
-					// this same type at the current depth, so we can ignore
-					// this one.
-					continue
-				}
-				if seen == nil {
-					seen = make(map[*Named]bool)
-				}
-				seen[e.typ] = true
-
-				// look for a matching attached method
-				if i, m := lookupMethod(e.typ.methods, pkg, name); m != nil {
-					// potential match
-					assert(m.typ != nil)
-					index = concat(e.index, i)
-					if obj != nil || e.multiples {
-						return nil, index, false // collision
-					}
-					obj = m
-					indirect = e.indirect
-					continue // we can't have a matching field or interface method
-				}
-
-				// continue with underlying type
-				typ = e.typ.underlying
-			}
-
-			switch t := typ.(type) {
-			case *Struct:
-				// look for a matching field and collect embedded types
-				for i, f := range t.fields {
-					if f.sameId(pkg, name) {
-						assert(f.typ != nil)
-						index = concat(e.index, i)
-						if obj != nil || e.multiples {
-							return nil, index, false // collision
-						}
-						obj = f
-						indirect = e.indirect
-						continue // we can't have a matching interface method
-					}
-					// Collect embedded struct fields for searching the next
-					// lower depth, but only if we have not seen a match yet
-					// (if we have a match it is either the desired field or
-					// we have a name collision on the same depth; in either
-					// case we don't need to look further).
-					// Embedded fields are always of the form T or *T where
-					// T is a named type. If e.typ appeared multiple times at
-					// this depth, f.typ appears multiple times at the next
-					// depth.
-					if obj == nil && f.anonymous {
-						// Ignore embedded basic types - only user-defined
-						// named types can have methods or struct fields.
-						typ, isPtr := deref(f.typ)
-						if t, _ := typ.(*Named); t != nil {
-							next = append(next, embeddedType{t, concat(e.index, i), e.indirect || isPtr, e.multiples})
-						}
-					}
-				}
-
-			case *Interface:
-				// look for a matching method
-				// TODO(gri) t.allMethods is sorted - use binary search
-				if i, m := lookupMethod(t.allMethods, pkg, name); m != nil {
-					assert(m.typ != nil)
-					index = concat(e.index, i)
-					if obj != nil || e.multiples {
-						return nil, index, false // collision
-					}
-					obj = m
-					indirect = e.indirect
-				}
-			}
-		}
-
-		if obj != nil {
-			// found a potential match
-			// spec: "A method call x.m() is valid if the method set of (the type of) x
-			//        contains m and the argument list can be assigned to the parameter
-			//        list of m. If x is addressable and &x's method set contains m, x.m()
-			//        is shorthand for (&x).m()".
-			if f, _ := obj.(*Func); f != nil && ptrRecv(f) && !indirect && !addressable {
-				return nil, nil, true // pointer/addressable receiver required
-			}
-			return
-		}
-
-		current = consolidateMultiples(next)
-	}
-
-	return nil, nil, false // not found
-}
-
-// embeddedType represents an embedded named type
-type embeddedType struct {
-	typ       *Named // nil means use the outer typ variable instead
-	index     []int  // embedded field indices, starting with index at depth 0
-	indirect  bool   // if set, there was a pointer indirection on the path to this field
-	multiples bool   // if set, typ appears multiple times at this depth
-}
-
-// consolidateMultiples collects multiple list entries with the same type
-// into a single entry marked as containing multiples. The result is the
-// consolidated list.
-func consolidateMultiples(list []embeddedType) []embeddedType {
-	if len(list) <= 1 {
-		return list // at most one entry - nothing to do
-	}
-
-	n := 0                       // number of entries w/ unique type
-	prev := make(map[*Named]int) // index at which type was previously seen
-	for _, e := range list {
-		if i, found := prev[e.typ]; found {
-			list[i].multiples = true
-			// ignore this entry
-		} else {
-			prev[e.typ] = n
-			list[n] = e
-			n++
-		}
-	}
-	return list[:n]
-}
-
-// MissingMethod returns (nil, false) if V implements T, otherwise it
-// returns a missing method required by T and whether it is missing or
-// just has the wrong type.
-//
-// For non-interface types V, or if static is set, V implements T if all
-// methods of T are present in V. Otherwise (V is an interface and static
-// is not set), MissingMethod only checks that methods of T which are also
-// present in V have matching types (e.g., for a type assertion x.(T) where
-// x is of interface type V).
-//
-func MissingMethod(V Type, T *Interface, static bool) (method *Func, wrongType bool) {
-	// fast path for common case
-	if T.Empty() {
-		return
-	}
-
-	// TODO(gri) Consider using method sets here. Might be more efficient.
-
-	if ityp, _ := V.Underlying().(*Interface); ityp != nil {
-		// TODO(gri) allMethods is sorted - can do this more efficiently
-		for _, m := range T.allMethods {
-			_, obj := lookupMethod(ityp.allMethods, m.pkg, m.name)
-			switch {
-			case obj == nil:
-				if static {
-					return m, false
-				}
-			case !Identical(obj.Type(), m.typ):
-				return m, true
-			}
-		}
-		return
-	}
-
-	// A concrete type implements T if it implements all methods of T.
-	for _, m := range T.allMethods {
-		obj, _, _ := lookupFieldOrMethod(V, false, m.pkg, m.name)
-
-		f, _ := obj.(*Func)
-		if f == nil {
-			return m, false
-		}
-
-		if !Identical(f.typ, m.typ) {
-			return m, true
-		}
-	}
-
-	return
-}
-
-// assertableTo reports whether a value of type V can be asserted to have type T.
-// It returns (nil, false) as affirmative answer. Otherwise it returns a missing
-// method required by V and whether it is missing or just has the wrong type.
-func assertableTo(V *Interface, T Type) (method *Func, wrongType bool) {
-	// no static check is required if T is an interface
-	// spec: "If T is an interface type, x.(T) asserts that the
-	//        dynamic type of x implements the interface T."
-	if _, ok := T.Underlying().(*Interface); ok && !strict {
-		return
-	}
-	return MissingMethod(T, V, false)
-}
-
-// deref dereferences typ if it is a *Pointer and returns its base and true.
-// Otherwise it returns (typ, false).
-func deref(typ Type) (Type, bool) {
-	if p, _ := typ.(*Pointer); p != nil {
-		return p.base, true
-	}
-	return typ, false
-}
-
-// derefStructPtr dereferences typ if it is a (named or unnamed) pointer to a
-// (named or unnamed) struct and returns its base. Otherwise it returns typ.
-func derefStructPtr(typ Type) Type {
-	if p, _ := typ.Underlying().(*Pointer); p != nil {
-		if _, ok := p.base.Underlying().(*Struct); ok {
-			return p.base
-		}
-	}
-	return typ
-}
-
-// concat returns the result of concatenating list and i.
-// The result does not share its underlying array with list.
-func concat(list []int, i int) []int {
-	var t []int
-	t = append(t, list...)
-	return append(t, i)
-}
-
-// fieldIndex returns the index for the field with matching package and name, or a value < 0.
-func fieldIndex(fields []*Var, pkg *Package, name string) int {
-	if name != "_" {
-		for i, f := range fields {
-			if f.sameId(pkg, name) {
-				return i
-			}
-		}
-	}
-	return -1
-}
-
-// lookupMethod returns the index of and method with matching package and name, or (-1, nil).
-func lookupMethod(methods []*Func, pkg *Package, name string) (int, *Func) {
-	if name != "_" {
-		for i, m := range methods {
-			if m.sameId(pkg, name) {
-				return i, m
-			}
-		}
-	}
-	return -1, nil
-}
diff --git a/src/go/types/methodset.go b/src/go/types/methodset.go
deleted file mode 100644
index b27f2da..0000000
--- a/src/go/types/methodset.go
+++ /dev/null
@@ -1,268 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements method sets.
-
-package types
-
-import (
-	"bytes"
-	"fmt"
-	"sort"
-)
-
-// A MethodSet is an ordered set of concrete or abstract (interface) methods;
-// a method is a MethodVal selection, and they are ordered by ascending m.Obj().Id().
-// The zero value for a MethodSet is a ready-to-use empty method set.
-type MethodSet struct {
-	list []*Selection
-}
-
-func (s *MethodSet) String() string {
-	if s.Len() == 0 {
-		return "MethodSet {}"
-	}
-
-	var buf bytes.Buffer
-	fmt.Fprintln(&buf, "MethodSet {")
-	for _, f := range s.list {
-		fmt.Fprintf(&buf, "\t%s\n", f)
-	}
-	fmt.Fprintln(&buf, "}")
-	return buf.String()
-}
-
-// Len returns the number of methods in s.
-func (s *MethodSet) Len() int { return len(s.list) }
-
-// At returns the i'th method in s for 0 <= i < s.Len().
-func (s *MethodSet) At(i int) *Selection { return s.list[i] }
-
-// Lookup returns the method with matching package and name, or nil if not found.
-func (s *MethodSet) Lookup(pkg *Package, name string) *Selection {
-	if s.Len() == 0 {
-		return nil
-	}
-
-	key := Id(pkg, name)
-	i := sort.Search(len(s.list), func(i int) bool {
-		m := s.list[i]
-		return m.obj.Id() >= key
-	})
-	if i < len(s.list) {
-		m := s.list[i]
-		if m.obj.Id() == key {
-			return m
-		}
-	}
-	return nil
-}
-
-// Shared empty method set.
-var emptyMethodSet MethodSet
-
-// NewMethodSet returns the method set for the given type T.
-// It always returns a non-nil method set, even if it is empty.
-func NewMethodSet(T Type) *MethodSet {
-	// WARNING: The code in this function is extremely subtle - do not modify casually!
-	//          This function and lookupFieldOrMethod should be kept in sync.
-
-	// method set up to the current depth, allocated lazily
-	var base methodSet
-
-	typ, isPtr := deref(T)
-	named, _ := typ.(*Named)
-
-	// *typ where typ is an interface has no methods.
-	if isPtr {
-		utyp := typ
-		if named != nil {
-			utyp = named.underlying
-		}
-		if _, ok := utyp.(*Interface); ok {
-			return &emptyMethodSet
-		}
-	}
-
-	// Start with typ as single entry at shallowest depth.
-	// If typ is not a named type, insert a nil type instead.
-	current := []embeddedType{{named, nil, isPtr, false}}
-
-	// named types that we have seen already, allocated lazily
-	var seen map[*Named]bool
-
-	// collect methods at current depth
-	for len(current) > 0 {
-		var next []embeddedType // embedded types found at current depth
-
-		// field and method sets at current depth, allocated lazily
-		var fset fieldSet
-		var mset methodSet
-
-		for _, e := range current {
-			// The very first time only, e.typ may be nil.
-			// In this case, we don't have a named type and
-			// we simply continue with the underlying type.
-			if e.typ != nil {
-				if seen[e.typ] {
-					// We have seen this type before, at a more shallow depth
-					// (note that multiples of this type at the current depth
-					// were consolidated before). The type at that depth shadows
-					// this same type at the current depth, so we can ignore
-					// this one.
-					continue
-				}
-				if seen == nil {
-					seen = make(map[*Named]bool)
-				}
-				seen[e.typ] = true
-
-				mset = mset.add(e.typ.methods, e.index, e.indirect, e.multiples)
-
-				// continue with underlying type
-				typ = e.typ.underlying
-			}
-
-			switch t := typ.(type) {
-			case *Struct:
-				for i, f := range t.fields {
-					fset = fset.add(f, e.multiples)
-
-					// Embedded fields are always of the form T or *T where
-					// T is a named type. If typ appeared multiple times at
-					// this depth, f.Type appears multiple times at the next
-					// depth.
-					if f.anonymous {
-						// Ignore embedded basic types - only user-defined
-						// named types can have methods or struct fields.
-						typ, isPtr := deref(f.typ)
-						if t, _ := typ.(*Named); t != nil {
-							next = append(next, embeddedType{t, concat(e.index, i), e.indirect || isPtr, e.multiples})
-						}
-					}
-				}
-
-			case *Interface:
-				mset = mset.add(t.allMethods, e.index, true, e.multiples)
-			}
-		}
-
-		// Add methods and collisions at this depth to base if no entries with matching
-		// names exist already.
-		for k, m := range mset {
-			if _, found := base[k]; !found {
-				// Fields collide with methods of the same name at this depth.
-				if _, found := fset[k]; found {
-					m = nil // collision
-				}
-				if base == nil {
-					base = make(methodSet)
-				}
-				base[k] = m
-			}
-		}
-
-		// Multiple fields with matching names collide at this depth and shadow all
-		// entries further down; add them as collisions to base if no entries with
-		// matching names exist already.
-		for k, f := range fset {
-			if f == nil {
-				if _, found := base[k]; !found {
-					if base == nil {
-						base = make(methodSet)
-					}
-					base[k] = nil // collision
-				}
-			}
-		}
-
-		current = consolidateMultiples(next)
-	}
-
-	if len(base) == 0 {
-		return &emptyMethodSet
-	}
-
-	// collect methods
-	var list []*Selection
-	for _, m := range base {
-		if m != nil {
-			m.recv = T
-			list = append(list, m)
-		}
-	}
-	sort.Sort(byUniqueName(list))
-	return &MethodSet{list}
-}
-
-// A fieldSet is a set of fields and name collisions.
-// A collision indicates that multiple fields with the
-// same unique id appeared.
-type fieldSet map[string]*Var // a nil entry indicates a name collision
-
-// Add adds field f to the field set s.
-// If multiples is set, f appears multiple times
-// and is treated as a collision.
-func (s fieldSet) add(f *Var, multiples bool) fieldSet {
-	if s == nil {
-		s = make(fieldSet)
-	}
-	key := f.Id()
-	// if f is not in the set, add it
-	if !multiples {
-		if _, found := s[key]; !found {
-			s[key] = f
-			return s
-		}
-	}
-	s[key] = nil // collision
-	return s
-}
-
-// A methodSet is a set of methods and name collisions.
-// A collision indicates that multiple methods with the
-// same unique id appeared.
-type methodSet map[string]*Selection // a nil entry indicates a name collision
-
-// Add adds all functions in list to the method set s.
-// If multiples is set, every function in list appears multiple times
-// and is treated as a collision.
-func (s methodSet) add(list []*Func, index []int, indirect bool, multiples bool) methodSet {
-	if len(list) == 0 {
-		return s
-	}
-	if s == nil {
-		s = make(methodSet)
-	}
-	for i, f := range list {
-		key := f.Id()
-		// if f is not in the set, add it
-		if !multiples {
-			// TODO(gri) A found method may not be added because it's not in the method set
-			// (!indirect && ptrRecv(f)). A 2nd method on the same level may be in the method
-			// set and may not collide with the first one, thus leading to a false positive.
-			// Is that possible? Investigate.
-			if _, found := s[key]; !found && (indirect || !ptrRecv(f)) {
-				s[key] = &Selection{MethodVal, nil, f, concat(index, i), indirect}
-				continue
-			}
-		}
-		s[key] = nil // collision
-	}
-	return s
-}
-
-// ptrRecv reports whether the receiver is of the form *T.
-// The receiver must exist.
-func ptrRecv(f *Func) bool {
-	_, isPtr := deref(f.typ.(*Signature).recv.typ)
-	return isPtr
-}
-
-// byUniqueName function lists can be sorted by their unique names.
-type byUniqueName []*Selection
-
-func (a byUniqueName) Len() int           { return len(a) }
-func (a byUniqueName) Less(i, j int) bool { return a[i].obj.Id() < a[j].obj.Id() }
-func (a byUniqueName) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }
diff --git a/src/go/types/object.go b/src/go/types/object.go
deleted file mode 100644
index b835c6e..0000000
--- a/src/go/types/object.go
+++ /dev/null
@@ -1,360 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package types
-
-import (
-	"bytes"
-	"fmt"
-	"go/ast"
-	"go/constant"
-	"go/token"
-)
-
-// TODO(gri) Document factory, accessor methods, and fields. General clean-up.
-
-// An Object describes a named language entity such as a package,
-// constant, type, variable, function (incl. methods), or label.
-// All objects implement the Object interface.
-//
-type Object interface {
-	Parent() *Scope // scope in which this object is declared
-	Pos() token.Pos // position of object identifier in declaration
-	Pkg() *Package  // nil for objects in the Universe scope and labels
-	Name() string   // package local object name
-	Type() Type     // object type
-	Exported() bool // reports whether the name starts with a capital letter
-	Id() string     // object id (see Id below)
-
-	// String returns a human-readable string of the object.
-	String() string
-
-	// order reflects a package-level object's source order: if object
-	// a is before object b in the source, then a.order() < b.order().
-	// order returns a value > 0 for package-level objects; it returns
-	// 0 for all other objects (including objects in file scopes).
-	order() uint32
-
-	// setOrder sets the order number of the object. It must be > 0.
-	setOrder(uint32)
-
-	// setParent sets the parent scope of the object.
-	setParent(*Scope)
-
-	// sameId reports whether obj.Id() and Id(pkg, name) are the same.
-	sameId(pkg *Package, name string) bool
-
-	// scopePos returns the start position of the scope of this Object
-	scopePos() token.Pos
-
-	// setScopePos sets the start position of the scope for this Object.
-	setScopePos(pos token.Pos)
-}
-
-// Id returns name if it is exported, otherwise it
-// returns the name qualified with the package path.
-func Id(pkg *Package, name string) string {
-	if ast.IsExported(name) {
-		return name
-	}
-	// unexported names need the package path for differentiation
-	// (if there's no package, make sure we don't start with '.'
-	// as that may change the order of methods between a setup
-	// inside a package and outside a package - which breaks some
-	// tests)
-	path := "_"
-	// TODO(gri): shouldn't !ast.IsExported(name) => pkg != nil be an precondition?
-	// if pkg == nil {
-	// 	panic("nil package in lookup of unexported name")
-	// }
-	if pkg != nil {
-		path = pkg.path
-		if path == "" {
-			path = "_"
-		}
-	}
-	return path + "." + name
-}
-
-// An object implements the common parts of an Object.
-type object struct {
-	parent    *Scope
-	pos       token.Pos
-	pkg       *Package
-	name      string
-	typ       Type
-	order_    uint32
-	scopePos_ token.Pos
-}
-
-func (obj *object) Parent() *Scope      { return obj.parent }
-func (obj *object) Pos() token.Pos      { return obj.pos }
-func (obj *object) Pkg() *Package       { return obj.pkg }
-func (obj *object) Name() string        { return obj.name }
-func (obj *object) Type() Type          { return obj.typ }
-func (obj *object) Exported() bool      { return ast.IsExported(obj.name) }
-func (obj *object) Id() string          { return Id(obj.pkg, obj.name) }
-func (obj *object) String() string      { panic("abstract") }
-func (obj *object) order() uint32       { return obj.order_ }
-func (obj *object) scopePos() token.Pos { return obj.scopePos_ }
-
-func (obj *object) setParent(parent *Scope)   { obj.parent = parent }
-func (obj *object) setOrder(order uint32)     { assert(order > 0); obj.order_ = order }
-func (obj *object) setScopePos(pos token.Pos) { obj.scopePos_ = pos }
-
-func (obj *object) sameId(pkg *Package, name string) bool {
-	// spec:
-	// "Two identifiers are different if they are spelled differently,
-	// or if they appear in different packages and are not exported.
-	// Otherwise, they are the same."
-	if name != obj.name {
-		return false
-	}
-	// obj.Name == name
-	if obj.Exported() {
-		return true
-	}
-	// not exported, so packages must be the same (pkg == nil for
-	// fields in Universe scope; this can only happen for types
-	// introduced via Eval)
-	if pkg == nil || obj.pkg == nil {
-		return pkg == obj.pkg
-	}
-	// pkg != nil && obj.pkg != nil
-	return pkg.path == obj.pkg.path
-}
-
-// A PkgName represents an imported Go package.
-type PkgName struct {
-	object
-	imported *Package
-	used     bool // set if the package was used
-}
-
-func NewPkgName(pos token.Pos, pkg *Package, name string, imported *Package) *PkgName {
-	return &PkgName{object{nil, pos, pkg, name, Typ[Invalid], 0, token.NoPos}, imported, false}
-}
-
-// Imported returns the package that was imported.
-// It is distinct from Pkg(), which is the package containing the import statement.
-func (obj *PkgName) Imported() *Package { return obj.imported }
-
-// A Const represents a declared constant.
-type Const struct {
-	object
-	val     constant.Value
-	visited bool // for initialization cycle detection
-}
-
-func NewConst(pos token.Pos, pkg *Package, name string, typ Type, val constant.Value) *Const {
-	return &Const{object{nil, pos, pkg, name, typ, 0, token.NoPos}, val, false}
-}
-
-func (obj *Const) Val() constant.Value { return obj.val }
-
-// A TypeName represents a declared type.
-type TypeName struct {
-	object
-}
-
-func NewTypeName(pos token.Pos, pkg *Package, name string, typ Type) *TypeName {
-	return &TypeName{object{nil, pos, pkg, name, typ, 0, token.NoPos}}
-}
-
-// A Variable represents a declared variable (including function parameters and results, and struct fields).
-type Var struct {
-	object
-	anonymous bool // if set, the variable is an anonymous struct field, and name is the type name
-	visited   bool // for initialization cycle detection
-	isField   bool // var is struct field
-	used      bool // set if the variable was used
-}
-
-func NewVar(pos token.Pos, pkg *Package, name string, typ Type) *Var {
-	return &Var{object: object{nil, pos, pkg, name, typ, 0, token.NoPos}}
-}
-
-func NewParam(pos token.Pos, pkg *Package, name string, typ Type) *Var {
-	return &Var{object: object{nil, pos, pkg, name, typ, 0, token.NoPos}, used: true} // parameters are always 'used'
-}
-
-func NewField(pos token.Pos, pkg *Package, name string, typ Type, anonymous bool) *Var {
-	return &Var{object: object{nil, pos, pkg, name, typ, 0, token.NoPos}, anonymous: anonymous, isField: true}
-}
-
-func (obj *Var) Anonymous() bool { return obj.anonymous }
-
-func (obj *Var) IsField() bool { return obj.isField }
-
-// A Func represents a declared function, concrete method, or abstract
-// (interface) method.  Its Type() is always a *Signature.
-// An abstract method may belong to many interfaces due to embedding.
-type Func struct {
-	object
-}
-
-func NewFunc(pos token.Pos, pkg *Package, name string, sig *Signature) *Func {
-	// don't store a nil signature
-	var typ Type
-	if sig != nil {
-		typ = sig
-	}
-	return &Func{object{nil, pos, pkg, name, typ, 0, token.NoPos}}
-}
-
-// FullName returns the package- or receiver-type-qualified name of
-// function or method obj.
-func (obj *Func) FullName() string {
-	var buf bytes.Buffer
-	writeFuncName(&buf, obj, nil)
-	return buf.String()
-}
-
-func (obj *Func) Scope() *Scope {
-	return obj.typ.(*Signature).scope
-}
-
-// A Label represents a declared label.
-type Label struct {
-	object
-	used bool // set if the label was used
-}
-
-func NewLabel(pos token.Pos, pkg *Package, name string) *Label {
-	return &Label{object{pos: pos, pkg: pkg, name: name, typ: Typ[Invalid]}, false}
-}
-
-// A Builtin represents a built-in function.
-// Builtins don't have a valid type.
-type Builtin struct {
-	object
-	id builtinId
-}
-
-func newBuiltin(id builtinId) *Builtin {
-	return &Builtin{object{name: predeclaredFuncs[id].name, typ: Typ[Invalid]}, id}
-}
-
-// Nil represents the predeclared value nil.
-type Nil struct {
-	object
-}
-
-func writeObject(buf *bytes.Buffer, obj Object, qf Qualifier) {
-	typ := obj.Type()
-	switch obj := obj.(type) {
-	case *PkgName:
-		fmt.Fprintf(buf, "package %s", obj.Name())
-		if path := obj.imported.path; path != "" && path != obj.name {
-			fmt.Fprintf(buf, " (%q)", path)
-		}
-		return
-
-	case *Const:
-		buf.WriteString("const")
-
-	case *TypeName:
-		buf.WriteString("type")
-		typ = typ.Underlying()
-
-	case *Var:
-		if obj.isField {
-			buf.WriteString("field")
-		} else {
-			buf.WriteString("var")
-		}
-
-	case *Func:
-		buf.WriteString("func ")
-		writeFuncName(buf, obj, qf)
-		if typ != nil {
-			WriteSignature(buf, typ.(*Signature), qf)
-		}
-		return
-
-	case *Label:
-		buf.WriteString("label")
-		typ = nil
-
-	case *Builtin:
-		buf.WriteString("builtin")
-		typ = nil
-
-	case *Nil:
-		buf.WriteString("nil")
-		return
-
-	default:
-		panic(fmt.Sprintf("writeObject(%T)", obj))
-	}
-
-	buf.WriteByte(' ')
-
-	// For package-level objects, qualify the name.
-	if obj.Pkg() != nil && obj.Pkg().scope.Lookup(obj.Name()) == obj {
-		writePackage(buf, obj.Pkg(), qf)
-	}
-	buf.WriteString(obj.Name())
-	if typ != nil {
-		buf.WriteByte(' ')
-		WriteType(buf, typ, qf)
-	}
-}
-
-func writePackage(buf *bytes.Buffer, pkg *Package, qf Qualifier) {
-	if pkg == nil {
-		return
-	}
-	var s string
-	if qf != nil {
-		s = qf(pkg)
-	} else {
-		s = pkg.Path()
-	}
-	if s != "" {
-		buf.WriteString(s)
-		buf.WriteByte('.')
-	}
-}
-
-// ObjectString returns the string form of obj.
-// The Qualifier controls the printing of
-// package-level objects, and may be nil.
-func ObjectString(obj Object, qf Qualifier) string {
-	var buf bytes.Buffer
-	writeObject(&buf, obj, qf)
-	return buf.String()
-}
-
-func (obj *PkgName) String() string  { return ObjectString(obj, nil) }
-func (obj *Const) String() string    { return ObjectString(obj, nil) }
-func (obj *TypeName) String() string { return ObjectString(obj, nil) }
-func (obj *Var) String() string      { return ObjectString(obj, nil) }
-func (obj *Func) String() string     { return ObjectString(obj, nil) }
-func (obj *Label) String() string    { return ObjectString(obj, nil) }
-func (obj *Builtin) String() string  { return ObjectString(obj, nil) }
-func (obj *Nil) String() string      { return ObjectString(obj, nil) }
-
-func writeFuncName(buf *bytes.Buffer, f *Func, qf Qualifier) {
-	if f.typ != nil {
-		sig := f.typ.(*Signature)
-		if recv := sig.Recv(); recv != nil {
-			buf.WriteByte('(')
-			if _, ok := recv.Type().(*Interface); ok {
-				// gcimporter creates abstract methods of
-				// named interfaces using the interface type
-				// (not the named type) as the receiver.
-				// Don't print it in full.
-				buf.WriteString("interface")
-			} else {
-				WriteType(buf, recv.Type(), qf)
-			}
-			buf.WriteByte(')')
-			buf.WriteByte('.')
-		} else if f.pkg != nil {
-			writePackage(buf, f.pkg, qf)
-		}
-	}
-	buf.WriteString(f.name)
-}
diff --git a/src/go/types/objset.go b/src/go/types/objset.go
deleted file mode 100644
index 55eb74a..0000000
--- a/src/go/types/objset.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements objsets.
-//
-// An objset is similar to a Scope but objset elements
-// are identified by their unique id, instead of their
-// object name.
-
-package types
-
-// An objset is a set of objects identified by their unique id.
-// The zero value for objset is a ready-to-use empty objset.
-type objset map[string]Object // initialized lazily
-
-// insert attempts to insert an object obj into objset s.
-// If s already contains an alternative object alt with
-// the same name, insert leaves s unchanged and returns alt.
-// Otherwise it inserts obj and returns nil.
-func (s *objset) insert(obj Object) Object {
-	id := obj.Id()
-	if alt := (*s)[id]; alt != nil {
-		return alt
-	}
-	if *s == nil {
-		*s = make(map[string]Object)
-	}
-	(*s)[id] = obj
-	return nil
-}
diff --git a/src/go/types/operand.go b/src/go/types/operand.go
deleted file mode 100644
index d3bab51..0000000
--- a/src/go/types/operand.go
+++ /dev/null
@@ -1,287 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file defines operands and associated operations.
-
-package types
-
-import (
-	"bytes"
-	"go/ast"
-	"go/constant"
-	"go/token"
-)
-
-// An operandMode specifies the (addressing) mode of an operand.
-type operandMode byte
-
-const (
-	invalid   operandMode = iota // operand is invalid
-	novalue                      // operand represents no value (result of a function call w/o result)
-	builtin                      // operand is a built-in function
-	typexpr                      // operand is a type
-	constant_                    // operand is a constant; the operand's typ is a Basic type
-	variable                     // operand is an addressable variable
-	mapindex                     // operand is a map index expression (acts like a variable on lhs, commaok on rhs of an assignment)
-	value                        // operand is a computed value
-	commaok                      // like value, but operand may be used in a comma,ok expression
-)
-
-var operandModeString = [...]string{
-	invalid:   "invalid operand",
-	novalue:   "no value",
-	builtin:   "built-in",
-	typexpr:   "type",
-	constant_: "constant",
-	variable:  "variable",
-	mapindex:  "map index expression",
-	value:     "value",
-	commaok:   "comma, ok expression",
-}
-
-// An operand represents an intermediate value during type checking.
-// Operands have an (addressing) mode, the expression evaluating to
-// the operand, the operand's type, a value for constants, and an id
-// for built-in functions.
-// The zero value of operand is a ready to use invalid operand.
-//
-type operand struct {
-	mode operandMode
-	expr ast.Expr
-	typ  Type
-	val  constant.Value
-	id   builtinId
-}
-
-// pos returns the position of the expression corresponding to x.
-// If x is invalid the position is token.NoPos.
-//
-func (x *operand) pos() token.Pos {
-	// x.expr may not be set if x is invalid
-	if x.expr == nil {
-		return token.NoPos
-	}
-	return x.expr.Pos()
-}
-
-// Operand string formats
-// (not all "untyped" cases can appear due to the type system,
-// but they fall out naturally here)
-//
-// mode       format
-//
-// invalid    <expr> (               <mode>                    )
-// novalue    <expr> (               <mode>                    )
-// builtin    <expr> (               <mode>                    )
-// typexpr    <expr> (               <mode>                    )
-//
-// constant   <expr> (<untyped kind> <mode>                    )
-// constant   <expr> (               <mode>       of type <typ>)
-// constant   <expr> (<untyped kind> <mode> <val>              )
-// constant   <expr> (               <mode> <val> of type <typ>)
-//
-// variable   <expr> (<untyped kind> <mode>                    )
-// variable   <expr> (               <mode>       of type <typ>)
-//
-// mapindex   <expr> (<untyped kind> <mode>                    )
-// mapindex   <expr> (               <mode>       of type <typ>)
-//
-// value      <expr> (<untyped kind> <mode>                    )
-// value      <expr> (               <mode>       of type <typ>)
-//
-// commaok    <expr> (<untyped kind> <mode>                    )
-// commaok    <expr> (               <mode>       of type <typ>)
-//
-func operandString(x *operand, qf Qualifier) string {
-	var buf bytes.Buffer
-
-	var expr string
-	if x.expr != nil {
-		expr = ExprString(x.expr)
-	} else {
-		switch x.mode {
-		case builtin:
-			expr = predeclaredFuncs[x.id].name
-		case typexpr:
-			expr = TypeString(x.typ, qf)
-		case constant_:
-			expr = x.val.String()
-		}
-	}
-
-	// <expr> (
-	if expr != "" {
-		buf.WriteString(expr)
-		buf.WriteString(" (")
-	}
-
-	// <untyped kind>
-	hasType := false
-	switch x.mode {
-	case invalid, novalue, builtin, typexpr:
-		// no type
-	default:
-		// has type
-		if isUntyped(x.typ) {
-			buf.WriteString(x.typ.(*Basic).name)
-			buf.WriteByte(' ')
-			break
-		}
-		hasType = true
-	}
-
-	// <mode>
-	buf.WriteString(operandModeString[x.mode])
-
-	// <val>
-	if x.mode == constant_ {
-		if s := x.val.String(); s != expr {
-			buf.WriteByte(' ')
-			buf.WriteString(s)
-		}
-	}
-
-	// <typ>
-	if hasType {
-		if x.typ != Typ[Invalid] {
-			buf.WriteString(" of type ")
-			WriteType(&buf, x.typ, qf)
-		} else {
-			buf.WriteString(" with invalid type")
-		}
-	}
-
-	// )
-	if expr != "" {
-		buf.WriteByte(')')
-	}
-
-	return buf.String()
-}
-
-func (x *operand) String() string {
-	return operandString(x, nil)
-}
-
-// setConst sets x to the untyped constant for literal lit.
-func (x *operand) setConst(tok token.Token, lit string) {
-	val := constant.MakeFromLiteral(lit, tok, 0)
-	if val == nil {
-		// TODO(gri) Should we make it an unknown constant instead?
-		x.mode = invalid
-		return
-	}
-
-	var kind BasicKind
-	switch tok {
-	case token.INT:
-		kind = UntypedInt
-	case token.FLOAT:
-		kind = UntypedFloat
-	case token.IMAG:
-		kind = UntypedComplex
-	case token.CHAR:
-		kind = UntypedRune
-	case token.STRING:
-		kind = UntypedString
-	}
-
-	x.mode = constant_
-	x.typ = Typ[kind]
-	x.val = val
-}
-
-// isNil reports whether x is the nil value.
-func (x *operand) isNil() bool {
-	return x.mode == value && x.typ == Typ[UntypedNil]
-}
-
-// TODO(gri) The functions operand.assignableTo, checker.convertUntyped,
-//           checker.representable, and checker.assignment are
-//           overlapping in functionality. Need to simplify and clean up.
-
-// assignableTo reports whether x is assignable to a variable of type T.
-func (x *operand) assignableTo(conf *Config, T Type) bool {
-	if x.mode == invalid || T == Typ[Invalid] {
-		return true // avoid spurious errors
-	}
-
-	V := x.typ
-
-	// x's type is identical to T
-	if Identical(V, T) {
-		return true
-	}
-
-	Vu := V.Underlying()
-	Tu := T.Underlying()
-
-	// T is an interface type and x implements T
-	// (Do this check first as it might succeed early.)
-	if Ti, ok := Tu.(*Interface); ok {
-		if Implements(x.typ, Ti) {
-			return true
-		}
-	}
-
-	// x's type V and T have identical underlying types
-	// and at least one of V or T is not a named type
-	if Identical(Vu, Tu) && (!isNamed(V) || !isNamed(T)) {
-		return true
-	}
-
-	// x is a bidirectional channel value, T is a channel
-	// type, x's type V and T have identical element types,
-	// and at least one of V or T is not a named type
-	if Vc, ok := Vu.(*Chan); ok && Vc.dir == SendRecv {
-		if Tc, ok := Tu.(*Chan); ok && Identical(Vc.elem, Tc.elem) {
-			return !isNamed(V) || !isNamed(T)
-		}
-	}
-
-	// x is the predeclared identifier nil and T is a pointer,
-	// function, slice, map, channel, or interface type
-	if x.isNil() {
-		switch t := Tu.(type) {
-		case *Basic:
-			if t.kind == UnsafePointer {
-				return true
-			}
-		case *Pointer, *Signature, *Slice, *Map, *Chan, *Interface:
-			return true
-		}
-		return false
-	}
-
-	// x is an untyped constant representable by a value of type T
-	// TODO(gri) This is borrowing from checker.convertUntyped and
-	//           checker.representable. Need to clean up.
-	if isUntyped(Vu) {
-		switch t := Tu.(type) {
-		case *Basic:
-			if x.mode == constant_ {
-				return representableConst(x.val, conf, t.kind, nil)
-			}
-			// The result of a comparison is an untyped boolean,
-			// but may not be a constant.
-			if Vb, _ := Vu.(*Basic); Vb != nil {
-				return Vb.kind == UntypedBool && isBoolean(Tu)
-			}
-		case *Interface:
-			return x.isNil() || t.Empty()
-		case *Pointer, *Signature, *Slice, *Map, *Chan:
-			return x.isNil()
-		}
-	}
-
-	return false
-}
-
-// isInteger reports whether x is value of integer type
-// or an untyped constant representable as an integer.
-func (x *operand) isInteger() bool {
-	return x.mode == invalid ||
-		isInteger(x.typ) ||
-		isUntyped(x.typ) && x.mode == constant_ && representableConst(x.val, nil, UntypedInt, nil) // no *Config required for UntypedInt
-}
diff --git a/src/go/types/ordering.go b/src/go/types/ordering.go
deleted file mode 100644
index 6bb98f2..0000000
--- a/src/go/types/ordering.go
+++ /dev/null
@@ -1,127 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements resolveOrder.
-
-package types
-
-import (
-	"go/ast"
-	"sort"
-)
-
-// resolveOrder computes the order in which package-level objects
-// must be type-checked.
-//
-// Interface types appear first in the list, sorted topologically
-// by dependencies on embedded interfaces that are also declared
-// in this package, followed by all other objects sorted in source
-// order.
-//
-// TODO(gri) Consider sorting all types by dependencies here, and
-// in the process check _and_ report type cycles. This may simplify
-// the full type-checking phase.
-//
-func (check *Checker) resolveOrder() []Object {
-	var ifaces, others []Object
-
-	// collect interface types with their dependencies, and all other objects
-	for obj := range check.objMap {
-		if ityp := check.interfaceFor(obj); ityp != nil {
-			ifaces = append(ifaces, obj)
-			// determine dependencies on embedded interfaces
-			for _, f := range ityp.Methods.List {
-				if len(f.Names) == 0 {
-					// Embedded interface: The type must be a (possibly
-					// qualified) identifier denoting another interface.
-					// Imported interfaces are already fully resolved,
-					// so we can ignore qualified identifiers.
-					if ident, _ := f.Type.(*ast.Ident); ident != nil {
-						embedded := check.pkg.scope.Lookup(ident.Name)
-						if check.interfaceFor(embedded) != nil {
-							check.objMap[obj].addDep(embedded)
-						}
-					}
-				}
-			}
-		} else {
-			others = append(others, obj)
-		}
-	}
-
-	// final object order
-	var order []Object
-
-	// sort interface types topologically by dependencies,
-	// and in source order if there are no dependencies
-	sort.Sort(inSourceOrder(ifaces))
-	if debug {
-		for _, obj := range ifaces {
-			assert(check.objMap[obj].mark == 0)
-		}
-	}
-	for _, obj := range ifaces {
-		check.appendInPostOrder(&order, obj)
-	}
-
-	// sort everything else in source order
-	sort.Sort(inSourceOrder(others))
-
-	return append(order, others...)
-}
-
-// interfaceFor returns the AST interface denoted by obj, or nil.
-func (check *Checker) interfaceFor(obj Object) *ast.InterfaceType {
-	tname, _ := obj.(*TypeName)
-	if tname == nil {
-		return nil // not a type
-	}
-	d := check.objMap[obj]
-	if d == nil {
-		check.dump("%s: %s should have been declared", obj.Pos(), obj.Name())
-		unreachable()
-	}
-	if d.typ == nil {
-		return nil // invalid AST - ignore (will be handled later)
-	}
-	ityp, _ := d.typ.(*ast.InterfaceType)
-	return ityp
-}
-
-func (check *Checker) appendInPostOrder(order *[]Object, obj Object) {
-	d := check.objMap[obj]
-	if d.mark != 0 {
-		// We've already seen this object; either because it's
-		// already added to order, or because we have a cycle.
-		// In both cases we stop. Cycle errors are reported
-		// when type-checking types.
-		return
-	}
-	d.mark = 1
-
-	for _, obj := range orderedSetObjects(d.deps) {
-		check.appendInPostOrder(order, obj)
-	}
-
-	*order = append(*order, obj)
-}
-
-func orderedSetObjects(set map[Object]bool) []Object {
-	list := make([]Object, len(set))
-	i := 0
-	for obj := range set {
-		// we don't care about the map element value
-		list[i] = obj
-		i++
-	}
-	sort.Sort(inSourceOrder(list))
-	return list
-}
-
-// inSourceOrder implements the sort.Sort interface.
-type inSourceOrder []Object
-
-func (a inSourceOrder) Len() int           { return len(a) }
-func (a inSourceOrder) Less(i, j int) bool { return a[i].order() < a[j].order() }
-func (a inSourceOrder) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }
diff --git a/src/go/types/package.go b/src/go/types/package.go
deleted file mode 100644
index 48fe839..0000000
--- a/src/go/types/package.go
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package types
-
-import (
-	"fmt"
-	"go/token"
-)
-
-// A Package describes a Go package.
-type Package struct {
-	path     string
-	name     string
-	scope    *Scope
-	complete bool
-	imports  []*Package
-	fake     bool // scope lookup errors are silently dropped if package is fake (internal use only)
-}
-
-// NewPackage returns a new Package for the given package path and name;
-// the name must not be the blank identifier.
-// The package is not complete and contains no explicit imports.
-func NewPackage(path, name string) *Package {
-	if name == "_" {
-		panic("invalid package name _")
-	}
-	scope := NewScope(Universe, token.NoPos, token.NoPos, fmt.Sprintf("package %q", path))
-	return &Package{path: path, name: name, scope: scope}
-}
-
-// Path returns the package path.
-func (pkg *Package) Path() string { return pkg.path }
-
-// Name returns the package name.
-func (pkg *Package) Name() string { return pkg.name }
-
-// Scope returns the (complete or incomplete) package scope
-// holding the objects declared at package level (TypeNames,
-// Consts, Vars, and Funcs).
-func (pkg *Package) Scope() *Scope { return pkg.scope }
-
-// A package is complete if its scope contains (at least) all
-// exported objects; otherwise it is incomplete.
-func (pkg *Package) Complete() bool { return pkg.complete }
-
-// MarkComplete marks a package as complete.
-func (pkg *Package) MarkComplete() { pkg.complete = true }
-
-// Imports returns the list of packages directly imported by
-// pkg; the list is in source order. Package unsafe is excluded.
-//
-// If pkg was loaded from export data, Imports includes packages that
-// provide package-level objects referenced by pkg.  This may be more or
-// less than the set of packages directly imported by pkg's source code.
-func (pkg *Package) Imports() []*Package { return pkg.imports }
-
-// SetImports sets the list of explicitly imported packages to list.
-// It is the caller's responsibility to make sure list elements are unique.
-func (pkg *Package) SetImports(list []*Package) { pkg.imports = list }
-
-func (pkg *Package) String() string {
-	return fmt.Sprintf("package %s (%q)", pkg.name, pkg.path)
-}
diff --git a/src/go/types/predicates.go b/src/go/types/predicates.go
deleted file mode 100644
index 993c6d2..0000000
--- a/src/go/types/predicates.go
+++ /dev/null
@@ -1,309 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements commonly used type predicates.
-
-package types
-
-import "sort"
-
-func isNamed(typ Type) bool {
-	if _, ok := typ.(*Basic); ok {
-		return ok
-	}
-	_, ok := typ.(*Named)
-	return ok
-}
-
-func isBoolean(typ Type) bool {
-	t, ok := typ.Underlying().(*Basic)
-	return ok && t.info&IsBoolean != 0
-}
-
-func isInteger(typ Type) bool {
-	t, ok := typ.Underlying().(*Basic)
-	return ok && t.info&IsInteger != 0
-}
-
-func isUnsigned(typ Type) bool {
-	t, ok := typ.Underlying().(*Basic)
-	return ok && t.info&IsUnsigned != 0
-}
-
-func isFloat(typ Type) bool {
-	t, ok := typ.Underlying().(*Basic)
-	return ok && t.info&IsFloat != 0
-}
-
-func isComplex(typ Type) bool {
-	t, ok := typ.Underlying().(*Basic)
-	return ok && t.info&IsComplex != 0
-}
-
-func isNumeric(typ Type) bool {
-	t, ok := typ.Underlying().(*Basic)
-	return ok && t.info&IsNumeric != 0
-}
-
-func isString(typ Type) bool {
-	t, ok := typ.Underlying().(*Basic)
-	return ok && t.info&IsString != 0
-}
-
-func isTyped(typ Type) bool {
-	t, ok := typ.Underlying().(*Basic)
-	return !ok || t.info&IsUntyped == 0
-}
-
-func isUntyped(typ Type) bool {
-	t, ok := typ.Underlying().(*Basic)
-	return ok && t.info&IsUntyped != 0
-}
-
-func isOrdered(typ Type) bool {
-	t, ok := typ.Underlying().(*Basic)
-	return ok && t.info&IsOrdered != 0
-}
-
-func isConstType(typ Type) bool {
-	t, ok := typ.Underlying().(*Basic)
-	return ok && t.info&IsConstType != 0
-}
-
-// IsInterface reports whether typ is an interface type.
-func IsInterface(typ Type) bool {
-	_, ok := typ.Underlying().(*Interface)
-	return ok
-}
-
-// Comparable reports whether values of type T are comparable.
-func Comparable(T Type) bool {
-	switch t := T.Underlying().(type) {
-	case *Basic:
-		// assume invalid types to be comparable
-		// to avoid follow-up errors
-		return t.kind != UntypedNil
-	case *Pointer, *Interface, *Chan:
-		return true
-	case *Struct:
-		for _, f := range t.fields {
-			if !Comparable(f.typ) {
-				return false
-			}
-		}
-		return true
-	case *Array:
-		return Comparable(t.elem)
-	}
-	return false
-}
-
-// hasNil reports whether a type includes the nil value.
-func hasNil(typ Type) bool {
-	switch t := typ.Underlying().(type) {
-	case *Basic:
-		return t.kind == UnsafePointer
-	case *Slice, *Pointer, *Signature, *Interface, *Map, *Chan:
-		return true
-	}
-	return false
-}
-
-// Identical reports whether x and y are identical.
-func Identical(x, y Type) bool {
-	return identical(x, y, nil)
-}
-
-// An ifacePair is a node in a stack of interface type pairs compared for identity.
-type ifacePair struct {
-	x, y *Interface
-	prev *ifacePair
-}
-
-func (p *ifacePair) identical(q *ifacePair) bool {
-	return p.x == q.x && p.y == q.y || p.x == q.y && p.y == q.x
-}
-
-func identical(x, y Type, p *ifacePair) bool {
-	if x == y {
-		return true
-	}
-
-	switch x := x.(type) {
-	case *Basic:
-		// Basic types are singletons except for the rune and byte
-		// aliases, thus we cannot solely rely on the x == y check
-		// above.
-		if y, ok := y.(*Basic); ok {
-			return x.kind == y.kind
-		}
-
-	case *Array:
-		// Two array types are identical if they have identical element types
-		// and the same array length.
-		if y, ok := y.(*Array); ok {
-			return x.len == y.len && identical(x.elem, y.elem, p)
-		}
-
-	case *Slice:
-		// Two slice types are identical if they have identical element types.
-		if y, ok := y.(*Slice); ok {
-			return identical(x.elem, y.elem, p)
-		}
-
-	case *Struct:
-		// Two struct types are identical if they have the same sequence of fields,
-		// and if corresponding fields have the same names, and identical types,
-		// and identical tags. Two anonymous fields are considered to have the same
-		// name. Lower-case field names from different packages are always different.
-		if y, ok := y.(*Struct); ok {
-			if x.NumFields() == y.NumFields() {
-				for i, f := range x.fields {
-					g := y.fields[i]
-					if f.anonymous != g.anonymous ||
-						x.Tag(i) != y.Tag(i) ||
-						!f.sameId(g.pkg, g.name) ||
-						!identical(f.typ, g.typ, p) {
-						return false
-					}
-				}
-				return true
-			}
-		}
-
-	case *Pointer:
-		// Two pointer types are identical if they have identical base types.
-		if y, ok := y.(*Pointer); ok {
-			return identical(x.base, y.base, p)
-		}
-
-	case *Tuple:
-		// Two tuples types are identical if they have the same number of elements
-		// and corresponding elements have identical types.
-		if y, ok := y.(*Tuple); ok {
-			if x.Len() == y.Len() {
-				if x != nil {
-					for i, v := range x.vars {
-						w := y.vars[i]
-						if !identical(v.typ, w.typ, p) {
-							return false
-						}
-					}
-				}
-				return true
-			}
-		}
-
-	case *Signature:
-		// Two function types are identical if they have the same number of parameters
-		// and result values, corresponding parameter and result types are identical,
-		// and either both functions are variadic or neither is. Parameter and result
-		// names are not required to match.
-		if y, ok := y.(*Signature); ok {
-			return x.variadic == y.variadic &&
-				identical(x.params, y.params, p) &&
-				identical(x.results, y.results, p)
-		}
-
-	case *Interface:
-		// Two interface types are identical if they have the same set of methods with
-		// the same names and identical function types. Lower-case method names from
-		// different packages are always different. The order of the methods is irrelevant.
-		if y, ok := y.(*Interface); ok {
-			a := x.allMethods
-			b := y.allMethods
-			if len(a) == len(b) {
-				// Interface types are the only types where cycles can occur
-				// that are not "terminated" via named types; and such cycles
-				// can only be created via method parameter types that are
-				// anonymous interfaces (directly or indirectly) embedding
-				// the current interface. Example:
-				//
-				//    type T interface {
-				//        m() interface{T}
-				//    }
-				//
-				// If two such (differently named) interfaces are compared,
-				// endless recursion occurs if the cycle is not detected.
-				//
-				// If x and y were compared before, they must be equal
-				// (if they were not, the recursion would have stopped);
-				// search the ifacePair stack for the same pair.
-				//
-				// This is a quadratic algorithm, but in practice these stacks
-				// are extremely short (bounded by the nesting depth of interface
-				// type declarations that recur via parameter types, an extremely
-				// rare occurrence). An alternative implementation might use a
-				// "visited" map, but that is probably less efficient overall.
-				q := &ifacePair{x, y, p}
-				for p != nil {
-					if p.identical(q) {
-						return true // same pair was compared before
-					}
-					p = p.prev
-				}
-				if debug {
-					assert(sort.IsSorted(byUniqueMethodName(a)))
-					assert(sort.IsSorted(byUniqueMethodName(b)))
-				}
-				for i, f := range a {
-					g := b[i]
-					if f.Id() != g.Id() || !identical(f.typ, g.typ, q) {
-						return false
-					}
-				}
-				return true
-			}
-		}
-
-	case *Map:
-		// Two map types are identical if they have identical key and value types.
-		if y, ok := y.(*Map); ok {
-			return identical(x.key, y.key, p) && identical(x.elem, y.elem, p)
-		}
-
-	case *Chan:
-		// Two channel types are identical if they have identical value types
-		// and the same direction.
-		if y, ok := y.(*Chan); ok {
-			return x.dir == y.dir && identical(x.elem, y.elem, p)
-		}
-
-	case *Named:
-		// Two named types are identical if their type names originate
-		// in the same type declaration.
-		if y, ok := y.(*Named); ok {
-			return x.obj == y.obj
-		}
-
-	default:
-		unreachable()
-	}
-
-	return false
-}
-
-// defaultType returns the default "typed" type for an "untyped" type;
-// it returns the incoming type for all other types. The default type
-// for untyped nil is untyped nil.
-//
-func defaultType(typ Type) Type {
-	if t, ok := typ.(*Basic); ok {
-		switch t.kind {
-		case UntypedBool:
-			return Typ[Bool]
-		case UntypedInt:
-			return Typ[Int]
-		case UntypedRune:
-			return universeRune // use 'rune' name
-		case UntypedFloat:
-			return Typ[Float64]
-		case UntypedComplex:
-			return Typ[Complex128]
-		case UntypedString:
-			return Typ[String]
-		}
-	}
-	return typ
-}
diff --git a/src/go/types/resolver.go b/src/go/types/resolver.go
deleted file mode 100644
index c31ef42..0000000
--- a/src/go/types/resolver.go
+++ /dev/null
@@ -1,445 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package types
-
-import (
-	"fmt"
-	"go/ast"
-	"go/constant"
-	"go/token"
-	pathLib "path"
-	"strconv"
-	"strings"
-	"unicode"
-)
-
-// A declInfo describes a package-level const, type, var, or func declaration.
-type declInfo struct {
-	file  *Scope        // scope of file containing this declaration
-	lhs   []*Var        // lhs of n:1 variable declarations, or nil
-	typ   ast.Expr      // type, or nil
-	init  ast.Expr      // init expression, or nil
-	fdecl *ast.FuncDecl // func declaration, or nil
-
-	deps map[Object]bool // type and init dependencies; lazily allocated
-	mark int             // for dependency analysis
-}
-
-// hasInitializer reports whether the declared object has an initialization
-// expression or function body.
-func (d *declInfo) hasInitializer() bool {
-	return d.init != nil || d.fdecl != nil && d.fdecl.Body != nil
-}
-
-// addDep adds obj as a dependency to d.
-func (d *declInfo) addDep(obj Object) {
-	m := d.deps
-	if m == nil {
-		m = make(map[Object]bool)
-		d.deps = m
-	}
-	m[obj] = true
-}
-
-// arityMatch checks that the lhs and rhs of a const or var decl
-// have the appropriate number of names and init exprs. For const
-// decls, init is the value spec providing the init exprs; for
-// var decls, init is nil (the init exprs are in s in this case).
-func (check *Checker) arityMatch(s, init *ast.ValueSpec) {
-	l := len(s.Names)
-	r := len(s.Values)
-	if init != nil {
-		r = len(init.Values)
-	}
-
-	switch {
-	case init == nil && r == 0:
-		// var decl w/o init expr
-		if s.Type == nil {
-			check.errorf(s.Pos(), "missing type or init expr")
-		}
-	case l < r:
-		if l < len(s.Values) {
-			// init exprs from s
-			n := s.Values[l]
-			check.errorf(n.Pos(), "extra init expr %s", n)
-			// TODO(gri) avoid declared but not used error here
-		} else {
-			// init exprs "inherited"
-			check.errorf(s.Pos(), "extra init expr at %s", init.Pos())
-			// TODO(gri) avoid declared but not used error here
-		}
-	case l > r && (init != nil || r != 1):
-		n := s.Names[r]
-		check.errorf(n.Pos(), "missing init expr for %s", n)
-	}
-}
-
-func validatedImportPath(path string) (string, error) {
-	s, err := strconv.Unquote(path)
-	if err != nil {
-		return "", err
-	}
-	if s == "" {
-		return "", fmt.Errorf("empty string")
-	}
-	const illegalChars = `!"#$%&'()*,:;<=>?[\]^{|}` + "`\uFFFD"
-	for _, r := range s {
-		if !unicode.IsGraphic(r) || unicode.IsSpace(r) || strings.ContainsRune(illegalChars, r) {
-			return s, fmt.Errorf("invalid character %#U", r)
-		}
-	}
-	return s, nil
-}
-
-// declarePkgObj declares obj in the package scope, records its ident -> obj mapping,
-// and updates check.objMap. The object must not be a function or method.
-func (check *Checker) declarePkgObj(ident *ast.Ident, obj Object, d *declInfo) {
-	assert(ident.Name == obj.Name())
-
-	// spec: "A package-scope or file-scope identifier with name init
-	// may only be declared to be a function with this (func()) signature."
-	if ident.Name == "init" {
-		check.errorf(ident.Pos(), "cannot declare init - must be func")
-		return
-	}
-
-	check.declare(check.pkg.scope, ident, obj, token.NoPos)
-	check.objMap[obj] = d
-	obj.setOrder(uint32(len(check.objMap)))
-}
-
-// filename returns a filename suitable for debugging output.
-func (check *Checker) filename(fileNo int) string {
-	file := check.files[fileNo]
-	if pos := file.Pos(); pos.IsValid() {
-		return check.fset.File(pos).Name()
-	}
-	return fmt.Sprintf("file[%d]", fileNo)
-}
-
-// collectObjects collects all file and package objects and inserts them
-// into their respective scopes. It also performs imports and associates
-// methods with receiver base type names.
-func (check *Checker) collectObjects() {
-	pkg := check.pkg
-
-	// pkgImports is the set of packages already imported by any package file seen
-	// so far. Used to avoid duplicate entries in pkg.imports. Allocate and populate
-	// it (pkg.imports may not be empty if we are checking test files incrementally).
-	var pkgImports = make(map[*Package]bool)
-	for _, imp := range pkg.imports {
-		pkgImports[imp] = true
-	}
-
-	for fileNo, file := range check.files {
-		// The package identifier denotes the current package,
-		// but there is no corresponding package object.
-		check.recordDef(file.Name, nil)
-
-		// Use the actual source file extent rather than *ast.File extent since the
-		// latter doesn't include comments which appear at the start or end of the file.
-		// Be conservative and use the *ast.File extent if we don't have a *token.File.
-		pos, end := file.Pos(), file.End()
-		if f := check.fset.File(file.Pos()); f != nil {
-			pos, end = token.Pos(f.Base()), token.Pos(f.Base()+f.Size())
-		}
-		fileScope := NewScope(check.pkg.scope, pos, end, check.filename(fileNo))
-		check.recordScope(file, fileScope)
-
-		for _, decl := range file.Decls {
-			switch d := decl.(type) {
-			case *ast.BadDecl:
-				// ignore
-
-			case *ast.GenDecl:
-				var last *ast.ValueSpec // last ValueSpec with type or init exprs seen
-				for iota, spec := range d.Specs {
-					switch s := spec.(type) {
-					case *ast.ImportSpec:
-						// import package
-						var imp *Package
-						path, err := validatedImportPath(s.Path.Value)
-						if err != nil {
-							check.errorf(s.Path.Pos(), "invalid import path (%s)", err)
-							continue
-						}
-						if path == "C" && check.conf.FakeImportC {
-							// TODO(gri) shouldn't create a new one each time
-							imp = NewPackage("C", "C")
-							imp.fake = true
-						} else if path == "unsafe" {
-							// package "unsafe" is known to the language
-							imp = Unsafe
-						} else {
-							if importer := check.conf.Importer; importer != nil {
-								imp, err = importer.Import(path)
-								if imp == nil && err == nil {
-									err = fmt.Errorf("Config.Importer.Import(%s) returned nil but no error", path)
-								}
-							} else {
-								err = fmt.Errorf("Config.Importer not installed")
-							}
-							if err != nil {
-								check.errorf(s.Path.Pos(), "could not import %s (%s)", path, err)
-								continue
-							}
-						}
-
-						// add package to list of explicit imports
-						// (this functionality is provided as a convenience
-						// for clients; it is not needed for type-checking)
-						if !pkgImports[imp] {
-							pkgImports[imp] = true
-							if imp != Unsafe {
-								pkg.imports = append(pkg.imports, imp)
-							}
-						}
-
-						// local name overrides imported package name
-						name := imp.name
-						if s.Name != nil {
-							name = s.Name.Name
-							if name == "init" {
-								check.errorf(s.Name.Pos(), "cannot declare init - must be func")
-								continue
-							}
-						}
-
-						obj := NewPkgName(s.Pos(), pkg, name, imp)
-						if s.Name != nil {
-							// in a dot-import, the dot represents the package
-							check.recordDef(s.Name, obj)
-						} else {
-							check.recordImplicit(s, obj)
-						}
-
-						// add import to file scope
-						if name == "." {
-							// merge imported scope with file scope
-							for _, obj := range imp.scope.elems {
-								// A package scope may contain non-exported objects,
-								// do not import them!
-								if obj.Exported() {
-									// TODO(gri) When we import a package, we create
-									// a new local package object. We should do the
-									// same for each dot-imported object. That way
-									// they can have correct position information.
-									// (We must not modify their existing position
-									// information because the same package - found
-									// via Config.Packages - may be dot-imported in
-									// another package!)
-									check.declare(fileScope, nil, obj, token.NoPos)
-									check.recordImplicit(s, obj)
-								}
-							}
-							// add position to set of dot-import positions for this file
-							// (this is only needed for "imported but not used" errors)
-							check.addUnusedDotImport(fileScope, imp, s.Pos())
-						} else {
-							// declare imported package object in file scope
-							check.declare(fileScope, nil, obj, token.NoPos)
-						}
-
-					case *ast.ValueSpec:
-						switch d.Tok {
-						case token.CONST:
-							// determine which initialization expressions to use
-							switch {
-							case s.Type != nil || len(s.Values) > 0:
-								last = s
-							case last == nil:
-								last = new(ast.ValueSpec) // make sure last exists
-							}
-
-							// declare all constants
-							for i, name := range s.Names {
-								obj := NewConst(name.Pos(), pkg, name.Name, nil, constant.MakeInt64(int64(iota)))
-
-								var init ast.Expr
-								if i < len(last.Values) {
-									init = last.Values[i]
-								}
-
-								d := &declInfo{file: fileScope, typ: last.Type, init: init}
-								check.declarePkgObj(name, obj, d)
-							}
-
-							check.arityMatch(s, last)
-
-						case token.VAR:
-							lhs := make([]*Var, len(s.Names))
-							// If there's exactly one rhs initializer, use
-							// the same declInfo d1 for all lhs variables
-							// so that each lhs variable depends on the same
-							// rhs initializer (n:1 var declaration).
-							var d1 *declInfo
-							if len(s.Values) == 1 {
-								// The lhs elements are only set up after the for loop below,
-								// but that's ok because declareVar only collects the declInfo
-								// for a later phase.
-								d1 = &declInfo{file: fileScope, lhs: lhs, typ: s.Type, init: s.Values[0]}
-							}
-
-							// declare all variables
-							for i, name := range s.Names {
-								obj := NewVar(name.Pos(), pkg, name.Name, nil)
-								lhs[i] = obj
-
-								d := d1
-								if d == nil {
-									// individual assignments
-									var init ast.Expr
-									if i < len(s.Values) {
-										init = s.Values[i]
-									}
-									d = &declInfo{file: fileScope, typ: s.Type, init: init}
-								}
-
-								check.declarePkgObj(name, obj, d)
-							}
-
-							check.arityMatch(s, nil)
-
-						default:
-							check.invalidAST(s.Pos(), "invalid token %s", d.Tok)
-						}
-
-					case *ast.TypeSpec:
-						obj := NewTypeName(s.Name.Pos(), pkg, s.Name.Name, nil)
-						check.declarePkgObj(s.Name, obj, &declInfo{file: fileScope, typ: s.Type})
-
-					default:
-						check.invalidAST(s.Pos(), "unknown ast.Spec node %T", s)
-					}
-				}
-
-			case *ast.FuncDecl:
-				name := d.Name.Name
-				obj := NewFunc(d.Name.Pos(), pkg, name, nil)
-				if d.Recv == nil {
-					// regular function
-					if name == "init" {
-						// don't declare init functions in the package scope - they are invisible
-						obj.parent = pkg.scope
-						check.recordDef(d.Name, obj)
-						// init functions must have a body
-						if d.Body == nil {
-							check.softErrorf(obj.pos, "missing function body")
-						}
-					} else {
-						check.declare(pkg.scope, d.Name, obj, token.NoPos)
-					}
-				} else {
-					// method
-					check.recordDef(d.Name, obj)
-					// Associate method with receiver base type name, if possible.
-					// Ignore methods that have an invalid receiver, or a blank _
-					// receiver name. They will be type-checked later, with regular
-					// functions.
-					if list := d.Recv.List; len(list) > 0 {
-						typ := list[0].Type
-						if ptr, _ := typ.(*ast.StarExpr); ptr != nil {
-							typ = ptr.X
-						}
-						if base, _ := typ.(*ast.Ident); base != nil && base.Name != "_" {
-							check.assocMethod(base.Name, obj)
-						}
-					}
-				}
-				info := &declInfo{file: fileScope, fdecl: d}
-				check.objMap[obj] = info
-				obj.setOrder(uint32(len(check.objMap)))
-
-			default:
-				check.invalidAST(d.Pos(), "unknown ast.Decl node %T", d)
-			}
-		}
-	}
-
-	// verify that objects in package and file scopes have different names
-	for _, scope := range check.pkg.scope.children /* file scopes */ {
-		for _, obj := range scope.elems {
-			if alt := pkg.scope.Lookup(obj.Name()); alt != nil {
-				if pkg, ok := obj.(*PkgName); ok {
-					check.errorf(alt.Pos(), "%s already declared through import of %s", alt.Name(), pkg.Imported())
-					check.reportAltDecl(pkg)
-				} else {
-					check.errorf(alt.Pos(), "%s already declared through dot-import of %s", alt.Name(), obj.Pkg())
-					// TODO(gri) dot-imported objects don't have a position; reportAltDecl won't print anything
-					check.reportAltDecl(obj)
-				}
-			}
-		}
-	}
-}
-
-// packageObjects typechecks all package objects in objList, but not function bodies.
-func (check *Checker) packageObjects(objList []Object) {
-	// add new methods to already type-checked types (from a prior Checker.Files call)
-	for _, obj := range objList {
-		if obj, _ := obj.(*TypeName); obj != nil && obj.typ != nil {
-			check.addMethodDecls(obj)
-		}
-	}
-
-	// pre-allocate space for type declaration paths so that the underlying array is reused
-	typePath := make([]*TypeName, 0, 8)
-
-	for _, obj := range objList {
-		check.objDecl(obj, nil, typePath)
-	}
-
-	// At this point we may have a non-empty check.methods map; this means that not all
-	// entries were deleted at the end of typeDecl because the respective receiver base
-	// types were not found. In that case, an error was reported when declaring those
-	// methods. We can now safely discard this map.
-	check.methods = nil
-}
-
-// functionBodies typechecks all function bodies.
-func (check *Checker) functionBodies() {
-	for _, f := range check.funcs {
-		check.funcBody(f.decl, f.name, f.sig, f.body)
-	}
-}
-
-// unusedImports checks for unused imports.
-func (check *Checker) unusedImports() {
-	// if function bodies are not checked, packages' uses are likely missing - don't check
-	if check.conf.IgnoreFuncBodies {
-		return
-	}
-
-	// spec: "It is illegal (...) to directly import a package without referring to
-	// any of its exported identifiers. To import a package solely for its side-effects
-	// (initialization), use the blank identifier as explicit package name."
-
-	// check use of regular imported packages
-	for _, scope := range check.pkg.scope.children /* file scopes */ {
-		for _, obj := range scope.elems {
-			if obj, ok := obj.(*PkgName); ok {
-				// Unused "blank imports" are automatically ignored
-				// since _ identifiers are not entered into scopes.
-				if !obj.used {
-					path := obj.imported.path
-					base := pathLib.Base(path)
-					if obj.name == base {
-						check.softErrorf(obj.pos, "%q imported but not used", path)
-					} else {
-						check.softErrorf(obj.pos, "%q imported but not used as %s", path, obj.name)
-					}
-				}
-			}
-		}
-	}
-
-	// check use of dot-imported packages
-	for _, unusedDotImports := range check.unusedDotImports {
-		for pkg, pos := range unusedDotImports {
-			check.softErrorf(pos, "%q imported but not used", pkg.path)
-		}
-	}
-}
diff --git a/src/go/types/resolver_test.go b/src/go/types/resolver_test.go
deleted file mode 100644
index 34deae2..0000000
--- a/src/go/types/resolver_test.go
+++ /dev/null
@@ -1,209 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package types_test
-
-import (
-	"fmt"
-	"go/ast"
-	"go/importer"
-	"go/parser"
-	"go/token"
-	"internal/testenv"
-	"sort"
-	"testing"
-
-	. "go/types"
-)
-
-type resolveTestImporter struct {
-	importer Importer
-	imported map[string]bool
-}
-
-func (imp *resolveTestImporter) Import(path string) (*Package, error) {
-	if imp.importer == nil {
-		imp.importer = importer.Default()
-		imp.imported = make(map[string]bool)
-	}
-	pkg, err := imp.importer.Import(path)
-	if err != nil {
-		return nil, err
-	}
-	imp.imported[path] = true
-	return pkg, nil
-}
-
-func TestResolveIdents(t *testing.T) {
-	testenv.MustHaveGoBuild(t)
-
-	sources := []string{
-		`
-		package p
-		import "fmt"
-		import "math"
-		const pi = math.Pi
-		func sin(x float64) float64 {
-			return math.Sin(x)
-		}
-		var Println = fmt.Println
-		`,
-		`
-		package p
-		import "fmt"
-		type errorStringer struct { fmt.Stringer; error }
-		func f() string {
-			_ = "foo"
-			return fmt.Sprintf("%d", g())
-		}
-		func g() (x int) { return }
-		`,
-		`
-		package p
-		import . "go/parser"
-		import "sync"
-		func h() Mode { return ImportsOnly }
-		var _, x int = 1, 2
-		func init() {}
-		type T struct{ *sync.Mutex; a, b, c int}
-		type I interface{ m() }
-		var _ = T{a: 1, b: 2, c: 3}
-		func (_ T) m() {}
-		func (T) _() {}
-		var i I
-		var _ = i.m
-		func _(s []int) { for i, x := range s { _, _ = i, x } }
-		func _(x interface{}) {
-			switch x := x.(type) {
-			case int:
-				_ = x
-			}
-			switch {} // implicit 'true' tag
-		}
-		`,
-		`
-		package p
-		type S struct{}
-		func (T) _() {}
-		func (T) _() {}
-		`,
-		`
-		package p
-		func _() {
-		L0:
-		L1:
-			goto L0
-			for {
-				goto L1
-			}
-			if true {
-				goto L2
-			}
-		L2:
-		}
-		`,
-	}
-
-	pkgnames := []string{
-		"fmt",
-		"math",
-	}
-
-	// parse package files
-	fset := token.NewFileSet()
-	var files []*ast.File
-	for i, src := range sources {
-		f, err := parser.ParseFile(fset, fmt.Sprintf("sources[%d]", i), src, parser.DeclarationErrors)
-		if err != nil {
-			t.Fatal(err)
-		}
-		files = append(files, f)
-	}
-
-	// resolve and type-check package AST
-	importer := new(resolveTestImporter)
-	conf := Config{Importer: importer}
-	uses := make(map[*ast.Ident]Object)
-	defs := make(map[*ast.Ident]Object)
-	_, err := conf.Check("testResolveIdents", fset, files, &Info{Defs: defs, Uses: uses})
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	// check that all packages were imported
-	for _, name := range pkgnames {
-		if !importer.imported[name] {
-			t.Errorf("package %s not imported", name)
-		}
-	}
-
-	// check that qualified identifiers are resolved
-	for _, f := range files {
-		ast.Inspect(f, func(n ast.Node) bool {
-			if s, ok := n.(*ast.SelectorExpr); ok {
-				if x, ok := s.X.(*ast.Ident); ok {
-					obj := uses[x]
-					if obj == nil {
-						t.Errorf("%s: unresolved qualified identifier %s", fset.Position(x.Pos()), x.Name)
-						return false
-					}
-					if _, ok := obj.(*PkgName); ok && uses[s.Sel] == nil {
-						t.Errorf("%s: unresolved selector %s", fset.Position(s.Sel.Pos()), s.Sel.Name)
-						return false
-					}
-					return false
-				}
-				return false
-			}
-			return true
-		})
-	}
-
-	for id, obj := range uses {
-		if obj == nil {
-			t.Errorf("%s: Uses[%s] == nil", fset.Position(id.Pos()), id.Name)
-		}
-	}
-
-	// check that each identifier in the source is found in uses or defs or both
-	var both []string
-	for _, f := range files {
-		ast.Inspect(f, func(n ast.Node) bool {
-			if x, ok := n.(*ast.Ident); ok {
-				var objects int
-				if _, found := uses[x]; found {
-					objects |= 1
-					delete(uses, x)
-				}
-				if _, found := defs[x]; found {
-					objects |= 2
-					delete(defs, x)
-				}
-				if objects == 0 {
-					t.Errorf("%s: unresolved identifier %s", fset.Position(x.Pos()), x.Name)
-				} else if objects == 3 {
-					both = append(both, x.Name)
-				}
-				return false
-			}
-			return true
-		})
-	}
-
-	// check the expected set of idents that are simultaneously uses and defs
-	sort.Strings(both)
-	if got, want := fmt.Sprint(both), "[Mutex Stringer error]"; got != want {
-		t.Errorf("simultaneous uses/defs = %s, want %s", got, want)
-	}
-
-	// any left-over identifiers didn't exist in the source
-	for x := range uses {
-		t.Errorf("%s: identifier %s not present in source", fset.Position(x.Pos()), x.Name)
-	}
-	for x := range defs {
-		t.Errorf("%s: identifier %s not present in source", fset.Position(x.Pos()), x.Name)
-	}
-
-	// TODO(gri) add tests to check ImplicitObj callbacks
-}
diff --git a/src/go/types/return.go b/src/go/types/return.go
deleted file mode 100644
index 6628985..0000000
--- a/src/go/types/return.go
+++ /dev/null
@@ -1,185 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements isTerminating.
-
-package types
-
-import (
-	"go/ast"
-	"go/token"
-)
-
-// isTerminating reports if s is a terminating statement.
-// If s is labeled, label is the label name; otherwise s
-// is "".
-func (check *Checker) isTerminating(s ast.Stmt, label string) bool {
-	switch s := s.(type) {
-	default:
-		unreachable()
-
-	case *ast.BadStmt, *ast.DeclStmt, *ast.EmptyStmt, *ast.SendStmt,
-		*ast.IncDecStmt, *ast.AssignStmt, *ast.GoStmt, *ast.DeferStmt,
-		*ast.RangeStmt:
-		// no chance
-
-	case *ast.LabeledStmt:
-		return check.isTerminating(s.Stmt, s.Label.Name)
-
-	case *ast.ExprStmt:
-		// the predeclared (possibly parenthesized) panic() function is terminating
-		if call, _ := unparen(s.X).(*ast.CallExpr); call != nil {
-			if id, _ := call.Fun.(*ast.Ident); id != nil {
-				if _, obj := check.scope.LookupParent(id.Name, token.NoPos); obj != nil {
-					if b, _ := obj.(*Builtin); b != nil && b.id == _Panic {
-						return true
-					}
-				}
-			}
-		}
-
-	case *ast.ReturnStmt:
-		return true
-
-	case *ast.BranchStmt:
-		if s.Tok == token.GOTO || s.Tok == token.FALLTHROUGH {
-			return true
-		}
-
-	case *ast.BlockStmt:
-		return check.isTerminatingList(s.List, "")
-
-	case *ast.IfStmt:
-		if s.Else != nil &&
-			check.isTerminating(s.Body, "") &&
-			check.isTerminating(s.Else, "") {
-			return true
-		}
-
-	case *ast.SwitchStmt:
-		return check.isTerminatingSwitch(s.Body, label)
-
-	case *ast.TypeSwitchStmt:
-		return check.isTerminatingSwitch(s.Body, label)
-
-	case *ast.SelectStmt:
-		for _, s := range s.Body.List {
-			cc := s.(*ast.CommClause)
-			if !check.isTerminatingList(cc.Body, "") || hasBreakList(cc.Body, label, true) {
-				return false
-			}
-
-		}
-		return true
-
-	case *ast.ForStmt:
-		if s.Cond == nil && !hasBreak(s.Body, label, true) {
-			return true
-		}
-	}
-
-	return false
-}
-
-func (check *Checker) isTerminatingList(list []ast.Stmt, label string) bool {
-	n := len(list)
-	return n > 0 && check.isTerminating(list[n-1], label)
-}
-
-func (check *Checker) isTerminatingSwitch(body *ast.BlockStmt, label string) bool {
-	hasDefault := false
-	for _, s := range body.List {
-		cc := s.(*ast.CaseClause)
-		if cc.List == nil {
-			hasDefault = true
-		}
-		if !check.isTerminatingList(cc.Body, "") || hasBreakList(cc.Body, label, true) {
-			return false
-		}
-	}
-	return hasDefault
-}
-
-// TODO(gri) For nested breakable statements, the current implementation of hasBreak
-//	     will traverse the same subtree repeatedly, once for each label. Replace
-//           with a single-pass label/break matching phase.
-
-// hasBreak reports if s is or contains a break statement
-// referring to the label-ed statement or implicit-ly the
-// closest outer breakable statement.
-func hasBreak(s ast.Stmt, label string, implicit bool) bool {
-	switch s := s.(type) {
-	default:
-		unreachable()
-
-	case *ast.BadStmt, *ast.DeclStmt, *ast.EmptyStmt, *ast.ExprStmt,
-		*ast.SendStmt, *ast.IncDecStmt, *ast.AssignStmt, *ast.GoStmt,
-		*ast.DeferStmt, *ast.ReturnStmt:
-		// no chance
-
-	case *ast.LabeledStmt:
-		return hasBreak(s.Stmt, label, implicit)
-
-	case *ast.BranchStmt:
-		if s.Tok == token.BREAK {
-			if s.Label == nil {
-				return implicit
-			}
-			if s.Label.Name == label {
-				return true
-			}
-		}
-
-	case *ast.BlockStmt:
-		return hasBreakList(s.List, label, implicit)
-
-	case *ast.IfStmt:
-		if hasBreak(s.Body, label, implicit) ||
-			s.Else != nil && hasBreak(s.Else, label, implicit) {
-			return true
-		}
-
-	case *ast.CaseClause:
-		return hasBreakList(s.Body, label, implicit)
-
-	case *ast.SwitchStmt:
-		if label != "" && hasBreak(s.Body, label, false) {
-			return true
-		}
-
-	case *ast.TypeSwitchStmt:
-		if label != "" && hasBreak(s.Body, label, false) {
-			return true
-		}
-
-	case *ast.CommClause:
-		return hasBreakList(s.Body, label, implicit)
-
-	case *ast.SelectStmt:
-		if label != "" && hasBreak(s.Body, label, false) {
-			return true
-		}
-
-	case *ast.ForStmt:
-		if label != "" && hasBreak(s.Body, label, false) {
-			return true
-		}
-
-	case *ast.RangeStmt:
-		if label != "" && hasBreak(s.Body, label, false) {
-			return true
-		}
-	}
-
-	return false
-}
-
-func hasBreakList(list []ast.Stmt, label string, implicit bool) bool {
-	for _, s := range list {
-		if hasBreak(s, label, implicit) {
-			return true
-		}
-	}
-	return false
-}
diff --git a/src/go/types/scope.go b/src/go/types/scope.go
deleted file mode 100644
index 3502840..0000000
--- a/src/go/types/scope.go
+++ /dev/null
@@ -1,190 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements Scopes.
-
-package types
-
-import (
-	"bytes"
-	"fmt"
-	"go/token"
-	"io"
-	"sort"
-	"strings"
-)
-
-// TODO(gri) Provide scopes with a name or other mechanism so that
-//           objects can use that information for better printing.
-
-// A Scope maintains a set of objects and links to its containing
-// (parent) and contained (children) scopes. Objects may be inserted
-// and looked up by name. The zero value for Scope is a ready-to-use
-// empty scope.
-type Scope struct {
-	parent   *Scope
-	children []*Scope
-	elems    map[string]Object // lazily allocated
-	pos, end token.Pos         // scope extent; may be invalid
-	comment  string            // for debugging only
-}
-
-// NewScope returns a new, empty scope contained in the given parent
-// scope, if any.  The comment is for debugging only.
-func NewScope(parent *Scope, pos, end token.Pos, comment string) *Scope {
-	s := &Scope{parent, nil, nil, pos, end, comment}
-	// don't add children to Universe scope!
-	if parent != nil && parent != Universe {
-		parent.children = append(parent.children, s)
-	}
-	return s
-}
-
-// Parent returns the scope's containing (parent) scope.
-func (s *Scope) Parent() *Scope { return s.parent }
-
-// Len() returns the number of scope elements.
-func (s *Scope) Len() int { return len(s.elems) }
-
-// Names returns the scope's element names in sorted order.
-func (s *Scope) Names() []string {
-	names := make([]string, len(s.elems))
-	i := 0
-	for name := range s.elems {
-		names[i] = name
-		i++
-	}
-	sort.Strings(names)
-	return names
-}
-
-// NumChildren() returns the number of scopes nested in s.
-func (s *Scope) NumChildren() int { return len(s.children) }
-
-// Child returns the i'th child scope for 0 <= i < NumChildren().
-func (s *Scope) Child(i int) *Scope { return s.children[i] }
-
-// Lookup returns the object in scope s with the given name if such an
-// object exists; otherwise the result is nil.
-func (s *Scope) Lookup(name string) Object {
-	return s.elems[name]
-}
-
-// LookupParent follows the parent chain of scopes starting with s until
-// it finds a scope where Lookup(name) returns a non-nil object, and then
-// returns that scope and object. If a valid position pos is provided,
-// only objects that were declared at or before pos are considered.
-// If no such scope and object exists, the result is (nil, nil).
-//
-// Note that obj.Parent() may be different from the returned scope if the
-// object was inserted into the scope and already had a parent at that
-// time (see Insert, below). This can only happen for dot-imported objects
-// whose scope is the scope of the package that exported them.
-func (s *Scope) LookupParent(name string, pos token.Pos) (*Scope, Object) {
-	for ; s != nil; s = s.parent {
-		if obj := s.elems[name]; obj != nil && (!pos.IsValid() || obj.scopePos() <= pos) {
-			return s, obj
-		}
-	}
-	return nil, nil
-}
-
-// Insert attempts to insert an object obj into scope s.
-// If s already contains an alternative object alt with
-// the same name, Insert leaves s unchanged and returns alt.
-// Otherwise it inserts obj, sets the object's parent scope
-// if not already set, and returns nil.
-func (s *Scope) Insert(obj Object) Object {
-	name := obj.Name()
-	if alt := s.elems[name]; alt != nil {
-		return alt
-	}
-	if s.elems == nil {
-		s.elems = make(map[string]Object)
-	}
-	s.elems[name] = obj
-	if obj.Parent() == nil {
-		obj.setParent(s)
-	}
-	return nil
-}
-
-// Pos and End describe the scope's source code extent [pos, end).
-// The results are guaranteed to be valid only if the type-checked
-// AST has complete position information. The extent is undefined
-// for Universe and package scopes.
-func (s *Scope) Pos() token.Pos { return s.pos }
-func (s *Scope) End() token.Pos { return s.end }
-
-// Contains returns true if pos is within the scope's extent.
-// The result is guaranteed to be valid only if the type-checked
-// AST has complete position information.
-func (s *Scope) Contains(pos token.Pos) bool {
-	return s.pos <= pos && pos < s.end
-}
-
-// Innermost returns the innermost (child) scope containing
-// pos. If pos is not within any scope, the result is nil.
-// The result is also nil for the Universe scope.
-// The result is guaranteed to be valid only if the type-checked
-// AST has complete position information.
-func (s *Scope) Innermost(pos token.Pos) *Scope {
-	// Package scopes do not have extents since they may be
-	// discontiguous, so iterate over the package's files.
-	if s.parent == Universe {
-		for _, s := range s.children {
-			if inner := s.Innermost(pos); inner != nil {
-				return inner
-			}
-		}
-	}
-
-	if s.Contains(pos) {
-		for _, s := range s.children {
-			if s.Contains(pos) {
-				return s.Innermost(pos)
-			}
-		}
-		return s
-	}
-	return nil
-}
-
-// WriteTo writes a string representation of the scope to w,
-// with the scope elements sorted by name.
-// The level of indentation is controlled by n >= 0, with
-// n == 0 for no indentation.
-// If recurse is set, it also writes nested (children) scopes.
-func (s *Scope) WriteTo(w io.Writer, n int, recurse bool) {
-	const ind = ".  "
-	indn := strings.Repeat(ind, n)
-
-	fmt.Fprintf(w, "%s%s scope %p {", indn, s.comment, s)
-	if len(s.elems) == 0 {
-		fmt.Fprintf(w, "}\n")
-		return
-	}
-
-	fmt.Fprintln(w)
-	indn1 := indn + ind
-	for _, name := range s.Names() {
-		fmt.Fprintf(w, "%s%s\n", indn1, s.elems[name])
-	}
-
-	if recurse {
-		for _, s := range s.children {
-			fmt.Fprintln(w)
-			s.WriteTo(w, n+1, recurse)
-		}
-	}
-
-	fmt.Fprintf(w, "%s}", indn)
-}
-
-// String returns a string representation of the scope, for debugging.
-func (s *Scope) String() string {
-	var buf bytes.Buffer
-	s.WriteTo(&buf, 0, false)
-	return buf.String()
-}
diff --git a/src/go/types/selection.go b/src/go/types/selection.go
deleted file mode 100644
index 124e0d3..0000000
--- a/src/go/types/selection.go
+++ /dev/null
@@ -1,143 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements Selections.
-
-package types
-
-import (
-	"bytes"
-	"fmt"
-)
-
-// SelectionKind describes the kind of a selector expression x.f
-// (excluding qualified identifiers).
-type SelectionKind int
-
-const (
-	FieldVal   SelectionKind = iota // x.f is a struct field selector
-	MethodVal                       // x.f is a method selector
-	MethodExpr                      // x.f is a method expression
-)
-
-// A Selection describes a selector expression x.f.
-// For the declarations:
-//
-//	type T struct{ x int; E }
-//	type E struct{}
-//	func (e E) m() {}
-//	var p *T
-//
-// the following relations exist:
-//
-//	Selector    Kind          Recv    Obj    Type               Index     Indirect
-//
-//	p.x         FieldVal      T       x      int                {0}       true
-//	p.m         MethodVal     *T      m      func (e *T) m()    {1, 0}    true
-//	T.m         MethodExpr    T       m      func m(_ T)        {1, 0}    false
-//
-type Selection struct {
-	kind     SelectionKind
-	recv     Type   // type of x
-	obj      Object // object denoted by x.f
-	index    []int  // path from x to x.f
-	indirect bool   // set if there was any pointer indirection on the path
-}
-
-// Kind returns the selection kind.
-func (s *Selection) Kind() SelectionKind { return s.kind }
-
-// Recv returns the type of x in x.f.
-func (s *Selection) Recv() Type { return s.recv }
-
-// Obj returns the object denoted by x.f; a *Var for
-// a field selection, and a *Func in all other cases.
-func (s *Selection) Obj() Object { return s.obj }
-
-// Type returns the type of x.f, which may be different from the type of f.
-// See Selection for more information.
-func (s *Selection) Type() Type {
-	switch s.kind {
-	case MethodVal:
-		// The type of x.f is a method with its receiver type set
-		// to the type of x.
-		sig := *s.obj.(*Func).typ.(*Signature)
-		recv := *sig.recv
-		recv.typ = s.recv
-		sig.recv = &recv
-		return &sig
-
-	case MethodExpr:
-		// The type of x.f is a function (without receiver)
-		// and an additional first argument with the same type as x.
-		// TODO(gri) Similar code is already in call.go - factor!
-		// TODO(gri) Compute this eagerly to avoid allocations.
-		sig := *s.obj.(*Func).typ.(*Signature)
-		arg0 := *sig.recv
-		sig.recv = nil
-		arg0.typ = s.recv
-		var params []*Var
-		if sig.params != nil {
-			params = sig.params.vars
-		}
-		sig.params = NewTuple(append([]*Var{&arg0}, params...)...)
-		return &sig
-	}
-
-	// In all other cases, the type of x.f is the type of x.
-	return s.obj.Type()
-}
-
-// Index describes the path from x to f in x.f.
-// The last index entry is the field or method index of the type declaring f;
-// either:
-//
-//	1) the list of declared methods of a named type; or
-//	2) the list of methods of an interface type; or
-//	3) the list of fields of a struct type.
-//
-// The earlier index entries are the indices of the embedded fields implicitly
-// traversed to get from (the type of) x to f, starting at embedding depth 0.
-func (s *Selection) Index() []int { return s.index }
-
-// Indirect reports whether any pointer indirection was required to get from
-// x to f in x.f.
-func (s *Selection) Indirect() bool { return s.indirect }
-
-func (s *Selection) String() string { return SelectionString(s, nil) }
-
-// SelectionString returns the string form of s.
-// The Qualifier controls the printing of
-// package-level objects, and may be nil.
-//
-// Examples:
-//	"field (T) f int"
-//	"method (T) f(X) Y"
-//	"method expr (T) f(X) Y"
-//
-func SelectionString(s *Selection, qf Qualifier) string {
-	var k string
-	switch s.kind {
-	case FieldVal:
-		k = "field "
-	case MethodVal:
-		k = "method "
-	case MethodExpr:
-		k = "method expr "
-	default:
-		unreachable()
-	}
-	var buf bytes.Buffer
-	buf.WriteString(k)
-	buf.WriteByte('(')
-	WriteType(&buf, s.Recv(), qf)
-	fmt.Fprintf(&buf, ") %s", s.obj.Name())
-	if T := s.Type(); s.kind == FieldVal {
-		buf.WriteByte(' ')
-		WriteType(&buf, T, qf)
-	} else {
-		WriteSignature(&buf, T.(*Signature), qf)
-	}
-	return buf.String()
-}
diff --git a/src/go/types/self_test.go b/src/go/types/self_test.go
deleted file mode 100644
index 10ad06f..0000000
--- a/src/go/types/self_test.go
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package types_test
-
-import (
-	"flag"
-	"fmt"
-	"go/ast"
-	"go/importer"
-	"go/parser"
-	"go/token"
-	"path/filepath"
-	"testing"
-	"time"
-
-	. "go/types"
-)
-
-var benchmark = flag.Bool("b", false, "run benchmarks")
-
-func TestSelf(t *testing.T) {
-	fset := token.NewFileSet()
-	files, err := pkgFiles(fset, ".")
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	conf := Config{Importer: importer.Default()}
-	_, err = conf.Check("go/types", fset, files, nil)
-	if err != nil {
-		// Importing go/constant doesn't work in the
-		// build dashboard environment. Don't report an error
-		// for now so that the build remains green.
-		// TODO(gri) fix this
-		t.Log(err) // replace w/ t.Fatal eventually
-		return
-	}
-}
-
-func TestBenchmark(t *testing.T) {
-	if !*benchmark {
-		return
-	}
-
-	// We're not using testing's benchmarking mechanism directly
-	// because we want custom output.
-
-	for _, p := range []string{"types", "constant", filepath.Join("internal", "gcimporter")} {
-		path := filepath.Join("..", p)
-		runbench(t, path, false)
-		runbench(t, path, true)
-		fmt.Println()
-	}
-}
-
-func runbench(t *testing.T, path string, ignoreFuncBodies bool) {
-	fset := token.NewFileSet()
-	files, err := pkgFiles(fset, path)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	b := testing.Benchmark(func(b *testing.B) {
-		for i := 0; i < b.N; i++ {
-			conf := Config{IgnoreFuncBodies: ignoreFuncBodies}
-			conf.Check(path, fset, files, nil)
-		}
-	})
-
-	// determine line count
-	lines := 0
-	fset.Iterate(func(f *token.File) bool {
-		lines += f.LineCount()
-		return true
-	})
-
-	d := time.Duration(b.NsPerOp())
-	fmt.Printf(
-		"%s: %s for %d lines (%d lines/s), ignoreFuncBodies = %v\n",
-		filepath.Base(path), d, lines, int64(float64(lines)/d.Seconds()), ignoreFuncBodies,
-	)
-}
-
-func pkgFiles(fset *token.FileSet, path string) ([]*ast.File, error) {
-	filenames, err := pkgFilenames(path) // from stdlib_test.go
-	if err != nil {
-		return nil, err
-	}
-
-	var files []*ast.File
-	for _, filename := range filenames {
-		file, err := parser.ParseFile(fset, filename, nil, 0)
-		if err != nil {
-			return nil, err
-		}
-		files = append(files, file)
-	}
-
-	return files, nil
-}
diff --git a/src/go/types/sizes.go b/src/go/types/sizes.go
deleted file mode 100644
index 56fb310..0000000
--- a/src/go/types/sizes.go
+++ /dev/null
@@ -1,211 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements Sizes.
-
-package types
-
-// Sizes defines the sizing functions for package unsafe.
-type Sizes interface {
-	// Alignof returns the alignment of a variable of type T.
-	// Alignof must implement the alignment guarantees required by the spec.
-	Alignof(T Type) int64
-
-	// Offsetsof returns the offsets of the given struct fields, in bytes.
-	// Offsetsof must implement the offset guarantees required by the spec.
-	Offsetsof(fields []*Var) []int64
-
-	// Sizeof returns the size of a variable of type T.
-	// Sizeof must implement the size guarantees required by the spec.
-	Sizeof(T Type) int64
-}
-
-// StdSizes is a convenience type for creating commonly used Sizes.
-// It makes the following simplifying assumptions:
-//
-//	- The size of explicitly sized basic types (int16, etc.) is the
-//	  specified size.
-//	- The size of strings and interfaces is 2*WordSize.
-//	- The size of slices is 3*WordSize.
-//	- The size of an array of n elements corresponds to the size of
-//	  a struct of n consecutive fields of the array's element type.
-//      - The size of a struct is the offset of the last field plus that
-//	  field's size. As with all element types, if the struct is used
-//	  in an array its size must first be aligned to a multiple of the
-//	  struct's alignment.
-//	- All other types have size WordSize.
-//	- Arrays and structs are aligned per spec definition; all other
-//	  types are naturally aligned with a maximum alignment MaxAlign.
-//
-// *StdSizes implements Sizes.
-//
-type StdSizes struct {
-	WordSize int64 // word size in bytes - must be >= 4 (32bits)
-	MaxAlign int64 // maximum alignment in bytes - must be >= 1
-}
-
-func (s *StdSizes) Alignof(T Type) int64 {
-	// For arrays and structs, alignment is defined in terms
-	// of alignment of the elements and fields, respectively.
-	switch t := T.Underlying().(type) {
-	case *Array:
-		// spec: "For a variable x of array type: unsafe.Alignof(x)
-		// is the same as unsafe.Alignof(x[0]), but at least 1."
-		return s.Alignof(t.elem)
-	case *Struct:
-		// spec: "For a variable x of struct type: unsafe.Alignof(x)
-		// is the largest of the values unsafe.Alignof(x.f) for each
-		// field f of x, but at least 1."
-		max := int64(1)
-		for _, f := range t.fields {
-			if a := s.Alignof(f.typ); a > max {
-				max = a
-			}
-		}
-		return max
-	}
-	a := s.Sizeof(T) // may be 0
-	// spec: "For a variable x of any type: unsafe.Alignof(x) is at least 1."
-	if a < 1 {
-		return 1
-	}
-	if a > s.MaxAlign {
-		return s.MaxAlign
-	}
-	return a
-}
-
-func (s *StdSizes) Offsetsof(fields []*Var) []int64 {
-	offsets := make([]int64, len(fields))
-	var o int64
-	for i, f := range fields {
-		a := s.Alignof(f.typ)
-		o = align(o, a)
-		offsets[i] = o
-		o += s.Sizeof(f.typ)
-	}
-	return offsets
-}
-
-var basicSizes = [...]byte{
-	Bool:       1,
-	Int8:       1,
-	Int16:      2,
-	Int32:      4,
-	Int64:      8,
-	Uint8:      1,
-	Uint16:     2,
-	Uint32:     4,
-	Uint64:     8,
-	Float32:    4,
-	Float64:    8,
-	Complex64:  8,
-	Complex128: 16,
-}
-
-func (s *StdSizes) Sizeof(T Type) int64 {
-	switch t := T.Underlying().(type) {
-	case *Basic:
-		assert(isTyped(T))
-		k := t.kind
-		if int(k) < len(basicSizes) {
-			if s := basicSizes[k]; s > 0 {
-				return int64(s)
-			}
-		}
-		if k == String {
-			return s.WordSize * 2
-		}
-	case *Array:
-		n := t.len
-		if n == 0 {
-			return 0
-		}
-		a := s.Alignof(t.elem)
-		z := s.Sizeof(t.elem)
-		return align(z, a)*(n-1) + z
-	case *Slice:
-		return s.WordSize * 3
-	case *Struct:
-		n := t.NumFields()
-		if n == 0 {
-			return 0
-		}
-		offsets := t.offsets
-		if t.offsets == nil {
-			// compute offsets on demand
-			offsets = s.Offsetsof(t.fields)
-			t.offsets = offsets
-		}
-		return offsets[n-1] + s.Sizeof(t.fields[n-1].typ)
-	case *Interface:
-		return s.WordSize * 2
-	}
-	return s.WordSize // catch-all
-}
-
-// stdSizes is used if Config.Sizes == nil.
-var stdSizes = StdSizes{8, 8}
-
-func (conf *Config) alignof(T Type) int64 {
-	if s := conf.Sizes; s != nil {
-		if a := s.Alignof(T); a >= 1 {
-			return a
-		}
-		panic("Config.Sizes.Alignof returned an alignment < 1")
-	}
-	return stdSizes.Alignof(T)
-}
-
-func (conf *Config) offsetsof(T *Struct) []int64 {
-	offsets := T.offsets
-	if offsets == nil && T.NumFields() > 0 {
-		// compute offsets on demand
-		if s := conf.Sizes; s != nil {
-			offsets = s.Offsetsof(T.fields)
-			// sanity checks
-			if len(offsets) != T.NumFields() {
-				panic("Config.Sizes.Offsetsof returned the wrong number of offsets")
-			}
-			for _, o := range offsets {
-				if o < 0 {
-					panic("Config.Sizes.Offsetsof returned an offset < 0")
-				}
-			}
-		} else {
-			offsets = stdSizes.Offsetsof(T.fields)
-		}
-		T.offsets = offsets
-	}
-	return offsets
-}
-
-// offsetof returns the offset of the field specified via
-// the index sequence relative to typ. All embedded fields
-// must be structs (rather than pointer to structs).
-func (conf *Config) offsetof(typ Type, index []int) int64 {
-	var o int64
-	for _, i := range index {
-		s := typ.Underlying().(*Struct)
-		o += conf.offsetsof(s)[i]
-		typ = s.fields[i].typ
-	}
-	return o
-}
-
-func (conf *Config) sizeof(T Type) int64 {
-	if s := conf.Sizes; s != nil {
-		if z := s.Sizeof(T); z >= 0 {
-			return z
-		}
-		panic("Config.Sizes.Sizeof returned a size < 0")
-	}
-	return stdSizes.Sizeof(T)
-}
-
-// align returns the smallest y >= x such that y % a == 0.
-func align(x, a int64) int64 {
-	y := x + a - 1
-	return y - y%a
-}
diff --git a/src/go/types/stdlib_test.go b/src/go/types/stdlib_test.go
deleted file mode 100644
index c6c946e..0000000
--- a/src/go/types/stdlib_test.go
+++ /dev/null
@@ -1,279 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file tests types.Check by using it to
-// typecheck the standard library and tests.
-
-package types_test
-
-import (
-	"fmt"
-	"go/ast"
-	"go/build"
-	"go/importer"
-	"go/parser"
-	"go/scanner"
-	"go/token"
-	"internal/testenv"
-	"io/ioutil"
-	"os"
-	"path/filepath"
-	"runtime"
-	"strings"
-	"testing"
-	"time"
-
-	. "go/types"
-)
-
-var (
-	pkgCount int // number of packages processed
-	start    time.Time
-
-	// Use the same importer for all std lib tests to
-	// avoid repeated importing of the same packages.
-	stdLibImporter = importer.Default()
-)
-
-func TestStdlib(t *testing.T) {
-	testenv.MustHaveGoBuild(t)
-
-	start = time.Now()
-	walkDirs(t, filepath.Join(runtime.GOROOT(), "src"))
-	if testing.Verbose() {
-		fmt.Println(pkgCount, "packages typechecked in", time.Since(start))
-	}
-}
-
-// firstComment returns the contents of the first comment in
-// the given file, assuming there's one within the first KB.
-func firstComment(filename string) string {
-	f, err := os.Open(filename)
-	if err != nil {
-		return ""
-	}
-	defer f.Close()
-
-	var src [1 << 10]byte // read at most 1KB
-	n, _ := f.Read(src[:])
-
-	var s scanner.Scanner
-	s.Init(fset.AddFile("", fset.Base(), n), src[:n], nil, scanner.ScanComments)
-	for {
-		_, tok, lit := s.Scan()
-		switch tok {
-		case token.COMMENT:
-			// remove trailing */ of multi-line comment
-			if lit[1] == '*' {
-				lit = lit[:len(lit)-2]
-			}
-			return strings.TrimSpace(lit[2:])
-		case token.EOF:
-			return ""
-		}
-	}
-}
-
-func testTestDir(t *testing.T, path string, ignore ...string) {
-	files, err := ioutil.ReadDir(path)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	excluded := make(map[string]bool)
-	for _, filename := range ignore {
-		excluded[filename] = true
-	}
-
-	fset := token.NewFileSet()
-	for _, f := range files {
-		// filter directory contents
-		if f.IsDir() || !strings.HasSuffix(f.Name(), ".go") || excluded[f.Name()] {
-			continue
-		}
-
-		// get per-file instructions
-		expectErrors := false
-		filename := filepath.Join(path, f.Name())
-		if cmd := firstComment(filename); cmd != "" {
-			switch cmd {
-			case "skip", "compiledir":
-				continue // ignore this file
-			case "errorcheck":
-				expectErrors = true
-			}
-		}
-
-		// parse and type-check file
-		file, err := parser.ParseFile(fset, filename, nil, 0)
-		if err == nil {
-			conf := Config{Importer: stdLibImporter}
-			_, err = conf.Check(filename, fset, []*ast.File{file}, nil)
-		}
-
-		if expectErrors {
-			if err == nil {
-				t.Errorf("expected errors but found none in %s", filename)
-			}
-		} else {
-			if err != nil {
-				t.Error(err)
-			}
-		}
-	}
-}
-
-func TestStdTest(t *testing.T) {
-	testenv.MustHaveGoBuild(t)
-
-	// test/recover4.go is only built for Linux and Darwin.
-	// TODO(gri) Remove once tests consider +build tags (issue 10370).
-	if runtime.GOOS != "linux" && runtime.GOOS != "darwin" {
-		return
-	}
-
-	testTestDir(t, filepath.Join(runtime.GOROOT(), "test"),
-		"cmplxdivide.go", // also needs file cmplxdivide1.go - ignore
-		"sigchld.go",     // don't work on Windows; testTestDir should consult build tags
-	)
-}
-
-func TestStdFixed(t *testing.T) {
-	testenv.MustHaveGoBuild(t)
-
-	testTestDir(t, filepath.Join(runtime.GOROOT(), "test", "fixedbugs"),
-		"bug248.go", "bug302.go", "bug369.go", // complex test instructions - ignore
-		"bug459.go",      // possibly incorrect test - see issue 6703 (pending spec clarification)
-		"issue3924.go",   // possibly incorrect test - see issue 6671 (pending spec clarification)
-		"issue6889.go",   // gc-specific test
-		"issue7746.go",   // large constants - consumes too much memory
-		"issue11326.go",  // large constants
-		"issue11326b.go", // large constants
-	)
-}
-
-func TestStdKen(t *testing.T) {
-	testenv.MustHaveGoBuild(t)
-
-	testTestDir(t, filepath.Join(runtime.GOROOT(), "test", "ken"))
-}
-
-// Package paths of excluded packages.
-var excluded = map[string]bool{
-	"builtin": true,
-}
-
-// typecheck typechecks the given package files.
-func typecheck(t *testing.T, path string, filenames []string) {
-	fset := token.NewFileSet()
-
-	// parse package files
-	var files []*ast.File
-	for _, filename := range filenames {
-		file, err := parser.ParseFile(fset, filename, nil, parser.AllErrors)
-		if err != nil {
-			// the parser error may be a list of individual errors; report them all
-			if list, ok := err.(scanner.ErrorList); ok {
-				for _, err := range list {
-					t.Error(err)
-				}
-				return
-			}
-			t.Error(err)
-			return
-		}
-
-		if testing.Verbose() {
-			if len(files) == 0 {
-				fmt.Println("package", file.Name.Name)
-			}
-			fmt.Println("\t", filename)
-		}
-
-		files = append(files, file)
-	}
-
-	// typecheck package files
-	conf := Config{
-		Error:    func(err error) { t.Error(err) },
-		Importer: stdLibImporter,
-	}
-	info := Info{Uses: make(map[*ast.Ident]Object)}
-	conf.Check(path, fset, files, &info)
-	pkgCount++
-
-	// Perform checks of API invariants.
-
-	// All Objects have a package, except predeclared ones.
-	errorError := Universe.Lookup("error").Type().Underlying().(*Interface).ExplicitMethod(0) // (error).Error
-	for id, obj := range info.Uses {
-		predeclared := obj == Universe.Lookup(obj.Name()) || obj == errorError
-		if predeclared == (obj.Pkg() != nil) {
-			posn := fset.Position(id.Pos())
-			if predeclared {
-				t.Errorf("%s: predeclared object with package: %s", posn, obj)
-			} else {
-				t.Errorf("%s: user-defined object without package: %s", posn, obj)
-			}
-		}
-	}
-}
-
-// pkgFilenames returns the list of package filenames for the given directory.
-func pkgFilenames(dir string) ([]string, error) {
-	ctxt := build.Default
-	ctxt.CgoEnabled = false
-	pkg, err := ctxt.ImportDir(dir, 0)
-	if err != nil {
-		if _, nogo := err.(*build.NoGoError); nogo {
-			return nil, nil // no *.go files, not an error
-		}
-		return nil, err
-	}
-	if excluded[pkg.ImportPath] {
-		return nil, nil
-	}
-	var filenames []string
-	for _, name := range pkg.GoFiles {
-		filenames = append(filenames, filepath.Join(pkg.Dir, name))
-	}
-	for _, name := range pkg.TestGoFiles {
-		filenames = append(filenames, filepath.Join(pkg.Dir, name))
-	}
-	return filenames, nil
-}
-
-// Note: Could use filepath.Walk instead of walkDirs but that wouldn't
-//       necessarily be shorter or clearer after adding the code to
-//       terminate early for -short tests.
-
-func walkDirs(t *testing.T, dir string) {
-	// limit run time for short tests
-	if testing.Short() && time.Since(start) >= 750*time.Millisecond {
-		return
-	}
-
-	fis, err := ioutil.ReadDir(dir)
-	if err != nil {
-		t.Error(err)
-		return
-	}
-
-	// typecheck package in directory
-	files, err := pkgFilenames(dir)
-	if err != nil {
-		t.Error(err)
-		return
-	}
-	if files != nil {
-		typecheck(t, dir, files)
-	}
-
-	// traverse subdirectories, but don't walk into testdata
-	for _, fi := range fis {
-		if fi.IsDir() && fi.Name() != "testdata" {
-			walkDirs(t, filepath.Join(dir, fi.Name()))
-		}
-	}
-}
diff --git a/src/go/types/stmt.go b/src/go/types/stmt.go
deleted file mode 100644
index 88a1d9b..0000000
--- a/src/go/types/stmt.go
+++ /dev/null
@@ -1,744 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements typechecking of statements.
-
-package types
-
-import (
-	"fmt"
-	"go/ast"
-	"go/constant"
-	"go/token"
-)
-
-func (check *Checker) funcBody(decl *declInfo, name string, sig *Signature, body *ast.BlockStmt) {
-	if trace {
-		if name == "" {
-			name = "<function literal>"
-		}
-		fmt.Printf("--- %s: %s {\n", name, sig)
-		defer fmt.Println("--- <end>")
-	}
-
-	// set function scope extent
-	sig.scope.pos = body.Pos()
-	sig.scope.end = body.End()
-
-	// save/restore current context and setup function context
-	// (and use 0 indentation at function start)
-	defer func(ctxt context, indent int) {
-		check.context = ctxt
-		check.indent = indent
-	}(check.context, check.indent)
-	check.context = context{
-		decl:  decl,
-		scope: sig.scope,
-		sig:   sig,
-	}
-	check.indent = 0
-
-	check.stmtList(0, body.List)
-
-	if check.hasLabel {
-		check.labels(body)
-	}
-
-	if sig.results.Len() > 0 && !check.isTerminating(body, "") {
-		check.error(body.Rbrace, "missing return")
-	}
-
-	// spec: "Implementation restriction: A compiler may make it illegal to
-	// declare a variable inside a function body if the variable is never used."
-	// (One could check each scope after use, but that distributes this check
-	// over several places because CloseScope is not always called explicitly.)
-	check.usage(sig.scope)
-}
-
-func (check *Checker) usage(scope *Scope) {
-	for _, obj := range scope.elems {
-		if v, _ := obj.(*Var); v != nil && !v.used {
-			check.softErrorf(v.pos, "%s declared but not used", v.name)
-		}
-	}
-	for _, scope := range scope.children {
-		check.usage(scope)
-	}
-}
-
-// stmtContext is a bitset describing which
-// control-flow statements are permissible.
-type stmtContext uint
-
-const (
-	breakOk stmtContext = 1 << iota
-	continueOk
-	fallthroughOk
-)
-
-func (check *Checker) simpleStmt(s ast.Stmt) {
-	if s != nil {
-		check.stmt(0, s)
-	}
-}
-
-func (check *Checker) stmtList(ctxt stmtContext, list []ast.Stmt) {
-	ok := ctxt&fallthroughOk != 0
-	inner := ctxt &^ fallthroughOk
-	for i, s := range list {
-		inner := inner
-		if ok && i+1 == len(list) {
-			inner |= fallthroughOk
-		}
-		check.stmt(inner, s)
-	}
-}
-
-func (check *Checker) multipleDefaults(list []ast.Stmt) {
-	var first ast.Stmt
-	for _, s := range list {
-		var d ast.Stmt
-		switch c := s.(type) {
-		case *ast.CaseClause:
-			if len(c.List) == 0 {
-				d = s
-			}
-		case *ast.CommClause:
-			if c.Comm == nil {
-				d = s
-			}
-		default:
-			check.invalidAST(s.Pos(), "case/communication clause expected")
-		}
-		if d != nil {
-			if first != nil {
-				check.errorf(d.Pos(), "multiple defaults (first at %s)", first.Pos())
-			} else {
-				first = d
-			}
-		}
-	}
-}
-
-func (check *Checker) openScope(s ast.Stmt, comment string) {
-	scope := NewScope(check.scope, s.Pos(), s.End(), comment)
-	check.recordScope(s, scope)
-	check.scope = scope
-}
-
-func (check *Checker) closeScope() {
-	check.scope = check.scope.Parent()
-}
-
-func assignOp(op token.Token) token.Token {
-	// token_test.go verifies the token ordering this function relies on
-	if token.ADD_ASSIGN <= op && op <= token.AND_NOT_ASSIGN {
-		return op + (token.ADD - token.ADD_ASSIGN)
-	}
-	return token.ILLEGAL
-}
-
-func (check *Checker) suspendedCall(keyword string, call *ast.CallExpr) {
-	var x operand
-	var msg string
-	switch check.rawExpr(&x, call, nil) {
-	case conversion:
-		msg = "requires function call, not conversion"
-	case expression:
-		msg = "discards result of"
-	case statement:
-		return
-	default:
-		unreachable()
-	}
-	check.errorf(x.pos(), "%s %s %s", keyword, msg, &x)
-}
-
-func (check *Checker) caseValues(x operand /* copy argument (not *operand!) */, values []ast.Expr) {
-	// No duplicate checking for now. See issue 4524.
-	for _, e := range values {
-		var y operand
-		check.expr(&y, e)
-		if y.mode == invalid {
-			return
-		}
-		// TODO(gri) The convertUntyped call pair below appears in other places. Factor!
-		// Order matters: By comparing y against x, error positions are at the case values.
-		check.convertUntyped(&y, x.typ)
-		if y.mode == invalid {
-			return
-		}
-		check.convertUntyped(&x, y.typ)
-		if x.mode == invalid {
-			return
-		}
-		check.comparison(&y, &x, token.EQL)
-	}
-}
-
-func (check *Checker) caseTypes(x *operand, xtyp *Interface, types []ast.Expr, seen map[Type]token.Pos) (T Type) {
-L:
-	for _, e := range types {
-		T = check.typOrNil(e)
-		if T == Typ[Invalid] {
-			continue
-		}
-		// complain about duplicate types
-		// TODO(gri) use a type hash to avoid quadratic algorithm
-		for t, pos := range seen {
-			if T == nil && t == nil || T != nil && t != nil && Identical(T, t) {
-				// talk about "case" rather than "type" because of nil case
-				check.error(e.Pos(), "duplicate case in type switch")
-				check.errorf(pos, "\tprevious case %s", T) // secondary error, \t indented
-				continue L
-			}
-		}
-		seen[T] = e.Pos()
-		if T != nil {
-			check.typeAssertion(e.Pos(), x, xtyp, T)
-		}
-	}
-	return
-}
-
-// stmt typechecks statement s.
-func (check *Checker) stmt(ctxt stmtContext, s ast.Stmt) {
-	// statements cannot use iota in general
-	// (constant declarations set it explicitly)
-	assert(check.iota == nil)
-
-	// statements must end with the same top scope as they started with
-	if debug {
-		defer func(scope *Scope) {
-			// don't check if code is panicking
-			if p := recover(); p != nil {
-				panic(p)
-			}
-			assert(scope == check.scope)
-		}(check.scope)
-	}
-
-	inner := ctxt &^ fallthroughOk
-	switch s := s.(type) {
-	case *ast.BadStmt, *ast.EmptyStmt:
-		// ignore
-
-	case *ast.DeclStmt:
-		check.declStmt(s.Decl)
-
-	case *ast.LabeledStmt:
-		check.hasLabel = true
-		check.stmt(ctxt, s.Stmt)
-
-	case *ast.ExprStmt:
-		// spec: "With the exception of specific built-in functions,
-		// function and method calls and receive operations can appear
-		// in statement context. Such statements may be parenthesized."
-		var x operand
-		kind := check.rawExpr(&x, s.X, nil)
-		var msg string
-		switch x.mode {
-		default:
-			if kind == statement {
-				return
-			}
-			msg = "is not used"
-		case builtin:
-			msg = "must be called"
-		case typexpr:
-			msg = "is not an expression"
-		}
-		check.errorf(x.pos(), "%s %s", &x, msg)
-
-	case *ast.SendStmt:
-		var ch, x operand
-		check.expr(&ch, s.Chan)
-		check.expr(&x, s.Value)
-		if ch.mode == invalid || x.mode == invalid {
-			return
-		}
-		if tch, ok := ch.typ.Underlying().(*Chan); !ok || tch.dir == RecvOnly || !check.assignment(&x, tch.elem) {
-			if x.mode != invalid {
-				check.invalidOp(ch.pos(), "cannot send %s to channel %s", &x, &ch)
-			}
-		}
-
-	case *ast.IncDecStmt:
-		var op token.Token
-		switch s.Tok {
-		case token.INC:
-			op = token.ADD
-		case token.DEC:
-			op = token.SUB
-		default:
-			check.invalidAST(s.TokPos, "unknown inc/dec operation %s", s.Tok)
-			return
-		}
-		var x operand
-		Y := &ast.BasicLit{ValuePos: s.X.Pos(), Kind: token.INT, Value: "1"} // use x's position
-		check.binary(&x, nil, s.X, Y, op)
-		if x.mode == invalid {
-			return
-		}
-		check.assignVar(s.X, &x)
-
-	case *ast.AssignStmt:
-		switch s.Tok {
-		case token.ASSIGN, token.DEFINE:
-			if len(s.Lhs) == 0 {
-				check.invalidAST(s.Pos(), "missing lhs in assignment")
-				return
-			}
-			if s.Tok == token.DEFINE {
-				check.shortVarDecl(s.TokPos, s.Lhs, s.Rhs)
-			} else {
-				// regular assignment
-				check.assignVars(s.Lhs, s.Rhs)
-			}
-
-		default:
-			// assignment operations
-			if len(s.Lhs) != 1 || len(s.Rhs) != 1 {
-				check.errorf(s.TokPos, "assignment operation %s requires single-valued expressions", s.Tok)
-				return
-			}
-			op := assignOp(s.Tok)
-			if op == token.ILLEGAL {
-				check.invalidAST(s.TokPos, "unknown assignment operation %s", s.Tok)
-				return
-			}
-			var x operand
-			check.binary(&x, nil, s.Lhs[0], s.Rhs[0], op)
-			if x.mode == invalid {
-				return
-			}
-			check.assignVar(s.Lhs[0], &x)
-		}
-
-	case *ast.GoStmt:
-		check.suspendedCall("go", s.Call)
-
-	case *ast.DeferStmt:
-		check.suspendedCall("defer", s.Call)
-
-	case *ast.ReturnStmt:
-		res := check.sig.results
-		if res.Len() > 0 {
-			// function returns results
-			// (if one, say the first, result parameter is named, all of them are named)
-			if len(s.Results) == 0 && res.vars[0].name != "" {
-				// spec: "Implementation restriction: A compiler may disallow an empty expression
-				// list in a "return" statement if a different entity (constant, type, or variable)
-				// with the same name as a result parameter is in scope at the place of the return."
-				for _, obj := range res.vars {
-					if _, alt := check.scope.LookupParent(obj.name, check.pos); alt != nil && alt != obj {
-						check.errorf(s.Pos(), "result parameter %s not in scope at return", obj.name)
-						check.errorf(alt.Pos(), "\tinner declaration of %s", obj)
-						// ok to continue
-					}
-				}
-			} else {
-				// return has results or result parameters are unnamed
-				check.initVars(res.vars, s.Results, s.Return)
-			}
-		} else if len(s.Results) > 0 {
-			check.error(s.Results[0].Pos(), "no result values expected")
-			check.use(s.Results...)
-		}
-
-	case *ast.BranchStmt:
-		if s.Label != nil {
-			check.hasLabel = true
-			return // checked in 2nd pass (check.labels)
-		}
-		switch s.Tok {
-		case token.BREAK:
-			if ctxt&breakOk == 0 {
-				check.error(s.Pos(), "break not in for, switch, or select statement")
-			}
-		case token.CONTINUE:
-			if ctxt&continueOk == 0 {
-				check.error(s.Pos(), "continue not in for statement")
-			}
-		case token.FALLTHROUGH:
-			if ctxt&fallthroughOk == 0 {
-				check.error(s.Pos(), "fallthrough statement out of place")
-			}
-		default:
-			check.invalidAST(s.Pos(), "branch statement: %s", s.Tok)
-		}
-
-	case *ast.BlockStmt:
-		check.openScope(s, "block")
-		defer check.closeScope()
-
-		check.stmtList(inner, s.List)
-
-	case *ast.IfStmt:
-		check.openScope(s, "if")
-		defer check.closeScope()
-
-		check.simpleStmt(s.Init)
-		var x operand
-		check.expr(&x, s.Cond)
-		if x.mode != invalid && !isBoolean(x.typ) {
-			check.error(s.Cond.Pos(), "non-boolean condition in if statement")
-		}
-		check.stmt(inner, s.Body)
-		if s.Else != nil {
-			check.stmt(inner, s.Else)
-		}
-
-	case *ast.SwitchStmt:
-		inner |= breakOk
-		check.openScope(s, "switch")
-		defer check.closeScope()
-
-		check.simpleStmt(s.Init)
-		var x operand
-		if s.Tag != nil {
-			check.expr(&x, s.Tag)
-		} else {
-			// spec: "A missing switch expression is
-			// equivalent to the boolean value true."
-			x.mode = constant_
-			x.typ = Typ[Bool]
-			x.val = constant.MakeBool(true)
-			x.expr = &ast.Ident{NamePos: s.Body.Lbrace, Name: "true"}
-		}
-
-		check.multipleDefaults(s.Body.List)
-
-		for i, c := range s.Body.List {
-			clause, _ := c.(*ast.CaseClause)
-			if clause == nil {
-				check.invalidAST(c.Pos(), "incorrect expression switch case")
-				continue
-			}
-			if x.mode != invalid {
-				check.caseValues(x, clause.List)
-			}
-			check.openScope(clause, "case")
-			inner := inner
-			if i+1 < len(s.Body.List) {
-				inner |= fallthroughOk
-			}
-			check.stmtList(inner, clause.Body)
-			check.closeScope()
-		}
-
-	case *ast.TypeSwitchStmt:
-		inner |= breakOk
-		check.openScope(s, "type switch")
-		defer check.closeScope()
-
-		check.simpleStmt(s.Init)
-
-		// A type switch guard must be of the form:
-		//
-		//     TypeSwitchGuard = [ identifier ":=" ] PrimaryExpr "." "(" "type" ")" .
-		//
-		// The parser is checking syntactic correctness;
-		// remaining syntactic errors are considered AST errors here.
-		// TODO(gri) better factoring of error handling (invalid ASTs)
-		//
-		var lhs *ast.Ident // lhs identifier or nil
-		var rhs ast.Expr
-		switch guard := s.Assign.(type) {
-		case *ast.ExprStmt:
-			rhs = guard.X
-		case *ast.AssignStmt:
-			if len(guard.Lhs) != 1 || guard.Tok != token.DEFINE || len(guard.Rhs) != 1 {
-				check.invalidAST(s.Pos(), "incorrect form of type switch guard")
-				return
-			}
-
-			lhs, _ = guard.Lhs[0].(*ast.Ident)
-			if lhs == nil {
-				check.invalidAST(s.Pos(), "incorrect form of type switch guard")
-				return
-			}
-
-			if lhs.Name == "_" {
-				// _ := x.(type) is an invalid short variable declaration
-				check.softErrorf(lhs.Pos(), "no new variable on left side of :=")
-				lhs = nil // avoid declared but not used error below
-			} else {
-				check.recordDef(lhs, nil) // lhs variable is implicitly declared in each cause clause
-			}
-
-			rhs = guard.Rhs[0]
-
-		default:
-			check.invalidAST(s.Pos(), "incorrect form of type switch guard")
-			return
-		}
-
-		// rhs must be of the form: expr.(type) and expr must be an interface
-		expr, _ := rhs.(*ast.TypeAssertExpr)
-		if expr == nil || expr.Type != nil {
-			check.invalidAST(s.Pos(), "incorrect form of type switch guard")
-			return
-		}
-		var x operand
-		check.expr(&x, expr.X)
-		if x.mode == invalid {
-			return
-		}
-		xtyp, _ := x.typ.Underlying().(*Interface)
-		if xtyp == nil {
-			check.errorf(x.pos(), "%s is not an interface", &x)
-			return
-		}
-
-		check.multipleDefaults(s.Body.List)
-
-		var lhsVars []*Var               // list of implicitly declared lhs variables
-		seen := make(map[Type]token.Pos) // map of seen types to positions
-		for _, s := range s.Body.List {
-			clause, _ := s.(*ast.CaseClause)
-			if clause == nil {
-				check.invalidAST(s.Pos(), "incorrect type switch case")
-				continue
-			}
-			// Check each type in this type switch case.
-			T := check.caseTypes(&x, xtyp, clause.List, seen)
-			check.openScope(clause, "case")
-			// If lhs exists, declare a corresponding variable in the case-local scope.
-			if lhs != nil {
-				// spec: "The TypeSwitchGuard may include a short variable declaration.
-				// When that form is used, the variable is declared at the beginning of
-				// the implicit block in each clause. In clauses with a case listing
-				// exactly one type, the variable has that type; otherwise, the variable
-				// has the type of the expression in the TypeSwitchGuard."
-				if len(clause.List) != 1 || T == nil {
-					T = x.typ
-				}
-				obj := NewVar(lhs.Pos(), check.pkg, lhs.Name, T)
-				scopePos := clause.End()
-				if len(clause.Body) > 0 {
-					scopePos = clause.Body[0].Pos()
-				}
-				check.declare(check.scope, nil, obj, scopePos)
-				check.recordImplicit(clause, obj)
-				// For the "declared but not used" error, all lhs variables act as
-				// one; i.e., if any one of them is 'used', all of them are 'used'.
-				// Collect them for later analysis.
-				lhsVars = append(lhsVars, obj)
-			}
-			check.stmtList(inner, clause.Body)
-			check.closeScope()
-		}
-
-		// If lhs exists, we must have at least one lhs variable that was used.
-		if lhs != nil {
-			var used bool
-			for _, v := range lhsVars {
-				if v.used {
-					used = true
-				}
-				v.used = true // avoid usage error when checking entire function
-			}
-			if !used {
-				check.softErrorf(lhs.Pos(), "%s declared but not used", lhs.Name)
-			}
-		}
-
-	case *ast.SelectStmt:
-		inner |= breakOk
-
-		check.multipleDefaults(s.Body.List)
-
-		for _, s := range s.Body.List {
-			clause, _ := s.(*ast.CommClause)
-			if clause == nil {
-				continue // error reported before
-			}
-
-			// clause.Comm must be a SendStmt, RecvStmt, or default case
-			valid := false
-			var rhs ast.Expr // rhs of RecvStmt, or nil
-			switch s := clause.Comm.(type) {
-			case nil, *ast.SendStmt:
-				valid = true
-			case *ast.AssignStmt:
-				if len(s.Rhs) == 1 {
-					rhs = s.Rhs[0]
-				}
-			case *ast.ExprStmt:
-				rhs = s.X
-			}
-
-			// if present, rhs must be a receive operation
-			if rhs != nil {
-				if x, _ := unparen(rhs).(*ast.UnaryExpr); x != nil && x.Op == token.ARROW {
-					valid = true
-				}
-			}
-
-			if !valid {
-				check.error(clause.Comm.Pos(), "select case must be send or receive (possibly with assignment)")
-				continue
-			}
-
-			check.openScope(s, "case")
-			if clause.Comm != nil {
-				check.stmt(inner, clause.Comm)
-			}
-			check.stmtList(inner, clause.Body)
-			check.closeScope()
-		}
-
-	case *ast.ForStmt:
-		inner |= breakOk | continueOk
-		check.openScope(s, "for")
-		defer check.closeScope()
-
-		check.simpleStmt(s.Init)
-		if s.Cond != nil {
-			var x operand
-			check.expr(&x, s.Cond)
-			if x.mode != invalid && !isBoolean(x.typ) {
-				check.error(s.Cond.Pos(), "non-boolean condition in for statement")
-			}
-		}
-		check.simpleStmt(s.Post)
-		// spec: "The init statement may be a short variable
-		// declaration, but the post statement must not."
-		if s, _ := s.Post.(*ast.AssignStmt); s != nil && s.Tok == token.DEFINE {
-			check.softErrorf(s.Pos(), "cannot declare in post statement")
-			check.use(s.Lhs...) // avoid follow-up errors
-		}
-		check.stmt(inner, s.Body)
-
-	case *ast.RangeStmt:
-		inner |= breakOk | continueOk
-		check.openScope(s, "for")
-		defer check.closeScope()
-
-		// check expression to iterate over
-		var x operand
-		check.expr(&x, s.X)
-
-		// determine key/value types
-		var key, val Type
-		if x.mode != invalid {
-			switch typ := x.typ.Underlying().(type) {
-			case *Basic:
-				if isString(typ) {
-					key = Typ[Int]
-					val = universeRune // use 'rune' name
-				}
-			case *Array:
-				key = Typ[Int]
-				val = typ.elem
-			case *Slice:
-				key = Typ[Int]
-				val = typ.elem
-			case *Pointer:
-				if typ, _ := typ.base.Underlying().(*Array); typ != nil {
-					key = Typ[Int]
-					val = typ.elem
-				}
-			case *Map:
-				key = typ.key
-				val = typ.elem
-			case *Chan:
-				key = typ.elem
-				val = Typ[Invalid]
-				if typ.dir == SendOnly {
-					check.errorf(x.pos(), "cannot range over send-only channel %s", &x)
-					// ok to continue
-				}
-				if s.Value != nil {
-					check.errorf(s.Value.Pos(), "iteration over %s permits only one iteration variable", &x)
-					// ok to continue
-				}
-			}
-		}
-
-		if key == nil {
-			check.errorf(x.pos(), "cannot range over %s", &x)
-			// ok to continue
-		}
-
-		// check assignment to/declaration of iteration variables
-		// (irregular assignment, cannot easily map to existing assignment checks)
-
-		// lhs expressions and initialization value (rhs) types
-		lhs := [2]ast.Expr{s.Key, s.Value}
-		rhs := [2]Type{key, val} // key, val may be nil
-
-		if s.Tok == token.DEFINE {
-			// short variable declaration; variable scope starts after the range clause
-			// (the for loop opens a new scope, so variables on the lhs never redeclare
-			// previously declared variables)
-			var vars []*Var
-			for i, lhs := range lhs {
-				if lhs == nil {
-					continue
-				}
-
-				// determine lhs variable
-				var obj *Var
-				if ident, _ := lhs.(*ast.Ident); ident != nil {
-					// declare new variable
-					name := ident.Name
-					obj = NewVar(ident.Pos(), check.pkg, name, nil)
-					check.recordDef(ident, obj)
-					// _ variables don't count as new variables
-					if name != "_" {
-						vars = append(vars, obj)
-					}
-				} else {
-					check.errorf(lhs.Pos(), "cannot declare %s", lhs)
-					obj = NewVar(lhs.Pos(), check.pkg, "_", nil) // dummy variable
-				}
-
-				// initialize lhs variable
-				if typ := rhs[i]; typ != nil {
-					x.mode = value
-					x.expr = lhs // we don't have a better rhs expression to use here
-					x.typ = typ
-					check.initVar(obj, &x, false)
-				} else {
-					obj.typ = Typ[Invalid]
-					obj.used = true // don't complain about unused variable
-				}
-			}
-
-			// declare variables
-			if len(vars) > 0 {
-				for _, obj := range vars {
-					// spec: "The scope of a constant or variable identifier declared inside
-					// a function begins at the end of the ConstSpec or VarSpec (ShortVarDecl
-					// for short variable declarations) and ends at the end of the innermost
-					// containing block."
-					scopePos := s.End()
-					check.declare(check.scope, nil /* recordDef already called */, obj, scopePos)
-				}
-			} else {
-				check.error(s.TokPos, "no new variables on left side of :=")
-			}
-		} else {
-			// ordinary assignment
-			for i, lhs := range lhs {
-				if lhs == nil {
-					continue
-				}
-				if typ := rhs[i]; typ != nil {
-					x.mode = value
-					x.expr = lhs // we don't have a better rhs expression to use here
-					x.typ = typ
-					check.assignVar(lhs, &x)
-				}
-			}
-		}
-
-		check.stmt(inner, s.Body)
-
-	default:
-		check.error(s.Pos(), "invalid statement")
-	}
-}
diff --git a/src/go/types/testdata/blank.src b/src/go/types/testdata/blank.src
deleted file mode 100644
index 6a2507f..0000000
--- a/src/go/types/testdata/blank.src
+++ /dev/null
@@ -1,5 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package _ /* ERROR invalid package name */
diff --git a/src/go/types/testdata/builtins.src b/src/go/types/testdata/builtins.src
deleted file mode 100644
index 9eb551d..0000000
--- a/src/go/types/testdata/builtins.src
+++ /dev/null
@@ -1,881 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// builtin calls
-
-package builtins
-
-import "unsafe"
-
-func f0() {}
-
-func append1() {
-	var b byte
-	var x int
-	var s []byte
-	_ = append() // ERROR not enough arguments
-	_ = append("foo" /* ERROR not a slice */ )
-	_ = append(nil /* ERROR not a slice */ , s)
-	_ = append(x /* ERROR not a slice */ , s)
-	_ = append(s)
-	append /* ERROR not used */ (s)
-
-	_ = append(s, b)
-	_ = append(s, x /* ERROR cannot pass argument x */ )
-	_ = append(s, s /* ERROR cannot pass argument s */ )
-	_ = append(s... /* ERROR can only use ... with matching parameter */ )
-	_ = append(s, b, s... /* ERROR can only use ... with matching parameter */ )
-	_ = append(s, 1, 2, 3)
-	_ = append(s, 1, 2, 3, x /* ERROR cannot pass argument x */ , 5, 6, 6)
-	_ = append(s, 1, 2, s... /* ERROR can only use ... with matching parameter */ )
-	_ = append([]interface{}(nil), 1, 2, "foo", x, 3.1425, false)
-
-	type S []byte
-	type T string
-	var t T
-	_ = append(s, "foo" /* ERROR cannot convert */ )
-	_ = append(s, "foo"...)
-	_ = append(S(s), "foo" /* ERROR cannot convert */ )
-	_ = append(S(s), "foo"...)
-	_ = append(s, t /* ERROR cannot pass argument t */ )
-	_ = append(s, t...)
-	_ = append(s, T("foo")...)
-	_ = append(S(s), t /* ERROR cannot pass argument t */ )
-	_ = append(S(s), t...)
-	_ = append(S(s), T("foo")...)
-	_ = append([]string{}, t /* ERROR cannot pass argument t */ , "foo")
-	_ = append([]T{}, t, "foo")
-}
-
-// from the spec
-func append2() {
-	s0 := []int{0, 0}
-	s1 := append(s0, 2)                // append a single element     s1 == []int{0, 0, 2}
-	s2 := append(s1, 3, 5, 7)          // append multiple elements    s2 == []int{0, 0, 2, 3, 5, 7}
-	s3 := append(s2, s0...)            // append a slice              s3 == []int{0, 0, 2, 3, 5, 7, 0, 0}
-	s4 := append(s3[3:6], s3[2:]...)   // append overlapping slice    s4 == []int{3, 5, 7, 2, 3, 5, 7, 0, 0}
-
-	var t []interface{}
-	t = append(t, 42, 3.1415, "foo")   //                             t == []interface{}{42, 3.1415, "foo"}
-
-	var b []byte
-	b = append(b, "bar"...)            // append string contents      b == []byte{'b', 'a', 'r' }
-
-	_ = s4
-}
-
-func append3() {
-	f1 := func() (s []int) { return }
-	f2 := func() (s []int, x int) { return }
-	f3 := func() (s []int, x, y int) { return }
-	f5 := func() (s []interface{}, x int, y float32, z string, b bool) { return }
-	ff := func() (int, float32) { return 0, 0 }
-	_ = append(f0 /* ERROR used as value */ ())
-	_ = append(f1())
-	_ = append(f2())
-	_ = append(f3())
-	_ = append(f5())
-	_ = append(ff /* ERROR not a slice */ ()) // TODO(gri) better error message
-}
-
-func cap1() {
-	var a [10]bool
-	var p *[20]int
-	var c chan string
-	_ = cap() // ERROR not enough arguments
-	_ = cap(1, 2) // ERROR too many arguments
-	_ = cap(42 /* ERROR invalid */)
-	const _3 = cap(a)
-	assert(_3 == 10)
-	const _4 = cap(p)
-	assert(_4 == 20)
-	_ = cap(c)
-	cap /* ERROR not used */ (c)
-
-	// issue 4744
-	type T struct{ a [10]int }
-	const _ = cap(((*T)(nil)).a)
-
-	var s [][]byte
-	_ = cap(s)
-	_ = cap(s... /* ERROR invalid use of \.\.\. */ )
-}
-
-func cap2() {
-	f1a := func() (a [10]int) { return }
-	f1s := func() (s []int) { return }
-	f2 := func() (s []int, x int) { return }
-	_ = cap(f0 /* ERROR used as value */ ())
-	_ = cap(f1a())
-	_ = cap(f1s())
-	_ = cap(f2()) // ERROR too many arguments
-}
-
-// test cases for issue 7387
-func cap3() {
-	var f = func() int { return 0 }
-	var x = f()
-	const (
-		_ = cap([4]int{})
-		_ = cap([4]int{x})
-		_ = cap /* ERROR not constant */ ([4]int{f()})
-		_ = cap /* ERROR not constant */ ([4]int{cap([]int{})})
-		_ = cap([4]int{cap([4]int{})})
-	)
-	var y float64
-	var z complex128
-	const (
-		_ = cap([4]float64{})
-		_ = cap([4]float64{y})
-		_ = cap([4]float64{real(2i)})
-		_ = cap /* ERROR not constant */ ([4]float64{real(z)})
-	)
-	var ch chan [10]int
-	const (
-		_ = cap /* ERROR not constant */ (<-ch)
-		_ = cap /* ERROR not constant */ ([4]int{(<-ch)[0]})
-	)
-}
-
-func close1() {
-	var c chan int
-	var r <-chan int
-	close() // ERROR not enough arguments
-	close(1, 2) // ERROR too many arguments
-	close(42 /* ERROR not a channel */)
-	close(r /* ERROR receive-only channel */)
-	close(c)
-	_ = close /* ERROR used as value */ (c)
-
-	var s []chan int
-	close(s... /* ERROR invalid use of \.\.\. */ )
-}
-
-func close2() {
-	f1 := func() (ch chan int) { return }
-	f2 := func() (ch chan int, x int) { return }
-	close(f0 /* ERROR used as value */ ())
-	close(f1())
-	close(f2()) // ERROR too many arguments
-}
-
-func complex1() {
-	var i32 int32
-	var f32 float32
-	var f64 float64
-	var c64 complex64
-	var c128 complex128
-	_ = complex() // ERROR not enough arguments
-	_ = complex(1) // ERROR not enough arguments
-	_ = complex(true /* ERROR invalid argument */ , 0)
-	_ = complex(i32 /* ERROR invalid argument */ , 0)
-	_ = complex("foo" /* ERROR invalid argument */ , 0)
-	_ = complex(c64 /* ERROR invalid argument */ , 0)
-	_ = complex(0, true /* ERROR invalid argument */ )
-	_ = complex(0, i32 /* ERROR invalid argument */ )
-	_ = complex(0, "foo" /* ERROR invalid argument */ )
-	_ = complex(0, c64 /* ERROR invalid argument */ )
-	_ = complex(f32, f32)
-	_ = complex(f32, 1)
-	_ = complex(f32, 1.0)
-	_ = complex(f32, 'a')
-	_ = complex(f64, f64)
-	_ = complex(f64, 1)
-	_ = complex(f64, 1.0)
-	_ = complex(f64, 'a')
-	_ = complex(f32 /* ERROR mismatched types */ , f64)
-	_ = complex(f64 /* ERROR mismatched types */ , f32)
-	_ = complex(1, 1)
-	_ = complex(1, 1.1)
-	_ = complex(1, 'a')
-	complex /* ERROR not used */ (1, 2)
-
-	var _ complex64 = complex(f32, f32)
-	var _ complex64 = complex /* ERROR cannot initialize */ (f64, f64)
-
-	var _ complex128 = complex /* ERROR cannot initialize */ (f32, f32)
-	var _ complex128 = complex(f64, f64)
-
-	// untyped constants
-	const _ int = complex(1, 0)
-	const _ float32 = complex(1, 0)
-	const _ complex64 = complex(1, 0)
-	const _ complex128 = complex(1, 0)
-
-	const _ int = complex /* ERROR int */ (1.1, 0)
-	const _ float32 = complex /* ERROR float32 */ (1, 2)
-
-	// untyped values
-	var s uint
-	_ = complex(1 /* ERROR integer */ <<s, 0)
-	const _ = complex /* ERROR not constant */ (1 /* ERROR integer */ <<s, 0)
-	var _ int = complex /* ERROR cannot initialize */ (1 /* ERROR integer */ <<s, 0)
-
-	// floating-point argument types must be identical
-	type F32 float32
-	type F64 float64
-	var x32 F32
-	var x64 F64
-	c64 = complex(x32, x32)
-	_ = complex(x32 /* ERROR mismatched types */ , f32)
-	_ = complex(f32 /* ERROR mismatched types */ , x32)
-	c128 = complex(x64, x64)
-	_ = c128
-	_ = complex(x64 /* ERROR mismatched types */ , f64)
-	_ = complex(f64 /* ERROR mismatched types */ , x64)
-
-	var t []float32
-	_ = complex(t... /* ERROR invalid use of \.\.\. */ )
-}
-
-func complex2() {
-	f1 := func() (x float32) { return }
-	f2 := func() (x, y float32) { return }
-	f3 := func() (x, y, z float32) { return }
-	_ = complex(f0 /* ERROR used as value */ ())
-	_ = complex(f1()) // ERROR not enough arguments
-	_ = complex(f2())
-	_ = complex(f3()) // ERROR too many arguments
-}
-
-func copy1() {
-	copy() // ERROR not enough arguments
-	copy("foo") // ERROR not enough arguments
-	copy([ /* ERROR copy expects slice arguments */ ...]int{}, []int{})
-	copy([ /* ERROR copy expects slice arguments */ ]int{}, [...]int{})
-	copy([ /* ERROR different element types */ ]int8{}, "foo")
-
-	// spec examples
-	var a = [...]int{0, 1, 2, 3, 4, 5, 6, 7}
-	var s = make([]int, 6)
-	var b = make([]byte, 5)
-	n1 := copy(s, a[0:])            // n1 == 6, s == []int{0, 1, 2, 3, 4, 5}
-	n2 := copy(s, s[2:])            // n2 == 4, s == []int{2, 3, 4, 5, 4, 5}
-	n3 := copy(b, "Hello, World!")  // n3 == 5, b == []byte("Hello")
-	_, _, _ = n1, n2, n3
-
-	var t [][]int
-	copy(t, t)
-	copy(t /* ERROR copy expects slice arguments */ , nil)
-	copy(nil /* ERROR copy expects slice arguments */ , t)
-	copy(nil /* ERROR copy expects slice arguments */ , nil)
-	copy(t... /* ERROR invalid use of \.\.\. */ )
-}
-
-func copy2() {
-	f1 := func() (a []int) { return }
-	f2 := func() (a, b []int) { return }
-	f3 := func() (a, b, c []int) { return }
-	copy(f0 /* ERROR used as value */ ())
-	copy(f1()) // ERROR not enough arguments
-	copy(f2())
-	copy(f3()) // ERROR too many arguments
-}
-
-func delete1() {
-	var m map[string]int
-	var s string
-	delete() // ERROR not enough arguments
-	delete(1) // ERROR not enough arguments
-	delete(1, 2, 3) // ERROR too many arguments
-	delete(m, 0 /* ERROR not assignable */)
-	delete(m, s)
-	_ = delete /* ERROR used as value */ (m, s)
-
-	var t []map[string]string
-	delete(t... /* ERROR invalid use of \.\.\. */ )
-}
-
-func delete2() {
-	f1 := func() (m map[string]int) { return }
-	f2 := func() (m map[string]int, k string) { return }
-	f3 := func() (m map[string]int, k string, x float32) { return }
-	delete(f0 /* ERROR used as value */ ())
-	delete(f1()) // ERROR not enough arguments
-	delete(f2())
-	delete(f3()) // ERROR too many arguments
-}
-
-func imag1() {
-	var f32 float32
-	var f64 float64
-	var c64 complex64
-	var c128 complex128
-	_ = imag() // ERROR not enough arguments
-	_ = imag(1, 2) // ERROR too many arguments
-	_ = imag(10 /* ERROR must be a complex number */)
-	_ = imag(2.7182818 /* ERROR must be a complex number */)
-	_ = imag("foo" /* ERROR must be a complex number */)
-	const _5 = imag(1 + 2i)
-	assert(_5 == 2)
-	f32 = _5
-	f64 = _5
-	const _6 = imag(0i)
-	assert(_6 == 0)
-	f32 = imag(c64)
-	f64 = imag(c128)
-	f32 = imag /* ERROR cannot assign */ (c128)
-	f64 = imag /* ERROR cannot assign */ (c64)
-	imag /* ERROR not used */ (c64)
-	_, _ = f32, f64
-
-	// complex type may not be predeclared
-	type C64 complex64
-	type C128 complex128
-	var x64 C64
-	var x128 C128
-	f32 = imag(x64)
-	f64 = imag(x128)
-
-	var s []complex64
-	_ = imag(s... /* ERROR invalid use of \.\.\. */ )
-}
-
-func imag2() {
-	f1 := func() (x complex128) { return }
-	f2 := func() (x, y complex128) { return }
-	_ = imag(f0 /* ERROR used as value */ ())
-	_ = imag(f1())
-	_ = imag(f2()) // ERROR too many arguments
-}
-
-func len1() {
-	const c = "foobar"
-	var a [10]bool
-	var p *[20]int
-	var m map[string]complex128
-	_ = len() // ERROR not enough arguments
-	_ = len(1, 2) // ERROR too many arguments
-	_ = len(42 /* ERROR invalid */)
-	const _3 = len(c)
-	assert(_3 == 6)
-	const _4 = len(a)
-	assert(_4 == 10)
-	const _5 = len(p)
-	assert(_5 == 20)
-	_ = len(m)
-	len /* ERROR not used */ (c)
-
-	// esoteric case
-	var t string
-	var hash map[interface{}][]*[10]int
-	const n = len /* ERROR not constant */ (hash[recover()][len(t)])
-	assert(n == 10) // ok because n has unknown value and no error is reported
-	var ch <-chan int
-	const nn = len /* ERROR not constant */ (hash[<-ch][len(t)])
-
-	// issue 4744
-	type T struct{ a [10]int }
-	const _ = len(((*T)(nil)).a)
-
-	var s [][]byte
-	_ = len(s)
-	_ = len(s... /* ERROR invalid use of \.\.\. */ )
-}
-
-func len2() {
-	f1 := func() (x []int) { return }
-	f2 := func() (x, y []int) { return }
-	_ = len(f0 /* ERROR used as value */ ())
-	_ = len(f1())
-	_ = len(f2()) // ERROR too many arguments
-}
-
-// test cases for issue 7387
-func len3() {
-	var f = func() int { return 0 }
-	var x = f()
-	const (
-		_ = len([4]int{})
-		_ = len([4]int{x})
-		_ = len /* ERROR not constant */ ([4]int{f()})
-		_ = len /* ERROR not constant */ ([4]int{len([]int{})})
-		_ = len([4]int{len([4]int{})})
-	)
-	var y float64
-	var z complex128
-	const (
-		_ = len([4]float64{})
-		_ = len([4]float64{y})
-		_ = len([4]float64{real(2i)})
-		_ = len /* ERROR not constant */ ([4]float64{real(z)})
-	)
-	var ch chan [10]int
-	const (
-		_ = len /* ERROR not constant */ (<-ch)
-		_ = len /* ERROR not constant */ ([4]int{(<-ch)[0]})
-	)
-}
-
-func make1() {
-	var n int
-	var m float32
-	var s uint
-
-	_ = make() // ERROR not enough arguments
-	_ = make(1 /* ERROR not a type */)
-	_ = make(int /* ERROR cannot make */)
-
-	// slices
-	_ = make/* ERROR arguments */ ([]int)
-	_ = make/* ERROR arguments */ ([]int, 2, 3, 4)
-	_ = make([]int, int /* ERROR not an expression */)
-	_ = make([]int, 10, float32 /* ERROR not an expression */)
-	_ = make([]int, "foo" /* ERROR cannot convert */)
-	_ = make([]int, 10, 2.3 /* ERROR truncated */)
-	_ = make([]int, 5, 10.0)
-	_ = make([]int, 0i)
-	_ = make([]int, 1.0)
-	_ = make([]int, 1.0<<s)
-	_ = make([]int, 1.1 /* ERROR int */ <<s)
-	_ = make([]int, - /* ERROR must not be negative */ 1, 10)
-	_ = make([]int, 0, - /* ERROR must not be negative */ 1)
-	_ = make([]int, - /* ERROR must not be negative */ 1, - /* ERROR must not be negative */ 1)
-	_ = make([]int, 1 /* ERROR overflows */ <<100, 1 /* ERROR overflows */ <<100)
-	_ = make([]int, 10 /* ERROR length and capacity swapped */ , 9)
-	_ = make([]int, 1 /* ERROR overflows */ <<100, 12345)
-	_ = make([]int, m /* ERROR must be integer */ )
-        _ = &make /* ERROR cannot take address */ ([]int, 0)
-
-	// maps
-	_ = make /* ERROR arguments */ (map[int]string, 10, 20)
-	_ = make(map[int]float32, int /* ERROR not an expression */)
-	_ = make(map[int]float32, "foo" /* ERROR cannot convert */)
-	_ = make(map[int]float32, 10)
-	_ = make(map[int]float32, n)
-	_ = make(map[int]float32, int64(n))
-	_ = make(map[string]bool, 10.0)
-	_ = make(map[string]bool, 10.0<<s)
-        _ = &make /* ERROR cannot take address */ (map[string]bool)
-
-	// channels
-	_ = make /* ERROR arguments */ (chan int, 10, 20)
-	_ = make(chan int, int /* ERROR not an expression */)
-	_ = make(chan<- int, "foo" /* ERROR cannot convert */)
-	_ = make(chan int, - /* ERROR must not be negative */ 10)
-	_ = make(<-chan float64, 10)
-	_ = make(chan chan int, n)
-	_ = make(chan string, int64(n))
-	_ = make(chan bool, 10.0)
-	_ = make(chan bool, 10.0<<s)
-        _ = &make /* ERROR cannot take address */ (chan bool)
-
-	make /* ERROR not used */ ([]int, 10)
-
-	var t []int
-	_ = make([]int, t[0], t[1])
-	_ = make([]int, t... /* ERROR invalid use of \.\.\. */ )
-}
-
-func make2() {
-	f1 /* ERROR not used */ := func() (x []int) { return }
-	_ = make(f0 /* ERROR not a type */ ())
-	_ = make(f1 /* ERROR not a type */ ())
-}
-
-func new1() {
-	_ = new() // ERROR not enough arguments
-	_ = new(1, 2) // ERROR too many arguments
-	_ = new("foo" /* ERROR not a type */)
-	p := new(float64)
-	_ = new(struct{ x, y int })
-	q := new(*float64)
-	_ = *p == **q
-	new /* ERROR not used */ (int)
-        _ = &new /* ERROR cannot take address */ (int)
-
-	_ = new(int... /* ERROR invalid use of \.\.\. */ )
-}
-
-func new2() {
-	f1 /* ERROR not used */ := func() (x []int) { return }
-	_ = new(f0 /* ERROR not a type */ ())
-	_ = new(f1 /* ERROR not a type */ ())
-}
-
-func panic1() {
-	panic() // ERROR not enough arguments
-	panic(1, 2) // ERROR too many arguments
-	panic(0)
-	panic("foo")
-	panic(false)
-	panic(1<<10)
-	panic(1 /* ERROR overflows */ <<1000)
-	_ = panic /* ERROR used as value */ (0)
-
-	var s []byte
-	panic(s)
-	panic(s... /* ERROR invalid use of \.\.\. */ )
-}
-
-func panic2() {
-	f1 := func() (x int) { return }
-	f2 := func() (x, y int) { return }
-	panic(f0 /* ERROR used as value */ ())
-	panic(f1())
-	panic(f2()) // ERROR too many arguments
-}
-
-func print1() {
-	print()
-	print(1)
-	print(1, 2)
-	print("foo")
-	print(2.718281828)
-	print(false)
-	print(1<<10)
-	print(1 /* ERROR overflows */ <<1000)
-	println(nil /* ERROR untyped nil */ )
-
-	var s []int
-	print(s... /* ERROR invalid use of \.\.\. */ )
-	_ = print /* ERROR used as value */ ()
-}
-
-func print2() {
-	f1 := func() (x int) { return }
-	f2 := func() (x, y int) { return }
-	f3 := func() (x int, y float32, z string) { return }
-	print(f0 /* ERROR used as value */ ())
-	print(f1())
-	print(f2())
-	print(f3())
-}
-
-func println1() {
-	println()
-	println(1)
-	println(1, 2)
-	println("foo")
-	println(2.718281828)
-	println(false)
-	println(1<<10)
-	println(1 /* ERROR overflows */ <<1000)
-	println(nil /* ERROR untyped nil */ )
-
-	var s []int
-	println(s... /* ERROR invalid use of \.\.\. */ )
-	_ = println /* ERROR used as value */ ()
-}
-
-func println2() {
-	f1 := func() (x int) { return }
-	f2 := func() (x, y int) { return }
-	f3 := func() (x int, y float32, z string) { return }
-	println(f0 /* ERROR used as value */ ())
-	println(f1())
-	println(f2())
-	println(f3())
-}
-
-func real1() {
-	var f32 float32
-	var f64 float64
-	var c64 complex64
-	var c128 complex128
-	_ = real() // ERROR not enough arguments
-	_ = real(1, 2) // ERROR too many arguments
-	_ = real(10 /* ERROR must be a complex number */)
-	_ = real(2.7182818 /* ERROR must be a complex number */)
-	_ = real("foo" /* ERROR must be a complex number */)
-	const _5 = real(1 + 2i)
-	assert(_5 == 1)
-	f32 = _5
-	f64 = _5
-	const _6 = real(0i)
-	assert(_6 == 0)
-	f32 = real(c64)
-	f64 = real(c128)
-	f32 = real /* ERROR cannot assign */ (c128)
-	f64 = real /* ERROR cannot assign */ (c64)
-	real /* ERROR not used */ (c64)
-
-	// complex type may not be predeclared
-	type C64 complex64
-	type C128 complex128
-	var x64 C64
-	var x128 C128
-	f32 = imag(x64)
-	f64 = imag(x128)
-
-	var s []complex64
-	_ = real(s... /* ERROR invalid use of \.\.\. */ )
-	_, _ = f32, f64
-}
-
-func real2() {
-	f1 := func() (x complex128) { return }
-	f2 := func() (x, y complex128) { return }
-	_ = real(f0 /* ERROR used as value */ ())
-	_ = real(f1())
-	_ = real(f2()) // ERROR too many arguments
-}
-
-func recover1() {
-	_ = recover()
-	_ = recover(10) // ERROR too many arguments
-	recover()
-
-	var s []int
-	recover(s... /* ERROR invalid use of \.\.\. */ )
-}
-
-func recover2() {
-	f1 := func() (x int) { return }
-	f2 := func() (x, y int) { return }
-	_ = recover(f0 /* ERROR used as value */ ())
-	_ = recover(f1()) // ERROR too many arguments
-	_ = recover(f2()) // ERROR too many arguments
-}
-
-// assuming types.DefaultPtrSize == 8
-type S0 struct{      // offset
-	a bool       //  0
-	b rune       //  4
-	c *int       //  8
-	d bool       // 16
-	e complex128 // 24
-}                    // 40
-
-type S1 struct{   // offset
-	x float32 //  0
-	y string  //  8
-	z *S1     // 24
-	S0        // 32
-}                 // 72
-
-type S2 struct{ // offset
-	*S1     //  0
-}               //  8
-
-type S3 struct { // offset
-	a int64  //  0
-	b int32  //  8
-}                // 12
-
-type S4 struct { // offset
-	S3       //  0
-	int32    // 12
-}                // 16
-
-type S5 struct {   // offset
-	a [3]int32 //  0
-	b int32    // 12
-}                  // 16
-
-func (S2) m() {}
-
-func Alignof1() {
-	var x int
-	_ = unsafe.Alignof() // ERROR not enough arguments
-	_ = unsafe.Alignof(1, 2) // ERROR too many arguments
-	_ = unsafe.Alignof(int /* ERROR not an expression */)
-	_ = unsafe.Alignof(42)
-	_ = unsafe.Alignof(new(struct{}))
-	_ = unsafe.Alignof(1<<10)
-	_ = unsafe.Alignof(1 /* ERROR overflows */ <<1000)
-	_ = unsafe.Alignof(nil /* ERROR "untyped nil */ )
-	unsafe /* ERROR not used */ .Alignof(x)
-
-	var y S0
-	assert(unsafe.Alignof(y.a) == 1)
-	assert(unsafe.Alignof(y.b) == 4)
-	assert(unsafe.Alignof(y.c) == 8)
-	assert(unsafe.Alignof(y.d) == 1)
-	assert(unsafe.Alignof(y.e) == 8)
-
-	var s []byte
-	_ = unsafe.Alignof(s)
-	_ = unsafe.Alignof(s... /* ERROR invalid use of \.\.\. */ )
-}
-
-func Alignof2() {
-	f1 := func() (x int32) { return }
-	f2 := func() (x, y int32) { return }
-	_ = unsafe.Alignof(f0 /* ERROR used as value */ ())
-	assert(unsafe.Alignof(f1()) == 4)
-	_ = unsafe.Alignof(f2()) // ERROR too many arguments
-}
-
-func Offsetof1() {
-	var x struct{ f int }
-	_ = unsafe.Offsetof() // ERROR not enough arguments
-	_ = unsafe.Offsetof(1, 2) // ERROR too many arguments
-	_ = unsafe.Offsetof(int /* ERROR not a selector expression */ )
-	_ = unsafe.Offsetof(x /* ERROR not a selector expression */ )
-	_ = unsafe.Offsetof(nil /* ERROR not a selector expression */ )
-	_ = unsafe.Offsetof(x.f)
-	_ = unsafe.Offsetof((x.f))
-	_ = unsafe.Offsetof((((((((x))).f)))))
-	unsafe /* ERROR not used */ .Offsetof(x.f)
-
-	var y0 S0
-	assert(unsafe.Offsetof(y0.a) == 0)
-	assert(unsafe.Offsetof(y0.b) == 4)
-	assert(unsafe.Offsetof(y0.c) == 8)
-	assert(unsafe.Offsetof(y0.d) == 16)
-	assert(unsafe.Offsetof(y0.e) == 24)
-
-	var y1 S1
-	assert(unsafe.Offsetof(y1.x) == 0)
-	assert(unsafe.Offsetof(y1.y) == 8)
-	assert(unsafe.Offsetof(y1.z) == 24)
-	assert(unsafe.Offsetof(y1.S0) == 32)
-
-	assert(unsafe.Offsetof(y1.S0.a) == 0) // relative to S0
-	assert(unsafe.Offsetof(y1.a) == 32)   // relative to S1
-	assert(unsafe.Offsetof(y1.b) == 36)   // relative to S1
-	assert(unsafe.Offsetof(y1.c) == 40)   // relative to S1
-	assert(unsafe.Offsetof(y1.d) == 48)   // relative to S1
-	assert(unsafe.Offsetof(y1.e) == 56)   // relative to S1
-
-	var y1p *S1
-	assert(unsafe.Offsetof(y1p.S0) == 32)
-
-	type P *S1
-	var p P = y1p
-	assert(unsafe.Offsetof(p.S0) == 32)
-
-	var y2 S2
-	assert(unsafe.Offsetof(y2.S1) == 0)
-	_ = unsafe.Offsetof(y2 /* ERROR embedded via a pointer */ .x)
-	_ = unsafe.Offsetof(y2 /* ERROR method value */ .m)
-
-	var s []byte
-	_ = unsafe.Offsetof(s... /* ERROR invalid use of \.\.\. */ )
-}
-
-func Offsetof2() {
-	f1 := func() (x int32) { return }
-	f2 := func() (x, y int32) { return }
-	_ = unsafe.Offsetof(f0 /* ERROR not a selector expression */ ())
-	_ = unsafe.Offsetof(f1 /* ERROR not a selector expression */ ())
-	_ = unsafe.Offsetof(f2 /* ERROR not a selector expression */ ())
-}
-
-func Sizeof1() {
-	var x int
-	_ = unsafe.Sizeof() // ERROR not enough arguments
-	_ = unsafe.Sizeof(1, 2) // ERROR too many arguments
-	_ = unsafe.Sizeof(int /* ERROR not an expression */)
-	_ = unsafe.Sizeof(42)
-	_ = unsafe.Sizeof(new(complex128))
-	_ = unsafe.Sizeof(1<<10)
-	_ = unsafe.Sizeof(1 /* ERROR overflows */ <<1000)
-	_ = unsafe.Sizeof(nil /* ERROR untyped nil */ )
-	unsafe /* ERROR not used */ .Sizeof(x)
-
-	// basic types have size guarantees
-	assert(unsafe.Sizeof(byte(0)) == 1)
-	assert(unsafe.Sizeof(uint8(0)) == 1)
-	assert(unsafe.Sizeof(int8(0)) == 1)
-	assert(unsafe.Sizeof(uint16(0)) == 2)
-	assert(unsafe.Sizeof(int16(0)) == 2)
-	assert(unsafe.Sizeof(uint32(0)) == 4)
-	assert(unsafe.Sizeof(int32(0)) == 4)
-	assert(unsafe.Sizeof(float32(0)) == 4)
-	assert(unsafe.Sizeof(uint64(0)) == 8)
-	assert(unsafe.Sizeof(int64(0)) == 8)
-	assert(unsafe.Sizeof(float64(0)) == 8)
-	assert(unsafe.Sizeof(complex64(0)) == 8)
-	assert(unsafe.Sizeof(complex128(0)) == 16)
-
-	var y0 S0
-	assert(unsafe.Sizeof(y0.a) == 1)
-	assert(unsafe.Sizeof(y0.b) == 4)
-	assert(unsafe.Sizeof(y0.c) == 8)
-	assert(unsafe.Sizeof(y0.d) == 1)
-	assert(unsafe.Sizeof(y0.e) == 16)
-	assert(unsafe.Sizeof(y0) == 40)
-
-	var y1 S1
-	assert(unsafe.Sizeof(y1) == 72)
-
-	var y2 S2
-	assert(unsafe.Sizeof(y2) == 8)
-
-	var y3 S3
-	assert(unsafe.Sizeof(y3) == 12)
-
-	var y4 S4
-	assert(unsafe.Sizeof(y4) == 16)
-
-	var y5 S5
-	assert(unsafe.Sizeof(y5) == 16)
-
-	var a3 [10]S3
-	assert(unsafe.Sizeof(a3) == 156)
-
-	// test case for issue 5670
-	type T struct {
-		a int32
-		_ int32
-		c int32
-	}
-	assert(unsafe.Sizeof(T{}) == 12)
-
-	var s []byte
-	_ = unsafe.Sizeof(s)
-	_ = unsafe.Sizeof(s... /* ERROR invalid use of \.\.\. */ )
-}
-
-func Sizeof2() {
-	f1 := func() (x int64) { return }
-	f2 := func() (x, y int64) { return }
-	_ = unsafe.Sizeof(f0 /* ERROR used as value */ ())
-	assert(unsafe.Sizeof(f1()) == 8)
-	_ = unsafe.Sizeof(f2()) // ERROR too many arguments
-}
-
-// self-testing only
-func assert1() {
-	var x int
-	assert() /* ERROR not enough arguments */
-	assert(1, 2) /* ERROR too many arguments */
-	assert("foo" /* ERROR boolean constant */ )
-	assert(x /* ERROR boolean constant */)
-	assert(true)
-	assert /* ERROR failed */ (false)
-	_ = assert(true)
-
-	var s []byte
-	assert(s... /* ERROR invalid use of \.\.\. */ )
-}
-
-func assert2() {
-	f1 := func() (x bool) { return }
-	f2 := func() (x bool) { return }
-	assert(f0 /* ERROR used as value */ ())
-	assert(f1 /* ERROR boolean constant */ ())
-	assert(f2 /* ERROR boolean constant */ ())
-}
-
-// self-testing only
-func trace1() {
-	// Uncomment the code below to test trace - will produce console output
-	// _ = trace /* ERROR no value */ ()
-	// _ = trace(1)
-	// _ = trace(true, 1.2, '\'', "foo", 42i, "foo" <= "bar")
-
-	var s []byte
-	trace(s... /* ERROR invalid use of \.\.\. */ )
-}
-
-func trace2() {
-	f1 := func() (x int) { return }
-	f2 := func() (x int, y string) { return }
-	f3 := func() (x int, y string, z []int) { return }
-	_ = f1
-	_ = f2
-	_ = f3
-	// Uncomment the code below to test trace - will produce console output
-	// trace(f0())
-	// trace(f1())
-	// trace(f2())
-	// trace(f3())
-	// trace(f0(), 1)
-	// trace(f1(), 1, 2)
-	// trace(f2(), 1, 2, 3)
-	// trace(f3(), 1, 2, 3, 4)
-}
diff --git a/src/go/types/testdata/const0.src b/src/go/types/testdata/const0.src
deleted file mode 100644
index c4419ab..0000000
--- a/src/go/types/testdata/const0.src
+++ /dev/null
@@ -1,282 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// constant declarations
-
-package const0
-
-// constants declarations must be initialized by constants
-var x = 0
-const c0 = x /* ERROR "not constant" */
-
-// typed constants must have constant types
-const _ interface /* ERROR invalid constant type */ {} = 0
-
-func _ () {
-	const _ interface /* ERROR invalid constant type */ {} = 0
-	for i := 0; i < 10; i++ {} // don't crash with non-nil iota here
-}
-
-// untyped constants
-const (
-	// boolean values
-	ub0 = false
-	ub1 = true
-	ub2 = 2 < 1
-	ub3 = ui1 == uf1
-	ub4 = true /* ERROR "cannot convert" */ == 0
-
-	// integer values
-	ui0 = 0
-	ui1 = 1
-	ui2 = 42
-	ui3 = 3141592653589793238462643383279502884197169399375105820974944592307816406286
-	ui4 = -10
-
-	ui5 = ui0 + ui1
-	ui6 = ui1 - ui1
-	ui7 = ui2 * ui1
-	ui8 = ui3 / ui3
-	ui9 = ui3 % ui3
-
-	ui10 = 1 / 0 /* ERROR "division by zero" */
-	ui11 = ui1 / 0 /* ERROR "division by zero" */
-	ui12 = ui3 / ui0 /* ERROR "division by zero" */
-	ui13 = 1 % 0 /* ERROR "division by zero" */
-	ui14 = ui1 % 0 /* ERROR "division by zero" */
-	ui15 = ui3 % ui0 /* ERROR "division by zero" */
-
-	ui16 = ui2 & ui3
-	ui17 = ui2 | ui3
-	ui18 = ui2 ^ ui3
-	ui19 = 1 /* ERROR "invalid operation" */ % 1.0
-
-	// floating point values
-	uf0 = 0.
-	uf1 = 1.
-	uf2 = 4.2e1
-	uf3 = 3.141592653589793238462643383279502884197169399375105820974944592307816406286
-	uf4 = 1e-1
-
-	uf5 = uf0 + uf1
-	uf6 = uf1 - uf1
-	uf7 = uf2 * uf1
-	uf8 = uf3 / uf3
-	uf9 = uf3 /* ERROR "not defined" */ % uf3
-
-	uf10 = 1 / 0 /* ERROR "division by zero" */
-	uf11 = uf1 / 0 /* ERROR "division by zero" */
-	uf12 = uf3 / uf0 /* ERROR "division by zero" */
-
-	uf16 = uf2 /* ERROR "not defined" */ & uf3
-	uf17 = uf2 /* ERROR "not defined" */ | uf3
-	uf18 = uf2 /* ERROR "not defined" */ ^ uf3
-
-	// complex values
-	uc0 = 0.i
-	uc1 = 1.i
-	uc2 = 4.2e1i
-	uc3 = 3.141592653589793238462643383279502884197169399375105820974944592307816406286i
-	uc4 = 1e-1i
-
-	uc5 = uc0 + uc1
-	uc6 = uc1 - uc1
-	uc7 = uc2 * uc1
-	uc8 = uc3 / uc3
-	uc9 = uc3 /* ERROR "not defined" */ % uc3
-
-	uc10 = 1 / 0 /* ERROR "division by zero" */
-	uc11 = uc1 / 0 /* ERROR "division by zero" */
-	uc12 = uc3 / uc0 /* ERROR "division by zero" */
-
-	uc16 = uc2 /* ERROR "not defined" */ & uc3
-	uc17 = uc2 /* ERROR "not defined" */ | uc3
-	uc18 = uc2 /* ERROR "not defined" */ ^ uc3
-)
-
-type (
-	mybool bool
-	myint int
-	myfloat float64
-	mycomplex complex128
-)
-
-// typed constants
-const (
-	// boolean values
-	tb0 bool = false
-	tb1 bool = true
-	tb2 mybool = 2 < 1
-	tb3 mybool = ti1 /* ERROR "mismatched types" */ == tf1
-
-	// integer values
-	ti0 int8 = ui0
-	ti1 int32 = ui1
-	ti2 int64 = ui2
-	ti3 myint = ui3 /* ERROR "overflows" */
-	ti4 myint = ui4
-
-	ti5 = ti0 /* ERROR "mismatched types" */ + ti1
-	ti6 = ti1 - ti1
-	ti7 = ti2 /* ERROR "mismatched types" */ * ti1
-	ti8 = ti3 / ti3
-	ti9 = ti3 % ti3
-
-	ti10 = 1 / 0 /* ERROR "division by zero" */
-	ti11 = ti1 / 0 /* ERROR "division by zero" */
-	ti12 = ti3 /* ERROR "mismatched types" */ / ti0
-	ti13 = 1 % 0 /* ERROR "division by zero" */
-	ti14 = ti1 % 0 /* ERROR "division by zero" */
-	ti15 = ti3 /* ERROR "mismatched types" */ % ti0
-
-	ti16 = ti2 /* ERROR "mismatched types" */ & ti3
-	ti17 = ti2 /* ERROR "mismatched types" */ | ti4
-	ti18 = ti2 ^ ti5 // no mismatched types error because the type of ti5 is unknown
-
-	// floating point values
-	tf0 float32 = 0.
-	tf1 float32 = 1.
-	tf2 float64 = 4.2e1
-	tf3 myfloat = 3.141592653589793238462643383279502884197169399375105820974944592307816406286
-	tf4 myfloat = 1e-1
-
-	tf5 = tf0 + tf1
-	tf6 = tf1 - tf1
-	tf7 = tf2 /* ERROR "mismatched types" */ * tf1
-	tf8 = tf3 / tf3
-	tf9 = tf3 /* ERROR "not defined" */ % tf3
-
-	tf10 = 1 / 0 /* ERROR "division by zero" */
-	tf11 = tf1 / 0 /* ERROR "division by zero" */
-	tf12 = tf3 /* ERROR "mismatched types" */ / tf0
-
-	tf16 = tf2 /* ERROR "mismatched types" */ & tf3
-	tf17 = tf2 /* ERROR "mismatched types" */ | tf3
-	tf18 = tf2 /* ERROR "mismatched types" */ ^ tf3
-
-	// complex values
-	tc0 = 0.i
-	tc1 = 1.i
-	tc2 = 4.2e1i
-	tc3 = 3.141592653589793238462643383279502884197169399375105820974944592307816406286i
-	tc4 = 1e-1i
-
-	tc5 = tc0 + tc1
-	tc6 = tc1 - tc1
-	tc7 = tc2 * tc1
-	tc8 = tc3 / tc3
-	tc9 = tc3 /* ERROR "not defined" */ % tc3
-
-	tc10 = 1 / 0 /* ERROR "division by zero" */
-	tc11 = tc1 / 0 /* ERROR "division by zero" */
-	tc12 = tc3 / tc0 /* ERROR "division by zero" */
-
-	tc16 = tc2 /* ERROR "not defined" */ & tc3
-	tc17 = tc2 /* ERROR "not defined" */ | tc3
-	tc18 = tc2 /* ERROR "not defined" */ ^ tc3
-)
-
-// initialization cycles
-const (
-	a /* ERROR "initialization cycle" */ = a
-	b /* ERROR "initialization cycle" */ , c /* ERROR "initialization cycle" */, d, e = e, d, c, b // TODO(gri) should only have one cycle error
-	f float64 = d
-)
-
-// multiple initialization
-const (
-	a1, a2, a3 = 7, 3.1415926, "foo"
-	b1, b2, b3 = b3, b1, 42
-	c1, c2, c3  /* ERROR "missing init expr for c3" */ = 1, 2
-	d1, d2, d3 = 1, 2, 3, 4 /* ERROR "extra init expr 4" */
-	_p0 = assert(a1 == 7)
-	_p1 = assert(a2 == 3.1415926)
-	_p2 = assert(a3 == "foo")
-	_p3 = assert(b1 == 42)
-	_p4 = assert(b2 == 42)
-	_p5 = assert(b3 == 42)
-)
-
-func _() {
-	const (
-		a1, a2, a3 = 7, 3.1415926, "foo"
-		b1, b2, b3 = b3, b1, 42
-		c1, c2, c3  /* ERROR "missing init expr for c3" */ = 1, 2
-		d1, d2, d3 = 1, 2, 3, 4 /* ERROR "extra init expr 4" */
-		_p0 = assert(a1 == 7)
-		_p1 = assert(a2 == 3.1415926)
-		_p2 = assert(a3 == "foo")
-		_p3 = assert(b1 == 42)
-		_p4 = assert(b2 == 42)
-		_p5 = assert(b3 == 42)
-	)
-}
-
-// iota
-const (
-	iota0 = iota
-	iota1 = iota
-	iota2 = iota*2
-	_a0 = assert(iota0 == 0)
-	_a1 = assert(iota1 == 1)
-	_a2 = assert(iota2 == 4)
-	iota6 = iota*3
-
-	iota7
-	iota8
-	_a3 = assert(iota7 == 21)
-	_a4 = assert(iota8 == 24)
-)
-
-const (
-	_b0 = iota
-	_b1 = assert(iota + iota2 == 5)
-	_b2 = len([iota]int{}) // iota may appear in a type!
-	_b3 = assert(_b2 == 2)
-	_b4 = len(A{})
-)
-
-type A [iota /* ERROR "cannot use iota" */ ]int
-
-// constant expressions with operands accross different
-// constant declarations must use the right iota values
-const (
-	_c0 = iota
-	_c1
-	_c2
-	_x = _c2 + _d1 + _e0 // 3
-)
-
-const (
-	_d0 = iota
-	_d1
-)
-
-const (
-	_e0 = iota
-)
-
-var _ = assert(_x == 3)
-
-// special cases
-const (
-	_n0 = nil /* ERROR "not constant" */
-	_n1 = [ /* ERROR "not constant" */ ]int{}
-)
-
-// iotas must not be usable in expressions outside constant declarations
-type _ [iota /* ERROR "iota outside constant decl" */ ]byte
-var _ = iota /* ERROR "iota outside constant decl" */
-func _() {
-	_ = iota /* ERROR "iota outside constant decl" */
-	const _ = iota
-	_ = iota /* ERROR "iota outside constant decl" */
-}
-
-func _() {
-	iota := 123
-	const x = iota /* ERROR "is not constant" */
-	var y = iota
-	_ = y
-}
diff --git a/src/go/types/testdata/const1.src b/src/go/types/testdata/const1.src
deleted file mode 100644
index 88e9fad..0000000
--- a/src/go/types/testdata/const1.src
+++ /dev/null
@@ -1,314 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// constant conversions
-
-package const1
-
-const(
-	mi = ^int(0)
-	mu = ^uint(0)
-	mp = ^uintptr(0)
-
-	logSizeofInt     = uint(mi>>8&1 + mi>>16&1 + mi>>32&1)
-	logSizeofUint    = uint(mu>>8&1 + mu>>16&1 + mu>>32&1)
-	logSizeofUintptr = uint(mp>>8&1 + mp>>16&1 + mp>>32&1)
-)
-
-const (
-	minInt8 = -1<<(8<<iota - 1)
-	minInt16
-	minInt32
-	minInt64
-	minInt = -1<<(8<<logSizeofInt - 1)
-)
-
-const (
-	maxInt8 = 1<<(8<<iota - 1) - 1
-	maxInt16
-	maxInt32
-	maxInt64
-	maxInt = 1<<(8<<logSizeofInt - 1) - 1
-)
-
-const (
-	maxUint8 = 1<<(8<<iota) - 1
-	maxUint16
-	maxUint32
-	maxUint64
-	maxUint    = 1<<(8<<logSizeofUint) - 1
-	maxUintptr = 1<<(8<<logSizeofUintptr) - 1
-)
-
-const (
-	smallestFloat32 = 1.0 / (1<<(127 - 1 + 23))
-	smallestFloat64 = 1.0 / (1<<(1023 - 1 + 52))
-)
-
-const (
-	_ = assert(smallestFloat32 > 0)
-	_ = assert(smallestFloat64 > 0)
-)
-
-const (
-	maxFloat32 = 1<<127 * (1<<24 - 1) / (1.0<<23)
-	maxFloat64 = 1<<1023 * (1<<53 - 1) / (1.0<<52)
-)
-
-const (
-	_ int8 = minInt8 /* ERROR "overflows" */ - 1
-	_ int8 = minInt8
-	_ int8 = maxInt8
-	_ int8 = maxInt8 /* ERROR "overflows" */ + 1
-	_ int8 = smallestFloat64 /* ERROR "truncated" */
-
-	_ = int8(minInt8 /* ERROR "cannot convert" */ - 1)
-	_ = int8(minInt8)
-	_ = int8(maxInt8)
-	_ = int8(maxInt8 /* ERROR "cannot convert" */ + 1)
-	_ = int8(smallestFloat64 /* ERROR "cannot convert" */)
-)
-
-const (
-	_ int16 = minInt16 /* ERROR "overflows" */ - 1
-	_ int16 = minInt16
-	_ int16 = maxInt16
-	_ int16 = maxInt16 /* ERROR "overflows" */ + 1
-	_ int16 = smallestFloat64 /* ERROR "truncated" */
-
-	_ = int16(minInt16 /* ERROR "cannot convert" */ - 1)
-	_ = int16(minInt16)
-	_ = int16(maxInt16)
-	_ = int16(maxInt16 /* ERROR "cannot convert" */ + 1)
-	_ = int16(smallestFloat64 /* ERROR "cannot convert" */)
-)
-
-const (
-	_ int32 = minInt32 /* ERROR "overflows" */ - 1
-	_ int32 = minInt32
-	_ int32 = maxInt32
-	_ int32 = maxInt32 /* ERROR "overflows" */ + 1
-	_ int32 = smallestFloat64 /* ERROR "truncated" */
-
-	_ = int32(minInt32 /* ERROR "cannot convert" */ - 1)
-	_ = int32(minInt32)
-	_ = int32(maxInt32)
-	_ = int32(maxInt32 /* ERROR "cannot convert" */ + 1)
-	_ = int32(smallestFloat64 /* ERROR "cannot convert" */)
-)
-
-const (
-	_ int64 = minInt64 /* ERROR "overflows" */ - 1
-	_ int64 = minInt64
-	_ int64 = maxInt64
-	_ int64 = maxInt64 /* ERROR "overflows" */ + 1
-	_ int64 = smallestFloat64 /* ERROR "truncated" */
-
-	_ = int64(minInt64 /* ERROR "cannot convert" */ - 1)
-	_ = int64(minInt64)
-	_ = int64(maxInt64)
-	_ = int64(maxInt64 /* ERROR "cannot convert" */ + 1)
-	_ = int64(smallestFloat64 /* ERROR "cannot convert" */)
-)
-
-const (
-	_ int = minInt /* ERROR "overflows" */ - 1
-	_ int = minInt
-	_ int = maxInt
-	_ int = maxInt /* ERROR "overflows" */ + 1
-	_ int = smallestFloat64 /* ERROR "truncated" */
-
-	_ = int(minInt /* ERROR "cannot convert" */ - 1)
-	_ = int(minInt)
-	_ = int(maxInt)
-	_ = int(maxInt /* ERROR "cannot convert" */ + 1)
-	_ = int(smallestFloat64 /* ERROR "cannot convert" */)
-)
-
-const (
-	_ uint8 = 0 /* ERROR "overflows" */ - 1
-	_ uint8 = 0
-	_ uint8 = maxUint8
-	_ uint8 = maxUint8 /* ERROR "overflows" */ + 1
-	_ uint8 = smallestFloat64 /* ERROR "truncated" */
-
-	_ = uint8(0 /* ERROR "cannot convert" */ - 1)
-	_ = uint8(0)
-	_ = uint8(maxUint8)
-	_ = uint8(maxUint8 /* ERROR "cannot convert" */ + 1)
-	_ = uint8(smallestFloat64 /* ERROR "cannot convert" */)
-)
-
-const (
-	_ uint16 = 0 /* ERROR "overflows" */ - 1
-	_ uint16 = 0
-	_ uint16 = maxUint16
-	_ uint16 = maxUint16 /* ERROR "overflows" */ + 1
-	_ uint16 = smallestFloat64 /* ERROR "truncated" */
-
-	_ = uint16(0 /* ERROR "cannot convert" */ - 1)
-	_ = uint16(0)
-	_ = uint16(maxUint16)
-	_ = uint16(maxUint16 /* ERROR "cannot convert" */ + 1)
-	_ = uint16(smallestFloat64 /* ERROR "cannot convert" */)
-)
-
-const (
-	_ uint32 = 0 /* ERROR "overflows" */ - 1
-	_ uint32 = 0
-	_ uint32 = maxUint32
-	_ uint32 = maxUint32 /* ERROR "overflows" */ + 1
-	_ uint32 = smallestFloat64 /* ERROR "truncated" */
-
-	_ = uint32(0 /* ERROR "cannot convert" */ - 1)
-	_ = uint32(0)
-	_ = uint32(maxUint32)
-	_ = uint32(maxUint32 /* ERROR "cannot convert" */ + 1)
-	_ = uint32(smallestFloat64 /* ERROR "cannot convert" */)
-)
-
-const (
-	_ uint64 = 0 /* ERROR "overflows" */ - 1
-	_ uint64 = 0
-	_ uint64 = maxUint64
-	_ uint64 = maxUint64 /* ERROR "overflows" */ + 1
-	_ uint64 = smallestFloat64 /* ERROR "truncated" */
-
-	_ = uint64(0 /* ERROR "cannot convert" */ - 1)
-	_ = uint64(0)
-	_ = uint64(maxUint64)
-	_ = uint64(maxUint64 /* ERROR "cannot convert" */ + 1)
-	_ = uint64(smallestFloat64 /* ERROR "cannot convert" */)
-)
-
-const (
-	_ uint = 0 /* ERROR "overflows" */ - 1
-	_ uint = 0
-	_ uint = maxUint
-	_ uint = maxUint /* ERROR "overflows" */ + 1
-	_ uint = smallestFloat64 /* ERROR "truncated" */
-
-	_ = uint(0 /* ERROR "cannot convert" */ - 1)
-	_ = uint(0)
-	_ = uint(maxUint)
-	_ = uint(maxUint /* ERROR "cannot convert" */ + 1)
-	_ = uint(smallestFloat64 /* ERROR "cannot convert" */)
-)
-
-const (
-	_ uintptr = 0 /* ERROR "overflows" */ - 1
-	_ uintptr = 0
-	_ uintptr = maxUintptr
-	_ uintptr = maxUintptr /* ERROR "overflows" */ + 1
-	_ uintptr = smallestFloat64 /* ERROR "truncated" */
-
-	_ = uintptr(0 /* ERROR "cannot convert" */ - 1)
-	_ = uintptr(0)
-	_ = uintptr(maxUintptr)
-	_ = uintptr(maxUintptr /* ERROR "cannot convert" */ + 1)
-	_ = uintptr(smallestFloat64 /* ERROR "cannot convert" */)
-)
-
-const (
-	_ float32 = minInt64
-	_ float64 = minInt64
-	_ complex64 = minInt64
-	_ complex128 = minInt64
-
-	_ = float32(minInt64)
-	_ = float64(minInt64)
-	_ = complex64(minInt64)
-	_ = complex128(minInt64)
-)
-
-const (
-	_ float32 = maxUint64
-	_ float64 = maxUint64
-	_ complex64 = maxUint64
-	_ complex128 = maxUint64
-
-	_ = float32(maxUint64)
-	_ = float64(maxUint64)
-	_ = complex64(maxUint64)
-	_ = complex128(maxUint64)
-)
-
-// TODO(gri) find smaller deltas below
-
-const delta32 = maxFloat32/(1 << 23)
-
-const (
-	_ float32 = - /* ERROR "overflow" */ (maxFloat32 + delta32)
-	_ float32 = -maxFloat32
-	_ float32 = maxFloat32
-	_ float32 = maxFloat32 /* ERROR "overflow" */ + delta32
-
-	_ = float32(- /* ERROR "cannot convert" */ (maxFloat32 + delta32))
-	_ = float32(-maxFloat32)
-	_ = float32(maxFloat32)
-	_ = float32(maxFloat32 /* ERROR "cannot convert" */ + delta32)
-
-	_ = assert(float32(smallestFloat32) == smallestFloat32)
-	_ = assert(float32(smallestFloat32/2) == 0)
-	_ = assert(float32(smallestFloat64) == 0)
-	_ = assert(float32(smallestFloat64/2) == 0)
-)
-
-const delta64 = maxFloat64/(1 << 52)
-
-const (
-	_ float64 = - /* ERROR "overflow" */ (maxFloat64 + delta64)
-	_ float64 = -maxFloat64
-	_ float64 = maxFloat64
-	_ float64 = maxFloat64 /* ERROR "overflow" */ + delta64
-
-	_ = float64(- /* ERROR "cannot convert" */ (maxFloat64 + delta64))
-	_ = float64(-maxFloat64)
-	_ = float64(maxFloat64)
-	_ = float64(maxFloat64 /* ERROR "cannot convert" */ + delta64)
-
-	_ = assert(float64(smallestFloat32) == smallestFloat32)
-	_ = assert(float64(smallestFloat32/2) == smallestFloat32/2)
-	_ = assert(float64(smallestFloat64) == smallestFloat64)
-	_ = assert(float64(smallestFloat64/2) == 0)
-)
-
-const (
-	_ complex64 = - /* ERROR "overflow" */ (maxFloat32 + delta32)
-	_ complex64 = -maxFloat32
-	_ complex64 = maxFloat32
-	_ complex64 = maxFloat32 /* ERROR "overflow" */ + delta32
-
-	_ = complex64(- /* ERROR "cannot convert" */ (maxFloat32 + delta32))
-	_ = complex64(-maxFloat32)
-	_ = complex64(maxFloat32)
-	_ = complex64(maxFloat32 /* ERROR "cannot convert" */ + delta32)
-)
-
-const (
-	_ complex128 = - /* ERROR "overflow" */ (maxFloat64 + delta64)
-	_ complex128 = -maxFloat64
-	_ complex128 = maxFloat64
-	_ complex128 = maxFloat64 /* ERROR "overflow" */ + delta64
-
-	_ = complex128(- /* ERROR "cannot convert" */ (maxFloat64 + delta64))
-	_ = complex128(-maxFloat64)
-	_ = complex128(maxFloat64)
-	_ = complex128(maxFloat64 /* ERROR "cannot convert" */ + delta64)
-)
-
-// Initialization of typed constant and conversion are the same:
-const (
-	f32 = 1 + smallestFloat32
-	x32 float32 = f32
-	y32 = float32(f32)
-	_ = assert(x32 - y32 == 0)
-)
-
-const (
-	f64 = 1 + smallestFloat64
-	x64 float64 = f64
-	y64 = float64(f64)
-	_ = assert(x64 - y64 == 0)
-)
diff --git a/src/go/types/testdata/constdecl.src b/src/go/types/testdata/constdecl.src
deleted file mode 100644
index 6de9b13..0000000
--- a/src/go/types/testdata/constdecl.src
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package constdecl
-
-import "math"
-
-var v int
-
-// Const decls must be initialized by constants.
-const _ = v /* ERROR "not constant" */
-const _ = math /* ERROR "not constant" */ .Sin(0)
-const _ = int /* ERROR "not an expression" */
-
-func _() {
-	const _ = v /* ERROR "not constant" */
-	const _ = math /* ERROR "not constant" */ .Sin(0)
-	const _ = int /* ERROR "not an expression" */
-}
-
-// Identifier and expression arity must match.
-// The first error message is produced by the parser.
-// In a real-world scenario, the type-checker would not be run
-// in this case and the 2nd error message would not appear.
-const _ /* ERROR "missing constant value" */ /* ERROR "missing init expr for _" */
-const _ = 1, 2 /* ERROR "extra init expr 2" */
-
-const _ /* ERROR "missing constant value" */ /* ERROR "missing init expr for _" */ int
-const _ int = 1, 2 /* ERROR "extra init expr 2" */
-
-const (
-	_ /* ERROR "missing constant value" */ /* ERROR "missing init expr for _" */
-	_ = 1, 2 /* ERROR "extra init expr 2" */
-
-	_ /* ERROR "missing constant value" */ /* ERROR "missing init expr for _" */ int
-	_ int = 1, 2 /* ERROR "extra init expr 2" */
-)
-
-const (
-	_ = 1
-	_
-	_, _ /* ERROR "missing init expr for _" */
-	_
-)
-
-const (
-	_, _ = 1, 2
-	_, _
-	_ /* ERROR "extra init expr at" */
-	_, _
-	_, _, _ /* ERROR "missing init expr for _" */
-	_, _
-)
-
-func _() {
-	const _ /* ERROR "missing constant value" */ /* ERROR "missing init expr for _" */
-	const _ = 1, 2 /* ERROR "extra init expr 2" */
-
-	const _ /* ERROR "missing constant value" */ /* ERROR "missing init expr for _" */ int
-	const _ int = 1, 2 /* ERROR "extra init expr 2" */
-
-	const (
-		_ /* ERROR "missing constant value" */ /* ERROR "missing init expr for _" */
-		_ = 1, 2 /* ERROR "extra init expr 2" */
-
-		_ /* ERROR "missing constant value" */ /* ERROR "missing init expr for _" */ int
-		_ int = 1, 2 /* ERROR "extra init expr 2" */
-	)
-
-	const (
-		_ = 1
-		_
-		_, _ /* ERROR "missing init expr for _" */
-		_
-	)
-
-	const (
-		_, _ = 1, 2
-		_, _
-		_ /* ERROR "extra init expr at" */
-		_, _
-		_, _, _ /* ERROR "missing init expr for _" */
-		_, _
-	)
-}
-
-// Test case for constant with invalid initialization.
-// Caused panic because the constant value was not set up (gri - 7/8/2014).
-func _() {
-	const (
-	    x string = missing /* ERROR "undeclared name" */
-	    y = x + ""
-	)
-}
-
-// TODO(gri) move extra tests from testdata/const0.src into here
diff --git a/src/go/types/testdata/conversions.src b/src/go/types/testdata/conversions.src
deleted file mode 100644
index e1336c0..0000000
--- a/src/go/types/testdata/conversions.src
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// conversions
-
-package conversions
-
-import "unsafe"
-
-// argument count
-var (
-	_ = int() /* ERROR "missing argument" */
-	_ = int(1, 2 /* ERROR "too many arguments" */ )
-)
-
-// numeric constant conversions are in const1.src.
-
-func string_conversions() {
-	const A = string(65)
-	assert(A == "A")
-	const E = string(-1)
-	assert(E == "\uFFFD")
-	assert(E == string(1234567890))
-
-	type myint int
-	assert(A == string(myint(65)))
-
-	type mystring string
-	const _ mystring = mystring("foo")
-
-	const _ = string(true /* ERROR "cannot convert" */ )
-	const _ = string(1.2 /* ERROR "cannot convert" */ )
-	const _ = string(nil /* ERROR "cannot convert" */ )
-
-	// issues 11357, 11353: argument must be of integer type
-	_ = string(0.0 /* ERROR "cannot convert" */ )
-	_ = string(0i /* ERROR "cannot convert" */ )
-	_ = string(1 /* ERROR "cannot convert" */ + 2i)
-}
-
-func interface_conversions() {
-	type E interface{}
-
-	type I1 interface{
-		m1()
-	}
-
-	type I2 interface{
-		m1()
-		m2(x int)
-	}
-
-	type I3 interface{
-		m1()
-		m2() int
-	}
-
-	var e E
-	var i1 I1
-	var i2 I2
-	var i3 I3
-
-	_ = E(0)
-	_ = E(nil)
-	_ = E(e)
-	_ = E(i1)
-	_ = E(i2)
-
-	_ = I1(0 /* ERROR "cannot convert" */ )
-	_ = I1(nil)
-	_ = I1(i1)
-	_ = I1(e /* ERROR "cannot convert" */ )
-	_ = I1(i2)
-
-	_ = I2(nil)
-	_ = I2(i1 /* ERROR "cannot convert" */ )
-	_ = I2(i2)
-	_ = I2(i3 /* ERROR "cannot convert" */ )
-
-	_ = I3(nil)
-	_ = I3(i1 /* ERROR "cannot convert" */ )
-	_ = I3(i2 /* ERROR "cannot convert" */ )
-	_ = I3(i3)
-
-	// TODO(gri) add more tests, improve error message
-}
-
-func issue6326() {
-	type T unsafe.Pointer
-	var x T
-	_ = uintptr(x) // see issue 6326
-}
diff --git a/src/go/types/testdata/cycles.src b/src/go/types/testdata/cycles.src
deleted file mode 100644
index 621d83c..0000000
--- a/src/go/types/testdata/cycles.src
+++ /dev/null
@@ -1,143 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package cycles
-
-type (
-	T0 int
-	T1 /* ERROR cycle */ T1
-	T2 *T2
-
-	T3 /* ERROR cycle */ T4
-	T4 T5
-	T5 T3
-
-	T6 T7
-	T7 *T8
-	T8 T6
-
-	// arrays
-	A0 /* ERROR cycle */ [10]A0
-	A1 [10]*A1
-
-	A2 /* ERROR cycle */ [10]A3
-	A3 [10]A4
-	A4 A2
-
-	A5 [10]A6
-	A6 *A5
-
-	// slices
-	L0 []L0
-
-	// structs
-	S0 /* ERROR cycle */ struct{ _ S0 }
-	S1 /* ERROR cycle */ struct{ S1 }
-	S2 struct{ _ *S2 }
-	S3 struct{ *S3 }
-
-	S4 /* ERROR cycle */ struct{ S5 }
-	S5 struct{ S6 }
-	S6 S4
-
-	// pointers
-	P0 *P0
-
-	// functions
-	F0 func(F0)
-	F1 func() F1
-	F2 func(F2) F2
-
-	// interfaces
-	I0 /* ERROR cycle */ interface{ I0 }
-
-	I1 interface{ I2 }
-	I2 interface{ I3 }
-	I3 /* ERROR cycle */ interface{ I1 }
-
-	I4 interface{ f(I4) }
-
-	// testcase for issue 5090
-	I5 interface{ f(I6) }
-	I6 interface{ I5 }
-
-	// maps
-	M0 map[M0 /* ERROR invalid map key */ ]M0
-
-	// channels
-	C0 chan C0
-)
-
-func _() {
-	type (
-		t1 /* ERROR cycle */ t1
-		t2 *t2
-
-		t3 t4 /* ERROR undeclared */
-		t4 t5 /* ERROR undeclared */
-		t5 t3
-
-		// arrays
-		a0 /* ERROR cycle */ [10]a0
-		a1 [10]*a1
-
-		// slices
-		l0 []l0
-
-		// structs
-		s0 /* ERROR cycle */ struct{ _ s0 }
-		s1 /* ERROR cycle */ struct{ s1 }
-		s2 struct{ _ *s2 }
-		s3 struct{ *s3 }
-
-		// pointers
-		p0 *p0
-
-		// functions
-		f0 func(f0)
-		f1 func() f1
-		f2 func(f2) f2
-
-		// interfaces
-		i0 /* ERROR cycle */ interface{ i0 }
-
-		// maps
-		m0 map[m0 /* ERROR invalid map key */ ]m0
-
-		// channels
-		c0 chan c0
-	)
-}
-
-// test cases for issue 6667
-
-type A [10]map[A /* ERROR invalid map key */ ]bool
-
-type S struct {
-	m map[S /* ERROR invalid map key */ ]bool
-}
-
-// test cases for issue 7236
-// (cycle detection must not be dependent on starting point of resolution)
-
-type (
-	P1 *T9
-	T9 /* ERROR cycle */ T9
-
-	T10 /* ERROR cycle */ T10
-	P2 *T10
-)
-
-func (T11) m() {}
-
-type T11 /* ERROR cycle */ struct{ T11 }
-
-type T12 /* ERROR cycle */ struct{ T12 }
-
-func (*T12) m() {}
-
-type (
-	P3 *T13
-	T13 /* ERROR cycle */ T13
-)
\ No newline at end of file
diff --git a/src/go/types/testdata/cycles1.src b/src/go/types/testdata/cycles1.src
deleted file mode 100644
index ae2b38e..0000000
--- a/src/go/types/testdata/cycles1.src
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package p
-
-type (
-	A interface {
-		a() interface {
-			ABC1
-		}
-	}
-	B interface {
-		b() interface {
-			ABC2
-		}
-	}
-	C interface {
-		c() interface {
-			ABC3
-		}
-	}
-
-	AB interface {
-		A
-		B
-	}
-	BC interface {
-		B
-		C
-	}
-
-	ABC1 interface {
-		A
-		B
-		C
-	}
-	ABC2 interface {
-		AB
-		C
-	}
-	ABC3 interface {
-		A
-		BC
-	}
-)
-
-var (
-	x1 ABC1
-	x2 ABC2
-	x3 ABC3
-)
-
-func _() {
-	// all types have the same method set
-	x1 = x2
-	x2 = x1
-
-	x1 = x3
-	x3 = x1
-
-	x2 = x3
-	x3 = x2
-
-	// all methods return the same type again
-	x1 = x1.a()
-	x1 = x1.b()
-	x1 = x1.c()
-
-	x2 = x2.a()
-	x2 = x2.b()
-	x2 = x2.c()
-
-	x3 = x3.a()
-	x3 = x3.b()
-	x3 = x3.c()
-}
diff --git a/src/go/types/testdata/cycles2.src b/src/go/types/testdata/cycles2.src
deleted file mode 100644
index 345ab56..0000000
--- a/src/go/types/testdata/cycles2.src
+++ /dev/null
@@ -1,118 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package p
-
-import "unsafe"
-
-// Test case for issue 5090
-
-type t interface {
-	f(u)
-}
-
-type u interface {
-	t
-}
-
-func _() {
-	var t t
-	var u u
-
-	t.f(t)
-	t.f(u)
-	
-	u.f(t)
-	u.f(u)
-}
-
-
-// Test case for issue 6589.
-
-type A interface {
-	a() interface {
-		AB
-	}
-}
-
-type B interface {
-	a() interface {
-		AB
-	}
-}
-
-type AB interface {
-	a() interface {
-		A
-		B /* ERROR a redeclared */
-	}
-	b() interface {
-		A
-		B /* ERROR a redeclared */
-	}
-}
-
-var x AB
-var y interface {
-	A
-	B /* ERROR a redeclared */
-}
-var _ = x /* ERROR cannot compare */ == y
-
-
-// Test case for issue 6638.
-
-type T interface {
-	m() [T /* ERROR no value */ (nil).m()[0]]int
-}
-
-// Variations of this test case.
-
-type T1 interface {
-	m() [x1 /* ERROR no value */ .m()[0]]int
-}
-
-var x1 T1
-
-type T2 interface {
-	m() [len(x2 /* ERROR no value */ .m())]int
-}
-
-var x2 T2
-
-type T3 interface {
-	m() [unsafe.Sizeof(x3.m)]int
-}
-
-var x3 T3
-
-// The test case below should also report an error for
-// the cast inside the T4 interface (like it does for the
-// variable initialization). The reason why it does not is
-// that inside T4, the method x4.m depends on T4 which is not
-// fully set up yet. The x4.m method happens to have an empty
-// signature which is why the cast is permitted.
-// TODO(gri) Consider marking methods as incomplete and provide
-// a better error message in that case.
-
-type T4 interface {
-	m() [unsafe.Sizeof(cast4(x4.m))]int
-}
-
-var x4 T4
-var _ = cast4(x4 /* ERROR cannot convert */.m)
-
-type cast4 func()
-
-// This test is symmetric to the T4 case: Here the cast is
-// "correct", but it doesn't work inside the T5 interface.
-
-type T5 interface {
-	m() [unsafe.Sizeof(cast5(x5 /* ERROR cannot convert */ .m))]int
-}
-
-var x5 T5
-var _ = cast5(x5.m)
-
-type cast5 func() [0]int
diff --git a/src/go/types/testdata/cycles3.src b/src/go/types/testdata/cycles3.src
deleted file mode 100644
index 3da4fb5..0000000
--- a/src/go/types/testdata/cycles3.src
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package p
-
-import "unsafe"
-
-var (
-	_ A = A(nil).a().b().c().d().e().f()
-	_ A = A(nil).b().c().d().e().f()
-	_ A = A(nil).c().d().e().f()
-	_ A = A(nil).d().e().f()
-	_ A = A(nil).e().f()
-	_ A = A(nil).f()
-	_ A = A(nil)
-)
-
-type (
-	A interface {
-		a() B
-		B
-	}
-
-	B interface {
-		b() C
-		C
-	}
-
-	C interface {
-		c() D
-		D
-	}
-
-	D interface {
-		d() E
-		E
-	}
-
-	E interface {
-		e() F
-		F
-	}
-
-	F interface {
-		f() A
-	}
-)
-
-type (
-	U interface {
-		V
-	}
-
-	V interface {
-		v() [unsafe.Sizeof(u)]int
-	}
-)
-
-var u U
diff --git a/src/go/types/testdata/cycles4.src b/src/go/types/testdata/cycles4.src
deleted file mode 100644
index 445babc..0000000
--- a/src/go/types/testdata/cycles4.src
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package p
-
-// Check that all methods of T are collected before
-// determining the result type of m (which embeds
-// all methods of T).
-
-type T interface {
-	m() interface {T}
-	E
-}
-
-var _ = T.m(nil).m().e()
-
-type E interface {
-	e() int
-}
-
-// Check that unresolved forward chains are followed
-// (see also comment in resolver.go, checker.typeDecl).
-
-var _ = C.m(nil).m().e()
-
-type A B
-
-type B interface {
-	m() interface{C}
-	E
-}
-
-type C A
-
-// Check that interface type comparison for identity
-// does not recur endlessly.
-
-type T1 interface {
-	m() interface{T1}
-}
-
-type T2 interface {
-	m() interface{T2}
-}
-
-func _(x T1, y T2) {
-	// Checking for assignability of interfaces must check
-	// if all methods of x are present in y, and that they
-	// have identical signatures. The signatures recur via
-	// the result type, which is an interface that embeds
-	// a single method m that refers to the very interface
-	// that contains it. This requires cycle detection in
-	// identity checks for interface types.
-	x = y
-}
-
-type T3 interface {
-	m() interface{T4}
-}
-
-type T4 interface {
-	m() interface{T3}
-}
-
-func _(x T1, y T3) {
-	x = y
-}
-
-// Check that interfaces are type-checked in order of
-// (embedded interface) dependencies (was issue 7158).
-
-var x1 T5 = T7(nil)
-
-type T5 interface {
-	T6
-}
-
-type T6 interface {
-	m() T7
-}
-type T7 interface {
-	T5
-}
-
-// Actual test case from issue 7158.
-
-func wrapNode() Node {
-	return wrapElement()
-}
-
-func wrapElement() Element {
-	return nil
-}
-
-type EventTarget interface {
-	AddEventListener(Event)
-}
-
-type Node interface {
-	EventTarget
-}
-
-type Element interface {
-	Node
-}
-
-type Event interface {
-	Target() Element
-}
diff --git a/src/go/types/testdata/decls0.src b/src/go/types/testdata/decls0.src
deleted file mode 100644
index 21baafe..0000000
--- a/src/go/types/testdata/decls0.src
+++ /dev/null
@@ -1,207 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// type declarations
-
-package decls0
-
-import "unsafe"
-
-const pi = 3.1415
-
-type (
-	N undeclared /* ERROR "undeclared" */
-	B bool
-	I int32
-	A [10]P
-	T struct {
-		x, y P
-	}
-	P *T
-	R (*R)
-	F func(A) I
-	Y interface {
-		f(A) I
-	}
-	S [](((P)))
-	M map[I]F
-	C chan<- I
-
-	// blank types must be typechecked
-	_ pi /* ERROR "not a type" */
-	_ struct{}
-	_ struct{ pi /* ERROR "not a type" */ }
-)
-
-
-// declarations of init
-const _, init /* ERROR "cannot declare init" */ , _ = 0, 1, 2
-type init /* ERROR "cannot declare init" */ struct{}
-var _, init /* ERROR "cannot declare init" */ int
-
-func init() {}
-func init /* ERROR "missing function body" */ ()
-
-func _() { const init = 0 }
-func _() { type init int }
-func _() { var init int; _ = init }
-
-// invalid array types
-type (
-	iA0 [... /* ERROR "invalid use of '...'" */ ]byte
-	iA1 [1 /* ERROR "invalid array length" */ <<100]int
-	iA2 [- /* ERROR "invalid array length" */ 1]complex128
-	iA3 ["foo" /* ERROR "must be integer" */ ]string
-	iA4 [float64 /* ERROR "must be integer" */ (0)]int
-)
-
-
-type (
-	p1 pi /* ERROR "no field or method foo" */ .foo
-	p2 unsafe.Pointer
-)
-
-
-type (
-	Pi pi /* ERROR "not a type" */
-
-	a /* ERROR "illegal cycle" */ a
-	a /* ERROR "redeclared" */ int
-
-	// where the cycle error appears depends on the
-	// order in which declarations are processed
-	// (which depends on the order in which a map
-	// is iterated through)
-	b /* ERROR "illegal cycle" */ c
-	c d
-	d e
-	e b
-
-	t *t
-
-	U V
-	V *W
-	W U
-
-	P1 *S2
-	P2 P1
-
-	S0 struct {
-	}
-	S1 struct {
-		a, b, c int
-		u, v, a /* ERROR "redeclared" */ float32
-	}
-	S2 struct {
-		S0 // anonymous field
-		S0 /* ERROR "redeclared" */ int
-	}
-	S3 struct {
-		x S2
-	}
-	S4/* ERROR "illegal cycle" */ struct {
-		S4
-	}
-	S5 /* ERROR "illegal cycle" */ struct {
-		S6
-	}
-	S6 struct {
-		field S7
-	}
-	S7 struct {
-		S5
-	}
-
-	L1 []L1
-	L2 []int
-
-	A1 [10.0]int
-	A2 /* ERROR "illegal cycle" */ [10]A2
-	A3 /* ERROR "illegal cycle" */ [10]struct {
-		x A4
-	}
-	A4 [10]A3
-
-	F1 func()
-	F2 func(x, y, z float32)
-	F3 func(x, y, x /* ERROR "redeclared" */ float32)
-	F4 func() (x, y, x /* ERROR "redeclared" */ float32)
-	F5 func(x int) (x /* ERROR "redeclared" */ float32)
-	F6 func(x ...int)
-
-	I1 interface{}
-	I2 interface {
-		m1()
-	}
-	I3 interface {
-		m1()
-		m1 /* ERROR "redeclared" */ ()
-	}
-	I4 interface {
-		m1(x, y, x /* ERROR "redeclared" */ float32)
-		m2() (x, y, x /* ERROR "redeclared" */ float32)
-		m3(x int) (x /* ERROR "redeclared" */ float32)
-	}
-	I5 interface {
-		m1(I5)
-	}
-	I6 interface {
-		S0 /* ERROR "not an interface" */
-	}
-	I7 interface {
-		I1
-		I1
-	}
-	I8 /* ERROR "illegal cycle" */ interface {
-		I8
-	}
-	I9 interface {
-		I10
-	}
-	I10 interface {
-		I11
-	}
-	I11 /* ERROR "illegal cycle" */ interface {
-		I9
-	}
-
-	C1 chan int
-	C2 <-chan int
-	C3 chan<- C3
-	C4 chan C5
-	C5 chan C6
-	C6 chan C4
-
-	M1 map[Last]string
-	M2 map[string]M2
-
-	Last int
-)
-
-// cycles in function/method declarations
-// (test cases for issue 5217 and variants)
-func f1(x f1 /* ERROR "not a type" */ ) {}
-func f2(x *f2 /* ERROR "not a type" */ ) {}
-func f3() (x f3 /* ERROR "not a type" */ ) { return }
-func f4() (x *f4 /* ERROR "not a type" */ ) { return }
-
-func (S0) m1(x S0 /* ERROR "field or method" */ .m1) {}
-func (S0) m2(x *S0 /* ERROR "field or method" */ .m2) {}
-func (S0) m3() (x S0 /* ERROR "field or method" */ .m3) { return }
-func (S0) m4() (x *S0 /* ERROR "field or method" */ .m4) { return }
-
-// interfaces may not have any blank methods
-type BlankI interface {
-	_ /* ERROR "invalid method name" */ ()
-	_ /* ERROR "invalid method name" */ (float32) int
-	m()
-}
-
-// non-interface types may have multiple blank methods
-type BlankT struct{}
-
-func (BlankT) _() {}
-func (BlankT) _(int) {}
-func (BlankT) _() int { return 0 }
-func (BlankT) _(int) int { return 0}
diff --git a/src/go/types/testdata/decls1.src b/src/go/types/testdata/decls1.src
deleted file mode 100644
index 7855e46..0000000
--- a/src/go/types/testdata/decls1.src
+++ /dev/null
@@ -1,144 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// variable declarations
-
-package decls1
-
-import (
-	"math"
-)
-
-// Global variables without initialization
-var (
-	a, b bool
-	c byte
-	d uint8
-	r rune
-	i int
-	j, k, l int
-	x, y float32
-	xx, yy float64
-	u, v complex64
-	uu, vv complex128
-	s, t string
-	array []byte
-	iface interface{}
-	
-	blank _ /* ERROR "cannot use _" */
-)
-
-// Global variables with initialization
-var (
-	s1 = i + j
-	s2 = i /* ERROR "mismatched types" */ + x
-	s3 = c + d
-	s4 = s + t
-	s5 = s /* ERROR "invalid operation" */ / t
-	s6 = array[t1]
-	s7 = array[x /* ERROR "integer" */]
-	s8 = &a
-	s10 = &42 /* ERROR "cannot take address" */
-	s11 = &v
-	s12 = -(u + *t11) / *&v
-	s13 = a /* ERROR "shifted operand" */ << d
-	s14 = i << j /* ERROR "must be unsigned" */ 
-	s18 = math.Pi * 10.0
-	s19 = s1 /* ERROR "cannot call" */ ()
- 	s20 = f0 /* ERROR "no value" */ ()
-	s21 = f6(1, s1, i)
-	s22 = f6(1, s1, uu /* ERROR "cannot pass argument" */ )
-	
-	t1 int = i + j
-	t2 int = i /* ERROR "mismatched types" */ + x
-	t3 int = c /* ERROR "cannot initialize" */ + d
-	t4 string = s + t
-	t5 string = s /* ERROR "invalid operation" */ / t
-	t6 byte = array[t1]
-	t7 byte = array[x /* ERROR "must be integer" */]
-	t8 *int = & /* ERROR "cannot initialize" */ a
-	t10 *int = &42 /* ERROR "cannot take address" */
-	t11 *complex64 = &v
-	t12 complex64 = -(u + *t11) / *&v
-	t13 int = a /* ERROR "shifted operand" */ << d
-	t14 int = i << j /* ERROR "must be unsigned" */ 
-	t15 math /* ERROR "not in selector" */
-	t16 math /* ERROR "not declared" */ .xxx
-	t17 math /* ERROR "not a type" */ .Pi
-	t18 float64 = math.Pi * 10.0
-	t19 int = t1 /* ERROR "cannot call" */ ()
-	t20 int = f0 /* ERROR "no value" */ ()
-	t21 int = a /* ERROR "cannot initialize" */
-)
-
-// Various more complex expressions
-var (
-	u1 = x /* ERROR "not an interface" */ .(int)
-	u2 = iface.([]int)
-	u3 = iface.(a /* ERROR "not a type" */ )
-	u4, ok = iface.(int)
-	u5, ok2, ok3 = iface /* ERROR "assignment count mismatch" */ .(int)
-)
-
-// Constant expression initializations
-var (
-	v1 = 1 /* ERROR "cannot convert" */ + "foo"
-	v2 = c + 255
-	v3 = c + 256 /* ERROR "overflows" */
-	v4 = r + 2147483647
-	v5 = r + 2147483648 /* ERROR "overflows" */
-	v6 = 42
-	v7 = v6 + 9223372036854775807
-	v8 = v6 + 9223372036854775808 /* ERROR "overflows" */
-	v9 = i + 1 << 10
-	v10 byte = 1024 /* ERROR "overflows" */
-	v11 = xx/yy*yy - xx
-	v12 = true && false
-	v13 = nil /* ERROR "use of untyped nil" */
-)
-
-// Multiple assignment expressions
-var (
-	m1a, m1b = 1, 2
-	m2a, m2b, m2c /* ERROR "missing init expr for m2c" */ = 1, 2
-	m3a, m3b = 1, 2, 3 /* ERROR "extra init expr 3" */
-)
-
-func _() {
-	var (
-		m1a, m1b = 1, 2
-		m2a, m2b, m2c /* ERROR "missing init expr for m2c" */ = 1, 2
-		m3a, m3b = 1, 2, 3 /* ERROR "extra init expr 3" */
-	)
-
-	_, _ = m1a, m1b
-	_, _, _ = m2a, m2b, m2c
-	_, _ = m3a, m3b
-}
-
-// Declaration of parameters and results
-func f0() {}
-func f1(a /* ERROR "not a type" */) {}
-func f2(a, b, c d /* ERROR "not a type" */) {}
-
-func f3() int { return 0 }
-func f4() a /* ERROR "not a type" */ { return 0 }
-func f5() (a, b, c d /* ERROR "not a type" */) { return }
-
-func f6(a, b, c int) complex128 { return 0 }
-
-// Declaration of receivers
-type T struct{}
-
-func (T) m0() {}
-func (*T) m1() {}
-func (x T) m2() {}
-func (x *T) m3() {}
-
-// Initialization functions
-func init() {}
-func /* ERROR "no arguments and no return values" */ init(int) {}
-func /* ERROR "no arguments and no return values" */ init() int { return 0 }
-func /* ERROR "no arguments and no return values" */ init(int) int { return 0 }
-func (T) init(int) int { return 0 }
diff --git a/src/go/types/testdata/decls2a.src b/src/go/types/testdata/decls2a.src
deleted file mode 100644
index bdbecd9..0000000
--- a/src/go/types/testdata/decls2a.src
+++ /dev/null
@@ -1,111 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// method declarations
-
-package decls2
-
-import "time"
-import "unsafe"
-
-// T1 declared before its methods.
-type T1 struct{
-	f int
-}
-
-func (T1) m() {}
-func (T1) m /* ERROR "already declared" */ () {}
-func (x *T1) f /* ERROR "field and method" */ () {}
-
-// Conflict between embedded field and method name,
-// with the embedded field being a basic type.
-type T1b struct {
-	int
-}
-
-func (T1b) int /* ERROR "field and method" */ () {}
-
-type T1c struct {
-	time.Time
-}
-
-func (T1c) Time /* ERROR "field and method" */ () int { return 0 }
-
-// Disabled for now: LookupFieldOrMethod will find Pointer even though
-// it's double-declared (it would cost extra in the common case to verify
-// this). But the MethodSet computation will not find it due to the name
-// collision caused by the double-declaration, leading to an internal
-// inconsistency while we are verifying one computation against the other.
-// var _ = T1c{}.Pointer
-
-// T2's method declared before the type.
-func (*T2) f /* ERROR "field and method" */ () {}
-
-type T2 struct {
-	f int
-}
-
-// Methods declared without a declared type.
-func (undeclared /* ERROR "undeclared" */) m() {}
-func (x *undeclared /* ERROR "undeclared" */) m() {}
-
-func (pi /* ERROR "not a type" */) m1() {}
-func (x pi /* ERROR "not a type" */) m2() {}
-func (x *pi /* ERROR "not a type" */ ) m3() {}
-
-// Blank types.
-type _ struct { m int }
-type _ struct { m int }
-
-func (_ /* ERROR "cannot use _" */) m() {}
-func m(_ /* ERROR "cannot use _" */) {}
-
-// Methods with receiver base type declared in another file.
-func (T3) m1() {}
-func (*T3) m2() {}
-func (x T3) m3() {}
-func (x *T3) f /* ERROR "field and method" */ () {}
-
-// Methods of non-struct type.
-type T4 func()
-
-func (self T4) m() func() { return self }
-
-// Methods associated with an interface.
-type T5 interface {
-	m() int
-}
-
-func (T5 /* ERROR "invalid receiver" */ ) m1() {}
-func (T5 /* ERROR "invalid receiver" */ ) m2() {}
-
-// Methods associated with a named pointer type.
-type ptr *int
-func (ptr /* ERROR "invalid receiver" */ ) _() {}
-func (* /* ERROR "invalid receiver" */ ptr) _() {}
-
-// Methods with zero or multiple receivers.
-func ( /* ERROR "missing receiver" */ ) _() {}
-func (T3, * /* ERROR "exactly one receiver" */ T3) _() {}
-func (T3, T3, T3 /* ERROR "exactly one receiver" */ ) _() {}
-func (a, b /* ERROR "exactly one receiver" */ T3) _() {}
-func (a, b, c /* ERROR "exactly one receiver" */ T3) _() {}
-
-// Methods associated with non-local or unnamed types.
-func (int /* ERROR "invalid receiver" */ ) m() {}
-func ([ /* ERROR "invalid receiver" */ ]int) m() {}
-func (time /* ERROR "invalid receiver" */ .Time) m() {}
-func (* /* ERROR "invalid receiver" */ time.Time) m() {}
-func (x /* ERROR "invalid receiver" */ interface{}) m() {}
-
-// Unsafe.Pointer is treated like a pointer when used as receiver type.
-type UP unsafe.Pointer
-func (UP /* ERROR "invalid" */ ) m1() {}
-func (* /* ERROR "invalid" */ UP) m2() {}
-
-// Double declarations across package files
-const c_double = 0
-type t_double int
-var v_double int
-func f_double() {}
diff --git a/src/go/types/testdata/decls2b.src b/src/go/types/testdata/decls2b.src
deleted file mode 100644
index e7bc394..0000000
--- a/src/go/types/testdata/decls2b.src
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// method declarations
-
-package decls2
-
-import "io"
-
-const pi = 3.1415
-
-func (T1) m /* ERROR "already declared" */ () {}
-func (T2) m(io.Writer) {}
-
-type T3 struct {
-	f *T3
-}
-
-type T6 struct {
-	x int
-}
-
-func (t *T6) m1() int {
-	return t.x
-}
-
-func f() {
-	var t *T6
-	t.m1()
-}
-
-// Double declarations across package files
-const c_double /* ERROR "redeclared" */ = 0
-type t_double  /* ERROR "redeclared" */ int
-var v_double /* ERROR "redeclared" */ int
-func f_double /* ERROR "redeclared" */ () {}
-
-// Blank methods need to be type-checked.
-// Verify by checking that errors are reported.
-func (T /* ERROR "undeclared" */ ) _() {}
-func (T1) _(undeclared /* ERROR "undeclared" */ ) {}
-func (T1) _() int { return "foo" /* ERROR "cannot convert" */ }
-
-// Methods with undeclared receiver type can still be checked.
-// Verify by checking that errors are reported.
-func (Foo /* ERROR "undeclared" */ ) m() {}
-func (Foo /* ERROR "undeclared" */ ) m(undeclared /* ERROR "undeclared" */ ) {}
-func (Foo /* ERROR "undeclared" */ ) m() int { return "foo" /* ERROR "cannot convert" */ }
-
-func (Foo /* ERROR "undeclared" */ ) _() {}
-func (Foo /* ERROR "undeclared" */ ) _(undeclared /* ERROR "undeclared" */ ) {}
-func (Foo /* ERROR "undeclared" */ ) _() int { return "foo" /* ERROR "cannot convert" */ }
-
-// Receiver declarations are regular parameter lists;
-// receiver types may use parentheses, and the list
-// may have a trailing comma.
-type T7 struct {}
-
-func (T7) m1() {}
-func ((T7)) m2() {}
-func ((*T7)) m3() {}
-func (x *(T7),) m4() {}
-func (x (*(T7)),) m5() {}
-func (x ((*((T7)))),) m6() {}
diff --git a/src/go/types/testdata/decls3.src b/src/go/types/testdata/decls3.src
deleted file mode 100644
index 80d2bc8..0000000
--- a/src/go/types/testdata/decls3.src
+++ /dev/null
@@ -1,309 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// embedded types
-
-package decls3
-
-import "unsafe"
-import "fmt"
-
-// fields with the same name at the same level cancel each other out
-
-func _() {
-	type (
-		T1 struct { X int }
-		T2 struct { X int }
-		T3 struct { T1; T2 } // X is embedded twice at the same level via T1->X, T2->X
-	)
-
-	var t T3
-	_ = t /* ERROR "ambiguous selector" */ .X
-}
-
-func _() {
-	type (
-		T1 struct { X int }
-		T2 struct { T1 }
-		T3 struct { T1 }
-		T4 struct { T2; T3 } // X is embedded twice at the same level via T2->T1->X, T3->T1->X
-	)
-
-	var t T4
-	_ = t /* ERROR "ambiguous selector" */ .X
-}
-
-func issue4355() {
-	type (
-	    T1 struct {X int}
-	    T2 struct {T1}
-	    T3 struct {T2}
-	    T4 struct {T2}
-	    T5 struct {T3; T4} // X is embedded twice at the same level via T3->T2->T1->X, T4->T2->T1->X
-	)	
-
-	var t T5
-	_ = t /* ERROR "ambiguous selector" */ .X
-}
-
-func _() {
-	type State int
-	type A struct{ State }
-	type B struct{ fmt.State }
-	type T struct{ A; B }
-
-	var t T
-	_ = t /* ERROR "ambiguous selector" */ .State
-}
-
-// Embedded fields can be predeclared types.
-
-func _() {
-	type T0 struct{
-		int
-		float32
-		f int
-	}
-	var x T0
-	_ = x.int
-	_ = x.float32
-	_ = x.f
-
-	type T1 struct{
-		T0
-	}
-	var y T1
-	_ = y.int
-	_ = y.float32
-	_ = y.f
-}
-
-// Restrictions on embedded field types.
-
-func _() {
-	type I1 interface{}
-	type I2 interface{}
-	type P1 *int
-	type P2 *int
-	type UP unsafe.Pointer
-
-	type T1 struct {
-		I1
-		* /* ERROR "cannot be a pointer to an interface" */ I2
-		* /* ERROR "cannot be a pointer to an interface" */ error
-		P1 /* ERROR "cannot be a pointer" */
-		* /* ERROR "cannot be a pointer" */ P2
-	}
-
-	// unsafe.Pointers are treated like regular pointers when embedded
-	type T2 struct {
-		unsafe /* ERROR "cannot be unsafe.Pointer" */ .Pointer
-		*/* ERROR "cannot be unsafe.Pointer" */ unsafe.Pointer
-		UP /* ERROR "cannot be unsafe.Pointer" */
-		* /* ERROR "cannot be unsafe.Pointer" */ UP
-	}
-}
-
-// Named types that are pointers.
-
-type S struct{ x int }
-func (*S) m() {}
-type P *S
-
-func _() {
-	var s *S
-	_ = s.x
-	_ = s.m
-
-	var p P
-	_ = p.x
-	_ = p /* ERROR "no field or method" */ .m
-	_ = P /* ERROR "no field or method" */ .m
-}
-
-// Borrowed from the FieldByName test cases in reflect/all_test.go.
-
-type D1 struct {
-	d int
-}
-type D2 struct {
-	d int
-}
-
-type S0 struct {
-	A, B, C int
-	D1
-	D2
-}
-
-type S1 struct {
-	B int
-	S0
-}
-
-type S2 struct {
-	A int
-	*S1
-}
-
-type S1x struct {
-	S1
-}
-
-type S1y struct {
-	S1
-}
-
-type S3 struct {
-	S1x
-	S2
-	D, E int
-	*S1y
-}
-
-type S4 struct {
-	*S4
-	A int
-}
-
-// The X in S6 and S7 annihilate, but they also block the X in S8.S9.
-type S5 struct {
-	S6
-	S7
-	S8
-}
-
-type S6 struct {
-	X int
-}
-
-type S7 S6
-
-type S8 struct {
-	S9
-}
-
-type S9 struct {
-	X int
-	Y int
-}
-
-// The X in S11.S6 and S12.S6 annihilate, but they also block the X in S13.S8.S9.
-type S10 struct {
-	S11
-	S12
-	S13
-}
-
-type S11 struct {
-	S6
-}
-
-type S12 struct {
-	S6
-}
-
-type S13 struct {
-	S8
-}
-
-func _() {
-	_ = struct /* ERROR "no field or method" */ {}{}.Foo
-	_ = S0{}.A
-	_ = S0 /* ERROR "no field or method" */ {}.D
-	_ = S1{}.A
-	_ = S1{}.B
-	_ = S1{}.S0
-	_ = S1{}.C
-	_ = S2{}.A
-	_ = S2{}.S1
-	_ = S2{}.B
-	_ = S2{}.C
-	_ = S2 /* ERROR "no field or method" */ {}.D
-	_ = S3 /* ERROR "ambiguous selector" */ {}.S1
-	_ = S3{}.A
-	_ = S3 /* ERROR "ambiguous selector" */ {}.B
-	_ = S3{}.D
-	_ = S3{}.E
-	_ = S4{}.A
-	_ = S4 /* ERROR "no field or method" */ {}.B
-	_ = S5 /* ERROR "ambiguous selector" */ {}.X
-	_ = S5{}.Y
-	_ = S10 /* ERROR "ambiguous selector" */ {}.X
-	_ = S10{}.Y
-}
-
-// Borrowed from the FieldByName benchmark in reflect/all_test.go.
-
-type R0 struct {
-	*R1
-	*R2
-	*R3
-	*R4
-}
-
-type R1 struct {
-	*R5
-	*R6
-	*R7
-	*R8
-}
-
-type R2 R1
-type R3 R1
-type R4 R1
-
-type R5 struct {
-	*R9
-	*R10
-	*R11
-	*R12
-}
-
-type R6 R5
-type R7 R5
-type R8 R5
-
-type R9 struct {
-	*R13
-	*R14
-	*R15
-	*R16
-}
-
-type R10 R9
-type R11 R9
-type R12 R9
-
-type R13 struct {
-	*R17
-	*R18
-	*R19
-	*R20
-}
-
-type R14 R13
-type R15 R13
-type R16 R13
-
-type R17 struct {
-	*R21
-	*R22
-	*R23
-	*R24
-}
-
-type R18 R17
-type R19 R17
-type R20 R17
-
-type R21 struct {
-	X int
-}
-
-type R22 R21
-type R23 R21
-type R24 R21
-
-var _ = R0 /* ERROR "ambiguous selector" */ {}.X
\ No newline at end of file
diff --git a/src/go/types/testdata/errors.src b/src/go/types/testdata/errors.src
deleted file mode 100644
index 45bd45a..0000000
--- a/src/go/types/testdata/errors.src
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package errors
-
-// Testing precise operand formatting in error messages
-// (matching messages are regular expressions, hence the \'s).
-func f(x int, m map[string]int) {
-	// no values
-	_ = f /* ERROR "f\(0, m\) \(no value\) used as value" */ (0, m)
-
-	// built-ins
-	_ = println /* ERROR "println \(built-in\) must be called" */
-
-	// types
-	_ = complex128 /* ERROR "complex128 \(type\) is not an expression" */
-
-	// constants
-	const c1 = 991
-	const c2 float32 = 0.5
-	0 /* ERROR "0 \(untyped int constant\) is not used" */
-	c1 /* ERROR "c1 \(untyped int constant 991\) is not used" */
-	c2 /* ERROR "c2 \(constant 1/2 of type float32\) is not used" */
-	c1 /* ERROR "c1 \+ c2 \(constant 1983/2 of type float32\) is not used" */ + c2
-
-	// variables
-	x /* ERROR "x \(variable of type int\) is not used" */
-
-	// values
-	x /* ERROR "x != x \(untyped bool value\) is not used" */ != x
-	x /* ERROR "x \+ x \(value of type int\) is not used" */ + x
-
-	// value, ok's
-	const s = "foo"
-	m /* ERROR "m\[s\] \(map index expression of type int\) is not used" */ [s]
-}
-
-// Valid ERROR comments can have a variety of forms.
-func _() {
-	0 /* ERROR "0 .* is not used" */
-	0 /* ERROR 0 .* is not used */
-	0 // ERROR "0 .* is not used"
-	0 // ERROR 0 .* is not used
-}
-
-// Don't report spurious errors as a consequence of earlier errors.
-// Add more tests as needed.
-func _() {
-	if err := foo /* ERROR undeclared */ (); err != nil /* no error here */ {}
-}
-
-// Use unqualified names for package-local objects.
-type T struct{}
-var _ int = T /* ERROR value of type T */ {} // use T in error message rather then errors.T
diff --git a/src/go/types/testdata/expr0.src b/src/go/types/testdata/expr0.src
deleted file mode 100644
index 3120c6f..0000000
--- a/src/go/types/testdata/expr0.src
+++ /dev/null
@@ -1,174 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// unary expressions
-
-package expr0 
-
-type mybool bool
-
-var (
-	// bool
-	b0 = true
-	b1 bool = b0
-	b2 = !true
-	b3 = !b1
-	b4 bool = !true
-	b5 bool = !b4
-	b6 = +b0 /* ERROR "not defined" */
-	b7 = -b0 /* ERROR "not defined" */
-	b8 = ^b0 /* ERROR "not defined" */
-	b9 = *b0 /* ERROR "cannot indirect" */
-	b10 = &true /* ERROR "cannot take address" */
-	b11 = &b0
-	b12 = <-b0 /* ERROR "cannot receive" */
-	b13 = & & /* ERROR "cannot take address" */ b0
-
-	// byte
-	_ = byte(0)
-	_ = byte(- /* ERROR "cannot convert" */ 1)
-	_ = - /* ERROR "-byte\(1\) \(constant -1 of type byte\) overflows byte" */ byte(1) // test for issue 11367
-	_ = byte /* ERROR "overflows byte" */ (0) - byte(1)
-
-	// int
-	i0 = 1
-	i1 int = i0
-	i2 = +1
-	i3 = +i0
-	i4 int = +1
-	i5 int = +i4
-	i6 = -1
-	i7 = -i0
-	i8 int = -1
-	i9 int = -i4
-	i10 = !i0 /* ERROR "not defined" */
-	i11 = ^1
-	i12 = ^i0
-	i13 int = ^1
-	i14 int = ^i4
-	i15 = *i0 /* ERROR "cannot indirect" */
-	i16 = &i0
-	i17 = *i16
-	i18 = <-i16 /* ERROR "cannot receive" */
-
-	// uint
-	u0 = uint(1)
-	u1 uint = u0
-	u2 = +1
-	u3 = +u0
-	u4 uint = +1
-	u5 uint = +u4
-	u6 = -1
-	u7 = -u0
-	u8 uint = - /* ERROR "overflows" */ 1
-	u9 uint = -u4
-	u10 = !u0 /* ERROR "not defined" */
-	u11 = ^1
-	u12 = ^i0
-	u13 uint = ^ /* ERROR "overflows" */ 1
-	u14 uint = ^u4
-	u15 = *u0 /* ERROR "cannot indirect" */
-	u16 = &u0
-	u17 = *u16
-	u18 = <-u16 /* ERROR "cannot receive" */
-	u19 = ^uint(0)
-
-	// float64
-	f0 = float64(1)
-	f1 float64 = f0
-	f2 = +1
-	f3 = +f0
-	f4 float64 = +1
-	f5 float64 = +f4
-	f6 = -1
-	f7 = -f0
-	f8 float64 = -1
-	f9 float64 = -f4
-	f10 = !f0 /* ERROR "not defined" */
-	f11 = ^1
-	f12 = ^i0
-	f13 float64 = ^1
-	f14 float64 = ^f4 /* ERROR "not defined" */
-	f15 = *f0 /* ERROR "cannot indirect" */
-	f16 = &f0
-	f17 = *u16
-	f18 = <-u16 /* ERROR "cannot receive" */
-
-	// complex128
-	c0 = complex128(1)
-	c1 complex128 = c0
-	c2 = +1
-	c3 = +c0
-	c4 complex128 = +1
-	c5 complex128 = +c4
-	c6 = -1
-	c7 = -c0
-	c8 complex128 = -1
-	c9 complex128 = -c4
-	c10 = !c0 /* ERROR "not defined" */
-	c11 = ^1
-	c12 = ^i0
-	c13 complex128 = ^1
-	c14 complex128 = ^c4 /* ERROR "not defined" */
-	c15 = *c0 /* ERROR "cannot indirect" */
-	c16 = &c0
-	c17 = *u16
-	c18 = <-u16 /* ERROR "cannot receive" */
-
-	// string
-	s0 = "foo"
-	s1 = +"foo" /* ERROR "not defined" */
-	s2 = -s0 /* ERROR "not defined" */
-	s3 = !s0 /* ERROR "not defined" */
-	s4 = ^s0 /* ERROR "not defined" */
-	s5 = *s4
-	s6 = &s4
-	s7 = *s6
-	s8 = <-s7
-
-	// channel
-	ch chan int
-	rc <-chan float64
-	sc chan <- string
-	ch0 = +ch /* ERROR "not defined" */
-	ch1 = -ch /* ERROR "not defined" */
-	ch2 = !ch /* ERROR "not defined" */
-	ch3 = ^ch /* ERROR "not defined" */
-	ch4 = *ch /* ERROR "cannot indirect" */
-	ch5 = &ch
-	ch6 = *ch5
-	ch7 = <-ch
-	ch8 = <-rc
-	ch9 = <-sc /* ERROR "cannot receive" */
-	ch10, ok = <-ch
-	// ok is of type bool
-	ch11, myok = <-ch
-	_ mybool = myok /* ERROR "cannot initialize" */
-)
-
-// address of composite literals
-type T struct{x, y int}
-
-func f() T { return T{} }
-
-var (
-	_ = &T{1, 2}
-	_ = &[...]int{}
-	_ = &[]int{}
-	_ = &[]int{}
-	_ = &map[string]T{}
-	_ = &(T{1, 2})
-	_ = &((((T{1, 2}))))
-	_ = &f /* ERROR "cannot take address" */ ()
-)
-
-// recursive pointer types
-type P *P
-
-var (
-	p1 P = new(P)
-	p2 P = *p1
-	p3 P = &p2
-)
-
diff --git a/src/go/types/testdata/expr1.src b/src/go/types/testdata/expr1.src
deleted file mode 100644
index 8ef0aed..0000000
--- a/src/go/types/testdata/expr1.src
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// binary expressions
-
-package expr1
diff --git a/src/go/types/testdata/expr2.src b/src/go/types/testdata/expr2.src
deleted file mode 100644
index 31dc5f0..0000000
--- a/src/go/types/testdata/expr2.src
+++ /dev/null
@@ -1,247 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// comparisons
-
-package expr2
-
-func _bool() {
-	const t = true == true
-	const f = true == false
-	_ = t /* ERROR "cannot compare" */ < f
-	_ = 0 /* ERROR "cannot convert" */ == t
-	var b bool
-	var x, y float32
-	b = x < y
-	_ = b
-	_ = struct{b bool}{x < y}
-}
-
-// corner cases
-var (
-	v0 = nil /* ERROR "cannot compare" */ == nil
-)
-
-func arrays() {
-	// basics
-	var a, b [10]int
-	_ = a == b
-	_ = a != b
-	_ = a /* ERROR < not defined */ < b
-	_ = a == nil /* ERROR cannot convert */
-
-	type C [10]int
-	var c C
-	_ = a == c
-
-	type D [10]int
-	var d D
-	_ = c /* ERROR mismatched types */ == d
-
-	var e [10]func() int
-	_ = e /* ERROR == not defined */ == e
-}
-
-func structs() {
-	// basics
-	var s, t struct {
-		x int
-		a [10]float32
-		_ bool
-	}
-	_ = s == t
-	_ = s != t
-	_ = s /* ERROR < not defined */ < t
-	_ = s == nil /* ERROR cannot convert */
-
-	type S struct {
-		x int
-		a [10]float32
-		_ bool
-	}
-	type T struct {
-		x int
-		a [10]float32
-		_ bool
-	}
-	var ss S
-	var tt T
-	_ = s == ss
-	_ = ss /* ERROR mismatched types */ == tt
-
-	var u struct {
-		x int
-		a [10]map[string]int
-	}
-	_ = u /* ERROR cannot compare */ == u
-}
-
-func pointers() {
-	// nil
-	_ = nil /* ERROR == not defined */ == nil
-	_ = nil /* ERROR != not defined */ != nil
-	_ = nil /* ERROR < not defined */ < nil
-	_ = nil /* ERROR <= not defined */ <= nil
-	_ = nil /* ERROR > not defined */ > nil
-	_ = nil /* ERROR >= not defined */ >= nil
-
-	// basics
-	var p, q *int
-	_ = p == q
-	_ = p != q
-
-	_ = p == nil
-	_ = p != nil
-	_ = nil == q
-	_ = nil != q
-
-	_ = p /* ERROR < not defined */ < q
-	_ = p /* ERROR <= not defined */ <= q
-	_ = p /* ERROR > not defined */ > q
-	_ = p /* ERROR >= not defined */ >= q
-
-	// various element types
-	type (
-		S1 struct{}
-		S2 struct{}
-		P1 *S1
-		P2 *S2
-	)
-	var (
-		ps1 *S1
-		ps2 *S2
-		p1 P1
-		p2 P2
-	)
-	_ = ps1 == ps1
-	_ = ps1 /* ERROR mismatched types */ == ps2
-	_ = ps2 /* ERROR mismatched types */ == ps1
-
-	_ = p1 == p1
-	_ = p1 /* ERROR mismatched types */ == p2
-
-	_ = p1 == ps1
-}
-
-func channels() {
-	// basics
-	var c, d chan int
-	_ = c == d
-	_ = c != d
-	_ = c == nil
-	_ = c /* ERROR < not defined */ < d
-
-	// various element types (named types)
-	type (
-		C1 chan int
-		C1r <-chan int
-		C1s chan<- int
-		C2 chan float32
-	)
-	var (
-		c1 C1
-		c1r C1r
-		c1s C1s
-		c1a chan int
-		c2 C2
-	)
-	_ = c1 == c1
-	_ = c1 /* ERROR mismatched types */ == c1r
-	_ = c1 /* ERROR mismatched types */ == c1s
-	_ = c1r /* ERROR mismatched types */ == c1s
-	_ = c1 == c1a
-	_ = c1a == c1
-	_ = c1 /* ERROR mismatched types */ == c2
-	_ = c1a /* ERROR mismatched types */ == c2
-
-	// various element types (unnamed types)
-	var (
-		d1 chan int
-		d1r <-chan int
-		d1s chan<- int
-		d1a chan<- int
-		d2 chan float32
-	)
-	_ = d1 == d1
-	_ = d1 == d1r
-	_ = d1 == d1s
-	_ = d1r /* ERROR mismatched types */ == d1s
-	_ = d1 == d1a
-	_ = d1a == d1
-	_ = d1 /* ERROR mismatched types */ == d2
-	_ = d1a /* ERROR mismatched types */ == d2
-}
-
-// for interfaces test
-type S1 struct{}
-type S11 struct{}
-type S2 struct{}
-func (*S1) m() int
-func (*S11) m() int
-func (*S11) n()
-func (*S2) m() float32
-
-func interfaces() {
-	// basics
-	var i, j interface{ m() int }
-	_ = i == j
-	_ = i != j
-	_ = i == nil
-	_ = i /* ERROR < not defined */ < j
-
-	// various interfaces
-	var ii interface { m() int; n() }
-	var k interface { m() float32 }
-	_ = i == ii
-	_ = i /* ERROR mismatched types */ == k
-
-	// interfaces vs values
-	var s1 S1
-	var s11 S11
-	var s2 S2
-
-	_ = i == 0 /* ERROR cannot convert */
-	_ = i /* ERROR mismatched types */ == s1
-	_ = i == &s1
-	_ = i == &s11
-
-	_ = i /* ERROR mismatched types */ == s2
-	_ = i /* ERROR mismatched types */ == &s2
-}
-
-func slices() {
-	// basics
-	var s []int
-	_ = s == nil
-	_ = s != nil
-	_ = s /* ERROR < not defined */ < nil
-
-	// slices are not otherwise comparable
-	_ = s /* ERROR == not defined */ == s
-	_ = s /* ERROR < not defined */ < s
-}
-
-func maps() {
-	// basics
-	var m map[string]int
-	_ = m == nil
-	_ = m != nil
-	_ = m /* ERROR < not defined */ < nil
-
-	// maps are not otherwise comparable
-	_ = m /* ERROR == not defined */ == m
-	_ = m /* ERROR < not defined */ < m
-}
-
-func funcs() {
-	// basics
-	var f func(int) float32
-	_ = f == nil
-	_ = f != nil
-	_ = f /* ERROR < not defined */ < nil
-
-	// funcs are not otherwise comparable
-	_ = f /* ERROR == not defined */ == f
-	_ = f /* ERROR < not defined */ < f
-}
diff --git a/src/go/types/testdata/expr3.src b/src/go/types/testdata/expr3.src
deleted file mode 100644
index 5772095..0000000
--- a/src/go/types/testdata/expr3.src
+++ /dev/null
@@ -1,534 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package expr3
-
-import "time"
-
-func indexes() {
-	_ = 1 /* ERROR "cannot index" */ [0]
-	_ = indexes /* ERROR "cannot index" */ [0]
-	_ = ( /* ERROR "cannot slice" */ 12 + 3)[1:2]
-
-	var a [10]int
-	_ = a[true /* ERROR "cannot convert" */ ]
-	_ = a["foo" /* ERROR "cannot convert" */ ]
-	_ = a[1.1 /* ERROR "truncated" */ ]
-	_ = a[1.0]
-	_ = a[- /* ERROR "negative" */ 1]
-	_ = a[- /* ERROR "negative" */ 1 :]
-	_ = a[: - /* ERROR "negative" */ 1]
-	_ = a[: /* ERROR "2nd index required" */ : /* ERROR "3rd index required" */ ]
-	_ = a[0: /* ERROR "2nd index required" */ : /* ERROR "3rd index required" */ ]
-	_ = a[0: /* ERROR "2nd index required" */ :10]
-	_ = a[:10:10]
-
-	var a0 int
-	a0 = a[0]
-	_ = a0
-	var a1 int32
-	a1 = a /* ERROR "cannot assign" */ [1]
-	_ = a1
-
-	_ = a[9]
-	_ = a[10 /* ERROR "index .* out of bounds" */ ]
-	_ = a[1 /* ERROR "overflows" */ <<100]
-	_ = a[10:]
-	_ = a[:10]
-	_ = a[10:10]
-	_ = a[11 /* ERROR "index .* out of bounds" */ :]
-	_ = a[: 11 /* ERROR "index .* out of bounds" */ ]
-	_ = a[: 1 /* ERROR "overflows" */ <<100]
-	_ = a[:10:10]
-	_ = a[:11 /* ERROR "index .* out of bounds" */ :10]
-	_ = a[:10:11 /* ERROR "index .* out of bounds" */ ]
-	_ = a[10:0:10] /* ERROR "invalid slice indices" */
-	_ = a[0:10:0] /* ERROR "invalid slice indices" */
-	_ = a[10:0:0] /* ERROR "invalid slice indices" */
-	_ = &a /* ERROR "cannot take address" */ [:10]
-
-	pa := &a
-	_ = pa[9]
-	_ = pa[10 /* ERROR "index .* out of bounds" */ ]
-	_ = pa[1 /* ERROR "overflows" */ <<100]
-	_ = pa[10:]
-	_ = pa[:10]
-	_ = pa[10:10]
-	_ = pa[11 /* ERROR "index .* out of bounds" */ :]
-	_ = pa[: 11 /* ERROR "index .* out of bounds" */ ]
-	_ = pa[: 1 /* ERROR "overflows" */ <<100]
-	_ = pa[:10:10]
-	_ = pa[:11 /* ERROR "index .* out of bounds" */ :10]
-	_ = pa[:10:11 /* ERROR "index .* out of bounds" */ ]
-	_ = pa[10:0:10] /* ERROR "invalid slice indices" */
-	_ = pa[0:10:0] /* ERROR "invalid slice indices" */
-	_ = pa[10:0:0] /* ERROR "invalid slice indices" */
-	_ = &pa /* ERROR "cannot take address" */ [:10]
-
-	var b [0]int
-	_ = b[0 /* ERROR "index .* out of bounds" */ ]
-	_ = b[:]
-	_ = b[0:]
-	_ = b[:0]
-	_ = b[0:0]
-	_ = b[0:0:0]
-	_ = b[1 /* ERROR "index .* out of bounds" */ :0:0]
-
-	var s []int
-	_ = s[- /* ERROR "negative" */ 1]
-	_ = s[- /* ERROR "negative" */ 1 :]
-	_ = s[: - /* ERROR "negative" */ 1]
-	_ = s[0]
-	_ = s[1:2]
-	_ = s[2:1] /* ERROR "invalid slice indices" */
-	_ = s[2:]
-	_ = s[: 1 /* ERROR "overflows" */ <<100]
-	_ = s[1 /* ERROR "overflows" */ <<100 :]
-	_ = s[1 /* ERROR "overflows" */ <<100 : 1 /* ERROR "overflows" */ <<100]
-	_ = s[: /* ERROR "2nd index required" */ :  /* ERROR "3rd index required" */ ]
-	_ = s[:10:10]
-	_ = s[10:0:10] /* ERROR "invalid slice indices" */
-	_ = s[0:10:0] /* ERROR "invalid slice indices" */
-	_ = s[10:0:0] /* ERROR "invalid slice indices" */
-	_ = &s /* ERROR "cannot take address" */ [:10]
-
-	var m map[string]int
-	_ = m[0 /* ERROR "cannot convert" */ ]
-	_ = m /* ERROR "cannot slice" */ ["foo" : "bar"]
-	_ = m["foo"]
-	// ok is of type bool
-	type mybool bool
-	var ok mybool
-	_, ok = m["bar"]
-	_ = ok
-
-	var t string
-	_ = t[- /* ERROR "negative" */ 1]
-	_ = t[- /* ERROR "negative" */ 1 :]
-	_ = t[: - /* ERROR "negative" */ 1]
-	_ = t /* ERROR "3-index slice of string" */ [1:2:3]
-	_ = "foo" /* ERROR "3-index slice of string" */ [1:2:3]
-	var t0 byte
-	t0 = t[0]
-	_ = t0
-	var t1 rune
-	t1 = t /* ERROR "cannot assign" */ [2]
-	_ = t1
-	_ = ("foo" + "bar")[5]
-	_ = ("foo" + "bar")[6 /* ERROR "index .* out of bounds" */ ]
-
-	const c = "foo"
-	_ = c[- /* ERROR "negative" */ 1]
-	_ = c[- /* ERROR "negative" */ 1 :]
-	_ = c[: - /* ERROR "negative" */ 1]
-	var c0 byte
-	c0 = c[0]
-	_ = c0
-	var c2 float32
-	c2 = c /* ERROR "cannot assign" */ [2]
-	_ = c[3 /* ERROR "index .* out of bounds" */ ]
-	_ = ""[0 /* ERROR "index .* out of bounds" */ ]
-	_ = c2
-
-	_ = s[1<<30] // no compile-time error here
-
-	// issue 4913
-	type mystring string
-	var ss string
-	var ms mystring
-	var i, j int
-	ss = "foo"[1:2]
-	ss = "foo"[i:j]
-	ms = "foo" /* ERROR "cannot assign" */ [1:2]
-	ms = "foo" /* ERROR "cannot assign" */ [i:j]
-	_, _ = ss, ms
-}
-
-type T struct {
-	x int
-	y func()
-}
-
-func (*T) m() {}
-
-func method_expressions() {
-	_ = T /* ERROR "no field or method" */ .a
-	_ = T /* ERROR "has no method" */ .x
-	_ = T /* ERROR "not in method set" */ .m
-	_ = (*T).m
-
-	var f func(*T) = T /* ERROR "not in method set" */ .m
-	var g func(*T) = (*T).m
-	_, _ = f, g
-
-	_ = T /* ERROR "has no method" */ .y
-	_ = ( /* ERROR "has no method" */ *T).y
-}
-
-func struct_literals() {
-	type T0 struct {
-		a, b, c int
-	}
-
-	type T1 struct {
-		T0
-		a, b int
-		u float64
-		s string
-	}
-
-	// keyed elements
-	_ = T1{}
-	_ = T1{a: 0, 1 /* ERROR "mixture of .* elements" */ }
-	_ = T1{aa /* ERROR "unknown field" */ : 0}
-	_ = T1{1 /* ERROR "invalid field name" */ : 0}
-	_ = T1{a: 0, s: "foo", u: 0, a /* ERROR "duplicate field" */: 10}
-	_ = T1{a: "foo" /* ERROR "cannot convert" */ }
-	_ = T1{c /* ERROR "unknown field" */ : 0}
-	_ = T1{T0: { /* ERROR "missing type" */ }} // struct literal element type may not be elided
-	_ = T1{T0: T0{}}
-	_ = T1{T0 /* ERROR "invalid field name" */ .a: 0}
-
-	// unkeyed elements
-	_ = T0{1, 2, 3}
-	_ = T0{1, b /* ERROR "mixture" */ : 2, 3}
-	_ = T0{1, 2} /* ERROR "too few values" */
-	_ = T0{1, 2, 3, 4  /* ERROR "too many values" */ }
-	_ = T0{1, "foo" /* ERROR "cannot convert" */, 3.4  /* ERROR "truncated" */}
-
-	// invalid type
-	type P *struct{
-		x int
-	}
-	_ = P /* ERROR "invalid composite literal type" */ {}
-
-	// unexported fields
-	_ = time.Time{}
-	_ = time.Time{sec /* ERROR "unknown field" */ : 0}
-	_ = time.Time{
-		0 /* ERROR implicit assignment to unexported field sec in time.Time literal */,
-		0 /* ERROR implicit assignment */ ,
-		nil /* ERROR implicit assignment */ ,
-	}
-}
-
-func array_literals() {
-	type A0 [0]int
-	_ = A0{}
-	_ = A0{0 /* ERROR "index .* out of bounds" */}
-	_ = A0{0 /* ERROR "index .* out of bounds" */ : 0}
-
-	type A1 [10]int
-	_ = A1{}
-	_ = A1{0, 1, 2}
-	_ = A1{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
-	_ = A1{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 /* ERROR "index .* out of bounds" */ }
-	_ = A1{- /* ERROR "negative" */ 1: 0}
-	_ = A1{8: 8, 9}
-	_ = A1{8: 8, 9, 10 /* ERROR "index .* out of bounds" */ }
-	_ = A1{0, 1, 2, 0 /* ERROR "duplicate index" */ : 0, 3: 3, 4}
-	_ = A1{5: 5, 6, 7, 3: 3, 4}
-	_ = A1{5: 5, 6, 7, 3: 3, 4, 5 /* ERROR "duplicate index" */ }
-	_ = A1{10 /* ERROR "index .* out of bounds" */ : 10, 10 /* ERROR "index .* out of bounds" */ : 10}
-	_ = A1{5: 5, 6, 7, 3: 3, 1 /* ERROR "overflows" */ <<100: 4, 5 /* ERROR "duplicate index" */ }
-	_ = A1{5: 5, 6, 7, 4: 4, 1 /* ERROR "overflows" */ <<100: 4}
-	_ = A1{2.0}
-	_ = A1{2.1 /* ERROR "truncated" */ }
-	_ = A1{"foo" /* ERROR "cannot convert" */ }
-
-	// indices must be integer constants
-	i := 1
-	const f = 2.1
-	const s = "foo"
-	_ = A1{i /* ERROR "index i must be integer constant" */ : 0}
-	_ = A1{f /* ERROR "truncated" */ : 0}
-	_ = A1{s /* ERROR "cannot convert" */ : 0}
-
-	a0 := [...]int{}
-	assert(len(a0) == 0)
-
-	a1 := [...]int{0, 1, 2}
-	assert(len(a1) == 3)
-	var a13 [3]int
-	var a14 [4]int
-	a13 = a1
-	a14 = a1 /* ERROR "cannot assign" */
-	_, _ = a13, a14
-
-	a2 := [...]int{- /* ERROR "negative" */ 1: 0}
-	_ = a2
-
-	a3 := [...]int{0, 1, 2, 0 /* ERROR "duplicate index" */ : 0, 3: 3, 4}
-	assert(len(a3) == 5) // somewhat arbitrary
-
-	a4 := [...]complex128{0, 1, 2, 1<<10-2: -1i, 1i, 400: 10, 12, 14}
-	assert(len(a4) == 1024)
-
-	// composite literal element types may be elided
-	type T []int
-	_ = [10]T{T{}, {}, 5: T{1, 2, 3}, 7: {1, 2, 3}}
-	a6 := [...]T{T{}, {}, 5: T{1, 2, 3}, 7: {1, 2, 3}}
-	assert(len(a6) == 8)
-
-	// recursively so
-	_ = [10][10]T{{}, [10]T{{}}, {{1, 2, 3}}}
-
-	// from the spec
-	type Point struct { x, y float32 }
-	_ = [...]Point{Point{1.5, -3.5}, Point{0, 0}}
-	_ = [...]Point{{1.5, -3.5}, {0, 0}}
-	_ = [][]int{[]int{1, 2, 3}, []int{4, 5}}
-	_ = [][]int{{1, 2, 3}, {4, 5}}
-	_ = [...]*Point{&Point{1.5, -3.5}, &Point{0, 0}}
-	_ = [...]*Point{{1.5, -3.5}, {0, 0}}
-}
-
-func slice_literals() {
-	type S0 []int
-	_ = S0{}
-	_ = S0{0, 1, 2}
-	_ = S0{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
-	_ = S0{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
-	_ = S0{- /* ERROR "negative" */ 1: 0}
-	_ = S0{8: 8, 9}
-	_ = S0{8: 8, 9, 10}
-	_ = S0{0, 1, 2, 0 /* ERROR "duplicate index" */ : 0, 3: 3, 4}
-	_ = S0{5: 5, 6, 7, 3: 3, 4}
-	_ = S0{5: 5, 6, 7, 3: 3, 4, 5 /* ERROR "duplicate index" */ }
-	_ = S0{10: 10, 10 /* ERROR "duplicate index" */ : 10}
-	_ = S0{5: 5, 6, 7, 3: 3, 1 /* ERROR "overflows" */ <<100: 4, 5 /* ERROR "duplicate index" */ }
-	_ = S0{5: 5, 6, 7, 4: 4, 1 /* ERROR "overflows" */ <<100: 4}
-	_ = S0{2.0}
-	_ = S0{2.1 /* ERROR "truncated" */ }
-	_ = S0{"foo" /* ERROR "cannot convert" */ }
-
-	// indices must be resolved correctly
-	const index1 = 1
-	_ = S0{index1: 1}
-	_ = S0{index2: 2}
-	_ = S0{index3 /* ERROR "undeclared name" */ : 3}
-
-	// indices must be integer constants
-	i := 1
-	const f = 2.1
-	const s = "foo"
-	_ = S0{i /* ERROR "index i must be integer constant" */ : 0}
-	_ = S0{f /* ERROR "truncated" */ : 0}
-	_ = S0{s /* ERROR "cannot convert" */ : 0}
-
-	// composite literal element types may be elided
-	type T []int
-	_ = []T{T{}, {}, 5: T{1, 2, 3}, 7: {1, 2, 3}}
-	_ = [][]int{{1, 2, 3}, {4, 5}}
-
-	// recursively so
-	_ = [][]T{{}, []T{{}}, {{1, 2, 3}}}
-}
-
-const index2 int = 2
-
-type N int
-func (N) f() {}
-
-func map_literals() {
-	type M0 map[string]int
-	type M1 map[bool]int
-	type M2 map[*int]int
-
-	_ = M0{}
-	_ = M0{1 /* ERROR "missing key" */ }
-	_ = M0{1 /* ERROR "cannot convert" */ : 2}
-	_ = M0{"foo": "bar" /* ERROR "cannot convert" */ }
-	_ = M0{"foo": 1, "bar": 2, "foo" /* ERROR "duplicate key" */ : 3 }
-
-	_ = map[interface{}]int{2: 1, 2 /* ERROR "duplicate key" */ : 1}
-	_ = map[interface{}]int{int(2): 1, int16(2): 1}
-	_ = map[interface{}]int{int16(2): 1, int16 /* ERROR "duplicate key" */ (2): 1}
-
-	type S string
-
-	_ = map[interface{}]int{"a": 1, "a" /* ERROR "duplicate key" */ : 1}
-	_ = map[interface{}]int{"a": 1, S("a"): 1}
-	_ = map[interface{}]int{S("a"): 1, S /* ERROR "duplicate key" */ ("a"): 1}
-
-	type I interface {
-		f()
-	}
-
-	_ = map[I]int{N(0): 1, N(2): 1}
-	_ = map[I]int{N(2): 1, N /* ERROR "duplicate key" */ (2): 1}
-
-	// map keys must be resolved correctly
-	key1 := "foo"
-	_ = M0{key1: 1}
-	_ = M0{key2: 2}
-	_ = M0{key3 /* ERROR "undeclared name" */ : 2}
-
-	var value int
-	_ = M1{true: 1, false: 0}
-	_ = M2{nil: 0, &value: 1}
-
-	// composite literal element types may be elided
-	type T [2]int
-	_ = map[int]T{0: T{3, 4}, 1: {5, 6}}
-
-	// recursively so
-	_ = map[int][]T{0: {}, 1: {{}, T{1, 2}}}
-
-	// composite literal key types may be elided
-	_ = map[T]int{T{3, 4}: 0, {5, 6}: 1}
-
-	// recursively so
-	_ = map[[2]T]int{{}: 0, {{}}: 1, [2]T{{}}: 2, {T{1, 2}}: 3}
-
-	// composite literal element and key types may be elided
-	_ = map[T]T{{}: {}, {1, 2}: T{3, 4}, T{4, 5}: {}}
-	_ = map[T]M0{{} : {}, T{1, 2}: M0{"foo": 0}, {1, 3}: {"foo": 1}}
-
-	// recursively so
-	_ = map[[2]T][]T{{}: {}, {{}}: {{}, T{1, 2}}, [2]T{{}}: nil, {T{1, 2}}: {{}, {}}}
-
-	// from the spec
-	type Point struct { x, y float32 }
-	_ = map[string]Point{"orig": {0, 0}}
-	_ = map[*Point]string{{0, 0}: "orig"}
-}
-
-var key2 string = "bar"
-
-type I interface {
-	m()
-}
-
-type I2 interface {
-	m(int)
-}
-
-type T1 struct{}
-type T2 struct{}
-
-func (T2) m(int) {}
-
-type mybool bool
-
-func type_asserts() {
-	var x int
-	_ = x /* ERROR "not an interface" */ .(int)
-
-	var e interface{}
-	var ok bool
-	x, ok = e.(int)
-	_ = ok
-
-	// ok value is of type bool
-	var myok mybool
-	_, myok = e.(int)
-	_ = myok
-
-	var t I
-	_ = t /* ERROR "use of .* outside type switch" */ .(type)
-	_ = t /* ERROR "missing method m" */ .(T)
-	_ = t.(*T)
-	_ = t /* ERROR "missing method m" */ .(T1)
-	_ = t /* ERROR "wrong type for method m" */ .(T2)
-	_ = t /* STRICT "wrong type for method m" */ .(I2) // only an error in strict mode (issue 8561)
-
-	// e doesn't statically have an m, but may have one dynamically.
-	_ = e.(I2)
-}
-
-func f0() {}
-func f1(x int) {}
-func f2(u float32, s string) {}
-func fs(s []byte) {}
-func fv(x ...int) {}
-func fi(x ... interface{}) {}
-func (T) fm(x ...int)
-
-func g0() {}
-func g1() int { return 0}
-func g2() (u float32, s string) { return }
-func gs() []byte { return nil }
-
-func _calls() {
-	var x int
-	var y float32
-	var s []int
-
-	f0()
-	_ = f0 /* ERROR "used as value" */ ()
-	f0(g0 /* ERROR "too many arguments" */ )
-
-	f1(0)
-	f1(x)
-	f1(10.0)
-	f1() /* ERROR "too few arguments" */
-	f1(x, y /* ERROR "too many arguments" */ )
-	f1(s /* ERROR "cannot pass" */ )
-	f1(x ... /* ERROR "cannot use ..." */ )
-	f1(g0 /* ERROR "used as value" */ ())
-	f1(g1())
-	// f1(g2()) // TODO(gri) missing position in error message
-
-	f2() /* ERROR "too few arguments" */
-	f2(3.14) /* ERROR "too few arguments" */
-	f2(3.14, "foo")
-	f2(x /* ERROR "cannot pass" */ , "foo")
-	f2(g0 /* ERROR "used as value" */ ())
-	f2(g1 /* ERROR "cannot pass" */ ()) /* ERROR "too few arguments" */
-	f2(g2())
-
-	fs() /* ERROR "too few arguments" */
-	fs(g0 /* ERROR "used as value" */ ())
-	fs(g1 /* ERROR "cannot pass" */ ())
-	fs(g2 /* ERROR "cannot pass" */ /* ERROR "too many arguments" */ ())
-	fs(gs())
-
-	fv()
-	fv(1, 2.0, x)
-	fv(s /* ERROR "cannot pass" */ )
-	fv(s...)
-	fv(x /* ERROR "cannot use" */ ...)
-	fv(1, s... /* ERROR "can only use ... with matching parameter" */ )
-	fv(gs /* ERROR "cannot pass" */ ())
-	fv(gs /* ERROR "cannot pass" */ ()...)
-
-	var t T
-	t.fm()
-	t.fm(1, 2.0, x)
-	t.fm(s /* ERROR "cannot pass" */ )
-	t.fm(g1())
-	t.fm(1, s... /* ERROR "can only use ... with matching parameter" */ )
-	t.fm(gs /* ERROR "cannot pass" */ ())
-	t.fm(gs /* ERROR "cannot pass" */ ()...)
-
-	T.fm(t, )
-	T.fm(t, 1, 2.0, x)
-	T.fm(t, s /* ERROR "cannot pass" */ )
-	T.fm(t, g1())
-	T.fm(t, 1, s... /* ERROR "can only use ... with matching parameter" */ )
-	T.fm(t, gs /* ERROR "cannot pass" */ ())
-	T.fm(t, gs /* ERROR "cannot pass" */ ()...)
-
-	var i interface{ fm(x ...int) } = t
-	i.fm()
-	i.fm(1, 2.0, x)
-	i.fm(s /* ERROR "cannot pass" */ )
-	i.fm(g1())
-	i.fm(1, s... /* ERROR "can only use ... with matching parameter" */ )
-	i.fm(gs /* ERROR "cannot pass" */ ())
-	i.fm(gs /* ERROR "cannot pass" */ ()...)
-
-	fi()
-	fi(1, 2.0, x, 3.14, "foo")
-	fi(g2())
-	fi(0, g2)
-	fi(0, g2 /* ERROR "2-valued expression" */ ())
-}
-
-func issue6344() {
-	type T []interface{}
-	var x T
-	fi(x...) // ... applies also to named slices
-}
diff --git a/src/go/types/testdata/gotos.src b/src/go/types/testdata/gotos.src
deleted file mode 100644
index 0c7ee44..0000000
--- a/src/go/types/testdata/gotos.src
+++ /dev/null
@@ -1,560 +0,0 @@
-// Copyright 2011 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file is a modified copy of $GOROOT/test/goto.go.
-
-package gotos
-
-var (
-	i, n int
-	x    []int
-	c    chan int
-	m    map[int]int
-	s    string
-)
-
-// goto after declaration okay
-func _() {
-	x := 1
-	goto L
-L:
-	_ = x
-}
-
-// goto before declaration okay
-func _() {
-	goto L
-L:
-	x := 1
-	_ = x
-}
-
-// goto across declaration not okay
-func _() {
-	goto L /* ERROR "goto L jumps over variable declaration at line 36" */
-	x := 1
-	_ = x
-L:
-}
-
-// goto across declaration in inner scope okay
-func _() {
-	goto L
-	{
-		x := 1
-		_ = x
-	}
-L:
-}
-
-// goto across declaration after inner scope not okay
-func _() {
-	goto L /* ERROR "goto L jumps over variable declaration at line 58" */
-	{
-		x := 1
-		_ = x
-	}
-	x := 1
-	_ = x
-L:
-}
-
-// goto across declaration in reverse okay
-func _() {
-L:
-	x := 1
-	_ = x
-	goto L
-}
-
-func _() {
-L: L1:
-	x := 1
-	_ = x
-	goto L
-	goto L1
-}
-
-// error shows first offending variable
-func _() {
-	goto L /* ERROR "goto L jumps over variable declaration at line 84" */
-	x := 1
-	_ = x
-	y := 1
-	_ = y
-L:
-}
-
-// goto not okay even if code path is dead
-func _() {
-	goto L /* ERROR "goto L jumps over variable declaration" */
-	x := 1
-	_ = x
-	y := 1
-	_ = y
-	return
-L:
-}
-
-// goto into outer block okay
-func _() {
-	{
-		goto L
-	}
-L:
-}
-
-func _() {
-	{
-		goto L
-		goto L1
-	}
-L: L1:
-}
-
-// goto backward into outer block okay
-func _() {
-L:
-	{
-		goto L
-	}
-}
-
-func _() {
-L: L1:
-	{
-		goto L
-		goto L1
-	}
-}
-
-// goto into inner block not okay
-func _() {
-	goto L /* ERROR "goto L jumps into block" */
-	{
-	L:
-	}
-}
-
-func _() {
-	goto L /* ERROR "goto L jumps into block" */
-	goto L1 /* ERROR "goto L1 jumps into block" */
-	{
-	L: L1:
-	}
-}
-
-// goto backward into inner block still not okay
-func _() {
-	{
-	L:
-	}
-	goto L /* ERROR "goto L jumps into block" */
-}
-
-func _() {
-	{
-	L: L1:
-	}
-	goto L /* ERROR "goto L jumps into block" */
-	goto L1 /* ERROR "goto L1 jumps into block" */
-}
-
-// error shows first (outermost) offending block
-func _() {
-	goto L /* ERROR "goto L jumps into block" */
-	{
-		{
-			{
-			L:
-			}
-		}
-	}
-}
-
-// error prefers block diagnostic over declaration diagnostic
-func _() {
-	goto L /* ERROR "goto L jumps into block" */
-	x := 1
-	_ = x
-	{
-	L:
-	}
-}
-
-// many kinds of blocks, all invalid to jump into or among,
-// but valid to jump out of
-
-// if
-
-func _() {
-L:
-	if true {
-		goto L
-	}
-}
-
-func _() {
-L:
-	if true {
-		goto L
-	} else {
-	}
-}
-
-func _() {
-L:
-	if false {
-	} else {
-		goto L
-	}
-}
-
-func _() {
-	goto L /* ERROR "goto L jumps into block" */
-	if true {
-	L:
-	}
-}
-
-func _() {
-	goto L /* ERROR "goto L jumps into block" */
-	if true {
-	L:
-	} else {
-	}
-}
-
-func _() {
-	goto L /* ERROR "goto L jumps into block" */
-	if true {
-	} else {
-	L:
-	}
-}
-
-func _() {
-	if false {
-	L:
-	} else {
-		goto L /* ERROR "goto L jumps into block" */
-	}
-}
-
-func _() {
-	if true {
-		goto L /* ERROR "goto L jumps into block" */
-	} else {
-	L:
-	}
-}
-
-func _() {
-	if true {
-		goto L /* ERROR "goto L jumps into block" */
-	} else if false {
-	L:
-	}
-}
-
-func _() {
-	if true {
-		goto L /* ERROR "goto L jumps into block" */
-	} else if false {
-	L:
-	} else {
-	}
-}
-
-func _() {
-	if true {
-		goto L /* ERROR "goto L jumps into block" */
-	} else if false {
-	} else {
-	L:
-	}
-}
-
-func _() {
-	if true {
-		goto L /* ERROR "goto L jumps into block" */
-	} else {
-		L:
-	}
-}
-
-func _() {
-	if true {
-		L:
-	} else {
-		goto L /* ERROR "goto L jumps into block" */
-	}
-}
-
-// for
-
-func _() {
-	for {
-		goto L
-	}
-L:
-}
-
-func _() {
-	for {
-		goto L
-	L:
-	}
-}
-
-func _() {
-	for {
-	L:
-	}
-	goto L /* ERROR "goto L jumps into block" */
-}
-
-func _() {
-	for {
-		goto L
-	L1:
-	}
-L:
-	goto L1 /* ERROR "goto L1 jumps into block" */
-}
-
-func _() {
-	for i < n {
-	L:
-	}
-	goto L /* ERROR "goto L jumps into block" */
-}
-
-func _() {
-	for i = 0; i < n; i++ {
-	L:
-	}
-	goto L /* ERROR "goto L jumps into block" */
-}
-
-func _() {
-	for i = range x {
-	L:
-	}
-	goto L /* ERROR "goto L jumps into block" */
-}
-
-func _() {
-	for i = range c {
-	L:
-	}
-	goto L /* ERROR "goto L jumps into block" */
-}
-
-func _() {
-	for i = range m {
-	L:
-	}
-	goto L /* ERROR "goto L jumps into block" */
-}
-
-func _() {
-	for i = range s {
-	L:
-	}
-	goto L /* ERROR "goto L jumps into block" */
-}
-
-// switch
-
-func _() {
-L:
-	switch i {
-	case 0:
-		goto L
-	}
-}
-
-func _() {
-L:
-	switch i {
-	case 0:
-
-	default:
-		goto L
-	}
-}
-
-func _() {
-	switch i {
-	case 0:
-
-	default:
-	L:
-		goto L
-	}
-}
-
-func _() {
-	switch i {
-	case 0:
-
-	default:
-		goto L
-	L:
-	}
-}
-
-func _() {
-	switch i {
-	case 0:
-		goto L
-	L:
-		;
-	default:
-	}
-}
-
-func _() {
-	goto L /* ERROR "goto L jumps into block" */
-	switch i {
-	case 0:
-	L:
-	}
-}
-
-func _() {
-	goto L /* ERROR "goto L jumps into block" */
-	switch i {
-	case 0:
-	L:
-		;
-	default:
-	}
-}
-
-func _() {
-	goto L /* ERROR "goto L jumps into block" */
-	switch i {
-	case 0:
-	default:
-	L:
-	}
-}
-
-func _() {
-	switch i {
-	default:
-		goto L /* ERROR "goto L jumps into block" */
-	case 0:
-	L:
-	}
-}
-
-func _() {
-	switch i {
-	case 0:
-	L:
-		;
-	default:
-		goto L /* ERROR "goto L jumps into block" */
-	}
-}
-
-// select
-// different from switch.  the statement has no implicit block around it.
-
-func _() {
-L:
-	select {
-	case <-c:
-		goto L
-	}
-}
-
-func _() {
-L:
-	select {
-	case c <- 1:
-
-	default:
-		goto L
-	}
-}
-
-func _() {
-	select {
-	case <-c:
-
-	default:
-	L:
-		goto L
-	}
-}
-
-func _() {
-	select {
-	case c <- 1:
-
-	default:
-		goto L
-	L:
-	}
-}
-
-func _() {
-	select {
-	case <-c:
-		goto L
-	L:
-		;
-	default:
-	}
-}
-
-func _() {
-	goto L /* ERROR "goto L jumps into block" */
-	select {
-	case c <- 1:
-	L:
-	}
-}
-
-func _() {
-	goto L /* ERROR "goto L jumps into block" */
-	select {
-	case c <- 1:
-	L:
-		;
-	default:
-	}
-}
-
-func _() {
-	goto L /* ERROR "goto L jumps into block" */
-	select {
-	case <-c:
-	default:
-	L:
-	}
-}
-
-func _() {
-	select {
-	default:
-		goto L /* ERROR "goto L jumps into block" */
-	case <-c:
-	L:
-	}
-}
-
-func _() {
-	select {
-	case <-c:
-	L:
-		;
-	default:
-		goto L /* ERROR "goto L jumps into block" */
-	}
-}
diff --git a/src/go/types/testdata/importdecl0a.src b/src/go/types/testdata/importdecl0a.src
deleted file mode 100644
index 463dcd0..0000000
--- a/src/go/types/testdata/importdecl0a.src
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package importdecl0
-
-import ()
-
-import (
-	// we can have multiple blank imports (was bug)
-	_ "math"
-	_ "net/rpc"
-	init /* ERROR "cannot declare init" */ "fmt"
-	// reflect defines a type "flag" which shows up in the gc export data
-	"reflect"
-	. /* ERROR "imported but not used" */ "reflect"
-)
-
-import "math" /* ERROR "imported but not used" */
-import m /* ERROR "imported but not used as m" */ "math"
-import _ "math"
-
-import (
-	"math/big" /* ERROR "imported but not used" */
-	b /* ERROR "imported but not used" */ "math/big"
-	_ "math/big"
-)
-
-import "fmt"
-import f1 "fmt"
-import f2 "fmt"
-
-// reflect.flag must not be visible in this package
-type flag int
-type _ reflect /* ERROR "not exported" */ .flag
-
-// imported package name may conflict with local objects
-type reflect /* ERROR "reflect already declared" */ int
-
-// dot-imported exported objects may conflict with local objects
-type Value /* ERROR "Value already declared through dot-import of package reflect" */ struct{}
-
-var _ = fmt.Println // use "fmt"
-
-func _() {
-	f1.Println() // use "fmt"
-}
-
-func _() {
-	_ = func() {
-		f2.Println() // use "fmt"
-	}
-}
diff --git a/src/go/types/testdata/importdecl0b.src b/src/go/types/testdata/importdecl0b.src
deleted file mode 100644
index 6844e70..0000000
--- a/src/go/types/testdata/importdecl0b.src
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package importdecl0
-
-import "math"
-import m "math"
-
-import . "testing" // declares T in file scope
-import . /* ERROR "imported but not used" */ "unsafe"
-import . "fmt"     // declares Println in file scope
-
-import (
-	// TODO(gri) At the moment, 2 errors are reported because both go/parser
-	// and the type checker report it. Eventually, this test should not be
-	// done by the parser anymore.
-	"" /* ERROR invalid import path */ /* ERROR invalid import path */
-	"a!b" /* ERROR invalid import path */ /* ERROR invalid import path */
-	"abc\xffdef" /* ERROR invalid import path */ /* ERROR invalid import path */
-)
-
-// using "math" in this file doesn't affect its use in other files
-const Pi0 = math.Pi
-const Pi1 = m.Pi
-
-type _ T // use "testing"
-
-func _() func() interface{} {
-	return func() interface{} {
-		return Println // use "fmt"
-	}
-}
diff --git a/src/go/types/testdata/importdecl1a.src b/src/go/types/testdata/importdecl1a.src
deleted file mode 100644
index 8301820..0000000
--- a/src/go/types/testdata/importdecl1a.src
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test case for issue 8969.
-
-package importdecl1
-
-import . "unsafe"
-
-var _ Pointer // use dot-imported package unsafe
diff --git a/src/go/types/testdata/importdecl1b.src b/src/go/types/testdata/importdecl1b.src
deleted file mode 100644
index f24bb9a..0000000
--- a/src/go/types/testdata/importdecl1b.src
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package importdecl1
-
-import . /* ERROR "imported but not used" */ "unsafe"
diff --git a/src/go/types/testdata/init0.src b/src/go/types/testdata/init0.src
deleted file mode 100644
index ef0349c..0000000
--- a/src/go/types/testdata/init0.src
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// initialization cycles
-
-package init0
-
-// initialization cycles (we don't know the types)
-const (
-	s0 /* ERROR initialization cycle */ = s0
-
-	x0 /* ERROR initialization cycle */ = y0
-	y0 = x0
-
-	a0 = b0
-	b0 /* ERROR initialization cycle */ = c0
-	c0 = d0
-	d0 = b0
-)
-
-var (
-	s1 /* ERROR initialization cycle */ = s1
-
-	x1 /* ERROR initialization cycle */ = y1
-	y1 = x1
-
-	a1 = b1
-	b1 /* ERROR initialization cycle */ = c1
-	c1 = d1
-	d1 = b1
-)
-
-// initialization cycles (we know the types)
-const (
-	s2 /* ERROR initialization cycle */ int = s2
-
-	x2 /* ERROR initialization cycle */ int = y2
-	y2 = x2
-
-	a2 = b2
-	b2 /* ERROR initialization cycle */ int = c2
-	c2 = d2
-	d2 = b2
-)
-
-var (
-	s3 /* ERROR initialization cycle */ int = s3
-
-	x3 /* ERROR initialization cycle */ int = y3
-	y3 = x3
-
-	a3 = b3
-	b3 /* ERROR initialization cycle */ int = c3
-	c3 = d3
-	d3 = b3
-)
-
-// cycles via struct fields
-
-type S1 struct {
-	f int
-}
-const cx3 S1 /* ERROR invalid constant type */ = S1{cx3.f}
-var vx3 /* ERROR initialization cycle */ S1 = S1{vx3.f}
-
-// cycles via functions
-
-var x4 = x5
-var x5 /* ERROR initialization cycle */ = f1()
-func f1() int { return x5*10 }
-
-var x6, x7 /* ERROR initialization cycle */ = f2()
-var x8 = x7
-func f2() (int, int) { return f3() + f3(), 0 }
-func f3() int { return x8 }
-
-// cycles via closures
-
-var x9 /* ERROR initialization cycle */ = func() int { return x9 }()
-
-var x10 /* ERROR initialization cycle */ = f4()
-
-func f4() int {
-	_ = func() {
-		_ = x10
-	}
-	return 0
-}
-
-// cycles via method expressions
-
-type T1 struct{}
-
-func (T1) m() bool { _ = x11; return false }
-
-var x11 /* ERROR initialization cycle */ = T1.m(T1{})
-
-// cycles via method values
-
-type T2 struct{}
-
-func (T2) m() bool { _ = x12; return false }
-
-var t1 T2
-var x12 /* ERROR initialization cycle */ = t1.m
diff --git a/src/go/types/testdata/init1.src b/src/go/types/testdata/init1.src
deleted file mode 100644
index 39ca314..0000000
--- a/src/go/types/testdata/init1.src
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// initialization cycles
-
-package init1
-
-// issue 6683 (marked as WorkingAsIntended)
-
-type T0 struct{}
-
-func (T0) m() int { return y0 }
-
-var x0 = T0{}
-
-var y0 /* ERROR initialization cycle */ = x0.m()
-
-type T1 struct{}
-
-func (T1) m() int { return y1 }
-
-var x1 interface {
-	m() int
-} = T1{}
-
-var y1 = x1.m() // no cycle reported, x1 is of interface type
-
-// issue 6703 (modified)
-
-var x2 /* ERROR initialization cycle */ = T2.m
-
-var y2 = x2
-
-type T2 struct{}
-
-func (T2) m() int {
-	_ = y2
-	return 0
-}
-
-var x3 /* ERROR initialization cycle */ = T3.m(T3{}) // <<<< added (T3{})
-
-var y3 = x3
-
-type T3 struct{}
-
-func (T3) m() int {
-	_ = y3
-	return 0
-}
-
-var x4 /* ERROR initialization cycle */ = T4{}.m // <<<< added {}
-
-var y4 = x4
-
-type T4 struct{}
-
-func (T4) m() int {
-	_ = y4
-	return 0
-}
-
-var x5 /* ERROR initialization cycle */ = T5{}.m() // <<<< added ()
-
-var y5 = x5
-
-type T5 struct{}
-
-func (T5) m() int {
-	_ = y5
-	return 0
-}
-
-// issue 4847
-// simplified test case
-
-var x6 = f6
-var y6 /* ERROR initialization cycle */ = f6
-func f6() { _ = y6 }
-
-// full test case
-
-type (
-      E int
-      S int
-)
-
-type matcher func(s *S) E
-
-func matchList(s *S) E { return matcher(matchAnyFn)(s) }
-
-var foo = matcher(matchList)
-
-var matchAny /* ERROR initialization cycle */ = matcher(matchList)
-
-func matchAnyFn(s *S) (err E) { return matchAny(s) }
\ No newline at end of file
diff --git a/src/go/types/testdata/init2.src b/src/go/types/testdata/init2.src
deleted file mode 100644
index 614db6c..0000000
--- a/src/go/types/testdata/init2.src
+++ /dev/null
@@ -1,139 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// initialization cycles
-
-package init2
-
-// cycles through functions
-
-func f1() int { _ = x1; return 0 }
-var x1 /* ERROR initialization cycle */ = f1
-
-func f2() int { _ = x2; return 0 }
-var x2 /* ERROR initialization cycle */ = f2()
-
-// cycles through method expressions
-
-type T3 int
-func (T3) m() int { _ = x3; return 0 }
-var x3 /* ERROR initialization cycle */ = T3.m
-
-type T4 int
-func (T4) m() int { _ = x4; return 0 }
-var x4 /* ERROR initialization cycle */ = T4.m(0)
-
-type T3p int
-func (*T3p) m() int { _ = x3p; return 0 }
-var x3p /* ERROR initialization cycle */ = (*T3p).m
-
-type T4p int
-func (*T4p) m() int { _ = x4p; return 0 }
-var x4p /* ERROR initialization cycle */ = (*T4p).m(nil)
-
-// cycles through method expressions of embedded methods
-
-type T5 struct { E5 }
-type E5 int
-func (E5) m() int { _ = x5; return 0 }
-var x5 /* ERROR initialization cycle */ = T5.m
-
-type T6 struct { E6 }
-type E6 int
-func (E6) m() int { _ = x6; return 0 }
-var x6 /* ERROR initialization cycle */ = T6.m(T6{0})
-
-type T5p struct { E5p }
-type E5p int
-func (*E5p) m() int { _ = x5p; return 0 }
-var x5p /* ERROR initialization cycle */ = (*T5p).m
-
-type T6p struct { E6p }
-type E6p int
-func (*E6p) m() int { _ = x6p; return 0 }
-var x6p /* ERROR initialization cycle */ = (*T6p).m(nil)
-
-// cycles through method values
-
-type T7 int
-func (T7) m() int { _ = x7; return 0 }
-var x7 /* ERROR initialization cycle */ = T7(0).m
-
-type T8 int
-func (T8) m() int { _ = x8; return 0 }
-var x8 /* ERROR initialization cycle */ = T8(0).m()
-
-type T7p int
-func (*T7p) m() int { _ = x7p; return 0 }
-var x7p /* ERROR initialization cycle */ = new(T7p).m
-
-type T8p int
-func (*T8p) m() int { _ = x8p; return 0 }
-var x8p /* ERROR initialization cycle */ = new(T8p).m()
-
-type T7v int
-func (T7v) m() int { _ = x7v; return 0 }
-var x7var T7v
-var x7v /* ERROR initialization cycle */ = x7var.m
-
-type T8v int
-func (T8v) m() int { _ = x8v; return 0 }
-var x8var T8v
-var x8v /* ERROR initialization cycle */ = x8var.m()
-
-type T7pv int
-func (*T7pv) m() int { _ = x7pv; return 0 }
-var x7pvar *T7pv
-var x7pv /* ERROR initialization cycle */ = x7pvar.m
-
-type T8pv int
-func (*T8pv) m() int { _ = x8pv; return 0 }
-var x8pvar *T8pv
-var x8pv /* ERROR initialization cycle */ = x8pvar.m()
-
-// cycles through method values of embedded methods
-
-type T9 struct { E9 }
-type E9 int
-func (E9) m() int { _ = x9; return 0 }
-var x9 /* ERROR initialization cycle */ = T9{0}.m
-
-type T10 struct { E10 }
-type E10 int
-func (E10) m() int { _ = x10; return 0 }
-var x10 /* ERROR initialization cycle */ = T10{0}.m()
-
-type T9p struct { E9p }
-type E9p int
-func (*E9p) m() int { _ = x9p; return 0 }
-var x9p /* ERROR initialization cycle */ = new(T9p).m
-
-type T10p struct { E10p }
-type E10p int
-func (*E10p) m() int { _ = x10p; return 0 }
-var x10p /* ERROR initialization cycle */ = new(T10p).m()
-
-type T9v struct { E9v }
-type E9v int
-func (E9v) m() int { _ = x9v; return 0 }
-var x9var T9v
-var x9v /* ERROR initialization cycle */ = x9var.m
-
-type T10v struct { E10v }
-type E10v int
-func (E10v) m() int { _ = x10v; return 0 }
-var x10var T10v
-var x10v /* ERROR initialization cycle */ = x10var.m()
-
-type T9pv struct { E9pv }
-type E9pv int
-func (*E9pv) m() int { _ = x9pv; return 0 }
-var x9pvar *T9pv
-var x9pv /* ERROR initialization cycle */ = x9pvar.m
-
-type T10pv struct { E10pv }
-type E10pv int
-func (*E10pv) m() int { _ = x10pv; return 0 }
-var x10pvar *T10pv
-var x10pv /* ERROR initialization cycle */ = x10pvar.m()
diff --git a/src/go/types/testdata/issues.src b/src/go/types/testdata/issues.src
deleted file mode 100644
index 595a634..0000000
--- a/src/go/types/testdata/issues.src
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package issues
-
-import "fmt"
-
-func issue7035() {
-	type T struct{ X int }
-	_ = func() {
-		fmt.Println() // must refer to imported fmt rather than the fmt below
-	}
-	fmt := new(T)
-	_ = fmt.X
-}
-
-func issue8066() {
-	const (
-		// TODO(gri) Enable test below for releases 1.4 and higher
-		// _ = float32(340282356779733661637539395458142568447)
-		_ = float32(340282356779733661637539395458142568448 /* ERROR cannot convert */ )
-	)
-}
-
-// Check that a missing identifier doesn't lead to a spurious error cascade.
-func issue8799a() {
-	x, ok := missing /* ERROR undeclared */ ()
-	_ = !ok
-	_ = x
-}
-
-func issue8799b(x int, ok bool) {
-	x, ok = missing /* ERROR undeclared */ ()
-	_ = !ok
-	_ = x
-}
-
-func issue9182() {
-	type Point C /* ERROR undeclared */ .Point
-	// no error for composite literal based on unknown type
-	_ = Point{x: 1, y: 2}
-}
-
-func f0() (a []int)         { return }
-func f1() (a []int, b int)  { return }
-func f2() (a, b []int)      { return }
-
-func append_([]int, ...int) {}
-
-func issue9473(a []int, b ...int) {
-	// variadic builtin function
-	_ = append(f0())
-	_ = append(f0(), f0()...)
-	_ = append(f1())
-	_ = append(f2 /* ERROR cannot pass argument */ ())
-	_ = append(f2()... /* ERROR cannot use ... */ )
-	_ = append(f0(), f1 /* ERROR 2-valued expression */ ())
-	_ = append(f0(), f2 /* ERROR 2-valued expression */ ())
-	_ = append(f0(), f1()... /* ERROR cannot use ... */ )
-	_ = append(f0(), f2()... /* ERROR cannot use ... */ )
-
-	// variadic user-defined function
-	append_(f0())
-	append_(f0(), f0()...)
-	append_(f1())
-	append_(f2 /* ERROR cannot pass argument */ ())
-	append_(f2()... /* ERROR cannot use ... */ )
-	append_(f0(), f1 /* ERROR 2-valued expression */ ())
-	append_(f0(), f2 /* ERROR 2-valued expression */ ())
-	append_(f0(), f1()... /* ERROR cannot use */ )
-	append_(f0(), f2()... /* ERROR cannot use */ )
-}
-
-// Check that embedding a non-interface type in an interface results in a good error message.
-func issue10979() {
-	type _ interface {
-		int /* ERROR int is not an interface */
-	}
-	type T struct{}
-	type _ interface {
-		T /* ERROR T is not an interface */
-	}
-	type _ interface {
-		nosuchtype /* ERROR undeclared name: nosuchtype */
-	}
-	type _ interface {
-		fmt /* ERROR Nosuchtype not declared by package fmt */ .Nosuchtype
-	}
-	type _ interface {
-		nosuchpkg /* ERROR undeclared name: nosuchpkg */ .Nosuchtype
-	}
-	type I interface {
-		I /* ERROR I\.m \(value of type func\(I\)\) is not a type */ .m
-		m()
-	}
-}
diff --git a/src/go/types/testdata/labels.src b/src/go/types/testdata/labels.src
deleted file mode 100644
index 102ffc7..0000000
--- a/src/go/types/testdata/labels.src
+++ /dev/null
@@ -1,207 +0,0 @@
-// Copyright 2011 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file is a modified concatenation of the files
-// $GOROOT/test/label.go and $GOROOT/test/label1.go.
-
-package labels
-
-var x int
-
-func f0() {
-L1 /* ERROR "label L1 declared but not used" */ :
-	for {
-	}
-L2 /* ERROR "label L2 declared but not used" */ :
-	select {
-	}
-L3 /* ERROR "label L3 declared but not used" */ :
-	switch {
-	}
-L4 /* ERROR "label L4 declared but not used" */ :
-	if true {
-	}
-L5 /* ERROR "label L5 declared but not used" */ :
-	f0()
-L6:
-	f0()
-L6 /* ERROR "label L6 already declared" */ :
-	f0()
-	if x == 20 {
-		goto L6
-	}
-
-L7:
-	for {
-		break L7
-		break L8 /* ERROR "invalid break label L8" */
-	}
-
-// A label must be directly associated with a switch, select, or
-// for statement; it cannot be the label of a labeled statement.
-
-L7a /* ERROR "declared but not used" */ : L7b:
-	for {
-		break L7a /* ERROR "invalid break label L7a" */
-		continue L7a /* ERROR "invalid continue label L7a" */
-		continue L7b
-	}
-
-L8:
-	for {
-		if x == 21 {
-			continue L8
-			continue L7 /* ERROR "invalid continue label L7" */
-		}
-	}
-
-L9:
-	switch {
-	case true:
-		break L9
-	defalt /* ERROR "label defalt declared but not used" */ :
-	}
-
-L10:
-	select {
-	default:
-		break L10
-		break L9 /* ERROR "invalid break label L9" */
-	}
-
-	goto L10a
-L10a: L10b:
-	select {
-	default:
-		break L10a /* ERROR "invalid break label L10a" */
-		break L10b
-		continue L10b /* ERROR "invalid continue label L10b" */
-	}
-}
-
-func f1() {
-L1:
-	for {
-		if x == 0 {
-			break L1
-		}
-		if x == 1 {
-			continue L1
-		}
-		goto L1
-	}
-
-L2:
-	select {
-	default:
-		if x == 0 {
-			break L2
-		}
-		if x == 1 {
-			continue L2 /* ERROR "invalid continue label L2" */
-		}
-		goto L2
-	}
-
-L3:
-	switch {
-	case x > 10:
-		if x == 11 {
-			break L3
-		}
-		if x == 12 {
-			continue L3 /* ERROR "invalid continue label L3" */
-		}
-		goto L3
-	}
-
-L4:
-	if true {
-		if x == 13 {
-			break L4 /* ERROR "invalid break label L4" */
-		}
-		if x == 14 {
-			continue L4 /* ERROR "invalid continue label L4" */
-		}
-		if x == 15 {
-			goto L4
-		}
-	}
-
-L5:
-	f1()
-	if x == 16 {
-		break L5 /* ERROR "invalid break label L5" */
-	}
-	if x == 17 {
-		continue L5 /* ERROR "invalid continue label L5" */
-	}
-	if x == 18 {
-		goto L5
-	}
-
-	for {
-		if x == 19 {
-			break L1 /* ERROR "invalid break label L1" */
-		}
-		if x == 20 {
-			continue L1 /* ERROR "invalid continue label L1" */
-		}
-		if x == 21 {
-			goto L1
-		}
-	}
-}
-
-// Additional tests not in the original files.
-
-func f2() {
-L1 /* ERROR "label L1 declared but not used" */ :
-	if x == 0 {
-		for {
-			continue L1 /* ERROR "invalid continue label L1" */
-		}
-	}
-}
-
-func f3() {
-L1:
-L2:
-L3:
-	for {
-		break L1 /* ERROR "invalid break label L1" */
-		break L2 /* ERROR "invalid break label L2" */
-		break L3
-		continue L1 /* ERROR "invalid continue label L1" */
-		continue L2 /* ERROR "invalid continue label L2" */
-		continue L3
-		goto L1
-		goto L2
-		goto L3
-	}
-}
-
-// Blank labels are never declared.
-
-func f4() {
-_:
-_: // multiple blank labels are ok
-	goto _ /* ERROR "label _ not declared" */
-}
-
-func f5() {
-_:
-	for {
-		break _ /* ERROR "invalid break label _" */
-		continue _ /* ERROR "invalid continue label _" */
-	}
-}
-
-func f6() {
-_:
-	switch {
-	default:
-		break _ /* ERROR "invalid break label _" */
-	}
-}
diff --git a/src/go/types/testdata/methodsets.src b/src/go/types/testdata/methodsets.src
deleted file mode 100644
index 8921146..0000000
--- a/src/go/types/testdata/methodsets.src
+++ /dev/null
@@ -1,214 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package methodsets
-
-type T0 struct {}
-
-func (T0) v0() {}
-func (*T0) p0() {}
-
-type T1 struct {} // like T0 with different method names
-
-func (T1) v1() {}
-func (*T1) p1() {}
-
-type T2 interface {
-	v2()
-	p2()
-}
-
-type T3 struct {
-	T0
-	*T1
-	T2
-}
-
-// Method expressions
-func _() {
-	var (
-		_ func(T0) = T0.v0
-		_ = T0 /* ERROR "not in method set" */ .p0
-
-		_ func (*T0) = (*T0).v0
-		_ func (*T0) = (*T0).p0
-
-		// T1 is like T0
-
-		_ func(T2) = T2.v2
-		_ func(T2) = T2.p2
-
-		_ func(T3) = T3.v0
-		_ func(T3) = T3 /* ERROR "not in method set" */ .p0
-		_ func(T3) = T3.v1
-		_ func(T3) = T3.p1
-		_ func(T3) = T3.v2
-		_ func(T3) = T3.p2
-
-		_ func(*T3) = (*T3).v0
-		_ func(*T3) = (*T3).p0
-		_ func(*T3) = (*T3).v1
-		_ func(*T3) = (*T3).p1
-		_ func(*T3) = (*T3).v2
-		_ func(*T3) = (*T3).p2
-	)
-}
-
-// Method values with addressable receivers
-func _() {
-	var (
-		v0 T0
-		_ func() = v0.v0
-		_ func() = v0.p0
-	)
-
-	var (
-		p0 *T0
-		_ func() = p0.v0
-		_ func() = p0.p0
-	)
-
-	// T1 is like T0
-
-	var (
-		v2 T2
-		_ func() = v2.v2
-		_ func() = v2.p2
-	)
-
-	var (
-		v4 T3
-		_ func() = v4.v0
-		_ func() = v4.p0
-		_ func() = v4.v1
-		_ func() = v4.p1
-		_ func() = v4.v2
-		_ func() = v4.p2
-	)
-
-	var (
-		p4 *T3
-		_ func() = p4.v0
-		_ func() = p4.p0
-		_ func() = p4.v1
-		_ func() = p4.p1
-		_ func() = p4.v2
-		_ func() = p4.p2
-	)
-}
-
-// Method calls with addressable receivers
-func _() {
-	var v0 T0
-	v0.v0()
-	v0.p0()
-
-	var p0 *T0
-	p0.v0()
-	p0.p0()
-
-	// T1 is like T0
-
-	var v2 T2
-	v2.v2()
-	v2.p2()
-
-	var v4 T3
-	v4.v0()
-	v4.p0()
-	v4.v1()
-	v4.p1()
-	v4.v2()
-	v4.p2()
-
-	var p4 *T3
-	p4.v0()
-	p4.p0()
-	p4.v1()
-	p4.p1()
-	p4.v2()
-	p4.p2()
-}
-
-// Method values with value receivers
-func _() {
-	var (
-		_ func() = T0{}.v0
-		_ func() = T0 /* ERROR "not in method set" */ {}.p0
-
-		_ func() = (&T0{}).v0
-		_ func() = (&T0{}).p0
-
-		// T1 is like T0
-
-		// no values for T2
-
-		_ func() = T3{}.v0
-		_ func() = T3 /* ERROR "not in method set" */ {}.p0
-		_ func() = T3{}.v1
-		_ func() = T3{}.p1
-		_ func() = T3{}.v2
-		_ func() = T3{}.p2
-
-		_ func() = (&T3{}).v0
-		_ func() = (&T3{}).p0
-		_ func() = (&T3{}).v1
-		_ func() = (&T3{}).p1
-		_ func() = (&T3{}).v2
-		_ func() = (&T3{}).p2
-	)
-}
-
-// Method calls with value receivers
-func _() {
-	T0{}.v0()
-	T0 /* ERROR "not in method set" */ {}.p0()
-
-	(&T0{}).v0()
-	(&T0{}).p0()
-
-	// T1 is like T0
-
-	// no values for T2
-
-	T3{}.v0()
-	T3 /* ERROR "not in method set" */ {}.p0()
-	T3{}.v1()
-	T3{}.p1()
-	T3{}.v2()
-	T3{}.p2()
-
-	(&T3{}).v0()
-	(&T3{}).p0()
-	(&T3{}).v1()
-	(&T3{}).p1()
-	(&T3{}).v2()
-	(&T3{}).p2()
-}
-
-// *T has no methods if T is an interface type
-func issue5918() {
-	var (
-		err error
-		_ = err.Error()
-		_ func() string = err.Error
-		_ func(error) string = error.Error
-
-		perr = &err
-		_ = perr /* ERROR "no field or method" */ .Error()
-		_ func() string = perr /* ERROR "no field or method" */ .Error
-		_ func(*error) string = ( /* ERROR "no field or method" */ *error).Error
-	)
-
-	type T *interface{ m() int }
-	var (
-		x T
-		_ = (*x).m()
-		_ = (*x).m
-
-		_ = x /* ERROR "no field or method" */ .m()
-		_ = x /* ERROR "no field or method" */ .m
-		_ = T /* ERROR "no field or method" */ .m
-	)
-}
diff --git a/src/go/types/testdata/shifts.src b/src/go/types/testdata/shifts.src
deleted file mode 100644
index 64865fc..0000000
--- a/src/go/types/testdata/shifts.src
+++ /dev/null
@@ -1,341 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package shifts
-
-func shifts0() {
-	// basic constant shifts
-	const (
-		s = 10
-		_ = 0<<0
-		_ = 1<<s
-		_ = 1<<- /* ERROR "stupid shift" */ 1
-		_ = 1<<1075 /* ERROR "stupid shift" */
-		_ = 2.0<<1
-
-		_ int = 2<<s
-		_ float32 = 2<<s
-		_ complex64 = 2<<s
-
-		_ int = 2.0<<s
-		_ float32 = 2.0<<s
-		_ complex64 = 2.0<<s
-
-		_ int = 'a'<<s
-		_ float32 = 'a'<<s
-		_ complex64 = 'a'<<s
-	)
-}
-
-func shifts1() {
-	// basic non-constant shifts
-	var (
-		i int
-		u uint
-
-		_ = 1<<0
-		_ = 1<<i /* ERROR "must be unsigned" */
-		_ = 1<<u
-		_ = 1<<"foo" /* ERROR "cannot convert" */
-		_ = i<<0
-		_ = i<<- /* ERROR "must not be negative" */ 1
-		_ = 1 /* ERROR "overflows" */ <<100
-
-		_ uint = 1 << 0
-		_ uint = 1 << u
-		_ float32 = 1 /* ERROR "must be integer" */ << u
-	)
-}
-
-func shifts2() {
-	// from the spec
-	var (
-		s uint = 33
-		i = 1<<s           // 1 has type int
-		j int32 = 1<<s     // 1 has type int32; j == 0
-		k = uint64(1<<s)   // 1 has type uint64; k == 1<<33
-		m int = 1.0<<s     // 1.0 has type int
-		n = 1.0<<s != i    // 1.0 has type int; n == false if ints are 32bits in size
-		o = 1<<s == 2<<s   // 1 and 2 have type int; o == true if ints are 32bits in size
-		p = 1<<s == 1<<33  // illegal if ints are 32bits in size: 1 has type int, but 1<<33 overflows int
-		u = 1.0 /* ERROR "must be integer" */ <<s         // illegal: 1.0 has type float64, cannot shift
-		u1 = 1.0 /* ERROR "must be integer" */ <<s != 0   // illegal: 1.0 has type float64, cannot shift
-		u2 = 1 /* ERROR "must be integer" */ <<s != 1.0   // illegal: 1 has type float64, cannot shift
-		v float32 = 1 /* ERROR "must be integer" */ <<s   // illegal: 1 has type float32, cannot shift
-		w int64 = 1.0<<33  // 1.0<<33 is a constant shift expression
-	)
-	_, _, _, _, _, _, _, _, _, _, _, _ = i, j, k, m, n, o, p, u, u1, u2, v, w
-}
-
-func shifts3(a int16, b float32) {
-	// random tests
-	var (
-		s uint = 11
-		u = 1 /* ERROR "must be integer" */ <<s + 1.0
-		v complex128 = 1 /* ERROR "must be integer" */ << s + 1.0 /* ERROR "must be integer" */ << s + 1
-	)
-	x := 1.0 /* ERROR "must be integer" */ <<s + 1
-	shifts3(1.0 << s, 1 /* ERROR "must be integer" */ >> s)
-	_, _, _ = u, v, x
-}
-
-func shifts4() {
-	// shifts in comparisons w/ untyped operands
-	var s uint
-
-	_ = 1<<s == 1
-	_ = 1 /* ERROR "integer" */ <<s == 1.
-	_ = 1. /* ERROR "integer" */ <<s == 1
-	_ = 1. /* ERROR "integer" */ <<s == 1.
-
-	_ = 1<<s + 1 == 1
-	_ = 1 /* ERROR "integer" */ <<s + 1 == 1.
-	_ = 1 /* ERROR "integer" */ <<s + 1. == 1
-	_ = 1 /* ERROR "integer" */ <<s + 1. == 1.
-	_ = 1. /* ERROR "integer" */ <<s + 1 == 1
-	_ = 1. /* ERROR "integer" */ <<s + 1 == 1.
-	_ = 1. /* ERROR "integer" */ <<s + 1. == 1
-	_ = 1. /* ERROR "integer" */ <<s + 1. == 1.
-
-	_ = 1<<s == 1<<s
-	_ = 1 /* ERROR "integer" */ <<s == 1. /* ERROR "integer" */ <<s
-	_ = 1. /* ERROR "integer" */ <<s == 1 /* ERROR "integer" */ <<s
-	_ = 1. /* ERROR "integer" */ <<s == 1. /* ERROR "integer" */ <<s
-
-	_ = 1<<s + 1<<s == 1
-	_ = 1 /* ERROR "integer" */ <<s + 1 /* ERROR "integer" */ <<s == 1.
-	_ = 1 /* ERROR "integer" */ <<s + 1. /* ERROR "integer" */ <<s == 1
-	_ = 1 /* ERROR "integer" */ <<s + 1. /* ERROR "integer" */ <<s == 1.
-	_ = 1. /* ERROR "integer" */ <<s + 1 /* ERROR "integer" */ <<s == 1
-	_ = 1. /* ERROR "integer" */ <<s + 1 /* ERROR "integer" */ <<s == 1.
-	_ = 1. /* ERROR "integer" */ <<s + 1. /* ERROR "integer" */ <<s == 1
-	_ = 1. /* ERROR "integer" */ <<s + 1. /* ERROR "integer" */ <<s == 1.
-
-	_ = 1<<s + 1<<s == 1<<s + 1<<s
-	_ = 1 /* ERROR "integer" */ <<s + 1 /* ERROR "integer" */ <<s == 1 /* ERROR "integer" */ <<s + 1. /* ERROR "integer" */ <<s
-	_ = 1 /* ERROR "integer" */ <<s + 1 /* ERROR "integer" */ <<s == 1. /* ERROR "integer" */ <<s + 1 /* ERROR "integer" */ <<s
-	_ = 1 /* ERROR "integer" */ <<s + 1 /* ERROR "integer" */ <<s == 1. /* ERROR "integer" */ <<s + 1. /* ERROR "integer" */ <<s
-	_ = 1 /* ERROR "integer" */ <<s + 1. /* ERROR "integer" */ <<s == 1 /* ERROR "integer" */ <<s + 1 /* ERROR "integer" */ <<s
-	_ = 1 /* ERROR "integer" */ <<s + 1. /* ERROR "integer" */ <<s == 1 /* ERROR "integer" */ <<s + 1. /* ERROR "integer" */ <<s
-	_ = 1 /* ERROR "integer" */ <<s + 1. /* ERROR "integer" */ <<s == 1. /* ERROR "integer" */ <<s + 1 /* ERROR "integer" */ <<s
-	_ = 1 /* ERROR "integer" */ <<s + 1. /* ERROR "integer" */ <<s == 1. /* ERROR "integer" */ <<s + 1. /* ERROR "integer" */ <<s
-	_ = 1. /* ERROR "integer" */ <<s + 1 /* ERROR "integer" */ <<s == 1 /* ERROR "integer" */ <<s + 1 /* ERROR "integer" */ <<s
-	_ = 1. /* ERROR "integer" */ <<s + 1 /* ERROR "integer" */ <<s == 1 /* ERROR "integer" */ <<s + 1. /* ERROR "integer" */ <<s
-	_ = 1. /* ERROR "integer" */ <<s + 1 /* ERROR "integer" */ <<s == 1. /* ERROR "integer" */ <<s + 1 /* ERROR "integer" */ <<s
-	_ = 1. /* ERROR "integer" */ <<s + 1 /* ERROR "integer" */ <<s == 1. /* ERROR "integer" */ <<s + 1. /* ERROR "integer" */ <<s
-	_ = 1. /* ERROR "integer" */ <<s + 1. /* ERROR "integer" */ <<s == 1 /* ERROR "integer" */ <<s + 1 /* ERROR "integer" */ <<s
-	_ = 1. /* ERROR "integer" */ <<s + 1. /* ERROR "integer" */ <<s == 1 /* ERROR "integer" */ <<s + 1. /* ERROR "integer" */ <<s
-	_ = 1. /* ERROR "integer" */ <<s + 1. /* ERROR "integer" */ <<s == 1. /* ERROR "integer" */ <<s + 1 /* ERROR "integer" */ <<s
-	_ = 1. /* ERROR "integer" */ <<s + 1. /* ERROR "integer" */ <<s == 1. /* ERROR "integer" */ <<s + 1. /* ERROR "integer" */ <<s
-}
-
-func shifts5() {
-	// shifts in comparisons w/ typed operands
-	var s uint
-	var x int
-
-	_ = 1<<s == x
-	_ = 1.<<s == x
-	_ = 1.1 /* ERROR "int" */ <<s == x
-
-	_ = 1<<s + x == 1
-	_ = 1<<s + x == 1.
-	_ = 1<<s + x == 1.1 /* ERROR "int" */
-	_ = 1.<<s + x == 1
-	_ = 1.<<s + x == 1.
-	_ = 1.<<s + x == 1.1 /* ERROR "int" */
-	_ = 1.1 /* ERROR "int" */ <<s + x == 1
-	_ = 1.1 /* ERROR "int" */ <<s + x == 1.
-	_ = 1.1 /* ERROR "int" */ <<s + x == 1.1
-
-	_ = 1<<s == x<<s
-	_ = 1.<<s == x<<s
-	_ = 1.1  /* ERROR "int" */ <<s == x<<s
-}
-
-func shifts6() {
-	// shifts as operands in non-arithmetic operations and as arguments
-	var a [10]int
-	var s uint
-
-	_ = a[1<<s]
-	_ = a[1.0]
-	_ = a[1.0<<s]
-
-	_ = make([]int, 1.0)
-	_ = make([]int, 1.0<<s)
-	_ = make([]int, 1.1 /* ERROR "must be integer" */ <<s)
-
-	_ = float32(1)
-	_ = float32(1 /* ERROR "must be integer" */ <<s)
-	_ = float32(1.0)
-	_ = float32(1.0 /* ERROR "must be integer" */ <<s)
-	_ = float32(1.1 /* ERROR "must be integer" */ <<s)
-
-	var b []int
-	_ = append(b, 1<<s)
-	_ = append(b, 1.0<<s)
-	_ = append(b, 1.1 /* ERROR "must be integer" */ <<s)
-
-	_ = append(b, 1<<s)
-	_ = append(b, 1.0<<s) // should fail - see TODO in append code
-	_ = append(b, 1.1 /* ERROR "must be integer" */ <<s)
-
-	_ = complex(1.0 /* ERROR "must be integer" */ <<s, 0)
-	_ = complex(1.1 /* ERROR "must be integer" */ <<s, 0)
-	_ = complex(0, 1.0 /* ERROR "must be integer" */ <<s)
-	_ = complex(0, 1.1 /* ERROR "must be integer" */ <<s)
-
-	// TODO(gri) The delete below is not type-checked correctly yet.
-	// var m1 map[int]string
-	// delete(m1, 1<<s)
-}
-
-func shifts7() {
-	// shifts of shifts
-	var s uint
-	var x int
-	_ = x
-
-	_ = 1<<(1<<s)
-	_ = 1<<(1.<<s)
-	_ = 1. /* ERROR "integer" */ <<(1<<s)
-	_ = 1. /* ERROR "integer" */ <<(1.<<s)
-
-	x = 1<<(1<<s)
-	x = 1<<(1.<<s)
-	x = 1.<<(1<<s)
-	x = 1.<<(1.<<s)
-
-	_ = (1<<s)<<(1<<s)
-	_ = (1<<s)<<(1.<<s)
-	_ = ( /* ERROR "integer" */ 1.<<s)<<(1<<s)
-	_ = ( /* ERROR "integer" */ 1.<<s)<<(1.<<s)
-
-	x = (1<<s)<<(1<<s)
-	x = (1<<s)<<(1.<<s)
-	x = ( /* ERROR "integer" */ 1.<<s)<<(1<<s)
-	x = ( /* ERROR "integer" */ 1.<<s)<<(1.<<s)
-}
-
-func shifts8() {
-	// shift examples from shift discussion: better error messages
-	var s uint
-	_ = 1.0 /* ERROR "shifted operand 1.0 \(type float64\) must be integer" */ <<s == 1
-	_ = 1.0 /* ERROR "shifted operand 1.0 \(type float64\) must be integer" */ <<s == 1.0
-	_ = 1 /* ERROR "shifted operand 1 \(type float64\) must be integer" */ <<s == 1.0
-	_ = 1 /* ERROR "shifted operand 1 \(type float64\) must be integer" */ <<s + 1.0 == 1
-	_ = 1 /* ERROR "shifted operand 1 \(type float64\) must be integer" */ <<s + 1.1 == 1
-	_ = 1 /* ERROR "shifted operand 1 \(type float64\) must be integer" */ <<s + 1 == 1.0
-
-	// additional cases
-	_ = complex(1.0 /* ERROR "shifted operand 1.0 \(type float64\) must be integer" */ <<s, 1)
-	_ = complex(1.0, 1 /* ERROR "shifted operand 1 \(type float64\) must be integer" */ <<s)
-
-	_ = int(1.<<s)
-	_ = int(1.1 /* ERROR "shifted operand .* must be integer" */ <<s)
-	_ = float32(1 /* ERROR "shifted operand .* must be integer" */ <<s)
-	_ = float32(1. /* ERROR "shifted operand .* must be integer" */ <<s)
-	_ = float32(1.1 /* ERROR "shifted operand .* must be integer" */ <<s)
-	// TODO(gri) the error messages for these two are incorrect - disabled for now
-	// _ = complex64(1<<s)
-	// _ = complex64(1.<<s)
-	_ = complex64(1.1 /* ERROR "shifted operand .* must be integer" */ <<s)
-}
-
-func shifts9() {
-	// various originally failing snippets of code from the std library
-	// from src/compress/lzw/reader.go:90
-	{
-		var d struct {
-			bits     uint32
-			width    uint
-		}
-		_ = uint16(d.bits & (1<<d.width - 1))
-	}
-
-	// from src/debug/dwarf/buf.go:116
-	{
-		var ux uint64
-		var bits uint
-		x := int64(ux)
-		if x&(1<<(bits-1)) != 0 {}
-	}
-
-	// from src/encoding/asn1/asn1.go:160
-	{
-		var bytes []byte
-		if bytes[len(bytes)-1]&((1<<bytes[0])-1) != 0 {}
-	}
-
-	// from src/math/big/rat.go:140
-	{
-		var exp int
-		var mantissa uint64
-		shift := uint64(-1022 - (exp - 1)) // [1..53)
-		_ = mantissa & (1<<shift - 1)
-	}
-
-	// from src/net/interface.go:51
-	{
-		type Flags uint
-		var f Flags
-		var i int
-		if f&(1<<uint(i)) != 0 {}
-	}
-
-	// from src/runtime/softfloat64.go:234
-	{
-		var gm uint64
-		var shift uint
-		_ = gm & (1<<shift - 1)
-	}
-
-	// from src/strconv/atof.go:326
-	{
-		var mant uint64
-		var mantbits uint
-		if mant == 2<<mantbits {}
-	}
-
-	// from src/route_bsd.go:82
-	{
-		var Addrs int32
-		const rtaRtMask = 1
-		var i uint
-		if Addrs&rtaRtMask&(1<<i) == 0 {}
-	}
-
-	// from src/text/scanner/scanner.go:540
-	{
-		var s struct { Whitespace uint64 }
-		var ch rune
-		for s.Whitespace&(1<<uint(ch)) != 0 {}
-	}
-}
-
-func issue5895() {
-	var x = 'a' << 1 // type of x must be rune
-	var _ rune = x
-}
-
-func issue11325() {
-	var _ = 0 >> 1.1 /* ERROR "must be unsigned integer" */ // example from issue 11325
-	_ = 0 >> 1.1 /* ERROR "must be unsigned integer" */
-	_ = 0 << 1.1 /* ERROR "must be unsigned integer" */
-	_ = 0 >> 1.
-	_ = 1 >> 1.1 /* ERROR "must be unsigned integer" */
-	_ = 1 >> 1.
-	_ = 1. >> 1
-	_ = 1. >> 1.
-	_ = 1.1 /* ERROR "must be integer" */ >> 1
-}
-
-func issue11594() {
-	var _ = complex64 /* ERROR "must be integer" */ (1) << 2 // example from issue 11594
-	_ = float32 /* ERROR "must be integer" */ (0) << 1
-	_ = float64 /* ERROR "must be integer" */ (0) >> 2
-	_ = complex64 /* ERROR "must be integer" */ (0) << 3
-	_ = complex64 /* ERROR "must be integer" */ (0) >> 4
-}
\ No newline at end of file
diff --git a/src/go/types/testdata/stmt0.src b/src/go/types/testdata/stmt0.src
deleted file mode 100644
index fd1ddba..0000000
--- a/src/go/types/testdata/stmt0.src
+++ /dev/null
@@ -1,833 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// statements
-
-package stmt0
-
-func assignments0() (int, int) {
-	var a, b, c int
-	var ch chan int
-	f0 := func() {}
-	f1 := func() int { return 1 }
-	f2 := func() (int, int) { return 1, 2 }
-	f3 := func() (int, int, int) { return 1, 2, 3 }
-
-	a, b, c = 1, 2, 3
-	a, b, c = 1 /* ERROR "assignment count mismatch" */ , 2
-	a, b, c = 1 /* ERROR "assignment count mismatch" */ , 2, 3, 4
-	_, _, _ = a, b, c
-
-	a = f0 /* ERROR "used as value" */ ()
-	a = f1()
-	a = f2 /* ERROR "assignment count mismatch" */ ()
-	a, b = f2()
-	a, b, c = f2 /* ERROR "assignment count mismatch" */ ()
-	a, b, c = f3()
-	a, b = f3 /* ERROR "assignment count mismatch" */ ()
-
-	a, b, c = <- /* ERROR "assignment count mismatch" */ ch
-
-	return /* ERROR "wrong number of return values" */
-	return /* ERROR "wrong number of return values" */ 1
-	return 1, 2
-	return /* ERROR "wrong number of return values" */ 1, 2, 3
-}
-
-func assignments1() {
-	b, i, f, c, s := false, 1, 1.0, 1i, "foo"
-	b = i /* ERROR "cannot assign" */
-	i = f /* ERROR "cannot assign" */
-	f = c /* ERROR "cannot assign" */
-	c = s /* ERROR "cannot assign" */
-	s = b /* ERROR "cannot assign" */
-
-	v0, v1, v2 := 1 /* ERROR "mismatch" */ , 2, 3, 4
-	_, _, _ = v0, v1, v2
-
-	b = true
-
-	i += 1
-	i += "foo" /* ERROR "cannot convert.*int" */
-
-	f -= 1
-	f /= 0
-	f = float32(0)/0 /* ERROR "division by zero" */
-	f -= "foo" /* ERROR "cannot convert.*float64" */
-
-	c *= 1
-	c /= 0
-
-	s += "bar"
-	s += 1 /* ERROR "cannot convert.*string" */
-
-	var u64 uint64
-	u64 += 1<<u64
-
-	undeclared /* ERROR "undeclared" */ = 991
-
-	// test cases for issue 5800
-	var (
-		_ int = nil /* ERROR "untyped nil value" */
-		_ [10]int = nil /* ERROR "untyped nil value" */
-		_ []byte = nil
-		_ struct{} = nil /* ERROR "untyped nil value" */
-		_ func() = nil
-		_ map[int]string = nil
-		_ chan int = nil
-	)
-
-	// test cases for issue 5500
-	_ = func() (int, bool) {
-		var m map[int]int
-		return /* ERROR "wrong number of return values" */ m[0]
-	}
-
-	g := func(int, bool){}
-	var m map[int]int
-	g(m[0]) /* ERROR "too few arguments" */
-
-	// assignments to _
-	_ = nil /* ERROR "use of untyped nil" */
-	_ = 1 /* ERROR overflow */ <<1000
-	(_) = 0
-}
-
-func assignments2() {
-	type mybool bool
-	var m map[string][]bool
-	var s []bool
-	var b bool
-	var d mybool
-	_ = s
-	_ = b
-	_ = d
-
-	// assignments to map index expressions are ok
-	s, b = m["foo"]
-	_, d = m["bar"]
-	m["foo"] = nil
-	m["foo"] = nil /* ERROR assignment count mismatch */ , false
-	_ = append(m["foo"])
-	_ = append(m["foo"], true)
-
-	var c chan int
-	_, b = <-c
-	_, d = <-c
-	<- /* ERROR cannot assign */ c = 0
-	<-c = 0 /* ERROR assignment count mismatch */ , false
-
-	var x interface{}
-	_, b = x.(int)
-	x /* ERROR cannot assign */ .(int) = 0
-	x.(int) = 0 /* ERROR assignment count mismatch */ , false
-
-	assignments2 /* ERROR used as value */ () = nil
-	int /* ERROR not an expression */ = 0
-}
-
-func issue6487() {
-	type S struct{x int}
-	_ = &S /* ERROR "cannot take address" */ {}.x
-	_ = &( /* ERROR "cannot take address" */ S{}.x)
-	_ = (&S{}).x
-	S /* ERROR "cannot assign" */ {}.x = 0
-	(&S{}).x = 0
-
-	type M map[string]S
-	var m M
-	m /* ERROR "cannot assign" */ ["foo"].x = 0
-	_ = &( /* ERROR "cannot take address" */ m["foo"].x)
-	_ = &m /* ERROR "cannot take address" */ ["foo"].x
-}
-
-func issue6766a() {
-	a, a /* ERROR redeclared */ := 1, 2
-	_ = a
-	a, b, b /* ERROR redeclared */ := 1, 2, 3
-	_ = b
-	c, c /* ERROR redeclared */, b := 1, 2, 3
-	_ = c
-	a, b := /* ERROR no new variables */ 1, 2
-}
-
-func shortVarDecls1() {
-	const c = 0
-	type d int
-	a, b, c /* ERROR "cannot assign" */ , d /* ERROR "cannot assign" */  := 1, "zwei", 3.0, 4
-	var _ int = a // a is of type int
-	var _ string = b // b is of type string
-}
-
-func incdecs() {
-	const c = 3.14
-	c /* ERROR "cannot assign" */ ++
-	s := "foo"
-	s /* ERROR "cannot convert" */ --
-	3.14 /* ERROR "cannot assign" */ ++
-	var (
-		x int
-		y float32
-		z complex128
-	)
-	x++
-	y--
-	z++
-}
-
-func sends() {
-	var ch chan int
-	var rch <-chan int
-	var x int
-	x /* ERROR "cannot send" */ <- x
-	rch /* ERROR "cannot send" */ <- x
-	ch <- "foo" /* ERROR "cannot convert" */
-	ch <- x
-}
-
-func selects() {
-	select {}
-	var (
-		ch chan int
-		sc chan <- bool
-	)
-	select {
-	case <-ch:
-	case (<-ch):
-	case t := <-ch:
-		_ = t
-	case t := (<-ch):
-		_ = t
-	case t, ok := <-ch:
-		_, _ = t, ok
-	case t, ok := (<-ch):
-		_, _ = t, ok
-	case <-sc /* ERROR "cannot receive from send-only channel" */ :
-	}
-	select {
-	default:
-	default /* ERROR "multiple defaults" */ :
-	}
-	select {
-	case a, b := <-ch:
-		_, b = a, b
-	case x /* ERROR send or receive */ :
-	case a /* ERROR send or receive */ := ch:
-	}
-
-	// test for issue 9570: ch2 in second case falsely resolved to
-	// ch2 declared in body of first case
-	ch1 := make(chan int)
-	ch2 := make(chan int)
-	select {
-	case <-ch1:
-		var ch2 /* ERROR ch2 declared but not used */ chan bool
-	case i := <-ch2:
-		print(i + 1)
-	}
-}
-
-func gos() {
-	go 1 /* ERROR HERE "function must be invoked" */
-	go int /* ERROR "go requires function call, not conversion" */ (0)
-	go gos()
-	var c chan int
-	go close(c)
-	go len /* ERROR "go discards result" */ (c)
-}
-
-func defers() {
-	defer 1 /* ERROR HERE "function must be invoked" */
-	defer int /* ERROR "defer requires function call, not conversion" */ (0)
-	defer defers()
-	var c chan int
-	defer close(c)
-	defer len /* ERROR "defer discards result" */ (c)
-}
-
-func breaks() {
-	var x, y int
-
-	break /* ERROR "break" */
-	{
-		break /* ERROR "break" */
-	}
-	if x < y {
-		break /* ERROR "break" */
-	}
-
-	switch x {
-	case 0:
-		break
-	case 1:
-		if x == y {
-			break
-		}
-	default:
-		break
-		break
-	}
-
-	var z interface{}
-	switch z.(type) {
-	case int:
-		break
-	}
-
-	for {
-		break
-	}
-
-	var a []int
-	for _ = range a {
-		break
-	}
-
-	for {
-		if x == y {
-			break
-		}
-	}
-
-	var ch chan int
-	select {
-	case <-ch:
-		break
-	}
-
-	select {
-	case <-ch:
-		if x == y {
-			break
-		}
-	default:
-		break
-	}
-}
-
-func continues() {
-	var x, y int
-
-	continue /* ERROR "continue" */
-	{
-		continue /* ERROR "continue" */
-	}
-
-	if x < y {
-		continue /* ERROR "continue" */
-	}
-
-	switch x {
-	case 0:
-		continue /* ERROR "continue" */
-	}
-
-	var z interface{}
-	switch z.(type) {
-	case int:
-		continue /* ERROR "continue" */
-	}
-
-	var ch chan int
-	select {
-	case <-ch:
-		continue /* ERROR "continue" */
-	}
-
-	for i := 0; i < 10; i++ {
-		continue
-		if x < y {
-			continue
-			break
-		}
-		switch x {
-		case y:
-			continue
-		default:
-			break
-		}
-		select {
-		case <-ch:
-			continue
-		}
-	}
-
-	var a []int
-	for _ = range a {
-		continue
-		if x < y {
-			continue
-			break
-		}
-		switch x {
-		case y:
-			continue
-		default:
-			break
-		}
-		select {
-		case <-ch:
-			continue
-		}
-	}
-}
-
-func returns0() {
-	return
-	return 0 /* ERROR no result values expected */
-}
-
-func returns1(x float64) (int, *float64) {
-	return 0, &x
-	return /* ERROR wrong number of return values */
-	return "foo" /* ERROR "cannot convert" */, x /* ERROR "cannot return" */
-	return /* ERROR wrong number of return values */ 0, &x, 1
-}
-
-func returns2() (a, b int) {
-	return
-	return 1, "foo" /* ERROR cannot convert */
-	return /* ERROR wrong number of return values */ 1, 2, 3
-	{
-		type a int
-		return 1, 2
-		return /* ERROR a not in scope at return */
-	}
-}
-
-func returns3() (_ int) {
-	return
-	{
-		var _ int // blank (_) identifiers never shadow since they are in no scope
-		return
-	}
-}
-
-func switches0() {
-	var x int
-
-	switch x {
-	}
-
-	switch x {
-	default:
-	default /* ERROR "multiple defaults" */ :
-	}
-
-	switch {
-	case 1  /* ERROR "cannot convert" */ :
-	}
-
-	true := "false"
-	_ = true
-	// A tagless switch is equivalent to the bool 
-        // constant true, not the identifier 'true'.
-	switch {
-	case "false" /* ERROR "cannot convert" */:
-	}
-
-	switch int32(x) {
-	case 1, 2:
-	case x /* ERROR "cannot compare" */ :
-	}
-
-	switch x {
-	case 1 /* ERROR "overflows" */ << 100:
-	}
-
-	switch x {
-	case 1:
-	case 1 /* DISABLED "duplicate case" */ :
-	case 2, 3, 4:
-	case 1 /* DISABLED "duplicate case" */ :
-	}
-
-	switch uint64(x) {
-	case 1 /* DISABLED duplicate case */ <<64-1:
-	case 1 /* DISABLED duplicate case */ <<64-1:
-	}
-}
-
-func switches1() {
-	fallthrough /* ERROR "fallthrough statement out of place" */
-
-	var x int
-	switch x {
-	case 0:
-		fallthrough /* ERROR "fallthrough statement out of place" */
-		break
-	case 1:
-		fallthrough
-	case 2:
-	default:
-		fallthrough
-	case 3:
-		fallthrough /* ERROR "fallthrough statement out of place" */
-	}
-
-	var y interface{}
-	switch y.(type) {
-	case int:
-		fallthrough /* ERROR "fallthrough statement out of place" */
-	default:
-	}
-
-	switch x {
-	case 0:
-		if x == 0 {
-			fallthrough /* ERROR "fallthrough statement out of place" */
-		}
-	}
-
-	switch x {
-	case 0:
-		goto L1
-		L1: fallthrough
-	case 1:
-		goto L2
-		goto L3
-		goto L4
-		L2: L3: L4: fallthrough
-	default:
-	}
-
-	switch x {
-	case 0:
-		goto L5
-		L5: fallthrough
-	default:
-		goto L6
-		goto L7
-		goto L8
-		L6: L7: L8: fallthrough /* ERROR "fallthrough statement out of place" */
-	}
-
-	switch x {
-	case 0:
-		{
-			fallthrough /* ERROR "fallthrough statement out of place" */
-		}
-	default:
-	}
-}
-
-type I interface {
-	m()
-}
-
-type I2 interface {
-	m(int)
-}
-
-type T struct{}
-type T1 struct{}
-type T2 struct{}
-
-func (T) m() {}
-func (T2) m(int) {}
-
-func typeswitches() {
-	var i int
-	var x interface{}
-
-	switch x.(type) {}
-	switch (x /* ERROR "outside type switch" */ .(type)) {}
-
-	switch x.(type) {
-	default:
-	default /* ERROR "multiple defaults" */ :
-	}
-
-	switch x /* ERROR "declared but not used" */ := x.(type) {}
-	switch _ /* ERROR "no new variable on left side of :=" */ := x.(type) {}
-
-	switch x := x.(type) {
-	case int:
-		var y int = x
-		_ = y
-	}
-
-	switch x := i /* ERROR "not an interface" */ .(type) {}
-
-	switch t := x.(type) {
-	case nil:
-		var v bool = t /* ERROR "cannot initialize" */
-		_ = v
-	case int:
-		var v int = t
-		_ = v
-	case float32, complex64:
-		var v float32 = t /* ERROR "cannot initialize" */
-		_ = v
-	default:
-		var v float32 = t /* ERROR "cannot initialize" */
-		_ = v
-	}
-
-	var t I
-	switch t.(type) {
-	case T:
-	case T1 /* ERROR "missing method m" */ :
-	case T2 /* ERROR "wrong type for method m" */ :
-	case I2 /* STRICT "wrong type for method m" */ : // only an error in strict mode (issue 8561)
-	}
-}
-
-// Test that each case clause uses the correct type of the variable
-// declared by the type switch (issue 5504).
-func typeswitch0() {
-	switch y := interface{}(nil).(type) {
-	case int:
-		func() int { return y + 0 }()
-	case float32:
-		func() float32 { return y }()
-	}
-}
-
-// Test correct scope setup.
-// (no redeclaration errors expected in the type switch)
-func typeswitch1() {
-	var t I
-	switch t := t; t := t.(type) {
-	case nil:
-		var _ I = t
-	case T:
-		var _ T = t
-	default:
-		var _ I = t
-	}
-}
-
-// Test correct typeswitch against interface types.
-type A interface { a() }
-type B interface { b() }
-type C interface { a(int) }
-
-func typeswitch2() {
-	switch A(nil).(type) {
-	case A:
-	case B:
-	case C /* STRICT "cannot have dynamic type" */: // only an error in strict mode (issue 8561)
-	}
-}
-
-func typeswitch3(x interface{}) {
-	switch x.(type) {
-	case int:
-	case float64:
-	case int /* ERROR duplicate case */ :
-	}
-
-	switch x.(type) {
-	case nil:
-	case int:
-	case nil /* ERROR duplicate case */ , nil /* ERROR duplicate case */ :
-	}
-
-	type F func(int)
-	switch x.(type) {
-	case nil:
-	case int, func(int):
-	case float32, func /* ERROR duplicate case */ (x int):
-	case F:
-	}
-}
-
-func fors1() {
-	for {}
-	var i string
-	_ = i
-	for i := 0; i < 10; i++ {}
-	for i := 0; i < 10; j /* ERROR cannot declare */ := 0 {}
-}
-
-func rangeloops1() {
-	var (
-		x int
-		a [10]float32
-		b []string
-		p *[10]complex128
-		pp **[10]complex128
-		s string
-		m map[int]bool
-		c chan int
-		sc chan<- int
-		rc <-chan int
-	)
-
-	for range x /* ERROR "cannot range over" */ {}
-	for _ = range x /* ERROR "cannot range over" */ {}
-	for i := range x /* ERROR "cannot range over" */ {}
-
-	for range a {}
-	for i := range a {
-		var ii int
-		ii = i
-		_ = ii
-	}
-	for i, x := range a {
-		var ii int
-		ii = i
-		_ = ii
-		var xx float64
-		xx = x /* ERROR "cannot assign" */
-		_ = xx
-	}
-	var ii int
-	var xx float32
-	for ii, xx = range a {}
-	_, _ = ii, xx
-
-	for range b {}
-	for i := range b {
-		var ii int
-		ii = i
-		_ = ii
-	}
-	for i, x := range b {
-		var ii int
-		ii = i
-		_ = ii
-		var xx string
-		xx = x
-		_ = xx
-	}
-
-	for range s {}
-	for i := range s {
-		var ii int
-		ii = i
-		_ = ii
-	}
-	for i, x := range s {
-		var ii int
-		ii = i
-		_ = ii
-		var xx rune
-		xx = x
-		_ = xx
-	}
-
-	for range p {}
-	for _, x := range p {
-		var xx complex128
-		xx = x
-		_ = xx
-	}
-
-	for range pp /* ERROR "cannot range over" */ {}
-	for _, x := range pp /* ERROR "cannot range over" */ {}
-
-	for range m {}
-	for k := range m {
-		var kk int32
-		kk = k /* ERROR "cannot assign" */
-		_ = kk
-	}
-	for k, v := range m {
-		var kk int
-		kk = k
-		_ = kk
-		if v {}
-	}
-
-	for range c {}
-	for _, _ /* ERROR "only one iteration variable" */ = range c {}
-	for e := range c {
-		var ee int
-		ee = e
-		_ = ee
-	}
-	for _ = range sc /* ERROR "cannot range over send-only channel" */ {}
-	for _ = range rc {}
-
-	// constant strings
-	const cs = "foo"
-	for range cs {}
-	for range "" {}
-	for i, x := range cs { _, _ = i, x }
-	for i, x := range "" {
-		var ii int
-		ii = i
-		_ = ii
-		var xx rune
-		xx = x
-		_ = xx
-	}
-}
-
-func rangeloops2() {
-	type I int
-	type R rune
-
-	var a [10]int
-	var i I
-	_ = i
-	for i /* ERROR cannot assign */ = range a {}
-	for i /* ERROR cannot assign */ = range &a {}
-	for i /* ERROR cannot assign */ = range a[:] {}
-
-	var s string
-	var r R
-	_ = r
-	for i /* ERROR cannot assign */ = range s {}
-	for i /* ERROR cannot assign */ = range "foo" {}
-	for _, r /* ERROR cannot assign */ = range s {}
-	for _, r /* ERROR cannot assign */ = range "foo" {}
-}
-
-func issue6766b() {
-	for _ := /* ERROR no new variables */ range "" {}
-	for a, a /* ERROR redeclared */ := range "" { _ = a }
-	var a int
-	_ = a
-	for a, a /* ERROR redeclared */ := range []int{1, 2, 3} { _ = a }
-}
-
-// Test that despite errors in the range clause,
-// the loop body is still type-checked (and thus
-// errors reported).
-func issue10148() {
-	for y /* ERROR declared but not used */ := range "" {
-		_ = "" /* ERROR cannot convert */ + 1
-	}
-	for range 1 /* ERROR cannot range over 1 */ {
-		_ = "" /* ERROR cannot convert */ + 1
-	}
-	for y := range 1 /* ERROR cannot range over 1 */ {
-		_ = "" /* ERROR cannot convert */ + 1
-	}
-}
-
-func labels0() {
-	goto L0
-	goto L1
-	L0:
-	L1:
-	L1 /* ERROR "already declared" */ :
-	if true {
-		goto L2		
-		L2:
-		L0 /* ERROR "already declared" */ :
-	}
-	_ = func() {
-		goto L0
-		goto L1
-		goto L2
-		L0:
-		L1:
-		L2:
-	}
-}
-
-func expression_statements(ch chan int) {
-	expression_statements(ch)
-	<-ch
-	println()
-
-	0 /* ERROR "not used" */
-	1 /* ERROR "not used" */ +2
-	cap /* ERROR "not used" */ (ch)
-	println /* ERROR "must be called" */
-}
diff --git a/src/go/types/testdata/stmt1.src b/src/go/types/testdata/stmt1.src
deleted file mode 100644
index a2955e6..0000000
--- a/src/go/types/testdata/stmt1.src
+++ /dev/null
@@ -1,165 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// terminating statements
-
-package stmt1
-
-func _() {}
-
-func _() int {} /* ERROR "missing return" */
-
-func _() int { panic(0) }
-func _() int { (panic(0)) }
-
-// block statements
-func _(x, y int) (z int) {
-	{
-		return
-	}
-}
-
-func _(x, y int) (z int) {
-	{
-	}
-} /* ERROR "missing return" */
-
-// if statements
-func _(x, y int) (z int) {
-	if x < y { return }
-	return 1
-}
-
-func _(x, y int) (z int) {
-	if x < y { return }
-} /* ERROR "missing return" */
-
-func _(x, y int) (z int) {
-	if x < y {
-	} else { return 1
-	}
-} /* ERROR "missing return" */
-
-func _(x, y int) (z int) {
-	if x < y { return
-	} else { return
-	}
-}
-
-// for statements
-func _(x, y int) (z int) {
-	for x < y {
-		return
-	}
-} /* ERROR "missing return" */
-
-func _(x, y int) (z int) {
-	for {
-		return
-	}
-}
-
-func _(x, y int) (z int) {
-	for {
-		return
-		break
-	}
-} /* ERROR "missing return" */
-
-func _(x, y int) (z int) {
-	for {
-		for { break }
-		return
-	}
-}
-
-func _(x, y int) (z int) {
-L:	for {
-		for { break L }
-		return
-	}
-} /* ERROR "missing return" */
-
-// switch statements
-func _(x, y int) (z int) {
-	switch x {
-	case 0: return
-	default: return
-	}
-}
-
-func _(x, y int) (z int) {
-	switch x {
-	case 0: return
-	}
-} /* ERROR "missing return" */
-
-func _(x, y int) (z int) {
-	switch x {
-	case 0: return
-	case 1: break
-	}
-} /* ERROR "missing return" */
-
-func _(x, y int) (z int) {
-	switch x {
-	case 0: return
-	default:
-		switch y {
-		case 0: break
-		}
-		panic(0)
-	}
-}
-
-func _(x, y int) (z int) {
-L:	switch x {
-	case 0: return
-	default:
-		switch y {
-		case 0: break L
-		}
-		panic(0)
-	}
-} /* ERROR "missing return" */
-
-// select statements
-func _(ch chan int) (z int) {
-	select {}
-} // nice!
-
-func _(ch chan int) (z int) {
-	select {
-	default: break
-	}
-} /* ERROR "missing return" */
-
-func _(ch chan int) (z int) {
-	select {
-	case <-ch: return
-	default: break
-	}
-} /* ERROR "missing return" */
-
-func _(ch chan int) (z int) {
-	select {
-	case <-ch: return
-	default:
-		for i := 0; i < 10; i++ {
-			break
-		}
-		return
-	}
-}
-
-func _(ch chan int) (z int) {
-L:	select {
-	case <-ch: return
-	default:
-		for i := 0; i < 10; i++ {
-			break L
-		}
-		return
-	}
-} /* ERROR "missing return" */
diff --git a/src/go/types/testdata/vardecl.src b/src/go/types/testdata/vardecl.src
deleted file mode 100644
index fb6b5f7..0000000
--- a/src/go/types/testdata/vardecl.src
+++ /dev/null
@@ -1,186 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package vardecl
-
-// Prerequisites.
-import "math"
-func f() {}
-func g() (x, y int) { return }
-var m map[string]int
-
-// Var decls must have a type or an initializer.
-var _ int
-var _, _ int
-
-// The first error message is produced by the parser.
-// In a real-world scenario, the type-checker would not be run
-// in this case and the 2nd error message would not appear.
-var _ /* ERROR "missing variable type" */ /* ERROR "missing type or init expr" */
-var _ /* ERROR "missing variable type" */ /* ERROR "missing type or init expr" */, _
-var _ /* ERROR "missing variable type" */ /* ERROR "missing type or init expr" */, _, _
-
-// The initializer must be an expression.
-var _ = int /* ERROR "not an expression" */
-var _ = f /* ERROR "used as value" */ ()
-
-// Identifier and expression arity must match.
-var _, _ = 1, 2
-var _ = 1, 2 /* ERROR "extra init expr 2" */
-var _, _ = 1 /* ERROR "assignment count mismatch" */
-var _, _, _ /* ERROR "missing init expr for _" */ = 1, 2
-
-var _ = g /* ERROR "2-valued expr" */ ()
-var _, _ = g()
-var _, _, _ = g /* ERROR "assignment count mismatch" */ ()
-
-var _ = m["foo"]
-var _, _ = m["foo"]
-var _, _, _ = m  /* ERROR "assignment count mismatch" */ ["foo"]
-
-var _, _ int = 1, 2
-var _ int = 1, 2 /* ERROR "extra init expr 2" */
-var _, _ int = 1 /* ERROR "assignment count mismatch" */
-var _, _, _ /* ERROR "missing init expr for _" */ int = 1, 2
-
-var (
-	_, _ = 1, 2
-	_ = 1, 2 /* ERROR "extra init expr 2" */
-	_, _ = 1 /* ERROR "assignment count mismatch" */
-	_, _, _ /* ERROR "missing init expr for _" */ = 1, 2
-
-	_ = g /* ERROR "2-valued expr" */ ()
-	_, _ = g()
-	_, _, _ = g /* ERROR "assignment count mismatch" */ ()
-
-	_ = m["foo"]
-	_, _ = m["foo"]
-	_, _, _ = m /* ERROR "assignment count mismatch" */ ["foo"]
-
-	_, _ int = 1, 2
-	_ int = 1, 2 /* ERROR "extra init expr 2" */
-	_, _ int = 1 /* ERROR "assignment count mismatch" */
-	_, _, _ /* ERROR "missing init expr for _" */ int = 1, 2
-)
-
-// Variables declared in function bodies must be 'used'.
-type T struct{}
-func (r T) _(a, b, c int) (u, v, w int) {
-	var x1 /* ERROR "declared but not used" */ int
-	var x2 /* ERROR "declared but not used" */ int
-	x1 = 1
-	(x2) = 2
-
-	y1 /* ERROR "declared but not used" */ := 1
-	y2 /* ERROR "declared but not used" */ := 2
-	y1 = 1
-	(y1) = 2
-
-	{
-		var x1 /* ERROR "declared but not used" */ int
-		var x2 /* ERROR "declared but not used" */ int
-		x1 = 1
-		(x2) = 2
-
-		y1 /* ERROR "declared but not used" */ := 1
-		y2 /* ERROR "declared but not used" */ := 2
-		y1 = 1
-		(y1) = 2
-	}
-
-	if x /* ERROR "declared but not used" */ := 0; a < b {}
-
-	switch x /* ERROR "declared but not used" */, y := 0, 1; a {
-	case 0:
-		_ = y
-	case 1:
-		x /* ERROR "declared but not used" */ := 0
-	}
-
-	var t interface{}
-	switch t /* ERROR "declared but not used" */ := t.(type) {}
-
-	switch t /* ERROR "declared but not used" */ := t.(type) {
-	case int:
-	}
-
-	switch t /* ERROR "declared but not used" */ := t.(type) {
-	case int:
-	case float32, complex64:
-		t = nil
-	}
-
-	switch t := t.(type) {
-	case int:
-	case float32, complex64:
-		_ = t
-	}
-
-	switch t := t.(type) {
-	case int:
-	case float32:
-	case string:
-		_ = func() string {
-			return t
-		}
-	}
-
-	switch t := t; t /* ERROR "declared but not used" */ := t.(type) {}
-
-	var z1 /* ERROR "declared but not used" */ int
-	var z2 int
-	_ = func(a, b, c int) (u, v, w int) {
-		z1 = a
-		(z1) = b
-		a = z2
-		return
-	}
-
-	var s []int
-	var i /* ERROR "declared but not used" */ , j int
-	for i, j = range s {
-		_ = j
-	}
-
-	for i, j /* ERROR "declared but not used" */ := range s {
-		_ = func() int {
-			return i
-		}
-	}
-	return
-}
-
-// Invalid (unused) expressions must not lead to spurious "declared but not used errors"
-func _() {
-	var a, b, c int
-	var x, y int
-	x, y = a /* ERROR assignment count mismatch */ , b, c
-	_ = x
-	_ = y
-}
-
-func _() {
-	var x int
-	return x /* ERROR no result values expected */
-	return math /* ERROR no result values expected */ .Sin(0)
-}
-
-func _() int {
-	var x, y int
-	return /* ERROR wrong number of return values */ x, y
-}
-
-// Short variable declarations must declare at least one new non-blank variable.
-func _() {
-	_ := /* ERROR no new variables */ 0
-	_, a := 0, 1
-	_, a := /* ERROR no new variables */ 0, 1
-	_, a, b := 0, 1, 2
-	_, _, _ := /* ERROR no new variables */ 0, 1, 2
-
-	_ = a
-	_ = b
-}
-
-// TODO(gri) consolidate other var decl checks in this file
\ No newline at end of file
diff --git a/src/go/types/token_test.go b/src/go/types/token_test.go
deleted file mode 100644
index 705bb29..0000000
--- a/src/go/types/token_test.go
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file checks invariants of token.Token ordering that we rely on
-// since package go/token doesn't provide any guarantees at the moment.
-
-package types
-
-import (
-	"go/token"
-	"testing"
-)
-
-var assignOps = map[token.Token]token.Token{
-	token.ADD_ASSIGN:     token.ADD,
-	token.SUB_ASSIGN:     token.SUB,
-	token.MUL_ASSIGN:     token.MUL,
-	token.QUO_ASSIGN:     token.QUO,
-	token.REM_ASSIGN:     token.REM,
-	token.AND_ASSIGN:     token.AND,
-	token.OR_ASSIGN:      token.OR,
-	token.XOR_ASSIGN:     token.XOR,
-	token.SHL_ASSIGN:     token.SHL,
-	token.SHR_ASSIGN:     token.SHR,
-	token.AND_NOT_ASSIGN: token.AND_NOT,
-}
-
-func TestZeroTok(t *testing.T) {
-	// zero value for token.Token must be token.ILLEGAL
-	var zero token.Token
-	if token.ILLEGAL != zero {
-		t.Errorf("%s == %d; want 0", token.ILLEGAL, zero)
-	}
-}
-
-func TestAssignOp(t *testing.T) {
-	// there are fewer than 256 tokens
-	for i := 0; i < 256; i++ {
-		tok := token.Token(i)
-		got := assignOp(tok)
-		want := assignOps[tok]
-		if got != want {
-			t.Errorf("for assignOp(%s): got %s; want %s", tok, got, want)
-		}
-	}
-}
diff --git a/src/go/types/type.go b/src/go/types/type.go
deleted file mode 100644
index 1df8b45..0000000
--- a/src/go/types/type.go
+++ /dev/null
@@ -1,454 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package types
-
-import "sort"
-
-// TODO(gri) Revisit factory functions - make sure they have all relevant parameters.
-
-// A Type represents a type of Go.
-// All types implement the Type interface.
-type Type interface {
-	// Underlying returns the underlying type of a type.
-	Underlying() Type
-
-	// String returns a string representation of a type.
-	String() string
-}
-
-// BasicKind describes the kind of basic type.
-type BasicKind int
-
-const (
-	Invalid BasicKind = iota // type is invalid
-
-	// predeclared types
-	Bool
-	Int
-	Int8
-	Int16
-	Int32
-	Int64
-	Uint
-	Uint8
-	Uint16
-	Uint32
-	Uint64
-	Uintptr
-	Float32
-	Float64
-	Complex64
-	Complex128
-	String
-	UnsafePointer
-
-	// types for untyped values
-	UntypedBool
-	UntypedInt
-	UntypedRune
-	UntypedFloat
-	UntypedComplex
-	UntypedString
-	UntypedNil
-
-	// aliases
-	Byte = Uint8
-	Rune = Int32
-)
-
-// BasicInfo is a set of flags describing properties of a basic type.
-type BasicInfo int
-
-// Properties of basic types.
-const (
-	IsBoolean BasicInfo = 1 << iota
-	IsInteger
-	IsUnsigned
-	IsFloat
-	IsComplex
-	IsString
-	IsUntyped
-
-	IsOrdered   = IsInteger | IsFloat | IsString
-	IsNumeric   = IsInteger | IsFloat | IsComplex
-	IsConstType = IsBoolean | IsNumeric | IsString
-)
-
-// A Basic represents a basic type.
-type Basic struct {
-	kind BasicKind
-	info BasicInfo
-	name string
-}
-
-// Kind returns the kind of basic type b.
-func (b *Basic) Kind() BasicKind { return b.kind }
-
-// Info returns information about properties of basic type b.
-func (b *Basic) Info() BasicInfo { return b.info }
-
-// Name returns the name of basic type b.
-func (b *Basic) Name() string { return b.name }
-
-// An Array represents an array type.
-type Array struct {
-	len  int64
-	elem Type
-}
-
-// NewArray returns a new array type for the given element type and length.
-func NewArray(elem Type, len int64) *Array { return &Array{len, elem} }
-
-// Len returns the length of array a.
-func (a *Array) Len() int64 { return a.len }
-
-// Elem returns element type of array a.
-func (a *Array) Elem() Type { return a.elem }
-
-// A Slice represents a slice type.
-type Slice struct {
-	elem Type
-}
-
-// NewSlice returns a new slice type for the given element type.
-func NewSlice(elem Type) *Slice { return &Slice{elem} }
-
-// Elem returns the element type of slice s.
-func (s *Slice) Elem() Type { return s.elem }
-
-// A Struct represents a struct type.
-type Struct struct {
-	fields []*Var
-	tags   []string // field tags; nil if there are no tags
-	// TODO(gri) access to offsets is not threadsafe - fix this
-	offsets []int64 // field offsets in bytes, lazily initialized
-}
-
-// NewStruct returns a new struct with the given fields and corresponding field tags.
-// If a field with index i has a tag, tags[i] must be that tag, but len(tags) may be
-// only as long as required to hold the tag with the largest index i. Consequently,
-// if no field has a tag, tags may be nil.
-func NewStruct(fields []*Var, tags []string) *Struct {
-	var fset objset
-	for _, f := range fields {
-		if f.name != "_" && fset.insert(f) != nil {
-			panic("multiple fields with the same name")
-		}
-	}
-	if len(tags) > len(fields) {
-		panic("more tags than fields")
-	}
-	return &Struct{fields: fields, tags: tags}
-}
-
-// NumFields returns the number of fields in the struct (including blank and anonymous fields).
-func (s *Struct) NumFields() int { return len(s.fields) }
-
-// Field returns the i'th field for 0 <= i < NumFields().
-func (s *Struct) Field(i int) *Var { return s.fields[i] }
-
-// Tag returns the i'th field tag for 0 <= i < NumFields().
-func (s *Struct) Tag(i int) string {
-	if i < len(s.tags) {
-		return s.tags[i]
-	}
-	return ""
-}
-
-// A Pointer represents a pointer type.
-type Pointer struct {
-	base Type // element type
-}
-
-// NewPointer returns a new pointer type for the given element (base) type.
-func NewPointer(elem Type) *Pointer { return &Pointer{base: elem} }
-
-// Elem returns the element type for the given pointer p.
-func (p *Pointer) Elem() Type { return p.base }
-
-// A Tuple represents an ordered list of variables; a nil *Tuple is a valid (empty) tuple.
-// Tuples are used as components of signatures and to represent the type of multiple
-// assignments; they are not first class types of Go.
-type Tuple struct {
-	vars []*Var
-}
-
-// NewTuple returns a new tuple for the given variables.
-func NewTuple(x ...*Var) *Tuple {
-	if len(x) > 0 {
-		return &Tuple{x}
-	}
-	return nil
-}
-
-// Len returns the number variables of tuple t.
-func (t *Tuple) Len() int {
-	if t != nil {
-		return len(t.vars)
-	}
-	return 0
-}
-
-// At returns the i'th variable of tuple t.
-func (t *Tuple) At(i int) *Var { return t.vars[i] }
-
-// A Signature represents a (non-builtin) function or method type.
-type Signature struct {
-	// We need to keep the scope in Signature (rather than passing it around
-	// and store it in the Func Object) because when type-checking a function
-	// literal we call the general type checker which returns a general Type.
-	// We then unpack the *Signature and use the scope for the literal body.
-	scope    *Scope // function scope, present for package-local signatures
-	recv     *Var   // nil if not a method
-	params   *Tuple // (incoming) parameters from left to right; or nil
-	results  *Tuple // (outgoing) results from left to right; or nil
-	variadic bool   // true if the last parameter's type is of the form ...T (or string, for append built-in only)
-}
-
-// NewSignature returns a new function type for the given receiver, parameters,
-// and results, either of which may be nil. If variadic is set, the function
-// is variadic, it must have at least one parameter, and the last parameter
-// must be of unnamed slice type.
-func NewSignature(recv *Var, params, results *Tuple, variadic bool) *Signature {
-	if variadic {
-		n := params.Len()
-		if n == 0 {
-			panic("types.NewSignature: variadic function must have at least one parameter")
-		}
-		if _, ok := params.At(n - 1).typ.(*Slice); !ok {
-			panic("types.NewSignature: variadic parameter must be of unnamed slice type")
-		}
-	}
-	return &Signature{nil, recv, params, results, variadic}
-}
-
-// Recv returns the receiver of signature s (if a method), or nil if a
-// function.
-//
-// For an abstract method, Recv returns the enclosing interface either
-// as a *Named or an *Interface.  Due to embedding, an interface may
-// contain methods whose receiver type is a different interface.
-func (s *Signature) Recv() *Var { return s.recv }
-
-// Params returns the parameters of signature s, or nil.
-func (s *Signature) Params() *Tuple { return s.params }
-
-// Results returns the results of signature s, or nil.
-func (s *Signature) Results() *Tuple { return s.results }
-
-// Variadic reports whether the signature s is variadic.
-func (s *Signature) Variadic() bool { return s.variadic }
-
-// An Interface represents an interface type.
-type Interface struct {
-	methods   []*Func  // ordered list of explicitly declared methods
-	embeddeds []*Named // ordered list of explicitly embedded types
-
-	allMethods []*Func // ordered list of methods declared with or embedded in this interface (TODO(gri): replace with mset)
-}
-
-// NewInterface returns a new interface for the given methods and embedded types.
-func NewInterface(methods []*Func, embeddeds []*Named) *Interface {
-	typ := new(Interface)
-
-	var mset objset
-	for _, m := range methods {
-		if mset.insert(m) != nil {
-			panic("multiple methods with the same name")
-		}
-		// set receiver
-		// TODO(gri) Ideally, we should use a named type here instead of
-		// typ, for less verbose printing of interface method signatures.
-		m.typ.(*Signature).recv = NewVar(m.pos, m.pkg, "", typ)
-	}
-	sort.Sort(byUniqueMethodName(methods))
-
-	if embeddeds == nil {
-		sort.Sort(byUniqueTypeName(embeddeds))
-	}
-
-	typ.methods = methods
-	typ.embeddeds = embeddeds
-	return typ
-}
-
-// NumExplicitMethods returns the number of explicitly declared methods of interface t.
-func (t *Interface) NumExplicitMethods() int { return len(t.methods) }
-
-// ExplicitMethod returns the i'th explicitly declared method of interface t for 0 <= i < t.NumExplicitMethods().
-// The methods are ordered by their unique Id.
-func (t *Interface) ExplicitMethod(i int) *Func { return t.methods[i] }
-
-// NumEmbeddeds returns the number of embedded types in interface t.
-func (t *Interface) NumEmbeddeds() int { return len(t.embeddeds) }
-
-// Embedded returns the i'th embedded type of interface t for 0 <= i < t.NumEmbeddeds().
-// The types are ordered by the corresponding TypeName's unique Id.
-func (t *Interface) Embedded(i int) *Named { return t.embeddeds[i] }
-
-// NumMethods returns the total number of methods of interface t.
-func (t *Interface) NumMethods() int { return len(t.allMethods) }
-
-// Method returns the i'th method of interface t for 0 <= i < t.NumMethods().
-// The methods are ordered by their unique Id.
-func (t *Interface) Method(i int) *Func { return t.allMethods[i] }
-
-// Empty returns true if t is the empty interface.
-func (t *Interface) Empty() bool { return len(t.allMethods) == 0 }
-
-// Complete computes the interface's method set. It must be called by users of
-// NewInterface after the interface's embedded types are fully defined and
-// before using the interface type in any way other than to form other types.
-// Complete returns the receiver.
-func (t *Interface) Complete() *Interface {
-	if t.allMethods != nil {
-		return t
-	}
-
-	var allMethods []*Func
-	if t.embeddeds == nil {
-		if t.methods == nil {
-			allMethods = make([]*Func, 0, 1)
-		} else {
-			allMethods = t.methods
-		}
-	} else {
-		allMethods = append(allMethods, t.methods...)
-		for _, et := range t.embeddeds {
-			it := et.Underlying().(*Interface)
-			it.Complete()
-			for _, tm := range it.allMethods {
-				// Make a copy of the method and adjust its receiver type.
-				newm := *tm
-				newmtyp := *tm.typ.(*Signature)
-				newm.typ = &newmtyp
-				newmtyp.recv = NewVar(newm.pos, newm.pkg, "", t)
-				allMethods = append(allMethods, &newm)
-			}
-		}
-		sort.Sort(byUniqueMethodName(allMethods))
-	}
-	t.allMethods = allMethods
-
-	return t
-}
-
-// A Map represents a map type.
-type Map struct {
-	key, elem Type
-}
-
-// NewMap returns a new map for the given key and element types.
-func NewMap(key, elem Type) *Map {
-	return &Map{key, elem}
-}
-
-// Key returns the key type of map m.
-func (m *Map) Key() Type { return m.key }
-
-// Elem returns the element type of map m.
-func (m *Map) Elem() Type { return m.elem }
-
-// A Chan represents a channel type.
-type Chan struct {
-	dir  ChanDir
-	elem Type
-}
-
-// A ChanDir value indicates a channel direction.
-type ChanDir int
-
-// The direction of a channel is indicated by one of the following constants.
-const (
-	SendRecv ChanDir = iota
-	SendOnly
-	RecvOnly
-)
-
-// NewChan returns a new channel type for the given direction and element type.
-func NewChan(dir ChanDir, elem Type) *Chan {
-	return &Chan{dir, elem}
-}
-
-// Dir returns the direction of channel c.
-func (c *Chan) Dir() ChanDir { return c.dir }
-
-// Elem returns the element type of channel c.
-func (c *Chan) Elem() Type { return c.elem }
-
-// A Named represents a named type.
-type Named struct {
-	obj        *TypeName // corresponding declared object
-	underlying Type      // possibly a *Named during setup; never a *Named once set up completely
-	methods    []*Func   // methods declared for this type (not the method set of this type)
-}
-
-// NewNamed returns a new named type for the given type name, underlying type, and associated methods.
-// The underlying type must not be a *Named.
-func NewNamed(obj *TypeName, underlying Type, methods []*Func) *Named {
-	if _, ok := underlying.(*Named); ok {
-		panic("types.NewNamed: underlying type must not be *Named")
-	}
-	typ := &Named{obj: obj, underlying: underlying, methods: methods}
-	if obj.typ == nil {
-		obj.typ = typ
-	}
-	return typ
-}
-
-// TypeName returns the type name for the named type t.
-func (t *Named) Obj() *TypeName { return t.obj }
-
-// NumMethods returns the number of explicit methods whose receiver is named type t.
-func (t *Named) NumMethods() int { return len(t.methods) }
-
-// Method returns the i'th method of named type t for 0 <= i < t.NumMethods().
-func (t *Named) Method(i int) *Func { return t.methods[i] }
-
-// SetUnderlying sets the underlying type and marks t as complete.
-// TODO(gri) determine if there's a better solution rather than providing this function
-func (t *Named) SetUnderlying(underlying Type) {
-	if underlying == nil {
-		panic("types.Named.SetUnderlying: underlying type must not be nil")
-	}
-	if _, ok := underlying.(*Named); ok {
-		panic("types.Named.SetUnderlying: underlying type must not be *Named")
-	}
-	t.underlying = underlying
-}
-
-// AddMethod adds method m unless it is already in the method list.
-// TODO(gri) find a better solution instead of providing this function
-func (t *Named) AddMethod(m *Func) {
-	if i, _ := lookupMethod(t.methods, m.pkg, m.name); i < 0 {
-		t.methods = append(t.methods, m)
-	}
-}
-
-// Implementations for Type methods.
-
-func (t *Basic) Underlying() Type     { return t }
-func (t *Array) Underlying() Type     { return t }
-func (t *Slice) Underlying() Type     { return t }
-func (t *Struct) Underlying() Type    { return t }
-func (t *Pointer) Underlying() Type   { return t }
-func (t *Tuple) Underlying() Type     { return t }
-func (t *Signature) Underlying() Type { return t }
-func (t *Interface) Underlying() Type { return t }
-func (t *Map) Underlying() Type       { return t }
-func (t *Chan) Underlying() Type      { return t }
-func (t *Named) Underlying() Type     { return t.underlying }
-
-func (t *Basic) String() string     { return TypeString(t, nil) }
-func (t *Array) String() string     { return TypeString(t, nil) }
-func (t *Slice) String() string     { return TypeString(t, nil) }
-func (t *Struct) String() string    { return TypeString(t, nil) }
-func (t *Pointer) String() string   { return TypeString(t, nil) }
-func (t *Tuple) String() string     { return TypeString(t, nil) }
-func (t *Signature) String() string { return TypeString(t, nil) }
-func (t *Interface) String() string { return TypeString(t, nil) }
-func (t *Map) String() string       { return TypeString(t, nil) }
-func (t *Chan) String() string      { return TypeString(t, nil) }
-func (t *Named) String() string     { return TypeString(t, nil) }
diff --git a/src/go/types/typestring.go b/src/go/types/typestring.go
deleted file mode 100644
index bd62f4d..0000000
--- a/src/go/types/typestring.go
+++ /dev/null
@@ -1,296 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements printing of types.
-
-package types
-
-import (
-	"bytes"
-	"fmt"
-)
-
-// A Qualifier controls how named package-level objects are printed in
-// calls to TypeString, ObjectString, and SelectionString.
-//
-// These three formatting routines call the Qualifier for each
-// package-level object O, and if the Qualifier returns a non-empty
-// string p, the object is printed in the form p.O.
-// If it returns an empty string, only the object name O is printed.
-//
-// Using a nil Qualifier is equivalent to using (*Package).Path: the
-// object is qualified by the import path, e.g., "encoding/json.Marshal".
-//
-type Qualifier func(*Package) string
-
-// RelativeTo(pkg) returns a Qualifier that fully qualifies members of
-// all packages other than pkg.
-func RelativeTo(pkg *Package) Qualifier {
-	if pkg == nil {
-		return nil
-	}
-	return func(other *Package) string {
-		if pkg == other {
-			return "" // same package; unqualified
-		}
-		return other.Path()
-	}
-}
-
-// If gcCompatibilityMode is set, printing of types is modified
-// to match the representation of some types in the gc compiler:
-//
-//	- byte and rune lose their alias name and simply stand for
-//	  uint8 and int32 respectively
-//	- embedded interfaces get flattened (the embedding info is lost,
-//	  and certain recursive interface types cannot be printed anymore)
-//
-// This makes it easier to compare packages computed with the type-
-// checker vs packages imported from gc export data.
-//
-// Caution: This flag affects all uses of WriteType, globally.
-// It is only provided for testing in conjunction with
-// gc-generated data.
-//
-// This flag is exported in the x/tools/go/types package. We don't
-// need it at the moment in the std repo and so we don't export it
-// anymore. We should eventually try to remove it altogether.
-var gcCompatibilityMode bool
-
-// TypeString returns the string representation of typ.
-// The Qualifier controls the printing of
-// package-level objects, and may be nil.
-func TypeString(typ Type, qf Qualifier) string {
-	var buf bytes.Buffer
-	WriteType(&buf, typ, qf)
-	return buf.String()
-}
-
-// WriteType writes the string representation of typ to buf.
-// The Qualifier controls the printing of
-// package-level objects, and may be nil.
-func WriteType(buf *bytes.Buffer, typ Type, qf Qualifier) {
-	writeType(buf, typ, qf, make([]Type, 8))
-}
-
-func writeType(buf *bytes.Buffer, typ Type, qf Qualifier, visited []Type) {
-	// Theoretically, this is a quadratic lookup algorithm, but in
-	// practice deeply nested composite types with unnamed component
-	// types are uncommon. This code is likely more efficient than
-	// using a map.
-	for _, t := range visited {
-		if t == typ {
-			fmt.Fprintf(buf, "○%T", typ) // cycle to typ
-			return
-		}
-	}
-	visited = append(visited, typ)
-
-	switch t := typ.(type) {
-	case nil:
-		buf.WriteString("<nil>")
-
-	case *Basic:
-		if t.kind == UnsafePointer {
-			buf.WriteString("unsafe.")
-		}
-		if gcCompatibilityMode {
-			// forget the alias names
-			switch t.kind {
-			case Byte:
-				t = Typ[Uint8]
-			case Rune:
-				t = Typ[Int32]
-			}
-		}
-		buf.WriteString(t.name)
-
-	case *Array:
-		fmt.Fprintf(buf, "[%d]", t.len)
-		writeType(buf, t.elem, qf, visited)
-
-	case *Slice:
-		buf.WriteString("[]")
-		writeType(buf, t.elem, qf, visited)
-
-	case *Struct:
-		buf.WriteString("struct{")
-		for i, f := range t.fields {
-			if i > 0 {
-				buf.WriteString("; ")
-			}
-			if !f.anonymous {
-				buf.WriteString(f.name)
-				buf.WriteByte(' ')
-			}
-			writeType(buf, f.typ, qf, visited)
-			if tag := t.Tag(i); tag != "" {
-				fmt.Fprintf(buf, " %q", tag)
-			}
-		}
-		buf.WriteByte('}')
-
-	case *Pointer:
-		buf.WriteByte('*')
-		writeType(buf, t.base, qf, visited)
-
-	case *Tuple:
-		writeTuple(buf, t, false, qf, visited)
-
-	case *Signature:
-		buf.WriteString("func")
-		writeSignature(buf, t, qf, visited)
-
-	case *Interface:
-		// We write the source-level methods and embedded types rather
-		// than the actual method set since resolved method signatures
-		// may have non-printable cycles if parameters have anonymous
-		// interface types that (directly or indirectly) embed the
-		// current interface. For instance, consider the result type
-		// of m:
-		//
-		//     type T interface{
-		//         m() interface{ T }
-		//     }
-		//
-		buf.WriteString("interface{")
-		if gcCompatibilityMode {
-			// print flattened interface
-			// (useful to compare against gc-generated interfaces)
-			for i, m := range t.allMethods {
-				if i > 0 {
-					buf.WriteString("; ")
-				}
-				buf.WriteString(m.name)
-				writeSignature(buf, m.typ.(*Signature), qf, visited)
-			}
-		} else {
-			// print explicit interface methods and embedded types
-			for i, m := range t.methods {
-				if i > 0 {
-					buf.WriteString("; ")
-				}
-				buf.WriteString(m.name)
-				writeSignature(buf, m.typ.(*Signature), qf, visited)
-			}
-			for i, typ := range t.embeddeds {
-				if i > 0 || len(t.methods) > 0 {
-					buf.WriteString("; ")
-				}
-				writeType(buf, typ, qf, visited)
-			}
-		}
-		buf.WriteByte('}')
-
-	case *Map:
-		buf.WriteString("map[")
-		writeType(buf, t.key, qf, visited)
-		buf.WriteByte(']')
-		writeType(buf, t.elem, qf, visited)
-
-	case *Chan:
-		var s string
-		var parens bool
-		switch t.dir {
-		case SendRecv:
-			s = "chan "
-			// chan (<-chan T) requires parentheses
-			if c, _ := t.elem.(*Chan); c != nil && c.dir == RecvOnly {
-				parens = true
-			}
-		case SendOnly:
-			s = "chan<- "
-		case RecvOnly:
-			s = "<-chan "
-		default:
-			panic("unreachable")
-		}
-		buf.WriteString(s)
-		if parens {
-			buf.WriteByte('(')
-		}
-		writeType(buf, t.elem, qf, visited)
-		if parens {
-			buf.WriteByte(')')
-		}
-
-	case *Named:
-		s := "<Named w/o object>"
-		if obj := t.obj; obj != nil {
-			if obj.pkg != nil {
-				writePackage(buf, obj.pkg, qf)
-			}
-			// TODO(gri): function-local named types should be displayed
-			// differently from named types at package level to avoid
-			// ambiguity.
-			s = obj.name
-		}
-		buf.WriteString(s)
-
-	default:
-		// For externally defined implementations of Type.
-		buf.WriteString(t.String())
-	}
-}
-
-func writeTuple(buf *bytes.Buffer, tup *Tuple, variadic bool, qf Qualifier, visited []Type) {
-	buf.WriteByte('(')
-	if tup != nil {
-		for i, v := range tup.vars {
-			if i > 0 {
-				buf.WriteString(", ")
-			}
-			if v.name != "" {
-				buf.WriteString(v.name)
-				buf.WriteByte(' ')
-			}
-			typ := v.typ
-			if variadic && i == len(tup.vars)-1 {
-				if s, ok := typ.(*Slice); ok {
-					buf.WriteString("...")
-					typ = s.elem
-				} else {
-					// special case:
-					// append(s, "foo"...) leads to signature func([]byte, string...)
-					if t, ok := typ.Underlying().(*Basic); !ok || t.kind != String {
-						panic("internal error: string type expected")
-					}
-					writeType(buf, typ, qf, visited)
-					buf.WriteString("...")
-					continue
-				}
-			}
-			writeType(buf, typ, qf, visited)
-		}
-	}
-	buf.WriteByte(')')
-}
-
-// WriteSignature writes the representation of the signature sig to buf,
-// without a leading "func" keyword.
-// The Qualifier controls the printing of
-// package-level objects, and may be nil.
-func WriteSignature(buf *bytes.Buffer, sig *Signature, qf Qualifier) {
-	writeSignature(buf, sig, qf, make([]Type, 8))
-}
-
-func writeSignature(buf *bytes.Buffer, sig *Signature, qf Qualifier, visited []Type) {
-	writeTuple(buf, sig.params, sig.variadic, qf, visited)
-
-	n := sig.results.Len()
-	if n == 0 {
-		// no result
-		return
-	}
-
-	buf.WriteByte(' ')
-	if n == 1 && sig.results.vars[0].name == "" {
-		// single unnamed result
-		writeType(buf, sig.results.vars[0].typ, qf, visited)
-		return
-	}
-
-	// multiple or named result(s)
-	writeTuple(buf, sig.results, false, qf, visited)
-}
diff --git a/src/go/types/typestring_test.go b/src/go/types/typestring_test.go
deleted file mode 100644
index 913e6c7..0000000
--- a/src/go/types/typestring_test.go
+++ /dev/null
@@ -1,168 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package types_test
-
-import (
-	"go/ast"
-	"go/importer"
-	"go/parser"
-	"go/token"
-	"internal/testenv"
-	"testing"
-
-	. "go/types"
-)
-
-const filename = "<src>"
-
-func makePkg(t *testing.T, src string) (*Package, error) {
-	fset := token.NewFileSet()
-	file, err := parser.ParseFile(fset, filename, src, parser.DeclarationErrors)
-	if err != nil {
-		return nil, err
-	}
-	// use the package name as package path
-	conf := Config{Importer: importer.Default()}
-	return conf.Check(file.Name.Name, fset, []*ast.File{file}, nil)
-}
-
-type testEntry struct {
-	src, str string
-}
-
-// dup returns a testEntry where both src and str are the same.
-func dup(s string) testEntry {
-	return testEntry{s, s}
-}
-
-// types that don't depend on any other type declarations
-var independentTestTypes = []testEntry{
-	// basic types
-	dup("int"),
-	dup("float32"),
-	dup("string"),
-
-	// arrays
-	dup("[10]int"),
-
-	// slices
-	dup("[]int"),
-	dup("[][]int"),
-
-	// structs
-	dup("struct{}"),
-	dup("struct{x int}"),
-	{`struct {
-		x, y int
-		z float32 "foo"
-	}`, `struct{x int; y int; z float32 "foo"}`},
-	{`struct {
-		string
-		elems []complex128
-	}`, `struct{string; elems []complex128}`},
-
-	// pointers
-	dup("*int"),
-	dup("***struct{}"),
-	dup("*struct{a int; b float32}"),
-
-	// functions
-	dup("func()"),
-	dup("func(x int)"),
-	{"func(x, y int)", "func(x int, y int)"},
-	{"func(x, y int, z string)", "func(x int, y int, z string)"},
-	dup("func(int)"),
-	{"func(int, string, byte)", "func(int, string, byte)"},
-
-	dup("func() int"),
-	{"func() (string)", "func() string"},
-	dup("func() (u int)"),
-	{"func() (u, v int, w string)", "func() (u int, v int, w string)"},
-
-	dup("func(int) string"),
-	dup("func(x int) string"),
-	dup("func(x int) (u string)"),
-	{"func(x, y int) (u string)", "func(x int, y int) (u string)"},
-
-	dup("func(...int) string"),
-	dup("func(x ...int) string"),
-	dup("func(x ...int) (u string)"),
-	{"func(x, y ...int) (u string)", "func(x int, y ...int) (u string)"},
-
-	// interfaces
-	dup("interface{}"),
-	dup("interface{m()}"),
-	dup(`interface{String() string; m(int) float32}`),
-
-	// maps
-	dup("map[string]int"),
-	{"map[struct{x, y int}][]byte", "map[struct{x int; y int}][]byte"},
-
-	// channels
-	dup("chan<- chan int"),
-	dup("chan<- <-chan int"),
-	dup("<-chan <-chan int"),
-	dup("chan (<-chan int)"),
-	dup("chan<- func()"),
-	dup("<-chan []func() int"),
-}
-
-// types that depend on other type declarations (src in TestTypes)
-var dependentTestTypes = []testEntry{
-	// interfaces
-	dup(`interface{io.Reader; io.Writer}`),
-	dup(`interface{m() int; io.Writer}`),
-	{`interface{m() interface{T}}`, `interface{m() interface{p.T}}`},
-}
-
-func TestTypeString(t *testing.T) {
-	testenv.MustHaveGoBuild(t)
-
-	var tests []testEntry
-	tests = append(tests, independentTestTypes...)
-	tests = append(tests, dependentTestTypes...)
-
-	for _, test := range tests {
-		src := `package p; import "io"; type _ io.Writer; type T ` + test.src
-		pkg, err := makePkg(t, src)
-		if err != nil {
-			t.Errorf("%s: %s", src, err)
-			continue
-		}
-		typ := pkg.Scope().Lookup("T").Type().Underlying()
-		if got := typ.String(); got != test.str {
-			t.Errorf("%s: got %s, want %s", test.src, got, test.str)
-		}
-	}
-}
-
-func TestQualifiedTypeString(t *testing.T) {
-	p, _ := pkgFor("p.go", "package p; type T int", nil)
-	q, _ := pkgFor("q.go", "package q", nil)
-
-	pT := p.Scope().Lookup("T").Type()
-	for _, test := range []struct {
-		typ  Type
-		this *Package
-		want string
-	}{
-		{pT, nil, "p.T"},
-		{pT, p, "T"},
-		{pT, q, "p.T"},
-		{NewPointer(pT), p, "*T"},
-		{NewPointer(pT), q, "*p.T"},
-	} {
-		qualifier := func(pkg *Package) string {
-			if pkg != test.this {
-				return pkg.Name()
-			}
-			return ""
-		}
-		if got := TypeString(test.typ, qualifier); got != test.want {
-			t.Errorf("TypeString(%s, %s) = %s, want %s",
-				test.this, test.typ, got, test.want)
-		}
-	}
-}
diff --git a/src/go/types/typexpr.go b/src/go/types/typexpr.go
deleted file mode 100644
index c744eea..0000000
--- a/src/go/types/typexpr.go
+++ /dev/null
@@ -1,712 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements type-checking of identifiers and type expressions.
-
-package types
-
-import (
-	"go/ast"
-	"go/constant"
-	"go/token"
-	"sort"
-	"strconv"
-)
-
-// ident type-checks identifier e and initializes x with the value or type of e.
-// If an error occurred, x.mode is set to invalid.
-// For the meaning of def and path, see check.typ, below.
-//
-func (check *Checker) ident(x *operand, e *ast.Ident, def *Named, path []*TypeName) {
-	x.mode = invalid
-	x.expr = e
-
-	scope, obj := check.scope.LookupParent(e.Name, check.pos)
-	if obj == nil {
-		if e.Name == "_" {
-			check.errorf(e.Pos(), "cannot use _ as value or type")
-		} else {
-			check.errorf(e.Pos(), "undeclared name: %s", e.Name)
-		}
-		return
-	}
-	check.recordUse(e, obj)
-
-	check.objDecl(obj, def, path)
-	typ := obj.Type()
-	assert(typ != nil)
-
-	// The object may be dot-imported: If so, remove its package from
-	// the map of unused dot imports for the respective file scope.
-	// (This code is only needed for dot-imports. Without them,
-	// we only have to mark variables, see *Var case below).
-	if pkg := obj.Pkg(); pkg != check.pkg && pkg != nil {
-		delete(check.unusedDotImports[scope], pkg)
-	}
-
-	switch obj := obj.(type) {
-	case *PkgName:
-		check.errorf(e.Pos(), "use of package %s not in selector", obj.name)
-		return
-
-	case *Const:
-		check.addDeclDep(obj)
-		if typ == Typ[Invalid] {
-			return
-		}
-		if obj == universeIota {
-			if check.iota == nil {
-				check.errorf(e.Pos(), "cannot use iota outside constant declaration")
-				return
-			}
-			x.val = check.iota
-		} else {
-			x.val = obj.val
-		}
-		assert(x.val != nil)
-		x.mode = constant_
-
-	case *TypeName:
-		x.mode = typexpr
-		// check for cycle
-		// (it's ok to iterate forward because each named type appears at most once in path)
-		for i, prev := range path {
-			if prev == obj {
-				check.errorf(obj.pos, "illegal cycle in declaration of %s", obj.name)
-				// print cycle
-				for _, obj := range path[i:] {
-					check.errorf(obj.Pos(), "\t%s refers to", obj.Name()) // secondary error, \t indented
-				}
-				check.errorf(obj.Pos(), "\t%s", obj.Name())
-				// maintain x.mode == typexpr despite error
-				typ = Typ[Invalid]
-				break
-			}
-		}
-
-	case *Var:
-		if obj.pkg == check.pkg {
-			obj.used = true
-		}
-		check.addDeclDep(obj)
-		if typ == Typ[Invalid] {
-			return
-		}
-		x.mode = variable
-
-	case *Func:
-		check.addDeclDep(obj)
-		x.mode = value
-
-	case *Builtin:
-		x.id = obj.id
-		x.mode = builtin
-
-	case *Nil:
-		x.mode = value
-
-	default:
-		unreachable()
-	}
-
-	x.typ = typ
-}
-
-// typExpr type-checks the type expression e and returns its type, or Typ[Invalid].
-// If def != nil, e is the type specification for the named type def, declared
-// in a type declaration, and def.underlying will be set to the type of e before
-// any components of e are type-checked. Path contains the path of named types
-// referring to this type.
-//
-func (check *Checker) typExpr(e ast.Expr, def *Named, path []*TypeName) (T Type) {
-	if trace {
-		check.trace(e.Pos(), "%s", e)
-		check.indent++
-		defer func() {
-			check.indent--
-			check.trace(e.Pos(), "=> %s", T)
-		}()
-	}
-
-	T = check.typExprInternal(e, def, path)
-	assert(isTyped(T))
-	check.recordTypeAndValue(e, typexpr, T, nil)
-
-	return
-}
-
-func (check *Checker) typ(e ast.Expr) Type {
-	return check.typExpr(e, nil, nil)
-}
-
-// funcType type-checks a function or method type.
-func (check *Checker) funcType(sig *Signature, recvPar *ast.FieldList, ftyp *ast.FuncType) {
-	scope := NewScope(check.scope, token.NoPos, token.NoPos, "function")
-	check.recordScope(ftyp, scope)
-
-	recvList, _ := check.collectParams(scope, recvPar, false)
-	params, variadic := check.collectParams(scope, ftyp.Params, true)
-	results, _ := check.collectParams(scope, ftyp.Results, false)
-
-	if recvPar != nil {
-		// recv parameter list present (may be empty)
-		// spec: "The receiver is specified via an extra parameter section preceding the
-		// method name. That parameter section must declare a single parameter, the receiver."
-		var recv *Var
-		switch len(recvList) {
-		case 0:
-			check.error(recvPar.Pos(), "method is missing receiver")
-			recv = NewParam(0, nil, "", Typ[Invalid]) // ignore recv below
-		default:
-			// more than one receiver
-			check.error(recvList[len(recvList)-1].Pos(), "method must have exactly one receiver")
-			fallthrough // continue with first receiver
-		case 1:
-			recv = recvList[0]
-		}
-		// spec: "The receiver type must be of the form T or *T where T is a type name."
-		// (ignore invalid types - error was reported before)
-		if t, _ := deref(recv.typ); t != Typ[Invalid] {
-			var err string
-			if T, _ := t.(*Named); T != nil {
-				// spec: "The type denoted by T is called the receiver base type; it must not
-				// be a pointer or interface type and it must be declared in the same package
-				// as the method."
-				if T.obj.pkg != check.pkg {
-					err = "type not defined in this package"
-				} else {
-					// TODO(gri) This is not correct if the underlying type is unknown yet.
-					switch u := T.underlying.(type) {
-					case *Basic:
-						// unsafe.Pointer is treated like a regular pointer
-						if u.kind == UnsafePointer {
-							err = "unsafe.Pointer"
-						}
-					case *Pointer, *Interface:
-						err = "pointer or interface type"
-					}
-				}
-			} else {
-				err = "basic or unnamed type"
-			}
-			if err != "" {
-				check.errorf(recv.pos, "invalid receiver %s (%s)", recv.typ, err)
-				// ok to continue
-			}
-		}
-		sig.recv = recv
-	}
-
-	sig.scope = scope
-	sig.params = NewTuple(params...)
-	sig.results = NewTuple(results...)
-	sig.variadic = variadic
-}
-
-// typExprInternal drives type checking of types.
-// Must only be called by typExpr.
-//
-func (check *Checker) typExprInternal(e ast.Expr, def *Named, path []*TypeName) Type {
-	switch e := e.(type) {
-	case *ast.BadExpr:
-		// ignore - error reported before
-
-	case *ast.Ident:
-		var x operand
-		check.ident(&x, e, def, path)
-
-		switch x.mode {
-		case typexpr:
-			typ := x.typ
-			def.setUnderlying(typ)
-			return typ
-		case invalid:
-			// ignore - error reported before
-		case novalue:
-			check.errorf(x.pos(), "%s used as type", &x)
-		default:
-			check.errorf(x.pos(), "%s is not a type", &x)
-		}
-
-	case *ast.SelectorExpr:
-		var x operand
-		check.selector(&x, e)
-
-		switch x.mode {
-		case typexpr:
-			typ := x.typ
-			def.setUnderlying(typ)
-			return typ
-		case invalid:
-			// ignore - error reported before
-		case novalue:
-			check.errorf(x.pos(), "%s used as type", &x)
-		default:
-			check.errorf(x.pos(), "%s is not a type", &x)
-		}
-
-	case *ast.ParenExpr:
-		return check.typExpr(e.X, def, path)
-
-	case *ast.ArrayType:
-		if e.Len != nil {
-			typ := new(Array)
-			def.setUnderlying(typ)
-			typ.len = check.arrayLength(e.Len)
-			typ.elem = check.typExpr(e.Elt, nil, path)
-			return typ
-
-		} else {
-			typ := new(Slice)
-			def.setUnderlying(typ)
-			typ.elem = check.typ(e.Elt)
-			return typ
-		}
-
-	case *ast.StructType:
-		typ := new(Struct)
-		def.setUnderlying(typ)
-		check.structType(typ, e, path)
-		return typ
-
-	case *ast.StarExpr:
-		typ := new(Pointer)
-		def.setUnderlying(typ)
-		typ.base = check.typ(e.X)
-		return typ
-
-	case *ast.FuncType:
-		typ := new(Signature)
-		def.setUnderlying(typ)
-		check.funcType(typ, nil, e)
-		return typ
-
-	case *ast.InterfaceType:
-		typ := new(Interface)
-		def.setUnderlying(typ)
-		check.interfaceType(typ, e, def, path)
-		return typ
-
-	case *ast.MapType:
-		typ := new(Map)
-		def.setUnderlying(typ)
-
-		typ.key = check.typ(e.Key)
-		typ.elem = check.typ(e.Value)
-
-		// spec: "The comparison operators == and != must be fully defined
-		// for operands of the key type; thus the key type must not be a
-		// function, map, or slice."
-		//
-		// Delay this check because it requires fully setup types;
-		// it is safe to continue in any case (was issue 6667).
-		check.delay(func() {
-			if !Comparable(typ.key) {
-				check.errorf(e.Key.Pos(), "invalid map key type %s", typ.key)
-			}
-		})
-
-		return typ
-
-	case *ast.ChanType:
-		typ := new(Chan)
-		def.setUnderlying(typ)
-
-		dir := SendRecv
-		switch e.Dir {
-		case ast.SEND | ast.RECV:
-			// nothing to do
-		case ast.SEND:
-			dir = SendOnly
-		case ast.RECV:
-			dir = RecvOnly
-		default:
-			check.invalidAST(e.Pos(), "unknown channel direction %d", e.Dir)
-			// ok to continue
-		}
-
-		typ.dir = dir
-		typ.elem = check.typ(e.Value)
-		return typ
-
-	default:
-		check.errorf(e.Pos(), "%s is not a type", e)
-	}
-
-	typ := Typ[Invalid]
-	def.setUnderlying(typ)
-	return typ
-}
-
-// typeOrNil type-checks the type expression (or nil value) e
-// and returns the typ of e, or nil.
-// If e is neither a type nor nil, typOrNil returns Typ[Invalid].
-//
-func (check *Checker) typOrNil(e ast.Expr) Type {
-	var x operand
-	check.rawExpr(&x, e, nil)
-	switch x.mode {
-	case invalid:
-		// ignore - error reported before
-	case novalue:
-		check.errorf(x.pos(), "%s used as type", &x)
-	case typexpr:
-		return x.typ
-	case value:
-		if x.isNil() {
-			return nil
-		}
-		fallthrough
-	default:
-		check.errorf(x.pos(), "%s is not a type", &x)
-	}
-	return Typ[Invalid]
-}
-
-func (check *Checker) arrayLength(e ast.Expr) int64 {
-	var x operand
-	check.expr(&x, e)
-	if x.mode != constant_ {
-		if x.mode != invalid {
-			check.errorf(x.pos(), "array length %s must be constant", &x)
-		}
-		return 0
-	}
-	if !x.isInteger() {
-		check.errorf(x.pos(), "array length %s must be integer", &x)
-		return 0
-	}
-	n, ok := constant.Int64Val(x.val)
-	if !ok || n < 0 {
-		check.errorf(x.pos(), "invalid array length %s", &x)
-		return 0
-	}
-	return n
-}
-
-func (check *Checker) collectParams(scope *Scope, list *ast.FieldList, variadicOk bool) (params []*Var, variadic bool) {
-	if list == nil {
-		return
-	}
-
-	var named, anonymous bool
-	for i, field := range list.List {
-		ftype := field.Type
-		if t, _ := ftype.(*ast.Ellipsis); t != nil {
-			ftype = t.Elt
-			if variadicOk && i == len(list.List)-1 {
-				variadic = true
-			} else {
-				check.invalidAST(field.Pos(), "... not permitted")
-				// ignore ... and continue
-			}
-		}
-		typ := check.typ(ftype)
-		// The parser ensures that f.Tag is nil and we don't
-		// care if a constructed AST contains a non-nil tag.
-		if len(field.Names) > 0 {
-			// named parameter
-			for _, name := range field.Names {
-				if name.Name == "" {
-					check.invalidAST(name.Pos(), "anonymous parameter")
-					// ok to continue
-				}
-				par := NewParam(name.Pos(), check.pkg, name.Name, typ)
-				check.declare(scope, name, par, scope.pos)
-				params = append(params, par)
-			}
-			named = true
-		} else {
-			// anonymous parameter
-			par := NewParam(ftype.Pos(), check.pkg, "", typ)
-			check.recordImplicit(field, par)
-			params = append(params, par)
-			anonymous = true
-		}
-	}
-
-	if named && anonymous {
-		check.invalidAST(list.Pos(), "list contains both named and anonymous parameters")
-		// ok to continue
-	}
-
-	// For a variadic function, change the last parameter's type from T to []T.
-	if variadic && len(params) > 0 {
-		last := params[len(params)-1]
-		last.typ = &Slice{elem: last.typ}
-	}
-
-	return
-}
-
-func (check *Checker) declareInSet(oset *objset, pos token.Pos, obj Object) bool {
-	if alt := oset.insert(obj); alt != nil {
-		check.errorf(pos, "%s redeclared", obj.Name())
-		check.reportAltDecl(alt)
-		return false
-	}
-	return true
-}
-
-func (check *Checker) interfaceType(iface *Interface, ityp *ast.InterfaceType, def *Named, path []*TypeName) {
-	// empty interface: common case
-	if ityp.Methods == nil {
-		return
-	}
-
-	// The parser ensures that field tags are nil and we don't
-	// care if a constructed AST contains non-nil tags.
-
-	// use named receiver type if available (for better error messages)
-	var recvTyp Type = iface
-	if def != nil {
-		recvTyp = def
-	}
-
-	// Phase 1: Collect explicitly declared methods, the corresponding
-	//          signature (AST) expressions, and the list of embedded
-	//          type (AST) expressions. Do not resolve signatures or
-	//          embedded types yet to avoid cycles referring to this
-	//          interface.
-
-	var (
-		mset       objset
-		signatures []ast.Expr // list of corresponding method signatures
-		embedded   []ast.Expr // list of embedded types
-	)
-	for _, f := range ityp.Methods.List {
-		if len(f.Names) > 0 {
-			// The parser ensures that there's only one method
-			// and we don't care if a constructed AST has more.
-			name := f.Names[0]
-			pos := name.Pos()
-			// spec: "As with all method sets, in an interface type,
-			// each method must have a unique non-blank name."
-			if name.Name == "_" {
-				check.errorf(pos, "invalid method name _")
-				continue
-			}
-			// Don't type-check signature yet - use an
-			// empty signature now and update it later.
-			// Since we know the receiver, set it up now
-			// (required to avoid crash in ptrRecv; see
-			// e.g. test case for issue 6638).
-			// TODO(gri) Consider marking methods signatures
-			// as incomplete, for better error messages. See
-			// also the T4 and T5 tests in testdata/cycles2.src.
-			sig := new(Signature)
-			sig.recv = NewVar(pos, check.pkg, "", recvTyp)
-			m := NewFunc(pos, check.pkg, name.Name, sig)
-			if check.declareInSet(&mset, pos, m) {
-				iface.methods = append(iface.methods, m)
-				iface.allMethods = append(iface.allMethods, m)
-				signatures = append(signatures, f.Type)
-				check.recordDef(name, m)
-			}
-		} else {
-			// embedded type
-			embedded = append(embedded, f.Type)
-		}
-	}
-
-	// Phase 2: Resolve embedded interfaces. Because an interface must not
-	//          embed itself (directly or indirectly), each embedded interface
-	//          can be fully resolved without depending on any method of this
-	//          interface (if there is a cycle or another error, the embedded
-	//          type resolves to an invalid type and is ignored).
-	//          In particular, the list of methods for each embedded interface
-	//          must be complete (it cannot depend on this interface), and so
-	//          those methods can be added to the list of all methods of this
-	//          interface.
-
-	for _, e := range embedded {
-		pos := e.Pos()
-		typ := check.typExpr(e, nil, path)
-		// Determine underlying embedded (possibly incomplete) type
-		// by following its forward chain.
-		named, _ := typ.(*Named)
-		under := underlying(named)
-		embed, _ := under.(*Interface)
-		if embed == nil {
-			if typ != Typ[Invalid] {
-				check.errorf(pos, "%s is not an interface", typ)
-			}
-			continue
-		}
-		iface.embeddeds = append(iface.embeddeds, named)
-		// collect embedded methods
-		for _, m := range embed.allMethods {
-			if check.declareInSet(&mset, pos, m) {
-				iface.allMethods = append(iface.allMethods, m)
-			}
-		}
-	}
-
-	// Phase 3: At this point all methods have been collected for this interface.
-	//          It is now safe to type-check the signatures of all explicitly
-	//          declared methods, even if they refer to this interface via a cycle
-	//          and embed the methods of this interface in a parameter of interface
-	//          type.
-
-	for i, m := range iface.methods {
-		expr := signatures[i]
-		typ := check.typ(expr)
-		sig, _ := typ.(*Signature)
-		if sig == nil {
-			if typ != Typ[Invalid] {
-				check.invalidAST(expr.Pos(), "%s is not a method signature", typ)
-			}
-			continue // keep method with empty method signature
-		}
-		// update signature, but keep recv that was set up before
-		old := m.typ.(*Signature)
-		sig.recv = old.recv
-		*old = *sig // update signature (don't replace it!)
-	}
-
-	// TODO(gri) The list of explicit methods is only sorted for now to
-	// produce the same Interface as NewInterface. We may be able to
-	// claim source order in the future. Revisit.
-	sort.Sort(byUniqueMethodName(iface.methods))
-
-	// TODO(gri) The list of embedded types is only sorted for now to
-	// produce the same Interface as NewInterface. We may be able to
-	// claim source order in the future. Revisit.
-	sort.Sort(byUniqueTypeName(iface.embeddeds))
-
-	sort.Sort(byUniqueMethodName(iface.allMethods))
-}
-
-// byUniqueTypeName named type lists can be sorted by their unique type names.
-type byUniqueTypeName []*Named
-
-func (a byUniqueTypeName) Len() int           { return len(a) }
-func (a byUniqueTypeName) Less(i, j int) bool { return a[i].obj.Id() < a[j].obj.Id() }
-func (a byUniqueTypeName) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }
-
-// byUniqueMethodName method lists can be sorted by their unique method names.
-type byUniqueMethodName []*Func
-
-func (a byUniqueMethodName) Len() int           { return len(a) }
-func (a byUniqueMethodName) Less(i, j int) bool { return a[i].Id() < a[j].Id() }
-func (a byUniqueMethodName) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }
-
-func (check *Checker) tag(t *ast.BasicLit) string {
-	if t != nil {
-		if t.Kind == token.STRING {
-			if val, err := strconv.Unquote(t.Value); err == nil {
-				return val
-			}
-		}
-		check.invalidAST(t.Pos(), "incorrect tag syntax: %q", t.Value)
-	}
-	return ""
-}
-
-func (check *Checker) structType(styp *Struct, e *ast.StructType, path []*TypeName) {
-	list := e.Fields
-	if list == nil {
-		return
-	}
-
-	// struct fields and tags
-	var fields []*Var
-	var tags []string
-
-	// for double-declaration checks
-	var fset objset
-
-	// current field typ and tag
-	var typ Type
-	var tag string
-	// anonymous != nil indicates an anonymous field.
-	add := func(field *ast.Field, ident *ast.Ident, anonymous *TypeName, pos token.Pos) {
-		if tag != "" && tags == nil {
-			tags = make([]string, len(fields))
-		}
-		if tags != nil {
-			tags = append(tags, tag)
-		}
-
-		name := ident.Name
-		fld := NewField(pos, check.pkg, name, typ, anonymous != nil)
-		// spec: "Within a struct, non-blank field names must be unique."
-		if name == "_" || check.declareInSet(&fset, pos, fld) {
-			fields = append(fields, fld)
-			check.recordDef(ident, fld)
-		}
-		if anonymous != nil {
-			check.recordUse(ident, anonymous)
-		}
-	}
-
-	for _, f := range list.List {
-		typ = check.typExpr(f.Type, nil, path)
-		tag = check.tag(f.Tag)
-		if len(f.Names) > 0 {
-			// named fields
-			for _, name := range f.Names {
-				add(f, name, nil, name.Pos())
-			}
-		} else {
-			// anonymous field
-			name := anonymousFieldIdent(f.Type)
-			pos := f.Type.Pos()
-			t, isPtr := deref(typ)
-			switch t := t.(type) {
-			case *Basic:
-				if t == Typ[Invalid] {
-					// error was reported before
-					continue
-				}
-				// unsafe.Pointer is treated like a regular pointer
-				if t.kind == UnsafePointer {
-					check.errorf(pos, "anonymous field type cannot be unsafe.Pointer")
-					continue
-				}
-				add(f, name, Universe.Lookup(t.name).(*TypeName), pos)
-
-			case *Named:
-				// spec: "An embedded type must be specified as a type name
-				// T or as a pointer to a non-interface type name *T, and T
-				// itself may not be a pointer type."
-				switch u := t.underlying.(type) {
-				case *Basic:
-					// unsafe.Pointer is treated like a regular pointer
-					if u.kind == UnsafePointer {
-						check.errorf(pos, "anonymous field type cannot be unsafe.Pointer")
-						continue
-					}
-				case *Pointer:
-					check.errorf(pos, "anonymous field type cannot be a pointer")
-					continue
-				case *Interface:
-					if isPtr {
-						check.errorf(pos, "anonymous field type cannot be a pointer to an interface")
-						continue
-					}
-				}
-				add(f, name, t.obj, pos)
-
-			default:
-				check.invalidAST(pos, "anonymous field type %s must be named", typ)
-			}
-		}
-	}
-
-	styp.fields = fields
-	styp.tags = tags
-}
-
-func anonymousFieldIdent(e ast.Expr) *ast.Ident {
-	switch e := e.(type) {
-	case *ast.Ident:
-		return e
-	case *ast.StarExpr:
-		return anonymousFieldIdent(e.X)
-	case *ast.SelectorExpr:
-		return e.Sel
-	}
-	return nil // invalid anonymous field
-}
diff --git a/src/go/types/universe.go b/src/go/types/universe.go
deleted file mode 100644
index 40185c1..0000000
--- a/src/go/types/universe.go
+++ /dev/null
@@ -1,223 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file sets up the universe scope and the unsafe package.
-
-package types
-
-import (
-	"go/constant"
-	"go/token"
-	"strings"
-)
-
-var (
-	Universe     *Scope
-	Unsafe       *Package
-	universeIota *Const
-	universeByte *Basic // uint8 alias, but has name "byte"
-	universeRune *Basic // int32 alias, but has name "rune"
-)
-
-var Typ = []*Basic{
-	Invalid: {Invalid, 0, "invalid type"},
-
-	Bool:          {Bool, IsBoolean, "bool"},
-	Int:           {Int, IsInteger, "int"},
-	Int8:          {Int8, IsInteger, "int8"},
-	Int16:         {Int16, IsInteger, "int16"},
-	Int32:         {Int32, IsInteger, "int32"},
-	Int64:         {Int64, IsInteger, "int64"},
-	Uint:          {Uint, IsInteger | IsUnsigned, "uint"},
-	Uint8:         {Uint8, IsInteger | IsUnsigned, "uint8"},
-	Uint16:        {Uint16, IsInteger | IsUnsigned, "uint16"},
-	Uint32:        {Uint32, IsInteger | IsUnsigned, "uint32"},
-	Uint64:        {Uint64, IsInteger | IsUnsigned, "uint64"},
-	Uintptr:       {Uintptr, IsInteger | IsUnsigned, "uintptr"},
-	Float32:       {Float32, IsFloat, "float32"},
-	Float64:       {Float64, IsFloat, "float64"},
-	Complex64:     {Complex64, IsComplex, "complex64"},
-	Complex128:    {Complex128, IsComplex, "complex128"},
-	String:        {String, IsString, "string"},
-	UnsafePointer: {UnsafePointer, 0, "Pointer"},
-
-	UntypedBool:    {UntypedBool, IsBoolean | IsUntyped, "untyped bool"},
-	UntypedInt:     {UntypedInt, IsInteger | IsUntyped, "untyped int"},
-	UntypedRune:    {UntypedRune, IsInteger | IsUntyped, "untyped rune"},
-	UntypedFloat:   {UntypedFloat, IsFloat | IsUntyped, "untyped float"},
-	UntypedComplex: {UntypedComplex, IsComplex | IsUntyped, "untyped complex"},
-	UntypedString:  {UntypedString, IsString | IsUntyped, "untyped string"},
-	UntypedNil:     {UntypedNil, IsUntyped, "untyped nil"},
-}
-
-var aliases = [...]*Basic{
-	{Byte, IsInteger | IsUnsigned, "byte"},
-	{Rune, IsInteger, "rune"},
-}
-
-func defPredeclaredTypes() {
-	for _, t := range Typ {
-		def(NewTypeName(token.NoPos, nil, t.name, t))
-	}
-	for _, t := range aliases {
-		def(NewTypeName(token.NoPos, nil, t.name, t))
-	}
-
-	// Error has a nil package in its qualified name since it is in no package
-	res := NewVar(token.NoPos, nil, "", Typ[String])
-	sig := &Signature{results: NewTuple(res)}
-	err := NewFunc(token.NoPos, nil, "Error", sig)
-	typ := &Named{underlying: NewInterface([]*Func{err}, nil).Complete()}
-	sig.recv = NewVar(token.NoPos, nil, "", typ)
-	def(NewTypeName(token.NoPos, nil, "error", typ))
-}
-
-var predeclaredConsts = [...]struct {
-	name string
-	kind BasicKind
-	val  constant.Value
-}{
-	{"true", UntypedBool, constant.MakeBool(true)},
-	{"false", UntypedBool, constant.MakeBool(false)},
-	{"iota", UntypedInt, constant.MakeInt64(0)},
-}
-
-func defPredeclaredConsts() {
-	for _, c := range predeclaredConsts {
-		def(NewConst(token.NoPos, nil, c.name, Typ[c.kind], c.val))
-	}
-}
-
-func defPredeclaredNil() {
-	def(&Nil{object{name: "nil", typ: Typ[UntypedNil]}})
-}
-
-// A builtinId is the id of a builtin function.
-type builtinId int
-
-const (
-	// universe scope
-	_Append builtinId = iota
-	_Cap
-	_Close
-	_Complex
-	_Copy
-	_Delete
-	_Imag
-	_Len
-	_Make
-	_New
-	_Panic
-	_Print
-	_Println
-	_Real
-	_Recover
-
-	// package unsafe
-	_Alignof
-	_Offsetof
-	_Sizeof
-
-	// testing support
-	_Assert
-	_Trace
-)
-
-var predeclaredFuncs = [...]struct {
-	name     string
-	nargs    int
-	variadic bool
-	kind     exprKind
-}{
-	_Append:  {"append", 1, true, expression},
-	_Cap:     {"cap", 1, false, expression},
-	_Close:   {"close", 1, false, statement},
-	_Complex: {"complex", 2, false, expression},
-	_Copy:    {"copy", 2, false, statement},
-	_Delete:  {"delete", 2, false, statement},
-	_Imag:    {"imag", 1, false, expression},
-	_Len:     {"len", 1, false, expression},
-	_Make:    {"make", 1, true, expression},
-	_New:     {"new", 1, false, expression},
-	_Panic:   {"panic", 1, false, statement},
-	_Print:   {"print", 0, true, statement},
-	_Println: {"println", 0, true, statement},
-	_Real:    {"real", 1, false, expression},
-	_Recover: {"recover", 0, false, statement},
-
-	_Alignof:  {"Alignof", 1, false, expression},
-	_Offsetof: {"Offsetof", 1, false, expression},
-	_Sizeof:   {"Sizeof", 1, false, expression},
-
-	_Assert: {"assert", 1, false, statement},
-	_Trace:  {"trace", 0, true, statement},
-}
-
-func defPredeclaredFuncs() {
-	for i := range predeclaredFuncs {
-		id := builtinId(i)
-		if id == _Assert || id == _Trace {
-			continue // only define these in testing environment
-		}
-		def(newBuiltin(id))
-	}
-}
-
-// DefPredeclaredTestFuncs defines the assert and trace built-ins.
-// These built-ins are intended for debugging and testing of this
-// package only.
-func DefPredeclaredTestFuncs() {
-	if Universe.Lookup("assert") != nil {
-		return // already defined
-	}
-	def(newBuiltin(_Assert))
-	def(newBuiltin(_Trace))
-}
-
-func init() {
-	Universe = NewScope(nil, token.NoPos, token.NoPos, "universe")
-	Unsafe = NewPackage("unsafe", "unsafe")
-	Unsafe.complete = true
-
-	defPredeclaredTypes()
-	defPredeclaredConsts()
-	defPredeclaredNil()
-	defPredeclaredFuncs()
-
-	universeIota = Universe.Lookup("iota").(*Const)
-	universeByte = Universe.Lookup("byte").(*TypeName).typ.(*Basic)
-	universeRune = Universe.Lookup("rune").(*TypeName).typ.(*Basic)
-}
-
-// Objects with names containing blanks are internal and not entered into
-// a scope. Objects with exported names are inserted in the unsafe package
-// scope; other objects are inserted in the universe scope.
-//
-func def(obj Object) {
-	name := obj.Name()
-	if strings.Index(name, " ") >= 0 {
-		return // nothing to do
-	}
-	// fix Obj link for named types
-	if typ, ok := obj.Type().(*Named); ok {
-		typ.obj = obj.(*TypeName)
-	}
-	// exported identifiers go into package unsafe
-	scope := Universe
-	if obj.Exported() {
-		scope = Unsafe.scope
-		// set Pkg field
-		switch obj := obj.(type) {
-		case *TypeName:
-			obj.pkg = Unsafe
-		case *Builtin:
-			obj.pkg = Unsafe
-		default:
-			unreachable()
-		}
-	}
-	if scope.Insert(obj) != nil {
-		panic("internal error: double declaration")
-	}
-}
diff --git a/src/hash/crc32/example_test.go b/src/hash/crc32/example_test.go
deleted file mode 100644
index 621bf83..0000000
--- a/src/hash/crc32/example_test.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package crc32_test
-
-import (
-	"fmt"
-	"hash/crc32"
-)
-
-func ExampleMakeTable() {
-	// In this package, the CRC polynomial is represented in reversed notation,
-	// or LSB-first representation.
-	//
-	// LSB-first representation is a hexadecimal number with n bits, in which the
-	// most significant bit represents the coefficient of x⁰ and the least significant
-	// bit represents the coefficient of xⁿ⁻¹ (the coefficient for xⁿ is implicit).
-	//
-	// For example, CRC32-Q, as defined by the following polynomial,
-	//	x³²+ x³¹+ x²⁴+ x²²+ x¹⁶+ x¹⁴+ x⁸+ x⁷+ x⁵+ x³+ x¹+ x⁰
-	// has the reversed notation 0b11010101100000101000001010000001, so the value
-	// that should be passed to MakeTable is 0xD5828281.
-	crc32q := crc32.MakeTable(0xD5828281)
-	fmt.Printf("%08x\n", crc32.Checksum([]byte("Hello world"), crc32q))
-	// Output:
-	// 2964d064
-}
diff --git a/src/html/example_test.go b/src/html/example_test.go
deleted file mode 100644
index 0e28cac..0000000
--- a/src/html/example_test.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package html_test
-
-import (
-	"fmt"
-	"html"
-)
-
-func ExampleEscapeString() {
-	const s = `"Fran & Freddie's Diner" <tasty at example.com>`
-	fmt.Println(html.EscapeString(s))
-	// Output: "Fran & Freddie's Diner" <tasty at example.com>
-}
-
-func ExampleUnescapeString() {
-	const s = `"Fran & Freddie's Diner" <tasty at example.com>`
-	fmt.Println(html.UnescapeString(s))
-	// Output: "Fran & Freddie's Diner" <tasty at example.com>
-}
diff --git a/src/html/template/example_test.go b/src/html/template/example_test.go
deleted file mode 100644
index a75ceec..0000000
--- a/src/html/template/example_test.go
+++ /dev/null
@@ -1,122 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package template_test
-
-import (
-	"fmt"
-	"html/template"
-	"log"
-	"os"
-)
-
-func Example() {
-	const tpl = `
-<!DOCTYPE html>
-<html>
-	<head>
-		<meta charset="UTF-8">
-		<title>{{.Title}}</title>
-	</head>
-	<body>
-		{{range .Items}}<div>{{ . }}</div>{{else}}<div><strong>no rows</strong></div>{{end}}
-	</body>
-</html>`
-
-	check := func(err error) {
-		if err != nil {
-			log.Fatal(err)
-		}
-	}
-	t, err := template.New("webpage").Parse(tpl)
-
-	data := struct {
-		Title string
-		Items []string
-	}{
-		Title: "My page",
-		Items: []string{
-			"My photos",
-			"My blog",
-		},
-	}
-
-	err = t.Execute(os.Stdout, data)
-	check(err)
-
-	noItems := struct {
-		Title string
-		Items []string
-	}{
-		Title: "My another page",
-		Items: []string{},
-	}
-
-	err = t.Execute(os.Stdout, noItems)
-	check(err)
-
-	// Output:
-	// <!DOCTYPE html>
-	// <html>
-	// 	<head>
-	// 		<meta charset="UTF-8">
-	// 		<title>My page</title>
-	// 	</head>
-	// 	<body>
-	// 		<div>My photos</div><div>My blog</div>
-	// 	</body>
-	// </html>
-	// <!DOCTYPE html>
-	// <html>
-	// 	<head>
-	// 		<meta charset="UTF-8">
-	// 		<title>My another page</title>
-	// 	</head>
-	// 	<body>
-	// 		<div><strong>no rows</strong></div>
-	// 	</body>
-	// </html>
-
-}
-
-func Example_autoescaping() {
-	check := func(err error) {
-		if err != nil {
-			log.Fatal(err)
-		}
-	}
-	t, err := template.New("foo").Parse(`{{define "T"}}Hello, {{.}}!{{end}}`)
-	check(err)
-	err = t.ExecuteTemplate(os.Stdout, "T", "<script>alert('you have been pwned')</script>")
-	check(err)
-	// Output:
-	// Hello, <script>alert('you have been pwned')</script>!
-}
-
-func Example_escape() {
-	const s = `"Fran & Freddie's Diner" <tasty at example.com>`
-	v := []interface{}{`"Fran & Freddie's Diner"`, ' ', `<tasty at example.com>`}
-
-	fmt.Println(template.HTMLEscapeString(s))
-	template.HTMLEscape(os.Stdout, []byte(s))
-	fmt.Fprintln(os.Stdout, "")
-	fmt.Println(template.HTMLEscaper(v...))
-
-	fmt.Println(template.JSEscapeString(s))
-	template.JSEscape(os.Stdout, []byte(s))
-	fmt.Fprintln(os.Stdout, "")
-	fmt.Println(template.JSEscaper(v...))
-
-	fmt.Println(template.URLQueryEscaper(v...))
-
-	// Output:
-	// "Fran & Freddie's Diner" <tasty at example.com>
-	// "Fran & Freddie's Diner" <tasty at example.com>
-	// "Fran & Freddie's Diner"32<tasty at example.com>
-	// \"Fran & Freddie\'s Diner\" \x3Ctasty at example.com\x3E
-	// \"Fran & Freddie\'s Diner\" \x3Ctasty at example.com\x3E
-	// \"Fran & Freddie\'s Diner\"32\x3Ctasty at example.com\x3E
-	// %22Fran+%26+Freddie%27s+Diner%2232%3Ctasty%40example.com%3E
-
-}
diff --git a/src/html/template/transition_test.go b/src/html/template/transition_test.go
deleted file mode 100644
index 412a4c7..0000000
--- a/src/html/template/transition_test.go
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package template
-
-import (
-	"bytes"
-	"strings"
-	"testing"
-)
-
-func TestFindEndTag(t *testing.T) {
-	tests := []struct {
-		s, tag string
-		want   int
-	}{
-		{"", "tag", -1},
-		{"hello </textarea> hello", "textarea", 6},
-		{"hello </TEXTarea> hello", "textarea", 6},
-		{"hello </textAREA>", "textarea", 6},
-		{"hello </textarea", "textareax", -1},
-		{"hello </textarea>", "tag", -1},
-		{"hello tag </textarea", "tag", -1},
-		{"hello </tag> </other> </textarea> <other>", "textarea", 22},
-		{"</textarea> <other>", "textarea", 0},
-		{"<div> </div> </TEXTAREA>", "textarea", 13},
-		{"<div> </div> </TEXTAREA\t>", "textarea", 13},
-		{"<div> </div> </TEXTAREA >", "textarea", 13},
-		{"<div> </div> </TEXTAREAfoo", "textarea", -1},
-		{"</TEXTAREAfoo </textarea>", "textarea", 14},
-		{"<</script >", "script", 1},
-		{"</script>", "textarea", -1},
-	}
-	for _, test := range tests {
-		if got := indexTagEnd([]byte(test.s), []byte(test.tag)); test.want != got {
-			t.Errorf("%q/%q: want\n\t%d\nbut got\n\t%d", test.s, test.tag, test.want, got)
-		}
-	}
-}
-
-func BenchmarkTemplateSpecialTags(b *testing.B) {
-
-	r := struct {
-		Name, Gift string
-	}{"Aunt Mildred", "bone china tea set"}
-
-	h1 := "<textarea> Hello Hello Hello </textarea> "
-	h2 := "<textarea> <p> Dear {{.Name}},\n{{with .Gift}}Thank you for the lovely {{.}}. {{end}}\nBest wishes. </p>\n</textarea>"
-	html := strings.Repeat(h1, 100) + h2 + strings.Repeat(h1, 100) + h2
-
-	var buf bytes.Buffer
-	for i := 0; i < b.N; i++ {
-		tmpl := Must(New("foo").Parse(html))
-		if err := tmpl.Execute(&buf, r); err != nil {
-			b.Fatal(err)
-		}
-		buf.Reset()
-	}
-}
diff --git a/src/image/geom_test.go b/src/image/geom_test.go
deleted file mode 100644
index 6e9c6a1..0000000
--- a/src/image/geom_test.go
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package image
-
-import (
-	"fmt"
-	"testing"
-)
-
-func TestRectangle(t *testing.T) {
-	// in checks that every point in f is in g.
-	in := func(f, g Rectangle) error {
-		if !f.In(g) {
-			return fmt.Errorf("f=%s, f.In(%s): got false, want true", f, g)
-		}
-		for y := f.Min.Y; y < f.Max.Y; y++ {
-			for x := f.Min.X; x < f.Max.X; x++ {
-				p := Point{x, y}
-				if !p.In(g) {
-					return fmt.Errorf("p=%s, p.In(%s): got false, want true", p, g)
-				}
-			}
-		}
-		return nil
-	}
-
-	rects := []Rectangle{
-		Rect(0, 0, 10, 10),
-		Rect(1, 2, 3, 4),
-		Rect(4, 6, 10, 10),
-		Rect(2, 3, 12, 5),
-		Rect(-1, -2, 0, 0),
-		Rect(-1, -2, 4, 6),
-		Rect(-10, -20, 30, 40),
-		Rect(8, 8, 8, 8),
-		Rect(88, 88, 88, 88),
-		Rect(6, 5, 4, 3),
-	}
-
-	// r.Eq(s) should be equivalent to every point in r being in s, and every
-	// point in s being in r.
-	for _, r := range rects {
-		for _, s := range rects {
-			got := r.Eq(s)
-			want := in(r, s) == nil && in(s, r) == nil
-			if got != want {
-				t.Errorf("Eq: r=%s, s=%s: got %t, want %t", r, s, got, want)
-			}
-		}
-	}
-
-	// The intersection should be the largest rectangle a such that every point
-	// in a is both in r and in s.
-	for _, r := range rects {
-		for _, s := range rects {
-			a := r.Intersect(s)
-			if err := in(a, r); err != nil {
-				t.Errorf("Intersect: r=%s, s=%s, a=%s, a not in r: %v", r, s, a, err)
-			}
-			if err := in(a, s); err != nil {
-				t.Errorf("Intersect: r=%s, s=%s, a=%s, a not in s: %v", r, s, a, err)
-			}
-			if a.Empty() == r.Overlaps(s) {
-				t.Errorf("Intersect: r=%s, s=%s, a=%s: empty=%t same as overlaps=%t",
-					r, s, a, a.Empty(), r.Overlaps(s))
-			}
-			largerThanA := [4]Rectangle{a, a, a, a}
-			largerThanA[0].Min.X--
-			largerThanA[1].Min.Y--
-			largerThanA[2].Max.X++
-			largerThanA[3].Max.Y++
-			for i, b := range largerThanA {
-				if b.Empty() {
-					// b isn't actually larger than a.
-					continue
-				}
-				if in(b, r) == nil && in(b, s) == nil {
-					t.Errorf("Intersect: r=%s, s=%s, a=%s, b=%s, i=%d: intersection could be larger",
-						r, s, a, b, i)
-				}
-			}
-		}
-	}
-
-	// The union should be the smallest rectangle a such that every point in r
-	// is in a and every point in s is in a.
-	for _, r := range rects {
-		for _, s := range rects {
-			a := r.Union(s)
-			if err := in(r, a); err != nil {
-				t.Errorf("Union: r=%s, s=%s, a=%s, r not in a: %v", r, s, a, err)
-			}
-			if err := in(s, a); err != nil {
-				t.Errorf("Union: r=%s, s=%s, a=%s, s not in a: %v", r, s, a, err)
-			}
-			if a.Empty() {
-				// You can't get any smaller than a.
-				continue
-			}
-			smallerThanA := [4]Rectangle{a, a, a, a}
-			smallerThanA[0].Min.X++
-			smallerThanA[1].Min.Y++
-			smallerThanA[2].Max.X--
-			smallerThanA[3].Max.Y--
-			for i, b := range smallerThanA {
-				if in(r, b) == nil && in(s, b) == nil {
-					t.Errorf("Union: r=%s, s=%s, a=%s, b=%s, i=%d: union could be smaller",
-						r, s, a, b, i)
-				}
-			}
-		}
-	}
-}
diff --git a/src/image/internal/imageutil/gen.go b/src/image/internal/imageutil/gen.go
deleted file mode 100644
index fc1e707..0000000
--- a/src/image/internal/imageutil/gen.go
+++ /dev/null
@@ -1,154 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-package main
-
-import (
-	"bytes"
-	"flag"
-	"fmt"
-	"go/format"
-	"io/ioutil"
-	"log"
-	"os"
-)
-
-var debug = flag.Bool("debug", false, "")
-
-func main() {
-	flag.Parse()
-
-	w := new(bytes.Buffer)
-	w.WriteString(pre)
-	for _, sratio := range subsampleRatios {
-		fmt.Fprintf(w, sratioCase, sratio, sratioLines[sratio])
-	}
-	w.WriteString(post)
-
-	if *debug {
-		os.Stdout.Write(w.Bytes())
-		return
-	}
-	out, err := format.Source(w.Bytes())
-	if err != nil {
-		log.Fatal(err)
-	}
-	if err := ioutil.WriteFile("impl.go", out, 0660); err != nil {
-		log.Fatal(err)
-	}
-}
-
-const pre = `// generated by "go run gen.go". DO NOT EDIT.
-
-package imageutil
-
-import (
-	"image"
-)
-
-// DrawYCbCr draws the YCbCr source image on the RGBA destination image with
-// r.Min in dst aligned with sp in src. It reports whether the draw was
-// successful. If it returns false, no dst pixels were changed.
-//
-// This function assumes that r is entirely within dst's bounds and the
-// translation of r from dst coordinate space to src coordinate space is
-// entirely within src's bounds.
-func DrawYCbCr(dst *image.RGBA, r image.Rectangle, src *image.YCbCr, sp image.Point) (ok bool) {
-	// This function exists in the image/internal/imageutil package because it
-	// is needed by both the image/draw and image/jpeg packages, but it doesn't
-	// seem right for one of those two to depend on the other.
-	//
-	// Another option is to have this code be exported in the image package,
-	// but we'd need to make sure we're totally happy with the API (for the
-	// rest of Go 1 compatibility), and decide if we want to have a more
-	// general purpose DrawToRGBA method for other image types. One possibility
-	// is:
-	//
-	// func (src *YCbCr) CopyToRGBA(dst *RGBA, dr, sr Rectangle) (effectiveDr, effectiveSr Rectangle)
-	//
-	// in the spirit of the built-in copy function for 1-dimensional slices,
-	// that also allowed a CopyFromRGBA method if needed.
-
-	x0 := (r.Min.X - dst.Rect.Min.X) * 4
-	x1 := (r.Max.X - dst.Rect.Min.X) * 4
-	y0 := r.Min.Y - dst.Rect.Min.Y
-	y1 := r.Max.Y - dst.Rect.Min.Y
-	switch src.SubsampleRatio {
-`
-
-const post = `
-	default:
-		return false
-	}
-	return true
-}
-`
-
-const sratioCase = `
-	case image.YCbCrSubsampleRatio%s:
-		for y, sy := y0, sp.Y; y != y1; y, sy = y+1, sy+1 {
-			dpix := dst.Pix[y*dst.Stride:]
-			yi := (sy-src.Rect.Min.Y)*src.YStride + (sp.X - src.Rect.Min.X)
-			%s
-
-				// This is an inline version of image/color/ycbcr.go's func YCbCrToRGB.
-				yy1 := int32(src.Y[yi]) * 0x10100 // Convert 0x12 to 0x121200.
-				cb1 := int32(src.Cb[ci]) - 128
-				cr1 := int32(src.Cr[ci]) - 128
-				r := (yy1 + 91881*cr1) >> 16
-				g := (yy1 - 22554*cb1 - 46802*cr1) >> 16
-				b := (yy1 + 116130*cb1) >> 16
-				if r < 0 {
-					r = 0
-				} else if r > 255 {
-					r = 255
-				}
-				if g < 0 {
-					g = 0
-				} else if g > 255 {
-					g = 255
-				}
-				if b < 0 {
-					b = 0
-				} else if b > 255 {
-					b = 255
-				}
-
-				dpix[x+0] = uint8(r)
-				dpix[x+1] = uint8(g)
-				dpix[x+2] = uint8(b)
-				dpix[x+3] = 255
-			}
-		}
-`
-
-var subsampleRatios = []string{
-	"444",
-	"422",
-	"420",
-	"440",
-}
-
-var sratioLines = map[string]string{
-	"444": `
-		ci := (sy-src.Rect.Min.Y)*src.CStride + (sp.X - src.Rect.Min.X)
-		for x := x0; x != x1; x, yi, ci = x+4, yi+1, ci+1 {
-	`,
-	"422": `
-		ciBase := (sy-src.Rect.Min.Y)*src.CStride - src.Rect.Min.X/2
-		for x, sx := x0, sp.X; x != x1; x, sx, yi = x+4, sx+1, yi+1 {
-			ci := ciBase + sx/2
-	`,
-	"420": `
-		ciBase := (sy/2-src.Rect.Min.Y/2)*src.CStride - src.Rect.Min.X/2
-		for x, sx := x0, sp.X; x != x1; x, sx, yi = x+4, sx+1, yi+1 {
-			ci := ciBase + sx/2
-	`,
-	"440": `
-		ci := (sy/2-src.Rect.Min.Y/2)*src.CStride + (sp.X - src.Rect.Min.X)
-		for x := x0; x != x1; x, yi, ci = x+4, yi+1, ci+1 {
-	`,
-}
diff --git a/src/image/internal/imageutil/imageutil.go b/src/image/internal/imageutil/imageutil.go
deleted file mode 100644
index 10cef0c..0000000
--- a/src/image/internal/imageutil/imageutil.go
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:generate go run gen.go
-
-// Package imageutil contains code shared by image-related packages.
-package imageutil
diff --git a/src/image/internal/imageutil/impl.go b/src/image/internal/imageutil/impl.go
deleted file mode 100644
index fd7826d..0000000
--- a/src/image/internal/imageutil/impl.go
+++ /dev/null
@@ -1,196 +0,0 @@
-// generated by "go run gen.go". DO NOT EDIT.
-
-package imageutil
-
-import (
-	"image"
-)
-
-// DrawYCbCr draws the YCbCr source image on the RGBA destination image with
-// r.Min in dst aligned with sp in src. It reports whether the draw was
-// successful. If it returns false, no dst pixels were changed.
-//
-// This function assumes that r is entirely within dst's bounds and the
-// translation of r from dst coordinate space to src coordinate space is
-// entirely within src's bounds.
-func DrawYCbCr(dst *image.RGBA, r image.Rectangle, src *image.YCbCr, sp image.Point) (ok bool) {
-	// This function exists in the image/internal/imageutil package because it
-	// is needed by both the image/draw and image/jpeg packages, but it doesn't
-	// seem right for one of those two to depend on the other.
-	//
-	// Another option is to have this code be exported in the image package,
-	// but we'd need to make sure we're totally happy with the API (for the
-	// rest of Go 1 compatibility), and decide if we want to have a more
-	// general purpose DrawToRGBA method for other image types. One possibility
-	// is:
-	//
-	// func (src *YCbCr) CopyToRGBA(dst *RGBA, dr, sr Rectangle) (effectiveDr, effectiveSr Rectangle)
-	//
-	// in the spirit of the built-in copy function for 1-dimensional slices,
-	// that also allowed a CopyFromRGBA method if needed.
-
-	x0 := (r.Min.X - dst.Rect.Min.X) * 4
-	x1 := (r.Max.X - dst.Rect.Min.X) * 4
-	y0 := r.Min.Y - dst.Rect.Min.Y
-	y1 := r.Max.Y - dst.Rect.Min.Y
-	switch src.SubsampleRatio {
-
-	case image.YCbCrSubsampleRatio444:
-		for y, sy := y0, sp.Y; y != y1; y, sy = y+1, sy+1 {
-			dpix := dst.Pix[y*dst.Stride:]
-			yi := (sy-src.Rect.Min.Y)*src.YStride + (sp.X - src.Rect.Min.X)
-
-			ci := (sy-src.Rect.Min.Y)*src.CStride + (sp.X - src.Rect.Min.X)
-			for x := x0; x != x1; x, yi, ci = x+4, yi+1, ci+1 {
-
-				// This is an inline version of image/color/ycbcr.go's func YCbCrToRGB.
-				yy1 := int32(src.Y[yi]) * 0x10100 // Convert 0x12 to 0x121200.
-				cb1 := int32(src.Cb[ci]) - 128
-				cr1 := int32(src.Cr[ci]) - 128
-				r := (yy1 + 91881*cr1) >> 16
-				g := (yy1 - 22554*cb1 - 46802*cr1) >> 16
-				b := (yy1 + 116130*cb1) >> 16
-				if r < 0 {
-					r = 0
-				} else if r > 255 {
-					r = 255
-				}
-				if g < 0 {
-					g = 0
-				} else if g > 255 {
-					g = 255
-				}
-				if b < 0 {
-					b = 0
-				} else if b > 255 {
-					b = 255
-				}
-
-				dpix[x+0] = uint8(r)
-				dpix[x+1] = uint8(g)
-				dpix[x+2] = uint8(b)
-				dpix[x+3] = 255
-			}
-		}
-
-	case image.YCbCrSubsampleRatio422:
-		for y, sy := y0, sp.Y; y != y1; y, sy = y+1, sy+1 {
-			dpix := dst.Pix[y*dst.Stride:]
-			yi := (sy-src.Rect.Min.Y)*src.YStride + (sp.X - src.Rect.Min.X)
-
-			ciBase := (sy-src.Rect.Min.Y)*src.CStride - src.Rect.Min.X/2
-			for x, sx := x0, sp.X; x != x1; x, sx, yi = x+4, sx+1, yi+1 {
-				ci := ciBase + sx/2
-
-				// This is an inline version of image/color/ycbcr.go's func YCbCrToRGB.
-				yy1 := int32(src.Y[yi]) * 0x10100 // Convert 0x12 to 0x121200.
-				cb1 := int32(src.Cb[ci]) - 128
-				cr1 := int32(src.Cr[ci]) - 128
-				r := (yy1 + 91881*cr1) >> 16
-				g := (yy1 - 22554*cb1 - 46802*cr1) >> 16
-				b := (yy1 + 116130*cb1) >> 16
-				if r < 0 {
-					r = 0
-				} else if r > 255 {
-					r = 255
-				}
-				if g < 0 {
-					g = 0
-				} else if g > 255 {
-					g = 255
-				}
-				if b < 0 {
-					b = 0
-				} else if b > 255 {
-					b = 255
-				}
-
-				dpix[x+0] = uint8(r)
-				dpix[x+1] = uint8(g)
-				dpix[x+2] = uint8(b)
-				dpix[x+3] = 255
-			}
-		}
-
-	case image.YCbCrSubsampleRatio420:
-		for y, sy := y0, sp.Y; y != y1; y, sy = y+1, sy+1 {
-			dpix := dst.Pix[y*dst.Stride:]
-			yi := (sy-src.Rect.Min.Y)*src.YStride + (sp.X - src.Rect.Min.X)
-
-			ciBase := (sy/2-src.Rect.Min.Y/2)*src.CStride - src.Rect.Min.X/2
-			for x, sx := x0, sp.X; x != x1; x, sx, yi = x+4, sx+1, yi+1 {
-				ci := ciBase + sx/2
-
-				// This is an inline version of image/color/ycbcr.go's func YCbCrToRGB.
-				yy1 := int32(src.Y[yi]) * 0x10100 // Convert 0x12 to 0x121200.
-				cb1 := int32(src.Cb[ci]) - 128
-				cr1 := int32(src.Cr[ci]) - 128
-				r := (yy1 + 91881*cr1) >> 16
-				g := (yy1 - 22554*cb1 - 46802*cr1) >> 16
-				b := (yy1 + 116130*cb1) >> 16
-				if r < 0 {
-					r = 0
-				} else if r > 255 {
-					r = 255
-				}
-				if g < 0 {
-					g = 0
-				} else if g > 255 {
-					g = 255
-				}
-				if b < 0 {
-					b = 0
-				} else if b > 255 {
-					b = 255
-				}
-
-				dpix[x+0] = uint8(r)
-				dpix[x+1] = uint8(g)
-				dpix[x+2] = uint8(b)
-				dpix[x+3] = 255
-			}
-		}
-
-	case image.YCbCrSubsampleRatio440:
-		for y, sy := y0, sp.Y; y != y1; y, sy = y+1, sy+1 {
-			dpix := dst.Pix[y*dst.Stride:]
-			yi := (sy-src.Rect.Min.Y)*src.YStride + (sp.X - src.Rect.Min.X)
-
-			ci := (sy/2-src.Rect.Min.Y/2)*src.CStride + (sp.X - src.Rect.Min.X)
-			for x := x0; x != x1; x, yi, ci = x+4, yi+1, ci+1 {
-
-				// This is an inline version of image/color/ycbcr.go's func YCbCrToRGB.
-				yy1 := int32(src.Y[yi]) * 0x10100 // Convert 0x12 to 0x121200.
-				cb1 := int32(src.Cb[ci]) - 128
-				cr1 := int32(src.Cr[ci]) - 128
-				r := (yy1 + 91881*cr1) >> 16
-				g := (yy1 - 22554*cb1 - 46802*cr1) >> 16
-				b := (yy1 + 116130*cb1) >> 16
-				if r < 0 {
-					r = 0
-				} else if r > 255 {
-					r = 255
-				}
-				if g < 0 {
-					g = 0
-				} else if g > 255 {
-					g = 255
-				}
-				if b < 0 {
-					b = 0
-				} else if b > 255 {
-					b = 255
-				}
-
-				dpix[x+0] = uint8(r)
-				dpix[x+1] = uint8(g)
-				dpix[x+2] = uint8(b)
-				dpix[x+3] = 255
-			}
-		}
-
-	default:
-		return false
-	}
-	return true
-}
diff --git a/src/image/png/testdata/gray-gradient.interlaced.png b/src/image/png/testdata/gray-gradient.interlaced.png
deleted file mode 100644
index 01f657a..0000000
Binary files a/src/image/png/testdata/gray-gradient.interlaced.png and /dev/null differ
diff --git a/src/image/png/testdata/gray-gradient.png b/src/image/png/testdata/gray-gradient.png
deleted file mode 100644
index 6de1cd3..0000000
Binary files a/src/image/png/testdata/gray-gradient.png and /dev/null differ
diff --git a/src/image/testdata/video-001.221212.jpeg b/src/image/testdata/video-001.221212.jpeg
deleted file mode 100644
index f069c76..0000000
Binary files a/src/image/testdata/video-001.221212.jpeg and /dev/null differ
diff --git a/src/image/testdata/video-001.221212.png b/src/image/testdata/video-001.221212.png
deleted file mode 100644
index d619a62..0000000
Binary files a/src/image/testdata/video-001.221212.png and /dev/null differ
diff --git a/src/image/testdata/video-001.cmyk.jpeg b/src/image/testdata/video-001.cmyk.jpeg
deleted file mode 100644
index 507df84..0000000
Binary files a/src/image/testdata/video-001.cmyk.jpeg and /dev/null differ
diff --git a/src/image/testdata/video-001.cmyk.png b/src/image/testdata/video-001.cmyk.png
deleted file mode 100644
index ef7b2b8..0000000
Binary files a/src/image/testdata/video-001.cmyk.png and /dev/null differ
diff --git a/src/image/testdata/video-001.q50.410.jpeg b/src/image/testdata/video-001.q50.410.jpeg
deleted file mode 100644
index 4cebd1e..0000000
Binary files a/src/image/testdata/video-001.q50.410.jpeg and /dev/null differ
diff --git a/src/image/testdata/video-001.q50.410.progressive.jpeg b/src/image/testdata/video-001.q50.410.progressive.jpeg
deleted file mode 100644
index fb71402..0000000
Binary files a/src/image/testdata/video-001.q50.410.progressive.jpeg and /dev/null differ
diff --git a/src/image/testdata/video-001.q50.411.jpeg b/src/image/testdata/video-001.q50.411.jpeg
deleted file mode 100644
index b90de18..0000000
Binary files a/src/image/testdata/video-001.q50.411.jpeg and /dev/null differ
diff --git a/src/image/testdata/video-001.q50.411.progressive.jpeg b/src/image/testdata/video-001.q50.411.progressive.jpeg
deleted file mode 100644
index 1ddb22b..0000000
Binary files a/src/image/testdata/video-001.q50.411.progressive.jpeg and /dev/null differ
diff --git a/src/image/testdata/video-001.rgb.jpeg b/src/image/testdata/video-001.rgb.jpeg
deleted file mode 100644
index fc2ce3c..0000000
Binary files a/src/image/testdata/video-001.rgb.jpeg and /dev/null differ
diff --git a/src/image/testdata/video-001.rgb.png b/src/image/testdata/video-001.rgb.png
deleted file mode 100644
index edb716d..0000000
Binary files a/src/image/testdata/video-001.rgb.png and /dev/null differ
diff --git a/src/internal/format/format.go b/src/internal/format/format.go
deleted file mode 100644
index a8270ba..0000000
--- a/src/internal/format/format.go
+++ /dev/null
@@ -1,163 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package format
-
-import (
-	"bytes"
-	"go/ast"
-	"go/parser"
-	"go/printer"
-	"go/token"
-	"strings"
-)
-
-const parserMode = parser.ParseComments
-
-// Parse parses src, which was read from the named file,
-// as a Go source file, declaration, or statement list.
-func Parse(fset *token.FileSet, filename string, src []byte, fragmentOk bool) (
-	file *ast.File,
-	sourceAdj func(src []byte, indent int) []byte,
-	indentAdj int,
-	err error,
-) {
-	// Try as whole source file.
-	file, err = parser.ParseFile(fset, filename, src, parserMode)
-	// If there's no error, return.  If the error is that the source file didn't begin with a
-	// package line and source fragments are ok, fall through to
-	// try as a source fragment.  Stop and return on any other error.
-	if err == nil || !fragmentOk || !strings.Contains(err.Error(), "expected 'package'") {
-		return
-	}
-
-	// If this is a declaration list, make it a source file
-	// by inserting a package clause.
-	// Insert using a ;, not a newline, so that the line numbers
-	// in psrc match the ones in src.
-	psrc := append([]byte("package p;"), src...)
-	file, err = parser.ParseFile(fset, filename, psrc, parserMode)
-	if err == nil {
-		sourceAdj = func(src []byte, indent int) []byte {
-			// Remove the package clause.
-			// Gofmt has turned the ; into a \n.
-			src = src[indent+len("package p\n"):]
-			return bytes.TrimSpace(src)
-		}
-		return
-	}
-	// If the error is that the source file didn't begin with a
-	// declaration, fall through to try as a statement list.
-	// Stop and return on any other error.
-	if !strings.Contains(err.Error(), "expected declaration") {
-		return
-	}
-
-	// If this is a statement list, make it a source file
-	// by inserting a package clause and turning the list
-	// into a function body.  This handles expressions too.
-	// Insert using a ;, not a newline, so that the line numbers
-	// in fsrc match the ones in src. Add an extra '\n' before the '}'
-	// to make sure comments are flushed before the '}'.
-	fsrc := append(append([]byte("package p; func _() {"), src...), '\n', '\n', '}')
-	file, err = parser.ParseFile(fset, filename, fsrc, parserMode)
-	if err == nil {
-		sourceAdj = func(src []byte, indent int) []byte {
-			// Cap adjusted indent to zero.
-			if indent < 0 {
-				indent = 0
-			}
-			// Remove the wrapping.
-			// Gofmt has turned the ; into a \n\n.
-			// There will be two non-blank lines with indent, hence 2*indent.
-			src = src[2*indent+len("package p\n\nfunc _() {"):]
-			// Remove only the "}\n" suffix: remaining whitespaces will be trimmed anyway
-			src = src[:len(src)-len("}\n")]
-			return bytes.TrimSpace(src)
-		}
-		// Gofmt has also indented the function body one level.
-		// Adjust that with indentAdj.
-		indentAdj = -1
-	}
-
-	// Succeeded, or out of options.
-	return
-}
-
-// Format formats the given package file originally obtained from src
-// and adjusts the result based on the original source via sourceAdj
-// and indentAdj.
-func Format(
-	fset *token.FileSet,
-	file *ast.File,
-	sourceAdj func(src []byte, indent int) []byte,
-	indentAdj int,
-	src []byte,
-	cfg printer.Config,
-) ([]byte, error) {
-	if sourceAdj == nil {
-		// Complete source file.
-		var buf bytes.Buffer
-		err := cfg.Fprint(&buf, fset, file)
-		if err != nil {
-			return nil, err
-		}
-		return buf.Bytes(), nil
-	}
-
-	// Partial source file.
-	// Determine and prepend leading space.
-	i, j := 0, 0
-	for j < len(src) && IsSpace(src[j]) {
-		if src[j] == '\n' {
-			i = j + 1 // byte offset of last line in leading space
-		}
-		j++
-	}
-	var res []byte
-	res = append(res, src[:i]...)
-
-	// Determine and prepend indentation of first code line.
-	// Spaces are ignored unless there are no tabs,
-	// in which case spaces count as one tab.
-	indent := 0
-	hasSpace := false
-	for _, b := range src[i:j] {
-		switch b {
-		case ' ':
-			hasSpace = true
-		case '\t':
-			indent++
-		}
-	}
-	if indent == 0 && hasSpace {
-		indent = 1
-	}
-	for i := 0; i < indent; i++ {
-		res = append(res, '\t')
-	}
-
-	// Format the source.
-	// Write it without any leading and trailing space.
-	cfg.Indent = indent + indentAdj
-	var buf bytes.Buffer
-	err := cfg.Fprint(&buf, fset, file)
-	if err != nil {
-		return nil, err
-	}
-	res = append(res, sourceAdj(buf.Bytes(), cfg.Indent)...)
-
-	// Determine and append trailing space.
-	i = len(src)
-	for i > 0 && IsSpace(src[i-1]) {
-		i--
-	}
-	return append(res, src[i:]...), nil
-}
-
-// IsSpace reports whether the byte is a space character.
-// IsSpace defines a space as being among the following bytes: ' ', '\t', '\n' and '\r'.
-func IsSpace(b byte) bool {
-	return b == ' ' || b == '\t' || b == '\n' || b == '\r'
-}
diff --git a/src/internal/singleflight/singleflight.go b/src/internal/singleflight/singleflight.go
deleted file mode 100644
index f4cb2d6..0000000
--- a/src/internal/singleflight/singleflight.go
+++ /dev/null
@@ -1,111 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package singleflight provides a duplicate function call suppression
-// mechanism.
-package singleflight
-
-import "sync"
-
-// call is an in-flight or completed singleflight.Do call
-type call struct {
-	wg sync.WaitGroup
-
-	// These fields are written once before the WaitGroup is done
-	// and are only read after the WaitGroup is done.
-	val interface{}
-	err error
-
-	// These fields are read and written with the singleflight
-	// mutex held before the WaitGroup is done, and are read but
-	// not written after the WaitGroup is done.
-	dups  int
-	chans []chan<- Result
-}
-
-// Group represents a class of work and forms a namespace in
-// which units of work can be executed with duplicate suppression.
-type Group struct {
-	mu sync.Mutex       // protects m
-	m  map[string]*call // lazily initialized
-}
-
-// Result holds the results of Do, so they can be passed
-// on a channel.
-type Result struct {
-	Val    interface{}
-	Err    error
-	Shared bool
-}
-
-// Do executes and returns the results of the given function, making
-// sure that only one execution is in-flight for a given key at a
-// time. If a duplicate comes in, the duplicate caller waits for the
-// original to complete and receives the same results.
-// The return value shared indicates whether v was given to multiple callers.
-func (g *Group) Do(key string, fn func() (interface{}, error)) (v interface{}, err error, shared bool) {
-	g.mu.Lock()
-	if g.m == nil {
-		g.m = make(map[string]*call)
-	}
-	if c, ok := g.m[key]; ok {
-		c.dups++
-		g.mu.Unlock()
-		c.wg.Wait()
-		return c.val, c.err, true
-	}
-	c := new(call)
-	c.wg.Add(1)
-	g.m[key] = c
-	g.mu.Unlock()
-
-	g.doCall(c, key, fn)
-	return c.val, c.err, c.dups > 0
-}
-
-// DoChan is like Do but returns a channel that will receive the
-// results when they are ready.
-func (g *Group) DoChan(key string, fn func() (interface{}, error)) <-chan Result {
-	ch := make(chan Result, 1)
-	g.mu.Lock()
-	if g.m == nil {
-		g.m = make(map[string]*call)
-	}
-	if c, ok := g.m[key]; ok {
-		c.dups++
-		c.chans = append(c.chans, ch)
-		g.mu.Unlock()
-		return ch
-	}
-	c := &call{chans: []chan<- Result{ch}}
-	c.wg.Add(1)
-	g.m[key] = c
-	g.mu.Unlock()
-
-	go g.doCall(c, key, fn)
-
-	return ch
-}
-
-// doCall handles the single call for a key.
-func (g *Group) doCall(c *call, key string, fn func() (interface{}, error)) {
-	c.val, c.err = fn()
-	c.wg.Done()
-
-	g.mu.Lock()
-	delete(g.m, key)
-	for _, ch := range c.chans {
-		ch <- Result{c.val, c.err, c.dups > 0}
-	}
-	g.mu.Unlock()
-}
-
-// Forget tells the singleflight to forget about a key.  Future calls
-// to Do for this key will call the function rather than waiting for
-// an earlier call to complete.
-func (g *Group) Forget(key string) {
-	g.mu.Lock()
-	delete(g.m, key)
-	g.mu.Unlock()
-}
diff --git a/src/internal/singleflight/singleflight_test.go b/src/internal/singleflight/singleflight_test.go
deleted file mode 100644
index c0ec024..0000000
--- a/src/internal/singleflight/singleflight_test.go
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package singleflight
-
-import (
-	"errors"
-	"fmt"
-	"sync"
-	"sync/atomic"
-	"testing"
-	"time"
-)
-
-func TestDo(t *testing.T) {
-	var g Group
-	v, err, _ := g.Do("key", func() (interface{}, error) {
-		return "bar", nil
-	})
-	if got, want := fmt.Sprintf("%v (%T)", v, v), "bar (string)"; got != want {
-		t.Errorf("Do = %v; want %v", got, want)
-	}
-	if err != nil {
-		t.Errorf("Do error = %v", err)
-	}
-}
-
-func TestDoErr(t *testing.T) {
-	var g Group
-	someErr := errors.New("Some error")
-	v, err, _ := g.Do("key", func() (interface{}, error) {
-		return nil, someErr
-	})
-	if err != someErr {
-		t.Errorf("Do error = %v; want someErr %v", err, someErr)
-	}
-	if v != nil {
-		t.Errorf("unexpected non-nil value %#v", v)
-	}
-}
-
-func TestDoDupSuppress(t *testing.T) {
-	var g Group
-	var wg1, wg2 sync.WaitGroup
-	c := make(chan string, 1)
-	var calls int32
-	fn := func() (interface{}, error) {
-		if atomic.AddInt32(&calls, 1) == 1 {
-			// First invocation.
-			wg1.Done()
-		}
-		v := <-c
-		c <- v // pump; make available for any future calls
-
-		time.Sleep(10 * time.Millisecond) // let more goroutines enter Do
-
-		return v, nil
-	}
-
-	const n = 10
-	wg1.Add(1)
-	for i := 0; i < n; i++ {
-		wg1.Add(1)
-		wg2.Add(1)
-		go func() {
-			defer wg2.Done()
-			wg1.Done()
-			v, err, _ := g.Do("key", fn)
-			if err != nil {
-				t.Errorf("Do error: %v", err)
-				return
-			}
-			if s, _ := v.(string); s != "bar" {
-				t.Errorf("Do = %T %v; want %q", v, v, "bar")
-			}
-		}()
-	}
-	wg1.Wait()
-	// At least one goroutine is in fn now and all of them have at
-	// least reached the line before the Do.
-	c <- "bar"
-	wg2.Wait()
-	if got := atomic.LoadInt32(&calls); got <= 0 || got >= n {
-		t.Errorf("number of calls = %d; want over 0 and less than %d", got, n)
-	}
-}
diff --git a/src/internal/syscall/unix/getrandom_linux.go b/src/internal/syscall/unix/getrandom_linux.go
deleted file mode 100644
index 7388271..0000000
--- a/src/internal/syscall/unix/getrandom_linux.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package unix
-
-import (
-	"runtime"
-	"sync/atomic"
-	"syscall"
-	"unsafe"
-)
-
-var randomTrap = map[string]uintptr{
-	"386":     355,
-	"amd64":   318,
-	"arm":     384,
-	"ppc64":   359,
-	"ppc64le": 359,
-}[runtime.GOARCH]
-
-var randomUnsupported int32 // atomic
-
-// GetRandomFlag is a flag supported by the getrandom system call.
-type GetRandomFlag uintptr
-
-const (
-	// GRND_NONBLOCK means return EAGAIN rather than blocking.
-	GRND_NONBLOCK GetRandomFlag = 0x0001
-
-	// GRND_RANDOM means use the /dev/random pool instead of /dev/urandom.
-	GRND_RANDOM GetRandomFlag = 0x0002
-)
-
-// GetRandom calls the Linux getrandom system call.
-// See https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c6e9d6f38894798696f23c8084ca7edbf16ee895
-func GetRandom(p []byte, flags GetRandomFlag) (n int, err error) {
-	if randomTrap == 0 {
-		return 0, syscall.ENOSYS
-	}
-	if len(p) == 0 {
-		return 0, nil
-	}
-	if atomic.LoadInt32(&randomUnsupported) != 0 {
-		return 0, syscall.ENOSYS
-	}
-	r1, _, errno := syscall.Syscall(randomTrap,
-		uintptr(unsafe.Pointer(&p[0])),
-		uintptr(len(p)),
-		uintptr(flags))
-	if errno != 0 {
-		if errno == syscall.ENOSYS {
-			atomic.StoreInt32(&randomUnsupported, 1)
-		}
-		return 0, errno
-	}
-	return int(r1), nil
-}
diff --git a/src/internal/syscall/windows/registry/export_test.go b/src/internal/syscall/windows/registry/export_test.go
deleted file mode 100644
index 8badf6f..0000000
--- a/src/internal/syscall/windows/registry/export_test.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build windows
-
-package registry
-
-func (k Key) SetValue(name string, valtype uint32, data []byte) error {
-	return k.setValue(name, valtype, data)
-}
diff --git a/src/internal/syscall/windows/registry/key.go b/src/internal/syscall/windows/registry/key.go
deleted file mode 100644
index 62144d3..0000000
--- a/src/internal/syscall/windows/registry/key.go
+++ /dev/null
@@ -1,175 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build windows
-
-// Package registry provides access to the Windows registry.
-//
-// Here is a simple example, opening a registry key and reading a string value from it.
-//
-//	k, err := registry.OpenKey(registry.LOCAL_MACHINE, `SOFTWARE\Microsoft\Windows NT\CurrentVersion`, registry.QUERY_VALUE)
-//	if err != nil {
-//		log.Fatal(err)
-//	}
-//	defer k.Close()
-//
-//	s, _, err := k.GetStringValue("SystemRoot")
-//	if err != nil {
-//		log.Fatal(err)
-//	}
-//	fmt.Printf("Windows system root is %q\n", s)
-//
-// NOTE: This package is a copy of golang.org/x/sys/windows/registry
-// with KeyInfo.ModTime removed to prevent dependency cycles.
-//
-package registry
-
-import (
-	"io"
-	"syscall"
-)
-
-const (
-	// Registry key security and access rights.
-	// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms724878.aspx
-	// for details.
-	ALL_ACCESS         = 0xf003f
-	CREATE_LINK        = 0x00020
-	CREATE_SUB_KEY     = 0x00004
-	ENUMERATE_SUB_KEYS = 0x00008
-	EXECUTE            = 0x20019
-	NOTIFY             = 0x00010
-	QUERY_VALUE        = 0x00001
-	READ               = 0x20019
-	SET_VALUE          = 0x00002
-	WOW64_32KEY        = 0x00200
-	WOW64_64KEY        = 0x00100
-	WRITE              = 0x20006
-)
-
-// Key is a handle to an open Windows registry key.
-// Keys can be obtained by calling OpenKey; there are
-// also some predefined root keys such as CURRENT_USER.
-// Keys can be used directly in the Windows API.
-type Key syscall.Handle
-
-const (
-	// Windows defines some predefined root keys that are always open.
-	// An application can use these keys as entry points to the registry.
-	// Normally these keys are used in OpenKey to open new keys,
-	// but they can also be used anywhere a Key is required.
-	CLASSES_ROOT   = Key(syscall.HKEY_CLASSES_ROOT)
-	CURRENT_USER   = Key(syscall.HKEY_CURRENT_USER)
-	LOCAL_MACHINE  = Key(syscall.HKEY_LOCAL_MACHINE)
-	USERS          = Key(syscall.HKEY_USERS)
-	CURRENT_CONFIG = Key(syscall.HKEY_CURRENT_CONFIG)
-)
-
-// Close closes open key k.
-func (k Key) Close() error {
-	return syscall.RegCloseKey(syscall.Handle(k))
-}
-
-// OpenKey opens a new key with path name relative to key k.
-// It accepts any open key, including CURRENT_USER and others,
-// and returns the new key and an error.
-// The access parameter specifies desired access rights to the
-// key to be opened.
-func OpenKey(k Key, path string, access uint32) (Key, error) {
-	p, err := syscall.UTF16PtrFromString(path)
-	if err != nil {
-		return 0, err
-	}
-	var subkey syscall.Handle
-	err = syscall.RegOpenKeyEx(syscall.Handle(k), p, 0, access, &subkey)
-	if err != nil {
-		return 0, err
-	}
-	return Key(subkey), nil
-}
-
-// ReadSubKeyNames returns the names of subkeys of key k.
-// The parameter n controls the number of returned names,
-// analogous to the way os.File.Readdirnames works.
-func (k Key) ReadSubKeyNames(n int) ([]string, error) {
-	ki, err := k.Stat()
-	if err != nil {
-		return nil, err
-	}
-	names := make([]string, 0, ki.SubKeyCount)
-	buf := make([]uint16, ki.MaxSubKeyLen+1) // extra room for terminating zero byte
-loopItems:
-	for i := uint32(0); ; i++ {
-		if n > 0 {
-			if len(names) == n {
-				return names, nil
-			}
-		}
-		l := uint32(len(buf))
-		for {
-			err := syscall.RegEnumKeyEx(syscall.Handle(k), i, &buf[0], &l, nil, nil, nil, nil)
-			if err == nil {
-				break
-			}
-			if err == syscall.ERROR_MORE_DATA {
-				// Double buffer size and try again.
-				l = uint32(2 * len(buf))
-				buf = make([]uint16, l)
-				continue
-			}
-			if err == _ERROR_NO_MORE_ITEMS {
-				break loopItems
-			}
-			return names, err
-		}
-		names = append(names, syscall.UTF16ToString(buf[:l]))
-	}
-	if n > len(names) {
-		return names, io.EOF
-	}
-	return names, nil
-}
-
-// CreateKey creates a key named path under open key k.
-// CreateKey returns the new key and a boolean flag that reports
-// whether the key already existed.
-// The access parameter specifies the access rights for the key
-// to be created.
-func CreateKey(k Key, path string, access uint32) (newk Key, openedExisting bool, err error) {
-	var h syscall.Handle
-	var d uint32
-	err = regCreateKeyEx(syscall.Handle(k), syscall.StringToUTF16Ptr(path),
-		0, nil, _REG_OPTION_NON_VOLATILE, access, nil, &h, &d)
-	if err != nil {
-		return 0, false, err
-	}
-	return Key(h), d == _REG_OPENED_EXISTING_KEY, nil
-}
-
-// DeleteKey deletes the subkey path of key k and its values.
-func DeleteKey(k Key, path string) error {
-	return regDeleteKey(syscall.Handle(k), syscall.StringToUTF16Ptr(path))
-}
-
-// A KeyInfo describes the statistics of a key. It is returned by Stat.
-type KeyInfo struct {
-	SubKeyCount     uint32
-	MaxSubKeyLen    uint32 // size of the key's subkey with the longest name, in Unicode characters, not including the terminating zero byte
-	ValueCount      uint32
-	MaxValueNameLen uint32 // size of the key's longest value name, in Unicode characters, not including the terminating zero byte
-	MaxValueLen     uint32 // longest data component among the key's values, in bytes
-	lastWriteTime   syscall.Filetime
-}
-
-// Stat retrieves information about the open key k.
-func (k Key) Stat() (*KeyInfo, error) {
-	var ki KeyInfo
-	err := syscall.RegQueryInfoKey(syscall.Handle(k), nil, nil, nil,
-		&ki.SubKeyCount, &ki.MaxSubKeyLen, nil, &ki.ValueCount,
-		&ki.MaxValueNameLen, &ki.MaxValueLen, nil, &ki.lastWriteTime)
-	if err != nil {
-		return nil, err
-	}
-	return &ki, nil
-}
diff --git a/src/internal/syscall/windows/registry/registry_test.go b/src/internal/syscall/windows/registry/registry_test.go
deleted file mode 100644
index 07eccb2..0000000
--- a/src/internal/syscall/windows/registry/registry_test.go
+++ /dev/null
@@ -1,678 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build windows
-
-package registry_test
-
-import (
-	"bytes"
-	"crypto/rand"
-	"os"
-	"syscall"
-	"testing"
-
-	"internal/syscall/windows/registry"
-)
-
-func randKeyName(prefix string) string {
-	const numbers = "0123456789"
-	buf := make([]byte, 10)
-	rand.Read(buf)
-	for i, b := range buf {
-		buf[i] = numbers[b%byte(len(numbers))]
-	}
-	return prefix + string(buf)
-}
-
-func TestReadSubKeyNames(t *testing.T) {
-	k, err := registry.OpenKey(registry.CLASSES_ROOT, "TypeLib", registry.ENUMERATE_SUB_KEYS|registry.QUERY_VALUE)
-	if err != nil {
-		t.Fatal(err)
-	}
-	defer k.Close()
-
-	names, err := k.ReadSubKeyNames(-1)
-	if err != nil {
-		t.Fatal(err)
-	}
-	var foundStdOle bool
-	for _, name := range names {
-		// Every PC has "stdole 2.0 OLE Automation" library installed.
-		if name == "{00020430-0000-0000-C000-000000000046}" {
-			foundStdOle = true
-		}
-	}
-	if !foundStdOle {
-		t.Fatal("could not find stdole 2.0 OLE Automation")
-	}
-}
-
-func TestCreateOpenDeleteKey(t *testing.T) {
-	k, err := registry.OpenKey(registry.CURRENT_USER, "Software", registry.QUERY_VALUE)
-	if err != nil {
-		t.Fatal(err)
-	}
-	defer k.Close()
-
-	testKName := randKeyName("TestCreateOpenDeleteKey_")
-
-	testK, exist, err := registry.CreateKey(k, testKName, registry.CREATE_SUB_KEY)
-	if err != nil {
-		t.Fatal(err)
-	}
-	defer testK.Close()
-
-	if exist {
-		t.Fatalf("key %q already exists", testKName)
-	}
-
-	testKAgain, exist, err := registry.CreateKey(k, testKName, registry.CREATE_SUB_KEY)
-	if err != nil {
-		t.Fatal(err)
-	}
-	defer testKAgain.Close()
-
-	if !exist {
-		t.Fatalf("key %q should already exist", testKName)
-	}
-
-	testKOpened, err := registry.OpenKey(k, testKName, registry.ENUMERATE_SUB_KEYS)
-	if err != nil {
-		t.Fatal(err)
-	}
-	defer testKOpened.Close()
-
-	err = registry.DeleteKey(k, testKName)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	testKOpenedAgain, err := registry.OpenKey(k, testKName, registry.ENUMERATE_SUB_KEYS)
-	if err == nil {
-		defer testKOpenedAgain.Close()
-		t.Fatalf("key %q should already been deleted", testKName)
-	}
-	if err != registry.ErrNotExist {
-		t.Fatalf(`unexpected error ("not exist" expected): %v`, err)
-	}
-}
-
-func equalStringSlice(a, b []string) bool {
-	if len(a) != len(b) {
-		return false
-	}
-	if a == nil {
-		return true
-	}
-	for i := range a {
-		if a[i] != b[i] {
-			return false
-		}
-	}
-	return true
-}
-
-type ValueTest struct {
-	Type     uint32
-	Name     string
-	Value    interface{}
-	WillFail bool
-}
-
-var ValueTests = []ValueTest{
-	{Type: registry.SZ, Name: "String1", Value: ""},
-	{Type: registry.SZ, Name: "String2", Value: "\000", WillFail: true},
-	{Type: registry.SZ, Name: "String3", Value: "Hello World"},
-	{Type: registry.SZ, Name: "String4", Value: "Hello World\000", WillFail: true},
-	{Type: registry.EXPAND_SZ, Name: "ExpString1", Value: ""},
-	{Type: registry.EXPAND_SZ, Name: "ExpString2", Value: "\000", WillFail: true},
-	{Type: registry.EXPAND_SZ, Name: "ExpString3", Value: "Hello World"},
-	{Type: registry.EXPAND_SZ, Name: "ExpString4", Value: "Hello\000World", WillFail: true},
-	{Type: registry.EXPAND_SZ, Name: "ExpString5", Value: "%PATH%"},
-	{Type: registry.EXPAND_SZ, Name: "ExpString6", Value: "%NO_SUCH_VARIABLE%"},
-	{Type: registry.EXPAND_SZ, Name: "ExpString7", Value: "%PATH%;."},
-	{Type: registry.BINARY, Name: "Binary1", Value: []byte{}},
-	{Type: registry.BINARY, Name: "Binary2", Value: []byte{1, 2, 3}},
-	{Type: registry.BINARY, Name: "Binary3", Value: []byte{3, 2, 1, 0, 1, 2, 3}},
-	{Type: registry.DWORD, Name: "Dword1", Value: uint64(0)},
-	{Type: registry.DWORD, Name: "Dword2", Value: uint64(1)},
-	{Type: registry.DWORD, Name: "Dword3", Value: uint64(0xff)},
-	{Type: registry.DWORD, Name: "Dword4", Value: uint64(0xffff)},
-	{Type: registry.QWORD, Name: "Qword1", Value: uint64(0)},
-	{Type: registry.QWORD, Name: "Qword2", Value: uint64(1)},
-	{Type: registry.QWORD, Name: "Qword3", Value: uint64(0xff)},
-	{Type: registry.QWORD, Name: "Qword4", Value: uint64(0xffff)},
-	{Type: registry.QWORD, Name: "Qword5", Value: uint64(0xffffff)},
-	{Type: registry.QWORD, Name: "Qword6", Value: uint64(0xffffffff)},
-	{Type: registry.MULTI_SZ, Name: "MultiString1", Value: []string{"a", "b", "c"}},
-	{Type: registry.MULTI_SZ, Name: "MultiString2", Value: []string{"abc", "", "cba"}},
-	{Type: registry.MULTI_SZ, Name: "MultiString3", Value: []string{""}},
-	{Type: registry.MULTI_SZ, Name: "MultiString4", Value: []string{"abcdef"}},
-	{Type: registry.MULTI_SZ, Name: "MultiString5", Value: []string{"\000"}, WillFail: true},
-	{Type: registry.MULTI_SZ, Name: "MultiString6", Value: []string{"a\000b"}, WillFail: true},
-	{Type: registry.MULTI_SZ, Name: "MultiString7", Value: []string{"ab", "\000", "cd"}, WillFail: true},
-	{Type: registry.MULTI_SZ, Name: "MultiString8", Value: []string{"\000", "cd"}, WillFail: true},
-	{Type: registry.MULTI_SZ, Name: "MultiString9", Value: []string{"ab", "\000"}, WillFail: true},
-}
-
-func setValues(t *testing.T, k registry.Key) {
-	for _, test := range ValueTests {
-		var err error
-		switch test.Type {
-		case registry.SZ:
-			err = k.SetStringValue(test.Name, test.Value.(string))
-		case registry.EXPAND_SZ:
-			err = k.SetExpandStringValue(test.Name, test.Value.(string))
-		case registry.MULTI_SZ:
-			err = k.SetStringsValue(test.Name, test.Value.([]string))
-		case registry.BINARY:
-			err = k.SetBinaryValue(test.Name, test.Value.([]byte))
-		case registry.DWORD:
-			err = k.SetDWordValue(test.Name, uint32(test.Value.(uint64)))
-		case registry.QWORD:
-			err = k.SetQWordValue(test.Name, test.Value.(uint64))
-		default:
-			t.Fatalf("unsupported type %d for %s value", test.Type, test.Name)
-		}
-		if test.WillFail {
-			if err == nil {
-				t.Fatalf("setting %s value %q should fail, but succeeded", test.Name, test.Value)
-			}
-		} else {
-			if err != nil {
-				t.Fatal(err)
-			}
-		}
-	}
-}
-
-func enumerateValues(t *testing.T, k registry.Key) {
-	names, err := k.ReadValueNames(-1)
-	if err != nil {
-		t.Error(err)
-		return
-	}
-	haveNames := make(map[string]bool)
-	for _, n := range names {
-		haveNames[n] = false
-	}
-	for _, test := range ValueTests {
-		wantFound := !test.WillFail
-		_, haveFound := haveNames[test.Name]
-		if wantFound && !haveFound {
-			t.Errorf("value %s is not found while enumerating", test.Name)
-		}
-		if haveFound && !wantFound {
-			t.Errorf("value %s is found while enumerating, but expected to fail", test.Name)
-		}
-		if haveFound {
-			delete(haveNames, test.Name)
-		}
-	}
-	for n, v := range haveNames {
-		t.Errorf("value %s (%v) is found while enumerating, but has not been cretaed", n, v)
-	}
-}
-
-func testErrNotExist(t *testing.T, name string, err error) {
-	if err == nil {
-		t.Errorf("%s value should not exist", name)
-		return
-	}
-	if err != registry.ErrNotExist {
-		t.Errorf("reading %s value should return 'not exist' error, but got: %s", name, err)
-		return
-	}
-}
-
-func testErrUnexpectedType(t *testing.T, test ValueTest, gottype uint32, err error) {
-	if err == nil {
-		t.Errorf("GetXValue(%q) should not succeed", test.Name)
-		return
-	}
-	if err != registry.ErrUnexpectedType {
-		t.Errorf("reading %s value should return 'unexpected key value type' error, but got: %s", test.Name, err)
-		return
-	}
-	if gottype != test.Type {
-		t.Errorf("want %s value type %v, got %v", test.Name, test.Type, gottype)
-		return
-	}
-}
-
-func testGetStringValue(t *testing.T, k registry.Key, test ValueTest) {
-	got, gottype, err := k.GetStringValue(test.Name)
-	if err != nil {
-		t.Errorf("GetStringValue(%s) failed: %v", test.Name, err)
-		return
-	}
-	if got != test.Value {
-		t.Errorf("want %s value %q, got %q", test.Name, test.Value, got)
-		return
-	}
-	if gottype != test.Type {
-		t.Errorf("want %s value type %v, got %v", test.Name, test.Type, gottype)
-		return
-	}
-	if gottype == registry.EXPAND_SZ {
-		_, err = registry.ExpandString(got)
-		if err != nil {
-			t.Errorf("ExpandString(%s) failed: %v", got, err)
-			return
-		}
-	}
-}
-
-func testGetIntegerValue(t *testing.T, k registry.Key, test ValueTest) {
-	got, gottype, err := k.GetIntegerValue(test.Name)
-	if err != nil {
-		t.Errorf("GetIntegerValue(%s) failed: %v", test.Name, err)
-		return
-	}
-	if got != test.Value.(uint64) {
-		t.Errorf("want %s value %v, got %v", test.Name, test.Value, got)
-		return
-	}
-	if gottype != test.Type {
-		t.Errorf("want %s value type %v, got %v", test.Name, test.Type, gottype)
-		return
-	}
-}
-
-func testGetBinaryValue(t *testing.T, k registry.Key, test ValueTest) {
-	got, gottype, err := k.GetBinaryValue(test.Name)
-	if err != nil {
-		t.Errorf("GetBinaryValue(%s) failed: %v", test.Name, err)
-		return
-	}
-	if !bytes.Equal(got, test.Value.([]byte)) {
-		t.Errorf("want %s value %v, got %v", test.Name, test.Value, got)
-		return
-	}
-	if gottype != test.Type {
-		t.Errorf("want %s value type %v, got %v", test.Name, test.Type, gottype)
-		return
-	}
-}
-
-func testGetStringsValue(t *testing.T, k registry.Key, test ValueTest) {
-	got, gottype, err := k.GetStringsValue(test.Name)
-	if err != nil {
-		t.Errorf("GetStringsValue(%s) failed: %v", test.Name, err)
-		return
-	}
-	if !equalStringSlice(got, test.Value.([]string)) {
-		t.Errorf("want %s value %#v, got %#v", test.Name, test.Value, got)
-		return
-	}
-	if gottype != test.Type {
-		t.Errorf("want %s value type %v, got %v", test.Name, test.Type, gottype)
-		return
-	}
-}
-
-func testGetValue(t *testing.T, k registry.Key, test ValueTest, size int) {
-	if size <= 0 {
-		return
-	}
-	// read data with no buffer
-	gotsize, gottype, err := k.GetValue(test.Name, nil)
-	if err != nil {
-		t.Errorf("GetValue(%s, [%d]byte) failed: %v", test.Name, size, err)
-		return
-	}
-	if gotsize != size {
-		t.Errorf("want %s value size of %d, got %v", test.Name, size, gotsize)
-		return
-	}
-	if gottype != test.Type {
-		t.Errorf("want %s value type %v, got %v", test.Name, test.Type, gottype)
-		return
-	}
-	// read data with short buffer
-	gotsize, gottype, err = k.GetValue(test.Name, make([]byte, size-1))
-	if err == nil {
-		t.Errorf("GetValue(%s, [%d]byte) should fail, but suceeded", test.Name, size-1)
-		return
-	}
-	if err != registry.ErrShortBuffer {
-		t.Errorf("reading %s value should return 'short buffer' error, but got: %s", test.Name, err)
-		return
-	}
-	if gotsize != size {
-		t.Errorf("want %s value size of %d, got %v", test.Name, size, gotsize)
-		return
-	}
-	if gottype != test.Type {
-		t.Errorf("want %s value type %v, got %v", test.Name, test.Type, gottype)
-		return
-	}
-	// read full data
-	gotsize, gottype, err = k.GetValue(test.Name, make([]byte, size))
-	if err != nil {
-		t.Errorf("GetValue(%s, [%d]byte) failed: %v", test.Name, size, err)
-		return
-	}
-	if gotsize != size {
-		t.Errorf("want %s value size of %d, got %v", test.Name, size, gotsize)
-		return
-	}
-	if gottype != test.Type {
-		t.Errorf("want %s value type %v, got %v", test.Name, test.Type, gottype)
-		return
-	}
-	// check GetValue returns ErrNotExist as required
-	_, _, err = k.GetValue(test.Name+"_not_there", make([]byte, size))
-	if err == nil {
-		t.Errorf("GetValue(%q) should not succeed", test.Name)
-		return
-	}
-	if err != registry.ErrNotExist {
-		t.Errorf("GetValue(%q) should return 'not exist' error, but got: %s", test.Name, err)
-		return
-	}
-}
-
-func testValues(t *testing.T, k registry.Key) {
-	for _, test := range ValueTests {
-		switch test.Type {
-		case registry.SZ, registry.EXPAND_SZ:
-			if test.WillFail {
-				_, _, err := k.GetStringValue(test.Name)
-				testErrNotExist(t, test.Name, err)
-			} else {
-				testGetStringValue(t, k, test)
-				_, gottype, err := k.GetIntegerValue(test.Name)
-				testErrUnexpectedType(t, test, gottype, err)
-				// Size of utf16 string in bytes is not perfect,
-				// but correct for current test values.
-				// Size also includes terminating 0.
-				testGetValue(t, k, test, (len(test.Value.(string))+1)*2)
-			}
-			_, _, err := k.GetStringValue(test.Name + "_string_not_created")
-			testErrNotExist(t, test.Name+"_string_not_created", err)
-		case registry.DWORD, registry.QWORD:
-			testGetIntegerValue(t, k, test)
-			_, gottype, err := k.GetBinaryValue(test.Name)
-			testErrUnexpectedType(t, test, gottype, err)
-			_, _, err = k.GetIntegerValue(test.Name + "_int_not_created")
-			testErrNotExist(t, test.Name+"_int_not_created", err)
-			size := 8
-			if test.Type == registry.DWORD {
-				size = 4
-			}
-			testGetValue(t, k, test, size)
-		case registry.BINARY:
-			testGetBinaryValue(t, k, test)
-			_, gottype, err := k.GetStringsValue(test.Name)
-			testErrUnexpectedType(t, test, gottype, err)
-			_, _, err = k.GetBinaryValue(test.Name + "_byte_not_created")
-			testErrNotExist(t, test.Name+"_byte_not_created", err)
-			testGetValue(t, k, test, len(test.Value.([]byte)))
-		case registry.MULTI_SZ:
-			if test.WillFail {
-				_, _, err := k.GetStringsValue(test.Name)
-				testErrNotExist(t, test.Name, err)
-			} else {
-				testGetStringsValue(t, k, test)
-				_, gottype, err := k.GetStringValue(test.Name)
-				testErrUnexpectedType(t, test, gottype, err)
-				size := 0
-				for _, s := range test.Value.([]string) {
-					size += len(s) + 1 // nil terminated
-				}
-				size += 1 // extra nil at the end
-				size *= 2 // count bytes, not uint16
-				testGetValue(t, k, test, size)
-			}
-			_, _, err := k.GetStringsValue(test.Name + "_strings_not_created")
-			testErrNotExist(t, test.Name+"_strings_not_created", err)
-		default:
-			t.Errorf("unsupported type %d for %s value", test.Type, test.Name)
-			continue
-		}
-	}
-}
-
-func testStat(t *testing.T, k registry.Key) {
-	subk, _, err := registry.CreateKey(k, "subkey", registry.CREATE_SUB_KEY)
-	if err != nil {
-		t.Error(err)
-		return
-	}
-	defer subk.Close()
-
-	defer registry.DeleteKey(k, "subkey")
-
-	ki, err := k.Stat()
-	if err != nil {
-		t.Error(err)
-		return
-	}
-	if ki.SubKeyCount != 1 {
-		t.Error("key must have 1 subkey")
-	}
-	if ki.MaxSubKeyLen != 6 {
-		t.Error("key max subkey name length must be 6")
-	}
-	if ki.ValueCount != 24 {
-		t.Errorf("key must have 24 values, but is %d", ki.ValueCount)
-	}
-	if ki.MaxValueNameLen != 12 {
-		t.Errorf("key max value name length must be 10, but is %d", ki.MaxValueNameLen)
-	}
-	if ki.MaxValueLen != 38 {
-		t.Errorf("key max value length must be 38, but is %d", ki.MaxValueLen)
-	}
-}
-
-func deleteValues(t *testing.T, k registry.Key) {
-	for _, test := range ValueTests {
-		if test.WillFail {
-			continue
-		}
-		err := k.DeleteValue(test.Name)
-		if err != nil {
-			t.Error(err)
-			continue
-		}
-	}
-	names, err := k.ReadValueNames(-1)
-	if err != nil {
-		t.Error(err)
-		return
-	}
-	if len(names) != 0 {
-		t.Errorf("some values remain after deletion: %v", names)
-	}
-}
-
-func TestValues(t *testing.T) {
-	softwareK, err := registry.OpenKey(registry.CURRENT_USER, "Software", registry.QUERY_VALUE)
-	if err != nil {
-		t.Fatal(err)
-	}
-	defer softwareK.Close()
-
-	testKName := randKeyName("TestValues_")
-
-	k, exist, err := registry.CreateKey(softwareK, testKName, registry.CREATE_SUB_KEY|registry.QUERY_VALUE|registry.SET_VALUE)
-	if err != nil {
-		t.Fatal(err)
-	}
-	defer k.Close()
-
-	if exist {
-		t.Fatalf("key %q already exists", testKName)
-	}
-
-	defer registry.DeleteKey(softwareK, testKName)
-
-	setValues(t, k)
-
-	enumerateValues(t, k)
-
-	testValues(t, k)
-
-	testStat(t, k)
-
-	deleteValues(t, k)
-}
-
-func walkKey(t *testing.T, k registry.Key, kname string) {
-	names, err := k.ReadValueNames(-1)
-	if err != nil {
-		t.Fatalf("reading value names of %s failed: %v", kname, err)
-	}
-	for _, name := range names {
-		_, valtype, err := k.GetValue(name, nil)
-		if err != nil {
-			t.Fatalf("reading value type of %s of %s failed: %v", name, kname, err)
-		}
-		switch valtype {
-		case registry.NONE:
-		case registry.SZ:
-			_, _, err := k.GetStringValue(name)
-			if err != nil {
-				t.Error(err)
-			}
-		case registry.EXPAND_SZ:
-			s, _, err := k.GetStringValue(name)
-			if err != nil {
-				t.Error(err)
-			}
-			_, err = registry.ExpandString(s)
-			if err != nil {
-				t.Error(err)
-			}
-		case registry.DWORD, registry.QWORD:
-			_, _, err := k.GetIntegerValue(name)
-			if err != nil {
-				t.Error(err)
-			}
-		case registry.BINARY:
-			_, _, err := k.GetBinaryValue(name)
-			if err != nil {
-				t.Error(err)
-			}
-		case registry.MULTI_SZ:
-			_, _, err := k.GetStringsValue(name)
-			if err != nil {
-				t.Error(err)
-			}
-		case registry.FULL_RESOURCE_DESCRIPTOR, registry.RESOURCE_LIST, registry.RESOURCE_REQUIREMENTS_LIST:
-			// TODO: not implemented
-		default:
-			t.Fatalf("value type %d of %s of %s failed: %v", valtype, name, kname, err)
-		}
-	}
-
-	names, err = k.ReadSubKeyNames(-1)
-	if err != nil {
-		t.Fatalf("reading sub-keys of %s failed: %v", kname, err)
-	}
-	for _, name := range names {
-		func() {
-			subk, err := registry.OpenKey(k, name, registry.ENUMERATE_SUB_KEYS|registry.QUERY_VALUE)
-			if err != nil {
-				if err == syscall.ERROR_ACCESS_DENIED {
-					// ignore error, if we are not allowed to access this key
-					return
-				}
-				t.Fatalf("opening sub-keys %s of %s failed: %v", name, kname, err)
-			}
-			defer subk.Close()
-
-			walkKey(t, subk, kname+`\`+name)
-		}()
-	}
-}
-
-func TestWalkFullRegistry(t *testing.T) {
-	if testing.Short() {
-		t.Skip("skipping long running test in short mode")
-	}
-	walkKey(t, registry.CLASSES_ROOT, "CLASSES_ROOT")
-	walkKey(t, registry.CURRENT_USER, "CURRENT_USER")
-	walkKey(t, registry.LOCAL_MACHINE, "LOCAL_MACHINE")
-	walkKey(t, registry.USERS, "USERS")
-	walkKey(t, registry.CURRENT_CONFIG, "CURRENT_CONFIG")
-}
-
-func TestExpandString(t *testing.T) {
-	got, err := registry.ExpandString("%PATH%")
-	if err != nil {
-		t.Fatal(err)
-	}
-	want := os.Getenv("PATH")
-	if got != want {
-		t.Errorf("want %q string expanded, got %q", want, got)
-	}
-}
-
-func TestInvalidValues(t *testing.T) {
-	softwareK, err := registry.OpenKey(registry.CURRENT_USER, "Software", registry.QUERY_VALUE)
-	if err != nil {
-		t.Fatal(err)
-	}
-	defer softwareK.Close()
-
-	testKName := randKeyName("TestInvalidValues_")
-
-	k, exist, err := registry.CreateKey(softwareK, testKName, registry.CREATE_SUB_KEY|registry.QUERY_VALUE|registry.SET_VALUE)
-	if err != nil {
-		t.Fatal(err)
-	}
-	defer k.Close()
-
-	if exist {
-		t.Fatalf("key %q already exists", testKName)
-	}
-
-	defer registry.DeleteKey(softwareK, testKName)
-
-	var tests = []struct {
-		Type uint32
-		Name string
-		Data []byte
-	}{
-		{registry.DWORD, "Dword1", nil},
-		{registry.DWORD, "Dword2", []byte{1, 2, 3}},
-		{registry.QWORD, "Qword1", nil},
-		{registry.QWORD, "Qword2", []byte{1, 2, 3}},
-		{registry.QWORD, "Qword3", []byte{1, 2, 3, 4, 5, 6, 7}},
-		{registry.MULTI_SZ, "MultiString1", nil},
-		{registry.MULTI_SZ, "MultiString2", []byte{0}},
-		{registry.MULTI_SZ, "MultiString3", []byte{'a', 'b', 0}},
-		{registry.MULTI_SZ, "MultiString4", []byte{'a', 0, 0, 'b', 0}},
-		{registry.MULTI_SZ, "MultiString5", []byte{'a', 0, 0}},
-	}
-
-	for _, test := range tests {
-		err := k.SetValue(test.Name, test.Type, test.Data)
-		if err != nil {
-			t.Fatalf("SetValue for %q failed: %v", test.Name, err)
-		}
-	}
-
-	for _, test := range tests {
-		switch test.Type {
-		case registry.DWORD, registry.QWORD:
-			value, valType, err := k.GetIntegerValue(test.Name)
-			if err == nil {
-				t.Errorf("GetIntegerValue(%q) succeeded. Returns type=%d value=%v", test.Name, valType, value)
-			}
-		case registry.MULTI_SZ:
-			value, valType, err := k.GetStringsValue(test.Name)
-			if err == nil {
-				if len(value) != 0 {
-					t.Errorf("GetStringsValue(%q) succeeded. Returns type=%d value=%v", test.Name, valType, value)
-				}
-			}
-		default:
-			t.Errorf("unsupported type %d for %s value", test.Type, test.Name)
-		}
-	}
-}
diff --git a/src/internal/syscall/windows/registry/syscall.go b/src/internal/syscall/windows/registry/syscall.go
deleted file mode 100644
index 38e573f..0000000
--- a/src/internal/syscall/windows/registry/syscall.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build windows
-
-package registry
-
-import "syscall"
-
-//go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go syscall.go
-
-const (
-	_REG_OPTION_NON_VOLATILE = 0
-
-	_REG_CREATED_NEW_KEY     = 1
-	_REG_OPENED_EXISTING_KEY = 2
-
-	_ERROR_NO_MORE_ITEMS syscall.Errno = 259
-)
-
-//sys	regCreateKeyEx(key syscall.Handle, subkey *uint16, reserved uint32, class *uint16, options uint32, desired uint32, sa *syscall.SecurityAttributes, result *syscall.Handle, disposition *uint32) (regerrno error) = advapi32.RegCreateKeyExW
-//sys	regDeleteKey(key syscall.Handle, subkey *uint16) (regerrno error) = advapi32.RegDeleteKeyW
-//sys	regSetValueEx(key syscall.Handle, valueName *uint16, reserved uint32, vtype uint32, buf *byte, bufsize uint32) (regerrno error) = advapi32.RegSetValueExW
-//sys	regEnumValue(key syscall.Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) = advapi32.RegEnumValueW
-//sys	regDeleteValue(key syscall.Handle, name *uint16) (regerrno error) = advapi32.RegDeleteValueW
-
-//sys	expandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32, err error) = kernel32.ExpandEnvironmentStringsW
diff --git a/src/internal/syscall/windows/registry/value.go b/src/internal/syscall/windows/registry/value.go
deleted file mode 100644
index bb45a23..0000000
--- a/src/internal/syscall/windows/registry/value.go
+++ /dev/null
@@ -1,330 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build windows
-
-package registry
-
-import (
-	"errors"
-	"io"
-	"syscall"
-	"unicode/utf16"
-	"unsafe"
-)
-
-const (
-	// Registry value types.
-	NONE                       = 0
-	SZ                         = 1
-	EXPAND_SZ                  = 2
-	BINARY                     = 3
-	DWORD                      = 4
-	DWORD_BIG_ENDIAN           = 5
-	LINK                       = 6
-	MULTI_SZ                   = 7
-	RESOURCE_LIST              = 8
-	FULL_RESOURCE_DESCRIPTOR   = 9
-	RESOURCE_REQUIREMENTS_LIST = 10
-	QWORD                      = 11
-)
-
-var (
-	// ErrShortBuffer is returned when the buffer was too short for the operation.
-	ErrShortBuffer = syscall.ERROR_MORE_DATA
-
-	// ErrNotExist is returned when a registry key or value does not exist.
-	ErrNotExist = syscall.ERROR_FILE_NOT_FOUND
-
-	// ErrUnexpectedType is returned by Get*Value when the value's type was unexpected.
-	ErrUnexpectedType = errors.New("unexpected key value type")
-)
-
-// GetValue retrieves the type and data for the specified value associated
-// with an open key k. It fills up buffer buf and returns the retrieved
-// byte count n. If buf is too small to fit the stored value it returns
-// ErrShortBuffer error along with the required buffer size n.
-// If no buffer is provided, it returns true and actual buffer size n.
-// If no buffer is provided, GetValue returns the value's type only.
-// If the value does not exist, the error returned is ErrNotExist.
-//
-// GetValue is a low level function. If value's type is known, use the appropriate
-// Get*Value function instead.
-func (k Key) GetValue(name string, buf []byte) (n int, valtype uint32, err error) {
-	pname, err := syscall.UTF16PtrFromString(name)
-	if err != nil {
-		return 0, 0, err
-	}
-	var pbuf *byte
-	if len(buf) > 0 {
-		pbuf = (*byte)(unsafe.Pointer(&buf[0]))
-	}
-	l := uint32(len(buf))
-	err = syscall.RegQueryValueEx(syscall.Handle(k), pname, nil, &valtype, pbuf, &l)
-	if err != nil {
-		return int(l), valtype, err
-	}
-	return int(l), valtype, nil
-}
-
-func (k Key) getValue(name string, buf []byte) (date []byte, valtype uint32, err error) {
-	p, err := syscall.UTF16PtrFromString(name)
-	if err != nil {
-		return nil, 0, err
-	}
-	var t uint32
-	n := uint32(len(buf))
-	for {
-		err = syscall.RegQueryValueEx(syscall.Handle(k), p, nil, &t, (*byte)(unsafe.Pointer(&buf[0])), &n)
-		if err == nil {
-			return buf[:n], t, nil
-		}
-		if err != syscall.ERROR_MORE_DATA {
-			return nil, 0, err
-		}
-		if n <= uint32(len(buf)) {
-			return nil, 0, err
-		}
-		buf = make([]byte, n)
-	}
-}
-
-// GetStringValue retrieves the string value for the specified
-// value name associated with an open key k. It also returns the value's type.
-// If value does not exist, GetStringValue returns ErrNotExist.
-// If value is not SZ or EXPAND_SZ, it will return the correct value
-// type and ErrUnexpectedType.
-func (k Key) GetStringValue(name string) (val string, valtype uint32, err error) {
-	data, typ, err2 := k.getValue(name, make([]byte, 64))
-	if err2 != nil {
-		return "", typ, err2
-	}
-	switch typ {
-	case SZ, EXPAND_SZ:
-	default:
-		return "", typ, ErrUnexpectedType
-	}
-	if len(data) == 0 {
-		return "", typ, nil
-	}
-	u := (*[1 << 10]uint16)(unsafe.Pointer(&data[0]))[:]
-	return syscall.UTF16ToString(u), typ, nil
-}
-
-// ExpandString expands environment-variable strings and replaces
-// them with the values defined for the current user.
-// Use ExpandString to expand EXPAND_SZ strings.
-func ExpandString(value string) (string, error) {
-	if value == "" {
-		return "", nil
-	}
-	p, err := syscall.UTF16PtrFromString(value)
-	if err != nil {
-		return "", err
-	}
-	r := make([]uint16, 100)
-	for {
-		n, err := expandEnvironmentStrings(p, &r[0], uint32(len(r)))
-		if err != nil {
-			return "", err
-		}
-		if n <= uint32(len(r)) {
-			u := (*[1 << 15]uint16)(unsafe.Pointer(&r[0]))[:]
-			return syscall.UTF16ToString(u), nil
-		}
-		r = make([]uint16, n)
-	}
-}
-
-// GetStringsValue retrieves the []string value for the specified
-// value name associated with an open key k. It also returns the value's type.
-// If value does not exist, GetStringsValue returns ErrNotExist.
-// If value is not MULTI_SZ, it will return the correct value
-// type and ErrUnexpectedType.
-func (k Key) GetStringsValue(name string) (val []string, valtype uint32, err error) {
-	data, typ, err2 := k.getValue(name, make([]byte, 64))
-	if err2 != nil {
-		return nil, typ, err2
-	}
-	if typ != MULTI_SZ {
-		return nil, typ, ErrUnexpectedType
-	}
-	if len(data) == 0 {
-		return nil, typ, nil
-	}
-	p := (*[1 << 24]uint16)(unsafe.Pointer(&data[0]))[:len(data)/2]
-	if len(p) == 0 {
-		return nil, typ, nil
-	}
-	if p[len(p)-1] == 0 {
-		p = p[:len(p)-1] // remove terminating null
-	}
-	val = make([]string, 0, 5)
-	from := 0
-	for i, c := range p {
-		if c == 0 {
-			val = append(val, string(utf16.Decode(p[from:i])))
-			from = i + 1
-		}
-	}
-	return val, typ, nil
-}
-
-// GetIntegerValue retrieves the integer value for the specified
-// value name associated with an open key k. It also returns the value's type.
-// If value does not exist, GetIntegerValue returns ErrNotExist.
-// If value is not DWORD or QWORD, it will return the correct value
-// type and ErrUnexpectedType.
-func (k Key) GetIntegerValue(name string) (val uint64, valtype uint32, err error) {
-	data, typ, err2 := k.getValue(name, make([]byte, 8))
-	if err2 != nil {
-		return 0, typ, err2
-	}
-	switch typ {
-	case DWORD:
-		if len(data) != 4 {
-			return 0, typ, errors.New("DWORD value is not 4 bytes long")
-		}
-		return uint64(*(*uint32)(unsafe.Pointer(&data[0]))), DWORD, nil
-	case QWORD:
-		if len(data) != 8 {
-			return 0, typ, errors.New("QWORD value is not 8 bytes long")
-		}
-		return uint64(*(*uint64)(unsafe.Pointer(&data[0]))), QWORD, nil
-	default:
-		return 0, typ, ErrUnexpectedType
-	}
-}
-
-// GetBinaryValue retrieves the binary value for the specified
-// value name associated with an open key k. It also returns the value's type.
-// If value does not exist, GetBinaryValue returns ErrNotExist.
-// If value is not BINARY, it will return the correct value
-// type and ErrUnexpectedType.
-func (k Key) GetBinaryValue(name string) (val []byte, valtype uint32, err error) {
-	data, typ, err2 := k.getValue(name, make([]byte, 64))
-	if err2 != nil {
-		return nil, typ, err2
-	}
-	if typ != BINARY {
-		return nil, typ, ErrUnexpectedType
-	}
-	return data, typ, nil
-}
-
-func (k Key) setValue(name string, valtype uint32, data []byte) error {
-	p, err := syscall.UTF16PtrFromString(name)
-	if err != nil {
-		return err
-	}
-	if len(data) == 0 {
-		return regSetValueEx(syscall.Handle(k), p, 0, valtype, nil, 0)
-	}
-	return regSetValueEx(syscall.Handle(k), p, 0, valtype, &data[0], uint32(len(data)))
-}
-
-// SetDWordValue sets the data and type of a name value
-// under key k to value and DWORD.
-func (k Key) SetDWordValue(name string, value uint32) error {
-	return k.setValue(name, DWORD, (*[4]byte)(unsafe.Pointer(&value))[:])
-}
-
-// SetQWordValue sets the data and type of a name value
-// under key k to value and QWORD.
-func (k Key) SetQWordValue(name string, value uint64) error {
-	return k.setValue(name, QWORD, (*[8]byte)(unsafe.Pointer(&value))[:])
-}
-
-func (k Key) setStringValue(name string, valtype uint32, value string) error {
-	v, err := syscall.UTF16FromString(value)
-	if err != nil {
-		return err
-	}
-	buf := (*[1 << 10]byte)(unsafe.Pointer(&v[0]))[:len(v)*2]
-	return k.setValue(name, valtype, buf)
-}
-
-// SetStringValue sets the data and type of a name value
-// under key k to value and SZ. The value must not contain a zero byte.
-func (k Key) SetStringValue(name, value string) error {
-	return k.setStringValue(name, SZ, value)
-}
-
-// SetExpandStringValue sets the data and type of a name value
-// under key k to value and EXPAND_SZ. The value must not contain a zero byte.
-func (k Key) SetExpandStringValue(name, value string) error {
-	return k.setStringValue(name, EXPAND_SZ, value)
-}
-
-// SetStringsValue sets the data and type of a name value
-// under key k to value and MULTI_SZ. The value strings
-// must not contain a zero byte.
-func (k Key) SetStringsValue(name string, value []string) error {
-	ss := ""
-	for _, s := range value {
-		for i := 0; i < len(s); i++ {
-			if s[i] == 0 {
-				return errors.New("string cannot have 0 inside")
-			}
-		}
-		ss += s + "\x00"
-	}
-	v := utf16.Encode([]rune(ss + "\x00"))
-	buf := (*[1 << 10]byte)(unsafe.Pointer(&v[0]))[:len(v)*2]
-	return k.setValue(name, MULTI_SZ, buf)
-}
-
-// SetBinaryValue sets the data and type of a name value
-// under key k to value and BINARY.
-func (k Key) SetBinaryValue(name string, value []byte) error {
-	return k.setValue(name, BINARY, value)
-}
-
-// DeleteValue removes a named value from the key k.
-func (k Key) DeleteValue(name string) error {
-	return regDeleteValue(syscall.Handle(k), syscall.StringToUTF16Ptr(name))
-}
-
-// ReadValueNames returns the value names of key k.
-// The parameter n controls the number of returned names,
-// analogous to the way os.File.Readdirnames works.
-func (k Key) ReadValueNames(n int) ([]string, error) {
-	ki, err := k.Stat()
-	if err != nil {
-		return nil, err
-	}
-	names := make([]string, 0, ki.ValueCount)
-	buf := make([]uint16, ki.MaxValueNameLen+1) // extra room for terminating null character
-loopItems:
-	for i := uint32(0); ; i++ {
-		if n > 0 {
-			if len(names) == n {
-				return names, nil
-			}
-		}
-		l := uint32(len(buf))
-		for {
-			err := regEnumValue(syscall.Handle(k), i, &buf[0], &l, nil, nil, nil, nil)
-			if err == nil {
-				break
-			}
-			if err == syscall.ERROR_MORE_DATA {
-				println(len(buf), l)
-				// Double buffer size and try again.
-				l = uint32(2 * len(buf))
-				buf = make([]uint16, l)
-				continue
-			}
-			if err == _ERROR_NO_MORE_ITEMS {
-				break loopItems
-			}
-			return names, err
-		}
-		names = append(names, syscall.UTF16ToString(buf[:l]))
-	}
-	if n > len(names) {
-		return names, io.EOF
-	}
-	return names, nil
-}
diff --git a/src/internal/syscall/windows/registry/zsyscall_windows.go b/src/internal/syscall/windows/registry/zsyscall_windows.go
deleted file mode 100644
index 2b3de63..0000000
--- a/src/internal/syscall/windows/registry/zsyscall_windows.go
+++ /dev/null
@@ -1,73 +0,0 @@
-// MACHINE GENERATED BY 'go generate' COMMAND; DO NOT EDIT
-
-package registry
-
-import "unsafe"
-import "syscall"
-
-var _ unsafe.Pointer
-
-var (
-	modadvapi32 = syscall.NewLazyDLL("advapi32.dll")
-	modkernel32 = syscall.NewLazyDLL("kernel32.dll")
-
-	procRegCreateKeyExW           = modadvapi32.NewProc("RegCreateKeyExW")
-	procRegDeleteKeyW             = modadvapi32.NewProc("RegDeleteKeyW")
-	procRegSetValueExW            = modadvapi32.NewProc("RegSetValueExW")
-	procRegEnumValueW             = modadvapi32.NewProc("RegEnumValueW")
-	procRegDeleteValueW           = modadvapi32.NewProc("RegDeleteValueW")
-	procExpandEnvironmentStringsW = modkernel32.NewProc("ExpandEnvironmentStringsW")
-)
-
-func regCreateKeyEx(key syscall.Handle, subkey *uint16, reserved uint32, class *uint16, options uint32, desired uint32, sa *syscall.SecurityAttributes, result *syscall.Handle, disposition *uint32) (regerrno error) {
-	r0, _, _ := syscall.Syscall9(procRegCreateKeyExW.Addr(), 9, uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(reserved), uintptr(unsafe.Pointer(class)), uintptr(options), uintptr(desired), uintptr(unsafe.Pointer(sa)), uintptr(unsafe.Pointer(result)), uintptr(unsafe.Pointer(disposition)))
-	if r0 != 0 {
-		regerrno = syscall.Errno(r0)
-	}
-	return
-}
-
-func regDeleteKey(key syscall.Handle, subkey *uint16) (regerrno error) {
-	r0, _, _ := syscall.Syscall(procRegDeleteKeyW.Addr(), 2, uintptr(key), uintptr(unsafe.Pointer(subkey)), 0)
-	if r0 != 0 {
-		regerrno = syscall.Errno(r0)
-	}
-	return
-}
-
-func regSetValueEx(key syscall.Handle, valueName *uint16, reserved uint32, vtype uint32, buf *byte, bufsize uint32) (regerrno error) {
-	r0, _, _ := syscall.Syscall6(procRegSetValueExW.Addr(), 6, uintptr(key), uintptr(unsafe.Pointer(valueName)), uintptr(reserved), uintptr(vtype), uintptr(unsafe.Pointer(buf)), uintptr(bufsize))
-	if r0 != 0 {
-		regerrno = syscall.Errno(r0)
-	}
-	return
-}
-
-func regEnumValue(key syscall.Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) {
-	r0, _, _ := syscall.Syscall9(procRegEnumValueW.Addr(), 8, uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen)), 0)
-	if r0 != 0 {
-		regerrno = syscall.Errno(r0)
-	}
-	return
-}
-
-func regDeleteValue(key syscall.Handle, name *uint16) (regerrno error) {
-	r0, _, _ := syscall.Syscall(procRegDeleteValueW.Addr(), 2, uintptr(key), uintptr(unsafe.Pointer(name)), 0)
-	if r0 != 0 {
-		regerrno = syscall.Errno(r0)
-	}
-	return
-}
-
-func expandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32, err error) {
-	r0, _, e1 := syscall.Syscall(procExpandEnvironmentStringsW.Addr(), 3, uintptr(unsafe.Pointer(src)), uintptr(unsafe.Pointer(dst)), uintptr(size))
-	n = uint32(r0)
-	if n == 0 {
-		if e1 != 0 {
-			err = error(e1)
-		} else {
-			err = syscall.EINVAL
-		}
-	}
-	return
-}
diff --git a/src/internal/syscall/windows/syscall_windows.go b/src/internal/syscall/windows/syscall_windows.go
deleted file mode 100644
index dc8a916..0000000
--- a/src/internal/syscall/windows/syscall_windows.go
+++ /dev/null
@@ -1,130 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package windows
-
-import "syscall"
-
-//go:generate go run ../../../syscall/mksyscall_windows.go -output zsyscall_windows.go syscall_windows.go
-
-const GAA_FLAG_INCLUDE_PREFIX = 0x00000010
-
-const IF_TYPE_SOFTWARE_LOOPBACK = 24
-
-type SocketAddress struct {
-	Sockaddr       *syscall.RawSockaddrAny
-	SockaddrLength int32
-}
-
-type IpAdapterUnicastAddress struct {
-	Length             uint32
-	Flags              uint32
-	Next               *IpAdapterUnicastAddress
-	Address            SocketAddress
-	PrefixOrigin       int32
-	SuffixOrigin       int32
-	DadState           int32
-	ValidLifetime      uint32
-	PreferredLifetime  uint32
-	LeaseLifetime      uint32
-	OnLinkPrefixLength uint8
-}
-
-type IpAdapterAnycastAddress struct {
-	Length  uint32
-	Flags   uint32
-	Next    *IpAdapterAnycastAddress
-	Address SocketAddress
-}
-
-type IpAdapterMulticastAddress struct {
-	Length  uint32
-	Flags   uint32
-	Next    *IpAdapterMulticastAddress
-	Address SocketAddress
-}
-
-type IpAdapterDnsServerAdapter struct {
-	Length   uint32
-	Reserved uint32
-	Next     *IpAdapterDnsServerAdapter
-	Address  SocketAddress
-}
-
-type IpAdapterPrefix struct {
-	Length       uint32
-	Flags        uint32
-	Next         *IpAdapterPrefix
-	Address      SocketAddress
-	PrefixLength uint32
-}
-
-type IpAdapterAddresses struct {
-	Length                uint32
-	IfIndex               uint32
-	Next                  *IpAdapterAddresses
-	AdapterName           *byte
-	FirstUnicastAddress   *IpAdapterUnicastAddress
-	FirstAnycastAddress   *IpAdapterAnycastAddress
-	FirstMulticastAddress *IpAdapterMulticastAddress
-	FirstDnsServerAddress *IpAdapterDnsServerAdapter
-	DnsSuffix             *uint16
-	Description           *uint16
-	FriendlyName          *uint16
-	PhysicalAddress       [syscall.MAX_ADAPTER_ADDRESS_LENGTH]byte
-	PhysicalAddressLength uint32
-	Flags                 uint32
-	Mtu                   uint32
-	IfType                uint32
-	OperStatus            uint32
-	Ipv6IfIndex           uint32
-	ZoneIndices           [16]uint32
-	FirstPrefix           *IpAdapterPrefix
-	/* more fields might be present here. */
-}
-
-const (
-	IfOperStatusUp             = 1
-	IfOperStatusDown           = 2
-	IfOperStatusTesting        = 3
-	IfOperStatusUnknown        = 4
-	IfOperStatusDormant        = 5
-	IfOperStatusNotPresent     = 6
-	IfOperStatusLowerLayerDown = 7
-)
-
-//sys GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizeOfPointer *uint32) (errcode error) = iphlpapi.GetAdaptersAddresses
-//sys	GetComputerNameEx(nameformat uint32, buf *uint16, n *uint32) (err error) = GetComputerNameExW
-//sys	MoveFileEx(from *uint16, to *uint16, flags uint32) (err error) = MoveFileExW
-
-const (
-	ComputerNameNetBIOS                   = 0
-	ComputerNameDnsHostname               = 1
-	ComputerNameDnsDomain                 = 2
-	ComputerNameDnsFullyQualified         = 3
-	ComputerNamePhysicalNetBIOS           = 4
-	ComputerNamePhysicalDnsHostname       = 5
-	ComputerNamePhysicalDnsDomain         = 6
-	ComputerNamePhysicalDnsFullyQualified = 7
-	ComputerNameMax                       = 8
-
-	MOVEFILE_REPLACE_EXISTING      = 0x1
-	MOVEFILE_COPY_ALLOWED          = 0x2
-	MOVEFILE_DELAY_UNTIL_REBOOT    = 0x4
-	MOVEFILE_WRITE_THROUGH         = 0x8
-	MOVEFILE_CREATE_HARDLINK       = 0x10
-	MOVEFILE_FAIL_IF_NOT_TRACKABLE = 0x20
-)
-
-func Rename(oldpath, newpath string) error {
-	from, err := syscall.UTF16PtrFromString(oldpath)
-	if err != nil {
-		return err
-	}
-	to, err := syscall.UTF16PtrFromString(newpath)
-	if err != nil {
-		return err
-	}
-	return MoveFileEx(from, to, MOVEFILE_REPLACE_EXISTING)
-}
diff --git a/src/internal/syscall/windows/zsyscall_windows.go b/src/internal/syscall/windows/zsyscall_windows.go
deleted file mode 100644
index c6f607a..0000000
--- a/src/internal/syscall/windows/zsyscall_windows.go
+++ /dev/null
@@ -1,49 +0,0 @@
-// MACHINE GENERATED BY 'go generate' COMMAND; DO NOT EDIT
-
-package windows
-
-import "unsafe"
-import "syscall"
-
-var _ unsafe.Pointer
-
-var (
-	modiphlpapi = syscall.NewLazyDLL("iphlpapi.dll")
-	modkernel32 = syscall.NewLazyDLL("kernel32.dll")
-
-	procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses")
-	procGetComputerNameExW   = modkernel32.NewProc("GetComputerNameExW")
-	procMoveFileExW          = modkernel32.NewProc("MoveFileExW")
-)
-
-func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizeOfPointer *uint32) (errcode error) {
-	r0, _, _ := syscall.Syscall6(procGetAdaptersAddresses.Addr(), 5, uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizeOfPointer)), 0)
-	if r0 != 0 {
-		errcode = syscall.Errno(r0)
-	}
-	return
-}
-
-func GetComputerNameEx(nameformat uint32, buf *uint16, n *uint32) (err error) {
-	r1, _, e1 := syscall.Syscall(procGetComputerNameExW.Addr(), 3, uintptr(nameformat), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n)))
-	if r1 == 0 {
-		if e1 != 0 {
-			err = error(e1)
-		} else {
-			err = syscall.EINVAL
-		}
-	}
-	return
-}
-
-func MoveFileEx(from *uint16, to *uint16, flags uint32) (err error) {
-	r1, _, e1 := syscall.Syscall(procMoveFileExW.Addr(), 3, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), uintptr(flags))
-	if r1 == 0 {
-		if e1 != 0 {
-			err = error(e1)
-		} else {
-			err = syscall.EINVAL
-		}
-	}
-	return
-}
diff --git a/src/internal/testenv/testenv.go b/src/internal/testenv/testenv.go
deleted file mode 100644
index 110af3d..0000000
--- a/src/internal/testenv/testenv.go
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package testenv provides information about what functionality
-// is available in different testing environments run by the Go team.
-//
-// It is an internal package because these details are specific
-// to the Go team's test setup (on build.golang.org) and not
-// fundamental to tests in general.
-package testenv
-
-import (
-	"os"
-	"runtime"
-	"strings"
-	"testing"
-)
-
-// Builder reports the name of the builder running this test
-// (for example, "linux-amd64" or "windows-386-gce").
-// If the test is not running on the build infrastructure,
-// Builder returns the empty string.
-func Builder() string {
-	return os.Getenv("GO_BUILDER_NAME")
-}
-
-// HasGoBuild reports whether the current system can build programs with ``go build''
-// and then run them with os.StartProcess or exec.Command.
-func HasGoBuild() bool {
-	switch runtime.GOOS {
-	case "android", "nacl":
-		return false
-	case "darwin":
-		if strings.HasPrefix(runtime.GOARCH, "arm") {
-			return false
-		}
-	}
-	return true
-}
-
-// MustHaveGoBuild checks that the current system can build programs with ``go build''
-// and then run them with os.StartProcess or exec.Command.
-// If not, MustHaveGoBuild calls t.Skip with an explanation.
-func MustHaveGoBuild(t *testing.T) {
-	if !HasGoBuild() {
-		t.Skipf("skipping test: 'go build' not available on %s/%s", runtime.GOOS, runtime.GOARCH)
-	}
-}
-
-// HasGoRun reports whether the current system can run programs with ``go run.''
-func HasGoRun() bool {
-	// For now, having go run and having go build are the same.
-	return HasGoBuild()
-}
-
-// MustHaveGoRun checks that the current system can run programs with ``go run.''
-// If not, MustHaveGoRun calls t.Skip with an explanation.
-func MustHaveGoRun(t *testing.T) {
-	if !HasGoRun() {
-		t.Skipf("skipping test: 'go run' not available on %s/%s", runtime.GOOS, runtime.GOARCH)
-	}
-}
-
-// HasExec reports whether the current system can start new processes
-// using os.StartProcess or (more commonly) exec.Command.
-func HasExec() bool {
-	switch runtime.GOOS {
-	case "nacl":
-		return false
-	case "darwin":
-		if strings.HasPrefix(runtime.GOARCH, "arm") {
-			return false
-		}
-	}
-	return true
-}
-
-// MustHaveExec checks that the current system can start new processes
-// using os.StartProcess or (more commonly) exec.Command.
-// If not, MustHaveExec calls t.Skip with an explanation.
-func MustHaveExec(t *testing.T) {
-	if !HasExec() {
-		t.Skipf("skipping test: cannot exec subprocess on %s/%s", runtime.GOOS, runtime.GOARCH)
-	}
-}
-
-// HasExternalNetwork reports whether the current system can use
-// external (non-localhost) networks.
-func HasExternalNetwork() bool {
-	return !testing.Short()
-}
-
-// MustHaveExternalNetwork checks that the current system can use
-// external (non-localhost) networks.
-// If not, MustHaveExternalNetwork calls t.Skip with an explanation.
-func MustHaveExternalNetwork(t *testing.T) {
-	if testing.Short() {
-		t.Skipf("skipping test: no external network in -short mode")
-	}
-}
diff --git a/src/internal/trace/goroutines.go b/src/internal/trace/goroutines.go
deleted file mode 100644
index f8673e2..0000000
--- a/src/internal/trace/goroutines.go
+++ /dev/null
@@ -1,180 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package trace
-
-// GDesc contains statistics about execution of a single goroutine.
-type GDesc struct {
-	ID           uint64
-	Name         string
-	PC           uint64
-	CreationTime int64
-	StartTime    int64
-	EndTime      int64
-
-	ExecTime      int64
-	SchedWaitTime int64
-	IOTime        int64
-	BlockTime     int64
-	SyscallTime   int64
-	GCTime        int64
-	SweepTime     int64
-	TotalTime     int64
-
-	*gdesc // private part
-}
-
-// gdesc is a private part of GDesc that is required only during analysis.
-type gdesc struct {
-	lastStartTime    int64
-	blockNetTime     int64
-	blockSyncTime    int64
-	blockSyscallTime int64
-	blockSweepTime   int64
-	blockGCTime      int64
-	blockSchedTime   int64
-}
-
-// GoroutineStats generates statistics for all goroutines in the trace.
-func GoroutineStats(events []*Event) map[uint64]*GDesc {
-	gs := make(map[uint64]*GDesc)
-	var lastTs int64
-	var gcStartTime int64
-	for _, ev := range events {
-		lastTs = ev.Ts
-		switch ev.Type {
-		case EvGoCreate:
-			g := &GDesc{ID: ev.Args[0], CreationTime: ev.Ts, gdesc: new(gdesc)}
-			g.blockSchedTime = ev.Ts
-			gs[g.ID] = g
-		case EvGoStart:
-			g := gs[ev.G]
-			if g.PC == 0 {
-				g.PC = ev.Stk[0].PC
-				g.Name = ev.Stk[0].Fn
-			}
-			g.lastStartTime = ev.Ts
-			if g.StartTime == 0 {
-				g.StartTime = ev.Ts
-			}
-			if g.blockSchedTime != 0 {
-				g.SchedWaitTime += ev.Ts - g.blockSchedTime
-				g.blockSchedTime = 0
-			}
-		case EvGoEnd, EvGoStop:
-			g := gs[ev.G]
-			g.ExecTime += ev.Ts - g.lastStartTime
-			g.TotalTime = ev.Ts - g.CreationTime
-			g.EndTime = ev.Ts
-		case EvGoBlockSend, EvGoBlockRecv, EvGoBlockSelect,
-			EvGoBlockSync, EvGoBlockCond:
-			g := gs[ev.G]
-			g.ExecTime += ev.Ts - g.lastStartTime
-			g.blockSyncTime = ev.Ts
-		case EvGoSched, EvGoPreempt:
-			g := gs[ev.G]
-			g.ExecTime += ev.Ts - g.lastStartTime
-			g.blockSchedTime = ev.Ts
-		case EvGoSleep, EvGoBlock:
-			g := gs[ev.G]
-			g.ExecTime += ev.Ts - g.lastStartTime
-		case EvGoBlockNet:
-			g := gs[ev.G]
-			g.ExecTime += ev.Ts - g.lastStartTime
-			g.blockNetTime = ev.Ts
-		case EvGoUnblock:
-			g := gs[ev.Args[0]]
-			if g.blockNetTime != 0 {
-				g.IOTime += ev.Ts - g.blockNetTime
-				g.blockNetTime = 0
-			}
-			if g.blockSyncTime != 0 {
-				g.BlockTime += ev.Ts - g.blockSyncTime
-				g.blockSyncTime = 0
-			}
-			g.blockSchedTime = ev.Ts
-		case EvGoSysBlock:
-			g := gs[ev.G]
-			g.ExecTime += ev.Ts - g.lastStartTime
-			g.blockSyscallTime = ev.Ts
-		case EvGoSysExit:
-			g := gs[ev.G]
-			if g.blockSyscallTime != 0 {
-				g.SyscallTime += ev.Ts - g.blockSyscallTime
-				g.blockSyscallTime = 0
-			}
-			g.blockSchedTime = ev.Ts
-		case EvGCSweepStart:
-			g := gs[ev.G]
-			if g != nil {
-				// Sweep can happen during GC on system goroutine.
-				g.blockSweepTime = ev.Ts
-			}
-		case EvGCSweepDone:
-			g := gs[ev.G]
-			if g != nil && g.blockSweepTime != 0 {
-				g.SweepTime += ev.Ts - g.blockSweepTime
-				g.blockSweepTime = 0
-			}
-		case EvGCStart:
-			gcStartTime = ev.Ts
-		case EvGCDone:
-			for _, g := range gs {
-				if g.EndTime == 0 {
-					g.GCTime += ev.Ts - gcStartTime
-				}
-			}
-		}
-	}
-
-	for _, g := range gs {
-		if g.TotalTime == 0 {
-			g.TotalTime = lastTs - g.CreationTime
-		}
-		if g.EndTime == 0 {
-			g.EndTime = lastTs
-		}
-		if g.blockNetTime != 0 {
-			g.IOTime += lastTs - g.blockNetTime
-			g.blockNetTime = 0
-		}
-		if g.blockSyncTime != 0 {
-			g.BlockTime += lastTs - g.blockSyncTime
-			g.blockSyncTime = 0
-		}
-		if g.blockSyscallTime != 0 {
-			g.SyscallTime += lastTs - g.blockSyscallTime
-			g.blockSyscallTime = 0
-		}
-		if g.blockSchedTime != 0 {
-			g.SchedWaitTime += lastTs - g.blockSchedTime
-			g.blockSchedTime = 0
-		}
-		g.gdesc = nil
-	}
-
-	return gs
-}
-
-// RelatedGoroutines finds a set of goroutines related to goroutine goid.
-func RelatedGoroutines(events []*Event, goid uint64) map[uint64]bool {
-	// BFS of depth 2 over "unblock" edges
-	// (what goroutines unblock goroutine goid?).
-	gmap := make(map[uint64]bool)
-	gmap[goid] = true
-	for i := 0; i < 2; i++ {
-		gmap1 := make(map[uint64]bool)
-		for g := range gmap {
-			gmap1[g] = true
-		}
-		for _, ev := range events {
-			if ev.Type == EvGoUnblock && gmap[ev.Args[0]] {
-				gmap1[ev.G] = true
-			}
-		}
-		gmap = gmap1
-	}
-	gmap[0] = true // for GC events
-	return gmap
-}
diff --git a/src/internal/trace/parser.go b/src/internal/trace/parser.go
deleted file mode 100644
index 1eb39dd..0000000
--- a/src/internal/trace/parser.go
+++ /dev/null
@@ -1,786 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package trace
-
-import (
-	"bufio"
-	"bytes"
-	"fmt"
-	"io"
-	"os"
-	"os/exec"
-	"sort"
-	"strconv"
-	"strings"
-)
-
-// Event describes one event in the trace.
-type Event struct {
-	Off   int       // offset in input file (for debugging and error reporting)
-	Type  byte      // one of Ev*
-	Seq   int64     // sequence number
-	Ts    int64     // timestamp in nanoseconds
-	P     int       // P on which the event happened (can be one of TimerP, NetpollP, SyscallP)
-	G     uint64    // G on which the event happened
-	StkID uint64    // unique stack ID
-	Stk   []*Frame  // stack trace (can be empty)
-	Args  [3]uint64 // event-type-specific arguments
-	// linked event (can be nil), depends on event type:
-	// for GCStart: the GCStop
-	// for GCScanStart: the GCScanDone
-	// for GCSweepStart: the GCSweepDone
-	// for GoCreate: first GoStart of the created goroutine
-	// for GoStart: the associated GoEnd, GoBlock or other blocking event
-	// for GoSched/GoPreempt: the next GoStart
-	// for GoBlock and other blocking events: the unblock event
-	// for GoUnblock: the associated GoStart
-	// for blocking GoSysCall: the associated GoSysExit
-	// for GoSysExit: the next GoStart
-	Link *Event
-}
-
-// Frame is a frame in stack traces.
-type Frame struct {
-	PC   uint64
-	Fn   string
-	File string
-	Line int
-}
-
-const (
-	// Special P identifiers:
-	FakeP    = 1000000 + iota
-	TimerP   // depicts timer unblocks
-	NetpollP // depicts network unblocks
-	SyscallP // depicts returns from syscalls
-)
-
-// Parse parses, post-processes and verifies the trace.
-func Parse(r io.Reader) ([]*Event, error) {
-	rawEvents, err := readTrace(r)
-	if err != nil {
-		return nil, err
-	}
-	events, err := parseEvents(rawEvents)
-	if err != nil {
-		return nil, err
-	}
-	events, err = removeFutile(events)
-	if err != nil {
-		return nil, err
-	}
-	err = postProcessTrace(events)
-	if err != nil {
-		return nil, err
-	}
-	return events, nil
-}
-
-// rawEvent is a helper type used during parsing.
-type rawEvent struct {
-	off  int
-	typ  byte
-	args []uint64
-}
-
-// readTrace does wire-format parsing and verification.
-// It does not care about specific event types and argument meaning.
-func readTrace(r io.Reader) ([]rawEvent, error) {
-	// Read and validate trace header.
-	var buf [16]byte
-	off, err := r.Read(buf[:])
-	if off != 16 || err != nil {
-		return nil, fmt.Errorf("failed to read header: read %v, err %v", off, err)
-	}
-	if bytes.Compare(buf[:], []byte("go 1.5 trace\x00\x00\x00\x00")) != 0 {
-		return nil, fmt.Errorf("not a trace file")
-	}
-
-	// Read events.
-	var events []rawEvent
-	for {
-		// Read event type and number of arguments (1 byte).
-		off0 := off
-		n, err := r.Read(buf[:1])
-		if err == io.EOF {
-			break
-		}
-		if err != nil || n != 1 {
-			return nil, fmt.Errorf("failed to read trace at offset 0x%x: n=%v err=%v", off0, n, err)
-		}
-		off += n
-		typ := buf[0] << 2 >> 2
-		narg := buf[0] >> 6
-		ev := rawEvent{typ: typ, off: off0}
-		if narg < 3 {
-			for i := 0; i < int(narg)+2; i++ { // sequence number and time stamp are present but not counted in narg
-				var v uint64
-				v, off, err = readVal(r, off)
-				if err != nil {
-					return nil, err
-				}
-				ev.args = append(ev.args, v)
-			}
-		} else {
-			// If narg == 3, the first value is length of the event in bytes.
-			var v uint64
-			v, off, err = readVal(r, off)
-			if err != nil {
-				return nil, err
-			}
-			evLen := v
-			off1 := off
-			for evLen > uint64(off-off1) {
-				v, off, err = readVal(r, off)
-				if err != nil {
-					return nil, err
-				}
-				ev.args = append(ev.args, v)
-			}
-			if evLen != uint64(off-off1) {
-				return nil, fmt.Errorf("event has wrong length at offset 0x%x: want %v, got %v", off0, evLen, off-off1)
-			}
-		}
-		events = append(events, ev)
-	}
-	return events, nil
-}
-
-// Parse events transforms raw events into events.
-// It does analyze and verify per-event-type arguments.
-func parseEvents(rawEvents []rawEvent) (events []*Event, err error) {
-	var ticksPerSec, lastSeq, lastTs int64
-	var lastG, timerGoid uint64
-	var lastP int
-	lastGs := make(map[int]uint64) // last goroutine running on P
-	stacks := make(map[uint64][]*Frame)
-	for _, raw := range rawEvents {
-		if raw.typ == EvNone || raw.typ >= EvCount {
-			err = fmt.Errorf("unknown event type %v at offset 0x%x", raw.typ, raw.off)
-			return
-		}
-		desc := EventDescriptions[raw.typ]
-		if desc.Name == "" {
-			err = fmt.Errorf("missing description for event type %v", raw.typ)
-			return
-		}
-		if raw.typ != EvStack {
-			narg := len(desc.Args)
-			if desc.Stack {
-				narg++
-			}
-			if raw.typ != EvBatch && raw.typ != EvFrequency && raw.typ != EvTimerGoroutine {
-				narg++ // sequence number
-				narg++ // timestamp
-			}
-			if len(raw.args) != narg {
-				err = fmt.Errorf("%v has wrong number of arguments at offset 0x%x: want %v, got %v",
-					desc.Name, raw.off, narg, len(raw.args))
-				return
-			}
-		}
-		switch raw.typ {
-		case EvBatch:
-			lastGs[lastP] = lastG
-			lastP = int(raw.args[0])
-			lastG = lastGs[lastP]
-			lastSeq = int64(raw.args[1])
-			lastTs = int64(raw.args[2])
-		case EvFrequency:
-			ticksPerSec = int64(raw.args[0])
-			if ticksPerSec <= 0 {
-				// The most likely cause for this is tick skew on different CPUs.
-				// For example, solaris/amd64 seems to have wildly different
-				// ticks on different CPUs.
-				err = ErrTimeOrder
-				return
-			}
-		case EvTimerGoroutine:
-			timerGoid = raw.args[0]
-		case EvStack:
-			if len(raw.args) < 2 {
-				err = fmt.Errorf("EvStack has wrong number of arguments at offset 0x%x: want at least 2, got %v",
-					raw.off, len(raw.args))
-				return
-			}
-			size := raw.args[1]
-			if size > 1000 {
-				err = fmt.Errorf("EvStack has bad number of frames at offset 0x%x: %v",
-					raw.off, size)
-				return
-			}
-			if uint64(len(raw.args)) != size+2 {
-				err = fmt.Errorf("EvStack has wrong number of arguments at offset 0x%x: want %v, got %v",
-					raw.off, size+2, len(raw.args))
-				return
-			}
-			id := raw.args[0]
-			if id != 0 && size > 0 {
-				stk := make([]*Frame, size)
-				for i := 0; i < int(size); i++ {
-					stk[i] = &Frame{PC: raw.args[i+2]}
-				}
-				stacks[id] = stk
-			}
-		default:
-			e := &Event{Off: raw.off, Type: raw.typ, P: lastP, G: lastG}
-			e.Seq = lastSeq + int64(raw.args[0])
-			e.Ts = lastTs + int64(raw.args[1])
-			lastSeq = e.Seq
-			lastTs = e.Ts
-			for i := range desc.Args {
-				e.Args[i] = raw.args[i+2]
-			}
-			if desc.Stack {
-				e.StkID = raw.args[len(desc.Args)+2]
-			}
-			switch raw.typ {
-			case EvGoStart:
-				lastG = e.Args[0]
-				e.G = lastG
-			case EvGCStart, EvGCDone, EvGCScanStart, EvGCScanDone:
-				e.G = 0
-			case EvGoEnd, EvGoStop, EvGoSched, EvGoPreempt,
-				EvGoSleep, EvGoBlock, EvGoBlockSend, EvGoBlockRecv,
-				EvGoBlockSelect, EvGoBlockSync, EvGoBlockCond, EvGoBlockNet,
-				EvGoSysBlock:
-				lastG = 0
-			case EvGoSysExit:
-				// EvGoSysExit emission is delayed until the thread has a P.
-				// Give it the real sequence number and time stamp.
-				e.Seq = int64(e.Args[1])
-				if e.Args[2] != 0 {
-					e.Ts = int64(e.Args[2])
-				}
-			}
-			events = append(events, e)
-		}
-	}
-	if len(events) == 0 {
-		err = fmt.Errorf("trace is empty")
-		return
-	}
-
-	// Attach stack traces.
-	for _, ev := range events {
-		if ev.StkID != 0 {
-			ev.Stk = stacks[ev.StkID]
-		}
-	}
-
-	// Sort by sequence number and translate cpu ticks to real time.
-	sort.Sort(eventList(events))
-	if ticksPerSec == 0 {
-		err = fmt.Errorf("no EvFrequency event")
-		return
-	}
-	minTs := events[0].Ts
-	for _, ev := range events {
-		ev.Ts = (ev.Ts - minTs) * 1e9 / ticksPerSec
-		// Move timers and syscalls to separate fake Ps.
-		if timerGoid != 0 && ev.G == timerGoid && ev.Type == EvGoUnblock {
-			ev.P = TimerP
-		}
-		if ev.Type == EvGoSysExit {
-			ev.P = SyscallP
-			ev.G = ev.Args[0]
-		}
-	}
-
-	return
-}
-
-// removeFutile removes all constituents of futile wakeups (block, unblock, start).
-// For example, a goroutine was unblocked on a mutex, but another goroutine got
-// ahead and acquired the mutex before the first goroutine is scheduled,
-// so the first goroutine has to block again. Such wakeups happen on buffered
-// channels and sync.Mutex, but are generally not interesting for end user.
-func removeFutile(events []*Event) ([]*Event, error) {
-	// Two non-trivial aspects:
-	// 1. A goroutine can be preempted during a futile wakeup and migrate to another P.
-	//	We want to remove all of that.
-	// 2. Tracing can start in the middle of a futile wakeup.
-	//	That is, we can see a futile wakeup event w/o the actual wakeup before it.
-	// postProcessTrace runs after us and ensures that we leave the trace in a consistent state.
-
-	// Phase 1: determine futile wakeup sequences.
-	type G struct {
-		futile bool
-		wakeup []*Event // wakeup sequence (subject for removal)
-	}
-	gs := make(map[uint64]G)
-	futile := make(map[*Event]bool)
-	for _, ev := range events {
-		switch ev.Type {
-		case EvGoUnblock:
-			g := gs[ev.Args[0]]
-			g.wakeup = []*Event{ev}
-			gs[ev.Args[0]] = g
-		case EvGoStart, EvGoPreempt, EvFutileWakeup:
-			g := gs[ev.G]
-			g.wakeup = append(g.wakeup, ev)
-			if ev.Type == EvFutileWakeup {
-				g.futile = true
-			}
-			gs[ev.G] = g
-		case EvGoBlock, EvGoBlockSend, EvGoBlockRecv, EvGoBlockSelect, EvGoBlockSync, EvGoBlockCond:
-			g := gs[ev.G]
-			if g.futile {
-				futile[ev] = true
-				for _, ev1 := range g.wakeup {
-					futile[ev1] = true
-				}
-			}
-			delete(gs, ev.G)
-		}
-	}
-
-	// Phase 2: remove futile wakeup sequences.
-	newEvents := events[:0] // overwrite the original slice
-	for _, ev := range events {
-		if !futile[ev] {
-			newEvents = append(newEvents, ev)
-		}
-	}
-	return newEvents, nil
-}
-
-// ErrTimeOrder is returned by Parse when the trace contains
-// time stamps that do not respect actual event ordering.
-var ErrTimeOrder = fmt.Errorf("time stamps out of order")
-
-// postProcessTrace does inter-event verification and information restoration.
-// The resulting trace is guaranteed to be consistent
-// (for example, a P does not run two Gs at the same time, or a G is indeed
-// blocked before an unblock event).
-func postProcessTrace(events []*Event) error {
-	const (
-		gDead = iota
-		gRunnable
-		gRunning
-		gWaiting
-	)
-	type gdesc struct {
-		state    int
-		ev       *Event
-		evStart  *Event
-		evCreate *Event
-	}
-	type pdesc struct {
-		running bool
-		g       uint64
-		evScan  *Event
-		evSweep *Event
-	}
-
-	gs := make(map[uint64]gdesc)
-	ps := make(map[int]pdesc)
-	gs[0] = gdesc{state: gRunning}
-	var evGC *Event
-
-	checkRunning := func(p pdesc, g gdesc, ev *Event, allowG0 bool) error {
-		name := EventDescriptions[ev.Type].Name
-		if g.state != gRunning {
-			return fmt.Errorf("g %v is not running while %v (offset %v, time %v)", ev.G, name, ev.Off, ev.Ts)
-		}
-		if p.g != ev.G {
-			return fmt.Errorf("p %v is not running g %v while %v (offset %v, time %v)", ev.P, ev.G, name, ev.Off, ev.Ts)
-		}
-		if !allowG0 && ev.G == 0 {
-			return fmt.Errorf("g 0 did %v (offset %v, time %v)", EventDescriptions[ev.Type].Name, ev.Off, ev.Ts)
-		}
-		return nil
-	}
-
-	for _, ev := range events {
-		g := gs[ev.G]
-		p := ps[ev.P]
-
-		switch ev.Type {
-		case EvProcStart:
-			if p.running {
-				return fmt.Errorf("p %v is running before start (offset %v, time %v)", ev.P, ev.Off, ev.Ts)
-			}
-			p.running = true
-		case EvProcStop:
-			if !p.running {
-				return fmt.Errorf("p %v is not running before stop (offset %v, time %v)", ev.P, ev.Off, ev.Ts)
-			}
-			if p.g != 0 {
-				return fmt.Errorf("p %v is running a goroutine %v during stop (offset %v, time %v)", ev.P, p.g, ev.Off, ev.Ts)
-			}
-			p.running = false
-		case EvGCStart:
-			if evGC != nil {
-				return fmt.Errorf("previous GC is not ended before a new one (offset %v, time %v)", ev.Off, ev.Ts)
-			}
-			evGC = ev
-		case EvGCDone:
-			if evGC == nil {
-				return fmt.Errorf("bogus GC end (offset %v, time %v)", ev.Off, ev.Ts)
-			}
-			evGC.Link = ev
-			evGC = nil
-		case EvGCScanStart:
-			if p.evScan != nil {
-				return fmt.Errorf("previous scanning is not ended before a new one (offset %v, time %v)", ev.Off, ev.Ts)
-			}
-			p.evScan = ev
-		case EvGCScanDone:
-			if p.evScan == nil {
-				return fmt.Errorf("bogus scanning end (offset %v, time %v)", ev.Off, ev.Ts)
-			}
-			p.evScan.Link = ev
-			p.evScan = nil
-		case EvGCSweepStart:
-			if p.evSweep != nil {
-				return fmt.Errorf("previous sweeping is not ended before a new one (offset %v, time %v)", ev.Off, ev.Ts)
-			}
-			p.evSweep = ev
-		case EvGCSweepDone:
-			if p.evSweep == nil {
-				return fmt.Errorf("bogus sweeping end (offset %v, time %v)", ev.Off, ev.Ts)
-			}
-			p.evSweep.Link = ev
-			p.evSweep = nil
-		case EvGoWaiting:
-			g1 := gs[ev.Args[0]]
-			if g1.state != gRunnable {
-				return fmt.Errorf("g %v is not runnable before EvGoWaiting (offset %v, time %v)", ev.Args[0], ev.Off, ev.Ts)
-			}
-			g1.state = gWaiting
-			gs[ev.Args[0]] = g1
-		case EvGoInSyscall:
-			g1 := gs[ev.Args[0]]
-			if g1.state != gRunnable {
-				return fmt.Errorf("g %v is not runnable before EvGoInSyscall (offset %v, time %v)", ev.Args[0], ev.Off, ev.Ts)
-			}
-			g1.state = gWaiting
-			gs[ev.Args[0]] = g1
-		case EvGoCreate:
-			if err := checkRunning(p, g, ev, true); err != nil {
-				return err
-			}
-			if _, ok := gs[ev.Args[0]]; ok {
-				return fmt.Errorf("g %v already exists (offset %v, time %v)", ev.Args[0], ev.Off, ev.Ts)
-			}
-			gs[ev.Args[0]] = gdesc{state: gRunnable, ev: ev, evCreate: ev}
-		case EvGoStart:
-			if g.state != gRunnable {
-				return fmt.Errorf("g %v is not runnable before start (offset %v, time %v)", ev.G, ev.Off, ev.Ts)
-			}
-			if p.g != 0 {
-				return fmt.Errorf("p %v is already running g %v while start g %v (offset %v, time %v)", ev.P, p.g, ev.G, ev.Off, ev.Ts)
-			}
-			g.state = gRunning
-			g.evStart = ev
-			p.g = ev.G
-			if g.evCreate != nil {
-				// +1 because symbolizer expects return pc.
-				ev.Stk = []*Frame{&Frame{PC: g.evCreate.Args[1] + 1}}
-				g.evCreate = nil
-			}
-
-			if g.ev != nil {
-				g.ev.Link = ev
-				g.ev = nil
-			}
-		case EvGoEnd, EvGoStop:
-			if err := checkRunning(p, g, ev, false); err != nil {
-				return err
-			}
-			g.evStart.Link = ev
-			g.evStart = nil
-			g.state = gDead
-			p.g = 0
-		case EvGoSched, EvGoPreempt:
-			if err := checkRunning(p, g, ev, false); err != nil {
-				return err
-			}
-			g.state = gRunnable
-			g.evStart.Link = ev
-			g.evStart = nil
-			p.g = 0
-			g.ev = ev
-		case EvGoUnblock:
-			if g.state != gRunning {
-				return fmt.Errorf("g %v is not running while unpark (offset %v, time %v)", ev.G, ev.Off, ev.Ts)
-			}
-			if ev.P != TimerP && p.g != ev.G {
-				return fmt.Errorf("p %v is not running g %v while unpark (offset %v, time %v)", ev.P, ev.G, ev.Off, ev.Ts)
-			}
-			g1 := gs[ev.Args[0]]
-			if g1.state != gWaiting {
-				return fmt.Errorf("g %v is not waiting before unpark (offset %v, time %v)", ev.Args[0], ev.Off, ev.Ts)
-			}
-			if g1.ev != nil && g1.ev.Type == EvGoBlockNet && ev.P != TimerP {
-				ev.P = NetpollP
-			}
-			if g1.ev != nil {
-				g1.ev.Link = ev
-			}
-			g1.state = gRunnable
-			g1.ev = ev
-			gs[ev.Args[0]] = g1
-		case EvGoSysCall:
-			if err := checkRunning(p, g, ev, false); err != nil {
-				return err
-			}
-			g.ev = ev
-		case EvGoSysBlock:
-			if err := checkRunning(p, g, ev, false); err != nil {
-				return err
-			}
-			g.state = gWaiting
-			g.evStart.Link = ev
-			g.evStart = nil
-			p.g = 0
-		case EvGoSysExit:
-			if g.state != gWaiting {
-				return fmt.Errorf("g %v is not waiting during syscall exit (offset %v, time %v)", ev.G, ev.Off, ev.Ts)
-			}
-			if g.ev != nil && g.ev.Type == EvGoSysCall {
-				g.ev.Link = ev
-			}
-			g.state = gRunnable
-			g.ev = ev
-		case EvGoSleep, EvGoBlock, EvGoBlockSend, EvGoBlockRecv,
-			EvGoBlockSelect, EvGoBlockSync, EvGoBlockCond, EvGoBlockNet:
-			if err := checkRunning(p, g, ev, false); err != nil {
-				return err
-			}
-			g.state = gWaiting
-			g.ev = ev
-			g.evStart.Link = ev
-			g.evStart = nil
-			p.g = 0
-		}
-
-		gs[ev.G] = g
-		ps[ev.P] = p
-	}
-
-	// TODO(dvyukov): restore stacks for EvGoStart events.
-	// TODO(dvyukov): test that all EvGoStart events has non-nil Link.
-
-	// Last, after all the other consistency checks,
-	// make sure time stamps respect sequence numbers.
-	// The tests will skip (not fail) the test case if they see this error,
-	// so check everything else that could possibly be wrong first.
-	lastTs := int64(0)
-	for _, ev := range events {
-		if ev.Ts < lastTs {
-			return ErrTimeOrder
-		}
-		lastTs = ev.Ts
-	}
-
-	return nil
-}
-
-// symbolizeTrace attaches func/file/line info to stack traces.
-func Symbolize(events []*Event, bin string) error {
-	// First, collect and dedup all pcs.
-	pcs := make(map[uint64]*Frame)
-	for _, ev := range events {
-		for _, f := range ev.Stk {
-			pcs[f.PC] = nil
-		}
-	}
-
-	// Start addr2line.
-	cmd := exec.Command("go", "tool", "addr2line", bin)
-	in, err := cmd.StdinPipe()
-	if err != nil {
-		return fmt.Errorf("failed to pipe addr2line stdin: %v", err)
-	}
-	cmd.Stderr = os.Stderr
-	out, err := cmd.StdoutPipe()
-	if err != nil {
-		return fmt.Errorf("failed to pipe addr2line stdout: %v", err)
-	}
-	err = cmd.Start()
-	if err != nil {
-		return fmt.Errorf("failed to start addr2line: %v", err)
-	}
-	outb := bufio.NewReader(out)
-
-	// Write all pcs to addr2line.
-	// Need to copy pcs to an array, because map iteration order is non-deterministic.
-	var pcArray []uint64
-	for pc := range pcs {
-		pcArray = append(pcArray, pc)
-		_, err := fmt.Fprintf(in, "0x%x\n", pc-1)
-		if err != nil {
-			return fmt.Errorf("failed to write to addr2line: %v", err)
-		}
-	}
-	in.Close()
-
-	// Read in answers.
-	for _, pc := range pcArray {
-		fn, err := outb.ReadString('\n')
-		if err != nil {
-			return fmt.Errorf("failed to read from addr2line: %v", err)
-		}
-		file, err := outb.ReadString('\n')
-		if err != nil {
-			return fmt.Errorf("failed to read from addr2line: %v", err)
-		}
-		f := &Frame{PC: pc}
-		f.Fn = fn[:len(fn)-1]
-		f.File = file[:len(file)-1]
-		if colon := strings.LastIndex(f.File, ":"); colon != -1 {
-			ln, err := strconv.Atoi(f.File[colon+1:])
-			if err == nil {
-				f.File = f.File[:colon]
-				f.Line = ln
-			}
-		}
-		pcs[pc] = f
-	}
-	cmd.Wait()
-
-	// Replace frames in events array.
-	for _, ev := range events {
-		for i, f := range ev.Stk {
-			ev.Stk[i] = pcs[f.PC]
-		}
-	}
-
-	return nil
-}
-
-// readVal reads unsigned base-128 value from r.
-func readVal(r io.Reader, off0 int) (v uint64, off int, err error) {
-	off = off0
-	for i := 0; i < 10; i++ {
-		var buf [1]byte
-		var n int
-		n, err = r.Read(buf[:])
-		if err != nil || n != 1 {
-			return 0, 0, fmt.Errorf("failed to read trace at offset %d: read %v, error %v", off0, n, err)
-		}
-		off++
-		v |= uint64(buf[0]&0x7f) << (uint(i) * 7)
-		if buf[0]&0x80 == 0 {
-			return
-		}
-	}
-	return 0, 0, fmt.Errorf("bad value at offset 0x%x", off0)
-}
-
-type eventList []*Event
-
-func (l eventList) Len() int {
-	return len(l)
-}
-
-func (l eventList) Less(i, j int) bool {
-	return l[i].Seq < l[j].Seq
-}
-
-func (l eventList) Swap(i, j int) {
-	l[i], l[j] = l[j], l[i]
-}
-
-// Print dumps events to stdout. For debugging.
-func Print(events []*Event) {
-	for _, ev := range events {
-		desc := EventDescriptions[ev.Type]
-		fmt.Printf("%v %v p=%v g=%v off=%v", ev.Ts, desc.Name, ev.P, ev.G, ev.Off)
-		for i, a := range desc.Args {
-			fmt.Printf(" %v=%v", a, ev.Args[i])
-		}
-		fmt.Printf("\n")
-	}
-}
-
-// Event types in the trace.
-// Verbatim copy from src/runtime/trace.go.
-const (
-	EvNone           = 0  // unused
-	EvBatch          = 1  // start of per-P batch of events [pid, timestamp]
-	EvFrequency      = 2  // contains tracer timer frequency [frequency (ticks per second)]
-	EvStack          = 3  // stack [stack id, number of PCs, array of PCs]
-	EvGomaxprocs     = 4  // current value of GOMAXPROCS [timestamp, GOMAXPROCS, stack id]
-	EvProcStart      = 5  // start of P [timestamp, thread id]
-	EvProcStop       = 6  // stop of P [timestamp]
-	EvGCStart        = 7  // GC start [timestamp, stack id]
-	EvGCDone         = 8  // GC done [timestamp]
-	EvGCScanStart    = 9  // GC scan start [timestamp]
-	EvGCScanDone     = 10 // GC scan done [timestamp]
-	EvGCSweepStart   = 11 // GC sweep start [timestamp, stack id]
-	EvGCSweepDone    = 12 // GC sweep done [timestamp]
-	EvGoCreate       = 13 // goroutine creation [timestamp, new goroutine id, start PC, stack id]
-	EvGoStart        = 14 // goroutine starts running [timestamp, goroutine id]
-	EvGoEnd          = 15 // goroutine ends [timestamp]
-	EvGoStop         = 16 // goroutine stops (like in select{}) [timestamp, stack]
-	EvGoSched        = 17 // goroutine calls Gosched [timestamp, stack]
-	EvGoPreempt      = 18 // goroutine is preempted [timestamp, stack]
-	EvGoSleep        = 19 // goroutine calls Sleep [timestamp, stack]
-	EvGoBlock        = 20 // goroutine blocks [timestamp, stack]
-	EvGoUnblock      = 21 // goroutine is unblocked [timestamp, goroutine id, stack]
-	EvGoBlockSend    = 22 // goroutine blocks on chan send [timestamp, stack]
-	EvGoBlockRecv    = 23 // goroutine blocks on chan recv [timestamp, stack]
-	EvGoBlockSelect  = 24 // goroutine blocks on select [timestamp, stack]
-	EvGoBlockSync    = 25 // goroutine blocks on Mutex/RWMutex [timestamp, stack]
-	EvGoBlockCond    = 26 // goroutine blocks on Cond [timestamp, stack]
-	EvGoBlockNet     = 27 // goroutine blocks on network [timestamp, stack]
-	EvGoSysCall      = 28 // syscall enter [timestamp, stack]
-	EvGoSysExit      = 29 // syscall exit [timestamp, goroutine id, real timestamp]
-	EvGoSysBlock     = 30 // syscall blocks [timestamp]
-	EvGoWaiting      = 31 // denotes that goroutine is blocked when tracing starts [goroutine id]
-	EvGoInSyscall    = 32 // denotes that goroutine is in syscall when tracing starts [goroutine id]
-	EvHeapAlloc      = 33 // memstats.heap_alloc change [timestamp, heap_alloc]
-	EvNextGC         = 34 // memstats.next_gc change [timestamp, next_gc]
-	EvTimerGoroutine = 35 // denotes timer goroutine [timer goroutine id]
-	EvFutileWakeup   = 36 // denotes that the previous wakeup of this goroutine was futile [timestamp]
-	EvCount          = 37
-)
-
-var EventDescriptions = [EvCount]struct {
-	Name  string
-	Stack bool
-	Args  []string
-}{
-	EvNone:           {"None", false, []string{}},
-	EvBatch:          {"Batch", false, []string{"p", "seq", "ticks"}},
-	EvFrequency:      {"Frequency", false, []string{"freq", "unused"}},
-	EvStack:          {"Stack", false, []string{"id", "siz"}},
-	EvGomaxprocs:     {"Gomaxprocs", true, []string{"procs"}},
-	EvProcStart:      {"ProcStart", false, []string{"thread"}},
-	EvProcStop:       {"ProcStop", false, []string{}},
-	EvGCStart:        {"GCStart", true, []string{}},
-	EvGCDone:         {"GCDone", false, []string{}},
-	EvGCScanStart:    {"GCScanStart", false, []string{}},
-	EvGCScanDone:     {"GCScanDone", false, []string{}},
-	EvGCSweepStart:   {"GCSweepStart", true, []string{}},
-	EvGCSweepDone:    {"GCSweepDone", false, []string{}},
-	EvGoCreate:       {"GoCreate", true, []string{"g", "pc"}},
-	EvGoStart:        {"GoStart", false, []string{"g"}},
-	EvGoEnd:          {"GoEnd", false, []string{}},
-	EvGoStop:         {"GoStop", true, []string{}},
-	EvGoSched:        {"GoSched", true, []string{}},
-	EvGoPreempt:      {"GoPreempt", true, []string{}},
-	EvGoSleep:        {"GoSleep", true, []string{}},
-	EvGoBlock:        {"GoBlock", true, []string{}},
-	EvGoUnblock:      {"GoUnblock", true, []string{"g"}},
-	EvGoBlockSend:    {"GoBlockSend", true, []string{}},
-	EvGoBlockRecv:    {"GoBlockRecv", true, []string{}},
-	EvGoBlockSelect:  {"GoBlockSelect", true, []string{}},
-	EvGoBlockSync:    {"GoBlockSync", true, []string{}},
-	EvGoBlockCond:    {"GoBlockCond", true, []string{}},
-	EvGoBlockNet:     {"GoBlockNet", true, []string{}},
-	EvGoSysCall:      {"GoSysCall", true, []string{}},
-	EvGoSysExit:      {"GoSysExit", false, []string{"g", "seq", "ts"}},
-	EvGoSysBlock:     {"GoSysBlock", false, []string{}},
-	EvGoWaiting:      {"GoWaiting", false, []string{"g"}},
-	EvGoInSyscall:    {"GoInSyscall", false, []string{"g"}},
-	EvHeapAlloc:      {"HeapAlloc", false, []string{"mem"}},
-	EvNextGC:         {"NextGC", false, []string{"mem"}},
-	EvTimerGoroutine: {"TimerGoroutine", false, []string{"g", "unused"}},
-	EvFutileWakeup:   {"FutileWakeup", false, []string{}},
-}
diff --git a/src/internal/trace/parser_test.go b/src/internal/trace/parser_test.go
deleted file mode 100644
index 0eeb3e6..0000000
--- a/src/internal/trace/parser_test.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package trace
-
-import (
-	"strings"
-	"testing"
-)
-
-func TestCorruptedInputs(t *testing.T) {
-	// These inputs crashed parser previously.
-	tests := []string{
-		"gotrace\x00\x020",
-		"gotrace\x00Q00\x020",
-		"gotrace\x00T00\x020",
-		"gotrace\x00\xc3\x0200",
-		"go 1.5 trace\x00\x00\x00\x00\x020",
-		"go 1.5 trace\x00\x00\x00\x00Q00\x020",
-		"go 1.5 trace\x00\x00\x00\x00T00\x020",
-		"go 1.5 trace\x00\x00\x00\x00\xc3\x0200",
-	}
-	for _, data := range tests {
-		events, err := Parse(strings.NewReader(data))
-		if err == nil || events != nil {
-			t.Fatalf("no error on input: %q\n", t)
-		}
-	}
-}
diff --git a/src/iostest.bash b/src/iostest.bash
deleted file mode 100755
index 5e09894..0000000
--- a/src/iostest.bash
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2015 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# For testing darwin/arm{,64} on iOS.
-
-set -e
-ulimit -c 0 # no core files
-
-if [ ! -f make.bash ]; then
-	echo 'iostest.bash must be run from $GOROOT/src' 1>&2
-	exit 1
-fi
-
-if [ -z $GOOS ]; then
-	export GOOS=darwin
-fi
-if [ "$GOOS" != "darwin" ]; then
-	echo "iostest.bash requires GOOS=darwin, got GOOS=$GOOS" 1>&2
-	exit 1
-fi
-if [ "$GOARCH" != "arm" ] && [ "$GOARCH" != "arm64" ]; then
-	echo "iostest.bash requires GOARCH=arm or GOARCH=arm64, got GOARCH=$GOARCH" 1>&2
-	exit 1
-fi
-if [ "$GOARCH" == "arm" ]; then
-	export GOARM=7
-fi
-
-if [ "$1" == "-restart" ]; then
-	# Reboot to make sure previous runs do not interfere with the current run.
-	# It is reasonably easy for a bad program leave an iOS device in an
-	# almost unusable state.
-	idevicediagnostics restart
-	# Initial sleep to make sure we are restarting before we start polling.
-	sleep 30
-	# Poll until the device has restarted.
-	until idevicediagnostics diagnostics; do
-		# TODO(crawshaw): replace with a test app using go_darwin_arm_exec.
-		echo "waiting for idevice to come online"
-		sleep 10
-	done
-	# Diagnostics are reported during boot before the device can start an
-	# app. Wait a little longer before trying to use the device.
-	sleep 30
-fi
-
-unset GOBIN
-export GOROOT=$(dirname $(pwd))
-export PATH=$GOROOT/bin:$PATH
-export CGO_ENABLED=1
-export CC_FOR_TARGET=$GOROOT/misc/ios/clangwrap.sh
-
-# Run the build for the host bootstrap, so we can build go_darwin_arm_exec.
-# Also lets us fail early before the (slow) ios-deploy if the build is broken.
-./make.bash
-
-GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH go build \
-	-o ../bin/go_darwin_${GOARCH}_exec \
-	../misc/ios/go_darwin_arm_exec.go
-
-if [ "$GOIOS_DEV_ID" == "" ]; then
-	echo "detecting iOS development identity"
-	eval $(GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH go run ../misc/ios/detect.go)
-fi
-
-# Run standard build and tests.
-./all.bash --no-clean
diff --git a/src/log/syslog/doc.go b/src/log/syslog/doc.go
deleted file mode 100644
index 54e76ed..0000000
--- a/src/log/syslog/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package syslog provides a simple interface to the system log
-// service. It can send messages to the syslog daemon using UNIX
-// domain sockets, UDP or TCP.
-//
-// Only one call to Dial is necessary. On write failures,
-// the syslog client will attempt to reconnect to the server
-// and write again.
-package syslog
-
-// BUG(brainman): This package is not implemented on Windows yet.
-
-// BUG(akumar): This package is not implemented on Plan 9 yet.
-
-// BUG(minux): This package is not implemented on NaCl (Native Client) yet.
diff --git a/src/math/abs_arm64.s b/src/math/abs_arm64.s
deleted file mode 100644
index d8f9382..0000000
--- a/src/math/abs_arm64.s
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2011 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-
-TEXT ·Abs(SB),NOSPLIT,$0-16
-	FMOVD	x+0(FP), F3
-	FABSD	F3, F3
-	FMOVD	F3, ret+8(FP)
-	RET
diff --git a/src/math/abs_ppc64x.s b/src/math/abs_ppc64x.s
deleted file mode 100644
index 06effb4..0000000
--- a/src/math/abs_ppc64x.s
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2011 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ppc64 ppc64le
-
-#include "textflag.h"
-
-TEXT ·Abs(SB),NOSPLIT,$0-16
-	MOVD	x+0(FP), R3
-	MOVD 	$((1<<63)-1), R4
-	AND	R4, R3
-	MOVD	R3, ret+8(FP)
-	RET
diff --git a/src/math/big/accuracy_string.go b/src/math/big/accuracy_string.go
deleted file mode 100644
index 24ef7f1..0000000
--- a/src/math/big/accuracy_string.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// generated by stringer -type=Accuracy; DO NOT EDIT
-
-package big
-
-import "fmt"
-
-const _Accuracy_name = "BelowExactAbove"
-
-var _Accuracy_index = [...]uint8{0, 5, 10, 15}
-
-func (i Accuracy) String() string {
-	i -= -1
-	if i < 0 || i+1 >= Accuracy(len(_Accuracy_index)) {
-		return fmt.Sprintf("Accuracy(%d)", i+-1)
-	}
-	return _Accuracy_name[_Accuracy_index[i]:_Accuracy_index[i+1]]
-}
diff --git a/src/math/big/arith_arm64.s b/src/math/big/arith_arm64.s
deleted file mode 100644
index 24a717c..0000000
--- a/src/math/big/arith_arm64.s
+++ /dev/null
@@ -1,177 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !math_big_pure_go
-
-#include "textflag.h"
-
-// This file provides fast assembly versions for the elementary
-// arithmetic operations on vectors implemented in arith.go.
-
-// TODO: Consider re-implementing using Advanced SIMD
-// once the assembler supports those instructions.
-
-// func mulWW(x, y Word) (z1, z0 Word)
-TEXT ·mulWW(SB),NOSPLIT,$0
-	MOVD	x+0(FP), R0
-	MOVD	y+8(FP), R1
-	MUL	R0, R1, R2
-	UMULH	R0, R1, R3
-	MOVD	R3, z1+16(FP)
-	MOVD	R2, z0+24(FP)
-	RET
-
-
-// func divWW(x1, x0, y Word) (q, r Word)
-TEXT ·divWW(SB),NOSPLIT,$0
-	B	·divWW_g(SB) // ARM64 has no multiword division
-
-
-// func addVV(z, x, y []Word) (c Word)
-TEXT ·addVV(SB),NOSPLIT,$0
-	MOVD	z+0(FP), R3
-	MOVD	z_len+8(FP), R0
-	MOVD	x+24(FP), R1
-	MOVD	y+48(FP), R2
-	ADDS	$0, R0 // clear carry flag
-loop:
-	CBZ	R0, done // careful not to touch the carry flag
-	MOVD.P	8(R1), R4
-	MOVD.P	8(R2), R5
-	ADCS	R4, R5
-	MOVD.P	R5, 8(R3)
-	SUB	$1, R0
-	B	loop
-done:
-	CSET	HS, R0 // extract carry flag
-	MOVD	R0, c+72(FP)
-	RET
-
-
-// func subVV(z, x, y []Word) (c Word)
-TEXT ·subVV(SB),NOSPLIT,$0
-	MOVD	z+0(FP), R3
-	MOVD	z_len+8(FP), R0
-	MOVD	x+24(FP), R1
-	MOVD	y+48(FP), R2
-	CMP	R0, R0 // set carry flag
-loop:
-	CBZ	R0, done // careful not to touch the carry flag
-	MOVD.P	8(R1), R4
-	MOVD.P	8(R2), R5
-	SBCS	R5, R4
-	MOVD.P	R4, 8(R3)
-	SUB	$1, R0
-	B	loop
-done:
-	CSET	LO, R0 // extract carry flag
-	MOVD	R0, c+72(FP)
-	RET
-
-
-// func addVW(z, x []Word, y Word) (c Word)
-TEXT ·addVW(SB),NOSPLIT,$0
-	MOVD	z+0(FP), R3
-	MOVD	z_len+8(FP), R0
-	MOVD	x+24(FP), R1
-	MOVD	y+48(FP), R2
-	CBZ	R0, return_y
-	MOVD.P	8(R1), R4
-	ADDS	R2, R4
-	MOVD.P	R4, 8(R3)
-	SUB	$1, R0
-loop:
-	CBZ	R0, done // careful not to touch the carry flag
-	MOVD.P	8(R1), R4
-	ADCS	$0, R4
-	MOVD.P	R4, 8(R3)
-	SUB	$1, R0
-	B	loop
-done:
-	CSET	HS, R0 // extract carry flag
-	MOVD	R0, c+56(FP)
-	RET
-return_y: // z is empty; copy y to c
-	MOVD	R2, c+56(FP)
-	RET
-
-
-// func subVW(z, x []Word, y Word) (c Word)
-TEXT ·subVW(SB),NOSPLIT,$0
-	MOVD	z+0(FP), R3
-	MOVD	z_len+8(FP), R0
-	MOVD	x+24(FP), R1
-	MOVD	y+48(FP), R2
-	CBZ	R0, rety
-	MOVD.P	8(R1), R4
-	SUBS	R2, R4
-	MOVD.P	R4, 8(R3)
-	SUB	$1, R0
-loop:
-	CBZ	R0, done // careful not to touch the carry flag
-	MOVD.P	8(R1), R4
-	SBCS	$0, R4
-	MOVD.P	R4, 8(R3)
-	SUB	$1, R0
-	B	loop
-done:
-	CSET	LO, R0 // extract carry flag
-	MOVD	R0, c+56(FP)
-	RET
-rety: // z is empty; copy y to c
-	MOVD	R2, c+56(FP)
-	RET
-
-
-// func shlVU(z, x []Word, s uint) (c Word)
-TEXT ·shlVU(SB),NOSPLIT,$0
-	B ·shlVU_g(SB)
-
-
-// func shrVU(z, x []Word, s uint) (c Word)
-TEXT ·shrVU(SB),NOSPLIT,$0
-	B ·shrVU_g(SB)
-
-
-// func mulAddVWW(z, x []Word, y, r Word) (c Word)
-TEXT ·mulAddVWW(SB),NOSPLIT,$0
-	MOVD	z+0(FP), R1
-	MOVD	z_len+8(FP), R0
-	MOVD	x+24(FP), R2
-	MOVD	y+48(FP), R3
-	MOVD	r+56(FP), R4
-loop:
-	CBZ	R0, done
-	MOVD.P	8(R2), R5
-	UMULH	R5, R3, R7
-	MUL	R5, R3, R6
-	ADDS	R4, R6
-	ADC	$0, R7
-	MOVD.P	R6, 8(R1)
-	MOVD	R7, R4
-	SUB	$1, R0
-	B	loop
-done:
-	MOVD	R4, c+64(FP)
-	RET
-
-
-// func addMulVVW(z, x []Word, y Word) (c Word)
-TEXT ·addMulVVW(SB),NOSPLIT,$0
-	B ·addMulVVW_g(SB)
-
-
-// func divWVW(z []Word, xn Word, x []Word, y Word) (r Word)
-TEXT ·divWVW(SB),NOSPLIT,$0
-	B ·divWVW_g(SB)
-
-
-// func bitLen(x Word) (n int)
-TEXT ·bitLen(SB),NOSPLIT,$0
-	MOVD	x+0(FP), R0
-	CLZ	R0, R0
-	MOVD	$64, R1
-	SUB	R0, R1, R0
-	MOVD	R0, n+8(FP)
-	RET
diff --git a/src/math/big/arith_decl_pure.go b/src/math/big/arith_decl_pure.go
deleted file mode 100644
index e760a38..0000000
--- a/src/math/big/arith_decl_pure.go
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build math_big_pure_go
-
-package big
-
-func mulWW(x, y Word) (z1, z0 Word) {
-	return mulWW_g(x, y)
-}
-
-func divWW(x1, x0, y Word) (q, r Word) {
-	return divWW_g(x1, x0, y)
-}
-
-func addVV(z, x, y []Word) (c Word) {
-	return addVV_g(z, x, y)
-}
-
-func subVV(z, x, y []Word) (c Word) {
-	return subVV_g(z, x, y)
-}
-
-func addVW(z, x []Word, y Word) (c Word) {
-	return addVW_g(z, x, y)
-}
-
-func subVW(z, x []Word, y Word) (c Word) {
-	return subVW_g(z, x, y)
-}
-
-func shlVU(z, x []Word, s uint) (c Word) {
-	return shlVU_g(z, x, s)
-}
-
-func shrVU(z, x []Word, s uint) (c Word) {
-	return shrVU_g(z, x, s)
-}
-
-func mulAddVWW(z, x []Word, y, r Word) (c Word) {
-	return mulAddVWW_g(z, x, y, r)
-}
-
-func addMulVVW(z, x []Word, y Word) (c Word) {
-	return addMulVVW_g(z, x, y)
-}
-
-func divWVW(z []Word, xn Word, x []Word, y Word) (r Word) {
-	return divWVW_g(z, xn, x, y)
-}
-
-func bitLen(x Word) (n int) {
-	return bitLen_g(x)
-}
diff --git a/src/math/big/arith_ppc64x.s b/src/math/big/arith_ppc64x.s
deleted file mode 100644
index d4d4171..0000000
--- a/src/math/big/arith_ppc64x.s
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !math_big_pure_go,ppc64 !math_big_pure_go,ppc64le
-
-#include "textflag.h"
-
-// This file provides fast assembly versions for the elementary
-// arithmetic operations on vectors implemented in arith.go.
-
-TEXT ·mulWW(SB),NOSPLIT,$0
-	BR ·mulWW_g(SB)
-
-TEXT ·divWW(SB),NOSPLIT,$0
-	BR ·divWW_g(SB)
-
-TEXT ·addVV(SB),NOSPLIT,$0
-	BR ·addVV_g(SB)
-
-TEXT ·subVV(SB),NOSPLIT,$0
-	BR ·subVV_g(SB)
-
-TEXT ·addVW(SB),NOSPLIT,$0
-	BR ·addVW_g(SB)
-
-TEXT ·subVW(SB),NOSPLIT,$0
-	BR ·subVW_g(SB)
-
-TEXT ·shlVU(SB),NOSPLIT,$0
-	BR ·shlVU_g(SB)
-
-TEXT ·shrVU(SB),NOSPLIT,$0
-	BR ·shrVU_g(SB)
-
-TEXT ·mulAddVWW(SB),NOSPLIT,$0
-	BR ·mulAddVWW_g(SB)
-
-TEXT ·addMulVVW(SB),NOSPLIT,$0
-	BR ·addMulVVW_g(SB)
-
-TEXT ·divWVW(SB),NOSPLIT,$0
-	BR ·divWVW_g(SB)
-
-TEXT ·bitLen(SB),NOSPLIT,$0
-	BR ·bitLen_g(SB)
diff --git a/src/math/big/bits_test.go b/src/math/big/bits_test.go
deleted file mode 100644
index 985b60b..0000000
--- a/src/math/big/bits_test.go
+++ /dev/null
@@ -1,224 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements the Bits type used for testing Float operations
-// via an independent (albeit slower) representations for floating-point
-// numbers.
-
-package big
-
-import (
-	"fmt"
-	"sort"
-	"testing"
-)
-
-// A Bits value b represents a finite floating-point number x of the form
-//
-//	x = 2**b[0] + 2**b[1] + ... 2**b[len(b)-1]
-//
-// The order of slice elements is not significant. Negative elements may be
-// used to form fractions. A Bits value is normalized if each b[i] occurs at
-// most once. For instance Bits{0, 0, 1} is not normalized but represents the
-// same floating-point number as Bits{2}, which is normalized. The zero (nil)
-// value of Bits is a ready to use Bits value and represents the value 0.
-type Bits []int
-
-func (x Bits) add(y Bits) Bits {
-	return append(x, y...)
-}
-
-func (x Bits) mul(y Bits) Bits {
-	var p Bits
-	for _, x := range x {
-		for _, y := range y {
-			p = append(p, x+y)
-		}
-	}
-	return p
-}
-
-func TestMulBits(t *testing.T) {
-	for _, test := range []struct {
-		x, y, want Bits
-	}{
-		{nil, nil, nil},
-		{Bits{}, Bits{}, nil},
-		{Bits{0}, Bits{0}, Bits{0}},
-		{Bits{0}, Bits{1}, Bits{1}},
-		{Bits{1}, Bits{1, 2, 3}, Bits{2, 3, 4}},
-		{Bits{-1}, Bits{1}, Bits{0}},
-		{Bits{-10, -1, 0, 1, 10}, Bits{1, 2, 3}, Bits{-9, -8, -7, 0, 1, 2, 1, 2, 3, 2, 3, 4, 11, 12, 13}},
-	} {
-		got := fmt.Sprintf("%v", test.x.mul(test.y))
-		want := fmt.Sprintf("%v", test.want)
-		if got != want {
-			t.Errorf("%v * %v = %s; want %s", test.x, test.y, got, want)
-		}
-
-	}
-}
-
-// norm returns the normalized bits for x: It removes multiple equal entries
-// by treating them as an addition (e.g., Bits{5, 5} => Bits{6}), and it sorts
-// the result list for reproducible results.
-func (x Bits) norm() Bits {
-	m := make(map[int]bool)
-	for _, b := range x {
-		for m[b] {
-			m[b] = false
-			b++
-		}
-		m[b] = true
-	}
-	var z Bits
-	for b, set := range m {
-		if set {
-			z = append(z, b)
-		}
-	}
-	sort.Ints([]int(z))
-	return z
-}
-
-func TestNormBits(t *testing.T) {
-	for _, test := range []struct {
-		x, want Bits
-	}{
-		{nil, nil},
-		{Bits{}, Bits{}},
-		{Bits{0}, Bits{0}},
-		{Bits{0, 0}, Bits{1}},
-		{Bits{3, 1, 1}, Bits{2, 3}},
-		{Bits{10, 9, 8, 7, 6, 6}, Bits{11}},
-	} {
-		got := fmt.Sprintf("%v", test.x.norm())
-		want := fmt.Sprintf("%v", test.want)
-		if got != want {
-			t.Errorf("normBits(%v) = %s; want %s", test.x, got, want)
-		}
-
-	}
-}
-
-// round returns the Float value corresponding to x after rounding x
-// to prec bits according to mode.
-func (x Bits) round(prec uint, mode RoundingMode) *Float {
-	x = x.norm()
-
-	// determine range
-	var min, max int
-	for i, b := range x {
-		if i == 0 || b < min {
-			min = b
-		}
-		if i == 0 || b > max {
-			max = b
-		}
-	}
-	prec0 := uint(max + 1 - min)
-	if prec >= prec0 {
-		return x.Float()
-	}
-	// prec < prec0
-
-	// determine bit 0, rounding, and sticky bit, and result bits z
-	var bit0, rbit, sbit uint
-	var z Bits
-	r := max - int(prec)
-	for _, b := range x {
-		switch {
-		case b == r:
-			rbit = 1
-		case b < r:
-			sbit = 1
-		default:
-			// b > r
-			if b == r+1 {
-				bit0 = 1
-			}
-			z = append(z, b)
-		}
-	}
-
-	// round
-	f := z.Float() // rounded to zero
-	if mode == ToNearestAway {
-		panic("not yet implemented")
-	}
-	if mode == ToNearestEven && rbit == 1 && (sbit == 1 || sbit == 0 && bit0 != 0) || mode == AwayFromZero {
-		// round away from zero
-		f.SetMode(ToZero).SetPrec(prec)
-		f.Add(f, Bits{int(r) + 1}.Float())
-	}
-	return f
-}
-
-// Float returns the *Float z of the smallest possible precision such that
-// z = sum(2**bits[i]), with i = range bits. If multiple bits[i] are equal,
-// they are added: Bits{0, 1, 0}.Float() == 2**0 + 2**1 + 2**0 = 4.
-func (bits Bits) Float() *Float {
-	// handle 0
-	if len(bits) == 0 {
-		return new(Float)
-	}
-	// len(bits) > 0
-
-	// determine lsb exponent
-	var min int
-	for i, b := range bits {
-		if i == 0 || b < min {
-			min = b
-		}
-	}
-
-	// create bit pattern
-	x := NewInt(0)
-	for _, b := range bits {
-		badj := b - min
-		// propagate carry if necessary
-		for x.Bit(badj) != 0 {
-			x.SetBit(x, badj, 0)
-			badj++
-		}
-		x.SetBit(x, badj, 1)
-	}
-
-	// create corresponding float
-	z := new(Float).SetInt(x) // normalized
-	if e := int64(z.exp) + int64(min); MinExp <= e && e <= MaxExp {
-		z.exp = int32(e)
-	} else {
-		// this should never happen for our test cases
-		panic("exponent out of range")
-	}
-	return z
-}
-
-func TestFromBits(t *testing.T) {
-	for _, test := range []struct {
-		bits Bits
-		want string
-	}{
-		// all different bit numbers
-		{nil, "0"},
-		{Bits{0}, "0x.8p+1"},
-		{Bits{1}, "0x.8p+2"},
-		{Bits{-1}, "0x.8p+0"},
-		{Bits{63}, "0x.8p+64"},
-		{Bits{33, -30}, "0x.8000000000000001p+34"},
-		{Bits{255, 0}, "0x.8000000000000000000000000000000000000000000000000000000000000001p+256"},
-
-		// multiple equal bit numbers
-		{Bits{0, 0}, "0x.8p+2"},
-		{Bits{0, 0, 0, 0}, "0x.8p+3"},
-		{Bits{0, 1, 0}, "0x.8p+3"},
-		{append(Bits{2, 1, 0} /* 7 */, Bits{3, 1} /* 10 */ ...), "0x.88p+5" /* 17 */},
-	} {
-		f := test.bits.Float()
-		if got := f.Text('p', 0); got != test.want {
-			t.Errorf("setBits(%v) = %s; want %s", test.bits, got, test.want)
-		}
-	}
-}
diff --git a/src/math/big/decimal.go b/src/math/big/decimal.go
deleted file mode 100644
index 2595e5f..0000000
--- a/src/math/big/decimal.go
+++ /dev/null
@@ -1,264 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements multi-precision decimal numbers.
-// The implementation is for float to decimal conversion only;
-// not general purpose use.
-// The only operations are precise conversion from binary to
-// decimal and rounding.
-//
-// The key observation and some code (shr) is borrowed from
-// strconv/decimal.go: conversion of binary fractional values can be done
-// precisely in multi-precision decimal because 2 divides 10 (required for
-// >> of mantissa); but conversion of decimal floating-point values cannot
-// be done precisely in binary representation.
-//
-// In contrast to strconv/decimal.go, only right shift is implemented in
-// decimal format - left shift can be done precisely in binary format.
-
-package big
-
-// A decimal represents an unsigned floating-point number in decimal representation.
-// The value of a non-zero decimal x is x.mant * 10 ** x.exp with 0.5 <= x.mant < 1,
-// with the most-significant mantissa digit at index 0. For the zero decimal, the
-// mantissa length and exponent are 0.
-// The zero value for decimal represents a ready-to-use 0.0.
-type decimal struct {
-	mant []byte // mantissa ASCII digits, big-endian
-	exp  int    // exponent
-}
-
-// Maximum shift amount that can be done in one pass without overflow.
-// A Word has _W bits and (1<<maxShift - 1)*10 + 9 must fit into Word.
-const maxShift = _W - 4
-
-// TODO(gri) Since we know the desired decimal precision when converting
-// a floating-point number, we may be able to limit the number of decimal
-// digits that need to be computed by init by providing an additional
-// precision argument and keeping track of when a number was truncated early
-// (equivalent of "sticky bit" in binary rounding).
-
-// TODO(gri) Along the same lines, enforce some limit to shift magnitudes
-// to avoid "infinitely" long running conversions (until we run out of space).
-
-// Init initializes x to the decimal representation of m << shift (for
-// shift >= 0), or m >> -shift (for shift < 0).
-func (x *decimal) init(m nat, shift int) {
-	// special case 0
-	if len(m) == 0 {
-		x.mant = x.mant[:0]
-		x.exp = 0
-		return
-	}
-
-	// Optimization: If we need to shift right, first remove any trailing
-	// zero bits from m to reduce shift amount that needs to be done in
-	// decimal format (since that is likely slower).
-	if shift < 0 {
-		ntz := m.trailingZeroBits()
-		s := uint(-shift)
-		if s >= ntz {
-			s = ntz // shift at most ntz bits
-		}
-		m = nat(nil).shr(m, s)
-		shift += int(s)
-	}
-
-	// Do any shift left in binary representation.
-	if shift > 0 {
-		m = nat(nil).shl(m, uint(shift))
-		shift = 0
-	}
-
-	// Convert mantissa into decimal representation.
-	s := m.decimalString() // TODO(gri) avoid string conversion here
-	n := len(s)
-	x.exp = n
-	// Trim trailing zeros; instead the exponent is tracking
-	// the decimal point independent of the number of digits.
-	for n > 0 && s[n-1] == '0' {
-		n--
-	}
-	x.mant = append(x.mant[:0], s[:n]...)
-
-	// Do any (remaining) shift right in decimal representation.
-	if shift < 0 {
-		for shift < -maxShift {
-			shr(x, maxShift)
-			shift += maxShift
-		}
-		shr(x, uint(-shift))
-	}
-}
-
-// Possibly optimization: The current implementation of nat.string takes
-// a charset argument. When a right shift is needed, we could provide
-// "\x00\x01...\x09" instead of "012..9" (as in nat.decimalString) and
-// avoid the repeated +'0' and -'0' operations in decimal.shr (and do a
-// single +'0' pass at the end).
-
-// shr implements x >> s, for s <= maxShift.
-func shr(x *decimal, s uint) {
-	// Division by 1<<s using shift-and-subtract algorithm.
-
-	// pick up enough leading digits to cover first shift
-	r := 0 // read index
-	var n Word
-	for n>>s == 0 && r < len(x.mant) {
-		ch := Word(x.mant[r])
-		r++
-		n = n*10 + ch - '0'
-	}
-	if n == 0 {
-		// x == 0; shouldn't get here, but handle anyway
-		x.mant = x.mant[:0]
-		return
-	}
-	for n>>s == 0 {
-		r++
-		n *= 10
-	}
-	x.exp += 1 - r
-
-	// read a digit, write a digit
-	w := 0 // write index
-	for r < len(x.mant) {
-		ch := Word(x.mant[r])
-		r++
-		d := n >> s
-		n -= d << s
-		x.mant[w] = byte(d + '0')
-		w++
-		n = n*10 + ch - '0'
-	}
-
-	// write extra digits that still fit
-	for n > 0 && w < len(x.mant) {
-		d := n >> s
-		n -= d << s
-		x.mant[w] = byte(d + '0')
-		w++
-		n = n * 10
-	}
-	x.mant = x.mant[:w] // the number may be shorter (e.g. 1024 >> 10)
-
-	// append additional digits that didn't fit
-	for n > 0 {
-		d := n >> s
-		n -= d << s
-		x.mant = append(x.mant, byte(d+'0'))
-		n = n * 10
-	}
-
-	trim(x)
-}
-
-func (x *decimal) String() string {
-	if len(x.mant) == 0 {
-		return "0"
-	}
-
-	var buf []byte
-	switch {
-	case x.exp <= 0:
-		// 0.00ddd
-		buf = append(buf, "0."...)
-		buf = appendZeros(buf, -x.exp)
-		buf = append(buf, x.mant...)
-
-	case /* 0 < */ x.exp < len(x.mant):
-		// dd.ddd
-		buf = append(buf, x.mant[:x.exp]...)
-		buf = append(buf, '.')
-		buf = append(buf, x.mant[x.exp:]...)
-
-	default: // len(x.mant) <= x.exp
-		// ddd00
-		buf = append(buf, x.mant...)
-		buf = appendZeros(buf, x.exp-len(x.mant))
-	}
-
-	return string(buf)
-}
-
-// appendZeros appends n 0 digits to buf and returns buf.
-func appendZeros(buf []byte, n int) []byte {
-	for ; n > 0; n-- {
-		buf = append(buf, '0')
-	}
-	return buf
-}
-
-// shouldRoundUp reports if x should be rounded up
-// if shortened to n digits. n must be a valid index
-// for x.mant.
-func shouldRoundUp(x *decimal, n int) bool {
-	if x.mant[n] == '5' && n+1 == len(x.mant) {
-		// exactly halfway - round to even
-		return n > 0 && (x.mant[n-1]-'0')&1 != 0
-	}
-	// not halfway - digit tells all (x.mant has no trailing zeros)
-	return x.mant[n] >= '5'
-}
-
-// round sets x to (at most) n mantissa digits by rounding it
-// to the nearest even value with n (or fever) mantissa digits.
-// If n < 0, x remains unchanged.
-func (x *decimal) round(n int) {
-	if n < 0 || n >= len(x.mant) {
-		return // nothing to do
-	}
-
-	if shouldRoundUp(x, n) {
-		x.roundUp(n)
-	} else {
-		x.roundDown(n)
-	}
-}
-
-func (x *decimal) roundUp(n int) {
-	if n < 0 || n >= len(x.mant) {
-		return // nothing to do
-	}
-	// 0 <= n < len(x.mant)
-
-	// find first digit < '9'
-	for n > 0 && x.mant[n-1] >= '9' {
-		n--
-	}
-
-	if n == 0 {
-		// all digits are '9's => round up to '1' and update exponent
-		x.mant[0] = '1' // ok since len(x.mant) > n
-		x.mant = x.mant[:1]
-		x.exp++
-		return
-	}
-
-	// n > 0 && x.mant[n-1] < '9'
-	x.mant[n-1]++
-	x.mant = x.mant[:n]
-	// x already trimmed
-}
-
-func (x *decimal) roundDown(n int) {
-	if n < 0 || n >= len(x.mant) {
-		return // nothing to do
-	}
-	x.mant = x.mant[:n]
-	trim(x)
-}
-
-// trim cuts off any trailing zeros from x's mantissa;
-// they are meaningless for the value of x.
-func trim(x *decimal) {
-	i := len(x.mant)
-	for i > 0 && x.mant[i-1] == '0' {
-		i--
-	}
-	x.mant = x.mant[:i]
-	if i == 0 {
-		x.exp = 0
-	}
-}
diff --git a/src/math/big/decimal_test.go b/src/math/big/decimal_test.go
deleted file mode 100644
index 81e022a..0000000
--- a/src/math/big/decimal_test.go
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package big
-
-import "testing"
-
-func TestDecimalString(t *testing.T) {
-	for _, test := range []struct {
-		x    decimal
-		want string
-	}{
-		{want: "0"},
-		{decimal{nil, 1000}, "0"}, // exponent of 0 is ignored
-		{decimal{[]byte("12345"), 0}, "0.12345"},
-		{decimal{[]byte("12345"), -3}, "0.00012345"},
-		{decimal{[]byte("12345"), +3}, "123.45"},
-		{decimal{[]byte("12345"), +10}, "1234500000"},
-	} {
-		if got := test.x.String(); got != test.want {
-			t.Errorf("%v == %s; want %s", test.x, got, test.want)
-		}
-	}
-}
-
-func TestDecimalInit(t *testing.T) {
-	for _, test := range []struct {
-		x     Word
-		shift int
-		want  string
-	}{
-		{0, 0, "0"},
-		{0, -100, "0"},
-		{0, 100, "0"},
-		{1, 0, "1"},
-		{1, 10, "1024"},
-		{1, 100, "1267650600228229401496703205376"},
-		{1, -100, "0.0000000000000000000000000000007888609052210118054117285652827862296732064351090230047702789306640625"},
-		{12345678, 8, "3160493568"},
-		{12345678, -8, "48225.3046875"},
-		{195312, 9, "99999744"},
-		{1953125, 9, "1000000000"},
-	} {
-		var d decimal
-		d.init(nat{test.x}.norm(), test.shift)
-		if got := d.String(); got != test.want {
-			t.Errorf("%d << %d == %s; want %s", test.x, test.shift, got, test.want)
-		}
-	}
-}
-
-func TestDecimalRounding(t *testing.T) {
-	for _, test := range []struct {
-		x              uint64
-		n              int
-		down, even, up string
-	}{
-		{0, 0, "0", "0", "0"},
-		{0, 1, "0", "0", "0"},
-
-		{1, 0, "0", "0", "10"},
-		{5, 0, "0", "0", "10"},
-		{9, 0, "0", "10", "10"},
-
-		{15, 1, "10", "20", "20"},
-		{45, 1, "40", "40", "50"},
-		{95, 1, "90", "100", "100"},
-
-		{12344999, 4, "12340000", "12340000", "12350000"},
-		{12345000, 4, "12340000", "12340000", "12350000"},
-		{12345001, 4, "12340000", "12350000", "12350000"},
-		{23454999, 4, "23450000", "23450000", "23460000"},
-		{23455000, 4, "23450000", "23460000", "23460000"},
-		{23455001, 4, "23450000", "23460000", "23460000"},
-
-		{99994999, 4, "99990000", "99990000", "100000000"},
-		{99995000, 4, "99990000", "100000000", "100000000"},
-		{99999999, 4, "99990000", "100000000", "100000000"},
-
-		{12994999, 4, "12990000", "12990000", "13000000"},
-		{12995000, 4, "12990000", "13000000", "13000000"},
-		{12999999, 4, "12990000", "13000000", "13000000"},
-	} {
-		x := nat(nil).setUint64(test.x)
-
-		var d decimal
-		d.init(x, 0)
-		d.roundDown(test.n)
-		if got := d.String(); got != test.down {
-			t.Errorf("roundDown(%d, %d) = %s; want %s", test.x, test.n, got, test.down)
-		}
-
-		d.init(x, 0)
-		d.round(test.n)
-		if got := d.String(); got != test.even {
-			t.Errorf("round(%d, %d) = %s; want %s", test.x, test.n, got, test.even)
-		}
-
-		d.init(x, 0)
-		d.roundUp(test.n)
-		if got := d.String(); got != test.up {
-			t.Errorf("roundUp(%d, %d) = %s; want %s", test.x, test.n, got, test.up)
-		}
-	}
-}
diff --git a/src/math/big/float.go b/src/math/big/float.go
deleted file mode 100644
index d7aa895..0000000
--- a/src/math/big/float.go
+++ /dev/null
@@ -1,1693 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements multi-precision floating-point numbers.
-// Like in the GNU MPFR library (http://www.mpfr.org/), operands
-// can be of mixed precision. Unlike MPFR, the rounding mode is
-// not specified with each operation, but with each operand. The
-// rounding mode of the result operand determines the rounding
-// mode of an operation. This is a from-scratch implementation.
-
-package big
-
-import (
-	"fmt"
-	"math"
-)
-
-const debugFloat = false // enable for debugging
-
-// A nonzero finite Float represents a multi-precision floating point number
-//
-//   sign × mantissa × 2**exponent
-//
-// with 0.5 <= mantissa < 1.0, and MinExp <= exponent <= MaxExp.
-// A Float may also be zero (+0, -0) or infinite (+Inf, -Inf).
-// All Floats are ordered, and the ordering of two Floats x and y
-// is defined by x.Cmp(y).
-//
-// Each Float value also has a precision, rounding mode, and accuracy.
-// The precision is the maximum number of mantissa bits available to
-// represent the value. The rounding mode specifies how a result should
-// be rounded to fit into the mantissa bits, and accuracy describes the
-// rounding error with respect to the exact result.
-//
-// Unless specified otherwise, all operations (including setters) that
-// specify a *Float variable for the result (usually via the receiver
-// with the exception of MantExp), round the numeric result according
-// to the precision and rounding mode of the result variable.
-//
-// If the provided result precision is 0 (see below), it is set to the
-// precision of the argument with the largest precision value before any
-// rounding takes place, and the rounding mode remains unchanged. Thus,
-// uninitialized Floats provided as result arguments will have their
-// precision set to a reasonable value determined by the operands and
-// their mode is the zero value for RoundingMode (ToNearestEven).
-//
-// By setting the desired precision to 24 or 53 and using matching rounding
-// mode (typically ToNearestEven), Float operations produce the same results
-// as the corresponding float32 or float64 IEEE-754 arithmetic for operands
-// that correspond to normal (i.e., not denormal) float32 or float64 numbers.
-// Exponent underflow and overflow lead to a 0 or an Infinity for different
-// values than IEEE-754 because Float exponents have a much larger range.
-//
-// The zero (uninitialized) value for a Float is ready to use and represents
-// the number +0.0 exactly, with precision 0 and rounding mode ToNearestEven.
-//
-type Float struct {
-	prec uint32
-	mode RoundingMode
-	acc  Accuracy
-	form form
-	neg  bool
-	mant nat
-	exp  int32
-}
-
-// An ErrNaN panic is raised by a Float operation that would lead to
-// a NaN under IEEE-754 rules. An ErrNaN implements the error interface.
-type ErrNaN struct {
-	msg string
-}
-
-func (err ErrNaN) Error() string {
-	return err.msg
-}
-
-// NewFloat allocates and returns a new Float set to x,
-// with precision 53 and rounding mode ToNearestEven.
-// NewFloat panics with ErrNaN if x is a NaN.
-func NewFloat(x float64) *Float {
-	if math.IsNaN(x) {
-		panic(ErrNaN{"NewFloat(NaN)"})
-	}
-	return new(Float).SetFloat64(x)
-}
-
-// Exponent and precision limits.
-const (
-	MaxExp  = math.MaxInt32  // largest supported exponent
-	MinExp  = math.MinInt32  // smallest supported exponent
-	MaxPrec = math.MaxUint32 // largest (theoretically) supported precision; likely memory-limited
-)
-
-// Internal representation: The mantissa bits x.mant of a nonzero finite
-// Float x are stored in a nat slice long enough to hold up to x.prec bits;
-// the slice may (but doesn't have to) be shorter if the mantissa contains
-// trailing 0 bits. x.mant is normalized if the msb of x.mant == 1 (i.e.,
-// the msb is shifted all the way "to the left"). Thus, if the mantissa has
-// trailing 0 bits or x.prec is not a multiple of the the Word size _W,
-// x.mant[0] has trailing zero bits. The msb of the mantissa corresponds
-// to the value 0.5; the exponent x.exp shifts the binary point as needed.
-//
-// A zero or non-finite Float x ignores x.mant and x.exp.
-//
-// x                 form      neg      mant         exp
-// ----------------------------------------------------------
-// ±0                zero      sign     -            -
-// 0 < |x| < +Inf    finite    sign     mantissa     exponent
-// ±Inf              inf       sign     -            -
-
-// A form value describes the internal representation.
-type form byte
-
-// The form value order is relevant - do not change!
-const (
-	zero form = iota
-	finite
-	inf
-)
-
-// RoundingMode determines how a Float value is rounded to the
-// desired precision. Rounding may change the Float value; the
-// rounding error is described by the Float's Accuracy.
-type RoundingMode byte
-
-// The following rounding modes are supported.
-const (
-	ToNearestEven RoundingMode = iota // == IEEE 754-2008 roundTiesToEven
-	ToNearestAway                     // == IEEE 754-2008 roundTiesToAway
-	ToZero                            // == IEEE 754-2008 roundTowardZero
-	AwayFromZero                      // no IEEE 754-2008 equivalent
-	ToNegativeInf                     // == IEEE 754-2008 roundTowardNegative
-	ToPositiveInf                     // == IEEE 754-2008 roundTowardPositive
-)
-
-//go:generate stringer -type=RoundingMode
-
-// Accuracy describes the rounding error produced by the most recent
-// operation that generated a Float value, relative to the exact value.
-type Accuracy int8
-
-// Constants describing the Accuracy of a Float.
-const (
-	Below Accuracy = -1
-	Exact Accuracy = 0
-	Above Accuracy = +1
-)
-
-//go:generate stringer -type=Accuracy
-
-// SetPrec sets z's precision to prec and returns the (possibly) rounded
-// value of z. Rounding occurs according to z's rounding mode if the mantissa
-// cannot be represented in prec bits without loss of precision.
-// SetPrec(0) maps all finite values to ±0; infinite values remain unchanged.
-// If prec > MaxPrec, it is set to MaxPrec.
-func (z *Float) SetPrec(prec uint) *Float {
-	z.acc = Exact // optimistically assume no rounding is needed
-
-	// special case
-	if prec == 0 {
-		z.prec = 0
-		if z.form == finite {
-			// truncate z to 0
-			z.acc = makeAcc(z.neg)
-			z.form = zero
-		}
-		return z
-	}
-
-	// general case
-	if prec > MaxPrec {
-		prec = MaxPrec
-	}
-	old := z.prec
-	z.prec = uint32(prec)
-	if z.prec < old {
-		z.round(0)
-	}
-	return z
-}
-
-func makeAcc(above bool) Accuracy {
-	if above {
-		return Above
-	}
-	return Below
-}
-
-// SetMode sets z's rounding mode to mode and returns an exact z.
-// z remains unchanged otherwise.
-// z.SetMode(z.Mode()) is a cheap way to set z's accuracy to Exact.
-func (z *Float) SetMode(mode RoundingMode) *Float {
-	z.mode = mode
-	z.acc = Exact
-	return z
-}
-
-// Prec returns the mantissa precision of x in bits.
-// The result may be 0 for |x| == 0 and |x| == Inf.
-func (x *Float) Prec() uint {
-	return uint(x.prec)
-}
-
-// MinPrec returns the minimum precision required to represent x exactly
-// (i.e., the smallest prec before x.SetPrec(prec) would start rounding x).
-// The result is 0 for |x| == 0 and |x| == Inf.
-func (x *Float) MinPrec() uint {
-	if x.form != finite {
-		return 0
-	}
-	return uint(len(x.mant))*_W - x.mant.trailingZeroBits()
-}
-
-// Mode returns the rounding mode of x.
-func (x *Float) Mode() RoundingMode {
-	return x.mode
-}
-
-// Acc returns the accuracy of x produced by the most recent operation.
-func (x *Float) Acc() Accuracy {
-	return x.acc
-}
-
-// Sign returns:
-//
-//	-1 if x <   0
-//	 0 if x is ±0
-//	+1 if x >   0
-//
-func (x *Float) Sign() int {
-	if debugFloat {
-		x.validate()
-	}
-	if x.form == zero {
-		return 0
-	}
-	if x.neg {
-		return -1
-	}
-	return 1
-}
-
-// MantExp breaks x into its mantissa and exponent components
-// and returns the exponent. If a non-nil mant argument is
-// provided its value is set to the mantissa of x, with the
-// same precision and rounding mode as x. The components
-// satisfy x == mant × 2**exp, with 0.5 <= |mant| < 1.0.
-// Calling MantExp with a nil argument is an efficient way to
-// get the exponent of the receiver.
-//
-// Special cases are:
-//
-//	(  ±0).MantExp(mant) = 0, with mant set to   ±0
-//	(±Inf).MantExp(mant) = 0, with mant set to ±Inf
-//
-// x and mant may be the same in which case x is set to its
-// mantissa value.
-func (x *Float) MantExp(mant *Float) (exp int) {
-	if debugFloat {
-		x.validate()
-	}
-	if x.form == finite {
-		exp = int(x.exp)
-	}
-	if mant != nil {
-		mant.Copy(x)
-		if mant.form == finite {
-			mant.exp = 0
-		}
-	}
-	return
-}
-
-func (z *Float) setExpAndRound(exp int64, sbit uint) {
-	if exp < MinExp {
-		// underflow
-		z.acc = makeAcc(z.neg)
-		z.form = zero
-		return
-	}
-
-	if exp > MaxExp {
-		// overflow
-		z.acc = makeAcc(!z.neg)
-		z.form = inf
-		return
-	}
-
-	z.form = finite
-	z.exp = int32(exp)
-	z.round(sbit)
-}
-
-// SetMantExp sets z to mant × 2**exp and and returns z.
-// The result z has the same precision and rounding mode
-// as mant. SetMantExp is an inverse of MantExp but does
-// not require 0.5 <= |mant| < 1.0. Specifically:
-//
-//	mant := new(Float)
-//	new(Float).SetMantExp(mant, x.SetMantExp(mant)).Cmp(x).Eql() is true
-//
-// Special cases are:
-//
-//	z.SetMantExp(  ±0, exp) =   ±0
-//	z.SetMantExp(±Inf, exp) = ±Inf
-//
-// z and mant may be the same in which case z's exponent
-// is set to exp.
-func (z *Float) SetMantExp(mant *Float, exp int) *Float {
-	if debugFloat {
-		z.validate()
-		mant.validate()
-	}
-	z.Copy(mant)
-	if z.form != finite {
-		return z
-	}
-	z.setExpAndRound(int64(z.exp)+int64(exp), 0)
-	return z
-}
-
-// Signbit returns true if x is negative or negative zero.
-func (x *Float) Signbit() bool {
-	return x.neg
-}
-
-// IsInf reports whether x is +Inf or -Inf.
-func (x *Float) IsInf() bool {
-	return x.form == inf
-}
-
-// IsInt reports whether x is an integer.
-// ±Inf values are not integers.
-func (x *Float) IsInt() bool {
-	if debugFloat {
-		x.validate()
-	}
-	// special cases
-	if x.form != finite {
-		return x.form == zero
-	}
-	// x.form == finite
-	if x.exp <= 0 {
-		return false
-	}
-	// x.exp > 0
-	return x.prec <= uint32(x.exp) || x.MinPrec() <= uint(x.exp) // not enough bits for fractional mantissa
-}
-
-// debugging support
-func (x *Float) validate() {
-	if !debugFloat {
-		// avoid performance bugs
-		panic("validate called but debugFloat is not set")
-	}
-	if x.form != finite {
-		return
-	}
-	m := len(x.mant)
-	if m == 0 {
-		panic("nonzero finite number with empty mantissa")
-	}
-	const msb = 1 << (_W - 1)
-	if x.mant[m-1]&msb == 0 {
-		panic(fmt.Sprintf("msb not set in last word %#x of %s", x.mant[m-1], x.Text('p', 0)))
-	}
-	if x.prec == 0 {
-		panic("zero precision finite number")
-	}
-}
-
-// round rounds z according to z.mode to z.prec bits and sets z.acc accordingly.
-// sbit must be 0 or 1 and summarizes any "sticky bit" information one might
-// have before calling round. z's mantissa must be normalized (with the msb set)
-// or empty.
-//
-// CAUTION: The rounding modes ToNegativeInf, ToPositiveInf are affected by the
-// sign of z. For correct rounding, the sign of z must be set correctly before
-// calling round.
-func (z *Float) round(sbit uint) {
-	if debugFloat {
-		z.validate()
-	}
-
-	z.acc = Exact
-	if z.form != finite {
-		// ±0 or ±Inf => nothing left to do
-		return
-	}
-	// z.form == finite && len(z.mant) > 0
-	// m > 0 implies z.prec > 0 (checked by validate)
-
-	m := uint32(len(z.mant)) // present mantissa length in words
-	bits := m * _W           // present mantissa bits
-	if bits <= z.prec {
-		// mantissa fits => nothing to do
-		return
-	}
-	// bits > z.prec
-
-	n := (z.prec + (_W - 1)) / _W // mantissa length in words for desired precision
-
-	// Rounding is based on two bits: the rounding bit (rbit) and the
-	// sticky bit (sbit). The rbit is the bit immediately before the
-	// z.prec leading mantissa bits (the "0.5"). The sbit is set if any
-	// of the bits before the rbit are set (the "0.25", "0.125", etc.):
-	//
-	//   rbit  sbit  => "fractional part"
-	//
-	//   0     0        == 0
-	//   0     1        >  0  , < 0.5
-	//   1     0        == 0.5
-	//   1     1        >  0.5, < 1.0
-
-	// bits > z.prec: mantissa too large => round
-	r := uint(bits - z.prec - 1) // rounding bit position; r >= 0
-	rbit := z.mant.bit(r)        // rounding bit
-	if sbit == 0 {
-		sbit = z.mant.sticky(r)
-	}
-	if debugFloat && sbit&^1 != 0 {
-		panic(fmt.Sprintf("invalid sbit %#x", sbit))
-	}
-
-	// convert ToXInf rounding modes
-	mode := z.mode
-	switch mode {
-	case ToNegativeInf:
-		mode = ToZero
-		if z.neg {
-			mode = AwayFromZero
-		}
-	case ToPositiveInf:
-		mode = AwayFromZero
-		if z.neg {
-			mode = ToZero
-		}
-	}
-
-	// cut off extra words
-	if m > n {
-		copy(z.mant, z.mant[m-n:]) // move n last words to front
-		z.mant = z.mant[:n]
-	}
-
-	// determine number of trailing zero bits t
-	t := n*_W - z.prec // 0 <= t < _W
-	lsb := Word(1) << t
-
-	// make rounding decision
-	// TODO(gri) This can be simplified (see Bits.round in bits_test.go).
-	switch mode {
-	case ToZero:
-		// nothing to do
-	case ToNearestEven, ToNearestAway:
-		if rbit == 0 {
-			// rounding bits == 0b0x
-			mode = ToZero
-		} else if sbit == 1 {
-			// rounding bits == 0b11
-			mode = AwayFromZero
-		}
-	case AwayFromZero:
-		if rbit|sbit == 0 {
-			mode = ToZero
-		}
-	default:
-		// ToXInf modes have been converted to ToZero or AwayFromZero
-		panic("unreachable")
-	}
-
-	// round and determine accuracy
-	switch mode {
-	case ToZero:
-		if rbit|sbit != 0 {
-			z.acc = Below
-		}
-
-	case ToNearestEven, ToNearestAway:
-		if debugFloat && rbit != 1 {
-			panic("internal error in rounding")
-		}
-		if mode == ToNearestEven && sbit == 0 && z.mant[0]&lsb == 0 {
-			z.acc = Below
-			break
-		}
-		// mode == ToNearestAway || sbit == 1 || z.mant[0]&lsb != 0
-		fallthrough
-
-	case AwayFromZero:
-		// add 1 to mantissa
-		if addVW(z.mant, z.mant, lsb) != 0 {
-			// overflow => shift mantissa right by 1 and add msb
-			shrVU(z.mant, z.mant, 1)
-			z.mant[n-1] |= 1 << (_W - 1)
-			// adjust exponent
-			if z.exp < MaxExp {
-				z.exp++
-			} else {
-				// exponent overflow
-				z.acc = makeAcc(!z.neg)
-				z.form = inf
-				return
-			}
-		}
-		z.acc = Above
-	}
-
-	// zero out trailing bits in least-significant word
-	z.mant[0] &^= lsb - 1
-
-	// update accuracy
-	if z.acc != Exact && z.neg {
-		z.acc = -z.acc
-	}
-
-	if debugFloat {
-		z.validate()
-	}
-
-	return
-}
-
-func (z *Float) setBits64(neg bool, x uint64) *Float {
-	if z.prec == 0 {
-		z.prec = 64
-	}
-	z.acc = Exact
-	z.neg = neg
-	if x == 0 {
-		z.form = zero
-		return z
-	}
-	// x != 0
-	z.form = finite
-	s := nlz64(x)
-	z.mant = z.mant.setUint64(x << s)
-	z.exp = int32(64 - s) // always fits
-	if z.prec < 64 {
-		z.round(0)
-	}
-	return z
-}
-
-// SetUint64 sets z to the (possibly rounded) value of x and returns z.
-// If z's precision is 0, it is changed to 64 (and rounding will have
-// no effect).
-func (z *Float) SetUint64(x uint64) *Float {
-	return z.setBits64(false, x)
-}
-
-// SetInt64 sets z to the (possibly rounded) value of x and returns z.
-// If z's precision is 0, it is changed to 64 (and rounding will have
-// no effect).
-func (z *Float) SetInt64(x int64) *Float {
-	u := x
-	if u < 0 {
-		u = -u
-	}
-	// We cannot simply call z.SetUint64(uint64(u)) and change
-	// the sign afterwards because the sign affects rounding.
-	return z.setBits64(x < 0, uint64(u))
-}
-
-// SetFloat64 sets z to the (possibly rounded) value of x and returns z.
-// If z's precision is 0, it is changed to 53 (and rounding will have
-// no effect). SetFloat64 panics with ErrNaN if x is a NaN.
-func (z *Float) SetFloat64(x float64) *Float {
-	if z.prec == 0 {
-		z.prec = 53
-	}
-	if math.IsNaN(x) {
-		panic(ErrNaN{"Float.SetFloat64(NaN)"})
-	}
-	z.acc = Exact
-	z.neg = math.Signbit(x) // handle -0, -Inf correctly
-	if x == 0 {
-		z.form = zero
-		return z
-	}
-	if math.IsInf(x, 0) {
-		z.form = inf
-		return z
-	}
-	// normalized x != 0
-	z.form = finite
-	fmant, exp := math.Frexp(x) // get normalized mantissa
-	z.mant = z.mant.setUint64(1<<63 | math.Float64bits(fmant)<<11)
-	z.exp = int32(exp) // always fits
-	if z.prec < 53 {
-		z.round(0)
-	}
-	return z
-}
-
-// fnorm normalizes mantissa m by shifting it to the left
-// such that the msb of the most-significant word (msw) is 1.
-// It returns the shift amount. It assumes that len(m) != 0.
-func fnorm(m nat) int64 {
-	if debugFloat && (len(m) == 0 || m[len(m)-1] == 0) {
-		panic("msw of mantissa is 0")
-	}
-	s := nlz(m[len(m)-1])
-	if s > 0 {
-		c := shlVU(m, m, s)
-		if debugFloat && c != 0 {
-			panic("nlz or shlVU incorrect")
-		}
-	}
-	return int64(s)
-}
-
-// SetInt sets z to the (possibly rounded) value of x and returns z.
-// If z's precision is 0, it is changed to the larger of x.BitLen()
-// or 64 (and rounding will have no effect).
-func (z *Float) SetInt(x *Int) *Float {
-	// TODO(gri) can be more efficient if z.prec > 0
-	// but small compared to the size of x, or if there
-	// are many trailing 0's.
-	bits := uint32(x.BitLen())
-	if z.prec == 0 {
-		z.prec = umax32(bits, 64)
-	}
-	z.acc = Exact
-	z.neg = x.neg
-	if len(x.abs) == 0 {
-		z.form = zero
-		return z
-	}
-	// x != 0
-	z.mant = z.mant.set(x.abs)
-	fnorm(z.mant)
-	z.setExpAndRound(int64(bits), 0)
-	return z
-}
-
-// SetRat sets z to the (possibly rounded) value of x and returns z.
-// If z's precision is 0, it is changed to the largest of a.BitLen(),
-// b.BitLen(), or 64; with x = a/b.
-func (z *Float) SetRat(x *Rat) *Float {
-	if x.IsInt() {
-		return z.SetInt(x.Num())
-	}
-	var a, b Float
-	a.SetInt(x.Num())
-	b.SetInt(x.Denom())
-	if z.prec == 0 {
-		z.prec = umax32(a.prec, b.prec)
-	}
-	return z.Quo(&a, &b)
-}
-
-// SetInf sets z to the infinite Float -Inf if signbit is
-// set, or +Inf if signbit is not set, and returns z. The
-// precision of z is unchanged and the result is always
-// Exact.
-func (z *Float) SetInf(signbit bool) *Float {
-	z.acc = Exact
-	z.form = inf
-	z.neg = signbit
-	return z
-}
-
-// Set sets z to the (possibly rounded) value of x and returns z.
-// If z's precision is 0, it is changed to the precision of x
-// before setting z (and rounding will have no effect).
-// Rounding is performed according to z's precision and rounding
-// mode; and z's accuracy reports the result error relative to the
-// exact (not rounded) result.
-func (z *Float) Set(x *Float) *Float {
-	if debugFloat {
-		x.validate()
-	}
-	z.acc = Exact
-	if z != x {
-		z.form = x.form
-		z.neg = x.neg
-		if x.form == finite {
-			z.exp = x.exp
-			z.mant = z.mant.set(x.mant)
-		}
-		if z.prec == 0 {
-			z.prec = x.prec
-		} else if z.prec < x.prec {
-			z.round(0)
-		}
-	}
-	return z
-}
-
-// Copy sets z to x, with the same precision, rounding mode, and
-// accuracy as x, and returns z. x is not changed even if z and
-// x are the same.
-func (z *Float) Copy(x *Float) *Float {
-	if debugFloat {
-		x.validate()
-	}
-	if z != x {
-		z.prec = x.prec
-		z.mode = x.mode
-		z.acc = x.acc
-		z.form = x.form
-		z.neg = x.neg
-		if z.form == finite {
-			z.mant = z.mant.set(x.mant)
-			z.exp = x.exp
-		}
-	}
-	return z
-}
-
-// msb32 returns the 32 most significant bits of x.
-func msb32(x nat) uint32 {
-	i := len(x) - 1
-	if i < 0 {
-		return 0
-	}
-	if debugFloat && x[i]&(1<<(_W-1)) == 0 {
-		panic("x not normalized")
-	}
-	switch _W {
-	case 32:
-		return uint32(x[i])
-	case 64:
-		return uint32(x[i] >> 32)
-	}
-	panic("unreachable")
-}
-
-// msb64 returns the 64 most significant bits of x.
-func msb64(x nat) uint64 {
-	i := len(x) - 1
-	if i < 0 {
-		return 0
-	}
-	if debugFloat && x[i]&(1<<(_W-1)) == 0 {
-		panic("x not normalized")
-	}
-	switch _W {
-	case 32:
-		v := uint64(x[i]) << 32
-		if i > 0 {
-			v |= uint64(x[i-1])
-		}
-		return v
-	case 64:
-		return uint64(x[i])
-	}
-	panic("unreachable")
-}
-
-// Uint64 returns the unsigned integer resulting from truncating x
-// towards zero. If 0 <= x <= math.MaxUint64, the result is Exact
-// if x is an integer and Below otherwise.
-// The result is (0, Above) for x < 0, and (math.MaxUint64, Below)
-// for x > math.MaxUint64.
-func (x *Float) Uint64() (uint64, Accuracy) {
-	if debugFloat {
-		x.validate()
-	}
-
-	switch x.form {
-	case finite:
-		if x.neg {
-			return 0, Above
-		}
-		// 0 < x < +Inf
-		if x.exp <= 0 {
-			// 0 < x < 1
-			return 0, Below
-		}
-		// 1 <= x < Inf
-		if x.exp <= 64 {
-			// u = trunc(x) fits into a uint64
-			u := msb64(x.mant) >> (64 - uint32(x.exp))
-			if x.MinPrec() <= 64 {
-				return u, Exact
-			}
-			return u, Below // x truncated
-		}
-		// x too large
-		return math.MaxUint64, Below
-
-	case zero:
-		return 0, Exact
-
-	case inf:
-		if x.neg {
-			return 0, Above
-		}
-		return math.MaxUint64, Below
-	}
-
-	panic("unreachable")
-}
-
-// Int64 returns the integer resulting from truncating x towards zero.
-// If math.MinInt64 <= x <= math.MaxInt64, the result is Exact if x is
-// an integer, and Above (x < 0) or Below (x > 0) otherwise.
-// The result is (math.MinInt64, Above) for x < math.MinInt64,
-// and (math.MaxInt64, Below) for x > math.MaxInt64.
-func (x *Float) Int64() (int64, Accuracy) {
-	if debugFloat {
-		x.validate()
-	}
-
-	switch x.form {
-	case finite:
-		// 0 < |x| < +Inf
-		acc := makeAcc(x.neg)
-		if x.exp <= 0 {
-			// 0 < |x| < 1
-			return 0, acc
-		}
-		// x.exp > 0
-
-		// 1 <= |x| < +Inf
-		if x.exp <= 63 {
-			// i = trunc(x) fits into an int64 (excluding math.MinInt64)
-			i := int64(msb64(x.mant) >> (64 - uint32(x.exp)))
-			if x.neg {
-				i = -i
-			}
-			if x.MinPrec() <= uint(x.exp) {
-				return i, Exact
-			}
-			return i, acc // x truncated
-		}
-		if x.neg {
-			// check for special case x == math.MinInt64 (i.e., x == -(0.5 << 64))
-			if x.exp == 64 && x.MinPrec() == 1 {
-				acc = Exact
-			}
-			return math.MinInt64, acc
-		}
-		// x too large
-		return math.MaxInt64, Below
-
-	case zero:
-		return 0, Exact
-
-	case inf:
-		if x.neg {
-			return math.MinInt64, Above
-		}
-		return math.MaxInt64, Below
-	}
-
-	panic("unreachable")
-}
-
-// Float32 returns the float32 value nearest to x. If x is too small to be
-// represented by a float32 (|x| < math.SmallestNonzeroFloat32), the result
-// is (0, Below) or (-0, Above), respectively, depending on the sign of x.
-// If x is too large to be represented by a float32 (|x| > math.MaxFloat32),
-// the result is (+Inf, Above) or (-Inf, Below), depending on the sign of x.
-func (x *Float) Float32() (float32, Accuracy) {
-	if debugFloat {
-		x.validate()
-	}
-
-	switch x.form {
-	case finite:
-		// 0 < |x| < +Inf
-
-		const (
-			fbits = 32                //        float size
-			mbits = 23                //        mantissa size (excluding implicit msb)
-			ebits = fbits - mbits - 1 //     8  exponent size
-			bias  = 1<<(ebits-1) - 1  //   127  exponent bias
-			dmin  = 1 - bias - mbits  //  -149  smallest unbiased exponent (denormal)
-			emin  = 1 - bias          //  -126  smallest unbiased exponent (normal)
-			emax  = bias              //   127  largest unbiased exponent (normal)
-		)
-
-		// Float mantissa m is 0.5 <= m < 1.0; compute exponent for floatxx mantissa.
-		e := x.exp - 1 // exponent for mantissa m with 1.0 <= m < 2.0
-		p := mbits + 1 // precision of normal float
-
-		// If the exponent is too small, we may have a denormal number
-		// in which case we have fewer mantissa bits available: reduce
-		// precision accordingly.
-		if e < emin {
-			p -= emin - int(e)
-			// Make sure we have at least 1 bit so that we don't
-			// lose numbers rounded up to the smallest denormal.
-			if p < 1 {
-				p = 1
-			}
-		}
-
-		// round
-		var r Float
-		r.prec = uint32(p)
-		r.Set(x)
-		e = r.exp - 1
-
-		// Rounding may have caused r to overflow to ±Inf
-		// (rounding never causes underflows to 0).
-		if r.form == inf {
-			e = emax + 1 // cause overflow below
-		}
-
-		// If the exponent is too large, overflow to ±Inf.
-		if e > emax {
-			// overflow
-			if x.neg {
-				return float32(math.Inf(-1)), Below
-			}
-			return float32(math.Inf(+1)), Above
-		}
-		// e <= emax
-
-		// Determine sign, biased exponent, and mantissa.
-		var sign, bexp, mant uint32
-		if x.neg {
-			sign = 1 << (fbits - 1)
-		}
-
-		// Rounding may have caused a denormal number to
-		// become normal. Check again.
-		if e < emin {
-			// denormal number
-			if e < dmin {
-				// underflow to ±0
-				if x.neg {
-					var z float32
-					return -z, Above
-				}
-				return 0.0, Below
-			}
-			// bexp = 0
-			mant = msb32(r.mant) >> (fbits - r.prec)
-		} else {
-			// normal number: emin <= e <= emax
-			bexp = uint32(e+bias) << mbits
-			mant = msb32(r.mant) >> ebits & (1<<mbits - 1) // cut off msb (implicit 1 bit)
-		}
-
-		return math.Float32frombits(sign | bexp | mant), r.acc
-
-	case zero:
-		if x.neg {
-			var z float32
-			return -z, Exact
-		}
-		return 0.0, Exact
-
-	case inf:
-		if x.neg {
-			return float32(math.Inf(-1)), Exact
-		}
-		return float32(math.Inf(+1)), Exact
-	}
-
-	panic("unreachable")
-}
-
-// Float64 returns the float64 value nearest to x. If x is too small to be
-// represented by a float64 (|x| < math.SmallestNonzeroFloat64), the result
-// is (0, Below) or (-0, Above), respectively, depending on the sign of x.
-// If x is too large to be represented by a float64 (|x| > math.MaxFloat64),
-// the result is (+Inf, Above) or (-Inf, Below), depending on the sign of x.
-func (x *Float) Float64() (float64, Accuracy) {
-	if debugFloat {
-		x.validate()
-	}
-
-	switch x.form {
-	case finite:
-		// 0 < |x| < +Inf
-
-		const (
-			fbits = 64                //        float size
-			mbits = 52                //        mantissa size (excluding implicit msb)
-			ebits = fbits - mbits - 1 //    11  exponent size
-			bias  = 1<<(ebits-1) - 1  //  1023  exponent bias
-			dmin  = 1 - bias - mbits  // -1074  smallest unbiased exponent (denormal)
-			emin  = 1 - bias          // -1022  smallest unbiased exponent (normal)
-			emax  = bias              //  1023  largest unbiased exponent (normal)
-		)
-
-		// Float mantissa m is 0.5 <= m < 1.0; compute exponent for floatxx mantissa.
-		e := x.exp - 1 // exponent for mantissa m with 1.0 <= m < 2.0
-		p := mbits + 1 // precision of normal float
-
-		// If the exponent is too small, we may have a denormal number
-		// in which case we have fewer mantissa bits available: reduce
-		// precision accordingly.
-		if e < emin {
-			p -= emin - int(e)
-			// Make sure we have at least 1 bit so that we don't
-			// lose numbers rounded up to the smallest denormal.
-			if p < 1 {
-				p = 1
-			}
-		}
-
-		// round
-		var r Float
-		r.prec = uint32(p)
-		r.Set(x)
-		e = r.exp - 1
-
-		// Rounding may have caused r to overflow to ±Inf
-		// (rounding never causes underflows to 0).
-		if r.form == inf {
-			e = emax + 1 // cause overflow below
-		}
-
-		// If the exponent is too large, overflow to ±Inf.
-		if e > emax {
-			// overflow
-			if x.neg {
-				return math.Inf(-1), Below
-			}
-			return math.Inf(+1), Above
-		}
-		// e <= emax
-
-		// Determine sign, biased exponent, and mantissa.
-		var sign, bexp, mant uint64
-		if x.neg {
-			sign = 1 << (fbits - 1)
-		}
-
-		// Rounding may have caused a denormal number to
-		// become normal. Check again.
-		if e < emin {
-			// denormal number
-			if e < dmin {
-				// underflow to ±0
-				if x.neg {
-					var z float64
-					return -z, Above
-				}
-				return 0.0, Below
-			}
-			// bexp = 0
-			mant = msb64(r.mant) >> (fbits - r.prec)
-		} else {
-			// normal number: emin <= e <= emax
-			bexp = uint64(e+bias) << mbits
-			mant = msb64(r.mant) >> ebits & (1<<mbits - 1) // cut off msb (implicit 1 bit)
-		}
-
-		return math.Float64frombits(sign | bexp | mant), r.acc
-
-	case zero:
-		if x.neg {
-			var z float64
-			return -z, Exact
-		}
-		return 0.0, Exact
-
-	case inf:
-		if x.neg {
-			return math.Inf(-1), Exact
-		}
-		return math.Inf(+1), Exact
-	}
-
-	panic("unreachable")
-}
-
-// Int returns the result of truncating x towards zero;
-// or nil if x is an infinity.
-// The result is Exact if x.IsInt(); otherwise it is Below
-// for x > 0, and Above for x < 0.
-// If a non-nil *Int argument z is provided, Int stores
-// the result in z instead of allocating a new Int.
-func (x *Float) Int(z *Int) (*Int, Accuracy) {
-	if debugFloat {
-		x.validate()
-	}
-
-	if z == nil && x.form <= finite {
-		z = new(Int)
-	}
-
-	switch x.form {
-	case finite:
-		// 0 < |x| < +Inf
-		acc := makeAcc(x.neg)
-		if x.exp <= 0 {
-			// 0 < |x| < 1
-			return z.SetInt64(0), acc
-		}
-		// x.exp > 0
-
-		// 1 <= |x| < +Inf
-		// determine minimum required precision for x
-		allBits := uint(len(x.mant)) * _W
-		exp := uint(x.exp)
-		if x.MinPrec() <= exp {
-			acc = Exact
-		}
-		// shift mantissa as needed
-		if z == nil {
-			z = new(Int)
-		}
-		z.neg = x.neg
-		switch {
-		case exp > allBits:
-			z.abs = z.abs.shl(x.mant, exp-allBits)
-		default:
-			z.abs = z.abs.set(x.mant)
-		case exp < allBits:
-			z.abs = z.abs.shr(x.mant, allBits-exp)
-		}
-		return z, acc
-
-	case zero:
-		return z.SetInt64(0), Exact
-
-	case inf:
-		return nil, makeAcc(x.neg)
-	}
-
-	panic("unreachable")
-}
-
-// Rat returns the rational number corresponding to x;
-// or nil if x is an infinity.
-// The result is Exact is x is not an Inf.
-// If a non-nil *Rat argument z is provided, Rat stores
-// the result in z instead of allocating a new Rat.
-func (x *Float) Rat(z *Rat) (*Rat, Accuracy) {
-	if debugFloat {
-		x.validate()
-	}
-
-	if z == nil && x.form <= finite {
-		z = new(Rat)
-	}
-
-	switch x.form {
-	case finite:
-		// 0 < |x| < +Inf
-		allBits := int32(len(x.mant)) * _W
-		// build up numerator and denominator
-		z.a.neg = x.neg
-		switch {
-		case x.exp > allBits:
-			z.a.abs = z.a.abs.shl(x.mant, uint(x.exp-allBits))
-			z.b.abs = z.b.abs[:0] // == 1 (see Rat)
-			// z already in normal form
-		default:
-			z.a.abs = z.a.abs.set(x.mant)
-			z.b.abs = z.b.abs[:0] // == 1 (see Rat)
-			// z already in normal form
-		case x.exp < allBits:
-			z.a.abs = z.a.abs.set(x.mant)
-			t := z.b.abs.setUint64(1)
-			z.b.abs = t.shl(t, uint(allBits-x.exp))
-			z.norm()
-		}
-		return z, Exact
-
-	case zero:
-		return z.SetInt64(0), Exact
-
-	case inf:
-		return nil, makeAcc(x.neg)
-	}
-
-	panic("unreachable")
-}
-
-// Abs sets z to the (possibly rounded) value |x| (the absolute value of x)
-// and returns z.
-func (z *Float) Abs(x *Float) *Float {
-	z.Set(x)
-	z.neg = false
-	return z
-}
-
-// Neg sets z to the (possibly rounded) value of x with its sign negated,
-// and returns z.
-func (z *Float) Neg(x *Float) *Float {
-	z.Set(x)
-	z.neg = !z.neg
-	return z
-}
-
-func validateBinaryOperands(x, y *Float) {
-	if !debugFloat {
-		// avoid performance bugs
-		panic("validateBinaryOperands called but debugFloat is not set")
-	}
-	if len(x.mant) == 0 {
-		panic("empty mantissa for x")
-	}
-	if len(y.mant) == 0 {
-		panic("empty mantissa for y")
-	}
-}
-
-// z = x + y, ignoring signs of x and y for the addition
-// but using the sign of z for rounding the result.
-// x and y must have a non-empty mantissa and valid exponent.
-func (z *Float) uadd(x, y *Float) {
-	// Note: This implementation requires 2 shifts most of the
-	// time. It is also inefficient if exponents or precisions
-	// differ by wide margins. The following article describes
-	// an efficient (but much more complicated) implementation
-	// compatible with the internal representation used here:
-	//
-	// Vincent Lefèvre: "The Generic Multiple-Precision Floating-
-	// Point Addition With Exact Rounding (as in the MPFR Library)"
-	// http://www.vinc17.net/research/papers/rnc6.pdf
-
-	if debugFloat {
-		validateBinaryOperands(x, y)
-	}
-
-	// compute exponents ex, ey for mantissa with "binary point"
-	// on the right (mantissa.0) - use int64 to avoid overflow
-	ex := int64(x.exp) - int64(len(x.mant))*_W
-	ey := int64(y.exp) - int64(len(y.mant))*_W
-
-	// TODO(gri) having a combined add-and-shift primitive
-	//           could make this code significantly faster
-	switch {
-	case ex < ey:
-		// cannot re-use z.mant w/o testing for aliasing
-		t := nat(nil).shl(y.mant, uint(ey-ex))
-		z.mant = z.mant.add(x.mant, t)
-	default:
-		// ex == ey, no shift needed
-		z.mant = z.mant.add(x.mant, y.mant)
-	case ex > ey:
-		// cannot re-use z.mant w/o testing for aliasing
-		t := nat(nil).shl(x.mant, uint(ex-ey))
-		z.mant = z.mant.add(t, y.mant)
-		ex = ey
-	}
-	// len(z.mant) > 0
-
-	z.setExpAndRound(ex+int64(len(z.mant))*_W-fnorm(z.mant), 0)
-}
-
-// z = x - y for |x| > |y|, ignoring signs of x and y for the subtraction
-// but using the sign of z for rounding the result.
-// x and y must have a non-empty mantissa and valid exponent.
-func (z *Float) usub(x, y *Float) {
-	// This code is symmetric to uadd.
-	// We have not factored the common code out because
-	// eventually uadd (and usub) should be optimized
-	// by special-casing, and the code will diverge.
-
-	if debugFloat {
-		validateBinaryOperands(x, y)
-	}
-
-	ex := int64(x.exp) - int64(len(x.mant))*_W
-	ey := int64(y.exp) - int64(len(y.mant))*_W
-
-	switch {
-	case ex < ey:
-		// cannot re-use z.mant w/o testing for aliasing
-		t := nat(nil).shl(y.mant, uint(ey-ex))
-		z.mant = t.sub(x.mant, t)
-	default:
-		// ex == ey, no shift needed
-		z.mant = z.mant.sub(x.mant, y.mant)
-	case ex > ey:
-		// cannot re-use z.mant w/o testing for aliasing
-		t := nat(nil).shl(x.mant, uint(ex-ey))
-		z.mant = t.sub(t, y.mant)
-		ex = ey
-	}
-
-	// operands may have cancelled each other out
-	if len(z.mant) == 0 {
-		z.acc = Exact
-		z.form = zero
-		z.neg = false
-		return
-	}
-	// len(z.mant) > 0
-
-	z.setExpAndRound(ex+int64(len(z.mant))*_W-fnorm(z.mant), 0)
-}
-
-// z = x * y, ignoring signs of x and y for the multiplication
-// but using the sign of z for rounding the result.
-// x and y must have a non-empty mantissa and valid exponent.
-func (z *Float) umul(x, y *Float) {
-	if debugFloat {
-		validateBinaryOperands(x, y)
-	}
-
-	// Note: This is doing too much work if the precision
-	// of z is less than the sum of the precisions of x
-	// and y which is often the case (e.g., if all floats
-	// have the same precision).
-	// TODO(gri) Optimize this for the common case.
-
-	e := int64(x.exp) + int64(y.exp)
-	z.mant = z.mant.mul(x.mant, y.mant)
-
-	z.setExpAndRound(e-fnorm(z.mant), 0)
-}
-
-// z = x / y, ignoring signs of x and y for the division
-// but using the sign of z for rounding the result.
-// x and y must have a non-empty mantissa and valid exponent.
-func (z *Float) uquo(x, y *Float) {
-	if debugFloat {
-		validateBinaryOperands(x, y)
-	}
-
-	// mantissa length in words for desired result precision + 1
-	// (at least one extra bit so we get the rounding bit after
-	// the division)
-	n := int(z.prec/_W) + 1
-
-	// compute adjusted x.mant such that we get enough result precision
-	xadj := x.mant
-	if d := n - len(x.mant) + len(y.mant); d > 0 {
-		// d extra words needed => add d "0 digits" to x
-		xadj = make(nat, len(x.mant)+d)
-		copy(xadj[d:], x.mant)
-	}
-	// TODO(gri): If we have too many digits (d < 0), we should be able
-	// to shorten x for faster division. But we must be extra careful
-	// with rounding in that case.
-
-	// Compute d before division since there may be aliasing of x.mant
-	// (via xadj) or y.mant with z.mant.
-	d := len(xadj) - len(y.mant)
-
-	// divide
-	var r nat
-	z.mant, r = z.mant.div(nil, xadj, y.mant)
-	e := int64(x.exp) - int64(y.exp) - int64(d-len(z.mant))*_W
-
-	// The result is long enough to include (at least) the rounding bit.
-	// If there's a non-zero remainder, the corresponding fractional part
-	// (if it were computed), would have a non-zero sticky bit (if it were
-	// zero, it couldn't have a non-zero remainder).
-	var sbit uint
-	if len(r) > 0 {
-		sbit = 1
-	}
-
-	z.setExpAndRound(e-fnorm(z.mant), sbit)
-}
-
-// ucmp returns -1, 0, or +1, depending on whether
-// |x| < |y|, |x| == |y|, or |x| > |y|.
-// x and y must have a non-empty mantissa and valid exponent.
-func (x *Float) ucmp(y *Float) int {
-	if debugFloat {
-		validateBinaryOperands(x, y)
-	}
-
-	switch {
-	case x.exp < y.exp:
-		return -1
-	case x.exp > y.exp:
-		return +1
-	}
-	// x.exp == y.exp
-
-	// compare mantissas
-	i := len(x.mant)
-	j := len(y.mant)
-	for i > 0 || j > 0 {
-		var xm, ym Word
-		if i > 0 {
-			i--
-			xm = x.mant[i]
-		}
-		if j > 0 {
-			j--
-			ym = y.mant[j]
-		}
-		switch {
-		case xm < ym:
-			return -1
-		case xm > ym:
-			return +1
-		}
-	}
-
-	return 0
-}
-
-// Handling of sign bit as defined by IEEE 754-2008, section 6.3:
-//
-// When neither the inputs nor result are NaN, the sign of a product or
-// quotient is the exclusive OR of the operands’ signs; the sign of a sum,
-// or of a difference x−y regarded as a sum x+(−y), differs from at most
-// one of the addends’ signs; and the sign of the result of conversions,
-// the quantize operation, the roundToIntegral operations, and the
-// roundToIntegralExact (see 5.3.1) is the sign of the first or only operand.
-// These rules shall apply even when operands or results are zero or infinite.
-//
-// When the sum of two operands with opposite signs (or the difference of
-// two operands with like signs) is exactly zero, the sign of that sum (or
-// difference) shall be +0 in all rounding-direction attributes except
-// roundTowardNegative; under that attribute, the sign of an exact zero
-// sum (or difference) shall be −0. However, x+x = x−(−x) retains the same
-// sign as x even when x is zero.
-//
-// See also: https://play.golang.org/p/RtH3UCt5IH
-
-// Add sets z to the rounded sum x+y and returns z. If z's precision is 0,
-// it is changed to the larger of x's or y's precision before the operation.
-// Rounding is performed according to z's precision and rounding mode; and
-// z's accuracy reports the result error relative to the exact (not rounded)
-// result. Add panics with ErrNaN if x and y are infinities with opposite
-// signs. The value of z is undefined in that case.
-//
-// BUG(gri) When rounding ToNegativeInf, the sign of Float values rounded to 0 is incorrect.
-func (z *Float) Add(x, y *Float) *Float {
-	if debugFloat {
-		x.validate()
-		y.validate()
-	}
-
-	if z.prec == 0 {
-		z.prec = umax32(x.prec, y.prec)
-	}
-
-	if x.form == finite && y.form == finite {
-		// x + y (commom case)
-		z.neg = x.neg
-		if x.neg == y.neg {
-			// x + y == x + y
-			// (-x) + (-y) == -(x + y)
-			z.uadd(x, y)
-		} else {
-			// x + (-y) == x - y == -(y - x)
-			// (-x) + y == y - x == -(x - y)
-			if x.ucmp(y) > 0 {
-				z.usub(x, y)
-			} else {
-				z.neg = !z.neg
-				z.usub(y, x)
-			}
-		}
-		return z
-	}
-
-	if x.form == inf && y.form == inf && x.neg != y.neg {
-		// +Inf + -Inf
-		// -Inf + +Inf
-		// value of z is undefined but make sure it's valid
-		z.acc = Exact
-		z.form = zero
-		z.neg = false
-		panic(ErrNaN{"addition of infinities with opposite signs"})
-	}
-
-	if x.form == zero && y.form == zero {
-		// ±0 + ±0
-		z.acc = Exact
-		z.form = zero
-		z.neg = x.neg && y.neg // -0 + -0 == -0
-		return z
-	}
-
-	if x.form == inf || y.form == zero {
-		// ±Inf + y
-		// x + ±0
-		return z.Set(x)
-	}
-
-	// ±0 + y
-	// x + ±Inf
-	return z.Set(y)
-}
-
-// Sub sets z to the rounded difference x-y and returns z.
-// Precision, rounding, and accuracy reporting are as for Add.
-// Sub panics with ErrNaN if x and y are infinities with equal
-// signs. The value of z is undefined in that case.
-func (z *Float) Sub(x, y *Float) *Float {
-	if debugFloat {
-		x.validate()
-		y.validate()
-	}
-
-	if z.prec == 0 {
-		z.prec = umax32(x.prec, y.prec)
-	}
-
-	if x.form == finite && y.form == finite {
-		// x - y (common case)
-		z.neg = x.neg
-		if x.neg != y.neg {
-			// x - (-y) == x + y
-			// (-x) - y == -(x + y)
-			z.uadd(x, y)
-		} else {
-			// x - y == x - y == -(y - x)
-			// (-x) - (-y) == y - x == -(x - y)
-			if x.ucmp(y) > 0 {
-				z.usub(x, y)
-			} else {
-				z.neg = !z.neg
-				z.usub(y, x)
-			}
-		}
-		return z
-	}
-
-	if x.form == inf && y.form == inf && x.neg == y.neg {
-		// +Inf - +Inf
-		// -Inf - -Inf
-		// value of z is undefined but make sure it's valid
-		z.acc = Exact
-		z.form = zero
-		z.neg = false
-		panic(ErrNaN{"subtraction of infinities with equal signs"})
-	}
-
-	if x.form == zero && y.form == zero {
-		// ±0 - ±0
-		z.acc = Exact
-		z.form = zero
-		z.neg = x.neg && !y.neg // -0 - +0 == -0
-		return z
-	}
-
-	if x.form == inf || y.form == zero {
-		// ±Inf - y
-		// x - ±0
-		return z.Set(x)
-	}
-
-	// ±0 - y
-	// x - ±Inf
-	return z.Neg(y)
-}
-
-// Mul sets z to the rounded product x*y and returns z.
-// Precision, rounding, and accuracy reporting are as for Add.
-// Mul panics with ErrNaN if one operand is zero and the other
-// operand an infinity. The value of z is undefined in that case.
-func (z *Float) Mul(x, y *Float) *Float {
-	if debugFloat {
-		x.validate()
-		y.validate()
-	}
-
-	if z.prec == 0 {
-		z.prec = umax32(x.prec, y.prec)
-	}
-
-	z.neg = x.neg != y.neg
-
-	if x.form == finite && y.form == finite {
-		// x * y (common case)
-		z.umul(x, y)
-		return z
-	}
-
-	z.acc = Exact
-	if x.form == zero && y.form == inf || x.form == inf && y.form == zero {
-		// ±0 * ±Inf
-		// ±Inf * ±0
-		// value of z is undefined but make sure it's valid
-		z.form = zero
-		z.neg = false
-		panic(ErrNaN{"multiplication of zero with infinity"})
-	}
-
-	if x.form == inf || y.form == inf {
-		// ±Inf * y
-		// x * ±Inf
-		z.form = inf
-		return z
-	}
-
-	// ±0 * y
-	// x * ±0
-	z.form = zero
-	return z
-}
-
-// Quo sets z to the rounded quotient x/y and returns z.
-// Precision, rounding, and accuracy reporting are as for Add.
-// Quo panics with ErrNaN if both operands are zero or infinities.
-// The value of z is undefined in that case.
-func (z *Float) Quo(x, y *Float) *Float {
-	if debugFloat {
-		x.validate()
-		y.validate()
-	}
-
-	if z.prec == 0 {
-		z.prec = umax32(x.prec, y.prec)
-	}
-
-	z.neg = x.neg != y.neg
-
-	if x.form == finite && y.form == finite {
-		// x / y (common case)
-		z.uquo(x, y)
-		return z
-	}
-
-	z.acc = Exact
-	if x.form == zero && y.form == zero || x.form == inf && y.form == inf {
-		// ±0 / ±0
-		// ±Inf / ±Inf
-		// value of z is undefined but make sure it's valid
-		z.form = zero
-		z.neg = false
-		panic(ErrNaN{"division of zero by zero or infinity by infinity"})
-	}
-
-	if x.form == zero || y.form == inf {
-		// ±0 / y
-		// x / ±Inf
-		z.form = zero
-		return z
-	}
-
-	// x / ±0
-	// ±Inf / y
-	z.form = inf
-	return z
-}
-
-// Cmp compares x and y and returns:
-//
-//   -1 if x <  y
-//    0 if x == y (incl. -0 == 0, -Inf == -Inf, and +Inf == +Inf)
-//   +1 if x >  y
-//
-func (x *Float) Cmp(y *Float) int {
-	if debugFloat {
-		x.validate()
-		y.validate()
-	}
-
-	mx := x.ord()
-	my := y.ord()
-	switch {
-	case mx < my:
-		return -1
-	case mx > my:
-		return +1
-	}
-	// mx == my
-
-	// only if |mx| == 1 we have to compare the mantissae
-	switch mx {
-	case -1:
-		return y.ucmp(x)
-	case +1:
-		return x.ucmp(y)
-	}
-
-	return 0
-}
-
-// ord classifies x and returns:
-//
-//	-2 if -Inf == x
-//	-1 if -Inf < x < 0
-//	 0 if x == 0 (signed or unsigned)
-//	+1 if 0 < x < +Inf
-//	+2 if x == +Inf
-//
-func (x *Float) ord() int {
-	var m int
-	switch x.form {
-	case finite:
-		m = 1
-	case zero:
-		return 0
-	case inf:
-		m = 2
-	}
-	if x.neg {
-		m = -m
-	}
-	return m
-}
-
-func umax32(x, y uint32) uint32 {
-	if x > y {
-		return x
-	}
-	return y
-}
diff --git a/src/math/big/float_test.go b/src/math/big/float_test.go
deleted file mode 100644
index d3b214b..0000000
--- a/src/math/big/float_test.go
+++ /dev/null
@@ -1,1694 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package big
-
-import (
-	"fmt"
-	"math"
-	"strconv"
-	"strings"
-	"testing"
-)
-
-// Verify that ErrNaN implements the error interface.
-var _ error = ErrNaN{}
-
-func (x *Float) uint64() uint64 {
-	u, acc := x.Uint64()
-	if acc != Exact {
-		panic(fmt.Sprintf("%s is not a uint64", x.Text('g', 10)))
-	}
-	return u
-}
-
-func (x *Float) int64() int64 {
-	i, acc := x.Int64()
-	if acc != Exact {
-		panic(fmt.Sprintf("%s is not an int64", x.Text('g', 10)))
-	}
-	return i
-}
-
-func TestFloatZeroValue(t *testing.T) {
-	// zero (uninitialized) value is a ready-to-use 0.0
-	var x Float
-	if s := x.Text('f', 1); s != "0.0" {
-		t.Errorf("zero value = %s; want 0.0", s)
-	}
-
-	// zero value has precision 0
-	if prec := x.Prec(); prec != 0 {
-		t.Errorf("prec = %d; want 0", prec)
-	}
-
-	// zero value can be used in any and all positions of binary operations
-	make := func(x int) *Float {
-		var f Float
-		if x != 0 {
-			f.SetInt64(int64(x))
-		}
-		// x == 0 translates into the zero value
-		return &f
-	}
-	for _, test := range []struct {
-		z, x, y, want int
-		opname        rune
-		op            func(z, x, y *Float) *Float
-	}{
-		{0, 0, 0, 0, '+', (*Float).Add},
-		{0, 1, 2, 3, '+', (*Float).Add},
-		{1, 2, 0, 2, '+', (*Float).Add},
-		{2, 0, 1, 1, '+', (*Float).Add},
-
-		{0, 0, 0, 0, '-', (*Float).Sub},
-		{0, 1, 2, -1, '-', (*Float).Sub},
-		{1, 2, 0, 2, '-', (*Float).Sub},
-		{2, 0, 1, -1, '-', (*Float).Sub},
-
-		{0, 0, 0, 0, '*', (*Float).Mul},
-		{0, 1, 2, 2, '*', (*Float).Mul},
-		{1, 2, 0, 0, '*', (*Float).Mul},
-		{2, 0, 1, 0, '*', (*Float).Mul},
-
-		// {0, 0, 0, 0, '/', (*Float).Quo}, // panics
-		{0, 2, 1, 2, '/', (*Float).Quo},
-		{1, 2, 0, 0, '/', (*Float).Quo}, // = +Inf
-		{2, 0, 1, 0, '/', (*Float).Quo},
-	} {
-		z := make(test.z)
-		test.op(z, make(test.x), make(test.y))
-		got := 0
-		if !z.IsInf() {
-			got = int(z.int64())
-		}
-		if got != test.want {
-			t.Errorf("%d %c %d = %d; want %d", test.x, test.opname, test.y, got, test.want)
-		}
-	}
-
-	// TODO(gri) test how precision is set for zero value results
-}
-
-func makeFloat(s string) *Float {
-	x, _, err := ParseFloat(s, 0, 1000, ToNearestEven)
-	if err != nil {
-		panic(err)
-	}
-	return x
-}
-
-func TestFloatSetPrec(t *testing.T) {
-	for _, test := range []struct {
-		x    string
-		prec uint
-		want string
-		acc  Accuracy
-	}{
-		// prec 0
-		{"0", 0, "0", Exact},
-		{"-0", 0, "-0", Exact},
-		{"-Inf", 0, "-Inf", Exact},
-		{"+Inf", 0, "+Inf", Exact},
-		{"123", 0, "0", Below},
-		{"-123", 0, "-0", Above},
-
-		// prec at upper limit
-		{"0", MaxPrec, "0", Exact},
-		{"-0", MaxPrec, "-0", Exact},
-		{"-Inf", MaxPrec, "-Inf", Exact},
-		{"+Inf", MaxPrec, "+Inf", Exact},
-
-		// just a few regular cases - general rounding is tested elsewhere
-		{"1.5", 1, "2", Above},
-		{"-1.5", 1, "-2", Below},
-		{"123", 1e6, "123", Exact},
-		{"-123", 1e6, "-123", Exact},
-	} {
-		x := makeFloat(test.x).SetPrec(test.prec)
-		prec := test.prec
-		if prec > MaxPrec {
-			prec = MaxPrec
-		}
-		if got := x.Prec(); got != prec {
-			t.Errorf("%s.SetPrec(%d).Prec() == %d; want %d", test.x, test.prec, got, prec)
-		}
-		if got, acc := x.String(), x.Acc(); got != test.want || acc != test.acc {
-			t.Errorf("%s.SetPrec(%d) = %s (%s); want %s (%s)", test.x, test.prec, got, acc, test.want, test.acc)
-		}
-	}
-}
-
-func TestFloatMinPrec(t *testing.T) {
-	const max = 100
-	for _, test := range []struct {
-		x    string
-		want uint
-	}{
-		{"0", 0},
-		{"-0", 0},
-		{"+Inf", 0},
-		{"-Inf", 0},
-		{"1", 1},
-		{"2", 1},
-		{"3", 2},
-		{"0x8001", 16},
-		{"0x8001p-1000", 16},
-		{"0x8001p+1000", 16},
-		{"0.1", max},
-	} {
-		x := makeFloat(test.x).SetPrec(max)
-		if got := x.MinPrec(); got != test.want {
-			t.Errorf("%s.MinPrec() = %d; want %d", test.x, got, test.want)
-		}
-	}
-}
-
-func TestFloatSign(t *testing.T) {
-	for _, test := range []struct {
-		x string
-		s int
-	}{
-		{"-Inf", -1},
-		{"-1", -1},
-		{"-0", 0},
-		{"+0", 0},
-		{"+1", +1},
-		{"+Inf", +1},
-	} {
-		x := makeFloat(test.x)
-		s := x.Sign()
-		if s != test.s {
-			t.Errorf("%s.Sign() = %d; want %d", test.x, s, test.s)
-		}
-	}
-}
-
-// alike(x, y) is like x.Cmp(y) == 0 but also considers the sign of 0 (0 != -0).
-func alike(x, y *Float) bool {
-	return x.Cmp(y) == 0 && x.Signbit() == y.Signbit()
-}
-
-func alike32(x, y float32) bool {
-	// we can ignore NaNs
-	return x == y && math.Signbit(float64(x)) == math.Signbit(float64(y))
-
-}
-
-func alike64(x, y float64) bool {
-	// we can ignore NaNs
-	return x == y && math.Signbit(x) == math.Signbit(y)
-
-}
-
-func TestFloatMantExp(t *testing.T) {
-	for _, test := range []struct {
-		x    string
-		mant string
-		exp  int
-	}{
-		{"0", "0", 0},
-		{"+0", "0", 0},
-		{"-0", "-0", 0},
-		{"Inf", "+Inf", 0},
-		{"+Inf", "+Inf", 0},
-		{"-Inf", "-Inf", 0},
-		{"1.5", "0.75", 1},
-		{"1.024e3", "0.5", 11},
-		{"-0.125", "-0.5", -2},
-	} {
-		x := makeFloat(test.x)
-		mant := makeFloat(test.mant)
-		m := new(Float)
-		e := x.MantExp(m)
-		if !alike(m, mant) || e != test.exp {
-			t.Errorf("%s.MantExp() = %s, %d; want %s, %d", test.x, m.Text('g', 10), e, test.mant, test.exp)
-		}
-	}
-}
-
-func TestFloatMantExpAliasing(t *testing.T) {
-	x := makeFloat("0.5p10")
-	if e := x.MantExp(x); e != 10 {
-		t.Fatalf("Float.MantExp aliasing error: got %d; want 10", e)
-	}
-	if want := makeFloat("0.5"); !alike(x, want) {
-		t.Fatalf("Float.MantExp aliasing error: got %s; want %s", x.Text('g', 10), want.Text('g', 10))
-	}
-}
-
-func TestFloatSetMantExp(t *testing.T) {
-	for _, test := range []struct {
-		frac string
-		exp  int
-		z    string
-	}{
-		{"0", 0, "0"},
-		{"+0", 0, "0"},
-		{"-0", 0, "-0"},
-		{"Inf", 1234, "+Inf"},
-		{"+Inf", -1234, "+Inf"},
-		{"-Inf", -1234, "-Inf"},
-		{"0", MinExp, "0"},
-		{"0.25", MinExp, "+0"},    // exponent underflow
-		{"-0.25", MinExp, "-0"},   // exponent underflow
-		{"1", MaxExp, "+Inf"},     // exponent overflow
-		{"2", MaxExp - 1, "+Inf"}, // exponent overflow
-		{"0.75", 1, "1.5"},
-		{"0.5", 11, "1024"},
-		{"-0.5", -2, "-0.125"},
-		{"32", 5, "1024"},
-		{"1024", -10, "1"},
-	} {
-		frac := makeFloat(test.frac)
-		want := makeFloat(test.z)
-		var z Float
-		z.SetMantExp(frac, test.exp)
-		if !alike(&z, want) {
-			t.Errorf("SetMantExp(%s, %d) = %s; want %s", test.frac, test.exp, z.Text('g', 10), test.z)
-		}
-		// test inverse property
-		mant := new(Float)
-		if z.SetMantExp(mant, want.MantExp(mant)).Cmp(want) != 0 {
-			t.Errorf("Inverse property not satisfied: got %s; want %s", z.Text('g', 10), test.z)
-		}
-	}
-}
-
-func TestFloatPredicates(t *testing.T) {
-	for _, test := range []struct {
-		x            string
-		sign         int
-		signbit, inf bool
-	}{
-		{x: "-Inf", sign: -1, signbit: true, inf: true},
-		{x: "-1", sign: -1, signbit: true},
-		{x: "-0", signbit: true},
-		{x: "0"},
-		{x: "1", sign: 1},
-		{x: "+Inf", sign: 1, inf: true},
-	} {
-		x := makeFloat(test.x)
-		if got := x.Signbit(); got != test.signbit {
-			t.Errorf("(%s).Signbit() = %v; want %v", test.x, got, test.signbit)
-		}
-		if got := x.Sign(); got != test.sign {
-			t.Errorf("(%s).Sign() = %d; want %d", test.x, got, test.sign)
-		}
-		if got := x.IsInf(); got != test.inf {
-			t.Errorf("(%s).IsInf() = %v; want %v", test.x, got, test.inf)
-		}
-	}
-}
-
-func TestFloatIsInt(t *testing.T) {
-	for _, test := range []string{
-		"0 int",
-		"-0 int",
-		"1 int",
-		"-1 int",
-		"0.5",
-		"1.23",
-		"1.23e1",
-		"1.23e2 int",
-		"0.000000001e+8",
-		"0.000000001e+9 int",
-		"1.2345e200 int",
-		"Inf",
-		"+Inf",
-		"-Inf",
-	} {
-		s := strings.TrimSuffix(test, " int")
-		want := s != test
-		if got := makeFloat(s).IsInt(); got != want {
-			t.Errorf("%s.IsInt() == %t", s, got)
-		}
-	}
-}
-
-func fromBinary(s string) int64 {
-	x, err := strconv.ParseInt(s, 2, 64)
-	if err != nil {
-		panic(err)
-	}
-	return x
-}
-
-func toBinary(x int64) string {
-	return strconv.FormatInt(x, 2)
-}
-
-func testFloatRound(t *testing.T, x, r int64, prec uint, mode RoundingMode) {
-	// verify test data
-	var ok bool
-	switch mode {
-	case ToNearestEven, ToNearestAway:
-		ok = true // nothing to do for now
-	case ToZero:
-		if x < 0 {
-			ok = r >= x
-		} else {
-			ok = r <= x
-		}
-	case AwayFromZero:
-		if x < 0 {
-			ok = r <= x
-		} else {
-			ok = r >= x
-		}
-	case ToNegativeInf:
-		ok = r <= x
-	case ToPositiveInf:
-		ok = r >= x
-	default:
-		panic("unreachable")
-	}
-	if !ok {
-		t.Fatalf("incorrect test data for prec = %d, %s: x = %s, r = %s", prec, mode, toBinary(x), toBinary(r))
-	}
-
-	// compute expected accuracy
-	a := Exact
-	switch {
-	case r < x:
-		a = Below
-	case r > x:
-		a = Above
-	}
-
-	// round
-	f := new(Float).SetMode(mode).SetInt64(x).SetPrec(prec)
-
-	// check result
-	r1 := f.int64()
-	p1 := f.Prec()
-	a1 := f.Acc()
-	if r1 != r || p1 != prec || a1 != a {
-		t.Errorf("round %s (%d bits, %s) incorrect: got %s (%d bits, %s); want %s (%d bits, %s)",
-			toBinary(x), prec, mode,
-			toBinary(r1), p1, a1,
-			toBinary(r), prec, a)
-		return
-	}
-
-	// g and f should be the same
-	// (rounding by SetPrec after SetInt64 using default precision
-	// should be the same as rounding by SetInt64 after setting the
-	// precision)
-	g := new(Float).SetMode(mode).SetPrec(prec).SetInt64(x)
-	if !alike(g, f) {
-		t.Errorf("round %s (%d bits, %s) not symmetric: got %s and %s; want %s",
-			toBinary(x), prec, mode,
-			toBinary(g.int64()),
-			toBinary(r1),
-			toBinary(r),
-		)
-		return
-	}
-
-	// h and f should be the same
-	// (repeated rounding should be idempotent)
-	h := new(Float).SetMode(mode).SetPrec(prec).Set(f)
-	if !alike(h, f) {
-		t.Errorf("round %s (%d bits, %s) not idempotent: got %s and %s; want %s",
-			toBinary(x), prec, mode,
-			toBinary(h.int64()),
-			toBinary(r1),
-			toBinary(r),
-		)
-		return
-	}
-}
-
-// TestFloatRound tests basic rounding.
-func TestFloatRound(t *testing.T) {
-	for _, test := range []struct {
-		prec                        uint
-		x, zero, neven, naway, away string // input, results rounded to prec bits
-	}{
-		{5, "1000", "1000", "1000", "1000", "1000"},
-		{5, "1001", "1001", "1001", "1001", "1001"},
-		{5, "1010", "1010", "1010", "1010", "1010"},
-		{5, "1011", "1011", "1011", "1011", "1011"},
-		{5, "1100", "1100", "1100", "1100", "1100"},
-		{5, "1101", "1101", "1101", "1101", "1101"},
-		{5, "1110", "1110", "1110", "1110", "1110"},
-		{5, "1111", "1111", "1111", "1111", "1111"},
-
-		{4, "1000", "1000", "1000", "1000", "1000"},
-		{4, "1001", "1001", "1001", "1001", "1001"},
-		{4, "1010", "1010", "1010", "1010", "1010"},
-		{4, "1011", "1011", "1011", "1011", "1011"},
-		{4, "1100", "1100", "1100", "1100", "1100"},
-		{4, "1101", "1101", "1101", "1101", "1101"},
-		{4, "1110", "1110", "1110", "1110", "1110"},
-		{4, "1111", "1111", "1111", "1111", "1111"},
-
-		{3, "1000", "1000", "1000", "1000", "1000"},
-		{3, "1001", "1000", "1000", "1010", "1010"},
-		{3, "1010", "1010", "1010", "1010", "1010"},
-		{3, "1011", "1010", "1100", "1100", "1100"},
-		{3, "1100", "1100", "1100", "1100", "1100"},
-		{3, "1101", "1100", "1100", "1110", "1110"},
-		{3, "1110", "1110", "1110", "1110", "1110"},
-		{3, "1111", "1110", "10000", "10000", "10000"},
-
-		{3, "1000001", "1000000", "1000000", "1000000", "1010000"},
-		{3, "1001001", "1000000", "1010000", "1010000", "1010000"},
-		{3, "1010001", "1010000", "1010000", "1010000", "1100000"},
-		{3, "1011001", "1010000", "1100000", "1100000", "1100000"},
-		{3, "1100001", "1100000", "1100000", "1100000", "1110000"},
-		{3, "1101001", "1100000", "1110000", "1110000", "1110000"},
-		{3, "1110001", "1110000", "1110000", "1110000", "10000000"},
-		{3, "1111001", "1110000", "10000000", "10000000", "10000000"},
-
-		{2, "1000", "1000", "1000", "1000", "1000"},
-		{2, "1001", "1000", "1000", "1000", "1100"},
-		{2, "1010", "1000", "1000", "1100", "1100"},
-		{2, "1011", "1000", "1100", "1100", "1100"},
-		{2, "1100", "1100", "1100", "1100", "1100"},
-		{2, "1101", "1100", "1100", "1100", "10000"},
-		{2, "1110", "1100", "10000", "10000", "10000"},
-		{2, "1111", "1100", "10000", "10000", "10000"},
-
-		{2, "1000001", "1000000", "1000000", "1000000", "1100000"},
-		{2, "1001001", "1000000", "1000000", "1000000", "1100000"},
-		{2, "1010001", "1000000", "1100000", "1100000", "1100000"},
-		{2, "1011001", "1000000", "1100000", "1100000", "1100000"},
-		{2, "1100001", "1100000", "1100000", "1100000", "10000000"},
-		{2, "1101001", "1100000", "1100000", "1100000", "10000000"},
-		{2, "1110001", "1100000", "10000000", "10000000", "10000000"},
-		{2, "1111001", "1100000", "10000000", "10000000", "10000000"},
-
-		{1, "1000", "1000", "1000", "1000", "1000"},
-		{1, "1001", "1000", "1000", "1000", "10000"},
-		{1, "1010", "1000", "1000", "1000", "10000"},
-		{1, "1011", "1000", "1000", "1000", "10000"},
-		{1, "1100", "1000", "10000", "10000", "10000"},
-		{1, "1101", "1000", "10000", "10000", "10000"},
-		{1, "1110", "1000", "10000", "10000", "10000"},
-		{1, "1111", "1000", "10000", "10000", "10000"},
-
-		{1, "1000001", "1000000", "1000000", "1000000", "10000000"},
-		{1, "1001001", "1000000", "1000000", "1000000", "10000000"},
-		{1, "1010001", "1000000", "1000000", "1000000", "10000000"},
-		{1, "1011001", "1000000", "1000000", "1000000", "10000000"},
-		{1, "1100001", "1000000", "10000000", "10000000", "10000000"},
-		{1, "1101001", "1000000", "10000000", "10000000", "10000000"},
-		{1, "1110001", "1000000", "10000000", "10000000", "10000000"},
-		{1, "1111001", "1000000", "10000000", "10000000", "10000000"},
-	} {
-		x := fromBinary(test.x)
-		z := fromBinary(test.zero)
-		e := fromBinary(test.neven)
-		n := fromBinary(test.naway)
-		a := fromBinary(test.away)
-		prec := test.prec
-
-		testFloatRound(t, x, z, prec, ToZero)
-		testFloatRound(t, x, e, prec, ToNearestEven)
-		testFloatRound(t, x, n, prec, ToNearestAway)
-		testFloatRound(t, x, a, prec, AwayFromZero)
-
-		testFloatRound(t, x, z, prec, ToNegativeInf)
-		testFloatRound(t, x, a, prec, ToPositiveInf)
-
-		testFloatRound(t, -x, -a, prec, ToNegativeInf)
-		testFloatRound(t, -x, -z, prec, ToPositiveInf)
-	}
-}
-
-// TestFloatRound24 tests that rounding a float64 to 24 bits
-// matches IEEE-754 rounding to nearest when converting a
-// float64 to a float32 (excluding denormal numbers).
-func TestFloatRound24(t *testing.T) {
-	const x0 = 1<<26 - 0x10 // 11...110000 (26 bits)
-	for d := 0; d <= 0x10; d++ {
-		x := float64(x0 + d)
-		f := new(Float).SetPrec(24).SetFloat64(x)
-		got, _ := f.Float32()
-		want := float32(x)
-		if got != want {
-			t.Errorf("Round(%g, 24) = %g; want %g", x, got, want)
-		}
-	}
-}
-
-func TestFloatSetUint64(t *testing.T) {
-	for _, want := range []uint64{
-		0,
-		1,
-		2,
-		10,
-		100,
-		1<<32 - 1,
-		1 << 32,
-		1<<64 - 1,
-	} {
-		var f Float
-		f.SetUint64(want)
-		if got := f.uint64(); got != want {
-			t.Errorf("got %#x (%s); want %#x", got, f.Text('p', 0), want)
-		}
-	}
-
-	// test basic rounding behavior (exhaustive rounding testing is done elsewhere)
-	const x uint64 = 0x8765432187654321 // 64 bits needed
-	for prec := uint(1); prec <= 64; prec++ {
-		f := new(Float).SetPrec(prec).SetMode(ToZero).SetUint64(x)
-		got := f.uint64()
-		want := x &^ (1<<(64-prec) - 1) // cut off (round to zero) low 64-prec bits
-		if got != want {
-			t.Errorf("got %#x (%s); want %#x", got, f.Text('p', 0), want)
-		}
-	}
-}
-
-func TestFloatSetInt64(t *testing.T) {
-	for _, want := range []int64{
-		0,
-		1,
-		2,
-		10,
-		100,
-		1<<32 - 1,
-		1 << 32,
-		1<<63 - 1,
-	} {
-		for i := range [2]int{} {
-			if i&1 != 0 {
-				want = -want
-			}
-			var f Float
-			f.SetInt64(want)
-			if got := f.int64(); got != want {
-				t.Errorf("got %#x (%s); want %#x", got, f.Text('p', 0), want)
-			}
-		}
-	}
-
-	// test basic rounding behavior (exhaustive rounding testing is done elsewhere)
-	const x int64 = 0x7654321076543210 // 63 bits needed
-	for prec := uint(1); prec <= 63; prec++ {
-		f := new(Float).SetPrec(prec).SetMode(ToZero).SetInt64(x)
-		got := f.int64()
-		want := x &^ (1<<(63-prec) - 1) // cut off (round to zero) low 63-prec bits
-		if got != want {
-			t.Errorf("got %#x (%s); want %#x", got, f.Text('p', 0), want)
-		}
-	}
-}
-
-func TestFloatSetFloat64(t *testing.T) {
-	for _, want := range []float64{
-		0,
-		1,
-		2,
-		12345,
-		1e10,
-		1e100,
-		3.14159265e10,
-		2.718281828e-123,
-		1.0 / 3,
-		math.MaxFloat32,
-		math.MaxFloat64,
-		math.SmallestNonzeroFloat32,
-		math.SmallestNonzeroFloat64,
-		math.Inf(-1),
-		math.Inf(0),
-		-math.Inf(1),
-	} {
-		for i := range [2]int{} {
-			if i&1 != 0 {
-				want = -want
-			}
-			var f Float
-			f.SetFloat64(want)
-			if got, acc := f.Float64(); got != want || acc != Exact {
-				t.Errorf("got %g (%s, %s); want %g (Exact)", got, f.Text('p', 0), acc, want)
-			}
-		}
-	}
-
-	// test basic rounding behavior (exhaustive rounding testing is done elsewhere)
-	const x uint64 = 0x8765432143218 // 53 bits needed
-	for prec := uint(1); prec <= 52; prec++ {
-		f := new(Float).SetPrec(prec).SetMode(ToZero).SetFloat64(float64(x))
-		got, _ := f.Float64()
-		want := float64(x &^ (1<<(52-prec) - 1)) // cut off (round to zero) low 53-prec bits
-		if got != want {
-			t.Errorf("got %g (%s); want %g", got, f.Text('p', 0), want)
-		}
-	}
-
-	// test NaN
-	defer func() {
-		if p, ok := recover().(ErrNaN); !ok {
-			t.Errorf("got %v; want ErrNaN panic", p)
-		}
-	}()
-	var f Float
-	f.SetFloat64(math.NaN())
-	// should not reach here
-	t.Errorf("got %s; want ErrNaN panic", f.Text('p', 0))
-}
-
-func TestFloatSetInt(t *testing.T) {
-	for _, want := range []string{
-		"0",
-		"1",
-		"-1",
-		"1234567890",
-		"123456789012345678901234567890",
-		"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890",
-	} {
-		var x Int
-		_, ok := x.SetString(want, 0)
-		if !ok {
-			t.Errorf("invalid integer %s", want)
-			continue
-		}
-		n := x.BitLen()
-
-		var f Float
-		f.SetInt(&x)
-
-		// check precision
-		if n < 64 {
-			n = 64
-		}
-		if prec := f.Prec(); prec != uint(n) {
-			t.Errorf("got prec = %d; want %d", prec, n)
-		}
-
-		// check value
-		got := f.Text('g', 100)
-		if got != want {
-			t.Errorf("got %s (%s); want %s", got, f.Text('p', 0), want)
-		}
-	}
-
-	// TODO(gri) test basic rounding behavior
-}
-
-func TestFloatSetRat(t *testing.T) {
-	for _, want := range []string{
-		"0",
-		"1",
-		"-1",
-		"1234567890",
-		"123456789012345678901234567890",
-		"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890",
-		"1.2",
-		"3.14159265",
-		// TODO(gri) expand
-	} {
-		var x Rat
-		_, ok := x.SetString(want)
-		if !ok {
-			t.Errorf("invalid fraction %s", want)
-			continue
-		}
-		n := max(x.Num().BitLen(), x.Denom().BitLen())
-
-		var f1, f2 Float
-		f2.SetPrec(1000)
-		f1.SetRat(&x)
-		f2.SetRat(&x)
-
-		// check precision when set automatically
-		if n < 64 {
-			n = 64
-		}
-		if prec := f1.Prec(); prec != uint(n) {
-			t.Errorf("got prec = %d; want %d", prec, n)
-		}
-
-		got := f2.Text('g', 100)
-		if got != want {
-			t.Errorf("got %s (%s); want %s", got, f2.Text('p', 0), want)
-		}
-	}
-}
-
-func TestFloatSetInf(t *testing.T) {
-	var f Float
-	for _, test := range []struct {
-		signbit bool
-		prec    uint
-		want    string
-	}{
-		{false, 0, "+Inf"},
-		{true, 0, "-Inf"},
-		{false, 10, "+Inf"},
-		{true, 30, "-Inf"},
-	} {
-		x := f.SetPrec(test.prec).SetInf(test.signbit)
-		if got := x.String(); got != test.want || x.Prec() != test.prec {
-			t.Errorf("SetInf(%v) = %s (prec = %d); want %s (prec = %d)", test.signbit, got, x.Prec(), test.want, test.prec)
-		}
-	}
-}
-
-func TestFloatUint64(t *testing.T) {
-	for _, test := range []struct {
-		x   string
-		out uint64
-		acc Accuracy
-	}{
-		{"-Inf", 0, Above},
-		{"-1", 0, Above},
-		{"-1e-1000", 0, Above},
-		{"-0", 0, Exact},
-		{"0", 0, Exact},
-		{"1e-1000", 0, Below},
-		{"1", 1, Exact},
-		{"1.000000000000000000001", 1, Below},
-		{"12345.0", 12345, Exact},
-		{"12345.000000000000000000001", 12345, Below},
-		{"18446744073709551615", 18446744073709551615, Exact},
-		{"18446744073709551615.000000000000000000001", math.MaxUint64, Below},
-		{"18446744073709551616", math.MaxUint64, Below},
-		{"1e10000", math.MaxUint64, Below},
-		{"+Inf", math.MaxUint64, Below},
-	} {
-		x := makeFloat(test.x)
-		out, acc := x.Uint64()
-		if out != test.out || acc != test.acc {
-			t.Errorf("%s: got %d (%s); want %d (%s)", test.x, out, acc, test.out, test.acc)
-		}
-	}
-}
-
-func TestFloatInt64(t *testing.T) {
-	for _, test := range []struct {
-		x   string
-		out int64
-		acc Accuracy
-	}{
-		{"-Inf", math.MinInt64, Above},
-		{"-1e10000", math.MinInt64, Above},
-		{"-9223372036854775809", math.MinInt64, Above},
-		{"-9223372036854775808.000000000000000000001", math.MinInt64, Above},
-		{"-9223372036854775808", -9223372036854775808, Exact},
-		{"-9223372036854775807.000000000000000000001", -9223372036854775807, Above},
-		{"-9223372036854775807", -9223372036854775807, Exact},
-		{"-12345.000000000000000000001", -12345, Above},
-		{"-12345.0", -12345, Exact},
-		{"-1.000000000000000000001", -1, Above},
-		{"-1.5", -1, Above},
-		{"-1", -1, Exact},
-		{"-1e-1000", 0, Above},
-		{"0", 0, Exact},
-		{"1e-1000", 0, Below},
-		{"1", 1, Exact},
-		{"1.000000000000000000001", 1, Below},
-		{"1.5", 1, Below},
-		{"12345.0", 12345, Exact},
-		{"12345.000000000000000000001", 12345, Below},
-		{"9223372036854775807", 9223372036854775807, Exact},
-		{"9223372036854775807.000000000000000000001", math.MaxInt64, Below},
-		{"9223372036854775808", math.MaxInt64, Below},
-		{"1e10000", math.MaxInt64, Below},
-		{"+Inf", math.MaxInt64, Below},
-	} {
-		x := makeFloat(test.x)
-		out, acc := x.Int64()
-		if out != test.out || acc != test.acc {
-			t.Errorf("%s: got %d (%s); want %d (%s)", test.x, out, acc, test.out, test.acc)
-		}
-	}
-}
-
-func TestFloatFloat32(t *testing.T) {
-	for _, test := range []struct {
-		x   string
-		out float32
-		acc Accuracy
-	}{
-		{"0", 0, Exact},
-
-		// underflow
-		{"1e-1000", 0, Below},
-		{"0x0.000002p-127", 0, Below},
-		{"0x.0000010p-126", 0, Below},
-
-		// denormals
-		{"1.401298464e-45", math.SmallestNonzeroFloat32, Above}, // rounded up to smallest denormal
-		{"0x.ffffff8p-149", math.SmallestNonzeroFloat32, Above}, // rounded up to smallest denormal
-		{"0x.0000018p-126", math.SmallestNonzeroFloat32, Above}, // rounded up to smallest denormal
-		{"0x.0000020p-126", math.SmallestNonzeroFloat32, Exact},
-		{"0x.8p-148", math.SmallestNonzeroFloat32, Exact},
-		{"1p-149", math.SmallestNonzeroFloat32, Exact},
-		{"0x.fffffep-126", math.Float32frombits(0x7fffff), Exact}, // largest denormal
-
-		// normals
-		{"0x.ffffffp-126", math.Float32frombits(0x00800000), Above}, // rounded up to smallest normal
-		{"1p-126", math.Float32frombits(0x00800000), Exact},         // smallest normal
-		{"0x1.fffffep-126", math.Float32frombits(0x00ffffff), Exact},
-		{"0x1.ffffffp-126", math.Float32frombits(0x01000000), Above}, // rounded up
-		{"1", 1, Exact},
-		{"1.000000000000000000001", 1, Below},
-		{"12345.0", 12345, Exact},
-		{"12345.000000000000000000001", 12345, Below},
-		{"0x1.fffffe0p127", math.MaxFloat32, Exact},
-		{"0x1.fffffe8p127", math.MaxFloat32, Below},
-
-		// overflow
-		{"0x1.ffffff0p127", float32(math.Inf(+1)), Above},
-		{"0x1p128", float32(math.Inf(+1)), Above},
-		{"1e10000", float32(math.Inf(+1)), Above},
-		{"0x1.ffffff0p2147483646", float32(math.Inf(+1)), Above}, // overflow in rounding
-
-		// inf
-		{"Inf", float32(math.Inf(+1)), Exact},
-	} {
-		for i := 0; i < 2; i++ {
-			// test both signs
-			tx, tout, tacc := test.x, test.out, test.acc
-			if i != 0 {
-				tx = "-" + tx
-				tout = -tout
-				tacc = -tacc
-			}
-
-			// conversion should match strconv where syntax is agreeable
-			if f, err := strconv.ParseFloat(tx, 32); err == nil && !alike32(float32(f), tout) {
-				t.Errorf("%s: got %g; want %g (incorrect test data)", tx, f, tout)
-			}
-
-			x := makeFloat(tx)
-			out, acc := x.Float32()
-			if !alike32(out, tout) || acc != tacc {
-				t.Errorf("%s: got %g (%#x, %s); want %g (%#x, %s)", tx, out, math.Float32bits(out), acc, test.out, math.Float32bits(test.out), tacc)
-			}
-
-			// test that x.SetFloat64(float64(f)).Float32() == f
-			var x2 Float
-			out2, acc2 := x2.SetFloat64(float64(out)).Float32()
-			if !alike32(out2, out) || acc2 != Exact {
-				t.Errorf("idempotency test: got %g (%s); want %g (Exact)", out2, acc2, out)
-			}
-		}
-	}
-}
-
-func TestFloatFloat64(t *testing.T) {
-	const smallestNormalFloat64 = 2.2250738585072014e-308 // 1p-1022
-	for _, test := range []struct {
-		x   string
-		out float64
-		acc Accuracy
-	}{
-		{"0", 0, Exact},
-
-		// underflow
-		{"1e-1000", 0, Below},
-		{"0x0.0000000000001p-1023", 0, Below},
-		{"0x0.00000000000008p-1022", 0, Below},
-
-		// denormals
-		{"0x0.0000000000000cp-1022", math.SmallestNonzeroFloat64, Above}, // rounded up to smallest denormal
-		{"0x0.0000000000001p-1022", math.SmallestNonzeroFloat64, Exact},  // smallest denormal
-		{"0x.8p-1073", math.SmallestNonzeroFloat64, Exact},
-		{"1p-1074", math.SmallestNonzeroFloat64, Exact},
-		{"0x.fffffffffffffp-1022", math.Float64frombits(0x000fffffffffffff), Exact}, // largest denormal
-
-		// normals
-		{"0x.fffffffffffff8p-1022", math.Float64frombits(0x0010000000000000), Above}, // rounded up to smallest normal
-		{"1p-1022", math.Float64frombits(0x0010000000000000), Exact},                 // smallest normal
-		{"1", 1, Exact},
-		{"1.000000000000000000001", 1, Below},
-		{"12345.0", 12345, Exact},
-		{"12345.000000000000000000001", 12345, Below},
-		{"0x1.fffffffffffff0p1023", math.MaxFloat64, Exact},
-		{"0x1.fffffffffffff4p1023", math.MaxFloat64, Below},
-
-		// overflow
-		{"0x1.fffffffffffff8p1023", math.Inf(+1), Above},
-		{"0x1p1024", math.Inf(+1), Above},
-		{"1e10000", math.Inf(+1), Above},
-		{"0x1.fffffffffffff8p2147483646", math.Inf(+1), Above}, // overflow in rounding
-		{"Inf", math.Inf(+1), Exact},
-
-		// selected denormalized values that were handled incorrectly in the past
-		{"0x.fffffffffffffp-1022", smallestNormalFloat64 - math.SmallestNonzeroFloat64, Exact},
-		{"4503599627370495p-1074", smallestNormalFloat64 - math.SmallestNonzeroFloat64, Exact},
-
-		// http://www.exploringbinary.com/php-hangs-on-numeric-value-2-2250738585072011e-308/
-		{"2.2250738585072011e-308", 2.225073858507201e-308, Below},
-		// http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
-		{"2.2250738585072012e-308", 2.2250738585072014e-308, Above},
-	} {
-		for i := 0; i < 2; i++ {
-			// test both signs
-			tx, tout, tacc := test.x, test.out, test.acc
-			if i != 0 {
-				tx = "-" + tx
-				tout = -tout
-				tacc = -tacc
-			}
-
-			// conversion should match strconv where syntax is agreeable
-			if f, err := strconv.ParseFloat(tx, 64); err == nil && !alike64(f, tout) {
-				t.Errorf("%s: got %g; want %g (incorrect test data)", tx, f, tout)
-			}
-
-			x := makeFloat(tx)
-			out, acc := x.Float64()
-			if !alike64(out, tout) || acc != tacc {
-				t.Errorf("%s: got %g (%#x, %s); want %g (%#x, %s)", tx, out, math.Float64bits(out), acc, test.out, math.Float64bits(test.out), tacc)
-			}
-
-			// test that x.SetFloat64(f).Float64() == f
-			var x2 Float
-			out2, acc2 := x2.SetFloat64(out).Float64()
-			if !alike64(out2, out) || acc2 != Exact {
-				t.Errorf("idempotency test: got %g (%s); want %g (Exact)", out2, acc2, out)
-			}
-		}
-	}
-}
-
-func TestFloatInt(t *testing.T) {
-	for _, test := range []struct {
-		x    string
-		want string
-		acc  Accuracy
-	}{
-		{"0", "0", Exact},
-		{"+0", "0", Exact},
-		{"-0", "0", Exact},
-		{"Inf", "nil", Below},
-		{"+Inf", "nil", Below},
-		{"-Inf", "nil", Above},
-		{"1", "1", Exact},
-		{"-1", "-1", Exact},
-		{"1.23", "1", Below},
-		{"-1.23", "-1", Above},
-		{"123e-2", "1", Below},
-		{"123e-3", "0", Below},
-		{"123e-4", "0", Below},
-		{"1e-1000", "0", Below},
-		{"-1e-1000", "0", Above},
-		{"1e+10", "10000000000", Exact},
-		{"1e+100", "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", Exact},
-	} {
-		x := makeFloat(test.x)
-		res, acc := x.Int(nil)
-		got := "nil"
-		if res != nil {
-			got = res.String()
-		}
-		if got != test.want || acc != test.acc {
-			t.Errorf("%s: got %s (%s); want %s (%s)", test.x, got, acc, test.want, test.acc)
-		}
-	}
-
-	// check that supplied *Int is used
-	for _, f := range []string{"0", "1", "-1", "1234"} {
-		x := makeFloat(f)
-		i := new(Int)
-		if res, _ := x.Int(i); res != i {
-			t.Errorf("(%s).Int is not using supplied *Int", f)
-		}
-	}
-}
-
-func TestFloatRat(t *testing.T) {
-	for _, test := range []struct {
-		x, want string
-		acc     Accuracy
-	}{
-		{"0", "0/1", Exact},
-		{"+0", "0/1", Exact},
-		{"-0", "0/1", Exact},
-		{"Inf", "nil", Below},
-		{"+Inf", "nil", Below},
-		{"-Inf", "nil", Above},
-		{"1", "1/1", Exact},
-		{"-1", "-1/1", Exact},
-		{"1.25", "5/4", Exact},
-		{"-1.25", "-5/4", Exact},
-		{"1e10", "10000000000/1", Exact},
-		{"1p10", "1024/1", Exact},
-		{"-1p-10", "-1/1024", Exact},
-		{"3.14159265", "7244019449799623199/2305843009213693952", Exact},
-	} {
-		x := makeFloat(test.x).SetPrec(64)
-		res, acc := x.Rat(nil)
-		got := "nil"
-		if res != nil {
-			got = res.String()
-		}
-		if got != test.want {
-			t.Errorf("%s: got %s; want %s", test.x, got, test.want)
-			continue
-		}
-		if acc != test.acc {
-			t.Errorf("%s: got %s; want %s", test.x, acc, test.acc)
-			continue
-		}
-
-		// inverse conversion
-		if res != nil {
-			got := new(Float).SetPrec(64).SetRat(res)
-			if got.Cmp(x) != 0 {
-				t.Errorf("%s: got %s; want %s", test.x, got, x)
-			}
-		}
-	}
-
-	// check that supplied *Rat is used
-	for _, f := range []string{"0", "1", "-1", "1234"} {
-		x := makeFloat(f)
-		r := new(Rat)
-		if res, _ := x.Rat(r); res != r {
-			t.Errorf("(%s).Rat is not using supplied *Rat", f)
-		}
-	}
-}
-
-func TestFloatAbs(t *testing.T) {
-	for _, test := range []string{
-		"0",
-		"1",
-		"1234",
-		"1.23e-2",
-		"1e-1000",
-		"1e1000",
-		"Inf",
-	} {
-		p := makeFloat(test)
-		a := new(Float).Abs(p)
-		if !alike(a, p) {
-			t.Errorf("%s: got %s; want %s", test, a.Text('g', 10), test)
-		}
-
-		n := makeFloat("-" + test)
-		a.Abs(n)
-		if !alike(a, p) {
-			t.Errorf("-%s: got %s; want %s", test, a.Text('g', 10), test)
-		}
-	}
-}
-
-func TestFloatNeg(t *testing.T) {
-	for _, test := range []string{
-		"0",
-		"1",
-		"1234",
-		"1.23e-2",
-		"1e-1000",
-		"1e1000",
-		"Inf",
-	} {
-		p1 := makeFloat(test)
-		n1 := makeFloat("-" + test)
-		n2 := new(Float).Neg(p1)
-		p2 := new(Float).Neg(n2)
-		if !alike(n2, n1) {
-			t.Errorf("%s: got %s; want %s", test, n2.Text('g', 10), n1.Text('g', 10))
-		}
-		if !alike(p2, p1) {
-			t.Errorf("%s: got %s; want %s", test, p2.Text('g', 10), p1.Text('g', 10))
-		}
-	}
-}
-
-func TestFloatInc(t *testing.T) {
-	const n = 10
-	for _, prec := range precList {
-		if 1<<prec < n {
-			continue // prec must be large enough to hold all numbers from 0 to n
-		}
-		var x, one Float
-		x.SetPrec(prec)
-		one.SetInt64(1)
-		for i := 0; i < n; i++ {
-			x.Add(&x, &one)
-		}
-		if x.Cmp(new(Float).SetInt64(n)) != 0 {
-			t.Errorf("prec = %d: got %s; want %d", prec, &x, n)
-		}
-	}
-}
-
-// Selected precisions with which to run various tests.
-var precList = [...]uint{1, 2, 5, 8, 10, 16, 23, 24, 32, 50, 53, 64, 100, 128, 500, 511, 512, 513, 1000, 10000}
-
-// Selected bits with which to run various tests.
-// Each entry is a list of bits representing a floating-point number (see fromBits).
-var bitsList = [...]Bits{
-	{},           // = 0
-	{0},          // = 1
-	{1},          // = 2
-	{-1},         // = 1/2
-	{10},         // = 2**10 == 1024
-	{-10},        // = 2**-10 == 1/1024
-	{100, 10, 1}, // = 2**100 + 2**10 + 2**1
-	{0, -1, -2, -10},
-	// TODO(gri) add more test cases
-}
-
-// TestFloatAdd tests Float.Add/Sub by comparing the result of a "manual"
-// addition/subtraction of arguments represented by Bits values with the
-// respective Float addition/subtraction for a variety of precisions
-// and rounding modes.
-func TestFloatAdd(t *testing.T) {
-	for _, xbits := range bitsList {
-		for _, ybits := range bitsList {
-			// exact values
-			x := xbits.Float()
-			y := ybits.Float()
-			zbits := xbits.add(ybits)
-			z := zbits.Float()
-
-			for i, mode := range [...]RoundingMode{ToZero, ToNearestEven, AwayFromZero} {
-				for _, prec := range precList {
-					got := new(Float).SetPrec(prec).SetMode(mode)
-					got.Add(x, y)
-					want := zbits.round(prec, mode)
-					if got.Cmp(want) != 0 {
-						t.Errorf("i = %d, prec = %d, %s:\n\t     %s %v\n\t+    %s %v\n\t=    %s\n\twant %s",
-							i, prec, mode, x, xbits, y, ybits, got, want)
-					}
-
-					got.Sub(z, x)
-					want = ybits.round(prec, mode)
-					if got.Cmp(want) != 0 {
-						t.Errorf("i = %d, prec = %d, %s:\n\t     %s %v\n\t-    %s %v\n\t=    %s\n\twant %s",
-							i, prec, mode, z, zbits, x, xbits, got, want)
-					}
-				}
-			}
-		}
-	}
-}
-
-// TestFloatAdd32 tests that Float.Add/Sub of numbers with
-// 24bit mantissa behaves like float32 addition/subtraction
-// (excluding denormal numbers).
-func TestFloatAdd32(t *testing.T) {
-	// chose base such that we cross the mantissa precision limit
-	const base = 1<<26 - 0x10 // 11...110000 (26 bits)
-	for d := 0; d <= 0x10; d++ {
-		for i := range [2]int{} {
-			x0, y0 := float64(base), float64(d)
-			if i&1 != 0 {
-				x0, y0 = y0, x0
-			}
-
-			x := NewFloat(x0)
-			y := NewFloat(y0)
-			z := new(Float).SetPrec(24)
-
-			z.Add(x, y)
-			got, acc := z.Float32()
-			want := float32(y0) + float32(x0)
-			if got != want || acc != Exact {
-				t.Errorf("d = %d: %g + %g = %g (%s); want %g (Exact)", d, x0, y0, got, acc, want)
-			}
-
-			z.Sub(z, y)
-			got, acc = z.Float32()
-			want = float32(want) - float32(y0)
-			if got != want || acc != Exact {
-				t.Errorf("d = %d: %g - %g = %g (%s); want %g (Exact)", d, x0+y0, y0, got, acc, want)
-			}
-		}
-	}
-}
-
-// TestFloatAdd64 tests that Float.Add/Sub of numbers with
-// 53bit mantissa behaves like float64 addition/subtraction.
-func TestFloatAdd64(t *testing.T) {
-	// chose base such that we cross the mantissa precision limit
-	const base = 1<<55 - 0x10 // 11...110000 (55 bits)
-	for d := 0; d <= 0x10; d++ {
-		for i := range [2]int{} {
-			x0, y0 := float64(base), float64(d)
-			if i&1 != 0 {
-				x0, y0 = y0, x0
-			}
-
-			x := NewFloat(x0)
-			y := NewFloat(y0)
-			z := new(Float).SetPrec(53)
-
-			z.Add(x, y)
-			got, acc := z.Float64()
-			want := x0 + y0
-			if got != want || acc != Exact {
-				t.Errorf("d = %d: %g + %g = %g (%s); want %g (Exact)", d, x0, y0, got, acc, want)
-			}
-
-			z.Sub(z, y)
-			got, acc = z.Float64()
-			want -= y0
-			if got != want || acc != Exact {
-				t.Errorf("d = %d: %g - %g = %g (%s); want %g (Exact)", d, x0+y0, y0, got, acc, want)
-			}
-		}
-	}
-}
-
-// TestFloatMul tests Float.Mul/Quo by comparing the result of a "manual"
-// multiplication/division of arguments represented by Bits values with the
-// respective Float multiplication/division for a variety of precisions
-// and rounding modes.
-func TestFloatMul(t *testing.T) {
-	for _, xbits := range bitsList {
-		for _, ybits := range bitsList {
-			// exact values
-			x := xbits.Float()
-			y := ybits.Float()
-			zbits := xbits.mul(ybits)
-			z := zbits.Float()
-
-			for i, mode := range [...]RoundingMode{ToZero, ToNearestEven, AwayFromZero} {
-				for _, prec := range precList {
-					got := new(Float).SetPrec(prec).SetMode(mode)
-					got.Mul(x, y)
-					want := zbits.round(prec, mode)
-					if got.Cmp(want) != 0 {
-						t.Errorf("i = %d, prec = %d, %s:\n\t     %s %v\n\t*    %s %v\n\t=    %s\n\twant %s",
-							i, prec, mode, x, xbits, y, ybits, got, want)
-					}
-
-					if x.Sign() == 0 {
-						continue // ignore div-0 case (not invertable)
-					}
-					got.Quo(z, x)
-					want = ybits.round(prec, mode)
-					if got.Cmp(want) != 0 {
-						t.Errorf("i = %d, prec = %d, %s:\n\t     %s %v\n\t/    %s %v\n\t=    %s\n\twant %s",
-							i, prec, mode, z, zbits, x, xbits, got, want)
-					}
-				}
-			}
-		}
-	}
-}
-
-// TestFloatMul64 tests that Float.Mul/Quo of numbers with
-// 53bit mantissa behaves like float64 multiplication/division.
-func TestFloatMul64(t *testing.T) {
-	for _, test := range []struct {
-		x, y float64
-	}{
-		{0, 0},
-		{0, 1},
-		{1, 1},
-		{1, 1.5},
-		{1.234, 0.5678},
-		{2.718281828, 3.14159265358979},
-		{2.718281828e10, 3.14159265358979e-32},
-		{1.0 / 3, 1e200},
-	} {
-		for i := range [8]int{} {
-			x0, y0 := test.x, test.y
-			if i&1 != 0 {
-				x0 = -x0
-			}
-			if i&2 != 0 {
-				y0 = -y0
-			}
-			if i&4 != 0 {
-				x0, y0 = y0, x0
-			}
-
-			x := NewFloat(x0)
-			y := NewFloat(y0)
-			z := new(Float).SetPrec(53)
-
-			z.Mul(x, y)
-			got, _ := z.Float64()
-			want := x0 * y0
-			if got != want {
-				t.Errorf("%g * %g = %g; want %g", x0, y0, got, want)
-			}
-
-			if y0 == 0 {
-				continue // avoid division-by-zero
-			}
-			z.Quo(z, y)
-			got, _ = z.Float64()
-			want /= y0
-			if got != want {
-				t.Errorf("%g / %g = %g; want %g", x0*y0, y0, got, want)
-			}
-		}
-	}
-}
-
-func TestIssue6866(t *testing.T) {
-	for _, prec := range precList {
-		two := new(Float).SetPrec(prec).SetInt64(2)
-		one := new(Float).SetPrec(prec).SetInt64(1)
-		three := new(Float).SetPrec(prec).SetInt64(3)
-		msix := new(Float).SetPrec(prec).SetInt64(-6)
-		psix := new(Float).SetPrec(prec).SetInt64(+6)
-
-		p := new(Float).SetPrec(prec)
-		z1 := new(Float).SetPrec(prec)
-		z2 := new(Float).SetPrec(prec)
-
-		// z1 = 2 + 1.0/3*-6
-		p.Quo(one, three)
-		p.Mul(p, msix)
-		z1.Add(two, p)
-
-		// z2 = 2 - 1.0/3*+6
-		p.Quo(one, three)
-		p.Mul(p, psix)
-		z2.Sub(two, p)
-
-		if z1.Cmp(z2) != 0 {
-			t.Fatalf("prec %d: got z1 = %s != z2 = %s; want z1 == z2\n", prec, z1, z2)
-		}
-		if z1.Sign() != 0 {
-			t.Errorf("prec %d: got z1 = %s; want 0", prec, z1)
-		}
-		if z2.Sign() != 0 {
-			t.Errorf("prec %d: got z2 = %s; want 0", prec, z2)
-		}
-	}
-}
-
-func TestFloatQuo(t *testing.T) {
-	// TODO(gri) make the test vary these precisions
-	preci := 200 // precision of integer part
-	precf := 20  // precision of fractional part
-
-	for i := 0; i < 8; i++ {
-		// compute accurate (not rounded) result z
-		bits := Bits{preci - 1}
-		if i&3 != 0 {
-			bits = append(bits, 0)
-		}
-		if i&2 != 0 {
-			bits = append(bits, -1)
-		}
-		if i&1 != 0 {
-			bits = append(bits, -precf)
-		}
-		z := bits.Float()
-
-		// compute accurate x as z*y
-		y := NewFloat(3.14159265358979323e123)
-
-		x := new(Float).SetPrec(z.Prec() + y.Prec()).SetMode(ToZero)
-		x.Mul(z, y)
-
-		// leave for debugging
-		// fmt.Printf("x = %s\ny = %s\nz = %s\n", x, y, z)
-
-		if got := x.Acc(); got != Exact {
-			t.Errorf("got acc = %s; want exact", got)
-		}
-
-		// round accurate z for a variety of precisions and
-		// modes and compare against result of x / y.
-		for _, mode := range [...]RoundingMode{ToZero, ToNearestEven, AwayFromZero} {
-			for d := -5; d < 5; d++ {
-				prec := uint(preci + d)
-				got := new(Float).SetPrec(prec).SetMode(mode).Quo(x, y)
-				want := bits.round(prec, mode)
-				if got.Cmp(want) != 0 {
-					t.Errorf("i = %d, prec = %d, %s:\n\t     %s\n\t/    %s\n\t=    %s\n\twant %s",
-						i, prec, mode, x, y, got, want)
-				}
-			}
-		}
-	}
-}
-
-// TestFloatQuoSmoke tests all divisions x/y for values x, y in the range [-n, +n];
-// it serves as a smoke test for basic correctness of division.
-func TestFloatQuoSmoke(t *testing.T) {
-	n := 1000
-	if testing.Short() {
-		n = 10
-	}
-
-	const dprec = 3         // max. precision variation
-	const prec = 10 + dprec // enough bits to hold n precisely
-	for x := -n; x <= n; x++ {
-		for y := -n; y < n; y++ {
-			if y == 0 {
-				continue
-			}
-
-			a := float64(x)
-			b := float64(y)
-			c := a / b
-
-			// vary operand precision (only ok as long as a, b can be represented correctly)
-			for ad := -dprec; ad <= dprec; ad++ {
-				for bd := -dprec; bd <= dprec; bd++ {
-					A := new(Float).SetPrec(uint(prec + ad)).SetFloat64(a)
-					B := new(Float).SetPrec(uint(prec + bd)).SetFloat64(b)
-					C := new(Float).SetPrec(53).Quo(A, B) // C has float64 mantissa width
-
-					cc, acc := C.Float64()
-					if cc != c {
-						t.Errorf("%g/%g = %s; want %.5g\n", a, b, C.Text('g', 5), c)
-						continue
-					}
-					if acc != Exact {
-						t.Errorf("%g/%g got %s result; want exact result", a, b, acc)
-					}
-				}
-			}
-		}
-	}
-}
-
-// TestFloatArithmeticSpecialValues tests that Float operations produce the
-// correct results for combinations of zero (±0), finite (±1 and ±2.71828),
-// and infinite (±Inf) operands.
-func TestFloatArithmeticSpecialValues(t *testing.T) {
-	zero := 0.0
-	args := []float64{math.Inf(-1), -2.71828, -1, -zero, zero, 1, 2.71828, math.Inf(1)}
-	xx := new(Float)
-	yy := new(Float)
-	got := new(Float)
-	want := new(Float)
-	for i := 0; i < 4; i++ {
-		for _, x := range args {
-			xx.SetFloat64(x)
-			// check conversion is correct
-			// (no need to do this for y, since we see exactly the
-			// same values there)
-			if got, acc := xx.Float64(); got != x || acc != Exact {
-				t.Errorf("Float(%g) == %g (%s)", x, got, acc)
-			}
-			for _, y := range args {
-				yy.SetFloat64(y)
-				var (
-					op string
-					z  float64
-					f  func(z, x, y *Float) *Float
-				)
-				switch i {
-				case 0:
-					op = "+"
-					z = x + y
-					f = (*Float).Add
-				case 1:
-					op = "-"
-					z = x - y
-					f = (*Float).Sub
-				case 2:
-					op = "*"
-					z = x * y
-					f = (*Float).Mul
-				case 3:
-					op = "/"
-					z = x / y
-					f = (*Float).Quo
-				default:
-					panic("unreachable")
-				}
-				var errnan bool // set if execution of f panicked with ErrNaN
-				// protect execution of f
-				func() {
-					defer func() {
-						if p := recover(); p != nil {
-							_ = p.(ErrNaN) // re-panic if not ErrNaN
-							errnan = true
-						}
-					}()
-					f(got, xx, yy)
-				}()
-				if math.IsNaN(z) {
-					if !errnan {
-						t.Errorf("%5g %s %5g = %5s; want ErrNaN panic", x, op, y, got)
-					}
-					continue
-				}
-				if errnan {
-					t.Errorf("%5g %s %5g panicked with ErrNan; want %5s", x, op, y, want)
-					continue
-				}
-				want.SetFloat64(z)
-				if !alike(got, want) {
-					t.Errorf("%5g %s %5g = %5s; want %5s", x, op, y, got, want)
-				}
-			}
-		}
-	}
-}
-
-func TestFloatArithmeticOverflow(t *testing.T) {
-	for _, test := range []struct {
-		prec       uint
-		mode       RoundingMode
-		op         byte
-		x, y, want string
-		acc        Accuracy
-	}{
-		{4, ToNearestEven, '+', "0", "0", "0", Exact},                   // smoke test
-		{4, ToNearestEven, '+', "0x.8p+0", "0x.8p+0", "0x.8p+1", Exact}, // smoke test
-
-		{4, ToNearestEven, '+', "0", "0x.8p2147483647", "0x.8p+2147483647", Exact},
-		{4, ToNearestEven, '+', "0x.8p2147483500", "0x.8p2147483647", "0x.8p+2147483647", Below}, // rounded to zero
-		{4, ToNearestEven, '+', "0x.8p2147483647", "0x.8p2147483647", "+Inf", Above},             // exponent overflow in +
-		{4, ToNearestEven, '+', "-0x.8p2147483647", "-0x.8p2147483647", "-Inf", Below},           // exponent overflow in +
-		{4, ToNearestEven, '-', "-0x.8p2147483647", "0x.8p2147483647", "-Inf", Below},            // exponent overflow in -
-
-		{4, ToZero, '+', "0x.fp2147483647", "0x.8p2147483643", "0x.fp+2147483647", Below}, // rounded to zero
-		{4, ToNearestEven, '+', "0x.fp2147483647", "0x.8p2147483643", "+Inf", Above},      // exponent overflow in rounding
-		{4, AwayFromZero, '+', "0x.fp2147483647", "0x.8p2147483643", "+Inf", Above},       // exponent overflow in rounding
-
-		{4, AwayFromZero, '-', "-0x.fp2147483647", "0x.8p2147483644", "-Inf", Below},        // exponent overflow in rounding
-		{4, ToNearestEven, '-', "-0x.fp2147483647", "0x.8p2147483643", "-Inf", Below},       // exponent overflow in rounding
-		{4, ToZero, '-', "-0x.fp2147483647", "0x.8p2147483643", "-0x.fp+2147483647", Above}, // rounded to zero
-
-		{4, ToNearestEven, '+', "0", "0x.8p-2147483648", "0x.8p-2147483648", Exact},
-		{4, ToNearestEven, '+', "0x.8p-2147483648", "0x.8p-2147483648", "0x.8p-2147483647", Exact},
-
-		{4, ToNearestEven, '*', "1", "0x.8p2147483647", "0x.8p+2147483647", Exact},
-		{4, ToNearestEven, '*', "2", "0x.8p2147483647", "+Inf", Above},  // exponent overflow in *
-		{4, ToNearestEven, '*', "-2", "0x.8p2147483647", "-Inf", Below}, // exponent overflow in *
-
-		{4, ToNearestEven, '/', "0.5", "0x.8p2147483647", "0x.8p-2147483646", Exact},
-		{4, ToNearestEven, '/', "0x.8p+0", "0x.8p2147483647", "0x.8p-2147483646", Exact},
-		{4, ToNearestEven, '/', "0x.8p-1", "0x.8p2147483647", "0x.8p-2147483647", Exact},
-		{4, ToNearestEven, '/', "0x.8p-2", "0x.8p2147483647", "0x.8p-2147483648", Exact},
-		{4, ToNearestEven, '/', "0x.8p-3", "0x.8p2147483647", "0", Below}, // exponent underflow in /
-	} {
-		x := makeFloat(test.x)
-		y := makeFloat(test.y)
-		z := new(Float).SetPrec(test.prec).SetMode(test.mode)
-		switch test.op {
-		case '+':
-			z.Add(x, y)
-		case '-':
-			z.Sub(x, y)
-		case '*':
-			z.Mul(x, y)
-		case '/':
-			z.Quo(x, y)
-		default:
-			panic("unreachable")
-		}
-		if got := z.Text('p', 0); got != test.want || z.Acc() != test.acc {
-			t.Errorf(
-				"prec = %d (%s): %s %c %s = %s (%s); want %s (%s)",
-				test.prec, test.mode, x.Text('p', 0), test.op, y.Text('p', 0), got, z.Acc(), test.want, test.acc,
-			)
-		}
-	}
-}
-
-// TODO(gri) Add tests that check correctness in the presence of aliasing.
-
-// For rounding modes ToNegativeInf and ToPositiveInf, rounding is affected
-// by the sign of the value to be rounded. Test that rounding happens after
-// the sign of a result has been set.
-// This test uses specific values that are known to fail if rounding is
-// "factored" out before setting the result sign.
-func TestFloatArithmeticRounding(t *testing.T) {
-	for _, test := range []struct {
-		mode       RoundingMode
-		prec       uint
-		x, y, want int64
-		op         byte
-	}{
-		{ToZero, 3, -0x8, -0x1, -0x8, '+'},
-		{AwayFromZero, 3, -0x8, -0x1, -0xa, '+'},
-		{ToNegativeInf, 3, -0x8, -0x1, -0xa, '+'},
-
-		{ToZero, 3, -0x8, 0x1, -0x8, '-'},
-		{AwayFromZero, 3, -0x8, 0x1, -0xa, '-'},
-		{ToNegativeInf, 3, -0x8, 0x1, -0xa, '-'},
-
-		{ToZero, 3, -0x9, 0x1, -0x8, '*'},
-		{AwayFromZero, 3, -0x9, 0x1, -0xa, '*'},
-		{ToNegativeInf, 3, -0x9, 0x1, -0xa, '*'},
-
-		{ToZero, 3, -0x9, 0x1, -0x8, '/'},
-		{AwayFromZero, 3, -0x9, 0x1, -0xa, '/'},
-		{ToNegativeInf, 3, -0x9, 0x1, -0xa, '/'},
-	} {
-		var x, y, z Float
-		x.SetInt64(test.x)
-		y.SetInt64(test.y)
-		z.SetPrec(test.prec).SetMode(test.mode)
-		switch test.op {
-		case '+':
-			z.Add(&x, &y)
-		case '-':
-			z.Sub(&x, &y)
-		case '*':
-			z.Mul(&x, &y)
-		case '/':
-			z.Quo(&x, &y)
-		default:
-			panic("unreachable")
-		}
-		if got, acc := z.Int64(); got != test.want || acc != Exact {
-			t.Errorf("%s, %d bits: %d %c %d = %d (%s); want %d (Exact)",
-				test.mode, test.prec, test.x, test.op, test.y, got, acc, test.want,
-			)
-		}
-	}
-}
-
-// TestFloatCmpSpecialValues tests that Cmp produces the correct results for
-// combinations of zero (±0), finite (±1 and ±2.71828), and infinite (±Inf)
-// operands.
-func TestFloatCmpSpecialValues(t *testing.T) {
-	zero := 0.0
-	args := []float64{math.Inf(-1), -2.71828, -1, -zero, zero, 1, 2.71828, math.Inf(1)}
-	xx := new(Float)
-	yy := new(Float)
-	for i := 0; i < 4; i++ {
-		for _, x := range args {
-			xx.SetFloat64(x)
-			// check conversion is correct
-			// (no need to do this for y, since we see exactly the
-			// same values there)
-			if got, acc := xx.Float64(); got != x || acc != Exact {
-				t.Errorf("Float(%g) == %g (%s)", x, got, acc)
-			}
-			for _, y := range args {
-				yy.SetFloat64(y)
-				got := xx.Cmp(yy)
-				want := 0
-				switch {
-				case x < y:
-					want = -1
-				case x > y:
-					want = +1
-				}
-				if got != want {
-					t.Errorf("(%g).Cmp(%g) = %v; want %v", x, y, got, want)
-				}
-			}
-		}
-	}
-}
diff --git a/src/math/big/floatconv.go b/src/math/big/floatconv.go
deleted file mode 100644
index 4a070ca..0000000
--- a/src/math/big/floatconv.go
+++ /dev/null
@@ -1,239 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements string-to-Float conversion functions.
-
-package big
-
-import (
-	"fmt"
-	"io"
-	"strings"
-)
-
-// SetString sets z to the value of s and returns z and a boolean indicating
-// success. s must be a floating-point number of the same format as accepted
-// by Parse, with base argument 0.
-func (z *Float) SetString(s string) (*Float, bool) {
-	if f, _, err := z.Parse(s, 0); err == nil {
-		return f, true
-	}
-	return nil, false
-}
-
-// scan is like Parse but reads the longest possible prefix representing a valid
-// floating point number from an io.ByteScanner rather than a string. It serves
-// as the implementation of Parse. It does not recognize ±Inf and does not expect
-// EOF at the end.
-func (z *Float) scan(r io.ByteScanner, base int) (f *Float, b int, err error) {
-	prec := z.prec
-	if prec == 0 {
-		prec = 64
-	}
-
-	// A reasonable value in case of an error.
-	z.form = zero
-
-	// sign
-	z.neg, err = scanSign(r)
-	if err != nil {
-		return
-	}
-
-	// mantissa
-	var fcount int // fractional digit count; valid if <= 0
-	z.mant, b, fcount, err = z.mant.scan(r, base, true)
-	if err != nil {
-		return
-	}
-
-	// exponent
-	var exp int64
-	var ebase int
-	exp, ebase, err = scanExponent(r, true)
-	if err != nil {
-		return
-	}
-
-	// special-case 0
-	if len(z.mant) == 0 {
-		z.prec = prec
-		z.acc = Exact
-		z.form = zero
-		f = z
-		return
-	}
-	// len(z.mant) > 0
-
-	// The mantissa may have a decimal point (fcount <= 0) and there
-	// may be a nonzero exponent exp. The decimal point amounts to a
-	// division by b**(-fcount). An exponent means multiplication by
-	// ebase**exp. Finally, mantissa normalization (shift left) requires
-	// a correcting multiplication by 2**(-shiftcount). Multiplications
-	// are commutative, so we can apply them in any order as long as there
-	// is no loss of precision. We only have powers of 2 and 10; keep
-	// track via separate exponents exp2 and exp10.
-
-	// normalize mantissa and get initial binary exponent
-	var exp2 = int64(len(z.mant))*_W - fnorm(z.mant)
-
-	// determine binary or decimal exponent contribution of decimal point
-	var exp10 int64
-	if fcount < 0 {
-		// The mantissa has a "decimal" point ddd.dddd; and
-		// -fcount is the number of digits to the right of '.'.
-		// Adjust relevant exponent accodingly.
-		switch b {
-		case 16:
-			fcount *= 4 // hexadecimal digits are 4 bits each
-			fallthrough
-		case 2:
-			exp2 += int64(fcount)
-		default: // b == 10
-			exp10 = int64(fcount)
-		}
-		// we don't need fcount anymore
-	}
-
-	// take actual exponent into account
-	if ebase == 2 {
-		exp2 += exp
-	} else { // ebase == 10
-		exp10 += exp
-	}
-	// we don't need exp anymore
-
-	// apply 2**exp2
-	if MinExp <= exp2 && exp2 <= MaxExp {
-		z.prec = prec
-		z.form = finite
-		z.exp = int32(exp2)
-		f = z
-	} else {
-		err = fmt.Errorf("exponent overflow")
-		return
-	}
-
-	if exp10 == 0 {
-		// no decimal exponent to consider
-		z.round(0)
-		return
-	}
-	// exp10 != 0
-
-	// apply 10**exp10
-	p := new(Float).SetPrec(z.Prec() + 64) // use more bits for p -- TODO(gri) what is the right number?
-	if exp10 < 0 {
-		z.uquo(z, p.pow10(-exp10))
-	} else {
-		z.umul(z, p.pow10(exp10))
-	}
-
-	return
-}
-
-// These powers of 10 can be represented exactly as a float64.
-var pow10tab = [...]float64{
-	1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9,
-	1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19,
-}
-
-// pow10 sets z to 10**n and returns z.
-// n must not be negative.
-func (z *Float) pow10(n int64) *Float {
-	if n < 0 {
-		panic("pow10 called with negative argument")
-	}
-
-	const m = int64(len(pow10tab) - 1)
-	if n <= m {
-		return z.SetFloat64(pow10tab[n])
-	}
-	// n > m
-
-	z.SetFloat64(pow10tab[m])
-	n -= m
-
-	// use more bits for f than for z
-	// TODO(gri) what is the right number?
-	f := new(Float).SetPrec(z.Prec() + 64).SetInt64(10)
-
-	for n > 0 {
-		if n&1 != 0 {
-			z.Mul(z, f)
-		}
-		f.Mul(f, f)
-		n >>= 1
-	}
-
-	return z
-}
-
-// Parse parses s which must contain a text representation of a floating-
-// point number with a mantissa in the given conversion base (the exponent
-// is always a decimal number), or a string representing an infinite value.
-//
-// It sets z to the (possibly rounded) value of the corresponding floating-
-// point value, and returns z, the actual base b, and an error err, if any.
-// If z's precision is 0, it is changed to 64 before rounding takes effect.
-// The number must be of the form:
-//
-//	number   = [ sign ] [ prefix ] mantissa [ exponent ] | infinity .
-//	sign     = "+" | "-" .
-//      prefix   = "0" ( "x" | "X" | "b" | "B" ) .
-//	mantissa = digits | digits "." [ digits ] | "." digits .
-//	exponent = ( "E" | "e" | "p" ) [ sign ] digits .
-//	digits   = digit { digit } .
-//	digit    = "0" ... "9" | "a" ... "z" | "A" ... "Z" .
-//      infinity = [ sign ] ( "inf" | "Inf" ) .
-//
-// The base argument must be 0, 2, 10, or 16. Providing an invalid base
-// argument will lead to a run-time panic.
-//
-// For base 0, the number prefix determines the actual base: A prefix of
-// "0x" or "0X" selects base 16, and a "0b" or "0B" prefix selects
-// base 2; otherwise, the actual base is 10 and no prefix is accepted.
-// The octal prefix "0" is not supported (a leading "0" is simply
-// considered a "0").
-//
-// A "p" exponent indicates a binary (rather then decimal) exponent;
-// for instance "0x1.fffffffffffffp1023" (using base 0) represents the
-// maximum float64 value. For hexadecimal mantissae, the exponent must
-// be binary, if present (an "e" or "E" exponent indicator cannot be
-// distinguished from a mantissa digit).
-//
-// The returned *Float f is nil and the value of z is valid but not
-// defined if an error is reported.
-//
-func (z *Float) Parse(s string, base int) (f *Float, b int, err error) {
-	// scan doesn't handle ±Inf
-	if len(s) == 3 && (s == "Inf" || s == "inf") {
-		f = z.SetInf(false)
-		return
-	}
-	if len(s) == 4 && (s[0] == '+' || s[0] == '-') && (s[1:] == "Inf" || s[1:] == "inf") {
-		f = z.SetInf(s[0] == '-')
-		return
-	}
-
-	r := strings.NewReader(s)
-	if f, b, err = z.scan(r, base); err != nil {
-		return
-	}
-
-	// entire string must have been consumed
-	if ch, err2 := r.ReadByte(); err2 == nil {
-		err = fmt.Errorf("expected end of string, found %q", ch)
-	} else if err2 != io.EOF {
-		err = err2
-	}
-
-	return
-}
-
-// ParseFloat is like f.Parse(s, base) with f set to the given precision
-// and rounding mode.
-func ParseFloat(s string, base int, prec uint, mode RoundingMode) (f *Float, b int, err error) {
-	return new(Float).SetPrec(prec).SetMode(mode).Parse(s, base)
-}
diff --git a/src/math/big/floatconv_test.go b/src/math/big/floatconv_test.go
deleted file mode 100644
index 4f23953..0000000
--- a/src/math/big/floatconv_test.go
+++ /dev/null
@@ -1,573 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package big
-
-import (
-	"fmt"
-	"math"
-	"strconv"
-	"testing"
-)
-
-func TestFloatSetFloat64String(t *testing.T) {
-	inf := math.Inf(0)
-	nan := math.NaN()
-
-	for _, test := range []struct {
-		s string
-		x float64 // NaNs represent invalid inputs
-	}{
-		// basics
-		{"0", 0},
-		{"-0", -0},
-		{"+0", 0},
-		{"1", 1},
-		{"-1", -1},
-		{"+1", 1},
-		{"1.234", 1.234},
-		{"-1.234", -1.234},
-		{"+1.234", 1.234},
-		{".1", 0.1},
-		{"1.", 1},
-		{"+1.", 1},
-
-		// various zeros
-		{"0e100", 0},
-		{"-0e+100", 0},
-		{"+0e-100", 0},
-		{"0E100", 0},
-		{"-0E+100", 0},
-		{"+0E-100", 0},
-
-		// various decimal exponent formats
-		{"1.e10", 1e10},
-		{"1e+10", 1e10},
-		{"+1e-10", 1e-10},
-		{"1E10", 1e10},
-		{"1.E+10", 1e10},
-		{"+1E-10", 1e-10},
-
-		// infinities
-		{"Inf", inf},
-		{"+Inf", inf},
-		{"-Inf", -inf},
-		{"inf", inf},
-		{"+inf", inf},
-		{"-inf", -inf},
-
-		// invalid numbers
-		{"", nan},
-		{"-", nan},
-		{"0x", nan},
-		{"0e", nan},
-		{"1.2ef", nan},
-		{"2..3", nan},
-		{"123..", nan},
-		{"infinity", nan},
-		{"foobar", nan},
-
-		// misc decimal values
-		{"3.14159265", 3.14159265},
-		{"-687436.79457e-245", -687436.79457e-245},
-		{"-687436.79457E245", -687436.79457e245},
-		{".0000000000000000000000000000000000000001", 1e-40},
-		{"+10000000000000000000000000000000000000000e-0", 1e40},
-
-		// decimal mantissa, binary exponent
-		{"0p0", 0},
-		{"-0p0", -0},
-		{"1p10", 1 << 10},
-		{"1p+10", 1 << 10},
-		{"+1p-10", 1.0 / (1 << 10)},
-		{"1024p-12", 0.25},
-		{"-1p10", -1024},
-		{"1.5p1", 3},
-
-		// binary mantissa, decimal exponent
-		{"0b0", 0},
-		{"-0b0", -0},
-		{"0b0e+10", 0},
-		{"-0b0e-10", -0},
-		{"0b1010", 10},
-		{"0B1010E2", 1000},
-		{"0b.1", 0.5},
-		{"0b.001", 0.125},
-		{"0b.001e3", 125},
-
-		// binary mantissa, binary exponent
-		{"0b0p+10", 0},
-		{"-0b0p-10", -0},
-		{"0b.1010p4", 10},
-		{"0b1p-1", 0.5},
-		{"0b001p-3", 0.125},
-		{"0b.001p3", 1},
-		{"0b0.01p2", 1},
-
-		// hexadecimal mantissa and exponent
-		{"0x0", 0},
-		{"-0x0", -0},
-		{"0x0p+10", 0},
-		{"-0x0p-10", -0},
-		{"0xff", 255},
-		{"0X.8p1", 1},
-		{"-0X0.00008p16", -0.5},
-		{"0x0.0000000000001p-1022", math.SmallestNonzeroFloat64},
-		{"0x1.fffffffffffffp1023", math.MaxFloat64},
-	} {
-		var x Float
-		x.SetPrec(53)
-		_, ok := x.SetString(test.s)
-		if math.IsNaN(test.x) {
-			// test.s is invalid
-			if ok {
-				t.Errorf("%s: want parse error", test.s)
-			}
-			continue
-		}
-		// test.s is valid
-		if !ok {
-			t.Errorf("%s: got parse error", test.s)
-			continue
-		}
-		f, _ := x.Float64()
-		want := new(Float).SetFloat64(test.x)
-		if x.Cmp(want) != 0 {
-			t.Errorf("%s: got %s (%v); want %v", test.s, &x, f, test.x)
-		}
-	}
-}
-
-const (
-	below1e23 = 99999999999999974834176
-	above1e23 = 100000000000000008388608
-)
-
-func TestFloat64Text(t *testing.T) {
-	for _, test := range []struct {
-		x      float64
-		format byte
-		prec   int
-		want   string
-	}{
-		{0, 'f', 0, "0"},
-		{math.Copysign(0, -1), 'f', 0, "-0"},
-		{1, 'f', 0, "1"},
-		{-1, 'f', 0, "-1"},
-
-		{0.001, 'e', 0, "1e-03"},
-		{0.459, 'e', 0, "5e-01"},
-		{1.459, 'e', 0, "1e+00"},
-		{2.459, 'e', 1, "2.5e+00"},
-		{3.459, 'e', 2, "3.46e+00"},
-		{4.459, 'e', 3, "4.459e+00"},
-		{5.459, 'e', 4, "5.4590e+00"},
-
-		{0.001, 'f', 0, "0"},
-		{0.459, 'f', 0, "0"},
-		{1.459, 'f', 0, "1"},
-		{2.459, 'f', 1, "2.5"},
-		{3.459, 'f', 2, "3.46"},
-		{4.459, 'f', 3, "4.459"},
-		{5.459, 'f', 4, "5.4590"},
-
-		{0, 'b', 0, "0"},
-		{math.Copysign(0, -1), 'b', 0, "-0"},
-		{1.0, 'b', 0, "4503599627370496p-52"},
-		{-1.0, 'b', 0, "-4503599627370496p-52"},
-		{4503599627370496, 'b', 0, "4503599627370496p+0"},
-
-		{0, 'p', 0, "0"},
-		{math.Copysign(0, -1), 'p', 0, "-0"},
-		{1024.0, 'p', 0, "0x.8p+11"},
-		{-1024.0, 'p', 0, "-0x.8p+11"},
-
-		// all test cases below from strconv/ftoa_test.go
-		{1, 'e', 5, "1.00000e+00"},
-		{1, 'f', 5, "1.00000"},
-		{1, 'g', 5, "1"},
-		// {1, 'g', -1, "1"},
-		// {20, 'g', -1, "20"},
-		// {1234567.8, 'g', -1, "1.2345678e+06"},
-		// {200000, 'g', -1, "200000"},
-		// {2000000, 'g', -1, "2e+06"},
-
-		// g conversion and zero suppression
-		{400, 'g', 2, "4e+02"},
-		{40, 'g', 2, "40"},
-		{4, 'g', 2, "4"},
-		{.4, 'g', 2, "0.4"},
-		{.04, 'g', 2, "0.04"},
-		{.004, 'g', 2, "0.004"},
-		{.0004, 'g', 2, "0.0004"},
-		{.00004, 'g', 2, "4e-05"},
-		{.000004, 'g', 2, "4e-06"},
-
-		{0, 'e', 5, "0.00000e+00"},
-		{0, 'f', 5, "0.00000"},
-		{0, 'g', 5, "0"},
-		// {0, 'g', -1, "0"},
-
-		{-1, 'e', 5, "-1.00000e+00"},
-		{-1, 'f', 5, "-1.00000"},
-		{-1, 'g', 5, "-1"},
-		// {-1, 'g', -1, "-1"},
-
-		{12, 'e', 5, "1.20000e+01"},
-		{12, 'f', 5, "12.00000"},
-		{12, 'g', 5, "12"},
-		// {12, 'g', -1, "12"},
-
-		{123456700, 'e', 5, "1.23457e+08"},
-		{123456700, 'f', 5, "123456700.00000"},
-		{123456700, 'g', 5, "1.2346e+08"},
-		// {123456700, 'g', -1, "1.234567e+08"},
-
-		{1.2345e6, 'e', 5, "1.23450e+06"},
-		{1.2345e6, 'f', 5, "1234500.00000"},
-		{1.2345e6, 'g', 5, "1.2345e+06"},
-
-		{1e23, 'e', 17, "9.99999999999999916e+22"},
-		{1e23, 'f', 17, "99999999999999991611392.00000000000000000"},
-		{1e23, 'g', 17, "9.9999999999999992e+22"},
-
-		// {1e23, 'e', -1, "1e+23"},
-		// {1e23, 'f', -1, "100000000000000000000000"},
-		// {1e23, 'g', -1, "1e+23"},
-
-		{below1e23, 'e', 17, "9.99999999999999748e+22"},
-		{below1e23, 'f', 17, "99999999999999974834176.00000000000000000"},
-		{below1e23, 'g', 17, "9.9999999999999975e+22"},
-
-		// {below1e23, 'e', -1, "9.999999999999997e+22"},
-		// {below1e23, 'f', -1, "99999999999999970000000"},
-		// {below1e23, 'g', -1, "9.999999999999997e+22"},
-
-		{above1e23, 'e', 17, "1.00000000000000008e+23"},
-		{above1e23, 'f', 17, "100000000000000008388608.00000000000000000"},
-		// {above1e23, 'g', 17, "1.0000000000000001e+23"},
-
-		// {above1e23, 'e', -1, "1.0000000000000001e+23"},
-		// {above1e23, 'f', -1, "100000000000000010000000"},
-		// {above1e23, 'g', -1, "1.0000000000000001e+23"},
-
-		// {fdiv(5e-304, 1e20), 'g', -1, "5e-324"},
-		// {fdiv(-5e-304, 1e20), 'g', -1, "-5e-324"},
-
-		// {32, 'g', -1, "32"},
-		// {32, 'g', 0, "3e+01"},
-
-		// {100, 'x', -1, "%x"},
-
-		// {math.NaN(), 'g', -1, "NaN"},
-		// {-math.NaN(), 'g', -1, "NaN"},
-		{math.Inf(0), 'g', -1, "+Inf"},
-		{math.Inf(-1), 'g', -1, "-Inf"},
-		{-math.Inf(0), 'g', -1, "-Inf"},
-
-		{-1, 'b', -1, "-4503599627370496p-52"},
-
-		// fixed bugs
-		{0.9, 'f', 1, "0.9"},
-		{0.09, 'f', 1, "0.1"},
-		{0.0999, 'f', 1, "0.1"},
-		{0.05, 'f', 1, "0.1"},
-		{0.05, 'f', 0, "0"},
-		{0.5, 'f', 1, "0.5"},
-		{0.5, 'f', 0, "0"},
-		{1.5, 'f', 0, "2"},
-
-		// http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
-		// {2.2250738585072012e-308, 'g', -1, "2.2250738585072014e-308"},
-		// http://www.exploringbinary.com/php-hangs-on-numeric-value-2-2250738585072011e-308/
-		// {2.2250738585072011e-308, 'g', -1, "2.225073858507201e-308"},
-
-		// Issue 2625.
-		{383260575764816448, 'f', 0, "383260575764816448"},
-		// {383260575764816448, 'g', -1, "3.8326057576481645e+17"},
-	} {
-		f := new(Float).SetFloat64(test.x)
-		got := f.Text(test.format, test.prec)
-		if got != test.want {
-			t.Errorf("%v: got %s; want %s", test, got, test.want)
-		}
-
-		if test.format == 'b' && test.x == 0 {
-			continue // 'b' format in strconv.Float requires knowledge of bias for 0.0
-		}
-		if test.format == 'p' {
-			continue // 'p' format not supported in strconv.Format
-		}
-
-		// verify that Float format matches strconv format
-		want := strconv.FormatFloat(test.x, test.format, test.prec, 64)
-		if got != want {
-			t.Errorf("%v: got %s; want %s (strconv)", test, got, want)
-		}
-	}
-}
-
-func TestFloatText(t *testing.T) {
-	for _, test := range []struct {
-		x      string
-		prec   uint
-		format byte
-		digits int
-		want   string
-	}{
-		{"0", 10, 'f', 0, "0"},
-		{"-0", 10, 'f', 0, "-0"},
-		{"1", 10, 'f', 0, "1"},
-		{"-1", 10, 'f', 0, "-1"},
-
-		{"1.459", 100, 'e', 0, "1e+00"},
-		{"2.459", 100, 'e', 1, "2.5e+00"},
-		{"3.459", 100, 'e', 2, "3.46e+00"},
-		{"4.459", 100, 'e', 3, "4.459e+00"},
-		{"5.459", 100, 'e', 4, "5.4590e+00"},
-
-		{"1.459", 100, 'E', 0, "1E+00"},
-		{"2.459", 100, 'E', 1, "2.5E+00"},
-		{"3.459", 100, 'E', 2, "3.46E+00"},
-		{"4.459", 100, 'E', 3, "4.459E+00"},
-		{"5.459", 100, 'E', 4, "5.4590E+00"},
-
-		{"1.459", 100, 'f', 0, "1"},
-		{"2.459", 100, 'f', 1, "2.5"},
-		{"3.459", 100, 'f', 2, "3.46"},
-		{"4.459", 100, 'f', 3, "4.459"},
-		{"5.459", 100, 'f', 4, "5.4590"},
-
-		{"1.459", 100, 'g', 0, "1"},
-		{"2.459", 100, 'g', 1, "2"},
-		{"3.459", 100, 'g', 2, "3.5"},
-		{"4.459", 100, 'g', 3, "4.46"},
-		{"5.459", 100, 'g', 4, "5.459"},
-
-		{"1459", 53, 'g', 0, "1e+03"},
-		{"2459", 53, 'g', 1, "2e+03"},
-		{"3459", 53, 'g', 2, "3.5e+03"},
-		{"4459", 53, 'g', 3, "4.46e+03"},
-		{"5459", 53, 'g', 4, "5459"},
-
-		{"1459", 53, 'G', 0, "1E+03"},
-		{"2459", 53, 'G', 1, "2E+03"},
-		{"3459", 53, 'G', 2, "3.5E+03"},
-		{"4459", 53, 'G', 3, "4.46E+03"},
-		{"5459", 53, 'G', 4, "5459"},
-
-		{"3", 10, 'e', 40, "3.0000000000000000000000000000000000000000e+00"},
-		{"3", 10, 'f', 40, "3.0000000000000000000000000000000000000000"},
-		{"3", 10, 'g', 40, "3"},
-
-		{"3e40", 100, 'e', 40, "3.0000000000000000000000000000000000000000e+40"},
-		{"3e40", 100, 'f', 4, "30000000000000000000000000000000000000000.0000"},
-		{"3e40", 100, 'g', 40, "3e+40"},
-
-		// make sure "stupid" exponents don't stall the machine
-		{"1e1000000", 64, 'p', 0, "0x.88b3a28a05eade3ap+3321929"},
-		{"1e1000000000", 64, 'p', 0, "0x.ecc5f45aa573d3p+1538481529"},
-		{"1e-1000000", 64, 'p', 0, "0x.efb4542cc8ca418ap-3321928"},
-		{"1e-1000000000", 64, 'p', 0, "0x.8a64dd983a4c7dabp-1538481528"},
-
-		// TODO(gri) need tests for actual large Floats
-
-		{"0", 53, 'b', 0, "0"},
-		{"-0", 53, 'b', 0, "-0"},
-		{"1.0", 53, 'b', 0, "4503599627370496p-52"},
-		{"-1.0", 53, 'b', 0, "-4503599627370496p-52"},
-		{"4503599627370496", 53, 'b', 0, "4503599627370496p+0"},
-
-		// issue 9939
-		{"3", 350, 'b', 0, "1720123961992553633708115671476565205597423741876210842803191629540192157066363606052513914832594264915968p-348"},
-		{"03", 350, 'b', 0, "1720123961992553633708115671476565205597423741876210842803191629540192157066363606052513914832594264915968p-348"},
-		{"3.", 350, 'b', 0, "1720123961992553633708115671476565205597423741876210842803191629540192157066363606052513914832594264915968p-348"},
-		{"3.0", 350, 'b', 0, "1720123961992553633708115671476565205597423741876210842803191629540192157066363606052513914832594264915968p-348"},
-		{"3.00", 350, 'b', 0, "1720123961992553633708115671476565205597423741876210842803191629540192157066363606052513914832594264915968p-348"},
-		{"3.000", 350, 'b', 0, "1720123961992553633708115671476565205597423741876210842803191629540192157066363606052513914832594264915968p-348"},
-
-		{"3", 350, 'p', 0, "0x.cp+2"},
-		{"03", 350, 'p', 0, "0x.cp+2"},
-		{"3.", 350, 'p', 0, "0x.cp+2"},
-		{"3.0", 350, 'p', 0, "0x.cp+2"},
-		{"3.00", 350, 'p', 0, "0x.cp+2"},
-		{"3.000", 350, 'p', 0, "0x.cp+2"},
-
-		{"0", 64, 'p', 0, "0"},
-		{"-0", 64, 'p', 0, "-0"},
-		{"1024.0", 64, 'p', 0, "0x.8p+11"},
-		{"-1024.0", 64, 'p', 0, "-0x.8p+11"},
-
-		// unsupported format
-		{"3.14", 64, 'x', 0, "%x"},
-		{"-3.14", 64, 'x', 0, "%x"},
-	} {
-		f, _, err := ParseFloat(test.x, 0, test.prec, ToNearestEven)
-		if err != nil {
-			t.Errorf("%v: %s", test, err)
-			continue
-		}
-
-		got := f.Text(test.format, test.digits)
-		if got != test.want {
-			t.Errorf("%v: got %s; want %s", test, got, test.want)
-		}
-
-		// compare with strconv.FormatFloat output if possible
-		// ('p' format is not supported by strconv.FormatFloat,
-		// and its output for 0.0 prints a biased exponent value
-		// as in 0p-1074 which makes no sense to emulate here)
-		if test.prec == 53 && test.format != 'p' && f.Sign() != 0 {
-			f64, acc := f.Float64()
-			if acc != Exact {
-				t.Errorf("%v: expected exact conversion to float64", test)
-				continue
-			}
-			got := strconv.FormatFloat(f64, test.format, test.digits, 64)
-			if got != test.want {
-				t.Errorf("%v: got %s; want %s", test, got, test.want)
-			}
-		}
-	}
-}
-
-func TestFloatFormat(t *testing.T) {
-	for _, test := range []struct {
-		format string
-		value  interface{} // float32, float64, or string (== 512bit *Float)
-		want   string
-	}{
-		// TODO(gri) uncomment the disabled 'g'/'G' formats
-		// 	     below once (*Float).Text supports prec < 0
-
-		// from fmt/fmt_test.go
-		{"%+.3e", 0.0, "+0.000e+00"},
-		{"%+.3e", 1.0, "+1.000e+00"},
-		{"%+.3f", -1.0, "-1.000"},
-		{"%+.3F", -1.0, "-1.000"},
-		{"%+.3F", float32(-1.0), "-1.000"},
-		{"%+07.2f", 1.0, "+001.00"},
-		{"%+07.2f", -1.0, "-001.00"},
-		{"%+10.2f", +1.0, "     +1.00"},
-		{"%+10.2f", -1.0, "     -1.00"},
-		{"% .3E", -1.0, "-1.000E+00"},
-		{"% .3e", 1.0, " 1.000e+00"},
-		{"%+.3g", 0.0, "+0"},
-		{"%+.3g", 1.0, "+1"},
-		{"%+.3g", -1.0, "-1"},
-		{"% .3g", -1.0, "-1"},
-		{"% .3g", 1.0, " 1"},
-		{"%b", float32(1.0), "8388608p-23"},
-		{"%b", 1.0, "4503599627370496p-52"},
-
-		// from fmt/fmt_test.go: old test/fmt_test.go
-		{"%e", 1.0, "1.000000e+00"},
-		{"%e", 1234.5678e3, "1.234568e+06"},
-		{"%e", 1234.5678e-8, "1.234568e-05"},
-		{"%e", -7.0, "-7.000000e+00"},
-		{"%e", -1e-9, "-1.000000e-09"},
-		{"%f", 1234.5678e3, "1234567.800000"},
-		{"%f", 1234.5678e-8, "0.000012"},
-		{"%f", -7.0, "-7.000000"},
-		{"%f", -1e-9, "-0.000000"},
-		// {"%g", 1234.5678e3, "1.2345678e+06"},
-		// {"%g", float32(1234.5678e3), "1.2345678e+06"},
-		// {"%g", 1234.5678e-8, "1.2345678e-05"},
-		{"%g", -7.0, "-7"},
-		{"%g", -1e-9, "-1e-09"},
-		{"%g", float32(-1e-9), "-1e-09"},
-		{"%E", 1.0, "1.000000E+00"},
-		{"%E", 1234.5678e3, "1.234568E+06"},
-		{"%E", 1234.5678e-8, "1.234568E-05"},
-		{"%E", -7.0, "-7.000000E+00"},
-		{"%E", -1e-9, "-1.000000E-09"},
-		// {"%G", 1234.5678e3, "1.2345678E+06"},
-		// {"%G", float32(1234.5678e3), "1.2345678E+06"},
-		// {"%G", 1234.5678e-8, "1.2345678E-05"},
-		{"%G", -7.0, "-7"},
-		{"%G", -1e-9, "-1E-09"},
-		{"%G", float32(-1e-9), "-1E-09"},
-
-		{"%20.6e", 1.2345e3, "        1.234500e+03"},
-		{"%20.6e", 1.2345e-3, "        1.234500e-03"},
-		{"%20e", 1.2345e3, "        1.234500e+03"},
-		{"%20e", 1.2345e-3, "        1.234500e-03"},
-		{"%20.8e", 1.2345e3, "      1.23450000e+03"},
-		{"%20f", 1.23456789e3, "         1234.567890"},
-		{"%20f", 1.23456789e-3, "            0.001235"},
-		{"%20f", 12345678901.23456789, "  12345678901.234568"},
-		{"%-20f", 1.23456789e3, "1234.567890         "},
-		{"%20.8f", 1.23456789e3, "       1234.56789000"},
-		{"%20.8f", 1.23456789e-3, "          0.00123457"},
-		// {"%g", 1.23456789e3, "1234.56789"},
-		// {"%g", 1.23456789e-3, "0.00123456789"},
-		// {"%g", 1.23456789e20, "1.23456789e+20"},
-		{"%20e", math.Inf(1), "                +Inf"},
-		{"%-20f", math.Inf(-1), "-Inf                "},
-
-		// from fmt/fmt_test.go: comparison of padding rules with C printf
-		{"%.2f", 1.0, "1.00"},
-		{"%.2f", -1.0, "-1.00"},
-		{"% .2f", 1.0, " 1.00"},
-		{"% .2f", -1.0, "-1.00"},
-		{"%+.2f", 1.0, "+1.00"},
-		{"%+.2f", -1.0, "-1.00"},
-		{"%7.2f", 1.0, "   1.00"},
-		{"%7.2f", -1.0, "  -1.00"},
-		{"% 7.2f", 1.0, "   1.00"},
-		{"% 7.2f", -1.0, "  -1.00"},
-		{"%+7.2f", 1.0, "  +1.00"},
-		{"%+7.2f", -1.0, "  -1.00"},
-		{"%07.2f", 1.0, "0001.00"},
-		{"%07.2f", -1.0, "-001.00"},
-		{"% 07.2f", 1.0, " 001.00"},
-		{"% 07.2f", -1.0, "-001.00"},
-		{"%+07.2f", 1.0, "+001.00"},
-		{"%+07.2f", -1.0, "-001.00"},
-
-		// from fmt/fmt_test.go: zero padding does not apply to infinities
-		{"%020f", math.Inf(-1), "                -Inf"},
-		{"%020f", math.Inf(+1), "                +Inf"},
-		{"% 020f", math.Inf(-1), "                -Inf"},
-		{"% 020f", math.Inf(+1), "                 Inf"},
-		{"%+020f", math.Inf(-1), "                -Inf"},
-		{"%+020f", math.Inf(+1), "                +Inf"},
-		{"%20f", -1.0, "           -1.000000"},
-
-		// handle %v like %g
-		{"%v", 0.0, "0"},
-		{"%v", -7.0, "-7"},
-		{"%v", -1e-9, "-1e-09"},
-		{"%v", float32(-1e-9), "-1e-09"},
-		{"%010v", 0.0, "0000000000"},
-		{"%010v", 0.0, "0000000000"},
-
-		// *Float cases
-		{"%.20f", "1e-20", "0.00000000000000000001"},
-		{"%.20f", "-1e-20", "-0.00000000000000000001"},
-		{"%30.20f", "-1e-20", "       -0.00000000000000000001"},
-		{"%030.20f", "-1e-20", "-00000000.00000000000000000001"},
-		{"%030.20f", "+1e-20", "000000000.00000000000000000001"},
-		{"% 030.20f", "+1e-20", " 00000000.00000000000000000001"},
-
-		// erroneous formats
-		{"%s", 1.0, "%!s(*big.Float=1)"},
-	} {
-		value := new(Float)
-		switch v := test.value.(type) {
-		case float32:
-			value.SetPrec(24).SetFloat64(float64(v))
-		case float64:
-			value.SetPrec(53).SetFloat64(v)
-		case string:
-			value.SetPrec(512).Parse(v, 0)
-		default:
-			t.Fatalf("unsupported test value: %v (%T)", v, v)
-		}
-
-		if got := fmt.Sprintf(test.format, value); got != test.want {
-			t.Errorf("%v: got %q; want %q", test, got, test.want)
-		}
-	}
-}
diff --git a/src/math/big/floatexample_test.go b/src/math/big/floatexample_test.go
deleted file mode 100644
index 358776e..0000000
--- a/src/math/big/floatexample_test.go
+++ /dev/null
@@ -1,111 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package big_test
-
-import (
-	"fmt"
-	"math"
-	"math/big"
-)
-
-func ExampleFloat_Add() {
-	// Operating on numbers of different precision.
-	var x, y, z big.Float
-	x.SetInt64(1000)          // x is automatically set to 64bit precision
-	y.SetFloat64(2.718281828) // y is automatically set to 53bit precision
-	z.SetPrec(32)
-	z.Add(&x, &y)
-	fmt.Printf("x = %.10g (%s, prec = %d, acc = %s)\n", &x, x.Text('p', 0), x.Prec(), x.Acc())
-	fmt.Printf("y = %.10g (%s, prec = %d, acc = %s)\n", &y, y.Text('p', 0), y.Prec(), y.Acc())
-	fmt.Printf("z = %.10g (%s, prec = %d, acc = %s)\n", &z, z.Text('p', 0), z.Prec(), z.Acc())
-	// Output:
-	// x = 1000 (0x.fap+10, prec = 64, acc = Exact)
-	// y = 2.718281828 (0x.adf85458248cd8p+2, prec = 53, acc = Exact)
-	// z = 1002.718282 (0x.faadf854p+10, prec = 32, acc = Below)
-}
-
-func Example_Shift() {
-	// Implementing Float "shift" by modifying the (binary) exponents directly.
-	for s := -5; s <= 5; s++ {
-		x := big.NewFloat(0.5)
-		x.SetMantExp(x, x.MantExp(nil)+s) // shift x by s
-		fmt.Println(x)
-	}
-	// Output:
-	// 0.015625
-	// 0.03125
-	// 0.0625
-	// 0.125
-	// 0.25
-	// 0.5
-	// 1
-	// 2
-	// 4
-	// 8
-	// 16
-}
-
-func ExampleFloat_Cmp() {
-	inf := math.Inf(1)
-	zero := 0.0
-
-	operands := []float64{-inf, -1.2, -zero, 0, +1.2, +inf}
-
-	fmt.Println("   x     y  cmp")
-	fmt.Println("---------------")
-	for _, x64 := range operands {
-		x := big.NewFloat(x64)
-		for _, y64 := range operands {
-			y := big.NewFloat(y64)
-			fmt.Printf("%4g  %4g  %3d\n", x, y, x.Cmp(y))
-		}
-		fmt.Println()
-	}
-
-	// Output:
-	//    x     y  cmp
-	// ---------------
-	// -Inf  -Inf    0
-	// -Inf  -1.2   -1
-	// -Inf    -0   -1
-	// -Inf     0   -1
-	// -Inf   1.2   -1
-	// -Inf  +Inf   -1
-	//
-	// -1.2  -Inf    1
-	// -1.2  -1.2    0
-	// -1.2    -0   -1
-	// -1.2     0   -1
-	// -1.2   1.2   -1
-	// -1.2  +Inf   -1
-	//
-	//   -0  -Inf    1
-	//   -0  -1.2    1
-	//   -0    -0    0
-	//   -0     0    0
-	//   -0   1.2   -1
-	//   -0  +Inf   -1
-	//
-	//    0  -Inf    1
-	//    0  -1.2    1
-	//    0    -0    0
-	//    0     0    0
-	//    0   1.2   -1
-	//    0  +Inf   -1
-	//
-	//  1.2  -Inf    1
-	//  1.2  -1.2    1
-	//  1.2    -0    1
-	//  1.2     0    1
-	//  1.2   1.2    0
-	//  1.2  +Inf   -1
-	//
-	// +Inf  -Inf    1
-	// +Inf  -1.2    1
-	// +Inf    -0    1
-	// +Inf     0    1
-	// +Inf   1.2    1
-	// +Inf  +Inf    0
-}
diff --git a/src/math/big/ftoa.go b/src/math/big/ftoa.go
deleted file mode 100644
index 5c5f2ce..0000000
--- a/src/math/big/ftoa.go
+++ /dev/null
@@ -1,393 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements Float-to-string conversion functions.
-// It is closely following the corresponding implementation
-// in strconv/ftoa.go, but modified and simplified for Float.
-
-package big
-
-import (
-	"fmt"
-	"strconv"
-	"strings"
-)
-
-// Text converts the floating-point number x to a string according
-// to the given format and precision prec. The format is one of:
-//
-//	'e'	-d.dddde±dd, decimal exponent, at least two (possibly 0) exponent digits
-//	'E'	-d.ddddE±dd, decimal exponent, at least two (possibly 0) exponent digits
-//	'f'	-ddddd.dddd, no exponent
-//	'g'	like 'e' for large exponents, like 'f' otherwise
-//	'G'	like 'E' for large exponents, like 'f' otherwise
-//	'b'	-ddddddp±dd, binary exponent
-//	'p'	-0x.dddp±dd, binary exponent, hexadecimal mantissa
-//
-// For the binary exponent formats, the mantissa is printed in normalized form:
-//
-//	'b'	decimal integer mantissa using x.Prec() bits, or -0
-//	'p'	hexadecimal fraction with 0.5 <= 0.mantissa < 1.0, or -0
-//
-// If format is a different character, Text returns a "%" followed by the
-// unrecognized format character.
-//
-// The precision prec controls the number of digits (excluding the exponent)
-// printed by the 'e', 'E', 'f', 'g', and 'G' formats. For 'e', 'E', and 'f'
-// it is the number of digits after the decimal point. For 'g' and 'G' it is
-// the total number of digits. A negative precision selects the smallest
-// number of digits necessary to identify the value x uniquely.
-// The prec value is ignored for the 'b' or 'p' format.
-//
-// BUG(gri) Float.Text does not accept negative precisions (issue #10991).
-func (x *Float) Text(format byte, prec int) string {
-	const extra = 10 // TODO(gri) determine a good/better value here
-	return string(x.Append(make([]byte, 0, prec+extra), format, prec))
-}
-
-// String formats x like x.Text('g', 10).
-func (x *Float) String() string {
-	return x.Text('g', 10)
-}
-
-// Append appends to buf the string form of the floating-point number x,
-// as generated by x.Text, and returns the extended buffer.
-func (x *Float) Append(buf []byte, fmt byte, prec int) []byte {
-	// sign
-	if x.neg {
-		buf = append(buf, '-')
-	}
-
-	// Inf
-	if x.form == inf {
-		if !x.neg {
-			buf = append(buf, '+')
-		}
-		return append(buf, "Inf"...)
-	}
-
-	// pick off easy formats
-	switch fmt {
-	case 'b':
-		return x.fmtB(buf)
-	case 'p':
-		return x.fmtP(buf)
-	}
-
-	// Algorithm:
-	//   1) convert Float to multiprecision decimal
-	//   2) round to desired precision
-	//   3) read digits out and format
-
-	// 1) convert Float to multiprecision decimal
-	var d decimal // == 0.0
-	if x.form == finite {
-		d.init(x.mant, int(x.exp)-x.mant.bitLen())
-	}
-
-	// 2) round to desired precision
-	shortest := false
-	if prec < 0 {
-		shortest = true
-		panic("unimplemented")
-		// TODO(gri) complete this
-		// roundShortest(&d, f.mant, int(f.exp))
-		// Precision for shortest representation mode.
-		switch fmt {
-		case 'e', 'E':
-			prec = len(d.mant) - 1
-		case 'f':
-			prec = max(len(d.mant)-d.exp, 0)
-		case 'g', 'G':
-			prec = len(d.mant)
-		}
-	} else {
-		// round appropriately
-		switch fmt {
-		case 'e', 'E':
-			// one digit before and number of digits after decimal point
-			d.round(1 + prec)
-		case 'f':
-			// number of digits before and after decimal point
-			d.round(d.exp + prec)
-		case 'g', 'G':
-			if prec == 0 {
-				prec = 1
-			}
-			d.round(prec)
-		}
-	}
-
-	// 3) read digits out and format
-	switch fmt {
-	case 'e', 'E':
-		return fmtE(buf, fmt, prec, d)
-	case 'f':
-		return fmtF(buf, prec, d)
-	case 'g', 'G':
-		// trim trailing fractional zeros in %e format
-		eprec := prec
-		if eprec > len(d.mant) && len(d.mant) >= d.exp {
-			eprec = len(d.mant)
-		}
-		// %e is used if the exponent from the conversion
-		// is less than -4 or greater than or equal to the precision.
-		// If precision was the shortest possible, use eprec = 6 for
-		// this decision.
-		if shortest {
-			eprec = 6
-		}
-		exp := d.exp - 1
-		if exp < -4 || exp >= eprec {
-			if prec > len(d.mant) {
-				prec = len(d.mant)
-			}
-			return fmtE(buf, fmt+'e'-'g', prec-1, d)
-		}
-		if prec > d.exp {
-			prec = len(d.mant)
-		}
-		return fmtF(buf, max(prec-d.exp, 0), d)
-	}
-
-	// unknown format
-	if x.neg {
-		buf = buf[:len(buf)-1] // sign was added prematurely - remove it again
-	}
-	return append(buf, '%', fmt)
-}
-
-// %e: d.ddddde±dd
-func fmtE(buf []byte, fmt byte, prec int, d decimal) []byte {
-	// first digit
-	ch := byte('0')
-	if len(d.mant) > 0 {
-		ch = d.mant[0]
-	}
-	buf = append(buf, ch)
-
-	// .moredigits
-	if prec > 0 {
-		buf = append(buf, '.')
-		i := 1
-		m := min(len(d.mant), prec+1)
-		if i < m {
-			buf = append(buf, d.mant[i:m]...)
-			i = m
-		}
-		for ; i <= prec; i++ {
-			buf = append(buf, '0')
-		}
-	}
-
-	// e±
-	buf = append(buf, fmt)
-	var exp int64
-	if len(d.mant) > 0 {
-		exp = int64(d.exp) - 1 // -1 because first digit was printed before '.'
-	}
-	if exp < 0 {
-		ch = '-'
-		exp = -exp
-	} else {
-		ch = '+'
-	}
-	buf = append(buf, ch)
-
-	// dd...d
-	if exp < 10 {
-		buf = append(buf, '0') // at least 2 exponent digits
-	}
-	return strconv.AppendInt(buf, exp, 10)
-}
-
-// %f: ddddddd.ddddd
-func fmtF(buf []byte, prec int, d decimal) []byte {
-	// integer, padded with zeros as needed
-	if d.exp > 0 {
-		m := min(len(d.mant), d.exp)
-		buf = append(buf, d.mant[:m]...)
-		for ; m < d.exp; m++ {
-			buf = append(buf, '0')
-		}
-	} else {
-		buf = append(buf, '0')
-	}
-
-	// fraction
-	if prec > 0 {
-		buf = append(buf, '.')
-		for i := 0; i < prec; i++ {
-			ch := byte('0')
-			if j := d.exp + i; 0 <= j && j < len(d.mant) {
-				ch = d.mant[j]
-			}
-			buf = append(buf, ch)
-		}
-	}
-
-	return buf
-}
-
-// fmtB appends the string of x in the format mantissa "p" exponent
-// with a decimal mantissa and a binary exponent, or 0" if x is zero,
-// and returns the extended buffer.
-// The mantissa is normalized such that is uses x.Prec() bits in binary
-// representation.
-// The sign of x is ignored, and x must not be an Inf.
-func (x *Float) fmtB(buf []byte) []byte {
-	if x.form == zero {
-		return append(buf, '0')
-	}
-
-	if debugFloat && x.form != finite {
-		panic("non-finite float")
-	}
-	// x != 0
-
-	// adjust mantissa to use exactly x.prec bits
-	m := x.mant
-	switch w := uint32(len(x.mant)) * _W; {
-	case w < x.prec:
-		m = nat(nil).shl(m, uint(x.prec-w))
-	case w > x.prec:
-		m = nat(nil).shr(m, uint(w-x.prec))
-	}
-
-	buf = append(buf, m.decimalString()...)
-	buf = append(buf, 'p')
-	e := int64(x.exp) - int64(x.prec)
-	if e >= 0 {
-		buf = append(buf, '+')
-	}
-	return strconv.AppendInt(buf, e, 10)
-}
-
-// fmtP appends the string of x in the format 0x." mantissa "p" exponent
-// with a hexadecimal mantissa and a binary exponent, or 0" if x is zero,
-// ad returns the extended buffer.
-// The mantissa is normalized such that 0.5 <= 0.mantissa < 1.0.
-// The sign of x is ignored, and x must not be an Inf.
-func (x *Float) fmtP(buf []byte) []byte {
-	if x.form == zero {
-		return append(buf, '0')
-	}
-
-	if debugFloat && x.form != finite {
-		panic("non-finite float")
-	}
-	// x != 0
-
-	// remove trailing 0 words early
-	// (no need to convert to hex 0's and trim later)
-	m := x.mant
-	i := 0
-	for i < len(m) && m[i] == 0 {
-		i++
-	}
-	m = m[i:]
-
-	buf = append(buf, "0x."...)
-	buf = append(buf, strings.TrimRight(m.hexString(), "0")...)
-	buf = append(buf, 'p')
-	if x.exp >= 0 {
-		buf = append(buf, '+')
-	}
-	return strconv.AppendInt(buf, int64(x.exp), 10)
-}
-
-func min(x, y int) int {
-	if x < y {
-		return x
-	}
-	return y
-}
-
-// Format implements fmt.Formatter. It accepts all the regular
-// formats for floating-point numbers ('e', 'E', 'f', 'F', 'g',
-// 'G') as well as 'b', 'p', and 'v'. See (*Float).Text for the
-// interpretation of 'b' and 'p'. The 'v' format is handled like
-// 'g'.
-// Format also supports specification of the minimum precision
-// in digits, the output field width, as well as the format verbs
-// '+' and ' ' for sign control, '0' for space or zero padding,
-// and '-' for left or right justification. See the fmt package
-// for details.
-//
-// BUG(gri) A missing precision for the 'g' format, or a negative
-//          (via '*') precision is not yet supported. Instead the
-//          default precision (6) is used in that case (issue #10991).
-func (x *Float) Format(s fmt.State, format rune) {
-	prec, hasPrec := s.Precision()
-	if !hasPrec {
-		prec = 6 // default precision for 'e', 'f'
-	}
-
-	switch format {
-	case 'e', 'E', 'f', 'b', 'p':
-		// nothing to do
-	case 'F':
-		// (*Float).Text doesn't support 'F'; handle like 'f'
-		format = 'f'
-	case 'v':
-		// handle like 'g'
-		format = 'g'
-		fallthrough
-	case 'g', 'G':
-		if !hasPrec {
-			// TODO(gri) uncomment once (*Float).Text handles prec < 0
-			// prec = -1 // default precision for 'g', 'G'
-		}
-	default:
-		fmt.Fprintf(s, "%%!%c(*big.Float=%s)", format, x.String())
-		return
-	}
-	var buf []byte
-	buf = x.Append(buf, byte(format), prec)
-	if len(buf) == 0 {
-		buf = []byte("?") // should never happen, but don't crash
-	}
-	// len(buf) > 0
-
-	var sign string
-	switch {
-	case buf[0] == '-':
-		sign = "-"
-		buf = buf[1:]
-	case buf[0] == '+':
-		// +Inf
-		sign = "+"
-		if s.Flag(' ') {
-			sign = " "
-		}
-		buf = buf[1:]
-	case s.Flag('+'):
-		sign = "+"
-	case s.Flag(' '):
-		sign = " "
-	}
-
-	var padding int
-	if width, hasWidth := s.Width(); hasWidth && width > len(sign)+len(buf) {
-		padding = width - len(sign) - len(buf)
-	}
-
-	switch {
-	case s.Flag('0') && !x.IsInf():
-		// 0-padding on left
-		writeMultiple(s, sign, 1)
-		writeMultiple(s, "0", padding)
-		s.Write(buf)
-	case s.Flag('-'):
-		// padding on right
-		writeMultiple(s, sign, 1)
-		s.Write(buf)
-		writeMultiple(s, " ", padding)
-	default:
-		// padding on left
-		writeMultiple(s, " ", padding)
-		writeMultiple(s, sign, 1)
-		s.Write(buf)
-	}
-}
diff --git a/src/math/big/intconv.go b/src/math/big/intconv.go
deleted file mode 100644
index 9c68a22..0000000
--- a/src/math/big/intconv.go
+++ /dev/null
@@ -1,228 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements int-to-string conversion functions.
-
-package big
-
-import (
-	"errors"
-	"fmt"
-	"io"
-)
-
-func (x *Int) String() string {
-	switch {
-	case x == nil:
-		return "<nil>"
-	case x.neg:
-		return "-" + x.abs.decimalString()
-	}
-	return x.abs.decimalString()
-}
-
-func charset(ch rune) string {
-	switch ch {
-	case 'b':
-		return lowercaseDigits[0:2]
-	case 'o':
-		return lowercaseDigits[0:8]
-	case 'd', 's', 'v':
-		return lowercaseDigits[0:10]
-	case 'x':
-		return lowercaseDigits[0:16]
-	case 'X':
-		return uppercaseDigits[0:16]
-	}
-	return "" // unknown format
-}
-
-// write count copies of text to s
-func writeMultiple(s fmt.State, text string, count int) {
-	if len(text) > 0 {
-		b := []byte(text)
-		for ; count > 0; count-- {
-			s.Write(b)
-		}
-	}
-}
-
-// Format is a support routine for fmt.Formatter. It accepts
-// the formats 'b' (binary), 'o' (octal), 'd' (decimal), 'x'
-// (lowercase hexadecimal), and 'X' (uppercase hexadecimal).
-// Also supported are the full suite of package fmt's format
-// verbs for integral types, including '+', '-', and ' '
-// for sign control, '#' for leading zero in octal and for
-// hexadecimal, a leading "0x" or "0X" for "%#x" and "%#X"
-// respectively, specification of minimum digits precision,
-// output field width, space or zero padding, and left or
-// right justification.
-//
-func (x *Int) Format(s fmt.State, ch rune) {
-	cs := charset(ch)
-
-	// special cases
-	switch {
-	case cs == "":
-		// unknown format
-		fmt.Fprintf(s, "%%!%c(big.Int=%s)", ch, x.String())
-		return
-	case x == nil:
-		fmt.Fprint(s, "<nil>")
-		return
-	}
-
-	// determine sign character
-	sign := ""
-	switch {
-	case x.neg:
-		sign = "-"
-	case s.Flag('+'): // supersedes ' ' when both specified
-		sign = "+"
-	case s.Flag(' '):
-		sign = " "
-	}
-
-	// determine prefix characters for indicating output base
-	prefix := ""
-	if s.Flag('#') {
-		switch ch {
-		case 'o': // octal
-			prefix = "0"
-		case 'x': // hexadecimal
-			prefix = "0x"
-		case 'X':
-			prefix = "0X"
-		}
-	}
-
-	// determine digits with base set by len(cs) and digit characters from cs
-	digits := x.abs.string(cs)
-
-	// number of characters for the three classes of number padding
-	var left int   // space characters to left of digits for right justification ("%8d")
-	var zeroes int // zero characters (actually cs[0]) as left-most digits ("%.8d")
-	var right int  // space characters to right of digits for left justification ("%-8d")
-
-	// determine number padding from precision: the least number of digits to output
-	precision, precisionSet := s.Precision()
-	if precisionSet {
-		switch {
-		case len(digits) < precision:
-			zeroes = precision - len(digits) // count of zero padding
-		case digits == "0" && precision == 0:
-			return // print nothing if zero value (x == 0) and zero precision ("." or ".0")
-		}
-	}
-
-	// determine field pad from width: the least number of characters to output
-	length := len(sign) + len(prefix) + zeroes + len(digits)
-	if width, widthSet := s.Width(); widthSet && length < width { // pad as specified
-		switch d := width - length; {
-		case s.Flag('-'):
-			// pad on the right with spaces; supersedes '0' when both specified
-			right = d
-		case s.Flag('0') && !precisionSet:
-			// pad with zeroes unless precision also specified
-			zeroes = d
-		default:
-			// pad on the left with spaces
-			left = d
-		}
-	}
-
-	// print number as [left pad][sign][prefix][zero pad][digits][right pad]
-	writeMultiple(s, " ", left)
-	writeMultiple(s, sign, 1)
-	writeMultiple(s, prefix, 1)
-	writeMultiple(s, "0", zeroes)
-	writeMultiple(s, digits, 1)
-	writeMultiple(s, " ", right)
-}
-
-// scan sets z to the integer value corresponding to the longest possible prefix
-// read from r representing a signed integer number in a given conversion base.
-// It returns z, the actual conversion base used, and an error, if any. In the
-// error case, the value of z is undefined but the returned value is nil. The
-// syntax follows the syntax of integer literals in Go.
-//
-// The base argument must be 0 or a value from 2 through MaxBase. If the base
-// is 0, the string prefix determines the actual conversion base. A prefix of
-// ``0x'' or ``0X'' selects base 16; the ``0'' prefix selects base 8, and a
-// ``0b'' or ``0B'' prefix selects base 2. Otherwise the selected base is 10.
-//
-func (z *Int) scan(r io.ByteScanner, base int) (*Int, int, error) {
-	// determine sign
-	neg, err := scanSign(r)
-	if err != nil {
-		return nil, 0, err
-	}
-
-	// determine mantissa
-	z.abs, base, _, err = z.abs.scan(r, base, false)
-	if err != nil {
-		return nil, base, err
-	}
-	z.neg = len(z.abs) > 0 && neg // 0 has no sign
-
-	return z, base, nil
-}
-
-func scanSign(r io.ByteScanner) (neg bool, err error) {
-	var ch byte
-	if ch, err = r.ReadByte(); err != nil {
-		return false, err
-	}
-	switch ch {
-	case '-':
-		neg = true
-	case '+':
-		// nothing to do
-	default:
-		r.UnreadByte()
-	}
-	return
-}
-
-// byteReader is a local wrapper around fmt.ScanState;
-// it implements the ByteReader interface.
-type byteReader struct {
-	fmt.ScanState
-}
-
-func (r byteReader) ReadByte() (byte, error) {
-	ch, size, err := r.ReadRune()
-	if size != 1 && err == nil {
-		err = fmt.Errorf("invalid rune %#U", ch)
-	}
-	return byte(ch), err
-}
-
-func (r byteReader) UnreadByte() error {
-	return r.UnreadRune()
-}
-
-// Scan is a support routine for fmt.Scanner; it sets z to the value of
-// the scanned number. It accepts the formats 'b' (binary), 'o' (octal),
-// 'd' (decimal), 'x' (lowercase hexadecimal), and 'X' (uppercase hexadecimal).
-func (z *Int) Scan(s fmt.ScanState, ch rune) error {
-	s.SkipSpace() // skip leading space characters
-	base := 0
-	switch ch {
-	case 'b':
-		base = 2
-	case 'o':
-		base = 8
-	case 'd':
-		base = 10
-	case 'x', 'X':
-		base = 16
-	case 's', 'v':
-		// let scan determine the base
-	default:
-		return errors.New("Int.Scan: invalid verb")
-	}
-	_, _, err := z.scan(byteReader{s}, base)
-	return err
-}
diff --git a/src/math/big/intconv_test.go b/src/math/big/intconv_test.go
deleted file mode 100644
index 2deb84b..0000000
--- a/src/math/big/intconv_test.go
+++ /dev/null
@@ -1,342 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package big
-
-import (
-	"bytes"
-	"fmt"
-	"testing"
-)
-
-var stringTests = []struct {
-	in   string
-	out  string
-	base int
-	val  int64
-	ok   bool
-}{
-	{in: "", ok: false},
-	{in: "a", ok: false},
-	{in: "z", ok: false},
-	{in: "+", ok: false},
-	{in: "-", ok: false},
-	{in: "0b", ok: false},
-	{in: "0x", ok: false},
-	{in: "2", base: 2, ok: false},
-	{in: "0b2", base: 0, ok: false},
-	{in: "08", ok: false},
-	{in: "8", base: 8, ok: false},
-	{in: "0xg", base: 0, ok: false},
-	{in: "g", base: 16, ok: false},
-	{"0", "0", 0, 0, true},
-	{"0", "0", 10, 0, true},
-	{"0", "0", 16, 0, true},
-	{"+0", "0", 0, 0, true},
-	{"-0", "0", 0, 0, true},
-	{"10", "10", 0, 10, true},
-	{"10", "10", 10, 10, true},
-	{"10", "10", 16, 16, true},
-	{"-10", "-10", 16, -16, true},
-	{"+10", "10", 16, 16, true},
-	{"0x10", "16", 0, 16, true},
-	{in: "0x10", base: 16, ok: false},
-	{"-0x10", "-16", 0, -16, true},
-	{"+0x10", "16", 0, 16, true},
-	{"00", "0", 0, 0, true},
-	{"0", "0", 8, 0, true},
-	{"07", "7", 0, 7, true},
-	{"7", "7", 8, 7, true},
-	{"023", "19", 0, 19, true},
-	{"23", "23", 8, 19, true},
-	{"cafebabe", "cafebabe", 16, 0xcafebabe, true},
-	{"0b0", "0", 0, 0, true},
-	{"-111", "-111", 2, -7, true},
-	{"-0b111", "-7", 0, -7, true},
-	{"0b1001010111", "599", 0, 0x257, true},
-	{"1001010111", "1001010111", 2, 0x257, true},
-}
-
-func format(base int) string {
-	switch base {
-	case 2:
-		return "%b"
-	case 8:
-		return "%o"
-	case 16:
-		return "%x"
-	}
-	return "%d"
-}
-
-func TestGetString(t *testing.T) {
-	z := new(Int)
-	for i, test := range stringTests {
-		if !test.ok {
-			continue
-		}
-		z.SetInt64(test.val)
-
-		if test.base == 10 {
-			s := z.String()
-			if s != test.out {
-				t.Errorf("#%da got %s; want %s", i, s, test.out)
-			}
-		}
-
-		s := fmt.Sprintf(format(test.base), z)
-		if s != test.out {
-			t.Errorf("#%db got %s; want %s", i, s, test.out)
-		}
-	}
-}
-
-func TestSetString(t *testing.T) {
-	tmp := new(Int)
-	for i, test := range stringTests {
-		// initialize to a non-zero value so that issues with parsing
-		// 0 are detected
-		tmp.SetInt64(1234567890)
-		n1, ok1 := new(Int).SetString(test.in, test.base)
-		n2, ok2 := tmp.SetString(test.in, test.base)
-		expected := NewInt(test.val)
-		if ok1 != test.ok || ok2 != test.ok {
-			t.Errorf("#%d (input '%s') ok incorrect (should be %t)", i, test.in, test.ok)
-			continue
-		}
-		if !ok1 {
-			if n1 != nil {
-				t.Errorf("#%d (input '%s') n1 != nil", i, test.in)
-			}
-			continue
-		}
-		if !ok2 {
-			if n2 != nil {
-				t.Errorf("#%d (input '%s') n2 != nil", i, test.in)
-			}
-			continue
-		}
-
-		if ok1 && !isNormalized(n1) {
-			t.Errorf("#%d (input '%s'): %v is not normalized", i, test.in, *n1)
-		}
-		if ok2 && !isNormalized(n2) {
-			t.Errorf("#%d (input '%s'): %v is not normalized", i, test.in, *n2)
-		}
-
-		if n1.Cmp(expected) != 0 {
-			t.Errorf("#%d (input '%s') got: %s want: %d", i, test.in, n1, test.val)
-		}
-		if n2.Cmp(expected) != 0 {
-			t.Errorf("#%d (input '%s') got: %s want: %d", i, test.in, n2, test.val)
-		}
-	}
-}
-
-var formatTests = []struct {
-	input  string
-	format string
-	output string
-}{
-	{"<nil>", "%x", "<nil>"},
-	{"<nil>", "%#x", "<nil>"},
-	{"<nil>", "%#y", "%!y(big.Int=<nil>)"},
-
-	{"10", "%b", "1010"},
-	{"10", "%o", "12"},
-	{"10", "%d", "10"},
-	{"10", "%v", "10"},
-	{"10", "%x", "a"},
-	{"10", "%X", "A"},
-	{"-10", "%X", "-A"},
-	{"10", "%y", "%!y(big.Int=10)"},
-	{"-10", "%y", "%!y(big.Int=-10)"},
-
-	{"10", "%#b", "1010"},
-	{"10", "%#o", "012"},
-	{"10", "%#d", "10"},
-	{"10", "%#v", "10"},
-	{"10", "%#x", "0xa"},
-	{"10", "%#X", "0XA"},
-	{"-10", "%#X", "-0XA"},
-	{"10", "%#y", "%!y(big.Int=10)"},
-	{"-10", "%#y", "%!y(big.Int=-10)"},
-
-	{"1234", "%d", "1234"},
-	{"1234", "%3d", "1234"},
-	{"1234", "%4d", "1234"},
-	{"-1234", "%d", "-1234"},
-	{"1234", "% 5d", " 1234"},
-	{"1234", "%+5d", "+1234"},
-	{"1234", "%-5d", "1234 "},
-	{"1234", "%x", "4d2"},
-	{"1234", "%X", "4D2"},
-	{"-1234", "%3x", "-4d2"},
-	{"-1234", "%4x", "-4d2"},
-	{"-1234", "%5x", " -4d2"},
-	{"-1234", "%-5x", "-4d2 "},
-	{"1234", "%03d", "1234"},
-	{"1234", "%04d", "1234"},
-	{"1234", "%05d", "01234"},
-	{"1234", "%06d", "001234"},
-	{"-1234", "%06d", "-01234"},
-	{"1234", "%+06d", "+01234"},
-	{"1234", "% 06d", " 01234"},
-	{"1234", "%-6d", "1234  "},
-	{"1234", "%-06d", "1234  "},
-	{"-1234", "%-06d", "-1234 "},
-
-	{"1234", "%.3d", "1234"},
-	{"1234", "%.4d", "1234"},
-	{"1234", "%.5d", "01234"},
-	{"1234", "%.6d", "001234"},
-	{"-1234", "%.3d", "-1234"},
-	{"-1234", "%.4d", "-1234"},
-	{"-1234", "%.5d", "-01234"},
-	{"-1234", "%.6d", "-001234"},
-
-	{"1234", "%8.3d", "    1234"},
-	{"1234", "%8.4d", "    1234"},
-	{"1234", "%8.5d", "   01234"},
-	{"1234", "%8.6d", "  001234"},
-	{"-1234", "%8.3d", "   -1234"},
-	{"-1234", "%8.4d", "   -1234"},
-	{"-1234", "%8.5d", "  -01234"},
-	{"-1234", "%8.6d", " -001234"},
-
-	{"1234", "%+8.3d", "   +1234"},
-	{"1234", "%+8.4d", "   +1234"},
-	{"1234", "%+8.5d", "  +01234"},
-	{"1234", "%+8.6d", " +001234"},
-	{"-1234", "%+8.3d", "   -1234"},
-	{"-1234", "%+8.4d", "   -1234"},
-	{"-1234", "%+8.5d", "  -01234"},
-	{"-1234", "%+8.6d", " -001234"},
-
-	{"1234", "% 8.3d", "    1234"},
-	{"1234", "% 8.4d", "    1234"},
-	{"1234", "% 8.5d", "   01234"},
-	{"1234", "% 8.6d", "  001234"},
-	{"-1234", "% 8.3d", "   -1234"},
-	{"-1234", "% 8.4d", "   -1234"},
-	{"-1234", "% 8.5d", "  -01234"},
-	{"-1234", "% 8.6d", " -001234"},
-
-	{"1234", "%.3x", "4d2"},
-	{"1234", "%.4x", "04d2"},
-	{"1234", "%.5x", "004d2"},
-	{"1234", "%.6x", "0004d2"},
-	{"-1234", "%.3x", "-4d2"},
-	{"-1234", "%.4x", "-04d2"},
-	{"-1234", "%.5x", "-004d2"},
-	{"-1234", "%.6x", "-0004d2"},
-
-	{"1234", "%8.3x", "     4d2"},
-	{"1234", "%8.4x", "    04d2"},
-	{"1234", "%8.5x", "   004d2"},
-	{"1234", "%8.6x", "  0004d2"},
-	{"-1234", "%8.3x", "    -4d2"},
-	{"-1234", "%8.4x", "   -04d2"},
-	{"-1234", "%8.5x", "  -004d2"},
-	{"-1234", "%8.6x", " -0004d2"},
-
-	{"1234", "%+8.3x", "    +4d2"},
-	{"1234", "%+8.4x", "   +04d2"},
-	{"1234", "%+8.5x", "  +004d2"},
-	{"1234", "%+8.6x", " +0004d2"},
-	{"-1234", "%+8.3x", "    -4d2"},
-	{"-1234", "%+8.4x", "   -04d2"},
-	{"-1234", "%+8.5x", "  -004d2"},
-	{"-1234", "%+8.6x", " -0004d2"},
-
-	{"1234", "% 8.3x", "     4d2"},
-	{"1234", "% 8.4x", "    04d2"},
-	{"1234", "% 8.5x", "   004d2"},
-	{"1234", "% 8.6x", "  0004d2"},
-	{"1234", "% 8.7x", " 00004d2"},
-	{"1234", "% 8.8x", " 000004d2"},
-	{"-1234", "% 8.3x", "    -4d2"},
-	{"-1234", "% 8.4x", "   -04d2"},
-	{"-1234", "% 8.5x", "  -004d2"},
-	{"-1234", "% 8.6x", " -0004d2"},
-	{"-1234", "% 8.7x", "-00004d2"},
-	{"-1234", "% 8.8x", "-000004d2"},
-
-	{"1234", "%-8.3d", "1234    "},
-	{"1234", "%-8.4d", "1234    "},
-	{"1234", "%-8.5d", "01234   "},
-	{"1234", "%-8.6d", "001234  "},
-	{"1234", "%-8.7d", "0001234 "},
-	{"1234", "%-8.8d", "00001234"},
-	{"-1234", "%-8.3d", "-1234   "},
-	{"-1234", "%-8.4d", "-1234   "},
-	{"-1234", "%-8.5d", "-01234  "},
-	{"-1234", "%-8.6d", "-001234 "},
-	{"-1234", "%-8.7d", "-0001234"},
-	{"-1234", "%-8.8d", "-00001234"},
-
-	{"16777215", "%b", "111111111111111111111111"}, // 2**24 - 1
-
-	{"0", "%.d", ""},
-	{"0", "%.0d", ""},
-	{"0", "%3.d", ""},
-}
-
-func TestFormat(t *testing.T) {
-	for i, test := range formatTests {
-		var x *Int
-		if test.input != "<nil>" {
-			var ok bool
-			x, ok = new(Int).SetString(test.input, 0)
-			if !ok {
-				t.Errorf("#%d failed reading input %s", i, test.input)
-			}
-		}
-		output := fmt.Sprintf(test.format, x)
-		if output != test.output {
-			t.Errorf("#%d got %q; want %q, {%q, %q, %q}", i, output, test.output, test.input, test.format, test.output)
-		}
-	}
-}
-
-var scanTests = []struct {
-	input     string
-	format    string
-	output    string
-	remaining int
-}{
-	{"1010", "%b", "10", 0},
-	{"0b1010", "%v", "10", 0},
-	{"12", "%o", "10", 0},
-	{"012", "%v", "10", 0},
-	{"10", "%d", "10", 0},
-	{"10", "%v", "10", 0},
-	{"a", "%x", "10", 0},
-	{"0xa", "%v", "10", 0},
-	{"A", "%X", "10", 0},
-	{"-A", "%X", "-10", 0},
-	{"+0b1011001", "%v", "89", 0},
-	{"0xA", "%v", "10", 0},
-	{"0 ", "%v", "0", 1},
-	{"2+3", "%v", "2", 2},
-	{"0XABC 12", "%v", "2748", 3},
-}
-
-func TestScan(t *testing.T) {
-	var buf bytes.Buffer
-	for i, test := range scanTests {
-		x := new(Int)
-		buf.Reset()
-		buf.WriteString(test.input)
-		if _, err := fmt.Fscanf(&buf, test.format, x); err != nil {
-			t.Errorf("#%d error: %s", i, err)
-		}
-		if x.String() != test.output {
-			t.Errorf("#%d got %s; want %s", i, x.String(), test.output)
-		}
-		if buf.Len() != test.remaining {
-			t.Errorf("#%d got %d bytes remaining; want %d", i, buf.Len(), test.remaining)
-		}
-	}
-}
diff --git a/src/math/big/natconv.go b/src/math/big/natconv.go
deleted file mode 100644
index 022dcfe..0000000
--- a/src/math/big/natconv.go
+++ /dev/null
@@ -1,495 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements nat-to-string conversion functions.
-
-package big
-
-import (
-	"errors"
-	"fmt"
-	"io"
-	"math"
-	"sync"
-)
-
-// MaxBase is the largest number base accepted for string conversions.
-const MaxBase = 'z' - 'a' + 10 + 1
-
-// maxPow returns (b**n, n) such that b**n is the largest power b**n <= _M.
-// For instance maxPow(10) == (1e19, 19) for 19 decimal digits in a 64bit Word.
-// In other words, at most n digits in base b fit into a Word.
-// TODO(gri) replace this with a table, generated at build time.
-func maxPow(b Word) (p Word, n int) {
-	p, n = b, 1 // assuming b <= _M
-	for max := _M / b; p <= max; {
-		// p == b**n && p <= max
-		p *= b
-		n++
-	}
-	// p == b**n && p <= _M
-	return
-}
-
-// pow returns x**n for n > 0, and 1 otherwise.
-func pow(x Word, n int) (p Word) {
-	// n == sum of bi * 2**i, for 0 <= i < imax, and bi is 0 or 1
-	// thus x**n == product of x**(2**i) for all i where bi == 1
-	// (Russian Peasant Method for exponentiation)
-	p = 1
-	for n > 0 {
-		if n&1 != 0 {
-			p *= x
-		}
-		x *= x
-		n >>= 1
-	}
-	return
-}
-
-// scan scans the number corresponding to the longest possible prefix
-// from r representing an unsigned number in a given conversion base.
-// It returns the corresponding natural number res, the actual base b,
-// a digit count, and a read or syntax error err, if any.
-//
-//	number   = [ prefix ] mantissa .
-//	prefix   = "0" [ "x" | "X" | "b" | "B" ] .
-//      mantissa = digits | digits "." [ digits ] | "." digits .
-//	digits   = digit { digit } .
-//	digit    = "0" ... "9" | "a" ... "z" | "A" ... "Z" .
-//
-// Unless fracOk is set, the base argument must be 0 or a value between
-// 2 and MaxBase. If fracOk is set, the base argument must be one of
-// 0, 2, 10, or 16. Providing an invalid base argument leads to a run-
-// time panic.
-//
-// For base 0, the number prefix determines the actual base: A prefix of
-// ``0x'' or ``0X'' selects base 16; if fracOk is not set, the ``0'' prefix
-// selects base 8, and a ``0b'' or ``0B'' prefix selects base 2. Otherwise
-// the selected base is 10 and no prefix is accepted.
-//
-// If fracOk is set, an octal prefix is ignored (a leading ``0'' simply
-// stands for a zero digit), and a period followed by a fractional part
-// is permitted. The result value is computed as if there were no period
-// present; and the count value is used to determine the fractional part.
-//
-// A result digit count > 0 corresponds to the number of (non-prefix) digits
-// parsed. A digit count <= 0 indicates the presence of a period (if fracOk
-// is set, only), and -count is the number of fractional digits found.
-// In this case, the actual value of the scanned number is res * b**count.
-//
-func (z nat) scan(r io.ByteScanner, base int, fracOk bool) (res nat, b, count int, err error) {
-	// reject illegal bases
-	baseOk := base == 0 ||
-		!fracOk && 2 <= base && base <= MaxBase ||
-		fracOk && (base == 2 || base == 10 || base == 16)
-	if !baseOk {
-		panic(fmt.Sprintf("illegal number base %d", base))
-	}
-
-	// one char look-ahead
-	ch, err := r.ReadByte()
-	if err != nil {
-		return
-	}
-
-	// determine actual base
-	b = base
-	if base == 0 {
-		// actual base is 10 unless there's a base prefix
-		b = 10
-		if ch == '0' {
-			count = 1
-			switch ch, err = r.ReadByte(); err {
-			case nil:
-				// possibly one of 0x, 0X, 0b, 0B
-				if !fracOk {
-					b = 8
-				}
-				switch ch {
-				case 'x', 'X':
-					b = 16
-				case 'b', 'B':
-					b = 2
-				}
-				switch b {
-				case 16, 2:
-					count = 0 // prefix is not counted
-					if ch, err = r.ReadByte(); err != nil {
-						// io.EOF is also an error in this case
-						return
-					}
-				case 8:
-					count = 0 // prefix is not counted
-				}
-			case io.EOF:
-				// input is "0"
-				res = z[:0]
-				err = nil
-				return
-			default:
-				// read error
-				return
-			}
-		}
-	}
-
-	// convert string
-	// Algorithm: Collect digits in groups of at most n digits in di
-	// and then use mulAddWW for every such group to add them to the
-	// result.
-	z = z[:0]
-	b1 := Word(b)
-	bn, n := maxPow(b1) // at most n digits in base b1 fit into Word
-	di := Word(0)       // 0 <= di < b1**i < bn
-	i := 0              // 0 <= i < n
-	dp := -1            // position of decimal point
-	for {
-		if fracOk && ch == '.' {
-			fracOk = false
-			dp = count
-			// advance
-			if ch, err = r.ReadByte(); err != nil {
-				if err == io.EOF {
-					err = nil
-					break
-				}
-				return
-			}
-		}
-
-		// convert rune into digit value d1
-		var d1 Word
-		switch {
-		case '0' <= ch && ch <= '9':
-			d1 = Word(ch - '0')
-		case 'a' <= ch && ch <= 'z':
-			d1 = Word(ch - 'a' + 10)
-		case 'A' <= ch && ch <= 'Z':
-			d1 = Word(ch - 'A' + 10)
-		default:
-			d1 = MaxBase + 1
-		}
-		if d1 >= b1 {
-			r.UnreadByte() // ch does not belong to number anymore
-			break
-		}
-		count++
-
-		// collect d1 in di
-		di = di*b1 + d1
-		i++
-
-		// if di is "full", add it to the result
-		if i == n {
-			z = z.mulAddWW(z, bn, di)
-			di = 0
-			i = 0
-		}
-
-		// advance
-		if ch, err = r.ReadByte(); err != nil {
-			if err == io.EOF {
-				err = nil
-				break
-			}
-			return
-		}
-	}
-
-	if count == 0 {
-		// no digits found
-		switch {
-		case base == 0 && b == 8:
-			// there was only the octal prefix 0 (possibly followed by digits > 7);
-			// count as one digit and return base 10, not 8
-			count = 1
-			b = 10
-		case base != 0 || b != 8:
-			// there was neither a mantissa digit nor the octal prefix 0
-			err = errors.New("syntax error scanning number")
-		}
-		return
-	}
-	// count > 0
-
-	// add remaining digits to result
-	if i > 0 {
-		z = z.mulAddWW(z, pow(b1, i), di)
-	}
-	res = z.norm()
-
-	// adjust for fraction, if any
-	if dp >= 0 {
-		// 0 <= dp <= count > 0
-		count = dp - count
-	}
-
-	return
-}
-
-// Character sets for string conversion.
-const (
-	lowercaseDigits = "0123456789abcdefghijklmnopqrstuvwxyz"
-	uppercaseDigits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-)
-
-// decimalString returns a decimal representation of x.
-// It calls x.string with the charset "0123456789".
-func (x nat) decimalString() string {
-	return x.string(lowercaseDigits[:10])
-}
-
-// hexString returns a hexadecimal representation of x.
-// It calls x.string with the charset "0123456789abcdef".
-func (x nat) hexString() string {
-	return x.string(lowercaseDigits[:16])
-}
-
-// string converts x to a string using digits from a charset; a digit with
-// value d is represented by charset[d]. The conversion base is determined
-// by len(charset), which must be >= 2 and <= 256.
-func (x nat) string(charset string) string {
-	b := Word(len(charset))
-
-	// special cases
-	switch {
-	case b < 2 || b > 256:
-		panic("invalid character set length")
-	case len(x) == 0:
-		return string(charset[0])
-	}
-
-	// allocate buffer for conversion
-	i := int(float64(x.bitLen())/math.Log2(float64(b))) + 1 // off by one at most
-	s := make([]byte, i)
-
-	// convert power of two and non power of two bases separately
-	if b == b&-b {
-		// shift is base-b digit size in bits
-		shift := trailingZeroBits(b) // shift > 0 because b >= 2
-		mask := Word(1)<<shift - 1
-		w := x[0]
-		nbits := uint(_W) // number of unprocessed bits in w
-
-		// convert less-significant words
-		for k := 1; k < len(x); k++ {
-			// convert full digits
-			for nbits >= shift {
-				i--
-				s[i] = charset[w&mask]
-				w >>= shift
-				nbits -= shift
-			}
-
-			// convert any partial leading digit and advance to next word
-			if nbits == 0 {
-				// no partial digit remaining, just advance
-				w = x[k]
-				nbits = _W
-			} else {
-				// partial digit in current (k-1) and next (k) word
-				w |= x[k] << nbits
-				i--
-				s[i] = charset[w&mask]
-
-				// advance
-				w = x[k] >> (shift - nbits)
-				nbits = _W - (shift - nbits)
-			}
-		}
-
-		// convert digits of most-significant word (omit leading zeros)
-		for nbits >= 0 && w != 0 {
-			i--
-			s[i] = charset[w&mask]
-			w >>= shift
-			nbits -= shift
-		}
-
-	} else {
-		bb, ndigits := maxPow(Word(b))
-
-		// construct table of successive squares of bb*leafSize to use in subdivisions
-		// result (table != nil) <=> (len(x) > leafSize > 0)
-		table := divisors(len(x), b, ndigits, bb)
-
-		// preserve x, create local copy for use by convertWords
-		q := nat(nil).set(x)
-
-		// convert q to string s in base b
-		q.convertWords(s, charset, b, ndigits, bb, table)
-
-		// strip leading zeros
-		// (x != 0; thus s must contain at least one non-zero digit
-		// and the loop will terminate)
-		i = 0
-		for zero := charset[0]; s[i] == zero; {
-			i++
-		}
-	}
-
-	return string(s[i:])
-}
-
-// Convert words of q to base b digits in s. If q is large, it is recursively "split in half"
-// by nat/nat division using tabulated divisors. Otherwise, it is converted iteratively using
-// repeated nat/Word division.
-//
-// The iterative method processes n Words by n divW() calls, each of which visits every Word in the
-// incrementally shortened q for a total of n + (n-1) + (n-2) ... + 2 + 1, or n(n+1)/2 divW()'s.
-// Recursive conversion divides q by its approximate square root, yielding two parts, each half
-// the size of q. Using the iterative method on both halves means 2 * (n/2)(n/2 + 1)/2 divW()'s
-// plus the expensive long div(). Asymptotically, the ratio is favorable at 1/2 the divW()'s, and
-// is made better by splitting the subblocks recursively. Best is to split blocks until one more
-// split would take longer (because of the nat/nat div()) than the twice as many divW()'s of the
-// iterative approach. This threshold is represented by leafSize. Benchmarking of leafSize in the
-// range 2..64 shows that values of 8 and 16 work well, with a 4x speedup at medium lengths and
-// ~30x for 20000 digits. Use nat_test.go's BenchmarkLeafSize tests to optimize leafSize for
-// specific hardware.
-//
-func (q nat) convertWords(s []byte, charset string, b Word, ndigits int, bb Word, table []divisor) {
-	// split larger blocks recursively
-	if table != nil {
-		// len(q) > leafSize > 0
-		var r nat
-		index := len(table) - 1
-		for len(q) > leafSize {
-			// find divisor close to sqrt(q) if possible, but in any case < q
-			maxLength := q.bitLen()     // ~= log2 q, or at of least largest possible q of this bit length
-			minLength := maxLength >> 1 // ~= log2 sqrt(q)
-			for index > 0 && table[index-1].nbits > minLength {
-				index-- // desired
-			}
-			if table[index].nbits >= maxLength && table[index].bbb.cmp(q) >= 0 {
-				index--
-				if index < 0 {
-					panic("internal inconsistency")
-				}
-			}
-
-			// split q into the two digit number (q'*bbb + r) to form independent subblocks
-			q, r = q.div(r, q, table[index].bbb)
-
-			// convert subblocks and collect results in s[:h] and s[h:]
-			h := len(s) - table[index].ndigits
-			r.convertWords(s[h:], charset, b, ndigits, bb, table[0:index])
-			s = s[:h] // == q.convertWords(s, charset, b, ndigits, bb, table[0:index+1])
-		}
-	}
-
-	// having split any large blocks now process the remaining (small) block iteratively
-	i := len(s)
-	var r Word
-	if b == 10 {
-		// hard-coding for 10 here speeds this up by 1.25x (allows for / and % by constants)
-		for len(q) > 0 {
-			// extract least significant, base bb "digit"
-			q, r = q.divW(q, bb)
-			for j := 0; j < ndigits && i > 0; j++ {
-				i--
-				// avoid % computation since r%10 == r - int(r/10)*10;
-				// this appears to be faster for BenchmarkString10000Base10
-				// and smaller strings (but a bit slower for larger ones)
-				t := r / 10
-				s[i] = charset[r-t<<3-t-t] // TODO(gri) replace w/ t*10 once compiler produces better code
-				r = t
-			}
-		}
-	} else {
-		for len(q) > 0 {
-			// extract least significant, base bb "digit"
-			q, r = q.divW(q, bb)
-			for j := 0; j < ndigits && i > 0; j++ {
-				i--
-				s[i] = charset[r%b]
-				r /= b
-			}
-		}
-	}
-
-	// prepend high-order zeroes
-	zero := charset[0]
-	for i > 0 { // while need more leading zeroes
-		i--
-		s[i] = zero
-	}
-}
-
-// Split blocks greater than leafSize Words (or set to 0 to disable recursive conversion)
-// Benchmark and configure leafSize using: go test -bench="Leaf"
-//   8 and 16 effective on 3.0 GHz Xeon "Clovertown" CPU (128 byte cache lines)
-//   8 and 16 effective on 2.66 GHz Core 2 Duo "Penryn" CPU
-var leafSize int = 8 // number of Word-size binary values treat as a monolithic block
-
-type divisor struct {
-	bbb     nat // divisor
-	nbits   int // bit length of divisor (discounting leading zeroes) ~= log2(bbb)
-	ndigits int // digit length of divisor in terms of output base digits
-}
-
-var cacheBase10 struct {
-	sync.Mutex
-	table [64]divisor // cached divisors for base 10
-}
-
-// expWW computes x**y
-func (z nat) expWW(x, y Word) nat {
-	return z.expNN(nat(nil).setWord(x), nat(nil).setWord(y), nil)
-}
-
-// construct table of powers of bb*leafSize to use in subdivisions
-func divisors(m int, b Word, ndigits int, bb Word) []divisor {
-	// only compute table when recursive conversion is enabled and x is large
-	if leafSize == 0 || m <= leafSize {
-		return nil
-	}
-
-	// determine k where (bb**leafSize)**(2**k) >= sqrt(x)
-	k := 1
-	for words := leafSize; words < m>>1 && k < len(cacheBase10.table); words <<= 1 {
-		k++
-	}
-
-	// reuse and extend existing table of divisors or create new table as appropriate
-	var table []divisor // for b == 10, table overlaps with cacheBase10.table
-	if b == 10 {
-		cacheBase10.Lock()
-		table = cacheBase10.table[0:k] // reuse old table for this conversion
-	} else {
-		table = make([]divisor, k) // create new table for this conversion
-	}
-
-	// extend table
-	if table[k-1].ndigits == 0 {
-		// add new entries as needed
-		var larger nat
-		for i := 0; i < k; i++ {
-			if table[i].ndigits == 0 {
-				if i == 0 {
-					table[0].bbb = nat(nil).expWW(bb, Word(leafSize))
-					table[0].ndigits = ndigits * leafSize
-				} else {
-					table[i].bbb = nat(nil).mul(table[i-1].bbb, table[i-1].bbb)
-					table[i].ndigits = 2 * table[i-1].ndigits
-				}
-
-				// optimization: exploit aggregated extra bits in macro blocks
-				larger = nat(nil).set(table[i].bbb)
-				for mulAddVWW(larger, larger, b, 0) == 0 {
-					table[i].bbb = table[i].bbb.set(larger)
-					table[i].ndigits++
-				}
-
-				table[i].nbits = table[i].bbb.bitLen()
-			}
-		}
-	}
-
-	if b == 10 {
-		cacheBase10.Unlock()
-	}
-
-	return table
-}
diff --git a/src/math/big/natconv_test.go b/src/math/big/natconv_test.go
deleted file mode 100644
index f321fbc..0000000
--- a/src/math/big/natconv_test.go
+++ /dev/null
@@ -1,425 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package big
-
-import (
-	"io"
-	"strings"
-	"testing"
-)
-
-func toString(x nat, charset string) string {
-	base := len(charset)
-
-	// special cases
-	switch {
-	case base < 2:
-		panic("illegal base")
-	case len(x) == 0:
-		return string(charset[0])
-	}
-
-	// allocate buffer for conversion
-	i := x.bitLen()/log2(Word(base)) + 1 // +1: round up
-	s := make([]byte, i)
-
-	// don't destroy x
-	q := nat(nil).set(x)
-
-	// convert
-	for len(q) > 0 {
-		i--
-		var r Word
-		q, r = q.divW(q, Word(base))
-		s[i] = charset[r]
-	}
-
-	return string(s[i:])
-}
-
-var strTests = []struct {
-	x nat    // nat value to be converted
-	c string // conversion charset
-	s string // expected result
-}{
-	{nil, "01", "0"},
-	{nat{1}, "01", "1"},
-	{nat{0xc5}, "01", "11000101"},
-	{nat{03271}, lowercaseDigits[:8], "3271"},
-	{nat{10}, lowercaseDigits[:10], "10"},
-	{nat{1234567890}, uppercaseDigits[:10], "1234567890"},
-	{nat{0xdeadbeef}, lowercaseDigits[:16], "deadbeef"},
-	{nat{0xdeadbeef}, uppercaseDigits[:16], "DEADBEEF"},
-	{nat{0x229be7}, lowercaseDigits[:17], "1a2b3c"},
-	{nat{0x309663e6}, uppercaseDigits[:32], "O9COV6"},
-}
-
-func TestString(t *testing.T) {
-	// test invalid character set explicitly
-	var panicStr string
-	func() {
-		defer func() {
-			panicStr = recover().(string)
-		}()
-		natOne.string("0")
-	}()
-	if panicStr != "invalid character set length" {
-		t.Errorf("expected panic for invalid character set")
-	}
-
-	for _, a := range strTests {
-		s := a.x.string(a.c)
-		if s != a.s {
-			t.Errorf("string%+v\n\tgot s = %s; want %s", a, s, a.s)
-		}
-
-		x, b, _, err := nat(nil).scan(strings.NewReader(a.s), len(a.c), false)
-		if x.cmp(a.x) != 0 {
-			t.Errorf("scan%+v\n\tgot z = %v; want %v", a, x, a.x)
-		}
-		if b != len(a.c) {
-			t.Errorf("scan%+v\n\tgot b = %d; want %d", a, b, len(a.c))
-		}
-		if err != nil {
-			t.Errorf("scan%+v\n\tgot error = %s", a, err)
-		}
-	}
-}
-
-var natScanTests = []struct {
-	s     string // string to be scanned
-	base  int    // input base
-	frac  bool   // fraction ok
-	x     nat    // expected nat
-	b     int    // expected base
-	count int    // expected digit count
-	ok    bool   // expected success
-	next  rune   // next character (or 0, if at EOF)
-}{
-	// error: no mantissa
-	{},
-	{s: "?"},
-	{base: 10},
-	{base: 36},
-	{s: "?", base: 10},
-	{s: "0x"},
-	{s: "345", base: 2},
-
-	// error: incorrect use of decimal point
-	{s: ".0"},
-	{s: ".0", base: 10},
-	{s: ".", base: 0},
-	{s: "0x.0"},
-
-	// no errors
-	{"0", 0, false, nil, 10, 1, true, 0},
-	{"0", 10, false, nil, 10, 1, true, 0},
-	{"0", 36, false, nil, 36, 1, true, 0},
-	{"1", 0, false, nat{1}, 10, 1, true, 0},
-	{"1", 10, false, nat{1}, 10, 1, true, 0},
-	{"0 ", 0, false, nil, 10, 1, true, ' '},
-	{"08", 0, false, nil, 10, 1, true, '8'},
-	{"08", 10, false, nat{8}, 10, 2, true, 0},
-	{"018", 0, false, nat{1}, 8, 1, true, '8'},
-	{"0b1", 0, false, nat{1}, 2, 1, true, 0},
-	{"0b11000101", 0, false, nat{0xc5}, 2, 8, true, 0},
-	{"03271", 0, false, nat{03271}, 8, 4, true, 0},
-	{"10ab", 0, false, nat{10}, 10, 2, true, 'a'},
-	{"1234567890", 0, false, nat{1234567890}, 10, 10, true, 0},
-	{"xyz", 36, false, nat{(33*36+34)*36 + 35}, 36, 3, true, 0},
-	{"xyz?", 36, false, nat{(33*36+34)*36 + 35}, 36, 3, true, '?'},
-	{"0x", 16, false, nil, 16, 1, true, 'x'},
-	{"0xdeadbeef", 0, false, nat{0xdeadbeef}, 16, 8, true, 0},
-	{"0XDEADBEEF", 0, false, nat{0xdeadbeef}, 16, 8, true, 0},
-
-	// no errors, decimal point
-	{"0.", 0, false, nil, 10, 1, true, '.'},
-	{"0.", 10, true, nil, 10, 0, true, 0},
-	{"0.1.2", 10, true, nat{1}, 10, -1, true, '.'},
-	{".000", 10, true, nil, 10, -3, true, 0},
-	{"12.3", 10, true, nat{123}, 10, -1, true, 0},
-	{"012.345", 10, true, nat{12345}, 10, -3, true, 0},
-}
-
-func TestScanBase(t *testing.T) {
-	for _, a := range natScanTests {
-		r := strings.NewReader(a.s)
-		x, b, count, err := nat(nil).scan(r, a.base, a.frac)
-		if err == nil && !a.ok {
-			t.Errorf("scan%+v\n\texpected error", a)
-		}
-		if err != nil {
-			if a.ok {
-				t.Errorf("scan%+v\n\tgot error = %s", a, err)
-			}
-			continue
-		}
-		if x.cmp(a.x) != 0 {
-			t.Errorf("scan%+v\n\tgot z = %v; want %v", a, x, a.x)
-		}
-		if b != a.b {
-			t.Errorf("scan%+v\n\tgot b = %d; want %d", a, b, a.base)
-		}
-		if count != a.count {
-			t.Errorf("scan%+v\n\tgot count = %d; want %d", a, count, a.count)
-		}
-		next, _, err := r.ReadRune()
-		if err == io.EOF {
-			next = 0
-			err = nil
-		}
-		if err == nil && next != a.next {
-			t.Errorf("scan%+v\n\tgot next = %q; want %q", a, next, a.next)
-		}
-	}
-}
-
-var pi = "3" +
-	"14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651" +
-	"32823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461" +
-	"28475648233786783165271201909145648566923460348610454326648213393607260249141273724587006606315588174881520920" +
-	"96282925409171536436789259036001133053054882046652138414695194151160943305727036575959195309218611738193261179" +
-	"31051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798" +
-	"60943702770539217176293176752384674818467669405132000568127145263560827785771342757789609173637178721468440901" +
-	"22495343014654958537105079227968925892354201995611212902196086403441815981362977477130996051870721134999999837" +
-	"29780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083" +
-	"81420617177669147303598253490428755468731159562863882353787593751957781857780532171226806613001927876611195909" +
-	"21642019893809525720106548586327886593615338182796823030195203530185296899577362259941389124972177528347913151" +
-	"55748572424541506959508295331168617278558890750983817546374649393192550604009277016711390098488240128583616035" +
-	"63707660104710181942955596198946767837449448255379774726847104047534646208046684259069491293313677028989152104" +
-	"75216205696602405803815019351125338243003558764024749647326391419927260426992279678235478163600934172164121992" +
-	"45863150302861829745557067498385054945885869269956909272107975093029553211653449872027559602364806654991198818" +
-	"34797753566369807426542527862551818417574672890977772793800081647060016145249192173217214772350141441973568548" +
-	"16136115735255213347574184946843852332390739414333454776241686251898356948556209921922218427255025425688767179" +
-	"04946016534668049886272327917860857843838279679766814541009538837863609506800642251252051173929848960841284886" +
-	"26945604241965285022210661186306744278622039194945047123713786960956364371917287467764657573962413890865832645" +
-	"99581339047802759009946576407895126946839835259570982582262052248940772671947826848260147699090264013639443745" +
-	"53050682034962524517493996514314298091906592509372216964615157098583874105978859597729754989301617539284681382" +
-	"68683868942774155991855925245953959431049972524680845987273644695848653836736222626099124608051243884390451244" +
-	"13654976278079771569143599770012961608944169486855584840635342207222582848864815845602850601684273945226746767" +
-	"88952521385225499546667278239864565961163548862305774564980355936345681743241125150760694794510965960940252288" +
-	"79710893145669136867228748940560101503308617928680920874760917824938589009714909675985261365549781893129784821" +
-	"68299894872265880485756401427047755513237964145152374623436454285844479526586782105114135473573952311342716610" +
-	"21359695362314429524849371871101457654035902799344037420073105785390621983874478084784896833214457138687519435" +
-	"06430218453191048481005370614680674919278191197939952061419663428754440643745123718192179998391015919561814675" +
-	"14269123974894090718649423196156794520809514655022523160388193014209376213785595663893778708303906979207734672" +
-	"21825625996615014215030680384477345492026054146659252014974428507325186660021324340881907104863317346496514539" +
-	"05796268561005508106658796998163574736384052571459102897064140110971206280439039759515677157700420337869936007" +
-	"23055876317635942187312514712053292819182618612586732157919841484882916447060957527069572209175671167229109816" +
-	"90915280173506712748583222871835209353965725121083579151369882091444210067510334671103141267111369908658516398" +
-	"31501970165151168517143765761835155650884909989859982387345528331635507647918535893226185489632132933089857064" +
-	"20467525907091548141654985946163718027098199430992448895757128289059232332609729971208443357326548938239119325" +
-	"97463667305836041428138830320382490375898524374417029132765618093773444030707469211201913020330380197621101100" +
-	"44929321516084244485963766983895228684783123552658213144957685726243344189303968642624341077322697802807318915" +
-	"44110104468232527162010526522721116603966655730925471105578537634668206531098965269186205647693125705863566201" +
-	"85581007293606598764861179104533488503461136576867532494416680396265797877185560845529654126654085306143444318" +
-	"58676975145661406800700237877659134401712749470420562230538994561314071127000407854733269939081454664645880797" +
-	"27082668306343285878569830523580893306575740679545716377525420211495576158140025012622859413021647155097925923" +
-	"09907965473761255176567513575178296664547791745011299614890304639947132962107340437518957359614589019389713111" +
-	"79042978285647503203198691514028708085990480109412147221317947647772622414254854540332157185306142288137585043" +
-	"06332175182979866223717215916077166925474873898665494945011465406284336639379003976926567214638530673609657120" +
-	"91807638327166416274888800786925602902284721040317211860820419000422966171196377921337575114959501566049631862" +
-	"94726547364252308177036751590673502350728354056704038674351362222477158915049530984448933309634087807693259939" +
-	"78054193414473774418426312986080998886874132604721569516239658645730216315981931951673538129741677294786724229" +
-	"24654366800980676928238280689964004824354037014163149658979409243237896907069779422362508221688957383798623001" +
-	"59377647165122893578601588161755782973523344604281512627203734314653197777416031990665541876397929334419521541" +
-	"34189948544473456738316249934191318148092777710386387734317720754565453220777092120190516609628049092636019759" +
-	"88281613323166636528619326686336062735676303544776280350450777235547105859548702790814356240145171806246436267" +
-	"94561275318134078330336254232783944975382437205835311477119926063813346776879695970309833913077109870408591337"
-
-// Test case for BenchmarkScanPi.
-func TestScanPi(t *testing.T) {
-	var x nat
-	z, _, _, err := x.scan(strings.NewReader(pi), 10, false)
-	if err != nil {
-		t.Errorf("scanning pi: %s", err)
-	}
-	if s := z.decimalString(); s != pi {
-		t.Errorf("scanning pi: got %s", s)
-	}
-}
-
-func TestScanPiParallel(t *testing.T) {
-	const n = 2
-	c := make(chan int)
-	for i := 0; i < n; i++ {
-		go func() {
-			TestScanPi(t)
-			c <- 0
-		}()
-	}
-	for i := 0; i < n; i++ {
-		<-c
-	}
-}
-
-func BenchmarkScanPi(b *testing.B) {
-	for i := 0; i < b.N; i++ {
-		var x nat
-		x.scan(strings.NewReader(pi), 10, false)
-	}
-}
-
-func BenchmarkStringPiParallel(b *testing.B) {
-	var x nat
-	x, _, _, _ = x.scan(strings.NewReader(pi), 0, false)
-	if x.decimalString() != pi {
-		panic("benchmark incorrect: conversion failed")
-	}
-	b.RunParallel(func(pb *testing.PB) {
-		for pb.Next() {
-			x.decimalString()
-		}
-	})
-}
-
-func BenchmarkScan10Base2(b *testing.B)     { ScanHelper(b, 2, 10, 10) }
-func BenchmarkScan100Base2(b *testing.B)    { ScanHelper(b, 2, 10, 100) }
-func BenchmarkScan1000Base2(b *testing.B)   { ScanHelper(b, 2, 10, 1000) }
-func BenchmarkScan10000Base2(b *testing.B)  { ScanHelper(b, 2, 10, 10000) }
-func BenchmarkScan100000Base2(b *testing.B) { ScanHelper(b, 2, 10, 100000) }
-
-func BenchmarkScan10Base8(b *testing.B)     { ScanHelper(b, 8, 10, 10) }
-func BenchmarkScan100Base8(b *testing.B)    { ScanHelper(b, 8, 10, 100) }
-func BenchmarkScan1000Base8(b *testing.B)   { ScanHelper(b, 8, 10, 1000) }
-func BenchmarkScan10000Base8(b *testing.B)  { ScanHelper(b, 8, 10, 10000) }
-func BenchmarkScan100000Base8(b *testing.B) { ScanHelper(b, 8, 10, 100000) }
-
-func BenchmarkScan10Base10(b *testing.B)     { ScanHelper(b, 10, 10, 10) }
-func BenchmarkScan100Base10(b *testing.B)    { ScanHelper(b, 10, 10, 100) }
-func BenchmarkScan1000Base10(b *testing.B)   { ScanHelper(b, 10, 10, 1000) }
-func BenchmarkScan10000Base10(b *testing.B)  { ScanHelper(b, 10, 10, 10000) }
-func BenchmarkScan100000Base10(b *testing.B) { ScanHelper(b, 10, 10, 100000) }
-
-func BenchmarkScan10Base16(b *testing.B)     { ScanHelper(b, 16, 10, 10) }
-func BenchmarkScan100Base16(b *testing.B)    { ScanHelper(b, 16, 10, 100) }
-func BenchmarkScan1000Base16(b *testing.B)   { ScanHelper(b, 16, 10, 1000) }
-func BenchmarkScan10000Base16(b *testing.B)  { ScanHelper(b, 16, 10, 10000) }
-func BenchmarkScan100000Base16(b *testing.B) { ScanHelper(b, 16, 10, 100000) }
-
-func ScanHelper(b *testing.B, base int, x, y Word) {
-	b.StopTimer()
-	var z nat
-	z = z.expWW(x, y)
-
-	var s string
-	s = z.string(lowercaseDigits[:base])
-	if t := toString(z, lowercaseDigits[:base]); t != s {
-		b.Fatalf("scanning: got %s; want %s", s, t)
-	}
-	b.StartTimer()
-
-	for i := 0; i < b.N; i++ {
-		z.scan(strings.NewReader(s), base, false)
-	}
-}
-
-func BenchmarkString10Base2(b *testing.B)     { StringHelper(b, 2, 10, 10) }
-func BenchmarkString100Base2(b *testing.B)    { StringHelper(b, 2, 10, 100) }
-func BenchmarkString1000Base2(b *testing.B)   { StringHelper(b, 2, 10, 1000) }
-func BenchmarkString10000Base2(b *testing.B)  { StringHelper(b, 2, 10, 10000) }
-func BenchmarkString100000Base2(b *testing.B) { StringHelper(b, 2, 10, 100000) }
-
-func BenchmarkString10Base8(b *testing.B)     { StringHelper(b, 8, 10, 10) }
-func BenchmarkString100Base8(b *testing.B)    { StringHelper(b, 8, 10, 100) }
-func BenchmarkString1000Base8(b *testing.B)   { StringHelper(b, 8, 10, 1000) }
-func BenchmarkString10000Base8(b *testing.B)  { StringHelper(b, 8, 10, 10000) }
-func BenchmarkString100000Base8(b *testing.B) { StringHelper(b, 8, 10, 100000) }
-
-func BenchmarkString10Base10(b *testing.B)     { StringHelper(b, 10, 10, 10) }
-func BenchmarkString100Base10(b *testing.B)    { StringHelper(b, 10, 10, 100) }
-func BenchmarkString1000Base10(b *testing.B)   { StringHelper(b, 10, 10, 1000) }
-func BenchmarkString10000Base10(b *testing.B)  { StringHelper(b, 10, 10, 10000) }
-func BenchmarkString100000Base10(b *testing.B) { StringHelper(b, 10, 10, 100000) }
-
-func BenchmarkString10Base16(b *testing.B)     { StringHelper(b, 16, 10, 10) }
-func BenchmarkString100Base16(b *testing.B)    { StringHelper(b, 16, 10, 100) }
-func BenchmarkString1000Base16(b *testing.B)   { StringHelper(b, 16, 10, 1000) }
-func BenchmarkString10000Base16(b *testing.B)  { StringHelper(b, 16, 10, 10000) }
-func BenchmarkString100000Base16(b *testing.B) { StringHelper(b, 16, 10, 100000) }
-
-func StringHelper(b *testing.B, base int, x, y Word) {
-	b.StopTimer()
-	var z nat
-	z = z.expWW(x, y)
-	z.string(lowercaseDigits[:base]) // warm divisor cache
-	b.StartTimer()
-
-	for i := 0; i < b.N; i++ {
-		_ = z.string(lowercaseDigits[:base])
-	}
-}
-
-func BenchmarkLeafSize0(b *testing.B)  { LeafSizeHelper(b, 10, 0) } // test without splitting
-func BenchmarkLeafSize1(b *testing.B)  { LeafSizeHelper(b, 10, 1) }
-func BenchmarkLeafSize2(b *testing.B)  { LeafSizeHelper(b, 10, 2) }
-func BenchmarkLeafSize3(b *testing.B)  { LeafSizeHelper(b, 10, 3) }
-func BenchmarkLeafSize4(b *testing.B)  { LeafSizeHelper(b, 10, 4) }
-func BenchmarkLeafSize5(b *testing.B)  { LeafSizeHelper(b, 10, 5) }
-func BenchmarkLeafSize6(b *testing.B)  { LeafSizeHelper(b, 10, 6) }
-func BenchmarkLeafSize7(b *testing.B)  { LeafSizeHelper(b, 10, 7) }
-func BenchmarkLeafSize8(b *testing.B)  { LeafSizeHelper(b, 10, 8) }
-func BenchmarkLeafSize9(b *testing.B)  { LeafSizeHelper(b, 10, 9) }
-func BenchmarkLeafSize10(b *testing.B) { LeafSizeHelper(b, 10, 10) }
-func BenchmarkLeafSize11(b *testing.B) { LeafSizeHelper(b, 10, 11) }
-func BenchmarkLeafSize12(b *testing.B) { LeafSizeHelper(b, 10, 12) }
-func BenchmarkLeafSize13(b *testing.B) { LeafSizeHelper(b, 10, 13) }
-func BenchmarkLeafSize14(b *testing.B) { LeafSizeHelper(b, 10, 14) }
-func BenchmarkLeafSize15(b *testing.B) { LeafSizeHelper(b, 10, 15) }
-func BenchmarkLeafSize16(b *testing.B) { LeafSizeHelper(b, 10, 16) }
-func BenchmarkLeafSize32(b *testing.B) { LeafSizeHelper(b, 10, 32) } // try some large lengths
-func BenchmarkLeafSize64(b *testing.B) { LeafSizeHelper(b, 10, 64) }
-
-func LeafSizeHelper(b *testing.B, base Word, size int) {
-	b.StopTimer()
-	originalLeafSize := leafSize
-	resetTable(cacheBase10.table[:])
-	leafSize = size
-	b.StartTimer()
-
-	for d := 1; d <= 10000; d *= 10 {
-		b.StopTimer()
-		var z nat
-		z = z.expWW(base, Word(d))           // build target number
-		_ = z.string(lowercaseDigits[:base]) // warm divisor cache
-		b.StartTimer()
-
-		for i := 0; i < b.N; i++ {
-			_ = z.string(lowercaseDigits[:base])
-		}
-	}
-
-	b.StopTimer()
-	resetTable(cacheBase10.table[:])
-	leafSize = originalLeafSize
-	b.StartTimer()
-}
-
-func resetTable(table []divisor) {
-	if table != nil && table[0].bbb != nil {
-		for i := 0; i < len(table); i++ {
-			table[i].bbb = nil
-			table[i].nbits = 0
-			table[i].ndigits = 0
-		}
-	}
-}
-
-func TestStringPowers(t *testing.T) {
-	var b, p Word
-	for b = 2; b <= 16; b++ {
-		for p = 0; p <= 512; p++ {
-			x := nat(nil).expWW(b, p)
-			xs := x.string(lowercaseDigits[:b])
-			xs2 := toString(x, lowercaseDigits[:b])
-			if xs != xs2 {
-				t.Errorf("failed at %d ** %d in base %d: %s != %s", b, p, b, xs, xs2)
-			}
-		}
-		if b >= 3 && testing.Short() {
-			break
-		}
-	}
-}
diff --git a/src/math/big/ratconv.go b/src/math/big/ratconv.go
deleted file mode 100644
index 961ff64..0000000
--- a/src/math/big/ratconv.go
+++ /dev/null
@@ -1,252 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements rat-to-string conversion functions.
-
-package big
-
-import (
-	"errors"
-	"fmt"
-	"io"
-	"strconv"
-	"strings"
-)
-
-func ratTok(ch rune) bool {
-	return strings.IndexRune("+-/0123456789.eE", ch) >= 0
-}
-
-// Scan is a support routine for fmt.Scanner. It accepts the formats
-// 'e', 'E', 'f', 'F', 'g', 'G', and 'v'. All formats are equivalent.
-func (z *Rat) Scan(s fmt.ScanState, ch rune) error {
-	tok, err := s.Token(true, ratTok)
-	if err != nil {
-		return err
-	}
-	if strings.IndexRune("efgEFGv", ch) < 0 {
-		return errors.New("Rat.Scan: invalid verb")
-	}
-	if _, ok := z.SetString(string(tok)); !ok {
-		return errors.New("Rat.Scan: invalid syntax")
-	}
-	return nil
-}
-
-// SetString sets z to the value of s and returns z and a boolean indicating
-// success. s can be given as a fraction "a/b" or as a floating-point number
-// optionally followed by an exponent. If the operation failed, the value of
-// z is undefined but the returned value is nil.
-func (z *Rat) SetString(s string) (*Rat, bool) {
-	if len(s) == 0 {
-		return nil, false
-	}
-	// len(s) > 0
-
-	// parse fraction a/b, if any
-	if sep := strings.Index(s, "/"); sep >= 0 {
-		if _, ok := z.a.SetString(s[:sep], 0); !ok {
-			return nil, false
-		}
-		s = s[sep+1:]
-		var err error
-		if z.b.abs, _, _, err = z.b.abs.scan(strings.NewReader(s), 0, false); err != nil {
-			return nil, false
-		}
-		if len(z.b.abs) == 0 {
-			return nil, false
-		}
-		return z.norm(), true
-	}
-
-	// parse floating-point number
-	r := strings.NewReader(s)
-
-	// sign
-	neg, err := scanSign(r)
-	if err != nil {
-		return nil, false
-	}
-
-	// mantissa
-	var ecorr int
-	z.a.abs, _, ecorr, err = z.a.abs.scan(r, 10, true)
-	if err != nil {
-		return nil, false
-	}
-
-	// exponent
-	var exp int64
-	exp, _, err = scanExponent(r, false)
-	if err != nil {
-		return nil, false
-	}
-
-	// there should be no unread characters left
-	if _, err = r.ReadByte(); err != io.EOF {
-		return nil, false
-	}
-
-	// correct exponent
-	if ecorr < 0 {
-		exp += int64(ecorr)
-	}
-
-	// compute exponent power
-	expabs := exp
-	if expabs < 0 {
-		expabs = -expabs
-	}
-	powTen := nat(nil).expNN(natTen, nat(nil).setWord(Word(expabs)), nil)
-
-	// complete fraction
-	if exp < 0 {
-		z.b.abs = powTen
-		z.norm()
-	} else {
-		z.a.abs = z.a.abs.mul(z.a.abs, powTen)
-		z.b.abs = z.b.abs[:0]
-	}
-
-	z.a.neg = neg && len(z.a.abs) > 0 // 0 has no sign
-
-	return z, true
-}
-
-// scanExponent scans the longest possible prefix of r representing a decimal
-// ('e', 'E') or binary ('p') exponent, if any. It returns the exponent, the
-// exponent base (10 or 2), or a read or syntax error, if any.
-//
-//	exponent = ( "E" | "e" | "p" ) [ sign ] digits .
-//	sign     = "+" | "-" .
-//	digits   = digit { digit } .
-//	digit    = "0" ... "9" .
-//
-// A binary exponent is only permitted if binExpOk is set.
-func scanExponent(r io.ByteScanner, binExpOk bool) (exp int64, base int, err error) {
-	base = 10
-
-	var ch byte
-	if ch, err = r.ReadByte(); err != nil {
-		if err == io.EOF {
-			err = nil // no exponent; same as e0
-		}
-		return
-	}
-
-	switch ch {
-	case 'e', 'E':
-		// ok
-	case 'p':
-		if binExpOk {
-			base = 2
-			break // ok
-		}
-		fallthrough // binary exponent not permitted
-	default:
-		r.UnreadByte()
-		return // no exponent; same as e0
-	}
-
-	var neg bool
-	if neg, err = scanSign(r); err != nil {
-		return
-	}
-
-	var digits []byte
-	if neg {
-		digits = append(digits, '-')
-	}
-
-	// no need to use nat.scan for exponent digits
-	// since we only care about int64 values - the
-	// from-scratch scan is easy enough and faster
-	for i := 0; ; i++ {
-		if ch, err = r.ReadByte(); err != nil {
-			if err != io.EOF || i == 0 {
-				return
-			}
-			err = nil
-			break // i > 0
-		}
-		if ch < '0' || '9' < ch {
-			if i == 0 {
-				r.UnreadByte()
-				err = fmt.Errorf("invalid exponent (missing digits)")
-				return
-			}
-			break // i > 0
-		}
-		digits = append(digits, byte(ch))
-	}
-	// i > 0 => we have at least one digit
-
-	exp, err = strconv.ParseInt(string(digits), 10, 64)
-	return
-}
-
-// String returns a string representation of x in the form "a/b" (even if b == 1).
-func (x *Rat) String() string {
-	s := "/1"
-	if len(x.b.abs) != 0 {
-		s = "/" + x.b.abs.decimalString()
-	}
-	return x.a.String() + s
-}
-
-// RatString returns a string representation of x in the form "a/b" if b != 1,
-// and in the form "a" if b == 1.
-func (x *Rat) RatString() string {
-	if x.IsInt() {
-		return x.a.String()
-	}
-	return x.String()
-}
-
-// FloatString returns a string representation of x in decimal form with prec
-// digits of precision after the decimal point. The last digit is rounded to
-// nearest, with halves rounded away from zero.
-func (x *Rat) FloatString(prec int) string {
-	if x.IsInt() {
-		s := x.a.String()
-		if prec > 0 {
-			s += "." + strings.Repeat("0", prec)
-		}
-		return s
-	}
-	// x.b.abs != 0
-
-	q, r := nat(nil).div(nat(nil), x.a.abs, x.b.abs)
-
-	p := natOne
-	if prec > 0 {
-		p = nat(nil).expNN(natTen, nat(nil).setUint64(uint64(prec)), nil)
-	}
-
-	r = r.mul(r, p)
-	r, r2 := r.div(nat(nil), r, x.b.abs)
-
-	// see if we need to round up
-	r2 = r2.add(r2, r2)
-	if x.b.abs.cmp(r2) <= 0 {
-		r = r.add(r, natOne)
-		if r.cmp(p) >= 0 {
-			q = nat(nil).add(q, natOne)
-			r = nat(nil).sub(r, p)
-		}
-	}
-
-	s := q.decimalString()
-	if x.a.neg {
-		s = "-" + s
-	}
-
-	if prec > 0 {
-		rs := r.decimalString()
-		leadingZeros := prec - len(rs)
-		s += "." + strings.Repeat("0", leadingZeros) + rs
-	}
-
-	return s
-}
diff --git a/src/math/big/ratconv_test.go b/src/math/big/ratconv_test.go
deleted file mode 100644
index da2fdab..0000000
--- a/src/math/big/ratconv_test.go
+++ /dev/null
@@ -1,453 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package big
-
-import (
-	"bytes"
-	"fmt"
-	"math"
-	"strconv"
-	"strings"
-	"testing"
-)
-
-type StringTest struct {
-	in, out string
-	ok      bool
-}
-
-var setStringTests = []StringTest{
-	{"0", "0", true},
-	{"-0", "0", true},
-	{"1", "1", true},
-	{"-1", "-1", true},
-	{"1.", "1", true},
-	{"1e0", "1", true},
-	{"1.e1", "10", true},
-	{in: "1e"},
-	{in: "1.e"},
-	{in: "1e+14e-5"},
-	{in: "1e4.5"},
-	{in: "r"},
-	{in: "a/b"},
-	{in: "a.b"},
-	{"-0.1", "-1/10", true},
-	{"-.1", "-1/10", true},
-	{"2/4", "1/2", true},
-	{".25", "1/4", true},
-	{"-1/5", "-1/5", true},
-	{"8129567.7690E14", "812956776900000000000", true},
-	{"78189e+4", "781890000", true},
-	{"553019.8935e+8", "55301989350000", true},
-	{"98765432109876543210987654321e-10", "98765432109876543210987654321/10000000000", true},
-	{"9877861857500000E-7", "3951144743/4", true},
-	{"2169378.417e-3", "2169378417/1000000", true},
-	{"884243222337379604041632732738665534", "884243222337379604041632732738665534", true},
-	{"53/70893980658822810696", "53/70893980658822810696", true},
-	{"106/141787961317645621392", "53/70893980658822810696", true},
-	{"204211327800791583.81095", "4084226556015831676219/20000", true},
-	{in: "1/0"},
-}
-
-// These are not supported by fmt.Fscanf.
-var setStringTests2 = []StringTest{
-	{"0x10", "16", true},
-	{"-010/1", "-8", true}, // TODO(gri) should we even permit octal here?
-	{"-010.", "-10", true},
-	{"0x10/0x20", "1/2", true},
-	{"0b1000/3", "8/3", true},
-	// TODO(gri) add more tests
-}
-
-func TestRatSetString(t *testing.T) {
-	var tests []StringTest
-	tests = append(tests, setStringTests...)
-	tests = append(tests, setStringTests2...)
-
-	for i, test := range tests {
-		x, ok := new(Rat).SetString(test.in)
-
-		if ok {
-			if !test.ok {
-				t.Errorf("#%d SetString(%q) expected failure", i, test.in)
-			} else if x.RatString() != test.out {
-				t.Errorf("#%d SetString(%q) got %s want %s", i, test.in, x.RatString(), test.out)
-			}
-		} else if x != nil {
-			t.Errorf("#%d SetString(%q) got %p want nil", i, test.in, x)
-		}
-	}
-}
-
-func TestRatScan(t *testing.T) {
-	var buf bytes.Buffer
-	for i, test := range setStringTests {
-		x := new(Rat)
-		buf.Reset()
-		buf.WriteString(test.in)
-
-		_, err := fmt.Fscanf(&buf, "%v", x)
-		if err == nil != test.ok {
-			if test.ok {
-				t.Errorf("#%d (%s) error: %s", i, test.in, err)
-			} else {
-				t.Errorf("#%d (%s) expected error", i, test.in)
-			}
-			continue
-		}
-		if err == nil && x.RatString() != test.out {
-			t.Errorf("#%d got %s want %s", i, x.RatString(), test.out)
-		}
-	}
-}
-
-var floatStringTests = []struct {
-	in   string
-	prec int
-	out  string
-}{
-	{"0", 0, "0"},
-	{"0", 4, "0.0000"},
-	{"1", 0, "1"},
-	{"1", 2, "1.00"},
-	{"-1", 0, "-1"},
-	{"0.05", 1, "0.1"},
-	{"-0.05", 1, "-0.1"},
-	{".25", 2, "0.25"},
-	{".25", 1, "0.3"},
-	{".25", 3, "0.250"},
-	{"-1/3", 3, "-0.333"},
-	{"-2/3", 4, "-0.6667"},
-	{"0.96", 1, "1.0"},
-	{"0.999", 2, "1.00"},
-	{"0.9", 0, "1"},
-	{".25", -1, "0"},
-	{".55", -1, "1"},
-}
-
-func TestFloatString(t *testing.T) {
-	for i, test := range floatStringTests {
-		x, _ := new(Rat).SetString(test.in)
-
-		if x.FloatString(test.prec) != test.out {
-			t.Errorf("#%d got %s want %s", i, x.FloatString(test.prec), test.out)
-		}
-	}
-}
-
-// Test inputs to Rat.SetString.  The prefix "long:" causes the test
-// to be skipped in --test.short mode.  (The threshold is about 500us.)
-var float64inputs = []string{
-	// Constants plundered from strconv/testfp.txt.
-
-	// Table 1: Stress Inputs for Conversion to 53-bit Binary, < 1/2 ULP
-	"5e+125",
-	"69e+267",
-	"999e-026",
-	"7861e-034",
-	"75569e-254",
-	"928609e-261",
-	"9210917e+080",
-	"84863171e+114",
-	"653777767e+273",
-	"5232604057e-298",
-	"27235667517e-109",
-	"653532977297e-123",
-	"3142213164987e-294",
-	"46202199371337e-072",
-	"231010996856685e-073",
-	"9324754620109615e+212",
-	"78459735791271921e+049",
-	"272104041512242479e+200",
-	"6802601037806061975e+198",
-	"20505426358836677347e-221",
-	"836168422905420598437e-234",
-	"4891559871276714924261e+222",
-
-	// Table 2: Stress Inputs for Conversion to 53-bit Binary, > 1/2 ULP
-	"9e-265",
-	"85e-037",
-	"623e+100",
-	"3571e+263",
-	"81661e+153",
-	"920657e-023",
-	"4603285e-024",
-	"87575437e-309",
-	"245540327e+122",
-	"6138508175e+120",
-	"83356057653e+193",
-	"619534293513e+124",
-	"2335141086879e+218",
-	"36167929443327e-159",
-	"609610927149051e-255",
-	"3743626360493413e-165",
-	"94080055902682397e-242",
-	"899810892172646163e+283",
-	"7120190517612959703e+120",
-	"25188282901709339043e-252",
-	"308984926168550152811e-052",
-	"6372891218502368041059e+064",
-
-	// Table 14: Stress Inputs for Conversion to 24-bit Binary, <1/2 ULP
-	"5e-20",
-	"67e+14",
-	"985e+15",
-	"7693e-42",
-	"55895e-16",
-	"996622e-44",
-	"7038531e-32",
-	"60419369e-46",
-	"702990899e-20",
-	"6930161142e-48",
-	"25933168707e+13",
-	"596428896559e+20",
-
-	// Table 15: Stress Inputs for Conversion to 24-bit Binary, >1/2 ULP
-	"3e-23",
-	"57e+18",
-	"789e-35",
-	"2539e-18",
-	"76173e+28",
-	"887745e-11",
-	"5382571e-37",
-	"82381273e-35",
-	"750486563e-38",
-	"3752432815e-39",
-	"75224575729e-45",
-	"459926601011e+15",
-
-	// Constants plundered from strconv/atof_test.go.
-
-	"0",
-	"1",
-	"+1",
-	"1e23",
-	"1E23",
-	"100000000000000000000000",
-	"1e-100",
-	"123456700",
-	"99999999999999974834176",
-	"100000000000000000000001",
-	"100000000000000008388608",
-	"100000000000000016777215",
-	"100000000000000016777216",
-	"-1",
-	"-0.1",
-	"-0", // NB: exception made for this input
-	"1e-20",
-	"625e-3",
-
-	// largest float64
-	"1.7976931348623157e308",
-	"-1.7976931348623157e308",
-	// next float64 - too large
-	"1.7976931348623159e308",
-	"-1.7976931348623159e308",
-	// the border is ...158079
-	// borderline - okay
-	"1.7976931348623158e308",
-	"-1.7976931348623158e308",
-	// borderline - too large
-	"1.797693134862315808e308",
-	"-1.797693134862315808e308",
-
-	// a little too large
-	"1e308",
-	"2e308",
-	"1e309",
-
-	// way too large
-	"1e310",
-	"-1e310",
-	"1e400",
-	"-1e400",
-	"long:1e400000",
-	"long:-1e400000",
-
-	// denormalized
-	"1e-305",
-	"1e-306",
-	"1e-307",
-	"1e-308",
-	"1e-309",
-	"1e-310",
-	"1e-322",
-	// smallest denormal
-	"5e-324",
-	"4e-324",
-	"3e-324",
-	// too small
-	"2e-324",
-	// way too small
-	"1e-350",
-	"long:1e-400000",
-	// way too small, negative
-	"-1e-350",
-	"long:-1e-400000",
-
-	// try to overflow exponent
-	// [Disabled: too slow and memory-hungry with rationals.]
-	// "1e-4294967296",
-	// "1e+4294967296",
-	// "1e-18446744073709551616",
-	// "1e+18446744073709551616",
-
-	// http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
-	"2.2250738585072012e-308",
-	// http://www.exploringbinary.com/php-hangs-on-numeric-value-2-2250738585072011e-308/
-	"2.2250738585072011e-308",
-
-	// A very large number (initially wrongly parsed by the fast algorithm).
-	"4.630813248087435e+307",
-
-	// A different kind of very large number.
-	"22.222222222222222",
-	"long:2." + strings.Repeat("2", 4000) + "e+1",
-
-	// Exactly halfway between 1 and math.Nextafter(1, 2).
-	// Round to even (down).
-	"1.00000000000000011102230246251565404236316680908203125",
-	// Slightly lower; still round down.
-	"1.00000000000000011102230246251565404236316680908203124",
-	// Slightly higher; round up.
-	"1.00000000000000011102230246251565404236316680908203126",
-	// Slightly higher, but you have to read all the way to the end.
-	"long:1.00000000000000011102230246251565404236316680908203125" + strings.Repeat("0", 10000) + "1",
-
-	// Smallest denormal, 2^(-1022-52)
-	"4.940656458412465441765687928682213723651e-324",
-	// Half of smallest denormal, 2^(-1022-53)
-	"2.470328229206232720882843964341106861825e-324",
-	// A little more than the exact half of smallest denormal
-	// 2^-1075 + 2^-1100.  (Rounds to 1p-1074.)
-	"2.470328302827751011111470718709768633275e-324",
-	// The exact halfway between smallest normal and largest denormal:
-	// 2^-1022 - 2^-1075.  (Rounds to 2^-1022.)
-	"2.225073858507201136057409796709131975935e-308",
-
-	"1152921504606846975",  //   1<<60 - 1
-	"-1152921504606846975", // -(1<<60 - 1)
-	"1152921504606846977",  //   1<<60 + 1
-	"-1152921504606846977", // -(1<<60 + 1)
-
-	"1/3",
-}
-
-// isFinite reports whether f represents a finite rational value.
-// It is equivalent to !math.IsNan(f) && !math.IsInf(f, 0).
-func isFinite(f float64) bool {
-	return math.Abs(f) <= math.MaxFloat64
-}
-
-func TestFloat32SpecialCases(t *testing.T) {
-	for _, input := range float64inputs {
-		if strings.HasPrefix(input, "long:") {
-			if testing.Short() {
-				continue
-			}
-			input = input[len("long:"):]
-		}
-
-		r, ok := new(Rat).SetString(input)
-		if !ok {
-			t.Errorf("Rat.SetString(%q) failed", input)
-			continue
-		}
-		f, exact := r.Float32()
-
-		// 1. Check string -> Rat -> float32 conversions are
-		// consistent with strconv.ParseFloat.
-		// Skip this check if the input uses "a/b" rational syntax.
-		if !strings.Contains(input, "/") {
-			e64, _ := strconv.ParseFloat(input, 32)
-			e := float32(e64)
-
-			// Careful: negative Rats too small for
-			// float64 become -0, but Rat obviously cannot
-			// preserve the sign from SetString("-0").
-			switch {
-			case math.Float32bits(e) == math.Float32bits(f):
-				// Ok: bitwise equal.
-			case f == 0 && r.Num().BitLen() == 0:
-				// Ok: Rat(0) is equivalent to both +/- float64(0).
-			default:
-				t.Errorf("strconv.ParseFloat(%q) = %g (%b), want %g (%b); delta = %g", input, e, e, f, f, f-e)
-			}
-		}
-
-		if !isFinite(float64(f)) {
-			continue
-		}
-
-		// 2. Check f is best approximation to r.
-		if !checkIsBestApprox32(t, f, r) {
-			// Append context information.
-			t.Errorf("(input was %q)", input)
-		}
-
-		// 3. Check f->R->f roundtrip is non-lossy.
-		checkNonLossyRoundtrip32(t, f)
-
-		// 4. Check exactness using slow algorithm.
-		if wasExact := new(Rat).SetFloat64(float64(f)).Cmp(r) == 0; wasExact != exact {
-			t.Errorf("Rat.SetString(%q).Float32().exact = %t, want %t", input, exact, wasExact)
-		}
-	}
-}
-
-func TestFloat64SpecialCases(t *testing.T) {
-	for _, input := range float64inputs {
-		if strings.HasPrefix(input, "long:") {
-			if testing.Short() {
-				continue
-			}
-			input = input[len("long:"):]
-		}
-
-		r, ok := new(Rat).SetString(input)
-		if !ok {
-			t.Errorf("Rat.SetString(%q) failed", input)
-			continue
-		}
-		f, exact := r.Float64()
-
-		// 1. Check string -> Rat -> float64 conversions are
-		// consistent with strconv.ParseFloat.
-		// Skip this check if the input uses "a/b" rational syntax.
-		if !strings.Contains(input, "/") {
-			e, _ := strconv.ParseFloat(input, 64)
-
-			// Careful: negative Rats too small for
-			// float64 become -0, but Rat obviously cannot
-			// preserve the sign from SetString("-0").
-			switch {
-			case math.Float64bits(e) == math.Float64bits(f):
-				// Ok: bitwise equal.
-			case f == 0 && r.Num().BitLen() == 0:
-				// Ok: Rat(0) is equivalent to both +/- float64(0).
-			default:
-				t.Errorf("strconv.ParseFloat(%q) = %g (%b), want %g (%b); delta = %g", input, e, e, f, f, f-e)
-			}
-		}
-
-		if !isFinite(f) {
-			continue
-		}
-
-		// 2. Check f is best approximation to r.
-		if !checkIsBestApprox64(t, f, r) {
-			// Append context information.
-			t.Errorf("(input was %q)", input)
-		}
-
-		// 3. Check f->R->f roundtrip is non-lossy.
-		checkNonLossyRoundtrip64(t, f)
-
-		// 4. Check exactness using slow algorithm.
-		if wasExact := new(Rat).SetFloat64(f).Cmp(r) == 0; wasExact != exact {
-			t.Errorf("Rat.SetString(%q).Float64().exact = %t, want %t", input, exact, wasExact)
-		}
-	}
-}
diff --git a/src/math/big/roundingmode_string.go b/src/math/big/roundingmode_string.go
deleted file mode 100644
index 05024b8..0000000
--- a/src/math/big/roundingmode_string.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// generated by stringer -type=RoundingMode; DO NOT EDIT
-
-package big
-
-import "fmt"
-
-const _RoundingMode_name = "ToNearestEvenToNearestAwayToZeroAwayFromZeroToNegativeInfToPositiveInf"
-
-var _RoundingMode_index = [...]uint8{0, 13, 26, 32, 44, 57, 70}
-
-func (i RoundingMode) String() string {
-	if i+1 >= RoundingMode(len(_RoundingMode_index)) {
-		return fmt.Sprintf("RoundingMode(%d)", i)
-	}
-	return _RoundingMode_name[_RoundingMode_index[i]:_RoundingMode_index[i+1]]
-}
diff --git a/src/math/sqrt_arm64.s b/src/math/sqrt_arm64.s
deleted file mode 100644
index 9861446..0000000
--- a/src/math/sqrt_arm64.s
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-
-// func Sqrt(x float64) float64
-TEXT ·Sqrt(SB),NOSPLIT,$0
-	FMOVD	x+0(FP), F0
-	FSQRTD	F0, F0
-	FMOVD	F0, ret+8(FP)
-	RET
diff --git a/src/math/stubs_arm64.s b/src/math/stubs_arm64.s
deleted file mode 100644
index eea81e9..0000000
--- a/src/math/stubs_arm64.s
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build arm64
-
-#include "textflag.h"
-
-TEXT ·Asin(SB),NOSPLIT,$0
-	B ·asin(SB)
-
-TEXT ·Acos(SB),NOSPLIT,$0
-	B ·acos(SB)
-
-TEXT ·Atan2(SB),NOSPLIT,$0
-	B ·atan2(SB)
-
-TEXT ·Atan(SB),NOSPLIT,$0
-	B ·atan(SB)
-
-TEXT ·Dim(SB),NOSPLIT,$0
-	B ·dim(SB)
-
-TEXT ·Min(SB),NOSPLIT,$0
-	B ·min(SB)
-
-TEXT ·Max(SB),NOSPLIT,$0
-	B ·max(SB)
-
-TEXT ·Exp2(SB),NOSPLIT,$0
-	B ·exp2(SB)
-
-TEXT ·Expm1(SB),NOSPLIT,$0
-	B ·expm1(SB)
-
-TEXT ·Exp(SB),NOSPLIT,$0
-	B ·exp(SB)
-
-TEXT ·Floor(SB),NOSPLIT,$0
-	B ·floor(SB)
-
-TEXT ·Ceil(SB),NOSPLIT,$0
-	B ·ceil(SB)
-
-TEXT ·Trunc(SB),NOSPLIT,$0
-	B ·trunc(SB)
-
-TEXT ·Frexp(SB),NOSPLIT,$0
-	B ·frexp(SB)
-
-TEXT ·Hypot(SB),NOSPLIT,$0
-	B ·hypot(SB)
-
-TEXT ·Ldexp(SB),NOSPLIT,$0
-	B ·ldexp(SB)
-
-TEXT ·Log10(SB),NOSPLIT,$0
-	B ·log10(SB)
-
-TEXT ·Log2(SB),NOSPLIT,$0
-	B ·log2(SB)
-
-TEXT ·Log1p(SB),NOSPLIT,$0
-	B ·log1p(SB)
-
-TEXT ·Log(SB),NOSPLIT,$0
-	B ·log(SB)
-
-TEXT ·Modf(SB),NOSPLIT,$0
-	B ·modf(SB)
-
-TEXT ·Mod(SB),NOSPLIT,$0
-	B ·mod(SB)
-
-TEXT ·Remainder(SB),NOSPLIT,$0
-	B ·remainder(SB)
-
-TEXT ·Sincos(SB),NOSPLIT,$0
-	B ·sincos(SB)
-
-TEXT ·Sin(SB),NOSPLIT,$0
-	B ·sin(SB)
-
-TEXT ·Cos(SB),NOSPLIT,$0
-	B ·cos(SB)
-
-TEXT ·Tan(SB),NOSPLIT,$0
-	B ·tan(SB)
diff --git a/src/math/stubs_ppc64x.s b/src/math/stubs_ppc64x.s
deleted file mode 100644
index 9369c5c..0000000
--- a/src/math/stubs_ppc64x.s
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ppc64 ppc64le
-
-#include "textflag.h"
-
-TEXT ·Asin(SB),NOSPLIT,$0
-	BR ·asin(SB)
-
-TEXT ·Acos(SB),NOSPLIT,$0
-	BR ·acos(SB)
-
-TEXT ·Atan2(SB),NOSPLIT,$0
-	BR ·atan2(SB)
-
-TEXT ·Atan(SB),NOSPLIT,$0
-	BR ·atan(SB)
-
-TEXT ·Dim(SB),NOSPLIT,$0
-	BR ·dim(SB)
-
-TEXT ·Min(SB),NOSPLIT,$0
-	BR ·min(SB)
-
-TEXT ·Max(SB),NOSPLIT,$0
-	BR ·max(SB)
-
-TEXT ·Exp2(SB),NOSPLIT,$0
-	BR ·exp2(SB)
-
-TEXT ·Expm1(SB),NOSPLIT,$0
-	BR ·expm1(SB)
-
-TEXT ·Exp(SB),NOSPLIT,$0
-	BR ·exp(SB)
-
-TEXT ·Floor(SB),NOSPLIT,$0
-	BR ·floor(SB)
-
-TEXT ·Ceil(SB),NOSPLIT,$0
-	BR ·ceil(SB)
-
-TEXT ·Trunc(SB),NOSPLIT,$0
-	BR ·trunc(SB)
-
-TEXT ·Frexp(SB),NOSPLIT,$0
-	BR ·frexp(SB)
-
-TEXT ·Hypot(SB),NOSPLIT,$0
-	BR ·hypot(SB)
-
-TEXT ·Ldexp(SB),NOSPLIT,$0
-	BR ·ldexp(SB)
-
-TEXT ·Log10(SB),NOSPLIT,$0
-	BR ·log10(SB)
-
-TEXT ·Log2(SB),NOSPLIT,$0
-	BR ·log2(SB)
-
-TEXT ·Log1p(SB),NOSPLIT,$0
-	BR ·log1p(SB)
-
-TEXT ·Log(SB),NOSPLIT,$0
-	BR ·log(SB)
-
-TEXT ·Modf(SB),NOSPLIT,$0
-	BR ·modf(SB)
-
-TEXT ·Mod(SB),NOSPLIT,$0
-	BR ·mod(SB)
-
-TEXT ·Remainder(SB),NOSPLIT,$0
-	BR ·remainder(SB)
-
-TEXT ·Sincos(SB),NOSPLIT,$0
-	BR ·sincos(SB)
-
-TEXT ·Sin(SB),NOSPLIT,$0
-	BR ·sin(SB)
-
-TEXT ·Cos(SB),NOSPLIT,$0
-	BR ·cos(SB)
-
-TEXT ·Sqrt(SB),NOSPLIT,$0
-	BR ·sqrt(SB)
-
-TEXT ·Tan(SB),NOSPLIT,$0
-	BR ·tan(SB)
diff --git a/src/mime/encodedword.go b/src/mime/encodedword.go
deleted file mode 100644
index 9796f50..0000000
--- a/src/mime/encodedword.go
+++ /dev/null
@@ -1,329 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package mime
-
-import (
-	"bytes"
-	"encoding/base64"
-	"errors"
-	"fmt"
-	"io"
-	"strings"
-	"sync"
-	"unicode"
-	"unicode/utf8"
-)
-
-// A WordEncoder is a RFC 2047 encoded-word encoder.
-type WordEncoder byte
-
-const (
-	// BEncoding represents Base64 encoding scheme as defined by RFC 2045.
-	BEncoding = WordEncoder('b')
-	// QEncoding represents the Q-encoding scheme as defined by RFC 2047.
-	QEncoding = WordEncoder('q')
-)
-
-var (
-	errInvalidWord = errors.New("mime: invalid RFC 2047 encoded-word")
-)
-
-// Encode returns the encoded-word form of s. If s is ASCII without special
-// characters, it is returned unchanged. The provided charset is the IANA
-// charset name of s. It is case insensitive.
-func (e WordEncoder) Encode(charset, s string) string {
-	if !needsEncoding(s) {
-		return s
-	}
-	return e.encodeWord(charset, s)
-}
-
-func needsEncoding(s string) bool {
-	for _, b := range s {
-		if (b < ' ' || b > '~') && b != '\t' {
-			return true
-		}
-	}
-	return false
-}
-
-// encodeWord encodes a string into an encoded-word.
-func (e WordEncoder) encodeWord(charset, s string) string {
-	buf := getBuffer()
-	defer putBuffer(buf)
-
-	buf.WriteString("=?")
-	buf.WriteString(charset)
-	buf.WriteByte('?')
-	buf.WriteByte(byte(e))
-	buf.WriteByte('?')
-
-	if e == BEncoding {
-		w := base64.NewEncoder(base64.StdEncoding, buf)
-		io.WriteString(w, s)
-		w.Close()
-	} else {
-		enc := make([]byte, 3)
-		for i := 0; i < len(s); i++ {
-			b := s[i]
-			switch {
-			case b == ' ':
-				buf.WriteByte('_')
-			case b <= '~' && b >= '!' && b != '=' && b != '?' && b != '_':
-				buf.WriteByte(b)
-			default:
-				enc[0] = '='
-				enc[1] = upperhex[b>>4]
-				enc[2] = upperhex[b&0x0f]
-				buf.Write(enc)
-			}
-		}
-	}
-	buf.WriteString("?=")
-	return buf.String()
-}
-
-const upperhex = "0123456789ABCDEF"
-
-// A WordDecoder decodes MIME headers containing RFC 2047 encoded-words.
-type WordDecoder struct {
-	// CharsetReader, if non-nil, defines a function to generate
-	// charset-conversion readers, converting from the provided
-	// charset into UTF-8.
-	// Charsets are always lower-case. utf-8, iso-8859-1 and us-ascii charsets
-	// are handled by default.
-	// One of the the CharsetReader's result values must be non-nil.
-	CharsetReader func(charset string, input io.Reader) (io.Reader, error)
-}
-
-// Decode decodes an encoded-word. If word is not a valid RFC 2047 encoded-word,
-// word is returned unchanged.
-func (d *WordDecoder) Decode(word string) (string, error) {
-	fields := strings.Split(word, "?") // TODO: remove allocation?
-	if len(fields) != 5 || fields[0] != "=" || fields[4] != "=" || len(fields[2]) != 1 {
-		return "", errInvalidWord
-	}
-
-	content, err := decode(fields[2][0], fields[3])
-	if err != nil {
-		return "", err
-	}
-
-	buf := getBuffer()
-	defer putBuffer(buf)
-
-	if err := d.convert(buf, fields[1], content); err != nil {
-		return "", err
-	}
-
-	return buf.String(), nil
-}
-
-// DecodeHeader decodes all encoded-words of the given string. It returns an
-// error if and only if CharsetReader of d returns an error.
-func (d *WordDecoder) DecodeHeader(header string) (string, error) {
-	// If there is no encoded-word, returns before creating a buffer.
-	i := strings.Index(header, "=?")
-	if i == -1 {
-		return header, nil
-	}
-
-	buf := getBuffer()
-	defer putBuffer(buf)
-
-	buf.WriteString(header[:i])
-	header = header[i:]
-
-	betweenWords := false
-	for {
-		start := strings.Index(header, "=?")
-		if start == -1 {
-			break
-		}
-		cur := start + len("=?")
-
-		i := strings.Index(header[cur:], "?")
-		if i == -1 {
-			break
-		}
-		charset := header[cur : cur+i]
-		cur += i + len("?")
-
-		if len(header) < cur+len("Q??=") {
-			break
-		}
-		encoding := header[cur]
-		cur++
-
-		if header[cur] != '?' {
-			break
-		}
-		cur++
-
-		j := strings.Index(header[cur:], "?=")
-		if j == -1 {
-			break
-		}
-		text := header[cur : cur+j]
-		end := cur + j + len("?=")
-
-		content, err := decode(encoding, text)
-		if err != nil {
-			betweenWords = false
-			buf.WriteString(header[:start+2])
-			header = header[start+2:]
-			continue
-		}
-
-		// Write characters before the encoded-word. White-space and newline
-		// characters separating two encoded-words must be deleted.
-		if start > 0 && (!betweenWords || hasNonWhitespace(header[:start])) {
-			buf.WriteString(header[:start])
-		}
-
-		if err := d.convert(buf, charset, content); err != nil {
-			return "", err
-		}
-
-		header = header[end:]
-		betweenWords = true
-	}
-
-	if len(header) > 0 {
-		buf.WriteString(header)
-	}
-
-	return buf.String(), nil
-}
-
-func decode(encoding byte, text string) ([]byte, error) {
-	switch encoding {
-	case 'B', 'b':
-		return base64.StdEncoding.DecodeString(text)
-	case 'Q', 'q':
-		return qDecode(text)
-	default:
-		return nil, errInvalidWord
-	}
-}
-
-func (d *WordDecoder) convert(buf *bytes.Buffer, charset string, content []byte) error {
-	switch {
-	case strings.EqualFold("utf-8", charset):
-		buf.Write(content)
-	case strings.EqualFold("iso-8859-1", charset):
-		for _, c := range content {
-			buf.WriteRune(rune(c))
-		}
-	case strings.EqualFold("us-ascii", charset):
-		for _, c := range content {
-			if c >= utf8.RuneSelf {
-				buf.WriteRune(unicode.ReplacementChar)
-			} else {
-				buf.WriteByte(c)
-			}
-		}
-	default:
-		if d.CharsetReader == nil {
-			return fmt.Errorf("mime: unhandled charset %q", charset)
-		}
-		r, err := d.CharsetReader(strings.ToLower(charset), bytes.NewReader(content))
-		if err != nil {
-			return err
-		}
-		if _, err = buf.ReadFrom(r); err != nil {
-			return err
-		}
-	}
-	return nil
-}
-
-// hasNonWhitespace reports whether s (assumed to be ASCII) contains at least
-// one byte of non-whitespace.
-func hasNonWhitespace(s string) bool {
-	for _, b := range s {
-		switch b {
-		// Encoded-words can only be separated by linear white spaces which does
-		// not include vertical tabs (\v).
-		case ' ', '\t', '\n', '\r':
-		default:
-			return true
-		}
-	}
-	return false
-}
-
-// qDecode decodes a Q encoded string.
-func qDecode(s string) ([]byte, error) {
-	dec := make([]byte, len(s))
-	n := 0
-	for i := 0; i < len(s); i++ {
-		switch c := s[i]; {
-		case c == '_':
-			dec[n] = ' '
-		case c == '=':
-			if i+2 >= len(s) {
-				return nil, errInvalidWord
-			}
-			b, err := readHexByte(s[i+1], s[i+2])
-			if err != nil {
-				return nil, err
-			}
-			dec[n] = b
-			i += 2
-		case (c <= '~' && c >= ' ') || c == '\n' || c == '\r' || c == '\t':
-			dec[n] = c
-		default:
-			return nil, errInvalidWord
-		}
-		n++
-	}
-
-	return dec[:n], nil
-}
-
-// readHexByte returns the byte from its quoted-printable representation.
-func readHexByte(a, b byte) (byte, error) {
-	var hb, lb byte
-	var err error
-	if hb, err = fromHex(a); err != nil {
-		return 0, err
-	}
-	if lb, err = fromHex(b); err != nil {
-		return 0, err
-	}
-	return hb<<4 | lb, nil
-}
-
-func fromHex(b byte) (byte, error) {
-	switch {
-	case b >= '0' && b <= '9':
-		return b - '0', nil
-	case b >= 'A' && b <= 'F':
-		return b - 'A' + 10, nil
-	// Accept badly encoded bytes.
-	case b >= 'a' && b <= 'f':
-		return b - 'a' + 10, nil
-	}
-	return 0, fmt.Errorf("mime: invalid hex byte %#02x", b)
-}
-
-var bufPool = sync.Pool{
-	New: func() interface{} {
-		return new(bytes.Buffer)
-	},
-}
-
-func getBuffer() *bytes.Buffer {
-	return bufPool.Get().(*bytes.Buffer)
-}
-
-func putBuffer(buf *bytes.Buffer) {
-	if buf.Len() > 1024 {
-		return
-	}
-	buf.Reset()
-	bufPool.Put(buf)
-}
diff --git a/src/mime/encodedword_test.go b/src/mime/encodedword_test.go
deleted file mode 100644
index 2beff5d..0000000
--- a/src/mime/encodedword_test.go
+++ /dev/null
@@ -1,287 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package mime
-
-import (
-	"bytes"
-	"errors"
-	"fmt"
-	"io"
-	"io/ioutil"
-	"strings"
-	"testing"
-)
-
-func ExampleWordEncoder_Encode() {
-	fmt.Println(QEncoding.Encode("utf-8", "¡Hola, señor!"))
-	fmt.Println(QEncoding.Encode("utf-8", "Hello!"))
-	fmt.Println(BEncoding.Encode("UTF-8", "¡Hola, señor!"))
-	fmt.Println(QEncoding.Encode("ISO-8859-1", "Caf\xE9"))
-	// Output:
-	// =?utf-8?q?=C2=A1Hola,_se=C3=B1or!?=
-	// Hello!
-	// =?UTF-8?b?wqFIb2xhLCBzZcOxb3Ih?=
-	// =?ISO-8859-1?q?Caf=E9?=
-}
-
-func ExampleWordDecoder_Decode() {
-	dec := new(WordDecoder)
-	header, err := dec.Decode("=?utf-8?q?=C2=A1Hola,_se=C3=B1or!?=")
-	if err != nil {
-		panic(err)
-	}
-	fmt.Println(header)
-
-	dec.CharsetReader = func(charset string, input io.Reader) (io.Reader, error) {
-		switch charset {
-		case "x-case":
-			// Fake character set for example.
-			// Real use would integrate with packages such
-			// as code.google.com/p/go-charset
-			content, err := ioutil.ReadAll(input)
-			if err != nil {
-				return nil, err
-			}
-			return bytes.NewReader(bytes.ToUpper(content)), nil
-		default:
-			return nil, fmt.Errorf("unhandled charset %q", charset)
-		}
-	}
-	header, err = dec.Decode("=?x-case?q?hello!?=")
-	if err != nil {
-		panic(err)
-	}
-	fmt.Println(header)
-	// Output:
-	// ¡Hola, señor!
-	// HELLO!
-}
-
-func ExampleWordDecoder_DecodeHeader() {
-	dec := new(WordDecoder)
-	header, err := dec.DecodeHeader("=?utf-8?q?=C3=89ric?= <eric at example.org>, =?utf-8?q?Ana=C3=AFs?= <anais at example.org>")
-	if err != nil {
-		panic(err)
-	}
-	fmt.Println(header)
-
-	header, err = dec.DecodeHeader("=?utf-8?q?=C2=A1Hola,?= =?utf-8?q?_se=C3=B1or!?=")
-	if err != nil {
-		panic(err)
-	}
-	fmt.Println(header)
-
-	dec.CharsetReader = func(charset string, input io.Reader) (io.Reader, error) {
-		switch charset {
-		case "x-case":
-			// Fake character set for example.
-			// Real use would integrate with packages such
-			// as code.google.com/p/go-charset
-			content, err := ioutil.ReadAll(input)
-			if err != nil {
-				return nil, err
-			}
-			return bytes.NewReader(bytes.ToUpper(content)), nil
-		default:
-			return nil, fmt.Errorf("unhandled charset %q", charset)
-		}
-	}
-	header, err = dec.DecodeHeader("=?x-case?q?hello_?= =?x-case?q?world!?=")
-	if err != nil {
-		panic(err)
-	}
-	fmt.Println(header)
-	// Output:
-	// Éric <eric at example.org>, Anaïs <anais at example.org>
-	// ¡Hola, señor!
-	// HELLO WORLD!
-}
-
-func TestEncodeWord(t *testing.T) {
-	utf8, iso88591 := "utf-8", "iso-8859-1"
-	tests := []struct {
-		enc      WordEncoder
-		charset  string
-		src, exp string
-	}{
-		{QEncoding, utf8, "François-Jérôme", "=?utf-8?q?Fran=C3=A7ois-J=C3=A9r=C3=B4me?="},
-		{BEncoding, utf8, "Café", "=?utf-8?b?Q2Fmw6k=?="},
-		{QEncoding, iso88591, "La Seleção", "=?iso-8859-1?q?La_Sele=C3=A7=C3=A3o?="},
-		{QEncoding, utf8, "", ""},
-		{QEncoding, utf8, "A", "A"},
-		{QEncoding, iso88591, "a", "a"},
-		{QEncoding, utf8, "123 456", "123 456"},
-		{QEncoding, utf8, "\t !\"#$%&'()*+,-./ :;<>?@[\\]^_`{|}~", "\t !\"#$%&'()*+,-./ :;<>?@[\\]^_`{|}~"},
-	}
-
-	for _, test := range tests {
-		if s := test.enc.Encode(test.charset, test.src); s != test.exp {
-			t.Errorf("Encode(%q) = %q, want %q", test.src, s, test.exp)
-		}
-	}
-}
-
-func TestDecodeWord(t *testing.T) {
-	tests := []struct {
-		src, exp string
-		hasErr   bool
-	}{
-		{"=?UTF-8?Q?=C2=A1Hola,_se=C3=B1or!?=", "¡Hola, señor!", false},
-		{"=?UTF-8?Q?Fran=C3=A7ois-J=C3=A9r=C3=B4me?=", "François-Jérôme", false},
-		{"=?UTF-8?q?ascii?=", "ascii", false},
-		{"=?utf-8?B?QW5kcsOp?=", "André", false},
-		{"=?ISO-8859-1?Q?Rapha=EBl_Dupont?=", "Raphaël Dupont", false},
-		{"=?utf-8?b?IkFudG9uaW8gSm9zw6kiIDxqb3NlQGV4YW1wbGUub3JnPg==?=", `"Antonio José" <jose at example.org>`, false},
-		{"=?UTF-8?A?Test?=", "", true},
-		{"=?UTF-8?Q?A=B?=", "", true},
-		{"=?UTF-8?Q?=A?=", "", true},
-		{"=?UTF-8?A?A?=", "", true},
-	}
-
-	for _, test := range tests {
-		dec := new(WordDecoder)
-		s, err := dec.Decode(test.src)
-		if test.hasErr && err == nil {
-			t.Errorf("Decode(%q) should return an error", test.src)
-			continue
-		}
-		if !test.hasErr && err != nil {
-			t.Errorf("Decode(%q): %v", test.src, err)
-			continue
-		}
-		if s != test.exp {
-			t.Errorf("Decode(%q) = %q, want %q", test.src, s, test.exp)
-		}
-	}
-}
-
-func TestDecodeHeader(t *testing.T) {
-	tests := []struct {
-		src, exp string
-	}{
-		{"=?UTF-8?Q?=C2=A1Hola,_se=C3=B1or!?=", "¡Hola, señor!"},
-		{"=?UTF-8?Q?Fran=C3=A7ois-J=C3=A9r=C3=B4me?=", "François-Jérôme"},
-		{"=?UTF-8?q?ascii?=", "ascii"},
-		{"=?utf-8?B?QW5kcsOp?=", "André"},
-		{"=?ISO-8859-1?Q?Rapha=EBl_Dupont?=", "Raphaël Dupont"},
-		{"Jean", "Jean"},
-		{"=?utf-8?b?IkFudG9uaW8gSm9zw6kiIDxqb3NlQGV4YW1wbGUub3JnPg==?=", `"Antonio José" <jose at example.org>`},
-		{"=?UTF-8?A?Test?=", "=?UTF-8?A?Test?="},
-		{"=?UTF-8?Q?A=B?=", "=?UTF-8?Q?A=B?="},
-		{"=?UTF-8?Q?=A?=", "=?UTF-8?Q?=A?="},
-		{"=?UTF-8?A?A?=", "=?UTF-8?A?A?="},
-		// Incomplete words
-		{"=?", "=?"},
-		{"=?UTF-8?", "=?UTF-8?"},
-		{"=?UTF-8?=", "=?UTF-8?="},
-		{"=?UTF-8?Q", "=?UTF-8?Q"},
-		{"=?UTF-8?Q?", "=?UTF-8?Q?"},
-		{"=?UTF-8?Q?=", "=?UTF-8?Q?="},
-		{"=?UTF-8?Q?A", "=?UTF-8?Q?A"},
-		{"=?UTF-8?Q?A?", "=?UTF-8?Q?A?"},
-		// Tests from RFC 2047
-		{"=?ISO-8859-1?Q?a?=", "a"},
-		{"=?ISO-8859-1?Q?a?= b", "a b"},
-		{"=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=", "ab"},
-		{"=?ISO-8859-1?Q?a?=  =?ISO-8859-1?Q?b?=", "ab"},
-		{"=?ISO-8859-1?Q?a?= \r\n\t =?ISO-8859-1?Q?b?=", "ab"},
-		{"=?ISO-8859-1?Q?a_b?=", "a b"},
-	}
-
-	for _, test := range tests {
-		dec := new(WordDecoder)
-		s, err := dec.DecodeHeader(test.src)
-		if err != nil {
-			t.Errorf("DecodeHeader(%q): %v", test.src, err)
-		}
-		if s != test.exp {
-			t.Errorf("DecodeHeader(%q) = %q, want %q", test.src, s, test.exp)
-		}
-	}
-}
-
-func TestCharsetDecoder(t *testing.T) {
-	tests := []struct {
-		src      string
-		want     string
-		charsets []string
-		content  []string
-	}{
-		{"=?utf-8?b?Q2Fmw6k=?=", "Café", nil, nil},
-		{"=?ISO-8859-1?Q?caf=E9?=", "café", nil, nil},
-		{"=?US-ASCII?Q?foo_bar?=", "foo bar", nil, nil},
-		{"=?utf-8?Q?=?=", "=?utf-8?Q?=?=", nil, nil},
-		{"=?utf-8?Q?=A?=", "=?utf-8?Q?=A?=", nil, nil},
-		{
-			"=?ISO-8859-15?Q?f=F5=F6?=  =?windows-1252?Q?b=E0r?=",
-			"f\xf5\xf6b\xe0r",
-			[]string{"iso-8859-15", "windows-1252"},
-			[]string{"f\xf5\xf6", "b\xe0r"},
-		},
-	}
-
-	for _, test := range tests {
-		i := 0
-		dec := &WordDecoder{
-			CharsetReader: func(charset string, input io.Reader) (io.Reader, error) {
-				if charset != test.charsets[i] {
-					t.Errorf("DecodeHeader(%q), got charset %q, want %q", test.src, charset, test.charsets[i])
-				}
-				content, err := ioutil.ReadAll(input)
-				if err != nil {
-					t.Errorf("DecodeHeader(%q), error in reader: %v", test.src, err)
-				}
-				got := string(content)
-				if got != test.content[i] {
-					t.Errorf("DecodeHeader(%q), got content %q, want %q", test.src, got, test.content[i])
-				}
-				i++
-
-				return strings.NewReader(got), nil
-			},
-		}
-		got, err := dec.DecodeHeader(test.src)
-		if err != nil {
-			t.Errorf("DecodeHeader(%q): %v", test.src, err)
-		}
-		if got != test.want {
-			t.Errorf("DecodeHeader(%q) = %q, want %q", test.src, got, test.want)
-		}
-	}
-}
-
-func TestCharsetDecoderError(t *testing.T) {
-	dec := &WordDecoder{
-		CharsetReader: func(charset string, input io.Reader) (io.Reader, error) {
-			return nil, errors.New("Test error")
-		},
-	}
-
-	if _, err := dec.DecodeHeader("=?charset?Q?foo?="); err == nil {
-		t.Error("DecodeHeader should return an error")
-	}
-}
-
-func BenchmarkQEncodeWord(b *testing.B) {
-	for i := 0; i < b.N; i++ {
-		QEncoding.Encode("UTF-8", "¡Hola, señor!")
-	}
-}
-
-func BenchmarkQDecodeWord(b *testing.B) {
-	dec := new(WordDecoder)
-
-	for i := 0; i < b.N; i++ {
-		dec.Decode("=?utf-8?q?=C2=A1Hola,_se=C3=B1or!?=")
-	}
-}
-
-func BenchmarkQDecodeHeader(b *testing.B) {
-	dec := new(WordDecoder)
-
-	for i := 0; i < b.N; i++ {
-		dec.Decode("=?utf-8?q?=C2=A1Hola,_se=C3=B1or!?=")
-	}
-}
diff --git a/src/mime/quotedprintable/reader.go b/src/mime/quotedprintable/reader.go
deleted file mode 100644
index 3bd6833..0000000
--- a/src/mime/quotedprintable/reader.go
+++ /dev/null
@@ -1,124 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package quotedprintable implements quoted-printable encoding as specified by
-// RFC 2045.
-package quotedprintable
-
-import (
-	"bufio"
-	"bytes"
-	"fmt"
-	"io"
-)
-
-// Reader is a quoted-printable decoder.
-type Reader struct {
-	br   *bufio.Reader
-	rerr error  // last read error
-	line []byte // to be consumed before more of br
-}
-
-// NewReader returns a quoted-printable reader, decoding from r.
-func NewReader(r io.Reader) *Reader {
-	return &Reader{
-		br: bufio.NewReader(r),
-	}
-}
-
-func fromHex(b byte) (byte, error) {
-	switch {
-	case b >= '0' && b <= '9':
-		return b - '0', nil
-	case b >= 'A' && b <= 'F':
-		return b - 'A' + 10, nil
-	// Accept badly encoded bytes.
-	case b >= 'a' && b <= 'f':
-		return b - 'a' + 10, nil
-	}
-	return 0, fmt.Errorf("quotedprintable: invalid hex byte 0x%02x", b)
-}
-
-func readHexByte(v []byte) (b byte, err error) {
-	if len(v) < 2 {
-		return 0, io.ErrUnexpectedEOF
-	}
-	var hb, lb byte
-	if hb, err = fromHex(v[0]); err != nil {
-		return 0, err
-	}
-	if lb, err = fromHex(v[1]); err != nil {
-		return 0, err
-	}
-	return hb<<4 | lb, nil
-}
-
-func isQPDiscardWhitespace(r rune) bool {
-	switch r {
-	case '\n', '\r', ' ', '\t':
-		return true
-	}
-	return false
-}
-
-var (
-	crlf       = []byte("\r\n")
-	lf         = []byte("\n")
-	softSuffix = []byte("=")
-)
-
-// Read reads and decodes quoted-printable data from the underlying reader.
-func (r *Reader) Read(p []byte) (n int, err error) {
-	// Deviations from RFC 2045:
-	// 1. in addition to "=\r\n", "=\n" is also treated as soft line break.
-	// 2. it will pass through a '\r' or '\n' not preceded by '=', consistent
-	//    with other broken QP encoders & decoders.
-	for len(p) > 0 {
-		if len(r.line) == 0 {
-			if r.rerr != nil {
-				return n, r.rerr
-			}
-			r.line, r.rerr = r.br.ReadSlice('\n')
-
-			// Does the line end in CRLF instead of just LF?
-			hasLF := bytes.HasSuffix(r.line, lf)
-			hasCR := bytes.HasSuffix(r.line, crlf)
-			wholeLine := r.line
-			r.line = bytes.TrimRightFunc(wholeLine, isQPDiscardWhitespace)
-			if bytes.HasSuffix(r.line, softSuffix) {
-				rightStripped := wholeLine[len(r.line):]
-				r.line = r.line[:len(r.line)-1]
-				if !bytes.HasPrefix(rightStripped, lf) && !bytes.HasPrefix(rightStripped, crlf) {
-					r.rerr = fmt.Errorf("quotedprintable: invalid bytes after =: %q", rightStripped)
-				}
-			} else if hasLF {
-				if hasCR {
-					r.line = append(r.line, '\r', '\n')
-				} else {
-					r.line = append(r.line, '\n')
-				}
-			}
-			continue
-		}
-		b := r.line[0]
-
-		switch {
-		case b == '=':
-			b, err = readHexByte(r.line[1:])
-			if err != nil {
-				return n, err
-			}
-			r.line = r.line[2:] // 2 of the 3; other 1 is done below
-		case b == '\t' || b == '\r' || b == '\n':
-			break
-		case b < ' ' || b > '~':
-			return n, fmt.Errorf("quotedprintable: invalid unescaped byte 0x%02x in body", b)
-		}
-		p[0] = b
-		p = p[1:]
-		r.line = r.line[1:]
-		n++
-	}
-	return n, nil
-}
diff --git a/src/mime/quotedprintable/reader_test.go b/src/mime/quotedprintable/reader_test.go
deleted file mode 100644
index e77b261..0000000
--- a/src/mime/quotedprintable/reader_test.go
+++ /dev/null
@@ -1,204 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package quotedprintable
-
-import (
-	"bufio"
-	"bytes"
-	"errors"
-	"flag"
-	"fmt"
-	"io"
-	"os/exec"
-	"regexp"
-	"sort"
-	"strings"
-	"testing"
-	"time"
-)
-
-func TestReader(t *testing.T) {
-	tests := []struct {
-		in, want string
-		err      interface{}
-	}{
-		{in: "", want: ""},
-		{in: "foo bar", want: "foo bar"},
-		{in: "foo bar=3D", want: "foo bar="},
-		{in: "foo bar=3d", want: "foo bar="}, // lax.
-		{in: "foo bar=\n", want: "foo bar"},
-		{in: "foo bar\n", want: "foo bar\n"}, // somewhat lax.
-		{in: "foo bar=0", want: "foo bar", err: io.ErrUnexpectedEOF},
-		{in: "foo bar=0D=0A", want: "foo bar\r\n"},
-		{in: " A B        \r\n C ", want: " A B\r\n C"},
-		{in: " A B =\r\n C ", want: " A B  C"},
-		{in: " A B =\n C ", want: " A B  C"}, // lax. treating LF as CRLF
-		{in: "foo=\nbar", want: "foobar"},
-		{in: "foo\x00bar", want: "foo", err: "quotedprintable: invalid unescaped byte 0x00 in body"},
-		{in: "foo bar\xff", want: "foo bar", err: "quotedprintable: invalid unescaped byte 0xff in body"},
-
-		// Equal sign.
-		{in: "=3D30\n", want: "=30\n"},
-		{in: "=00=FF0=\n", want: "\x00\xff0"},
-
-		// Trailing whitespace
-		{in: "foo  \n", want: "foo\n"},
-		{in: "foo  \n\nfoo =\n\nfoo=20\n\n", want: "foo\n\nfoo \nfoo \n\n"},
-
-		// Tests that we allow bare \n and \r through, despite it being strictly
-		// not permitted per RFC 2045, Section 6.7 Page 22 bullet (4).
-		{in: "foo\nbar", want: "foo\nbar"},
-		{in: "foo\rbar", want: "foo\rbar"},
-		{in: "foo\r\nbar", want: "foo\r\nbar"},
-
-		// Different types of soft line-breaks.
-		{in: "foo=\r\nbar", want: "foobar"},
-		{in: "foo=\nbar", want: "foobar"},
-		{in: "foo=\rbar", want: "foo", err: "quotedprintable: invalid hex byte 0x0d"},
-		{in: "foo=\r\r\r \nbar", want: "foo", err: `quotedprintable: invalid bytes after =: "\r\r\r \n"`},
-
-		// Example from RFC 2045:
-		{in: "Now's the time =\n" + "for all folk to come=\n" + " to the aid of their country.",
-			want: "Now's the time for all folk to come to the aid of their country."},
-	}
-	for _, tt := range tests {
-		var buf bytes.Buffer
-		_, err := io.Copy(&buf, NewReader(strings.NewReader(tt.in)))
-		if got := buf.String(); got != tt.want {
-			t.Errorf("for %q, got %q; want %q", tt.in, got, tt.want)
-		}
-		switch verr := tt.err.(type) {
-		case nil:
-			if err != nil {
-				t.Errorf("for %q, got unexpected error: %v", tt.in, err)
-			}
-		case string:
-			if got := fmt.Sprint(err); got != verr {
-				t.Errorf("for %q, got error %q; want %q", tt.in, got, verr)
-			}
-		case error:
-			if err != verr {
-				t.Errorf("for %q, got error %q; want %q", tt.in, err, verr)
-			}
-		}
-	}
-
-}
-
-func everySequence(base, alpha string, length int, fn func(string)) {
-	if len(base) == length {
-		fn(base)
-		return
-	}
-	for i := 0; i < len(alpha); i++ {
-		everySequence(base+alpha[i:i+1], alpha, length, fn)
-	}
-}
-
-var useQprint = flag.Bool("qprint", false, "Compare against the 'qprint' program.")
-
-var badSoftRx = regexp.MustCompile(`=([^\r\n]+?\n)|([^\r\n]+$)|(\r$)|(\r[^\n]+\n)|( \r\n)`)
-
-func TestExhaustive(t *testing.T) {
-	if *useQprint {
-		_, err := exec.LookPath("qprint")
-		if err != nil {
-			t.Fatalf("Error looking for qprint: %v", err)
-		}
-	}
-
-	var buf bytes.Buffer
-	res := make(map[string]int)
-	everySequence("", "0A \r\n=", 6, func(s string) {
-		if strings.HasSuffix(s, "=") || strings.Contains(s, "==") {
-			return
-		}
-		buf.Reset()
-		_, err := io.Copy(&buf, NewReader(strings.NewReader(s)))
-		if err != nil {
-			errStr := err.Error()
-			if strings.Contains(errStr, "invalid bytes after =:") {
-				errStr = "invalid bytes after ="
-			}
-			res[errStr]++
-			if strings.Contains(errStr, "invalid hex byte ") {
-				if strings.HasSuffix(errStr, "0x20") && (strings.Contains(s, "=0 ") || strings.Contains(s, "=A ") || strings.Contains(s, "= ")) {
-					return
-				}
-				if strings.HasSuffix(errStr, "0x3d") && (strings.Contains(s, "=0=") || strings.Contains(s, "=A=")) {
-					return
-				}
-				if strings.HasSuffix(errStr, "0x0a") || strings.HasSuffix(errStr, "0x0d") {
-					// bunch of cases; since whitespace at the end of a line before \n is removed.
-					return
-				}
-			}
-			if strings.Contains(errStr, "unexpected EOF") {
-				return
-			}
-			if errStr == "invalid bytes after =" && badSoftRx.MatchString(s) {
-				return
-			}
-			t.Errorf("decode(%q) = %v", s, err)
-			return
-		}
-		if *useQprint {
-			cmd := exec.Command("qprint", "-d")
-			cmd.Stdin = strings.NewReader(s)
-			stderr, err := cmd.StderrPipe()
-			if err != nil {
-				panic(err)
-			}
-			qpres := make(chan interface{}, 2)
-			go func() {
-				br := bufio.NewReader(stderr)
-				s, _ := br.ReadString('\n')
-				if s != "" {
-					qpres <- errors.New(s)
-					if cmd.Process != nil {
-						// It can get stuck on invalid input, like:
-						// echo -n "0000= " | qprint -d
-						cmd.Process.Kill()
-					}
-				}
-			}()
-			go func() {
-				want, err := cmd.Output()
-				if err == nil {
-					qpres <- want
-				}
-			}()
-			select {
-			case got := <-qpres:
-				if want, ok := got.([]byte); ok {
-					if string(want) != buf.String() {
-						t.Errorf("go decode(%q) = %q; qprint = %q", s, want, buf.String())
-					}
-				} else {
-					t.Logf("qprint -d(%q) = %v", s, got)
-				}
-			case <-time.After(5 * time.Second):
-				t.Logf("qprint timeout on %q", s)
-			}
-		}
-		res["OK"]++
-	})
-	var outcomes []string
-	for k, v := range res {
-		outcomes = append(outcomes, fmt.Sprintf("%v: %d", k, v))
-	}
-	sort.Strings(outcomes)
-	got := strings.Join(outcomes, "\n")
-	want := `OK: 21576
-invalid bytes after =: 3397
-quotedprintable: invalid hex byte 0x0a: 1400
-quotedprintable: invalid hex byte 0x0d: 2700
-quotedprintable: invalid hex byte 0x20: 2490
-quotedprintable: invalid hex byte 0x3d: 440
-unexpected EOF: 3122`
-	if got != want {
-		t.Errorf("Got:\n%s\nWant:\n%s", got, want)
-	}
-}
diff --git a/src/mime/quotedprintable/writer.go b/src/mime/quotedprintable/writer.go
deleted file mode 100644
index 16ea0bf..0000000
--- a/src/mime/quotedprintable/writer.go
+++ /dev/null
@@ -1,172 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package quotedprintable
-
-import "io"
-
-const lineMaxLen = 76
-
-// A Writer is a quoted-printable writer that implements io.WriteCloser.
-type Writer struct {
-	// Binary mode treats the writer's input as pure binary and processes end of
-	// line bytes as binary data.
-	Binary bool
-
-	w    io.Writer
-	i    int
-	line [78]byte
-	cr   bool
-}
-
-// NewWriter returns a new Writer that writes to w.
-func NewWriter(w io.Writer) *Writer {
-	return &Writer{w: w}
-}
-
-// Write encodes p using quoted-printable encoding and writes it to the
-// underlying io.Writer. It limits line length to 76 characters. The encoded
-// bytes are not necessarily flushed until the Writer is closed.
-func (w *Writer) Write(p []byte) (n int, err error) {
-	for i, b := range p {
-		switch {
-		// Simple writes are done in batch.
-		case b >= '!' && b <= '~' && b != '=':
-			continue
-		case isWhitespace(b) || !w.Binary && (b == '\n' || b == '\r'):
-			continue
-		}
-
-		if i > n {
-			if err := w.write(p[n:i]); err != nil {
-				return n, err
-			}
-			n = i
-		}
-
-		if err := w.encode(b); err != nil {
-			return n, err
-		}
-		n++
-	}
-
-	if n == len(p) {
-		return n, nil
-	}
-
-	if err := w.write(p[n:]); err != nil {
-		return n, err
-	}
-
-	return len(p), nil
-}
-
-// Close closes the Writer, flushing any unwritten data to the underlying
-// io.Writer, but does not close the underlying io.Writer.
-func (w *Writer) Close() error {
-	if err := w.checkLastByte(); err != nil {
-		return err
-	}
-
-	return w.flush()
-}
-
-// write limits text encoded in quoted-printable to 76 characters per line.
-func (w *Writer) write(p []byte) error {
-	for _, b := range p {
-		if b == '\n' || b == '\r' {
-			// If the previous byte was \r, the CRLF has already been inserted.
-			if w.cr && b == '\n' {
-				w.cr = false
-				continue
-			}
-
-			if b == '\r' {
-				w.cr = true
-			}
-
-			if err := w.checkLastByte(); err != nil {
-				return err
-			}
-			if err := w.insertCRLF(); err != nil {
-				return err
-			}
-			continue
-		}
-
-		if w.i == lineMaxLen-1 {
-			if err := w.insertSoftLineBreak(); err != nil {
-				return err
-			}
-		}
-
-		w.line[w.i] = b
-		w.i++
-		w.cr = false
-	}
-
-	return nil
-}
-
-func (w *Writer) encode(b byte) error {
-	if lineMaxLen-1-w.i < 3 {
-		if err := w.insertSoftLineBreak(); err != nil {
-			return err
-		}
-	}
-
-	w.line[w.i] = '='
-	w.line[w.i+1] = upperhex[b>>4]
-	w.line[w.i+2] = upperhex[b&0x0f]
-	w.i += 3
-
-	return nil
-}
-
-const upperhex = "0123456789ABCDEF"
-
-// checkLastByte encodes the last buffered byte if it is a space or a tab.
-func (w *Writer) checkLastByte() error {
-	if w.i == 0 {
-		return nil
-	}
-
-	b := w.line[w.i-1]
-	if isWhitespace(b) {
-		w.i--
-		if err := w.encode(b); err != nil {
-			return err
-		}
-	}
-
-	return nil
-}
-
-func (w *Writer) insertSoftLineBreak() error {
-	w.line[w.i] = '='
-	w.i++
-
-	return w.insertCRLF()
-}
-
-func (w *Writer) insertCRLF() error {
-	w.line[w.i] = '\r'
-	w.line[w.i+1] = '\n'
-	w.i += 2
-
-	return w.flush()
-}
-
-func (w *Writer) flush() error {
-	if _, err := w.w.Write(w.line[:w.i]); err != nil {
-		return err
-	}
-
-	w.i = 0
-	return nil
-}
-
-func isWhitespace(b byte) bool {
-	return b == ' ' || b == '\t'
-}
diff --git a/src/mime/quotedprintable/writer_test.go b/src/mime/quotedprintable/writer_test.go
deleted file mode 100644
index a9b77b3..0000000
--- a/src/mime/quotedprintable/writer_test.go
+++ /dev/null
@@ -1,158 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package quotedprintable
-
-import (
-	"bytes"
-	"io/ioutil"
-	"strings"
-	"testing"
-)
-
-func TestWriter(t *testing.T) {
-	testWriter(t, false)
-}
-
-func TestWriterBinary(t *testing.T) {
-	testWriter(t, true)
-}
-
-func testWriter(t *testing.T, binary bool) {
-	tests := []struct {
-		in, want, wantB string
-	}{
-		{in: "", want: ""},
-		{in: "foo bar", want: "foo bar"},
-		{in: "foo bar=", want: "foo bar=3D"},
-		{in: "foo bar\r", want: "foo bar\r\n", wantB: "foo bar=0D"},
-		{in: "foo bar\r\r", want: "foo bar\r\n\r\n", wantB: "foo bar=0D=0D"},
-		{in: "foo bar\n", want: "foo bar\r\n", wantB: "foo bar=0A"},
-		{in: "foo bar\r\n", want: "foo bar\r\n", wantB: "foo bar=0D=0A"},
-		{in: "foo bar\r\r\n", want: "foo bar\r\n\r\n", wantB: "foo bar=0D=0D=0A"},
-		{in: "foo bar ", want: "foo bar=20"},
-		{in: "foo bar\t", want: "foo bar=09"},
-		{in: "foo bar  ", want: "foo bar =20"},
-		{in: "foo bar \n", want: "foo bar=20\r\n", wantB: "foo bar =0A"},
-		{in: "foo bar \r", want: "foo bar=20\r\n", wantB: "foo bar =0D"},
-		{in: "foo bar \r\n", want: "foo bar=20\r\n", wantB: "foo bar =0D=0A"},
-		{in: "foo bar  \n", want: "foo bar =20\r\n", wantB: "foo bar  =0A"},
-		{in: "foo bar  \n ", want: "foo bar =20\r\n=20", wantB: "foo bar  =0A=20"},
-		{in: "¡Hola Señor!", want: "=C2=A1Hola Se=C3=B1or!"},
-		{
-			in:   "\t !\"#$%&'()*+,-./ :;<>?@[\\]^_`{|}~",
-			want: "\t !\"#$%&'()*+,-./ :;<>?@[\\]^_`{|}~",
-		},
-		{
-			in:   strings.Repeat("a", 75),
-			want: strings.Repeat("a", 75),
-		},
-		{
-			in:   strings.Repeat("a", 76),
-			want: strings.Repeat("a", 75) + "=\r\na",
-		},
-		{
-			in:   strings.Repeat("a", 72) + "=",
-			want: strings.Repeat("a", 72) + "=3D",
-		},
-		{
-			in:   strings.Repeat("a", 73) + "=",
-			want: strings.Repeat("a", 73) + "=\r\n=3D",
-		},
-		{
-			in:   strings.Repeat("a", 74) + "=",
-			want: strings.Repeat("a", 74) + "=\r\n=3D",
-		},
-		{
-			in:   strings.Repeat("a", 75) + "=",
-			want: strings.Repeat("a", 75) + "=\r\n=3D",
-		},
-		{
-			in:   strings.Repeat(" ", 73),
-			want: strings.Repeat(" ", 72) + "=20",
-		},
-		{
-			in:   strings.Repeat(" ", 74),
-			want: strings.Repeat(" ", 73) + "=\r\n=20",
-		},
-		{
-			in:   strings.Repeat(" ", 75),
-			want: strings.Repeat(" ", 74) + "=\r\n=20",
-		},
-		{
-			in:   strings.Repeat(" ", 76),
-			want: strings.Repeat(" ", 75) + "=\r\n=20",
-		},
-		{
-			in:   strings.Repeat(" ", 77),
-			want: strings.Repeat(" ", 75) + "=\r\n =20",
-		},
-	}
-
-	for _, tt := range tests {
-		buf := new(bytes.Buffer)
-		w := NewWriter(buf)
-
-		want := tt.want
-		if binary {
-			w.Binary = true
-			if tt.wantB != "" {
-				want = tt.wantB
-			}
-		}
-
-		if _, err := w.Write([]byte(tt.in)); err != nil {
-			t.Errorf("Write(%q): %v", tt.in, err)
-			continue
-		}
-		if err := w.Close(); err != nil {
-			t.Errorf("Close(): %v", err)
-			continue
-		}
-		got := buf.String()
-		if got != want {
-			t.Errorf("Write(%q), got:\n%q\nwant:\n%q", tt.in, got, want)
-		}
-	}
-}
-
-func TestRoundTrip(t *testing.T) {
-	buf := new(bytes.Buffer)
-	w := NewWriter(buf)
-	if _, err := w.Write(testMsg); err != nil {
-		t.Fatalf("Write: %v", err)
-	}
-	if err := w.Close(); err != nil {
-		t.Fatalf("Close: %v", err)
-	}
-
-	r := NewReader(buf)
-	gotBytes, err := ioutil.ReadAll(r)
-	if err != nil {
-		t.Fatalf("Error while reading from Reader: %v", err)
-	}
-	got := string(gotBytes)
-	if got != string(testMsg) {
-		t.Errorf("Encoding and decoding changed the message, got:\n%s", got)
-	}
-}
-
-// From http://fr.wikipedia.org/wiki/Quoted-Printable
-var testMsg = []byte("Quoted-Printable (QP) est un format d'encodage de données codées sur 8 bits, qui utilise exclusivement les caractères alphanumériques imprimables du code ASCII (7 bits).\r\n" +
-	"\r\n" +
-	"En effet, les différents codages comprennent de nombreux caractères qui ne sont pas représentables en ASCII (par exemple les caractères accentués), ainsi que des caractères dits « non-imprimables ».\r\n" +
-	"\r\n" +
-	"L'encodage Quoted-Printable permet de remédier à ce problème, en procédant de la manière suivante :\r\n" +
-	"\r\n" +
-	"Un octet correspondant à un caractère imprimable de l'ASCII sauf le signe égal (donc un caractère de code ASCII entre 33 et 60 ou entre 62 et 126) ou aux caractères de saut de ligne (codes ASCII 13 et 10) ou une suite de tabulations et espaces non situées en fin de ligne (de codes ASCII respectifs 9 et 32) est représenté tel quel.\r\n" +
-	"Un octet qui ne correspond pas à la définition ci-dessus (caractère non imprimable de l'ASCII, tabulation ou espaces non suivies d'un caractère imprimable avant la fin de la ligne ou signe égal) est représenté par un signe égal, suivi de son numéro, exprimé en hexadécimal.\r\n" +
-	"Enfin, un signe égal suivi par un saut de ligne (donc la suite des trois caractères de codes ASCII 61, 13 et 10) peut être inséré n'importe où, afin de limiter la taille des lignes produites si nécessaire. Une limite de 76 caractères par ligne est généralement respectée.\r\n")
-
-func BenchmarkWriter(b *testing.B) {
-	for i := 0; i < b.N; i++ {
-		w := NewWriter(ioutil.Discard)
-		w.Write(testMsg)
-		w.Close()
-	}
-}
diff --git a/src/mime/type_dragonfly.go b/src/mime/type_dragonfly.go
deleted file mode 100644
index d09d74a..0000000
--- a/src/mime/type_dragonfly.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package mime
-
-func init() {
-	typeFiles = append(typeFiles, "/usr/local/etc/mime.types")
-}
diff --git a/src/mime/type_freebsd.go b/src/mime/type_freebsd.go
deleted file mode 100644
index d09d74a..0000000
--- a/src/mime/type_freebsd.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package mime
-
-func init() {
-	typeFiles = append(typeFiles, "/usr/local/etc/mime.types")
-}
diff --git a/src/mime/type_openbsd.go b/src/mime/type_openbsd.go
deleted file mode 100644
index c3b1abb..0000000
--- a/src/mime/type_openbsd.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package mime
-
-func init() {
-	typeFiles = append(typeFiles, "/usr/share/misc/mime.types")
-}
diff --git a/src/net/addrselect.go b/src/net/addrselect.go
deleted file mode 100644
index e22fbac..0000000
--- a/src/net/addrselect.go
+++ /dev/null
@@ -1,388 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-// Minimal RFC 6724 address selection.
-
-package net
-
-import "sort"
-
-func sortByRFC6724(addrs []IPAddr) {
-	if len(addrs) < 2 {
-		return
-	}
-	sortByRFC6724withSrcs(addrs, srcAddrs(addrs))
-}
-
-func sortByRFC6724withSrcs(addrs []IPAddr, srcs []IP) {
-	if len(addrs) != len(srcs) {
-		panic("internal error")
-	}
-	addrAttr := make([]ipAttr, len(addrs))
-	srcAttr := make([]ipAttr, len(srcs))
-	for i, v := range addrs {
-		addrAttr[i] = ipAttrOf(v.IP)
-		srcAttr[i] = ipAttrOf(srcs[i])
-	}
-	sort.Stable(&byRFC6724{
-		addrs:    addrs,
-		addrAttr: addrAttr,
-		srcs:     srcs,
-		srcAttr:  srcAttr,
-	})
-}
-
-// srcsAddrs tries to UDP-connect to each address to see if it has a
-// route. (This doesn't send any packets). The destination port
-// number is irrelevant.
-func srcAddrs(addrs []IPAddr) []IP {
-	srcs := make([]IP, len(addrs))
-	dst := UDPAddr{Port: 9}
-	for i := range addrs {
-		dst.IP = addrs[i].IP
-		dst.Zone = addrs[i].Zone
-		c, err := DialUDP("udp", nil, &dst)
-		if err == nil {
-			if src, ok := c.LocalAddr().(*UDPAddr); ok {
-				srcs[i] = src.IP
-			}
-			c.Close()
-		}
-	}
-	return srcs
-}
-
-type ipAttr struct {
-	Scope      scope
-	Precedence uint8
-	Label      uint8
-}
-
-func ipAttrOf(ip IP) ipAttr {
-	if ip == nil {
-		return ipAttr{}
-	}
-	match := rfc6724policyTable.Classify(ip)
-	return ipAttr{
-		Scope:      classifyScope(ip),
-		Precedence: match.Precedence,
-		Label:      match.Label,
-	}
-}
-
-type byRFC6724 struct {
-	addrs    []IPAddr // addrs to sort
-	addrAttr []ipAttr
-	srcs     []IP // or nil if unreachable
-	srcAttr  []ipAttr
-}
-
-func (s *byRFC6724) Len() int { return len(s.addrs) }
-
-func (s *byRFC6724) Swap(i, j int) {
-	s.addrs[i], s.addrs[j] = s.addrs[j], s.addrs[i]
-	s.srcs[i], s.srcs[j] = s.srcs[j], s.srcs[i]
-	s.addrAttr[i], s.addrAttr[j] = s.addrAttr[j], s.addrAttr[i]
-	s.srcAttr[i], s.srcAttr[j] = s.srcAttr[j], s.srcAttr[i]
-}
-
-// Less reports whether i is a better destination address for this
-// host than j.
-//
-// The algorithm and variable names comes from RFC 6724 section 6.
-func (s *byRFC6724) Less(i, j int) bool {
-	DA := s.addrs[i].IP
-	DB := s.addrs[j].IP
-	SourceDA := s.srcs[i]
-	SourceDB := s.srcs[j]
-	attrDA := &s.addrAttr[i]
-	attrDB := &s.addrAttr[j]
-	attrSourceDA := &s.srcAttr[i]
-	attrSourceDB := &s.srcAttr[j]
-
-	const preferDA = true
-	const preferDB = false
-
-	// Rule 1: Avoid unusable destinations.
-	// If DB is known to be unreachable or if Source(DB) is undefined, then
-	// prefer DA.  Similarly, if DA is known to be unreachable or if
-	// Source(DA) is undefined, then prefer DB.
-	if SourceDA == nil && SourceDB == nil {
-		return false // "equal"
-	}
-	if SourceDB == nil {
-		return preferDA
-	}
-	if SourceDA == nil {
-		return preferDB
-	}
-
-	// Rule 2: Prefer matching scope.
-	// If Scope(DA) = Scope(Source(DA)) and Scope(DB) <> Scope(Source(DB)),
-	// then prefer DA.  Similarly, if Scope(DA) <> Scope(Source(DA)) and
-	// Scope(DB) = Scope(Source(DB)), then prefer DB.
-	if attrDA.Scope == attrSourceDA.Scope && attrDB.Scope != attrSourceDB.Scope {
-		return preferDA
-	}
-	if attrDA.Scope != attrSourceDA.Scope && attrDB.Scope == attrSourceDB.Scope {
-		return preferDB
-	}
-
-	// Rule 3: Avoid deprecated addresses.
-	// If Source(DA) is deprecated and Source(DB) is not, then prefer DB.
-	// Similarly, if Source(DA) is not deprecated and Source(DB) is
-	// deprecated, then prefer DA.
-
-	// TODO(bradfitz): implement? low priority for now.
-
-	// Rule 4: Prefer home addresses.
-	// If Source(DA) is simultaneously a home address and care-of address
-	// and Source(DB) is not, then prefer DA.  Similarly, if Source(DB) is
-	// simultaneously a home address and care-of address and Source(DA) is
-	// not, then prefer DB.
-
-	// TODO(bradfitz): implement? low priority for now.
-
-	// Rule 5: Prefer matching label.
-	// If Label(Source(DA)) = Label(DA) and Label(Source(DB)) <> Label(DB),
-	// then prefer DA.  Similarly, if Label(Source(DA)) <> Label(DA) and
-	// Label(Source(DB)) = Label(DB), then prefer DB.
-	if attrSourceDA.Label == attrDA.Label &&
-		attrSourceDB.Label != attrDB.Label {
-		return preferDA
-	}
-	if attrSourceDA.Label != attrDA.Label &&
-		attrSourceDB.Label == attrDB.Label {
-		return preferDB
-	}
-
-	// Rule 6: Prefer higher precedence.
-	// If Precedence(DA) > Precedence(DB), then prefer DA.  Similarly, if
-	// Precedence(DA) < Precedence(DB), then prefer DB.
-	if attrDA.Precedence > attrDB.Precedence {
-		return preferDA
-	}
-	if attrDA.Precedence < attrDB.Precedence {
-		return preferDB
-	}
-
-	// Rule 7: Prefer native transport.
-	// If DA is reached via an encapsulating transition mechanism (e.g.,
-	// IPv6 in IPv4) and DB is not, then prefer DB.  Similarly, if DB is
-	// reached via encapsulation and DA is not, then prefer DA.
-
-	// TODO(bradfitz): implement? low priority for now.
-
-	// Rule 8: Prefer smaller scope.
-	// If Scope(DA) < Scope(DB), then prefer DA.  Similarly, if Scope(DA) >
-	// Scope(DB), then prefer DB.
-	if attrDA.Scope < attrDB.Scope {
-		return preferDA
-	}
-	if attrDA.Scope > attrDB.Scope {
-		return preferDB
-	}
-
-	// Rule 9: Use longest matching prefix.
-	// When DA and DB belong to the same address family (both are IPv6 or
-	// both are IPv4): If CommonPrefixLen(Source(DA), DA) >
-	// CommonPrefixLen(Source(DB), DB), then prefer DA.  Similarly, if
-	// CommonPrefixLen(Source(DA), DA) < CommonPrefixLen(Source(DB), DB),
-	// then prefer DB.
-	da4 := DA.To4() != nil
-	db4 := DB.To4() != nil
-	if da4 == db4 {
-		commonA := commonPrefixLen(SourceDA, DA)
-		commonB := commonPrefixLen(SourceDB, DB)
-		if commonA > commonB {
-			return preferDA
-		}
-		if commonA < commonB {
-			return preferDB
-		}
-	}
-
-	// Rule 10: Otherwise, leave the order unchanged.
-	// If DA preceded DB in the original list, prefer DA.
-	// Otherwise, prefer DB.
-	return false // "equal"
-}
-
-type policyTableEntry struct {
-	Prefix     *IPNet
-	Precedence uint8
-	Label      uint8
-}
-
-type policyTable []policyTableEntry
-
-// RFC 6724 section 2.1.
-var rfc6724policyTable = policyTable{
-	{
-		Prefix:     mustCIDR("::1/128"),
-		Precedence: 50,
-		Label:      0,
-	},
-	{
-		Prefix:     mustCIDR("::/0"),
-		Precedence: 40,
-		Label:      1,
-	},
-	{
-		// IPv4-compatible, etc.
-		Prefix:     mustCIDR("::ffff:0:0/96"),
-		Precedence: 35,
-		Label:      4,
-	},
-	{
-		// 6to4
-		Prefix:     mustCIDR("2002::/16"),
-		Precedence: 30,
-		Label:      2,
-	},
-	{
-		// Teredo
-		Prefix:     mustCIDR("2001::/32"),
-		Precedence: 5,
-		Label:      5,
-	},
-	{
-		Prefix:     mustCIDR("fc00::/7"),
-		Precedence: 3,
-		Label:      13,
-	},
-	{
-		Prefix:     mustCIDR("::/96"),
-		Precedence: 1,
-		Label:      3,
-	},
-	{
-		Prefix:     mustCIDR("fec0::/10"),
-		Precedence: 1,
-		Label:      11,
-	},
-	{
-		Prefix:     mustCIDR("3ffe::/16"),
-		Precedence: 1,
-		Label:      12,
-	},
-}
-
-func init() {
-	sort.Sort(sort.Reverse(byMaskLength(rfc6724policyTable)))
-}
-
-// byMaskLength sorts policyTableEntry by the size of their Prefix.Mask.Size,
-// from smallest mask, to largest.
-type byMaskLength []policyTableEntry
-
-func (s byMaskLength) Len() int      { return len(s) }
-func (s byMaskLength) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
-func (s byMaskLength) Less(i, j int) bool {
-	isize, _ := s[i].Prefix.Mask.Size()
-	jsize, _ := s[j].Prefix.Mask.Size()
-	return isize < jsize
-}
-
-// mustCIDR calls ParseCIDR and panics on any error, or if the network
-// is not IPv6.
-func mustCIDR(s string) *IPNet {
-	ip, ipNet, err := ParseCIDR(s)
-	if err != nil {
-		panic(err.Error())
-	}
-	if len(ip) != IPv6len {
-		panic("unexpected IP length")
-	}
-	return ipNet
-}
-
-// Classify returns the policyTableEntry of the entry with the longest
-// matching prefix that contains ip.
-// The table t must be sorted from largest mask size to smallest.
-func (t policyTable) Classify(ip IP) policyTableEntry {
-	for _, ent := range t {
-		if ent.Prefix.Contains(ip) {
-			return ent
-		}
-	}
-	return policyTableEntry{}
-}
-
-// RFC 6724 section 3.1.
-type scope uint8
-
-const (
-	scopeInterfaceLocal scope = 0x1
-	scopeLinkLocal      scope = 0x2
-	scopeAdminLocal     scope = 0x4
-	scopeSiteLocal      scope = 0x5
-	scopeOrgLocal       scope = 0x8
-	scopeGlobal         scope = 0xe
-)
-
-func classifyScope(ip IP) scope {
-	if ip.IsLoopback() || ip.IsLinkLocalUnicast() {
-		return scopeLinkLocal
-	}
-	ipv6 := len(ip) == IPv6len && ip.To4() == nil
-	if ipv6 && ip.IsMulticast() {
-		return scope(ip[1] & 0xf)
-	}
-	// Site-local addresses are defined in RFC 3513 section 2.5.6
-	// (and deprecated in RFC 3879).
-	if ipv6 && ip[0] == 0xfe && ip[1]&0xc0 == 0xc0 {
-		return scopeSiteLocal
-	}
-	return scopeGlobal
-}
-
-// commonPrefixLen reports the length of the longest prefix (looking
-// at the most significant, or leftmost, bits) that the
-// two addresses have in common, up to the length of a's prefix (i.e.,
-// the portion of the address not including the interface ID).
-//
-// If a or b is an IPv4 address as an IPv6 address, the IPv4 addresses
-// are compared (with max common prefix length of 32).
-// If a and b are different IP versions, 0 is returned.
-//
-// See https://tools.ietf.org/html/rfc6724#section-2.2
-func commonPrefixLen(a, b IP) (cpl int) {
-	if a4 := a.To4(); a4 != nil {
-		a = a4
-	}
-	if b4 := b.To4(); b4 != nil {
-		b = b4
-	}
-	if len(a) != len(b) {
-		return 0
-	}
-	// If IPv6, only up to the prefix (first 64 bits)
-	if len(a) > 8 {
-		a = a[:8]
-		b = b[:8]
-	}
-	for len(a) > 0 {
-		if a[0] == b[0] {
-			cpl += 8
-			a = a[1:]
-			b = b[1:]
-			continue
-		}
-		bits := 8
-		ab, bb := a[0], b[0]
-		for {
-			ab >>= 1
-			bb >>= 1
-			bits--
-			if ab == bb {
-				cpl += bits
-				return
-			}
-		}
-	}
-	return
-}
diff --git a/src/net/addrselect_test.go b/src/net/addrselect_test.go
deleted file mode 100644
index 5620227..0000000
--- a/src/net/addrselect_test.go
+++ /dev/null
@@ -1,219 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package net
-
-import (
-	"reflect"
-	"testing"
-)
-
-func TestSortByRFC6724(t *testing.T) {
-	tests := []struct {
-		in      []IPAddr
-		srcs    []IP
-		want    []IPAddr
-		reverse bool // also test it starting backwards
-	}{
-		// Examples from RFC 6724 section 10.2:
-
-		// Prefer matching scope.
-		{
-			in: []IPAddr{
-				{IP: ParseIP("2001:db8:1::1")},
-				{IP: ParseIP("198.51.100.121")},
-			},
-			srcs: []IP{
-				ParseIP("2001:db8:1::2"),
-				ParseIP("169.254.13.78"),
-			},
-			want: []IPAddr{
-				{IP: ParseIP("2001:db8:1::1")},
-				{IP: ParseIP("198.51.100.121")},
-			},
-			reverse: true,
-		},
-
-		// Prefer matching scope.
-		{
-			in: []IPAddr{
-				{IP: ParseIP("2001:db8:1::1")},
-				{IP: ParseIP("198.51.100.121")},
-			},
-			srcs: []IP{
-				ParseIP("fe80::1"),
-				ParseIP("198.51.100.117"),
-			},
-			want: []IPAddr{
-				{IP: ParseIP("198.51.100.121")},
-				{IP: ParseIP("2001:db8:1::1")},
-			},
-			reverse: true,
-		},
-
-		// Prefer higher precedence.
-		{
-			in: []IPAddr{
-				{IP: ParseIP("2001:db8:1::1")},
-				{IP: ParseIP("10.1.2.3")},
-			},
-			srcs: []IP{
-				ParseIP("2001:db8:1::2"),
-				ParseIP("10.1.2.4"),
-			},
-			want: []IPAddr{
-				{IP: ParseIP("2001:db8:1::1")},
-				{IP: ParseIP("10.1.2.3")},
-			},
-			reverse: true,
-		},
-
-		// Prefer smaller scope.
-		{
-			in: []IPAddr{
-				{IP: ParseIP("2001:db8:1::1")},
-				{IP: ParseIP("fe80::1")},
-			},
-			srcs: []IP{
-				ParseIP("2001:db8:1::2"),
-				ParseIP("fe80::2"),
-			},
-			want: []IPAddr{
-				{IP: ParseIP("fe80::1")},
-				{IP: ParseIP("2001:db8:1::1")},
-			},
-			reverse: true,
-		},
-	}
-	for i, tt := range tests {
-		inCopy := make([]IPAddr, len(tt.in))
-		copy(inCopy, tt.in)
-		srcCopy := make([]IP, len(tt.in))
-		copy(srcCopy, tt.srcs)
-		sortByRFC6724withSrcs(inCopy, srcCopy)
-		if !reflect.DeepEqual(inCopy, tt.want) {
-			t.Errorf("test %d:\nin = %s\ngot: %s\nwant: %s\n", i, tt.in, inCopy, tt.want)
-		}
-		if tt.reverse {
-			copy(inCopy, tt.in)
-			copy(srcCopy, tt.srcs)
-			for j := 0; j < len(inCopy)/2; j++ {
-				k := len(inCopy) - j - 1
-				inCopy[j], inCopy[k] = inCopy[k], inCopy[j]
-				srcCopy[j], srcCopy[k] = srcCopy[k], srcCopy[j]
-			}
-			sortByRFC6724withSrcs(inCopy, srcCopy)
-			if !reflect.DeepEqual(inCopy, tt.want) {
-				t.Errorf("test %d, starting backwards:\nin = %s\ngot: %s\nwant: %s\n", i, tt.in, inCopy, tt.want)
-			}
-		}
-
-	}
-
-}
-
-func TestRFC6724PolicyTableClassify(t *testing.T) {
-	tests := []struct {
-		ip   IP
-		want policyTableEntry
-	}{
-		{
-			ip: ParseIP("127.0.0.1"),
-			want: policyTableEntry{
-				Prefix:     &IPNet{IP: ParseIP("::ffff:0:0"), Mask: CIDRMask(96, 128)},
-				Precedence: 35,
-				Label:      4,
-			},
-		},
-		{
-			ip: ParseIP("2601:645:8002:a500:986f:1db8:c836:bd65"),
-			want: policyTableEntry{
-				Prefix:     &IPNet{IP: ParseIP("::"), Mask: CIDRMask(0, 128)},
-				Precedence: 40,
-				Label:      1,
-			},
-		},
-		{
-			ip: ParseIP("::1"),
-			want: policyTableEntry{
-				Prefix:     &IPNet{IP: ParseIP("::1"), Mask: CIDRMask(128, 128)},
-				Precedence: 50,
-				Label:      0,
-			},
-		},
-		{
-			ip: ParseIP("2002::ab12"),
-			want: policyTableEntry{
-				Prefix:     &IPNet{IP: ParseIP("2002::"), Mask: CIDRMask(16, 128)},
-				Precedence: 30,
-				Label:      2,
-			},
-		},
-	}
-	for i, tt := range tests {
-		got := rfc6724policyTable.Classify(tt.ip)
-		if !reflect.DeepEqual(got, tt.want) {
-			t.Errorf("%d. Classify(%s) = %v; want %v", i, tt.ip, got, tt.want)
-		}
-	}
-}
-
-func TestRFC6724ClassifyScope(t *testing.T) {
-	tests := []struct {
-		ip   IP
-		want scope
-	}{
-		{ParseIP("127.0.0.1"), scopeLinkLocal},   // rfc6724#section-3.2
-		{ParseIP("::1"), scopeLinkLocal},         // rfc4007#section-4
-		{ParseIP("169.254.1.2"), scopeLinkLocal}, // rfc6724#section-3.2
-		{ParseIP("fec0::1"), scopeSiteLocal},
-		{ParseIP("8.8.8.8"), scopeGlobal},
-
-		{ParseIP("ff02::"), scopeLinkLocal},  // IPv6 multicast
-		{ParseIP("ff05::"), scopeSiteLocal},  // IPv6 multicast
-		{ParseIP("ff04::"), scopeAdminLocal}, // IPv6 multicast
-		{ParseIP("ff0e::"), scopeGlobal},     // IPv6 multicast
-
-		{IPv4(0xe0, 0, 0, 0), scopeGlobal},       // IPv4 link-local multicast as 16 bytes
-		{IPv4(0xe0, 2, 2, 2), scopeGlobal},       // IPv4 global multicast as 16 bytes
-		{IPv4(0xe0, 0, 0, 0).To4(), scopeGlobal}, // IPv4 link-local multicast as 4 bytes
-		{IPv4(0xe0, 2, 2, 2).To4(), scopeGlobal}, // IPv4 global multicast as 4 bytes
-	}
-	for i, tt := range tests {
-		got := classifyScope(tt.ip)
-		if got != tt.want {
-			t.Errorf("%d. classifyScope(%s) = %x; want %x", i, tt.ip, got, tt.want)
-		}
-	}
-}
-
-func TestRFC6724CommonPrefixLength(t *testing.T) {
-	tests := []struct {
-		a, b IP
-		want int
-	}{
-		{ParseIP("fe80::1"), ParseIP("fe80::2"), 64},
-		{ParseIP("fe81::1"), ParseIP("fe80::2"), 15},
-		{ParseIP("127.0.0.1"), ParseIP("fe80::1"), 0}, // diff size
-		{IPv4(1, 2, 3, 4), IP{1, 2, 3, 4}, 32},
-		{IP{1, 2, 255, 255}, IP{1, 2, 0, 0}, 16},
-		{IP{1, 2, 127, 255}, IP{1, 2, 0, 0}, 17},
-		{IP{1, 2, 63, 255}, IP{1, 2, 0, 0}, 18},
-		{IP{1, 2, 31, 255}, IP{1, 2, 0, 0}, 19},
-		{IP{1, 2, 15, 255}, IP{1, 2, 0, 0}, 20},
-		{IP{1, 2, 7, 255}, IP{1, 2, 0, 0}, 21},
-		{IP{1, 2, 3, 255}, IP{1, 2, 0, 0}, 22},
-		{IP{1, 2, 1, 255}, IP{1, 2, 0, 0}, 23},
-		{IP{1, 2, 0, 255}, IP{1, 2, 0, 0}, 24},
-	}
-	for i, tt := range tests {
-		got := commonPrefixLen(tt.a, tt.b)
-		if got != tt.want {
-			t.Errorf("%d. commonPrefixLen(%s, %s) = %d; want %d", i, tt.a, tt.b, got, tt.want)
-		}
-	}
-
-}
diff --git a/src/net/cgo_resnew.go b/src/net/cgo_resnew.go
deleted file mode 100644
index 3e3e77e..0000000
--- a/src/net/cgo_resnew.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build cgo,!netgo
-// +build darwin linux,!android netbsd solaris
-
-package net
-
-/*
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <netdb.h>
-*/
-import "C"
-
-import "unsafe"
-
-func cgoNameinfoPTR(b []byte, sa *C.struct_sockaddr, salen C.socklen_t) (int, error) {
-	gerrno, err := C.getnameinfo(sa, salen, (*C.char)(unsafe.Pointer(&b[0])), C.socklen_t(len(b)), nil, 0, C.NI_NAMEREQD)
-	return int(gerrno), err
-}
diff --git a/src/net/cgo_resold.go b/src/net/cgo_resold.go
deleted file mode 100644
index abd04a8..0000000
--- a/src/net/cgo_resold.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build cgo,!netgo
-// +build android freebsd dragonfly openbsd
-
-package net
-
-/*
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <netdb.h>
-*/
-import "C"
-
-import "unsafe"
-
-func cgoNameinfoPTR(b []byte, sa *C.struct_sockaddr, salen C.socklen_t) (int, error) {
-	gerrno, err := C.getnameinfo(sa, salen, (*C.char)(unsafe.Pointer(&b[0])), C.size_t(len(b)), nil, 0, C.NI_NAMEREQD)
-	return int(gerrno), err
-}
diff --git a/src/net/cgo_socknew.go b/src/net/cgo_socknew.go
deleted file mode 100644
index b508284..0000000
--- a/src/net/cgo_socknew.go
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build cgo,!netgo
-// +build android linux solaris
-
-package net
-
-/*
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-*/
-import "C"
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-func cgoSockaddrInet4(ip IP) *C.struct_sockaddr {
-	sa := syscall.RawSockaddrInet4{Family: syscall.AF_INET}
-	copy(sa.Addr[:], ip)
-	return (*C.struct_sockaddr)(unsafe.Pointer(&sa))
-}
-
-func cgoSockaddrInet6(ip IP) *C.struct_sockaddr {
-	sa := syscall.RawSockaddrInet6{Family: syscall.AF_INET6}
-	copy(sa.Addr[:], ip)
-	return (*C.struct_sockaddr)(unsafe.Pointer(&sa))
-}
diff --git a/src/net/cgo_sockold.go b/src/net/cgo_sockold.go
deleted file mode 100644
index 522e8e5..0000000
--- a/src/net/cgo_sockold.go
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build cgo,!netgo
-// +build darwin dragonfly freebsd netbsd openbsd
-
-package net
-
-/*
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-*/
-import "C"
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-func cgoSockaddrInet4(ip IP) *C.struct_sockaddr {
-	sa := syscall.RawSockaddrInet4{Len: syscall.SizeofSockaddrInet4, Family: syscall.AF_INET}
-	copy(sa.Addr[:], ip)
-	return (*C.struct_sockaddr)(unsafe.Pointer(&sa))
-}
-
-func cgoSockaddrInet6(ip IP) *C.struct_sockaddr {
-	sa := syscall.RawSockaddrInet6{Len: syscall.SizeofSockaddrInet6, Family: syscall.AF_INET6}
-	copy(sa.Addr[:], ip)
-	return (*C.struct_sockaddr)(unsafe.Pointer(&sa))
-}
diff --git a/src/net/cgo_solaris.go b/src/net/cgo_solaris.go
deleted file mode 100644
index 2d452b9..0000000
--- a/src/net/cgo_solaris.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build cgo,!netgo
-
-package net
-
-/*
-#cgo LDFLAGS: -lsocket -lnsl
-#include <netdb.h>
-*/
-import "C"
-
-const cgoAddrInfoFlags = C.AI_CANONNAME | C.AI_V4MAPPED | C.AI_ALL
diff --git a/src/net/cgo_windows.go b/src/net/cgo_windows.go
deleted file mode 100644
index 8968b75..0000000
--- a/src/net/cgo_windows.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build cgo,!netgo
-
-package net
-
-type addrinfoErrno int
-
-func (eai addrinfoErrno) Error() string   { return "<nil>" }
-func (eai addrinfoErrno) Temporary() bool { return false }
-func (eai addrinfoErrno) Timeout() bool   { return false }
diff --git a/src/net/conf.go b/src/net/conf.go
deleted file mode 100644
index c92e579..0000000
--- a/src/net/conf.go
+++ /dev/null
@@ -1,308 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package net
-
-import (
-	"os"
-	"runtime"
-	"strconv"
-	"sync"
-	"syscall"
-)
-
-// conf represents a system's network configuration.
-type conf struct {
-	// forceCgoLookupHost forces CGO to always be used, if available.
-	forceCgoLookupHost bool
-
-	netGo  bool // go DNS resolution forced
-	netCgo bool // cgo DNS resolution forced
-
-	// machine has an /etc/mdns.allow file
-	hasMDNSAllow bool
-
-	goos          string // the runtime.GOOS, to ease testing
-	dnsDebugLevel int
-
-	nss    *nssConf
-	resolv *dnsConfig
-}
-
-var (
-	confOnce sync.Once // guards init of confVal via initConfVal
-	confVal  = &conf{goos: runtime.GOOS}
-)
-
-// systemConf returns the machine's network configuration.
-func systemConf() *conf {
-	confOnce.Do(initConfVal)
-	return confVal
-}
-
-func initConfVal() {
-	dnsMode, debugLevel := goDebugNetDNS()
-	confVal.dnsDebugLevel = debugLevel
-	confVal.netGo = netGo || dnsMode == "go"
-	confVal.netCgo = netCgo || dnsMode == "cgo"
-
-	if confVal.dnsDebugLevel > 0 {
-		defer func() {
-			switch {
-			case confVal.netGo:
-				if netGo {
-					println("go package net: built with netgo build tag; using Go's DNS resolver")
-				} else {
-					println("go package net: GODEBUG setting forcing use of Go's resolver")
-				}
-			case confVal.forceCgoLookupHost:
-				println("go package net: using cgo DNS resolver")
-			default:
-				println("go package net: dynamic selection of DNS resolver")
-			}
-		}()
-	}
-
-	// Darwin pops up annoying dialog boxes if programs try to do
-	// their own DNS requests. So always use cgo instead, which
-	// avoids that.
-	if runtime.GOOS == "darwin" {
-		confVal.forceCgoLookupHost = true
-		return
-	}
-
-	// If any environment-specified resolver options are specified,
-	// force cgo. Note that LOCALDOMAIN can change behavior merely
-	// by being specified with the empty string.
-	_, localDomainDefined := syscall.Getenv("LOCALDOMAIN")
-	if os.Getenv("RES_OPTIONS") != "" ||
-		os.Getenv("HOSTALIASES") != "" ||
-		confVal.netCgo ||
-		localDomainDefined {
-		confVal.forceCgoLookupHost = true
-		return
-	}
-
-	// OpenBSD apparently lets you override the location of resolv.conf
-	// with ASR_CONFIG. If we notice that, defer to libc.
-	if runtime.GOOS == "openbsd" && os.Getenv("ASR_CONFIG") != "" {
-		confVal.forceCgoLookupHost = true
-		return
-	}
-
-	if runtime.GOOS != "openbsd" {
-		confVal.nss = parseNSSConfFile("/etc/nsswitch.conf")
-	}
-
-	confVal.resolv = dnsReadConfig("/etc/resolv.conf")
-	if confVal.resolv.err != nil && !os.IsNotExist(confVal.resolv.err) &&
-		!os.IsPermission(confVal.resolv.err) {
-		// If we can't read the resolv.conf file, assume it
-		// had something important in it and defer to cgo.
-		// libc's resolver might then fail too, but at least
-		// it wasn't our fault.
-		confVal.forceCgoLookupHost = true
-	}
-
-	if _, err := os.Stat("/etc/mdns.allow"); err == nil {
-		confVal.hasMDNSAllow = true
-	}
-}
-
-// canUseCgo reports whether calling cgo functions is allowed
-// for non-hostname lookups.
-func (c *conf) canUseCgo() bool {
-	return c.hostLookupOrder("") == hostLookupCgo
-}
-
-// hostLookupOrder determines which strategy to use to resolve hostname.
-func (c *conf) hostLookupOrder(hostname string) (ret hostLookupOrder) {
-	if c.dnsDebugLevel > 1 {
-		defer func() {
-			print("go package net: hostLookupOrder(", hostname, ") = ", ret.String(), "\n")
-		}()
-	}
-	if c.netGo {
-		return hostLookupFilesDNS
-	}
-	if c.forceCgoLookupHost || c.resolv.unknownOpt || c.goos == "android" {
-		return hostLookupCgo
-	}
-	if byteIndex(hostname, '\\') != -1 || byteIndex(hostname, '%') != -1 {
-		// Don't deal with special form hostnames with backslashes
-		// or '%'.
-		return hostLookupCgo
-	}
-
-	// OpenBSD is unique and doesn't use nsswitch.conf.
-	// It also doesn't support mDNS.
-	if c.goos == "openbsd" {
-		// OpenBSD's resolv.conf manpage says that a non-existent
-		// resolv.conf means "lookup" defaults to only "files",
-		// without DNS lookups.
-		if os.IsNotExist(c.resolv.err) {
-			return hostLookupFiles
-		}
-		lookup := c.resolv.lookup
-		if len(lookup) == 0 {
-			// http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man5/resolv.conf.5
-			// "If the lookup keyword is not used in the
-			// system's resolv.conf file then the assumed
-			// order is 'bind file'"
-			return hostLookupDNSFiles
-		}
-		if len(lookup) < 1 || len(lookup) > 2 {
-			return hostLookupCgo
-		}
-		switch lookup[0] {
-		case "bind":
-			if len(lookup) == 2 {
-				if lookup[1] == "file" {
-					return hostLookupDNSFiles
-				}
-				return hostLookupCgo
-			}
-			return hostLookupDNS
-		case "file":
-			if len(lookup) == 2 {
-				if lookup[1] == "bind" {
-					return hostLookupFilesDNS
-				}
-				return hostLookupCgo
-			}
-			return hostLookupFiles
-		default:
-			return hostLookupCgo
-		}
-	}
-
-	hasDot := byteIndex(hostname, '.') != -1
-
-	// Canonicalize the hostname by removing any trailing dot.
-	if stringsHasSuffix(hostname, ".") {
-		hostname = hostname[:len(hostname)-1]
-	}
-	if stringsHasSuffixFold(hostname, ".local") {
-		// Per RFC 6762, the ".local" TLD is special.  And
-		// because Go's native resolver doesn't do mDNS or
-		// similar local resolution mechanisms, assume that
-		// libc might (via Avahi, etc) and use cgo.
-		return hostLookupCgo
-	}
-
-	nss := c.nss
-	srcs := nss.sources["hosts"]
-	// If /etc/nsswitch.conf doesn't exist or doesn't specify any
-	// sources for "hosts", assume Go's DNS will work fine.
-	if os.IsNotExist(nss.err) || (nss.err == nil && len(srcs) == 0) {
-		if c.goos == "solaris" {
-			// illumos defaults to "nis [NOTFOUND=return] files"
-			return hostLookupCgo
-		}
-		if c.goos == "linux" {
-			// glibc says the default is "dns [!UNAVAIL=return] files"
-			// http://www.gnu.org/software/libc/manual/html_node/Notes-on-NSS-Configuration-File.html.
-			return hostLookupDNSFiles
-		}
-		return hostLookupFilesDNS
-	}
-	if nss.err != nil {
-		// We failed to parse or open nsswitch.conf, so
-		// conservatively assume we should use cgo if it's
-		// available.
-		return hostLookupCgo
-	}
-
-	var mdnsSource, filesSource, dnsSource bool
-	var first string
-	for _, src := range srcs {
-		if src.source == "myhostname" {
-			if hasDot {
-				continue
-			}
-			return hostLookupCgo
-		}
-		if src.source == "files" || src.source == "dns" {
-			if !src.standardCriteria() {
-				return hostLookupCgo // non-standard; let libc deal with it.
-			}
-			if src.source == "files" {
-				filesSource = true
-			} else if src.source == "dns" {
-				dnsSource = true
-			}
-			if first == "" {
-				first = src.source
-			}
-			continue
-		}
-		if stringsHasPrefix(src.source, "mdns") {
-			// e.g. "mdns4", "mdns4_minimal"
-			// We already returned true before if it was *.local.
-			// libc wouldn't have found a hit on this anyway.
-			mdnsSource = true
-			continue
-		}
-		// Some source we don't know how to deal with.
-		return hostLookupCgo
-	}
-
-	// We don't parse mdns.allow files. They're rare. If one
-	// exists, it might list other TLDs (besides .local) or even
-	// '*', so just let libc deal with it.
-	if mdnsSource && c.hasMDNSAllow {
-		return hostLookupCgo
-	}
-
-	// Cases where Go can handle it without cgo and C thread
-	// overhead.
-	switch {
-	case filesSource && dnsSource:
-		if first == "files" {
-			return hostLookupFilesDNS
-		} else {
-			return hostLookupDNSFiles
-		}
-	case filesSource:
-		return hostLookupFiles
-	case dnsSource:
-		return hostLookupDNS
-	}
-
-	// Something weird. Let libc deal with it.
-	return hostLookupCgo
-}
-
-// goDebugNetDNS parses the value of the GODEBUG "netdns" value.
-// The netdns value can be of the form:
-//    1       // debug level 1
-//    2       // debug level 2
-//    cgo     // use cgo for DNS lookups
-//    go      // use go for DNS lookups
-//    cgo+1   // use cgo for DNS lookups + debug level 1
-//    1+cgo   // same
-//    cgo+2   // same, but debug level 2
-// etc.
-func goDebugNetDNS() (dnsMode string, debugLevel int) {
-	goDebug := goDebugString("netdns")
-	parsePart := func(s string) {
-		if s == "" {
-			return
-		}
-		if '0' <= s[0] && s[0] <= '9' {
-			debugLevel, _ = strconv.Atoi(s)
-		} else {
-			dnsMode = s
-		}
-	}
-	if i := byteIndex(goDebug, '+'); i != -1 {
-		parsePart(goDebug[:i])
-		parsePart(goDebug[i+1:])
-		return
-	}
-	parsePart(goDebug)
-	return
-}
diff --git a/src/net/conf_netcgo.go b/src/net/conf_netcgo.go
deleted file mode 100644
index 678361f..0000000
--- a/src/net/conf_netcgo.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build netcgo
-
-package net
-
-/*
-
-// Fail if cgo isn't available.
-
-*/
-import "C"
-
-// The build tag "netcgo" forces use of the cgo DNS resolver.
-// It is the opposite of "netgo".
-func init() { netCgo = true }
diff --git a/src/net/conf_test.go b/src/net/conf_test.go
deleted file mode 100644
index 86904bf..0000000
--- a/src/net/conf_test.go
+++ /dev/null
@@ -1,301 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package net
-
-import (
-	"os"
-	"strings"
-	"testing"
-)
-
-type nssHostTest struct {
-	host string
-	want hostLookupOrder
-}
-
-func nssStr(s string) *nssConf { return parseNSSConf(strings.NewReader(s)) }
-
-// represents a dnsConfig returned by parsing a nonexistent resolv.conf
-var defaultResolvConf = &dnsConfig{
-	servers:  defaultNS,
-	ndots:    1,
-	timeout:  5,
-	attempts: 2,
-	err:      os.ErrNotExist,
-}
-
-func TestConfHostLookupOrder(t *testing.T) {
-	tests := []struct {
-		name      string
-		c         *conf
-		goos      string
-		hostTests []nssHostTest
-	}{
-		{
-			name: "force",
-			c: &conf{
-				forceCgoLookupHost: true,
-				nss:                nssStr("foo: bar"),
-				resolv:             defaultResolvConf,
-			},
-			hostTests: []nssHostTest{
-				{"foo.local", hostLookupCgo},
-				{"google.com", hostLookupCgo},
-			},
-		},
-		{
-			name: "ubuntu_trusty_avahi",
-			c: &conf{
-				nss:    nssStr("hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4"),
-				resolv: defaultResolvConf,
-			},
-			hostTests: []nssHostTest{
-				{"foo.local", hostLookupCgo},
-				{"foo.local.", hostLookupCgo},
-				{"foo.LOCAL", hostLookupCgo},
-				{"foo.LOCAL.", hostLookupCgo},
-				{"google.com", hostLookupFilesDNS},
-			},
-		},
-		{
-			name: "freebsdlinux_no_resolv_conf",
-			c: &conf{
-				goos:   "freebsd",
-				nss:    nssStr("foo: bar"),
-				resolv: defaultResolvConf,
-			},
-			hostTests: []nssHostTest{{"google.com", hostLookupFilesDNS}},
-		},
-		// On OpenBSD, no resolv.conf means no DNS.
-		{
-			name: "openbsd_no_resolv_conf",
-			c: &conf{
-				goos:   "openbsd",
-				resolv: defaultResolvConf,
-			},
-			hostTests: []nssHostTest{{"google.com", hostLookupFiles}},
-		},
-		{
-			name: "solaris_no_nsswitch",
-			c: &conf{
-				goos:   "solaris",
-				nss:    &nssConf{err: os.ErrNotExist},
-				resolv: defaultResolvConf,
-			},
-			hostTests: []nssHostTest{{"google.com", hostLookupCgo}},
-		},
-		{
-			name: "openbsd_lookup_bind_file",
-			c: &conf{
-				goos:   "openbsd",
-				resolv: &dnsConfig{lookup: []string{"bind", "file"}},
-			},
-			hostTests: []nssHostTest{
-				{"google.com", hostLookupDNSFiles},
-				{"foo.local", hostLookupDNSFiles},
-			},
-		},
-		{
-			name: "openbsd_lookup_file_bind",
-			c: &conf{
-				goos:   "openbsd",
-				resolv: &dnsConfig{lookup: []string{"file", "bind"}},
-			},
-			hostTests: []nssHostTest{{"google.com", hostLookupFilesDNS}},
-		},
-		{
-			name: "openbsd_lookup_bind",
-			c: &conf{
-				goos:   "openbsd",
-				resolv: &dnsConfig{lookup: []string{"bind"}},
-			},
-			hostTests: []nssHostTest{{"google.com", hostLookupDNS}},
-		},
-		{
-			name: "openbsd_lookup_file",
-			c: &conf{
-				goos:   "openbsd",
-				resolv: &dnsConfig{lookup: []string{"file"}},
-			},
-			hostTests: []nssHostTest{{"google.com", hostLookupFiles}},
-		},
-		{
-			name: "openbsd_lookup_yp",
-			c: &conf{
-				goos:   "openbsd",
-				resolv: &dnsConfig{lookup: []string{"file", "bind", "yp"}},
-			},
-			hostTests: []nssHostTest{{"google.com", hostLookupCgo}},
-		},
-		{
-			name: "openbsd_lookup_two",
-			c: &conf{
-				goos:   "openbsd",
-				resolv: &dnsConfig{lookup: []string{"file", "foo"}},
-			},
-			hostTests: []nssHostTest{{"google.com", hostLookupCgo}},
-		},
-		{
-			name: "openbsd_lookup_empty",
-			c: &conf{
-				goos:   "openbsd",
-				resolv: &dnsConfig{lookup: nil},
-			},
-			hostTests: []nssHostTest{{"google.com", hostLookupDNSFiles}},
-		},
-		// glibc lacking an nsswitch.conf, per
-		// http://www.gnu.org/software/libc/manual/html_node/Notes-on-NSS-Configuration-File.html
-		{
-			name: "linux_no_nsswitch.conf",
-			c: &conf{
-				goos:   "linux",
-				nss:    &nssConf{err: os.ErrNotExist},
-				resolv: defaultResolvConf,
-			},
-			hostTests: []nssHostTest{{"google.com", hostLookupDNSFiles}},
-		},
-		{
-			name: "files_mdns_dns",
-			c: &conf{
-				nss:    nssStr("hosts: files mdns dns"),
-				resolv: defaultResolvConf,
-			},
-			hostTests: []nssHostTest{
-				{"x.com", hostLookupFilesDNS},
-				{"x.local", hostLookupCgo},
-			},
-		},
-		{
-			name: "dns_special_hostnames",
-			c: &conf{
-				nss:    nssStr("hosts: dns"),
-				resolv: defaultResolvConf,
-			},
-			hostTests: []nssHostTest{
-				{"x.com", hostLookupDNS},
-				{"x\\.com", hostLookupCgo},     // punt on weird glibc escape
-				{"foo.com%en0", hostLookupCgo}, // and IPv6 zones
-			},
-		},
-		{
-			name: "mdns_allow",
-			c: &conf{
-				nss:          nssStr("hosts: files mdns dns"),
-				resolv:       defaultResolvConf,
-				hasMDNSAllow: true,
-			},
-			hostTests: []nssHostTest{
-				{"x.com", hostLookupCgo},
-				{"x.local", hostLookupCgo},
-			},
-		},
-		{
-			name: "files_dns",
-			c: &conf{
-				nss:    nssStr("hosts: files dns"),
-				resolv: defaultResolvConf,
-			},
-			hostTests: []nssHostTest{
-				{"x.com", hostLookupFilesDNS},
-				{"x", hostLookupFilesDNS},
-				{"x.local", hostLookupCgo},
-			},
-		},
-		{
-			name: "dns_files",
-			c: &conf{
-				nss:    nssStr("hosts: dns files"),
-				resolv: defaultResolvConf,
-			},
-			hostTests: []nssHostTest{
-				{"x.com", hostLookupDNSFiles},
-				{"x", hostLookupDNSFiles},
-				{"x.local", hostLookupCgo},
-			},
-		},
-		{
-			name: "something_custom",
-			c: &conf{
-				nss:    nssStr("hosts: dns files something_custom"),
-				resolv: defaultResolvConf,
-			},
-			hostTests: []nssHostTest{
-				{"x.com", hostLookupCgo},
-			},
-		},
-		{
-			name: "myhostname",
-			c: &conf{
-				nss:    nssStr("hosts: files dns myhostname"),
-				resolv: defaultResolvConf,
-			},
-			hostTests: []nssHostTest{
-				{"x.com", hostLookupFilesDNS},
-				{"somehostname", hostLookupCgo},
-			},
-		},
-		{
-			name: "ubuntu14.04.02",
-			c: &conf{
-				nss:    nssStr("hosts: files myhostname mdns4_minimal [NOTFOUND=return] dns mdns4"),
-				resolv: defaultResolvConf,
-			},
-			hostTests: []nssHostTest{
-				{"x.com", hostLookupFilesDNS},
-				{"somehostname", hostLookupCgo},
-			},
-		},
-		// Debian Squeeze is just "dns,files", but lists all
-		// the default criteria for dns, but then has a
-		// non-standard but redundant notfound=return for the
-		// files.
-		{
-			name: "debian_squeeze",
-			c: &conf{
-				nss:    nssStr("hosts: dns [success=return notfound=continue unavail=continue tryagain=continue] files [notfound=return]"),
-				resolv: defaultResolvConf,
-			},
-			hostTests: []nssHostTest{
-				{"x.com", hostLookupDNSFiles},
-				{"somehostname", hostLookupDNSFiles},
-			},
-		},
-		{
-			name: "resolv.conf-unknown",
-			c: &conf{
-				nss:    nssStr("foo: bar"),
-				resolv: &dnsConfig{servers: defaultNS, ndots: 1, timeout: 5, attempts: 2, unknownOpt: true},
-			},
-			hostTests: []nssHostTest{{"google.com", hostLookupCgo}},
-		},
-		// Android should always use cgo.
-		{
-			name: "android",
-			c: &conf{
-				goos:   "android",
-				nss:    nssStr(""),
-				resolv: defaultResolvConf,
-			},
-			hostTests: []nssHostTest{
-				{"x.com", hostLookupCgo},
-			},
-		},
-	}
-	for _, tt := range tests {
-		for _, ht := range tt.hostTests {
-			gotOrder := tt.c.hostLookupOrder(ht.host)
-			if gotOrder != ht.want {
-				t.Errorf("%s: hostLookupOrder(%q) = %v; want %v", tt.name, ht.host, gotOrder, ht.want)
-			}
-		}
-	}
-
-}
-
-func TestSystemConf(t *testing.T) {
-	systemConf()
-}
diff --git a/src/net/error_plan9_test.go b/src/net/error_plan9_test.go
deleted file mode 100644
index 495ea96..0000000
--- a/src/net/error_plan9_test.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package net
-
-import "syscall"
-
-var (
-	errTimedout       = syscall.ETIMEDOUT
-	errOpNotSupported = syscall.EPLAN9
-)
-
-func isPlatformError(err error) bool {
-	_, ok := err.(syscall.ErrorString)
-	return ok
-}
diff --git a/src/net/error_posix_test.go b/src/net/error_posix_test.go
deleted file mode 100644
index 981cc83..0000000
--- a/src/net/error_posix_test.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !plan9
-
-package net
-
-import (
-	"os"
-	"syscall"
-	"testing"
-)
-
-var (
-	errTimedout       = syscall.ETIMEDOUT
-	errOpNotSupported = syscall.EOPNOTSUPP
-)
-
-func isPlatformError(err error) bool {
-	_, ok := err.(syscall.Errno)
-	return ok
-}
-
-func TestSpuriousENOTAVAIL(t *testing.T) {
-	for _, tt := range []struct {
-		error
-		ok bool
-	}{
-		{syscall.EADDRNOTAVAIL, true},
-		{&os.SyscallError{Syscall: "syscall", Err: syscall.EADDRNOTAVAIL}, true},
-		{&OpError{Op: "op", Err: syscall.EADDRNOTAVAIL}, true},
-		{&OpError{Op: "op", Err: &os.SyscallError{Syscall: "syscall", Err: syscall.EADDRNOTAVAIL}}, true},
-
-		{syscall.EINVAL, false},
-		{&os.SyscallError{Syscall: "syscall", Err: syscall.EINVAL}, false},
-		{&OpError{Op: "op", Err: syscall.EINVAL}, false},
-		{&OpError{Op: "op", Err: &os.SyscallError{Syscall: "syscall", Err: syscall.EINVAL}}, false},
-	} {
-		if ok := spuriousENOTAVAIL(tt.error); ok != tt.ok {
-			t.Errorf("spuriousENOTAVAIL(%v) = %v; want %v", tt.error, ok, tt.ok)
-		}
-	}
-}
diff --git a/src/net/error_test.go b/src/net/error_test.go
deleted file mode 100644
index bf95ff6..0000000
--- a/src/net/error_test.go
+++ /dev/null
@@ -1,673 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package net
-
-import (
-	"fmt"
-	"io"
-	"io/ioutil"
-	"net/internal/socktest"
-	"os"
-	"runtime"
-	"testing"
-	"time"
-)
-
-func (e *OpError) isValid() error {
-	if e.Op == "" {
-		return fmt.Errorf("OpError.Op is empty: %v", e)
-	}
-	if e.Net == "" {
-		return fmt.Errorf("OpError.Net is empty: %v", e)
-	}
-	for _, addr := range []Addr{e.Source, e.Addr} {
-		switch addr := addr.(type) {
-		case nil:
-		case *TCPAddr:
-			if addr == nil {
-				return fmt.Errorf("OpError.Source or Addr is non-nil interface: %#v, %v", addr, e)
-			}
-		case *UDPAddr:
-			if addr == nil {
-				return fmt.Errorf("OpError.Source or Addr is non-nil interface: %#v, %v", addr, e)
-			}
-		case *IPAddr:
-			if addr == nil {
-				return fmt.Errorf("OpError.Source or Addr is non-nil interface: %#v, %v", addr, e)
-			}
-		case *IPNet:
-			if addr == nil {
-				return fmt.Errorf("OpError.Source or Addr is non-nil interface: %#v, %v", addr, e)
-			}
-		case *UnixAddr:
-			if addr == nil {
-				return fmt.Errorf("OpError.Source or Addr is non-nil interface: %#v, %v", addr, e)
-			}
-		case *pipeAddr:
-			if addr == nil {
-				return fmt.Errorf("OpError.Source or Addr is non-nil interface: %#v, %v", addr, e)
-			}
-		case fileAddr:
-			if addr == "" {
-				return fmt.Errorf("OpError.Source or Addr is empty: %#v, %v", addr, e)
-			}
-		default:
-			return fmt.Errorf("OpError.Source or Addr is unknown type: %T, %v", addr, e)
-		}
-	}
-	if e.Err == nil {
-		return fmt.Errorf("OpError.Err is empty: %v", e)
-	}
-	return nil
-}
-
-// parseDialError parses nestedErr and reports whether it is a valid
-// error value from Dial, Listen functions.
-// It returns nil when nestedErr is valid.
-func parseDialError(nestedErr error) error {
-	if nestedErr == nil {
-		return nil
-	}
-
-	switch err := nestedErr.(type) {
-	case *OpError:
-		if err := err.isValid(); err != nil {
-			return err
-		}
-		nestedErr = err.Err
-		goto second
-	}
-	return fmt.Errorf("unexpected type on 1st nested level: %T", nestedErr)
-
-second:
-	if isPlatformError(nestedErr) {
-		return nil
-	}
-	switch err := nestedErr.(type) {
-	case *AddrError, addrinfoErrno, *DNSError, InvalidAddrError, *ParseError, *timeoutError, UnknownNetworkError:
-		return nil
-	case *os.SyscallError:
-		nestedErr = err.Err
-		goto third
-	}
-	switch nestedErr {
-	case errClosing, errMissingAddress:
-		return nil
-	}
-	return fmt.Errorf("unexpected type on 2nd nested level: %T", nestedErr)
-
-third:
-	if isPlatformError(nestedErr) {
-		return nil
-	}
-	return fmt.Errorf("unexpected type on 3rd nested level: %T", nestedErr)
-}
-
-var dialErrorTests = []struct {
-	network, address string
-}{
-	{"foo", ""},
-	{"bar", "baz"},
-	{"datakit", "mh/astro/r70"},
-	{"tcp", ""},
-	{"tcp", "127.0.0.1:☺"},
-	{"tcp", "no-such-name:80"},
-	{"tcp", "mh/astro/r70:http"},
-
-	{"tcp", "127.0.0.1:0"},
-	{"udp", "127.0.0.1:0"},
-	{"ip:icmp", "127.0.0.1"},
-
-	{"unix", "/path/to/somewhere"},
-	{"unixgram", "/path/to/somewhere"},
-	{"unixpacket", "/path/to/somewhere"},
-}
-
-func TestDialError(t *testing.T) {
-	switch runtime.GOOS {
-	case "plan9":
-		t.Skipf("%s does not have full support of socktest", runtime.GOOS)
-	}
-
-	origTestHookLookupIP := testHookLookupIP
-	defer func() { testHookLookupIP = origTestHookLookupIP }()
-	testHookLookupIP = func(fn func(string) ([]IPAddr, error), host string) ([]IPAddr, error) {
-		return nil, &DNSError{Err: "dial error test", Name: "name", Server: "server", IsTimeout: true}
-	}
-	sw.Set(socktest.FilterConnect, func(so *socktest.Status) (socktest.AfterFilter, error) {
-		return nil, errOpNotSupported
-	})
-	defer sw.Set(socktest.FilterConnect, nil)
-
-	d := Dialer{Timeout: someTimeout}
-	for i, tt := range dialErrorTests {
-		c, err := d.Dial(tt.network, tt.address)
-		if err == nil {
-			t.Errorf("#%d: should fail; %s:%s->%s", i, tt.network, c.LocalAddr(), c.RemoteAddr())
-			c.Close()
-			continue
-		}
-		if c != nil {
-			t.Errorf("Dial returned non-nil interface %T(%v) with err != nil", c, c)
-		}
-		if err = parseDialError(err); err != nil {
-			t.Errorf("#%d: %v", i, err)
-			continue
-		}
-	}
-}
-
-func TestProtocolDialError(t *testing.T) {
-	switch runtime.GOOS {
-	case "nacl", "solaris":
-		t.Skipf("not supported on %s", runtime.GOOS)
-	}
-
-	for _, network := range []string{"tcp", "udp", "ip:4294967296", "unix", "unixpacket", "unixgram"} {
-		var err error
-		switch network {
-		case "tcp":
-			_, err = DialTCP(network, nil, &TCPAddr{Port: 1 << 16})
-		case "udp":
-			_, err = DialUDP(network, nil, &UDPAddr{Port: 1 << 16})
-		case "ip:4294967296":
-			_, err = DialIP(network, nil, nil)
-		case "unix", "unixpacket", "unixgram":
-			_, err = DialUnix(network, nil, &UnixAddr{Name: "//"})
-		}
-		if err == nil {
-			t.Errorf("%s: should fail", network)
-			continue
-		}
-		if err = parseDialError(err); err != nil {
-			t.Errorf("%s: %v", network, err)
-			continue
-		}
-	}
-}
-
-var listenErrorTests = []struct {
-	network, address string
-}{
-	{"foo", ""},
-	{"bar", "baz"},
-	{"datakit", "mh/astro/r70"},
-	{"tcp", "127.0.0.1:☺"},
-	{"tcp", "no-such-name:80"},
-	{"tcp", "mh/astro/r70:http"},
-
-	{"tcp", "127.0.0.1:0"},
-
-	{"unix", "/path/to/somewhere"},
-	{"unixpacket", "/path/to/somewhere"},
-}
-
-func TestListenError(t *testing.T) {
-	switch runtime.GOOS {
-	case "plan9":
-		t.Skipf("%s does not have full support of socktest", runtime.GOOS)
-	}
-
-	origTestHookLookupIP := testHookLookupIP
-	defer func() { testHookLookupIP = origTestHookLookupIP }()
-	testHookLookupIP = func(fn func(string) ([]IPAddr, error), host string) ([]IPAddr, error) {
-		return nil, &DNSError{Err: "listen error test", Name: "name", Server: "server", IsTimeout: true}
-	}
-	sw.Set(socktest.FilterListen, func(so *socktest.Status) (socktest.AfterFilter, error) {
-		return nil, errOpNotSupported
-	})
-	defer sw.Set(socktest.FilterListen, nil)
-
-	for i, tt := range listenErrorTests {
-		ln, err := Listen(tt.network, tt.address)
-		if err == nil {
-			t.Errorf("#%d: should fail; %s:%s->", i, tt.network, ln.Addr())
-			ln.Close()
-			continue
-		}
-		if ln != nil {
-			t.Errorf("Listen returned non-nil interface %T(%v) with err != nil", ln, ln)
-		}
-		if err = parseDialError(err); err != nil {
-			t.Errorf("#%d: %v", i, err)
-			continue
-		}
-	}
-}
-
-var listenPacketErrorTests = []struct {
-	network, address string
-}{
-	{"foo", ""},
-	{"bar", "baz"},
-	{"datakit", "mh/astro/r70"},
-	{"udp", "127.0.0.1:☺"},
-	{"udp", "no-such-name:80"},
-	{"udp", "mh/astro/r70:http"},
-}
-
-func TestListenPacketError(t *testing.T) {
-	switch runtime.GOOS {
-	case "plan9":
-		t.Skipf("%s does not have full support of socktest", runtime.GOOS)
-	}
-
-	origTestHookLookupIP := testHookLookupIP
-	defer func() { testHookLookupIP = origTestHookLookupIP }()
-	testHookLookupIP = func(fn func(string) ([]IPAddr, error), host string) ([]IPAddr, error) {
-		return nil, &DNSError{Err: "listen error test", Name: "name", Server: "server", IsTimeout: true}
-	}
-
-	for i, tt := range listenPacketErrorTests {
-		c, err := ListenPacket(tt.network, tt.address)
-		if err == nil {
-			t.Errorf("#%d: should fail; %s:%s->", i, tt.network, c.LocalAddr())
-			c.Close()
-			continue
-		}
-		if c != nil {
-			t.Errorf("ListenPacket returned non-nil interface %T(%v) with err != nil", c, c)
-		}
-		if err = parseDialError(err); err != nil {
-			t.Errorf("#%d: %v", i, err)
-			continue
-		}
-	}
-}
-
-func TestProtocolListenError(t *testing.T) {
-	switch runtime.GOOS {
-	case "nacl", "plan9":
-		t.Skipf("not supported on %s", runtime.GOOS)
-	}
-
-	for _, network := range []string{"tcp", "udp", "ip:4294967296", "unix", "unixpacket", "unixgram"} {
-		var err error
-		switch network {
-		case "tcp":
-			_, err = ListenTCP(network, &TCPAddr{Port: 1 << 16})
-		case "udp":
-			_, err = ListenUDP(network, &UDPAddr{Port: 1 << 16})
-		case "ip:4294967296":
-			_, err = ListenIP(network, nil)
-		case "unix", "unixpacket":
-			_, err = ListenUnix(network, &UnixAddr{Name: "//"})
-		case "unixgram":
-			_, err = ListenUnixgram(network, &UnixAddr{Name: "//"})
-		}
-		if err == nil {
-			t.Errorf("%s: should fail", network)
-			continue
-		}
-		if err = parseDialError(err); err != nil {
-			t.Errorf("%s: %v", network, err)
-			continue
-		}
-	}
-}
-
-// parseReadError parses nestedErr and reports whether it is a valid
-// error value from Read functions.
-// It returns nil when nestedErr is valid.
-func parseReadError(nestedErr error) error {
-	if nestedErr == nil {
-		return nil
-	}
-
-	switch err := nestedErr.(type) {
-	case *OpError:
-		if err := err.isValid(); err != nil {
-			return err
-		}
-		nestedErr = err.Err
-		goto second
-	}
-	if nestedErr == io.EOF {
-		return nil
-	}
-	return fmt.Errorf("unexpected type on 1st nested level: %T", nestedErr)
-
-second:
-	if isPlatformError(nestedErr) {
-		return nil
-	}
-	switch err := nestedErr.(type) {
-	case *os.SyscallError:
-		nestedErr = err.Err
-		goto third
-	}
-	switch nestedErr {
-	case errClosing, errTimeout:
-		return nil
-	}
-	return fmt.Errorf("unexpected type on 2nd nested level: %T", nestedErr)
-
-third:
-	if isPlatformError(nestedErr) {
-		return nil
-	}
-	return fmt.Errorf("unexpected type on 3rd nested level: %T", nestedErr)
-}
-
-// parseWriteError parses nestedErr and reports whether it is a valid
-// error value from Write functions.
-// It returns nil when nestedErr is valid.
-func parseWriteError(nestedErr error) error {
-	if nestedErr == nil {
-		return nil
-	}
-
-	switch err := nestedErr.(type) {
-	case *OpError:
-		if err := err.isValid(); err != nil {
-			return err
-		}
-		nestedErr = err.Err
-		goto second
-	}
-	return fmt.Errorf("unexpected type on 1st nested level: %T", nestedErr)
-
-second:
-	if isPlatformError(nestedErr) {
-		return nil
-	}
-	switch err := nestedErr.(type) {
-	case *AddrError, addrinfoErrno, *DNSError, InvalidAddrError, *ParseError, *timeoutError, UnknownNetworkError:
-		return nil
-	case *os.SyscallError:
-		nestedErr = err.Err
-		goto third
-	}
-	switch nestedErr {
-	case errClosing, errTimeout, ErrWriteToConnected, io.ErrUnexpectedEOF:
-		return nil
-	}
-	return fmt.Errorf("unexpected type on 2nd nested level: %T", nestedErr)
-
-third:
-	if isPlatformError(nestedErr) {
-		return nil
-	}
-	return fmt.Errorf("unexpected type on 3rd nested level: %T", nestedErr)
-}
-
-// parseCloseError parses nestedErr and reports whether it is a valid
-// error value from Close functions.
-// It returns nil when nestedErr is valid.
-func parseCloseError(nestedErr error) error {
-	if nestedErr == nil {
-		return nil
-	}
-
-	switch err := nestedErr.(type) {
-	case *OpError:
-		if err := err.isValid(); err != nil {
-			return err
-		}
-		nestedErr = err.Err
-		goto second
-	}
-	return fmt.Errorf("unexpected type on 1st nested level: %T", nestedErr)
-
-second:
-	if isPlatformError(nestedErr) {
-		return nil
-	}
-	switch err := nestedErr.(type) {
-	case *os.SyscallError:
-		nestedErr = err.Err
-		goto third
-	case *os.PathError: // for Plan 9
-		nestedErr = err.Err
-		goto third
-	}
-	switch nestedErr {
-	case errClosing:
-		return nil
-	}
-	return fmt.Errorf("unexpected type on 2nd nested level: %T", nestedErr)
-
-third:
-	if isPlatformError(nestedErr) {
-		return nil
-	}
-	return fmt.Errorf("unexpected type on 3rd nested level: %T", nestedErr)
-}
-
-func TestCloseError(t *testing.T) {
-	ln, err := newLocalListener("tcp")
-	if err != nil {
-		t.Fatal(err)
-	}
-	defer ln.Close()
-	c, err := Dial(ln.Addr().Network(), ln.Addr().String())
-	if err != nil {
-		t.Fatal(err)
-	}
-	defer c.Close()
-
-	for i := 0; i < 3; i++ {
-		err = c.(*TCPConn).CloseRead()
-		if perr := parseCloseError(err); perr != nil {
-			t.Errorf("#%d: %v", i, perr)
-		}
-	}
-	for i := 0; i < 3; i++ {
-		err = c.(*TCPConn).CloseWrite()
-		if perr := parseCloseError(err); perr != nil {
-			t.Errorf("#%d: %v", i, perr)
-		}
-	}
-	for i := 0; i < 3; i++ {
-		err = c.Close()
-		if perr := parseCloseError(err); perr != nil {
-			t.Errorf("#%d: %v", i, perr)
-		}
-		err = ln.Close()
-		if perr := parseCloseError(err); perr != nil {
-			t.Errorf("#%d: %v", i, perr)
-		}
-	}
-
-	pc, err := ListenPacket("udp", "127.0.0.1:0")
-	if err != nil {
-		t.Fatal(err)
-	}
-	defer pc.Close()
-
-	for i := 0; i < 3; i++ {
-		err = pc.Close()
-		if perr := parseCloseError(err); perr != nil {
-			t.Errorf("#%d: %v", i, perr)
-		}
-	}
-}
-
-// parseAcceptError parses nestedErr and reports whether it is a valid
-// error value from Accept functions.
-// It returns nil when nestedErr is valid.
-func parseAcceptError(nestedErr error) error {
-	if nestedErr == nil {
-		return nil
-	}
-
-	switch err := nestedErr.(type) {
-	case *OpError:
-		if err := err.isValid(); err != nil {
-			return err
-		}
-		nestedErr = err.Err
-		goto second
-	}
-	return fmt.Errorf("unexpected type on 1st nested level: %T", nestedErr)
-
-second:
-	if isPlatformError(nestedErr) {
-		return nil
-	}
-	switch err := nestedErr.(type) {
-	case *os.SyscallError:
-		nestedErr = err.Err
-		goto third
-	}
-	switch nestedErr {
-	case errClosing, errTimeout:
-		return nil
-	}
-	return fmt.Errorf("unexpected type on 2nd nested level: %T", nestedErr)
-
-third:
-	if isPlatformError(nestedErr) {
-		return nil
-	}
-	return fmt.Errorf("unexpected type on 3rd nested level: %T", nestedErr)
-}
-
-func TestAcceptError(t *testing.T) {
-	handler := func(ls *localServer, ln Listener) {
-		for {
-			ln.(*TCPListener).SetDeadline(time.Now().Add(5 * time.Millisecond))
-			c, err := ln.Accept()
-			if perr := parseAcceptError(err); perr != nil {
-				t.Error(perr)
-			}
-			if err != nil {
-				if c != nil {
-					t.Errorf("Accept returned non-nil interface %T(%v) with err != nil", c, c)
-				}
-				if nerr, ok := err.(Error); !ok || (!nerr.Timeout() && !nerr.Temporary()) {
-					return
-				}
-				continue
-			}
-			c.Close()
-		}
-	}
-	ls, err := newLocalServer("tcp")
-	if err != nil {
-		t.Fatal(err)
-	}
-	if err := ls.buildup(handler); err != nil {
-		ls.teardown()
-		t.Fatal(err)
-	}
-
-	time.Sleep(100 * time.Millisecond)
-	ls.teardown()
-}
-
-// parseCommonError parses nestedErr and reports whether it is a valid
-// error value from miscellaneous functions.
-// It returns nil when nestedErr is valid.
-func parseCommonError(nestedErr error) error {
-	if nestedErr == nil {
-		return nil
-	}
-
-	switch err := nestedErr.(type) {
-	case *OpError:
-		if err := err.isValid(); err != nil {
-			return err
-		}
-		nestedErr = err.Err
-		goto second
-	}
-	return fmt.Errorf("unexpected type on 1st nested level: %T", nestedErr)
-
-second:
-	if isPlatformError(nestedErr) {
-		return nil
-	}
-	switch err := nestedErr.(type) {
-	case *os.SyscallError:
-		nestedErr = err.Err
-		goto third
-	case *os.LinkError:
-		nestedErr = err.Err
-		goto third
-	case *os.PathError:
-		nestedErr = err.Err
-		goto third
-	}
-	switch nestedErr {
-	case errClosing:
-		return nil
-	}
-	return fmt.Errorf("unexpected type on 2nd nested level: %T", nestedErr)
-
-third:
-	if isPlatformError(nestedErr) {
-		return nil
-	}
-	return fmt.Errorf("unexpected type on 3rd nested level: %T", nestedErr)
-}
-
-func TestFileError(t *testing.T) {
-	switch runtime.GOOS {
-	case "windows":
-		t.Skipf("not supported on %s", runtime.GOOS)
-	}
-
-	f, err := ioutil.TempFile("", "go-nettest")
-	if err != nil {
-		t.Fatal(err)
-	}
-	defer os.Remove(f.Name())
-	defer f.Close()
-
-	c, err := FileConn(f)
-	if err != nil {
-		if c != nil {
-			t.Errorf("FileConn returned non-nil interface %T(%v) with err != nil", c, c)
-		}
-		if perr := parseCommonError(err); perr != nil {
-			t.Error(perr)
-		}
-	} else {
-		c.Close()
-		t.Error("should fail")
-	}
-	ln, err := FileListener(f)
-	if err != nil {
-		if ln != nil {
-			t.Errorf("FileListener returned non-nil interface %T(%v) with err != nil", ln, ln)
-		}
-		if perr := parseCommonError(err); perr != nil {
-			t.Error(perr)
-		}
-	} else {
-		ln.Close()
-		t.Error("should fail")
-	}
-	pc, err := FilePacketConn(f)
-	if err != nil {
-		if pc != nil {
-			t.Errorf("FilePacketConn returned non-nil interface %T(%v) with err != nil", pc, pc)
-		}
-		if perr := parseCommonError(err); perr != nil {
-			t.Error(perr)
-		}
-	} else {
-		pc.Close()
-		t.Error("should fail")
-	}
-
-	ln, err = newLocalListener("tcp")
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	for i := 0; i < 3; i++ {
-		f, err := ln.(*TCPListener).File()
-		if err != nil {
-			if perr := parseCommonError(err); perr != nil {
-				t.Error(perr)
-			}
-		} else {
-			f.Close()
-		}
-		ln.Close()
-	}
-}
diff --git a/src/net/external_test.go b/src/net/external_test.go
deleted file mode 100644
index d5ff2be..0000000
--- a/src/net/external_test.go
+++ /dev/null
@@ -1,167 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package net
-
-import (
-	"fmt"
-	"io"
-	"strings"
-	"testing"
-)
-
-func TestResolveGoogle(t *testing.T) {
-	if testing.Short() || !*testExternal {
-		t.Skip("avoid external network")
-	}
-	if !supportsIPv4 || !supportsIPv6 || !*testIPv4 || !*testIPv6 {
-		t.Skip("both IPv4 and IPv6 are required")
-	}
-
-	for _, network := range []string{"tcp", "tcp4", "tcp6"} {
-		addr, err := ResolveTCPAddr(network, "www.google.com:http")
-		if err != nil {
-			t.Error(err)
-			continue
-		}
-		switch {
-		case network == "tcp" && addr.IP.To4() == nil:
-			fallthrough
-		case network == "tcp4" && addr.IP.To4() == nil:
-			t.Errorf("got %v; want an IPv4 address on %s", addr, network)
-		case network == "tcp6" && (addr.IP.To16() == nil || addr.IP.To4() != nil):
-			t.Errorf("got %v; want an IPv6 address on %s", addr, network)
-		}
-	}
-}
-
-var dialGoogleTests = []struct {
-	dial               func(string, string) (Conn, error)
-	unreachableNetwork string
-	networks           []string
-	addrs              []string
-}{
-	{
-		dial:     (&Dialer{DualStack: true}).Dial,
-		networks: []string{"tcp", "tcp4", "tcp6"},
-		addrs:    []string{"www.google.com:http"},
-	},
-	{
-		dial:               Dial,
-		unreachableNetwork: "tcp6",
-		networks:           []string{"tcp", "tcp4"},
-	},
-	{
-		dial:               Dial,
-		unreachableNetwork: "tcp4",
-		networks:           []string{"tcp", "tcp6"},
-	},
-}
-
-func TestDialGoogle(t *testing.T) {
-	if testing.Short() || !*testExternal {
-		t.Skip("avoid external network")
-	}
-	if !supportsIPv4 || !supportsIPv6 || !*testIPv4 || !*testIPv6 {
-		t.Skip("both IPv4 and IPv6 are required")
-	}
-
-	var err error
-	dialGoogleTests[1].addrs, dialGoogleTests[2].addrs, err = googleLiteralAddrs()
-	if err != nil {
-		t.Error(err)
-	}
-	for _, tt := range dialGoogleTests {
-		for _, network := range tt.networks {
-			disableSocketConnect(tt.unreachableNetwork)
-			for _, addr := range tt.addrs {
-				if err := fetchGoogle(tt.dial, network, addr); err != nil {
-					t.Error(err)
-				}
-			}
-			enableSocketConnect()
-		}
-	}
-}
-
-var (
-	literalAddrs4 = [...]string{
-		"%d.%d.%d.%d:80",
-		"www.google.com:80",
-		"%d.%d.%d.%d:http",
-		"www.google.com:http",
-		"%03d.%03d.%03d.%03d:0080",
-		"[::ffff:%d.%d.%d.%d]:80",
-		"[::ffff:%02x%02x:%02x%02x]:80",
-		"[0:0:0:0:0000:ffff:%d.%d.%d.%d]:80",
-		"[0:0:0:0:000000:ffff:%d.%d.%d.%d]:80",
-		"[0:0:0:0::ffff:%d.%d.%d.%d]:80",
-	}
-	literalAddrs6 = [...]string{
-		"[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]:80",
-		"ipv6.google.com:80",
-		"[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]:http",
-		"ipv6.google.com:http",
-	}
-)
-
-func googleLiteralAddrs() (lits4, lits6 []string, err error) {
-	ips, err := LookupIP("www.google.com")
-	if err != nil {
-		return nil, nil, err
-	}
-	if len(ips) == 0 {
-		return nil, nil, nil
-	}
-	var ip4, ip6 IP
-	for _, ip := range ips {
-		if ip4 == nil && ip.To4() != nil {
-			ip4 = ip.To4()
-		}
-		if ip6 == nil && ip.To16() != nil && ip.To4() == nil {
-			ip6 = ip.To16()
-		}
-		if ip4 != nil && ip6 != nil {
-			break
-		}
-	}
-	if ip4 != nil {
-		for i, lit4 := range literalAddrs4 {
-			if strings.Contains(lit4, "%") {
-				literalAddrs4[i] = fmt.Sprintf(lit4, ip4[0], ip4[1], ip4[2], ip4[3])
-			}
-		}
-		lits4 = literalAddrs4[:]
-	}
-	if ip6 != nil {
-		for i, lit6 := range literalAddrs6 {
-			if strings.Contains(lit6, "%") {
-				literalAddrs6[i] = fmt.Sprintf(lit6, ip6[0], ip6[1], ip6[2], ip6[3], ip6[4], ip6[5], ip6[6], ip6[7], ip6[8], ip6[9], ip6[10], ip6[11], ip6[12], ip6[13], ip6[14], ip6[15])
-			}
-		}
-		lits6 = literalAddrs6[:]
-	}
-	return
-}
-
-func fetchGoogle(dial func(string, string) (Conn, error), network, address string) error {
-	c, err := dial(network, address)
-	if err != nil {
-		return err
-	}
-	defer c.Close()
-	req := []byte("GET /robots.txt HTTP/1.0\r\nHost: www.google.com\r\n\r\n")
-	if _, err := c.Write(req); err != nil {
-		return err
-	}
-	b := make([]byte, 1000)
-	n, err := io.ReadFull(c, b)
-	if err != nil {
-		return err
-	}
-	if n < 1000 {
-		return fmt.Errorf("short read from %s:%s->%s", network, c.RemoteAddr(), c.LocalAddr())
-	}
-	return nil
-}
diff --git a/src/net/fd_posix.go b/src/net/fd_posix.go
deleted file mode 100644
index b4b908a..0000000
--- a/src/net/fd_posix.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
-
-package net
-
-import (
-	"io"
-	"syscall"
-)
-
-// eofError returns io.EOF when fd is available for reading end of
-// file.
-func (fd *netFD) eofError(n int, err error) error {
-	if n == 0 && err == nil && fd.sotype != syscall.SOCK_DGRAM && fd.sotype != syscall.SOCK_RAW {
-		return io.EOF
-	}
-	return err
-}
diff --git a/src/net/fd_posix_test.go b/src/net/fd_posix_test.go
deleted file mode 100644
index 85711ef..0000000
--- a/src/net/fd_posix_test.go
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
-
-package net
-
-import (
-	"io"
-	"syscall"
-	"testing"
-)
-
-var eofErrorTests = []struct {
-	n        int
-	err      error
-	fd       *netFD
-	expected error
-}{
-	{100, nil, &netFD{sotype: syscall.SOCK_STREAM}, nil},
-	{100, io.EOF, &netFD{sotype: syscall.SOCK_STREAM}, io.EOF},
-	{100, errClosing, &netFD{sotype: syscall.SOCK_STREAM}, errClosing},
-	{0, nil, &netFD{sotype: syscall.SOCK_STREAM}, io.EOF},
-	{0, io.EOF, &netFD{sotype: syscall.SOCK_STREAM}, io.EOF},
-	{0, errClosing, &netFD{sotype: syscall.SOCK_STREAM}, errClosing},
-
-	{100, nil, &netFD{sotype: syscall.SOCK_DGRAM}, nil},
-	{100, io.EOF, &netFD{sotype: syscall.SOCK_DGRAM}, io.EOF},
-	{100, errClosing, &netFD{sotype: syscall.SOCK_DGRAM}, errClosing},
-	{0, nil, &netFD{sotype: syscall.SOCK_DGRAM}, nil},
-	{0, io.EOF, &netFD{sotype: syscall.SOCK_DGRAM}, io.EOF},
-	{0, errClosing, &netFD{sotype: syscall.SOCK_DGRAM}, errClosing},
-
-	{100, nil, &netFD{sotype: syscall.SOCK_SEQPACKET}, nil},
-	{100, io.EOF, &netFD{sotype: syscall.SOCK_SEQPACKET}, io.EOF},
-	{100, errClosing, &netFD{sotype: syscall.SOCK_SEQPACKET}, errClosing},
-	{0, nil, &netFD{sotype: syscall.SOCK_SEQPACKET}, io.EOF},
-	{0, io.EOF, &netFD{sotype: syscall.SOCK_SEQPACKET}, io.EOF},
-	{0, errClosing, &netFD{sotype: syscall.SOCK_SEQPACKET}, errClosing},
-
-	{100, nil, &netFD{sotype: syscall.SOCK_RAW}, nil},
-	{100, io.EOF, &netFD{sotype: syscall.SOCK_RAW}, io.EOF},
-	{100, errClosing, &netFD{sotype: syscall.SOCK_RAW}, errClosing},
-	{0, nil, &netFD{sotype: syscall.SOCK_RAW}, nil},
-	{0, io.EOF, &netFD{sotype: syscall.SOCK_RAW}, io.EOF},
-	{0, errClosing, &netFD{sotype: syscall.SOCK_RAW}, errClosing},
-}
-
-func TestEOFError(t *testing.T) {
-	for _, tt := range eofErrorTests {
-		actual := tt.fd.eofError(tt.n, tt.err)
-		if actual != tt.expected {
-			t.Errorf("eofError(%v, %v, %v): expected %v, actual %v", tt.n, tt.err, tt.fd.sotype, tt.expected, actual)
-		}
-	}
-}
diff --git a/src/net/file.go b/src/net/file.go
deleted file mode 100644
index 1aad477..0000000
--- a/src/net/file.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package net
-
-import "os"
-
-type fileAddr string
-
-func (fileAddr) Network() string  { return "file+net" }
-func (f fileAddr) String() string { return string(f) }
-
-// FileConn returns a copy of the network connection corresponding to
-// the open file f.
-// It is the caller's responsibility to close f when finished.
-// Closing c does not affect f, and closing f does not affect c.
-func FileConn(f *os.File) (c Conn, err error) {
-	c, err = fileConn(f)
-	if err != nil {
-		err = &OpError{Op: "file", Net: "file+net", Source: nil, Addr: fileAddr(f.Name()), Err: err}
-	}
-	return
-}
-
-// FileListener returns a copy of the network listener corresponding
-// to the open file f.
-// It is the caller's responsibility to close ln when finished.
-// Closing ln does not affect f, and closing f does not affect ln.
-func FileListener(f *os.File) (ln Listener, err error) {
-	ln, err = fileListener(f)
-	if err != nil {
-		err = &OpError{Op: "file", Net: "file+net", Source: nil, Addr: fileAddr(f.Name()), Err: err}
-	}
-	return
-}
-
-// FilePacketConn returns a copy of the packet network connection
-// corresponding to the open file f.
-// It is the caller's responsibility to close f when finished.
-// Closing c does not affect f, and closing f does not affect c.
-func FilePacketConn(f *os.File) (c PacketConn, err error) {
-	c, err = filePacketConn(f)
-	if err != nil {
-		err = &OpError{Op: "file", Net: "file+net", Source: nil, Addr: fileAddr(f.Name()), Err: err}
-	}
-	return
-}
diff --git a/src/net/hook.go b/src/net/hook.go
deleted file mode 100644
index 9ab34c0..0000000
--- a/src/net/hook.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package net
-
-var (
-	testHookDialTCP      = dialTCP
-	testHookHostsPath    = "/etc/hosts"
-	testHookLookupIP     = func(fn func(string) ([]IPAddr, error), host string) ([]IPAddr, error) { return fn(host) }
-	testHookSetKeepAlive = func() {}
-)
diff --git a/src/net/hook_cloexec.go b/src/net/hook_cloexec.go
deleted file mode 100644
index 870f0d7..0000000
--- a/src/net/hook_cloexec.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build freebsd linux
-
-package net
-
-import "syscall"
-
-var (
-	// Placeholders for socket system calls.
-	accept4Func func(int, int) (int, syscall.Sockaddr, error) = syscall.Accept4
-)
diff --git a/src/net/hook_plan9.go b/src/net/hook_plan9.go
deleted file mode 100644
index e053348..0000000
--- a/src/net/hook_plan9.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package net
-
-import "time"
-
-var testHookDialChannel = func() { time.Sleep(time.Millisecond) } // see golang.org/issue/5349
diff --git a/src/net/hook_unix.go b/src/net/hook_unix.go
deleted file mode 100644
index 361ca59..0000000
--- a/src/net/hook_unix.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
-
-package net
-
-import "syscall"
-
-var (
-	testHookDialChannel = func() {} // see golang.org/issue/5349
-
-	// Placeholders for socket system calls.
-	socketFunc        func(int, int, int) (int, error)         = syscall.Socket
-	closeFunc         func(int) error                          = syscall.Close
-	connectFunc       func(int, syscall.Sockaddr) error        = syscall.Connect
-	listenFunc        func(int, int) error                     = syscall.Listen
-	acceptFunc        func(int) (int, syscall.Sockaddr, error) = syscall.Accept
-	getsockoptIntFunc func(int, int, int) (int, error)         = syscall.GetsockoptInt
-)
diff --git a/src/net/hook_windows.go b/src/net/hook_windows.go
deleted file mode 100644
index 126b0eb..0000000
--- a/src/net/hook_windows.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package net
-
-import (
-	"syscall"
-	"time"
-)
-
-var (
-	testHookDialChannel = func() { time.Sleep(time.Millisecond) } // see golang.org/issue/5349
-
-	// Placeholders for socket system calls.
-	socketFunc    func(int, int, int) (syscall.Handle, error)                                               = syscall.Socket
-	closeFunc     func(syscall.Handle) error                                                                = syscall.Closesocket
-	connectFunc   func(syscall.Handle, syscall.Sockaddr) error                                              = syscall.Connect
-	connectExFunc func(syscall.Handle, syscall.Sockaddr, *byte, uint32, *uint32, *syscall.Overlapped) error = syscall.ConnectEx
-	listenFunc    func(syscall.Handle, int) error                                                           = syscall.Listen
-)
diff --git a/src/net/http/http_test.go b/src/net/http/http_test.go
deleted file mode 100644
index dead3b0..0000000
--- a/src/net/http/http_test.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Tests of internal functions with no better homes.
-
-package http
-
-import (
-	"reflect"
-	"testing"
-)
-
-func TestForeachHeaderElement(t *testing.T) {
-	tests := []struct {
-		in   string
-		want []string
-	}{
-		{"Foo", []string{"Foo"}},
-		{" Foo", []string{"Foo"}},
-		{"Foo ", []string{"Foo"}},
-		{" Foo ", []string{"Foo"}},
-
-		{"foo", []string{"foo"}},
-		{"anY-cAsE", []string{"anY-cAsE"}},
-
-		{"", nil},
-		{",,,,  ,  ,,   ,,, ,", nil},
-
-		{" Foo,Bar, Baz,lower,,Quux ", []string{"Foo", "Bar", "Baz", "lower", "Quux"}},
-	}
-	for _, tt := range tests {
-		var got []string
-		foreachHeaderElement(tt.in, func(v string) {
-			got = append(got, v)
-		})
-		if !reflect.DeepEqual(got, tt.want) {
-			t.Errorf("foreachHeaderElement(%q) = %q; want %q", tt.in, got, tt.want)
-		}
-	}
-}
-
-func TestCleanHost(t *testing.T) {
-	tests := []struct {
-		in, want string
-	}{
-		{"www.google.com", "www.google.com"},
-		{"www.google.com foo", "www.google.com"},
-		{"www.google.com/foo", "www.google.com"},
-		{" first character is a space", ""},
-	}
-	for _, tt := range tests {
-		got := cleanHost(tt.in)
-		if tt.want != got {
-			t.Errorf("cleanHost(%q) = %q, want %q", tt.in, got, tt.want)
-		}
-	}
-}
diff --git a/src/net/internal/socktest/main_test.go b/src/net/internal/socktest/main_test.go
deleted file mode 100644
index 60e581f..0000000
--- a/src/net/internal/socktest/main_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !plan9
-
-package socktest_test
-
-import (
-	"net/internal/socktest"
-	"os"
-	"sync"
-	"syscall"
-	"testing"
-)
-
-var sw socktest.Switch
-
-func TestMain(m *testing.M) {
-	installTestHooks()
-
-	st := m.Run()
-
-	for s := range sw.Sockets() {
-		closeFunc(s)
-	}
-	uninstallTestHooks()
-	os.Exit(st)
-}
-
-func TestSwitch(t *testing.T) {
-	const N = 10
-	var wg sync.WaitGroup
-	wg.Add(N)
-	for i := 0; i < N; i++ {
-		go func() {
-			defer wg.Done()
-			for _, family := range []int{syscall.AF_INET, syscall.AF_INET6} {
-				socketFunc(family, syscall.SOCK_STREAM, syscall.IPPROTO_TCP)
-			}
-		}()
-	}
-	wg.Wait()
-}
-
-func TestSocket(t *testing.T) {
-	for _, f := range []socktest.Filter{
-		func(st *socktest.Status) (socktest.AfterFilter, error) { return nil, nil },
-		nil,
-	} {
-		sw.Set(socktest.FilterSocket, f)
-		for _, family := range []int{syscall.AF_INET, syscall.AF_INET6} {
-			socketFunc(family, syscall.SOCK_STREAM, syscall.IPPROTO_TCP)
-		}
-	}
-}
diff --git a/src/net/internal/socktest/main_unix_test.go b/src/net/internal/socktest/main_unix_test.go
deleted file mode 100644
index b8eebc2..0000000
--- a/src/net/internal/socktest/main_unix_test.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !plan9,!windows
-
-package socktest_test
-
-import "syscall"
-
-var (
-	socketFunc func(int, int, int) (int, error)
-	closeFunc  func(int) error
-)
-
-func installTestHooks() {
-	socketFunc = sw.Socket
-	closeFunc = sw.Close
-}
-
-func uninstallTestHooks() {
-	socketFunc = syscall.Socket
-	closeFunc = syscall.Close
-}
diff --git a/src/net/internal/socktest/main_windows_test.go b/src/net/internal/socktest/main_windows_test.go
deleted file mode 100644
index df1cb97..0000000
--- a/src/net/internal/socktest/main_windows_test.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package socktest_test
-
-import "syscall"
-
-var (
-	socketFunc func(int, int, int) (syscall.Handle, error)
-	closeFunc  func(syscall.Handle) error
-)
-
-func installTestHooks() {
-	socketFunc = sw.Socket
-	closeFunc = sw.Closesocket
-}
-
-func uninstallTestHooks() {
-	socketFunc = syscall.Socket
-	closeFunc = syscall.Closesocket
-}
diff --git a/src/net/internal/socktest/switch.go b/src/net/internal/socktest/switch.go
deleted file mode 100644
index 4e38c7a..0000000
--- a/src/net/internal/socktest/switch.go
+++ /dev/null
@@ -1,169 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package socktest provides utilities for socket testing.
-package socktest
-
-import (
-	"fmt"
-	"sync"
-)
-
-// A Switch represents a callpath point switch for socket system
-// calls.
-type Switch struct {
-	once sync.Once
-
-	fmu   sync.RWMutex
-	fltab map[FilterType]Filter
-
-	smu   sync.RWMutex
-	sotab Sockets
-	stats stats
-}
-
-func (sw *Switch) init() {
-	sw.fltab = make(map[FilterType]Filter)
-	sw.sotab = make(Sockets)
-	sw.stats = make(stats)
-}
-
-// Stats returns a list of per-cookie socket statistics.
-func (sw *Switch) Stats() []Stat {
-	var st []Stat
-	sw.smu.RLock()
-	for _, s := range sw.stats {
-		ns := *s
-		st = append(st, ns)
-	}
-	sw.smu.RUnlock()
-	return st
-}
-
-// Sockets returns mappings of socket descriptor to socket status.
-func (sw *Switch) Sockets() Sockets {
-	sw.smu.RLock()
-	tab := make(Sockets, len(sw.sotab))
-	for i, s := range sw.sotab {
-		tab[i] = s
-	}
-	sw.smu.RUnlock()
-	return tab
-}
-
-// A Cookie represents a 3-tuple of a socket; address family, socket
-// type and protocol number.
-type Cookie uint64
-
-// Family returns an address family.
-func (c Cookie) Family() int { return int(c >> 48) }
-
-// Type returns a socket type.
-func (c Cookie) Type() int { return int(c << 16 >> 32) }
-
-// Protocol returns a protocol number.
-func (c Cookie) Protocol() int { return int(c & 0xff) }
-
-func cookie(family, sotype, proto int) Cookie {
-	return Cookie(family)<<48 | Cookie(sotype)&0xffffffff<<16 | Cookie(proto)&0xff
-}
-
-// A Status represents the status of a socket.
-type Status struct {
-	Cookie    Cookie
-	Err       error // error status of socket system call
-	SocketErr error // error status of socket by SO_ERROR
-}
-
-func (so Status) String() string {
-	return fmt.Sprintf("(%s, %s, %s): syscallerr=%v, socketerr=%v", familyString(so.Cookie.Family()), typeString(so.Cookie.Type()), protocolString(so.Cookie.Protocol()), so.Err, so.SocketErr)
-}
-
-// A Stat represents a per-cookie socket statistics.
-type Stat struct {
-	Family   int // address family
-	Type     int // socket type
-	Protocol int // protocol number
-
-	Opened    uint64 // number of sockets opened
-	Connected uint64 // number of sockets connected
-	Listened  uint64 // number of sockets listened
-	Accepted  uint64 // number of sockets accepted
-	Closed    uint64 // number of sockets closed
-
-	OpenFailed    uint64 // number of sockets open failed
-	ConnectFailed uint64 // number of sockets connect failed
-	ListenFailed  uint64 // number of sockets listen failed
-	AcceptFailed  uint64 // number of sockets accept failed
-	CloseFailed   uint64 // number of sockets close failed
-}
-
-func (st Stat) String() string {
-	return fmt.Sprintf("(%s, %s, %s): opened=%d, connected=%d, listened=%d, accepted=%d, closed=%d, openfailed=%d, connectfailed=%d, listenfailed=%d, acceptfailed=%d, closefailed=%d", familyString(st.Family), typeString(st.Type), protocolString(st.Protocol), st.Opened, st.Connected, st.Listened, st.Accepted, st.Closed, st.OpenFailed, st.ConnectFailed, st.ListenFailed, st.AcceptFailed, st.CloseFailed)
-}
-
-type stats map[Cookie]*Stat
-
-func (st stats) getLocked(c Cookie) *Stat {
-	s, ok := st[c]
-	if !ok {
-		s = &Stat{Family: c.Family(), Type: c.Type(), Protocol: c.Protocol()}
-		st[c] = s
-	}
-	return s
-}
-
-// A FilterType represents a filter type.
-type FilterType int
-
-const (
-	FilterSocket        FilterType = iota // for Socket
-	FilterConnect                         // for Connect or ConnectEx
-	FilterListen                          // for Listen
-	FilterAccept                          // for Accept or Accept4
-	FilterGetsockoptInt                   // for GetsockoptInt
-	FilterClose                           // for Close or Closesocket
-)
-
-// A Filter represents a socket system call filter.
-//
-// It will only be executed before a system call for a socket that has
-// an entry in internal table.
-// If the filter returns a non-nil error, the execution of system call
-// will be canceled and the system call function returns the non-nil
-// error.
-// It can return a non-nil AfterFilter for filtering after the
-// execution of the system call.
-type Filter func(*Status) (AfterFilter, error)
-
-func (f Filter) apply(st *Status) (AfterFilter, error) {
-	if f == nil {
-		return nil, nil
-	}
-	return f(st)
-}
-
-// An AfterFilter represents a socket system call filter after an
-// execution of a system call.
-//
-// It will only be executed after a system call for a socket that has
-// an entry in internal table.
-// If the filter returns a non-nil error, the system call function
-// returns the non-nil error.
-type AfterFilter func(*Status) error
-
-func (f AfterFilter) apply(st *Status) error {
-	if f == nil {
-		return nil
-	}
-	return f(st)
-}
-
-// Set deploys the socket system call filter f for the filter type t.
-func (sw *Switch) Set(t FilterType, f Filter) {
-	sw.once.Do(sw.init)
-	sw.fmu.Lock()
-	sw.fltab[t] = f
-	sw.fmu.Unlock()
-}
diff --git a/src/net/internal/socktest/switch_posix.go b/src/net/internal/socktest/switch_posix.go
deleted file mode 100644
index 863edef..0000000
--- a/src/net/internal/socktest/switch_posix.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !plan9
-
-package socktest
-
-import (
-	"fmt"
-	"syscall"
-)
-
-func familyString(family int) string {
-	switch family {
-	case syscall.AF_INET:
-		return "inet4"
-	case syscall.AF_INET6:
-		return "inet6"
-	case syscall.AF_UNIX:
-		return "local"
-	default:
-		return fmt.Sprintf("%d", family)
-	}
-}
-
-func typeString(sotype int) string {
-	var s string
-	switch sotype & 0xff {
-	case syscall.SOCK_STREAM:
-		s = "stream"
-	case syscall.SOCK_DGRAM:
-		s = "datagram"
-	case syscall.SOCK_RAW:
-		s = "raw"
-	case syscall.SOCK_SEQPACKET:
-		s = "seqpacket"
-	default:
-		s = fmt.Sprintf("%d", sotype&0xff)
-	}
-	if flags := uint(sotype) & ^uint(0xff); flags != 0 {
-		s += fmt.Sprintf("|%#x", flags)
-	}
-	return s
-}
-
-func protocolString(proto int) string {
-	switch proto {
-	case 0:
-		return "default"
-	case syscall.IPPROTO_TCP:
-		return "tcp"
-	case syscall.IPPROTO_UDP:
-		return "udp"
-	default:
-		return fmt.Sprintf("%d", proto)
-	}
-}
diff --git a/src/net/internal/socktest/switch_stub.go b/src/net/internal/socktest/switch_stub.go
deleted file mode 100644
index 28ce72c..0000000
--- a/src/net/internal/socktest/switch_stub.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build plan9
-
-package socktest
-
-// Sockets maps a socket descriptor to the status of socket.
-type Sockets map[int]Status
-
-func familyString(family int) string { return "<nil>" }
-
-func typeString(sotype int) string { return "<nil>" }
-
-func protocolString(proto int) string { return "<nil>" }
diff --git a/src/net/internal/socktest/switch_unix.go b/src/net/internal/socktest/switch_unix.go
deleted file mode 100644
index 14c0c22..0000000
--- a/src/net/internal/socktest/switch_unix.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
-
-package socktest
-
-// Sockets maps a socket descriptor to the status of socket.
-type Sockets map[int]Status
-
-func (sw *Switch) sockso(s int) *Status {
-	sw.smu.RLock()
-	defer sw.smu.RUnlock()
-	so, ok := sw.sotab[s]
-	if !ok {
-		return nil
-	}
-	return &so
-}
-
-// addLocked returns a new Status without locking.
-// sw.smu must be held before call.
-func (sw *Switch) addLocked(s, family, sotype, proto int) *Status {
-	sw.once.Do(sw.init)
-	so := Status{Cookie: cookie(family, sotype, proto)}
-	sw.sotab[s] = so
-	return &so
-}
diff --git a/src/net/internal/socktest/switch_windows.go b/src/net/internal/socktest/switch_windows.go
deleted file mode 100644
index 4f1d597..0000000
--- a/src/net/internal/socktest/switch_windows.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package socktest
-
-import "syscall"
-
-// Sockets maps a socket descriptor to the status of socket.
-type Sockets map[syscall.Handle]Status
-
-func (sw *Switch) sockso(s syscall.Handle) *Status {
-	sw.smu.RLock()
-	defer sw.smu.RUnlock()
-	so, ok := sw.sotab[s]
-	if !ok {
-		return nil
-	}
-	return &so
-}
-
-// addLocked returns a new Status without locking.
-// sw.smu must be held before call.
-func (sw *Switch) addLocked(s syscall.Handle, family, sotype, proto int) *Status {
-	sw.once.Do(sw.init)
-	so := Status{Cookie: cookie(family, sotype, proto)}
-	sw.sotab[s] = so
-	return &so
-}
diff --git a/src/net/internal/socktest/sys_cloexec.go b/src/net/internal/socktest/sys_cloexec.go
deleted file mode 100644
index 340ff07..0000000
--- a/src/net/internal/socktest/sys_cloexec.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build freebsd linux
-
-package socktest
-
-import "syscall"
-
-// Accept4 wraps syscall.Accept4.
-func (sw *Switch) Accept4(s, flags int) (ns int, sa syscall.Sockaddr, err error) {
-	so := sw.sockso(s)
-	if so == nil {
-		return syscall.Accept4(s, flags)
-	}
-	sw.fmu.RLock()
-	f, _ := sw.fltab[FilterAccept]
-	sw.fmu.RUnlock()
-
-	af, err := f.apply(so)
-	if err != nil {
-		return -1, nil, err
-	}
-	ns, sa, so.Err = syscall.Accept4(s, flags)
-	if err = af.apply(so); err != nil {
-		if so.Err == nil {
-			syscall.Close(ns)
-		}
-		return -1, nil, err
-	}
-
-	sw.smu.Lock()
-	defer sw.smu.Unlock()
-	if so.Err != nil {
-		sw.stats.getLocked(so.Cookie).AcceptFailed++
-		return -1, nil, so.Err
-	}
-	nso := sw.addLocked(ns, so.Cookie.Family(), so.Cookie.Type(), so.Cookie.Protocol())
-	sw.stats.getLocked(nso.Cookie).Accepted++
-	return ns, sa, nil
-}
diff --git a/src/net/internal/socktest/sys_unix.go b/src/net/internal/socktest/sys_unix.go
deleted file mode 100644
index f983e26..0000000
--- a/src/net/internal/socktest/sys_unix.go
+++ /dev/null
@@ -1,193 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
-
-package socktest
-
-import "syscall"
-
-// Socket wraps syscall.Socket.
-func (sw *Switch) Socket(family, sotype, proto int) (s int, err error) {
-	sw.once.Do(sw.init)
-
-	so := &Status{Cookie: cookie(family, sotype, proto)}
-	sw.fmu.RLock()
-	f, _ := sw.fltab[FilterSocket]
-	sw.fmu.RUnlock()
-
-	af, err := f.apply(so)
-	if err != nil {
-		return -1, err
-	}
-	s, so.Err = syscall.Socket(family, sotype, proto)
-	if err = af.apply(so); err != nil {
-		if so.Err == nil {
-			syscall.Close(s)
-		}
-		return -1, err
-	}
-
-	sw.smu.Lock()
-	defer sw.smu.Unlock()
-	if so.Err != nil {
-		sw.stats.getLocked(so.Cookie).OpenFailed++
-		return -1, so.Err
-	}
-	nso := sw.addLocked(s, family, sotype, proto)
-	sw.stats.getLocked(nso.Cookie).Opened++
-	return s, nil
-}
-
-// Close wraps syscall.Close.
-func (sw *Switch) Close(s int) (err error) {
-	so := sw.sockso(s)
-	if so == nil {
-		return syscall.Close(s)
-	}
-	sw.fmu.RLock()
-	f, _ := sw.fltab[FilterClose]
-	sw.fmu.RUnlock()
-
-	af, err := f.apply(so)
-	if err != nil {
-		return err
-	}
-	so.Err = syscall.Close(s)
-	if err = af.apply(so); err != nil {
-		return err
-	}
-
-	sw.smu.Lock()
-	defer sw.smu.Unlock()
-	if so.Err != nil {
-		sw.stats.getLocked(so.Cookie).CloseFailed++
-		return so.Err
-	}
-	delete(sw.sotab, s)
-	sw.stats.getLocked(so.Cookie).Closed++
-	return nil
-}
-
-// Connect wraps syscall.Connect.
-func (sw *Switch) Connect(s int, sa syscall.Sockaddr) (err error) {
-	so := sw.sockso(s)
-	if so == nil {
-		return syscall.Connect(s, sa)
-	}
-	sw.fmu.RLock()
-	f, _ := sw.fltab[FilterConnect]
-	sw.fmu.RUnlock()
-
-	af, err := f.apply(so)
-	if err != nil {
-		return err
-	}
-	so.Err = syscall.Connect(s, sa)
-	if err = af.apply(so); err != nil {
-		return err
-	}
-
-	sw.smu.Lock()
-	defer sw.smu.Unlock()
-	if so.Err != nil {
-		sw.stats.getLocked(so.Cookie).ConnectFailed++
-		return so.Err
-	}
-	sw.stats.getLocked(so.Cookie).Connected++
-	return nil
-}
-
-// Listen wraps syscall.Listen.
-func (sw *Switch) Listen(s, backlog int) (err error) {
-	so := sw.sockso(s)
-	if so == nil {
-		return syscall.Listen(s, backlog)
-	}
-	sw.fmu.RLock()
-	f, _ := sw.fltab[FilterListen]
-	sw.fmu.RUnlock()
-
-	af, err := f.apply(so)
-	if err != nil {
-		return err
-	}
-	so.Err = syscall.Listen(s, backlog)
-	if err = af.apply(so); err != nil {
-		return err
-	}
-
-	sw.smu.Lock()
-	defer sw.smu.Unlock()
-	if so.Err != nil {
-		sw.stats.getLocked(so.Cookie).ListenFailed++
-		return so.Err
-	}
-	sw.stats.getLocked(so.Cookie).Listened++
-	return nil
-}
-
-// Accept wraps syscall.Accept.
-func (sw *Switch) Accept(s int) (ns int, sa syscall.Sockaddr, err error) {
-	so := sw.sockso(s)
-	if so == nil {
-		return syscall.Accept(s)
-	}
-	sw.fmu.RLock()
-	f, _ := sw.fltab[FilterAccept]
-	sw.fmu.RUnlock()
-
-	af, err := f.apply(so)
-	if err != nil {
-		return -1, nil, err
-	}
-	ns, sa, so.Err = syscall.Accept(s)
-	if err = af.apply(so); err != nil {
-		if so.Err == nil {
-			syscall.Close(ns)
-		}
-		return -1, nil, err
-	}
-
-	sw.smu.Lock()
-	defer sw.smu.Unlock()
-	if so.Err != nil {
-		sw.stats.getLocked(so.Cookie).AcceptFailed++
-		return -1, nil, so.Err
-	}
-	nso := sw.addLocked(ns, so.Cookie.Family(), so.Cookie.Type(), so.Cookie.Protocol())
-	sw.stats.getLocked(nso.Cookie).Accepted++
-	return ns, sa, nil
-}
-
-// GetsockoptInt wraps syscall.GetsockoptInt.
-func (sw *Switch) GetsockoptInt(s, level, opt int) (soerr int, err error) {
-	so := sw.sockso(s)
-	if so == nil {
-		return syscall.GetsockoptInt(s, level, opt)
-	}
-	sw.fmu.RLock()
-	f, _ := sw.fltab[FilterGetsockoptInt]
-	sw.fmu.RUnlock()
-
-	af, err := f.apply(so)
-	if err != nil {
-		return -1, err
-	}
-	soerr, so.Err = syscall.GetsockoptInt(s, level, opt)
-	so.SocketErr = syscall.Errno(soerr)
-	if err = af.apply(so); err != nil {
-		return -1, err
-	}
-
-	if so.Err != nil {
-		return -1, so.Err
-	}
-	if opt == syscall.SO_ERROR && (so.SocketErr == syscall.Errno(0) || so.SocketErr == syscall.EISCONN) {
-		sw.smu.Lock()
-		sw.stats.getLocked(so.Cookie).Connected++
-		sw.smu.Unlock()
-	}
-	return soerr, nil
-}
diff --git a/src/net/internal/socktest/sys_windows.go b/src/net/internal/socktest/sys_windows.go
deleted file mode 100644
index e61bf2b..0000000
--- a/src/net/internal/socktest/sys_windows.go
+++ /dev/null
@@ -1,156 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package socktest
-
-import "syscall"
-
-// Socket wraps syscall.Socket.
-func (sw *Switch) Socket(family, sotype, proto int) (s syscall.Handle, err error) {
-	sw.once.Do(sw.init)
-
-	so := &Status{Cookie: cookie(family, sotype, proto)}
-	sw.fmu.RLock()
-	f, _ := sw.fltab[FilterSocket]
-	sw.fmu.RUnlock()
-
-	af, err := f.apply(so)
-	if err != nil {
-		return syscall.InvalidHandle, err
-	}
-	s, so.Err = syscall.Socket(family, sotype, proto)
-	if err = af.apply(so); err != nil {
-		if so.Err == nil {
-			syscall.Closesocket(s)
-		}
-		return syscall.InvalidHandle, err
-	}
-
-	sw.smu.Lock()
-	defer sw.smu.Unlock()
-	if so.Err != nil {
-		sw.stats.getLocked(so.Cookie).OpenFailed++
-		return syscall.InvalidHandle, so.Err
-	}
-	nso := sw.addLocked(s, family, sotype, proto)
-	sw.stats.getLocked(nso.Cookie).Opened++
-	return s, nil
-}
-
-// Closesocket wraps syscall.Closesocket.
-func (sw *Switch) Closesocket(s syscall.Handle) (err error) {
-	so := sw.sockso(s)
-	if so == nil {
-		return syscall.Closesocket(s)
-	}
-	sw.fmu.RLock()
-	f, _ := sw.fltab[FilterClose]
-	sw.fmu.RUnlock()
-
-	af, err := f.apply(so)
-	if err != nil {
-		return err
-	}
-	so.Err = syscall.Closesocket(s)
-	if err = af.apply(so); err != nil {
-		return err
-	}
-
-	sw.smu.Lock()
-	defer sw.smu.Unlock()
-	if so.Err != nil {
-		sw.stats.getLocked(so.Cookie).CloseFailed++
-		return so.Err
-	}
-	delete(sw.sotab, s)
-	sw.stats.getLocked(so.Cookie).Closed++
-	return nil
-}
-
-// Connect wraps syscall.Connect.
-func (sw *Switch) Connect(s syscall.Handle, sa syscall.Sockaddr) (err error) {
-	so := sw.sockso(s)
-	if so == nil {
-		return syscall.Connect(s, sa)
-	}
-	sw.fmu.RLock()
-	f, _ := sw.fltab[FilterConnect]
-	sw.fmu.RUnlock()
-
-	af, err := f.apply(so)
-	if err != nil {
-		return err
-	}
-	so.Err = syscall.Connect(s, sa)
-	if err = af.apply(so); err != nil {
-		return err
-	}
-
-	sw.smu.Lock()
-	defer sw.smu.Unlock()
-	if so.Err != nil {
-		sw.stats.getLocked(so.Cookie).ConnectFailed++
-		return so.Err
-	}
-	sw.stats.getLocked(so.Cookie).Connected++
-	return nil
-}
-
-// ConnectEx wraps syscall.ConnectEx.
-func (sw *Switch) ConnectEx(s syscall.Handle, sa syscall.Sockaddr, b *byte, n uint32, nwr *uint32, o *syscall.Overlapped) (err error) {
-	so := sw.sockso(s)
-	if so == nil {
-		return syscall.ConnectEx(s, sa, b, n, nwr, o)
-	}
-	sw.fmu.RLock()
-	f, _ := sw.fltab[FilterConnect]
-	sw.fmu.RUnlock()
-
-	af, err := f.apply(so)
-	if err != nil {
-		return err
-	}
-	so.Err = syscall.ConnectEx(s, sa, b, n, nwr, o)
-	if err = af.apply(so); err != nil {
-		return err
-	}
-
-	sw.smu.Lock()
-	defer sw.smu.Unlock()
-	if so.Err != nil {
-		sw.stats.getLocked(so.Cookie).ConnectFailed++
-		return so.Err
-	}
-	sw.stats.getLocked(so.Cookie).Connected++
-	return nil
-}
-
-// Listen wraps syscall.Listen.
-func (sw *Switch) Listen(s syscall.Handle, backlog int) (err error) {
-	so := sw.sockso(s)
-	if so == nil {
-		return syscall.Listen(s, backlog)
-	}
-	sw.fmu.RLock()
-	f, _ := sw.fltab[FilterListen]
-	sw.fmu.RUnlock()
-
-	af, err := f.apply(so)
-	if err != nil {
-		return err
-	}
-	so.Err = syscall.Listen(s, backlog)
-	if err = af.apply(so); err != nil {
-		return err
-	}
-
-	sw.smu.Lock()
-	defer sw.smu.Unlock()
-	if so.Err != nil {
-		sw.stats.getLocked(so.Cookie).ListenFailed++
-		return so.Err
-	}
-	sw.stats.getLocked(so.Cookie).Listened++
-	return nil
-}
diff --git a/src/net/listen_test.go b/src/net/listen_test.go
deleted file mode 100644
index d5627f2..0000000
--- a/src/net/listen_test.go
+++ /dev/null
@@ -1,685 +0,0 @@
-// Copyright 2011 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !plan9
-
-package net
-
-import (
-	"fmt"
-	"os"
-	"runtime"
-	"syscall"
-	"testing"
-)
-
-func (ln *TCPListener) port() string {
-	_, port, err := SplitHostPort(ln.Addr().String())
-	if err != nil {
-		return ""
-	}
-	return port
-}
-
-func (c *UDPConn) port() string {
-	_, port, err := SplitHostPort(c.LocalAddr().String())
-	if err != nil {
-		return ""
-	}
-	return port
-}
-
-var tcpListenerTests = []struct {
-	network string
-	address string
-}{
-	{"tcp", ""},
-	{"tcp", "0.0.0.0"},
-	{"tcp", "::ffff:0.0.0.0"},
-	{"tcp", "::"},
-
-	{"tcp", "127.0.0.1"},
-	{"tcp", "::ffff:127.0.0.1"},
-	{"tcp", "::1"},
-
-	{"tcp4", ""},
-	{"tcp4", "0.0.0.0"},
-	{"tcp4", "::ffff:0.0.0.0"},
-
-	{"tcp4", "127.0.0.1"},
-	{"tcp4", "::ffff:127.0.0.1"},
-
-	{"tcp6", ""},
-	{"tcp6", "::"},
-
-	{"tcp6", "::1"},
-}
-
-// TestTCPListener tests both single and double listen to a test
-// listener with same address family, same listening address and
-// same port.
-func TestTCPListener(t *testing.T) {
-	switch runtime.GOOS {
-	case "plan9":
-		t.Skipf("not supported on %s", runtime.GOOS)
-	}
-
-	for _, tt := range tcpListenerTests {
-		if !testableListenArgs(tt.network, JoinHostPort(tt.address, "0"), "") {
-			t.Logf("skipping %s test", tt.network+" "+tt.address)
-			continue
-		}
-
-		ln1, err := Listen(tt.network, JoinHostPort(tt.address, "0"))
-		if err != nil {
-			t.Fatal(err)
-		}
-		if err := checkFirstListener(tt.network, ln1); err != nil {
-			ln1.Close()
-			t.Fatal(err)
-		}
-		ln2, err := Listen(tt.network, JoinHostPort(tt.address, ln1.(*TCPListener).port()))
-		if err == nil {
-			ln2.Close()
-		}
-		if err := checkSecondListener(tt.network, tt.address, err); err != nil {
-			ln1.Close()
-			t.Fatal(err)
-		}
-		ln1.Close()
-	}
-}
-
-var udpListenerTests = []struct {
-	network string
-	address string
-}{
-	{"udp", ""},
-	{"udp", "0.0.0.0"},
-	{"udp", "::ffff:0.0.0.0"},
-	{"udp", "::"},
-
-	{"udp", "127.0.0.1"},
-	{"udp", "::ffff:127.0.0.1"},
-	{"udp", "::1"},
-
-	{"udp4", ""},
-	{"udp4", "0.0.0.0"},
-	{"udp4", "::ffff:0.0.0.0"},
-
-	{"udp4", "127.0.0.1"},
-	{"udp4", "::ffff:127.0.0.1"},
-
-	{"udp6", ""},
-	{"udp6", "::"},
-
-	{"udp6", "::1"},
-}
-
-// TestUDPListener tests both single and double listen to a test
-// listener with same address family, same listening address and
-// same port.
-func TestUDPListener(t *testing.T) {
-	switch runtime.GOOS {
-	case "plan9":
-		t.Skipf("not supported on %s", runtime.GOOS)
-	}
-
-	for _, tt := range udpListenerTests {
-		if !testableListenArgs(tt.network, JoinHostPort(tt.address, "0"), "") {
-			t.Logf("skipping %s test", tt.network+" "+tt.address)
-			continue
-		}
-
-		c1, err := ListenPacket(tt.network, JoinHostPort(tt.address, "0"))
-		if err != nil {
-			t.Fatal(err)
-		}
-		if err := checkFirstListener(tt.network, c1); err != nil {
-			c1.Close()
-			t.Fatal(err)
-		}
-		c2, err := ListenPacket(tt.network, JoinHostPort(tt.address, c1.(*UDPConn).port()))
-		if err == nil {
-			c2.Close()
-		}
-		if err := checkSecondListener(tt.network, tt.address, err); err != nil {
-			c1.Close()
-			t.Fatal(err)
-		}
-		c1.Close()
-	}
-}
-
-var dualStackTCPListenerTests = []struct {
-	network1, address1 string // first listener
-	network2, address2 string // second listener
-	xerr               error  // expected error value, nil or other
-}{
-	// Test cases and expected results for the attemping 2nd listen on the same port
-	// 1st listen                2nd listen                 darwin  freebsd  linux  openbsd
-	// ------------------------------------------------------------------------------------
-	// "tcp"  ""                 "tcp"  ""                    -        -       -       -
-	// "tcp"  ""                 "tcp"  "0.0.0.0"             -        -       -       -
-	// "tcp"  "0.0.0.0"          "tcp"  ""                    -        -       -       -
-	// ------------------------------------------------------------------------------------
-	// "tcp"  ""                 "tcp"  "[::]"                -        -       -       ok
-	// "tcp"  "[::]"             "tcp"  ""                    -        -       -       ok
-	// "tcp"  "0.0.0.0"          "tcp"  "[::]"                -        -       -       ok
-	// "tcp"  "[::]"             "tcp"  "0.0.0.0"             -        -       -       ok
-	// "tcp"  "[::ffff:0.0.0.0]" "tcp"  "[::]"                -        -       -       ok
-	// "tcp"  "[::]"             "tcp"  "[::ffff:0.0.0.0]"    -        -       -       ok
-	// ------------------------------------------------------------------------------------
-	// "tcp4" ""                 "tcp6" ""                    ok       ok      ok      ok
-	// "tcp6" ""                 "tcp4" ""                    ok       ok      ok      ok
-	// "tcp4" "0.0.0.0"          "tcp6" "[::]"                ok       ok      ok      ok
-	// "tcp6" "[::]"             "tcp4" "0.0.0.0"             ok       ok      ok      ok
-	// ------------------------------------------------------------------------------------
-	// "tcp"  "127.0.0.1"        "tcp"  "[::1]"               ok       ok      ok      ok
-	// "tcp"  "[::1]"            "tcp"  "127.0.0.1"           ok       ok      ok      ok
-	// "tcp4" "127.0.0.1"        "tcp6" "[::1]"               ok       ok      ok      ok
-	// "tcp6" "[::1]"            "tcp4" "127.0.0.1"           ok       ok      ok      ok
-	//
-	// Platform default configurations:
-	// darwin, kernel version 11.3.0
-	//	net.inet6.ip6.v6only=0 (overridable by sysctl or IPV6_V6ONLY option)
-	// freebsd, kernel version 8.2
-	//	net.inet6.ip6.v6only=1 (overridable by sysctl or IPV6_V6ONLY option)
-	// linux, kernel version 3.0.0
-	//	net.ipv6.bindv6only=0 (overridable by sysctl or IPV6_V6ONLY option)
-	// openbsd, kernel version 5.0
-	//	net.inet6.ip6.v6only=1 (overriding is prohibited)
-
-	{"tcp", "", "tcp", "", syscall.EADDRINUSE},
-	{"tcp", "", "tcp", "0.0.0.0", syscall.EADDRINUSE},
-	{"tcp", "0.0.0.0", "tcp", "", syscall.EADDRINUSE},
-
-	{"tcp", "", "tcp", "::", syscall.EADDRINUSE},
-	{"tcp", "::", "tcp", "", syscall.EADDRINUSE},
-	{"tcp", "0.0.0.0", "tcp", "::", syscall.EADDRINUSE},
-	{"tcp", "::", "tcp", "0.0.0.0", syscall.EADDRINUSE},
-	{"tcp", "::ffff:0.0.0.0", "tcp", "::", syscall.EADDRINUSE},
-	{"tcp", "::", "tcp", "::ffff:0.0.0.0", syscall.EADDRINUSE},
-
-	{"tcp4", "", "tcp6", "", nil},
-	{"tcp6", "", "tcp4", "", nil},
-	{"tcp4", "0.0.0.0", "tcp6", "::", nil},
-	{"tcp6", "::", "tcp4", "0.0.0.0", nil},
-
-	{"tcp", "127.0.0.1", "tcp", "::1", nil},
-	{"tcp", "::1", "tcp", "127.0.0.1", nil},
-	{"tcp4", "127.0.0.1", "tcp6", "::1", nil},
-	{"tcp6", "::1", "tcp4", "127.0.0.1", nil},
-}
-
-// TestDualStackTCPListener tests both single and double listen
-// to a test listener with various address families, different
-// listening address and same port.
-func TestDualStackTCPListener(t *testing.T) {
-	switch runtime.GOOS {
-	case "dragonfly", "nacl", "plan9": // re-enable on dragonfly once the new IP control block management has landed
-		t.Skipf("not supported on %s", runtime.GOOS)
-	}
-	if !supportsIPv4 || !supportsIPv6 {
-		t.Skip("both IPv4 and IPv6 are required")
-	}
-
-	for _, tt := range dualStackTCPListenerTests {
-		if !testableListenArgs(tt.network1, JoinHostPort(tt.address1, "0"), "") {
-			t.Logf("skipping %s test", tt.network1+" "+tt.address1)
-			continue
-		}
-
-		if !supportsIPv4map && differentWildcardAddr(tt.address1, tt.address2) {
-			tt.xerr = nil
-		}
-		var firstErr, secondErr error
-		for i := 0; i < 5; i++ {
-			lns, err := newDualStackListener()
-			if err != nil {
-				t.Fatal(err)
-			}
-			port := lns[0].port()
-			for _, ln := range lns {
-				ln.Close()
-			}
-			var ln1 Listener
-			ln1, firstErr = Listen(tt.network1, JoinHostPort(tt.address1, port))
-			if firstErr != nil {
-				continue
-			}
-			if err := checkFirstListener(tt.network1, ln1); err != nil {
-				ln1.Close()
-				t.Fatal(err)
-			}
-			ln2, err := Listen(tt.network2, JoinHostPort(tt.address2, ln1.(*TCPListener).port()))
-			if err == nil {
-				ln2.Close()
-			}
-			if secondErr = checkDualStackSecondListener(tt.network2, tt.address2, err, tt.xerr); secondErr != nil {
-				ln1.Close()
-				continue
-			}
-			ln1.Close()
-			break
-		}
-		if firstErr != nil {
-			t.Error(firstErr)
-		}
-		if secondErr != nil {
-			t.Error(secondErr)
-		}
-	}
-}
-
-var dualStackUDPListenerTests = []struct {
-	network1, address1 string // first listener
-	network2, address2 string // second listener
-	xerr               error  // expected error value, nil or other
-}{
-	{"udp", "", "udp", "", syscall.EADDRINUSE},
-	{"udp", "", "udp", "0.0.0.0", syscall.EADDRINUSE},
-	{"udp", "0.0.0.0", "udp", "", syscall.EADDRINUSE},
-
-	{"udp", "", "udp", "::", syscall.EADDRINUSE},
-	{"udp", "::", "udp", "", syscall.EADDRINUSE},
-	{"udp", "0.0.0.0", "udp", "::", syscall.EADDRINUSE},
-	{"udp", "::", "udp", "0.0.0.0", syscall.EADDRINUSE},
-	{"udp", "::ffff:0.0.0.0", "udp", "::", syscall.EADDRINUSE},
-	{"udp", "::", "udp", "::ffff:0.0.0.0", syscall.EADDRINUSE},
-
-	{"udp4", "", "udp6", "", nil},
-	{"udp6", "", "udp4", "", nil},
-	{"udp4", "0.0.0.0", "udp6", "::", nil},
-	{"udp6", "::", "udp4", "0.0.0.0", nil},
-
-	{"udp", "127.0.0.1", "udp", "::1", nil},
-	{"udp", "::1", "udp", "127.0.0.1", nil},
-	{"udp4", "127.0.0.1", "udp6", "::1", nil},
-	{"udp6", "::1", "udp4", "127.0.0.1", nil},
-}
-
-// TestDualStackUDPListener tests both single and double listen
-// to a test listener with various address families, differnet
-// listening address and same port.
-func TestDualStackUDPListener(t *testing.T) {
-	switch runtime.GOOS {
-	case "dragonfly", "nacl", "plan9": // re-enable on dragonfly once the new IP control block management has landed
-		t.Skipf("not supported on %s", runtime.GOOS)
-	}
-	if !supportsIPv4 || !supportsIPv6 {
-		t.Skip("both IPv4 and IPv6 are required")
-	}
-
-	for _, tt := range dualStackUDPListenerTests {
-		if !testableListenArgs(tt.network1, JoinHostPort(tt.address1, "0"), "") {
-			t.Logf("skipping %s test", tt.network1+" "+tt.address1)
-			continue
-		}
-
-		if !supportsIPv4map && differentWildcardAddr(tt.address1, tt.address2) {
-			tt.xerr = nil
-		}
-		var firstErr, secondErr error
-		for i := 0; i < 5; i++ {
-			cs, err := newDualStackPacketListener()
-			if err != nil {
-				t.Fatal(err)
-			}
-			port := cs[0].port()
-			for _, c := range cs {
-				c.Close()
-			}
-			var c1 PacketConn
-			c1, firstErr = ListenPacket(tt.network1, JoinHostPort(tt.address1, port))
-			if firstErr != nil {
-				continue
-			}
-			if err := checkFirstListener(tt.network1, c1); err != nil {
-				c1.Close()
-				t.Fatal(err)
-			}
-			c2, err := ListenPacket(tt.network2, JoinHostPort(tt.address2, c1.(*UDPConn).port()))
-			if err == nil {
-				c2.Close()
-			}
-			if secondErr = checkDualStackSecondListener(tt.network2, tt.address2, err, tt.xerr); secondErr != nil {
-				c1.Close()
-				continue
-			}
-			c1.Close()
-			break
-		}
-		if firstErr != nil {
-			t.Error(firstErr)
-		}
-		if secondErr != nil {
-			t.Error(secondErr)
-		}
-	}
-}
-
-func differentWildcardAddr(i, j string) bool {
-	if (i == "" || i == "0.0.0.0" || i == "::ffff:0.0.0.0") && (j == "" || j == "0.0.0.0" || j == "::ffff:0.0.0.0") {
-		return false
-	}
-	if i == "[::]" && j == "[::]" {
-		return false
-	}
-	return true
-}
-
-func checkFirstListener(network string, ln interface{}) error {
-	switch network {
-	case "tcp":
-		fd := ln.(*TCPListener).fd
-		if err := checkDualStackAddrFamily(fd); err != nil {
-			return err
-		}
-	case "tcp4":
-		fd := ln.(*TCPListener).fd
-		if fd.family != syscall.AF_INET {
-			return fmt.Errorf("%v got %v; want %v", fd.laddr, fd.family, syscall.AF_INET)
-		}
-	case "tcp6":
-		fd := ln.(*TCPListener).fd
-		if fd.family != syscall.AF_INET6 {
-			return fmt.Errorf("%v got %v; want %v", fd.laddr, fd.family, syscall.AF_INET6)
-		}
-	case "udp":
-		fd := ln.(*UDPConn).fd
-		if err := checkDualStackAddrFamily(fd); err != nil {
-			return err
-		}
-	case "udp4":
-		fd := ln.(*UDPConn).fd
-		if fd.family != syscall.AF_INET {
-			return fmt.Errorf("%v got %v; want %v", fd.laddr, fd.family, syscall.AF_INET)
-		}
-	case "udp6":
-		fd := ln.(*UDPConn).fd
-		if fd.family != syscall.AF_INET6 {
-			return fmt.Errorf("%v got %v; want %v", fd.laddr, fd.family, syscall.AF_INET6)
-		}
-	default:
-		return UnknownNetworkError(network)
-	}
-	return nil
-}
-
-func checkSecondListener(network, address string, err error) error {
-	switch network {
-	case "tcp", "tcp4", "tcp6":
-		if err == nil {
-			return fmt.Errorf("%s should fail", network+" "+address)
-		}
-	case "udp", "udp4", "udp6":
-		if err == nil {
-			return fmt.Errorf("%s should fail", network+" "+address)
-		}
-	default:
-		return UnknownNetworkError(network)
-	}
-	return nil
-}
-
-func checkDualStackSecondListener(network, address string, err, xerr error) error {
-	switch network {
-	case "tcp", "tcp4", "tcp6":
-		if xerr == nil && err != nil || xerr != nil && err == nil {
-			return fmt.Errorf("%s got %v; want %v", network+" "+address, err, xerr)
-		}
-	case "udp", "udp4", "udp6":
-		if xerr == nil && err != nil || xerr != nil && err == nil {
-			return fmt.Errorf("%s got %v; want %v", network+" "+address, err, xerr)
-		}
-	default:
-		return UnknownNetworkError(network)
-	}
-	return nil
-}
-
-func checkDualStackAddrFamily(fd *netFD) error {
-	switch a := fd.laddr.(type) {
-	case *TCPAddr:
-		// If a node under test supports both IPv6 capability
-		// and IPv6 IPv4-mapping capability, we can assume
-		// that the node listens on a wildcard address with an
-		// AF_INET6 socket.
-		if supportsIPv4map && fd.laddr.(*TCPAddr).isWildcard() {
-			if fd.family != syscall.AF_INET6 {
-				return fmt.Errorf("Listen(%s, %v) returns %v; want %v", fd.net, fd.laddr, fd.family, syscall.AF_INET6)
-			}
-		} else {
-			if fd.family != a.family() {
-				return fmt.Errorf("Listen(%s, %v) returns %v; want %v", fd.net, fd.laddr, fd.family, a.family())
-			}
-		}
-	case *UDPAddr:
-		// If a node under test supports both IPv6 capability
-		// and IPv6 IPv4-mapping capability, we can assume
-		// that the node listens on a wildcard address with an
-		// AF_INET6 socket.
-		if supportsIPv4map && fd.laddr.(*UDPAddr).isWildcard() {
-			if fd.family != syscall.AF_INET6 {
-				return fmt.Errorf("ListenPacket(%s, %v) returns %v; want %v", fd.net, fd.laddr, fd.family, syscall.AF_INET6)
-			}
-		} else {
-			if fd.family != a.family() {
-				return fmt.Errorf("ListenPacket(%s, %v) returns %v; want %v", fd.net, fd.laddr, fd.family, a.family())
-			}
-		}
-	default:
-		return fmt.Errorf("unexpected protocol address type: %T", a)
-	}
-	return nil
-}
-
-func TestWildWildcardListener(t *testing.T) {
-	switch runtime.GOOS {
-	case "plan9":
-		t.Skipf("not supported on %s", runtime.GOOS)
-	}
-	if testing.Short() || !*testExternal {
-		t.Skip("avoid external network")
-	}
-
-	defer func() {
-		if p := recover(); p != nil {
-			t.Fatalf("panicked: %v", p)
-		}
-	}()
-
-	if ln, err := Listen("tcp", ""); err == nil {
-		ln.Close()
-	}
-	if ln, err := ListenPacket("udp", ""); err == nil {
-		ln.Close()
-	}
-	if ln, err := ListenTCP("tcp", nil); err == nil {
-		ln.Close()
-	}
-	if ln, err := ListenUDP("udp", nil); err == nil {
-		ln.Close()
-	}
-	if ln, err := ListenIP("ip:icmp", nil); err == nil {
-		ln.Close()
-	}
-}
-
-var ipv4MulticastListenerTests = []struct {
-	net   string
-	gaddr *UDPAddr // see RFC 4727
-}{
-	{"udp", &UDPAddr{IP: IPv4(224, 0, 0, 254), Port: 12345}},
-
-	{"udp4", &UDPAddr{IP: IPv4(224, 0, 0, 254), Port: 12345}},
-}
-
-// TestIPv4MulticastListener tests both single and double listen to a
-// test listener with same address family, same group address and same
-// port.
-func TestIPv4MulticastListener(t *testing.T) {
-	switch runtime.GOOS {
-	case "android", "nacl", "plan9":
-		t.Skipf("not supported on %s", runtime.GOOS)
-	case "solaris":
-		t.Skipf("not supported on solaris, see golang.org/issue/7399")
-	}
-
-	closer := func(cs []*UDPConn) {
-		for _, c := range cs {
-			if c != nil {
-				c.Close()
-			}
-		}
-	}
-
-	for _, ifi := range []*Interface{loopbackInterface(), nil} {
-		// Note that multicast interface assignment by system
-		// is not recommended because it usually relies on
-		// routing stuff for finding out an appropriate
-		// nexthop containing both network and link layer
-		// adjacencies.
-		if ifi == nil && !*testExternal {
-			continue
-		}
-		for _, tt := range ipv4MulticastListenerTests {
-			var err error
-			cs := make([]*UDPConn, 2)
-			if cs[0], err = ListenMulticastUDP(tt.net, ifi, tt.gaddr); err != nil {
-				t.Fatal(err)
-			}
-			if err := checkMulticastListener(cs[0], tt.gaddr.IP); err != nil {
-				closer(cs)
-				t.Fatal(err)
-			}
-			if cs[1], err = ListenMulticastUDP(tt.net, ifi, tt.gaddr); err != nil {
-				closer(cs)
-				t.Fatal(err)
-			}
-			if err := checkMulticastListener(cs[1], tt.gaddr.IP); err != nil {
-				closer(cs)
-				t.Fatal(err)
-			}
-			closer(cs)
-		}
-	}
-}
-
-var ipv6MulticastListenerTests = []struct {
-	net   string
-	gaddr *UDPAddr // see RFC 4727
-}{
-	{"udp", &UDPAddr{IP: ParseIP("ff01::114"), Port: 12345}},
-	{"udp", &UDPAddr{IP: ParseIP("ff02::114"), Port: 12345}},
-	{"udp", &UDPAddr{IP: ParseIP("ff04::114"), Port: 12345}},
-	{"udp", &UDPAddr{IP: ParseIP("ff05::114"), Port: 12345}},
-	{"udp", &UDPAddr{IP: ParseIP("ff08::114"), Port: 12345}},
-	{"udp", &UDPAddr{IP: ParseIP("ff0e::114"), Port: 12345}},
-
-	{"udp6", &UDPAddr{IP: ParseIP("ff01::114"), Port: 12345}},
-	{"udp6", &UDPAddr{IP: ParseIP("ff02::114"), Port: 12345}},
-	{"udp6", &UDPAddr{IP: ParseIP("ff04::114"), Port: 12345}},
-	{"udp6", &UDPAddr{IP: ParseIP("ff05::114"), Port: 12345}},
-	{"udp6", &UDPAddr{IP: ParseIP("ff08::114"), Port: 12345}},
-	{"udp6", &UDPAddr{IP: ParseIP("ff0e::114"), Port: 12345}},
-}
-
-// TestIPv6MulticastListener tests both single and double listen to a
-// test listener with same address family, same group address and same
-// port.
-func TestIPv6MulticastListener(t *testing.T) {
-	switch runtime.GOOS {
-	case "plan9":
-		t.Skipf("not supported on %s", runtime.GOOS)
-	case "solaris":
-		t.Skipf("not supported on solaris, see issue 7399")
-	}
-	if !supportsIPv6 {
-		t.Skip("ipv6 is not supported")
-	}
-	if os.Getuid() != 0 {
-		t.Skip("must be root")
-	}
-
-	closer := func(cs []*UDPConn) {
-		for _, c := range cs {
-			if c != nil {
-				c.Close()
-			}
-		}
-	}
-
-	for _, ifi := range []*Interface{loopbackInterface(), nil} {
-		// Note that multicast interface assignment by system
-		// is not recommended because it usually relies on
-		// routing stuff for finding out an appropriate
-		// nexthop containing both network and link layer
-		// adjacencies.
-		if ifi == nil && (!*testExternal || !*testIPv6) {
-			continue
-		}
-		for _, tt := range ipv6MulticastListenerTests {
-			var err error
-			cs := make([]*UDPConn, 2)
-			if cs[0], err = ListenMulticastUDP(tt.net, ifi, tt.gaddr); err != nil {
-				t.Fatal(err)
-			}
-			if err := checkMulticastListener(cs[0], tt.gaddr.IP); err != nil {
-				closer(cs)
-				t.Fatal(err)
-			}
-			if cs[1], err = ListenMulticastUDP(tt.net, ifi, tt.gaddr); err != nil {
-				closer(cs)
-				t.Fatal(err)
-			}
-			if err := checkMulticastListener(cs[1], tt.gaddr.IP); err != nil {
-				closer(cs)
-				t.Fatal(err)
-			}
-			closer(cs)
-		}
-	}
-}
-
-func checkMulticastListener(c *UDPConn, ip IP) error {
-	if ok, err := multicastRIBContains(ip); err != nil {
-		return err
-	} else if !ok {
-		return fmt.Errorf("%s not found in multicast rib", ip.String())
-	}
-	la := c.LocalAddr()
-	if la, ok := la.(*UDPAddr); !ok || la.Port == 0 {
-		return fmt.Errorf("got %v; want a proper address with non-zero port number", la)
-	}
-	return nil
-}
-
-func multicastRIBContains(ip IP) (bool, error) {
-	switch runtime.GOOS {
-	case "dragonfly", "netbsd", "openbsd", "plan9", "solaris", "windows":
-		return true, nil // not implemented yet
-	case "linux":
-		if runtime.GOARCH == "arm" || runtime.GOARCH == "alpha" {
-			return true, nil // not implemented yet
-		}
-	}
-	ift, err := Interfaces()
-	if err != nil {
-		return false, err
-	}
-	for _, ifi := range ift {
-		ifmat, err := ifi.MulticastAddrs()
-		if err != nil {
-			return false, err
-		}
-		for _, ifma := range ifmat {
-			if ifma.(*IPAddr).IP.Equal(ip) {
-				return true, nil
-			}
-		}
-	}
-	return false, nil
-}
diff --git a/src/net/mail/example_test.go b/src/net/mail/example_test.go
deleted file mode 100644
index c336564..0000000
--- a/src/net/mail/example_test.go
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package mail_test
-
-import (
-	"fmt"
-	"io/ioutil"
-	"log"
-	"net/mail"
-	"strings"
-)
-
-func ExampleParseAddressList() {
-	const list = "Alice <alice at example.com>, Bob <bob at example.com>, Eve <eve at example.com>"
-	emails, err := mail.ParseAddressList(list)
-	if err != nil {
-		log.Fatal(err)
-	}
-
-	for _, v := range emails {
-		fmt.Println(v.Name, v.Address)
-	}
-
-	// Output:
-	// Alice alice at example.com
-	// Bob bob at example.com
-	// Eve eve at example.com
-}
-
-func ExampleParseAddress() {
-	e, err := mail.ParseAddress("Alice <alice at example.com>")
-	if err != nil {
-		log.Fatal(err)
-	}
-
-	fmt.Println(e.Name, e.Address)
-
-	// Output:
-	// Alice alice at example.com
-}
-
-func ExampleReadMessage() {
-	msg := `Date: Mon, 23 Jun 2015 11:40:36 -0400
-From: Gopher <from at example.com>
-To: Another Gopher <to at example.com>
-Subject: Gophers at Gophercon
-
-Message body
-`
-
-	r := strings.NewReader(msg)
-	m, err := mail.ReadMessage(r)
-	if err != nil {
-		log.Fatal(err)
-	}
-
-	header := m.Header
-	fmt.Println("Date:", header.Get("Date"))
-	fmt.Println("From:", header.Get("From"))
-	fmt.Println("To:", header.Get("To"))
-	fmt.Println("Subject:", header.Get("Subject"))
-
-	body, err := ioutil.ReadAll(m.Body)
-	if err != nil {
-		log.Fatal(err)
-	}
-	fmt.Printf("%s", body)
-
-	// Output:
-	// Date: Mon, 23 Jun 2015 11:40:36 -0400
-	// From: Gopher <from at example.com>
-	// To: Another Gopher <to at example.com>
-	// Subject: Gophers at Gophercon
-	// Message body
-}
diff --git a/src/net/main_cloexec_test.go b/src/net/main_cloexec_test.go
deleted file mode 100644
index 7903819..0000000
--- a/src/net/main_cloexec_test.go
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build freebsd linux
-
-package net
-
-func init() {
-	extraTestHookInstallers = append(extraTestHookInstallers, installAccept4TestHook)
-	extraTestHookUninstallers = append(extraTestHookUninstallers, uninstallAccept4TestHook)
-}
-
-var (
-	// Placeholders for saving original socket system calls.
-	origAccept4 = accept4Func
-)
-
-func installAccept4TestHook() {
-	accept4Func = sw.Accept4
-}
-
-func uninstallAccept4TestHook() {
-	accept4Func = origAccept4
-}
diff --git a/src/net/main_plan9_test.go b/src/net/main_plan9_test.go
deleted file mode 100644
index 94501ca..0000000
--- a/src/net/main_plan9_test.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package net
-
-func installTestHooks() {}
-
-func uninstallTestHooks() {}
-
-func forceCloseSockets() {}
-
-func enableSocketConnect() {}
-
-func disableSocketConnect(network string) {}
diff --git a/src/net/main_posix_test.go b/src/net/main_posix_test.go
deleted file mode 100644
index ead311c..0000000
--- a/src/net/main_posix_test.go
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !plan9
-
-package net
-
-import (
-	"net/internal/socktest"
-	"strings"
-	"syscall"
-)
-
-func enableSocketConnect() {
-	sw.Set(socktest.FilterConnect, nil)
-}
-
-func disableSocketConnect(network string) {
-	ss := strings.Split(network, ":")
-	sw.Set(socktest.FilterConnect, func(so *socktest.Status) (socktest.AfterFilter, error) {
-		switch ss[0] {
-		case "tcp4":
-			if so.Cookie.Family() == syscall.AF_INET && so.Cookie.Type() == syscall.SOCK_STREAM {
-				return nil, syscall.EHOSTUNREACH
-			}
-		case "udp4":
-			if so.Cookie.Family() == syscall.AF_INET && so.Cookie.Type() == syscall.SOCK_DGRAM {
-				return nil, syscall.EHOSTUNREACH
-			}
-		case "ip4":
-			if so.Cookie.Family() == syscall.AF_INET && so.Cookie.Type() == syscall.SOCK_RAW {
-				return nil, syscall.EHOSTUNREACH
-			}
-		case "tcp6":
-			if so.Cookie.Family() == syscall.AF_INET6 && so.Cookie.Type() == syscall.SOCK_STREAM {
-				return nil, syscall.EHOSTUNREACH
-			}
-		case "udp6":
-			if so.Cookie.Family() == syscall.AF_INET6 && so.Cookie.Type() == syscall.SOCK_DGRAM {
-				return nil, syscall.EHOSTUNREACH
-			}
-		case "ip6":
-			if so.Cookie.Family() == syscall.AF_INET6 && so.Cookie.Type() == syscall.SOCK_RAW {
-				return nil, syscall.EHOSTUNREACH
-			}
-		}
-		return nil, nil
-	})
-}
diff --git a/src/net/main_test.go b/src/net/main_test.go
deleted file mode 100644
index f3f8b1a9..0000000
--- a/src/net/main_test.go
+++ /dev/null
@@ -1,204 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package net
-
-import (
-	"flag"
-	"fmt"
-	"net/internal/socktest"
-	"os"
-	"runtime"
-	"sort"
-	"strings"
-	"sync"
-	"testing"
-)
-
-var (
-	sw socktest.Switch
-
-	// uninstallTestHooks runs just before a run of benchmarks.
-	testHookUninstaller sync.Once
-)
-
-var (
-	testDNSFlood = flag.Bool("dnsflood", false, "whether to test DNS query flooding")
-
-	testExternal = flag.Bool("external", true, "allow use of external networks during long test")
-
-	// If external IPv4 connectivity exists, we can try dialing
-	// non-node/interface local scope IPv4 addresses.
-	// On Windows, Lookup APIs may not return IPv4-related
-	// resource records when a node has no external IPv4
-	// connectivity.
-	testIPv4 = flag.Bool("ipv4", true, "assume external IPv4 connectivity exists")
-
-	// If external IPv6 connectivity exists, we can try dialing
-	// non-node/interface local scope IPv6 addresses.
-	// On Windows, Lookup APIs may not return IPv6-related
-	// resource records when a node has no external IPv6
-	// connectivity.
-	testIPv6 = flag.Bool("ipv6", false, "assume external IPv6 connectivity exists")
-)
-
-func TestMain(m *testing.M) {
-	setupTestData()
-	installTestHooks()
-
-	st := m.Run()
-
-	testHookUninstaller.Do(uninstallTestHooks)
-	if testing.Verbose() {
-		printRunningGoroutines()
-		printInflightSockets()
-		printSocketStats()
-	}
-	forceCloseSockets()
-	os.Exit(st)
-}
-
-type ipv6LinkLocalUnicastTest struct {
-	network, address string
-	nameLookup       bool
-}
-
-var (
-	ipv6LinkLocalUnicastTCPTests []ipv6LinkLocalUnicastTest
-	ipv6LinkLocalUnicastUDPTests []ipv6LinkLocalUnicastTest
-)
-
-func setupTestData() {
-	if supportsIPv4 {
-		resolveTCPAddrTests = append(resolveTCPAddrTests, []resolveTCPAddrTest{
-			{"tcp", "localhost:1", &TCPAddr{IP: IPv4(127, 0, 0, 1), Port: 1}, nil},
-			{"tcp4", "localhost:2", &TCPAddr{IP: IPv4(127, 0, 0, 1), Port: 2}, nil},
-		}...)
-		resolveUDPAddrTests = append(resolveUDPAddrTests, []resolveUDPAddrTest{
-			{"udp", "localhost:1", &UDPAddr{IP: IPv4(127, 0, 0, 1), Port: 1}, nil},
-			{"udp4", "localhost:2", &UDPAddr{IP: IPv4(127, 0, 0, 1), Port: 2}, nil},
-		}...)
-		resolveIPAddrTests = append(resolveIPAddrTests, []resolveIPAddrTest{
-			{"ip", "localhost", &IPAddr{IP: IPv4(127, 0, 0, 1)}, nil},
-			{"ip4", "localhost", &IPAddr{IP: IPv4(127, 0, 0, 1)}, nil},
-		}...)
-	}
-
-	if supportsIPv6 {
-		resolveTCPAddrTests = append(resolveTCPAddrTests, resolveTCPAddrTest{"tcp6", "localhost:3", &TCPAddr{IP: IPv6loopback, Port: 3}, nil})
-		resolveUDPAddrTests = append(resolveUDPAddrTests, resolveUDPAddrTest{"udp6", "localhost:3", &UDPAddr{IP: IPv6loopback, Port: 3}, nil})
-		resolveIPAddrTests = append(resolveIPAddrTests, resolveIPAddrTest{"ip6", "localhost", &IPAddr{IP: IPv6loopback}, nil})
-	}
-
-	ifi := loopbackInterface()
-	if ifi != nil {
-		index := fmt.Sprintf("%v", ifi.Index)
-		resolveTCPAddrTests = append(resolveTCPAddrTests, []resolveTCPAddrTest{
-			{"tcp6", "[fe80::1%" + ifi.Name + "]:1", &TCPAddr{IP: ParseIP("fe80::1"), Port: 1, Zone: zoneToString(ifi.Index)}, nil},
-			{"tcp6", "[fe80::1%" + index + "]:2", &TCPAddr{IP: ParseIP("fe80::1"), Port: 2, Zone: index}, nil},
-		}...)
-		resolveUDPAddrTests = append(resolveUDPAddrTests, []resolveUDPAddrTest{
-			{"udp6", "[fe80::1%" + ifi.Name + "]:1", &UDPAddr{IP: ParseIP("fe80::1"), Port: 1, Zone: zoneToString(ifi.Index)}, nil},
-			{"udp6", "[fe80::1%" + index + "]:2", &UDPAddr{IP: ParseIP("fe80::1"), Port: 2, Zone: index}, nil},
-		}...)
-		resolveIPAddrTests = append(resolveIPAddrTests, []resolveIPAddrTest{
-			{"ip6", "fe80::1%" + ifi.Name, &IPAddr{IP: ParseIP("fe80::1"), Zone: zoneToString(ifi.Index)}, nil},
-			{"ip6", "fe80::1%" + index, &IPAddr{IP: ParseIP("fe80::1"), Zone: index}, nil},
-		}...)
-	}
-
-	addr := ipv6LinkLocalUnicastAddr(ifi)
-	if addr != "" {
-		if runtime.GOOS != "dragonfly" {
-			ipv6LinkLocalUnicastTCPTests = append(ipv6LinkLocalUnicastTCPTests, []ipv6LinkLocalUnicastTest{
-				{"tcp", "[" + addr + "%" + ifi.Name + "]:0", false},
-			}...)
-			ipv6LinkLocalUnicastUDPTests = append(ipv6LinkLocalUnicastUDPTests, []ipv6LinkLocalUnicastTest{
-				{"udp", "[" + addr + "%" + ifi.Name + "]:0", false},
-			}...)
-		}
-		ipv6LinkLocalUnicastTCPTests = append(ipv6LinkLocalUnicastTCPTests, []ipv6LinkLocalUnicastTest{
-			{"tcp6", "[" + addr + "%" + ifi.Name + "]:0", false},
-		}...)
-		ipv6LinkLocalUnicastUDPTests = append(ipv6LinkLocalUnicastUDPTests, []ipv6LinkLocalUnicastTest{
-			{"udp6", "[" + addr + "%" + ifi.Name + "]:0", false},
-		}...)
-		switch runtime.GOOS {
-		case "darwin", "dragonfly", "freebsd", "openbsd", "netbsd":
-			ipv6LinkLocalUnicastTCPTests = append(ipv6LinkLocalUnicastTCPTests, []ipv6LinkLocalUnicastTest{
-				{"tcp", "[localhost%" + ifi.Name + "]:0", true},
-				{"tcp6", "[localhost%" + ifi.Name + "]:0", true},
-			}...)
-			ipv6LinkLocalUnicastUDPTests = append(ipv6LinkLocalUnicastUDPTests, []ipv6LinkLocalUnicastTest{
-				{"udp", "[localhost%" + ifi.Name + "]:0", true},
-				{"udp6", "[localhost%" + ifi.Name + "]:0", true},
-			}...)
-		case "linux":
-			ipv6LinkLocalUnicastTCPTests = append(ipv6LinkLocalUnicastTCPTests, []ipv6LinkLocalUnicastTest{
-				{"tcp", "[ip6-localhost%" + ifi.Name + "]:0", true},
-				{"tcp6", "[ip6-localhost%" + ifi.Name + "]:0", true},
-			}...)
-			ipv6LinkLocalUnicastUDPTests = append(ipv6LinkLocalUnicastUDPTests, []ipv6LinkLocalUnicastTest{
-				{"udp", "[ip6-localhost%" + ifi.Name + "]:0", true},
-				{"udp6", "[ip6-localhost%" + ifi.Name + "]:0", true},
-			}...)
-		}
-	}
-}
-
-func printRunningGoroutines() {
-	gss := runningGoroutines()
-	if len(gss) == 0 {
-		return
-	}
-	fmt.Fprintf(os.Stderr, "Running goroutines:\n")
-	for _, gs := range gss {
-		fmt.Fprintf(os.Stderr, "%v\n", gs)
-	}
-	fmt.Fprintf(os.Stderr, "\n")
-}
-
-// runningGoroutines returns a list of remaining goroutines.
-func runningGoroutines() []string {
-	var gss []string
-	b := make([]byte, 2<<20)
-	b = b[:runtime.Stack(b, true)]
-	for _, s := range strings.Split(string(b), "\n\n") {
-		ss := strings.SplitN(s, "\n", 2)
-		if len(ss) != 2 {
-			continue
-		}
-		stack := strings.TrimSpace(ss[1])
-		if !strings.Contains(stack, "created by net") {
-			continue
-		}
-		gss = append(gss, stack)
-	}
-	sort.Strings(gss)
-	return gss
-}
-
-func printInflightSockets() {
-	sos := sw.Sockets()
-	if len(sos) == 0 {
-		return
-	}
-	fmt.Fprintf(os.Stderr, "Inflight sockets:\n")
-	for s, so := range sos {
-		fmt.Fprintf(os.Stderr, "%v: %v\n", s, so)
-	}
-	fmt.Fprintf(os.Stderr, "\n")
-}
-
-func printSocketStats() {
-	sts := sw.Stats()
-	if len(sts) == 0 {
-		return
-	}
-	fmt.Fprintf(os.Stderr, "Socket statistical information:\n")
-	for _, st := range sts {
-		fmt.Fprintf(os.Stderr, "%v\n", st)
-	}
-	fmt.Fprintf(os.Stderr, "\n")
-}
diff --git a/src/net/main_unix_test.go b/src/net/main_unix_test.go
deleted file mode 100644
index bfb4cd0..0000000
--- a/src/net/main_unix_test.go
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
-
-package net
-
-var (
-	// Placeholders for saving original socket system calls.
-	origSocket        = socketFunc
-	origClose         = closeFunc
-	origConnect       = connectFunc
-	origListen        = listenFunc
-	origAccept        = acceptFunc
-	origGetsockoptInt = getsockoptIntFunc
-
-	extraTestHookInstallers   []func()
-	extraTestHookUninstallers []func()
-)
-
-func installTestHooks() {
-	socketFunc = sw.Socket
-	closeFunc = sw.Close
-	connectFunc = sw.Connect
-	listenFunc = sw.Listen
-	acceptFunc = sw.Accept
-	getsockoptIntFunc = sw.GetsockoptInt
-
-	for _, fn := range extraTestHookInstallers {
-		fn()
-	}
-}
-
-func uninstallTestHooks() {
-	socketFunc = origSocket
-	closeFunc = origClose
-	connectFunc = origConnect
-	listenFunc = origListen
-	acceptFunc = origAccept
-	getsockoptIntFunc = origGetsockoptInt
-
-	for _, fn := range extraTestHookUninstallers {
-		fn()
-	}
-}
-
-func forceCloseSockets() {
-	for s := range sw.Sockets() {
-		closeFunc(s)
-	}
-}
diff --git a/src/net/main_windows_test.go b/src/net/main_windows_test.go
deleted file mode 100644
index 2d82974..0000000
--- a/src/net/main_windows_test.go
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package net
-
-var (
-	// Placeholders for saving original socket system calls.
-	origSocket      = socketFunc
-	origClosesocket = closeFunc
-	origConnect     = connectFunc
-	origConnectEx   = connectExFunc
-	origListen      = listenFunc
-)
-
-func installTestHooks() {
-	socketFunc = sw.Socket
-	closeFunc = sw.Closesocket
-	connectFunc = sw.Connect
-	connectExFunc = sw.ConnectEx
-	listenFunc = sw.Listen
-}
-
-func uninstallTestHooks() {
-	socketFunc = origSocket
-	closeFunc = origClosesocket
-	connectFunc = origConnect
-	connectExFunc = origConnectEx
-	listenFunc = origListen
-}
-
-func forceCloseSockets() {
-	for s := range sw.Sockets() {
-		closeFunc(s)
-	}
-}
diff --git a/src/net/non_unix_test.go b/src/net/non_unix_test.go
deleted file mode 100644
index eddca56..0000000
--- a/src/net/non_unix_test.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build nacl plan9 windows
-
-package net
-
-// See unix_test.go for what these (don't) do.
-func forceGoDNS() func() { return func() {} }
-func forceCgoDNS() bool  { return false }
diff --git a/src/net/nss.go b/src/net/nss.go
deleted file mode 100644
index 08c3e6a..0000000
--- a/src/net/nss.go
+++ /dev/null
@@ -1,159 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package net
-
-import (
-	"errors"
-	"io"
-	"os"
-)
-
-// nssConf represents the state of the machine's /etc/nsswitch.conf file.
-type nssConf struct {
-	err     error                  // any error encountered opening or parsing the file
-	sources map[string][]nssSource // keyed by database (e.g. "hosts")
-}
-
-type nssSource struct {
-	source   string // e.g. "compat", "files", "mdns4_minimal"
-	criteria []nssCriterion
-}
-
-// standardCriteria reports all specified criteria have the default
-// status actions.
-func (s nssSource) standardCriteria() bool {
-	for i, crit := range s.criteria {
-		if !crit.standardStatusAction(i == len(s.criteria)-1) {
-			return false
-		}
-	}
-	return true
-}
-
-// nssCriterion is the parsed structure of one of the criteria in brackets
-// after an NSS source name.
-type nssCriterion struct {
-	negate bool   // if "!" was present
-	status string // e.g. "success", "unavail" (lowercase)
-	action string // e.g. "return", "continue" (lowercase)
-}
-
-// standardStatusAction reports whether c is equivalent to not
-// specifying the criterion at all. last is whether this criteria is the
-// last in the list.
-func (c nssCriterion) standardStatusAction(last bool) bool {
-	if c.negate {
-		return false
-	}
-	var def string
-	switch c.status {
-	case "success":
-		def = "return"
-	case "notfound", "unavail", "tryagain":
-		def = "continue"
-	default:
-		// Unknown status
-		return false
-	}
-	if last && c.action == "return" {
-		return true
-	}
-	return c.action == def
-}
-
-func parseNSSConfFile(file string) *nssConf {
-	f, err := os.Open(file)
-	if err != nil {
-		return &nssConf{err: err}
-	}
-	defer f.Close()
-	return parseNSSConf(f)
-}
-
-func parseNSSConf(r io.Reader) *nssConf {
-	slurp, err := readFull(r)
-	if err != nil {
-		return &nssConf{err: err}
-	}
-	conf := new(nssConf)
-	conf.err = foreachLine(slurp, func(line []byte) error {
-		line = trimSpace(removeComment(line))
-		if len(line) == 0 {
-			return nil
-		}
-		colon := bytesIndexByte(line, ':')
-		if colon == -1 {
-			return errors.New("no colon on line")
-		}
-		db := string(trimSpace(line[:colon]))
-		srcs := line[colon+1:]
-		for {
-			srcs = trimSpace(srcs)
-			if len(srcs) == 0 {
-				break
-			}
-			sp := bytesIndexByte(srcs, ' ')
-			var src string
-			if sp == -1 {
-				src = string(srcs)
-				srcs = nil // done
-			} else {
-				src = string(srcs[:sp])
-				srcs = trimSpace(srcs[sp+1:])
-			}
-			var criteria []nssCriterion
-			// See if there's a criteria block in brackets.
-			if len(srcs) > 0 && srcs[0] == '[' {
-				bclose := bytesIndexByte(srcs, ']')
-				if bclose == -1 {
-					return errors.New("unclosed criterion bracket")
-				}
-				var err error
-				criteria, err = parseCriteria(srcs[1:bclose])
-				if err != nil {
-					return errors.New("invalid criteria: " + string(srcs[1:bclose]))
-				}
-				srcs = srcs[bclose+1:]
-			}
-			if conf.sources == nil {
-				conf.sources = make(map[string][]nssSource)
-			}
-			conf.sources[db] = append(conf.sources[db], nssSource{
-				source:   src,
-				criteria: criteria,
-			})
-		}
-		return nil
-	})
-	return conf
-}
-
-// parses "foo=bar !foo=bar"
-func parseCriteria(x []byte) (c []nssCriterion, err error) {
-	err = foreachField(x, func(f []byte) error {
-		not := false
-		if len(f) > 0 && f[0] == '!' {
-			not = true
-			f = f[1:]
-		}
-		if len(f) < 3 {
-			return errors.New("criterion too short")
-		}
-		eq := bytesIndexByte(f, '=')
-		if eq == -1 {
-			return errors.New("criterion lacks equal sign")
-		}
-		lowerASCIIBytes(f)
-		c = append(c, nssCriterion{
-			negate: not,
-			status: string(f[:eq]),
-			action: string(f[eq+1:]),
-		})
-		return nil
-	})
-	return
-}
diff --git a/src/net/nss_test.go b/src/net/nss_test.go
deleted file mode 100644
index 371deb5..0000000
--- a/src/net/nss_test.go
+++ /dev/null
@@ -1,169 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package net
-
-import (
-	"reflect"
-	"strings"
-	"testing"
-)
-
-const ubuntuTrustyAvahi = `# /etc/nsswitch.conf
-#
-# Example configuration of GNU Name Service Switch functionality.
-# If you have the libc-doc-reference' and nfo' packages installed, try:
-# nfo libc "Name Service Switch"' for information about this file.
-
-passwd:         compat
-group:          compat
-shadow:         compat
-
-hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4
-networks:       files
-
-protocols:      db files
-services:       db files
-ethers:         db files
-rpc:            db files
-
-netgroup:       nis
-`
-
-func TestParseNSSConf(t *testing.T) {
-	tests := []struct {
-		name string
-		in   string
-		want *nssConf
-	}{
-		{
-			name: "no_newline",
-			in:   "foo: a b",
-			want: &nssConf{
-				sources: map[string][]nssSource{
-					"foo": {{source: "a"}, {source: "b"}},
-				},
-			},
-		},
-		{
-			name: "newline",
-			in:   "foo: a b\n",
-			want: &nssConf{
-				sources: map[string][]nssSource{
-					"foo": {{source: "a"}, {source: "b"}},
-				},
-			},
-		},
-		{
-			name: "whitespace",
-			in:   "   foo:a    b    \n",
-			want: &nssConf{
-				sources: map[string][]nssSource{
-					"foo": {{source: "a"}, {source: "b"}},
-				},
-			},
-		},
-		{
-			name: "comment1",
-			in:   "   foo:a    b#c\n",
-			want: &nssConf{
-				sources: map[string][]nssSource{
-					"foo": {{source: "a"}, {source: "b"}},
-				},
-			},
-		},
-		{
-			name: "comment2",
-			in:   "   foo:a    b #c \n",
-			want: &nssConf{
-				sources: map[string][]nssSource{
-					"foo": {{source: "a"}, {source: "b"}},
-				},
-			},
-		},
-		{
-			name: "crit",
-			in:   "   foo:a    b [!a=b    X=Y ] c#d \n",
-			want: &nssConf{
-				sources: map[string][]nssSource{
-					"foo": {
-						{source: "a"},
-						{
-							source: "b",
-							criteria: []nssCriterion{
-								{
-									negate: true,
-									status: "a",
-									action: "b",
-								},
-								{
-									status: "x",
-									action: "y",
-								},
-							},
-						},
-						{source: "c"},
-					},
-				},
-			},
-		},
-
-		// Ubuntu Trusty w/ avahi-daemon, libavahi-* etc installed.
-		{
-			name: "ubuntu_trusty_avahi",
-			in:   ubuntuTrustyAvahi,
-			want: &nssConf{
-				sources: map[string][]nssSource{
-					"passwd": {{source: "compat"}},
-					"group":  {{source: "compat"}},
-					"shadow": {{source: "compat"}},
-					"hosts": {
-						{source: "files"},
-						{
-							source: "mdns4_minimal",
-							criteria: []nssCriterion{
-								{
-									negate: false,
-									status: "notfound",
-									action: "return",
-								},
-							},
-						},
-						{source: "dns"},
-						{source: "mdns4"},
-					},
-					"networks": {{source: "files"}},
-					"protocols": {
-						{source: "db"},
-						{source: "files"},
-					},
-					"services": {
-						{source: "db"},
-						{source: "files"},
-					},
-					"ethers": {
-						{source: "db"},
-						{source: "files"},
-					},
-					"rpc": {
-						{source: "db"},
-						{source: "files"},
-					},
-					"netgroup": {
-						{source: "nis"},
-					},
-				},
-			},
-		},
-	}
-
-	for _, tt := range tests {
-		gotConf := parseNSSConf(strings.NewReader(tt.in))
-		if !reflect.DeepEqual(gotConf, tt.want) {
-			t.Errorf("%s: mismatch\n got %#v\nwant %#v", tt.name, gotConf, tt.want)
-		}
-	}
-}
diff --git a/src/net/platform_test.go b/src/net/platform_test.go
deleted file mode 100644
index d624852..0000000
--- a/src/net/platform_test.go
+++ /dev/null
@@ -1,159 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package net
-
-import (
-	"os"
-	"runtime"
-	"strings"
-	"testing"
-)
-
-// testableNetwork reports whether network is testable on the current
-// platform configuration.
-func testableNetwork(network string) bool {
-	ss := strings.Split(network, ":")
-	switch ss[0] {
-	case "ip+nopriv":
-		switch runtime.GOOS {
-		case "nacl":
-			return false
-		}
-	case "ip", "ip4", "ip6":
-		switch runtime.GOOS {
-		case "nacl", "plan9":
-			return false
-		default:
-			if os.Getuid() != 0 {
-				return false
-			}
-		}
-	case "unix", "unixgram":
-		switch runtime.GOOS {
-		case "nacl", "plan9", "windows":
-			return false
-		}
-		// iOS does not support unix, unixgram.
-		if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") {
-			return false
-		}
-	case "unixpacket":
-		switch runtime.GOOS {
-		case "android", "darwin", "nacl", "plan9", "windows":
-			fallthrough
-		case "freebsd": // FreeBSD 8 and below don't support unixpacket
-			return false
-		}
-	}
-	switch ss[0] {
-	case "tcp4", "udp4", "ip4":
-		if !supportsIPv4 {
-			return false
-		}
-	case "tcp6", "udp6", "ip6":
-		if !supportsIPv6 {
-			return false
-		}
-	}
-	return true
-}
-
-// testableAddress reports whether address of network is testable on
-// the current platform configuration.
-func testableAddress(network, address string) bool {
-	switch ss := strings.Split(network, ":"); ss[0] {
-	case "unix", "unixgram", "unixpacket":
-		// Abstract unix domain sockets, a Linux-ism.
-		if address[0] == '@' && runtime.GOOS != "linux" {
-			return false
-		}
-	}
-	return true
-}
-
-// testableListenArgs reports whether arguments are testable on the
-// current platform configuration.
-func testableListenArgs(network, address, client string) bool {
-	if !testableNetwork(network) || !testableAddress(network, address) {
-		return false
-	}
-
-	var err error
-	var addr Addr
-	switch ss := strings.Split(network, ":"); ss[0] {
-	case "tcp", "tcp4", "tcp6":
-		addr, err = ResolveTCPAddr("tcp", address)
-	case "udp", "udp4", "udp6":
-		addr, err = ResolveUDPAddr("udp", address)
-	case "ip", "ip4", "ip6":
-		addr, err = ResolveIPAddr("ip", address)
-	default:
-		return true
-	}
-	if err != nil {
-		return false
-	}
-	var ip IP
-	var wildcard bool
-	switch addr := addr.(type) {
-	case *TCPAddr:
-		ip = addr.IP
-		wildcard = addr.isWildcard()
-	case *UDPAddr:
-		ip = addr.IP
-		wildcard = addr.isWildcard()
-	case *IPAddr:
-		ip = addr.IP
-		wildcard = addr.isWildcard()
-	}
-
-	// Test wildcard IP addresses.
-	if wildcard && (testing.Short() || !*testExternal) {
-		return false
-	}
-
-	// Test functionality of IPv4 communication using AF_INET and
-	// IPv6 communication using AF_INET6 sockets.
-	if !supportsIPv4 && ip.To4() != nil {
-		return false
-	}
-	if !supportsIPv6 && ip.To16() != nil && ip.To4() == nil {
-		return false
-	}
-	cip := ParseIP(client)
-	if cip != nil {
-		if !supportsIPv4 && cip.To4() != nil {
-			return false
-		}
-		if !supportsIPv6 && cip.To16() != nil && cip.To4() == nil {
-			return false
-		}
-	}
-
-	// Test functionality of IPv4 communication using AF_INET6
-	// sockets.
-	if !supportsIPv4map && (network == "tcp" || network == "udp" || network == "ip") && wildcard {
-		// At this point, we prefer IPv4 when ip is nil.
-		// See favoriteAddrFamily for further information.
-		if ip.To16() != nil && ip.To4() == nil && cip.To4() != nil { // a pair of IPv6 server and IPv4 client
-			return false
-		}
-		if (ip.To4() != nil || ip == nil) && cip.To16() != nil && cip.To4() == nil { // a pair of IPv4 server and IPv6 client
-			return false
-		}
-	}
-
-	return true
-}
-
-var condFatalf = func() func(*testing.T, string, ...interface{}) {
-	// A few APIs, File, Read/WriteMsg{UDP,IP}, are not
-	// implemented yet on both Plan 9 and Windows.
-	switch runtime.GOOS {
-	case "plan9", "windows":
-		return (*testing.T).Logf
-	}
-	return (*testing.T).Fatalf
-}()
diff --git a/src/net/sendfile_solaris.go b/src/net/sendfile_solaris.go
deleted file mode 100644
index 0966575..0000000
--- a/src/net/sendfile_solaris.go
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package net
-
-import (
-	"io"
-	"os"
-	"syscall"
-)
-
-// Not strictly needed, but very helpful for debugging, see issue #10221.
-//go:cgo_import_dynamic _ _ "libsendfile.so"
-//go:cgo_import_dynamic _ _ "libsocket.so"
-
-// maxSendfileSize is the largest chunk size we ask the kernel to copy
-// at a time.
-const maxSendfileSize int = 4 << 20
-
-// sendFile copies the contents of r to c using the sendfile
-// system call to minimize copies.
-//
-// if handled == true, sendFile returns the number of bytes copied and any
-// non-EOF error.
-//
-// if handled == false, sendFile performed no work.
-func sendFile(c *netFD, r io.Reader) (written int64, err error, handled bool) {
-	// Solaris uses 0 as the "until EOF" value. If you pass in more bytes than the
-	// file contains, it will loop back to the beginning ad nauseam until it's sent
-	// exactly the number of bytes told to. As such, we need to know exactly how many
-	// bytes to send.
-	var remain int64 = 0
-
-	lr, ok := r.(*io.LimitedReader)
-	if ok {
-		remain, r = lr.N, lr.R
-		if remain <= 0 {
-			return 0, nil, true
-		}
-	}
-	f, ok := r.(*os.File)
-	if !ok {
-		return 0, nil, false
-	}
-
-	if remain == 0 {
-		fi, err := f.Stat()
-		if err != nil {
-			return 0, err, false
-		}
-
-		remain = fi.Size()
-	}
-
-	// The other quirk with Solaris's sendfile implementation is that it doesn't
-	// use the current position of the file -- if you pass it offset 0, it starts
-	// from offset 0. There's no way to tell it "start from current position", so
-	// we have to manage that explicitly.
-	pos, err := f.Seek(0, os.SEEK_CUR)
-	if err != nil {
-		return 0, err, false
-	}
-
-	if err := c.writeLock(); err != nil {
-		return 0, err, true
-	}
-	defer c.writeUnlock()
-
-	dst := c.sysfd
-	src := int(f.Fd())
-	for remain > 0 {
-		n := maxSendfileSize
-		if int64(n) > remain {
-			n = int(remain)
-		}
-		pos1 := pos
-		n, err1 := syscall.Sendfile(dst, src, &pos1, n)
-		if n > 0 {
-			pos += int64(n)
-			written += int64(n)
-			remain -= int64(n)
-		}
-		if n == 0 && err1 == nil {
-			break
-		}
-		if err1 == syscall.EAGAIN {
-			if err1 = c.pd.WaitWrite(); err1 == nil {
-				continue
-			}
-		}
-		if err1 == syscall.EINTR {
-			continue
-		}
-		if err1 != nil {
-			// This includes syscall.ENOSYS (no kernel
-			// support) and syscall.EINVAL (fd types which
-			// don't implement sendfile)
-			err = err1
-			break
-		}
-	}
-	if lr != nil {
-		lr.N = remain
-	}
-	if err != nil {
-		err = os.NewSyscallError("sendfile", err)
-	}
-	return written, err, written > 0
-}
diff --git a/src/net/tcpsockopt_solaris.go b/src/net/tcpsockopt_solaris.go
deleted file mode 100644
index 31f5df0..0000000
--- a/src/net/tcpsockopt_solaris.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package net
-
-import (
-	"os"
-	"syscall"
-	"time"
-)
-
-func setKeepAlivePeriod(fd *netFD, d time.Duration) error {
-	if err := fd.incref(); err != nil {
-		return err
-	}
-	defer fd.decref()
-	// The kernel expects milliseconds so round to next highest
-	// millisecond.
-	d += (time.Millisecond - time.Nanosecond)
-	msecs := int(d / time.Millisecond)
-
-	// Normally we'd do
-	//	syscall.SetsockoptInt(fd.sysfd, syscall.IPPROTO_TCP, syscall.TCP_KEEPINTVL, secs)
-	// here, but we can't because Solaris does not have TCP_KEEPINTVL.
-	// Solaris has TCP_KEEPALIVE_ABORT_THRESHOLD, but it's not the same
-	// thing, it refers to the total time until aborting (not between
-	// probes), and it uses an exponential backoff algorithm instead of
-	// waiting the same time between probes. We can't hope for the best
-	// and do it anyway, like on Darwin, because Solaris might eventually
-	// allocate a constant with a different meaning for the value of
-	// TCP_KEEPINTVL on illumos.
-
-	return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(fd.sysfd, syscall.IPPROTO_TCP, syscall.TCP_KEEPALIVE_THRESHOLD, msecs))
-}
diff --git a/src/net/testdata/ipv4-hosts b/src/net/testdata/ipv4-hosts
deleted file mode 100644
index 5208bb4..0000000
--- a/src/net/testdata/ipv4-hosts
+++ /dev/null
@@ -1,12 +0,0 @@
-# See https://tools.ietf.org/html/rfc1123.
-#
-# The literal IPv4 address parser in the net package is a relaxed
-# one. It may accept a literal IPv4 address in dotted-decimal notation
-# with leading zeros such as "001.2.003.4".
-
-# internet address and host name
-127.0.0.1	localhost	# inline comment separated by tab
-127.000.000.002	localhost       # inline comment separated by space
-
-# internet address, host name and aliases
-127.000.000.003	localhost	localhost.localdomain
diff --git a/src/net/testdata/ipv6-hosts b/src/net/testdata/ipv6-hosts
deleted file mode 100644
index f78b7fc..0000000
--- a/src/net/testdata/ipv6-hosts
+++ /dev/null
@@ -1,11 +0,0 @@
-# See https://tools.ietf.org/html/rfc5952, https://tools.ietf.org/html/rfc4007.
-
-# internet address and host name
-::1						localhost	# inline comment separated by tab
-fe80:0000:0000:0000:0000:0000:0000:0001		localhost       # inline comment separated by space
-
-# internet address with zone identifier and host name
-fe80:0000:0000:0000:0000:0000:0000:0002%lo0	localhost
-
-# internet address, host name and aliases
-fe80::3%lo0					localhost	localhost.localdomain
diff --git a/src/net/testdata/openbsd-resolv.conf b/src/net/testdata/openbsd-resolv.conf
deleted file mode 100644
index 8281a91..0000000
--- a/src/net/testdata/openbsd-resolv.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-# Generated by vio0 dhclient
-search c.symbolic-datum-552.internal.
-nameserver 169.254.169.254
-nameserver 10.240.0.1
-lookup file bind
diff --git a/src/net/testdata/singleline-hosts b/src/net/testdata/singleline-hosts
deleted file mode 100644
index 5f5f74a..0000000
--- a/src/net/testdata/singleline-hosts
+++ /dev/null
@@ -1 +0,0 @@
-127.0.0.2	odin
\ No newline at end of file
diff --git a/src/os/exec/exec_posix.go b/src/os/exec/exec_posix.go
deleted file mode 100644
index 5e11137..0000000
--- a/src/os/exec/exec_posix.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !plan9
-
-package exec
-
-import (
-	"os"
-	"syscall"
-)
-
-func init() {
-	skipStdinCopyError = func(err error) bool {
-		// Ignore EPIPE errors copying to stdin if the program
-		// completed successfully otherwise.
-		// See Issue 9173.
-		pe, ok := err.(*os.PathError)
-		return ok &&
-			pe.Op == "write" && pe.Path == "|1" &&
-			pe.Err == syscall.EPIPE
-	}
-}
diff --git a/src/os/signal/signal_plan9.go b/src/os/signal/signal_plan9.go
deleted file mode 100644
index b065ae5..0000000
--- a/src/os/signal/signal_plan9.go
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package signal
-
-import (
-	"os"
-	"syscall"
-)
-
-var sigtab = make(map[os.Signal]int)
-
-// In sig.s; jumps to runtime.
-func signal_disable(uint32)
-func signal_enable(uint32)
-func signal_ignore(uint32)
-func signal_recv() string
-
-func init() {
-	signal_enable(0) // first call - initialize
-	go loop()
-}
-
-func loop() {
-	for {
-		process(syscall.Note(signal_recv()))
-	}
-}
-
-const numSig = 256
-
-func signum(sig os.Signal) int {
-	switch sig := sig.(type) {
-	case syscall.Note:
-		n, ok := sigtab[sig]
-		if !ok {
-			n = len(sigtab) + 1
-			if n > numSig {
-				return -1
-			}
-			sigtab[sig] = n
-		}
-		return n
-	default:
-		return -1
-	}
-}
-
-func enableSignal(sig int) {
-	signal_enable(uint32(sig))
-}
-
-func disableSignal(sig int) {
-	signal_disable(uint32(sig))
-}
-
-func ignoreSignal(sig int) {
-	signal_ignore(uint32(sig))
-}
diff --git a/src/os/signal/signal_plan9_test.go b/src/os/signal/signal_plan9_test.go
deleted file mode 100644
index 10bfdc3..0000000
--- a/src/os/signal/signal_plan9_test.go
+++ /dev/null
@@ -1,181 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package signal
-
-import (
-	"os"
-	"runtime"
-	"syscall"
-	"testing"
-	"time"
-)
-
-func waitSig(t *testing.T, c <-chan os.Signal, sig os.Signal) {
-	select {
-	case s := <-c:
-		if s != sig {
-			t.Fatalf("signal was %v, want %v", s, sig)
-		}
-	case <-time.After(1 * time.Second):
-		t.Fatalf("timeout waiting for %v", sig)
-	}
-}
-
-// Test that basic signal handling works.
-func TestSignal(t *testing.T) {
-	// Ask for hangup
-	c := make(chan os.Signal, 1)
-	Notify(c, syscall.Note("hangup"))
-	defer Stop(c)
-
-	// Send this process a hangup
-	t.Logf("hangup...")
-	postNote(syscall.Getpid(), "hangup")
-	waitSig(t, c, syscall.Note("hangup"))
-
-	// Ask for everything we can get.
-	c1 := make(chan os.Signal, 1)
-	Notify(c1)
-
-	// Send this process an alarm
-	t.Logf("alarm...")
-	postNote(syscall.Getpid(), "alarm")
-	waitSig(t, c1, syscall.Note("alarm"))
-
-	// Send two more hangups, to make sure that
-	// they get delivered on c1 and that not reading
-	// from c does not block everything.
-	t.Logf("hangup...")
-	postNote(syscall.Getpid(), "hangup")
-	waitSig(t, c1, syscall.Note("hangup"))
-	t.Logf("hangup...")
-	postNote(syscall.Getpid(), "hangup")
-	waitSig(t, c1, syscall.Note("hangup"))
-
-	// The first SIGHUP should be waiting for us on c.
-	waitSig(t, c, syscall.Note("hangup"))
-}
-
-func TestStress(t *testing.T) {
-	dur := 3 * time.Second
-	if testing.Short() {
-		dur = 100 * time.Millisecond
-	}
-	defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(4))
-	done := make(chan bool)
-	finished := make(chan bool)
-	go func() {
-		sig := make(chan os.Signal, 1)
-		Notify(sig, syscall.Note("alarm"))
-		defer Stop(sig)
-	Loop:
-		for {
-			select {
-			case <-sig:
-			case <-done:
-				break Loop
-			}
-		}
-		finished <- true
-	}()
-	go func() {
-	Loop:
-		for {
-			select {
-			case <-done:
-				break Loop
-			default:
-				postNote(syscall.Getpid(), "alarm")
-				runtime.Gosched()
-			}
-		}
-		finished <- true
-	}()
-	time.Sleep(dur)
-	close(done)
-	<-finished
-	<-finished
-	// When run with 'go test -cpu=1,2,4' alarm from this test can slip
-	// into subsequent TestSignal() causing failure.
-	// Sleep for a while to reduce the possibility of the failure.
-	time.Sleep(10 * time.Millisecond)
-}
-
-// Test that Stop cancels the channel's registrations.
-func TestStop(t *testing.T) {
-	if testing.Short() {
-		t.Skip("skipping in short mode")
-	}
-	sigs := []string{
-		"alarm",
-		"hangup",
-	}
-
-	for _, sig := range sigs {
-		// Send the signal.
-		// If it's alarm, we should not see it.
-		// If it's hangup, maybe we'll die. Let the flag tell us what to do.
-		if sig != "hangup" {
-			postNote(syscall.Getpid(), sig)
-		}
-		time.Sleep(100 * time.Millisecond)
-
-		// Ask for signal
-		c := make(chan os.Signal, 1)
-		Notify(c, syscall.Note(sig))
-		defer Stop(c)
-
-		// Send this process that signal
-		postNote(syscall.Getpid(), sig)
-		waitSig(t, c, syscall.Note(sig))
-
-		Stop(c)
-		select {
-		case s := <-c:
-			t.Fatalf("unexpected signal %v", s)
-		case <-time.After(100 * time.Millisecond):
-			// nothing to read - good
-		}
-
-		// Send the signal.
-		// If it's alarm, we should not see it.
-		// If it's hangup, maybe we'll die. Let the flag tell us what to do.
-		if sig != "hangup" {
-			postNote(syscall.Getpid(), sig)
-		}
-
-		select {
-		case s := <-c:
-			t.Fatalf("unexpected signal %v", s)
-		case <-time.After(100 * time.Millisecond):
-			// nothing to read - good
-		}
-	}
-}
-
-func itoa(val int) string {
-	if val < 0 {
-		return "-" + itoa(-val)
-	}
-	var buf [32]byte // big enough for int64
-	i := len(buf) - 1
-	for val >= 10 {
-		buf[i] = byte(val%10 + '0')
-		i--
-		val /= 10
-	}
-	buf[i] = byte(val + '0')
-	return string(buf[i:])
-}
-
-func postNote(pid int, note string) error {
-	f, err := os.OpenFile("/proc/"+itoa(pid)+"/note", os.O_WRONLY, 0)
-	if err != nil {
-		return err
-	}
-	defer f.Close()
-	_, err = f.Write([]byte(note))
-	return err
-}
diff --git a/src/os/sticky_bsd.go b/src/os/sticky_bsd.go
deleted file mode 100644
index 6b54c75..0000000
--- a/src/os/sticky_bsd.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd netbsd openbsd solaris
-
-package os
-
-// According to sticky(8), neither open(2) nor mkdir(2) will create
-// a file with the sticky bit set.
-const supportsCreateWithStickyBit = false
diff --git a/src/os/sticky_notbsd.go b/src/os/sticky_notbsd.go
deleted file mode 100644
index 834e79b..0000000
--- a/src/os/sticky_notbsd.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !darwin
-// +build !dragonfly
-// +build !freebsd
-// +build !netbsd
-// +build !openbsd
-// +build !solaris
-
-package os
-
-const supportsCreateWithStickyBit = true
diff --git a/src/reflect/asm_arm64.s b/src/reflect/asm_arm64.s
deleted file mode 100644
index bdd3843..0000000
--- a/src/reflect/asm_arm64.s
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2012 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-#include "funcdata.h"
-
-// makeFuncStub is the code half of the function returned by MakeFunc.
-// See the comment on the declaration of makeFuncStub in makefunc.go
-// for more details.
-// No arg size here, runtime pulls arg map out of the func value.
-TEXT ·makeFuncStub(SB),(NOSPLIT|WRAPPER),$24
-	NO_LOCAL_POINTERS
-	MOVD	R26, 8(RSP)
-	MOVD	$argframe+0(FP), R3
-	MOVD	R3, 16(RSP)
-	BL	·callReflect(SB)
-	RET
-
-// methodValueCall is the code half of the function returned by makeMethodValue.
-// See the comment on the declaration of methodValueCall in makefunc.go
-// for more details.
-// No arg size here; runtime pulls arg map out of the func value.
-TEXT ·methodValueCall(SB),(NOSPLIT|WRAPPER),$24
-	NO_LOCAL_POINTERS
-	MOVD	R26, 8(RSP)
-	MOVD	$argframe+0(FP), R3
-	MOVD	R3, 16(RSP)
-	BL	·callMethod(SB)
-	RET
diff --git a/src/reflect/asm_ppc64x.s b/src/reflect/asm_ppc64x.s
deleted file mode 100644
index d5f7f8f..0000000
--- a/src/reflect/asm_ppc64x.s
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2012 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ppc64 ppc64le
-
-#include "textflag.h"
-#include "funcdata.h"
-
-// makeFuncStub is the code half of the function returned by MakeFunc.
-// See the comment on the declaration of makeFuncStub in makefunc.go
-// for more details.
-// No arg size here, runtime pulls arg map out of the func value.
-TEXT ·makeFuncStub(SB),(NOSPLIT|WRAPPER),$16
-	NO_LOCAL_POINTERS
-	MOVD	R11, 8(R1)
-	MOVD	$argframe+0(FP), R3
-	MOVD	R3, 16(R1)
-	BL	·callReflect(SB)
-	RET
-
-// methodValueCall is the code half of the function returned by makeMethodValue.
-// See the comment on the declaration of methodValueCall in makefunc.go
-// for more details.
-// No arg size here; runtime pulls arg map out of the func value.
-TEXT ·methodValueCall(SB),(NOSPLIT|WRAPPER),$16
-	NO_LOCAL_POINTERS
-	MOVD	R11, 8(R1)
-	MOVD	$argframe+0(FP), R3
-	MOVD	R3, 16(R1)
-	BL	·callMethod(SB)
-	RET
diff --git a/src/regexp/backtrack.go b/src/regexp/backtrack.go
deleted file mode 100644
index fd95604..0000000
--- a/src/regexp/backtrack.go
+++ /dev/null
@@ -1,366 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// backtrack is a regular expression search with submatch
-// tracking for small regular expressions and texts. It allocates
-// a bit vector with (length of input) * (length of prog) bits,
-// to make sure it never explores the same (character position, instruction)
-// state multiple times. This limits the search to run in time linear in
-// the length of the test.
-//
-// backtrack is a fast replacement for the NFA code on small
-// regexps when onepass cannot be used.
-
-package regexp
-
-import "regexp/syntax"
-
-// A job is an entry on the backtracker's job stack. It holds
-// the instruction pc and the position in the input.
-type job struct {
-	pc  uint32
-	arg int
-	pos int
-}
-
-const (
-	visitedBits        = 32
-	maxBacktrackProg   = 500        // len(prog.Inst) <= max
-	maxBacktrackVector = 256 * 1024 // bit vector size <= max (bits)
-)
-
-// bitState holds state for the backtracker.
-type bitState struct {
-	prog *syntax.Prog
-
-	end     int
-	cap     []int
-	input   input
-	jobs    []job
-	visited []uint32
-}
-
-var notBacktrack *bitState = nil
-
-// maxBitStateLen returns the maximum length of a string to search with
-// the backtracker using prog.
-func maxBitStateLen(prog *syntax.Prog) int {
-	if !shouldBacktrack(prog) {
-		return 0
-	}
-	return maxBacktrackVector / len(prog.Inst)
-}
-
-// newBitState returns a new bitState for the given prog,
-// or notBacktrack if the size of the prog exceeds the maximum size that
-// the backtracker will be run for.
-func newBitState(prog *syntax.Prog) *bitState {
-	if !shouldBacktrack(prog) {
-		return notBacktrack
-	}
-	return &bitState{
-		prog: prog,
-	}
-}
-
-// shouldBacktrack reports whether the program is too
-// long for the backtracker to run.
-func shouldBacktrack(prog *syntax.Prog) bool {
-	return len(prog.Inst) <= maxBacktrackProg
-}
-
-// reset resets the state of the backtracker.
-// end is the end position in the input.
-// ncap is the number of captures.
-func (b *bitState) reset(end int, ncap int) {
-	b.end = end
-
-	if cap(b.jobs) == 0 {
-		b.jobs = make([]job, 0, 256)
-	} else {
-		b.jobs = b.jobs[:0]
-	}
-
-	visitedSize := (len(b.prog.Inst)*(end+1) + visitedBits - 1) / visitedBits
-	if cap(b.visited) < visitedSize {
-		b.visited = make([]uint32, visitedSize, maxBacktrackVector/visitedBits)
-	} else {
-		b.visited = b.visited[:visitedSize]
-		for i := range b.visited {
-			b.visited[i] = 0
-		}
-	}
-
-	if cap(b.cap) < ncap {
-		b.cap = make([]int, ncap)
-	} else {
-		b.cap = b.cap[:ncap]
-	}
-	for i := range b.cap {
-		b.cap[i] = -1
-	}
-}
-
-// shouldVisit reports whether the combination of (pc, pos) has not
-// been visited yet.
-func (b *bitState) shouldVisit(pc uint32, pos int) bool {
-	n := uint(int(pc)*(b.end+1) + pos)
-	if b.visited[n/visitedBits]&(1<<(n&(visitedBits-1))) != 0 {
-		return false
-	}
-	b.visited[n/visitedBits] |= 1 << (n & (visitedBits - 1))
-	return true
-}
-
-// push pushes (pc, pos, arg) onto the job stack if it should be
-// visited.
-func (b *bitState) push(pc uint32, pos int, arg int) {
-	if b.prog.Inst[pc].Op == syntax.InstFail {
-		return
-	}
-
-	// Only check shouldVisit when arg == 0.
-	// When arg > 0, we are continuing a previous visit.
-	if arg == 0 && !b.shouldVisit(pc, pos) {
-		return
-	}
-
-	b.jobs = append(b.jobs, job{pc: pc, arg: arg, pos: pos})
-}
-
-// tryBacktrack runs a backtracking search starting at pos.
-func (m *machine) tryBacktrack(b *bitState, i input, pc uint32, pos int) bool {
-	longest := m.re.longest
-	m.matched = false
-
-	b.push(pc, pos, 0)
-	for len(b.jobs) > 0 {
-		l := len(b.jobs) - 1
-		// Pop job off the stack.
-		pc := b.jobs[l].pc
-		pos := b.jobs[l].pos
-		arg := b.jobs[l].arg
-		b.jobs = b.jobs[:l]
-
-		// Optimization: rather than push and pop,
-		// code that is going to Push and continue
-		// the loop simply updates ip, p, and arg
-		// and jumps to CheckAndLoop.  We have to
-		// do the ShouldVisit check that Push
-		// would have, but we avoid the stack
-		// manipulation.
-		goto Skip
-	CheckAndLoop:
-		if !b.shouldVisit(pc, pos) {
-			continue
-		}
-	Skip:
-
-		inst := b.prog.Inst[pc]
-
-		switch inst.Op {
-		default:
-			panic("bad inst")
-		case syntax.InstFail:
-			panic("unexpected InstFail")
-		case syntax.InstAlt:
-			// Cannot just
-			//   b.push(inst.Out, pos, 0)
-			//   b.push(inst.Arg, pos, 0)
-			// If during the processing of inst.Out, we encounter
-			// inst.Arg via another path, we want to process it then.
-			// Pushing it here will inhibit that. Instead, re-push
-			// inst with arg==1 as a reminder to push inst.Arg out
-			// later.
-			switch arg {
-			case 0:
-				b.push(pc, pos, 1)
-				pc = inst.Out
-				goto CheckAndLoop
-			case 1:
-				// Finished inst.Out; try inst.Arg.
-				arg = 0
-				pc = inst.Arg
-				goto CheckAndLoop
-			}
-			panic("bad arg in InstAlt")
-
-		case syntax.InstAltMatch:
-			// One opcode consumes runes; the other leads to match.
-			switch b.prog.Inst[inst.Out].Op {
-			case syntax.InstRune, syntax.InstRune1, syntax.InstRuneAny, syntax.InstRuneAnyNotNL:
-				// inst.Arg is the match.
-				b.push(inst.Arg, pos, 0)
-				pc = inst.Arg
-				pos = b.end
-				goto CheckAndLoop
-			}
-			// inst.Out is the match - non-greedy
-			b.push(inst.Out, b.end, 0)
-			pc = inst.Out
-			goto CheckAndLoop
-
-		case syntax.InstRune:
-			r, width := i.step(pos)
-			if !inst.MatchRune(r) {
-				continue
-			}
-			pos += width
-			pc = inst.Out
-			goto CheckAndLoop
-
-		case syntax.InstRune1:
-			r, width := i.step(pos)
-			if r != inst.Rune[0] {
-				continue
-			}
-			pos += width
-			pc = inst.Out
-			goto CheckAndLoop
-
-		case syntax.InstRuneAnyNotNL:
-			r, width := i.step(pos)
-			if r == '\n' || r == endOfText {
-				continue
-			}
-			pos += width
-			pc = inst.Out
-			goto CheckAndLoop
-
-		case syntax.InstRuneAny:
-			r, width := i.step(pos)
-			if r == endOfText {
-				continue
-			}
-			pos += width
-			pc = inst.Out
-			goto CheckAndLoop
-
-		case syntax.InstCapture:
-			switch arg {
-			case 0:
-				if 0 <= inst.Arg && inst.Arg < uint32(len(b.cap)) {
-					// Capture pos to register, but save old value.
-					b.push(pc, b.cap[inst.Arg], 1) // come back when we're done.
-					b.cap[inst.Arg] = pos
-				}
-				pc = inst.Out
-				goto CheckAndLoop
-			case 1:
-				// Finished inst.Out; restore the old value.
-				b.cap[inst.Arg] = pos
-				continue
-
-			}
-			panic("bad arg in InstCapture")
-			continue
-
-		case syntax.InstEmptyWidth:
-			if syntax.EmptyOp(inst.Arg)&^i.context(pos) != 0 {
-				continue
-			}
-			pc = inst.Out
-			goto CheckAndLoop
-
-		case syntax.InstNop:
-			pc = inst.Out
-			goto CheckAndLoop
-
-		case syntax.InstMatch:
-			// We found a match. If the caller doesn't care
-			// where the match is, no point going further.
-			if len(b.cap) == 0 {
-				m.matched = true
-				return m.matched
-			}
-
-			// Record best match so far.
-			// Only need to check end point, because this entire
-			// call is only considering one start position.
-			if len(b.cap) > 1 {
-				b.cap[1] = pos
-			}
-			if !m.matched || (longest && pos > 0 && pos > m.matchcap[1]) {
-				copy(m.matchcap, b.cap)
-			}
-			m.matched = true
-
-			// If going for first match, we're done.
-			if !longest {
-				return m.matched
-			}
-
-			// If we used the entire text, no longer match is possible.
-			if pos == b.end {
-				return m.matched
-			}
-
-			// Otherwise, continue on in hope of a longer match.
-			continue
-		}
-		panic("unreachable")
-	}
-
-	return m.matched
-}
-
-// backtrack runs a backtracking search of prog on the input starting at pos.
-func (m *machine) backtrack(i input, pos int, end int, ncap int) bool {
-	if !i.canCheckPrefix() {
-		panic("backtrack called for a RuneReader")
-	}
-
-	startCond := m.re.cond
-	if startCond == ^syntax.EmptyOp(0) { // impossible
-		return false
-	}
-	if startCond&syntax.EmptyBeginText != 0 && pos != 0 {
-		// Anchored match, past beginning of text.
-		return false
-	}
-
-	b := m.b
-	b.reset(end, ncap)
-
-	m.matchcap = m.matchcap[:ncap]
-	for i := range m.matchcap {
-		m.matchcap[i] = -1
-	}
-
-	// Anchored search must start at the beginning of the input
-	if startCond&syntax.EmptyBeginText != 0 {
-		if len(b.cap) > 0 {
-			b.cap[0] = pos
-		}
-		return m.tryBacktrack(b, i, uint32(m.p.Start), pos)
-	}
-
-	// Unanchored search, starting from each possible text position.
-	// Notice that we have to try the empty string at the end of
-	// the text, so the loop condition is pos <= end, not pos < end.
-	// This looks like it's quadratic in the size of the text,
-	// but we are not clearing visited between calls to TrySearch,
-	// so no work is duplicated and it ends up still being linear.
-	width := -1
-	for ; pos <= end && width != 0; pos += width {
-		if len(m.re.prefix) > 0 {
-			// Match requires literal prefix; fast search for it.
-			advance := i.index(m.re, pos)
-			if advance < 0 {
-				return false
-			}
-			pos += advance
-		}
-
-		if len(b.cap) > 0 {
-			b.cap[0] = pos
-		}
-		if m.tryBacktrack(b, i, uint32(m.p.Start), pos) {
-			// Match must be leftmost; done.
-			return true
-		}
-		_, width = i.step(pos)
-	}
-	return false
-}
diff --git a/src/runtime/arch1_386.go b/src/runtime/arch1_386.go
deleted file mode 100644
index d41696a..0000000
--- a/src/runtime/arch1_386.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-const (
-	thechar        = '8'
-	_BigEndian     = 0
-	_CacheLineSize = 64
-	_PhysPageSize  = goos_nacl*65536 + (1-goos_nacl)*4096 // 4k normally; 64k on NaCl
-	_PCQuantum     = 1
-	_Int64Align    = 4
-	hugePageSize   = 1 << 21
-)
diff --git a/src/runtime/arch1_amd64.go b/src/runtime/arch1_amd64.go
deleted file mode 100644
index 15f4cc6..0000000
--- a/src/runtime/arch1_amd64.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-const (
-	thechar        = '6'
-	_BigEndian     = 0
-	_CacheLineSize = 64
-	_PhysPageSize  = 4096
-	_PCQuantum     = 1
-	_Int64Align    = 8
-	hugePageSize   = 1 << 21
-)
diff --git a/src/runtime/arch1_amd64p32.go b/src/runtime/arch1_amd64p32.go
deleted file mode 100644
index 3c5456f..0000000
--- a/src/runtime/arch1_amd64p32.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-const (
-	thechar        = '6'
-	_BigEndian     = 0
-	_CacheLineSize = 64
-	_PhysPageSize  = 65536*goos_nacl + 4096*(1-goos_nacl)
-	_PCQuantum     = 1
-	_Int64Align    = 8
-	hugePageSize   = 1 << 21
-)
diff --git a/src/runtime/arch1_arm.go b/src/runtime/arch1_arm.go
deleted file mode 100644
index 0ec2093..0000000
--- a/src/runtime/arch1_arm.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-const (
-	thechar        = '5'
-	_BigEndian     = 0
-	_CacheLineSize = 32
-	_PhysPageSize  = 65536*goos_nacl + 4096*(1-goos_nacl)
-	_PCQuantum     = 4
-	_Int64Align    = 4
-	hugePageSize   = 0
-)
diff --git a/src/runtime/arch1_arm64.go b/src/runtime/arch1_arm64.go
deleted file mode 100644
index 29a87db..0000000
--- a/src/runtime/arch1_arm64.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-const (
-	thechar        = '7'
-	_BigEndian     = 0
-	_CacheLineSize = 32
-	_PhysPageSize  = 65536
-	_PCQuantum     = 4
-	_Int64Align    = 8
-	hugePageSize   = 0
-)
diff --git a/src/runtime/arch1_ppc64.go b/src/runtime/arch1_ppc64.go
deleted file mode 100644
index de6dd91..0000000
--- a/src/runtime/arch1_ppc64.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-const (
-	thechar        = '9'
-	_BigEndian     = 1
-	_CacheLineSize = 64
-	_PhysPageSize  = 65536
-	_PCQuantum     = 4
-	_Int64Align    = 8
-	hugePageSize   = 0
-)
diff --git a/src/runtime/arch1_ppc64le.go b/src/runtime/arch1_ppc64le.go
deleted file mode 100644
index 9a55c71..0000000
--- a/src/runtime/arch1_ppc64le.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-const (
-	thechar        = '9'
-	_BigEndian     = 0
-	_CacheLineSize = 64
-	_PhysPageSize  = 65536
-	_PCQuantum     = 4
-	_Int64Align    = 8
-	hugePageSize   = 0
-)
diff --git a/src/runtime/arch_arm64.go b/src/runtime/arch_arm64.go
deleted file mode 100644
index 270cd7b..0000000
--- a/src/runtime/arch_arm64.go
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-type uintreg uint64
-type intptr int64 // TODO(rsc): remove
diff --git a/src/runtime/arch_ppc64.go b/src/runtime/arch_ppc64.go
deleted file mode 100644
index 270cd7b..0000000
--- a/src/runtime/arch_ppc64.go
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-type uintreg uint64
-type intptr int64 // TODO(rsc): remove
diff --git a/src/runtime/arch_ppc64le.go b/src/runtime/arch_ppc64le.go
deleted file mode 100644
index 270cd7b..0000000
--- a/src/runtime/arch_ppc64le.go
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-type uintreg uint64
-type intptr int64 // TODO(rsc): remove
diff --git a/src/runtime/asm_arm64.s b/src/runtime/asm_arm64.s
deleted file mode 100644
index 9aff9c7..0000000
--- a/src/runtime/asm_arm64.s
+++ /dev/null
@@ -1,1029 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "go_asm.h"
-#include "go_tls.h"
-#include "tls_arm64.h"
-#include "funcdata.h"
-#include "textflag.h"
-
-TEXT runtime·rt0_go(SB),NOSPLIT,$0
-	// SP = stack; R0 = argc; R1 = argv
-
-	// initialize essential registers
-	BL	runtime·reginit(SB)
-
-	SUB	$32, RSP
-	MOVW	R0, 8(RSP) // argc
-	MOVD	R1, 16(RSP) // argv
-
-	// create istack out of the given (operating system) stack.
-	// _cgo_init may update stackguard.
-	MOVD	$runtime·g0(SB), g
-	MOVD RSP, R7
-	MOVD	$(-64*1024)(R7), R0
-	MOVD	R0, g_stackguard0(g)
-	MOVD	R0, g_stackguard1(g)
-	MOVD	R0, (g_stack+stack_lo)(g)
-	MOVD	R7, (g_stack+stack_hi)(g)
-
-	// if there is a _cgo_init, call it using the gcc ABI.
-	MOVD	_cgo_init(SB), R12
-	CMP	$0, R12
-	BEQ	nocgo
-
-	MRS_TPIDR_R0			// load TLS base pointer
-	MOVD	R0, R3			// arg 3: TLS base pointer
-#ifdef TLSG_IS_VARIABLE
-	MOVD	$runtime·tls_g(SB), R2 	// arg 2: tlsg
-#else
-	MOVD	$0x10, R2		// arg 2: tlsg TODO(minux): hardcoded for linux
-#endif
-	MOVD	$setg_gcc<>(SB), R1	// arg 1: setg
-	MOVD	g, R0			// arg 0: G
-	BL	(R12)
-	MOVD	_cgo_init(SB), R12
-	CMP	$0, R12
-	BEQ	nocgo
-
-nocgo:
-	// update stackguard after _cgo_init
-	MOVD	(g_stack+stack_lo)(g), R0
-	ADD	$const__StackGuard, R0
-	MOVD	R0, g_stackguard0(g)
-	MOVD	R0, g_stackguard1(g)
-
-	// set the per-goroutine and per-mach "registers"
-	MOVD	$runtime·m0(SB), R0
-
-	// save m->g0 = g0
-	MOVD	g, m_g0(R0)
-	// save m0 to g0->m
-	MOVD	R0, g_m(g)
-
-	BL	runtime·check(SB)
-
-	MOVW	8(RSP), R0	// copy argc
-	MOVW	R0, -8(RSP)
-	MOVD	16(RSP), R0		// copy argv
-	MOVD	R0, 0(RSP)
-	BL	runtime·args(SB)
-	BL	runtime·osinit(SB)
-	BL	runtime·schedinit(SB)
-
-	// create a new goroutine to start program
-	MOVD	$runtime·mainPC(SB), R0		// entry
-	MOVD	RSP, R7
-	MOVD.W	$0, -8(R7)
-	MOVD.W	R0, -8(R7)
-	MOVD.W	$0, -8(R7)
-	MOVD.W	$0, -8(R7)
-	MOVD	R7, RSP
-	BL	runtime·newproc(SB)
-	ADD	$32, RSP
-
-	// start this M
-	BL	runtime·mstart(SB)
-
-	MOVD	$0, R0
-	MOVD	R0, (R0)	// boom
-	UNDEF
-
-DATA	runtime·mainPC+0(SB)/8,$runtime·main(SB)
-GLOBL	runtime·mainPC(SB),RODATA,$8
-
-TEXT runtime·breakpoint(SB),NOSPLIT,$-8-0
-	BRK
-	RET
-
-TEXT runtime·asminit(SB),NOSPLIT,$-8-0
-	RET
-
-TEXT runtime·reginit(SB),NOSPLIT,$-8-0
-	// initialize essential FP registers
-	FMOVD	$4503601774854144.0, F27
-	FMOVD	$0.5, F29
-	FSUBD	F29, F29, F28
-	FADDD	F29, F29, F30
-	FADDD	F30, F30, F31
-	RET
-
-/*
- *  go-routine
- */
-
-// void gosave(Gobuf*)
-// save state in Gobuf; setjmp
-TEXT runtime·gosave(SB), NOSPLIT, $-8-8
-	MOVD	buf+0(FP), R3
-	MOVD	RSP, R0
-	MOVD	R0, gobuf_sp(R3)
-	MOVD	LR, gobuf_pc(R3)
-	MOVD	g, gobuf_g(R3)
-	MOVD	ZR, gobuf_lr(R3)
-	MOVD	ZR, gobuf_ret(R3)
-	MOVD	ZR, gobuf_ctxt(R3)
-	RET
-
-// void gogo(Gobuf*)
-// restore state from Gobuf; longjmp
-TEXT runtime·gogo(SB), NOSPLIT, $-8-8
-	MOVD	buf+0(FP), R5
-	MOVD	gobuf_g(R5), g
-	BL	runtime·save_g(SB)
-
-	MOVD	0(g), R4	// make sure g is not nil
-	MOVD	gobuf_sp(R5), R0
-	MOVD	R0, RSP
-	MOVD	gobuf_lr(R5), LR
-	MOVD	gobuf_ret(R5), R0
-	MOVD	gobuf_ctxt(R5), R26
-	MOVD	$0, gobuf_sp(R5)
-	MOVD	$0, gobuf_ret(R5)
-	MOVD	$0, gobuf_lr(R5)
-	MOVD	$0, gobuf_ctxt(R5)
-	CMP	ZR, ZR // set condition codes for == test, needed by stack split
-	MOVD	gobuf_pc(R5), R6
-	B	(R6)
-
-// void mcall(fn func(*g))
-// Switch to m->g0's stack, call fn(g).
-// Fn must never return.  It should gogo(&g->sched)
-// to keep running g.
-TEXT runtime·mcall(SB), NOSPLIT, $-8-8
-	// Save caller state in g->sched
-	MOVD	RSP, R0
-	MOVD	R0, (g_sched+gobuf_sp)(g)
-	MOVD	LR, (g_sched+gobuf_pc)(g)
-	MOVD	$0, (g_sched+gobuf_lr)(g)
-	MOVD	g, (g_sched+gobuf_g)(g)
-
-	// Switch to m->g0 & its stack, call fn.
-	MOVD	g, R3
-	MOVD	g_m(g), R8
-	MOVD	m_g0(R8), g
-	BL	runtime·save_g(SB)
-	CMP	g, R3
-	BNE	2(PC)
-	B	runtime·badmcall(SB)
-	MOVD	fn+0(FP), R26			// context
-	MOVD	0(R26), R4			// code pointer
-	MOVD	(g_sched+gobuf_sp)(g), R0
-	MOVD	R0, RSP	// sp = m->g0->sched.sp
-	MOVD	R3, -8(RSP)
-	MOVD	$0, -16(RSP)
-	SUB	$16, RSP
-	BL	(R4)
-	B	runtime·badmcall2(SB)
-
-// systemstack_switch is a dummy routine that systemstack leaves at the bottom
-// of the G stack.  We need to distinguish the routine that
-// lives at the bottom of the G stack from the one that lives
-// at the top of the system stack because the one at the top of
-// the system stack terminates the stack walk (see topofstack()).
-TEXT runtime·systemstack_switch(SB), NOSPLIT, $0-0
-	UNDEF
-	BL	(LR)	// make sure this function is not leaf
-	RET
-
-// func systemstack(fn func())
-TEXT runtime·systemstack(SB), NOSPLIT, $0-8
-	MOVD	fn+0(FP), R3	// R3 = fn
-	MOVD	R3, R26		// context
-	MOVD	g_m(g), R4	// R4 = m
-
-	MOVD	m_gsignal(R4), R5	// R5 = gsignal
-	CMP	g, R5
-	BEQ	noswitch
-
-	MOVD	m_g0(R4), R5	// R5 = g0
-	CMP	g, R5
-	BEQ	noswitch
-
-	MOVD	m_curg(R4), R6
-	CMP	g, R6
-	BEQ	switch
-
-	// Bad: g is not gsignal, not g0, not curg. What is it?
-	// Hide call from linker nosplit analysis.
-	MOVD	$runtime·badsystemstack(SB), R3
-	BL	(R3)
-
-switch:
-	// save our state in g->sched.  Pretend to
-	// be systemstack_switch if the G stack is scanned.
-	MOVD	$runtime·systemstack_switch(SB), R6
-	ADD	$8, R6	// get past prologue
-	MOVD	R6, (g_sched+gobuf_pc)(g)
-	MOVD	RSP, R0
-	MOVD	R0, (g_sched+gobuf_sp)(g)
-	MOVD	$0, (g_sched+gobuf_lr)(g)
-	MOVD	g, (g_sched+gobuf_g)(g)
-
-	// switch to g0
-	MOVD	R5, g
-	BL	runtime·save_g(SB)
-	MOVD	(g_sched+gobuf_sp)(g), R3
-	// make it look like mstart called systemstack on g0, to stop traceback
-	SUB	$16, R3
-	AND	$~15, R3
-	MOVD	$runtime·mstart(SB), R4
-	MOVD	R4, 0(R3)
-	MOVD	R3, RSP
-
-	// call target function
-	MOVD	0(R26), R3	// code pointer
-	BL	(R3)
-
-	// switch back to g
-	MOVD	g_m(g), R3
-	MOVD	m_curg(R3), g
-	BL	runtime·save_g(SB)
-	MOVD	(g_sched+gobuf_sp)(g), R0
-	MOVD	R0, RSP
-	MOVD	$0, (g_sched+gobuf_sp)(g)
-	RET
-
-noswitch:
-	// already on m stack, just call directly
-	MOVD	0(R26), R3	// code pointer
-	BL	(R3)
-	RET
-
-/*
- * support for morestack
- */
-
-// Called during function prolog when more stack is needed.
-// Caller has already loaded:
-// R3 prolog's LR (R30)
-//
-// The traceback routines see morestack on a g0 as being
-// the top of a stack (for example, morestack calling newstack
-// calling the scheduler calling newm calling gc), so we must
-// record an argument size. For that purpose, it has no arguments.
-TEXT runtime·morestack(SB),NOSPLIT,$-8-0
-	// Cannot grow scheduler stack (m->g0).
-	MOVD	g_m(g), R8
-	MOVD	m_g0(R8), R4
-	CMP	g, R4
-	BNE	2(PC)
-	B	runtime·abort(SB)
-
-	// Cannot grow signal stack (m->gsignal).
-	MOVD	m_gsignal(R8), R4
-	CMP	g, R4
-	BNE	2(PC)
-	B	runtime·abort(SB)
-
-	// Called from f.
-	// Set g->sched to context in f
-	MOVD	R26, (g_sched+gobuf_ctxt)(g)
-	MOVD	RSP, R0
-	MOVD	R0, (g_sched+gobuf_sp)(g)
-	MOVD	LR, (g_sched+gobuf_pc)(g)
-	MOVD	R3, (g_sched+gobuf_lr)(g)
-
-	// Called from f.
-	// Set m->morebuf to f's callers.
-	MOVD	R3, (m_morebuf+gobuf_pc)(R8)	// f's caller's PC
-	MOVD	RSP, R0
-	MOVD	R0, (m_morebuf+gobuf_sp)(R8)	// f's caller's RSP
-	MOVD	g, (m_morebuf+gobuf_g)(R8)
-
-	// Call newstack on m->g0's stack.
-	MOVD	m_g0(R8), g
-	BL	runtime·save_g(SB)
-	MOVD	(g_sched+gobuf_sp)(g), R0
-	MOVD	R0, RSP
-	BL	runtime·newstack(SB)
-
-	// Not reached, but make sure the return PC from the call to newstack
-	// is still in this function, and not the beginning of the next.
-	UNDEF
-
-TEXT runtime·morestack_noctxt(SB),NOSPLIT,$-4-0
-	MOVW	$0, R26
-	B runtime·morestack(SB)
-
-TEXT runtime·stackBarrier(SB),NOSPLIT,$0
-	// We came here via a RET to an overwritten LR.
-	// R0 may be live (see return0). Other registers are available.
-
-	// Get the original return PC, g.stkbar[g.stkbarPos].savedLRVal.
-	MOVD	(g_stkbar+slice_array)(g), R4
-	MOVD	g_stkbarPos(g), R5
-	MOVD	$stkbar__size, R6
-	MUL	R5, R6
-	ADD	R4, R6
-	MOVD	stkbar_savedLRVal(R6), R6
-	// Record that this stack barrier was hit.
-	ADD	$1, R5
-	MOVD	R5, g_stkbarPos(g)
-	// Jump to the original return PC.
-	B	(R6)
-
-// reflectcall: call a function with the given argument list
-// func call(argtype *_type, f *FuncVal, arg *byte, argsize, retoffset uint32).
-// we don't have variable-sized frames, so we use a small number
-// of constant-sized-frame functions to encode a few bits of size in the pc.
-// Caution: ugly multiline assembly macros in your future!
-
-#define DISPATCH(NAME,MAXSIZE)		\
-	MOVD	$MAXSIZE, R27;		\
-	CMP	R27, R16;		\
-	BGT	3(PC);			\
-	MOVD	$NAME(SB), R27;	\
-	B	(R27)
-// Note: can't just "B NAME(SB)" - bad inlining results.
-
-TEXT reflect·call(SB), NOSPLIT, $0-0
-	B	·reflectcall(SB)
-
-TEXT ·reflectcall(SB), NOSPLIT, $-8-32
-	MOVWU argsize+24(FP), R16
-	// NOTE(rsc): No call16, because CALLFN needs four words
-	// of argument space to invoke callwritebarrier.
-	DISPATCH(runtime·call32, 32)
-	DISPATCH(runtime·call64, 64)
-	DISPATCH(runtime·call128, 128)
-	DISPATCH(runtime·call256, 256)
-	DISPATCH(runtime·call512, 512)
-	DISPATCH(runtime·call1024, 1024)
-	DISPATCH(runtime·call2048, 2048)
-	DISPATCH(runtime·call4096, 4096)
-	DISPATCH(runtime·call8192, 8192)
-	DISPATCH(runtime·call16384, 16384)
-	DISPATCH(runtime·call32768, 32768)
-	DISPATCH(runtime·call65536, 65536)
-	DISPATCH(runtime·call131072, 131072)
-	DISPATCH(runtime·call262144, 262144)
-	DISPATCH(runtime·call524288, 524288)
-	DISPATCH(runtime·call1048576, 1048576)
-	DISPATCH(runtime·call2097152, 2097152)
-	DISPATCH(runtime·call4194304, 4194304)
-	DISPATCH(runtime·call8388608, 8388608)
-	DISPATCH(runtime·call16777216, 16777216)
-	DISPATCH(runtime·call33554432, 33554432)
-	DISPATCH(runtime·call67108864, 67108864)
-	DISPATCH(runtime·call134217728, 134217728)
-	DISPATCH(runtime·call268435456, 268435456)
-	DISPATCH(runtime·call536870912, 536870912)
-	DISPATCH(runtime·call1073741824, 1073741824)
-	MOVD	$runtime·badreflectcall(SB), R0
-	B	(R0)
-
-#define CALLFN(NAME,MAXSIZE)			\
-TEXT NAME(SB), WRAPPER, $MAXSIZE-24;		\
-	NO_LOCAL_POINTERS;			\
-	/* copy arguments to stack */		\
-	MOVD	arg+16(FP), R3;			\
-	MOVWU	argsize+24(FP), R4;			\
-	MOVD	RSP, R5;				\
-	ADD	$(8-1), R5;			\
-	SUB	$1, R3;				\
-	ADD	R5, R4;				\
-	CMP	R5, R4;				\
-	BEQ	4(PC);				\
-	MOVBU.W	1(R3), R6;			\
-	MOVBU.W	R6, 1(R5);			\
-	B	-4(PC);				\
-	/* call function */			\
-	MOVD	f+8(FP), R26;			\
-	MOVD	(R26), R0;			\
-	PCDATA  $PCDATA_StackMapIndex, $0;	\
-	BL	(R0);				\
-	/* copy return values back */		\
-	MOVD	arg+16(FP), R3;			\
-	MOVWU	n+24(FP), R4;			\
-	MOVWU	retoffset+28(FP), R6;		\
-	MOVD	RSP, R5;				\
-	ADD	R6, R5; 			\
-	ADD	R6, R3;				\
-	SUB	R6, R4;				\
-	ADD	$(8-1), R5;			\
-	SUB	$1, R3;				\
-	ADD	R5, R4;				\
-loop:						\
-	CMP	R5, R4;				\
-	BEQ	end;				\
-	MOVBU.W	1(R5), R6;			\
-	MOVBU.W	R6, 1(R3);			\
-	B	loop;				\
-end:						\
-	/* execute write barrier updates */	\
-	MOVD	argtype+0(FP), R7;		\
-	MOVD	arg+16(FP), R3;			\
-	MOVWU	n+24(FP), R4;			\
-	MOVWU	retoffset+28(FP), R6;		\
-	MOVD	R7, 8(RSP);			\
-	MOVD	R3, 16(RSP);			\
-	MOVD	R4, 24(RSP);			\
-	MOVD	R6, 32(RSP);			\
-	BL	runtime·callwritebarrier(SB);	\
-	RET
-
-// These have 8 added to make the overall frame size a multiple of 16,
-// as required by the ABI. (There is another +8 for the saved LR.)
-CALLFN(·call16, 24 )
-CALLFN(·call32, 40 )
-CALLFN(·call64, 72 )
-CALLFN(·call128, 136 )
-CALLFN(·call256, 264 )
-CALLFN(·call512, 520 )
-CALLFN(·call1024, 1032 )
-CALLFN(·call2048, 2056 )
-CALLFN(·call4096, 4104 )
-CALLFN(·call8192, 8200 )
-CALLFN(·call16384, 16392 )
-CALLFN(·call32768, 32776 )
-CALLFN(·call65536, 65544 )
-CALLFN(·call131072, 131080 )
-CALLFN(·call262144, 262152 )
-CALLFN(·call524288, 524296 )
-CALLFN(·call1048576, 1048584 )
-CALLFN(·call2097152, 2097160 )
-CALLFN(·call4194304, 4194312 )
-CALLFN(·call8388608, 8388616 )
-CALLFN(·call16777216, 16777224 )
-CALLFN(·call33554432, 33554440 )
-CALLFN(·call67108864, 67108872 )
-CALLFN(·call134217728, 134217736 )
-CALLFN(·call268435456, 268435464 )
-CALLFN(·call536870912, 536870920 )
-CALLFN(·call1073741824, 1073741832 )
-
-// bool cas(uint32 *ptr, uint32 old, uint32 new)
-// Atomically:
-//	if(*val == old){
-//		*val = new;
-//		return 1;
-//	} else
-//		return 0;
-TEXT runtime·cas(SB), NOSPLIT, $0-17
-	MOVD	ptr+0(FP), R0
-	MOVW	old+8(FP), R1
-	MOVW	new+12(FP), R2
-again:
-	LDAXRW	(R0), R3
-	CMPW	R1, R3
-	BNE	ok
-	STLXRW	R2, (R0), R3
-	CBNZ	R3, again
-ok:
-	CSET	EQ, R0
-	MOVB	R0, ret+16(FP)
-	RET
-
-TEXT runtime·casuintptr(SB), NOSPLIT, $0-25
-	B	runtime·cas64(SB)
-
-TEXT runtime·atomicloaduintptr(SB), NOSPLIT, $-8-16
-	B	runtime·atomicload64(SB)
-
-TEXT runtime·atomicloaduint(SB), NOSPLIT, $-8-16
-	B	runtime·atomicload64(SB)
-
-TEXT runtime·atomicstoreuintptr(SB), NOSPLIT, $0-16
-	B	runtime·atomicstore64(SB)
-
-// AES hashing not implemented for ARM64, issue #10109.
-TEXT runtime·aeshash(SB),NOSPLIT,$-8-0
-	MOVW	$0, R0
-	MOVW	(R0), R1
-TEXT runtime·aeshash32(SB),NOSPLIT,$-8-0
-	MOVW	$0, R0
-	MOVW	(R0), R1
-TEXT runtime·aeshash64(SB),NOSPLIT,$-8-0
-	MOVW	$0, R0
-	MOVW	(R0), R1
-TEXT runtime·aeshashstr(SB),NOSPLIT,$-8-0
-	MOVW	$0, R0
-	MOVW	(R0), R1
-
-// bool casp(void **val, void *old, void *new)
-// Atomically:
-//	if(*val == old){
-//		*val = new;
-//		return 1;
-//	} else
-//		return 0;
-TEXT runtime·casp1(SB), NOSPLIT, $0-25
-	B runtime·cas64(SB)
-
-TEXT runtime·procyield(SB),NOSPLIT,$0-0
-	MOVWU	cycles+0(FP), R0
-again:
-	YIELD
-	SUBW	$1, R0
-	CBNZ	R0, again
-	RET
-
-// void jmpdefer(fv, sp);
-// called from deferreturn.
-// 1. grab stored LR for caller
-// 2. sub 4 bytes to get back to BL deferreturn
-// 3. BR to fn
-TEXT runtime·jmpdefer(SB), NOSPLIT, $-8-16
-	MOVD	0(RSP), R0
-	SUB	$4, R0
-	MOVD	R0, LR
-
-	MOVD	fv+0(FP), R26
-	MOVD	argp+8(FP), R0
-	MOVD	R0, RSP
-	SUB	$8, RSP
-	MOVD	0(R26), R3
-	B	(R3)
-
-// Save state of caller into g->sched. Smashes R0.
-TEXT gosave<>(SB),NOSPLIT,$-8
-	MOVD	LR, (g_sched+gobuf_pc)(g)
-	MOVD RSP, R0
-	MOVD	R0, (g_sched+gobuf_sp)(g)
-	MOVD	$0, (g_sched+gobuf_lr)(g)
-	MOVD	$0, (g_sched+gobuf_ret)(g)
-	MOVD	$0, (g_sched+gobuf_ctxt)(g)
-	RET
-
-// func asmcgocall(fn, arg unsafe.Pointer) int32
-// Call fn(arg) on the scheduler stack,
-// aligned appropriately for the gcc ABI.
-// See cgocall.go for more details.
-TEXT ·asmcgocall(SB),NOSPLIT,$0-20
-	MOVD	fn+0(FP), R1
-	MOVD	arg+8(FP), R0
-
-	MOVD	RSP, R2		// save original stack pointer
-	MOVD	g, R4
-
-	// Figure out if we need to switch to m->g0 stack.
-	// We get called to create new OS threads too, and those
-	// come in on the m->g0 stack already.
-	MOVD	g_m(g), R8
-	MOVD	m_g0(R8), R3
-	CMP	R3, g
-	BEQ	g0
-	MOVD	R0, R9	// gosave<> and save_g might clobber R0
-	BL	gosave<>(SB)
-	MOVD	R3, g
-	BL	runtime·save_g(SB)
-	MOVD	(g_sched+gobuf_sp)(g), R0
-	MOVD	R0, RSP
-	MOVD	R9, R0
-
-	// Now on a scheduling stack (a pthread-created stack).
-g0:
-	// Save room for two of our pointers /*, plus 32 bytes of callee
-	// save area that lives on the caller stack. */
-	MOVD	RSP, R13
-	SUB	$16, R13
-	MOVD	R13, RSP
-	MOVD	R4, 0(RSP)	// save old g on stack
-	MOVD	(g_stack+stack_hi)(R4), R4
-	SUB	R2, R4
-	MOVD	R4, 8(RSP)	// save depth in old g stack (can't just save SP, as stack might be copied during a callback)
-	BL	(R1)
-	MOVD	R0, R9
-
-	// Restore g, stack pointer.  R0 is errno, so don't touch it
-	MOVD	0(RSP), g
-	BL	runtime·save_g(SB)
-	MOVD	(g_stack+stack_hi)(g), R5
-	MOVD	8(RSP), R6
-	SUB	R6, R5
-	MOVD	R9, R0
-	MOVD	R5, RSP
-
-	MOVW	R0, ret+16(FP)
-	RET
-
-// cgocallback(void (*fn)(void*), void *frame, uintptr framesize)
-// Turn the fn into a Go func (by taking its address) and call
-// cgocallback_gofunc.
-TEXT runtime·cgocallback(SB),NOSPLIT,$24-24
-	MOVD	$fn+0(FP), R0
-	MOVD	R0, 8(RSP)
-	MOVD	frame+8(FP), R0
-	MOVD	R0, 16(RSP)
-	MOVD	framesize+16(FP), R0
-	MOVD	R0, 24(RSP)
-	MOVD	$runtime·cgocallback_gofunc(SB), R0
-	BL	(R0)
-	RET
-
-// cgocallback_gofunc(FuncVal*, void *frame, uintptr framesize)
-// See cgocall.go for more details.
-TEXT ·cgocallback_gofunc(SB),NOSPLIT,$24-24
-	NO_LOCAL_POINTERS
-
-	// Load g from thread-local storage.
-	MOVB	runtime·iscgo(SB), R3
-	CMP	$0, R3
-	BEQ	nocgo
-	BL	runtime·load_g(SB)
-nocgo:
-
-	// If g is nil, Go did not create the current thread.
-	// Call needm to obtain one for temporary use.
-	// In this case, we're running on the thread stack, so there's
-	// lots of space, but the linker doesn't know. Hide the call from
-	// the linker analysis by using an indirect call.
-	CMP	$0, g
-	BNE	havem
-	MOVD	g, savedm-8(SP) // g is zero, so is m.
-	MOVD	$runtime·needm(SB), R0
-	BL	(R0)
-
-	// Set m->sched.sp = SP, so that if a panic happens
-	// during the function we are about to execute, it will
-	// have a valid SP to run on the g0 stack.
-	// The next few lines (after the havem label)
-	// will save this SP onto the stack and then write
-	// the same SP back to m->sched.sp. That seems redundant,
-	// but if an unrecovered panic happens, unwindm will
-	// restore the g->sched.sp from the stack location
-	// and then systemstack will try to use it. If we don't set it here,
-	// that restored SP will be uninitialized (typically 0) and
-	// will not be usable.
-	MOVD	g_m(g), R8
-	MOVD	m_g0(R8), R3
-	MOVD	RSP, R0
-	MOVD	R0, (g_sched+gobuf_sp)(R3)
-
-havem:
-	MOVD	g_m(g), R8
-	MOVD	R8, savedm-8(SP)
-	// Now there's a valid m, and we're running on its m->g0.
-	// Save current m->g0->sched.sp on stack and then set it to SP.
-	// Save current sp in m->g0->sched.sp in preparation for
-	// switch back to m->curg stack.
-	// NOTE: unwindm knows that the saved g->sched.sp is at 16(RSP) aka savedsp-16(SP).
-	// Beware that the frame size is actually 32.
-	MOVD	m_g0(R8), R3
-	MOVD	(g_sched+gobuf_sp)(R3), R4
-	MOVD	R4, savedsp-16(SP)
-	MOVD	RSP, R0
-	MOVD	R0, (g_sched+gobuf_sp)(R3)
-
-	// Switch to m->curg stack and call runtime.cgocallbackg.
-	// Because we are taking over the execution of m->curg
-	// but *not* resuming what had been running, we need to
-	// save that information (m->curg->sched) so we can restore it.
-	// We can restore m->curg->sched.sp easily, because calling
-	// runtime.cgocallbackg leaves SP unchanged upon return.
-	// To save m->curg->sched.pc, we push it onto the stack.
-	// This has the added benefit that it looks to the traceback
-	// routine like cgocallbackg is going to return to that
-	// PC (because the frame we allocate below has the same
-	// size as cgocallback_gofunc's frame declared above)
-	// so that the traceback will seamlessly trace back into
-	// the earlier calls.
-	//
-	// In the new goroutine, -16(SP) and -8(SP) are unused.
-	MOVD	m_curg(R8), g
-	BL	runtime·save_g(SB)
-	MOVD	(g_sched+gobuf_sp)(g), R4 // prepare stack as R4
-	MOVD	(g_sched+gobuf_pc)(g), R5
-	MOVD	R5, -(24+8)(R4)	// maintain 16-byte SP alignment
-	MOVD	$-(24+8)(R4), R0
-	MOVD	R0, RSP
-	BL	runtime·cgocallbackg(SB)
-
-	// Restore g->sched (== m->curg->sched) from saved values.
-	MOVD	0(RSP), R5
-	MOVD	R5, (g_sched+gobuf_pc)(g)
-	MOVD	RSP, R4
-	ADD	$(24+8), R4, R4
-	MOVD	R4, (g_sched+gobuf_sp)(g)
-
-	// Switch back to m->g0's stack and restore m->g0->sched.sp.
-	// (Unlike m->curg, the g0 goroutine never uses sched.pc,
-	// so we do not have to restore it.)
-	MOVD	g_m(g), R8
-	MOVD	m_g0(R8), g
-	BL	runtime·save_g(SB)
-	MOVD	(g_sched+gobuf_sp)(g), R0
-	MOVD	R0, RSP
-	MOVD	savedsp-16(SP), R4
-	MOVD	R4, (g_sched+gobuf_sp)(g)
-
-	// If the m on entry was nil, we called needm above to borrow an m
-	// for the duration of the call. Since the call is over, return it with dropm.
-	MOVD	savedm-8(SP), R6
-	CMP	$0, R6
-	BNE	droppedm
-	MOVD	$runtime·dropm(SB), R0
-	BL	(R0)
-droppedm:
-
-	// Done!
-	RET
-
-// Called from cgo wrappers, this function returns g->m->curg.stack.hi.
-// Must obey the gcc calling convention.
-TEXT _cgo_topofstack(SB),NOSPLIT,$24
-	// g (R28) and REGTMP (R27)  might be clobbered by load_g. They
-	// are callee-save in the gcc calling convention, so save them.
-	MOVD	R27, savedR27-8(SP)
-	MOVD	g, saveG-16(SP)
-
-	BL	runtime·load_g(SB)
-	MOVD	g_m(g), R0
-	MOVD	m_curg(R0), R0
-	MOVD	(g_stack+stack_hi)(R0), R0
-
-	MOVD	saveG-16(SP), g
-	MOVD	savedR28-8(SP), R27
-	RET
-
-// void setg(G*); set g. for use by needm.
-TEXT runtime·setg(SB), NOSPLIT, $0-8
-	MOVD	gg+0(FP), g
-	// This only happens if iscgo, so jump straight to save_g
-	BL	runtime·save_g(SB)
-	RET
-
-// void setg_gcc(G*); set g called from gcc
-TEXT setg_gcc<>(SB),NOSPLIT,$8
-	MOVD	R0, g
-	MOVD	R27, savedR27-8(SP)
-	BL	runtime·save_g(SB)
-	MOVD	savedR27-8(SP), R27
-	RET
-
-TEXT runtime·getcallerpc(SB),NOSPLIT,$8-16
-	MOVD	16(RSP), R0		// LR saved by caller
-	MOVD	runtime·stackBarrierPC(SB), R1
-	CMP	R0, R1
-	BNE	nobar
-	// Get original return PC.
-	BL	runtime·nextBarrierPC(SB)
-	MOVD	8(RSP), R0
-nobar:
-	MOVD	R0, ret+8(FP)
-	RET
-
-TEXT runtime·setcallerpc(SB),NOSPLIT,$8-16
-	MOVD	pc+8(FP), R0
-	MOVD	16(RSP), R1
-	MOVD	runtime·stackBarrierPC(SB), R2
-	CMP	R1, R2
-	BEQ	setbar
-	MOVD	R0, 16(RSP)		// set LR in caller
-	RET
-setbar:
-	// Set the stack barrier return PC.
-	MOVD	R0, 8(RSP)
-	BL	runtime·setNextBarrierPC(SB)
-	RET
-
-TEXT runtime·getcallersp(SB),NOSPLIT,$0-16
-	MOVD	argp+0(FP), R0
-	SUB	$8, R0
-	MOVD	R0, ret+8(FP)
-	RET
-
-TEXT runtime·abort(SB),NOSPLIT,$-8-0
-	B	(ZR)
-	UNDEF
-
-// memhash_varlen(p unsafe.Pointer, h seed) uintptr
-// redirects to memhash(p, h, size) using the size
-// stored in the closure.
-TEXT runtime·memhash_varlen(SB),NOSPLIT,$40-24
-	GO_ARGS
-	NO_LOCAL_POINTERS
-	MOVD	p+0(FP), R3
-	MOVD	h+8(FP), R4
-	MOVD	8(R26), R5
-	MOVD	R3, 8(RSP)
-	MOVD	R4, 16(RSP)
-	MOVD	R5, 24(RSP)
-	BL	runtime·memhash(SB)
-	MOVD	32(RSP), R3
-	MOVD	R3, ret+16(FP)
-	RET
-
-TEXT runtime·memeq(SB),NOSPLIT,$-8-25
-	MOVD	a+0(FP), R1
-	MOVD	b+8(FP), R2
-	MOVD	size+16(FP), R3
-	ADD	R1, R3, R6
-	MOVD	$1, R0
-	MOVB	R0, ret+24(FP)
-loop:
-	CMP	R1, R6
-	BEQ	done
-	MOVBU.P	1(R1), R4
-	MOVBU.P	1(R2), R5
-	CMP	R4, R5
-	BEQ	loop
-
-	MOVB	$0, ret+24(FP)
-done:
-	RET
-
-// memequal_varlen(a, b unsafe.Pointer) bool
-TEXT runtime·memequal_varlen(SB),NOSPLIT,$40-17
-	MOVD	a+0(FP), R3
-	MOVD	b+8(FP), R4
-	CMP	R3, R4
-	BEQ	eq
-	MOVD	8(R26), R5    // compiler stores size at offset 8 in the closure
-	MOVD	R3, 8(RSP)
-	MOVD	R4, 16(RSP)
-	MOVD	R5, 24(RSP)
-	BL	runtime·memeq(SB)
-	MOVBU	32(RSP), R3
-	MOVB	R3, ret+16(FP)
-	RET
-eq:
-	MOVD	$1, R3
-	MOVB	R3, ret+16(FP)
-	RET
-
-TEXT runtime·cmpstring(SB),NOSPLIT,$-4-40
-	MOVD	s1_base+0(FP), R2
-	MOVD	s1_len+8(FP), R0
-	MOVD	s2_base+16(FP), R3
-	MOVD	s2_len+24(FP), R1
-	ADD	$40, RSP, R7
-	B	runtime·cmpbody<>(SB)
-
-TEXT bytes·Compare(SB),NOSPLIT,$-4-56
-	MOVD	s1+0(FP), R2
-	MOVD	s1+8(FP), R0
-	MOVD	s2+24(FP), R3
-	MOVD	s2+32(FP), R1
-	ADD	$56, RSP, R7
-	B	runtime·cmpbody<>(SB)
-
-// On entry:
-// R0 is the length of s1
-// R1 is the length of s2
-// R2 points to the start of s1
-// R3 points to the start of s2
-// R7 points to return value (-1/0/1 will be written here)
-//
-// On exit:
-// R4, R5, and R6 are clobbered
-TEXT runtime·cmpbody<>(SB),NOSPLIT,$-4-0
-	CMP	R0, R1
-	CSEL    LT, R1, R0, R6 // R6 is min(R0, R1)
-
-	ADD	R2, R6	// R2 is current byte in s1, R6 is last byte in s1 to compare
-loop:
-	CMP	R2, R6
-	BEQ	samebytes // all compared bytes were the same; compare lengths
-	MOVBU.P	1(R2), R4
-	MOVBU.P	1(R3), R5
-	CMP	R4, R5
-	BEQ	loop
-	// bytes differed
-	MOVD	$1, R4
-	CSNEG	LT, R4, R4, R4
-	MOVD	R4, (R7)
-	RET
-samebytes:
-	MOVD	$1, R4
-	CMP	R0, R1
-	CSNEG	LT, R4, R4, R4
-	CSEL	EQ, ZR, R4, R4
-	MOVD	R4, (R7)
-	RET
-
-// eqstring tests whether two strings are equal.
-// The compiler guarantees that strings passed
-// to eqstring have equal length.
-// See runtime_test.go:eqstring_generic for
-// equivalent Go code.
-TEXT runtime·eqstring(SB),NOSPLIT,$0-33
-	MOVD	s1str+0(FP), R0
-	MOVD	s1len+8(FP), R1
-	MOVD	s2str+16(FP), R2
-	ADD	R0, R1		// end
-loop:
-	CMP	R0, R1
-	BEQ	equal		// reaches the end
-	MOVBU.P	1(R0), R4
-	MOVBU.P	1(R2), R5
-	CMP	R4, R5
-	BEQ	loop
-notequal:
-	MOVB	ZR, ret+32(FP)
-	RET
-equal:
-	MOVD	$1, R0
-	MOVB	R0, ret+32(FP)
-	RET
-
-//
-// functions for other packages
-//
-TEXT bytes·IndexByte(SB),NOSPLIT,$0-40
-	MOVD	b+0(FP), R0
-	MOVD	b_len+8(FP), R1
-	MOVBU	c+24(FP), R2	// byte to find
-	MOVD	R0, R4		// store base for later
-	ADD	R0, R1		// end
-loop:
-	CMP	R0, R1
-	BEQ	notfound
-	MOVBU.P	1(R0), R3
-	CMP	R2, R3
-	BNE	loop
-
-	SUB	$1, R0		// R0 will be one beyond the position we want
-	SUB	R4, R0		// remove base
-	MOVD	R0, ret+32(FP)
-	RET
-
-notfound:
-	MOVD	$-1, R0
-	MOVD	R0, ret+32(FP)
-	RET
-
-TEXT strings·IndexByte(SB),NOSPLIT,$0-32
-	MOVD	s+0(FP), R0
-	MOVD	s_len+8(FP), R1
-	MOVBU	c+16(FP), R2	// byte to find
-	MOVD	R0, R4		// store base for later
-	ADD	R0, R1		// end
-loop:
-	CMP	R0, R1
-	BEQ	notfound
-	MOVBU.P	1(R0), R3
-	CMP	R2, R3
-	BNE	loop
-
-	SUB	$1, R0		// R0 will be one beyond the position we want
-	SUB	R4, R0		// remove base
-	MOVD	R0, ret+24(FP)
-	RET
-
-notfound:
-	MOVD	$-1, R0
-	MOVD	R0, ret+24(FP)
-	RET
-
-// TODO: share code with memeq?
-TEXT bytes·Equal(SB),NOSPLIT,$0-49
-	MOVD	a_len+8(FP), R1
-	MOVD	b_len+32(FP), R3
-	CMP	R1, R3		// unequal lengths are not equal
-	BNE	notequal
-	MOVD	a+0(FP), R0
-	MOVD	b+24(FP), R2
-	ADD	R0, R1		// end
-loop:
-	CMP	R0, R1
-	BEQ	equal		// reaches the end
-	MOVBU.P	1(R0), R4
-	MOVBU.P	1(R2), R5
-	CMP	R4, R5
-	BEQ	loop
-notequal:
-	MOVB	ZR, ret+48(FP)
-	RET
-equal:
-	MOVD	$1, R0
-	MOVB	R0, ret+48(FP)
-	RET
-
-TEXT runtime·fastrand1(SB),NOSPLIT,$-8-4
-	MOVD	g_m(g), R1
-	MOVWU	m_fastrand(R1), R0
-	ADD	R0, R0
-	CMPW	$0, R0
-	BGE	notneg
-	EOR	$0x88888eef, R0
-notneg:
-	MOVW	R0, m_fastrand(R1)
-	MOVW	R0, ret+0(FP)
-	RET
-
-TEXT runtime·return0(SB), NOSPLIT, $0
-	MOVW	$0, R0
-	RET
-
-// The top-most function running on a goroutine
-// returns to goexit+PCQuantum.
-TEXT runtime·goexit(SB),NOSPLIT,$-8-0
-	MOVD	R0, R0	// NOP
-	BL	runtime·goexit1(SB)	// does not return
-
-// TODO(aram): use PRFM here.
-TEXT runtime·prefetcht0(SB),NOSPLIT,$0-8
-	RET
-
-TEXT runtime·prefetcht1(SB),NOSPLIT,$0-8
-	RET
-
-TEXT runtime·prefetcht2(SB),NOSPLIT,$0-8
-	RET
-
-TEXT runtime·prefetchnta(SB),NOSPLIT,$0-8
-	RET
-
diff --git a/src/runtime/asm_ppc64x.s b/src/runtime/asm_ppc64x.s
deleted file mode 100644
index 0404124..0000000
--- a/src/runtime/asm_ppc64x.s
+++ /dev/null
@@ -1,1172 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ppc64 ppc64le
-
-#include "go_asm.h"
-#include "go_tls.h"
-#include "funcdata.h"
-#include "textflag.h"
-
-TEXT runtime·rt0_go(SB),NOSPLIT,$0
-	// R1 = stack; R3 = argc; R4 = argv; R13 = C TLS base pointer
-
-	// initialize essential registers
-	BL	runtime·reginit(SB)
-
-	SUB	$24, R1
-	MOVW	R3, 8(R1) // argc
-	MOVD	R4, 16(R1) // argv
-
-	// create istack out of the given (operating system) stack.
-	// _cgo_init may update stackguard.
-	MOVD	$runtime·g0(SB), g
-	MOVD	$(-64*1024), R31
-	ADD	R31, R1, R3
-	MOVD	R3, g_stackguard0(g)
-	MOVD	R3, g_stackguard1(g)
-	MOVD	R3, (g_stack+stack_lo)(g)
-	MOVD	R1, (g_stack+stack_hi)(g)
-
-	// if there is a _cgo_init, call it using the gcc ABI.
-	MOVD	_cgo_init(SB), R12
-	CMP	R0, R12
-	BEQ	nocgo
-	MOVD	R12, CTR		// r12 = "global function entry point"
-	MOVD	R13, R5			// arg 2: TLS base pointer
-	MOVD	$setg_gcc<>(SB), R4 	// arg 1: setg
-	MOVD	g, R3			// arg 0: G
-	// C functions expect 32 bytes of space on caller stack frame
-	// and a 16-byte aligned R1
-	MOVD	R1, R14			// save current stack
-	SUB	$32, R1			// reserve 32 bytes
-	RLDCR	$0, R1, $~15, R1	// 16-byte align
-	BL	(CTR)			// may clobber R0, R3-R12
-	MOVD	R14, R1			// restore stack
-	XOR	R0, R0			// fix R0
-
-nocgo:
-	// update stackguard after _cgo_init
-	MOVD	(g_stack+stack_lo)(g), R3
-	ADD	$const__StackGuard, R3
-	MOVD	R3, g_stackguard0(g)
-	MOVD	R3, g_stackguard1(g)
-
-	// set the per-goroutine and per-mach "registers"
-	MOVD	$runtime·m0(SB), R3
-
-	// save m->g0 = g0
-	MOVD	g, m_g0(R3)
-	// save m0 to g0->m
-	MOVD	R3, g_m(g)
-
-	BL	runtime·check(SB)
-
-	// args are already prepared
-	BL	runtime·args(SB)
-	BL	runtime·osinit(SB)
-	BL	runtime·schedinit(SB)
-
-	// create a new goroutine to start program
-	MOVD	$runtime·mainPC(SB), R3		// entry
-	MOVDU	R3, -8(R1)
-	MOVDU	R0, -8(R1)
-	MOVDU	R0, -8(R1)
-	BL	runtime·newproc(SB)
-	ADD	$24, R1
-
-	// start this M
-	BL	runtime·mstart(SB)
-
-	MOVD	R0, 1(R0)
-	RET
-
-DATA	runtime·mainPC+0(SB)/8,$runtime·main(SB)
-GLOBL	runtime·mainPC(SB),RODATA,$8
-
-TEXT runtime·breakpoint(SB),NOSPLIT,$-8-0
-	MOVD	R0, 2(R0) // TODO: TD
-	RET
-
-TEXT runtime·asminit(SB),NOSPLIT,$-8-0
-	RET
-
-TEXT _cgo_reginit(SB),NOSPLIT,$-8-0
-	// crosscall_ppc64 and crosscall2 need to reginit, but can't
-	// get at the 'runtime.reginit' symbol.
-	BR	runtime·reginit(SB)
-
-TEXT runtime·reginit(SB),NOSPLIT,$-8-0
-	// set R0 to zero, it's expected by the toolchain
-	XOR R0, R0
-	// initialize essential FP registers
-	FMOVD	$4503601774854144.0, F27
-	FMOVD	$0.5, F29
-	FSUB	F29, F29, F28
-	FADD	F29, F29, F30
-	FADD	F30, F30, F31
-	RET
-
-/*
- *  go-routine
- */
-
-// void gosave(Gobuf*)
-// save state in Gobuf; setjmp
-TEXT runtime·gosave(SB), NOSPLIT, $-8-8
-	MOVD	buf+0(FP), R3
-	MOVD	R1, gobuf_sp(R3)
-	MOVD	LR, R31
-	MOVD	R31, gobuf_pc(R3)
-	MOVD	g, gobuf_g(R3)
-	MOVD	R0, gobuf_lr(R3)
-	MOVD	R0, gobuf_ret(R3)
-	MOVD	R0, gobuf_ctxt(R3)
-	RET
-
-// void gogo(Gobuf*)
-// restore state from Gobuf; longjmp
-TEXT runtime·gogo(SB), NOSPLIT, $-8-8
-	MOVD	buf+0(FP), R5
-	MOVD	gobuf_g(R5), g	// make sure g is not nil
-	BL	runtime·save_g(SB)
-
-	MOVD	0(g), R4
-	MOVD	gobuf_sp(R5), R1
-	MOVD	gobuf_lr(R5), R31
-	MOVD	R31, LR
-	MOVD	gobuf_ret(R5), R3
-	MOVD	gobuf_ctxt(R5), R11
-	MOVD	R0, gobuf_sp(R5)
-	MOVD	R0, gobuf_ret(R5)
-	MOVD	R0, gobuf_lr(R5)
-	MOVD	R0, gobuf_ctxt(R5)
-	CMP	R0, R0 // set condition codes for == test, needed by stack split
-	MOVD	gobuf_pc(R5), R31
-	MOVD	R31, CTR
-	BR	(CTR)
-
-// void mcall(fn func(*g))
-// Switch to m->g0's stack, call fn(g).
-// Fn must never return.  It should gogo(&g->sched)
-// to keep running g.
-TEXT runtime·mcall(SB), NOSPLIT, $-8-8
-	// Save caller state in g->sched
-	MOVD	R1, (g_sched+gobuf_sp)(g)
-	MOVD	LR, R31
-	MOVD	R31, (g_sched+gobuf_pc)(g)
-	MOVD	R0, (g_sched+gobuf_lr)(g)
-	MOVD	g, (g_sched+gobuf_g)(g)
-
-	// Switch to m->g0 & its stack, call fn.
-	MOVD	g, R3
-	MOVD	g_m(g), R8
-	MOVD	m_g0(R8), g
-	BL	runtime·save_g(SB)
-	CMP	g, R3
-	BNE	2(PC)
-	BR	runtime·badmcall(SB)
-	MOVD	fn+0(FP), R11			// context
-	MOVD	0(R11), R4			// code pointer
-	MOVD	R4, CTR
-	MOVD	(g_sched+gobuf_sp)(g), R1	// sp = m->g0->sched.sp
-	MOVDU	R3, -8(R1)
-	MOVDU	R0, -8(R1)
-	BL	(CTR)
-	BR	runtime·badmcall2(SB)
-
-// systemstack_switch is a dummy routine that systemstack leaves at the bottom
-// of the G stack.  We need to distinguish the routine that
-// lives at the bottom of the G stack from the one that lives
-// at the top of the system stack because the one at the top of
-// the system stack terminates the stack walk (see topofstack()).
-TEXT runtime·systemstack_switch(SB), NOSPLIT, $0-0
-	UNDEF
-	BL	(LR)	// make sure this function is not leaf
-	RET
-
-// func systemstack(fn func())
-TEXT runtime·systemstack(SB), NOSPLIT, $0-8
-	MOVD	fn+0(FP), R3	// R3 = fn
-	MOVD	R3, R11		// context
-	MOVD	g_m(g), R4	// R4 = m
-
-	MOVD	m_gsignal(R4), R5	// R5 = gsignal
-	CMP	g, R5
-	BEQ	noswitch
-
-	MOVD	m_g0(R4), R5	// R5 = g0
-	CMP	g, R5
-	BEQ	noswitch
-
-	MOVD	m_curg(R4), R6
-	CMP	g, R6
-	BEQ	switch
-
-	// Bad: g is not gsignal, not g0, not curg. What is it?
-	// Hide call from linker nosplit analysis.
-	MOVD	$runtime·badsystemstack(SB), R3
-	MOVD	R3, CTR
-	BL	(CTR)
-
-switch:
-	// save our state in g->sched.  Pretend to
-	// be systemstack_switch if the G stack is scanned.
-	MOVD	$runtime·systemstack_switch(SB), R6
-	ADD	$8, R6	// get past prologue
-	MOVD	R6, (g_sched+gobuf_pc)(g)
-	MOVD	R1, (g_sched+gobuf_sp)(g)
-	MOVD	R0, (g_sched+gobuf_lr)(g)
-	MOVD	g, (g_sched+gobuf_g)(g)
-
-	// switch to g0
-	MOVD	R5, g
-	BL	runtime·save_g(SB)
-	MOVD	(g_sched+gobuf_sp)(g), R3
-	// make it look like mstart called systemstack on g0, to stop traceback
-	SUB	$8, R3
-	MOVD	$runtime·mstart(SB), R4
-	MOVD	R4, 0(R3)
-	MOVD	R3, R1
-
-	// call target function
-	MOVD	0(R11), R3	// code pointer
-	MOVD	R3, CTR
-	BL	(CTR)
-
-	// switch back to g
-	MOVD	g_m(g), R3
-	MOVD	m_curg(R3), g
-	BL	runtime·save_g(SB)
-	MOVD	(g_sched+gobuf_sp)(g), R1
-	MOVD	R0, (g_sched+gobuf_sp)(g)
-	RET
-
-noswitch:
-	// already on m stack, just call directly
-	MOVD	0(R11), R3	// code pointer
-	MOVD	R3, CTR
-	BL	(CTR)
-	RET
-
-/*
- * support for morestack
- */
-
-// Called during function prolog when more stack is needed.
-// Caller has already loaded:
-// R3: framesize, R4: argsize, R5: LR
-//
-// The traceback routines see morestack on a g0 as being
-// the top of a stack (for example, morestack calling newstack
-// calling the scheduler calling newm calling gc), so we must
-// record an argument size. For that purpose, it has no arguments.
-TEXT runtime·morestack(SB),NOSPLIT,$-8-0
-	// Cannot grow scheduler stack (m->g0).
-	MOVD	g_m(g), R7
-	MOVD	m_g0(R7), R8
-	CMP	g, R8
-	BNE	2(PC)
-	BL	runtime·abort(SB)
-
-	// Cannot grow signal stack (m->gsignal).
-	MOVD	m_gsignal(R7), R8
-	CMP	g, R8
-	BNE	2(PC)
-	BL	runtime·abort(SB)
-
-	// Called from f.
-	// Set g->sched to context in f.
-	MOVD	R11, (g_sched+gobuf_ctxt)(g)
-	MOVD	R1, (g_sched+gobuf_sp)(g)
-	MOVD	LR, R8
-	MOVD	R8, (g_sched+gobuf_pc)(g)
-	MOVD	R5, (g_sched+gobuf_lr)(g)
-
-	// Called from f.
-	// Set m->morebuf to f's caller.
-	MOVD	R5, (m_morebuf+gobuf_pc)(R7)	// f's caller's PC
-	MOVD	R1, (m_morebuf+gobuf_sp)(R7)	// f's caller's SP
-	MOVD	g, (m_morebuf+gobuf_g)(R7)
-
-	// Call newstack on m->g0's stack.
-	MOVD	m_g0(R7), g
-	BL	runtime·save_g(SB)
-	MOVD	(g_sched+gobuf_sp)(g), R1
-	BL	runtime·newstack(SB)
-
-	// Not reached, but make sure the return PC from the call to newstack
-	// is still in this function, and not the beginning of the next.
-	UNDEF
-
-TEXT runtime·morestack_noctxt(SB),NOSPLIT,$-8-0
-	MOVD	R0, R11
-	BR	runtime·morestack(SB)
-
-TEXT runtime·stackBarrier(SB),NOSPLIT,$0
-	// We came here via a RET to an overwritten LR.
-	// R3 may be live. Other registers are available.
-
-	// Get the original return PC, g.stkbar[g.stkbarPos].savedLRVal.
-	MOVD	(g_stkbar+slice_array)(g), R4
-	MOVD	g_stkbarPos(g), R5
-	MOVD	$stkbar__size, R6
-	MULLD	R5, R6
-	ADD	R4, R6
-	MOVD	stkbar_savedLRVal(R6), R6
-	// Record that this stack barrier was hit.
-	ADD	$1, R5
-	MOVD	R5, g_stkbarPos(g)
-	// Jump to the original return PC.
-	MOVD	R6, CTR
-	BR	(CTR)
-
-// reflectcall: call a function with the given argument list
-// func call(argtype *_type, f *FuncVal, arg *byte, argsize, retoffset uint32).
-// we don't have variable-sized frames, so we use a small number
-// of constant-sized-frame functions to encode a few bits of size in the pc.
-// Caution: ugly multiline assembly macros in your future!
-
-#define DISPATCH(NAME,MAXSIZE)		\
-	MOVD	$MAXSIZE, R31;		\
-	CMP	R3, R31;		\
-	BGT	4(PC);			\
-	MOVD	$NAME(SB), R31;	\
-	MOVD	R31, CTR;		\
-	BR	(CTR)
-// Note: can't just "BR NAME(SB)" - bad inlining results.
-
-TEXT reflect·call(SB), NOSPLIT, $0-0
-	BR	·reflectcall(SB)
-
-TEXT ·reflectcall(SB), NOSPLIT, $-8-32
-	MOVWZ argsize+24(FP), R3
-	// NOTE(rsc): No call16, because CALLFN needs four words
-	// of argument space to invoke callwritebarrier.
-	DISPATCH(runtime·call32, 32)
-	DISPATCH(runtime·call64, 64)
-	DISPATCH(runtime·call128, 128)
-	DISPATCH(runtime·call256, 256)
-	DISPATCH(runtime·call512, 512)
-	DISPATCH(runtime·call1024, 1024)
-	DISPATCH(runtime·call2048, 2048)
-	DISPATCH(runtime·call4096, 4096)
-	DISPATCH(runtime·call8192, 8192)
-	DISPATCH(runtime·call16384, 16384)
-	DISPATCH(runtime·call32768, 32768)
-	DISPATCH(runtime·call65536, 65536)
-	DISPATCH(runtime·call131072, 131072)
-	DISPATCH(runtime·call262144, 262144)
-	DISPATCH(runtime·call524288, 524288)
-	DISPATCH(runtime·call1048576, 1048576)
-	DISPATCH(runtime·call2097152, 2097152)
-	DISPATCH(runtime·call4194304, 4194304)
-	DISPATCH(runtime·call8388608, 8388608)
-	DISPATCH(runtime·call16777216, 16777216)
-	DISPATCH(runtime·call33554432, 33554432)
-	DISPATCH(runtime·call67108864, 67108864)
-	DISPATCH(runtime·call134217728, 134217728)
-	DISPATCH(runtime·call268435456, 268435456)
-	DISPATCH(runtime·call536870912, 536870912)
-	DISPATCH(runtime·call1073741824, 1073741824)
-	MOVD	$runtime·badreflectcall(SB), R31
-	MOVD	R31, CTR
-	BR	(CTR)
-
-#define CALLFN(NAME,MAXSIZE)			\
-TEXT NAME(SB), WRAPPER, $MAXSIZE-24;		\
-	NO_LOCAL_POINTERS;			\
-	/* copy arguments to stack */		\
-	MOVD	arg+16(FP), R3;			\
-	MOVWZ	argsize+24(FP), R4;			\
-	MOVD	R1, R5;				\
-	ADD	$(8-1), R5;			\
-	SUB	$1, R3;				\
-	ADD	R5, R4;				\
-	CMP	R5, R4;				\
-	BEQ	4(PC);				\
-	MOVBZU	1(R3), R6;			\
-	MOVBZU	R6, 1(R5);			\
-	BR	-4(PC);				\
-	/* call function */			\
-	MOVD	f+8(FP), R11;			\
-	MOVD	(R11), R31;			\
-	MOVD	R31, CTR;			\
-	PCDATA  $PCDATA_StackMapIndex, $0;	\
-	BL	(CTR);				\
-	/* copy return values back */		\
-	MOVD	arg+16(FP), R3;			\
-	MOVWZ	n+24(FP), R4;			\
-	MOVWZ	retoffset+28(FP), R6;		\
-	MOVD	R1, R5;				\
-	ADD	R6, R5; 			\
-	ADD	R6, R3;				\
-	SUB	R6, R4;				\
-	ADD	$(8-1), R5;			\
-	SUB	$1, R3;				\
-	ADD	R5, R4;				\
-loop:						\
-	CMP	R5, R4;				\
-	BEQ	end;				\
-	MOVBZU	1(R5), R6;			\
-	MOVBZU	R6, 1(R3);			\
-	BR	loop;				\
-end:						\
-	/* execute write barrier updates */	\
-	MOVD	argtype+0(FP), R7;		\
-	MOVD	arg+16(FP), R3;			\
-	MOVWZ	n+24(FP), R4;			\
-	MOVWZ	retoffset+28(FP), R6;		\
-	MOVD	R7, 8(R1);			\
-	MOVD	R3, 16(R1);			\
-	MOVD	R4, 24(R1);			\
-	MOVD	R6, 32(R1);			\
-	BL	runtime·callwritebarrier(SB);	\
-	RET
-
-CALLFN(·call16, 16)
-CALLFN(·call32, 32)
-CALLFN(·call64, 64)
-CALLFN(·call128, 128)
-CALLFN(·call256, 256)
-CALLFN(·call512, 512)
-CALLFN(·call1024, 1024)
-CALLFN(·call2048, 2048)
-CALLFN(·call4096, 4096)
-CALLFN(·call8192, 8192)
-CALLFN(·call16384, 16384)
-CALLFN(·call32768, 32768)
-CALLFN(·call65536, 65536)
-CALLFN(·call131072, 131072)
-CALLFN(·call262144, 262144)
-CALLFN(·call524288, 524288)
-CALLFN(·call1048576, 1048576)
-CALLFN(·call2097152, 2097152)
-CALLFN(·call4194304, 4194304)
-CALLFN(·call8388608, 8388608)
-CALLFN(·call16777216, 16777216)
-CALLFN(·call33554432, 33554432)
-CALLFN(·call67108864, 67108864)
-CALLFN(·call134217728, 134217728)
-CALLFN(·call268435456, 268435456)
-CALLFN(·call536870912, 536870912)
-CALLFN(·call1073741824, 1073741824)
-
-// bool cas(uint32 *ptr, uint32 old, uint32 new)
-// Atomically:
-//	if(*val == old){
-//		*val = new;
-//		return 1;
-//	} else
-//		return 0;
-TEXT runtime·cas(SB), NOSPLIT, $0-17
-	MOVD	ptr+0(FP), R3
-	MOVWZ	old+8(FP), R4
-	MOVWZ	new+12(FP), R5
-cas_again:
-	SYNC
-	LWAR	(R3), R6
-	CMPW	R6, R4
-	BNE	cas_fail
-	STWCCC	R5, (R3)
-	BNE	cas_again
-	MOVD	$1, R3
-	SYNC
-	ISYNC
-	MOVB	R3, ret+16(FP)
-	RET
-cas_fail:
-	MOVD	$0, R3
-	BR	-5(PC)
-
-// bool	runtime·cas64(uint64 *ptr, uint64 old, uint64 new)
-// Atomically:
-//	if(*val == *old){
-//		*val = new;
-//		return 1;
-//	} else {
-//		return 0;
-//	}
-TEXT runtime·cas64(SB), NOSPLIT, $0-25
-	MOVD	ptr+0(FP), R3
-	MOVD	old+8(FP), R4
-	MOVD	new+16(FP), R5
-cas64_again:
-	SYNC
-	LDAR	(R3), R6
-	CMP	R6, R4
-	BNE	cas64_fail
-	STDCCC	R5, (R3)
-	BNE	cas64_again
-	MOVD	$1, R3
-	SYNC
-	ISYNC
-	MOVB	R3, ret+24(FP)
-	RET
-cas64_fail:
-	MOVD	$0, R3
-	BR	-5(PC)
-
-TEXT runtime·casuintptr(SB), NOSPLIT, $0-25
-	BR	runtime·cas64(SB)
-
-TEXT runtime·atomicloaduintptr(SB), NOSPLIT, $-8-16
-	BR	runtime·atomicload64(SB)
-
-TEXT runtime·atomicloaduint(SB), NOSPLIT, $-8-16
-	BR	runtime·atomicload64(SB)
-
-TEXT runtime·atomicstoreuintptr(SB), NOSPLIT, $0-16
-	BR	runtime·atomicstore64(SB)
-
-// bool casp(void **val, void *old, void *new)
-// Atomically:
-//	if(*val == old){
-//		*val = new;
-//		return 1;
-//	} else
-//		return 0;
-TEXT runtime·casp1(SB), NOSPLIT, $0-25
-	BR runtime·cas64(SB)
-
-// uint32 xadd(uint32 volatile *ptr, int32 delta)
-// Atomically:
-//	*val += delta;
-//	return *val;
-TEXT runtime·xadd(SB), NOSPLIT, $0-20
-	MOVD	ptr+0(FP), R4
-	MOVW	delta+8(FP), R5
-	SYNC
-	LWAR	(R4), R3
-	ADD	R5, R3
-	STWCCC	R3, (R4)
-	BNE	-4(PC)
-	SYNC
-	ISYNC
-	MOVW	R3, ret+16(FP)
-	RET
-
-TEXT runtime·xadd64(SB), NOSPLIT, $0-24
-	MOVD	ptr+0(FP), R4
-	MOVD	delta+8(FP), R5
-	SYNC
-	LDAR	(R4), R3
-	ADD	R5, R3
-	STDCCC	R3, (R4)
-	BNE	-4(PC)
-	SYNC
-	ISYNC
-	MOVD	R3, ret+16(FP)
-	RET
-
-TEXT runtime·xchg(SB), NOSPLIT, $0-20
-	MOVD	ptr+0(FP), R4
-	MOVW	new+8(FP), R5
-	SYNC
-	LWAR	(R4), R3
-	STWCCC	R5, (R4)
-	BNE	-3(PC)
-	SYNC
-	ISYNC
-	MOVW	R3, ret+16(FP)
-	RET
-
-TEXT runtime·xchg64(SB), NOSPLIT, $0-24
-	MOVD	ptr+0(FP), R4
-	MOVD	new+8(FP), R5
-	SYNC
-	LDAR	(R4), R3
-	STDCCC	R5, (R4)
-	BNE	-3(PC)
-	SYNC
-	ISYNC
-	MOVD	R3, ret+16(FP)
-	RET
-
-TEXT runtime·xchgp1(SB), NOSPLIT, $0-24
-	BR	runtime·xchg64(SB)
-
-TEXT runtime·xchguintptr(SB), NOSPLIT, $0-24
-	BR	runtime·xchg64(SB)
-
-TEXT runtime·procyield(SB),NOSPLIT,$0-0
-	RET
-
-TEXT runtime·atomicstorep1(SB), NOSPLIT, $0-16
-	BR	runtime·atomicstore64(SB)
-
-TEXT runtime·atomicstore(SB), NOSPLIT, $0-12
-	MOVD	ptr+0(FP), R3
-	MOVW	val+8(FP), R4
-	SYNC
-	MOVW	R4, 0(R3)
-	RET
-
-TEXT runtime·atomicstore64(SB), NOSPLIT, $0-16
-	MOVD	ptr+0(FP), R3
-	MOVD	val+8(FP), R4
-	SYNC
-	MOVD	R4, 0(R3)
-	RET
-
-// void	runtime·atomicor8(byte volatile*, byte);
-TEXT runtime·atomicor8(SB), NOSPLIT, $0-9
-	MOVD	ptr+0(FP), R3
-	MOVBZ	val+8(FP), R4
-	// Align ptr down to 4 bytes so we can use 32-bit load/store.
-	// R5 = (R3 << 0) & ~3
-	RLDCR	$0, R3, $~3, R5
-	// Compute val shift.
-#ifdef GOARCH_ppc64
-	// Big endian.  ptr = ptr ^ 3
-	XOR	$3, R3
-#endif
-	// R6 = ((ptr & 3) * 8) = (ptr << 3) & (3*8)
-	RLDC	$3, R3, $(3*8), R6
-	// Shift val for aligned ptr.  R4 = val << R6
-	SLD	R6, R4, R4
-
-again:
-	SYNC
-	LWAR	(R5), R6
-	OR	R4, R6
-	STWCCC	R6, (R5)
-	BNE	again
-	SYNC
-	ISYNC
-	RET
-
-// void	runtime·atomicand8(byte volatile*, byte);
-TEXT runtime·atomicand8(SB), NOSPLIT, $0-9
-	MOVD	ptr+0(FP), R3
-	MOVBZ	val+8(FP), R4
-	// Align ptr down to 4 bytes so we can use 32-bit load/store.
-	// R5 = (R3 << 0) & ~3
-	RLDCR	$0, R3, $~3, R5
-	// Compute val shift.
-#ifdef GOARCH_ppc64
-	// Big endian.  ptr = ptr ^ 3
-	XOR	$3, R3
-#endif
-	// R6 = ((ptr & 3) * 8) = (ptr << 3) & (3*8)
-	RLDC	$3, R3, $(3*8), R6
-	// Shift val for aligned ptr.  R4 = val << R6 | ^(0xFF << R6)
-	MOVD	$0xFF, R7
-	SLD	R6, R4
-	SLD	R6, R7
-	XOR $-1, R7
-	OR	R7, R4
-again:
-	SYNC
-	LWAR	(R5), R6
-	AND	R4, R6
-	STWCCC	R6, (R5)
-	BNE	again
-	SYNC
-	ISYNC
-	RET
-
-// void jmpdefer(fv, sp);
-// called from deferreturn.
-// 1. grab stored LR for caller
-// 2. sub 4 bytes to get back to BL deferreturn
-// 3. BR to fn
-TEXT runtime·jmpdefer(SB), NOSPLIT, $-8-16
-	MOVD	0(R1), R31
-	SUB	$4, R31
-	MOVD	R31, LR
-
-	MOVD	fv+0(FP), R11
-	MOVD	argp+8(FP), R1
-	SUB	$8, R1
-	MOVD	0(R11), R3
-	MOVD	R3, CTR
-	BR	(CTR)
-
-// Save state of caller into g->sched. Smashes R31.
-TEXT gosave<>(SB),NOSPLIT,$-8
-	MOVD	LR, R31
-	MOVD	R31, (g_sched+gobuf_pc)(g)
-	MOVD	R1, (g_sched+gobuf_sp)(g)
-	MOVD	R0, (g_sched+gobuf_lr)(g)
-	MOVD	R0, (g_sched+gobuf_ret)(g)
-	MOVD	R0, (g_sched+gobuf_ctxt)(g)
-	RET
-
-// func asmcgocall(fn, arg unsafe.Pointer) int32
-// Call fn(arg) on the scheduler stack,
-// aligned appropriately for the gcc ABI.
-// See cgocall.go for more details.
-TEXT ·asmcgocall(SB),NOSPLIT,$0-20
-	MOVD	fn+0(FP), R3
-	MOVD	arg+8(FP), R4
-
-	MOVD	R1, R2		// save original stack pointer
-	MOVD	g, R5
-
-	// Figure out if we need to switch to m->g0 stack.
-	// We get called to create new OS threads too, and those
-	// come in on the m->g0 stack already.
-	MOVD	g_m(g), R6
-	MOVD	m_g0(R6), R6
-	CMP	R6, g
-	BEQ	g0
-	BL	gosave<>(SB)
-	MOVD	R6, g
-	BL	runtime·save_g(SB)
-	MOVD	(g_sched+gobuf_sp)(g), R1
-
-	// Now on a scheduling stack (a pthread-created stack).
-g0:
-	// Save room for two of our pointers, plus 32 bytes of callee
-	// save area that lives on the caller stack.
-	SUB	$48, R1
-	RLDCR	$0, R1, $~15, R1	// 16-byte alignment for gcc ABI
-	MOVD	R5, 40(R1)	// save old g on stack
-	MOVD	(g_stack+stack_hi)(R5), R5
-	SUB	R2, R5
-	MOVD	R5, 32(R1)	// save depth in old g stack (can't just save SP, as stack might be copied during a callback)
-	MOVD	R0, 0(R1)	// clear back chain pointer (TODO can we give it real back trace information?)
-	// This is a "global call", so put the global entry point in r12
-	MOVD	R3, R12
-	MOVD	R12, CTR
-	MOVD	R4, R3		// arg in r3
-	BL	(CTR)
-
-	// C code can clobber R0, so set it back to 0.  F27-F31 are
-	// callee save, so we don't need to recover those.
-	XOR	R0, R0
-	// Restore g, stack pointer.  R3 is errno, so don't touch it
-	MOVD	40(R1), g
-	BL	runtime·save_g(SB)
-	MOVD	(g_stack+stack_hi)(g), R5
-	MOVD	32(R1), R6
-	SUB	R6, R5
-	MOVD	R5, R1
-
-	MOVW	R3, ret+16(FP)
-	RET
-
-// cgocallback(void (*fn)(void*), void *frame, uintptr framesize)
-// Turn the fn into a Go func (by taking its address) and call
-// cgocallback_gofunc.
-TEXT runtime·cgocallback(SB),NOSPLIT,$24-24
-	MOVD	$fn+0(FP), R3
-	MOVD	R3, 8(R1)
-	MOVD	frame+8(FP), R3
-	MOVD	R3, 16(R1)
-	MOVD	framesize+16(FP), R3
-	MOVD	R3, 24(R1)
-	MOVD	$runtime·cgocallback_gofunc(SB), R3
-	MOVD	R3, CTR
-	BL	(CTR)
-	RET
-
-// cgocallback_gofunc(FuncVal*, void *frame, uintptr framesize)
-// See cgocall.go for more details.
-TEXT ·cgocallback_gofunc(SB),NOSPLIT,$16-24
-	NO_LOCAL_POINTERS
-
-	// Load m and g from thread-local storage.
-	MOVB	runtime·iscgo(SB), R3
-	CMP	R3, $0
-	BEQ	nocgo
-	BL	runtime·load_g(SB)
-nocgo:
-
-	// If g is nil, Go did not create the current thread.
-	// Call needm to obtain one for temporary use.
-	// In this case, we're running on the thread stack, so there's
-	// lots of space, but the linker doesn't know. Hide the call from
-	// the linker analysis by using an indirect call.
-	CMP	g, $0
-	BNE	havem
-	MOVD	g, savedm-8(SP) // g is zero, so is m.
-	MOVD	$runtime·needm(SB), R3
-	MOVD	R3, CTR
-	BL	(CTR)
-
-	// Set m->sched.sp = SP, so that if a panic happens
-	// during the function we are about to execute, it will
-	// have a valid SP to run on the g0 stack.
-	// The next few lines (after the havem label)
-	// will save this SP onto the stack and then write
-	// the same SP back to m->sched.sp. That seems redundant,
-	// but if an unrecovered panic happens, unwindm will
-	// restore the g->sched.sp from the stack location
-	// and then systemstack will try to use it. If we don't set it here,
-	// that restored SP will be uninitialized (typically 0) and
-	// will not be usable.
-	MOVD	g_m(g), R3
-	MOVD	m_g0(R3), R3
-	MOVD	R1, (g_sched+gobuf_sp)(R3)
-
-havem:
-	MOVD	g_m(g), R8
-	MOVD	R8, savedm-8(SP)
-	// Now there's a valid m, and we're running on its m->g0.
-	// Save current m->g0->sched.sp on stack and then set it to SP.
-	// Save current sp in m->g0->sched.sp in preparation for
-	// switch back to m->curg stack.
-	// NOTE: unwindm knows that the saved g->sched.sp is at 8(R1) aka savedsp-16(SP).
-	MOVD	m_g0(R8), R3
-	MOVD	(g_sched+gobuf_sp)(R3), R4
-	MOVD	R4, savedsp-16(SP)
-	MOVD	R1, (g_sched+gobuf_sp)(R3)
-
-	// Switch to m->curg stack and call runtime.cgocallbackg.
-	// Because we are taking over the execution of m->curg
-	// but *not* resuming what had been running, we need to
-	// save that information (m->curg->sched) so we can restore it.
-	// We can restore m->curg->sched.sp easily, because calling
-	// runtime.cgocallbackg leaves SP unchanged upon return.
-	// To save m->curg->sched.pc, we push it onto the stack.
-	// This has the added benefit that it looks to the traceback
-	// routine like cgocallbackg is going to return to that
-	// PC (because the frame we allocate below has the same
-	// size as cgocallback_gofunc's frame declared above)
-	// so that the traceback will seamlessly trace back into
-	// the earlier calls.
-	//
-	// In the new goroutine, -16(SP) and -8(SP) are unused.
-	MOVD	m_curg(R8), g
-	BL	runtime·save_g(SB)
-	MOVD	(g_sched+gobuf_sp)(g), R4 // prepare stack as R4
-	MOVD	(g_sched+gobuf_pc)(g), R5
-	MOVD	R5, -24(R4)
-	MOVD	$-24(R4), R1
-	BL	runtime·cgocallbackg(SB)
-
-	// Restore g->sched (== m->curg->sched) from saved values.
-	MOVD	0(R1), R5
-	MOVD	R5, (g_sched+gobuf_pc)(g)
-	MOVD	$24(R1), R4
-	MOVD	R4, (g_sched+gobuf_sp)(g)
-
-	// Switch back to m->g0's stack and restore m->g0->sched.sp.
-	// (Unlike m->curg, the g0 goroutine never uses sched.pc,
-	// so we do not have to restore it.)
-	MOVD	g_m(g), R8
-	MOVD	m_g0(R8), g
-	BL	runtime·save_g(SB)
-	MOVD	(g_sched+gobuf_sp)(g), R1
-	MOVD	savedsp-16(SP), R4
-	MOVD	R4, (g_sched+gobuf_sp)(g)
-
-	// If the m on entry was nil, we called needm above to borrow an m
-	// for the duration of the call. Since the call is over, return it with dropm.
-	MOVD	savedm-8(SP), R6
-	CMP	R6, $0
-	BNE	droppedm
-	MOVD	$runtime·dropm(SB), R3
-	MOVD	R3, CTR
-	BL	(CTR)
-droppedm:
-
-	// Done!
-	RET
-
-// void setg(G*); set g. for use by needm.
-TEXT runtime·setg(SB), NOSPLIT, $0-8
-	MOVD	gg+0(FP), g
-	// This only happens if iscgo, so jump straight to save_g
-	BL	runtime·save_g(SB)
-	RET
-
-// void setg_gcc(G*); set g in C TLS.
-// Must obey the gcc calling convention.
-TEXT setg_gcc<>(SB),NOSPLIT,$-8-0
-	// The standard prologue clobbers R31, which is callee-save in
-	// the C ABI, so we have to use $-8-0 and save LR ourselves.
-	MOVD	LR, R4
-	// Also save g and R31, since they're callee-save in C ABI
-	MOVD	R31, R5
-	MOVD	g, R6
-
-	MOVD	R3, g
-	BL	runtime·save_g(SB)
-
-	MOVD	R6, g
-	MOVD	R5, R31
-	MOVD	R4, LR
-	RET
-
-TEXT runtime·getcallerpc(SB),NOSPLIT,$8-16
-	MOVD	16(R1), R3		// LR saved by caller
-	MOVD	runtime·stackBarrierPC(SB), R4
-	CMP	R3, R4
-	BNE	nobar
-	// Get original return PC.
-	BL	runtime·nextBarrierPC(SB)
-	MOVD	8(R1), R3
-nobar:
-	MOVD	R3, ret+8(FP)
-	RET
-
-TEXT runtime·setcallerpc(SB),NOSPLIT,$8-16
-	MOVD	pc+8(FP), R3
-	MOVD	16(R1), R4
-	MOVD	runtime·stackBarrierPC(SB), R5
-	CMP	R4, R5
-	BEQ	setbar
-	MOVD	R3, 16(R1)		// set LR in caller
-	RET
-setbar:
-	// Set the stack barrier return PC.
-	MOVD	R3, 8(R1)
-	BL	runtime·setNextBarrierPC(SB)
-	RET
-
-TEXT runtime·getcallersp(SB),NOSPLIT,$0-16
-	MOVD	argp+0(FP), R3
-	SUB	$8, R3
-	MOVD	R3, ret+8(FP)
-	RET
-
-TEXT runtime·abort(SB),NOSPLIT,$-8-0
-	MOVW	(R0), R0
-	UNDEF
-
-#define	TBRL	268
-#define	TBRU	269		/* Time base Upper/Lower */
-
-// int64 runtime·cputicks(void)
-TEXT runtime·cputicks(SB),NOSPLIT,$0-8
-	MOVW	SPR(TBRU), R4
-	MOVW	SPR(TBRL), R3
-	MOVW	SPR(TBRU), R5
-	CMPW	R4, R5
-	BNE	-4(PC)
-	SLD	$32, R5
-	OR	R5, R3
-	MOVD	R3, ret+0(FP)
-	RET
-
-// memhash_varlen(p unsafe.Pointer, h seed) uintptr
-// redirects to memhash(p, h, size) using the size
-// stored in the closure.
-TEXT runtime·memhash_varlen(SB),NOSPLIT,$40-24
-	GO_ARGS
-	NO_LOCAL_POINTERS
-	MOVD	p+0(FP), R3
-	MOVD	h+8(FP), R4
-	MOVD	8(R11), R5
-	MOVD	R3, 8(R1)
-	MOVD	R4, 16(R1)
-	MOVD	R5, 24(R1)
-	BL	runtime·memhash(SB)
-	MOVD	32(R1), R3
-	MOVD	R3, ret+16(FP)
-	RET
-
-// AES hashing not implemented for ppc64
-TEXT runtime·aeshash(SB),NOSPLIT,$-8-0
-	MOVW	(R0), R1
-TEXT runtime·aeshash32(SB),NOSPLIT,$-8-0
-	MOVW	(R0), R1
-TEXT runtime·aeshash64(SB),NOSPLIT,$-8-0
-	MOVW	(R0), R1
-TEXT runtime·aeshashstr(SB),NOSPLIT,$-8-0
-	MOVW	(R0), R1
-
-TEXT runtime·memeq(SB),NOSPLIT,$-8-25
-	MOVD	a+0(FP), R3
-	MOVD	b+8(FP), R4
-	MOVD	size+16(FP), R5
-	SUB	$1, R3
-	SUB	$1, R4
-	ADD	R3, R5, R8
-loop:
-	CMP	R3, R8
-	BNE	test
-	MOVD	$1, R3
-	MOVB	R3, ret+24(FP)
-	RET
-test:
-	MOVBZU	1(R3), R6
-	MOVBZU	1(R4), R7
-	CMP	R6, R7
-	BEQ	loop
-
-	MOVB	R0, ret+24(FP)
-	RET
-
-// memequal_varlen(a, b unsafe.Pointer) bool
-TEXT runtime·memequal_varlen(SB),NOSPLIT,$40-17
-	MOVD	a+0(FP), R3
-	MOVD	b+8(FP), R4
-	CMP	R3, R4
-	BEQ	eq
-	MOVD	8(R11), R5    // compiler stores size at offset 8 in the closure
-	MOVD	R3, 8(R1)
-	MOVD	R4, 16(R1)
-	MOVD	R5, 24(R1)
-	BL	runtime·memeq(SB)
-	MOVBZ	32(R1), R3
-	MOVB	R3, ret+16(FP)
-	RET
-eq:
-	MOVD	$1, R3
-	MOVB	R3, ret+16(FP)
-	RET
-
-// eqstring tests whether two strings are equal.
-// The compiler guarantees that strings passed
-// to eqstring have equal length.
-// See runtime_test.go:eqstring_generic for
-// equivalent Go code.
-TEXT runtime·eqstring(SB),NOSPLIT,$0-33
-	MOVD	s1str+0(FP), R3
-	MOVD	s2str+16(FP), R4
-	MOVD	$1, R5
-	MOVB	R5, ret+32(FP)
-	CMP	R3, R4
-	BNE	2(PC)
-	RET
-	MOVD	s1len+8(FP), R5
-	SUB	$1, R3
-	SUB	$1, R4
-	ADD	R3, R5, R8
-loop:
-	CMP	R3, R8
-	BNE	2(PC)
-	RET
-	MOVBZU	1(R3), R6
-	MOVBZU	1(R4), R7
-	CMP	R6, R7
-	BEQ	loop
-	MOVB	R0, ret+32(FP)
-	RET
-
-// TODO: share code with memeq?
-TEXT bytes·Equal(SB),NOSPLIT,$0-49
-	MOVD	a_len+8(FP), R3
-	MOVD	b_len+32(FP), R4
-
-	CMP	R3, R4		// unequal lengths are not equal
-	BNE	noteq
-
-	MOVD	a+0(FP), R5
-	MOVD	b+24(FP), R6
-	SUB	$1, R5
-	SUB	$1, R6
-	ADD	R5, R3		// end-1
-
-loop:
-	CMP	R5, R3
-	BEQ	equal		// reached the end
-	MOVBZU	1(R5), R4
-	MOVBZU	1(R6), R7
-	CMP	R4, R7
-	BEQ	loop
-
-noteq:
-	MOVBZ	R0, ret+48(FP)
-	RET
-
-equal:
-	MOVD	$1, R3
-	MOVBZ	R3, ret+48(FP)
-	RET
-
-TEXT bytes·IndexByte(SB),NOSPLIT,$0-40
-	MOVD	s+0(FP), R3
-	MOVD	s_len+8(FP), R4
-	MOVBZ	c+24(FP), R5	// byte to find
-	MOVD	R3, R6		// store base for later
-	SUB	$1, R3
-	ADD	R3, R4		// end-1
-
-loop:
-	CMP	R3, R4
-	BEQ	notfound
-	MOVBZU	1(R3), R7
-	CMP	R7, R5
-	BNE	loop
-
-	SUB	R6, R3		// remove base
-	MOVD	R3, ret+32(FP)
-	RET
-
-notfound:
-	MOVD	$-1, R3
-	MOVD	R3, ret+32(FP)
-	RET
-
-TEXT strings·IndexByte(SB),NOSPLIT,$0-32
-	MOVD	p+0(FP), R3
-	MOVD	b_len+8(FP), R4
-	MOVBZ	c+16(FP), R5	// byte to find
-	MOVD	R3, R6		// store base for later
-	SUB	$1, R3
-	ADD	R3, R4		// end-1
-
-loop:
-	CMP	R3, R4
-	BEQ	notfound
-	MOVBZU	1(R3), R7
-	CMP	R7, R5
-	BNE	loop
-
-	SUB	R6, R3		// remove base
-	MOVD	R3, ret+24(FP)
-	RET
-
-notfound:
-	MOVD	$-1, R3
-	MOVD	R3, ret+24(FP)
-	RET
-
-TEXT runtime·fastrand1(SB), NOSPLIT, $0-4
-	MOVD	g_m(g), R4
-	MOVWZ	m_fastrand(R4), R3
-	ADD	R3, R3
-	CMPW	R3, $0
-	BGE	2(PC)
-	XOR	$0x88888eef, R3
-	MOVW	R3, m_fastrand(R4)
-	MOVW	R3, ret+0(FP)
-	RET
-
-TEXT runtime·return0(SB), NOSPLIT, $0
-	MOVW	$0, R3
-	RET
-
-// Called from cgo wrappers, this function returns g->m->curg.stack.hi.
-// Must obey the gcc calling convention.
-TEXT _cgo_topofstack(SB),NOSPLIT,$-8
-	// g (R30) and R31 are callee-save in the C ABI, so save them
-	MOVD	g, R4
-	MOVD	R31, R5
-	MOVD	LR, R6
-
-	BL	runtime·load_g(SB)	// clobbers g (R30), R31
-	MOVD	g_m(g), R3
-	MOVD	m_curg(R3), R3
-	MOVD	(g_stack+stack_hi)(R3), R3
-
-	MOVD	R4, g
-	MOVD	R5, R31
-	MOVD	R6, LR
-	RET
-
-// The top-most function running on a goroutine
-// returns to goexit+PCQuantum.
-TEXT runtime·goexit(SB),NOSPLIT,$-8-0
-	MOVD	R0, R0	// NOP
-	BL	runtime·goexit1(SB)	// does not return
-	// traceback from goexit1 must hit code range of goexit
-	MOVD	R0, R0	// NOP
-
-TEXT runtime·prefetcht0(SB),NOSPLIT,$0-8
-	RET
-
-TEXT runtime·prefetcht1(SB),NOSPLIT,$0-8
-	RET
-
-TEXT runtime·prefetcht2(SB),NOSPLIT,$0-8
-	RET
-
-TEXT runtime·prefetchnta(SB),NOSPLIT,$0-8
-	RET
diff --git a/src/runtime/atomic_386.go b/src/runtime/atomic_386.go
deleted file mode 100644
index f8d589e..0000000
--- a/src/runtime/atomic_386.go
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-// The calls to nop are to keep these functions from being inlined.
-// If they are inlined we have no guarantee that later rewrites of the
-// code by optimizers will preserve the relative order of memory accesses.
-
-//go:nosplit
-func atomicload(ptr *uint32) uint32 {
-	nop()
-	return *ptr
-}
-
-//go:nosplit
-func atomicloadp(ptr unsafe.Pointer) unsafe.Pointer {
-	nop()
-	return *(*unsafe.Pointer)(ptr)
-}
-
-//go:nosplit
-func xadd64(ptr *uint64, delta int64) uint64 {
-	for {
-		old := *ptr
-		if cas64(ptr, old, old+uint64(delta)) {
-			return old + uint64(delta)
-		}
-	}
-}
-
-//go:noescape
-//go:linkname xadduintptr runtime.xadd
-func xadduintptr(ptr *uintptr, delta uintptr) uintptr
-
-//go:nosplit
-func xchg64(ptr *uint64, new uint64) uint64 {
-	for {
-		old := *ptr
-		if cas64(ptr, old, new) {
-			return old
-		}
-	}
-}
-
-//go:noescape
-func xadd(ptr *uint32, delta int32) uint32
-
-//go:noescape
-func xchg(ptr *uint32, new uint32) uint32
-
-// NO go:noescape annotation; see atomic_pointer.go.
-func xchgp1(ptr unsafe.Pointer, new unsafe.Pointer) unsafe.Pointer
-
-//go:noescape
-func xchguintptr(ptr *uintptr, new uintptr) uintptr
-
-//go:noescape
-func atomicload64(ptr *uint64) uint64
-
-//go:noescape
-func atomicand8(ptr *uint8, val uint8)
-
-//go:noescape
-func atomicor8(ptr *uint8, val uint8)
-
-// NOTE: Do not add atomicxor8 (XOR is not idempotent).
-
-//go:noescape
-func cas64(ptr *uint64, old, new uint64) bool
-
-//go:noescape
-func atomicstore(ptr *uint32, val uint32)
-
-//go:noescape
-func atomicstore64(ptr *uint64, val uint64)
-
-// NO go:noescape annotation; see atomic_pointer.go.
-func atomicstorep1(ptr unsafe.Pointer, val unsafe.Pointer)
diff --git a/src/runtime/atomic_amd64x.go b/src/runtime/atomic_amd64x.go
deleted file mode 100644
index edcc6d6..0000000
--- a/src/runtime/atomic_amd64x.go
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64 amd64p32
-
-package runtime
-
-import "unsafe"
-
-// The calls to nop are to keep these functions from being inlined.
-// If they are inlined we have no guarantee that later rewrites of the
-// code by optimizers will preserve the relative order of memory accesses.
-
-//go:nosplit
-func atomicload(ptr *uint32) uint32 {
-	nop()
-	return *ptr
-}
-
-//go:nosplit
-func atomicloadp(ptr unsafe.Pointer) unsafe.Pointer {
-	nop()
-	return *(*unsafe.Pointer)(ptr)
-}
-
-//go:nosplit
-func atomicload64(ptr *uint64) uint64 {
-	nop()
-	return *ptr
-}
-
-//go:noescape
-func xadd(ptr *uint32, delta int32) uint32
-
-//go:noescape
-func xadd64(ptr *uint64, delta int64) uint64
-
-//go:noescape
-func xadduintptr(ptr *uintptr, delta uintptr) uintptr
-
-//go:noescape
-func xchg(ptr *uint32, new uint32) uint32
-
-//go:noescape
-func xchg64(ptr *uint64, new uint64) uint64
-
-// NO go:noescape annotation; see atomic_pointer.go.
-func xchgp1(ptr unsafe.Pointer, new unsafe.Pointer) unsafe.Pointer
-
-//go:noescape
-func xchguintptr(ptr *uintptr, new uintptr) uintptr
-
-//go:noescape
-func atomicand8(ptr *uint8, val uint8)
-
-//go:noescape
-func atomicor8(ptr *uint8, val uint8)
-
-// NOTE: Do not add atomicxor8 (XOR is not idempotent).
-
-//go:noescape
-func cas64(ptr *uint64, old, new uint64) bool
-
-//go:noescape
-func atomicstore(ptr *uint32, val uint32)
-
-//go:noescape
-func atomicstore64(ptr *uint64, val uint64)
-
-// NO go:noescape annotation; see atomic_pointer.go.
-func atomicstorep1(ptr unsafe.Pointer, val unsafe.Pointer)
diff --git a/src/runtime/atomic_arm64.go b/src/runtime/atomic_arm64.go
deleted file mode 100644
index a377e3e..0000000
--- a/src/runtime/atomic_arm64.go
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-//go:noescape
-func xadd(ptr *uint32, delta int32) uint32
-
-//go:noescape
-func xadd64(ptr *uint64, delta int64) uint64
-
-//go:noescape
-//go:linkname xadduintptr runtime.xadd64
-func xadduintptr(ptr *uintptr, delta uintptr) uintptr
-
-//go:noescape
-func xchg(ptr *uint32, new uint32) uint32
-
-//go:noescape
-func xchg64(ptr *uint64, new uint64) uint64
-
-// NO go:noescape annotation; see atomic_pointer.go.
-func xchgp1(ptr unsafe.Pointer, new unsafe.Pointer) unsafe.Pointer
-
-//go:noescape
-func xchguintptr(ptr *uintptr, new uintptr) uintptr
-
-//go:noescape
-func atomicload(ptr *uint32) uint32
-
-//go:noescape
-func atomicload64(ptr *uint64) uint64
-
-//go:noescape
-func atomicloadp(ptr unsafe.Pointer) unsafe.Pointer
-
-//go:nosplit
-func atomicor8(addr *uint8, v uint8) {
-	// TODO(dfc) implement this in asm.
-	// Align down to 4 bytes and use 32-bit CAS.
-	uaddr := uintptr(unsafe.Pointer(addr))
-	addr32 := (*uint32)(unsafe.Pointer(uaddr &^ 3))
-	word := uint32(v) << ((uaddr & 3) * 8) // little endian
-	for {
-		old := *addr32
-		if cas(addr32, old, old|word) {
-			return
-		}
-	}
-}
-
-//go:nosplit
-func atomicand8(addr *uint8, v uint8) {
-	// TODO(dfc) implement this in asm.
-	// Align down to 4 bytes and use 32-bit CAS.
-	uaddr := uintptr(unsafe.Pointer(addr))
-	addr32 := (*uint32)(unsafe.Pointer(uaddr &^ 3))
-	word := uint32(v) << ((uaddr & 3) * 8)    // little endian
-	mask := uint32(0xFF) << ((uaddr & 3) * 8) // little endian
-	word |= ^mask
-	for {
-		old := *addr32
-		if cas(addr32, old, old&word) {
-			return
-		}
-	}
-}
-
-//go:noescape
-func cas64(ptr *uint64, old, new uint64) bool
-
-//go:noescape
-func atomicstore(ptr *uint32, val uint32)
-
-//go:noescape
-func atomicstore64(ptr *uint64, val uint64)
-
-// NO go:noescape annotation; see atomic_pointer.go.
-func atomicstorep1(ptr unsafe.Pointer, val unsafe.Pointer)
diff --git a/src/runtime/atomic_arm64.s b/src/runtime/atomic_arm64.s
deleted file mode 100644
index d3ab2a1..0000000
--- a/src/runtime/atomic_arm64.s
+++ /dev/null
@@ -1,117 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-
-// uint32 runtime·atomicload(uint32 volatile* addr)
-TEXT ·atomicload(SB),NOSPLIT,$-8-12
-	MOVD	ptr+0(FP), R0
-	LDARW	(R0), R0
-	MOVW	R0, ret+8(FP)
-	RET
-
-// uint64 runtime·atomicload64(uint64 volatile* addr)
-TEXT ·atomicload64(SB),NOSPLIT,$-8-16
-	MOVD	ptr+0(FP), R0
-	LDAR	(R0), R0
-	MOVD	R0, ret+8(FP)
-	RET
-
-// void *runtime·atomicloadp(void *volatile *addr)
-TEXT ·atomicloadp(SB),NOSPLIT,$-8-16
-	MOVD	ptr+0(FP), R0
-	LDAR	(R0), R0
-	MOVD	R0, ret+8(FP)
-	RET
-
-TEXT runtime·atomicstorep1(SB), NOSPLIT, $0-16
-	B	runtime·atomicstore64(SB)
-
-TEXT runtime·atomicstore(SB), NOSPLIT, $0-12
-	MOVD	ptr+0(FP), R0
-	MOVW	val+8(FP), R1
-	STLRW	R1, (R0)
-	RET
-
-TEXT runtime·atomicstore64(SB), NOSPLIT, $0-16
-	MOVD	ptr+0(FP), R0
-	MOVD	val+8(FP), R1
-	STLR	R1, (R0)
-	RET
-
-TEXT runtime·xchg(SB), NOSPLIT, $0-20
-again:
-	MOVD	ptr+0(FP), R0
-	MOVW	new+8(FP), R1
-	LDAXRW	(R0), R2
-	STLXRW	R1, (R0), R3
-	CBNZ	R3, again
-	MOVW	R2, ret+16(FP)
-	RET
-
-TEXT runtime·xchg64(SB), NOSPLIT, $0-24
-again:
-	MOVD	ptr+0(FP), R0
-	MOVD	new+8(FP), R1
-	LDAXR	(R0), R2
-	STLXR	R1, (R0), R3
-	CBNZ	R3, again
-	MOVD	R2, ret+16(FP)
-	RET
-
-// bool runtime·cas64(uint64 *ptr, uint64 old, uint64 new)
-// Atomically:
-//      if(*val == *old){
-//              *val = new;
-//              return 1;
-//      } else {
-//              return 0;
-//      }
-TEXT runtime·cas64(SB), NOSPLIT, $0-25
-	MOVD	ptr+0(FP), R0
-	MOVD	old+8(FP), R1
-	MOVD	new+16(FP), R2
-again:
-	LDAXR	(R0), R3
-	CMP	R1, R3
-	BNE	ok
-	STLXR	R2, (R0), R3
-	CBNZ	R3, again
-ok:
-	CSET	EQ, R0
-	MOVB	R0, ret+24(FP)
-	RET
-
-// uint32 xadd(uint32 volatile *ptr, int32 delta)
-// Atomically:
-//      *val += delta;
-//      return *val;
-TEXT runtime·xadd(SB), NOSPLIT, $0-20
-again:
-	MOVD	ptr+0(FP), R0
-	MOVW	delta+8(FP), R1
-	LDAXRW	(R0), R2
-	ADDW	R2, R1, R2
-	STLXRW	R2, (R0), R3
-	CBNZ	R3, again
-	MOVW	R2, ret+16(FP)
-	RET
-
-TEXT runtime·xadd64(SB), NOSPLIT, $0-24
-again:
-	MOVD	ptr+0(FP), R0
-	MOVD	delta+8(FP), R1
-	LDAXR	(R0), R2
-	ADD	R2, R1, R2
-	STLXR	R2, (R0), R3
-	CBNZ	R3, again
-	MOVD	R2, ret+16(FP)
-	RET
-
-TEXT runtime·xchguintptr(SB), NOSPLIT, $0-24
-	B	runtime·xchg64(SB)
-
-TEXT ·publicationBarrier(SB),NOSPLIT,$-8-0
-	DMB	$0xe	// DMB ST
-	RET
diff --git a/src/runtime/atomic_pointer.go b/src/runtime/atomic_pointer.go
deleted file mode 100644
index f84afe0..0000000
--- a/src/runtime/atomic_pointer.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-// These functions cannot have go:noescape annotations,
-// because while ptr does not escape, new does.
-// If new is marked as not escaping, the compiler will make incorrect
-// escape analysis decisions about the pointer value being stored.
-// Instead, these are wrappers around the actual atomics (xchgp1 and so on)
-// that use noescape to convey which arguments do not escape.
-//
-// Additionally, these functions must update the shadow heap for
-// write barrier checking.
-
-//go:nosplit
-func atomicstorep(ptr unsafe.Pointer, new unsafe.Pointer) {
-	atomicstorep1(noescape(ptr), new)
-	writebarrierptr_nostore((*uintptr)(ptr), uintptr(new))
-}
-
-//go:nosplit
-func xchgp(ptr unsafe.Pointer, new unsafe.Pointer) unsafe.Pointer {
-	old := xchgp1(noescape(ptr), new)
-	writebarrierptr_nostore((*uintptr)(ptr), uintptr(new))
-	return old
-}
-
-//go:nosplit
-func casp(ptr *unsafe.Pointer, old, new unsafe.Pointer) bool {
-	if !casp1((*unsafe.Pointer)(noescape(unsafe.Pointer(ptr))), noescape(old), new) {
-		return false
-	}
-	writebarrierptr_nostore((*uintptr)(unsafe.Pointer(ptr)), uintptr(new))
-	return true
-}
-
-// Like above, but implement in terms of sync/atomic's uintptr operations.
-// We cannot just call the runtime routines, because the race detector expects
-// to be able to intercept the sync/atomic forms but not the runtime forms.
-
-//go:linkname sync_atomic_StoreUintptr sync/atomic.StoreUintptr
-func sync_atomic_StoreUintptr(ptr *uintptr, new uintptr)
-
-//go:linkname sync_atomic_StorePointer sync/atomic.StorePointer
-//go:nosplit
-func sync_atomic_StorePointer(ptr *unsafe.Pointer, new unsafe.Pointer) {
-	sync_atomic_StoreUintptr((*uintptr)(unsafe.Pointer(ptr)), uintptr(new))
-	atomicstorep1(noescape(unsafe.Pointer(ptr)), new)
-	writebarrierptr_nostore((*uintptr)(unsafe.Pointer(ptr)), uintptr(new))
-}
-
-//go:linkname sync_atomic_SwapUintptr sync/atomic.SwapUintptr
-func sync_atomic_SwapUintptr(ptr *uintptr, new uintptr) uintptr
-
-//go:linkname sync_atomic_SwapPointer sync/atomic.SwapPointer
-//go:nosplit
-func sync_atomic_SwapPointer(ptr unsafe.Pointer, new unsafe.Pointer) unsafe.Pointer {
-	old := unsafe.Pointer(sync_atomic_SwapUintptr((*uintptr)(noescape(ptr)), uintptr(new)))
-	writebarrierptr_nostore((*uintptr)(ptr), uintptr(new))
-	return old
-}
-
-//go:linkname sync_atomic_CompareAndSwapUintptr sync/atomic.CompareAndSwapUintptr
-func sync_atomic_CompareAndSwapUintptr(ptr *uintptr, old, new uintptr) bool
-
-//go:linkname sync_atomic_CompareAndSwapPointer sync/atomic.CompareAndSwapPointer
-//go:nosplit
-func sync_atomic_CompareAndSwapPointer(ptr *unsafe.Pointer, old, new unsafe.Pointer) bool {
-	if !sync_atomic_CompareAndSwapUintptr((*uintptr)(noescape(unsafe.Pointer(ptr))), uintptr(old), uintptr(new)) {
-		return false
-	}
-	writebarrierptr_nostore((*uintptr)(unsafe.Pointer(ptr)), uintptr(new))
-	return true
-}
diff --git a/src/runtime/atomic_ppc64x.go b/src/runtime/atomic_ppc64x.go
deleted file mode 100644
index b58ee5a..0000000
--- a/src/runtime/atomic_ppc64x.go
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ppc64 ppc64le
-
-package runtime
-
-import "unsafe"
-
-//go:noescape
-func xadd(ptr *uint32, delta int32) uint32
-
-//go:noescape
-func xadd64(ptr *uint64, delta int64) uint64
-
-//go:noescape
-//go:linkname xadduintptr runtime.xadd64
-func xadduintptr(ptr *uintptr, delta uintptr) uintptr
-
-//go:noescape
-func xchg(ptr *uint32, new uint32) uint32
-
-//go:noescape
-func xchg64(ptr *uint64, new uint64) uint64
-
-// NO go:noescape annotation; see atomic_pointer.go.
-func xchgp1(ptr unsafe.Pointer, new unsafe.Pointer) unsafe.Pointer
-
-//go:noescape
-func xchguintptr(ptr *uintptr, new uintptr) uintptr
-
-//go:noescape
-func atomicload(ptr *uint32) uint32
-
-//go:noescape
-func atomicload64(ptr *uint64) uint64
-
-//go:noescape
-func atomicloadp(ptr unsafe.Pointer) unsafe.Pointer
-
-//go:noescape
-func atomicand8(ptr *uint8, val uint8)
-
-//go:noescape
-func atomicor8(ptr *uint8, val uint8)
-
-// NOTE: Do not add atomicxor8 (XOR is not idempotent).
-
-//go:noescape
-func cas64(ptr *uint64, old, new uint64) bool
-
-//go:noescape
-func atomicstore(ptr *uint32, val uint32)
-
-//go:noescape
-func atomicstore64(ptr *uint64, val uint64)
-
-// NO go:noescape annotation; see atomic_pointer.go.
-func atomicstorep1(ptr unsafe.Pointer, val unsafe.Pointer)
diff --git a/src/runtime/atomic_ppc64x.s b/src/runtime/atomic_ppc64x.s
deleted file mode 100644
index 28c5bf3..0000000
--- a/src/runtime/atomic_ppc64x.s
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ppc64 ppc64le
-
-#include "textflag.h"
-
-// uint32 runtime·atomicload(uint32 volatile* addr)
-TEXT ·atomicload(SB),NOSPLIT,$-8-12
-	MOVD	addr+0(FP), R3
-	SYNC
-	MOVWZ	0(R3), R3
-	CMPW	R3, R3, CR7
-	BC	4, 30, 1(PC) // bne- cr7,0x4
-	ISYNC
-	MOVW	R3, ret+8(FP)
-	RET
-
-// uint64 runtime·atomicload64(uint64 volatile* addr)
-TEXT ·atomicload64(SB),NOSPLIT,$-8-16
-	MOVD	addr+0(FP), R3
-	SYNC
-	MOVD	0(R3), R3
-	CMP	R3, R3, CR7
-	BC	4, 30, 1(PC) // bne- cr7,0x4
-	ISYNC
-	MOVD	R3, ret+8(FP)
-	RET
-
-// void *runtime·atomicloadp(void *volatile *addr)
-TEXT ·atomicloadp(SB),NOSPLIT,$-8-16
-	MOVD	addr+0(FP), R3
-	SYNC
-	MOVD	0(R3), R3
-	CMP	R3, R3, CR7
-	BC	4, 30, 1(PC) // bne- cr7,0x4
-	ISYNC
-	MOVD	R3, ret+8(FP)
-	RET
-
-TEXT ·publicationBarrier(SB),NOSPLIT,$-8-0
-	// LWSYNC is the "export" barrier recommended by Power ISA
-	// v2.07 book II, appendix B.2.2.2.
-	// LWSYNC is a load/load, load/store, and store/store barrier.
-	WORD $0x7c2004ac	// LWSYNC
-	RET
diff --git a/src/runtime/atomic_test.go b/src/runtime/atomic_test.go
deleted file mode 100644
index 2699103..0000000
--- a/src/runtime/atomic_test.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime_test
-
-import (
-	"runtime"
-	"testing"
-	"unsafe"
-)
-
-func runParallel(N, iter int, f func()) {
-	defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(int(N)))
-	done := make(chan bool)
-	for i := 0; i < N; i++ {
-		go func() {
-			for j := 0; j < iter; j++ {
-				f()
-			}
-			done <- true
-		}()
-	}
-	for i := 0; i < N; i++ {
-		<-done
-	}
-}
-
-func TestXadduintptr(t *testing.T) {
-	const N = 20
-	const iter = 100000
-	inc := uintptr(100)
-	total := uintptr(0)
-	runParallel(N, iter, func() {
-		runtime.Xadduintptr(&total, inc)
-	})
-	if want := uintptr(N * iter * inc); want != total {
-		t.Fatalf("xadduintpr error, want %d, got %d", want, total)
-	}
-	total = 0
-	runParallel(N, iter, func() {
-		runtime.Xadduintptr(&total, inc)
-		runtime.Xadduintptr(&total, uintptr(-int64(inc)))
-	})
-	if total != 0 {
-		t.Fatalf("xadduintpr total error, want %d, got %d", 0, total)
-	}
-}
-
-// Tests that xadduintptr correctly updates 64-bit values.  The place where
-// we actually do so is mstats.go, functions mSysStat{Inc,Dec}.
-func TestXadduintptrOnUint64(t *testing.T) {
-	if runtime.BigEndian != 0 {
-		// On big endian architectures, we never use xadduintptr to update
-		// 64-bit values and hence we skip the test.  (Note that functions
-		// mSysStat{Inc,Dec} in mstats.go have explicit checks for
-		// big-endianness.)
-		return
-	}
-	const inc = 100
-	val := uint64(0)
-	runtime.Xadduintptr((*uintptr)(unsafe.Pointer(&val)), inc)
-	if inc != val {
-		t.Fatalf("xadduintptr should increase lower-order bits, want %d, got %d", inc, val)
-	}
-}
diff --git a/src/runtime/cgo.go b/src/runtime/cgo.go
deleted file mode 100644
index 169a31d..0000000
--- a/src/runtime/cgo.go
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-//go:cgo_export_static main
-
-// Filled in by runtime/cgo when linked into binary.
-
-//go:linkname _cgo_init _cgo_init
-//go:linkname _cgo_malloc _cgo_malloc
-//go:linkname _cgo_free _cgo_free
-//go:linkname _cgo_thread_start _cgo_thread_start
-//go:linkname _cgo_sys_thread_create _cgo_sys_thread_create
-//go:linkname _cgo_notify_runtime_init_done _cgo_notify_runtime_init_done
-
-var (
-	_cgo_init                     unsafe.Pointer
-	_cgo_malloc                   unsafe.Pointer
-	_cgo_free                     unsafe.Pointer
-	_cgo_thread_start             unsafe.Pointer
-	_cgo_sys_thread_create        unsafe.Pointer
-	_cgo_notify_runtime_init_done unsafe.Pointer
-)
-
-// iscgo is set to true by the runtime/cgo package
-var iscgo bool
-
-// cgoHasExtraM is set on startup when an extra M is created for cgo.
-// The extra M must be created before any C/C++ code calls cgocallback.
-var cgoHasExtraM bool
-
-// cgoUse is called by cgo-generated code (using go:linkname to get at
-// an unexported name). The calls serve two purposes:
-// 1) they are opaque to escape analysis, so the argument is considered to
-// escape to the heap.
-// 2) they keep the argument alive until the call site; the call is emitted after
-// the end of the (presumed) use of the argument by C.
-// cgoUse should not actually be called (see cgoAlwaysFalse).
-func cgoUse(interface{}) { throw("cgoUse should not be called") }
-
-// cgoAlwaysFalse is a boolean value that is always false.
-// The cgo-generated code says if cgoAlwaysFalse { cgoUse(p) }.
-// The compiler cannot see that cgoAlwaysFalse is always false,
-// so it emits the test and keeps the call, giving the desired
-// escape analysis result. The test is cheaper than the call.
-var cgoAlwaysFalse bool
diff --git a/src/runtime/cgo/asm_arm64.s b/src/runtime/cgo/asm_arm64.s
deleted file mode 100644
index c6f98fa..0000000
--- a/src/runtime/cgo/asm_arm64.s
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-
-/*
- * void crosscall2(void (*fn)(void*, int32), void*, int32)
- * Save registers and call fn with two arguments.
- */
-TEXT crosscall2(SB),NOSPLIT,$-8
-	/*
-	 * We still need to save all callee save register as before, and then
-	 *  push 2 args for fn (R1 and R2).
-	 * Also note that at procedure entry in gc world, 8(RSP) will be the
-	 *  first arg.
-	 * TODO(minux): use LDP/STP here if it matters.
-	 */
-	SUB	$128, RSP
-	MOVD	R1, (8*1)(RSP)
-	MOVD	R2, (8*2)(RSP)
-	MOVD	R19, (8*3)(RSP)
-	MOVD	R20, (8*4)(RSP)
-	MOVD	R21, (8*5)(RSP)
-	MOVD	R22, (8*6)(RSP)
-	MOVD	R23, (8*7)(RSP)
-	MOVD	R24, (8*8)(RSP)
-	MOVD	R25, (8*9)(RSP)
-	MOVD	R26, (8*10)(RSP)
-	MOVD	R27, (8*11)(RSP)
-	MOVD	g, (8*12)(RSP)
-	MOVD	R29, (8*13)(RSP)
-	MOVD	R30, (8*14)(RSP)
-
-	MOVD	R0, R19
-
-	// Initialize Go ABI environment
-	BL      runtime·reginit(SB)
-	BL	runtime·load_g(SB)
-	BL	(R19)
-
-	MOVD	(8*1)(RSP), R1
-	MOVD	(8*2)(RSP), R2
-	MOVD	(8*3)(RSP), R19
-	MOVD	(8*4)(RSP), R20
-	MOVD	(8*5)(RSP), R21
-	MOVD	(8*6)(RSP), R22
-	MOVD	(8*7)(RSP), R23
-	MOVD	(8*8)(RSP), R24
-	MOVD	(8*9)(RSP), R25
-	MOVD	(8*10)(RSP), R26
-	MOVD	(8*11)(RSP), R27
-	MOVD	(8*12)(RSP), g
-	MOVD	(8*13)(RSP), R29
-	MOVD	(8*14)(RSP), R30
-	ADD	$128, RSP
-	RET
diff --git a/src/runtime/cgo/asm_ppc64x.s b/src/runtime/cgo/asm_ppc64x.s
deleted file mode 100644
index 0c08a1d..0000000
--- a/src/runtime/cgo/asm_ppc64x.s
+++ /dev/null
@@ -1,124 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ppc64 ppc64le
-
-#include "textflag.h"
-
-/*
- * void crosscall2(void (*fn)(void*, int32), void*, int32)
- * Save registers and call fn with two arguments.
- * crosscall2 obeys the C ABI; fn obeys the Go ABI.
- */
-TEXT crosscall2(SB),NOSPLIT,$-8
-	// TODO(austin): ABI v1 (fn is probably a function descriptor)
-
-	// Start with standard C stack frame layout and linkage
-	MOVD	LR, R0
-	MOVD	R0, 16(R1)	// Save LR in caller's frame
-	MOVD	R2, 24(R1)	// Save TOC in caller's frame
-
-	BL	saveregs2<>(SB)
-
-	MOVDU	R1, (-288-3*8)(R1)
-
-	// Initialize Go ABI environment
-	BL	runtime·reginit(SB)
-	BL	runtime·load_g(SB)
-
-	MOVD	R3, CTR
-	MOVD	R4, 8(R1)
-	MOVD	R5, 16(R1)
-	BL	(CTR)
-
-	ADD	$(288+3*8), R1
-
-	BL	restoreregs2<>(SB)
-
-	MOVD	24(R1), R2
-	MOVD	16(R1), R0
-	MOVD	R0, LR
-	RET
-
-TEXT saveregs2<>(SB),NOSPLIT,$-8
-	// O=-288; for R in R{14..31}; do echo "\tMOVD\t$R, $O(R1)"|sed s/R30/g/; ((O+=8)); done; for F in F{14..31}; do echo "\tFMOVD\t$F, $O(R1)"; ((O+=8)); done
-	MOVD	R14, -288(R1)
-	MOVD	R15, -280(R1)
-	MOVD	R16, -272(R1)
-	MOVD	R17, -264(R1)
-	MOVD	R18, -256(R1)
-	MOVD	R19, -248(R1)
-	MOVD	R20, -240(R1)
-	MOVD	R21, -232(R1)
-	MOVD	R22, -224(R1)
-	MOVD	R23, -216(R1)
-	MOVD	R24, -208(R1)
-	MOVD	R25, -200(R1)
-	MOVD	R26, -192(R1)
-	MOVD	R27, -184(R1)
-	MOVD	R28, -176(R1)
-	MOVD	R29, -168(R1)
-	MOVD	g, -160(R1)
-	MOVD	R31, -152(R1)
-	FMOVD	F14, -144(R1)
-	FMOVD	F15, -136(R1)
-	FMOVD	F16, -128(R1)
-	FMOVD	F17, -120(R1)
-	FMOVD	F18, -112(R1)
-	FMOVD	F19, -104(R1)
-	FMOVD	F20, -96(R1)
-	FMOVD	F21, -88(R1)
-	FMOVD	F22, -80(R1)
-	FMOVD	F23, -72(R1)
-	FMOVD	F24, -64(R1)
-	FMOVD	F25, -56(R1)
-	FMOVD	F26, -48(R1)
-	FMOVD	F27, -40(R1)
-	FMOVD	F28, -32(R1)
-	FMOVD	F29, -24(R1)
-	FMOVD	F30, -16(R1)
-	FMOVD	F31, -8(R1)
-
-	RET
-
-TEXT restoreregs2<>(SB),NOSPLIT,$-8
-	// O=-288; for R in R{14..31}; do echo "\tMOVD\t$O(R1), $R"|sed s/R30/g/; ((O+=8)); done; for F in F{14..31}; do echo "\tFMOVD\t$O(R1), $F"; ((O+=8)); done
-	MOVD	-288(R1), R14
-	MOVD	-280(R1), R15
-	MOVD	-272(R1), R16
-	MOVD	-264(R1), R17
-	MOVD	-256(R1), R18
-	MOVD	-248(R1), R19
-	MOVD	-240(R1), R20
-	MOVD	-232(R1), R21
-	MOVD	-224(R1), R22
-	MOVD	-216(R1), R23
-	MOVD	-208(R1), R24
-	MOVD	-200(R1), R25
-	MOVD	-192(R1), R26
-	MOVD	-184(R1), R27
-	MOVD	-176(R1), R28
-	MOVD	-168(R1), R29
-	MOVD	-160(R1), g
-	MOVD	-152(R1), R31
-	FMOVD	-144(R1), F14
-	FMOVD	-136(R1), F15
-	FMOVD	-128(R1), F16
-	FMOVD	-120(R1), F17
-	FMOVD	-112(R1), F18
-	FMOVD	-104(R1), F19
-	FMOVD	-96(R1), F20
-	FMOVD	-88(R1), F21
-	FMOVD	-80(R1), F22
-	FMOVD	-72(R1), F23
-	FMOVD	-64(R1), F24
-	FMOVD	-56(R1), F25
-	FMOVD	-48(R1), F26
-	FMOVD	-40(R1), F27
-	FMOVD	-32(R1), F28
-	FMOVD	-24(R1), F29
-	FMOVD	-16(R1), F30
-	FMOVD	-8(R1), F31
-
-	RET
diff --git a/src/runtime/cgo/callbacks.go b/src/runtime/cgo/callbacks.go
deleted file mode 100644
index 08f230d..0000000
--- a/src/runtime/cgo/callbacks.go
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright 2011 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package cgo
-
-import "unsafe"
-
-// These utility functions are available to be called from code
-// compiled with gcc via crosscall2.
-
-// cgocallback is defined in runtime
-//go:linkname _runtime_cgocallback runtime.cgocallback
-func _runtime_cgocallback(unsafe.Pointer, unsafe.Pointer, uintptr)
-
-// The declaration of crosscall2 is:
-//   void crosscall2(void (*fn)(void *, int), void *, int);
-//
-// We need to export the symbol crosscall2 in order to support
-// callbacks from shared libraries. This applies regardless of
-// linking mode.
-//go:cgo_export_static crosscall2
-//go:cgo_export_dynamic crosscall2
-
-// Panic.  The argument is converted into a Go string.
-
-// Call like this in code compiled with gcc:
-//   struct { const char *p; } a;
-//   a.p = /* string to pass to panic */;
-//   crosscall2(_cgo_panic, &a, sizeof a);
-//   /* The function call will not return.  */
-
-//go:linkname _runtime_cgo_panic_internal runtime._cgo_panic_internal
-var _runtime_cgo_panic_internal byte
-
-//go:linkname _cgo_panic _cgo_panic
-//go:cgo_export_static _cgo_panic
-//go:cgo_export_dynamic _cgo_panic
-//go:nosplit
-//go:norace
-func _cgo_panic(a unsafe.Pointer, n int32) {
-	_runtime_cgocallback(unsafe.Pointer(&_runtime_cgo_panic_internal), a, uintptr(n))
-}
-
-//go:cgo_import_static x_cgo_init
-//go:linkname x_cgo_init x_cgo_init
-//go:linkname _cgo_init _cgo_init
-var x_cgo_init byte
-var _cgo_init = &x_cgo_init
-
-//go:cgo_import_static x_cgo_malloc
-//go:linkname x_cgo_malloc x_cgo_malloc
-//go:linkname _cgo_malloc _cgo_malloc
-var x_cgo_malloc byte
-var _cgo_malloc = &x_cgo_malloc
-
-//go:cgo_import_static x_cgo_free
-//go:linkname x_cgo_free x_cgo_free
-//go:linkname _cgo_free _cgo_free
-var x_cgo_free byte
-var _cgo_free = &x_cgo_free
-
-//go:cgo_import_static x_cgo_thread_start
-//go:linkname x_cgo_thread_start x_cgo_thread_start
-//go:linkname _cgo_thread_start _cgo_thread_start
-var x_cgo_thread_start byte
-var _cgo_thread_start = &x_cgo_thread_start
-
-// Creates a new system thread without updating any Go state.
-//
-// This method is invoked during shared library loading to create a new OS
-// thread to perform the runtime initialization.  This method is similar to
-// _cgo_sys_thread_start except that it doesn't update any Go state.
-
-//go:cgo_import_static x_cgo_sys_thread_create
-//go:linkname x_cgo_sys_thread_create x_cgo_sys_thread_create
-//go:linkname _cgo_sys_thread_create _cgo_sys_thread_create
-var x_cgo_sys_thread_create byte
-var _cgo_sys_thread_create = &x_cgo_sys_thread_create
-
-// Notifies that the runtime has been intialized.
-//
-// We currently block at every CGO entry point (via _cgo_wait_runtime_init_done)
-// to ensure that the runtime has been initialized before the CGO call is
-// executed.  This is necessary for shared libraries where we kickoff runtime
-// initialization in a separate thread and return without waiting for this
-// thread to complete the init.
-
-//go:cgo_import_static x_cgo_notify_runtime_init_done
-//go:linkname x_cgo_notify_runtime_init_done x_cgo_notify_runtime_init_done
-//go:linkname _cgo_notify_runtime_init_done _cgo_notify_runtime_init_done
-var x_cgo_notify_runtime_init_done byte
-var _cgo_notify_runtime_init_done = &x_cgo_notify_runtime_init_done
-
-//go:cgo_export_static _cgo_topofstack
-//go:cgo_export_dynamic _cgo_topofstack
diff --git a/src/runtime/cgo/dragonfly.go b/src/runtime/cgo/dragonfly.go
deleted file mode 100644
index 69d52b5..0000000
--- a/src/runtime/cgo/dragonfly.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2010 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build dragonfly
-
-package cgo
-
-import _ "unsafe" // for go:linkname
-
-// Supply environ and __progname, because we don't
-// link against the standard DragonFly crt0.o and the
-// libc dynamic library needs them.
-
-//go:linkname _environ environ
-//go:linkname _progname __progname
-
-var _environ uintptr
-var _progname uintptr
diff --git a/src/runtime/cgo/freebsd.go b/src/runtime/cgo/freebsd.go
deleted file mode 100644
index 99cf3fb..0000000
--- a/src/runtime/cgo/freebsd.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2010 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build freebsd
-
-package cgo
-
-import _ "unsafe" // for go:linkname
-
-// Supply environ and __progname, because we don't
-// link against the standard FreeBSD crt0.o and the
-// libc dynamic library needs them.
-
-//go:linkname _environ environ
-//go:linkname _progname __progname
-
-//go:cgo_export_dynamic environ
-//go:cgo_export_dynamic __progname
-
-var _environ uintptr
-var _progname uintptr
diff --git a/src/runtime/cgo/gcc_arm64.S b/src/runtime/cgo/gcc_arm64.S
deleted file mode 100644
index b7379d1..0000000
--- a/src/runtime/cgo/gcc_arm64.S
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-/*
- * Apple still insists on underscore prefixes for C function names.
- */
-#if defined(__APPLE__)
-#define EXT(s) _##s
-#else
-#define EXT(s) s
-#endif
-
-// Apple's ld64 wants 4-byte alignment for ARM code sections.
-// .align in both Apple as and GNU as treat n as aligning to 2**n bytes.
-.align	2
-
-/*
- * void crosscall1(void (*fn)(void), void (*setg_gcc)(void *g), void *g)
- *
- * Calling into the gc tool chain, where all registers are caller save.
- * Called from standard ARM EABI, where x19-x29 are callee-save, so they
- * must be saved explicitly, along with x30 (LR).
- */
-.globl EXT(crosscall1)
-EXT(crosscall1):
-	stp x19, x20, [sp, #-16]!
-	stp x21, x22, [sp, #-16]!
-	stp x23, x24, [sp, #-16]!
-	stp x25, x26, [sp, #-16]!
-	stp x27, x28, [sp, #-16]!
-	stp x29, x30, [sp, #-16]!
-	mov x29, sp
-
-	mov x19, x0
-	mov x20, x1
-	mov x0, x2
-
-	blr x20
-	blr x19
-
-	ldp x29, x30, [sp], #16
-	ldp x27, x28, [sp], #16
-	ldp x25, x26, [sp], #16
-	ldp x23, x24, [sp], #16
-	ldp x21, x22, [sp], #16
-	ldp x19, x20, [sp], #16
-	ret
-
-.globl EXT(__stack_chk_fail_local)
-EXT(__stack_chk_fail_local):
-1:
-	b 1b
-
-#ifdef __ELF__
-.section .note.GNU-stack,"",%progbits
-#endif
diff --git a/src/runtime/cgo/gcc_darwin_arm.c b/src/runtime/cgo/gcc_darwin_arm.c
deleted file mode 100644
index c303b91..0000000
--- a/src/runtime/cgo/gcc_darwin_arm.c
+++ /dev/null
@@ -1,153 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include <limits.h>
-#include <pthread.h>
-#include <signal.h>
-#include <string.h> /* for strerror */
-#include <sys/param.h>
-#include <unistd.h>
-
-#include "libcgo.h"
-
-#include <CoreFoundation/CFBundle.h>
-#include <CoreFoundation/CFString.h>
-
-#define magic (0xe696c4f4U)
-
-// inittls allocates a thread-local storage slot for g.
-//
-// It finds the first available slot using pthread_key_create and uses
-// it as the offset value for runtime.tlsg.
-static void
-inittls(void **tlsg, void **tlsbase)
-{
-	pthread_key_t k;
-	int i, err;
-
-	err = pthread_key_create(&k, nil);
-	if(err != 0) {
-		fprintf(stderr, "runtime/cgo: pthread_key_create failed: %d\n", err);
-		abort();
-	}
-	//fprintf(stderr, "runtime/cgo: k = %d, tlsbase = %p\n", (int)k, tlsbase); // debug
-	pthread_setspecific(k, (void*)magic);
-	// The first key should be at 258.
-	for (i=0; i<PTHREAD_KEYS_MAX; i++) {
-		if (*(tlsbase+i) == (void*)magic) {
-			*tlsg = (void*)(i*sizeof(void *));
-			pthread_setspecific(k, 0);
-			return;
-		}
-	}
-	fprintf(stderr, "runtime/cgo: could not find pthread key.\n");
-	abort();
-}
-
-static void *threadentry(void*);
-void (*setg_gcc)(void*);
-
-void
-_cgo_sys_thread_start(ThreadStart *ts)
-{
-	pthread_attr_t attr;
-	sigset_t ign, oset;
-	pthread_t p;
-	size_t size;
-	int err;
-
-	sigfillset(&ign);
-	pthread_sigmask(SIG_SETMASK, &ign, &oset);
-
-	pthread_attr_init(&attr);
-	size = 0;
-	pthread_attr_getstacksize(&attr, &size);
-	// Leave stacklo=0 and set stackhi=size; mstack will do the rest.
-	ts->g->stackhi = size;
-	err = pthread_create(&p, &attr, threadentry, ts);
-
-	pthread_sigmask(SIG_SETMASK, &oset, nil);
-
-	if (err != 0) {
-		fprintf(stderr, "runtime/cgo: pthread_create failed: %s\n", strerror(err));
-		abort();
-	}
-}
-
-extern void crosscall_arm1(void (*fn)(void), void (*setg_gcc)(void*), void *g);
-static void*
-threadentry(void *v)
-{
-	ThreadStart ts;
-
-	ts = *(ThreadStart*)v;
-	free(v);
-
-	darwin_arm_init_thread_exception_port();
-
-	crosscall_arm1(ts.fn, setg_gcc, (void*)ts.g);
-	return nil;
-}
-
-// init_working_dir sets the current working directory to the app root.
-// By default darwin/arm processes start in "/".
-static void
-init_working_dir()
-{
-	CFBundleRef bundle = CFBundleGetMainBundle();
-	if (bundle == NULL) {
-		fprintf(stderr, "runtime/cgo: no main bundle\n");
-		return;
-	}
-	CFURLRef url_ref = CFBundleCopyResourceURL(bundle, CFSTR("Info"), CFSTR("plist"), NULL);
-	if (url_ref == NULL) {
-		fprintf(stderr, "runtime/cgo: no Info.plist URL\n");
-		return;
-	}
-	CFStringRef url_str_ref = CFURLGetString(url_ref);
-	char url[MAXPATHLEN];
-        if (!CFStringGetCString(url_str_ref, url, sizeof(url), kCFStringEncodingUTF8)) {
-		fprintf(stderr, "runtime/cgo: cannot get URL string\n");
-		return;
-	}
-
-	// url is of the form "file:///path/to/Info.plist".
-	// strip it down to the working directory "/path/to".
-	int url_len = strlen(url);
-	if (url_len < sizeof("file://")+sizeof("/Info.plist")) {
-		fprintf(stderr, "runtime/cgo: bad URL: %s\n", url);
-		return;
-	}
-	url[url_len-sizeof("/Info.plist")+1] = 0;
-	char *dir = &url[0] + sizeof("file://")-1;
-
-	if (chdir(dir) != 0) {
-		fprintf(stderr, "runtime/cgo: chdir(%s) failed\n", dir);
-	}
-
-	// No-op to set a breakpoint on, immediately after the real chdir.
-	// Gives the test harness in go_darwin_arm_exec (which uses lldb) a
-	// chance to move the working directory.
-	getwd(dir);
-}
-
-void
-x_cgo_init(G *g, void (*setg)(void*), void **tlsg, void **tlsbase)
-{
-	pthread_attr_t attr;
-	size_t size;
-
-	setg_gcc = setg;
-	pthread_attr_init(&attr);
-	pthread_attr_getstacksize(&attr, &size);
-	g->stacklo = (uintptr)&attr - size + 4096;
-	pthread_attr_destroy(&attr);
-
-	// yes, tlsbase from mrc might not be correctly aligned.
-	inittls(tlsg, (void**)((uintptr)tlsbase & ~3));
-
-	darwin_arm_init_mach_exception_handler();
-	darwin_arm_init_thread_exception_port();
-	init_working_dir();
-}
diff --git a/src/runtime/cgo/gcc_darwin_arm64.c b/src/runtime/cgo/gcc_darwin_arm64.c
deleted file mode 100644
index b64a063..0000000
--- a/src/runtime/cgo/gcc_darwin_arm64.c
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include <limits.h>
-#include <pthread.h>
-#include <signal.h>
-#include <string.h> /* for strerror */
-#include <sys/param.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include "libcgo.h"
-
-#include <CoreFoundation/CFBundle.h>
-#include <CoreFoundation/CFString.h>
-
-#define magic (0xc476c475c47957UL)
-
-// inittls allocates a thread-local storage slot for g.
-//
-// It finds the first available slot using pthread_key_create and uses
-// it as the offset value for runtime.tlsg.
-static void
-inittls(void **tlsg, void **tlsbase)
-{
-	pthread_key_t k;
-	int i, err;
-
-	err = pthread_key_create(&k, nil);
-	if(err != 0) {
-		fprintf(stderr, "runtime/cgo: pthread_key_create failed: %d\n", err);
-		abort();
-	}
-	//fprintf(stderr, "runtime/cgo: k = %d, tlsbase = %p\n", (int)k, tlsbase); // debug
-	pthread_setspecific(k, (void*)magic);
-	// The first key should be at 257.
-	for (i=0; i<PTHREAD_KEYS_MAX; i++) {
-		if (*(tlsbase+i) == (void*)magic) {
-			*tlsg = (void*)(i*sizeof(void *));
-			pthread_setspecific(k, 0);
-			return;
-		}
-	}
-	fprintf(stderr, "runtime/cgo: could not find pthread key.\n");
-	abort();
-}
-
-static void *threadentry(void*);
-void (*setg_gcc)(void*);
-
-void
-_cgo_sys_thread_start(ThreadStart *ts)
-{
-	pthread_attr_t attr;
-	sigset_t ign, oset;
-	pthread_t p;
-	size_t size;
-	int err;
-
-	//fprintf(stderr, "runtime/cgo: _cgo_sys_thread_start: fn=%p, g=%p\n", ts->fn, ts->g); // debug
-	sigfillset(&ign);
-	pthread_sigmask(SIG_SETMASK, &ign, &oset);
-
-	pthread_attr_init(&attr);
-	size = 0;
-	pthread_attr_getstacksize(&attr, &size);
-	// Leave stacklo=0 and set stackhi=size; mstack will do the rest.
-	ts->g->stackhi = size;
-	err = pthread_create(&p, &attr, threadentry, ts);
-
-	pthread_sigmask(SIG_SETMASK, &oset, nil);
-
-	if (err != 0) {
-		fprintf(stderr, "runtime/cgo: pthread_create failed: %s\n", strerror(err));
-		abort();
-	}
-}
-
-extern void crosscall1(void (*fn)(void), void (*setg_gcc)(void*), void *g);
-static void*
-threadentry(void *v)
-{
-	ThreadStart ts;
-
-	ts = *(ThreadStart*)v;
-	free(v);
-
-	darwin_arm_init_thread_exception_port();
-
-	crosscall1(ts.fn, setg_gcc, (void*)ts.g);
-	return nil;
-}
-
-// init_working_dir sets the current working directory to the app root.
-// By default darwin/arm processes start in "/".
-static void
-init_working_dir()
-{
-	CFBundleRef bundle = CFBundleGetMainBundle();
-	if (bundle == NULL) {
-		fprintf(stderr, "runtime/cgo: no main bundle\n");
-		return;
-	}
-	CFURLRef url_ref = CFBundleCopyResourceURL(bundle, CFSTR("Info"), CFSTR("plist"), NULL);
-	if (url_ref == NULL) {
-		fprintf(stderr, "runtime/cgo: no Info.plist URL\n");
-		return;
-	}
-	CFStringRef url_str_ref = CFURLGetString(url_ref);
-	char url[MAXPATHLEN];
-        if (!CFStringGetCString(url_str_ref, url, sizeof(url), kCFStringEncodingUTF8)) {
-		fprintf(stderr, "runtime/cgo: cannot get URL string\n");
-		return;
-	}
-
-	// url is of the form "file:///path/to/Info.plist".
-	// strip it down to the working directory "/path/to".
-	int url_len = strlen(url);
-	if (url_len < sizeof("file://")+sizeof("/Info.plist")) {
-		fprintf(stderr, "runtime/cgo: bad URL: %s\n", url);
-		return;
-	}
-	url[url_len-sizeof("/Info.plist")+1] = 0;
-	char *dir = &url[0] + sizeof("file://")-1;
-
-	if (chdir(dir) != 0) {
-		fprintf(stderr, "runtime/cgo: chdir(%s) failed\n", dir);
-	}
-
-	// No-op to set a breakpoint on, immediately after the real chdir.
-	// Gives the test harness in go_darwin_arm_exec (which uses lldb) a
-	// chance to move the working directory.
-	getwd(dir);
-}
-
-void
-x_cgo_init(G *g, void (*setg)(void*), void **tlsg, void **tlsbase)
-{
-	pthread_attr_t attr;
-	size_t size;
-
-	//fprintf(stderr, "x_cgo_init = %p\n", &x_cgo_init); // aid debugging in presence of ASLR
-	setg_gcc = setg;
-	pthread_attr_init(&attr);
-	pthread_attr_getstacksize(&attr, &size);
-	g->stacklo = (uintptr)&attr - size + 4096;
-	pthread_attr_destroy(&attr);
-
-	// yes, tlsbase from mrs might not be correctly aligned.
-	inittls(tlsg, (void**)((uintptr)tlsbase & ~7));
-
-	darwin_arm_init_mach_exception_handler();
-	darwin_arm_init_thread_exception_port();
-
-	init_working_dir();
-}
diff --git a/src/runtime/cgo/gcc_libinit.c b/src/runtime/cgo/gcc_libinit.c
deleted file mode 100644
index c3e94f5..0000000
--- a/src/runtime/cgo/gcc_libinit.c
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd solaris
-// +build !ppc64,!ppc64le
-
-#include <pthread.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h> // strerror
-
-static pthread_cond_t runtime_init_cond = PTHREAD_COND_INITIALIZER;
-static pthread_mutex_t runtime_init_mu = PTHREAD_MUTEX_INITIALIZER;
-static int runtime_init_done;
-
-void
-x_cgo_sys_thread_create(void* (*func)(void*), void* arg) {
-	pthread_t p;
-	int err = pthread_create(&p, NULL, func, arg);
-	if (err != 0) {
-		fprintf(stderr, "pthread_create failed: %s", strerror(err));
-		abort();
-	}
-}
-
-void
-_cgo_wait_runtime_init_done() {
-	pthread_mutex_lock(&runtime_init_mu);
-	while (runtime_init_done == 0) {
-		pthread_cond_wait(&runtime_init_cond, &runtime_init_mu);
-	}
-	pthread_mutex_unlock(&runtime_init_mu);
-}
-
-void
-x_cgo_notify_runtime_init_done(void* dummy) {
-	pthread_mutex_lock(&runtime_init_mu);
-	runtime_init_done = 1;
-	pthread_cond_broadcast(&runtime_init_cond);
-	pthread_mutex_unlock(&runtime_init_mu);
-}
diff --git a/src/runtime/cgo/gcc_libinit_linux_ppc64x.c b/src/runtime/cgo/gcc_libinit_linux_ppc64x.c
deleted file mode 100644
index 82413a5..0000000
--- a/src/runtime/cgo/gcc_libinit_linux_ppc64x.c
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// TODO: see issue #10410
-// +build linux
-// +build ppc64 ppc64le
-
-#include <stdio.h>
-#include <stdlib.h>
-
-void
-x_cgo_sys_thread_create(void* (*func)(void*), void* arg) {
-	fprintf(stderr, "x_cgo_sys_thread_create not implemented");
-	abort();
-}
-
-void
-_cgo_wait_runtime_init_done() {
-	// TODO(spetrovic): implement this method.
-}
-
-void
-x_cgo_notify_runtime_init_done(void* dummy) {
-	// TODO(spetrovic): implement this method.
-}
\ No newline at end of file
diff --git a/src/runtime/cgo/gcc_libinit_openbsd.c b/src/runtime/cgo/gcc_libinit_openbsd.c
deleted file mode 100644
index 7e5b646..0000000
--- a/src/runtime/cgo/gcc_libinit_openbsd.c
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include <stdio.h>
-#include <stdlib.h>
-
-void
-x_cgo_sys_thread_create(void* (*func)(void*), void* arg) {
-	fprintf(stderr, "x_cgo_sys_thread_create not implemented");
-	abort();
-}
-
-void
-_cgo_wait_runtime_init_done() {
-	// TODO(spetrovic): implement this method.
-}
-
-void
-x_cgo_notify_runtime_init_done(void* dummy) {
-	// TODO(spetrovic): implement this method.
-}
\ No newline at end of file
diff --git a/src/runtime/cgo/gcc_libinit_windows.c b/src/runtime/cgo/gcc_libinit_windows.c
deleted file mode 100644
index 7e5b646..0000000
--- a/src/runtime/cgo/gcc_libinit_windows.c
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include <stdio.h>
-#include <stdlib.h>
-
-void
-x_cgo_sys_thread_create(void* (*func)(void*), void* arg) {
-	fprintf(stderr, "x_cgo_sys_thread_create not implemented");
-	abort();
-}
-
-void
-_cgo_wait_runtime_init_done() {
-	// TODO(spetrovic): implement this method.
-}
-
-void
-x_cgo_notify_runtime_init_done(void* dummy) {
-	// TODO(spetrovic): implement this method.
-}
\ No newline at end of file
diff --git a/src/runtime/cgo/gcc_linux_arm64.c b/src/runtime/cgo/gcc_linux_arm64.c
deleted file mode 100644
index ea11cf5..0000000
--- a/src/runtime/cgo/gcc_linux_arm64.c
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include <pthread.h>
-#include <string.h>
-#include <signal.h>
-#include "libcgo.h"
-
-static void *threadentry(void*);
-
-void (*x_cgo_inittls)(void **tlsg, void **tlsbase);
-void (*setg_gcc)(void*);
-
-void
-_cgo_sys_thread_start(ThreadStart *ts)
-{
-	pthread_attr_t attr;
-	sigset_t ign, oset;
-	pthread_t p;
-	size_t size;
-	int err;
-
-	sigfillset(&ign);
-	pthread_sigmask(SIG_SETMASK, &ign, &oset);
-
-	// Not sure why the memset is necessary here,
-	// but without it, we get a bogus stack size
-	// out of pthread_attr_getstacksize.  C'est la Linux.
-	memset(&attr, 0, sizeof attr);
-	pthread_attr_init(&attr);
-	size = 0;
-	pthread_attr_getstacksize(&attr, &size);
-	// Leave stacklo=0 and set stackhi=size; mstack will do the rest.
-	ts->g->stackhi = size;
-	err = pthread_create(&p, &attr, threadentry, ts);
-
-	pthread_sigmask(SIG_SETMASK, &oset, nil);
-
-	if (err != 0) {
-		fatalf("pthread_create failed: %s", strerror(err));
-	}
-}
-
-extern void crosscall1(void (*fn)(void), void (*setg_gcc)(void*), void *g);
-static void*
-threadentry(void *v)
-{
-	ThreadStart ts;
-
-	ts = *(ThreadStart*)v;
-	free(v);
-
-	crosscall1(ts.fn, setg_gcc, (void*)ts.g);
-	return nil;
-}
-
-void
-x_cgo_init(G *g, void (*setg)(void*), void **tlsg, void **tlsbase)
-{
-	pthread_attr_t attr;
-	size_t size;
-
-	setg_gcc = setg;
-	pthread_attr_init(&attr);
-	pthread_attr_getstacksize(&attr, &size);
-	g->stacklo = (uintptr)&attr - size + 4096;
-	pthread_attr_destroy(&attr);
-
-	if (x_cgo_inittls) {
-		x_cgo_inittls(tlsg, tlsbase);
-	}
-}
diff --git a/src/runtime/cgo/gcc_linux_ppc64x.c b/src/runtime/cgo/gcc_linux_ppc64x.c
deleted file mode 100644
index b176295..0000000
--- a/src/runtime/cgo/gcc_linux_ppc64x.c
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ppc64 ppc64le
-
-#include <pthread.h>
-#include <string.h>
-#include <signal.h>
-#include "libcgo.h"
-
-static void *threadentry(void*);
-
-void (*x_cgo_inittls)(void **tlsg, void **tlsbase);
-static void (*setg_gcc)(void*);
-
-void
-x_cgo_init(G *g, void (*setg)(void*), void **tlsbase)
-{
-	pthread_attr_t attr;
-	size_t size;
-
-	setg_gcc = setg;
-	pthread_attr_init(&attr);
-	pthread_attr_getstacksize(&attr, &size);
-	g->stacklo = (uintptr)&attr - size + 4096;
-	pthread_attr_destroy(&attr);
-}
-
-void
-_cgo_sys_thread_start(ThreadStart *ts)
-{
-	pthread_attr_t attr;
-	sigset_t ign, oset;
-	pthread_t p;
-	size_t size;
-	int err;
-
-	sigfillset(&ign);
-	pthread_sigmask(SIG_SETMASK, &ign, &oset);
-
-	pthread_attr_init(&attr);
-	pthread_attr_getstacksize(&attr, &size);
-	// Leave stacklo=0 and set stackhi=size; mstack will do the rest.
-	ts->g->stackhi = size;
-	err = pthread_create(&p, &attr, threadentry, ts);
-
-	pthread_sigmask(SIG_SETMASK, &oset, nil);
-
-	if (err != 0) {
-		fatalf("pthread_create failed: %s", strerror(err));
-	}
-}
-
-extern void crosscall_ppc64(void (*fn)(void), void *g);
-
-static void*
-threadentry(void *v)
-{
-	ThreadStart ts;
-
-	ts = *(ThreadStart*)v;
-	free(v);
-
-	// Save g for this thread in C TLS
-	setg_gcc((void*)ts.g);
-
-	crosscall_ppc64(ts.fn, (void*)ts.g);
-	return nil;
-}
diff --git a/src/runtime/cgo/gcc_ppc64x.S b/src/runtime/cgo/gcc_ppc64x.S
deleted file mode 100644
index 05af070..0000000
--- a/src/runtime/cgo/gcc_ppc64x.S
+++ /dev/null
@@ -1,140 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ppc64 ppc64le
-
-/*
- * Apple still insists on underscore prefixes for C function names.
- */
-#if defined(__APPLE__)
-#define EXT(s) _##s
-#else
-#define EXT(s) s
-#endif
-
-/*
- * void crosscall_ppc64(void (*fn)(void), void *g)
- *
- * Calling into the gc tool chain, where all registers are caller save.
- * Called from standard ppc64 C ABI, where r2, r14-r31, f14-f31 are
- * callee-save, so they must be saved explicitly.
- */
-.globl EXT(crosscall_ppc64)
-EXT(crosscall_ppc64):
-	// Start with standard C stack frame layout and linkage
-	mflr	%r0
-	std	%r0, 16(%r1)	// Save LR in caller's frame
-	std	%r2, 24(%r1)	// Save TOC in caller's frame
-	bl	saveregs
-	stdu	%r1, -296(%r1)
-
-	// Set up Go ABI constant registers
-	bl	_cgo_reginit
-
-	// Restore g pointer (r30 in Go ABI, which may have been clobbered by C)
-	mr	%r30, %r4
-
-	// Call fn
-	mtctr	%r3
-	bctrl
-
-	addi	%r1, %r1, 296
-	bl	restoreregs
-	ld	%r2, 24(%r1)
-	ld	%r0, 16(%r1)
-	mtlr	%r0
-	blr
-
-saveregs:
-	// Save callee-save registers
-	// O=-288; for R in %r{14..31}; do echo "\tstd\t$R, $O(%r1)"; ((O+=8)); done; for F in f{14..31}; do echo "\tstfd\t$F, $O(%r1)"; ((O+=8)); done
-	std	%r14, -288(%r1)
-	std	%r15, -280(%r1)
-	std	%r16, -272(%r1)
-	std	%r17, -264(%r1)
-	std	%r18, -256(%r1)
-	std	%r19, -248(%r1)
-	std	%r20, -240(%r1)
-	std	%r21, -232(%r1)
-	std	%r22, -224(%r1)
-	std	%r23, -216(%r1)
-	std	%r24, -208(%r1)
-	std	%r25, -200(%r1)
-	std	%r26, -192(%r1)
-	std	%r27, -184(%r1)
-	std	%r28, -176(%r1)
-	std	%r29, -168(%r1)
-	std	%r30, -160(%r1)
-	std	%r31, -152(%r1)
-	stfd	%f14, -144(%r1)
-	stfd	%f15, -136(%r1)
-	stfd	%f16, -128(%r1)
-	stfd	%f17, -120(%r1)
-	stfd	%f18, -112(%r1)
-	stfd	%f19, -104(%r1)
-	stfd	%f20, -96(%r1)
-	stfd	%f21, -88(%r1)
-	stfd	%f22, -80(%r1)
-	stfd	%f23, -72(%r1)
-	stfd	%f24, -64(%r1)
-	stfd	%f25, -56(%r1)
-	stfd	%f26, -48(%r1)
-	stfd	%f27, -40(%r1)
-	stfd	%f28, -32(%r1)
-	stfd	%f29, -24(%r1)
-	stfd	%f30, -16(%r1)
-	stfd	%f31, -8(%r1)
-
-	blr
-
-restoreregs:
-	// O=-288; for R in %r{14..31}; do echo "\tld\t$R, $O(%r1)"; ((O+=8)); done; for F in %f{14..31}; do echo "\tlfd\t$F, $O(%r1)"; ((O+=8)); done
-	ld	%r14, -288(%r1)
-	ld	%r15, -280(%r1)
-	ld	%r16, -272(%r1)
-	ld	%r17, -264(%r1)
-	ld	%r18, -256(%r1)
-	ld	%r19, -248(%r1)
-	ld	%r20, -240(%r1)
-	ld	%r21, -232(%r1)
-	ld	%r22, -224(%r1)
-	ld	%r23, -216(%r1)
-	ld	%r24, -208(%r1)
-	ld	%r25, -200(%r1)
-	ld	%r26, -192(%r1)
-	ld	%r27, -184(%r1)
-	ld	%r28, -176(%r1)
-	ld	%r29, -168(%r1)
-	ld	%r30, -160(%r1)
-	ld	%r31, -152(%r1)
-	lfd	%f14, -144(%r1)
-	lfd	%f15, -136(%r1)
-	lfd	%f16, -128(%r1)
-	lfd	%f17, -120(%r1)
-	lfd	%f18, -112(%r1)
-	lfd	%f19, -104(%r1)
-	lfd	%f20, -96(%r1)
-	lfd	%f21, -88(%r1)
-	lfd	%f22, -80(%r1)
-	lfd	%f23, -72(%r1)
-	lfd	%f24, -64(%r1)
-	lfd	%f25, -56(%r1)
-	lfd	%f26, -48(%r1)
-	lfd	%f27, -40(%r1)
-	lfd	%f28, -32(%r1)
-	lfd	%f29, -24(%r1)
-	lfd	%f30, -16(%r1)
-	lfd	%f31, -8(%r1)
-
-	blr
-
-.globl EXT(__stack_chk_fail_local)
-EXT(__stack_chk_fail_local):
-1:
-	// TODO(austin)
-	b 1b
-
-#ifdef __ELF__
-.section .note.GNU-stack,"",%progbits
-#endif
diff --git a/src/runtime/cgo/gcc_signal_darwin_armx.c b/src/runtime/cgo/gcc_signal_darwin_armx.c
deleted file mode 100644
index e36fe26..0000000
--- a/src/runtime/cgo/gcc_signal_darwin_armx.c
+++ /dev/null
@@ -1,205 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Emulation of the Unix signal SIGSEGV.
-//
-// On iOS, Go tests and apps under development are run by lldb.
-// The debugger uses a task-level exception handler to intercept signals.
-// Despite having a 'handle' mechanism like gdb, lldb will not allow a
-// SIGSEGV to pass to the running program. For Go, this means we cannot
-// generate a panic, which cannot be recovered, and so tests fail.
-//
-// We work around this by registering a thread-level mach exception handler
-// and intercepting EXC_BAD_ACCESS. The kernel offers thread handlers a
-// chance to resolve exceptions before the task handler, so we can generate
-// the panic and avoid lldb's SIGSEGV handler.
-//
-// The dist tool enables this by build flag when testing.
-
-// +build lldb
-// +build darwin
-// +build arm arm64
-
-#include <limits.h>
-#include <pthread.h>
-#include <stdio.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#include <mach/arm/thread_status.h>
-#include <mach/exception_types.h>
-#include <mach/mach.h>
-#include <mach/mach_init.h>
-#include <mach/mach_port.h>
-#include <mach/thread_act.h>
-#include <mach/thread_status.h>
-
-#include "libcgo.h"
-
-uintptr_t x_cgo_panicmem;
-
-static pthread_mutex_t mach_exception_handler_port_set_mu;
-static mach_port_t mach_exception_handler_port_set = MACH_PORT_NULL;
-
-kern_return_t
-catch_exception_raise(
-	mach_port_t exception_port,
-	mach_port_t thread,
-	mach_port_t task,
-	exception_type_t exception,
-	exception_data_t code_vector,
-	mach_msg_type_number_t code_count)
-{
-	kern_return_t ret;
-	arm_unified_thread_state_t thread_state;
-	mach_msg_type_number_t state_count = ARM_UNIFIED_THREAD_STATE_COUNT;
-
-	// Returning KERN_SUCCESS intercepts the exception.
-	//
-	// Returning KERN_FAILURE lets the exception fall through to the
-	// next handler, which is the standard signal emulation code
-	// registered on the task port.
-
-	if (exception != EXC_BAD_ACCESS) {
-		return KERN_FAILURE;
-	}
-
-	ret = thread_get_state(thread, ARM_UNIFIED_THREAD_STATE, (thread_state_t)&thread_state, &state_count);
-	if (ret) {
-		fprintf(stderr, "runtime/cgo: thread_get_state failed: %d\n", ret);
-		abort();
-	}
-
-	// Bounce call to sigpanic through asm that makes it look like
-	// we call sigpanic directly from the faulting code.
-#ifdef __arm64__
-	thread_state.ts_64.__x[1] = thread_state.ts_64.__lr;
-	thread_state.ts_64.__x[2] = thread_state.ts_64.__pc;
-	thread_state.ts_64.__pc = x_cgo_panicmem;
-#else
-	thread_state.ts_32.__r[1] = thread_state.ts_32.__lr;
-	thread_state.ts_32.__r[2] = thread_state.ts_32.__pc;
-	thread_state.ts_32.__pc = x_cgo_panicmem;
-#endif
-
-	if (0) {
-		// Useful debugging logic when panicmem is broken.
-		//
-		// Sends the first SIGSEGV and lets lldb catch the
-		// second one, avoiding a loop that locks up iOS
-		// devices requiring a hard reboot.
-		fprintf(stderr, "runtime/cgo: caught exc_bad_access\n");
-		fprintf(stderr, "__lr = %llx\n", thread_state.ts_64.__lr);
-		fprintf(stderr, "__pc = %llx\n", thread_state.ts_64.__pc);
-		static int pass1 = 0;
-		if (pass1) {
-			return KERN_FAILURE;
-		}
-		pass1 = 1;
-	}
-
-	ret = thread_set_state(thread, ARM_UNIFIED_THREAD_STATE, (thread_state_t)&thread_state, state_count);
-	if (ret) {
-		fprintf(stderr, "runtime/cgo: thread_set_state failed: %d\n", ret);
-		abort();
-	}
-
-	return KERN_SUCCESS;
-}
-
-void
-darwin_arm_init_thread_exception_port()
-{
-	// Called by each new OS thread to bind its EXC_BAD_ACCESS exception
-	// to mach_exception_handler_port_set.
-	int ret;
-	mach_port_t port = MACH_PORT_NULL;
-
-	ret = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &port);
-	if (ret) {
-		fprintf(stderr, "runtime/cgo: mach_port_allocate failed: %d\n", ret);
-		abort();
-	}
-	ret = mach_port_insert_right(
-		mach_task_self(),
-		port,
-		port,
-		MACH_MSG_TYPE_MAKE_SEND);
-	if (ret) {
-		fprintf(stderr, "runtime/cgo: mach_port_insert_right failed: %d\n", ret);
-		abort();
-	}
-
-	ret = thread_set_exception_ports(
-		mach_thread_self(),
-		EXC_MASK_BAD_ACCESS,
-		port,
-		EXCEPTION_DEFAULT,
-		THREAD_STATE_NONE);
-	if (ret) {
-		fprintf(stderr, "runtime/cgo: thread_set_exception_ports failed: %d\n", ret);
-		abort();
-	}
-
-	ret = pthread_mutex_lock(&mach_exception_handler_port_set_mu);
-	if (ret) {
-		fprintf(stderr, "runtime/cgo: pthread_mutex_lock failed: %d\n", ret);
-		abort();
-	}
-	ret = mach_port_move_member(
-		mach_task_self(),
-		port,
-		mach_exception_handler_port_set);
-	if (ret) {
-		fprintf(stderr, "runtime/cgo: mach_port_move_member failed: %d\n", ret);
-		abort();
-	}
-	ret = pthread_mutex_unlock(&mach_exception_handler_port_set_mu);
-	if (ret) {
-		fprintf(stderr, "runtime/cgo: pthread_mutex_unlock failed: %d\n", ret);
-		abort();
-	}
-}
-
-static void*
-mach_exception_handler(void *port)
-{
-	// Calls catch_exception_raise.
-	extern boolean_t exc_server();
-	mach_msg_server(exc_server, 2048, (mach_port_t)port, 0);
-	abort(); // never returns
-}
-
-void
-darwin_arm_init_mach_exception_handler()
-{
-	pthread_mutex_init(&mach_exception_handler_port_set_mu, NULL);
-
-	// Called once per process to initialize a mach port server, listening
-	// for EXC_BAD_ACCESS thread exceptions.
-	int ret;
-	pthread_t thr = NULL;
-	pthread_attr_t attr;
-
-	ret = mach_port_allocate(
-		mach_task_self(),
-		MACH_PORT_RIGHT_PORT_SET,
-		&mach_exception_handler_port_set);
-	if (ret) {
-		fprintf(stderr, "runtime/cgo: mach_port_allocate failed for port_set: %d\n", ret);
-		abort();
-	}
-
-	// Start a thread to handle exceptions.
-	uintptr_t port_set = (uintptr_t)mach_exception_handler_port_set;
-	pthread_attr_init(&attr);
-	pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
-	ret = pthread_create(&thr, &attr, mach_exception_handler, (void*)port_set);
-	if (ret) {
-		fprintf(stderr, "runtime/cgo: pthread_create failed: %d\n", ret);
-		abort();
-	}
-	pthread_attr_destroy(&attr);
-}
diff --git a/src/runtime/cgo/gcc_signal_darwin_lldb.c b/src/runtime/cgo/gcc_signal_darwin_lldb.c
deleted file mode 100644
index b26315f..0000000
--- a/src/runtime/cgo/gcc_signal_darwin_lldb.c
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !lldb
-// +build darwin
-// +build arm arm64
-
-#include <stdint.h>
-
-uintptr_t x_cgo_panicmem;
-
-void darwin_arm_init_thread_exception_port() {}
-void darwin_arm_init_mach_exception_handler() {}
diff --git a/src/runtime/cgo/gcc_solaris_amd64.c b/src/runtime/cgo/gcc_solaris_amd64.c
deleted file mode 100644
index 72ace56..0000000
--- a/src/runtime/cgo/gcc_solaris_amd64.c
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include <pthread.h>
-#include <string.h>
-#include <signal.h>
-#include <ucontext.h>
-#include "libcgo.h"
-
-static void* threadentry(void*);
-static void (*setg_gcc)(void*);
-
-void
-x_cgo_init(G *g, void (*setg)(void*))
-{
-	ucontext_t ctx;
-
-	setg_gcc = setg;
-	if (getcontext(&ctx) != 0)
-		perror("runtime/cgo: getcontext failed");
-	g->stacklo = (uintptr_t)ctx.uc_stack.ss_sp;
-}
-
-void
-_cgo_sys_thread_start(ThreadStart *ts)
-{
-	pthread_attr_t attr;
-	sigset_t ign, oset;
-	pthread_t p;
-	void *base;
-	size_t size;
-	int err;
-
-	sigfillset(&ign);
-	pthread_sigmask(SIG_SETMASK, &ign, &oset);
-
-	pthread_attr_init(&attr);
-
-	if (pthread_attr_getstack(&attr, &base, &size) != 0)
-		perror("runtime/cgo: pthread_attr_getstack failed");
-	if (size == 0) {
-		ts->g->stackhi = 2 << 20;
-		if (pthread_attr_setstack(&attr, NULL, ts->g->stackhi) != 0)
-			perror("runtime/cgo: pthread_attr_setstack failed");
-	} else {
-		ts->g->stackhi = size;
-	}
-	pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
-	err = pthread_create(&p, &attr, threadentry, ts);
-
-	pthread_sigmask(SIG_SETMASK, &oset, nil);
-
-	if (err != 0) {
-		fprintf(stderr, "runtime/cgo: pthread_create failed: %s\n", strerror(err));
-		abort();
-	}
-}
-
-static void*
-threadentry(void *v)
-{
-	ThreadStart ts;
-
-	ts = *(ThreadStart*)v;
-	free(v);
-
-	/*
-	 * Set specific keys.
-	 */
-	setg_gcc((void*)ts.g);
-
-	crosscall_amd64(ts.fn);
-	return nil;
-}
diff --git a/src/runtime/cgo/iscgo.go b/src/runtime/cgo/iscgo.go
deleted file mode 100644
index 54f0a13..0000000
--- a/src/runtime/cgo/iscgo.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2010 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// The runtime package contains an uninitialized definition
-// for runtime·iscgo.  Override it to tell the runtime we're here.
-// There are various function pointers that should be set too,
-// but those depend on dynamic linker magic to get initialized
-// correctly, and sometimes they break.  This variable is a
-// backup: it depends only on old C style static linking rules.
-
-package cgo
-
-import _ "unsafe" // for go:linkname
-
-//go:linkname _iscgo runtime.iscgo
-var _iscgo bool = true
diff --git a/src/runtime/cgo/netbsd.go b/src/runtime/cgo/netbsd.go
deleted file mode 100644
index ac6b18a..0000000
--- a/src/runtime/cgo/netbsd.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2010 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build netbsd
-
-package cgo
-
-import _ "unsafe" // for go:linkname
-
-// Supply environ and __progname, because we don't
-// link against the standard NetBSD crt0.o and the
-// libc dynamic library needs them.
-
-//go:linkname _environ environ
-//go:linkname _progname __progname
-
-var _environ uintptr
-var _progname uintptr
diff --git a/src/runtime/cgo/openbsd.go b/src/runtime/cgo/openbsd.go
deleted file mode 100644
index 61af3a8..0000000
--- a/src/runtime/cgo/openbsd.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2010 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build openbsd
-
-package cgo
-
-import _ "unsafe" // for go:linkname
-
-// Supply environ, __progname and __guard_local, because
-// we don't link against the standard OpenBSD crt0.o and
-// the libc dynamic library needs them.
-
-//go:linkname _environ environ
-//go:linkname _progname __progname
-//go:linkname _guard_local __guard_local
-
-var _environ uintptr
-var _progname uintptr
-var _guard_local uintptr
-
-//go:cgo_export_dynamic environ environ
-//go:cgo_export_dynamic __progname __progname
-
-// This is normally marked as hidden and placed in the
-// .openbsd.randomdata section.
-//go:cgo_export_dynamic __guard_local __guard_local
-
-// We override pthread_create to support PT_TLS.
-//go:cgo_export_dynamic pthread_create pthread_create
diff --git a/src/runtime/cgo/setenv.go b/src/runtime/cgo/setenv.go
deleted file mode 100644
index 20d5703..0000000
--- a/src/runtime/cgo/setenv.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2011 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package cgo
-
-import _ "unsafe" // for go:linkname
-
-//go:cgo_import_static x_cgo_setenv
-//go:linkname x_cgo_setenv x_cgo_setenv
-//go:linkname _cgo_setenv runtime._cgo_setenv
-var x_cgo_setenv byte
-var _cgo_setenv = &x_cgo_setenv
-
-//go:cgo_import_static x_cgo_unsetenv
-//go:linkname x_cgo_unsetenv x_cgo_unsetenv
-//go:linkname _cgo_unsetenv runtime._cgo_unsetenv
-var x_cgo_unsetenv byte
-var _cgo_unsetenv = &x_cgo_unsetenv
diff --git a/src/runtime/cgo/signal_darwin_arm.s b/src/runtime/cgo/signal_darwin_arm.s
deleted file mode 100644
index ee5c3d3..0000000
--- a/src/runtime/cgo/signal_darwin_arm.s
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-
-// panicmem is the entrypoint for SIGSEGV as intercepted via a
-// mach thread port as EXC_BAD_ACCESS. As the segfault may have happened
-// in C code, we first need to load_g then call panicmem.
-//
-//	R1 - LR at moment of fault
-//	R2 - PC at moment of fault
-TEXT ·panicmem(SB),NOSPLIT,$-4
-	// If in external C code, we need to load the g register.
-	BL  runtime·load_g(SB)
-	CMP $0, g
-	BNE ongothread
-
-	// On a foreign thread. We call badsignal, which will, if all
-	// goes according to plan, not return.
-	SUB  $4, R13
-	MOVW $11, R1
-	MOVW $11, R2
-	MOVM.DB.W [R1,R2], (R13)
-	// TODO: badsignal should not return, but it does. Issue #10139.
-	//BL runtime·badsignal(SB)
-	MOVW $139, R1
-	MOVW R1, 4(R13)
-	B    runtime·exit(SB)
-
-ongothread:
-	// Trigger a SIGSEGV panic.
-	//
-	// The goal is to arrange the stack so it looks like the runtime
-	// function sigpanic was called from the PC that faulted. It has
-	// to be sigpanic, as the stack unwinding code in traceback.go
-	// looks explicitly for it.
-	//
-	// To do this we call into runtime·setsigsegv, which sets the
-	// appropriate state inside the g object. We give it the faulting
-	// PC on the stack, then put it in the LR before calling sigpanic.
-	MOVM.DB.W [R1,R2], (R13)
-	BL runtime·setsigsegv(SB)
-	MOVM.IA.W (R13), [R1,R2]
-
-	SUB $4, R13
-	MOVW R1, 0(R13)
-	MOVW R2, R14
-	B runtime·sigpanic(SB)
diff --git a/src/runtime/cgo/signal_darwin_arm64.s b/src/runtime/cgo/signal_darwin_arm64.s
deleted file mode 100644
index 75aefd4..0000000
--- a/src/runtime/cgo/signal_darwin_arm64.s
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-
-// panicmem is the entrypoint for SIGSEGV as intercepted via a
-// mach thread port as EXC_BAD_ACCESS. As the segfault may have happened
-// in C code, we first need to load_g then call panicmem.
-//
-//	R1 - LR at moment of fault
-//	R2 - PC at moment of fault
-TEXT ·panicmem(SB),NOSPLIT,$-8
-	// If in external C code, we need to load the g register.
-	BL  runtime·load_g(SB)
-	CMP $0, g
-	BNE ongothread
-
-	// On a foreign thread.
-	// TODO(crawshaw): call badsignal
-	MOVD.W $0, -16(RSP)
-	MOVW $139, R1
-	MOVW R1, 8(RSP)
-	B    runtime·exit(SB)
-
-ongothread:
-	// Trigger a SIGSEGV panic.
-	//
-	// The goal is to arrange the stack so it looks like the runtime
-	// function sigpanic was called from the PC that faulted. It has
-	// to be sigpanic, as the stack unwinding code in traceback.go
-	// looks explicitly for it.
-	//
-	// To do this we call into runtime·setsigsegv, which sets the
-	// appropriate state inside the g object. We give it the faulting
-	// PC on the stack, then put it in the LR before calling sigpanic.
-
-	// Build a 32-byte stack frame for us for this call.
-	// Saved LR (none available) is at the bottom,
-	// then the PC argument for setsigsegv, 
-	// then a copy of the LR for us to restore.
-	MOVD.W $0, -32(RSP)
-	MOVD R1, 8(RSP)
-	MOVD R2, 16(RSP)
-	BL runtime·setsigsegv(SB)
-	MOVD 8(RSP), R1
-	MOVD 16(RSP), R2
-
-	// Build a 16-byte stack frame for the simulated
-	// call to sigpanic, by taking 16 bytes away from the
-	// 32-byte stack frame above.
-	// The saved LR in this frame is the LR at time of fault,
-	// and the LR on entry to sigpanic is the PC at time of fault.
-	MOVD.W R1, 16(RSP)
-	MOVD R2, R30
-	B runtime·sigpanic(SB)
diff --git a/src/runtime/cgo/signal_darwin_armx.go b/src/runtime/cgo/signal_darwin_armx.go
deleted file mode 100644
index 9c1ba5d..0000000
--- a/src/runtime/cgo/signal_darwin_armx.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin
-// +build arm arm64
-
-package cgo
-
-import "unsafe"
-
-//go:cgo_import_static x_cgo_panicmem
-//go:linkname x_cgo_panicmem x_cgo_panicmem
-var x_cgo_panicmem uintptr
-
-// TODO(crawshaw): move this into x_cgo_init, it will not run until
-// runtime has finished loading, which may be after its use.
-func init() {
-	x_cgo_panicmem = funcPC(panicmem)
-}
-
-func funcPC(f interface{}) uintptr {
-	var ptrSize = unsafe.Sizeof(uintptr(0))
-	return **(**uintptr)(add(unsafe.Pointer(&f), ptrSize))
-}
-
-func add(p unsafe.Pointer, x uintptr) unsafe.Pointer {
-	return unsafe.Pointer(uintptr(p) + x)
-}
-
-func panicmem()
diff --git a/src/runtime/chanbarrier_test.go b/src/runtime/chanbarrier_test.go
deleted file mode 100644
index 770b850..0000000
--- a/src/runtime/chanbarrier_test.go
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime_test
-
-import (
-	"runtime"
-	"sync"
-	"testing"
-)
-
-type response struct {
-}
-
-type myError struct {
-}
-
-func (myError) Error() string { return "" }
-
-func doRequest(useSelect bool) (*response, error) {
-	type async struct {
-		resp *response
-		err  error
-	}
-	ch := make(chan *async, 0)
-	done := make(chan struct{}, 0)
-
-	if useSelect {
-		go func() {
-			select {
-			case ch <- &async{resp: nil, err: myError{}}:
-			case <-done:
-			}
-		}()
-	} else {
-		go func() {
-			ch <- &async{resp: nil, err: myError{}}
-		}()
-	}
-
-	r := <-ch
-	runtime.Gosched()
-	return r.resp, r.err
-}
-
-func TestChanSendSelectBarrier(t *testing.T) {
-	testChanSendBarrier(true)
-}
-
-func TestChanSendBarrier(t *testing.T) {
-	testChanSendBarrier(false)
-}
-
-func testChanSendBarrier(useSelect bool) {
-	var wg sync.WaitGroup
-	var globalMu sync.Mutex
-	outer := 100
-	inner := 100000
-	if testing.Short() {
-		outer = 10
-		inner = 1000
-	}
-	for i := 0; i < outer; i++ {
-		wg.Add(1)
-		go func() {
-			defer wg.Done()
-			var garbage []byte
-			for j := 0; j < inner; j++ {
-				_, err := doRequest(useSelect)
-				_, ok := err.(myError)
-				if !ok {
-					panic(1)
-				}
-				garbage = make([]byte, 1<<10)
-			}
-			globalMu.Lock()
-			global = garbage
-			globalMu.Unlock()
-		}()
-	}
-	wg.Wait()
-}
diff --git a/src/runtime/cputicks.go b/src/runtime/cputicks.go
deleted file mode 100644
index 162e026..0000000
--- a/src/runtime/cputicks.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !arm
-// +build !arm64
-
-package runtime
-
-// careful: cputicks is not guaranteed to be monotonic!  In particular, we have
-// noticed drift between cpus on certain os/arch combinations.  See issue 8976.
-func cputicks() int64
diff --git a/src/runtime/crash_unix_test.go b/src/runtime/crash_unix_test.go
deleted file mode 100644
index b925d02..0000000
--- a/src/runtime/crash_unix_test.go
+++ /dev/null
@@ -1,135 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package runtime_test
-
-import (
-	"bytes"
-	"internal/testenv"
-	"io/ioutil"
-	"os"
-	"os/exec"
-	"path/filepath"
-	"runtime"
-	"syscall"
-	"testing"
-)
-
-func TestCrashDumpsAllThreads(t *testing.T) {
-	switch runtime.GOOS {
-	case "darwin", "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "solaris":
-	default:
-		t.Skipf("skipping; not supported on %v", runtime.GOOS)
-	}
-
-	// We don't use executeTest because we need to kill the
-	// program while it is running.
-
-	testenv.MustHaveGoBuild(t)
-
-	checkStaleRuntime(t)
-
-	dir, err := ioutil.TempDir("", "go-build")
-	if err != nil {
-		t.Fatalf("failed to create temp directory: %v", err)
-	}
-	defer os.RemoveAll(dir)
-
-	if err := ioutil.WriteFile(filepath.Join(dir, "main.go"), []byte(crashDumpsAllThreadsSource), 0666); err != nil {
-		t.Fatalf("failed to create Go file: %v", err)
-	}
-
-	cmd := exec.Command("go", "build", "-o", "a.exe")
-	cmd.Dir = dir
-	out, err := testEnv(cmd).CombinedOutput()
-	if err != nil {
-		t.Fatalf("building source: %v\n%s", err, out)
-	}
-
-	cmd = exec.Command(filepath.Join(dir, "a.exe"))
-	cmd = testEnv(cmd)
-	cmd.Env = append(cmd.Env, "GOTRACEBACK=crash")
-	var outbuf bytes.Buffer
-	cmd.Stdout = &outbuf
-	cmd.Stderr = &outbuf
-
-	rp, wp, err := os.Pipe()
-	if err != nil {
-		t.Fatal(err)
-	}
-	cmd.ExtraFiles = []*os.File{wp}
-
-	if err := cmd.Start(); err != nil {
-		t.Fatalf("starting program: %v", err)
-	}
-
-	if err := wp.Close(); err != nil {
-		t.Logf("closing write pipe: %v", err)
-	}
-	if _, err := rp.Read(make([]byte, 1)); err != nil {
-		t.Fatalf("reading from pipe: %v", err)
-	}
-
-	if err := cmd.Process.Signal(syscall.SIGQUIT); err != nil {
-		t.Fatalf("signal: %v", err)
-	}
-
-	// No point in checking the error return from Wait--we expect
-	// it to fail.
-	cmd.Wait()
-
-	// We want to see a stack trace for each thread.
-	// Before https://golang.org/cl/2811 running threads would say
-	// "goroutine running on other thread; stack unavailable".
-	out = outbuf.Bytes()
-	n := bytes.Count(out, []byte("main.loop("))
-	if n != 4 {
-		t.Errorf("found %d instances of main.loop; expected 4", n)
-		t.Logf("%s", out)
-	}
-}
-
-const crashDumpsAllThreadsSource = `
-package main
-
-import (
-	"fmt"
-	"os"
-	"runtime"
-)
-
-func main() {
-	const count = 4
-	runtime.GOMAXPROCS(count + 1)
-
-	chans := make([]chan bool, count)
-	for i := range chans {
-		chans[i] = make(chan bool)
-		go loop(i, chans[i])
-	}
-
-	// Wait for all the goroutines to start executing.
-	for _, c := range chans {
-		<-c
-	}
-
-	// Tell our parent that all the goroutines are executing.
-	if _, err := os.NewFile(3, "pipe").WriteString("x"); err != nil {
-		fmt.Fprintf(os.Stderr, "write to pipe failed: %v\n", err)
-		os.Exit(2)
-	}
-
-	select {}
-}
-
-func loop(i int, c chan bool) {
-	close(c)
-	for {
-		for j := 0; j < 0x7fffffff; j++ {
-		}
-	}
-}
-`
diff --git a/src/runtime/defs1_netbsd_386.go b/src/runtime/defs1_netbsd_386.go
deleted file mode 100644
index f222bed..0000000
--- a/src/runtime/defs1_netbsd_386.go
+++ /dev/null
@@ -1,183 +0,0 @@
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_netbsd.go defs_netbsd_386.go
-
-package runtime
-
-const (
-	_EINTR  = 0x4
-	_EFAULT = 0xe
-
-	_PROT_NONE  = 0x0
-	_PROT_READ  = 0x1
-	_PROT_WRITE = 0x2
-	_PROT_EXEC  = 0x4
-
-	_MAP_ANON    = 0x1000
-	_MAP_PRIVATE = 0x2
-	_MAP_FIXED   = 0x10
-
-	_MADV_FREE = 0x6
-
-	_SA_SIGINFO = 0x40
-	_SA_RESTART = 0x2
-	_SA_ONSTACK = 0x1
-
-	_SIGHUP    = 0x1
-	_SIGINT    = 0x2
-	_SIGQUIT   = 0x3
-	_SIGILL    = 0x4
-	_SIGTRAP   = 0x5
-	_SIGABRT   = 0x6
-	_SIGEMT    = 0x7
-	_SIGFPE    = 0x8
-	_SIGKILL   = 0x9
-	_SIGBUS    = 0xa
-	_SIGSEGV   = 0xb
-	_SIGSYS    = 0xc
-	_SIGPIPE   = 0xd
-	_SIGALRM   = 0xe
-	_SIGTERM   = 0xf
-	_SIGURG    = 0x10
-	_SIGSTOP   = 0x11
-	_SIGTSTP   = 0x12
-	_SIGCONT   = 0x13
-	_SIGCHLD   = 0x14
-	_SIGTTIN   = 0x15
-	_SIGTTOU   = 0x16
-	_SIGIO     = 0x17
-	_SIGXCPU   = 0x18
-	_SIGXFSZ   = 0x19
-	_SIGVTALRM = 0x1a
-	_SIGPROF   = 0x1b
-	_SIGWINCH  = 0x1c
-	_SIGINFO   = 0x1d
-	_SIGUSR1   = 0x1e
-	_SIGUSR2   = 0x1f
-
-	_FPE_INTDIV = 0x1
-	_FPE_INTOVF = 0x2
-	_FPE_FLTDIV = 0x3
-	_FPE_FLTOVF = 0x4
-	_FPE_FLTUND = 0x5
-	_FPE_FLTRES = 0x6
-	_FPE_FLTINV = 0x7
-	_FPE_FLTSUB = 0x8
-
-	_BUS_ADRALN = 0x1
-	_BUS_ADRERR = 0x2
-	_BUS_OBJERR = 0x3
-
-	_SEGV_MAPERR = 0x1
-	_SEGV_ACCERR = 0x2
-
-	_ITIMER_REAL    = 0x0
-	_ITIMER_VIRTUAL = 0x1
-	_ITIMER_PROF    = 0x2
-
-	_EV_ADD       = 0x1
-	_EV_DELETE    = 0x2
-	_EV_CLEAR     = 0x20
-	_EV_RECEIPT   = 0
-	_EV_ERROR     = 0x4000
-	_EVFILT_READ  = 0x0
-	_EVFILT_WRITE = 0x1
-)
-
-type sigaltstackt struct {
-	ss_sp    uintptr
-	ss_size  uintptr
-	ss_flags int32
-}
-
-type sigset struct {
-	__bits [4]uint32
-}
-
-type siginfo struct {
-	_signo  int32
-	_code   int32
-	_errno  int32
-	_reason [20]byte
-}
-
-type stackt struct {
-	ss_sp    uintptr
-	ss_size  uintptr
-	ss_flags int32
-}
-
-type timespec struct {
-	tv_sec  int64
-	tv_nsec int32
-}
-
-func (ts *timespec) set_sec(x int32) {
-	ts.tv_sec = int64(x)
-}
-
-func (ts *timespec) set_nsec(x int32) {
-	ts.tv_nsec = x
-}
-
-type timeval struct {
-	tv_sec  int64
-	tv_usec int32
-}
-
-func (tv *timeval) set_usec(x int32) {
-	tv.tv_usec = x
-}
-
-type itimerval struct {
-	it_interval timeval
-	it_value    timeval
-}
-
-type mcontextt struct {
-	__gregs     [19]uint32
-	__fpregs    [644]byte
-	_mc_tlsbase int32
-}
-
-type ucontextt struct {
-	uc_flags    uint32
-	uc_link     *ucontextt
-	uc_sigmask  sigset
-	uc_stack    stackt
-	uc_mcontext mcontextt
-	__uc_pad    [4]int32
-}
-
-type keventt struct {
-	ident  uint32
-	filter uint32
-	flags  uint32
-	fflags uint32
-	data   int64
-	udata  *byte
-}
-
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_netbsd.go defs_netbsd_386.go
-
-const (
-	_REG_GS     = 0x0
-	_REG_FS     = 0x1
-	_REG_ES     = 0x2
-	_REG_DS     = 0x3
-	_REG_EDI    = 0x4
-	_REG_ESI    = 0x5
-	_REG_EBP    = 0x6
-	_REG_ESP    = 0x7
-	_REG_EBX    = 0x8
-	_REG_EDX    = 0x9
-	_REG_ECX    = 0xa
-	_REG_EAX    = 0xb
-	_REG_TRAPNO = 0xc
-	_REG_ERR    = 0xd
-	_REG_EIP    = 0xe
-	_REG_CS     = 0xf
-	_REG_EFL    = 0x10
-	_REG_UESP   = 0x11
-	_REG_SS     = 0x12
-)
diff --git a/src/runtime/defs1_netbsd_amd64.go b/src/runtime/defs1_netbsd_amd64.go
deleted file mode 100644
index c2bde4d..0000000
--- a/src/runtime/defs1_netbsd_amd64.go
+++ /dev/null
@@ -1,195 +0,0 @@
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_netbsd.go defs_netbsd_amd64.go
-
-package runtime
-
-const (
-	_EINTR  = 0x4
-	_EFAULT = 0xe
-
-	_PROT_NONE  = 0x0
-	_PROT_READ  = 0x1
-	_PROT_WRITE = 0x2
-	_PROT_EXEC  = 0x4
-
-	_MAP_ANON    = 0x1000
-	_MAP_PRIVATE = 0x2
-	_MAP_FIXED   = 0x10
-
-	_MADV_FREE = 0x6
-
-	_SA_SIGINFO = 0x40
-	_SA_RESTART = 0x2
-	_SA_ONSTACK = 0x1
-
-	_SIGHUP    = 0x1
-	_SIGINT    = 0x2
-	_SIGQUIT   = 0x3
-	_SIGILL    = 0x4
-	_SIGTRAP   = 0x5
-	_SIGABRT   = 0x6
-	_SIGEMT    = 0x7
-	_SIGFPE    = 0x8
-	_SIGKILL   = 0x9
-	_SIGBUS    = 0xa
-	_SIGSEGV   = 0xb
-	_SIGSYS    = 0xc
-	_SIGPIPE   = 0xd
-	_SIGALRM   = 0xe
-	_SIGTERM   = 0xf
-	_SIGURG    = 0x10
-	_SIGSTOP   = 0x11
-	_SIGTSTP   = 0x12
-	_SIGCONT   = 0x13
-	_SIGCHLD   = 0x14
-	_SIGTTIN   = 0x15
-	_SIGTTOU   = 0x16
-	_SIGIO     = 0x17
-	_SIGXCPU   = 0x18
-	_SIGXFSZ   = 0x19
-	_SIGVTALRM = 0x1a
-	_SIGPROF   = 0x1b
-	_SIGWINCH  = 0x1c
-	_SIGINFO   = 0x1d
-	_SIGUSR1   = 0x1e
-	_SIGUSR2   = 0x1f
-
-	_FPE_INTDIV = 0x1
-	_FPE_INTOVF = 0x2
-	_FPE_FLTDIV = 0x3
-	_FPE_FLTOVF = 0x4
-	_FPE_FLTUND = 0x5
-	_FPE_FLTRES = 0x6
-	_FPE_FLTINV = 0x7
-	_FPE_FLTSUB = 0x8
-
-	_BUS_ADRALN = 0x1
-	_BUS_ADRERR = 0x2
-	_BUS_OBJERR = 0x3
-
-	_SEGV_MAPERR = 0x1
-	_SEGV_ACCERR = 0x2
-
-	_ITIMER_REAL    = 0x0
-	_ITIMER_VIRTUAL = 0x1
-	_ITIMER_PROF    = 0x2
-
-	_EV_ADD       = 0x1
-	_EV_DELETE    = 0x2
-	_EV_CLEAR     = 0x20
-	_EV_RECEIPT   = 0
-	_EV_ERROR     = 0x4000
-	_EVFILT_READ  = 0x0
-	_EVFILT_WRITE = 0x1
-)
-
-type sigaltstackt struct {
-	ss_sp     uintptr
-	ss_size   uintptr
-	ss_flags  int32
-	pad_cgo_0 [4]byte
-}
-
-type sigset struct {
-	__bits [4]uint32
-}
-
-type siginfo struct {
-	_signo  int32
-	_code   int32
-	_errno  int32
-	_pad    int32
-	_reason [24]byte
-}
-
-type stackt struct {
-	ss_sp     uintptr
-	ss_size   uintptr
-	ss_flags  int32
-	pad_cgo_0 [4]byte
-}
-
-type timespec struct {
-	tv_sec  int64
-	tv_nsec int64
-}
-
-func (ts *timespec) set_sec(x int32) {
-	ts.tv_sec = int64(x)
-}
-
-func (ts *timespec) set_nsec(x int32) {
-	ts.tv_nsec = int64(x)
-}
-
-type timeval struct {
-	tv_sec    int64
-	tv_usec   int32
-	pad_cgo_0 [4]byte
-}
-
-func (tv *timeval) set_usec(x int32) {
-	tv.tv_usec = x
-}
-
-type itimerval struct {
-	it_interval timeval
-	it_value    timeval
-}
-
-type mcontextt struct {
-	__gregs     [26]uint64
-	_mc_tlsbase uint64
-	__fpregs    [512]int8
-}
-
-type ucontextt struct {
-	uc_flags    uint32
-	pad_cgo_0   [4]byte
-	uc_link     *ucontextt
-	uc_sigmask  sigset
-	uc_stack    stackt
-	uc_mcontext mcontextt
-}
-
-type keventt struct {
-	ident     uint64
-	filter    uint32
-	flags     uint32
-	fflags    uint32
-	pad_cgo_0 [4]byte
-	data      int64
-	udata     *byte
-}
-
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_netbsd.go defs_netbsd_amd64.go
-
-const (
-	_REG_RDI    = 0x0
-	_REG_RSI    = 0x1
-	_REG_RDX    = 0x2
-	_REG_RCX    = 0x3
-	_REG_R8     = 0x4
-	_REG_R9     = 0x5
-	_REG_R10    = 0x6
-	_REG_R11    = 0x7
-	_REG_R12    = 0x8
-	_REG_R13    = 0x9
-	_REG_R14    = 0xa
-	_REG_R15    = 0xb
-	_REG_RBP    = 0xc
-	_REG_RBX    = 0xd
-	_REG_RAX    = 0xe
-	_REG_GS     = 0xf
-	_REG_FS     = 0x10
-	_REG_ES     = 0x11
-	_REG_DS     = 0x12
-	_REG_TRAPNO = 0x13
-	_REG_ERR    = 0x14
-	_REG_RIP    = 0x15
-	_REG_CS     = 0x16
-	_REG_RFLAGS = 0x17
-	_REG_RSP    = 0x18
-	_REG_SS     = 0x19
-)
diff --git a/src/runtime/defs1_netbsd_arm.go b/src/runtime/defs1_netbsd_arm.go
deleted file mode 100644
index c976351..0000000
--- a/src/runtime/defs1_netbsd_arm.go
+++ /dev/null
@@ -1,183 +0,0 @@
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_netbsd.go defs_netbsd_arm.go
-
-package runtime
-
-const (
-	_EINTR  = 0x4
-	_EFAULT = 0xe
-
-	_PROT_NONE  = 0x0
-	_PROT_READ  = 0x1
-	_PROT_WRITE = 0x2
-	_PROT_EXEC  = 0x4
-
-	_MAP_ANON    = 0x1000
-	_MAP_PRIVATE = 0x2
-	_MAP_FIXED   = 0x10
-
-	_MADV_FREE = 0x6
-
-	_SA_SIGINFO = 0x40
-	_SA_RESTART = 0x2
-	_SA_ONSTACK = 0x1
-
-	_SIGHUP    = 0x1
-	_SIGINT    = 0x2
-	_SIGQUIT   = 0x3
-	_SIGILL    = 0x4
-	_SIGTRAP   = 0x5
-	_SIGABRT   = 0x6
-	_SIGEMT    = 0x7
-	_SIGFPE    = 0x8
-	_SIGKILL   = 0x9
-	_SIGBUS    = 0xa
-	_SIGSEGV   = 0xb
-	_SIGSYS    = 0xc
-	_SIGPIPE   = 0xd
-	_SIGALRM   = 0xe
-	_SIGTERM   = 0xf
-	_SIGURG    = 0x10
-	_SIGSTOP   = 0x11
-	_SIGTSTP   = 0x12
-	_SIGCONT   = 0x13
-	_SIGCHLD   = 0x14
-	_SIGTTIN   = 0x15
-	_SIGTTOU   = 0x16
-	_SIGIO     = 0x17
-	_SIGXCPU   = 0x18
-	_SIGXFSZ   = 0x19
-	_SIGVTALRM = 0x1a
-	_SIGPROF   = 0x1b
-	_SIGWINCH  = 0x1c
-	_SIGINFO   = 0x1d
-	_SIGUSR1   = 0x1e
-	_SIGUSR2   = 0x1f
-
-	_FPE_INTDIV = 0x1
-	_FPE_INTOVF = 0x2
-	_FPE_FLTDIV = 0x3
-	_FPE_FLTOVF = 0x4
-	_FPE_FLTUND = 0x5
-	_FPE_FLTRES = 0x6
-	_FPE_FLTINV = 0x7
-	_FPE_FLTSUB = 0x8
-
-	_BUS_ADRALN = 0x1
-	_BUS_ADRERR = 0x2
-	_BUS_OBJERR = 0x3
-
-	_SEGV_MAPERR = 0x1
-	_SEGV_ACCERR = 0x2
-
-	_ITIMER_REAL    = 0x0
-	_ITIMER_VIRTUAL = 0x1
-	_ITIMER_PROF    = 0x2
-
-	_EV_ADD       = 0x1
-	_EV_DELETE    = 0x2
-	_EV_CLEAR     = 0x20
-	_EV_RECEIPT   = 0
-	_EV_ERROR     = 0x4000
-	_EVFILT_READ  = 0x0
-	_EVFILT_WRITE = 0x1
-)
-
-type sigaltstackt struct {
-	ss_sp    uintptr
-	ss_size  uintptr
-	ss_flags int32
-}
-
-type sigset struct {
-	__bits [4]uint32
-}
-
-type siginfo struct {
-	_signo   int32
-	_code    int32
-	_errno   int32
-	_reason  uintptr
-	_reasonx [16]byte
-}
-
-type stackt struct {
-	ss_sp    uintptr
-	ss_size  uintptr
-	ss_flags int32
-}
-
-type timespec struct {
-	tv_sec  int64
-	tv_nsec int32
-}
-
-func (ts *timespec) set_sec(x int32) {
-	ts.tv_sec = int64(x)
-}
-
-func (ts *timespec) set_nsec(x int32) {
-	ts.tv_nsec = x
-}
-
-type timeval struct {
-	tv_sec  int64
-	tv_usec int32
-}
-
-func (tv *timeval) set_usec(x int32) {
-	tv.tv_usec = x
-}
-
-type itimerval struct {
-	it_interval timeval
-	it_value    timeval
-}
-
-type mcontextt struct {
-	__gregs [17]uint32
-	__fpu   [4 + 8*32 + 4]byte // EABI
-	// __fpu [4+4*33+4]byte // not EABI
-	_mc_tlsbase uint32
-}
-
-type ucontextt struct {
-	uc_flags    uint32
-	uc_link     *ucontextt
-	uc_sigmask  sigset
-	uc_stack    stackt
-	uc_mcontext mcontextt
-	__uc_pad    [2]int32
-}
-
-type keventt struct {
-	ident  uint32
-	filter uint32
-	flags  uint32
-	fflags uint32
-	data   int64
-	udata  *byte
-}
-
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_netbsd.go defs_netbsd_arm.go
-
-const (
-	_REG_R0   = 0x0
-	_REG_R1   = 0x1
-	_REG_R2   = 0x2
-	_REG_R3   = 0x3
-	_REG_R4   = 0x4
-	_REG_R5   = 0x5
-	_REG_R6   = 0x6
-	_REG_R7   = 0x7
-	_REG_R8   = 0x8
-	_REG_R9   = 0x9
-	_REG_R10  = 0xa
-	_REG_R11  = 0xb
-	_REG_R12  = 0xc
-	_REG_R13  = 0xd
-	_REG_R14  = 0xe
-	_REG_R15  = 0xf
-	_REG_CPSR = 0x10
-)
diff --git a/src/runtime/defs1_solaris_amd64.go b/src/runtime/defs1_solaris_amd64.go
deleted file mode 100644
index 3bb6f69..0000000
--- a/src/runtime/defs1_solaris_amd64.go
+++ /dev/null
@@ -1,245 +0,0 @@
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_solaris.go defs_solaris_amd64.go
-
-package runtime
-
-const (
-	_EINTR       = 0x4
-	_EBADF       = 0x9
-	_EFAULT      = 0xe
-	_EAGAIN      = 0xb
-	_ETIMEDOUT   = 0x91
-	_EWOULDBLOCK = 0xb
-	_EINPROGRESS = 0x96
-
-	_PROT_NONE  = 0x0
-	_PROT_READ  = 0x1
-	_PROT_WRITE = 0x2
-	_PROT_EXEC  = 0x4
-
-	_MAP_ANON    = 0x100
-	_MAP_PRIVATE = 0x2
-	_MAP_FIXED   = 0x10
-
-	_MADV_FREE = 0x5
-
-	_SA_SIGINFO = 0x8
-	_SA_RESTART = 0x4
-	_SA_ONSTACK = 0x1
-
-	_SIGHUP    = 0x1
-	_SIGINT    = 0x2
-	_SIGQUIT   = 0x3
-	_SIGILL    = 0x4
-	_SIGTRAP   = 0x5
-	_SIGABRT   = 0x6
-	_SIGEMT    = 0x7
-	_SIGFPE    = 0x8
-	_SIGKILL   = 0x9
-	_SIGBUS    = 0xa
-	_SIGSEGV   = 0xb
-	_SIGSYS    = 0xc
-	_SIGPIPE   = 0xd
-	_SIGALRM   = 0xe
-	_SIGTERM   = 0xf
-	_SIGURG    = 0x15
-	_SIGSTOP   = 0x17
-	_SIGTSTP   = 0x18
-	_SIGCONT   = 0x19
-	_SIGCHLD   = 0x12
-	_SIGTTIN   = 0x1a
-	_SIGTTOU   = 0x1b
-	_SIGIO     = 0x16
-	_SIGXCPU   = 0x1e
-	_SIGXFSZ   = 0x1f
-	_SIGVTALRM = 0x1c
-	_SIGPROF   = 0x1d
-	_SIGWINCH  = 0x14
-	_SIGUSR1   = 0x10
-	_SIGUSR2   = 0x11
-
-	_FPE_INTDIV = 0x1
-	_FPE_INTOVF = 0x2
-	_FPE_FLTDIV = 0x3
-	_FPE_FLTOVF = 0x4
-	_FPE_FLTUND = 0x5
-	_FPE_FLTRES = 0x6
-	_FPE_FLTINV = 0x7
-	_FPE_FLTSUB = 0x8
-
-	_BUS_ADRALN = 0x1
-	_BUS_ADRERR = 0x2
-	_BUS_OBJERR = 0x3
-
-	_SEGV_MAPERR = 0x1
-	_SEGV_ACCERR = 0x2
-
-	_ITIMER_REAL    = 0x0
-	_ITIMER_VIRTUAL = 0x1
-	_ITIMER_PROF    = 0x2
-
-	__SC_NPROCESSORS_ONLN = 0xf
-
-	_PTHREAD_CREATE_DETACHED = 0x40
-
-	_FORK_NOSIGCHLD = 0x1
-	_FORK_WAITPID   = 0x2
-
-	_MAXHOSTNAMELEN = 0x100
-
-	_O_NONBLOCK = 0x80
-	_FD_CLOEXEC = 0x1
-	_F_GETFL    = 0x3
-	_F_SETFL    = 0x4
-	_F_SETFD    = 0x2
-
-	_POLLIN  = 0x1
-	_POLLOUT = 0x4
-	_POLLHUP = 0x10
-	_POLLERR = 0x8
-
-	_PORT_SOURCE_FD = 0x4
-)
-
-type semt struct {
-	sem_count uint32
-	sem_type  uint16
-	sem_magic uint16
-	sem_pad1  [3]uint64
-	sem_pad2  [2]uint64
-}
-
-type sigaltstackt struct {
-	ss_sp     *byte
-	ss_size   uint64
-	ss_flags  int32
-	pad_cgo_0 [4]byte
-}
-
-type sigset struct {
-	__sigbits [4]uint32
-}
-
-type stackt struct {
-	ss_sp     *byte
-	ss_size   uint64
-	ss_flags  int32
-	pad_cgo_0 [4]byte
-}
-
-type siginfo struct {
-	si_signo int32
-	si_code  int32
-	si_errno int32
-	si_pad   int32
-	__data   [240]byte
-}
-
-type sigactiont struct {
-	sa_flags  int32
-	pad_cgo_0 [4]byte
-	_funcptr  [8]byte
-	sa_mask   sigset
-}
-
-type fpregset struct {
-	fp_reg_set [528]byte
-}
-
-type mcontext struct {
-	gregs  [28]int64
-	fpregs fpregset
-}
-
-type ucontext struct {
-	uc_flags    uint64
-	uc_link     *ucontext
-	uc_sigmask  sigset
-	uc_stack    stackt
-	pad_cgo_0   [8]byte
-	uc_mcontext mcontext
-	uc_filler   [5]int64
-	pad_cgo_1   [8]byte
-}
-
-type timespec struct {
-	tv_sec  int64
-	tv_nsec int64
-}
-
-type timeval struct {
-	tv_sec  int64
-	tv_usec int64
-}
-
-func (tv *timeval) set_usec(x int32) {
-	tv.tv_usec = int64(x)
-}
-
-type itimerval struct {
-	it_interval timeval
-	it_value    timeval
-}
-
-type portevent struct {
-	portev_events int32
-	portev_source uint16
-	portev_pad    uint16
-	portev_object uint64
-	portev_user   *byte
-}
-
-type pthread uint32
-type pthreadattr struct {
-	__pthread_attrp *byte
-}
-
-type stat struct {
-	st_dev     uint64
-	st_ino     uint64
-	st_mode    uint32
-	st_nlink   uint32
-	st_uid     uint32
-	st_gid     uint32
-	st_rdev    uint64
-	st_size    int64
-	st_atim    timespec
-	st_mtim    timespec
-	st_ctim    timespec
-	st_blksize int32
-	pad_cgo_0  [4]byte
-	st_blocks  int64
-	st_fstype  [16]int8
-}
-
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_solaris.go defs_solaris_amd64.go
-
-const (
-	_REG_RDI    = 0x8
-	_REG_RSI    = 0x9
-	_REG_RDX    = 0xc
-	_REG_RCX    = 0xd
-	_REG_R8     = 0x7
-	_REG_R9     = 0x6
-	_REG_R10    = 0x5
-	_REG_R11    = 0x4
-	_REG_R12    = 0x3
-	_REG_R13    = 0x2
-	_REG_R14    = 0x1
-	_REG_R15    = 0x0
-	_REG_RBP    = 0xa
-	_REG_RBX    = 0xb
-	_REG_RAX    = 0xe
-	_REG_GS     = 0x17
-	_REG_FS     = 0x16
-	_REG_ES     = 0x18
-	_REG_DS     = 0x19
-	_REG_TRAPNO = 0xf
-	_REG_ERR    = 0x10
-	_REG_RIP    = 0x11
-	_REG_CS     = 0x12
-	_REG_RFLAGS = 0x13
-	_REG_RSP    = 0x14
-	_REG_SS     = 0x15
-)
diff --git a/src/runtime/defs3_linux.go b/src/runtime/defs3_linux.go
deleted file mode 100644
index 489c130..0000000
--- a/src/runtime/defs3_linux.go
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-/*
-Input to cgo -cdefs
-
-GOARCH=ppc64 cgo -cdefs defs_linux.go defs3_linux.go > defs_linux_ppc64.h
-*/
-
-package runtime
-
-/*
-#define size_t __kernel_size_t
-#define sigset_t __sigset_t // rename the sigset_t here otherwise cgo will complain about "inconsistent definitions for C.sigset_t"
-#define	_SYS_TYPES_H	// avoid inclusion of sys/types.h
-#include <asm/ucontext.h>
-#include <asm-generic/fcntl.h>
-*/
-import "C"
-
-const (
-	O_RDONLY    = C.O_RDONLY
-	O_CLOEXEC   = C.O_CLOEXEC
-	SA_RESTORER = 0 // unused
-)
-
-type Usigset C.__sigset_t
-
-// types used in sigcontext
-type Ptregs C.struct_pt_regs
-type Gregset C.elf_gregset_t
-type FPregset C.elf_fpregset_t
-type Vreg C.elf_vrreg_t
-
-type SigaltstackT C.struct_sigaltstack
-
-// PPC64 uses sigcontext in place of mcontext in ucontext.
-// see http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/include/uapi/asm/ucontext.h
-type Sigcontext C.struct_sigcontext
-type Ucontext C.struct_ucontext
diff --git a/src/runtime/defs_darwin_386.go b/src/runtime/defs_darwin_386.go
deleted file mode 100644
index e051301..0000000
--- a/src/runtime/defs_darwin_386.go
+++ /dev/null
@@ -1,382 +0,0 @@
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_darwin.go
-
-package runtime
-
-import "unsafe"
-
-const (
-	_EINTR  = 0x4
-	_EFAULT = 0xe
-
-	_PROT_NONE  = 0x0
-	_PROT_READ  = 0x1
-	_PROT_WRITE = 0x2
-	_PROT_EXEC  = 0x4
-
-	_MAP_ANON    = 0x1000
-	_MAP_PRIVATE = 0x2
-	_MAP_FIXED   = 0x10
-
-	_MADV_DONTNEED = 0x4
-	_MADV_FREE     = 0x5
-
-	_MACH_MSG_TYPE_MOVE_RECEIVE   = 0x10
-	_MACH_MSG_TYPE_MOVE_SEND      = 0x11
-	_MACH_MSG_TYPE_MOVE_SEND_ONCE = 0x12
-	_MACH_MSG_TYPE_COPY_SEND      = 0x13
-	_MACH_MSG_TYPE_MAKE_SEND      = 0x14
-	_MACH_MSG_TYPE_MAKE_SEND_ONCE = 0x15
-	_MACH_MSG_TYPE_COPY_RECEIVE   = 0x16
-
-	_MACH_MSG_PORT_DESCRIPTOR         = 0x0
-	_MACH_MSG_OOL_DESCRIPTOR          = 0x1
-	_MACH_MSG_OOL_PORTS_DESCRIPTOR    = 0x2
-	_MACH_MSG_OOL_VOLATILE_DESCRIPTOR = 0x3
-
-	_MACH_MSGH_BITS_COMPLEX = 0x80000000
-
-	_MACH_SEND_MSG  = 0x1
-	_MACH_RCV_MSG   = 0x2
-	_MACH_RCV_LARGE = 0x4
-
-	_MACH_SEND_TIMEOUT   = 0x10
-	_MACH_SEND_INTERRUPT = 0x40
-	_MACH_SEND_ALWAYS    = 0x10000
-	_MACH_SEND_TRAILER   = 0x20000
-	_MACH_RCV_TIMEOUT    = 0x100
-	_MACH_RCV_NOTIFY     = 0x200
-	_MACH_RCV_INTERRUPT  = 0x400
-	_MACH_RCV_OVERWRITE  = 0x1000
-
-	_NDR_PROTOCOL_2_0      = 0x0
-	_NDR_INT_BIG_ENDIAN    = 0x0
-	_NDR_INT_LITTLE_ENDIAN = 0x1
-	_NDR_FLOAT_IEEE        = 0x0
-	_NDR_CHAR_ASCII        = 0x0
-
-	_SA_SIGINFO   = 0x40
-	_SA_RESTART   = 0x2
-	_SA_ONSTACK   = 0x1
-	_SA_USERTRAMP = 0x100
-	_SA_64REGSET  = 0x200
-
-	_SIGHUP    = 0x1
-	_SIGINT    = 0x2
-	_SIGQUIT   = 0x3
-	_SIGILL    = 0x4
-	_SIGTRAP   = 0x5
-	_SIGABRT   = 0x6
-	_SIGEMT    = 0x7
-	_SIGFPE    = 0x8
-	_SIGKILL   = 0x9
-	_SIGBUS    = 0xa
-	_SIGSEGV   = 0xb
-	_SIGSYS    = 0xc
-	_SIGPIPE   = 0xd
-	_SIGALRM   = 0xe
-	_SIGTERM   = 0xf
-	_SIGURG    = 0x10
-	_SIGSTOP   = 0x11
-	_SIGTSTP   = 0x12
-	_SIGCONT   = 0x13
-	_SIGCHLD   = 0x14
-	_SIGTTIN   = 0x15
-	_SIGTTOU   = 0x16
-	_SIGIO     = 0x17
-	_SIGXCPU   = 0x18
-	_SIGXFSZ   = 0x19
-	_SIGVTALRM = 0x1a
-	_SIGPROF   = 0x1b
-	_SIGWINCH  = 0x1c
-	_SIGINFO   = 0x1d
-	_SIGUSR1   = 0x1e
-	_SIGUSR2   = 0x1f
-
-	_FPE_INTDIV = 0x7
-	_FPE_INTOVF = 0x8
-	_FPE_FLTDIV = 0x1
-	_FPE_FLTOVF = 0x2
-	_FPE_FLTUND = 0x3
-	_FPE_FLTRES = 0x4
-	_FPE_FLTINV = 0x5
-	_FPE_FLTSUB = 0x6
-
-	_BUS_ADRALN = 0x1
-	_BUS_ADRERR = 0x2
-	_BUS_OBJERR = 0x3
-
-	_SEGV_MAPERR = 0x1
-	_SEGV_ACCERR = 0x2
-
-	_ITIMER_REAL    = 0x0
-	_ITIMER_VIRTUAL = 0x1
-	_ITIMER_PROF    = 0x2
-
-	_EV_ADD       = 0x1
-	_EV_DELETE    = 0x2
-	_EV_CLEAR     = 0x20
-	_EV_RECEIPT   = 0x40
-	_EV_ERROR     = 0x4000
-	_EVFILT_READ  = -0x1
-	_EVFILT_WRITE = -0x2
-)
-
-type machbody struct {
-	msgh_descriptor_count uint32
-}
-
-type machheader struct {
-	msgh_bits        uint32
-	msgh_size        uint32
-	msgh_remote_port uint32
-	msgh_local_port  uint32
-	msgh_reserved    uint32
-	msgh_id          int32
-}
-
-type machndr struct {
-	mig_vers     uint8
-	if_vers      uint8
-	reserved1    uint8
-	mig_encoding uint8
-	int_rep      uint8
-	char_rep     uint8
-	float_rep    uint8
-	reserved2    uint8
-}
-
-type machport struct {
-	name        uint32
-	pad1        uint32
-	pad2        uint16
-	disposition uint8
-	_type       uint8
-}
-
-type stackt struct {
-	ss_sp    *byte
-	ss_size  uintptr
-	ss_flags int32
-}
-
-type sigactiont struct {
-	__sigaction_u [4]byte
-	sa_tramp      unsafe.Pointer
-	sa_mask       uint32
-	sa_flags      int32
-}
-
-type siginfo struct {
-	si_signo  int32
-	si_errno  int32
-	si_code   int32
-	si_pid    int32
-	si_uid    uint32
-	si_status int32
-	si_addr   uint32
-	si_value  [4]byte
-	si_band   int32
-	__pad     [7]uint32
-}
-
-type timeval struct {
-	tv_sec  int32
-	tv_usec int32
-}
-
-func (tv *timeval) set_usec(x int32) {
-	tv.tv_usec = x
-}
-
-type itimerval struct {
-	it_interval timeval
-	it_value    timeval
-}
-
-type timespec struct {
-	tv_sec  int32
-	tv_nsec int32
-}
-
-type fpcontrol struct {
-	pad_cgo_0 [2]byte
-}
-
-type fpstatus struct {
-	pad_cgo_0 [2]byte
-}
-
-type regmmst struct {
-	mmst_reg  [10]int8
-	mmst_rsrv [6]int8
-}
-
-type regxmm struct {
-	xmm_reg [16]int8
-}
-
-type regs64 struct {
-	rax    uint64
-	rbx    uint64
-	rcx    uint64
-	rdx    uint64
-	rdi    uint64
-	rsi    uint64
-	rbp    uint64
-	rsp    uint64
-	r8     uint64
-	r9     uint64
-	r10    uint64
-	r11    uint64
-	r12    uint64
-	r13    uint64
-	r14    uint64
-	r15    uint64
-	rip    uint64
-	rflags uint64
-	cs     uint64
-	fs     uint64
-	gs     uint64
-}
-
-type floatstate64 struct {
-	fpu_reserved  [2]int32
-	fpu_fcw       fpcontrol
-	fpu_fsw       fpstatus
-	fpu_ftw       uint8
-	fpu_rsrv1     uint8
-	fpu_fop       uint16
-	fpu_ip        uint32
-	fpu_cs        uint16
-	fpu_rsrv2     uint16
-	fpu_dp        uint32
-	fpu_ds        uint16
-	fpu_rsrv3     uint16
-	fpu_mxcsr     uint32
-	fpu_mxcsrmask uint32
-	fpu_stmm0     regmmst
-	fpu_stmm1     regmmst
-	fpu_stmm2     regmmst
-	fpu_stmm3     regmmst
-	fpu_stmm4     regmmst
-	fpu_stmm5     regmmst
-	fpu_stmm6     regmmst
-	fpu_stmm7     regmmst
-	fpu_xmm0      regxmm
-	fpu_xmm1      regxmm
-	fpu_xmm2      regxmm
-	fpu_xmm3      regxmm
-	fpu_xmm4      regxmm
-	fpu_xmm5      regxmm
-	fpu_xmm6      regxmm
-	fpu_xmm7      regxmm
-	fpu_xmm8      regxmm
-	fpu_xmm9      regxmm
-	fpu_xmm10     regxmm
-	fpu_xmm11     regxmm
-	fpu_xmm12     regxmm
-	fpu_xmm13     regxmm
-	fpu_xmm14     regxmm
-	fpu_xmm15     regxmm
-	fpu_rsrv4     [96]int8
-	fpu_reserved1 int32
-}
-
-type exceptionstate64 struct {
-	trapno     uint16
-	cpu        uint16
-	err        uint32
-	faultvaddr uint64
-}
-
-type mcontext64 struct {
-	es exceptionstate64
-	ss regs64
-	fs floatstate64
-}
-
-type regs32 struct {
-	eax    uint32
-	ebx    uint32
-	ecx    uint32
-	edx    uint32
-	edi    uint32
-	esi    uint32
-	ebp    uint32
-	esp    uint32
-	ss     uint32
-	eflags uint32
-	eip    uint32
-	cs     uint32
-	ds     uint32
-	es     uint32
-	fs     uint32
-	gs     uint32
-}
-
-type floatstate32 struct {
-	fpu_reserved  [2]int32
-	fpu_fcw       fpcontrol
-	fpu_fsw       fpstatus
-	fpu_ftw       uint8
-	fpu_rsrv1     uint8
-	fpu_fop       uint16
-	fpu_ip        uint32
-	fpu_cs        uint16
-	fpu_rsrv2     uint16
-	fpu_dp        uint32
-	fpu_ds        uint16
-	fpu_rsrv3     uint16
-	fpu_mxcsr     uint32
-	fpu_mxcsrmask uint32
-	fpu_stmm0     regmmst
-	fpu_stmm1     regmmst
-	fpu_stmm2     regmmst
-	fpu_stmm3     regmmst
-	fpu_stmm4     regmmst
-	fpu_stmm5     regmmst
-	fpu_stmm6     regmmst
-	fpu_stmm7     regmmst
-	fpu_xmm0      regxmm
-	fpu_xmm1      regxmm
-	fpu_xmm2      regxmm
-	fpu_xmm3      regxmm
-	fpu_xmm4      regxmm
-	fpu_xmm5      regxmm
-	fpu_xmm6      regxmm
-	fpu_xmm7      regxmm
-	fpu_rsrv4     [224]int8
-	fpu_reserved1 int32
-}
-
-type exceptionstate32 struct {
-	trapno     uint16
-	cpu        uint16
-	err        uint32
-	faultvaddr uint32
-}
-
-type mcontext32 struct {
-	es exceptionstate32
-	ss regs32
-	fs floatstate32
-}
-
-type ucontext struct {
-	uc_onstack  int32
-	uc_sigmask  uint32
-	uc_stack    stackt
-	uc_link     *ucontext
-	uc_mcsize   uint32
-	uc_mcontext *mcontext32
-}
-
-type keventt struct {
-	ident  uint32
-	filter int16
-	flags  uint16
-	fflags uint32
-	data   int32
-	udata  *byte
-}
diff --git a/src/runtime/defs_darwin_amd64.go b/src/runtime/defs_darwin_amd64.go
deleted file mode 100644
index d9d9fc5..0000000
--- a/src/runtime/defs_darwin_amd64.go
+++ /dev/null
@@ -1,385 +0,0 @@
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_darwin.go
-
-package runtime
-
-import "unsafe"
-
-const (
-	_EINTR  = 0x4
-	_EFAULT = 0xe
-
-	_PROT_NONE  = 0x0
-	_PROT_READ  = 0x1
-	_PROT_WRITE = 0x2
-	_PROT_EXEC  = 0x4
-
-	_MAP_ANON    = 0x1000
-	_MAP_PRIVATE = 0x2
-	_MAP_FIXED   = 0x10
-
-	_MADV_DONTNEED = 0x4
-	_MADV_FREE     = 0x5
-
-	_MACH_MSG_TYPE_MOVE_RECEIVE   = 0x10
-	_MACH_MSG_TYPE_MOVE_SEND      = 0x11
-	_MACH_MSG_TYPE_MOVE_SEND_ONCE = 0x12
-	_MACH_MSG_TYPE_COPY_SEND      = 0x13
-	_MACH_MSG_TYPE_MAKE_SEND      = 0x14
-	_MACH_MSG_TYPE_MAKE_SEND_ONCE = 0x15
-	_MACH_MSG_TYPE_COPY_RECEIVE   = 0x16
-
-	_MACH_MSG_PORT_DESCRIPTOR         = 0x0
-	_MACH_MSG_OOL_DESCRIPTOR          = 0x1
-	_MACH_MSG_OOL_PORTS_DESCRIPTOR    = 0x2
-	_MACH_MSG_OOL_VOLATILE_DESCRIPTOR = 0x3
-
-	_MACH_MSGH_BITS_COMPLEX = 0x80000000
-
-	_MACH_SEND_MSG  = 0x1
-	_MACH_RCV_MSG   = 0x2
-	_MACH_RCV_LARGE = 0x4
-
-	_MACH_SEND_TIMEOUT   = 0x10
-	_MACH_SEND_INTERRUPT = 0x40
-	_MACH_SEND_ALWAYS    = 0x10000
-	_MACH_SEND_TRAILER   = 0x20000
-	_MACH_RCV_TIMEOUT    = 0x100
-	_MACH_RCV_NOTIFY     = 0x200
-	_MACH_RCV_INTERRUPT  = 0x400
-	_MACH_RCV_OVERWRITE  = 0x1000
-
-	_NDR_PROTOCOL_2_0      = 0x0
-	_NDR_INT_BIG_ENDIAN    = 0x0
-	_NDR_INT_LITTLE_ENDIAN = 0x1
-	_NDR_FLOAT_IEEE        = 0x0
-	_NDR_CHAR_ASCII        = 0x0
-
-	_SA_SIGINFO   = 0x40
-	_SA_RESTART   = 0x2
-	_SA_ONSTACK   = 0x1
-	_SA_USERTRAMP = 0x100
-	_SA_64REGSET  = 0x200
-
-	_SIGHUP    = 0x1
-	_SIGINT    = 0x2
-	_SIGQUIT   = 0x3
-	_SIGILL    = 0x4
-	_SIGTRAP   = 0x5
-	_SIGABRT   = 0x6
-	_SIGEMT    = 0x7
-	_SIGFPE    = 0x8
-	_SIGKILL   = 0x9
-	_SIGBUS    = 0xa
-	_SIGSEGV   = 0xb
-	_SIGSYS    = 0xc
-	_SIGPIPE   = 0xd
-	_SIGALRM   = 0xe
-	_SIGTERM   = 0xf
-	_SIGURG    = 0x10
-	_SIGSTOP   = 0x11
-	_SIGTSTP   = 0x12
-	_SIGCONT   = 0x13
-	_SIGCHLD   = 0x14
-	_SIGTTIN   = 0x15
-	_SIGTTOU   = 0x16
-	_SIGIO     = 0x17
-	_SIGXCPU   = 0x18
-	_SIGXFSZ   = 0x19
-	_SIGVTALRM = 0x1a
-	_SIGPROF   = 0x1b
-	_SIGWINCH  = 0x1c
-	_SIGINFO   = 0x1d
-	_SIGUSR1   = 0x1e
-	_SIGUSR2   = 0x1f
-
-	_FPE_INTDIV = 0x7
-	_FPE_INTOVF = 0x8
-	_FPE_FLTDIV = 0x1
-	_FPE_FLTOVF = 0x2
-	_FPE_FLTUND = 0x3
-	_FPE_FLTRES = 0x4
-	_FPE_FLTINV = 0x5
-	_FPE_FLTSUB = 0x6
-
-	_BUS_ADRALN = 0x1
-	_BUS_ADRERR = 0x2
-	_BUS_OBJERR = 0x3
-
-	_SEGV_MAPERR = 0x1
-	_SEGV_ACCERR = 0x2
-
-	_ITIMER_REAL    = 0x0
-	_ITIMER_VIRTUAL = 0x1
-	_ITIMER_PROF    = 0x2
-
-	_EV_ADD       = 0x1
-	_EV_DELETE    = 0x2
-	_EV_CLEAR     = 0x20
-	_EV_RECEIPT   = 0x40
-	_EV_ERROR     = 0x4000
-	_EVFILT_READ  = -0x1
-	_EVFILT_WRITE = -0x2
-)
-
-type machbody struct {
-	msgh_descriptor_count uint32
-}
-
-type machheader struct {
-	msgh_bits        uint32
-	msgh_size        uint32
-	msgh_remote_port uint32
-	msgh_local_port  uint32
-	msgh_reserved    uint32
-	msgh_id          int32
-}
-
-type machndr struct {
-	mig_vers     uint8
-	if_vers      uint8
-	reserved1    uint8
-	mig_encoding uint8
-	int_rep      uint8
-	char_rep     uint8
-	float_rep    uint8
-	reserved2    uint8
-}
-
-type machport struct {
-	name        uint32
-	pad1        uint32
-	pad2        uint16
-	disposition uint8
-	_type       uint8
-}
-
-type stackt struct {
-	ss_sp     *byte
-	ss_size   uintptr
-	ss_flags  int32
-	pad_cgo_0 [4]byte
-}
-
-type sigactiont struct {
-	__sigaction_u [8]byte
-	sa_tramp      unsafe.Pointer
-	sa_mask       uint32
-	sa_flags      int32
-}
-
-type siginfo struct {
-	si_signo  int32
-	si_errno  int32
-	si_code   int32
-	si_pid    int32
-	si_uid    uint32
-	si_status int32
-	si_addr   uint64
-	si_value  [8]byte
-	si_band   int64
-	__pad     [7]uint64
-}
-
-type timeval struct {
-	tv_sec    int64
-	tv_usec   int32
-	pad_cgo_0 [4]byte
-}
-
-func (tv *timeval) set_usec(x int32) {
-	tv.tv_usec = x
-}
-
-type itimerval struct {
-	it_interval timeval
-	it_value    timeval
-}
-
-type timespec struct {
-	tv_sec  int64
-	tv_nsec int64
-}
-
-type fpcontrol struct {
-	pad_cgo_0 [2]byte
-}
-
-type fpstatus struct {
-	pad_cgo_0 [2]byte
-}
-
-type regmmst struct {
-	mmst_reg  [10]int8
-	mmst_rsrv [6]int8
-}
-
-type regxmm struct {
-	xmm_reg [16]int8
-}
-
-type regs64 struct {
-	rax    uint64
-	rbx    uint64
-	rcx    uint64
-	rdx    uint64
-	rdi    uint64
-	rsi    uint64
-	rbp    uint64
-	rsp    uint64
-	r8     uint64
-	r9     uint64
-	r10    uint64
-	r11    uint64
-	r12    uint64
-	r13    uint64
-	r14    uint64
-	r15    uint64
-	rip    uint64
-	rflags uint64
-	cs     uint64
-	fs     uint64
-	gs     uint64
-}
-
-type floatstate64 struct {
-	fpu_reserved  [2]int32
-	fpu_fcw       fpcontrol
-	fpu_fsw       fpstatus
-	fpu_ftw       uint8
-	fpu_rsrv1     uint8
-	fpu_fop       uint16
-	fpu_ip        uint32
-	fpu_cs        uint16
-	fpu_rsrv2     uint16
-	fpu_dp        uint32
-	fpu_ds        uint16
-	fpu_rsrv3     uint16
-	fpu_mxcsr     uint32
-	fpu_mxcsrmask uint32
-	fpu_stmm0     regmmst
-	fpu_stmm1     regmmst
-	fpu_stmm2     regmmst
-	fpu_stmm3     regmmst
-	fpu_stmm4     regmmst
-	fpu_stmm5     regmmst
-	fpu_stmm6     regmmst
-	fpu_stmm7     regmmst
-	fpu_xmm0      regxmm
-	fpu_xmm1      regxmm
-	fpu_xmm2      regxmm
-	fpu_xmm3      regxmm
-	fpu_xmm4      regxmm
-	fpu_xmm5      regxmm
-	fpu_xmm6      regxmm
-	fpu_xmm7      regxmm
-	fpu_xmm8      regxmm
-	fpu_xmm9      regxmm
-	fpu_xmm10     regxmm
-	fpu_xmm11     regxmm
-	fpu_xmm12     regxmm
-	fpu_xmm13     regxmm
-	fpu_xmm14     regxmm
-	fpu_xmm15     regxmm
-	fpu_rsrv4     [96]int8
-	fpu_reserved1 int32
-}
-
-type exceptionstate64 struct {
-	trapno     uint16
-	cpu        uint16
-	err        uint32
-	faultvaddr uint64
-}
-
-type mcontext64 struct {
-	es        exceptionstate64
-	ss        regs64
-	fs        floatstate64
-	pad_cgo_0 [4]byte
-}
-
-type regs32 struct {
-	eax    uint32
-	ebx    uint32
-	ecx    uint32
-	edx    uint32
-	edi    uint32
-	esi    uint32
-	ebp    uint32
-	esp    uint32
-	ss     uint32
-	eflags uint32
-	eip    uint32
-	cs     uint32
-	ds     uint32
-	es     uint32
-	fs     uint32
-	gs     uint32
-}
-
-type floatstate32 struct {
-	fpu_reserved  [2]int32
-	fpu_fcw       fpcontrol
-	fpu_fsw       fpstatus
-	fpu_ftw       uint8
-	fpu_rsrv1     uint8
-	fpu_fop       uint16
-	fpu_ip        uint32
-	fpu_cs        uint16
-	fpu_rsrv2     uint16
-	fpu_dp        uint32
-	fpu_ds        uint16
-	fpu_rsrv3     uint16
-	fpu_mxcsr     uint32
-	fpu_mxcsrmask uint32
-	fpu_stmm0     regmmst
-	fpu_stmm1     regmmst
-	fpu_stmm2     regmmst
-	fpu_stmm3     regmmst
-	fpu_stmm4     regmmst
-	fpu_stmm5     regmmst
-	fpu_stmm6     regmmst
-	fpu_stmm7     regmmst
-	fpu_xmm0      regxmm
-	fpu_xmm1      regxmm
-	fpu_xmm2      regxmm
-	fpu_xmm3      regxmm
-	fpu_xmm4      regxmm
-	fpu_xmm5      regxmm
-	fpu_xmm6      regxmm
-	fpu_xmm7      regxmm
-	fpu_rsrv4     [224]int8
-	fpu_reserved1 int32
-}
-
-type exceptionstate32 struct {
-	trapno     uint16
-	cpu        uint16
-	err        uint32
-	faultvaddr uint32
-}
-
-type mcontext32 struct {
-	es exceptionstate32
-	ss regs32
-	fs floatstate32
-}
-
-type ucontext struct {
-	uc_onstack  int32
-	uc_sigmask  uint32
-	uc_stack    stackt
-	uc_link     *ucontext
-	uc_mcsize   uint64
-	uc_mcontext *mcontext64
-}
-
-type keventt struct {
-	ident  uint64
-	filter int16
-	flags  uint16
-	fflags uint32
-	data   int64
-	udata  *byte
-}
diff --git a/src/runtime/defs_darwin_arm.go b/src/runtime/defs_darwin_arm.go
deleted file mode 100644
index b53336c..0000000
--- a/src/runtime/defs_darwin_arm.go
+++ /dev/null
@@ -1,245 +0,0 @@
-// Note: cgo can't handle some Darwin/ARM structures, so this file can't
-// be auto generated by cgo yet.
-// Created based on output of `cgo -cdefs defs_darwin.go` and Darwin/ARM
-// specific header (mainly mcontext and ucontext related stuff)
-
-package runtime
-
-import "unsafe"
-
-const (
-	_EINTR  = 0x4
-	_EFAULT = 0xe
-
-	_PROT_NONE  = 0x0
-	_PROT_READ  = 0x1
-	_PROT_WRITE = 0x2
-	_PROT_EXEC  = 0x4
-
-	_MAP_ANON    = 0x1000
-	_MAP_PRIVATE = 0x2
-	_MAP_FIXED   = 0x10
-
-	_MADV_DONTNEED = 0x4
-	_MADV_FREE     = 0x5
-
-	_MACH_MSG_TYPE_MOVE_RECEIVE   = 0x10
-	_MACH_MSG_TYPE_MOVE_SEND      = 0x11
-	_MACH_MSG_TYPE_MOVE_SEND_ONCE = 0x12
-	_MACH_MSG_TYPE_COPY_SEND      = 0x13
-	_MACH_MSG_TYPE_MAKE_SEND      = 0x14
-	_MACH_MSG_TYPE_MAKE_SEND_ONCE = 0x15
-	_MACH_MSG_TYPE_COPY_RECEIVE   = 0x16
-
-	_MACH_MSG_PORT_DESCRIPTOR         = 0x0
-	_MACH_MSG_OOL_DESCRIPTOR          = 0x1
-	_MACH_MSG_OOL_PORTS_DESCRIPTOR    = 0x2
-	_MACH_MSG_OOL_VOLATILE_DESCRIPTOR = 0x3
-
-	_MACH_MSGH_BITS_COMPLEX = 0x80000000
-
-	_MACH_SEND_MSG  = 0x1
-	_MACH_RCV_MSG   = 0x2
-	_MACH_RCV_LARGE = 0x4
-
-	_MACH_SEND_TIMEOUT   = 0x10
-	_MACH_SEND_INTERRUPT = 0x40
-	_MACH_SEND_ALWAYS    = 0x10000
-	_MACH_SEND_TRAILER   = 0x20000
-	_MACH_RCV_TIMEOUT    = 0x100
-	_MACH_RCV_NOTIFY     = 0x200
-	_MACH_RCV_INTERRUPT  = 0x400
-	_MACH_RCV_OVERWRITE  = 0x1000
-
-	_NDR_PROTOCOL_2_0      = 0x0
-	_NDR_INT_BIG_ENDIAN    = 0x0
-	_NDR_INT_LITTLE_ENDIAN = 0x1
-	_NDR_FLOAT_IEEE        = 0x0
-	_NDR_CHAR_ASCII        = 0x0
-
-	_SA_SIGINFO   = 0x40
-	_SA_RESTART   = 0x2
-	_SA_ONSTACK   = 0x1
-	_SA_USERTRAMP = 0x100
-	_SA_64REGSET  = 0x200
-
-	_SIGHUP    = 0x1
-	_SIGINT    = 0x2
-	_SIGQUIT   = 0x3
-	_SIGILL    = 0x4
-	_SIGTRAP   = 0x5
-	_SIGABRT   = 0x6
-	_SIGEMT    = 0x7
-	_SIGFPE    = 0x8
-	_SIGKILL   = 0x9
-	_SIGBUS    = 0xa
-	_SIGSEGV   = 0xb
-	_SIGSYS    = 0xc
-	_SIGPIPE   = 0xd
-	_SIGALRM   = 0xe
-	_SIGTERM   = 0xf
-	_SIGURG    = 0x10
-	_SIGSTOP   = 0x11
-	_SIGTSTP   = 0x12
-	_SIGCONT   = 0x13
-	_SIGCHLD   = 0x14
-	_SIGTTIN   = 0x15
-	_SIGTTOU   = 0x16
-	_SIGIO     = 0x17
-	_SIGXCPU   = 0x18
-	_SIGXFSZ   = 0x19
-	_SIGVTALRM = 0x1a
-	_SIGPROF   = 0x1b
-	_SIGWINCH  = 0x1c
-	_SIGINFO   = 0x1d
-	_SIGUSR1   = 0x1e
-	_SIGUSR2   = 0x1f
-
-	_FPE_INTDIV = 0x7
-	_FPE_INTOVF = 0x8
-	_FPE_FLTDIV = 0x1
-	_FPE_FLTOVF = 0x2
-	_FPE_FLTUND = 0x3
-	_FPE_FLTRES = 0x4
-	_FPE_FLTINV = 0x5
-	_FPE_FLTSUB = 0x6
-
-	_BUS_ADRALN = 0x1
-	_BUS_ADRERR = 0x2
-	_BUS_OBJERR = 0x3
-
-	_SEGV_MAPERR = 0x1
-	_SEGV_ACCERR = 0x2
-
-	_ITIMER_REAL    = 0x0
-	_ITIMER_VIRTUAL = 0x1
-	_ITIMER_PROF    = 0x2
-
-	_EV_ADD       = 0x1
-	_EV_DELETE    = 0x2
-	_EV_CLEAR     = 0x20
-	_EV_RECEIPT   = 0x40
-	_EV_ERROR     = 0x4000
-	_EVFILT_READ  = -0x1
-	_EVFILT_WRITE = -0x2
-)
-
-type machbody struct {
-	msgh_descriptor_count uint32
-}
-
-type machheader struct {
-	msgh_bits        uint32
-	msgh_size        uint32
-	msgh_remote_port uint32
-	msgh_local_port  uint32
-	msgh_reserved    uint32
-	msgh_id          int32
-}
-
-type machndr struct {
-	mig_vers     uint8
-	if_vers      uint8
-	reserved1    uint8
-	mig_encoding uint8
-	int_rep      uint8
-	char_rep     uint8
-	float_rep    uint8
-	reserved2    uint8
-}
-
-type machport struct {
-	name        uint32
-	pad1        uint32
-	pad2        uint16
-	disposition uint8
-	_type       uint8
-}
-
-type stackt struct {
-	ss_sp    *byte
-	ss_size  uintptr
-	ss_flags int32
-}
-
-type sigactiont struct {
-	__sigaction_u [4]byte
-	sa_tramp      unsafe.Pointer
-	sa_mask       uint32
-	sa_flags      int32
-}
-
-type siginfo struct {
-	si_signo  int32
-	si_errno  int32
-	si_code   int32
-	si_pid    int32
-	si_uid    uint32
-	si_status int32
-	si_addr   uint32
-	si_value  [4]byte
-	si_band   int32
-	__pad     [7]uint32
-}
-
-type timeval struct {
-	tv_sec  int32
-	tv_usec int32
-}
-
-func (tv *timeval) set_usec(x int32) {
-	tv.tv_usec = x
-}
-
-type itimerval struct {
-	it_interval timeval
-	it_value    timeval
-}
-
-type timespec struct {
-	tv_sec  int32
-	tv_nsec int32
-}
-
-type floatstate32 struct {
-	r     [32]uint32
-	fpscr uint32
-}
-
-type regs32 struct {
-	r    [13]uint32 // r0 to r12
-	sp   uint32     // r13
-	lr   uint32     // r14
-	pc   uint32     // r15
-	cpsr uint32
-}
-
-type exceptionstate32 struct {
-	trapno     uint32 // NOTE: on 386, the trapno field is split into trapno and cpu
-	err        uint32
-	faultvaddr uint32
-}
-
-type mcontext32 struct {
-	es exceptionstate32
-	ss regs32
-	fs floatstate32
-}
-
-type ucontext struct {
-	uc_onstack  int32
-	uc_sigmask  uint32
-	uc_stack    stackt
-	uc_link     *ucontext
-	uc_mcsize   uint32
-	uc_mcontext *mcontext32
-}
-
-type keventt struct {
-	ident  uint32
-	filter int16
-	flags  uint16
-	fflags uint32
-	data   int32
-	udata  *byte
-}
diff --git a/src/runtime/defs_darwin_arm64.go b/src/runtime/defs_darwin_arm64.go
deleted file mode 100644
index 3cc77c1..0000000
--- a/src/runtime/defs_darwin_arm64.go
+++ /dev/null
@@ -1,248 +0,0 @@
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_darwin.go
-
-package runtime
-
-import "unsafe"
-
-const (
-	_EINTR  = 0x4
-	_EFAULT = 0xe
-
-	_PROT_NONE  = 0x0
-	_PROT_READ  = 0x1
-	_PROT_WRITE = 0x2
-	_PROT_EXEC  = 0x4
-
-	_MAP_ANON    = 0x1000
-	_MAP_PRIVATE = 0x2
-	_MAP_FIXED   = 0x10
-
-	_MADV_DONTNEED = 0x4
-	_MADV_FREE     = 0x5
-
-	_MACH_MSG_TYPE_MOVE_RECEIVE   = 0x10
-	_MACH_MSG_TYPE_MOVE_SEND      = 0x11
-	_MACH_MSG_TYPE_MOVE_SEND_ONCE = 0x12
-	_MACH_MSG_TYPE_COPY_SEND      = 0x13
-	_MACH_MSG_TYPE_MAKE_SEND      = 0x14
-	_MACH_MSG_TYPE_MAKE_SEND_ONCE = 0x15
-	_MACH_MSG_TYPE_COPY_RECEIVE   = 0x16
-
-	_MACH_MSG_PORT_DESCRIPTOR         = 0x0
-	_MACH_MSG_OOL_DESCRIPTOR          = 0x1
-	_MACH_MSG_OOL_PORTS_DESCRIPTOR    = 0x2
-	_MACH_MSG_OOL_VOLATILE_DESCRIPTOR = 0x3
-
-	_MACH_MSGH_BITS_COMPLEX = 0x80000000
-
-	_MACH_SEND_MSG  = 0x1
-	_MACH_RCV_MSG   = 0x2
-	_MACH_RCV_LARGE = 0x4
-
-	_MACH_SEND_TIMEOUT   = 0x10
-	_MACH_SEND_INTERRUPT = 0x40
-	_MACH_SEND_ALWAYS    = 0x10000
-	_MACH_SEND_TRAILER   = 0x20000
-	_MACH_RCV_TIMEOUT    = 0x100
-	_MACH_RCV_NOTIFY     = 0x200
-	_MACH_RCV_INTERRUPT  = 0x400
-	_MACH_RCV_OVERWRITE  = 0x1000
-
-	_NDR_PROTOCOL_2_0      = 0x0
-	_NDR_INT_BIG_ENDIAN    = 0x0
-	_NDR_INT_LITTLE_ENDIAN = 0x1
-	_NDR_FLOAT_IEEE        = 0x0
-	_NDR_CHAR_ASCII        = 0x0
-
-	_SA_SIGINFO   = 0x40
-	_SA_RESTART   = 0x2
-	_SA_ONSTACK   = 0x1
-	_SA_USERTRAMP = 0x100
-	_SA_64REGSET  = 0x200
-
-	_SIGHUP    = 0x1
-	_SIGINT    = 0x2
-	_SIGQUIT   = 0x3
-	_SIGILL    = 0x4
-	_SIGTRAP   = 0x5
-	_SIGABRT   = 0x6
-	_SIGEMT    = 0x7
-	_SIGFPE    = 0x8
-	_SIGKILL   = 0x9
-	_SIGBUS    = 0xa
-	_SIGSEGV   = 0xb
-	_SIGSYS    = 0xc
-	_SIGPIPE   = 0xd
-	_SIGALRM   = 0xe
-	_SIGTERM   = 0xf
-	_SIGURG    = 0x10
-	_SIGSTOP   = 0x11
-	_SIGTSTP   = 0x12
-	_SIGCONT   = 0x13
-	_SIGCHLD   = 0x14
-	_SIGTTIN   = 0x15
-	_SIGTTOU   = 0x16
-	_SIGIO     = 0x17
-	_SIGXCPU   = 0x18
-	_SIGXFSZ   = 0x19
-	_SIGVTALRM = 0x1a
-	_SIGPROF   = 0x1b
-	_SIGWINCH  = 0x1c
-	_SIGINFO   = 0x1d
-	_SIGUSR1   = 0x1e
-	_SIGUSR2   = 0x1f
-
-	_FPE_INTDIV = 0x7
-	_FPE_INTOVF = 0x8
-	_FPE_FLTDIV = 0x1
-	_FPE_FLTOVF = 0x2
-	_FPE_FLTUND = 0x3
-	_FPE_FLTRES = 0x4
-	_FPE_FLTINV = 0x5
-	_FPE_FLTSUB = 0x6
-
-	_BUS_ADRALN = 0x1
-	_BUS_ADRERR = 0x2
-	_BUS_OBJERR = 0x3
-
-	_SEGV_MAPERR = 0x1
-	_SEGV_ACCERR = 0x2
-
-	_ITIMER_REAL    = 0x0
-	_ITIMER_VIRTUAL = 0x1
-	_ITIMER_PROF    = 0x2
-
-	_EV_ADD       = 0x1
-	_EV_DELETE    = 0x2
-	_EV_CLEAR     = 0x20
-	_EV_RECEIPT   = 0x40
-	_EV_ERROR     = 0x4000
-	_EVFILT_READ  = -0x1
-	_EVFILT_WRITE = -0x2
-)
-
-type machbody struct {
-	msgh_descriptor_count uint32
-}
-
-type machheader struct {
-	msgh_bits        uint32
-	msgh_size        uint32
-	msgh_remote_port uint32
-	msgh_local_port  uint32
-	msgh_reserved    uint32
-	msgh_id          int32
-}
-
-type machndr struct {
-	mig_vers     uint8
-	if_vers      uint8
-	reserved1    uint8
-	mig_encoding uint8
-	int_rep      uint8
-	char_rep     uint8
-	float_rep    uint8
-	reserved2    uint8
-}
-
-type machport struct {
-	name        uint32
-	pad1        uint32
-	pad2        uint16
-	disposition uint8
-	_type       uint8
-}
-
-type stackt struct {
-	ss_sp     *byte
-	ss_size   uintptr
-	ss_flags  int32
-	pad_cgo_0 [4]byte
-}
-
-type sigactiont struct {
-	__sigaction_u [8]byte
-	sa_tramp      unsafe.Pointer
-	sa_mask       uint32
-	sa_flags      int32
-}
-
-type siginfo struct {
-	si_signo  int32
-	si_errno  int32
-	si_code   int32
-	si_pid    int32
-	si_uid    uint32
-	si_status int32
-	si_addr   *byte
-	si_value  [8]byte
-	si_band   int64
-	__pad     [7]uint64
-}
-
-type timeval struct {
-	tv_sec    int64
-	tv_usec   int32
-	pad_cgo_0 [4]byte
-}
-
-func (tv *timeval) set_usec(x int32) {
-	tv.tv_usec = x
-}
-
-type itimerval struct {
-	it_interval timeval
-	it_value    timeval
-}
-
-type timespec struct {
-	tv_sec  int64
-	tv_nsec int64
-}
-
-type exceptionstate64 struct {
-	far uint64 // virtual fault addr
-	esr uint32 // exception syndrome
-	exc uint32 // number of arm exception taken
-}
-
-type regs64 struct {
-	x     [29]uint64 // registers x0 to x28
-	fp    uint64     // frame register, x29
-	lr    uint64     // link register, x30
-	sp    uint64     // stack pointer, x31
-	pc    uint64     // program counter
-	cpsr  uint32     // current program status register
-	__pad uint32
-}
-
-type neonstate64 struct {
-	v    [64]uint64 // actually [32]uint128
-	fpsr uint32
-	fpcr uint32
-}
-
-type mcontext64 struct {
-	es exceptionstate64
-	ss regs64
-	ns neonstate64
-}
-
-type ucontext struct {
-	uc_onstack  int32
-	uc_sigmask  uint32
-	uc_stack    stackt
-	uc_link     *ucontext
-	uc_mcsize   uint64
-	uc_mcontext *mcontext64
-}
-
-type keventt struct {
-	ident  uint64
-	filter int16
-	flags  uint16
-	fflags uint32
-	data   int64
-	udata  *byte
-}
diff --git a/src/runtime/defs_dragonfly_amd64.go b/src/runtime/defs_dragonfly_amd64.go
deleted file mode 100644
index 3ac10b0..0000000
--- a/src/runtime/defs_dragonfly_amd64.go
+++ /dev/null
@@ -1,208 +0,0 @@
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_dragonfly.go
-
-package runtime
-
-import "unsafe"
-
-const (
-	_EINTR  = 0x4
-	_EFAULT = 0xe
-	_EBUSY  = 0x10
-	_EAGAIN = 0x23
-
-	_PROT_NONE  = 0x0
-	_PROT_READ  = 0x1
-	_PROT_WRITE = 0x2
-	_PROT_EXEC  = 0x4
-
-	_MAP_ANON    = 0x1000
-	_MAP_PRIVATE = 0x2
-	_MAP_FIXED   = 0x10
-
-	_MADV_FREE = 0x5
-
-	_SA_SIGINFO = 0x40
-	_SA_RESTART = 0x2
-	_SA_ONSTACK = 0x1
-
-	_SIGHUP    = 0x1
-	_SIGINT    = 0x2
-	_SIGQUIT   = 0x3
-	_SIGILL    = 0x4
-	_SIGTRAP   = 0x5
-	_SIGABRT   = 0x6
-	_SIGEMT    = 0x7
-	_SIGFPE    = 0x8
-	_SIGKILL   = 0x9
-	_SIGBUS    = 0xa
-	_SIGSEGV   = 0xb
-	_SIGSYS    = 0xc
-	_SIGPIPE   = 0xd
-	_SIGALRM   = 0xe
-	_SIGTERM   = 0xf
-	_SIGURG    = 0x10
-	_SIGSTOP   = 0x11
-	_SIGTSTP   = 0x12
-	_SIGCONT   = 0x13
-	_SIGCHLD   = 0x14
-	_SIGTTIN   = 0x15
-	_SIGTTOU   = 0x16
-	_SIGIO     = 0x17
-	_SIGXCPU   = 0x18
-	_SIGXFSZ   = 0x19
-	_SIGVTALRM = 0x1a
-	_SIGPROF   = 0x1b
-	_SIGWINCH  = 0x1c
-	_SIGINFO   = 0x1d
-	_SIGUSR1   = 0x1e
-	_SIGUSR2   = 0x1f
-
-	_FPE_INTDIV = 0x2
-	_FPE_INTOVF = 0x1
-	_FPE_FLTDIV = 0x3
-	_FPE_FLTOVF = 0x4
-	_FPE_FLTUND = 0x5
-	_FPE_FLTRES = 0x6
-	_FPE_FLTINV = 0x7
-	_FPE_FLTSUB = 0x8
-
-	_BUS_ADRALN = 0x1
-	_BUS_ADRERR = 0x2
-	_BUS_OBJERR = 0x3
-
-	_SEGV_MAPERR = 0x1
-	_SEGV_ACCERR = 0x2
-
-	_ITIMER_REAL    = 0x0
-	_ITIMER_VIRTUAL = 0x1
-	_ITIMER_PROF    = 0x2
-
-	_EV_ADD       = 0x1
-	_EV_DELETE    = 0x2
-	_EV_CLEAR     = 0x20
-	_EV_ERROR     = 0x4000
-	_EVFILT_READ  = -0x1
-	_EVFILT_WRITE = -0x2
-)
-
-type rtprio struct {
-	_type uint16
-	prio  uint16
-}
-
-type lwpparams struct {
-	start_func uintptr
-	arg        unsafe.Pointer
-	stack      uintptr
-	tid1       unsafe.Pointer // *int32
-	tid2       unsafe.Pointer // *int32
-}
-
-type sigaltstackt struct {
-	ss_sp     uintptr
-	ss_size   uintptr
-	ss_flags  int32
-	pad_cgo_0 [4]byte
-}
-
-type sigset struct {
-	__bits [4]uint32
-}
-
-type stackt struct {
-	ss_sp     uintptr
-	ss_size   uintptr
-	ss_flags  int32
-	pad_cgo_0 [4]byte
-}
-
-type siginfo struct {
-	si_signo  int32
-	si_errno  int32
-	si_code   int32
-	si_pid    int32
-	si_uid    uint32
-	si_status int32
-	si_addr   uint64
-	si_value  [8]byte
-	si_band   int64
-	__spare__ [7]int32
-	pad_cgo_0 [4]byte
-}
-
-type mcontext struct {
-	mc_onstack  uint64
-	mc_rdi      uint64
-	mc_rsi      uint64
-	mc_rdx      uint64
-	mc_rcx      uint64
-	mc_r8       uint64
-	mc_r9       uint64
-	mc_rax      uint64
-	mc_rbx      uint64
-	mc_rbp      uint64
-	mc_r10      uint64
-	mc_r11      uint64
-	mc_r12      uint64
-	mc_r13      uint64
-	mc_r14      uint64
-	mc_r15      uint64
-	mc_xflags   uint64
-	mc_trapno   uint64
-	mc_addr     uint64
-	mc_flags    uint64
-	mc_err      uint64
-	mc_rip      uint64
-	mc_cs       uint64
-	mc_rflags   uint64
-	mc_rsp      uint64
-	mc_ss       uint64
-	mc_len      uint32
-	mc_fpformat uint32
-	mc_ownedfp  uint32
-	mc_reserved uint32
-	mc_unused   [8]uint32
-	mc_fpregs   [256]int32
-}
-
-type ucontext struct {
-	uc_sigmask  sigset
-	pad_cgo_0   [48]byte
-	uc_mcontext mcontext
-	uc_link     *ucontext
-	uc_stack    stackt
-	__spare__   [8]int32
-}
-
-type timespec struct {
-	tv_sec  int64
-	tv_nsec int64
-}
-
-func (ts *timespec) set_sec(x int64) {
-	ts.tv_sec = x
-}
-
-type timeval struct {
-	tv_sec  int64
-	tv_usec int64
-}
-
-func (tv *timeval) set_usec(x int32) {
-	tv.tv_usec = int64(x)
-}
-
-type itimerval struct {
-	it_interval timeval
-	it_value    timeval
-}
-
-type keventt struct {
-	ident  uint64
-	filter int16
-	flags  uint16
-	fflags uint32
-	data   int64
-	udata  *byte
-}
diff --git a/src/runtime/defs_freebsd_386.go b/src/runtime/defs_freebsd_386.go
deleted file mode 100644
index 6938c18..0000000
--- a/src/runtime/defs_freebsd_386.go
+++ /dev/null
@@ -1,213 +0,0 @@
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_freebsd.go
-
-package runtime
-
-import "unsafe"
-
-const (
-	_EINTR  = 0x4
-	_EFAULT = 0xe
-
-	_PROT_NONE  = 0x0
-	_PROT_READ  = 0x1
-	_PROT_WRITE = 0x2
-	_PROT_EXEC  = 0x4
-
-	_MAP_ANON    = 0x1000
-	_MAP_PRIVATE = 0x2
-	_MAP_FIXED   = 0x10
-
-	_MADV_FREE = 0x5
-
-	_SA_SIGINFO = 0x40
-	_SA_RESTART = 0x2
-	_SA_ONSTACK = 0x1
-
-	_UMTX_OP_WAIT_UINT         = 0xb
-	_UMTX_OP_WAIT_UINT_PRIVATE = 0xf
-	_UMTX_OP_WAKE              = 0x3
-	_UMTX_OP_WAKE_PRIVATE      = 0x10
-
-	_SIGHUP    = 0x1
-	_SIGINT    = 0x2
-	_SIGQUIT   = 0x3
-	_SIGILL    = 0x4
-	_SIGTRAP   = 0x5
-	_SIGABRT   = 0x6
-	_SIGEMT    = 0x7
-	_SIGFPE    = 0x8
-	_SIGKILL   = 0x9
-	_SIGBUS    = 0xa
-	_SIGSEGV   = 0xb
-	_SIGSYS    = 0xc
-	_SIGPIPE   = 0xd
-	_SIGALRM   = 0xe
-	_SIGTERM   = 0xf
-	_SIGURG    = 0x10
-	_SIGSTOP   = 0x11
-	_SIGTSTP   = 0x12
-	_SIGCONT   = 0x13
-	_SIGCHLD   = 0x14
-	_SIGTTIN   = 0x15
-	_SIGTTOU   = 0x16
-	_SIGIO     = 0x17
-	_SIGXCPU   = 0x18
-	_SIGXFSZ   = 0x19
-	_SIGVTALRM = 0x1a
-	_SIGPROF   = 0x1b
-	_SIGWINCH  = 0x1c
-	_SIGINFO   = 0x1d
-	_SIGUSR1   = 0x1e
-	_SIGUSR2   = 0x1f
-
-	_FPE_INTDIV = 0x2
-	_FPE_INTOVF = 0x1
-	_FPE_FLTDIV = 0x3
-	_FPE_FLTOVF = 0x4
-	_FPE_FLTUND = 0x5
-	_FPE_FLTRES = 0x6
-	_FPE_FLTINV = 0x7
-	_FPE_FLTSUB = 0x8
-
-	_BUS_ADRALN = 0x1
-	_BUS_ADRERR = 0x2
-	_BUS_OBJERR = 0x3
-
-	_SEGV_MAPERR = 0x1
-	_SEGV_ACCERR = 0x2
-
-	_ITIMER_REAL    = 0x0
-	_ITIMER_VIRTUAL = 0x1
-	_ITIMER_PROF    = 0x2
-
-	_EV_ADD       = 0x1
-	_EV_DELETE    = 0x2
-	_EV_CLEAR     = 0x20
-	_EV_RECEIPT   = 0x40
-	_EV_ERROR     = 0x4000
-	_EVFILT_READ  = -0x1
-	_EVFILT_WRITE = -0x2
-)
-
-type rtprio struct {
-	_type uint16
-	prio  uint16
-}
-
-type thrparam struct {
-	start_func uintptr
-	arg        unsafe.Pointer
-	stack_base uintptr
-	stack_size uintptr
-	tls_base   unsafe.Pointer
-	tls_size   uintptr
-	child_tid  unsafe.Pointer // *int32
-	parent_tid *int32
-	flags      int32
-	rtp        *rtprio
-	spare      [3]uintptr
-}
-
-type sigaltstackt struct {
-	ss_sp    *int8
-	ss_size  uint32
-	ss_flags int32
-}
-
-type sigset struct {
-	__bits [4]uint32
-}
-
-type stackt struct {
-	ss_sp    uintptr
-	ss_size  uintptr
-	ss_flags int32
-}
-
-type siginfo struct {
-	si_signo  int32
-	si_errno  int32
-	si_code   int32
-	si_pid    int32
-	si_uid    uint32
-	si_status int32
-	si_addr   uintptr
-	si_value  [4]byte
-	_reason   [32]byte
-}
-
-type mcontext struct {
-	mc_onstack       uint32
-	mc_gs            uint32
-	mc_fs            uint32
-	mc_es            uint32
-	mc_ds            uint32
-	mc_edi           uint32
-	mc_esi           uint32
-	mc_ebp           uint32
-	mc_isp           uint32
-	mc_ebx           uint32
-	mc_edx           uint32
-	mc_ecx           uint32
-	mc_eax           uint32
-	mc_trapno        uint32
-	mc_err           uint32
-	mc_eip           uint32
-	mc_cs            uint32
-	mc_eflags        uint32
-	mc_esp           uint32
-	mc_ss            uint32
-	mc_len           uint32
-	mc_fpformat      uint32
-	mc_ownedfp       uint32
-	mc_flags         uint32
-	mc_fpstate       [128]uint32
-	mc_fsbase        uint32
-	mc_gsbase        uint32
-	mc_xfpustate     uint32
-	mc_xfpustate_len uint32
-	mc_spare2        [4]uint32
-}
-
-type ucontext struct {
-	uc_sigmask  sigset
-	uc_mcontext mcontext
-	uc_link     *ucontext
-	uc_stack    stackt
-	uc_flags    int32
-	__spare__   [4]int32
-	pad_cgo_0   [12]byte
-}
-
-type timespec struct {
-	tv_sec  int32
-	tv_nsec int32
-}
-
-func (ts *timespec) set_sec(x int64) {
-	ts.tv_sec = int32(x)
-}
-
-type timeval struct {
-	tv_sec  int32
-	tv_usec int32
-}
-
-func (tv *timeval) set_usec(x int32) {
-	tv.tv_usec = x
-}
-
-type itimerval struct {
-	it_interval timeval
-	it_value    timeval
-}
-
-type keventt struct {
-	ident  uint32
-	filter int16
-	flags  uint16
-	fflags uint32
-	data   int32
-	udata  *byte
-}
diff --git a/src/runtime/defs_freebsd_amd64.go b/src/runtime/defs_freebsd_amd64.go
deleted file mode 100644
index de98e7a..0000000
--- a/src/runtime/defs_freebsd_amd64.go
+++ /dev/null
@@ -1,224 +0,0 @@
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_freebsd.go
-
-package runtime
-
-import "unsafe"
-
-const (
-	_EINTR  = 0x4
-	_EFAULT = 0xe
-
-	_PROT_NONE  = 0x0
-	_PROT_READ  = 0x1
-	_PROT_WRITE = 0x2
-	_PROT_EXEC  = 0x4
-
-	_MAP_ANON    = 0x1000
-	_MAP_PRIVATE = 0x2
-	_MAP_FIXED   = 0x10
-
-	_MADV_FREE = 0x5
-
-	_SA_SIGINFO = 0x40
-	_SA_RESTART = 0x2
-	_SA_ONSTACK = 0x1
-
-	_UMTX_OP_WAIT_UINT         = 0xb
-	_UMTX_OP_WAIT_UINT_PRIVATE = 0xf
-	_UMTX_OP_WAKE              = 0x3
-	_UMTX_OP_WAKE_PRIVATE      = 0x10
-
-	_SIGHUP    = 0x1
-	_SIGINT    = 0x2
-	_SIGQUIT   = 0x3
-	_SIGILL    = 0x4
-	_SIGTRAP   = 0x5
-	_SIGABRT   = 0x6
-	_SIGEMT    = 0x7
-	_SIGFPE    = 0x8
-	_SIGKILL   = 0x9
-	_SIGBUS    = 0xa
-	_SIGSEGV   = 0xb
-	_SIGSYS    = 0xc
-	_SIGPIPE   = 0xd
-	_SIGALRM   = 0xe
-	_SIGTERM   = 0xf
-	_SIGURG    = 0x10
-	_SIGSTOP   = 0x11
-	_SIGTSTP   = 0x12
-	_SIGCONT   = 0x13
-	_SIGCHLD   = 0x14
-	_SIGTTIN   = 0x15
-	_SIGTTOU   = 0x16
-	_SIGIO     = 0x17
-	_SIGXCPU   = 0x18
-	_SIGXFSZ   = 0x19
-	_SIGVTALRM = 0x1a
-	_SIGPROF   = 0x1b
-	_SIGWINCH  = 0x1c
-	_SIGINFO   = 0x1d
-	_SIGUSR1   = 0x1e
-	_SIGUSR2   = 0x1f
-
-	_FPE_INTDIV = 0x2
-	_FPE_INTOVF = 0x1
-	_FPE_FLTDIV = 0x3
-	_FPE_FLTOVF = 0x4
-	_FPE_FLTUND = 0x5
-	_FPE_FLTRES = 0x6
-	_FPE_FLTINV = 0x7
-	_FPE_FLTSUB = 0x8
-
-	_BUS_ADRALN = 0x1
-	_BUS_ADRERR = 0x2
-	_BUS_OBJERR = 0x3
-
-	_SEGV_MAPERR = 0x1
-	_SEGV_ACCERR = 0x2
-
-	_ITIMER_REAL    = 0x0
-	_ITIMER_VIRTUAL = 0x1
-	_ITIMER_PROF    = 0x2
-
-	_EV_ADD       = 0x1
-	_EV_DELETE    = 0x2
-	_EV_CLEAR     = 0x20
-	_EV_RECEIPT   = 0x40
-	_EV_ERROR     = 0x4000
-	_EVFILT_READ  = -0x1
-	_EVFILT_WRITE = -0x2
-)
-
-type rtprio struct {
-	_type uint16
-	prio  uint16
-}
-
-type thrparam struct {
-	start_func uintptr
-	arg        unsafe.Pointer
-	stack_base uintptr
-	stack_size uintptr
-	tls_base   unsafe.Pointer
-	tls_size   uintptr
-	child_tid  unsafe.Pointer // *int64
-	parent_tid *int64
-	flags      int32
-	pad_cgo_0  [4]byte
-	rtp        *rtprio
-	spare      [3]uintptr
-}
-
-type sigaltstackt struct {
-	ss_sp     *int8
-	ss_size   uint64
-	ss_flags  int32
-	pad_cgo_0 [4]byte
-}
-
-type sigset struct {
-	__bits [4]uint32
-}
-
-type stackt struct {
-	ss_sp     uintptr
-	ss_size   uintptr
-	ss_flags  int32
-	pad_cgo_0 [4]byte
-}
-
-type siginfo struct {
-	si_signo  int32
-	si_errno  int32
-	si_code   int32
-	si_pid    int32
-	si_uid    uint32
-	si_status int32
-	si_addr   uint64
-	si_value  [8]byte
-	_reason   [40]byte
-}
-
-type mcontext struct {
-	mc_onstack       uint64
-	mc_rdi           uint64
-	mc_rsi           uint64
-	mc_rdx           uint64
-	mc_rcx           uint64
-	mc_r8            uint64
-	mc_r9            uint64
-	mc_rax           uint64
-	mc_rbx           uint64
-	mc_rbp           uint64
-	mc_r10           uint64
-	mc_r11           uint64
-	mc_r12           uint64
-	mc_r13           uint64
-	mc_r14           uint64
-	mc_r15           uint64
-	mc_trapno        uint32
-	mc_fs            uint16
-	mc_gs            uint16
-	mc_addr          uint64
-	mc_flags         uint32
-	mc_es            uint16
-	mc_ds            uint16
-	mc_err           uint64
-	mc_rip           uint64
-	mc_cs            uint64
-	mc_rflags        uint64
-	mc_rsp           uint64
-	mc_ss            uint64
-	mc_len           uint64
-	mc_fpformat      uint64
-	mc_ownedfp       uint64
-	mc_fpstate       [64]uint64
-	mc_fsbase        uint64
-	mc_gsbase        uint64
-	mc_xfpustate     uint64
-	mc_xfpustate_len uint64
-	mc_spare         [4]uint64
-}
-
-type ucontext struct {
-	uc_sigmask  sigset
-	uc_mcontext mcontext
-	uc_link     *ucontext
-	uc_stack    stackt
-	uc_flags    int32
-	__spare__   [4]int32
-	pad_cgo_0   [12]byte
-}
-
-type timespec struct {
-	tv_sec  int64
-	tv_nsec int64
-}
-
-func (ts *timespec) set_sec(x int64) {
-	ts.tv_sec = x
-}
-
-type timeval struct {
-	tv_sec  int64
-	tv_usec int64
-}
-
-func (tv *timeval) set_usec(x int32) {
-	tv.tv_usec = int64(x)
-}
-
-type itimerval struct {
-	it_interval timeval
-	it_value    timeval
-}
-
-type keventt struct {
-	ident  uint64
-	filter int16
-	flags  uint16
-	fflags uint32
-	data   int64
-	udata  *byte
-}
diff --git a/src/runtime/defs_freebsd_arm.go b/src/runtime/defs_freebsd_arm.go
deleted file mode 100644
index 744330f..0000000
--- a/src/runtime/defs_freebsd_arm.go
+++ /dev/null
@@ -1,186 +0,0 @@
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_freebsd.go
-
-package runtime
-
-import "unsafe"
-
-const (
-	_EINTR  = 0x4
-	_EFAULT = 0xe
-
-	_PROT_NONE  = 0x0
-	_PROT_READ  = 0x1
-	_PROT_WRITE = 0x2
-	_PROT_EXEC  = 0x4
-
-	_MAP_ANON    = 0x1000
-	_MAP_PRIVATE = 0x2
-	_MAP_FIXED   = 0x10
-
-	_MADV_FREE = 0x5
-
-	_SA_SIGINFO = 0x40
-	_SA_RESTART = 0x2
-	_SA_ONSTACK = 0x1
-
-	_UMTX_OP_WAIT_UINT         = 0xb
-	_UMTX_OP_WAIT_UINT_PRIVATE = 0xf
-	_UMTX_OP_WAKE              = 0x3
-	_UMTX_OP_WAKE_PRIVATE      = 0x10
-
-	_SIGHUP    = 0x1
-	_SIGINT    = 0x2
-	_SIGQUIT   = 0x3
-	_SIGILL    = 0x4
-	_SIGTRAP   = 0x5
-	_SIGABRT   = 0x6
-	_SIGEMT    = 0x7
-	_SIGFPE    = 0x8
-	_SIGKILL   = 0x9
-	_SIGBUS    = 0xa
-	_SIGSEGV   = 0xb
-	_SIGSYS    = 0xc
-	_SIGPIPE   = 0xd
-	_SIGALRM   = 0xe
-	_SIGTERM   = 0xf
-	_SIGURG    = 0x10
-	_SIGSTOP   = 0x11
-	_SIGTSTP   = 0x12
-	_SIGCONT   = 0x13
-	_SIGCHLD   = 0x14
-	_SIGTTIN   = 0x15
-	_SIGTTOU   = 0x16
-	_SIGIO     = 0x17
-	_SIGXCPU   = 0x18
-	_SIGXFSZ   = 0x19
-	_SIGVTALRM = 0x1a
-	_SIGPROF   = 0x1b
-	_SIGWINCH  = 0x1c
-	_SIGINFO   = 0x1d
-	_SIGUSR1   = 0x1e
-	_SIGUSR2   = 0x1f
-
-	_FPE_INTDIV = 0x2
-	_FPE_INTOVF = 0x1
-	_FPE_FLTDIV = 0x3
-	_FPE_FLTOVF = 0x4
-	_FPE_FLTUND = 0x5
-	_FPE_FLTRES = 0x6
-	_FPE_FLTINV = 0x7
-	_FPE_FLTSUB = 0x8
-
-	_BUS_ADRALN = 0x1
-	_BUS_ADRERR = 0x2
-	_BUS_OBJERR = 0x3
-
-	_SEGV_MAPERR = 0x1
-	_SEGV_ACCERR = 0x2
-
-	_ITIMER_REAL    = 0x0
-	_ITIMER_VIRTUAL = 0x1
-	_ITIMER_PROF    = 0x2
-
-	_EV_ADD       = 0x1
-	_EV_DELETE    = 0x2
-	_EV_CLEAR     = 0x20
-	_EV_RECEIPT   = 0x40
-	_EV_ERROR     = 0x4000
-	_EVFILT_READ  = -0x1
-	_EVFILT_WRITE = -0x2
-)
-
-type rtprio struct {
-	_type uint16
-	prio  uint16
-}
-
-type thrparam struct {
-	start_func uintptr
-	arg        unsafe.Pointer
-	stack_base uintptr
-	stack_size uintptr
-	tls_base   unsafe.Pointer
-	tls_size   uintptr
-	child_tid  unsafe.Pointer // *int32
-	parent_tid *int32
-	flags      int32
-	rtp        *rtprio
-	spare      [3]uintptr
-}
-
-type sigaltstackt struct {
-	ss_sp    *uint8
-	ss_size  uint32
-	ss_flags int32
-}
-
-type sigset struct {
-	__bits [4]uint32
-}
-
-type stackt struct {
-	ss_sp    uintptr
-	ss_size  uintptr
-	ss_flags int32
-}
-
-type siginfo struct {
-	si_signo  int32
-	si_errno  int32
-	si_code   int32
-	si_pid    int32
-	si_uid    uint32
-	si_status int32
-	si_addr   uintptr
-	si_value  [4]byte
-	_reason   [32]byte
-}
-
-type mcontext struct {
-	__gregs [17]uint32
-	__fpu   [140]byte
-}
-
-type ucontext struct {
-	uc_sigmask  sigset
-	uc_mcontext mcontext
-	uc_link     *ucontext
-	uc_stack    stackt
-	uc_flags    int32
-	__spare__   [4]int32
-}
-
-type timespec struct {
-	tv_sec    int64
-	tv_nsec   int32
-	pad_cgo_0 [4]byte
-}
-
-func (ts *timespec) set_sec(x int64) {
-	ts.tv_sec = x
-}
-
-type timeval struct {
-	tv_sec    int64
-	tv_usec   int32
-	pad_cgo_0 [4]byte
-}
-
-func (tv *timeval) set_usec(x int32) {
-	tv.tv_usec = x
-}
-
-type itimerval struct {
-	it_interval timeval
-	it_value    timeval
-}
-
-type keventt struct {
-	ident  uint32
-	filter int16
-	flags  uint16
-	fflags uint32
-	data   int32
-	udata  *byte
-}
diff --git a/src/runtime/defs_linux_386.go b/src/runtime/defs_linux_386.go
deleted file mode 100644
index 7cf57c8..0000000
--- a/src/runtime/defs_linux_386.go
+++ /dev/null
@@ -1,220 +0,0 @@
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs2_linux.go
-
-package runtime
-
-const (
-	_EINTR  = 0x4
-	_EAGAIN = 0xb
-	_ENOMEM = 0xc
-
-	_PROT_NONE  = 0x0
-	_PROT_READ  = 0x1
-	_PROT_WRITE = 0x2
-	_PROT_EXEC  = 0x4
-
-	_MAP_ANON    = 0x20
-	_MAP_PRIVATE = 0x2
-	_MAP_FIXED   = 0x10
-
-	_MADV_DONTNEED   = 0x4
-	_MADV_HUGEPAGE   = 0xe
-	_MADV_NOHUGEPAGE = 0xf
-
-	_SA_RESTART  = 0x10000000
-	_SA_ONSTACK  = 0x8000000
-	_SA_RESTORER = 0x4000000
-	_SA_SIGINFO  = 0x4
-
-	_SIGHUP    = 0x1
-	_SIGINT    = 0x2
-	_SIGQUIT   = 0x3
-	_SIGILL    = 0x4
-	_SIGTRAP   = 0x5
-	_SIGABRT   = 0x6
-	_SIGBUS    = 0x7
-	_SIGFPE    = 0x8
-	_SIGKILL   = 0x9
-	_SIGUSR1   = 0xa
-	_SIGSEGV   = 0xb
-	_SIGUSR2   = 0xc
-	_SIGPIPE   = 0xd
-	_SIGALRM   = 0xe
-	_SIGSTKFLT = 0x10
-	_SIGCHLD   = 0x11
-	_SIGCONT   = 0x12
-	_SIGSTOP   = 0x13
-	_SIGTSTP   = 0x14
-	_SIGTTIN   = 0x15
-	_SIGTTOU   = 0x16
-	_SIGURG    = 0x17
-	_SIGXCPU   = 0x18
-	_SIGXFSZ   = 0x19
-	_SIGVTALRM = 0x1a
-	_SIGPROF   = 0x1b
-	_SIGWINCH  = 0x1c
-	_SIGIO     = 0x1d
-	_SIGPWR    = 0x1e
-	_SIGSYS    = 0x1f
-
-	_FPE_INTDIV = 0x1
-	_FPE_INTOVF = 0x2
-	_FPE_FLTDIV = 0x3
-	_FPE_FLTOVF = 0x4
-	_FPE_FLTUND = 0x5
-	_FPE_FLTRES = 0x6
-	_FPE_FLTINV = 0x7
-	_FPE_FLTSUB = 0x8
-
-	_BUS_ADRALN = 0x1
-	_BUS_ADRERR = 0x2
-	_BUS_OBJERR = 0x3
-
-	_SEGV_MAPERR = 0x1
-	_SEGV_ACCERR = 0x2
-
-	_ITIMER_REAL    = 0x0
-	_ITIMER_VIRTUAL = 0x1
-	_ITIMER_PROF    = 0x2
-
-	_O_RDONLY  = 0x0
-	_O_CLOEXEC = 0x80000
-
-	_EPOLLIN       = 0x1
-	_EPOLLOUT      = 0x4
-	_EPOLLERR      = 0x8
-	_EPOLLHUP      = 0x10
-	_EPOLLRDHUP    = 0x2000
-	_EPOLLET       = 0x80000000
-	_EPOLL_CLOEXEC = 0x80000
-	_EPOLL_CTL_ADD = 0x1
-	_EPOLL_CTL_DEL = 0x2
-	_EPOLL_CTL_MOD = 0x3
-)
-
-type fpreg struct {
-	significand [4]uint16
-	exponent    uint16
-}
-
-type fpxreg struct {
-	significand [4]uint16
-	exponent    uint16
-	padding     [3]uint16
-}
-
-type xmmreg struct {
-	element [4]uint32
-}
-
-type fpstate struct {
-	cw        uint32
-	sw        uint32
-	tag       uint32
-	ipoff     uint32
-	cssel     uint32
-	dataoff   uint32
-	datasel   uint32
-	_st       [8]fpreg
-	status    uint16
-	magic     uint16
-	_fxsr_env [6]uint32
-	mxcsr     uint32
-	reserved  uint32
-	_fxsr_st  [8]fpxreg
-	_xmm      [8]xmmreg
-	padding1  [44]uint32
-	anon0     [48]byte
-}
-
-type timespec struct {
-	tv_sec  int32
-	tv_nsec int32
-}
-
-func (ts *timespec) set_sec(x int64) {
-	ts.tv_sec = int32(x)
-}
-
-func (ts *timespec) set_nsec(x int32) {
-	ts.tv_nsec = x
-}
-
-type timeval struct {
-	tv_sec  int32
-	tv_usec int32
-}
-
-func (tv *timeval) set_usec(x int32) {
-	tv.tv_usec = x
-}
-
-type sigactiont struct {
-	sa_handler  uintptr
-	sa_flags    uint32
-	sa_restorer uintptr
-	sa_mask     uint64
-}
-
-type siginfo struct {
-	si_signo int32
-	si_errno int32
-	si_code  int32
-	// below here is a union; si_addr is the only field we use
-	si_addr uint32
-}
-
-type sigaltstackt struct {
-	ss_sp    *byte
-	ss_flags int32
-	ss_size  uintptr
-}
-
-type sigcontext struct {
-	gs            uint16
-	__gsh         uint16
-	fs            uint16
-	__fsh         uint16
-	es            uint16
-	__esh         uint16
-	ds            uint16
-	__dsh         uint16
-	edi           uint32
-	esi           uint32
-	ebp           uint32
-	esp           uint32
-	ebx           uint32
-	edx           uint32
-	ecx           uint32
-	eax           uint32
-	trapno        uint32
-	err           uint32
-	eip           uint32
-	cs            uint16
-	__csh         uint16
-	eflags        uint32
-	esp_at_signal uint32
-	ss            uint16
-	__ssh         uint16
-	fpstate       *fpstate
-	oldmask       uint32
-	cr2           uint32
-}
-
-type ucontext struct {
-	uc_flags    uint32
-	uc_link     *ucontext
-	uc_stack    sigaltstackt
-	uc_mcontext sigcontext
-	uc_sigmask  uint32
-}
-
-type itimerval struct {
-	it_interval timeval
-	it_value    timeval
-}
-
-type epollevent struct {
-	events uint32
-	data   [8]byte // to match amd64
-}
diff --git a/src/runtime/defs_linux_amd64.go b/src/runtime/defs_linux_amd64.go
deleted file mode 100644
index 48aeb80..0000000
--- a/src/runtime/defs_linux_amd64.go
+++ /dev/null
@@ -1,255 +0,0 @@
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_linux.go defs1_linux.go
-
-package runtime
-
-const (
-	_EINTR  = 0x4
-	_EAGAIN = 0xb
-	_ENOMEM = 0xc
-
-	_PROT_NONE  = 0x0
-	_PROT_READ  = 0x1
-	_PROT_WRITE = 0x2
-	_PROT_EXEC  = 0x4
-
-	_MAP_ANON    = 0x20
-	_MAP_PRIVATE = 0x2
-	_MAP_FIXED   = 0x10
-
-	_MADV_DONTNEED   = 0x4
-	_MADV_HUGEPAGE   = 0xe
-	_MADV_NOHUGEPAGE = 0xf
-
-	_SA_RESTART  = 0x10000000
-	_SA_ONSTACK  = 0x8000000
-	_SA_RESTORER = 0x4000000
-	_SA_SIGINFO  = 0x4
-
-	_SIGHUP    = 0x1
-	_SIGINT    = 0x2
-	_SIGQUIT   = 0x3
-	_SIGILL    = 0x4
-	_SIGTRAP   = 0x5
-	_SIGABRT   = 0x6
-	_SIGBUS    = 0x7
-	_SIGFPE    = 0x8
-	_SIGKILL   = 0x9
-	_SIGUSR1   = 0xa
-	_SIGSEGV   = 0xb
-	_SIGUSR2   = 0xc
-	_SIGPIPE   = 0xd
-	_SIGALRM   = 0xe
-	_SIGSTKFLT = 0x10
-	_SIGCHLD   = 0x11
-	_SIGCONT   = 0x12
-	_SIGSTOP   = 0x13
-	_SIGTSTP   = 0x14
-	_SIGTTIN   = 0x15
-	_SIGTTOU   = 0x16
-	_SIGURG    = 0x17
-	_SIGXCPU   = 0x18
-	_SIGXFSZ   = 0x19
-	_SIGVTALRM = 0x1a
-	_SIGPROF   = 0x1b
-	_SIGWINCH  = 0x1c
-	_SIGIO     = 0x1d
-	_SIGPWR    = 0x1e
-	_SIGSYS    = 0x1f
-
-	_FPE_INTDIV = 0x1
-	_FPE_INTOVF = 0x2
-	_FPE_FLTDIV = 0x3
-	_FPE_FLTOVF = 0x4
-	_FPE_FLTUND = 0x5
-	_FPE_FLTRES = 0x6
-	_FPE_FLTINV = 0x7
-	_FPE_FLTSUB = 0x8
-
-	_BUS_ADRALN = 0x1
-	_BUS_ADRERR = 0x2
-	_BUS_OBJERR = 0x3
-
-	_SEGV_MAPERR = 0x1
-	_SEGV_ACCERR = 0x2
-
-	_ITIMER_REAL    = 0x0
-	_ITIMER_VIRTUAL = 0x1
-	_ITIMER_PROF    = 0x2
-
-	_EPOLLIN       = 0x1
-	_EPOLLOUT      = 0x4
-	_EPOLLERR      = 0x8
-	_EPOLLHUP      = 0x10
-	_EPOLLRDHUP    = 0x2000
-	_EPOLLET       = 0x80000000
-	_EPOLL_CLOEXEC = 0x80000
-	_EPOLL_CTL_ADD = 0x1
-	_EPOLL_CTL_DEL = 0x2
-	_EPOLL_CTL_MOD = 0x3
-)
-
-type timespec struct {
-	tv_sec  int64
-	tv_nsec int64
-}
-
-func (ts *timespec) set_sec(x int64) {
-	ts.tv_sec = x
-}
-
-func (ts *timespec) set_nsec(x int32) {
-	ts.tv_nsec = int64(x)
-}
-
-type timeval struct {
-	tv_sec  int64
-	tv_usec int64
-}
-
-func (tv *timeval) set_usec(x int32) {
-	tv.tv_usec = int64(x)
-}
-
-type sigactiont struct {
-	sa_handler  uintptr
-	sa_flags    uint64
-	sa_restorer uintptr
-	sa_mask     uint64
-}
-
-type siginfo struct {
-	si_signo int32
-	si_errno int32
-	si_code  int32
-	// below here is a union; si_addr is the only field we use
-	si_addr uint64
-}
-
-type itimerval struct {
-	it_interval timeval
-	it_value    timeval
-}
-
-type epollevent struct {
-	events uint32
-	data   [8]byte // unaligned uintptr
-}
-
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_linux.go defs1_linux.go
-
-const (
-	_O_RDONLY  = 0x0
-	_O_CLOEXEC = 0x80000
-)
-
-type usigset struct {
-	__val [16]uint64
-}
-
-type fpxreg struct {
-	significand [4]uint16
-	exponent    uint16
-	padding     [3]uint16
-}
-
-type xmmreg struct {
-	element [4]uint32
-}
-
-type fpstate struct {
-	cwd       uint16
-	swd       uint16
-	ftw       uint16
-	fop       uint16
-	rip       uint64
-	rdp       uint64
-	mxcsr     uint32
-	mxcr_mask uint32
-	_st       [8]fpxreg
-	_xmm      [16]xmmreg
-	padding   [24]uint32
-}
-
-type fpxreg1 struct {
-	significand [4]uint16
-	exponent    uint16
-	padding     [3]uint16
-}
-
-type xmmreg1 struct {
-	element [4]uint32
-}
-
-type fpstate1 struct {
-	cwd       uint16
-	swd       uint16
-	ftw       uint16
-	fop       uint16
-	rip       uint64
-	rdp       uint64
-	mxcsr     uint32
-	mxcr_mask uint32
-	_st       [8]fpxreg1
-	_xmm      [16]xmmreg1
-	padding   [24]uint32
-}
-
-type fpreg1 struct {
-	significand [4]uint16
-	exponent    uint16
-}
-
-type sigaltstackt struct {
-	ss_sp     *byte
-	ss_flags  int32
-	pad_cgo_0 [4]byte
-	ss_size   uintptr
-}
-
-type mcontext struct {
-	gregs       [23]uint64
-	fpregs      *fpstate
-	__reserved1 [8]uint64
-}
-
-type ucontext struct {
-	uc_flags     uint64
-	uc_link      *ucontext
-	uc_stack     sigaltstackt
-	uc_mcontext  mcontext
-	uc_sigmask   usigset
-	__fpregs_mem fpstate
-}
-
-type sigcontext struct {
-	r8          uint64
-	r9          uint64
-	r10         uint64
-	r11         uint64
-	r12         uint64
-	r13         uint64
-	r14         uint64
-	r15         uint64
-	rdi         uint64
-	rsi         uint64
-	rbp         uint64
-	rbx         uint64
-	rdx         uint64
-	rax         uint64
-	rcx         uint64
-	rsp         uint64
-	rip         uint64
-	eflags      uint64
-	cs          uint16
-	gs          uint16
-	fs          uint16
-	__pad0      uint16
-	err         uint64
-	trapno      uint64
-	oldmask     uint64
-	cr2         uint64
-	fpstate     *fpstate1
-	__reserved1 [8]uint64
-}
diff --git a/src/runtime/defs_linux_arm.go b/src/runtime/defs_linux_arm.go
deleted file mode 100644
index b68b964..0000000
--- a/src/runtime/defs_linux_arm.go
+++ /dev/null
@@ -1,182 +0,0 @@
-package runtime
-
-// Constants
-const (
-	_EINTR  = 0x4
-	_ENOMEM = 0xc
-	_EAGAIN = 0xb
-
-	_PROT_NONE  = 0
-	_PROT_READ  = 0x1
-	_PROT_WRITE = 0x2
-	_PROT_EXEC  = 0x4
-
-	_MAP_ANON    = 0x20
-	_MAP_PRIVATE = 0x2
-	_MAP_FIXED   = 0x10
-
-	_MADV_DONTNEED   = 0x4
-	_MADV_HUGEPAGE   = 0xe
-	_MADV_NOHUGEPAGE = 0xf
-
-	_SA_RESTART     = 0x10000000
-	_SA_ONSTACK     = 0x8000000
-	_SA_RESTORER    = 0 // unused on ARM
-	_SA_SIGINFO     = 0x4
-	_SIGHUP         = 0x1
-	_SIGINT         = 0x2
-	_SIGQUIT        = 0x3
-	_SIGILL         = 0x4
-	_SIGTRAP        = 0x5
-	_SIGABRT        = 0x6
-	_SIGBUS         = 0x7
-	_SIGFPE         = 0x8
-	_SIGKILL        = 0x9
-	_SIGUSR1        = 0xa
-	_SIGSEGV        = 0xb
-	_SIGUSR2        = 0xc
-	_SIGPIPE        = 0xd
-	_SIGALRM        = 0xe
-	_SIGSTKFLT      = 0x10
-	_SIGCHLD        = 0x11
-	_SIGCONT        = 0x12
-	_SIGSTOP        = 0x13
-	_SIGTSTP        = 0x14
-	_SIGTTIN        = 0x15
-	_SIGTTOU        = 0x16
-	_SIGURG         = 0x17
-	_SIGXCPU        = 0x18
-	_SIGXFSZ        = 0x19
-	_SIGVTALRM      = 0x1a
-	_SIGPROF        = 0x1b
-	_SIGWINCH       = 0x1c
-	_SIGIO          = 0x1d
-	_SIGPWR         = 0x1e
-	_SIGSYS         = 0x1f
-	_FPE_INTDIV     = 0x1
-	_FPE_INTOVF     = 0x2
-	_FPE_FLTDIV     = 0x3
-	_FPE_FLTOVF     = 0x4
-	_FPE_FLTUND     = 0x5
-	_FPE_FLTRES     = 0x6
-	_FPE_FLTINV     = 0x7
-	_FPE_FLTSUB     = 0x8
-	_BUS_ADRALN     = 0x1
-	_BUS_ADRERR     = 0x2
-	_BUS_OBJERR     = 0x3
-	_SEGV_MAPERR    = 0x1
-	_SEGV_ACCERR    = 0x2
-	_ITIMER_REAL    = 0
-	_ITIMER_PROF    = 0x2
-	_ITIMER_VIRTUAL = 0x1
-	_O_RDONLY       = 0
-	_O_CLOEXEC      = 0x80000
-
-	_EPOLLIN       = 0x1
-	_EPOLLOUT      = 0x4
-	_EPOLLERR      = 0x8
-	_EPOLLHUP      = 0x10
-	_EPOLLRDHUP    = 0x2000
-	_EPOLLET       = 0x80000000
-	_EPOLL_CLOEXEC = 0x80000
-	_EPOLL_CTL_ADD = 0x1
-	_EPOLL_CTL_DEL = 0x2
-	_EPOLL_CTL_MOD = 0x3
-
-	_AF_UNIX    = 0x1
-	_F_SETFL    = 0x4
-	_SOCK_DGRAM = 0x2
-)
-
-type timespec struct {
-	tv_sec  int32
-	tv_nsec int32
-}
-
-func (ts *timespec) set_sec(x int64) {
-	ts.tv_sec = int32(x)
-}
-
-func (ts *timespec) set_nsec(x int32) {
-	ts.tv_nsec = x
-}
-
-type sigaltstackt struct {
-	ss_sp    *byte
-	ss_flags int32
-	ss_size  uintptr
-}
-
-type sigcontext struct {
-	trap_no       uint32
-	error_code    uint32
-	oldmask       uint32
-	r0            uint32
-	r1            uint32
-	r2            uint32
-	r3            uint32
-	r4            uint32
-	r5            uint32
-	r6            uint32
-	r7            uint32
-	r8            uint32
-	r9            uint32
-	r10           uint32
-	fp            uint32
-	ip            uint32
-	sp            uint32
-	lr            uint32
-	pc            uint32
-	cpsr          uint32
-	fault_address uint32
-}
-
-type ucontext struct {
-	uc_flags    uint32
-	uc_link     *ucontext
-	uc_stack    sigaltstackt
-	uc_mcontext sigcontext
-	uc_sigmask  uint32
-	__unused    [31]int32
-	uc_regspace [128]uint32
-}
-
-type timeval struct {
-	tv_sec  int32
-	tv_usec int32
-}
-
-func (tv *timeval) set_usec(x int32) {
-	tv.tv_usec = x
-}
-
-type itimerval struct {
-	it_interval timeval
-	it_value    timeval
-}
-
-type siginfo struct {
-	si_signo int32
-	si_errno int32
-	si_code  int32
-	// below here is a union; si_addr is the only field we use
-	si_addr uint32
-}
-
-type sigactiont struct {
-	sa_handler  uintptr
-	sa_flags    uint32
-	sa_restorer uintptr
-	sa_mask     uint64
-}
-
-type epollevent struct {
-	events uint32
-	_pad   uint32
-	data   [8]byte // to match amd64
-}
-
-type sockaddr_un struct {
-	family uint16
-	path   [108]byte
-}
diff --git a/src/runtime/defs_linux_arm64.go b/src/runtime/defs_linux_arm64.go
deleted file mode 100644
index 1a4d884..0000000
--- a/src/runtime/defs_linux_arm64.go
+++ /dev/null
@@ -1,178 +0,0 @@
-// Created by cgo -cdefs and converted (by hand) to Go
-// ../cmd/cgo/cgo -cdefs defs_linux.go defs1_linux.go defs2_linux.go
-
-package runtime
-
-const (
-	_EINTR  = 0x4
-	_EAGAIN = 0xb
-	_ENOMEM = 0xc
-
-	_PROT_NONE  = 0x0
-	_PROT_READ  = 0x1
-	_PROT_WRITE = 0x2
-	_PROT_EXEC  = 0x4
-
-	_MAP_ANON    = 0x20
-	_MAP_PRIVATE = 0x2
-	_MAP_FIXED   = 0x10
-
-	_MADV_DONTNEED   = 0x4
-	_MADV_HUGEPAGE   = 0xe
-	_MADV_NOHUGEPAGE = 0xf
-
-	_SA_RESTART  = 0x10000000
-	_SA_ONSTACK  = 0x8000000
-	_SA_RESTORER = 0x0 // Only used on intel
-	_SA_SIGINFO  = 0x4
-
-	_SIGHUP    = 0x1
-	_SIGINT    = 0x2
-	_SIGQUIT   = 0x3
-	_SIGILL    = 0x4
-	_SIGTRAP   = 0x5
-	_SIGABRT   = 0x6
-	_SIGBUS    = 0x7
-	_SIGFPE    = 0x8
-	_SIGKILL   = 0x9
-	_SIGUSR1   = 0xa
-	_SIGSEGV   = 0xb
-	_SIGUSR2   = 0xc
-	_SIGPIPE   = 0xd
-	_SIGALRM   = 0xe
-	_SIGSTKFLT = 0x10
-	_SIGCHLD   = 0x11
-	_SIGCONT   = 0x12
-	_SIGSTOP   = 0x13
-	_SIGTSTP   = 0x14
-	_SIGTTIN   = 0x15
-	_SIGTTOU   = 0x16
-	_SIGURG    = 0x17
-	_SIGXCPU   = 0x18
-	_SIGXFSZ   = 0x19
-	_SIGVTALRM = 0x1a
-	_SIGPROF   = 0x1b
-	_SIGWINCH  = 0x1c
-	_SIGIO     = 0x1d
-	_SIGPWR    = 0x1e
-	_SIGSYS    = 0x1f
-
-	_FPE_INTDIV = 0x1
-	_FPE_INTOVF = 0x2
-	_FPE_FLTDIV = 0x3
-	_FPE_FLTOVF = 0x4
-	_FPE_FLTUND = 0x5
-	_FPE_FLTRES = 0x6
-	_FPE_FLTINV = 0x7
-	_FPE_FLTSUB = 0x8
-
-	_BUS_ADRALN = 0x1
-	_BUS_ADRERR = 0x2
-	_BUS_OBJERR = 0x3
-
-	_SEGV_MAPERR = 0x1
-	_SEGV_ACCERR = 0x2
-
-	_ITIMER_REAL    = 0x0
-	_ITIMER_VIRTUAL = 0x1
-	_ITIMER_PROF    = 0x2
-
-	_EPOLLIN       = 0x1
-	_EPOLLOUT      = 0x4
-	_EPOLLERR      = 0x8
-	_EPOLLHUP      = 0x10
-	_EPOLLRDHUP    = 0x2000
-	_EPOLLET       = 0x80000000
-	_EPOLL_CLOEXEC = 0x80000
-	_EPOLL_CTL_ADD = 0x1
-	_EPOLL_CTL_DEL = 0x2
-	_EPOLL_CTL_MOD = 0x3
-)
-
-type timespec struct {
-	tv_sec  int64
-	tv_nsec int64
-}
-
-func (ts *timespec) set_sec(x int64) {
-	ts.tv_sec = x
-}
-
-func (ts *timespec) set_nsec(x int32) {
-	ts.tv_nsec = int64(x)
-}
-
-type timeval struct {
-	tv_sec  int64
-	tv_usec int64
-}
-
-func (tv *timeval) set_usec(x int32) {
-	tv.tv_usec = int64(x)
-}
-
-type sigactiont struct {
-	sa_handler  uintptr
-	sa_flags    uint64
-	sa_restorer uintptr
-	sa_mask     uint64
-}
-
-type siginfo struct {
-	si_signo int32
-	si_errno int32
-	si_code  int32
-	// below here is a union; si_addr is the only field we use
-	si_addr uint64
-}
-
-type itimerval struct {
-	it_interval timeval
-	it_value    timeval
-}
-
-type epollevent struct {
-	events uint32
-	_pad   uint32
-	data   [8]byte // to match amd64
-}
-
-// Created by cgo -cdefs and then converted to Go by hand
-// ../cmd/cgo/cgo -cdefs defs_linux.go defs1_linux.go defs2_linux.go
-
-const (
-	_O_RDONLY  = 0x0
-	_O_CLOEXEC = 0x80000
-)
-
-type usigset struct {
-	__val [16]uint64
-}
-
-type sigaltstackt struct {
-	ss_sp     *byte
-	ss_flags  int32
-	pad_cgo_0 [4]byte
-	ss_size   uintptr
-}
-
-type sigcontext struct {
-	fault_address uint64
-	/* AArch64 registers */
-	regs       [31]uint64
-	sp         uint64
-	pc         uint64
-	pstate     uint64
-	_pad       [8]byte // __attribute__((__aligned__(16)))
-	__reserved [4096]byte
-}
-
-type ucontext struct {
-	uc_flags    uint64
-	uc_link     *ucontext
-	uc_stack    sigaltstackt
-	uc_sigmask  uint64
-	_pad        [(1024 - 64) / 8]byte
-	_pad2       [8]byte // sigcontext must be aligned to 16-byte
-	uc_mcontext sigcontext
-}
diff --git a/src/runtime/defs_linux_ppc64.go b/src/runtime/defs_linux_ppc64.go
deleted file mode 100644
index 317a764..0000000
--- a/src/runtime/defs_linux_ppc64.go
+++ /dev/null
@@ -1,200 +0,0 @@
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_linux.go defs3_linux.go
-
-package runtime
-
-const (
-	_EINTR  = 0x4
-	_EAGAIN = 0xb
-	_ENOMEM = 0xc
-
-	_PROT_NONE  = 0x0
-	_PROT_READ  = 0x1
-	_PROT_WRITE = 0x2
-	_PROT_EXEC  = 0x4
-
-	_MAP_ANON    = 0x20
-	_MAP_PRIVATE = 0x2
-	_MAP_FIXED   = 0x10
-
-	_MADV_DONTNEED   = 0x4
-	_MADV_HUGEPAGE   = 0xe
-	_MADV_NOHUGEPAGE = 0xf
-
-	_SA_RESTART = 0x10000000
-	_SA_ONSTACK = 0x8000000
-	_SA_SIGINFO = 0x4
-
-	_SIGHUP    = 0x1
-	_SIGINT    = 0x2
-	_SIGQUIT   = 0x3
-	_SIGILL    = 0x4
-	_SIGTRAP   = 0x5
-	_SIGABRT   = 0x6
-	_SIGBUS    = 0x7
-	_SIGFPE    = 0x8
-	_SIGKILL   = 0x9
-	_SIGUSR1   = 0xa
-	_SIGSEGV   = 0xb
-	_SIGUSR2   = 0xc
-	_SIGPIPE   = 0xd
-	_SIGALRM   = 0xe
-	_SIGSTKFLT = 0x10
-	_SIGCHLD   = 0x11
-	_SIGCONT   = 0x12
-	_SIGSTOP   = 0x13
-	_SIGTSTP   = 0x14
-	_SIGTTIN   = 0x15
-	_SIGTTOU   = 0x16
-	_SIGURG    = 0x17
-	_SIGXCPU   = 0x18
-	_SIGXFSZ   = 0x19
-	_SIGVTALRM = 0x1a
-	_SIGPROF   = 0x1b
-	_SIGWINCH  = 0x1c
-	_SIGIO     = 0x1d
-	_SIGPWR    = 0x1e
-	_SIGSYS    = 0x1f
-
-	_FPE_INTDIV = 0x1
-	_FPE_INTOVF = 0x2
-	_FPE_FLTDIV = 0x3
-	_FPE_FLTOVF = 0x4
-	_FPE_FLTUND = 0x5
-	_FPE_FLTRES = 0x6
-	_FPE_FLTINV = 0x7
-	_FPE_FLTSUB = 0x8
-
-	_BUS_ADRALN = 0x1
-	_BUS_ADRERR = 0x2
-	_BUS_OBJERR = 0x3
-
-	_SEGV_MAPERR = 0x1
-	_SEGV_ACCERR = 0x2
-
-	_ITIMER_REAL    = 0x0
-	_ITIMER_VIRTUAL = 0x1
-	_ITIMER_PROF    = 0x2
-
-	_EPOLLIN       = 0x1
-	_EPOLLOUT      = 0x4
-	_EPOLLERR      = 0x8
-	_EPOLLHUP      = 0x10
-	_EPOLLRDHUP    = 0x2000
-	_EPOLLET       = 0x80000000
-	_EPOLL_CLOEXEC = 0x80000
-	_EPOLL_CTL_ADD = 0x1
-	_EPOLL_CTL_DEL = 0x2
-	_EPOLL_CTL_MOD = 0x3
-)
-
-//struct Sigset {
-//	uint64	sig[1];
-//};
-//typedef uint64 Sigset;
-
-type timespec struct {
-	tv_sec  int64
-	tv_nsec int64
-}
-
-func (ts *timespec) set_sec(x int64) {
-	ts.tv_sec = x
-}
-
-func (ts *timespec) set_nsec(x int32) {
-	ts.tv_nsec = int64(x)
-}
-
-type timeval struct {
-	tv_sec  int64
-	tv_usec int64
-}
-
-func (tv *timeval) set_usec(x int32) {
-	tv.tv_usec = int64(x)
-}
-
-type sigactiont struct {
-	sa_handler  uintptr
-	sa_flags    uint64
-	sa_restorer uintptr
-	sa_mask     uint64
-}
-
-type siginfo struct {
-	si_signo int32
-	si_errno int32
-	si_code  int32
-	// below here is a union; si_addr is the only field we use
-	si_addr uint64
-}
-
-type itimerval struct {
-	it_interval timeval
-	it_value    timeval
-}
-
-type epollevent struct {
-	events    uint32
-	pad_cgo_0 [4]byte
-	data      [8]byte // unaligned uintptr
-}
-
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_linux.go defs3_linux.go
-
-const (
-	_O_RDONLY    = 0x0
-	_O_CLOEXEC   = 0x80000
-	_SA_RESTORER = 0
-)
-
-type ptregs struct {
-	gpr       [32]uint64
-	nip       uint64
-	msr       uint64
-	orig_gpr3 uint64
-	ctr       uint64
-	link      uint64
-	xer       uint64
-	ccr       uint64
-	softe     uint64
-	trap      uint64
-	dar       uint64
-	dsisr     uint64
-	result    uint64
-}
-
-type vreg struct {
-	u [4]uint32
-}
-
-type sigaltstackt struct {
-	ss_sp     *byte
-	ss_flags  int32
-	pad_cgo_0 [4]byte
-	ss_size   uintptr
-}
-
-type sigcontext struct {
-	_unused     [4]uint64
-	signal      int32
-	_pad0       int32
-	handler     uint64
-	oldmask     uint64
-	regs        *ptregs
-	gp_regs     [48]uint64
-	fp_regs     [33]float64
-	v_regs      *vreg
-	vmx_reserve [101]int64
-}
-
-type ucontext struct {
-	uc_flags    uint64
-	uc_link     *ucontext
-	uc_stack    sigaltstackt
-	uc_sigmask  uint64
-	__unused    [15]uint64
-	uc_mcontext sigcontext
-}
diff --git a/src/runtime/defs_linux_ppc64le.go b/src/runtime/defs_linux_ppc64le.go
deleted file mode 100644
index 317a764..0000000
--- a/src/runtime/defs_linux_ppc64le.go
+++ /dev/null
@@ -1,200 +0,0 @@
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_linux.go defs3_linux.go
-
-package runtime
-
-const (
-	_EINTR  = 0x4
-	_EAGAIN = 0xb
-	_ENOMEM = 0xc
-
-	_PROT_NONE  = 0x0
-	_PROT_READ  = 0x1
-	_PROT_WRITE = 0x2
-	_PROT_EXEC  = 0x4
-
-	_MAP_ANON    = 0x20
-	_MAP_PRIVATE = 0x2
-	_MAP_FIXED   = 0x10
-
-	_MADV_DONTNEED   = 0x4
-	_MADV_HUGEPAGE   = 0xe
-	_MADV_NOHUGEPAGE = 0xf
-
-	_SA_RESTART = 0x10000000
-	_SA_ONSTACK = 0x8000000
-	_SA_SIGINFO = 0x4
-
-	_SIGHUP    = 0x1
-	_SIGINT    = 0x2
-	_SIGQUIT   = 0x3
-	_SIGILL    = 0x4
-	_SIGTRAP   = 0x5
-	_SIGABRT   = 0x6
-	_SIGBUS    = 0x7
-	_SIGFPE    = 0x8
-	_SIGKILL   = 0x9
-	_SIGUSR1   = 0xa
-	_SIGSEGV   = 0xb
-	_SIGUSR2   = 0xc
-	_SIGPIPE   = 0xd
-	_SIGALRM   = 0xe
-	_SIGSTKFLT = 0x10
-	_SIGCHLD   = 0x11
-	_SIGCONT   = 0x12
-	_SIGSTOP   = 0x13
-	_SIGTSTP   = 0x14
-	_SIGTTIN   = 0x15
-	_SIGTTOU   = 0x16
-	_SIGURG    = 0x17
-	_SIGXCPU   = 0x18
-	_SIGXFSZ   = 0x19
-	_SIGVTALRM = 0x1a
-	_SIGPROF   = 0x1b
-	_SIGWINCH  = 0x1c
-	_SIGIO     = 0x1d
-	_SIGPWR    = 0x1e
-	_SIGSYS    = 0x1f
-
-	_FPE_INTDIV = 0x1
-	_FPE_INTOVF = 0x2
-	_FPE_FLTDIV = 0x3
-	_FPE_FLTOVF = 0x4
-	_FPE_FLTUND = 0x5
-	_FPE_FLTRES = 0x6
-	_FPE_FLTINV = 0x7
-	_FPE_FLTSUB = 0x8
-
-	_BUS_ADRALN = 0x1
-	_BUS_ADRERR = 0x2
-	_BUS_OBJERR = 0x3
-
-	_SEGV_MAPERR = 0x1
-	_SEGV_ACCERR = 0x2
-
-	_ITIMER_REAL    = 0x0
-	_ITIMER_VIRTUAL = 0x1
-	_ITIMER_PROF    = 0x2
-
-	_EPOLLIN       = 0x1
-	_EPOLLOUT      = 0x4
-	_EPOLLERR      = 0x8
-	_EPOLLHUP      = 0x10
-	_EPOLLRDHUP    = 0x2000
-	_EPOLLET       = 0x80000000
-	_EPOLL_CLOEXEC = 0x80000
-	_EPOLL_CTL_ADD = 0x1
-	_EPOLL_CTL_DEL = 0x2
-	_EPOLL_CTL_MOD = 0x3
-)
-
-//struct Sigset {
-//	uint64	sig[1];
-//};
-//typedef uint64 Sigset;
-
-type timespec struct {
-	tv_sec  int64
-	tv_nsec int64
-}
-
-func (ts *timespec) set_sec(x int64) {
-	ts.tv_sec = x
-}
-
-func (ts *timespec) set_nsec(x int32) {
-	ts.tv_nsec = int64(x)
-}
-
-type timeval struct {
-	tv_sec  int64
-	tv_usec int64
-}
-
-func (tv *timeval) set_usec(x int32) {
-	tv.tv_usec = int64(x)
-}
-
-type sigactiont struct {
-	sa_handler  uintptr
-	sa_flags    uint64
-	sa_restorer uintptr
-	sa_mask     uint64
-}
-
-type siginfo struct {
-	si_signo int32
-	si_errno int32
-	si_code  int32
-	// below here is a union; si_addr is the only field we use
-	si_addr uint64
-}
-
-type itimerval struct {
-	it_interval timeval
-	it_value    timeval
-}
-
-type epollevent struct {
-	events    uint32
-	pad_cgo_0 [4]byte
-	data      [8]byte // unaligned uintptr
-}
-
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_linux.go defs3_linux.go
-
-const (
-	_O_RDONLY    = 0x0
-	_O_CLOEXEC   = 0x80000
-	_SA_RESTORER = 0
-)
-
-type ptregs struct {
-	gpr       [32]uint64
-	nip       uint64
-	msr       uint64
-	orig_gpr3 uint64
-	ctr       uint64
-	link      uint64
-	xer       uint64
-	ccr       uint64
-	softe     uint64
-	trap      uint64
-	dar       uint64
-	dsisr     uint64
-	result    uint64
-}
-
-type vreg struct {
-	u [4]uint32
-}
-
-type sigaltstackt struct {
-	ss_sp     *byte
-	ss_flags  int32
-	pad_cgo_0 [4]byte
-	ss_size   uintptr
-}
-
-type sigcontext struct {
-	_unused     [4]uint64
-	signal      int32
-	_pad0       int32
-	handler     uint64
-	oldmask     uint64
-	regs        *ptregs
-	gp_regs     [48]uint64
-	fp_regs     [33]float64
-	v_regs      *vreg
-	vmx_reserve [101]int64
-}
-
-type ucontext struct {
-	uc_flags    uint64
-	uc_link     *ucontext
-	uc_stack    sigaltstackt
-	uc_sigmask  uint64
-	__unused    [15]uint64
-	uc_mcontext sigcontext
-}
diff --git a/src/runtime/defs_nacl_386.go b/src/runtime/defs_nacl_386.go
deleted file mode 100644
index b041336..0000000
--- a/src/runtime/defs_nacl_386.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package runtime
-
-const (
-	// These values are referred to in the source code
-	// but really don't matter. Even so, use the standard numbers.
-	_SIGQUIT = 3
-	_SIGSEGV = 11
-	_SIGPROF = 27
-)
-
-type timespec struct {
-	tv_sec  int64
-	tv_nsec int32
-}
-
-type excregs386 struct {
-	eax    uint32
-	ecx    uint32
-	edx    uint32
-	ebx    uint32
-	esp    uint32
-	ebp    uint32
-	esi    uint32
-	edi    uint32
-	eip    uint32
-	eflags uint32
-}
-
-type exccontext struct {
-	size                    uint32
-	portable_context_offset uint32
-	portable_context_size   uint32
-	arch                    uint32
-	regs_size               uint32
-	reserved                [11]uint32
-	regs                    excregs386
-}
-
-type excportablecontext struct {
-	pc uint32
-	sp uint32
-	fp uint32
-}
diff --git a/src/runtime/defs_nacl_amd64p32.go b/src/runtime/defs_nacl_amd64p32.go
deleted file mode 100644
index 7e0b867..0000000
--- a/src/runtime/defs_nacl_amd64p32.go
+++ /dev/null
@@ -1,64 +0,0 @@
-package runtime
-
-const (
-	// These values are referred to in the source code
-	// but really don't matter. Even so, use the standard numbers.
-	_SIGQUIT = 3
-	_SIGSEGV = 11
-	_SIGPROF = 27
-)
-
-type timespec struct {
-	tv_sec  int64
-	tv_nsec int32
-}
-
-type excregs386 struct {
-	eax    uint32
-	ecx    uint32
-	edx    uint32
-	ebx    uint32
-	esp    uint32
-	ebp    uint32
-	esi    uint32
-	edi    uint32
-	eip    uint32
-	eflags uint32
-}
-
-type excregsamd64 struct {
-	rax    uint64
-	rcx    uint64
-	rdx    uint64
-	rbx    uint64
-	rsp    uint64
-	rbp    uint64
-	rsi    uint64
-	rdi    uint64
-	r8     uint64
-	r9     uint64
-	r10    uint64
-	r11    uint64
-	r12    uint64
-	r13    uint64
-	r14    uint64
-	r15    uint64
-	rip    uint64
-	rflags uint32
-}
-
-type exccontext struct {
-	size                    uint32
-	portable_context_offset uint32
-	portable_context_size   uint32
-	arch                    uint32
-	regs_size               uint32
-	reserved                [11]uint32
-	regs                    excregsamd64
-}
-
-type excportablecontext struct {
-	pc uint32
-	sp uint32
-	fp uint32
-}
diff --git a/src/runtime/defs_nacl_arm.go b/src/runtime/defs_nacl_arm.go
deleted file mode 100644
index 6032156..0000000
--- a/src/runtime/defs_nacl_arm.go
+++ /dev/null
@@ -1,50 +0,0 @@
-package runtime
-
-const (
-	// These values are referred to in the source code
-	// but really don't matter. Even so, use the standard numbers.
-	_SIGQUIT = 3
-	_SIGSEGV = 11
-	_SIGPROF = 27
-)
-
-type timespec struct {
-	tv_sec  int64
-	tv_nsec int32
-}
-
-type excregsarm struct {
-	r0   uint32
-	r1   uint32
-	r2   uint32
-	r3   uint32
-	r4   uint32
-	r5   uint32
-	r6   uint32
-	r7   uint32
-	r8   uint32
-	r9   uint32 // the value reported here is undefined.
-	r10  uint32
-	r11  uint32
-	r12  uint32
-	sp   uint32 /* r13 */
-	lr   uint32 /* r14 */
-	pc   uint32 /* r15 */
-	cpsr uint32
-}
-
-type exccontext struct {
-	size                    uint32
-	portable_context_offset uint32
-	portable_context_size   uint32
-	arch                    uint32
-	regs_size               uint32
-	reserved                [11]uint32
-	regs                    excregsarm
-}
-
-type excportablecontext struct {
-	pc uint32
-	sp uint32
-	fp uint32
-}
diff --git a/src/runtime/defs_openbsd_386.go b/src/runtime/defs_openbsd_386.go
deleted file mode 100644
index 4b60158..0000000
--- a/src/runtime/defs_openbsd_386.go
+++ /dev/null
@@ -1,170 +0,0 @@
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_openbsd.go
-
-package runtime
-
-import "unsafe"
-
-const (
-	_EINTR  = 0x4
-	_EFAULT = 0xe
-
-	_PROT_NONE  = 0x0
-	_PROT_READ  = 0x1
-	_PROT_WRITE = 0x2
-	_PROT_EXEC  = 0x4
-
-	_MAP_ANON    = 0x1000
-	_MAP_PRIVATE = 0x2
-	_MAP_FIXED   = 0x10
-
-	_MADV_FREE = 0x6
-
-	_SA_SIGINFO = 0x40
-	_SA_RESTART = 0x2
-	_SA_ONSTACK = 0x1
-
-	_SIGHUP    = 0x1
-	_SIGINT    = 0x2
-	_SIGQUIT   = 0x3
-	_SIGILL    = 0x4
-	_SIGTRAP   = 0x5
-	_SIGABRT   = 0x6
-	_SIGEMT    = 0x7
-	_SIGFPE    = 0x8
-	_SIGKILL   = 0x9
-	_SIGBUS    = 0xa
-	_SIGSEGV   = 0xb
-	_SIGSYS    = 0xc
-	_SIGPIPE   = 0xd
-	_SIGALRM   = 0xe
-	_SIGTERM   = 0xf
-	_SIGURG    = 0x10
-	_SIGSTOP   = 0x11
-	_SIGTSTP   = 0x12
-	_SIGCONT   = 0x13
-	_SIGCHLD   = 0x14
-	_SIGTTIN   = 0x15
-	_SIGTTOU   = 0x16
-	_SIGIO     = 0x17
-	_SIGXCPU   = 0x18
-	_SIGXFSZ   = 0x19
-	_SIGVTALRM = 0x1a
-	_SIGPROF   = 0x1b
-	_SIGWINCH  = 0x1c
-	_SIGINFO   = 0x1d
-	_SIGUSR1   = 0x1e
-	_SIGUSR2   = 0x1f
-
-	_FPE_INTDIV = 0x1
-	_FPE_INTOVF = 0x2
-	_FPE_FLTDIV = 0x3
-	_FPE_FLTOVF = 0x4
-	_FPE_FLTUND = 0x5
-	_FPE_FLTRES = 0x6
-	_FPE_FLTINV = 0x7
-	_FPE_FLTSUB = 0x8
-
-	_BUS_ADRALN = 0x1
-	_BUS_ADRERR = 0x2
-	_BUS_OBJERR = 0x3
-
-	_SEGV_MAPERR = 0x1
-	_SEGV_ACCERR = 0x2
-
-	_ITIMER_REAL    = 0x0
-	_ITIMER_VIRTUAL = 0x1
-	_ITIMER_PROF    = 0x2
-
-	_EV_ADD       = 0x1
-	_EV_DELETE    = 0x2
-	_EV_CLEAR     = 0x20
-	_EV_ERROR     = 0x4000
-	_EVFILT_READ  = -0x1
-	_EVFILT_WRITE = -0x2
-)
-
-type tforkt struct {
-	tf_tcb   unsafe.Pointer
-	tf_tid   *int32
-	tf_stack uintptr
-}
-
-type sigaltstackt struct {
-	ss_sp    uintptr
-	ss_size  uintptr
-	ss_flags int32
-}
-
-type sigcontext struct {
-	sc_gs       uint32
-	sc_fs       uint32
-	sc_es       uint32
-	sc_ds       uint32
-	sc_edi      uint32
-	sc_esi      uint32
-	sc_ebp      uint32
-	sc_ebx      uint32
-	sc_edx      uint32
-	sc_ecx      uint32
-	sc_eax      uint32
-	sc_eip      uint32
-	sc_cs       uint32
-	sc_eflags   uint32
-	sc_esp      uint32
-	sc_ss       uint32
-	__sc_unused uint32
-	sc_mask     uint32
-	sc_trapno   uint32
-	sc_err      uint32
-	sc_fpstate  unsafe.Pointer
-}
-
-type siginfo struct {
-	si_signo int32
-	si_code  int32
-	si_errno int32
-	_data    [116]byte
-}
-
-type stackt struct {
-	ss_sp    uintptr
-	ss_size  uintptr
-	ss_flags int32
-}
-
-type timespec struct {
-	tv_sec  int64
-	tv_nsec int32
-}
-
-func (ts *timespec) set_sec(x int64) {
-	ts.tv_sec = x
-}
-
-func (ts *timespec) set_nsec(x int32) {
-	ts.tv_nsec = x
-}
-
-type timeval struct {
-	tv_sec  int64
-	tv_usec int32
-}
-
-func (tv *timeval) set_usec(x int32) {
-	tv.tv_usec = x
-}
-
-type itimerval struct {
-	it_interval timeval
-	it_value    timeval
-}
-
-type keventt struct {
-	ident  uint32
-	filter int16
-	flags  uint16
-	fflags uint32
-	data   int64
-	udata  *byte
-}
diff --git a/src/runtime/defs_openbsd_amd64.go b/src/runtime/defs_openbsd_amd64.go
deleted file mode 100644
index 3c27c91..0000000
--- a/src/runtime/defs_openbsd_amd64.go
+++ /dev/null
@@ -1,181 +0,0 @@
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_openbsd.go
-
-package runtime
-
-import "unsafe"
-
-const (
-	_EINTR  = 0x4
-	_EFAULT = 0xe
-
-	_PROT_NONE  = 0x0
-	_PROT_READ  = 0x1
-	_PROT_WRITE = 0x2
-	_PROT_EXEC  = 0x4
-
-	_MAP_ANON    = 0x1000
-	_MAP_PRIVATE = 0x2
-	_MAP_FIXED   = 0x10
-
-	_MADV_FREE = 0x6
-
-	_SA_SIGINFO = 0x40
-	_SA_RESTART = 0x2
-	_SA_ONSTACK = 0x1
-
-	_SIGHUP    = 0x1
-	_SIGINT    = 0x2
-	_SIGQUIT   = 0x3
-	_SIGILL    = 0x4
-	_SIGTRAP   = 0x5
-	_SIGABRT   = 0x6
-	_SIGEMT    = 0x7
-	_SIGFPE    = 0x8
-	_SIGKILL   = 0x9
-	_SIGBUS    = 0xa
-	_SIGSEGV   = 0xb
-	_SIGSYS    = 0xc
-	_SIGPIPE   = 0xd
-	_SIGALRM   = 0xe
-	_SIGTERM   = 0xf
-	_SIGURG    = 0x10
-	_SIGSTOP   = 0x11
-	_SIGTSTP   = 0x12
-	_SIGCONT   = 0x13
-	_SIGCHLD   = 0x14
-	_SIGTTIN   = 0x15
-	_SIGTTOU   = 0x16
-	_SIGIO     = 0x17
-	_SIGXCPU   = 0x18
-	_SIGXFSZ   = 0x19
-	_SIGVTALRM = 0x1a
-	_SIGPROF   = 0x1b
-	_SIGWINCH  = 0x1c
-	_SIGINFO   = 0x1d
-	_SIGUSR1   = 0x1e
-	_SIGUSR2   = 0x1f
-
-	_FPE_INTDIV = 0x1
-	_FPE_INTOVF = 0x2
-	_FPE_FLTDIV = 0x3
-	_FPE_FLTOVF = 0x4
-	_FPE_FLTUND = 0x5
-	_FPE_FLTRES = 0x6
-	_FPE_FLTINV = 0x7
-	_FPE_FLTSUB = 0x8
-
-	_BUS_ADRALN = 0x1
-	_BUS_ADRERR = 0x2
-	_BUS_OBJERR = 0x3
-
-	_SEGV_MAPERR = 0x1
-	_SEGV_ACCERR = 0x2
-
-	_ITIMER_REAL    = 0x0
-	_ITIMER_VIRTUAL = 0x1
-	_ITIMER_PROF    = 0x2
-
-	_EV_ADD       = 0x1
-	_EV_DELETE    = 0x2
-	_EV_CLEAR     = 0x20
-	_EV_ERROR     = 0x4000
-	_EVFILT_READ  = -0x1
-	_EVFILT_WRITE = -0x2
-)
-
-type tforkt struct {
-	tf_tcb   unsafe.Pointer
-	tf_tid   *int32
-	tf_stack uintptr
-}
-
-type sigaltstackt struct {
-	ss_sp     uintptr
-	ss_size   uintptr
-	ss_flags  int32
-	pad_cgo_0 [4]byte
-}
-
-type sigcontext struct {
-	sc_rdi      uint64
-	sc_rsi      uint64
-	sc_rdx      uint64
-	sc_rcx      uint64
-	sc_r8       uint64
-	sc_r9       uint64
-	sc_r10      uint64
-	sc_r11      uint64
-	sc_r12      uint64
-	sc_r13      uint64
-	sc_r14      uint64
-	sc_r15      uint64
-	sc_rbp      uint64
-	sc_rbx      uint64
-	sc_rax      uint64
-	sc_gs       uint64
-	sc_fs       uint64
-	sc_es       uint64
-	sc_ds       uint64
-	sc_trapno   uint64
-	sc_err      uint64
-	sc_rip      uint64
-	sc_cs       uint64
-	sc_rflags   uint64
-	sc_rsp      uint64
-	sc_ss       uint64
-	sc_fpstate  unsafe.Pointer
-	__sc_unused int32
-	sc_mask     int32
-}
-
-type siginfo struct {
-	si_signo  int32
-	si_code   int32
-	si_errno  int32
-	pad_cgo_0 [4]byte
-	_data     [120]byte
-}
-
-type stackt struct {
-	ss_sp     uintptr
-	ss_size   uintptr
-	ss_flags  int32
-	pad_cgo_0 [4]byte
-}
-
-type timespec struct {
-	tv_sec  int64
-	tv_nsec int64
-}
-
-func (ts *timespec) set_sec(x int64) {
-	ts.tv_sec = x
-}
-
-func (ts *timespec) set_nsec(x int32) {
-	ts.tv_nsec = int64(x)
-}
-
-type timeval struct {
-	tv_sec  int64
-	tv_usec int64
-}
-
-func (tv *timeval) set_usec(x int32) {
-	tv.tv_usec = int64(x)
-}
-
-type itimerval struct {
-	it_interval timeval
-	it_value    timeval
-}
-
-type keventt struct {
-	ident  uint64
-	filter int16
-	flags  uint16
-	fflags uint32
-	data   int64
-	udata  *byte
-}
diff --git a/src/runtime/defs_openbsd_arm.go b/src/runtime/defs_openbsd_arm.go
deleted file mode 100644
index aab9276..0000000
--- a/src/runtime/defs_openbsd_arm.go
+++ /dev/null
@@ -1,170 +0,0 @@
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_openbsd.go
-
-package runtime
-
-import "unsafe"
-
-const (
-	_EINTR  = 0x4
-	_EFAULT = 0xe
-
-	_PROT_NONE  = 0x0
-	_PROT_READ  = 0x1
-	_PROT_WRITE = 0x2
-	_PROT_EXEC  = 0x4
-
-	_MAP_ANON    = 0x1000
-	_MAP_PRIVATE = 0x2
-	_MAP_FIXED   = 0x10
-
-	_MADV_FREE = 0x6
-
-	_SA_SIGINFO = 0x40
-	_SA_RESTART = 0x2
-	_SA_ONSTACK = 0x1
-
-	_SIGHUP    = 0x1
-	_SIGINT    = 0x2
-	_SIGQUIT   = 0x3
-	_SIGILL    = 0x4
-	_SIGTRAP   = 0x5
-	_SIGABRT   = 0x6
-	_SIGEMT    = 0x7
-	_SIGFPE    = 0x8
-	_SIGKILL   = 0x9
-	_SIGBUS    = 0xa
-	_SIGSEGV   = 0xb
-	_SIGSYS    = 0xc
-	_SIGPIPE   = 0xd
-	_SIGALRM   = 0xe
-	_SIGTERM   = 0xf
-	_SIGURG    = 0x10
-	_SIGSTOP   = 0x11
-	_SIGTSTP   = 0x12
-	_SIGCONT   = 0x13
-	_SIGCHLD   = 0x14
-	_SIGTTIN   = 0x15
-	_SIGTTOU   = 0x16
-	_SIGIO     = 0x17
-	_SIGXCPU   = 0x18
-	_SIGXFSZ   = 0x19
-	_SIGVTALRM = 0x1a
-	_SIGPROF   = 0x1b
-	_SIGWINCH  = 0x1c
-	_SIGINFO   = 0x1d
-	_SIGUSR1   = 0x1e
-	_SIGUSR2   = 0x1f
-
-	_FPE_INTDIV = 0x1
-	_FPE_INTOVF = 0x2
-	_FPE_FLTDIV = 0x3
-	_FPE_FLTOVF = 0x4
-	_FPE_FLTUND = 0x5
-	_FPE_FLTRES = 0x6
-	_FPE_FLTINV = 0x7
-	_FPE_FLTSUB = 0x8
-
-	_BUS_ADRALN = 0x1
-	_BUS_ADRERR = 0x2
-	_BUS_OBJERR = 0x3
-
-	_SEGV_MAPERR = 0x1
-	_SEGV_ACCERR = 0x2
-
-	_ITIMER_REAL    = 0x0
-	_ITIMER_VIRTUAL = 0x1
-	_ITIMER_PROF    = 0x2
-
-	_EV_ADD       = 0x1
-	_EV_DELETE    = 0x2
-	_EV_CLEAR     = 0x20
-	_EV_ERROR     = 0x4000
-	_EVFILT_READ  = -0x1
-	_EVFILT_WRITE = -0x2
-)
-
-type tforkt struct {
-	tf_tcb   unsafe.Pointer
-	tf_tid   *int32
-	tf_stack uintptr
-}
-
-type sigaltstackt struct {
-	ss_sp    uintptr
-	ss_size  uintptr
-	ss_flags int32
-}
-
-type sigcontext struct {
-	__sc_unused int32
-	sc_mask     int32
-
-	sc_spsr   uint32
-	sc_r0     uint32
-	sc_r1     uint32
-	sc_r2     uint32
-	sc_r3     uint32
-	sc_r4     uint32
-	sc_r5     uint32
-	sc_r6     uint32
-	sc_r7     uint32
-	sc_r8     uint32
-	sc_r9     uint32
-	sc_r10    uint32
-	sc_r11    uint32
-	sc_r12    uint32
-	sc_usr_sp uint32
-	sc_usr_lr uint32
-	sc_svc_lr uint32
-	sc_pc     uint32
-}
-
-type siginfo struct {
-	si_signo int32
-	si_code  int32
-	si_errno int32
-	_data    [116]byte
-}
-
-type stackt struct {
-	ss_sp    uintptr
-	ss_size  uintptr
-	ss_flags int32
-}
-
-type timespec struct {
-	tv_sec  int64
-	tv_nsec int32
-}
-
-func (ts *timespec) set_sec(x int64) {
-	ts.tv_sec = x
-}
-
-func (ts *timespec) set_nsec(x int32) {
-	ts.tv_nsec = x
-}
-
-type timeval struct {
-	tv_sec  int64
-	tv_usec int32
-}
-
-func (tv *timeval) set_usec(x int32) {
-	tv.tv_usec = x
-}
-
-type itimerval struct {
-	it_interval timeval
-	it_value    timeval
-}
-
-type keventt struct {
-	ident  uint32
-	filter int16
-	flags  uint16
-	fflags uint32
-	data   int64
-	udata  *byte
-}
diff --git a/src/runtime/defs_plan9_386.go b/src/runtime/defs_plan9_386.go
deleted file mode 100644
index 3574cb6..0000000
--- a/src/runtime/defs_plan9_386.go
+++ /dev/null
@@ -1,51 +0,0 @@
-package runtime
-
-const _PAGESIZE = 0x1000
-
-type ureg struct {
-	di    uint32 /* general registers */
-	si    uint32 /* ... */
-	bp    uint32 /* ... */
-	nsp   uint32
-	bx    uint32 /* ... */
-	dx    uint32 /* ... */
-	cx    uint32 /* ... */
-	ax    uint32 /* ... */
-	gs    uint32 /* data segments */
-	fs    uint32 /* ... */
-	es    uint32 /* ... */
-	ds    uint32 /* ... */
-	trap  uint32 /* trap _type */
-	ecode uint32 /* error code (or zero) */
-	pc    uint32 /* pc */
-	cs    uint32 /* old context */
-	flags uint32 /* old flags */
-	sp    uint32
-	ss    uint32 /* old stack segment */
-}
-
-type sigctxt struct {
-	u *ureg
-}
-
-func (c *sigctxt) pc() uintptr { return uintptr(c.u.pc) }
-func (c *sigctxt) sp() uintptr { return uintptr(c.u.sp) }
-
-func (c *sigctxt) setpc(x uintptr) { c.u.pc = uint32(x) }
-func (c *sigctxt) setsp(x uintptr) { c.u.sp = uint32(x) }
-
-func dumpregs(u *ureg) {
-	print("ax    ", hex(u.ax), "\n")
-	print("bx    ", hex(u.bx), "\n")
-	print("cx    ", hex(u.cx), "\n")
-	print("dx    ", hex(u.dx), "\n")
-	print("di    ", hex(u.di), "\n")
-	print("si    ", hex(u.si), "\n")
-	print("bp    ", hex(u.bp), "\n")
-	print("sp    ", hex(u.sp), "\n")
-	print("pc    ", hex(u.pc), "\n")
-	print("flags ", hex(u.flags), "\n")
-	print("cs    ", hex(u.cs), "\n")
-	print("fs    ", hex(u.fs), "\n")
-	print("gs    ", hex(u.gs), "\n")
-}
diff --git a/src/runtime/defs_plan9_amd64.go b/src/runtime/defs_plan9_amd64.go
deleted file mode 100644
index 54b4d39..0000000
--- a/src/runtime/defs_plan9_amd64.go
+++ /dev/null
@@ -1,68 +0,0 @@
-package runtime
-
-const _PAGESIZE = 0x1000
-
-type ureg struct {
-	ax  uint64
-	bx  uint64
-	cx  uint64
-	dx  uint64
-	si  uint64
-	di  uint64
-	bp  uint64
-	r8  uint64
-	r9  uint64
-	r10 uint64
-	r11 uint64
-	r12 uint64
-	r13 uint64
-	r14 uint64
-	r15 uint64
-
-	ds uint16
-	es uint16
-	fs uint16
-	gs uint16
-
-	_type uint64
-	error uint64 /* error code (or zero) */
-	ip    uint64 /* pc */
-	cs    uint64 /* old context */
-	flags uint64 /* old flags */
-	sp    uint64 /* sp */
-	ss    uint64 /* old stack segment */
-}
-
-type sigctxt struct {
-	u *ureg
-}
-
-func (c *sigctxt) pc() uintptr { return uintptr(c.u.ip) }
-func (c *sigctxt) sp() uintptr { return uintptr(c.u.sp) }
-
-func (c *sigctxt) setpc(x uintptr) { c.u.ip = uint64(x) }
-func (c *sigctxt) setsp(x uintptr) { c.u.sp = uint64(x) }
-
-func dumpregs(u *ureg) {
-	print("ax    ", hex(u.ax), "\n")
-	print("bx    ", hex(u.bx), "\n")
-	print("cx    ", hex(u.cx), "\n")
-	print("dx    ", hex(u.dx), "\n")
-	print("di    ", hex(u.di), "\n")
-	print("si    ", hex(u.si), "\n")
-	print("bp    ", hex(u.bp), "\n")
-	print("sp    ", hex(u.sp), "\n")
-	print("r8    ", hex(u.r8), "\n")
-	print("r9    ", hex(u.r9), "\n")
-	print("r10   ", hex(u.r10), "\n")
-	print("r11   ", hex(u.r11), "\n")
-	print("r12   ", hex(u.r12), "\n")
-	print("r13   ", hex(u.r13), "\n")
-	print("r14   ", hex(u.r14), "\n")
-	print("r15   ", hex(u.r15), "\n")
-	print("ip    ", hex(u.ip), "\n")
-	print("flags ", hex(u.flags), "\n")
-	print("cs    ", hex(u.cs), "\n")
-	print("fs    ", hex(u.fs), "\n")
-	print("gs    ", hex(u.gs), "\n")
-}
diff --git a/src/runtime/defs_windows_386.go b/src/runtime/defs_windows_386.go
deleted file mode 100644
index bac6ce7..0000000
--- a/src/runtime/defs_windows_386.go
+++ /dev/null
@@ -1,131 +0,0 @@
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_windows.go
-
-package runtime
-
-const (
-	_PROT_NONE  = 0
-	_PROT_READ  = 1
-	_PROT_WRITE = 2
-	_PROT_EXEC  = 4
-
-	_MAP_ANON    = 1
-	_MAP_PRIVATE = 2
-
-	_DUPLICATE_SAME_ACCESS   = 0x2
-	_THREAD_PRIORITY_HIGHEST = 0x2
-
-	_SIGINT           = 0x2
-	_CTRL_C_EVENT     = 0x0
-	_CTRL_BREAK_EVENT = 0x1
-
-	_CONTEXT_CONTROL = 0x10001
-	_CONTEXT_FULL    = 0x10007
-
-	_EXCEPTION_ACCESS_VIOLATION     = 0xc0000005
-	_EXCEPTION_BREAKPOINT           = 0x80000003
-	_EXCEPTION_FLT_DENORMAL_OPERAND = 0xc000008d
-	_EXCEPTION_FLT_DIVIDE_BY_ZERO   = 0xc000008e
-	_EXCEPTION_FLT_INEXACT_RESULT   = 0xc000008f
-	_EXCEPTION_FLT_OVERFLOW         = 0xc0000091
-	_EXCEPTION_FLT_UNDERFLOW        = 0xc0000093
-	_EXCEPTION_INT_DIVIDE_BY_ZERO   = 0xc0000094
-	_EXCEPTION_INT_OVERFLOW         = 0xc0000095
-
-	_INFINITE     = 0xffffffff
-	_WAIT_TIMEOUT = 0x102
-
-	_EXCEPTION_CONTINUE_EXECUTION = -0x1
-	_EXCEPTION_CONTINUE_SEARCH    = 0x0
-)
-
-type systeminfo struct {
-	anon0                       [4]byte
-	dwpagesize                  uint32
-	lpminimumapplicationaddress *byte
-	lpmaximumapplicationaddress *byte
-	dwactiveprocessormask       uint32
-	dwnumberofprocessors        uint32
-	dwprocessortype             uint32
-	dwallocationgranularity     uint32
-	wprocessorlevel             uint16
-	wprocessorrevision          uint16
-}
-
-type exceptionrecord struct {
-	exceptioncode        uint32
-	exceptionflags       uint32
-	exceptionrecord      *exceptionrecord
-	exceptionaddress     *byte
-	numberparameters     uint32
-	exceptioninformation [15]uint32
-}
-
-type floatingsavearea struct {
-	controlword   uint32
-	statusword    uint32
-	tagword       uint32
-	erroroffset   uint32
-	errorselector uint32
-	dataoffset    uint32
-	dataselector  uint32
-	registerarea  [80]uint8
-	cr0npxstate   uint32
-}
-
-type context struct {
-	contextflags      uint32
-	dr0               uint32
-	dr1               uint32
-	dr2               uint32
-	dr3               uint32
-	dr6               uint32
-	dr7               uint32
-	floatsave         floatingsavearea
-	seggs             uint32
-	segfs             uint32
-	seges             uint32
-	segds             uint32
-	edi               uint32
-	esi               uint32
-	ebx               uint32
-	edx               uint32
-	ecx               uint32
-	eax               uint32
-	ebp               uint32
-	eip               uint32
-	segcs             uint32
-	eflags            uint32
-	esp               uint32
-	segss             uint32
-	extendedregisters [512]uint8
-}
-
-func (c *context) ip() uintptr { return uintptr(c.eip) }
-func (c *context) sp() uintptr { return uintptr(c.esp) }
-
-func (c *context) setip(x uintptr) { c.eip = uint32(x) }
-func (c *context) setsp(x uintptr) { c.esp = uint32(x) }
-
-func dumpregs(r *context) {
-	print("eax     ", hex(r.eax), "\n")
-	print("ebx     ", hex(r.ebx), "\n")
-	print("ecx     ", hex(r.ecx), "\n")
-	print("edx     ", hex(r.edx), "\n")
-	print("edi     ", hex(r.edi), "\n")
-	print("esi     ", hex(r.esi), "\n")
-	print("ebp     ", hex(r.ebp), "\n")
-	print("esp     ", hex(r.esp), "\n")
-	print("eip     ", hex(r.eip), "\n")
-	print("eflags  ", hex(r.eflags), "\n")
-	print("cs      ", hex(r.segcs), "\n")
-	print("fs      ", hex(r.segfs), "\n")
-	print("gs      ", hex(r.seggs), "\n")
-}
-
-type overlapped struct {
-	internal     uint32
-	internalhigh uint32
-	anon0        [8]byte
-	hevent       *byte
-}
diff --git a/src/runtime/defs_windows_amd64.go b/src/runtime/defs_windows_amd64.go
deleted file mode 100644
index 6e04568..0000000
--- a/src/runtime/defs_windows_amd64.go
+++ /dev/null
@@ -1,153 +0,0 @@
-// created by cgo -cdefs and then converted to Go
-// cgo -cdefs defs_windows.go
-
-package runtime
-
-const (
-	_PROT_NONE  = 0
-	_PROT_READ  = 1
-	_PROT_WRITE = 2
-	_PROT_EXEC  = 4
-
-	_MAP_ANON    = 1
-	_MAP_PRIVATE = 2
-
-	_DUPLICATE_SAME_ACCESS   = 0x2
-	_THREAD_PRIORITY_HIGHEST = 0x2
-
-	_SIGINT           = 0x2
-	_CTRL_C_EVENT     = 0x0
-	_CTRL_BREAK_EVENT = 0x1
-
-	_CONTEXT_CONTROL = 0x100001
-	_CONTEXT_FULL    = 0x10000b
-
-	_EXCEPTION_ACCESS_VIOLATION     = 0xc0000005
-	_EXCEPTION_BREAKPOINT           = 0x80000003
-	_EXCEPTION_FLT_DENORMAL_OPERAND = 0xc000008d
-	_EXCEPTION_FLT_DIVIDE_BY_ZERO   = 0xc000008e
-	_EXCEPTION_FLT_INEXACT_RESULT   = 0xc000008f
-	_EXCEPTION_FLT_OVERFLOW         = 0xc0000091
-	_EXCEPTION_FLT_UNDERFLOW        = 0xc0000093
-	_EXCEPTION_INT_DIVIDE_BY_ZERO   = 0xc0000094
-	_EXCEPTION_INT_OVERFLOW         = 0xc0000095
-
-	_INFINITE     = 0xffffffff
-	_WAIT_TIMEOUT = 0x102
-
-	_EXCEPTION_CONTINUE_EXECUTION = -0x1
-	_EXCEPTION_CONTINUE_SEARCH    = 0x0
-)
-
-type systeminfo struct {
-	anon0                       [4]byte
-	dwpagesize                  uint32
-	lpminimumapplicationaddress *byte
-	lpmaximumapplicationaddress *byte
-	dwactiveprocessormask       uint64
-	dwnumberofprocessors        uint32
-	dwprocessortype             uint32
-	dwallocationgranularity     uint32
-	wprocessorlevel             uint16
-	wprocessorrevision          uint16
-}
-
-type exceptionrecord struct {
-	exceptioncode        uint32
-	exceptionflags       uint32
-	exceptionrecord      *exceptionrecord
-	exceptionaddress     *byte
-	numberparameters     uint32
-	pad_cgo_0            [4]byte
-	exceptioninformation [15]uint64
-}
-
-type m128a struct {
-	low  uint64
-	high int64
-}
-
-type context struct {
-	p1home               uint64
-	p2home               uint64
-	p3home               uint64
-	p4home               uint64
-	p5home               uint64
-	p6home               uint64
-	contextflags         uint32
-	mxcsr                uint32
-	segcs                uint16
-	segds                uint16
-	seges                uint16
-	segfs                uint16
-	seggs                uint16
-	segss                uint16
-	eflags               uint32
-	dr0                  uint64
-	dr1                  uint64
-	dr2                  uint64
-	dr3                  uint64
-	dr6                  uint64
-	dr7                  uint64
-	rax                  uint64
-	rcx                  uint64
-	rdx                  uint64
-	rbx                  uint64
-	rsp                  uint64
-	rbp                  uint64
-	rsi                  uint64
-	rdi                  uint64
-	r8                   uint64
-	r9                   uint64
-	r10                  uint64
-	r11                  uint64
-	r12                  uint64
-	r13                  uint64
-	r14                  uint64
-	r15                  uint64
-	rip                  uint64
-	anon0                [512]byte
-	vectorregister       [26]m128a
-	vectorcontrol        uint64
-	debugcontrol         uint64
-	lastbranchtorip      uint64
-	lastbranchfromrip    uint64
-	lastexceptiontorip   uint64
-	lastexceptionfromrip uint64
-}
-
-func (c *context) ip() uintptr { return uintptr(c.rip) }
-func (c *context) sp() uintptr { return uintptr(c.rsp) }
-
-func (c *context) setip(x uintptr) { c.rip = uint64(x) }
-func (c *context) setsp(x uintptr) { c.rsp = uint64(x) }
-
-func dumpregs(r *context) {
-	print("rax     ", hex(r.rax), "\n")
-	print("rbx     ", hex(r.rbx), "\n")
-	print("rcx     ", hex(r.rcx), "\n")
-	print("rdi     ", hex(r.rdi), "\n")
-	print("rsi     ", hex(r.rsi), "\n")
-	print("rbp     ", hex(r.rbp), "\n")
-	print("rsp     ", hex(r.rsp), "\n")
-	print("r8      ", hex(r.r8), "\n")
-	print("r9      ", hex(r.r9), "\n")
-	print("r10     ", hex(r.r10), "\n")
-	print("r11     ", hex(r.r11), "\n")
-	print("r12     ", hex(r.r12), "\n")
-	print("r13     ", hex(r.r13), "\n")
-	print("r14     ", hex(r.r14), "\n")
-	print("r15     ", hex(r.r15), "\n")
-	print("rip     ", hex(r.rip), "\n")
-	print("rflags  ", hex(r.eflags), "\n")
-	print("cs      ", hex(r.segcs), "\n")
-	print("fs      ", hex(r.segfs), "\n")
-	print("gs      ", hex(r.seggs), "\n")
-}
-
-type overlapped struct {
-	internal     uint64
-	internalhigh uint64
-	anon0        [8]byte
-	hevent       *byte
-}
diff --git a/src/runtime/duff_386.s b/src/runtime/duff_386.s
deleted file mode 100644
index 5575455..0000000
--- a/src/runtime/duff_386.s
+++ /dev/null
@@ -1,779 +0,0 @@
-// AUTO-GENERATED by mkduff.go
-// Run go generate from src/runtime to update.
-// See mkduff.go for comments.
-
-#include "textflag.h"
-
-TEXT runtime·duffzero(SB), NOSPLIT, $0-0
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	STOSL
-	RET
-
-TEXT runtime·duffcopy(SB), NOSPLIT, $0-0
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	MOVL	(SI), CX
-	ADDL	$4, SI
-	MOVL	CX, (DI)
-	ADDL	$4, DI
-
-	RET
diff --git a/src/runtime/duff_amd64.s b/src/runtime/duff_amd64.s
deleted file mode 100644
index 0b51228..0000000
--- a/src/runtime/duff_amd64.s
+++ /dev/null
@@ -1,841 +0,0 @@
-// AUTO-GENERATED by mkduff.go
-// Run go generate from src/runtime to update.
-// See mkduff.go for comments.
-
-#include "textflag.h"
-
-TEXT runtime·duffzero(SB), NOSPLIT, $0-0
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	MOVQ	AX,(DI)
-	MOVQ	AX,8(DI)
-	MOVQ	AX,16(DI)
-	MOVQ	AX,24(DI)
-	ADDQ	$32,DI
-
-	STOSQ
-	STOSQ
-	STOSQ
-	STOSQ
-	RET
-
-TEXT runtime·duffcopy(SB), NOSPLIT, $0-0
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	MOVQ	(SI), CX
-	ADDQ	$8, SI
-	MOVQ	CX, (DI)
-	ADDQ	$8, DI
-
-	RET
diff --git a/src/runtime/duff_arm.s b/src/runtime/duff_arm.s
deleted file mode 100644
index da9f0cb..0000000
--- a/src/runtime/duff_arm.s
+++ /dev/null
@@ -1,523 +0,0 @@
-// AUTO-GENERATED by mkduff.go
-// Run go generate from src/runtime to update.
-// See mkduff.go for comments.
-
-#include "textflag.h"
-
-TEXT runtime·duffzero(SB), NOSPLIT, $0-0
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	MOVW.P	R0, 4(R1)
-	RET
-
-TEXT runtime·duffcopy(SB), NOSPLIT, $0-0
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	MOVW.P	4(R1), R0
-	MOVW.P	R0, 4(R2)
-
-	RET
diff --git a/src/runtime/duff_arm64.s b/src/runtime/duff_arm64.s
deleted file mode 100644
index 6d4bb15..0000000
--- a/src/runtime/duff_arm64.s
+++ /dev/null
@@ -1,138 +0,0 @@
-// AUTO-GENERATED by mkduff.go
-// Run go generate from src/runtime to update.
-// See mkduff.go for comments.
-
-#include "textflag.h"
-
-TEXT runtime·duffzero(SB), NOSPLIT, $-8-0
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	MOVD.W	ZR, 8(R16)
-	RET
-
-// TODO: Implement runtime·duffcopy.
diff --git a/src/runtime/duff_ppc64x.s b/src/runtime/duff_ppc64x.s
deleted file mode 100644
index 14bc33e..0000000
--- a/src/runtime/duff_ppc64x.s
+++ /dev/null
@@ -1,140 +0,0 @@
-// AUTO-GENERATED by mkduff.go
-// Run go generate from src/runtime to update.
-// See mkduff.go for comments.
-
-// +build ppc64 ppc64le
-
-#include "textflag.h"
-
-TEXT runtime·duffzero(SB), NOSPLIT, $-8-0
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	MOVDU	R0, 8(R3)
-	RET
-
-// TODO: Implement runtime·duffcopy.
diff --git a/src/runtime/env_test.go b/src/runtime/env_test.go
deleted file mode 100644
index 2399e46..0000000
--- a/src/runtime/env_test.go
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime_test
-
-import (
-	"runtime"
-	"syscall"
-	"testing"
-)
-
-func TestFixedGOROOT(t *testing.T) {
-	if runtime.GOOS == "plan9" {
-		t.Skipf("skipping plan9, it is inconsistent by allowing GOROOT to be updated by Setenv")
-	}
-
-	// Restore both the real GOROOT environment variable, and runtime's copies:
-	if orig, ok := syscall.Getenv("GOROOT"); ok {
-		defer syscall.Setenv("GOROOT", orig)
-	} else {
-		defer syscall.Unsetenv("GOROOT")
-	}
-	envs := runtime.Envs()
-	oldenvs := append([]string{}, envs...)
-	defer runtime.SetEnvs(oldenvs)
-
-	// attempt to reuse existing envs backing array.
-	want := runtime.GOROOT()
-	runtime.SetEnvs(append(envs[:0], "GOROOT="+want))
-
-	if got := runtime.GOROOT(); got != want {
-		t.Errorf(`initial runtime.GOROOT()=%q, want %q`, got, want)
-	}
-	if err := syscall.Setenv("GOROOT", "/os"); err != nil {
-		t.Fatal(err)
-	}
-	if got := runtime.GOROOT(); got != want {
-		t.Errorf(`after setenv runtime.GOROOT()=%q, want %q`, got, want)
-	}
-	if err := syscall.Unsetenv("GOROOT"); err != nil {
-		t.Fatal(err)
-	}
-	if got := runtime.GOROOT(); got != want {
-		t.Errorf(`after unsetenv runtime.GOROOT()=%q, want %q`, got, want)
-	}
-}
diff --git a/src/runtime/export_arm_test.go b/src/runtime/export_arm_test.go
deleted file mode 100644
index 446d264..0000000
--- a/src/runtime/export_arm_test.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Export guts for testing.
-
-package runtime
-
-var Usplit = usplit
diff --git a/src/runtime/export_linux_test.go b/src/runtime/export_linux_test.go
deleted file mode 100644
index c8b9746..0000000
--- a/src/runtime/export_linux_test.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Export guts for testing.
-
-package runtime
-
-var NewOSProc0 = newosproc0
diff --git a/src/runtime/export_windows_test.go b/src/runtime/export_windows_test.go
deleted file mode 100644
index 61fcef9..0000000
--- a/src/runtime/export_windows_test.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Export guts for testing.
-
-package runtime
-
-var TestingWER = &testingWER
diff --git a/src/runtime/gengoos.go b/src/runtime/gengoos.go
deleted file mode 100644
index 06621c8..0000000
--- a/src/runtime/gengoos.go
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-package main
-
-import (
-	"bytes"
-	"fmt"
-	"io/ioutil"
-	"log"
-	"strconv"
-	"strings"
-)
-
-var gooses, goarches []string
-
-func main() {
-	data, err := ioutil.ReadFile("../go/build/syslist.go")
-	if err != nil {
-		log.Fatal(err)
-	}
-	const (
-		goosPrefix   = `const goosList = `
-		goarchPrefix = `const goarchList = `
-	)
-	for _, line := range strings.Split(string(data), "\n") {
-		if strings.HasPrefix(line, goosPrefix) {
-			text, err := strconv.Unquote(strings.TrimPrefix(line, goosPrefix))
-			if err != nil {
-				log.Fatalf("parsing goosList %#q: %v", strings.TrimPrefix(line, goosPrefix), err)
-			}
-			gooses = strings.Fields(text)
-		}
-		if strings.HasPrefix(line, goarchPrefix) {
-			text, err := strconv.Unquote(strings.TrimPrefix(line, goarchPrefix))
-			if err != nil {
-				log.Fatal("parsing goarchList: %v", err)
-			}
-			goarches = strings.Fields(text)
-		}
-	}
-
-	for _, target := range gooses {
-		var buf bytes.Buffer
-		fmt.Fprintf(&buf, "// generated by gengoos.go using 'go generate'\n\n")
-		if target == "linux" {
-			fmt.Fprintf(&buf, "// +build !android\n\n") // must explicitly exclude android for linux
-		}
-		fmt.Fprintf(&buf, "package runtime\n\n")
-		fmt.Fprintf(&buf, "const theGoos = `%s`\n\n", target)
-		for _, goos := range gooses {
-			value := 0
-			if goos == target {
-				value = 1
-			}
-			fmt.Fprintf(&buf, "const goos_%s = %d\n", goos, value)
-		}
-		err := ioutil.WriteFile("zgoos_"+target+".go", buf.Bytes(), 0666)
-		if err != nil {
-			log.Fatal(err)
-		}
-	}
-
-	for _, target := range goarches {
-		var buf bytes.Buffer
-		fmt.Fprintf(&buf, "// generated by gengoos.go using 'go generate'\n\n")
-		fmt.Fprintf(&buf, "package runtime\n\n")
-		fmt.Fprintf(&buf, "const theGoarch = `%s`\n\n", target)
-		for _, goarch := range goarches {
-			value := 0
-			if goarch == target {
-				value = 1
-			}
-			fmt.Fprintf(&buf, "const goarch_%s = %d\n", goarch, value)
-		}
-		err := ioutil.WriteFile("zgoarch_"+target+".go", buf.Bytes(), 0666)
-		if err != nil {
-			log.Fatal(err)
-		}
-	}
-}
diff --git a/src/runtime/go_tls.h b/src/runtime/go_tls.h
deleted file mode 100644
index 6a707cf..0000000
--- a/src/runtime/go_tls.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#ifdef GOARCH_arm
-#define LR R14
-#endif
-
-#ifdef GOARCH_amd64
-#define	get_tls(r)	MOVQ TLS, r
-#define	g(r)	0(r)(TLS*1)
-#endif
-
-#ifdef GOARCH_amd64p32
-#define	get_tls(r)	MOVL TLS, r
-#define	g(r)	0(r)(TLS*1)
-#endif
-
-#ifdef GOARCH_386
-#define	get_tls(r)	MOVL TLS, r
-#define	g(r)	0(r)(TLS*1)
-#endif
diff --git a/src/runtime/hash32.go b/src/runtime/hash32.go
deleted file mode 100644
index 79fb15c..0000000
--- a/src/runtime/hash32.go
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Hashing algorithm inspired by
-//   xxhash: https://code.google.com/p/xxhash/
-// cityhash: https://code.google.com/p/cityhash/
-
-// +build 386 arm
-
-package runtime
-
-import "unsafe"
-
-const (
-	// Constants for multiplication: four random odd 32-bit numbers.
-	m1 = 3168982561
-	m2 = 3339683297
-	m3 = 832293441
-	m4 = 2336365089
-)
-
-func memhash(p unsafe.Pointer, seed, s uintptr) uintptr {
-	if GOARCH == "386" && GOOS != "nacl" && useAeshash {
-		return aeshash(p, seed, s)
-	}
-	h := uint32(seed + s*hashkey[0])
-tail:
-	switch {
-	case s == 0:
-	case s < 4:
-		h ^= uint32(*(*byte)(p))
-		h ^= uint32(*(*byte)(add(p, s>>1))) << 8
-		h ^= uint32(*(*byte)(add(p, s-1))) << 16
-		h = rotl_15(h*m1) * m2
-	case s == 4:
-		h ^= readUnaligned32(p)
-		h = rotl_15(h*m1) * m2
-	case s <= 8:
-		h ^= readUnaligned32(p)
-		h = rotl_15(h*m1) * m2
-		h ^= readUnaligned32(add(p, s-4))
-		h = rotl_15(h*m1) * m2
-	case s <= 16:
-		h ^= readUnaligned32(p)
-		h = rotl_15(h*m1) * m2
-		h ^= readUnaligned32(add(p, 4))
-		h = rotl_15(h*m1) * m2
-		h ^= readUnaligned32(add(p, s-8))
-		h = rotl_15(h*m1) * m2
-		h ^= readUnaligned32(add(p, s-4))
-		h = rotl_15(h*m1) * m2
-	default:
-		v1 := h
-		v2 := uint32(hashkey[1])
-		v3 := uint32(hashkey[2])
-		v4 := uint32(hashkey[3])
-		for s >= 16 {
-			v1 ^= readUnaligned32(p)
-			v1 = rotl_15(v1*m1) * m2
-			p = add(p, 4)
-			v2 ^= readUnaligned32(p)
-			v2 = rotl_15(v2*m2) * m3
-			p = add(p, 4)
-			v3 ^= readUnaligned32(p)
-			v3 = rotl_15(v3*m3) * m4
-			p = add(p, 4)
-			v4 ^= readUnaligned32(p)
-			v4 = rotl_15(v4*m4) * m1
-			p = add(p, 4)
-			s -= 16
-		}
-		h = v1 ^ v2 ^ v3 ^ v4
-		goto tail
-	}
-	h ^= h >> 17
-	h *= m3
-	h ^= h >> 13
-	h *= m4
-	h ^= h >> 16
-	return uintptr(h)
-}
-
-// Note: in order to get the compiler to issue rotl instructions, we
-// need to constant fold the shift amount by hand.
-// TODO: convince the compiler to issue rotl instructions after inlining.
-func rotl_15(x uint32) uint32 {
-	return (x << 15) | (x >> (32 - 15))
-}
diff --git a/src/runtime/hash64.go b/src/runtime/hash64.go
deleted file mode 100644
index 716db61..0000000
--- a/src/runtime/hash64.go
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Hashing algorithm inspired by
-//   xxhash: https://code.google.com/p/xxhash/
-// cityhash: https://code.google.com/p/cityhash/
-
-// +build amd64 amd64p32 arm64 ppc64 ppc64le
-
-package runtime
-
-import "unsafe"
-
-const (
-	// Constants for multiplication: four random odd 64-bit numbers.
-	m1 = 16877499708836156737
-	m2 = 2820277070424839065
-	m3 = 9497967016996688599
-	m4 = 15839092249703872147
-)
-
-func memhash(p unsafe.Pointer, seed, s uintptr) uintptr {
-	if GOARCH == "amd64" && GOOS != "nacl" && useAeshash {
-		return aeshash(p, seed, s)
-	}
-	h := uint64(seed + s*hashkey[0])
-tail:
-	switch {
-	case s == 0:
-	case s < 4:
-		h ^= uint64(*(*byte)(p))
-		h ^= uint64(*(*byte)(add(p, s>>1))) << 8
-		h ^= uint64(*(*byte)(add(p, s-1))) << 16
-		h = rotl_31(h*m1) * m2
-	case s <= 8:
-		h ^= uint64(readUnaligned32(p))
-		h ^= uint64(readUnaligned32(add(p, s-4))) << 32
-		h = rotl_31(h*m1) * m2
-	case s <= 16:
-		h ^= readUnaligned64(p)
-		h = rotl_31(h*m1) * m2
-		h ^= readUnaligned64(add(p, s-8))
-		h = rotl_31(h*m1) * m2
-	case s <= 32:
-		h ^= readUnaligned64(p)
-		h = rotl_31(h*m1) * m2
-		h ^= readUnaligned64(add(p, 8))
-		h = rotl_31(h*m1) * m2
-		h ^= readUnaligned64(add(p, s-16))
-		h = rotl_31(h*m1) * m2
-		h ^= readUnaligned64(add(p, s-8))
-		h = rotl_31(h*m1) * m2
-	default:
-		v1 := h
-		v2 := uint64(hashkey[1])
-		v3 := uint64(hashkey[2])
-		v4 := uint64(hashkey[3])
-		for s >= 32 {
-			v1 ^= readUnaligned64(p)
-			v1 = rotl_31(v1*m1) * m2
-			p = add(p, 8)
-			v2 ^= readUnaligned64(p)
-			v2 = rotl_31(v2*m2) * m3
-			p = add(p, 8)
-			v3 ^= readUnaligned64(p)
-			v3 = rotl_31(v3*m3) * m4
-			p = add(p, 8)
-			v4 ^= readUnaligned64(p)
-			v4 = rotl_31(v4*m4) * m1
-			p = add(p, 8)
-			s -= 32
-		}
-		h = v1 ^ v2 ^ v3 ^ v4
-		goto tail
-	}
-
-	h ^= h >> 29
-	h *= m3
-	h ^= h >> 32
-	return uintptr(h)
-}
-
-// Note: in order to get the compiler to issue rotl instructions, we
-// need to constant fold the shift amount by hand.
-// TODO: convince the compiler to issue rotl instructions after inlining.
-func rotl_31(x uint64) uint64 {
-	return (x << 31) | (x >> (64 - 31))
-}
diff --git a/src/runtime/heapdump.go b/src/runtime/heapdump.go
deleted file mode 100644
index 492ea92..0000000
--- a/src/runtime/heapdump.go
+++ /dev/null
@@ -1,735 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Implementation of runtime/debug.WriteHeapDump.  Writes all
-// objects in the heap plus additional info (roots, threads,
-// finalizers, etc.) to a file.
-
-// The format of the dumped file is described at
-// https://golang.org/s/go14heapdump.
-
-package runtime
-
-import "unsafe"
-
-//go:linkname runtime_debug_WriteHeapDump runtime/debug.WriteHeapDump
-func runtime_debug_WriteHeapDump(fd uintptr) {
-	stopTheWorld("write heap dump")
-
-	systemstack(func() {
-		writeheapdump_m(fd)
-	})
-
-	startTheWorld()
-}
-
-const (
-	fieldKindEol       = 0
-	fieldKindPtr       = 1
-	fieldKindIface     = 2
-	fieldKindEface     = 3
-	tagEOF             = 0
-	tagObject          = 1
-	tagOtherRoot       = 2
-	tagType            = 3
-	tagGoroutine       = 4
-	tagStackFrame      = 5
-	tagParams          = 6
-	tagFinalizer       = 7
-	tagItab            = 8
-	tagOSThread        = 9
-	tagMemStats        = 10
-	tagQueuedFinalizer = 11
-	tagData            = 12
-	tagBSS             = 13
-	tagDefer           = 14
-	tagPanic           = 15
-	tagMemProf         = 16
-	tagAllocSample     = 17
-)
-
-var dumpfd uintptr // fd to write the dump to.
-var tmpbuf []byte
-
-// buffer of pending write data
-const (
-	bufSize = 4096
-)
-
-var buf [bufSize]byte
-var nbuf uintptr
-
-func dwrite(data unsafe.Pointer, len uintptr) {
-	if len == 0 {
-		return
-	}
-	if nbuf+len <= bufSize {
-		copy(buf[nbuf:], (*[bufSize]byte)(data)[:len])
-		nbuf += len
-		return
-	}
-
-	write(dumpfd, (unsafe.Pointer)(&buf), int32(nbuf))
-	if len >= bufSize {
-		write(dumpfd, data, int32(len))
-		nbuf = 0
-	} else {
-		copy(buf[:], (*[bufSize]byte)(data)[:len])
-		nbuf = len
-	}
-}
-
-func dwritebyte(b byte) {
-	dwrite(unsafe.Pointer(&b), 1)
-}
-
-func flush() {
-	write(dumpfd, (unsafe.Pointer)(&buf), int32(nbuf))
-	nbuf = 0
-}
-
-// Cache of types that have been serialized already.
-// We use a type's hash field to pick a bucket.
-// Inside a bucket, we keep a list of types that
-// have been serialized so far, most recently used first.
-// Note: when a bucket overflows we may end up
-// serializing a type more than once.  That's ok.
-const (
-	typeCacheBuckets = 256
-	typeCacheAssoc   = 4
-)
-
-type typeCacheBucket struct {
-	t [typeCacheAssoc]*_type
-}
-
-var typecache [typeCacheBuckets]typeCacheBucket
-
-// dump a uint64 in a varint format parseable by encoding/binary
-func dumpint(v uint64) {
-	var buf [10]byte
-	var n int
-	for v >= 0x80 {
-		buf[n] = byte(v | 0x80)
-		n++
-		v >>= 7
-	}
-	buf[n] = byte(v)
-	n++
-	dwrite(unsafe.Pointer(&buf), uintptr(n))
-}
-
-func dumpbool(b bool) {
-	if b {
-		dumpint(1)
-	} else {
-		dumpint(0)
-	}
-}
-
-// dump varint uint64 length followed by memory contents
-func dumpmemrange(data unsafe.Pointer, len uintptr) {
-	dumpint(uint64(len))
-	dwrite(data, len)
-}
-
-func dumpslice(b []byte) {
-	dumpint(uint64(len(b)))
-	if len(b) > 0 {
-		dwrite(unsafe.Pointer(&b[0]), uintptr(len(b)))
-	}
-}
-
-func dumpstr(s string) {
-	sp := (*stringStruct)(unsafe.Pointer(&s))
-	dumpmemrange(sp.str, uintptr(sp.len))
-}
-
-// dump information for a type
-func dumptype(t *_type) {
-	if t == nil {
-		return
-	}
-
-	// If we've definitely serialized the type before,
-	// no need to do it again.
-	b := &typecache[t.hash&(typeCacheBuckets-1)]
-	if t == b.t[0] {
-		return
-	}
-	for i := 1; i < typeCacheAssoc; i++ {
-		if t == b.t[i] {
-			// Move-to-front
-			for j := i; j > 0; j-- {
-				b.t[j] = b.t[j-1]
-			}
-			b.t[0] = t
-			return
-		}
-	}
-
-	// Might not have been dumped yet.  Dump it and
-	// remember we did so.
-	for j := typeCacheAssoc - 1; j > 0; j-- {
-		b.t[j] = b.t[j-1]
-	}
-	b.t[0] = t
-
-	// dump the type
-	dumpint(tagType)
-	dumpint(uint64(uintptr(unsafe.Pointer(t))))
-	dumpint(uint64(t.size))
-	if t.x == nil || t.x.pkgpath == nil || t.x.name == nil {
-		dumpstr(*t._string)
-	} else {
-		pkgpath := (*stringStruct)(unsafe.Pointer(&t.x.pkgpath))
-		name := (*stringStruct)(unsafe.Pointer(&t.x.name))
-		dumpint(uint64(uintptr(pkgpath.len) + 1 + uintptr(name.len)))
-		dwrite(pkgpath.str, uintptr(pkgpath.len))
-		dwritebyte('.')
-		dwrite(name.str, uintptr(name.len))
-	}
-	dumpbool(t.kind&kindDirectIface == 0 || t.kind&kindNoPointers == 0)
-}
-
-// dump an object
-func dumpobj(obj unsafe.Pointer, size uintptr, bv bitvector) {
-	dumpbvtypes(&bv, obj)
-	dumpint(tagObject)
-	dumpint(uint64(uintptr(obj)))
-	dumpmemrange(obj, size)
-	dumpfields(bv)
-}
-
-func dumpotherroot(description string, to unsafe.Pointer) {
-	dumpint(tagOtherRoot)
-	dumpstr(description)
-	dumpint(uint64(uintptr(to)))
-}
-
-func dumpfinalizer(obj unsafe.Pointer, fn *funcval, fint *_type, ot *ptrtype) {
-	dumpint(tagFinalizer)
-	dumpint(uint64(uintptr(obj)))
-	dumpint(uint64(uintptr(unsafe.Pointer(fn))))
-	dumpint(uint64(uintptr(unsafe.Pointer(fn.fn))))
-	dumpint(uint64(uintptr(unsafe.Pointer(fint))))
-	dumpint(uint64(uintptr(unsafe.Pointer(ot))))
-}
-
-type childInfo struct {
-	// Information passed up from the callee frame about
-	// the layout of the outargs region.
-	argoff uintptr   // where the arguments start in the frame
-	arglen uintptr   // size of args region
-	args   bitvector // if args.n >= 0, pointer map of args region
-	sp     *uint8    // callee sp
-	depth  uintptr   // depth in call stack (0 == most recent)
-}
-
-// dump kinds & offsets of interesting fields in bv
-func dumpbv(cbv *bitvector, offset uintptr) {
-	bv := gobv(*cbv)
-	for i := uintptr(0); i < uintptr(bv.n); i++ {
-		if bv.bytedata[i/8]>>(i%8)&1 == 1 {
-			dumpint(fieldKindPtr)
-			dumpint(uint64(offset + i*ptrSize))
-		}
-	}
-}
-
-func dumpframe(s *stkframe, arg unsafe.Pointer) bool {
-	child := (*childInfo)(arg)
-	f := s.fn
-
-	// Figure out what we can about our stack map
-	pc := s.pc
-	if pc != f.entry {
-		pc--
-	}
-	pcdata := pcdatavalue(f, _PCDATA_StackMapIndex, pc)
-	if pcdata == -1 {
-		// We do not have a valid pcdata value but there might be a
-		// stackmap for this function.  It is likely that we are looking
-		// at the function prologue, assume so and hope for the best.
-		pcdata = 0
-	}
-	stkmap := (*stackmap)(funcdata(f, _FUNCDATA_LocalsPointerMaps))
-
-	// Dump any types we will need to resolve Efaces.
-	if child.args.n >= 0 {
-		dumpbvtypes(&child.args, unsafe.Pointer(s.sp+child.argoff))
-	}
-	var bv bitvector
-	if stkmap != nil && stkmap.n > 0 {
-		bv = stackmapdata(stkmap, pcdata)
-		dumpbvtypes(&bv, unsafe.Pointer(s.varp-uintptr(bv.n*ptrSize)))
-	} else {
-		bv.n = -1
-	}
-
-	// Dump main body of stack frame.
-	dumpint(tagStackFrame)
-	dumpint(uint64(s.sp))                              // lowest address in frame
-	dumpint(uint64(child.depth))                       // # of frames deep on the stack
-	dumpint(uint64(uintptr(unsafe.Pointer(child.sp)))) // sp of child, or 0 if bottom of stack
-	dumpmemrange(unsafe.Pointer(s.sp), s.fp-s.sp)      // frame contents
-	dumpint(uint64(f.entry))
-	dumpint(uint64(s.pc))
-	dumpint(uint64(s.continpc))
-	name := funcname(f)
-	if name == "" {
-		name = "unknown function"
-	}
-	dumpstr(name)
-
-	// Dump fields in the outargs section
-	if child.args.n >= 0 {
-		dumpbv(&child.args, child.argoff)
-	} else {
-		// conservative - everything might be a pointer
-		for off := child.argoff; off < child.argoff+child.arglen; off += ptrSize {
-			dumpint(fieldKindPtr)
-			dumpint(uint64(off))
-		}
-	}
-
-	// Dump fields in the local vars section
-	if stkmap == nil {
-		// No locals information, dump everything.
-		for off := child.arglen; off < s.varp-s.sp; off += ptrSize {
-			dumpint(fieldKindPtr)
-			dumpint(uint64(off))
-		}
-	} else if stkmap.n < 0 {
-		// Locals size information, dump just the locals.
-		size := uintptr(-stkmap.n)
-		for off := s.varp - size - s.sp; off < s.varp-s.sp; off += ptrSize {
-			dumpint(fieldKindPtr)
-			dumpint(uint64(off))
-		}
-	} else if stkmap.n > 0 {
-		// Locals bitmap information, scan just the pointers in
-		// locals.
-		dumpbv(&bv, s.varp-uintptr(bv.n)*ptrSize-s.sp)
-	}
-	dumpint(fieldKindEol)
-
-	// Record arg info for parent.
-	child.argoff = s.argp - s.fp
-	child.arglen = s.arglen
-	child.sp = (*uint8)(unsafe.Pointer(s.sp))
-	child.depth++
-	stkmap = (*stackmap)(funcdata(f, _FUNCDATA_ArgsPointerMaps))
-	if stkmap != nil {
-		child.args = stackmapdata(stkmap, pcdata)
-	} else {
-		child.args.n = -1
-	}
-	return true
-}
-
-func dumpgoroutine(gp *g) {
-	var sp, pc, lr uintptr
-	if gp.syscallsp != 0 {
-		sp = gp.syscallsp
-		pc = gp.syscallpc
-		lr = 0
-	} else {
-		sp = gp.sched.sp
-		pc = gp.sched.pc
-		lr = gp.sched.lr
-	}
-
-	dumpint(tagGoroutine)
-	dumpint(uint64(uintptr(unsafe.Pointer(gp))))
-	dumpint(uint64(sp))
-	dumpint(uint64(gp.goid))
-	dumpint(uint64(gp.gopc))
-	dumpint(uint64(readgstatus(gp)))
-	dumpbool(isSystemGoroutine(gp))
-	dumpbool(false) // isbackground
-	dumpint(uint64(gp.waitsince))
-	dumpstr(gp.waitreason)
-	dumpint(uint64(uintptr(gp.sched.ctxt)))
-	dumpint(uint64(uintptr(unsafe.Pointer(gp.m))))
-	dumpint(uint64(uintptr(unsafe.Pointer(gp._defer))))
-	dumpint(uint64(uintptr(unsafe.Pointer(gp._panic))))
-
-	// dump stack
-	var child childInfo
-	child.args.n = -1
-	child.arglen = 0
-	child.sp = nil
-	child.depth = 0
-	gentraceback(pc, sp, lr, gp, 0, nil, 0x7fffffff, dumpframe, noescape(unsafe.Pointer(&child)), 0)
-
-	// dump defer & panic records
-	for d := gp._defer; d != nil; d = d.link {
-		dumpint(tagDefer)
-		dumpint(uint64(uintptr(unsafe.Pointer(d))))
-		dumpint(uint64(uintptr(unsafe.Pointer(gp))))
-		dumpint(uint64(d.sp))
-		dumpint(uint64(d.pc))
-		dumpint(uint64(uintptr(unsafe.Pointer(d.fn))))
-		dumpint(uint64(uintptr(unsafe.Pointer(d.fn.fn))))
-		dumpint(uint64(uintptr(unsafe.Pointer(d.link))))
-	}
-	for p := gp._panic; p != nil; p = p.link {
-		dumpint(tagPanic)
-		dumpint(uint64(uintptr(unsafe.Pointer(p))))
-		dumpint(uint64(uintptr(unsafe.Pointer(gp))))
-		eface := (*eface)(unsafe.Pointer(&p.arg))
-		dumpint(uint64(uintptr(unsafe.Pointer(eface._type))))
-		dumpint(uint64(uintptr(unsafe.Pointer(eface.data))))
-		dumpint(0) // was p->defer, no longer recorded
-		dumpint(uint64(uintptr(unsafe.Pointer(p.link))))
-	}
-}
-
-func dumpgs() {
-	// goroutines & stacks
-	for i := 0; uintptr(i) < allglen; i++ {
-		gp := allgs[i]
-		status := readgstatus(gp) // The world is stopped so gp will not be in a scan state.
-		switch status {
-		default:
-			print("runtime: unexpected G.status ", hex(status), "\n")
-			throw("dumpgs in STW - bad status")
-		case _Gdead:
-			// ok
-		case _Grunnable,
-			_Gsyscall,
-			_Gwaiting:
-			dumpgoroutine(gp)
-		}
-	}
-}
-
-func finq_callback(fn *funcval, obj unsafe.Pointer, nret uintptr, fint *_type, ot *ptrtype) {
-	dumpint(tagQueuedFinalizer)
-	dumpint(uint64(uintptr(obj)))
-	dumpint(uint64(uintptr(unsafe.Pointer(fn))))
-	dumpint(uint64(uintptr(unsafe.Pointer(fn.fn))))
-	dumpint(uint64(uintptr(unsafe.Pointer(fint))))
-	dumpint(uint64(uintptr(unsafe.Pointer(ot))))
-}
-
-func dumproots() {
-	// TODO(mwhudson): dump datamask etc from all objects
-	// data segment
-	dumpbvtypes(&firstmoduledata.gcdatamask, unsafe.Pointer(firstmoduledata.data))
-	dumpint(tagData)
-	dumpint(uint64(firstmoduledata.data))
-	dumpmemrange(unsafe.Pointer(firstmoduledata.data), firstmoduledata.edata-firstmoduledata.data)
-	dumpfields(firstmoduledata.gcdatamask)
-
-	// bss segment
-	dumpbvtypes(&firstmoduledata.gcbssmask, unsafe.Pointer(firstmoduledata.bss))
-	dumpint(tagBSS)
-	dumpint(uint64(firstmoduledata.bss))
-	dumpmemrange(unsafe.Pointer(firstmoduledata.bss), firstmoduledata.ebss-firstmoduledata.bss)
-	dumpfields(firstmoduledata.gcbssmask)
-
-	// MSpan.types
-	allspans := h_allspans
-	for spanidx := uint32(0); spanidx < mheap_.nspan; spanidx++ {
-		s := allspans[spanidx]
-		if s.state == _MSpanInUse {
-			// Finalizers
-			for sp := s.specials; sp != nil; sp = sp.next {
-				if sp.kind != _KindSpecialFinalizer {
-					continue
-				}
-				spf := (*specialfinalizer)(unsafe.Pointer(sp))
-				p := unsafe.Pointer((uintptr(s.start) << _PageShift) + uintptr(spf.special.offset))
-				dumpfinalizer(p, spf.fn, spf.fint, spf.ot)
-			}
-		}
-	}
-
-	// Finalizer queue
-	iterate_finq(finq_callback)
-}
-
-// Bit vector of free marks.
-// Needs to be as big as the largest number of objects per span.
-var freemark [_PageSize / 8]bool
-
-func dumpobjs() {
-	for i := uintptr(0); i < uintptr(mheap_.nspan); i++ {
-		s := h_allspans[i]
-		if s.state != _MSpanInUse {
-			continue
-		}
-		p := uintptr(s.start << _PageShift)
-		size := s.elemsize
-		n := (s.npages << _PageShift) / size
-		if n > uintptr(len(freemark)) {
-			throw("freemark array doesn't have enough entries")
-		}
-		for l := s.freelist; l.ptr() != nil; l = l.ptr().next {
-			freemark[(uintptr(l)-p)/size] = true
-		}
-		for j := uintptr(0); j < n; j, p = j+1, p+size {
-			if freemark[j] {
-				freemark[j] = false
-				continue
-			}
-			dumpobj(unsafe.Pointer(p), size, makeheapobjbv(p, size))
-		}
-	}
-}
-
-func dumpparams() {
-	dumpint(tagParams)
-	x := uintptr(1)
-	if *(*byte)(unsafe.Pointer(&x)) == 1 {
-		dumpbool(false) // little-endian ptrs
-	} else {
-		dumpbool(true) // big-endian ptrs
-	}
-	dumpint(ptrSize)
-	dumpint(uint64(mheap_.arena_start))
-	dumpint(uint64(mheap_.arena_used))
-	dumpint(thechar)
-	dumpstr(goexperiment)
-	dumpint(uint64(ncpu))
-}
-
-func itab_callback(tab *itab) {
-	t := tab._type
-	// Dump a map from itab* to the type of its data field.
-	// We want this map so we can deduce types of interface referents.
-	if t.kind&kindDirectIface == 0 {
-		// indirect - data slot is a pointer to t.
-		dumptype(t.ptrto)
-		dumpint(tagItab)
-		dumpint(uint64(uintptr(unsafe.Pointer(tab))))
-		dumpint(uint64(uintptr(unsafe.Pointer(t.ptrto))))
-	} else if t.kind&kindNoPointers == 0 {
-		// t is pointer-like - data slot is a t.
-		dumptype(t)
-		dumpint(tagItab)
-		dumpint(uint64(uintptr(unsafe.Pointer(tab))))
-		dumpint(uint64(uintptr(unsafe.Pointer(t))))
-	} else {
-		// Data slot is a scalar.  Dump type just for fun.
-		// With pointer-only interfaces, this shouldn't happen.
-		dumptype(t)
-		dumpint(tagItab)
-		dumpint(uint64(uintptr(unsafe.Pointer(tab))))
-		dumpint(uint64(uintptr(unsafe.Pointer(t))))
-	}
-}
-
-func dumpitabs() {
-	iterate_itabs(itab_callback)
-}
-
-func dumpms() {
-	for mp := allm; mp != nil; mp = mp.alllink {
-		dumpint(tagOSThread)
-		dumpint(uint64(uintptr(unsafe.Pointer(mp))))
-		dumpint(uint64(mp.id))
-		dumpint(mp.procid)
-	}
-}
-
-func dumpmemstats() {
-	dumpint(tagMemStats)
-	dumpint(memstats.alloc)
-	dumpint(memstats.total_alloc)
-	dumpint(memstats.sys)
-	dumpint(memstats.nlookup)
-	dumpint(memstats.nmalloc)
-	dumpint(memstats.nfree)
-	dumpint(memstats.heap_alloc)
-	dumpint(memstats.heap_sys)
-	dumpint(memstats.heap_idle)
-	dumpint(memstats.heap_inuse)
-	dumpint(memstats.heap_released)
-	dumpint(memstats.heap_objects)
-	dumpint(memstats.stacks_inuse)
-	dumpint(memstats.stacks_sys)
-	dumpint(memstats.mspan_inuse)
-	dumpint(memstats.mspan_sys)
-	dumpint(memstats.mcache_inuse)
-	dumpint(memstats.mcache_sys)
-	dumpint(memstats.buckhash_sys)
-	dumpint(memstats.gc_sys)
-	dumpint(memstats.other_sys)
-	dumpint(memstats.next_gc)
-	dumpint(memstats.last_gc)
-	dumpint(memstats.pause_total_ns)
-	for i := 0; i < 256; i++ {
-		dumpint(memstats.pause_ns[i])
-	}
-	dumpint(uint64(memstats.numgc))
-}
-
-func dumpmemprof_callback(b *bucket, nstk uintptr, pstk *uintptr, size, allocs, frees uintptr) {
-	stk := (*[100000]uintptr)(unsafe.Pointer(pstk))
-	dumpint(tagMemProf)
-	dumpint(uint64(uintptr(unsafe.Pointer(b))))
-	dumpint(uint64(size))
-	dumpint(uint64(nstk))
-	for i := uintptr(0); i < nstk; i++ {
-		pc := stk[i]
-		f := findfunc(pc)
-		if f == nil {
-			var buf [64]byte
-			n := len(buf)
-			n--
-			buf[n] = ')'
-			if pc == 0 {
-				n--
-				buf[n] = '0'
-			} else {
-				for pc > 0 {
-					n--
-					buf[n] = "0123456789abcdef"[pc&15]
-					pc >>= 4
-				}
-			}
-			n--
-			buf[n] = 'x'
-			n--
-			buf[n] = '0'
-			n--
-			buf[n] = '('
-			dumpslice(buf[n:])
-			dumpstr("?")
-			dumpint(0)
-		} else {
-			dumpstr(funcname(f))
-			if i > 0 && pc > f.entry {
-				pc--
-			}
-			file, line := funcline(f, pc)
-			dumpstr(file)
-			dumpint(uint64(line))
-		}
-	}
-	dumpint(uint64(allocs))
-	dumpint(uint64(frees))
-}
-
-func dumpmemprof() {
-	iterate_memprof(dumpmemprof_callback)
-	allspans := h_allspans
-	for spanidx := uint32(0); spanidx < mheap_.nspan; spanidx++ {
-		s := allspans[spanidx]
-		if s.state != _MSpanInUse {
-			continue
-		}
-		for sp := s.specials; sp != nil; sp = sp.next {
-			if sp.kind != _KindSpecialProfile {
-				continue
-			}
-			spp := (*specialprofile)(unsafe.Pointer(sp))
-			p := uintptr(s.start<<_PageShift) + uintptr(spp.special.offset)
-			dumpint(tagAllocSample)
-			dumpint(uint64(p))
-			dumpint(uint64(uintptr(unsafe.Pointer(spp.b))))
-		}
-	}
-}
-
-var dumphdr = []byte("go1.5 heap dump\n")
-
-func mdump() {
-	// make sure we're done sweeping
-	for i := uintptr(0); i < uintptr(mheap_.nspan); i++ {
-		s := h_allspans[i]
-		if s.state == _MSpanInUse {
-			mSpan_EnsureSwept(s)
-		}
-	}
-	memclr(unsafe.Pointer(&typecache), unsafe.Sizeof(typecache))
-	dwrite(unsafe.Pointer(&dumphdr[0]), uintptr(len(dumphdr)))
-	dumpparams()
-	dumpitabs()
-	dumpobjs()
-	dumpgs()
-	dumpms()
-	dumproots()
-	dumpmemstats()
-	dumpmemprof()
-	dumpint(tagEOF)
-	flush()
-}
-
-func writeheapdump_m(fd uintptr) {
-	_g_ := getg()
-	casgstatus(_g_.m.curg, _Grunning, _Gwaiting)
-	_g_.waitreason = "dumping heap"
-
-	// Update stats so we can dump them.
-	// As a side effect, flushes all the MCaches so the MSpan.freelist
-	// lists contain all the free objects.
-	updatememstats(nil)
-
-	// Set dump file.
-	dumpfd = fd
-
-	// Call dump routine.
-	mdump()
-
-	// Reset dump file.
-	dumpfd = 0
-	if tmpbuf != nil {
-		sysFree(unsafe.Pointer(&tmpbuf[0]), uintptr(len(tmpbuf)), &memstats.other_sys)
-		tmpbuf = nil
-	}
-
-	casgstatus(_g_.m.curg, _Gwaiting, _Grunning)
-}
-
-// dumpint() the kind & offset of each field in an object.
-func dumpfields(bv bitvector) {
-	dumpbv(&bv, 0)
-	dumpint(fieldKindEol)
-}
-
-// The heap dump reader needs to be able to disambiguate
-// Eface entries.  So it needs to know every type that might
-// appear in such an entry.  The following routine accomplishes that.
-// TODO(rsc, khr): Delete - no longer possible.
-
-// Dump all the types that appear in the type field of
-// any Eface described by this bit vector.
-func dumpbvtypes(bv *bitvector, base unsafe.Pointer) {
-}
-
-func makeheapobjbv(p uintptr, size uintptr) bitvector {
-	// Extend the temp buffer if necessary.
-	nptr := size / ptrSize
-	if uintptr(len(tmpbuf)) < nptr/8+1 {
-		if tmpbuf != nil {
-			sysFree(unsafe.Pointer(&tmpbuf[0]), uintptr(len(tmpbuf)), &memstats.other_sys)
-		}
-		n := nptr/8 + 1
-		p := sysAlloc(n, &memstats.other_sys)
-		if p == nil {
-			throw("heapdump: out of memory")
-		}
-		tmpbuf = (*[1 << 30]byte)(p)[:n]
-	}
-	// Convert heap bitmap to pointer bitmap.
-	for i := uintptr(0); i < nptr/8+1; i++ {
-		tmpbuf[i] = 0
-	}
-	i := uintptr(0)
-	hbits := heapBitsForAddr(p)
-	for ; i < nptr; i++ {
-		if i >= 2 && !hbits.isMarked() {
-			break // end of object
-		}
-		if hbits.isPointer() {
-			tmpbuf[i/8] |= 1 << (i % 8)
-		}
-		hbits = hbits.next()
-	}
-	return bitvector{int32(i), &tmpbuf[0]}
-}
diff --git a/src/runtime/lfstack.go b/src/runtime/lfstack.go
deleted file mode 100644
index 5838c1d..0000000
--- a/src/runtime/lfstack.go
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Lock-free stack.
-// The following code runs only on g0 stack.
-
-package runtime
-
-import "unsafe"
-
-func lfstackpush(head *uint64, node *lfnode) {
-	node.pushcnt++
-	new := lfstackPack(node, node.pushcnt)
-	if node1, _ := lfstackUnpack(new); node1 != node {
-		println("runtime: lfstackpush invalid packing: node=", node, " cnt=", hex(node.pushcnt), " packed=", hex(new), " -> node=", node1, "\n")
-		throw("lfstackpush")
-	}
-	for {
-		old := atomicload64(head)
-		node.next = old
-		if cas64(head, old, new) {
-			break
-		}
-	}
-}
-
-func lfstackpop(head *uint64) unsafe.Pointer {
-	for {
-		old := atomicload64(head)
-		if old == 0 {
-			return nil
-		}
-		node, _ := lfstackUnpack(old)
-		next := atomicload64(&node.next)
-		if cas64(head, old, next) {
-			return unsafe.Pointer(node)
-		}
-	}
-}
diff --git a/src/runtime/lfstack_32bit.go b/src/runtime/lfstack_32bit.go
deleted file mode 100644
index 4b8bcba..0000000
--- a/src/runtime/lfstack_32bit.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build 386 arm nacl
-
-package runtime
-
-import "unsafe"
-
-// On 32-bit systems, the stored uint64 has a 32-bit pointer and 32-bit count.
-
-func lfstackPack(node *lfnode, cnt uintptr) uint64 {
-	return uint64(uintptr(unsafe.Pointer(node)))<<32 | uint64(cnt)
-}
-
-func lfstackUnpack(val uint64) (node *lfnode, cnt uintptr) {
-	node = (*lfnode)(unsafe.Pointer(uintptr(val >> 32)))
-	cnt = uintptr(val)
-	return
-}
diff --git a/src/runtime/lfstack_amd64.go b/src/runtime/lfstack_amd64.go
deleted file mode 100644
index 84e2851..0000000
--- a/src/runtime/lfstack_amd64.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-// On AMD64, virtual addresses are 48-bit numbers sign extended to 64.
-// We shift the address left 16 to eliminate the sign extended part and make
-// room in the bottom for the count.
-// In addition to the 16 bits taken from the top, we can take 3 from the
-// bottom, because node must be pointer-aligned, giving a total of 19 bits
-// of count.
-
-func lfstackPack(node *lfnode, cnt uintptr) uint64 {
-	return uint64(uintptr(unsafe.Pointer(node)))<<16 | uint64(cnt&(1<<19-1))
-}
-
-func lfstackUnpack(val uint64) (node *lfnode, cnt uintptr) {
-	node = (*lfnode)(unsafe.Pointer(uintptr(int64(val) >> 19 << 3)))
-	cnt = uintptr(val & (1<<19 - 1))
-	return
-}
diff --git a/src/runtime/lfstack_darwin_arm64.go b/src/runtime/lfstack_darwin_arm64.go
deleted file mode 100644
index 54cae39..0000000
--- a/src/runtime/lfstack_darwin_arm64.go
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-// In addition to the 16 bits taken from the top, we can take 3 from the
-// bottom, because node must be pointer-aligned, giving a total of 19 bits
-// of count.
-const (
-	addrBits = 48
-	cntBits  = 64 - addrBits + 3
-)
-
-func lfstackPack(node *lfnode, cnt uintptr) uint64 {
-	return uint64(uintptr(unsafe.Pointer(node)))<<(64-addrBits) | uint64(cnt&(1<<cntBits-1))
-}
-
-func lfstackUnpack(val uint64) (node *lfnode, cnt uintptr) {
-	node = (*lfnode)(unsafe.Pointer(uintptr(val >> cntBits << 3)))
-	cnt = uintptr(val & (1<<cntBits - 1))
-	return
-}
diff --git a/src/runtime/lfstack_linux_arm64.go b/src/runtime/lfstack_linux_arm64.go
deleted file mode 100644
index 54cae39..0000000
--- a/src/runtime/lfstack_linux_arm64.go
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-// In addition to the 16 bits taken from the top, we can take 3 from the
-// bottom, because node must be pointer-aligned, giving a total of 19 bits
-// of count.
-const (
-	addrBits = 48
-	cntBits  = 64 - addrBits + 3
-)
-
-func lfstackPack(node *lfnode, cnt uintptr) uint64 {
-	return uint64(uintptr(unsafe.Pointer(node)))<<(64-addrBits) | uint64(cnt&(1<<cntBits-1))
-}
-
-func lfstackUnpack(val uint64) (node *lfnode, cnt uintptr) {
-	node = (*lfnode)(unsafe.Pointer(uintptr(val >> cntBits << 3)))
-	cnt = uintptr(val & (1<<cntBits - 1))
-	return
-}
diff --git a/src/runtime/lfstack_linux_ppc64x.go b/src/runtime/lfstack_linux_ppc64x.go
deleted file mode 100644
index 7ed5025..0000000
--- a/src/runtime/lfstack_linux_ppc64x.go
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ppc64 ppc64le
-// +build linux
-
-package runtime
-
-import "unsafe"
-
-// On ppc64, Linux limits the user address space to 46 bits (see
-// TASK_SIZE_USER64 in the Linux kernel).  This has grown over time,
-// so here we allow 48 bit addresses.
-//
-// In addition to the 16 bits taken from the top, we can take 3 from the
-// bottom, because node must be pointer-aligned, giving a total of 19 bits
-// of count.
-const (
-	addrBits = 48
-	cntBits  = 64 - addrBits + 3
-)
-
-func lfstackPack(node *lfnode, cnt uintptr) uint64 {
-	return uint64(uintptr(unsafe.Pointer(node)))<<(64-addrBits) | uint64(cnt&(1<<cntBits-1))
-}
-
-func lfstackUnpack(val uint64) (node *lfnode, cnt uintptr) {
-	node = (*lfnode)(unsafe.Pointer(uintptr(val >> cntBits << 3)))
-	cnt = uintptr(val & (1<<cntBits - 1))
-	return
-}
diff --git a/src/runtime/mbarrier.go b/src/runtime/mbarrier.go
deleted file mode 100644
index 0dbe1ff..0000000
--- a/src/runtime/mbarrier.go
+++ /dev/null
@@ -1,298 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Garbage collector: write barriers.
-//
-// For the concurrent garbage collector, the Go compiler implements
-// updates to pointer-valued fields that may be in heap objects by
-// emitting calls to write barriers. This file contains the actual write barrier
-// implementation, markwb, and the various wrappers called by the
-// compiler to implement pointer assignment, slice assignment,
-// typed memmove, and so on.
-
-package runtime
-
-import "unsafe"
-
-// markwb is the mark-phase write barrier, the only barrier we have.
-// The rest of this file exists only to make calls to this function.
-//
-// This is the Dijkstra barrier coarsened to always shade the ptr (dst) object.
-// The original Dijkstra barrier only shaded ptrs being placed in black slots.
-//
-// Shade indicates that it has seen a white pointer by adding the referent
-// to wbuf as well as marking it.
-//
-// slot is the destination (dst) in go code
-// ptr is the value that goes into the slot (src) in the go code
-//
-//
-// Dealing with memory ordering:
-//
-// Dijkstra pointed out that maintaining the no black to white
-// pointers means that white to white pointers not need
-// to be noted by the write barrier. Furthermore if either
-// white object dies before it is reached by the
-// GC then the object can be collected during this GC cycle
-// instead of waiting for the next cycle. Unfortunately the cost of
-// ensure that the object holding the slot doesn't concurrently
-// change to black without the mutator noticing seems prohibitive.
-//
-// Consider the following example where the mutator writes into
-// a slot and then loads the slot's mark bit while the GC thread
-// writes to the slot's mark bit and then as part of scanning reads
-// the slot.
-//
-// Initially both [slot] and [slotmark] are 0 (nil)
-// Mutator thread          GC thread
-// st [slot], ptr          st [slotmark], 1
-//
-// ld r1, [slotmark]       ld r2, [slot]
-//
-// Without an expensive memory barrier between the st and the ld, the final
-// result on most HW (including 386/amd64) can be r1==r2==0. This is a classic
-// example of what can happen when loads are allowed to be reordered with older
-// stores (avoiding such reorderings lies at the heart of the classic
-// Peterson/Dekker algorithms for mutual exclusion). Rather than require memory
-// barriers, which will slow down both the mutator and the GC, we always grey
-// the ptr object regardless of the slot's color.
-//
-// Another place where we intentionally omit memory barriers is when
-// accessing mheap_.arena_used to check if a pointer points into the
-// heap. On relaxed memory machines, it's possible for a mutator to
-// extend the size of the heap by updating arena_used, allocate an
-// object from this new region, and publish a pointer to that object,
-// but for tracing running on another processor to observe the pointer
-// but use the old value of arena_used. In this case, tracing will not
-// mark the object, even though it's reachable. However, the mutator
-// is guaranteed to execute a write barrier when it publishes the
-// pointer, so it will take care of marking the object. A general
-// consequence of this is that the garbage collector may cache the
-// value of mheap_.arena_used. (See issue #9984.)
-//
-//
-// Stack writes:
-//
-// The compiler omits write barriers for writes to the current frame,
-// but if a stack pointer has been passed down the call stack, the
-// compiler will generate a write barrier for writes through that
-// pointer (because it doesn't know it's not a heap pointer).
-//
-// One might be tempted to ignore the write barrier if slot points
-// into to the stack. Don't do it! Mark termination only re-scans
-// frames that have potentially been active since the concurrent scan,
-// so it depends on write barriers to track changes to pointers in
-// stack frames that have not been active.
-//go:nowritebarrier
-func gcmarkwb_m(slot *uintptr, ptr uintptr) {
-	if writeBarrierEnabled {
-		if ptr != 0 && inheap(ptr) {
-			shade(ptr)
-		}
-	}
-}
-
-// Write barrier calls must not happen during critical GC and scheduler
-// related operations. In particular there are times when the GC assumes
-// that the world is stopped but scheduler related code is still being
-// executed, dealing with syscalls, dealing with putting gs on runnable
-// queues and so forth. This code can not execute write barriers because
-// the GC might drop them on the floor. Stopping the world involves removing
-// the p associated with an m. We use the fact that m.p == nil to indicate
-// that we are in one these critical section and throw if the write is of
-// a pointer to a heap object.
-//go:nosplit
-func writebarrierptr_nostore1(dst *uintptr, src uintptr) {
-	mp := acquirem()
-	if mp.inwb || mp.dying > 0 {
-		releasem(mp)
-		return
-	}
-	systemstack(func() {
-		if mp.p == 0 && memstats.enablegc && !mp.inwb && inheap(src) {
-			throw("writebarrierptr_nostore1 called with mp.p == nil")
-		}
-		mp.inwb = true
-		gcmarkwb_m(dst, src)
-	})
-	mp.inwb = false
-	releasem(mp)
-}
-
-// NOTE: Really dst *unsafe.Pointer, src unsafe.Pointer,
-// but if we do that, Go inserts a write barrier on *dst = src.
-//go:nosplit
-func writebarrierptr(dst *uintptr, src uintptr) {
-	*dst = src
-	if !writeBarrierEnabled {
-		return
-	}
-	if src != 0 && (src < _PhysPageSize || src == poisonStack) {
-		systemstack(func() {
-			print("runtime: writebarrierptr *", dst, " = ", hex(src), "\n")
-			throw("bad pointer in write barrier")
-		})
-	}
-	writebarrierptr_nostore1(dst, src)
-}
-
-// Like writebarrierptr, but the store has already been applied.
-// Do not reapply.
-//go:nosplit
-func writebarrierptr_nostore(dst *uintptr, src uintptr) {
-	if !writeBarrierEnabled {
-		return
-	}
-	if src != 0 && (src < _PhysPageSize || src == poisonStack) {
-		systemstack(func() { throw("bad pointer in write barrier") })
-	}
-	writebarrierptr_nostore1(dst, src)
-}
-
-//go:nosplit
-func writebarrierstring(dst *[2]uintptr, src [2]uintptr) {
-	writebarrierptr(&dst[0], src[0])
-	dst[1] = src[1]
-}
-
-//go:nosplit
-func writebarrierslice(dst *[3]uintptr, src [3]uintptr) {
-	writebarrierptr(&dst[0], src[0])
-	dst[1] = src[1]
-	dst[2] = src[2]
-}
-
-//go:nosplit
-func writebarrieriface(dst *[2]uintptr, src [2]uintptr) {
-	writebarrierptr(&dst[0], src[0])
-	writebarrierptr(&dst[1], src[1])
-}
-
-//go:generate go run wbfat_gen.go -- wbfat.go
-//
-// The above line generates multiword write barriers for
-// all the combinations of ptr+scalar up to four words.
-// The implementations are written to wbfat.go.
-
-// typedmemmove copies a value of type t to dst from src.
-//go:nosplit
-func typedmemmove(typ *_type, dst, src unsafe.Pointer) {
-	memmove(dst, src, typ.size)
-	if typ.kind&kindNoPointers != 0 {
-		return
-	}
-	heapBitsBulkBarrier(uintptr(dst), typ.size)
-}
-
-//go:linkname reflect_typedmemmove reflect.typedmemmove
-func reflect_typedmemmove(typ *_type, dst, src unsafe.Pointer) {
-	typedmemmove(typ, dst, src)
-}
-
-// typedmemmovepartial is like typedmemmove but assumes that
-// dst and src point off bytes into the value and only copies size bytes.
-//go:linkname reflect_typedmemmovepartial reflect.typedmemmovepartial
-func reflect_typedmemmovepartial(typ *_type, dst, src unsafe.Pointer, off, size uintptr) {
-	memmove(dst, src, size)
-	if !writeBarrierEnabled || typ.kind&kindNoPointers != 0 || size < ptrSize || !inheap(uintptr(dst)) {
-		return
-	}
-
-	if frag := -off & (ptrSize - 1); frag != 0 {
-		dst = add(dst, frag)
-		size -= frag
-	}
-	heapBitsBulkBarrier(uintptr(dst), size&^(ptrSize-1))
-}
-
-// callwritebarrier is invoked at the end of reflectcall, to execute
-// write barrier operations to record the fact that a call's return
-// values have just been copied to frame, starting at retoffset
-// and continuing to framesize. The entire frame (not just the return
-// values) is described by typ. Because the copy has already
-// happened, we call writebarrierptr_nostore, and we must be careful
-// not to be preempted before the write barriers have been run.
-//go:nosplit
-func callwritebarrier(typ *_type, frame unsafe.Pointer, framesize, retoffset uintptr) {
-	if !writeBarrierEnabled || typ == nil || typ.kind&kindNoPointers != 0 || framesize-retoffset < ptrSize || !inheap(uintptr(frame)) {
-		return
-	}
-	heapBitsBulkBarrier(uintptr(add(frame, retoffset)), framesize-retoffset)
-}
-
-//go:nosplit
-func typedslicecopy(typ *_type, dst, src slice) int {
-	// TODO(rsc): If typedslicecopy becomes faster than calling
-	// typedmemmove repeatedly, consider using during func growslice.
-	n := dst.len
-	if n > src.len {
-		n = src.len
-	}
-	if n == 0 {
-		return 0
-	}
-	dstp := unsafe.Pointer(dst.array)
-	srcp := unsafe.Pointer(src.array)
-
-	if raceenabled {
-		callerpc := getcallerpc(unsafe.Pointer(&typ))
-		pc := funcPC(slicecopy)
-		racewriterangepc(dstp, uintptr(n)*typ.size, callerpc, pc)
-		racereadrangepc(srcp, uintptr(n)*typ.size, callerpc, pc)
-	}
-
-	// Note: No point in checking typ.kind&kindNoPointers here:
-	// compiler only emits calls to typedslicecopy for types with pointers,
-	// and growslice and reflect_typedslicecopy check for pointers
-	// before calling typedslicecopy.
-	if !writeBarrierEnabled {
-		memmove(dstp, srcp, uintptr(n)*typ.size)
-		return n
-	}
-
-	systemstack(func() {
-		if uintptr(srcp) < uintptr(dstp) && uintptr(srcp)+uintptr(n)*typ.size > uintptr(dstp) {
-			// Overlap with src before dst.
-			// Copy backward, being careful not to move dstp/srcp
-			// out of the array they point into.
-			dstp = add(dstp, uintptr(n-1)*typ.size)
-			srcp = add(srcp, uintptr(n-1)*typ.size)
-			i := 0
-			for {
-				typedmemmove(typ, dstp, srcp)
-				if i++; i >= n {
-					break
-				}
-				dstp = add(dstp, -typ.size)
-				srcp = add(srcp, -typ.size)
-			}
-		} else {
-			// Copy forward, being careful not to move dstp/srcp
-			// out of the array they point into.
-			i := 0
-			for {
-				typedmemmove(typ, dstp, srcp)
-				if i++; i >= n {
-					break
-				}
-				dstp = add(dstp, typ.size)
-				srcp = add(srcp, typ.size)
-			}
-		}
-	})
-	return int(n)
-}
-
-//go:linkname reflect_typedslicecopy reflect.typedslicecopy
-func reflect_typedslicecopy(elemType *_type, dst, src slice) int {
-	if elemType.kind&kindNoPointers != 0 {
-		n := dst.len
-		if n > src.len {
-			n = src.len
-		}
-		memmove(dst.array, src.array, uintptr(n)*elemType.size)
-		return n
-	}
-	return typedslicecopy(elemType, dst, src)
-}
diff --git a/src/runtime/mbitmap.go b/src/runtime/mbitmap.go
deleted file mode 100644
index fd6b4b1..0000000
--- a/src/runtime/mbitmap.go
+++ /dev/null
@@ -1,1710 +0,0 @@
-// Copyright 2009 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Garbage collector: type and heap bitmaps.
-//
-// Stack, data, and bss bitmaps
-//
-// Stack frames and global variables in the data and bss sections are described
-// by 1-bit bitmaps in which 0 means uninteresting and 1 means live pointer
-// to be visited during GC. The bits in each byte are consumed starting with
-// the low bit: 1<<0, 1<<1, and so on.
-//
-// Heap bitmap
-//
-// The allocated heap comes from a subset of the memory in the range [start, used),
-// where start == mheap_.arena_start and used == mheap_.arena_used.
-// The heap bitmap comprises 2 bits for each pointer-sized word in that range,
-// stored in bytes indexed backward in memory from start.
-// That is, the byte at address start-1 holds the 2-bit entries for the four words
-// start through start+3*ptrSize, the byte at start-2 holds the entries for
-// start+4*ptrSize through start+7*ptrSize, and so on.
-//
-// In each 2-bit entry, the lower bit holds the same information as in the 1-bit
-// bitmaps: 0 means uninteresting and 1 means live pointer to be visited during GC.
-// The meaning of the high bit depends on the position of the word being described
-// in its allocated object. In the first word, the high bit is the GC ``marked'' bit.
-// In the second word, the high bit is the GC ``checkmarked'' bit (see below).
-// In the third and later words, the high bit indicates that the object is still
-// being described. In these words, if a bit pair with a high bit 0 is encountered,
-// the low bit can also be assumed to be 0, and the object description is over.
-// This 00 is called the ``dead'' encoding: it signals that the rest of the words
-// in the object are uninteresting to the garbage collector.
-//
-// The 2-bit entries are split when written into the byte, so that the top half
-// of the byte contains 4 mark bits and the bottom half contains 4 pointer bits.
-// This form allows a copy from the 1-bit to the 4-bit form to keep the
-// pointer bits contiguous, instead of having to space them out.
-//
-// The code makes use of the fact that the zero value for a heap bitmap
-// has no live pointer bit set and is (depending on position), not marked,
-// not checkmarked, and is the dead encoding.
-// These properties must be preserved when modifying the encoding.
-//
-// Checkmarks
-//
-// In a concurrent garbage collector, one worries about failing to mark
-// a live object due to mutations without write barriers or bugs in the
-// collector implementation. As a sanity check, the GC has a 'checkmark'
-// mode that retraverses the object graph with the world stopped, to make
-// sure that everything that should be marked is marked.
-// In checkmark mode, in the heap bitmap, the high bit of the 2-bit entry
-// for the second word of the object holds the checkmark bit.
-// When not in checkmark mode, this bit is set to 1.
-//
-// The smallest possible allocation is 8 bytes. On a 32-bit machine, that
-// means every allocated object has two words, so there is room for the
-// checkmark bit. On a 64-bit machine, however, the 8-byte allocation is
-// just one word, so the second bit pair is not available for encoding the
-// checkmark. However, because non-pointer allocations are combined
-// into larger 16-byte (maxTinySize) allocations, a plain 8-byte allocation
-// must be a pointer, so the type bit in the first word is not actually needed.
-// It is still used in general, except in checkmark the type bit is repurposed
-// as the checkmark bit and then reinitialized (to 1) as the type bit when
-// finished.
-
-package runtime
-
-import "unsafe"
-
-const (
-	bitPointer = 1 << 0
-	bitMarked  = 1 << 4
-
-	heapBitsShift   = 1                 // shift offset between successive bitPointer or bitMarked entries
-	heapBitmapScale = ptrSize * (8 / 2) // number of data bytes described by one heap bitmap byte
-
-	// all mark/pointer bits in a byte
-	bitMarkedAll  = bitMarked | bitMarked<<heapBitsShift | bitMarked<<(2*heapBitsShift) | bitMarked<<(3*heapBitsShift)
-	bitPointerAll = bitPointer | bitPointer<<heapBitsShift | bitPointer<<(2*heapBitsShift) | bitPointer<<(3*heapBitsShift)
-)
-
-// addb returns the byte pointer p+n.
-//go:nowritebarrier
-func addb(p *byte, n uintptr) *byte {
-	// Note: wrote out full expression instead of calling add(p, n)
-	// to reduce the number of temporaries generated by the
-	// compiler for this trivial expression during inlining.
-	return (*byte)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) + n))
-}
-
-// subtractb returns the byte pointer p-n.
-//go:nowritebarrier
-func subtractb(p *byte, n uintptr) *byte {
-	// Note: wrote out full expression instead of calling add(p, -n)
-	// to reduce the number of temporaries generated by the
-	// compiler for this trivial expression during inlining.
-	return (*byte)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) - n))
-}
-
-// add1 returns the byte pointer p+1.
-//go:nowritebarrier
-func add1(p *byte) *byte {
-	// Note: wrote out full expression instead of calling addb(p, 1)
-	// to reduce the number of temporaries generated by the
-	// compiler for this trivial expression during inlining.
-	return (*byte)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) + 1))
-}
-
-// subtract1 returns the byte pointer p-1.
-//go:nowritebarrier
-//
-// nosplit because it is used during write barriers and must not be preempted.
-//go:nosplit
-func subtract1(p *byte) *byte {
-	// Note: wrote out full expression instead of calling subtractb(p, 1)
-	// to reduce the number of temporaries generated by the
-	// compiler for this trivial expression during inlining.
-	return (*byte)(unsafe.Pointer(uintptr(unsafe.Pointer(p)) - 1))
-}
-
-// mHeap_MapBits is called each time arena_used is extended.
-// It maps any additional bitmap memory needed for the new arena memory.
-// It must be called with the expected new value of arena_used,
-// *before* h.arena_used has been updated.
-// Waiting to update arena_used until after the memory has been mapped
-// avoids faults when other threads try access the bitmap immediately
-// after observing the change to arena_used.
-//
-//go:nowritebarrier
-func mHeap_MapBits(h *mheap, arena_used uintptr) {
-	// Caller has added extra mappings to the arena.
-	// Add extra mappings of bitmap words as needed.
-	// We allocate extra bitmap pieces in chunks of bitmapChunk.
-	const bitmapChunk = 8192
-
-	n := (arena_used - mheap_.arena_start) / heapBitmapScale
-	n = round(n, bitmapChunk)
-	n = round(n, _PhysPageSize)
-	if h.bitmap_mapped >= n {
-		return
-	}
-
-	sysMap(unsafe.Pointer(h.arena_start-n), n-h.bitmap_mapped, h.arena_reserved, &memstats.gc_sys)
-	h.bitmap_mapped = n
-}
-
-// heapBits provides access to the bitmap bits for a single heap word.
-// The methods on heapBits take value receivers so that the compiler
-// can more easily inline calls to those methods and registerize the
-// struct fields independently.
-type heapBits struct {
-	bitp  *uint8
-	shift uint32
-}
-
-// heapBitsForAddr returns the heapBits for the address addr.
-// The caller must have already checked that addr is in the range [mheap_.arena_start, mheap_.arena_used).
-//
-// nosplit because it is used during write barriers and must not be preempted.
-//go:nosplit
-func heapBitsForAddr(addr uintptr) heapBits {
-	// 2 bits per work, 4 pairs per byte, and a mask is hard coded.
-	off := (addr - mheap_.arena_start) / ptrSize
-	return heapBits{(*uint8)(unsafe.Pointer(mheap_.arena_start - off/4 - 1)), uint32(off & 3)}
-}
-
-// heapBitsForSpan returns the heapBits for the span base address base.
-func heapBitsForSpan(base uintptr) (hbits heapBits) {
-	if base < mheap_.arena_start || base >= mheap_.arena_used {
-		throw("heapBitsForSpan: base out of range")
-	}
-	hbits = heapBitsForAddr(base)
-	if hbits.shift != 0 {
-		throw("heapBitsForSpan: unaligned start")
-	}
-	return hbits
-}
-
-// heapBitsForObject returns the base address for the heap object
-// containing the address p, along with the heapBits for base.
-// If p does not point into a heap object,
-// return base == 0
-// otherwise return the base of the object.
-func heapBitsForObject(p uintptr) (base uintptr, hbits heapBits, s *mspan) {
-	arenaStart := mheap_.arena_start
-	if p < arenaStart || p >= mheap_.arena_used {
-		return
-	}
-	off := p - arenaStart
-	idx := off >> _PageShift
-	// p points into the heap, but possibly to the middle of an object.
-	// Consult the span table to find the block beginning.
-	k := p >> _PageShift
-	s = h_spans[idx]
-	if s == nil || pageID(k) < s.start || p >= s.limit || s.state != mSpanInUse {
-		if s == nil || s.state == _MSpanStack {
-			// If s is nil, the virtual address has never been part of the heap.
-			// This pointer may be to some mmap'd region, so we allow it.
-			// Pointers into stacks are also ok, the runtime manages these explicitly.
-			return
-		}
-
-		// The following ensures that we are rigorous about what data
-		// structures hold valid pointers.
-		// TODO(rsc): Check if this still happens.
-		if debug.invalidptr != 0 {
-			// Still happens sometimes. We don't know why.
-			printlock()
-			print("runtime:objectstart Span weird: p=", hex(p), " k=", hex(k))
-			if s == nil {
-				print(" s=nil\n")
-			} else {
-				print(" s.start=", hex(s.start<<_PageShift), " s.limit=", hex(s.limit), " s.state=", s.state, "\n")
-			}
-			printunlock()
-			throw("objectstart: bad pointer in unexpected span")
-		}
-		return
-	}
-	// If this span holds object of a power of 2 size, just mask off the bits to
-	// the interior of the object. Otherwise use the size to get the base.
-	if s.baseMask != 0 {
-		// optimize for power of 2 sized objects.
-		base = s.base()
-		base = base + (p-base)&s.baseMask
-		// base = p & s.baseMask is faster for small spans,
-		// but doesn't work for large spans.
-		// Overall, it's faster to use the more general computation above.
-	} else {
-		base = s.base()
-		if p-base >= s.elemsize {
-			// n := (p - base) / s.elemsize, using division by multiplication
-			n := uintptr(uint64(p-base) >> s.divShift * uint64(s.divMul) >> s.divShift2)
-			base += n * s.elemsize
-		}
-	}
-	// Now that we know the actual base, compute heapBits to return to caller.
-	hbits = heapBitsForAddr(base)
-	return
-}
-
-// prefetch the bits.
-func (h heapBits) prefetch() {
-	prefetchnta(uintptr(unsafe.Pointer((h.bitp))))
-}
-
-// next returns the heapBits describing the next pointer-sized word in memory.
-// That is, if h describes address p, h.next() describes p+ptrSize.
-// Note that next does not modify h. The caller must record the result.
-//
-// nosplit because it is used during write barriers and must not be preempted.
-//go:nosplit
-func (h heapBits) next() heapBits {
-	if h.shift < 3*heapBitsShift {
-		return heapBits{h.bitp, h.shift + heapBitsShift}
-	}
-	return heapBits{subtract1(h.bitp), 0}
-}
-
-// forward returns the heapBits describing n pointer-sized words ahead of h in memory.
-// That is, if h describes address p, h.forward(n) describes p+n*ptrSize.
-// h.forward(1) is equivalent to h.next(), just slower.
-// Note that forward does not modify h. The caller must record the result.
-// bits returns the heap bits for the current word.
-func (h heapBits) forward(n uintptr) heapBits {
-	n += uintptr(h.shift) / heapBitsShift
-	return heapBits{subtractb(h.bitp, n/4), uint32(n%4) * heapBitsShift}
-}
-
-// The caller can test isMarked and isPointer by &-ing with bitMarked and bitPointer.
-// The result includes in its higher bits the bits for subsequent words
-// described by the same bitmap byte.
-func (h heapBits) bits() uint32 {
-	return uint32(*h.bitp) >> h.shift
-}
-
-// isMarked reports whether the heap bits have the marked bit set.
-// h must describe the initial word of the object.
-func (h heapBits) isMarked() bool {
-	return *h.bitp&(bitMarked<<h.shift) != 0
-}
-
-// setMarked sets the marked bit in the heap bits, atomically.
-// h must describe the initial word of the object.
-func (h heapBits) setMarked() {
-	// Each byte of GC bitmap holds info for four words.
-	// Might be racing with other updates, so use atomic update always.
-	// We used to be clever here and use a non-atomic update in certain
-	// cases, but it's not worth the risk.
-	atomicor8(h.bitp, bitMarked<<h.shift)
-}
-
-// setMarkedNonAtomic sets the marked bit in the heap bits, non-atomically.
-// h must describe the initial word of the object.
-func (h heapBits) setMarkedNonAtomic() {
-	*h.bitp |= bitMarked << h.shift
-}
-
-// isPointer reports whether the heap bits describe a pointer word.
-// h must describe the initial word of the object.
-//
-// nosplit because it is used during write barriers and must not be preempted.
-//go:nosplit
-func (h heapBits) isPointer() bool {
-	return (*h.bitp>>h.shift)&bitPointer != 0
-}
-
-// hasPointers reports whether the given object has any pointers.
-// It must be told how large the object at h is, so that it does not read too
-// far into the bitmap.
-// h must describe the initial word of the object.
-func (h heapBits) hasPointers(size uintptr) bool {
-	if size == ptrSize { // 1-word objects are always pointers
-		return true
-	}
-	// Otherwise, at least a 2-word object, and at least 2-word aligned,
-	// so h.shift is either 0 or 4, so we know we can get the bits for the
-	// first two words out of *h.bitp.
-	// If either of the first two words is a pointer, not pointer free.
-	b := uint32(*h.bitp >> h.shift)
-	if b&(bitPointer|bitPointer<<heapBitsShift) != 0 {
-		return true
-	}
-	if size == 2*ptrSize {
-		return false
-	}
-	// At least a 4-word object. Check scan bit (aka marked bit) in third word.
-	if h.shift == 0 {
-		return b&(bitMarked<<(2*heapBitsShift)) != 0
-	}
-	return uint32(*subtract1(h.bitp))&bitMarked != 0
-}
-
-// isCheckmarked reports whether the heap bits have the checkmarked bit set.
-// It must be told how large the object at h is, because the encoding of the
-// checkmark bit varies by size.
-// h must describe the initial word of the object.
-func (h heapBits) isCheckmarked(size uintptr) bool {
-	if size == ptrSize {
-		return (*h.bitp>>h.shift)&bitPointer != 0
-	}
-	// All multiword objects are 2-word aligned,
-	// so we know that the initial word's 2-bit pair
-	// and the second word's 2-bit pair are in the
-	// same heap bitmap byte, *h.bitp.
-	return (*h.bitp>>(heapBitsShift+h.shift))&bitMarked != 0
-}
-
-// setCheckmarked sets the checkmarked bit.
-// It must be told how large the object at h is, because the encoding of the
-// checkmark bit varies by size.
-// h must describe the initial word of the object.
-func (h heapBits) setCheckmarked(size uintptr) {
-	if size == ptrSize {
-		atomicor8(h.bitp, bitPointer<<h.shift)
-		return
-	}
-	atomicor8(h.bitp, bitMarked<<(heapBitsShift+h.shift))
-}
-
-// heapBitsBulkBarrier executes writebarrierptr_nostore
-// for every pointer slot in the memory range [p, p+size),
-// using the heap bitmap to locate those pointer slots.
-// This executes the write barriers necessary after a memmove.
-// Both p and size must be pointer-aligned.
-// The range [p, p+size) must lie within a single allocation.
-//
-// Callers should call heapBitsBulkBarrier immediately after
-// calling memmove(p, src, size). This function is marked nosplit
-// to avoid being preempted; the GC must not stop the goroutine
-// between the memmove and the execution of the barriers.
-//
-// The heap bitmap is not maintained for allocations containing
-// no pointers at all; any caller of heapBitsBulkBarrier must first
-// make sure the underlying allocation contains pointers, usually
-// by checking typ.kind&kindNoPointers.
-//
-//go:nosplit
-func heapBitsBulkBarrier(p, size uintptr) {
-	if (p|size)&(ptrSize-1) != 0 {
-		throw("heapBitsBulkBarrier: unaligned arguments")
-	}
-	if !writeBarrierEnabled {
-		return
-	}
-	if !inheap(p) {
-		// If p is on the stack and in a higher frame than the
-		// caller, we either need to execute write barriers on
-		// it (which is what happens for normal stack writes
-		// through pointers to higher frames), or we need to
-		// force the mark termination stack scan to scan the
-		// frame containing p.
-		//
-		// Executing write barriers on p is complicated in the
-		// general case because we either need to unwind the
-		// stack to get the stack map, or we need the type's
-		// bitmap, which may be a GC program.
-		//
-		// Hence, we opt for forcing the re-scan to scan the
-		// frame containing p, which we can do by simply
-		// unwinding the stack barriers between the current SP
-		// and p's frame.
-		gp := getg().m.curg
-		if gp != nil && gp.stack.lo <= p && p < gp.stack.hi {
-			// Run on the system stack to give it more
-			// stack space.
-			systemstack(func() {
-				gcUnwindBarriers(gp, p)
-			})
-		}
-		return
-	}
-
-	h := heapBitsForAddr(p)
-	for i := uintptr(0); i < size; i += ptrSize {
-		if h.isPointer() {
-			x := (*uintptr)(unsafe.Pointer(p + i))
-			writebarrierptr_nostore(x, *x)
-		}
-		h = h.next()
-	}
-}
-
-// typeBitsBulkBarrier executes writebarrierptr_nostore
-// for every pointer slot in the memory range [p, p+size),
-// using the type bitmap to locate those pointer slots.
-// The type typ must correspond exactly to [p, p+size).
-// This executes the write barriers necessary after a copy.
-// Both p and size must be pointer-aligned.
-// The type typ must have a plain bitmap, not a GC program.
-// The only use of this function is in channel sends, and the
-// 64 kB channel element limit takes care of this for us.
-//
-// Must not be preempted because it typically runs right after memmove,
-// and the GC must not complete between those two.
-//
-//go:nosplit
-func typeBitsBulkBarrier(typ *_type, p, size uintptr) {
-	if typ == nil {
-		throw("runtime: typeBitsBulkBarrier without type")
-	}
-	if typ.size != size {
-		println("runtime: typeBitsBulkBarrier with type ", *typ._string, " of size ", typ.size, " but memory size", size)
-		throw("runtime: invalid typeBitsBulkBarrier")
-	}
-	if typ.kind&kindGCProg != 0 {
-		println("runtime: typeBitsBulkBarrier with type ", *typ._string, " with GC prog")
-		throw("runtime: invalid typeBitsBulkBarrier")
-	}
-	if !writeBarrierEnabled {
-		return
-	}
-	ptrmask := typ.gcdata
-	var bits uint32
-	for i := uintptr(0); i < typ.ptrdata; i += ptrSize {
-		if i&(ptrSize*8-1) == 0 {
-			bits = uint32(*ptrmask)
-			ptrmask = addb(ptrmask, 1)
-		} else {
-			bits = bits >> 1
-		}
-		if bits&1 != 0 {
-			x := (*uintptr)(unsafe.Pointer(p + i))
-			writebarrierptr_nostore(x, *x)
-		}
-	}
-}
-
-// The methods operating on spans all require that h has been returned
-// by heapBitsForSpan and that size, n, total are the span layout description
-// returned by the mspan's layout method.
-// If total > size*n, it means that there is extra leftover memory in the span,
-// usually due to rounding.
-//
-// TODO(rsc): Perhaps introduce a different heapBitsSpan type.
-
-// initSpan initializes the heap bitmap for a span.
-func (h heapBits) initSpan(size, n, total uintptr) {
-	if total%heapBitmapScale != 0 {
-		throw("initSpan: unaligned length")
-	}
-	nbyte := total / heapBitmapScale
-	if ptrSize == 8 && size == ptrSize {
-		end := h.bitp
-		bitp := subtractb(end, nbyte-1)
-		for {
-			*bitp = bitPointerAll
-			if bitp == end {
-				break
-			}
-			bitp = add1(bitp)
-		}
-		return
-	}
-	memclr(unsafe.Pointer(subtractb(h.bitp, nbyte-1)), nbyte)
-}
-
-// initCheckmarkSpan initializes a span for being checkmarked.
-// It clears the checkmark bits, which are set to 1 in normal operation.
-func (h heapBits) initCheckmarkSpan(size, n, total uintptr) {
-	// The ptrSize == 8 is a compile-time constant false on 32-bit and eliminates this code entirely.
-	if ptrSize == 8 && size == ptrSize {
-		// Checkmark bit is type bit, bottom bit of every 2-bit entry.
-		// Only possible on 64-bit system, since minimum size is 8.
-		// Must clear type bit (checkmark bit) of every word.
-		// The type bit is the lower of every two-bit pair.
-		bitp := h.bitp
-		for i := uintptr(0); i < n; i += 4 {
-			*bitp &^= bitPointerAll
-			bitp = subtract1(bitp)
-		}
-		return
-	}
-	for i := uintptr(0); i < n; i++ {
-		*h.bitp &^= bitMarked << (heapBitsShift + h.shift)
-		h = h.forward(size / ptrSize)
-	}
-}
-
-// clearCheckmarkSpan undoes all the checkmarking in a span.
-// The actual checkmark bits are ignored, so the only work to do
-// is to fix the pointer bits. (Pointer bits are ignored by scanobject
-// but consulted by typedmemmove.)
-func (h heapBits) clearCheckmarkSpan(size, n, total uintptr) {
-	// The ptrSize == 8 is a compile-time constant false on 32-bit and eliminates this code entirely.
-	if ptrSize == 8 && size == ptrSize {
-		// Checkmark bit is type bit, bottom bit of every 2-bit entry.
-		// Only possible on 64-bit system, since minimum size is 8.
-		// Must clear type bit (checkmark bit) of every word.
-		// The type bit is the lower of every two-bit pair.
-		bitp := h.bitp
-		for i := uintptr(0); i < n; i += 4 {
-			*bitp |= bitPointerAll
-			bitp = subtract1(bitp)
-		}
-	}
-}
-
-// heapBitsSweepSpan coordinates the sweeping of a span by reading
-// and updating the corresponding heap bitmap entries.
-// For each free object in the span, heapBitsSweepSpan sets the type
-// bits for the first two words (or one for single-word objects) to typeDead
-// and then calls f(p), where p is the object's base address.
-// f is expected to add the object to a free list.
-// For non-free objects, heapBitsSweepSpan turns off the marked bit.
-func heapBitsSweepSpan(base, size, n uintptr, f func(uintptr)) {
-	h := heapBitsForSpan(base)
-	switch {
-	default:
-		throw("heapBitsSweepSpan")
-	case ptrSize == 8 && size == ptrSize:
-		// Consider mark bits in all four 2-bit entries of each bitmap byte.
-		bitp := h.bitp
-		for i := uintptr(0); i < n; i += 4 {
-			x := uint32(*bitp)
-			// Note that unlike the other size cases, we leave the pointer bits set here.
-			// These are initialized during initSpan when the span is created and left
-			// in place the whole time the span is used for pointer-sized objects.
-			// That lets heapBitsSetType avoid an atomic update to set the pointer bit
-			// during allocation.
-			if x&bitMarked != 0 {
-				x &^= bitMarked
-			} else {
-				f(base + i*ptrSize)
-			}
-			if x&(bitMarked<<heapBitsShift) != 0 {
-				x &^= bitMarked << heapBitsShift
-			} else {
-				f(base + (i+1)*ptrSize)
-			}
-			if x&(bitMarked<<(2*heapBitsShift)) != 0 {
-				x &^= bitMarked << (2 * heapBitsShift)
-			} else {
-				f(base + (i+2)*ptrSize)
-			}
-			if x&(bitMarked<<(3*heapBitsShift)) != 0 {
-				x &^= bitMarked << (3 * heapBitsShift)
-			} else {
-				f(base + (i+3)*ptrSize)
-			}
-			*bitp = uint8(x)
-			bitp = subtract1(bitp)
-		}
-
-	case size%(4*ptrSize) == 0:
-		// Mark bit is in first word of each object.
-		// Each object starts at bit 0 of a heap bitmap byte.
-		bitp := h.bitp
-		step := size / heapBitmapScale
-		for i := uintptr(0); i < n; i++ {
-			x := uint32(*bitp)
-			if x&bitMarked != 0 {
-				x &^= bitMarked
-			} else {
-				x = 0
-				f(base + i*size)
-			}
-			*bitp = uint8(x)
-			bitp = subtractb(bitp, step)
-		}
-
-	case size%(4*ptrSize) == 2*ptrSize:
-		// Mark bit is in first word of each object,
-		// but every other object starts halfway through a heap bitmap byte.
-		// Unroll loop 2x to handle alternating shift count and step size.
-		bitp := h.bitp
-		step := size / heapBitmapScale
-		var i uintptr
-		for i = uintptr(0); i < n; i += 2 {
-			x := uint32(*bitp)
-			if x&bitMarked != 0 {
-				x &^= bitMarked
-			} else {
-				x &^= bitMarked | bitPointer | (bitMarked|bitPointer)<<heapBitsShift
-				f(base + i*size)
-				if size > 2*ptrSize {
-					x = 0
-				}
-			}
-			*bitp = uint8(x)
-			if i+1 >= n {
-				break
-			}
-			bitp = subtractb(bitp, step)
-			x = uint32(*bitp)
-			if x&(bitMarked<<(2*heapBitsShift)) != 0 {
-				x &^= bitMarked << (2 * heapBitsShift)
-			} else {
-				x &^= (bitMarked|bitPointer)<<(2*heapBitsShift) | (bitMarked|bitPointer)<<(3*heapBitsShift)
-				f(base + (i+1)*size)
-				if size > 2*ptrSize {
-					*subtract1(bitp) = 0
-				}
-			}
-			*bitp = uint8(x)
-			bitp = subtractb(bitp, step+1)
-		}
-	}
-}
-
-// heapBitsSetType records that the new allocation [x, x+size)
-// holds in [x, x+dataSize) one or more values of type typ.
-// (The number of values is given by dataSize / typ.size.)
-// If dataSize < size, the fragment [x+dataSize, x+size) is
-// recorded as non-pointer data.
-// It is known that the type has pointers somewhere;
-// malloc does not call heapBitsSetType when there are no pointers,
-// because all free objects are marked as noscan during
-// heapBitsSweepSpan.
-// There can only be one allocation from a given span active at a time,
-// so this code is not racing with other instances of itself,
-// and we don't allocate from a span until it has been swept,
-// so this code is not racing with heapBitsSweepSpan.
-// It is, however, racing with the concurrent GC mark phase,
-// which can be setting the mark bit in the leading 2-bit entry
-// of an allocated block. The block we are modifying is not quite
-// allocated yet, so the GC marker is not racing with updates to x's bits,
-// but if the start or end of x shares a bitmap byte with an adjacent
-// object, the GC marker is racing with updates to those object's mark bits.
-func heapBitsSetType(x, size, dataSize uintptr, typ *_type) {
-	const doubleCheck = false // slow but helpful; enable to test modifications to this code
-
-	// dataSize is always size rounded up to the next malloc size class,
-	// except in the case of allocating a defer block, in which case
-	// size is sizeof(_defer{}) (at least 6 words) and dataSize may be
-	// arbitrarily larger.
-	//
-	// The checks for size == ptrSize and size == 2*ptrSize can therefore
-	// assume that dataSize == size without checking it explicitly.
-
-	if ptrSize == 8 && size == ptrSize {
-		// It's one word and it has pointers, it must be a pointer.
-		// In general we'd need an atomic update here if the
-		// concurrent GC were marking objects in this span,
-		// because each bitmap byte describes 3 other objects
-		// in addition to the one being allocated.
-		// However, since all allocated one-word objects are pointers
-		// (non-pointers are aggregated into tinySize allocations),
-		// initSpan sets the pointer bits for us. Nothing to do here.
-		if doubleCheck {
-			h := heapBitsForAddr(x)
-			if !h.isPointer() {
-				throw("heapBitsSetType: pointer bit missing")
-			}
-		}
-		return
-	}
-
-	h := heapBitsForAddr(x)
-	ptrmask := typ.gcdata // start of 1-bit pointer mask (or GC program, handled below)
-
-	// Heap bitmap bits for 2-word object are only 4 bits,
-	// so also shared with objects next to it; use atomic updates.
-	// This is called out as a special case primarily for 32-bit systems,
-	// so that on 32-bit systems the code below can assume all objects
-	// are 4-word aligned (because they're all 16-byte aligned).
-	if size == 2*ptrSize {
-		if typ.size == ptrSize {
-			// We're allocating a block big enough to hold two pointers.
-			// On 64-bit, that means the actual object must be two pointers,
-			// or else we'd have used the one-pointer-sized block.
-			// On 32-bit, however, this is the 8-byte block, the smallest one.
-			// So it could be that we're allocating one pointer and this was
-			// just the smallest block available. Distinguish by checking dataSize.
-			// (In general the number of instances of typ being allocated is
-			// dataSize/typ.size.)
-			if ptrSize == 4 && dataSize == ptrSize {
-				// 1 pointer.
-				if gcphase == _GCoff {
-					*h.bitp |= bitPointer << h.shift
-				} else {
-					atomicor8(h.bitp, bitPointer<<h.shift)
-				}
-			} else {
-				// 2-element slice of pointer.
-				if gcphase == _GCoff {
-					*h.bitp |= (bitPointer | bitPointer<<heapBitsShift) << h.shift
-				} else {
-					atomicor8(h.bitp, (bitPointer|bitPointer<<heapBitsShift)<<h.shift)
-				}
-			}
-			return
-		}
-		// Otherwise typ.size must be 2*ptrSize, and typ.kind&kindGCProg == 0.
-		if doubleCheck {
-			if typ.size != 2*ptrSize || typ.kind&kindGCProg != 0 {
-				print("runtime: heapBitsSetType size=", size, " but typ.size=", typ.size, " gcprog=", typ.kind&kindGCProg != 0, "\n")
-				throw("heapBitsSetType")
-			}
-		}
-		b := uint32(*ptrmask)
-		hb := b & 3
-		if gcphase == _GCoff {
-			*h.bitp |= uint8(hb << h.shift)
-		} else {
-			atomicor8(h.bitp, uint8(hb<<h.shift))
-		}
-		return
-	}
-
-	// Copy from 1-bit ptrmask into 2-bit bitmap.
-	// The basic approach is to use a single uintptr as a bit buffer,
-	// alternating between reloading the buffer and writing bitmap bytes.
-	// In general, one load can supply two bitmap byte writes.
-	// This is a lot of lines of code, but it compiles into relatively few
-	// machine instructions.
-
-	var (
-		// Ptrmask input.
-		p     *byte   // last ptrmask byte read
-		b     uintptr // ptrmask bits already loaded
-		nb    uintptr // number of bits in b at next read
-		endp  *byte   // final ptrmask byte to read (then repeat)
-		endnb uintptr // number of valid bits in *endp
-		pbits uintptr // alternate source of bits
-
-		// Heap bitmap output.
-		w     uintptr // words processed
-		nw    uintptr // number of words to process
-		hbitp *byte   // next heap bitmap byte to write
-		hb    uintptr // bits being prepared for *hbitp
-	)
-
-	hbitp = h.bitp
-
-	// Handle GC program. Delayed until this part of the code
-	// so that we can use the same double-checking mechanism
-	// as the 1-bit case. Nothing above could have encountered
-	// GC programs: the cases were all too small.
-	if typ.kind&kindGCProg != 0 {
-		heapBitsSetTypeGCProg(h, typ.ptrdata, typ.size, dataSize, size, addb(typ.gcdata, 4))
-		if doubleCheck {
-			// Double-check the heap bits written by GC program
-			// by running the GC program to create a 1-bit pointer mask
-			// and then jumping to the double-check code below.
-			// This doesn't catch bugs shared between the 1-bit and 4-bit
-			// GC program execution, but it does catch mistakes specific
-			// to just one of those and bugs in heapBitsSetTypeGCProg's
-			// implementation of arrays.
-			lock(&debugPtrmask.lock)
-			if debugPtrmask.data == nil {
-				debugPtrmask.data = (*byte)(persistentalloc(1<<20, 1, &memstats.other_sys))
-			}
-			ptrmask = debugPtrmask.data
-			runGCProg(addb(typ.gcdata, 4), nil, ptrmask, 1)
-			goto Phase4
-		}
-		return
-	}
-
-	// Note about sizes:
-	//
-	// typ.size is the number of words in the object,
-	// and typ.ptrdata is the number of words in the prefix
-	// of the object that contains pointers. That is, the final
-	// typ.size - typ.ptrdata words contain no pointers.
-	// This allows optimization of a common pattern where
-	// an object has a small header followed by a large scalar
-	// buffer. If we know the pointers are over, we don't have
-	// to scan the buffer's heap bitmap at all.
-	// The 1-bit ptrmasks are sized to contain only bits for
-	// the typ.ptrdata prefix, zero padded out to a full byte
-	// of bitmap. This code sets nw (below) so that heap bitmap
-	// bits are only written for the typ.ptrdata prefix; if there is
-	// more room in the allocated object, the next heap bitmap
-	// entry is a 00, indicating that there are no more pointers
-	// to scan. So only the ptrmask for the ptrdata bytes is needed.
-	//
-	// Replicated copies are not as nice: if there is an array of
-	// objects with scalar tails, all but the last tail does have to
-	// be initialized, because there is no way to say "skip forward".
-	// However, because of the possibility of a repeated type with
-	// size not a multiple of 4 pointers (one heap bitmap byte),
-	// the code already must handle the last ptrmask byte specially
-	// by treating it as containing only the bits for endnb pointers,
-	// where endnb <= 4. We represent large scalar tails that must
-	// be expanded in the replication by setting endnb larger than 4.
-	// This will have the effect of reading many bits out of b,
-	// but once the real bits are shifted out, b will supply as many
-	// zero bits as we try to read, which is exactly what we need.
-
-	p = ptrmask
-	if typ.size < dataSize {
-		// Filling in bits for an array of typ.
-		// Set up for repetition of ptrmask during main loop.
-		// Note that ptrmask describes only a prefix of
-		const maxBits = ptrSize*8 - 7
-		if typ.ptrdata/ptrSize <= maxBits {
-			// Entire ptrmask fits in uintptr with room for a byte fragment.
-			// Load into pbits and never read from ptrmask again.
-			// This is especially important when the ptrmask has
-			// fewer than 8 bits in it; otherwise the reload in the middle
-			// of the Phase 2 loop would itself need to loop to gather
-			// at least 8 bits.
-
-			// Accumulate ptrmask into b.
-			// ptrmask is sized to describe only typ.ptrdata, but we record
-			// it as describing typ.size bytes, since all the high bits are zero.
-			nb = typ.ptrdata / ptrSize
-			for i := uintptr(0); i < nb; i += 8 {
-				b |= uintptr(*p) << i
-				p = add1(p)
-			}
-			nb = typ.size / ptrSize
-
-			// Replicate ptrmask to fill entire pbits uintptr.
-			// Doubling and truncating is fewer steps than
-			// iterating by nb each time. (nb could be 1.)
-			// Since we loaded typ.ptrdata/ptrSize bits
-			// but are pretending to have typ.size/ptrSize,
-			// there might be no replication necessary/possible.
-			pbits = b
-			endnb = nb
-			if nb+nb <= maxBits {
-				for endnb <= ptrSize*8 {
-					pbits |= pbits << endnb
-					endnb += endnb
-				}
-				// Truncate to a multiple of original ptrmask.
-				endnb = maxBits / nb * nb
-				pbits &= 1<<endnb - 1
-				b = pbits
-				nb = endnb
-			}
-
-			// Clear p and endp as sentinel for using pbits.
-			// Checked during Phase 2 loop.
-			p = nil
-			endp = nil
-		} else {
-			// Ptrmask is larger. Read it multiple times.
-			n := (typ.ptrdata/ptrSize+7)/8 - 1
-			endp = addb(ptrmask, n)
-			endnb = typ.size/ptrSize - n*8
-		}
-	}
-	if p != nil {
-		b = uintptr(*p)
-		p = add1(p)
-		nb = 8
-	}
-
-	if typ.size == dataSize {
-		// Single entry: can stop once we reach the non-pointer data.
-		nw = typ.ptrdata / ptrSize
-	} else {
-		// Repeated instances of typ in an array.
-		// Have to process first N-1 entries in full, but can stop
-		// once we reach the non-pointer data in the final entry.
-		nw = ((dataSize/typ.size-1)*typ.size + typ.ptrdata) / ptrSize
-	}
-	if nw == 0 {
-		// No pointers! Caller was supposed to check.
-		println("runtime: invalid type ", *typ._string)
-		throw("heapBitsSetType: called with non-pointer type")
-		return
-	}
-	if nw < 2 {
-		// Must write at least 2 words, because the "no scan"
-		// encoding doesn't take effect until the third word.
-		nw = 2
-	}
-
-	// Phase 1: Special case for leading byte (shift==0) or half-byte (shift==4).
-	// The leading byte is special because it contains the bits for words 0 and 1,
-	// which do not have the marked bits set.
-	// The leading half-byte is special because it's a half a byte and must be
-	// manipulated atomically.
-	switch {
-	default:
-		throw("heapBitsSetType: unexpected shift")
-
-	case h.shift == 0:
-		// Ptrmask and heap bitmap are aligned.
-		// Handle first byte of bitmap specially.
-		// The first byte we write out contains the first two words of the object.
-		// In those words, the mark bits are mark and checkmark, respectively,
-		// and must not be set. In all following words, we want to set the mark bit
-		// as a signal that the object continues to the next 2-bit entry in the bitmap.
-		hb = b & bitPointerAll
-		hb |= bitMarked<<(2*heapBitsShift) | bitMarked<<(3*heapBitsShift)
-		if w += 4; w >= nw {
-			goto Phase3
-		}
-		*hbitp = uint8(hb)
-		hbitp = subtract1(hbitp)
-		b >>= 4
-		nb -= 4
-
-	case ptrSize == 8 && h.shift == 2:
-		// Ptrmask and heap bitmap are misaligned.
-		// The bits for the first two words are in a byte shared with another object
-		// and must be updated atomically.
-		// NOTE(rsc): The atomic here may not be necessary.
-		// We took care of 1-word and 2-word objects above,
-		// so this is at least a 6-word object, so our start bits
-		// are shared only with the type bits of another object,
-		// not with its mark bit. Since there is only one allocation
-		// from a given span at a time, we should be able to set
-		// these bits non-atomically. Not worth the risk right now.
-		hb = (b & 3) << (2 * heapBitsShift)
-		b >>= 2
-		nb -= 2
-		// Note: no bitMarker in hb because the first two words don't get markers from us.
-		if gcphase == _GCoff {
-			*hbitp |= uint8(hb)
-		} else {
-			atomicor8(hbitp, uint8(hb))
-		}
-		hbitp = subtract1(hbitp)
-		if w += 2; w >= nw {
-			// We know that there is more data, because we handled 2-word objects above.
-			// This must be at least a 6-word object. If we're out of pointer words,
-			// mark no scan in next bitmap byte and finish.
-			hb = 0
-			w += 4
-			goto Phase3
-		}
-	}
-
-	// Phase 2: Full bytes in bitmap, up to but not including write to last byte (full or partial) in bitmap.
-	// The loop computes the bits for that last write but does not execute the write;
-	// it leaves the bits in hb for processing by phase 3.
-	// To avoid repeated adjustment of nb, we subtract out the 4 bits we're going to
-	// use in the first half of the loop right now, and then we only adjust nb explicitly
-	// if the 8 bits used by each iteration isn't balanced by 8 bits loaded mid-loop.
-	nb -= 4
-	for {
-		// Emit bitmap byte.
-		// b has at least nb+4 bits, with one exception:
-		// if w+4 >= nw, then b has only nw-w bits,
-		// but we'll stop at the break and then truncate
-		// appropriately in Phase 3.
-		hb = b & bitPointerAll
-		hb |= bitMarkedAll
-		if w += 4; w >= nw {
-			break
-		}
-		*hbitp = uint8(hb)
-		hbitp = subtract1(hbitp)
-		b >>= 4
-
-		// Load more bits. b has nb right now.
-		if p != endp {
-			// Fast path: keep reading from ptrmask.
-			// nb unmodified: we just loaded 8 bits,
-			// and the next iteration will consume 8 bits,
-			// leaving us with the same nb the next time we're here.
-			if nb < 8 {
-				b |= uintptr(*p) << nb
-				p = add1(p)
-			} else {
-				// Reduce the number of bits in b.
-				// This is important if we skipped
-				// over a scalar tail, since nb could
-				// be larger than the bit width of b.
-				nb -= 8
-			}
-		} else if p == nil {
-			// Almost as fast path: track bit count and refill from pbits.
-			// For short repetitions.
-			if nb < 8 {
-				b |= pbits << nb
-				nb += endnb
-			}
-			nb -= 8 // for next iteration
-		} else {
-			// Slow path: reached end of ptrmask.
-			// Process final partial byte and rewind to start.
-			b |= uintptr(*p) << nb
-			nb += endnb
-			if nb < 8 {
-				b |= uintptr(*ptrmask) << nb
-				p = add1(ptrmask)
-			} else {
-				nb -= 8
-				p = ptrmask
-			}
-		}
-
-		// Emit bitmap byte.
-		hb = b & bitPointerAll
-		hb |= bitMarkedAll
-		if w += 4; w >= nw {
-			break
-		}
-		*hbitp = uint8(hb)
-		hbitp = subtract1(hbitp)
-		b >>= 4
-	}
-
-Phase3:
-	// Phase 3: Write last byte or partial byte and zero the rest of the bitmap entries.
-	if w > nw {
-		// Counting the 4 entries in hb not yet written to memory,
-		// there are more entries than possible pointer slots.
-		// Discard the excess entries (can't be more than 3).
-		mask := uintptr(1)<<(4-(w-nw)) - 1
-		hb &= mask | mask<<4 // apply mask to both pointer bits and mark bits
-	}
-
-	// Change nw from counting possibly-pointer words to total words in allocation.
-	nw = size / ptrSize
-
-	// Write whole bitmap bytes.
-	// The first is hb, the rest are zero.
-	if w <= nw {
-		*hbitp = uint8(hb)
-		hbitp = subtract1(hbitp)
-		hb = 0 // for possible final half-byte below
-		for w += 4; w <= nw; w += 4 {
-			*hbitp = 0
-			hbitp = subtract1(hbitp)
-		}
-	}
-
-	// Write final partial bitmap byte if any.
-	// We know w > nw, or else we'd still be in the loop above.
-	// It can be bigger only due to the 4 entries in hb that it counts.
-	// If w == nw+4 then there's nothing left to do: we wrote all nw entries
-	// and can discard the 4 sitting in hb.
-	// But if w == nw+2, we need to write first two in hb.
-	// The byte is shared with the next object so we may need an atomic.
-	if w == nw+2 {
-		if gcphase == _GCoff {
-			*hbitp = *hbitp&^(bitPointer|bitMarked|(bitPointer|bitMarked)<<heapBitsShift) | uint8(hb)
-		} else {
-			atomicand8(hbitp, ^uint8(bitPointer|bitMarked|(bitPointer|bitMarked)<<heapBitsShift))
-			atomicor8(hbitp, uint8(hb))
-		}
-	}
-
-Phase4:
-	// Phase 4: all done, but perhaps double check.
-	if doubleCheck {
-		end := heapBitsForAddr(x + size)
-		if typ.kind&kindGCProg == 0 && (hbitp != end.bitp || (w == nw+2) != (end.shift == 2)) {
-			println("ended at wrong bitmap byte for", *typ._string, "x", dataSize/typ.size)
-			print("typ.size=", typ.size, " typ.ptrdata=", typ.ptrdata, " dataSize=", dataSize, " size=", size, "\n")
-			print("w=", w, " nw=", nw, " b=", hex(b), " nb=", nb, " hb=", hex(hb), "\n")
-			h0 := heapBitsForAddr(x)
-			print("initial bits h0.bitp=", h0.bitp, " h0.shift=", h0.shift, "\n")
-			print("ended at hbitp=", hbitp, " but next starts at bitp=", end.bitp, " shift=", end.shift, "\n")
-			throw("bad heapBitsSetType")
-		}
-
-		// Double-check that bits to be written were written correctly.
-		// Does not check that other bits were not written, unfortunately.
-		h := heapBitsForAddr(x)
-		nptr := typ.ptrdata / ptrSize
-		ndata := typ.size / ptrSize
-		count := dataSize / typ.size
-		totalptr := ((count-1)*typ.size + typ.ptrdata) / ptrSize
-		for i := uintptr(0); i < size/ptrSize; i++ {
-			j := i % ndata
-			var have, want uint8
-			have = (*h.bitp >> h.shift) & (bitPointer | bitMarked)
-			if i >= totalptr {
-				want = 0 // deadmarker
-				if typ.kind&kindGCProg != 0 && i < (totalptr+3)/4*4 {
-					want = bitMarked
-				}
-			} else {
-				if j < nptr && (*addb(ptrmask, j/8)>>(j%8))&1 != 0 {
-					want |= bitPointer
-				}
-				if i >= 2 {
-					want |= bitMarked
-				} else {
-					have &^= bitMarked
-				}
-			}
-			if have != want {
-				println("mismatch writing bits for", *typ._string, "x", dataSize/typ.size)
-				print("typ.size=", typ.size, " typ.ptrdata=", typ.ptrdata, " dataSize=", dataSize, " size=", size, "\n")
-				print("kindGCProg=", typ.kind&kindGCProg != 0, "\n")
-				print("w=", w, " nw=", nw, " b=", hex(b), " nb=", nb, " hb=", hex(hb), "\n")
-				h0 := heapBitsForAddr(x)
-				print("initial bits h0.bitp=", h0.bitp, " h0.shift=", h0.shift, "\n")
-				print("current bits h.bitp=", h.bitp, " h.shift=", h.shift, " *h.bitp=", hex(*h.bitp), "\n")
-				print("ptrmask=", ptrmask, " p=", p, " endp=", endp, " endnb=", endnb, " pbits=", hex(pbits), " b=", hex(b), " nb=", nb, "\n")
-				println("at word", i, "offset", i*ptrSize, "have", have, "want", want)
-				if typ.kind&kindGCProg != 0 {
-					println("GC program:")
-					dumpGCProg(addb(typ.gcdata, 4))
-				}
-				throw("bad heapBitsSetType")
-			}
-			h = h.next()
-		}
-		if ptrmask == debugPtrmask.data {
-			unlock(&debugPtrmask.lock)
-		}
-	}
-}
-
-var debugPtrmask struct {
-	lock mutex
-	data *byte
-}
-
-// heapBitsSetTypeGCProg implements heapBitsSetType using a GC program.
-// progSize is the size of the memory described by the program.
-// elemSize is the size of the element that the GC program describes (a prefix of).
-// dataSize is the total size of the intended data, a multiple of elemSize.
-// allocSize is the total size of the allocated memory.
-//
-// GC programs are only used for large allocations.
-// heapBitsSetType requires that allocSize is a multiple of 4 words,
-// so that the relevant bitmap bytes are not shared with surrounding
-// objects and need not be accessed with atomic instructions.
-func heapBitsSetTypeGCProg(h heapBits, progSize, elemSize, dataSize, allocSize uintptr, prog *byte) {
-	if ptrSize == 8 && allocSize%(4*ptrSize) != 0 {
-		// Alignment will be wrong.
-		throw("heapBitsSetTypeGCProg: small allocation")
-	}
-	var totalBits uintptr
-	if elemSize == dataSize {
-		totalBits = runGCProg(prog, nil, h.bitp, 2)
-		if totalBits*ptrSize != progSize {
-			println("runtime: heapBitsSetTypeGCProg: total bits", totalBits, "but progSize", progSize)
-			throw("heapBitsSetTypeGCProg: unexpected bit count")
-		}
-	} else {
-		count := dataSize / elemSize
-
-		// Piece together program trailer to run after prog that does:
-		//	literal(0)
-		//	repeat(1, elemSize-progSize-1) // zeros to fill element size
-		//	repeat(elemSize, count-1) // repeat that element for count
-		// This zero-pads the data remaining in the first element and then
-		// repeats that first element to fill the array.
-		var trailer [40]byte // 3 varints (max 10 each) + some bytes
-		i := 0
-		if n := elemSize/ptrSize - progSize/ptrSize; n > 0 {
-			// literal(0)
-			trailer[i] = 0x01
-			i++
-			trailer[i] = 0
-			i++
-			if n > 1 {
-				// repeat(1, n-1)
-				trailer[i] = 0x81
-				i++
-				n--
-				for ; n >= 0x80; n >>= 7 {
-					trailer[i] = byte(n | 0x80)
-					i++
-				}
-				trailer[i] = byte(n)
-				i++
-			}
-		}
-		// repeat(elemSize/ptrSize, count-1)
-		trailer[i] = 0x80
-		i++
-		n := elemSize / ptrSize
-		for ; n >= 0x80; n >>= 7 {
-			trailer[i] = byte(n | 0x80)
-			i++
-		}
-		trailer[i] = byte(n)
-		i++
-		n = count - 1
-		for ; n >= 0x80; n >>= 7 {
-			trailer[i] = byte(n | 0x80)
-			i++
-		}
-		trailer[i] = byte(n)
-		i++
-		trailer[i] = 0
-		i++
-
-		runGCProg(prog, &trailer[0], h.bitp, 2)
-
-		// Even though we filled in the full array just now,
-		// record that we only filled in up to the ptrdata of the
-		// last element. This will cause the code below to
-		// memclr the dead section of the final array element,
-		// so that scanobject can stop early in the final element.
-		totalBits = (elemSize*(count-1) + progSize) / ptrSize
-	}
-	endProg := unsafe.Pointer(subtractb(h.bitp, (totalBits+3)/4))
-	endAlloc := unsafe.Pointer(subtractb(h.bitp, allocSize/heapBitmapScale))
-	memclr(add(endAlloc, 1), uintptr(endProg)-uintptr(endAlloc))
-}
-
-// progToPointerMask returns the 1-bit pointer mask output by the GC program prog.
-// size the size of the region described by prog, in bytes.
-// The resulting bitvector will have no more than size/ptrSize bits.
-func progToPointerMask(prog *byte, size uintptr) bitvector {
-	n := (size/ptrSize + 7) / 8
-	x := (*[1 << 30]byte)(persistentalloc(n+1, 1, &memstats.buckhash_sys))[:n+1]
-	x[len(x)-1] = 0xa1 // overflow check sentinel
-	n = runGCProg(prog, nil, &x[0], 1)
-	if x[len(x)-1] != 0xa1 {
-		throw("progToPointerMask: overflow")
-	}
-	return bitvector{int32(n), &x[0]}
-}
-
-// Packed GC pointer bitmaps, aka GC programs.
-//
-// For large types containing arrays, the type information has a
-// natural repetition that can be encoded to save space in the
-// binary and in the memory representation of the type information.
-//
-// The encoding is a simple Lempel-Ziv style bytecode machine
-// with the following instructions:
-//
-//	00000000: stop
-//	0nnnnnnn: emit n bits copied from the next (n+7)/8 bytes
-//	10000000 n c: repeat the previous n bits c times; n, c are varints
-//	1nnnnnnn c: repeat the previous n bits c times; c is a varint
-
-// runGCProg executes the GC program prog, and then trailer if non-nil,
-// writing to dst with entries of the given size.
-// If size == 1, dst is a 1-bit pointer mask laid out moving forward from dst.
-// If size == 2, dst is the 2-bit heap bitmap, and writes move backward
-// starting at dst (because the heap bitmap does). In this case, the caller guarantees
-// that only whole bytes in dst need to be written.
-//
-// runGCProg returns the number of 1- or 2-bit entries written to memory.
-func runGCProg(prog, trailer, dst *byte, size int) uintptr {
-	dstStart := dst
-
-	// Bits waiting to be written to memory.
-	var bits uintptr
-	var nbits uintptr
-
-	p := prog
-Run:
-	for {
-		// Flush accumulated full bytes.
-		// The rest of the loop assumes that nbits <= 7.
-		for ; nbits >= 8; nbits -= 8 {
-			if size == 1 {
-				*dst = uint8(bits)
-				dst = add1(dst)
-				bits >>= 8
-			} else {
-				v := bits&bitPointerAll | bitMarkedAll
-				*dst = uint8(v)
-				dst = subtract1(dst)
-				bits >>= 4
-				v = bits&bitPointerAll | bitMarkedAll
-				*dst = uint8(v)
-				dst = subtract1(dst)
-				bits >>= 4
-			}
-		}
-
-		// Process one instruction.
-		inst := uintptr(*p)
-		p = add1(p)
-		n := inst & 0x7F
-		if inst&0x80 == 0 {
-			// Literal bits; n == 0 means end of program.
-			if n == 0 {
-				// Program is over; continue in trailer if present.
-				if trailer != nil {
-					//println("trailer")
-					p = trailer
-					trailer = nil
-					continue
-				}
-				//println("done")
-				break Run
-			}
-			//println("lit", n, dst)
-			nbyte := n / 8
-			for i := uintptr(0); i < nbyte; i++ {
-				bits |= uintptr(*p) << nbits
-				p = add1(p)
-				if size == 1 {
-					*dst = uint8(bits)
-					dst = add1(dst)
-					bits >>= 8
-				} else {
-					v := bits&0xf | bitMarkedAll
-					*dst = uint8(v)
-					dst = subtract1(dst)
-					bits >>= 4
-					v = bits&0xf | bitMarkedAll
-					*dst = uint8(v)
-					dst = subtract1(dst)
-					bits >>= 4
-				}
-			}
-			if n %= 8; n > 0 {
-				bits |= uintptr(*p) << nbits
-				p = add1(p)
-				nbits += n
-			}
-			continue Run
-		}
-
-		// Repeat. If n == 0, it is encoded in a varint in the next bytes.
-		if n == 0 {
-			for off := uint(0); ; off += 7 {
-				x := uintptr(*p)
-				p = add1(p)
-				n |= (x & 0x7F) << off
-				if x&0x80 == 0 {
-					break
-				}
-			}
-		}
-
-		// Count is encoded in a varint in the next bytes.
-		c := uintptr(0)
-		for off := uint(0); ; off += 7 {
-			x := uintptr(*p)
-			p = add1(p)
-			c |= (x & 0x7F) << off
-			if x&0x80 == 0 {
-				break
-			}
-		}
-		c *= n // now total number of bits to copy
-
-		// If the number of bits being repeated is small, load them
-		// into a register and use that register for the entire loop
-		// instead of repeatedly reading from memory.
-		// Handling fewer than 8 bits here makes the general loop simpler.
-		// The cutoff is ptrSize*8 - 7 to guarantee that when we add
-		// the pattern to a bit buffer holding at most 7 bits (a partial byte)
-		// it will not overflow.
-		src := dst
-		const maxBits = ptrSize*8 - 7
-		if n <= maxBits {
-			// Start with bits in output buffer.
-			pattern := bits
-			npattern := nbits
-
-			// If we need more bits, fetch them from memory.
-			if size == 1 {
-				src = subtract1(src)
-				for npattern < n {
-					pattern <<= 8
-					pattern |= uintptr(*src)
-					src = subtract1(src)
-					npattern += 8
-				}
-			} else {
-				src = add1(src)
-				for npattern < n {
-					pattern <<= 4
-					pattern |= uintptr(*src) & 0xf
-					src = add1(src)
-					npattern += 4
-				}
-			}
-
-			// We started with the whole bit output buffer,
-			// and then we loaded bits from whole bytes.
-			// Either way, we might now have too many instead of too few.
-			// Discard the extra.
-			if npattern > n {
-				pattern >>= npattern - n
-				npattern = n
-			}
-
-			// Replicate pattern to at most maxBits.
-			if npattern == 1 {
-				// One bit being repeated.
-				// If the bit is 1, make the pattern all 1s.
-				// If the bit is 0, the pattern is already all 0s,
-				// but we can claim that the number of bits
-				// in the word is equal to the number we need (c),
-				// because right shift of bits will zero fill.
-				if pattern == 1 {
-					pattern = 1<<maxBits - 1
-					npattern = maxBits
-				} else {
-					npattern = c
-				}
-			} else {
-				b := pattern
-				nb := npattern
-				if nb+nb <= maxBits {
-					// Double pattern until the whole uintptr is filled.
-					for nb <= ptrSize*8 {
-						b |= b << nb
-						nb += nb
-					}
-					// Trim away incomplete copy of original pattern in high bits.
-					// TODO(rsc): Replace with table lookup or loop on systems without divide?
-					nb = maxBits / npattern * npattern
-					b &= 1<<nb - 1
-					pattern = b
-					npattern = nb
-				}
-			}
-
-			// Add pattern to bit buffer and flush bit buffer, c/npattern times.
-			// Since pattern contains >8 bits, there will be full bytes to flush
-			// on each iteration.
-			for ; c >= npattern; c -= npattern {
-				bits |= pattern << nbits
-				nbits += npattern
-				if size == 1 {
-					for nbits >= 8 {
-						*dst = uint8(bits)
-						dst = add1(dst)
-						bits >>= 8
-						nbits -= 8
-					}
-				} else {
-					for nbits >= 4 {
-						*dst = uint8(bits&0xf | bitMarkedAll)
-						dst = subtract1(dst)
-						bits >>= 4
-						nbits -= 4
-					}
-				}
-			}
-
-			// Add final fragment to bit buffer.
-			if c > 0 {
-				pattern &= 1<<c - 1
-				bits |= pattern << nbits
-				nbits += c
-			}
-			continue Run
-		}
-
-		// Repeat; n too large to fit in a register.
-		// Since nbits <= 7, we know the first few bytes of repeated data
-		// are already written to memory.
-		off := n - nbits // n > nbits because n > maxBits and nbits <= 7
-		if size == 1 {
-			// Leading src fragment.
-			src = subtractb(src, (off+7)/8)
-			if frag := off & 7; frag != 0 {
-				bits |= uintptr(*src) >> (8 - frag) << nbits
-				src = add1(src)
-				nbits += frag
-				c -= frag
-			}
-			// Main loop: load one byte, write another.
-			// The bits are rotating through the bit buffer.
-			for i := c / 8; i > 0; i-- {
-				bits |= uintptr(*src) << nbits
-				src = add1(src)
-				*dst = uint8(bits)
-				dst = add1(dst)
-				bits >>= 8
-			}
-			// Final src fragment.
-			if c %= 8; c > 0 {
-				bits |= (uintptr(*src) & (1<<c - 1)) << nbits
-				nbits += c
-			}
-		} else {
-			// Leading src fragment.
-			src = addb(src, (off+3)/4)
-			if frag := off & 3; frag != 0 {
-				bits |= (uintptr(*src) & 0xf) >> (4 - frag) << nbits
-				src = subtract1(src)
-				nbits += frag
-				c -= frag
-			}
-			// Main loop: load one byte, write another.
-			// The bits are rotating through the bit buffer.
-			for i := c / 4; i > 0; i-- {
-				bits |= (uintptr(*src) & 0xf) << nbits
-				src = subtract1(src)
-				*dst = uint8(bits&0xf | bitMarkedAll)
-				dst = subtract1(dst)
-				bits >>= 4
-			}
-			// Final src fragment.
-			if c %= 4; c > 0 {
-				bits |= (uintptr(*src) & (1<<c - 1)) << nbits
-				nbits += c
-			}
-		}
-	}
-
-	// Write any final bits out, using full-byte writes, even for the final byte.
-	var totalBits uintptr
-	if size == 1 {
-		totalBits = (uintptr(unsafe.Pointer(dst))-uintptr(unsafe.Pointer(dstStart)))*8 + nbits
-		nbits += -nbits & 7
-		for ; nbits > 0; nbits -= 8 {
-			*dst = uint8(bits)
-			dst = add1(dst)
-			bits >>= 8
-		}
-	} else {
-		totalBits = (uintptr(unsafe.Pointer(dstStart))-uintptr(unsafe.Pointer(dst)))*4 + nbits
-		nbits += -nbits & 3
-		for ; nbits > 0; nbits -= 4 {
-			v := bits&0xf | bitMarkedAll
-			*dst = uint8(v)
-			dst = subtract1(dst)
-			bits >>= 4
-		}
-		// Clear the mark bits in the first two entries.
-		// They are the actual mark and checkmark bits,
-		// not non-dead markers. It simplified the code
-		// above to set the marker in every bit written and
-		// then clear these two as a special case at the end.
-		*dstStart &^= bitMarked | bitMarked<<heapBitsShift
-	}
-	return totalBits
-}
-
-func dumpGCProg(p *byte) {
-	nptr := 0
-	for {
-		x := *p
-		p = add1(p)
-		if x == 0 {
-			print("\t", nptr, " end\n")
-			break
-		}
-		if x&0x80 == 0 {
-			print("\t", nptr, " lit ", x, ":")
-			n := int(x+7) / 8
-			for i := 0; i < n; i++ {
-				print(" ", hex(*p))
-				p = add1(p)
-			}
-			print("\n")
-			nptr += int(x)
-		} else {
-			nbit := int(x &^ 0x80)
-			if nbit == 0 {
-				for nb := uint(0); ; nb += 7 {
-					x := *p
-					p = add1(p)
-					nbit |= int(x&0x7f) << nb
-					if x&0x80 == 0 {
-						break
-					}
-				}
-			}
-			count := 0
-			for nb := uint(0); ; nb += 7 {
-				x := *p
-				p = add1(p)
-				count |= int(x&0x7f) << nb
-				if x&0x80 == 0 {
-					break
-				}
-			}
-			print("\t", nptr, " repeat ", nbit, " × ", count, "\n")
-			nptr += nbit * count
-		}
-	}
-}
-
-// Testing.
-
-func getgcmaskcb(frame *stkframe, ctxt unsafe.Pointer) bool {
-	target := (*stkframe)(ctxt)
-	if frame.sp <= target.sp && target.sp < frame.varp {
-		*target = *frame
-		return false
-	}
-	return true
-}
-
-// gcbits returns the GC type info for x, for testing.
-// The result is the bitmap entries (0 or 1), one entry per byte.
-//go:linkname reflect_gcbits reflect.gcbits
-func reflect_gcbits(x interface{}) []byte {
-	ret := getgcmask(x)
-	typ := (*ptrtype)(unsafe.Pointer((*eface)(unsafe.Pointer(&x))._type)).elem
-	nptr := typ.ptrdata / ptrSize
-	for uintptr(len(ret)) > nptr && ret[len(ret)-1] == 0 {
-		ret = ret[:len(ret)-1]
-	}
-	return ret
-}
-
-// Returns GC type info for object p for testing.
-func getgcmask(ep interface{}) (mask []byte) {
-	e := *(*eface)(unsafe.Pointer(&ep))
-	p := e.data
-	t := e._type
-	// data or bss
-	for datap := &firstmoduledata; datap != nil; datap = datap.next {
-		// data
-		if datap.data <= uintptr(p) && uintptr(p) < datap.edata {
-			bitmap := datap.gcdatamask.bytedata
-			n := (*ptrtype)(unsafe.Pointer(t)).elem.size
-			mask = make([]byte, n/ptrSize)
-			for i := uintptr(0); i < n; i += ptrSize {
-				off := (uintptr(p) + i - datap.data) / ptrSize
-				mask[i/ptrSize] = (*addb(bitmap, off/8) >> (off % 8)) & 1
-			}
-			return
-		}
-
-		// bss
-		if datap.bss <= uintptr(p) && uintptr(p) < datap.ebss {
-			bitmap := datap.gcbssmask.bytedata
-			n := (*ptrtype)(unsafe.Pointer(t)).elem.size
-			mask = make([]byte, n/ptrSize)
-			for i := uintptr(0); i < n; i += ptrSize {
-				off := (uintptr(p) + i - datap.bss) / ptrSize
-				mask[i/ptrSize] = (*addb(bitmap, off/8) >> (off % 8)) & 1
-			}
-			return
-		}
-	}
-
-	// heap
-	var n uintptr
-	var base uintptr
-	if mlookup(uintptr(p), &base, &n, nil) != 0 {
-		mask = make([]byte, n/ptrSize)
-		for i := uintptr(0); i < n; i += ptrSize {
-			hbits := heapBitsForAddr(base + i)
-			if hbits.isPointer() {
-				mask[i/ptrSize] = 1
-			}
-			if i >= 2*ptrSize && !hbits.isMarked() {
-				mask = mask[:i/ptrSize]
-				break
-			}
-		}
-		return
-	}
-
-	// stack
-	if _g_ := getg(); _g_.m.curg.stack.lo <= uintptr(p) && uintptr(p) < _g_.m.curg.stack.hi {
-		var frame stkframe
-		frame.sp = uintptr(p)
-		_g_ := getg()
-		gentraceback(_g_.m.curg.sched.pc, _g_.m.curg.sched.sp, 0, _g_.m.curg, 0, nil, 1000, getgcmaskcb, noescape(unsafe.Pointer(&frame)), 0)
-		if frame.fn != nil {
-			f := frame.fn
-			targetpc := frame.continpc
-			if targetpc == 0 {
-				return
-			}
-			if targetpc != f.entry {
-				targetpc--
-			}
-			pcdata := pcdatavalue(f, _PCDATA_StackMapIndex, targetpc)
-			if pcdata == -1 {
-				return
-			}
-			stkmap := (*stackmap)(funcdata(f, _FUNCDATA_LocalsPointerMaps))
-			if stkmap == nil || stkmap.n <= 0 {
-				return
-			}
-			bv := stackmapdata(stkmap, pcdata)
-			size := uintptr(bv.n) * ptrSize
-			n := (*ptrtype)(unsafe.Pointer(t)).elem.size
-			mask = make([]byte, n/ptrSize)
-			for i := uintptr(0); i < n; i += ptrSize {
-				bitmap := bv.bytedata
-				off := (uintptr(p) + i - frame.varp + size) / ptrSize
-				mask[i/ptrSize] = (*addb(bitmap, off/8) >> (off % 8)) & 1
-			}
-		}
-		return
-	}
-
-	// otherwise, not something the GC knows about.
-	// possibly read-only data, like malloc(0).
-	// must not have pointers
-	return
-}
diff --git a/src/runtime/mcache.go b/src/runtime/mcache.go
deleted file mode 100644
index 8c2a6b0..0000000
--- a/src/runtime/mcache.go
+++ /dev/null
@@ -1,139 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-// Per-thread (in Go, per-P) cache for small objects.
-// No locking needed because it is per-thread (per-P).
-type mcache struct {
-	// The following members are accessed on every malloc,
-	// so they are grouped here for better caching.
-	next_sample      int32   // trigger heap sample after allocating this many bytes
-	local_cachealloc uintptr // bytes allocated from cache since last lock of heap
-	local_scan       uintptr // bytes of scannable heap allocated
-	// Allocator cache for tiny objects w/o pointers.
-	// See "Tiny allocator" comment in malloc.go.
-	tiny             unsafe.Pointer
-	tinyoffset       uintptr
-	local_tinyallocs uintptr // number of tiny allocs not counted in other stats
-
-	// The rest is not accessed on every malloc.
-	alloc [_NumSizeClasses]*mspan // spans to allocate from
-
-	stackcache [_NumStackOrders]stackfreelist
-
-	// Local allocator stats, flushed during GC.
-	local_nlookup    uintptr                  // number of pointer lookups
-	local_largefree  uintptr                  // bytes freed for large objects (>maxsmallsize)
-	local_nlargefree uintptr                  // number of frees for large objects (>maxsmallsize)
-	local_nsmallfree [_NumSizeClasses]uintptr // number of frees for small objects (<=maxsmallsize)
-}
-
-// A gclink is a node in a linked list of blocks, like mlink,
-// but it is opaque to the garbage collector.
-// The GC does not trace the pointers during collection,
-// and the compiler does not emit write barriers for assignments
-// of gclinkptr values. Code should store references to gclinks
-// as gclinkptr, not as *gclink.
-type gclink struct {
-	next gclinkptr
-}
-
-// A gclinkptr is a pointer to a gclink, but it is opaque
-// to the garbage collector.
-type gclinkptr uintptr
-
-// ptr returns the *gclink form of p.
-// The result should be used for accessing fields, not stored
-// in other data structures.
-func (p gclinkptr) ptr() *gclink {
-	return (*gclink)(unsafe.Pointer(p))
-}
-
-type stackfreelist struct {
-	list gclinkptr // linked list of free stacks
-	size uintptr   // total size of stacks in list
-}
-
-// dummy MSpan that contains no free objects.
-var emptymspan mspan
-
-func allocmcache() *mcache {
-	lock(&mheap_.lock)
-	c := (*mcache)(fixAlloc_Alloc(&mheap_.cachealloc))
-	unlock(&mheap_.lock)
-	memclr(unsafe.Pointer(c), unsafe.Sizeof(*c))
-	for i := 0; i < _NumSizeClasses; i++ {
-		c.alloc[i] = &emptymspan
-	}
-
-	// Set first allocation sample size.
-	rate := MemProfileRate
-	if rate > 0x3fffffff { // make 2*rate not overflow
-		rate = 0x3fffffff
-	}
-	if rate != 0 {
-		c.next_sample = int32(int(fastrand1()) % (2 * rate))
-	}
-
-	return c
-}
-
-func freemcache(c *mcache) {
-	systemstack(func() {
-		mCache_ReleaseAll(c)
-		stackcache_clear(c)
-
-		// NOTE(rsc,rlh): If gcworkbuffree comes back, we need to coordinate
-		// with the stealing of gcworkbufs during garbage collection to avoid
-		// a race where the workbuf is double-freed.
-		// gcworkbuffree(c.gcworkbuf)
-
-		lock(&mheap_.lock)
-		purgecachedstats(c)
-		fixAlloc_Free(&mheap_.cachealloc, unsafe.Pointer(c))
-		unlock(&mheap_.lock)
-	})
-}
-
-// Gets a span that has a free object in it and assigns it
-// to be the cached span for the given sizeclass.  Returns this span.
-func mCache_Refill(c *mcache, sizeclass int32) *mspan {
-	_g_ := getg()
-
-	_g_.m.locks++
-	// Return the current cached span to the central lists.
-	s := c.alloc[sizeclass]
-	if s.freelist.ptr() != nil {
-		throw("refill on a nonempty span")
-	}
-	if s != &emptymspan {
-		s.incache = false
-	}
-
-	// Get a new cached span from the central lists.
-	s = mCentral_CacheSpan(&mheap_.central[sizeclass].mcentral)
-	if s == nil {
-		throw("out of memory")
-	}
-	if s.freelist.ptr() == nil {
-		println(s.ref, (s.npages<<_PageShift)/s.elemsize)
-		throw("empty span")
-	}
-	c.alloc[sizeclass] = s
-	_g_.m.locks--
-	return s
-}
-
-func mCache_ReleaseAll(c *mcache) {
-	for i := 0; i < _NumSizeClasses; i++ {
-		s := c.alloc[i]
-		if s != &emptymspan {
-			mCentral_UncacheSpan(&mheap_.central[i].mcentral, s)
-			c.alloc[i] = &emptymspan
-		}
-	}
-}
diff --git a/src/runtime/mcentral.go b/src/runtime/mcentral.go
deleted file mode 100644
index 161af99..0000000
--- a/src/runtime/mcentral.go
+++ /dev/null
@@ -1,212 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Central free lists.
-//
-// See malloc.go for an overview.
-//
-// The MCentral doesn't actually contain the list of free objects; the MSpan does.
-// Each MCentral is two lists of MSpans: those with free objects (c->nonempty)
-// and those that are completely allocated (c->empty).
-
-package runtime
-
-// Central list of free objects of a given size.
-type mcentral struct {
-	lock      mutex
-	sizeclass int32
-	nonempty  mspan // list of spans with a free object
-	empty     mspan // list of spans with no free objects (or cached in an mcache)
-}
-
-// Initialize a single central free list.
-func mCentral_Init(c *mcentral, sizeclass int32) {
-	c.sizeclass = sizeclass
-	mSpanList_Init(&c.nonempty)
-	mSpanList_Init(&c.empty)
-}
-
-// Allocate a span to use in an MCache.
-func mCentral_CacheSpan(c *mcentral) *mspan {
-	// Deduct credit for this span allocation and sweep if necessary.
-	deductSweepCredit(uintptr(class_to_size[c.sizeclass]), 0)
-
-	lock(&c.lock)
-	sg := mheap_.sweepgen
-retry:
-	var s *mspan
-	for s = c.nonempty.next; s != &c.nonempty; s = s.next {
-		if s.sweepgen == sg-2 && cas(&s.sweepgen, sg-2, sg-1) {
-			mSpanList_Remove(s)
-			mSpanList_InsertBack(&c.empty, s)
-			unlock(&c.lock)
-			mSpan_Sweep(s, true)
-			goto havespan
-		}
-		if s.sweepgen == sg-1 {
-			// the span is being swept by background sweeper, skip
-			continue
-		}
-		// we have a nonempty span that does not require sweeping, allocate from it
-		mSpanList_Remove(s)
-		mSpanList_InsertBack(&c.empty, s)
-		unlock(&c.lock)
-		goto havespan
-	}
-
-	for s = c.empty.next; s != &c.empty; s = s.next {
-		if s.sweepgen == sg-2 && cas(&s.sweepgen, sg-2, sg-1) {
-			// we have an empty span that requires sweeping,
-			// sweep it and see if we can free some space in it
-			mSpanList_Remove(s)
-			// swept spans are at the end of the list
-			mSpanList_InsertBack(&c.empty, s)
-			unlock(&c.lock)
-			mSpan_Sweep(s, true)
-			if s.freelist.ptr() != nil {
-				goto havespan
-			}
-			lock(&c.lock)
-			// the span is still empty after sweep
-			// it is already in the empty list, so just retry
-			goto retry
-		}
-		if s.sweepgen == sg-1 {
-			// the span is being swept by background sweeper, skip
-			continue
-		}
-		// already swept empty span,
-		// all subsequent ones must also be either swept or in process of sweeping
-		break
-	}
-	unlock(&c.lock)
-
-	// Replenish central list if empty.
-	s = mCentral_Grow(c)
-	if s == nil {
-		return nil
-	}
-	lock(&c.lock)
-	mSpanList_InsertBack(&c.empty, s)
-	unlock(&c.lock)
-
-	// At this point s is a non-empty span, queued at the end of the empty list,
-	// c is unlocked.
-havespan:
-	cap := int32((s.npages << _PageShift) / s.elemsize)
-	n := cap - int32(s.ref)
-	if n == 0 {
-		throw("empty span")
-	}
-	if s.freelist.ptr() == nil {
-		throw("freelist empty")
-	}
-	s.incache = true
-	return s
-}
-
-// Return span from an MCache.
-func mCentral_UncacheSpan(c *mcentral, s *mspan) {
-	lock(&c.lock)
-
-	s.incache = false
-
-	if s.ref == 0 {
-		throw("uncaching full span")
-	}
-
-	cap := int32((s.npages << _PageShift) / s.elemsize)
-	n := cap - int32(s.ref)
-	if n > 0 {
-		mSpanList_Remove(s)
-		mSpanList_Insert(&c.nonempty, s)
-	}
-	unlock(&c.lock)
-}
-
-// Free n objects from a span s back into the central free list c.
-// Called during sweep.
-// Returns true if the span was returned to heap.  Sets sweepgen to
-// the latest generation.
-// If preserve=true, don't return the span to heap nor relink in MCentral lists;
-// caller takes care of it.
-func mCentral_FreeSpan(c *mcentral, s *mspan, n int32, start gclinkptr, end gclinkptr, preserve bool) bool {
-	if s.incache {
-		throw("freespan into cached span")
-	}
-
-	// Add the objects back to s's free list.
-	wasempty := s.freelist.ptr() == nil
-	end.ptr().next = s.freelist
-	s.freelist = start
-	s.ref -= uint16(n)
-
-	if preserve {
-		// preserve is set only when called from MCentral_CacheSpan above,
-		// the span must be in the empty list.
-		if s.next == nil {
-			throw("can't preserve unlinked span")
-		}
-		atomicstore(&s.sweepgen, mheap_.sweepgen)
-		return false
-	}
-
-	lock(&c.lock)
-
-	// Move to nonempty if necessary.
-	if wasempty {
-		mSpanList_Remove(s)
-		mSpanList_Insert(&c.nonempty, s)
-	}
-
-	// delay updating sweepgen until here.  This is the signal that
-	// the span may be used in an MCache, so it must come after the
-	// linked list operations above (actually, just after the
-	// lock of c above.)
-	atomicstore(&s.sweepgen, mheap_.sweepgen)
-
-	if s.ref != 0 {
-		unlock(&c.lock)
-		return false
-	}
-
-	// s is completely freed, return it to the heap.
-	mSpanList_Remove(s)
-	s.needzero = 1
-	s.freelist = 0
-	unlock(&c.lock)
-	heapBitsForSpan(s.base()).initSpan(s.layout())
-	mHeap_Free(&mheap_, s, 0)
-	return true
-}
-
-// Fetch a new span from the heap and carve into objects for the free list.
-func mCentral_Grow(c *mcentral) *mspan {
-	npages := uintptr(class_to_allocnpages[c.sizeclass])
-	size := uintptr(class_to_size[c.sizeclass])
-	n := (npages << _PageShift) / size
-
-	s := mHeap_Alloc(&mheap_, npages, c.sizeclass, false, true)
-	if s == nil {
-		return nil
-	}
-
-	p := uintptr(s.start << _PageShift)
-	s.limit = p + size*n
-	head := gclinkptr(p)
-	tail := gclinkptr(p)
-	// i==0 iteration already done
-	for i := uintptr(1); i < n; i++ {
-		p += size
-		tail.ptr().next = gclinkptr(p)
-		tail = gclinkptr(p)
-	}
-	if s.freelist.ptr() != nil {
-		throw("freelist not empty")
-	}
-	tail.ptr().next = 0
-	s.freelist = head
-	heapBitsForSpan(s.base()).initSpan(s.layout())
-	return s
-}
diff --git a/src/runtime/mem_bsd.go b/src/runtime/mem_bsd.go
deleted file mode 100644
index ecab584..0000000
--- a/src/runtime/mem_bsd.go
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright 2010 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build dragonfly freebsd nacl netbsd openbsd solaris
-
-package runtime
-
-import "unsafe"
-
-// Don't split the stack as this function may be invoked without a valid G,
-// which prevents us from allocating more stack.
-//go:nosplit
-func sysAlloc(n uintptr, sysStat *uint64) unsafe.Pointer {
-	v := unsafe.Pointer(mmap(nil, n, _PROT_READ|_PROT_WRITE, _MAP_ANON|_MAP_PRIVATE, -1, 0))
-	if uintptr(v) < 4096 {
-		return nil
-	}
-	mSysStatInc(sysStat, n)
-	return v
-}
-
-func sysUnused(v unsafe.Pointer, n uintptr) {
-	madvise(v, n, _MADV_FREE)
-}
-
-func sysUsed(v unsafe.Pointer, n uintptr) {
-}
-
-// Don't split the stack as this function may be invoked without a valid G,
-// which prevents us from allocating more stack.
-//go:nosplit
-func sysFree(v unsafe.Pointer, n uintptr, sysStat *uint64) {
-	mSysStatDec(sysStat, n)
-	munmap(v, n)
-}
-
-func sysFault(v unsafe.Pointer, n uintptr) {
-	mmap(v, n, _PROT_NONE, _MAP_ANON|_MAP_PRIVATE|_MAP_FIXED, -1, 0)
-}
-
-func sysReserve(v unsafe.Pointer, n uintptr, reserved *bool) unsafe.Pointer {
-	// On 64-bit, people with ulimit -v set complain if we reserve too
-	// much address space.  Instead, assume that the reservation is okay
-	// and check the assumption in SysMap.
-	if ptrSize == 8 && uint64(n) > 1<<32 || goos_nacl != 0 {
-		*reserved = false
-		return v
-	}
-
-	p := unsafe.Pointer(mmap(v, n, _PROT_NONE, _MAP_ANON|_MAP_PRIVATE, -1, 0))
-	if uintptr(p) < 4096 {
-		return nil
-	}
-	*reserved = true
-	return p
-}
-
-func sysMap(v unsafe.Pointer, n uintptr, reserved bool, sysStat *uint64) {
-	const _ENOMEM = 12
-
-	mSysStatInc(sysStat, n)
-
-	// On 64-bit, we don't actually have v reserved, so tread carefully.
-	if !reserved {
-		flags := int32(_MAP_ANON | _MAP_PRIVATE)
-		if GOOS == "dragonfly" {
-			// TODO(jsing): For some reason DragonFly seems to return
-			// memory at a different address than we requested, even when
-			// there should be no reason for it to do so. This can be
-			// avoided by using MAP_FIXED, but I'm not sure we should need
-			// to do this - we do not on other platforms.
-			flags |= _MAP_FIXED
-		}
-		p := mmap(v, n, _PROT_READ|_PROT_WRITE, flags, -1, 0)
-		if uintptr(p) == _ENOMEM {
-			throw("runtime: out of memory")
-		}
-		if p != v {
-			print("runtime: address space conflict: map(", v, ") = ", p, "\n")
-			throw("runtime: address space conflict")
-		}
-		return
-	}
-
-	p := mmap(v, n, _PROT_READ|_PROT_WRITE, _MAP_ANON|_MAP_FIXED|_MAP_PRIVATE, -1, 0)
-	if uintptr(p) == _ENOMEM {
-		throw("runtime: out of memory")
-	}
-	if p != v {
-		throw("runtime: cannot map pages in arena address space")
-	}
-}
diff --git a/src/runtime/mem_darwin.go b/src/runtime/mem_darwin.go
deleted file mode 100644
index 3bebd97..0000000
--- a/src/runtime/mem_darwin.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2010 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-// Don't split the stack as this function may be invoked without a valid G,
-// which prevents us from allocating more stack.
-//go:nosplit
-func sysAlloc(n uintptr, sysStat *uint64) unsafe.Pointer {
-	v := (unsafe.Pointer)(mmap(nil, n, _PROT_READ|_PROT_WRITE, _MAP_ANON|_MAP_PRIVATE, -1, 0))
-	if uintptr(v) < 4096 {
-		return nil
-	}
-	mSysStatInc(sysStat, n)
-	return v
-}
-
-func sysUnused(v unsafe.Pointer, n uintptr) {
-	// Linux's MADV_DONTNEED is like BSD's MADV_FREE.
-	madvise(v, n, _MADV_FREE)
-}
-
-func sysUsed(v unsafe.Pointer, n uintptr) {
-}
-
-// Don't split the stack as this function may be invoked without a valid G,
-// which prevents us from allocating more stack.
-//go:nosplit
-func sysFree(v unsafe.Pointer, n uintptr, sysStat *uint64) {
-	mSysStatDec(sysStat, n)
-	munmap(v, n)
-}
-
-func sysFault(v unsafe.Pointer, n uintptr) {
-	mmap(v, n, _PROT_NONE, _MAP_ANON|_MAP_PRIVATE|_MAP_FIXED, -1, 0)
-}
-
-func sysReserve(v unsafe.Pointer, n uintptr, reserved *bool) unsafe.Pointer {
-	*reserved = true
-	p := (unsafe.Pointer)(mmap(v, n, _PROT_NONE, _MAP_ANON|_MAP_PRIVATE, -1, 0))
-	if uintptr(p) < 4096 {
-		return nil
-	}
-	return p
-}
-
-const (
-	_ENOMEM = 12
-)
-
-func sysMap(v unsafe.Pointer, n uintptr, reserved bool, sysStat *uint64) {
-	mSysStatInc(sysStat, n)
-	p := (unsafe.Pointer)(mmap(v, n, _PROT_READ|_PROT_WRITE, _MAP_ANON|_MAP_FIXED|_MAP_PRIVATE, -1, 0))
-	if uintptr(p) == _ENOMEM {
-		throw("runtime: out of memory")
-	}
-	if p != v {
-		throw("runtime: cannot map pages in arena address space")
-	}
-}
diff --git a/src/runtime/mem_linux.go b/src/runtime/mem_linux.go
deleted file mode 100644
index f988e75..0000000
--- a/src/runtime/mem_linux.go
+++ /dev/null
@@ -1,159 +0,0 @@
-// Copyright 2010 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-const (
-	_PAGE_SIZE = _PhysPageSize
-	_EACCES    = 13
-)
-
-// NOTE: vec must be just 1 byte long here.
-// Mincore returns ENOMEM if any of the pages are unmapped,
-// but we want to know that all of the pages are unmapped.
-// To make these the same, we can only ask about one page
-// at a time. See golang.org/issue/7476.
-var addrspace_vec [1]byte
-
-func addrspace_free(v unsafe.Pointer, n uintptr) bool {
-	var chunk uintptr
-	for off := uintptr(0); off < n; off += chunk {
-		chunk = _PAGE_SIZE * uintptr(len(addrspace_vec))
-		if chunk > (n - off) {
-			chunk = n - off
-		}
-		errval := mincore(unsafe.Pointer(uintptr(v)+off), chunk, &addrspace_vec[0])
-		// ENOMEM means unmapped, which is what we want.
-		// Anything else we assume means the pages are mapped.
-		if errval != -_ENOMEM {
-			return false
-		}
-	}
-	return true
-}
-
-func mmap_fixed(v unsafe.Pointer, n uintptr, prot, flags, fd int32, offset uint32) unsafe.Pointer {
-	p := mmap(v, n, prot, flags, fd, offset)
-	// On some systems, mmap ignores v without
-	// MAP_FIXED, so retry if the address space is free.
-	if p != v && addrspace_free(v, n) {
-		if uintptr(p) > 4096 {
-			munmap(p, n)
-		}
-		p = mmap(v, n, prot, flags|_MAP_FIXED, fd, offset)
-	}
-	return p
-}
-
-// Don't split the stack as this method may be invoked without a valid G, which
-// prevents us from allocating more stack.
-//go:nosplit
-func sysAlloc(n uintptr, sysStat *uint64) unsafe.Pointer {
-	p := mmap(nil, n, _PROT_READ|_PROT_WRITE, _MAP_ANON|_MAP_PRIVATE, -1, 0)
-	if uintptr(p) < 4096 {
-		if uintptr(p) == _EACCES {
-			print("runtime: mmap: access denied\n")
-			exit(2)
-		}
-		if uintptr(p) == _EAGAIN {
-			print("runtime: mmap: too much locked memory (check 'ulimit -l').\n")
-			exit(2)
-		}
-		return nil
-	}
-	mSysStatInc(sysStat, n)
-	return p
-}
-
-func sysUnused(v unsafe.Pointer, n uintptr) {
-	var s uintptr = hugePageSize // division by constant 0 is a compile-time error :(
-	if s != 0 && (uintptr(v)%s != 0 || n%s != 0) {
-		// See issue 8832
-		// Linux kernel bug: https://bugzilla.kernel.org/show_bug.cgi?id=93111
-		// Mark the region as NOHUGEPAGE so the kernel's khugepaged
-		// doesn't undo our DONTNEED request.  khugepaged likes to migrate
-		// regions which are only partially mapped to huge pages, including
-		// regions with some DONTNEED marks.  That needlessly allocates physical
-		// memory for our DONTNEED regions.
-		madvise(v, n, _MADV_NOHUGEPAGE)
-	}
-	madvise(v, n, _MADV_DONTNEED)
-}
-
-func sysUsed(v unsafe.Pointer, n uintptr) {
-	if hugePageSize != 0 {
-		// Undo the NOHUGEPAGE marks from sysUnused.  There is no alignment check
-		// around this call as spans may have been merged in the interim.
-		// Note that this might enable huge pages for regions which were
-		// previously disabled.  Unfortunately there is no easy way to detect
-		// what the previous state was, and in any case we probably want huge
-		// pages to back our heap if the kernel can arrange that.
-		madvise(v, n, _MADV_HUGEPAGE)
-	}
-}
-
-// Don't split the stack as this function may be invoked without a valid G,
-// which prevents us from allocating more stack.
-//go:nosplit
-func sysFree(v unsafe.Pointer, n uintptr, sysStat *uint64) {
-	mSysStatDec(sysStat, n)
-	munmap(v, n)
-}
-
-func sysFault(v unsafe.Pointer, n uintptr) {
-	mmap(v, n, _PROT_NONE, _MAP_ANON|_MAP_PRIVATE|_MAP_FIXED, -1, 0)
-}
-
-func sysReserve(v unsafe.Pointer, n uintptr, reserved *bool) unsafe.Pointer {
-	// On 64-bit, people with ulimit -v set complain if we reserve too
-	// much address space.  Instead, assume that the reservation is okay
-	// if we can reserve at least 64K and check the assumption in SysMap.
-	// Only user-mode Linux (UML) rejects these requests.
-	if ptrSize == 8 && uint64(n) > 1<<32 {
-		p := mmap_fixed(v, 64<<10, _PROT_NONE, _MAP_ANON|_MAP_PRIVATE, -1, 0)
-		if p != v {
-			if uintptr(p) >= 4096 {
-				munmap(p, 64<<10)
-			}
-			return nil
-		}
-		munmap(p, 64<<10)
-		*reserved = false
-		return v
-	}
-
-	p := mmap(v, n, _PROT_NONE, _MAP_ANON|_MAP_PRIVATE, -1, 0)
-	if uintptr(p) < 4096 {
-		return nil
-	}
-	*reserved = true
-	return p
-}
-
-func sysMap(v unsafe.Pointer, n uintptr, reserved bool, sysStat *uint64) {
-	mSysStatInc(sysStat, n)
-
-	// On 64-bit, we don't actually have v reserved, so tread carefully.
-	if !reserved {
-		p := mmap_fixed(v, n, _PROT_READ|_PROT_WRITE, _MAP_ANON|_MAP_PRIVATE, -1, 0)
-		if uintptr(p) == _ENOMEM {
-			throw("runtime: out of memory")
-		}
-		if p != v {
-			print("runtime: address space conflict: map(", v, ") = ", p, "\n")
-			throw("runtime: address space conflict")
-		}
-		return
-	}
-
-	p := mmap(v, n, _PROT_READ|_PROT_WRITE, _MAP_ANON|_MAP_FIXED|_MAP_PRIVATE, -1, 0)
-	if uintptr(p) == _ENOMEM {
-		throw("runtime: out of memory")
-	}
-	if p != v {
-		throw("runtime: cannot map pages in arena address space")
-	}
-}
diff --git a/src/runtime/mem_plan9.go b/src/runtime/mem_plan9.go
deleted file mode 100644
index 755887f..0000000
--- a/src/runtime/mem_plan9.go
+++ /dev/null
@@ -1,174 +0,0 @@
-// Copyright 2010 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-const memDebug = false
-
-var bloc uintptr
-var memlock mutex
-
-type memHdr struct {
-	next *memHdr
-	size uintptr
-}
-
-var memFreelist *memHdr // sorted in ascending order
-
-func memAlloc(n uintptr) unsafe.Pointer {
-	n = memRound(n)
-	var prevp *memHdr
-	for p := memFreelist; p != nil; p = p.next {
-		if p.size >= n {
-			if p.size == n {
-				if prevp != nil {
-					prevp.next = p.next
-				} else {
-					memFreelist = p.next
-				}
-			} else {
-				p.size -= n
-				p = (*memHdr)(add(unsafe.Pointer(p), p.size))
-			}
-			memclr(unsafe.Pointer(p), unsafe.Sizeof(memHdr{}))
-			return unsafe.Pointer(p)
-		}
-		prevp = p
-	}
-	return sbrk(n)
-}
-
-func memFree(ap unsafe.Pointer, n uintptr) {
-	n = memRound(n)
-	memclr(ap, n)
-	bp := (*memHdr)(ap)
-	bp.size = n
-	bpn := uintptr(ap)
-	if memFreelist == nil {
-		bp.next = nil
-		memFreelist = bp
-		return
-	}
-	p := memFreelist
-	if bpn < uintptr(unsafe.Pointer(p)) {
-		memFreelist = bp
-		if bpn+bp.size == uintptr(unsafe.Pointer(p)) {
-			bp.size += p.size
-			bp.next = p.next
-			memclr(unsafe.Pointer(p), unsafe.Sizeof(memHdr{}))
-		} else {
-			bp.next = p
-		}
-		return
-	}
-	for ; p.next != nil; p = p.next {
-		if bpn > uintptr(unsafe.Pointer(p)) && bpn < uintptr(unsafe.Pointer(p.next)) {
-			break
-		}
-	}
-	if bpn+bp.size == uintptr(unsafe.Pointer(p.next)) {
-		bp.size += p.next.size
-		bp.next = p.next.next
-		memclr(unsafe.Pointer(p.next), unsafe.Sizeof(memHdr{}))
-	} else {
-		bp.next = p.next
-	}
-	if uintptr(unsafe.Pointer(p))+p.size == bpn {
-		p.size += bp.size
-		p.next = bp.next
-		memclr(unsafe.Pointer(bp), unsafe.Sizeof(memHdr{}))
-	} else {
-		p.next = bp
-	}
-}
-
-func memCheck() {
-	if memDebug == false {
-		return
-	}
-	for p := memFreelist; p != nil && p.next != nil; p = p.next {
-		if uintptr(unsafe.Pointer(p)) == uintptr(unsafe.Pointer(p.next)) {
-			print("runtime: ", unsafe.Pointer(p), " == ", unsafe.Pointer(p.next), "\n")
-			throw("mem: infinite loop")
-		}
-		if uintptr(unsafe.Pointer(p)) > uintptr(unsafe.Pointer(p.next)) {
-			print("runtime: ", unsafe.Pointer(p), " > ", unsafe.Pointer(p.next), "\n")
-			throw("mem: unordered list")
-		}
-		if uintptr(unsafe.Pointer(p))+p.size > uintptr(unsafe.Pointer(p.next)) {
-			print("runtime: ", unsafe.Pointer(p), "+", p.size, " > ", unsafe.Pointer(p.next), "\n")
-			throw("mem: overlapping blocks")
-		}
-		for b := add(unsafe.Pointer(p), unsafe.Sizeof(memHdr{})); uintptr(b) < uintptr(unsafe.Pointer(p))+p.size; b = add(b, 1) {
-			if *(*byte)(b) != 0 {
-				print("runtime: value at addr ", b, " with offset ", uintptr(b)-uintptr(unsafe.Pointer(p)), " in block ", p, " of size ", p.size, " is not zero\n")
-				throw("mem: uninitialised memory")
-			}
-		}
-	}
-}
-
-func memRound(p uintptr) uintptr {
-	return (p + _PAGESIZE - 1) &^ (_PAGESIZE - 1)
-}
-
-func initBloc() {
-	bloc = memRound(firstmoduledata.end)
-}
-
-func sbrk(n uintptr) unsafe.Pointer {
-	// Plan 9 sbrk from /sys/src/libc/9sys/sbrk.c
-	bl := bloc
-	n = memRound(n)
-	if brk_(unsafe.Pointer(bl+n)) < 0 {
-		return nil
-	}
-	bloc += n
-	return unsafe.Pointer(bl)
-}
-
-func sysAlloc(n uintptr, sysStat *uint64) unsafe.Pointer {
-	lock(&memlock)
-	p := memAlloc(n)
-	memCheck()
-	unlock(&memlock)
-	if p != nil {
-		mSysStatInc(sysStat, n)
-	}
-	return p
-}
-
-func sysFree(v unsafe.Pointer, n uintptr, sysStat *uint64) {
-	mSysStatDec(sysStat, n)
-	lock(&memlock)
-	memFree(v, n)
-	memCheck()
-	unlock(&memlock)
-}
-
-func sysUnused(v unsafe.Pointer, n uintptr) {
-}
-
-func sysUsed(v unsafe.Pointer, n uintptr) {
-}
-
-func sysMap(v unsafe.Pointer, n uintptr, reserved bool, sysStat *uint64) {
-	// sysReserve has already allocated all heap memory,
-	// but has not adjusted stats.
-	mSysStatInc(sysStat, n)
-}
-
-func sysFault(v unsafe.Pointer, n uintptr) {
-}
-
-func sysReserve(v unsafe.Pointer, n uintptr, reserved *bool) unsafe.Pointer {
-	*reserved = true
-	lock(&memlock)
-	p := memAlloc(n)
-	memCheck()
-	unlock(&memlock)
-	return p
-}
diff --git a/src/runtime/mem_windows.go b/src/runtime/mem_windows.go
deleted file mode 100644
index 42aa7fb..0000000
--- a/src/runtime/mem_windows.go
+++ /dev/null
@@ -1,114 +0,0 @@
-// Copyright 2010 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import (
-	"unsafe"
-)
-
-const (
-	_MEM_COMMIT   = 0x1000
-	_MEM_RESERVE  = 0x2000
-	_MEM_DECOMMIT = 0x4000
-	_MEM_RELEASE  = 0x8000
-
-	_PAGE_READWRITE = 0x0004
-	_PAGE_NOACCESS  = 0x0001
-)
-
-// Don't split the stack as this function may be invoked without a valid G,
-// which prevents us from allocating more stack.
-//go:nosplit
-func sysAlloc(n uintptr, sysStat *uint64) unsafe.Pointer {
-	mSysStatInc(sysStat, n)
-	return unsafe.Pointer(stdcall4(_VirtualAlloc, 0, n, _MEM_COMMIT|_MEM_RESERVE, _PAGE_READWRITE))
-}
-
-func sysUnused(v unsafe.Pointer, n uintptr) {
-	r := stdcall3(_VirtualFree, uintptr(v), n, _MEM_DECOMMIT)
-	if r != 0 {
-		return
-	}
-
-	// Decommit failed. Usual reason is that we've merged memory from two different
-	// VirtualAlloc calls, and Windows will only let each VirtualFree handle pages from
-	// a single VirtualAlloc. It is okay to specify a subset of the pages from a single alloc,
-	// just not pages from multiple allocs. This is a rare case, arising only when we're
-	// trying to give memory back to the operating system, which happens on a time
-	// scale of minutes. It doesn't have to be terribly fast. Instead of extra bookkeeping
-	// on all our VirtualAlloc calls, try freeing successively smaller pieces until
-	// we manage to free something, and then repeat. This ends up being O(n log n)
-	// in the worst case, but that's fast enough.
-	for n > 0 {
-		small := n
-		for small >= 4096 && stdcall3(_VirtualFree, uintptr(v), small, _MEM_DECOMMIT) == 0 {
-			small /= 2
-			small &^= 4096 - 1
-		}
-		if small < 4096 {
-			throw("runtime: failed to decommit pages")
-		}
-		v = add(v, small)
-		n -= small
-	}
-}
-
-func sysUsed(v unsafe.Pointer, n uintptr) {
-	r := stdcall4(_VirtualAlloc, uintptr(v), n, _MEM_COMMIT, _PAGE_READWRITE)
-	if r != uintptr(v) {
-		throw("runtime: failed to commit pages")
-	}
-
-	// Commit failed. See SysUnused.
-	for n > 0 {
-		small := n
-		for small >= 4096 && stdcall4(_VirtualAlloc, uintptr(v), small, _MEM_COMMIT, _PAGE_READWRITE) == 0 {
-			small /= 2
-			small &^= 4096 - 1
-		}
-		if small < 4096 {
-			throw("runtime: failed to decommit pages")
-		}
-		v = add(v, small)
-		n -= small
-	}
-}
-
-// Don't split the stack as this function may be invoked without a valid G,
-// which prevents us from allocating more stack.
-//go:nosplit
-func sysFree(v unsafe.Pointer, n uintptr, sysStat *uint64) {
-	mSysStatDec(sysStat, n)
-	r := stdcall3(_VirtualFree, uintptr(v), 0, _MEM_RELEASE)
-	if r == 0 {
-		throw("runtime: failed to release pages")
-	}
-}
-
-func sysFault(v unsafe.Pointer, n uintptr) {
-	// SysUnused makes the memory inaccessible and prevents its reuse
-	sysUnused(v, n)
-}
-
-func sysReserve(v unsafe.Pointer, n uintptr, reserved *bool) unsafe.Pointer {
-	*reserved = true
-	// v is just a hint.
-	// First try at v.
-	v = unsafe.Pointer(stdcall4(_VirtualAlloc, uintptr(v), n, _MEM_RESERVE, _PAGE_READWRITE))
-	if v != nil {
-		return v
-	}
-
-	// Next let the kernel choose the address.
-	return unsafe.Pointer(stdcall4(_VirtualAlloc, 0, n, _MEM_RESERVE, _PAGE_READWRITE))
-}
-
-func sysMap(v unsafe.Pointer, n uintptr, reserved bool, sysStat *uint64) {
-	mSysStatInc(sysStat, n)
-	p := stdcall4(_VirtualAlloc, uintptr(v), n, _MEM_COMMIT, _PAGE_READWRITE)
-	if p != uintptr(v) {
-		throw("runtime: cannot map pages in arena address space")
-	}
-}
diff --git a/src/runtime/memclr_arm64.s b/src/runtime/memclr_arm64.s
deleted file mode 100644
index c44c123..0000000
--- a/src/runtime/memclr_arm64.s
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-
-// void runtime·memclr(void*, uintptr)
-TEXT runtime·memclr(SB),NOSPLIT,$0-16
-	MOVD	ptr+0(FP), R3
-	MOVD	n+8(FP), R4
-	CMP	$0, R4
-	BEQ	done
-	ADD	R3, R4, R4
-	MOVBU.P	$0, 1(R3)
-	CMP	R3, R4
-	BNE	-2(PC)
-done:
-	RET
diff --git a/src/runtime/memclr_ppc64x.s b/src/runtime/memclr_ppc64x.s
deleted file mode 100644
index cea42cb..0000000
--- a/src/runtime/memclr_ppc64x.s
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ppc64 ppc64le
-
-#include "textflag.h"
-
-// void runtime·memclr(void*, uintptr)
-TEXT runtime·memclr(SB),NOSPLIT,$0-16
-	MOVD	ptr+0(FP), R3
-	MOVD	n+8(FP), R4
-	CMP	R4, $0
-	BEQ	done
-	SUB	$1, R3
-	MOVD	R4, CTR
-	MOVBU	R0, 1(R3)
-	BC	25, 0, -1(PC) // bdnz+ $-4
-done:
-	RET
diff --git a/src/runtime/memmove_arm64.s b/src/runtime/memmove_arm64.s
deleted file mode 100644
index 66059a7..0000000
--- a/src/runtime/memmove_arm64.s
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-
-// void runtime·memmove(void*, void*, uintptr)
-TEXT runtime·memmove(SB), NOSPLIT, $-8-24
-	MOVD	to+0(FP), R3
-	MOVD	from+8(FP), R4
-	MOVD	n+16(FP), R5
-	CMP	$0, R5
-	BNE	check
-	RET
-
-check:
-	CMP	R3, R4
-	BLT	backward
-
-	ADD	R3, R5
-loop:
-	MOVBU.P	1(R4), R6
-	MOVBU.P	R6, 1(R3)
-	CMP	R3, R5
-	BNE	loop
-	RET
-
-backward:
-	ADD	R5, R4
-	ADD	R3, R5
-loop1:
-	MOVBU.W	-1(R4), R6
-	MOVBU.W	R6, -1(R5)
-	CMP	R3, R5
-	BNE	loop1
-	RET
diff --git a/src/runtime/memmove_ppc64x.s b/src/runtime/memmove_ppc64x.s
deleted file mode 100644
index 3ada63e..0000000
--- a/src/runtime/memmove_ppc64x.s
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ppc64 ppc64le
-
-#include "textflag.h"
-
-// void runtime·memmove(void*, void*, uintptr)
-TEXT runtime·memmove(SB), NOSPLIT, $-8-24
-	MOVD	to+0(FP), R3
-	MOVD	from+8(FP), R4
-	MOVD	n+16(FP), R5
-	CMP	R5, $0
-	BNE	check
-	RET
-
-check:
-	CMP	R3, R4
-	BGT	backward
-
-	SUB	$1, R3
-	ADD	R3, R5
-	SUB	$1, R4
-loop:
-	MOVBU	1(R4), R6
-	MOVBU	R6, 1(R3)
-	CMP	R3, R5
-	BNE	loop
-	RET
-
-backward:
-	ADD	R5, R4
-	ADD	R3, R5
-loop1:
-	MOVBU	-1(R4), R6
-	MOVBU	R6, -1(R5)
-	CMP	R3, R5
-	BNE	loop1
-	RET
diff --git a/src/runtime/mfinal.go b/src/runtime/mfinal.go
deleted file mode 100644
index 7e1773c..0000000
--- a/src/runtime/mfinal.go
+++ /dev/null
@@ -1,412 +0,0 @@
-// Copyright 2009 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Garbage collector: finalizers and block profiling.
-
-package runtime
-
-import "unsafe"
-
-type finblock struct {
-	alllink *finblock
-	next    *finblock
-	cnt     int32
-	_       int32
-	fin     [(_FinBlockSize - 2*ptrSize - 2*4) / unsafe.Sizeof(finalizer{})]finalizer
-}
-
-var finlock mutex  // protects the following variables
-var fing *g        // goroutine that runs finalizers
-var finq *finblock // list of finalizers that are to be executed
-var finc *finblock // cache of free blocks
-var finptrmask [_FinBlockSize / ptrSize / 8]byte
-var fingwait bool
-var fingwake bool
-var allfin *finblock // list of all blocks
-
-// NOTE: Layout known to queuefinalizer.
-type finalizer struct {
-	fn   *funcval       // function to call
-	arg  unsafe.Pointer // ptr to object
-	nret uintptr        // bytes of return values from fn
-	fint *_type         // type of first argument of fn
-	ot   *ptrtype       // type of ptr to object
-}
-
-var finalizer1 = [...]byte{
-	// Each Finalizer is 5 words, ptr ptr INT ptr ptr (INT = uintptr here)
-	// Each byte describes 8 words.
-	// Need 8 Finalizers described by 5 bytes before pattern repeats:
-	//	ptr ptr INT ptr ptr
-	//	ptr ptr INT ptr ptr
-	//	ptr ptr INT ptr ptr
-	//	ptr ptr INT ptr ptr
-	//	ptr ptr INT ptr ptr
-	//	ptr ptr INT ptr ptr
-	//	ptr ptr INT ptr ptr
-	//	ptr ptr INT ptr ptr
-	// aka
-	//
-	//	ptr ptr INT ptr ptr ptr ptr INT
-	//	ptr ptr ptr ptr INT ptr ptr ptr
-	//	ptr INT ptr ptr ptr ptr INT ptr
-	//	ptr ptr ptr INT ptr ptr ptr ptr
-	//	INT ptr ptr ptr ptr INT ptr ptr
-	//
-	// Assumptions about Finalizer layout checked below.
-	1<<0 | 1<<1 | 0<<2 | 1<<3 | 1<<4 | 1<<5 | 1<<6 | 0<<7,
-	1<<0 | 1<<1 | 1<<2 | 1<<3 | 0<<4 | 1<<5 | 1<<6 | 1<<7,
-	1<<0 | 0<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<5 | 0<<6 | 1<<7,
-	1<<0 | 1<<1 | 1<<2 | 0<<3 | 1<<4 | 1<<5 | 1<<6 | 1<<7,
-	0<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 0<<5 | 1<<6 | 1<<7,
-}
-
-func queuefinalizer(p unsafe.Pointer, fn *funcval, nret uintptr, fint *_type, ot *ptrtype) {
-	lock(&finlock)
-	if finq == nil || finq.cnt == int32(len(finq.fin)) {
-		if finc == nil {
-			// Note: write barrier here, assigning to finc, but should be okay.
-			finc = (*finblock)(persistentalloc(_FinBlockSize, 0, &memstats.gc_sys))
-			finc.alllink = allfin
-			allfin = finc
-			if finptrmask[0] == 0 {
-				// Build pointer mask for Finalizer array in block.
-				// Check assumptions made in finalizer1 array above.
-				if (unsafe.Sizeof(finalizer{}) != 5*ptrSize ||
-					unsafe.Offsetof(finalizer{}.fn) != 0 ||
-					unsafe.Offsetof(finalizer{}.arg) != ptrSize ||
-					unsafe.Offsetof(finalizer{}.nret) != 2*ptrSize ||
-					unsafe.Offsetof(finalizer{}.fint) != 3*ptrSize ||
-					unsafe.Offsetof(finalizer{}.ot) != 4*ptrSize) {
-					throw("finalizer out of sync")
-				}
-				for i := range finptrmask {
-					finptrmask[i] = finalizer1[i%len(finalizer1)]
-				}
-			}
-		}
-		block := finc
-		finc = block.next
-		block.next = finq
-		finq = block
-	}
-	f := &finq.fin[finq.cnt]
-	finq.cnt++
-	f.fn = fn
-	f.nret = nret
-	f.fint = fint
-	f.ot = ot
-	f.arg = p
-	fingwake = true
-	unlock(&finlock)
-}
-
-//go:nowritebarrier
-func iterate_finq(callback func(*funcval, unsafe.Pointer, uintptr, *_type, *ptrtype)) {
-	for fb := allfin; fb != nil; fb = fb.alllink {
-		for i := int32(0); i < fb.cnt; i++ {
-			f := &fb.fin[i]
-			callback(f.fn, f.arg, f.nret, f.fint, f.ot)
-		}
-	}
-}
-
-func wakefing() *g {
-	var res *g
-	lock(&finlock)
-	if fingwait && fingwake {
-		fingwait = false
-		fingwake = false
-		res = fing
-	}
-	unlock(&finlock)
-	return res
-}
-
-var (
-	fingCreate  uint32
-	fingRunning bool
-)
-
-func createfing() {
-	// start the finalizer goroutine exactly once
-	if fingCreate == 0 && cas(&fingCreate, 0, 1) {
-		go runfinq()
-	}
-}
-
-// This is the goroutine that runs all of the finalizers
-func runfinq() {
-	var (
-		frame    unsafe.Pointer
-		framecap uintptr
-	)
-
-	for {
-		lock(&finlock)
-		fb := finq
-		finq = nil
-		if fb == nil {
-			gp := getg()
-			fing = gp
-			fingwait = true
-			goparkunlock(&finlock, "finalizer wait", traceEvGoBlock, 1)
-			continue
-		}
-		unlock(&finlock)
-		if raceenabled {
-			racefingo()
-		}
-		for fb != nil {
-			for i := fb.cnt; i > 0; i-- {
-				f := (*finalizer)(add(unsafe.Pointer(&fb.fin), uintptr(i-1)*unsafe.Sizeof(finalizer{})))
-
-				framesz := unsafe.Sizeof((interface{})(nil)) + uintptr(f.nret)
-				if framecap < framesz {
-					// The frame does not contain pointers interesting for GC,
-					// all not yet finalized objects are stored in finq.
-					// If we do not mark it as FlagNoScan,
-					// the last finalized object is not collected.
-					frame = mallocgc(framesz, nil, flagNoScan)
-					framecap = framesz
-				}
-
-				if f.fint == nil {
-					throw("missing type in runfinq")
-				}
-				switch f.fint.kind & kindMask {
-				case kindPtr:
-					// direct use of pointer
-					*(*unsafe.Pointer)(frame) = f.arg
-				case kindInterface:
-					ityp := (*interfacetype)(unsafe.Pointer(f.fint))
-					// set up with empty interface
-					(*eface)(frame)._type = &f.ot.typ
-					(*eface)(frame).data = f.arg
-					if len(ityp.mhdr) != 0 {
-						// convert to interface with methods
-						// this conversion is guaranteed to succeed - we checked in SetFinalizer
-						assertE2I(ityp, *(*interface{})(frame), (*fInterface)(frame))
-					}
-				default:
-					throw("bad kind in runfinq")
-				}
-				fingRunning = true
-				reflectcall(nil, unsafe.Pointer(f.fn), frame, uint32(framesz), uint32(framesz))
-				fingRunning = false
-
-				// drop finalizer queue references to finalized object
-				f.fn = nil
-				f.arg = nil
-				f.ot = nil
-				fb.cnt = i - 1
-			}
-			next := fb.next
-			lock(&finlock)
-			fb.next = finc
-			finc = fb
-			unlock(&finlock)
-			fb = next
-		}
-	}
-}
-
-// SetFinalizer sets the finalizer associated with x to f.
-// When the garbage collector finds an unreachable block
-// with an associated finalizer, it clears the association and runs
-// f(x) in a separate goroutine.  This makes x reachable again, but
-// now without an associated finalizer.  Assuming that SetFinalizer
-// is not called again, the next time the garbage collector sees
-// that x is unreachable, it will free x.
-//
-// SetFinalizer(x, nil) clears any finalizer associated with x.
-//
-// The argument x must be a pointer to an object allocated by
-// calling new or by taking the address of a composite literal.
-// The argument f must be a function that takes a single argument
-// to which x's type can be assigned, and can have arbitrary ignored return
-// values. If either of these is not true, SetFinalizer aborts the
-// program.
-//
-// Finalizers are run in dependency order: if A points at B, both have
-// finalizers, and they are otherwise unreachable, only the finalizer
-// for A runs; once A is freed, the finalizer for B can run.
-// If a cyclic structure includes a block with a finalizer, that
-// cycle is not guaranteed to be garbage collected and the finalizer
-// is not guaranteed to run, because there is no ordering that
-// respects the dependencies.
-//
-// The finalizer for x is scheduled to run at some arbitrary time after
-// x becomes unreachable.
-// There is no guarantee that finalizers will run before a program exits,
-// so typically they are useful only for releasing non-memory resources
-// associated with an object during a long-running program.
-// For example, an os.File object could use a finalizer to close the
-// associated operating system file descriptor when a program discards
-// an os.File without calling Close, but it would be a mistake
-// to depend on a finalizer to flush an in-memory I/O buffer such as a
-// bufio.Writer, because the buffer would not be flushed at program exit.
-//
-// It is not guaranteed that a finalizer will run if the size of *x is
-// zero bytes.
-//
-// It is not guaranteed that a finalizer will run for objects allocated
-// in initializers for package-level variables. Such objects may be
-// linker-allocated, not heap-allocated.
-//
-// A single goroutine runs all finalizers for a program, sequentially.
-// If a finalizer must run for a long time, it should do so by starting
-// a new goroutine.
-func SetFinalizer(obj interface{}, finalizer interface{}) {
-	if debug.sbrk != 0 {
-		// debug.sbrk never frees memory, so no finalizers run
-		// (and we don't have the data structures to record them).
-		return
-	}
-	e := (*eface)(unsafe.Pointer(&obj))
-	etyp := e._type
-	if etyp == nil {
-		throw("runtime.SetFinalizer: first argument is nil")
-	}
-	if etyp.kind&kindMask != kindPtr {
-		throw("runtime.SetFinalizer: first argument is " + *etyp._string + ", not pointer")
-	}
-	ot := (*ptrtype)(unsafe.Pointer(etyp))
-	if ot.elem == nil {
-		throw("nil elem type!")
-	}
-
-	// find the containing object
-	_, base, _ := findObject(e.data)
-
-	if base == nil {
-		// 0-length objects are okay.
-		if e.data == unsafe.Pointer(&zerobase) {
-			return
-		}
-
-		// Global initializers might be linker-allocated.
-		//	var Foo = &Object{}
-		//	func main() {
-		//		runtime.SetFinalizer(Foo, nil)
-		//	}
-		// The relevant segments are: noptrdata, data, bss, noptrbss.
-		// We cannot assume they are in any order or even contiguous,
-		// due to external linking.
-		for datap := &firstmoduledata; datap != nil; datap = datap.next {
-			if datap.noptrdata <= uintptr(e.data) && uintptr(e.data) < datap.enoptrdata ||
-				datap.data <= uintptr(e.data) && uintptr(e.data) < datap.edata ||
-				datap.bss <= uintptr(e.data) && uintptr(e.data) < datap.ebss ||
-				datap.noptrbss <= uintptr(e.data) && uintptr(e.data) < datap.enoptrbss {
-				return
-			}
-		}
-		throw("runtime.SetFinalizer: pointer not in allocated block")
-	}
-
-	if e.data != base {
-		// As an implementation detail we allow to set finalizers for an inner byte
-		// of an object if it could come from tiny alloc (see mallocgc for details).
-		if ot.elem == nil || ot.elem.kind&kindNoPointers == 0 || ot.elem.size >= maxTinySize {
-			throw("runtime.SetFinalizer: pointer not at beginning of allocated block")
-		}
-	}
-
-	f := (*eface)(unsafe.Pointer(&finalizer))
-	ftyp := f._type
-	if ftyp == nil {
-		// switch to system stack and remove finalizer
-		systemstack(func() {
-			removefinalizer(e.data)
-		})
-		return
-	}
-
-	if ftyp.kind&kindMask != kindFunc {
-		throw("runtime.SetFinalizer: second argument is " + *ftyp._string + ", not a function")
-	}
-	ft := (*functype)(unsafe.Pointer(ftyp))
-	ins := *(*[]*_type)(unsafe.Pointer(&ft.in))
-	if ft.dotdotdot || len(ins) != 1 {
-		throw("runtime.SetFinalizer: cannot pass " + *etyp._string + " to finalizer " + *ftyp._string)
-	}
-	fint := ins[0]
-	switch {
-	case fint == etyp:
-		// ok - same type
-		goto okarg
-	case fint.kind&kindMask == kindPtr:
-		if (fint.x == nil || fint.x.name == nil || etyp.x == nil || etyp.x.name == nil) && (*ptrtype)(unsafe.Pointer(fint)).elem == ot.elem {
-			// ok - not same type, but both pointers,
-			// one or the other is unnamed, and same element type, so assignable.
-			goto okarg
-		}
-	case fint.kind&kindMask == kindInterface:
-		ityp := (*interfacetype)(unsafe.Pointer(fint))
-		if len(ityp.mhdr) == 0 {
-			// ok - satisfies empty interface
-			goto okarg
-		}
-		if assertE2I2(ityp, obj, nil) {
-			goto okarg
-		}
-	}
-	throw("runtime.SetFinalizer: cannot pass " + *etyp._string + " to finalizer " + *ftyp._string)
-okarg:
-	// compute size needed for return parameters
-	nret := uintptr(0)
-	for _, t := range *(*[]*_type)(unsafe.Pointer(&ft.out)) {
-		nret = round(nret, uintptr(t.align)) + uintptr(t.size)
-	}
-	nret = round(nret, ptrSize)
-
-	// make sure we have a finalizer goroutine
-	createfing()
-
-	systemstack(func() {
-		if !addfinalizer(e.data, (*funcval)(f.data), nret, fint, ot) {
-			throw("runtime.SetFinalizer: finalizer already set")
-		}
-	})
-}
-
-// Look up pointer v in heap.  Return the span containing the object,
-// the start of the object, and the size of the object.  If the object
-// does not exist, return nil, nil, 0.
-func findObject(v unsafe.Pointer) (s *mspan, x unsafe.Pointer, n uintptr) {
-	c := gomcache()
-	c.local_nlookup++
-	if ptrSize == 4 && c.local_nlookup >= 1<<30 {
-		// purge cache stats to prevent overflow
-		lock(&mheap_.lock)
-		purgecachedstats(c)
-		unlock(&mheap_.lock)
-	}
-
-	// find span
-	arena_start := uintptr(unsafe.Pointer(mheap_.arena_start))
-	arena_used := uintptr(unsafe.Pointer(mheap_.arena_used))
-	if uintptr(v) < arena_start || uintptr(v) >= arena_used {
-		return
-	}
-	p := uintptr(v) >> pageShift
-	q := p - arena_start>>pageShift
-	s = *(**mspan)(add(unsafe.Pointer(mheap_.spans), q*ptrSize))
-	if s == nil {
-		return
-	}
-	x = unsafe.Pointer(uintptr(s.start) << pageShift)
-
-	if uintptr(v) < uintptr(x) || uintptr(v) >= uintptr(unsafe.Pointer(s.limit)) || s.state != mSpanInUse {
-		s = nil
-		x = nil
-		return
-	}
-
-	n = uintptr(s.elemsize)
-	if s.sizeclass != 0 {
-		x = add(x, (uintptr(v)-uintptr(x))/n*n)
-	}
-	return
-}
diff --git a/src/runtime/mfixalloc.go b/src/runtime/mfixalloc.go
deleted file mode 100644
index bb2f4e7..0000000
--- a/src/runtime/mfixalloc.go
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Fixed-size object allocator.  Returned memory is not zeroed.
-//
-// See malloc.go for overview.
-
-package runtime
-
-import "unsafe"
-
-// FixAlloc is a simple free-list allocator for fixed size objects.
-// Malloc uses a FixAlloc wrapped around sysAlloc to manages its
-// MCache and MSpan objects.
-//
-// Memory returned by FixAlloc_Alloc is not zeroed.
-// The caller is responsible for locking around FixAlloc calls.
-// Callers can keep state in the object but the first word is
-// smashed by freeing and reallocating.
-type fixalloc struct {
-	size   uintptr
-	first  unsafe.Pointer // go func(unsafe.pointer, unsafe.pointer); f(arg, p) called first time p is returned
-	arg    unsafe.Pointer
-	list   *mlink
-	chunk  *byte
-	nchunk uint32
-	inuse  uintptr // in-use bytes now
-	stat   *uint64
-}
-
-// A generic linked list of blocks.  (Typically the block is bigger than sizeof(MLink).)
-// Since assignments to mlink.next will result in a write barrier being preformed
-// this can not be used by some of the internal GC structures. For example when
-// the sweeper is placing an unmarked object on the free list it does not want the
-// write barrier to be called since that could result in the object being reachable.
-type mlink struct {
-	next *mlink
-}
-
-// Initialize f to allocate objects of the given size,
-// using the allocator to obtain chunks of memory.
-func fixAlloc_Init(f *fixalloc, size uintptr, first func(unsafe.Pointer, unsafe.Pointer), arg unsafe.Pointer, stat *uint64) {
-	f.size = size
-	f.first = *(*unsafe.Pointer)(unsafe.Pointer(&first))
-	f.arg = arg
-	f.list = nil
-	f.chunk = nil
-	f.nchunk = 0
-	f.inuse = 0
-	f.stat = stat
-}
-
-func fixAlloc_Alloc(f *fixalloc) unsafe.Pointer {
-	if f.size == 0 {
-		print("runtime: use of FixAlloc_Alloc before FixAlloc_Init\n")
-		throw("runtime: internal error")
-	}
-
-	if f.list != nil {
-		v := unsafe.Pointer(f.list)
-		f.list = f.list.next
-		f.inuse += f.size
-		return v
-	}
-	if uintptr(f.nchunk) < f.size {
-		f.chunk = (*uint8)(persistentalloc(_FixAllocChunk, 0, f.stat))
-		f.nchunk = _FixAllocChunk
-	}
-
-	v := (unsafe.Pointer)(f.chunk)
-	if f.first != nil {
-		fn := *(*func(unsafe.Pointer, unsafe.Pointer))(unsafe.Pointer(&f.first))
-		fn(f.arg, v)
-	}
-	f.chunk = (*byte)(add(unsafe.Pointer(f.chunk), f.size))
-	f.nchunk -= uint32(f.size)
-	f.inuse += f.size
-	return v
-}
-
-func fixAlloc_Free(f *fixalloc, p unsafe.Pointer) {
-	f.inuse -= f.size
-	v := (*mlink)(p)
-	v.next = f.list
-	f.list = v
-}
diff --git a/src/runtime/mgc.go b/src/runtime/mgc.go
deleted file mode 100644
index f7fd4e5..0000000
--- a/src/runtime/mgc.go
+++ /dev/null
@@ -1,1764 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// TODO(rsc): The code having to do with the heap bitmap needs very serious cleanup.
-// It has gotten completely out of control.
-
-// Garbage collector (GC).
-//
-// The GC runs concurrently with mutator threads, is type accurate (aka precise), allows multiple
-// GC thread to run in parallel. It is a concurrent mark and sweep that uses a write barrier. It is
-// non-generational and non-compacting. Allocation is done using size segregated per P allocation
-// areas to minimize fragmentation while eliminating locks in the common case.
-//
-// The algorithm decomposes into several steps.
-// This is a high level description of the algorithm being used. For an overview of GC a good
-// place to start is Richard Jones' gchandbook.org.
-//
-// The algorithm's intellectual heritage includes Dijkstra's on-the-fly algorithm, see
-// Edsger W. Dijkstra, Leslie Lamport, A. J. Martin, C. S. Scholten, and E. F. M. Steffens. 1978.
-// On-the-fly garbage collection: an exercise in cooperation. Commun. ACM 21, 11 (November 1978),
-// 966-975.
-// For journal quality proofs that these steps are complete, correct, and terminate see
-// Hudson, R., and Moss, J.E.B. Copying Garbage Collection without stopping the world.
-// Concurrency and Computation: Practice and Experience 15(3-5), 2003.
-//
-//  0. Set phase = GCscan from GCoff.
-//  1. Wait for all P's to acknowledge phase change.
-//         At this point all goroutines have passed through a GC safepoint and
-//         know we are in the GCscan phase.
-//  2. GC scans all goroutine stacks, mark and enqueues all encountered pointers
-//       (marking avoids most duplicate enqueuing but races may produce benign duplication).
-//       Preempted goroutines are scanned before P schedules next goroutine.
-//  3. Set phase = GCmark.
-//  4. Wait for all P's to acknowledge phase change.
-//  5. Now write barrier marks and enqueues black, grey, or white to white pointers.
-//       Malloc still allocates white (non-marked) objects.
-//  6. Meanwhile GC transitively walks the heap marking reachable objects.
-//  7. When GC finishes marking heap, it preempts P's one-by-one and
-//       retakes partial wbufs (filled by write barrier or during a stack scan of the goroutine
-//       currently scheduled on the P).
-//  8. Once the GC has exhausted all available marking work it sets phase = marktermination.
-//  9. Wait for all P's to acknowledge phase change.
-// 10. Malloc now allocates black objects, so number of unmarked reachable objects
-//        monotonically decreases.
-// 11. GC preempts P's one-by-one taking partial wbufs and marks all unmarked yet
-//        reachable objects.
-// 12. When GC completes a full cycle over P's and discovers no new grey
-//         objects, (which means all reachable objects are marked) set phase = GCoff.
-// 13. Wait for all P's to acknowledge phase change.
-// 14. Now malloc allocates white (but sweeps spans before use).
-//         Write barrier becomes nop.
-// 15. GC does background sweeping, see description below.
-// 16. When sufficient allocation has taken place replay the sequence starting at 0 above,
-//         see discussion of GC rate below.
-
-// Changing phases.
-// Phases are changed by setting the gcphase to the next phase and possibly calling ackgcphase.
-// All phase action must be benign in the presence of a change.
-// Starting with GCoff
-// GCoff to GCscan
-//     GSscan scans stacks and globals greying them and never marks an object black.
-//     Once all the P's are aware of the new phase they will scan gs on preemption.
-//     This means that the scanning of preempted gs can't start until all the Ps
-//     have acknowledged.
-//     When a stack is scanned, this phase also installs stack barriers to
-//     track how much of the stack has been active.
-//     This transition enables write barriers because stack barriers
-//     assume that writes to higher frames will be tracked by write
-//     barriers. Technically this only needs write barriers for writes
-//     to stack slots, but we enable write barriers in general.
-// GCscan to GCmark
-//     In GCmark, work buffers are drained until there are no more
-//     pointers to scan.
-//     No scanning of objects (making them black) can happen until all
-//     Ps have enabled the write barrier, but that already happened in
-//     the transition to GCscan.
-// GCmark to GCmarktermination
-//     The only change here is that we start allocating black so the Ps must acknowledge
-//     the change before we begin the termination algorithm
-// GCmarktermination to GSsweep
-//     Object currently on the freelist must be marked black for this to work.
-//     Are things on the free lists black or white? How does the sweep phase work?
-
-// Concurrent sweep.
-//
-// The sweep phase proceeds concurrently with normal program execution.
-// The heap is swept span-by-span both lazily (when a goroutine needs another span)
-// and concurrently in a background goroutine (this helps programs that are not CPU bound).
-// At the end of STW mark termination all spans are marked as "needs sweeping".
-//
-// The background sweeper goroutine simply sweeps spans one-by-one.
-//
-// To avoid requesting more OS memory while there are unswept spans, when a
-// goroutine needs another span, it first attempts to reclaim that much memory
-// by sweeping. When a goroutine needs to allocate a new small-object span, it
-// sweeps small-object spans for the same object size until it frees at least
-// one object. When a goroutine needs to allocate large-object span from heap,
-// it sweeps spans until it frees at least that many pages into heap. There is
-// one case where this may not suffice: if a goroutine sweeps and frees two
-// nonadjacent one-page spans to the heap, it will allocate a new two-page
-// span, but there can still be other one-page unswept spans which could be
-// combined into a two-page span.
-//
-// It's critical to ensure that no operations proceed on unswept spans (that would corrupt
-// mark bits in GC bitmap). During GC all mcaches are flushed into the central cache,
-// so they are empty. When a goroutine grabs a new span into mcache, it sweeps it.
-// When a goroutine explicitly frees an object or sets a finalizer, it ensures that
-// the span is swept (either by sweeping it, or by waiting for the concurrent sweep to finish).
-// The finalizer goroutine is kicked off only when all spans are swept.
-// When the next GC starts, it sweeps all not-yet-swept spans (if any).
-
-// GC rate.
-// Next GC is after we've allocated an extra amount of memory proportional to
-// the amount already in use. The proportion is controlled by GOGC environment variable
-// (100 by default). If GOGC=100 and we're using 4M, we'll GC again when we get to 8M
-// (this mark is tracked in next_gc variable). This keeps the GC cost in linear
-// proportion to the allocation cost. Adjusting GOGC just changes the linear constant
-// (and also the amount of extra memory used).
-
-package runtime
-
-import "unsafe"
-
-const (
-	_DebugGC         = 0
-	_ConcurrentSweep = true
-	_FinBlockSize    = 4 * 1024
-	_RootData        = 0
-	_RootBss         = 1
-	_RootFinalizers  = 2
-	_RootSpans       = 3
-	_RootFlushCaches = 4
-	_RootCount       = 5
-
-	// firstStackBarrierOffset is the approximate byte offset at
-	// which to place the first stack barrier from the current SP.
-	// This is a lower bound on how much stack will have to be
-	// re-scanned during mark termination. Subsequent barriers are
-	// placed at firstStackBarrierOffset * 2^n offsets.
-	//
-	// For debugging, this can be set to 0, which will install a
-	// stack barrier at every frame. If you do this, you may also
-	// have to raise _StackMin, since the stack barrier
-	// bookkeeping will use a large amount of each stack.
-	firstStackBarrierOffset = 1024
-	debugStackBarrier       = false
-
-	// sweepMinHeapDistance is a lower bound on the heap distance
-	// (in bytes) reserved for concurrent sweeping between GC
-	// cycles. This will be scaled by gcpercent/100.
-	sweepMinHeapDistance = 1024 * 1024
-)
-
-// heapminimum is the minimum heap size at which to trigger GC.
-// For small heaps, this overrides the usual GOGC*live set rule.
-//
-// When there is a very small live set but a lot of allocation, simply
-// collecting when the heap reaches GOGC*live results in many GC
-// cycles and high total per-GC overhead. This minimum amortizes this
-// per-GC overhead while keeping the heap reasonably small.
-//
-// During initialization this is set to 4MB*GOGC/100. In the case of
-// GOGC==0, this will set heapminimum to 0, resulting in constant
-// collection even when the heap size is small, which is useful for
-// debugging.
-var heapminimum uint64 = defaultHeapMinimum
-
-// defaultHeapMinimum is the value of heapminimum for GOGC==100.
-const defaultHeapMinimum = 4 << 20
-
-// Initialized from $GOGC.  GOGC=off means no GC.
-var gcpercent int32
-
-func gcinit() {
-	if unsafe.Sizeof(workbuf{}) != _WorkbufSize {
-		throw("size of Workbuf is suboptimal")
-	}
-
-	work.markfor = parforalloc(_MaxGcproc)
-	_ = setGCPercent(readgogc())
-	for datap := &firstmoduledata; datap != nil; datap = datap.next {
-		datap.gcdatamask = progToPointerMask((*byte)(unsafe.Pointer(datap.gcdata)), datap.edata-datap.data)
-		datap.gcbssmask = progToPointerMask((*byte)(unsafe.Pointer(datap.gcbss)), datap.ebss-datap.bss)
-	}
-	memstats.next_gc = heapminimum
-}
-
-func readgogc() int32 {
-	p := gogetenv("GOGC")
-	if p == "" {
-		return 100
-	}
-	if p == "off" {
-		return -1
-	}
-	return int32(atoi(p))
-}
-
-// gcenable is called after the bulk of the runtime initialization,
-// just before we're about to start letting user code run.
-// It kicks off the background sweeper goroutine and enables GC.
-func gcenable() {
-	c := make(chan int, 1)
-	go bgsweep(c)
-	<-c
-	memstats.enablegc = true // now that runtime is initialized, GC is okay
-}
-
-func setGCPercent(in int32) (out int32) {
-	lock(&mheap_.lock)
-	out = gcpercent
-	if in < 0 {
-		in = -1
-	}
-	gcpercent = in
-	heapminimum = defaultHeapMinimum * uint64(gcpercent) / 100
-	unlock(&mheap_.lock)
-	return out
-}
-
-// Garbage collector phase.
-// Indicates to write barrier and sychronization task to preform.
-var gcphase uint32
-var writeBarrierEnabled bool // compiler emits references to this in write barriers
-
-// gcBlackenEnabled is 1 if mutator assists and background mark
-// workers are allowed to blacken objects. This must only be set when
-// gcphase == _GCmark.
-var gcBlackenEnabled uint32
-
-// gcBlackenPromptly indicates that optimizations that may
-// hide work from the global work queue should be disabled.
-//
-// If gcBlackenPromptly is true, per-P gcWork caches should
-// be flushed immediately and new objects should be allocated black.
-//
-// There is a tension between allocating objects white and
-// allocating them black. If white and the objects die before being
-// marked they can be collected during this GC cycle. On the other
-// hand allocating them black will reduce _GCmarktermination latency
-// since more work is done in the mark phase. This tension is resolved
-// by allocating white until the mark phase is approaching its end and
-// then allocating black for the remainder of the mark phase.
-var gcBlackenPromptly bool
-
-const (
-	_GCoff             = iota // GC not running; sweeping in background, write barrier disabled
-	_GCstw                    // unused state
-	_GCscan                   // GC collecting roots into workbufs, write barrier ENABLED
-	_GCmark                   // GC marking from workbufs, write barrier ENABLED
-	_GCmarktermination        // GC mark termination: allocate black, P's help GC, write barrier ENABLED
-)
-
-//go:nosplit
-func setGCPhase(x uint32) {
-	atomicstore(&gcphase, x)
-	writeBarrierEnabled = gcphase == _GCmark || gcphase == _GCmarktermination || gcphase == _GCscan
-}
-
-// gcMarkWorkerMode represents the mode that a concurrent mark worker
-// should operate in.
-//
-// Concurrent marking happens through four different mechanisms. One
-// is mutator assists, which happen in response to allocations and are
-// not scheduled. The other three are variations in the per-P mark
-// workers and are distinguished by gcMarkWorkerMode.
-type gcMarkWorkerMode int
-
-const (
-	// gcMarkWorkerDedicatedMode indicates that the P of a mark
-	// worker is dedicated to running that mark worker. The mark
-	// worker should run without preemption until concurrent mark
-	// is done.
-	gcMarkWorkerDedicatedMode gcMarkWorkerMode = iota
-
-	// gcMarkWorkerFractionalMode indicates that a P is currently
-	// running the "fractional" mark worker. The fractional worker
-	// is necessary when GOMAXPROCS*gcGoalUtilization is not an
-	// integer. The fractional worker should run until it is
-	// preempted and will be scheduled to pick up the fractional
-	// part of GOMAXPROCS*gcGoalUtilization.
-	gcMarkWorkerFractionalMode
-
-	// gcMarkWorkerIdleMode indicates that a P is running the mark
-	// worker because it has nothing else to do. The idle worker
-	// should run until it is preempted and account its time
-	// against gcController.idleMarkTime.
-	gcMarkWorkerIdleMode
-)
-
-// gcController implements the GC pacing controller that determines
-// when to trigger concurrent garbage collection and how much marking
-// work to do in mutator assists and background marking.
-//
-// It uses a feedback control algorithm to adjust the memstats.next_gc
-// trigger based on the heap growth and GC CPU utilization each cycle.
-// This algorithm optimizes for heap growth to match GOGC and for CPU
-// utilization between assist and background marking to be 25% of
-// GOMAXPROCS. The high-level design of this algorithm is documented
-// at https://golang.org/s/go15gcpacing.
-var gcController = gcControllerState{
-	// Initial trigger ratio guess.
-	triggerRatio: 7 / 8.0,
-}
-
-type gcControllerState struct {
-	// scanWork is the total scan work performed this cycle. This
-	// is updated atomically during the cycle. Updates may be
-	// batched arbitrarily, since the value is only read at the
-	// end of the cycle.
-	//
-	// Currently this is the bytes of heap scanned. For most uses,
-	// this is an opaque unit of work, but for estimation the
-	// definition is important.
-	scanWork int64
-
-	// bgScanCredit is the scan work credit accumulated by the
-	// concurrent background scan. This credit is accumulated by
-	// the background scan and stolen by mutator assists. This is
-	// updated atomically. Updates occur in bounded batches, since
-	// it is both written and read throughout the cycle.
-	bgScanCredit int64
-
-	// assistTime is the nanoseconds spent in mutator assists
-	// during this cycle. This is updated atomically. Updates
-	// occur in bounded batches, since it is both written and read
-	// throughout the cycle.
-	assistTime int64
-
-	// dedicatedMarkTime is the nanoseconds spent in dedicated
-	// mark workers during this cycle. This is updated atomically
-	// at the end of the concurrent mark phase.
-	dedicatedMarkTime int64
-
-	// fractionalMarkTime is the nanoseconds spent in the
-	// fractional mark worker during this cycle. This is updated
-	// atomically throughout the cycle and will be up-to-date if
-	// the fractional mark worker is not currently running.
-	fractionalMarkTime int64
-
-	// idleMarkTime is the nanoseconds spent in idle marking
-	// during this cycle. This is updated atomically throughout
-	// the cycle.
-	idleMarkTime int64
-
-	// bgMarkStartTime is the absolute start time in nanoseconds
-	// that the background mark phase started.
-	bgMarkStartTime int64
-
-	// assistTime is the absolute start time in nanoseconds that
-	// mutator assists were enabled.
-	assistStartTime int64
-
-	// heapGoal is the goal memstats.heap_live for when this cycle
-	// ends. This is computed at the beginning of each cycle.
-	heapGoal uint64
-
-	// dedicatedMarkWorkersNeeded is the number of dedicated mark
-	// workers that need to be started. This is computed at the
-	// beginning of each cycle and decremented atomically as
-	// dedicated mark workers get started.
-	dedicatedMarkWorkersNeeded int64
-
-	// assistRatio is the ratio of allocated bytes to scan work
-	// that should be performed by mutator assists. This is
-	// computed at the beginning of each cycle and updated every
-	// time heap_scan is updated.
-	assistRatio float64
-
-	// fractionalUtilizationGoal is the fraction of wall clock
-	// time that should be spent in the fractional mark worker.
-	// For example, if the overall mark utilization goal is 25%
-	// and GOMAXPROCS is 6, one P will be a dedicated mark worker
-	// and this will be set to 0.5 so that 50% of the time some P
-	// is in a fractional mark worker. This is computed at the
-	// beginning of each cycle.
-	fractionalUtilizationGoal float64
-
-	// triggerRatio is the heap growth ratio at which the garbage
-	// collection cycle should start. E.g., if this is 0.6, then
-	// GC should start when the live heap has reached 1.6 times
-	// the heap size marked by the previous cycle. This is updated
-	// at the end of of each cycle.
-	triggerRatio float64
-
-	_ [_CacheLineSize]byte
-
-	// fractionalMarkWorkersNeeded is the number of fractional
-	// mark workers that need to be started. This is either 0 or
-	// 1. This is potentially updated atomically at every
-	// scheduling point (hence it gets its own cache line).
-	fractionalMarkWorkersNeeded int64
-
-	_ [_CacheLineSize]byte
-}
-
-// startCycle resets the GC controller's state and computes estimates
-// for a new GC cycle. The caller must hold worldsema.
-func (c *gcControllerState) startCycle() {
-	c.scanWork = 0
-	c.bgScanCredit = 0
-	c.assistTime = 0
-	c.dedicatedMarkTime = 0
-	c.fractionalMarkTime = 0
-	c.idleMarkTime = 0
-
-	// If this is the first GC cycle or we're operating on a very
-	// small heap, fake heap_marked so it looks like next_gc is
-	// the appropriate growth from heap_marked, even though the
-	// real heap_marked may not have a meaningful value (on the
-	// first cycle) or may be much smaller (resulting in a large
-	// error response).
-	if memstats.next_gc <= heapminimum {
-		memstats.heap_marked = uint64(float64(memstats.next_gc) / (1 + c.triggerRatio))
-		memstats.heap_reachable = memstats.heap_marked
-	}
-
-	// Compute the heap goal for this cycle
-	c.heapGoal = memstats.heap_reachable + memstats.heap_reachable*uint64(gcpercent)/100
-
-	// Compute the total mark utilization goal and divide it among
-	// dedicated and fractional workers.
-	totalUtilizationGoal := float64(gomaxprocs) * gcGoalUtilization
-	c.dedicatedMarkWorkersNeeded = int64(totalUtilizationGoal)
-	c.fractionalUtilizationGoal = totalUtilizationGoal - float64(c.dedicatedMarkWorkersNeeded)
-	if c.fractionalUtilizationGoal > 0 {
-		c.fractionalMarkWorkersNeeded = 1
-	} else {
-		c.fractionalMarkWorkersNeeded = 0
-	}
-
-	// Clear per-P state
-	for _, p := range &allp {
-		if p == nil {
-			break
-		}
-		p.gcAssistTime = 0
-	}
-
-	// Compute initial values for controls that are updated
-	// throughout the cycle.
-	c.revise()
-
-	if debug.gcpacertrace > 0 {
-		print("pacer: assist ratio=", c.assistRatio,
-			" (scan ", memstats.heap_scan>>20, " MB in ",
-			work.initialHeapLive>>20, "->",
-			c.heapGoal>>20, " MB)",
-			" workers=", c.dedicatedMarkWorkersNeeded,
-			"+", c.fractionalMarkWorkersNeeded, "\n")
-	}
-}
-
-// revise updates the assist ratio during the GC cycle to account for
-// improved estimates. This should be called either under STW or
-// whenever memstats.heap_scan is updated (with mheap_.lock held).
-func (c *gcControllerState) revise() {
-	// Compute the expected scan work. This is a strict upper
-	// bound on the possible scan work in the current heap.
-	//
-	// You might consider dividing this by 2 (or by
-	// (100+GOGC)/100) to counter this over-estimation, but
-	// benchmarks show that this has almost no effect on mean
-	// mutator utilization, heap size, or assist time and it
-	// introduces the danger of under-estimating and letting the
-	// mutator outpace the garbage collector.
-	scanWorkExpected := memstats.heap_scan
-
-	// Compute the mutator assist ratio so by the time the mutator
-	// allocates the remaining heap bytes up to next_gc, it will
-	// have done (or stolen) the estimated amount of scan work.
-	heapDistance := int64(c.heapGoal) - int64(work.initialHeapLive)
-	if heapDistance <= 1024*1024 {
-		// heapDistance can be negative if GC start is delayed
-		// or if the allocation that pushed heap_live over
-		// next_gc is large or if the trigger is really close
-		// to GOGC. We don't want to set the assist negative
-		// (or divide by zero, or set it really high), so
-		// enforce a minimum on the distance.
-		heapDistance = 1024 * 1024
-	}
-	c.assistRatio = float64(scanWorkExpected) / float64(heapDistance)
-}
-
-// endCycle updates the GC controller state at the end of the
-// concurrent part of the GC cycle.
-func (c *gcControllerState) endCycle() {
-	h_t := c.triggerRatio // For debugging
-
-	// Proportional response gain for the trigger controller. Must
-	// be in [0, 1]. Lower values smooth out transient effects but
-	// take longer to respond to phase changes. Higher values
-	// react to phase changes quickly, but are more affected by
-	// transient changes. Values near 1 may be unstable.
-	const triggerGain = 0.5
-
-	// Compute next cycle trigger ratio. First, this computes the
-	// "error" for this cycle; that is, how far off the trigger
-	// was from what it should have been, accounting for both heap
-	// growth and GC CPU utilization. We compute the actual heap
-	// growth during this cycle and scale that by how far off from
-	// the goal CPU utilization we were (to estimate the heap
-	// growth if we had the desired CPU utilization). The
-	// difference between this estimate and the GOGC-based goal
-	// heap growth is the error.
-	//
-	// TODO(austin): next_gc is based on heap_reachable, not
-	// heap_marked, which means the actual growth ratio
-	// technically isn't comparable to the trigger ratio.
-	goalGrowthRatio := float64(gcpercent) / 100
-	actualGrowthRatio := float64(memstats.heap_live)/float64(memstats.heap_marked) - 1
-	assistDuration := nanotime() - c.assistStartTime
-
-	// Assume background mark hit its utilization goal.
-	utilization := gcGoalUtilization
-	// Add assist utilization; avoid divide by zero.
-	if assistDuration > 0 {
-		utilization += float64(c.assistTime) / float64(assistDuration*int64(gomaxprocs))
-	}
-
-	triggerError := goalGrowthRatio - c.triggerRatio - utilization/gcGoalUtilization*(actualGrowthRatio-c.triggerRatio)
-
-	// Finally, we adjust the trigger for next time by this error,
-	// damped by the proportional gain.
-	c.triggerRatio += triggerGain * triggerError
-	if c.triggerRatio < 0 {
-		// This can happen if the mutator is allocating very
-		// quickly or the GC is scanning very slowly.
-		c.triggerRatio = 0
-	} else if c.triggerRatio > goalGrowthRatio*0.95 {
-		// Ensure there's always a little margin so that the
-		// mutator assist ratio isn't infinity.
-		c.triggerRatio = goalGrowthRatio * 0.95
-	}
-
-	if debug.gcpacertrace > 0 {
-		// Print controller state in terms of the design
-		// document.
-		H_m_prev := memstats.heap_marked
-		H_T := memstats.next_gc
-		h_a := actualGrowthRatio
-		H_a := memstats.heap_live
-		h_g := goalGrowthRatio
-		H_g := int64(float64(H_m_prev) * (1 + h_g))
-		u_a := utilization
-		u_g := gcGoalUtilization
-		W_a := c.scanWork
-		print("pacer: H_m_prev=", H_m_prev,
-			" h_t=", h_t, " H_T=", H_T,
-			" h_a=", h_a, " H_a=", H_a,
-			" h_g=", h_g, " H_g=", H_g,
-			" u_a=", u_a, " u_g=", u_g,
-			" W_a=", W_a,
-			" goalΔ=", goalGrowthRatio-h_t,
-			" actualΔ=", h_a-h_t,
-			" u_a/u_g=", u_a/u_g,
-			"\n")
-	}
-}
-
-// findRunnableGCWorker returns the background mark worker for _p_ if it
-// should be run. This must only be called when gcBlackenEnabled != 0.
-func (c *gcControllerState) findRunnableGCWorker(_p_ *p) *g {
-	if gcBlackenEnabled == 0 {
-		throw("gcControllerState.findRunnable: blackening not enabled")
-	}
-	if _p_.gcBgMarkWorker == nil {
-		throw("gcControllerState.findRunnable: no background mark worker")
-	}
-	if work.bgMark1.done != 0 && work.bgMark2.done != 0 {
-		// Background mark is done. Don't schedule background
-		// mark worker any more. (This is not just an
-		// optimization. Without this we can spin scheduling
-		// the background worker and having it return
-		// immediately with no work to do.)
-		return nil
-	}
-
-	decIfPositive := func(ptr *int64) bool {
-		if *ptr > 0 {
-			if xaddint64(ptr, -1) >= 0 {
-				return true
-			}
-			// We lost a race
-			xaddint64(ptr, +1)
-		}
-		return false
-	}
-
-	if decIfPositive(&c.dedicatedMarkWorkersNeeded) {
-		// This P is now dedicated to marking until the end of
-		// the concurrent mark phase.
-		_p_.gcMarkWorkerMode = gcMarkWorkerDedicatedMode
-		// TODO(austin): This P isn't going to run anything
-		// else for a while, so kick everything out of its run
-		// queue.
-	} else {
-		if _p_.gcw.wbuf == 0 && work.full == 0 && work.partial == 0 {
-			// No work to be done right now. This can
-			// happen at the end of the mark phase when
-			// there are still assists tapering off. Don't
-			// bother running background mark because
-			// it'll just return immediately.
-			if work.nwait == work.nproc {
-				// There are also no workers, which
-				// means we've reached a completion point.
-				// There may not be any workers to
-				// signal it, so signal it here.
-				readied := false
-				if gcBlackenPromptly {
-					if work.bgMark1.done == 0 {
-						throw("completing mark 2, but bgMark1.done == 0")
-					}
-					readied = work.bgMark2.complete()
-				} else {
-					readied = work.bgMark1.complete()
-				}
-				if readied {
-					// complete just called ready,
-					// but we're inside the
-					// scheduler. Let it know that
-					// that's okay.
-					resetspinning()
-				}
-			}
-			return nil
-		}
-		if !decIfPositive(&c.fractionalMarkWorkersNeeded) {
-			// No more workers are need right now.
-			return nil
-		}
-
-		// This P has picked the token for the fractional worker.
-		// Is the GC currently under or at the utilization goal?
-		// If so, do more work.
-		//
-		// We used to check whether doing one time slice of work
-		// would remain under the utilization goal, but that has the
-		// effect of delaying work until the mutator has run for
-		// enough time slices to pay for the work. During those time
-		// slices, write barriers are enabled, so the mutator is running slower.
-		// Now instead we do the work whenever we're under or at the
-		// utilization work and pay for it by letting the mutator run later.
-		// This doesn't change the overall utilization averages, but it
-		// front loads the GC work so that the GC finishes earlier and
-		// write barriers can be turned off sooner, effectively giving
-		// the mutator a faster machine.
-		//
-		// The old, slower behavior can be restored by setting
-		//	gcForcePreemptNS = forcePreemptNS.
-		const gcForcePreemptNS = 0
-
-		// TODO(austin): We could fast path this and basically
-		// eliminate contention on c.fractionalMarkWorkersNeeded by
-		// precomputing the minimum time at which it's worth
-		// next scheduling the fractional worker. Then Ps
-		// don't have to fight in the window where we've
-		// passed that deadline and no one has started the
-		// worker yet.
-		//
-		// TODO(austin): Shorter preemption interval for mark
-		// worker to improve fairness and give this
-		// finer-grained control over schedule?
-		now := nanotime() - gcController.bgMarkStartTime
-		then := now + gcForcePreemptNS
-		timeUsed := c.fractionalMarkTime + gcForcePreemptNS
-		if then > 0 && float64(timeUsed)/float64(then) > c.fractionalUtilizationGoal {
-			// Nope, we'd overshoot the utilization goal
-			xaddint64(&c.fractionalMarkWorkersNeeded, +1)
-			return nil
-		}
-		_p_.gcMarkWorkerMode = gcMarkWorkerFractionalMode
-	}
-
-	// Run the background mark worker
-	gp := _p_.gcBgMarkWorker
-	casgstatus(gp, _Gwaiting, _Grunnable)
-	if trace.enabled {
-		traceGoUnpark(gp, 0)
-	}
-	return gp
-}
-
-// gcGoalUtilization is the goal CPU utilization for background
-// marking as a fraction of GOMAXPROCS.
-const gcGoalUtilization = 0.25
-
-// gcBgCreditSlack is the amount of scan work credit background
-// scanning can accumulate locally before updating
-// gcController.bgScanCredit. Lower values give mutator assists more
-// accurate accounting of background scanning. Higher values reduce
-// memory contention.
-const gcBgCreditSlack = 2000
-
-// gcAssistTimeSlack is the nanoseconds of mutator assist time that
-// can accumulate on a P before updating gcController.assistTime.
-const gcAssistTimeSlack = 5000
-
-// Determine whether to initiate a GC.
-// If the GC is already working no need to trigger another one.
-// This should establish a feedback loop where if the GC does not
-// have sufficient time to complete then more memory will be
-// requested from the OS increasing heap size thus allow future
-// GCs more time to complete.
-// memstat.heap_live read has a benign race.
-// A false negative simple does not start a GC, a false positive
-// will start a GC needlessly. Neither have correctness issues.
-func shouldtriggergc() bool {
-	return memstats.heap_live >= memstats.next_gc && atomicloaduint(&bggc.working) == 0
-}
-
-// bgMarkSignal synchronizes the GC coordinator and background mark workers.
-type bgMarkSignal struct {
-	// Workers race to cas to 1. Winner signals coordinator.
-	done uint32
-	// Coordinator to wake up.
-	lock mutex
-	g    *g
-	wake bool
-}
-
-func (s *bgMarkSignal) wait() {
-	lock(&s.lock)
-	if s.wake {
-		// Wakeup already happened
-		unlock(&s.lock)
-	} else {
-		s.g = getg()
-		goparkunlock(&s.lock, "mark wait (idle)", traceEvGoBlock, 1)
-	}
-	s.wake = false
-	s.g = nil
-}
-
-// complete signals the completion of this phase of marking. This can
-// be called multiple times during a cycle; only the first call has
-// any effect.
-//
-// The caller should arrange to deschedule itself as soon as possible
-// after calling complete in order to let the coordinator goroutine
-// run.
-func (s *bgMarkSignal) complete() bool {
-	if cas(&s.done, 0, 1) {
-		// This is the first worker to reach this completion point.
-		// Signal the main GC goroutine.
-		lock(&s.lock)
-		if s.g == nil {
-			// It hasn't parked yet.
-			s.wake = true
-		} else {
-			ready(s.g, 0)
-		}
-		unlock(&s.lock)
-		return true
-	}
-	return false
-}
-
-func (s *bgMarkSignal) clear() {
-	s.done = 0
-}
-
-var work struct {
-	full  uint64 // lock-free list of full blocks workbuf
-	empty uint64 // lock-free list of empty blocks workbuf
-	// TODO(rlh): partial no longer used, remove. (issue #11922)
-	partial uint64                // lock-free list of partially filled blocks workbuf
-	pad0    [_CacheLineSize]uint8 // prevents false-sharing between full/empty and nproc/nwait
-	nproc   uint32
-	tstart  int64
-	nwait   uint32
-	ndone   uint32
-	alldone note
-	markfor *parfor
-
-	bgMarkReady note   // signal background mark worker has started
-	bgMarkDone  uint32 // cas to 1 when at a background mark completion point
-	// Background mark completion signaling
-
-	// Coordination for the 2 parts of the mark phase.
-	bgMark1 bgMarkSignal
-	bgMark2 bgMarkSignal
-
-	// Copy of mheap.allspans for marker or sweeper.
-	spans []*mspan
-
-	// totaltime is the CPU nanoseconds spent in GC since the
-	// program started if debug.gctrace > 0.
-	totaltime int64
-
-	// bytesMarked is the number of bytes marked this cycle. This
-	// includes bytes blackened in scanned objects, noscan objects
-	// that go straight to black, and permagrey objects scanned by
-	// markroot during the concurrent scan phase. This is updated
-	// atomically during the cycle. Updates may be batched
-	// arbitrarily, since the value is only read at the end of the
-	// cycle.
-	//
-	// Because of benign races during marking, this number may not
-	// be the exact number of marked bytes, but it should be very
-	// close.
-	bytesMarked uint64
-
-	// initialHeapLive is the value of memstats.heap_live at the
-	// beginning of this GC cycle.
-	initialHeapLive uint64
-}
-
-// GC runs a garbage collection and blocks the caller until the
-// garbage collection is complete. It may also block the entire
-// program.
-func GC() {
-	startGC(gcForceBlockMode, false)
-}
-
-const (
-	gcBackgroundMode = iota // concurrent GC
-	gcForceMode             // stop-the-world GC now
-	gcForceBlockMode        // stop-the-world GC now and wait for sweep
-)
-
-// startGC starts a GC cycle. If mode is gcBackgroundMode, this will
-// start GC in the background and return. Otherwise, this will block
-// until the new GC cycle is started and finishes. If forceTrigger is
-// true, it indicates that GC should be started regardless of the
-// current heap size.
-func startGC(mode int, forceTrigger bool) {
-	// The gc is turned off (via enablegc) until the bootstrap has completed.
-	// Also, malloc gets called in the guts of a number of libraries that might be
-	// holding locks. To avoid deadlocks during stop-the-world, don't bother
-	// trying to run gc while holding a lock. The next mallocgc without a lock
-	// will do the gc instead.
-	mp := acquirem()
-	if gp := getg(); gp == mp.g0 || mp.locks > 1 || mp.preemptoff != "" || !memstats.enablegc || panicking != 0 || gcpercent < 0 {
-		releasem(mp)
-		return
-	}
-	releasem(mp)
-	mp = nil
-
-	if debug.gcstoptheworld == 1 {
-		mode = gcForceMode
-	} else if debug.gcstoptheworld == 2 {
-		mode = gcForceBlockMode
-	}
-
-	if mode != gcBackgroundMode {
-		// special synchronous cases
-		gc(mode)
-		return
-	}
-
-	// trigger concurrent GC
-	readied := false
-	lock(&bggc.lock)
-	// The trigger was originally checked speculatively, so
-	// recheck that this really should trigger GC. (For example,
-	// we may have gone through a whole GC cycle since the
-	// speculative check.)
-	if !(forceTrigger || shouldtriggergc()) {
-		unlock(&bggc.lock)
-		return
-	}
-	if !bggc.started {
-		bggc.working = 1
-		bggc.started = true
-		readied = true
-		go backgroundgc()
-	} else if bggc.working == 0 {
-		bggc.working = 1
-		readied = true
-		ready(bggc.g, 0)
-	}
-	unlock(&bggc.lock)
-	if readied {
-		// This G just started or ready()d the GC goroutine.
-		// Switch directly to it by yielding.
-		Gosched()
-	}
-}
-
-// State of the background concurrent GC goroutine.
-var bggc struct {
-	lock    mutex
-	g       *g
-	working uint
-	started bool
-}
-
-// backgroundgc is running in a goroutine and does the concurrent GC work.
-// bggc holds the state of the backgroundgc.
-func backgroundgc() {
-	bggc.g = getg()
-	for {
-		gc(gcBackgroundMode)
-		lock(&bggc.lock)
-		bggc.working = 0
-		goparkunlock(&bggc.lock, "Concurrent GC wait", traceEvGoBlock, 1)
-	}
-}
-
-func gc(mode int) {
-	// Timing/utilization tracking
-	var stwprocs, maxprocs int32
-	var tSweepTerm, tScan, tInstallWB, tMark, tMarkTerm int64
-
-	// debug.gctrace variables
-	var heap0, heap1, heap2, heapGoal uint64
-
-	// memstats statistics
-	var now, pauseStart, pauseNS int64
-
-	// Ok, we're doing it!  Stop everybody else
-	semacquire(&worldsema, false)
-
-	// Pick up the remaining unswept/not being swept spans concurrently
-	//
-	// This shouldn't happen if we're being invoked in background
-	// mode since proportional sweep should have just finished
-	// sweeping everything, but rounding errors, etc, may leave a
-	// few spans unswept. In forced mode, this is necessary since
-	// GC can be forced at any point in the sweeping cycle.
-	for gosweepone() != ^uintptr(0) {
-		sweep.nbgsweep++
-	}
-
-	if trace.enabled {
-		traceGCStart()
-	}
-
-	if mode == gcBackgroundMode {
-		gcBgMarkStartWorkers()
-	}
-	now = nanotime()
-	stwprocs, maxprocs = gcprocs(), gomaxprocs
-	tSweepTerm = now
-	heap0 = memstats.heap_live
-
-	pauseStart = now
-	systemstack(stopTheWorldWithSema)
-	systemstack(finishsweep_m) // finish sweep before we start concurrent scan.
-	// clearpools before we start the GC. If we wait they memory will not be
-	// reclaimed until the next GC cycle.
-	clearpools()
-
-	gcResetMarkState()
-
-	if mode == gcBackgroundMode { // Do as much work concurrently as possible
-		gcController.startCycle()
-		heapGoal = gcController.heapGoal
-
-		systemstack(func() {
-			// Enter scan phase. This enables write
-			// barriers to track changes to stack frames
-			// above the stack barrier.
-			//
-			// TODO: This has evolved to the point where
-			// we carefully ensure invariants we no longer
-			// depend on. Either:
-			//
-			// 1) Enable full write barriers for the scan,
-			// but eliminate the ragged barrier below
-			// (since the start the world ensures all Ps
-			// have observed the write barrier enable) and
-			// consider draining during the scan.
-			//
-			// 2) Only enable write barriers for writes to
-			// the stack at this point, and then enable
-			// write barriers for heap writes when we
-			// enter the mark phase. This means we cannot
-			// drain in the scan phase and must perform a
-			// ragged barrier to ensure all Ps have
-			// enabled heap write barriers before we drain
-			// or enable assists.
-			//
-			// 3) Don't install stack barriers over frame
-			// boundaries where there are up-pointers.
-			setGCPhase(_GCscan)
-
-			gcBgMarkPrepare() // Must happen before assist enable.
-
-			// At this point all Ps have enabled the write
-			// barrier, thus maintaining the no white to
-			// black invariant. Enable mutator assists to
-			// put back-pressure on fast allocating
-			// mutators.
-			atomicstore(&gcBlackenEnabled, 1)
-
-			// Concurrent scan.
-			startTheWorldWithSema()
-			now = nanotime()
-			pauseNS += now - pauseStart
-			tScan = now
-			gcController.assistStartTime = now
-			gcscan_m()
-
-			// Enter mark phase.
-			tInstallWB = nanotime()
-			setGCPhase(_GCmark)
-			// Ensure all Ps have observed the phase
-			// change and have write barriers enabled
-			// before any blackening occurs.
-			forEachP(func(*p) {})
-		})
-		// Concurrent mark.
-		tMark = nanotime()
-
-		// Enable background mark workers and wait for
-		// background mark completion.
-		gcController.bgMarkStartTime = nanotime()
-		work.bgMark1.clear()
-		work.bgMark1.wait()
-
-		// The global work list is empty, but there can still be work
-		// sitting in the per-P work caches and there can be more
-		// objects reachable from global roots since they don't have write
-		// barriers. Rescan some roots and flush work caches.
-		systemstack(func() {
-			// rescan global data and bss.
-			markroot(nil, _RootData)
-			markroot(nil, _RootBss)
-
-			// Disallow caching workbufs.
-			gcBlackenPromptly = true
-
-			// Flush all currently cached workbufs. This
-			// also forces any remaining background
-			// workers out of their loop.
-			forEachP(func(_p_ *p) {
-				_p_.gcw.dispose()
-			})
-		})
-
-		// Wait for this more aggressive background mark to complete.
-		work.bgMark2.clear()
-		work.bgMark2.wait()
-
-		// Begin mark termination.
-		now = nanotime()
-		tMarkTerm = now
-		pauseStart = now
-		systemstack(stopTheWorldWithSema)
-		// The gcphase is _GCmark, it will transition to _GCmarktermination
-		// below. The important thing is that the wb remains active until
-		// all marking is complete. This includes writes made by the GC.
-
-		// Flush the gcWork caches. This must be done before
-		// endCycle since endCycle depends on statistics kept
-		// in these caches.
-		gcFlushGCWork()
-
-		gcController.endCycle()
-	} else {
-		// For non-concurrent GC (mode != gcBackgroundMode)
-		// The g stacks have not been scanned so clear g state
-		// such that mark termination scans all stacks.
-		gcResetGState()
-
-		t := nanotime()
-		tScan, tInstallWB, tMark, tMarkTerm = t, t, t, t
-		heapGoal = heap0
-	}
-
-	// World is stopped.
-	// Start marktermination which includes enabling the write barrier.
-	atomicstore(&gcBlackenEnabled, 0)
-	gcBlackenPromptly = false
-	setGCPhase(_GCmarktermination)
-
-	heap1 = memstats.heap_live
-	startTime := nanotime()
-
-	mp := acquirem()
-	mp.preemptoff = "gcing"
-	_g_ := getg()
-	_g_.m.traceback = 2
-	gp := _g_.m.curg
-	casgstatus(gp, _Grunning, _Gwaiting)
-	gp.waitreason = "garbage collection"
-
-	// Run gc on the g0 stack.  We do this so that the g stack
-	// we're currently running on will no longer change.  Cuts
-	// the root set down a bit (g0 stacks are not scanned, and
-	// we don't need to scan gc's internal state).  We also
-	// need to switch to g0 so we can shrink the stack.
-	systemstack(func() {
-		gcMark(startTime)
-		// Must return immediately.
-		// The outer function's stack may have moved
-		// during gcMark (it shrinks stacks, including the
-		// outer function's stack), so we must not refer
-		// to any of its variables. Return back to the
-		// non-system stack to pick up the new addresses
-		// before continuing.
-	})
-
-	systemstack(func() {
-		heap2 = work.bytesMarked
-		if debug.gccheckmark > 0 {
-			// Run a full stop-the-world mark using checkmark bits,
-			// to check that we didn't forget to mark anything during
-			// the concurrent mark process.
-			gcResetGState() // Rescan stacks
-			gcResetMarkState()
-			initCheckmarks()
-			gcMark(startTime)
-			clearCheckmarks()
-		}
-
-		// marking is complete so we can turn the write barrier off
-		setGCPhase(_GCoff)
-		gcSweep(mode)
-
-		if debug.gctrace > 1 {
-			startTime = nanotime()
-			// The g stacks have been scanned so
-			// they have gcscanvalid==true and gcworkdone==true.
-			// Reset these so that all stacks will be rescanned.
-			gcResetGState()
-			gcResetMarkState()
-			finishsweep_m()
-
-			// Still in STW but gcphase is _GCoff, reset to _GCmarktermination
-			// At this point all objects will be found during the gcMark which
-			// does a complete STW mark and object scan.
-			setGCPhase(_GCmarktermination)
-			gcMark(startTime)
-			setGCPhase(_GCoff) // marking is done, turn off wb.
-			gcSweep(mode)
-		}
-	})
-
-	_g_.m.traceback = 0
-	casgstatus(gp, _Gwaiting, _Grunning)
-
-	if trace.enabled {
-		traceGCDone()
-	}
-
-	// all done
-	mp.preemptoff = ""
-
-	if gcphase != _GCoff {
-		throw("gc done but gcphase != _GCoff")
-	}
-
-	// Update timing memstats
-	now, unixNow := nanotime(), unixnanotime()
-	pauseNS += now - pauseStart
-	atomicstore64(&memstats.last_gc, uint64(unixNow)) // must be Unix time to make sense to user
-	memstats.pause_ns[memstats.numgc%uint32(len(memstats.pause_ns))] = uint64(pauseNS)
-	memstats.pause_end[memstats.numgc%uint32(len(memstats.pause_end))] = uint64(unixNow)
-	memstats.pause_total_ns += uint64(pauseNS)
-
-	// Update work.totaltime.
-	sweepTermCpu := int64(stwprocs) * (tScan - tSweepTerm)
-	scanCpu := tInstallWB - tScan
-	installWBCpu := int64(0)
-	// We report idle marking time below, but omit it from the
-	// overall utilization here since it's "free".
-	markCpu := gcController.assistTime + gcController.dedicatedMarkTime + gcController.fractionalMarkTime
-	markTermCpu := int64(stwprocs) * (now - tMarkTerm)
-	cycleCpu := sweepTermCpu + scanCpu + installWBCpu + markCpu + markTermCpu
-	work.totaltime += cycleCpu
-
-	// Compute overall GC CPU utilization.
-	totalCpu := sched.totaltime + (now-sched.procresizetime)*int64(gomaxprocs)
-	memstats.gc_cpu_fraction = float64(work.totaltime) / float64(totalCpu)
-
-	memstats.numgc++
-
-	systemstack(startTheWorldWithSema)
-	semrelease(&worldsema)
-
-	releasem(mp)
-	mp = nil
-
-	if debug.gctrace > 0 {
-		tEnd := now
-		util := int(memstats.gc_cpu_fraction * 100)
-
-		var sbuf [24]byte
-		printlock()
-		print("gc ", memstats.numgc,
-			" @", string(itoaDiv(sbuf[:], uint64(tSweepTerm-runtimeInitTime)/1e6, 3)), "s ",
-			util, "%: ")
-		prev := tSweepTerm
-		for i, ns := range []int64{tScan, tInstallWB, tMark, tMarkTerm, tEnd} {
-			if i != 0 {
-				print("+")
-			}
-			print(string(fmtNSAsMS(sbuf[:], uint64(ns-prev))))
-			prev = ns
-		}
-		print(" ms clock, ")
-		for i, ns := range []int64{sweepTermCpu, scanCpu, installWBCpu, gcController.assistTime, gcController.dedicatedMarkTime + gcController.fractionalMarkTime, gcController.idleMarkTime, markTermCpu} {
-			if i == 4 || i == 5 {
-				// Separate mark time components with /.
-				print("/")
-			} else if i != 0 {
-				print("+")
-			}
-			print(string(fmtNSAsMS(sbuf[:], uint64(ns))))
-		}
-		print(" ms cpu, ",
-			heap0>>20, "->", heap1>>20, "->", heap2>>20, " MB, ",
-			heapGoal>>20, " MB goal, ",
-			maxprocs, " P")
-		if mode != gcBackgroundMode {
-			print(" (forced)")
-		}
-		print("\n")
-		printunlock()
-	}
-	sweep.nbgsweep = 0
-	sweep.npausesweep = 0
-
-	// now that gc is done, kick off finalizer thread if needed
-	if !concurrentSweep {
-		// give the queued finalizers, if any, a chance to run
-		Gosched()
-	}
-}
-
-// gcBgMarkStartWorkers prepares background mark worker goroutines.
-// These goroutines will not run until the mark phase, but they must
-// be started while the work is not stopped and from a regular G
-// stack. The caller must hold worldsema.
-func gcBgMarkStartWorkers() {
-	// Background marking is performed by per-P G's. Ensure that
-	// each P has a background GC G.
-	for _, p := range &allp {
-		if p == nil || p.status == _Pdead {
-			break
-		}
-		if p.gcBgMarkWorker == nil {
-			go gcBgMarkWorker(p)
-			notetsleepg(&work.bgMarkReady, -1)
-			noteclear(&work.bgMarkReady)
-		}
-	}
-}
-
-// gcBgMarkPrepare sets up state for background marking.
-// Mutator assists must not yet be enabled.
-func gcBgMarkPrepare() {
-	// Background marking will stop when the work queues are empty
-	// and there are no more workers (note that, since this is
-	// concurrent, this may be a transient state, but mark
-	// termination will clean it up). Between background workers
-	// and assists, we don't really know how many workers there
-	// will be, so we pretend to have an arbitrarily large number
-	// of workers, almost all of which are "waiting". While a
-	// worker is working it decrements nwait. If nproc == nwait,
-	// there are no workers.
-	work.nproc = ^uint32(0)
-	work.nwait = ^uint32(0)
-
-	// Reset background mark completion points.
-	work.bgMark1.done = 1
-	work.bgMark2.done = 1
-}
-
-func gcBgMarkWorker(p *p) {
-	// Register this G as the background mark worker for p.
-	if p.gcBgMarkWorker != nil {
-		throw("P already has a background mark worker")
-	}
-	gp := getg()
-
-	mp := acquirem()
-	p.gcBgMarkWorker = gp
-	// After this point, the background mark worker is scheduled
-	// cooperatively by gcController.findRunnable. Hence, it must
-	// never be preempted, as this would put it into _Grunnable
-	// and put it on a run queue. Instead, when the preempt flag
-	// is set, this puts itself into _Gwaiting to be woken up by
-	// gcController.findRunnable at the appropriate time.
-	notewakeup(&work.bgMarkReady)
-	for {
-		// Go to sleep until woken by gcContoller.findRunnable.
-		// We can't releasem yet since even the call to gopark
-		// may be preempted.
-		gopark(func(g *g, mp unsafe.Pointer) bool {
-			releasem((*m)(mp))
-			return true
-		}, unsafe.Pointer(mp), "mark worker (idle)", traceEvGoBlock, 0)
-
-		// Loop until the P dies and disassociates this
-		// worker. (The P may later be reused, in which case
-		// it will get a new worker.)
-		if p.gcBgMarkWorker != gp {
-			break
-		}
-
-		// Disable preemption so we can use the gcw. If the
-		// scheduler wants to preempt us, we'll stop draining,
-		// dispose the gcw, and then preempt.
-		mp = acquirem()
-
-		if gcBlackenEnabled == 0 {
-			throw("gcBgMarkWorker: blackening not enabled")
-		}
-
-		startTime := nanotime()
-
-		decnwait := xadd(&work.nwait, -1)
-		if decnwait == work.nproc {
-			println("runtime: work.nwait=", decnwait, "work.nproc=", work.nproc)
-			throw("work.nwait was > work.nproc")
-		}
-
-		done := false
-		switch p.gcMarkWorkerMode {
-		default:
-			throw("gcBgMarkWorker: unexpected gcMarkWorkerMode")
-		case gcMarkWorkerDedicatedMode:
-			gcDrain(&p.gcw, gcBgCreditSlack)
-			// gcDrain did the xadd(&work.nwait +1) to
-			// match the decrement above. It only returns
-			// at a mark completion point.
-			done = true
-			if !p.gcw.empty() {
-				throw("gcDrain returned with buffer")
-			}
-		case gcMarkWorkerFractionalMode, gcMarkWorkerIdleMode:
-			gcDrainUntilPreempt(&p.gcw, gcBgCreditSlack)
-
-			// If we are nearing the end of mark, dispose
-			// of the cache promptly. We must do this
-			// before signaling that we're no longer
-			// working so that other workers can't observe
-			// no workers and no work while we have this
-			// cached, and before we compute done.
-			if gcBlackenPromptly {
-				p.gcw.dispose()
-			}
-
-			// Was this the last worker and did we run out
-			// of work?
-			incnwait := xadd(&work.nwait, +1)
-			if incnwait > work.nproc {
-				println("runtime: p.gcMarkWorkerMode=", p.gcMarkWorkerMode,
-					"work.nwait=", incnwait, "work.nproc=", work.nproc)
-				throw("work.nwait > work.nproc")
-			}
-			done = incnwait == work.nproc && work.full == 0 && work.partial == 0
-		}
-
-		// If this worker reached a background mark completion
-		// point, signal the main GC goroutine.
-		if done {
-			if gcBlackenPromptly {
-				if work.bgMark1.done == 0 {
-					throw("completing mark 2, but bgMark1.done == 0")
-				}
-				work.bgMark2.complete()
-			} else {
-				work.bgMark1.complete()
-			}
-		}
-
-		duration := nanotime() - startTime
-		switch p.gcMarkWorkerMode {
-		case gcMarkWorkerDedicatedMode:
-			xaddint64(&gcController.dedicatedMarkTime, duration)
-			xaddint64(&gcController.dedicatedMarkWorkersNeeded, 1)
-		case gcMarkWorkerFractionalMode:
-			xaddint64(&gcController.fractionalMarkTime, duration)
-			xaddint64(&gcController.fractionalMarkWorkersNeeded, 1)
-		case gcMarkWorkerIdleMode:
-			xaddint64(&gcController.idleMarkTime, duration)
-		}
-	}
-}
-
-// gcMarkWorkAvailable returns true if executing a mark worker
-// on p is potentially useful.
-func gcMarkWorkAvailable(p *p) bool {
-	if !p.gcw.empty() {
-		return true
-	}
-	if atomicload64(&work.full) != 0 || atomicload64(&work.partial) != 0 {
-		return true // global work available
-	}
-	return false
-}
-
-// gcFlushGCWork disposes the gcWork caches of all Ps. The world must
-// be stopped.
-//go:nowritebarrier
-func gcFlushGCWork() {
-	// Gather all cached GC work. All other Ps are stopped, so
-	// it's safe to manipulate their GC work caches.
-	for i := 0; i < int(gomaxprocs); i++ {
-		allp[i].gcw.dispose()
-	}
-}
-
-// gcMark runs the mark (or, for concurrent GC, mark termination)
-// STW is in effect at this point.
-//TODO go:nowritebarrier
-func gcMark(start_time int64) {
-	if debug.allocfreetrace > 0 {
-		tracegc()
-	}
-
-	if gcphase != _GCmarktermination {
-		throw("in gcMark expecting to see gcphase as _GCmarktermination")
-	}
-	work.tstart = start_time
-
-	gcCopySpans() // TODO(rlh): should this be hoisted and done only once? Right now it is done for normal marking and also for checkmarking.
-
-	// Make sure the per-P gcWork caches are empty. During mark
-	// termination, these caches can still be used temporarily,
-	// but must be disposed to the global lists immediately.
-	gcFlushGCWork()
-
-	work.nwait = 0
-	work.ndone = 0
-	work.nproc = uint32(gcprocs())
-
-	if trace.enabled {
-		traceGCScanStart()
-	}
-
-	parforsetup(work.markfor, work.nproc, uint32(_RootCount+allglen), false, markroot)
-	if work.nproc > 1 {
-		noteclear(&work.alldone)
-		helpgc(int32(work.nproc))
-	}
-
-	gchelperstart()
-	parfordo(work.markfor)
-
-	var gcw gcWork
-	gcDrain(&gcw, -1)
-	gcw.dispose()
-
-	if work.full != 0 {
-		throw("work.full != 0")
-	}
-	if work.partial != 0 {
-		throw("work.partial != 0")
-	}
-
-	if work.nproc > 1 {
-		notesleep(&work.alldone)
-	}
-
-	for i := 0; i < int(gomaxprocs); i++ {
-		if allp[i].gcw.wbuf != 0 {
-			throw("P has cached GC work at end of mark termination")
-		}
-	}
-
-	if trace.enabled {
-		traceGCScanDone()
-	}
-
-	// TODO(austin): This doesn't have to be done during STW, as
-	// long as we block the next GC cycle until this is done. Move
-	// it after we start the world, but before dropping worldsema.
-	// (See issue #11465.)
-	freeStackSpans()
-
-	cachestats()
-
-	// Compute the reachable heap size at the beginning of the
-	// cycle. This is approximately the marked heap size at the
-	// end (which we know) minus the amount of marked heap that
-	// was allocated after marking began (which we don't know, but
-	// is approximately the amount of heap that was allocated
-	// since marking began).
-	allocatedDuringCycle := memstats.heap_live - work.initialHeapLive
-	if work.bytesMarked >= allocatedDuringCycle {
-		memstats.heap_reachable = work.bytesMarked - allocatedDuringCycle
-	} else {
-		// This can happen if most of the allocation during
-		// the cycle never became reachable from the heap.
-		// Just set the reachable heap approximation to 0 and
-		// let the heapminimum kick in below.
-		memstats.heap_reachable = 0
-	}
-
-	// Trigger the next GC cycle when the allocated heap has grown
-	// by triggerRatio over the reachable heap size. Assume that
-	// we're in steady state, so the reachable heap size is the
-	// same now as it was at the beginning of the GC cycle.
-	memstats.next_gc = uint64(float64(memstats.heap_reachable) * (1 + gcController.triggerRatio))
-	if memstats.next_gc < heapminimum {
-		memstats.next_gc = heapminimum
-	}
-	if int64(memstats.next_gc) < 0 {
-		print("next_gc=", memstats.next_gc, " bytesMarked=", work.bytesMarked, " heap_live=", memstats.heap_live, " initialHeapLive=", work.initialHeapLive, "\n")
-		throw("next_gc underflow")
-	}
-
-	// Update other GC heap size stats.
-	memstats.heap_live = work.bytesMarked
-	memstats.heap_marked = work.bytesMarked
-	memstats.heap_scan = uint64(gcController.scanWork)
-
-	minNextGC := memstats.heap_live + sweepMinHeapDistance*uint64(gcpercent)/100
-	if memstats.next_gc < minNextGC {
-		// The allocated heap is already past the trigger.
-		// This can happen if the triggerRatio is very low and
-		// the reachable heap estimate is less than the live
-		// heap size.
-		//
-		// Concurrent sweep happens in the heap growth from
-		// heap_live to next_gc, so bump next_gc up to ensure
-		// that concurrent sweep has some heap growth in which
-		// to perform sweeping before we start the next GC
-		// cycle.
-		memstats.next_gc = minNextGC
-	}
-
-	if trace.enabled {
-		traceHeapAlloc()
-		traceNextGC()
-	}
-}
-
-func gcSweep(mode int) {
-	if gcphase != _GCoff {
-		throw("gcSweep being done but phase is not GCoff")
-	}
-	gcCopySpans()
-
-	lock(&mheap_.lock)
-	mheap_.sweepgen += 2
-	mheap_.sweepdone = 0
-	sweep.spanidx = 0
-	unlock(&mheap_.lock)
-
-	if !_ConcurrentSweep || mode == gcForceBlockMode {
-		// Special case synchronous sweep.
-		// Record that no proportional sweeping has to happen.
-		lock(&mheap_.lock)
-		mheap_.sweepPagesPerByte = 0
-		mheap_.pagesSwept = 0
-		unlock(&mheap_.lock)
-		// Sweep all spans eagerly.
-		for sweepone() != ^uintptr(0) {
-			sweep.npausesweep++
-		}
-		// Do an additional mProf_GC, because all 'free' events are now real as well.
-		mProf_GC()
-		mProf_GC()
-		return
-	}
-
-	// Account how much sweeping needs to be done before the next
-	// GC cycle and set up proportional sweep statistics.
-	var pagesToSweep uintptr
-	for _, s := range work.spans {
-		if s.state == mSpanInUse {
-			pagesToSweep += s.npages
-		}
-	}
-	heapDistance := int64(memstats.next_gc) - int64(memstats.heap_live)
-	// Add a little margin so rounding errors and concurrent
-	// sweep are less likely to leave pages unswept when GC starts.
-	heapDistance -= 1024 * 1024
-	if heapDistance < _PageSize {
-		// Avoid setting the sweep ratio extremely high
-		heapDistance = _PageSize
-	}
-	lock(&mheap_.lock)
-	mheap_.sweepPagesPerByte = float64(pagesToSweep) / float64(heapDistance)
-	mheap_.pagesSwept = 0
-	mheap_.spanBytesAlloc = 0
-	unlock(&mheap_.lock)
-
-	// Background sweep.
-	lock(&sweep.lock)
-	if sweep.parked {
-		sweep.parked = false
-		ready(sweep.g, 0)
-	}
-	unlock(&sweep.lock)
-	mProf_GC()
-}
-
-func gcCopySpans() {
-	// Cache runtime.mheap_.allspans in work.spans to avoid conflicts with
-	// resizing/freeing allspans.
-	// New spans can be created while GC progresses, but they are not garbage for
-	// this round:
-	//  - new stack spans can be created even while the world is stopped.
-	//  - new malloc spans can be created during the concurrent sweep
-	// Even if this is stop-the-world, a concurrent exitsyscall can allocate a stack from heap.
-	lock(&mheap_.lock)
-	// Free the old cached mark array if necessary.
-	if work.spans != nil && &work.spans[0] != &h_allspans[0] {
-		sysFree(unsafe.Pointer(&work.spans[0]), uintptr(len(work.spans))*unsafe.Sizeof(work.spans[0]), &memstats.other_sys)
-	}
-	// Cache the current array for sweeping.
-	mheap_.gcspans = mheap_.allspans
-	work.spans = h_allspans
-	unlock(&mheap_.lock)
-}
-
-// gcResetGState resets the GC state of all G's and returns the length
-// of allgs.
-func gcResetGState() (numgs int) {
-	// This may be called during a concurrent phase, so make sure
-	// allgs doesn't change.
-	lock(&allglock)
-	for _, gp := range allgs {
-		gp.gcscandone = false  // set to true in gcphasework
-		gp.gcscanvalid = false // stack has not been scanned
-		gp.gcalloc = 0
-		gp.gcscanwork = 0
-	}
-	numgs = len(allgs)
-	unlock(&allglock)
-	return
-}
-
-// gcResetMarkState resets state prior to marking (concurrent or STW).
-//
-// TODO(austin): Merge with gcResetGState. See issue #11427.
-func gcResetMarkState() {
-	work.bytesMarked = 0
-	work.initialHeapLive = memstats.heap_live
-}
-
-// Hooks for other packages
-
-var poolcleanup func()
-
-//go:linkname sync_runtime_registerPoolCleanup sync.runtime_registerPoolCleanup
-func sync_runtime_registerPoolCleanup(f func()) {
-	poolcleanup = f
-}
-
-func clearpools() {
-	// clear sync.Pools
-	if poolcleanup != nil {
-		poolcleanup()
-	}
-
-	// Clear central sudog cache.
-	// Leave per-P caches alone, they have strictly bounded size.
-	// Disconnect cached list before dropping it on the floor,
-	// so that a dangling ref to one entry does not pin all of them.
-	lock(&sched.sudoglock)
-	var sg, sgnext *sudog
-	for sg = sched.sudogcache; sg != nil; sg = sgnext {
-		sgnext = sg.next
-		sg.next = nil
-	}
-	sched.sudogcache = nil
-	unlock(&sched.sudoglock)
-
-	// Clear central defer pools.
-	// Leave per-P pools alone, they have strictly bounded size.
-	lock(&sched.deferlock)
-	for i := range sched.deferpool {
-		// disconnect cached list before dropping it on the floor,
-		// so that a dangling ref to one entry does not pin all of them.
-		var d, dlink *_defer
-		for d = sched.deferpool[i]; d != nil; d = dlink {
-			dlink = d.link
-			d.link = nil
-		}
-		sched.deferpool[i] = nil
-	}
-	unlock(&sched.deferlock)
-
-	for _, p := range &allp {
-		if p == nil {
-			break
-		}
-		// clear tinyalloc pool
-		if c := p.mcache; c != nil {
-			c.tiny = nil
-			c.tinyoffset = 0
-		}
-	}
-}
-
-// Timing
-
-//go:nowritebarrier
-func gchelper() {
-	_g_ := getg()
-	_g_.m.traceback = 2
-	gchelperstart()
-
-	if trace.enabled {
-		traceGCScanStart()
-	}
-
-	// parallel mark for over GC roots
-	parfordo(work.markfor)
-	if gcphase != _GCscan {
-		var gcw gcWork
-		gcDrain(&gcw, -1) // blocks in getfull
-		gcw.dispose()
-	}
-
-	if trace.enabled {
-		traceGCScanDone()
-	}
-
-	nproc := work.nproc // work.nproc can change right after we increment work.ndone
-	if xadd(&work.ndone, +1) == nproc-1 {
-		notewakeup(&work.alldone)
-	}
-	_g_.m.traceback = 0
-}
-
-func gchelperstart() {
-	_g_ := getg()
-
-	if _g_.m.helpgc < 0 || _g_.m.helpgc >= _MaxGcproc {
-		throw("gchelperstart: bad m->helpgc")
-	}
-	if _g_ != _g_.m.g0 {
-		throw("gchelper not running on g0 stack")
-	}
-}
-
-// itoaDiv formats val/(10**dec) into buf.
-func itoaDiv(buf []byte, val uint64, dec int) []byte {
-	i := len(buf) - 1
-	idec := i - dec
-	for val >= 10 || i >= idec {
-		buf[i] = byte(val%10 + '0')
-		i--
-		if i == idec {
-			buf[i] = '.'
-			i--
-		}
-		val /= 10
-	}
-	buf[i] = byte(val + '0')
-	return buf[i:]
-}
-
-// fmtNSAsMS nicely formats ns nanoseconds as milliseconds.
-func fmtNSAsMS(buf []byte, ns uint64) []byte {
-	if ns >= 10e6 {
-		// Format as whole milliseconds.
-		return itoaDiv(buf, ns/1e6, 0)
-	}
-	// Format two digits of precision, with at most three decimal places.
-	x := ns / 1e3
-	if x == 0 {
-		buf[0] = '0'
-		return buf[:1]
-	}
-	dec := 3
-	for x >= 100 {
-		x /= 10
-		dec--
-	}
-	return itoaDiv(buf, x, dec)
-}
diff --git a/src/runtime/mgcmark.go b/src/runtime/mgcmark.go
deleted file mode 100644
index 42aacb6..0000000
--- a/src/runtime/mgcmark.go
+++ /dev/null
@@ -1,1020 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Garbage collector: marking and scanning
-
-package runtime
-
-import "unsafe"
-
-// Scan all of the stacks, greying (or graying if in America) the referents
-// but not blackening them since the mark write barrier isn't installed.
-//go:nowritebarrier
-func gcscan_m() {
-	_g_ := getg()
-
-	// Grab the g that called us and potentially allow rescheduling.
-	// This allows it to be scanned like other goroutines.
-	mastergp := _g_.m.curg
-	casgstatus(mastergp, _Grunning, _Gwaiting)
-	mastergp.waitreason = "garbage collection scan"
-
-	// Span sweeping has been done by finishsweep_m.
-	// Long term we will want to make this goroutine runnable
-	// by placing it onto a scanenqueue state and then calling
-	// runtime·restartg(mastergp) to make it Grunnable.
-	// At the bottom we will want to return this p back to the scheduler.
-
-	// Prepare flag indicating that the scan has not been completed.
-	local_allglen := gcResetGState()
-
-	work.ndone = 0
-	useOneP := uint32(1) // For now do not do this in parallel.
-	//	ackgcphase is not needed since we are not scanning running goroutines.
-	parforsetup(work.markfor, useOneP, uint32(_RootCount+local_allglen), false, markroot)
-	parfordo(work.markfor)
-
-	lock(&allglock)
-	// Check that gc work is done.
-	for i := 0; i < local_allglen; i++ {
-		gp := allgs[i]
-		if !gp.gcscandone {
-			throw("scan missed a g")
-		}
-	}
-	unlock(&allglock)
-
-	casgstatus(mastergp, _Gwaiting, _Grunning)
-	// Let the g that called us continue to run.
-}
-
-// ptrmask for an allocation containing a single pointer.
-var oneptrmask = [...]uint8{1}
-
-//go:nowritebarrier
-func markroot(desc *parfor, i uint32) {
-	// TODO: Consider using getg().m.p.ptr().gcw.
-	var gcw gcWork
-
-	// Note: if you add a case here, please also update heapdump.go:dumproots.
-	switch i {
-	case _RootData:
-		for datap := &firstmoduledata; datap != nil; datap = datap.next {
-			scanblock(datap.data, datap.edata-datap.data, datap.gcdatamask.bytedata, &gcw)
-		}
-
-	case _RootBss:
-		for datap := &firstmoduledata; datap != nil; datap = datap.next {
-			scanblock(datap.bss, datap.ebss-datap.bss, datap.gcbssmask.bytedata, &gcw)
-		}
-
-	case _RootFinalizers:
-		for fb := allfin; fb != nil; fb = fb.alllink {
-			scanblock(uintptr(unsafe.Pointer(&fb.fin[0])), uintptr(fb.cnt)*unsafe.Sizeof(fb.fin[0]), &finptrmask[0], &gcw)
-		}
-
-	case _RootSpans:
-		// mark MSpan.specials
-		sg := mheap_.sweepgen
-		for spanidx := uint32(0); spanidx < uint32(len(work.spans)); spanidx++ {
-			s := work.spans[spanidx]
-			if s.state != mSpanInUse {
-				continue
-			}
-			if !useCheckmark && s.sweepgen != sg {
-				// sweepgen was updated (+2) during non-checkmark GC pass
-				print("sweep ", s.sweepgen, " ", sg, "\n")
-				throw("gc: unswept span")
-			}
-			for sp := s.specials; sp != nil; sp = sp.next {
-				if sp.kind != _KindSpecialFinalizer {
-					continue
-				}
-				// don't mark finalized object, but scan it so we
-				// retain everything it points to.
-				spf := (*specialfinalizer)(unsafe.Pointer(sp))
-				// A finalizer can be set for an inner byte of an object, find object beginning.
-				p := uintptr(s.start<<_PageShift) + uintptr(spf.special.offset)/s.elemsize*s.elemsize
-				if gcphase != _GCscan {
-					scanobject(p, &gcw) // scanned during mark termination
-				}
-				scanblock(uintptr(unsafe.Pointer(&spf.fn)), ptrSize, &oneptrmask[0], &gcw)
-			}
-		}
-
-	case _RootFlushCaches:
-		if gcphase != _GCscan { // Do not flush mcaches during GCscan phase.
-			flushallmcaches()
-		}
-
-	default:
-		// the rest is scanning goroutine stacks
-		if uintptr(i-_RootCount) >= allglen {
-			throw("markroot: bad index")
-		}
-		gp := allgs[i-_RootCount]
-
-		// remember when we've first observed the G blocked
-		// needed only to output in traceback
-		status := readgstatus(gp) // We are not in a scan state
-		if (status == _Gwaiting || status == _Gsyscall) && gp.waitsince == 0 {
-			gp.waitsince = work.tstart
-		}
-
-		// Shrink a stack if not much of it is being used but not in the scan phase.
-		if gcphase == _GCmarktermination {
-			// Shrink during STW GCmarktermination phase thus avoiding
-			// complications introduced by shrinking during
-			// non-STW phases.
-			shrinkstack(gp)
-		}
-
-		scang(gp)
-	}
-
-	gcw.dispose()
-}
-
-// gcAssistAlloc records and allocation of size bytes and, if
-// allowAssist is true, may assist GC scanning in proportion to the
-// allocations performed by this mutator since the last assist.
-//
-// It should only be called if gcAssistAlloc != 0.
-//
-// This must be called with preemption disabled.
-//go:nowritebarrier
-func gcAssistAlloc(size uintptr, allowAssist bool) {
-	// Find the G responsible for this assist.
-	gp := getg()
-	if gp.m.curg != nil {
-		gp = gp.m.curg
-	}
-
-	// Record allocation.
-	gp.gcalloc += size
-
-	if !allowAssist {
-		return
-	}
-
-	// Don't assist in non-preemptible contexts. These are
-	// generally fragile and won't allow the assist to block.
-	if getg() == gp.m.g0 {
-		return
-	}
-	if mp := getg().m; mp.locks > 0 || mp.preemptoff != "" {
-		return
-	}
-
-	// Compute the amount of assist scan work we need to do.
-	scanWork := int64(gcController.assistRatio*float64(gp.gcalloc)) - gp.gcscanwork
-	// scanWork can be negative if the last assist scanned a large
-	// object and we're still ahead of our assist goal.
-	if scanWork <= 0 {
-		return
-	}
-
-retry:
-	// Steal as much credit as we can from the background GC's
-	// scan credit. This is racy and may drop the background
-	// credit below 0 if two mutators steal at the same time. This
-	// will just cause steals to fail until credit is accumulated
-	// again, so in the long run it doesn't really matter, but we
-	// do have to handle the negative credit case.
-	bgScanCredit := atomicloadint64(&gcController.bgScanCredit)
-	stolen := int64(0)
-	if bgScanCredit > 0 {
-		if bgScanCredit < scanWork {
-			stolen = bgScanCredit
-		} else {
-			stolen = scanWork
-		}
-		xaddint64(&gcController.bgScanCredit, -stolen)
-
-		scanWork -= stolen
-		gp.gcscanwork += stolen
-
-		if scanWork == 0 {
-			return
-		}
-	}
-
-	// Perform assist work
-	completed := false
-	systemstack(func() {
-		if atomicload(&gcBlackenEnabled) == 0 {
-			// The gcBlackenEnabled check in malloc races with the
-			// store that clears it but an atomic check in every malloc
-			// would be a performance hit.
-			// Instead we recheck it here on the non-preemptable system
-			// stack to determine if we should preform an assist.
-
-			// GC is done, so ignore any remaining debt.
-			scanWork = 0
-			return
-		}
-		// Track time spent in this assist. Since we're on the
-		// system stack, this is non-preemptible, so we can
-		// just measure start and end time.
-		startTime := nanotime()
-
-		decnwait := xadd(&work.nwait, -1)
-		if decnwait == work.nproc {
-			println("runtime: work.nwait =", decnwait, "work.nproc=", work.nproc)
-			throw("nwait > work.nprocs")
-		}
-
-		// drain own cached work first in the hopes that it
-		// will be more cache friendly.
-		gcw := &getg().m.p.ptr().gcw
-		startScanWork := gcw.scanWork
-		gcDrainN(gcw, scanWork)
-		// Record that we did this much scan work.
-		workDone := gcw.scanWork - startScanWork
-		gp.gcscanwork += workDone
-		scanWork -= workDone
-		// If we are near the end of the mark phase
-		// dispose of the gcw.
-		if gcBlackenPromptly {
-			gcw.dispose()
-		}
-		// If this is the last worker and we ran out of work,
-		// signal a completion point.
-		incnwait := xadd(&work.nwait, +1)
-		if incnwait > work.nproc {
-			println("runtime: work.nwait=", incnwait,
-				"work.nproc=", work.nproc,
-				"gcBlackenPromptly=", gcBlackenPromptly)
-			throw("work.nwait > work.nproc")
-		}
-
-		if incnwait == work.nproc && work.full == 0 && work.partial == 0 {
-			// This has reached a background completion
-			// point.
-			if gcBlackenPromptly {
-				if work.bgMark1.done == 0 {
-					throw("completing mark 2, but bgMark1.done == 0")
-				}
-				work.bgMark2.complete()
-			} else {
-				work.bgMark1.complete()
-			}
-			completed = true
-		}
-		duration := nanotime() - startTime
-		_p_ := gp.m.p.ptr()
-		_p_.gcAssistTime += duration
-		if _p_.gcAssistTime > gcAssistTimeSlack {
-			xaddint64(&gcController.assistTime, _p_.gcAssistTime)
-			_p_.gcAssistTime = 0
-		}
-	})
-
-	if completed {
-		// We called complete() above, so we should yield to
-		// the now-runnable GC coordinator.
-		Gosched()
-
-		// It's likely that this assist wasn't able to pay off
-		// its debt, but it's also likely that the Gosched let
-		// the GC finish this cycle and there's no point in
-		// waiting. If the GC finished, skip the delay below.
-		if atomicload(&gcBlackenEnabled) == 0 {
-			scanWork = 0
-		}
-	}
-
-	if scanWork > 0 {
-		// We were unable steal enough credit or perform
-		// enough work to pay off the assist debt. We need to
-		// do one of these before letting the mutator allocate
-		// more, so go around again after performing an
-		// interruptible sleep for 100 us (the same as the
-		// getfull barrier) to let other mutators run.
-		timeSleep(100 * 1000)
-		goto retry
-	}
-}
-
-//go:nowritebarrier
-func scanstack(gp *g) {
-	if gp.gcscanvalid {
-		if gcphase == _GCmarktermination {
-			gcRemoveStackBarriers(gp)
-		}
-		return
-	}
-
-	if readgstatus(gp)&_Gscan == 0 {
-		print("runtime:scanstack: gp=", gp, ", goid=", gp.goid, ", gp->atomicstatus=", hex(readgstatus(gp)), "\n")
-		throw("scanstack - bad status")
-	}
-
-	switch readgstatus(gp) &^ _Gscan {
-	default:
-		print("runtime: gp=", gp, ", goid=", gp.goid, ", gp->atomicstatus=", readgstatus(gp), "\n")
-		throw("mark - bad status")
-	case _Gdead:
-		return
-	case _Grunning:
-		print("runtime: gp=", gp, ", goid=", gp.goid, ", gp->atomicstatus=", readgstatus(gp), "\n")
-		throw("scanstack: goroutine not stopped")
-	case _Grunnable, _Gsyscall, _Gwaiting:
-		// ok
-	}
-
-	if gp == getg() {
-		throw("can't scan our own stack")
-	}
-	mp := gp.m
-	if mp != nil && mp.helpgc != 0 {
-		throw("can't scan gchelper stack")
-	}
-
-	var sp, barrierOffset, nextBarrier uintptr
-	if gp.syscallsp != 0 {
-		sp = gp.syscallsp
-	} else {
-		sp = gp.sched.sp
-	}
-	switch gcphase {
-	case _GCscan:
-		// Install stack barriers during stack scan.
-		barrierOffset = firstStackBarrierOffset
-		nextBarrier = sp + barrierOffset
-
-		if debug.gcstackbarrieroff > 0 {
-			nextBarrier = ^uintptr(0)
-		}
-
-		if gp.stkbarPos != 0 || len(gp.stkbar) != 0 {
-			// If this happens, it's probably because we
-			// scanned a stack twice in the same phase.
-			print("stkbarPos=", gp.stkbarPos, " len(stkbar)=", len(gp.stkbar), " goid=", gp.goid, " gcphase=", gcphase, "\n")
-			throw("g already has stack barriers")
-		}
-
-	case _GCmarktermination:
-		if int(gp.stkbarPos) == len(gp.stkbar) {
-			// gp hit all of the stack barriers (or there
-			// were none). Re-scan the whole stack.
-			nextBarrier = ^uintptr(0)
-		} else {
-			// Only re-scan up to the lowest un-hit
-			// barrier. Any frames above this have not
-			// executed since the _GCscan scan of gp and
-			// any writes through up-pointers to above
-			// this barrier had write barriers.
-			nextBarrier = gp.stkbar[gp.stkbarPos].savedLRPtr
-			if debugStackBarrier {
-				print("rescan below ", hex(nextBarrier), " in [", hex(sp), ",", hex(gp.stack.hi), ") goid=", gp.goid, "\n")
-			}
-		}
-
-		gcRemoveStackBarriers(gp)
-
-	default:
-		throw("scanstack in wrong phase")
-	}
-
-	gcw := &getg().m.p.ptr().gcw
-	n := 0
-	scanframe := func(frame *stkframe, unused unsafe.Pointer) bool {
-		scanframeworker(frame, unused, gcw)
-
-		if frame.fp > nextBarrier {
-			// We skip installing a barrier on bottom-most
-			// frame because on LR machines this LR is not
-			// on the stack.
-			if gcphase == _GCscan && n != 0 {
-				gcInstallStackBarrier(gp, frame)
-				barrierOffset *= 2
-				nextBarrier = sp + barrierOffset
-			} else if gcphase == _GCmarktermination {
-				// We just scanned a frame containing
-				// a return to a stack barrier. Since
-				// this frame never returned, we can
-				// stop scanning.
-				return false
-			}
-		}
-		n++
-
-		return true
-	}
-	gentraceback(^uintptr(0), ^uintptr(0), 0, gp, 0, nil, 0x7fffffff, scanframe, nil, 0)
-	tracebackdefers(gp, scanframe, nil)
-	if gcphase == _GCmarktermination {
-		gcw.dispose()
-	}
-	gp.gcscanvalid = true
-}
-
-// Scan a stack frame: local variables and function arguments/results.
-//go:nowritebarrier
-func scanframeworker(frame *stkframe, unused unsafe.Pointer, gcw *gcWork) {
-
-	f := frame.fn
-	targetpc := frame.continpc
-	if targetpc == 0 {
-		// Frame is dead.
-		return
-	}
-	if _DebugGC > 1 {
-		print("scanframe ", funcname(f), "\n")
-	}
-	if targetpc != f.entry {
-		targetpc--
-	}
-	pcdata := pcdatavalue(f, _PCDATA_StackMapIndex, targetpc)
-	if pcdata == -1 {
-		// We do not have a valid pcdata value but there might be a
-		// stackmap for this function.  It is likely that we are looking
-		// at the function prologue, assume so and hope for the best.
-		pcdata = 0
-	}
-
-	// Scan local variables if stack frame has been allocated.
-	size := frame.varp - frame.sp
-	var minsize uintptr
-	switch thechar {
-	case '6', '8':
-		minsize = 0
-	case '7':
-		minsize = spAlign
-	default:
-		minsize = ptrSize
-	}
-	if size > minsize {
-		stkmap := (*stackmap)(funcdata(f, _FUNCDATA_LocalsPointerMaps))
-		if stkmap == nil || stkmap.n <= 0 {
-			print("runtime: frame ", funcname(f), " untyped locals ", hex(frame.varp-size), "+", hex(size), "\n")
-			throw("missing stackmap")
-		}
-
-		// Locals bitmap information, scan just the pointers in locals.
-		if pcdata < 0 || pcdata >= stkmap.n {
-			// don't know where we are
-			print("runtime: pcdata is ", pcdata, " and ", stkmap.n, " locals stack map entries for ", funcname(f), " (targetpc=", targetpc, ")\n")
-			throw("scanframe: bad symbol table")
-		}
-		bv := stackmapdata(stkmap, pcdata)
-		size = uintptr(bv.n) * ptrSize
-		scanblock(frame.varp-size, size, bv.bytedata, gcw)
-	}
-
-	// Scan arguments.
-	if frame.arglen > 0 {
-		var bv bitvector
-		if frame.argmap != nil {
-			bv = *frame.argmap
-		} else {
-			stkmap := (*stackmap)(funcdata(f, _FUNCDATA_ArgsPointerMaps))
-			if stkmap == nil || stkmap.n <= 0 {
-				print("runtime: frame ", funcname(f), " untyped args ", hex(frame.argp), "+", hex(frame.arglen), "\n")
-				throw("missing stackmap")
-			}
-			if pcdata < 0 || pcdata >= stkmap.n {
-				// don't know where we are
-				print("runtime: pcdata is ", pcdata, " and ", stkmap.n, " args stack map entries for ", funcname(f), " (targetpc=", targetpc, ")\n")
-				throw("scanframe: bad symbol table")
-			}
-			bv = stackmapdata(stkmap, pcdata)
-		}
-		scanblock(frame.argp, uintptr(bv.n)*ptrSize, bv.bytedata, gcw)
-	}
-}
-
-// gcMaxStackBarriers returns the maximum number of stack barriers
-// that can be installed in a stack of stackSize bytes.
-func gcMaxStackBarriers(stackSize int) (n int) {
-	if firstStackBarrierOffset == 0 {
-		// Special debugging case for inserting stack barriers
-		// at every frame. Steal half of the stack for the
-		// []stkbar. Technically, if the stack were to consist
-		// solely of return PCs we would need two thirds of
-		// the stack, but stealing that much breaks things and
-		// this doesn't happen in practice.
-		return stackSize / 2 / int(unsafe.Sizeof(stkbar{}))
-	}
-
-	offset := firstStackBarrierOffset
-	for offset < stackSize {
-		n++
-		offset *= 2
-	}
-	return n + 1
-}
-
-// gcInstallStackBarrier installs a stack barrier over the return PC of frame.
-//go:nowritebarrier
-func gcInstallStackBarrier(gp *g, frame *stkframe) {
-	if frame.lr == 0 {
-		if debugStackBarrier {
-			print("not installing stack barrier with no LR, goid=", gp.goid, "\n")
-		}
-		return
-	}
-
-	// Save the return PC and overwrite it with stackBarrier.
-	var lrUintptr uintptr
-	if usesLR {
-		lrUintptr = frame.sp
-	} else {
-		lrUintptr = frame.fp - regSize
-	}
-	lrPtr := (*uintreg)(unsafe.Pointer(lrUintptr))
-	if debugStackBarrier {
-		print("install stack barrier at ", hex(lrUintptr), " over ", hex(*lrPtr), ", goid=", gp.goid, "\n")
-		if uintptr(*lrPtr) != frame.lr {
-			print("frame.lr=", hex(frame.lr))
-			throw("frame.lr differs from stack LR")
-		}
-	}
-
-	gp.stkbar = gp.stkbar[:len(gp.stkbar)+1]
-	stkbar := &gp.stkbar[len(gp.stkbar)-1]
-	stkbar.savedLRPtr = lrUintptr
-	stkbar.savedLRVal = uintptr(*lrPtr)
-	*lrPtr = uintreg(stackBarrierPC)
-}
-
-// gcRemoveStackBarriers removes all stack barriers installed in gp's stack.
-//go:nowritebarrier
-func gcRemoveStackBarriers(gp *g) {
-	if debugStackBarrier && gp.stkbarPos != 0 {
-		print("hit ", gp.stkbarPos, " stack barriers, goid=", gp.goid, "\n")
-	}
-
-	// Remove stack barriers that we didn't hit.
-	for _, stkbar := range gp.stkbar[gp.stkbarPos:] {
-		gcRemoveStackBarrier(gp, stkbar)
-	}
-
-	// Clear recorded stack barriers so copystack doesn't try to
-	// adjust them.
-	gp.stkbarPos = 0
-	gp.stkbar = gp.stkbar[:0]
-}
-
-// gcRemoveStackBarrier removes a single stack barrier. It is the
-// inverse operation of gcInstallStackBarrier.
-//
-// This is nosplit to ensure gp's stack does not move.
-//
-//go:nowritebarrier
-//go:nosplit
-func gcRemoveStackBarrier(gp *g, stkbar stkbar) {
-	if debugStackBarrier {
-		print("remove stack barrier at ", hex(stkbar.savedLRPtr), " with ", hex(stkbar.savedLRVal), ", goid=", gp.goid, "\n")
-	}
-	lrPtr := (*uintreg)(unsafe.Pointer(stkbar.savedLRPtr))
-	if val := *lrPtr; val != uintreg(stackBarrierPC) {
-		printlock()
-		print("at *", hex(stkbar.savedLRPtr), " expected stack barrier PC ", hex(stackBarrierPC), ", found ", hex(val), ", goid=", gp.goid, "\n")
-		print("gp.stkbar=")
-		gcPrintStkbars(gp.stkbar)
-		print(", gp.stkbarPos=", gp.stkbarPos, ", gp.stack=[", hex(gp.stack.lo), ",", hex(gp.stack.hi), ")\n")
-		throw("stack barrier lost")
-	}
-	*lrPtr = uintreg(stkbar.savedLRVal)
-}
-
-// gcPrintStkbars prints a []stkbar for debugging.
-func gcPrintStkbars(stkbar []stkbar) {
-	print("[")
-	for i, s := range stkbar {
-		if i > 0 {
-			print(" ")
-		}
-		print("*", hex(s.savedLRPtr), "=", hex(s.savedLRVal))
-	}
-	print("]")
-}
-
-// gcUnwindBarriers marks all stack barriers up the frame containing
-// sp as hit and removes them. This is used during stack unwinding for
-// panic/recover and by heapBitsBulkBarrier to force stack re-scanning
-// when its destination is on the stack.
-//
-// This is nosplit to ensure gp's stack does not move.
-//
-//go:nosplit
-func gcUnwindBarriers(gp *g, sp uintptr) {
-	// On LR machines, if there is a stack barrier on the return
-	// from the frame containing sp, this will mark it as hit even
-	// though it isn't, but it's okay to be conservative.
-	before := gp.stkbarPos
-	for int(gp.stkbarPos) < len(gp.stkbar) && gp.stkbar[gp.stkbarPos].savedLRPtr < sp {
-		gcRemoveStackBarrier(gp, gp.stkbar[gp.stkbarPos])
-		gp.stkbarPos++
-	}
-	if debugStackBarrier && gp.stkbarPos != before {
-		print("skip barriers below ", hex(sp), " in goid=", gp.goid, ": ")
-		gcPrintStkbars(gp.stkbar[before:gp.stkbarPos])
-		print("\n")
-	}
-}
-
-// nextBarrierPC returns the original return PC of the next stack barrier.
-// Used by getcallerpc, so it must be nosplit.
-//go:nosplit
-func nextBarrierPC() uintptr {
-	gp := getg()
-	return gp.stkbar[gp.stkbarPos].savedLRVal
-}
-
-// setNextBarrierPC sets the return PC of the next stack barrier.
-// Used by setcallerpc, so it must be nosplit.
-//go:nosplit
-func setNextBarrierPC(pc uintptr) {
-	gp := getg()
-	gp.stkbar[gp.stkbarPos].savedLRVal = pc
-}
-
-// TODO(austin): Can we consolidate the gcDrain* functions?
-
-// gcDrain scans objects in work buffers, blackening grey
-// objects until all work buffers have been drained.
-// If flushScanCredit != -1, gcDrain flushes accumulated scan work
-// credit to gcController.bgScanCredit whenever gcw's local scan work
-// credit exceeds flushScanCredit.
-//go:nowritebarrier
-func gcDrain(gcw *gcWork, flushScanCredit int64) {
-	if !writeBarrierEnabled {
-		throw("gcDrain phase incorrect")
-	}
-
-	var lastScanFlush, nextScanFlush int64
-	if flushScanCredit != -1 {
-		lastScanFlush = gcw.scanWork
-		nextScanFlush = lastScanFlush + flushScanCredit
-	} else {
-		nextScanFlush = int64(^uint64(0) >> 1)
-	}
-
-	for {
-		// If another proc wants a pointer, give it some.
-		if work.nwait > 0 && work.full == 0 {
-			gcw.balance()
-		}
-
-		b := gcw.get()
-		if b == 0 {
-			// work barrier reached
-			break
-		}
-		// If the current wbuf is filled by the scan a new wbuf might be
-		// returned that could possibly hold only a single object. This
-		// could result in each iteration draining only a single object
-		// out of the wbuf passed in + a single object placed
-		// into an empty wbuf in scanobject so there could be
-		// a performance hit as we keep fetching fresh wbufs.
-		scanobject(b, gcw)
-
-		// Flush background scan work credit to the global
-		// account if we've accumulated enough locally so
-		// mutator assists can draw on it.
-		if gcw.scanWork >= nextScanFlush {
-			credit := gcw.scanWork - lastScanFlush
-			xaddint64(&gcController.bgScanCredit, credit)
-			lastScanFlush = gcw.scanWork
-			nextScanFlush = lastScanFlush + flushScanCredit
-		}
-	}
-	if flushScanCredit != -1 {
-		credit := gcw.scanWork - lastScanFlush
-		xaddint64(&gcController.bgScanCredit, credit)
-	}
-}
-
-// gcDrainUntilPreempt blackens grey objects until g.preempt is set.
-// This is best-effort, so it will return as soon as it is unable to
-// get work, even though there may be more work in the system.
-//go:nowritebarrier
-func gcDrainUntilPreempt(gcw *gcWork, flushScanCredit int64) {
-	if !writeBarrierEnabled {
-		println("gcphase =", gcphase)
-		throw("gcDrainUntilPreempt phase incorrect")
-	}
-
-	var lastScanFlush, nextScanFlush int64
-	if flushScanCredit != -1 {
-		lastScanFlush = gcw.scanWork
-		nextScanFlush = lastScanFlush + flushScanCredit
-	} else {
-		nextScanFlush = int64(^uint64(0) >> 1)
-	}
-
-	gp := getg()
-	for !gp.preempt {
-		// If the work queue is empty, balance. During
-		// concurrent mark we don't really know if anyone else
-		// can make use of this work, but even if we're the
-		// only worker, the total cost of this per cycle is
-		// only O(_WorkbufSize) pointer copies.
-		if work.full == 0 && work.partial == 0 {
-			gcw.balance()
-		}
-
-		b := gcw.tryGet()
-		if b == 0 {
-			// No more work
-			break
-		}
-		scanobject(b, gcw)
-
-		// Flush background scan work credit to the global
-		// account if we've accumulated enough locally so
-		// mutator assists can draw on it.
-		if gcw.scanWork >= nextScanFlush {
-			credit := gcw.scanWork - lastScanFlush
-			xaddint64(&gcController.bgScanCredit, credit)
-			lastScanFlush = gcw.scanWork
-			nextScanFlush = lastScanFlush + flushScanCredit
-		}
-	}
-	if flushScanCredit != -1 {
-		credit := gcw.scanWork - lastScanFlush
-		xaddint64(&gcController.bgScanCredit, credit)
-	}
-}
-
-// gcDrainN blackens grey objects until it has performed roughly
-// scanWork units of scan work. This is best-effort, so it may perform
-// less work if it fails to get a work buffer. Otherwise, it will
-// perform at least n units of work, but may perform more because
-// scanning is always done in whole object increments.
-//go:nowritebarrier
-func gcDrainN(gcw *gcWork, scanWork int64) {
-	if !writeBarrierEnabled {
-		throw("gcDrainN phase incorrect")
-	}
-	targetScanWork := gcw.scanWork + scanWork
-	for gcw.scanWork < targetScanWork {
-		// This might be a good place to add prefetch code...
-		// if(wbuf.nobj > 4) {
-		//         PREFETCH(wbuf->obj[wbuf.nobj - 3];
-		//  }
-		b := gcw.tryGet()
-		if b == 0 {
-			return
-		}
-		scanobject(b, gcw)
-	}
-}
-
-// scanblock scans b as scanobject would, but using an explicit
-// pointer bitmap instead of the heap bitmap.
-//
-// This is used to scan non-heap roots, so it does not update
-// gcw.bytesMarked or gcw.scanWork.
-//
-//go:nowritebarrier
-func scanblock(b0, n0 uintptr, ptrmask *uint8, gcw *gcWork) {
-	// Use local copies of original parameters, so that a stack trace
-	// due to one of the throws below shows the original block
-	// base and extent.
-	b := b0
-	n := n0
-
-	arena_start := mheap_.arena_start
-	arena_used := mheap_.arena_used
-
-	for i := uintptr(0); i < n; {
-		// Find bits for the next word.
-		bits := uint32(*addb(ptrmask, i/(ptrSize*8)))
-		if bits == 0 {
-			i += ptrSize * 8
-			continue
-		}
-		for j := 0; j < 8 && i < n; j++ {
-			if bits&1 != 0 {
-				// Same work as in scanobject; see comments there.
-				obj := *(*uintptr)(unsafe.Pointer(b + i))
-				if obj != 0 && arena_start <= obj && obj < arena_used {
-					if obj, hbits, span := heapBitsForObject(obj); obj != 0 {
-						greyobject(obj, b, i, hbits, span, gcw)
-					}
-				}
-			}
-			bits >>= 1
-			i += ptrSize
-		}
-	}
-}
-
-// scanobject scans the object starting at b, adding pointers to gcw.
-// b must point to the beginning of a heap object; scanobject consults
-// the GC bitmap for the pointer mask and the spans for the size of the
-// object (it ignores n).
-//go:nowritebarrier
-func scanobject(b uintptr, gcw *gcWork) {
-	// Note that arena_used may change concurrently during
-	// scanobject and hence scanobject may encounter a pointer to
-	// a newly allocated heap object that is *not* in
-	// [start,used). It will not mark this object; however, we
-	// know that it was just installed by a mutator, which means
-	// that mutator will execute a write barrier and take care of
-	// marking it. This is even more pronounced on relaxed memory
-	// architectures since we access arena_used without barriers
-	// or synchronization, but the same logic applies.
-	arena_start := mheap_.arena_start
-	arena_used := mheap_.arena_used
-
-	// Find bits of the beginning of the object.
-	// b must point to the beginning of a heap object, so
-	// we can get its bits and span directly.
-	hbits := heapBitsForAddr(b)
-	s := spanOfUnchecked(b)
-	n := s.elemsize
-	if n == 0 {
-		throw("scanobject n == 0")
-	}
-
-	var i uintptr
-	for i = 0; i < n; i += ptrSize {
-		// Find bits for this word.
-		if i != 0 {
-			// Avoid needless hbits.next() on last iteration.
-			hbits = hbits.next()
-		}
-		// During checkmarking, 1-word objects store the checkmark
-		// in the type bit for the one word. The only one-word objects
-		// are pointers, or else they'd be merged with other non-pointer
-		// data into larger allocations.
-		bits := hbits.bits()
-		if i >= 2*ptrSize && bits&bitMarked == 0 {
-			break // no more pointers in this object
-		}
-		if bits&bitPointer == 0 {
-			continue // not a pointer
-		}
-
-		// Work here is duplicated in scanblock and above.
-		// If you make changes here, make changes there too.
-		obj := *(*uintptr)(unsafe.Pointer(b + i))
-
-		// At this point we have extracted the next potential pointer.
-		// Check if it points into heap and not back at the current object.
-		if obj != 0 && arena_start <= obj && obj < arena_used && obj-b >= n {
-			// Mark the object.
-			if obj, hbits, span := heapBitsForObject(obj); obj != 0 {
-				greyobject(obj, b, i, hbits, span, gcw)
-			}
-		}
-	}
-	gcw.bytesMarked += uint64(n)
-	gcw.scanWork += int64(i)
-}
-
-// Shade the object if it isn't already.
-// The object is not nil and known to be in the heap.
-// Preemption must be disabled.
-//go:nowritebarrier
-func shade(b uintptr) {
-	if obj, hbits, span := heapBitsForObject(b); obj != 0 {
-		gcw := &getg().m.p.ptr().gcw
-		greyobject(obj, 0, 0, hbits, span, gcw)
-		if gcphase == _GCmarktermination || gcBlackenPromptly {
-			// Ps aren't allowed to cache work during mark
-			// termination.
-			gcw.dispose()
-		}
-	}
-}
-
-// obj is the start of an object with mark mbits.
-// If it isn't already marked, mark it and enqueue into gcw.
-// base and off are for debugging only and could be removed.
-//go:nowritebarrier
-func greyobject(obj, base, off uintptr, hbits heapBits, span *mspan, gcw *gcWork) {
-	// obj should be start of allocation, and so must be at least pointer-aligned.
-	if obj&(ptrSize-1) != 0 {
-		throw("greyobject: obj not pointer-aligned")
-	}
-
-	if useCheckmark {
-		if !hbits.isMarked() {
-			printlock()
-			print("runtime:greyobject: checkmarks finds unexpected unmarked object obj=", hex(obj), "\n")
-			print("runtime: found obj at *(", hex(base), "+", hex(off), ")\n")
-
-			// Dump the source (base) object
-			gcDumpObject("base", base, off)
-
-			// Dump the object
-			gcDumpObject("obj", obj, ^uintptr(0))
-
-			throw("checkmark found unmarked object")
-		}
-		if hbits.isCheckmarked(span.elemsize) {
-			return
-		}
-		hbits.setCheckmarked(span.elemsize)
-		if !hbits.isCheckmarked(span.elemsize) {
-			throw("setCheckmarked and isCheckmarked disagree")
-		}
-	} else {
-		// If marked we have nothing to do.
-		if hbits.isMarked() {
-			return
-		}
-		hbits.setMarked()
-
-		// If this is a noscan object, fast-track it to black
-		// instead of greying it.
-		if !hbits.hasPointers(span.elemsize) {
-			gcw.bytesMarked += uint64(span.elemsize)
-			return
-		}
-	}
-
-	// Queue the obj for scanning. The PREFETCH(obj) logic has been removed but
-	// seems like a nice optimization that can be added back in.
-	// There needs to be time between the PREFETCH and the use.
-	// Previously we put the obj in an 8 element buffer that is drained at a rate
-	// to give the PREFETCH time to do its work.
-	// Use of PREFETCHNTA might be more appropriate than PREFETCH
-
-	gcw.put(obj)
-}
-
-// gcDumpObject dumps the contents of obj for debugging and marks the
-// field at byte offset off in obj.
-func gcDumpObject(label string, obj, off uintptr) {
-	if obj < mheap_.arena_start || obj >= mheap_.arena_used {
-		print(label, "=", hex(obj), " is not a heap object\n")
-		return
-	}
-	k := obj >> _PageShift
-	x := k
-	x -= mheap_.arena_start >> _PageShift
-	s := h_spans[x]
-	print(label, "=", hex(obj), " k=", hex(k))
-	if s == nil {
-		print(" s=nil\n")
-		return
-	}
-	print(" s.start*_PageSize=", hex(s.start*_PageSize), " s.limit=", hex(s.limit), " s.sizeclass=", s.sizeclass, " s.elemsize=", s.elemsize, "\n")
-	for i := uintptr(0); i < s.elemsize; i += ptrSize {
-		print(" *(", label, "+", i, ") = ", hex(*(*uintptr)(unsafe.Pointer(obj + uintptr(i)))))
-		if i == off {
-			print(" <==")
-		}
-		print("\n")
-	}
-}
-
-// If gcBlackenPromptly is true we are in the second mark phase phase so we allocate black.
-//go:nowritebarrier
-func gcmarknewobject_m(obj, size uintptr) {
-	if useCheckmark && !gcBlackenPromptly { // The world should be stopped so this should not happen.
-		throw("gcmarknewobject called while doing checkmark")
-	}
-	heapBitsForAddr(obj).setMarked()
-	xadd64(&work.bytesMarked, int64(size))
-}
-
-// Checkmarking
-
-// To help debug the concurrent GC we remark with the world
-// stopped ensuring that any object encountered has their normal
-// mark bit set. To do this we use an orthogonal bit
-// pattern to indicate the object is marked. The following pattern
-// uses the upper two bits in the object's boundary nibble.
-// 01: scalar  not marked
-// 10: pointer not marked
-// 11: pointer     marked
-// 00: scalar      marked
-// Xoring with 01 will flip the pattern from marked to unmarked and vica versa.
-// The higher bit is 1 for pointers and 0 for scalars, whether the object
-// is marked or not.
-// The first nibble no longer holds the typeDead pattern indicating that the
-// there are no more pointers in the object. This information is held
-// in the second nibble.
-
-// If useCheckmark is true, marking of an object uses the
-// checkmark bits (encoding above) instead of the standard
-// mark bits.
-var useCheckmark = false
-
-//go:nowritebarrier
-func initCheckmarks() {
-	useCheckmark = true
-	for _, s := range work.spans {
-		if s.state == _MSpanInUse {
-			heapBitsForSpan(s.base()).initCheckmarkSpan(s.layout())
-		}
-	}
-}
-
-func clearCheckmarks() {
-	useCheckmark = false
-	for _, s := range work.spans {
-		if s.state == _MSpanInUse {
-			heapBitsForSpan(s.base()).clearCheckmarkSpan(s.layout())
-		}
-	}
-}
diff --git a/src/runtime/mgcsweep.go b/src/runtime/mgcsweep.go
deleted file mode 100644
index eaa4463..0000000
--- a/src/runtime/mgcsweep.go
+++ /dev/null
@@ -1,370 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Garbage collector: sweeping
-
-package runtime
-
-import "unsafe"
-
-var sweep sweepdata
-
-// State of background sweep.
-type sweepdata struct {
-	lock    mutex
-	g       *g
-	parked  bool
-	started bool
-
-	spanidx uint32 // background sweeper position
-
-	nbgsweep    uint32
-	npausesweep uint32
-}
-
-//go:nowritebarrier
-func finishsweep_m() {
-	// The world is stopped so we should be able to complete the sweeps
-	// quickly.
-	for sweepone() != ^uintptr(0) {
-		sweep.npausesweep++
-	}
-
-	// There may be some other spans being swept concurrently that
-	// we need to wait for. If finishsweep_m is done with the world stopped
-	// this code is not required.
-	sg := mheap_.sweepgen
-	for _, s := range work.spans {
-		if s.sweepgen != sg && s.state == _MSpanInUse {
-			mSpan_EnsureSwept(s)
-		}
-	}
-}
-
-func bgsweep(c chan int) {
-	sweep.g = getg()
-
-	lock(&sweep.lock)
-	sweep.parked = true
-	c <- 1
-	goparkunlock(&sweep.lock, "GC sweep wait", traceEvGoBlock, 1)
-
-	for {
-		for gosweepone() != ^uintptr(0) {
-			sweep.nbgsweep++
-			Gosched()
-		}
-		lock(&sweep.lock)
-		if !gosweepdone() {
-			// This can happen if a GC runs between
-			// gosweepone returning ^0 above
-			// and the lock being acquired.
-			unlock(&sweep.lock)
-			continue
-		}
-		sweep.parked = true
-		goparkunlock(&sweep.lock, "GC sweep wait", traceEvGoBlock, 1)
-	}
-}
-
-// sweeps one span
-// returns number of pages returned to heap, or ^uintptr(0) if there is nothing to sweep
-//go:nowritebarrier
-func sweepone() uintptr {
-	_g_ := getg()
-
-	// increment locks to ensure that the goroutine is not preempted
-	// in the middle of sweep thus leaving the span in an inconsistent state for next GC
-	_g_.m.locks++
-	sg := mheap_.sweepgen
-	for {
-		idx := xadd(&sweep.spanidx, 1) - 1
-		if idx >= uint32(len(work.spans)) {
-			mheap_.sweepdone = 1
-			_g_.m.locks--
-			return ^uintptr(0)
-		}
-		s := work.spans[idx]
-		if s.state != mSpanInUse {
-			s.sweepgen = sg
-			continue
-		}
-		if s.sweepgen != sg-2 || !cas(&s.sweepgen, sg-2, sg-1) {
-			continue
-		}
-		npages := s.npages
-		if !mSpan_Sweep(s, false) {
-			npages = 0
-		}
-		_g_.m.locks--
-		return npages
-	}
-}
-
-//go:nowritebarrier
-func gosweepone() uintptr {
-	var ret uintptr
-	systemstack(func() {
-		ret = sweepone()
-	})
-	return ret
-}
-
-//go:nowritebarrier
-func gosweepdone() bool {
-	return mheap_.sweepdone != 0
-}
-
-// Returns only when span s has been swept.
-//go:nowritebarrier
-func mSpan_EnsureSwept(s *mspan) {
-	// Caller must disable preemption.
-	// Otherwise when this function returns the span can become unswept again
-	// (if GC is triggered on another goroutine).
-	_g_ := getg()
-	if _g_.m.locks == 0 && _g_.m.mallocing == 0 && _g_ != _g_.m.g0 {
-		throw("MSpan_EnsureSwept: m is not locked")
-	}
-
-	sg := mheap_.sweepgen
-	if atomicload(&s.sweepgen) == sg {
-		return
-	}
-	// The caller must be sure that the span is a MSpanInUse span.
-	if cas(&s.sweepgen, sg-2, sg-1) {
-		mSpan_Sweep(s, false)
-		return
-	}
-	// unfortunate condition, and we don't have efficient means to wait
-	for atomicload(&s.sweepgen) != sg {
-		osyield()
-	}
-}
-
-// Sweep frees or collects finalizers for blocks not marked in the mark phase.
-// It clears the mark bits in preparation for the next GC round.
-// Returns true if the span was returned to heap.
-// If preserve=true, don't return it to heap nor relink in MCentral lists;
-// caller takes care of it.
-//TODO go:nowritebarrier
-func mSpan_Sweep(s *mspan, preserve bool) bool {
-	// It's critical that we enter this function with preemption disabled,
-	// GC must not start while we are in the middle of this function.
-	_g_ := getg()
-	if _g_.m.locks == 0 && _g_.m.mallocing == 0 && _g_ != _g_.m.g0 {
-		throw("MSpan_Sweep: m is not locked")
-	}
-	sweepgen := mheap_.sweepgen
-	if s.state != mSpanInUse || s.sweepgen != sweepgen-1 {
-		print("MSpan_Sweep: state=", s.state, " sweepgen=", s.sweepgen, " mheap.sweepgen=", sweepgen, "\n")
-		throw("MSpan_Sweep: bad span state")
-	}
-
-	if trace.enabled {
-		traceGCSweepStart()
-	}
-
-	xadd64(&mheap_.pagesSwept, int64(s.npages))
-
-	cl := s.sizeclass
-	size := s.elemsize
-	res := false
-	nfree := 0
-
-	var head, end gclinkptr
-
-	c := _g_.m.mcache
-	freeToHeap := false
-
-	// Mark any free objects in this span so we don't collect them.
-	sstart := uintptr(s.start << _PageShift)
-	for link := s.freelist; link.ptr() != nil; link = link.ptr().next {
-		if uintptr(link) < sstart || s.limit <= uintptr(link) {
-			// Free list is corrupted.
-			dumpFreeList(s)
-			throw("free list corrupted")
-		}
-		heapBitsForAddr(uintptr(link)).setMarkedNonAtomic()
-	}
-
-	// Unlink & free special records for any objects we're about to free.
-	specialp := &s.specials
-	special := *specialp
-	for special != nil {
-		// A finalizer can be set for an inner byte of an object, find object beginning.
-		p := uintptr(s.start<<_PageShift) + uintptr(special.offset)/size*size
-		hbits := heapBitsForAddr(p)
-		if !hbits.isMarked() {
-			// Find the exact byte for which the special was setup
-			// (as opposed to object beginning).
-			p := uintptr(s.start<<_PageShift) + uintptr(special.offset)
-			// about to free object: splice out special record
-			y := special
-			special = special.next
-			*specialp = special
-			if !freespecial(y, unsafe.Pointer(p), size, false) {
-				// stop freeing of object if it has a finalizer
-				hbits.setMarkedNonAtomic()
-			}
-		} else {
-			// object is still live: keep special record
-			specialp = &special.next
-			special = *specialp
-		}
-	}
-
-	// Sweep through n objects of given size starting at p.
-	// This thread owns the span now, so it can manipulate
-	// the block bitmap without atomic operations.
-
-	size, n, _ := s.layout()
-	heapBitsSweepSpan(s.base(), size, n, func(p uintptr) {
-		// At this point we know that we are looking at garbage object
-		// that needs to be collected.
-		if debug.allocfreetrace != 0 {
-			tracefree(unsafe.Pointer(p), size)
-		}
-
-		// Reset to allocated+noscan.
-		if cl == 0 {
-			// Free large span.
-			if preserve {
-				throw("can't preserve large span")
-			}
-			heapBitsForSpan(p).initSpan(s.layout())
-			s.needzero = 1
-
-			// important to set sweepgen before returning it to heap
-			atomicstore(&s.sweepgen, sweepgen)
-
-			// Free the span after heapBitsSweepSpan
-			// returns, since it's not done with the span.
-			freeToHeap = true
-		} else {
-			// Free small object.
-			if size > 2*ptrSize {
-				*(*uintptr)(unsafe.Pointer(p + ptrSize)) = uintptrMask & 0xdeaddeaddeaddead // mark as "needs to be zeroed"
-			} else if size > ptrSize {
-				*(*uintptr)(unsafe.Pointer(p + ptrSize)) = 0
-			}
-			if head.ptr() == nil {
-				head = gclinkptr(p)
-			} else {
-				end.ptr().next = gclinkptr(p)
-			}
-			end = gclinkptr(p)
-			end.ptr().next = gclinkptr(0x0bade5)
-			nfree++
-		}
-	})
-
-	// We need to set s.sweepgen = h.sweepgen only when all blocks are swept,
-	// because of the potential for a concurrent free/SetFinalizer.
-	// But we need to set it before we make the span available for allocation
-	// (return it to heap or mcentral), because allocation code assumes that a
-	// span is already swept if available for allocation.
-	//
-	// TODO(austin): Clean this up by consolidating atomicstore in
-	// large span path above with this.
-	if !freeToHeap && nfree == 0 {
-		// The span must be in our exclusive ownership until we update sweepgen,
-		// check for potential races.
-		if s.state != mSpanInUse || s.sweepgen != sweepgen-1 {
-			print("MSpan_Sweep: state=", s.state, " sweepgen=", s.sweepgen, " mheap.sweepgen=", sweepgen, "\n")
-			throw("MSpan_Sweep: bad span state after sweep")
-		}
-		atomicstore(&s.sweepgen, sweepgen)
-	}
-	if nfree > 0 {
-		c.local_nsmallfree[cl] += uintptr(nfree)
-		res = mCentral_FreeSpan(&mheap_.central[cl].mcentral, s, int32(nfree), head, end, preserve)
-		// MCentral_FreeSpan updates sweepgen
-	} else if freeToHeap {
-		// Free large span to heap
-
-		// NOTE(rsc,dvyukov): The original implementation of efence
-		// in CL 22060046 used SysFree instead of SysFault, so that
-		// the operating system would eventually give the memory
-		// back to us again, so that an efence program could run
-		// longer without running out of memory. Unfortunately,
-		// calling SysFree here without any kind of adjustment of the
-		// heap data structures means that when the memory does
-		// come back to us, we have the wrong metadata for it, either in
-		// the MSpan structures or in the garbage collection bitmap.
-		// Using SysFault here means that the program will run out of
-		// memory fairly quickly in efence mode, but at least it won't
-		// have mysterious crashes due to confused memory reuse.
-		// It should be possible to switch back to SysFree if we also
-		// implement and then call some kind of MHeap_DeleteSpan.
-		if debug.efence > 0 {
-			s.limit = 0 // prevent mlookup from finding this span
-			sysFault(unsafe.Pointer(uintptr(s.start<<_PageShift)), size)
-		} else {
-			mHeap_Free(&mheap_, s, 1)
-		}
-		c.local_nlargefree++
-		c.local_largefree += size
-		res = true
-	}
-	if trace.enabled {
-		traceGCSweepDone()
-	}
-	return res
-}
-
-// deductSweepCredit deducts sweep credit for allocating a span of
-// size spanBytes. This must be performed *before* the span is
-// allocated to ensure the system has enough credit. If necessary, it
-// performs sweeping to prevent going in to debt. If the caller will
-// also sweep pages (e.g., for a large allocation), it can pass a
-// non-zero callerSweepPages to leave that many pages unswept.
-//
-// deductSweepCredit is the core of the "proportional sweep" system.
-// It uses statistics gathered by the garbage collector to perform
-// enough sweeping so that all pages are swept during the concurrent
-// sweep phase between GC cycles.
-//
-// mheap_ must NOT be locked.
-func deductSweepCredit(spanBytes uintptr, callerSweepPages uintptr) {
-	if mheap_.sweepPagesPerByte == 0 {
-		// Proportional sweep is done or disabled.
-		return
-	}
-
-	// Account for this span allocation.
-	spanBytesAlloc := xadd64(&mheap_.spanBytesAlloc, int64(spanBytes))
-
-	// Fix debt if necessary.
-	pagesOwed := int64(mheap_.sweepPagesPerByte * float64(spanBytesAlloc))
-	for pagesOwed-int64(atomicload64(&mheap_.pagesSwept)) > int64(callerSweepPages) {
-		if gosweepone() == ^uintptr(0) {
-			mheap_.sweepPagesPerByte = 0
-			break
-		}
-	}
-}
-
-func dumpFreeList(s *mspan) {
-	printlock()
-	print("runtime: free list of span ", s, ":\n")
-	sstart := uintptr(s.start << _PageShift)
-	link := s.freelist
-	for i := 0; i < int(s.npages*_PageSize/s.elemsize); i++ {
-		if i != 0 {
-			print(" -> ")
-		}
-		print(hex(link))
-		if link.ptr() == nil {
-			break
-		}
-		if uintptr(link) < sstart || s.limit <= uintptr(link) {
-			// Bad link. Stop walking before we crash.
-			print(" (BAD)")
-			break
-		}
-		link = link.ptr().next
-	}
-	print("\n")
-	printunlock()
-}
diff --git a/src/runtime/mgcwork.go b/src/runtime/mgcwork.go
deleted file mode 100644
index b18eaaf..0000000
--- a/src/runtime/mgcwork.go
+++ /dev/null
@@ -1,458 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-const (
-	_Debugwbufs  = false   // if true check wbufs consistency
-	_WorkbufSize = 1 * 256 // in bytes - if small wbufs are passed to GC in a timely fashion.
-)
-
-// Garbage collector work pool abstraction.
-//
-// This implements a producer/consumer model for pointers to grey
-// objects.  A grey object is one that is marked and on a work
-// queue.  A black object is marked and not on a work queue.
-//
-// Write barriers, root discovery, stack scanning, and object scanning
-// produce pointers to grey objects.  Scanning consumes pointers to
-// grey objects, thus blackening them, and then scans them,
-// potentially producing new pointers to grey objects.
-
-// A wbufptr holds a workbuf*, but protects it from write barriers.
-// workbufs never live on the heap, so write barriers are unnecessary.
-// Write barriers on workbuf pointers may also be dangerous in the GC.
-type wbufptr uintptr
-
-func wbufptrOf(w *workbuf) wbufptr {
-	return wbufptr(unsafe.Pointer(w))
-}
-
-func (wp wbufptr) ptr() *workbuf {
-	return (*workbuf)(unsafe.Pointer(wp))
-}
-
-// A gcWork provides the interface to produce and consume work for the
-// garbage collector.
-//
-// A gcWork can be used on the stack as follows:
-//
-//     var gcw gcWork
-//     disable preemption
-//     .. call gcw.put() to produce and gcw.get() to consume ..
-//     gcw.dispose()
-//     enable preemption
-//
-// Or from the per-P gcWork cache:
-//
-//     (preemption must be disabled)
-//     gcw := &getg().m.p.ptr().gcw
-//     .. call gcw.put() to produce and gcw.get() to consume ..
-//     if gcphase == _GCmarktermination {
-//         gcw.dispose()
-//     }
-//
-// It's important that any use of gcWork during the mark phase prevent
-// the garbage collector from transitioning to mark termination since
-// gcWork may locally hold GC work buffers. This can be done by
-// disabling preemption (systemstack or acquirem).
-type gcWork struct {
-	// Invariant: wbuf is never full or empty
-	wbuf wbufptr
-
-	// Bytes marked (blackened) on this gcWork. This is aggregated
-	// into work.bytesMarked by dispose.
-	bytesMarked uint64
-
-	// Scan work performed on this gcWork. This is aggregated into
-	// gcController by dispose.
-	scanWork int64
-}
-
-// put enqueues a pointer for the garbage collector to trace.
-// obj must point to the beginning of a heap object.
-//go:nowritebarrier
-func (ww *gcWork) put(obj uintptr) {
-	w := (*gcWork)(noescape(unsafe.Pointer(ww))) // TODO: remove when escape analysis is fixed
-
-	wbuf := w.wbuf.ptr()
-	if wbuf == nil {
-		wbuf = getpartialorempty(42)
-		w.wbuf = wbufptrOf(wbuf)
-	}
-
-	wbuf.obj[wbuf.nobj] = obj
-	wbuf.nobj++
-
-	if wbuf.nobj == len(wbuf.obj) {
-		putfull(wbuf, 50)
-		w.wbuf = 0
-	}
-}
-
-// tryGet dequeues a pointer for the garbage collector to trace.
-//
-// If there are no pointers remaining in this gcWork or in the global
-// queue, tryGet returns 0.  Note that there may still be pointers in
-// other gcWork instances or other caches.
-//go:nowritebarrier
-func (ww *gcWork) tryGet() uintptr {
-	w := (*gcWork)(noescape(unsafe.Pointer(ww))) // TODO: remove when escape analysis is fixed
-
-	wbuf := w.wbuf.ptr()
-	if wbuf == nil {
-		wbuf = trygetfull(74)
-		if wbuf == nil {
-			return 0
-		}
-		w.wbuf = wbufptrOf(wbuf)
-	}
-
-	wbuf.nobj--
-	obj := wbuf.obj[wbuf.nobj]
-
-	if wbuf.nobj == 0 {
-		putempty(wbuf, 86)
-		w.wbuf = 0
-	}
-
-	return obj
-}
-
-// get dequeues a pointer for the garbage collector to trace, blocking
-// if necessary to ensure all pointers from all queues and caches have
-// been retrieved.  get returns 0 if there are no pointers remaining.
-//go:nowritebarrier
-func (ww *gcWork) get() uintptr {
-	w := (*gcWork)(noescape(unsafe.Pointer(ww))) // TODO: remove when escape analysis is fixed
-
-	wbuf := w.wbuf.ptr()
-	if wbuf == nil {
-		wbuf = getfull(103)
-		if wbuf == nil {
-			return 0
-		}
-		wbuf.checknonempty()
-		w.wbuf = wbufptrOf(wbuf)
-	}
-
-	// TODO: This might be a good place to add prefetch code
-
-	wbuf.nobj--
-	obj := wbuf.obj[wbuf.nobj]
-
-	if wbuf.nobj == 0 {
-		putempty(wbuf, 115)
-		w.wbuf = 0
-	}
-
-	return obj
-}
-
-// dispose returns any cached pointers to the global queue.
-// The buffers are being put on the full queue so that the
-// write barriers will not simply reacquire them before the
-// GC can inspect them. This helps reduce the mutator's
-// ability to hide pointers during the concurrent mark phase.
-//
-//go:nowritebarrier
-func (w *gcWork) dispose() {
-	if wbuf := w.wbuf; wbuf != 0 {
-		if wbuf.ptr().nobj == 0 {
-			throw("dispose: workbuf is empty")
-		}
-		putfull(wbuf.ptr(), 166)
-		w.wbuf = 0
-	}
-	if w.bytesMarked != 0 {
-		// dispose happens relatively infrequently. If this
-		// atomic becomes a problem, we should first try to
-		// dispose less and if necessary aggregate in a per-P
-		// counter.
-		xadd64(&work.bytesMarked, int64(w.bytesMarked))
-		w.bytesMarked = 0
-	}
-	if w.scanWork != 0 {
-		xaddint64(&gcController.scanWork, w.scanWork)
-		w.scanWork = 0
-	}
-}
-
-// balance moves some work that's cached in this gcWork back on the
-// global queue.
-//go:nowritebarrier
-func (w *gcWork) balance() {
-	if wbuf := w.wbuf; wbuf != 0 && wbuf.ptr().nobj > 4 {
-		w.wbuf = wbufptrOf(handoff(wbuf.ptr()))
-	}
-}
-
-// empty returns true if w has no mark work available.
-//go:nowritebarrier
-func (w *gcWork) empty() bool {
-	wbuf := w.wbuf
-	return wbuf == 0 || wbuf.ptr().nobj == 0
-}
-
-// Internally, the GC work pool is kept in arrays in work buffers.
-// The gcWork interface caches a work buffer until full (or empty) to
-// avoid contending on the global work buffer lists.
-
-type workbufhdr struct {
-	node  lfnode // must be first
-	nobj  int
-	inuse bool   // This workbuf is in use by some gorotuine and is not on the work.empty/partial/full queues.
-	log   [4]int // line numbers forming a history of ownership changes to workbuf
-}
-
-type workbuf struct {
-	workbufhdr
-	// account for the above fields
-	obj [(_WorkbufSize - unsafe.Sizeof(workbufhdr{})) / ptrSize]uintptr
-}
-
-// workbuf factory routines. These funcs are used to manage the
-// workbufs.
-// If the GC asks for some work these are the only routines that
-// make partially full wbufs available to the GC.
-// Each of the gets and puts also take an distinct integer that is used
-// to record a brief history of changes to ownership of the workbuf.
-// The convention is to use a unique line number but any encoding
-// is permissible. For example if you want to pass in 2 bits of information
-// you could simple add lineno1*100000+lineno2.
-
-// logget records the past few values of entry to aid in debugging.
-// logget checks the buffer b is not currently in use.
-func (b *workbuf) logget(entry int) {
-	if !_Debugwbufs {
-		return
-	}
-	if b.inuse {
-		println("runtime: logget fails log entry=", entry,
-			"b.log[0]=", b.log[0], "b.log[1]=", b.log[1],
-			"b.log[2]=", b.log[2], "b.log[3]=", b.log[3])
-		throw("logget: get not legal")
-	}
-	b.inuse = true
-	copy(b.log[1:], b.log[:])
-	b.log[0] = entry
-}
-
-// logput records the past few values of entry to aid in debugging.
-// logput checks the buffer b is currently in use.
-func (b *workbuf) logput(entry int) {
-	if !_Debugwbufs {
-		return
-	}
-	if !b.inuse {
-		println("runtime: logput fails log entry=", entry,
-			"b.log[0]=", b.log[0], "b.log[1]=", b.log[1],
-			"b.log[2]=", b.log[2], "b.log[3]=", b.log[3])
-		throw("logput: put not legal")
-	}
-	b.inuse = false
-	copy(b.log[1:], b.log[:])
-	b.log[0] = entry
-}
-
-func (b *workbuf) checknonempty() {
-	if b.nobj == 0 {
-		println("runtime: nonempty check fails",
-			"b.log[0]=", b.log[0], "b.log[1]=", b.log[1],
-			"b.log[2]=", b.log[2], "b.log[3]=", b.log[3])
-		throw("workbuf is empty")
-	}
-}
-
-func (b *workbuf) checkempty() {
-	if b.nobj != 0 {
-		println("runtime: empty check fails",
-			"b.log[0]=", b.log[0], "b.log[1]=", b.log[1],
-			"b.log[2]=", b.log[2], "b.log[3]=", b.log[3])
-		throw("workbuf is not empty")
-	}
-}
-
-// getempty pops an empty work buffer off the work.empty list,
-// allocating new buffers if none are available.
-// entry is used to record a brief history of ownership.
-//go:nowritebarrier
-func getempty(entry int) *workbuf {
-	var b *workbuf
-	if work.empty != 0 {
-		b = (*workbuf)(lfstackpop(&work.empty))
-		if b != nil {
-			b.checkempty()
-		}
-	}
-	if b == nil {
-		b = (*workbuf)(persistentalloc(unsafe.Sizeof(*b), _CacheLineSize, &memstats.gc_sys))
-	}
-	b.logget(entry)
-	return b
-}
-
-// putempty puts a workbuf onto the work.empty list.
-// Upon entry this go routine owns b. The lfstackpush relinquishes ownership.
-//go:nowritebarrier
-func putempty(b *workbuf, entry int) {
-	b.checkempty()
-	b.logput(entry)
-	lfstackpush(&work.empty, &b.node)
-}
-
-// putfull puts the workbuf on the work.full list for the GC.
-// putfull accepts partially full buffers so the GC can avoid competing
-// with the mutators for ownership of partially full buffers.
-//go:nowritebarrier
-func putfull(b *workbuf, entry int) {
-	b.checknonempty()
-	b.logput(entry)
-	lfstackpush(&work.full, &b.node)
-}
-
-// getpartialorempty tries to return a partially empty
-// and if none are available returns an empty one.
-// entry is used to provide a brief history of ownership
-// using entry + xxx00000 to
-// indicating that two line numbers in the call chain.
-//go:nowritebarrier
-func getpartialorempty(entry int) *workbuf {
-	b := (*workbuf)(lfstackpop(&work.partial))
-	if b != nil {
-		b.logget(entry)
-		return b
-	}
-	// Let getempty do the logget check but
-	// use the entry to encode that it passed
-	// through this routine.
-	b = getempty(entry + 80700000)
-	return b
-}
-
-// putpartial puts empty buffers on the work.empty queue,
-// full buffers on the work.full queue and
-// others on the work.partial queue.
-// entry is used to provide a brief history of ownership
-// using entry + xxx00000 to
-// indicating that two call chain line numbers.
-//go:nowritebarrier
-func putpartial(b *workbuf, entry int) {
-	if b.nobj == 0 {
-		putempty(b, entry+81500000)
-	} else if b.nobj < len(b.obj) {
-		b.logput(entry)
-		lfstackpush(&work.partial, &b.node)
-	} else if b.nobj == len(b.obj) {
-		b.logput(entry)
-		lfstackpush(&work.full, &b.node)
-	} else {
-		throw("putpartial: bad Workbuf b.nobj")
-	}
-}
-
-// trygetfull tries to get a full or partially empty workbuffer.
-// If one is not immediately available return nil
-//go:nowritebarrier
-func trygetfull(entry int) *workbuf {
-	b := (*workbuf)(lfstackpop(&work.full))
-	if b == nil {
-		b = (*workbuf)(lfstackpop(&work.partial))
-	}
-	if b != nil {
-		b.logget(entry)
-		b.checknonempty()
-		return b
-	}
-	return b
-}
-
-// Get a full work buffer off the work.full or a partially
-// filled one off the work.partial list. If nothing is available
-// wait until all the other gc helpers have finished and then
-// return nil.
-// getfull acts as a barrier for work.nproc helpers. As long as one
-// gchelper is actively marking objects it
-// may create a workbuffer that the other helpers can work on.
-// The for loop either exits when a work buffer is found
-// or when _all_ of the work.nproc GC helpers are in the loop
-// looking for work and thus not capable of creating new work.
-// This is in fact the termination condition for the STW mark
-// phase.
-//go:nowritebarrier
-func getfull(entry int) *workbuf {
-	b := (*workbuf)(lfstackpop(&work.full))
-	if b != nil {
-		b.logget(entry)
-		b.checknonempty()
-		return b
-	}
-	b = (*workbuf)(lfstackpop(&work.partial))
-	if b != nil {
-		b.logget(entry)
-		return b
-	}
-
-	incnwait := xadd(&work.nwait, +1)
-	if incnwait > work.nproc {
-		println("runtime: work.nwait=", incnwait, "work.nproc=", work.nproc)
-		throw("work.nwait > work.nproc")
-	}
-	for i := 0; ; i++ {
-		if work.full != 0 || work.partial != 0 {
-			decnwait := xadd(&work.nwait, -1)
-			if decnwait == work.nproc {
-				println("runtime: work.nwait=", decnwait, "work.nproc=", work.nproc)
-				throw("work.nwait > work.nproc")
-			}
-			b = (*workbuf)(lfstackpop(&work.full))
-			if b == nil {
-				b = (*workbuf)(lfstackpop(&work.partial))
-			}
-			if b != nil {
-				b.logget(entry)
-				b.checknonempty()
-				return b
-			}
-			incnwait := xadd(&work.nwait, +1)
-			if incnwait > work.nproc {
-				println("runtime: work.nwait=", incnwait, "work.nproc=", work.nproc)
-				throw("work.nwait > work.nproc")
-			}
-		}
-		if work.nwait == work.nproc {
-			return nil
-		}
-		_g_ := getg()
-		if i < 10 {
-			_g_.m.gcstats.nprocyield++
-			procyield(20)
-		} else if i < 20 {
-			_g_.m.gcstats.nosyield++
-			osyield()
-		} else {
-			_g_.m.gcstats.nsleep++
-			usleep(100)
-		}
-	}
-}
-
-//go:nowritebarrier
-func handoff(b *workbuf) *workbuf {
-	// Make new buffer with half of b's pointers.
-	b1 := getempty(915)
-	n := b.nobj / 2
-	b.nobj -= n
-	b1.nobj = n
-	memmove(unsafe.Pointer(&b1.obj[0]), unsafe.Pointer(&b.obj[b.nobj]), uintptr(n)*unsafe.Sizeof(b1.obj[0]))
-	_g_ := getg()
-	_g_.m.gcstats.nhandoff++
-	_g_.m.gcstats.nhandoffcnt += uint64(n)
-
-	// Put b on full list - let first half of b get stolen.
-	putfull(b, 942)
-	return b1
-}
diff --git a/src/runtime/mheap.go b/src/runtime/mheap.go
deleted file mode 100644
index bc4e7c1..0000000
--- a/src/runtime/mheap.go
+++ /dev/null
@@ -1,1090 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Page heap.
-//
-// See malloc.go for overview.
-
-package runtime
-
-import "unsafe"
-
-// Main malloc heap.
-// The heap itself is the "free[]" and "large" arrays,
-// but all the other global data is here too.
-type mheap struct {
-	lock      mutex
-	free      [_MaxMHeapList]mspan // free lists of given length
-	freelarge mspan                // free lists length >= _MaxMHeapList
-	busy      [_MaxMHeapList]mspan // busy lists of large objects of given length
-	busylarge mspan                // busy lists of large objects length >= _MaxMHeapList
-	allspans  **mspan              // all spans out there
-	gcspans   **mspan              // copy of allspans referenced by gc marker or sweeper
-	nspan     uint32
-	sweepgen  uint32 // sweep generation, see comment in mspan
-	sweepdone uint32 // all spans are swept
-	// span lookup
-	spans        **mspan
-	spans_mapped uintptr
-
-	// Proportional sweep
-	spanBytesAlloc    uint64  // bytes of spans allocated this cycle; updated atomically
-	pagesSwept        uint64  // pages swept this cycle; updated atomically
-	sweepPagesPerByte float64 // proportional sweep ratio; written with lock, read without
-
-	// Malloc stats.
-	largefree  uint64                  // bytes freed for large objects (>maxsmallsize)
-	nlargefree uint64                  // number of frees for large objects (>maxsmallsize)
-	nsmallfree [_NumSizeClasses]uint64 // number of frees for small objects (<=maxsmallsize)
-
-	// range of addresses we might see in the heap
-	bitmap         uintptr
-	bitmap_mapped  uintptr
-	arena_start    uintptr
-	arena_used     uintptr // always mHeap_Map{Bits,Spans} before updating
-	arena_end      uintptr
-	arena_reserved bool
-
-	// central free lists for small size classes.
-	// the padding makes sure that the MCentrals are
-	// spaced CacheLineSize bytes apart, so that each MCentral.lock
-	// gets its own cache line.
-	central [_NumSizeClasses]struct {
-		mcentral mcentral
-		pad      [_CacheLineSize]byte
-	}
-
-	spanalloc             fixalloc // allocator for span*
-	cachealloc            fixalloc // allocator for mcache*
-	specialfinalizeralloc fixalloc // allocator for specialfinalizer*
-	specialprofilealloc   fixalloc // allocator for specialprofile*
-	speciallock           mutex    // lock for special record allocators.
-}
-
-var mheap_ mheap
-
-// An MSpan is a run of pages.
-//
-// When a MSpan is in the heap free list, state == MSpanFree
-// and heapmap(s->start) == span, heapmap(s->start+s->npages-1) == span.
-//
-// When a MSpan is allocated, state == MSpanInUse or MSpanStack
-// and heapmap(i) == span for all s->start <= i < s->start+s->npages.
-
-// Every MSpan is in one doubly-linked list,
-// either one of the MHeap's free lists or one of the
-// MCentral's span lists.  We use empty MSpan structures as list heads.
-
-// An MSpan representing actual memory has state _MSpanInUse,
-// _MSpanStack, or _MSpanFree. Transitions between these states are
-// constrained as follows:
-//
-// * A span may transition from free to in-use or stack during any GC
-//   phase.
-//
-// * During sweeping (gcphase == _GCoff), a span may transition from
-//   in-use to free (as a result of sweeping) or stack to free (as a
-//   result of stacks being freed).
-//
-// * During GC (gcphase != _GCoff), a span *must not* transition from
-//   stack or in-use to free. Because concurrent GC may read a pointer
-//   and then look up its span, the span state must be monotonic.
-const (
-	_MSpanInUse = iota // allocated for garbage collected heap
-	_MSpanStack        // allocated for use by stack allocator
-	_MSpanFree
-	_MSpanListHead
-	_MSpanDead
-)
-
-type mspan struct {
-	next     *mspan    // in a span linked list
-	prev     *mspan    // in a span linked list
-	start    pageID    // starting page number
-	npages   uintptr   // number of pages in span
-	freelist gclinkptr // list of free objects
-	// sweep generation:
-	// if sweepgen == h->sweepgen - 2, the span needs sweeping
-	// if sweepgen == h->sweepgen - 1, the span is currently being swept
-	// if sweepgen == h->sweepgen, the span is swept and ready to use
-	// h->sweepgen is incremented by 2 after every GC
-
-	sweepgen    uint32
-	divMul      uint32   // for divide by elemsize - divMagic.mul
-	ref         uint16   // capacity - number of objects in freelist
-	sizeclass   uint8    // size class
-	incache     bool     // being used by an mcache
-	state       uint8    // mspaninuse etc
-	needzero    uint8    // needs to be zeroed before allocation
-	divShift    uint8    // for divide by elemsize - divMagic.shift
-	divShift2   uint8    // for divide by elemsize - divMagic.shift2
-	elemsize    uintptr  // computed from sizeclass or from npages
-	unusedsince int64    // first time spotted by gc in mspanfree state
-	npreleased  uintptr  // number of pages released to the os
-	limit       uintptr  // end of data in span
-	speciallock mutex    // guards specials list
-	specials    *special // linked list of special records sorted by offset.
-	baseMask    uintptr  // if non-0, elemsize is a power of 2, & this will get object allocation base
-}
-
-func (s *mspan) base() uintptr {
-	return uintptr(s.start << _PageShift)
-}
-
-func (s *mspan) layout() (size, n, total uintptr) {
-	total = s.npages << _PageShift
-	size = s.elemsize
-	if size > 0 {
-		n = total / size
-	}
-	return
-}
-
-var h_allspans []*mspan // TODO: make this h.allspans once mheap can be defined in Go
-
-// h_spans is a lookup table to map virtual address page IDs to *mspan.
-// For allocated spans, their pages map to the span itself.
-// For free spans, only the lowest and highest pages map to the span itself.  Internal
-// pages map to an arbitrary span.
-// For pages that have never been allocated, h_spans entries are nil.
-var h_spans []*mspan // TODO: make this h.spans once mheap can be defined in Go
-
-func recordspan(vh unsafe.Pointer, p unsafe.Pointer) {
-	h := (*mheap)(vh)
-	s := (*mspan)(p)
-	if len(h_allspans) >= cap(h_allspans) {
-		n := 64 * 1024 / ptrSize
-		if n < cap(h_allspans)*3/2 {
-			n = cap(h_allspans) * 3 / 2
-		}
-		var new []*mspan
-		sp := (*slice)(unsafe.Pointer(&new))
-		sp.array = sysAlloc(uintptr(n)*ptrSize, &memstats.other_sys)
-		if sp.array == nil {
-			throw("runtime: cannot allocate memory")
-		}
-		sp.len = len(h_allspans)
-		sp.cap = n
-		if len(h_allspans) > 0 {
-			copy(new, h_allspans)
-			// Don't free the old array if it's referenced by sweep.
-			// See the comment in mgc.go.
-			if h.allspans != mheap_.gcspans {
-				sysFree(unsafe.Pointer(h.allspans), uintptr(cap(h_allspans))*ptrSize, &memstats.other_sys)
-			}
-		}
-		h_allspans = new
-		h.allspans = (**mspan)(unsafe.Pointer(sp.array))
-	}
-	h_allspans = append(h_allspans, s)
-	h.nspan = uint32(len(h_allspans))
-}
-
-// inheap reports whether b is a pointer into a (potentially dead) heap object.
-// It returns false for pointers into stack spans.
-// Non-preemptible because it is used by write barriers.
-//go:nowritebarrier
-//go:nosplit
-func inheap(b uintptr) bool {
-	if b == 0 || b < mheap_.arena_start || b >= mheap_.arena_used {
-		return false
-	}
-	// Not a beginning of a block, consult span table to find the block beginning.
-	k := b >> _PageShift
-	x := k
-	x -= mheap_.arena_start >> _PageShift
-	s := h_spans[x]
-	if s == nil || pageID(k) < s.start || b >= s.limit || s.state != mSpanInUse {
-		return false
-	}
-	return true
-}
-
-// TODO: spanOf and spanOfUnchecked are open-coded in a lot of places.
-// Use the functions instead.
-
-// spanOf returns the span of p. If p does not point into the heap or
-// no span contains p, spanOf returns nil.
-func spanOf(p uintptr) *mspan {
-	if p == 0 || p < mheap_.arena_start || p >= mheap_.arena_used {
-		return nil
-	}
-	return spanOfUnchecked(p)
-}
-
-// spanOfUnchecked is equivalent to spanOf, but the caller must ensure
-// that p points into the heap (that is, mheap_.arena_start <= p <
-// mheap_.arena_used).
-func spanOfUnchecked(p uintptr) *mspan {
-	return h_spans[(p-mheap_.arena_start)>>_PageShift]
-}
-
-func mlookup(v uintptr, base *uintptr, size *uintptr, sp **mspan) int32 {
-	_g_ := getg()
-
-	_g_.m.mcache.local_nlookup++
-	if ptrSize == 4 && _g_.m.mcache.local_nlookup >= 1<<30 {
-		// purge cache stats to prevent overflow
-		lock(&mheap_.lock)
-		purgecachedstats(_g_.m.mcache)
-		unlock(&mheap_.lock)
-	}
-
-	s := mHeap_LookupMaybe(&mheap_, unsafe.Pointer(v))
-	if sp != nil {
-		*sp = s
-	}
-	if s == nil {
-		if base != nil {
-			*base = 0
-		}
-		if size != nil {
-			*size = 0
-		}
-		return 0
-	}
-
-	p := uintptr(s.start) << _PageShift
-	if s.sizeclass == 0 {
-		// Large object.
-		if base != nil {
-			*base = p
-		}
-		if size != nil {
-			*size = s.npages << _PageShift
-		}
-		return 1
-	}
-
-	n := s.elemsize
-	if base != nil {
-		i := (uintptr(v) - uintptr(p)) / n
-		*base = p + i*n
-	}
-	if size != nil {
-		*size = n
-	}
-
-	return 1
-}
-
-// Initialize the heap.
-func mHeap_Init(h *mheap, spans_size uintptr) {
-	fixAlloc_Init(&h.spanalloc, unsafe.Sizeof(mspan{}), recordspan, unsafe.Pointer(h), &memstats.mspan_sys)
-	fixAlloc_Init(&h.cachealloc, unsafe.Sizeof(mcache{}), nil, nil, &memstats.mcache_sys)
-	fixAlloc_Init(&h.specialfinalizeralloc, unsafe.Sizeof(specialfinalizer{}), nil, nil, &memstats.other_sys)
-	fixAlloc_Init(&h.specialprofilealloc, unsafe.Sizeof(specialprofile{}), nil, nil, &memstats.other_sys)
-
-	// h->mapcache needs no init
-	for i := range h.free {
-		mSpanList_Init(&h.free[i])
-		mSpanList_Init(&h.busy[i])
-	}
-
-	mSpanList_Init(&h.freelarge)
-	mSpanList_Init(&h.busylarge)
-	for i := range h.central {
-		mCentral_Init(&h.central[i].mcentral, int32(i))
-	}
-
-	sp := (*slice)(unsafe.Pointer(&h_spans))
-	sp.array = unsafe.Pointer(h.spans)
-	sp.len = int(spans_size / ptrSize)
-	sp.cap = int(spans_size / ptrSize)
-}
-
-// mHeap_MapSpans makes sure that the spans are mapped
-// up to the new value of arena_used.
-//
-// It must be called with the expected new value of arena_used,
-// *before* h.arena_used has been updated.
-// Waiting to update arena_used until after the memory has been mapped
-// avoids faults when other threads try access the bitmap immediately
-// after observing the change to arena_used.
-func mHeap_MapSpans(h *mheap, arena_used uintptr) {
-	// Map spans array, PageSize at a time.
-	n := arena_used
-	n -= h.arena_start
-	n = n / _PageSize * ptrSize
-	n = round(n, _PhysPageSize)
-	if h.spans_mapped >= n {
-		return
-	}
-	sysMap(add(unsafe.Pointer(h.spans), h.spans_mapped), n-h.spans_mapped, h.arena_reserved, &memstats.other_sys)
-	h.spans_mapped = n
-}
-
-// Sweeps spans in list until reclaims at least npages into heap.
-// Returns the actual number of pages reclaimed.
-func mHeap_ReclaimList(h *mheap, list *mspan, npages uintptr) uintptr {
-	n := uintptr(0)
-	sg := mheap_.sweepgen
-retry:
-	for s := list.next; s != list; s = s.next {
-		if s.sweepgen == sg-2 && cas(&s.sweepgen, sg-2, sg-1) {
-			mSpanList_Remove(s)
-			// swept spans are at the end of the list
-			mSpanList_InsertBack(list, s)
-			unlock(&h.lock)
-			snpages := s.npages
-			if mSpan_Sweep(s, false) {
-				n += snpages
-			}
-			lock(&h.lock)
-			if n >= npages {
-				return n
-			}
-			// the span could have been moved elsewhere
-			goto retry
-		}
-		if s.sweepgen == sg-1 {
-			// the span is being sweept by background sweeper, skip
-			continue
-		}
-		// already swept empty span,
-		// all subsequent ones must also be either swept or in process of sweeping
-		break
-	}
-	return n
-}
-
-// Sweeps and reclaims at least npage pages into heap.
-// Called before allocating npage pages.
-func mHeap_Reclaim(h *mheap, npage uintptr) {
-	// First try to sweep busy spans with large objects of size >= npage,
-	// this has good chances of reclaiming the necessary space.
-	for i := int(npage); i < len(h.busy); i++ {
-		if mHeap_ReclaimList(h, &h.busy[i], npage) != 0 {
-			return // Bingo!
-		}
-	}
-
-	// Then -- even larger objects.
-	if mHeap_ReclaimList(h, &h.busylarge, npage) != 0 {
-		return // Bingo!
-	}
-
-	// Now try smaller objects.
-	// One such object is not enough, so we need to reclaim several of them.
-	reclaimed := uintptr(0)
-	for i := 0; i < int(npage) && i < len(h.busy); i++ {
-		reclaimed += mHeap_ReclaimList(h, &h.busy[i], npage-reclaimed)
-		if reclaimed >= npage {
-			return
-		}
-	}
-
-	// Now sweep everything that is not yet swept.
-	unlock(&h.lock)
-	for {
-		n := sweepone()
-		if n == ^uintptr(0) { // all spans are swept
-			break
-		}
-		reclaimed += n
-		if reclaimed >= npage {
-			break
-		}
-	}
-	lock(&h.lock)
-}
-
-// Allocate a new span of npage pages from the heap for GC'd memory
-// and record its size class in the HeapMap and HeapMapCache.
-func mHeap_Alloc_m(h *mheap, npage uintptr, sizeclass int32, large bool) *mspan {
-	_g_ := getg()
-	if _g_ != _g_.m.g0 {
-		throw("_mheap_alloc not on g0 stack")
-	}
-	lock(&h.lock)
-
-	// To prevent excessive heap growth, before allocating n pages
-	// we need to sweep and reclaim at least n pages.
-	if h.sweepdone == 0 {
-		// TODO(austin): This tends to sweep a large number of
-		// spans in order to find a few completely free spans
-		// (for example, in the garbage benchmark, this sweeps
-		// ~30x the number of pages its trying to allocate).
-		// If GC kept a bit for whether there were any marks
-		// in a span, we could release these free spans
-		// at the end of GC and eliminate this entirely.
-		mHeap_Reclaim(h, npage)
-	}
-
-	// transfer stats from cache to global
-	memstats.heap_live += uint64(_g_.m.mcache.local_cachealloc)
-	_g_.m.mcache.local_cachealloc = 0
-	memstats.heap_scan += uint64(_g_.m.mcache.local_scan)
-	_g_.m.mcache.local_scan = 0
-	memstats.tinyallocs += uint64(_g_.m.mcache.local_tinyallocs)
-	_g_.m.mcache.local_tinyallocs = 0
-
-	gcController.revise()
-
-	s := mHeap_AllocSpanLocked(h, npage)
-	if s != nil {
-		// Record span info, because gc needs to be
-		// able to map interior pointer to containing span.
-		atomicstore(&s.sweepgen, h.sweepgen)
-		s.state = _MSpanInUse
-		s.freelist = 0
-		s.ref = 0
-		s.sizeclass = uint8(sizeclass)
-		if sizeclass == 0 {
-			s.elemsize = s.npages << _PageShift
-			s.divShift = 0
-			s.divMul = 0
-			s.divShift2 = 0
-			s.baseMask = 0
-		} else {
-			s.elemsize = uintptr(class_to_size[sizeclass])
-			m := &class_to_divmagic[sizeclass]
-			s.divShift = m.shift
-			s.divMul = m.mul
-			s.divShift2 = m.shift2
-			s.baseMask = m.baseMask
-		}
-
-		// update stats, sweep lists
-		if large {
-			memstats.heap_objects++
-			memstats.heap_live += uint64(npage << _PageShift)
-			// Swept spans are at the end of lists.
-			if s.npages < uintptr(len(h.free)) {
-				mSpanList_InsertBack(&h.busy[s.npages], s)
-			} else {
-				mSpanList_InsertBack(&h.busylarge, s)
-			}
-		}
-	}
-	if trace.enabled {
-		traceHeapAlloc()
-	}
-
-	// h_spans is accessed concurrently without synchronization
-	// from other threads. Hence, there must be a store/store
-	// barrier here to ensure the writes to h_spans above happen
-	// before the caller can publish a pointer p to an object
-	// allocated from s. As soon as this happens, the garbage
-	// collector running on another processor could read p and
-	// look up s in h_spans. The unlock acts as the barrier to
-	// order these writes. On the read side, the data dependency
-	// between p and the index in h_spans orders the reads.
-	unlock(&h.lock)
-	return s
-}
-
-func mHeap_Alloc(h *mheap, npage uintptr, sizeclass int32, large bool, needzero bool) *mspan {
-	// Don't do any operations that lock the heap on the G stack.
-	// It might trigger stack growth, and the stack growth code needs
-	// to be able to allocate heap.
-	var s *mspan
-	systemstack(func() {
-		s = mHeap_Alloc_m(h, npage, sizeclass, large)
-	})
-
-	if s != nil {
-		if needzero && s.needzero != 0 {
-			memclr(unsafe.Pointer(s.start<<_PageShift), s.npages<<_PageShift)
-		}
-		s.needzero = 0
-	}
-	return s
-}
-
-func mHeap_AllocStack(h *mheap, npage uintptr) *mspan {
-	_g_ := getg()
-	if _g_ != _g_.m.g0 {
-		throw("mheap_allocstack not on g0 stack")
-	}
-	lock(&h.lock)
-	s := mHeap_AllocSpanLocked(h, npage)
-	if s != nil {
-		s.state = _MSpanStack
-		s.freelist = 0
-		s.ref = 0
-		memstats.stacks_inuse += uint64(s.npages << _PageShift)
-	}
-
-	// This unlock acts as a release barrier. See mHeap_Alloc_m.
-	unlock(&h.lock)
-	return s
-}
-
-// Allocates a span of the given size.  h must be locked.
-// The returned span has been removed from the
-// free list, but its state is still MSpanFree.
-func mHeap_AllocSpanLocked(h *mheap, npage uintptr) *mspan {
-	var s *mspan
-
-	// Try in fixed-size lists up to max.
-	for i := int(npage); i < len(h.free); i++ {
-		if !mSpanList_IsEmpty(&h.free[i]) {
-			s = h.free[i].next
-			goto HaveSpan
-		}
-	}
-
-	// Best fit in list of large spans.
-	s = mHeap_AllocLarge(h, npage)
-	if s == nil {
-		if !mHeap_Grow(h, npage) {
-			return nil
-		}
-		s = mHeap_AllocLarge(h, npage)
-		if s == nil {
-			return nil
-		}
-	}
-
-HaveSpan:
-	// Mark span in use.
-	if s.state != _MSpanFree {
-		throw("MHeap_AllocLocked - MSpan not free")
-	}
-	if s.npages < npage {
-		throw("MHeap_AllocLocked - bad npages")
-	}
-	mSpanList_Remove(s)
-	if s.next != nil || s.prev != nil {
-		throw("still in list")
-	}
-	if s.npreleased > 0 {
-		sysUsed((unsafe.Pointer)(s.start<<_PageShift), s.npages<<_PageShift)
-		memstats.heap_released -= uint64(s.npreleased << _PageShift)
-		s.npreleased = 0
-	}
-
-	if s.npages > npage {
-		// Trim extra and put it back in the heap.
-		t := (*mspan)(fixAlloc_Alloc(&h.spanalloc))
-		mSpan_Init(t, s.start+pageID(npage), s.npages-npage)
-		s.npages = npage
-		p := uintptr(t.start)
-		p -= (uintptr(unsafe.Pointer(h.arena_start)) >> _PageShift)
-		if p > 0 {
-			h_spans[p-1] = s
-		}
-		h_spans[p] = t
-		h_spans[p+t.npages-1] = t
-		t.needzero = s.needzero
-		s.state = _MSpanStack // prevent coalescing with s
-		t.state = _MSpanStack
-		mHeap_FreeSpanLocked(h, t, false, false, s.unusedsince)
-		s.state = _MSpanFree
-	}
-	s.unusedsince = 0
-
-	p := uintptr(s.start)
-	p -= (uintptr(unsafe.Pointer(h.arena_start)) >> _PageShift)
-	for n := uintptr(0); n < npage; n++ {
-		h_spans[p+n] = s
-	}
-
-	memstats.heap_inuse += uint64(npage << _PageShift)
-	memstats.heap_idle -= uint64(npage << _PageShift)
-
-	//println("spanalloc", hex(s.start<<_PageShift))
-	if s.next != nil || s.prev != nil {
-		throw("still in list")
-	}
-	return s
-}
-
-// Allocate a span of exactly npage pages from the list of large spans.
-func mHeap_AllocLarge(h *mheap, npage uintptr) *mspan {
-	return bestFit(&h.freelarge, npage, nil)
-}
-
-// Search list for smallest span with >= npage pages.
-// If there are multiple smallest spans, take the one
-// with the earliest starting address.
-func bestFit(list *mspan, npage uintptr, best *mspan) *mspan {
-	for s := list.next; s != list; s = s.next {
-		if s.npages < npage {
-			continue
-		}
-		if best == nil || s.npages < best.npages || (s.npages == best.npages && s.start < best.start) {
-			best = s
-		}
-	}
-	return best
-}
-
-// Try to add at least npage pages of memory to the heap,
-// returning whether it worked.
-func mHeap_Grow(h *mheap, npage uintptr) bool {
-	// Ask for a big chunk, to reduce the number of mappings
-	// the operating system needs to track; also amortizes
-	// the overhead of an operating system mapping.
-	// Allocate a multiple of 64kB.
-	npage = round(npage, (64<<10)/_PageSize)
-	ask := npage << _PageShift
-	if ask < _HeapAllocChunk {
-		ask = _HeapAllocChunk
-	}
-
-	v := mHeap_SysAlloc(h, ask)
-	if v == nil {
-		if ask > npage<<_PageShift {
-			ask = npage << _PageShift
-			v = mHeap_SysAlloc(h, ask)
-		}
-		if v == nil {
-			print("runtime: out of memory: cannot allocate ", ask, "-byte block (", memstats.heap_sys, " in use)\n")
-			return false
-		}
-	}
-
-	// Create a fake "in use" span and free it, so that the
-	// right coalescing happens.
-	s := (*mspan)(fixAlloc_Alloc(&h.spanalloc))
-	mSpan_Init(s, pageID(uintptr(v)>>_PageShift), ask>>_PageShift)
-	p := uintptr(s.start)
-	p -= (uintptr(unsafe.Pointer(h.arena_start)) >> _PageShift)
-	for i := p; i < p+s.npages; i++ {
-		h_spans[i] = s
-	}
-	atomicstore(&s.sweepgen, h.sweepgen)
-	s.state = _MSpanInUse
-	mHeap_FreeSpanLocked(h, s, false, true, 0)
-	return true
-}
-
-// Look up the span at the given address.
-// Address is guaranteed to be in map
-// and is guaranteed to be start or end of span.
-func mHeap_Lookup(h *mheap, v unsafe.Pointer) *mspan {
-	p := uintptr(v)
-	p -= uintptr(unsafe.Pointer(h.arena_start))
-	return h_spans[p>>_PageShift]
-}
-
-// Look up the span at the given address.
-// Address is *not* guaranteed to be in map
-// and may be anywhere in the span.
-// Map entries for the middle of a span are only
-// valid for allocated spans.  Free spans may have
-// other garbage in their middles, so we have to
-// check for that.
-func mHeap_LookupMaybe(h *mheap, v unsafe.Pointer) *mspan {
-	if uintptr(v) < uintptr(unsafe.Pointer(h.arena_start)) || uintptr(v) >= uintptr(unsafe.Pointer(h.arena_used)) {
-		return nil
-	}
-	p := uintptr(v) >> _PageShift
-	q := p
-	q -= uintptr(unsafe.Pointer(h.arena_start)) >> _PageShift
-	s := h_spans[q]
-	if s == nil || p < uintptr(s.start) || uintptr(v) >= uintptr(unsafe.Pointer(s.limit)) || s.state != _MSpanInUse {
-		return nil
-	}
-	return s
-}
-
-// Free the span back into the heap.
-func mHeap_Free(h *mheap, s *mspan, acct int32) {
-	systemstack(func() {
-		mp := getg().m
-		lock(&h.lock)
-		memstats.heap_live += uint64(mp.mcache.local_cachealloc)
-		mp.mcache.local_cachealloc = 0
-		memstats.heap_scan += uint64(mp.mcache.local_scan)
-		mp.mcache.local_scan = 0
-		memstats.tinyallocs += uint64(mp.mcache.local_tinyallocs)
-		mp.mcache.local_tinyallocs = 0
-		if acct != 0 {
-			memstats.heap_objects--
-		}
-		gcController.revise()
-		mHeap_FreeSpanLocked(h, s, true, true, 0)
-		if trace.enabled {
-			traceHeapAlloc()
-		}
-		unlock(&h.lock)
-	})
-}
-
-func mHeap_FreeStack(h *mheap, s *mspan) {
-	_g_ := getg()
-	if _g_ != _g_.m.g0 {
-		throw("mheap_freestack not on g0 stack")
-	}
-	s.needzero = 1
-	lock(&h.lock)
-	memstats.stacks_inuse -= uint64(s.npages << _PageShift)
-	mHeap_FreeSpanLocked(h, s, true, true, 0)
-	unlock(&h.lock)
-}
-
-func mHeap_FreeSpanLocked(h *mheap, s *mspan, acctinuse, acctidle bool, unusedsince int64) {
-	switch s.state {
-	case _MSpanStack:
-		if s.ref != 0 {
-			throw("MHeap_FreeSpanLocked - invalid stack free")
-		}
-	case _MSpanInUse:
-		if s.ref != 0 || s.sweepgen != h.sweepgen {
-			print("MHeap_FreeSpanLocked - span ", s, " ptr ", hex(s.start<<_PageShift), " ref ", s.ref, " sweepgen ", s.sweepgen, "/", h.sweepgen, "\n")
-			throw("MHeap_FreeSpanLocked - invalid free")
-		}
-	default:
-		throw("MHeap_FreeSpanLocked - invalid span state")
-	}
-
-	if acctinuse {
-		memstats.heap_inuse -= uint64(s.npages << _PageShift)
-	}
-	if acctidle {
-		memstats.heap_idle += uint64(s.npages << _PageShift)
-	}
-	s.state = _MSpanFree
-	mSpanList_Remove(s)
-
-	// Stamp newly unused spans. The scavenger will use that
-	// info to potentially give back some pages to the OS.
-	s.unusedsince = unusedsince
-	if unusedsince == 0 {
-		s.unusedsince = nanotime()
-	}
-	s.npreleased = 0
-
-	// Coalesce with earlier, later spans.
-	p := uintptr(s.start)
-	p -= uintptr(unsafe.Pointer(h.arena_start)) >> _PageShift
-	if p > 0 {
-		t := h_spans[p-1]
-		if t != nil && t.state != _MSpanInUse && t.state != _MSpanStack {
-			s.start = t.start
-			s.npages += t.npages
-			s.npreleased = t.npreleased // absorb released pages
-			s.needzero |= t.needzero
-			p -= t.npages
-			h_spans[p] = s
-			mSpanList_Remove(t)
-			t.state = _MSpanDead
-			fixAlloc_Free(&h.spanalloc, (unsafe.Pointer)(t))
-		}
-	}
-	if (p+s.npages)*ptrSize < h.spans_mapped {
-		t := h_spans[p+s.npages]
-		if t != nil && t.state != _MSpanInUse && t.state != _MSpanStack {
-			s.npages += t.npages
-			s.npreleased += t.npreleased
-			s.needzero |= t.needzero
-			h_spans[p+s.npages-1] = s
-			mSpanList_Remove(t)
-			t.state = _MSpanDead
-			fixAlloc_Free(&h.spanalloc, (unsafe.Pointer)(t))
-		}
-	}
-
-	// Insert s into appropriate list.
-	if s.npages < uintptr(len(h.free)) {
-		mSpanList_Insert(&h.free[s.npages], s)
-	} else {
-		mSpanList_Insert(&h.freelarge, s)
-	}
-}
-
-func scavengelist(list *mspan, now, limit uint64) uintptr {
-	if _PhysPageSize > _PageSize {
-		// golang.org/issue/9993
-		// If the physical page size of the machine is larger than
-		// our logical heap page size the kernel may round up the
-		// amount to be freed to its page size and corrupt the heap
-		// pages surrounding the unused block.
-		return 0
-	}
-
-	if mSpanList_IsEmpty(list) {
-		return 0
-	}
-
-	var sumreleased uintptr
-	for s := list.next; s != list; s = s.next {
-		if (now-uint64(s.unusedsince)) > limit && s.npreleased != s.npages {
-			released := (s.npages - s.npreleased) << _PageShift
-			memstats.heap_released += uint64(released)
-			sumreleased += released
-			s.npreleased = s.npages
-			sysUnused((unsafe.Pointer)(s.start<<_PageShift), s.npages<<_PageShift)
-		}
-	}
-	return sumreleased
-}
-
-func mHeap_Scavenge(k int32, now, limit uint64) {
-	h := &mheap_
-	lock(&h.lock)
-	var sumreleased uintptr
-	for i := 0; i < len(h.free); i++ {
-		sumreleased += scavengelist(&h.free[i], now, limit)
-	}
-	sumreleased += scavengelist(&h.freelarge, now, limit)
-	unlock(&h.lock)
-
-	if debug.gctrace > 0 {
-		if sumreleased > 0 {
-			print("scvg", k, ": ", sumreleased>>20, " MB released\n")
-		}
-		// TODO(dvyukov): these stats are incorrect as we don't subtract stack usage from heap.
-		// But we can't call ReadMemStats on g0 holding locks.
-		print("scvg", k, ": inuse: ", memstats.heap_inuse>>20, ", idle: ", memstats.heap_idle>>20, ", sys: ", memstats.heap_sys>>20, ", released: ", memstats.heap_released>>20, ", consumed: ", (memstats.heap_sys-memstats.heap_released)>>20, " (MB)\n")
-	}
-}
-
-//go:linkname runtime_debug_freeOSMemory runtime/debug.freeOSMemory
-func runtime_debug_freeOSMemory() {
-	startGC(gcForceBlockMode, false)
-	systemstack(func() { mHeap_Scavenge(-1, ^uint64(0), 0) })
-}
-
-// Initialize a new span with the given start and npages.
-func mSpan_Init(span *mspan, start pageID, npages uintptr) {
-	span.next = nil
-	span.prev = nil
-	span.start = start
-	span.npages = npages
-	span.freelist = 0
-	span.ref = 0
-	span.sizeclass = 0
-	span.incache = false
-	span.elemsize = 0
-	span.state = _MSpanDead
-	span.unusedsince = 0
-	span.npreleased = 0
-	span.speciallock.key = 0
-	span.specials = nil
-	span.needzero = 0
-}
-
-// Initialize an empty doubly-linked list.
-func mSpanList_Init(list *mspan) {
-	list.state = _MSpanListHead
-	list.next = list
-	list.prev = list
-}
-
-func mSpanList_Remove(span *mspan) {
-	if span.prev == nil && span.next == nil {
-		return
-	}
-	span.prev.next = span.next
-	span.next.prev = span.prev
-	span.prev = nil
-	span.next = nil
-}
-
-func mSpanList_IsEmpty(list *mspan) bool {
-	return list.next == list
-}
-
-func mSpanList_Insert(list *mspan, span *mspan) {
-	if span.next != nil || span.prev != nil {
-		println("failed MSpanList_Insert", span, span.next, span.prev)
-		throw("MSpanList_Insert")
-	}
-	span.next = list.next
-	span.prev = list
-	span.next.prev = span
-	span.prev.next = span
-}
-
-func mSpanList_InsertBack(list *mspan, span *mspan) {
-	if span.next != nil || span.prev != nil {
-		println("failed MSpanList_InsertBack", span, span.next, span.prev)
-		throw("MSpanList_InsertBack")
-	}
-	span.next = list
-	span.prev = list.prev
-	span.next.prev = span
-	span.prev.next = span
-}
-
-const (
-	_KindSpecialFinalizer = 1
-	_KindSpecialProfile   = 2
-	// Note: The finalizer special must be first because if we're freeing
-	// an object, a finalizer special will cause the freeing operation
-	// to abort, and we want to keep the other special records around
-	// if that happens.
-)
-
-type special struct {
-	next   *special // linked list in span
-	offset uint16   // span offset of object
-	kind   byte     // kind of special
-}
-
-// Adds the special record s to the list of special records for
-// the object p.  All fields of s should be filled in except for
-// offset & next, which this routine will fill in.
-// Returns true if the special was successfully added, false otherwise.
-// (The add will fail only if a record with the same p and s->kind
-//  already exists.)
-func addspecial(p unsafe.Pointer, s *special) bool {
-	span := mHeap_LookupMaybe(&mheap_, p)
-	if span == nil {
-		throw("addspecial on invalid pointer")
-	}
-
-	// Ensure that the span is swept.
-	// GC accesses specials list w/o locks. And it's just much safer.
-	mp := acquirem()
-	mSpan_EnsureSwept(span)
-
-	offset := uintptr(p) - uintptr(span.start<<_PageShift)
-	kind := s.kind
-
-	lock(&span.speciallock)
-
-	// Find splice point, check for existing record.
-	t := &span.specials
-	for {
-		x := *t
-		if x == nil {
-			break
-		}
-		if offset == uintptr(x.offset) && kind == x.kind {
-			unlock(&span.speciallock)
-			releasem(mp)
-			return false // already exists
-		}
-		if offset < uintptr(x.offset) || (offset == uintptr(x.offset) && kind < x.kind) {
-			break
-		}
-		t = &x.next
-	}
-
-	// Splice in record, fill in offset.
-	s.offset = uint16(offset)
-	s.next = *t
-	*t = s
-	unlock(&span.speciallock)
-	releasem(mp)
-
-	return true
-}
-
-// Removes the Special record of the given kind for the object p.
-// Returns the record if the record existed, nil otherwise.
-// The caller must FixAlloc_Free the result.
-func removespecial(p unsafe.Pointer, kind uint8) *special {
-	span := mHeap_LookupMaybe(&mheap_, p)
-	if span == nil {
-		throw("removespecial on invalid pointer")
-	}
-
-	// Ensure that the span is swept.
-	// GC accesses specials list w/o locks. And it's just much safer.
-	mp := acquirem()
-	mSpan_EnsureSwept(span)
-
-	offset := uintptr(p) - uintptr(span.start<<_PageShift)
-
-	lock(&span.speciallock)
-	t := &span.specials
-	for {
-		s := *t
-		if s == nil {
-			break
-		}
-		// This function is used for finalizers only, so we don't check for
-		// "interior" specials (p must be exactly equal to s->offset).
-		if offset == uintptr(s.offset) && kind == s.kind {
-			*t = s.next
-			unlock(&span.speciallock)
-			releasem(mp)
-			return s
-		}
-		t = &s.next
-	}
-	unlock(&span.speciallock)
-	releasem(mp)
-	return nil
-}
-
-// The described object has a finalizer set for it.
-type specialfinalizer struct {
-	special special
-	fn      *funcval
-	nret    uintptr
-	fint    *_type
-	ot      *ptrtype
-}
-
-// Adds a finalizer to the object p.  Returns true if it succeeded.
-func addfinalizer(p unsafe.Pointer, f *funcval, nret uintptr, fint *_type, ot *ptrtype) bool {
-	lock(&mheap_.speciallock)
-	s := (*specialfinalizer)(fixAlloc_Alloc(&mheap_.specialfinalizeralloc))
-	unlock(&mheap_.speciallock)
-	s.special.kind = _KindSpecialFinalizer
-	s.fn = f
-	s.nret = nret
-	s.fint = fint
-	s.ot = ot
-	if addspecial(p, &s.special) {
-		return true
-	}
-
-	// There was an old finalizer
-	lock(&mheap_.speciallock)
-	fixAlloc_Free(&mheap_.specialfinalizeralloc, (unsafe.Pointer)(s))
-	unlock(&mheap_.speciallock)
-	return false
-}
-
-// Removes the finalizer (if any) from the object p.
-func removefinalizer(p unsafe.Pointer) {
-	s := (*specialfinalizer)(unsafe.Pointer(removespecial(p, _KindSpecialFinalizer)))
-	if s == nil {
-		return // there wasn't a finalizer to remove
-	}
-	lock(&mheap_.speciallock)
-	fixAlloc_Free(&mheap_.specialfinalizeralloc, (unsafe.Pointer)(s))
-	unlock(&mheap_.speciallock)
-}
-
-// The described object is being heap profiled.
-type specialprofile struct {
-	special special
-	b       *bucket
-}
-
-// Set the heap profile bucket associated with addr to b.
-func setprofilebucket(p unsafe.Pointer, b *bucket) {
-	lock(&mheap_.speciallock)
-	s := (*specialprofile)(fixAlloc_Alloc(&mheap_.specialprofilealloc))
-	unlock(&mheap_.speciallock)
-	s.special.kind = _KindSpecialProfile
-	s.b = b
-	if !addspecial(p, &s.special) {
-		throw("setprofilebucket: profile already set")
-	}
-}
-
-// Do whatever cleanup needs to be done to deallocate s.  It has
-// already been unlinked from the MSpan specials list.
-// Returns true if we should keep working on deallocating p.
-func freespecial(s *special, p unsafe.Pointer, size uintptr, freed bool) bool {
-	switch s.kind {
-	case _KindSpecialFinalizer:
-		sf := (*specialfinalizer)(unsafe.Pointer(s))
-		queuefinalizer(p, sf.fn, sf.nret, sf.fint, sf.ot)
-		lock(&mheap_.speciallock)
-		fixAlloc_Free(&mheap_.specialfinalizeralloc, (unsafe.Pointer)(sf))
-		unlock(&mheap_.speciallock)
-		return false // don't free p until finalizer is done
-	case _KindSpecialProfile:
-		sp := (*specialprofile)(unsafe.Pointer(s))
-		mProf_Free(sp.b, size, freed)
-		lock(&mheap_.speciallock)
-		fixAlloc_Free(&mheap_.specialprofilealloc, (unsafe.Pointer)(sp))
-		unlock(&mheap_.speciallock)
-		return true
-	default:
-		throw("bad special kind")
-		panic("not reached")
-	}
-}
diff --git a/src/runtime/mkduff.go b/src/runtime/mkduff.go
deleted file mode 100644
index dc94cee..0000000
--- a/src/runtime/mkduff.go
+++ /dev/null
@@ -1,188 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-// runtime·duffzero is a Duff's device for zeroing memory.
-// The compiler jumps to computed addresses within
-// the routine to zero chunks of memory.
-// Do not change duffzero without also
-// changing clearfat in cmd/?g/ggen.go.
-
-// runtime·duffcopy is a Duff's device for copying memory.
-// The compiler jumps to computed addresses within
-// the routine to copy chunks of memory.
-// Source and destination must not overlap.
-// Do not change duffcopy without also
-// changing blockcopy in cmd/?g/cgen.go.
-
-// See the zero* and copy* generators below
-// for architecture-specific comments.
-
-// mkduff generates duff_*.s.
-package main
-
-import (
-	"bytes"
-	"fmt"
-	"io"
-	"io/ioutil"
-	"log"
-)
-
-func main() {
-	gen("amd64", notags, zeroAMD64, copyAMD64)
-	gen("386", notags, zero386, copy386)
-	gen("arm", notags, zeroARM, copyARM)
-	gen("arm64", notags, zeroARM64, copyARM64)
-	gen("ppc64x", tagsPPC64x, zeroPPC64x, copyPPC64x)
-}
-
-func gen(arch string, tags, zero, copy func(io.Writer)) {
-	var buf bytes.Buffer
-
-	fmt.Fprintln(&buf, "// AUTO-GENERATED by mkduff.go")
-	fmt.Fprintln(&buf, "// Run go generate from src/runtime to update.")
-	fmt.Fprintln(&buf, "// See mkduff.go for comments.")
-	tags(&buf)
-	fmt.Fprintln(&buf, "#include \"textflag.h\"")
-	fmt.Fprintln(&buf)
-	zero(&buf)
-	fmt.Fprintln(&buf)
-	copy(&buf)
-
-	if err := ioutil.WriteFile("duff_"+arch+".s", buf.Bytes(), 0644); err != nil {
-		log.Fatalln(err)
-	}
-}
-
-func notags(w io.Writer) { fmt.Fprintln(w) }
-
-func zeroAMD64(w io.Writer) {
-	// AX: zero
-	// DI: ptr to memory to be zeroed
-	// DI is updated as a side effect.
-	fmt.Fprintln(w, "TEXT runtime·duffzero(SB), NOSPLIT, $0-0")
-	for i := 0; i < 31; i++ {
-		fmt.Fprintln(w, "\tMOVQ\tAX,(DI)")
-		fmt.Fprintln(w, "\tMOVQ\tAX,8(DI)")
-		fmt.Fprintln(w, "\tMOVQ\tAX,16(DI)")
-		fmt.Fprintln(w, "\tMOVQ\tAX,24(DI)")
-		fmt.Fprintln(w, "\tADDQ\t$32,DI")
-		fmt.Fprintln(w)
-	}
-	for i := 0; i < 4; i++ {
-		fmt.Fprintln(w, "\tSTOSQ")
-	}
-	fmt.Fprintln(w, "\tRET")
-}
-
-func copyAMD64(w io.Writer) {
-	// SI: ptr to source memory
-	// DI: ptr to destination memory
-	// SI and DI are updated as a side effect.
-	//
-	// This is equivalent to a sequence of MOVSQ but
-	// for some reason that is 3.5x slower than this code.
-	// The STOSQ in duffzero seem fine, though.
-	fmt.Fprintln(w, "TEXT runtime·duffcopy(SB), NOSPLIT, $0-0")
-	for i := 0; i < 128; i++ {
-		fmt.Fprintln(w, "\tMOVQ\t(SI), CX")
-		fmt.Fprintln(w, "\tADDQ\t$8, SI")
-		fmt.Fprintln(w, "\tMOVQ\tCX, (DI)")
-		fmt.Fprintln(w, "\tADDQ\t$8, DI")
-		fmt.Fprintln(w)
-	}
-	fmt.Fprintln(w, "\tRET")
-}
-
-func zero386(w io.Writer) {
-	// AX: zero
-	// DI: ptr to memory to be zeroed
-	// DI is updated as a side effect.
-	fmt.Fprintln(w, "TEXT runtime·duffzero(SB), NOSPLIT, $0-0")
-	for i := 0; i < 128; i++ {
-		fmt.Fprintln(w, "\tSTOSL")
-	}
-	fmt.Fprintln(w, "\tRET")
-}
-
-func copy386(w io.Writer) {
-	// SI: ptr to source memory
-	// DI: ptr to destination memory
-	// SI and DI are updated as a side effect.
-	//
-	// This is equivalent to a sequence of MOVSL but
-	// for some reason MOVSL is really slow.
-	fmt.Fprintln(w, "TEXT runtime·duffcopy(SB), NOSPLIT, $0-0")
-	for i := 0; i < 128; i++ {
-		fmt.Fprintln(w, "\tMOVL\t(SI), CX")
-		fmt.Fprintln(w, "\tADDL\t$4, SI")
-		fmt.Fprintln(w, "\tMOVL\tCX, (DI)")
-		fmt.Fprintln(w, "\tADDL\t$4, DI")
-		fmt.Fprintln(w)
-	}
-	fmt.Fprintln(w, "\tRET")
-}
-
-func zeroARM(w io.Writer) {
-	// R0: zero
-	// R1: ptr to memory to be zeroed
-	// R1 is updated as a side effect.
-	fmt.Fprintln(w, "TEXT runtime·duffzero(SB), NOSPLIT, $0-0")
-	for i := 0; i < 128; i++ {
-		fmt.Fprintln(w, "\tMOVW.P\tR0, 4(R1)")
-	}
-	fmt.Fprintln(w, "\tRET")
-}
-
-func copyARM(w io.Writer) {
-	// R0: scratch space
-	// R1: ptr to source memory
-	// R2: ptr to destination memory
-	// R1 and R2 are updated as a side effect
-	fmt.Fprintln(w, "TEXT runtime·duffcopy(SB), NOSPLIT, $0-0")
-	for i := 0; i < 128; i++ {
-		fmt.Fprintln(w, "\tMOVW.P\t4(R1), R0")
-		fmt.Fprintln(w, "\tMOVW.P\tR0, 4(R2)")
-		fmt.Fprintln(w)
-	}
-	fmt.Fprintln(w, "\tRET")
-}
-
-func zeroARM64(w io.Writer) {
-	// ZR: always zero
-	// R16 (aka REGRT1): ptr to memory to be zeroed - 8
-	// On return, R16 points to the last zeroed dword.
-	fmt.Fprintln(w, "TEXT runtime·duffzero(SB), NOSPLIT, $-8-0")
-	for i := 0; i < 128; i++ {
-		fmt.Fprintln(w, "\tMOVD.W\tZR, 8(R16)")
-	}
-	fmt.Fprintln(w, "\tRET")
-}
-
-func copyARM64(w io.Writer) {
-	fmt.Fprintln(w, "// TODO: Implement runtime·duffcopy.")
-}
-
-func tagsPPC64x(w io.Writer) {
-	fmt.Fprintln(w)
-	fmt.Fprintln(w, "// +build ppc64 ppc64le")
-	fmt.Fprintln(w)
-}
-
-func zeroPPC64x(w io.Writer) {
-	// R0: always zero
-	// R3 (aka REGRT1): ptr to memory to be zeroed - 8
-	// On return, R3 points to the last zeroed dword.
-	fmt.Fprintln(w, "TEXT runtime·duffzero(SB), NOSPLIT, $-8-0")
-	for i := 0; i < 128; i++ {
-		fmt.Fprintln(w, "\tMOVDU\tR0, 8(R3)")
-	}
-	fmt.Fprintln(w, "\tRETURN")
-}
-
-func copyPPC64x(w io.Writer) {
-	fmt.Fprintln(w, "// TODO: Implement runtime·duffcopy.")
-}
diff --git a/src/runtime/msize.go b/src/runtime/msize.go
deleted file mode 100644
index bc735be..0000000
--- a/src/runtime/msize.go
+++ /dev/null
@@ -1,254 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Malloc small size classes.
-//
-// See malloc.go for overview.
-//
-// The size classes are chosen so that rounding an allocation
-// request up to the next size class wastes at most 12.5% (1.125x).
-//
-// Each size class has its own page count that gets allocated
-// and chopped up when new objects of the size class are needed.
-// That page count is chosen so that chopping up the run of
-// pages into objects of the given size wastes at most 12.5% (1.125x)
-// of the memory.  It is not necessary that the cutoff here be
-// the same as above.
-//
-// The two sources of waste multiply, so the worst possible case
-// for the above constraints would be that allocations of some
-// size might have a 26.6% (1.266x) overhead.
-// In practice, only one of the wastes comes into play for a
-// given size (sizes < 512 waste mainly on the round-up,
-// sizes > 512 waste mainly on the page chopping).
-//
-// TODO(rsc): Compute max waste for any given size.
-
-package runtime
-
-// Size classes.  Computed and initialized by InitSizes.
-//
-// SizeToClass(0 <= n <= MaxSmallSize) returns the size class,
-//	1 <= sizeclass < NumSizeClasses, for n.
-//	Size class 0 is reserved to mean "not small".
-//
-// class_to_size[i] = largest size in class i
-// class_to_allocnpages[i] = number of pages to allocate when
-//	making new objects in class i
-
-// The SizeToClass lookup is implemented using two arrays,
-// one mapping sizes <= 1024 to their class and one mapping
-// sizes >= 1024 and <= MaxSmallSize to their class.
-// All objects are 8-aligned, so the first array is indexed by
-// the size divided by 8 (rounded up).  Objects >= 1024 bytes
-// are 128-aligned, so the second array is indexed by the
-// size divided by 128 (rounded up).  The arrays are filled in
-// by InitSizes.
-
-var class_to_size [_NumSizeClasses]int32
-var class_to_allocnpages [_NumSizeClasses]int32
-var class_to_divmagic [_NumSizeClasses]divMagic
-
-var size_to_class8 [1024/8 + 1]int8
-var size_to_class128 [(_MaxSmallSize-1024)/128 + 1]int8
-
-func sizeToClass(size int32) int32 {
-	if size > _MaxSmallSize {
-		throw("SizeToClass - invalid size")
-	}
-	if size > 1024-8 {
-		return int32(size_to_class128[(size-1024+127)>>7])
-	}
-	return int32(size_to_class8[(size+7)>>3])
-}
-
-func initSizes() {
-	// Initialize the runtime·class_to_size table (and choose class sizes in the process).
-	class_to_size[0] = 0
-	sizeclass := 1 // 0 means no class
-	align := 8
-	for size := align; size <= _MaxSmallSize; size += align {
-		if size&(size-1) == 0 { // bump alignment once in a while
-			if size >= 2048 {
-				align = 256
-			} else if size >= 128 {
-				align = size / 8
-			} else if size >= 16 {
-				align = 16 // required for x86 SSE instructions, if we want to use them
-			}
-		}
-		if align&(align-1) != 0 {
-			throw("InitSizes - bug")
-		}
-
-		// Make the allocnpages big enough that
-		// the leftover is less than 1/8 of the total,
-		// so wasted space is at most 12.5%.
-		allocsize := _PageSize
-		for allocsize%size > allocsize/8 {
-			allocsize += _PageSize
-		}
-		npages := allocsize >> _PageShift
-
-		// If the previous sizeclass chose the same
-		// allocation size and fit the same number of
-		// objects into the page, we might as well
-		// use just this size instead of having two
-		// different sizes.
-		if sizeclass > 1 && npages == int(class_to_allocnpages[sizeclass-1]) && allocsize/size == allocsize/int(class_to_size[sizeclass-1]) {
-			class_to_size[sizeclass-1] = int32(size)
-			continue
-		}
-
-		class_to_allocnpages[sizeclass] = int32(npages)
-		class_to_size[sizeclass] = int32(size)
-		sizeclass++
-	}
-	if sizeclass != _NumSizeClasses {
-		print("sizeclass=", sizeclass, " NumSizeClasses=", _NumSizeClasses, "\n")
-		throw("InitSizes - bad NumSizeClasses")
-	}
-
-	// Initialize the size_to_class tables.
-	nextsize := 0
-	for sizeclass = 1; sizeclass < _NumSizeClasses; sizeclass++ {
-		for ; nextsize < 1024 && nextsize <= int(class_to_size[sizeclass]); nextsize += 8 {
-			size_to_class8[nextsize/8] = int8(sizeclass)
-		}
-		if nextsize >= 1024 {
-			for ; nextsize <= int(class_to_size[sizeclass]); nextsize += 128 {
-				size_to_class128[(nextsize-1024)/128] = int8(sizeclass)
-			}
-		}
-	}
-
-	// Double-check SizeToClass.
-	if false {
-		for n := int32(0); n < _MaxSmallSize; n++ {
-			sizeclass := sizeToClass(n)
-			if sizeclass < 1 || sizeclass >= _NumSizeClasses || class_to_size[sizeclass] < n {
-				print("size=", n, " sizeclass=", sizeclass, " runtime·class_to_size=", class_to_size[sizeclass], "\n")
-				print("incorrect SizeToClass\n")
-				goto dump
-			}
-			if sizeclass > 1 && class_to_size[sizeclass-1] >= n {
-				print("size=", n, " sizeclass=", sizeclass, " runtime·class_to_size=", class_to_size[sizeclass], "\n")
-				print("SizeToClass too big\n")
-				goto dump
-			}
-		}
-	}
-
-	testdefersizes()
-
-	// Copy out for statistics table.
-	for i := 0; i < len(class_to_size); i++ {
-		memstats.by_size[i].size = uint32(class_to_size[i])
-	}
-
-	for i := 1; i < len(class_to_size); i++ {
-		class_to_divmagic[i] = computeDivMagic(uint32(class_to_size[i]))
-	}
-
-	return
-
-dump:
-	if true {
-		print("NumSizeClasses=", _NumSizeClasses, "\n")
-		print("runtime·class_to_size:")
-		for sizeclass = 0; sizeclass < _NumSizeClasses; sizeclass++ {
-			print(" ", class_to_size[sizeclass], "")
-		}
-		print("\n\n")
-		print("size_to_class8:")
-		for i := 0; i < len(size_to_class8); i++ {
-			print(" ", i*8, "=>", size_to_class8[i], "(", class_to_size[size_to_class8[i]], ")\n")
-		}
-		print("\n")
-		print("size_to_class128:")
-		for i := 0; i < len(size_to_class128); i++ {
-			print(" ", i*128, "=>", size_to_class128[i], "(", class_to_size[size_to_class128[i]], ")\n")
-		}
-		print("\n")
-	}
-	throw("InitSizes failed")
-}
-
-// Returns size of the memory block that mallocgc will allocate if you ask for the size.
-func roundupsize(size uintptr) uintptr {
-	if size < _MaxSmallSize {
-		if size <= 1024-8 {
-			return uintptr(class_to_size[size_to_class8[(size+7)>>3]])
-		} else {
-			return uintptr(class_to_size[size_to_class128[(size-1024+127)>>7]])
-		}
-	}
-	if size+_PageSize < size {
-		return size
-	}
-	return round(size, _PageSize)
-}
-
-// divMagic holds magic constants to implement division
-// by a particular constant as a shift, multiply, and shift.
-// That is, given
-//	m = computeMagic(d)
-// then
-//	n/d == ((n>>m.shift) * m.mul) >> m.shift2
-//
-// The magic computation picks m such that
-//	d = d₁*d₂
-//	d₂= 2^m.shift
-//	m.mul = ⌈2^m.shift2 / d₁⌉
-//
-// The magic computation here is tailored for malloc block sizes
-// and does not handle arbitrary d correctly. Malloc block sizes d are
-// always even, so the first shift implements the factors of 2 in d
-// and then the mul and second shift implement the odd factor
-// that remains. Because the first shift divides n by at least 2 (actually 8)
-// before the multiply gets involved, the huge corner cases that
-// require additional adjustment are impossible, so the usual
-// fixup is not needed.
-//
-// For more details see Hacker's Delight, Chapter 10, and
-// http://ridiculousfish.com/blog/posts/labor-of-division-episode-i.html
-// http://ridiculousfish.com/blog/posts/labor-of-division-episode-iii.html
-type divMagic struct {
-	shift    uint8
-	mul      uint32
-	shift2   uint8
-	baseMask uintptr
-}
-
-func computeDivMagic(d uint32) divMagic {
-	var m divMagic
-
-	// If the size is a power of two, heapBitsForObject can divide even faster by masking.
-	// Compute this mask.
-	if d&(d-1) == 0 {
-		// It is a power of 2 (assuming dinptr != 1)
-		m.baseMask = ^(uintptr(d) - 1)
-	} else {
-		m.baseMask = 0
-	}
-
-	// Compute pre-shift by factoring power of 2 out of d.
-	for d&1 == 0 {
-		m.shift++
-		d >>= 1
-	}
-
-	// Compute largest k such that ⌈2^k / d⌉ fits in a 32-bit int.
-	// This is always a good enough approximation.
-	// We could use smaller k for some divisors but there's no point.
-	k := uint8(63)
-	d64 := uint64(d)
-	for ((1<<k)+d64-1)/d64 >= 1<<32 {
-		k--
-	}
-	m.mul = uint32(((1 << k) + d64 - 1) / d64) //  ⌈2^k / d⌉
-	m.shift2 = k
-
-	return m
-}
diff --git a/src/runtime/mstats.go b/src/runtime/mstats.go
deleted file mode 100644
index 08b82e0..0000000
--- a/src/runtime/mstats.go
+++ /dev/null
@@ -1,391 +0,0 @@
-// Copyright 2009 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Memory statistics
-
-package runtime
-
-import "unsafe"
-
-// Statistics.
-// If you edit this structure, also edit type MemStats below.
-type mstats struct {
-	// General statistics.
-	alloc       uint64 // bytes allocated and not yet freed
-	total_alloc uint64 // bytes allocated (even if freed)
-	sys         uint64 // bytes obtained from system (should be sum of xxx_sys below, no locking, approximate)
-	nlookup     uint64 // number of pointer lookups
-	nmalloc     uint64 // number of mallocs
-	nfree       uint64 // number of frees
-
-	// Statistics about malloc heap.
-	// protected by mheap.lock
-	heap_alloc    uint64 // bytes allocated and not yet freed (same as alloc above)
-	heap_sys      uint64 // bytes obtained from system
-	heap_idle     uint64 // bytes in idle spans
-	heap_inuse    uint64 // bytes in non-idle spans
-	heap_released uint64 // bytes released to the os
-	heap_objects  uint64 // total number of allocated objects
-
-	// Statistics about allocation of low-level fixed-size structures.
-	// Protected by FixAlloc locks.
-	stacks_inuse uint64 // this number is included in heap_inuse above
-	stacks_sys   uint64 // always 0 in mstats
-	mspan_inuse  uint64 // mspan structures
-	mspan_sys    uint64
-	mcache_inuse uint64 // mcache structures
-	mcache_sys   uint64
-	buckhash_sys uint64 // profiling bucket hash table
-	gc_sys       uint64
-	other_sys    uint64
-
-	// Statistics about garbage collector.
-	// Protected by mheap or stopping the world during GC.
-	next_gc         uint64 // next gc (in heap_alloc time)
-	last_gc         uint64 // last gc (in absolute time)
-	pause_total_ns  uint64
-	pause_ns        [256]uint64 // circular buffer of recent gc pause lengths
-	pause_end       [256]uint64 // circular buffer of recent gc end times (nanoseconds since 1970)
-	numgc           uint32
-	gc_cpu_fraction float64 // fraction of CPU time used by GC
-	enablegc        bool
-	debuggc         bool
-
-	// Statistics about allocation size classes.
-
-	by_size [_NumSizeClasses]struct {
-		size    uint32
-		nmalloc uint64
-		nfree   uint64
-	}
-
-	// Statistics below here are not exported to Go directly.
-
-	tinyallocs uint64 // number of tiny allocations that didn't cause actual allocation; not exported to go directly
-
-	// heap_live is the number of bytes considered live by the GC.
-	// That is: retained by the most recent GC plus allocated
-	// since then. heap_live <= heap_alloc, since heap_live
-	// excludes unmarked objects that have not yet been swept.
-	heap_live uint64
-
-	// heap_scan is the number of bytes of "scannable" heap. This
-	// is the live heap (as counted by heap_live), but omitting
-	// no-scan objects and no-scan tails of objects.
-	heap_scan uint64
-
-	// heap_marked is the number of bytes marked by the previous
-	// GC. After mark termination, heap_live == heap_marked, but
-	// unlike heap_live, heap_marked does not change until the
-	// next mark termination.
-	heap_marked uint64
-
-	// heap_reachable is an estimate of the reachable heap bytes
-	// at the end of the previous GC.
-	heap_reachable uint64
-}
-
-var memstats mstats
-
-// A MemStats records statistics about the memory allocator.
-type MemStats struct {
-	// General statistics.
-	Alloc      uint64 // bytes allocated and not yet freed
-	TotalAlloc uint64 // bytes allocated (even if freed)
-	Sys        uint64 // bytes obtained from system (sum of XxxSys below)
-	Lookups    uint64 // number of pointer lookups
-	Mallocs    uint64 // number of mallocs
-	Frees      uint64 // number of frees
-
-	// Main allocation heap statistics.
-	HeapAlloc    uint64 // bytes allocated and not yet freed (same as Alloc above)
-	HeapSys      uint64 // bytes obtained from system
-	HeapIdle     uint64 // bytes in idle spans
-	HeapInuse    uint64 // bytes in non-idle span
-	HeapReleased uint64 // bytes released to the OS
-	HeapObjects  uint64 // total number of allocated objects
-
-	// Low-level fixed-size structure allocator statistics.
-	//	Inuse is bytes used now.
-	//	Sys is bytes obtained from system.
-	StackInuse  uint64 // bytes used by stack allocator
-	StackSys    uint64
-	MSpanInuse  uint64 // mspan structures
-	MSpanSys    uint64
-	MCacheInuse uint64 // mcache structures
-	MCacheSys   uint64
-	BuckHashSys uint64 // profiling bucket hash table
-	GCSys       uint64 // GC metadata
-	OtherSys    uint64 // other system allocations
-
-	// Garbage collector statistics.
-	NextGC        uint64 // next collection will happen when HeapAlloc ≥ this amount
-	LastGC        uint64 // end time of last collection (nanoseconds since 1970)
-	PauseTotalNs  uint64
-	PauseNs       [256]uint64 // circular buffer of recent GC pause durations, most recent at [(NumGC+255)%256]
-	PauseEnd      [256]uint64 // circular buffer of recent GC pause end times
-	NumGC         uint32
-	GCCPUFraction float64 // fraction of CPU time used by GC
-	EnableGC      bool
-	DebugGC       bool
-
-	// Per-size allocation statistics.
-	// 61 is NumSizeClasses in the C code.
-	BySize [61]struct {
-		Size    uint32
-		Mallocs uint64
-		Frees   uint64
-	}
-}
-
-// Size of the trailing by_size array differs between Go and C,
-// and all data after by_size is local to runtime, not exported.
-// NumSizeClasses was changed, but we can not change Go struct because of backward compatibility.
-// sizeof_C_MStats is what C thinks about size of Go struct.
-var sizeof_C_MStats = unsafe.Offsetof(memstats.by_size) + 61*unsafe.Sizeof(memstats.by_size[0])
-
-func init() {
-	var memStats MemStats
-	if sizeof_C_MStats != unsafe.Sizeof(memStats) {
-		println(sizeof_C_MStats, unsafe.Sizeof(memStats))
-		throw("MStats vs MemStatsType size mismatch")
-	}
-}
-
-// ReadMemStats populates m with memory allocator statistics.
-func ReadMemStats(m *MemStats) {
-	stopTheWorld("read mem stats")
-
-	systemstack(func() {
-		readmemstats_m(m)
-	})
-
-	startTheWorld()
-}
-
-func readmemstats_m(stats *MemStats) {
-	updatememstats(nil)
-
-	// Size of the trailing by_size array differs between Go and C,
-	// NumSizeClasses was changed, but we can not change Go struct because of backward compatibility.
-	memmove(unsafe.Pointer(stats), unsafe.Pointer(&memstats), sizeof_C_MStats)
-
-	// Stack numbers are part of the heap numbers, separate those out for user consumption
-	stats.StackSys += stats.StackInuse
-	stats.HeapInuse -= stats.StackInuse
-	stats.HeapSys -= stats.StackInuse
-}
-
-//go:linkname readGCStats runtime/debug.readGCStats
-func readGCStats(pauses *[]uint64) {
-	systemstack(func() {
-		readGCStats_m(pauses)
-	})
-}
-
-func readGCStats_m(pauses *[]uint64) {
-	p := *pauses
-	// Calling code in runtime/debug should make the slice large enough.
-	if cap(p) < len(memstats.pause_ns)+3 {
-		throw("short slice passed to readGCStats")
-	}
-
-	// Pass back: pauses, pause ends, last gc (absolute time), number of gc, total pause ns.
-	lock(&mheap_.lock)
-
-	n := memstats.numgc
-	if n > uint32(len(memstats.pause_ns)) {
-		n = uint32(len(memstats.pause_ns))
-	}
-
-	// The pause buffer is circular. The most recent pause is at
-	// pause_ns[(numgc-1)%len(pause_ns)], and then backward
-	// from there to go back farther in time. We deliver the times
-	// most recent first (in p[0]).
-	p = p[:cap(p)]
-	for i := uint32(0); i < n; i++ {
-		j := (memstats.numgc - 1 - i) % uint32(len(memstats.pause_ns))
-		p[i] = memstats.pause_ns[j]
-		p[n+i] = memstats.pause_end[j]
-	}
-
-	p[n+n] = memstats.last_gc
-	p[n+n+1] = uint64(memstats.numgc)
-	p[n+n+2] = memstats.pause_total_ns
-	unlock(&mheap_.lock)
-	*pauses = p[:n+n+3]
-}
-
-//go:nowritebarrier
-func updatememstats(stats *gcstats) {
-	if stats != nil {
-		*stats = gcstats{}
-	}
-	for mp := allm; mp != nil; mp = mp.alllink {
-		if stats != nil {
-			src := (*[unsafe.Sizeof(gcstats{}) / 8]uint64)(unsafe.Pointer(&mp.gcstats))
-			dst := (*[unsafe.Sizeof(gcstats{}) / 8]uint64)(unsafe.Pointer(stats))
-			for i, v := range src {
-				dst[i] += v
-			}
-			mp.gcstats = gcstats{}
-		}
-	}
-
-	memstats.mcache_inuse = uint64(mheap_.cachealloc.inuse)
-	memstats.mspan_inuse = uint64(mheap_.spanalloc.inuse)
-	memstats.sys = memstats.heap_sys + memstats.stacks_sys + memstats.mspan_sys +
-		memstats.mcache_sys + memstats.buckhash_sys + memstats.gc_sys + memstats.other_sys
-
-	// Calculate memory allocator stats.
-	// During program execution we only count number of frees and amount of freed memory.
-	// Current number of alive object in the heap and amount of alive heap memory
-	// are calculated by scanning all spans.
-	// Total number of mallocs is calculated as number of frees plus number of alive objects.
-	// Similarly, total amount of allocated memory is calculated as amount of freed memory
-	// plus amount of alive heap memory.
-	memstats.alloc = 0
-	memstats.total_alloc = 0
-	memstats.nmalloc = 0
-	memstats.nfree = 0
-	for i := 0; i < len(memstats.by_size); i++ {
-		memstats.by_size[i].nmalloc = 0
-		memstats.by_size[i].nfree = 0
-	}
-
-	// Flush MCache's to MCentral.
-	systemstack(flushallmcaches)
-
-	// Aggregate local stats.
-	cachestats()
-
-	// Scan all spans and count number of alive objects.
-	lock(&mheap_.lock)
-	for i := uint32(0); i < mheap_.nspan; i++ {
-		s := h_allspans[i]
-		if s.state != mSpanInUse {
-			continue
-		}
-		if s.sizeclass == 0 {
-			memstats.nmalloc++
-			memstats.alloc += uint64(s.elemsize)
-		} else {
-			memstats.nmalloc += uint64(s.ref)
-			memstats.by_size[s.sizeclass].nmalloc += uint64(s.ref)
-			memstats.alloc += uint64(s.ref) * uint64(s.elemsize)
-		}
-	}
-	unlock(&mheap_.lock)
-
-	// Aggregate by size class.
-	smallfree := uint64(0)
-	memstats.nfree = mheap_.nlargefree
-	for i := 0; i < len(memstats.by_size); i++ {
-		memstats.nfree += mheap_.nsmallfree[i]
-		memstats.by_size[i].nfree = mheap_.nsmallfree[i]
-		memstats.by_size[i].nmalloc += mheap_.nsmallfree[i]
-		smallfree += uint64(mheap_.nsmallfree[i]) * uint64(class_to_size[i])
-	}
-	memstats.nfree += memstats.tinyallocs
-	memstats.nmalloc += memstats.nfree
-
-	// Calculate derived stats.
-	memstats.total_alloc = uint64(memstats.alloc) + uint64(mheap_.largefree) + smallfree
-	memstats.heap_alloc = memstats.alloc
-	memstats.heap_objects = memstats.nmalloc - memstats.nfree
-}
-
-//go:nowritebarrier
-func cachestats() {
-	for i := 0; ; i++ {
-		p := allp[i]
-		if p == nil {
-			break
-		}
-		c := p.mcache
-		if c == nil {
-			continue
-		}
-		purgecachedstats(c)
-	}
-}
-
-//go:nowritebarrier
-func flushallmcaches() {
-	for i := 0; ; i++ {
-		p := allp[i]
-		if p == nil {
-			break
-		}
-		c := p.mcache
-		if c == nil {
-			continue
-		}
-		mCache_ReleaseAll(c)
-		stackcache_clear(c)
-	}
-}
-
-//go:nosplit
-func purgecachedstats(c *mcache) {
-	// Protected by either heap or GC lock.
-	h := &mheap_
-	memstats.heap_live += uint64(c.local_cachealloc)
-	c.local_cachealloc = 0
-	if trace.enabled {
-		traceHeapAlloc()
-	}
-	memstats.heap_scan += uint64(c.local_scan)
-	c.local_scan = 0
-	memstats.tinyallocs += uint64(c.local_tinyallocs)
-	c.local_tinyallocs = 0
-	memstats.nlookup += uint64(c.local_nlookup)
-	c.local_nlookup = 0
-	h.largefree += uint64(c.local_largefree)
-	c.local_largefree = 0
-	h.nlargefree += uint64(c.local_nlargefree)
-	c.local_nlargefree = 0
-	for i := 0; i < len(c.local_nsmallfree); i++ {
-		h.nsmallfree[i] += uint64(c.local_nsmallfree[i])
-		c.local_nsmallfree[i] = 0
-	}
-}
-
-// Atomically increases a given *system* memory stat.  We are counting on this
-// stat never overflowing a uintptr, so this function must only be used for
-// system memory stats.
-//
-// The current implementation for little endian architectures is based on
-// xadduintptr(), which is less than ideal: xadd64() should really be used.
-// Using xadduintptr() is a stop-gap solution until arm supports xadd64() that
-// doesn't use locks.  (Locks are a problem as they require a valid G, which
-// restricts their useability.)
-//
-// A side-effect of using xadduintptr() is that we need to check for
-// overflow errors.
-//go:nosplit
-func mSysStatInc(sysStat *uint64, n uintptr) {
-	if _BigEndian != 0 {
-		xadd64(sysStat, int64(n))
-		return
-	}
-	if val := xadduintptr((*uintptr)(unsafe.Pointer(sysStat)), n); val < n {
-		print("runtime: stat overflow: val ", val, ", n ", n, "\n")
-		exit(2)
-	}
-}
-
-// Atomically decreases a given *system* memory stat.  Same comments as
-// mSysStatInc apply.
-//go:nosplit
-func mSysStatDec(sysStat *uint64, n uintptr) {
-	if _BigEndian != 0 {
-		xadd64(sysStat, -int64(n))
-		return
-	}
-	if val := xadduintptr((*uintptr)(unsafe.Pointer(sysStat)), uintptr(-int64(n))); val+n < n {
-		print("runtime: stat underflow: val ", val, ", n ", n, "\n")
-		exit(2)
-	}
-}
diff --git a/src/runtime/netpoll_solaris.go b/src/runtime/netpoll_solaris.go
deleted file mode 100644
index e4652d8..0000000
--- a/src/runtime/netpoll_solaris.go
+++ /dev/null
@@ -1,243 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-// Solaris runtime-integrated network poller.
-//
-// Solaris uses event ports for scalable network I/O. Event
-// ports are level-triggered, unlike epoll and kqueue which
-// can be configured in both level-triggered and edge-triggered
-// mode. Level triggering means we have to keep track of a few things
-// ourselves. After we receive an event for a file descriptor,
-// it's our responsibility to ask again to be notified for future
-// events for that descriptor. When doing this we must keep track of
-// what kind of events the goroutines are currently interested in,
-// for example a fd may be open both for reading and writing.
-//
-// A description of the high level operation of this code
-// follows. Networking code will get a file descriptor by some means
-// and will register it with the netpolling mechanism by a code path
-// that eventually calls runtime·netpollopen. runtime·netpollopen
-// calls port_associate with an empty event set. That means that we
-// will not receive any events at this point. The association needs
-// to be done at this early point because we need to process the I/O
-// readiness notification at some point in the future. If I/O becomes
-// ready when nobody is listening, when we finally care about it,
-// nobody will tell us anymore.
-//
-// Beside calling runtime·netpollopen, the networking code paths
-// will call runtime·netpollarm each time goroutines are interested
-// in doing network I/O. Because now we know what kind of I/O we
-// are interested in (reading/writing), we can call port_associate
-// passing the correct type of event set (POLLIN/POLLOUT). As we made
-// sure to have already associated the file descriptor with the port,
-// when we now call port_associate, we will unblock the main poller
-// loop (in runtime·netpoll) right away if the socket is actually
-// ready for I/O.
-//
-// The main poller loop runs in its own thread waiting for events
-// using port_getn. When an event happens, it will tell the scheduler
-// about it using runtime·netpollready. Besides doing this, it must
-// also re-associate the events that were not part of this current
-// notification with the file descriptor. Failing to do this would
-// mean each notification will prevent concurrent code using the
-// same file descriptor in parallel.
-//
-// The logic dealing with re-associations is encapsulated in
-// runtime·netpollupdate. This function takes care to associate the
-// descriptor only with the subset of events that were previously
-// part of the association, except the one that just happened. We
-// can't re-associate with that right away, because event ports
-// are level triggered so it would cause a busy loop. Instead, that
-// association is effected only by the runtime·netpollarm code path,
-// when Go code actually asks for I/O.
-//
-// The open and arming mechanisms are serialized using the lock
-// inside PollDesc. This is required because the netpoll loop runs
-// asynchonously in respect to other Go code and by the time we get
-// to call port_associate to update the association in the loop, the
-// file descriptor might have been closed and reopened already. The
-// lock allows runtime·netpollupdate to be called synchronously from
-// the loop thread while preventing other threads operating to the
-// same PollDesc, so once we unblock in the main loop, until we loop
-// again we know for sure we are always talking about the same file
-// descriptor and can safely access the data we want (the event set).
-
-//go:cgo_import_dynamic libc_port_create port_create "libc.so"
-//go:cgo_import_dynamic libc_port_associate port_associate "libc.so"
-//go:cgo_import_dynamic libc_port_dissociate port_dissociate "libc.so"
-//go:cgo_import_dynamic libc_port_getn port_getn "libc.so"
-
-//go:linkname libc_port_create libc_port_create
-//go:linkname libc_port_associate libc_port_associate
-//go:linkname libc_port_dissociate libc_port_dissociate
-//go:linkname libc_port_getn libc_port_getn
-
-var (
-	libc_port_create,
-	libc_port_associate,
-	libc_port_dissociate,
-	libc_port_getn libcFunc
-)
-
-func errno() int32 {
-	return *getg().m.perrno
-}
-
-func fcntl(fd, cmd int32, arg uintptr) int32 {
-	return int32(sysvicall3(&libc_fcntl, uintptr(fd), uintptr(cmd), arg))
-}
-
-func port_create() int32 {
-	return int32(sysvicall0(&libc_port_create))
-}
-
-func port_associate(port, source int32, object uintptr, events uint32, user uintptr) int32 {
-	return int32(sysvicall5(&libc_port_associate, uintptr(port), uintptr(source), object, uintptr(events), user))
-}
-
-func port_dissociate(port, source int32, object uintptr) int32 {
-	return int32(sysvicall3(&libc_port_dissociate, uintptr(port), uintptr(source), object))
-}
-
-func port_getn(port int32, evs *portevent, max uint32, nget *uint32, timeout *timespec) int32 {
-	return int32(sysvicall5(&libc_port_getn, uintptr(port), uintptr(unsafe.Pointer(evs)), uintptr(max), uintptr(unsafe.Pointer(nget)), uintptr(unsafe.Pointer(timeout))))
-}
-
-var portfd int32 = -1
-
-func netpollinit() {
-	portfd = port_create()
-	if portfd >= 0 {
-		fcntl(portfd, _F_SETFD, _FD_CLOEXEC)
-		return
-	}
-
-	print("netpollinit: failed to create port (", errno(), ")\n")
-	throw("netpollinit: failed to create port")
-}
-
-func netpollopen(fd uintptr, pd *pollDesc) int32 {
-	lock(&pd.lock)
-	// We don't register for any specific type of events yet, that's
-	// netpollarm's job. We merely ensure we call port_associate before
-	// asynchonous connect/accept completes, so when we actually want
-	// to do any I/O, the call to port_associate (from netpollarm,
-	// with the interested event set) will unblock port_getn right away
-	// because of the I/O readiness notification.
-	pd.user = 0
-	r := port_associate(portfd, _PORT_SOURCE_FD, fd, 0, uintptr(unsafe.Pointer(pd)))
-	unlock(&pd.lock)
-	return r
-}
-
-func netpollclose(fd uintptr) int32 {
-	return port_dissociate(portfd, _PORT_SOURCE_FD, fd)
-}
-
-// Updates the association with a new set of interested events. After
-// this call, port_getn will return one and only one event for that
-// particular descriptor, so this function needs to be called again.
-func netpollupdate(pd *pollDesc, set, clear uint32) {
-	if pd.closing {
-		return
-	}
-
-	old := pd.user
-	events := (old & ^clear) | set
-	if old == events {
-		return
-	}
-
-	if events != 0 && port_associate(portfd, _PORT_SOURCE_FD, pd.fd, events, uintptr(unsafe.Pointer(pd))) != 0 {
-		print("netpollupdate: failed to associate (", errno(), ")\n")
-		throw("netpollupdate: failed to associate")
-	}
-	pd.user = events
-}
-
-// subscribe the fd to the port such that port_getn will return one event.
-func netpollarm(pd *pollDesc, mode int) {
-	lock(&pd.lock)
-	switch mode {
-	case 'r':
-		netpollupdate(pd, _POLLIN, 0)
-	case 'w':
-		netpollupdate(pd, _POLLOUT, 0)
-	default:
-		throw("netpollarm: bad mode")
-	}
-	unlock(&pd.lock)
-}
-
-// netpolllasterr holds the last error code returned by port_getn to prevent log spamming
-var netpolllasterr int32
-
-// polls for ready network connections
-// returns list of goroutines that become runnable
-func netpoll(block bool) *g {
-	if portfd == -1 {
-		return nil
-	}
-
-	var wait *timespec
-	var zero timespec
-	if !block {
-		wait = &zero
-	}
-
-	var events [128]portevent
-retry:
-	var n uint32 = 1
-	if port_getn(portfd, &events[0], uint32(len(events)), &n, wait) < 0 {
-		if e := errno(); e != _EINTR && e != netpolllasterr {
-			netpolllasterr = e
-			print("runtime: port_getn on fd ", portfd, " failed with ", e, "\n")
-		}
-		goto retry
-	}
-
-	var gp guintptr
-	for i := 0; i < int(n); i++ {
-		ev := &events[i]
-
-		if ev.portev_events == 0 {
-			continue
-		}
-		pd := (*pollDesc)(unsafe.Pointer(ev.portev_user))
-
-		var mode, clear int32
-		if (ev.portev_events & (_POLLIN | _POLLHUP | _POLLERR)) != 0 {
-			mode += 'r'
-			clear |= _POLLIN
-		}
-		if (ev.portev_events & (_POLLOUT | _POLLHUP | _POLLERR)) != 0 {
-			mode += 'w'
-			clear |= _POLLOUT
-		}
-		// To effect edge-triggered events, we need to be sure to
-		// update our association with whatever events were not
-		// set with the event. For example if we are registered
-		// for POLLIN|POLLOUT, and we get POLLIN, besides waking
-		// the goroutine interested in POLLIN we have to not forget
-		// about the one interested in POLLOUT.
-		if clear != 0 {
-			lock(&pd.lock)
-			netpollupdate(pd, 0, uint32(clear))
-			unlock(&pd.lock)
-		}
-
-		if mode != 0 {
-			netpollready(&gp, pd, mode)
-		}
-	}
-
-	if block && gp == 0 {
-		goto retry
-	}
-	return gp.ptr()
-}
diff --git a/src/runtime/netpoll_stub.go b/src/runtime/netpoll_stub.go
deleted file mode 100644
index 09f64ad..0000000
--- a/src/runtime/netpoll_stub.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build plan9
-
-package runtime
-
-// Polls for ready network connections.
-// Returns list of goroutines that become runnable.
-func netpoll(block bool) (gp *g) {
-	// Implementation for platforms that do not support
-	// integrated network poller.
-	return
-}
-
-func netpollinited() bool {
-	return false
-}
diff --git a/src/runtime/netpoll_windows.go b/src/runtime/netpoll_windows.go
deleted file mode 100644
index 7e15cd2..0000000
--- a/src/runtime/netpoll_windows.go
+++ /dev/null
@@ -1,145 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import (
-	"unsafe"
-)
-
-const _DWORD_MAX = 0xffffffff
-
-const _INVALID_HANDLE_VALUE = ^uintptr(0)
-
-// net_op must be the same as beginning of net.operation. Keep these in sync.
-type net_op struct {
-	// used by windows
-	o overlapped
-	// used by netpoll
-	pd    *pollDesc
-	mode  int32
-	errno int32
-	qty   uint32
-}
-
-type overlappedEntry struct {
-	key      uintptr
-	op       *net_op // In reality it's *overlapped, but we cast it to *net_op anyway.
-	internal uintptr
-	qty      uint32
-}
-
-var iocphandle uintptr = _INVALID_HANDLE_VALUE // completion port io handle
-
-func netpollinit() {
-	iocphandle = uintptr(stdcall4(_CreateIoCompletionPort, _INVALID_HANDLE_VALUE, 0, 0, _DWORD_MAX))
-	if iocphandle == 0 {
-		println("netpoll: failed to create iocp handle (errno=", getlasterror(), ")")
-		throw("netpoll: failed to create iocp handle")
-	}
-}
-
-func netpollopen(fd uintptr, pd *pollDesc) int32 {
-	if stdcall4(_CreateIoCompletionPort, fd, iocphandle, 0, 0) == 0 {
-		return -int32(getlasterror())
-	}
-	return 0
-}
-
-func netpollclose(fd uintptr) int32 {
-	// nothing to do
-	return 0
-}
-
-func netpollarm(pd *pollDesc, mode int) {
-	throw("unused")
-}
-
-// Polls for completed network IO.
-// Returns list of goroutines that become runnable.
-func netpoll(block bool) *g {
-	var entries [64]overlappedEntry
-	var wait, qty, key, flags, n, i uint32
-	var errno int32
-	var op *net_op
-	var gp guintptr
-
-	mp := getg().m
-
-	if iocphandle == _INVALID_HANDLE_VALUE {
-		return nil
-	}
-	wait = 0
-	if block {
-		wait = _INFINITE
-	}
-retry:
-	if _GetQueuedCompletionStatusEx != nil {
-		n = uint32(len(entries) / int(gomaxprocs))
-		if n < 8 {
-			n = 8
-		}
-		if block {
-			mp.blocked = true
-		}
-		if stdcall6(_GetQueuedCompletionStatusEx, iocphandle, uintptr(unsafe.Pointer(&entries[0])), uintptr(n), uintptr(unsafe.Pointer(&n)), uintptr(wait), 0) == 0 {
-			mp.blocked = false
-			errno = int32(getlasterror())
-			if !block && errno == _WAIT_TIMEOUT {
-				return nil
-			}
-			println("netpoll: GetQueuedCompletionStatusEx failed (errno=", errno, ")")
-			throw("netpoll: GetQueuedCompletionStatusEx failed")
-		}
-		mp.blocked = false
-		for i = 0; i < n; i++ {
-			op = entries[i].op
-			errno = 0
-			qty = 0
-			if stdcall5(_WSAGetOverlappedResult, op.pd.fd, uintptr(unsafe.Pointer(op)), uintptr(unsafe.Pointer(&qty)), 0, uintptr(unsafe.Pointer(&flags))) == 0 {
-				errno = int32(getlasterror())
-			}
-			handlecompletion(&gp, op, errno, qty)
-		}
-	} else {
-		op = nil
-		errno = 0
-		qty = 0
-		if block {
-			mp.blocked = true
-		}
-		if stdcall5(_GetQueuedCompletionStatus, iocphandle, uintptr(unsafe.Pointer(&qty)), uintptr(unsafe.Pointer(&key)), uintptr(unsafe.Pointer(&op)), uintptr(wait)) == 0 {
-			mp.blocked = false
-			errno = int32(getlasterror())
-			if !block && errno == _WAIT_TIMEOUT {
-				return nil
-			}
-			if op == nil {
-				println("netpoll: GetQueuedCompletionStatus failed (errno=", errno, ")")
-				throw("netpoll: GetQueuedCompletionStatus failed")
-			}
-			// dequeued failed IO packet, so report that
-		}
-		mp.blocked = false
-		handlecompletion(&gp, op, errno, qty)
-	}
-	if block && gp == 0 {
-		goto retry
-	}
-	return gp.ptr()
-}
-
-func handlecompletion(gpp *guintptr, op *net_op, errno int32, qty uint32) {
-	if op == nil {
-		throw("netpoll: GetQueuedCompletionStatus returned op == nil")
-	}
-	mode := op.mode
-	if mode != 'r' && mode != 'w' {
-		println("netpoll: GetQueuedCompletionStatus returned invalid mode=", mode)
-		throw("netpoll: GetQueuedCompletionStatus returned invalid mode")
-	}
-	op.errno = errno
-	op.qty = qty
-	netpollready(gpp, op.pd, mode)
-}
diff --git a/src/runtime/noasm.go b/src/runtime/noasm.go
deleted file mode 100644
index 9a6dbee..0000000
--- a/src/runtime/noasm.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Routines that are implemented in assembly in asm_{amd64,386,arm,arm64}.s
-
-// +build ppc64 ppc64le
-
-package runtime
-
-import _ "unsafe" // for go:linkname
-
-func cmpstring(s1, s2 string) int {
-	l := len(s1)
-	if len(s2) < l {
-		l = len(s2)
-	}
-	for i := 0; i < l; i++ {
-		c1, c2 := s1[i], s2[i]
-		if c1 < c2 {
-			return -1
-		}
-		if c1 > c2 {
-			return +1
-		}
-	}
-	if len(s1) < len(s2) {
-		return -1
-	}
-	if len(s1) > len(s2) {
-		return +1
-	}
-	return 0
-}
-
-//go:linkname bytes_Compare bytes.Compare
-func bytes_Compare(s1, s2 []byte) int {
-	l := len(s1)
-	if len(s2) < l {
-		l = len(s2)
-	}
-	for i := 0; i < l; i++ {
-		c1, c2 := s1[i], s2[i]
-		if c1 < c2 {
-			return -1
-		}
-		if c1 > c2 {
-			return +1
-		}
-	}
-	if len(s1) < len(s2) {
-		return -1
-	}
-	if len(s1) > len(s2) {
-		return +1
-	}
-	return 0
-}
diff --git a/src/runtime/norace_linux_test.go b/src/runtime/norace_linux_test.go
deleted file mode 100644
index bbf9d0b..0000000
--- a/src/runtime/norace_linux_test.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// The file contains tests that can not run under race detector for some reason.
-// +build !race
-
-package runtime_test
-
-import (
-	"runtime"
-	"testing"
-	"time"
-	"unsafe"
-)
-
-var newOSProcDone bool
-
-//go:nosplit
-func newOSProcCreated() {
-	newOSProcDone = true
-}
-
-// Can't be run with -race because it inserts calls into newOSProcCreated()
-// that require a valid G/M.
-func TestNewOSProc0(t *testing.T) {
-	runtime.NewOSProc0(0x800000, unsafe.Pointer(runtime.FuncPC(newOSProcCreated)))
-	check := time.NewTicker(100 * time.Millisecond)
-	defer check.Stop()
-	end := time.After(5 * time.Second)
-	for {
-		select {
-		case <-check.C:
-			if newOSProcDone {
-				return
-			}
-		case <-end:
-			t.Fatalf("couldn't create new OS process")
-		}
-	}
-}
diff --git a/src/runtime/os1_darwin.go b/src/runtime/os1_darwin.go
deleted file mode 100644
index e070229..0000000
--- a/src/runtime/os1_darwin.go
+++ /dev/null
@@ -1,481 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-//extern SigTabTT runtime·sigtab[];
-
-var sigset_all = ^uint32(0)
-
-func unimplemented(name string) {
-	println(name, "not implemented")
-	*(*int)(unsafe.Pointer(uintptr(1231))) = 1231
-}
-
-//go:nosplit
-func semawakeup(mp *m) {
-	mach_semrelease(uint32(mp.waitsema))
-}
-
-//go:nosplit
-func semacreate() uintptr {
-	var x uintptr
-	systemstack(func() {
-		x = uintptr(mach_semcreate())
-	})
-	return x
-}
-
-// BSD interface for threading.
-func osinit() {
-	// bsdthread_register delayed until end of goenvs so that we
-	// can look at the environment first.
-
-	ncpu = getncpu()
-}
-
-func getncpu() int32 {
-	// Use sysctl to fetch hw.ncpu.
-	mib := [2]uint32{6, 3}
-	out := uint32(0)
-	nout := unsafe.Sizeof(out)
-	ret := sysctl(&mib[0], 2, (*byte)(unsafe.Pointer(&out)), &nout, nil, 0)
-	if ret >= 0 && int32(out) > 0 {
-		return int32(out)
-	}
-	return 1
-}
-
-var urandom_dev = []byte("/dev/urandom\x00")
-
-//go:nosplit
-func getRandomData(r []byte) {
-	fd := open(&urandom_dev[0], 0 /* O_RDONLY */, 0)
-	n := read(fd, unsafe.Pointer(&r[0]), int32(len(r)))
-	closefd(fd)
-	extendRandom(r, int(n))
-}
-
-func goenvs() {
-	goenvs_unix()
-
-	// Register our thread-creation callback (see sys_darwin_{amd64,386}.s)
-	// but only if we're not using cgo.  If we are using cgo we need
-	// to let the C pthread library install its own thread-creation callback.
-	if !iscgo {
-		if bsdthread_register() != 0 {
-			if gogetenv("DYLD_INSERT_LIBRARIES") != "" {
-				throw("runtime: bsdthread_register error (unset DYLD_INSERT_LIBRARIES)")
-			}
-			throw("runtime: bsdthread_register error")
-		}
-	}
-}
-
-// May run with m.p==nil, so write barriers are not allowed.
-//go:nowritebarrier
-func newosproc(mp *m, stk unsafe.Pointer) {
-	mp.tls[0] = uintptr(mp.id) // so 386 asm can find it
-	if false {
-		print("newosproc stk=", stk, " m=", mp, " g=", mp.g0, " id=", mp.id, "/", int(mp.tls[0]), " ostk=", &mp, "\n")
-	}
-
-	var oset uint32
-	sigprocmask(_SIG_SETMASK, &sigset_all, &oset)
-	errno := bsdthread_create(stk, unsafe.Pointer(mp), funcPC(mstart))
-	sigprocmask(_SIG_SETMASK, &oset, nil)
-
-	if errno < 0 {
-		print("runtime: failed to create new OS thread (have ", mcount(), " already; errno=", -errno, ")\n")
-		throw("runtime.newosproc")
-	}
-}
-
-// newosproc0 is a version of newosproc that can be called before the runtime
-// is initialized.
-//
-// As Go uses bsdthread_register when running without cgo, this function is
-// not safe to use after initialization as it does not pass an M as fnarg.
-//
-//go:nosplit
-func newosproc0(stacksize uintptr, fn unsafe.Pointer, fnarg uintptr) {
-	stack := sysAlloc(stacksize, &memstats.stacks_sys)
-	if stack == nil {
-		write(2, unsafe.Pointer(&failallocatestack[0]), int32(len(failallocatestack)))
-		exit(1)
-	}
-	stk := unsafe.Pointer(uintptr(stack) + stacksize)
-
-	var oset uint32
-	sigprocmask(_SIG_SETMASK, &sigset_all, &oset)
-	errno := bsdthread_create(stk, fn, fnarg)
-	sigprocmask(_SIG_SETMASK, &oset, nil)
-
-	if errno < 0 {
-		write(2, unsafe.Pointer(&failthreadcreate[0]), int32(len(failthreadcreate)))
-		exit(1)
-	}
-}
-
-var failallocatestack = []byte("runtime: failed to allocate stack for the new OS thread\n")
-var failthreadcreate = []byte("runtime: failed to create new OS thread\n")
-
-// Called to initialize a new m (including the bootstrap m).
-// Called on the parent thread (main thread in case of bootstrap), can allocate memory.
-func mpreinit(mp *m) {
-	mp.gsignal = malg(32 * 1024) // OS X wants >= 8K
-	mp.gsignal.m = mp
-}
-
-func msigsave(mp *m) {
-	smask := (*uint32)(unsafe.Pointer(&mp.sigmask))
-	if unsafe.Sizeof(*smask) > unsafe.Sizeof(mp.sigmask) {
-		throw("insufficient storage for signal mask")
-	}
-	sigprocmask(_SIG_SETMASK, nil, smask)
-}
-
-// Called to initialize a new m (including the bootstrap m).
-// Called on the new thread, can not allocate memory.
-func minit() {
-	// Initialize signal handling.
-	_g_ := getg()
-	signalstack(&_g_.m.gsignal.stack)
-
-	// restore signal mask from m.sigmask and unblock essential signals
-	nmask := *(*uint32)(unsafe.Pointer(&_g_.m.sigmask))
-	for i := range sigtable {
-		if sigtable[i].flags&_SigUnblock != 0 {
-			nmask &^= 1 << (uint32(i) - 1)
-		}
-	}
-	sigprocmask(_SIG_SETMASK, &nmask, nil)
-}
-
-// Called from dropm to undo the effect of an minit.
-func unminit() {
-	_g_ := getg()
-	smask := (*uint32)(unsafe.Pointer(&_g_.m.sigmask))
-	sigprocmask(_SIG_SETMASK, smask, nil)
-	signalstack(nil)
-}
-
-// Mach IPC, to get at semaphores
-// Definitions are in /usr/include/mach on a Mac.
-
-func macherror(r int32, fn string) {
-	print("mach error ", fn, ": ", r, "\n")
-	throw("mach error")
-}
-
-const _DebugMach = false
-
-var zerondr machndr
-
-func mach_msgh_bits(a, b uint32) uint32 {
-	return a | b<<8
-}
-
-func mach_msg(h *machheader, op int32, send_size, rcv_size, rcv_name, timeout, notify uint32) int32 {
-	// TODO: Loop on interrupt.
-	return mach_msg_trap(unsafe.Pointer(h), op, send_size, rcv_size, rcv_name, timeout, notify)
-}
-
-// Mach RPC (MIG)
-const (
-	_MinMachMsg = 48
-	_MachReply  = 100
-)
-
-type codemsg struct {
-	h    machheader
-	ndr  machndr
-	code int32
-}
-
-func machcall(h *machheader, maxsize int32, rxsize int32) int32 {
-	_g_ := getg()
-	port := _g_.m.machport
-	if port == 0 {
-		port = mach_reply_port()
-		_g_.m.machport = port
-	}
-
-	h.msgh_bits |= mach_msgh_bits(_MACH_MSG_TYPE_COPY_SEND, _MACH_MSG_TYPE_MAKE_SEND_ONCE)
-	h.msgh_local_port = port
-	h.msgh_reserved = 0
-	id := h.msgh_id
-
-	if _DebugMach {
-		p := (*[10000]unsafe.Pointer)(unsafe.Pointer(h))
-		print("send:\t")
-		var i uint32
-		for i = 0; i < h.msgh_size/uint32(unsafe.Sizeof(p[0])); i++ {
-			print(" ", p[i])
-			if i%8 == 7 {
-				print("\n\t")
-			}
-		}
-		if i%8 != 0 {
-			print("\n")
-		}
-	}
-	ret := mach_msg(h, _MACH_SEND_MSG|_MACH_RCV_MSG, h.msgh_size, uint32(maxsize), port, 0, 0)
-	if ret != 0 {
-		if _DebugMach {
-			print("mach_msg error ", ret, "\n")
-		}
-		return ret
-	}
-	if _DebugMach {
-		p := (*[10000]unsafe.Pointer)(unsafe.Pointer(h))
-		var i uint32
-		for i = 0; i < h.msgh_size/uint32(unsafe.Sizeof(p[0])); i++ {
-			print(" ", p[i])
-			if i%8 == 7 {
-				print("\n\t")
-			}
-		}
-		if i%8 != 0 {
-			print("\n")
-		}
-	}
-	if h.msgh_id != id+_MachReply {
-		if _DebugMach {
-			print("mach_msg _MachReply id mismatch ", h.msgh_id, " != ", id+_MachReply, "\n")
-		}
-		return -303 // MIG_REPLY_MISMATCH
-	}
-	// Look for a response giving the return value.
-	// Any call can send this back with an error,
-	// and some calls only have return values so they
-	// send it back on success too.  I don't quite see how
-	// you know it's one of these and not the full response
-	// format, so just look if the message is right.
-	c := (*codemsg)(unsafe.Pointer(h))
-	if uintptr(h.msgh_size) == unsafe.Sizeof(*c) && h.msgh_bits&_MACH_MSGH_BITS_COMPLEX == 0 {
-		if _DebugMach {
-			print("mig result ", c.code, "\n")
-		}
-		return c.code
-	}
-	if h.msgh_size != uint32(rxsize) {
-		if _DebugMach {
-			print("mach_msg _MachReply size mismatch ", h.msgh_size, " != ", rxsize, "\n")
-		}
-		return -307 // MIG_ARRAY_TOO_LARGE
-	}
-	return 0
-}
-
-// Semaphores!
-
-const (
-	tmach_semcreate = 3418
-	rmach_semcreate = tmach_semcreate + _MachReply
-
-	tmach_semdestroy = 3419
-	rmach_semdestroy = tmach_semdestroy + _MachReply
-
-	_KERN_ABORTED             = 14
-	_KERN_OPERATION_TIMED_OUT = 49
-)
-
-type tmach_semcreatemsg struct {
-	h      machheader
-	ndr    machndr
-	policy int32
-	value  int32
-}
-
-type rmach_semcreatemsg struct {
-	h         machheader
-	body      machbody
-	semaphore machport
-}
-
-type tmach_semdestroymsg struct {
-	h         machheader
-	body      machbody
-	semaphore machport
-}
-
-func mach_semcreate() uint32 {
-	var m [256]uint8
-	tx := (*tmach_semcreatemsg)(unsafe.Pointer(&m))
-	rx := (*rmach_semcreatemsg)(unsafe.Pointer(&m))
-
-	tx.h.msgh_bits = 0
-	tx.h.msgh_size = uint32(unsafe.Sizeof(*tx))
-	tx.h.msgh_remote_port = mach_task_self()
-	tx.h.msgh_id = tmach_semcreate
-	tx.ndr = zerondr
-
-	tx.policy = 0 // 0 = SYNC_POLICY_FIFO
-	tx.value = 0
-
-	for {
-		r := machcall(&tx.h, int32(unsafe.Sizeof(m)), int32(unsafe.Sizeof(*rx)))
-		if r == 0 {
-			break
-		}
-		if r == _KERN_ABORTED { // interrupted
-			continue
-		}
-		macherror(r, "semaphore_create")
-	}
-	if rx.body.msgh_descriptor_count != 1 {
-		unimplemented("mach_semcreate desc count")
-	}
-	return rx.semaphore.name
-}
-
-func mach_semdestroy(sem uint32) {
-	var m [256]uint8
-	tx := (*tmach_semdestroymsg)(unsafe.Pointer(&m))
-
-	tx.h.msgh_bits = _MACH_MSGH_BITS_COMPLEX
-	tx.h.msgh_size = uint32(unsafe.Sizeof(*tx))
-	tx.h.msgh_remote_port = mach_task_self()
-	tx.h.msgh_id = tmach_semdestroy
-	tx.body.msgh_descriptor_count = 1
-	tx.semaphore.name = sem
-	tx.semaphore.disposition = _MACH_MSG_TYPE_MOVE_SEND
-	tx.semaphore._type = 0
-
-	for {
-		r := machcall(&tx.h, int32(unsafe.Sizeof(m)), 0)
-		if r == 0 {
-			break
-		}
-		if r == _KERN_ABORTED { // interrupted
-			continue
-		}
-		macherror(r, "semaphore_destroy")
-	}
-}
-
-// The other calls have simple system call traps in sys_darwin_{amd64,386}.s
-
-func mach_semaphore_wait(sema uint32) int32
-func mach_semaphore_timedwait(sema, sec, nsec uint32) int32
-func mach_semaphore_signal(sema uint32) int32
-func mach_semaphore_signal_all(sema uint32) int32
-
-func semasleep1(ns int64) int32 {
-	_g_ := getg()
-
-	if ns >= 0 {
-		var nsecs int32
-		secs := timediv(ns, 1000000000, &nsecs)
-		r := mach_semaphore_timedwait(uint32(_g_.m.waitsema), uint32(secs), uint32(nsecs))
-		if r == _KERN_ABORTED || r == _KERN_OPERATION_TIMED_OUT {
-			return -1
-		}
-		if r != 0 {
-			macherror(r, "semaphore_wait")
-		}
-		return 0
-	}
-
-	for {
-		r := mach_semaphore_wait(uint32(_g_.m.waitsema))
-		if r == 0 {
-			break
-		}
-		if r == _KERN_ABORTED { // interrupted
-			continue
-		}
-		macherror(r, "semaphore_wait")
-	}
-	return 0
-}
-
-//go:nosplit
-func semasleep(ns int64) int32 {
-	var r int32
-	systemstack(func() {
-		r = semasleep1(ns)
-	})
-	return r
-}
-
-//go:nosplit
-func mach_semrelease(sem uint32) {
-	for {
-		r := mach_semaphore_signal(sem)
-		if r == 0 {
-			break
-		}
-		if r == _KERN_ABORTED { // interrupted
-			continue
-		}
-
-		// mach_semrelease must be completely nosplit,
-		// because it is called from Go code.
-		// If we're going to die, start that process on the system stack
-		// to avoid a Go stack split.
-		systemstack(func() { macherror(r, "semaphore_signal") })
-	}
-}
-
-//go:nosplit
-func osyield() {
-	usleep(1)
-}
-
-func memlimit() uintptr {
-	// NOTE(rsc): Could use getrlimit here,
-	// like on FreeBSD or Linux, but Darwin doesn't enforce
-	// ulimit -v, so it's unclear why we'd try to stay within
-	// the limit.
-	return 0
-}
-
-func setsig(i int32, fn uintptr, restart bool) {
-	var sa sigactiont
-	memclr(unsafe.Pointer(&sa), unsafe.Sizeof(sa))
-	sa.sa_flags = _SA_SIGINFO | _SA_ONSTACK
-	if restart {
-		sa.sa_flags |= _SA_RESTART
-	}
-	sa.sa_mask = ^uint32(0)
-	sa.sa_tramp = unsafe.Pointer(funcPC(sigtramp)) // runtime·sigtramp's job is to call into real handler
-	*(*uintptr)(unsafe.Pointer(&sa.__sigaction_u)) = fn
-	sigaction(uint32(i), &sa, nil)
-}
-
-func setsigstack(i int32) {
-	throw("setsigstack")
-}
-
-func getsig(i int32) uintptr {
-	var sa sigactiont
-	memclr(unsafe.Pointer(&sa), unsafe.Sizeof(sa))
-	sigaction(uint32(i), nil, &sa)
-	return *(*uintptr)(unsafe.Pointer(&sa.__sigaction_u))
-}
-
-func signalstack(s *stack) {
-	var st stackt
-	if s == nil {
-		st.ss_flags = _SS_DISABLE
-	} else {
-		st.ss_sp = (*byte)(unsafe.Pointer(s.lo))
-		st.ss_size = s.hi - s.lo
-		st.ss_flags = 0
-	}
-	sigaltstack(&st, nil)
-}
-
-func updatesigmask(m sigmask) {
-	sigprocmask(_SIG_SETMASK, &m[0], nil)
-}
-
-func unblocksig(sig int32) {
-	mask := uint32(1) << (uint32(sig) - 1)
-	sigprocmask(_SIG_UNBLOCK, &mask, nil)
-}
diff --git a/src/runtime/os1_dragonfly.go b/src/runtime/os1_dragonfly.go
deleted file mode 100644
index f96c78c..0000000
--- a/src/runtime/os1_dragonfly.go
+++ /dev/null
@@ -1,247 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-// From DragonFly's <sys/sysctl.h>
-const (
-	_CTL_HW  = 6
-	_HW_NCPU = 3
-)
-
-var sigset_all = sigset{[4]uint32{^uint32(0), ^uint32(0), ^uint32(0), ^uint32(0)}}
-
-func getncpu() int32 {
-	mib := [2]uint32{_CTL_HW, _HW_NCPU}
-	out := uint32(0)
-	nout := unsafe.Sizeof(out)
-	ret := sysctl(&mib[0], 2, (*byte)(unsafe.Pointer(&out)), &nout, nil, 0)
-	if ret >= 0 {
-		return int32(out)
-	}
-	return 1
-}
-
-//go:nosplit
-func futexsleep(addr *uint32, val uint32, ns int64) {
-	systemstack(func() {
-		futexsleep1(addr, val, ns)
-	})
-}
-
-func futexsleep1(addr *uint32, val uint32, ns int64) {
-	var timeout int32
-	if ns >= 0 {
-		// The timeout is specified in microseconds - ensure that we
-		// do not end up dividing to zero, which would put us to sleep
-		// indefinitely...
-		timeout = timediv(ns, 1000, nil)
-		if timeout == 0 {
-			timeout = 1
-		}
-	}
-
-	// sys_umtx_sleep will return EWOULDBLOCK (EAGAIN) when the timeout
-	// expires or EBUSY if the mutex value does not match.
-	ret := sys_umtx_sleep(addr, int32(val), timeout)
-	if ret >= 0 || ret == -_EINTR || ret == -_EAGAIN || ret == -_EBUSY {
-		return
-	}
-
-	print("umtx_sleep addr=", addr, " val=", val, " ret=", ret, "\n")
-	*(*int32)(unsafe.Pointer(uintptr(0x1005))) = 0x1005
-}
-
-//go:nosplit
-func futexwakeup(addr *uint32, cnt uint32) {
-	ret := sys_umtx_wakeup(addr, int32(cnt))
-	if ret >= 0 {
-		return
-	}
-
-	systemstack(func() {
-		print("umtx_wake_addr=", addr, " ret=", ret, "\n")
-		*(*int32)(unsafe.Pointer(uintptr(0x1006))) = 0x1006
-	})
-}
-
-func lwp_start(uintptr)
-
-// May run with m.p==nil, so write barriers are not allowed.
-//go:nowritebarrier
-func newosproc(mp *m, stk unsafe.Pointer) {
-	if false {
-		print("newosproc stk=", stk, " m=", mp, " g=", mp.g0, " lwp_start=", funcPC(lwp_start), " id=", mp.id, "/", mp.tls[0], " ostk=", &mp, "\n")
-	}
-
-	var oset sigset
-	sigprocmask(_SIG_SETMASK, &sigset_all, &oset)
-
-	params := lwpparams{
-		start_func: funcPC(lwp_start),
-		arg:        unsafe.Pointer(mp),
-		stack:      uintptr(stk),
-		tid1:       unsafe.Pointer(&mp.procid),
-		tid2:       nil,
-	}
-
-	mp.tls[0] = uintptr(mp.id) // XXX so 386 asm can find it
-
-	lwp_create(&params)
-	sigprocmask(_SIG_SETMASK, &oset, nil)
-}
-
-func osinit() {
-	ncpu = getncpu()
-}
-
-var urandom_dev = []byte("/dev/urandom\x00")
-
-//go:nosplit
-func getRandomData(r []byte) {
-	fd := open(&urandom_dev[0], 0 /* O_RDONLY */, 0)
-	n := read(fd, unsafe.Pointer(&r[0]), int32(len(r)))
-	closefd(fd)
-	extendRandom(r, int(n))
-}
-
-func goenvs() {
-	goenvs_unix()
-}
-
-// Called to initialize a new m (including the bootstrap m).
-// Called on the parent thread (main thread in case of bootstrap), can allocate memory.
-func mpreinit(mp *m) {
-	mp.gsignal = malg(32 * 1024)
-	mp.gsignal.m = mp
-}
-
-func msigsave(mp *m) {
-	smask := (*sigset)(unsafe.Pointer(&mp.sigmask))
-	if unsafe.Sizeof(*smask) > unsafe.Sizeof(mp.sigmask) {
-		throw("insufficient storage for signal mask")
-	}
-	sigprocmask(_SIG_SETMASK, nil, smask)
-}
-
-// Called to initialize a new m (including the bootstrap m).
-// Called on the new thread, can not allocate memory.
-func minit() {
-	_g_ := getg()
-
-	// m.procid is a uint64, but lwp_start writes an int32. Fix it up.
-	_g_.m.procid = uint64(*(*int32)(unsafe.Pointer(&_g_.m.procid)))
-
-	// Initialize signal handling
-	signalstack(&_g_.m.gsignal.stack)
-
-	// restore signal mask from m.sigmask and unblock essential signals
-	nmask := *(*sigset)(unsafe.Pointer(&_g_.m.sigmask))
-	for i := range sigtable {
-		if sigtable[i].flags&_SigUnblock != 0 {
-			nmask.__bits[(i-1)/32] &^= 1 << ((uint32(i) - 1) & 31)
-		}
-	}
-	sigprocmask(_SIG_SETMASK, &nmask, nil)
-}
-
-// Called from dropm to undo the effect of an minit.
-func unminit() {
-	_g_ := getg()
-	smask := (*sigset)(unsafe.Pointer(&_g_.m.sigmask))
-	sigprocmask(_SIG_SETMASK, smask, nil)
-	signalstack(nil)
-}
-
-func memlimit() uintptr {
-	/*
-		                TODO: Convert to Go when something actually uses the result.
-
-				Rlimit rl;
-				extern byte runtime·text[], runtime·end[];
-				uintptr used;
-
-				if(runtime·getrlimit(RLIMIT_AS, &rl) != 0)
-					return 0;
-				if(rl.rlim_cur >= 0x7fffffff)
-					return 0;
-
-				// Estimate our VM footprint excluding the heap.
-				// Not an exact science: use size of binary plus
-				// some room for thread stacks.
-				used = runtime·end - runtime·text + (64<<20);
-				if(used >= rl.rlim_cur)
-					return 0;
-
-				// If there's not at least 16 MB left, we're probably
-				// not going to be able to do much.  Treat as no limit.
-				rl.rlim_cur -= used;
-				if(rl.rlim_cur < (16<<20))
-					return 0;
-
-				return rl.rlim_cur - used;
-	*/
-	return 0
-}
-
-func sigtramp()
-
-type sigactiont struct {
-	sa_sigaction uintptr
-	sa_flags     int32
-	sa_mask      sigset
-}
-
-func setsig(i int32, fn uintptr, restart bool) {
-	var sa sigactiont
-	sa.sa_flags = _SA_SIGINFO | _SA_ONSTACK
-	if restart {
-		sa.sa_flags |= _SA_RESTART
-	}
-	sa.sa_mask = sigset_all
-	if fn == funcPC(sighandler) {
-		fn = funcPC(sigtramp)
-	}
-	sa.sa_sigaction = fn
-	sigaction(i, &sa, nil)
-}
-
-func setsigstack(i int32) {
-	throw("setsigstack")
-}
-
-func getsig(i int32) uintptr {
-	var sa sigactiont
-	sigaction(i, nil, &sa)
-	if sa.sa_sigaction == funcPC(sigtramp) {
-		return funcPC(sighandler)
-	}
-	return sa.sa_sigaction
-}
-
-func signalstack(s *stack) {
-	var st sigaltstackt
-	if s == nil {
-		st.ss_flags = _SS_DISABLE
-	} else {
-		st.ss_sp = s.lo
-		st.ss_size = s.hi - s.lo
-		st.ss_flags = 0
-	}
-	sigaltstack(&st, nil)
-}
-
-func updatesigmask(m sigmask) {
-	var mask sigset
-	copy(mask.__bits[:], m[:])
-	sigprocmask(_SIG_SETMASK, &mask, nil)
-}
-
-func unblocksig(sig int32) {
-	var mask sigset
-	mask.__bits[(sig-1)/32] |= 1 << ((uint32(sig) - 1) & 31)
-	sigprocmask(_SIG_UNBLOCK, &mask, nil)
-}
diff --git a/src/runtime/os1_freebsd.go b/src/runtime/os1_freebsd.go
deleted file mode 100644
index f3519f3..0000000
--- a/src/runtime/os1_freebsd.go
+++ /dev/null
@@ -1,249 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-// From FreeBSD's <sys/sysctl.h>
-const (
-	_CTL_HW  = 6
-	_HW_NCPU = 3
-)
-
-var sigset_all = sigset{[4]uint32{^uint32(0), ^uint32(0), ^uint32(0), ^uint32(0)}}
-
-func getncpu() int32 {
-	mib := [2]uint32{_CTL_HW, _HW_NCPU}
-	out := uint32(0)
-	nout := unsafe.Sizeof(out)
-	ret := sysctl(&mib[0], 2, (*byte)(unsafe.Pointer(&out)), &nout, nil, 0)
-	if ret >= 0 {
-		return int32(out)
-	}
-	return 1
-}
-
-// FreeBSD's umtx_op syscall is effectively the same as Linux's futex, and
-// thus the code is largely similar. See Linux implementation
-// and lock_futex.go for comments.
-
-//go:nosplit
-func futexsleep(addr *uint32, val uint32, ns int64) {
-	systemstack(func() {
-		futexsleep1(addr, val, ns)
-	})
-}
-
-func futexsleep1(addr *uint32, val uint32, ns int64) {
-	var tsp *timespec
-	if ns >= 0 {
-		var ts timespec
-		ts.tv_nsec = 0
-		ts.set_sec(int64(timediv(ns, 1000000000, (*int32)(unsafe.Pointer(&ts.tv_nsec)))))
-		tsp = &ts
-	}
-	ret := sys_umtx_op(addr, _UMTX_OP_WAIT_UINT_PRIVATE, val, nil, tsp)
-	if ret >= 0 || ret == -_EINTR {
-		return
-	}
-	print("umtx_wait addr=", addr, " val=", val, " ret=", ret, "\n")
-	*(*int32)(unsafe.Pointer(uintptr(0x1005))) = 0x1005
-}
-
-//go:nosplit
-func futexwakeup(addr *uint32, cnt uint32) {
-	ret := sys_umtx_op(addr, _UMTX_OP_WAKE_PRIVATE, cnt, nil, nil)
-	if ret >= 0 {
-		return
-	}
-
-	systemstack(func() {
-		print("umtx_wake_addr=", addr, " ret=", ret, "\n")
-	})
-}
-
-func thr_start()
-
-// May run with m.p==nil, so write barriers are not allowed.
-//go:nowritebarrier
-func newosproc(mp *m, stk unsafe.Pointer) {
-	if false {
-		print("newosproc stk=", stk, " m=", mp, " g=", mp.g0, " thr_start=", funcPC(thr_start), " id=", mp.id, "/", mp.tls[0], " ostk=", &mp, "\n")
-	}
-
-	// NOTE(rsc): This code is confused. stackbase is the top of the stack
-	// and is equal to stk. However, it's working, so I'm not changing it.
-	param := thrparam{
-		start_func: funcPC(thr_start),
-		arg:        unsafe.Pointer(mp),
-		stack_base: mp.g0.stack.hi,
-		stack_size: uintptr(stk) - mp.g0.stack.hi,
-		child_tid:  unsafe.Pointer(&mp.procid),
-		parent_tid: nil,
-		tls_base:   unsafe.Pointer(&mp.tls[0]),
-		tls_size:   unsafe.Sizeof(mp.tls),
-	}
-	mp.tls[0] = uintptr(mp.id) // so 386 asm can find it
-
-	var oset sigset
-	sigprocmask(_SIG_SETMASK, &sigset_all, &oset)
-	thr_new(&param, int32(unsafe.Sizeof(param)))
-	sigprocmask(_SIG_SETMASK, &oset, nil)
-}
-
-func osinit() {
-	ncpu = getncpu()
-}
-
-var urandom_dev = []byte("/dev/urandom\x00")
-
-//go:nosplit
-func getRandomData(r []byte) {
-	fd := open(&urandom_dev[0], 0 /* O_RDONLY */, 0)
-	n := read(fd, unsafe.Pointer(&r[0]), int32(len(r)))
-	closefd(fd)
-	extendRandom(r, int(n))
-}
-
-func goenvs() {
-	goenvs_unix()
-}
-
-// Called to initialize a new m (including the bootstrap m).
-// Called on the parent thread (main thread in case of bootstrap), can allocate memory.
-func mpreinit(mp *m) {
-	mp.gsignal = malg(32 * 1024)
-	mp.gsignal.m = mp
-}
-
-func msigsave(mp *m) {
-	smask := (*sigset)(unsafe.Pointer(&mp.sigmask))
-	if unsafe.Sizeof(*smask) > unsafe.Sizeof(mp.sigmask) {
-		throw("insufficient storage for signal mask")
-	}
-	sigprocmask(_SIG_SETMASK, nil, smask)
-}
-
-// Called to initialize a new m (including the bootstrap m).
-// Called on the new thread, can not allocate memory.
-func minit() {
-	_g_ := getg()
-
-	// m.procid is a uint64, but thr_new writes a uint32 on 32-bit systems.
-	// Fix it up. (Only matters on big-endian, but be clean anyway.)
-	if ptrSize == 4 {
-		_g_.m.procid = uint64(*(*uint32)(unsafe.Pointer(&_g_.m.procid)))
-	}
-
-	// Initialize signal handling.
-	signalstack(&_g_.m.gsignal.stack)
-
-	// restore signal mask from m.sigmask and unblock essential signals
-	nmask := *(*sigset)(unsafe.Pointer(&_g_.m.sigmask))
-	for i := range sigtable {
-		if sigtable[i].flags&_SigUnblock != 0 {
-			nmask.__bits[(i-1)/32] &^= 1 << ((uint32(i) - 1) & 31)
-		}
-	}
-	sigprocmask(_SIG_SETMASK, &nmask, nil)
-}
-
-// Called from dropm to undo the effect of an minit.
-func unminit() {
-	_g_ := getg()
-	smask := (*sigset)(unsafe.Pointer(&_g_.m.sigmask))
-	sigprocmask(_SIG_SETMASK, smask, nil)
-	signalstack(nil)
-}
-
-func memlimit() uintptr {
-	/*
-		TODO: Convert to Go when something actually uses the result.
-		Rlimit rl;
-		extern byte runtime·text[], runtime·end[];
-		uintptr used;
-
-		if(runtime·getrlimit(RLIMIT_AS, &rl) != 0)
-			return 0;
-		if(rl.rlim_cur >= 0x7fffffff)
-			return 0;
-
-		// Estimate our VM footprint excluding the heap.
-		// Not an exact science: use size of binary plus
-		// some room for thread stacks.
-		used = runtime·end - runtime·text + (64<<20);
-		if(used >= rl.rlim_cur)
-			return 0;
-
-		// If there's not at least 16 MB left, we're probably
-		// not going to be able to do much.  Treat as no limit.
-		rl.rlim_cur -= used;
-		if(rl.rlim_cur < (16<<20))
-			return 0;
-
-		return rl.rlim_cur - used;
-	*/
-
-	return 0
-}
-
-func sigtramp()
-
-type sigactiont struct {
-	sa_handler uintptr
-	sa_flags   int32
-	sa_mask    sigset
-}
-
-func setsig(i int32, fn uintptr, restart bool) {
-	var sa sigactiont
-	sa.sa_flags = _SA_SIGINFO | _SA_ONSTACK
-	if restart {
-		sa.sa_flags |= _SA_RESTART
-	}
-	sa.sa_mask = sigset_all
-	if fn == funcPC(sighandler) {
-		fn = funcPC(sigtramp)
-	}
-	sa.sa_handler = fn
-	sigaction(i, &sa, nil)
-}
-
-func setsigstack(i int32) {
-	throw("setsigstack")
-}
-
-func getsig(i int32) uintptr {
-	var sa sigactiont
-	sigaction(i, nil, &sa)
-	if sa.sa_handler == funcPC(sigtramp) {
-		return funcPC(sighandler)
-	}
-	return sa.sa_handler
-}
-
-func signalstack(s *stack) {
-	var st stackt
-	if s == nil {
-		st.ss_flags = _SS_DISABLE
-	} else {
-		st.ss_sp = s.lo
-		st.ss_size = s.hi - s.lo
-		st.ss_flags = 0
-	}
-	sigaltstack(&st, nil)
-}
-
-func updatesigmask(m [(_NSIG + 31) / 32]uint32) {
-	var mask sigset
-	copy(mask.__bits[:], m[:])
-	sigprocmask(_SIG_SETMASK, &mask, nil)
-}
-
-func unblocksig(sig int32) {
-	var mask sigset
-	mask.__bits[(sig-1)/32] |= 1 << ((uint32(sig) - 1) & 31)
-	sigprocmask(_SIG_UNBLOCK, &mask, nil)
-}
diff --git a/src/runtime/os1_linux.go b/src/runtime/os1_linux.go
deleted file mode 100644
index c23dc30..0000000
--- a/src/runtime/os1_linux.go
+++ /dev/null
@@ -1,350 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-var sigset_all sigset = sigset{^uint32(0), ^uint32(0)}
-
-// Linux futex.
-//
-//	futexsleep(uint32 *addr, uint32 val)
-//	futexwakeup(uint32 *addr)
-//
-// Futexsleep atomically checks if *addr == val and if so, sleeps on addr.
-// Futexwakeup wakes up threads sleeping on addr.
-// Futexsleep is allowed to wake up spuriously.
-
-const (
-	_FUTEX_WAIT = 0
-	_FUTEX_WAKE = 1
-)
-
-// Atomically,
-//	if(*addr == val) sleep
-// Might be woken up spuriously; that's allowed.
-// Don't sleep longer than ns; ns < 0 means forever.
-//go:nosplit
-func futexsleep(addr *uint32, val uint32, ns int64) {
-	var ts timespec
-
-	// Some Linux kernels have a bug where futex of
-	// FUTEX_WAIT returns an internal error code
-	// as an errno.  Libpthread ignores the return value
-	// here, and so can we: as it says a few lines up,
-	// spurious wakeups are allowed.
-	if ns < 0 {
-		futex(unsafe.Pointer(addr), _FUTEX_WAIT, val, nil, nil, 0)
-		return
-	}
-
-	// It's difficult to live within the no-split stack limits here.
-	// On ARM and 386, a 64-bit divide invokes a general software routine
-	// that needs more stack than we can afford. So we use timediv instead.
-	// But on real 64-bit systems, where words are larger but the stack limit
-	// is not, even timediv is too heavy, and we really need to use just an
-	// ordinary machine instruction.
-	if ptrSize == 8 {
-		ts.set_sec(ns / 1000000000)
-		ts.set_nsec(int32(ns % 1000000000))
-	} else {
-		ts.tv_nsec = 0
-		ts.set_sec(int64(timediv(ns, 1000000000, (*int32)(unsafe.Pointer(&ts.tv_nsec)))))
-	}
-	futex(unsafe.Pointer(addr), _FUTEX_WAIT, val, unsafe.Pointer(&ts), nil, 0)
-}
-
-// If any procs are sleeping on addr, wake up at most cnt.
-//go:nosplit
-func futexwakeup(addr *uint32, cnt uint32) {
-	ret := futex(unsafe.Pointer(addr), _FUTEX_WAKE, cnt, nil, nil, 0)
-	if ret >= 0 {
-		return
-	}
-
-	// I don't know that futex wakeup can return
-	// EAGAIN or EINTR, but if it does, it would be
-	// safe to loop and call futex again.
-	systemstack(func() {
-		print("futexwakeup addr=", addr, " returned ", ret, "\n")
-	})
-
-	*(*int32)(unsafe.Pointer(uintptr(0x1006))) = 0x1006
-}
-
-func getproccount() int32 {
-	// This buffer is huge (8 kB) but we are on the system stack
-	// and there should be plenty of space (64 kB) -- except on ARM where
-	// the system stack itself is only 8kb (see golang.org/issue/11873).
-	// Also this is a leaf, so we're not holding up the memory for long.
-	// See golang.org/issue/11823.
-	// The suggested behavior here is to keep trying with ever-larger
-	// buffers, but we don't have a dynamic memory allocator at the
-	// moment, so that's a bit tricky and seems like overkill.
-	const maxCPUs = 64*1024*(1-goarch_arm) + 1024*goarch_arm
-	var buf [maxCPUs / (ptrSize * 8)]uintptr
-	r := sched_getaffinity(0, unsafe.Sizeof(buf), &buf[0])
-	n := int32(0)
-	for _, v := range buf[:r/ptrSize] {
-		for v != 0 {
-			n += int32(v & 1)
-			v >>= 1
-		}
-	}
-	if n == 0 {
-		n = 1
-	}
-	return n
-}
-
-// Clone, the Linux rfork.
-const (
-	_CLONE_VM             = 0x100
-	_CLONE_FS             = 0x200
-	_CLONE_FILES          = 0x400
-	_CLONE_SIGHAND        = 0x800
-	_CLONE_PTRACE         = 0x2000
-	_CLONE_VFORK          = 0x4000
-	_CLONE_PARENT         = 0x8000
-	_CLONE_THREAD         = 0x10000
-	_CLONE_NEWNS          = 0x20000
-	_CLONE_SYSVSEM        = 0x40000
-	_CLONE_SETTLS         = 0x80000
-	_CLONE_PARENT_SETTID  = 0x100000
-	_CLONE_CHILD_CLEARTID = 0x200000
-	_CLONE_UNTRACED       = 0x800000
-	_CLONE_CHILD_SETTID   = 0x1000000
-	_CLONE_STOPPED        = 0x2000000
-	_CLONE_NEWUTS         = 0x4000000
-	_CLONE_NEWIPC         = 0x8000000
-
-	cloneFlags = _CLONE_VM | /* share memory */
-		_CLONE_FS | /* share cwd, etc */
-		_CLONE_FILES | /* share fd table */
-		_CLONE_SIGHAND | /* share sig handler table */
-		_CLONE_THREAD /* revisit - okay for now */
-)
-
-// May run with m.p==nil, so write barriers are not allowed.
-//go:nowritebarrier
-func newosproc(mp *m, stk unsafe.Pointer) {
-	/*
-	 * note: strace gets confused if we use CLONE_PTRACE here.
-	 */
-	mp.tls[0] = uintptr(mp.id) // so 386 asm can find it
-	if false {
-		print("newosproc stk=", stk, " m=", mp, " g=", mp.g0, " clone=", funcPC(clone), " id=", mp.id, "/", mp.tls[0], " ostk=", &mp, "\n")
-	}
-
-	// Disable signals during clone, so that the new thread starts
-	// with signals disabled.  It will enable them in minit.
-	var oset sigset
-	rtsigprocmask(_SIG_SETMASK, &sigset_all, &oset, int32(unsafe.Sizeof(oset)))
-	ret := clone(cloneFlags, stk, unsafe.Pointer(mp), unsafe.Pointer(mp.g0), unsafe.Pointer(funcPC(mstart)))
-	rtsigprocmask(_SIG_SETMASK, &oset, nil, int32(unsafe.Sizeof(oset)))
-
-	if ret < 0 {
-		print("runtime: failed to create new OS thread (have ", mcount(), " already; errno=", -ret, ")\n")
-		throw("newosproc")
-	}
-}
-
-// Version of newosproc that doesn't require a valid G.
-//go:nosplit
-func newosproc0(stacksize uintptr, fn unsafe.Pointer) {
-	stack := sysAlloc(stacksize, &memstats.stacks_sys)
-	if stack == nil {
-		write(2, unsafe.Pointer(&failallocatestack[0]), int32(len(failallocatestack)))
-		exit(1)
-	}
-	ret := clone(cloneFlags, unsafe.Pointer(uintptr(stack)+stacksize), nil, nil, fn)
-	if ret < 0 {
-		write(2, unsafe.Pointer(&failthreadcreate[0]), int32(len(failthreadcreate)))
-		exit(1)
-	}
-}
-
-var failallocatestack = []byte("runtime: failed to allocate stack for the new OS thread\n")
-var failthreadcreate = []byte("runtime: failed to create new OS thread\n")
-
-func osinit() {
-	ncpu = getproccount()
-}
-
-var urandom_dev = []byte("/dev/urandom\x00")
-
-func getRandomData(r []byte) {
-	if startupRandomData != nil {
-		n := copy(r, startupRandomData)
-		extendRandom(r, n)
-		return
-	}
-	fd := open(&urandom_dev[0], 0 /* O_RDONLY */, 0)
-	n := read(fd, unsafe.Pointer(&r[0]), int32(len(r)))
-	closefd(fd)
-	extendRandom(r, int(n))
-}
-
-func goenvs() {
-	goenvs_unix()
-}
-
-// Called to initialize a new m (including the bootstrap m).
-// Called on the parent thread (main thread in case of bootstrap), can allocate memory.
-func mpreinit(mp *m) {
-	mp.gsignal = malg(32 * 1024) // Linux wants >= 2K
-	mp.gsignal.m = mp
-}
-
-func msigsave(mp *m) {
-	smask := (*sigset)(unsafe.Pointer(&mp.sigmask))
-	if unsafe.Sizeof(*smask) > unsafe.Sizeof(mp.sigmask) {
-		throw("insufficient storage for signal mask")
-	}
-	rtsigprocmask(_SIG_SETMASK, nil, smask, int32(unsafe.Sizeof(*smask)))
-}
-
-func gettid() uint32
-
-// Called to initialize a new m (including the bootstrap m).
-// Called on the new thread, can not allocate memory.
-func minit() {
-	// Initialize signal handling.
-	_g_ := getg()
-	signalstack(&_g_.m.gsignal.stack)
-
-	// for debuggers, in case cgo created the thread
-	_g_.m.procid = uint64(gettid())
-
-	// restore signal mask from m.sigmask and unblock essential signals
-	nmask := *(*sigset)(unsafe.Pointer(&_g_.m.sigmask))
-	for i := range sigtable {
-		if sigtable[i].flags&_SigUnblock != 0 {
-			nmask[(i-1)/32] &^= 1 << ((uint32(i) - 1) & 31)
-		}
-	}
-	rtsigprocmask(_SIG_SETMASK, &nmask, nil, int32(unsafe.Sizeof(nmask)))
-}
-
-// Called from dropm to undo the effect of an minit.
-func unminit() {
-	_g_ := getg()
-	smask := (*sigset)(unsafe.Pointer(&_g_.m.sigmask))
-	rtsigprocmask(_SIG_SETMASK, smask, nil, int32(unsafe.Sizeof(*smask)))
-	signalstack(nil)
-}
-
-func memlimit() uintptr {
-	/*
-		TODO: Convert to Go when something actually uses the result.
-
-		Rlimit rl;
-		extern byte runtime·text[], runtime·end[];
-		uintptr used;
-
-		if(runtime·getrlimit(RLIMIT_AS, &rl) != 0)
-			return 0;
-		if(rl.rlim_cur >= 0x7fffffff)
-			return 0;
-
-		// Estimate our VM footprint excluding the heap.
-		// Not an exact science: use size of binary plus
-		// some room for thread stacks.
-		used = runtime·end - runtime·text + (64<<20);
-		if(used >= rl.rlim_cur)
-			return 0;
-
-		// If there's not at least 16 MB left, we're probably
-		// not going to be able to do much.  Treat as no limit.
-		rl.rlim_cur -= used;
-		if(rl.rlim_cur < (16<<20))
-			return 0;
-
-		return rl.rlim_cur - used;
-	*/
-
-	return 0
-}
-
-//#ifdef GOARCH_386
-//#define sa_handler k_sa_handler
-//#endif
-
-func sigreturn()
-func sigtramp()
-
-func setsig(i int32, fn uintptr, restart bool) {
-	var sa sigactiont
-	memclr(unsafe.Pointer(&sa), unsafe.Sizeof(sa))
-	sa.sa_flags = _SA_SIGINFO | _SA_ONSTACK | _SA_RESTORER
-	if restart {
-		sa.sa_flags |= _SA_RESTART
-	}
-	sa.sa_mask = ^uint64(0)
-	// Although Linux manpage says "sa_restorer element is obsolete and
-	// should not be used". x86_64 kernel requires it. Only use it on
-	// x86.
-	if GOARCH == "386" || GOARCH == "amd64" {
-		sa.sa_restorer = funcPC(sigreturn)
-	}
-	if fn == funcPC(sighandler) {
-		fn = funcPC(sigtramp)
-	}
-	sa.sa_handler = fn
-	if rt_sigaction(uintptr(i), &sa, nil, unsafe.Sizeof(sa.sa_mask)) != 0 {
-		throw("rt_sigaction failure")
-	}
-}
-
-func setsigstack(i int32) {
-	var sa sigactiont
-	if rt_sigaction(uintptr(i), nil, &sa, unsafe.Sizeof(sa.sa_mask)) != 0 {
-		throw("rt_sigaction failure")
-	}
-	if sa.sa_handler == 0 || sa.sa_handler == _SIG_DFL || sa.sa_handler == _SIG_IGN || sa.sa_flags&_SA_ONSTACK != 0 {
-		return
-	}
-	sa.sa_flags |= _SA_ONSTACK
-	if rt_sigaction(uintptr(i), &sa, nil, unsafe.Sizeof(sa.sa_mask)) != 0 {
-		throw("rt_sigaction failure")
-	}
-}
-
-func getsig(i int32) uintptr {
-	var sa sigactiont
-
-	memclr(unsafe.Pointer(&sa), unsafe.Sizeof(sa))
-	if rt_sigaction(uintptr(i), nil, &sa, unsafe.Sizeof(sa.sa_mask)) != 0 {
-		throw("rt_sigaction read failure")
-	}
-	if sa.sa_handler == funcPC(sigtramp) {
-		return funcPC(sighandler)
-	}
-	return sa.sa_handler
-}
-
-func signalstack(s *stack) {
-	var st sigaltstackt
-	if s == nil {
-		st.ss_flags = _SS_DISABLE
-	} else {
-		st.ss_sp = (*byte)(unsafe.Pointer(s.lo))
-		st.ss_size = s.hi - s.lo
-		st.ss_flags = 0
-	}
-	sigaltstack(&st, nil)
-}
-
-func updatesigmask(m sigmask) {
-	var mask sigset
-	copy(mask[:], m[:])
-	rtsigprocmask(_SIG_SETMASK, &mask, nil, int32(unsafe.Sizeof(mask)))
-}
-
-func unblocksig(sig int32) {
-	var mask sigset
-	mask[(sig-1)/32] |= 1 << ((uint32(sig) - 1) & 31)
-	rtsigprocmask(_SIG_UNBLOCK, &mask, nil, int32(unsafe.Sizeof(mask)))
-}
diff --git a/src/runtime/os1_nacl.go b/src/runtime/os1_nacl.go
deleted file mode 100644
index 143752a..0000000
--- a/src/runtime/os1_nacl.go
+++ /dev/null
@@ -1,203 +0,0 @@
-// Copyright 2010 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-// Called to initialize a new m (including the bootstrap m).
-// Called on the parent thread (main thread in case of bootstrap), can allocate memory.
-func mpreinit(mp *m) {
-	mp.gsignal = malg(32 * 1024)
-	mp.gsignal.m = mp
-}
-
-func sigtramp()
-
-func msigsave(mp *m) {
-}
-
-// Called to initialize a new m (including the bootstrap m).
-// Called on the new thread, can not allocate memory.
-func minit() {
-	_g_ := getg()
-
-	// Initialize signal handling
-	ret := nacl_exception_stack(_g_.m.gsignal.stack.lo, 32*1024)
-	if ret < 0 {
-		print("runtime: nacl_exception_stack: error ", -ret, "\n")
-	}
-
-	ret = nacl_exception_handler(funcPC(sigtramp), nil)
-	if ret < 0 {
-		print("runtime: nacl_exception_handler: error ", -ret, "\n")
-	}
-}
-
-// Called from dropm to undo the effect of an minit.
-func unminit() {
-}
-
-func osinit() {
-	ncpu = 1
-	getg().m.procid = 2
-	//nacl_exception_handler(funcPC(sigtramp), nil);
-}
-
-func crash() {
-	*(*int32)(nil) = 0
-}
-
-//go:noescape
-func getRandomData([]byte)
-
-func goenvs() {
-	goenvs_unix()
-}
-
-func initsig() {
-}
-
-//go:nosplit
-func usleep(us uint32) {
-	var ts timespec
-
-	ts.tv_sec = int64(us / 1e6)
-	ts.tv_nsec = int32(us%1e6) * 1e3
-	nacl_nanosleep(&ts, nil)
-}
-
-func mstart_nacl()
-
-// May run with m.p==nil, so write barriers are not allowed.
-//go:nowritebarrier
-func newosproc(mp *m, stk unsafe.Pointer) {
-	mp.tls[0] = uintptr(unsafe.Pointer(mp.g0))
-	mp.tls[1] = uintptr(unsafe.Pointer(mp))
-	ret := nacl_thread_create(funcPC(mstart_nacl), stk, unsafe.Pointer(&mp.tls[2]), nil)
-	if ret < 0 {
-		print("nacl_thread_create: error ", -ret, "\n")
-		throw("newosproc")
-	}
-}
-
-//go:nosplit
-func semacreate() uintptr {
-	var cond uintptr
-	systemstack(func() {
-		mu := nacl_mutex_create(0)
-		if mu < 0 {
-			print("nacl_mutex_create: error ", -mu, "\n")
-			throw("semacreate")
-		}
-		c := nacl_cond_create(0)
-		if c < 0 {
-			print("nacl_cond_create: error ", -cond, "\n")
-			throw("semacreate")
-		}
-		cond = uintptr(c)
-		_g_ := getg()
-		_g_.m.waitsemalock = uint32(mu)
-	})
-	return cond
-}
-
-//go:nosplit
-func semasleep(ns int64) int32 {
-	var ret int32
-
-	systemstack(func() {
-		_g_ := getg()
-		if nacl_mutex_lock(int32(_g_.m.waitsemalock)) < 0 {
-			throw("semasleep")
-		}
-
-		for _g_.m.waitsemacount == 0 {
-			if ns < 0 {
-				if nacl_cond_wait(int32(_g_.m.waitsema), int32(_g_.m.waitsemalock)) < 0 {
-					throw("semasleep")
-				}
-			} else {
-				var ts timespec
-				end := ns + nanotime()
-				ts.tv_sec = end / 1e9
-				ts.tv_nsec = int32(end % 1e9)
-				r := nacl_cond_timed_wait_abs(int32(_g_.m.waitsema), int32(_g_.m.waitsemalock), &ts)
-				if r == -_ETIMEDOUT {
-					nacl_mutex_unlock(int32(_g_.m.waitsemalock))
-					ret = -1
-					return
-				}
-				if r < 0 {
-					throw("semasleep")
-				}
-			}
-		}
-
-		_g_.m.waitsemacount = 0
-		nacl_mutex_unlock(int32(_g_.m.waitsemalock))
-		ret = 0
-	})
-	return ret
-}
-
-//go:nosplit
-func semawakeup(mp *m) {
-	systemstack(func() {
-		if nacl_mutex_lock(int32(mp.waitsemalock)) < 0 {
-			throw("semawakeup")
-		}
-		if mp.waitsemacount != 0 {
-			throw("semawakeup")
-		}
-		mp.waitsemacount = 1
-		nacl_cond_signal(int32(mp.waitsema))
-		nacl_mutex_unlock(int32(mp.waitsemalock))
-	})
-}
-
-func memlimit() uintptr {
-	return 0
-}
-
-// This runs on a foreign stack, without an m or a g.  No stack split.
-//go:nosplit
-func badsignal2() {
-	write(2, unsafe.Pointer(&badsignal1[0]), int32(len(badsignal1)))
-	exit(2)
-}
-
-var badsignal1 = []byte("runtime: signal received on thread not created by Go.\n")
-
-func raisebadsignal(sig int32) {
-	badsignal2()
-}
-
-func madvise(addr unsafe.Pointer, n uintptr, flags int32) {}
-func munmap(addr unsafe.Pointer, n uintptr)               {}
-func resetcpuprofiler(hz int32)                           {}
-func sigdisable(uint32)                                   {}
-func sigenable(uint32)                                    {}
-func sigignore(uint32)                                    {}
-func closeonexec(int32)                                   {}
-
-var writelock uint32 // test-and-set spin lock for write
-
-/*
-An attempt at IRT. Doesn't work. See end of sys_nacl_amd64.s.
-
-void (*nacl_irt_query)(void);
-
-int8 nacl_irt_basic_v0_1_str[] = "nacl-irt-basic-0.1";
-void *nacl_irt_basic_v0_1[6]; // exit, gettod, clock, nanosleep, sched_yield, sysconf
-int32 nacl_irt_basic_v0_1_size = sizeof(nacl_irt_basic_v0_1);
-
-int8 nacl_irt_memory_v0_3_str[] = "nacl-irt-memory-0.3";
-void *nacl_irt_memory_v0_3[3]; // mmap, munmap, mprotect
-int32 nacl_irt_memory_v0_3_size = sizeof(nacl_irt_memory_v0_3);
-
-int8 nacl_irt_thread_v0_1_str[] = "nacl-irt-thread-0.1";
-void *nacl_irt_thread_v0_1[3]; // thread_create, thread_exit, thread_nice
-int32 nacl_irt_thread_v0_1_size = sizeof(nacl_irt_thread_v0_1);
-*/
diff --git a/src/runtime/os1_netbsd.go b/src/runtime/os1_netbsd.go
deleted file mode 100644
index cacd606..0000000
--- a/src/runtime/os1_netbsd.go
+++ /dev/null
@@ -1,238 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-const (
-	_ESRCH     = 3
-	_ETIMEDOUT = 60
-
-	// From NetBSD's <sys/time.h>
-	_CLOCK_REALTIME  = 0
-	_CLOCK_VIRTUAL   = 1
-	_CLOCK_PROF      = 2
-	_CLOCK_MONOTONIC = 3
-)
-
-var sigset_all = sigset{[4]uint32{^uint32(0), ^uint32(0), ^uint32(0), ^uint32(0)}}
-
-// From NetBSD's <sys/sysctl.h>
-const (
-	_CTL_HW  = 6
-	_HW_NCPU = 3
-)
-
-func getncpu() int32 {
-	mib := [2]uint32{_CTL_HW, _HW_NCPU}
-	out := uint32(0)
-	nout := unsafe.Sizeof(out)
-	ret := sysctl(&mib[0], 2, (*byte)(unsafe.Pointer(&out)), &nout, nil, 0)
-	if ret >= 0 {
-		return int32(out)
-	}
-	return 1
-}
-
-//go:nosplit
-func semacreate() uintptr {
-	return 1
-}
-
-//go:nosplit
-func semasleep(ns int64) int32 {
-	_g_ := getg()
-
-	// Compute sleep deadline.
-	var tsp *timespec
-	if ns >= 0 {
-		var ts timespec
-		var nsec int32
-		ns += nanotime()
-		ts.set_sec(timediv(ns, 1000000000, &nsec))
-		ts.set_nsec(nsec)
-		tsp = &ts
-	}
-
-	for {
-		v := atomicload(&_g_.m.waitsemacount)
-		if v > 0 {
-			if cas(&_g_.m.waitsemacount, v, v-1) {
-				return 0 // semaphore acquired
-			}
-			continue
-		}
-
-		// Sleep until unparked by semawakeup or timeout.
-		ret := lwp_park(tsp, 0, unsafe.Pointer(&_g_.m.waitsemacount), nil)
-		if ret == _ETIMEDOUT {
-			return -1
-		}
-	}
-}
-
-//go:nosplit
-func semawakeup(mp *m) {
-	xadd(&mp.waitsemacount, 1)
-	// From NetBSD's _lwp_unpark(2) manual:
-	// "If the target LWP is not currently waiting, it will return
-	// immediately upon the next call to _lwp_park()."
-	ret := lwp_unpark(int32(mp.procid), unsafe.Pointer(&mp.waitsemacount))
-	if ret != 0 && ret != _ESRCH {
-		// semawakeup can be called on signal stack.
-		systemstack(func() {
-			print("thrwakeup addr=", &mp.waitsemacount, " sem=", mp.waitsemacount, " ret=", ret, "\n")
-		})
-	}
-}
-
-// May run with m.p==nil, so write barriers are not allowed.
-//go:nowritebarrier
-func newosproc(mp *m, stk unsafe.Pointer) {
-	if false {
-		print("newosproc stk=", stk, " m=", mp, " g=", mp.g0, " id=", mp.id, "/", int32(mp.tls[0]), " ostk=", &mp, "\n")
-	}
-
-	mp.tls[0] = uintptr(mp.id) // so 386 asm can find it
-
-	var uc ucontextt
-	getcontext(unsafe.Pointer(&uc))
-
-	uc.uc_flags = _UC_SIGMASK | _UC_CPU
-	uc.uc_link = nil
-	uc.uc_sigmask = sigset_all
-
-	lwp_mcontext_init(&uc.uc_mcontext, stk, mp, mp.g0, funcPC(mstart))
-
-	ret := lwp_create(unsafe.Pointer(&uc), 0, unsafe.Pointer(&mp.procid))
-	if ret < 0 {
-		print("runtime: failed to create new OS thread (have ", mcount()-1, " already; errno=", -ret, ")\n")
-		throw("runtime.newosproc")
-	}
-}
-
-func osinit() {
-	ncpu = getncpu()
-}
-
-var urandom_dev = []byte("/dev/urandom\x00")
-
-//go:nosplit
-func getRandomData(r []byte) {
-	fd := open(&urandom_dev[0], 0 /* O_RDONLY */, 0)
-	n := read(fd, unsafe.Pointer(&r[0]), int32(len(r)))
-	closefd(fd)
-	extendRandom(r, int(n))
-}
-
-func goenvs() {
-	goenvs_unix()
-}
-
-// Called to initialize a new m (including the bootstrap m).
-// Called on the parent thread (main thread in case of bootstrap), can allocate memory.
-func mpreinit(mp *m) {
-	mp.gsignal = malg(32 * 1024)
-	mp.gsignal.m = mp
-}
-
-func msigsave(mp *m) {
-	smask := (*sigset)(unsafe.Pointer(&mp.sigmask))
-	if unsafe.Sizeof(*smask) > unsafe.Sizeof(mp.sigmask) {
-		throw("insufficient storage for signal mask")
-	}
-	sigprocmask(_SIG_SETMASK, nil, smask)
-}
-
-// Called to initialize a new m (including the bootstrap m).
-// Called on the new thread, can not allocate memory.
-func minit() {
-	_g_ := getg()
-	_g_.m.procid = uint64(lwp_self())
-
-	// Initialize signal handling
-	signalstack(&_g_.m.gsignal.stack)
-
-	// restore signal mask from m.sigmask and unblock essential signals
-	nmask := *(*sigset)(unsafe.Pointer(&_g_.m.sigmask))
-	for i := range sigtable {
-		if sigtable[i].flags&_SigUnblock != 0 {
-			nmask.__bits[(i-1)/32] &^= 1 << ((uint32(i) - 1) & 31)
-		}
-	}
-	sigprocmask(_SIG_SETMASK, &nmask, nil)
-}
-
-// Called from dropm to undo the effect of an minit.
-func unminit() {
-	_g_ := getg()
-	smask := (*sigset)(unsafe.Pointer(&_g_.m.sigmask))
-	sigprocmask(_SIG_SETMASK, smask, nil)
-
-	signalstack(nil)
-}
-
-func memlimit() uintptr {
-	return 0
-}
-
-func sigtramp()
-
-type sigactiont struct {
-	sa_sigaction uintptr
-	sa_mask      sigset
-	sa_flags     int32
-}
-
-func setsig(i int32, fn uintptr, restart bool) {
-	var sa sigactiont
-	sa.sa_flags = _SA_SIGINFO | _SA_ONSTACK
-	if restart {
-		sa.sa_flags |= _SA_RESTART
-	}
-	sa.sa_mask = sigset_all
-	if fn == funcPC(sighandler) {
-		fn = funcPC(sigtramp)
-	}
-	sa.sa_sigaction = fn
-	sigaction(i, &sa, nil)
-}
-
-func setsigstack(i int32) {
-	throw("setsigstack")
-}
-
-func getsig(i int32) uintptr {
-	var sa sigactiont
-	sigaction(i, nil, &sa)
-	if sa.sa_sigaction == funcPC(sigtramp) {
-		return funcPC(sighandler)
-	}
-	return sa.sa_sigaction
-}
-
-func signalstack(s *stack) {
-	var st sigaltstackt
-	if s == nil {
-		st.ss_flags = _SS_DISABLE
-	} else {
-		st.ss_sp = s.lo
-		st.ss_size = s.hi - s.lo
-		st.ss_flags = 0
-	}
-	sigaltstack(&st, nil)
-}
-
-func updatesigmask(m sigmask) {
-	var mask sigset
-	copy(mask.__bits[:], m[:])
-	sigprocmask(_SIG_SETMASK, &mask, nil)
-}
-
-func unblocksig(sig int32) {
-	var mask sigset
-	mask.__bits[(sig-1)/32] |= 1 << ((uint32(sig) - 1) & 31)
-	sigprocmask(_SIG_UNBLOCK, &mask, nil)
-}
diff --git a/src/runtime/os1_netbsd_386.go b/src/runtime/os1_netbsd_386.go
deleted file mode 100644
index 037f7e3..0000000
--- a/src/runtime/os1_netbsd_386.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-func lwp_mcontext_init(mc *mcontextt, stk unsafe.Pointer, mp *m, gp *g, fn uintptr) {
-	// Machine dependent mcontext initialisation for LWP.
-	mc.__gregs[_REG_EIP] = uint32(funcPC(lwp_tramp))
-	mc.__gregs[_REG_UESP] = uint32(uintptr(stk))
-	mc.__gregs[_REG_EBX] = uint32(uintptr(unsafe.Pointer(mp)))
-	mc.__gregs[_REG_EDX] = uint32(uintptr(unsafe.Pointer(gp)))
-	mc.__gregs[_REG_ESI] = uint32(fn)
-}
diff --git a/src/runtime/os1_netbsd_amd64.go b/src/runtime/os1_netbsd_amd64.go
deleted file mode 100644
index 5118b0c..0000000
--- a/src/runtime/os1_netbsd_amd64.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-func lwp_mcontext_init(mc *mcontextt, stk unsafe.Pointer, mp *m, gp *g, fn uintptr) {
-	// Machine dependent mcontext initialisation for LWP.
-	mc.__gregs[_REG_RIP] = uint64(funcPC(lwp_tramp))
-	mc.__gregs[_REG_RSP] = uint64(uintptr(stk))
-	mc.__gregs[_REG_R8] = uint64(uintptr(unsafe.Pointer(mp)))
-	mc.__gregs[_REG_R9] = uint64(uintptr(unsafe.Pointer(gp)))
-	mc.__gregs[_REG_R12] = uint64(fn)
-}
diff --git a/src/runtime/os1_openbsd.go b/src/runtime/os1_openbsd.go
deleted file mode 100644
index 24a095b..0000000
--- a/src/runtime/os1_openbsd.go
+++ /dev/null
@@ -1,246 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-const (
-	_ESRCH       = 3
-	_EAGAIN      = 35
-	_EWOULDBLOCK = _EAGAIN
-	_ENOTSUP     = 91
-
-	// From OpenBSD's sys/time.h
-	_CLOCK_REALTIME  = 0
-	_CLOCK_VIRTUAL   = 1
-	_CLOCK_PROF      = 2
-	_CLOCK_MONOTONIC = 3
-)
-
-const (
-	sigset_none = uint32(0)
-	sigset_all  = ^uint32(0)
-)
-
-// From OpenBSD's <sys/sysctl.h>
-const (
-	_CTL_HW  = 6
-	_HW_NCPU = 3
-)
-
-func getncpu() int32 {
-	mib := [2]uint32{_CTL_HW, _HW_NCPU}
-	out := uint32(0)
-	nout := unsafe.Sizeof(out)
-
-	// Fetch hw.ncpu via sysctl.
-	ret := sysctl(&mib[0], 2, (*byte)(unsafe.Pointer(&out)), &nout, nil, 0)
-	if ret >= 0 {
-		return int32(out)
-	}
-	return 1
-}
-
-//go:nosplit
-func semacreate() uintptr {
-	return 1
-}
-
-//go:nosplit
-func semasleep(ns int64) int32 {
-	_g_ := getg()
-
-	// Compute sleep deadline.
-	var tsp *timespec
-	if ns >= 0 {
-		var ts timespec
-		var nsec int32
-		ns += nanotime()
-		ts.set_sec(int64(timediv(ns, 1000000000, &nsec)))
-		ts.set_nsec(nsec)
-		tsp = &ts
-	}
-
-	for {
-		v := atomicload(&_g_.m.waitsemacount)
-		if v > 0 {
-			if cas(&_g_.m.waitsemacount, v, v-1) {
-				return 0 // semaphore acquired
-			}
-			continue
-		}
-
-		// Sleep until woken by semawakeup or timeout; or abort if waitsemacount != 0.
-		//
-		// From OpenBSD's __thrsleep(2) manual:
-		// "The abort argument, if not NULL, points to an int that will
-		// be examined [...] immediately before blocking.  If that int
-		// is non-zero then __thrsleep() will immediately return EINTR
-		// without blocking."
-		ret := thrsleep(uintptr(unsafe.Pointer(&_g_.m.waitsemacount)), _CLOCK_MONOTONIC, tsp, 0, &_g_.m.waitsemacount)
-		if ret == _EWOULDBLOCK {
-			return -1
-		}
-	}
-}
-
-//go:nosplit
-func semawakeup(mp *m) {
-	xadd(&mp.waitsemacount, 1)
-	ret := thrwakeup(uintptr(unsafe.Pointer(&mp.waitsemacount)), 1)
-	if ret != 0 && ret != _ESRCH {
-		// semawakeup can be called on signal stack.
-		systemstack(func() {
-			print("thrwakeup addr=", &mp.waitsemacount, " sem=", mp.waitsemacount, " ret=", ret, "\n")
-		})
-	}
-}
-
-// May run with m.p==nil, so write barriers are not allowed.
-//go:nowritebarrier
-func newosproc(mp *m, stk unsafe.Pointer) {
-	if false {
-		print("newosproc stk=", stk, " m=", mp, " g=", mp.g0, " id=", mp.id, "/", int32(mp.tls[0]), " ostk=", &mp, "\n")
-	}
-
-	mp.tls[0] = uintptr(mp.id) // so 386 asm can find it
-
-	param := tforkt{
-		tf_tcb:   unsafe.Pointer(&mp.tls[0]),
-		tf_tid:   (*int32)(unsafe.Pointer(&mp.procid)),
-		tf_stack: uintptr(stk),
-	}
-
-	oset := sigprocmask(_SIG_SETMASK, sigset_all)
-	ret := tfork(&param, unsafe.Sizeof(param), mp, mp.g0, funcPC(mstart))
-	sigprocmask(_SIG_SETMASK, oset)
-
-	if ret < 0 {
-		print("runtime: failed to create new OS thread (have ", mcount()-1, " already; errno=", -ret, ")\n")
-		throw("runtime.newosproc")
-	}
-}
-
-func osinit() {
-	ncpu = getncpu()
-}
-
-var urandom_dev = []byte("/dev/urandom\x00")
-
-//go:nosplit
-func getRandomData(r []byte) {
-	fd := open(&urandom_dev[0], 0 /* O_RDONLY */, 0)
-	n := read(fd, unsafe.Pointer(&r[0]), int32(len(r)))
-	closefd(fd)
-	extendRandom(r, int(n))
-}
-
-func goenvs() {
-	goenvs_unix()
-}
-
-// Called to initialize a new m (including the bootstrap m).
-// Called on the parent thread (main thread in case of bootstrap), can allocate memory.
-func mpreinit(mp *m) {
-	mp.gsignal = malg(32 * 1024)
-	mp.gsignal.m = mp
-}
-
-func msigsave(mp *m) {
-	smask := (*uint32)(unsafe.Pointer(&mp.sigmask))
-	if unsafe.Sizeof(*smask) > unsafe.Sizeof(mp.sigmask) {
-		throw("insufficient storage for signal mask")
-	}
-	*smask = sigprocmask(_SIG_BLOCK, 0)
-}
-
-// Called to initialize a new m (including the bootstrap m).
-// Called on the new thread, can not allocate memory.
-func minit() {
-	_g_ := getg()
-
-	// m.procid is a uint64, but tfork writes an int32. Fix it up.
-	_g_.m.procid = uint64(*(*int32)(unsafe.Pointer(&_g_.m.procid)))
-
-	// Initialize signal handling
-	signalstack(&_g_.m.gsignal.stack)
-
-	// restore signal mask from m.sigmask and unblock essential signals
-	nmask := *(*uint32)(unsafe.Pointer(&_g_.m.sigmask))
-	for i := range sigtable {
-		if sigtable[i].flags&_SigUnblock != 0 {
-			nmask &^= 1 << (uint32(i) - 1)
-		}
-	}
-	sigprocmask(_SIG_SETMASK, nmask)
-}
-
-// Called from dropm to undo the effect of an minit.
-func unminit() {
-	_g_ := getg()
-	smask := *(*uint32)(unsafe.Pointer(&_g_.m.sigmask))
-	sigprocmask(_SIG_SETMASK, smask)
-	signalstack(nil)
-}
-
-func memlimit() uintptr {
-	return 0
-}
-
-func sigtramp()
-
-type sigactiont struct {
-	sa_sigaction uintptr
-	sa_mask      uint32
-	sa_flags     int32
-}
-
-func setsig(i int32, fn uintptr, restart bool) {
-	var sa sigactiont
-	sa.sa_flags = _SA_SIGINFO | _SA_ONSTACK
-	if restart {
-		sa.sa_flags |= _SA_RESTART
-	}
-	sa.sa_mask = sigset_all
-	if fn == funcPC(sighandler) {
-		fn = funcPC(sigtramp)
-	}
-	sa.sa_sigaction = fn
-	sigaction(i, &sa, nil)
-}
-
-func setsigstack(i int32) {
-	throw("setsigstack")
-}
-
-func getsig(i int32) uintptr {
-	var sa sigactiont
-	sigaction(i, nil, &sa)
-	if sa.sa_sigaction == funcPC(sigtramp) {
-		return funcPC(sighandler)
-	}
-	return sa.sa_sigaction
-}
-
-func signalstack(s *stack) {
-	var st stackt
-	if s == nil {
-		st.ss_flags = _SS_DISABLE
-	} else {
-		st.ss_sp = s.lo
-		st.ss_size = s.hi - s.lo
-		st.ss_flags = 0
-	}
-	sigaltstack(&st, nil)
-}
-
-func updatesigmask(m sigmask) {
-	sigprocmask(_SIG_SETMASK, m[0])
-}
-
-func unblocksig(sig int32) {
-	mask := uint32(1) << (uint32(sig) - 1)
-	sigprocmask(_SIG_UNBLOCK, mask)
-}
diff --git a/src/runtime/os1_plan9.go b/src/runtime/os1_plan9.go
deleted file mode 100644
index 9615b6d..0000000
--- a/src/runtime/os1_plan9.go
+++ /dev/null
@@ -1,268 +0,0 @@
-// Copyright 2010 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-// Called to initialize a new m (including the bootstrap m).
-// Called on the parent thread (main thread in case of bootstrap), can allocate memory.
-func mpreinit(mp *m) {
-	// Initialize stack and goroutine for note handling.
-	mp.gsignal = malg(32 * 1024)
-	mp.gsignal.m = mp
-	mp.notesig = (*int8)(mallocgc(_ERRMAX, nil, _FlagNoScan))
-	// Initialize stack for handling strings from the
-	// errstr system call, as used in package syscall.
-	mp.errstr = (*byte)(mallocgc(_ERRMAX, nil, _FlagNoScan))
-}
-
-func msigsave(mp *m) {
-}
-
-// Called to initialize a new m (including the bootstrap m).
-// Called on the new thread, can not allocate memory.
-func minit() {
-	// Mask all SSE floating-point exceptions
-	// when running on the 64-bit kernel.
-	setfpmasks()
-}
-
-// Called from dropm to undo the effect of an minit.
-func unminit() {
-}
-
-var sysstat = []byte("/dev/sysstat\x00")
-
-func getproccount() int32 {
-	var buf [2048]byte
-	fd := open(&sysstat[0], _OREAD, 0)
-	if fd < 0 {
-		return 1
-	}
-	ncpu := int32(0)
-	for {
-		n := read(fd, unsafe.Pointer(&buf), int32(len(buf)))
-		if n <= 0 {
-			break
-		}
-		for i := int32(0); i < n; i++ {
-			if buf[i] == '\n' {
-				ncpu++
-			}
-		}
-	}
-	closefd(fd)
-	if ncpu == 0 {
-		ncpu = 1
-	}
-	return ncpu
-}
-
-var pid = []byte("#c/pid\x00")
-
-func getpid() uint64 {
-	var b [20]byte
-	fd := open(&pid[0], 0, 0)
-	if fd >= 0 {
-		read(fd, unsafe.Pointer(&b), int32(len(b)))
-		closefd(fd)
-	}
-	c := b[:]
-	for c[0] == ' ' || c[0] == '\t' {
-		c = c[1:]
-	}
-	return uint64(_atoi(c))
-}
-
-func osinit() {
-	initBloc()
-	ncpu = getproccount()
-	getg().m.procid = getpid()
-	notify(unsafe.Pointer(funcPC(sigtramp)))
-}
-
-func crash() {
-	notify(nil)
-	*(*int)(nil) = 0
-}
-
-//go:nosplit
-func getRandomData(r []byte) {
-	extendRandom(r, 0)
-}
-
-func goenvs() {
-}
-
-func initsig() {
-}
-
-//go:nosplit
-func osyield() {
-	sleep(0)
-}
-
-//go:nosplit
-func usleep(µs uint32) {
-	ms := int32(µs / 1000)
-	if ms == 0 {
-		ms = 1
-	}
-	sleep(ms)
-}
-
-//go:nosplit
-func nanotime() int64 {
-	var scratch int64
-	ns := nsec(&scratch)
-	// TODO(aram): remove hack after I fix _nsec in the pc64 kernel.
-	if ns == 0 {
-		return scratch
-	}
-	return ns
-}
-
-//go:nosplit
-func itoa(buf []byte, val uint64) []byte {
-	i := len(buf) - 1
-	for val >= 10 {
-		buf[i] = byte(val%10 + '0')
-		i--
-		val /= 10
-	}
-	buf[i] = byte(val + '0')
-	return buf[i:]
-}
-
-var goexits = []byte("go: exit ")
-
-func goexitsall(status *byte) {
-	var buf [_ERRMAX]byte
-	n := copy(buf[:], goexits)
-	n = copy(buf[n:], gostringnocopy(status))
-	pid := getpid()
-	for mp := (*m)(atomicloadp(unsafe.Pointer(&allm))); mp != nil; mp = mp.alllink {
-		if mp.procid != pid {
-			postnote(mp.procid, buf[:])
-		}
-	}
-}
-
-var procdir = []byte("/proc/")
-var notefile = []byte("/note\x00")
-
-func postnote(pid uint64, msg []byte) int {
-	var buf [128]byte
-	var tmp [32]byte
-	n := copy(buf[:], procdir)
-	n += copy(buf[n:], itoa(tmp[:], pid))
-	copy(buf[n:], notefile)
-	fd := open(&buf[0], _OWRITE, 0)
-	if fd < 0 {
-		return -1
-	}
-	len := findnull(&msg[0])
-	if write(uintptr(fd), (unsafe.Pointer)(&msg[0]), int32(len)) != int64(len) {
-		closefd(fd)
-		return -1
-	}
-	closefd(fd)
-	return 0
-}
-
-//go:nosplit
-func exit(e int) {
-	var status []byte
-	if e == 0 {
-		status = []byte("\x00")
-	} else {
-		// build error string
-		var tmp [32]byte
-		status = append(itoa(tmp[:len(tmp)-1], uint64(e)), 0)
-	}
-	goexitsall(&status[0])
-	exits(&status[0])
-}
-
-// May run with m.p==nil, so write barriers are not allowed.
-//go:nowritebarrier
-func newosproc(mp *m, stk unsafe.Pointer) {
-	if false {
-		print("newosproc mp=", mp, " ostk=", &mp, "\n")
-	}
-	pid := rfork(_RFPROC | _RFMEM | _RFNOWAIT)
-	if pid < 0 {
-		throw("newosproc: rfork failed")
-	}
-	if pid == 0 {
-		tstart_plan9(mp)
-	}
-}
-
-//go:nosplit
-func semacreate() uintptr {
-	return 1
-}
-
-//go:nosplit
-func semasleep(ns int64) int {
-	_g_ := getg()
-	if ns >= 0 {
-		ms := timediv(ns, 1000000, nil)
-		if ms == 0 {
-			ms = 1
-		}
-		ret := plan9_tsemacquire(&_g_.m.waitsemacount, ms)
-		if ret == 1 {
-			return 0 // success
-		}
-		return -1 // timeout or interrupted
-	}
-	for plan9_semacquire(&_g_.m.waitsemacount, 1) < 0 {
-		// interrupted; try again (c.f. lock_sema.go)
-	}
-	return 0 // success
-}
-
-//go:nosplit
-func semawakeup(mp *m) {
-	plan9_semrelease(&mp.waitsemacount, 1)
-}
-
-//go:nosplit
-func read(fd int32, buf unsafe.Pointer, n int32) int32 {
-	return pread(fd, buf, n, -1)
-}
-
-//go:nosplit
-func write(fd uintptr, buf unsafe.Pointer, n int32) int64 {
-	return int64(pwrite(int32(fd), buf, n, -1))
-}
-
-func memlimit() uint64 {
-	return 0
-}
-
-var _badsignal = []byte("runtime: signal received on thread not created by Go.\n")
-
-// This runs on a foreign stack, without an m or a g.  No stack split.
-//go:nosplit
-func badsignal2() {
-	pwrite(2, unsafe.Pointer(&_badsignal[0]), int32(len(_badsignal)), -1)
-	exits(&_badsignal[0])
-}
-
-func raisebadsignal(sig int32) {
-	badsignal2()
-}
-
-func _atoi(b []byte) int {
-	n := 0
-	for len(b) > 0 && '0' <= b[0] && b[0] <= '9' {
-		n = n*10 + int(b[0]) - '0'
-		b = b[1:]
-	}
-	return n
-}
diff --git a/src/runtime/os1_windows.go b/src/runtime/os1_windows.go
deleted file mode 100644
index f608b4a..0000000
--- a/src/runtime/os1_windows.go
+++ /dev/null
@@ -1,540 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import (
-	"unsafe"
-)
-
-//go:cgo_import_dynamic runtime._AddVectoredExceptionHandler AddVectoredExceptionHandler%2 "kernel32.dll"
-//go:cgo_import_dynamic runtime._CloseHandle CloseHandle%1 "kernel32.dll"
-//go:cgo_import_dynamic runtime._CreateEventA CreateEventA%4 "kernel32.dll"
-//go:cgo_import_dynamic runtime._CreateIoCompletionPort CreateIoCompletionPort%4 "kernel32.dll"
-//go:cgo_import_dynamic runtime._CreateThread CreateThread%6 "kernel32.dll"
-//go:cgo_import_dynamic runtime._CreateWaitableTimerA CreateWaitableTimerA%3 "kernel32.dll"
-//go:cgo_import_dynamic runtime._CryptAcquireContextW CryptAcquireContextW%5 "advapi32.dll"
-//go:cgo_import_dynamic runtime._CryptGenRandom CryptGenRandom%3 "advapi32.dll"
-//go:cgo_import_dynamic runtime._CryptReleaseContext CryptReleaseContext%2 "advapi32.dll"
-//go:cgo_import_dynamic runtime._DuplicateHandle DuplicateHandle%7 "kernel32.dll"
-//go:cgo_import_dynamic runtime._ExitProcess ExitProcess%1 "kernel32.dll"
-//go:cgo_import_dynamic runtime._FreeEnvironmentStringsW FreeEnvironmentStringsW%1 "kernel32.dll"
-//go:cgo_import_dynamic runtime._GetEnvironmentStringsW GetEnvironmentStringsW%0 "kernel32.dll"
-//go:cgo_import_dynamic runtime._GetProcAddress GetProcAddress%2 "kernel32.dll"
-//go:cgo_import_dynamic runtime._GetQueuedCompletionStatus GetQueuedCompletionStatus%5 "kernel32.dll"
-//go:cgo_import_dynamic runtime._GetStdHandle GetStdHandle%1 "kernel32.dll"
-//go:cgo_import_dynamic runtime._GetSystemInfo GetSystemInfo%1 "kernel32.dll"
-//go:cgo_import_dynamic runtime._GetThreadContext GetThreadContext%2 "kernel32.dll"
-//go:cgo_import_dynamic runtime._LoadLibraryW LoadLibraryW%1 "kernel32.dll"
-//go:cgo_import_dynamic runtime._LoadLibraryA LoadLibraryA%1 "kernel32.dll"
-//go:cgo_import_dynamic runtime._NtWaitForSingleObject NtWaitForSingleObject%3 "ntdll.dll"
-//go:cgo_import_dynamic runtime._ResumeThread ResumeThread%1 "kernel32.dll"
-//go:cgo_import_dynamic runtime._SetConsoleCtrlHandler SetConsoleCtrlHandler%2 "kernel32.dll"
-//go:cgo_import_dynamic runtime._SetErrorMode SetErrorMode%1 "kernel32.dll"
-//go:cgo_import_dynamic runtime._SetEvent SetEvent%1 "kernel32.dll"
-//go:cgo_import_dynamic runtime._SetProcessPriorityBoost SetProcessPriorityBoost%2 "kernel32.dll"
-//go:cgo_import_dynamic runtime._SetThreadPriority SetThreadPriority%2 "kernel32.dll"
-//go:cgo_import_dynamic runtime._SetUnhandledExceptionFilter SetUnhandledExceptionFilter%1 "kernel32.dll"
-//go:cgo_import_dynamic runtime._SetWaitableTimer SetWaitableTimer%6 "kernel32.dll"
-//go:cgo_import_dynamic runtime._SuspendThread SuspendThread%1 "kernel32.dll"
-//go:cgo_import_dynamic runtime._VirtualAlloc VirtualAlloc%4 "kernel32.dll"
-//go:cgo_import_dynamic runtime._VirtualFree VirtualFree%3 "kernel32.dll"
-//go:cgo_import_dynamic runtime._WSAGetOverlappedResult WSAGetOverlappedResult%5 "ws2_32.dll"
-//go:cgo_import_dynamic runtime._WaitForSingleObject WaitForSingleObject%2 "kernel32.dll"
-//go:cgo_import_dynamic runtime._WriteFile WriteFile%5 "kernel32.dll"
-//go:cgo_import_dynamic runtime._timeBeginPeriod timeBeginPeriod%1 "winmm.dll"
-
-var (
-	// Following syscalls are available on every Windows PC.
-	// All these variables are set by the Windows executable
-	// loader before the Go program starts.
-	_AddVectoredExceptionHandler,
-	_CloseHandle,
-	_CreateEventA,
-	_CreateIoCompletionPort,
-	_CreateThread,
-	_CreateWaitableTimerA,
-	_CryptAcquireContextW,
-	_CryptGenRandom,
-	_CryptReleaseContext,
-	_DuplicateHandle,
-	_ExitProcess,
-	_FreeEnvironmentStringsW,
-	_GetEnvironmentStringsW,
-	_GetProcAddress,
-	_GetQueuedCompletionStatus,
-	_GetStdHandle,
-	_GetSystemInfo,
-	_GetThreadContext,
-	_LoadLibraryW,
-	_LoadLibraryA,
-	_NtWaitForSingleObject,
-	_ResumeThread,
-	_SetConsoleCtrlHandler,
-	_SetErrorMode,
-	_SetEvent,
-	_SetProcessPriorityBoost,
-	_SetThreadPriority,
-	_SetUnhandledExceptionFilter,
-	_SetWaitableTimer,
-	_SuspendThread,
-	_VirtualAlloc,
-	_VirtualFree,
-	_WSAGetOverlappedResult,
-	_WaitForSingleObject,
-	_WriteFile,
-	_timeBeginPeriod stdFunction
-
-	// Following syscalls are only available on some Windows PCs.
-	// We will load syscalls, if available, before using them.
-	_AddVectoredContinueHandler,
-	_GetQueuedCompletionStatusEx stdFunction
-)
-
-// Call a Windows function with stdcall conventions,
-// and switch to os stack during the call.
-func asmstdcall(fn unsafe.Pointer)
-
-var asmstdcallAddr unsafe.Pointer
-
-func loadOptionalSyscalls() {
-	var buf [50]byte // large enough for longest string
-	strtoptr := func(s string) uintptr {
-		buf[copy(buf[:], s)] = 0 // nil-terminated for OS
-		return uintptr(noescape(unsafe.Pointer(&buf[0])))
-	}
-	l := stdcall1(_LoadLibraryA, strtoptr("kernel32.dll"))
-	findfunc := func(name string) stdFunction {
-		f := stdcall2(_GetProcAddress, l, strtoptr(name))
-		return stdFunction(unsafe.Pointer(f))
-	}
-	if l != 0 {
-		_AddVectoredContinueHandler = findfunc("AddVectoredContinueHandler")
-		_GetQueuedCompletionStatusEx = findfunc("GetQueuedCompletionStatusEx")
-	}
-}
-
-//go:nosplit
-func getLoadLibrary() uintptr {
-	return uintptr(unsafe.Pointer(_LoadLibraryW))
-}
-
-//go:nosplit
-func getGetProcAddress() uintptr {
-	return uintptr(unsafe.Pointer(_GetProcAddress))
-}
-
-func getproccount() int32 {
-	var info systeminfo
-	stdcall1(_GetSystemInfo, uintptr(unsafe.Pointer(&info)))
-	return int32(info.dwnumberofprocessors)
-}
-
-const (
-	currentProcess = ^uintptr(0) // -1 = current process
-	currentThread  = ^uintptr(1) // -2 = current thread
-)
-
-// in sys_windows_386.s and sys_windows_amd64.s
-func externalthreadhandler()
-
-func osinit() {
-	asmstdcallAddr = unsafe.Pointer(funcPC(asmstdcall))
-
-	setBadSignalMsg()
-
-	loadOptionalSyscalls()
-
-	disableWER()
-
-	externalthreadhandlerp = funcPC(externalthreadhandler)
-
-	initExceptionHandler()
-
-	stdcall2(_SetConsoleCtrlHandler, funcPC(ctrlhandler), 1)
-
-	stdcall1(_timeBeginPeriod, 1)
-
-	ncpu = getproccount()
-
-	// Windows dynamic priority boosting assumes that a process has different types
-	// of dedicated threads -- GUI, IO, computational, etc. Go processes use
-	// equivalent threads that all do a mix of GUI, IO, computations, etc.
-	// In such context dynamic priority boosting does nothing but harm, so we turn it off.
-	stdcall2(_SetProcessPriorityBoost, currentProcess, 1)
-}
-
-//go:nosplit
-func getRandomData(r []byte) {
-	const (
-		prov_rsa_full       = 1
-		crypt_verifycontext = 0xF0000000
-	)
-	var handle uintptr
-	n := 0
-	if stdcall5(_CryptAcquireContextW, uintptr(unsafe.Pointer(&handle)), 0, 0, prov_rsa_full, crypt_verifycontext) != 0 {
-		if stdcall3(_CryptGenRandom, handle, uintptr(len(r)), uintptr(unsafe.Pointer(&r[0]))) != 0 {
-			n = len(r)
-		}
-		stdcall2(_CryptReleaseContext, handle, 0)
-	}
-	extendRandom(r, n)
-}
-
-func goenvs() {
-	// strings is a pointer to environment variable pairs in the form:
-	//     "envA=valA\x00envB=valB\x00\x00" (in UTF-16)
-	// Two consecutive zero bytes end the list.
-	strings := unsafe.Pointer(stdcall0(_GetEnvironmentStringsW))
-	p := (*[1 << 24]uint16)(strings)[:]
-
-	n := 0
-	for from, i := 0, 0; true; i++ {
-		if p[i] == 0 {
-			// empty string marks the end
-			if i == from {
-				break
-			}
-			from = i + 1
-			n++
-		}
-	}
-	envs = make([]string, n)
-
-	for i := range envs {
-		envs[i] = gostringw(&p[0])
-		for p[0] != 0 {
-			p = p[1:]
-		}
-		p = p[1:] // skip nil byte
-	}
-
-	stdcall1(_FreeEnvironmentStringsW, uintptr(strings))
-}
-
-//go:nosplit
-func exit(code int32) {
-	stdcall1(_ExitProcess, uintptr(code))
-}
-
-//go:nosplit
-func write(fd uintptr, buf unsafe.Pointer, n int32) int32 {
-	const (
-		_STD_OUTPUT_HANDLE = ^uintptr(10) // -11
-		_STD_ERROR_HANDLE  = ^uintptr(11) // -12
-	)
-	var handle uintptr
-	switch fd {
-	case 1:
-		handle = stdcall1(_GetStdHandle, _STD_OUTPUT_HANDLE)
-	case 2:
-		handle = stdcall1(_GetStdHandle, _STD_ERROR_HANDLE)
-	default:
-		// assume fd is real windows handle.
-		handle = fd
-	}
-	var written uint32
-	stdcall5(_WriteFile, handle, uintptr(buf), uintptr(n), uintptr(unsafe.Pointer(&written)), 0)
-	return int32(written)
-}
-
-//go:nosplit
-func semasleep(ns int64) int32 {
-	// store ms in ns to save stack space
-	if ns < 0 {
-		ns = _INFINITE
-	} else {
-		ns = int64(timediv(ns, 1000000, nil))
-		if ns == 0 {
-			ns = 1
-		}
-	}
-	if stdcall2(_WaitForSingleObject, getg().m.waitsema, uintptr(ns)) != 0 {
-		return -1 // timeout
-	}
-	return 0
-}
-
-//go:nosplit
-func semawakeup(mp *m) {
-	stdcall1(_SetEvent, mp.waitsema)
-}
-
-//go:nosplit
-func semacreate() uintptr {
-	return stdcall4(_CreateEventA, 0, 0, 0, 0)
-}
-
-// May run with m.p==nil, so write barriers are not allowed.
-//go:nowritebarrier
-func newosproc(mp *m, stk unsafe.Pointer) {
-	const _STACK_SIZE_PARAM_IS_A_RESERVATION = 0x00010000
-	thandle := stdcall6(_CreateThread, 0, 0x20000,
-		funcPC(tstart_stdcall), uintptr(unsafe.Pointer(mp)),
-		_STACK_SIZE_PARAM_IS_A_RESERVATION, 0)
-	if thandle == 0 {
-		print("runtime: failed to create new OS thread (have ", mcount(), " already; errno=", getlasterror(), ")\n")
-		throw("runtime.newosproc")
-	}
-}
-
-// Called to initialize a new m (including the bootstrap m).
-// Called on the parent thread (main thread in case of bootstrap), can allocate memory.
-func mpreinit(mp *m) {
-}
-
-func msigsave(mp *m) {
-}
-
-// Called to initialize a new m (including the bootstrap m).
-// Called on the new thread, can not allocate memory.
-func minit() {
-	var thandle uintptr
-	stdcall7(_DuplicateHandle, currentProcess, currentThread, currentProcess, uintptr(unsafe.Pointer(&thandle)), 0, 0, _DUPLICATE_SAME_ACCESS)
-	atomicstoreuintptr(&getg().m.thread, thandle)
-}
-
-// Called from dropm to undo the effect of an minit.
-func unminit() {
-	tp := &getg().m.thread
-	stdcall1(_CloseHandle, *tp)
-	*tp = 0
-}
-
-// Described in http://www.dcl.hpi.uni-potsdam.de/research/WRK/2007/08/getting-os-information-the-kuser_shared_data-structure/
-type _KSYSTEM_TIME struct {
-	LowPart   uint32
-	High1Time int32
-	High2Time int32
-}
-
-const (
-	_INTERRUPT_TIME = 0x7ffe0008
-	_SYSTEM_TIME    = 0x7ffe0014
-)
-
-//go:nosplit
-func systime(addr uintptr) int64 {
-	timeaddr := (*_KSYSTEM_TIME)(unsafe.Pointer(addr))
-
-	var t _KSYSTEM_TIME
-	for i := 1; i < 10000; i++ {
-		// these fields must be read in that order (see URL above)
-		t.High1Time = timeaddr.High1Time
-		t.LowPart = timeaddr.LowPart
-		t.High2Time = timeaddr.High2Time
-		if t.High1Time == t.High2Time {
-			return int64(t.High1Time)<<32 | int64(t.LowPart)
-		}
-		if (i % 100) == 0 {
-			osyield()
-		}
-	}
-	systemstack(func() {
-		throw("interrupt/system time is changing too fast")
-	})
-	return 0
-}
-
-//go:nosplit
-func unixnano() int64 {
-	return (systime(_SYSTEM_TIME) - 116444736000000000) * 100
-}
-
-//go:nosplit
-func nanotime() int64 {
-	return systime(_INTERRUPT_TIME) * 100
-}
-
-// Calling stdcall on os stack.
-// May run during STW, so write barriers are not allowed.
-//go:nowritebarrier
-//go:nosplit
-func stdcall(fn stdFunction) uintptr {
-	gp := getg()
-	mp := gp.m
-	mp.libcall.fn = uintptr(unsafe.Pointer(fn))
-
-	if mp.profilehz != 0 {
-		// leave pc/sp for cpu profiler
-		mp.libcallg.set(gp)
-		mp.libcallpc = getcallerpc(unsafe.Pointer(&fn))
-		// sp must be the last, because once async cpu profiler finds
-		// all three values to be non-zero, it will use them
-		mp.libcallsp = getcallersp(unsafe.Pointer(&fn))
-	}
-	asmcgocall(asmstdcallAddr, unsafe.Pointer(&mp.libcall))
-	mp.libcallsp = 0
-	return mp.libcall.r1
-}
-
-//go:nosplit
-func stdcall0(fn stdFunction) uintptr {
-	mp := getg().m
-	mp.libcall.n = 0
-	mp.libcall.args = uintptr(noescape(unsafe.Pointer(&fn))) // it's unused but must be non-nil, otherwise crashes
-	return stdcall(fn)
-}
-
-//go:nosplit
-func stdcall1(fn stdFunction, a0 uintptr) uintptr {
-	mp := getg().m
-	mp.libcall.n = 1
-	mp.libcall.args = uintptr(noescape(unsafe.Pointer(&a0)))
-	return stdcall(fn)
-}
-
-//go:nosplit
-func stdcall2(fn stdFunction, a0, a1 uintptr) uintptr {
-	mp := getg().m
-	mp.libcall.n = 2
-	mp.libcall.args = uintptr(noescape(unsafe.Pointer(&a0)))
-	return stdcall(fn)
-}
-
-//go:nosplit
-func stdcall3(fn stdFunction, a0, a1, a2 uintptr) uintptr {
-	mp := getg().m
-	mp.libcall.n = 3
-	mp.libcall.args = uintptr(noescape(unsafe.Pointer(&a0)))
-	return stdcall(fn)
-}
-
-//go:nosplit
-func stdcall4(fn stdFunction, a0, a1, a2, a3 uintptr) uintptr {
-	mp := getg().m
-	mp.libcall.n = 4
-	mp.libcall.args = uintptr(noescape(unsafe.Pointer(&a0)))
-	return stdcall(fn)
-}
-
-//go:nosplit
-func stdcall5(fn stdFunction, a0, a1, a2, a3, a4 uintptr) uintptr {
-	mp := getg().m
-	mp.libcall.n = 5
-	mp.libcall.args = uintptr(noescape(unsafe.Pointer(&a0)))
-	return stdcall(fn)
-}
-
-//go:nosplit
-func stdcall6(fn stdFunction, a0, a1, a2, a3, a4, a5 uintptr) uintptr {
-	mp := getg().m
-	mp.libcall.n = 6
-	mp.libcall.args = uintptr(noescape(unsafe.Pointer(&a0)))
-	return stdcall(fn)
-}
-
-//go:nosplit
-func stdcall7(fn stdFunction, a0, a1, a2, a3, a4, a5, a6 uintptr) uintptr {
-	mp := getg().m
-	mp.libcall.n = 7
-	mp.libcall.args = uintptr(noescape(unsafe.Pointer(&a0)))
-	return stdcall(fn)
-}
-
-// in sys_windows_386.s and sys_windows_amd64.s
-func usleep1(usec uint32)
-
-//go:nosplit
-func osyield() {
-	usleep1(1)
-}
-
-//go:nosplit
-func usleep(us uint32) {
-	// Have 1us units; want 100ns units.
-	usleep1(10 * us)
-}
-
-func ctrlhandler1(_type uint32) uint32 {
-	var s uint32
-
-	switch _type {
-	case _CTRL_C_EVENT, _CTRL_BREAK_EVENT:
-		s = _SIGINT
-	default:
-		return 0
-	}
-
-	if sigsend(s) {
-		return 1
-	}
-	exit(2) // SIGINT, SIGTERM, etc
-	return 0
-}
-
-// in sys_windows_386.s and sys_windows_amd64.s
-func profileloop()
-
-var profiletimer uintptr
-
-func profilem(mp *m) {
-	var r *context
-	rbuf := make([]byte, unsafe.Sizeof(*r)+15)
-
-	tls := &mp.tls[0]
-	if mp == &m0 {
-		tls = &tls0[0]
-	}
-	gp := *((**g)(unsafe.Pointer(tls)))
-
-	// align Context to 16 bytes
-	r = (*context)(unsafe.Pointer((uintptr(unsafe.Pointer(&rbuf[15]))) &^ 15))
-	r.contextflags = _CONTEXT_CONTROL
-	stdcall2(_GetThreadContext, mp.thread, uintptr(unsafe.Pointer(r)))
-	sigprof(r.ip(), r.sp(), 0, gp, mp)
-}
-
-func profileloop1(param uintptr) uint32 {
-	stdcall2(_SetThreadPriority, currentThread, _THREAD_PRIORITY_HIGHEST)
-
-	for {
-		stdcall2(_WaitForSingleObject, profiletimer, _INFINITE)
-		first := (*m)(atomicloadp(unsafe.Pointer(&allm)))
-		for mp := first; mp != nil; mp = mp.alllink {
-			thread := atomicloaduintptr(&mp.thread)
-			// Do not profile threads blocked on Notes,
-			// this includes idle worker threads,
-			// idle timer thread, idle heap scavenger, etc.
-			if thread == 0 || mp.profilehz == 0 || mp.blocked {
-				continue
-			}
-			stdcall1(_SuspendThread, thread)
-			if mp.profilehz != 0 && !mp.blocked {
-				profilem(mp)
-			}
-			stdcall1(_ResumeThread, thread)
-		}
-	}
-}
-
-var cpuprofilerlock mutex
-
-func resetcpuprofiler(hz int32) {
-	lock(&cpuprofilerlock)
-	if profiletimer == 0 {
-		timer := stdcall3(_CreateWaitableTimerA, 0, 0, 0)
-		atomicstoreuintptr(&profiletimer, timer)
-		thread := stdcall6(_CreateThread, 0, 0, funcPC(profileloop), 0, 0, 0)
-		stdcall2(_SetThreadPriority, thread, _THREAD_PRIORITY_HIGHEST)
-		stdcall1(_CloseHandle, thread)
-	}
-	unlock(&cpuprofilerlock)
-
-	ms := int32(0)
-	due := ^int64(^uint64(1 << 63))
-	if hz > 0 {
-		ms = 1000 / hz
-		if ms == 0 {
-			ms = 1
-		}
-		due = int64(ms) * -10000
-	}
-	stdcall6(_SetWaitableTimer, profiletimer, uintptr(unsafe.Pointer(&due)), uintptr(ms), 0, 0, 0)
-	atomicstore((*uint32)(unsafe.Pointer(&getg().m.profilehz)), uint32(hz))
-}
-
-func memlimit() uintptr {
-	return 0
-}
diff --git a/src/runtime/os2_darwin.go b/src/runtime/os2_darwin.go
deleted file mode 100644
index 542bd74..0000000
--- a/src/runtime/os2_darwin.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-const (
-	_NSIG        = 32
-	_SI_USER     = 0 /* empirically true, but not what headers say */
-	_SIG_BLOCK   = 1
-	_SIG_UNBLOCK = 2
-	_SIG_SETMASK = 3
-	_SS_DISABLE  = 4
-)
diff --git a/src/runtime/os2_dragonfly.go b/src/runtime/os2_dragonfly.go
deleted file mode 100644
index ccad82f..0000000
--- a/src/runtime/os2_dragonfly.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-const (
-	_NSIG        = 33
-	_SI_USER     = 0x10001
-	_SS_DISABLE  = 4
-	_RLIMIT_AS   = 10
-	_SIG_BLOCK   = 1
-	_SIG_UNBLOCK = 2
-	_SIG_SETMASK = 3
-)
diff --git a/src/runtime/os2_freebsd.go b/src/runtime/os2_freebsd.go
deleted file mode 100644
index 84ab715..0000000
--- a/src/runtime/os2_freebsd.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-const (
-	_SS_DISABLE  = 4
-	_NSIG        = 33
-	_SI_USER     = 0x10001
-	_RLIMIT_AS   = 10
-	_SIG_BLOCK   = 1
-	_SIG_UNBLOCK = 2
-	_SIG_SETMASK = 3
-)
diff --git a/src/runtime/os2_linux.go b/src/runtime/os2_linux.go
deleted file mode 100644
index 71f36eb..0000000
--- a/src/runtime/os2_linux.go
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-const (
-	_SS_DISABLE  = 2
-	_NSIG        = 65
-	_SI_USER     = 0
-	_SIG_BLOCK   = 0
-	_SIG_UNBLOCK = 1
-	_SIG_SETMASK = 2
-	_RLIMIT_AS   = 9
-)
-
-// It's hard to tease out exactly how big a Sigset is, but
-// rt_sigprocmask crashes if we get it wrong, so if binaries
-// are running, this is right.
-type sigset [2]uint32
-
-type rlimit struct {
-	rlim_cur uintptr
-	rlim_max uintptr
-}
diff --git a/src/runtime/os2_nacl.go b/src/runtime/os2_nacl.go
deleted file mode 100644
index 0c91e0f..0000000
--- a/src/runtime/os2_nacl.go
+++ /dev/null
@@ -1,154 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-const (
-	_NSIG    = 32
-	_SI_USER = 1
-
-	// native_client/src/trusted/service_runtime/include/sys/errno.h
-	// The errors are mainly copied from Linux.
-	_EPERM           = 1        /* Operation not permitted */
-	_ENOENT          = 2        /* No such file or directory */
-	_ESRCH           = 3        /* No such process */
-	_EINTR           = 4        /* Interrupted system call */
-	_EIO             = 5        /* I/O error */
-	_ENXIO           = 6        /* No such device or address */
-	_E2BIG           = 7        /* Argument list too long */
-	_ENOEXEC         = 8        /* Exec format error */
-	_EBADF           = 9        /* Bad file number */
-	_ECHILD          = 10       /* No child processes */
-	_EAGAIN          = 11       /* Try again */
-	_ENOMEM          = 12       /* Out of memory */
-	_EACCES          = 13       /* Permission denied */
-	_EFAULT          = 14       /* Bad address */
-	_EBUSY           = 16       /* Device or resource busy */
-	_EEXIST          = 17       /* File exists */
-	_EXDEV           = 18       /* Cross-device link */
-	_ENODEV          = 19       /* No such device */
-	_ENOTDIR         = 20       /* Not a directory */
-	_EISDIR          = 21       /* Is a directory */
-	_EINVAL          = 22       /* Invalid argument */
-	_ENFILE          = 23       /* File table overflow */
-	_EMFILE          = 24       /* Too many open files */
-	_ENOTTY          = 25       /* Not a typewriter */
-	_EFBIG           = 27       /* File too large */
-	_ENOSPC          = 28       /* No space left on device */
-	_ESPIPE          = 29       /* Illegal seek */
-	_EROFS           = 30       /* Read-only file system */
-	_EMLINK          = 31       /* Too many links */
-	_EPIPE           = 32       /* Broken pipe */
-	_ENAMETOOLONG    = 36       /* File name too long */
-	_ENOSYS          = 38       /* Function not implemented */
-	_EDQUOT          = 122      /* Quota exceeded */
-	_EDOM            = 33       /* Math arg out of domain of func */
-	_ERANGE          = 34       /* Math result not representable */
-	_EDEADLK         = 35       /* Deadlock condition */
-	_ENOLCK          = 37       /* No record locks available */
-	_ENOTEMPTY       = 39       /* Directory not empty */
-	_ELOOP           = 40       /* Too many symbolic links */
-	_ENOMSG          = 42       /* No message of desired type */
-	_EIDRM           = 43       /* Identifier removed */
-	_ECHRNG          = 44       /* Channel number out of range */
-	_EL2NSYNC        = 45       /* Level 2 not synchronized */
-	_EL3HLT          = 46       /* Level 3 halted */
-	_EL3RST          = 47       /* Level 3 reset */
-	_ELNRNG          = 48       /* Link number out of range */
-	_EUNATCH         = 49       /* Protocol driver not attached */
-	_ENOCSI          = 50       /* No CSI structure available */
-	_EL2HLT          = 51       /* Level 2 halted */
-	_EBADE           = 52       /* Invalid exchange */
-	_EBADR           = 53       /* Invalid request descriptor */
-	_EXFULL          = 54       /* Exchange full */
-	_ENOANO          = 55       /* No anode */
-	_EBADRQC         = 56       /* Invalid request code */
-	_EBADSLT         = 57       /* Invalid slot */
-	_EDEADLOCK       = _EDEADLK /* File locking deadlock error */
-	_EBFONT          = 59       /* Bad font file fmt */
-	_ENOSTR          = 60       /* Device not a stream */
-	_ENODATA         = 61       /* No data (for no delay io) */
-	_ETIME           = 62       /* Timer expired */
-	_ENOSR           = 63       /* Out of streams resources */
-	_ENONET          = 64       /* Machine is not on the network */
-	_ENOPKG          = 65       /* Package not installed */
-	_EREMOTE         = 66       /* The object is remote */
-	_ENOLINK         = 67       /* The link has been severed */
-	_EADV            = 68       /* Advertise error */
-	_ESRMNT          = 69       /* Srmount error */
-	_ECOMM           = 70       /* Communication error on send */
-	_EPROTO          = 71       /* Protocol error */
-	_EMULTIHOP       = 72       /* Multihop attempted */
-	_EDOTDOT         = 73       /* Cross mount point (not really error) */
-	_EBADMSG         = 74       /* Trying to read unreadable message */
-	_EOVERFLOW       = 75       /* Value too large for defined data type */
-	_ENOTUNIQ        = 76       /* Given log. name not unique */
-	_EBADFD          = 77       /* f.d. invalid for this operation */
-	_EREMCHG         = 78       /* Remote address changed */
-	_ELIBACC         = 79       /* Can't access a needed shared lib */
-	_ELIBBAD         = 80       /* Accessing a corrupted shared lib */
-	_ELIBSCN         = 81       /* .lib section in a.out corrupted */
-	_ELIBMAX         = 82       /* Attempting to link in too many libs */
-	_ELIBEXEC        = 83       /* Attempting to exec a shared library */
-	_EILSEQ          = 84
-	_EUSERS          = 87
-	_ENOTSOCK        = 88  /* Socket operation on non-socket */
-	_EDESTADDRREQ    = 89  /* Destination address required */
-	_EMSGSIZE        = 90  /* Message too long */
-	_EPROTOTYPE      = 91  /* Protocol wrong type for socket */
-	_ENOPROTOOPT     = 92  /* Protocol not available */
-	_EPROTONOSUPPORT = 93  /* Unknown protocol */
-	_ESOCKTNOSUPPORT = 94  /* Socket type not supported */
-	_EOPNOTSUPP      = 95  /* Operation not supported on transport endpoint */
-	_EPFNOSUPPORT    = 96  /* Protocol family not supported */
-	_EAFNOSUPPORT    = 97  /* Address family not supported by protocol family */
-	_EADDRINUSE      = 98  /* Address already in use */
-	_EADDRNOTAVAIL   = 99  /* Address not available */
-	_ENETDOWN        = 100 /* Network interface is not configured */
-	_ENETUNREACH     = 101 /* Network is unreachable */
-	_ENETRESET       = 102
-	_ECONNABORTED    = 103 /* Connection aborted */
-	_ECONNRESET      = 104 /* Connection reset by peer */
-	_ENOBUFS         = 105 /* No buffer space available */
-	_EISCONN         = 106 /* Socket is already connected */
-	_ENOTCONN        = 107 /* Socket is not connected */
-	_ESHUTDOWN       = 108 /* Can't send after socket shutdown */
-	_ETOOMANYREFS    = 109
-	_ETIMEDOUT       = 110 /* Connection timed out */
-	_ECONNREFUSED    = 111 /* Connection refused */
-	_EHOSTDOWN       = 112 /* Host is down */
-	_EHOSTUNREACH    = 113 /* Host is unreachable */
-	_EALREADY        = 114 /* Socket already connected */
-	_EINPROGRESS     = 115 /* Connection already in progress */
-	_ESTALE          = 116
-	_ENOTSUP         = _EOPNOTSUPP /* Not supported */
-	_ENOMEDIUM       = 123         /* No medium (in tape drive) */
-	_ECANCELED       = 125         /* Operation canceled. */
-	_ELBIN           = 2048        /* Inode is remote (not really error) */
-	_EFTYPE          = 2049        /* Inappropriate file type or format */
-	_ENMFILE         = 2050        /* No more files */
-	_EPROCLIM        = 2051
-	_ENOSHARE        = 2052    /* No such host or network path */
-	_ECASECLASH      = 2053    /* Filename exists with different case */
-	_EWOULDBLOCK     = _EAGAIN /* Operation would block */
-
-	// native_client/src/trusted/service_runtime/include/bits/mman.h.
-	// NOTE: DO NOT USE native_client/src/shared/imc/nacl_imc_c.h.
-	// Those MAP_*values are different from these.
-	_PROT_NONE  = 0x0
-	_PROT_READ  = 0x1
-	_PROT_WRITE = 0x2
-	_PROT_EXEC  = 0x4
-
-	_MAP_SHARED  = 0x1
-	_MAP_PRIVATE = 0x2
-	_MAP_FIXED   = 0x10
-	_MAP_ANON    = 0x20
-
-	_MADV_FREE  = 0
-	_SIGFPE     = 8
-	_FPE_INTDIV = 0
-)
-
-type siginfo struct{}
diff --git a/src/runtime/os2_netbsd.go b/src/runtime/os2_netbsd.go
deleted file mode 100644
index 46576b9..0000000
--- a/src/runtime/os2_netbsd.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2010 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-const (
-	_SS_DISABLE  = 4
-	_SIG_BLOCK   = 1
-	_SIG_UNBLOCK = 2
-	_SIG_SETMASK = 3
-	_NSIG        = 33
-	_SI_USER     = 0
-
-	// From NetBSD's <sys/ucontext.h>
-	_UC_SIGMASK = 0x01
-	_UC_CPU     = 0x04
-)
diff --git a/src/runtime/os2_openbsd.go b/src/runtime/os2_openbsd.go
deleted file mode 100644
index 1e785ad..0000000
--- a/src/runtime/os2_openbsd.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2010 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-const (
-	_SS_DISABLE  = 4
-	_SIG_BLOCK   = 1
-	_SIG_UNBLOCK = 2
-	_SIG_SETMASK = 3
-	_NSIG        = 33
-	_SI_USER     = 0
-)
diff --git a/src/runtime/os2_plan9.go b/src/runtime/os2_plan9.go
deleted file mode 100644
index 58fb2be..0000000
--- a/src/runtime/os2_plan9.go
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Plan 9-specific system calls
-
-package runtime
-
-// open
-const (
-	_OREAD   = 0
-	_OWRITE  = 1
-	_ORDWR   = 2
-	_OEXEC   = 3
-	_OTRUNC  = 16
-	_OCEXEC  = 32
-	_ORCLOSE = 64
-	_OEXCL   = 0x1000
-)
-
-// rfork
-const (
-	_RFNAMEG  = 1 << 0
-	_RFENVG   = 1 << 1
-	_RFFDG    = 1 << 2
-	_RFNOTEG  = 1 << 3
-	_RFPROC   = 1 << 4
-	_RFMEM    = 1 << 5
-	_RFNOWAIT = 1 << 6
-	_RFCNAMEG = 1 << 10
-	_RFCENVG  = 1 << 11
-	_RFCFDG   = 1 << 12
-	_RFREND   = 1 << 13
-	_RFNOMNT  = 1 << 14
-)
-
-// notify
-const (
-	_NCONT = 0
-	_NDFLT = 1
-)
-
-type uinptr _Plink
-
-type tos struct {
-	prof struct { // Per process profiling
-		pp    *_Plink // known to be 0(ptr)
-		next  *_Plink // known to be 4(ptr)
-		last  *_Plink
-		first *_Plink
-		pid   uint32
-		what  uint32
-	}
-	cyclefreq uint64 // cycle clock frequency if there is one, 0 otherwise
-	kcycles   int64  // cycles spent in kernel
-	pcycles   int64  // cycles spent in process (kernel + user)
-	pid       uint32 // might as well put the pid here
-	clock     uint32
-	// top of stack is here
-}
-
-const (
-	_NSIG   = 14  // number of signals in sigtable array
-	_ERRMAX = 128 // max length of note string
-
-	// Notes in runtime·sigtab that are handled by runtime·sigpanic.
-	_SIGRFAULT = 2
-	_SIGWFAULT = 3
-	_SIGINTDIV = 4
-	_SIGFLOAT  = 5
-	_SIGTRAP   = 6
-	_SIGPROF   = 0 // dummy value defined for badsignal
-	_SIGQUIT   = 0 // dummy value defined for sighandler
-)
diff --git a/src/runtime/os2_solaris.go b/src/runtime/os2_solaris.go
deleted file mode 100644
index f5c0c83..0000000
--- a/src/runtime/os2_solaris.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-const (
-	_SS_DISABLE  = 2
-	_SIG_UNBLOCK = 2
-	_SIG_SETMASK = 3
-	_NSIG        = 73 /* number of signals in sigtable array */
-	_SI_USER     = 0
-	_RLIMIT_AS   = 10
-)
diff --git a/src/runtime/os2_windows.go b/src/runtime/os2_windows.go
deleted file mode 100644
index a867dfe..0000000
--- a/src/runtime/os2_windows.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-func getlasterror() uint32
-func setlasterror(err uint32)
-
-// Function to be called by windows CreateThread
-// to start new os thread.
-func tstart_stdcall(newm *m) uint32
-
-func ctrlhandler(_type uint32) uint32
-
-// TODO(brainman): should not need those
-const (
-	_NSIG = 65
-)
diff --git a/src/runtime/os3_plan9.go b/src/runtime/os3_plan9.go
deleted file mode 100644
index 03e9410..0000000
--- a/src/runtime/os3_plan9.go
+++ /dev/null
@@ -1,128 +0,0 @@
-// Copyright 2010 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-// May run during STW, so write barriers are not allowed.
-//go:nowritebarrier
-func sighandler(_ureg *ureg, note *byte, gp *g) int {
-	_g_ := getg()
-	var t sigTabT
-	var docrash bool
-	var sig int
-	var flags int
-
-	c := &sigctxt{_ureg}
-	notestr := gostringnocopy(note)
-
-	// The kernel will never pass us a nil note or ureg so we probably
-	// made a mistake somewhere in sigtramp.
-	if _ureg == nil || note == nil {
-		print("sighandler: ureg ", _ureg, " note ", note, "\n")
-		goto Throw
-	}
-	// Check that the note is no more than ERRMAX bytes (including
-	// the trailing NUL). We should never receive a longer note.
-	if len(notestr) > _ERRMAX-1 {
-		print("sighandler: note is longer than ERRMAX\n")
-		goto Throw
-	}
-	// See if the note matches one of the patterns in sigtab.
-	// Notes that do not match any pattern can be handled at a higher
-	// level by the program but will otherwise be ignored.
-	flags = _SigNotify
-	for sig, t = range sigtable {
-		if hasprefix(notestr, t.name) {
-			flags = t.flags
-			break
-		}
-	}
-	if flags&_SigGoExit != 0 {
-		exits((*byte)(add(unsafe.Pointer(note), 9))) // Strip "go: exit " prefix.
-	}
-	if flags&_SigPanic != 0 {
-		// Copy the error string from sigtramp's stack into m->notesig so
-		// we can reliably access it from the panic routines.
-		memmove(unsafe.Pointer(_g_.m.notesig), unsafe.Pointer(note), uintptr(len(notestr)+1))
-		gp.sig = uint32(sig)
-		gp.sigpc = c.pc()
-
-		pc := uintptr(c.pc())
-		sp := uintptr(c.sp())
-
-		// If we don't recognize the PC as code
-		// but we do recognize the top pointer on the stack as code,
-		// then assume this was a call to non-code and treat like
-		// pc == 0, to make unwinding show the context.
-		if pc != 0 && findfunc(pc) == nil && findfunc(*(*uintptr)(unsafe.Pointer(sp))) != nil {
-			pc = 0
-		}
-
-		// Only push sigpanic if PC != 0.
-		//
-		// If PC == 0, probably panicked because of a call to a nil func.
-		// Not pushing that onto SP will make the trace look like a call
-		// to sigpanic instead. (Otherwise the trace will end at
-		// sigpanic and we won't get to see who faulted).
-		if pc != 0 {
-			if regSize > ptrSize {
-				sp -= ptrSize
-				*(*uintptr)(unsafe.Pointer(sp)) = 0
-			}
-			sp -= ptrSize
-			*(*uintptr)(unsafe.Pointer(sp)) = pc
-			c.setsp(sp)
-		}
-		c.setpc(funcPC(sigpanic))
-		return _NCONT
-	}
-	if flags&_SigNotify != 0 {
-		if sendNote(note) {
-			return _NCONT
-		}
-	}
-	if flags&_SigKill != 0 {
-		goto Exit
-	}
-	if flags&_SigThrow == 0 {
-		return _NCONT
-	}
-Throw:
-	_g_.m.throwing = 1
-	_g_.m.caughtsig.set(gp)
-	startpanic()
-	print(notestr, "\n")
-	print("PC=", hex(c.pc()), "\n")
-	print("\n")
-	if gotraceback(&docrash) > 0 {
-		goroutineheader(gp)
-		tracebacktrap(c.pc(), c.sp(), 0, gp)
-		tracebackothers(gp)
-		print("\n")
-		dumpregs(_ureg)
-	}
-	if docrash {
-		crash()
-	}
-Exit:
-	goexitsall(note)
-	exits(note)
-	return _NDFLT // not reached
-}
-
-func sigenable(sig uint32) {
-}
-
-func sigdisable(sig uint32) {
-}
-
-func sigignore(sig uint32) {
-}
-
-func resetcpuprofiler(hz int32) {
-	// TODO: Enable profiling interrupts.
-	getg().m.profilehz = hz
-}
diff --git a/src/runtime/os3_solaris.go b/src/runtime/os3_solaris.go
deleted file mode 100644
index 792188f..0000000
--- a/src/runtime/os3_solaris.go
+++ /dev/null
@@ -1,529 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-//go:cgo_export_dynamic runtime.end _end
-//go:cgo_export_dynamic runtime.etext _etext
-//go:cgo_export_dynamic runtime.edata _edata
-
-//go:cgo_import_dynamic libc____errno ___errno "libc.so"
-//go:cgo_import_dynamic libc_clock_gettime clock_gettime "libc.so"
-//go:cgo_import_dynamic libc_close close "libc.so"
-//go:cgo_import_dynamic libc_exit exit "libc.so"
-//go:cgo_import_dynamic libc_fstat fstat "libc.so"
-//go:cgo_import_dynamic libc_getcontext getcontext "libc.so"
-//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so"
-//go:cgo_import_dynamic libc_kill kill "libc.so"
-//go:cgo_import_dynamic libc_madvise madvise "libc.so"
-//go:cgo_import_dynamic libc_malloc malloc "libc.so"
-//go:cgo_import_dynamic libc_mmap mmap "libc.so"
-//go:cgo_import_dynamic libc_munmap munmap "libc.so"
-//go:cgo_import_dynamic libc_open open "libc.so"
-//go:cgo_import_dynamic libc_pthread_attr_destroy pthread_attr_destroy "libc.so"
-//go:cgo_import_dynamic libc_pthread_attr_getstack pthread_attr_getstack "libc.so"
-//go:cgo_import_dynamic libc_pthread_attr_init pthread_attr_init "libc.so"
-//go:cgo_import_dynamic libc_pthread_attr_setdetachstate pthread_attr_setdetachstate "libc.so"
-//go:cgo_import_dynamic libc_pthread_attr_setstack pthread_attr_setstack "libc.so"
-//go:cgo_import_dynamic libc_pthread_create pthread_create "libc.so"
-//go:cgo_import_dynamic libc_raise raise "libc.so"
-//go:cgo_import_dynamic libc_read read "libc.so"
-//go:cgo_import_dynamic libc_select select "libc.so"
-//go:cgo_import_dynamic libc_sched_yield sched_yield "libc.so"
-//go:cgo_import_dynamic libc_sem_init sem_init "libc.so"
-//go:cgo_import_dynamic libc_sem_post sem_post "libc.so"
-//go:cgo_import_dynamic libc_sem_reltimedwait_np sem_reltimedwait_np "libc.so"
-//go:cgo_import_dynamic libc_sem_wait sem_wait "libc.so"
-//go:cgo_import_dynamic libc_setitimer setitimer "libc.so"
-//go:cgo_import_dynamic libc_sigaction sigaction "libc.so"
-//go:cgo_import_dynamic libc_sigaltstack sigaltstack "libc.so"
-//go:cgo_import_dynamic libc_sigprocmask sigprocmask "libc.so"
-//go:cgo_import_dynamic libc_sysconf sysconf "libc.so"
-//go:cgo_import_dynamic libc_usleep usleep "libc.so"
-//go:cgo_import_dynamic libc_write write "libc.so"
-
-//go:linkname libc____errno libc____errno
-//go:linkname libc_clock_gettime libc_clock_gettime
-//go:linkname libc_close libc_close
-//go:linkname libc_exit libc_exit
-//go:linkname libc_fstat libc_fstat
-//go:linkname libc_getcontext libc_getcontext
-//go:linkname libc_getrlimit libc_getrlimit
-//go:linkname libc_kill libc_kill
-//go:linkname libc_madvise libc_madvise
-//go:linkname libc_malloc libc_malloc
-//go:linkname libc_mmap libc_mmap
-//go:linkname libc_munmap libc_munmap
-//go:linkname libc_open libc_open
-//go:linkname libc_pthread_attr_destroy libc_pthread_attr_destroy
-//go:linkname libc_pthread_attr_getstack libc_pthread_attr_getstack
-//go:linkname libc_pthread_attr_init libc_pthread_attr_init
-//go:linkname libc_pthread_attr_setdetachstate libc_pthread_attr_setdetachstate
-//go:linkname libc_pthread_attr_setstack libc_pthread_attr_setstack
-//go:linkname libc_pthread_create libc_pthread_create
-//go:linkname libc_raise libc_raise
-//go:linkname libc_read libc_read
-//go:linkname libc_select libc_select
-//go:linkname libc_sched_yield libc_sched_yield
-//go:linkname libc_sem_init libc_sem_init
-//go:linkname libc_sem_post libc_sem_post
-//go:linkname libc_sem_reltimedwait_np libc_sem_reltimedwait_np
-//go:linkname libc_sem_wait libc_sem_wait
-//go:linkname libc_setitimer libc_setitimer
-//go:linkname libc_sigaction libc_sigaction
-//go:linkname libc_sigaltstack libc_sigaltstack
-//go:linkname libc_sigprocmask libc_sigprocmask
-//go:linkname libc_sysconf libc_sysconf
-//go:linkname libc_usleep libc_usleep
-//go:linkname libc_write libc_write
-
-var (
-	libc____errno,
-	libc_clock_gettime,
-	libc_close,
-	libc_exit,
-	libc_fstat,
-	libc_getcontext,
-	libc_getrlimit,
-	libc_kill,
-	libc_madvise,
-	libc_malloc,
-	libc_mmap,
-	libc_munmap,
-	libc_open,
-	libc_pthread_attr_destroy,
-	libc_pthread_attr_getstack,
-	libc_pthread_attr_init,
-	libc_pthread_attr_setdetachstate,
-	libc_pthread_attr_setstack,
-	libc_pthread_create,
-	libc_raise,
-	libc_read,
-	libc_sched_yield,
-	libc_select,
-	libc_sem_init,
-	libc_sem_post,
-	libc_sem_reltimedwait_np,
-	libc_sem_wait,
-	libc_setitimer,
-	libc_sigaction,
-	libc_sigaltstack,
-	libc_sigprocmask,
-	libc_sysconf,
-	libc_usleep,
-	libc_write libcFunc
-)
-
-var sigset_all = sigset{[4]uint32{^uint32(0), ^uint32(0), ^uint32(0), ^uint32(0)}}
-
-func getncpu() int32 {
-	n := int32(sysconf(__SC_NPROCESSORS_ONLN))
-	if n < 1 {
-		return 1
-	}
-	return n
-}
-
-func osinit() {
-	ncpu = getncpu()
-}
-
-func tstart_sysvicall()
-
-// May run with m.p==nil, so write barriers are not allowed.
-//go:nowritebarrier
-func newosproc(mp *m, _ unsafe.Pointer) {
-	var (
-		attr pthreadattr
-		oset sigset
-		tid  pthread
-		ret  int32
-		size uint64
-	)
-
-	if pthread_attr_init(&attr) != 0 {
-		throw("pthread_attr_init")
-	}
-	if pthread_attr_setstack(&attr, 0, 0x200000) != 0 {
-		throw("pthread_attr_setstack")
-	}
-	if pthread_attr_getstack(&attr, unsafe.Pointer(&mp.g0.stack.hi), &size) != 0 {
-		throw("pthread_attr_getstack")
-	}
-	mp.g0.stack.lo = mp.g0.stack.hi - uintptr(size)
-	if pthread_attr_setdetachstate(&attr, _PTHREAD_CREATE_DETACHED) != 0 {
-		throw("pthread_attr_setdetachstate")
-	}
-
-	// Disable signals during create, so that the new thread starts
-	// with signals disabled.  It will enable them in minit.
-	sigprocmask(_SIG_SETMASK, &sigset_all, &oset)
-	ret = pthread_create(&tid, &attr, funcPC(tstart_sysvicall), unsafe.Pointer(mp))
-	sigprocmask(_SIG_SETMASK, &oset, nil)
-	if ret != 0 {
-		print("runtime: failed to create new OS thread (have ", mcount(), " already; errno=", ret, ")\n")
-		throw("newosproc")
-	}
-}
-
-var urandom_dev = []byte("/dev/urandom\x00")
-
-//go:nosplit
-func getRandomData(r []byte) {
-	fd := open(&urandom_dev[0], 0 /* O_RDONLY */, 0)
-	n := read(fd, unsafe.Pointer(&r[0]), int32(len(r)))
-	closefd(fd)
-	extendRandom(r, int(n))
-}
-
-func goenvs() {
-	goenvs_unix()
-}
-
-// Called to initialize a new m (including the bootstrap m).
-// Called on the parent thread (main thread in case of bootstrap), can allocate memory.
-func mpreinit(mp *m) {
-	mp.gsignal = malg(32 * 1024)
-	mp.gsignal.m = mp
-}
-
-func miniterrno()
-
-func msigsave(mp *m) {
-	smask := (*sigset)(unsafe.Pointer(&mp.sigmask))
-	if unsafe.Sizeof(*smask) > unsafe.Sizeof(mp.sigmask) {
-		throw("insufficient storage for signal mask")
-	}
-	sigprocmask(_SIG_SETMASK, nil, smask)
-}
-
-// Called to initialize a new m (including the bootstrap m).
-// Called on the new thread, can not allocate memory.
-func minit() {
-	_g_ := getg()
-	asmcgocall(unsafe.Pointer(funcPC(miniterrno)), unsafe.Pointer(&libc____errno))
-	// Initialize signal handling
-	signalstack(&_g_.m.gsignal.stack)
-
-	// restore signal mask from m.sigmask and unblock essential signals
-	nmask := *(*sigset)(unsafe.Pointer(&_g_.m.sigmask))
-	for i := range sigtable {
-		if sigtable[i].flags&_SigUnblock != 0 {
-			nmask.__sigbits[(i-1)/32] &^= 1 << ((uint32(i) - 1) & 31)
-		}
-	}
-	sigprocmask(_SIG_SETMASK, &nmask, nil)
-}
-
-// Called from dropm to undo the effect of an minit.
-func unminit() {
-	_g_ := getg()
-	smask := (*sigset)(unsafe.Pointer(&_g_.m.sigmask))
-	sigprocmask(_SIG_SETMASK, smask, nil)
-
-	signalstack(nil)
-}
-
-func memlimit() uintptr {
-	/*
-		TODO: Convert to Go when something actually uses the result.
-		Rlimit rl;
-		extern byte runtime·text[], runtime·end[];
-		uintptr used;
-
-		if(runtime·getrlimit(RLIMIT_AS, &rl) != 0)
-			return 0;
-		if(rl.rlim_cur >= 0x7fffffff)
-			return 0;
-
-		// Estimate our VM footprint excluding the heap.
-		// Not an exact science: use size of binary plus
-		// some room for thread stacks.
-		used = runtime·end - runtime·text + (64<<20);
-		if(used >= rl.rlim_cur)
-			return 0;
-
-		// If there's not at least 16 MB left, we're probably
-		// not going to be able to do much.  Treat as no limit.
-		rl.rlim_cur -= used;
-		if(rl.rlim_cur < (16<<20))
-			return 0;
-
-		return rl.rlim_cur - used;
-	*/
-
-	return 0
-}
-
-func sigtramp()
-
-func setsig(i int32, fn uintptr, restart bool) {
-	var sa sigactiont
-
-	sa.sa_flags = _SA_SIGINFO | _SA_ONSTACK
-	sa.sa_flags = _SA_SIGINFO | _SA_ONSTACK
-	if restart {
-		sa.sa_flags |= _SA_RESTART
-	}
-	sa.sa_mask = sigset_all
-	if fn == funcPC(sighandler) {
-		fn = funcPC(sigtramp)
-	}
-	*((*uintptr)(unsafe.Pointer(&sa._funcptr))) = fn
-	sigaction(i, &sa, nil)
-}
-
-func setsigstack(i int32) {
-	throw("setsigstack")
-}
-
-func getsig(i int32) uintptr {
-	var sa sigactiont
-	sigaction(i, nil, &sa)
-	if *((*uintptr)(unsafe.Pointer(&sa._funcptr))) == funcPC(sigtramp) {
-		return funcPC(sighandler)
-	}
-	return *((*uintptr)(unsafe.Pointer(&sa._funcptr)))
-}
-
-func signalstack(s *stack) {
-	var st sigaltstackt
-	if s == nil {
-		st.ss_flags = _SS_DISABLE
-	} else {
-		st.ss_sp = (*byte)(unsafe.Pointer(s.lo))
-		st.ss_size = uint64(s.hi - s.lo)
-		st.ss_flags = 0
-	}
-	sigaltstack(&st, nil)
-}
-
-func updatesigmask(m sigmask) {
-	var mask sigset
-	copy(mask.__sigbits[:], m[:])
-	sigprocmask(_SIG_SETMASK, &mask, nil)
-}
-
-func unblocksig(sig int32) {
-	var mask sigset
-	mask.__sigbits[(sig-1)/32] |= 1 << ((uint32(sig) - 1) & 31)
-	sigprocmask(_SIG_UNBLOCK, &mask, nil)
-}
-
-//go:nosplit
-func semacreate() uintptr {
-	var sem *semt
-	_g_ := getg()
-
-	// Call libc's malloc rather than malloc.  This will
-	// allocate space on the C heap.  We can't call malloc
-	// here because it could cause a deadlock.
-	_g_.m.libcall.fn = uintptr(unsafe.Pointer(&libc_malloc))
-	_g_.m.libcall.n = 1
-	memclr(unsafe.Pointer(&_g_.m.scratch), uintptr(len(_g_.m.scratch.v)))
-	_g_.m.scratch.v[0] = unsafe.Sizeof(*sem)
-	_g_.m.libcall.args = uintptr(unsafe.Pointer(&_g_.m.scratch))
-	asmcgocall(unsafe.Pointer(&asmsysvicall6), unsafe.Pointer(&_g_.m.libcall))
-	sem = (*semt)(unsafe.Pointer(_g_.m.libcall.r1))
-	if sem_init(sem, 0, 0) != 0 {
-		throw("sem_init")
-	}
-	return uintptr(unsafe.Pointer(sem))
-}
-
-//go:nosplit
-func semasleep(ns int64) int32 {
-	_m_ := getg().m
-	if ns >= 0 {
-		_m_.ts.tv_sec = ns / 1000000000
-		_m_.ts.tv_nsec = ns % 1000000000
-
-		_m_.libcall.fn = uintptr(unsafe.Pointer(&libc_sem_reltimedwait_np))
-		_m_.libcall.n = 2
-		memclr(unsafe.Pointer(&_m_.scratch), uintptr(len(_m_.scratch.v)))
-		_m_.scratch.v[0] = _m_.waitsema
-		_m_.scratch.v[1] = uintptr(unsafe.Pointer(&_m_.ts))
-		_m_.libcall.args = uintptr(unsafe.Pointer(&_m_.scratch))
-		asmcgocall(unsafe.Pointer(&asmsysvicall6), unsafe.Pointer(&_m_.libcall))
-		if *_m_.perrno != 0 {
-			if *_m_.perrno == _ETIMEDOUT || *_m_.perrno == _EAGAIN || *_m_.perrno == _EINTR {
-				return -1
-			}
-			throw("sem_reltimedwait_np")
-		}
-		return 0
-	}
-	for {
-		_m_.libcall.fn = uintptr(unsafe.Pointer(&libc_sem_wait))
-		_m_.libcall.n = 1
-		memclr(unsafe.Pointer(&_m_.scratch), uintptr(len(_m_.scratch.v)))
-		_m_.scratch.v[0] = _m_.waitsema
-		_m_.libcall.args = uintptr(unsafe.Pointer(&_m_.scratch))
-		asmcgocall(unsafe.Pointer(&asmsysvicall6), unsafe.Pointer(&_m_.libcall))
-		if _m_.libcall.r1 == 0 {
-			break
-		}
-		if *_m_.perrno == _EINTR {
-			continue
-		}
-		throw("sem_wait")
-	}
-	return 0
-}
-
-//go:nosplit
-func semawakeup(mp *m) {
-	if sem_post((*semt)(unsafe.Pointer(mp.waitsema))) != 0 {
-		throw("sem_post")
-	}
-}
-
-//go:nosplit
-func closefd(fd int32) int32 {
-	return int32(sysvicall1(&libc_close, uintptr(fd)))
-}
-
-//go:nosplit
-func exit(r int32) {
-	sysvicall1(&libc_exit, uintptr(r))
-}
-
-//go:nosplit
-func getcontext(context *ucontext) /* int32 */ {
-	sysvicall1(&libc_getcontext, uintptr(unsafe.Pointer(context)))
-}
-
-//go:nosplit
-func madvise(addr unsafe.Pointer, n uintptr, flags int32) {
-	sysvicall3(&libc_madvise, uintptr(addr), uintptr(n), uintptr(flags))
-}
-
-//go:nosplit
-func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uint32) unsafe.Pointer {
-	return unsafe.Pointer(sysvicall6(&libc_mmap, uintptr(addr), uintptr(n), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(off)))
-}
-
-//go:nosplit
-func munmap(addr unsafe.Pointer, n uintptr) {
-	sysvicall2(&libc_munmap, uintptr(addr), uintptr(n))
-}
-
-func nanotime1()
-
-//go:nosplit
-func nanotime() int64 {
-	return int64(sysvicall0((*libcFunc)(unsafe.Pointer(funcPC(nanotime1)))))
-}
-
-//go:nosplit
-func open(path *byte, mode, perm int32) int32 {
-	return int32(sysvicall3(&libc_open, uintptr(unsafe.Pointer(path)), uintptr(mode), uintptr(perm)))
-}
-
-func pthread_attr_destroy(attr *pthreadattr) int32 {
-	return int32(sysvicall1(&libc_pthread_attr_destroy, uintptr(unsafe.Pointer(attr))))
-}
-
-func pthread_attr_getstack(attr *pthreadattr, addr unsafe.Pointer, size *uint64) int32 {
-	return int32(sysvicall3(&libc_pthread_attr_getstack, uintptr(unsafe.Pointer(attr)), uintptr(addr), uintptr(unsafe.Pointer(size))))
-}
-
-func pthread_attr_init(attr *pthreadattr) int32 {
-	return int32(sysvicall1(&libc_pthread_attr_init, uintptr(unsafe.Pointer(attr))))
-}
-
-func pthread_attr_setdetachstate(attr *pthreadattr, state int32) int32 {
-	return int32(sysvicall2(&libc_pthread_attr_setdetachstate, uintptr(unsafe.Pointer(attr)), uintptr(state)))
-}
-
-func pthread_attr_setstack(attr *pthreadattr, addr uintptr, size uint64) int32 {
-	return int32(sysvicall3(&libc_pthread_attr_setstack, uintptr(unsafe.Pointer(attr)), uintptr(addr), uintptr(size)))
-}
-
-func pthread_create(thread *pthread, attr *pthreadattr, fn uintptr, arg unsafe.Pointer) int32 {
-	return int32(sysvicall4(&libc_pthread_create, uintptr(unsafe.Pointer(thread)), uintptr(unsafe.Pointer(attr)), uintptr(fn), uintptr(arg)))
-}
-
-func raise(sig int32) /* int32 */ {
-	sysvicall1(&libc_raise, uintptr(sig))
-}
-
-func raiseproc(sig int32) /* int32 */ {
-	pid := sysvicall0(&libc_getpid)
-	sysvicall2(&libc_kill, pid, uintptr(sig))
-}
-
-//go:nosplit
-func read(fd int32, buf unsafe.Pointer, nbyte int32) int32 {
-	return int32(sysvicall3(&libc_read, uintptr(fd), uintptr(buf), uintptr(nbyte)))
-}
-
-//go:nosplit
-func sem_init(sem *semt, pshared int32, value uint32) int32 {
-	return int32(sysvicall3(&libc_sem_init, uintptr(unsafe.Pointer(sem)), uintptr(pshared), uintptr(value)))
-}
-
-//go:nosplit
-func sem_post(sem *semt) int32 {
-	return int32(sysvicall1(&libc_sem_post, uintptr(unsafe.Pointer(sem))))
-}
-
-//go:nosplit
-func sem_reltimedwait_np(sem *semt, timeout *timespec) int32 {
-	return int32(sysvicall2(&libc_sem_reltimedwait_np, uintptr(unsafe.Pointer(sem)), uintptr(unsafe.Pointer(timeout))))
-}
-
-//go:nosplit
-func sem_wait(sem *semt) int32 {
-	return int32(sysvicall1(&libc_sem_wait, uintptr(unsafe.Pointer(sem))))
-}
-
-func setitimer(which int32, value *itimerval, ovalue *itimerval) /* int32 */ {
-	sysvicall3(&libc_setitimer, uintptr(which), uintptr(unsafe.Pointer(value)), uintptr(unsafe.Pointer(ovalue)))
-}
-
-func sigaction(sig int32, act *sigactiont, oact *sigactiont) /* int32 */ {
-	sysvicall3(&libc_sigaction, uintptr(sig), uintptr(unsafe.Pointer(act)), uintptr(unsafe.Pointer(oact)))
-}
-
-func sigaltstack(ss *sigaltstackt, oss *sigaltstackt) /* int32 */ {
-	sysvicall2(&libc_sigaltstack, uintptr(unsafe.Pointer(ss)), uintptr(unsafe.Pointer(oss)))
-}
-
-func sigprocmask(how int32, set *sigset, oset *sigset) /* int32 */ {
-	sysvicall3(&libc_sigprocmask, uintptr(how), uintptr(unsafe.Pointer(set)), uintptr(unsafe.Pointer(oset)))
-}
-
-func sysconf(name int32) int64 {
-	return int64(sysvicall1(&libc_sysconf, uintptr(name)))
-}
-
-func usleep1(uint32)
-
-//go:nosplit
-func usleep(µs uint32) {
-	usleep1(µs)
-}
-
-//go:nosplit
-func write(fd uintptr, buf unsafe.Pointer, nbyte int32) int32 {
-	return int32(sysvicall3(&libc_write, uintptr(fd), uintptr(buf), uintptr(nbyte)))
-}
-
-func osyield1()
-
-//go:nosplit
-func osyield() {
-	_g_ := getg()
-
-	// Check the validity of m because we might be called in cgo callback
-	// path early enough where there isn't a m available yet.
-	if _g_ != nil && _g_.m != nil {
-		sysvicall0(&libc_sched_yield)
-		return
-	}
-	osyield1()
-}
diff --git a/src/runtime/os_android_arm.go b/src/runtime/os_android_arm.go
deleted file mode 100644
index 52c8c86..0000000
--- a/src/runtime/os_android_arm.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import _ "unsafe" // for go:cgo_export_static and go:cgo_export_dynamic
-
-// Export the main function.
-//
-// Used by the app package to start all-Go Android apps that are
-// loaded via JNI. See golang.org/x/mobile/app.
-
-//go:cgo_export_static main.main
-//go:cgo_export_dynamic main.main
diff --git a/src/runtime/os_darwin_arm.go b/src/runtime/os_darwin_arm.go
deleted file mode 100644
index 1ccc959..0000000
--- a/src/runtime/os_darwin_arm.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-func checkgoarm() {
-	// TODO(minux): FP checks like in os_linux_arm.go.
-
-	// osinit not called yet, so ncpu not set: must use getncpu directly.
-	if getncpu() > 1 && goarm < 7 {
-		print("runtime: this system has multiple CPUs and must use\n")
-		print("atomic synchronization instructions. Recompile using GOARM=7.\n")
-		exit(1)
-	}
-}
-
-//go:nosplit
-func cputicks() int64 {
-	// Currently cputicks() is used in blocking profiler and to seed runtime·fastrand1().
-	// runtime·nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
-	// TODO: need more entropy to better seed fastrand1.
-	return nanotime()
-}
diff --git a/src/runtime/os_darwin_arm64.go b/src/runtime/os_darwin_arm64.go
deleted file mode 100644
index 4d35af9..0000000
--- a/src/runtime/os_darwin_arm64.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-//go:nosplit
-func cputicks() int64 {
-	// Currently cputicks() is used in blocking profiler and to seed runtime·fastrand1().
-	// runtime·nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
-	// TODO: need more entropy to better seed fastrand1.
-	return nanotime()
-}
diff --git a/src/runtime/os_freebsd_arm.go b/src/runtime/os_freebsd_arm.go
deleted file mode 100644
index 1f2add2..0000000
--- a/src/runtime/os_freebsd_arm.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-func checkgoarm() {
-	// TODO(minux): FP checks like in os_linux_arm.go.
-
-	// osinit not called yet, so ncpu not set: must use getncpu directly.
-	if getncpu() > 1 && goarm < 7 {
-		print("runtime: this system has multiple CPUs and must use\n")
-		print("atomic synchronization instructions. Recompile using GOARM=7.\n")
-		exit(1)
-	}
-}
-
-//go:nosplit
-func cputicks() int64 {
-	// Currently cputicks() is used in blocking profiler and to seed runtime·fastrand1().
-	// runtime·nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
-	// TODO: need more entropy to better seed fastrand1.
-	return nanotime()
-}
diff --git a/src/runtime/os_linux_386.go b/src/runtime/os_linux_386.go
deleted file mode 100644
index e2120da..0000000
--- a/src/runtime/os_linux_386.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-const (
-	_AT_NULL    = 0
-	_AT_RANDOM  = 25
-	_AT_SYSINFO = 32
-)
-
-var _vdso uint32
-
-func sysargs(argc int32, argv **byte) {
-	// skip over argv, envv to get to auxv
-	n := argc + 1
-	for argv_index(argv, n) != nil {
-		n++
-	}
-	n++
-	auxv := (*[1 << 28]uint32)(add(unsafe.Pointer(argv), uintptr(n)*ptrSize))
-
-	for i := 0; auxv[i] != _AT_NULL; i += 2 {
-		switch auxv[i] {
-		case _AT_SYSINFO:
-			_vdso = auxv[i+1]
-
-		case _AT_RANDOM:
-			startupRandomData = (*[16]byte)(unsafe.Pointer(uintptr(auxv[i+1])))[:]
-		}
-	}
-}
diff --git a/src/runtime/os_linux_arm.go b/src/runtime/os_linux_arm.go
deleted file mode 100644
index 3749640..0000000
--- a/src/runtime/os_linux_arm.go
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-const (
-	_AT_NULL     = 0
-	_AT_PLATFORM = 15 //  introduced in at least 2.6.11
-	_AT_HWCAP    = 16 // introduced in at least 2.6.11
-	_AT_RANDOM   = 25 // introduced in 2.6.29
-
-	_HWCAP_VFP   = 1 << 6  // introduced in at least 2.6.11
-	_HWCAP_VFPv3 = 1 << 13 // introduced in 2.6.30
-)
-
-var randomNumber uint32
-var armArch uint8 = 6 // we default to ARMv6
-var hwcap uint32      // set by setup_auxv
-
-func checkgoarm() {
-	if goarm > 5 && hwcap&_HWCAP_VFP == 0 {
-		print("runtime: this CPU has no floating point hardware, so it cannot run\n")
-		print("this GOARM=", goarm, " binary. Recompile using GOARM=5.\n")
-		exit(1)
-	}
-	if goarm > 6 && hwcap&_HWCAP_VFPv3 == 0 {
-		print("runtime: this CPU has no VFPv3 floating point hardware, so it cannot run\n")
-		print("this GOARM=", goarm, " binary. Recompile using GOARM=5.\n")
-		exit(1)
-	}
-}
-
-func sysargs(argc int32, argv **byte) {
-	// skip over argv, envv to get to auxv
-	n := argc + 1
-	for argv_index(argv, n) != nil {
-		n++
-	}
-	n++
-	auxv := (*[1 << 28]uint32)(add(unsafe.Pointer(argv), uintptr(n)*ptrSize))
-
-	for i := 0; auxv[i] != _AT_NULL; i += 2 {
-		switch auxv[i] {
-		case _AT_RANDOM: // kernel provides a pointer to 16-bytes worth of random data
-			startupRandomData = (*[16]byte)(unsafe.Pointer(uintptr(auxv[i+1])))[:]
-			// the pointer provided may not be word aligned, so we must treat it
-			// as a byte array.
-			randomNumber = uint32(startupRandomData[4]) | uint32(startupRandomData[5])<<8 |
-				uint32(startupRandomData[6])<<16 | uint32(startupRandomData[7])<<24
-
-		case _AT_PLATFORM: // v5l, v6l, v7l
-			t := *(*uint8)(unsafe.Pointer(uintptr(auxv[i+1] + 1)))
-			if '5' <= t && t <= '7' {
-				armArch = t - '0'
-			}
-
-		case _AT_HWCAP: // CPU capability bit flags
-			hwcap = auxv[i+1]
-		}
-	}
-}
-
-//go:nosplit
-func cputicks() int64 {
-	// Currently cputicks() is used in blocking profiler and to seed fastrand1().
-	// nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
-	// randomNumber provides better seeding of fastrand1.
-	return nanotime() + int64(randomNumber)
-}
diff --git a/src/runtime/os_linux_arm64.go b/src/runtime/os_linux_arm64.go
deleted file mode 100644
index 3f994f1..0000000
--- a/src/runtime/os_linux_arm64.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-const (
-	_AT_NULL   = 0
-	_AT_RANDOM = 25 // introduced in 2.6.29
-)
-
-var randomNumber uint32
-
-//go:nosplit
-func cputicks() int64 {
-	// Currently cputicks() is used in blocking profiler and to seed fastrand1().
-	// nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
-	// randomNumber provides better seeding of fastrand1.
-	return nanotime() + int64(randomNumber)
-}
diff --git a/src/runtime/os_nacl_arm.go b/src/runtime/os_nacl_arm.go
deleted file mode 100644
index f94c183..0000000
--- a/src/runtime/os_nacl_arm.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-func checkgoarm() {
-	// TODO(minux): FP checks like in os_linux_arm.go.
-
-	// NaCl/ARM only supports ARMv7
-	if goarm != 7 {
-		print("runtime: NaCl requires ARMv7. Recompile using GOARM=7.\n")
-		exit(1)
-	}
-}
-
-//go:nosplit
-func cputicks() int64 {
-	// Currently cputicks() is used in blocking profiler and to seed runtime·fastrand1().
-	// runtime·nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
-	// TODO: need more entropy to better seed fastrand1.
-	return nanotime()
-}
diff --git a/src/runtime/os_netbsd_arm.go b/src/runtime/os_netbsd_arm.go
deleted file mode 100644
index 03032e8..0000000
--- a/src/runtime/os_netbsd_arm.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-func lwp_mcontext_init(mc *mcontextt, stk unsafe.Pointer, mp *m, gp *g, fn uintptr) {
-	// Machine dependent mcontext initialisation for LWP.
-	mc.__gregs[_REG_R15] = uint32(funcPC(lwp_tramp))
-	mc.__gregs[_REG_R13] = uint32(uintptr(stk))
-	mc.__gregs[_REG_R0] = uint32(uintptr(unsafe.Pointer(mp)))
-	mc.__gregs[_REG_R1] = uint32(uintptr(unsafe.Pointer(gp)))
-	mc.__gregs[_REG_R2] = uint32(fn)
-}
-
-func checkgoarm() {
-	// TODO(minux): FP checks like in os_linux_arm.go.
-
-	// osinit not called yet, so ncpu not set: must use getncpu directly.
-	if getncpu() > 1 && goarm < 7 {
-		print("runtime: this system has multiple CPUs and must use\n")
-		print("atomic synchronization instructions. Recompile using GOARM=7.\n")
-		exit(1)
-	}
-}
-
-//go:nosplit
-func cputicks() int64 {
-	// Currently cputicks() is used in blocking profiler and to seed runtime·fastrand1().
-	// runtime·nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
-	// TODO: need more entropy to better seed fastrand1.
-	return nanotime()
-}
diff --git a/src/runtime/os_openbsd_arm.go b/src/runtime/os_openbsd_arm.go
deleted file mode 100644
index b46fef0..0000000
--- a/src/runtime/os_openbsd_arm.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-func checkgoarm() {
-	// TODO(minux): FP checks like in os_linux_arm.go.
-
-	// osinit not called yet, so ncpu not set: must use getncpu directly.
-	if getncpu() > 1 && goarm < 7 {
-		print("runtime: this system has multiple CPUs and must use\n")
-		print("atomic synchronization instructions. Recompile using GOARM=7.\n")
-		exit(1)
-	}
-}
-
-//go:nosplit
-func cputicks() int64 {
-	// Currently cputicks() is used in blocking profiler and to seed runtime·fastrand1().
-	// runtime·nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
-	// TODO: need more entropy to better seed fastrand1.
-	return nanotime()
-}
diff --git a/src/runtime/panic1.go b/src/runtime/panic1.go
deleted file mode 100644
index 1a71d09..0000000
--- a/src/runtime/panic1.go
+++ /dev/null
@@ -1,150 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-// Code related to defer, panic and recover.
-// TODO: Merge into panic.go.
-
-//uint32 runtime·panicking;
-var paniclk mutex
-
-const hasLinkRegister = GOARCH == "arm" || GOARCH == "arm64" || GOARCH == "ppc64" || GOARCH == "ppc64le"
-
-// Unwind the stack after a deferred function calls recover
-// after a panic.  Then arrange to continue running as though
-// the caller of the deferred function returned normally.
-func recovery(gp *g) {
-	// Info about defer passed in G struct.
-	sp := gp.sigcode0
-	pc := gp.sigcode1
-
-	// d's arguments need to be in the stack.
-	if sp != 0 && (sp < gp.stack.lo || gp.stack.hi < sp) {
-		print("recover: ", hex(sp), " not in [", hex(gp.stack.lo), ", ", hex(gp.stack.hi), "]\n")
-		throw("bad recovery")
-	}
-
-	// Make the deferproc for this d return again,
-	// this time returning 1.  The calling function will
-	// jump to the standard return epilogue.
-	gcUnwindBarriers(gp, sp)
-	gp.sched.sp = sp
-	gp.sched.pc = pc
-	gp.sched.lr = 0
-	gp.sched.ret = 1
-	gogo(&gp.sched)
-}
-
-func startpanic_m() {
-	_g_ := getg()
-	if mheap_.cachealloc.size == 0 { // very early
-		print("runtime: panic before malloc heap initialized\n")
-		_g_.m.mallocing = 1 // tell rest of panic not to try to malloc
-	} else if _g_.m.mcache == nil { // can happen if called from signal handler or throw
-		_g_.m.mcache = allocmcache()
-	}
-
-	switch _g_.m.dying {
-	case 0:
-		_g_.m.dying = 1
-		if _g_ != nil {
-			_g_.writebuf = nil
-		}
-		xadd(&panicking, 1)
-		lock(&paniclk)
-		if debug.schedtrace > 0 || debug.scheddetail > 0 {
-			schedtrace(true)
-		}
-		freezetheworld()
-		return
-	case 1:
-		// Something failed while panicing, probably the print of the
-		// argument to panic().  Just print a stack trace and exit.
-		_g_.m.dying = 2
-		print("panic during panic\n")
-		dopanic(0)
-		exit(3)
-		fallthrough
-	case 2:
-		// This is a genuine bug in the runtime, we couldn't even
-		// print the stack trace successfully.
-		_g_.m.dying = 3
-		print("stack trace unavailable\n")
-		exit(4)
-		fallthrough
-	default:
-		// Can't even print!  Just exit.
-		exit(5)
-	}
-}
-
-var didothers bool
-var deadlock mutex
-
-func dopanic_m(gp *g, pc, sp uintptr) {
-	if gp.sig != 0 {
-		print("[signal ", hex(gp.sig), " code=", hex(gp.sigcode0), " addr=", hex(gp.sigcode1), " pc=", hex(gp.sigpc), "]\n")
-	}
-
-	var docrash bool
-	_g_ := getg()
-	if t := gotraceback(&docrash); t > 0 {
-		if gp != gp.m.g0 {
-			print("\n")
-			goroutineheader(gp)
-			traceback(pc, sp, 0, gp)
-		} else if t >= 2 || _g_.m.throwing > 0 {
-			print("\nruntime stack:\n")
-			traceback(pc, sp, 0, gp)
-		}
-		if !didothers {
-			didothers = true
-			tracebackothers(gp)
-		}
-	}
-	unlock(&paniclk)
-
-	if xadd(&panicking, -1) != 0 {
-		// Some other m is panicking too.
-		// Let it print what it needs to print.
-		// Wait forever without chewing up cpu.
-		// It will exit when it's done.
-		lock(&deadlock)
-		lock(&deadlock)
-	}
-
-	if docrash {
-		crash()
-	}
-
-	exit(2)
-}
-
-//go:nosplit
-func canpanic(gp *g) bool {
-	// Note that g is m->gsignal, different from gp.
-	// Note also that g->m can change at preemption, so m can go stale
-	// if this function ever makes a function call.
-	_g_ := getg()
-	_m_ := _g_.m
-
-	// Is it okay for gp to panic instead of crashing the program?
-	// Yes, as long as it is running Go code, not runtime code,
-	// and not stuck in a system call.
-	if gp == nil || gp != _m_.curg {
-		return false
-	}
-	if _m_.locks-_m_.softfloat != 0 || _m_.mallocing != 0 || _m_.throwing != 0 || _m_.preemptoff != "" || _m_.dying != 0 {
-		return false
-	}
-	status := readgstatus(gp)
-	if status&^_Gscan != _Grunning || gp.syscallsp != 0 {
-		return false
-	}
-	if GOOS == "windows" && _m_.libcallsp != 0 {
-		return false
-	}
-	return true
-}
diff --git a/src/runtime/parfor.go b/src/runtime/parfor.go
deleted file mode 100644
index c82beee..0000000
--- a/src/runtime/parfor.go
+++ /dev/null
@@ -1,212 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Parallel for algorithm.
-
-package runtime
-
-// A parfor holds state for the parallel for operation.
-type parfor struct {
-	body   func(*parfor, uint32) // executed for each element
-	done   uint32                // number of idle threads
-	nthr   uint32                // total number of threads
-	thrseq uint32                // thread id sequencer
-	cnt    uint32                // iteration space [0, cnt)
-	wait   bool                  // if true, wait while all threads finish processing,
-	// otherwise parfor may return while other threads are still working
-
-	thr []parforthread // thread descriptors
-
-	// stats
-	nsteal     uint64
-	nstealcnt  uint64
-	nprocyield uint64
-	nosyield   uint64
-	nsleep     uint64
-}
-
-// A parforthread holds state for a single thread in the parallel for.
-type parforthread struct {
-	// the thread's iteration space [32lsb, 32msb)
-	pos uint64
-	// stats
-	nsteal     uint64
-	nstealcnt  uint64
-	nprocyield uint64
-	nosyield   uint64
-	nsleep     uint64
-	pad        [_CacheLineSize]byte
-}
-
-func parforalloc(nthrmax uint32) *parfor {
-	return &parfor{
-		thr: make([]parforthread, nthrmax),
-	}
-}
-
-// Parforsetup initializes desc for a parallel for operation with nthr
-// threads executing n jobs.
-//
-// On return the nthr threads are each expected to call parfordo(desc)
-// to run the operation. During those calls, for each i in [0, n), one
-// thread will be used invoke body(desc, i).
-// If wait is true, no parfordo will return until all work has been completed.
-// If wait is false, parfordo may return when there is a small amount
-// of work left, under the assumption that another thread has that
-// work well in hand.
-func parforsetup(desc *parfor, nthr, n uint32, wait bool, body func(*parfor, uint32)) {
-	if desc == nil || nthr == 0 || nthr > uint32(len(desc.thr)) || body == nil {
-		print("desc=", desc, " nthr=", nthr, " count=", n, " body=", body, "\n")
-		throw("parfor: invalid args")
-	}
-
-	desc.body = body
-	desc.done = 0
-	desc.nthr = nthr
-	desc.thrseq = 0
-	desc.cnt = n
-	desc.wait = wait
-	desc.nsteal = 0
-	desc.nstealcnt = 0
-	desc.nprocyield = 0
-	desc.nosyield = 0
-	desc.nsleep = 0
-
-	for i := range desc.thr {
-		begin := uint32(uint64(n) * uint64(i) / uint64(nthr))
-		end := uint32(uint64(n) * uint64(i+1) / uint64(nthr))
-		desc.thr[i].pos = uint64(begin) | uint64(end)<<32
-	}
-}
-
-func parfordo(desc *parfor) {
-	// Obtain 0-based thread index.
-	tid := xadd(&desc.thrseq, 1) - 1
-	if tid >= desc.nthr {
-		print("tid=", tid, " nthr=", desc.nthr, "\n")
-		throw("parfor: invalid tid")
-	}
-
-	// If single-threaded, just execute the for serially.
-	body := desc.body
-	if desc.nthr == 1 {
-		for i := uint32(0); i < desc.cnt; i++ {
-			body(desc, i)
-		}
-		return
-	}
-
-	me := &desc.thr[tid]
-	mypos := &me.pos
-	for {
-		for {
-			// While there is local work,
-			// bump low index and execute the iteration.
-			pos := xadd64(mypos, 1)
-			begin := uint32(pos) - 1
-			end := uint32(pos >> 32)
-			if begin < end {
-				body(desc, begin)
-				continue
-			}
-			break
-		}
-
-		// Out of work, need to steal something.
-		idle := false
-		for try := uint32(0); ; try++ {
-			// If we don't see any work for long enough,
-			// increment the done counter...
-			if try > desc.nthr*4 && !idle {
-				idle = true
-				xadd(&desc.done, 1)
-			}
-
-			// ...if all threads have incremented the counter,
-			// we are done.
-			extra := uint32(0)
-			if !idle {
-				extra = 1
-			}
-			if desc.done+extra == desc.nthr {
-				if !idle {
-					xadd(&desc.done, 1)
-				}
-				goto exit
-			}
-
-			// Choose a random victim for stealing.
-			var begin, end uint32
-			victim := fastrand1() % (desc.nthr - 1)
-			if victim >= tid {
-				victim++
-			}
-			victimpos := &desc.thr[victim].pos
-			for {
-				// See if it has any work.
-				pos := atomicload64(victimpos)
-				begin = uint32(pos)
-				end = uint32(pos >> 32)
-				if begin+1 >= end {
-					end = 0
-					begin = end
-					break
-				}
-				if idle {
-					xadd(&desc.done, -1)
-					idle = false
-				}
-				begin2 := begin + (end-begin)/2
-				newpos := uint64(begin) | uint64(begin2)<<32
-				if cas64(victimpos, pos, newpos) {
-					begin = begin2
-					break
-				}
-			}
-			if begin < end {
-				// Has successfully stolen some work.
-				if idle {
-					throw("parfor: should not be idle")
-				}
-				atomicstore64(mypos, uint64(begin)|uint64(end)<<32)
-				me.nsteal++
-				me.nstealcnt += uint64(end) - uint64(begin)
-				break
-			}
-
-			// Backoff.
-			if try < desc.nthr {
-				// nothing
-			} else if try < 4*desc.nthr {
-				me.nprocyield++
-				procyield(20)
-			} else if !desc.wait {
-				// If a caller asked not to wait for the others, exit now
-				// (assume that most work is already done at this point).
-				if !idle {
-					xadd(&desc.done, 1)
-				}
-				goto exit
-			} else if try < 6*desc.nthr {
-				me.nosyield++
-				osyield()
-			} else {
-				me.nsleep++
-				usleep(1)
-			}
-		}
-	}
-
-exit:
-	xadd64(&desc.nsteal, int64(me.nsteal))
-	xadd64(&desc.nstealcnt, int64(me.nstealcnt))
-	xadd64(&desc.nprocyield, int64(me.nprocyield))
-	xadd64(&desc.nosyield, int64(me.nosyield))
-	xadd64(&desc.nsleep, int64(me.nsleep))
-	me.nsteal = 0
-	me.nstealcnt = 0
-	me.nprocyield = 0
-	me.nosyield = 0
-	me.nsleep = 0
-}
diff --git a/src/runtime/print1_write.go b/src/runtime/print1_write.go
deleted file mode 100644
index 6b1467b..0000000
--- a/src/runtime/print1_write.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !android
-
-package runtime
-
-import "unsafe"
-
-func writeErr(b []byte) {
-	write(2, unsafe.Pointer(&b[0]), int32(len(b)))
-}
diff --git a/src/runtime/print1_write_android.go b/src/runtime/print1_write_android.go
deleted file mode 100644
index 54d4826..0000000
--- a/src/runtime/print1_write_android.go
+++ /dev/null
@@ -1,160 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-var (
-	writeHeader = []byte{6 /* ANDROID_LOG_ERROR */, 'G', 'o', 0}
-	writePath   = []byte("/dev/log/main\x00")
-	writeLogd   = []byte("/dev/socket/logdw\x00")
-
-	// guarded by printlock/printunlock.
-	writeFD  uintptr
-	writeBuf [1024]byte
-	writePos int
-)
-
-// Prior to Android-L, logging was done through writes to /dev/log files implemented
-// in kernel ring buffers. In Android-L, those /dev/log files are no longer
-// accessible and logging is done through a centralized user-mode logger, logd.
-//
-// https://android.googlesource.com/platform/system/core/+/master/liblog/logd_write.c
-type loggerType int32
-
-const (
-	unknown loggerType = iota
-	legacy
-	logd
-	// TODO(hakim): logging for emulator?
-)
-
-var logger loggerType
-
-func writeErr(b []byte) {
-	if logger == unknown {
-		// Use logd if /dev/socket/logdw is available.
-		if v := uintptr(access(&writeLogd[0], 0x02 /* W_OK */)); v == 0 {
-			logger = logd
-			initLogd()
-		} else {
-			logger = legacy
-			initLegacy()
-		}
-	}
-
-	// Write to stderr for command-line programs.
-	write(2, unsafe.Pointer(&b[0]), int32(len(b)))
-
-	// Log format: "<header>\x00<message m bytes>\x00"
-	//
-	// <header>
-	//   In legacy mode: "<priority 1 byte><tag n bytes>".
-	//   In logd mode: "<android_log_header_t 11 bytes><priority 1 byte><tag n bytes>"
-	//
-	// The entire log needs to be delivered in a single syscall (the NDK
-	// does this with writev). Each log is its own line, so we need to
-	// buffer writes until we see a newline.
-	var hlen int
-	switch logger {
-	case logd:
-		hlen = writeLogdHeader()
-	case legacy:
-		hlen = len(writeHeader)
-	}
-
-	dst := writeBuf[hlen:]
-	for _, v := range b {
-		if v == 0 { // android logging won't print a zero byte
-			v = '0'
-		}
-		dst[writePos] = v
-		writePos++
-		if v == '\n' || writePos == len(dst)-1 {
-			dst[writePos] = 0
-			write(writeFD, unsafe.Pointer(&writeBuf[0]), int32(hlen+writePos))
-			memclrBytes(dst)
-			writePos = 0
-		}
-	}
-}
-
-func initLegacy() {
-	// In legacy mode, logs are written to /dev/log/main
-	writeFD = uintptr(open(&writePath[0], 0x1 /* O_WRONLY */, 0))
-	if writeFD == 0 {
-		// It is hard to do anything here. Write to stderr just
-		// in case user has root on device and has run
-		//	adb shell setprop log.redirect-stdio true
-		msg := []byte("runtime: cannot open /dev/log/main\x00")
-		write(2, unsafe.Pointer(&msg[0]), int32(len(msg)))
-		exit(2)
-	}
-
-	// Prepopulate the invariant header part.
-	copy(writeBuf[:len(writeHeader)], writeHeader)
-}
-
-// used in initLogdWrite but defined here to avoid heap allocation.
-var logdAddr sockaddr_un
-
-func initLogd() {
-	// In logd mode, logs are sent to the logd via a unix domain socket.
-	logdAddr.family = _AF_UNIX
-	copy(logdAddr.path[:], writeLogd)
-
-	// We are not using non-blocking I/O because writes taking this path
-	// are most likely triggered by panic, we cannot think of the advantage of
-	// non-blocking I/O for panic but see disadvantage (dropping panic message),
-	// and blocking I/O simplifies the code a lot.
-	fd := socket(_AF_UNIX, _SOCK_DGRAM|_O_CLOEXEC, 0)
-	if fd < 0 {
-		msg := []byte("runtime: cannot create a socket for logging\x00")
-		write(2, unsafe.Pointer(&msg[0]), int32(len(msg)))
-		exit(2)
-	}
-
-	errno := connect(uintptr(fd), unsafe.Pointer(&logdAddr), int32(unsafe.Sizeof(logdAddr)))
-	if errno < 0 {
-		msg := []byte("runtime: cannot connect to /dev/socket/logdw\x00")
-		write(2, unsafe.Pointer(&msg[0]), int32(len(msg)))
-		// TODO(hakim): or should we just close fd and hope for better luck next time?
-		exit(2)
-	}
-	writeFD = uintptr(fd)
-
-	// Prepopulate invariant part of the header.
-	// The first 11 bytes will be populated later in writeLogdHeader.
-	copy(writeBuf[11:11+len(writeHeader)], writeHeader)
-}
-
-// writeLogdHeader populates the header and returns the length of the payload.
-func writeLogdHeader() int {
-	hdr := writeBuf[:11]
-
-	// The first 11 bytes of the header corresponds to android_log_header_t
-	// as defined in system/core/include/private/android_logger.h
-	//   hdr[0] log type id (unsigned char), defined in <log/log.h>
-	//   hdr[1:2] tid (uint16_t)
-	//   hdr[3:11] log_time defined in <log/log_read.h>
-	//      hdr[3:7] sec unsigned uint32, little endian.
-	//      hdr[7:11] nsec unsigned uint32, little endian.
-	hdr[0] = 0 // LOG_ID_MAIN
-	sec, nsec := time_now()
-	packUint32(hdr[3:7], uint32(sec))
-	packUint32(hdr[7:11], uint32(nsec))
-
-	// TODO(hakim):  hdr[1:2] = gettid?
-
-	return 11 + len(writeHeader)
-}
-
-func packUint32(b []byte, v uint32) {
-	// little-endian.
-	b[0] = byte(v)
-	b[1] = byte(v >> 8)
-	b[2] = byte(v >> 16)
-	b[3] = byte(v >> 24)
-}
diff --git a/src/runtime/proc1.go b/src/runtime/proc1.go
deleted file mode 100644
index 09cb775..0000000
--- a/src/runtime/proc1.go
+++ /dev/null
@@ -1,3725 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-var (
-	m0 m
-	g0 g
-)
-
-// Goroutine scheduler
-// The scheduler's job is to distribute ready-to-run goroutines over worker threads.
-//
-// The main concepts are:
-// G - goroutine.
-// M - worker thread, or machine.
-// P - processor, a resource that is required to execute Go code.
-//     M must have an associated P to execute Go code, however it can be
-//     blocked or in a syscall w/o an associated P.
-//
-// Design doc at https://golang.org/s/go11sched.
-
-const (
-	// Number of goroutine ids to grab from sched.goidgen to local per-P cache at once.
-	// 16 seems to provide enough amortization, but other than that it's mostly arbitrary number.
-	_GoidCacheBatch = 16
-)
-
-// The bootstrap sequence is:
-//
-//	call osinit
-//	call schedinit
-//	make & queue new G
-//	call runtime·mstart
-//
-// The new G calls runtime·main.
-func schedinit() {
-	// raceinit must be the first call to race detector.
-	// In particular, it must be done before mallocinit below calls racemapshadow.
-	_g_ := getg()
-	if raceenabled {
-		_g_.racectx = raceinit()
-	}
-
-	sched.maxmcount = 10000
-
-	// Cache the framepointer experiment.  This affects stack unwinding.
-	framepointer_enabled = haveexperiment("framepointer")
-
-	tracebackinit()
-	moduledataverify()
-	stackinit()
-	mallocinit()
-	mcommoninit(_g_.m)
-
-	goargs()
-	goenvs()
-	parsedebugvars()
-	gcinit()
-
-	sched.lastpoll = uint64(nanotime())
-	procs := int(ncpu)
-	if n := atoi(gogetenv("GOMAXPROCS")); n > 0 {
-		if n > _MaxGomaxprocs {
-			n = _MaxGomaxprocs
-		}
-		procs = n
-	}
-	if procresize(int32(procs)) != nil {
-		throw("unknown runnable goroutine during bootstrap")
-	}
-
-	if buildVersion == "" {
-		// Condition should never trigger.  This code just serves
-		// to ensure runtime·buildVersion is kept in the resulting binary.
-		buildVersion = "unknown"
-	}
-}
-
-func dumpgstatus(gp *g) {
-	_g_ := getg()
-	print("runtime: gp: gp=", gp, ", goid=", gp.goid, ", gp->atomicstatus=", readgstatus(gp), "\n")
-	print("runtime:  g:  g=", _g_, ", goid=", _g_.goid, ",  g->atomicstatus=", readgstatus(_g_), "\n")
-}
-
-func checkmcount() {
-	// sched lock is held
-	if sched.mcount > sched.maxmcount {
-		print("runtime: program exceeds ", sched.maxmcount, "-thread limit\n")
-		throw("thread exhaustion")
-	}
-}
-
-func mcommoninit(mp *m) {
-	_g_ := getg()
-
-	// g0 stack won't make sense for user (and is not necessary unwindable).
-	if _g_ != _g_.m.g0 {
-		callers(1, mp.createstack[:])
-	}
-
-	mp.fastrand = 0x49f6428a + uint32(mp.id) + uint32(cputicks())
-	if mp.fastrand == 0 {
-		mp.fastrand = 0x49f6428a
-	}
-
-	lock(&sched.lock)
-	mp.id = sched.mcount
-	sched.mcount++
-	checkmcount()
-	mpreinit(mp)
-	if mp.gsignal != nil {
-		mp.gsignal.stackguard1 = mp.gsignal.stack.lo + _StackGuard
-	}
-
-	// Add to allm so garbage collector doesn't free g->m
-	// when it is just in a register or thread-local storage.
-	mp.alllink = allm
-
-	// NumCgoCall() iterates over allm w/o schedlock,
-	// so we need to publish it safely.
-	atomicstorep(unsafe.Pointer(&allm), unsafe.Pointer(mp))
-	unlock(&sched.lock)
-}
-
-// Mark gp ready to run.
-func ready(gp *g, traceskip int) {
-	if trace.enabled {
-		traceGoUnpark(gp, traceskip)
-	}
-
-	status := readgstatus(gp)
-
-	// Mark runnable.
-	_g_ := getg()
-	_g_.m.locks++ // disable preemption because it can be holding p in a local var
-	if status&^_Gscan != _Gwaiting {
-		dumpgstatus(gp)
-		throw("bad g->status in ready")
-	}
-
-	// status is Gwaiting or Gscanwaiting, make Grunnable and put on runq
-	casgstatus(gp, _Gwaiting, _Grunnable)
-	runqput(_g_.m.p.ptr(), gp, true)
-	if atomicload(&sched.npidle) != 0 && atomicload(&sched.nmspinning) == 0 { // TODO: fast atomic
-		wakep()
-	}
-	_g_.m.locks--
-	if _g_.m.locks == 0 && _g_.preempt { // restore the preemption request in case we've cleared it in newstack
-		_g_.stackguard0 = stackPreempt
-	}
-}
-
-func gcprocs() int32 {
-	// Figure out how many CPUs to use during GC.
-	// Limited by gomaxprocs, number of actual CPUs, and MaxGcproc.
-	lock(&sched.lock)
-	n := gomaxprocs
-	if n > ncpu {
-		n = ncpu
-	}
-	if n > _MaxGcproc {
-		n = _MaxGcproc
-	}
-	if n > sched.nmidle+1 { // one M is currently running
-		n = sched.nmidle + 1
-	}
-	unlock(&sched.lock)
-	return n
-}
-
-func needaddgcproc() bool {
-	lock(&sched.lock)
-	n := gomaxprocs
-	if n > ncpu {
-		n = ncpu
-	}
-	if n > _MaxGcproc {
-		n = _MaxGcproc
-	}
-	n -= sched.nmidle + 1 // one M is currently running
-	unlock(&sched.lock)
-	return n > 0
-}
-
-func helpgc(nproc int32) {
-	_g_ := getg()
-	lock(&sched.lock)
-	pos := 0
-	for n := int32(1); n < nproc; n++ { // one M is currently running
-		if allp[pos].mcache == _g_.m.mcache {
-			pos++
-		}
-		mp := mget()
-		if mp == nil {
-			throw("gcprocs inconsistency")
-		}
-		mp.helpgc = n
-		mp.p.set(allp[pos])
-		mp.mcache = allp[pos].mcache
-		pos++
-		notewakeup(&mp.park)
-	}
-	unlock(&sched.lock)
-}
-
-// freezeStopWait is a large value that freezetheworld sets
-// sched.stopwait to in order to request that all Gs permanently stop.
-const freezeStopWait = 0x7fffffff
-
-// Similar to stopTheWorld but best-effort and can be called several times.
-// There is no reverse operation, used during crashing.
-// This function must not lock any mutexes.
-func freezetheworld() {
-	// stopwait and preemption requests can be lost
-	// due to races with concurrently executing threads,
-	// so try several times
-	for i := 0; i < 5; i++ {
-		// this should tell the scheduler to not start any new goroutines
-		sched.stopwait = freezeStopWait
-		atomicstore(&sched.gcwaiting, 1)
-		// this should stop running goroutines
-		if !preemptall() {
-			break // no running goroutines
-		}
-		usleep(1000)
-	}
-	// to be sure
-	usleep(1000)
-	preemptall()
-	usleep(1000)
-}
-
-func isscanstatus(status uint32) bool {
-	if status == _Gscan {
-		throw("isscanstatus: Bad status Gscan")
-	}
-	return status&_Gscan == _Gscan
-}
-
-// All reads and writes of g's status go through readgstatus, casgstatus
-// castogscanstatus, casfrom_Gscanstatus.
-//go:nosplit
-func readgstatus(gp *g) uint32 {
-	return atomicload(&gp.atomicstatus)
-}
-
-// Ownership of gscanvalid:
-//
-// If gp is running (meaning status == _Grunning or _Grunning|_Gscan),
-// then gp owns gp.gscanvalid, and other goroutines must not modify it.
-//
-// Otherwise, a second goroutine can lock the scan state by setting _Gscan
-// in the status bit and then modify gscanvalid, and then unlock the scan state.
-//
-// Note that the first condition implies an exception to the second:
-// if a second goroutine changes gp's status to _Grunning|_Gscan,
-// that second goroutine still does not have the right to modify gscanvalid.
-
-// The Gscanstatuses are acting like locks and this releases them.
-// If it proves to be a performance hit we should be able to make these
-// simple atomic stores but for now we are going to throw if
-// we see an inconsistent state.
-func casfrom_Gscanstatus(gp *g, oldval, newval uint32) {
-	success := false
-
-	// Check that transition is valid.
-	switch oldval {
-	default:
-		print("runtime: casfrom_Gscanstatus bad oldval gp=", gp, ", oldval=", hex(oldval), ", newval=", hex(newval), "\n")
-		dumpgstatus(gp)
-		throw("casfrom_Gscanstatus:top gp->status is not in scan state")
-	case _Gscanrunnable,
-		_Gscanwaiting,
-		_Gscanrunning,
-		_Gscansyscall:
-		if newval == oldval&^_Gscan {
-			success = cas(&gp.atomicstatus, oldval, newval)
-		}
-	case _Gscanenqueue:
-		if newval == _Gwaiting {
-			success = cas(&gp.atomicstatus, oldval, newval)
-		}
-	}
-	if !success {
-		print("runtime: casfrom_Gscanstatus failed gp=", gp, ", oldval=", hex(oldval), ", newval=", hex(newval), "\n")
-		dumpgstatus(gp)
-		throw("casfrom_Gscanstatus: gp->status is not in scan state")
-	}
-	if newval == _Grunning {
-		gp.gcscanvalid = false
-	}
-}
-
-// This will return false if the gp is not in the expected status and the cas fails.
-// This acts like a lock acquire while the casfromgstatus acts like a lock release.
-func castogscanstatus(gp *g, oldval, newval uint32) bool {
-	switch oldval {
-	case _Grunnable,
-		_Gwaiting,
-		_Gsyscall:
-		if newval == oldval|_Gscan {
-			return cas(&gp.atomicstatus, oldval, newval)
-		}
-	case _Grunning:
-		if newval == _Gscanrunning || newval == _Gscanenqueue {
-			return cas(&gp.atomicstatus, oldval, newval)
-		}
-	}
-	print("runtime: castogscanstatus oldval=", hex(oldval), " newval=", hex(newval), "\n")
-	throw("castogscanstatus")
-	panic("not reached")
-}
-
-// If asked to move to or from a Gscanstatus this will throw. Use the castogscanstatus
-// and casfrom_Gscanstatus instead.
-// casgstatus will loop if the g->atomicstatus is in a Gscan status until the routine that
-// put it in the Gscan state is finished.
-//go:nosplit
-func casgstatus(gp *g, oldval, newval uint32) {
-	if (oldval&_Gscan != 0) || (newval&_Gscan != 0) || oldval == newval {
-		systemstack(func() {
-			print("runtime: casgstatus: oldval=", hex(oldval), " newval=", hex(newval), "\n")
-			throw("casgstatus: bad incoming values")
-		})
-	}
-
-	if oldval == _Grunning && gp.gcscanvalid {
-		// If oldvall == _Grunning, then the actual status must be
-		// _Grunning or _Grunning|_Gscan; either way,
-		// we own gp.gcscanvalid, so it's safe to read.
-		// gp.gcscanvalid must not be true when we are running.
-		print("runtime: casgstatus ", hex(oldval), "->", hex(newval), " gp.status=", hex(gp.atomicstatus), " gp.gcscanvalid=true\n")
-		throw("casgstatus")
-	}
-
-	// loop if gp->atomicstatus is in a scan state giving
-	// GC time to finish and change the state to oldval.
-	for !cas(&gp.atomicstatus, oldval, newval) {
-		if oldval == _Gwaiting && gp.atomicstatus == _Grunnable {
-			systemstack(func() {
-				throw("casgstatus: waiting for Gwaiting but is Grunnable")
-			})
-		}
-		// Help GC if needed.
-		// if gp.preemptscan && !gp.gcworkdone && (oldval == _Grunning || oldval == _Gsyscall) {
-		// 	gp.preemptscan = false
-		// 	systemstack(func() {
-		// 		gcphasework(gp)
-		// 	})
-		// }
-	}
-	if newval == _Grunning {
-		gp.gcscanvalid = false
-	}
-}
-
-// casgstatus(gp, oldstatus, Gcopystack), assuming oldstatus is Gwaiting or Grunnable.
-// Returns old status. Cannot call casgstatus directly, because we are racing with an
-// async wakeup that might come in from netpoll. If we see Gwaiting from the readgstatus,
-// it might have become Grunnable by the time we get to the cas. If we called casgstatus,
-// it would loop waiting for the status to go back to Gwaiting, which it never will.
-//go:nosplit
-func casgcopystack(gp *g) uint32 {
-	for {
-		oldstatus := readgstatus(gp) &^ _Gscan
-		if oldstatus != _Gwaiting && oldstatus != _Grunnable {
-			throw("copystack: bad status, not Gwaiting or Grunnable")
-		}
-		if cas(&gp.atomicstatus, oldstatus, _Gcopystack) {
-			return oldstatus
-		}
-	}
-}
-
-// scang blocks until gp's stack has been scanned.
-// It might be scanned by scang or it might be scanned by the goroutine itself.
-// Either way, the stack scan has completed when scang returns.
-func scang(gp *g) {
-	// Invariant; we (the caller, markroot for a specific goroutine) own gp.gcscandone.
-	// Nothing is racing with us now, but gcscandone might be set to true left over
-	// from an earlier round of stack scanning (we scan twice per GC).
-	// We use gcscandone to record whether the scan has been done during this round.
-	// It is important that the scan happens exactly once: if called twice,
-	// the installation of stack barriers will detect the double scan and die.
-
-	gp.gcscandone = false
-
-	// Endeavor to get gcscandone set to true,
-	// either by doing the stack scan ourselves or by coercing gp to scan itself.
-	// gp.gcscandone can transition from false to true when we're not looking
-	// (if we asked for preemption), so any time we lock the status using
-	// castogscanstatus we have to double-check that the scan is still not done.
-	for !gp.gcscandone {
-		switch s := readgstatus(gp); s {
-		default:
-			dumpgstatus(gp)
-			throw("stopg: invalid status")
-
-		case _Gdead:
-			// No stack.
-			gp.gcscandone = true
-
-		case _Gcopystack:
-			// Stack being switched. Go around again.
-
-		case _Grunnable, _Gsyscall, _Gwaiting:
-			// Claim goroutine by setting scan bit.
-			// Racing with execution or readying of gp.
-			// The scan bit keeps them from running
-			// the goroutine until we're done.
-			if castogscanstatus(gp, s, s|_Gscan) {
-				if !gp.gcscandone {
-					// Coordinate with traceback
-					// in sigprof.
-					for !cas(&gp.stackLock, 0, 1) {
-						osyield()
-					}
-					scanstack(gp)
-					atomicstore(&gp.stackLock, 0)
-					gp.gcscandone = true
-				}
-				restartg(gp)
-			}
-
-		case _Gscanwaiting:
-			// newstack is doing a scan for us right now. Wait.
-
-		case _Grunning:
-			// Goroutine running. Try to preempt execution so it can scan itself.
-			// The preemption handler (in newstack) does the actual scan.
-
-			// Optimization: if there is already a pending preemption request
-			// (from the previous loop iteration), don't bother with the atomics.
-			if gp.preemptscan && gp.preempt && gp.stackguard0 == stackPreempt {
-				break
-			}
-
-			// Ask for preemption and self scan.
-			if castogscanstatus(gp, _Grunning, _Gscanrunning) {
-				if !gp.gcscandone {
-					gp.preemptscan = true
-					gp.preempt = true
-					gp.stackguard0 = stackPreempt
-				}
-				casfrom_Gscanstatus(gp, _Gscanrunning, _Grunning)
-			}
-		}
-	}
-
-	gp.preemptscan = false // cancel scan request if no longer needed
-}
-
-// The GC requests that this routine be moved from a scanmumble state to a mumble state.
-func restartg(gp *g) {
-	s := readgstatus(gp)
-	switch s {
-	default:
-		dumpgstatus(gp)
-		throw("restartg: unexpected status")
-
-	case _Gdead:
-		// ok
-
-	case _Gscanrunnable,
-		_Gscanwaiting,
-		_Gscansyscall:
-		casfrom_Gscanstatus(gp, s, s&^_Gscan)
-
-	// Scan is now completed.
-	// Goroutine now needs to be made runnable.
-	// We put it on the global run queue; ready blocks on the global scheduler lock.
-	case _Gscanenqueue:
-		casfrom_Gscanstatus(gp, _Gscanenqueue, _Gwaiting)
-		if gp != getg().m.curg {
-			throw("processing Gscanenqueue on wrong m")
-		}
-		dropg()
-		ready(gp, 0)
-	}
-}
-
-// stopTheWorld stops all P's from executing goroutines, interrupting
-// all goroutines at GC safe points and records reason as the reason
-// for the stop. On return, only the current goroutine's P is running.
-// stopTheWorld must not be called from a system stack and the caller
-// must not hold worldsema. The caller must call startTheWorld when
-// other P's should resume execution.
-//
-// stopTheWorld is safe for multiple goroutines to call at the
-// same time. Each will execute its own stop, and the stops will
-// be serialized.
-//
-// This is also used by routines that do stack dumps. If the system is
-// in panic or being exited, this may not reliably stop all
-// goroutines.
-func stopTheWorld(reason string) {
-	semacquire(&worldsema, false)
-	getg().m.preemptoff = reason
-	systemstack(stopTheWorldWithSema)
-}
-
-// startTheWorld undoes the effects of stopTheWorld.
-func startTheWorld() {
-	systemstack(startTheWorldWithSema)
-	// worldsema must be held over startTheWorldWithSema to ensure
-	// gomaxprocs cannot change while worldsema is held.
-	semrelease(&worldsema)
-	getg().m.preemptoff = ""
-}
-
-// Holding worldsema grants an M the right to try to stop the world
-// and prevents gomaxprocs from changing concurrently.
-var worldsema uint32 = 1
-
-// stopTheWorldWithSema is the core implementation of stopTheWorld.
-// The caller is responsible for acquiring worldsema and disabling
-// preemption first and then should stopTheWorldWithSema on the system
-// stack:
-//
-//	semacquire(&worldsema, false)
-//	m.preemptoff = "reason"
-//	systemstack(stopTheWorldWithSema)
-//
-// When finished, the caller must either call startTheWorld or undo
-// these three operations separately:
-//
-//	m.preemptoff = ""
-//	systemstack(startTheWorldWithSema)
-//	semrelease(&worldsema)
-//
-// It is allowed to acquire worldsema once and then execute multiple
-// startTheWorldWithSema/stopTheWorldWithSema pairs.
-// Other P's are able to execute between successive calls to
-// startTheWorldWithSema and stopTheWorldWithSema.
-// Holding worldsema causes any other goroutines invoking
-// stopTheWorld to block.
-func stopTheWorldWithSema() {
-	_g_ := getg()
-
-	// If we hold a lock, then we won't be able to stop another M
-	// that is blocked trying to acquire the lock.
-	if _g_.m.locks > 0 {
-		throw("stopTheWorld: holding locks")
-	}
-
-	lock(&sched.lock)
-	sched.stopwait = gomaxprocs
-	atomicstore(&sched.gcwaiting, 1)
-	preemptall()
-	// stop current P
-	_g_.m.p.ptr().status = _Pgcstop // Pgcstop is only diagnostic.
-	sched.stopwait--
-	// try to retake all P's in Psyscall status
-	for i := 0; i < int(gomaxprocs); i++ {
-		p := allp[i]
-		s := p.status
-		if s == _Psyscall && cas(&p.status, s, _Pgcstop) {
-			if trace.enabled {
-				traceGoSysBlock(p)
-				traceProcStop(p)
-			}
-			p.syscalltick++
-			sched.stopwait--
-		}
-	}
-	// stop idle P's
-	for {
-		p := pidleget()
-		if p == nil {
-			break
-		}
-		p.status = _Pgcstop
-		sched.stopwait--
-	}
-	wait := sched.stopwait > 0
-	unlock(&sched.lock)
-
-	// wait for remaining P's to stop voluntarily
-	if wait {
-		for {
-			// wait for 100us, then try to re-preempt in case of any races
-			if notetsleep(&sched.stopnote, 100*1000) {
-				noteclear(&sched.stopnote)
-				break
-			}
-			preemptall()
-		}
-	}
-	if sched.stopwait != 0 {
-		throw("stopTheWorld: not stopped")
-	}
-	for i := 0; i < int(gomaxprocs); i++ {
-		p := allp[i]
-		if p.status != _Pgcstop {
-			throw("stopTheWorld: not stopped")
-		}
-	}
-}
-
-func mhelpgc() {
-	_g_ := getg()
-	_g_.m.helpgc = -1
-}
-
-func startTheWorldWithSema() {
-	_g_ := getg()
-
-	_g_.m.locks++        // disable preemption because it can be holding p in a local var
-	gp := netpoll(false) // non-blocking
-	injectglist(gp)
-	add := needaddgcproc()
-	lock(&sched.lock)
-
-	procs := gomaxprocs
-	if newprocs != 0 {
-		procs = newprocs
-		newprocs = 0
-	}
-	p1 := procresize(procs)
-	sched.gcwaiting = 0
-	if sched.sysmonwait != 0 {
-		sched.sysmonwait = 0
-		notewakeup(&sched.sysmonnote)
-	}
-	unlock(&sched.lock)
-
-	for p1 != nil {
-		p := p1
-		p1 = p1.link.ptr()
-		if p.m != 0 {
-			mp := p.m.ptr()
-			p.m = 0
-			if mp.nextp != 0 {
-				throw("startTheWorld: inconsistent mp->nextp")
-			}
-			mp.nextp.set(p)
-			notewakeup(&mp.park)
-		} else {
-			// Start M to run P.  Do not start another M below.
-			newm(nil, p)
-			add = false
-		}
-	}
-
-	// Wakeup an additional proc in case we have excessive runnable goroutines
-	// in local queues or in the global queue. If we don't, the proc will park itself.
-	// If we have lots of excessive work, resetspinning will unpark additional procs as necessary.
-	if atomicload(&sched.npidle) != 0 && atomicload(&sched.nmspinning) == 0 {
-		wakep()
-	}
-
-	if add {
-		// If GC could have used another helper proc, start one now,
-		// in the hope that it will be available next time.
-		// It would have been even better to start it before the collection,
-		// but doing so requires allocating memory, so it's tricky to
-		// coordinate.  This lazy approach works out in practice:
-		// we don't mind if the first couple gc rounds don't have quite
-		// the maximum number of procs.
-		newm(mhelpgc, nil)
-	}
-	_g_.m.locks--
-	if _g_.m.locks == 0 && _g_.preempt { // restore the preemption request in case we've cleared it in newstack
-		_g_.stackguard0 = stackPreempt
-	}
-}
-
-// Called to start an M.
-//go:nosplit
-func mstart() {
-	_g_ := getg()
-
-	if _g_.stack.lo == 0 {
-		// Initialize stack bounds from system stack.
-		// Cgo may have left stack size in stack.hi.
-		size := _g_.stack.hi
-		if size == 0 {
-			size = 8192 * stackGuardMultiplier
-		}
-		_g_.stack.hi = uintptr(noescape(unsafe.Pointer(&size)))
-		_g_.stack.lo = _g_.stack.hi - size + 1024
-	}
-	// Initialize stack guards so that we can start calling
-	// both Go and C functions with stack growth prologues.
-	_g_.stackguard0 = _g_.stack.lo + _StackGuard
-	_g_.stackguard1 = _g_.stackguard0
-	mstart1()
-}
-
-func mstart1() {
-	_g_ := getg()
-
-	if _g_ != _g_.m.g0 {
-		throw("bad runtime·mstart")
-	}
-
-	// Record top of stack for use by mcall.
-	// Once we call schedule we're never coming back,
-	// so other calls can reuse this stack space.
-	gosave(&_g_.m.g0.sched)
-	_g_.m.g0.sched.pc = ^uintptr(0) // make sure it is never used
-	asminit()
-	minit()
-
-	// Install signal handlers; after minit so that minit can
-	// prepare the thread to be able to handle the signals.
-	if _g_.m == &m0 {
-		// Create an extra M for callbacks on threads not created by Go.
-		if iscgo && !cgoHasExtraM {
-			cgoHasExtraM = true
-			newextram()
-		}
-		initsig()
-	}
-
-	if fn := _g_.m.mstartfn; fn != nil {
-		fn()
-	}
-
-	if _g_.m.helpgc != 0 {
-		_g_.m.helpgc = 0
-		stopm()
-	} else if _g_.m != &m0 {
-		acquirep(_g_.m.nextp.ptr())
-		_g_.m.nextp = 0
-	}
-	schedule()
-}
-
-// forEachP calls fn(p) for every P p when p reaches a GC safe point.
-// If a P is currently executing code, this will bring the P to a GC
-// safe point and execute fn on that P. If the P is not executing code
-// (it is idle or in a syscall), this will call fn(p) directly while
-// preventing the P from exiting its state. This does not ensure that
-// fn will run on every CPU executing Go code, but it acts as a global
-// memory barrier. GC uses this as a "ragged barrier."
-//
-// The caller must hold worldsema.
-func forEachP(fn func(*p)) {
-	mp := acquirem()
-	_p_ := getg().m.p.ptr()
-
-	lock(&sched.lock)
-	if sched.safePointWait != 0 {
-		throw("forEachP: sched.safePointWait != 0")
-	}
-	sched.safePointWait = gomaxprocs - 1
-	sched.safePointFn = fn
-
-	// Ask all Ps to run the safe point function.
-	for _, p := range allp[:gomaxprocs] {
-		if p != _p_ {
-			atomicstore(&p.runSafePointFn, 1)
-		}
-	}
-	preemptall()
-
-	// Any P entering _Pidle or _Psyscall from now on will observe
-	// p.runSafePointFn == 1 and will call runSafePointFn when
-	// changing its status to _Pidle/_Psyscall.
-
-	// Run safe point function for all idle Ps. sched.pidle will
-	// not change because we hold sched.lock.
-	for p := sched.pidle.ptr(); p != nil; p = p.link.ptr() {
-		if cas(&p.runSafePointFn, 1, 0) {
-			fn(p)
-			sched.safePointWait--
-		}
-	}
-
-	wait := sched.safePointWait > 0
-	unlock(&sched.lock)
-
-	// Run fn for the current P.
-	fn(_p_)
-
-	// Force Ps currently in _Psyscall into _Pidle and hand them
-	// off to induce safe point function execution.
-	for i := 0; i < int(gomaxprocs); i++ {
-		p := allp[i]
-		s := p.status
-		if s == _Psyscall && p.runSafePointFn == 1 && cas(&p.status, s, _Pidle) {
-			if trace.enabled {
-				traceGoSysBlock(p)
-				traceProcStop(p)
-			}
-			p.syscalltick++
-			handoffp(p)
-		}
-	}
-
-	// Wait for remaining Ps to run fn.
-	if wait {
-		for {
-			// Wait for 100us, then try to re-preempt in
-			// case of any races.
-			if notetsleep(&sched.safePointNote, 100*1000) {
-				noteclear(&sched.safePointNote)
-				break
-			}
-			preemptall()
-		}
-	}
-	if sched.safePointWait != 0 {
-		throw("forEachP: not done")
-	}
-	for i := 0; i < int(gomaxprocs); i++ {
-		p := allp[i]
-		if p.runSafePointFn != 0 {
-			throw("forEachP: P did not run fn")
-		}
-	}
-
-	lock(&sched.lock)
-	sched.safePointFn = nil
-	unlock(&sched.lock)
-	releasem(mp)
-}
-
-// runSafePointFn runs the safe point function, if any, for this P.
-// This should be called like
-//
-//     if getg().m.p.runSafePointFn != 0 {
-//         runSafePointFn()
-//     }
-//
-// runSafePointFn must be checked on any transition in to _Pidle or
-// _Psyscall to avoid a race where forEachP sees that the P is running
-// just before the P goes into _Pidle/_Psyscall and neither forEachP
-// nor the P run the safe-point function.
-func runSafePointFn() {
-	p := getg().m.p.ptr()
-	// Resolve the race between forEachP running the safe-point
-	// function on this P's behalf and this P running the
-	// safe-point function directly.
-	if !cas(&p.runSafePointFn, 1, 0) {
-		return
-	}
-	sched.safePointFn(p)
-	lock(&sched.lock)
-	sched.safePointWait--
-	if sched.safePointWait == 0 {
-		notewakeup(&sched.safePointNote)
-	}
-	unlock(&sched.lock)
-}
-
-// When running with cgo, we call _cgo_thread_start
-// to start threads for us so that we can play nicely with
-// foreign code.
-var cgoThreadStart unsafe.Pointer
-
-type cgothreadstart struct {
-	g   guintptr
-	tls *uint64
-	fn  unsafe.Pointer
-}
-
-// Allocate a new m unassociated with any thread.
-// Can use p for allocation context if needed.
-// fn is recorded as the new m's m.mstartfn.
-func allocm(_p_ *p, fn func()) *m {
-	_g_ := getg()
-	_g_.m.locks++ // disable GC because it can be called from sysmon
-	if _g_.m.p == 0 {
-		acquirep(_p_) // temporarily borrow p for mallocs in this function
-	}
-	mp := new(m)
-	mp.mstartfn = fn
-	mcommoninit(mp)
-
-	// In case of cgo or Solaris, pthread_create will make us a stack.
-	// Windows and Plan 9 will layout sched stack on OS stack.
-	if iscgo || GOOS == "solaris" || GOOS == "windows" || GOOS == "plan9" {
-		mp.g0 = malg(-1)
-	} else {
-		mp.g0 = malg(8192 * stackGuardMultiplier)
-	}
-	mp.g0.m = mp
-
-	if _p_ == _g_.m.p.ptr() {
-		releasep()
-	}
-	_g_.m.locks--
-	if _g_.m.locks == 0 && _g_.preempt { // restore the preemption request in case we've cleared it in newstack
-		_g_.stackguard0 = stackPreempt
-	}
-
-	return mp
-}
-
-// needm is called when a cgo callback happens on a
-// thread without an m (a thread not created by Go).
-// In this case, needm is expected to find an m to use
-// and return with m, g initialized correctly.
-// Since m and g are not set now (likely nil, but see below)
-// needm is limited in what routines it can call. In particular
-// it can only call nosplit functions (textflag 7) and cannot
-// do any scheduling that requires an m.
-//
-// In order to avoid needing heavy lifting here, we adopt
-// the following strategy: there is a stack of available m's
-// that can be stolen. Using compare-and-swap
-// to pop from the stack has ABA races, so we simulate
-// a lock by doing an exchange (via casp) to steal the stack
-// head and replace the top pointer with MLOCKED (1).
-// This serves as a simple spin lock that we can use even
-// without an m. The thread that locks the stack in this way
-// unlocks the stack by storing a valid stack head pointer.
-//
-// In order to make sure that there is always an m structure
-// available to be stolen, we maintain the invariant that there
-// is always one more than needed. At the beginning of the
-// program (if cgo is in use) the list is seeded with a single m.
-// If needm finds that it has taken the last m off the list, its job
-// is - once it has installed its own m so that it can do things like
-// allocate memory - to create a spare m and put it on the list.
-//
-// Each of these extra m's also has a g0 and a curg that are
-// pressed into service as the scheduling stack and current
-// goroutine for the duration of the cgo callback.
-//
-// When the callback is done with the m, it calls dropm to
-// put the m back on the list.
-//go:nosplit
-func needm(x byte) {
-	if iscgo && !cgoHasExtraM {
-		// Can happen if C/C++ code calls Go from a global ctor.
-		// Can not throw, because scheduler is not initialized yet.
-		write(2, unsafe.Pointer(&earlycgocallback[0]), int32(len(earlycgocallback)))
-		exit(1)
-	}
-
-	// Lock extra list, take head, unlock popped list.
-	// nilokay=false is safe here because of the invariant above,
-	// that the extra list always contains or will soon contain
-	// at least one m.
-	mp := lockextra(false)
-
-	// Set needextram when we've just emptied the list,
-	// so that the eventual call into cgocallbackg will
-	// allocate a new m for the extra list. We delay the
-	// allocation until then so that it can be done
-	// after exitsyscall makes sure it is okay to be
-	// running at all (that is, there's no garbage collection
-	// running right now).
-	mp.needextram = mp.schedlink == 0
-	unlockextra(mp.schedlink.ptr())
-
-	// Install g (= m->g0) and set the stack bounds
-	// to match the current stack. We don't actually know
-	// how big the stack is, like we don't know how big any
-	// scheduling stack is, but we assume there's at least 32 kB,
-	// which is more than enough for us.
-	setg(mp.g0)
-	_g_ := getg()
-	_g_.stack.hi = uintptr(noescape(unsafe.Pointer(&x))) + 1024
-	_g_.stack.lo = uintptr(noescape(unsafe.Pointer(&x))) - 32*1024
-	_g_.stackguard0 = _g_.stack.lo + _StackGuard
-
-	msigsave(mp)
-	// Initialize this thread to use the m.
-	asminit()
-	minit()
-}
-
-var earlycgocallback = []byte("fatal error: cgo callback before cgo call\n")
-
-// newextram allocates an m and puts it on the extra list.
-// It is called with a working local m, so that it can do things
-// like call schedlock and allocate.
-func newextram() {
-	// Create extra goroutine locked to extra m.
-	// The goroutine is the context in which the cgo callback will run.
-	// The sched.pc will never be returned to, but setting it to
-	// goexit makes clear to the traceback routines where
-	// the goroutine stack ends.
-	mp := allocm(nil, nil)
-	gp := malg(4096)
-	gp.sched.pc = funcPC(goexit) + _PCQuantum
-	gp.sched.sp = gp.stack.hi
-	gp.sched.sp -= 4 * regSize // extra space in case of reads slightly beyond frame
-	gp.sched.lr = 0
-	gp.sched.g = guintptr(unsafe.Pointer(gp))
-	gp.syscallpc = gp.sched.pc
-	gp.syscallsp = gp.sched.sp
-	// malg returns status as Gidle, change to Gsyscall before adding to allg
-	// where GC will see it.
-	casgstatus(gp, _Gidle, _Gsyscall)
-	gp.m = mp
-	mp.curg = gp
-	mp.locked = _LockInternal
-	mp.lockedg = gp
-	gp.lockedm = mp
-	gp.goid = int64(xadd64(&sched.goidgen, 1))
-	if raceenabled {
-		gp.racectx = racegostart(funcPC(newextram))
-	}
-	// put on allg for garbage collector
-	allgadd(gp)
-
-	// Add m to the extra list.
-	mnext := lockextra(true)
-	mp.schedlink.set(mnext)
-	unlockextra(mp)
-}
-
-// dropm is called when a cgo callback has called needm but is now
-// done with the callback and returning back into the non-Go thread.
-// It puts the current m back onto the extra list.
-//
-// The main expense here is the call to signalstack to release the
-// m's signal stack, and then the call to needm on the next callback
-// from this thread. It is tempting to try to save the m for next time,
-// which would eliminate both these costs, but there might not be
-// a next time: the current thread (which Go does not control) might exit.
-// If we saved the m for that thread, there would be an m leak each time
-// such a thread exited. Instead, we acquire and release an m on each
-// call. These should typically not be scheduling operations, just a few
-// atomics, so the cost should be small.
-//
-// TODO(rsc): An alternative would be to allocate a dummy pthread per-thread
-// variable using pthread_key_create. Unlike the pthread keys we already use
-// on OS X, this dummy key would never be read by Go code. It would exist
-// only so that we could register at thread-exit-time destructor.
-// That destructor would put the m back onto the extra list.
-// This is purely a performance optimization. The current version,
-// in which dropm happens on each cgo call, is still correct too.
-// We may have to keep the current version on systems with cgo
-// but without pthreads, like Windows.
-func dropm() {
-	// Undo whatever initialization minit did during needm.
-	unminit()
-
-	// Clear m and g, and return m to the extra list.
-	// After the call to setg we can only call nosplit functions
-	// with no pointer manipulation.
-	mp := getg().m
-	mnext := lockextra(true)
-	mp.schedlink.set(mnext)
-
-	setg(nil)
-	unlockextra(mp)
-}
-
-var extram uintptr
-
-// lockextra locks the extra list and returns the list head.
-// The caller must unlock the list by storing a new list head
-// to extram. If nilokay is true, then lockextra will
-// return a nil list head if that's what it finds. If nilokay is false,
-// lockextra will keep waiting until the list head is no longer nil.
-//go:nosplit
-func lockextra(nilokay bool) *m {
-	const locked = 1
-
-	for {
-		old := atomicloaduintptr(&extram)
-		if old == locked {
-			yield := osyield
-			yield()
-			continue
-		}
-		if old == 0 && !nilokay {
-			usleep(1)
-			continue
-		}
-		if casuintptr(&extram, old, locked) {
-			return (*m)(unsafe.Pointer(old))
-		}
-		yield := osyield
-		yield()
-		continue
-	}
-}
-
-//go:nosplit
-func unlockextra(mp *m) {
-	atomicstoreuintptr(&extram, uintptr(unsafe.Pointer(mp)))
-}
-
-// Create a new m.  It will start off with a call to fn, or else the scheduler.
-// fn needs to be static and not a heap allocated closure.
-// May run with m.p==nil, so write barriers are not allowed.
-//go:nowritebarrier
-func newm(fn func(), _p_ *p) {
-	mp := allocm(_p_, fn)
-	mp.nextp.set(_p_)
-	msigsave(mp)
-	if iscgo {
-		var ts cgothreadstart
-		if _cgo_thread_start == nil {
-			throw("_cgo_thread_start missing")
-		}
-		ts.g.set(mp.g0)
-		ts.tls = (*uint64)(unsafe.Pointer(&mp.tls[0]))
-		ts.fn = unsafe.Pointer(funcPC(mstart))
-		asmcgocall(_cgo_thread_start, unsafe.Pointer(&ts))
-		return
-	}
-	newosproc(mp, unsafe.Pointer(mp.g0.stack.hi))
-}
-
-// Stops execution of the current m until new work is available.
-// Returns with acquired P.
-func stopm() {
-	_g_ := getg()
-
-	if _g_.m.locks != 0 {
-		throw("stopm holding locks")
-	}
-	if _g_.m.p != 0 {
-		throw("stopm holding p")
-	}
-	if _g_.m.spinning {
-		_g_.m.spinning = false
-		xadd(&sched.nmspinning, -1)
-	}
-
-retry:
-	lock(&sched.lock)
-	mput(_g_.m)
-	unlock(&sched.lock)
-	notesleep(&_g_.m.park)
-	noteclear(&_g_.m.park)
-	if _g_.m.helpgc != 0 {
-		gchelper()
-		_g_.m.helpgc = 0
-		_g_.m.mcache = nil
-		_g_.m.p = 0
-		goto retry
-	}
-	acquirep(_g_.m.nextp.ptr())
-	_g_.m.nextp = 0
-}
-
-func mspinning() {
-	gp := getg()
-	if !runqempty(gp.m.nextp.ptr()) {
-		// Something (presumably the GC) was readied while the
-		// runtime was starting up this M, so the M is no
-		// longer spinning.
-		if int32(xadd(&sched.nmspinning, -1)) < 0 {
-			throw("mspinning: nmspinning underflowed")
-		}
-	} else {
-		gp.m.spinning = true
-	}
-}
-
-// Schedules some M to run the p (creates an M if necessary).
-// If p==nil, tries to get an idle P, if no idle P's does nothing.
-// May run with m.p==nil, so write barriers are not allowed.
-//go:nowritebarrier
-func startm(_p_ *p, spinning bool) {
-	lock(&sched.lock)
-	if _p_ == nil {
-		_p_ = pidleget()
-		if _p_ == nil {
-			unlock(&sched.lock)
-			if spinning {
-				xadd(&sched.nmspinning, -1)
-			}
-			return
-		}
-	}
-	mp := mget()
-	unlock(&sched.lock)
-	if mp == nil {
-		var fn func()
-		if spinning {
-			fn = mspinning
-		}
-		newm(fn, _p_)
-		return
-	}
-	if mp.spinning {
-		throw("startm: m is spinning")
-	}
-	if mp.nextp != 0 {
-		throw("startm: m has p")
-	}
-	if spinning && !runqempty(_p_) {
-		throw("startm: p has runnable gs")
-	}
-	mp.spinning = spinning
-	mp.nextp.set(_p_)
-	notewakeup(&mp.park)
-}
-
-// Hands off P from syscall or locked M.
-// Always runs without a P, so write barriers are not allowed.
-//go:nowritebarrier
-func handoffp(_p_ *p) {
-	// if it has local work, start it straight away
-	if !runqempty(_p_) || sched.runqsize != 0 {
-		startm(_p_, false)
-		return
-	}
-	// no local work, check that there are no spinning/idle M's,
-	// otherwise our help is not required
-	if atomicload(&sched.nmspinning)+atomicload(&sched.npidle) == 0 && cas(&sched.nmspinning, 0, 1) { // TODO: fast atomic
-		startm(_p_, true)
-		return
-	}
-	lock(&sched.lock)
-	if sched.gcwaiting != 0 {
-		_p_.status = _Pgcstop
-		sched.stopwait--
-		if sched.stopwait == 0 {
-			notewakeup(&sched.stopnote)
-		}
-		unlock(&sched.lock)
-		return
-	}
-	if _p_.runSafePointFn != 0 && cas(&_p_.runSafePointFn, 1, 0) {
-		sched.safePointFn(_p_)
-		sched.safePointWait--
-		if sched.safePointWait == 0 {
-			notewakeup(&sched.safePointNote)
-		}
-	}
-	if sched.runqsize != 0 {
-		unlock(&sched.lock)
-		startm(_p_, false)
-		return
-	}
-	// If this is the last running P and nobody is polling network,
-	// need to wakeup another M to poll network.
-	if sched.npidle == uint32(gomaxprocs-1) && atomicload64(&sched.lastpoll) != 0 {
-		unlock(&sched.lock)
-		startm(_p_, false)
-		return
-	}
-	pidleput(_p_)
-	unlock(&sched.lock)
-}
-
-// Tries to add one more P to execute G's.
-// Called when a G is made runnable (newproc, ready).
-func wakep() {
-	// be conservative about spinning threads
-	if !cas(&sched.nmspinning, 0, 1) {
-		return
-	}
-	startm(nil, true)
-}
-
-// Stops execution of the current m that is locked to a g until the g is runnable again.
-// Returns with acquired P.
-func stoplockedm() {
-	_g_ := getg()
-
-	if _g_.m.lockedg == nil || _g_.m.lockedg.lockedm != _g_.m {
-		throw("stoplockedm: inconsistent locking")
-	}
-	if _g_.m.p != 0 {
-		// Schedule another M to run this p.
-		_p_ := releasep()
-		handoffp(_p_)
-	}
-	incidlelocked(1)
-	// Wait until another thread schedules lockedg again.
-	notesleep(&_g_.m.park)
-	noteclear(&_g_.m.park)
-	status := readgstatus(_g_.m.lockedg)
-	if status&^_Gscan != _Grunnable {
-		print("runtime:stoplockedm: g is not Grunnable or Gscanrunnable\n")
-		dumpgstatus(_g_)
-		throw("stoplockedm: not runnable")
-	}
-	acquirep(_g_.m.nextp.ptr())
-	_g_.m.nextp = 0
-}
-
-// Schedules the locked m to run the locked gp.
-// May run during STW, so write barriers are not allowed.
-//go:nowritebarrier
-func startlockedm(gp *g) {
-	_g_ := getg()
-
-	mp := gp.lockedm
-	if mp == _g_.m {
-		throw("startlockedm: locked to me")
-	}
-	if mp.nextp != 0 {
-		throw("startlockedm: m has p")
-	}
-	// directly handoff current P to the locked m
-	incidlelocked(-1)
-	_p_ := releasep()
-	mp.nextp.set(_p_)
-	notewakeup(&mp.park)
-	stopm()
-}
-
-// Stops the current m for stopTheWorld.
-// Returns when the world is restarted.
-func gcstopm() {
-	_g_ := getg()
-
-	if sched.gcwaiting == 0 {
-		throw("gcstopm: not waiting for gc")
-	}
-	if _g_.m.spinning {
-		_g_.m.spinning = false
-		xadd(&sched.nmspinning, -1)
-	}
-	_p_ := releasep()
-	lock(&sched.lock)
-	_p_.status = _Pgcstop
-	sched.stopwait--
-	if sched.stopwait == 0 {
-		notewakeup(&sched.stopnote)
-	}
-	unlock(&sched.lock)
-	stopm()
-}
-
-// Schedules gp to run on the current M.
-// If inheritTime is true, gp inherits the remaining time in the
-// current time slice. Otherwise, it starts a new time slice.
-// Never returns.
-func execute(gp *g, inheritTime bool) {
-	_g_ := getg()
-
-	casgstatus(gp, _Grunnable, _Grunning)
-	gp.waitsince = 0
-	gp.preempt = false
-	gp.stackguard0 = gp.stack.lo + _StackGuard
-	if !inheritTime {
-		_g_.m.p.ptr().schedtick++
-	}
-	_g_.m.curg = gp
-	gp.m = _g_.m
-
-	// Check whether the profiler needs to be turned on or off.
-	hz := sched.profilehz
-	if _g_.m.profilehz != hz {
-		resetcpuprofiler(hz)
-	}
-
-	if trace.enabled {
-		// GoSysExit has to happen when we have a P, but before GoStart.
-		// So we emit it here.
-		if gp.syscallsp != 0 && gp.sysblocktraced {
-			// Since gp.sysblocktraced is true, we must emit an event.
-			// There is a race between the code that initializes sysexitseq
-			// and sysexitticks (in exitsyscall, which runs without a P,
-			// and therefore is not stopped with the rest of the world)
-			// and the code that initializes a new trace.
-			// The recorded sysexitseq and sysexitticks must therefore
-			// be treated as "best effort". If they are valid for this trace,
-			// then great, use them for greater accuracy.
-			// But if they're not valid for this trace, assume that the
-			// trace was started after the actual syscall exit (but before
-			// we actually managed to start the goroutine, aka right now),
-			// and assign a fresh time stamp to keep the log consistent.
-			seq, ts := gp.sysexitseq, gp.sysexitticks
-			if seq == 0 || int64(seq)-int64(trace.seqStart) < 0 {
-				seq, ts = tracestamp()
-			}
-			traceGoSysExit(seq, ts)
-		}
-		traceGoStart()
-	}
-
-	gogo(&gp.sched)
-}
-
-// Finds a runnable goroutine to execute.
-// Tries to steal from other P's, get g from global queue, poll network.
-func findrunnable() (gp *g, inheritTime bool) {
-	_g_ := getg()
-
-top:
-	if sched.gcwaiting != 0 {
-		gcstopm()
-		goto top
-	}
-	if _g_.m.p.ptr().runSafePointFn != 0 {
-		runSafePointFn()
-	}
-	if fingwait && fingwake {
-		if gp := wakefing(); gp != nil {
-			ready(gp, 0)
-		}
-	}
-
-	// local runq
-	if gp, inheritTime := runqget(_g_.m.p.ptr()); gp != nil {
-		return gp, inheritTime
-	}
-
-	// global runq
-	if sched.runqsize != 0 {
-		lock(&sched.lock)
-		gp := globrunqget(_g_.m.p.ptr(), 0)
-		unlock(&sched.lock)
-		if gp != nil {
-			return gp, false
-		}
-	}
-
-	// Poll network.
-	// This netpoll is only an optimization before we resort to stealing.
-	// We can safely skip it if there a thread blocked in netpoll already.
-	// If there is any kind of logical race with that blocked thread
-	// (e.g. it has already returned from netpoll, but does not set lastpoll yet),
-	// this thread will do blocking netpoll below anyway.
-	if netpollinited() && sched.lastpoll != 0 {
-		if gp := netpoll(false); gp != nil { // non-blocking
-			// netpoll returns list of goroutines linked by schedlink.
-			injectglist(gp.schedlink.ptr())
-			casgstatus(gp, _Gwaiting, _Grunnable)
-			if trace.enabled {
-				traceGoUnpark(gp, 0)
-			}
-			return gp, false
-		}
-	}
-
-	// If number of spinning M's >= number of busy P's, block.
-	// This is necessary to prevent excessive CPU consumption
-	// when GOMAXPROCS>>1 but the program parallelism is low.
-	if !_g_.m.spinning && 2*atomicload(&sched.nmspinning) >= uint32(gomaxprocs)-atomicload(&sched.npidle) { // TODO: fast atomic
-		goto stop
-	}
-	if !_g_.m.spinning {
-		_g_.m.spinning = true
-		xadd(&sched.nmspinning, 1)
-	}
-	// random steal from other P's
-	for i := 0; i < int(4*gomaxprocs); i++ {
-		if sched.gcwaiting != 0 {
-			goto top
-		}
-		_p_ := allp[fastrand1()%uint32(gomaxprocs)]
-		var gp *g
-		if _p_ == _g_.m.p.ptr() {
-			gp, _ = runqget(_p_)
-		} else {
-			stealRunNextG := i > 2*int(gomaxprocs) // first look for ready queues with more than 1 g
-			gp = runqsteal(_g_.m.p.ptr(), _p_, stealRunNextG)
-		}
-		if gp != nil {
-			return gp, false
-		}
-	}
-
-stop:
-
-	// We have nothing to do. If we're in the GC mark phase and can
-	// safely scan and blacken objects, run idle-time marking
-	// rather than give up the P.
-	if _p_ := _g_.m.p.ptr(); gcBlackenEnabled != 0 && _p_.gcBgMarkWorker != nil && gcMarkWorkAvailable(_p_) {
-		_p_.gcMarkWorkerMode = gcMarkWorkerIdleMode
-		gp := _p_.gcBgMarkWorker
-		casgstatus(gp, _Gwaiting, _Grunnable)
-		if trace.enabled {
-			traceGoUnpark(gp, 0)
-		}
-		return gp, false
-	}
-
-	// return P and block
-	lock(&sched.lock)
-	if sched.gcwaiting != 0 || _g_.m.p.ptr().runSafePointFn != 0 {
-		unlock(&sched.lock)
-		goto top
-	}
-	if sched.runqsize != 0 {
-		gp := globrunqget(_g_.m.p.ptr(), 0)
-		unlock(&sched.lock)
-		return gp, false
-	}
-	_p_ := releasep()
-	pidleput(_p_)
-	unlock(&sched.lock)
-	if _g_.m.spinning {
-		_g_.m.spinning = false
-		xadd(&sched.nmspinning, -1)
-	}
-
-	// check all runqueues once again
-	for i := 0; i < int(gomaxprocs); i++ {
-		_p_ := allp[i]
-		if _p_ != nil && !runqempty(_p_) {
-			lock(&sched.lock)
-			_p_ = pidleget()
-			unlock(&sched.lock)
-			if _p_ != nil {
-				acquirep(_p_)
-				goto top
-			}
-			break
-		}
-	}
-
-	// poll network
-	if netpollinited() && xchg64(&sched.lastpoll, 0) != 0 {
-		if _g_.m.p != 0 {
-			throw("findrunnable: netpoll with p")
-		}
-		if _g_.m.spinning {
-			throw("findrunnable: netpoll with spinning")
-		}
-		gp := netpoll(true) // block until new work is available
-		atomicstore64(&sched.lastpoll, uint64(nanotime()))
-		if gp != nil {
-			lock(&sched.lock)
-			_p_ = pidleget()
-			unlock(&sched.lock)
-			if _p_ != nil {
-				acquirep(_p_)
-				injectglist(gp.schedlink.ptr())
-				casgstatus(gp, _Gwaiting, _Grunnable)
-				if trace.enabled {
-					traceGoUnpark(gp, 0)
-				}
-				return gp, false
-			}
-			injectglist(gp)
-		}
-	}
-	stopm()
-	goto top
-}
-
-func resetspinning() {
-	_g_ := getg()
-
-	var nmspinning uint32
-	if _g_.m.spinning {
-		_g_.m.spinning = false
-		nmspinning = xadd(&sched.nmspinning, -1)
-		if nmspinning < 0 {
-			throw("findrunnable: negative nmspinning")
-		}
-	} else {
-		nmspinning = atomicload(&sched.nmspinning)
-	}
-
-	// M wakeup policy is deliberately somewhat conservative (see nmspinning handling),
-	// so see if we need to wakeup another P here.
-	if nmspinning == 0 && atomicload(&sched.npidle) > 0 {
-		wakep()
-	}
-}
-
-// Injects the list of runnable G's into the scheduler.
-// Can run concurrently with GC.
-func injectglist(glist *g) {
-	if glist == nil {
-		return
-	}
-	if trace.enabled {
-		for gp := glist; gp != nil; gp = gp.schedlink.ptr() {
-			traceGoUnpark(gp, 0)
-		}
-	}
-	lock(&sched.lock)
-	var n int
-	for n = 0; glist != nil; n++ {
-		gp := glist
-		glist = gp.schedlink.ptr()
-		casgstatus(gp, _Gwaiting, _Grunnable)
-		globrunqput(gp)
-	}
-	unlock(&sched.lock)
-	for ; n != 0 && sched.npidle != 0; n-- {
-		startm(nil, false)
-	}
-}
-
-// One round of scheduler: find a runnable goroutine and execute it.
-// Never returns.
-func schedule() {
-	_g_ := getg()
-
-	if _g_.m.locks != 0 {
-		throw("schedule: holding locks")
-	}
-
-	if _g_.m.lockedg != nil {
-		stoplockedm()
-		execute(_g_.m.lockedg, false) // Never returns.
-	}
-
-top:
-	if sched.gcwaiting != 0 {
-		gcstopm()
-		goto top
-	}
-	if _g_.m.p.ptr().runSafePointFn != 0 {
-		runSafePointFn()
-	}
-
-	var gp *g
-	var inheritTime bool
-	if trace.enabled || trace.shutdown {
-		gp = traceReader()
-		if gp != nil {
-			casgstatus(gp, _Gwaiting, _Grunnable)
-			traceGoUnpark(gp, 0)
-			resetspinning()
-		}
-	}
-	if gp == nil && gcBlackenEnabled != 0 {
-		gp = gcController.findRunnableGCWorker(_g_.m.p.ptr())
-		if gp != nil {
-			resetspinning()
-		}
-	}
-	if gp == nil {
-		// Check the global runnable queue once in a while to ensure fairness.
-		// Otherwise two goroutines can completely occupy the local runqueue
-		// by constantly respawning each other.
-		if _g_.m.p.ptr().schedtick%61 == 0 && sched.runqsize > 0 {
-			lock(&sched.lock)
-			gp = globrunqget(_g_.m.p.ptr(), 1)
-			unlock(&sched.lock)
-			if gp != nil {
-				resetspinning()
-			}
-		}
-	}
-	if gp == nil {
-		gp, inheritTime = runqget(_g_.m.p.ptr())
-		if gp != nil && _g_.m.spinning {
-			throw("schedule: spinning with local work")
-		}
-	}
-	if gp == nil {
-		gp, inheritTime = findrunnable() // blocks until work is available
-		resetspinning()
-	}
-
-	if gp.lockedm != nil {
-		// Hands off own p to the locked m,
-		// then blocks waiting for a new p.
-		startlockedm(gp)
-		goto top
-	}
-
-	execute(gp, inheritTime)
-}
-
-// dropg removes the association between m and the current goroutine m->curg (gp for short).
-// Typically a caller sets gp's status away from Grunning and then
-// immediately calls dropg to finish the job. The caller is also responsible
-// for arranging that gp will be restarted using ready at an
-// appropriate time. After calling dropg and arranging for gp to be
-// readied later, the caller can do other work but eventually should
-// call schedule to restart the scheduling of goroutines on this m.
-func dropg() {
-	_g_ := getg()
-
-	if _g_.m.lockedg == nil {
-		_g_.m.curg.m = nil
-		_g_.m.curg = nil
-	}
-}
-
-func parkunlock_c(gp *g, lock unsafe.Pointer) bool {
-	unlock((*mutex)(lock))
-	return true
-}
-
-// park continuation on g0.
-func park_m(gp *g) {
-	_g_ := getg()
-
-	if trace.enabled {
-		traceGoPark(_g_.m.waittraceev, _g_.m.waittraceskip, gp)
-	}
-
-	casgstatus(gp, _Grunning, _Gwaiting)
-	dropg()
-
-	if _g_.m.waitunlockf != nil {
-		fn := *(*func(*g, unsafe.Pointer) bool)(unsafe.Pointer(&_g_.m.waitunlockf))
-		ok := fn(gp, _g_.m.waitlock)
-		_g_.m.waitunlockf = nil
-		_g_.m.waitlock = nil
-		if !ok {
-			if trace.enabled {
-				traceGoUnpark(gp, 2)
-			}
-			casgstatus(gp, _Gwaiting, _Grunnable)
-			execute(gp, true) // Schedule it back, never returns.
-		}
-	}
-	schedule()
-}
-
-func goschedImpl(gp *g) {
-	status := readgstatus(gp)
-	if status&^_Gscan != _Grunning {
-		dumpgstatus(gp)
-		throw("bad g status")
-	}
-	casgstatus(gp, _Grunning, _Grunnable)
-	dropg()
-	lock(&sched.lock)
-	globrunqput(gp)
-	unlock(&sched.lock)
-
-	schedule()
-}
-
-// Gosched continuation on g0.
-func gosched_m(gp *g) {
-	if trace.enabled {
-		traceGoSched()
-	}
-	goschedImpl(gp)
-}
-
-func gopreempt_m(gp *g) {
-	if trace.enabled {
-		traceGoPreempt()
-	}
-	goschedImpl(gp)
-}
-
-// Finishes execution of the current goroutine.
-func goexit1() {
-	if raceenabled {
-		racegoend()
-	}
-	if trace.enabled {
-		traceGoEnd()
-	}
-	mcall(goexit0)
-}
-
-// goexit continuation on g0.
-func goexit0(gp *g) {
-	_g_ := getg()
-
-	casgstatus(gp, _Grunning, _Gdead)
-	gp.m = nil
-	gp.lockedm = nil
-	_g_.m.lockedg = nil
-	gp.paniconfault = false
-	gp._defer = nil // should be true already but just in case.
-	gp._panic = nil // non-nil for Goexit during panic. points at stack-allocated data.
-	gp.writebuf = nil
-	gp.waitreason = ""
-	gp.param = nil
-
-	dropg()
-
-	if _g_.m.locked&^_LockExternal != 0 {
-		print("invalid m->locked = ", _g_.m.locked, "\n")
-		throw("internal lockOSThread error")
-	}
-	_g_.m.locked = 0
-	gfput(_g_.m.p.ptr(), gp)
-	schedule()
-}
-
-//go:nosplit
-//go:nowritebarrier
-func save(pc, sp uintptr) {
-	_g_ := getg()
-
-	_g_.sched.pc = pc
-	_g_.sched.sp = sp
-	_g_.sched.lr = 0
-	_g_.sched.ret = 0
-	_g_.sched.ctxt = nil
-	_g_.sched.g = guintptr(unsafe.Pointer(_g_))
-}
-
-// The goroutine g is about to enter a system call.
-// Record that it's not using the cpu anymore.
-// This is called only from the go syscall library and cgocall,
-// not from the low-level system calls used by the
-//
-// Entersyscall cannot split the stack: the gosave must
-// make g->sched refer to the caller's stack segment, because
-// entersyscall is going to return immediately after.
-//
-// Nothing entersyscall calls can split the stack either.
-// We cannot safely move the stack during an active call to syscall,
-// because we do not know which of the uintptr arguments are
-// really pointers (back into the stack).
-// In practice, this means that we make the fast path run through
-// entersyscall doing no-split things, and the slow path has to use systemstack
-// to run bigger things on the system stack.
-//
-// reentersyscall is the entry point used by cgo callbacks, where explicitly
-// saved SP and PC are restored. This is needed when exitsyscall will be called
-// from a function further up in the call stack than the parent, as g->syscallsp
-// must always point to a valid stack frame. entersyscall below is the normal
-// entry point for syscalls, which obtains the SP and PC from the caller.
-//
-// Syscall tracing:
-// At the start of a syscall we emit traceGoSysCall to capture the stack trace.
-// If the syscall does not block, that is it, we do not emit any other events.
-// If the syscall blocks (that is, P is retaken), retaker emits traceGoSysBlock;
-// when syscall returns we emit traceGoSysExit and when the goroutine starts running
-// (potentially instantly, if exitsyscallfast returns true) we emit traceGoStart.
-// To ensure that traceGoSysExit is emitted strictly after traceGoSysBlock,
-// we remember current value of syscalltick in m (_g_.m.syscalltick = _g_.m.p.ptr().syscalltick),
-// whoever emits traceGoSysBlock increments p.syscalltick afterwards;
-// and we wait for the increment before emitting traceGoSysExit.
-// Note that the increment is done even if tracing is not enabled,
-// because tracing can be enabled in the middle of syscall. We don't want the wait to hang.
-//
-//go:nosplit
-func reentersyscall(pc, sp uintptr) {
-	_g_ := getg()
-
-	// Disable preemption because during this function g is in Gsyscall status,
-	// but can have inconsistent g->sched, do not let GC observe it.
-	_g_.m.locks++
-
-	if trace.enabled {
-		systemstack(traceGoSysCall)
-	}
-
-	// Entersyscall must not call any function that might split/grow the stack.
-	// (See details in comment above.)
-	// Catch calls that might, by replacing the stack guard with something that
-	// will trip any stack check and leaving a flag to tell newstack to die.
-	_g_.stackguard0 = stackPreempt
-	_g_.throwsplit = true
-
-	// Leave SP around for GC and traceback.
-	save(pc, sp)
-	_g_.syscallsp = sp
-	_g_.syscallpc = pc
-	casgstatus(_g_, _Grunning, _Gsyscall)
-	if _g_.syscallsp < _g_.stack.lo || _g_.stack.hi < _g_.syscallsp {
-		systemstack(func() {
-			print("entersyscall inconsistent ", hex(_g_.syscallsp), " [", hex(_g_.stack.lo), ",", hex(_g_.stack.hi), "]\n")
-			throw("entersyscall")
-		})
-	}
-
-	if atomicload(&sched.sysmonwait) != 0 { // TODO: fast atomic
-		systemstack(entersyscall_sysmon)
-		save(pc, sp)
-	}
-
-	if _g_.m.p.ptr().runSafePointFn != 0 {
-		// runSafePointFn may stack split if run on this stack
-		systemstack(runSafePointFn)
-		save(pc, sp)
-	}
-
-	_g_.m.syscalltick = _g_.m.p.ptr().syscalltick
-	_g_.sysblocktraced = true
-	_g_.m.mcache = nil
-	_g_.m.p.ptr().m = 0
-	atomicstore(&_g_.m.p.ptr().status, _Psyscall)
-	if sched.gcwaiting != 0 {
-		systemstack(entersyscall_gcwait)
-		save(pc, sp)
-	}
-
-	// Goroutines must not split stacks in Gsyscall status (it would corrupt g->sched).
-	// We set _StackGuard to StackPreempt so that first split stack check calls morestack.
-	// Morestack detects this case and throws.
-	_g_.stackguard0 = stackPreempt
-	_g_.m.locks--
-}
-
-// Standard syscall entry used by the go syscall library and normal cgo calls.
-//go:nosplit
-func entersyscall(dummy int32) {
-	reentersyscall(getcallerpc(unsafe.Pointer(&dummy)), getcallersp(unsafe.Pointer(&dummy)))
-}
-
-func entersyscall_sysmon() {
-	lock(&sched.lock)
-	if atomicload(&sched.sysmonwait) != 0 {
-		atomicstore(&sched.sysmonwait, 0)
-		notewakeup(&sched.sysmonnote)
-	}
-	unlock(&sched.lock)
-}
-
-func entersyscall_gcwait() {
-	_g_ := getg()
-	_p_ := _g_.m.p.ptr()
-
-	lock(&sched.lock)
-	if sched.stopwait > 0 && cas(&_p_.status, _Psyscall, _Pgcstop) {
-		if trace.enabled {
-			traceGoSysBlock(_p_)
-			traceProcStop(_p_)
-		}
-		_p_.syscalltick++
-		if sched.stopwait--; sched.stopwait == 0 {
-			notewakeup(&sched.stopnote)
-		}
-	}
-	unlock(&sched.lock)
-}
-
-// The same as entersyscall(), but with a hint that the syscall is blocking.
-//go:nosplit
-func entersyscallblock(dummy int32) {
-	_g_ := getg()
-
-	_g_.m.locks++ // see comment in entersyscall
-	_g_.throwsplit = true
-	_g_.stackguard0 = stackPreempt // see comment in entersyscall
-	_g_.m.syscalltick = _g_.m.p.ptr().syscalltick
-	_g_.sysblocktraced = true
-	_g_.m.p.ptr().syscalltick++
-
-	// Leave SP around for GC and traceback.
-	pc := getcallerpc(unsafe.Pointer(&dummy))
-	sp := getcallersp(unsafe.Pointer(&dummy))
-	save(pc, sp)
-	_g_.syscallsp = _g_.sched.sp
-	_g_.syscallpc = _g_.sched.pc
-	if _g_.syscallsp < _g_.stack.lo || _g_.stack.hi < _g_.syscallsp {
-		sp1 := sp
-		sp2 := _g_.sched.sp
-		sp3 := _g_.syscallsp
-		systemstack(func() {
-			print("entersyscallblock inconsistent ", hex(sp1), " ", hex(sp2), " ", hex(sp3), " [", hex(_g_.stack.lo), ",", hex(_g_.stack.hi), "]\n")
-			throw("entersyscallblock")
-		})
-	}
-	casgstatus(_g_, _Grunning, _Gsyscall)
-	if _g_.syscallsp < _g_.stack.lo || _g_.stack.hi < _g_.syscallsp {
-		systemstack(func() {
-			print("entersyscallblock inconsistent ", hex(sp), " ", hex(_g_.sched.sp), " ", hex(_g_.syscallsp), " [", hex(_g_.stack.lo), ",", hex(_g_.stack.hi), "]\n")
-			throw("entersyscallblock")
-		})
-	}
-
-	systemstack(entersyscallblock_handoff)
-
-	// Resave for traceback during blocked call.
-	save(getcallerpc(unsafe.Pointer(&dummy)), getcallersp(unsafe.Pointer(&dummy)))
-
-	_g_.m.locks--
-}
-
-func entersyscallblock_handoff() {
-	if trace.enabled {
-		traceGoSysCall()
-		traceGoSysBlock(getg().m.p.ptr())
-	}
-	handoffp(releasep())
-}
-
-// The goroutine g exited its system call.
-// Arrange for it to run on a cpu again.
-// This is called only from the go syscall library, not
-// from the low-level system calls used by the
-//go:nosplit
-func exitsyscall(dummy int32) {
-	_g_ := getg()
-
-	_g_.m.locks++ // see comment in entersyscall
-	if getcallersp(unsafe.Pointer(&dummy)) > _g_.syscallsp {
-		throw("exitsyscall: syscall frame is no longer valid")
-	}
-
-	_g_.waitsince = 0
-	oldp := _g_.m.p.ptr()
-	if exitsyscallfast() {
-		if _g_.m.mcache == nil {
-			throw("lost mcache")
-		}
-		if trace.enabled {
-			if oldp != _g_.m.p.ptr() || _g_.m.syscalltick != _g_.m.p.ptr().syscalltick {
-				systemstack(traceGoStart)
-			}
-		}
-		// There's a cpu for us, so we can run.
-		_g_.m.p.ptr().syscalltick++
-		// We need to cas the status and scan before resuming...
-		casgstatus(_g_, _Gsyscall, _Grunning)
-
-		// Garbage collector isn't running (since we are),
-		// so okay to clear syscallsp.
-		_g_.syscallsp = 0
-		_g_.m.locks--
-		if _g_.preempt {
-			// restore the preemption request in case we've cleared it in newstack
-			_g_.stackguard0 = stackPreempt
-		} else {
-			// otherwise restore the real _StackGuard, we've spoiled it in entersyscall/entersyscallblock
-			_g_.stackguard0 = _g_.stack.lo + _StackGuard
-		}
-		_g_.throwsplit = false
-		return
-	}
-
-	_g_.sysexitticks = 0
-	_g_.sysexitseq = 0
-	if trace.enabled {
-		// Wait till traceGoSysBlock event is emitted.
-		// This ensures consistency of the trace (the goroutine is started after it is blocked).
-		for oldp != nil && oldp.syscalltick == _g_.m.syscalltick {
-			osyield()
-		}
-		// We can't trace syscall exit right now because we don't have a P.
-		// Tracing code can invoke write barriers that cannot run without a P.
-		// So instead we remember the syscall exit time and emit the event
-		// in execute when we have a P.
-		_g_.sysexitseq, _g_.sysexitticks = tracestamp()
-	}
-
-	_g_.m.locks--
-
-	// Call the scheduler.
-	mcall(exitsyscall0)
-
-	if _g_.m.mcache == nil {
-		throw("lost mcache")
-	}
-
-	// Scheduler returned, so we're allowed to run now.
-	// Delete the syscallsp information that we left for
-	// the garbage collector during the system call.
-	// Must wait until now because until gosched returns
-	// we don't know for sure that the garbage collector
-	// is not running.
-	_g_.syscallsp = 0
-	_g_.m.p.ptr().syscalltick++
-	_g_.throwsplit = false
-}
-
-//go:nosplit
-func exitsyscallfast() bool {
-	_g_ := getg()
-
-	// Freezetheworld sets stopwait but does not retake P's.
-	if sched.stopwait == freezeStopWait {
-		_g_.m.mcache = nil
-		_g_.m.p = 0
-		return false
-	}
-
-	// Try to re-acquire the last P.
-	if _g_.m.p != 0 && _g_.m.p.ptr().status == _Psyscall && cas(&_g_.m.p.ptr().status, _Psyscall, _Prunning) {
-		// There's a cpu for us, so we can run.
-		_g_.m.mcache = _g_.m.p.ptr().mcache
-		_g_.m.p.ptr().m.set(_g_.m)
-		if _g_.m.syscalltick != _g_.m.p.ptr().syscalltick {
-			if trace.enabled {
-				// The p was retaken and then enter into syscall again (since _g_.m.syscalltick has changed).
-				// traceGoSysBlock for this syscall was already emitted,
-				// but here we effectively retake the p from the new syscall running on the same p.
-				systemstack(func() {
-					// Denote blocking of the new syscall.
-					traceGoSysBlock(_g_.m.p.ptr())
-					// Denote completion of the current syscall.
-					traceGoSysExit(tracestamp())
-				})
-			}
-			_g_.m.p.ptr().syscalltick++
-		}
-		return true
-	}
-
-	// Try to get any other idle P.
-	oldp := _g_.m.p.ptr()
-	_g_.m.mcache = nil
-	_g_.m.p = 0
-	if sched.pidle != 0 {
-		var ok bool
-		systemstack(func() {
-			ok = exitsyscallfast_pidle()
-			if ok && trace.enabled {
-				if oldp != nil {
-					// Wait till traceGoSysBlock event is emitted.
-					// This ensures consistency of the trace (the goroutine is started after it is blocked).
-					for oldp.syscalltick == _g_.m.syscalltick {
-						osyield()
-					}
-				}
-				traceGoSysExit(tracestamp())
-			}
-		})
-		if ok {
-			return true
-		}
-	}
-	return false
-}
-
-func exitsyscallfast_pidle() bool {
-	lock(&sched.lock)
-	_p_ := pidleget()
-	if _p_ != nil && atomicload(&sched.sysmonwait) != 0 {
-		atomicstore(&sched.sysmonwait, 0)
-		notewakeup(&sched.sysmonnote)
-	}
-	unlock(&sched.lock)
-	if _p_ != nil {
-		acquirep(_p_)
-		return true
-	}
-	return false
-}
-
-// exitsyscall slow path on g0.
-// Failed to acquire P, enqueue gp as runnable.
-func exitsyscall0(gp *g) {
-	_g_ := getg()
-
-	casgstatus(gp, _Gsyscall, _Grunnable)
-	dropg()
-	lock(&sched.lock)
-	_p_ := pidleget()
-	if _p_ == nil {
-		globrunqput(gp)
-	} else if atomicload(&sched.sysmonwait) != 0 {
-		atomicstore(&sched.sysmonwait, 0)
-		notewakeup(&sched.sysmonnote)
-	}
-	unlock(&sched.lock)
-	if _p_ != nil {
-		acquirep(_p_)
-		execute(gp, false) // Never returns.
-	}
-	if _g_.m.lockedg != nil {
-		// Wait until another thread schedules gp and so m again.
-		stoplockedm()
-		execute(gp, false) // Never returns.
-	}
-	stopm()
-	schedule() // Never returns.
-}
-
-func beforefork() {
-	gp := getg().m.curg
-
-	// Fork can hang if preempted with signals frequently enough (see issue 5517).
-	// Ensure that we stay on the same M where we disable profiling.
-	gp.m.locks++
-	if gp.m.profilehz != 0 {
-		resetcpuprofiler(0)
-	}
-
-	// This function is called before fork in syscall package.
-	// Code between fork and exec must not allocate memory nor even try to grow stack.
-	// Here we spoil g->_StackGuard to reliably detect any attempts to grow stack.
-	// runtime_AfterFork will undo this in parent process, but not in child.
-	gp.stackguard0 = stackFork
-}
-
-// Called from syscall package before fork.
-//go:linkname syscall_runtime_BeforeFork syscall.runtime_BeforeFork
-//go:nosplit
-func syscall_runtime_BeforeFork() {
-	systemstack(beforefork)
-}
-
-func afterfork() {
-	gp := getg().m.curg
-
-	// See the comment in beforefork.
-	gp.stackguard0 = gp.stack.lo + _StackGuard
-
-	hz := sched.profilehz
-	if hz != 0 {
-		resetcpuprofiler(hz)
-	}
-	gp.m.locks--
-}
-
-// Called from syscall package after fork in parent.
-//go:linkname syscall_runtime_AfterFork syscall.runtime_AfterFork
-//go:nosplit
-func syscall_runtime_AfterFork() {
-	systemstack(afterfork)
-}
-
-// Allocate a new g, with a stack big enough for stacksize bytes.
-func malg(stacksize int32) *g {
-	newg := new(g)
-	if stacksize >= 0 {
-		stacksize = round2(_StackSystem + stacksize)
-		systemstack(func() {
-			newg.stack, newg.stkbar = stackalloc(uint32(stacksize))
-		})
-		newg.stackguard0 = newg.stack.lo + _StackGuard
-		newg.stackguard1 = ^uintptr(0)
-		newg.stackAlloc = uintptr(stacksize)
-	}
-	return newg
-}
-
-// Create a new g running fn with siz bytes of arguments.
-// Put it on the queue of g's waiting to run.
-// The compiler turns a go statement into a call to this.
-// Cannot split the stack because it assumes that the arguments
-// are available sequentially after &fn; they would not be
-// copied if a stack split occurred.
-//go:nosplit
-func newproc(siz int32, fn *funcval) {
-	argp := add(unsafe.Pointer(&fn), ptrSize)
-	pc := getcallerpc(unsafe.Pointer(&siz))
-	systemstack(func() {
-		newproc1(fn, (*uint8)(argp), siz, 0, pc)
-	})
-}
-
-// Create a new g running fn with narg bytes of arguments starting
-// at argp and returning nret bytes of results.  callerpc is the
-// address of the go statement that created this.  The new g is put
-// on the queue of g's waiting to run.
-func newproc1(fn *funcval, argp *uint8, narg int32, nret int32, callerpc uintptr) *g {
-	_g_ := getg()
-
-	if fn == nil {
-		_g_.m.throwing = -1 // do not dump full stacks
-		throw("go of nil func value")
-	}
-	_g_.m.locks++ // disable preemption because it can be holding p in a local var
-	siz := narg + nret
-	siz = (siz + 7) &^ 7
-
-	// We could allocate a larger initial stack if necessary.
-	// Not worth it: this is almost always an error.
-	// 4*sizeof(uintreg): extra space added below
-	// sizeof(uintreg): caller's LR (arm) or return address (x86, in gostartcall).
-	if siz >= _StackMin-4*regSize-regSize {
-		throw("newproc: function arguments too large for new goroutine")
-	}
-
-	_p_ := _g_.m.p.ptr()
-	newg := gfget(_p_)
-	if newg == nil {
-		newg = malg(_StackMin)
-		casgstatus(newg, _Gidle, _Gdead)
-		allgadd(newg) // publishes with a g->status of Gdead so GC scanner doesn't look at uninitialized stack.
-	}
-	if newg.stack.hi == 0 {
-		throw("newproc1: newg missing stack")
-	}
-
-	if readgstatus(newg) != _Gdead {
-		throw("newproc1: new g is not Gdead")
-	}
-
-	totalSize := 4*regSize + uintptr(siz) // extra space in case of reads slightly beyond frame
-	if hasLinkRegister {
-		totalSize += ptrSize
-	}
-	totalSize += -totalSize & (spAlign - 1) // align to spAlign
-	sp := newg.stack.hi - totalSize
-	spArg := sp
-	if hasLinkRegister {
-		// caller's LR
-		*(*unsafe.Pointer)(unsafe.Pointer(sp)) = nil
-		spArg += ptrSize
-	}
-	memmove(unsafe.Pointer(spArg), unsafe.Pointer(argp), uintptr(narg))
-
-	memclr(unsafe.Pointer(&newg.sched), unsafe.Sizeof(newg.sched))
-	newg.sched.sp = sp
-	newg.sched.pc = funcPC(goexit) + _PCQuantum // +PCQuantum so that previous instruction is in same function
-	newg.sched.g = guintptr(unsafe.Pointer(newg))
-	gostartcallfn(&newg.sched, fn)
-	newg.gopc = callerpc
-	newg.startpc = fn.fn
-	casgstatus(newg, _Gdead, _Grunnable)
-
-	if _p_.goidcache == _p_.goidcacheend {
-		// Sched.goidgen is the last allocated id,
-		// this batch must be [sched.goidgen+1, sched.goidgen+GoidCacheBatch].
-		// At startup sched.goidgen=0, so main goroutine receives goid=1.
-		_p_.goidcache = xadd64(&sched.goidgen, _GoidCacheBatch)
-		_p_.goidcache -= _GoidCacheBatch - 1
-		_p_.goidcacheend = _p_.goidcache + _GoidCacheBatch
-	}
-	newg.goid = int64(_p_.goidcache)
-	_p_.goidcache++
-	if raceenabled {
-		newg.racectx = racegostart(callerpc)
-	}
-	if trace.enabled {
-		traceGoCreate(newg, newg.startpc)
-	}
-	runqput(_p_, newg, true)
-
-	if atomicload(&sched.npidle) != 0 && atomicload(&sched.nmspinning) == 0 && unsafe.Pointer(fn.fn) != unsafe.Pointer(funcPC(main)) { // TODO: fast atomic
-		wakep()
-	}
-	_g_.m.locks--
-	if _g_.m.locks == 0 && _g_.preempt { // restore the preemption request in case we've cleared it in newstack
-		_g_.stackguard0 = stackPreempt
-	}
-	return newg
-}
-
-// Put on gfree list.
-// If local list is too long, transfer a batch to the global list.
-func gfput(_p_ *p, gp *g) {
-	if readgstatus(gp) != _Gdead {
-		throw("gfput: bad status (not Gdead)")
-	}
-
-	stksize := gp.stackAlloc
-
-	if stksize != _FixedStack {
-		// non-standard stack size - free it.
-		stackfree(gp.stack, gp.stackAlloc)
-		gp.stack.lo = 0
-		gp.stack.hi = 0
-		gp.stackguard0 = 0
-		gp.stkbar = nil
-		gp.stkbarPos = 0
-	} else {
-		// Reset stack barriers.
-		gp.stkbar = gp.stkbar[:0]
-		gp.stkbarPos = 0
-	}
-
-	gp.schedlink.set(_p_.gfree)
-	_p_.gfree = gp
-	_p_.gfreecnt++
-	if _p_.gfreecnt >= 64 {
-		lock(&sched.gflock)
-		for _p_.gfreecnt >= 32 {
-			_p_.gfreecnt--
-			gp = _p_.gfree
-			_p_.gfree = gp.schedlink.ptr()
-			gp.schedlink.set(sched.gfree)
-			sched.gfree = gp
-			sched.ngfree++
-		}
-		unlock(&sched.gflock)
-	}
-}
-
-// Get from gfree list.
-// If local list is empty, grab a batch from global list.
-func gfget(_p_ *p) *g {
-retry:
-	gp := _p_.gfree
-	if gp == nil && sched.gfree != nil {
-		lock(&sched.gflock)
-		for _p_.gfreecnt < 32 && sched.gfree != nil {
-			_p_.gfreecnt++
-			gp = sched.gfree
-			sched.gfree = gp.schedlink.ptr()
-			sched.ngfree--
-			gp.schedlink.set(_p_.gfree)
-			_p_.gfree = gp
-		}
-		unlock(&sched.gflock)
-		goto retry
-	}
-	if gp != nil {
-		_p_.gfree = gp.schedlink.ptr()
-		_p_.gfreecnt--
-		if gp.stack.lo == 0 {
-			// Stack was deallocated in gfput.  Allocate a new one.
-			systemstack(func() {
-				gp.stack, gp.stkbar = stackalloc(_FixedStack)
-			})
-			gp.stackguard0 = gp.stack.lo + _StackGuard
-			gp.stackAlloc = _FixedStack
-		} else {
-			if raceenabled {
-				racemalloc(unsafe.Pointer(gp.stack.lo), gp.stackAlloc)
-			}
-		}
-	}
-	return gp
-}
-
-// Purge all cached G's from gfree list to the global list.
-func gfpurge(_p_ *p) {
-	lock(&sched.gflock)
-	for _p_.gfreecnt != 0 {
-		_p_.gfreecnt--
-		gp := _p_.gfree
-		_p_.gfree = gp.schedlink.ptr()
-		gp.schedlink.set(sched.gfree)
-		sched.gfree = gp
-		sched.ngfree++
-	}
-	unlock(&sched.gflock)
-}
-
-// Breakpoint executes a breakpoint trap.
-func Breakpoint() {
-	breakpoint()
-}
-
-// dolockOSThread is called by LockOSThread and lockOSThread below
-// after they modify m.locked. Do not allow preemption during this call,
-// or else the m might be different in this function than in the caller.
-//go:nosplit
-func dolockOSThread() {
-	_g_ := getg()
-	_g_.m.lockedg = _g_
-	_g_.lockedm = _g_.m
-}
-
-//go:nosplit
-
-// LockOSThread wires the calling goroutine to its current operating system thread.
-// Until the calling goroutine exits or calls UnlockOSThread, it will always
-// execute in that thread, and no other goroutine can.
-func LockOSThread() {
-	getg().m.locked |= _LockExternal
-	dolockOSThread()
-}
-
-//go:nosplit
-func lockOSThread() {
-	getg().m.locked += _LockInternal
-	dolockOSThread()
-}
-
-// dounlockOSThread is called by UnlockOSThread and unlockOSThread below
-// after they update m->locked. Do not allow preemption during this call,
-// or else the m might be in different in this function than in the caller.
-//go:nosplit
-func dounlockOSThread() {
-	_g_ := getg()
-	if _g_.m.locked != 0 {
-		return
-	}
-	_g_.m.lockedg = nil
-	_g_.lockedm = nil
-}
-
-//go:nosplit
-
-// UnlockOSThread unwires the calling goroutine from its fixed operating system thread.
-// If the calling goroutine has not called LockOSThread, UnlockOSThread is a no-op.
-func UnlockOSThread() {
-	getg().m.locked &^= _LockExternal
-	dounlockOSThread()
-}
-
-//go:nosplit
-func unlockOSThread() {
-	_g_ := getg()
-	if _g_.m.locked < _LockInternal {
-		systemstack(badunlockosthread)
-	}
-	_g_.m.locked -= _LockInternal
-	dounlockOSThread()
-}
-
-func badunlockosthread() {
-	throw("runtime: internal error: misuse of lockOSThread/unlockOSThread")
-}
-
-func gcount() int32 {
-	n := int32(allglen) - sched.ngfree
-	for i := 0; ; i++ {
-		_p_ := allp[i]
-		if _p_ == nil {
-			break
-		}
-		n -= _p_.gfreecnt
-	}
-
-	// All these variables can be changed concurrently, so the result can be inconsistent.
-	// But at least the current goroutine is running.
-	if n < 1 {
-		n = 1
-	}
-	return n
-}
-
-func mcount() int32 {
-	return sched.mcount
-}
-
-var prof struct {
-	lock uint32
-	hz   int32
-}
-
-func _System()       { _System() }
-func _ExternalCode() { _ExternalCode() }
-func _GC()           { _GC() }
-
-// Called if we receive a SIGPROF signal.
-func sigprof(pc, sp, lr uintptr, gp *g, mp *m) {
-	if prof.hz == 0 {
-		return
-	}
-
-	// Profiling runs concurrently with GC, so it must not allocate.
-	mp.mallocing++
-
-	// Coordinate with stack barrier insertion in scanstack.
-	for !cas(&gp.stackLock, 0, 1) {
-		osyield()
-	}
-
-	// Define that a "user g" is a user-created goroutine, and a "system g"
-	// is one that is m->g0 or m->gsignal.
-	//
-	// We might be interrupted for profiling halfway through a
-	// goroutine switch. The switch involves updating three (or four) values:
-	// g, PC, SP, and (on arm) LR. The PC must be the last to be updated,
-	// because once it gets updated the new g is running.
-	//
-	// When switching from a user g to a system g, LR is not considered live,
-	// so the update only affects g, SP, and PC. Since PC must be last, there
-	// the possible partial transitions in ordinary execution are (1) g alone is updated,
-	// (2) both g and SP are updated, and (3) SP alone is updated.
-	// If SP or g alone is updated, we can detect the partial transition by checking
-	// whether the SP is within g's stack bounds. (We could also require that SP
-	// be changed only after g, but the stack bounds check is needed by other
-	// cases, so there is no need to impose an additional requirement.)
-	//
-	// There is one exceptional transition to a system g, not in ordinary execution.
-	// When a signal arrives, the operating system starts the signal handler running
-	// with an updated PC and SP. The g is updated last, at the beginning of the
-	// handler. There are two reasons this is okay. First, until g is updated the
-	// g and SP do not match, so the stack bounds check detects the partial transition.
-	// Second, signal handlers currently run with signals disabled, so a profiling
-	// signal cannot arrive during the handler.
-	//
-	// When switching from a system g to a user g, there are three possibilities.
-	//
-	// First, it may be that the g switch has no PC update, because the SP
-	// either corresponds to a user g throughout (as in asmcgocall)
-	// or because it has been arranged to look like a user g frame
-	// (as in cgocallback_gofunc). In this case, since the entire
-	// transition is a g+SP update, a partial transition updating just one of
-	// those will be detected by the stack bounds check.
-	//
-	// Second, when returning from a signal handler, the PC and SP updates
-	// are performed by the operating system in an atomic update, so the g
-	// update must be done before them. The stack bounds check detects
-	// the partial transition here, and (again) signal handlers run with signals
-	// disabled, so a profiling signal cannot arrive then anyway.
-	//
-	// Third, the common case: it may be that the switch updates g, SP, and PC
-	// separately. If the PC is within any of the functions that does this,
-	// we don't ask for a traceback. C.F. the function setsSP for more about this.
-	//
-	// There is another apparently viable approach, recorded here in case
-	// the "PC within setsSP function" check turns out not to be usable.
-	// It would be possible to delay the update of either g or SP until immediately
-	// before the PC update instruction. Then, because of the stack bounds check,
-	// the only problematic interrupt point is just before that PC update instruction,
-	// and the sigprof handler can detect that instruction and simulate stepping past
-	// it in order to reach a consistent state. On ARM, the update of g must be made
-	// in two places (in R10 and also in a TLS slot), so the delayed update would
-	// need to be the SP update. The sigprof handler must read the instruction at
-	// the current PC and if it was the known instruction (for example, JMP BX or
-	// MOV R2, PC), use that other register in place of the PC value.
-	// The biggest drawback to this solution is that it requires that we can tell
-	// whether it's safe to read from the memory pointed at by PC.
-	// In a correct program, we can test PC == nil and otherwise read,
-	// but if a profiling signal happens at the instant that a program executes
-	// a bad jump (before the program manages to handle the resulting fault)
-	// the profiling handler could fault trying to read nonexistent memory.
-	//
-	// To recap, there are no constraints on the assembly being used for the
-	// transition. We simply require that g and SP match and that the PC is not
-	// in gogo.
-	traceback := true
-	if gp == nil || sp < gp.stack.lo || gp.stack.hi < sp || setsSP(pc) {
-		traceback = false
-	}
-	var stk [maxCPUProfStack]uintptr
-	n := 0
-	if mp.ncgo > 0 && mp.curg != nil && mp.curg.syscallpc != 0 && mp.curg.syscallsp != 0 {
-		// Cgo, we can't unwind and symbolize arbitrary C code,
-		// so instead collect Go stack that leads to the cgo call.
-		// This is especially important on windows, since all syscalls are cgo calls.
-		n = gentraceback(mp.curg.syscallpc, mp.curg.syscallsp, 0, mp.curg, 0, &stk[0], len(stk), nil, nil, 0)
-	} else if traceback {
-		n = gentraceback(pc, sp, lr, gp, 0, &stk[0], len(stk), nil, nil, _TraceTrap|_TraceJumpStack)
-	}
-	if !traceback || n <= 0 {
-		// Normal traceback is impossible or has failed.
-		// See if it falls into several common cases.
-		n = 0
-		if GOOS == "windows" && n == 0 && mp.libcallg != 0 && mp.libcallpc != 0 && mp.libcallsp != 0 {
-			// Libcall, i.e. runtime syscall on windows.
-			// Collect Go stack that leads to the call.
-			n = gentraceback(mp.libcallpc, mp.libcallsp, 0, mp.libcallg.ptr(), 0, &stk[0], len(stk), nil, nil, 0)
-		}
-		if n == 0 {
-			// If all of the above has failed, account it against abstract "System" or "GC".
-			n = 2
-			// "ExternalCode" is better than "etext".
-			if pc > firstmoduledata.etext {
-				pc = funcPC(_ExternalCode) + _PCQuantum
-			}
-			stk[0] = pc
-			if mp.preemptoff != "" || mp.helpgc != 0 {
-				stk[1] = funcPC(_GC) + _PCQuantum
-			} else {
-				stk[1] = funcPC(_System) + _PCQuantum
-			}
-		}
-	}
-	atomicstore(&gp.stackLock, 0)
-
-	if prof.hz != 0 {
-		// Simple cas-lock to coordinate with setcpuprofilerate.
-		for !cas(&prof.lock, 0, 1) {
-			osyield()
-		}
-		if prof.hz != 0 {
-			cpuprof.add(stk[:n])
-		}
-		atomicstore(&prof.lock, 0)
-	}
-	mp.mallocing--
-}
-
-// Reports whether a function will set the SP
-// to an absolute value. Important that
-// we don't traceback when these are at the bottom
-// of the stack since we can't be sure that we will
-// find the caller.
-//
-// If the function is not on the bottom of the stack
-// we assume that it will have set it up so that traceback will be consistent,
-// either by being a traceback terminating function
-// or putting one on the stack at the right offset.
-func setsSP(pc uintptr) bool {
-	f := findfunc(pc)
-	if f == nil {
-		// couldn't find the function for this PC,
-		// so assume the worst and stop traceback
-		return true
-	}
-	switch f.entry {
-	case gogoPC, systemstackPC, mcallPC, morestackPC:
-		return true
-	}
-	return false
-}
-
-// Arrange to call fn with a traceback hz times a second.
-func setcpuprofilerate_m(hz int32) {
-	// Force sane arguments.
-	if hz < 0 {
-		hz = 0
-	}
-
-	// Disable preemption, otherwise we can be rescheduled to another thread
-	// that has profiling enabled.
-	_g_ := getg()
-	_g_.m.locks++
-
-	// Stop profiler on this thread so that it is safe to lock prof.
-	// if a profiling signal came in while we had prof locked,
-	// it would deadlock.
-	resetcpuprofiler(0)
-
-	for !cas(&prof.lock, 0, 1) {
-		osyield()
-	}
-	prof.hz = hz
-	atomicstore(&prof.lock, 0)
-
-	lock(&sched.lock)
-	sched.profilehz = hz
-	unlock(&sched.lock)
-
-	if hz != 0 {
-		resetcpuprofiler(hz)
-	}
-
-	_g_.m.locks--
-}
-
-// Change number of processors.  The world is stopped, sched is locked.
-// gcworkbufs are not being modified by either the GC or
-// the write barrier code.
-// Returns list of Ps with local work, they need to be scheduled by the caller.
-func procresize(nprocs int32) *p {
-	old := gomaxprocs
-	if old < 0 || old > _MaxGomaxprocs || nprocs <= 0 || nprocs > _MaxGomaxprocs {
-		throw("procresize: invalid arg")
-	}
-	if trace.enabled {
-		traceGomaxprocs(nprocs)
-	}
-
-	// update statistics
-	now := nanotime()
-	if sched.procresizetime != 0 {
-		sched.totaltime += int64(old) * (now - sched.procresizetime)
-	}
-	sched.procresizetime = now
-
-	// initialize new P's
-	for i := int32(0); i < nprocs; i++ {
-		pp := allp[i]
-		if pp == nil {
-			pp = new(p)
-			pp.id = i
-			pp.status = _Pgcstop
-			pp.sudogcache = pp.sudogbuf[:0]
-			for i := range pp.deferpool {
-				pp.deferpool[i] = pp.deferpoolbuf[i][:0]
-			}
-			atomicstorep(unsafe.Pointer(&allp[i]), unsafe.Pointer(pp))
-		}
-		if pp.mcache == nil {
-			if old == 0 && i == 0 {
-				if getg().m.mcache == nil {
-					throw("missing mcache?")
-				}
-				pp.mcache = getg().m.mcache // bootstrap
-			} else {
-				pp.mcache = allocmcache()
-			}
-		}
-	}
-
-	// free unused P's
-	for i := nprocs; i < old; i++ {
-		p := allp[i]
-		if trace.enabled {
-			if p == getg().m.p.ptr() {
-				// moving to p[0], pretend that we were descheduled
-				// and then scheduled again to keep the trace sane.
-				traceGoSched()
-				traceProcStop(p)
-			}
-		}
-		// move all runnable goroutines to the global queue
-		for p.runqhead != p.runqtail {
-			// pop from tail of local queue
-			p.runqtail--
-			gp := p.runq[p.runqtail%uint32(len(p.runq))]
-			// push onto head of global queue
-			globrunqputhead(gp)
-		}
-		if p.runnext != 0 {
-			globrunqputhead(p.runnext.ptr())
-			p.runnext = 0
-		}
-		// if there's a background worker, make it runnable and put
-		// it on the global queue so it can clean itself up
-		if p.gcBgMarkWorker != nil {
-			casgstatus(p.gcBgMarkWorker, _Gwaiting, _Grunnable)
-			if trace.enabled {
-				traceGoUnpark(p.gcBgMarkWorker, 0)
-			}
-			globrunqput(p.gcBgMarkWorker)
-			p.gcBgMarkWorker = nil
-		}
-		for i := range p.sudogbuf {
-			p.sudogbuf[i] = nil
-		}
-		p.sudogcache = p.sudogbuf[:0]
-		for i := range p.deferpool {
-			for j := range p.deferpoolbuf[i] {
-				p.deferpoolbuf[i][j] = nil
-			}
-			p.deferpool[i] = p.deferpoolbuf[i][:0]
-		}
-		freemcache(p.mcache)
-		p.mcache = nil
-		gfpurge(p)
-		traceProcFree(p)
-		p.status = _Pdead
-		// can't free P itself because it can be referenced by an M in syscall
-	}
-
-	_g_ := getg()
-	if _g_.m.p != 0 && _g_.m.p.ptr().id < nprocs {
-		// continue to use the current P
-		_g_.m.p.ptr().status = _Prunning
-	} else {
-		// release the current P and acquire allp[0]
-		if _g_.m.p != 0 {
-			_g_.m.p.ptr().m = 0
-		}
-		_g_.m.p = 0
-		_g_.m.mcache = nil
-		p := allp[0]
-		p.m = 0
-		p.status = _Pidle
-		acquirep(p)
-		if trace.enabled {
-			traceGoStart()
-		}
-	}
-	var runnablePs *p
-	for i := nprocs - 1; i >= 0; i-- {
-		p := allp[i]
-		if _g_.m.p.ptr() == p {
-			continue
-		}
-		p.status = _Pidle
-		if runqempty(p) {
-			pidleput(p)
-		} else {
-			p.m.set(mget())
-			p.link.set(runnablePs)
-			runnablePs = p
-		}
-	}
-	var int32p *int32 = &gomaxprocs // make compiler check that gomaxprocs is an int32
-	atomicstore((*uint32)(unsafe.Pointer(int32p)), uint32(nprocs))
-	return runnablePs
-}
-
-// Associate p and the current m.
-func acquirep(_p_ *p) {
-	acquirep1(_p_)
-
-	// have p; write barriers now allowed
-	_g_ := getg()
-	_g_.m.mcache = _p_.mcache
-
-	if trace.enabled {
-		traceProcStart()
-	}
-}
-
-// May run during STW, so write barriers are not allowed.
-//go:nowritebarrier
-func acquirep1(_p_ *p) {
-	_g_ := getg()
-
-	if _g_.m.p != 0 || _g_.m.mcache != nil {
-		throw("acquirep: already in go")
-	}
-	if _p_.m != 0 || _p_.status != _Pidle {
-		id := int32(0)
-		if _p_.m != 0 {
-			id = _p_.m.ptr().id
-		}
-		print("acquirep: p->m=", _p_.m, "(", id, ") p->status=", _p_.status, "\n")
-		throw("acquirep: invalid p state")
-	}
-	_g_.m.p.set(_p_)
-	_p_.m.set(_g_.m)
-	_p_.status = _Prunning
-}
-
-// Disassociate p and the current m.
-func releasep() *p {
-	_g_ := getg()
-
-	if _g_.m.p == 0 || _g_.m.mcache == nil {
-		throw("releasep: invalid arg")
-	}
-	_p_ := _g_.m.p.ptr()
-	if _p_.m.ptr() != _g_.m || _p_.mcache != _g_.m.mcache || _p_.status != _Prunning {
-		print("releasep: m=", _g_.m, " m->p=", _g_.m.p.ptr(), " p->m=", _p_.m, " m->mcache=", _g_.m.mcache, " p->mcache=", _p_.mcache, " p->status=", _p_.status, "\n")
-		throw("releasep: invalid p state")
-	}
-	if trace.enabled {
-		traceProcStop(_g_.m.p.ptr())
-	}
-	_g_.m.p = 0
-	_g_.m.mcache = nil
-	_p_.m = 0
-	_p_.status = _Pidle
-	return _p_
-}
-
-func incidlelocked(v int32) {
-	lock(&sched.lock)
-	sched.nmidlelocked += v
-	if v > 0 {
-		checkdead()
-	}
-	unlock(&sched.lock)
-}
-
-// Check for deadlock situation.
-// The check is based on number of running M's, if 0 -> deadlock.
-func checkdead() {
-	// For -buildmode=c-shared or -buildmode=c-archive it's OK if
-	// there are no running goroutines.  The calling program is
-	// assumed to be running.
-	if islibrary || isarchive {
-		return
-	}
-
-	// If we are dying because of a signal caught on an already idle thread,
-	// freezetheworld will cause all running threads to block.
-	// And runtime will essentially enter into deadlock state,
-	// except that there is a thread that will call exit soon.
-	if panicking > 0 {
-		return
-	}
-
-	// -1 for sysmon
-	run := sched.mcount - sched.nmidle - sched.nmidlelocked - 1
-	if run > 0 {
-		return
-	}
-	if run < 0 {
-		print("runtime: checkdead: nmidle=", sched.nmidle, " nmidlelocked=", sched.nmidlelocked, " mcount=", sched.mcount, "\n")
-		throw("checkdead: inconsistent counts")
-	}
-
-	grunning := 0
-	lock(&allglock)
-	for i := 0; i < len(allgs); i++ {
-		gp := allgs[i]
-		if isSystemGoroutine(gp) {
-			continue
-		}
-		s := readgstatus(gp)
-		switch s &^ _Gscan {
-		case _Gwaiting:
-			grunning++
-		case _Grunnable,
-			_Grunning,
-			_Gsyscall:
-			unlock(&allglock)
-			print("runtime: checkdead: find g ", gp.goid, " in status ", s, "\n")
-			throw("checkdead: runnable g")
-		}
-	}
-	unlock(&allglock)
-	if grunning == 0 { // possible if main goroutine calls runtime·Goexit()
-		throw("no goroutines (main called runtime.Goexit) - deadlock!")
-	}
-
-	// Maybe jump time forward for playground.
-	gp := timejump()
-	if gp != nil {
-		casgstatus(gp, _Gwaiting, _Grunnable)
-		globrunqput(gp)
-		_p_ := pidleget()
-		if _p_ == nil {
-			throw("checkdead: no p for timer")
-		}
-		mp := mget()
-		if mp == nil {
-			newm(nil, _p_)
-		} else {
-			mp.nextp.set(_p_)
-			notewakeup(&mp.park)
-		}
-		return
-	}
-
-	getg().m.throwing = -1 // do not dump full stacks
-	throw("all goroutines are asleep - deadlock!")
-}
-
-func sysmon() {
-	// If we go two minutes without a garbage collection, force one to run.
-	forcegcperiod := int64(2 * 60 * 1e9)
-
-	// If a heap span goes unused for 5 minutes after a garbage collection,
-	// we hand it back to the operating system.
-	scavengelimit := int64(5 * 60 * 1e9)
-
-	if debug.scavenge > 0 {
-		// Scavenge-a-lot for testing.
-		forcegcperiod = 10 * 1e6
-		scavengelimit = 20 * 1e6
-	}
-
-	lastscavenge := nanotime()
-	nscavenge := 0
-
-	// Make wake-up period small enough for the sampling to be correct.
-	maxsleep := forcegcperiod / 2
-	if scavengelimit < forcegcperiod {
-		maxsleep = scavengelimit / 2
-	}
-
-	lasttrace := int64(0)
-	idle := 0 // how many cycles in succession we had not wokeup somebody
-	delay := uint32(0)
-	for {
-		if idle == 0 { // start with 20us sleep...
-			delay = 20
-		} else if idle > 50 { // start doubling the sleep after 1ms...
-			delay *= 2
-		}
-		if delay > 10*1000 { // up to 10ms
-			delay = 10 * 1000
-		}
-		usleep(delay)
-		if debug.schedtrace <= 0 && (sched.gcwaiting != 0 || atomicload(&sched.npidle) == uint32(gomaxprocs)) { // TODO: fast atomic
-			lock(&sched.lock)
-			if atomicload(&sched.gcwaiting) != 0 || atomicload(&sched.npidle) == uint32(gomaxprocs) {
-				atomicstore(&sched.sysmonwait, 1)
-				unlock(&sched.lock)
-				notetsleep(&sched.sysmonnote, maxsleep)
-				lock(&sched.lock)
-				atomicstore(&sched.sysmonwait, 0)
-				noteclear(&sched.sysmonnote)
-				idle = 0
-				delay = 20
-			}
-			unlock(&sched.lock)
-		}
-		// poll network if not polled for more than 10ms
-		lastpoll := int64(atomicload64(&sched.lastpoll))
-		now := nanotime()
-		unixnow := unixnanotime()
-		if lastpoll != 0 && lastpoll+10*1000*1000 < now {
-			cas64(&sched.lastpoll, uint64(lastpoll), uint64(now))
-			gp := netpoll(false) // non-blocking - returns list of goroutines
-			if gp != nil {
-				// Need to decrement number of idle locked M's
-				// (pretending that one more is running) before injectglist.
-				// Otherwise it can lead to the following situation:
-				// injectglist grabs all P's but before it starts M's to run the P's,
-				// another M returns from syscall, finishes running its G,
-				// observes that there is no work to do and no other running M's
-				// and reports deadlock.
-				incidlelocked(-1)
-				injectglist(gp)
-				incidlelocked(1)
-			}
-		}
-		// retake P's blocked in syscalls
-		// and preempt long running G's
-		if retake(now) != 0 {
-			idle = 0
-		} else {
-			idle++
-		}
-		// check if we need to force a GC
-		lastgc := int64(atomicload64(&memstats.last_gc))
-		if lastgc != 0 && unixnow-lastgc > forcegcperiod && atomicload(&forcegc.idle) != 0 && atomicloaduint(&bggc.working) == 0 {
-			lock(&forcegc.lock)
-			forcegc.idle = 0
-			forcegc.g.schedlink = 0
-			injectglist(forcegc.g)
-			unlock(&forcegc.lock)
-		}
-		// scavenge heap once in a while
-		if lastscavenge+scavengelimit/2 < now {
-			mHeap_Scavenge(int32(nscavenge), uint64(now), uint64(scavengelimit))
-			lastscavenge = now
-			nscavenge++
-		}
-		if debug.schedtrace > 0 && lasttrace+int64(debug.schedtrace*1000000) <= now {
-			lasttrace = now
-			schedtrace(debug.scheddetail > 0)
-		}
-	}
-}
-
-var pdesc [_MaxGomaxprocs]struct {
-	schedtick   uint32
-	schedwhen   int64
-	syscalltick uint32
-	syscallwhen int64
-}
-
-// forcePreemptNS is the time slice given to a G before it is
-// preempted.
-const forcePreemptNS = 10 * 1000 * 1000 // 10ms
-
-func retake(now int64) uint32 {
-	n := 0
-	for i := int32(0); i < gomaxprocs; i++ {
-		_p_ := allp[i]
-		if _p_ == nil {
-			continue
-		}
-		pd := &pdesc[i]
-		s := _p_.status
-		if s == _Psyscall {
-			// Retake P from syscall if it's there for more than 1 sysmon tick (at least 20us).
-			t := int64(_p_.syscalltick)
-			if int64(pd.syscalltick) != t {
-				pd.syscalltick = uint32(t)
-				pd.syscallwhen = now
-				continue
-			}
-			// On the one hand we don't want to retake Ps if there is no other work to do,
-			// but on the other hand we want to retake them eventually
-			// because they can prevent the sysmon thread from deep sleep.
-			if runqempty(_p_) && atomicload(&sched.nmspinning)+atomicload(&sched.npidle) > 0 && pd.syscallwhen+10*1000*1000 > now {
-				continue
-			}
-			// Need to decrement number of idle locked M's
-			// (pretending that one more is running) before the CAS.
-			// Otherwise the M from which we retake can exit the syscall,
-			// increment nmidle and report deadlock.
-			incidlelocked(-1)
-			if cas(&_p_.status, s, _Pidle) {
-				if trace.enabled {
-					traceGoSysBlock(_p_)
-					traceProcStop(_p_)
-				}
-				n++
-				_p_.syscalltick++
-				handoffp(_p_)
-			}
-			incidlelocked(1)
-		} else if s == _Prunning {
-			// Preempt G if it's running for too long.
-			t := int64(_p_.schedtick)
-			if int64(pd.schedtick) != t {
-				pd.schedtick = uint32(t)
-				pd.schedwhen = now
-				continue
-			}
-			if pd.schedwhen+forcePreemptNS > now {
-				continue
-			}
-			preemptone(_p_)
-		}
-	}
-	return uint32(n)
-}
-
-// Tell all goroutines that they have been preempted and they should stop.
-// This function is purely best-effort.  It can fail to inform a goroutine if a
-// processor just started running it.
-// No locks need to be held.
-// Returns true if preemption request was issued to at least one goroutine.
-func preemptall() bool {
-	res := false
-	for i := int32(0); i < gomaxprocs; i++ {
-		_p_ := allp[i]
-		if _p_ == nil || _p_.status != _Prunning {
-			continue
-		}
-		if preemptone(_p_) {
-			res = true
-		}
-	}
-	return res
-}
-
-// Tell the goroutine running on processor P to stop.
-// This function is purely best-effort.  It can incorrectly fail to inform the
-// goroutine.  It can send inform the wrong goroutine.  Even if it informs the
-// correct goroutine, that goroutine might ignore the request if it is
-// simultaneously executing newstack.
-// No lock needs to be held.
-// Returns true if preemption request was issued.
-// The actual preemption will happen at some point in the future
-// and will be indicated by the gp->status no longer being
-// Grunning
-func preemptone(_p_ *p) bool {
-	mp := _p_.m.ptr()
-	if mp == nil || mp == getg().m {
-		return false
-	}
-	gp := mp.curg
-	if gp == nil || gp == mp.g0 {
-		return false
-	}
-
-	gp.preempt = true
-
-	// Every call in a go routine checks for stack overflow by
-	// comparing the current stack pointer to gp->stackguard0.
-	// Setting gp->stackguard0 to StackPreempt folds
-	// preemption into the normal stack overflow check.
-	gp.stackguard0 = stackPreempt
-	return true
-}
-
-var starttime int64
-
-func schedtrace(detailed bool) {
-	now := nanotime()
-	if starttime == 0 {
-		starttime = now
-	}
-
-	lock(&sched.lock)
-	print("SCHED ", (now-starttime)/1e6, "ms: gomaxprocs=", gomaxprocs, " idleprocs=", sched.npidle, " threads=", sched.mcount, " spinningthreads=", sched.nmspinning, " idlethreads=", sched.nmidle, " runqueue=", sched.runqsize)
-	if detailed {
-		print(" gcwaiting=", sched.gcwaiting, " nmidlelocked=", sched.nmidlelocked, " stopwait=", sched.stopwait, " sysmonwait=", sched.sysmonwait, "\n")
-	}
-	// We must be careful while reading data from P's, M's and G's.
-	// Even if we hold schedlock, most data can be changed concurrently.
-	// E.g. (p->m ? p->m->id : -1) can crash if p->m changes from non-nil to nil.
-	for i := int32(0); i < gomaxprocs; i++ {
-		_p_ := allp[i]
-		if _p_ == nil {
-			continue
-		}
-		mp := _p_.m.ptr()
-		h := atomicload(&_p_.runqhead)
-		t := atomicload(&_p_.runqtail)
-		if detailed {
-			id := int32(-1)
-			if mp != nil {
-				id = mp.id
-			}
-			print("  P", i, ": status=", _p_.status, " schedtick=", _p_.schedtick, " syscalltick=", _p_.syscalltick, " m=", id, " runqsize=", t-h, " gfreecnt=", _p_.gfreecnt, "\n")
-		} else {
-			// In non-detailed mode format lengths of per-P run queues as:
-			// [len1 len2 len3 len4]
-			print(" ")
-			if i == 0 {
-				print("[")
-			}
-			print(t - h)
-			if i == gomaxprocs-1 {
-				print("]\n")
-			}
-		}
-	}
-
-	if !detailed {
-		unlock(&sched.lock)
-		return
-	}
-
-	for mp := allm; mp != nil; mp = mp.alllink {
-		_p_ := mp.p.ptr()
-		gp := mp.curg
-		lockedg := mp.lockedg
-		id1 := int32(-1)
-		if _p_ != nil {
-			id1 = _p_.id
-		}
-		id2 := int64(-1)
-		if gp != nil {
-			id2 = gp.goid
-		}
-		id3 := int64(-1)
-		if lockedg != nil {
-			id3 = lockedg.goid
-		}
-		print("  M", mp.id, ": p=", id1, " curg=", id2, " mallocing=", mp.mallocing, " throwing=", mp.throwing, " preemptoff=", mp.preemptoff, ""+" locks=", mp.locks, " dying=", mp.dying, " helpgc=", mp.helpgc, " spinning=", mp.spinning, " blocked=", getg().m.blocked, " lockedg=", id3, "\n")
-	}
-
-	lock(&allglock)
-	for gi := 0; gi < len(allgs); gi++ {
-		gp := allgs[gi]
-		mp := gp.m
-		lockedm := gp.lockedm
-		id1 := int32(-1)
-		if mp != nil {
-			id1 = mp.id
-		}
-		id2 := int32(-1)
-		if lockedm != nil {
-			id2 = lockedm.id
-		}
-		print("  G", gp.goid, ": status=", readgstatus(gp), "(", gp.waitreason, ") m=", id1, " lockedm=", id2, "\n")
-	}
-	unlock(&allglock)
-	unlock(&sched.lock)
-}
-
-// Put mp on midle list.
-// Sched must be locked.
-// May run during STW, so write barriers are not allowed.
-//go:nowritebarrier
-func mput(mp *m) {
-	mp.schedlink = sched.midle
-	sched.midle.set(mp)
-	sched.nmidle++
-	checkdead()
-}
-
-// Try to get an m from midle list.
-// Sched must be locked.
-// May run during STW, so write barriers are not allowed.
-//go:nowritebarrier
-func mget() *m {
-	mp := sched.midle.ptr()
-	if mp != nil {
-		sched.midle = mp.schedlink
-		sched.nmidle--
-	}
-	return mp
-}
-
-// Put gp on the global runnable queue.
-// Sched must be locked.
-// May run during STW, so write barriers are not allowed.
-//go:nowritebarrier
-func globrunqput(gp *g) {
-	gp.schedlink = 0
-	if sched.runqtail != 0 {
-		sched.runqtail.ptr().schedlink.set(gp)
-	} else {
-		sched.runqhead.set(gp)
-	}
-	sched.runqtail.set(gp)
-	sched.runqsize++
-}
-
-// Put gp at the head of the global runnable queue.
-// Sched must be locked.
-// May run during STW, so write barriers are not allowed.
-//go:nowritebarrier
-func globrunqputhead(gp *g) {
-	gp.schedlink = sched.runqhead
-	sched.runqhead.set(gp)
-	if sched.runqtail == 0 {
-		sched.runqtail.set(gp)
-	}
-	sched.runqsize++
-}
-
-// Put a batch of runnable goroutines on the global runnable queue.
-// Sched must be locked.
-func globrunqputbatch(ghead *g, gtail *g, n int32) {
-	gtail.schedlink = 0
-	if sched.runqtail != 0 {
-		sched.runqtail.ptr().schedlink.set(ghead)
-	} else {
-		sched.runqhead.set(ghead)
-	}
-	sched.runqtail.set(gtail)
-	sched.runqsize += n
-}
-
-// Try get a batch of G's from the global runnable queue.
-// Sched must be locked.
-func globrunqget(_p_ *p, max int32) *g {
-	if sched.runqsize == 0 {
-		return nil
-	}
-
-	n := sched.runqsize/gomaxprocs + 1
-	if n > sched.runqsize {
-		n = sched.runqsize
-	}
-	if max > 0 && n > max {
-		n = max
-	}
-	if n > int32(len(_p_.runq))/2 {
-		n = int32(len(_p_.runq)) / 2
-	}
-
-	sched.runqsize -= n
-	if sched.runqsize == 0 {
-		sched.runqtail = 0
-	}
-
-	gp := sched.runqhead.ptr()
-	sched.runqhead = gp.schedlink
-	n--
-	for ; n > 0; n-- {
-		gp1 := sched.runqhead.ptr()
-		sched.runqhead = gp1.schedlink
-		runqput(_p_, gp1, false)
-	}
-	return gp
-}
-
-// Put p to on _Pidle list.
-// Sched must be locked.
-// May run during STW, so write barriers are not allowed.
-//go:nowritebarrier
-func pidleput(_p_ *p) {
-	if !runqempty(_p_) {
-		throw("pidleput: P has non-empty run queue")
-	}
-	_p_.link = sched.pidle
-	sched.pidle.set(_p_)
-	xadd(&sched.npidle, 1) // TODO: fast atomic
-}
-
-// Try get a p from _Pidle list.
-// Sched must be locked.
-// May run during STW, so write barriers are not allowed.
-//go:nowritebarrier
-func pidleget() *p {
-	_p_ := sched.pidle.ptr()
-	if _p_ != nil {
-		sched.pidle = _p_.link
-		xadd(&sched.npidle, -1) // TODO: fast atomic
-	}
-	return _p_
-}
-
-// runqempty returns true if _p_ has no Gs on its local run queue.
-// Note that this test is generally racy.
-func runqempty(_p_ *p) bool {
-	return _p_.runqhead == _p_.runqtail && _p_.runnext == 0
-}
-
-// To shake out latent assumptions about scheduling order,
-// we introduce some randomness into scheduling decisions
-// when running with the race detector.
-// The need for this was made obvious by changing the
-// (deterministic) scheduling order in Go 1.5 and breaking
-// many poorly-written tests.
-// With the randomness here, as long as the tests pass
-// consistently with -race, they shouldn't have latent scheduling
-// assumptions.
-const randomizeScheduler = raceenabled
-
-// runqput tries to put g on the local runnable queue.
-// If next if false, runqput adds g to the tail of the runnable queue.
-// If next is true, runqput puts g in the _p_.runnext slot.
-// If the run queue is full, runnext puts g on the global queue.
-// Executed only by the owner P.
-func runqput(_p_ *p, gp *g, next bool) {
-	if randomizeScheduler && next && fastrand1()%2 == 0 {
-		next = false
-	}
-
-	if next {
-	retryNext:
-		oldnext := _p_.runnext
-		if !_p_.runnext.cas(oldnext, guintptr(unsafe.Pointer(gp))) {
-			goto retryNext
-		}
-		if oldnext == 0 {
-			return
-		}
-		// Kick the old runnext out to the regular run queue.
-		gp = oldnext.ptr()
-	}
-
-retry:
-	h := atomicload(&_p_.runqhead) // load-acquire, synchronize with consumers
-	t := _p_.runqtail
-	if t-h < uint32(len(_p_.runq)) {
-		_p_.runq[t%uint32(len(_p_.runq))] = gp
-		atomicstore(&_p_.runqtail, t+1) // store-release, makes the item available for consumption
-		return
-	}
-	if runqputslow(_p_, gp, h, t) {
-		return
-	}
-	// the queue is not full, now the put above must suceed
-	goto retry
-}
-
-// Put g and a batch of work from local runnable queue on global queue.
-// Executed only by the owner P.
-func runqputslow(_p_ *p, gp *g, h, t uint32) bool {
-	var batch [len(_p_.runq)/2 + 1]*g
-
-	// First, grab a batch from local queue.
-	n := t - h
-	n = n / 2
-	if n != uint32(len(_p_.runq)/2) {
-		throw("runqputslow: queue is not full")
-	}
-	for i := uint32(0); i < n; i++ {
-		batch[i] = _p_.runq[(h+i)%uint32(len(_p_.runq))]
-	}
-	if !cas(&_p_.runqhead, h, h+n) { // cas-release, commits consume
-		return false
-	}
-	batch[n] = gp
-
-	if randomizeScheduler {
-		for i := uint32(1); i <= n; i++ {
-			j := fastrand1() % (i + 1)
-			batch[i], batch[j] = batch[j], batch[i]
-		}
-	}
-
-	// Link the goroutines.
-	for i := uint32(0); i < n; i++ {
-		batch[i].schedlink.set(batch[i+1])
-	}
-
-	// Now put the batch on global queue.
-	lock(&sched.lock)
-	globrunqputbatch(batch[0], batch[n], int32(n+1))
-	unlock(&sched.lock)
-	return true
-}
-
-// Get g from local runnable queue.
-// If inheritTime is true, gp should inherit the remaining time in the
-// current time slice. Otherwise, it should start a new time slice.
-// Executed only by the owner P.
-func runqget(_p_ *p) (gp *g, inheritTime bool) {
-	// If there's a runnext, it's the next G to run.
-	for {
-		next := _p_.runnext
-		if next == 0 {
-			break
-		}
-		if _p_.runnext.cas(next, 0) {
-			return next.ptr(), true
-		}
-	}
-
-	for {
-		h := atomicload(&_p_.runqhead) // load-acquire, synchronize with other consumers
-		t := _p_.runqtail
-		if t == h {
-			return nil, false
-		}
-		gp := _p_.runq[h%uint32(len(_p_.runq))]
-		if cas(&_p_.runqhead, h, h+1) { // cas-release, commits consume
-			return gp, false
-		}
-	}
-}
-
-// Grabs a batch of goroutines from _p_'s runnable queue into batch.
-// Batch is a ring buffer starting at batchHead.
-// Returns number of grabbed goroutines.
-// Can be executed by any P.
-func runqgrab(_p_ *p, batch *[256]*g, batchHead uint32, stealRunNextG bool) uint32 {
-	for {
-		h := atomicload(&_p_.runqhead) // load-acquire, synchronize with other consumers
-		t := atomicload(&_p_.runqtail) // load-acquire, synchronize with the producer
-		n := t - h
-		n = n - n/2
-		if n == 0 {
-			if stealRunNextG {
-				// Try to steal from _p_.runnext.
-				if next := _p_.runnext; next != 0 {
-					// Sleep to ensure that _p_ isn't about to run the g we
-					// are about to steal.
-					// The important use case here is when the g running on _p_
-					// ready()s another g and then almost immediately blocks.
-					// Instead of stealing runnext in this window, back off
-					// to give _p_ a chance to schedule runnext. This will avoid
-					// thrashing gs between different Ps.
-					usleep(100)
-					if !_p_.runnext.cas(next, 0) {
-						continue
-					}
-					batch[batchHead%uint32(len(batch))] = next.ptr()
-					return 1
-				}
-			}
-			return 0
-		}
-		if n > uint32(len(_p_.runq)/2) { // read inconsistent h and t
-			continue
-		}
-		for i := uint32(0); i < n; i++ {
-			g := _p_.runq[(h+i)%uint32(len(_p_.runq))]
-			batch[(batchHead+i)%uint32(len(batch))] = g
-		}
-		if cas(&_p_.runqhead, h, h+n) { // cas-release, commits consume
-			return n
-		}
-	}
-}
-
-// Steal half of elements from local runnable queue of p2
-// and put onto local runnable queue of p.
-// Returns one of the stolen elements (or nil if failed).
-func runqsteal(_p_, p2 *p, stealRunNextG bool) *g {
-	t := _p_.runqtail
-	n := runqgrab(p2, &_p_.runq, t, stealRunNextG)
-	if n == 0 {
-		return nil
-	}
-	n--
-	gp := _p_.runq[(t+n)%uint32(len(_p_.runq))]
-	if n == 0 {
-		return gp
-	}
-	h := atomicload(&_p_.runqhead) // load-acquire, synchronize with consumers
-	if t-h+n >= uint32(len(_p_.runq)) {
-		throw("runqsteal: runq overflow")
-	}
-	atomicstore(&_p_.runqtail, t+n) // store-release, makes the item available for consumption
-	return gp
-}
-
-func testSchedLocalQueue() {
-	_p_ := new(p)
-	gs := make([]g, len(_p_.runq))
-	for i := 0; i < len(_p_.runq); i++ {
-		if g, _ := runqget(_p_); g != nil {
-			throw("runq is not empty initially")
-		}
-		for j := 0; j < i; j++ {
-			runqput(_p_, &gs[i], false)
-		}
-		for j := 0; j < i; j++ {
-			if g, _ := runqget(_p_); g != &gs[i] {
-				print("bad element at iter ", i, "/", j, "\n")
-				throw("bad element")
-			}
-		}
-		if g, _ := runqget(_p_); g != nil {
-			throw("runq is not empty afterwards")
-		}
-	}
-}
-
-func testSchedLocalQueueSteal() {
-	p1 := new(p)
-	p2 := new(p)
-	gs := make([]g, len(p1.runq))
-	for i := 0; i < len(p1.runq); i++ {
-		for j := 0; j < i; j++ {
-			gs[j].sig = 0
-			runqput(p1, &gs[j], false)
-		}
-		gp := runqsteal(p2, p1, true)
-		s := 0
-		if gp != nil {
-			s++
-			gp.sig++
-		}
-		for {
-			gp, _ = runqget(p2)
-			if gp == nil {
-				break
-			}
-			s++
-			gp.sig++
-		}
-		for {
-			gp, _ = runqget(p1)
-			if gp == nil {
-				break
-			}
-			gp.sig++
-		}
-		for j := 0; j < i; j++ {
-			if gs[j].sig != 1 {
-				print("bad element ", j, "(", gs[j].sig, ") at iter ", i, "\n")
-				throw("bad element")
-			}
-		}
-		if s != i/2 && s != i/2+1 {
-			print("bad steal ", s, ", want ", i/2, " or ", i/2+1, ", iter ", i, "\n")
-			throw("bad steal")
-		}
-	}
-}
-
-func setMaxThreads(in int) (out int) {
-	lock(&sched.lock)
-	out = int(sched.maxmcount)
-	sched.maxmcount = int32(in)
-	checkmcount()
-	unlock(&sched.lock)
-	return
-}
-
-func haveexperiment(name string) bool {
-	x := goexperiment
-	for x != "" {
-		xname := ""
-		i := index(x, ",")
-		if i < 0 {
-			xname, x = x, ""
-		} else {
-			xname, x = x[:i], x[i+1:]
-		}
-		if xname == name {
-			return true
-		}
-	}
-	return false
-}
-
-//go:nosplit
-func procPin() int {
-	_g_ := getg()
-	mp := _g_.m
-
-	mp.locks++
-	return int(mp.p.ptr().id)
-}
-
-//go:nosplit
-func procUnpin() {
-	_g_ := getg()
-	_g_.m.locks--
-}
-
-//go:linkname sync_runtime_procPin sync.runtime_procPin
-//go:nosplit
-func sync_runtime_procPin() int {
-	return procPin()
-}
-
-//go:linkname sync_runtime_procUnpin sync.runtime_procUnpin
-//go:nosplit
-func sync_runtime_procUnpin() {
-	procUnpin()
-}
-
-//go:linkname sync_atomic_runtime_procPin sync/atomic.runtime_procPin
-//go:nosplit
-func sync_atomic_runtime_procPin() int {
-	return procPin()
-}
-
-//go:linkname sync_atomic_runtime_procUnpin sync/atomic.runtime_procUnpin
-//go:nosplit
-func sync_atomic_runtime_procUnpin() {
-	procUnpin()
-}
-
-// Active spinning for sync.Mutex.
-//go:linkname sync_runtime_canSpin sync.runtime_canSpin
-//go:nosplit
-func sync_runtime_canSpin(i int) bool {
-	// sync.Mutex is cooperative, so we are conservative with spinning.
-	// Spin only few times and only if running on a multicore machine and
-	// GOMAXPROCS>1 and there is at least one other running P and local runq is empty.
-	// As opposed to runtime mutex we don't do passive spinning here,
-	// because there can be work on global runq on on other Ps.
-	if i >= active_spin || ncpu <= 1 || gomaxprocs <= int32(sched.npidle+sched.nmspinning)+1 {
-		return false
-	}
-	if p := getg().m.p.ptr(); !runqempty(p) {
-		return false
-	}
-	return true
-}
-
-//go:linkname sync_runtime_doSpin sync.runtime_doSpin
-//go:nosplit
-func sync_runtime_doSpin() {
-	procyield(active_spin_cnt)
-}
diff --git a/src/runtime/race/sched_test.go b/src/runtime/race/sched_test.go
deleted file mode 100644
index aac8fed..0000000
--- a/src/runtime/race/sched_test.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build race
-
-package race_test
-
-import (
-	"bytes"
-	"fmt"
-	"reflect"
-	"runtime"
-	"testing"
-)
-
-func TestRandomScheduling(t *testing.T) {
-	// Scheduler is most consistent with GOMAXPROCS=1.
-	// Use that to make the test most likely to fail.
-	defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(1))
-	const N = 10
-	out := make([][]int, N)
-	for i := 0; i < N; i++ {
-		c := make(chan int, N)
-		for j := 0; j < N; j++ {
-			go func(j int) {
-				c <- j
-			}(j)
-		}
-		row := make([]int, N)
-		for j := 0; j < N; j++ {
-			row[j] = <-c
-		}
-		out[i] = row
-	}
-
-	for i := 0; i < N; i++ {
-		if !reflect.DeepEqual(out[0], out[i]) {
-			return // found a different order
-		}
-	}
-
-	var buf bytes.Buffer
-	for i := 0; i < N; i++ {
-		fmt.Fprintf(&buf, "%v\n", out[i])
-	}
-	t.Fatalf("consistent goroutine execution order:\n%v", buf.String())
-}
diff --git a/src/runtime/race1.go b/src/runtime/race1.go
deleted file mode 100644
index 38afca7..0000000
--- a/src/runtime/race1.go
+++ /dev/null
@@ -1,315 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Implementation of the race detector API.
-// +build race
-
-package runtime
-
-import "unsafe"
-
-// Race runtime functions called via runtime·racecall.
-//go:linkname __tsan_init __tsan_init
-var __tsan_init byte
-
-//go:linkname __tsan_fini __tsan_fini
-var __tsan_fini byte
-
-//go:linkname __tsan_map_shadow __tsan_map_shadow
-var __tsan_map_shadow byte
-
-//go:linkname __tsan_finalizer_goroutine __tsan_finalizer_goroutine
-var __tsan_finalizer_goroutine byte
-
-//go:linkname __tsan_go_start __tsan_go_start
-var __tsan_go_start byte
-
-//go:linkname __tsan_go_end __tsan_go_end
-var __tsan_go_end byte
-
-//go:linkname __tsan_malloc __tsan_malloc
-var __tsan_malloc byte
-
-//go:linkname __tsan_acquire __tsan_acquire
-var __tsan_acquire byte
-
-//go:linkname __tsan_release __tsan_release
-var __tsan_release byte
-
-//go:linkname __tsan_release_merge __tsan_release_merge
-var __tsan_release_merge byte
-
-//go:linkname __tsan_go_ignore_sync_begin __tsan_go_ignore_sync_begin
-var __tsan_go_ignore_sync_begin byte
-
-//go:linkname __tsan_go_ignore_sync_end __tsan_go_ignore_sync_end
-var __tsan_go_ignore_sync_end byte
-
-// Mimic what cmd/cgo would do.
-//go:cgo_import_static __tsan_init
-//go:cgo_import_static __tsan_fini
-//go:cgo_import_static __tsan_map_shadow
-//go:cgo_import_static __tsan_finalizer_goroutine
-//go:cgo_import_static __tsan_go_start
-//go:cgo_import_static __tsan_go_end
-//go:cgo_import_static __tsan_malloc
-//go:cgo_import_static __tsan_acquire
-//go:cgo_import_static __tsan_release
-//go:cgo_import_static __tsan_release_merge
-//go:cgo_import_static __tsan_go_ignore_sync_begin
-//go:cgo_import_static __tsan_go_ignore_sync_end
-
-// These are called from race_amd64.s.
-//go:cgo_import_static __tsan_read
-//go:cgo_import_static __tsan_read_pc
-//go:cgo_import_static __tsan_read_range
-//go:cgo_import_static __tsan_write
-//go:cgo_import_static __tsan_write_pc
-//go:cgo_import_static __tsan_write_range
-//go:cgo_import_static __tsan_func_enter
-//go:cgo_import_static __tsan_func_exit
-
-//go:cgo_import_static __tsan_go_atomic32_load
-//go:cgo_import_static __tsan_go_atomic64_load
-//go:cgo_import_static __tsan_go_atomic32_store
-//go:cgo_import_static __tsan_go_atomic64_store
-//go:cgo_import_static __tsan_go_atomic32_exchange
-//go:cgo_import_static __tsan_go_atomic64_exchange
-//go:cgo_import_static __tsan_go_atomic32_fetch_add
-//go:cgo_import_static __tsan_go_atomic64_fetch_add
-//go:cgo_import_static __tsan_go_atomic32_compare_exchange
-//go:cgo_import_static __tsan_go_atomic64_compare_exchange
-
-// start/end of global data (data+bss).
-var racedatastart uintptr
-var racedataend uintptr
-
-// start/end of heap for race_amd64.s
-var racearenastart uintptr
-var racearenaend uintptr
-
-func racefuncenter(uintptr)
-func racefuncexit()
-func racereadrangepc1(uintptr, uintptr, uintptr)
-func racewriterangepc1(uintptr, uintptr, uintptr)
-func racesymbolizethunk(uintptr)
-
-// racecall allows calling an arbitrary function f from C race runtime
-// with up to 4 uintptr arguments.
-func racecall(*byte, uintptr, uintptr, uintptr, uintptr)
-
-// checks if the address has shadow (i.e. heap or data/bss)
-//go:nosplit
-func isvalidaddr(addr unsafe.Pointer) bool {
-	return racearenastart <= uintptr(addr) && uintptr(addr) < racearenaend ||
-		racedatastart <= uintptr(addr) && uintptr(addr) < racedataend
-}
-
-//go:nosplit
-func raceinit() uintptr {
-	// cgo is required to initialize libc, which is used by race runtime
-	if !iscgo {
-		throw("raceinit: race build must use cgo")
-	}
-
-	var racectx uintptr
-	racecall(&__tsan_init, uintptr(unsafe.Pointer(&racectx)), funcPC(racesymbolizethunk), 0, 0)
-
-	// Round data segment to page boundaries, because it's used in mmap().
-	start := ^uintptr(0)
-	end := uintptr(0)
-	if start > firstmoduledata.noptrdata {
-		start = firstmoduledata.noptrdata
-	}
-	if start > firstmoduledata.data {
-		start = firstmoduledata.data
-	}
-	if start > firstmoduledata.noptrbss {
-		start = firstmoduledata.noptrbss
-	}
-	if start > firstmoduledata.bss {
-		start = firstmoduledata.bss
-	}
-	if end < firstmoduledata.enoptrdata {
-		end = firstmoduledata.enoptrdata
-	}
-	if end < firstmoduledata.edata {
-		end = firstmoduledata.edata
-	}
-	if end < firstmoduledata.enoptrbss {
-		end = firstmoduledata.enoptrbss
-	}
-	if end < firstmoduledata.ebss {
-		end = firstmoduledata.ebss
-	}
-	size := round(end-start, _PageSize)
-	racecall(&__tsan_map_shadow, start, size, 0, 0)
-	racedatastart = start
-	racedataend = start + size
-
-	return racectx
-}
-
-//go:nosplit
-func racefini() {
-	racecall(&__tsan_fini, 0, 0, 0, 0)
-}
-
-//go:nosplit
-func racemapshadow(addr unsafe.Pointer, size uintptr) {
-	if racearenastart == 0 {
-		racearenastart = uintptr(addr)
-	}
-	if racearenaend < uintptr(addr)+size {
-		racearenaend = uintptr(addr) + size
-	}
-	racecall(&__tsan_map_shadow, uintptr(addr), size, 0, 0)
-}
-
-//go:nosplit
-func racemalloc(p unsafe.Pointer, sz uintptr) {
-	racecall(&__tsan_malloc, uintptr(p), sz, 0, 0)
-}
-
-//go:nosplit
-func racegostart(pc uintptr) uintptr {
-	_g_ := getg()
-	var spawng *g
-	if _g_.m.curg != nil {
-		spawng = _g_.m.curg
-	} else {
-		spawng = _g_
-	}
-
-	var racectx uintptr
-	racecall(&__tsan_go_start, spawng.racectx, uintptr(unsafe.Pointer(&racectx)), pc, 0)
-	return racectx
-}
-
-//go:nosplit
-func racegoend() {
-	racecall(&__tsan_go_end, getg().racectx, 0, 0, 0)
-}
-
-//go:nosplit
-func racewriterangepc(addr unsafe.Pointer, sz, callpc, pc uintptr) {
-	_g_ := getg()
-	if _g_ != _g_.m.curg {
-		// The call is coming from manual instrumentation of Go code running on g0/gsignal.
-		// Not interesting.
-		return
-	}
-	if callpc != 0 {
-		racefuncenter(callpc)
-	}
-	racewriterangepc1(uintptr(addr), sz, pc)
-	if callpc != 0 {
-		racefuncexit()
-	}
-}
-
-//go:nosplit
-func racereadrangepc(addr unsafe.Pointer, sz, callpc, pc uintptr) {
-	_g_ := getg()
-	if _g_ != _g_.m.curg {
-		// The call is coming from manual instrumentation of Go code running on g0/gsignal.
-		// Not interesting.
-		return
-	}
-	if callpc != 0 {
-		racefuncenter(callpc)
-	}
-	racereadrangepc1(uintptr(addr), sz, pc)
-	if callpc != 0 {
-		racefuncexit()
-	}
-}
-
-//go:nosplit
-func raceacquire(addr unsafe.Pointer) {
-	raceacquireg(getg(), addr)
-}
-
-//go:nosplit
-func raceacquireg(gp *g, addr unsafe.Pointer) {
-	if getg().raceignore != 0 || !isvalidaddr(addr) {
-		return
-	}
-	racecall(&__tsan_acquire, gp.racectx, uintptr(addr), 0, 0)
-}
-
-//go:nosplit
-func racerelease(addr unsafe.Pointer) {
-	_g_ := getg()
-	if _g_.raceignore != 0 || !isvalidaddr(addr) {
-		return
-	}
-	racereleaseg(_g_, addr)
-}
-
-//go:nosplit
-func racereleaseg(gp *g, addr unsafe.Pointer) {
-	if getg().raceignore != 0 || !isvalidaddr(addr) {
-		return
-	}
-	racecall(&__tsan_release, gp.racectx, uintptr(addr), 0, 0)
-}
-
-//go:nosplit
-func racereleasemerge(addr unsafe.Pointer) {
-	racereleasemergeg(getg(), addr)
-}
-
-//go:nosplit
-func racereleasemergeg(gp *g, addr unsafe.Pointer) {
-	if getg().raceignore != 0 || !isvalidaddr(addr) {
-		return
-	}
-	racecall(&__tsan_release_merge, gp.racectx, uintptr(addr), 0, 0)
-}
-
-//go:nosplit
-func racefingo() {
-	racecall(&__tsan_finalizer_goroutine, getg().racectx, 0, 0, 0)
-}
-
-//go:nosplit
-
-func RaceAcquire(addr unsafe.Pointer) {
-	raceacquire(addr)
-}
-
-//go:nosplit
-
-func RaceRelease(addr unsafe.Pointer) {
-	racerelease(addr)
-}
-
-//go:nosplit
-
-func RaceReleaseMerge(addr unsafe.Pointer) {
-	racereleasemerge(addr)
-}
-
-//go:nosplit
-
-// RaceDisable disables handling of race events in the current goroutine.
-func RaceDisable() {
-	_g_ := getg()
-	if _g_.raceignore == 0 {
-		racecall(&__tsan_go_ignore_sync_begin, _g_.racectx, 0, 0, 0)
-	}
-	_g_.raceignore++
-}
-
-//go:nosplit
-
-// RaceEnable re-enables handling of race events in the current goroutine.
-func RaceEnable() {
-	_g_ := getg()
-	_g_.raceignore--
-	if _g_.raceignore == 0 {
-		racecall(&__tsan_go_ignore_sync_end, _g_.racectx, 0, 0, 0)
-	}
-}
diff --git a/src/runtime/rt0_darwin_arm.s b/src/runtime/rt0_darwin_arm.s
deleted file mode 100644
index 95a2b17..0000000
--- a/src/runtime/rt0_darwin_arm.s
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-
-TEXT _rt0_arm_darwin(SB),7,$-4
-	// prepare arguments for main (_rt0_go)
-	MOVW	(R13), R0	// argc
-	MOVW	$4(R13), R1		// argv
-	MOVW	$main(SB), R4
-	B		(R4)
-
-// When linking with -buildmode=c-archive or -buildmode=c-shared,
-// this symbol is called from a global initialization function.
-//
-// Note that all currently shipping darwin/arm platforms require
-// cgo and do not support c-shared.
-TEXT _rt0_arm_darwin_lib(SB),NOSPLIT,$12
-	MOVW  R0, _rt0_arm_darwin_lib_argc<>(SB)
-	MOVW  R1, _rt0_arm_darwin_lib_argv<>(SB)
-
-	// Create a new thread to do the runtime initialization and return.
-	MOVW  _cgo_sys_thread_create(SB), R4
-	CMP   $0, R4
-	B.EQ  nocgo
-	MOVW  $_rt0_arm_darwin_lib_go(SB), R0
-	MOVW  $0, R1
-	BL    (R4)
-	RET
-nocgo:
-	MOVW  $0x400000, R0
-	MOVW  $_rt0_arm_darwin_lib_go(SB), R1
-	MOVW  $0, R2
-	MOVW  R0,  (R13) // stacksize
-	MOVW  R1, 4(R13) // fn
-	MOVW  R2, 8(R13) // fnarg
-	MOVW  $runtime·newosproc0(SB), R4
-	BL    (R4)
-	RET
-
-TEXT _rt0_arm_darwin_lib_go(SB),NOSPLIT,$0
-	MOVW  _rt0_arm_darwin_lib_argc<>(SB), R0
-	MOVW  _rt0_arm_darwin_lib_argv<>(SB), R1
-	MOVW  R0,  (R13)
-	MOVW  R1, 4(R13)
-	MOVW  $runtime·rt0_go(SB), R4
-	B     (R4)
-
-DATA  _rt0_arm_darwin_lib_argc<>(SB)/4, $0
-GLOBL _rt0_arm_darwin_lib_argc<>(SB),NOPTR, $4
-DATA  _rt0_arm_darwin_lib_argv<>(SB)/4, $0
-GLOBL _rt0_arm_darwin_lib_argv<>(SB),NOPTR, $4
-
-TEXT main(SB),NOSPLIT,$-8
-	// save argc and argv onto stack
-	MOVM.DB.W [R0-R1], (R13)
-	MOVW	$runtime·rt0_go(SB), R4
-	B		(R4)
diff --git a/src/runtime/rt0_darwin_arm64.s b/src/runtime/rt0_darwin_arm64.s
deleted file mode 100644
index e4e4a30..0000000
--- a/src/runtime/rt0_darwin_arm64.s
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-
-// No need for _rt0_arm64_darwin as darwin/arm64 only
-// supports external linking.
-TEXT _rt0_arm64_darwin(SB),NOSPLIT,$-8
-	MOVD	$42, R0
-	MOVD	$1, R16	// SYS_exit
-	SVC	$0x80
-
-// When linking with -buildmode=c-archive or -buildmode=c-shared,
-// this symbol is called from a global initialization function.
-//
-// Note that all currently shipping darwin/arm64 platforms require
-// cgo and do not support c-shared.
-TEXT _rt0_arm64_darwin_lib(SB),NOSPLIT,$0
-	// R27 is REGTMP, reserved for liblink. It is used below to
-	// move R0/R1 into globals. However in the standard ARM64 calling
-	// convention, it is a callee-saved register. So we save it to a
-	// temporary register.
-	MOVD  R27, R7
-
-	MOVD  R0, _rt0_arm64_darwin_lib_argc<>(SB)
-	MOVD  R1, _rt0_arm64_darwin_lib_argv<>(SB)
-	// Create a new thread to do the runtime initialization and return.
-	MOVD  _cgo_sys_thread_create(SB), R4
-	MOVD  $_rt0_arm64_darwin_lib_go(SB), R0
-	MOVD  $0, R1
-	BL    (R4)
-
-	MOVD  R7, R27
-	RET
-
-TEXT _rt0_arm64_darwin_lib_go(SB),NOSPLIT,$0
-	MOVD  _rt0_arm64_darwin_lib_argc<>(SB), R0
-	MOVD  _rt0_arm64_darwin_lib_argv<>(SB), R1
-	MOVD  $runtime·rt0_go(SB), R4
-	B     (R4)
-
-DATA  _rt0_arm64_darwin_lib_argc<>(SB)/8, $0
-GLOBL _rt0_arm64_darwin_lib_argc<>(SB),NOPTR, $8
-DATA  _rt0_arm64_darwin_lib_argv<>(SB)/8, $0
-GLOBL _rt0_arm64_darwin_lib_argv<>(SB),NOPTR, $8
-
-TEXT main(SB),NOSPLIT,$-8
-	MOVD	$runtime·rt0_go(SB), R2
-	BL	(R2)
-exit:
-	MOVD	$0, R0
-	MOVD	$1, R16	// sys_exit
-	SVC	$0x80
-	B	exit
diff --git a/src/runtime/rt0_linux_arm64.s b/src/runtime/rt0_linux_arm64.s
deleted file mode 100644
index 1eb0352..0000000
--- a/src/runtime/rt0_linux_arm64.s
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-
-TEXT _rt0_arm64_linux(SB),NOSPLIT,$-8
-	MOVD	0(RSP), R0	// argc
-	ADD	$8, RSP, R1	// argv
-	BL	main(SB)
-
-TEXT main(SB),NOSPLIT,$-8
-	MOVD	$runtime·rt0_go(SB), R2
-	BL	(R2)
-exit:
-	MOVD $0, R0
-	MOVD	$94, R8	// sys_exit
-	SVC
-	B	exit
diff --git a/src/runtime/rt0_linux_ppc64.s b/src/runtime/rt0_linux_ppc64.s
deleted file mode 100644
index 33e973d..0000000
--- a/src/runtime/rt0_linux_ppc64.s
+++ /dev/null
@@ -1,23 +0,0 @@
-#include "textflag.h"
-
-// actually a function descriptor for _main<>(SB)
-TEXT _rt0_ppc64_linux(SB),NOSPLIT,$0
-	DWORD $_main<>(SB)
-	DWORD $0
-	DWORD $0
-
-TEXT _main<>(SB),NOSPLIT,$-8
-	// In a statically linked binary, the stack contains argc,
-	// argv as argc string pointers followed by a NULL, envv as a
-	// sequence of string pointers followed by a NULL, and auxv.
-	// There is no TLS base pointer.
-	//
-	// TODO(austin): Support ABI v1 dynamic linking entry point
-	MOVD 0(R1), R3 // argc
-	ADD $8, R1, R4 // argv
-	BR main(SB)
-
-TEXT main(SB),NOSPLIT,$-8
-	MOVD	$runtime·rt0_go(SB), R31
-	MOVD	R31, CTR
-	BR	(CTR)
diff --git a/src/runtime/rt0_linux_ppc64le.s b/src/runtime/rt0_linux_ppc64le.s
deleted file mode 100644
index f5c0af5..0000000
--- a/src/runtime/rt0_linux_ppc64le.s
+++ /dev/null
@@ -1,34 +0,0 @@
-#include "textflag.h"
-
-TEXT _rt0_ppc64le_linux(SB),NOSPLIT,$0
-	BR _main<>(SB)
-
-TEXT _main<>(SB),NOSPLIT,$-8
-	// In a statically linked binary, the stack contains argc,
-	// argv as argc string pointers followed by a NULL, envv as a
-	// sequence of string pointers followed by a NULL, and auxv.
-	// There is no TLS base pointer.
-	//
-	// In a dynamically linked binary, r3 contains argc, r4
-	// contains argv, r5 contains envp, r6 contains auxv, and r13
-	// contains the TLS pointer.
-	//
-	// Figure out which case this is by looking at r4: if it's 0,
-	// we're statically linked; otherwise we're dynamically
-	// linked.
-	CMP	R0, R4
-	BNE	dlink
-
-	// Statically linked
-	MOVD	0(R1), R3 // argc
-	ADD	$8, R1, R4 // argv
-	MOVD	$runtime·tls0(SB), R13 // TLS
-	ADD	$0x7000, R13
-
-dlink:
-	BR	main(SB)
-
-TEXT main(SB),NOSPLIT,$-8
-	MOVD	$runtime·rt0_go(SB), R31
-	MOVD	R31, CTR
-	BR	(CTR)
diff --git a/src/runtime/rt0_openbsd_arm.s b/src/runtime/rt0_openbsd_arm.s
deleted file mode 100644
index 6207e55..0000000
--- a/src/runtime/rt0_openbsd_arm.s
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-
-TEXT _rt0_arm_openbsd(SB),NOSPLIT,$-4
-	MOVW	(R13), R0		// argc
-	MOVW	$4(R13), R1		// argv
-	MOVM.DB.W [R0-R1], (R13)
-	B	runtime·rt0_go(SB)
diff --git a/src/runtime/runtime-gdb_test.go b/src/runtime/runtime-gdb_test.go
deleted file mode 100644
index 2843633..0000000
--- a/src/runtime/runtime-gdb_test.go
+++ /dev/null
@@ -1,164 +0,0 @@
-package runtime_test
-
-import (
-	"bytes"
-	"fmt"
-	"io/ioutil"
-	"os"
-	"os/exec"
-	"path/filepath"
-	"regexp"
-	"runtime"
-	"strconv"
-	"testing"
-)
-
-func checkGdbPython(t *testing.T) {
-	cmd := exec.Command("gdb", "-nx", "-q", "--batch", "-iex", "python import sys; print('go gdb python support')")
-	out, err := cmd.CombinedOutput()
-
-	if err != nil {
-		t.Skipf("skipping due to issue running gdb: %v", err)
-	}
-	if string(out) != "go gdb python support\n" {
-		t.Skipf("skipping due to lack of python gdb support: %s", out)
-	}
-
-	// Issue 11214 reports various failures with older versions of gdb.
-	out, err = exec.Command("gdb", "--version").CombinedOutput()
-	re := regexp.MustCompile(`([0-9]+)\.([0-9]+)`)
-	matches := re.FindSubmatch(out)
-	if len(matches) < 3 {
-		t.Skipf("skipping: can't determine gdb version from\n%s\n", out)
-	}
-	major, err1 := strconv.Atoi(string(matches[1]))
-	minor, err2 := strconv.Atoi(string(matches[2]))
-	if err1 != nil || err2 != nil {
-		t.Skipf("skipping: can't determine gdb version: %v, %v", err1, err2)
-	}
-	if major < 7 || (major == 7 && minor < 7) {
-		t.Skipf("skipping: gdb version %d.%d too old", major, minor)
-	}
-	t.Logf("gdb version %d.%d", major, minor)
-}
-
-const helloSource = `
-package main
-import "fmt"
-func main() {
-	mapvar := make(map[string]string,5)
-	mapvar["abc"] = "def"
-	mapvar["ghi"] = "jkl"
-	strvar := "abc"
-	ptrvar := &strvar
-	fmt.Println("hi") // line 10
-	_ = ptrvar
-}
-`
-
-func TestGdbPython(t *testing.T) {
-	if runtime.GOOS == "darwin" {
-		t.Skip("gdb does not work on darwin")
-	}
-
-	checkGdbPython(t)
-
-	dir, err := ioutil.TempDir("", "go-build")
-	if err != nil {
-		t.Fatalf("failed to create temp directory: %v", err)
-	}
-	defer os.RemoveAll(dir)
-
-	src := filepath.Join(dir, "main.go")
-	err = ioutil.WriteFile(src, []byte(helloSource), 0644)
-	if err != nil {
-		t.Fatalf("failed to create file: %v", err)
-	}
-
-	cmd := exec.Command("go", "build", "-o", "a.exe")
-	cmd.Dir = dir
-	out, err := testEnv(cmd).CombinedOutput()
-	if err != nil {
-		t.Fatalf("building source %v\n%s", err, out)
-	}
-
-	args := []string{"-nx", "-q", "--batch", "-iex",
-		fmt.Sprintf("add-auto-load-safe-path %s/src/runtime", runtime.GOROOT()),
-		"-ex", "br main.go:10",
-		"-ex", "run",
-		"-ex", "echo BEGIN info goroutines\n",
-		"-ex", "info goroutines",
-		"-ex", "echo END\n",
-		"-ex", "echo BEGIN print mapvar\n",
-		"-ex", "print mapvar",
-		"-ex", "echo END\n",
-		"-ex", "echo BEGIN print strvar\n",
-		"-ex", "print strvar",
-		"-ex", "echo END\n",
-		"-ex", "echo BEGIN print ptrvar\n",
-		"-ex", "print ptrvar",
-		"-ex", "echo END\n"}
-
-	// without framepointer, gdb cannot backtrace our non-standard
-	// stack frames on RISC architectures.
-	canBackTrace := false
-	switch runtime.GOARCH {
-	case "amd64", "386", "ppc64", "ppc64le", "arm", "arm64":
-		canBackTrace = true
-		args = append(args,
-			"-ex", "echo BEGIN goroutine 2 bt\n",
-			"-ex", "goroutine 2 bt",
-			"-ex", "echo END\n")
-	}
-
-	args = append(args, filepath.Join(dir, "a.exe"))
-	got, _ := exec.Command("gdb", args...).CombinedOutput()
-
-	firstLine := bytes.SplitN(got, []byte("\n"), 2)[0]
-	if string(firstLine) != "Loading Go Runtime support." {
-		// This can happen when using all.bash with
-		// GOROOT_FINAL set, because the tests are run before
-		// the final installation of the files.
-		cmd := exec.Command("go", "env", "GOROOT")
-		cmd.Env = []string{}
-		out, err := cmd.CombinedOutput()
-		if err != nil && bytes.Contains(out, []byte("cannot find GOROOT")) {
-			t.Skipf("skipping because GOROOT=%s does not exist", runtime.GOROOT())
-		}
-
-		t.Fatalf("failed to load Go runtime support: %s", firstLine)
-	}
-
-	// Extract named BEGIN...END blocks from output
-	partRe := regexp.MustCompile(`(?ms)^BEGIN ([^\n]*)\n(.*?)\nEND`)
-	blocks := map[string]string{}
-	for _, subs := range partRe.FindAllSubmatch(got, -1) {
-		blocks[string(subs[1])] = string(subs[2])
-	}
-
-	infoGoroutinesRe := regexp.MustCompile(`\*\s+\d+\s+running\s+`)
-	if bl := blocks["info goroutines"]; !infoGoroutinesRe.MatchString(bl) {
-		t.Fatalf("info goroutines failed: %s", bl)
-	}
-
-	printMapvarRe := regexp.MustCompile(`\Q = map[string]string = {["abc"] = "def", ["ghi"] = "jkl"}\E$`)
-	if bl := blocks["print mapvar"]; !printMapvarRe.MatchString(bl) {
-		t.Fatalf("print mapvar failed: %s", bl)
-	}
-
-	strVarRe := regexp.MustCompile(`\Q = "abc"\E$`)
-	if bl := blocks["print strvar"]; !strVarRe.MatchString(bl) {
-		t.Fatalf("print strvar failed: %s", bl)
-	}
-
-	if bl := blocks["print ptrvar"]; !strVarRe.MatchString(bl) {
-		t.Fatalf("print ptrvar failed: %s", bl)
-	}
-
-	btGoroutineRe := regexp.MustCompile(`^#0\s+runtime.+at`)
-	if bl := blocks["goroutine 2 bt"]; canBackTrace && !btGoroutineRe.MatchString(bl) {
-		t.Fatalf("goroutine 2 bt failed: %s", bl)
-	} else if !canBackTrace {
-		t.Logf("gdb cannot backtrace for GOARCH=%s, skipped goroutine backtrace test", runtime.GOARCH)
-	}
-}
diff --git a/src/runtime/runtime1.go b/src/runtime/runtime1.go
deleted file mode 100644
index a50e5b6..0000000
--- a/src/runtime/runtime1.go
+++ /dev/null
@@ -1,444 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-// Keep a cached value to make gotraceback fast,
-// since we call it on every call to gentraceback.
-// The cached value is a uint32 in which the low bit
-// is the "crash" setting and the top 31 bits are the
-// gotraceback value.
-var traceback_cache uint32 = 2 << 1
-
-// The GOTRACEBACK environment variable controls the
-// behavior of a Go program that is crashing and exiting.
-//	GOTRACEBACK=0   suppress all tracebacks
-//	GOTRACEBACK=1   default behavior - show tracebacks but exclude runtime frames
-//	GOTRACEBACK=2   show tracebacks including runtime frames
-//	GOTRACEBACK=crash   show tracebacks including runtime frames, then crash (core dump etc)
-//go:nosplit
-func gotraceback(crash *bool) int32 {
-	_g_ := getg()
-	if crash != nil {
-		*crash = false
-	}
-	if _g_.m.traceback != 0 {
-		return int32(_g_.m.traceback)
-	}
-	if crash != nil {
-		*crash = traceback_cache&1 != 0
-	}
-	return int32(traceback_cache >> 1)
-}
-
-var (
-	argc int32
-	argv **byte
-)
-
-// nosplit for use in linux/386 startup linux_setup_vdso
-//go:nosplit
-func argv_index(argv **byte, i int32) *byte {
-	return *(**byte)(add(unsafe.Pointer(argv), uintptr(i)*ptrSize))
-}
-
-func args(c int32, v **byte) {
-	argc = c
-	argv = v
-	sysargs(c, v)
-}
-
-var (
-	// TODO: Retire in favor of GOOS== checks.
-	isplan9   int32
-	issolaris int32
-	iswindows int32
-)
-
-func goargs() {
-	if GOOS == "windows" {
-		return
-	}
-
-	argslice = make([]string, argc)
-	for i := int32(0); i < argc; i++ {
-		argslice[i] = gostringnocopy(argv_index(argv, i))
-	}
-}
-
-func goenvs_unix() {
-	// TODO(austin): ppc64 in dynamic linking mode doesn't
-	// guarantee env[] will immediately follow argv.  Might cause
-	// problems.
-	n := int32(0)
-	for argv_index(argv, argc+1+n) != nil {
-		n++
-	}
-
-	envs = make([]string, n)
-	for i := int32(0); i < n; i++ {
-		envs[i] = gostring(argv_index(argv, argc+1+i))
-	}
-}
-
-func environ() []string {
-	return envs
-}
-
-// TODO: These should be locals in testAtomic64, but we don't 8-byte
-// align stack variables on 386.
-var test_z64, test_x64 uint64
-
-func testAtomic64() {
-	test_z64 = 42
-	test_x64 = 0
-	prefetcht0(uintptr(unsafe.Pointer(&test_z64)))
-	prefetcht1(uintptr(unsafe.Pointer(&test_z64)))
-	prefetcht2(uintptr(unsafe.Pointer(&test_z64)))
-	prefetchnta(uintptr(unsafe.Pointer(&test_z64)))
-	if cas64(&test_z64, test_x64, 1) {
-		throw("cas64 failed")
-	}
-	if test_x64 != 0 {
-		throw("cas64 failed")
-	}
-	test_x64 = 42
-	if !cas64(&test_z64, test_x64, 1) {
-		throw("cas64 failed")
-	}
-	if test_x64 != 42 || test_z64 != 1 {
-		throw("cas64 failed")
-	}
-	if atomicload64(&test_z64) != 1 {
-		throw("load64 failed")
-	}
-	atomicstore64(&test_z64, (1<<40)+1)
-	if atomicload64(&test_z64) != (1<<40)+1 {
-		throw("store64 failed")
-	}
-	if xadd64(&test_z64, (1<<40)+1) != (2<<40)+2 {
-		throw("xadd64 failed")
-	}
-	if atomicload64(&test_z64) != (2<<40)+2 {
-		throw("xadd64 failed")
-	}
-	if xchg64(&test_z64, (3<<40)+3) != (2<<40)+2 {
-		throw("xchg64 failed")
-	}
-	if atomicload64(&test_z64) != (3<<40)+3 {
-		throw("xchg64 failed")
-	}
-}
-
-func check() {
-	var (
-		a     int8
-		b     uint8
-		c     int16
-		d     uint16
-		e     int32
-		f     uint32
-		g     int64
-		h     uint64
-		i, i1 float32
-		j, j1 float64
-		k, k1 unsafe.Pointer
-		l     *uint16
-		m     [4]byte
-	)
-	type x1t struct {
-		x uint8
-	}
-	type y1t struct {
-		x1 x1t
-		y  uint8
-	}
-	var x1 x1t
-	var y1 y1t
-
-	if unsafe.Sizeof(a) != 1 {
-		throw("bad a")
-	}
-	if unsafe.Sizeof(b) != 1 {
-		throw("bad b")
-	}
-	if unsafe.Sizeof(c) != 2 {
-		throw("bad c")
-	}
-	if unsafe.Sizeof(d) != 2 {
-		throw("bad d")
-	}
-	if unsafe.Sizeof(e) != 4 {
-		throw("bad e")
-	}
-	if unsafe.Sizeof(f) != 4 {
-		throw("bad f")
-	}
-	if unsafe.Sizeof(g) != 8 {
-		throw("bad g")
-	}
-	if unsafe.Sizeof(h) != 8 {
-		throw("bad h")
-	}
-	if unsafe.Sizeof(i) != 4 {
-		throw("bad i")
-	}
-	if unsafe.Sizeof(j) != 8 {
-		throw("bad j")
-	}
-	if unsafe.Sizeof(k) != ptrSize {
-		throw("bad k")
-	}
-	if unsafe.Sizeof(l) != ptrSize {
-		throw("bad l")
-	}
-	if unsafe.Sizeof(x1) != 1 {
-		throw("bad unsafe.Sizeof x1")
-	}
-	if unsafe.Offsetof(y1.y) != 1 {
-		throw("bad offsetof y1.y")
-	}
-	if unsafe.Sizeof(y1) != 2 {
-		throw("bad unsafe.Sizeof y1")
-	}
-
-	if timediv(12345*1000000000+54321, 1000000000, &e) != 12345 || e != 54321 {
-		throw("bad timediv")
-	}
-
-	var z uint32
-	z = 1
-	if !cas(&z, 1, 2) {
-		throw("cas1")
-	}
-	if z != 2 {
-		throw("cas2")
-	}
-
-	z = 4
-	if cas(&z, 5, 6) {
-		throw("cas3")
-	}
-	if z != 4 {
-		throw("cas4")
-	}
-
-	z = 0xffffffff
-	if !cas(&z, 0xffffffff, 0xfffffffe) {
-		throw("cas5")
-	}
-	if z != 0xfffffffe {
-		throw("cas6")
-	}
-
-	k = unsafe.Pointer(uintptr(0xfedcb123))
-	if ptrSize == 8 {
-		k = unsafe.Pointer(uintptr(unsafe.Pointer(k)) << 10)
-	}
-	if casp(&k, nil, nil) {
-		throw("casp1")
-	}
-	k1 = add(k, 1)
-	if !casp(&k, k, k1) {
-		throw("casp2")
-	}
-	if k != k1 {
-		throw("casp3")
-	}
-
-	m = [4]byte{1, 1, 1, 1}
-	atomicor8(&m[1], 0xf0)
-	if m[0] != 1 || m[1] != 0xf1 || m[2] != 1 || m[3] != 1 {
-		throw("atomicor8")
-	}
-
-	*(*uint64)(unsafe.Pointer(&j)) = ^uint64(0)
-	if j == j {
-		throw("float64nan")
-	}
-	if !(j != j) {
-		throw("float64nan1")
-	}
-
-	*(*uint64)(unsafe.Pointer(&j1)) = ^uint64(1)
-	if j == j1 {
-		throw("float64nan2")
-	}
-	if !(j != j1) {
-		throw("float64nan3")
-	}
-
-	*(*uint32)(unsafe.Pointer(&i)) = ^uint32(0)
-	if i == i {
-		throw("float32nan")
-	}
-	if i == i {
-		throw("float32nan1")
-	}
-
-	*(*uint32)(unsafe.Pointer(&i1)) = ^uint32(1)
-	if i == i1 {
-		throw("float32nan2")
-	}
-	if i == i1 {
-		throw("float32nan3")
-	}
-
-	testAtomic64()
-
-	if _FixedStack != round2(_FixedStack) {
-		throw("FixedStack is not power-of-2")
-	}
-}
-
-type dbgVar struct {
-	name  string
-	value *int32
-}
-
-// Holds variables parsed from GODEBUG env var,
-// except for "memprofilerate" since there is an
-// existing int var for that value, which may
-// already have an initial value.
-var debug struct {
-	allocfreetrace    int32
-	efence            int32
-	gccheckmark       int32
-	gcpacertrace      int32
-	gcshrinkstackoff  int32
-	gcstackbarrieroff int32
-	gcstoptheworld    int32
-	gctrace           int32
-	invalidptr        int32
-	sbrk              int32
-	scavenge          int32
-	scheddetail       int32
-	schedtrace        int32
-	wbshadow          int32
-}
-
-var dbgvars = []dbgVar{
-	{"allocfreetrace", &debug.allocfreetrace},
-	{"efence", &debug.efence},
-	{"gccheckmark", &debug.gccheckmark},
-	{"gcpacertrace", &debug.gcpacertrace},
-	{"gcshrinkstackoff", &debug.gcshrinkstackoff},
-	{"gcstackbarrieroff", &debug.gcstackbarrieroff},
-	{"gcstoptheworld", &debug.gcstoptheworld},
-	{"gctrace", &debug.gctrace},
-	{"invalidptr", &debug.invalidptr},
-	{"sbrk", &debug.sbrk},
-	{"scavenge", &debug.scavenge},
-	{"scheddetail", &debug.scheddetail},
-	{"schedtrace", &debug.schedtrace},
-	{"wbshadow", &debug.wbshadow},
-}
-
-func parsedebugvars() {
-	// defaults
-	debug.invalidptr = 1
-
-	for p := gogetenv("GODEBUG"); p != ""; {
-		field := ""
-		i := index(p, ",")
-		if i < 0 {
-			field, p = p, ""
-		} else {
-			field, p = p[:i], p[i+1:]
-		}
-		i = index(field, "=")
-		if i < 0 {
-			continue
-		}
-		key, value := field[:i], field[i+1:]
-
-		// Update MemProfileRate directly here since it
-		// is int, not int32, and should only be updated
-		// if specified in GODEBUG.
-		if key == "memprofilerate" {
-			MemProfileRate = atoi(value)
-		} else {
-			for _, v := range dbgvars {
-				if v.name == key {
-					*v.value = int32(atoi(value))
-				}
-			}
-		}
-	}
-
-	switch p := gogetenv("GOTRACEBACK"); p {
-	case "":
-		traceback_cache = 1 << 1
-	case "crash":
-		traceback_cache = 2<<1 | 1
-	default:
-		traceback_cache = uint32(atoi(p)) << 1
-	}
-	// when C owns the process, simply exit'ing the process on fatal errors
-	// and panics is surprising. Be louder and abort instead.
-	if islibrary || isarchive {
-		traceback_cache |= 1
-	}
-}
-
-// Poor mans 64-bit division.
-// This is a very special function, do not use it if you are not sure what you are doing.
-// int64 division is lowered into _divv() call on 386, which does not fit into nosplit functions.
-// Handles overflow in a time-specific manner.
-//go:nosplit
-func timediv(v int64, div int32, rem *int32) int32 {
-	res := int32(0)
-	for bit := 30; bit >= 0; bit-- {
-		if v >= int64(div)<<uint(bit) {
-			v = v - (int64(div) << uint(bit))
-			res += 1 << uint(bit)
-		}
-	}
-	if v >= int64(div) {
-		if rem != nil {
-			*rem = 0
-		}
-		return 0x7fffffff
-	}
-	if rem != nil {
-		*rem = int32(v)
-	}
-	return res
-}
-
-// Helpers for Go. Must be NOSPLIT, must only call NOSPLIT functions, and must not block.
-
-//go:nosplit
-func acquirem() *m {
-	_g_ := getg()
-	_g_.m.locks++
-	return _g_.m
-}
-
-//go:nosplit
-func releasem(mp *m) {
-	_g_ := getg()
-	mp.locks--
-	if mp.locks == 0 && _g_.preempt {
-		// restore the preemption request in case we've cleared it in newstack
-		_g_.stackguard0 = stackPreempt
-	}
-}
-
-//go:nosplit
-func gomcache() *mcache {
-	return getg().m.mcache
-}
-
-//go:linkname reflect_typelinks reflect.typelinks
-//go:nosplit
-func reflect_typelinks() [][]*_type {
-	ret := [][]*_type{firstmoduledata.typelinks}
-	for datap := firstmoduledata.next; datap != nil; datap = datap.next {
-		ret = append(ret, datap.typelinks)
-	}
-	return ret
-}
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go
deleted file mode 100644
index 57cd869..0000000
--- a/src/runtime/runtime2.go
+++ /dev/null
@@ -1,699 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-/*
- * defined constants
- */
-const (
-	// G status
-	//
-	// If you add to this list, add to the list
-	// of "okay during garbage collection" status
-	// in mgcmark.go too.
-	_Gidle            = iota // 0
-	_Grunnable               // 1 runnable and on a run queue
-	_Grunning                // 2
-	_Gsyscall                // 3
-	_Gwaiting                // 4
-	_Gmoribund_unused        // 5 currently unused, but hardcoded in gdb scripts
-	_Gdead                   // 6
-	_Genqueue                // 7 Only the Gscanenqueue is used.
-	_Gcopystack              // 8 in this state when newstack is moving the stack
-	// the following encode that the GC is scanning the stack and what to do when it is done
-	_Gscan = 0x1000 // atomicstatus&~Gscan = the non-scan state,
-	// _Gscanidle =     _Gscan + _Gidle,      // Not used. Gidle only used with newly malloced gs
-	_Gscanrunnable = _Gscan + _Grunnable //  0x1001 When scanning completes make Grunnable (it is already on run queue)
-	_Gscanrunning  = _Gscan + _Grunning  //  0x1002 Used to tell preemption newstack routine to scan preempted stack.
-	_Gscansyscall  = _Gscan + _Gsyscall  //  0x1003 When scanning completes make it Gsyscall
-	_Gscanwaiting  = _Gscan + _Gwaiting  //  0x1004 When scanning completes make it Gwaiting
-	// _Gscanmoribund_unused,               //  not possible
-	// _Gscandead,                          //  not possible
-	_Gscanenqueue = _Gscan + _Genqueue //  When scanning completes make it Grunnable and put on runqueue
-)
-
-const (
-	// P status
-	_Pidle    = iota
-	_Prunning // Only this P is allowed to change from _Prunning.
-	_Psyscall
-	_Pgcstop
-	_Pdead
-)
-
-// The next line makes 'go generate' write the zgen_*.go files with
-// per-OS and per-arch information, including constants
-// named goos_$GOOS and goarch_$GOARCH for every
-// known GOOS and GOARCH. The constant is 1 on the
-// current system, 0 otherwise; multiplying by them is
-// useful for defining GOOS- or GOARCH-specific constants.
-//go:generate go run gengoos.go
-
-type mutex struct {
-	// Futex-based impl treats it as uint32 key,
-	// while sema-based impl as M* waitm.
-	// Used to be a union, but unions break precise GC.
-	key uintptr
-}
-
-type note struct {
-	// Futex-based impl treats it as uint32 key,
-	// while sema-based impl as M* waitm.
-	// Used to be a union, but unions break precise GC.
-	key uintptr
-}
-
-type _string struct {
-	str *byte
-	len int
-}
-
-type funcval struct {
-	fn uintptr
-	// variable-size, fn-specific data here
-}
-
-type iface struct {
-	tab  *itab
-	data unsafe.Pointer
-}
-
-type eface struct {
-	_type *_type
-	data  unsafe.Pointer
-}
-
-// The guintptr, muintptr, and puintptr are all used to bypass write barriers.
-// It is particularly important to avoid write barriers when the current P has
-// been released, because the GC thinks the world is stopped, and an
-// unexpected write barrier would not be synchronized with the GC,
-// which can lead to a half-executed write barrier that has marked the object
-// but not queued it. If the GC skips the object and completes before the
-// queuing can occur, it will incorrectly free the object.
-//
-// We tried using special assignment functions invoked only when not
-// holding a running P, but then some updates to a particular memory
-// word went through write barriers and some did not. This breaks the
-// write barrier shadow checking mode, and it is also scary: better to have
-// a word that is completely ignored by the GC than to have one for which
-// only a few updates are ignored.
-//
-// Gs, Ms, and Ps are always reachable via true pointers in the
-// allgs, allm, and allp lists or (during allocation before they reach those lists)
-// from stack variables.
-
-// A guintptr holds a goroutine pointer, but typed as a uintptr
-// to bypass write barriers. It is used in the Gobuf goroutine state
-// and in scheduling lists that are manipulated without a P.
-//
-// The Gobuf.g goroutine pointer is almost always updated by assembly code.
-// In one of the few places it is updated by Go code - func save - it must be
-// treated as a uintptr to avoid a write barrier being emitted at a bad time.
-// Instead of figuring out how to emit the write barriers missing in the
-// assembly manipulation, we change the type of the field to uintptr,
-// so that it does not require write barriers at all.
-//
-// Goroutine structs are published in the allg list and never freed.
-// That will keep the goroutine structs from being collected.
-// There is never a time that Gobuf.g's contain the only references
-// to a goroutine: the publishing of the goroutine in allg comes first.
-// Goroutine pointers are also kept in non-GC-visible places like TLS,
-// so I can't see them ever moving. If we did want to start moving data
-// in the GC, we'd need to allocate the goroutine structs from an
-// alternate arena. Using guintptr doesn't make that problem any worse.
-type guintptr uintptr
-
-func (gp guintptr) ptr() *g   { return (*g)(unsafe.Pointer(gp)) }
-func (gp *guintptr) set(g *g) { *gp = guintptr(unsafe.Pointer(g)) }
-func (gp *guintptr) cas(old, new guintptr) bool {
-	return casuintptr((*uintptr)(unsafe.Pointer(gp)), uintptr(old), uintptr(new))
-}
-
-type puintptr uintptr
-
-func (pp puintptr) ptr() *p   { return (*p)(unsafe.Pointer(pp)) }
-func (pp *puintptr) set(p *p) { *pp = puintptr(unsafe.Pointer(p)) }
-
-type muintptr uintptr
-
-func (mp muintptr) ptr() *m   { return (*m)(unsafe.Pointer(mp)) }
-func (mp *muintptr) set(m *m) { *mp = muintptr(unsafe.Pointer(m)) }
-
-type gobuf struct {
-	// The offsets of sp, pc, and g are known to (hard-coded in) libmach.
-	sp   uintptr
-	pc   uintptr
-	g    guintptr
-	ctxt unsafe.Pointer // this has to be a pointer so that gc scans it
-	ret  uintreg
-	lr   uintptr
-	bp   uintptr // for GOEXPERIMENT=framepointer
-}
-
-// Known to compiler.
-// Changes here must also be made in src/cmd/internal/gc/select.go's selecttype.
-type sudog struct {
-	g           *g
-	selectdone  *uint32
-	next        *sudog
-	prev        *sudog
-	elem        unsafe.Pointer // data element
-	releasetime int64
-	nrelease    int32  // -1 for acquire
-	waitlink    *sudog // g.waiting list
-}
-
-type gcstats struct {
-	// the struct must consist of only uint64's,
-	// because it is casted to uint64[].
-	nhandoff    uint64
-	nhandoffcnt uint64
-	nprocyield  uint64
-	nosyield    uint64
-	nsleep      uint64
-}
-
-type libcall struct {
-	fn   uintptr
-	n    uintptr // number of parameters
-	args uintptr // parameters
-	r1   uintptr // return values
-	r2   uintptr
-	err  uintptr // error number
-}
-
-// describes how to handle callback
-type wincallbackcontext struct {
-	gobody       unsafe.Pointer // go function to call
-	argsize      uintptr        // callback arguments size (in bytes)
-	restorestack uintptr        // adjust stack on return by (in bytes) (386 only)
-	cleanstack   bool
-}
-
-// Stack describes a Go execution stack.
-// The bounds of the stack are exactly [lo, hi),
-// with no implicit data structures on either side.
-type stack struct {
-	lo uintptr
-	hi uintptr
-}
-
-// stkbar records the state of a G's stack barrier.
-type stkbar struct {
-	savedLRPtr uintptr // location overwritten by stack barrier PC
-	savedLRVal uintptr // value overwritten at savedLRPtr
-}
-
-type g struct {
-	// Stack parameters.
-	// stack describes the actual stack memory: [stack.lo, stack.hi).
-	// stackguard0 is the stack pointer compared in the Go stack growth prologue.
-	// It is stack.lo+StackGuard normally, but can be StackPreempt to trigger a preemption.
-	// stackguard1 is the stack pointer compared in the C stack growth prologue.
-	// It is stack.lo+StackGuard on g0 and gsignal stacks.
-	// It is ~0 on other goroutine stacks, to trigger a call to morestackc (and crash).
-	stack       stack   // offset known to runtime/cgo
-	stackguard0 uintptr // offset known to liblink
-	stackguard1 uintptr // offset known to liblink
-
-	_panic         *_panic // innermost panic - offset known to liblink
-	_defer         *_defer // innermost defer
-	m              *m      // current m; offset known to arm liblink
-	stackAlloc     uintptr // stack allocation is [stack.lo,stack.lo+stackAlloc)
-	sched          gobuf
-	syscallsp      uintptr        // if status==Gsyscall, syscallsp = sched.sp to use during gc
-	syscallpc      uintptr        // if status==Gsyscall, syscallpc = sched.pc to use during gc
-	stkbar         []stkbar       // stack barriers, from low to high
-	stkbarPos      uintptr        // index of lowest stack barrier not hit
-	param          unsafe.Pointer // passed parameter on wakeup
-	atomicstatus   uint32
-	stackLock      uint32 // sigprof/scang lock; TODO: fold in to atomicstatus
-	goid           int64
-	waitsince      int64  // approx time when the g become blocked
-	waitreason     string // if status==Gwaiting
-	schedlink      guintptr
-	preempt        bool   // preemption signal, duplicates stackguard0 = stackpreempt
-	paniconfault   bool   // panic (instead of crash) on unexpected fault address
-	preemptscan    bool   // preempted g does scan for gc
-	gcscandone     bool   // g has scanned stack; protected by _Gscan bit in status
-	gcscanvalid    bool   // false at start of gc cycle, true if G has not run since last scan
-	throwsplit     bool   // must not split stack
-	raceignore     int8   // ignore race detection events
-	sysblocktraced bool   // StartTrace has emitted EvGoInSyscall about this goroutine
-	sysexitticks   int64  // cputicks when syscall has returned (for tracing)
-	sysexitseq     uint64 // trace seq when syscall has returned (for tracing)
-	lockedm        *m
-	sig            uint32
-	writebuf       []byte
-	sigcode0       uintptr
-	sigcode1       uintptr
-	sigpc          uintptr
-	gopc           uintptr // pc of go statement that created this goroutine
-	startpc        uintptr // pc of goroutine function
-	racectx        uintptr
-	waiting        *sudog // sudog structures this g is waiting on (that have a valid elem ptr)
-	readyg         *g     // scratch for readyExecute
-
-	// Per-G gcController state
-	gcalloc    uintptr // bytes allocated during this GC cycle
-	gcscanwork int64   // scan work done (or stolen) this GC cycle
-}
-
-type mts struct {
-	tv_sec  int64
-	tv_nsec int64
-}
-
-type mscratch struct {
-	v [6]uintptr
-}
-
-type m struct {
-	g0      *g     // goroutine with scheduling stack
-	morebuf gobuf  // gobuf arg to morestack
-	divmod  uint32 // div/mod denominator for arm - known to liblink
-
-	// Fields not known to debuggers.
-	procid        uint64     // for debuggers, but offset not hard-coded
-	gsignal       *g         // signal-handling g
-	sigmask       [4]uintptr // storage for saved signal mask
-	tls           [4]uintptr // thread-local storage (for x86 extern register)
-	mstartfn      func()
-	curg          *g       // current running goroutine
-	caughtsig     guintptr // goroutine running during fatal signal
-	p             puintptr // attached p for executing go code (nil if not executing go code)
-	nextp         puintptr
-	id            int32
-	mallocing     int32
-	throwing      int32
-	preemptoff    string // if != "", keep curg running on this m
-	locks         int32
-	softfloat     int32
-	dying         int32
-	profilehz     int32
-	helpgc        int32
-	spinning      bool // m is out of work and is actively looking for work
-	blocked       bool // m is blocked on a note
-	inwb          bool // m is executing a write barrier
-	printlock     int8
-	fastrand      uint32
-	ncgocall      uint64 // number of cgo calls in total
-	ncgo          int32  // number of cgo calls currently in progress
-	park          note
-	alllink       *m // on allm
-	schedlink     muintptr
-	machport      uint32 // return address for mach ipc (os x)
-	mcache        *mcache
-	lockedg       *g
-	createstack   [32]uintptr // stack that created this thread.
-	freglo        [16]uint32  // d[i] lsb and f[i]
-	freghi        [16]uint32  // d[i] msb and f[i+16]
-	fflag         uint32      // floating point compare flags
-	locked        uint32      // tracking for lockosthread
-	nextwaitm     uintptr     // next m waiting for lock
-	waitsema      uintptr     // semaphore for parking on locks
-	waitsemacount uint32
-	waitsemalock  uint32
-	gcstats       gcstats
-	needextram    bool
-	traceback     uint8
-	waitunlockf   unsafe.Pointer // todo go func(*g, unsafe.pointer) bool
-	waitlock      unsafe.Pointer
-	waittraceev   byte
-	waittraceskip int
-	startingtrace bool
-	syscalltick   uint32
-	//#ifdef GOOS_windows
-	thread uintptr // thread handle
-	// these are here because they are too large to be on the stack
-	// of low-level NOSPLIT functions.
-	libcall   libcall
-	libcallpc uintptr // for cpu profiler
-	libcallsp uintptr
-	libcallg  guintptr
-	syscall   libcall // stores syscall parameters on windows
-	//#endif
-	//#ifdef GOOS_solaris
-	perrno *int32 // pointer to tls errno
-	// these are here because they are too large to be on the stack
-	// of low-level NOSPLIT functions.
-	//LibCall	libcall;
-	ts      mts
-	scratch mscratch
-	//#endif
-	//#ifdef GOOS_plan9
-	notesig *int8
-	errstr  *byte
-	//#endif
-}
-
-type p struct {
-	lock mutex
-
-	id          int32
-	status      uint32 // one of pidle/prunning/...
-	link        puintptr
-	schedtick   uint32   // incremented on every scheduler call
-	syscalltick uint32   // incremented on every system call
-	m           muintptr // back-link to associated m (nil if idle)
-	mcache      *mcache
-
-	deferpool    [5][]*_defer // pool of available defer structs of different sizes (see panic.go)
-	deferpoolbuf [5][32]*_defer
-
-	// Cache of goroutine ids, amortizes accesses to runtime·sched.goidgen.
-	goidcache    uint64
-	goidcacheend uint64
-
-	// Queue of runnable goroutines. Accessed without lock.
-	runqhead uint32
-	runqtail uint32
-	runq     [256]*g
-	// runnext, if non-nil, is a runnable G that was ready'd by
-	// the current G and should be run next instead of what's in
-	// runq if there's time remaining in the running G's time
-	// slice. It will inherit the time left in the current time
-	// slice. If a set of goroutines is locked in a
-	// communicate-and-wait pattern, this schedules that set as a
-	// unit and eliminates the (potentially large) scheduling
-	// latency that otherwise arises from adding the ready'd
-	// goroutines to the end of the run queue.
-	runnext guintptr
-
-	// Available G's (status == Gdead)
-	gfree    *g
-	gfreecnt int32
-
-	sudogcache []*sudog
-	sudogbuf   [128]*sudog
-
-	tracebuf *traceBuf
-
-	palloc persistentAlloc // per-P to avoid mutex
-
-	// Per-P GC state
-	gcAssistTime     int64 // Nanoseconds in assistAlloc
-	gcBgMarkWorker   *g
-	gcMarkWorkerMode gcMarkWorkerMode
-
-	// gcw is this P's GC work buffer cache. The work buffer is
-	// filled by write barriers, drained by mutator assists, and
-	// disposed on certain GC state transitions.
-	gcw gcWork
-
-	runSafePointFn uint32 // if 1, run sched.safePointFn at next safe point
-
-	pad [64]byte
-}
-
-const (
-	// The max value of GOMAXPROCS.
-	// There are no fundamental restrictions on the value.
-	_MaxGomaxprocs = 1 << 8
-)
-
-type schedt struct {
-	lock mutex
-
-	goidgen uint64
-
-	midle        muintptr // idle m's waiting for work
-	nmidle       int32    // number of idle m's waiting for work
-	nmidlelocked int32    // number of locked m's waiting for work
-	mcount       int32    // number of m's that have been created
-	maxmcount    int32    // maximum number of m's allowed (or die)
-
-	pidle      puintptr // idle p's
-	npidle     uint32
-	nmspinning uint32
-
-	// Global runnable queue.
-	runqhead guintptr
-	runqtail guintptr
-	runqsize int32
-
-	// Global cache of dead G's.
-	gflock mutex
-	gfree  *g
-	ngfree int32
-
-	// Central cache of sudog structs.
-	sudoglock  mutex
-	sudogcache *sudog
-
-	// Central pool of available defer structs of different sizes.
-	deferlock mutex
-	deferpool [5]*_defer
-
-	gcwaiting  uint32 // gc is waiting to run
-	stopwait   int32
-	stopnote   note
-	sysmonwait uint32
-	sysmonnote note
-	lastpoll   uint64
-
-	// safepointFn should be called on each P at the next GC
-	// safepoint if p.runSafePointFn is set.
-	safePointFn   func(*p)
-	safePointWait int32
-	safePointNote note
-
-	profilehz int32 // cpu profiling rate
-
-	procresizetime int64 // nanotime() of last change to gomaxprocs
-	totaltime      int64 // ∫gomaxprocs dt up to procresizetime
-}
-
-// The m->locked word holds two pieces of state counting active calls to LockOSThread/lockOSThread.
-// The low bit (LockExternal) is a boolean reporting whether any LockOSThread call is active.
-// External locks are not recursive; a second lock is silently ignored.
-// The upper bits of m->locked record the nesting depth of calls to lockOSThread
-// (counting up by LockInternal), popped by unlockOSThread (counting down by LockInternal).
-// Internal locks can be recursive. For instance, a lock for cgo can occur while the main
-// goroutine is holding the lock during the initialization phase.
-const (
-	_LockExternal = 1
-	_LockInternal = 2
-)
-
-type sigtabtt struct {
-	flags int32
-	name  *int8
-}
-
-const (
-	_SigNotify   = 1 << iota // let signal.Notify have signal, even if from kernel
-	_SigKill                 // if signal.Notify doesn't take it, exit quietly
-	_SigThrow                // if signal.Notify doesn't take it, exit loudly
-	_SigPanic                // if the signal is from the kernel, panic
-	_SigDefault              // if the signal isn't explicitly requested, don't monitor it
-	_SigHandling             // our signal handler is registered
-	_SigIgnored              // the signal was ignored before we registered for it
-	_SigGoExit               // cause all runtime procs to exit (only used on Plan 9).
-	_SigSetStack             // add SA_ONSTACK to libc handler
-	_SigUnblock              // unblocked in minit
-)
-
-// Layout of in-memory per-function information prepared by linker
-// See https://golang.org/s/go12symtab.
-// Keep in sync with linker
-// and with package debug/gosym and with symtab.go in package runtime.
-type _func struct {
-	entry   uintptr // start pc
-	nameoff int32   // function name
-
-	args  int32 // in/out args size
-	frame int32 // legacy frame size; use pcsp if possible
-
-	pcsp      int32
-	pcfile    int32
-	pcln      int32
-	npcdata   int32
-	nfuncdata int32
-}
-
-// layout of Itab known to compilers
-// allocated in non-garbage-collected memory
-type itab struct {
-	inter  *interfacetype
-	_type  *_type
-	link   *itab
-	bad    int32
-	unused int32
-	fun    [1]uintptr // variable sized
-}
-
-// Lock-free stack node.
-// // Also known to export_test.go.
-type lfnode struct {
-	next    uint64
-	pushcnt uintptr
-}
-
-type forcegcstate struct {
-	lock mutex
-	g    *g
-	idle uint32
-}
-
-/*
- * known to compiler
- */
-const (
-	_Structrnd = regSize
-)
-
-// startup_random_data holds random bytes initialized at startup.  These come from
-// the ELF AT_RANDOM auxiliary vector (vdso_linux_amd64.go or os_linux_386.go).
-var startupRandomData []byte
-
-// extendRandom extends the random numbers in r[:n] to the whole slice r.
-// Treats n<0 as n==0.
-func extendRandom(r []byte, n int) {
-	if n < 0 {
-		n = 0
-	}
-	for n < len(r) {
-		// Extend random bits using hash function & time seed
-		w := n
-		if w > 16 {
-			w = 16
-		}
-		h := memhash(unsafe.Pointer(&r[n-w]), uintptr(nanotime()), uintptr(w))
-		for i := 0; i < ptrSize && n < len(r); i++ {
-			r[n] = byte(h)
-			n++
-			h >>= 8
-		}
-	}
-}
-
-/*
- * deferred subroutine calls
- */
-type _defer struct {
-	siz     int32
-	started bool
-	sp      uintptr // sp at time of defer
-	pc      uintptr
-	fn      *funcval
-	_panic  *_panic // panic that is running defer
-	link    *_defer
-}
-
-/*
- * panics
- */
-type _panic struct {
-	argp      unsafe.Pointer // pointer to arguments of deferred call run during panic; cannot move - known to liblink
-	arg       interface{}    // argument to panic
-	link      *_panic        // link to earlier panic
-	recovered bool           // whether this panic is over
-	aborted   bool           // the panic was aborted
-}
-
-/*
- * stack traces
- */
-
-type stkframe struct {
-	fn       *_func     // function being run
-	pc       uintptr    // program counter within fn
-	continpc uintptr    // program counter where execution can continue, or 0 if not
-	lr       uintptr    // program counter at caller aka link register
-	sp       uintptr    // stack pointer at pc
-	fp       uintptr    // stack pointer at caller aka frame pointer
-	varp     uintptr    // top of local variables
-	argp     uintptr    // pointer to function arguments
-	arglen   uintptr    // number of bytes at argp
-	argmap   *bitvector // force use of this argmap
-}
-
-const (
-	_TraceRuntimeFrames = 1 << iota // include frames for internal runtime functions.
-	_TraceTrap                      // the initial PC, SP are from a trap, not a return PC from a call
-	_TraceJumpStack                 // if traceback is on a systemstack, resume trace at g that called into it
-)
-
-const (
-	// The maximum number of frames we print for a traceback
-	_TracebackMaxFrames = 100
-)
-
-var (
-	emptystring string
-	allg        **g
-	allglen     uintptr
-	lastg       *g
-	allm        *m
-	allp        [_MaxGomaxprocs + 1]*p
-	gomaxprocs  int32
-	panicking   uint32
-	goos        *int8
-	ncpu        int32
-	signote     note
-	forcegc     forcegcstate
-	sched       schedt
-	newprocs    int32
-
-	// Information about what cpu features are available.
-	// Set on startup in asm_{x86,amd64}.s.
-	cpuid_ecx         uint32
-	cpuid_edx         uint32
-	lfenceBeforeRdtsc bool
-
-	goarm uint8 // set by cmd/link on arm systems
-)
-
-// Set by the linker so the runtime can determine the buildmode.
-var (
-	islibrary bool // -buildmode=c-shared
-	isarchive bool // -buildmode=c-archive
-)
-
-/*
- * mutual exclusion locks.  in the uncontended case,
- * as fast as spin locks (just a few user-level instructions),
- * but on the contention path they sleep in the kernel.
- * a zeroed Mutex is unlocked (no need to initialize each lock).
- */
-
-/*
- * sleep and wakeup on one-time events.
- * before any calls to notesleep or notewakeup,
- * must call noteclear to initialize the Note.
- * then, exactly one thread can call notesleep
- * and exactly one thread can call notewakeup (once).
- * once notewakeup has been called, the notesleep
- * will return.  future notesleep will return immediately.
- * subsequent noteclear must be called only after
- * previous notesleep has returned, e.g. it's disallowed
- * to call noteclear straight after notewakeup.
- *
- * notetsleep is like notesleep but wakes up after
- * a given number of nanoseconds even if the event
- * has not yet happened.  if a goroutine uses notetsleep to
- * wake up early, it must wait to call noteclear until it
- * can be sure that no other goroutine is calling
- * notewakeup.
- *
- * notesleep/notetsleep are generally called on g0,
- * notetsleepg is similar to notetsleep but is called on user g.
- */
-// bool	runtime·notetsleep(Note*, int64);  // false - timeout
-// bool	runtime·notetsleepg(Note*, int64);  // false - timeout
-
-/*
- * Lock-free stack.
- * Initialize uint64 head to 0, compare with 0 to test for emptiness.
- * The stack does not keep pointers to nodes,
- * so they can be garbage collected if there are no other pointers to nodes.
- */
-
-// for mmap, we only pass the lower 32 bits of file offset to the
-// assembly routine; the higher bits (if required), should be provided
-// by the assembly routine as 0.
diff --git a/src/runtime/signal1_unix.go b/src/runtime/signal1_unix.go
deleted file mode 100644
index 56d9755..0000000
--- a/src/runtime/signal1_unix.go
+++ /dev/null
@@ -1,241 +0,0 @@
-// Copyright 2012 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package runtime
-
-const (
-	_SIG_DFL uintptr = 0
-	_SIG_IGN uintptr = 1
-)
-
-// Stores the signal handlers registered before Go installed its own.
-// These signal handlers will be invoked in cases where Go doesn't want to
-// handle a particular signal (e.g., signal occurred on a non-Go thread).
-// See sigfwdgo() for more information on when the signals are forwarded.
-//
-// Signal forwarding is currently available only on Linux.
-var fwdSig [_NSIG]uintptr
-
-// sigmask represents a general signal mask compatible with the GOOS
-// specific sigset types: the signal numbered x is represented by bit x-1
-// to match the representation expected by sigprocmask.
-type sigmask [(_NSIG + 31) / 32]uint32
-
-// channels for synchronizing signal mask updates with the signal mask
-// thread
-var (
-	disableSigChan  chan uint32
-	enableSigChan   chan uint32
-	maskUpdatedChan chan struct{}
-)
-
-func initsig() {
-	// _NSIG is the number of signals on this operating system.
-	// sigtable should describe what to do for all the possible signals.
-	if len(sigtable) != _NSIG {
-		print("runtime: len(sigtable)=", len(sigtable), " _NSIG=", _NSIG, "\n")
-		throw("initsig")
-	}
-
-	// First call: basic setup.
-	for i := int32(0); i < _NSIG; i++ {
-		t := &sigtable[i]
-		if t.flags == 0 || t.flags&_SigDefault != 0 {
-			continue
-		}
-		fwdSig[i] = getsig(i)
-		// For some signals, we respect an inherited SIG_IGN handler
-		// rather than insist on installing our own default handler.
-		// Even these signals can be fetched using the os/signal package.
-		switch i {
-		case _SIGHUP, _SIGINT:
-			if getsig(i) == _SIG_IGN {
-				t.flags = _SigNotify | _SigIgnored
-				continue
-			}
-		}
-
-		if t.flags&_SigSetStack != 0 {
-			setsigstack(i)
-			continue
-		}
-
-		t.flags |= _SigHandling
-		setsig(i, funcPC(sighandler), true)
-	}
-}
-
-func sigenable(sig uint32) {
-	if sig >= uint32(len(sigtable)) {
-		return
-	}
-
-	t := &sigtable[sig]
-	if t.flags&_SigNotify != 0 {
-		ensureSigM()
-		enableSigChan <- sig
-		<-maskUpdatedChan
-		if t.flags&_SigHandling == 0 {
-			t.flags |= _SigHandling
-			if getsig(int32(sig)) == _SIG_IGN {
-				t.flags |= _SigIgnored
-			}
-			setsig(int32(sig), funcPC(sighandler), true)
-		}
-	}
-}
-
-func sigdisable(sig uint32) {
-	if sig >= uint32(len(sigtable)) {
-		return
-	}
-
-	t := &sigtable[sig]
-	if t.flags&_SigNotify != 0 {
-		ensureSigM()
-		disableSigChan <- sig
-		<-maskUpdatedChan
-		if t.flags&_SigHandling != 0 {
-			t.flags &^= _SigHandling
-			if t.flags&_SigIgnored != 0 {
-				setsig(int32(sig), _SIG_IGN, true)
-			} else {
-				setsig(int32(sig), _SIG_DFL, true)
-			}
-		}
-	}
-}
-
-func sigignore(sig uint32) {
-	if sig >= uint32(len(sigtable)) {
-		return
-	}
-
-	t := &sigtable[sig]
-	if t.flags&_SigNotify != 0 {
-		t.flags &^= _SigHandling
-		setsig(int32(sig), _SIG_IGN, true)
-	}
-}
-
-func resetcpuprofiler(hz int32) {
-	var it itimerval
-	if hz == 0 {
-		setitimer(_ITIMER_PROF, &it, nil)
-	} else {
-		it.it_interval.tv_sec = 0
-		it.it_interval.set_usec(1000000 / hz)
-		it.it_value = it.it_interval
-		setitimer(_ITIMER_PROF, &it, nil)
-	}
-	_g_ := getg()
-	_g_.m.profilehz = hz
-}
-
-func sigpipe() {
-	setsig(_SIGPIPE, _SIG_DFL, false)
-	raise(_SIGPIPE)
-}
-
-// raisebadsignal is called when a signal is received on a non-Go
-// thread, and the Go program does not want to handle it (that is, the
-// program has not called os/signal.Notify for the signal).
-func raisebadsignal(sig int32) {
-	if sig == _SIGPROF {
-		// Ignore profiling signals that arrive on non-Go threads.
-		return
-	}
-
-	var handler uintptr
-	if sig >= _NSIG {
-		handler = _SIG_DFL
-	} else {
-		handler = fwdSig[sig]
-	}
-
-	// Reset the signal handler and raise the signal.
-	// We are currently running inside a signal handler, so the
-	// signal is blocked.  We need to unblock it before raising the
-	// signal, or the signal we raise will be ignored until we return
-	// from the signal handler.  We know that the signal was unblocked
-	// before entering the handler, or else we would not have received
-	// it.  That means that we don't have to worry about blocking it
-	// again.
-	unblocksig(sig)
-	setsig(sig, handler, false)
-	raise(sig)
-
-	// If the signal didn't cause the program to exit, restore the
-	// Go signal handler and carry on.
-	//
-	// We may receive another instance of the signal before we
-	// restore the Go handler, but that is not so bad: we know
-	// that the Go program has been ignoring the signal.
-	setsig(sig, funcPC(sighandler), true)
-}
-
-func crash() {
-	if GOOS == "darwin" {
-		// OS X core dumps are linear dumps of the mapped memory,
-		// from the first virtual byte to the last, with zeros in the gaps.
-		// Because of the way we arrange the address space on 64-bit systems,
-		// this means the OS X core file will be >128 GB and even on a zippy
-		// workstation can take OS X well over an hour to write (uninterruptible).
-		// Save users from making that mistake.
-		if ptrSize == 8 {
-			return
-		}
-	}
-
-	updatesigmask(sigmask{})
-	setsig(_SIGABRT, _SIG_DFL, false)
-	raise(_SIGABRT)
-}
-
-// createSigM starts one global, sleeping thread to make sure at least one thread
-// is available to catch signals enabled for os/signal.
-func ensureSigM() {
-	if maskUpdatedChan != nil {
-		return
-	}
-	maskUpdatedChan = make(chan struct{})
-	disableSigChan = make(chan uint32)
-	enableSigChan = make(chan uint32)
-	go func() {
-		// Signal masks are per-thread, so make sure this goroutine stays on one
-		// thread.
-		LockOSThread()
-		defer UnlockOSThread()
-		// The sigBlocked mask contains the signals not active for os/signal,
-		// initially all signals except the essential. When signal.Notify()/Stop is called,
-		// sigenable/sigdisable in turn notify this thread to update its signal
-		// mask accordingly.
-		var sigBlocked sigmask
-		for i := range sigBlocked {
-			sigBlocked[i] = ^uint32(0)
-		}
-		for i := range sigtable {
-			if sigtable[i].flags&_SigUnblock != 0 {
-				sigBlocked[(i-1)/32] &^= 1 << ((uint32(i) - 1) & 31)
-			}
-		}
-		updatesigmask(sigBlocked)
-		for {
-			select {
-			case sig := <-enableSigChan:
-				if b := sig - 1; b >= 0 {
-					sigBlocked[b/32] &^= (1 << (b & 31))
-				}
-			case sig := <-disableSigChan:
-				if b := sig - 1; b >= 0 {
-					sigBlocked[b/32] |= (1 << (b & 31))
-				}
-			}
-			updatesigmask(sigBlocked)
-			maskUpdatedChan <- struct{}{}
-		}
-	}()
-}
diff --git a/src/runtime/signal_386.go b/src/runtime/signal_386.go
deleted file mode 100644
index ca18942..0000000
--- a/src/runtime/signal_386.go
+++ /dev/null
@@ -1,193 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux nacl netbsd openbsd
-
-package runtime
-
-import "unsafe"
-
-func dumpregs(c *sigctxt) {
-	print("eax    ", hex(c.eax()), "\n")
-	print("ebx    ", hex(c.ebx()), "\n")
-	print("ecx    ", hex(c.ecx()), "\n")
-	print("edx    ", hex(c.edx()), "\n")
-	print("edi    ", hex(c.edi()), "\n")
-	print("esi    ", hex(c.esi()), "\n")
-	print("ebp    ", hex(c.ebp()), "\n")
-	print("esp    ", hex(c.esp()), "\n")
-	print("eip    ", hex(c.eip()), "\n")
-	print("eflags ", hex(c.eflags()), "\n")
-	print("cs     ", hex(c.cs()), "\n")
-	print("fs     ", hex(c.fs()), "\n")
-	print("gs     ", hex(c.gs()), "\n")
-}
-
-var crashing int32
-
-// May run during STW, so write barriers are not allowed.
-//go:nowritebarrier
-func sighandler(sig uint32, info *siginfo, ctxt unsafe.Pointer, gp *g) {
-	_g_ := getg()
-	c := &sigctxt{info, ctxt}
-
-	if sig == _SIGPROF {
-		sigprof(uintptr(c.eip()), uintptr(c.esp()), 0, gp, _g_.m)
-		return
-	}
-
-	flags := int32(_SigThrow)
-	if sig < uint32(len(sigtable)) {
-		flags = sigtable[sig].flags
-	}
-	if c.sigcode() != _SI_USER && flags&_SigPanic != 0 {
-		// Make it look like a call to the signal func.
-		// Have to pass arguments out of band since
-		// augmenting the stack frame would break
-		// the unwinding code.
-		gp.sig = sig
-		gp.sigcode0 = uintptr(c.sigcode())
-		gp.sigcode1 = uintptr(c.sigaddr())
-		gp.sigpc = uintptr(c.eip())
-
-		if GOOS == "darwin" {
-			// Work around Leopard bug that doesn't set FPE_INTDIV.
-			// Look at instruction to see if it is a divide.
-			// Not necessary in Snow Leopard (si_code will be != 0).
-			if sig == _SIGFPE && gp.sigcode0 == 0 {
-				pc := (*[4]byte)(unsafe.Pointer(gp.sigpc))
-				i := 0
-				if pc[i] == 0x66 { // 16-bit instruction prefix
-					i++
-				}
-				if pc[i] == 0xF6 || pc[i] == 0xF7 {
-					gp.sigcode0 = _FPE_INTDIV
-				}
-			}
-		}
-
-		pc := uintptr(c.eip())
-		sp := uintptr(c.esp())
-
-		// If we don't recognize the PC as code
-		// but we do recognize the top pointer on the stack as code,
-		// then assume this was a call to non-code and treat like
-		// pc == 0, to make unwinding show the context.
-		if pc != 0 && findfunc(pc) == nil && findfunc(*(*uintptr)(unsafe.Pointer(sp))) != nil {
-			pc = 0
-		}
-
-		// Only push runtime.sigpanic if pc != 0.
-		// If pc == 0, probably panicked because of a
-		// call to a nil func.  Not pushing that onto sp will
-		// make the trace look like a call to runtime.sigpanic instead.
-		// (Otherwise the trace will end at runtime.sigpanic and we
-		// won't get to see who faulted.)
-		if pc != 0 {
-			if regSize > ptrSize {
-				sp -= ptrSize
-				*(*uintptr)(unsafe.Pointer(sp)) = 0
-			}
-			sp -= ptrSize
-			*(*uintptr)(unsafe.Pointer(sp)) = pc
-			c.set_esp(uint32(sp))
-		}
-		c.set_eip(uint32(funcPC(sigpanic)))
-		return
-	}
-
-	if c.sigcode() == _SI_USER || flags&_SigNotify != 0 {
-		if sigsend(sig) {
-			return
-		}
-	}
-
-	if flags&_SigKill != 0 {
-		exit(2)
-	}
-
-	if flags&_SigThrow == 0 {
-		return
-	}
-
-	_g_.m.throwing = 1
-	_g_.m.caughtsig.set(gp)
-
-	if crashing == 0 {
-		startpanic()
-	}
-
-	if sig < uint32(len(sigtable)) {
-		print(sigtable[sig].name, "\n")
-	} else {
-		print("Signal ", sig, "\n")
-	}
-
-	print("PC=", hex(c.eip()), " m=", _g_.m.id, "\n")
-	if _g_.m.lockedg != nil && _g_.m.ncgo > 0 && gp == _g_.m.g0 {
-		print("signal arrived during cgo execution\n")
-		gp = _g_.m.lockedg
-	}
-	print("\n")
-
-	var docrash bool
-	if gotraceback(&docrash) > 0 {
-		goroutineheader(gp)
-
-		// On Linux/386, all system calls go through the vdso kernel_vsyscall routine.
-		// Normally we don't see those PCs, but during signals we can.
-		// If we see a PC in the vsyscall area (it moves around, but near the top of memory),
-		// assume we're blocked in the vsyscall routine, which has saved
-		// three words on the stack after the initial call saved the caller PC.
-		// Pop all four words off SP and use the saved PC.
-		// The check of the stack bounds here should suffice to avoid a fault
-		// during the actual PC pop.
-		// If we do load a bogus PC, not much harm done: we weren't going
-		// to get a decent traceback anyway.
-		// TODO(rsc): Make this more precise: we should do more checks on the PC,
-		// and we should find out whether different versions of the vdso page
-		// use different prologues that store different amounts on the stack.
-		pc := uintptr(c.eip())
-		sp := uintptr(c.esp())
-		if GOOS == "linux" && pc >= 0xf4000000 && gp.stack.lo <= sp && sp+16 <= gp.stack.hi {
-			// Assume in vsyscall page.
-			sp += 16
-			pc = *(*uintptr)(unsafe.Pointer(sp - 4))
-			print("runtime: unwind vdso kernel_vsyscall: pc=", hex(pc), " sp=", hex(sp), "\n")
-		}
-
-		tracebacktrap(pc, sp, 0, gp)
-		if crashing > 0 && gp != _g_.m.curg && _g_.m.curg != nil && readgstatus(_g_.m.curg)&^_Gscan == _Grunning {
-			// tracebackothers on original m skipped this one; trace it now.
-			goroutineheader(_g_.m.curg)
-			traceback(^uintptr(0), ^uintptr(0), 0, gp)
-		} else if crashing == 0 {
-			tracebackothers(gp)
-			print("\n")
-		}
-		dumpregs(c)
-	}
-
-	if docrash {
-		crashing++
-		if crashing < sched.mcount {
-			// There are other m's that need to dump their stacks.
-			// Relay SIGQUIT to the next m by sending it to the current process.
-			// All m's that have already received SIGQUIT have signal masks blocking
-			// receipt of any signals, so the SIGQUIT will go to an m that hasn't seen it yet.
-			// When the last m receives the SIGQUIT, it will fall through to the call to
-			// crash below. Just in case the relaying gets botched, each m involved in
-			// the relay sleeps for 5 seconds and then does the crash/exit itself.
-			// In expected operation, the last m has received the SIGQUIT and run
-			// crash/exit and the process is gone, all long before any of the
-			// 5-second sleeps have finished.
-			print("\n-----\n\n")
-			raiseproc(_SIGQUIT)
-			usleep(5 * 1000 * 1000)
-		}
-		crash()
-	}
-
-	exit(2)
-}
diff --git a/src/runtime/signal_amd64x.go b/src/runtime/signal_amd64x.go
deleted file mode 100644
index 3e14480..0000000
--- a/src/runtime/signal_amd64x.go
+++ /dev/null
@@ -1,204 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64 amd64p32
-// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
-
-package runtime
-
-import (
-	"unsafe"
-)
-
-func dumpregs(c *sigctxt) {
-	print("rax    ", hex(c.rax()), "\n")
-	print("rbx    ", hex(c.rbx()), "\n")
-	print("rcx    ", hex(c.rcx()), "\n")
-	print("rdx    ", hex(c.rdx()), "\n")
-	print("rdi    ", hex(c.rdi()), "\n")
-	print("rsi    ", hex(c.rsi()), "\n")
-	print("rbp    ", hex(c.rbp()), "\n")
-	print("rsp    ", hex(c.rsp()), "\n")
-	print("r8     ", hex(c.r8()), "\n")
-	print("r9     ", hex(c.r9()), "\n")
-	print("r10    ", hex(c.r10()), "\n")
-	print("r11    ", hex(c.r11()), "\n")
-	print("r12    ", hex(c.r12()), "\n")
-	print("r13    ", hex(c.r13()), "\n")
-	print("r14    ", hex(c.r14()), "\n")
-	print("r15    ", hex(c.r15()), "\n")
-	print("rip    ", hex(c.rip()), "\n")
-	print("rflags ", hex(c.rflags()), "\n")
-	print("cs     ", hex(c.cs()), "\n")
-	print("fs     ", hex(c.fs()), "\n")
-	print("gs     ", hex(c.gs()), "\n")
-}
-
-var crashing int32
-
-// May run during STW, so write barriers are not allowed.
-//go:nowritebarrier
-func sighandler(sig uint32, info *siginfo, ctxt unsafe.Pointer, gp *g) {
-	_g_ := getg()
-	c := &sigctxt{info, ctxt}
-
-	if sig == _SIGPROF {
-		sigprof(uintptr(c.rip()), uintptr(c.rsp()), 0, gp, _g_.m)
-		return
-	}
-
-	if GOOS == "darwin" {
-		// x86-64 has 48-bit virtual addresses. The top 16 bits must echo bit 47.
-		// The hardware delivers a different kind of fault for a malformed address
-		// than it does for an attempt to access a valid but unmapped address.
-		// OS X 10.9.2 mishandles the malformed address case, making it look like
-		// a user-generated signal (like someone ran kill -SEGV ourpid).
-		// We pass user-generated signals to os/signal, or else ignore them.
-		// Doing that here - and returning to the faulting code - results in an
-		// infinite loop. It appears the best we can do is rewrite what the kernel
-		// delivers into something more like the truth. The address used below
-		// has very little chance of being the one that caused the fault, but it is
-		// malformed, it is clearly not a real pointer, and if it does get printed
-		// in real life, people will probably search for it and find this code.
-		// There are no Google hits for b01dfacedebac1e or 0xb01dfacedebac1e
-		// as I type this comment.
-		if sig == _SIGSEGV && c.sigcode() == _SI_USER {
-			c.set_sigcode(_SI_USER + 1)
-			c.set_sigaddr(0xb01dfacedebac1e)
-		}
-	}
-
-	flags := int32(_SigThrow)
-	if sig < uint32(len(sigtable)) {
-		flags = sigtable[sig].flags
-	}
-	if c.sigcode() != _SI_USER && flags&_SigPanic != 0 {
-		// Make it look like a call to the signal func.
-		// Have to pass arguments out of band since
-		// augmenting the stack frame would break
-		// the unwinding code.
-		gp.sig = sig
-		gp.sigcode0 = uintptr(c.sigcode())
-		gp.sigcode1 = uintptr(c.sigaddr())
-		gp.sigpc = uintptr(c.rip())
-
-		if GOOS == "darwin" {
-			// Work around Leopard bug that doesn't set FPE_INTDIV.
-			// Look at instruction to see if it is a divide.
-			// Not necessary in Snow Leopard (si_code will be != 0).
-			if sig == _SIGFPE && gp.sigcode0 == 0 {
-				pc := (*[4]byte)(unsafe.Pointer(gp.sigpc))
-				i := 0
-				if pc[i]&0xF0 == 0x40 { // 64-bit REX prefix
-					i++
-				} else if pc[i] == 0x66 { // 16-bit instruction prefix
-					i++
-				}
-				if pc[i] == 0xF6 || pc[i] == 0xF7 {
-					gp.sigcode0 = _FPE_INTDIV
-				}
-			}
-		}
-
-		pc := uintptr(c.rip())
-		sp := uintptr(c.rsp())
-
-		// If we don't recognize the PC as code
-		// but we do recognize the top pointer on the stack as code,
-		// then assume this was a call to non-code and treat like
-		// pc == 0, to make unwinding show the context.
-		if pc != 0 && findfunc(pc) == nil && findfunc(*(*uintptr)(unsafe.Pointer(sp))) != nil {
-			pc = 0
-		}
-
-		// Only push runtime.sigpanic if pc != 0.
-		// If pc == 0, probably panicked because of a
-		// call to a nil func.  Not pushing that onto sp will
-		// make the trace look like a call to runtime.sigpanic instead.
-		// (Otherwise the trace will end at runtime.sigpanic and we
-		// won't get to see who faulted.)
-		if pc != 0 {
-			if regSize > ptrSize {
-				sp -= ptrSize
-				*(*uintptr)(unsafe.Pointer(sp)) = 0
-			}
-			sp -= ptrSize
-			*(*uintptr)(unsafe.Pointer(sp)) = pc
-			c.set_rsp(uint64(sp))
-		}
-		c.set_rip(uint64(funcPC(sigpanic)))
-		return
-	}
-
-	if c.sigcode() == _SI_USER || flags&_SigNotify != 0 {
-		if sigsend(sig) {
-			return
-		}
-	}
-
-	if flags&_SigKill != 0 {
-		exit(2)
-	}
-
-	if flags&_SigThrow == 0 {
-		return
-	}
-
-	_g_.m.throwing = 1
-	_g_.m.caughtsig.set(gp)
-
-	if crashing == 0 {
-		startpanic()
-	}
-
-	if sig < uint32(len(sigtable)) {
-		print(sigtable[sig].name, "\n")
-	} else {
-		print("Signal ", sig, "\n")
-	}
-
-	print("PC=", hex(c.rip()), " m=", _g_.m.id, "\n")
-	if _g_.m.lockedg != nil && _g_.m.ncgo > 0 && gp == _g_.m.g0 {
-		print("signal arrived during cgo execution\n")
-		gp = _g_.m.lockedg
-	}
-	print("\n")
-
-	var docrash bool
-	if gotraceback(&docrash) > 0 {
-		goroutineheader(gp)
-		tracebacktrap(uintptr(c.rip()), uintptr(c.rsp()), 0, gp)
-		if crashing > 0 && gp != _g_.m.curg && _g_.m.curg != nil && readgstatus(_g_.m.curg)&^_Gscan == _Grunning {
-			// tracebackothers on original m skipped this one; trace it now.
-			goroutineheader(_g_.m.curg)
-			traceback(^uintptr(0), ^uintptr(0), 0, gp)
-		} else if crashing == 0 {
-			tracebackothers(gp)
-			print("\n")
-		}
-		dumpregs(c)
-	}
-
-	if docrash {
-		crashing++
-		if crashing < sched.mcount {
-			// There are other m's that need to dump their stacks.
-			// Relay SIGQUIT to the next m by sending it to the current process.
-			// All m's that have already received SIGQUIT have signal masks blocking
-			// receipt of any signals, so the SIGQUIT will go to an m that hasn't seen it yet.
-			// When the last m receives the SIGQUIT, it will fall through to the call to
-			// crash below. Just in case the relaying gets botched, each m involved in
-			// the relay sleeps for 5 seconds and then does the crash/exit itself.
-			// In expected operation, the last m has received the SIGQUIT and run
-			// crash/exit and the process is gone, all long before any of the
-			// 5-second sleeps have finished.
-			print("\n-----\n\n")
-			raiseproc(_SIGQUIT)
-			usleep(5 * 1000 * 1000)
-		}
-		crash()
-	}
-
-	exit(2)
-}
diff --git a/src/runtime/signal_arm.go b/src/runtime/signal_arm.go
deleted file mode 100644
index 1b8a2f5..0000000
--- a/src/runtime/signal_arm.go
+++ /dev/null
@@ -1,165 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux nacl netbsd openbsd
-
-package runtime
-
-import "unsafe"
-
-func dumpregs(c *sigctxt) {
-	print("trap    ", hex(c.trap()), "\n")
-	print("error   ", hex(c.error()), "\n")
-	print("oldmask ", hex(c.oldmask()), "\n")
-	print("r0      ", hex(c.r0()), "\n")
-	print("r1      ", hex(c.r1()), "\n")
-	print("r2      ", hex(c.r2()), "\n")
-	print("r3      ", hex(c.r3()), "\n")
-	print("r4      ", hex(c.r4()), "\n")
-	print("r5      ", hex(c.r5()), "\n")
-	print("r6      ", hex(c.r6()), "\n")
-	print("r7      ", hex(c.r7()), "\n")
-	print("r8      ", hex(c.r8()), "\n")
-	print("r9      ", hex(c.r9()), "\n")
-	print("r10     ", hex(c.r10()), "\n")
-	print("fp      ", hex(c.fp()), "\n")
-	print("ip      ", hex(c.ip()), "\n")
-	print("sp      ", hex(c.sp()), "\n")
-	print("lr      ", hex(c.lr()), "\n")
-	print("pc      ", hex(c.pc()), "\n")
-	print("cpsr    ", hex(c.cpsr()), "\n")
-	print("fault   ", hex(c.fault()), "\n")
-}
-
-var crashing int32
-
-// May run during STW, so write barriers are not allowed.
-//go:nowritebarrier
-func sighandler(sig uint32, info *siginfo, ctxt unsafe.Pointer, gp *g) {
-	_g_ := getg()
-	c := &sigctxt{info, ctxt}
-
-	if sig == _SIGPROF {
-		sigprof(uintptr(c.pc()), uintptr(c.sp()), uintptr(c.lr()), gp, _g_.m)
-		return
-	}
-
-	flags := int32(_SigThrow)
-	if sig < uint32(len(sigtable)) {
-		flags = sigtable[sig].flags
-	}
-	if c.sigcode() != _SI_USER && flags&_SigPanic != 0 {
-		// Make it look like a call to the signal func.
-		// Have to pass arguments out of band since
-		// augmenting the stack frame would break
-		// the unwinding code.
-		gp.sig = sig
-		gp.sigcode0 = uintptr(c.sigcode())
-		gp.sigcode1 = uintptr(c.fault())
-		gp.sigpc = uintptr(c.pc())
-
-		// We arrange lr, and pc to pretend the panicking
-		// function calls sigpanic directly.
-		// Always save LR to stack so that panics in leaf
-		// functions are correctly handled. This smashes
-		// the stack frame but we're not going back there
-		// anyway.
-		sp := c.sp() - 4
-		c.set_sp(sp)
-		*(*uint32)(unsafe.Pointer(uintptr(sp))) = c.lr()
-
-		pc := uintptr(gp.sigpc)
-
-		// If we don't recognize the PC as code
-		// but we do recognize the link register as code,
-		// then assume this was a call to non-code and treat like
-		// pc == 0, to make unwinding show the context.
-		if pc != 0 && findfunc(pc) == nil && findfunc(uintptr(c.lr())) != nil {
-			pc = 0
-		}
-
-		// Don't bother saving PC if it's zero, which is
-		// probably a call to a nil func: the old link register
-		// is more useful in the stack trace.
-		if pc != 0 {
-			c.set_lr(uint32(pc))
-		}
-
-		// In case we are panicking from external C code
-		c.set_r10(uint32(uintptr(unsafe.Pointer(gp))))
-		c.set_pc(uint32(funcPC(sigpanic)))
-		return
-	}
-
-	if c.sigcode() == _SI_USER || flags&_SigNotify != 0 {
-		if sigsend(sig) {
-			return
-		}
-	}
-
-	if flags&_SigKill != 0 {
-		exit(2)
-	}
-
-	if flags&_SigThrow == 0 {
-		return
-	}
-
-	_g_.m.throwing = 1
-	_g_.m.caughtsig.set(gp)
-
-	if crashing == 0 {
-		startpanic()
-	}
-
-	if sig < uint32(len(sigtable)) {
-		print(sigtable[sig].name, "\n")
-	} else {
-		print("Signal ", sig, "\n")
-	}
-
-	print("PC=", hex(c.pc()), " m=", _g_.m.id, "\n")
-	if _g_.m.lockedg != nil && _g_.m.ncgo > 0 && gp == _g_.m.g0 {
-		print("signal arrived during cgo execution\n")
-		gp = _g_.m.lockedg
-	}
-	print("\n")
-
-	var docrash bool
-	if gotraceback(&docrash) > 0 {
-		goroutineheader(gp)
-		tracebacktrap(uintptr(c.pc()), uintptr(c.sp()), uintptr(c.lr()), gp)
-		if crashing > 0 && gp != _g_.m.curg && _g_.m.curg != nil && readgstatus(_g_.m.curg)&^_Gscan == _Grunning {
-			// tracebackothers on original m skipped this one; trace it now.
-			goroutineheader(_g_.m.curg)
-			traceback(^uintptr(0), ^uintptr(0), 0, gp)
-		} else if crashing == 0 {
-			tracebackothers(gp)
-			print("\n")
-		}
-		dumpregs(c)
-	}
-
-	if docrash {
-		crashing++
-		if crashing < sched.mcount {
-			// There are other m's that need to dump their stacks.
-			// Relay SIGQUIT to the next m by sending it to the current process.
-			// All m's that have already received SIGQUIT have signal masks blocking
-			// receipt of any signals, so the SIGQUIT will go to an m that hasn't seen it yet.
-			// When the last m receives the SIGQUIT, it will fall through to the call to
-			// crash below. Just in case the relaying gets botched, each m involved in
-			// the relay sleeps for 5 seconds and then does the crash/exit itself.
-			// In expected operation, the last m has received the SIGQUIT and run
-			// crash/exit and the process is gone, all long before any of the
-			// 5-second sleeps have finished.
-			print("\n-----\n\n")
-			raiseproc(_SIGQUIT)
-			usleep(5 * 1000 * 1000)
-		}
-		crash()
-	}
-
-	exit(2)
-}
diff --git a/src/runtime/signal_arm64.go b/src/runtime/signal_arm64.go
deleted file mode 100644
index 4a7c8b9..0000000
--- a/src/runtime/signal_arm64.go
+++ /dev/null
@@ -1,178 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux darwin
-
-package runtime
-
-import "unsafe"
-
-func dumpregs(c *sigctxt) {
-	print("r0      ", hex(c.r0()), "\n")
-	print("r1      ", hex(c.r1()), "\n")
-	print("r2      ", hex(c.r2()), "\n")
-	print("r3      ", hex(c.r3()), "\n")
-	print("r4      ", hex(c.r4()), "\n")
-	print("r5      ", hex(c.r5()), "\n")
-	print("r6      ", hex(c.r6()), "\n")
-	print("r7      ", hex(c.r7()), "\n")
-	print("r8      ", hex(c.r8()), "\n")
-	print("r9      ", hex(c.r9()), "\n")
-	print("r10     ", hex(c.r10()), "\n")
-	print("r11     ", hex(c.r11()), "\n")
-	print("r12     ", hex(c.r12()), "\n")
-	print("r13     ", hex(c.r13()), "\n")
-	print("r14     ", hex(c.r14()), "\n")
-	print("r15     ", hex(c.r15()), "\n")
-	print("r16     ", hex(c.r16()), "\n")
-	print("r17     ", hex(c.r17()), "\n")
-	print("r18     ", hex(c.r18()), "\n")
-	print("r19     ", hex(c.r19()), "\n")
-	print("r20     ", hex(c.r20()), "\n")
-	print("r21     ", hex(c.r21()), "\n")
-	print("r22     ", hex(c.r22()), "\n")
-	print("r23     ", hex(c.r23()), "\n")
-	print("r24     ", hex(c.r24()), "\n")
-	print("r25     ", hex(c.r25()), "\n")
-	print("r26     ", hex(c.r26()), "\n")
-	print("r27     ", hex(c.r27()), "\n")
-	print("r28     ", hex(c.r28()), "\n")
-	print("r29     ", hex(c.r29()), "\n")
-	print("lr      ", hex(c.lr()), "\n")
-	print("sp      ", hex(c.sp()), "\n")
-	print("pc      ", hex(c.pc()), "\n")
-	print("fault   ", hex(c.fault()), "\n")
-}
-
-var crashing int32
-
-// May run during STW, so write barriers are not allowed.
-//go:nowritebarrier
-func sighandler(sig uint32, info *siginfo, ctxt unsafe.Pointer, gp *g) {
-	_g_ := getg()
-	c := &sigctxt{info, ctxt}
-
-	if sig == _SIGPROF {
-		sigprof(uintptr(c.pc()), uintptr(c.sp()), uintptr(c.lr()), gp, _g_.m)
-		return
-	}
-
-	flags := int32(_SigThrow)
-	if sig < uint32(len(sigtable)) {
-		flags = sigtable[sig].flags
-	}
-	if c.sigcode() != _SI_USER && flags&_SigPanic != 0 {
-		// Make it look like a call to the signal func.
-		// Have to pass arguments out of band since
-		// augmenting the stack frame would break
-		// the unwinding code.
-		gp.sig = sig
-		gp.sigcode0 = uintptr(c.sigcode())
-		gp.sigcode1 = uintptr(c.fault())
-		gp.sigpc = uintptr(c.pc())
-
-		// We arrange lr, and pc to pretend the panicking
-		// function calls sigpanic directly.
-		// Always save LR to stack so that panics in leaf
-		// functions are correctly handled. This smashes
-		// the stack frame but we're not going back there
-		// anyway.
-		sp := c.sp() - spAlign // needs only sizeof uint64, but must align the stack
-		c.set_sp(sp)
-		*(*uint64)(unsafe.Pointer(uintptr(sp))) = c.lr()
-
-		pc := uintptr(gp.sigpc)
-
-		// If we don't recognize the PC as code
-		// but we do recognize the link register as code,
-		// then assume this was a call to non-code and treat like
-		// pc == 0, to make unwinding show the context.
-		if pc != 0 && findfunc(pc) == nil && findfunc(uintptr(c.lr())) != nil {
-			pc = 0
-		}
-
-		// Don't bother saving PC if it's zero, which is
-		// probably a call to a nil func: the old link register
-		// is more useful in the stack trace.
-		if pc != 0 {
-			c.set_lr(uint64(pc))
-		}
-
-		// In case we are panicking from external C code
-		c.set_r28(uint64(uintptr(unsafe.Pointer(gp))))
-		c.set_pc(uint64(funcPC(sigpanic)))
-		return
-	}
-
-	if c.sigcode() == _SI_USER || flags&_SigNotify != 0 {
-		if sigsend(sig) {
-			return
-		}
-	}
-
-	if flags&_SigKill != 0 {
-		exit(2)
-	}
-
-	if flags&_SigThrow == 0 {
-		return
-	}
-
-	_g_.m.throwing = 1
-	_g_.m.caughtsig.set(gp)
-
-	if crashing == 0 {
-		startpanic()
-	}
-
-	if sig < uint32(len(sigtable)) {
-		print(sigtable[sig].name, "\n")
-	} else {
-		print("Signal ", sig, "\n")
-	}
-
-	print("PC=", hex(c.pc()), " m=", _g_.m.id, "\n")
-	if _g_.m.lockedg != nil && _g_.m.ncgo > 0 && gp == _g_.m.g0 {
-		print("signal arrived during cgo execution\n")
-		gp = _g_.m.lockedg
-	}
-	print("\n")
-
-	var docrash bool
-	if gotraceback(&docrash) > 0 {
-		goroutineheader(gp)
-		tracebacktrap(uintptr(c.pc()), uintptr(c.sp()), uintptr(c.lr()), gp)
-		if crashing > 0 && gp != _g_.m.curg && _g_.m.curg != nil && readgstatus(_g_.m.curg)&^_Gscan == _Grunning {
-			// tracebackothers on original m skipped this one; trace it now.
-			goroutineheader(_g_.m.curg)
-			traceback(^uintptr(0), ^uintptr(0), 0, gp)
-		} else if crashing == 0 {
-			tracebackothers(gp)
-			print("\n")
-		}
-		dumpregs(c)
-	}
-
-	if docrash {
-		crashing++
-		if crashing < sched.mcount {
-			// There are other m's that need to dump their stacks.
-			// Relay SIGQUIT to the next m by sending it to the current process.
-			// All m's that have already received SIGQUIT have signal masks blocking
-			// receipt of any signals, so the SIGQUIT will go to an m that hasn't seen it yet.
-			// When the last m receives the SIGQUIT, it will fall through to the call to
-			// crash below. Just in case the relaying gets botched, each m involved in
-			// the relay sleeps for 5 seconds and then does the crash/exit itself.
-			// In expected operation, the last m has received the SIGQUIT and run
-			// crash/exit and the process is gone, all long before any of the
-			// 5-second sleeps have finished.
-			print("\n-----\n\n")
-			raiseproc(_SIGQUIT)
-			usleep(5 * 1000 * 1000)
-		}
-		crash()
-	}
-
-	exit(2)
-}
diff --git a/src/runtime/signal_darwin.go b/src/runtime/signal_darwin.go
deleted file mode 100644
index 6cd1865..0000000
--- a/src/runtime/signal_darwin.go
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-type sigTabT struct {
-	flags int32
-	name  string
-}
-
-var sigtable = [...]sigTabT{
-	/* 0 */ {0, "SIGNONE: no trap"},
-	/* 1 */ {_SigNotify + _SigKill, "SIGHUP: terminal line hangup"},
-	/* 2 */ {_SigNotify + _SigKill, "SIGINT: interrupt"},
-	/* 3 */ {_SigNotify + _SigThrow, "SIGQUIT: quit"},
-	/* 4 */ {_SigThrow + _SigUnblock, "SIGILL: illegal instruction"},
-	/* 5 */ {_SigThrow + _SigUnblock, "SIGTRAP: trace trap"},
-	/* 6 */ {_SigNotify + _SigThrow, "SIGABRT: abort"},
-	/* 7 */ {_SigThrow, "SIGEMT: emulate instruction executed"},
-	/* 8 */ {_SigPanic + _SigUnblock, "SIGFPE: floating-point exception"},
-	/* 9 */ {0, "SIGKILL: kill"},
-	/* 10 */ {_SigPanic + _SigUnblock, "SIGBUS: bus error"},
-	/* 11 */ {_SigPanic + _SigUnblock, "SIGSEGV: segmentation violation"},
-	/* 12 */ {_SigThrow, "SIGSYS: bad system call"},
-	/* 13 */ {_SigNotify, "SIGPIPE: write to broken pipe"},
-	/* 14 */ {_SigNotify, "SIGALRM: alarm clock"},
-	/* 15 */ {_SigNotify + _SigKill, "SIGTERM: termination"},
-	/* 16 */ {_SigNotify, "SIGURG: urgent condition on socket"},
-	/* 17 */ {0, "SIGSTOP: stop"},
-	/* 18 */ {_SigNotify + _SigDefault, "SIGTSTP: keyboard stop"},
-	/* 19 */ {0, "SIGCONT: continue after stop"},
-	/* 20 */ {_SigNotify + _SigUnblock, "SIGCHLD: child status has changed"},
-	/* 21 */ {_SigNotify + _SigDefault, "SIGTTIN: background read from tty"},
-	/* 22 */ {_SigNotify + _SigDefault, "SIGTTOU: background write to tty"},
-	/* 23 */ {_SigNotify, "SIGIO: i/o now possible"},
-	/* 24 */ {_SigNotify, "SIGXCPU: cpu limit exceeded"},
-	/* 25 */ {_SigNotify, "SIGXFSZ: file size limit exceeded"},
-	/* 26 */ {_SigNotify, "SIGVTALRM: virtual alarm clock"},
-	/* 27 */ {_SigNotify + _SigUnblock, "SIGPROF: profiling alarm clock"},
-	/* 28 */ {_SigNotify, "SIGWINCH: window size change"},
-	/* 29 */ {_SigNotify, "SIGINFO: status request from keyboard"},
-	/* 30 */ {_SigNotify, "SIGUSR1: user-defined signal 1"},
-	/* 31 */ {_SigNotify, "SIGUSR2: user-defined signal 2"},
-}
-
-//go:noescape
-func sigfwd(fn uintptr, sig uint32, info *siginfo, ctx unsafe.Pointer)
-
-//go:noescape
-func sigreturn(ctx unsafe.Pointer, infostyle uint32)
-
-//go:nosplit
-func sigtrampgo(fn uintptr, infostyle, sig uint32, info *siginfo, ctx unsafe.Pointer) {
-	if sigfwdgo(sig, info, ctx) {
-		sigreturn(ctx, infostyle)
-		return
-	}
-	g := getg()
-	if g == nil {
-		badsignal(uintptr(sig))
-		sigreturn(ctx, infostyle)
-		return
-	}
-	setg(g.m.gsignal)
-	sighandler(sig, info, ctx, g)
-	setg(g)
-	sigreturn(ctx, infostyle)
-}
diff --git a/src/runtime/signal_darwin_386.go b/src/runtime/signal_darwin_386.go
deleted file mode 100644
index 302b3aa..0000000
--- a/src/runtime/signal_darwin_386.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-type sigctxt struct {
-	info *siginfo
-	ctxt unsafe.Pointer
-}
-
-func (c *sigctxt) regs() *regs32   { return &(*ucontext)(c.ctxt).uc_mcontext.ss }
-func (c *sigctxt) eax() uint32     { return c.regs().eax }
-func (c *sigctxt) ebx() uint32     { return c.regs().ebx }
-func (c *sigctxt) ecx() uint32     { return c.regs().ecx }
-func (c *sigctxt) edx() uint32     { return c.regs().edx }
-func (c *sigctxt) edi() uint32     { return c.regs().edi }
-func (c *sigctxt) esi() uint32     { return c.regs().esi }
-func (c *sigctxt) ebp() uint32     { return c.regs().ebp }
-func (c *sigctxt) esp() uint32     { return c.regs().esp }
-func (c *sigctxt) eip() uint32     { return c.regs().eip }
-func (c *sigctxt) eflags() uint32  { return c.regs().eflags }
-func (c *sigctxt) cs() uint32      { return c.regs().cs }
-func (c *sigctxt) fs() uint32      { return c.regs().fs }
-func (c *sigctxt) gs() uint32      { return c.regs().gs }
-func (c *sigctxt) sigcode() uint32 { return uint32(c.info.si_code) }
-func (c *sigctxt) sigaddr() uint32 { return c.info.si_addr }
-
-func (c *sigctxt) set_eip(x uint32)     { c.regs().eip = x }
-func (c *sigctxt) set_esp(x uint32)     { c.regs().esp = x }
-func (c *sigctxt) set_sigcode(x uint32) { c.info.si_code = int32(x) }
-func (c *sigctxt) set_sigaddr(x uint32) { c.info.si_addr = x }
diff --git a/src/runtime/signal_darwin_amd64.go b/src/runtime/signal_darwin_amd64.go
deleted file mode 100644
index dbf0448..0000000
--- a/src/runtime/signal_darwin_amd64.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-type sigctxt struct {
-	info *siginfo
-	ctxt unsafe.Pointer
-}
-
-func (c *sigctxt) regs() *regs64   { return &(*ucontext)(c.ctxt).uc_mcontext.ss }
-func (c *sigctxt) rax() uint64     { return c.regs().rax }
-func (c *sigctxt) rbx() uint64     { return c.regs().rbx }
-func (c *sigctxt) rcx() uint64     { return c.regs().rcx }
-func (c *sigctxt) rdx() uint64     { return c.regs().rdx }
-func (c *sigctxt) rdi() uint64     { return c.regs().rdi }
-func (c *sigctxt) rsi() uint64     { return c.regs().rsi }
-func (c *sigctxt) rbp() uint64     { return c.regs().rbp }
-func (c *sigctxt) rsp() uint64     { return c.regs().rsp }
-func (c *sigctxt) r8() uint64      { return c.regs().r8 }
-func (c *sigctxt) r9() uint64      { return c.regs().r9 }
-func (c *sigctxt) r10() uint64     { return c.regs().r10 }
-func (c *sigctxt) r11() uint64     { return c.regs().r11 }
-func (c *sigctxt) r12() uint64     { return c.regs().r12 }
-func (c *sigctxt) r13() uint64     { return c.regs().r13 }
-func (c *sigctxt) r14() uint64     { return c.regs().r14 }
-func (c *sigctxt) r15() uint64     { return c.regs().r15 }
-func (c *sigctxt) rip() uint64     { return c.regs().rip }
-func (c *sigctxt) rflags() uint64  { return c.regs().rflags }
-func (c *sigctxt) cs() uint64      { return c.regs().cs }
-func (c *sigctxt) fs() uint64      { return c.regs().fs }
-func (c *sigctxt) gs() uint64      { return c.regs().gs }
-func (c *sigctxt) sigcode() uint64 { return uint64(c.info.si_code) }
-func (c *sigctxt) sigaddr() uint64 { return c.info.si_addr }
-
-func (c *sigctxt) set_rip(x uint64)     { c.regs().rip = x }
-func (c *sigctxt) set_rsp(x uint64)     { c.regs().rsp = x }
-func (c *sigctxt) set_sigcode(x uint64) { c.info.si_code = int32(x) }
-func (c *sigctxt) set_sigaddr(x uint64) { c.info.si_addr = x }
diff --git a/src/runtime/signal_darwin_arm.go b/src/runtime/signal_darwin_arm.go
deleted file mode 100644
index 0f10971..0000000
--- a/src/runtime/signal_darwin_arm.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-type sigctxt struct {
-	info *siginfo
-	ctxt unsafe.Pointer
-}
-
-func (c *sigctxt) regs() *regs32   { return &(*ucontext)(c.ctxt).uc_mcontext.ss }
-func (c *sigctxt) r0() uint32      { return c.regs().r[0] }
-func (c *sigctxt) r1() uint32      { return c.regs().r[1] }
-func (c *sigctxt) r2() uint32      { return c.regs().r[2] }
-func (c *sigctxt) r3() uint32      { return c.regs().r[3] }
-func (c *sigctxt) r4() uint32      { return c.regs().r[4] }
-func (c *sigctxt) r5() uint32      { return c.regs().r[5] }
-func (c *sigctxt) r6() uint32      { return c.regs().r[6] }
-func (c *sigctxt) r7() uint32      { return c.regs().r[7] }
-func (c *sigctxt) r8() uint32      { return c.regs().r[8] }
-func (c *sigctxt) r9() uint32      { return c.regs().r[9] }
-func (c *sigctxt) r10() uint32     { return c.regs().r[10] }
-func (c *sigctxt) fp() uint32      { return c.regs().r[11] }
-func (c *sigctxt) ip() uint32      { return c.regs().r[12] }
-func (c *sigctxt) sp() uint32      { return c.regs().sp }
-func (c *sigctxt) lr() uint32      { return c.regs().lr }
-func (c *sigctxt) pc() uint32      { return c.regs().pc }
-func (c *sigctxt) cpsr() uint32    { return c.regs().cpsr }
-func (c *sigctxt) fault() uint32   { return c.info.si_addr }
-func (c *sigctxt) sigcode() uint32 { return uint32(c.info.si_code) }
-func (c *sigctxt) trap() uint32    { return 0 }
-func (c *sigctxt) error() uint32   { return 0 }
-func (c *sigctxt) oldmask() uint32 { return 0 }
-
-func (c *sigctxt) set_pc(x uint32)  { c.regs().pc = x }
-func (c *sigctxt) set_sp(x uint32)  { c.regs().sp = x }
-func (c *sigctxt) set_lr(x uint32)  { c.regs().lr = x }
-func (c *sigctxt) set_r10(x uint32) { c.regs().r[10] = x }
-
-func (c *sigctxt) set_sigcode(x uint32) { c.info.si_code = int32(x) }
-func (c *sigctxt) set_sigaddr(x uint32) { c.info.si_addr = x }
diff --git a/src/runtime/signal_darwin_arm64.go b/src/runtime/signal_darwin_arm64.go
deleted file mode 100644
index 2df4229..0000000
--- a/src/runtime/signal_darwin_arm64.go
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-type sigctxt struct {
-	info *siginfo
-	ctxt unsafe.Pointer
-}
-
-func (c *sigctxt) regs() *regs64 { return &(*ucontext)(c.ctxt).uc_mcontext.ss }
-func (c *sigctxt) r0() uint64    { return c.regs().x[0] }
-func (c *sigctxt) r1() uint64    { return c.regs().x[1] }
-func (c *sigctxt) r2() uint64    { return c.regs().x[2] }
-func (c *sigctxt) r3() uint64    { return c.regs().x[3] }
-func (c *sigctxt) r4() uint64    { return c.regs().x[4] }
-func (c *sigctxt) r5() uint64    { return c.regs().x[5] }
-func (c *sigctxt) r6() uint64    { return c.regs().x[6] }
-func (c *sigctxt) r7() uint64    { return c.regs().x[7] }
-func (c *sigctxt) r8() uint64    { return c.regs().x[8] }
-func (c *sigctxt) r9() uint64    { return c.regs().x[9] }
-func (c *sigctxt) r10() uint64   { return c.regs().x[10] }
-func (c *sigctxt) r11() uint64   { return c.regs().x[11] }
-func (c *sigctxt) r12() uint64   { return c.regs().x[12] }
-func (c *sigctxt) r13() uint64   { return c.regs().x[13] }
-func (c *sigctxt) r14() uint64   { return c.regs().x[14] }
-func (c *sigctxt) r15() uint64   { return c.regs().x[15] }
-func (c *sigctxt) r16() uint64   { return c.regs().x[16] }
-func (c *sigctxt) r17() uint64   { return c.regs().x[17] }
-func (c *sigctxt) r18() uint64   { return c.regs().x[18] }
-func (c *sigctxt) r19() uint64   { return c.regs().x[19] }
-func (c *sigctxt) r20() uint64   { return c.regs().x[20] }
-func (c *sigctxt) r21() uint64   { return c.regs().x[21] }
-func (c *sigctxt) r22() uint64   { return c.regs().x[22] }
-func (c *sigctxt) r23() uint64   { return c.regs().x[23] }
-func (c *sigctxt) r24() uint64   { return c.regs().x[24] }
-func (c *sigctxt) r25() uint64   { return c.regs().x[25] }
-func (c *sigctxt) r26() uint64   { return c.regs().x[26] }
-func (c *sigctxt) r27() uint64   { return c.regs().x[27] }
-func (c *sigctxt) r28() uint64   { return c.regs().x[28] }
-func (c *sigctxt) r29() uint64   { return c.regs().fp }
-func (c *sigctxt) lr() uint64    { return c.regs().lr }
-func (c *sigctxt) sp() uint64    { return c.regs().sp }
-func (c *sigctxt) pc() uint64    { return c.regs().pc }
-func (c *sigctxt) fault() uint64 { return uint64(uintptr(unsafe.Pointer(c.info.si_addr))) }
-
-func (c *sigctxt) sigcode() uint64 { return uint64(c.info.si_code) }
-func (c *sigctxt) sigaddr() uint64 { return uint64(uintptr(unsafe.Pointer(c.info.si_addr))) }
-
-func (c *sigctxt) set_pc(x uint64)  { c.regs().pc = x }
-func (c *sigctxt) set_sp(x uint64)  { c.regs().sp = x }
-func (c *sigctxt) set_lr(x uint64)  { c.regs().lr = x }
-func (c *sigctxt) set_r28(x uint64) { c.regs().x[28] = x }
-
-func (c *sigctxt) set_sigaddr(x uint64) {
-	c.info.si_addr = (*byte)(unsafe.Pointer(uintptr(x)))
-}
diff --git a/src/runtime/signal_dragonfly.go b/src/runtime/signal_dragonfly.go
deleted file mode 100644
index d37e11a..0000000
--- a/src/runtime/signal_dragonfly.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-type sigTabT struct {
-	flags int32
-	name  string
-}
-
-var sigtable = [...]sigTabT{
-	/* 0 */ {0, "SIGNONE: no trap"},
-	/* 1 */ {_SigNotify + _SigKill, "SIGHUP: terminal line hangup"},
-	/* 2 */ {_SigNotify + _SigKill, "SIGINT: interrupt"},
-	/* 3 */ {_SigNotify + _SigThrow, "SIGQUIT: quit"},
-	/* 4 */ {_SigThrow, "SIGILL: illegal instruction"},
-	/* 5 */ {_SigThrow, "SIGTRAP: trace trap"},
-	/* 6 */ {_SigNotify + _SigThrow, "SIGABRT: abort"},
-	/* 7 */ {_SigThrow, "SIGEMT: emulate instruction executed"},
-	/* 8 */ {_SigPanic, "SIGFPE: floating-point exception"},
-	/* 9 */ {0, "SIGKILL: kill"},
-	/* 10 */ {_SigPanic, "SIGBUS: bus error"},
-	/* 11 */ {_SigPanic, "SIGSEGV: segmentation violation"},
-	/* 12 */ {_SigThrow, "SIGSYS: bad system call"},
-	/* 13 */ {_SigNotify, "SIGPIPE: write to broken pipe"},
-	/* 14 */ {_SigNotify, "SIGALRM: alarm clock"},
-	/* 15 */ {_SigNotify + _SigKill, "SIGTERM: termination"},
-	/* 16 */ {_SigNotify, "SIGURG: urgent condition on socket"},
-	/* 17 */ {0, "SIGSTOP: stop"},
-	/* 18 */ {_SigNotify + _SigDefault, "SIGTSTP: keyboard stop"},
-	/* 19 */ {0, "SIGCONT: continue after stop"},
-	/* 20 */ {_SigNotify, "SIGCHLD: child status has changed"},
-	/* 21 */ {_SigNotify + _SigDefault, "SIGTTIN: background read from tty"},
-	/* 22 */ {_SigNotify + _SigDefault, "SIGTTOU: background write to tty"},
-	/* 23 */ {_SigNotify, "SIGIO: i/o now possible"},
-	/* 24 */ {_SigNotify, "SIGXCPU: cpu limit exceeded"},
-	/* 25 */ {_SigNotify, "SIGXFSZ: file size limit exceeded"},
-	/* 26 */ {_SigNotify, "SIGVTALRM: virtual alarm clock"},
-	/* 27 */ {_SigNotify, "SIGPROF: profiling alarm clock"},
-	/* 28 */ {_SigNotify, "SIGWINCH: window size change"},
-	/* 29 */ {_SigNotify, "SIGINFO: status request from keyboard"},
-	/* 30 */ {_SigNotify, "SIGUSR1: user-defined signal 1"},
-	/* 31 */ {_SigNotify, "SIGUSR2: user-defined signal 2"},
-	/* 32 */ {_SigNotify, "SIGTHR: reserved"},
-}
diff --git a/src/runtime/signal_dragonfly_amd64.go b/src/runtime/signal_dragonfly_amd64.go
deleted file mode 100644
index 740959c..0000000
--- a/src/runtime/signal_dragonfly_amd64.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-type sigctxt struct {
-	info *siginfo
-	ctxt unsafe.Pointer
-}
-
-func (c *sigctxt) regs() *mcontext {
-	return (*mcontext)(unsafe.Pointer(&(*ucontext)(c.ctxt).uc_mcontext))
-}
-func (c *sigctxt) rax() uint64     { return c.regs().mc_rax }
-func (c *sigctxt) rbx() uint64     { return c.regs().mc_rbx }
-func (c *sigctxt) rcx() uint64     { return c.regs().mc_rcx }
-func (c *sigctxt) rdx() uint64     { return c.regs().mc_rdx }
-func (c *sigctxt) rdi() uint64     { return c.regs().mc_rdi }
-func (c *sigctxt) rsi() uint64     { return c.regs().mc_rsi }
-func (c *sigctxt) rbp() uint64     { return c.regs().mc_rbp }
-func (c *sigctxt) rsp() uint64     { return c.regs().mc_rsp }
-func (c *sigctxt) r8() uint64      { return c.regs().mc_r8 }
-func (c *sigctxt) r9() uint64      { return c.regs().mc_r9 }
-func (c *sigctxt) r10() uint64     { return c.regs().mc_r10 }
-func (c *sigctxt) r11() uint64     { return c.regs().mc_r11 }
-func (c *sigctxt) r12() uint64     { return c.regs().mc_r12 }
-func (c *sigctxt) r13() uint64     { return c.regs().mc_r13 }
-func (c *sigctxt) r14() uint64     { return c.regs().mc_r14 }
-func (c *sigctxt) r15() uint64     { return c.regs().mc_r15 }
-func (c *sigctxt) rip() uint64     { return c.regs().mc_rip }
-func (c *sigctxt) rflags() uint64  { return c.regs().mc_rflags }
-func (c *sigctxt) cs() uint64      { return uint64(c.regs().mc_cs) }
-func (c *sigctxt) fs() uint64      { return uint64(c.regs().mc_ss) }
-func (c *sigctxt) gs() uint64      { return uint64(c.regs().mc_ss) }
-func (c *sigctxt) sigcode() uint64 { return uint64(c.info.si_code) }
-func (c *sigctxt) sigaddr() uint64 { return uint64(c.info.si_addr) }
-
-func (c *sigctxt) set_rip(x uint64)     { c.regs().mc_rip = x }
-func (c *sigctxt) set_rsp(x uint64)     { c.regs().mc_rsp = x }
-func (c *sigctxt) set_sigcode(x uint64) { c.info.si_code = int32(x) }
-func (c *sigctxt) set_sigaddr(x uint64) { c.info.si_addr = x }
diff --git a/src/runtime/signal_freebsd.go b/src/runtime/signal_freebsd.go
deleted file mode 100644
index 1dbdb1b..0000000
--- a/src/runtime/signal_freebsd.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-type sigTabT struct {
-	flags int32
-	name  string
-}
-
-var sigtable = [...]sigTabT{
-	/* 0 */ {0, "SIGNONE: no trap"},
-	/* 1 */ {_SigNotify + _SigKill, "SIGHUP: terminal line hangup"},
-	/* 2 */ {_SigNotify + _SigKill, "SIGINT: interrupt"},
-	/* 3 */ {_SigNotify + _SigThrow, "SIGQUIT: quit"},
-	/* 4 */ {_SigThrow, "SIGILL: illegal instruction"},
-	/* 5 */ {_SigThrow, "SIGTRAP: trace trap"},
-	/* 6 */ {_SigNotify + _SigThrow, "SIGABRT: abort"},
-	/* 7 */ {_SigThrow, "SIGEMT: emulate instruction executed"},
-	/* 8 */ {_SigPanic, "SIGFPE: floating-point exception"},
-	/* 9 */ {0, "SIGKILL: kill"},
-	/* 10 */ {_SigPanic, "SIGBUS: bus error"},
-	/* 11 */ {_SigPanic, "SIGSEGV: segmentation violation"},
-	/* 12 */ {_SigNotify, "SIGSYS: bad system call"},
-	/* 13 */ {_SigNotify, "SIGPIPE: write to broken pipe"},
-	/* 14 */ {_SigNotify, "SIGALRM: alarm clock"},
-	/* 15 */ {_SigNotify + _SigKill, "SIGTERM: termination"},
-	/* 16 */ {_SigNotify, "SIGURG: urgent condition on socket"},
-	/* 17 */ {0, "SIGSTOP: stop"},
-	/* 18 */ {_SigNotify + _SigDefault, "SIGTSTP: keyboard stop"},
-	/* 19 */ {0, "SIGCONT: continue after stop"},
-	/* 20 */ {_SigNotify, "SIGCHLD: child status has changed"},
-	/* 21 */ {_SigNotify + _SigDefault, "SIGTTIN: background read from tty"},
-	/* 22 */ {_SigNotify + _SigDefault, "SIGTTOU: background write to tty"},
-	/* 23 */ {_SigNotify, "SIGIO: i/o now possible"},
-	/* 24 */ {_SigNotify, "SIGXCPU: cpu limit exceeded"},
-	/* 25 */ {_SigNotify, "SIGXFSZ: file size limit exceeded"},
-	/* 26 */ {_SigNotify, "SIGVTALRM: virtual alarm clock"},
-	/* 27 */ {_SigNotify, "SIGPROF: profiling alarm clock"},
-	/* 28 */ {_SigNotify, "SIGWINCH: window size change"},
-	/* 29 */ {_SigNotify, "SIGINFO: status request from keyboard"},
-	/* 30 */ {_SigNotify, "SIGUSR1: user-defined signal 1"},
-	/* 31 */ {_SigNotify, "SIGUSR2: user-defined signal 2"},
-	/* 32 */ {_SigNotify, "SIGTHR: reserved"},
-}
diff --git a/src/runtime/signal_freebsd_386.go b/src/runtime/signal_freebsd_386.go
deleted file mode 100644
index a0fec13..0000000
--- a/src/runtime/signal_freebsd_386.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-type sigctxt struct {
-	info *siginfo
-	ctxt unsafe.Pointer
-}
-
-func (c *sigctxt) regs() *mcontext { return &(*ucontext)(c.ctxt).uc_mcontext }
-func (c *sigctxt) eax() uint32     { return c.regs().mc_eax }
-func (c *sigctxt) ebx() uint32     { return c.regs().mc_ebx }
-func (c *sigctxt) ecx() uint32     { return c.regs().mc_ecx }
-func (c *sigctxt) edx() uint32     { return c.regs().mc_edx }
-func (c *sigctxt) edi() uint32     { return c.regs().mc_edi }
-func (c *sigctxt) esi() uint32     { return c.regs().mc_esi }
-func (c *sigctxt) ebp() uint32     { return c.regs().mc_ebp }
-func (c *sigctxt) esp() uint32     { return c.regs().mc_esp }
-func (c *sigctxt) eip() uint32     { return c.regs().mc_eip }
-func (c *sigctxt) eflags() uint32  { return c.regs().mc_eflags }
-func (c *sigctxt) cs() uint32      { return uint32(c.regs().mc_cs) }
-func (c *sigctxt) fs() uint32      { return uint32(c.regs().mc_fs) }
-func (c *sigctxt) gs() uint32      { return uint32(c.regs().mc_gs) }
-func (c *sigctxt) sigcode() uint32 { return uint32(c.info.si_code) }
-func (c *sigctxt) sigaddr() uint32 { return uint32(c.info.si_addr) }
-
-func (c *sigctxt) set_eip(x uint32)     { c.regs().mc_eip = x }
-func (c *sigctxt) set_esp(x uint32)     { c.regs().mc_esp = x }
-func (c *sigctxt) set_sigcode(x uint32) { c.info.si_code = int32(x) }
-func (c *sigctxt) set_sigaddr(x uint32) { c.info.si_addr = uintptr(x) }
diff --git a/src/runtime/signal_freebsd_amd64.go b/src/runtime/signal_freebsd_amd64.go
deleted file mode 100644
index d10c883..0000000
--- a/src/runtime/signal_freebsd_amd64.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-type sigctxt struct {
-	info *siginfo
-	ctxt unsafe.Pointer
-}
-
-func (c *sigctxt) regs() *mcontext {
-	return (*mcontext)(unsafe.Pointer(&(*ucontext)(c.ctxt).uc_mcontext))
-}
-func (c *sigctxt) rax() uint64     { return c.regs().mc_rax }
-func (c *sigctxt) rbx() uint64     { return c.regs().mc_rbx }
-func (c *sigctxt) rcx() uint64     { return c.regs().mc_rcx }
-func (c *sigctxt) rdx() uint64     { return c.regs().mc_rdx }
-func (c *sigctxt) rdi() uint64     { return c.regs().mc_rdi }
-func (c *sigctxt) rsi() uint64     { return c.regs().mc_rsi }
-func (c *sigctxt) rbp() uint64     { return c.regs().mc_rbp }
-func (c *sigctxt) rsp() uint64     { return c.regs().mc_rsp }
-func (c *sigctxt) r8() uint64      { return c.regs().mc_r8 }
-func (c *sigctxt) r9() uint64      { return c.regs().mc_r9 }
-func (c *sigctxt) r10() uint64     { return c.regs().mc_r10 }
-func (c *sigctxt) r11() uint64     { return c.regs().mc_r11 }
-func (c *sigctxt) r12() uint64     { return c.regs().mc_r12 }
-func (c *sigctxt) r13() uint64     { return c.regs().mc_r13 }
-func (c *sigctxt) r14() uint64     { return c.regs().mc_r14 }
-func (c *sigctxt) r15() uint64     { return c.regs().mc_r15 }
-func (c *sigctxt) rip() uint64     { return c.regs().mc_rip }
-func (c *sigctxt) rflags() uint64  { return c.regs().mc_rflags }
-func (c *sigctxt) cs() uint64      { return uint64(c.regs().mc_cs) }
-func (c *sigctxt) fs() uint64      { return uint64(c.regs().mc_fs) }
-func (c *sigctxt) gs() uint64      { return uint64(c.regs().mc_gs) }
-func (c *sigctxt) sigcode() uint64 { return uint64(c.info.si_code) }
-func (c *sigctxt) sigaddr() uint64 { return uint64(c.info.si_addr) }
-
-func (c *sigctxt) set_rip(x uint64)     { c.regs().mc_rip = x }
-func (c *sigctxt) set_rsp(x uint64)     { c.regs().mc_rsp = x }
-func (c *sigctxt) set_sigcode(x uint64) { c.info.si_code = int32(x) }
-func (c *sigctxt) set_sigaddr(x uint64) { c.info.si_addr = x }
diff --git a/src/runtime/signal_freebsd_arm.go b/src/runtime/signal_freebsd_arm.go
deleted file mode 100644
index 12de23d..0000000
--- a/src/runtime/signal_freebsd_arm.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-type sigctxt struct {
-	info *siginfo
-	ctxt unsafe.Pointer
-}
-
-func (c *sigctxt) regs() *mcontext { return &(*ucontext)(c.ctxt).uc_mcontext }
-func (c *sigctxt) r0() uint32      { return c.regs().__gregs[0] }
-func (c *sigctxt) r1() uint32      { return c.regs().__gregs[1] }
-func (c *sigctxt) r2() uint32      { return c.regs().__gregs[2] }
-func (c *sigctxt) r3() uint32      { return c.regs().__gregs[3] }
-func (c *sigctxt) r4() uint32      { return c.regs().__gregs[4] }
-func (c *sigctxt) r5() uint32      { return c.regs().__gregs[5] }
-func (c *sigctxt) r6() uint32      { return c.regs().__gregs[6] }
-func (c *sigctxt) r7() uint32      { return c.regs().__gregs[7] }
-func (c *sigctxt) r8() uint32      { return c.regs().__gregs[8] }
-func (c *sigctxt) r9() uint32      { return c.regs().__gregs[9] }
-func (c *sigctxt) r10() uint32     { return c.regs().__gregs[10] }
-func (c *sigctxt) fp() uint32      { return c.regs().__gregs[11] }
-func (c *sigctxt) ip() uint32      { return c.regs().__gregs[12] }
-func (c *sigctxt) sp() uint32      { return c.regs().__gregs[13] }
-func (c *sigctxt) lr() uint32      { return c.regs().__gregs[14] }
-func (c *sigctxt) pc() uint32      { return c.regs().__gregs[15] }
-func (c *sigctxt) cpsr() uint32    { return c.regs().__gregs[16] }
-func (c *sigctxt) fault() uint32   { return uint32(c.info.si_addr) }
-func (c *sigctxt) trap() uint32    { return 0 }
-func (c *sigctxt) error() uint32   { return 0 }
-func (c *sigctxt) oldmask() uint32 { return 0 }
-
-func (c *sigctxt) sigcode() uint32 { return uint32(c.info.si_code) }
-func (c *sigctxt) sigaddr() uint32 { return uint32(c.info.si_addr) }
-
-func (c *sigctxt) set_pc(x uint32)  { c.regs().__gregs[15] = x }
-func (c *sigctxt) set_sp(x uint32)  { c.regs().__gregs[13] = x }
-func (c *sigctxt) set_lr(x uint32)  { c.regs().__gregs[14] = x }
-func (c *sigctxt) set_r10(x uint32) { c.regs().__gregs[10] = x }
-
-func (c *sigctxt) set_sigcode(x uint32) { c.info.si_code = int32(x) }
-func (c *sigctxt) set_sigaddr(x uint32) {
-	c.info.si_addr = uintptr(x)
-}
diff --git a/src/runtime/signal_linux.go b/src/runtime/signal_linux.go
deleted file mode 100644
index 2f25b59..0000000
--- a/src/runtime/signal_linux.go
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-type sigTabT struct {
-	flags int32
-	name  string
-}
-
-var sigtable = [...]sigTabT{
-	/* 0 */ {0, "SIGNONE: no trap"},
-	/* 1 */ {_SigNotify + _SigKill, "SIGHUP: terminal line hangup"},
-	/* 2 */ {_SigNotify + _SigKill, "SIGINT: interrupt"},
-	/* 3 */ {_SigNotify + _SigThrow, "SIGQUIT: quit"},
-	/* 4 */ {_SigThrow + _SigUnblock, "SIGILL: illegal instruction"},
-	/* 5 */ {_SigThrow + _SigUnblock, "SIGTRAP: trace trap"},
-	/* 6 */ {_SigNotify + _SigThrow, "SIGABRT: abort"},
-	/* 7 */ {_SigPanic + _SigUnblock, "SIGBUS: bus error"},
-	/* 8 */ {_SigPanic + _SigUnblock, "SIGFPE: floating-point exception"},
-	/* 9 */ {0, "SIGKILL: kill"},
-	/* 10 */ {_SigNotify, "SIGUSR1: user-defined signal 1"},
-	/* 11 */ {_SigPanic + _SigUnblock, "SIGSEGV: segmentation violation"},
-	/* 12 */ {_SigNotify, "SIGUSR2: user-defined signal 2"},
-	/* 13 */ {_SigNotify, "SIGPIPE: write to broken pipe"},
-	/* 14 */ {_SigNotify, "SIGALRM: alarm clock"},
-	/* 15 */ {_SigNotify + _SigKill, "SIGTERM: termination"},
-	/* 16 */ {_SigThrow + _SigUnblock, "SIGSTKFLT: stack fault"},
-	/* 17 */ {_SigNotify + _SigUnblock, "SIGCHLD: child status has changed"},
-	/* 18 */ {0, "SIGCONT: continue"},
-	/* 19 */ {0, "SIGSTOP: stop, unblockable"},
-	/* 20 */ {_SigNotify + _SigDefault, "SIGTSTP: keyboard stop"},
-	/* 21 */ {_SigNotify + _SigDefault, "SIGTTIN: background read from tty"},
-	/* 22 */ {_SigNotify + _SigDefault, "SIGTTOU: background write to tty"},
-	/* 23 */ {_SigNotify, "SIGURG: urgent condition on socket"},
-	/* 24 */ {_SigNotify, "SIGXCPU: cpu limit exceeded"},
-	/* 25 */ {_SigNotify, "SIGXFSZ: file size limit exceeded"},
-	/* 26 */ {_SigNotify, "SIGVTALRM: virtual alarm clock"},
-	/* 27 */ {_SigNotify + _SigUnblock, "SIGPROF: profiling alarm clock"},
-	/* 28 */ {_SigNotify, "SIGWINCH: window size change"},
-	/* 29 */ {_SigNotify, "SIGIO: i/o now possible"},
-	/* 30 */ {_SigNotify, "SIGPWR: power failure restart"},
-	/* 31 */ {_SigNotify, "SIGSYS: bad system call"},
-	/* 32 */ {_SigSetStack, "signal 32"}, /* SIGCANCEL; see issue 6997 */
-	/* 33 */ {_SigSetStack, "signal 33"}, /* SIGSETXID; see issue 3871, 9400 */
-	/* 34 */ {_SigNotify, "signal 34"},
-	/* 35 */ {_SigNotify, "signal 35"},
-	/* 36 */ {_SigNotify, "signal 36"},
-	/* 37 */ {_SigNotify, "signal 37"},
-	/* 38 */ {_SigNotify, "signal 38"},
-	/* 39 */ {_SigNotify, "signal 39"},
-	/* 40 */ {_SigNotify, "signal 40"},
-	/* 41 */ {_SigNotify, "signal 41"},
-	/* 42 */ {_SigNotify, "signal 42"},
-	/* 43 */ {_SigNotify, "signal 43"},
-	/* 44 */ {_SigNotify, "signal 44"},
-	/* 45 */ {_SigNotify, "signal 45"},
-	/* 46 */ {_SigNotify, "signal 46"},
-	/* 47 */ {_SigNotify, "signal 47"},
-	/* 48 */ {_SigNotify, "signal 48"},
-	/* 49 */ {_SigNotify, "signal 49"},
-	/* 50 */ {_SigNotify, "signal 50"},
-	/* 51 */ {_SigNotify, "signal 51"},
-	/* 52 */ {_SigNotify, "signal 52"},
-	/* 53 */ {_SigNotify, "signal 53"},
-	/* 54 */ {_SigNotify, "signal 54"},
-	/* 55 */ {_SigNotify, "signal 55"},
-	/* 56 */ {_SigNotify, "signal 56"},
-	/* 57 */ {_SigNotify, "signal 57"},
-	/* 58 */ {_SigNotify, "signal 58"},
-	/* 59 */ {_SigNotify, "signal 59"},
-	/* 60 */ {_SigNotify, "signal 60"},
-	/* 61 */ {_SigNotify, "signal 61"},
-	/* 62 */ {_SigNotify, "signal 62"},
-	/* 63 */ {_SigNotify, "signal 63"},
-	/* 64 */ {_SigNotify, "signal 64"},
-}
-
-// Continuation of the (assembly) sigtramp() logic.
-//go:nosplit
-func sigtrampgo(sig uint32, info *siginfo, ctx unsafe.Pointer) {
-	if sigfwdgo(sig, info, ctx) {
-		return
-	}
-	g := getg()
-	if g == nil {
-		badsignal(uintptr(sig))
-		return
-	}
-	setg(g.m.gsignal)
-	sighandler(sig, info, ctx, g)
-	setg(g)
-}
diff --git a/src/runtime/signal_linux_386.go b/src/runtime/signal_linux_386.go
deleted file mode 100644
index 085f66e..0000000
--- a/src/runtime/signal_linux_386.go
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-type sigctxt struct {
-	info *siginfo
-	ctxt unsafe.Pointer
-}
-
-func (c *sigctxt) regs() *sigcontext { return &(*ucontext)(c.ctxt).uc_mcontext }
-func (c *sigctxt) eax() uint32       { return c.regs().eax }
-func (c *sigctxt) ebx() uint32       { return c.regs().ebx }
-func (c *sigctxt) ecx() uint32       { return c.regs().ecx }
-func (c *sigctxt) edx() uint32       { return c.regs().edx }
-func (c *sigctxt) edi() uint32       { return c.regs().edi }
-func (c *sigctxt) esi() uint32       { return c.regs().esi }
-func (c *sigctxt) ebp() uint32       { return c.regs().ebp }
-func (c *sigctxt) esp() uint32       { return c.regs().esp }
-func (c *sigctxt) eip() uint32       { return c.regs().eip }
-func (c *sigctxt) eflags() uint32    { return c.regs().eflags }
-func (c *sigctxt) cs() uint32        { return uint32(c.regs().cs) }
-func (c *sigctxt) fs() uint32        { return uint32(c.regs().fs) }
-func (c *sigctxt) gs() uint32        { return uint32(c.regs().gs) }
-func (c *sigctxt) sigcode() uint32   { return uint32(c.info.si_code) }
-func (c *sigctxt) sigaddr() uint32   { return c.info.si_addr }
-
-func (c *sigctxt) set_eip(x uint32)     { c.regs().eip = x }
-func (c *sigctxt) set_esp(x uint32)     { c.regs().esp = x }
-func (c *sigctxt) set_sigcode(x uint32) { c.info.si_code = int32(x) }
-func (c *sigctxt) set_sigaddr(x uint32) {
-	*(*uintptr)(add(unsafe.Pointer(c.info), 2*ptrSize)) = uintptr(x)
-}
diff --git a/src/runtime/signal_linux_amd64.go b/src/runtime/signal_linux_amd64.go
deleted file mode 100644
index 5e339b8..0000000
--- a/src/runtime/signal_linux_amd64.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-type sigctxt struct {
-	info *siginfo
-	ctxt unsafe.Pointer
-}
-
-func (c *sigctxt) regs() *sigcontext {
-	return (*sigcontext)(unsafe.Pointer(&(*ucontext)(c.ctxt).uc_mcontext))
-}
-func (c *sigctxt) rax() uint64     { return c.regs().rax }
-func (c *sigctxt) rbx() uint64     { return c.regs().rbx }
-func (c *sigctxt) rcx() uint64     { return c.regs().rcx }
-func (c *sigctxt) rdx() uint64     { return c.regs().rdx }
-func (c *sigctxt) rdi() uint64     { return c.regs().rdi }
-func (c *sigctxt) rsi() uint64     { return c.regs().rsi }
-func (c *sigctxt) rbp() uint64     { return c.regs().rbp }
-func (c *sigctxt) rsp() uint64     { return c.regs().rsp }
-func (c *sigctxt) r8() uint64      { return c.regs().r8 }
-func (c *sigctxt) r9() uint64      { return c.regs().r9 }
-func (c *sigctxt) r10() uint64     { return c.regs().r10 }
-func (c *sigctxt) r11() uint64     { return c.regs().r11 }
-func (c *sigctxt) r12() uint64     { return c.regs().r12 }
-func (c *sigctxt) r13() uint64     { return c.regs().r13 }
-func (c *sigctxt) r14() uint64     { return c.regs().r14 }
-func (c *sigctxt) r15() uint64     { return c.regs().r15 }
-func (c *sigctxt) rip() uint64     { return c.regs().rip }
-func (c *sigctxt) rflags() uint64  { return c.regs().eflags }
-func (c *sigctxt) cs() uint64      { return uint64(c.regs().cs) }
-func (c *sigctxt) fs() uint64      { return uint64(c.regs().fs) }
-func (c *sigctxt) gs() uint64      { return uint64(c.regs().gs) }
-func (c *sigctxt) sigcode() uint64 { return uint64(c.info.si_code) }
-func (c *sigctxt) sigaddr() uint64 { return c.info.si_addr }
-
-func (c *sigctxt) set_rip(x uint64)     { c.regs().rip = x }
-func (c *sigctxt) set_rsp(x uint64)     { c.regs().rsp = x }
-func (c *sigctxt) set_sigcode(x uint64) { c.info.si_code = int32(x) }
-func (c *sigctxt) set_sigaddr(x uint64) {
-	*(*uintptr)(add(unsafe.Pointer(c.info), 2*ptrSize)) = uintptr(x)
-}
diff --git a/src/runtime/signal_linux_arm.go b/src/runtime/signal_linux_arm.go
deleted file mode 100644
index bdb4314..0000000
--- a/src/runtime/signal_linux_arm.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-type sigctxt struct {
-	info *siginfo
-	ctxt unsafe.Pointer
-}
-
-func (c *sigctxt) regs() *sigcontext { return &(*ucontext)(c.ctxt).uc_mcontext }
-func (c *sigctxt) r0() uint32        { return c.regs().r0 }
-func (c *sigctxt) r1() uint32        { return c.regs().r1 }
-func (c *sigctxt) r2() uint32        { return c.regs().r2 }
-func (c *sigctxt) r3() uint32        { return c.regs().r3 }
-func (c *sigctxt) r4() uint32        { return c.regs().r4 }
-func (c *sigctxt) r5() uint32        { return c.regs().r5 }
-func (c *sigctxt) r6() uint32        { return c.regs().r6 }
-func (c *sigctxt) r7() uint32        { return c.regs().r7 }
-func (c *sigctxt) r8() uint32        { return c.regs().r8 }
-func (c *sigctxt) r9() uint32        { return c.regs().r9 }
-func (c *sigctxt) r10() uint32       { return c.regs().r10 }
-func (c *sigctxt) fp() uint32        { return c.regs().fp }
-func (c *sigctxt) ip() uint32        { return c.regs().ip }
-func (c *sigctxt) sp() uint32        { return c.regs().sp }
-func (c *sigctxt) lr() uint32        { return c.regs().lr }
-func (c *sigctxt) pc() uint32        { return c.regs().pc }
-func (c *sigctxt) cpsr() uint32      { return c.regs().cpsr }
-func (c *sigctxt) fault() uint32     { return c.regs().fault_address }
-func (c *sigctxt) trap() uint32      { return c.regs().trap_no }
-func (c *sigctxt) error() uint32     { return c.regs().error_code }
-func (c *sigctxt) oldmask() uint32   { return c.regs().oldmask }
-
-func (c *sigctxt) sigcode() uint32 { return uint32(c.info.si_code) }
-func (c *sigctxt) sigaddr() uint32 { return c.info.si_addr }
-
-func (c *sigctxt) set_pc(x uint32)  { c.regs().pc = x }
-func (c *sigctxt) set_sp(x uint32)  { c.regs().sp = x }
-func (c *sigctxt) set_lr(x uint32)  { c.regs().lr = x }
-func (c *sigctxt) set_r10(x uint32) { c.regs().r10 = x }
-
-func (c *sigctxt) set_sigcode(x uint32) { c.info.si_code = int32(x) }
-func (c *sigctxt) set_sigaddr(x uint32) {
-	*(*uintptr)(add(unsafe.Pointer(c.info), 2*ptrSize)) = uintptr(x)
-}
diff --git a/src/runtime/signal_linux_arm64.go b/src/runtime/signal_linux_arm64.go
deleted file mode 100644
index 7d8b010..0000000
--- a/src/runtime/signal_linux_arm64.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-type sigctxt struct {
-	info *siginfo
-	ctxt unsafe.Pointer
-}
-
-func (c *sigctxt) regs() *sigcontext { return &(*ucontext)(c.ctxt).uc_mcontext }
-func (c *sigctxt) r0() uint64        { return c.regs().regs[0] }
-func (c *sigctxt) r1() uint64        { return c.regs().regs[1] }
-func (c *sigctxt) r2() uint64        { return c.regs().regs[2] }
-func (c *sigctxt) r3() uint64        { return c.regs().regs[3] }
-func (c *sigctxt) r4() uint64        { return c.regs().regs[4] }
-func (c *sigctxt) r5() uint64        { return c.regs().regs[5] }
-func (c *sigctxt) r6() uint64        { return c.regs().regs[6] }
-func (c *sigctxt) r7() uint64        { return c.regs().regs[7] }
-func (c *sigctxt) r8() uint64        { return c.regs().regs[8] }
-func (c *sigctxt) r9() uint64        { return c.regs().regs[9] }
-func (c *sigctxt) r10() uint64       { return c.regs().regs[10] }
-func (c *sigctxt) r11() uint64       { return c.regs().regs[11] }
-func (c *sigctxt) r12() uint64       { return c.regs().regs[12] }
-func (c *sigctxt) r13() uint64       { return c.regs().regs[13] }
-func (c *sigctxt) r14() uint64       { return c.regs().regs[14] }
-func (c *sigctxt) r15() uint64       { return c.regs().regs[15] }
-func (c *sigctxt) r16() uint64       { return c.regs().regs[16] }
-func (c *sigctxt) r17() uint64       { return c.regs().regs[17] }
-func (c *sigctxt) r18() uint64       { return c.regs().regs[18] }
-func (c *sigctxt) r19() uint64       { return c.regs().regs[19] }
-func (c *sigctxt) r20() uint64       { return c.regs().regs[20] }
-func (c *sigctxt) r21() uint64       { return c.regs().regs[21] }
-func (c *sigctxt) r22() uint64       { return c.regs().regs[22] }
-func (c *sigctxt) r23() uint64       { return c.regs().regs[23] }
-func (c *sigctxt) r24() uint64       { return c.regs().regs[24] }
-func (c *sigctxt) r25() uint64       { return c.regs().regs[25] }
-func (c *sigctxt) r26() uint64       { return c.regs().regs[26] }
-func (c *sigctxt) r27() uint64       { return c.regs().regs[27] }
-func (c *sigctxt) r28() uint64       { return c.regs().regs[28] }
-func (c *sigctxt) r29() uint64       { return c.regs().regs[29] }
-func (c *sigctxt) lr() uint64        { return c.regs().regs[30] }
-func (c *sigctxt) sp() uint64        { return c.regs().sp }
-func (c *sigctxt) pc() uint64        { return c.regs().pc }
-func (c *sigctxt) pstate() uint64    { return c.regs().pstate }
-func (c *sigctxt) fault() uint64     { return c.regs().fault_address }
-
-func (c *sigctxt) sigcode() uint64 { return uint64(c.info.si_code) }
-func (c *sigctxt) sigaddr() uint64 { return c.info.si_addr }
-
-func (c *sigctxt) set_pc(x uint64)  { c.regs().pc = x }
-func (c *sigctxt) set_sp(x uint64)  { c.regs().sp = x }
-func (c *sigctxt) set_lr(x uint64)  { c.regs().regs[30] = x }
-func (c *sigctxt) set_r28(x uint64) { c.regs().regs[28] = x }
-
-func (c *sigctxt) set_sigaddr(x uint64) {
-	*(*uintptr)(add(unsafe.Pointer(c.info), 2*ptrSize)) = uintptr(x)
-}
diff --git a/src/runtime/signal_linux_ppc64x.go b/src/runtime/signal_linux_ppc64x.go
deleted file mode 100644
index da3afc9..0000000
--- a/src/runtime/signal_linux_ppc64x.go
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-// +build ppc64 ppc64le
-
-package runtime
-
-import "unsafe"
-
-type sigctxt struct {
-	info *siginfo
-	ctxt unsafe.Pointer
-}
-
-func (c *sigctxt) regs() *ptregs { return (*ucontext)(c.ctxt).uc_mcontext.regs }
-func (c *sigctxt) r0() uint64    { return c.regs().gpr[0] }
-func (c *sigctxt) r1() uint64    { return c.regs().gpr[1] }
-func (c *sigctxt) r2() uint64    { return c.regs().gpr[2] }
-func (c *sigctxt) r3() uint64    { return c.regs().gpr[3] }
-func (c *sigctxt) r4() uint64    { return c.regs().gpr[4] }
-func (c *sigctxt) r5() uint64    { return c.regs().gpr[5] }
-func (c *sigctxt) r6() uint64    { return c.regs().gpr[6] }
-func (c *sigctxt) r7() uint64    { return c.regs().gpr[7] }
-func (c *sigctxt) r8() uint64    { return c.regs().gpr[8] }
-func (c *sigctxt) r9() uint64    { return c.regs().gpr[9] }
-func (c *sigctxt) r10() uint64   { return c.regs().gpr[10] }
-func (c *sigctxt) r11() uint64   { return c.regs().gpr[11] }
-func (c *sigctxt) r12() uint64   { return c.regs().gpr[12] }
-func (c *sigctxt) r13() uint64   { return c.regs().gpr[13] }
-func (c *sigctxt) r14() uint64   { return c.regs().gpr[14] }
-func (c *sigctxt) r15() uint64   { return c.regs().gpr[15] }
-func (c *sigctxt) r16() uint64   { return c.regs().gpr[16] }
-func (c *sigctxt) r17() uint64   { return c.regs().gpr[17] }
-func (c *sigctxt) r18() uint64   { return c.regs().gpr[18] }
-func (c *sigctxt) r19() uint64   { return c.regs().gpr[19] }
-func (c *sigctxt) r20() uint64   { return c.regs().gpr[20] }
-func (c *sigctxt) r21() uint64   { return c.regs().gpr[21] }
-func (c *sigctxt) r22() uint64   { return c.regs().gpr[22] }
-func (c *sigctxt) r23() uint64   { return c.regs().gpr[23] }
-func (c *sigctxt) r24() uint64   { return c.regs().gpr[24] }
-func (c *sigctxt) r25() uint64   { return c.regs().gpr[25] }
-func (c *sigctxt) r26() uint64   { return c.regs().gpr[26] }
-func (c *sigctxt) r27() uint64   { return c.regs().gpr[27] }
-func (c *sigctxt) r28() uint64   { return c.regs().gpr[28] }
-func (c *sigctxt) r29() uint64   { return c.regs().gpr[29] }
-func (c *sigctxt) r30() uint64   { return c.regs().gpr[30] }
-func (c *sigctxt) r31() uint64   { return c.regs().gpr[31] }
-func (c *sigctxt) sp() uint64    { return c.regs().gpr[1] }
-func (c *sigctxt) pc() uint64    { return c.regs().nip }
-func (c *sigctxt) trap() uint64  { return c.regs().trap }
-func (c *sigctxt) ctr() uint64   { return c.regs().ctr }
-func (c *sigctxt) link() uint64  { return c.regs().link }
-func (c *sigctxt) xer() uint64   { return c.regs().xer }
-func (c *sigctxt) ccr() uint64   { return c.regs().ccr }
-
-func (c *sigctxt) sigcode() uint32 { return uint32(c.info.si_code) }
-func (c *sigctxt) sigaddr() uint64 { return c.info.si_addr }
-func (c *sigctxt) fault() uint64   { return c.regs().dar }
-
-func (c *sigctxt) set_r0(x uint64)   { c.regs().gpr[0] = x }
-func (c *sigctxt) set_r30(x uint64)  { c.regs().gpr[30] = x }
-func (c *sigctxt) set_pc(x uint64)   { c.regs().nip = x }
-func (c *sigctxt) set_sp(x uint64)   { c.regs().gpr[1] = x }
-func (c *sigctxt) set_link(x uint64) { c.regs().link = x }
-
-func (c *sigctxt) set_sigcode(x uint32) { c.info.si_code = int32(x) }
-func (c *sigctxt) set_sigaddr(x uint64) {
-	*(*uintptr)(add(unsafe.Pointer(c.info), 2*ptrSize)) = uintptr(x)
-}
diff --git a/src/runtime/signal_nacl.go b/src/runtime/signal_nacl.go
deleted file mode 100644
index 122648b..0000000
--- a/src/runtime/signal_nacl.go
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-type sigTabT struct {
-	flags int32
-	name  string
-}
-
-var sigtable = [...]sigTabT{
-	/* 0 */ {0, "SIGNONE: no trap"},
-	/* 1 */ {_SigNotify + _SigKill, "SIGHUP: terminal line hangup"},
-	/* 2 */ {_SigNotify + _SigKill, "SIGINT: interrupt"},
-	/* 3 */ {_SigNotify + _SigThrow, "SIGQUIT: quit"},
-	/* 4 */ {_SigThrow, "SIGILL: illegal instruction"},
-	/* 5 */ {_SigThrow, "SIGTRAP: trace trap"},
-	/* 6 */ {_SigNotify + _SigThrow, "SIGABRT: abort"},
-	/* 7 */ {_SigThrow, "SIGEMT: emulate instruction executed"},
-	/* 8 */ {_SigPanic, "SIGFPE: floating-point exception"},
-	/* 9 */ {0, "SIGKILL: kill"},
-	/* 10 */ {_SigPanic, "SIGBUS: bus error"},
-	/* 11 */ {_SigPanic, "SIGSEGV: segmentation violation"},
-	/* 12 */ {_SigThrow, "SIGSYS: bad system call"},
-	/* 13 */ {_SigNotify, "SIGPIPE: write to broken pipe"},
-	/* 14 */ {_SigNotify, "SIGALRM: alarm clock"},
-	/* 15 */ {_SigNotify + _SigKill, "SIGTERM: termination"},
-	/* 16 */ {_SigNotify, "SIGURG: urgent condition on socket"},
-	/* 17 */ {0, "SIGSTOP: stop"},
-	/* 18 */ {_SigNotify + _SigDefault, "SIGTSTP: keyboard stop"},
-	/* 19 */ {0, "SIGCONT: continue after stop"},
-	/* 20 */ {_SigNotify, "SIGCHLD: child status has changed"},
-	/* 21 */ {_SigNotify + _SigDefault, "SIGTTIN: background read from tty"},
-	/* 22 */ {_SigNotify + _SigDefault, "SIGTTOU: background write to tty"},
-	/* 23 */ {_SigNotify, "SIGIO: i/o now possible"},
-	/* 24 */ {_SigNotify, "SIGXCPU: cpu limit exceeded"},
-	/* 25 */ {_SigNotify, "SIGXFSZ: file size limit exceeded"},
-	/* 26 */ {_SigNotify, "SIGVTALRM: virtual alarm clock"},
-	/* 27 */ {_SigNotify, "SIGPROF: profiling alarm clock"},
-	/* 28 */ {_SigNotify, "SIGWINCH: window size change"},
-	/* 29 */ {_SigNotify, "SIGINFO: status request from keyboard"},
-	/* 30 */ {_SigNotify, "SIGUSR1: user-defined signal 1"},
-	/* 31 */ {_SigNotify, "SIGUSR2: user-defined signal 2"},
-}
diff --git a/src/runtime/signal_nacl_386.go b/src/runtime/signal_nacl_386.go
deleted file mode 100644
index 0a1e7c6..0000000
--- a/src/runtime/signal_nacl_386.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-type sigctxt struct {
-	info *siginfo
-	ctxt unsafe.Pointer
-}
-
-func (c *sigctxt) regs() *excregs386 { return &(*exccontext)(c.ctxt).regs }
-func (c *sigctxt) eax() uint32       { return c.regs().eax }
-func (c *sigctxt) ebx() uint32       { return c.regs().ebx }
-func (c *sigctxt) ecx() uint32       { return c.regs().ecx }
-func (c *sigctxt) edx() uint32       { return c.regs().edx }
-func (c *sigctxt) edi() uint32       { return c.regs().edi }
-func (c *sigctxt) esi() uint32       { return c.regs().esi }
-func (c *sigctxt) ebp() uint32       { return c.regs().ebp }
-func (c *sigctxt) esp() uint32       { return c.regs().esp }
-func (c *sigctxt) eip() uint32       { return c.regs().eip }
-func (c *sigctxt) eflags() uint32    { return c.regs().eflags }
-func (c *sigctxt) cs() uint32        { return ^uint32(0) }
-func (c *sigctxt) fs() uint32        { return ^uint32(0) }
-func (c *sigctxt) gs() uint32        { return ^uint32(0) }
-func (c *sigctxt) sigcode() uint32   { return ^uint32(0) }
-func (c *sigctxt) sigaddr() uint32   { return 0 }
-
-func (c *sigctxt) set_eip(x uint32)     { c.regs().eip = x }
-func (c *sigctxt) set_esp(x uint32)     { c.regs().esp = x }
-func (c *sigctxt) set_sigcode(x uint32) {}
-func (c *sigctxt) set_sigaddr(x uint32) {}
diff --git a/src/runtime/signal_nacl_amd64p32.go b/src/runtime/signal_nacl_amd64p32.go
deleted file mode 100644
index 024ceba..0000000
--- a/src/runtime/signal_nacl_amd64p32.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-type sigctxt struct {
-	info *siginfo
-	ctxt unsafe.Pointer
-}
-
-func (c *sigctxt) regs() *excregsamd64 {
-	return &(*exccontext)(c.ctxt).regs
-}
-func (c *sigctxt) rax() uint64     { return c.regs().rax }
-func (c *sigctxt) rbx() uint64     { return c.regs().rbx }
-func (c *sigctxt) rcx() uint64     { return c.regs().rcx }
-func (c *sigctxt) rdx() uint64     { return c.regs().rdx }
-func (c *sigctxt) rdi() uint64     { return c.regs().rdi }
-func (c *sigctxt) rsi() uint64     { return c.regs().rsi }
-func (c *sigctxt) rbp() uint64     { return c.regs().rbp }
-func (c *sigctxt) rsp() uint64     { return c.regs().rsp }
-func (c *sigctxt) r8() uint64      { return c.regs().r8 }
-func (c *sigctxt) r9() uint64      { return c.regs().r9 }
-func (c *sigctxt) r10() uint64     { return c.regs().r10 }
-func (c *sigctxt) r11() uint64     { return c.regs().r11 }
-func (c *sigctxt) r12() uint64     { return c.regs().r12 }
-func (c *sigctxt) r13() uint64     { return c.regs().r13 }
-func (c *sigctxt) r14() uint64     { return c.regs().r14 }
-func (c *sigctxt) r15() uint64     { return c.regs().r15 }
-func (c *sigctxt) rip() uint64     { return c.regs().rip }
-func (c *sigctxt) rflags() uint64  { return uint64(c.regs().rflags) }
-func (c *sigctxt) cs() uint64      { return ^uint64(0) }
-func (c *sigctxt) fs() uint64      { return ^uint64(0) }
-func (c *sigctxt) gs() uint64      { return ^uint64(0) }
-func (c *sigctxt) sigcode() uint64 { return ^uint64(0) }
-func (c *sigctxt) sigaddr() uint64 { return 0 }
-
-func (c *sigctxt) set_rip(x uint64)     { c.regs().rip = x }
-func (c *sigctxt) set_rsp(x uint64)     { c.regs().rsp = x }
-func (c *sigctxt) set_sigcode(x uint64) {}
-func (c *sigctxt) set_sigaddr(x uint64) {}
diff --git a/src/runtime/signal_nacl_arm.go b/src/runtime/signal_nacl_arm.go
deleted file mode 100644
index 1aeaa4e..0000000
--- a/src/runtime/signal_nacl_arm.go
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-type sigctxt struct {
-	info *siginfo
-	ctxt unsafe.Pointer
-}
-
-func (c *sigctxt) regs() *excregsarm { return &(*exccontext)(c.ctxt).regs }
-
-func (c *sigctxt) r0() uint32      { return c.regs().r0 }
-func (c *sigctxt) r1() uint32      { return c.regs().r1 }
-func (c *sigctxt) r2() uint32      { return c.regs().r2 }
-func (c *sigctxt) r3() uint32      { return c.regs().r3 }
-func (c *sigctxt) r4() uint32      { return c.regs().r4 }
-func (c *sigctxt) r5() uint32      { return c.regs().r5 }
-func (c *sigctxt) r6() uint32      { return c.regs().r6 }
-func (c *sigctxt) r7() uint32      { return c.regs().r7 }
-func (c *sigctxt) r8() uint32      { return c.regs().r8 }
-func (c *sigctxt) r9() uint32      { return c.regs().r9 }
-func (c *sigctxt) r10() uint32     { return c.regs().r10 }
-func (c *sigctxt) fp() uint32      { return c.regs().r11 }
-func (c *sigctxt) ip() uint32      { return c.regs().r12 }
-func (c *sigctxt) sp() uint32      { return c.regs().sp }
-func (c *sigctxt) lr() uint32      { return c.regs().lr }
-func (c *sigctxt) pc() uint32      { return c.regs().pc }
-func (c *sigctxt) cpsr() uint32    { return c.regs().cpsr }
-func (c *sigctxt) fault() uint32   { return ^uint32(0) }
-func (c *sigctxt) trap() uint32    { return ^uint32(0) }
-func (c *sigctxt) error() uint32   { return ^uint32(0) }
-func (c *sigctxt) oldmask() uint32 { return ^uint32(0) }
-
-func (c *sigctxt) sigcode() uint32 { return 0 }
-func (c *sigctxt) sigaddr() uint32 { return 0 }
-
-func (c *sigctxt) set_pc(x uint32)  { c.regs().pc = x }
-func (c *sigctxt) set_sp(x uint32)  { c.regs().sp = x }
-func (c *sigctxt) set_lr(x uint32)  { c.regs().lr = x }
-func (c *sigctxt) set_r10(x uint32) { c.regs().r10 = x }
-
-func (c *sigctxt) set_sigcode(x uint32) {}
-func (c *sigctxt) set_sigaddr(x uint32) {}
diff --git a/src/runtime/signal_netbsd.go b/src/runtime/signal_netbsd.go
deleted file mode 100644
index d93a450..0000000
--- a/src/runtime/signal_netbsd.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-type sigTabT struct {
-	flags int32
-	name  string
-}
-
-var sigtable = [...]sigTabT{
-	/*  0 */ {0, "SIGNONE: no trap"},
-	/*  1 */ {_SigNotify + _SigKill, "SIGHUP: terminal line hangup"},
-	/*  2 */ {_SigNotify + _SigKill, "SIGINT: interrupt"},
-	/*  3 */ {_SigNotify + _SigThrow, "SIGQUIT: quit"},
-	/*  4 */ {_SigThrow + _SigUnblock, "SIGILL: illegal instruction"},
-	/*  5 */ {_SigThrow + _SigUnblock, "SIGTRAP: trace trap"},
-	/*  6 */ {_SigNotify + _SigThrow, "SIGABRT: abort"},
-	/*  7 */ {_SigThrow, "SIGEMT: emulate instruction executed"},
-	/*  8 */ {_SigPanic + _SigUnblock, "SIGFPE: floating-point exception"},
-	/*  9 */ {0, "SIGKILL: kill"},
-	/* 10 */ {_SigPanic + _SigUnblock, "SIGBUS: bus error"},
-	/* 11 */ {_SigPanic + _SigUnblock, "SIGSEGV: segmentation violation"},
-	/* 12 */ {_SigThrow, "SIGSYS: bad system call"},
-	/* 13 */ {_SigNotify, "SIGPIPE: write to broken pipe"},
-	/* 14 */ {_SigNotify, "SIGALRM: alarm clock"},
-	/* 15 */ {_SigNotify + _SigKill, "SIGTERM: termination"},
-	/* 16 */ {_SigNotify, "SIGURG: urgent condition on socket"},
-	/* 17 */ {0, "SIGSTOP: stop"},
-	/* 18 */ {_SigNotify + _SigDefault, "SIGTSTP: keyboard stop"},
-	/* 19 */ {0, "SIGCONT: continue after stop"},
-	/* 20 */ {_SigNotify + _SigUnblock, "SIGCHLD: child status has changed"},
-	/* 21 */ {_SigNotify + _SigDefault, "SIGTTIN: background read from tty"},
-	/* 22 */ {_SigNotify + _SigDefault, "SIGTTOU: background write to tty"},
-	/* 23 */ {_SigNotify, "SIGIO: i/o now possible"},
-	/* 24 */ {_SigNotify, "SIGXCPU: cpu limit exceeded"},
-	/* 25 */ {_SigNotify, "SIGXFSZ: file size limit exceeded"},
-	/* 26 */ {_SigNotify, "SIGVTALRM: virtual alarm clock"},
-	/* 27 */ {_SigNotify + _SigUnblock, "SIGPROF: profiling alarm clock"},
-	/* 28 */ {_SigNotify, "SIGWINCH: window size change"},
-	/* 29 */ {_SigNotify, "SIGINFO: status request from keyboard"},
-	/* 30 */ {_SigNotify, "SIGUSR1: user-defined signal 1"},
-	/* 31 */ {_SigNotify, "SIGUSR2: user-defined signal 2"},
-	/* 32 */ {_SigNotify, "SIGTHR: reserved"},
-}
diff --git a/src/runtime/signal_netbsd_386.go b/src/runtime/signal_netbsd_386.go
deleted file mode 100644
index 6702336..0000000
--- a/src/runtime/signal_netbsd_386.go
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-type sigctxt struct {
-	info *siginfo
-	ctxt unsafe.Pointer
-}
-
-func (c *sigctxt) regs() *mcontextt { return &(*ucontextt)(c.ctxt).uc_mcontext }
-func (c *sigctxt) eax() uint32      { return c.regs().__gregs[_REG_EAX] }
-func (c *sigctxt) ebx() uint32      { return c.regs().__gregs[_REG_EBX] }
-func (c *sigctxt) ecx() uint32      { return c.regs().__gregs[_REG_ECX] }
-func (c *sigctxt) edx() uint32      { return c.regs().__gregs[_REG_EDX] }
-func (c *sigctxt) edi() uint32      { return c.regs().__gregs[_REG_EDI] }
-func (c *sigctxt) esi() uint32      { return c.regs().__gregs[_REG_ESI] }
-func (c *sigctxt) ebp() uint32      { return c.regs().__gregs[_REG_EBP] }
-func (c *sigctxt) esp() uint32      { return c.regs().__gregs[_REG_UESP] }
-func (c *sigctxt) eip() uint32      { return c.regs().__gregs[_REG_EIP] }
-func (c *sigctxt) eflags() uint32   { return c.regs().__gregs[_REG_EFL] }
-func (c *sigctxt) cs() uint32       { return uint32(c.regs().__gregs[_REG_CS]) }
-func (c *sigctxt) fs() uint32       { return uint32(c.regs().__gregs[_REG_FS]) }
-func (c *sigctxt) gs() uint32       { return uint32(c.regs().__gregs[_REG_GS]) }
-func (c *sigctxt) sigcode() uint32  { return uint32(c.info._code) }
-func (c *sigctxt) sigaddr() uint32 {
-	return uint32(*(*uint32)(unsafe.Pointer(&c.info._reason[0])))
-}
-
-func (c *sigctxt) set_eip(x uint32)     { c.regs().__gregs[_REG_EIP] = x }
-func (c *sigctxt) set_esp(x uint32)     { c.regs().__gregs[_REG_UESP] = x }
-func (c *sigctxt) set_sigcode(x uint32) { c.info._code = int32(x) }
-func (c *sigctxt) set_sigaddr(x uint32) {
-	*(*uint32)(unsafe.Pointer(&c.info._reason[0])) = x
-}
diff --git a/src/runtime/signal_netbsd_amd64.go b/src/runtime/signal_netbsd_amd64.go
deleted file mode 100644
index e22f4a7..0000000
--- a/src/runtime/signal_netbsd_amd64.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-type sigctxt struct {
-	info *siginfo
-	ctxt unsafe.Pointer
-}
-
-func (c *sigctxt) regs() *mcontextt {
-	return (*mcontextt)(unsafe.Pointer(&(*ucontextt)(c.ctxt).uc_mcontext))
-}
-func (c *sigctxt) rax() uint64     { return c.regs().__gregs[_REG_RAX] }
-func (c *sigctxt) rbx() uint64     { return c.regs().__gregs[_REG_RBX] }
-func (c *sigctxt) rcx() uint64     { return c.regs().__gregs[_REG_RCX] }
-func (c *sigctxt) rdx() uint64     { return c.regs().__gregs[_REG_RDX] }
-func (c *sigctxt) rdi() uint64     { return c.regs().__gregs[_REG_RDI] }
-func (c *sigctxt) rsi() uint64     { return c.regs().__gregs[_REG_RSI] }
-func (c *sigctxt) rbp() uint64     { return c.regs().__gregs[_REG_RBP] }
-func (c *sigctxt) rsp() uint64     { return c.regs().__gregs[_REG_RSP] }
-func (c *sigctxt) r8() uint64      { return c.regs().__gregs[_REG_R8] }
-func (c *sigctxt) r9() uint64      { return c.regs().__gregs[_REG_R8] }
-func (c *sigctxt) r10() uint64     { return c.regs().__gregs[_REG_R10] }
-func (c *sigctxt) r11() uint64     { return c.regs().__gregs[_REG_R11] }
-func (c *sigctxt) r12() uint64     { return c.regs().__gregs[_REG_R12] }
-func (c *sigctxt) r13() uint64     { return c.regs().__gregs[_REG_R13] }
-func (c *sigctxt) r14() uint64     { return c.regs().__gregs[_REG_R14] }
-func (c *sigctxt) r15() uint64     { return c.regs().__gregs[_REG_R15] }
-func (c *sigctxt) rip() uint64     { return c.regs().__gregs[_REG_RIP] }
-func (c *sigctxt) rflags() uint64  { return c.regs().__gregs[_REG_RFLAGS] }
-func (c *sigctxt) cs() uint64      { return c.regs().__gregs[_REG_CS] }
-func (c *sigctxt) fs() uint64      { return c.regs().__gregs[_REG_FS] }
-func (c *sigctxt) gs() uint64      { return c.regs().__gregs[_REG_GS] }
-func (c *sigctxt) sigcode() uint64 { return uint64(c.info._code) }
-func (c *sigctxt) sigaddr() uint64 {
-	return uint64(*(*uint64)(unsafe.Pointer(&c.info._reason[0])))
-}
-
-func (c *sigctxt) set_rip(x uint64)     { c.regs().__gregs[_REG_RIP] = x }
-func (c *sigctxt) set_rsp(x uint64)     { c.regs().__gregs[_REG_RSP] = x }
-func (c *sigctxt) set_sigcode(x uint64) { c.info._code = int32(x) }
-func (c *sigctxt) set_sigaddr(x uint64) {
-	*(*uint64)(unsafe.Pointer(&c.info._reason[0])) = x
-}
diff --git a/src/runtime/signal_netbsd_arm.go b/src/runtime/signal_netbsd_arm.go
deleted file mode 100644
index 9b114c8..0000000
--- a/src/runtime/signal_netbsd_arm.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-type sigctxt struct {
-	info *siginfo
-	ctxt unsafe.Pointer
-}
-
-func (c *sigctxt) regs() *mcontextt { return &(*ucontextt)(c.ctxt).uc_mcontext }
-func (c *sigctxt) r0() uint32       { return c.regs().__gregs[_REG_R0] }
-func (c *sigctxt) r1() uint32       { return c.regs().__gregs[_REG_R1] }
-func (c *sigctxt) r2() uint32       { return c.regs().__gregs[_REG_R2] }
-func (c *sigctxt) r3() uint32       { return c.regs().__gregs[_REG_R3] }
-func (c *sigctxt) r4() uint32       { return c.regs().__gregs[_REG_R4] }
-func (c *sigctxt) r5() uint32       { return c.regs().__gregs[_REG_R5] }
-func (c *sigctxt) r6() uint32       { return c.regs().__gregs[_REG_R6] }
-func (c *sigctxt) r7() uint32       { return c.regs().__gregs[_REG_R7] }
-func (c *sigctxt) r8() uint32       { return c.regs().__gregs[_REG_R8] }
-func (c *sigctxt) r9() uint32       { return c.regs().__gregs[_REG_R9] }
-func (c *sigctxt) r10() uint32      { return c.regs().__gregs[_REG_R10] }
-func (c *sigctxt) fp() uint32       { return c.regs().__gregs[_REG_R11] }
-func (c *sigctxt) ip() uint32       { return c.regs().__gregs[_REG_R12] }
-func (c *sigctxt) sp() uint32       { return c.regs().__gregs[_REG_R13] }
-func (c *sigctxt) lr() uint32       { return c.regs().__gregs[_REG_R14] }
-func (c *sigctxt) pc() uint32       { return c.regs().__gregs[_REG_R15] }
-func (c *sigctxt) cpsr() uint32     { return c.regs().__gregs[_REG_CPSR] }
-func (c *sigctxt) fault() uint32    { return uint32(c.info._reason) }
-func (c *sigctxt) trap() uint32     { return 0 }
-func (c *sigctxt) error() uint32    { return 0 }
-func (c *sigctxt) oldmask() uint32  { return 0 }
-
-func (c *sigctxt) sigcode() uint32 { return uint32(c.info._code) }
-func (c *sigctxt) sigaddr() uint32 { return uint32(c.info._reason) }
-
-func (c *sigctxt) set_pc(x uint32)  { c.regs().__gregs[_REG_R15] = x }
-func (c *sigctxt) set_sp(x uint32)  { c.regs().__gregs[_REG_R13] = x }
-func (c *sigctxt) set_lr(x uint32)  { c.regs().__gregs[_REG_R14] = x }
-func (c *sigctxt) set_r10(x uint32) { c.regs().__gregs[_REG_R10] = x }
-
-func (c *sigctxt) set_sigcode(x uint32) { c.info._code = int32(x) }
-func (c *sigctxt) set_sigaddr(x uint32) {
-	c.info._reason = uintptr(x)
-}
diff --git a/src/runtime/signal_openbsd.go b/src/runtime/signal_openbsd.go
deleted file mode 100644
index 78afc59..0000000
--- a/src/runtime/signal_openbsd.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-type sigTabT struct {
-	flags int32
-	name  string
-}
-
-var sigtable = [...]sigTabT{
-	/*  0 */ {0, "SIGNONE: no trap"},
-	/*  1 */ {_SigNotify + _SigKill, "SIGHUP: terminal line hangup"},
-	/*  2 */ {_SigNotify + _SigKill, "SIGINT: interrupt"},
-	/*  3 */ {_SigNotify + _SigThrow, "SIGQUIT: quit"},
-	/*  4 */ {_SigThrow, "SIGILL: illegal instruction"},
-	/*  5 */ {_SigThrow, "SIGTRAP: trace trap"},
-	/*  6 */ {_SigNotify + _SigThrow, "SIGABRT: abort"},
-	/*  7 */ {_SigThrow, "SIGEMT: emulate instruction executed"},
-	/*  8 */ {_SigPanic, "SIGFPE: floating-point exception"},
-	/*  9 */ {0, "SIGKILL: kill"},
-	/* 10 */ {_SigPanic, "SIGBUS: bus error"},
-	/* 11 */ {_SigPanic, "SIGSEGV: segmentation violation"},
-	/* 12 */ {_SigThrow, "SIGSYS: bad system call"},
-	/* 13 */ {_SigNotify, "SIGPIPE: write to broken pipe"},
-	/* 14 */ {_SigNotify, "SIGALRM: alarm clock"},
-	/* 15 */ {_SigNotify + _SigKill, "SIGTERM: termination"},
-	/* 16 */ {_SigNotify, "SIGURG: urgent condition on socket"},
-	/* 17 */ {0, "SIGSTOP: stop"},
-	/* 18 */ {_SigNotify + _SigDefault, "SIGTSTP: keyboard stop"},
-	/* 19 */ {0, "SIGCONT: continue after stop"},
-	/* 20 */ {_SigNotify, "SIGCHLD: child status has changed"},
-	/* 21 */ {_SigNotify + _SigDefault, "SIGTTIN: background read from tty"},
-	/* 22 */ {_SigNotify + _SigDefault, "SIGTTOU: background write to tty"},
-	/* 23 */ {_SigNotify, "SIGIO: i/o now possible"},
-	/* 24 */ {_SigNotify, "SIGXCPU: cpu limit exceeded"},
-	/* 25 */ {_SigNotify, "SIGXFSZ: file size limit exceeded"},
-	/* 26 */ {_SigNotify, "SIGVTALRM: virtual alarm clock"},
-	/* 27 */ {_SigNotify, "SIGPROF: profiling alarm clock"},
-	/* 28 */ {_SigNotify, "SIGWINCH: window size change"},
-	/* 29 */ {_SigNotify, "SIGINFO: status request from keyboard"},
-	/* 30 */ {_SigNotify, "SIGUSR1: user-defined signal 1"},
-	/* 31 */ {_SigNotify, "SIGUSR2: user-defined signal 2"},
-	/* 32 */ {_SigNotify, "SIGTHR: reserved"},
-}
diff --git a/src/runtime/signal_openbsd_386.go b/src/runtime/signal_openbsd_386.go
deleted file mode 100644
index c582a449..0000000
--- a/src/runtime/signal_openbsd_386.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-type sigctxt struct {
-	info *siginfo
-	ctxt unsafe.Pointer
-}
-
-func (c *sigctxt) regs() *sigcontext {
-	return (*sigcontext)(c.ctxt)
-}
-
-func (c *sigctxt) eax() uint32     { return c.regs().sc_eax }
-func (c *sigctxt) ebx() uint32     { return c.regs().sc_ebx }
-func (c *sigctxt) ecx() uint32     { return c.regs().sc_ecx }
-func (c *sigctxt) edx() uint32     { return c.regs().sc_edx }
-func (c *sigctxt) edi() uint32     { return c.regs().sc_edi }
-func (c *sigctxt) esi() uint32     { return c.regs().sc_esi }
-func (c *sigctxt) ebp() uint32     { return c.regs().sc_ebp }
-func (c *sigctxt) esp() uint32     { return c.regs().sc_esp }
-func (c *sigctxt) eip() uint32     { return c.regs().sc_eip }
-func (c *sigctxt) eflags() uint32  { return c.regs().sc_eflags }
-func (c *sigctxt) cs() uint32      { return c.regs().sc_cs }
-func (c *sigctxt) fs() uint32      { return c.regs().sc_fs }
-func (c *sigctxt) gs() uint32      { return c.regs().sc_gs }
-func (c *sigctxt) sigcode() uint32 { return uint32(c.info.si_code) }
-func (c *sigctxt) sigaddr() uint32 {
-	return *(*uint32)(add(unsafe.Pointer(c.info), 12))
-}
-
-func (c *sigctxt) set_eip(x uint32)     { c.regs().sc_eip = x }
-func (c *sigctxt) set_esp(x uint32)     { c.regs().sc_esp = x }
-func (c *sigctxt) set_sigcode(x uint32) { c.info.si_code = int32(x) }
-func (c *sigctxt) set_sigaddr(x uint32) {
-	*(*uint32)(add(unsafe.Pointer(c.info), 12)) = x
-}
diff --git a/src/runtime/signal_openbsd_amd64.go b/src/runtime/signal_openbsd_amd64.go
deleted file mode 100644
index 4f0d19d..0000000
--- a/src/runtime/signal_openbsd_amd64.go
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-type sigctxt struct {
-	info *siginfo
-	ctxt unsafe.Pointer
-}
-
-func (c *sigctxt) regs() *sigcontext {
-	return (*sigcontext)(c.ctxt)
-}
-
-func (c *sigctxt) rax() uint64     { return c.regs().sc_rax }
-func (c *sigctxt) rbx() uint64     { return c.regs().sc_rbx }
-func (c *sigctxt) rcx() uint64     { return c.regs().sc_rcx }
-func (c *sigctxt) rdx() uint64     { return c.regs().sc_rdx }
-func (c *sigctxt) rdi() uint64     { return c.regs().sc_rdi }
-func (c *sigctxt) rsi() uint64     { return c.regs().sc_rsi }
-func (c *sigctxt) rbp() uint64     { return c.regs().sc_rbp }
-func (c *sigctxt) rsp() uint64     { return c.regs().sc_rsp }
-func (c *sigctxt) r8() uint64      { return c.regs().sc_r8 }
-func (c *sigctxt) r9() uint64      { return c.regs().sc_r9 }
-func (c *sigctxt) r10() uint64     { return c.regs().sc_r10 }
-func (c *sigctxt) r11() uint64     { return c.regs().sc_r11 }
-func (c *sigctxt) r12() uint64     { return c.regs().sc_r12 }
-func (c *sigctxt) r13() uint64     { return c.regs().sc_r13 }
-func (c *sigctxt) r14() uint64     { return c.regs().sc_r14 }
-func (c *sigctxt) r15() uint64     { return c.regs().sc_r15 }
-func (c *sigctxt) rip() uint64     { return c.regs().sc_rip }
-func (c *sigctxt) rflags() uint64  { return c.regs().sc_rflags }
-func (c *sigctxt) cs() uint64      { return c.regs().sc_cs }
-func (c *sigctxt) fs() uint64      { return c.regs().sc_fs }
-func (c *sigctxt) gs() uint64      { return c.regs().sc_gs }
-func (c *sigctxt) sigcode() uint64 { return uint64(c.info.si_code) }
-func (c *sigctxt) sigaddr() uint64 {
-	return *(*uint64)(add(unsafe.Pointer(c.info), 16))
-}
-
-func (c *sigctxt) set_rip(x uint64)     { c.regs().sc_rip = x }
-func (c *sigctxt) set_rsp(x uint64)     { c.regs().sc_rsp = x }
-func (c *sigctxt) set_sigcode(x uint64) { c.info.si_code = int32(x) }
-func (c *sigctxt) set_sigaddr(x uint64) {
-	*(*uint64)(add(unsafe.Pointer(c.info), 16)) = x
-}
diff --git a/src/runtime/signal_openbsd_arm.go b/src/runtime/signal_openbsd_arm.go
deleted file mode 100644
index 8ee255c..0000000
--- a/src/runtime/signal_openbsd_arm.go
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-type sigctxt struct {
-	info *siginfo
-	ctxt unsafe.Pointer
-}
-
-func (c *sigctxt) regs() *sigcontext {
-	return (*sigcontext)(c.ctxt)
-}
-
-func (c *sigctxt) r0() uint32      { return c.regs().sc_r0 }
-func (c *sigctxt) r1() uint32      { return c.regs().sc_r1 }
-func (c *sigctxt) r2() uint32      { return c.regs().sc_r2 }
-func (c *sigctxt) r3() uint32      { return c.regs().sc_r3 }
-func (c *sigctxt) r4() uint32      { return c.regs().sc_r4 }
-func (c *sigctxt) r5() uint32      { return c.regs().sc_r5 }
-func (c *sigctxt) r6() uint32      { return c.regs().sc_r6 }
-func (c *sigctxt) r7() uint32      { return c.regs().sc_r7 }
-func (c *sigctxt) r8() uint32      { return c.regs().sc_r8 }
-func (c *sigctxt) r9() uint32      { return c.regs().sc_r9 }
-func (c *sigctxt) r10() uint32     { return c.regs().sc_r10 }
-func (c *sigctxt) fp() uint32      { return c.regs().sc_r11 }
-func (c *sigctxt) ip() uint32      { return c.regs().sc_r12 }
-func (c *sigctxt) sp() uint32      { return c.regs().sc_usr_sp }
-func (c *sigctxt) lr() uint32      { return c.regs().sc_usr_lr }
-func (c *sigctxt) pc() uint32      { return c.regs().sc_pc }
-func (c *sigctxt) cpsr() uint32    { return c.regs().sc_spsr }
-func (c *sigctxt) fault() uint32   { return c.sigaddr() }
-func (c *sigctxt) trap() uint32    { return 0 }
-func (c *sigctxt) error() uint32   { return 0 }
-func (c *sigctxt) oldmask() uint32 { return 0 }
-
-func (c *sigctxt) sigcode() uint32 { return uint32(c.info.si_code) }
-func (c *sigctxt) sigaddr() uint32 {
-	return *(*uint32)(add(unsafe.Pointer(c.info), 12))
-}
-
-func (c *sigctxt) set_pc(x uint32)  { c.regs().sc_pc = x }
-func (c *sigctxt) set_sp(x uint32)  { c.regs().sc_usr_sp = x }
-func (c *sigctxt) set_lr(x uint32)  { c.regs().sc_usr_lr = x }
-func (c *sigctxt) set_r10(x uint32) { c.regs().sc_r10 = x }
-
-func (c *sigctxt) set_sigcode(x uint32) { c.info.si_code = int32(x) }
-func (c *sigctxt) set_sigaddr(x uint32) {
-	*(*uint32)(add(unsafe.Pointer(c.info), 12)) = x
-}
diff --git a/src/runtime/signal_plan9.go b/src/runtime/signal_plan9.go
deleted file mode 100644
index 302f156..0000000
--- a/src/runtime/signal_plan9.go
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-type sigTabT struct {
-	flags int
-	name  string
-}
-
-// Incoming notes are compared against this table using strncmp, so the
-// order matters: longer patterns must appear before their prefixes.
-// There are _SIG constants in os2_plan9.go for the table index of some
-// of these.
-//
-// If you add entries to this table, you must respect the prefix ordering
-// and also update the constant values is os2_plan9.go.
-var sigtable = [...]sigTabT{
-	// Traps that we cannot be recovered.
-	{_SigThrow, "sys: trap: debug exception"},
-	{_SigThrow, "sys: trap: invalid opcode"},
-
-	// We can recover from some memory errors in runtime·sigpanic.
-	{_SigPanic, "sys: trap: fault read addr"},  // SIGRFAULT
-	{_SigPanic, "sys: trap: fault write addr"}, // SIGWFAULT
-
-	// We can also recover from math errors.
-	{_SigPanic, "sys: trap: divide error"}, // SIGINTDIV
-	{_SigPanic, "sys: fp:"},                // SIGFLOAT
-
-	// All other traps are normally handled as if they were marked SigThrow.
-	// We mark them SigPanic here so that debug.SetPanicOnFault will work.
-	{_SigPanic, "sys: trap:"}, // SIGTRAP
-
-	// Writes to a closed pipe can be handled if desired, otherwise they're ignored.
-	{_SigNotify, "sys: write on closed pipe"},
-
-	// Other system notes are more serious and cannot be recovered.
-	{_SigThrow, "sys:"},
-
-	// Issued to all other procs when calling runtime·exit.
-	{_SigGoExit, "go: exit "},
-
-	// Kill is sent by external programs to cause an exit.
-	{_SigKill, "kill"},
-
-	// Interrupts can be handled if desired, otherwise they cause an exit.
-	{_SigNotify + _SigKill, "interrupt"},
-	{_SigNotify + _SigKill, "hangup"},
-
-	// Alarms can be handled if desired, otherwise they're ignored.
-	{_SigNotify, "alarm"},
-}
diff --git a/src/runtime/signal_ppc64x.go b/src/runtime/signal_ppc64x.go
deleted file mode 100644
index bad9fe6..0000000
--- a/src/runtime/signal_ppc64x.go
+++ /dev/null
@@ -1,183 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-// +build ppc64 ppc64le
-
-package runtime
-
-import "unsafe"
-
-func dumpregs(c *sigctxt) {
-	print("r0   ", hex(c.r0()), "\t")
-	print("r1   ", hex(c.r1()), "\n")
-	print("r2   ", hex(c.r2()), "\t")
-	print("r3   ", hex(c.r3()), "\n")
-	print("r4   ", hex(c.r4()), "\t")
-	print("r5   ", hex(c.r5()), "\n")
-	print("r6   ", hex(c.r6()), "\t")
-	print("r7   ", hex(c.r7()), "\n")
-	print("r8   ", hex(c.r8()), "\t")
-	print("r9   ", hex(c.r9()), "\n")
-	print("r10  ", hex(c.r10()), "\t")
-	print("r11  ", hex(c.r11()), "\n")
-	print("r12  ", hex(c.r12()), "\t")
-	print("r13  ", hex(c.r13()), "\n")
-	print("r14  ", hex(c.r14()), "\t")
-	print("r15  ", hex(c.r15()), "\n")
-	print("r16  ", hex(c.r16()), "\t")
-	print("r17  ", hex(c.r17()), "\n")
-	print("r18  ", hex(c.r18()), "\t")
-	print("r19  ", hex(c.r19()), "\n")
-	print("r20  ", hex(c.r20()), "\t")
-	print("r21  ", hex(c.r21()), "\n")
-	print("r22  ", hex(c.r22()), "\t")
-	print("r23  ", hex(c.r23()), "\n")
-	print("r24  ", hex(c.r24()), "\t")
-	print("r25  ", hex(c.r25()), "\n")
-	print("r26  ", hex(c.r26()), "\t")
-	print("r27  ", hex(c.r27()), "\n")
-	print("r28  ", hex(c.r28()), "\t")
-	print("r29  ", hex(c.r29()), "\n")
-	print("r30  ", hex(c.r30()), "\t")
-	print("r31  ", hex(c.r31()), "\n")
-	print("pc   ", hex(c.pc()), "\t")
-	print("ctr  ", hex(c.ctr()), "\n")
-	print("link ", hex(c.link()), "\t")
-	print("xer  ", hex(c.xer()), "\n")
-	print("ccr  ", hex(c.ccr()), "\t")
-	print("trap ", hex(c.trap()), "\n")
-}
-
-var crashing int32
-
-// May run during STW, so write barriers are not allowed.
-//go:nowritebarrier
-func sighandler(sig uint32, info *siginfo, ctxt unsafe.Pointer, gp *g) {
-	_g_ := getg()
-	c := &sigctxt{info, ctxt}
-
-	if sig == _SIGPROF {
-		sigprof(uintptr(c.pc()), uintptr(c.sp()), uintptr(c.link()), gp, _g_.m)
-		return
-	}
-	flags := int32(_SigThrow)
-	if sig < uint32(len(sigtable)) {
-		flags = sigtable[sig].flags
-	}
-	if c.sigcode() != _SI_USER && flags&_SigPanic != 0 {
-		// Make it look like a call to the signal func.
-		// Have to pass arguments out of band since
-		// augmenting the stack frame would break
-		// the unwinding code.
-		gp.sig = sig
-		gp.sigcode0 = uintptr(c.sigcode())
-		gp.sigcode1 = uintptr(c.fault())
-		gp.sigpc = uintptr(c.pc())
-
-		// We arrange link, and pc to pretend the panicking
-		// function calls sigpanic directly.
-		// Always save LINK to stack so that panics in leaf
-		// functions are correctly handled. This smashes
-		// the stack frame but we're not going back there
-		// anyway.
-		sp := c.sp() - ptrSize
-		c.set_sp(sp)
-		*(*uint64)(unsafe.Pointer(uintptr(sp))) = c.link()
-
-		pc := uintptr(gp.sigpc)
-
-		// If we don't recognize the PC as code
-		// but we do recognize the link register as code,
-		// then assume this was a call to non-code and treat like
-		// pc == 0, to make unwinding show the context.
-		if pc != 0 && findfunc(pc) == nil && findfunc(uintptr(c.link())) != nil {
-			pc = 0
-		}
-
-		// Don't bother saving PC if it's zero, which is
-		// probably a call to a nil func: the old link register
-		// is more useful in the stack trace.
-		if pc != 0 {
-			c.set_link(uint64(pc))
-		}
-
-		// In case we are panicking from external C code
-		c.set_r0(0)
-		c.set_r30(uint64(uintptr(unsafe.Pointer(gp))))
-		c.set_pc(uint64(funcPC(sigpanic)))
-		return
-	}
-
-	if c.sigcode() == _SI_USER || flags&_SigNotify != 0 {
-		if sigsend(sig) {
-			return
-		}
-	}
-
-	if flags&_SigKill != 0 {
-		exit(2)
-	}
-
-	if flags&_SigThrow == 0 {
-		return
-	}
-
-	_g_.m.throwing = 1
-	_g_.m.caughtsig.set(gp)
-
-	if crashing == 0 {
-		startpanic()
-	}
-
-	if sig < uint32(len(sigtable)) {
-		print(sigtable[sig].name, "\n")
-	} else {
-		print("Signal ", sig, "\n")
-	}
-
-	print("PC=", hex(c.pc()), " m=", _g_.m.id, "\n")
-	if _g_.m.lockedg != nil && _g_.m.ncgo > 0 && gp == _g_.m.g0 {
-		print("signal arrived during cgo execution\n")
-		gp = _g_.m.lockedg
-	}
-	print("\n")
-
-	var docrash bool
-	if gotraceback(&docrash) > 0 {
-		goroutineheader(gp)
-		tracebacktrap(uintptr(c.pc()), uintptr(c.sp()), uintptr(c.link()), gp)
-		if crashing > 0 && gp != _g_.m.curg && _g_.m.curg != nil && readgstatus(_g_.m.curg)&^_Gscan == _Grunning {
-			// tracebackothers on original m skipped this one; trace it now.
-			goroutineheader(_g_.m.curg)
-			traceback(^uintptr(0), ^uintptr(0), 0, gp)
-		} else if crashing == 0 {
-			tracebackothers(gp)
-			print("\n")
-		}
-		dumpregs(c)
-	}
-
-	if docrash {
-		crashing++
-		if crashing < sched.mcount {
-			// There are other m's that need to dump their stacks.
-			// Relay SIGQUIT to the next m by sending it to the current process.
-			// All m's that have already received SIGQUIT have signal masks blocking
-			// receipt of any signals, so the SIGQUIT will go to an m that hasn't seen it yet.
-			// When the last m receives the SIGQUIT, it will fall through to the call to
-			// crash below. Just in case the relaying gets botched, each m involved in
-			// the relay sleeps for 5 seconds and then does the crash/exit itself.
-			// In expected operation, the last m has received the SIGQUIT and run
-			// crash/exit and the process is gone, all long before any of the
-			// 5-second sleeps have finished.
-			print("\n-----\n\n")
-			raiseproc(_SIGQUIT)
-			usleep(5 * 1000 * 1000)
-		}
-		crash()
-	}
-
-	exit(2)
-}
diff --git a/src/runtime/signal_solaris.go b/src/runtime/signal_solaris.go
deleted file mode 100644
index d8ac676..0000000
--- a/src/runtime/signal_solaris.go
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-type sigTabT struct {
-	flags int32
-	name  string
-}
-
-var sigtable = [...]sigTabT{
-	/* 0 */ {0, "SIGNONE: no trap"},
-	/* 1 */ {_SigNotify + _SigKill, "SIGHUP: hangup"},
-	/* 2 */ {_SigNotify + _SigKill, "SIGINT: interrupt (rubout)"},
-	/* 3 */ {_SigNotify + _SigThrow, "SIGQUIT: quit (ASCII FS)"},
-	/* 4 */ {_SigThrow + _SigUnblock, "SIGILL: illegal instruction (not reset when caught)"},
-	/* 5 */ {_SigThrow + _SigUnblock, "SIGTRAP: trace trap (not reset when caught)"},
-	/* 6 */ {_SigNotify + _SigThrow, "SIGABRT: used by abort, replace SIGIOT in the future"},
-	/* 7 */ {_SigThrow, "SIGEMT: EMT instruction"},
-	/* 8 */ {_SigPanic + _SigUnblock, "SIGFPE: floating point exception"},
-	/* 9 */ {0, "SIGKILL: kill (cannot be caught or ignored)"},
-	/* 10 */ {_SigPanic + _SigUnblock, "SIGBUS: bus error"},
-	/* 11 */ {_SigPanic + _SigUnblock, "SIGSEGV: segmentation violation"},
-	/* 12 */ {_SigThrow, "SIGSYS: bad argument to system call"},
-	/* 13 */ {_SigNotify, "SIGPIPE: write on a pipe with no one to read it"},
-	/* 14 */ {_SigNotify, "SIGALRM: alarm clock"},
-	/* 15 */ {_SigNotify + _SigKill, "SIGTERM: software termination signal from kill"},
-	/* 16 */ {_SigNotify, "SIGUSR1: user defined signal 1"},
-	/* 17 */ {_SigNotify, "SIGUSR2: user defined signal 2"},
-	/* 18 */ {_SigNotify + _SigUnblock, "SIGCHLD: child status change alias (POSIX)"},
-	/* 19 */ {_SigNotify, "SIGPWR: power-fail restart"},
-	/* 20 */ {_SigNotify, "SIGWINCH: window size change"},
-	/* 21 */ {_SigNotify, "SIGURG: urgent socket condition"},
-	/* 22 */ {_SigNotify, "SIGPOLL: pollable event occured"},
-	/* 23 */ {_SigNotify + _SigDefault, "SIGSTOP: stop (cannot be caught or ignored)"},
-	/* 24 */ {0, "SIGTSTP: user stop requested from tty"},
-	/* 25 */ {0, "SIGCONT: stopped process has been continued"},
-	/* 26 */ {_SigNotify + _SigDefault, "SIGTTIN: background tty read attempted"},
-	/* 27 */ {_SigNotify + _SigDefault, "SIGTTOU: background tty write attempted"},
-	/* 28 */ {_SigNotify, "SIGVTALRM: virtual timer expired"},
-	/* 29 */ {_SigNotify + _SigUnblock, "SIGPROF: profiling timer expired"},
-	/* 30 */ {_SigNotify, "SIGXCPU: exceeded cpu limit"},
-	/* 31 */ {_SigNotify, "SIGXFSZ: exceeded file size limit"},
-	/* 32 */ {_SigNotify, "SIGWAITING: reserved signal no longer used by"},
-	/* 33 */ {_SigNotify, "SIGLWP: reserved signal no longer used by"},
-	/* 34 */ {_SigNotify, "SIGFREEZE: special signal used by CPR"},
-	/* 35 */ {_SigNotify, "SIGTHAW: special signal used by CPR"},
-	/* 36 */ {0, "SIGCANCEL: reserved signal for thread cancellation"},
-	/* 37 */ {_SigNotify, "SIGLOST: resource lost (eg, record-lock lost)"},
-	/* 38 */ {_SigNotify, "SIGXRES: resource control exceeded"},
-	/* 39 */ {_SigNotify, "SIGJVM1: reserved signal for Java Virtual Machine"},
-	/* 40 */ {_SigNotify, "SIGJVM2: reserved signal for Java Virtual Machine"},
-
-	/* TODO(aram): what should be do about these signals? _SigDefault or _SigNotify? is this set static? */
-	/* 41 */ {_SigNotify, "real time signal"},
-	/* 42 */ {_SigNotify, "real time signal"},
-	/* 43 */ {_SigNotify, "real time signal"},
-	/* 44 */ {_SigNotify, "real time signal"},
-	/* 45 */ {_SigNotify, "real time signal"},
-	/* 46 */ {_SigNotify, "real time signal"},
-	/* 47 */ {_SigNotify, "real time signal"},
-	/* 48 */ {_SigNotify, "real time signal"},
-	/* 49 */ {_SigNotify, "real time signal"},
-	/* 50 */ {_SigNotify, "real time signal"},
-	/* 51 */ {_SigNotify, "real time signal"},
-	/* 52 */ {_SigNotify, "real time signal"},
-	/* 53 */ {_SigNotify, "real time signal"},
-	/* 54 */ {_SigNotify, "real time signal"},
-	/* 55 */ {_SigNotify, "real time signal"},
-	/* 56 */ {_SigNotify, "real time signal"},
-	/* 57 */ {_SigNotify, "real time signal"},
-	/* 58 */ {_SigNotify, "real time signal"},
-	/* 59 */ {_SigNotify, "real time signal"},
-	/* 60 */ {_SigNotify, "real time signal"},
-	/* 61 */ {_SigNotify, "real time signal"},
-	/* 62 */ {_SigNotify, "real time signal"},
-	/* 63 */ {_SigNotify, "real time signal"},
-	/* 64 */ {_SigNotify, "real time signal"},
-	/* 65 */ {_SigNotify, "real time signal"},
-	/* 66 */ {_SigNotify, "real time signal"},
-	/* 67 */ {_SigNotify, "real time signal"},
-	/* 68 */ {_SigNotify, "real time signal"},
-	/* 69 */ {_SigNotify, "real time signal"},
-	/* 70 */ {_SigNotify, "real time signal"},
-	/* 71 */ {_SigNotify, "real time signal"},
-	/* 72 */ {_SigNotify, "real time signal"},
-}
diff --git a/src/runtime/signal_solaris_amd64.go b/src/runtime/signal_solaris_amd64.go
deleted file mode 100644
index a577c8c..0000000
--- a/src/runtime/signal_solaris_amd64.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-type sigctxt struct {
-	info *siginfo
-	ctxt unsafe.Pointer
-}
-
-func (c *sigctxt) regs() *mcontext {
-	return (*mcontext)(unsafe.Pointer(&(*ucontext)(c.ctxt).uc_mcontext))
-}
-func (c *sigctxt) rax() uint64     { return uint64(c.regs().gregs[_REG_RAX]) }
-func (c *sigctxt) rbx() uint64     { return uint64(c.regs().gregs[_REG_RBX]) }
-func (c *sigctxt) rcx() uint64     { return uint64(c.regs().gregs[_REG_RCX]) }
-func (c *sigctxt) rdx() uint64     { return uint64(c.regs().gregs[_REG_RDX]) }
-func (c *sigctxt) rdi() uint64     { return uint64(c.regs().gregs[_REG_RDI]) }
-func (c *sigctxt) rsi() uint64     { return uint64(c.regs().gregs[_REG_RSI]) }
-func (c *sigctxt) rbp() uint64     { return uint64(c.regs().gregs[_REG_RBP]) }
-func (c *sigctxt) rsp() uint64     { return uint64(c.regs().gregs[_REG_RSP]) }
-func (c *sigctxt) r8() uint64      { return uint64(c.regs().gregs[_REG_R8]) }
-func (c *sigctxt) r9() uint64      { return uint64(c.regs().gregs[_REG_R9]) }
-func (c *sigctxt) r10() uint64     { return uint64(c.regs().gregs[_REG_R10]) }
-func (c *sigctxt) r11() uint64     { return uint64(c.regs().gregs[_REG_R11]) }
-func (c *sigctxt) r12() uint64     { return uint64(c.regs().gregs[_REG_R12]) }
-func (c *sigctxt) r13() uint64     { return uint64(c.regs().gregs[_REG_R13]) }
-func (c *sigctxt) r14() uint64     { return uint64(c.regs().gregs[_REG_R14]) }
-func (c *sigctxt) r15() uint64     { return uint64(c.regs().gregs[_REG_R15]) }
-func (c *sigctxt) rip() uint64     { return uint64(c.regs().gregs[_REG_RIP]) }
-func (c *sigctxt) rflags() uint64  { return uint64(c.regs().gregs[_REG_RFLAGS]) }
-func (c *sigctxt) cs() uint64      { return uint64(c.regs().gregs[_REG_CS]) }
-func (c *sigctxt) fs() uint64      { return uint64(c.regs().gregs[_REG_FS]) }
-func (c *sigctxt) gs() uint64      { return uint64(c.regs().gregs[_REG_GS]) }
-func (c *sigctxt) sigcode() uint64 { return uint64(c.info.si_code) }
-func (c *sigctxt) sigaddr() uint64 { return *(*uint64)(unsafe.Pointer(&c.info.__data[0])) }
-
-func (c *sigctxt) set_rip(x uint64)     { c.regs().gregs[_REG_RIP] = int64(x) }
-func (c *sigctxt) set_rsp(x uint64)     { c.regs().gregs[_REG_RSP] = int64(x) }
-func (c *sigctxt) set_sigcode(x uint64) { c.info.si_code = int32(x) }
-func (c *sigctxt) set_sigaddr(x uint64) {
-	*(*uintptr)(unsafe.Pointer(&c.info.__data[0])) = uintptr(x)
-}
diff --git a/src/runtime/signal_windows.go b/src/runtime/signal_windows.go
deleted file mode 100644
index d80cc97..0000000
--- a/src/runtime/signal_windows.go
+++ /dev/null
@@ -1,221 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import (
-	"unsafe"
-)
-
-func disableWER() {
-	// do not display Windows Error Reporting dialogue
-	const (
-		SEM_FAILCRITICALERRORS     = 0x0001
-		SEM_NOGPFAULTERRORBOX      = 0x0002
-		SEM_NOALIGNMENTFAULTEXCEPT = 0x0004
-		SEM_NOOPENFILEERRORBOX     = 0x8000
-	)
-	errormode := uint32(stdcall1(_SetErrorMode, SEM_NOGPFAULTERRORBOX))
-	stdcall1(_SetErrorMode, uintptr(errormode)|SEM_FAILCRITICALERRORS|SEM_NOGPFAULTERRORBOX|SEM_NOOPENFILEERRORBOX)
-}
-
-// in sys_windows_386.s and sys_windows_amd64.s
-func exceptiontramp()
-func firstcontinuetramp()
-func lastcontinuetramp()
-
-func initExceptionHandler() {
-	stdcall2(_AddVectoredExceptionHandler, 1, funcPC(exceptiontramp))
-	if _AddVectoredContinueHandler == nil || unsafe.Sizeof(&_AddVectoredContinueHandler) == 4 {
-		// use SetUnhandledExceptionFilter for windows-386 or
-		// if VectoredContinueHandler is unavailable.
-		// note: SetUnhandledExceptionFilter handler won't be called, if debugging.
-		stdcall1(_SetUnhandledExceptionFilter, funcPC(lastcontinuetramp))
-	} else {
-		stdcall2(_AddVectoredContinueHandler, 1, funcPC(firstcontinuetramp))
-		stdcall2(_AddVectoredContinueHandler, 0, funcPC(lastcontinuetramp))
-	}
-}
-
-func isgoexception(info *exceptionrecord, r *context) bool {
-	// Only handle exception if executing instructions in Go binary
-	// (not Windows library code).
-	// TODO(mwhudson): needs to loop to support shared libs
-	if r.ip() < firstmoduledata.text || firstmoduledata.etext < r.ip() {
-		return false
-	}
-
-	// Go will only handle some exceptions.
-	switch info.exceptioncode {
-	default:
-		return false
-	case _EXCEPTION_ACCESS_VIOLATION:
-	case _EXCEPTION_INT_DIVIDE_BY_ZERO:
-	case _EXCEPTION_INT_OVERFLOW:
-	case _EXCEPTION_FLT_DENORMAL_OPERAND:
-	case _EXCEPTION_FLT_DIVIDE_BY_ZERO:
-	case _EXCEPTION_FLT_INEXACT_RESULT:
-	case _EXCEPTION_FLT_OVERFLOW:
-	case _EXCEPTION_FLT_UNDERFLOW:
-	case _EXCEPTION_BREAKPOINT:
-	}
-	return true
-}
-
-// Called by sigtramp from Windows VEH handler.
-// Return value signals whether the exception has been handled (EXCEPTION_CONTINUE_EXECUTION)
-// or should be made available to other handlers in the chain (EXCEPTION_CONTINUE_SEARCH).
-func exceptionhandler(info *exceptionrecord, r *context, gp *g) int32 {
-	if !isgoexception(info, r) {
-		return _EXCEPTION_CONTINUE_SEARCH
-	}
-
-	// Make it look like a call to the signal func.
-	// Have to pass arguments out of band since
-	// augmenting the stack frame would break
-	// the unwinding code.
-	gp.sig = info.exceptioncode
-	gp.sigcode0 = uintptr(info.exceptioninformation[0])
-	gp.sigcode1 = uintptr(info.exceptioninformation[1])
-	gp.sigpc = r.ip()
-
-	// Only push runtime·sigpanic if r.ip() != 0.
-	// If r.ip() == 0, probably panicked because of a
-	// call to a nil func.  Not pushing that onto sp will
-	// make the trace look like a call to runtime·sigpanic instead.
-	// (Otherwise the trace will end at runtime·sigpanic and we
-	// won't get to see who faulted.)
-	if r.ip() != 0 {
-		sp := unsafe.Pointer(r.sp())
-		sp = add(sp, ^uintptr(unsafe.Sizeof(uintptr(0))-1)) // sp--
-		*((*uintptr)(sp)) = r.ip()
-		r.setsp(uintptr(sp))
-	}
-	r.setip(funcPC(sigpanic))
-	return _EXCEPTION_CONTINUE_EXECUTION
-}
-
-// It seems Windows searches ContinueHandler's list even
-// if ExceptionHandler returns EXCEPTION_CONTINUE_EXECUTION.
-// firstcontinuehandler will stop that search,
-// if exceptionhandler did the same earlier.
-func firstcontinuehandler(info *exceptionrecord, r *context, gp *g) int32 {
-	if !isgoexception(info, r) {
-		return _EXCEPTION_CONTINUE_SEARCH
-	}
-	return _EXCEPTION_CONTINUE_EXECUTION
-}
-
-var testingWER bool
-
-// lastcontinuehandler is reached, because runtime cannot handle
-// current exception. lastcontinuehandler will print crash info and exit.
-func lastcontinuehandler(info *exceptionrecord, r *context, gp *g) int32 {
-	if testingWER {
-		return _EXCEPTION_CONTINUE_SEARCH
-	}
-
-	_g_ := getg()
-
-	if panicking != 0 { // traceback already printed
-		exit(2)
-	}
-	panicking = 1
-
-	print("Exception ", hex(info.exceptioncode), " ", hex(info.exceptioninformation[0]), " ", hex(info.exceptioninformation[1]), " ", hex(r.ip()), "\n")
-
-	print("PC=", hex(r.ip()), "\n")
-	if _g_.m.lockedg != nil && _g_.m.ncgo > 0 && gp == _g_.m.g0 {
-		if iscgo {
-			print("signal arrived during external code execution\n")
-		}
-		gp = _g_.m.lockedg
-	}
-	print("\n")
-
-	var docrash bool
-	if gotraceback(&docrash) > 0 {
-		tracebacktrap(r.ip(), r.sp(), 0, gp)
-		tracebackothers(gp)
-		dumpregs(r)
-	}
-
-	if docrash {
-		crash()
-	}
-
-	exit(2)
-	return 0 // not reached
-}
-
-func sigpanic() {
-	g := getg()
-	if !canpanic(g) {
-		throw("unexpected signal during runtime execution")
-	}
-
-	switch uint32(g.sig) {
-	case _EXCEPTION_ACCESS_VIOLATION:
-		if g.sigcode1 < 0x1000 || g.paniconfault {
-			panicmem()
-		}
-		print("unexpected fault address ", hex(g.sigcode1), "\n")
-		throw("fault")
-	case _EXCEPTION_INT_DIVIDE_BY_ZERO:
-		panicdivide()
-	case _EXCEPTION_INT_OVERFLOW:
-		panicoverflow()
-	case _EXCEPTION_FLT_DENORMAL_OPERAND,
-		_EXCEPTION_FLT_DIVIDE_BY_ZERO,
-		_EXCEPTION_FLT_INEXACT_RESULT,
-		_EXCEPTION_FLT_OVERFLOW,
-		_EXCEPTION_FLT_UNDERFLOW:
-		panicfloat()
-	}
-	throw("fault")
-}
-
-var (
-	badsignalmsg [100]byte
-	badsignallen int32
-)
-
-func setBadSignalMsg() {
-	const msg = "runtime: signal received on thread not created by Go.\n"
-	for i, c := range msg {
-		badsignalmsg[i] = byte(c)
-		badsignallen++
-	}
-}
-
-// Following are not implemented.
-
-func initsig() {
-}
-
-func sigenable(sig uint32) {
-}
-
-func sigdisable(sig uint32) {
-}
-
-func sigignore(sig uint32) {
-}
-
-func badsignal2()
-
-func raisebadsignal(sig int32) {
-	badsignal2()
-}
-
-func crash() {
-	// TODO: This routine should do whatever is needed
-	// to make the Windows program abort/crash as it
-	// would if Go was not intercepting signals.
-	// On Unix the routine would remove the custom signal
-	// handler and then raise a signal (like SIGABRT).
-	// Something like that should happen here.
-	// It's okay to leave this empty for now: if crash returns
-	// the ordinary exit-after-panic happens.
-}
diff --git a/src/runtime/sigqueue_plan9.go b/src/runtime/sigqueue_plan9.go
deleted file mode 100644
index f000fab..0000000
--- a/src/runtime/sigqueue_plan9.go
+++ /dev/null
@@ -1,128 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements runtime support for signal handling.
-
-package runtime
-
-const qsize = 64
-
-var sig struct {
-	q     noteQueue
-	inuse bool
-
-	lock     mutex
-	note     note
-	sleeping bool
-}
-
-type noteData struct {
-	s [_ERRMAX]byte
-	n int // n bytes of s are valid
-}
-
-type noteQueue struct {
-	lock mutex
-	data [qsize]noteData
-	ri   int
-	wi   int
-	full bool
-}
-
-// It is not allowed to allocate memory in the signal handler.
-func (q *noteQueue) push(item *byte) bool {
-	lock(&q.lock)
-	if q.full {
-		unlock(&q.lock)
-		return false
-	}
-	s := gostringnocopy(item)
-	copy(q.data[q.wi].s[:], s)
-	q.data[q.wi].n = len(s)
-	q.wi++
-	if q.wi == qsize {
-		q.wi = 0
-	}
-	if q.wi == q.ri {
-		q.full = true
-	}
-	unlock(&q.lock)
-	return true
-}
-
-func (q *noteQueue) pop() string {
-	lock(&q.lock)
-	q.full = false
-	if q.ri == q.wi {
-		unlock(&q.lock)
-		return ""
-	}
-	note := &q.data[q.ri]
-	item := string(note.s[:note.n])
-	q.ri++
-	if q.ri == qsize {
-		q.ri = 0
-	}
-	unlock(&q.lock)
-	return item
-}
-
-// Called from sighandler to send a signal back out of the signal handling thread.
-// Reports whether the signal was sent. If not, the caller typically crashes the program.
-func sendNote(s *byte) bool {
-	if !sig.inuse {
-		return false
-	}
-
-	// Add signal to outgoing queue.
-	if !sig.q.push(s) {
-		return false
-	}
-
-	lock(&sig.lock)
-	if sig.sleeping {
-		sig.sleeping = false
-		notewakeup(&sig.note)
-	}
-	unlock(&sig.lock)
-
-	return true
-}
-
-// Called to receive the next queued signal.
-// Must only be called from a single goroutine at a time.
-func signal_recv() string {
-	for {
-		note := sig.q.pop()
-		if note != "" {
-			return note
-		}
-
-		lock(&sig.lock)
-		sig.sleeping = true
-		noteclear(&sig.note)
-		unlock(&sig.lock)
-		notetsleepg(&sig.note, -1)
-	}
-}
-
-// Must only be called from a single goroutine at a time.
-func signal_enable(s uint32) {
-	if !sig.inuse {
-		// The first call to signal_enable is for us
-		// to use for initialization.  It does not pass
-		// signal information in m.
-		sig.inuse = true // enable reception of signals; cannot disable
-		noteclear(&sig.note)
-		return
-	}
-}
-
-// Must only be called from a single goroutine at a time.
-func signal_disable(s uint32) {
-}
-
-// Must only be called from a single goroutine at a time.
-func signal_ignore(s uint32) {
-}
diff --git a/src/runtime/softfloat_arm.go b/src/runtime/softfloat_arm.go
deleted file mode 100644
index c6eba58..0000000
--- a/src/runtime/softfloat_arm.go
+++ /dev/null
@@ -1,608 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Software floating point interpretaton of ARM 7500 FP instructions.
-// The interpretation is not bit compatible with the 7500.
-// It uses true little-endian doubles, while the 7500 used mixed-endian.
-
-package runtime
-
-import "unsafe"
-
-const (
-	_CPSR    = 14
-	_FLAGS_N = 1 << 31
-	_FLAGS_Z = 1 << 30
-	_FLAGS_C = 1 << 29
-	_FLAGS_V = 1 << 28
-)
-
-var fptrace = 0
-
-func fabort() {
-	throw("unsupported floating point instruction")
-}
-
-func fputf(reg uint32, val uint32) {
-	_g_ := getg()
-	_g_.m.freglo[reg] = val
-}
-
-func fputd(reg uint32, val uint64) {
-	_g_ := getg()
-	_g_.m.freglo[reg] = uint32(val)
-	_g_.m.freghi[reg] = uint32(val >> 32)
-}
-
-func fgetd(reg uint32) uint64 {
-	_g_ := getg()
-	return uint64(_g_.m.freglo[reg]) | uint64(_g_.m.freghi[reg])<<32
-}
-
-func fprintregs() {
-	_g_ := getg()
-	for i := range _g_.m.freglo {
-		print("\tf", i, ":\t", hex(_g_.m.freghi[i]), " ", hex(_g_.m.freglo[i]), "\n")
-	}
-}
-
-func fstatus(nan bool, cmp int32) uint32 {
-	if nan {
-		return _FLAGS_C | _FLAGS_V
-	}
-	if cmp == 0 {
-		return _FLAGS_Z | _FLAGS_C
-	}
-	if cmp < 0 {
-		return _FLAGS_N
-	}
-	return _FLAGS_C
-}
-
-// conditions array record the required CPSR cond field for the
-// first 5 pairs of conditional execution opcodes
-// higher 4 bits are must set, lower 4 bits are must clear
-var conditions = [10 / 2]uint32{
-	0 / 2: _FLAGS_Z>>24 | 0, // 0: EQ (Z set), 1: NE (Z clear)
-	2 / 2: _FLAGS_C>>24 | 0, // 2: CS/HS (C set), 3: CC/LO (C clear)
-	4 / 2: _FLAGS_N>>24 | 0, // 4: MI (N set), 5: PL (N clear)
-	6 / 2: _FLAGS_V>>24 | 0, // 6: VS (V set), 7: VC (V clear)
-	8 / 2: _FLAGS_C>>24 |
-		_FLAGS_Z>>28,
-}
-
-const _FAULT = 0x80000000 // impossible PC offset
-
-// returns number of words that the fp instruction
-// is occupying, 0 if next instruction isn't float.
-func stepflt(pc *uint32, regs *[15]uint32) uint32 {
-	var i, opc, regd, regm, regn, cpsr uint32
-
-	// m is locked in vlop_arm.s, so g.m cannot change during this function call,
-	// so caching it in a local variable is safe.
-	m := getg().m
-	i = *pc
-
-	if fptrace > 0 {
-		print("stepflt ", pc, " ", hex(i), " (cpsr ", hex(regs[_CPSR]>>28), ")\n")
-	}
-
-	opc = i >> 28
-	if opc == 14 { // common case first
-		goto execute
-	}
-
-	cpsr = regs[_CPSR] >> 28
-	switch opc {
-	case 0, 1, 2, 3, 4, 5, 6, 7, 8, 9:
-		if cpsr&(conditions[opc/2]>>4) == conditions[opc/2]>>4 &&
-			cpsr&(conditions[opc/2]&0xf) == 0 {
-			if opc&1 != 0 {
-				return 1
-			}
-		} else {
-			if opc&1 == 0 {
-				return 1
-			}
-		}
-
-	case 10, 11: // GE (N == V), LT (N != V)
-		if cpsr&(_FLAGS_N>>28) == cpsr&(_FLAGS_V>>28) {
-			if opc&1 != 0 {
-				return 1
-			}
-		} else {
-			if opc&1 == 0 {
-				return 1
-			}
-		}
-
-	case 12, 13: // GT (N == V and Z == 0), LE (N != V or Z == 1)
-		if cpsr&(_FLAGS_N>>28) == cpsr&(_FLAGS_V>>28) &&
-			cpsr&(_FLAGS_Z>>28) == 0 {
-			if opc&1 != 0 {
-				return 1
-			}
-		} else {
-			if opc&1 == 0 {
-				return 1
-			}
-		}
-
-	case 14: // AL
-		// ok
-
-	case 15: // shouldn't happen
-		return 0
-	}
-
-	if fptrace > 0 {
-		print("conditional ", hex(opc), " (cpsr ", hex(cpsr), ") pass\n")
-	}
-	i = 0xe<<28 | i&(1<<28-1)
-
-execute:
-	// special cases
-	if i&0xfffff000 == 0xe59fb000 {
-		// load r11 from pc-relative address.
-		// might be part of a floating point move
-		// (or might not, but no harm in simulating
-		// one instruction too many).
-		addr := (*[1]uint32)(add(unsafe.Pointer(pc), uintptr(i&0xfff+8)))
-		regs[11] = addr[0]
-
-		if fptrace > 0 {
-			print("*** cpu R[11] = *(", addr, ") ", hex(regs[11]), "\n")
-		}
-		return 1
-	}
-	if i == 0xe08bb00d {
-		// add sp to r11.
-		// might be part of a large stack offset address
-		// (or might not, but again no harm done).
-		regs[11] += regs[13]
-
-		if fptrace > 0 {
-			print("*** cpu R[11] += R[13] ", hex(regs[11]), "\n")
-		}
-		return 1
-	}
-	if i == 0xeef1fa10 {
-		regs[_CPSR] = regs[_CPSR]&0x0fffffff | m.fflag
-
-		if fptrace > 0 {
-			print("*** fpsr R[CPSR] = F[CPSR] ", hex(regs[_CPSR]), "\n")
-		}
-		return 1
-	}
-	if i&0xff000000 == 0xea000000 {
-		// unconditional branch
-		// can happen in the middle of floating point
-		// if the linker decides it is time to lay down
-		// a sequence of instruction stream constants.
-		delta := int32(i&0xffffff) << 8 >> 8 // sign extend
-
-		if fptrace > 0 {
-			print("*** cpu PC += ", hex((delta+2)*4), "\n")
-		}
-		return uint32(delta + 2)
-	}
-
-	// load/store regn is cpureg, regm is 8bit offset
-	regd = i >> 12 & 0xf
-	regn = i >> 16 & 0xf
-	regm = i & 0xff << 2 // PLUS or MINUS ??
-
-	switch i & 0xfff00f00 {
-	case 0xed900a00: // single load
-		uaddr := uintptr(regs[regn] + regm)
-		if uaddr < 4096 {
-			if fptrace > 0 {
-				print("*** load @", hex(uaddr), " => fault\n")
-			}
-			return _FAULT
-		}
-		addr := (*[1]uint32)(unsafe.Pointer(uaddr))
-		m.freglo[regd] = addr[0]
-
-		if fptrace > 0 {
-			print("*** load F[", regd, "] = ", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xed900b00: // double load
-		uaddr := uintptr(regs[regn] + regm)
-		if uaddr < 4096 {
-			if fptrace > 0 {
-				print("*** double load @", hex(uaddr), " => fault\n")
-			}
-			return _FAULT
-		}
-		addr := (*[2]uint32)(unsafe.Pointer(uaddr))
-		m.freglo[regd] = addr[0]
-		m.freghi[regd] = addr[1]
-
-		if fptrace > 0 {
-			print("*** load D[", regd, "] = ", hex(m.freghi[regd]), "-", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xed800a00: // single store
-		uaddr := uintptr(regs[regn] + regm)
-		if uaddr < 4096 {
-			if fptrace > 0 {
-				print("*** store @", hex(uaddr), " => fault\n")
-			}
-			return _FAULT
-		}
-		addr := (*[1]uint32)(unsafe.Pointer(uaddr))
-		addr[0] = m.freglo[regd]
-
-		if fptrace > 0 {
-			print("*** *(", addr, ") = ", hex(addr[0]), "\n")
-		}
-		return 1
-
-	case 0xed800b00: // double store
-		uaddr := uintptr(regs[regn] + regm)
-		if uaddr < 4096 {
-			if fptrace > 0 {
-				print("*** double store @", hex(uaddr), " => fault\n")
-			}
-			return _FAULT
-		}
-		addr := (*[2]uint32)(unsafe.Pointer(uaddr))
-		addr[0] = m.freglo[regd]
-		addr[1] = m.freghi[regd]
-
-		if fptrace > 0 {
-			print("*** *(", addr, ") = ", hex(addr[1]), "-", hex(addr[0]), "\n")
-		}
-		return 1
-	}
-
-	// regd, regm, regn are 4bit variables
-	regm = i >> 0 & 0xf
-	switch i & 0xfff00ff0 {
-	case 0xf3000110: // veor
-		m.freglo[regd] = m.freglo[regm] ^ m.freglo[regn]
-		m.freghi[regd] = m.freghi[regm] ^ m.freghi[regn]
-
-		if fptrace > 0 {
-			print("*** veor D[", regd, "] = ", hex(m.freghi[regd]), "-", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xeeb00b00: // D[regd] = const(regn,regm)
-		regn = regn<<4 | regm
-		regm = 0x40000000
-		if regn&0x80 != 0 {
-			regm |= 0x80000000
-		}
-		if regn&0x40 != 0 {
-			regm ^= 0x7fc00000
-		}
-		regm |= regn & 0x3f << 16
-		m.freglo[regd] = 0
-		m.freghi[regd] = regm
-
-		if fptrace > 0 {
-			print("*** immed D[", regd, "] = ", hex(m.freghi[regd]), "-", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xeeb00a00: // F[regd] = const(regn,regm)
-		regn = regn<<4 | regm
-		regm = 0x40000000
-		if regn&0x80 != 0 {
-			regm |= 0x80000000
-		}
-		if regn&0x40 != 0 {
-			regm ^= 0x7e000000
-		}
-		regm |= regn & 0x3f << 19
-		m.freglo[regd] = regm
-
-		if fptrace > 0 {
-			print("*** immed D[", regd, "] = ", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xee300b00: // D[regd] = D[regn]+D[regm]
-		fputd(regd, fadd64(fgetd(regn), fgetd(regm)))
-
-		if fptrace > 0 {
-			print("*** add D[", regd, "] = D[", regn, "]+D[", regm, "] ", hex(m.freghi[regd]), "-", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xee300a00: // F[regd] = F[regn]+F[regm]
-		m.freglo[regd] = f64to32(fadd64(f32to64(m.freglo[regn]), f32to64(m.freglo[regm])))
-
-		if fptrace > 0 {
-			print("*** add F[", regd, "] = F[", regn, "]+F[", regm, "] ", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xee300b40: // D[regd] = D[regn]-D[regm]
-		fputd(regd, fsub64(fgetd(regn), fgetd(regm)))
-
-		if fptrace > 0 {
-			print("*** sub D[", regd, "] = D[", regn, "]-D[", regm, "] ", hex(m.freghi[regd]), "-", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xee300a40: // F[regd] = F[regn]-F[regm]
-		m.freglo[regd] = f64to32(fsub64(f32to64(m.freglo[regn]), f32to64(m.freglo[regm])))
-
-		if fptrace > 0 {
-			print("*** sub F[", regd, "] = F[", regn, "]-F[", regm, "] ", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xee200b00: // D[regd] = D[regn]*D[regm]
-		fputd(regd, fmul64(fgetd(regn), fgetd(regm)))
-
-		if fptrace > 0 {
-			print("*** mul D[", regd, "] = D[", regn, "]*D[", regm, "] ", hex(m.freghi[regd]), "-", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xee200a00: // F[regd] = F[regn]*F[regm]
-		m.freglo[regd] = f64to32(fmul64(f32to64(m.freglo[regn]), f32to64(m.freglo[regm])))
-
-		if fptrace > 0 {
-			print("*** mul F[", regd, "] = F[", regn, "]*F[", regm, "] ", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xee800b00: // D[regd] = D[regn]/D[regm]
-		fputd(regd, fdiv64(fgetd(regn), fgetd(regm)))
-
-		if fptrace > 0 {
-			print("*** div D[", regd, "] = D[", regn, "]/D[", regm, "] ", hex(m.freghi[regd]), "-", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xee800a00: // F[regd] = F[regn]/F[regm]
-		m.freglo[regd] = f64to32(fdiv64(f32to64(m.freglo[regn]), f32to64(m.freglo[regm])))
-
-		if fptrace > 0 {
-			print("*** div F[", regd, "] = F[", regn, "]/F[", regm, "] ", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xee000b10: // S[regn] = R[regd] (MOVW) (regm ignored)
-		m.freglo[regn] = regs[regd]
-
-		if fptrace > 0 {
-			print("*** cpy S[", regn, "] = R[", regd, "] ", hex(m.freglo[regn]), "\n")
-		}
-		return 1
-
-	case 0xee100b10: // R[regd] = S[regn] (MOVW) (regm ignored)
-		regs[regd] = m.freglo[regn]
-
-		if fptrace > 0 {
-			print("*** cpy R[", regd, "] = S[", regn, "] ", hex(regs[regd]), "\n")
-		}
-		return 1
-	}
-
-	// regd, regm are 4bit variables
-	switch i & 0xffff0ff0 {
-	case 0xeeb00a40: // F[regd] = F[regm] (MOVF)
-		m.freglo[regd] = m.freglo[regm]
-
-		if fptrace > 0 {
-			print("*** F[", regd, "] = F[", regm, "] ", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xeeb00b40: // D[regd] = D[regm] (MOVD)
-		m.freglo[regd] = m.freglo[regm]
-		m.freghi[regd] = m.freghi[regm]
-
-		if fptrace > 0 {
-			print("*** D[", regd, "] = D[", regm, "] ", hex(m.freghi[regd]), "-", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xeeb10bc0: // D[regd] = sqrt D[regm]
-		fputd(regd, sqrt(fgetd(regm)))
-
-		if fptrace > 0 {
-			print("*** D[", regd, "] = sqrt D[", regm, "] ", hex(m.freghi[regd]), "-", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xeeb00bc0: // D[regd] = abs D[regm]
-		m.freglo[regd] = m.freglo[regm]
-		m.freghi[regd] = m.freghi[regm] & (1<<31 - 1)
-
-		if fptrace > 0 {
-			print("*** D[", regd, "] = abs D[", regm, "] ", hex(m.freghi[regd]), "-", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xeeb00ac0: // F[regd] = abs F[regm]
-		m.freglo[regd] = m.freglo[regm] & (1<<31 - 1)
-
-		if fptrace > 0 {
-			print("*** F[", regd, "] = abs F[", regm, "] ", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xeeb40bc0: // D[regd] :: D[regm] (CMPD)
-		cmp, nan := fcmp64(fgetd(regd), fgetd(regm))
-		m.fflag = fstatus(nan, cmp)
-
-		if fptrace > 0 {
-			print("*** cmp D[", regd, "]::D[", regm, "] ", hex(m.fflag), "\n")
-		}
-		return 1
-
-	case 0xeeb40ac0: // F[regd] :: F[regm] (CMPF)
-		cmp, nan := fcmp64(f32to64(m.freglo[regd]), f32to64(m.freglo[regm]))
-		m.fflag = fstatus(nan, cmp)
-
-		if fptrace > 0 {
-			print("*** cmp F[", regd, "]::F[", regm, "] ", hex(m.fflag), "\n")
-		}
-		return 1
-
-	case 0xeeb70ac0: // D[regd] = F[regm] (MOVFD)
-		fputd(regd, f32to64(m.freglo[regm]))
-
-		if fptrace > 0 {
-			print("*** f2d D[", regd, "]=F[", regm, "] ", hex(m.freghi[regd]), "-", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xeeb70bc0: // F[regd] = D[regm] (MOVDF)
-		m.freglo[regd] = f64to32(fgetd(regm))
-
-		if fptrace > 0 {
-			print("*** d2f F[", regd, "]=D[", regm, "] ", hex(m.freghi[regd]), "-", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xeebd0ac0: // S[regd] = F[regm] (MOVFW)
-		sval, ok := f64toint(f32to64(m.freglo[regm]))
-		if !ok || int64(int32(sval)) != sval {
-			sval = 0
-		}
-		m.freglo[regd] = uint32(sval)
-		if fptrace > 0 {
-			print("*** fix S[", regd, "]=F[", regm, "] ", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xeebc0ac0: // S[regd] = F[regm] (MOVFW.U)
-		sval, ok := f64toint(f32to64(m.freglo[regm]))
-		if !ok || int64(uint32(sval)) != sval {
-			sval = 0
-		}
-		m.freglo[regd] = uint32(sval)
-
-		if fptrace > 0 {
-			print("*** fix unsigned S[", regd, "]=F[", regm, "] ", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xeebd0bc0: // S[regd] = D[regm] (MOVDW)
-		sval, ok := f64toint(fgetd(regm))
-		if !ok || int64(int32(sval)) != sval {
-			sval = 0
-		}
-		m.freglo[regd] = uint32(sval)
-
-		if fptrace > 0 {
-			print("*** fix S[", regd, "]=D[", regm, "] ", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xeebc0bc0: // S[regd] = D[regm] (MOVDW.U)
-		sval, ok := f64toint(fgetd(regm))
-		if !ok || int64(uint32(sval)) != sval {
-			sval = 0
-		}
-		m.freglo[regd] = uint32(sval)
-
-		if fptrace > 0 {
-			print("*** fix unsigned S[", regd, "]=D[", regm, "] ", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xeeb80ac0: // D[regd] = S[regm] (MOVWF)
-		cmp := int32(m.freglo[regm])
-		if cmp < 0 {
-			fputf(regd, f64to32(fintto64(int64(-cmp))))
-			m.freglo[regd] ^= 0x80000000
-		} else {
-			fputf(regd, f64to32(fintto64(int64(cmp))))
-		}
-
-		if fptrace > 0 {
-			print("*** float D[", regd, "]=S[", regm, "] ", hex(m.freghi[regd]), "-", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xeeb80a40: // D[regd] = S[regm] (MOVWF.U)
-		fputf(regd, f64to32(fintto64(int64(m.freglo[regm]))))
-
-		if fptrace > 0 {
-			print("*** float unsigned D[", regd, "]=S[", regm, "] ", hex(m.freghi[regd]), "-", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xeeb80bc0: // D[regd] = S[regm] (MOVWD)
-		cmp := int32(m.freglo[regm])
-		if cmp < 0 {
-			fputd(regd, fintto64(int64(-cmp)))
-			m.freghi[regd] ^= 0x80000000
-		} else {
-			fputd(regd, fintto64(int64(cmp)))
-		}
-
-		if fptrace > 0 {
-			print("*** float D[", regd, "]=S[", regm, "] ", hex(m.freghi[regd]), "-", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-
-	case 0xeeb80b40: // D[regd] = S[regm] (MOVWD.U)
-		fputd(regd, fintto64(int64(m.freglo[regm])))
-
-		if fptrace > 0 {
-			print("*** float unsigned D[", regd, "]=S[", regm, "] ", hex(m.freghi[regd]), "-", hex(m.freglo[regd]), "\n")
-		}
-		return 1
-	}
-
-	if i&0xff000000 == 0xee000000 || i&0xff000000 == 0xed000000 {
-		print("stepflt ", pc, " ", hex(i), "\n")
-		fabort()
-	}
-	return 0
-}
-
-//go:nosplit
-func _sfloat2(pc uint32, regs [15]uint32) (newpc uint32) {
-	systemstack(func() {
-		newpc = sfloat2(pc, &regs)
-	})
-	return
-}
-
-func _sfloatpanic()
-
-func sfloat2(pc uint32, regs *[15]uint32) uint32 {
-	first := true
-	for {
-		skip := stepflt((*uint32)(unsafe.Pointer(uintptr(pc))), regs)
-		if skip == 0 {
-			break
-		}
-		first = false
-		if skip == _FAULT {
-			// Encountered bad address in store/load.
-			// Record signal information and return to assembly
-			// trampoline that fakes the call.
-			const SIGSEGV = 11
-			curg := getg().m.curg
-			curg.sig = SIGSEGV
-			curg.sigcode0 = 0
-			curg.sigcode1 = 0
-			curg.sigpc = uintptr(pc)
-			pc = uint32(funcPC(_sfloatpanic))
-			break
-		}
-		pc += 4 * uint32(skip)
-	}
-	if first {
-		print("sfloat2 ", pc, " ", hex(*(*uint32)(unsafe.Pointer(uintptr(pc)))), "\n")
-		fabort() // not ok to fail first instruction
-	}
-	return pc
-}
diff --git a/src/runtime/sqrt_test.go b/src/runtime/sqrt_test.go
deleted file mode 100644
index d5ccc7f..0000000
--- a/src/runtime/sqrt_test.go
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// A copy of Sqrt tests from the math package to test the
-// purely integer arithmetic implementation in sqrt.go.
-
-package runtime_test
-
-import (
-	"math"
-	"runtime"
-	"testing"
-)
-
-func SqrtRT(x float64) float64 {
-	return math.Float64frombits(runtime.Sqrt(math.Float64bits(x)))
-}
-
-func TestSqrt(t *testing.T) {
-	for i := 0; i < len(vf); i++ {
-		a := math.Abs(vf[i])
-		if f := SqrtRT(a); sqrt[i] != f {
-			t.Errorf("Sqrt(%g) = %g, want %g", a, f, sqrt[i])
-		}
-	}
-	for i := 0; i < len(vfsqrtSC); i++ {
-		if f := SqrtRT(vfsqrtSC[i]); !alike(sqrtSC[i], f) {
-			t.Errorf("Sqrt(%g) = %g, want %g", vfsqrtSC[i], f, sqrtSC[i])
-		}
-	}
-}
-
-func alike(a, b float64) bool {
-	switch {
-	case math.IsNaN(a) && math.IsNaN(b):
-		return true
-	case a == b:
-		return math.Signbit(a) == math.Signbit(b)
-	}
-	return false
-}
-
-var vf = []float64{
-	4.9790119248836735e+00,
-	7.7388724745781045e+00,
-	-2.7688005719200159e-01,
-	-5.0106036182710749e+00,
-	9.6362937071984173e+00,
-	2.9263772392439646e+00,
-	5.2290834314593066e+00,
-	2.7279399104360102e+00,
-	1.8253080916808550e+00,
-	-8.6859247685756013e+00,
-}
-
-var sqrt = []float64{
-	2.2313699659365484748756904e+00,
-	2.7818829009464263511285458e+00,
-	5.2619393496314796848143251e-01,
-	2.2384377628763938724244104e+00,
-	3.1042380236055381099288487e+00,
-	1.7106657298385224403917771e+00,
-	2.286718922705479046148059e+00,
-	1.6516476350711159636222979e+00,
-	1.3510396336454586262419247e+00,
-	2.9471892997524949215723329e+00,
-}
-
-var vfsqrtSC = []float64{
-	math.Inf(-1),
-	-math.Pi,
-	math.Copysign(0, -1),
-	0,
-	math.Inf(1),
-	math.NaN(),
-}
-var sqrtSC = []float64{
-	math.NaN(),
-	math.NaN(),
-	math.Copysign(0, -1),
-	0,
-	math.Inf(1),
-	math.NaN(),
-}
diff --git a/src/runtime/stack1.go b/src/runtime/stack1.go
deleted file mode 100644
index efcb5f2..0000000
--- a/src/runtime/stack1.go
+++ /dev/null
@@ -1,917 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-const (
-	// stackDebug == 0: no logging
-	//            == 1: logging of per-stack operations
-	//            == 2: logging of per-frame operations
-	//            == 3: logging of per-word updates
-	//            == 4: logging of per-word reads
-	stackDebug       = 0
-	stackFromSystem  = 0 // allocate stacks from system memory instead of the heap
-	stackFaultOnFree = 0 // old stacks are mapped noaccess to detect use after free
-	stackPoisonCopy  = 0 // fill stack that should not be accessed with garbage, to detect bad dereferences during copy
-
-	stackCache = 1
-)
-
-const (
-	uintptrMask = 1<<(8*ptrSize) - 1
-	poisonStack = uintptrMask & 0x6868686868686868
-
-	// Goroutine preemption request.
-	// Stored into g->stackguard0 to cause split stack check failure.
-	// Must be greater than any real sp.
-	// 0xfffffade in hex.
-	stackPreempt = uintptrMask & -1314
-
-	// Thread is forking.
-	// Stored into g->stackguard0 to cause split stack check failure.
-	// Must be greater than any real sp.
-	stackFork = uintptrMask & -1234
-)
-
-// Global pool of spans that have free stacks.
-// Stacks are assigned an order according to size.
-//     order = log_2(size/FixedStack)
-// There is a free list for each order.
-// TODO: one lock per order?
-var stackpool [_NumStackOrders]mspan
-var stackpoolmu mutex
-
-// List of stack spans to be freed at the end of GC. Protected by
-// stackpoolmu.
-var stackFreeQueue mspan
-
-// Cached value of haveexperiment("framepointer")
-var framepointer_enabled bool
-
-func stackinit() {
-	if _StackCacheSize&_PageMask != 0 {
-		throw("cache size must be a multiple of page size")
-	}
-	for i := range stackpool {
-		mSpanList_Init(&stackpool[i])
-	}
-	mSpanList_Init(&stackFreeQueue)
-}
-
-// Allocates a stack from the free pool.  Must be called with
-// stackpoolmu held.
-func stackpoolalloc(order uint8) gclinkptr {
-	list := &stackpool[order]
-	s := list.next
-	if s == list {
-		// no free stacks.  Allocate another span worth.
-		s = mHeap_AllocStack(&mheap_, _StackCacheSize>>_PageShift)
-		if s == nil {
-			throw("out of memory")
-		}
-		if s.ref != 0 {
-			throw("bad ref")
-		}
-		if s.freelist.ptr() != nil {
-			throw("bad freelist")
-		}
-		for i := uintptr(0); i < _StackCacheSize; i += _FixedStack << order {
-			x := gclinkptr(uintptr(s.start)<<_PageShift + i)
-			x.ptr().next = s.freelist
-			s.freelist = x
-		}
-		mSpanList_Insert(list, s)
-	}
-	x := s.freelist
-	if x.ptr() == nil {
-		throw("span has no free stacks")
-	}
-	s.freelist = x.ptr().next
-	s.ref++
-	if s.freelist.ptr() == nil {
-		// all stacks in s are allocated.
-		mSpanList_Remove(s)
-	}
-	return x
-}
-
-// Adds stack x to the free pool.  Must be called with stackpoolmu held.
-func stackpoolfree(x gclinkptr, order uint8) {
-	s := mHeap_Lookup(&mheap_, (unsafe.Pointer)(x))
-	if s.state != _MSpanStack {
-		throw("freeing stack not in a stack span")
-	}
-	if s.freelist.ptr() == nil {
-		// s will now have a free stack
-		mSpanList_Insert(&stackpool[order], s)
-	}
-	x.ptr().next = s.freelist
-	s.freelist = x
-	s.ref--
-	if gcphase == _GCoff && s.ref == 0 {
-		// Span is completely free. Return it to the heap
-		// immediately if we're sweeping.
-		//
-		// If GC is active, we delay the free until the end of
-		// GC to avoid the following type of situation:
-		//
-		// 1) GC starts, scans a SudoG but does not yet mark the SudoG.elem pointer
-		// 2) The stack that pointer points to is copied
-		// 3) The old stack is freed
-		// 4) The containing span is marked free
-		// 5) GC attempts to mark the SudoG.elem pointer. The
-		//    marking fails because the pointer looks like a
-		//    pointer into a free span.
-		//
-		// By not freeing, we prevent step #4 until GC is done.
-		mSpanList_Remove(s)
-		s.freelist = 0
-		mHeap_FreeStack(&mheap_, s)
-	}
-}
-
-// stackcacherefill/stackcacherelease implement a global pool of stack segments.
-// The pool is required to prevent unlimited growth of per-thread caches.
-func stackcacherefill(c *mcache, order uint8) {
-	if stackDebug >= 1 {
-		print("stackcacherefill order=", order, "\n")
-	}
-
-	// Grab some stacks from the global cache.
-	// Grab half of the allowed capacity (to prevent thrashing).
-	var list gclinkptr
-	var size uintptr
-	lock(&stackpoolmu)
-	for size < _StackCacheSize/2 {
-		x := stackpoolalloc(order)
-		x.ptr().next = list
-		list = x
-		size += _FixedStack << order
-	}
-	unlock(&stackpoolmu)
-	c.stackcache[order].list = list
-	c.stackcache[order].size = size
-}
-
-func stackcacherelease(c *mcache, order uint8) {
-	if stackDebug >= 1 {
-		print("stackcacherelease order=", order, "\n")
-	}
-	x := c.stackcache[order].list
-	size := c.stackcache[order].size
-	lock(&stackpoolmu)
-	for size > _StackCacheSize/2 {
-		y := x.ptr().next
-		stackpoolfree(x, order)
-		x = y
-		size -= _FixedStack << order
-	}
-	unlock(&stackpoolmu)
-	c.stackcache[order].list = x
-	c.stackcache[order].size = size
-}
-
-func stackcache_clear(c *mcache) {
-	if stackDebug >= 1 {
-		print("stackcache clear\n")
-	}
-	lock(&stackpoolmu)
-	for order := uint8(0); order < _NumStackOrders; order++ {
-		x := c.stackcache[order].list
-		for x.ptr() != nil {
-			y := x.ptr().next
-			stackpoolfree(x, order)
-			x = y
-		}
-		c.stackcache[order].list = 0
-		c.stackcache[order].size = 0
-	}
-	unlock(&stackpoolmu)
-}
-
-func stackalloc(n uint32) (stack, []stkbar) {
-	// Stackalloc must be called on scheduler stack, so that we
-	// never try to grow the stack during the code that stackalloc runs.
-	// Doing so would cause a deadlock (issue 1547).
-	thisg := getg()
-	if thisg != thisg.m.g0 {
-		throw("stackalloc not on scheduler stack")
-	}
-	if n&(n-1) != 0 {
-		throw("stack size not a power of 2")
-	}
-	if stackDebug >= 1 {
-		print("stackalloc ", n, "\n")
-	}
-
-	// Compute the size of stack barrier array.
-	maxstkbar := gcMaxStackBarriers(int(n))
-	nstkbar := unsafe.Sizeof(stkbar{}) * uintptr(maxstkbar)
-
-	if debug.efence != 0 || stackFromSystem != 0 {
-		v := sysAlloc(round(uintptr(n), _PageSize), &memstats.stacks_sys)
-		if v == nil {
-			throw("out of memory (stackalloc)")
-		}
-		top := uintptr(n) - nstkbar
-		stkbarSlice := slice{add(v, top), 0, maxstkbar}
-		return stack{uintptr(v), uintptr(v) + top}, *(*[]stkbar)(unsafe.Pointer(&stkbarSlice))
-	}
-
-	// Small stacks are allocated with a fixed-size free-list allocator.
-	// If we need a stack of a bigger size, we fall back on allocating
-	// a dedicated span.
-	var v unsafe.Pointer
-	if stackCache != 0 && n < _FixedStack<<_NumStackOrders && n < _StackCacheSize {
-		order := uint8(0)
-		n2 := n
-		for n2 > _FixedStack {
-			order++
-			n2 >>= 1
-		}
-		var x gclinkptr
-		c := thisg.m.mcache
-		if c == nil || thisg.m.preemptoff != "" || thisg.m.helpgc != 0 {
-			// c == nil can happen in the guts of exitsyscall or
-			// procresize. Just get a stack from the global pool.
-			// Also don't touch stackcache during gc
-			// as it's flushed concurrently.
-			lock(&stackpoolmu)
-			x = stackpoolalloc(order)
-			unlock(&stackpoolmu)
-		} else {
-			x = c.stackcache[order].list
-			if x.ptr() == nil {
-				stackcacherefill(c, order)
-				x = c.stackcache[order].list
-			}
-			c.stackcache[order].list = x.ptr().next
-			c.stackcache[order].size -= uintptr(n)
-		}
-		v = (unsafe.Pointer)(x)
-	} else {
-		s := mHeap_AllocStack(&mheap_, round(uintptr(n), _PageSize)>>_PageShift)
-		if s == nil {
-			throw("out of memory")
-		}
-		v = (unsafe.Pointer)(s.start << _PageShift)
-	}
-
-	if raceenabled {
-		racemalloc(v, uintptr(n))
-	}
-	if stackDebug >= 1 {
-		print("  allocated ", v, "\n")
-	}
-	top := uintptr(n) - nstkbar
-	stkbarSlice := slice{add(v, top), 0, maxstkbar}
-	return stack{uintptr(v), uintptr(v) + top}, *(*[]stkbar)(unsafe.Pointer(&stkbarSlice))
-}
-
-func stackfree(stk stack, n uintptr) {
-	gp := getg()
-	v := (unsafe.Pointer)(stk.lo)
-	if n&(n-1) != 0 {
-		throw("stack not a power of 2")
-	}
-	if stk.lo+n < stk.hi {
-		throw("bad stack size")
-	}
-	if stackDebug >= 1 {
-		println("stackfree", v, n)
-		memclr(v, n) // for testing, clobber stack data
-	}
-	if debug.efence != 0 || stackFromSystem != 0 {
-		if debug.efence != 0 || stackFaultOnFree != 0 {
-			sysFault(v, n)
-		} else {
-			sysFree(v, n, &memstats.stacks_sys)
-		}
-		return
-	}
-	if stackCache != 0 && n < _FixedStack<<_NumStackOrders && n < _StackCacheSize {
-		order := uint8(0)
-		n2 := n
-		for n2 > _FixedStack {
-			order++
-			n2 >>= 1
-		}
-		x := gclinkptr(v)
-		c := gp.m.mcache
-		if c == nil || gp.m.preemptoff != "" || gp.m.helpgc != 0 {
-			lock(&stackpoolmu)
-			stackpoolfree(x, order)
-			unlock(&stackpoolmu)
-		} else {
-			if c.stackcache[order].size >= _StackCacheSize {
-				stackcacherelease(c, order)
-			}
-			x.ptr().next = c.stackcache[order].list
-			c.stackcache[order].list = x
-			c.stackcache[order].size += n
-		}
-	} else {
-		s := mHeap_Lookup(&mheap_, v)
-		if s.state != _MSpanStack {
-			println(hex(s.start<<_PageShift), v)
-			throw("bad span state")
-		}
-		if gcphase == _GCoff {
-			// Free the stack immediately if we're
-			// sweeping.
-			mHeap_FreeStack(&mheap_, s)
-		} else {
-			// Otherwise, add it to a list of stack spans
-			// to be freed at the end of GC.
-			//
-			// TODO(austin): Make it possible to re-use
-			// these spans as stacks, like we do for small
-			// stack spans. (See issue #11466.)
-			lock(&stackpoolmu)
-			mSpanList_Insert(&stackFreeQueue, s)
-			unlock(&stackpoolmu)
-		}
-	}
-}
-
-var maxstacksize uintptr = 1 << 20 // enough until runtime.main sets it for real
-
-var ptrnames = []string{
-	0: "scalar",
-	1: "ptr",
-}
-
-// Stack frame layout
-//
-// (x86)
-// +------------------+
-// | args from caller |
-// +------------------+ <- frame->argp
-// |  return address  |
-// +------------------+
-// |  caller's BP (*) | (*) if framepointer_enabled && varp < sp
-// +------------------+ <- frame->varp
-// |     locals       |
-// +------------------+
-// |  args to callee  |
-// +------------------+ <- frame->sp
-//
-// (arm)
-// +------------------+
-// | args from caller |
-// +------------------+ <- frame->argp
-// | caller's retaddr |
-// +------------------+ <- frame->varp
-// |     locals       |
-// +------------------+
-// |  args to callee  |
-// +------------------+
-// |  return address  |
-// +------------------+ <- frame->sp
-
-type adjustinfo struct {
-	old   stack
-	delta uintptr // ptr distance from old to new stack (newbase - oldbase)
-}
-
-// Adjustpointer checks whether *vpp is in the old stack described by adjinfo.
-// If so, it rewrites *vpp to point into the new stack.
-func adjustpointer(adjinfo *adjustinfo, vpp unsafe.Pointer) {
-	pp := (*unsafe.Pointer)(vpp)
-	p := *pp
-	if stackDebug >= 4 {
-		print("        ", pp, ":", p, "\n")
-	}
-	if adjinfo.old.lo <= uintptr(p) && uintptr(p) < adjinfo.old.hi {
-		*pp = add(p, adjinfo.delta)
-		if stackDebug >= 3 {
-			print("        adjust ptr ", pp, ":", p, " -> ", *pp, "\n")
-		}
-	}
-}
-
-// Information from the compiler about the layout of stack frames.
-type bitvector struct {
-	n        int32 // # of bits
-	bytedata *uint8
-}
-
-type gobitvector struct {
-	n        uintptr
-	bytedata []uint8
-}
-
-func gobv(bv bitvector) gobitvector {
-	return gobitvector{
-		uintptr(bv.n),
-		(*[1 << 30]byte)(unsafe.Pointer(bv.bytedata))[:(bv.n+7)/8],
-	}
-}
-
-func ptrbit(bv *gobitvector, i uintptr) uint8 {
-	return (bv.bytedata[i/8] >> (i % 8)) & 1
-}
-
-// bv describes the memory starting at address scanp.
-// Adjust any pointers contained therein.
-func adjustpointers(scanp unsafe.Pointer, cbv *bitvector, adjinfo *adjustinfo, f *_func) {
-	bv := gobv(*cbv)
-	minp := adjinfo.old.lo
-	maxp := adjinfo.old.hi
-	delta := adjinfo.delta
-	num := uintptr(bv.n)
-	for i := uintptr(0); i < num; i++ {
-		if stackDebug >= 4 {
-			print("        ", add(scanp, i*ptrSize), ":", ptrnames[ptrbit(&bv, i)], ":", hex(*(*uintptr)(add(scanp, i*ptrSize))), " # ", i, " ", bv.bytedata[i/8], "\n")
-		}
-		if ptrbit(&bv, i) == 1 {
-			pp := (*uintptr)(add(scanp, i*ptrSize))
-			p := *pp
-			if f != nil && 0 < p && p < _PageSize && debug.invalidptr != 0 || p == poisonStack {
-				// Looks like a junk value in a pointer slot.
-				// Live analysis wrong?
-				getg().m.traceback = 2
-				print("runtime: bad pointer in frame ", funcname(f), " at ", pp, ": ", hex(p), "\n")
-				throw("invalid stack pointer")
-			}
-			if minp <= p && p < maxp {
-				if stackDebug >= 3 {
-					print("adjust ptr ", p, " ", funcname(f), "\n")
-				}
-				*pp = p + delta
-			}
-		}
-	}
-}
-
-// Note: the argument/return area is adjusted by the callee.
-func adjustframe(frame *stkframe, arg unsafe.Pointer) bool {
-	adjinfo := (*adjustinfo)(arg)
-	targetpc := frame.continpc
-	if targetpc == 0 {
-		// Frame is dead.
-		return true
-	}
-	f := frame.fn
-	if stackDebug >= 2 {
-		print("    adjusting ", funcname(f), " frame=[", hex(frame.sp), ",", hex(frame.fp), "] pc=", hex(frame.pc), " continpc=", hex(frame.continpc), "\n")
-	}
-	if f.entry == systemstack_switchPC {
-		// A special routine at the bottom of stack of a goroutine that does an systemstack call.
-		// We will allow it to be copied even though we don't
-		// have full GC info for it (because it is written in asm).
-		return true
-	}
-	if targetpc != f.entry {
-		targetpc--
-	}
-	pcdata := pcdatavalue(f, _PCDATA_StackMapIndex, targetpc)
-	if pcdata == -1 {
-		pcdata = 0 // in prologue
-	}
-
-	// Adjust local variables if stack frame has been allocated.
-	size := frame.varp - frame.sp
-	var minsize uintptr
-	switch thechar {
-	case '6', '8':
-		minsize = 0
-	case '7':
-		minsize = spAlign
-	default:
-		minsize = ptrSize
-	}
-	if size > minsize {
-		var bv bitvector
-		stackmap := (*stackmap)(funcdata(f, _FUNCDATA_LocalsPointerMaps))
-		if stackmap == nil || stackmap.n <= 0 {
-			print("runtime: frame ", funcname(f), " untyped locals ", hex(frame.varp-size), "+", hex(size), "\n")
-			throw("missing stackmap")
-		}
-		// Locals bitmap information, scan just the pointers in locals.
-		if pcdata < 0 || pcdata >= stackmap.n {
-			// don't know where we are
-			print("runtime: pcdata is ", pcdata, " and ", stackmap.n, " locals stack map entries for ", funcname(f), " (targetpc=", targetpc, ")\n")
-			throw("bad symbol table")
-		}
-		bv = stackmapdata(stackmap, pcdata)
-		size = uintptr(bv.n) * ptrSize
-		if stackDebug >= 3 {
-			print("      locals ", pcdata, "/", stackmap.n, " ", size/ptrSize, " words ", bv.bytedata, "\n")
-		}
-		adjustpointers(unsafe.Pointer(frame.varp-size), &bv, adjinfo, f)
-	}
-
-	// Adjust saved base pointer if there is one.
-	if thechar == '6' && frame.argp-frame.varp == 2*regSize {
-		if !framepointer_enabled {
-			print("runtime: found space for saved base pointer, but no framepointer experiment\n")
-			print("argp=", hex(frame.argp), " varp=", hex(frame.varp), "\n")
-			throw("bad frame layout")
-		}
-		if stackDebug >= 3 {
-			print("      saved bp\n")
-		}
-		adjustpointer(adjinfo, unsafe.Pointer(frame.varp))
-	}
-
-	// Adjust arguments.
-	if frame.arglen > 0 {
-		var bv bitvector
-		if frame.argmap != nil {
-			bv = *frame.argmap
-		} else {
-			stackmap := (*stackmap)(funcdata(f, _FUNCDATA_ArgsPointerMaps))
-			if stackmap == nil || stackmap.n <= 0 {
-				print("runtime: frame ", funcname(f), " untyped args ", frame.argp, "+", uintptr(frame.arglen), "\n")
-				throw("missing stackmap")
-			}
-			if pcdata < 0 || pcdata >= stackmap.n {
-				// don't know where we are
-				print("runtime: pcdata is ", pcdata, " and ", stackmap.n, " args stack map entries for ", funcname(f), " (targetpc=", targetpc, ")\n")
-				throw("bad symbol table")
-			}
-			bv = stackmapdata(stackmap, pcdata)
-		}
-		if stackDebug >= 3 {
-			print("      args\n")
-		}
-		adjustpointers(unsafe.Pointer(frame.argp), &bv, adjinfo, nil)
-	}
-	return true
-}
-
-func adjustctxt(gp *g, adjinfo *adjustinfo) {
-	adjustpointer(adjinfo, (unsafe.Pointer)(&gp.sched.ctxt))
-}
-
-func adjustdefers(gp *g, adjinfo *adjustinfo) {
-	// Adjust defer argument blocks the same way we adjust active stack frames.
-	tracebackdefers(gp, adjustframe, noescape(unsafe.Pointer(adjinfo)))
-
-	// Adjust pointers in the Defer structs.
-	// Defer structs themselves are never on the stack.
-	for d := gp._defer; d != nil; d = d.link {
-		adjustpointer(adjinfo, (unsafe.Pointer)(&d.fn))
-		adjustpointer(adjinfo, (unsafe.Pointer)(&d.sp))
-		adjustpointer(adjinfo, (unsafe.Pointer)(&d._panic))
-	}
-}
-
-func adjustpanics(gp *g, adjinfo *adjustinfo) {
-	// Panics are on stack and already adjusted.
-	// Update pointer to head of list in G.
-	adjustpointer(adjinfo, (unsafe.Pointer)(&gp._panic))
-}
-
-func adjustsudogs(gp *g, adjinfo *adjustinfo) {
-	// the data elements pointed to by a SudoG structure
-	// might be in the stack.
-	for s := gp.waiting; s != nil; s = s.waitlink {
-		adjustpointer(adjinfo, (unsafe.Pointer)(&s.elem))
-		adjustpointer(adjinfo, (unsafe.Pointer)(&s.selectdone))
-	}
-}
-
-func adjuststkbar(gp *g, adjinfo *adjustinfo) {
-	for i := int(gp.stkbarPos); i < len(gp.stkbar); i++ {
-		adjustpointer(adjinfo, (unsafe.Pointer)(&gp.stkbar[i].savedLRPtr))
-	}
-}
-
-func fillstack(stk stack, b byte) {
-	for p := stk.lo; p < stk.hi; p++ {
-		*(*byte)(unsafe.Pointer(p)) = b
-	}
-}
-
-// Copies gp's stack to a new stack of a different size.
-// Caller must have changed gp status to Gcopystack.
-func copystack(gp *g, newsize uintptr) {
-	if gp.syscallsp != 0 {
-		throw("stack growth not allowed in system call")
-	}
-	old := gp.stack
-	if old.lo == 0 {
-		throw("nil stackbase")
-	}
-	used := old.hi - gp.sched.sp
-
-	// allocate new stack
-	new, newstkbar := stackalloc(uint32(newsize))
-	if stackPoisonCopy != 0 {
-		fillstack(new, 0xfd)
-	}
-	if stackDebug >= 1 {
-		print("copystack gp=", gp, " [", hex(old.lo), " ", hex(old.hi-used), " ", hex(old.hi), "]/", gp.stackAlloc, " -> [", hex(new.lo), " ", hex(new.hi-used), " ", hex(new.hi), "]/", newsize, "\n")
-	}
-
-	// adjust pointers in the to-be-copied frames
-	var adjinfo adjustinfo
-	adjinfo.old = old
-	adjinfo.delta = new.hi - old.hi
-	gentraceback(^uintptr(0), ^uintptr(0), 0, gp, 0, nil, 0x7fffffff, adjustframe, noescape(unsafe.Pointer(&adjinfo)), 0)
-
-	// adjust other miscellaneous things that have pointers into stacks.
-	adjustctxt(gp, &adjinfo)
-	adjustdefers(gp, &adjinfo)
-	adjustpanics(gp, &adjinfo)
-	adjustsudogs(gp, &adjinfo)
-	adjuststkbar(gp, &adjinfo)
-
-	// copy the stack to the new location
-	if stackPoisonCopy != 0 {
-		fillstack(new, 0xfb)
-	}
-	memmove(unsafe.Pointer(new.hi-used), unsafe.Pointer(old.hi-used), used)
-
-	// copy old stack barriers to new stack barrier array
-	newstkbar = newstkbar[:len(gp.stkbar)]
-	copy(newstkbar, gp.stkbar)
-
-	// Swap out old stack for new one
-	gp.stack = new
-	gp.stackguard0 = new.lo + _StackGuard // NOTE: might clobber a preempt request
-	gp.sched.sp = new.hi - used
-	oldsize := gp.stackAlloc
-	gp.stackAlloc = newsize
-	gp.stkbar = newstkbar
-
-	// free old stack
-	if stackPoisonCopy != 0 {
-		fillstack(old, 0xfc)
-	}
-	stackfree(old, oldsize)
-}
-
-// round x up to a power of 2.
-func round2(x int32) int32 {
-	s := uint(0)
-	for 1<<s < x {
-		s++
-	}
-	return 1 << s
-}
-
-// Called from runtime·morestack when more stack is needed.
-// Allocate larger stack and relocate to new stack.
-// Stack growth is multiplicative, for constant amortized cost.
-//
-// g->atomicstatus will be Grunning or Gscanrunning upon entry.
-// If the GC is trying to stop this g then it will set preemptscan to true.
-func newstack() {
-	thisg := getg()
-	// TODO: double check all gp. shouldn't be getg().
-	if thisg.m.morebuf.g.ptr().stackguard0 == stackFork {
-		throw("stack growth after fork")
-	}
-	if thisg.m.morebuf.g.ptr() != thisg.m.curg {
-		print("runtime: newstack called from g=", thisg.m.morebuf.g, "\n"+"\tm=", thisg.m, " m->curg=", thisg.m.curg, " m->g0=", thisg.m.g0, " m->gsignal=", thisg.m.gsignal, "\n")
-		morebuf := thisg.m.morebuf
-		traceback(morebuf.pc, morebuf.sp, morebuf.lr, morebuf.g.ptr())
-		throw("runtime: wrong goroutine in newstack")
-	}
-	if thisg.m.curg.throwsplit {
-		gp := thisg.m.curg
-		// Update syscallsp, syscallpc in case traceback uses them.
-		morebuf := thisg.m.morebuf
-		gp.syscallsp = morebuf.sp
-		gp.syscallpc = morebuf.pc
-		print("runtime: newstack sp=", hex(gp.sched.sp), " stack=[", hex(gp.stack.lo), ", ", hex(gp.stack.hi), "]\n",
-			"\tmorebuf={pc:", hex(morebuf.pc), " sp:", hex(morebuf.sp), " lr:", hex(morebuf.lr), "}\n",
-			"\tsched={pc:", hex(gp.sched.pc), " sp:", hex(gp.sched.sp), " lr:", hex(gp.sched.lr), " ctxt:", gp.sched.ctxt, "}\n")
-
-		traceback(morebuf.pc, morebuf.sp, morebuf.lr, gp)
-		throw("runtime: stack split at bad time")
-	}
-
-	gp := thisg.m.curg
-	morebuf := thisg.m.morebuf
-	thisg.m.morebuf.pc = 0
-	thisg.m.morebuf.lr = 0
-	thisg.m.morebuf.sp = 0
-	thisg.m.morebuf.g = 0
-	rewindmorestack(&gp.sched)
-
-	// NOTE: stackguard0 may change underfoot, if another thread
-	// is about to try to preempt gp. Read it just once and use that same
-	// value now and below.
-	preempt := atomicloaduintptr(&gp.stackguard0) == stackPreempt
-
-	// Be conservative about where we preempt.
-	// We are interested in preempting user Go code, not runtime code.
-	// If we're holding locks, mallocing, or preemption is disabled, don't
-	// preempt.
-	// This check is very early in newstack so that even the status change
-	// from Grunning to Gwaiting and back doesn't happen in this case.
-	// That status change by itself can be viewed as a small preemption,
-	// because the GC might change Gwaiting to Gscanwaiting, and then
-	// this goroutine has to wait for the GC to finish before continuing.
-	// If the GC is in some way dependent on this goroutine (for example,
-	// it needs a lock held by the goroutine), that small preemption turns
-	// into a real deadlock.
-	if preempt {
-		if thisg.m.locks != 0 || thisg.m.mallocing != 0 || thisg.m.preemptoff != "" || thisg.m.p.ptr().status != _Prunning {
-			// Let the goroutine keep running for now.
-			// gp->preempt is set, so it will be preempted next time.
-			gp.stackguard0 = gp.stack.lo + _StackGuard
-			gogo(&gp.sched) // never return
-		}
-	}
-
-	// The goroutine must be executing in order to call newstack,
-	// so it must be Grunning (or Gscanrunning).
-	casgstatus(gp, _Grunning, _Gwaiting)
-	gp.waitreason = "stack growth"
-
-	if gp.stack.lo == 0 {
-		throw("missing stack in newstack")
-	}
-	sp := gp.sched.sp
-	if thechar == '6' || thechar == '8' {
-		// The call to morestack cost a word.
-		sp -= ptrSize
-	}
-	if stackDebug >= 1 || sp < gp.stack.lo {
-		print("runtime: newstack sp=", hex(sp), " stack=[", hex(gp.stack.lo), ", ", hex(gp.stack.hi), "]\n",
-			"\tmorebuf={pc:", hex(morebuf.pc), " sp:", hex(morebuf.sp), " lr:", hex(morebuf.lr), "}\n",
-			"\tsched={pc:", hex(gp.sched.pc), " sp:", hex(gp.sched.sp), " lr:", hex(gp.sched.lr), " ctxt:", gp.sched.ctxt, "}\n")
-	}
-	if sp < gp.stack.lo {
-		print("runtime: gp=", gp, ", gp->status=", hex(readgstatus(gp)), "\n ")
-		print("runtime: split stack overflow: ", hex(sp), " < ", hex(gp.stack.lo), "\n")
-		throw("runtime: split stack overflow")
-	}
-
-	if gp.sched.ctxt != nil {
-		// morestack wrote sched.ctxt on its way in here,
-		// without a write barrier. Run the write barrier now.
-		// It is not possible to be preempted between then
-		// and now, so it's okay.
-		writebarrierptr_nostore((*uintptr)(unsafe.Pointer(&gp.sched.ctxt)), uintptr(gp.sched.ctxt))
-	}
-
-	if preempt {
-		if gp == thisg.m.g0 {
-			throw("runtime: preempt g0")
-		}
-		if thisg.m.p == 0 && thisg.m.locks == 0 {
-			throw("runtime: g is running but p is not")
-		}
-		if gp.preemptscan {
-			for !castogscanstatus(gp, _Gwaiting, _Gscanwaiting) {
-				// Likely to be racing with the GC as
-				// it sees a _Gwaiting and does the
-				// stack scan. If so, gcworkdone will
-				// be set and gcphasework will simply
-				// return.
-			}
-			if !gp.gcscandone {
-				scanstack(gp)
-				gp.gcscandone = true
-			}
-			gp.preemptscan = false
-			gp.preempt = false
-			casfrom_Gscanstatus(gp, _Gscanwaiting, _Gwaiting)
-			casgstatus(gp, _Gwaiting, _Grunning)
-			gp.stackguard0 = gp.stack.lo + _StackGuard
-			gogo(&gp.sched) // never return
-		}
-
-		// Act like goroutine called runtime.Gosched.
-		casgstatus(gp, _Gwaiting, _Grunning)
-		gopreempt_m(gp) // never return
-	}
-
-	// Allocate a bigger segment and move the stack.
-	oldsize := int(gp.stackAlloc)
-	newsize := oldsize * 2
-	if uintptr(newsize) > maxstacksize {
-		print("runtime: goroutine stack exceeds ", maxstacksize, "-byte limit\n")
-		throw("stack overflow")
-	}
-
-	casgstatus(gp, _Gwaiting, _Gcopystack)
-
-	// The concurrent GC will not scan the stack while we are doing the copy since
-	// the gp is in a Gcopystack status.
-	copystack(gp, uintptr(newsize))
-	if stackDebug >= 1 {
-		print("stack grow done\n")
-	}
-	casgstatus(gp, _Gcopystack, _Grunning)
-	gogo(&gp.sched)
-}
-
-//go:nosplit
-func nilfunc() {
-	*(*uint8)(nil) = 0
-}
-
-// adjust Gobuf as if it executed a call to fn
-// and then did an immediate gosave.
-func gostartcallfn(gobuf *gobuf, fv *funcval) {
-	var fn unsafe.Pointer
-	if fv != nil {
-		fn = (unsafe.Pointer)(fv.fn)
-	} else {
-		fn = unsafe.Pointer(funcPC(nilfunc))
-	}
-	gostartcall(gobuf, fn, (unsafe.Pointer)(fv))
-}
-
-// Maybe shrink the stack being used by gp.
-// Called at garbage collection time.
-func shrinkstack(gp *g) {
-	if readgstatus(gp) == _Gdead {
-		if gp.stack.lo != 0 {
-			// Free whole stack - it will get reallocated
-			// if G is used again.
-			stackfree(gp.stack, gp.stackAlloc)
-			gp.stack.lo = 0
-			gp.stack.hi = 0
-			gp.stkbar = nil
-			gp.stkbarPos = 0
-		}
-		return
-	}
-	if gp.stack.lo == 0 {
-		throw("missing stack in shrinkstack")
-	}
-
-	if debug.gcshrinkstackoff > 0 {
-		return
-	}
-
-	oldsize := gp.stackAlloc
-	newsize := oldsize / 2
-	// Don't shrink the allocation below the minimum-sized stack
-	// allocation.
-	if newsize < _FixedStack {
-		return
-	}
-	// Compute how much of the stack is currently in use and only
-	// shrink the stack if gp is using less than a quarter of its
-	// current stack. The currently used stack includes everything
-	// down to the SP plus the stack guard space that ensures
-	// there's room for nosplit functions.
-	avail := gp.stack.hi - gp.stack.lo
-	if used := gp.stack.hi - gp.sched.sp + _StackLimit; used >= avail/4 {
-		return
-	}
-
-	// We can't copy the stack if we're in a syscall.
-	// The syscall might have pointers into the stack.
-	if gp.syscallsp != 0 {
-		return
-	}
-	if goos_windows != 0 && gp.m != nil && gp.m.libcallsp != 0 {
-		return
-	}
-
-	if stackDebug > 0 {
-		print("shrinking stack ", oldsize, "->", newsize, "\n")
-	}
-
-	oldstatus := casgcopystack(gp)
-	copystack(gp, newsize)
-	casgstatus(gp, _Gcopystack, oldstatus)
-}
-
-// freeStackSpans frees unused stack spans at the end of GC.
-func freeStackSpans() {
-	lock(&stackpoolmu)
-
-	// Scan stack pools for empty stack spans.
-	for order := range stackpool {
-		list := &stackpool[order]
-		for s := list.next; s != list; {
-			next := s.next
-			if s.ref == 0 {
-				mSpanList_Remove(s)
-				s.freelist = 0
-				mHeap_FreeStack(&mheap_, s)
-			}
-			s = next
-		}
-	}
-
-	// Free queued stack spans.
-	for stackFreeQueue.next != &stackFreeQueue {
-		s := stackFreeQueue.next
-		mSpanList_Remove(s)
-		mHeap_FreeStack(&mheap_, s)
-	}
-
-	unlock(&stackpoolmu)
-}
-
-//go:nosplit
-func morestackc() {
-	systemstack(func() {
-		throw("attempt to execute C code on Go stack")
-	})
-}
diff --git a/src/runtime/stack2.go b/src/runtime/stack2.go
deleted file mode 100644
index 5ec8d8d..0000000
--- a/src/runtime/stack2.go
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright 2011 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-/*
-Stack layout parameters.
-Included both by runtime (compiled via 6c) and linkers (compiled via gcc).
-
-The per-goroutine g->stackguard is set to point StackGuard bytes
-above the bottom of the stack.  Each function compares its stack
-pointer against g->stackguard to check for overflow.  To cut one
-instruction from the check sequence for functions with tiny frames,
-the stack is allowed to protrude StackSmall bytes below the stack
-guard.  Functions with large frames don't bother with the check and
-always call morestack.  The sequences are (for amd64, others are
-similar):
-
-	guard = g->stackguard
-	frame = function's stack frame size
-	argsize = size of function arguments (call + return)
-
-	stack frame size <= StackSmall:
-		CMPQ guard, SP
-		JHI 3(PC)
-		MOVQ m->morearg, $(argsize << 32)
-		CALL morestack(SB)
-
-	stack frame size > StackSmall but < StackBig
-		LEAQ (frame-StackSmall)(SP), R0
-		CMPQ guard, R0
-		JHI 3(PC)
-		MOVQ m->morearg, $(argsize << 32)
-		CALL morestack(SB)
-
-	stack frame size >= StackBig:
-		MOVQ m->morearg, $((argsize << 32) | frame)
-		CALL morestack(SB)
-
-The bottom StackGuard - StackSmall bytes are important: there has
-to be enough room to execute functions that refuse to check for
-stack overflow, either because they need to be adjacent to the
-actual caller's frame (deferproc) or because they handle the imminent
-stack overflow (morestack).
-
-For example, deferproc might call malloc, which does one of the
-above checks (without allocating a full frame), which might trigger
-a call to morestack.  This sequence needs to fit in the bottom
-section of the stack.  On amd64, morestack's frame is 40 bytes, and
-deferproc's frame is 56 bytes.  That fits well within the
-StackGuard - StackSmall bytes at the bottom.
-The linkers explore all possible call traces involving non-splitting
-functions to make sure that this limit cannot be violated.
-*/
-
-const (
-	// StackSystem is a number of additional bytes to add
-	// to each stack below the usual guard area for OS-specific
-	// purposes like signal handling. Used on Windows, Plan 9,
-	// and Darwin/ARM because they do not use a separate stack.
-	_StackSystem = goos_windows*512*ptrSize + goos_plan9*512 + goos_darwin*goarch_arm*1024
-
-	// The minimum size of stack used by Go code
-	_StackMin = 2048
-
-	// The minimum stack size to allocate.
-	// The hackery here rounds FixedStack0 up to a power of 2.
-	_FixedStack0 = _StackMin + _StackSystem
-	_FixedStack1 = _FixedStack0 - 1
-	_FixedStack2 = _FixedStack1 | (_FixedStack1 >> 1)
-	_FixedStack3 = _FixedStack2 | (_FixedStack2 >> 2)
-	_FixedStack4 = _FixedStack3 | (_FixedStack3 >> 4)
-	_FixedStack5 = _FixedStack4 | (_FixedStack4 >> 8)
-	_FixedStack6 = _FixedStack5 | (_FixedStack5 >> 16)
-	_FixedStack  = _FixedStack6 + 1
-
-	// Functions that need frames bigger than this use an extra
-	// instruction to do the stack split check, to avoid overflow
-	// in case SP - framesize wraps below zero.
-	// This value can be no bigger than the size of the unmapped
-	// space at zero.
-	_StackBig = 4096
-
-	// The stack guard is a pointer this many bytes above the
-	// bottom of the stack.
-	_StackGuard = 640*stackGuardMultiplier + _StackSystem
-
-	// After a stack split check the SP is allowed to be this
-	// many bytes below the stack guard.  This saves an instruction
-	// in the checking sequence for tiny frames.
-	_StackSmall = 128
-
-	// The maximum number of bytes that a chain of NOSPLIT
-	// functions can use.
-	_StackLimit = _StackGuard - _StackSystem - _StackSmall
-)
-
-// Goroutine preemption request.
-// Stored into g->stackguard0 to cause split stack check failure.
-// Must be greater than any real sp.
-// 0xfffffade in hex.
-const (
-	_StackPreempt = uintptrMask & -1314
-	_StackFork    = uintptrMask & -1234
-)
diff --git a/src/runtime/string1.go b/src/runtime/string1.go
deleted file mode 100644
index 4bfa3d9..0000000
--- a/src/runtime/string1.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-//go:nosplit
-func findnull(s *byte) int {
-	if s == nil {
-		return 0
-	}
-	p := (*[_MaxMem/2 - 1]byte)(unsafe.Pointer(s))
-	l := 0
-	for p[l] != 0 {
-		l++
-	}
-	return l
-}
-
-func findnullw(s *uint16) int {
-	if s == nil {
-		return 0
-	}
-	p := (*[_MaxMem/2/2 - 1]uint16)(unsafe.Pointer(s))
-	l := 0
-	for p[l] != 0 {
-		l++
-	}
-	return l
-}
-
-var maxstring uintptr = 256 // a hint for print
-
-//go:nosplit
-func gostringnocopy(str *byte) string {
-	ss := stringStruct{str: unsafe.Pointer(str), len: findnull(str)}
-	s := *(*string)(unsafe.Pointer(&ss))
-	for {
-		ms := maxstring
-		if uintptr(len(s)) <= ms || casuintptr(&maxstring, ms, uintptr(len(s))) {
-			break
-		}
-	}
-	return s
-}
-
-func gostringw(strw *uint16) string {
-	var buf [8]byte
-	str := (*[_MaxMem/2/2 - 1]uint16)(unsafe.Pointer(strw))
-	n1 := 0
-	for i := 0; str[i] != 0; i++ {
-		n1 += runetochar(buf[:], rune(str[i]))
-	}
-	s, b := rawstring(n1 + 4)
-	n2 := 0
-	for i := 0; str[i] != 0; i++ {
-		// check for race
-		if n2 >= n1 {
-			break
-		}
-		n2 += runetochar(b[n2:], rune(str[i]))
-	}
-	b[n2] = 0 // for luck
-	return s[:n2]
-}
diff --git a/src/runtime/stubs2.go b/src/runtime/stubs2.go
deleted file mode 100644
index 1cb6f91..0000000
--- a/src/runtime/stubs2.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !plan9
-// +build !solaris
-// +build !windows
-// +build !nacl
-
-package runtime
-
-import "unsafe"
-
-func read(fd int32, p unsafe.Pointer, n int32) int32
-func closefd(fd int32) int32
-
-func exit(code int32)
-func nanotime() int64
-func usleep(usec uint32)
-
-func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uint32) unsafe.Pointer
-func munmap(addr unsafe.Pointer, n uintptr)
-
-//go:noescape
-func write(fd uintptr, p unsafe.Pointer, n int32) int32
-
-//go:noescape
-func open(name *byte, mode, perm int32) int32
-
-func madvise(addr unsafe.Pointer, n uintptr, flags int32)
diff --git a/src/runtime/stubs32.go b/src/runtime/stubs32.go
deleted file mode 100644
index cd442e9..0000000
--- a/src/runtime/stubs32.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build 386 arm amd64p32
-
-package runtime
-
-import "unsafe"
-
-// Declarations for runtime services implemented in C or assembly that
-// are only present on 32 bit systems.
-
-func call16(fn, arg unsafe.Pointer, n, retoffset uint32)
diff --git a/src/runtime/stubs_android.go b/src/runtime/stubs_android.go
deleted file mode 100644
index e372377..0000000
--- a/src/runtime/stubs_android.go
+++ /dev/null
@@ -1,10 +0,0 @@
-package runtime
-
-import "unsafe"
-
-//go:noescape
-func access(name *byte, mode int32) int32
-
-func connect(fd uintptr, addr unsafe.Pointer, len int32) int32
-
-func socket(domain int32, typ int32, prot int32) int32
diff --git a/src/runtime/sys_arm.go b/src/runtime/sys_arm.go
deleted file mode 100644
index d2e6914..0000000
--- a/src/runtime/sys_arm.go
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-// adjust Gobuf as if it executed a call to fn with context ctxt
-// and then did an immediate Gosave.
-func gostartcall(buf *gobuf, fn, ctxt unsafe.Pointer) {
-	if buf.lr != 0 {
-		throw("invalid use of gostartcall")
-	}
-	buf.lr = buf.pc
-	buf.pc = uintptr(fn)
-	buf.ctxt = ctxt
-}
-
-// Called to rewind context saved during morestack back to beginning of function.
-// To help us, the linker emits a jmp back to the beginning right after the
-// call to morestack. We just have to decode and apply that jump.
-func rewindmorestack(buf *gobuf) {
-	var inst uint32
-	if buf.pc&3 == 0 && buf.pc != 0 {
-		inst = *(*uint32)(unsafe.Pointer(buf.pc))
-		if inst>>24 == 0x9a || inst>>24 == 0xea {
-			buf.pc += uintptr(int32(inst<<8)>>6) + 8
-			return
-		}
-	}
-
-	print("runtime: pc=", hex(buf.pc), " ", hex(inst), "\n")
-	throw("runtime: misuse of rewindmorestack")
-}
-
-// for testing
-func usplit(x uint32) (q, r uint32)
diff --git a/src/runtime/sys_arm64.go b/src/runtime/sys_arm64.go
deleted file mode 100644
index dee23ef..0000000
--- a/src/runtime/sys_arm64.go
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-// adjust Gobuf as if it executed a call to fn with context ctxt
-// and then did an immediate Gosave.
-func gostartcall(buf *gobuf, fn, ctxt unsafe.Pointer) {
-	if buf.lr != 0 {
-		throw("invalid use of gostartcall")
-	}
-	buf.lr = buf.pc
-	buf.pc = uintptr(fn)
-	buf.ctxt = ctxt
-}
-
-// Called to rewind context saved during morestack back to beginning of function.
-// To help us, the linker emits a jmp back to the beginning right after the
-// call to morestack. We just have to decode and apply that jump.
-func rewindmorestack(buf *gobuf) {
-	var inst uint32
-	if buf.pc&3 == 0 && buf.pc != 0 {
-		inst = *(*uint32)(unsafe.Pointer(buf.pc))
-		// section C3.2.6 Unconditional branch (immediate)
-		if inst>>26 == 0x05 {
-			buf.pc += uintptr(int32(inst<<6) >> 4)
-			return
-		}
-	}
-
-	print("runtime: pc=", hex(buf.pc), " ", hex(inst), "\n")
-	throw("runtime: misuse of rewindmorestack")
-}
diff --git a/src/runtime/sys_darwin_arm.s b/src/runtime/sys_darwin_arm.s
deleted file mode 100644
index 087dec5..0000000
--- a/src/runtime/sys_darwin_arm.s
+++ /dev/null
@@ -1,490 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// System calls and other sys.stuff for ARM, Darwin
-// See http://fxr.watson.org/fxr/source/bsd/kern/syscalls.c?v=xnu-1228
-// or /usr/include/sys/syscall.h (on a Mac) for system call numbers.
-
-#include "go_asm.h"
-#include "go_tls.h"
-#include "textflag.h"
-
-// Copied from /usr/include/sys/syscall.h
-#define	SYS_exit           1
-#define	SYS_read           3
-#define	SYS_write          4
-#define	SYS_open           5
-#define	SYS_close          6
-#define	SYS_mmap           197
-#define	SYS_munmap         73
-#define	SYS_madvise        75
-#define	SYS_mincore        78
-#define	SYS_gettimeofday   116
-#define	SYS_kill           37
-#define	SYS_getpid         20
-#define	SYS___pthread_kill 328
-#define	SYS_setitimer      83
-#define	SYS___sysctl       202
-#define	SYS_sigprocmask    48
-#define	SYS_sigaction      46
-#define	SYS_sigreturn      184
-#define	SYS_select         93
-#define	SYS_bsdthread_register 366
-#define	SYS_bsdthread_create 360
-#define	SYS_bsdthread_terminate 361
-#define	SYS_kqueue         362
-#define	SYS_kevent         363
-#define	SYS_fcntl          92
-
-TEXT notok<>(SB),NOSPLIT,$0
-	MOVW	$0, R8
-	MOVW	R8, (R8)
-	B		0(PC)
-
-TEXT runtime·open(SB),NOSPLIT,$0
-	MOVW	name+0(FP), R0
-	MOVW	mode+4(FP), R1
-	MOVW	perm+8(FP), R2
-	MOVW	$SYS_open, R12
-	SWI	$0x80
-	MOVW.CS	$-1, R0
-	MOVW	R0, ret+12(FP)
-	RET
-
-TEXT runtime·closefd(SB),NOSPLIT,$0
-	MOVW	fd+0(FP), R0
-	MOVW	$SYS_close, R12
-	SWI	$0x80
-	MOVW.CS	$-1, R0
-	MOVW	R0, ret+4(FP)
-	RET
-
-TEXT runtime·write(SB),NOSPLIT,$0
-	MOVW	fd+0(FP), R0
-	MOVW	p+4(FP), R1
-	MOVW	n+8(FP), R2
-	MOVW	$SYS_write, R12
-	SWI	$0x80
-	MOVW.CS	$-1, R0
-	MOVW	R0, ret+12(FP)
-	RET
-
-TEXT runtime·read(SB),NOSPLIT,$0
-	MOVW	fd+0(FP), R0
-	MOVW	p+4(FP), R1
-	MOVW	n+8(FP), R2
-	MOVW	$SYS_read, R12
-	SWI	$0x80
-	MOVW.CS	$-1, R0
-	MOVW	R0, ret+12(FP)
-	RET
-
-TEXT runtime·exit(SB),NOSPLIT,$-4
-	MOVW	code+0(FP), R0
-	MOVW	$SYS_exit, R12
-	SWI	$0x80
-	MOVW	$1234, R0
-	MOVW	$1002, R1
-	MOVW	R0, (R1)	// fail hard
-
-// Exit this OS thread (like pthread_exit, which eventually
-// calls __bsdthread_terminate).
-TEXT runtime·exit1(SB),NOSPLIT,$0
-	MOVW	$SYS_bsdthread_terminate, R12
-	SWI	$0x80
-	MOVW	$1234, R0
-	MOVW	$1003, R1
-	MOVW	R0, (R1)	// fail hard
-
-TEXT runtime·raise(SB),NOSPLIT,$0
-	// Ideally we'd send the signal to the current thread,
-	// not the whole process, but that's too hard on OS X.
-	JMP	runtime·raiseproc(SB)
-
-TEXT runtime·raiseproc(SB),NOSPLIT,$24
-	MOVW	$SYS_getpid, R12
-	SWI	$0x80
-	// arg 1 pid already in R0 from getpid
-	MOVW	unnamed+0(FP), R1	// arg 2 - signal
-	MOVW	$1, R2	// arg 3 - posix
-	MOVW	$SYS_kill, R12
-	SWI $0x80
-	RET
-
-TEXT runtime·mmap(SB),NOSPLIT,$0
-	MOVW	addr+0(FP), R0
-	MOVW	n+4(FP), R1
-	MOVW	prot+8(FP), R2
-	MOVW	flags+12(FP), R3
-	MOVW	fd+16(FP), R4
-	MOVW	off+20(FP), R5
-	MOVW	$0, R6 // off_t is uint64_t
-	MOVW	$SYS_mmap, R12
-	SWI	$0x80
-	MOVW	R0, ret+24(FP)
-	RET
-
-TEXT runtime·munmap(SB),NOSPLIT,$0
-	MOVW	addr+0(FP), R0
-	MOVW	n+4(FP), R1
-	MOVW	$SYS_munmap, R12
-	SWI	$0x80
-	BL.CS	notok<>(SB)
-	RET
-
-TEXT runtime·madvise(SB),NOSPLIT,$0
-	MOVW	addr+0(FP), R0
-	MOVW	n+4(FP), R1
-	MOVW	flags+8(FP), R2
-	MOVW	$SYS_madvise, R12
-	SWI	$0x80
-	BL.CS	notok<>(SB)
-	RET
-
-TEXT runtime·setitimer(SB),NOSPLIT,$0
-	MOVW	mode+0(FP), R0
-	MOVW	new+4(FP), R1
-	MOVW	old+8(FP), R2
-	MOVW	$SYS_setitimer, R12
-	SWI	$0x80
-	RET
-
-TEXT runtime·mincore(SB),NOSPLIT,$0
-	MOVW	addr+0(FP), R0
-	MOVW	n+4(FP), R1
-	MOVW	dst+8(FP), R2
-	MOVW	$SYS_mincore, R12
-	SWI	$0x80
-	MOVW	R0, ret+12(FP)
-	RET
-
-TEXT time·now(SB), 7, $32
-	MOVW	$8(R13), R0  // timeval
-	MOVW	$0, R1  // zone
-	MOVW	$SYS_gettimeofday, R12
-	SWI	$0x80 // Note: R0 is tv_sec, R1 is tv_usec
-
-	MOVW    R1, R2  // usec
-
-	MOVW	R0, sec+0(FP)
-	MOVW	$0, R1
-	MOVW	R1, loc+4(FP)
-	MOVW	$1000, R3
-	MUL	R3, R2
-	MOVW	R2, nsec+8(FP)
-	RET
-
-TEXT runtime·nanotime(SB),NOSPLIT,$32
-	MOVW	$8(R13), R0  // timeval
-	MOVW	$0, R1  // zone
-	MOVW	$SYS_gettimeofday, R12
-	SWI	$0x80 // Note: R0 is tv_sec, R1 is tv_usec
-
-	MOVW    R1, R2
-	MOVW	$1000000000, R3
-	MULLU	R0, R3, (R1, R0)
-	MOVW	$1000, R3
-	MOVW	$0, R4
-	MUL	R3, R2
-	ADD.S	R2, R0
-	ADC	R4, R1
-
-	MOVW	R0, ret_lo+0(FP)
-	MOVW	R1, ret_hi+4(FP)
-	RET
-
-// Sigtramp's job is to call the actual signal handler.
-// It is called with the following arguments on the stack:
-//	 LR  	"return address" - ignored
-//	 R0  	actual handler
-//	 R1  	siginfo style - ignored
-//	 R2   	signal number
-//	 R3   	siginfo
-//	 -4(FP)	context, beware that 0(FP) is the saved LR
-TEXT runtime·sigtramp(SB),NOSPLIT,$0
-	// this might be called in external code context,
-	// where g is not set.
-	// first save R0, because runtime·load_g will clobber it
-	MOVM.DB.W [R0], (R13)
-	MOVB	runtime·iscgo(SB), R0
-	CMP 	$0, R0
-	BL.NE	runtime·load_g(SB)
-
-	CMP 	$0, g
-	BNE 	cont
-	// fake function call stack frame for badsignal
-	// we only need to pass R2 (signal number), but
-	// badsignal will expect R2 at 4(R13), so we also
-	// push R1 onto stack. turns out we do need R1
-	// to do sigreturn.
-	MOVM.DB.W [R1,R2], (R13)
-	MOVW  	$runtime·badsignal(SB), R11
-	BL	(R11)
-	MOVM.IA.W [R1], (R13) // saved infostype
-	ADD		$(4+4), R13 // +4: also need to remove the pushed R0.
-	MOVW    ucontext-4(FP), R0 // load ucontext
-	B	ret
-
-cont:
-	// Restore R0
-	MOVM.IA.W (R13), [R0]
-
-	// NOTE: some Darwin/ARM kernels always use the main stack to run the
-	// signal handler. We need to switch to gsignal ourselves.
-	MOVW	g_m(g), R11
-	MOVW	m_gsignal(R11), R5
-	MOVW	(g_stack+stack_hi)(R5), R6
-	SUB		$28, R6
-
-	// copy arguments for call to sighandler
-	MOVW	R2, 4(R6) // signal num
-	MOVW	R3, 8(R6) // signal info
-	MOVW	g, 16(R6) // old_g
-	MOVW	context-4(FP), R4
-	MOVW	R4, 12(R6) // context
-
-	// Backup ucontext and infostyle
-	MOVW    R4, 20(R6)
-	MOVW    R1, 24(R6)
-
-	// switch stack and g
-	MOVW	R6, R13 // sigtramp can not re-entrant, so no need to back up R13.
-	MOVW	R5, g
-
-	BL	(R0)
-
-	// call sigreturn
-	MOVW	20(R13), R0	// saved ucontext
-	MOVW	24(R13), R1	// saved infostyle
-ret:
-	MOVW	$SYS_sigreturn, R12 // sigreturn(ucontext, infostyle)
-	SWI	$0x80
-
-	// if sigreturn fails, we can do nothing but exit
-	B	runtime·exit(SB)
-
-TEXT runtime·sigprocmask(SB),NOSPLIT,$0
-	MOVW	sig+0(FP), R0
-	MOVW	new+4(FP), R1
-	MOVW	old+8(FP), R2
-	MOVW	$SYS_sigprocmask, R12
-	SWI	$0x80
-	BL.CS	notok<>(SB)
-	RET
-
-TEXT runtime·sigaction(SB),NOSPLIT,$0
-	MOVW	mode+0(FP), R0
-	MOVW	new+4(FP), R1
-	MOVW	old+8(FP), R2
-	MOVW	$SYS_sigaction, R12
-	SWI	$0x80
-	RET
-
-TEXT runtime·usleep(SB),NOSPLIT,$12
-	MOVW	usec+0(FP), R0
-	CALL	runtime·usplitR0(SB)
-	MOVW	R0, a-12(SP)
-	MOVW	R1, b-8(SP)
-
-	// select(0, 0, 0, 0, &tv)
-	MOVW	$0, R0
-	MOVW	$0, R1
-	MOVW	$0, R2
-	MOVW	$0, R3
-	MOVW	$a-12(SP), R4
-	MOVW	$SYS_select, R12
-	SWI	$0x80
-	RET
-
-TEXT runtime·cas(SB),NOSPLIT,$0
-	B	runtime·armcas(SB)
-
-TEXT runtime·casp1(SB),NOSPLIT,$0
-	B	runtime·cas(SB)
-
-TEXT ·publicationBarrier(SB),NOSPLIT,$-4-0
-	B	runtime·armPublicationBarrier(SB)
-
-TEXT runtime·sysctl(SB),NOSPLIT,$0
-	MOVW	mib+0(FP), R0
-	MOVW	miblen+4(FP), R1
-	MOVW	out+8(FP), R2
-	MOVW	size+12(FP), R3
-	MOVW	dst+16(FP), R4
-	MOVW	ndst+20(FP), R5
-	MOVW	$SYS___sysctl, R12 // syscall entry
-	SWI	$0x80
-	BCC     sysctl_ret
-	RSB     $0, R0, R0
-	MOVW	R0, ret+24(FP)
-	RET
-sysctl_ret:
-	MOVW	$0, R0
-	MOVW	R0, ret+24(FP)
-	RET
-
-// Thread related functions
-// func bsdthread_create(stk, arg unsafe.Pointer, fn uintptr) int32
-TEXT runtime·bsdthread_create(SB),NOSPLIT,$0
-	// Set up arguments to bsdthread_create system call.
-	// The ones in quotes pass through to the thread callback
-	// uninterpreted, so we can put whatever we want there.
-	MOVW    fn+8(FP),    R0 // "func"
-	MOVW    arg+4(FP),   R1 // "arg"
-	MOVW    stk+0(FP),   R2 // stack
-	MOVW	$0x01000000, R4	// flags = PTHREAD_START_CUSTOM
-	MOVW	$0,          R5 // paranoia
-	MOVW	$SYS_bsdthread_create, R12
-	SWI	$0x80
-	BCC		create_ret
-	RSB 	$0, R0, R0
-	MOVW	R0, ret+12(FP)
-	RET
-create_ret:
-	MOVW	$0, R0
-	MOVW	R0, ret+12(FP)
-	RET
-
-// The thread that bsdthread_create creates starts executing here,
-// because we registered this function using bsdthread_register
-// at startup.
-//	R0 = "pthread"
-//	R1 = mach thread port
-//	R2 = "func" (= fn)
-//	R3 = "arg" (= m)
-//	R4 = stack
-//	R5 = flags (= 0)
-// XXX: how to deal with R4/SP? ref: Libc-594.9.1/arm/pthreads/thread_start.s
-TEXT runtime·bsdthread_start(SB),NOSPLIT,$0
-	MOVW    R1, m_procid(R3) // thread port is m->procid
-	MOVW	m_g0(R3), g
-	MOVW	R3, g_m(g)
-	// ARM don't have runtime·stackcheck(SB)
-	// disable runfast mode of vfp
-	EOR     R12, R12
-	WORD    $0xeee1ca10 // fmxr	fpscr, ip
-	BL      (R2) // fn
-	BL      runtime·exit1(SB)
-	RET
-
-// int32 bsdthread_register(void)
-// registers callbacks for threadstart (see bsdthread_create above
-// and wqthread and pthsize (not used).  returns 0 on success.
-TEXT runtime·bsdthread_register(SB),NOSPLIT,$0
-	MOVW	$runtime·bsdthread_start(SB), R0	// threadstart
-	MOVW	$0, R1	// wqthread, not used by us
-	MOVW	$0, R2	// pthsize, not used by us
-	MOVW	$0, R3 	// dummy_value [sic]
-	MOVW	$0, R4	// targetconc_ptr
-	MOVW	$0, R5	// dispatchqueue_offset
-	MOVW	$SYS_bsdthread_register, R12	// bsdthread_register
-	SWI	$0x80
-	MOVW	R0, ret+0(FP)
-	RET
-
-// uint32 mach_msg_trap(void*, uint32, uint32, uint32, uint32, uint32, uint32)
-TEXT runtime·mach_msg_trap(SB),NOSPLIT,$0
-	MOVW    h+0(FP), R0
-	MOVW    op+4(FP), R1
-	MOVW    send_size+8(FP), R2
-	MOVW    rcv_size+12(FP), R3
-	MOVW    rcv_name+16(FP), R4
-	MOVW    timeout+20(FP), R5
-	MOVW    notify+24(FP), R6
-	MVN     $30, R12
-	SWI	$0x80
-	MOVW	R0, ret+28(FP)
-	RET
-
-TEXT runtime·mach_task_self(SB),NOSPLIT,$0
-	MVN     $27, R12 // task_self_trap
-	SWI	$0x80
-	MOVW	R0, ret+0(FP)
-	RET
-
-TEXT runtime·mach_thread_self(SB),NOSPLIT,$0
-	MVN 	$26, R12 // thread_self_trap
-	SWI	$0x80
-	MOVW	R0, ret+0(FP)
-	RET
-
-TEXT runtime·mach_reply_port(SB),NOSPLIT,$0
-	MVN 	$25, R12	// mach_reply_port
-	SWI	$0x80
-	MOVW	R0, ret+0(FP)
-	RET
-
-// Mach provides trap versions of the semaphore ops,
-// instead of requiring the use of RPC.
-
-// uint32 mach_semaphore_wait(uint32)
-TEXT runtime·mach_semaphore_wait(SB),NOSPLIT,$0
-	MOVW	sema+0(FP), R0
-	MVN 	$35, R12	// semaphore_wait_trap
-	SWI	$0x80
-	MOVW	R0, ret+4(FP)
-	RET
-
-// uint32 mach_semaphore_timedwait(uint32, uint32, uint32)
-TEXT runtime·mach_semaphore_timedwait(SB),NOSPLIT,$0
-	MOVW	sema+0(FP), R0
-	MOVW	sec+4(FP), R1
-	MOVW	nsec+8(FP), R2
-	MVN 	$37, R12	// semaphore_timedwait_trap
-	SWI	$0x80
-	MOVW	R0, ret+12(FP)
-	RET
-
-// uint32 mach_semaphore_signal(uint32)
-TEXT runtime·mach_semaphore_signal(SB),NOSPLIT,$0
-	MOVW    sema+0(FP), R0
-	MVN 	$32, R12	// semaphore_signal_trap
-	SWI	$0x80
-	MOVW	R0, ret+4(FP)
-	RET
-
-// uint32 mach_semaphore_signal_all(uint32)
-TEXT runtime·mach_semaphore_signal_all(SB),NOSPLIT,$0
-	MOVW	sema+0(FP), R0
-	MVN 	$33, R12	// semaphore_signal_all_trap
-	SWI	$0x80
-	MOVW	R0, ret+4(FP)
-	RET
-
-// int32 runtime·kqueue(void)
-TEXT runtime·kqueue(SB),NOSPLIT,$0
-	MOVW	$SYS_kqueue, R12
-	SWI	$0x80
-	RSB.CS	$0, R0, R0
-	MOVW	R0, ret+0(FP)
-	RET
-
-// int32 runtime·kevent(int kq, Kevent *changelist, int nchanges, Kevent *eventlist, int events, Timespec *timeout)
-TEXT runtime·kevent(SB),NOSPLIT,$0
-	MOVW	$SYS_kevent, R12
-	MOVW	kq+0(FP), R0
-	MOVW	ch+4(FP), R1
-	MOVW	nch+8(FP), R2
-	MOVW	ev+12(FP), R3
-	MOVW	nev+16(FP), R4
-	MOVW	ts+20(FP), R5
-	SWI	$0x80
-	RSB.CS	$0, R0, R0
-	MOVW	R0, ret+24(FP)
-	RET
-
-// int32 runtime·closeonexec(int32 fd)
-TEXT runtime·closeonexec(SB),NOSPLIT,$0
-	MOVW	$SYS_fcntl, R12
-	MOVW	fd+0(FP), R0
-	MOVW	$2, R1	// F_SETFD
-	MOVW	$1, R2	// FD_CLOEXEC
-	SWI	$0x80
-	RET
-
-// sigaltstack on some darwin/arm version is buggy and will always
-// run the signal handler on the main stack, so our sigtramp has
-// to do the stack switch ourselves.
-TEXT runtime·sigaltstack(SB),NOSPLIT,$0
-	RET
diff --git a/src/runtime/sys_darwin_arm64.s b/src/runtime/sys_darwin_arm64.s
deleted file mode 100644
index 0f9da85..0000000
--- a/src/runtime/sys_darwin_arm64.s
+++ /dev/null
@@ -1,455 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// System calls and other sys.stuff for ARM64, Darwin
-// See http://fxr.watson.org/fxr/source/bsd/kern/syscalls.c?v=xnu-1228
-// or /usr/include/sys/syscall.h (on a Mac) for system call numbers.
-
-#include "go_asm.h"
-#include "go_tls.h"
-#include "textflag.h"
-
-// Copied from /usr/include/sys/syscall.h
-#define	SYS_exit           1
-#define	SYS_read           3
-#define	SYS_write          4
-#define	SYS_open           5
-#define	SYS_close          6
-#define	SYS_mmap           197
-#define	SYS_munmap         73
-#define	SYS_madvise        75
-#define	SYS_mincore        78
-#define	SYS_gettimeofday   116
-#define	SYS_kill           37
-#define	SYS_getpid         20
-#define	SYS___pthread_kill 328
-#define	SYS_setitimer      83
-#define	SYS___sysctl       202
-#define	SYS_sigprocmask    48
-#define	SYS_sigaction      46
-#define	SYS_sigreturn      184
-#define	SYS_select         93
-#define	SYS_bsdthread_register 366
-#define	SYS_bsdthread_create 360
-#define	SYS_bsdthread_terminate 361
-#define	SYS_kqueue         362
-#define	SYS_kevent         363
-#define	SYS_fcntl          92
-
-TEXT notok<>(SB),NOSPLIT,$0
-	MOVD	$0, R8
-	MOVD	R8, (R8)
-	B	0(PC)
-
-TEXT runtime·open(SB),NOSPLIT,$0
-	MOVD	name+0(FP), R0
-	MOVW	mode+8(FP), R1
-	MOVW	perm+12(FP), R2
-	MOVD	$SYS_open, R16
-	SVC	$0x80
-	CSINV	LO, R0, ZR, R0
-	MOVW	R0, ret+16(FP)
-	RET
-
-TEXT runtime·closefd(SB),NOSPLIT,$0
-	MOVW	fd+0(FP), R0
-	MOVW	$SYS_close, R16
-	SVC	$0x80
-	CSINV	LO, R0, ZR, R0
-	MOVW	R0, ret+8(FP)
-	RET
-
-TEXT runtime·write(SB),NOSPLIT,$0
-	MOVW	fd+0(FP), R0
-	MOVD	p+8(FP), R1
-	MOVW	n+16(FP), R2
-	MOVW	$SYS_write, R16
-	SVC	$0x80
-	CSINV	LO, R0, ZR, R0
-	MOVW	R0, ret+24(FP)
-	RET
-
-TEXT runtime·read(SB),NOSPLIT,$0
-	MOVW	fd+0(FP), R0
-	MOVD	p+8(FP), R1
-	MOVW	n+16(FP), R2
-	MOVW	$SYS_read, R16
-	SVC	$0x80
-	CSINV	LO, R0, ZR, R0
-	MOVW	R0, ret+24(FP)
-	RET
-
-TEXT runtime·exit(SB),NOSPLIT,$-8
-	MOVW	code+0(FP), R0
-	MOVW	$SYS_exit, R16
-	SVC	$0x80
-	MOVD	$1234, R0
-	MOVD	$1002, R1
-	MOVD	R0, (R1)	// fail hard
-
-// Exit this OS thread (like pthread_exit, which eventually
-// calls __bsdthread_terminate).
-TEXT runtime·exit1(SB),NOSPLIT,$0
-	MOVW	$SYS_bsdthread_terminate, R16
-	SVC	$0x80
-	MOVD	$1234, R0
-	MOVD	$1003, R1
-	MOVD	R0, (R1)	// fail hard
-
-TEXT runtime·raise(SB),NOSPLIT,$0
-	// Ideally we'd send the signal to the current thread,
-	// not the whole process, but that's too hard on OS X.
-	JMP	runtime·raiseproc(SB)
-
-TEXT runtime·raiseproc(SB),NOSPLIT,$0
-	MOVW	$SYS_getpid, R16
-	SVC	$0x80
-	// arg 1 pid already in R0 from getpid
-	MOVW	sig+0(FP), R1	// arg 2 - signal
-	MOVW	$1, R2	// arg 3 - posix
-	MOVW	$SYS_kill, R16
-	SVC	$0x80
-	RET
-
-TEXT runtime·mmap(SB),NOSPLIT,$0
-	MOVD	addr+0(FP), R0
-	MOVD	n+8(FP), R1
-	MOVW	prot+16(FP), R2
-	MOVW	flags+20(FP), R3
-	MOVW	fd+24(FP), R4
-	MOVW	off+28(FP), R5
-	MOVW	$SYS_mmap, R16
-	SVC	$0x80
-	MOVD	R0, ret+32(FP)
-	RET
-
-TEXT runtime·munmap(SB),NOSPLIT,$0
-	MOVD	addr+0(FP), R0
-	MOVD	n+8(FP), R1
-	MOVW	$SYS_munmap, R16
-	SVC	$0x80
-	BCC	2(PC)
-	BL	notok<>(SB)
-	RET
-
-TEXT runtime·madvise(SB),NOSPLIT,$0
-	MOVD	addr+0(FP), R0
-	MOVD	n+8(FP), R1
-	MOVW	flags+16(FP), R2
-	MOVW	$SYS_madvise, R16
-	SVC	$0x80
-	BCC	2(PC)
-	BL	notok<>(SB)
-	RET
-
-TEXT runtime·setitimer(SB),NOSPLIT,$0
-	MOVW	mode+0(FP), R0
-	MOVD	new+8(FP), R1
-	MOVD	old+16(FP), R2
-	MOVW	$SYS_setitimer, R16
-	SVC	$0x80
-	RET
-
-TEXT time·now(SB),NOSPLIT,$40-12
-	MOVD	RSP, R0	// timeval
-	MOVD	R0, R9	// this is how dyld calls gettimeofday
-	MOVW	$0, R1	// zone
-	MOVW	$SYS_gettimeofday, R16
-	SVC	$0x80	// Note: x0 is tv_sec, w1 is tv_usec
-
-	MOVD	R0, sec+0(FP)
-	MOVW	$1000, R3
-	MUL	R3, R1
-	MOVW	R1, nsec+8(FP)
-	RET
-
-TEXT runtime·nanotime(SB),NOSPLIT,$40
-	MOVD	RSP, R0	// timeval
-	MOVD	R0, R9	// this is how dyld calls gettimeofday
-	MOVW	$0, R1	// zone
-	MOVW	$SYS_gettimeofday, R16
-	SVC	$0x80	// Note: x0 is tv_sec, w1 is tv_usec
-
-	MOVW	$1000000000, R3
-	MUL	R3, R0
-	MOVW	$1000, R3
-	MUL	R3, R1
-	ADD	R1, R0
-
-	MOVD	R0, ret+0(FP)
-	RET
-
-// Sigtramp's job is to call the actual signal handler.
-// It is called with the following arguments on the stack:
-//	LR	"return address" - ignored
-//	R0	actual handler
-//	R1	siginfo style - ignored
-//	R2	signal number
-//	R3	siginfo
-//	R4	context
-TEXT runtime·sigtramp(SB),NOSPLIT,$0
-	// this might be called in external code context,
-	// where g is not set.
-	// first save R0, because runtime·load_g will clobber it
-	MOVD.W	R0, -16(RSP)	// note: stack must be 16-byte aligned
-	MOVB	runtime·iscgo(SB), R0
-	CMP	$0, R0
-	BEQ	2(PC)
-	BL	runtime·load_g(SB)
-
-	CMP	$0, g
-	BNE	cont
-	// fake function call stack frame for badsignal
-	// we only need to pass R2 (signal number), but
-	// badsignal will expect R2 at 8(RSP), so we also
-	// push R1 onto stack. turns out we do need R1
-	// to do sigreturn.
-	MOVD.W	R1, -16(RSP)
-	MOVD	R2, 8(RSP)
-	MOVD	R4, 24(RSP)	// save ucontext, badsignal might clobber R4
-	MOVD	$runtime·badsignal(SB), R26
-	BL	(R26)
-	MOVD	0(RSP), R1	// saved infostype
-	MOVD	24(RSP), R0	// the ucontext
-	ADD	$(16+16), RSP
-	B	ret
-
-cont:
-	// Restore R0
-	MOVD.P	16(RSP), R0
-
-	// NOTE: some Darwin/ARM kernels always use the main stack to run the
-	// signal handler. We need to switch to gsignal ourselves.
-	MOVD	g_m(g), R11
-	MOVD	m_gsignal(R11), R5
-	MOVD	(g_stack+stack_hi)(R5), R6
-	SUB	$64, R6
-
-	// copy arguments for call to sighandler
-	MOVD	R2, 8(R6)	// signal num
-	MOVD	R3, 16(R6)	// signal info
-	MOVD	R4, 24(R6)	// context
-	MOVD	g, 32(R6)	// old_g
-
-	// Backup ucontext and infostyle
-	MOVD	R4, 40(R6)
-	MOVD	R1, 48(R6)
-
-	// switch stack and g
-	MOVD	R6, RSP	// sigtramp can not re-entrant, so no need to back up RSP.
-	MOVD	R5, g
-
-	BL	(R0)
-
-	// call sigreturn
-	MOVD	40(RSP), R0	// saved ucontext
-	MOVD	48(RSP), R1	// saved infostyle
-ret:
-	MOVW	$SYS_sigreturn, R16 // sigreturn(ucontext, infostyle)
-	SVC	$0x80
-
-	// if sigreturn fails, we can do nothing but exit
-	B	runtime·exit(SB)
-
-TEXT runtime·sigprocmask(SB),NOSPLIT,$0
-	MOVW	sig+0(FP), R0
-	MOVD	new+8(FP), R1
-	MOVD	old+16(FP), R2
-	MOVW	$SYS_sigprocmask, R16
-	SVC	$0x80
-	BCC	2(PC)
-	BL	notok<>(SB)
-	RET
-
-TEXT runtime·sigaction(SB),NOSPLIT,$0
-	MOVW	mode+0(FP), R0
-	MOVD	new+8(FP), R1
-	MOVD	old+16(FP), R2
-	MOVW	$SYS_sigaction, R16
-	SVC	$0x80
-	BCC	2(PC)
-	BL	notok<>(SB)
-	RET
-
-TEXT runtime·usleep(SB),NOSPLIT,$24
-	MOVW	usec+0(FP), R0
-	MOVW	R0, R1
-	MOVW	$1000000, R2
-	UDIV	R2, R0
-	MUL	R0, R2
-	SUB	R2, R1
-	MOVD	R0, 0(RSP)
-	MOVW	R1, 8(RSP)
-
-	// select(0, 0, 0, 0, &tv)
-	MOVW	$0, R0
-	MOVW	$0, R1
-	MOVW	$0, R2
-	MOVW	$0, R3
-	MOVD	RSP, R4
-	MOVW	$SYS_select, R16
-	SVC	$0x80
-	RET
-
-TEXT runtime·sysctl(SB),NOSPLIT,$0
-	MOVD	mib+0(FP), R0
-	MOVW	miblen+8(FP), R1
-	MOVD	out+16(FP), R2
-	MOVD	size+24(FP), R3
-	MOVD	dst+32(FP), R4
-	MOVD	ndst+40(FP), R5
-	MOVW	$SYS___sysctl, R16
-	SVC	$0x80
-	BCC	ok
-	NEG	R0, R0
-	MOVW	R0, ret+48(FP)
-	RET
-ok:
-	MOVW	$0, R0
-	MOVW	R0, ret+48(FP)
-	RET
-
-// Thread related functions
-// Note: On darwin/arm64, it is no longer possible to use bsdthread_register
-// as the libc is always linked in. The runtime must use runtime/cgo to
-// create threads, so all thread related functions will just exit with a
-// unique status.
-// void bsdthread_create(void *stk, M *m, G *g, void (*fn)(void))
-TEXT runtime·bsdthread_create(SB),NOSPLIT,$0
-	MOVD	$44, R0
-	MOVW	$SYS_exit, R16
-	SVC	$0x80
-	RET
-
-// The thread that bsdthread_create creates starts executing here,
-// because we registered this function using bsdthread_register
-// at startup.
-//	R0 = "pthread"
-//	R1 = mach thread port
-//	R2 = "func" (= fn)
-//	R3 = "arg" (= m)
-//	R4 = stack
-//	R5 = flags (= 0)
-TEXT runtime·bsdthread_start(SB),NOSPLIT,$0
-	MOVD	$45, R0
-	MOVW	$SYS_exit, R16
-	SVC	$0x80
-	RET
-
-// int32 bsdthread_register(void)
-// registers callbacks for threadstart (see bsdthread_create above
-// and wqthread and pthsize (not used).  returns 0 on success.
-TEXT runtime·bsdthread_register(SB),NOSPLIT,$0
-	MOVD	$46, R0
-	MOVW	$SYS_exit, R16
-	SVC	$0x80
-	RET
-
-// uint32 mach_msg_trap(void*, uint32, uint32, uint32, uint32, uint32, uint32)
-TEXT runtime·mach_msg_trap(SB),NOSPLIT,$0
-	MOVD	h+0(FP), R0
-	MOVW	op+8(FP), R1
-	MOVW	send_size+12(FP), R2
-	MOVW	rcv_size+16(FP), R3
-	MOVW	rcv_name+20(FP), R4
-	MOVW	timeout+24(FP), R5
-	MOVW	notify+28(FP), R6
-	MOVN	$30, R16
-	SVC	$0x80
-	MOVW	R0, ret+32(FP)
-	RET
-
-TEXT runtime·mach_task_self(SB),NOSPLIT,$0
-	MOVN	$27, R16 // task_self_trap
-	SVC	$0x80
-	MOVW	R0, ret+0(FP)
-	RET
-
-TEXT runtime·mach_thread_self(SB),NOSPLIT,$0
-	MOVN	$26, R16 // thread_self_trap
-	SVC	$0x80
-	MOVW	R0, ret+0(FP)
-	RET
-
-TEXT runtime·mach_reply_port(SB),NOSPLIT,$0
-	MOVN	$25, R16	// mach_reply_port
-	SVC	$0x80
-	MOVW	R0, ret+0(FP)
-	RET
-
-// Mach provides trap versions of the semaphore ops,
-// instead of requiring the use of RPC.
-
-// uint32 mach_semaphore_wait(uint32)
-TEXT runtime·mach_semaphore_wait(SB),NOSPLIT,$0
-	MOVW	sema+0(FP), R0
-	MOVN	$35, R16	// semaphore_wait_trap
-	SVC	$0x80
-	MOVW	R0, ret+8(FP)
-	RET
-
-// uint32 mach_semaphore_timedwait(uint32, uint32, uint32)
-TEXT runtime·mach_semaphore_timedwait(SB),NOSPLIT,$0
-	MOVW	sema+0(FP), R0
-	MOVW	sec+4(FP), R1
-	MOVW	nsec+8(FP), R2
-	MOVN	$37, R16	// semaphore_timedwait_trap
-	SVC	$0x80
-	MOVW	R0, ret+16(FP)
-	RET
-
-// uint32 mach_semaphore_signal(uint32)
-TEXT runtime·mach_semaphore_signal(SB),NOSPLIT,$0
-	MOVW	sema+0(FP), R0
-	MOVN	$32, R16	// semaphore_signal_trap
-	SVC	$0x80
-	MOVW	R0, ret+8(FP)
-	RET
-
-// uint32 mach_semaphore_signal_all(uint32)
-TEXT runtime·mach_semaphore_signal_all(SB),NOSPLIT,$0
-	MOVW	sema+0(FP), R0
-	MOVN	$33, R16	// semaphore_signal_all_trap
-	SVC	$0x80
-	MOVW	R0, ret+8(FP)
-	RET
-
-// int32 runtime·kqueue(void)
-TEXT runtime·kqueue(SB),NOSPLIT,$0
-	MOVW	$SYS_kqueue, R16
-	SVC	$0x80
-	BCC	2(PC)
-	NEG	R0, R0
-	MOVW	R0, ret+0(FP)
-	RET
-
-// int32 runtime·kevent(int kq, Kevent *ch, int nch, Kevent *ev, int nev, Timespec *ts)
-TEXT runtime·kevent(SB),NOSPLIT,$0
-	MOVW	kq+0(FP), R0
-	MOVD	ch+8(FP), R1
-	MOVW	nch+16(FP), R2
-	MOVD	ev+24(FP), R3
-	MOVW	nev+32(FP), R4
-	MOVD	ts+40(FP), R5
-	MOVW	$SYS_kevent, R16
-	SVC	$0x80
-	BCC	2(PC)
-	NEG	R0, R0
-	MOVW	R0, ret+48(FP)
-	RET
-
-// int32 runtime·closeonexec(int32 fd)
-TEXT runtime·closeonexec(SB),NOSPLIT,$0
-	MOVW	fd+0(FP), R0
-	MOVW	$2, R1	// F_SETFD
-	MOVW	$1, R2	// FD_CLOEXEC
-	MOVW	$SYS_fcntl, R16
-	SVC	$0x80
-	RET
-
-// sigaltstack on some darwin/arm version is buggy and will always
-// run the signal handler on the main stack, so our sigtramp has
-// to do the stack switch ourselves.
-TEXT runtime·sigaltstack(SB),NOSPLIT,$0
-	RET
diff --git a/src/runtime/sys_linux_arm64.s b/src/runtime/sys_linux_arm64.s
deleted file mode 100644
index 7b58d67..0000000
--- a/src/runtime/sys_linux_arm64.s
+++ /dev/null
@@ -1,447 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//
-// System calls and other sys.stuff for arm64, Linux
-//
-
-#include "go_asm.h"
-#include "go_tls.h"
-#include "textflag.h"
-
-#define AT_FDCWD -100
-
-#define SYS_exit		93
-#define SYS_read		63
-#define SYS_write		64
-#define SYS_openat		56
-#define SYS_close		57
-#define SYS_fcntl		25
-#define SYS_gettimeofday	169
-#define SYS_pselect6		72
-#define SYS_mmap		222
-#define SYS_munmap		215
-#define SYS_setitimer		103
-#define SYS_clone		220
-#define SYS_sched_yield		124
-#define SYS_rt_sigreturn	139
-#define SYS_rt_sigaction	134
-#define SYS_rt_sigprocmask	135
-#define SYS_sigaltstack		132
-#define SYS_getrlimit		163
-#define SYS_madvise		233
-#define SYS_mincore		232
-#define SYS_getpid		172
-#define SYS_gettid		178
-#define SYS_kill		129
-#define SYS_tkill		130
-#define SYS_futex		98
-#define SYS_sched_getaffinity	123
-#define SYS_exit_group		94
-#define SYS_epoll_create1	20
-#define SYS_epoll_ctl		21
-#define SYS_epoll_pwait		22
-#define SYS_clock_gettime	113
-
-TEXT runtime·exit(SB),NOSPLIT,$-8-4
-	MOVW	code+0(FP), R0
-	MOVD	$SYS_exit_group, R8
-	SVC
-	RET
-
-TEXT runtime·exit1(SB),NOSPLIT,$-8-4
-	MOVW	code+0(FP), R0
-	MOVD	$SYS_exit, R8
-	SVC
-	RET
-
-TEXT runtime·open(SB),NOSPLIT,$-8-20
-	MOVD	$AT_FDCWD, R0
-	MOVD	name+0(FP), R1
-	MOVW	mode+8(FP), R2
-	MOVW	perm+12(FP), R3
-	MOVD	$SYS_openat, R8
-	SVC
-	CMN	$4095, R0
-	BCC	done
-	MOVW	$-1, R0
-done:
-	MOVW	R0, ret+16(FP)
-	RET
-
-TEXT runtime·closefd(SB),NOSPLIT,$-8-12
-	MOVW	fd+0(FP), R0
-	MOVD	$SYS_close, R8
-	SVC
-	CMN	$4095, R0
-	BCC	done
-	MOVW	$-1, R0
-done:
-	MOVW	R0, ret+8(FP)
-	RET
-
-TEXT runtime·write(SB),NOSPLIT,$-8-28
-	MOVD	fd+0(FP), R0
-	MOVD	p+8(FP), R1
-	MOVW	n+16(FP), R2
-	MOVD	$SYS_write, R8
-	SVC
-	CMN	$4095, R0
-	BCC	done
-	MOVW	$-1, R0
-done:
-	MOVW	R0, ret+24(FP)
-	RET
-
-TEXT runtime·read(SB),NOSPLIT,$-8-28
-	MOVW	fd+0(FP), R0
-	MOVD	p+8(FP), R1
-	MOVW	n+16(FP), R2
-	MOVD	$SYS_read, R8
-	SVC
-	CMN	$4095, R0
-	BCC	done
-	MOVW	$-1, R0
-done:
-	MOVW	R0, ret+24(FP)
-	RET
-
-TEXT runtime·getrlimit(SB),NOSPLIT,$-8-20
-	MOVW	kind+0(FP), R0
-	MOVD	limit+8(FP), R1
-	MOVD	$SYS_getrlimit, R8
-	SVC
-	MOVW	R0, ret+16(FP)
-	RET
-
-TEXT runtime·usleep(SB),NOSPLIT,$24-4
-	MOVWU	usec+0(FP), R3
-	MOVD	R3, R5
-	MOVW	$1000000, R4
-	UDIV	R4, R3
-	MOVD	R3, 8(RSP)
-	MUL	R3, R4
-	SUB	R4, R5
-	MOVW	$1000, R4
-	MUL	R4, R5
-	MOVD	R5, 16(RSP)
-
-	// pselect6(0, 0, 0, 0, &ts, 0)
-	MOVD	$0, R0
-	MOVD	R0, R1
-	MOVD	R0, R2
-	MOVD	R0, R3
-	ADD	$8, RSP, R4
-	MOVD	R0, R5
-	MOVD	$SYS_pselect6, R8
-	SVC
-	RET
-
-TEXT runtime·gettid(SB),NOSPLIT,$0-4
-	MOVD	$SYS_gettid, R8
-	SVC
-	MOVW	R0, ret+0(FP)
-	RET
-
-TEXT runtime·raise(SB),NOSPLIT,$-8
-	MOVD	$SYS_gettid, R8
-	SVC
-	MOVW	R0, R0	// arg 1 tid
-	MOVW	sig+0(FP), R1	// arg 2
-	MOVD	$SYS_tkill, R8
-	SVC
-	RET
-
-TEXT runtime·raiseproc(SB),NOSPLIT,$-8
-	MOVD	$SYS_getpid, R8
-	SVC
-	MOVW	R0, R0		// arg 1 pid
-	MOVW	sig+0(FP), R1	// arg 2
-	MOVD	$SYS_kill, R8
-	SVC
-	RET
-
-TEXT runtime·setitimer(SB),NOSPLIT,$-8-24
-	MOVW	mode+0(FP), R0
-	MOVD	new+8(FP), R1
-	MOVD	old+16(FP), R2
-	MOVD	$SYS_setitimer, R8
-	SVC
-	RET
-
-TEXT runtime·mincore(SB),NOSPLIT,$-8-28
-	MOVD	addr+0(FP), R0
-	MOVD	n+8(FP), R1
-	MOVD	dst+16(FP), R2
-	MOVD	$SYS_mincore, R8
-	SVC
-	MOVW	R0, ret+24(FP)
-	RET
-
-// func now() (sec int64, nsec int32)
-TEXT time·now(SB),NOSPLIT,$24-12
-	MOVD	RSP, R0
-	MOVD	$0, R1
-	MOVD	$SYS_gettimeofday, R8
-	SVC
-	MOVD	0(RSP), R3	// sec
-	MOVD	8(RSP), R5	// usec
-	MOVD	$1000, R4
-	MUL	R4, R5
-	MOVD	R3, sec+0(FP)
-	MOVW	R5, nsec+8(FP)
-	RET
-
-TEXT runtime·nanotime(SB),NOSPLIT,$24-8
-	MOVW	$1, R0 // CLOCK_MONOTONIC
-	MOVD	RSP, R1
-	MOVD	$SYS_clock_gettime, R8
-	SVC
-	MOVD	0(RSP), R3	// sec
-	MOVD	8(RSP), R5	// nsec
-	// sec is in R3, nsec in R5
-	// return nsec in R3
-	MOVD	$1000000000, R4
-	MUL	R4, R3
-	ADD	R5, R3
-	MOVD	R3, ret+0(FP)
-	RET
-
-TEXT runtime·rtsigprocmask(SB),NOSPLIT,$-8-28
-	MOVW	sig+0(FP), R0
-	MOVD	new+8(FP), R1
-	MOVD	old+16(FP), R2
-	MOVW	size+24(FP), R3
-	MOVD	$SYS_rt_sigprocmask, R8
-	SVC
-	CMN	$4095, R0
-	BCC	done
-	MOVD	$0, R0
-	MOVD	R0, (R0)	// crash
-done:
-	RET
-
-TEXT runtime·rt_sigaction(SB),NOSPLIT,$-8-36
-	MOVD	sig+0(FP), R0
-	MOVD	new+8(FP), R1
-	MOVD	old+16(FP), R2
-	MOVD	size+24(FP), R3
-	MOVD	$SYS_rt_sigaction, R8
-	SVC
-	MOVW	R0, ret+32(FP)
-	RET
-
-TEXT runtime·sigfwd(SB),NOSPLIT,$0-32
-	MOVW	sig+8(FP), R0
-	MOVD	info+16(FP), R1
-	MOVD	ctx+24(FP), R2
-	MOVD	fn+0(FP), R11
-	BL	(R11)
-	RET
-
-TEXT runtime·sigtramp(SB),NOSPLIT,$24
-	// this might be called in external code context,
-	// where g is not set.
-	// first save R0, because runtime·load_g will clobber it
-	MOVW	R0, 8(RSP)
-	MOVBU	runtime·iscgo(SB), R0
-	CMP	$0, R0
-	BEQ	2(PC)
-	BL	runtime·load_g(SB)
-
-	MOVD	R1, 16(RSP)
-	MOVD	R2, 24(RSP)
-	MOVD	$runtime·sigtrampgo(SB), R0
-	BL	(R0)
-	RET
-
-TEXT runtime·mmap(SB),NOSPLIT,$-8
-	MOVD	addr+0(FP), R0
-	MOVD	n+8(FP), R1
-	MOVW	prot+16(FP), R2
-	MOVW	flags+20(FP), R3
-	MOVW	fd+24(FP), R4
-	MOVW	off+28(FP), R5
-
-	MOVD	$SYS_mmap, R8
-	SVC
-	MOVD	R0, ret+32(FP)
-	RET
-
-TEXT runtime·munmap(SB),NOSPLIT,$-8
-	MOVD	addr+0(FP), R0
-	MOVD	n+8(FP), R1
-	MOVD	$SYS_munmap, R8
-	SVC
-	CMN	$4095, R0
-	BCC	cool
-	MOVD	R0, 0xf0(R0)
-cool:
-	RET
-
-TEXT runtime·madvise(SB),NOSPLIT,$-8
-	MOVD	addr+0(FP), R0
-	MOVD	n+8(FP), R1
-	MOVW	flags+16(FP), R2
-	MOVD	$SYS_madvise, R8
-	SVC
-	// ignore failure - maybe pages are locked
-	RET
-
-// int64 futex(int32 *uaddr, int32 op, int32 val,
-//	struct timespec *timeout, int32 *uaddr2, int32 val2);
-TEXT runtime·futex(SB),NOSPLIT,$-8
-	MOVD	addr+0(FP), R0
-	MOVW	op+8(FP), R1
-	MOVW	val+12(FP), R2
-	MOVD	ts+16(FP), R3
-	MOVD	addr2+24(FP), R4
-	MOVW	val3+32(FP), R5
-	MOVD	$SYS_futex, R8
-	SVC
-	MOVW	R0, ret+40(FP)
-	RET
-
-// int64 clone(int32 flags, void *stk, M *mp, G *gp, void (*fn)(void));
-TEXT runtime·clone(SB),NOSPLIT,$-8
-	MOVW	flags+0(FP), R0
-	MOVD	stk+8(FP), R1
-
-	// Copy mp, gp, fn off parent stack for use by child.
-	MOVD	mm+16(FP), R10
-	MOVD	gg+24(FP), R11
-	MOVD	fn+32(FP), R12
-
-	MOVD	R10, -8(R1)
-	MOVD	R11, -16(R1)
-	MOVD	R12, -24(R1)
-	MOVD	$1234, R10
-	MOVD	R10, -32(R1)
-
-	MOVD	$SYS_clone, R8
-	SVC
-
-	// In parent, return.
-	CMP	ZR, R0
-	BEQ	child
-	MOVW	R0, ret+40(FP)
-	RET
-child:
-
-	// In child, on new stack.
-	MOVD	-32(RSP), R10
-	MOVD	$1234, R0
-	CMP	R0, R10
-	BEQ	good
-	MOVD	$0, R0
-	MOVD	R0, (R0)	// crash
-
-good:
-	// Initialize m->procid to Linux tid
-	MOVD	$SYS_gettid, R8
-	SVC
-
-	MOVD	-24(RSP), R12     // fn
-	MOVD	-16(RSP), R11     // g
-	MOVD	-8(RSP), R10      // m
-
-	CMP	$0, R10
-	BEQ	nog
-	CMP	$0, R11
-	BEQ	nog
-
-	MOVD	R0, m_procid(R10)
-
-	// TODO: setup TLS.
-
-	// In child, set up new stack
-	MOVD	R10, g_m(R11)
-	MOVD	R11, g
-	//CALL	runtime·stackcheck(SB)
-
-nog:
-	// Call fn
-	MOVD	R12, R0
-	BL	(R0)
-
-	// It shouldn't return.	 If it does, exit that thread.
-	MOVW	$111, R0
-again:
-	MOVD	$SYS_exit, R8
-	SVC
-	B	again	// keep exiting
-
-TEXT runtime·sigaltstack(SB),NOSPLIT,$-8
-	MOVD	new+0(FP), R0
-	MOVD	old+8(FP), R1
-	MOVD	$SYS_sigaltstack, R8
-	SVC
-	CMN	$4095, R0
-	BCC	ok
-	MOVD	$0, R0
-	MOVD	R0, (R0)	// crash
-ok:
-	RET
-
-TEXT runtime·osyield(SB),NOSPLIT,$-8
-	MOVD	$SYS_sched_yield, R8
-	SVC
-	RET
-
-TEXT runtime·sched_getaffinity(SB),NOSPLIT,$-8
-	MOVD	pid+0(FP), R0
-	MOVD	len+8(FP), R1
-	MOVD	buf+16(FP), R2
-	MOVD	$SYS_sched_getaffinity, R8
-	SVC
-	MOVW	R0, ret+24(FP)
-	RET
-
-// int32 runtime·epollcreate(int32 size);
-TEXT runtime·epollcreate(SB),NOSPLIT,$-8
-	MOVW	$0, R0
-	MOVD	$SYS_epoll_create1, R8
-	SVC
-	MOVW	R0, ret+8(FP)
-	RET
-
-// int32 runtime·epollcreate1(int32 flags);
-TEXT runtime·epollcreate1(SB),NOSPLIT,$-8
-	MOVW	flags+0(FP), R0
-	MOVD	$SYS_epoll_create1, R8
-	SVC
-	MOVW	R0, ret+8(FP)
-	RET
-
-// func epollctl(epfd, op, fd int32, ev *epollEvent) int
-TEXT runtime·epollctl(SB),NOSPLIT,$-8
-	MOVW	epfd+0(FP), R0
-	MOVW	op+4(FP), R1
-	MOVW	fd+8(FP), R2
-	MOVD	ev+16(FP), R3
-	MOVD	$SYS_epoll_ctl, R8
-	SVC
-	MOVW	R0, ret+24(FP)
-	RET
-
-// int32 runtime·epollwait(int32 epfd, EpollEvent *ev, int32 nev, int32 timeout);
-TEXT runtime·epollwait(SB),NOSPLIT,$-8
-	MOVW	epfd+0(FP), R0
-	MOVD	ev+8(FP), R1
-	MOVW	nev+16(FP), R2
-	MOVW	timeout+20(FP), R3
-	MOVD	$0, R4
-	MOVD	$SYS_epoll_pwait, R8
-	SVC
-	MOVW	R0, ret+24(FP)
-	RET
-
-// void runtime·closeonexec(int32 fd);
-TEXT runtime·closeonexec(SB),NOSPLIT,$-8
-	MOVW	fd+0(FP), R0  // fd
-	MOVD	$2, R1	// F_SETFD
-	MOVD	$1, R2	// FD_CLOEXEC
-	MOVD	$SYS_fcntl, R8
-	SVC
-	RET
diff --git a/src/runtime/sys_linux_ppc64x.s b/src/runtime/sys_linux_ppc64x.s
deleted file mode 100644
index 01575f8..0000000
--- a/src/runtime/sys_linux_ppc64x.s
+++ /dev/null
@@ -1,407 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-// +build ppc64 ppc64le
-
-//
-// System calls and other sys.stuff for ppc64, Linux
-//
-
-#include "go_asm.h"
-#include "go_tls.h"
-#include "textflag.h"
-
-#define SYS_exit		  1
-#define SYS_read		  3
-#define SYS_write		  4
-#define SYS_open		  5
-#define SYS_close		  6
-#define SYS_getpid		 20
-#define SYS_kill		 37
-#define SYS_fcntl		 55
-#define SYS_gettimeofday	 78
-#define SYS_select		 82	// always return -ENOSYS
-#define SYS_mmap		 90
-#define SYS_munmap		 91
-#define SYS_setitimer		104
-#define SYS_clone		120
-#define SYS_newselect		142
-#define SYS_sched_yield		158
-#define SYS_rt_sigreturn	172
-#define SYS_rt_sigaction	173
-#define SYS_rt_sigprocmask	174
-#define SYS_sigaltstack		185
-#define SYS_ugetrlimit		190
-#define SYS_madvise		205
-#define SYS_mincore		206
-#define SYS_gettid		207
-#define SYS_tkill		208
-#define SYS_futex		221
-#define SYS_sched_getaffinity	223
-#define SYS_exit_group		234
-#define SYS_epoll_create	236
-#define SYS_epoll_ctl		237
-#define SYS_epoll_wait		238
-#define SYS_clock_gettime	246
-#define SYS_epoll_create1	315
-
-TEXT runtime·exit(SB),NOSPLIT,$-8-4
-	MOVW	code+0(FP), R3
-	SYSCALL	$SYS_exit_group
-	RET
-
-TEXT runtime·exit1(SB),NOSPLIT,$-8-4
-	MOVW	code+0(FP), R3
-	SYSCALL	$SYS_exit
-	RET
-
-TEXT runtime·open(SB),NOSPLIT,$-8-20
-	MOVD	name+0(FP), R3
-	MOVW	mode+8(FP), R4
-	MOVW	perm+12(FP), R5
-	SYSCALL	$SYS_open
-	BVC	2(PC)
-	MOVW	$-1, R3
-	MOVW	R3, ret+16(FP)
-	RET
-
-TEXT runtime·closefd(SB),NOSPLIT,$-8-12
-	MOVW	fd+0(FP), R3
-	SYSCALL	$SYS_close
-	BVC	2(PC)
-	MOVW	$-1, R3
-	MOVW	R3, ret+8(FP)
-	RET
-
-TEXT runtime·write(SB),NOSPLIT,$-8-28
-	MOVD	fd+0(FP), R3
-	MOVD	p+8(FP), R4
-	MOVW	n+16(FP), R5
-	SYSCALL	$SYS_write
-	BVC	2(PC)
-	MOVW	$-1, R3
-	MOVW	R3, ret+24(FP)
-	RET
-
-TEXT runtime·read(SB),NOSPLIT,$-8-28
-	MOVW	fd+0(FP), R3
-	MOVD	p+8(FP), R4
-	MOVW	n+16(FP), R5
-	SYSCALL	$SYS_read
-	BVC	2(PC)
-	MOVW	$-1, R3
-	MOVW	R3, ret+24(FP)
-	RET
-
-TEXT runtime·getrlimit(SB),NOSPLIT,$-8-20
-	MOVW	kind+0(FP), R3
-	MOVD	limit+8(FP), R4
-	SYSCALL	$SYS_ugetrlimit
-	MOVW	R3, ret+16(FP)
-	RET
-
-TEXT runtime·usleep(SB),NOSPLIT,$16-4
-	MOVW	usec+0(FP), R3
-	MOVD	R3, R5
-	MOVW	$1000000, R4
-	DIVD	R4, R3
-	MOVD	R3, 8(R1)
-	MULLD	R3, R4
-	SUB	R4, R5
-	MOVD	R5, 16(R1)
-
-	// select(0, 0, 0, 0, &tv)
-	MOVW	$0, R3
-	MOVW	$0, R4
-	MOVW	$0, R5
-	MOVW	$0, R6
-	ADD	$8, R1, R7
-	SYSCALL	$SYS_newselect
-	RET
-
-TEXT runtime·gettid(SB),NOSPLIT,$0-4
-	SYSCALL	$SYS_gettid
-	MOVW	R3, ret+0(FP)
-	RET
-
-TEXT runtime·raise(SB),NOSPLIT,$-8
-	SYSCALL	$SYS_gettid
-	MOVW	R3, R3	// arg 1 tid
-	MOVW	sig+0(FP), R4	// arg 2
-	SYSCALL	$SYS_tkill
-	RET
-
-TEXT runtime·raiseproc(SB),NOSPLIT,$-8
-	SYSCALL	$SYS_getpid
-	MOVW	R3, R3	// arg 1 pid
-	MOVW	sig+0(FP), R4	// arg 2
-	SYSCALL	$SYS_kill
-	RET
-
-TEXT runtime·setitimer(SB),NOSPLIT,$-8-24
-	MOVW	mode+0(FP), R3
-	MOVD	new+8(FP), R4
-	MOVD	old+16(FP), R5
-	SYSCALL	$SYS_setitimer
-	RET
-
-TEXT runtime·mincore(SB),NOSPLIT,$-8-28
-	MOVD	addr+0(FP), R3
-	MOVD	n+8(FP), R4
-	MOVD	dst+16(FP), R5
-	SYSCALL	$SYS_mincore
-	MOVW	R3, ret+24(FP)
-	RET
-
-// func now() (sec int64, nsec int32)
-TEXT time·now(SB),NOSPLIT,$16
-	MOVD	$0(R1), R3
-	MOVD	$0, R4
-	SYSCALL	$SYS_gettimeofday
-	MOVD	0(R1), R3	// sec
-	MOVD	8(R1), R5	// usec
-	MOVD	$1000, R4
-	MULLD	R4, R5
-	MOVD	R3, sec+0(FP)
-	MOVW	R5, nsec+8(FP)
-	RET
-
-TEXT runtime·nanotime(SB),NOSPLIT,$16
-	MOVW	$1, R3 // CLOCK_MONOTONIC
-	MOVD	$0(R1), R4
-	SYSCALL	$SYS_clock_gettime
-	MOVD	0(R1), R3	// sec
-	MOVD	8(R1), R5	// nsec
-	// sec is in R3, nsec in R5
-	// return nsec in R3
-	MOVD	$1000000000, R4
-	MULLD	R4, R3
-	ADD	R5, R3
-	MOVD	R3, ret+0(FP)
-	RET
-
-TEXT runtime·rtsigprocmask(SB),NOSPLIT,$-8-28
-	MOVW	sig+0(FP), R3
-	MOVD	new+8(FP), R4
-	MOVD	old+16(FP), R5
-	MOVW	size+24(FP), R6
-	SYSCALL	$SYS_rt_sigprocmask
-	BVC	2(PC)
-	MOVD	R0, 0xf1(R0)	// crash
-	RET
-
-TEXT runtime·rt_sigaction(SB),NOSPLIT,$-8-36
-	MOVD	sig+0(FP), R3
-	MOVD	new+8(FP), R4
-	MOVD	old+16(FP), R5
-	MOVD	size+24(FP), R6
-	SYSCALL	$SYS_rt_sigaction
-	MOVW	R3, ret+32(FP)
-	RET
-
-TEXT runtime·sigfwd(SB),NOSPLIT,$0-32
-	MOVW	sig+8(FP), R3
-	MOVD	info+16(FP), R4
-	MOVD	ctx+24(FP), R5
-	MOVD	fn+0(FP), R31
-	MOVD	R31, CTR
-	BL	(CTR)
-	RET
-
-#ifdef GOARCH_ppc64le
-// ppc64le doesn't need function descriptors
-TEXT runtime·sigtramp(SB),NOSPLIT,$64
-#else
-// function descriptor for the real sigtramp
-TEXT runtime·sigtramp(SB),NOSPLIT,$-8
-	DWORD	$runtime·_sigtramp(SB)
-	DWORD	$0
-	DWORD	$0
-TEXT runtime·_sigtramp(SB),NOSPLIT,$64
-#endif
-	// initialize essential registers (just in case)
-	BL	runtime·reginit(SB)
-
-	// this might be called in external code context,
-	// where g is not set.
-	MOVB	runtime·iscgo(SB), R6
-	CMP 	R6, $0
-	BEQ	2(PC)
-	BL	runtime·load_g(SB)
-
-	MOVW	R3, 8(R1)
-	MOVD	R4, 16(R1)
-	MOVD	R5, 24(R1)
-	MOVD	$runtime·sigtrampgo(SB), R31
-	MOVD	R31, CTR
-	BL	(CTR)
-	RET
-
-TEXT runtime·mmap(SB),NOSPLIT,$-8
-	MOVD	addr+0(FP), R3
-	MOVD	n+8(FP), R4
-	MOVW	prot+16(FP), R5
-	MOVW	flags+20(FP), R6
-	MOVW	fd+24(FP), R7
-	MOVW	off+28(FP), R8
-
-	SYSCALL	$SYS_mmap
-	MOVD	R3, ret+32(FP)
-	RET
-
-TEXT runtime·munmap(SB),NOSPLIT,$-8
-	MOVD	addr+0(FP), R3
-	MOVD	n+8(FP), R4
-	SYSCALL	$SYS_munmap
-	BVC	2(PC)
-	MOVD	R0, 0xf3(R0)
-	RET
-
-TEXT runtime·madvise(SB),NOSPLIT,$-8
-	MOVD	addr+0(FP), R3
-	MOVD	n+8(FP), R4
-	MOVW	flags+16(FP), R5
-	SYSCALL	$SYS_madvise
-	// ignore failure - maybe pages are locked
-	RET
-
-// int64 futex(int32 *uaddr, int32 op, int32 val,
-//	struct timespec *timeout, int32 *uaddr2, int32 val2);
-TEXT runtime·futex(SB),NOSPLIT,$-8
-	MOVD	addr+0(FP), R3
-	MOVW	op+8(FP), R4
-	MOVW	val+12(FP), R5
-	MOVD	ts+16(FP), R6
-	MOVD	addr2+24(FP), R7
-	MOVW	val3+32(FP), R8
-	SYSCALL	$SYS_futex
-	MOVW	R3, ret+40(FP)
-	RET
-
-// int64 clone(int32 flags, void *stk, M *mp, G *gp, void (*fn)(void));
-TEXT runtime·clone(SB),NOSPLIT,$-8
-	MOVW	flags+0(FP), R3
-	MOVD	stk+8(FP), R4
-
-	// Copy mp, gp, fn off parent stack for use by child.
-	// Careful: Linux system call clobbers ???.
-	MOVD	mm+16(FP), R7
-	MOVD	gg+24(FP), R8
-	MOVD	fn+32(FP), R12
-
-	MOVD	R7, -8(R4)
-	MOVD	R8, -16(R4)
-	MOVD	R12, -24(R4)
-	MOVD	$1234, R7
-	MOVD	R7, -32(R4)
-
-	SYSCALL $SYS_clone
-
-	// In parent, return.
-	CMP	R3, $0
-	BEQ	3(PC)
-	MOVW	R3, ret+40(FP)
-	RET
-
-	// In child, on new stack.
-	// initialize essential registers
-	BL	runtime·reginit(SB)
-	MOVD	-32(R1), R7
-	CMP	R7, $1234
-	BEQ	2(PC)
-	MOVD	R0, 0(R0)
-
-	// Initialize m->procid to Linux tid
-	SYSCALL $SYS_gettid
-
-	MOVD	-24(R1), R12       // fn
-	MOVD	-16(R1), R8        // g
-	MOVD	-8(R1), R7         // m
-
-	CMP	R7, $0
-	BEQ	nog
-	CMP	R8, $0
-	BEQ	nog
-
-	MOVD	R3, m_procid(R7)
-
-	// TODO: setup TLS.
-
-	// In child, set up new stack
-	MOVD	R7, g_m(R8)
-	MOVD	R8, g
-	//CALL	runtime·stackcheck(SB)
-
-nog:
-	// Call fn
-	MOVD	R12, CTR
-	BL	(CTR)
-
-	// It shouldn't return.	 If it does, exit that thread.
-	MOVW	$111, R3
-	SYSCALL	$SYS_exit
-	BR	-2(PC)	// keep exiting
-
-TEXT runtime·sigaltstack(SB),NOSPLIT,$-8
-	MOVD	new+0(FP), R3
-	MOVD	old+8(FP), R4
-	SYSCALL	$SYS_sigaltstack
-	BVC	2(PC)
-	MOVD	R0, 0xf1(R0)  // crash
-	RET
-
-TEXT runtime·osyield(SB),NOSPLIT,$-8
-	SYSCALL	$SYS_sched_yield
-	RET
-
-TEXT runtime·sched_getaffinity(SB),NOSPLIT,$-8
-	MOVD	pid+0(FP), R3
-	MOVD	len+8(FP), R4
-	MOVD	buf+16(FP), R5
-	SYSCALL	$SYS_sched_getaffinity
-	MOVW	R3, ret+24(FP)
-	RET
-
-// int32 runtime·epollcreate(int32 size);
-TEXT runtime·epollcreate(SB),NOSPLIT,$-8
-	MOVW    size+0(FP), R3
-	SYSCALL	$SYS_epoll_create
-	MOVW	R3, ret+8(FP)
-	RET
-
-// int32 runtime·epollcreate1(int32 flags);
-TEXT runtime·epollcreate1(SB),NOSPLIT,$-8
-	MOVW	flags+0(FP), R3
-	SYSCALL	$SYS_epoll_create1
-	MOVW	R3, ret+8(FP)
-	RET
-
-// func epollctl(epfd, op, fd int32, ev *epollEvent) int
-TEXT runtime·epollctl(SB),NOSPLIT,$-8
-	MOVW	epfd+0(FP), R3
-	MOVW	op+4(FP), R4
-	MOVW	fd+8(FP), R5
-	MOVD	ev+16(FP), R6
-	SYSCALL	$SYS_epoll_ctl
-	MOVW	R3, ret+24(FP)
-	RET
-
-// int32 runtime·epollwait(int32 epfd, EpollEvent *ev, int32 nev, int32 timeout);
-TEXT runtime·epollwait(SB),NOSPLIT,$-8
-	MOVW	epfd+0(FP), R3
-	MOVD	ev+8(FP), R4
-	MOVW	nev+16(FP), R5
-	MOVW	timeout+20(FP), R6
-	SYSCALL	$SYS_epoll_wait
-	MOVW	R3, ret+24(FP)
-	RET
-
-// void runtime·closeonexec(int32 fd);
-TEXT runtime·closeonexec(SB),NOSPLIT,$-8
-	MOVW    fd+0(FP), R3  // fd
-	MOVD    $2, R4  // F_SETFD
-	MOVD    $1, R5  // FD_CLOEXEC
-	SYSCALL	$SYS_fcntl
-	RET
diff --git a/src/runtime/sys_openbsd_arm.s b/src/runtime/sys_openbsd_arm.s
deleted file mode 100644
index 60deb8f..0000000
--- a/src/runtime/sys_openbsd_arm.s
+++ /dev/null
@@ -1,390 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-//
-// System calls and other sys.stuff for ARM, OpenBSD
-// /usr/src/sys/kern/syscalls.master for syscall numbers.
-//
-
-#include "go_asm.h"
-#include "go_tls.h"
-#include "textflag.h"
-
-#define CLOCK_REALTIME	$0
-#define	CLOCK_MONOTONIC	$3
-
-// Exit the entire program (like C exit)
-TEXT runtime·exit(SB),NOSPLIT,$-4
-	MOVW	status+0(FP), R0	// arg 1 - status
-	MOVW	$1, R12			// sys_exit
-	SWI	$0
-	MOVW.CS	$0, R8			// crash on syscall failure
-	MOVW.CS	R8, (R8)
-	RET
-
-TEXT runtime·exit1(SB),NOSPLIT,$-4
-	MOVW	$0, R0			// arg 1 - notdead
-	MOVW	$302, R12		// sys___threxit
-	SWI	$0
-	MOVW.CS	$1, R8			// crash on syscall failure
-	MOVW.CS	R8, (R8)
-	RET
-
-TEXT runtime·open(SB),NOSPLIT,$-4
-	MOVW	path+0(FP), R0		// arg 1 - path
-	MOVW	flags+4(FP), R1		// arg 2 - flags
-	MOVW	mode+8(FP), R2		// arg 3 - mode
-	MOVW	$5, R12			// sys_open
-	SWI	$0
-	MOVW.CS	$-1, R0
-	MOVW	R0, ret+12(FP)
-	RET
-
-TEXT runtime·closefd(SB),NOSPLIT,$-4
-	MOVW	path+0(FP), R0		// arg 1 - path
-	MOVW	$6, R12			// sys_close
-	SWI	$0
-	MOVW.CS	$-1, R0
-	MOVW	R0, ret+4(FP)
-	RET
-
-TEXT runtime·read(SB),NOSPLIT,$-4
-	MOVW	fd+0(FP), R0		// arg 1 - fd
-	MOVW	buf+4(FP), R1		// arg 2 - buf
-	MOVW	nbyte+8(FP), R2		// arg 3 - nbyte
-	MOVW	$3, R12			// sys_read
-	SWI	$0
-	MOVW.CS	$-1, R0
-	MOVW	R0, ret+12(FP)
-	RET
-
-TEXT runtime·write(SB),NOSPLIT,$-4
-	MOVW	fd+0(FP), R0		// arg 1 - fd
-	MOVW	buf+4(FP), R1		// arg 2 - buf
-	MOVW	nbyte+8(FP), R2		// arg 3 - nbyte
-	MOVW	$4, R12			// sys_write
-	SWI	$0
-	MOVW.CS	$-1, R0
-	MOVW	R0, ret+12(FP)
-	RET
-
-TEXT runtime·usleep(SB),NOSPLIT,$16
-	MOVW	usec+0(FP), R0
-	CALL	runtime·usplitR0(SB)
-	MOVW	R0, 4(R13)		// tv_sec - l32
-	MOVW	$0, R0
-	MOVW	R0, 8(R13)		// tv_sec - h32
-	MOVW	$1000, R2
-	MUL	R1, R2
-	MOVW	R2, 12(R13)		// tv_nsec
-
-	MOVW	$4(R13), R0		// arg 1 - rqtp
-	MOVW	$0, R1			// arg 2 - rmtp
-	MOVW	$91, R12		// sys_nanosleep
-	SWI	$0
-	RET
-
-TEXT runtime·raise(SB),NOSPLIT,$12
-	MOVW	$0x12B, R12
-	SWI	$0			// sys_getthrid
-					// arg 1 - pid, already in R0
-	MOVW	sig+0(FP), R1		// arg 2 - signum
-	MOVW	$37, R12		// sys_kill
-	SWI	$0
-	RET
-
-TEXT runtime·raiseproc(SB),NOSPLIT,$12
-	MOVW	$20, R12
-	SWI	$0			// sys_getpid
-					// arg 1 - pid, already in R0
-	MOVW	sig+0(FP), R1		// arg 2 - signum
-	MOVW	$37, R12		// sys_kill
-	SWI	$0
-	RET
-
-TEXT runtime·mmap(SB),NOSPLIT,$16
-	MOVW	addr+0(FP), R0		// arg 1 - addr
-	MOVW	len+4(FP), R1		// arg 2 - len
-	MOVW	prot+8(FP), R2		// arg 3 - prot
-	MOVW	flags+12(FP), R3	// arg 4 - flags
-	MOVW	fd+16(FP), R4		// arg 5 - fd (on stack)
-	MOVW	R4, 4(R13)
-	MOVW	$0, R5			// arg 6 - pad (on stack)
-	MOVW	R5, 8(R13)
-	MOVW	offset+20(FP), R6	// arg 7 - offset (on stack)
-	MOVW	R6, 12(R13)		// lower 32 bits (from Go runtime)
-	MOVW	$0, R7
-	MOVW	R7, 16(R13)		// high 32 bits
-	ADD	$4, R13
-	MOVW	$197, R12		// sys_mmap
-	SWI	$0
-	SUB	$4, R13
-	MOVW	R0, ret+24(FP)
-	RET
-
-TEXT runtime·munmap(SB),NOSPLIT,$0
-	MOVW	addr+0(FP), R0		// arg 1 - addr
-	MOVW	len+4(FP), R1		// arg 2 - len
-	MOVW	$73, R12		// sys_munmap
-	SWI	$0
-	MOVW.CS	$0, R8			// crash on syscall failure
-	MOVW.CS	R8, (R8)
-	RET
-
-TEXT runtime·madvise(SB),NOSPLIT,$0
-	MOVW	addr+0(FP), R0		// arg 1 - addr
-	MOVW	len+4(FP), R1		// arg 2 - len
-	MOVW	behav+8(FP), R2		// arg 2 - behav
-	MOVW	$75, R12		// sys_madvise
-	SWI	$0
-	MOVW.CS	$0, R8			// crash on syscall failure
-	MOVW.CS	R8, (R8)
-	RET
-
-TEXT runtime·setitimer(SB),NOSPLIT,$0
-	MOVW	which+0(FP), R0		// arg 1 - which
-	MOVW	value+4(FP), R1		// arg 2 - value
-	MOVW	ovalue+8(FP), R2	// arg 3 - ovalue
-	MOVW	$69, R12		// sys_setitimer
-	SWI	$0
-	RET
-
-// func now() (sec int64, nsec int32)
-TEXT time·now(SB), NOSPLIT, $32
-	MOVW	CLOCK_REALTIME, R0	// arg 1 - clock_id
-	MOVW	$8(R13), R1		// arg 2 - tp
-	MOVW	$87, R12		// sys_clock_gettime
-	SWI	$0
-
-	MOVW	8(R13), R0		// sec - l32
-	MOVW	12(R13), R1		// sec - h32
-	MOVW	16(R13), R2		// nsec
-
-	MOVW	R0, sec_lo+0(FP)
-	MOVW	R1, sec_hi+4(FP)
-	MOVW	R2, nsec+8(FP)
-
-	RET
-
-// int64 nanotime(void) so really
-// void nanotime(int64 *nsec)
-TEXT runtime·nanotime(SB),NOSPLIT,$32
-	MOVW	CLOCK_MONOTONIC, R0	// arg 1 - clock_id
-	MOVW	$8(R13), R1		// arg 2 - tp
-	MOVW	$87, R12		// sys_clock_gettime
-	SWI	$0
-
-	MOVW	8(R13), R0		// sec - l32
-	MOVW	12(R13), R4		// sec - h32
-	MOVW	16(R13), R2		// nsec
-
-	MOVW	$1000000000, R3
-	MULLU	R0, R3, (R1, R0)
-	MUL	R3, R4
-	ADD.S	R2, R0
-	ADC	R4, R1
-
-	MOVW	R0, ret_lo+0(FP)
-	MOVW	R1, ret_hi+4(FP)
-	RET
-
-TEXT runtime·sigaction(SB),NOSPLIT,$0
-	MOVW	signum+0(FP), R0	// arg 1 - signum
-	MOVW	nsa+4(FP), R1		// arg 2 - nsa
-	MOVW	osa+8(FP), R2		// arg 3 - osa
-	MOVW	$46, R12		// sys_sigaction
-	SWI	$0
-	MOVW.CS	$3, R8			// crash on syscall failure
-	MOVW.CS	R8, (R8)
-	RET
-
-TEXT runtime·sigprocmask(SB),NOSPLIT,$0
-	MOVW	how+0(FP), R0		// arg 1 - how
-	MOVW	mask+4(FP), R1		// arg 2 - mask
-	MOVW	$48, R12		// sys_sigprocmask
-	SWI	$0
-	MOVW.CS	$3, R8			// crash on syscall failure
-	MOVW.CS	R8, (R8)
-	MOVW	R0, ret+8(FP)
-	RET
-
-TEXT runtime·sigtramp(SB),NOSPLIT,$24
-	// If called from an external code context, g will not be set.
-	// Save R0, since runtime·load_g will clobber it.
-	MOVW	R0, 4(R13)		// signum
-	MOVB	runtime·iscgo(SB), R0
-	CMP	$0, R0
-	BL.NE	runtime·load_g(SB)
-
-	CMP	$0, g
-	BNE	4(PC)
-	// Signal number saved in 4(R13).
-	MOVW	runtime·badsignal(SB), R11
-	BL	(R11)
-	RET
-
-	// Save g.
-	MOVW	g, R3
-	MOVW	g, 20(R13)
-
-	// g = m->signal
-	MOVW	g_m(g), R8
-	MOVW	m_gsignal(R8), g
-
-	// R0 already saved.
-	MOVW	R1, 8(R13)		// info
-	MOVW	R2, 12(R13)		// context
-	MOVW	R3, 16(R13)		// gp (original g)
-
-	BL	runtime·sighandler(SB)
-
-	// Restore g.
-	MOVW	20(R13), g
-	RET
-
-// int32 tfork(void *param, uintptr psize, M *mp, G *gp, void (*fn)(void));
-TEXT runtime·tfork(SB),NOSPLIT,$0
-
-	// Copy mp, gp and fn off parent stack for use by child.
-	MOVW	mm+8(FP), R4
-	MOVW	gg+12(FP), R5
-	MOVW	fn+16(FP), R6
-
-	MOVW	param+0(FP), R0		// arg 1 - param
-	MOVW	psize+4(FP), R1		// arg 2 - psize
-	MOVW	$8, R12			// sys___tfork
-	SWI	$0
-
-	// Return if syscall failed.
-	B.CC	4(PC)
-	RSB	$0, R0
-	MOVW	R0, ret+20(FP)
-	RET
-
-	// In parent, return.
-	CMP	$0, R0
-	BEQ	3(PC)
-	MOVW	R0, ret+20(FP)
-	RET
-
-	// Initialise m, g.
-	MOVW	R5, g
-	MOVW	R4, g_m(g)
-
-	// Paranoia; check that stack splitting code works.
-	BL	runtime·emptyfunc(SB)
-
-	// Call fn.
-	BL	(R6)
-
-	BL	runtime·exit1(SB)
-	MOVW	$2, R8			// crash if reached
-	MOVW	R8, (R8)
-	RET
-
-TEXT runtime·sigaltstack(SB),NOSPLIT,$0
-	MOVW	nss+0(FP), R0		// arg 1 - nss
-	MOVW	oss+4(FP), R1		// arg 2 - oss
-	MOVW	$288, R12		// sys_sigaltstack
-	SWI	$0
-	MOVW.CS	$0, R8			// crash on syscall failure
-	MOVW.CS	R8, (R8)
-	RET
-
-TEXT runtime·osyield(SB),NOSPLIT,$0
-	MOVW	$298, R12		// sys_sched_yield
-	SWI	$0
-	RET
-
-TEXT runtime·thrsleep(SB),NOSPLIT,$4
-	MOVW	ident+0(FP), R0		// arg 1 - ident
-	MOVW	clock_id+4(FP), R1	// arg 2 - clock_id
-	MOVW	tp+8(FP), R2		// arg 3 - tp
-	MOVW	lock+12(FP), R3		// arg 4 - lock
-	MOVW	abort+16(FP), R4	// arg 5 - abort (on stack)
-	MOVW	R4, 4(R13)
-	ADD	$4, R13
-	MOVW	$94, R12		// sys___thrsleep
-	SWI	$0
-	SUB	$4, R13
-	MOVW	R0, ret+20(FP)
-	RET
-
-TEXT runtime·thrwakeup(SB),NOSPLIT,$0
-	MOVW	ident+0(FP), R0		// arg 1 - ident
-	MOVW	n+4(FP), R1		// arg 2 - n
-	MOVW	$301, R12		// sys___thrwakeup
-	SWI	$0
-	MOVW	R0, ret+8(FP)
-	RET
-
-TEXT runtime·sysctl(SB),NOSPLIT,$8
-	MOVW	name+0(FP), R0		// arg 1 - name
-	MOVW	namelen+4(FP), R1	// arg 2 - namelen
-	MOVW	oldp+8(FP), R2		// arg 3 - oldp
-	MOVW	oldlenp+12(FP), R3	// arg 4 - oldlenp
-	MOVW	newp+16(FP), R4		// arg 5 - newp (on stack)
-	MOVW	R4, 4(R13)
-	MOVW	newlen+20(FP), R5	// arg 6 - newlen (on stack)
-	MOVW	R5, 8(R13)
-	ADD	$4, R13
-	MOVW	$202, R12		// sys___sysctl
-	SWI	$0
-	SUB	$4, R13
-	MOVW.CC	$0, R0
-	RSB.CS	$0, R0
-	MOVW	R0, ret+24(FP)
-	RET
-
-// int32 runtime·kqueue(void);
-TEXT runtime·kqueue(SB),NOSPLIT,$0
-	MOVW	$269, R12		// sys_kqueue
-	SWI	$0
-	RSB.CS	$0, R0
-	MOVW	R0, ret+0(FP)
-	RET
-
-// int32 runtime·kevent(int kq, Kevent *changelist, int nchanges, Kevent *eventlist, int nevents, Timespec *timeout);
-TEXT runtime·kevent(SB),NOSPLIT,$8
-	MOVW	fd+0(FP), R0		// arg 1 - fd
-	MOVW	changelist+4(FP), R1	// arg 2 - changelist
-	MOVW	nchanges+8(FP), R2	// arg 3 - nchanges
-	MOVW	eventlist+12(FP), R3	// arg 4 - eventlist
-	MOVW	nevents+16(FP), R4	// arg 5 - nevents (on stack)
-	MOVW	R4, 4(R13)
-	MOVW	timeout+20(FP), R5	// arg 6 - timeout (on stack)
-	MOVW	R5, 8(R13)
-	ADD	$4, R13
-	MOVW	$72, R12		// sys_kevent
-	SWI	$0
-	RSB.CS	$0, R0
-	SUB	$4, R13
-	MOVW	R0, ret+24(FP)
-	RET
-
-// int32 runtime·closeonexec(int32 fd);
-TEXT runtime·closeonexec(SB),NOSPLIT,$0
-	MOVW	fd+0(FP), R0		// arg 1 - fd
-	MOVW	$2, R1			// arg 2 - cmd (F_SETFD)
-	MOVW	$1, R2			// arg 3 - arg (FD_CLOEXEC)
-	MOVW	$92, R12		// sys_fcntl
-	SWI	$0
-	RSB.CS	$0, R0
-	MOVW	R0, ret+4(FP)
-	RET
-
-TEXT runtime·casp1(SB),NOSPLIT,$0
-	//B	runtime·armcas(SB)
-	B	runtime·cas(SB)
-
-TEXT runtime·cas(SB),NOSPLIT,$0
-	B	runtime·armcas(SB)
-
-TEXT ·publicationBarrier(SB),NOSPLIT,$-4-0
-	B	runtime·armPublicationBarrier(SB)
-
-// TODO(jsing): Implement.
-TEXT runtime·read_tls_fallback(SB),NOSPLIT,$-4
-	MOVW	$5, R0
-	MOVW	R0, (R0)
-	RET
diff --git a/src/runtime/sys_ppc64x.go b/src/runtime/sys_ppc64x.go
deleted file mode 100644
index bd182e3..0000000
--- a/src/runtime/sys_ppc64x.go
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ppc64 ppc64le
-
-package runtime
-
-import "unsafe"
-
-// adjust Gobuf as if it executed a call to fn with context ctxt
-// and then did an immediate Gosave.
-func gostartcall(buf *gobuf, fn, ctxt unsafe.Pointer) {
-	if buf.lr != 0 {
-		throw("invalid use of gostartcall")
-	}
-	buf.lr = buf.pc
-	buf.pc = uintptr(fn)
-	buf.ctxt = ctxt
-}
-
-// Called to rewind context saved during morestack back to beginning of function.
-// To help us, the linker emits a jmp back to the beginning right after the
-// call to morestack. We just have to decode and apply that jump.
-func rewindmorestack(buf *gobuf) {
-	var inst uint32
-	if buf.pc&3 == 0 && buf.pc != 0 {
-		inst = *(*uint32)(unsafe.Pointer(buf.pc))
-		if inst>>26 == 18 && inst&3 == 0 {
-			//print("runtime: rewind pc=", hex(buf.pc), " to pc=", hex(uintptr(buf.pc + int32(inst<<6)>>6)), "\n");
-			buf.pc += uintptr(int32(inst<<6) >> 6)
-			return
-		}
-	}
-	print("runtime: pc=", hex(buf.pc), " ", hex(inst), "\n")
-	throw("runtime: misuse of rewindmorestack")
-}
diff --git a/src/runtime/sys_x86.go b/src/runtime/sys_x86.go
deleted file mode 100644
index 3f0771f..0000000
--- a/src/runtime/sys_x86.go
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64 amd64p32 386
-
-package runtime
-
-import "unsafe"
-
-// adjust Gobuf as it if executed a call to fn with context ctxt
-// and then did an immediate gosave.
-func gostartcall(buf *gobuf, fn, ctxt unsafe.Pointer) {
-	sp := buf.sp
-	if regSize > ptrSize {
-		sp -= ptrSize
-		*(*uintptr)(unsafe.Pointer(sp)) = 0
-	}
-	sp -= ptrSize
-	*(*uintptr)(unsafe.Pointer(sp)) = buf.pc
-	buf.sp = sp
-	buf.pc = uintptr(fn)
-	buf.ctxt = ctxt
-}
-
-// Called to rewind context saved during morestack back to beginning of function.
-// To help us, the linker emits a jmp back to the beginning right after the
-// call to morestack. We just have to decode and apply that jump.
-func rewindmorestack(buf *gobuf) {
-	pc := (*[8]byte)(unsafe.Pointer(buf.pc))
-	if pc[0] == 0xe9 { // jmp 4-byte offset
-		buf.pc = buf.pc + 5 + uintptr(int64(*(*int32)(unsafe.Pointer(&pc[1]))))
-		return
-	}
-	if pc[0] == 0xeb { // jmp 1-byte offset
-		buf.pc = buf.pc + 2 + uintptr(int64(*(*int8)(unsafe.Pointer(&pc[1]))))
-		return
-	}
-	if pc[0] == 0xcc {
-		// This is a breakpoint inserted by gdb.  We could use
-		// runtime·findfunc to find the function.  But if we
-		// do that, then we will continue execution at the
-		// function entry point, and we will not hit the gdb
-		// breakpoint.  So for this case we don't change
-		// buf.pc, so that when we return we will execute
-		// the jump instruction and carry on.  This means that
-		// stack unwinding may not work entirely correctly
-		// (https://golang.org/issue/5723) but the user is
-		// running under gdb anyhow.
-		return
-	}
-	print("runtime: pc=", pc, " ", hex(pc[0]), " ", hex(pc[1]), " ", hex(pc[2]), " ", hex(pc[3]), " ", hex(pc[4]), "\n")
-	throw("runtime: misuse of rewindmorestack")
-}
diff --git a/src/runtime/syscall2_solaris.go b/src/runtime/syscall2_solaris.go
deleted file mode 100644
index df72996..0000000
--- a/src/runtime/syscall2_solaris.go
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import _ "unsafe" // for go:linkname
-
-//go:cgo_import_dynamic libc_chdir chdir "libc.so"
-//go:cgo_import_dynamic libc_chroot chroot "libc.so"
-//go:cgo_import_dynamic libc_close close "libc.so"
-//go:cgo_import_dynamic libc_dlclose dlclose "libc.so"
-//go:cgo_import_dynamic libc_dlopen dlopen "libc.so"
-//go:cgo_import_dynamic libc_dlsym dlsym "libc.so"
-//go:cgo_import_dynamic libc_execve execve "libc.so"
-//go:cgo_import_dynamic libc_fcntl fcntl "libc.so"
-//go:cgo_import_dynamic libc_gethostname gethostname "libc.so"
-//go:cgo_import_dynamic libc_getpid getpid "libc.so"
-//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
-//go:cgo_import_dynamic libc_pipe pipe "libc.so"
-//go:cgo_import_dynamic libc_setgid setgid "libc.so"
-//go:cgo_import_dynamic libc_setgroups setgroups "libc.so"
-//go:cgo_import_dynamic libc_setsid setsid "libc.so"
-//go:cgo_import_dynamic libc_setuid setuid "libc.so"
-//go:cgo_import_dynamic libc_setpgid setpgid "libc.so"
-//go:cgo_import_dynamic libc_syscall syscall "libc.so"
-//go:cgo_import_dynamic libc_forkx forkx "libc.so"
-//go:cgo_import_dynamic libc_wait4 wait4 "libc.so"
-
-//go:linkname libc_chdir libc_chdir
-//go:linkname libc_chroot libc_chroot
-//go:linkname libc_close libc_close
-//go:linkname libc_dlclose libc_dlclose
-//go:linkname libc_dlopen libc_dlopen
-//go:linkname libc_dlsym libc_dlsym
-//go:linkname libc_execve libc_execve
-//go:linkname libc_fcntl libc_fcntl
-//go:linkname libc_gethostname libc_gethostname
-//go:linkname libc_getpid libc_getpid
-//go:linkname libc_ioctl libc_ioctl
-//go:linkname libc_pipe libc_pipe
-//go:linkname libc_setgid libc_setgid
-//go:linkname libc_setgroups libc_setgroups
-//go:linkname libc_setsid libc_setsid
-//go:linkname libc_setuid libc_setuid
-//go:linkname libc_setpgid libc_setpgid
-//go:linkname libc_syscall libc_syscall
-//go:linkname libc_forkx libc_forkx
-//go:linkname libc_wait4 libc_wait4
diff --git a/src/runtime/textflag.h b/src/runtime/textflag.h
deleted file mode 100644
index 2a76e76..0000000
--- a/src/runtime/textflag.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file defines flags attached to various functions
-// and data objects.  The compilers, assemblers, and linker must
-// all agree on these values.
-
-// Don't profile the marked routine.  This flag is deprecated.
-#define NOPROF	1
-// It is ok for the linker to get multiple of these symbols.  It will
-// pick one of the duplicates to use.
-#define DUPOK	2
-// Don't insert stack check preamble.
-#define NOSPLIT	4
-// Put this data in a read-only section.
-#define RODATA	8
-// This data contains no pointers.
-#define NOPTR	16
-// This is a wrapper function and should not count as disabling 'recover'.
-#define WRAPPER 32
-// This function uses its incoming context register.
-#define NEEDCTXT 64
diff --git a/src/runtime/tls_arm64.h b/src/runtime/tls_arm64.h
deleted file mode 100644
index d5676ab..0000000
--- a/src/runtime/tls_arm64.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#ifdef GOOS_linux
-#define TPIDR TPIDR_EL0
-#define MRS_TPIDR_R0 WORD $0xd53bd040 // MRS TPIDR_EL0, R0
-#endif
-
-#ifdef GOOS_darwin
-#define TPIDR TPIDRRO_EL0
-#define TLSG_IS_VARIABLE
-#define MRS_TPIDR_R0 WORD $0xd53bd060 // MRS TPIDRRO_EL0, R0
-#endif
-
-// Define something that will break the build if
-// the GOOS is unknown.
-#ifndef TPIDR
-#define MRS_TPIDR_R0 TPIDR_UNKNOWN
-#endif
diff --git a/src/runtime/tls_arm64.s b/src/runtime/tls_arm64.s
deleted file mode 100644
index a5f86c4..0000000
--- a/src/runtime/tls_arm64.s
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "go_asm.h"
-#include "go_tls.h"
-#include "funcdata.h"
-#include "textflag.h"
-#include "tls_arm64.h"
-
-TEXT runtime·load_g(SB),NOSPLIT,$0
-	MOVB	runtime·iscgo(SB), R0
-	CMP	$0, R0
-	BEQ	nocgo
-
-	MRS_TPIDR_R0
-#ifdef GOOS_darwin
-	// Darwin sometimes returns unaligned pointers
-	AND	$0xfffffffffffffff8, R0
-#endif
-#ifdef TLSG_IS_VARIABLE
-	MOVD	runtime·tls_g(SB), R27
-	ADD	R27, R0
-#else
-	// TODO(minux): use real TLS relocation, instead of hard-code for Linux
-	ADD	$0x10, R0
-#endif
-	MOVD	0(R0), g
-
-nocgo:
-	RET
-
-TEXT runtime·save_g(SB),NOSPLIT,$0
-	MOVB	runtime·iscgo(SB), R0
-	CMP	$0, R0
-	BEQ	nocgo
-
-	MRS_TPIDR_R0
-#ifdef GOOS_darwin
-	// Darwin sometimes returns unaligned pointers
-	AND	$0xfffffffffffffff8, R0
-#endif
-#ifdef TLSG_IS_VARIABLE
-	MOVD	runtime·tls_g(SB), R27
-	ADD	R27, R0
-#else
-	// TODO(minux): use real TLS relocation, instead of hard-code for Linux
-	ADD	$0x10, R0
-#endif
-	MOVD	g, 0(R0)
-
-nocgo:
-	RET
-
-#ifdef TLSG_IS_VARIABLE
-// The runtime.tlsg name is being handled specially in the
-// linker. As we just need a regular variable here, don't
-// use that name.
-GLOBL runtime·tls_g+0(SB), NOPTR, $8
-#endif
diff --git a/src/runtime/tls_ppc64x.s b/src/runtime/tls_ppc64x.s
deleted file mode 100644
index fc1718f..0000000
--- a/src/runtime/tls_ppc64x.s
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ppc64 ppc64le
-
-#include "go_asm.h"
-#include "go_tls.h"
-#include "funcdata.h"
-#include "textflag.h"
-
-// We have to resort to TLS variable to save g (R30).
-// One reason is that external code might trigger
-// SIGSEGV, and our runtime.sigtramp don't even know we
-// are in external code, and will continue to use R30,
-// this might well result in another SIGSEGV.
-
-// save_g saves the g register into pthread-provided
-// thread-local memory, so that we can call externally compiled
-// ppc64 code that will overwrite this register.
-//
-// If !iscgo, this is a no-op.
-//
-// NOTE: setg_gcc<> assume this clobbers only R31.
-TEXT runtime·save_g(SB),NOSPLIT,$-8-0
-	MOVB	runtime·iscgo(SB), R31
-	CMP	R31, $0
-	BEQ	nocgo
-
-	// $runtime.tlsg(SB) is a special linker symbol.
-	// It is the offset from the start of TLS to our
-	// thread-local storage for g.
-	MOVD	$runtime·tlsg(SB), R31
-	ADD	R13, R31
-	// The actual TLS base is 0x7000 below R13
-	SUB	$0x7000, R31
-
-	// Store g in TLS
-	MOVD	g, 0(R31)
-
-nocgo:
-	RET
-
-// load_g loads the g register from pthread-provided
-// thread-local memory, for use after calling externally compiled
-// ppc64 code that overwrote those registers.
-//
-// This is never called directly from C code (it doesn't have to
-// follow the C ABI), but it may be called from a C context, where the
-// usual Go registers aren't set up.
-//
-// NOTE: _cgo_topofstack assumes this only clobbers g (R30), and R31.
-TEXT runtime·load_g(SB),NOSPLIT,$-8-0
-	MOVD	$runtime·tlsg(SB), R31
-	// R13 is the C ABI TLS base pointer + 0x7000
-	ADD	R13, R31
-	SUB	$0x7000, R31
-
-	MOVD	0(R31), g
-	RET
diff --git a/src/runtime/trace.go b/src/runtime/trace.go
deleted file mode 100644
index c818462..0000000
--- a/src/runtime/trace.go
+++ /dev/null
@@ -1,859 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Go execution tracer.
-// The tracer captures a wide range of execution events like goroutine
-// creation/blocking/unblocking, syscall enter/exit/block, GC-related events,
-// changes of heap size, processor start/stop, etc and writes them to a buffer
-// in a compact form. A precise nanosecond-precision timestamp and a stack
-// trace is captured for most events.
-// See https://golang.org/s/go15trace for more info.
-
-package runtime
-
-import "unsafe"
-
-// Event types in the trace, args are given in square brackets.
-const (
-	traceEvNone           = 0  // unused
-	traceEvBatch          = 1  // start of per-P batch of events [pid, timestamp]
-	traceEvFrequency      = 2  // contains tracer timer frequency [frequency (ticks per second)]
-	traceEvStack          = 3  // stack [stack id, number of PCs, array of PCs]
-	traceEvGomaxprocs     = 4  // current value of GOMAXPROCS [timestamp, GOMAXPROCS, stack id]
-	traceEvProcStart      = 5  // start of P [timestamp, thread id]
-	traceEvProcStop       = 6  // stop of P [timestamp]
-	traceEvGCStart        = 7  // GC start [timestamp, stack id]
-	traceEvGCDone         = 8  // GC done [timestamp]
-	traceEvGCScanStart    = 9  // GC scan start [timestamp]
-	traceEvGCScanDone     = 10 // GC scan done [timestamp]
-	traceEvGCSweepStart   = 11 // GC sweep start [timestamp, stack id]
-	traceEvGCSweepDone    = 12 // GC sweep done [timestamp]
-	traceEvGoCreate       = 13 // goroutine creation [timestamp, new goroutine id, start PC, stack id]
-	traceEvGoStart        = 14 // goroutine starts running [timestamp, goroutine id]
-	traceEvGoEnd          = 15 // goroutine ends [timestamp]
-	traceEvGoStop         = 16 // goroutine stops (like in select{}) [timestamp, stack]
-	traceEvGoSched        = 17 // goroutine calls Gosched [timestamp, stack]
-	traceEvGoPreempt      = 18 // goroutine is preempted [timestamp, stack]
-	traceEvGoSleep        = 19 // goroutine calls Sleep [timestamp, stack]
-	traceEvGoBlock        = 20 // goroutine blocks [timestamp, stack]
-	traceEvGoUnblock      = 21 // goroutine is unblocked [timestamp, goroutine id, stack]
-	traceEvGoBlockSend    = 22 // goroutine blocks on chan send [timestamp, stack]
-	traceEvGoBlockRecv    = 23 // goroutine blocks on chan recv [timestamp, stack]
-	traceEvGoBlockSelect  = 24 // goroutine blocks on select [timestamp, stack]
-	traceEvGoBlockSync    = 25 // goroutine blocks on Mutex/RWMutex [timestamp, stack]
-	traceEvGoBlockCond    = 26 // goroutine blocks on Cond [timestamp, stack]
-	traceEvGoBlockNet     = 27 // goroutine blocks on network [timestamp, stack]
-	traceEvGoSysCall      = 28 // syscall enter [timestamp, stack]
-	traceEvGoSysExit      = 29 // syscall exit [timestamp, goroutine id, real timestamp]
-	traceEvGoSysBlock     = 30 // syscall blocks [timestamp]
-	traceEvGoWaiting      = 31 // denotes that goroutine is blocked when tracing starts [goroutine id]
-	traceEvGoInSyscall    = 32 // denotes that goroutine is in syscall when tracing starts [goroutine id]
-	traceEvHeapAlloc      = 33 // memstats.heap_live change [timestamp, heap_alloc]
-	traceEvNextGC         = 34 // memstats.next_gc change [timestamp, next_gc]
-	traceEvTimerGoroutine = 35 // denotes timer goroutine [timer goroutine id]
-	traceEvFutileWakeup   = 36 // denotes that the previous wakeup of this goroutine was futile [timestamp]
-	traceEvCount          = 37
-)
-
-const (
-	// Timestamps in trace are cputicks/traceTickDiv.
-	// This makes absolute values of timestamp diffs smaller,
-	// and so they are encoded in less number of bytes.
-	// 64 on x86 is somewhat arbitrary (one tick is ~20ns on a 3GHz machine).
-	// The suggested increment frequency for PowerPC's time base register is
-	// 512 MHz according to Power ISA v2.07 section 6.2, so we use 16 on ppc64
-	// and ppc64le.
-	// Tracing won't work reliably for architectures where cputicks is emulated
-	// by nanotime, so the value doesn't matter for those architectures.
-	traceTickDiv = 16 + 48*(goarch_386|goarch_amd64|goarch_amd64p32)
-	// Maximum number of PCs in a single stack trace.
-	// Since events contain only stack id rather than whole stack trace,
-	// we can allow quite large values here.
-	traceStackSize = 128
-	// Identifier of a fake P that is used when we trace without a real P.
-	traceGlobProc = -1
-	// Maximum number of bytes to encode uint64 in base-128.
-	traceBytesPerNumber = 10
-	// Shift of the number of arguments in the first event byte.
-	traceArgCountShift = 6
-	// Flag passed to traceGoPark to denote that the previous wakeup of this
-	// goroutine was futile. For example, a goroutine was unblocked on a mutex,
-	// but another goroutine got ahead and acquired the mutex before the first
-	// goroutine is scheduled, so the first goroutine has to block again.
-	// Such wakeups happen on buffered channels and sync.Mutex,
-	// but are generally not interesting for end user.
-	traceFutileWakeup byte = 128
-)
-
-// trace is global tracing context.
-var trace struct {
-	lock          mutex     // protects the following members
-	lockOwner     *g        // to avoid deadlocks during recursive lock locks
-	enabled       bool      // when set runtime traces events
-	shutdown      bool      // set when we are waiting for trace reader to finish after setting enabled to false
-	headerWritten bool      // whether ReadTrace has emitted trace header
-	footerWritten bool      // whether ReadTrace has emitted trace footer
-	shutdownSema  uint32    // used to wait for ReadTrace completion
-	seqStart      uint64    // sequence number when tracing was started
-	ticksStart    int64     // cputicks when tracing was started
-	ticksEnd      int64     // cputicks when tracing was stopped
-	timeStart     int64     // nanotime when tracing was started
-	timeEnd       int64     // nanotime when tracing was stopped
-	reading       *traceBuf // buffer currently handed off to user
-	empty         *traceBuf // stack of empty buffers
-	fullHead      *traceBuf // queue of full buffers
-	fullTail      *traceBuf
-	reader        *g              // goroutine that called ReadTrace, or nil
-	stackTab      traceStackTable // maps stack traces to unique ids
-
-	bufLock mutex     // protects buf
-	buf     *traceBuf // global trace buffer, used when running without a p
-}
-
-var traceseq uint64 // global trace sequence number
-
-// tracestamp returns a consistent sequence number, time stamp pair
-// for use in a trace. We need to make sure that time stamp ordering
-// (assuming synchronized CPUs) and sequence ordering match.
-// To do that, we increment traceseq, grab ticks, and increment traceseq again.
-// We treat odd traceseq as a sign that another thread is in the middle
-// of the sequence and spin until it is done.
-// Not splitting stack to avoid preemption, just in case the call sites
-// that used to call xadd64 and cputicks are sensitive to that.
-//go:nosplit
-func tracestamp() (seq uint64, ts int64) {
-	seq = atomicload64(&traceseq)
-	for seq&1 != 0 || !cas64(&traceseq, seq, seq+1) {
-		seq = atomicload64(&traceseq)
-	}
-	ts = cputicks()
-	atomicstore64(&traceseq, seq+2)
-	return seq >> 1, ts
-}
-
-// traceBufHeader is per-P tracing buffer.
-type traceBufHeader struct {
-	link      *traceBuf               // in trace.empty/full
-	lastSeq   uint64                  // sequence number of last event
-	lastTicks uint64                  // when we wrote the last event
-	buf       []byte                  // trace data, always points to traceBuf.arr
-	stk       [traceStackSize]uintptr // scratch buffer for traceback
-}
-
-// traceBuf is per-P tracing buffer.
-type traceBuf struct {
-	traceBufHeader
-	arr [64<<10 - unsafe.Sizeof(traceBufHeader{})]byte // underlying buffer for traceBufHeader.buf
-}
-
-// StartTrace enables tracing for the current process.
-// While tracing, the data will be buffered and available via ReadTrace.
-// StartTrace returns an error if tracing is already enabled.
-// Most clients should use the runtime/trace package or the testing package's
-// -test.trace flag instead of calling StartTrace directly.
-func StartTrace() error {
-	// Stop the world, so that we can take a consistent snapshot
-	// of all goroutines at the beginning of the trace.
-	stopTheWorld("start tracing")
-
-	// We are in stop-the-world, but syscalls can finish and write to trace concurrently.
-	// Exitsyscall could check trace.enabled long before and then suddenly wake up
-	// and decide to write to trace at a random point in time.
-	// However, such syscall will use the global trace.buf buffer, because we've
-	// acquired all p's by doing stop-the-world. So this protects us from such races.
-	lock(&trace.bufLock)
-
-	if trace.enabled || trace.shutdown {
-		unlock(&trace.bufLock)
-		startTheWorld()
-		return errorString("tracing is already enabled")
-	}
-
-	trace.seqStart, trace.ticksStart = tracestamp()
-	trace.timeStart = nanotime()
-	trace.headerWritten = false
-	trace.footerWritten = false
-
-	// Can't set trace.enabled yet. While the world is stopped, exitsyscall could
-	// already emit a delayed event (see exitTicks in exitsyscall) if we set trace.enabled here.
-	// That would lead to an inconsistent trace:
-	// - either GoSysExit appears before EvGoInSyscall,
-	// - or GoSysExit appears for a goroutine for which we don't emit EvGoInSyscall below.
-	// To instruct traceEvent that it must not ignore events below, we set startingtrace.
-	// trace.enabled is set afterwards once we have emitted all preliminary events.
-	_g_ := getg()
-	_g_.m.startingtrace = true
-	for _, gp := range allgs {
-		status := readgstatus(gp)
-		if status != _Gdead {
-			traceGoCreate(gp, gp.startpc)
-		}
-		if status == _Gwaiting {
-			traceEvent(traceEvGoWaiting, -1, uint64(gp.goid))
-		}
-		if status == _Gsyscall {
-			traceEvent(traceEvGoInSyscall, -1, uint64(gp.goid))
-		} else {
-			gp.sysblocktraced = false
-		}
-	}
-	traceProcStart()
-	traceGoStart()
-	_g_.m.startingtrace = false
-	trace.enabled = true
-
-	unlock(&trace.bufLock)
-
-	startTheWorld()
-	return nil
-}
-
-// StopTrace stops tracing, if it was previously enabled.
-// StopTrace only returns after all the reads for the trace have completed.
-func StopTrace() {
-	// Stop the world so that we can collect the trace buffers from all p's below,
-	// and also to avoid races with traceEvent.
-	stopTheWorld("stop tracing")
-
-	// See the comment in StartTrace.
-	lock(&trace.bufLock)
-
-	if !trace.enabled {
-		unlock(&trace.bufLock)
-		startTheWorld()
-		return
-	}
-
-	traceGoSched()
-
-	for _, p := range &allp {
-		if p == nil {
-			break
-		}
-		buf := p.tracebuf
-		if buf != nil {
-			traceFullQueue(buf)
-			p.tracebuf = nil
-		}
-	}
-	if trace.buf != nil && len(trace.buf.buf) != 0 {
-		buf := trace.buf
-		trace.buf = nil
-		traceFullQueue(buf)
-	}
-
-	for {
-		trace.ticksEnd = cputicks()
-		trace.timeEnd = nanotime()
-		// Windows time can tick only every 15ms, wait for at least one tick.
-		if trace.timeEnd != trace.timeStart {
-			break
-		}
-		osyield()
-	}
-
-	trace.enabled = false
-	trace.shutdown = true
-	trace.stackTab.dump()
-
-	unlock(&trace.bufLock)
-
-	startTheWorld()
-
-	// The world is started but we've set trace.shutdown, so new tracing can't start.
-	// Wait for the trace reader to flush pending buffers and stop.
-	semacquire(&trace.shutdownSema, false)
-	if raceenabled {
-		raceacquire(unsafe.Pointer(&trace.shutdownSema))
-	}
-
-	// The lock protects us from races with StartTrace/StopTrace because they do stop-the-world.
-	lock(&trace.lock)
-	for _, p := range &allp {
-		if p == nil {
-			break
-		}
-		if p.tracebuf != nil {
-			throw("trace: non-empty trace buffer in proc")
-		}
-	}
-	if trace.buf != nil {
-		throw("trace: non-empty global trace buffer")
-	}
-	if trace.fullHead != nil || trace.fullTail != nil {
-		throw("trace: non-empty full trace buffer")
-	}
-	if trace.reading != nil || trace.reader != nil {
-		throw("trace: reading after shutdown")
-	}
-	for trace.empty != nil {
-		buf := trace.empty
-		trace.empty = buf.link
-		sysFree(unsafe.Pointer(buf), unsafe.Sizeof(*buf), &memstats.other_sys)
-	}
-	trace.shutdown = false
-	unlock(&trace.lock)
-}
-
-// ReadTrace returns the next chunk of binary tracing data, blocking until data
-// is available. If tracing is turned off and all the data accumulated while it
-// was on has been returned, ReadTrace returns nil. The caller must copy the
-// returned data before calling ReadTrace again.
-// ReadTrace must be called from one goroutine at a time.
-func ReadTrace() []byte {
-	// This function may need to lock trace.lock recursively
-	// (goparkunlock -> traceGoPark -> traceEvent -> traceFlush).
-	// To allow this we use trace.lockOwner.
-	// Also this function must not allocate while holding trace.lock:
-	// allocation can call heap allocate, which will try to emit a trace
-	// event while holding heap lock.
-	lock(&trace.lock)
-	trace.lockOwner = getg()
-
-	if trace.reader != nil {
-		// More than one goroutine reads trace. This is bad.
-		// But we rather do not crash the program because of tracing,
-		// because tracing can be enabled at runtime on prod servers.
-		trace.lockOwner = nil
-		unlock(&trace.lock)
-		println("runtime: ReadTrace called from multiple goroutines simultaneously")
-		return nil
-	}
-	// Recycle the old buffer.
-	if buf := trace.reading; buf != nil {
-		buf.link = trace.empty
-		trace.empty = buf
-		trace.reading = nil
-	}
-	// Write trace header.
-	if !trace.headerWritten {
-		trace.headerWritten = true
-		trace.lockOwner = nil
-		unlock(&trace.lock)
-		return []byte("go 1.5 trace\x00\x00\x00\x00")
-	}
-	// Wait for new data.
-	if trace.fullHead == nil && !trace.shutdown {
-		trace.reader = getg()
-		goparkunlock(&trace.lock, "trace reader (blocked)", traceEvGoBlock, 2)
-		lock(&trace.lock)
-	}
-	// Write a buffer.
-	if trace.fullHead != nil {
-		buf := traceFullDequeue()
-		trace.reading = buf
-		trace.lockOwner = nil
-		unlock(&trace.lock)
-		return buf.buf
-	}
-	// Write footer with timer frequency.
-	if !trace.footerWritten {
-		trace.footerWritten = true
-		// Use float64 because (trace.ticksEnd - trace.ticksStart) * 1e9 can overflow int64.
-		freq := float64(trace.ticksEnd-trace.ticksStart) * 1e9 / float64(trace.timeEnd-trace.timeStart) / traceTickDiv
-		trace.lockOwner = nil
-		unlock(&trace.lock)
-		var data []byte
-		data = append(data, traceEvFrequency|0<<traceArgCountShift)
-		data = traceAppend(data, uint64(freq))
-		data = traceAppend(data, 0)
-		if timers.gp != nil {
-			data = append(data, traceEvTimerGoroutine|0<<traceArgCountShift)
-			data = traceAppend(data, uint64(timers.gp.goid))
-			data = traceAppend(data, 0)
-		}
-		return data
-	}
-	// Done.
-	if trace.shutdown {
-		trace.lockOwner = nil
-		unlock(&trace.lock)
-		if raceenabled {
-			// Model synchronization on trace.shutdownSema, which race
-			// detector does not see. This is required to avoid false
-			// race reports on writer passed to trace.Start.
-			racerelease(unsafe.Pointer(&trace.shutdownSema))
-		}
-		// trace.enabled is already reset, so can call traceable functions.
-		semrelease(&trace.shutdownSema)
-		return nil
-	}
-	// Also bad, but see the comment above.
-	trace.lockOwner = nil
-	unlock(&trace.lock)
-	println("runtime: spurious wakeup of trace reader")
-	return nil
-}
-
-// traceReader returns the trace reader that should be woken up, if any.
-func traceReader() *g {
-	if trace.reader == nil || (trace.fullHead == nil && !trace.shutdown) {
-		return nil
-	}
-	lock(&trace.lock)
-	if trace.reader == nil || (trace.fullHead == nil && !trace.shutdown) {
-		unlock(&trace.lock)
-		return nil
-	}
-	gp := trace.reader
-	trace.reader = nil
-	unlock(&trace.lock)
-	return gp
-}
-
-// traceProcFree frees trace buffer associated with pp.
-func traceProcFree(pp *p) {
-	buf := pp.tracebuf
-	pp.tracebuf = nil
-	if buf == nil {
-		return
-	}
-	lock(&trace.lock)
-	traceFullQueue(buf)
-	unlock(&trace.lock)
-}
-
-// traceFullQueue queues buf into queue of full buffers.
-func traceFullQueue(buf *traceBuf) {
-	buf.link = nil
-	if trace.fullHead == nil {
-		trace.fullHead = buf
-	} else {
-		trace.fullTail.link = buf
-	}
-	trace.fullTail = buf
-}
-
-// traceFullDequeue dequeues from queue of full buffers.
-func traceFullDequeue() *traceBuf {
-	buf := trace.fullHead
-	if buf == nil {
-		return nil
-	}
-	trace.fullHead = buf.link
-	if trace.fullHead == nil {
-		trace.fullTail = nil
-	}
-	buf.link = nil
-	return buf
-}
-
-// traceEvent writes a single event to trace buffer, flushing the buffer if necessary.
-// ev is event type.
-// If skip > 0, write current stack id as the last argument (skipping skip top frames).
-// If skip = 0, this event type should contain a stack, but we don't want
-// to collect and remember it for this particular call.
-func traceEvent(ev byte, skip int, args ...uint64) {
-	mp, pid, bufp := traceAcquireBuffer()
-	// Double-check trace.enabled now that we've done m.locks++ and acquired bufLock.
-	// This protects from races between traceEvent and StartTrace/StopTrace.
-
-	// The caller checked that trace.enabled == true, but trace.enabled might have been
-	// turned off between the check and now. Check again. traceLockBuffer did mp.locks++,
-	// StopTrace does stopTheWorld, and stopTheWorld waits for mp.locks to go back to zero,
-	// so if we see trace.enabled == true now, we know it's true for the rest of the function.
-	// Exitsyscall can run even during stopTheWorld. The race with StartTrace/StopTrace
-	// during tracing in exitsyscall is resolved by locking trace.bufLock in traceLockBuffer.
-	if !trace.enabled && !mp.startingtrace {
-		traceReleaseBuffer(pid)
-		return
-	}
-	buf := *bufp
-	const maxSize = 2 + 5*traceBytesPerNumber // event type, length, sequence, timestamp, stack id and two add params
-	if buf == nil || cap(buf.buf)-len(buf.buf) < maxSize {
-		buf = traceFlush(buf)
-		*bufp = buf
-	}
-
-	seq, ticksraw := tracestamp()
-	seqDiff := seq - buf.lastSeq
-	ticks := uint64(ticksraw) / traceTickDiv
-	tickDiff := ticks - buf.lastTicks
-	if len(buf.buf) == 0 {
-		data := buf.buf
-		data = append(data, traceEvBatch|1<<traceArgCountShift)
-		data = traceAppend(data, uint64(pid))
-		data = traceAppend(data, seq)
-		data = traceAppend(data, ticks)
-		buf.buf = data
-		seqDiff = 0
-		tickDiff = 0
-	}
-	buf.lastSeq = seq
-	buf.lastTicks = ticks
-	narg := byte(len(args))
-	if skip >= 0 {
-		narg++
-	}
-	// We have only 2 bits for number of arguments.
-	// If number is >= 3, then the event type is followed by event length in bytes.
-	if narg > 3 {
-		narg = 3
-	}
-	data := buf.buf
-	data = append(data, ev|narg<<traceArgCountShift)
-	var lenp *byte
-	if narg == 3 {
-		// Reserve the byte for length assuming that length < 128.
-		data = append(data, 0)
-		lenp = &data[len(data)-1]
-	}
-	data = traceAppend(data, seqDiff)
-	data = traceAppend(data, tickDiff)
-	for _, a := range args {
-		data = traceAppend(data, a)
-	}
-	if skip == 0 {
-		data = append(data, 0)
-	} else if skip > 0 {
-		_g_ := getg()
-		gp := mp.curg
-		var nstk int
-		if gp == _g_ {
-			nstk = callers(skip, buf.stk[:])
-		} else if gp != nil {
-			gp = mp.curg
-			nstk = gcallers(gp, skip, buf.stk[:])
-		}
-		if nstk > 0 {
-			nstk-- // skip runtime.goexit
-		}
-		if nstk > 0 && gp.goid == 1 {
-			nstk-- // skip runtime.main
-		}
-		id := trace.stackTab.put(buf.stk[:nstk])
-		data = traceAppend(data, uint64(id))
-	}
-	evSize := len(data) - len(buf.buf)
-	if evSize > maxSize {
-		throw("invalid length of trace event")
-	}
-	if lenp != nil {
-		// Fill in actual length.
-		*lenp = byte(evSize - 2)
-	}
-	buf.buf = data
-	traceReleaseBuffer(pid)
-}
-
-// traceAcquireBuffer returns trace buffer to use and, if necessary, locks it.
-func traceAcquireBuffer() (mp *m, pid int32, bufp **traceBuf) {
-	mp = acquirem()
-	if p := mp.p.ptr(); p != nil {
-		return mp, p.id, &p.tracebuf
-	}
-	lock(&trace.bufLock)
-	return mp, traceGlobProc, &trace.buf
-}
-
-// traceReleaseBuffer releases a buffer previously acquired with traceAcquireBuffer.
-func traceReleaseBuffer(pid int32) {
-	if pid == traceGlobProc {
-		unlock(&trace.bufLock)
-	}
-	releasem(getg().m)
-}
-
-// traceFlush puts buf onto stack of full buffers and returns an empty buffer.
-func traceFlush(buf *traceBuf) *traceBuf {
-	owner := trace.lockOwner
-	dolock := owner == nil || owner != getg().m.curg
-	if dolock {
-		lock(&trace.lock)
-	}
-	if buf != nil {
-		if &buf.buf[0] != &buf.arr[0] {
-			throw("trace buffer overflow")
-		}
-		traceFullQueue(buf)
-	}
-	if trace.empty != nil {
-		buf = trace.empty
-		trace.empty = buf.link
-	} else {
-		buf = (*traceBuf)(sysAlloc(unsafe.Sizeof(traceBuf{}), &memstats.other_sys))
-		if buf == nil {
-			throw("trace: out of memory")
-		}
-	}
-	buf.link = nil
-	buf.buf = buf.arr[:0]
-	buf.lastTicks = 0
-	if dolock {
-		unlock(&trace.lock)
-	}
-	return buf
-}
-
-// traceAppend appends v to buf in little-endian-base-128 encoding.
-func traceAppend(buf []byte, v uint64) []byte {
-	for ; v >= 0x80; v >>= 7 {
-		buf = append(buf, 0x80|byte(v))
-	}
-	buf = append(buf, byte(v))
-	return buf
-}
-
-// traceStackTable maps stack traces (arrays of PC's) to unique uint32 ids.
-// It is lock-free for reading.
-type traceStackTable struct {
-	lock mutex
-	seq  uint32
-	mem  traceAlloc
-	tab  [1 << 13]*traceStack
-}
-
-// traceStack is a single stack in traceStackTable.
-type traceStack struct {
-	link *traceStack
-	hash uintptr
-	id   uint32
-	n    int
-	stk  [0]uintptr // real type [n]uintptr
-}
-
-// stack returns slice of PCs.
-func (ts *traceStack) stack() []uintptr {
-	return (*[traceStackSize]uintptr)(unsafe.Pointer(&ts.stk))[:ts.n]
-}
-
-// put returns a unique id for the stack trace pcs and caches it in the table,
-// if it sees the trace for the first time.
-func (tab *traceStackTable) put(pcs []uintptr) uint32 {
-	if len(pcs) == 0 {
-		return 0
-	}
-	hash := memhash(unsafe.Pointer(&pcs[0]), uintptr(len(pcs))*unsafe.Sizeof(pcs[0]), 0)
-	// First, search the hashtable w/o the mutex.
-	if id := tab.find(pcs, hash); id != 0 {
-		return id
-	}
-	// Now, double check under the mutex.
-	lock(&tab.lock)
-	if id := tab.find(pcs, hash); id != 0 {
-		unlock(&tab.lock)
-		return id
-	}
-	// Create new record.
-	tab.seq++
-	stk := tab.newStack(len(pcs))
-	stk.hash = hash
-	stk.id = tab.seq
-	stk.n = len(pcs)
-	stkpc := stk.stack()
-	for i, pc := range pcs {
-		stkpc[i] = pc
-	}
-	part := int(hash % uintptr(len(tab.tab)))
-	stk.link = tab.tab[part]
-	atomicstorep(unsafe.Pointer(&tab.tab[part]), unsafe.Pointer(stk))
-	unlock(&tab.lock)
-	return stk.id
-}
-
-// find checks if the stack trace pcs is already present in the table.
-func (tab *traceStackTable) find(pcs []uintptr, hash uintptr) uint32 {
-	part := int(hash % uintptr(len(tab.tab)))
-Search:
-	for stk := tab.tab[part]; stk != nil; stk = stk.link {
-		if stk.hash == hash && stk.n == len(pcs) {
-			for i, stkpc := range stk.stack() {
-				if stkpc != pcs[i] {
-					continue Search
-				}
-			}
-			return stk.id
-		}
-	}
-	return 0
-}
-
-// newStack allocates a new stack of size n.
-func (tab *traceStackTable) newStack(n int) *traceStack {
-	return (*traceStack)(tab.mem.alloc(unsafe.Sizeof(traceStack{}) + uintptr(n)*ptrSize))
-}
-
-// dump writes all previously cached stacks to trace buffers,
-// releases all memory and resets state.
-func (tab *traceStackTable) dump() {
-	var tmp [(2 + traceStackSize) * traceBytesPerNumber]byte
-	buf := traceFlush(nil)
-	for _, stk := range tab.tab {
-		for ; stk != nil; stk = stk.link {
-			maxSize := 1 + (3+stk.n)*traceBytesPerNumber
-			if cap(buf.buf)-len(buf.buf) < maxSize {
-				buf = traceFlush(buf)
-			}
-			// Form the event in the temp buffer, we need to know the actual length.
-			tmpbuf := tmp[:0]
-			tmpbuf = traceAppend(tmpbuf, uint64(stk.id))
-			tmpbuf = traceAppend(tmpbuf, uint64(stk.n))
-			for _, pc := range stk.stack() {
-				tmpbuf = traceAppend(tmpbuf, uint64(pc))
-			}
-			// Now copy to the buffer.
-			data := buf.buf
-			data = append(data, traceEvStack|3<<traceArgCountShift)
-			data = traceAppend(data, uint64(len(tmpbuf)))
-			data = append(data, tmpbuf...)
-			buf.buf = data
-		}
-	}
-
-	lock(&trace.lock)
-	traceFullQueue(buf)
-	unlock(&trace.lock)
-
-	tab.mem.drop()
-	*tab = traceStackTable{}
-}
-
-// traceAlloc is a non-thread-safe region allocator.
-// It holds a linked list of traceAllocBlock.
-type traceAlloc struct {
-	head *traceAllocBlock
-	off  uintptr
-}
-
-// traceAllocBlock is a block in traceAlloc.
-type traceAllocBlock struct {
-	next *traceAllocBlock
-	data [64<<10 - ptrSize]byte
-}
-
-// alloc allocates n-byte block.
-func (a *traceAlloc) alloc(n uintptr) unsafe.Pointer {
-	n = round(n, ptrSize)
-	if a.head == nil || a.off+n > uintptr(len(a.head.data)) {
-		if n > uintptr(len(a.head.data)) {
-			throw("trace: alloc too large")
-		}
-		block := (*traceAllocBlock)(sysAlloc(unsafe.Sizeof(traceAllocBlock{}), &memstats.other_sys))
-		if block == nil {
-			throw("trace: out of memory")
-		}
-		block.next = a.head
-		a.head = block
-		a.off = 0
-	}
-	p := &a.head.data[a.off]
-	a.off += n
-	return unsafe.Pointer(p)
-}
-
-// drop frees all previously allocated memory and resets the allocator.
-func (a *traceAlloc) drop() {
-	for a.head != nil {
-		block := a.head
-		a.head = block.next
-		sysFree(unsafe.Pointer(block), unsafe.Sizeof(traceAllocBlock{}), &memstats.other_sys)
-	}
-}
-
-// The following functions write specific events to trace.
-
-func traceGomaxprocs(procs int32) {
-	traceEvent(traceEvGomaxprocs, 1, uint64(procs))
-}
-
-func traceProcStart() {
-	traceEvent(traceEvProcStart, -1, uint64(getg().m.id))
-}
-
-func traceProcStop(pp *p) {
-	// Sysmon and stopTheWorld can stop Ps blocked in syscalls,
-	// to handle this we temporary employ the P.
-	mp := acquirem()
-	oldp := mp.p
-	mp.p.set(pp)
-	traceEvent(traceEvProcStop, -1)
-	mp.p = oldp
-	releasem(mp)
-}
-
-func traceGCStart() {
-	traceEvent(traceEvGCStart, 4)
-}
-
-func traceGCDone() {
-	traceEvent(traceEvGCDone, -1)
-}
-
-func traceGCScanStart() {
-	traceEvent(traceEvGCScanStart, -1)
-}
-
-func traceGCScanDone() {
-	traceEvent(traceEvGCScanDone, -1)
-}
-
-func traceGCSweepStart() {
-	traceEvent(traceEvGCSweepStart, 1)
-}
-
-func traceGCSweepDone() {
-	traceEvent(traceEvGCSweepDone, -1)
-}
-
-func traceGoCreate(newg *g, pc uintptr) {
-	traceEvent(traceEvGoCreate, 2, uint64(newg.goid), uint64(pc))
-}
-
-func traceGoStart() {
-	traceEvent(traceEvGoStart, -1, uint64(getg().m.curg.goid))
-}
-
-func traceGoEnd() {
-	traceEvent(traceEvGoEnd, -1)
-}
-
-func traceGoSched() {
-	traceEvent(traceEvGoSched, 1)
-}
-
-func traceGoPreempt() {
-	traceEvent(traceEvGoPreempt, 1)
-}
-
-func traceGoPark(traceEv byte, skip int, gp *g) {
-	if traceEv&traceFutileWakeup != 0 {
-		traceEvent(traceEvFutileWakeup, -1)
-	}
-	traceEvent(traceEv & ^traceFutileWakeup, skip)
-}
-
-func traceGoUnpark(gp *g, skip int) {
-	traceEvent(traceEvGoUnblock, skip, uint64(gp.goid))
-}
-
-func traceGoSysCall() {
-	traceEvent(traceEvGoSysCall, 4)
-}
-
-func traceGoSysExit(seq uint64, ts int64) {
-	if int64(seq)-int64(trace.seqStart) < 0 {
-		// The timestamp was obtained during a previous tracing session, ignore.
-		return
-	}
-	traceEvent(traceEvGoSysExit, -1, uint64(getg().m.curg.goid), seq, uint64(ts)/traceTickDiv)
-}
-
-func traceGoSysBlock(pp *p) {
-	// Sysmon and stopTheWorld can declare syscalls running on remote Ps as blocked,
-	// to handle this we temporary employ the P.
-	mp := acquirem()
-	oldp := mp.p
-	mp.p.set(pp)
-	traceEvent(traceEvGoSysBlock, -1)
-	mp.p = oldp
-	releasem(mp)
-}
-
-func traceHeapAlloc() {
-	traceEvent(traceEvHeapAlloc, -1, memstats.heap_live)
-}
-
-func traceNextGC() {
-	traceEvent(traceEvNextGC, -1, memstats.next_gc)
-}
diff --git a/src/runtime/trace/trace.go b/src/runtime/trace/trace.go
deleted file mode 100644
index 7cbb8a6..0000000
--- a/src/runtime/trace/trace.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Go execution tracer.
-// The tracer captures a wide range of execution events like goroutine
-// creation/blocking/unblocking, syscall enter/exit/block, GC-related events,
-// changes of heap size, processor start/stop, etc and writes them to an io.Writer
-// in a compact form. A precise nanosecond-precision timestamp and a stack
-// trace is captured for most events. A trace can be analyzed later with
-// 'go tool trace' command.
-package trace
-
-import (
-	"io"
-	"runtime"
-)
-
-// Start enables tracing for the current program.
-// While tracing, the trace will be buffered and written to w.
-// Start returns an error if tracing is already enabled.
-func Start(w io.Writer) error {
-	if err := runtime.StartTrace(); err != nil {
-		return err
-	}
-	go func() {
-		for {
-			data := runtime.ReadTrace()
-			if data == nil {
-				break
-			}
-			w.Write(data)
-		}
-	}()
-	return nil
-}
-
-// Stop stops the current tracing, if any.
-// Stop only returns after all the writes for the trace have completed.
-func Stop() {
-	runtime.StopTrace()
-}
diff --git a/src/runtime/trace/trace_stack_test.go b/src/runtime/trace/trace_stack_test.go
deleted file mode 100644
index 3fe1747..0000000
--- a/src/runtime/trace/trace_stack_test.go
+++ /dev/null
@@ -1,285 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package trace_test
-
-import (
-	"bytes"
-	"internal/testenv"
-	"internal/trace"
-	"net"
-	"os"
-	"runtime"
-	. "runtime/trace"
-	"sync"
-	"testing"
-	"time"
-)
-
-// TestTraceSymbolize tests symbolization and that events has proper stacks.
-// In particular that we strip bottom uninteresting frames like goexit,
-// top uninteresting frames (runtime guts).
-func TestTraceSymbolize(t *testing.T) {
-	testenv.MustHaveGoBuild(t)
-
-	buf := new(bytes.Buffer)
-	if err := Start(buf); err != nil {
-		t.Fatalf("failed to start tracing: %v", err)
-	}
-	defer Stop() // in case of early return
-
-	// Now we will do a bunch of things for which we verify stacks later.
-	// It is impossible to ensure that a goroutine has actually blocked
-	// on a channel, in a select or otherwise. So we kick off goroutines
-	// that need to block first in the hope that while we are executing
-	// the rest of the test, they will block.
-	go func() {
-		select {}
-	}()
-	go func() {
-		var c chan int
-		c <- 0
-	}()
-	go func() {
-		var c chan int
-		<-c
-	}()
-	done1 := make(chan bool)
-	go func() {
-		<-done1
-	}()
-	done2 := make(chan bool)
-	go func() {
-		done2 <- true
-	}()
-	c1 := make(chan int)
-	c2 := make(chan int)
-	go func() {
-		select {
-		case <-c1:
-		case <-c2:
-		}
-	}()
-	var mu sync.Mutex
-	mu.Lock()
-	go func() {
-		mu.Lock()
-		mu.Unlock()
-	}()
-	var wg sync.WaitGroup
-	wg.Add(1)
-	go func() {
-		wg.Wait()
-	}()
-	cv := sync.NewCond(&sync.Mutex{})
-	go func() {
-		cv.L.Lock()
-		cv.Wait()
-		cv.L.Unlock()
-	}()
-	ln, err := net.Listen("tcp", "127.0.0.1:0")
-	if err != nil {
-		t.Fatalf("failed to listen: %v", err)
-	}
-	go func() {
-		c, err := ln.Accept()
-		if err != nil {
-			t.Fatalf("failed to accept: %v", err)
-		}
-		c.Close()
-	}()
-	rp, wp, err := os.Pipe()
-	if err != nil {
-		t.Fatalf("failed to create a pipe: %v", err)
-	}
-	defer rp.Close()
-	defer wp.Close()
-	pipeReadDone := make(chan bool)
-	go func() {
-		var data [1]byte
-		rp.Read(data[:])
-		pipeReadDone <- true
-	}()
-
-	time.Sleep(time.Millisecond)
-	runtime.GC()
-	runtime.Gosched()
-	time.Sleep(time.Millisecond) // the last chance for the goroutines above to block
-	done1 <- true
-	<-done2
-	select {
-	case c1 <- 0:
-	case c2 <- 0:
-	}
-	mu.Unlock()
-	wg.Done()
-	cv.Signal()
-	c, err := net.Dial("tcp", ln.Addr().String())
-	if err != nil {
-		t.Fatalf("failed to dial: %v", err)
-	}
-	c.Close()
-	var data [1]byte
-	wp.Write(data[:])
-	<-pipeReadDone
-
-	Stop()
-	events, _, err := parseTrace(t, buf)
-	if err != nil {
-		t.Fatalf("failed to parse trace: %v", err)
-	}
-	err = trace.Symbolize(events, os.Args[0])
-	if err != nil {
-		t.Fatalf("failed to symbolize trace: %v", err)
-	}
-
-	// Now check that the stacks are correct.
-	type frame struct {
-		Fn   string
-		Line int
-	}
-	type eventDesc struct {
-		Type byte
-		Stk  []frame
-	}
-	want := []eventDesc{
-		eventDesc{trace.EvGCStart, []frame{
-			frame{"runtime.GC", 0},
-			frame{"runtime/trace_test.TestTraceSymbolize", 106},
-			frame{"testing.tRunner", 0},
-		}},
-		eventDesc{trace.EvGoSched, []frame{
-			frame{"runtime/trace_test.TestTraceSymbolize", 107},
-			frame{"testing.tRunner", 0},
-		}},
-		eventDesc{trace.EvGoCreate, []frame{
-			frame{"runtime/trace_test.TestTraceSymbolize", 39},
-			frame{"testing.tRunner", 0},
-		}},
-		eventDesc{trace.EvGoStop, []frame{
-			frame{"runtime.block", 0},
-			frame{"runtime/trace_test.TestTraceSymbolize.func1", 38},
-		}},
-		eventDesc{trace.EvGoStop, []frame{
-			frame{"runtime.chansend1", 0},
-			frame{"runtime/trace_test.TestTraceSymbolize.func2", 42},
-		}},
-		eventDesc{trace.EvGoStop, []frame{
-			frame{"runtime.chanrecv1", 0},
-			frame{"runtime/trace_test.TestTraceSymbolize.func3", 46},
-		}},
-		eventDesc{trace.EvGoBlockRecv, []frame{
-			frame{"runtime.chanrecv1", 0},
-			frame{"runtime/trace_test.TestTraceSymbolize.func4", 50},
-		}},
-		eventDesc{trace.EvGoUnblock, []frame{
-			frame{"runtime.chansend1", 0},
-			frame{"runtime/trace_test.TestTraceSymbolize", 109},
-			frame{"testing.tRunner", 0},
-		}},
-		eventDesc{trace.EvGoBlockSend, []frame{
-			frame{"runtime.chansend1", 0},
-			frame{"runtime/trace_test.TestTraceSymbolize.func5", 54},
-		}},
-		eventDesc{trace.EvGoUnblock, []frame{
-			frame{"runtime.chanrecv1", 0},
-			frame{"runtime/trace_test.TestTraceSymbolize", 110},
-			frame{"testing.tRunner", 0},
-		}},
-		eventDesc{trace.EvGoBlockSelect, []frame{
-			frame{"runtime.selectgo", 0},
-			frame{"runtime/trace_test.TestTraceSymbolize.func6", 59},
-		}},
-		eventDesc{trace.EvGoUnblock, []frame{
-			frame{"runtime.selectgo", 0},
-			frame{"runtime/trace_test.TestTraceSymbolize", 111},
-			frame{"testing.tRunner", 0},
-		}},
-		eventDesc{trace.EvGoBlockSync, []frame{
-			frame{"sync.(*Mutex).Lock", 0},
-			frame{"runtime/trace_test.TestTraceSymbolize.func7", 67},
-		}},
-		eventDesc{trace.EvGoUnblock, []frame{
-			frame{"sync.(*Mutex).Unlock", 0},
-			frame{"runtime/trace_test.TestTraceSymbolize", 115},
-			frame{"testing.tRunner", 0},
-		}},
-		eventDesc{trace.EvGoBlockSync, []frame{
-			frame{"sync.(*WaitGroup).Wait", 0},
-			frame{"runtime/trace_test.TestTraceSymbolize.func8", 73},
-		}},
-		eventDesc{trace.EvGoUnblock, []frame{
-			frame{"sync.(*WaitGroup).Add", 0},
-			frame{"sync.(*WaitGroup).Done", 0},
-			frame{"runtime/trace_test.TestTraceSymbolize", 116},
-			frame{"testing.tRunner", 0},
-		}},
-		eventDesc{trace.EvGoBlockCond, []frame{
-			frame{"sync.(*Cond).Wait", 0},
-			frame{"runtime/trace_test.TestTraceSymbolize.func9", 78},
-		}},
-		eventDesc{trace.EvGoUnblock, []frame{
-			frame{"sync.(*Cond).Signal", 0},
-			frame{"runtime/trace_test.TestTraceSymbolize", 117},
-			frame{"testing.tRunner", 0},
-		}},
-		eventDesc{trace.EvGoSleep, []frame{
-			frame{"time.Sleep", 0},
-			frame{"runtime/trace_test.TestTraceSymbolize", 108},
-			frame{"testing.tRunner", 0},
-		}},
-	}
-	// Stacks for the following events are OS-dependent due to OS-specific code in net package.
-	if runtime.GOOS != "windows" && runtime.GOOS != "plan9" {
-		want = append(want, []eventDesc{
-			eventDesc{trace.EvGoBlockNet, []frame{
-				frame{"net.(*netFD).accept", 0},
-				frame{"net.(*TCPListener).AcceptTCP", 0},
-				frame{"net.(*TCPListener).Accept", 0},
-				frame{"runtime/trace_test.TestTraceSymbolize.func10", 86},
-			}},
-			eventDesc{trace.EvGoSysCall, []frame{
-				frame{"syscall.read", 0},
-				frame{"syscall.Read", 0},
-				frame{"os.(*File).read", 0},
-				frame{"os.(*File).Read", 0},
-				frame{"runtime/trace_test.TestTraceSymbolize.func11", 101},
-			}},
-		}...)
-	}
-	matched := make([]bool, len(want))
-	for _, ev := range events {
-	wantLoop:
-		for i, w := range want {
-			if matched[i] || w.Type != ev.Type || len(w.Stk) != len(ev.Stk) {
-				continue
-			}
-
-			for fi, f := range ev.Stk {
-				wf := w.Stk[fi]
-				if wf.Fn != f.Fn || wf.Line != 0 && wf.Line != f.Line {
-					continue wantLoop
-				}
-			}
-			matched[i] = true
-		}
-	}
-	for i, m := range matched {
-		if m {
-			continue
-		}
-		w := want[i]
-		t.Errorf("did not match event %v at %v:%v", trace.EventDescriptions[w.Type].Name, w.Stk[0].Fn, w.Stk[0].Line)
-		t.Errorf("seen the following events of this type:")
-		for _, ev := range events {
-			if ev.Type != w.Type {
-				continue
-			}
-			for _, f := range ev.Stk {
-				t.Logf("  %v:%v", f.Fn, f.Line)
-			}
-			t.Logf("---")
-		}
-	}
-}
diff --git a/src/runtime/trace/trace_test.go b/src/runtime/trace/trace_test.go
deleted file mode 100644
index 0a8957f..0000000
--- a/src/runtime/trace/trace_test.go
+++ /dev/null
@@ -1,434 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package trace_test
-
-import (
-	"bytes"
-	"internal/trace"
-	"io"
-	"net"
-	"os"
-	"runtime"
-	. "runtime/trace"
-	"sync"
-	"testing"
-	"time"
-)
-
-func TestTraceStartStop(t *testing.T) {
-	buf := new(bytes.Buffer)
-	if err := Start(buf); err != nil {
-		t.Fatalf("failed to start tracing: %v", err)
-	}
-	Stop()
-	size := buf.Len()
-	if size == 0 {
-		t.Fatalf("trace is empty")
-	}
-	time.Sleep(100 * time.Millisecond)
-	if size != buf.Len() {
-		t.Fatalf("trace writes after stop: %v -> %v", size, buf.Len())
-	}
-}
-
-func TestTraceDoubleStart(t *testing.T) {
-	Stop()
-	buf := new(bytes.Buffer)
-	if err := Start(buf); err != nil {
-		t.Fatalf("failed to start tracing: %v", err)
-	}
-	if err := Start(buf); err == nil {
-		t.Fatalf("succeed to start tracing second time")
-	}
-	Stop()
-	Stop()
-}
-
-func TestTrace(t *testing.T) {
-	buf := new(bytes.Buffer)
-	if err := Start(buf); err != nil {
-		t.Fatalf("failed to start tracing: %v", err)
-	}
-	Stop()
-	_, err := trace.Parse(buf)
-	if err == trace.ErrTimeOrder {
-		t.Skipf("skipping trace: %v", err)
-	}
-	if err != nil {
-		t.Fatalf("failed to parse trace: %v", err)
-	}
-}
-
-func parseTrace(t *testing.T, r io.Reader) ([]*trace.Event, map[uint64]*trace.GDesc, error) {
-	events, err := trace.Parse(r)
-	if err == trace.ErrTimeOrder {
-		t.Skipf("skipping trace: %v", err)
-	}
-	if err != nil {
-		return nil, nil, err
-	}
-	gs := trace.GoroutineStats(events)
-	for goid := range gs {
-		// We don't do any particular checks on the result at the moment.
-		// But still check that RelatedGoroutines does not crash, hang, etc.
-		_ = trace.RelatedGoroutines(events, goid)
-	}
-	return events, gs, nil
-}
-
-func TestTraceStress(t *testing.T) {
-	var wg sync.WaitGroup
-	done := make(chan bool)
-
-	// Create a goroutine blocked before tracing.
-	wg.Add(1)
-	go func() {
-		<-done
-		wg.Done()
-	}()
-
-	// Create a goroutine blocked in syscall before tracing.
-	rp, wp, err := os.Pipe()
-	if err != nil {
-		t.Fatalf("failed to create pipe: %v", err)
-	}
-	defer func() {
-		rp.Close()
-		wp.Close()
-	}()
-	wg.Add(1)
-	go func() {
-		var tmp [1]byte
-		rp.Read(tmp[:])
-		<-done
-		wg.Done()
-	}()
-	time.Sleep(time.Millisecond) // give the goroutine above time to block
-
-	buf := new(bytes.Buffer)
-	if err := Start(buf); err != nil {
-		t.Fatalf("failed to start tracing: %v", err)
-	}
-
-	procs := runtime.GOMAXPROCS(10)
-	time.Sleep(50 * time.Millisecond) // test proc stop/start events
-
-	go func() {
-		runtime.LockOSThread()
-		for {
-			select {
-			case <-done:
-				return
-			default:
-				runtime.Gosched()
-			}
-		}
-	}()
-
-	runtime.GC()
-	// Trigger GC from malloc.
-	for i := 0; i < 1e3; i++ {
-		_ = make([]byte, 1<<20)
-	}
-
-	// Create a bunch of busy goroutines to load all Ps.
-	for p := 0; p < 10; p++ {
-		wg.Add(1)
-		go func() {
-			// Do something useful.
-			tmp := make([]byte, 1<<16)
-			for i := range tmp {
-				tmp[i]++
-			}
-			_ = tmp
-			<-done
-			wg.Done()
-		}()
-	}
-
-	// Block in syscall.
-	wg.Add(1)
-	go func() {
-		var tmp [1]byte
-		rp.Read(tmp[:])
-		<-done
-		wg.Done()
-	}()
-
-	// Test timers.
-	timerDone := make(chan bool)
-	go func() {
-		time.Sleep(time.Millisecond)
-		timerDone <- true
-	}()
-	<-timerDone
-
-	// A bit of network.
-	ln, err := net.Listen("tcp", "127.0.0.1:0")
-	if err != nil {
-		t.Fatalf("listen failed: %v", err)
-	}
-	defer ln.Close()
-	go func() {
-		c, err := ln.Accept()
-		if err != nil {
-			return
-		}
-		time.Sleep(time.Millisecond)
-		var buf [1]byte
-		c.Write(buf[:])
-		c.Close()
-	}()
-	c, err := net.Dial("tcp", ln.Addr().String())
-	if err != nil {
-		t.Fatalf("dial failed: %v", err)
-	}
-	var tmp [1]byte
-	c.Read(tmp[:])
-	c.Close()
-
-	go func() {
-		runtime.Gosched()
-		select {}
-	}()
-
-	// Unblock helper goroutines and wait them to finish.
-	wp.Write(tmp[:])
-	wp.Write(tmp[:])
-	close(done)
-	wg.Wait()
-
-	runtime.GOMAXPROCS(procs)
-
-	Stop()
-	_, _, err = parseTrace(t, buf)
-	if err != nil {
-		t.Fatalf("failed to parse trace: %v", err)
-	}
-}
-
-// Do a bunch of various stuff (timers, GC, network, etc) in a separate goroutine.
-// And concurrently with all that start/stop trace 3 times.
-func TestTraceStressStartStop(t *testing.T) {
-	defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(8))
-	outerDone := make(chan bool)
-
-	go func() {
-		defer func() {
-			outerDone <- true
-		}()
-
-		var wg sync.WaitGroup
-		done := make(chan bool)
-
-		wg.Add(1)
-		go func() {
-			<-done
-			wg.Done()
-		}()
-
-		rp, wp, err := os.Pipe()
-		if err != nil {
-			t.Fatalf("failed to create pipe: %v", err)
-		}
-		defer func() {
-			rp.Close()
-			wp.Close()
-		}()
-		wg.Add(1)
-		go func() {
-			var tmp [1]byte
-			rp.Read(tmp[:])
-			<-done
-			wg.Done()
-		}()
-		time.Sleep(time.Millisecond)
-
-		go func() {
-			runtime.LockOSThread()
-			for {
-				select {
-				case <-done:
-					return
-				default:
-					runtime.Gosched()
-				}
-			}
-		}()
-
-		runtime.GC()
-		// Trigger GC from malloc.
-		for i := 0; i < 1e3; i++ {
-			_ = make([]byte, 1<<20)
-		}
-
-		// Create a bunch of busy goroutines to load all Ps.
-		for p := 0; p < 10; p++ {
-			wg.Add(1)
-			go func() {
-				// Do something useful.
-				tmp := make([]byte, 1<<16)
-				for i := range tmp {
-					tmp[i]++
-				}
-				_ = tmp
-				<-done
-				wg.Done()
-			}()
-		}
-
-		// Block in syscall.
-		wg.Add(1)
-		go func() {
-			var tmp [1]byte
-			rp.Read(tmp[:])
-			<-done
-			wg.Done()
-		}()
-
-		runtime.GOMAXPROCS(runtime.GOMAXPROCS(1))
-
-		// Test timers.
-		timerDone := make(chan bool)
-		go func() {
-			time.Sleep(time.Millisecond)
-			timerDone <- true
-		}()
-		<-timerDone
-
-		// A bit of network.
-		ln, err := net.Listen("tcp", "127.0.0.1:0")
-		if err != nil {
-			t.Fatalf("listen failed: %v", err)
-		}
-		defer ln.Close()
-		go func() {
-			c, err := ln.Accept()
-			if err != nil {
-				return
-			}
-			time.Sleep(time.Millisecond)
-			var buf [1]byte
-			c.Write(buf[:])
-			c.Close()
-		}()
-		c, err := net.Dial("tcp", ln.Addr().String())
-		if err != nil {
-			t.Fatalf("dial failed: %v", err)
-		}
-		var tmp [1]byte
-		c.Read(tmp[:])
-		c.Close()
-
-		go func() {
-			runtime.Gosched()
-			select {}
-		}()
-
-		// Unblock helper goroutines and wait them to finish.
-		wp.Write(tmp[:])
-		wp.Write(tmp[:])
-		close(done)
-		wg.Wait()
-	}()
-
-	for i := 0; i < 3; i++ {
-		buf := new(bytes.Buffer)
-		if err := Start(buf); err != nil {
-			t.Fatalf("failed to start tracing: %v", err)
-		}
-		time.Sleep(time.Millisecond)
-		Stop()
-		if _, _, err := parseTrace(t, buf); err != nil {
-			t.Fatalf("failed to parse trace: %v", err)
-		}
-	}
-	<-outerDone
-}
-
-func TestTraceFutileWakeup(t *testing.T) {
-	buf := new(bytes.Buffer)
-	if err := Start(buf); err != nil {
-		t.Fatalf("failed to start tracing: %v", err)
-	}
-
-	defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(8))
-	c0 := make(chan int, 1)
-	c1 := make(chan int, 1)
-	c2 := make(chan int, 1)
-	const procs = 2
-	var done sync.WaitGroup
-	done.Add(4 * procs)
-	for p := 0; p < procs; p++ {
-		const iters = 1e3
-		go func() {
-			for i := 0; i < iters; i++ {
-				runtime.Gosched()
-				c0 <- 0
-			}
-			done.Done()
-		}()
-		go func() {
-			for i := 0; i < iters; i++ {
-				runtime.Gosched()
-				<-c0
-			}
-			done.Done()
-		}()
-		go func() {
-			for i := 0; i < iters; i++ {
-				runtime.Gosched()
-				select {
-				case c1 <- 0:
-				case c2 <- 0:
-				}
-			}
-			done.Done()
-		}()
-		go func() {
-			for i := 0; i < iters; i++ {
-				runtime.Gosched()
-				select {
-				case <-c1:
-				case <-c2:
-				}
-			}
-			done.Done()
-		}()
-	}
-	done.Wait()
-
-	Stop()
-	events, _, err := parseTrace(t, buf)
-	if err != nil {
-		t.Fatalf("failed to parse trace: %v", err)
-	}
-	// Check that (1) trace does not contain EvFutileWakeup events and
-	// (2) there are no consecutive EvGoBlock/EvGCStart/EvGoBlock events
-	// (we call runtime.Gosched between all operations, so these would be futile wakeups).
-	gs := make(map[uint64]int)
-	for _, ev := range events {
-		switch ev.Type {
-		case trace.EvFutileWakeup:
-			t.Fatalf("found EvFutileWakeup event")
-		case trace.EvGoBlockSend, trace.EvGoBlockRecv, trace.EvGoBlockSelect:
-			if gs[ev.G] == 2 {
-				t.Fatalf("goroutine %v blocked on %v at %v right after start",
-					ev.G, trace.EventDescriptions[ev.Type].Name, ev.Ts)
-			}
-			if gs[ev.G] == 1 {
-				t.Fatalf("goroutine %v blocked on %v at %v while blocked",
-					ev.G, trace.EventDescriptions[ev.Type].Name, ev.Ts)
-			}
-			gs[ev.G] = 1
-		case trace.EvGoStart:
-			if gs[ev.G] == 1 {
-				gs[ev.G] = 2
-			}
-		default:
-			delete(gs, ev.G)
-		}
-	}
-}
diff --git a/src/runtime/type.go b/src/runtime/type.go
deleted file mode 100644
index 45bdac8..0000000
--- a/src/runtime/type.go
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Runtime type representation.
-
-package runtime
-
-import "unsafe"
-
-// Needs to be in sync with ../cmd/internal/ld/decodesym.go:/^func.commonsize,
-// ../cmd/internal/gc/reflect.go:/^func.dcommontype and
-// ../reflect/type.go:/^type.rtype.
-type _type struct {
-	size       uintptr
-	ptrdata    uintptr // size of memory prefix holding all pointers
-	hash       uint32
-	_unused    uint8
-	align      uint8
-	fieldalign uint8
-	kind       uint8
-	alg        *typeAlg
-	// gcdata stores the GC type data for the garbage collector.
-	// If the KindGCProg bit is set in kind, gcdata is a GC program.
-	// Otherwise it is a ptrmask bitmap. See mbitmap.go for details.
-	gcdata  *byte
-	_string *string
-	x       *uncommontype
-	ptrto   *_type
-	zero    *byte // ptr to the zero value for this type
-}
-
-type method struct {
-	name    *string
-	pkgpath *string
-	mtyp    *_type
-	typ     *_type
-	ifn     unsafe.Pointer
-	tfn     unsafe.Pointer
-}
-
-type uncommontype struct {
-	name    *string
-	pkgpath *string
-	mhdr    []method
-}
-
-type imethod struct {
-	name    *string
-	pkgpath *string
-	_type   *_type
-}
-
-type interfacetype struct {
-	typ  _type
-	mhdr []imethod
-}
-
-type maptype struct {
-	typ           _type
-	key           *_type
-	elem          *_type
-	bucket        *_type // internal type representing a hash bucket
-	hmap          *_type // internal type representing a hmap
-	keysize       uint8  // size of key slot
-	indirectkey   bool   // store ptr to key instead of key itself
-	valuesize     uint8  // size of value slot
-	indirectvalue bool   // store ptr to value instead of value itself
-	bucketsize    uint16 // size of bucket
-	reflexivekey  bool   // true if k==k for all keys
-}
-
-type chantype struct {
-	typ  _type
-	elem *_type
-	dir  uintptr
-}
-
-type slicetype struct {
-	typ  _type
-	elem *_type
-}
-
-type functype struct {
-	typ       _type
-	dotdotdot bool
-	in        slice
-	out       slice
-}
-
-type ptrtype struct {
-	typ  _type
-	elem *_type
-}
diff --git a/src/runtime/typekind1.go b/src/runtime/typekind1.go
deleted file mode 100644
index 73028d6..0000000
--- a/src/runtime/typekind1.go
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-const (
-	_KindBool = 1 + iota
-	_KindInt
-	_KindInt8
-	_KindInt16
-	_KindInt32
-	_KindInt64
-	_KindUint
-	_KindUint8
-	_KindUint16
-	_KindUint32
-	_KindUint64
-	_KindUintptr
-	_KindFloat32
-	_KindFloat64
-	_KindComplex64
-	_KindComplex128
-	_KindArray
-	_KindChan
-	_KindFunc
-	_KindInterface
-	_KindMap
-	_KindPtr
-	_KindSlice
-	_KindString
-	_KindStruct
-	_KindUnsafePointer
-
-	_KindDirectIface = 1 << 5
-	_KindGCProg      = 1 << 6 // Type.gc points to GC program
-	_KindNoPointers  = 1 << 7
-	_KindMask        = (1 << 5) - 1
-)
diff --git a/src/runtime/unaligned1.go b/src/runtime/unaligned1.go
deleted file mode 100644
index d3d6c70..0000000
--- a/src/runtime/unaligned1.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build 386 amd64 amd64p32 arm64
-
-package runtime
-
-import "unsafe"
-
-func readUnaligned32(p unsafe.Pointer) uint32 {
-	return *(*uint32)(p)
-}
-
-func readUnaligned64(p unsafe.Pointer) uint64 {
-	return *(*uint64)(p)
-}
diff --git a/src/runtime/unaligned2.go b/src/runtime/unaligned2.go
deleted file mode 100644
index 4fc7917..0000000
--- a/src/runtime/unaligned2.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build arm ppc64 ppc64le
-
-package runtime
-
-import "unsafe"
-
-// Note: These routines perform the read with an unspecified endianness.
-func readUnaligned32(p unsafe.Pointer) uint32 {
-	q := (*[4]byte)(p)
-	return uint32(q[0]) + uint32(q[1])<<8 + uint32(q[2])<<16 + uint32(q[3])<<24
-}
-
-func readUnaligned64(p unsafe.Pointer) uint64 {
-	q := (*[8]byte)(p)
-	return uint64(q[0]) + uint64(q[1])<<8 + uint64(q[2])<<16 + uint64(q[3])<<24 + uint64(q[4])<<32 + uint64(q[5])<<40 + uint64(q[6])<<48 + uint64(q[7])<<56
-}
diff --git a/src/runtime/vdso_linux_amd64.go b/src/runtime/vdso_linux_amd64.go
deleted file mode 100644
index 2440015..0000000
--- a/src/runtime/vdso_linux_amd64.go
+++ /dev/null
@@ -1,327 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-import "unsafe"
-
-// Look up symbols in the Linux vDSO.
-
-// This code was originally based on the sample Linux vDSO parser at
-// https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/vDSO/parse_vdso.c
-
-// This implements the ELF dynamic linking spec at
-// http://sco.com/developers/gabi/latest/ch5.dynamic.html
-
-// The version section is documented at
-// http://refspecs.linuxfoundation.org/LSB_3.2.0/LSB-Core-generic/LSB-Core-generic/symversion.html
-
-const (
-	_AT_RANDOM       = 25
-	_AT_SYSINFO_EHDR = 33
-	_AT_NULL         = 0 /* End of vector */
-
-	_PT_LOAD    = 1 /* Loadable program segment */
-	_PT_DYNAMIC = 2 /* Dynamic linking information */
-
-	_DT_NULL   = 0 /* Marks end of dynamic section */
-	_DT_HASH   = 4 /* Dynamic symbol hash table */
-	_DT_STRTAB = 5 /* Address of string table */
-	_DT_SYMTAB = 6 /* Address of symbol table */
-	_DT_VERSYM = 0x6ffffff0
-	_DT_VERDEF = 0x6ffffffc
-
-	_VER_FLG_BASE = 0x1 /* Version definition of file itself */
-
-	_SHN_UNDEF = 0 /* Undefined section */
-
-	_SHT_DYNSYM = 11 /* Dynamic linker symbol table */
-
-	_STT_FUNC = 2 /* Symbol is a code object */
-
-	_STB_GLOBAL = 1 /* Global symbol */
-	_STB_WEAK   = 2 /* Weak symbol */
-
-	_EI_NIDENT = 16
-)
-
-/* How to extract and insert information held in the st_info field.  */
-func _ELF64_ST_BIND(val byte) byte { return val >> 4 }
-func _ELF64_ST_TYPE(val byte) byte { return val & 0xf }
-
-type elf64Sym struct {
-	st_name  uint32
-	st_info  byte
-	st_other byte
-	st_shndx uint16
-	st_value uint64
-	st_size  uint64
-}
-
-type elf64Verdef struct {
-	vd_version uint16 /* Version revision */
-	vd_flags   uint16 /* Version information */
-	vd_ndx     uint16 /* Version Index */
-	vd_cnt     uint16 /* Number of associated aux entries */
-	vd_hash    uint32 /* Version name hash value */
-	vd_aux     uint32 /* Offset in bytes to verdaux array */
-	vd_next    uint32 /* Offset in bytes to next verdef entry */
-}
-
-type elf64Ehdr struct {
-	e_ident     [_EI_NIDENT]byte /* Magic number and other info */
-	e_type      uint16           /* Object file type */
-	e_machine   uint16           /* Architecture */
-	e_version   uint32           /* Object file version */
-	e_entry     uint64           /* Entry point virtual address */
-	e_phoff     uint64           /* Program header table file offset */
-	e_shoff     uint64           /* Section header table file offset */
-	e_flags     uint32           /* Processor-specific flags */
-	e_ehsize    uint16           /* ELF header size in bytes */
-	e_phentsize uint16           /* Program header table entry size */
-	e_phnum     uint16           /* Program header table entry count */
-	e_shentsize uint16           /* Section header table entry size */
-	e_shnum     uint16           /* Section header table entry count */
-	e_shstrndx  uint16           /* Section header string table index */
-}
-
-type elf64Phdr struct {
-	p_type   uint32 /* Segment type */
-	p_flags  uint32 /* Segment flags */
-	p_offset uint64 /* Segment file offset */
-	p_vaddr  uint64 /* Segment virtual address */
-	p_paddr  uint64 /* Segment physical address */
-	p_filesz uint64 /* Segment size in file */
-	p_memsz  uint64 /* Segment size in memory */
-	p_align  uint64 /* Segment alignment */
-}
-
-type elf64Shdr struct {
-	sh_name      uint32 /* Section name (string tbl index) */
-	sh_type      uint32 /* Section type */
-	sh_flags     uint64 /* Section flags */
-	sh_addr      uint64 /* Section virtual addr at execution */
-	sh_offset    uint64 /* Section file offset */
-	sh_size      uint64 /* Section size in bytes */
-	sh_link      uint32 /* Link to another section */
-	sh_info      uint32 /* Additional section information */
-	sh_addralign uint64 /* Section alignment */
-	sh_entsize   uint64 /* Entry size if section holds table */
-}
-
-type elf64Dyn struct {
-	d_tag int64  /* Dynamic entry type */
-	d_val uint64 /* Integer value */
-}
-
-type elf64Verdaux struct {
-	vda_name uint32 /* Version or dependency names */
-	vda_next uint32 /* Offset in bytes to next verdaux entry */
-}
-
-type elf64Auxv struct {
-	a_type uint64 /* Entry type */
-	a_val  uint64 /* Integer value */
-}
-
-type symbol_key struct {
-	name     string
-	sym_hash uint32
-	ptr      *uintptr
-}
-
-type version_key struct {
-	version  string
-	ver_hash uint32
-}
-
-type vdso_info struct {
-	valid bool
-
-	/* Load information */
-	load_addr   uintptr
-	load_offset uintptr /* load_addr - recorded vaddr */
-
-	/* Symbol table */
-	symtab     *[1 << 32]elf64Sym
-	symstrings *[1 << 32]byte
-	chain      []uint32
-	bucket     []uint32
-
-	/* Version table */
-	versym *[1 << 32]uint16
-	verdef *elf64Verdef
-}
-
-var linux26 = version_key{"LINUX_2.6", 0x3ae75f6}
-
-var sym_keys = []symbol_key{
-	{"__vdso_time", 0xa33c485, &__vdso_time_sym},
-	{"__vdso_gettimeofday", 0x315ca59, &__vdso_gettimeofday_sym},
-	{"__vdso_clock_gettime", 0xd35ec75, &__vdso_clock_gettime_sym},
-}
-
-// initialize with vsyscall fallbacks
-var (
-	__vdso_time_sym          uintptr = 0xffffffffff600400
-	__vdso_gettimeofday_sym  uintptr = 0xffffffffff600000
-	__vdso_clock_gettime_sym uintptr = 0
-)
-
-func vdso_init_from_sysinfo_ehdr(info *vdso_info, hdr *elf64Ehdr) {
-	info.valid = false
-	info.load_addr = uintptr(unsafe.Pointer(hdr))
-
-	pt := unsafe.Pointer(info.load_addr + uintptr(hdr.e_phoff))
-
-	// We need two things from the segment table: the load offset
-	// and the dynamic table.
-	var found_vaddr bool
-	var dyn *[1 << 20]elf64Dyn
-	for i := uint16(0); i < hdr.e_phnum; i++ {
-		pt := (*elf64Phdr)(add(pt, uintptr(i)*unsafe.Sizeof(elf64Phdr{})))
-		switch pt.p_type {
-		case _PT_LOAD:
-			if !found_vaddr {
-				found_vaddr = true
-				info.load_offset = info.load_addr + uintptr(pt.p_offset-pt.p_vaddr)
-			}
-
-		case _PT_DYNAMIC:
-			dyn = (*[1 << 20]elf64Dyn)(unsafe.Pointer(info.load_addr + uintptr(pt.p_offset)))
-		}
-	}
-
-	if !found_vaddr || dyn == nil {
-		return // Failed
-	}
-
-	// Fish out the useful bits of the dynamic table.
-
-	var hash *[1 << 30]uint32
-	hash = nil
-	info.symstrings = nil
-	info.symtab = nil
-	info.versym = nil
-	info.verdef = nil
-	for i := 0; dyn[i].d_tag != _DT_NULL; i++ {
-		dt := &dyn[i]
-		p := info.load_offset + uintptr(dt.d_val)
-		switch dt.d_tag {
-		case _DT_STRTAB:
-			info.symstrings = (*[1 << 32]byte)(unsafe.Pointer(p))
-		case _DT_SYMTAB:
-			info.symtab = (*[1 << 32]elf64Sym)(unsafe.Pointer(p))
-		case _DT_HASH:
-			hash = (*[1 << 30]uint32)(unsafe.Pointer(p))
-		case _DT_VERSYM:
-			info.versym = (*[1 << 32]uint16)(unsafe.Pointer(p))
-		case _DT_VERDEF:
-			info.verdef = (*elf64Verdef)(unsafe.Pointer(p))
-		}
-	}
-
-	if info.symstrings == nil || info.symtab == nil || hash == nil {
-		return // Failed
-	}
-
-	if info.verdef == nil {
-		info.versym = nil
-	}
-
-	// Parse the hash table header.
-	nbucket := hash[0]
-	nchain := hash[1]
-	info.bucket = hash[2 : 2+nbucket]
-	info.chain = hash[2+nbucket : 2+nbucket+nchain]
-
-	// That's all we need.
-	info.valid = true
-}
-
-func vdso_find_version(info *vdso_info, ver *version_key) int32 {
-	if !info.valid {
-		return 0
-	}
-
-	def := info.verdef
-	for {
-		if def.vd_flags&_VER_FLG_BASE == 0 {
-			aux := (*elf64Verdaux)(add(unsafe.Pointer(def), uintptr(def.vd_aux)))
-			if def.vd_hash == ver.ver_hash && ver.version == gostringnocopy(&info.symstrings[aux.vda_name]) {
-				return int32(def.vd_ndx & 0x7fff)
-			}
-		}
-
-		if def.vd_next == 0 {
-			break
-		}
-		def = (*elf64Verdef)(add(unsafe.Pointer(def), uintptr(def.vd_next)))
-	}
-
-	return -1 // can not match any version
-}
-
-func vdso_parse_symbols(info *vdso_info, version int32) {
-	if !info.valid {
-		return
-	}
-
-	for _, k := range sym_keys {
-		for chain := info.bucket[k.sym_hash%uint32(len(info.bucket))]; chain != 0; chain = info.chain[chain] {
-			sym := &info.symtab[chain]
-			typ := _ELF64_ST_TYPE(sym.st_info)
-			bind := _ELF64_ST_BIND(sym.st_info)
-			if typ != _STT_FUNC || bind != _STB_GLOBAL && bind != _STB_WEAK || sym.st_shndx == _SHN_UNDEF {
-				continue
-			}
-			if k.name != gostringnocopy(&info.symstrings[sym.st_name]) {
-				continue
-			}
-
-			// Check symbol version.
-			if info.versym != nil && version != 0 && int32(info.versym[chain]&0x7fff) != version {
-				continue
-			}
-
-			*k.ptr = info.load_offset + uintptr(sym.st_value)
-			break
-		}
-	}
-}
-
-func sysargs(argc int32, argv **byte) {
-	n := argc + 1
-
-	// skip envp to get to ELF auxiliary vector.
-	for argv_index(argv, n) != nil {
-		n++
-	}
-
-	// skip NULL separator
-	n++
-
-	// now argv+n is auxv
-	auxv := (*[1 << 32]elf64Auxv)(add(unsafe.Pointer(argv), uintptr(n)*ptrSize))
-
-	for i := 0; auxv[i].a_type != _AT_NULL; i++ {
-		av := &auxv[i]
-		switch av.a_type {
-		case _AT_SYSINFO_EHDR:
-			if av.a_val == 0 {
-				// Something went wrong
-				continue
-			}
-			var info vdso_info
-			// TODO(rsc): I don't understand why the compiler thinks info escapes
-			// when passed to the three functions below.
-			info1 := (*vdso_info)(noescape(unsafe.Pointer(&info)))
-			vdso_init_from_sysinfo_ehdr(info1, (*elf64Ehdr)(unsafe.Pointer(uintptr(av.a_val))))
-			vdso_parse_symbols(info1, vdso_find_version(info1, &linux26))
-
-		case _AT_RANDOM:
-			startupRandomData = (*[16]byte)(unsafe.Pointer(uintptr(av.a_val)))[:]
-		}
-	}
-}
diff --git a/src/runtime/vdso_none.go b/src/runtime/vdso_none.go
deleted file mode 100644
index 93bd91c..0000000
--- a/src/runtime/vdso_none.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !linux !amd64
-// +build !linux !386
-// +build !linux !arm
-
-package runtime
-
-func sysargs(argc int32, argv **byte) {
-}
diff --git a/src/runtime/wbfat.go b/src/runtime/wbfat.go
deleted file mode 100644
index 8fe2cef..0000000
--- a/src/runtime/wbfat.go
+++ /dev/null
@@ -1,190 +0,0 @@
-// generated by wbfat_gen.go; use go generate
-
-package runtime
-
-//go:nosplit
-func writebarrierfat01(dst *[2]uintptr, _ uintptr, src [2]uintptr) {
-	dst[0] = src[0]
-	writebarrierptr(&dst[1], src[1])
-}
-
-//go:nosplit
-func writebarrierfat10(dst *[2]uintptr, _ uintptr, src [2]uintptr) {
-	writebarrierptr(&dst[0], src[0])
-	dst[1] = src[1]
-}
-
-//go:nosplit
-func writebarrierfat11(dst *[2]uintptr, _ uintptr, src [2]uintptr) {
-	writebarrierptr(&dst[0], src[0])
-	writebarrierptr(&dst[1], src[1])
-}
-
-//go:nosplit
-func writebarrierfat001(dst *[3]uintptr, _ uintptr, src [3]uintptr) {
-	dst[0] = src[0]
-	dst[1] = src[1]
-	writebarrierptr(&dst[2], src[2])
-}
-
-//go:nosplit
-func writebarrierfat010(dst *[3]uintptr, _ uintptr, src [3]uintptr) {
-	dst[0] = src[0]
-	writebarrierptr(&dst[1], src[1])
-	dst[2] = src[2]
-}
-
-//go:nosplit
-func writebarrierfat011(dst *[3]uintptr, _ uintptr, src [3]uintptr) {
-	dst[0] = src[0]
-	writebarrierptr(&dst[1], src[1])
-	writebarrierptr(&dst[2], src[2])
-}
-
-//go:nosplit
-func writebarrierfat100(dst *[3]uintptr, _ uintptr, src [3]uintptr) {
-	writebarrierptr(&dst[0], src[0])
-	dst[1] = src[1]
-	dst[2] = src[2]
-}
-
-//go:nosplit
-func writebarrierfat101(dst *[3]uintptr, _ uintptr, src [3]uintptr) {
-	writebarrierptr(&dst[0], src[0])
-	dst[1] = src[1]
-	writebarrierptr(&dst[2], src[2])
-}
-
-//go:nosplit
-func writebarrierfat110(dst *[3]uintptr, _ uintptr, src [3]uintptr) {
-	writebarrierptr(&dst[0], src[0])
-	writebarrierptr(&dst[1], src[1])
-	dst[2] = src[2]
-}
-
-//go:nosplit
-func writebarrierfat111(dst *[3]uintptr, _ uintptr, src [3]uintptr) {
-	writebarrierptr(&dst[0], src[0])
-	writebarrierptr(&dst[1], src[1])
-	writebarrierptr(&dst[2], src[2])
-}
-
-//go:nosplit
-func writebarrierfat0001(dst *[4]uintptr, _ uintptr, src [4]uintptr) {
-	dst[0] = src[0]
-	dst[1] = src[1]
-	dst[2] = src[2]
-	writebarrierptr(&dst[3], src[3])
-}
-
-//go:nosplit
-func writebarrierfat0010(dst *[4]uintptr, _ uintptr, src [4]uintptr) {
-	dst[0] = src[0]
-	dst[1] = src[1]
-	writebarrierptr(&dst[2], src[2])
-	dst[3] = src[3]
-}
-
-//go:nosplit
-func writebarrierfat0011(dst *[4]uintptr, _ uintptr, src [4]uintptr) {
-	dst[0] = src[0]
-	dst[1] = src[1]
-	writebarrierptr(&dst[2], src[2])
-	writebarrierptr(&dst[3], src[3])
-}
-
-//go:nosplit
-func writebarrierfat0100(dst *[4]uintptr, _ uintptr, src [4]uintptr) {
-	dst[0] = src[0]
-	writebarrierptr(&dst[1], src[1])
-	dst[2] = src[2]
-	dst[3] = src[3]
-}
-
-//go:nosplit
-func writebarrierfat0101(dst *[4]uintptr, _ uintptr, src [4]uintptr) {
-	dst[0] = src[0]
-	writebarrierptr(&dst[1], src[1])
-	dst[2] = src[2]
-	writebarrierptr(&dst[3], src[3])
-}
-
-//go:nosplit
-func writebarrierfat0110(dst *[4]uintptr, _ uintptr, src [4]uintptr) {
-	dst[0] = src[0]
-	writebarrierptr(&dst[1], src[1])
-	writebarrierptr(&dst[2], src[2])
-	dst[3] = src[3]
-}
-
-//go:nosplit
-func writebarrierfat0111(dst *[4]uintptr, _ uintptr, src [4]uintptr) {
-	dst[0] = src[0]
-	writebarrierptr(&dst[1], src[1])
-	writebarrierptr(&dst[2], src[2])
-	writebarrierptr(&dst[3], src[3])
-}
-
-//go:nosplit
-func writebarrierfat1000(dst *[4]uintptr, _ uintptr, src [4]uintptr) {
-	writebarrierptr(&dst[0], src[0])
-	dst[1] = src[1]
-	dst[2] = src[2]
-	dst[3] = src[3]
-}
-
-//go:nosplit
-func writebarrierfat1001(dst *[4]uintptr, _ uintptr, src [4]uintptr) {
-	writebarrierptr(&dst[0], src[0])
-	dst[1] = src[1]
-	dst[2] = src[2]
-	writebarrierptr(&dst[3], src[3])
-}
-
-//go:nosplit
-func writebarrierfat1010(dst *[4]uintptr, _ uintptr, src [4]uintptr) {
-	writebarrierptr(&dst[0], src[0])
-	dst[1] = src[1]
-	writebarrierptr(&dst[2], src[2])
-	dst[3] = src[3]
-}
-
-//go:nosplit
-func writebarrierfat1011(dst *[4]uintptr, _ uintptr, src [4]uintptr) {
-	writebarrierptr(&dst[0], src[0])
-	dst[1] = src[1]
-	writebarrierptr(&dst[2], src[2])
-	writebarrierptr(&dst[3], src[3])
-}
-
-//go:nosplit
-func writebarrierfat1100(dst *[4]uintptr, _ uintptr, src [4]uintptr) {
-	writebarrierptr(&dst[0], src[0])
-	writebarrierptr(&dst[1], src[1])
-	dst[2] = src[2]
-	dst[3] = src[3]
-}
-
-//go:nosplit
-func writebarrierfat1101(dst *[4]uintptr, _ uintptr, src [4]uintptr) {
-	writebarrierptr(&dst[0], src[0])
-	writebarrierptr(&dst[1], src[1])
-	dst[2] = src[2]
-	writebarrierptr(&dst[3], src[3])
-}
-
-//go:nosplit
-func writebarrierfat1110(dst *[4]uintptr, _ uintptr, src [4]uintptr) {
-	writebarrierptr(&dst[0], src[0])
-	writebarrierptr(&dst[1], src[1])
-	writebarrierptr(&dst[2], src[2])
-	dst[3] = src[3]
-}
-
-//go:nosplit
-func writebarrierfat1111(dst *[4]uintptr, _ uintptr, src [4]uintptr) {
-	writebarrierptr(&dst[0], src[0])
-	writebarrierptr(&dst[1], src[1])
-	writebarrierptr(&dst[2], src[2])
-	writebarrierptr(&dst[3], src[3])
-}
diff --git a/src/runtime/wbfat_gen.go b/src/runtime/wbfat_gen.go
deleted file mode 100644
index 9482cfe..0000000
--- a/src/runtime/wbfat_gen.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-package main
-
-import (
-	"flag"
-	"fmt"
-	"log"
-	"os"
-)
-
-func main() {
-	flag.Parse()
-	if flag.NArg() > 0 {
-		f, err := os.Create(flag.Arg(0))
-		if err != nil {
-			log.Fatal(err)
-		}
-		os.Stdout = f
-	}
-	fmt.Printf("// generated by wbfat_gen.go; use go generate\n\n")
-	fmt.Printf("package runtime\n")
-	for i := uint(2); i <= 4; i++ {
-		for j := 1; j < 1<<i; j++ {
-			fmt.Printf("\n//go:nosplit\n")
-			fmt.Printf("func writebarrierfat%0*b(dst *[%d]uintptr, _ uintptr, src [%d]uintptr) {\n", int(i), j, i, i)
-			for k := uint(0); k < i; k++ {
-				if j&(1<<(i-1-k)) != 0 {
-					fmt.Printf("\twritebarrierptr(&dst[%d], src[%d])\n", k, k)
-				} else {
-					fmt.Printf("\tdst[%d] = src[%d]\n", k, k)
-				}
-			}
-			fmt.Printf("}\n")
-		}
-	}
-}
diff --git a/src/runtime/wincallback.go b/src/runtime/wincallback.go
deleted file mode 100644
index a16ad21..0000000
--- a/src/runtime/wincallback.go
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-// Generate Windows callback assembly file.
-
-package main
-
-import (
-	"bytes"
-	"fmt"
-	"io/ioutil"
-	"os"
-)
-
-const maxCallback = 2000
-
-func genasm() {
-	var buf bytes.Buffer
-
-	buf.WriteString(`// generated by wincallback.go; run go generate
-
-// runtime·callbackasm is called by external code to
-// execute Go implemented callback function. It is not
-// called from the start, instead runtime·compilecallback
-// always returns address into runtime·callbackasm offset
-// appropriately so different callbacks start with different
-// CALL instruction in runtime·callbackasm. This determines
-// which Go callback function is executed later on.
-TEXT runtime·callbackasm(SB),7,$0
-`)
-	for i := 0; i < maxCallback; i++ {
-		buf.WriteString("\tCALL\truntime·callbackasm1(SB)\n")
-	}
-
-	err := ioutil.WriteFile("zcallback_windows.s", buf.Bytes(), 0666)
-	if err != nil {
-		fmt.Fprintf(os.Stderr, "wincallback: %s\n", err)
-		os.Exit(2)
-	}
-}
-
-func gengo() {
-	var buf bytes.Buffer
-
-	buf.WriteString(fmt.Sprintf(`// generated by wincallback.go; run go generate
-
-package runtime
-
-const cb_max = %d // maximum number of windows callbacks allowed
-`, maxCallback))
-	err := ioutil.WriteFile("zcallback_windows.go", buf.Bytes(), 0666)
-	if err != nil {
-		fmt.Fprintf(os.Stderr, "wincallback: %s\n", err)
-		os.Exit(2)
-	}
-}
-
-func main() {
-	genasm()
-	gengo()
-}
diff --git a/src/runtime/zcallback_windows.go b/src/runtime/zcallback_windows.go
deleted file mode 100644
index 9908d4e..0000000
--- a/src/runtime/zcallback_windows.go
+++ /dev/null
@@ -1,5 +0,0 @@
-// generated by wincallback.go; run go generate
-
-package runtime
-
-const cb_max = 2000 // maximum number of windows callbacks allowed
diff --git a/src/runtime/zcallback_windows.s b/src/runtime/zcallback_windows.s
deleted file mode 100644
index b9a3a30..0000000
--- a/src/runtime/zcallback_windows.s
+++ /dev/null
@@ -1,2010 +0,0 @@
-// generated by wincallback.go; run go generate
-
-// runtime·callbackasm is called by external code to
-// execute Go implemented callback function. It is not
-// called from the start, instead runtime·compilecallback
-// always returns address into runtime·callbackasm offset
-// appropriately so different callbacks start with different
-// CALL instruction in runtime·callbackasm. This determines
-// which Go callback function is executed later on.
-TEXT runtime·callbackasm(SB),7,$0
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
-	CALL	runtime·callbackasm1(SB)
diff --git a/src/runtime/zgoarch_386.go b/src/runtime/zgoarch_386.go
deleted file mode 100644
index 79053f1..0000000
--- a/src/runtime/zgoarch_386.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// generated by gengoos.go using 'go generate'
-
-package runtime
-
-const theGoarch = `386`
-
-const goarch_386 = 1
-const goarch_amd64 = 0
-const goarch_amd64p32 = 0
-const goarch_arm = 0
-const goarch_arm64 = 0
-const goarch_ppc64 = 0
-const goarch_ppc64le = 0
diff --git a/src/runtime/zgoarch_amd64.go b/src/runtime/zgoarch_amd64.go
deleted file mode 100644
index 70095f5..0000000
--- a/src/runtime/zgoarch_amd64.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// generated by gengoos.go using 'go generate'
-
-package runtime
-
-const theGoarch = `amd64`
-
-const goarch_386 = 0
-const goarch_amd64 = 1
-const goarch_amd64p32 = 0
-const goarch_arm = 0
-const goarch_arm64 = 0
-const goarch_ppc64 = 0
-const goarch_ppc64le = 0
diff --git a/src/runtime/zgoarch_amd64p32.go b/src/runtime/zgoarch_amd64p32.go
deleted file mode 100644
index 9ac3f0b..0000000
--- a/src/runtime/zgoarch_amd64p32.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// generated by gengoos.go using 'go generate'
-
-package runtime
-
-const theGoarch = `amd64p32`
-
-const goarch_386 = 0
-const goarch_amd64 = 0
-const goarch_amd64p32 = 1
-const goarch_arm = 0
-const goarch_arm64 = 0
-const goarch_ppc64 = 0
-const goarch_ppc64le = 0
diff --git a/src/runtime/zgoarch_arm.go b/src/runtime/zgoarch_arm.go
deleted file mode 100644
index c865dc0..0000000
--- a/src/runtime/zgoarch_arm.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// generated by gengoos.go using 'go generate'
-
-package runtime
-
-const theGoarch = `arm`
-
-const goarch_386 = 0
-const goarch_amd64 = 0
-const goarch_amd64p32 = 0
-const goarch_arm = 1
-const goarch_arm64 = 0
-const goarch_ppc64 = 0
-const goarch_ppc64le = 0
diff --git a/src/runtime/zgoarch_arm64.go b/src/runtime/zgoarch_arm64.go
deleted file mode 100644
index cde5e9f..0000000
--- a/src/runtime/zgoarch_arm64.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// generated by gengoos.go using 'go generate'
-
-package runtime
-
-const theGoarch = `arm64`
-
-const goarch_386 = 0
-const goarch_amd64 = 0
-const goarch_amd64p32 = 0
-const goarch_arm = 0
-const goarch_arm64 = 1
-const goarch_ppc64 = 0
-const goarch_ppc64le = 0
diff --git a/src/runtime/zgoarch_ppc64.go b/src/runtime/zgoarch_ppc64.go
deleted file mode 100644
index 13d87d9..0000000
--- a/src/runtime/zgoarch_ppc64.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// generated by gengoos.go using 'go generate'
-
-package runtime
-
-const theGoarch = `ppc64`
-
-const goarch_386 = 0
-const goarch_amd64 = 0
-const goarch_amd64p32 = 0
-const goarch_arm = 0
-const goarch_arm64 = 0
-const goarch_ppc64 = 1
-const goarch_ppc64le = 0
diff --git a/src/runtime/zgoarch_ppc64le.go b/src/runtime/zgoarch_ppc64le.go
deleted file mode 100644
index 5d088aa..0000000
--- a/src/runtime/zgoarch_ppc64le.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// generated by gengoos.go using 'go generate'
-
-package runtime
-
-const theGoarch = `ppc64le`
-
-const goarch_386 = 0
-const goarch_amd64 = 0
-const goarch_amd64p32 = 0
-const goarch_arm = 0
-const goarch_arm64 = 0
-const goarch_ppc64 = 0
-const goarch_ppc64le = 1
diff --git a/src/runtime/zgoos_android.go b/src/runtime/zgoos_android.go
deleted file mode 100644
index 0590bd9..0000000
--- a/src/runtime/zgoos_android.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// generated by gengoos.go using 'go generate'
-
-package runtime
-
-const theGoos = `android`
-
-const goos_android = 1
-const goos_darwin = 0
-const goos_dragonfly = 0
-const goos_freebsd = 0
-const goos_linux = 0
-const goos_nacl = 0
-const goos_netbsd = 0
-const goos_openbsd = 0
-const goos_plan9 = 0
-const goos_solaris = 0
-const goos_windows = 0
diff --git a/src/runtime/zgoos_darwin.go b/src/runtime/zgoos_darwin.go
deleted file mode 100644
index c0a7cd6..0000000
--- a/src/runtime/zgoos_darwin.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// generated by gengoos.go using 'go generate'
-
-package runtime
-
-const theGoos = `darwin`
-
-const goos_android = 0
-const goos_darwin = 1
-const goos_dragonfly = 0
-const goos_freebsd = 0
-const goos_linux = 0
-const goos_nacl = 0
-const goos_netbsd = 0
-const goos_openbsd = 0
-const goos_plan9 = 0
-const goos_solaris = 0
-const goos_windows = 0
diff --git a/src/runtime/zgoos_dragonfly.go b/src/runtime/zgoos_dragonfly.go
deleted file mode 100644
index 008d6de..0000000
--- a/src/runtime/zgoos_dragonfly.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// generated by gengoos.go using 'go generate'
-
-package runtime
-
-const theGoos = `dragonfly`
-
-const goos_android = 0
-const goos_darwin = 0
-const goos_dragonfly = 1
-const goos_freebsd = 0
-const goos_linux = 0
-const goos_nacl = 0
-const goos_netbsd = 0
-const goos_openbsd = 0
-const goos_plan9 = 0
-const goos_solaris = 0
-const goos_windows = 0
diff --git a/src/runtime/zgoos_freebsd.go b/src/runtime/zgoos_freebsd.go
deleted file mode 100644
index 2478940..0000000
--- a/src/runtime/zgoos_freebsd.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// generated by gengoos.go using 'go generate'
-
-package runtime
-
-const theGoos = `freebsd`
-
-const goos_android = 0
-const goos_darwin = 0
-const goos_dragonfly = 0
-const goos_freebsd = 1
-const goos_linux = 0
-const goos_nacl = 0
-const goos_netbsd = 0
-const goos_openbsd = 0
-const goos_plan9 = 0
-const goos_solaris = 0
-const goos_windows = 0
diff --git a/src/runtime/zgoos_linux.go b/src/runtime/zgoos_linux.go
deleted file mode 100644
index c775ab5..0000000
--- a/src/runtime/zgoos_linux.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// generated by gengoos.go using 'go generate'
-
-// +build !android
-
-package runtime
-
-const theGoos = `linux`
-
-const goos_android = 0
-const goos_darwin = 0
-const goos_dragonfly = 0
-const goos_freebsd = 0
-const goos_linux = 1
-const goos_nacl = 0
-const goos_netbsd = 0
-const goos_openbsd = 0
-const goos_plan9 = 0
-const goos_solaris = 0
-const goos_windows = 0
diff --git a/src/runtime/zgoos_nacl.go b/src/runtime/zgoos_nacl.go
deleted file mode 100644
index d9d88f4..0000000
--- a/src/runtime/zgoos_nacl.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// generated by gengoos.go using 'go generate'
-
-package runtime
-
-const theGoos = `nacl`
-
-const goos_android = 0
-const goos_darwin = 0
-const goos_dragonfly = 0
-const goos_freebsd = 0
-const goos_linux = 0
-const goos_nacl = 1
-const goos_netbsd = 0
-const goos_openbsd = 0
-const goos_plan9 = 0
-const goos_solaris = 0
-const goos_windows = 0
diff --git a/src/runtime/zgoos_netbsd.go b/src/runtime/zgoos_netbsd.go
deleted file mode 100644
index ff2c5cb..0000000
--- a/src/runtime/zgoos_netbsd.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// generated by gengoos.go using 'go generate'
-
-package runtime
-
-const theGoos = `netbsd`
-
-const goos_android = 0
-const goos_darwin = 0
-const goos_dragonfly = 0
-const goos_freebsd = 0
-const goos_linux = 0
-const goos_nacl = 0
-const goos_netbsd = 1
-const goos_openbsd = 0
-const goos_plan9 = 0
-const goos_solaris = 0
-const goos_windows = 0
diff --git a/src/runtime/zgoos_openbsd.go b/src/runtime/zgoos_openbsd.go
deleted file mode 100644
index b071dc6..0000000
--- a/src/runtime/zgoos_openbsd.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// generated by gengoos.go using 'go generate'
-
-package runtime
-
-const theGoos = `openbsd`
-
-const goos_android = 0
-const goos_darwin = 0
-const goos_dragonfly = 0
-const goos_freebsd = 0
-const goos_linux = 0
-const goos_nacl = 0
-const goos_netbsd = 0
-const goos_openbsd = 1
-const goos_plan9 = 0
-const goos_solaris = 0
-const goos_windows = 0
diff --git a/src/runtime/zgoos_plan9.go b/src/runtime/zgoos_plan9.go
deleted file mode 100644
index 4306b0f..0000000
--- a/src/runtime/zgoos_plan9.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// generated by gengoos.go using 'go generate'
-
-package runtime
-
-const theGoos = `plan9`
-
-const goos_android = 0
-const goos_darwin = 0
-const goos_dragonfly = 0
-const goos_freebsd = 0
-const goos_linux = 0
-const goos_nacl = 0
-const goos_netbsd = 0
-const goos_openbsd = 0
-const goos_plan9 = 1
-const goos_solaris = 0
-const goos_windows = 0
diff --git a/src/runtime/zgoos_solaris.go b/src/runtime/zgoos_solaris.go
deleted file mode 100644
index 10f9537..0000000
--- a/src/runtime/zgoos_solaris.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// generated by gengoos.go using 'go generate'
-
-package runtime
-
-const theGoos = `solaris`
-
-const goos_android = 0
-const goos_darwin = 0
-const goos_dragonfly = 0
-const goos_freebsd = 0
-const goos_linux = 0
-const goos_nacl = 0
-const goos_netbsd = 0
-const goos_openbsd = 0
-const goos_plan9 = 0
-const goos_solaris = 1
-const goos_windows = 0
diff --git a/src/runtime/zgoos_windows.go b/src/runtime/zgoos_windows.go
deleted file mode 100644
index 56f5c58..0000000
--- a/src/runtime/zgoos_windows.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// generated by gengoos.go using 'go generate'
-
-package runtime
-
-const theGoos = `windows`
-
-const goos_android = 0
-const goos_darwin = 0
-const goos_dragonfly = 0
-const goos_freebsd = 0
-const goos_linux = 0
-const goos_nacl = 0
-const goos_netbsd = 0
-const goos_openbsd = 0
-const goos_plan9 = 0
-const goos_solaris = 0
-const goos_windows = 1
diff --git a/src/strconv/doc.go b/src/strconv/doc.go
deleted file mode 100644
index 7bc1e27..0000000
--- a/src/strconv/doc.go
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package strconv implements conversions to and from string representations
-// of basic data types.
-//
-// Numeric Conversions
-//
-// The most common numeric conversions are Atoi (string to int) and Itoa (int to string).
-//
-//	i, err := strconv.Atoi("-42")
-//	s := strconv.Itoa(-42)
-//
-// These assume decimal and the Go int type.
-//
-// ParseBool, ParseFloat, ParseInt, and ParseUint convert strings to values:
-//
-//	b, err := strconv.ParseBool("true")
-//	f, err := strconv.ParseFloat("3.1415", 64)
-//	i, err := strconv.ParseInt("-42", 10, 64)
-//	u, err := strconv.ParseUint("42", 10, 64)
-//
-// The parse functions return the widest type (float64, int64, and uint64),
-// but if the size argument specifies a narrower width the result can be
-// converted to that narrower type without data loss:
-//
-//	s := "2147483647" // biggest int32
-//	i64, err := strconv.ParseInt(s, 10, 32)
-//	...
-//	i := int32(i64)
-//
-// FormatBool, FormatFloat, FormatInt, and FormatUint convert values to strings:
-//
-// 	s := strconv.FormatBool(true)
-// 	s := strconv.FormatFloat(3.1415, 'E', -1, 64)
-// 	s := strconv.FormatInt(-42, 16)
-// 	s := strconv.FormatUint(42, 16)
-//
-// AppendBool, AppendFloat, AppendInt, and AppendUint are similar but
-// append the formatted value to a destination slice.
-//
-// String Conversions
-//
-// Quote and QuoteToASCII convert strings to quoted Go string literals.
-// The latter guarantees that the result is an ASCII string, by escaping
-// any non-ASCII Unicode with \u:
-//
-//	q := Quote("Hello, 世界")
-//	q := QuoteToASCII("Hello, 世界")
-//
-// QuoteRune and QuoteRuneToASCII are similar but accept runes and
-// return quoted Go rune literals.
-//
-// Unquote and UnquoteChar unquote Go string and rune literals.
-//
-package strconv
diff --git a/src/strconv/example_test.go b/src/strconv/example_test.go
deleted file mode 100644
index 01fbbc0..0000000
--- a/src/strconv/example_test.go
+++ /dev/null
@@ -1,338 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package strconv_test
-
-import (
-	"fmt"
-	"log"
-	"strconv"
-)
-
-func ExampleAppendBool() {
-	b := []byte("bool:")
-	b = strconv.AppendBool(b, true)
-	fmt.Println(string(b))
-
-	// Output:
-	// bool:true
-}
-
-func ExampleAppendFloat() {
-	b32 := []byte("float32:")
-	b32 = strconv.AppendFloat(b32, 3.1415926535, 'E', -1, 32)
-	fmt.Println(string(b32))
-
-	b64 := []byte("float64:")
-	b64 = strconv.AppendFloat(b64, 3.1415926535, 'E', -1, 64)
-	fmt.Println(string(b64))
-
-	// Output:
-	// float32:3.1415927E+00
-	// float64:3.1415926535E+00
-}
-
-func ExampleAppendInt() {
-	b10 := []byte("int (base 10):")
-	b10 = strconv.AppendInt(b10, -42, 10)
-	fmt.Println(string(b10))
-
-	b16 := []byte("int (base 16):")
-	b16 = strconv.AppendInt(b16, -42, 16)
-	fmt.Println(string(b16))
-
-	// Output:
-	// int (base 10):-42
-	// int (base 16):-2a
-}
-
-func ExampleAppendQuote() {
-	b := []byte("quote:")
-	b = strconv.AppendQuote(b, `"Fran & Freddie's Diner"`)
-	fmt.Println(string(b))
-
-	// Output:
-	// quote:"\"Fran & Freddie's Diner\""
-}
-
-func ExampleAppendQuoteRune() {
-	b := []byte("rune:")
-	b = strconv.AppendQuoteRune(b, '☺')
-	fmt.Println(string(b))
-
-	// Output:
-	// rune:'☺'
-}
-
-func ExampleAppendQuoteRuneToASCII() {
-	b := []byte("rune (ascii):")
-	b = strconv.AppendQuoteRuneToASCII(b, '☺')
-	fmt.Println(string(b))
-
-	// Output:
-	// rune (ascii):'\u263a'
-}
-
-func ExampleAppendQuoteToASCII() {
-	b := []byte("quote (ascii):")
-	b = strconv.AppendQuoteToASCII(b, `"Fran & Freddie's Diner"`)
-	fmt.Println(string(b))
-
-	// Output:
-	// quote (ascii):"\"Fran & Freddie's Diner\""
-}
-
-func ExampleAppendUint() {
-	b10 := []byte("uint (base 10):")
-	b10 = strconv.AppendUint(b10, 42, 10)
-	fmt.Println(string(b10))
-
-	b16 := []byte("uint (base 16):")
-	b16 = strconv.AppendUint(b16, 42, 16)
-	fmt.Println(string(b16))
-
-	// Output:
-	// uint (base 10):42
-	// uint (base 16):2a
-}
-
-func ExampleAtoi() {
-	v := "10"
-	if s, err := strconv.Atoi(v); err == nil {
-		fmt.Printf("%T, %v", s, s)
-	}
-
-	// Output:
-	// int, 10
-}
-
-func ExampleCanBackquote() {
-	fmt.Println(strconv.CanBackquote("Fran & Freddie's Diner ☺"))
-	fmt.Println(strconv.CanBackquote("`can't backquote this`"))
-
-	// Output:
-	// true
-	// false
-}
-
-func ExampleFormatBool() {
-	v := true
-	s := strconv.FormatBool(v)
-	fmt.Printf("%T, %v\n", s, s)
-
-	// Output:
-	// string, true
-}
-
-func ExampleFormatFloat() {
-	v := 3.1415926535
-
-	s32 := strconv.FormatFloat(v, 'E', -1, 32)
-	fmt.Printf("%T, %v\n", s32, s32)
-
-	s64 := strconv.FormatFloat(v, 'E', -1, 64)
-	fmt.Printf("%T, %v\n", s64, s64)
-
-	// Output:
-	// string, 3.1415927E+00
-	// string, 3.1415926535E+00
-}
-
-func ExampleFormatInt() {
-	v := int64(-42)
-
-	s10 := strconv.FormatInt(v, 10)
-	fmt.Printf("%T, %v\n", s10, s10)
-
-	s16 := strconv.FormatInt(v, 16)
-	fmt.Printf("%T, %v\n", s16, s16)
-
-	// Output:
-	// string, -42
-	// string, -2a
-}
-
-func ExampleFormatUint() {
-	v := uint64(42)
-
-	s10 := strconv.FormatUint(v, 10)
-	fmt.Printf("%T, %v\n", s10, s10)
-
-	s16 := strconv.FormatUint(v, 16)
-	fmt.Printf("%T, %v\n", s16, s16)
-
-	// Output:
-	// string, 42
-	// string, 2a
-}
-
-func ExampleIsPrint() {
-	c := strconv.IsPrint('\u263a')
-	fmt.Println(c)
-
-	bel := strconv.IsPrint('\007')
-	fmt.Println(bel)
-
-	// Output:
-	// true
-	// false
-}
-
-func ExampleItoa() {
-	i := 10
-	s := strconv.Itoa(i)
-	fmt.Printf("%T, %v\n", s, s)
-
-	// Output:
-	// string, 10
-}
-
-func ExampleParseBool() {
-	v := "true"
-	if s, err := strconv.ParseBool(v); err == nil {
-		fmt.Printf("%T, %v\n", s, s)
-	}
-
-	// Output:
-	// bool, true
-}
-
-func ExampleParseFloat() {
-	v := "3.1415926535"
-	if s, err := strconv.ParseFloat(v, 32); err == nil {
-		fmt.Printf("%T, %v\n", s, s)
-	}
-	if s, err := strconv.ParseFloat(v, 64); err == nil {
-		fmt.Printf("%T, %v\n", s, s)
-	}
-
-	// Output:
-	// float64, 3.1415927410125732
-	// float64, 3.1415926535
-}
-
-func ExampleParseInt() {
-	v32 := "-354634382"
-	if s, err := strconv.ParseInt(v32, 10, 32); err == nil {
-		fmt.Printf("%T, %v\n", s, s)
-	}
-	if s, err := strconv.ParseInt(v32, 16, 32); err == nil {
-		fmt.Printf("%T, %v\n", s, s)
-	}
-
-	v64 := "-3546343826724305832"
-	if s, err := strconv.ParseInt(v64, 10, 64); err == nil {
-		fmt.Printf("%T, %v\n", s, s)
-	}
-	if s, err := strconv.ParseInt(v64, 16, 64); err == nil {
-		fmt.Printf("%T, %v\n", s, s)
-	}
-
-	// Output:
-	// int64, -354634382
-	// int64, -3546343826724305832
-}
-
-func ExampleParseUint() {
-	v := "42"
-	if s, err := strconv.ParseUint(v, 10, 32); err == nil {
-		fmt.Printf("%T, %v\n", s, s)
-	}
-	if s, err := strconv.ParseUint(v, 10, 64); err == nil {
-		fmt.Printf("%T, %v\n", s, s)
-	}
-
-	// Output:
-	// uint64, 42
-	// uint64, 42
-}
-
-func ExampleQuote() {
-	s := strconv.Quote(`"Fran & Freddie's Diner	☺"`)
-	fmt.Println(s)
-
-	// Output:
-	// "\"Fran & Freddie's Diner\t☺\""
-}
-
-func ExampleQuoteRune() {
-	s := strconv.QuoteRune('☺')
-	fmt.Println(s)
-
-	// Output:
-	// '☺'
-}
-
-func ExampleQuoteRuneToASCII() {
-	s := strconv.QuoteRuneToASCII('☺')
-	fmt.Println(s)
-
-	// Output:
-	// '\u263a'
-}
-
-func ExampleQuoteToASCII() {
-	s := strconv.QuoteToASCII(`"Fran & Freddie's Diner	☺"`)
-	fmt.Println(s)
-
-	// Output:
-	// "\"Fran & Freddie's Diner\t\u263a\""
-}
-
-func ExampleUnquote() {
-	test := func(s string) {
-		t, err := strconv.Unquote(s)
-		if err != nil {
-			fmt.Printf("Unquote(%#v): %v\n", s, err)
-		} else {
-			fmt.Printf("Unquote(%#v) = %v\n", s, t)
-		}
-	}
-
-	s := `\"Fran & Freddie's Diner\t\u263a\"\"`
-	// If the string doesn't have quotes, it can't be unquoted.
-	test(s) // invalid syntax
-	test("`" + s + "`")
-	test(`"` + s + `"`)
-	test(`'\u263a'`)
-
-	// Output:
-	// Unquote("\\\"Fran & Freddie's Diner\\t\\u263a\\\"\\\""): invalid syntax
-	// Unquote("`\\\"Fran & Freddie's Diner\\t\\u263a\\\"\\\"`") = \"Fran & Freddie's Diner\t\u263a\"\"
-	// Unquote("\"\\\"Fran & Freddie's Diner\\t\\u263a\\\"\\\"\"") = "Fran & Freddie's Diner	☺""
-	// Unquote("'\\u263a'") = ☺
-}
-
-func ExampleUnquoteChar() {
-	v, mb, t, err := strconv.UnquoteChar(`\"Fran & Freddie's Diner\"`, '"')
-	if err != nil {
-		log.Fatal(err)
-	}
-
-	fmt.Println("value:", string(v))
-	fmt.Println("multibyte:", mb)
-	fmt.Println("tail:", t)
-
-	// Output:
-	// value: "
-	// multibyte: false
-	// tail: Fran & Freddie's Diner\"
-}
-
-func ExampleNumError() {
-	str := "Not a number"
-	if _, err := strconv.ParseFloat(str, 64); err != nil {
-		e := err.(*strconv.NumError)
-		fmt.Println("Func:", e.Func)
-		fmt.Println("Num:", e.Num)
-		fmt.Println("Err:", e.Err)
-		fmt.Println(err)
-	}
-
-	// Output:
-	// Func: ParseFloat
-	// Num: Not a number
-	// Err: invalid syntax
-	// strconv.ParseFloat: parsing "Not a number": invalid syntax
-}
diff --git a/src/strings/compare.go b/src/strings/compare.go
deleted file mode 100644
index b84ddde..0000000
--- a/src/strings/compare.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package strings
-
-// Compare returns an integer comparing two strings lexicographically.
-// The result will be 0 if a==b, -1 if a < b, and +1 if a > b.
-//
-// Compare is included only for symmetry with package bytes.
-// It is usually clearer and always faster to use the built-in
-// string comparison operators ==, <, >, and so on.
-func Compare(a, b string) int {
-	// NOTE(rsc): This function does NOT call the runtime cmpstring function,
-	// because we do not want to provide any performance justification for
-	// using strings.Compare. Basically no one should use strings.Compare.
-	// As the comment above says, it is here only for symmetry with package bytes.
-	// If performance is important, the compiler should be changed to recognize
-	// the pattern so that all code doing three-way comparisons, not just code
-	// using strings.Compare, can benefit.
-	if a == b {
-		return 0
-	}
-	if a < b {
-		return -1
-	}
-	return +1
-}
diff --git a/src/strings/compare_test.go b/src/strings/compare_test.go
deleted file mode 100644
index 68fc88e..0000000
--- a/src/strings/compare_test.go
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package strings_test
-
-// Derived from bytes/compare_test.go.
-// Benchmarks omitted since the underlying implementation is identical.
-
-import (
-	. "strings"
-	"testing"
-)
-
-var compareTests = []struct {
-	a, b string
-	i    int
-}{
-	{"", "", 0},
-	{"a", "", 1},
-	{"", "a", -1},
-	{"abc", "abc", 0},
-	{"ab", "abc", -1},
-	{"abc", "ab", 1},
-	{"x", "ab", 1},
-	{"ab", "x", -1},
-	{"x", "a", 1},
-	{"b", "x", -1},
-	// test runtime·memeq's chunked implementation
-	{"abcdefgh", "abcdefgh", 0},
-	{"abcdefghi", "abcdefghi", 0},
-	{"abcdefghi", "abcdefghj", -1},
-}
-
-func TestCompare(t *testing.T) {
-	for _, tt := range compareTests {
-		cmp := Compare(tt.a, tt.b)
-		if cmp != tt.i {
-			t.Errorf(`Compare(%q, %q) = %v`, tt.a, tt.b, cmp)
-		}
-	}
-}
-
-func TestCompareIdenticalString(t *testing.T) {
-	var s = "Hello Gophers!"
-	if Compare(s, s) != 0 {
-		t.Error("s != s")
-	}
-	if Compare(s, s[:1]) != 1 {
-		t.Error("s > s[:1] failed")
-	}
-}
-
-func TestCompareStrings(t *testing.T) {
-	n := 128
-	a := make([]byte, n+1)
-	b := make([]byte, n+1)
-	for len := 0; len < 128; len++ {
-		// randomish but deterministic data.  No 0 or 255.
-		for i := 0; i < len; i++ {
-			a[i] = byte(1 + 31*i%254)
-			b[i] = byte(1 + 31*i%254)
-		}
-		// data past the end is different
-		for i := len; i <= n; i++ {
-			a[i] = 8
-			b[i] = 9
-		}
-
-		cmp := Compare(string(a[:len]), string(b[:len]))
-		if cmp != 0 {
-			t.Errorf(`CompareIdentical(%d) = %d`, len, cmp)
-		}
-		if len > 0 {
-			cmp = Compare(string(a[:len-1]), string(b[:len]))
-			if cmp != -1 {
-				t.Errorf(`CompareAshorter(%d) = %d`, len, cmp)
-			}
-			cmp = Compare(string(a[:len]), string(b[:len-1]))
-			if cmp != 1 {
-				t.Errorf(`CompareBshorter(%d) = %d`, len, cmp)
-			}
-		}
-		for k := 0; k < len; k++ {
-			b[k] = a[k] - 1
-			cmp = Compare(string(a[:len]), string(b[:len]))
-			if cmp != 1 {
-				t.Errorf(`CompareAbigger(%d,%d) = %d`, len, k, cmp)
-			}
-			b[k] = a[k] + 1
-			cmp = Compare(string(a[:len]), string(b[:len]))
-			if cmp != -1 {
-				t.Errorf(`CompareBbigger(%d,%d) = %d`, len, k, cmp)
-			}
-			b[k] = a[k]
-		}
-	}
-}
diff --git a/src/sync/atomic/asm_arm64.s b/src/sync/atomic/asm_arm64.s
deleted file mode 100644
index 32e9625..0000000
--- a/src/sync/atomic/asm_arm64.s
+++ /dev/null
@@ -1,149 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-
-TEXT ·SwapInt32(SB),NOSPLIT,$0-20
-	B	·SwapUint32(SB)
-
-TEXT ·SwapUint32(SB),NOSPLIT,$0-20
-	MOVD	addr+0(FP), R0
-	MOVW	new+8(FP), R1
-again:
-	LDAXRW	(R0), R2
-	STLXRW	R1, (R0), R3
-	CBNZ	R3, again
-	MOVW	R2, old+16(FP)
-	RET
-
-TEXT ·SwapInt64(SB),NOSPLIT,$0-24
-	B	·SwapUint64(SB)
-
-TEXT ·SwapUint64(SB),NOSPLIT,$0-24
-	MOVD	addr+0(FP), R0
-	MOVD	new+8(FP), R1
-again:
-	LDAXR	(R0), R2
-	STLXR	R1, (R0), R3
-	CBNZ	R3, again
-	MOVD	R2, old+16(FP)
-	RET
-
-TEXT ·SwapUintptr(SB),NOSPLIT,$0-24
-	B	·SwapUint64(SB)
-
-TEXT ·CompareAndSwapInt32(SB),NOSPLIT,$0-17
-	B	·CompareAndSwapUint32(SB)
-
-TEXT ·CompareAndSwapUint32(SB),NOSPLIT,$0-17
-	MOVD	addr+0(FP), R0
-	MOVW	old+8(FP), R1
-	MOVW	new+12(FP), R2
-again:
-	LDAXRW	(R0), R3
-	CMPW	R1, R3
-	BNE	ok
-	STLXRW	R2, (R0), R3
-	CBNZ	R3, again
-ok:
-	CSET	EQ, R0
-	MOVB	R0, swapped+16(FP)
-	RET
-
-TEXT ·CompareAndSwapUintptr(SB),NOSPLIT,$0-25
-	B	·CompareAndSwapUint64(SB)
-
-TEXT ·CompareAndSwapInt64(SB),NOSPLIT,$0-25
-	B	·CompareAndSwapUint64(SB)
-
-TEXT ·CompareAndSwapUint64(SB),NOSPLIT,$0-25
-	MOVD	addr+0(FP), R0
-	MOVD	old+8(FP), R1
-	MOVD	new+16(FP), R2
-again:
-	LDAXR	(R0), R3
-	CMP	R1, R3
-	BNE	ok
-	STLXR	R2, (R0), R3
-	CBNZ	R3, again
-ok:
-	CSET	EQ, R0
-	MOVB	R0, swapped+24(FP)
-	RET
-
-TEXT ·AddInt32(SB),NOSPLIT,$0-20
-	B	·AddUint32(SB)
-
-TEXT ·AddUint32(SB),NOSPLIT,$0-20
-	MOVD	addr+0(FP), R0
-	MOVW	delta+8(FP), R1
-again:
-	LDAXRW	(R0), R2
-	ADDW	R2, R1, R2
-	STLXRW	R2, (R0), R3
-	CBNZ	R3, again
-	MOVW	R2, new+16(FP)
-	RET
-
-TEXT ·AddUintptr(SB),NOSPLIT,$0-24
-	B	·AddUint64(SB)
-
-TEXT ·AddInt64(SB),NOSPLIT,$0-24
-	B	·AddUint64(SB)
-
-TEXT ·AddUint64(SB),NOSPLIT,$0-24
-	MOVD	addr+0(FP), R0
-	MOVD	delta+8(FP), R1
-again:
-	LDAXR	(R0), R2
-	ADD	R2, R1, R2
-	STLXR	R2, (R0), R3
-	CBNZ	R3, again
-	MOVD	R2, new+16(FP)
-	RET
-
-TEXT ·LoadInt32(SB),NOSPLIT,$0-12
-	B	·LoadUint32(SB)
-
-TEXT ·LoadUint32(SB),NOSPLIT,$0-12
-	MOVD	addr+0(FP), R0
-	LDARW	(R0), R0
-	MOVW	R0, val+8(FP)
-	RET
-
-TEXT ·LoadInt64(SB),NOSPLIT,$0-16
-	B	·LoadUint64(SB)
-
-TEXT ·LoadUint64(SB),NOSPLIT,$0-16
-	MOVD	addr+0(FP), R0
-	LDAR	(R0), R0
-	MOVD	R0, val+8(FP)
-	RET
-
-TEXT ·LoadUintptr(SB),NOSPLIT,$0-16
-	B	·LoadPointer(SB)
-
-TEXT ·LoadPointer(SB),NOSPLIT,$0-16
-	B	·LoadUint64(SB)
-
-TEXT ·StoreInt32(SB),NOSPLIT,$0-12
-	B	·StoreUint32(SB)
-
-TEXT ·StoreUint32(SB),NOSPLIT,$0-12
-	MOVD	addr+0(FP), R0
-	MOVW	val+8(FP), R1
-	STLRW	R1, (R0)
-	RET
-
-TEXT ·StoreInt64(SB),NOSPLIT,$0-16
-	B	·StoreUint64(SB)
-
-TEXT ·StoreUint64(SB),NOSPLIT,$0-16
-	MOVD	addr+0(FP), R0
-	MOVD	val+8(FP), R1
-	STLR	R1, (R0)
-	RET
-
-TEXT ·StoreUintptr(SB),NOSPLIT,$0-16
-	B	·StoreUint64(SB)
diff --git a/src/sync/atomic/asm_darwin_arm.s b/src/sync/atomic/asm_darwin_arm.s
deleted file mode 100644
index 36dd483..0000000
--- a/src/sync/atomic/asm_darwin_arm.s
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright 2012 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-
-// Darwin/ARM atomic operations.
-
-TEXT ·CompareAndSwapInt32(SB),NOSPLIT,$0
-	B ·CompareAndSwapUint32(SB)
-
-TEXT ·CompareAndSwapUint32(SB),NOSPLIT,$0
-	B ·armCompareAndSwapUint32(SB)
-
-TEXT ·CompareAndSwapUintptr(SB),NOSPLIT,$0
-	B ·CompareAndSwapUint32(SB)
-
-TEXT ·AddInt32(SB),NOSPLIT,$0
-	B ·AddUint32(SB)
-
-TEXT ·AddUint32(SB),NOSPLIT,$0
-	B ·armAddUint32(SB)
-
-TEXT ·AddUintptr(SB),NOSPLIT,$0
-	B ·AddUint32(SB)
-
-TEXT ·SwapInt32(SB),NOSPLIT,$0
-	B ·SwapUint32(SB)
-
-TEXT ·SwapUint32(SB),NOSPLIT,$0
-	B ·armSwapUint32(SB)
-
-TEXT ·SwapUintptr(SB),NOSPLIT,$0
-	B ·SwapUint32(SB)
-
-TEXT ·CompareAndSwapInt64(SB),NOSPLIT,$0
-	B ·CompareAndSwapUint64(SB)
-
-TEXT ·CompareAndSwapUint64(SB),NOSPLIT,$-4
-	B ·armCompareAndSwapUint64(SB)
-
-TEXT ·AddInt64(SB),NOSPLIT,$0
-	B ·addUint64(SB)
-
-TEXT ·AddUint64(SB),NOSPLIT,$0
-	B ·addUint64(SB)
-
-TEXT ·SwapInt64(SB),NOSPLIT,$0
-	B ·swapUint64(SB)
-
-TEXT ·SwapUint64(SB),NOSPLIT,$0
-	B ·swapUint64(SB)
-
-TEXT ·LoadInt32(SB),NOSPLIT,$0
-	B ·LoadUint32(SB)
-
-TEXT ·LoadUint32(SB),NOSPLIT,$0-8
-	MOVW addr+0(FP), R1
-load32loop:
-	LDREX (R1), R2		// loads R2
-	STREX R2, (R1), R0	// stores R2
-	CMP $0, R0
-	BNE load32loop
-	MOVW R2, val+4(FP)
-	RET
-
-TEXT ·LoadInt64(SB),NOSPLIT,$0
-	B ·loadUint64(SB)
-
-TEXT ·LoadUint64(SB),NOSPLIT,$0
-	B ·loadUint64(SB)
-
-TEXT ·LoadUintptr(SB),NOSPLIT,$0
-	B ·LoadUint32(SB)
-
-TEXT ·LoadPointer(SB),NOSPLIT,$0
-	B ·LoadUint32(SB)
-
-TEXT ·StoreInt32(SB),NOSPLIT,$0
-	B ·StoreUint32(SB)
-
-TEXT ·StoreUint32(SB),NOSPLIT,$0-8
-	MOVW addr+0(FP), R1
-	MOVW val+4(FP), R2
-storeloop:
-	LDREX (R1), R4		// loads R4
-	STREX R2, (R1), R0	// stores R2
-	CMP $0, R0
-	BNE storeloop
-	RET
-
-TEXT ·StoreInt64(SB),NOSPLIT,$0
-	B ·storeUint64(SB)
-
-TEXT ·StoreUint64(SB),NOSPLIT,$0
-	B ·storeUint64(SB)
-
-TEXT ·StoreUintptr(SB),NOSPLIT,$0
-	B ·StoreUint32(SB)
diff --git a/src/sync/atomic/asm_openbsd_arm.s b/src/sync/atomic/asm_openbsd_arm.s
deleted file mode 100644
index 8c48a0a..0000000
--- a/src/sync/atomic/asm_openbsd_arm.s
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright 2013 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-
-// OpenBSD/ARM atomic operations.
-// TODO(minux): this only supports ARMv6K or higher.
-
-TEXT ·CompareAndSwapInt32(SB),NOSPLIT,$0
-	B ·CompareAndSwapUint32(SB)
-
-TEXT ·CompareAndSwapUint32(SB),NOSPLIT,$0
-	B ·armCompareAndSwapUint32(SB)
-
-TEXT ·CompareAndSwapUintptr(SB),NOSPLIT,$0
-	B ·CompareAndSwapUint32(SB)
-
-TEXT ·AddInt32(SB),NOSPLIT,$0
-	B ·AddUint32(SB)
-
-TEXT ·AddUint32(SB),NOSPLIT,$0
-	B ·armAddUint32(SB)
-
-TEXT ·AddUintptr(SB),NOSPLIT,$0
-	B ·AddUint32(SB)
-
-TEXT ·SwapInt32(SB),NOSPLIT,$0
-	B ·SwapUint32(SB)
-
-TEXT ·SwapUint32(SB),NOSPLIT,$0
-	B ·armSwapUint32(SB)
-
-TEXT ·SwapUintptr(SB),NOSPLIT,$0
-	B ·SwapUint32(SB)
-
-TEXT ·CompareAndSwapInt64(SB),NOSPLIT,$0
-	B ·CompareAndSwapUint64(SB)
-
-TEXT ·CompareAndSwapUint64(SB),NOSPLIT,$-4
-	B ·armCompareAndSwapUint64(SB)
-
-TEXT ·AddInt64(SB),NOSPLIT,$0
-	B ·addUint64(SB)
-
-TEXT ·AddUint64(SB),NOSPLIT,$0
-	B ·addUint64(SB)
-
-TEXT ·SwapInt64(SB),NOSPLIT,$0
-	B ·swapUint64(SB)
-
-TEXT ·SwapUint64(SB),NOSPLIT,$0
-	B ·swapUint64(SB)
-
-TEXT ·LoadInt32(SB),NOSPLIT,$0
-	B ·LoadUint32(SB)
-
-TEXT ·LoadUint32(SB),NOSPLIT,$0-8
-	MOVW addr+0(FP), R1
-load32loop:
-	LDREX (R1), R2		// loads R2
-	STREX R2, (R1), R0	// stores R2
-	CMP $0, R0
-	BNE load32loop
-	MOVW R2, val+4(FP)
-	RET
-
-TEXT ·LoadInt64(SB),NOSPLIT,$0
-	B ·loadUint64(SB)
-
-TEXT ·LoadUint64(SB),NOSPLIT,$0
-	B ·loadUint64(SB)
-
-TEXT ·LoadUintptr(SB),NOSPLIT,$0
-	B ·LoadUint32(SB)
-
-TEXT ·LoadPointer(SB),NOSPLIT,$0
-	B ·LoadUint32(SB)
-
-TEXT ·StoreInt32(SB),NOSPLIT,$0
-	B ·StoreUint32(SB)
-
-TEXT ·StoreUint32(SB),NOSPLIT,$0-8
-	MOVW addr+0(FP), R1
-	MOVW val+4(FP), R2
-storeloop:
-	LDREX (R1), R4		// loads R4
-	STREX R2, (R1), R0	// stores R2
-	CMP $0, R0
-	BNE storeloop
-	RET
-
-TEXT ·StoreInt64(SB),NOSPLIT,$0
-	B ·storeUint64(SB)
-
-TEXT ·StoreUint64(SB),NOSPLIT,$0
-	B ·storeUint64(SB)
-
-TEXT ·StoreUintptr(SB),NOSPLIT,$0
-	B ·StoreUint32(SB)
diff --git a/src/sync/atomic/asm_ppc64x.s b/src/sync/atomic/asm_ppc64x.s
deleted file mode 100644
index d3e49ae..0000000
--- a/src/sync/atomic/asm_ppc64x.s
+++ /dev/null
@@ -1,175 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ppc64 ppc64le
-
-#include "textflag.h"
-
-TEXT ·SwapInt32(SB),NOSPLIT,$0-20
-	BR	·SwapUint32(SB)
-
-TEXT ·SwapUint32(SB),NOSPLIT,$0-20
-	MOVD	addr+0(FP), R3
-	MOVW	new+8(FP), R4
-	SYNC
-	LWAR	(R3), R5
-	STWCCC	R4, (R3)
-	BNE	-3(PC)
-	SYNC
-	ISYNC
-	MOVW	R5, old+16(FP)
-	RET
-
-TEXT ·SwapInt64(SB),NOSPLIT,$0-24
-	BR	·SwapUint64(SB)
-
-TEXT ·SwapUint64(SB),NOSPLIT,$0-24
-	MOVD	addr+0(FP), R3
-	MOVD	new+8(FP), R4
-	SYNC
-	LDAR	(R3), R5
-	STDCCC	R4, (R3)
-	BNE	-3(PC)
-	SYNC
-	ISYNC
-	MOVD	R5, old+16(FP)
-	RET
-
-TEXT ·SwapUintptr(SB),NOSPLIT,$0-24
-	BR	·SwapUint64(SB)
-
-TEXT ·CompareAndSwapInt32(SB),NOSPLIT,$0-17
-	BR	·CompareAndSwapUint32(SB)
-
-TEXT ·CompareAndSwapUint32(SB),NOSPLIT,$0-17
-	MOVD	addr+0(FP), R3
-	MOVW	old+8(FP), R4
-	MOVW	new+12(FP), R5
-	SYNC
-	LWAR	(R3), R6
-	CMPW	R6, R4
-	BNE	8(PC)
-	STWCCC	R5, (R3)
-	BNE	-5(PC)
-	SYNC
-	ISYNC
-	MOVD	$1, R3
-	MOVB	R3, swapped+16(FP)
-	RET
-	MOVB	R0, swapped+16(FP)
-	RET
-
-TEXT ·CompareAndSwapUintptr(SB),NOSPLIT,$0-25
-	BR	·CompareAndSwapUint64(SB)
-
-TEXT ·CompareAndSwapInt64(SB),NOSPLIT,$0-25
-	BR	·CompareAndSwapUint64(SB)
-
-TEXT ·CompareAndSwapUint64(SB),NOSPLIT,$0-25
-	MOVD	addr+0(FP), R3
-	MOVD	old+8(FP), R4
-	MOVD	new+16(FP), R5
-	SYNC
-	LDAR	(R3), R6
-	CMP	R6, R4
-	BNE	8(PC)
-	STDCCC	R5, (R3)
-	BNE	-5(PC)
-	SYNC
-	ISYNC
-	MOVD	$1, R3
-	MOVB	R3, swapped+24(FP)
-	RET
-	MOVB	R0, swapped+24(FP)
-	RET
-
-TEXT ·AddInt32(SB),NOSPLIT,$0-20
-	BR	·AddUint32(SB)
-
-TEXT ·AddUint32(SB),NOSPLIT,$0-20
-	MOVD	addr+0(FP), R3
-	MOVW	delta+8(FP), R4
-	SYNC
-	LWAR	(R3), R5
-	ADD	R4, R5
-	STWCCC	R5, (R3)
-	BNE	-4(PC)
-	SYNC
-	ISYNC
-	MOVW	R5, ret+16(FP)
-	RET
-
-TEXT ·AddUintptr(SB),NOSPLIT,$0-24
-	BR	·AddUint64(SB)
-
-TEXT ·AddInt64(SB),NOSPLIT,$0-24
-	BR	·AddUint64(SB)
-
-TEXT ·AddUint64(SB),NOSPLIT,$0-24
-	MOVD	addr+0(FP), R3
-	MOVD	delta+8(FP), R4
-	SYNC
-	LDAR	(R3), R5
-	ADD	R4, R5
-	STDCCC	R5, (R3)
-	BNE	-4(PC)
-	SYNC
-	ISYNC
-	MOVD	R5, ret+16(FP)
-	RET
-
-TEXT ·LoadInt32(SB),NOSPLIT,$0-12
-	BR	·LoadUint32(SB)
-
-TEXT ·LoadUint32(SB),NOSPLIT,$0-12
-	MOVD	addr+0(FP), R3
-	SYNC
-	MOVW	0(R3), R3
-	CMPW	R3, R3, CR7
-	BC	4, 30, 1(PC)	// bne- cr7,0x4
-	ISYNC
-	MOVW	R3, val+8(FP)
-	RET
-
-TEXT ·LoadInt64(SB),NOSPLIT,$0-16
-	BR	·LoadUint64(SB)
-
-TEXT ·LoadUint64(SB),NOSPLIT,$0-16
-	MOVD	addr+0(FP), R3
-	SYNC
-	MOVD	0(R3), R3
-	CMP	R3, R3, CR7
-	BC	4, 30, 1(PC)	// bne- cr7,0x4
-	ISYNC
-	MOVD	R3, val+8(FP)
-	RET
-
-TEXT ·LoadUintptr(SB),NOSPLIT,$0-16
-	BR	·LoadPointer(SB)
-
-TEXT ·LoadPointer(SB),NOSPLIT,$0-16
-	BR	·LoadUint64(SB)
-
-TEXT ·StoreInt32(SB),NOSPLIT,$0-12
-	BR	·StoreUint32(SB)
-
-TEXT ·StoreUint32(SB),NOSPLIT,$0-12
-	MOVD	addr+0(FP), R3
-	MOVW	val+8(FP), R4
-	SYNC
-	MOVW	R4, 0(R3)
-	RET
-
-TEXT ·StoreInt64(SB),NOSPLIT,$0-16
-	BR	·StoreUint64(SB)
-
-TEXT ·StoreUint64(SB),NOSPLIT,$0-16
-	MOVD	addr+0(FP), R3
-	MOVD	val+8(FP), R4
-	SYNC
-	MOVD	R4, 0(R3)
-	RET
-
-TEXT ·StoreUintptr(SB),NOSPLIT,$0-16
-	BR	·StoreUint64(SB)
diff --git a/src/syscall/asm_darwin_arm.s b/src/syscall/asm_darwin_arm.s
deleted file mode 100644
index 1a2aad0..0000000
--- a/src/syscall/asm_darwin_arm.s
+++ /dev/null
@@ -1,134 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-
-//
-// System call support for ARM, Darwin
-//
-
-// func Syscall(syscall uintptr, a1, a2, a3 uintptr) (r1, r2, err uintptr)
-TEXT	·Syscall(SB),NOSPLIT,$0-28
-	BL		runtime·entersyscall(SB)
-	MOVW	syscall+4(SP), R12
-	MOVW	a1+8(SP), R0
-	MOVW	a2+12(SP), R1
-	MOVW	a3+16(SP), R2
-	SWI		$0x80
-	BCC		ok
-	MOVW	$-1, R1
-	MOVW	R1, r1+20(SP)	// r1
-	MOVW	$0, R2
-	MOVW	R2, r2+24(SP)	// r2
-	MOVW	R0, errno+28(SP)	// errno
-	BL		runtime·exitsyscall(SB)
-	RET
-ok:
-	MOVW	R0, r1+20(SP) // r1
-	MOVW	R1, r2+24(SP)	// r2
-	MOVW	$0, R0
-	MOVW	R0, errno+28(SP)	// errno
-	BL		runtime·exitsyscall(SB)
-	RET
-
-// func RawSyscall(trap uintptr, a1, a2, a3 uintptr) (r1, r2, err uintptr)
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
-	MOVW	syscall+4(SP), R12	// syscall entry
-	MOVW	a1+8(SP), R0
-	MOVW	a2+12(SP), R1
-	MOVW	a3+16(SP), R2
-	SWI		$0x80
-	BCC		ok1
-	MOVW	$-1, R1
-	MOVW	R1, r1+20(SP)	// r1
-	MOVW	$0, R2
-	MOVW	R2, r2+24(SP)	// r2
-	MOVW	R0, errno+28(SP)	// errno
-	RET
-ok1:
-	MOVW	R0, r1+20(SP) // r1
-	MOVW	R1, r2+24(SP)	// r2
-	MOVW	$0, R0
-	MOVW	R0, errno+28(SP)	// errno
-	RET
-
-// func Syscall6(trap uintptr, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr)
-TEXT	·Syscall6(SB),NOSPLIT,$0-40
-	BL		runtime·entersyscall(SB)
-	MOVW	syscall+4(SP), R12	// syscall entry
-	MOVW	a1+8(SP), R0
-	MOVW	a2+12(SP), R1
-	MOVW	a3+16(SP), R2
-	MOVW	a4+20(SP), R3
-	MOVW	a5+24(SP), R4
-	MOVW	a6+28(SP), R5
-	SWI		$0x80
-	BCC		ok6
-	MOVW	$-1, R1
-	MOVW	R1, r1+32(SP)	// r1
-	MOVW	$0, R2
-	MOVW	R2, r2+36(SP)	// r2
-	MOVW	R0, errno+40(SP)	// errno
-	BL		runtime·exitsyscall(SB)
-	RET
-ok6:
-	MOVW	R0, r1+32(SP) // r1
-	MOVW	R1, r2+36(SP)	// r2
-	MOVW	$0, R0
-	MOVW	R0, errno+40(SP)	// errno
-	BL		runtime·exitsyscall(SB)
-	RET
-
-// func RawSyscall6(trap uintptr, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr)
-TEXT	·RawSyscall6(SB),NOSPLIT,$0-40
-	MOVW	trap+4(SP), R12	// syscall entry
-	MOVW	a1+8(SP), R0
-	MOVW	a2+12(SP), R1
-	MOVW	a3+16(SP), R2
-	MOVW	a4+20(SP), R3
-	MOVW	a5+24(SP), R4
-	MOVW	a6+28(SP), R5
-	SWI		$0x80
-	BCC		ok2
-	MOVW	$-1, R1
-	MOVW	R1, r1+32(SP)	// r1
-	MOVW	$0, R2
-	MOVW	R2, r2+36(SP)	// r2
-	MOVW	R0, errno+40(SP)	// errno
-	RET
-ok2:
-	MOVW	R0, r1+32(SP) // r1
-	MOVW	R1, r2+36(SP)	// r2
-	MOVW	$0, R0
-	MOVW	R0, errno+40(SP)	// errno
-	RET
-
-// Actually Syscall7.
-TEXT	·Syscall9(SB),NOSPLIT,$0-52
-	BL runtime·entersyscall(SB)
-	MOVW	syscall+4(SP), R12	// syscall entry
-	MOVW	a1+8(SP), R0
-	MOVW	a2+12(SP), R1
-	MOVW	a3+16(SP), R2
-	MOVW	a4+20(SP), R3
-	MOVW	a5+24(SP), R4
-	MOVW	a6+28(SP), R5
-	MOVW	a7+32(SP), R6
-	SWI		$0x80
-	BCC		ok9
-	MOVW	$-1, R1
-	MOVW	R1, r1+44(SP)	// r1
-	MOVW	$0, R2
-	MOVW	R2, r2+48(SP)	// r2
-	MOVW	R0, errno+52(SP)	// errno
-	BL		runtime·exitsyscall(SB)
-	RET
-ok9:
-	MOVW	R0, r1+44(SP) // r1
-	MOVW	R1, r2+48(SP)	// r2
-	MOVW	$0, R0
-	MOVW	R0, errno+52(SP)	// errno
-	BL	runtime·exitsyscall(SB)
-	RET
-
diff --git a/src/syscall/asm_darwin_arm64.s b/src/syscall/asm_darwin_arm64.s
deleted file mode 100644
index e18ff6a..0000000
--- a/src/syscall/asm_darwin_arm64.s
+++ /dev/null
@@ -1,127 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-
-//
-// System call support for ARM64, Darwin
-//
-
-// func Syscall(syscall uintptr, a1, a2, a3 uintptr) (r1, r2, err uintptr)
-TEXT	·Syscall(SB),NOSPLIT,$0-56
-	BL	runtime·entersyscall(SB)
-	MOVD	syscall+0(FP), R16
-	MOVD	a1+8(FP), R0
-	MOVD	a2+16(FP), R1
-	MOVD	a3+24(FP), R2
-	SVC	$0x80
-	BCC	ok
-	MOVD	$-1, R1
-	MOVD	R1, r1+32(FP)	// r1
-	MOVD	ZR, r2+40(FP)	// r2
-	MOVD	R0, errno+48(FP)	// errno
-	BL	runtime·exitsyscall(SB)
-	RET
-ok:
-	MOVD	R0, r1+32(FP) // r1
-	MOVD	R1, r2+40(FP)	// r2
-	MOVD	ZR, errno+48(FP)	// errno
-	BL	runtime·exitsyscall(SB)
-	RET
-
-// func RawSyscall(trap uintptr, a1, a2, a3 uintptr) (r1, r2, err uintptr)
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
-	MOVD	syscall+0(FP), R16	// syscall entry
-	MOVD	a1+8(FP), R0
-	MOVD	a2+16(FP), R1
-	MOVD	a3+24(FP), R2
-	SVC	$0x80
-	BCC	ok
-	MOVD	$-1, R1
-	MOVD	R1, r1+32(FP)	// r1
-	MOVD	ZR, r2+40(FP)	// r2
-	MOVD	R0, errno+48(FP)	// errno
-	RET
-ok:
-	MOVD	R0, r1+32(FP) // r1
-	MOVD	R1, r2+40(FP)	// r2
-	MOVD	ZR, errno+48(FP)	// errno
-	RET
-
-// func Syscall6(trap uintptr, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr)
-TEXT	·Syscall6(SB),NOSPLIT,$0-80
-	BL	runtime·entersyscall(SB)
-	MOVD	syscall+0(FP), R16	// syscall entry
-	MOVD	a1+8(FP), R0
-	MOVD	a2+16(FP), R1
-	MOVD	a3+24(FP), R2
-	MOVD	a4+32(FP), R3
-	MOVD	a5+40(FP), R4
-	MOVD	a6+48(FP), R5
-	SVC	$0x80
-	BCC	ok
-	MOVD	$-1, R1
-	MOVD	R1, r1+56(FP)	// r1
-	MOVD	ZR, r2+64(FP)	// r2
-	MOVD	R0, errno+72(FP)	// errno
-	BL	runtime·exitsyscall(SB)
-	RET
-ok:
-	MOVD	R0, r1+56(FP) // r1
-	MOVD	R1, r2+64(FP)	// r2
-	MOVD	ZR, errno+72(FP)	// errno
-	BL	runtime·exitsyscall(SB)
-	RET
-
-// func RawSyscall6(trap uintptr, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr)
-TEXT	·RawSyscall6(SB),NOSPLIT,$0-80
-	MOVD	trap+0(FP), R16	// syscall entry
-	MOVD	a1+8(FP), R0
-	MOVD	a2+16(FP), R1
-	MOVD	a3+24(FP), R2
-	MOVD	a4+32(FP), R3
-	MOVD	a5+40(FP), R4
-	MOVD	a6+48(FP), R5
-	SVC	$0x80
-	BCC	ok
-	MOVD	$-1, R1
-	MOVD	R1, r1+56(FP)	// r1
-	MOVD	ZR, r2+64(FP)	// r2
-	MOVD	R0, errno+72(FP)	// errno
-	RET
-ok:
-	MOVD	R0, r1+56(FP) // r1
-	MOVD	R1, r2+64(FP)	// r2
-	MOVD	ZR, R0
-	MOVD	R0, errno+72(FP)	// errno
-	RET
-
-// Actually Syscall7
-TEXT	·Syscall9(SB),NOSPLIT,$0-104
-	BL	runtime·entersyscall(SB)
-	MOVD	syscall+0(FP), R16	// syscall entry
-	MOVD	a1+8(FP), R0
-	MOVD	a2+16(FP), R1
-	MOVD	a3+24(FP), R2
-	MOVD	a4+32(FP), R3
-	MOVD	a5+40(FP), R4
-	MOVD	a6+48(FP), R5
-	MOVD	a7+56(FP), R6
-	//MOVD	a8+64(FP), R7
-	//MOVD	a9+72(FP), R8
-	SVC	$0x80
-	BCC	ok
-	MOVD	$-1, R1
-	MOVD	R1, r1+80(FP)	// r1
-	MOVD	ZR, r2+88(FP)	// r2
-	MOVD	R0, errno+96(FP)	// errno
-	BL	runtime·exitsyscall(SB)
-	RET
-ok:
-	MOVD	R0, r1+80(FP) // r1
-	MOVD	R1, r2+88(FP)	// r2
-	MOVD	ZR, errno+96(FP)	// errno
-	BL	runtime·exitsyscall(SB)
-	RET
-
diff --git a/src/syscall/asm_linux_arm64.s b/src/syscall/asm_linux_arm64.s
deleted file mode 100644
index 184a44f..0000000
--- a/src/syscall/asm_linux_arm64.s
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-
-// func Syscall(trap int64, a1, a2, a3 int64) (r1, r2, err int64);
-
-TEXT	·Syscall(SB),NOSPLIT,$0-56
-	BL	runtime·entersyscall(SB)
-	MOVD	a1+8(FP), R0
-	MOVD	a2+16(FP), R1
-	MOVD	a3+24(FP), R2
-	MOVD	$0, R3
-	MOVD	$0, R4
-	MOVD	$0, R5
-	MOVD	trap+0(FP), R8	// syscall entry
-	SVC
-	CMN	$4095, R0
-	BCC	ok
-	MOVD	$-1, R4
-	MOVD	R4, r1+32(FP)	// r1
-	MOVD	ZR, r2+40(FP)	// r2
-	NEG	R0, R0
-	MOVD	R0, err+48(FP)	// errno
-	BL	runtime·exitsyscall(SB)
-	RET
-ok:
-	MOVD	R0, r1+32(FP)	// r1
-	MOVD	R1, r2+40(FP)	// r2
-	MOVD	ZR, err+48(FP)	// errno
-	BL	runtime·exitsyscall(SB)
-	RET
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
-	BL	runtime·entersyscall(SB)
-	MOVD	a1+8(FP), R0
-	MOVD	a2+16(FP), R1
-	MOVD	a3+24(FP), R2
-	MOVD	a4+32(FP), R3
-	MOVD	a5+40(FP), R4
-	MOVD	a6+48(FP), R5
-	MOVD	trap+0(FP), R8	// syscall entry
-	SVC
-	CMN	$4095, R0
-	BCC	ok
-	MOVD	$-1, R4
-	MOVD	R4, r1+56(FP)	// r1
-	MOVD	ZR, r2+64(FP)	// r2
-	NEG	R0, R0
-	MOVD	R0, err+72(FP)	// errno
-	BL	runtime·exitsyscall(SB)
-	RET
-ok:
-	MOVD	R0, r1+56(FP)	// r1
-	MOVD	R1, r2+64(FP)	// r2
-	MOVD	ZR, err+72(FP)	// errno
-	BL	runtime·exitsyscall(SB)
-	RET
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
-	MOVD	a1+8(FP), R0
-	MOVD	a2+16(FP), R1
-	MOVD	a3+24(FP), R2
-	MOVD	$0, R3
-	MOVD	$0, R4
-	MOVD	$0, R5
-	MOVD	trap+0(FP), R8	// syscall entry
-	SVC
-	CMN	$4095, R0
-	BCC	ok
-	MOVD	$-1, R4
-	MOVD	R4, r1+32(FP)	// r1
-	MOVD	ZR, r2+40(FP)	// r2
-	NEG	R0, R0
-	MOVD	R0, err+48(FP)	// errno
-	RET
-ok:
-	MOVD	R0, r1+32(FP)	// r1
-	MOVD	R1, r2+40(FP)	// r2
-	MOVD	ZR, err+48(FP)	// errno
-	RET
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
-	MOVD	a1+8(FP), R0
-	MOVD	a2+16(FP), R1
-	MOVD	a3+24(FP), R2
-	MOVD	a4+32(FP), R3
-	MOVD	a5+40(FP), R4
-	MOVD	a6+48(FP), R5
-	MOVD	trap+0(FP), R8	// syscall entry
-	SVC
-	CMN	$4095, R0
-	BCC	ok
-	MOVD	$-1, R4
-	MOVD	R4, r1+56(FP)	// r1
-	MOVD	ZR, r2+64(FP)	// r2
-	NEG	R0, R0
-	MOVD	R0, err+72(FP)	// errno
-	RET
-ok:
-	MOVD	R0, r1+56(FP)	// r1
-	MOVD	R1, r2+64(FP)	// r2
-	MOVD	ZR, err+72(FP)	// errno
-	RET
diff --git a/src/syscall/asm_linux_ppc64x.s b/src/syscall/asm_linux_ppc64x.s
deleted file mode 100644
index be6727c..0000000
--- a/src/syscall/asm_linux_ppc64x.s
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-// +build ppc64 ppc64le
-
-#include "textflag.h"
-
-//
-// System calls for ppc64, Linux
-//
-
-// func Syscall(trap int64, a1, a2, a3 int64) (r1, r2, err int64);
-
-TEXT	·Syscall(SB),NOSPLIT,$0-56
-	BL	runtime·entersyscall(SB)
-	MOVD	a1+8(FP), R3
-	MOVD	a2+16(FP), R4
-	MOVD	a3+24(FP), R5
-	MOVD	R0, R6
-	MOVD	R0, R7
-	MOVD	R0, R8
-	MOVD	trap+0(FP), R9	// syscall entry
-	SYSCALL R9
-	BVC	ok
-	MOVD	$-1, R4
-	MOVD	R4, r1+32(FP)	// r1
-	MOVD	R0, r2+40(FP)	// r2
-	MOVD	R3, err+48(FP)	// errno
-	BL	runtime·exitsyscall(SB)
-	RET
-ok:
-	MOVD	R3, r1+32(FP)	// r1
-	MOVD	R4, r2+40(FP)	// r2
-	MOVD	R0, err+48(FP)	// errno
-	BL	runtime·exitsyscall(SB)
-	RET
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
-	BL	runtime·entersyscall(SB)
-	MOVD	a1+8(FP), R3
-	MOVD	a2+16(FP), R4
-	MOVD	a3+24(FP), R5
-	MOVD	a4+32(FP), R6
-	MOVD	a5+40(FP), R7
-	MOVD	a6+48(FP), R8
-	MOVD	trap+0(FP), R9	// syscall entry
-	SYSCALL R9
-	BVC	ok6
-	MOVD	$-1, R4
-	MOVD	R4, r1+56(FP)	// r1
-	MOVD	R0, r2+64(FP)	// r2
-	MOVD	R3, err+72(FP)	// errno
-	BL	runtime·exitsyscall(SB)
-	RET
-ok6:
-	MOVD	R3, r1+56(FP)	// r1
-	MOVD	R4, r2+64(FP)	// r2
-	MOVD	R0, err+72(FP)	// errno
-	BL	runtime·exitsyscall(SB)
-	RET
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
-	MOVD	a1+8(FP), R3
-	MOVD	a2+16(FP), R4
-	MOVD	a3+24(FP), R5
-	MOVD	R0, R6
-	MOVD	R0, R7
-	MOVD	R0, R8
-	MOVD	trap+0(FP), R9	// syscall entry
-	SYSCALL R9
-	BVC	ok1
-	MOVD	$-1, R4
-	MOVD	R4, r1+32(FP)	// r1
-	MOVD	R0, r2+40(FP)	// r2
-	MOVD	R3, err+48(FP)	// errno
-	RET
-ok1:
-	MOVD	R3, r1+32(FP)	// r1
-	MOVD	R4, r2+40(FP)	// r2
-	MOVD	R0, err+48(FP)	// errno
-	RET
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
-	MOVD	a1+8(FP), R3
-	MOVD	a2+16(FP), R4
-	MOVD	a3+24(FP), R5
-	MOVD	a4+32(FP), R6
-	MOVD	a5+40(FP), R7
-	MOVD	a6+48(FP), R8
-	MOVD	trap+0(FP), R9	// syscall entry
-	SYSCALL R9
-	BVC	ok2
-	MOVD	$-1, R4
-	MOVD	R4, r1+56(FP)	// r1
-	MOVD	R0, r2+64(FP)	// r2
-	MOVD	R3, err+72(FP)	// errno
-	RET
-ok2:
-	MOVD	R3, r1+56(FP)	// r1
-	MOVD	R4, r2+64(FP)	// r2
-	MOVD	R0, err+72(FP)	// errno
-	RET
diff --git a/src/syscall/asm_openbsd_arm.s b/src/syscall/asm_openbsd_arm.s
deleted file mode 100644
index 4f034a0..0000000
--- a/src/syscall/asm_openbsd_arm.s
+++ /dev/null
@@ -1,132 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-#include "funcdata.h"
-
-//
-// System call support for ARM, OpenBSD
-//
-
-// func Syscall(trap int32, a1, a2, a3 int32) (r1, r2, err int32);
-// func Syscall6(trap int32, a1, a2, a3, a4, a5, a6 int32) (r1, r2, err int32);
-// func Syscall9(trap int32, a1, a2, a3, a4, a5, a6, a7, a8, a9 int64) (r1, r2, err int32)
-// func RawSyscall(trap int32, a1, a2, a3 int32) (r1, r2, err int32);
-// func RawSyscall6(trap int32, a1, a2, a3, a4, a5, a6 int32) (r1, r2, err int32);
-
-TEXT	·Syscall(SB),NOSPLIT,$0-28
-	BL runtime·entersyscall(SB)
-	MOVW syscall+0(FP), R12		// syscall number
-	MOVW a1+4(FP), R0		// arg 1
-	MOVW a2+8(FP), R1		// arg 2
-	MOVW a3+12(FP), R2		// arg 3
-	SWI $0
-	MOVW $0, R2
-	BCS error
-	MOVW R0, r1+16(FP)		// ret 1
-	MOVW R1, r2+20(FP)		// ret 2
-	MOVW R2, err+24(FP)		// err
-	BL runtime·exitsyscall(SB)
-	RET
-error:
-	MOVW $-1, R3
-	MOVW R3, r1+16(FP)		// ret 1
-	MOVW R2, r2+20(FP)		// ret 2
-	MOVW R0, err+24(FP)		// err
-	BL runtime·exitsyscall(SB)
-	RET
-
-TEXT	·Syscall6(SB),NOSPLIT,$0-40
-	BL runtime·entersyscall(SB)
-	MOVW syscall+0(FP), R12		// syscall number
-	MOVW a1+4(FP), R0		// arg 1
-	MOVW a2+8(FP), R1		// arg 2
-	MOVW a3+12(FP), R2		// arg 3
-	MOVW a4+16(FP), R3		// arg 4
-	MOVW R13, R4
-	MOVW $a5+20(FP), R13		// arg 5 to arg 6 are passed on stack
-	SWI $0
-	MOVW R4, R13
-	MOVW $0, R2
-	BCS error6
-	MOVW R0, r1+28(FP)		// ret 1
-	MOVW R1, r2+32(FP)		// ret 2
-	MOVW R2, err+36(FP)		// err
-	BL runtime·exitsyscall(SB)
-	RET
-error6:
-	MOVW $-1, R3
-	MOVW R3, r1+28(FP)		// ret 1
-	MOVW R2, r2+32(FP)		// ret 2
-	MOVW R0, err+36(FP)		// err
-	BL runtime·exitsyscall(SB)
-	RET
-
-TEXT	·Syscall9(SB),NOSPLIT,$0-52
-	BL runtime·entersyscall(SB)
-	MOVW syscall+0(FP), R12		// syscall number
-	MOVW a1+4(FP), R0		// arg 1
-	MOVW a2+8(FP), R1		// arg 2
-	MOVW a3+12(FP), R2		// arg 3
-	MOVW a4+16(FP), R3		// arg 4
-	MOVW R13, R4
-	MOVW $a5+20(FP), R13		// arg 5 to arg 9 are passed on stack
-	SWI $0
-	MOVW R4, R13
-	MOVW $0, R2
-	BCS error9
-	MOVW R0, r1+40(FP)		// ret 1
-	MOVW R1, r2+44(FP)		// ret 2
-	MOVW R2, err+48(FP)		// err
-	BL runtime·exitsyscall(SB)
-	RET
-error9:
-	MOVW $-1, R3
-	MOVW R3, r1+40(FP)		// ret 1
-	MOVW R2, r2+44(FP)		// ret 2
-	MOVW R0, err+48(FP)		// err
-	BL runtime·exitsyscall(SB)
-	RET
-
-TEXT	·RawSyscall(SB),NOSPLIT,$0-28
-	MOVW syscall+0(FP), R12		// syscall number
-	MOVW a1+4(FP), R0		// arg 1
-	MOVW a2+8(FP), R1		// arg 2
-	MOVW a3+12(FP), R2		// arg 3
-	SWI $0
-	MOVW $0, R2
-	BCS errorr
-	MOVW R0, r1+16(FP)		// ret 1
-	MOVW R1, r2+20(FP)		// ret 2
-	MOVW R2, err+24(FP)		// err
-	RET
-errorr:
-	MOVW $-1, R3
-	MOVW R3, r1+16(FP)		// ret 1
-	MOVW R2, r2+20(FP)		// ret 2
-	MOVW R0, err+24(FP)		// err
-	RET
-
-TEXT	·RawSyscall6(SB),NOSPLIT,$0-40
-	MOVW syscall+0(FP), R12		// syscall number
-	MOVW a1+4(FP), R0		// arg 1
-	MOVW a2+8(FP), R1		// arg 2
-	MOVW a3+12(FP), R2		// arg 3
-	MOVW a4+16(FP), R3		// arg 4
-	MOVW R13, R4
-	MOVW $a5+20(FP), R13		// arg 5 to arg 6 are passed on stack
-	SWI $0
-	MOVW R4, R13
-	MOVW $0, R2
-	BCS errorr6
-	MOVW R0, r1+28(FP)		// ret 1
-	MOVW R1, r2+32(FP)		// ret 2
-	MOVW R2, err+36(FP)		// err
-	RET
-errorr6:
-	MOVW $-1, R3
-	MOVW R3, r1+28(FP)		// ret 1
-	MOVW R2, r2+32(FP)		// ret 2
-	MOVW R0, err+36(FP)		// err
-	RET
diff --git a/src/syscall/const_plan9.go b/src/syscall/const_plan9.go
deleted file mode 100644
index ba26f12..0000000
--- a/src/syscall/const_plan9.go
+++ /dev/null
@@ -1,59 +0,0 @@
-package syscall
-
-// Plan 9 Constants
-
-// Open modes
-const (
-	O_RDONLY  = 0
-	O_WRONLY  = 1
-	O_RDWR    = 2
-	O_TRUNC   = 16
-	O_CLOEXEC = 32
-	O_EXCL    = 0x1000
-)
-
-// Rfork flags
-const (
-	RFNAMEG  = 1 << 0
-	RFENVG   = 1 << 1
-	RFFDG    = 1 << 2
-	RFNOTEG  = 1 << 3
-	RFPROC   = 1 << 4
-	RFMEM    = 1 << 5
-	RFNOWAIT = 1 << 6
-	RFCNAMEG = 1 << 10
-	RFCENVG  = 1 << 11
-	RFCFDG   = 1 << 12
-	RFREND   = 1 << 13
-	RFNOMNT  = 1 << 14
-)
-
-// Qid.Type bits
-const (
-	QTDIR    = 0x80
-	QTAPPEND = 0x40
-	QTEXCL   = 0x20
-	QTMOUNT  = 0x10
-	QTAUTH   = 0x08
-	QTTMP    = 0x04
-	QTFILE   = 0x00
-)
-
-// Dir.Mode bits
-const (
-	DMDIR    = 0x80000000
-	DMAPPEND = 0x40000000
-	DMEXCL   = 0x20000000
-	DMMOUNT  = 0x10000000
-	DMAUTH   = 0x08000000
-	DMTMP    = 0x04000000
-	DMREAD   = 0x4
-	DMWRITE  = 0x2
-	DMEXEC   = 0x1
-)
-
-const (
-	STATMAX    = 65535
-	ERRMAX     = 128
-	STATFIXLEN = 49
-)
diff --git a/src/syscall/errors_plan9.go b/src/syscall/errors_plan9.go
deleted file mode 100644
index ede3d6a..0000000
--- a/src/syscall/errors_plan9.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2011 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
-
-// Constants
-const (
-	// Invented values to support what package os expects.
-	O_CREAT    = 0x02000
-	O_APPEND   = 0x00400
-	O_NOCTTY   = 0x00000
-	O_NONBLOCK = 0x00000
-	O_SYNC     = 0x00000
-	O_ASYNC    = 0x00000
-
-	S_IFMT   = 0x1f000
-	S_IFIFO  = 0x1000
-	S_IFCHR  = 0x2000
-	S_IFDIR  = 0x4000
-	S_IFBLK  = 0x6000
-	S_IFREG  = 0x8000
-	S_IFLNK  = 0xa000
-	S_IFSOCK = 0xc000
-)
-
-// Errors
-var (
-	EINVAL       = NewError("bad arg in system call")
-	ENOTDIR      = NewError("not a directory")
-	EISDIR       = NewError("file is a directory")
-	ENOENT       = NewError("file does not exist")
-	EEXIST       = NewError("file already exists")
-	EMFILE       = NewError("no free file descriptors")
-	EIO          = NewError("i/o error")
-	ENAMETOOLONG = NewError("file name too long")
-	EINTR        = NewError("interrupted")
-	EPERM        = NewError("permission denied")
-	EBUSY        = NewError("no free devices")
-	ETIMEDOUT    = NewError("connection timed out")
-	EPLAN9       = NewError("not supported by plan 9")
-
-	// The following errors do not correspond to any
-	// Plan 9 system messages. Invented to support
-	// what package os and others expect.
-	EACCES       = NewError("access permission denied")
-	EAFNOSUPPORT = NewError("address family not supported by protocol")
-)
diff --git a/src/syscall/exec_linux_test.go b/src/syscall/exec_linux_test.go
deleted file mode 100644
index 60d2734..0000000
--- a/src/syscall/exec_linux_test.go
+++ /dev/null
@@ -1,111 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-
-package syscall_test
-
-import (
-	"io/ioutil"
-	"os"
-	"os/exec"
-	"regexp"
-	"strconv"
-	"strings"
-	"syscall"
-	"testing"
-)
-
-func whoamiCmd(t *testing.T, uid, gid int, setgroups bool) *exec.Cmd {
-	if _, err := os.Stat("/proc/self/ns/user"); err != nil {
-		if os.IsNotExist(err) {
-			t.Skip("kernel doesn't support user namespaces")
-		}
-		t.Fatalf("Failed to stat /proc/self/ns/user: %v", err)
-	}
-	cmd := exec.Command("whoami")
-	cmd.SysProcAttr = &syscall.SysProcAttr{
-		Cloneflags: syscall.CLONE_NEWUSER,
-		UidMappings: []syscall.SysProcIDMap{
-			{ContainerID: 0, HostID: uid, Size: 1},
-		},
-		GidMappings: []syscall.SysProcIDMap{
-			{ContainerID: 0, HostID: gid, Size: 1},
-		},
-		GidMappingsEnableSetgroups: setgroups,
-	}
-	return cmd
-}
-
-func testNEWUSERRemap(t *testing.T, uid, gid int, setgroups bool) {
-	cmd := whoamiCmd(t, uid, gid, setgroups)
-	out, err := cmd.CombinedOutput()
-	if err != nil {
-		// On some systems, there is a sysctl setting.
-		if os.IsPermission(err) && os.Getuid() != 0 {
-			data, errRead := ioutil.ReadFile("/proc/sys/kernel/unprivileged_userns_clone")
-			if errRead == nil && data[0] == '0' {
-				t.Skip("kernel prohibits user namespace in unprivileged process")
-			}
-		}
-
-		t.Fatalf("Cmd failed with err %v, output: %s", err, out)
-	}
-	sout := strings.TrimSpace(string(out))
-	want := "root"
-	if sout != want {
-		t.Fatalf("whoami = %q; want %q", out, want)
-	}
-}
-
-func TestCloneNEWUSERAndRemapRootDisableSetgroups(t *testing.T) {
-	if os.Getuid() != 0 {
-		t.Skip("skipping root only test")
-	}
-	testNEWUSERRemap(t, 0, 0, false)
-}
-
-func TestCloneNEWUSERAndRemapRootEnableSetgroups(t *testing.T) {
-	if os.Getuid() != 0 {
-		t.Skip("skipping root only test")
-	}
-	testNEWUSERRemap(t, 0, 0, false)
-}
-
-// kernelVersion returns the major and minor versions of the Linux
-// kernel version.  It calls t.Skip if it can't figure it out.
-func kernelVersion(t *testing.T) (int, int) {
-	bytes, err := ioutil.ReadFile("/proc/version")
-	if err != nil {
-		t.Skipf("can't get kernel version: %v", err)
-	}
-	matches := regexp.MustCompile("([0-9]+).([0-9]+)").FindSubmatch(bytes)
-	if len(matches) < 3 {
-		t.Skipf("can't get kernel version from %s", bytes)
-	}
-	major, _ := strconv.Atoi(string(matches[1]))
-	minor, _ := strconv.Atoi(string(matches[2]))
-	return major, minor
-}
-
-func TestCloneNEWUSERAndRemapNoRootDisableSetgroups(t *testing.T) {
-	if os.Getuid() == 0 {
-		t.Skip("skipping unprivileged user only test")
-	}
-	testNEWUSERRemap(t, os.Getuid(), os.Getgid(), false)
-}
-
-func TestCloneNEWUSERAndRemapNoRootSetgroupsEnableSetgroups(t *testing.T) {
-	if os.Getuid() == 0 {
-		t.Skip("skipping unprivileged user only test")
-	}
-	cmd := whoamiCmd(t, os.Getuid(), os.Getgid(), true)
-	err := cmd.Run()
-	if err == nil {
-		t.Skip("probably old kernel without security fix")
-	}
-	if !os.IsPermission(err) {
-		t.Fatalf("Unprivileged gid_map rewriting with GidMappingsEnableSetgroups must fail")
-	}
-}
diff --git a/src/syscall/exec_solaris_test.go b/src/syscall/exec_solaris_test.go
deleted file mode 100644
index 6b8f1ad..0000000
--- a/src/syscall/exec_solaris_test.go
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build solaris
-
-package syscall
-
-import "unsafe"
-
-//go:cgo_import_dynamic libc_Getpgid getpgid "libc.so"
-//go:cgo_import_dynamic libc_Getpgrp getpgrp "libc.so"
-
-//go:linkname libc_Getpgid libc_Getpgid
-//go:linkname libc_Getpgrp libc_Getpgrp
-
-var (
-	libc_Getpgid,
-	libc_Getpgrp libcFunc
-)
-
-func Getpgid(pid int) (pgid int, err error) {
-	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Getpgid)), 1, uintptr(pid), 0, 0, 0, 0, 0)
-	pgid = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-func Getpgrp() (pgrp int) {
-	r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&libc_Getpgrp)), 0, 0, 0, 0, 0, 0, 0)
-	pgrp = int(r0)
-	return
-}
-
-var Ioctl = ioctl
diff --git a/src/syscall/exec_unix_test.go b/src/syscall/exec_unix_test.go
deleted file mode 100644
index 9bb95c0..0000000
--- a/src/syscall/exec_unix_test.go
+++ /dev/null
@@ -1,215 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package syscall_test
-
-import (
-	"internal/testenv"
-	"io"
-	"os"
-	"os/exec"
-	"os/signal"
-	"syscall"
-	"testing"
-	"unsafe"
-)
-
-type command struct {
-	pipe io.WriteCloser
-	proc *exec.Cmd
-	test *testing.T
-}
-
-func (c *command) Info() (pid, pgrp int) {
-	pid = c.proc.Process.Pid
-
-	pgrp, err := syscall.Getpgid(pid)
-	if err != nil {
-		c.test.Fatal(err)
-	}
-
-	return
-}
-
-func (c *command) Start() {
-	if err := c.proc.Start(); err != nil {
-		c.test.Fatal(err)
-	}
-}
-
-func (c *command) Stop() {
-	c.pipe.Close()
-	if err := c.proc.Wait(); err != nil {
-		c.test.Fatal(err)
-	}
-}
-
-func create(t *testing.T) *command {
-	testenv.MustHaveExec(t)
-
-	proc := exec.Command("cat")
-	stdin, err := proc.StdinPipe()
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	return &command{stdin, proc, t}
-}
-
-func parent() (pid, pgrp int) {
-	return syscall.Getpid(), syscall.Getpgrp()
-}
-
-func TestZeroSysProcAttr(t *testing.T) {
-	ppid, ppgrp := parent()
-
-	cmd := create(t)
-
-	cmd.Start()
-	defer cmd.Stop()
-
-	cpid, cpgrp := cmd.Info()
-
-	if cpid == ppid {
-		t.Fatalf("Parent and child have the same process ID")
-	}
-
-	if cpgrp != ppgrp {
-		t.Fatalf("Child is not in parent's process group")
-	}
-}
-
-func TestSetpgid(t *testing.T) {
-	ppid, ppgrp := parent()
-
-	cmd := create(t)
-
-	cmd.proc.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
-	cmd.Start()
-	defer cmd.Stop()
-
-	cpid, cpgrp := cmd.Info()
-
-	if cpid == ppid {
-		t.Fatalf("Parent and child have the same process ID")
-	}
-
-	if cpgrp == ppgrp {
-		t.Fatalf("Parent and child are in the same process group")
-	}
-
-	if cpid != cpgrp {
-		t.Fatalf("Child's process group is not the child's process ID")
-	}
-}
-
-func TestPgid(t *testing.T) {
-	ppid, ppgrp := parent()
-
-	cmd1 := create(t)
-
-	cmd1.proc.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
-	cmd1.Start()
-	defer cmd1.Stop()
-
-	cpid1, cpgrp1 := cmd1.Info()
-
-	if cpid1 == ppid {
-		t.Fatalf("Parent and child 1 have the same process ID")
-	}
-
-	if cpgrp1 == ppgrp {
-		t.Fatalf("Parent and child 1 are in the same process group")
-	}
-
-	if cpid1 != cpgrp1 {
-		t.Fatalf("Child 1's process group is not its process ID")
-	}
-
-	cmd2 := create(t)
-
-	cmd2.proc.SysProcAttr = &syscall.SysProcAttr{
-		Setpgid: true,
-		Pgid:    cpgrp1,
-	}
-	cmd2.Start()
-	defer cmd2.Stop()
-
-	cpid2, cpgrp2 := cmd2.Info()
-
-	if cpid2 == ppid {
-		t.Fatalf("Parent and child 2 have the same process ID")
-	}
-
-	if cpgrp2 == ppgrp {
-		t.Fatalf("Parent and child 2 are in the same process group")
-	}
-
-	if cpid2 == cpgrp2 {
-		t.Fatalf("Child 2's process group is its process ID")
-	}
-
-	if cpid1 == cpid2 {
-		t.Fatalf("Child 1 and 2 have the same process ID")
-	}
-
-	if cpgrp1 != cpgrp2 {
-		t.Fatalf("Child 1 and 2 are not in the same process group")
-	}
-}
-
-func TestForeground(t *testing.T) {
-	signal.Ignore(syscall.SIGTTIN, syscall.SIGTTOU)
-
-	tty, err := os.OpenFile("/dev/tty", os.O_RDWR, 0)
-	if err != nil {
-		t.Skipf("Can't test Foreground. Couldn't open /dev/tty: %s", err)
-	}
-
-	fpgrp := 0
-
-	errno := syscall.Ioctl(tty.Fd(), syscall.TIOCGPGRP, uintptr(unsafe.Pointer(&fpgrp)))
-	if errno != 0 {
-		t.Fatalf("TIOCGPGRP failed with error code: %s", errno)
-	}
-
-	if fpgrp == 0 {
-		t.Fatalf("Foreground process group is zero")
-	}
-
-	ppid, ppgrp := parent()
-
-	cmd := create(t)
-
-	cmd.proc.SysProcAttr = &syscall.SysProcAttr{
-		Ctty:       int(tty.Fd()),
-		Foreground: true,
-	}
-	cmd.Start()
-
-	cpid, cpgrp := cmd.Info()
-
-	if cpid == ppid {
-		t.Fatalf("Parent and child have the same process ID")
-	}
-
-	if cpgrp == ppgrp {
-		t.Fatalf("Parent and child are in the same process group")
-	}
-
-	if cpid != cpgrp {
-		t.Fatalf("Child's process group is not the child's process ID")
-	}
-
-	cmd.Stop()
-
-	errno = syscall.Ioctl(tty.Fd(), syscall.TIOCSPGRP, uintptr(unsafe.Pointer(&fpgrp)))
-	if errno != 0 {
-		t.Fatalf("TIOCSPGRP failed with error code: %s", errno)
-	}
-
-	signal.Reset()
-}
diff --git a/src/syscall/export_unix_test.go b/src/syscall/export_unix_test.go
deleted file mode 100644
index b41fe2f..0000000
--- a/src/syscall/export_unix_test.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd
-
-package syscall
-
-func Ioctl(fd, req, arg uintptr) (err Errno) {
-	_, _, err = Syscall(SYS_IOCTL, fd, req, arg)
-	return err
-}
diff --git a/src/syscall/pwd_plan9.go b/src/syscall/pwd_plan9.go
deleted file mode 100644
index 1248613..0000000
--- a/src/syscall/pwd_plan9.go
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// The working directory in Plan 9 is effectively per P, so different
-// goroutines and even the same goroutine as it's rescheduled on
-// different Ps can see different working directories.
-//
-// Instead, track a Go process-wide intent of the current working directory,
-// and switch to it at important points.
-
-package syscall
-
-import "sync"
-
-var (
-	wdmu  sync.Mutex // guards following
-	wdSet bool
-	wdStr string
-)
-
-func Fixwd() {
-	wdmu.Lock()
-	defer wdmu.Unlock()
-	fixwdLocked()
-}
-
-func fixwdLocked() {
-	if !wdSet {
-		return
-	}
-	// always call chdir when getwd returns an error
-	wd, _ := getwd()
-	if wd == wdStr {
-		return
-	}
-	if err := chdir(wdStr); err != nil {
-		return
-	}
-}
-
-// goroutine-specific getwd
-func getwd() (wd string, err error) {
-	fd, err := open(".", O_RDONLY)
-	if err != nil {
-		return "", err
-	}
-	defer Close(fd)
-	return Fd2path(fd)
-}
-
-func Getwd() (wd string, err error) {
-	wdmu.Lock()
-	defer wdmu.Unlock()
-
-	if wdSet {
-		return wdStr, nil
-	}
-	wd, err = getwd()
-	if err != nil {
-		return
-	}
-	wdSet = true
-	wdStr = wd
-	return wd, nil
-}
-
-func Chdir(path string) error {
-	wdmu.Lock()
-	defer wdmu.Unlock()
-
-	if err := chdir(path); err != nil {
-		return err
-	}
-
-	wd, err := getwd()
-	if err != nil {
-		return err
-	}
-	wdSet = true
-	wdStr = wd
-	return nil
-}
diff --git a/src/syscall/route_bsd_test.go b/src/syscall/route_bsd_test.go
deleted file mode 100644
index 8617663..0000000
--- a/src/syscall/route_bsd_test.go
+++ /dev/null
@@ -1,225 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-package syscall_test
-
-import (
-	"fmt"
-	"net"
-	"os"
-	"syscall"
-	"testing"
-	"time"
-)
-
-func TestRouteRIB(t *testing.T) {
-	for _, facility := range []int{syscall.NET_RT_DUMP, syscall.NET_RT_IFLIST} {
-		for _, param := range []int{syscall.AF_UNSPEC, syscall.AF_INET, syscall.AF_INET6} {
-			var err error
-			var b []byte
-			// The VM allocator wrapper functions can
-			// return ENOMEM easily.
-			for i := 0; i < 3; i++ {
-				b, err = syscall.RouteRIB(facility, param)
-				if err != nil {
-					time.Sleep(5 * time.Millisecond)
-					continue
-				}
-				break
-			}
-			if err != nil {
-				t.Error(facility, param, err)
-				continue
-			}
-			msgs, err := syscall.ParseRoutingMessage(b)
-			if err != nil {
-				t.Error(facility, param, err)
-				continue
-			}
-			var ipv4loopback, ipv6loopback bool
-			for _, m := range msgs {
-				flags, err := parseRoutingMessageHeader(m)
-				if err != nil {
-					t.Error(err)
-					continue
-				}
-				sas, err := parseRoutingSockaddrs(m)
-				if err != nil {
-					t.Error(err)
-					continue
-				}
-				if flags&(syscall.RTA_DST|syscall.RTA_IFA) != 0 {
-					sa := sas[syscall.RTAX_DST]
-					if sa == nil {
-						sa = sas[syscall.RTAX_IFA]
-					}
-					switch sa := sa.(type) {
-					case *syscall.SockaddrInet4:
-						if net.IP(sa.Addr[:]).IsLoopback() {
-							ipv4loopback = true
-						}
-					case *syscall.SockaddrInet6:
-						if net.IP(sa.Addr[:]).IsLoopback() {
-							ipv6loopback = true
-						}
-					}
-				}
-				t.Log(facility, param, flags, sockaddrs(sas))
-			}
-			if param == syscall.AF_UNSPEC && len(msgs) > 0 && !ipv4loopback && !ipv6loopback {
-				t.Errorf("no loopback facility found: ipv4/ipv6=%v/%v, %v", ipv4loopback, ipv6loopback, len(msgs))
-				continue
-			}
-		}
-	}
-}
-
-func TestRouteMonitor(t *testing.T) {
-	if testing.Short() || os.Getuid() != 0 {
-		t.Skip("must be root")
-	}
-
-	s, err := syscall.Socket(syscall.AF_ROUTE, syscall.SOCK_RAW, syscall.AF_UNSPEC)
-	if err != nil {
-		t.Fatal(err)
-	}
-	defer syscall.Close(s)
-
-	tmo := time.After(30 * time.Second)
-	go func() {
-		b := make([]byte, os.Getpagesize())
-		for {
-			n, err := syscall.Read(s, b)
-			if err != nil {
-				return
-			}
-			msgs, err := syscall.ParseRoutingMessage(b[:n])
-			if err != nil {
-				t.Error(err)
-				return
-			}
-			for _, m := range msgs {
-				flags, err := parseRoutingMessageHeader(m)
-				if err != nil {
-					t.Error(err)
-					continue
-				}
-				sas, err := parseRoutingSockaddrs(m)
-				if err != nil {
-					t.Error(err)
-					continue
-				}
-				t.Log(flags, sockaddrs(sas))
-			}
-		}
-	}()
-	<-tmo
-}
-
-type addrFamily byte
-
-func (f addrFamily) String() string {
-	switch f {
-	case syscall.AF_UNSPEC:
-		return "unspec"
-	case syscall.AF_LINK:
-		return "link"
-	case syscall.AF_INET:
-		return "inet4"
-	case syscall.AF_INET6:
-		return "inet6"
-	default:
-		return fmt.Sprintf("unknown %d", f)
-	}
-}
-
-type addrFlags uint32
-
-var addrFlagNames = [...]string{
-	"dst",
-	"gateway",
-	"netmask",
-	"genmask",
-	"ifp",
-	"ifa",
-	"author",
-	"brd",
-	"mpls1,tag,src", // sockaddr_mpls=dragonfly,netbsd, sockaddr_in/in6=openbsd
-	"mpls2,srcmask", // sockaddr_mpls=dragonfly, sockaddr_in/in6=openbsd
-	"mpls3,label",   // sockaddr_mpls=dragonfly, sockaddr_rtlabel=openbsd
-}
-
-func (f addrFlags) String() string {
-	var s string
-	for i, name := range addrFlagNames {
-		if f&(1<<uint(i)) != 0 {
-			if s != "" {
-				s += "|"
-			}
-			s += name
-		}
-	}
-	if s == "" {
-		return "<nil>"
-	}
-	return s
-}
-
-type sockaddrs []syscall.Sockaddr
-
-func (sas sockaddrs) String() string {
-	var s string
-	for _, sa := range sas {
-		if sa == nil {
-			continue
-		}
-		if len(s) > 0 {
-			s += " "
-		}
-		switch sa := sa.(type) {
-		case *syscall.SockaddrDatalink:
-			s += fmt.Sprintf("[%v/%v/%v t/n/a/s=%v/%v/%v/%v]", sa.Len, addrFamily(sa.Family), sa.Index, sa.Type, sa.Nlen, sa.Alen, sa.Slen)
-		case *syscall.SockaddrInet4:
-			s += fmt.Sprintf("%v", net.IP(sa.Addr[:]).To4())
-		case *syscall.SockaddrInet6:
-			s += fmt.Sprintf("%v", net.IP(sa.Addr[:]).To16())
-		}
-	}
-	if s == "" {
-		return "<nil>"
-	}
-	return s
-}
-
-func (sas sockaddrs) match(flags addrFlags) error {
-	var f addrFlags
-	family := syscall.AF_UNSPEC
-	for i := range sas {
-		if sas[i] != nil {
-			f |= 1 << uint(i)
-		}
-		switch sas[i].(type) {
-		case *syscall.SockaddrInet4:
-			if family == syscall.AF_UNSPEC {
-				family = syscall.AF_INET
-			}
-			if family != syscall.AF_INET {
-				return fmt.Errorf("got %v; want %v", sockaddrs(sas), family)
-			}
-		case *syscall.SockaddrInet6:
-			if family == syscall.AF_UNSPEC {
-				family = syscall.AF_INET6
-			}
-			if family != syscall.AF_INET6 {
-				return fmt.Errorf("got %v; want %v", sockaddrs(sas), family)
-			}
-		}
-	}
-	if f != flags {
-		return fmt.Errorf("got %v; want %v", f, flags)
-	}
-	return nil
-}
diff --git a/src/syscall/route_ifma_test.go b/src/syscall/route_ifma_test.go
deleted file mode 100644
index af2b67d..0000000
--- a/src/syscall/route_ifma_test.go
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd
-
-package syscall_test
-
-import (
-	"fmt"
-	"syscall"
-)
-
-func parseRoutingMessageHeader(m syscall.RoutingMessage) (addrFlags, error) {
-	switch m := m.(type) {
-	case *syscall.RouteMessage:
-		errno := syscall.Errno(uintptr(m.Header.Errno))
-		if errno != 0 {
-			return 0, fmt.Errorf("%T: %v, %#v", m, errno, m.Header)
-		}
-		return addrFlags(m.Header.Addrs), nil
-	case *syscall.InterfaceMessage:
-		return addrFlags(m.Header.Addrs), nil
-	case *syscall.InterfaceAddrMessage:
-		return addrFlags(m.Header.Addrs), nil
-	case *syscall.InterfaceMulticastAddrMessage:
-		return addrFlags(m.Header.Addrs), nil
-	default:
-		panic(fmt.Sprintf("unknown routing message type: %T", m))
-	}
-}
-
-func parseRoutingSockaddrs(m syscall.RoutingMessage) ([]syscall.Sockaddr, error) {
-	switch m := m.(type) {
-	case *syscall.RouteMessage:
-		sas, err := syscall.ParseRoutingSockaddr(m)
-		if err != nil {
-			return nil, fmt.Errorf("%T: %v, %#v", m, err, m.Data)
-		}
-		if err = sockaddrs(sas).match(addrFlags(m.Header.Addrs)); err != nil {
-			return nil, err
-		}
-		return sas, nil
-	case *syscall.InterfaceMessage:
-		sas, err := syscall.ParseRoutingSockaddr(m)
-		if err != nil {
-			return nil, fmt.Errorf("%T: %v, %#v", m, err, m.Data)
-		}
-		if err = sockaddrs(sas).match(addrFlags(m.Header.Addrs)); err != nil {
-			return nil, err
-		}
-		return sas, nil
-	case *syscall.InterfaceAddrMessage:
-		sas, err := syscall.ParseRoutingSockaddr(m)
-		if err != nil {
-			return nil, fmt.Errorf("%T: %v, %#v", m, err, m.Data)
-		}
-		if err = sockaddrs(sas).match(addrFlags(m.Header.Addrs)); err != nil {
-			return nil, err
-		}
-		return sas, nil
-	case *syscall.InterfaceMulticastAddrMessage:
-		sas, err := syscall.ParseRoutingSockaddr(m)
-		if err != nil {
-			return nil, fmt.Errorf("%T: %v, %#v", m, err, m.Data)
-		}
-		if err = sockaddrs(sas).match(addrFlags(m.Header.Addrs)); err != nil {
-			return nil, err
-		}
-		return sas, nil
-	default:
-		panic(fmt.Sprintf("unknown routing message type: %T", m))
-	}
-}
diff --git a/src/syscall/route_noifma_test.go b/src/syscall/route_noifma_test.go
deleted file mode 100644
index 19d5d8e..0000000
--- a/src/syscall/route_noifma_test.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build netbsd openbsd
-
-package syscall_test
-
-import (
-	"fmt"
-	"syscall"
-)
-
-func parseRoutingMessageHeader(m syscall.RoutingMessage) (addrFlags, error) {
-	switch m := m.(type) {
-	case *syscall.RouteMessage:
-		errno := syscall.Errno(uintptr(m.Header.Errno))
-		if errno != 0 {
-			return 0, fmt.Errorf("%T: %v, %#v", m, errno, m.Header)
-		}
-		return addrFlags(m.Header.Addrs), nil
-	case *syscall.InterfaceMessage:
-		return addrFlags(m.Header.Addrs), nil
-	case *syscall.InterfaceAddrMessage:
-		return addrFlags(m.Header.Addrs), nil
-	default:
-		panic(fmt.Sprintf("unknown routing message type: %T", m))
-	}
-}
-
-func parseRoutingSockaddrs(m syscall.RoutingMessage) ([]syscall.Sockaddr, error) {
-	switch m := m.(type) {
-	case *syscall.RouteMessage:
-		sas, err := syscall.ParseRoutingSockaddr(m)
-		if err != nil {
-			return nil, fmt.Errorf("%T: %v, %#v", m, err, m.Data)
-		}
-		if err = sockaddrs(sas).match(addrFlags(m.Header.Addrs)); err != nil {
-			return nil, err
-		}
-		return sas, nil
-	case *syscall.InterfaceMessage:
-		sas, err := syscall.ParseRoutingSockaddr(m)
-		if err != nil {
-			return nil, fmt.Errorf("%T: %v, %#v", m, err, m.Data)
-		}
-		if err = sockaddrs(sas).match(addrFlags(m.Header.Addrs)); err != nil {
-			return nil, err
-		}
-		return sas, nil
-	case *syscall.InterfaceAddrMessage:
-		sas, err := syscall.ParseRoutingSockaddr(m)
-		if err != nil {
-			return nil, fmt.Errorf("%T: %v, %#v", m, err, m.Data)
-		}
-		if err = sockaddrs(sas).match(addrFlags(m.Header.Addrs)); err != nil {
-			return nil, err
-		}
-		return sas, nil
-	default:
-		panic(fmt.Sprintf("unknown routing message type: %T", m))
-	}
-}
diff --git a/src/syscall/syscall_darwin_arm.go b/src/syscall/syscall_darwin_arm.go
deleted file mode 100644
index 2a7d4f2..0000000
--- a/src/syscall/syscall_darwin_arm.go
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
-
-import "unsafe"
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = int32(nsec / 1e9)
-	ts.Nsec = int32(nsec % 1e9)
-	return
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Usec = int32(nsec % 1e9 / 1e3)
-	tv.Sec = int32(nsec / 1e9)
-	return
-}
-
-//sysnb	gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
-	// The tv passed to gettimeofday must be non-nil
-	// but is otherwise unused.  The answers come back
-	// in the two registers.
-	sec, usec, err := gettimeofday(tv)
-	tv.Sec = int32(sec)
-	tv.Usec = int32(usec)
-	return err
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
-	k.Ident = uint32(fd)
-	k.Filter = int16(mode)
-	k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
-	var length = uint64(count)
-
-	_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(*offset>>32), uintptr(unsafe.Pointer(&length)), 0, 0, 0, 0)
-
-	written = int(length)
-
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // sic
diff --git a/src/syscall/syscall_darwin_arm64.go b/src/syscall/syscall_darwin_arm64.go
deleted file mode 100644
index de7a08b..0000000
--- a/src/syscall/syscall_darwin_arm64.go
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
-
-import "unsafe"
-
-func Getpagesize() int { return 16384 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = nsec / 1e9
-	ts.Nsec = nsec % 1e9
-	return
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Usec = int32(nsec % 1e9 / 1e3)
-	tv.Sec = int64(nsec / 1e9)
-	return
-}
-
-//sysnb	gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
-	// The tv passed to gettimeofday must be non-nil
-	// but is otherwise unused.  The answers come back
-	// in the two registers.
-	sec, usec, err := gettimeofday(tv)
-	tv.Sec = sec
-	tv.Usec = usec
-	return err
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
-	k.Ident = uint64(fd)
-	k.Filter = int16(mode)
-	k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
-	var length = uint64(count)
-
-	_, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(unsafe.Pointer(&length)), 0, 0)
-
-	written = int(length)
-
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // sic
diff --git a/src/syscall/syscall_linux_arm64.go b/src/syscall/syscall_linux_arm64.go
deleted file mode 100644
index 3d55181..0000000
--- a/src/syscall/syscall_linux_arm64.go
+++ /dev/null
@@ -1,148 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
-
-const _SYS_dup = SYS_DUP3
-
-//sys	Fchown(fd int, uid int, gid int) (err error)
-//sys	Fstat(fd int, stat *Stat_t) (err error)
-//sys	Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
-//sys	Fstatfs(fd int, buf *Statfs_t) (err error)
-//sys	Ftruncate(fd int, length int64) (err error)
-//sysnb	Getegid() (egid int)
-//sysnb	Geteuid() (euid int)
-//sysnb	Getgid() (gid int)
-//sysnb	Getrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb	Getuid() (uid int)
-//sys	Listen(s int, n int) (err error)
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys	Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
-//sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS_PSELECT6
-//sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
-//sys	Setfsgid(gid int) (err error)
-//sys	Setfsuid(uid int) (err error)
-//sysnb	Setregid(rgid int, egid int) (err error)
-//sysnb	Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb	Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb	Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb	Setreuid(ruid int, euid int) (err error)
-//sys	Shutdown(fd int, how int) (err error)
-//sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
-
-func Stat(path string, stat *Stat_t) (err error) {
-	return Fstatat(_AT_FDCWD, path, stat, 0)
-}
-
-func Lchown(path string, uid int, gid int) (err error) {
-	return Fchownat(_AT_FDCWD, path, uid, gid, _AT_SYMLINK_NOFOLLOW)
-}
-
-func Lstat(path string, stat *Stat_t) (err error) {
-	return Fstatat(_AT_FDCWD, path, stat, _AT_SYMLINK_NOFOLLOW)
-}
-
-//sys	Statfs(path string, buf *Statfs_t) (err error)
-//sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error) = SYS_SYNC_FILE_RANGE2
-//sys	Truncate(path string, length int64) (err error)
-//sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
-//sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys	connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb	getgroups(n int, list *_Gid_t) (nn int, err error)
-//sysnb	setgroups(n int, list *_Gid_t) (err error)
-//sys	getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys	setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb	socket(domain int, typ int, proto int) (fd int, err error)
-//sysnb	socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
-//sysnb	getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb	getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys	recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys	sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sys	recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys	mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
-
-func Getpagesize() int { return 65536 }
-
-//sysnb	Gettimeofday(tv *Timeval) (err error)
-//sysnb	Time(t *Time_t) (tt Time_t, err error)
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = nsec / 1e9
-	ts.Nsec = nsec % 1e9
-	return
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Sec = nsec / 1e9
-	tv.Usec = nsec % 1e9 / 1e3
-	return
-}
-
-func Pipe(p []int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	var pp [2]_C_int
-	err = pipe2(&pp, 0)
-	p[0] = int(pp[0])
-	p[1] = int(pp[1])
-	return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	var pp [2]_C_int
-	err = pipe2(&pp, flags)
-	p[0] = int(pp[0])
-	p[1] = int(pp[1])
-	return
-}
-
-func (r *PtraceRegs) PC() uint64 { return r.Pc }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint64(length)
-}
-
-func InotifyInit() (fd int, err error) {
-	return InotifyInit1(0)
-}
-
-// TODO(dfc): constants that should be in zsysnum_linux_arm64.go, remove
-// these when the deprecated syscalls that the syscall package relies on
-// are removed.
-const (
-	SYS_GETPGRP      = 1060
-	SYS_UTIMES       = 1037
-	SYS_FUTIMESAT    = 1066
-	SYS_PAUSE        = 1061
-	SYS_USTAT        = 1070
-	SYS_UTIME        = 1063
-	SYS_LCHOWN       = 1032
-	SYS_TIME         = 1062
-	SYS_EPOLL_CREATE = 1042
-	SYS_EPOLL_WAIT   = 1069
-)
diff --git a/src/syscall/syscall_linux_ppc64x.go b/src/syscall/syscall_linux_ppc64x.go
deleted file mode 100644
index 10489d9..0000000
--- a/src/syscall/syscall_linux_ppc64x.go
+++ /dev/null
@@ -1,124 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-// +build ppc64 ppc64le
-
-package syscall
-
-const _SYS_dup = SYS_DUP2
-
-//sys	Dup2(oldfd int, newfd int) (err error)
-//sys	Fchown(fd int, uid int, gid int) (err error)
-//sys	Fstat(fd int, stat *Stat_t) (err error)
-//sys	Fstatfs(fd int, buf *Statfs_t) (err error)
-//sys	Ftruncate(fd int, length int64) (err error)
-//sysnb	Getegid() (egid int)
-//sysnb	Geteuid() (euid int)
-//sysnb	Getgid() (gid int)
-//sysnb	Getrlimit(resource int, rlim *Rlimit) (err error) = SYS_UGETRLIMIT
-//sysnb	Getuid() (uid int)
-//sysnb	InotifyInit() (fd int, err error)
-//sys	Ioperm(from int, num int, on int) (err error)
-//sys	Iopl(level int) (err error)
-//sys	Lchown(path string, uid int, gid int) (err error)
-//sys	Listen(s int, n int) (err error)
-//sys	Lstat(path string, stat *Stat_t) (err error)
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys	Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
-//sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
-//sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
-//sys	Setfsgid(gid int) (err error)
-//sys	Setfsuid(uid int) (err error)
-//sysnb	Setregid(rgid int, egid int) (err error)
-//sysnb	Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb	Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb	Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb	Setreuid(ruid int, euid int) (err error)
-//sys	Shutdown(fd int, how int) (err error)
-//sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
-//sys	Stat(path string, stat *Stat_t) (err error)
-//sys	Statfs(path string, buf *Statfs_t) (err error)
-//sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error) = SYS_SYNC_FILE_RANGE2
-//sys	Truncate(path string, length int64) (err error)
-//sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
-//sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys	connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb	getgroups(n int, list *_Gid_t) (nn int, err error)
-//sysnb	setgroups(n int, list *_Gid_t) (err error)
-//sys	getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys	setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb	socket(domain int, typ int, proto int) (fd int, err error)
-//sysnb	socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
-//sysnb	getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb	getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys	recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys	sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sys	recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys	mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
-
-func Getpagesize() int { return 65536 }
-
-//sysnb	Gettimeofday(tv *Timeval) (err error)
-//sysnb	Time(t *Time_t) (tt Time_t, err error)
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = nsec / 1e9
-	ts.Nsec = nsec % 1e9
-	return
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Sec = nsec / 1e9
-	tv.Usec = nsec % 1e9 / 1e3
-	return
-}
-
-func Pipe(p []int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	var pp [2]_C_int
-	err = pipe2(&pp, 0)
-	p[0] = int(pp[0])
-	p[1] = int(pp[1])
-	return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	var pp [2]_C_int
-	err = pipe2(&pp, flags)
-	p[0] = int(pp[0])
-	p[1] = int(pp[1])
-	return
-}
-
-func (r *PtraceRegs) PC() uint64 { return r.Nip }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Nip = pc }
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint64(length)
-}
diff --git a/src/syscall/syscall_linux_test.go b/src/syscall/syscall_linux_test.go
deleted file mode 100644
index 40fce6d..0000000
--- a/src/syscall/syscall_linux_test.go
+++ /dev/null
@@ -1,140 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall_test
-
-import (
-	"bufio"
-	"fmt"
-	"io"
-	"io/ioutil"
-	"os"
-	"os/exec"
-	"os/signal"
-	"path/filepath"
-	"syscall"
-	"testing"
-	"time"
-)
-
-func TestMain(m *testing.M) {
-	if os.Getenv("GO_DEATHSIG_PARENT") == "1" {
-		deathSignalParent()
-	} else if os.Getenv("GO_DEATHSIG_CHILD") == "1" {
-		deathSignalChild()
-	}
-
-	os.Exit(m.Run())
-}
-
-func TestLinuxDeathSignal(t *testing.T) {
-	if os.Getuid() != 0 {
-		t.Skip("skipping root only test")
-	}
-
-	// Copy the test binary to a location that a non-root user can read/execute
-	// after we drop privileges
-	tempDir, err := ioutil.TempDir("", "TestDeathSignal")
-	if err != nil {
-		t.Fatalf("cannot create temporary directory: %v", err)
-	}
-	defer os.RemoveAll(tempDir)
-	os.Chmod(tempDir, 0755)
-
-	tmpBinary := filepath.Join(tempDir, filepath.Base(os.Args[0]))
-
-	src, err := os.Open(os.Args[0])
-	if err != nil {
-		t.Fatalf("cannot open binary %q, %v", os.Args[0], err)
-	}
-	defer src.Close()
-
-	dst, err := os.OpenFile(tmpBinary, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0755)
-	if err != nil {
-		t.Fatalf("cannot create temporary binary %q, %v", tmpBinary, err)
-	}
-	if _, err := io.Copy(dst, src); err != nil {
-		t.Fatalf("failed to copy test binary to %q, %v", tmpBinary, err)
-	}
-	err = dst.Close()
-	if err != nil {
-		t.Fatalf("failed to close test binary %q, %v", tmpBinary, err)
-	}
-
-	cmd := exec.Command(tmpBinary)
-	cmd.Env = []string{"GO_DEATHSIG_PARENT=1"}
-	chldStdin, err := cmd.StdinPipe()
-	if err != nil {
-		t.Fatal("failed to create new stdin pipe: %v", err)
-	}
-	chldStdout, err := cmd.StdoutPipe()
-	if err != nil {
-		t.Fatal("failed to create new stdout pipe: %v", err)
-	}
-	cmd.Stderr = os.Stderr
-
-	err = cmd.Start()
-	defer cmd.Wait()
-	if err != nil {
-		t.Fatalf("failed to start first child process: %v", err)
-	}
-
-	chldPipe := bufio.NewReader(chldStdout)
-
-	if got, err := chldPipe.ReadString('\n'); got == "start\n" {
-		syscall.Kill(cmd.Process.Pid, syscall.SIGTERM)
-
-		go func() {
-			time.Sleep(5 * time.Second)
-			chldStdin.Close()
-		}()
-
-		want := "ok\n"
-		if got, err = chldPipe.ReadString('\n'); got != want {
-			t.Fatalf("expected %q, received %q, %v", want, got, err)
-		}
-	} else {
-		t.Fatalf("did not receive start from child, received %q, %v", got, err)
-	}
-}
-
-func deathSignalParent() {
-	cmd := exec.Command(os.Args[0])
-	cmd.Env = []string{"GO_DEATHSIG_CHILD=1"}
-	cmd.Stdin = os.Stdin
-	cmd.Stdout = os.Stdout
-	attrs := syscall.SysProcAttr{
-		Pdeathsig: syscall.SIGUSR1,
-		// UID/GID 99 is the user/group "nobody" on RHEL/Fedora and is
-		// unused on Ubuntu
-		Credential: &syscall.Credential{Uid: 99, Gid: 99},
-	}
-	cmd.SysProcAttr = &attrs
-
-	err := cmd.Start()
-	if err != nil {
-		fmt.Fprintf(os.Stderr, "death signal parent error: %v\n")
-		os.Exit(1)
-	}
-	cmd.Wait()
-	os.Exit(0)
-}
-
-func deathSignalChild() {
-	c := make(chan os.Signal, 1)
-	signal.Notify(c, syscall.SIGUSR1)
-	go func() {
-		<-c
-		fmt.Println("ok")
-		os.Exit(0)
-	}()
-	fmt.Println("start")
-
-	buf := make([]byte, 32)
-	os.Stdin.Read(buf)
-
-	// We expected to be signaled before stdin closed
-	fmt.Println("not ok")
-	os.Exit(1)
-}
diff --git a/src/syscall/syscall_openbsd_arm.go b/src/syscall/syscall_openbsd_arm.go
deleted file mode 100644
index ad5ae14..0000000
--- a/src/syscall/syscall_openbsd_arm.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = int64(nsec / 1e9)
-	ts.Nsec = int32(nsec % 1e9)
-	return
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Usec = int32(nsec % 1e9 / 1e3)
-	tv.Sec = int64(nsec / 1e9)
-	return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
-	k.Ident = uint32(fd)
-	k.Filter = int16(mode)
-	k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint32(length)
-}
diff --git a/src/syscall/zerrors_darwin_arm.go b/src/syscall/zerrors_darwin_arm.go
deleted file mode 100644
index a64f373..0000000
--- a/src/syscall/zerrors_darwin_arm.go
+++ /dev/null
@@ -1,1351 +0,0 @@
-// mkerrors.sh
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- _const.go
-
-// +build arm,darwin
-
-package syscall
-
-const (
-	AF_APPLETALK                = 0x10
-	AF_CCITT                    = 0xa
-	AF_CHAOS                    = 0x5
-	AF_CNT                      = 0x15
-	AF_COIP                     = 0x14
-	AF_DATAKIT                  = 0x9
-	AF_DECnet                   = 0xc
-	AF_DLI                      = 0xd
-	AF_E164                     = 0x1c
-	AF_ECMA                     = 0x8
-	AF_HYLINK                   = 0xf
-	AF_IMPLINK                  = 0x3
-	AF_INET                     = 0x2
-	AF_INET6                    = 0x1e
-	AF_IPX                      = 0x17
-	AF_ISDN                     = 0x1c
-	AF_ISO                      = 0x7
-	AF_LAT                      = 0xe
-	AF_LINK                     = 0x12
-	AF_LOCAL                    = 0x1
-	AF_MAX                      = 0x25
-	AF_NATM                     = 0x1f
-	AF_NDRV                     = 0x1b
-	AF_NETBIOS                  = 0x21
-	AF_NS                       = 0x6
-	AF_OSI                      = 0x7
-	AF_PPP                      = 0x22
-	AF_PUP                      = 0x4
-	AF_RESERVED_36              = 0x24
-	AF_ROUTE                    = 0x11
-	AF_SIP                      = 0x18
-	AF_SNA                      = 0xb
-	AF_SYSTEM                   = 0x20
-	AF_UNIX                     = 0x1
-	AF_UNSPEC                   = 0x0
-	B0                          = 0x0
-	B110                        = 0x6e
-	B115200                     = 0x1c200
-	B1200                       = 0x4b0
-	B134                        = 0x86
-	B14400                      = 0x3840
-	B150                        = 0x96
-	B1800                       = 0x708
-	B19200                      = 0x4b00
-	B200                        = 0xc8
-	B230400                     = 0x38400
-	B2400                       = 0x960
-	B28800                      = 0x7080
-	B300                        = 0x12c
-	B38400                      = 0x9600
-	B4800                       = 0x12c0
-	B50                         = 0x32
-	B57600                      = 0xe100
-	B600                        = 0x258
-	B7200                       = 0x1c20
-	B75                         = 0x4b
-	B76800                      = 0x12c00
-	B9600                       = 0x2580
-	BIOCFLUSH                   = 0x20004268
-	BIOCGBLEN                   = 0x40044266
-	BIOCGDLT                    = 0x4004426a
-	BIOCGDLTLIST                = 0xc00c4279
-	BIOCGETIF                   = 0x4020426b
-	BIOCGHDRCMPLT               = 0x40044274
-	BIOCGRSIG                   = 0x40044272
-	BIOCGRTIMEOUT               = 0x4008426e
-	BIOCGSEESENT                = 0x40044276
-	BIOCGSTATS                  = 0x4008426f
-	BIOCIMMEDIATE               = 0x80044270
-	BIOCPROMISC                 = 0x20004269
-	BIOCSBLEN                   = 0xc0044266
-	BIOCSDLT                    = 0x80044278
-	BIOCSETF                    = 0x80084267
-	BIOCSETIF                   = 0x8020426c
-	BIOCSHDRCMPLT               = 0x80044275
-	BIOCSRSIG                   = 0x80044273
-	BIOCSRTIMEOUT               = 0x8008426d
-	BIOCSSEESENT                = 0x80044277
-	BIOCVERSION                 = 0x40044271
-	BPF_A                       = 0x10
-	BPF_ABS                     = 0x20
-	BPF_ADD                     = 0x0
-	BPF_ALIGNMENT               = 0x4
-	BPF_ALU                     = 0x4
-	BPF_AND                     = 0x50
-	BPF_B                       = 0x10
-	BPF_DIV                     = 0x30
-	BPF_H                       = 0x8
-	BPF_IMM                     = 0x0
-	BPF_IND                     = 0x40
-	BPF_JA                      = 0x0
-	BPF_JEQ                     = 0x10
-	BPF_JGE                     = 0x30
-	BPF_JGT                     = 0x20
-	BPF_JMP                     = 0x5
-	BPF_JSET                    = 0x40
-	BPF_K                       = 0x0
-	BPF_LD                      = 0x0
-	BPF_LDX                     = 0x1
-	BPF_LEN                     = 0x80
-	BPF_LSH                     = 0x60
-	BPF_MAJOR_VERSION           = 0x1
-	BPF_MAXBUFSIZE              = 0x80000
-	BPF_MAXINSNS                = 0x200
-	BPF_MEM                     = 0x60
-	BPF_MEMWORDS                = 0x10
-	BPF_MINBUFSIZE              = 0x20
-	BPF_MINOR_VERSION           = 0x1
-	BPF_MISC                    = 0x7
-	BPF_MSH                     = 0xa0
-	BPF_MUL                     = 0x20
-	BPF_NEG                     = 0x80
-	BPF_OR                      = 0x40
-	BPF_RELEASE                 = 0x30bb6
-	BPF_RET                     = 0x6
-	BPF_RSH                     = 0x70
-	BPF_ST                      = 0x2
-	BPF_STX                     = 0x3
-	BPF_SUB                     = 0x10
-	BPF_TAX                     = 0x0
-	BPF_TXA                     = 0x80
-	BPF_W                       = 0x0
-	BPF_X                       = 0x8
-	BRKINT                      = 0x2
-	CFLUSH                      = 0xf
-	CLOCAL                      = 0x8000
-	CREAD                       = 0x800
-	CS5                         = 0x0
-	CS6                         = 0x100
-	CS7                         = 0x200
-	CS8                         = 0x300
-	CSIZE                       = 0x300
-	CSTART                      = 0x11
-	CSTATUS                     = 0x14
-	CSTOP                       = 0x13
-	CSTOPB                      = 0x400
-	CSUSP                       = 0x1a
-	CTL_MAXNAME                 = 0xc
-	CTL_NET                     = 0x4
-	DLT_APPLE_IP_OVER_IEEE1394  = 0x8a
-	DLT_ARCNET                  = 0x7
-	DLT_ATM_CLIP                = 0x13
-	DLT_ATM_RFC1483             = 0xb
-	DLT_AX25                    = 0x3
-	DLT_CHAOS                   = 0x5
-	DLT_CHDLC                   = 0x68
-	DLT_C_HDLC                  = 0x68
-	DLT_EN10MB                  = 0x1
-	DLT_EN3MB                   = 0x2
-	DLT_FDDI                    = 0xa
-	DLT_IEEE802                 = 0x6
-	DLT_IEEE802_11              = 0x69
-	DLT_IEEE802_11_RADIO        = 0x7f
-	DLT_IEEE802_11_RADIO_AVS    = 0xa3
-	DLT_LINUX_SLL               = 0x71
-	DLT_LOOP                    = 0x6c
-	DLT_NULL                    = 0x0
-	DLT_PFLOG                   = 0x75
-	DLT_PFSYNC                  = 0x12
-	DLT_PPP                     = 0x9
-	DLT_PPP_BSDOS               = 0x10
-	DLT_PPP_SERIAL              = 0x32
-	DLT_PRONET                  = 0x4
-	DLT_RAW                     = 0xc
-	DLT_SLIP                    = 0x8
-	DLT_SLIP_BSDOS              = 0xf
-	DT_BLK                      = 0x6
-	DT_CHR                      = 0x2
-	DT_DIR                      = 0x4
-	DT_FIFO                     = 0x1
-	DT_LNK                      = 0xa
-	DT_REG                      = 0x8
-	DT_SOCK                     = 0xc
-	DT_UNKNOWN                  = 0x0
-	DT_WHT                      = 0xe
-	ECHO                        = 0x8
-	ECHOCTL                     = 0x40
-	ECHOE                       = 0x2
-	ECHOK                       = 0x4
-	ECHOKE                      = 0x1
-	ECHONL                      = 0x10
-	ECHOPRT                     = 0x20
-	EVFILT_AIO                  = -0x3
-	EVFILT_FS                   = -0x9
-	EVFILT_MACHPORT             = -0x8
-	EVFILT_PROC                 = -0x5
-	EVFILT_READ                 = -0x1
-	EVFILT_SIGNAL               = -0x6
-	EVFILT_SYSCOUNT             = 0x9
-	EVFILT_THREADMARKER         = 0x9
-	EVFILT_TIMER                = -0x7
-	EVFILT_VNODE                = -0x4
-	EVFILT_WRITE                = -0x2
-	EV_ADD                      = 0x1
-	EV_CLEAR                    = 0x20
-	EV_DELETE                   = 0x2
-	EV_DISABLE                  = 0x8
-	EV_ENABLE                   = 0x4
-	EV_EOF                      = 0x8000
-	EV_ERROR                    = 0x4000
-	EV_FLAG0                    = 0x1000
-	EV_FLAG1                    = 0x2000
-	EV_ONESHOT                  = 0x10
-	EV_OOBAND                   = 0x2000
-	EV_POLL                     = 0x1000
-	EV_RECEIPT                  = 0x40
-	EV_SYSFLAGS                 = 0xf000
-	EXTA                        = 0x4b00
-	EXTB                        = 0x9600
-	EXTPROC                     = 0x800
-	FD_CLOEXEC                  = 0x1
-	FD_SETSIZE                  = 0x400
-	FLUSHO                      = 0x800000
-	F_ADDSIGS                   = 0x3b
-	F_ALLOCATEALL               = 0x4
-	F_ALLOCATECONTIG            = 0x2
-	F_CHKCLEAN                  = 0x29
-	F_DUPFD                     = 0x0
-	F_DUPFD_CLOEXEC             = 0x43
-	F_FREEZE_FS                 = 0x35
-	F_FULLFSYNC                 = 0x33
-	F_GETFD                     = 0x1
-	F_GETFL                     = 0x3
-	F_GETLK                     = 0x7
-	F_GETOWN                    = 0x5
-	F_GETPATH                   = 0x32
-	F_GLOBAL_NOCACHE            = 0x37
-	F_LOG2PHYS                  = 0x31
-	F_MARKDEPENDENCY            = 0x3c
-	F_NOCACHE                   = 0x30
-	F_OK                        = 0x0
-	F_PATHPKG_CHECK             = 0x34
-	F_PEOFPOSMODE               = 0x3
-	F_PREALLOCATE               = 0x2a
-	F_RDADVISE                  = 0x2c
-	F_RDAHEAD                   = 0x2d
-	F_RDLCK                     = 0x1
-	F_READBOOTSTRAP             = 0x2e
-	F_SETFD                     = 0x2
-	F_SETFL                     = 0x4
-	F_SETLK                     = 0x8
-	F_SETLKW                    = 0x9
-	F_SETOWN                    = 0x6
-	F_SETSIZE                   = 0x2b
-	F_THAW_FS                   = 0x36
-	F_UNLCK                     = 0x2
-	F_VOLPOSMODE                = 0x4
-	F_WRITEBOOTSTRAP            = 0x2f
-	F_WRLCK                     = 0x3
-	HUPCL                       = 0x4000
-	ICANON                      = 0x100
-	ICRNL                       = 0x100
-	IEXTEN                      = 0x400
-	IFF_ALLMULTI                = 0x200
-	IFF_ALTPHYS                 = 0x4000
-	IFF_BROADCAST               = 0x2
-	IFF_DEBUG                   = 0x4
-	IFF_LINK0                   = 0x1000
-	IFF_LINK1                   = 0x2000
-	IFF_LINK2                   = 0x4000
-	IFF_LOOPBACK                = 0x8
-	IFF_MULTICAST               = 0x8000
-	IFF_NOARP                   = 0x80
-	IFF_NOTRAILERS              = 0x20
-	IFF_OACTIVE                 = 0x400
-	IFF_POINTOPOINT             = 0x10
-	IFF_PROMISC                 = 0x100
-	IFF_RUNNING                 = 0x40
-	IFF_SIMPLEX                 = 0x800
-	IFF_UP                      = 0x1
-	IFNAMSIZ                    = 0x10
-	IFT_1822                    = 0x2
-	IFT_AAL5                    = 0x31
-	IFT_ARCNET                  = 0x23
-	IFT_ARCNETPLUS              = 0x24
-	IFT_ATM                     = 0x25
-	IFT_BRIDGE                  = 0xd1
-	IFT_CARP                    = 0xf8
-	IFT_CEPT                    = 0x13
-	IFT_DS3                     = 0x1e
-	IFT_ENC                     = 0xf4
-	IFT_EON                     = 0x19
-	IFT_ETHER                   = 0x6
-	IFT_FAITH                   = 0x38
-	IFT_FDDI                    = 0xf
-	IFT_FRELAY                  = 0x20
-	IFT_FRELAYDCE               = 0x2c
-	IFT_GIF                     = 0x37
-	IFT_HDH1822                 = 0x3
-	IFT_HIPPI                   = 0x2f
-	IFT_HSSI                    = 0x2e
-	IFT_HY                      = 0xe
-	IFT_IEEE1394                = 0x90
-	IFT_IEEE8023ADLAG           = 0x88
-	IFT_ISDNBASIC               = 0x14
-	IFT_ISDNPRIMARY             = 0x15
-	IFT_ISO88022LLC             = 0x29
-	IFT_ISO88023                = 0x7
-	IFT_ISO88024                = 0x8
-	IFT_ISO88025                = 0x9
-	IFT_ISO88026                = 0xa
-	IFT_L2VLAN                  = 0x87
-	IFT_LAPB                    = 0x10
-	IFT_LOCALTALK               = 0x2a
-	IFT_LOOP                    = 0x18
-	IFT_MIOX25                  = 0x26
-	IFT_MODEM                   = 0x30
-	IFT_NSIP                    = 0x1b
-	IFT_OTHER                   = 0x1
-	IFT_P10                     = 0xc
-	IFT_P80                     = 0xd
-	IFT_PARA                    = 0x22
-	IFT_PDP                     = 0xff
-	IFT_PFLOG                   = 0xf5
-	IFT_PFSYNC                  = 0xf6
-	IFT_PPP                     = 0x17
-	IFT_PROPMUX                 = 0x36
-	IFT_PROPVIRTUAL             = 0x35
-	IFT_PTPSERIAL               = 0x16
-	IFT_RS232                   = 0x21
-	IFT_SDLC                    = 0x11
-	IFT_SIP                     = 0x1f
-	IFT_SLIP                    = 0x1c
-	IFT_SMDSDXI                 = 0x2b
-	IFT_SMDSICIP                = 0x34
-	IFT_SONET                   = 0x27
-	IFT_SONETPATH               = 0x32
-	IFT_SONETVT                 = 0x33
-	IFT_STARLAN                 = 0xb
-	IFT_STF                     = 0x39
-	IFT_T1                      = 0x12
-	IFT_ULTRA                   = 0x1d
-	IFT_V35                     = 0x2d
-	IFT_X25                     = 0x5
-	IFT_X25DDN                  = 0x4
-	IFT_X25PLE                  = 0x28
-	IFT_XETHER                  = 0x1a
-	IGNBRK                      = 0x1
-	IGNCR                       = 0x80
-	IGNPAR                      = 0x4
-	IMAXBEL                     = 0x2000
-	INLCR                       = 0x40
-	INPCK                       = 0x10
-	IN_CLASSA_HOST              = 0xffffff
-	IN_CLASSA_MAX               = 0x80
-	IN_CLASSA_NET               = 0xff000000
-	IN_CLASSA_NSHIFT            = 0x18
-	IN_CLASSB_HOST              = 0xffff
-	IN_CLASSB_MAX               = 0x10000
-	IN_CLASSB_NET               = 0xffff0000
-	IN_CLASSB_NSHIFT            = 0x10
-	IN_CLASSC_HOST              = 0xff
-	IN_CLASSC_NET               = 0xffffff00
-	IN_CLASSC_NSHIFT            = 0x8
-	IN_CLASSD_HOST              = 0xfffffff
-	IN_CLASSD_NET               = 0xf0000000
-	IN_CLASSD_NSHIFT            = 0x1c
-	IN_LINKLOCALNETNUM          = 0xa9fe0000
-	IN_LOOPBACKNET              = 0x7f
-	IPPROTO_3PC                 = 0x22
-	IPPROTO_ADFS                = 0x44
-	IPPROTO_AH                  = 0x33
-	IPPROTO_AHIP                = 0x3d
-	IPPROTO_APES                = 0x63
-	IPPROTO_ARGUS               = 0xd
-	IPPROTO_AX25                = 0x5d
-	IPPROTO_BHA                 = 0x31
-	IPPROTO_BLT                 = 0x1e
-	IPPROTO_BRSATMON            = 0x4c
-	IPPROTO_CFTP                = 0x3e
-	IPPROTO_CHAOS               = 0x10
-	IPPROTO_CMTP                = 0x26
-	IPPROTO_CPHB                = 0x49
-	IPPROTO_CPNX                = 0x48
-	IPPROTO_DDP                 = 0x25
-	IPPROTO_DGP                 = 0x56
-	IPPROTO_DIVERT              = 0xfe
-	IPPROTO_DONE                = 0x101
-	IPPROTO_DSTOPTS             = 0x3c
-	IPPROTO_EGP                 = 0x8
-	IPPROTO_EMCON               = 0xe
-	IPPROTO_ENCAP               = 0x62
-	IPPROTO_EON                 = 0x50
-	IPPROTO_ESP                 = 0x32
-	IPPROTO_ETHERIP             = 0x61
-	IPPROTO_FRAGMENT            = 0x2c
-	IPPROTO_GGP                 = 0x3
-	IPPROTO_GMTP                = 0x64
-	IPPROTO_GRE                 = 0x2f
-	IPPROTO_HELLO               = 0x3f
-	IPPROTO_HMP                 = 0x14
-	IPPROTO_HOPOPTS             = 0x0
-	IPPROTO_ICMP                = 0x1
-	IPPROTO_ICMPV6              = 0x3a
-	IPPROTO_IDP                 = 0x16
-	IPPROTO_IDPR                = 0x23
-	IPPROTO_IDRP                = 0x2d
-	IPPROTO_IGMP                = 0x2
-	IPPROTO_IGP                 = 0x55
-	IPPROTO_IGRP                = 0x58
-	IPPROTO_IL                  = 0x28
-	IPPROTO_INLSP               = 0x34
-	IPPROTO_INP                 = 0x20
-	IPPROTO_IP                  = 0x0
-	IPPROTO_IPCOMP              = 0x6c
-	IPPROTO_IPCV                = 0x47
-	IPPROTO_IPEIP               = 0x5e
-	IPPROTO_IPIP                = 0x4
-	IPPROTO_IPPC                = 0x43
-	IPPROTO_IPV4                = 0x4
-	IPPROTO_IPV6                = 0x29
-	IPPROTO_IRTP                = 0x1c
-	IPPROTO_KRYPTOLAN           = 0x41
-	IPPROTO_LARP                = 0x5b
-	IPPROTO_LEAF1               = 0x19
-	IPPROTO_LEAF2               = 0x1a
-	IPPROTO_MAX                 = 0x100
-	IPPROTO_MAXID               = 0x34
-	IPPROTO_MEAS                = 0x13
-	IPPROTO_MHRP                = 0x30
-	IPPROTO_MICP                = 0x5f
-	IPPROTO_MTP                 = 0x5c
-	IPPROTO_MUX                 = 0x12
-	IPPROTO_ND                  = 0x4d
-	IPPROTO_NHRP                = 0x36
-	IPPROTO_NONE                = 0x3b
-	IPPROTO_NSP                 = 0x1f
-	IPPROTO_NVPII               = 0xb
-	IPPROTO_OSPFIGP             = 0x59
-	IPPROTO_PGM                 = 0x71
-	IPPROTO_PIGP                = 0x9
-	IPPROTO_PIM                 = 0x67
-	IPPROTO_PRM                 = 0x15
-	IPPROTO_PUP                 = 0xc
-	IPPROTO_PVP                 = 0x4b
-	IPPROTO_RAW                 = 0xff
-	IPPROTO_RCCMON              = 0xa
-	IPPROTO_RDP                 = 0x1b
-	IPPROTO_ROUTING             = 0x2b
-	IPPROTO_RSVP                = 0x2e
-	IPPROTO_RVD                 = 0x42
-	IPPROTO_SATEXPAK            = 0x40
-	IPPROTO_SATMON              = 0x45
-	IPPROTO_SCCSP               = 0x60
-	IPPROTO_SDRP                = 0x2a
-	IPPROTO_SEP                 = 0x21
-	IPPROTO_SRPC                = 0x5a
-	IPPROTO_ST                  = 0x7
-	IPPROTO_SVMTP               = 0x52
-	IPPROTO_SWIPE               = 0x35
-	IPPROTO_TCF                 = 0x57
-	IPPROTO_TCP                 = 0x6
-	IPPROTO_TP                  = 0x1d
-	IPPROTO_TPXX                = 0x27
-	IPPROTO_TRUNK1              = 0x17
-	IPPROTO_TRUNK2              = 0x18
-	IPPROTO_TTP                 = 0x54
-	IPPROTO_UDP                 = 0x11
-	IPPROTO_VINES               = 0x53
-	IPPROTO_VISA                = 0x46
-	IPPROTO_VMTP                = 0x51
-	IPPROTO_WBEXPAK             = 0x4f
-	IPPROTO_WBMON               = 0x4e
-	IPPROTO_WSN                 = 0x4a
-	IPPROTO_XNET                = 0xf
-	IPPROTO_XTP                 = 0x24
-	IPV6_BINDV6ONLY             = 0x1b
-	IPV6_CHECKSUM               = 0x1a
-	IPV6_DEFAULT_MULTICAST_HOPS = 0x1
-	IPV6_DEFAULT_MULTICAST_LOOP = 0x1
-	IPV6_DEFHLIM                = 0x40
-	IPV6_DSTOPTS                = 0x17
-	IPV6_FAITH                  = 0x1d
-	IPV6_FLOWINFO_MASK          = 0xffffff0f
-	IPV6_FLOWLABEL_MASK         = 0xffff0f00
-	IPV6_FRAGTTL                = 0x78
-	IPV6_FW_ADD                 = 0x1e
-	IPV6_FW_DEL                 = 0x1f
-	IPV6_FW_FLUSH               = 0x20
-	IPV6_FW_GET                 = 0x22
-	IPV6_FW_ZERO                = 0x21
-	IPV6_HLIMDEC                = 0x1
-	IPV6_HOPLIMIT               = 0x14
-	IPV6_HOPOPTS                = 0x16
-	IPV6_IPSEC_POLICY           = 0x1c
-	IPV6_JOIN_GROUP             = 0xc
-	IPV6_LEAVE_GROUP            = 0xd
-	IPV6_MAXHLIM                = 0xff
-	IPV6_MAXPACKET              = 0xffff
-	IPV6_MMTU                   = 0x500
-	IPV6_MULTICAST_HOPS         = 0xa
-	IPV6_MULTICAST_IF           = 0x9
-	IPV6_MULTICAST_LOOP         = 0xb
-	IPV6_NEXTHOP                = 0x15
-	IPV6_PKTINFO                = 0x13
-	IPV6_PKTOPTIONS             = 0x19
-	IPV6_PORTRANGE              = 0xe
-	IPV6_PORTRANGE_DEFAULT      = 0x0
-	IPV6_PORTRANGE_HIGH         = 0x1
-	IPV6_PORTRANGE_LOW          = 0x2
-	IPV6_RTHDR                  = 0x18
-	IPV6_RTHDR_LOOSE            = 0x0
-	IPV6_RTHDR_STRICT           = 0x1
-	IPV6_RTHDR_TYPE_0           = 0x0
-	IPV6_SOCKOPT_RESERVED1      = 0x3
-	IPV6_UNICAST_HOPS           = 0x4
-	IPV6_V6ONLY                 = 0x1b
-	IPV6_VERSION                = 0x60
-	IPV6_VERSION_MASK           = 0xf0
-	IP_ADD_MEMBERSHIP           = 0xc
-	IP_DEFAULT_MULTICAST_LOOP   = 0x1
-	IP_DEFAULT_MULTICAST_TTL    = 0x1
-	IP_DF                       = 0x4000
-	IP_DROP_MEMBERSHIP          = 0xd
-	IP_DUMMYNET_CONFIGURE       = 0x3c
-	IP_DUMMYNET_DEL             = 0x3d
-	IP_DUMMYNET_FLUSH           = 0x3e
-	IP_DUMMYNET_GET             = 0x40
-	IP_FAITH                    = 0x16
-	IP_FW_ADD                   = 0x28
-	IP_FW_DEL                   = 0x29
-	IP_FW_FLUSH                 = 0x2a
-	IP_FW_GET                   = 0x2c
-	IP_FW_RESETLOG              = 0x2d
-	IP_FW_ZERO                  = 0x2b
-	IP_HDRINCL                  = 0x2
-	IP_IPSEC_POLICY             = 0x15
-	IP_MAXPACKET                = 0xffff
-	IP_MAX_MEMBERSHIPS          = 0x14
-	IP_MF                       = 0x2000
-	IP_MSS                      = 0x240
-	IP_MULTICAST_IF             = 0x9
-	IP_MULTICAST_LOOP           = 0xb
-	IP_MULTICAST_TTL            = 0xa
-	IP_MULTICAST_VIF            = 0xe
-	IP_NAT__XXX                 = 0x37
-	IP_OFFMASK                  = 0x1fff
-	IP_OLD_FW_ADD               = 0x32
-	IP_OLD_FW_DEL               = 0x33
-	IP_OLD_FW_FLUSH             = 0x34
-	IP_OLD_FW_GET               = 0x36
-	IP_OLD_FW_RESETLOG          = 0x38
-	IP_OLD_FW_ZERO              = 0x35
-	IP_OPTIONS                  = 0x1
-	IP_PKTINFO                  = 0x1a
-	IP_PORTRANGE                = 0x13
-	IP_PORTRANGE_DEFAULT        = 0x0
-	IP_PORTRANGE_HIGH           = 0x1
-	IP_PORTRANGE_LOW            = 0x2
-	IP_RECVDSTADDR              = 0x7
-	IP_RECVIF                   = 0x14
-	IP_RECVOPTS                 = 0x5
-	IP_RECVPKTINFO              = 0x1a
-	IP_RECVRETOPTS              = 0x6
-	IP_RECVTTL                  = 0x18
-	IP_RETOPTS                  = 0x8
-	IP_RF                       = 0x8000
-	IP_RSVP_OFF                 = 0x10
-	IP_RSVP_ON                  = 0xf
-	IP_RSVP_VIF_OFF             = 0x12
-	IP_RSVP_VIF_ON              = 0x11
-	IP_STRIPHDR                 = 0x17
-	IP_TOS                      = 0x3
-	IP_TRAFFIC_MGT_BACKGROUND   = 0x41
-	IP_TTL                      = 0x4
-	ISIG                        = 0x80
-	ISTRIP                      = 0x20
-	IUTF8                       = 0x4000
-	IXANY                       = 0x800
-	IXOFF                       = 0x400
-	IXON                        = 0x200
-	LOCK_EX                     = 0x2
-	LOCK_NB                     = 0x4
-	LOCK_SH                     = 0x1
-	LOCK_UN                     = 0x8
-	MADV_DONTNEED               = 0x4
-	MADV_FREE                   = 0x5
-	MADV_NORMAL                 = 0x0
-	MADV_RANDOM                 = 0x1
-	MADV_SEQUENTIAL             = 0x2
-	MADV_WILLNEED               = 0x3
-	MAP_ANON                    = 0x1000
-	MAP_COPY                    = 0x2
-	MAP_FILE                    = 0x0
-	MAP_FIXED                   = 0x10
-	MAP_HASSEMAPHORE            = 0x200
-	MAP_NOCACHE                 = 0x400
-	MAP_NOEXTEND                = 0x100
-	MAP_NORESERVE               = 0x40
-	MAP_PRIVATE                 = 0x2
-	MAP_RENAME                  = 0x20
-	MAP_RESERVED0080            = 0x80
-	MAP_SHARED                  = 0x1
-	MCL_CURRENT                 = 0x1
-	MCL_FUTURE                  = 0x2
-	MSG_CTRUNC                  = 0x20
-	MSG_DONTROUTE               = 0x4
-	MSG_DONTWAIT                = 0x80
-	MSG_EOF                     = 0x100
-	MSG_EOR                     = 0x8
-	MSG_FLUSH                   = 0x400
-	MSG_HAVEMORE                = 0x2000
-	MSG_HOLD                    = 0x800
-	MSG_NEEDSA                  = 0x10000
-	MSG_OOB                     = 0x1
-	MSG_PEEK                    = 0x2
-	MSG_RCVMORE                 = 0x4000
-	MSG_SEND                    = 0x1000
-	MSG_TRUNC                   = 0x10
-	MSG_WAITALL                 = 0x40
-	MSG_WAITSTREAM              = 0x200
-	MS_ASYNC                    = 0x1
-	MS_DEACTIVATE               = 0x8
-	MS_INVALIDATE               = 0x2
-	MS_KILLPAGES                = 0x4
-	MS_SYNC                     = 0x10
-	NAME_MAX                    = 0xff
-	NET_RT_DUMP                 = 0x1
-	NET_RT_DUMP2                = 0x7
-	NET_RT_FLAGS                = 0x2
-	NET_RT_IFLIST               = 0x3
-	NET_RT_IFLIST2              = 0x6
-	NET_RT_MAXID                = 0x8
-	NET_RT_STAT                 = 0x4
-	NET_RT_TRASH                = 0x5
-	NOFLSH                      = 0x80000000
-	NOTE_ABSOLUTE               = 0x8
-	NOTE_ATTRIB                 = 0x8
-	NOTE_CHILD                  = 0x4
-	NOTE_DELETE                 = 0x1
-	NOTE_EXEC                   = 0x20000000
-	NOTE_EXIT                   = 0x80000000
-	NOTE_EXTEND                 = 0x4
-	NOTE_FORK                   = 0x40000000
-	NOTE_LINK                   = 0x10
-	NOTE_LOWAT                  = 0x1
-	NOTE_NSECONDS               = 0x4
-	NOTE_PCTRLMASK              = -0x100000
-	NOTE_PDATAMASK              = 0xfffff
-	NOTE_REAP                   = 0x10000000
-	NOTE_RENAME                 = 0x20
-	NOTE_REVOKE                 = 0x40
-	NOTE_SECONDS                = 0x1
-	NOTE_SIGNAL                 = 0x8000000
-	NOTE_TRACK                  = 0x1
-	NOTE_TRACKERR               = 0x2
-	NOTE_USECONDS               = 0x2
-	NOTE_WRITE                  = 0x2
-	OCRNL                       = 0x10
-	OFDEL                       = 0x20000
-	OFILL                       = 0x80
-	ONLCR                       = 0x2
-	ONLRET                      = 0x40
-	ONOCR                       = 0x20
-	ONOEOT                      = 0x8
-	OPOST                       = 0x1
-	O_ACCMODE                   = 0x3
-	O_ALERT                     = 0x20000000
-	O_APPEND                    = 0x8
-	O_ASYNC                     = 0x40
-	O_CLOEXEC                   = 0x1000000
-	O_CREAT                     = 0x200
-	O_DIRECTORY                 = 0x100000
-	O_EVTONLY                   = 0x8000
-	O_EXCL                      = 0x800
-	O_EXLOCK                    = 0x20
-	O_FSYNC                     = 0x80
-	O_NDELAY                    = 0x4
-	O_NOCTTY                    = 0x20000
-	O_NOFOLLOW                  = 0x100
-	O_NONBLOCK                  = 0x4
-	O_POPUP                     = 0x80000000
-	O_RDONLY                    = 0x0
-	O_RDWR                      = 0x2
-	O_SHLOCK                    = 0x10
-	O_SYMLINK                   = 0x200000
-	O_SYNC                      = 0x80
-	O_TRUNC                     = 0x400
-	O_WRONLY                    = 0x1
-	PARENB                      = 0x1000
-	PARMRK                      = 0x8
-	PARODD                      = 0x2000
-	PENDIN                      = 0x20000000
-	PRIO_PGRP                   = 0x1
-	PRIO_PROCESS                = 0x0
-	PRIO_USER                   = 0x2
-	PROT_EXEC                   = 0x4
-	PROT_NONE                   = 0x0
-	PROT_READ                   = 0x1
-	PROT_WRITE                  = 0x2
-	PT_ATTACH                   = 0xa
-	PT_ATTACHEXC                = 0xe
-	PT_CONTINUE                 = 0x7
-	PT_DENY_ATTACH              = 0x1f
-	PT_DETACH                   = 0xb
-	PT_FIRSTMACH                = 0x20
-	PT_FORCEQUOTA               = 0x1e
-	PT_KILL                     = 0x8
-	PT_READ_D                   = 0x2
-	PT_READ_I                   = 0x1
-	PT_READ_U                   = 0x3
-	PT_SIGEXC                   = 0xc
-	PT_STEP                     = 0x9
-	PT_THUPDATE                 = 0xd
-	PT_TRACE_ME                 = 0x0
-	PT_WRITE_D                  = 0x5
-	PT_WRITE_I                  = 0x4
-	PT_WRITE_U                  = 0x6
-	RLIMIT_AS                   = 0x5
-	RLIMIT_CORE                 = 0x4
-	RLIMIT_CPU                  = 0x0
-	RLIMIT_DATA                 = 0x2
-	RLIMIT_FSIZE                = 0x1
-	RLIMIT_NOFILE               = 0x8
-	RLIMIT_STACK                = 0x3
-	RLIM_INFINITY               = 0x7fffffffffffffff
-	RTAX_AUTHOR                 = 0x6
-	RTAX_BRD                    = 0x7
-	RTAX_DST                    = 0x0
-	RTAX_GATEWAY                = 0x1
-	RTAX_GENMASK                = 0x3
-	RTAX_IFA                    = 0x5
-	RTAX_IFP                    = 0x4
-	RTAX_MAX                    = 0x8
-	RTAX_NETMASK                = 0x2
-	RTA_AUTHOR                  = 0x40
-	RTA_BRD                     = 0x80
-	RTA_DST                     = 0x1
-	RTA_GATEWAY                 = 0x2
-	RTA_GENMASK                 = 0x8
-	RTA_IFA                     = 0x20
-	RTA_IFP                     = 0x10
-	RTA_NETMASK                 = 0x4
-	RTF_BLACKHOLE               = 0x1000
-	RTF_BROADCAST               = 0x400000
-	RTF_CLONING                 = 0x100
-	RTF_CONDEMNED               = 0x2000000
-	RTF_DELCLONE                = 0x80
-	RTF_DONE                    = 0x40
-	RTF_DYNAMIC                 = 0x10
-	RTF_GATEWAY                 = 0x2
-	RTF_HOST                    = 0x4
-	RTF_IFREF                   = 0x4000000
-	RTF_IFSCOPE                 = 0x1000000
-	RTF_LLINFO                  = 0x400
-	RTF_LOCAL                   = 0x200000
-	RTF_MODIFIED                = 0x20
-	RTF_MULTICAST               = 0x800000
-	RTF_PINNED                  = 0x100000
-	RTF_PRCLONING               = 0x10000
-	RTF_PROTO1                  = 0x8000
-	RTF_PROTO2                  = 0x4000
-	RTF_PROTO3                  = 0x40000
-	RTF_REJECT                  = 0x8
-	RTF_STATIC                  = 0x800
-	RTF_UP                      = 0x1
-	RTF_WASCLONED               = 0x20000
-	RTF_XRESOLVE                = 0x200
-	RTM_ADD                     = 0x1
-	RTM_CHANGE                  = 0x3
-	RTM_DELADDR                 = 0xd
-	RTM_DELETE                  = 0x2
-	RTM_DELMADDR                = 0x10
-	RTM_GET                     = 0x4
-	RTM_GET2                    = 0x14
-	RTM_IFINFO                  = 0xe
-	RTM_IFINFO2                 = 0x12
-	RTM_LOCK                    = 0x8
-	RTM_LOSING                  = 0x5
-	RTM_MISS                    = 0x7
-	RTM_NEWADDR                 = 0xc
-	RTM_NEWMADDR                = 0xf
-	RTM_NEWMADDR2               = 0x13
-	RTM_OLDADD                  = 0x9
-	RTM_OLDDEL                  = 0xa
-	RTM_REDIRECT                = 0x6
-	RTM_RESOLVE                 = 0xb
-	RTM_RTTUNIT                 = 0xf4240
-	RTM_VERSION                 = 0x5
-	RTV_EXPIRE                  = 0x4
-	RTV_HOPCOUNT                = 0x2
-	RTV_MTU                     = 0x1
-	RTV_RPIPE                   = 0x8
-	RTV_RTT                     = 0x40
-	RTV_RTTVAR                  = 0x80
-	RTV_SPIPE                   = 0x10
-	RTV_SSTHRESH                = 0x20
-	RUSAGE_CHILDREN             = -0x1
-	RUSAGE_SELF                 = 0x0
-	SCM_CREDS                   = 0x3
-	SCM_RIGHTS                  = 0x1
-	SCM_TIMESTAMP               = 0x2
-	SHUT_RD                     = 0x0
-	SHUT_RDWR                   = 0x2
-	SHUT_WR                     = 0x1
-	SIOCADDMULTI                = 0x80206931
-	SIOCAIFADDR                 = 0x8040691a
-	SIOCALIFADDR                = 0x8118691d
-	SIOCARPIPLL                 = 0xc0206928
-	SIOCATMARK                  = 0x40047307
-	SIOCAUTOADDR                = 0xc0206926
-	SIOCAUTONETMASK             = 0x80206927
-	SIOCDELMULTI                = 0x80206932
-	SIOCDIFADDR                 = 0x80206919
-	SIOCDIFPHYADDR              = 0x80206941
-	SIOCDLIFADDR                = 0x8118691f
-	SIOCGETSGCNT                = 0xc014721c
-	SIOCGETVIFCNT               = 0xc014721b
-	SIOCGETVLAN                 = 0xc020697f
-	SIOCGHIWAT                  = 0x40047301
-	SIOCGIFADDR                 = 0xc0206921
-	SIOCGIFALTMTU               = 0xc0206948
-	SIOCGIFASYNCMAP             = 0xc020697c
-	SIOCGIFBOND                 = 0xc0206947
-	SIOCGIFBRDADDR              = 0xc0206923
-	SIOCGIFCONF                 = 0xc0086924
-	SIOCGIFDEVMTU               = 0xc0206944
-	SIOCGIFDSTADDR              = 0xc0206922
-	SIOCGIFFLAGS                = 0xc0206911
-	SIOCGIFGENERIC              = 0xc020693a
-	SIOCGIFKPI                  = 0xc0206987
-	SIOCGIFMAC                  = 0xc0206982
-	SIOCGIFMEDIA                = 0xc0286938
-	SIOCGIFMETRIC               = 0xc0206917
-	SIOCGIFMTU                  = 0xc0206933
-	SIOCGIFNETMASK              = 0xc0206925
-	SIOCGIFPDSTADDR             = 0xc0206940
-	SIOCGIFPHYS                 = 0xc0206935
-	SIOCGIFPSRCADDR             = 0xc020693f
-	SIOCGIFSTATUS               = 0xc331693d
-	SIOCGIFVLAN                 = 0xc020697f
-	SIOCGLIFADDR                = 0xc118691e
-	SIOCGLIFPHYADDR             = 0xc1186943
-	SIOCGLOWAT                  = 0x40047303
-	SIOCGPGRP                   = 0x40047309
-	SIOCIFCREATE                = 0xc0206978
-	SIOCIFDESTROY               = 0x80206979
-	SIOCRSLVMULTI               = 0xc008693b
-	SIOCSETVLAN                 = 0x8020697e
-	SIOCSHIWAT                  = 0x80047300
-	SIOCSIFADDR                 = 0x8020690c
-	SIOCSIFALTMTU               = 0x80206945
-	SIOCSIFASYNCMAP             = 0x8020697d
-	SIOCSIFBOND                 = 0x80206946
-	SIOCSIFBRDADDR              = 0x80206913
-	SIOCSIFDSTADDR              = 0x8020690e
-	SIOCSIFFLAGS                = 0x80206910
-	SIOCSIFGENERIC              = 0x80206939
-	SIOCSIFKPI                  = 0x80206986
-	SIOCSIFLLADDR               = 0x8020693c
-	SIOCSIFMAC                  = 0x80206983
-	SIOCSIFMEDIA                = 0xc0206937
-	SIOCSIFMETRIC               = 0x80206918
-	SIOCSIFMTU                  = 0x80206934
-	SIOCSIFNETMASK              = 0x80206916
-	SIOCSIFPHYADDR              = 0x8040693e
-	SIOCSIFPHYS                 = 0x80206936
-	SIOCSIFVLAN                 = 0x8020697e
-	SIOCSLIFPHYADDR             = 0x81186942
-	SIOCSLOWAT                  = 0x80047302
-	SIOCSPGRP                   = 0x80047308
-	SOCK_DGRAM                  = 0x2
-	SOCK_MAXADDRLEN             = 0xff
-	SOCK_RAW                    = 0x3
-	SOCK_RDM                    = 0x4
-	SOCK_SEQPACKET              = 0x5
-	SOCK_STREAM                 = 0x1
-	SOL_SOCKET                  = 0xffff
-	SOMAXCONN                   = 0x80
-	SO_ACCEPTCONN               = 0x2
-	SO_BROADCAST                = 0x20
-	SO_DEBUG                    = 0x1
-	SO_DONTROUTE                = 0x10
-	SO_DONTTRUNC                = 0x2000
-	SO_ERROR                    = 0x1007
-	SO_KEEPALIVE                = 0x8
-	SO_LABEL                    = 0x1010
-	SO_LINGER                   = 0x80
-	SO_LINGER_SEC               = 0x1080
-	SO_NKE                      = 0x1021
-	SO_NOADDRERR                = 0x1023
-	SO_NOSIGPIPE                = 0x1022
-	SO_NOTIFYCONFLICT           = 0x1026
-	SO_NREAD                    = 0x1020
-	SO_NWRITE                   = 0x1024
-	SO_OOBINLINE                = 0x100
-	SO_PEERLABEL                = 0x1011
-	SO_RCVBUF                   = 0x1002
-	SO_RCVLOWAT                 = 0x1004
-	SO_RCVTIMEO                 = 0x1006
-	SO_RESTRICTIONS             = 0x1081
-	SO_RESTRICT_DENYIN          = 0x1
-	SO_RESTRICT_DENYOUT         = 0x2
-	SO_RESTRICT_DENYSET         = 0x80000000
-	SO_REUSEADDR                = 0x4
-	SO_REUSEPORT                = 0x200
-	SO_REUSESHAREUID            = 0x1025
-	SO_SNDBUF                   = 0x1001
-	SO_SNDLOWAT                 = 0x1003
-	SO_SNDTIMEO                 = 0x1005
-	SO_TIMESTAMP                = 0x400
-	SO_TYPE                     = 0x1008
-	SO_UPCALLCLOSEWAIT          = 0x1027
-	SO_USELOOPBACK              = 0x40
-	SO_WANTMORE                 = 0x4000
-	SO_WANTOOBFLAG              = 0x8000
-	S_IEXEC                     = 0x40
-	S_IFBLK                     = 0x6000
-	S_IFCHR                     = 0x2000
-	S_IFDIR                     = 0x4000
-	S_IFIFO                     = 0x1000
-	S_IFLNK                     = 0xa000
-	S_IFMT                      = 0xf000
-	S_IFREG                     = 0x8000
-	S_IFSOCK                    = 0xc000
-	S_IFWHT                     = 0xe000
-	S_IFXATTR                   = 0x10000
-	S_IREAD                     = 0x100
-	S_IRGRP                     = 0x20
-	S_IROTH                     = 0x4
-	S_IRUSR                     = 0x100
-	S_IRWXG                     = 0x38
-	S_IRWXO                     = 0x7
-	S_IRWXU                     = 0x1c0
-	S_ISGID                     = 0x400
-	S_ISTXT                     = 0x200
-	S_ISUID                     = 0x800
-	S_ISVTX                     = 0x200
-	S_IWGRP                     = 0x10
-	S_IWOTH                     = 0x2
-	S_IWRITE                    = 0x80
-	S_IWUSR                     = 0x80
-	S_IXGRP                     = 0x8
-	S_IXOTH                     = 0x1
-	S_IXUSR                     = 0x40
-	TCIFLUSH                    = 0x1
-	TCIOFLUSH                   = 0x3
-	TCOFLUSH                    = 0x2
-	TCP_KEEPALIVE               = 0x10
-	TCP_MAXBURST                = 0x4
-	TCP_MAXHLEN                 = 0x3c
-	TCP_MAXOLEN                 = 0x28
-	TCP_MAXSEG                  = 0x2
-	TCP_MAXWIN                  = 0xffff
-	TCP_MAX_SACK                = 0x3
-	TCP_MAX_WINSHIFT            = 0xe
-	TCP_MINMSS                  = 0xd8
-	TCP_MINMSSOVERLOAD          = 0x3e8
-	TCP_MSS                     = 0x200
-	TCP_NODELAY                 = 0x1
-	TCP_NOOPT                   = 0x8
-	TCP_NOPUSH                  = 0x4
-	TCSAFLUSH                   = 0x2
-	TIOCCBRK                    = 0x2000747a
-	TIOCCDTR                    = 0x20007478
-	TIOCCONS                    = 0x80047462
-	TIOCDCDTIMESTAMP            = 0x40087458
-	TIOCDRAIN                   = 0x2000745e
-	TIOCDSIMICROCODE            = 0x20007455
-	TIOCEXCL                    = 0x2000740d
-	TIOCEXT                     = 0x80047460
-	TIOCFLUSH                   = 0x80047410
-	TIOCGDRAINWAIT              = 0x40047456
-	TIOCGETA                    = 0x402c7413
-	TIOCGETD                    = 0x4004741a
-	TIOCGPGRP                   = 0x40047477
-	TIOCGWINSZ                  = 0x40087468
-	TIOCIXOFF                   = 0x20007480
-	TIOCIXON                    = 0x20007481
-	TIOCMBIC                    = 0x8004746b
-	TIOCMBIS                    = 0x8004746c
-	TIOCMGDTRWAIT               = 0x4004745a
-	TIOCMGET                    = 0x4004746a
-	TIOCMODG                    = 0x40047403
-	TIOCMODS                    = 0x80047404
-	TIOCMSDTRWAIT               = 0x8004745b
-	TIOCMSET                    = 0x8004746d
-	TIOCM_CAR                   = 0x40
-	TIOCM_CD                    = 0x40
-	TIOCM_CTS                   = 0x20
-	TIOCM_DSR                   = 0x100
-	TIOCM_DTR                   = 0x2
-	TIOCM_LE                    = 0x1
-	TIOCM_RI                    = 0x80
-	TIOCM_RNG                   = 0x80
-	TIOCM_RTS                   = 0x4
-	TIOCM_SR                    = 0x10
-	TIOCM_ST                    = 0x8
-	TIOCNOTTY                   = 0x20007471
-	TIOCNXCL                    = 0x2000740e
-	TIOCOUTQ                    = 0x40047473
-	TIOCPKT                     = 0x80047470
-	TIOCPKT_DATA                = 0x0
-	TIOCPKT_DOSTOP              = 0x20
-	TIOCPKT_FLUSHREAD           = 0x1
-	TIOCPKT_FLUSHWRITE          = 0x2
-	TIOCPKT_IOCTL               = 0x40
-	TIOCPKT_NOSTOP              = 0x10
-	TIOCPKT_START               = 0x8
-	TIOCPKT_STOP                = 0x4
-	TIOCPTYGNAME                = 0x40807453
-	TIOCPTYGRANT                = 0x20007454
-	TIOCPTYUNLK                 = 0x20007452
-	TIOCREMOTE                  = 0x80047469
-	TIOCSBRK                    = 0x2000747b
-	TIOCSCONS                   = 0x20007463
-	TIOCSCTTY                   = 0x20007461
-	TIOCSDRAINWAIT              = 0x80047457
-	TIOCSDTR                    = 0x20007479
-	TIOCSETA                    = 0x802c7414
-	TIOCSETAF                   = 0x802c7416
-	TIOCSETAW                   = 0x802c7415
-	TIOCSETD                    = 0x8004741b
-	TIOCSIG                     = 0x2000745f
-	TIOCSPGRP                   = 0x80047476
-	TIOCSTART                   = 0x2000746e
-	TIOCSTAT                    = 0x20007465
-	TIOCSTI                     = 0x80017472
-	TIOCSTOP                    = 0x2000746f
-	TIOCSWINSZ                  = 0x80087467
-	TIOCTIMESTAMP               = 0x40087459
-	TIOCUCNTL                   = 0x80047466
-	TOSTOP                      = 0x400000
-	VDISCARD                    = 0xf
-	VDSUSP                      = 0xb
-	VEOF                        = 0x0
-	VEOL                        = 0x1
-	VEOL2                       = 0x2
-	VERASE                      = 0x3
-	VINTR                       = 0x8
-	VKILL                       = 0x5
-	VLNEXT                      = 0xe
-	VMIN                        = 0x10
-	VQUIT                       = 0x9
-	VREPRINT                    = 0x6
-	VSTART                      = 0xc
-	VSTATUS                     = 0x12
-	VSTOP                       = 0xd
-	VSUSP                       = 0xa
-	VT0                         = 0x0
-	VT1                         = 0x10000
-	VTDLY                       = 0x10000
-	VTIME                       = 0x11
-	VWERASE                     = 0x4
-	WCONTINUED                  = 0x10
-	WCOREFLAG                   = 0x80
-	WEXITED                     = 0x4
-	WNOHANG                     = 0x1
-	WNOWAIT                     = 0x20
-	WORDSIZE                    = 0x20
-	WSTOPPED                    = 0x8
-	WUNTRACED                   = 0x2
-)
-
-// Errors
-const (
-	E2BIG           = Errno(0x7)
-	EACCES          = Errno(0xd)
-	EADDRINUSE      = Errno(0x30)
-	EADDRNOTAVAIL   = Errno(0x31)
-	EAFNOSUPPORT    = Errno(0x2f)
-	EAGAIN          = Errno(0x23)
-	EALREADY        = Errno(0x25)
-	EAUTH           = Errno(0x50)
-	EBADARCH        = Errno(0x56)
-	EBADEXEC        = Errno(0x55)
-	EBADF           = Errno(0x9)
-	EBADMACHO       = Errno(0x58)
-	EBADMSG         = Errno(0x5e)
-	EBADRPC         = Errno(0x48)
-	EBUSY           = Errno(0x10)
-	ECANCELED       = Errno(0x59)
-	ECHILD          = Errno(0xa)
-	ECONNABORTED    = Errno(0x35)
-	ECONNREFUSED    = Errno(0x3d)
-	ECONNRESET      = Errno(0x36)
-	EDEADLK         = Errno(0xb)
-	EDESTADDRREQ    = Errno(0x27)
-	EDEVERR         = Errno(0x53)
-	EDOM            = Errno(0x21)
-	EDQUOT          = Errno(0x45)
-	EEXIST          = Errno(0x11)
-	EFAULT          = Errno(0xe)
-	EFBIG           = Errno(0x1b)
-	EFTYPE          = Errno(0x4f)
-	EHOSTDOWN       = Errno(0x40)
-	EHOSTUNREACH    = Errno(0x41)
-	EIDRM           = Errno(0x5a)
-	EILSEQ          = Errno(0x5c)
-	EINPROGRESS     = Errno(0x24)
-	EINTR           = Errno(0x4)
-	EINVAL          = Errno(0x16)
-	EIO             = Errno(0x5)
-	EISCONN         = Errno(0x38)
-	EISDIR          = Errno(0x15)
-	ELAST           = Errno(0x67)
-	ELOOP           = Errno(0x3e)
-	EMFILE          = Errno(0x18)
-	EMLINK          = Errno(0x1f)
-	EMSGSIZE        = Errno(0x28)
-	EMULTIHOP       = Errno(0x5f)
-	ENAMETOOLONG    = Errno(0x3f)
-	ENEEDAUTH       = Errno(0x51)
-	ENETDOWN        = Errno(0x32)
-	ENETRESET       = Errno(0x34)
-	ENETUNREACH     = Errno(0x33)
-	ENFILE          = Errno(0x17)
-	ENOATTR         = Errno(0x5d)
-	ENOBUFS         = Errno(0x37)
-	ENODATA         = Errno(0x60)
-	ENODEV          = Errno(0x13)
-	ENOENT          = Errno(0x2)
-	ENOEXEC         = Errno(0x8)
-	ENOLCK          = Errno(0x4d)
-	ENOLINK         = Errno(0x61)
-	ENOMEM          = Errno(0xc)
-	ENOMSG          = Errno(0x5b)
-	ENOPOLICY       = Errno(0x67)
-	ENOPROTOOPT     = Errno(0x2a)
-	ENOSPC          = Errno(0x1c)
-	ENOSR           = Errno(0x62)
-	ENOSTR          = Errno(0x63)
-	ENOSYS          = Errno(0x4e)
-	ENOTBLK         = Errno(0xf)
-	ENOTCONN        = Errno(0x39)
-	ENOTDIR         = Errno(0x14)
-	ENOTEMPTY       = Errno(0x42)
-	ENOTSOCK        = Errno(0x26)
-	ENOTSUP         = Errno(0x2d)
-	ENOTTY          = Errno(0x19)
-	ENXIO           = Errno(0x6)
-	EOPNOTSUPP      = Errno(0x66)
-	EOVERFLOW       = Errno(0x54)
-	EPERM           = Errno(0x1)
-	EPFNOSUPPORT    = Errno(0x2e)
-	EPIPE           = Errno(0x20)
-	EPROCLIM        = Errno(0x43)
-	EPROCUNAVAIL    = Errno(0x4c)
-	EPROGMISMATCH   = Errno(0x4b)
-	EPROGUNAVAIL    = Errno(0x4a)
-	EPROTO          = Errno(0x64)
-	EPROTONOSUPPORT = Errno(0x2b)
-	EPROTOTYPE      = Errno(0x29)
-	EPWROFF         = Errno(0x52)
-	ERANGE          = Errno(0x22)
-	EREMOTE         = Errno(0x47)
-	EROFS           = Errno(0x1e)
-	ERPCMISMATCH    = Errno(0x49)
-	ESHLIBVERS      = Errno(0x57)
-	ESHUTDOWN       = Errno(0x3a)
-	ESOCKTNOSUPPORT = Errno(0x2c)
-	ESPIPE          = Errno(0x1d)
-	ESRCH           = Errno(0x3)
-	ESTALE          = Errno(0x46)
-	ETIME           = Errno(0x65)
-	ETIMEDOUT       = Errno(0x3c)
-	ETOOMANYREFS    = Errno(0x3b)
-	ETXTBSY         = Errno(0x1a)
-	EUSERS          = Errno(0x44)
-	EWOULDBLOCK     = Errno(0x23)
-	EXDEV           = Errno(0x12)
-)
-
-// Signals
-const (
-	SIGABRT   = Signal(0x6)
-	SIGALRM   = Signal(0xe)
-	SIGBUS    = Signal(0xa)
-	SIGCHLD   = Signal(0x14)
-	SIGCONT   = Signal(0x13)
-	SIGEMT    = Signal(0x7)
-	SIGFPE    = Signal(0x8)
-	SIGHUP    = Signal(0x1)
-	SIGILL    = Signal(0x4)
-	SIGINFO   = Signal(0x1d)
-	SIGINT    = Signal(0x2)
-	SIGIO     = Signal(0x17)
-	SIGIOT    = Signal(0x6)
-	SIGKILL   = Signal(0x9)
-	SIGPIPE   = Signal(0xd)
-	SIGPROF   = Signal(0x1b)
-	SIGQUIT   = Signal(0x3)
-	SIGSEGV   = Signal(0xb)
-	SIGSTOP   = Signal(0x11)
-	SIGSYS    = Signal(0xc)
-	SIGTERM   = Signal(0xf)
-	SIGTRAP   = Signal(0x5)
-	SIGTSTP   = Signal(0x12)
-	SIGTTIN   = Signal(0x15)
-	SIGTTOU   = Signal(0x16)
-	SIGURG    = Signal(0x10)
-	SIGUSR1   = Signal(0x1e)
-	SIGUSR2   = Signal(0x1f)
-	SIGVTALRM = Signal(0x1a)
-	SIGWINCH  = Signal(0x1c)
-	SIGXCPU   = Signal(0x18)
-	SIGXFSZ   = Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:   "operation not permitted",
-	2:   "no such file or directory",
-	3:   "no such process",
-	4:   "interrupted system call",
-	5:   "input/output error",
-	6:   "device not configured",
-	7:   "argument list too long",
-	8:   "exec format error",
-	9:   "bad file descriptor",
-	10:  "no child processes",
-	11:  "resource deadlock avoided",
-	12:  "cannot allocate memory",
-	13:  "permission denied",
-	14:  "bad address",
-	15:  "block device required",
-	16:  "resource busy",
-	17:  "file exists",
-	18:  "cross-device link",
-	19:  "operation not supported by device",
-	20:  "not a directory",
-	21:  "is a directory",
-	22:  "invalid argument",
-	23:  "too many open files in system",
-	24:  "too many open files",
-	25:  "inappropriate ioctl for device",
-	26:  "text file busy",
-	27:  "file too large",
-	28:  "no space left on device",
-	29:  "illegal seek",
-	30:  "read-only file system",
-	31:  "too many links",
-	32:  "broken pipe",
-	33:  "numerical argument out of domain",
-	34:  "result too large",
-	35:  "resource temporarily unavailable",
-	36:  "operation now in progress",
-	37:  "operation already in progress",
-	38:  "socket operation on non-socket",
-	39:  "destination address required",
-	40:  "message too long",
-	41:  "protocol wrong type for socket",
-	42:  "protocol not available",
-	43:  "protocol not supported",
-	44:  "socket type not supported",
-	45:  "operation not supported",
-	46:  "protocol family not supported",
-	47:  "address family not supported by protocol family",
-	48:  "address already in use",
-	49:  "can't assign requested address",
-	50:  "network is down",
-	51:  "network is unreachable",
-	52:  "network dropped connection on reset",
-	53:  "software caused connection abort",
-	54:  "connection reset by peer",
-	55:  "no buffer space available",
-	56:  "socket is already connected",
-	57:  "socket is not connected",
-	58:  "can't send after socket shutdown",
-	59:  "too many references: can't splice",
-	60:  "operation timed out",
-	61:  "connection refused",
-	62:  "too many levels of symbolic links",
-	63:  "file name too long",
-	64:  "host is down",
-	65:  "no route to host",
-	66:  "directory not empty",
-	67:  "too many processes",
-	68:  "too many users",
-	69:  "disc quota exceeded",
-	70:  "stale NFS file handle",
-	71:  "too many levels of remote in path",
-	72:  "RPC struct is bad",
-	73:  "RPC version wrong",
-	74:  "RPC prog. not avail",
-	75:  "program version wrong",
-	76:  "bad procedure for program",
-	77:  "no locks available",
-	78:  "function not implemented",
-	79:  "inappropriate file type or format",
-	80:  "authentication error",
-	81:  "need authenticator",
-	82:  "device power is off",
-	83:  "device error",
-	84:  "value too large to be stored in data type",
-	85:  "bad executable (or shared library)",
-	86:  "bad CPU type in executable",
-	87:  "shared library version mismatch",
-	88:  "malformed Mach-o file",
-	89:  "operation canceled",
-	90:  "identifier removed",
-	91:  "no message of desired type",
-	92:  "illegal byte sequence",
-	93:  "attribute not found",
-	94:  "bad message",
-	95:  "EMULTIHOP (Reserved)",
-	96:  "no message available on STREAM",
-	97:  "ENOLINK (Reserved)",
-	98:  "no STREAM resources",
-	99:  "not a STREAM",
-	100: "protocol error",
-	101: "STREAM ioctl timeout",
-	102: "operation not supported on socket",
-	103: "policy not found",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/BPT trap",
-	6:  "abort trap",
-	7:  "EMT trap",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "bus error",
-	11: "segmentation fault",
-	12: "bad system call",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "urgent I/O condition",
-	17: "suspended (signal)",
-	18: "suspended",
-	19: "continued",
-	20: "child exited",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "I/O possible",
-	24: "cputime limit exceeded",
-	25: "filesize limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window size changes",
-	29: "information request",
-	30: "user defined signal 1",
-	31: "user defined signal 2",
-}
diff --git a/src/syscall/zerrors_darwin_arm64.go b/src/syscall/zerrors_darwin_arm64.go
deleted file mode 100644
index 98f431c..0000000
--- a/src/syscall/zerrors_darwin_arm64.go
+++ /dev/null
@@ -1,1436 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-// +build arm64,darwin
-
-package syscall
-
-const (
-	AF_APPLETALK                      = 0x10
-	AF_CCITT                          = 0xa
-	AF_CHAOS                          = 0x5
-	AF_CNT                            = 0x15
-	AF_COIP                           = 0x14
-	AF_DATAKIT                        = 0x9
-	AF_DECnet                         = 0xc
-	AF_DLI                            = 0xd
-	AF_E164                           = 0x1c
-	AF_ECMA                           = 0x8
-	AF_HYLINK                         = 0xf
-	AF_IEEE80211                      = 0x25
-	AF_IMPLINK                        = 0x3
-	AF_INET                           = 0x2
-	AF_INET6                          = 0x1e
-	AF_IPX                            = 0x17
-	AF_ISDN                           = 0x1c
-	AF_ISO                            = 0x7
-	AF_LAT                            = 0xe
-	AF_LINK                           = 0x12
-	AF_LOCAL                          = 0x1
-	AF_MAX                            = 0x28
-	AF_NATM                           = 0x1f
-	AF_NDRV                           = 0x1b
-	AF_NETBIOS                        = 0x21
-	AF_NS                             = 0x6
-	AF_OSI                            = 0x7
-	AF_PPP                            = 0x22
-	AF_PUP                            = 0x4
-	AF_RESERVED_36                    = 0x24
-	AF_ROUTE                          = 0x11
-	AF_SIP                            = 0x18
-	AF_SNA                            = 0xb
-	AF_SYSTEM                         = 0x20
-	AF_UNIX                           = 0x1
-	AF_UNSPEC                         = 0x0
-	AF_UTUN                           = 0x26
-	B0                                = 0x0
-	B110                              = 0x6e
-	B115200                           = 0x1c200
-	B1200                             = 0x4b0
-	B134                              = 0x86
-	B14400                            = 0x3840
-	B150                              = 0x96
-	B1800                             = 0x708
-	B19200                            = 0x4b00
-	B200                              = 0xc8
-	B230400                           = 0x38400
-	B2400                             = 0x960
-	B28800                            = 0x7080
-	B300                              = 0x12c
-	B38400                            = 0x9600
-	B4800                             = 0x12c0
-	B50                               = 0x32
-	B57600                            = 0xe100
-	B600                              = 0x258
-	B7200                             = 0x1c20
-	B75                               = 0x4b
-	B76800                            = 0x12c00
-	B9600                             = 0x2580
-	BIOCFLUSH                         = 0x20004268
-	BIOCGBLEN                         = 0x40044266
-	BIOCGDLT                          = 0x4004426a
-	BIOCGDLTLIST                      = 0xc00c4279
-	BIOCGETIF                         = 0x4020426b
-	BIOCGHDRCMPLT                     = 0x40044274
-	BIOCGRSIG                         = 0x40044272
-	BIOCGRTIMEOUT                     = 0x4010426e
-	BIOCGSEESENT                      = 0x40044276
-	BIOCGSTATS                        = 0x4008426f
-	BIOCIMMEDIATE                     = 0x80044270
-	BIOCPROMISC                       = 0x20004269
-	BIOCSBLEN                         = 0xc0044266
-	BIOCSDLT                          = 0x80044278
-	BIOCSETF                          = 0x80104267
-	BIOCSETIF                         = 0x8020426c
-	BIOCSHDRCMPLT                     = 0x80044275
-	BIOCSRSIG                         = 0x80044273
-	BIOCSRTIMEOUT                     = 0x8010426d
-	BIOCSSEESENT                      = 0x80044277
-	BIOCVERSION                       = 0x40044271
-	BPF_A                             = 0x10
-	BPF_ABS                           = 0x20
-	BPF_ADD                           = 0x0
-	BPF_ALIGNMENT                     = 0x4
-	BPF_ALU                           = 0x4
-	BPF_AND                           = 0x50
-	BPF_B                             = 0x10
-	BPF_DIV                           = 0x30
-	BPF_H                             = 0x8
-	BPF_IMM                           = 0x0
-	BPF_IND                           = 0x40
-	BPF_JA                            = 0x0
-	BPF_JEQ                           = 0x10
-	BPF_JGE                           = 0x30
-	BPF_JGT                           = 0x20
-	BPF_JMP                           = 0x5
-	BPF_JSET                          = 0x40
-	BPF_K                             = 0x0
-	BPF_LD                            = 0x0
-	BPF_LDX                           = 0x1
-	BPF_LEN                           = 0x80
-	BPF_LSH                           = 0x60
-	BPF_MAJOR_VERSION                 = 0x1
-	BPF_MAXBUFSIZE                    = 0x80000
-	BPF_MAXINSNS                      = 0x200
-	BPF_MEM                           = 0x60
-	BPF_MEMWORDS                      = 0x10
-	BPF_MINBUFSIZE                    = 0x20
-	BPF_MINOR_VERSION                 = 0x1
-	BPF_MISC                          = 0x7
-	BPF_MSH                           = 0xa0
-	BPF_MUL                           = 0x20
-	BPF_NEG                           = 0x80
-	BPF_OR                            = 0x40
-	BPF_RELEASE                       = 0x30bb6
-	BPF_RET                           = 0x6
-	BPF_RSH                           = 0x70
-	BPF_ST                            = 0x2
-	BPF_STX                           = 0x3
-	BPF_SUB                           = 0x10
-	BPF_TAX                           = 0x0
-	BPF_TXA                           = 0x80
-	BPF_W                             = 0x0
-	BPF_X                             = 0x8
-	BRKINT                            = 0x2
-	CFLUSH                            = 0xf
-	CLOCAL                            = 0x8000
-	CREAD                             = 0x800
-	CS5                               = 0x0
-	CS6                               = 0x100
-	CS7                               = 0x200
-	CS8                               = 0x300
-	CSIZE                             = 0x300
-	CSTART                            = 0x11
-	CSTATUS                           = 0x14
-	CSTOP                             = 0x13
-	CSTOPB                            = 0x400
-	CSUSP                             = 0x1a
-	CTL_MAXNAME                       = 0xc
-	CTL_NET                           = 0x4
-	DLT_APPLE_IP_OVER_IEEE1394        = 0x8a
-	DLT_ARCNET                        = 0x7
-	DLT_ATM_CLIP                      = 0x13
-	DLT_ATM_RFC1483                   = 0xb
-	DLT_AX25                          = 0x3
-	DLT_CHAOS                         = 0x5
-	DLT_CHDLC                         = 0x68
-	DLT_C_HDLC                        = 0x68
-	DLT_EN10MB                        = 0x1
-	DLT_EN3MB                         = 0x2
-	DLT_FDDI                          = 0xa
-	DLT_IEEE802                       = 0x6
-	DLT_IEEE802_11                    = 0x69
-	DLT_IEEE802_11_RADIO              = 0x7f
-	DLT_IEEE802_11_RADIO_AVS          = 0xa3
-	DLT_LINUX_SLL                     = 0x71
-	DLT_LOOP                          = 0x6c
-	DLT_NULL                          = 0x0
-	DLT_PFLOG                         = 0x75
-	DLT_PFSYNC                        = 0x12
-	DLT_PPP                           = 0x9
-	DLT_PPP_BSDOS                     = 0x10
-	DLT_PPP_SERIAL                    = 0x32
-	DLT_PRONET                        = 0x4
-	DLT_RAW                           = 0xc
-	DLT_SLIP                          = 0x8
-	DLT_SLIP_BSDOS                    = 0xf
-	DT_BLK                            = 0x6
-	DT_CHR                            = 0x2
-	DT_DIR                            = 0x4
-	DT_FIFO                           = 0x1
-	DT_LNK                            = 0xa
-	DT_REG                            = 0x8
-	DT_SOCK                           = 0xc
-	DT_UNKNOWN                        = 0x0
-	DT_WHT                            = 0xe
-	ECHO                              = 0x8
-	ECHOCTL                           = 0x40
-	ECHOE                             = 0x2
-	ECHOK                             = 0x4
-	ECHOKE                            = 0x1
-	ECHONL                            = 0x10
-	ECHOPRT                           = 0x20
-	EVFILT_AIO                        = -0x3
-	EVFILT_FS                         = -0x9
-	EVFILT_MACHPORT                   = -0x8
-	EVFILT_PROC                       = -0x5
-	EVFILT_READ                       = -0x1
-	EVFILT_SIGNAL                     = -0x6
-	EVFILT_SYSCOUNT                   = 0xe
-	EVFILT_THREADMARKER               = 0xe
-	EVFILT_TIMER                      = -0x7
-	EVFILT_USER                       = -0xa
-	EVFILT_VM                         = -0xc
-	EVFILT_VNODE                      = -0x4
-	EVFILT_WRITE                      = -0x2
-	EV_ADD                            = 0x1
-	EV_CLEAR                          = 0x20
-	EV_DELETE                         = 0x2
-	EV_DISABLE                        = 0x8
-	EV_DISPATCH                       = 0x80
-	EV_ENABLE                         = 0x4
-	EV_EOF                            = 0x8000
-	EV_ERROR                          = 0x4000
-	EV_FLAG0                          = 0x1000
-	EV_FLAG1                          = 0x2000
-	EV_ONESHOT                        = 0x10
-	EV_OOBAND                         = 0x2000
-	EV_POLL                           = 0x1000
-	EV_RECEIPT                        = 0x40
-	EV_SYSFLAGS                       = 0xf000
-	EXTA                              = 0x4b00
-	EXTB                              = 0x9600
-	EXTPROC                           = 0x800
-	FD_CLOEXEC                        = 0x1
-	FD_SETSIZE                        = 0x400
-	FLUSHO                            = 0x800000
-	F_ADDFILESIGS                     = 0x3d
-	F_ADDSIGS                         = 0x3b
-	F_ALLOCATEALL                     = 0x4
-	F_ALLOCATECONTIG                  = 0x2
-	F_CHKCLEAN                        = 0x29
-	F_DUPFD                           = 0x0
-	F_DUPFD_CLOEXEC                   = 0x43
-	F_FINDSIGS                        = 0x4e
-	F_FLUSH_DATA                      = 0x28
-	F_FREEZE_FS                       = 0x35
-	F_FULLFSYNC                       = 0x33
-	F_GETCODEDIR                      = 0x48
-	F_GETFD                           = 0x1
-	F_GETFL                           = 0x3
-	F_GETLK                           = 0x7
-	F_GETLKPID                        = 0x42
-	F_GETNOSIGPIPE                    = 0x4a
-	F_GETOWN                          = 0x5
-	F_GETPATH                         = 0x32
-	F_GETPATH_MTMINFO                 = 0x47
-	F_GETPROTECTIONCLASS              = 0x3f
-	F_GETPROTECTIONLEVEL              = 0x4d
-	F_GLOBAL_NOCACHE                  = 0x37
-	F_LOG2PHYS                        = 0x31
-	F_LOG2PHYS_EXT                    = 0x41
-	F_NOCACHE                         = 0x30
-	F_NODIRECT                        = 0x3e
-	F_OK                              = 0x0
-	F_PATHPKG_CHECK                   = 0x34
-	F_PEOFPOSMODE                     = 0x3
-	F_PREALLOCATE                     = 0x2a
-	F_RDADVISE                        = 0x2c
-	F_RDAHEAD                         = 0x2d
-	F_RDLCK                           = 0x1
-	F_SETBACKINGSTORE                 = 0x46
-	F_SETFD                           = 0x2
-	F_SETFL                           = 0x4
-	F_SETLK                           = 0x8
-	F_SETLKW                          = 0x9
-	F_SETLKWTIMEOUT                   = 0xa
-	F_SETNOSIGPIPE                    = 0x49
-	F_SETOWN                          = 0x6
-	F_SETPROTECTIONCLASS              = 0x40
-	F_SETSIZE                         = 0x2b
-	F_SINGLE_WRITER                   = 0x4c
-	F_THAW_FS                         = 0x36
-	F_TRANSCODEKEY                    = 0x4b
-	F_UNLCK                           = 0x2
-	F_VOLPOSMODE                      = 0x4
-	F_WRLCK                           = 0x3
-	HUPCL                             = 0x4000
-	ICANON                            = 0x100
-	ICMP6_FILTER                      = 0x12
-	ICRNL                             = 0x100
-	IEXTEN                            = 0x400
-	IFF_ALLMULTI                      = 0x200
-	IFF_ALTPHYS                       = 0x4000
-	IFF_BROADCAST                     = 0x2
-	IFF_DEBUG                         = 0x4
-	IFF_LINK0                         = 0x1000
-	IFF_LINK1                         = 0x2000
-	IFF_LINK2                         = 0x4000
-	IFF_LOOPBACK                      = 0x8
-	IFF_MULTICAST                     = 0x8000
-	IFF_NOARP                         = 0x80
-	IFF_NOTRAILERS                    = 0x20
-	IFF_OACTIVE                       = 0x400
-	IFF_POINTOPOINT                   = 0x10
-	IFF_PROMISC                       = 0x100
-	IFF_RUNNING                       = 0x40
-	IFF_SIMPLEX                       = 0x800
-	IFF_UP                            = 0x1
-	IFNAMSIZ                          = 0x10
-	IFT_1822                          = 0x2
-	IFT_AAL5                          = 0x31
-	IFT_ARCNET                        = 0x23
-	IFT_ARCNETPLUS                    = 0x24
-	IFT_ATM                           = 0x25
-	IFT_BRIDGE                        = 0xd1
-	IFT_CARP                          = 0xf8
-	IFT_CELLULAR                      = 0xff
-	IFT_CEPT                          = 0x13
-	IFT_DS3                           = 0x1e
-	IFT_ENC                           = 0xf4
-	IFT_EON                           = 0x19
-	IFT_ETHER                         = 0x6
-	IFT_FAITH                         = 0x38
-	IFT_FDDI                          = 0xf
-	IFT_FRELAY                        = 0x20
-	IFT_FRELAYDCE                     = 0x2c
-	IFT_GIF                           = 0x37
-	IFT_HDH1822                       = 0x3
-	IFT_HIPPI                         = 0x2f
-	IFT_HSSI                          = 0x2e
-	IFT_HY                            = 0xe
-	IFT_IEEE1394                      = 0x90
-	IFT_IEEE8023ADLAG                 = 0x88
-	IFT_ISDNBASIC                     = 0x14
-	IFT_ISDNPRIMARY                   = 0x15
-	IFT_ISO88022LLC                   = 0x29
-	IFT_ISO88023                      = 0x7
-	IFT_ISO88024                      = 0x8
-	IFT_ISO88025                      = 0x9
-	IFT_ISO88026                      = 0xa
-	IFT_L2VLAN                        = 0x87
-	IFT_LAPB                          = 0x10
-	IFT_LOCALTALK                     = 0x2a
-	IFT_LOOP                          = 0x18
-	IFT_MIOX25                        = 0x26
-	IFT_MODEM                         = 0x30
-	IFT_NSIP                          = 0x1b
-	IFT_OTHER                         = 0x1
-	IFT_P10                           = 0xc
-	IFT_P80                           = 0xd
-	IFT_PARA                          = 0x22
-	IFT_PDP                           = 0xff
-	IFT_PFLOG                         = 0xf5
-	IFT_PFSYNC                        = 0xf6
-	IFT_PPP                           = 0x17
-	IFT_PROPMUX                       = 0x36
-	IFT_PROPVIRTUAL                   = 0x35
-	IFT_PTPSERIAL                     = 0x16
-	IFT_RS232                         = 0x21
-	IFT_SDLC                          = 0x11
-	IFT_SIP                           = 0x1f
-	IFT_SLIP                          = 0x1c
-	IFT_SMDSDXI                       = 0x2b
-	IFT_SMDSICIP                      = 0x34
-	IFT_SONET                         = 0x27
-	IFT_SONETPATH                     = 0x32
-	IFT_SONETVT                       = 0x33
-	IFT_STARLAN                       = 0xb
-	IFT_STF                           = 0x39
-	IFT_T1                            = 0x12
-	IFT_ULTRA                         = 0x1d
-	IFT_V35                           = 0x2d
-	IFT_X25                           = 0x5
-	IFT_X25DDN                        = 0x4
-	IFT_X25PLE                        = 0x28
-	IFT_XETHER                        = 0x1a
-	IGNBRK                            = 0x1
-	IGNCR                             = 0x80
-	IGNPAR                            = 0x4
-	IMAXBEL                           = 0x2000
-	INLCR                             = 0x40
-	INPCK                             = 0x10
-	IN_CLASSA_HOST                    = 0xffffff
-	IN_CLASSA_MAX                     = 0x80
-	IN_CLASSA_NET                     = 0xff000000
-	IN_CLASSA_NSHIFT                  = 0x18
-	IN_CLASSB_HOST                    = 0xffff
-	IN_CLASSB_MAX                     = 0x10000
-	IN_CLASSB_NET                     = 0xffff0000
-	IN_CLASSB_NSHIFT                  = 0x10
-	IN_CLASSC_HOST                    = 0xff
-	IN_CLASSC_NET                     = 0xffffff00
-	IN_CLASSC_NSHIFT                  = 0x8
-	IN_CLASSD_HOST                    = 0xfffffff
-	IN_CLASSD_NET                     = 0xf0000000
-	IN_CLASSD_NSHIFT                  = 0x1c
-	IN_LINKLOCALNETNUM                = 0xa9fe0000
-	IN_LOOPBACKNET                    = 0x7f
-	IPPROTO_3PC                       = 0x22
-	IPPROTO_ADFS                      = 0x44
-	IPPROTO_AH                        = 0x33
-	IPPROTO_AHIP                      = 0x3d
-	IPPROTO_APES                      = 0x63
-	IPPROTO_ARGUS                     = 0xd
-	IPPROTO_AX25                      = 0x5d
-	IPPROTO_BHA                       = 0x31
-	IPPROTO_BLT                       = 0x1e
-	IPPROTO_BRSATMON                  = 0x4c
-	IPPROTO_CFTP                      = 0x3e
-	IPPROTO_CHAOS                     = 0x10
-	IPPROTO_CMTP                      = 0x26
-	IPPROTO_CPHB                      = 0x49
-	IPPROTO_CPNX                      = 0x48
-	IPPROTO_DDP                       = 0x25
-	IPPROTO_DGP                       = 0x56
-	IPPROTO_DIVERT                    = 0xfe
-	IPPROTO_DONE                      = 0x101
-	IPPROTO_DSTOPTS                   = 0x3c
-	IPPROTO_EGP                       = 0x8
-	IPPROTO_EMCON                     = 0xe
-	IPPROTO_ENCAP                     = 0x62
-	IPPROTO_EON                       = 0x50
-	IPPROTO_ESP                       = 0x32
-	IPPROTO_ETHERIP                   = 0x61
-	IPPROTO_FRAGMENT                  = 0x2c
-	IPPROTO_GGP                       = 0x3
-	IPPROTO_GMTP                      = 0x64
-	IPPROTO_GRE                       = 0x2f
-	IPPROTO_HELLO                     = 0x3f
-	IPPROTO_HMP                       = 0x14
-	IPPROTO_HOPOPTS                   = 0x0
-	IPPROTO_ICMP                      = 0x1
-	IPPROTO_ICMPV6                    = 0x3a
-	IPPROTO_IDP                       = 0x16
-	IPPROTO_IDPR                      = 0x23
-	IPPROTO_IDRP                      = 0x2d
-	IPPROTO_IGMP                      = 0x2
-	IPPROTO_IGP                       = 0x55
-	IPPROTO_IGRP                      = 0x58
-	IPPROTO_IL                        = 0x28
-	IPPROTO_INLSP                     = 0x34
-	IPPROTO_INP                       = 0x20
-	IPPROTO_IP                        = 0x0
-	IPPROTO_IPCOMP                    = 0x6c
-	IPPROTO_IPCV                      = 0x47
-	IPPROTO_IPEIP                     = 0x5e
-	IPPROTO_IPIP                      = 0x4
-	IPPROTO_IPPC                      = 0x43
-	IPPROTO_IPV4                      = 0x4
-	IPPROTO_IPV6                      = 0x29
-	IPPROTO_IRTP                      = 0x1c
-	IPPROTO_KRYPTOLAN                 = 0x41
-	IPPROTO_LARP                      = 0x5b
-	IPPROTO_LEAF1                     = 0x19
-	IPPROTO_LEAF2                     = 0x1a
-	IPPROTO_MAX                       = 0x100
-	IPPROTO_MAXID                     = 0x34
-	IPPROTO_MEAS                      = 0x13
-	IPPROTO_MHRP                      = 0x30
-	IPPROTO_MICP                      = 0x5f
-	IPPROTO_MTP                       = 0x5c
-	IPPROTO_MUX                       = 0x12
-	IPPROTO_ND                        = 0x4d
-	IPPROTO_NHRP                      = 0x36
-	IPPROTO_NONE                      = 0x3b
-	IPPROTO_NSP                       = 0x1f
-	IPPROTO_NVPII                     = 0xb
-	IPPROTO_OSPFIGP                   = 0x59
-	IPPROTO_PGM                       = 0x71
-	IPPROTO_PIGP                      = 0x9
-	IPPROTO_PIM                       = 0x67
-	IPPROTO_PRM                       = 0x15
-	IPPROTO_PUP                       = 0xc
-	IPPROTO_PVP                       = 0x4b
-	IPPROTO_RAW                       = 0xff
-	IPPROTO_RCCMON                    = 0xa
-	IPPROTO_RDP                       = 0x1b
-	IPPROTO_ROUTING                   = 0x2b
-	IPPROTO_RSVP                      = 0x2e
-	IPPROTO_RVD                       = 0x42
-	IPPROTO_SATEXPAK                  = 0x40
-	IPPROTO_SATMON                    = 0x45
-	IPPROTO_SCCSP                     = 0x60
-	IPPROTO_SCTP                      = 0x84
-	IPPROTO_SDRP                      = 0x2a
-	IPPROTO_SEP                       = 0x21
-	IPPROTO_SRPC                      = 0x5a
-	IPPROTO_ST                        = 0x7
-	IPPROTO_SVMTP                     = 0x52
-	IPPROTO_SWIPE                     = 0x35
-	IPPROTO_TCF                       = 0x57
-	IPPROTO_TCP                       = 0x6
-	IPPROTO_TP                        = 0x1d
-	IPPROTO_TPXX                      = 0x27
-	IPPROTO_TRUNK1                    = 0x17
-	IPPROTO_TRUNK2                    = 0x18
-	IPPROTO_TTP                       = 0x54
-	IPPROTO_UDP                       = 0x11
-	IPPROTO_VINES                     = 0x53
-	IPPROTO_VISA                      = 0x46
-	IPPROTO_VMTP                      = 0x51
-	IPPROTO_WBEXPAK                   = 0x4f
-	IPPROTO_WBMON                     = 0x4e
-	IPPROTO_WSN                       = 0x4a
-	IPPROTO_XNET                      = 0xf
-	IPPROTO_XTP                       = 0x24
-	IPV6_2292DSTOPTS                  = 0x17
-	IPV6_2292HOPLIMIT                 = 0x14
-	IPV6_2292HOPOPTS                  = 0x16
-	IPV6_2292NEXTHOP                  = 0x15
-	IPV6_2292PKTINFO                  = 0x13
-	IPV6_2292PKTOPTIONS               = 0x19
-	IPV6_2292RTHDR                    = 0x18
-	IPV6_BINDV6ONLY                   = 0x1b
-	IPV6_BOUND_IF                     = 0x7d
-	IPV6_CHECKSUM                     = 0x1a
-	IPV6_DEFAULT_MULTICAST_HOPS       = 0x1
-	IPV6_DEFAULT_MULTICAST_LOOP       = 0x1
-	IPV6_DEFHLIM                      = 0x40
-	IPV6_FAITH                        = 0x1d
-	IPV6_FLOWINFO_MASK                = 0xffffff0f
-	IPV6_FLOWLABEL_MASK               = 0xffff0f00
-	IPV6_FRAGTTL                      = 0x78
-	IPV6_FW_ADD                       = 0x1e
-	IPV6_FW_DEL                       = 0x1f
-	IPV6_FW_FLUSH                     = 0x20
-	IPV6_FW_GET                       = 0x22
-	IPV6_FW_ZERO                      = 0x21
-	IPV6_HLIMDEC                      = 0x1
-	IPV6_IPSEC_POLICY                 = 0x1c
-	IPV6_JOIN_GROUP                   = 0xc
-	IPV6_LEAVE_GROUP                  = 0xd
-	IPV6_MAXHLIM                      = 0xff
-	IPV6_MAXOPTHDR                    = 0x800
-	IPV6_MAXPACKET                    = 0xffff
-	IPV6_MAX_GROUP_SRC_FILTER         = 0x200
-	IPV6_MAX_MEMBERSHIPS              = 0xfff
-	IPV6_MAX_SOCK_SRC_FILTER          = 0x80
-	IPV6_MIN_MEMBERSHIPS              = 0x1f
-	IPV6_MMTU                         = 0x500
-	IPV6_MULTICAST_HOPS               = 0xa
-	IPV6_MULTICAST_IF                 = 0x9
-	IPV6_MULTICAST_LOOP               = 0xb
-	IPV6_PORTRANGE                    = 0xe
-	IPV6_PORTRANGE_DEFAULT            = 0x0
-	IPV6_PORTRANGE_HIGH               = 0x1
-	IPV6_PORTRANGE_LOW                = 0x2
-	IPV6_RECVTCLASS                   = 0x23
-	IPV6_RTHDR_LOOSE                  = 0x0
-	IPV6_RTHDR_STRICT                 = 0x1
-	IPV6_RTHDR_TYPE_0                 = 0x0
-	IPV6_SOCKOPT_RESERVED1            = 0x3
-	IPV6_TCLASS                       = 0x24
-	IPV6_UNICAST_HOPS                 = 0x4
-	IPV6_V6ONLY                       = 0x1b
-	IPV6_VERSION                      = 0x60
-	IPV6_VERSION_MASK                 = 0xf0
-	IP_ADD_MEMBERSHIP                 = 0xc
-	IP_ADD_SOURCE_MEMBERSHIP          = 0x46
-	IP_BLOCK_SOURCE                   = 0x48
-	IP_BOUND_IF                       = 0x19
-	IP_DEFAULT_MULTICAST_LOOP         = 0x1
-	IP_DEFAULT_MULTICAST_TTL          = 0x1
-	IP_DF                             = 0x4000
-	IP_DROP_MEMBERSHIP                = 0xd
-	IP_DROP_SOURCE_MEMBERSHIP         = 0x47
-	IP_DUMMYNET_CONFIGURE             = 0x3c
-	IP_DUMMYNET_DEL                   = 0x3d
-	IP_DUMMYNET_FLUSH                 = 0x3e
-	IP_DUMMYNET_GET                   = 0x40
-	IP_FAITH                          = 0x16
-	IP_FW_ADD                         = 0x28
-	IP_FW_DEL                         = 0x29
-	IP_FW_FLUSH                       = 0x2a
-	IP_FW_GET                         = 0x2c
-	IP_FW_RESETLOG                    = 0x2d
-	IP_FW_ZERO                        = 0x2b
-	IP_HDRINCL                        = 0x2
-	IP_IPSEC_POLICY                   = 0x15
-	IP_MAXPACKET                      = 0xffff
-	IP_MAX_GROUP_SRC_FILTER           = 0x200
-	IP_MAX_MEMBERSHIPS                = 0xfff
-	IP_MAX_SOCK_MUTE_FILTER           = 0x80
-	IP_MAX_SOCK_SRC_FILTER            = 0x80
-	IP_MF                             = 0x2000
-	IP_MIN_MEMBERSHIPS                = 0x1f
-	IP_MSFILTER                       = 0x4a
-	IP_MSS                            = 0x240
-	IP_MULTICAST_IF                   = 0x9
-	IP_MULTICAST_IFINDEX              = 0x42
-	IP_MULTICAST_LOOP                 = 0xb
-	IP_MULTICAST_TTL                  = 0xa
-	IP_MULTICAST_VIF                  = 0xe
-	IP_NAT__XXX                       = 0x37
-	IP_OFFMASK                        = 0x1fff
-	IP_OLD_FW_ADD                     = 0x32
-	IP_OLD_FW_DEL                     = 0x33
-	IP_OLD_FW_FLUSH                   = 0x34
-	IP_OLD_FW_GET                     = 0x36
-	IP_OLD_FW_RESETLOG                = 0x38
-	IP_OLD_FW_ZERO                    = 0x35
-	IP_OPTIONS                        = 0x1
-	IP_PKTINFO                        = 0x1a
-	IP_PORTRANGE                      = 0x13
-	IP_PORTRANGE_DEFAULT              = 0x0
-	IP_PORTRANGE_HIGH                 = 0x1
-	IP_PORTRANGE_LOW                  = 0x2
-	IP_RECVDSTADDR                    = 0x7
-	IP_RECVIF                         = 0x14
-	IP_RECVOPTS                       = 0x5
-	IP_RECVPKTINFO                    = 0x1a
-	IP_RECVRETOPTS                    = 0x6
-	IP_RECVTTL                        = 0x18
-	IP_RETOPTS                        = 0x8
-	IP_RF                             = 0x8000
-	IP_RSVP_OFF                       = 0x10
-	IP_RSVP_ON                        = 0xf
-	IP_RSVP_VIF_OFF                   = 0x12
-	IP_RSVP_VIF_ON                    = 0x11
-	IP_STRIPHDR                       = 0x17
-	IP_TOS                            = 0x3
-	IP_TRAFFIC_MGT_BACKGROUND         = 0x41
-	IP_TTL                            = 0x4
-	IP_UNBLOCK_SOURCE                 = 0x49
-	ISIG                              = 0x80
-	ISTRIP                            = 0x20
-	IUTF8                             = 0x4000
-	IXANY                             = 0x800
-	IXOFF                             = 0x400
-	IXON                              = 0x200
-	LOCK_EX                           = 0x2
-	LOCK_NB                           = 0x4
-	LOCK_SH                           = 0x1
-	LOCK_UN                           = 0x8
-	MADV_CAN_REUSE                    = 0x9
-	MADV_DONTNEED                     = 0x4
-	MADV_FREE                         = 0x5
-	MADV_FREE_REUSABLE                = 0x7
-	MADV_FREE_REUSE                   = 0x8
-	MADV_NORMAL                       = 0x0
-	MADV_RANDOM                       = 0x1
-	MADV_SEQUENTIAL                   = 0x2
-	MADV_WILLNEED                     = 0x3
-	MADV_ZERO_WIRED_PAGES             = 0x6
-	MAP_ANON                          = 0x1000
-	MAP_COPY                          = 0x2
-	MAP_FILE                          = 0x0
-	MAP_FIXED                         = 0x10
-	MAP_HASSEMAPHORE                  = 0x200
-	MAP_JIT                           = 0x800
-	MAP_NOCACHE                       = 0x400
-	MAP_NOEXTEND                      = 0x100
-	MAP_NORESERVE                     = 0x40
-	MAP_PRIVATE                       = 0x2
-	MAP_RENAME                        = 0x20
-	MAP_RESERVED0080                  = 0x80
-	MAP_SHARED                        = 0x1
-	MCL_CURRENT                       = 0x1
-	MCL_FUTURE                        = 0x2
-	MSG_CTRUNC                        = 0x20
-	MSG_DONTROUTE                     = 0x4
-	MSG_DONTWAIT                      = 0x80
-	MSG_EOF                           = 0x100
-	MSG_EOR                           = 0x8
-	MSG_FLUSH                         = 0x400
-	MSG_HAVEMORE                      = 0x2000
-	MSG_HOLD                          = 0x800
-	MSG_NEEDSA                        = 0x10000
-	MSG_OOB                           = 0x1
-	MSG_PEEK                          = 0x2
-	MSG_RCVMORE                       = 0x4000
-	MSG_SEND                          = 0x1000
-	MSG_TRUNC                         = 0x10
-	MSG_WAITALL                       = 0x40
-	MSG_WAITSTREAM                    = 0x200
-	MS_ASYNC                          = 0x1
-	MS_DEACTIVATE                     = 0x8
-	MS_INVALIDATE                     = 0x2
-	MS_KILLPAGES                      = 0x4
-	MS_SYNC                           = 0x10
-	NAME_MAX                          = 0xff
-	NET_RT_DUMP                       = 0x1
-	NET_RT_DUMP2                      = 0x7
-	NET_RT_FLAGS                      = 0x2
-	NET_RT_IFLIST                     = 0x3
-	NET_RT_IFLIST2                    = 0x6
-	NET_RT_MAXID                      = 0xa
-	NET_RT_STAT                       = 0x4
-	NET_RT_TRASH                      = 0x5
-	NOFLSH                            = 0x80000000
-	NOTE_ABSOLUTE                     = 0x8
-	NOTE_ATTRIB                       = 0x8
-	NOTE_BACKGROUND                   = 0x40
-	NOTE_CHILD                        = 0x4
-	NOTE_CRITICAL                     = 0x20
-	NOTE_DELETE                       = 0x1
-	NOTE_EXEC                         = 0x20000000
-	NOTE_EXIT                         = 0x80000000
-	NOTE_EXITSTATUS                   = 0x4000000
-	NOTE_EXIT_CSERROR                 = 0x40000
-	NOTE_EXIT_DECRYPTFAIL             = 0x10000
-	NOTE_EXIT_DETAIL                  = 0x2000000
-	NOTE_EXIT_DETAIL_MASK             = 0x70000
-	NOTE_EXIT_MEMORY                  = 0x20000
-	NOTE_EXIT_REPARENTED              = 0x80000
-	NOTE_EXTEND                       = 0x4
-	NOTE_FFAND                        = 0x40000000
-	NOTE_FFCOPY                       = 0xc0000000
-	NOTE_FFCTRLMASK                   = 0xc0000000
-	NOTE_FFLAGSMASK                   = 0xffffff
-	NOTE_FFNOP                        = 0x0
-	NOTE_FFOR                         = 0x80000000
-	NOTE_FORK                         = 0x40000000
-	NOTE_LEEWAY                       = 0x10
-	NOTE_LINK                         = 0x10
-	NOTE_LOWAT                        = 0x1
-	NOTE_NONE                         = 0x80
-	NOTE_NSECONDS                     = 0x4
-	NOTE_PCTRLMASK                    = -0x100000
-	NOTE_PDATAMASK                    = 0xfffff
-	NOTE_REAP                         = 0x10000000
-	NOTE_RENAME                       = 0x20
-	NOTE_REVOKE                       = 0x40
-	NOTE_SECONDS                      = 0x1
-	NOTE_SIGNAL                       = 0x8000000
-	NOTE_TRACK                        = 0x1
-	NOTE_TRACKERR                     = 0x2
-	NOTE_TRIGGER                      = 0x1000000
-	NOTE_USECONDS                     = 0x2
-	NOTE_VM_ERROR                     = 0x10000000
-	NOTE_VM_PRESSURE                  = 0x80000000
-	NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000
-	NOTE_VM_PRESSURE_TERMINATE        = 0x40000000
-	NOTE_WRITE                        = 0x2
-	OCRNL                             = 0x10
-	OFDEL                             = 0x20000
-	OFILL                             = 0x80
-	ONLCR                             = 0x2
-	ONLRET                            = 0x40
-	ONOCR                             = 0x20
-	ONOEOT                            = 0x8
-	OPOST                             = 0x1
-	O_ACCMODE                         = 0x3
-	O_ALERT                           = 0x20000000
-	O_APPEND                          = 0x8
-	O_ASYNC                           = 0x40
-	O_CLOEXEC                         = 0x1000000
-	O_CREAT                           = 0x200
-	O_DIRECTORY                       = 0x100000
-	O_DP_GETRAWENCRYPTED              = 0x1
-	O_DSYNC                           = 0x400000
-	O_EVTONLY                         = 0x8000
-	O_EXCL                            = 0x800
-	O_EXLOCK                          = 0x20
-	O_FSYNC                           = 0x80
-	O_NDELAY                          = 0x4
-	O_NOCTTY                          = 0x20000
-	O_NOFOLLOW                        = 0x100
-	O_NONBLOCK                        = 0x4
-	O_POPUP                           = 0x80000000
-	O_RDONLY                          = 0x0
-	O_RDWR                            = 0x2
-	O_SHLOCK                          = 0x10
-	O_SYMLINK                         = 0x200000
-	O_SYNC                            = 0x80
-	O_TRUNC                           = 0x400
-	O_WRONLY                          = 0x1
-	PARENB                            = 0x1000
-	PARMRK                            = 0x8
-	PARODD                            = 0x2000
-	PENDIN                            = 0x20000000
-	PRIO_PGRP                         = 0x1
-	PRIO_PROCESS                      = 0x0
-	PRIO_USER                         = 0x2
-	PROT_EXEC                         = 0x4
-	PROT_NONE                         = 0x0
-	PROT_READ                         = 0x1
-	PROT_WRITE                        = 0x2
-	PT_ATTACH                         = 0xa
-	PT_ATTACHEXC                      = 0xe
-	PT_CONTINUE                       = 0x7
-	PT_DENY_ATTACH                    = 0x1f
-	PT_DETACH                         = 0xb
-	PT_FIRSTMACH                      = 0x20
-	PT_FORCEQUOTA                     = 0x1e
-	PT_KILL                           = 0x8
-	PT_READ_D                         = 0x2
-	PT_READ_I                         = 0x1
-	PT_READ_U                         = 0x3
-	PT_SIGEXC                         = 0xc
-	PT_STEP                           = 0x9
-	PT_THUPDATE                       = 0xd
-	PT_TRACE_ME                       = 0x0
-	PT_WRITE_D                        = 0x5
-	PT_WRITE_I                        = 0x4
-	PT_WRITE_U                        = 0x6
-	RLIMIT_AS                         = 0x5
-	RLIMIT_CORE                       = 0x4
-	RLIMIT_CPU                        = 0x0
-	RLIMIT_CPU_USAGE_MONITOR          = 0x2
-	RLIMIT_DATA                       = 0x2
-	RLIMIT_FSIZE                      = 0x1
-	RLIMIT_NOFILE                     = 0x8
-	RLIMIT_STACK                      = 0x3
-	RLIM_INFINITY                     = 0x7fffffffffffffff
-	RTAX_AUTHOR                       = 0x6
-	RTAX_BRD                          = 0x7
-	RTAX_DST                          = 0x0
-	RTAX_GATEWAY                      = 0x1
-	RTAX_GENMASK                      = 0x3
-	RTAX_IFA                          = 0x5
-	RTAX_IFP                          = 0x4
-	RTAX_MAX                          = 0x8
-	RTAX_NETMASK                      = 0x2
-	RTA_AUTHOR                        = 0x40
-	RTA_BRD                           = 0x80
-	RTA_DST                           = 0x1
-	RTA_GATEWAY                       = 0x2
-	RTA_GENMASK                       = 0x8
-	RTA_IFA                           = 0x20
-	RTA_IFP                           = 0x10
-	RTA_NETMASK                       = 0x4
-	RTF_BLACKHOLE                     = 0x1000
-	RTF_BROADCAST                     = 0x400000
-	RTF_CLONING                       = 0x100
-	RTF_CONDEMNED                     = 0x2000000
-	RTF_DELCLONE                      = 0x80
-	RTF_DONE                          = 0x40
-	RTF_DYNAMIC                       = 0x10
-	RTF_GATEWAY                       = 0x2
-	RTF_HOST                          = 0x4
-	RTF_IFREF                         = 0x4000000
-	RTF_IFSCOPE                       = 0x1000000
-	RTF_LLINFO                        = 0x400
-	RTF_LOCAL                         = 0x200000
-	RTF_MODIFIED                      = 0x20
-	RTF_MULTICAST                     = 0x800000
-	RTF_PINNED                        = 0x100000
-	RTF_PRCLONING                     = 0x10000
-	RTF_PROTO1                        = 0x8000
-	RTF_PROTO2                        = 0x4000
-	RTF_PROTO3                        = 0x40000
-	RTF_PROXY                         = 0x8000000
-	RTF_REJECT                        = 0x8
-	RTF_ROUTER                        = 0x10000000
-	RTF_STATIC                        = 0x800
-	RTF_UP                            = 0x1
-	RTF_WASCLONED                     = 0x20000
-	RTF_XRESOLVE                      = 0x200
-	RTM_ADD                           = 0x1
-	RTM_CHANGE                        = 0x3
-	RTM_DELADDR                       = 0xd
-	RTM_DELETE                        = 0x2
-	RTM_DELMADDR                      = 0x10
-	RTM_GET                           = 0x4
-	RTM_GET2                          = 0x14
-	RTM_IFINFO                        = 0xe
-	RTM_IFINFO2                       = 0x12
-	RTM_LOCK                          = 0x8
-	RTM_LOSING                        = 0x5
-	RTM_MISS                          = 0x7
-	RTM_NEWADDR                       = 0xc
-	RTM_NEWMADDR                      = 0xf
-	RTM_NEWMADDR2                     = 0x13
-	RTM_OLDADD                        = 0x9
-	RTM_OLDDEL                        = 0xa
-	RTM_REDIRECT                      = 0x6
-	RTM_RESOLVE                       = 0xb
-	RTM_RTTUNIT                       = 0xf4240
-	RTM_VERSION                       = 0x5
-	RTV_EXPIRE                        = 0x4
-	RTV_HOPCOUNT                      = 0x2
-	RTV_MTU                           = 0x1
-	RTV_RPIPE                         = 0x8
-	RTV_RTT                           = 0x40
-	RTV_RTTVAR                        = 0x80
-	RTV_SPIPE                         = 0x10
-	RTV_SSTHRESH                      = 0x20
-	RUSAGE_CHILDREN                   = -0x1
-	RUSAGE_SELF                       = 0x0
-	SCM_CREDS                         = 0x3
-	SCM_RIGHTS                        = 0x1
-	SCM_TIMESTAMP                     = 0x2
-	SCM_TIMESTAMP_MONOTONIC           = 0x4
-	SHUT_RD                           = 0x0
-	SHUT_RDWR                         = 0x2
-	SHUT_WR                           = 0x1
-	SIOCADDMULTI                      = 0x80206931
-	SIOCAIFADDR                       = 0x8040691a
-	SIOCARPIPLL                       = 0xc0206928
-	SIOCATMARK                        = 0x40047307
-	SIOCAUTOADDR                      = 0xc0206926
-	SIOCAUTONETMASK                   = 0x80206927
-	SIOCDELMULTI                      = 0x80206932
-	SIOCDIFADDR                       = 0x80206919
-	SIOCDIFPHYADDR                    = 0x80206941
-	SIOCGDRVSPEC                      = 0xc028697b
-	SIOCGETVLAN                       = 0xc020697f
-	SIOCGHIWAT                        = 0x40047301
-	SIOCGIFADDR                       = 0xc0206921
-	SIOCGIFALTMTU                     = 0xc0206948
-	SIOCGIFASYNCMAP                   = 0xc020697c
-	SIOCGIFBOND                       = 0xc0206947
-	SIOCGIFBRDADDR                    = 0xc0206923
-	SIOCGIFCAP                        = 0xc020695b
-	SIOCGIFCONF                       = 0xc00c6924
-	SIOCGIFDEVMTU                     = 0xc0206944
-	SIOCGIFDSTADDR                    = 0xc0206922
-	SIOCGIFFLAGS                      = 0xc0206911
-	SIOCGIFGENERIC                    = 0xc020693a
-	SIOCGIFKPI                        = 0xc0206987
-	SIOCGIFMAC                        = 0xc0206982
-	SIOCGIFMEDIA                      = 0xc02c6938
-	SIOCGIFMETRIC                     = 0xc0206917
-	SIOCGIFMTU                        = 0xc0206933
-	SIOCGIFNETMASK                    = 0xc0206925
-	SIOCGIFPDSTADDR                   = 0xc0206940
-	SIOCGIFPHYS                       = 0xc0206935
-	SIOCGIFPSRCADDR                   = 0xc020693f
-	SIOCGIFSTATUS                     = 0xc331693d
-	SIOCGIFVLAN                       = 0xc020697f
-	SIOCGIFWAKEFLAGS                  = 0xc0206988
-	SIOCGLOWAT                        = 0x40047303
-	SIOCGPGRP                         = 0x40047309
-	SIOCIFCREATE                      = 0xc0206978
-	SIOCIFCREATE2                     = 0xc020697a
-	SIOCIFDESTROY                     = 0x80206979
-	SIOCIFGCLONERS                    = 0xc0106981
-	SIOCRSLVMULTI                     = 0xc010693b
-	SIOCSDRVSPEC                      = 0x8028697b
-	SIOCSETVLAN                       = 0x8020697e
-	SIOCSHIWAT                        = 0x80047300
-	SIOCSIFADDR                       = 0x8020690c
-	SIOCSIFALTMTU                     = 0x80206945
-	SIOCSIFASYNCMAP                   = 0x8020697d
-	SIOCSIFBOND                       = 0x80206946
-	SIOCSIFBRDADDR                    = 0x80206913
-	SIOCSIFCAP                        = 0x8020695a
-	SIOCSIFDSTADDR                    = 0x8020690e
-	SIOCSIFFLAGS                      = 0x80206910
-	SIOCSIFGENERIC                    = 0x80206939
-	SIOCSIFKPI                        = 0x80206986
-	SIOCSIFLLADDR                     = 0x8020693c
-	SIOCSIFMAC                        = 0x80206983
-	SIOCSIFMEDIA                      = 0xc0206937
-	SIOCSIFMETRIC                     = 0x80206918
-	SIOCSIFMTU                        = 0x80206934
-	SIOCSIFNETMASK                    = 0x80206916
-	SIOCSIFPHYADDR                    = 0x8040693e
-	SIOCSIFPHYS                       = 0x80206936
-	SIOCSIFVLAN                       = 0x8020697e
-	SIOCSLOWAT                        = 0x80047302
-	SIOCSPGRP                         = 0x80047308
-	SOCK_DGRAM                        = 0x2
-	SOCK_MAXADDRLEN                   = 0xff
-	SOCK_RAW                          = 0x3
-	SOCK_RDM                          = 0x4
-	SOCK_SEQPACKET                    = 0x5
-	SOCK_STREAM                       = 0x1
-	SOL_SOCKET                        = 0xffff
-	SOMAXCONN                         = 0x80
-	SO_ACCEPTCONN                     = 0x2
-	SO_BROADCAST                      = 0x20
-	SO_DEBUG                          = 0x1
-	SO_DONTROUTE                      = 0x10
-	SO_DONTTRUNC                      = 0x2000
-	SO_ERROR                          = 0x1007
-	SO_KEEPALIVE                      = 0x8
-	SO_LABEL                          = 0x1010
-	SO_LINGER                         = 0x80
-	SO_LINGER_SEC                     = 0x1080
-	SO_NKE                            = 0x1021
-	SO_NOADDRERR                      = 0x1023
-	SO_NOSIGPIPE                      = 0x1022
-	SO_NOTIFYCONFLICT                 = 0x1026
-	SO_NP_EXTENSIONS                  = 0x1083
-	SO_NREAD                          = 0x1020
-	SO_NUMRCVPKT                      = 0x1112
-	SO_NWRITE                         = 0x1024
-	SO_OOBINLINE                      = 0x100
-	SO_PEERLABEL                      = 0x1011
-	SO_RANDOMPORT                     = 0x1082
-	SO_RCVBUF                         = 0x1002
-	SO_RCVLOWAT                       = 0x1004
-	SO_RCVTIMEO                       = 0x1006
-	SO_REUSEADDR                      = 0x4
-	SO_REUSEPORT                      = 0x200
-	SO_REUSESHAREUID                  = 0x1025
-	SO_SNDBUF                         = 0x1001
-	SO_SNDLOWAT                       = 0x1003
-	SO_SNDTIMEO                       = 0x1005
-	SO_TIMESTAMP                      = 0x400
-	SO_TIMESTAMP_MONOTONIC            = 0x800
-	SO_TYPE                           = 0x1008
-	SO_UPCALLCLOSEWAIT                = 0x1027
-	SO_USELOOPBACK                    = 0x40
-	SO_WANTMORE                       = 0x4000
-	SO_WANTOOBFLAG                    = 0x8000
-	S_IEXEC                           = 0x40
-	S_IFBLK                           = 0x6000
-	S_IFCHR                           = 0x2000
-	S_IFDIR                           = 0x4000
-	S_IFIFO                           = 0x1000
-	S_IFLNK                           = 0xa000
-	S_IFMT                            = 0xf000
-	S_IFREG                           = 0x8000
-	S_IFSOCK                          = 0xc000
-	S_IFWHT                           = 0xe000
-	S_IREAD                           = 0x100
-	S_IRGRP                           = 0x20
-	S_IROTH                           = 0x4
-	S_IRUSR                           = 0x100
-	S_IRWXG                           = 0x38
-	S_IRWXO                           = 0x7
-	S_IRWXU                           = 0x1c0
-	S_ISGID                           = 0x400
-	S_ISTXT                           = 0x200
-	S_ISUID                           = 0x800
-	S_ISVTX                           = 0x200
-	S_IWGRP                           = 0x10
-	S_IWOTH                           = 0x2
-	S_IWRITE                          = 0x80
-	S_IWUSR                           = 0x80
-	S_IXGRP                           = 0x8
-	S_IXOTH                           = 0x1
-	S_IXUSR                           = 0x40
-	TCIFLUSH                          = 0x1
-	TCIOFLUSH                         = 0x3
-	TCOFLUSH                          = 0x2
-	TCP_CONNECTIONTIMEOUT             = 0x20
-	TCP_ENABLE_ECN                    = 0x104
-	TCP_KEEPALIVE                     = 0x10
-	TCP_KEEPCNT                       = 0x102
-	TCP_KEEPINTVL                     = 0x101
-	TCP_MAXHLEN                       = 0x3c
-	TCP_MAXOLEN                       = 0x28
-	TCP_MAXSEG                        = 0x2
-	TCP_MAXWIN                        = 0xffff
-	TCP_MAX_SACK                      = 0x4
-	TCP_MAX_WINSHIFT                  = 0xe
-	TCP_MINMSS                        = 0xd8
-	TCP_MSS                           = 0x200
-	TCP_NODELAY                       = 0x1
-	TCP_NOOPT                         = 0x8
-	TCP_NOPUSH                        = 0x4
-	TCP_NOTSENT_LOWAT                 = 0x201
-	TCP_RXT_CONNDROPTIME              = 0x80
-	TCP_RXT_FINDROP                   = 0x100
-	TCP_SENDMOREACKS                  = 0x103
-	TCSAFLUSH                         = 0x2
-	TIOCCBRK                          = 0x2000747a
-	TIOCCDTR                          = 0x20007478
-	TIOCCONS                          = 0x80047462
-	TIOCDCDTIMESTAMP                  = 0x40107458
-	TIOCDRAIN                         = 0x2000745e
-	TIOCDSIMICROCODE                  = 0x20007455
-	TIOCEXCL                          = 0x2000740d
-	TIOCEXT                           = 0x80047460
-	TIOCFLUSH                         = 0x80047410
-	TIOCGDRAINWAIT                    = 0x40047456
-	TIOCGETA                          = 0x40487413
-	TIOCGETD                          = 0x4004741a
-	TIOCGPGRP                         = 0x40047477
-	TIOCGWINSZ                        = 0x40087468
-	TIOCIXOFF                         = 0x20007480
-	TIOCIXON                          = 0x20007481
-	TIOCMBIC                          = 0x8004746b
-	TIOCMBIS                          = 0x8004746c
-	TIOCMGDTRWAIT                     = 0x4004745a
-	TIOCMGET                          = 0x4004746a
-	TIOCMODG                          = 0x40047403
-	TIOCMODS                          = 0x80047404
-	TIOCMSDTRWAIT                     = 0x8004745b
-	TIOCMSET                          = 0x8004746d
-	TIOCM_CAR                         = 0x40
-	TIOCM_CD                          = 0x40
-	TIOCM_CTS                         = 0x20
-	TIOCM_DSR                         = 0x100
-	TIOCM_DTR                         = 0x2
-	TIOCM_LE                          = 0x1
-	TIOCM_RI                          = 0x80
-	TIOCM_RNG                         = 0x80
-	TIOCM_RTS                         = 0x4
-	TIOCM_SR                          = 0x10
-	TIOCM_ST                          = 0x8
-	TIOCNOTTY                         = 0x20007471
-	TIOCNXCL                          = 0x2000740e
-	TIOCOUTQ                          = 0x40047473
-	TIOCPKT                           = 0x80047470
-	TIOCPKT_DATA                      = 0x0
-	TIOCPKT_DOSTOP                    = 0x20
-	TIOCPKT_FLUSHREAD                 = 0x1
-	TIOCPKT_FLUSHWRITE                = 0x2
-	TIOCPKT_IOCTL                     = 0x40
-	TIOCPKT_NOSTOP                    = 0x10
-	TIOCPKT_START                     = 0x8
-	TIOCPKT_STOP                      = 0x4
-	TIOCPTYGNAME                      = 0x40807453
-	TIOCPTYGRANT                      = 0x20007454
-	TIOCPTYUNLK                       = 0x20007452
-	TIOCREMOTE                        = 0x80047469
-	TIOCSBRK                          = 0x2000747b
-	TIOCSCONS                         = 0x20007463
-	TIOCSCTTY                         = 0x20007461
-	TIOCSDRAINWAIT                    = 0x80047457
-	TIOCSDTR                          = 0x20007479
-	TIOCSETA                          = 0x80487414
-	TIOCSETAF                         = 0x80487416
-	TIOCSETAW                         = 0x80487415
-	TIOCSETD                          = 0x8004741b
-	TIOCSIG                           = 0x2000745f
-	TIOCSPGRP                         = 0x80047476
-	TIOCSTART                         = 0x2000746e
-	TIOCSTAT                          = 0x20007465
-	TIOCSTI                           = 0x80017472
-	TIOCSTOP                          = 0x2000746f
-	TIOCSWINSZ                        = 0x80087467
-	TIOCTIMESTAMP                     = 0x40107459
-	TIOCUCNTL                         = 0x80047466
-	TOSTOP                            = 0x400000
-	VDISCARD                          = 0xf
-	VDSUSP                            = 0xb
-	VEOF                              = 0x0
-	VEOL                              = 0x1
-	VEOL2                             = 0x2
-	VERASE                            = 0x3
-	VINTR                             = 0x8
-	VKILL                             = 0x5
-	VLNEXT                            = 0xe
-	VMIN                              = 0x10
-	VQUIT                             = 0x9
-	VREPRINT                          = 0x6
-	VSTART                            = 0xc
-	VSTATUS                           = 0x12
-	VSTOP                             = 0xd
-	VSUSP                             = 0xa
-	VT0                               = 0x0
-	VT1                               = 0x10000
-	VTDLY                             = 0x10000
-	VTIME                             = 0x11
-	VWERASE                           = 0x4
-	WCONTINUED                        = 0x10
-	WCOREFLAG                         = 0x80
-	WEXITED                           = 0x4
-	WNOHANG                           = 0x1
-	WNOWAIT                           = 0x20
-	WORDSIZE                          = 0x40
-	WSTOPPED                          = 0x8
-	WUNTRACED                         = 0x2
-)
-
-// Errors
-const (
-	E2BIG           = Errno(0x7)
-	EACCES          = Errno(0xd)
-	EADDRINUSE      = Errno(0x30)
-	EADDRNOTAVAIL   = Errno(0x31)
-	EAFNOSUPPORT    = Errno(0x2f)
-	EAGAIN          = Errno(0x23)
-	EALREADY        = Errno(0x25)
-	EAUTH           = Errno(0x50)
-	EBADARCH        = Errno(0x56)
-	EBADEXEC        = Errno(0x55)
-	EBADF           = Errno(0x9)
-	EBADMACHO       = Errno(0x58)
-	EBADMSG         = Errno(0x5e)
-	EBADRPC         = Errno(0x48)
-	EBUSY           = Errno(0x10)
-	ECANCELED       = Errno(0x59)
-	ECHILD          = Errno(0xa)
-	ECONNABORTED    = Errno(0x35)
-	ECONNREFUSED    = Errno(0x3d)
-	ECONNRESET      = Errno(0x36)
-	EDEADLK         = Errno(0xb)
-	EDESTADDRREQ    = Errno(0x27)
-	EDEVERR         = Errno(0x53)
-	EDOM            = Errno(0x21)
-	EDQUOT          = Errno(0x45)
-	EEXIST          = Errno(0x11)
-	EFAULT          = Errno(0xe)
-	EFBIG           = Errno(0x1b)
-	EFTYPE          = Errno(0x4f)
-	EHOSTDOWN       = Errno(0x40)
-	EHOSTUNREACH    = Errno(0x41)
-	EIDRM           = Errno(0x5a)
-	EILSEQ          = Errno(0x5c)
-	EINPROGRESS     = Errno(0x24)
-	EINTR           = Errno(0x4)
-	EINVAL          = Errno(0x16)
-	EIO             = Errno(0x5)
-	EISCONN         = Errno(0x38)
-	EISDIR          = Errno(0x15)
-	ELAST           = Errno(0x6a)
-	ELOOP           = Errno(0x3e)
-	EMFILE          = Errno(0x18)
-	EMLINK          = Errno(0x1f)
-	EMSGSIZE        = Errno(0x28)
-	EMULTIHOP       = Errno(0x5f)
-	ENAMETOOLONG    = Errno(0x3f)
-	ENEEDAUTH       = Errno(0x51)
-	ENETDOWN        = Errno(0x32)
-	ENETRESET       = Errno(0x34)
-	ENETUNREACH     = Errno(0x33)
-	ENFILE          = Errno(0x17)
-	ENOATTR         = Errno(0x5d)
-	ENOBUFS         = Errno(0x37)
-	ENODATA         = Errno(0x60)
-	ENODEV          = Errno(0x13)
-	ENOENT          = Errno(0x2)
-	ENOEXEC         = Errno(0x8)
-	ENOLCK          = Errno(0x4d)
-	ENOLINK         = Errno(0x61)
-	ENOMEM          = Errno(0xc)
-	ENOMSG          = Errno(0x5b)
-	ENOPOLICY       = Errno(0x67)
-	ENOPROTOOPT     = Errno(0x2a)
-	ENOSPC          = Errno(0x1c)
-	ENOSR           = Errno(0x62)
-	ENOSTR          = Errno(0x63)
-	ENOSYS          = Errno(0x4e)
-	ENOTBLK         = Errno(0xf)
-	ENOTCONN        = Errno(0x39)
-	ENOTDIR         = Errno(0x14)
-	ENOTEMPTY       = Errno(0x42)
-	ENOTRECOVERABLE = Errno(0x68)
-	ENOTSOCK        = Errno(0x26)
-	ENOTSUP         = Errno(0x2d)
-	ENOTTY          = Errno(0x19)
-	ENXIO           = Errno(0x6)
-	EOPNOTSUPP      = Errno(0x66)
-	EOVERFLOW       = Errno(0x54)
-	EOWNERDEAD      = Errno(0x69)
-	EPERM           = Errno(0x1)
-	EPFNOSUPPORT    = Errno(0x2e)
-	EPIPE           = Errno(0x20)
-	EPROCLIM        = Errno(0x43)
-	EPROCUNAVAIL    = Errno(0x4c)
-	EPROGMISMATCH   = Errno(0x4b)
-	EPROGUNAVAIL    = Errno(0x4a)
-	EPROTO          = Errno(0x64)
-	EPROTONOSUPPORT = Errno(0x2b)
-	EPROTOTYPE      = Errno(0x29)
-	EPWROFF         = Errno(0x52)
-	EQFULL          = Errno(0x6a)
-	ERANGE          = Errno(0x22)
-	EREMOTE         = Errno(0x47)
-	EROFS           = Errno(0x1e)
-	ERPCMISMATCH    = Errno(0x49)
-	ESHLIBVERS      = Errno(0x57)
-	ESHUTDOWN       = Errno(0x3a)
-	ESOCKTNOSUPPORT = Errno(0x2c)
-	ESPIPE          = Errno(0x1d)
-	ESRCH           = Errno(0x3)
-	ESTALE          = Errno(0x46)
-	ETIME           = Errno(0x65)
-	ETIMEDOUT       = Errno(0x3c)
-	ETOOMANYREFS    = Errno(0x3b)
-	ETXTBSY         = Errno(0x1a)
-	EUSERS          = Errno(0x44)
-	EWOULDBLOCK     = Errno(0x23)
-	EXDEV           = Errno(0x12)
-)
-
-// Signals
-const (
-	SIGABRT   = Signal(0x6)
-	SIGALRM   = Signal(0xe)
-	SIGBUS    = Signal(0xa)
-	SIGCHLD   = Signal(0x14)
-	SIGCONT   = Signal(0x13)
-	SIGEMT    = Signal(0x7)
-	SIGFPE    = Signal(0x8)
-	SIGHUP    = Signal(0x1)
-	SIGILL    = Signal(0x4)
-	SIGINFO   = Signal(0x1d)
-	SIGINT    = Signal(0x2)
-	SIGIO     = Signal(0x17)
-	SIGIOT    = Signal(0x6)
-	SIGKILL   = Signal(0x9)
-	SIGPIPE   = Signal(0xd)
-	SIGPROF   = Signal(0x1b)
-	SIGQUIT   = Signal(0x3)
-	SIGSEGV   = Signal(0xb)
-	SIGSTOP   = Signal(0x11)
-	SIGSYS    = Signal(0xc)
-	SIGTERM   = Signal(0xf)
-	SIGTRAP   = Signal(0x5)
-	SIGTSTP   = Signal(0x12)
-	SIGTTIN   = Signal(0x15)
-	SIGTTOU   = Signal(0x16)
-	SIGURG    = Signal(0x10)
-	SIGUSR1   = Signal(0x1e)
-	SIGUSR2   = Signal(0x1f)
-	SIGVTALRM = Signal(0x1a)
-	SIGWINCH  = Signal(0x1c)
-	SIGXCPU   = Signal(0x18)
-	SIGXFSZ   = Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:   "operation not permitted",
-	2:   "no such file or directory",
-	3:   "no such process",
-	4:   "interrupted system call",
-	5:   "input/output error",
-	6:   "device not configured",
-	7:   "argument list too long",
-	8:   "exec format error",
-	9:   "bad file descriptor",
-	10:  "no child processes",
-	11:  "resource deadlock avoided",
-	12:  "cannot allocate memory",
-	13:  "permission denied",
-	14:  "bad address",
-	15:  "block device required",
-	16:  "resource busy",
-	17:  "file exists",
-	18:  "cross-device link",
-	19:  "operation not supported by device",
-	20:  "not a directory",
-	21:  "is a directory",
-	22:  "invalid argument",
-	23:  "too many open files in system",
-	24:  "too many open files",
-	25:  "inappropriate ioctl for device",
-	26:  "text file busy",
-	27:  "file too large",
-	28:  "no space left on device",
-	29:  "illegal seek",
-	30:  "read-only file system",
-	31:  "too many links",
-	32:  "broken pipe",
-	33:  "numerical argument out of domain",
-	34:  "result too large",
-	35:  "resource temporarily unavailable",
-	36:  "operation now in progress",
-	37:  "operation already in progress",
-	38:  "socket operation on non-socket",
-	39:  "destination address required",
-	40:  "message too long",
-	41:  "protocol wrong type for socket",
-	42:  "protocol not available",
-	43:  "protocol not supported",
-	44:  "socket type not supported",
-	45:  "operation not supported",
-	46:  "protocol family not supported",
-	47:  "address family not supported by protocol family",
-	48:  "address already in use",
-	49:  "can't assign requested address",
-	50:  "network is down",
-	51:  "network is unreachable",
-	52:  "network dropped connection on reset",
-	53:  "software caused connection abort",
-	54:  "connection reset by peer",
-	55:  "no buffer space available",
-	56:  "socket is already connected",
-	57:  "socket is not connected",
-	58:  "can't send after socket shutdown",
-	59:  "too many references: can't splice",
-	60:  "operation timed out",
-	61:  "connection refused",
-	62:  "too many levels of symbolic links",
-	63:  "file name too long",
-	64:  "host is down",
-	65:  "no route to host",
-	66:  "directory not empty",
-	67:  "too many processes",
-	68:  "too many users",
-	69:  "disc quota exceeded",
-	70:  "stale NFS file handle",
-	71:  "too many levels of remote in path",
-	72:  "RPC struct is bad",
-	73:  "RPC version wrong",
-	74:  "RPC prog. not avail",
-	75:  "program version wrong",
-	76:  "bad procedure for program",
-	77:  "no locks available",
-	78:  "function not implemented",
-	79:  "inappropriate file type or format",
-	80:  "authentication error",
-	81:  "need authenticator",
-	82:  "device power is off",
-	83:  "device error",
-	84:  "value too large to be stored in data type",
-	85:  "bad executable (or shared library)",
-	86:  "bad CPU type in executable",
-	87:  "shared library version mismatch",
-	88:  "malformed Mach-o file",
-	89:  "operation canceled",
-	90:  "identifier removed",
-	91:  "no message of desired type",
-	92:  "illegal byte sequence",
-	93:  "attribute not found",
-	94:  "bad message",
-	95:  "EMULTIHOP (Reserved)",
-	96:  "no message available on STREAM",
-	97:  "ENOLINK (Reserved)",
-	98:  "no STREAM resources",
-	99:  "not a STREAM",
-	100: "protocol error",
-	101: "STREAM ioctl timeout",
-	102: "operation not supported on socket",
-	103: "policy not found",
-	104: "state not recoverable",
-	105: "previous owner died",
-	106: "interface output queue is full",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/BPT trap",
-	6:  "abort trap",
-	7:  "EMT trap",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "bus error",
-	11: "segmentation fault",
-	12: "bad system call",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "urgent I/O condition",
-	17: "suspended (signal)",
-	18: "suspended",
-	19: "continued",
-	20: "child exited",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "I/O possible",
-	24: "cputime limit exceeded",
-	25: "filesize limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window size changes",
-	29: "information request",
-	30: "user defined signal 1",
-	31: "user defined signal 2",
-}
diff --git a/src/syscall/zerrors_linux_arm64.go b/src/syscall/zerrors_linux_arm64.go
deleted file mode 100644
index 35d9ace..0000000
--- a/src/syscall/zerrors_linux_arm64.go
+++ /dev/null
@@ -1,1824 +0,0 @@
-// mkerrors.sh
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- _const.go
-
-// +build arm64,linux
-
-package syscall
-
-const (
-	AF_ALG                           = 0x26
-	AF_APPLETALK                     = 0x5
-	AF_ASH                           = 0x12
-	AF_ATMPVC                        = 0x8
-	AF_ATMSVC                        = 0x14
-	AF_AX25                          = 0x3
-	AF_BLUETOOTH                     = 0x1f
-	AF_BRIDGE                        = 0x7
-	AF_CAIF                          = 0x25
-	AF_CAN                           = 0x1d
-	AF_DECnet                        = 0xc
-	AF_ECONET                        = 0x13
-	AF_FILE                          = 0x1
-	AF_IEEE802154                    = 0x24
-	AF_INET                          = 0x2
-	AF_INET6                         = 0xa
-	AF_IPX                           = 0x4
-	AF_IRDA                          = 0x17
-	AF_ISDN                          = 0x22
-	AF_IUCV                          = 0x20
-	AF_KEY                           = 0xf
-	AF_LLC                           = 0x1a
-	AF_LOCAL                         = 0x1
-	AF_MAX                           = 0x29
-	AF_NETBEUI                       = 0xd
-	AF_NETLINK                       = 0x10
-	AF_NETROM                        = 0x6
-	AF_NFC                           = 0x27
-	AF_PACKET                        = 0x11
-	AF_PHONET                        = 0x23
-	AF_PPPOX                         = 0x18
-	AF_RDS                           = 0x15
-	AF_ROSE                          = 0xb
-	AF_ROUTE                         = 0x10
-	AF_RXRPC                         = 0x21
-	AF_SECURITY                      = 0xe
-	AF_SNA                           = 0x16
-	AF_TIPC                          = 0x1e
-	AF_UNIX                          = 0x1
-	AF_UNSPEC                        = 0x0
-	AF_VSOCK                         = 0x28
-	AF_WANPIPE                       = 0x19
-	AF_X25                           = 0x9
-	ARPHRD_ADAPT                     = 0x108
-	ARPHRD_APPLETLK                  = 0x8
-	ARPHRD_ARCNET                    = 0x7
-	ARPHRD_ASH                       = 0x30d
-	ARPHRD_ATM                       = 0x13
-	ARPHRD_AX25                      = 0x3
-	ARPHRD_BIF                       = 0x307
-	ARPHRD_CAIF                      = 0x336
-	ARPHRD_CAN                       = 0x118
-	ARPHRD_CHAOS                     = 0x5
-	ARPHRD_CISCO                     = 0x201
-	ARPHRD_CSLIP                     = 0x101
-	ARPHRD_CSLIP6                    = 0x103
-	ARPHRD_DDCMP                     = 0x205
-	ARPHRD_DLCI                      = 0xf
-	ARPHRD_ECONET                    = 0x30e
-	ARPHRD_EETHER                    = 0x2
-	ARPHRD_ETHER                     = 0x1
-	ARPHRD_EUI64                     = 0x1b
-	ARPHRD_FCAL                      = 0x311
-	ARPHRD_FCFABRIC                  = 0x313
-	ARPHRD_FCPL                      = 0x312
-	ARPHRD_FCPP                      = 0x310
-	ARPHRD_FDDI                      = 0x306
-	ARPHRD_FRAD                      = 0x302
-	ARPHRD_HDLC                      = 0x201
-	ARPHRD_HIPPI                     = 0x30c
-	ARPHRD_HWX25                     = 0x110
-	ARPHRD_IEEE1394                  = 0x18
-	ARPHRD_IEEE802                   = 0x6
-	ARPHRD_IEEE80211                 = 0x321
-	ARPHRD_IEEE80211_PRISM           = 0x322
-	ARPHRD_IEEE80211_RADIOTAP        = 0x323
-	ARPHRD_IEEE802154                = 0x324
-	ARPHRD_IEEE802154_MONITOR        = 0x325
-	ARPHRD_IEEE802_TR                = 0x320
-	ARPHRD_INFINIBAND                = 0x20
-	ARPHRD_IP6GRE                    = 0x337
-	ARPHRD_IPDDP                     = 0x309
-	ARPHRD_IPGRE                     = 0x30a
-	ARPHRD_IRDA                      = 0x30f
-	ARPHRD_LAPB                      = 0x204
-	ARPHRD_LOCALTLK                  = 0x305
-	ARPHRD_LOOPBACK                  = 0x304
-	ARPHRD_METRICOM                  = 0x17
-	ARPHRD_NETLINK                   = 0x338
-	ARPHRD_NETROM                    = 0x0
-	ARPHRD_NONE                      = 0xfffe
-	ARPHRD_PHONET                    = 0x334
-	ARPHRD_PHONET_PIPE               = 0x335
-	ARPHRD_PIMREG                    = 0x30b
-	ARPHRD_PPP                       = 0x200
-	ARPHRD_PRONET                    = 0x4
-	ARPHRD_RAWHDLC                   = 0x206
-	ARPHRD_ROSE                      = 0x10e
-	ARPHRD_RSRVD                     = 0x104
-	ARPHRD_SIT                       = 0x308
-	ARPHRD_SKIP                      = 0x303
-	ARPHRD_SLIP                      = 0x100
-	ARPHRD_SLIP6                     = 0x102
-	ARPHRD_TUNNEL                    = 0x300
-	ARPHRD_TUNNEL6                   = 0x301
-	ARPHRD_VOID                      = 0xffff
-	ARPHRD_X25                       = 0x10f
-	B0                               = 0x0
-	B1000000                         = 0x1008
-	B110                             = 0x3
-	B115200                          = 0x1002
-	B1152000                         = 0x1009
-	B1200                            = 0x9
-	B134                             = 0x4
-	B150                             = 0x5
-	B1500000                         = 0x100a
-	B1800                            = 0xa
-	B19200                           = 0xe
-	B200                             = 0x6
-	B2000000                         = 0x100b
-	B230400                          = 0x1003
-	B2400                            = 0xb
-	B2500000                         = 0x100c
-	B300                             = 0x7
-	B3000000                         = 0x100d
-	B3500000                         = 0x100e
-	B38400                           = 0xf
-	B4000000                         = 0x100f
-	B460800                          = 0x1004
-	B4800                            = 0xc
-	B50                              = 0x1
-	B500000                          = 0x1005
-	B57600                           = 0x1001
-	B576000                          = 0x1006
-	B600                             = 0x8
-	B75                              = 0x2
-	B921600                          = 0x1007
-	B9600                            = 0xd
-	BPF_A                            = 0x10
-	BPF_ABS                          = 0x20
-	BPF_ADD                          = 0x0
-	BPF_ALU                          = 0x4
-	BPF_AND                          = 0x50
-	BPF_B                            = 0x10
-	BPF_DIV                          = 0x30
-	BPF_H                            = 0x8
-	BPF_IMM                          = 0x0
-	BPF_IND                          = 0x40
-	BPF_JA                           = 0x0
-	BPF_JEQ                          = 0x10
-	BPF_JGE                          = 0x30
-	BPF_JGT                          = 0x20
-	BPF_JMP                          = 0x5
-	BPF_JSET                         = 0x40
-	BPF_K                            = 0x0
-	BPF_LD                           = 0x0
-	BPF_LDX                          = 0x1
-	BPF_LEN                          = 0x80
-	BPF_LSH                          = 0x60
-	BPF_MAJOR_VERSION                = 0x1
-	BPF_MAXINSNS                     = 0x1000
-	BPF_MEM                          = 0x60
-	BPF_MEMWORDS                     = 0x10
-	BPF_MINOR_VERSION                = 0x1
-	BPF_MISC                         = 0x7
-	BPF_MOD                          = 0x90
-	BPF_MSH                          = 0xa0
-	BPF_MUL                          = 0x20
-	BPF_NEG                          = 0x80
-	BPF_OR                           = 0x40
-	BPF_RET                          = 0x6
-	BPF_RSH                          = 0x70
-	BPF_ST                           = 0x2
-	BPF_STX                          = 0x3
-	BPF_SUB                          = 0x10
-	BPF_TAX                          = 0x0
-	BPF_TXA                          = 0x80
-	BPF_W                            = 0x0
-	BPF_X                            = 0x8
-	BPF_XOR                          = 0xa0
-	BRKINT                           = 0x2
-	CFLUSH                           = 0xf
-	CLOCAL                           = 0x800
-	CLONE_CHILD_CLEARTID             = 0x200000
-	CLONE_CHILD_SETTID               = 0x1000000
-	CLONE_DETACHED                   = 0x400000
-	CLONE_FILES                      = 0x400
-	CLONE_FS                         = 0x200
-	CLONE_IO                         = 0x80000000
-	CLONE_NEWIPC                     = 0x8000000
-	CLONE_NEWNET                     = 0x40000000
-	CLONE_NEWNS                      = 0x20000
-	CLONE_NEWPID                     = 0x20000000
-	CLONE_NEWUSER                    = 0x10000000
-	CLONE_NEWUTS                     = 0x4000000
-	CLONE_PARENT                     = 0x8000
-	CLONE_PARENT_SETTID              = 0x100000
-	CLONE_PTRACE                     = 0x2000
-	CLONE_SETTLS                     = 0x80000
-	CLONE_SIGHAND                    = 0x800
-	CLONE_SYSVSEM                    = 0x40000
-	CLONE_THREAD                     = 0x10000
-	CLONE_UNTRACED                   = 0x800000
-	CLONE_VFORK                      = 0x4000
-	CLONE_VM                         = 0x100
-	CREAD                            = 0x80
-	CS5                              = 0x0
-	CS6                              = 0x10
-	CS7                              = 0x20
-	CS8                              = 0x30
-	CSIGNAL                          = 0xff
-	CSIZE                            = 0x30
-	CSTART                           = 0x11
-	CSTATUS                          = 0x0
-	CSTOP                            = 0x13
-	CSTOPB                           = 0x40
-	CSUSP                            = 0x1a
-	DT_BLK                           = 0x6
-	DT_CHR                           = 0x2
-	DT_DIR                           = 0x4
-	DT_FIFO                          = 0x1
-	DT_LNK                           = 0xa
-	DT_REG                           = 0x8
-	DT_SOCK                          = 0xc
-	DT_UNKNOWN                       = 0x0
-	DT_WHT                           = 0xe
-	ECHO                             = 0x8
-	ECHOCTL                          = 0x200
-	ECHOE                            = 0x10
-	ECHOK                            = 0x20
-	ECHOKE                           = 0x800
-	ECHONL                           = 0x40
-	ECHOPRT                          = 0x400
-	ENCODING_DEFAULT                 = 0x0
-	ENCODING_FM_MARK                 = 0x3
-	ENCODING_FM_SPACE                = 0x4
-	ENCODING_MANCHESTER              = 0x5
-	ENCODING_NRZ                     = 0x1
-	ENCODING_NRZI                    = 0x2
-	EPOLLERR                         = 0x8
-	EPOLLET                          = 0x80000000
-	EPOLLHUP                         = 0x10
-	EPOLLIN                          = 0x1
-	EPOLLMSG                         = 0x400
-	EPOLLONESHOT                     = 0x40000000
-	EPOLLOUT                         = 0x4
-	EPOLLPRI                         = 0x2
-	EPOLLRDBAND                      = 0x80
-	EPOLLRDHUP                       = 0x2000
-	EPOLLRDNORM                      = 0x40
-	EPOLLWAKEUP                      = 0x20000000
-	EPOLLWRBAND                      = 0x200
-	EPOLLWRNORM                      = 0x100
-	EPOLL_CLOEXEC                    = 0x80000
-	EPOLL_CTL_ADD                    = 0x1
-	EPOLL_CTL_DEL                    = 0x2
-	EPOLL_CTL_MOD                    = 0x3
-	ETH_P_1588                       = 0x88f7
-	ETH_P_8021AD                     = 0x88a8
-	ETH_P_8021AH                     = 0x88e7
-	ETH_P_8021Q                      = 0x8100
-	ETH_P_802_2                      = 0x4
-	ETH_P_802_3                      = 0x1
-	ETH_P_802_3_MIN                  = 0x600
-	ETH_P_802_EX1                    = 0x88b5
-	ETH_P_AARP                       = 0x80f3
-	ETH_P_AF_IUCV                    = 0xfbfb
-	ETH_P_ALL                        = 0x3
-	ETH_P_AOE                        = 0x88a2
-	ETH_P_ARCNET                     = 0x1a
-	ETH_P_ARP                        = 0x806
-	ETH_P_ATALK                      = 0x809b
-	ETH_P_ATMFATE                    = 0x8884
-	ETH_P_ATMMPOA                    = 0x884c
-	ETH_P_AX25                       = 0x2
-	ETH_P_BATMAN                     = 0x4305
-	ETH_P_BPQ                        = 0x8ff
-	ETH_P_CAIF                       = 0xf7
-	ETH_P_CAN                        = 0xc
-	ETH_P_CANFD                      = 0xd
-	ETH_P_CONTROL                    = 0x16
-	ETH_P_CUST                       = 0x6006
-	ETH_P_DDCMP                      = 0x6
-	ETH_P_DEC                        = 0x6000
-	ETH_P_DIAG                       = 0x6005
-	ETH_P_DNA_DL                     = 0x6001
-	ETH_P_DNA_RC                     = 0x6002
-	ETH_P_DNA_RT                     = 0x6003
-	ETH_P_DSA                        = 0x1b
-	ETH_P_ECONET                     = 0x18
-	ETH_P_EDSA                       = 0xdada
-	ETH_P_FCOE                       = 0x8906
-	ETH_P_FIP                        = 0x8914
-	ETH_P_HDLC                       = 0x19
-	ETH_P_IEEE802154                 = 0xf6
-	ETH_P_IEEEPUP                    = 0xa00
-	ETH_P_IEEEPUPAT                  = 0xa01
-	ETH_P_IP                         = 0x800
-	ETH_P_IPV6                       = 0x86dd
-	ETH_P_IPX                        = 0x8137
-	ETH_P_IRDA                       = 0x17
-	ETH_P_LAT                        = 0x6004
-	ETH_P_LINK_CTL                   = 0x886c
-	ETH_P_LOCALTALK                  = 0x9
-	ETH_P_LOOP                       = 0x60
-	ETH_P_MOBITEX                    = 0x15
-	ETH_P_MPLS_MC                    = 0x8848
-	ETH_P_MPLS_UC                    = 0x8847
-	ETH_P_MVRP                       = 0x88f5
-	ETH_P_PAE                        = 0x888e
-	ETH_P_PAUSE                      = 0x8808
-	ETH_P_PHONET                     = 0xf5
-	ETH_P_PPPTALK                    = 0x10
-	ETH_P_PPP_DISC                   = 0x8863
-	ETH_P_PPP_MP                     = 0x8
-	ETH_P_PPP_SES                    = 0x8864
-	ETH_P_PRP                        = 0x88fb
-	ETH_P_PUP                        = 0x200
-	ETH_P_PUPAT                      = 0x201
-	ETH_P_QINQ1                      = 0x9100
-	ETH_P_QINQ2                      = 0x9200
-	ETH_P_QINQ3                      = 0x9300
-	ETH_P_RARP                       = 0x8035
-	ETH_P_SCA                        = 0x6007
-	ETH_P_SLOW                       = 0x8809
-	ETH_P_SNAP                       = 0x5
-	ETH_P_TDLS                       = 0x890d
-	ETH_P_TEB                        = 0x6558
-	ETH_P_TIPC                       = 0x88ca
-	ETH_P_TRAILER                    = 0x1c
-	ETH_P_TR_802_2                   = 0x11
-	ETH_P_WAN_PPP                    = 0x7
-	ETH_P_WCCP                       = 0x883e
-	ETH_P_X25                        = 0x805
-	EXTA                             = 0xe
-	EXTB                             = 0xf
-	EXTPROC                          = 0x10000
-	FD_CLOEXEC                       = 0x1
-	FD_SETSIZE                       = 0x400
-	FLUSHO                           = 0x1000
-	F_DUPFD                          = 0x0
-	F_DUPFD_CLOEXEC                  = 0x406
-	F_EXLCK                          = 0x4
-	F_GETFD                          = 0x1
-	F_GETFL                          = 0x3
-	F_GETLEASE                       = 0x401
-	F_GETLK                          = 0x5
-	F_GETLK64                        = 0x5
-	F_GETOWN                         = 0x9
-	F_GETOWN_EX                      = 0x10
-	F_GETPIPE_SZ                     = 0x408
-	F_GETSIG                         = 0xb
-	F_LOCK                           = 0x1
-	F_NOTIFY                         = 0x402
-	F_OK                             = 0x0
-	F_RDLCK                          = 0x0
-	F_SETFD                          = 0x2
-	F_SETFL                          = 0x4
-	F_SETLEASE                       = 0x400
-	F_SETLK                          = 0x6
-	F_SETLK64                        = 0x6
-	F_SETLKW                         = 0x7
-	F_SETLKW64                       = 0x7
-	F_SETOWN                         = 0x8
-	F_SETOWN_EX                      = 0xf
-	F_SETPIPE_SZ                     = 0x407
-	F_SETSIG                         = 0xa
-	F_SHLCK                          = 0x8
-	F_TEST                           = 0x3
-	F_TLOCK                          = 0x2
-	F_ULOCK                          = 0x0
-	F_UNLCK                          = 0x2
-	F_WRLCK                          = 0x1
-	HUPCL                            = 0x400
-	ICANON                           = 0x2
-	ICMPV6_FILTER                    = 0x1
-	ICRNL                            = 0x100
-	IEXTEN                           = 0x8000
-	IFA_F_DADFAILED                  = 0x8
-	IFA_F_DEPRECATED                 = 0x20
-	IFA_F_HOMEADDRESS                = 0x10
-	IFA_F_NODAD                      = 0x2
-	IFA_F_OPTIMISTIC                 = 0x4
-	IFA_F_PERMANENT                  = 0x80
-	IFA_F_SECONDARY                  = 0x1
-	IFA_F_TEMPORARY                  = 0x1
-	IFA_F_TENTATIVE                  = 0x40
-	IFA_MAX                          = 0x7
-	IFF_802_1Q_VLAN                  = 0x1
-	IFF_ALLMULTI                     = 0x200
-	IFF_ATTACH_QUEUE                 = 0x200
-	IFF_AUTOMEDIA                    = 0x4000
-	IFF_BONDING                      = 0x20
-	IFF_BRIDGE_PORT                  = 0x4000
-	IFF_BROADCAST                    = 0x2
-	IFF_DEBUG                        = 0x4
-	IFF_DETACH_QUEUE                 = 0x400
-	IFF_DISABLE_NETPOLL              = 0x1000
-	IFF_DONT_BRIDGE                  = 0x800
-	IFF_DORMANT                      = 0x20000
-	IFF_DYNAMIC                      = 0x8000
-	IFF_EBRIDGE                      = 0x2
-	IFF_ECHO                         = 0x40000
-	IFF_ISATAP                       = 0x80
-	IFF_LIVE_ADDR_CHANGE             = 0x100000
-	IFF_LOOPBACK                     = 0x8
-	IFF_LOWER_UP                     = 0x10000
-	IFF_MACVLAN                      = 0x200000
-	IFF_MACVLAN_PORT                 = 0x2000
-	IFF_MASTER                       = 0x400
-	IFF_MASTER_8023AD                = 0x8
-	IFF_MASTER_ALB                   = 0x10
-	IFF_MASTER_ARPMON                = 0x100
-	IFF_MULTICAST                    = 0x1000
-	IFF_MULTI_QUEUE                  = 0x100
-	IFF_NOARP                        = 0x80
-	IFF_NOFILTER                     = 0x1000
-	IFF_NOTRAILERS                   = 0x20
-	IFF_NO_PI                        = 0x1000
-	IFF_ONE_QUEUE                    = 0x2000
-	IFF_OVS_DATAPATH                 = 0x8000
-	IFF_PERSIST                      = 0x800
-	IFF_POINTOPOINT                  = 0x10
-	IFF_PORTSEL                      = 0x2000
-	IFF_PROMISC                      = 0x100
-	IFF_RUNNING                      = 0x40
-	IFF_SLAVE                        = 0x800
-	IFF_SLAVE_INACTIVE               = 0x4
-	IFF_SLAVE_NEEDARP                = 0x40
-	IFF_SUPP_NOFCS                   = 0x80000
-	IFF_TAP                          = 0x2
-	IFF_TEAM_PORT                    = 0x40000
-	IFF_TUN                          = 0x1
-	IFF_TUN_EXCL                     = 0x8000
-	IFF_TX_SKB_SHARING               = 0x10000
-	IFF_UNICAST_FLT                  = 0x20000
-	IFF_UP                           = 0x1
-	IFF_VNET_HDR                     = 0x4000
-	IFF_VOLATILE                     = 0x70c5a
-	IFF_WAN_HDLC                     = 0x200
-	IFF_XMIT_DST_RELEASE             = 0x400
-	IFNAMSIZ                         = 0x10
-	IGNBRK                           = 0x1
-	IGNCR                            = 0x80
-	IGNPAR                           = 0x4
-	IMAXBEL                          = 0x2000
-	INLCR                            = 0x40
-	INPCK                            = 0x10
-	IN_ACCESS                        = 0x1
-	IN_ALL_EVENTS                    = 0xfff
-	IN_ATTRIB                        = 0x4
-	IN_CLASSA_HOST                   = 0xffffff
-	IN_CLASSA_MAX                    = 0x80
-	IN_CLASSA_NET                    = 0xff000000
-	IN_CLASSA_NSHIFT                 = 0x18
-	IN_CLASSB_HOST                   = 0xffff
-	IN_CLASSB_MAX                    = 0x10000
-	IN_CLASSB_NET                    = 0xffff0000
-	IN_CLASSB_NSHIFT                 = 0x10
-	IN_CLASSC_HOST                   = 0xff
-	IN_CLASSC_NET                    = 0xffffff00
-	IN_CLASSC_NSHIFT                 = 0x8
-	IN_CLOEXEC                       = 0x80000
-	IN_CLOSE                         = 0x18
-	IN_CLOSE_NOWRITE                 = 0x10
-	IN_CLOSE_WRITE                   = 0x8
-	IN_CREATE                        = 0x100
-	IN_DELETE                        = 0x200
-	IN_DELETE_SELF                   = 0x400
-	IN_DONT_FOLLOW                   = 0x2000000
-	IN_EXCL_UNLINK                   = 0x4000000
-	IN_IGNORED                       = 0x8000
-	IN_ISDIR                         = 0x40000000
-	IN_LOOPBACKNET                   = 0x7f
-	IN_MASK_ADD                      = 0x20000000
-	IN_MODIFY                        = 0x2
-	IN_MOVE                          = 0xc0
-	IN_MOVED_FROM                    = 0x40
-	IN_MOVED_TO                      = 0x80
-	IN_MOVE_SELF                     = 0x800
-	IN_NONBLOCK                      = 0x800
-	IN_ONESHOT                       = 0x80000000
-	IN_ONLYDIR                       = 0x1000000
-	IN_OPEN                          = 0x20
-	IN_Q_OVERFLOW                    = 0x4000
-	IN_UNMOUNT                       = 0x2000
-	IPPROTO_AH                       = 0x33
-	IPPROTO_BEETPH                   = 0x5e
-	IPPROTO_COMP                     = 0x6c
-	IPPROTO_DCCP                     = 0x21
-	IPPROTO_DSTOPTS                  = 0x3c
-	IPPROTO_EGP                      = 0x8
-	IPPROTO_ENCAP                    = 0x62
-	IPPROTO_ESP                      = 0x32
-	IPPROTO_FRAGMENT                 = 0x2c
-	IPPROTO_GRE                      = 0x2f
-	IPPROTO_HOPOPTS                  = 0x0
-	IPPROTO_ICMP                     = 0x1
-	IPPROTO_ICMPV6                   = 0x3a
-	IPPROTO_IDP                      = 0x16
-	IPPROTO_IGMP                     = 0x2
-	IPPROTO_IP                       = 0x0
-	IPPROTO_IPIP                     = 0x4
-	IPPROTO_IPV6                     = 0x29
-	IPPROTO_MH                       = 0x87
-	IPPROTO_MTP                      = 0x5c
-	IPPROTO_NONE                     = 0x3b
-	IPPROTO_PIM                      = 0x67
-	IPPROTO_PUP                      = 0xc
-	IPPROTO_RAW                      = 0xff
-	IPPROTO_ROUTING                  = 0x2b
-	IPPROTO_RSVP                     = 0x2e
-	IPPROTO_SCTP                     = 0x84
-	IPPROTO_TCP                      = 0x6
-	IPPROTO_TP                       = 0x1d
-	IPPROTO_UDP                      = 0x11
-	IPPROTO_UDPLITE                  = 0x88
-	IPV6_2292DSTOPTS                 = 0x4
-	IPV6_2292HOPLIMIT                = 0x8
-	IPV6_2292HOPOPTS                 = 0x3
-	IPV6_2292PKTINFO                 = 0x2
-	IPV6_2292PKTOPTIONS              = 0x6
-	IPV6_2292RTHDR                   = 0x5
-	IPV6_ADDRFORM                    = 0x1
-	IPV6_ADD_MEMBERSHIP              = 0x14
-	IPV6_AUTHHDR                     = 0xa
-	IPV6_CHECKSUM                    = 0x7
-	IPV6_DROP_MEMBERSHIP             = 0x15
-	IPV6_DSTOPTS                     = 0x3b
-	IPV6_HOPLIMIT                    = 0x34
-	IPV6_HOPOPTS                     = 0x36
-	IPV6_IPSEC_POLICY                = 0x22
-	IPV6_JOIN_ANYCAST                = 0x1b
-	IPV6_JOIN_GROUP                  = 0x14
-	IPV6_LEAVE_ANYCAST               = 0x1c
-	IPV6_LEAVE_GROUP                 = 0x15
-	IPV6_MTU                         = 0x18
-	IPV6_MTU_DISCOVER                = 0x17
-	IPV6_MULTICAST_HOPS              = 0x12
-	IPV6_MULTICAST_IF                = 0x11
-	IPV6_MULTICAST_LOOP              = 0x13
-	IPV6_NEXTHOP                     = 0x9
-	IPV6_PKTINFO                     = 0x32
-	IPV6_PMTUDISC_DO                 = 0x2
-	IPV6_PMTUDISC_DONT               = 0x0
-	IPV6_PMTUDISC_PROBE              = 0x3
-	IPV6_PMTUDISC_WANT               = 0x1
-	IPV6_RECVDSTOPTS                 = 0x3a
-	IPV6_RECVERR                     = 0x19
-	IPV6_RECVHOPLIMIT                = 0x33
-	IPV6_RECVHOPOPTS                 = 0x35
-	IPV6_RECVPKTINFO                 = 0x31
-	IPV6_RECVRTHDR                   = 0x38
-	IPV6_RECVTCLASS                  = 0x42
-	IPV6_ROUTER_ALERT                = 0x16
-	IPV6_RTHDR                       = 0x39
-	IPV6_RTHDRDSTOPTS                = 0x37
-	IPV6_RTHDR_LOOSE                 = 0x0
-	IPV6_RTHDR_STRICT                = 0x1
-	IPV6_RTHDR_TYPE_0                = 0x0
-	IPV6_RXDSTOPTS                   = 0x3b
-	IPV6_RXHOPOPTS                   = 0x36
-	IPV6_TCLASS                      = 0x43
-	IPV6_UNICAST_HOPS                = 0x10
-	IPV6_V6ONLY                      = 0x1a
-	IPV6_XFRM_POLICY                 = 0x23
-	IP_ADD_MEMBERSHIP                = 0x23
-	IP_ADD_SOURCE_MEMBERSHIP         = 0x27
-	IP_BLOCK_SOURCE                  = 0x26
-	IP_DEFAULT_MULTICAST_LOOP        = 0x1
-	IP_DEFAULT_MULTICAST_TTL         = 0x1
-	IP_DF                            = 0x4000
-	IP_DROP_MEMBERSHIP               = 0x24
-	IP_DROP_SOURCE_MEMBERSHIP        = 0x28
-	IP_FREEBIND                      = 0xf
-	IP_HDRINCL                       = 0x3
-	IP_IPSEC_POLICY                  = 0x10
-	IP_MAXPACKET                     = 0xffff
-	IP_MAX_MEMBERSHIPS               = 0x14
-	IP_MF                            = 0x2000
-	IP_MINTTL                        = 0x15
-	IP_MSFILTER                      = 0x29
-	IP_MSS                           = 0x240
-	IP_MTU                           = 0xe
-	IP_MTU_DISCOVER                  = 0xa
-	IP_MULTICAST_ALL                 = 0x31
-	IP_MULTICAST_IF                  = 0x20
-	IP_MULTICAST_LOOP                = 0x22
-	IP_MULTICAST_TTL                 = 0x21
-	IP_OFFMASK                       = 0x1fff
-	IP_OPTIONS                       = 0x4
-	IP_ORIGDSTADDR                   = 0x14
-	IP_PASSSEC                       = 0x12
-	IP_PKTINFO                       = 0x8
-	IP_PKTOPTIONS                    = 0x9
-	IP_PMTUDISC                      = 0xa
-	IP_PMTUDISC_DO                   = 0x2
-	IP_PMTUDISC_DONT                 = 0x0
-	IP_PMTUDISC_PROBE                = 0x3
-	IP_PMTUDISC_WANT                 = 0x1
-	IP_RECVERR                       = 0xb
-	IP_RECVOPTS                      = 0x6
-	IP_RECVORIGDSTADDR               = 0x14
-	IP_RECVRETOPTS                   = 0x7
-	IP_RECVTOS                       = 0xd
-	IP_RECVTTL                       = 0xc
-	IP_RETOPTS                       = 0x7
-	IP_RF                            = 0x8000
-	IP_ROUTER_ALERT                  = 0x5
-	IP_TOS                           = 0x1
-	IP_TRANSPARENT                   = 0x13
-	IP_TTL                           = 0x2
-	IP_UNBLOCK_SOURCE                = 0x25
-	IP_UNICAST_IF                    = 0x32
-	IP_XFRM_POLICY                   = 0x11
-	ISIG                             = 0x1
-	ISTRIP                           = 0x20
-	IUTF8                            = 0x4000
-	IXANY                            = 0x800
-	IXOFF                            = 0x1000
-	IXON                             = 0x400
-	LINUX_REBOOT_CMD_CAD_OFF         = 0x0
-	LINUX_REBOOT_CMD_CAD_ON          = 0x89abcdef
-	LINUX_REBOOT_CMD_HALT            = 0xcdef0123
-	LINUX_REBOOT_CMD_KEXEC           = 0x45584543
-	LINUX_REBOOT_CMD_POWER_OFF       = 0x4321fedc
-	LINUX_REBOOT_CMD_RESTART         = 0x1234567
-	LINUX_REBOOT_CMD_RESTART2        = 0xa1b2c3d4
-	LINUX_REBOOT_CMD_SW_SUSPEND      = 0xd000fce2
-	LINUX_REBOOT_MAGIC1              = 0xfee1dead
-	LINUX_REBOOT_MAGIC2              = 0x28121969
-	LOCK_EX                          = 0x2
-	LOCK_NB                          = 0x4
-	LOCK_SH                          = 0x1
-	LOCK_UN                          = 0x8
-	MADV_DODUMP                      = 0x11
-	MADV_DOFORK                      = 0xb
-	MADV_DONTDUMP                    = 0x10
-	MADV_DONTFORK                    = 0xa
-	MADV_DONTNEED                    = 0x4
-	MADV_HUGEPAGE                    = 0xe
-	MADV_HWPOISON                    = 0x64
-	MADV_MERGEABLE                   = 0xc
-	MADV_NOHUGEPAGE                  = 0xf
-	MADV_NORMAL                      = 0x0
-	MADV_RANDOM                      = 0x1
-	MADV_REMOVE                      = 0x9
-	MADV_SEQUENTIAL                  = 0x2
-	MADV_UNMERGEABLE                 = 0xd
-	MADV_WILLNEED                    = 0x3
-	MAP_ANON                         = 0x20
-	MAP_ANONYMOUS                    = 0x20
-	MAP_DENYWRITE                    = 0x800
-	MAP_EXECUTABLE                   = 0x1000
-	MAP_FILE                         = 0x0
-	MAP_FIXED                        = 0x10
-	MAP_GROWSDOWN                    = 0x100
-	MAP_HUGETLB                      = 0x40000
-	MAP_HUGE_MASK                    = 0x3f
-	MAP_HUGE_SHIFT                   = 0x1a
-	MAP_LOCKED                       = 0x2000
-	MAP_NONBLOCK                     = 0x10000
-	MAP_NORESERVE                    = 0x4000
-	MAP_POPULATE                     = 0x8000
-	MAP_PRIVATE                      = 0x2
-	MAP_SHARED                       = 0x1
-	MAP_STACK                        = 0x20000
-	MAP_TYPE                         = 0xf
-	MCL_CURRENT                      = 0x1
-	MCL_FUTURE                       = 0x2
-	MNT_DETACH                       = 0x2
-	MNT_EXPIRE                       = 0x4
-	MNT_FORCE                        = 0x1
-	MSG_CMSG_CLOEXEC                 = 0x40000000
-	MSG_CONFIRM                      = 0x800
-	MSG_CTRUNC                       = 0x8
-	MSG_DONTROUTE                    = 0x4
-	MSG_DONTWAIT                     = 0x40
-	MSG_EOR                          = 0x80
-	MSG_ERRQUEUE                     = 0x2000
-	MSG_FASTOPEN                     = 0x20000000
-	MSG_FIN                          = 0x200
-	MSG_MORE                         = 0x8000
-	MSG_NOSIGNAL                     = 0x4000
-	MSG_OOB                          = 0x1
-	MSG_PEEK                         = 0x2
-	MSG_PROXY                        = 0x10
-	MSG_RST                          = 0x1000
-	MSG_SYN                          = 0x400
-	MSG_TRUNC                        = 0x20
-	MSG_TRYHARD                      = 0x4
-	MSG_WAITALL                      = 0x100
-	MSG_WAITFORONE                   = 0x10000
-	MS_ACTIVE                        = 0x40000000
-	MS_ASYNC                         = 0x1
-	MS_BIND                          = 0x1000
-	MS_DIRSYNC                       = 0x80
-	MS_INVALIDATE                    = 0x2
-	MS_I_VERSION                     = 0x800000
-	MS_KERNMOUNT                     = 0x400000
-	MS_MANDLOCK                      = 0x40
-	MS_MGC_MSK                       = 0xffff0000
-	MS_MGC_VAL                       = 0xc0ed0000
-	MS_MOVE                          = 0x2000
-	MS_NOATIME                       = 0x400
-	MS_NODEV                         = 0x4
-	MS_NODIRATIME                    = 0x800
-	MS_NOEXEC                        = 0x8
-	MS_NOSUID                        = 0x2
-	MS_NOUSER                        = -0x80000000
-	MS_POSIXACL                      = 0x10000
-	MS_PRIVATE                       = 0x40000
-	MS_RDONLY                        = 0x1
-	MS_REC                           = 0x4000
-	MS_RELATIME                      = 0x200000
-	MS_REMOUNT                       = 0x20
-	MS_RMT_MASK                      = 0x800051
-	MS_SHARED                        = 0x100000
-	MS_SILENT                        = 0x8000
-	MS_SLAVE                         = 0x80000
-	MS_STRICTATIME                   = 0x1000000
-	MS_SYNC                          = 0x4
-	MS_SYNCHRONOUS                   = 0x10
-	MS_UNBINDABLE                    = 0x20000
-	NAME_MAX                         = 0xff
-	NETLINK_ADD_MEMBERSHIP           = 0x1
-	NETLINK_AUDIT                    = 0x9
-	NETLINK_BROADCAST_ERROR          = 0x4
-	NETLINK_CONNECTOR                = 0xb
-	NETLINK_CRYPTO                   = 0x15
-	NETLINK_DNRTMSG                  = 0xe
-	NETLINK_DROP_MEMBERSHIP          = 0x2
-	NETLINK_ECRYPTFS                 = 0x13
-	NETLINK_FIB_LOOKUP               = 0xa
-	NETLINK_FIREWALL                 = 0x3
-	NETLINK_GENERIC                  = 0x10
-	NETLINK_INET_DIAG                = 0x4
-	NETLINK_IP6_FW                   = 0xd
-	NETLINK_ISCSI                    = 0x8
-	NETLINK_KOBJECT_UEVENT           = 0xf
-	NETLINK_NETFILTER                = 0xc
-	NETLINK_NFLOG                    = 0x5
-	NETLINK_NO_ENOBUFS               = 0x5
-	NETLINK_PKTINFO                  = 0x3
-	NETLINK_RDMA                     = 0x14
-	NETLINK_ROUTE                    = 0x0
-	NETLINK_RX_RING                  = 0x6
-	NETLINK_SCSITRANSPORT            = 0x12
-	NETLINK_SELINUX                  = 0x7
-	NETLINK_SOCK_DIAG                = 0x4
-	NETLINK_TX_RING                  = 0x7
-	NETLINK_UNUSED                   = 0x1
-	NETLINK_USERSOCK                 = 0x2
-	NETLINK_XFRM                     = 0x6
-	NLA_ALIGNTO                      = 0x4
-	NLA_F_NESTED                     = 0x8000
-	NLA_F_NET_BYTEORDER              = 0x4000
-	NLA_HDRLEN                       = 0x4
-	NLMSG_ALIGNTO                    = 0x4
-	NLMSG_DONE                       = 0x3
-	NLMSG_ERROR                      = 0x2
-	NLMSG_HDRLEN                     = 0x10
-	NLMSG_MIN_TYPE                   = 0x10
-	NLMSG_NOOP                       = 0x1
-	NLMSG_OVERRUN                    = 0x4
-	NLM_F_ACK                        = 0x4
-	NLM_F_APPEND                     = 0x800
-	NLM_F_ATOMIC                     = 0x400
-	NLM_F_CREATE                     = 0x400
-	NLM_F_DUMP                       = 0x300
-	NLM_F_DUMP_INTR                  = 0x10
-	NLM_F_ECHO                       = 0x8
-	NLM_F_EXCL                       = 0x200
-	NLM_F_MATCH                      = 0x200
-	NLM_F_MULTI                      = 0x2
-	NLM_F_REPLACE                    = 0x100
-	NLM_F_REQUEST                    = 0x1
-	NLM_F_ROOT                       = 0x100
-	NOFLSH                           = 0x80
-	OCRNL                            = 0x8
-	OFDEL                            = 0x80
-	OFILL                            = 0x40
-	ONLCR                            = 0x4
-	ONLRET                           = 0x20
-	ONOCR                            = 0x10
-	OPOST                            = 0x1
-	O_ACCMODE                        = 0x3
-	O_APPEND                         = 0x400
-	O_ASYNC                          = 0x2000
-	O_CLOEXEC                        = 0x80000
-	O_CREAT                          = 0x40
-	O_DIRECT                         = 0x10000
-	O_DIRECTORY                      = 0x4000
-	O_DSYNC                          = 0x1000
-	O_EXCL                           = 0x80
-	O_FSYNC                          = 0x101000
-	O_LARGEFILE                      = 0x0
-	O_NDELAY                         = 0x800
-	O_NOATIME                        = 0x40000
-	O_NOCTTY                         = 0x100
-	O_NOFOLLOW                       = 0x8000
-	O_NONBLOCK                       = 0x800
-	O_PATH                           = 0x200000
-	O_RDONLY                         = 0x0
-	O_RDWR                           = 0x2
-	O_RSYNC                          = 0x101000
-	O_SYNC                           = 0x101000
-	O_TMPFILE                        = 0x410000
-	O_TRUNC                          = 0x200
-	O_WRONLY                         = 0x1
-	PACKET_ADD_MEMBERSHIP            = 0x1
-	PACKET_AUXDATA                   = 0x8
-	PACKET_BROADCAST                 = 0x1
-	PACKET_COPY_THRESH               = 0x7
-	PACKET_DROP_MEMBERSHIP           = 0x2
-	PACKET_FANOUT                    = 0x12
-	PACKET_FANOUT_CPU                = 0x2
-	PACKET_FANOUT_FLAG_DEFRAG        = 0x8000
-	PACKET_FANOUT_FLAG_ROLLOVER      = 0x1000
-	PACKET_FANOUT_HASH               = 0x0
-	PACKET_FANOUT_LB                 = 0x1
-	PACKET_FANOUT_RND                = 0x4
-	PACKET_FANOUT_ROLLOVER           = 0x3
-	PACKET_FASTROUTE                 = 0x6
-	PACKET_HDRLEN                    = 0xb
-	PACKET_HOST                      = 0x0
-	PACKET_LOOPBACK                  = 0x5
-	PACKET_LOSS                      = 0xe
-	PACKET_MR_ALLMULTI               = 0x2
-	PACKET_MR_MULTICAST              = 0x0
-	PACKET_MR_PROMISC                = 0x1
-	PACKET_MR_UNICAST                = 0x3
-	PACKET_MULTICAST                 = 0x2
-	PACKET_ORIGDEV                   = 0x9
-	PACKET_OTHERHOST                 = 0x3
-	PACKET_OUTGOING                  = 0x4
-	PACKET_RECV_OUTPUT               = 0x3
-	PACKET_RESERVE                   = 0xc
-	PACKET_RX_RING                   = 0x5
-	PACKET_STATISTICS                = 0x6
-	PACKET_TIMESTAMP                 = 0x11
-	PACKET_TX_HAS_OFF                = 0x13
-	PACKET_TX_RING                   = 0xd
-	PACKET_TX_TIMESTAMP              = 0x10
-	PACKET_VERSION                   = 0xa
-	PACKET_VNET_HDR                  = 0xf
-	PARENB                           = 0x100
-	PARITY_CRC16_PR0                 = 0x2
-	PARITY_CRC16_PR0_CCITT           = 0x4
-	PARITY_CRC16_PR1                 = 0x3
-	PARITY_CRC16_PR1_CCITT           = 0x5
-	PARITY_CRC32_PR0_CCITT           = 0x6
-	PARITY_CRC32_PR1_CCITT           = 0x7
-	PARITY_DEFAULT                   = 0x0
-	PARITY_NONE                      = 0x1
-	PARMRK                           = 0x8
-	PARODD                           = 0x200
-	PENDIN                           = 0x4000
-	PRIO_PGRP                        = 0x1
-	PRIO_PROCESS                     = 0x0
-	PRIO_USER                        = 0x2
-	PROT_EXEC                        = 0x4
-	PROT_GROWSDOWN                   = 0x1000000
-	PROT_GROWSUP                     = 0x2000000
-	PROT_NONE                        = 0x0
-	PROT_READ                        = 0x1
-	PROT_WRITE                       = 0x2
-	PR_CAPBSET_DROP                  = 0x18
-	PR_CAPBSET_READ                  = 0x17
-	PR_ENDIAN_BIG                    = 0x0
-	PR_ENDIAN_LITTLE                 = 0x1
-	PR_ENDIAN_PPC_LITTLE             = 0x2
-	PR_FPEMU_NOPRINT                 = 0x1
-	PR_FPEMU_SIGFPE                  = 0x2
-	PR_FP_EXC_ASYNC                  = 0x2
-	PR_FP_EXC_DISABLED               = 0x0
-	PR_FP_EXC_DIV                    = 0x10000
-	PR_FP_EXC_INV                    = 0x100000
-	PR_FP_EXC_NONRECOV               = 0x1
-	PR_FP_EXC_OVF                    = 0x20000
-	PR_FP_EXC_PRECISE                = 0x3
-	PR_FP_EXC_RES                    = 0x80000
-	PR_FP_EXC_SW_ENABLE              = 0x80
-	PR_FP_EXC_UND                    = 0x40000
-	PR_GET_CHILD_SUBREAPER           = 0x25
-	PR_GET_DUMPABLE                  = 0x3
-	PR_GET_ENDIAN                    = 0x13
-	PR_GET_FPEMU                     = 0x9
-	PR_GET_FPEXC                     = 0xb
-	PR_GET_KEEPCAPS                  = 0x7
-	PR_GET_NAME                      = 0x10
-	PR_GET_NO_NEW_PRIVS              = 0x27
-	PR_GET_PDEATHSIG                 = 0x2
-	PR_GET_SECCOMP                   = 0x15
-	PR_GET_SECUREBITS                = 0x1b
-	PR_GET_TID_ADDRESS               = 0x28
-	PR_GET_TIMERSLACK                = 0x1e
-	PR_GET_TIMING                    = 0xd
-	PR_GET_TSC                       = 0x19
-	PR_GET_UNALIGN                   = 0x5
-	PR_MCE_KILL                      = 0x21
-	PR_MCE_KILL_CLEAR                = 0x0
-	PR_MCE_KILL_DEFAULT              = 0x2
-	PR_MCE_KILL_EARLY                = 0x1
-	PR_MCE_KILL_GET                  = 0x22
-	PR_MCE_KILL_LATE                 = 0x0
-	PR_MCE_KILL_SET                  = 0x1
-	PR_SET_CHILD_SUBREAPER           = 0x24
-	PR_SET_DUMPABLE                  = 0x4
-	PR_SET_ENDIAN                    = 0x14
-	PR_SET_FPEMU                     = 0xa
-	PR_SET_FPEXC                     = 0xc
-	PR_SET_KEEPCAPS                  = 0x8
-	PR_SET_MM                        = 0x23
-	PR_SET_MM_ARG_END                = 0x9
-	PR_SET_MM_ARG_START              = 0x8
-	PR_SET_MM_AUXV                   = 0xc
-	PR_SET_MM_BRK                    = 0x7
-	PR_SET_MM_END_CODE               = 0x2
-	PR_SET_MM_END_DATA               = 0x4
-	PR_SET_MM_ENV_END                = 0xb
-	PR_SET_MM_ENV_START              = 0xa
-	PR_SET_MM_EXE_FILE               = 0xd
-	PR_SET_MM_START_BRK              = 0x6
-	PR_SET_MM_START_CODE             = 0x1
-	PR_SET_MM_START_DATA             = 0x3
-	PR_SET_MM_START_STACK            = 0x5
-	PR_SET_NAME                      = 0xf
-	PR_SET_NO_NEW_PRIVS              = 0x26
-	PR_SET_PDEATHSIG                 = 0x1
-	PR_SET_PTRACER                   = 0x59616d61
-	PR_SET_PTRACER_ANY               = -0x1
-	PR_SET_SECCOMP                   = 0x16
-	PR_SET_SECUREBITS                = 0x1c
-	PR_SET_TIMERSLACK                = 0x1d
-	PR_SET_TIMING                    = 0xe
-	PR_SET_TSC                       = 0x1a
-	PR_SET_UNALIGN                   = 0x6
-	PR_TASK_PERF_EVENTS_DISABLE      = 0x1f
-	PR_TASK_PERF_EVENTS_ENABLE       = 0x20
-	PR_TIMING_STATISTICAL            = 0x0
-	PR_TIMING_TIMESTAMP              = 0x1
-	PR_TSC_ENABLE                    = 0x1
-	PR_TSC_SIGSEGV                   = 0x2
-	PR_UNALIGN_NOPRINT               = 0x1
-	PR_UNALIGN_SIGBUS                = 0x2
-	PTRACE_ATTACH                    = 0x10
-	PTRACE_CONT                      = 0x7
-	PTRACE_DETACH                    = 0x11
-	PTRACE_EVENT_CLONE               = 0x3
-	PTRACE_EVENT_EXEC                = 0x4
-	PTRACE_EVENT_EXIT                = 0x6
-	PTRACE_EVENT_FORK                = 0x1
-	PTRACE_EVENT_SECCOMP             = 0x7
-	PTRACE_EVENT_STOP                = 0x80
-	PTRACE_EVENT_VFORK               = 0x2
-	PTRACE_EVENT_VFORK_DONE          = 0x5
-	PTRACE_GETEVENTMSG               = 0x4201
-	PTRACE_GETREGS                   = 0xc
-	PTRACE_GETREGSET                 = 0x4204
-	PTRACE_GETSIGINFO                = 0x4202
-	PTRACE_GETSIGMASK                = 0x420a
-	PTRACE_INTERRUPT                 = 0x4207
-	PTRACE_KILL                      = 0x8
-	PTRACE_LISTEN                    = 0x4208
-	PTRACE_O_EXITKILL                = 0x100000
-	PTRACE_O_MASK                    = 0x1000ff
-	PTRACE_O_TRACECLONE              = 0x8
-	PTRACE_O_TRACEEXEC               = 0x10
-	PTRACE_O_TRACEEXIT               = 0x40
-	PTRACE_O_TRACEFORK               = 0x2
-	PTRACE_O_TRACESECCOMP            = 0x80
-	PTRACE_O_TRACESYSGOOD            = 0x1
-	PTRACE_O_TRACEVFORK              = 0x4
-	PTRACE_O_TRACEVFORKDONE          = 0x20
-	PTRACE_PEEKDATA                  = 0x2
-	PTRACE_PEEKSIGINFO               = 0x4209
-	PTRACE_PEEKSIGINFO_SHARED        = 0x1
-	PTRACE_PEEKTEXT                  = 0x1
-	PTRACE_PEEKUSR                   = 0x3
-	PTRACE_POKEDATA                  = 0x5
-	PTRACE_POKETEXT                  = 0x4
-	PTRACE_POKEUSR                   = 0x6
-	PTRACE_SEIZE                     = 0x4206
-	PTRACE_SETOPTIONS                = 0x4200
-	PTRACE_SETREGS                   = 0xd
-	PTRACE_SETREGSET                 = 0x4205
-	PTRACE_SETSIGINFO                = 0x4203
-	PTRACE_SETSIGMASK                = 0x420b
-	PTRACE_SINGLESTEP                = 0x9
-	PTRACE_SYSCALL                   = 0x18
-	PTRACE_TRACEME                   = 0x0
-	RLIMIT_AS                        = 0x9
-	RLIMIT_CORE                      = 0x4
-	RLIMIT_CPU                       = 0x0
-	RLIMIT_DATA                      = 0x2
-	RLIMIT_FSIZE                     = 0x1
-	RLIMIT_NOFILE                    = 0x7
-	RLIMIT_STACK                     = 0x3
-	RLIM_INFINITY                    = -0x1
-	RTAX_ADVMSS                      = 0x8
-	RTAX_CWND                        = 0x7
-	RTAX_FEATURES                    = 0xc
-	RTAX_FEATURE_ALLFRAG             = 0x8
-	RTAX_FEATURE_ECN                 = 0x1
-	RTAX_FEATURE_SACK                = 0x2
-	RTAX_FEATURE_TIMESTAMP           = 0x4
-	RTAX_HOPLIMIT                    = 0xa
-	RTAX_INITCWND                    = 0xb
-	RTAX_INITRWND                    = 0xe
-	RTAX_LOCK                        = 0x1
-	RTAX_MAX                         = 0xf
-	RTAX_MTU                         = 0x2
-	RTAX_QUICKACK                    = 0xf
-	RTAX_REORDERING                  = 0x9
-	RTAX_RTO_MIN                     = 0xd
-	RTAX_RTT                         = 0x4
-	RTAX_RTTVAR                      = 0x5
-	RTAX_SSTHRESH                    = 0x6
-	RTAX_UNSPEC                      = 0x0
-	RTAX_WINDOW                      = 0x3
-	RTA_ALIGNTO                      = 0x4
-	RTA_MAX                          = 0x11
-	RTCF_DIRECTSRC                   = 0x4000000
-	RTCF_DOREDIRECT                  = 0x1000000
-	RTCF_LOG                         = 0x2000000
-	RTCF_MASQ                        = 0x400000
-	RTCF_NAT                         = 0x800000
-	RTCF_VALVE                       = 0x200000
-	RTF_ADDRCLASSMASK                = 0xf8000000
-	RTF_ADDRCONF                     = 0x40000
-	RTF_ALLONLINK                    = 0x20000
-	RTF_BROADCAST                    = 0x10000000
-	RTF_CACHE                        = 0x1000000
-	RTF_DEFAULT                      = 0x10000
-	RTF_DYNAMIC                      = 0x10
-	RTF_FLOW                         = 0x2000000
-	RTF_GATEWAY                      = 0x2
-	RTF_HOST                         = 0x4
-	RTF_INTERFACE                    = 0x40000000
-	RTF_IRTT                         = 0x100
-	RTF_LINKRT                       = 0x100000
-	RTF_LOCAL                        = 0x80000000
-	RTF_MODIFIED                     = 0x20
-	RTF_MSS                          = 0x40
-	RTF_MTU                          = 0x40
-	RTF_MULTICAST                    = 0x20000000
-	RTF_NAT                          = 0x8000000
-	RTF_NOFORWARD                    = 0x1000
-	RTF_NONEXTHOP                    = 0x200000
-	RTF_NOPMTUDISC                   = 0x4000
-	RTF_POLICY                       = 0x4000000
-	RTF_REINSTATE                    = 0x8
-	RTF_REJECT                       = 0x200
-	RTF_STATIC                       = 0x400
-	RTF_THROW                        = 0x2000
-	RTF_UP                           = 0x1
-	RTF_WINDOW                       = 0x80
-	RTF_XRESOLVE                     = 0x800
-	RTM_BASE                         = 0x10
-	RTM_DELACTION                    = 0x31
-	RTM_DELADDR                      = 0x15
-	RTM_DELADDRLABEL                 = 0x49
-	RTM_DELLINK                      = 0x11
-	RTM_DELMDB                       = 0x55
-	RTM_DELNEIGH                     = 0x1d
-	RTM_DELQDISC                     = 0x25
-	RTM_DELROUTE                     = 0x19
-	RTM_DELRULE                      = 0x21
-	RTM_DELTCLASS                    = 0x29
-	RTM_DELTFILTER                   = 0x2d
-	RTM_F_CLONED                     = 0x200
-	RTM_F_EQUALIZE                   = 0x400
-	RTM_F_NOTIFY                     = 0x100
-	RTM_F_PREFIX                     = 0x800
-	RTM_GETACTION                    = 0x32
-	RTM_GETADDR                      = 0x16
-	RTM_GETADDRLABEL                 = 0x4a
-	RTM_GETANYCAST                   = 0x3e
-	RTM_GETDCB                       = 0x4e
-	RTM_GETLINK                      = 0x12
-	RTM_GETMDB                       = 0x56
-	RTM_GETMULTICAST                 = 0x3a
-	RTM_GETNEIGH                     = 0x1e
-	RTM_GETNEIGHTBL                  = 0x42
-	RTM_GETNETCONF                   = 0x52
-	RTM_GETQDISC                     = 0x26
-	RTM_GETROUTE                     = 0x1a
-	RTM_GETRULE                      = 0x22
-	RTM_GETTCLASS                    = 0x2a
-	RTM_GETTFILTER                   = 0x2e
-	RTM_MAX                          = 0x57
-	RTM_NEWACTION                    = 0x30
-	RTM_NEWADDR                      = 0x14
-	RTM_NEWADDRLABEL                 = 0x48
-	RTM_NEWLINK                      = 0x10
-	RTM_NEWMDB                       = 0x54
-	RTM_NEWNDUSEROPT                 = 0x44
-	RTM_NEWNEIGH                     = 0x1c
-	RTM_NEWNEIGHTBL                  = 0x40
-	RTM_NEWNETCONF                   = 0x50
-	RTM_NEWPREFIX                    = 0x34
-	RTM_NEWQDISC                     = 0x24
-	RTM_NEWROUTE                     = 0x18
-	RTM_NEWRULE                      = 0x20
-	RTM_NEWTCLASS                    = 0x28
-	RTM_NEWTFILTER                   = 0x2c
-	RTM_NR_FAMILIES                  = 0x12
-	RTM_NR_MSGTYPES                  = 0x48
-	RTM_SETDCB                       = 0x4f
-	RTM_SETLINK                      = 0x13
-	RTM_SETNEIGHTBL                  = 0x43
-	RTNH_ALIGNTO                     = 0x4
-	RTNH_F_DEAD                      = 0x1
-	RTNH_F_ONLINK                    = 0x4
-	RTNH_F_PERVASIVE                 = 0x2
-	RTN_MAX                          = 0xb
-	RTPROT_BIRD                      = 0xc
-	RTPROT_BOOT                      = 0x3
-	RTPROT_DHCP                      = 0x10
-	RTPROT_DNROUTED                  = 0xd
-	RTPROT_GATED                     = 0x8
-	RTPROT_KERNEL                    = 0x2
-	RTPROT_MROUTED                   = 0x11
-	RTPROT_MRT                       = 0xa
-	RTPROT_NTK                       = 0xf
-	RTPROT_RA                        = 0x9
-	RTPROT_REDIRECT                  = 0x1
-	RTPROT_STATIC                    = 0x4
-	RTPROT_UNSPEC                    = 0x0
-	RTPROT_XORP                      = 0xe
-	RTPROT_ZEBRA                     = 0xb
-	RT_CLASS_DEFAULT                 = 0xfd
-	RT_CLASS_LOCAL                   = 0xff
-	RT_CLASS_MAIN                    = 0xfe
-	RT_CLASS_MAX                     = 0xff
-	RT_CLASS_UNSPEC                  = 0x0
-	RUSAGE_CHILDREN                  = -0x1
-	RUSAGE_SELF                      = 0x0
-	RUSAGE_THREAD                    = 0x1
-	SCM_CREDENTIALS                  = 0x2
-	SCM_RIGHTS                       = 0x1
-	SCM_TIMESTAMP                    = 0x1d
-	SCM_TIMESTAMPING                 = 0x25
-	SCM_TIMESTAMPNS                  = 0x23
-	SCM_WIFI_STATUS                  = 0x29
-	SHUT_RD                          = 0x0
-	SHUT_RDWR                        = 0x2
-	SHUT_WR                          = 0x1
-	SIOCADDDLCI                      = 0x8980
-	SIOCADDMULTI                     = 0x8931
-	SIOCADDRT                        = 0x890b
-	SIOCATMARK                       = 0x8905
-	SIOCDARP                         = 0x8953
-	SIOCDELDLCI                      = 0x8981
-	SIOCDELMULTI                     = 0x8932
-	SIOCDELRT                        = 0x890c
-	SIOCDEVPRIVATE                   = 0x89f0
-	SIOCDIFADDR                      = 0x8936
-	SIOCDRARP                        = 0x8960
-	SIOCGARP                         = 0x8954
-	SIOCGIFADDR                      = 0x8915
-	SIOCGIFBR                        = 0x8940
-	SIOCGIFBRDADDR                   = 0x8919
-	SIOCGIFCONF                      = 0x8912
-	SIOCGIFCOUNT                     = 0x8938
-	SIOCGIFDSTADDR                   = 0x8917
-	SIOCGIFENCAP                     = 0x8925
-	SIOCGIFFLAGS                     = 0x8913
-	SIOCGIFHWADDR                    = 0x8927
-	SIOCGIFINDEX                     = 0x8933
-	SIOCGIFMAP                       = 0x8970
-	SIOCGIFMEM                       = 0x891f
-	SIOCGIFMETRIC                    = 0x891d
-	SIOCGIFMTU                       = 0x8921
-	SIOCGIFNAME                      = 0x8910
-	SIOCGIFNETMASK                   = 0x891b
-	SIOCGIFPFLAGS                    = 0x8935
-	SIOCGIFSLAVE                     = 0x8929
-	SIOCGIFTXQLEN                    = 0x8942
-	SIOCGPGRP                        = 0x8904
-	SIOCGRARP                        = 0x8961
-	SIOCGSTAMP                       = 0x8906
-	SIOCGSTAMPNS                     = 0x8907
-	SIOCPROTOPRIVATE                 = 0x89e0
-	SIOCRTMSG                        = 0x890d
-	SIOCSARP                         = 0x8955
-	SIOCSIFADDR                      = 0x8916
-	SIOCSIFBR                        = 0x8941
-	SIOCSIFBRDADDR                   = 0x891a
-	SIOCSIFDSTADDR                   = 0x8918
-	SIOCSIFENCAP                     = 0x8926
-	SIOCSIFFLAGS                     = 0x8914
-	SIOCSIFHWADDR                    = 0x8924
-	SIOCSIFHWBROADCAST               = 0x8937
-	SIOCSIFLINK                      = 0x8911
-	SIOCSIFMAP                       = 0x8971
-	SIOCSIFMEM                       = 0x8920
-	SIOCSIFMETRIC                    = 0x891e
-	SIOCSIFMTU                       = 0x8922
-	SIOCSIFNAME                      = 0x8923
-	SIOCSIFNETMASK                   = 0x891c
-	SIOCSIFPFLAGS                    = 0x8934
-	SIOCSIFSLAVE                     = 0x8930
-	SIOCSIFTXQLEN                    = 0x8943
-	SIOCSPGRP                        = 0x8902
-	SIOCSRARP                        = 0x8962
-	SOCK_CLOEXEC                     = 0x80000
-	SOCK_DCCP                        = 0x6
-	SOCK_DGRAM                       = 0x2
-	SOCK_NONBLOCK                    = 0x800
-	SOCK_PACKET                      = 0xa
-	SOCK_RAW                         = 0x3
-	SOCK_RDM                         = 0x4
-	SOCK_SEQPACKET                   = 0x5
-	SOCK_STREAM                      = 0x1
-	SOL_AAL                          = 0x109
-	SOL_ATM                          = 0x108
-	SOL_DECNET                       = 0x105
-	SOL_ICMPV6                       = 0x3a
-	SOL_IP                           = 0x0
-	SOL_IPV6                         = 0x29
-	SOL_IRDA                         = 0x10a
-	SOL_PACKET                       = 0x107
-	SOL_RAW                          = 0xff
-	SOL_SOCKET                       = 0x1
-	SOL_TCP                          = 0x6
-	SOL_X25                          = 0x106
-	SOMAXCONN                        = 0x80
-	SO_ACCEPTCONN                    = 0x1e
-	SO_ATTACH_FILTER                 = 0x1a
-	SO_BINDTODEVICE                  = 0x19
-	SO_BROADCAST                     = 0x6
-	SO_BSDCOMPAT                     = 0xe
-	SO_BUSY_POLL                     = 0x2e
-	SO_DEBUG                         = 0x1
-	SO_DETACH_FILTER                 = 0x1b
-	SO_DOMAIN                        = 0x27
-	SO_DONTROUTE                     = 0x5
-	SO_ERROR                         = 0x4
-	SO_GET_FILTER                    = 0x1a
-	SO_KEEPALIVE                     = 0x9
-	SO_LINGER                        = 0xd
-	SO_LOCK_FILTER                   = 0x2c
-	SO_MARK                          = 0x24
-	SO_MAX_PACING_RATE               = 0x2f
-	SO_NOFCS                         = 0x2b
-	SO_NO_CHECK                      = 0xb
-	SO_OOBINLINE                     = 0xa
-	SO_PASSCRED                      = 0x10
-	SO_PASSSEC                       = 0x22
-	SO_PEEK_OFF                      = 0x2a
-	SO_PEERCRED                      = 0x11
-	SO_PEERNAME                      = 0x1c
-	SO_PEERSEC                       = 0x1f
-	SO_PRIORITY                      = 0xc
-	SO_PROTOCOL                      = 0x26
-	SO_RCVBUF                        = 0x8
-	SO_RCVBUFFORCE                   = 0x21
-	SO_RCVLOWAT                      = 0x12
-	SO_RCVTIMEO                      = 0x14
-	SO_REUSEADDR                     = 0x2
-	SO_REUSEPORT                     = 0xf
-	SO_RXQ_OVFL                      = 0x28
-	SO_SECURITY_AUTHENTICATION       = 0x16
-	SO_SECURITY_ENCRYPTION_NETWORK   = 0x18
-	SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
-	SO_SELECT_ERR_QUEUE              = 0x2d
-	SO_SNDBUF                        = 0x7
-	SO_SNDBUFFORCE                   = 0x20
-	SO_SNDLOWAT                      = 0x13
-	SO_SNDTIMEO                      = 0x15
-	SO_TIMESTAMP                     = 0x1d
-	SO_TIMESTAMPING                  = 0x25
-	SO_TIMESTAMPNS                   = 0x23
-	SO_TYPE                          = 0x3
-	SO_WIFI_STATUS                   = 0x29
-	S_BLKSIZE                        = 0x200
-	S_IEXEC                          = 0x40
-	S_IFBLK                          = 0x6000
-	S_IFCHR                          = 0x2000
-	S_IFDIR                          = 0x4000
-	S_IFIFO                          = 0x1000
-	S_IFLNK                          = 0xa000
-	S_IFMT                           = 0xf000
-	S_IFREG                          = 0x8000
-	S_IFSOCK                         = 0xc000
-	S_IREAD                          = 0x100
-	S_IRGRP                          = 0x20
-	S_IROTH                          = 0x4
-	S_IRUSR                          = 0x100
-	S_IRWXG                          = 0x38
-	S_IRWXO                          = 0x7
-	S_IRWXU                          = 0x1c0
-	S_ISGID                          = 0x400
-	S_ISUID                          = 0x800
-	S_ISVTX                          = 0x200
-	S_IWGRP                          = 0x10
-	S_IWOTH                          = 0x2
-	S_IWRITE                         = 0x80
-	S_IWUSR                          = 0x80
-	S_IXGRP                          = 0x8
-	S_IXOTH                          = 0x1
-	S_IXUSR                          = 0x40
-	TCFLSH                           = 0x540b
-	TCIFLUSH                         = 0x0
-	TCIOFLUSH                        = 0x2
-	TCOFLUSH                         = 0x1
-	TCP_CONGESTION                   = 0xd
-	TCP_COOKIE_IN_ALWAYS             = 0x1
-	TCP_COOKIE_MAX                   = 0x10
-	TCP_COOKIE_MIN                   = 0x8
-	TCP_COOKIE_OUT_NEVER             = 0x2
-	TCP_COOKIE_PAIR_SIZE             = 0x20
-	TCP_COOKIE_TRANSACTIONS          = 0xf
-	TCP_CORK                         = 0x3
-	TCP_DEFER_ACCEPT                 = 0x9
-	TCP_FASTOPEN                     = 0x17
-	TCP_INFO                         = 0xb
-	TCP_KEEPCNT                      = 0x6
-	TCP_KEEPIDLE                     = 0x4
-	TCP_KEEPINTVL                    = 0x5
-	TCP_LINGER2                      = 0x8
-	TCP_MAXSEG                       = 0x2
-	TCP_MAXWIN                       = 0xffff
-	TCP_MAX_WINSHIFT                 = 0xe
-	TCP_MD5SIG                       = 0xe
-	TCP_MD5SIG_MAXKEYLEN             = 0x50
-	TCP_MSS                          = 0x200
-	TCP_MSS_DEFAULT                  = 0x218
-	TCP_MSS_DESIRED                  = 0x4c4
-	TCP_NODELAY                      = 0x1
-	TCP_QUEUE_SEQ                    = 0x15
-	TCP_QUICKACK                     = 0xc
-	TCP_REPAIR                       = 0x13
-	TCP_REPAIR_OPTIONS               = 0x16
-	TCP_REPAIR_QUEUE                 = 0x14
-	TCP_SYNCNT                       = 0x7
-	TCP_S_DATA_IN                    = 0x4
-	TCP_S_DATA_OUT                   = 0x8
-	TCP_THIN_DUPACK                  = 0x11
-	TCP_THIN_LINEAR_TIMEOUTS         = 0x10
-	TCP_TIMESTAMP                    = 0x18
-	TCP_USER_TIMEOUT                 = 0x12
-	TCP_WINDOW_CLAMP                 = 0xa
-	TCSAFLUSH                        = 0x2
-	TIOCCBRK                         = 0x5428
-	TIOCCONS                         = 0x541d
-	TIOCEXCL                         = 0x540c
-	TIOCGDEV                         = 0x80045432
-	TIOCGETD                         = 0x5424
-	TIOCGEXCL                        = 0x80045440
-	TIOCGICOUNT                      = 0x545d
-	TIOCGLCKTRMIOS                   = 0x5456
-	TIOCGPGRP                        = 0x540f
-	TIOCGPKT                         = 0x80045438
-	TIOCGPTLCK                       = 0x80045439
-	TIOCGPTN                         = 0x80045430
-	TIOCGRS485                       = 0x542e
-	TIOCGSERIAL                      = 0x541e
-	TIOCGSID                         = 0x5429
-	TIOCGSOFTCAR                     = 0x5419
-	TIOCGWINSZ                       = 0x5413
-	TIOCINQ                          = 0x541b
-	TIOCLINUX                        = 0x541c
-	TIOCMBIC                         = 0x5417
-	TIOCMBIS                         = 0x5416
-	TIOCMGET                         = 0x5415
-	TIOCMIWAIT                       = 0x545c
-	TIOCMSET                         = 0x5418
-	TIOCM_CAR                        = 0x40
-	TIOCM_CD                         = 0x40
-	TIOCM_CTS                        = 0x20
-	TIOCM_DSR                        = 0x100
-	TIOCM_DTR                        = 0x2
-	TIOCM_LE                         = 0x1
-	TIOCM_RI                         = 0x80
-	TIOCM_RNG                        = 0x80
-	TIOCM_RTS                        = 0x4
-	TIOCM_SR                         = 0x10
-	TIOCM_ST                         = 0x8
-	TIOCNOTTY                        = 0x5422
-	TIOCNXCL                         = 0x540d
-	TIOCOUTQ                         = 0x5411
-	TIOCPKT                          = 0x5420
-	TIOCPKT_DATA                     = 0x0
-	TIOCPKT_DOSTOP                   = 0x20
-	TIOCPKT_FLUSHREAD                = 0x1
-	TIOCPKT_FLUSHWRITE               = 0x2
-	TIOCPKT_IOCTL                    = 0x40
-	TIOCPKT_NOSTOP                   = 0x10
-	TIOCPKT_START                    = 0x8
-	TIOCPKT_STOP                     = 0x4
-	TIOCSBRK                         = 0x5427
-	TIOCSCTTY                        = 0x540e
-	TIOCSERCONFIG                    = 0x5453
-	TIOCSERGETLSR                    = 0x5459
-	TIOCSERGETMULTI                  = 0x545a
-	TIOCSERGSTRUCT                   = 0x5458
-	TIOCSERGWILD                     = 0x5454
-	TIOCSERSETMULTI                  = 0x545b
-	TIOCSERSWILD                     = 0x5455
-	TIOCSER_TEMT                     = 0x1
-	TIOCSETD                         = 0x5423
-	TIOCSIG                          = 0x40045436
-	TIOCSLCKTRMIOS                   = 0x5457
-	TIOCSPGRP                        = 0x5410
-	TIOCSPTLCK                       = 0x40045431
-	TIOCSRS485                       = 0x542f
-	TIOCSSERIAL                      = 0x541f
-	TIOCSSOFTCAR                     = 0x541a
-	TIOCSTI                          = 0x5412
-	TIOCSWINSZ                       = 0x5414
-	TIOCVHANGUP                      = 0x5437
-	TOSTOP                           = 0x100
-	TUNATTACHFILTER                  = 0x401054d5
-	TUNDETACHFILTER                  = 0x401054d6
-	TUNGETFEATURES                   = 0x800454cf
-	TUNGETFILTER                     = 0x801054db
-	TUNGETIFF                        = 0x800454d2
-	TUNGETSNDBUF                     = 0x800454d3
-	TUNGETVNETHDRSZ                  = 0x800454d7
-	TUNSETDEBUG                      = 0x400454c9
-	TUNSETGROUP                      = 0x400454ce
-	TUNSETIFF                        = 0x400454ca
-	TUNSETIFINDEX                    = 0x400454da
-	TUNSETLINK                       = 0x400454cd
-	TUNSETNOCSUM                     = 0x400454c8
-	TUNSETOFFLOAD                    = 0x400454d0
-	TUNSETOWNER                      = 0x400454cc
-	TUNSETPERSIST                    = 0x400454cb
-	TUNSETQUEUE                      = 0x400454d9
-	TUNSETSNDBUF                     = 0x400454d4
-	TUNSETTXFILTER                   = 0x400454d1
-	TUNSETVNETHDRSZ                  = 0x400454d8
-	VDISCARD                         = 0xd
-	VEOF                             = 0x4
-	VEOL                             = 0xb
-	VEOL2                            = 0x10
-	VERASE                           = 0x2
-	VINTR                            = 0x0
-	VKILL                            = 0x3
-	VLNEXT                           = 0xf
-	VMIN                             = 0x6
-	VQUIT                            = 0x1
-	VREPRINT                         = 0xc
-	VSTART                           = 0x8
-	VSTOP                            = 0x9
-	VSUSP                            = 0xa
-	VSWTC                            = 0x7
-	VT0                              = 0x0
-	VT1                              = 0x4000
-	VTDLY                            = 0x4000
-	VTIME                            = 0x5
-	VWERASE                          = 0xe
-	WALL                             = 0x40000000
-	WCLONE                           = 0x80000000
-	WCONTINUED                       = 0x8
-	WEXITED                          = 0x4
-	WNOHANG                          = 0x1
-	WNOTHREAD                        = 0x20000000
-	WNOWAIT                          = 0x1000000
-	WORDSIZE                         = 0x40
-	WSTOPPED                         = 0x2
-	WUNTRACED                        = 0x2
-)
-
-// Errors
-const (
-	E2BIG           = Errno(0x7)
-	EACCES          = Errno(0xd)
-	EADDRINUSE      = Errno(0x62)
-	EADDRNOTAVAIL   = Errno(0x63)
-	EADV            = Errno(0x44)
-	EAFNOSUPPORT    = Errno(0x61)
-	EAGAIN          = Errno(0xb)
-	EALREADY        = Errno(0x72)
-	EBADE           = Errno(0x34)
-	EBADF           = Errno(0x9)
-	EBADFD          = Errno(0x4d)
-	EBADMSG         = Errno(0x4a)
-	EBADR           = Errno(0x35)
-	EBADRQC         = Errno(0x38)
-	EBADSLT         = Errno(0x39)
-	EBFONT          = Errno(0x3b)
-	EBUSY           = Errno(0x10)
-	ECANCELED       = Errno(0x7d)
-	ECHILD          = Errno(0xa)
-	ECHRNG          = Errno(0x2c)
-	ECOMM           = Errno(0x46)
-	ECONNABORTED    = Errno(0x67)
-	ECONNREFUSED    = Errno(0x6f)
-	ECONNRESET      = Errno(0x68)
-	EDEADLK         = Errno(0x23)
-	EDEADLOCK       = Errno(0x23)
-	EDESTADDRREQ    = Errno(0x59)
-	EDOM            = Errno(0x21)
-	EDOTDOT         = Errno(0x49)
-	EDQUOT          = Errno(0x7a)
-	EEXIST          = Errno(0x11)
-	EFAULT          = Errno(0xe)
-	EFBIG           = Errno(0x1b)
-	EHOSTDOWN       = Errno(0x70)
-	EHOSTUNREACH    = Errno(0x71)
-	EHWPOISON       = Errno(0x85)
-	EIDRM           = Errno(0x2b)
-	EILSEQ          = Errno(0x54)
-	EINPROGRESS     = Errno(0x73)
-	EINTR           = Errno(0x4)
-	EINVAL          = Errno(0x16)
-	EIO             = Errno(0x5)
-	EISCONN         = Errno(0x6a)
-	EISDIR          = Errno(0x15)
-	EISNAM          = Errno(0x78)
-	EKEYEXPIRED     = Errno(0x7f)
-	EKEYREJECTED    = Errno(0x81)
-	EKEYREVOKED     = Errno(0x80)
-	EL2HLT          = Errno(0x33)
-	EL2NSYNC        = Errno(0x2d)
-	EL3HLT          = Errno(0x2e)
-	EL3RST          = Errno(0x2f)
-	ELIBACC         = Errno(0x4f)
-	ELIBBAD         = Errno(0x50)
-	ELIBEXEC        = Errno(0x53)
-	ELIBMAX         = Errno(0x52)
-	ELIBSCN         = Errno(0x51)
-	ELNRNG          = Errno(0x30)
-	ELOOP           = Errno(0x28)
-	EMEDIUMTYPE     = Errno(0x7c)
-	EMFILE          = Errno(0x18)
-	EMLINK          = Errno(0x1f)
-	EMSGSIZE        = Errno(0x5a)
-	EMULTIHOP       = Errno(0x48)
-	ENAMETOOLONG    = Errno(0x24)
-	ENAVAIL         = Errno(0x77)
-	ENETDOWN        = Errno(0x64)
-	ENETRESET       = Errno(0x66)
-	ENETUNREACH     = Errno(0x65)
-	ENFILE          = Errno(0x17)
-	ENOANO          = Errno(0x37)
-	ENOBUFS         = Errno(0x69)
-	ENOCSI          = Errno(0x32)
-	ENODATA         = Errno(0x3d)
-	ENODEV          = Errno(0x13)
-	ENOENT          = Errno(0x2)
-	ENOEXEC         = Errno(0x8)
-	ENOKEY          = Errno(0x7e)
-	ENOLCK          = Errno(0x25)
-	ENOLINK         = Errno(0x43)
-	ENOMEDIUM       = Errno(0x7b)
-	ENOMEM          = Errno(0xc)
-	ENOMSG          = Errno(0x2a)
-	ENONET          = Errno(0x40)
-	ENOPKG          = Errno(0x41)
-	ENOPROTOOPT     = Errno(0x5c)
-	ENOSPC          = Errno(0x1c)
-	ENOSR           = Errno(0x3f)
-	ENOSTR          = Errno(0x3c)
-	ENOSYS          = Errno(0x26)
-	ENOTBLK         = Errno(0xf)
-	ENOTCONN        = Errno(0x6b)
-	ENOTDIR         = Errno(0x14)
-	ENOTEMPTY       = Errno(0x27)
-	ENOTNAM         = Errno(0x76)
-	ENOTRECOVERABLE = Errno(0x83)
-	ENOTSOCK        = Errno(0x58)
-	ENOTSUP         = Errno(0x5f)
-	ENOTTY          = Errno(0x19)
-	ENOTUNIQ        = Errno(0x4c)
-	ENXIO           = Errno(0x6)
-	EOPNOTSUPP      = Errno(0x5f)
-	EOVERFLOW       = Errno(0x4b)
-	EOWNERDEAD      = Errno(0x82)
-	EPERM           = Errno(0x1)
-	EPFNOSUPPORT    = Errno(0x60)
-	EPIPE           = Errno(0x20)
-	EPROTO          = Errno(0x47)
-	EPROTONOSUPPORT = Errno(0x5d)
-	EPROTOTYPE      = Errno(0x5b)
-	ERANGE          = Errno(0x22)
-	EREMCHG         = Errno(0x4e)
-	EREMOTE         = Errno(0x42)
-	EREMOTEIO       = Errno(0x79)
-	ERESTART        = Errno(0x55)
-	ERFKILL         = Errno(0x84)
-	EROFS           = Errno(0x1e)
-	ESHUTDOWN       = Errno(0x6c)
-	ESOCKTNOSUPPORT = Errno(0x5e)
-	ESPIPE          = Errno(0x1d)
-	ESRCH           = Errno(0x3)
-	ESRMNT          = Errno(0x45)
-	ESTALE          = Errno(0x74)
-	ESTRPIPE        = Errno(0x56)
-	ETIME           = Errno(0x3e)
-	ETIMEDOUT       = Errno(0x6e)
-	ETOOMANYREFS    = Errno(0x6d)
-	ETXTBSY         = Errno(0x1a)
-	EUCLEAN         = Errno(0x75)
-	EUNATCH         = Errno(0x31)
-	EUSERS          = Errno(0x57)
-	EWOULDBLOCK     = Errno(0xb)
-	EXDEV           = Errno(0x12)
-	EXFULL          = Errno(0x36)
-)
-
-// Signals
-const (
-	SIGABRT   = Signal(0x6)
-	SIGALRM   = Signal(0xe)
-	SIGBUS    = Signal(0x7)
-	SIGCHLD   = Signal(0x11)
-	SIGCLD    = Signal(0x11)
-	SIGCONT   = Signal(0x12)
-	SIGFPE    = Signal(0x8)
-	SIGHUP    = Signal(0x1)
-	SIGILL    = Signal(0x4)
-	SIGINT    = Signal(0x2)
-	SIGIO     = Signal(0x1d)
-	SIGIOT    = Signal(0x6)
-	SIGKILL   = Signal(0x9)
-	SIGPIPE   = Signal(0xd)
-	SIGPOLL   = Signal(0x1d)
-	SIGPROF   = Signal(0x1b)
-	SIGPWR    = Signal(0x1e)
-	SIGQUIT   = Signal(0x3)
-	SIGSEGV   = Signal(0xb)
-	SIGSTKFLT = Signal(0x10)
-	SIGSTOP   = Signal(0x13)
-	SIGSYS    = Signal(0x1f)
-	SIGTERM   = Signal(0xf)
-	SIGTRAP   = Signal(0x5)
-	SIGTSTP   = Signal(0x14)
-	SIGTTIN   = Signal(0x15)
-	SIGTTOU   = Signal(0x16)
-	SIGUNUSED = Signal(0x1f)
-	SIGURG    = Signal(0x17)
-	SIGUSR1   = Signal(0xa)
-	SIGUSR2   = Signal(0xc)
-	SIGVTALRM = Signal(0x1a)
-	SIGWINCH  = Signal(0x1c)
-	SIGXCPU   = Signal(0x18)
-	SIGXFSZ   = Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:   "operation not permitted",
-	2:   "no such file or directory",
-	3:   "no such process",
-	4:   "interrupted system call",
-	5:   "input/output error",
-	6:   "no such device or address",
-	7:   "argument list too long",
-	8:   "exec format error",
-	9:   "bad file descriptor",
-	10:  "no child processes",
-	11:  "resource temporarily unavailable",
-	12:  "cannot allocate memory",
-	13:  "permission denied",
-	14:  "bad address",
-	15:  "block device required",
-	16:  "device or resource busy",
-	17:  "file exists",
-	18:  "invalid cross-device link",
-	19:  "no such device",
-	20:  "not a directory",
-	21:  "is a directory",
-	22:  "invalid argument",
-	23:  "too many open files in system",
-	24:  "too many open files",
-	25:  "inappropriate ioctl for device",
-	26:  "text file busy",
-	27:  "file too large",
-	28:  "no space left on device",
-	29:  "illegal seek",
-	30:  "read-only file system",
-	31:  "too many links",
-	32:  "broken pipe",
-	33:  "numerical argument out of domain",
-	34:  "numerical result out of range",
-	35:  "resource deadlock avoided",
-	36:  "file name too long",
-	37:  "no locks available",
-	38:  "function not implemented",
-	39:  "directory not empty",
-	40:  "too many levels of symbolic links",
-	42:  "no message of desired type",
-	43:  "identifier removed",
-	44:  "channel number out of range",
-	45:  "level 2 not synchronized",
-	46:  "level 3 halted",
-	47:  "level 3 reset",
-	48:  "link number out of range",
-	49:  "protocol driver not attached",
-	50:  "no CSI structure available",
-	51:  "level 2 halted",
-	52:  "invalid exchange",
-	53:  "invalid request descriptor",
-	54:  "exchange full",
-	55:  "no anode",
-	56:  "invalid request code",
-	57:  "invalid slot",
-	59:  "bad font file format",
-	60:  "device not a stream",
-	61:  "no data available",
-	62:  "timer expired",
-	63:  "out of streams resources",
-	64:  "machine is not on the network",
-	65:  "package not installed",
-	66:  "object is remote",
-	67:  "link has been severed",
-	68:  "advertise error",
-	69:  "srmount error",
-	70:  "communication error on send",
-	71:  "protocol error",
-	72:  "multihop attempted",
-	73:  "RFS specific error",
-	74:  "bad message",
-	75:  "value too large for defined data type",
-	76:  "name not unique on network",
-	77:  "file descriptor in bad state",
-	78:  "remote address changed",
-	79:  "can not access a needed shared library",
-	80:  "accessing a corrupted shared library",
-	81:  ".lib section in a.out corrupted",
-	82:  "attempting to link in too many shared libraries",
-	83:  "cannot exec a shared library directly",
-	84:  "invalid or incomplete multibyte or wide character",
-	85:  "interrupted system call should be restarted",
-	86:  "streams pipe error",
-	87:  "too many users",
-	88:  "socket operation on non-socket",
-	89:  "destination address required",
-	90:  "message too long",
-	91:  "protocol wrong type for socket",
-	92:  "protocol not available",
-	93:  "protocol not supported",
-	94:  "socket type not supported",
-	95:  "operation not supported",
-	96:  "protocol family not supported",
-	97:  "address family not supported by protocol",
-	98:  "address already in use",
-	99:  "cannot assign requested address",
-	100: "network is down",
-	101: "network is unreachable",
-	102: "network dropped connection on reset",
-	103: "software caused connection abort",
-	104: "connection reset by peer",
-	105: "no buffer space available",
-	106: "transport endpoint is already connected",
-	107: "transport endpoint is not connected",
-	108: "cannot send after transport endpoint shutdown",
-	109: "too many references: cannot splice",
-	110: "connection timed out",
-	111: "connection refused",
-	112: "host is down",
-	113: "no route to host",
-	114: "operation already in progress",
-	115: "operation now in progress",
-	116: "stale file handle",
-	117: "structure needs cleaning",
-	118: "not a XENIX named type file",
-	119: "no XENIX semaphores available",
-	120: "is a named type file",
-	121: "remote I/O error",
-	122: "disk quota exceeded",
-	123: "no medium found",
-	124: "wrong medium type",
-	125: "operation canceled",
-	126: "required key not available",
-	127: "key has expired",
-	128: "key has been revoked",
-	129: "key was rejected by service",
-	130: "owner died",
-	131: "state not recoverable",
-	132: "operation not possible due to RF-kill",
-	133: "memory page has hardware error",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/breakpoint trap",
-	6:  "aborted",
-	7:  "bus error",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "user defined signal 1",
-	11: "segmentation fault",
-	12: "user defined signal 2",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "stack fault",
-	17: "child exited",
-	18: "continued",
-	19: "stopped (signal)",
-	20: "stopped",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "urgent I/O condition",
-	24: "CPU time limit exceeded",
-	25: "file size limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window changed",
-	29: "I/O possible",
-	30: "power failure",
-	31: "bad system call",
-}
diff --git a/src/syscall/zerrors_linux_ppc64.go b/src/syscall/zerrors_linux_ppc64.go
deleted file mode 100644
index 1c769cd..0000000
--- a/src/syscall/zerrors_linux_ppc64.go
+++ /dev/null
@@ -1,1880 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-// +build ppc64,linux
-
-package syscall
-
-const (
-	AF_ALG                           = 0x26
-	AF_APPLETALK                     = 0x5
-	AF_ASH                           = 0x12
-	AF_ATMPVC                        = 0x8
-	AF_ATMSVC                        = 0x14
-	AF_AX25                          = 0x3
-	AF_BLUETOOTH                     = 0x1f
-	AF_BRIDGE                        = 0x7
-	AF_CAIF                          = 0x25
-	AF_CAN                           = 0x1d
-	AF_DECnet                        = 0xc
-	AF_ECONET                        = 0x13
-	AF_FILE                          = 0x1
-	AF_IEEE802154                    = 0x24
-	AF_INET                          = 0x2
-	AF_INET6                         = 0xa
-	AF_IPX                           = 0x4
-	AF_IRDA                          = 0x17
-	AF_ISDN                          = 0x22
-	AF_IUCV                          = 0x20
-	AF_KEY                           = 0xf
-	AF_LLC                           = 0x1a
-	AF_LOCAL                         = 0x1
-	AF_MAX                           = 0x28
-	AF_NETBEUI                       = 0xd
-	AF_NETLINK                       = 0x10
-	AF_NETROM                        = 0x6
-	AF_NFC                           = 0x27
-	AF_PACKET                        = 0x11
-	AF_PHONET                        = 0x23
-	AF_PPPOX                         = 0x18
-	AF_RDS                           = 0x15
-	AF_ROSE                          = 0xb
-	AF_ROUTE                         = 0x10
-	AF_RXRPC                         = 0x21
-	AF_SECURITY                      = 0xe
-	AF_SNA                           = 0x16
-	AF_TIPC                          = 0x1e
-	AF_UNIX                          = 0x1
-	AF_UNSPEC                        = 0x0
-	AF_WANPIPE                       = 0x19
-	AF_X25                           = 0x9
-	ARPHRD_ADAPT                     = 0x108
-	ARPHRD_APPLETLK                  = 0x8
-	ARPHRD_ARCNET                    = 0x7
-	ARPHRD_ASH                       = 0x30d
-	ARPHRD_ATM                       = 0x13
-	ARPHRD_AX25                      = 0x3
-	ARPHRD_BIF                       = 0x307
-	ARPHRD_CAIF                      = 0x336
-	ARPHRD_CAN                       = 0x118
-	ARPHRD_CHAOS                     = 0x5
-	ARPHRD_CISCO                     = 0x201
-	ARPHRD_CSLIP                     = 0x101
-	ARPHRD_CSLIP6                    = 0x103
-	ARPHRD_DDCMP                     = 0x205
-	ARPHRD_DLCI                      = 0xf
-	ARPHRD_ECONET                    = 0x30e
-	ARPHRD_EETHER                    = 0x2
-	ARPHRD_ETHER                     = 0x1
-	ARPHRD_EUI64                     = 0x1b
-	ARPHRD_FCAL                      = 0x311
-	ARPHRD_FCFABRIC                  = 0x313
-	ARPHRD_FCPL                      = 0x312
-	ARPHRD_FCPP                      = 0x310
-	ARPHRD_FDDI                      = 0x306
-	ARPHRD_FRAD                      = 0x302
-	ARPHRD_HDLC                      = 0x201
-	ARPHRD_HIPPI                     = 0x30c
-	ARPHRD_HWX25                     = 0x110
-	ARPHRD_IEEE1394                  = 0x18
-	ARPHRD_IEEE802                   = 0x6
-	ARPHRD_IEEE80211                 = 0x321
-	ARPHRD_IEEE80211_PRISM           = 0x322
-	ARPHRD_IEEE80211_RADIOTAP        = 0x323
-	ARPHRD_IEEE802154                = 0x324
-	ARPHRD_IEEE802154_MONITOR        = 0x325
-	ARPHRD_IEEE802_TR                = 0x320
-	ARPHRD_INFINIBAND                = 0x20
-	ARPHRD_IP6GRE                    = 0x337
-	ARPHRD_IPDDP                     = 0x309
-	ARPHRD_IPGRE                     = 0x30a
-	ARPHRD_IRDA                      = 0x30f
-	ARPHRD_LAPB                      = 0x204
-	ARPHRD_LOCALTLK                  = 0x305
-	ARPHRD_LOOPBACK                  = 0x304
-	ARPHRD_METRICOM                  = 0x17
-	ARPHRD_NETLINK                   = 0x338
-	ARPHRD_NETROM                    = 0x0
-	ARPHRD_NONE                      = 0xfffe
-	ARPHRD_PHONET                    = 0x334
-	ARPHRD_PHONET_PIPE               = 0x335
-	ARPHRD_PIMREG                    = 0x30b
-	ARPHRD_PPP                       = 0x200
-	ARPHRD_PRONET                    = 0x4
-	ARPHRD_RAWHDLC                   = 0x206
-	ARPHRD_ROSE                      = 0x10e
-	ARPHRD_RSRVD                     = 0x104
-	ARPHRD_SIT                       = 0x308
-	ARPHRD_SKIP                      = 0x303
-	ARPHRD_SLIP                      = 0x100
-	ARPHRD_SLIP6                     = 0x102
-	ARPHRD_TUNNEL                    = 0x300
-	ARPHRD_TUNNEL6                   = 0x301
-	ARPHRD_VOID                      = 0xffff
-	ARPHRD_X25                       = 0x10f
-	B0                               = 0x0
-	B1000000                         = 0x17
-	B110                             = 0x3
-	B115200                          = 0x11
-	B1152000                         = 0x18
-	B1200                            = 0x9
-	B134                             = 0x4
-	B150                             = 0x5
-	B1500000                         = 0x19
-	B1800                            = 0xa
-	B19200                           = 0xe
-	B200                             = 0x6
-	B2000000                         = 0x1a
-	B230400                          = 0x12
-	B2400                            = 0xb
-	B2500000                         = 0x1b
-	B300                             = 0x7
-	B3000000                         = 0x1c
-	B3500000                         = 0x1d
-	B38400                           = 0xf
-	B4000000                         = 0x1e
-	B460800                          = 0x13
-	B4800                            = 0xc
-	B50                              = 0x1
-	B500000                          = 0x14
-	B57600                           = 0x10
-	B576000                          = 0x15
-	B600                             = 0x8
-	B75                              = 0x2
-	B921600                          = 0x16
-	B9600                            = 0xd
-	BPF_A                            = 0x10
-	BPF_ABS                          = 0x20
-	BPF_ADD                          = 0x0
-	BPF_ALU                          = 0x4
-	BPF_AND                          = 0x50
-	BPF_B                            = 0x10
-	BPF_DIV                          = 0x30
-	BPF_H                            = 0x8
-	BPF_IMM                          = 0x0
-	BPF_IND                          = 0x40
-	BPF_JA                           = 0x0
-	BPF_JEQ                          = 0x10
-	BPF_JGE                          = 0x30
-	BPF_JGT                          = 0x20
-	BPF_JMP                          = 0x5
-	BPF_JSET                         = 0x40
-	BPF_K                            = 0x0
-	BPF_LD                           = 0x0
-	BPF_LDX                          = 0x1
-	BPF_LEN                          = 0x80
-	BPF_LSH                          = 0x60
-	BPF_MAJOR_VERSION                = 0x1
-	BPF_MAXINSNS                     = 0x1000
-	BPF_MEM                          = 0x60
-	BPF_MEMWORDS                     = 0x10
-	BPF_MINOR_VERSION                = 0x1
-	BPF_MISC                         = 0x7
-	BPF_MOD                          = 0x90
-	BPF_MSH                          = 0xa0
-	BPF_MUL                          = 0x20
-	BPF_NEG                          = 0x80
-	BPF_OR                           = 0x40
-	BPF_RET                          = 0x6
-	BPF_RSH                          = 0x70
-	BPF_ST                           = 0x2
-	BPF_STX                          = 0x3
-	BPF_SUB                          = 0x10
-	BPF_TAX                          = 0x0
-	BPF_TXA                          = 0x80
-	BPF_W                            = 0x0
-	BPF_X                            = 0x8
-	BPF_XOR                          = 0xa0
-	BRKINT                           = 0x2
-	CFLUSH                           = 0xf
-	CLOCAL                           = 0x8000
-	CLONE_CHILD_CLEARTID             = 0x200000
-	CLONE_CHILD_SETTID               = 0x1000000
-	CLONE_DETACHED                   = 0x400000
-	CLONE_FILES                      = 0x400
-	CLONE_FS                         = 0x200
-	CLONE_IO                         = 0x80000000
-	CLONE_NEWIPC                     = 0x8000000
-	CLONE_NEWNET                     = 0x40000000
-	CLONE_NEWNS                      = 0x20000
-	CLONE_NEWPID                     = 0x20000000
-	CLONE_NEWUSER                    = 0x10000000
-	CLONE_NEWUTS                     = 0x4000000
-	CLONE_PARENT                     = 0x8000
-	CLONE_PARENT_SETTID              = 0x100000
-	CLONE_PTRACE                     = 0x2000
-	CLONE_SETTLS                     = 0x80000
-	CLONE_SIGHAND                    = 0x800
-	CLONE_SYSVSEM                    = 0x40000
-	CLONE_THREAD                     = 0x10000
-	CLONE_UNTRACED                   = 0x800000
-	CLONE_VFORK                      = 0x4000
-	CLONE_VM                         = 0x100
-	CREAD                            = 0x800
-	CS5                              = 0x0
-	CS6                              = 0x100
-	CS7                              = 0x200
-	CS8                              = 0x300
-	CSIGNAL                          = 0xff
-	CSIZE                            = 0x300
-	CSTART                           = 0x11
-	CSTATUS                          = 0x0
-	CSTOP                            = 0x13
-	CSTOPB                           = 0x400
-	CSUSP                            = 0x1a
-	DT_BLK                           = 0x6
-	DT_CHR                           = 0x2
-	DT_DIR                           = 0x4
-	DT_FIFO                          = 0x1
-	DT_LNK                           = 0xa
-	DT_REG                           = 0x8
-	DT_SOCK                          = 0xc
-	DT_UNKNOWN                       = 0x0
-	DT_WHT                           = 0xe
-	ECHO                             = 0x8
-	ECHOCTL                          = 0x40
-	ECHOE                            = 0x2
-	ECHOK                            = 0x4
-	ECHOKE                           = 0x1
-	ECHONL                           = 0x10
-	ECHOPRT                          = 0x20
-	ENCODING_DEFAULT                 = 0x0
-	ENCODING_FM_MARK                 = 0x3
-	ENCODING_FM_SPACE                = 0x4
-	ENCODING_MANCHESTER              = 0x5
-	ENCODING_NRZ                     = 0x1
-	ENCODING_NRZI                    = 0x2
-	EPOLLERR                         = 0x8
-	EPOLLET                          = 0x80000000
-	EPOLLHUP                         = 0x10
-	EPOLLIN                          = 0x1
-	EPOLLMSG                         = 0x400
-	EPOLLONESHOT                     = 0x40000000
-	EPOLLOUT                         = 0x4
-	EPOLLPRI                         = 0x2
-	EPOLLRDBAND                      = 0x80
-	EPOLLRDHUP                       = 0x2000
-	EPOLLRDNORM                      = 0x40
-	EPOLLWAKEUP                      = 0x20000000
-	EPOLLWRBAND                      = 0x200
-	EPOLLWRNORM                      = 0x100
-	EPOLL_CLOEXEC                    = 0x80000
-	EPOLL_CTL_ADD                    = 0x1
-	EPOLL_CTL_DEL                    = 0x2
-	EPOLL_CTL_MOD                    = 0x3
-	EPOLL_NONBLOCK                   = 0x800
-	ETH_P_1588                       = 0x88f7
-	ETH_P_8021AD                     = 0x88a8
-	ETH_P_8021AH                     = 0x88e7
-	ETH_P_8021Q                      = 0x8100
-	ETH_P_802_2                      = 0x4
-	ETH_P_802_3                      = 0x1
-	ETH_P_802_3_MIN                  = 0x600
-	ETH_P_802_EX1                    = 0x88b5
-	ETH_P_AARP                       = 0x80f3
-	ETH_P_AF_IUCV                    = 0xfbfb
-	ETH_P_ALL                        = 0x3
-	ETH_P_AOE                        = 0x88a2
-	ETH_P_ARCNET                     = 0x1a
-	ETH_P_ARP                        = 0x806
-	ETH_P_ATALK                      = 0x809b
-	ETH_P_ATMFATE                    = 0x8884
-	ETH_P_ATMMPOA                    = 0x884c
-	ETH_P_AX25                       = 0x2
-	ETH_P_BATMAN                     = 0x4305
-	ETH_P_BPQ                        = 0x8ff
-	ETH_P_CAIF                       = 0xf7
-	ETH_P_CAN                        = 0xc
-	ETH_P_CANFD                      = 0xd
-	ETH_P_CONTROL                    = 0x16
-	ETH_P_CUST                       = 0x6006
-	ETH_P_DDCMP                      = 0x6
-	ETH_P_DEC                        = 0x6000
-	ETH_P_DIAG                       = 0x6005
-	ETH_P_DNA_DL                     = 0x6001
-	ETH_P_DNA_RC                     = 0x6002
-	ETH_P_DNA_RT                     = 0x6003
-	ETH_P_DSA                        = 0x1b
-	ETH_P_ECONET                     = 0x18
-	ETH_P_EDSA                       = 0xdada
-	ETH_P_FCOE                       = 0x8906
-	ETH_P_FIP                        = 0x8914
-	ETH_P_HDLC                       = 0x19
-	ETH_P_IEEE802154                 = 0xf6
-	ETH_P_IEEEPUP                    = 0xa00
-	ETH_P_IEEEPUPAT                  = 0xa01
-	ETH_P_IP                         = 0x800
-	ETH_P_IPV6                       = 0x86dd
-	ETH_P_IPX                        = 0x8137
-	ETH_P_IRDA                       = 0x17
-	ETH_P_LAT                        = 0x6004
-	ETH_P_LINK_CTL                   = 0x886c
-	ETH_P_LOCALTALK                  = 0x9
-	ETH_P_LOOP                       = 0x60
-	ETH_P_MOBITEX                    = 0x15
-	ETH_P_MPLS_MC                    = 0x8848
-	ETH_P_MPLS_UC                    = 0x8847
-	ETH_P_MVRP                       = 0x88f5
-	ETH_P_PAE                        = 0x888e
-	ETH_P_PAUSE                      = 0x8808
-	ETH_P_PHONET                     = 0xf5
-	ETH_P_PPPTALK                    = 0x10
-	ETH_P_PPP_DISC                   = 0x8863
-	ETH_P_PPP_MP                     = 0x8
-	ETH_P_PPP_SES                    = 0x8864
-	ETH_P_PRP                        = 0x88fb
-	ETH_P_PUP                        = 0x200
-	ETH_P_PUPAT                      = 0x201
-	ETH_P_QINQ1                      = 0x9100
-	ETH_P_QINQ2                      = 0x9200
-	ETH_P_QINQ3                      = 0x9300
-	ETH_P_RARP                       = 0x8035
-	ETH_P_SCA                        = 0x6007
-	ETH_P_SLOW                       = 0x8809
-	ETH_P_SNAP                       = 0x5
-	ETH_P_TDLS                       = 0x890d
-	ETH_P_TEB                        = 0x6558
-	ETH_P_TIPC                       = 0x88ca
-	ETH_P_TRAILER                    = 0x1c
-	ETH_P_TR_802_2                   = 0x11
-	ETH_P_WAN_PPP                    = 0x7
-	ETH_P_WCCP                       = 0x883e
-	ETH_P_X25                        = 0x805
-	EXTA                             = 0xe
-	EXTB                             = 0xf
-	EXTPROC                          = 0x10000000
-	FD_CLOEXEC                       = 0x1
-	FD_SETSIZE                       = 0x400
-	FLUSHO                           = 0x800000
-	F_DUPFD                          = 0x0
-	F_DUPFD_CLOEXEC                  = 0x406
-	F_EXLCK                          = 0x4
-	F_GETFD                          = 0x1
-	F_GETFL                          = 0x3
-	F_GETLEASE                       = 0x401
-	F_GETLK                          = 0x5
-	F_GETLK64                        = 0xc
-	F_GETOWN                         = 0x9
-	F_GETOWN_EX                      = 0x10
-	F_GETPIPE_SZ                     = 0x408
-	F_GETSIG                         = 0xb
-	F_LOCK                           = 0x1
-	F_NOTIFY                         = 0x402
-	F_OK                             = 0x0
-	F_RDLCK                          = 0x0
-	F_SETFD                          = 0x2
-	F_SETFL                          = 0x4
-	F_SETLEASE                       = 0x400
-	F_SETLK                          = 0x6
-	F_SETLK64                        = 0xd
-	F_SETLKW                         = 0x7
-	F_SETLKW64                       = 0xe
-	F_SETOWN                         = 0x8
-	F_SETOWN_EX                      = 0xf
-	F_SETPIPE_SZ                     = 0x407
-	F_SETSIG                         = 0xa
-	F_SHLCK                          = 0x8
-	F_TEST                           = 0x3
-	F_TLOCK                          = 0x2
-	F_ULOCK                          = 0x0
-	F_UNLCK                          = 0x2
-	F_WRLCK                          = 0x1
-	HUPCL                            = 0x4000
-	ICANON                           = 0x100
-	ICMPV6_FILTER                    = 0x1
-	ICRNL                            = 0x100
-	IEXTEN                           = 0x400
-	IFA_F_DADFAILED                  = 0x8
-	IFA_F_DEPRECATED                 = 0x20
-	IFA_F_HOMEADDRESS                = 0x10
-	IFA_F_NODAD                      = 0x2
-	IFA_F_OPTIMISTIC                 = 0x4
-	IFA_F_PERMANENT                  = 0x80
-	IFA_F_SECONDARY                  = 0x1
-	IFA_F_TEMPORARY                  = 0x1
-	IFA_F_TENTATIVE                  = 0x40
-	IFA_MAX                          = 0x7
-	IFF_802_1Q_VLAN                  = 0x1
-	IFF_ALLMULTI                     = 0x200
-	IFF_ATTACH_QUEUE                 = 0x200
-	IFF_AUTOMEDIA                    = 0x4000
-	IFF_BONDING                      = 0x20
-	IFF_BRIDGE_PORT                  = 0x4000
-	IFF_BROADCAST                    = 0x2
-	IFF_DEBUG                        = 0x4
-	IFF_DETACH_QUEUE                 = 0x400
-	IFF_DISABLE_NETPOLL              = 0x1000
-	IFF_DONT_BRIDGE                  = 0x800
-	IFF_DORMANT                      = 0x20000
-	IFF_DYNAMIC                      = 0x8000
-	IFF_EBRIDGE                      = 0x2
-	IFF_ECHO                         = 0x40000
-	IFF_ISATAP                       = 0x80
-	IFF_LIVE_ADDR_CHANGE             = 0x100000
-	IFF_LOOPBACK                     = 0x8
-	IFF_LOWER_UP                     = 0x10000
-	IFF_MACVLAN                      = 0x200000
-	IFF_MACVLAN_PORT                 = 0x2000
-	IFF_MASTER                       = 0x400
-	IFF_MASTER_8023AD                = 0x8
-	IFF_MASTER_ALB                   = 0x10
-	IFF_MASTER_ARPMON                = 0x100
-	IFF_MULTICAST                    = 0x1000
-	IFF_MULTI_QUEUE                  = 0x100
-	IFF_NOARP                        = 0x80
-	IFF_NOFILTER                     = 0x1000
-	IFF_NOTRAILERS                   = 0x20
-	IFF_NO_PI                        = 0x1000
-	IFF_ONE_QUEUE                    = 0x2000
-	IFF_OVS_DATAPATH                 = 0x8000
-	IFF_PERSIST                      = 0x800
-	IFF_POINTOPOINT                  = 0x10
-	IFF_PORTSEL                      = 0x2000
-	IFF_PROMISC                      = 0x100
-	IFF_RUNNING                      = 0x40
-	IFF_SLAVE                        = 0x800
-	IFF_SLAVE_INACTIVE               = 0x4
-	IFF_SLAVE_NEEDARP                = 0x40
-	IFF_SUPP_NOFCS                   = 0x80000
-	IFF_TAP                          = 0x2
-	IFF_TEAM_PORT                    = 0x40000
-	IFF_TUN                          = 0x1
-	IFF_TUN_EXCL                     = 0x8000
-	IFF_TX_SKB_SHARING               = 0x10000
-	IFF_UNICAST_FLT                  = 0x20000
-	IFF_UP                           = 0x1
-	IFF_VNET_HDR                     = 0x4000
-	IFF_VOLATILE                     = 0x70c5a
-	IFF_WAN_HDLC                     = 0x200
-	IFF_XMIT_DST_RELEASE             = 0x400
-	IFNAMSIZ                         = 0x10
-	IGNBRK                           = 0x1
-	IGNCR                            = 0x80
-	IGNPAR                           = 0x4
-	IMAXBEL                          = 0x2000
-	INLCR                            = 0x40
-	INPCK                            = 0x10
-	IN_ACCESS                        = 0x1
-	IN_ALL_EVENTS                    = 0xfff
-	IN_ATTRIB                        = 0x4
-	IN_CLASSA_HOST                   = 0xffffff
-	IN_CLASSA_MAX                    = 0x80
-	IN_CLASSA_NET                    = 0xff000000
-	IN_CLASSA_NSHIFT                 = 0x18
-	IN_CLASSB_HOST                   = 0xffff
-	IN_CLASSB_MAX                    = 0x10000
-	IN_CLASSB_NET                    = 0xffff0000
-	IN_CLASSB_NSHIFT                 = 0x10
-	IN_CLASSC_HOST                   = 0xff
-	IN_CLASSC_NET                    = 0xffffff00
-	IN_CLASSC_NSHIFT                 = 0x8
-	IN_CLOEXEC                       = 0x80000
-	IN_CLOSE                         = 0x18
-	IN_CLOSE_NOWRITE                 = 0x10
-	IN_CLOSE_WRITE                   = 0x8
-	IN_CREATE                        = 0x100
-	IN_DELETE                        = 0x200
-	IN_DELETE_SELF                   = 0x400
-	IN_DONT_FOLLOW                   = 0x2000000
-	IN_EXCL_UNLINK                   = 0x4000000
-	IN_IGNORED                       = 0x8000
-	IN_ISDIR                         = 0x40000000
-	IN_LOOPBACKNET                   = 0x7f
-	IN_MASK_ADD                      = 0x20000000
-	IN_MODIFY                        = 0x2
-	IN_MOVE                          = 0xc0
-	IN_MOVED_FROM                    = 0x40
-	IN_MOVED_TO                      = 0x80
-	IN_MOVE_SELF                     = 0x800
-	IN_NONBLOCK                      = 0x800
-	IN_ONESHOT                       = 0x80000000
-	IN_ONLYDIR                       = 0x1000000
-	IN_OPEN                          = 0x20
-	IN_Q_OVERFLOW                    = 0x4000
-	IN_UNMOUNT                       = 0x2000
-	IPPROTO_AH                       = 0x33
-	IPPROTO_COMP                     = 0x6c
-	IPPROTO_DCCP                     = 0x21
-	IPPROTO_DSTOPTS                  = 0x3c
-	IPPROTO_EGP                      = 0x8
-	IPPROTO_ENCAP                    = 0x62
-	IPPROTO_ESP                      = 0x32
-	IPPROTO_FRAGMENT                 = 0x2c
-	IPPROTO_GRE                      = 0x2f
-	IPPROTO_HOPOPTS                  = 0x0
-	IPPROTO_ICMP                     = 0x1
-	IPPROTO_ICMPV6                   = 0x3a
-	IPPROTO_IDP                      = 0x16
-	IPPROTO_IGMP                     = 0x2
-	IPPROTO_IP                       = 0x0
-	IPPROTO_IPIP                     = 0x4
-	IPPROTO_IPV6                     = 0x29
-	IPPROTO_MTP                      = 0x5c
-	IPPROTO_NONE                     = 0x3b
-	IPPROTO_PIM                      = 0x67
-	IPPROTO_PUP                      = 0xc
-	IPPROTO_RAW                      = 0xff
-	IPPROTO_ROUTING                  = 0x2b
-	IPPROTO_RSVP                     = 0x2e
-	IPPROTO_SCTP                     = 0x84
-	IPPROTO_TCP                      = 0x6
-	IPPROTO_TP                       = 0x1d
-	IPPROTO_UDP                      = 0x11
-	IPPROTO_UDPLITE                  = 0x88
-	IPV6_2292DSTOPTS                 = 0x4
-	IPV6_2292HOPLIMIT                = 0x8
-	IPV6_2292HOPOPTS                 = 0x3
-	IPV6_2292PKTINFO                 = 0x2
-	IPV6_2292PKTOPTIONS              = 0x6
-	IPV6_2292RTHDR                   = 0x5
-	IPV6_ADDRFORM                    = 0x1
-	IPV6_ADD_MEMBERSHIP              = 0x14
-	IPV6_AUTHHDR                     = 0xa
-	IPV6_CHECKSUM                    = 0x7
-	IPV6_DROP_MEMBERSHIP             = 0x15
-	IPV6_DSTOPTS                     = 0x3b
-	IPV6_HOPLIMIT                    = 0x34
-	IPV6_HOPOPTS                     = 0x36
-	IPV6_IPSEC_POLICY                = 0x22
-	IPV6_JOIN_ANYCAST                = 0x1b
-	IPV6_JOIN_GROUP                  = 0x14
-	IPV6_LEAVE_ANYCAST               = 0x1c
-	IPV6_LEAVE_GROUP                 = 0x15
-	IPV6_MTU                         = 0x18
-	IPV6_MTU_DISCOVER                = 0x17
-	IPV6_MULTICAST_HOPS              = 0x12
-	IPV6_MULTICAST_IF                = 0x11
-	IPV6_MULTICAST_LOOP              = 0x13
-	IPV6_NEXTHOP                     = 0x9
-	IPV6_PKTINFO                     = 0x32
-	IPV6_PMTUDISC_DO                 = 0x2
-	IPV6_PMTUDISC_DONT               = 0x0
-	IPV6_PMTUDISC_PROBE              = 0x3
-	IPV6_PMTUDISC_WANT               = 0x1
-	IPV6_RECVDSTOPTS                 = 0x3a
-	IPV6_RECVERR                     = 0x19
-	IPV6_RECVHOPLIMIT                = 0x33
-	IPV6_RECVHOPOPTS                 = 0x35
-	IPV6_RECVPKTINFO                 = 0x31
-	IPV6_RECVRTHDR                   = 0x38
-	IPV6_RECVTCLASS                  = 0x42
-	IPV6_ROUTER_ALERT                = 0x16
-	IPV6_RTHDR                       = 0x39
-	IPV6_RTHDRDSTOPTS                = 0x37
-	IPV6_RTHDR_LOOSE                 = 0x0
-	IPV6_RTHDR_STRICT                = 0x1
-	IPV6_RTHDR_TYPE_0                = 0x0
-	IPV6_RXDSTOPTS                   = 0x3b
-	IPV6_RXHOPOPTS                   = 0x36
-	IPV6_TCLASS                      = 0x43
-	IPV6_UNICAST_HOPS                = 0x10
-	IPV6_V6ONLY                      = 0x1a
-	IPV6_XFRM_POLICY                 = 0x23
-	IP_ADD_MEMBERSHIP                = 0x23
-	IP_ADD_SOURCE_MEMBERSHIP         = 0x27
-	IP_BLOCK_SOURCE                  = 0x26
-	IP_DEFAULT_MULTICAST_LOOP        = 0x1
-	IP_DEFAULT_MULTICAST_TTL         = 0x1
-	IP_DF                            = 0x4000
-	IP_DROP_MEMBERSHIP               = 0x24
-	IP_DROP_SOURCE_MEMBERSHIP        = 0x28
-	IP_FREEBIND                      = 0xf
-	IP_HDRINCL                       = 0x3
-	IP_IPSEC_POLICY                  = 0x10
-	IP_MAXPACKET                     = 0xffff
-	IP_MAX_MEMBERSHIPS               = 0x14
-	IP_MF                            = 0x2000
-	IP_MINTTL                        = 0x15
-	IP_MSFILTER                      = 0x29
-	IP_MSS                           = 0x240
-	IP_MTU                           = 0xe
-	IP_MTU_DISCOVER                  = 0xa
-	IP_MULTICAST_ALL                 = 0x31
-	IP_MULTICAST_IF                  = 0x20
-	IP_MULTICAST_LOOP                = 0x22
-	IP_MULTICAST_TTL                 = 0x21
-	IP_OFFMASK                       = 0x1fff
-	IP_OPTIONS                       = 0x4
-	IP_ORIGDSTADDR                   = 0x14
-	IP_PASSSEC                       = 0x12
-	IP_PKTINFO                       = 0x8
-	IP_PKTOPTIONS                    = 0x9
-	IP_PMTUDISC                      = 0xa
-	IP_PMTUDISC_DO                   = 0x2
-	IP_PMTUDISC_DONT                 = 0x0
-	IP_PMTUDISC_PROBE                = 0x3
-	IP_PMTUDISC_WANT                 = 0x1
-	IP_RECVERR                       = 0xb
-	IP_RECVOPTS                      = 0x6
-	IP_RECVORIGDSTADDR               = 0x14
-	IP_RECVRETOPTS                   = 0x7
-	IP_RECVTOS                       = 0xd
-	IP_RECVTTL                       = 0xc
-	IP_RETOPTS                       = 0x7
-	IP_RF                            = 0x8000
-	IP_ROUTER_ALERT                  = 0x5
-	IP_TOS                           = 0x1
-	IP_TRANSPARENT                   = 0x13
-	IP_TTL                           = 0x2
-	IP_UNBLOCK_SOURCE                = 0x25
-	IP_UNICAST_IF                    = 0x32
-	IP_XFRM_POLICY                   = 0x11
-	ISIG                             = 0x80
-	ISTRIP                           = 0x20
-	IUTF8                            = 0x4000
-	IXANY                            = 0x800
-	IXOFF                            = 0x400
-	IXON                             = 0x200
-	LINUX_REBOOT_CMD_CAD_OFF         = 0x0
-	LINUX_REBOOT_CMD_CAD_ON          = 0x89abcdef
-	LINUX_REBOOT_CMD_HALT            = 0xcdef0123
-	LINUX_REBOOT_CMD_KEXEC           = 0x45584543
-	LINUX_REBOOT_CMD_POWER_OFF       = 0x4321fedc
-	LINUX_REBOOT_CMD_RESTART         = 0x1234567
-	LINUX_REBOOT_CMD_RESTART2        = 0xa1b2c3d4
-	LINUX_REBOOT_CMD_SW_SUSPEND      = 0xd000fce2
-	LINUX_REBOOT_MAGIC1              = 0xfee1dead
-	LINUX_REBOOT_MAGIC2              = 0x28121969
-	LOCK_EX                          = 0x2
-	LOCK_NB                          = 0x4
-	LOCK_SH                          = 0x1
-	LOCK_UN                          = 0x8
-	MADV_DODUMP                      = 0x11
-	MADV_DOFORK                      = 0xb
-	MADV_DONTDUMP                    = 0x10
-	MADV_DONTFORK                    = 0xa
-	MADV_DONTNEED                    = 0x4
-	MADV_HUGEPAGE                    = 0xe
-	MADV_HWPOISON                    = 0x64
-	MADV_MERGEABLE                   = 0xc
-	MADV_NOHUGEPAGE                  = 0xf
-	MADV_NORMAL                      = 0x0
-	MADV_RANDOM                      = 0x1
-	MADV_REMOVE                      = 0x9
-	MADV_SEQUENTIAL                  = 0x2
-	MADV_UNMERGEABLE                 = 0xd
-	MADV_WILLNEED                    = 0x3
-	MAP_ANON                         = 0x20
-	MAP_ANONYMOUS                    = 0x20
-	MAP_DENYWRITE                    = 0x800
-	MAP_EXECUTABLE                   = 0x1000
-	MAP_FILE                         = 0x0
-	MAP_FIXED                        = 0x10
-	MAP_GROWSDOWN                    = 0x100
-	MAP_HUGETLB                      = 0x40000
-	MAP_LOCKED                       = 0x80
-	MAP_NONBLOCK                     = 0x10000
-	MAP_NORESERVE                    = 0x40
-	MAP_POPULATE                     = 0x8000
-	MAP_PRIVATE                      = 0x2
-	MAP_SHARED                       = 0x1
-	MAP_STACK                        = 0x20000
-	MAP_TYPE                         = 0xf
-	MCL_CURRENT                      = 0x2000
-	MCL_FUTURE                       = 0x4000
-	MNT_DETACH                       = 0x2
-	MNT_EXPIRE                       = 0x4
-	MNT_FORCE                        = 0x1
-	MSG_CMSG_CLOEXEC                 = 0x40000000
-	MSG_CONFIRM                      = 0x800
-	MSG_CTRUNC                       = 0x8
-	MSG_DONTROUTE                    = 0x4
-	MSG_DONTWAIT                     = 0x40
-	MSG_EOR                          = 0x80
-	MSG_ERRQUEUE                     = 0x2000
-	MSG_FASTOPEN                     = 0x20000000
-	MSG_FIN                          = 0x200
-	MSG_MORE                         = 0x8000
-	MSG_NOSIGNAL                     = 0x4000
-	MSG_OOB                          = 0x1
-	MSG_PEEK                         = 0x2
-	MSG_PROXY                        = 0x10
-	MSG_RST                          = 0x1000
-	MSG_SYN                          = 0x400
-	MSG_TRUNC                        = 0x20
-	MSG_TRYHARD                      = 0x4
-	MSG_WAITALL                      = 0x100
-	MSG_WAITFORONE                   = 0x10000
-	MS_ACTIVE                        = 0x40000000
-	MS_ASYNC                         = 0x1
-	MS_BIND                          = 0x1000
-	MS_DIRSYNC                       = 0x80
-	MS_INVALIDATE                    = 0x2
-	MS_I_VERSION                     = 0x800000
-	MS_KERNMOUNT                     = 0x400000
-	MS_MANDLOCK                      = 0x40
-	MS_MGC_MSK                       = 0xffff0000
-	MS_MGC_VAL                       = 0xc0ed0000
-	MS_MOVE                          = 0x2000
-	MS_NOATIME                       = 0x400
-	MS_NODEV                         = 0x4
-	MS_NODIRATIME                    = 0x800
-	MS_NOEXEC                        = 0x8
-	MS_NOSUID                        = 0x2
-	MS_NOUSER                        = -0x80000000
-	MS_POSIXACL                      = 0x10000
-	MS_PRIVATE                       = 0x40000
-	MS_RDONLY                        = 0x1
-	MS_REC                           = 0x4000
-	MS_RELATIME                      = 0x200000
-	MS_REMOUNT                       = 0x20
-	MS_RMT_MASK                      = 0x800051
-	MS_SHARED                        = 0x100000
-	MS_SILENT                        = 0x8000
-	MS_SLAVE                         = 0x80000
-	MS_STRICTATIME                   = 0x1000000
-	MS_SYNC                          = 0x4
-	MS_SYNCHRONOUS                   = 0x10
-	MS_UNBINDABLE                    = 0x20000
-	NAME_MAX                         = 0xff
-	NETLINK_ADD_MEMBERSHIP           = 0x1
-	NETLINK_AUDIT                    = 0x9
-	NETLINK_BROADCAST_ERROR          = 0x4
-	NETLINK_CONNECTOR                = 0xb
-	NETLINK_CRYPTO                   = 0x15
-	NETLINK_DNRTMSG                  = 0xe
-	NETLINK_DROP_MEMBERSHIP          = 0x2
-	NETLINK_ECRYPTFS                 = 0x13
-	NETLINK_FIB_LOOKUP               = 0xa
-	NETLINK_FIREWALL                 = 0x3
-	NETLINK_GENERIC                  = 0x10
-	NETLINK_INET_DIAG                = 0x4
-	NETLINK_IP6_FW                   = 0xd
-	NETLINK_ISCSI                    = 0x8
-	NETLINK_KOBJECT_UEVENT           = 0xf
-	NETLINK_NETFILTER                = 0xc
-	NETLINK_NFLOG                    = 0x5
-	NETLINK_NO_ENOBUFS               = 0x5
-	NETLINK_PKTINFO                  = 0x3
-	NETLINK_RDMA                     = 0x14
-	NETLINK_ROUTE                    = 0x0
-	NETLINK_RX_RING                  = 0x6
-	NETLINK_SCSITRANSPORT            = 0x12
-	NETLINK_SELINUX                  = 0x7
-	NETLINK_SOCK_DIAG                = 0x4
-	NETLINK_TX_RING                  = 0x7
-	NETLINK_UNUSED                   = 0x1
-	NETLINK_USERSOCK                 = 0x2
-	NETLINK_XFRM                     = 0x6
-	NLA_ALIGNTO                      = 0x4
-	NLA_F_NESTED                     = 0x8000
-	NLA_F_NET_BYTEORDER              = 0x4000
-	NLA_HDRLEN                       = 0x4
-	NLMSG_ALIGNTO                    = 0x4
-	NLMSG_DONE                       = 0x3
-	NLMSG_ERROR                      = 0x2
-	NLMSG_HDRLEN                     = 0x10
-	NLMSG_MIN_TYPE                   = 0x10
-	NLMSG_NOOP                       = 0x1
-	NLMSG_OVERRUN                    = 0x4
-	NLM_F_ACK                        = 0x4
-	NLM_F_APPEND                     = 0x800
-	NLM_F_ATOMIC                     = 0x400
-	NLM_F_CREATE                     = 0x400
-	NLM_F_DUMP                       = 0x300
-	NLM_F_DUMP_INTR                  = 0x10
-	NLM_F_ECHO                       = 0x8
-	NLM_F_EXCL                       = 0x200
-	NLM_F_MATCH                      = 0x200
-	NLM_F_MULTI                      = 0x2
-	NLM_F_REPLACE                    = 0x100
-	NLM_F_REQUEST                    = 0x1
-	NLM_F_ROOT                       = 0x100
-	NOFLSH                           = 0x80000000
-	OCRNL                            = 0x8
-	OFDEL                            = 0x80
-	OFILL                            = 0x40
-	ONLCR                            = 0x2
-	ONLRET                           = 0x20
-	ONOCR                            = 0x10
-	OPOST                            = 0x1
-	O_ACCMODE                        = 0x3
-	O_APPEND                         = 0x400
-	O_ASYNC                          = 0x2000
-	O_CLOEXEC                        = 0x80000
-	O_CREAT                          = 0x40
-	O_DIRECT                         = 0x20000
-	O_DIRECTORY                      = 0x4000
-	O_DSYNC                          = 0x1000
-	O_EXCL                           = 0x80
-	O_FSYNC                          = 0x101000
-	O_LARGEFILE                      = 0x0
-	O_NDELAY                         = 0x800
-	O_NOATIME                        = 0x40000
-	O_NOCTTY                         = 0x100
-	O_NOFOLLOW                       = 0x8000
-	O_NONBLOCK                       = 0x800
-	O_PATH                           = 0x200000
-	O_RDONLY                         = 0x0
-	O_RDWR                           = 0x2
-	O_RSYNC                          = 0x101000
-	O_SYNC                           = 0x101000
-	O_TRUNC                          = 0x200
-	O_WRONLY                         = 0x1
-	PACKET_ADD_MEMBERSHIP            = 0x1
-	PACKET_AUXDATA                   = 0x8
-	PACKET_BROADCAST                 = 0x1
-	PACKET_COPY_THRESH               = 0x7
-	PACKET_DROP_MEMBERSHIP           = 0x2
-	PACKET_FANOUT                    = 0x12
-	PACKET_FANOUT_CPU                = 0x2
-	PACKET_FANOUT_FLAG_DEFRAG        = 0x8000
-	PACKET_FANOUT_FLAG_ROLLOVER      = 0x1000
-	PACKET_FANOUT_HASH               = 0x0
-	PACKET_FANOUT_LB                 = 0x1
-	PACKET_FANOUT_RND                = 0x4
-	PACKET_FANOUT_ROLLOVER           = 0x3
-	PACKET_FASTROUTE                 = 0x6
-	PACKET_HDRLEN                    = 0xb
-	PACKET_HOST                      = 0x0
-	PACKET_LOOPBACK                  = 0x5
-	PACKET_LOSS                      = 0xe
-	PACKET_MR_ALLMULTI               = 0x2
-	PACKET_MR_MULTICAST              = 0x0
-	PACKET_MR_PROMISC                = 0x1
-	PACKET_MR_UNICAST                = 0x3
-	PACKET_MULTICAST                 = 0x2
-	PACKET_ORIGDEV                   = 0x9
-	PACKET_OTHERHOST                 = 0x3
-	PACKET_OUTGOING                  = 0x4
-	PACKET_RECV_OUTPUT               = 0x3
-	PACKET_RESERVE                   = 0xc
-	PACKET_RX_RING                   = 0x5
-	PACKET_STATISTICS                = 0x6
-	PACKET_TIMESTAMP                 = 0x11
-	PACKET_TX_HAS_OFF                = 0x13
-	PACKET_TX_RING                   = 0xd
-	PACKET_TX_TIMESTAMP              = 0x10
-	PACKET_VERSION                   = 0xa
-	PACKET_VNET_HDR                  = 0xf
-	PARENB                           = 0x1000
-	PARITY_CRC16_PR0                 = 0x2
-	PARITY_CRC16_PR0_CCITT           = 0x4
-	PARITY_CRC16_PR1                 = 0x3
-	PARITY_CRC16_PR1_CCITT           = 0x5
-	PARITY_CRC32_PR0_CCITT           = 0x6
-	PARITY_CRC32_PR1_CCITT           = 0x7
-	PARITY_DEFAULT                   = 0x0
-	PARITY_NONE                      = 0x1
-	PARMRK                           = 0x8
-	PARODD                           = 0x2000
-	PENDIN                           = 0x20000000
-	PRIO_PGRP                        = 0x1
-	PRIO_PROCESS                     = 0x0
-	PRIO_USER                        = 0x2
-	PROT_EXEC                        = 0x4
-	PROT_GROWSDOWN                   = 0x1000000
-	PROT_GROWSUP                     = 0x2000000
-	PROT_NONE                        = 0x0
-	PROT_READ                        = 0x1
-	PROT_SAO                         = 0x10
-	PROT_WRITE                       = 0x2
-	PR_CAPBSET_DROP                  = 0x18
-	PR_CAPBSET_READ                  = 0x17
-	PR_ENDIAN_BIG                    = 0x0
-	PR_ENDIAN_LITTLE                 = 0x1
-	PR_ENDIAN_PPC_LITTLE             = 0x2
-	PR_FPEMU_NOPRINT                 = 0x1
-	PR_FPEMU_SIGFPE                  = 0x2
-	PR_FP_EXC_ASYNC                  = 0x2
-	PR_FP_EXC_DISABLED               = 0x0
-	PR_FP_EXC_DIV                    = 0x10000
-	PR_FP_EXC_INV                    = 0x100000
-	PR_FP_EXC_NONRECOV               = 0x1
-	PR_FP_EXC_OVF                    = 0x20000
-	PR_FP_EXC_PRECISE                = 0x3
-	PR_FP_EXC_RES                    = 0x80000
-	PR_FP_EXC_SW_ENABLE              = 0x80
-	PR_FP_EXC_UND                    = 0x40000
-	PR_GET_CHILD_SUBREAPER           = 0x25
-	PR_GET_DUMPABLE                  = 0x3
-	PR_GET_ENDIAN                    = 0x13
-	PR_GET_FPEMU                     = 0x9
-	PR_GET_FPEXC                     = 0xb
-	PR_GET_KEEPCAPS                  = 0x7
-	PR_GET_NAME                      = 0x10
-	PR_GET_NO_NEW_PRIVS              = 0x27
-	PR_GET_PDEATHSIG                 = 0x2
-	PR_GET_SECCOMP                   = 0x15
-	PR_GET_SECUREBITS                = 0x1b
-	PR_GET_TID_ADDRESS               = 0x28
-	PR_GET_TIMERSLACK                = 0x1e
-	PR_GET_TIMING                    = 0xd
-	PR_GET_TSC                       = 0x19
-	PR_GET_UNALIGN                   = 0x5
-	PR_MCE_KILL                      = 0x21
-	PR_MCE_KILL_CLEAR                = 0x0
-	PR_MCE_KILL_DEFAULT              = 0x2
-	PR_MCE_KILL_EARLY                = 0x1
-	PR_MCE_KILL_GET                  = 0x22
-	PR_MCE_KILL_LATE                 = 0x0
-	PR_MCE_KILL_SET                  = 0x1
-	PR_SET_CHILD_SUBREAPER           = 0x24
-	PR_SET_DUMPABLE                  = 0x4
-	PR_SET_ENDIAN                    = 0x14
-	PR_SET_FPEMU                     = 0xa
-	PR_SET_FPEXC                     = 0xc
-	PR_SET_KEEPCAPS                  = 0x8
-	PR_SET_MM                        = 0x23
-	PR_SET_MM_ARG_END                = 0x9
-	PR_SET_MM_ARG_START              = 0x8
-	PR_SET_MM_AUXV                   = 0xc
-	PR_SET_MM_BRK                    = 0x7
-	PR_SET_MM_END_CODE               = 0x2
-	PR_SET_MM_END_DATA               = 0x4
-	PR_SET_MM_ENV_END                = 0xb
-	PR_SET_MM_ENV_START              = 0xa
-	PR_SET_MM_EXE_FILE               = 0xd
-	PR_SET_MM_START_BRK              = 0x6
-	PR_SET_MM_START_CODE             = 0x1
-	PR_SET_MM_START_DATA             = 0x3
-	PR_SET_MM_START_STACK            = 0x5
-	PR_SET_NAME                      = 0xf
-	PR_SET_NO_NEW_PRIVS              = 0x26
-	PR_SET_PDEATHSIG                 = 0x1
-	PR_SET_PTRACER                   = 0x59616d61
-	PR_SET_PTRACER_ANY               = -0x1
-	PR_SET_SECCOMP                   = 0x16
-	PR_SET_SECUREBITS                = 0x1c
-	PR_SET_TIMERSLACK                = 0x1d
-	PR_SET_TIMING                    = 0xe
-	PR_SET_TSC                       = 0x1a
-	PR_SET_UNALIGN                   = 0x6
-	PR_TASK_PERF_EVENTS_DISABLE      = 0x1f
-	PR_TASK_PERF_EVENTS_ENABLE       = 0x20
-	PR_TIMING_STATISTICAL            = 0x0
-	PR_TIMING_TIMESTAMP              = 0x1
-	PR_TSC_ENABLE                    = 0x1
-	PR_TSC_SIGSEGV                   = 0x2
-	PR_UNALIGN_NOPRINT               = 0x1
-	PR_UNALIGN_SIGBUS                = 0x2
-	PTRACE_ATTACH                    = 0x10
-	PTRACE_CONT                      = 0x7
-	PTRACE_DETACH                    = 0x11
-	PTRACE_EVENT_CLONE               = 0x3
-	PTRACE_EVENT_EXEC                = 0x4
-	PTRACE_EVENT_EXIT                = 0x6
-	PTRACE_EVENT_FORK                = 0x1
-	PTRACE_EVENT_SECCOMP             = 0x7
-	PTRACE_EVENT_STOP                = 0x80
-	PTRACE_EVENT_VFORK               = 0x2
-	PTRACE_EVENT_VFORK_DONE          = 0x5
-	PTRACE_GETEVENTMSG               = 0x4201
-	PTRACE_GETEVRREGS                = 0x14
-	PTRACE_GETFPREGS                 = 0xe
-	PTRACE_GETREGS                   = 0xc
-	PTRACE_GETREGS64                 = 0x16
-	PTRACE_GETREGSET                 = 0x4204
-	PTRACE_GETSIGINFO                = 0x4202
-	PTRACE_GETSIGMASK                = 0x420a
-	PTRACE_GETVRREGS                 = 0x12
-	PTRACE_GETVSRREGS                = 0x1b
-	PTRACE_GET_DEBUGREG              = 0x19
-	PTRACE_INTERRUPT                 = 0x4207
-	PTRACE_KILL                      = 0x8
-	PTRACE_LISTEN                    = 0x4208
-	PTRACE_O_EXITKILL                = 0x100000
-	PTRACE_O_MASK                    = 0x1000ff
-	PTRACE_O_TRACECLONE              = 0x8
-	PTRACE_O_TRACEEXEC               = 0x10
-	PTRACE_O_TRACEEXIT               = 0x40
-	PTRACE_O_TRACEFORK               = 0x2
-	PTRACE_O_TRACESECCOMP            = 0x80
-	PTRACE_O_TRACESYSGOOD            = 0x1
-	PTRACE_O_TRACEVFORK              = 0x4
-	PTRACE_O_TRACEVFORKDONE          = 0x20
-	PTRACE_PEEKDATA                  = 0x2
-	PTRACE_PEEKSIGINFO               = 0x4209
-	PTRACE_PEEKSIGINFO_SHARED        = 0x1
-	PTRACE_PEEKTEXT                  = 0x1
-	PTRACE_PEEKUSR                   = 0x3
-	PTRACE_POKEDATA                  = 0x5
-	PTRACE_POKETEXT                  = 0x4
-	PTRACE_POKEUSR                   = 0x6
-	PTRACE_SEIZE                     = 0x4206
-	PTRACE_SETEVRREGS                = 0x15
-	PTRACE_SETFPREGS                 = 0xf
-	PTRACE_SETOPTIONS                = 0x4200
-	PTRACE_SETREGS                   = 0xd
-	PTRACE_SETREGS64                 = 0x17
-	PTRACE_SETREGSET                 = 0x4205
-	PTRACE_SETSIGINFO                = 0x4203
-	PTRACE_SETSIGMASK                = 0x420b
-	PTRACE_SETVRREGS                 = 0x13
-	PTRACE_SETVSRREGS                = 0x1c
-	PTRACE_SET_DEBUGREG              = 0x1a
-	PTRACE_SINGLEBLOCK               = 0x100
-	PTRACE_SINGLESTEP                = 0x9
-	PTRACE_SYSCALL                   = 0x18
-	PTRACE_TRACEME                   = 0x0
-	PT_CCR                           = 0x26
-	PT_CTR                           = 0x23
-	PT_DAR                           = 0x29
-	PT_DSCR                          = 0x2c
-	PT_DSISR                         = 0x2a
-	PT_FPR0                          = 0x30
-	PT_FPSCR                         = 0x50
-	PT_LNK                           = 0x24
-	PT_MSR                           = 0x21
-	PT_NIP                           = 0x20
-	PT_ORIG_R3                       = 0x22
-	PT_R0                            = 0x0
-	PT_R1                            = 0x1
-	PT_R10                           = 0xa
-	PT_R11                           = 0xb
-	PT_R12                           = 0xc
-	PT_R13                           = 0xd
-	PT_R14                           = 0xe
-	PT_R15                           = 0xf
-	PT_R16                           = 0x10
-	PT_R17                           = 0x11
-	PT_R18                           = 0x12
-	PT_R19                           = 0x13
-	PT_R2                            = 0x2
-	PT_R20                           = 0x14
-	PT_R21                           = 0x15
-	PT_R22                           = 0x16
-	PT_R23                           = 0x17
-	PT_R24                           = 0x18
-	PT_R25                           = 0x19
-	PT_R26                           = 0x1a
-	PT_R27                           = 0x1b
-	PT_R28                           = 0x1c
-	PT_R29                           = 0x1d
-	PT_R3                            = 0x3
-	PT_R30                           = 0x1e
-	PT_R31                           = 0x1f
-	PT_R4                            = 0x4
-	PT_R5                            = 0x5
-	PT_R6                            = 0x6
-	PT_R7                            = 0x7
-	PT_R8                            = 0x8
-	PT_R9                            = 0x9
-	PT_REGS_COUNT                    = 0x2c
-	PT_RESULT                        = 0x2b
-	PT_SOFTE                         = 0x27
-	PT_TRAP                          = 0x28
-	PT_VR0                           = 0x52
-	PT_VRSAVE                        = 0x94
-	PT_VSCR                          = 0x93
-	PT_VSR0                          = 0x96
-	PT_VSR31                         = 0xd4
-	PT_XER                           = 0x25
-	RLIMIT_AS                        = 0x9
-	RLIMIT_CORE                      = 0x4
-	RLIMIT_CPU                       = 0x0
-	RLIMIT_DATA                      = 0x2
-	RLIMIT_FSIZE                     = 0x1
-	RLIMIT_NOFILE                    = 0x7
-	RLIMIT_STACK                     = 0x3
-	RLIM_INFINITY                    = -0x1
-	RTAX_ADVMSS                      = 0x8
-	RTAX_CWND                        = 0x7
-	RTAX_FEATURES                    = 0xc
-	RTAX_FEATURE_ALLFRAG             = 0x8
-	RTAX_FEATURE_ECN                 = 0x1
-	RTAX_FEATURE_SACK                = 0x2
-	RTAX_FEATURE_TIMESTAMP           = 0x4
-	RTAX_HOPLIMIT                    = 0xa
-	RTAX_INITCWND                    = 0xb
-	RTAX_INITRWND                    = 0xe
-	RTAX_LOCK                        = 0x1
-	RTAX_MAX                         = 0xf
-	RTAX_MTU                         = 0x2
-	RTAX_QUICKACK                    = 0xf
-	RTAX_REORDERING                  = 0x9
-	RTAX_RTO_MIN                     = 0xd
-	RTAX_RTT                         = 0x4
-	RTAX_RTTVAR                      = 0x5
-	RTAX_SSTHRESH                    = 0x6
-	RTAX_UNSPEC                      = 0x0
-	RTAX_WINDOW                      = 0x3
-	RTA_ALIGNTO                      = 0x4
-	RTA_MAX                          = 0x11
-	RTCF_DIRECTSRC                   = 0x4000000
-	RTCF_DOREDIRECT                  = 0x1000000
-	RTCF_LOG                         = 0x2000000
-	RTCF_MASQ                        = 0x400000
-	RTCF_NAT                         = 0x800000
-	RTCF_VALVE                       = 0x200000
-	RTF_ADDRCLASSMASK                = 0xf8000000
-	RTF_ADDRCONF                     = 0x40000
-	RTF_ALLONLINK                    = 0x20000
-	RTF_BROADCAST                    = 0x10000000
-	RTF_CACHE                        = 0x1000000
-	RTF_DEFAULT                      = 0x10000
-	RTF_DYNAMIC                      = 0x10
-	RTF_FLOW                         = 0x2000000
-	RTF_GATEWAY                      = 0x2
-	RTF_HOST                         = 0x4
-	RTF_INTERFACE                    = 0x40000000
-	RTF_IRTT                         = 0x100
-	RTF_LINKRT                       = 0x100000
-	RTF_LOCAL                        = 0x80000000
-	RTF_MODIFIED                     = 0x20
-	RTF_MSS                          = 0x40
-	RTF_MTU                          = 0x40
-	RTF_MULTICAST                    = 0x20000000
-	RTF_NAT                          = 0x8000000
-	RTF_NOFORWARD                    = 0x1000
-	RTF_NONEXTHOP                    = 0x200000
-	RTF_NOPMTUDISC                   = 0x4000
-	RTF_POLICY                       = 0x4000000
-	RTF_REINSTATE                    = 0x8
-	RTF_REJECT                       = 0x200
-	RTF_STATIC                       = 0x400
-	RTF_THROW                        = 0x2000
-	RTF_UP                           = 0x1
-	RTF_WINDOW                       = 0x80
-	RTF_XRESOLVE                     = 0x800
-	RTM_BASE                         = 0x10
-	RTM_DELACTION                    = 0x31
-	RTM_DELADDR                      = 0x15
-	RTM_DELADDRLABEL                 = 0x49
-	RTM_DELLINK                      = 0x11
-	RTM_DELMDB                       = 0x55
-	RTM_DELNEIGH                     = 0x1d
-	RTM_DELQDISC                     = 0x25
-	RTM_DELROUTE                     = 0x19
-	RTM_DELRULE                      = 0x21
-	RTM_DELTCLASS                    = 0x29
-	RTM_DELTFILTER                   = 0x2d
-	RTM_F_CLONED                     = 0x200
-	RTM_F_EQUALIZE                   = 0x400
-	RTM_F_NOTIFY                     = 0x100
-	RTM_F_PREFIX                     = 0x800
-	RTM_GETACTION                    = 0x32
-	RTM_GETADDR                      = 0x16
-	RTM_GETADDRLABEL                 = 0x4a
-	RTM_GETANYCAST                   = 0x3e
-	RTM_GETDCB                       = 0x4e
-	RTM_GETLINK                      = 0x12
-	RTM_GETMDB                       = 0x56
-	RTM_GETMULTICAST                 = 0x3a
-	RTM_GETNEIGH                     = 0x1e
-	RTM_GETNEIGHTBL                  = 0x42
-	RTM_GETNETCONF                   = 0x52
-	RTM_GETQDISC                     = 0x26
-	RTM_GETROUTE                     = 0x1a
-	RTM_GETRULE                      = 0x22
-	RTM_GETTCLASS                    = 0x2a
-	RTM_GETTFILTER                   = 0x2e
-	RTM_MAX                          = 0x57
-	RTM_NEWACTION                    = 0x30
-	RTM_NEWADDR                      = 0x14
-	RTM_NEWADDRLABEL                 = 0x48
-	RTM_NEWLINK                      = 0x10
-	RTM_NEWMDB                       = 0x54
-	RTM_NEWNDUSEROPT                 = 0x44
-	RTM_NEWNEIGH                     = 0x1c
-	RTM_NEWNEIGHTBL                  = 0x40
-	RTM_NEWNETCONF                   = 0x50
-	RTM_NEWPREFIX                    = 0x34
-	RTM_NEWQDISC                     = 0x24
-	RTM_NEWROUTE                     = 0x18
-	RTM_NEWRULE                      = 0x20
-	RTM_NEWTCLASS                    = 0x28
-	RTM_NEWTFILTER                   = 0x2c
-	RTM_NR_FAMILIES                  = 0x12
-	RTM_NR_MSGTYPES                  = 0x48
-	RTM_SETDCB                       = 0x4f
-	RTM_SETLINK                      = 0x13
-	RTM_SETNEIGHTBL                  = 0x43
-	RTNH_ALIGNTO                     = 0x4
-	RTNH_F_DEAD                      = 0x1
-	RTNH_F_ONLINK                    = 0x4
-	RTNH_F_PERVASIVE                 = 0x2
-	RTN_MAX                          = 0xb
-	RTPROT_BIRD                      = 0xc
-	RTPROT_BOOT                      = 0x3
-	RTPROT_DHCP                      = 0x10
-	RTPROT_DNROUTED                  = 0xd
-	RTPROT_GATED                     = 0x8
-	RTPROT_KERNEL                    = 0x2
-	RTPROT_MROUTED                   = 0x11
-	RTPROT_MRT                       = 0xa
-	RTPROT_NTK                       = 0xf
-	RTPROT_RA                        = 0x9
-	RTPROT_REDIRECT                  = 0x1
-	RTPROT_STATIC                    = 0x4
-	RTPROT_UNSPEC                    = 0x0
-	RTPROT_XORP                      = 0xe
-	RTPROT_ZEBRA                     = 0xb
-	RT_CLASS_DEFAULT                 = 0xfd
-	RT_CLASS_LOCAL                   = 0xff
-	RT_CLASS_MAIN                    = 0xfe
-	RT_CLASS_MAX                     = 0xff
-	RT_CLASS_UNSPEC                  = 0x0
-	RUSAGE_CHILDREN                  = -0x1
-	RUSAGE_SELF                      = 0x0
-	RUSAGE_THREAD                    = 0x1
-	SCM_CREDENTIALS                  = 0x2
-	SCM_RIGHTS                       = 0x1
-	SCM_TIMESTAMP                    = 0x1d
-	SCM_TIMESTAMPING                 = 0x25
-	SCM_TIMESTAMPNS                  = 0x23
-	SCM_WIFI_STATUS                  = 0x29
-	SHUT_RD                          = 0x0
-	SHUT_RDWR                        = 0x2
-	SHUT_WR                          = 0x1
-	SIOCADDDLCI                      = 0x8980
-	SIOCADDMULTI                     = 0x8931
-	SIOCADDRT                        = 0x890b
-	SIOCATMARK                       = 0x8905
-	SIOCDARP                         = 0x8953
-	SIOCDELDLCI                      = 0x8981
-	SIOCDELMULTI                     = 0x8932
-	SIOCDELRT                        = 0x890c
-	SIOCDEVPRIVATE                   = 0x89f0
-	SIOCDIFADDR                      = 0x8936
-	SIOCDRARP                        = 0x8960
-	SIOCGARP                         = 0x8954
-	SIOCGIFADDR                      = 0x8915
-	SIOCGIFBR                        = 0x8940
-	SIOCGIFBRDADDR                   = 0x8919
-	SIOCGIFCONF                      = 0x8912
-	SIOCGIFCOUNT                     = 0x8938
-	SIOCGIFDSTADDR                   = 0x8917
-	SIOCGIFENCAP                     = 0x8925
-	SIOCGIFFLAGS                     = 0x8913
-	SIOCGIFHWADDR                    = 0x8927
-	SIOCGIFINDEX                     = 0x8933
-	SIOCGIFMAP                       = 0x8970
-	SIOCGIFMEM                       = 0x891f
-	SIOCGIFMETRIC                    = 0x891d
-	SIOCGIFMTU                       = 0x8921
-	SIOCGIFNAME                      = 0x8910
-	SIOCGIFNETMASK                   = 0x891b
-	SIOCGIFPFLAGS                    = 0x8935
-	SIOCGIFSLAVE                     = 0x8929
-	SIOCGIFTXQLEN                    = 0x8942
-	SIOCGPGRP                        = 0x8904
-	SIOCGRARP                        = 0x8961
-	SIOCGSTAMP                       = 0x8906
-	SIOCGSTAMPNS                     = 0x8907
-	SIOCPROTOPRIVATE                 = 0x89e0
-	SIOCRTMSG                        = 0x890d
-	SIOCSARP                         = 0x8955
-	SIOCSIFADDR                      = 0x8916
-	SIOCSIFBR                        = 0x8941
-	SIOCSIFBRDADDR                   = 0x891a
-	SIOCSIFDSTADDR                   = 0x8918
-	SIOCSIFENCAP                     = 0x8926
-	SIOCSIFFLAGS                     = 0x8914
-	SIOCSIFHWADDR                    = 0x8924
-	SIOCSIFHWBROADCAST               = 0x8937
-	SIOCSIFLINK                      = 0x8911
-	SIOCSIFMAP                       = 0x8971
-	SIOCSIFMEM                       = 0x8920
-	SIOCSIFMETRIC                    = 0x891e
-	SIOCSIFMTU                       = 0x8922
-	SIOCSIFNAME                      = 0x8923
-	SIOCSIFNETMASK                   = 0x891c
-	SIOCSIFPFLAGS                    = 0x8934
-	SIOCSIFSLAVE                     = 0x8930
-	SIOCSIFTXQLEN                    = 0x8943
-	SIOCSPGRP                        = 0x8902
-	SIOCSRARP                        = 0x8962
-	SOCK_CLOEXEC                     = 0x80000
-	SOCK_DCCP                        = 0x6
-	SOCK_DGRAM                       = 0x2
-	SOCK_NONBLOCK                    = 0x800
-	SOCK_PACKET                      = 0xa
-	SOCK_RAW                         = 0x3
-	SOCK_RDM                         = 0x4
-	SOCK_SEQPACKET                   = 0x5
-	SOCK_STREAM                      = 0x1
-	SOL_AAL                          = 0x109
-	SOL_ATM                          = 0x108
-	SOL_DECNET                       = 0x105
-	SOL_ICMPV6                       = 0x3a
-	SOL_IP                           = 0x0
-	SOL_IPV6                         = 0x29
-	SOL_IRDA                         = 0x10a
-	SOL_PACKET                       = 0x107
-	SOL_RAW                          = 0xff
-	SOL_SOCKET                       = 0x1
-	SOL_TCP                          = 0x6
-	SOL_X25                          = 0x106
-	SOMAXCONN                        = 0x80
-	SO_ACCEPTCONN                    = 0x1e
-	SO_ATTACH_FILTER                 = 0x1a
-	SO_BINDTODEVICE                  = 0x19
-	SO_BROADCAST                     = 0x6
-	SO_BSDCOMPAT                     = 0xe
-	SO_BUSY_POLL                     = 0x2e
-	SO_DEBUG                         = 0x1
-	SO_DETACH_FILTER                 = 0x1b
-	SO_DOMAIN                        = 0x27
-	SO_DONTROUTE                     = 0x5
-	SO_ERROR                         = 0x4
-	SO_GET_FILTER                    = 0x1a
-	SO_KEEPALIVE                     = 0x9
-	SO_LINGER                        = 0xd
-	SO_LOCK_FILTER                   = 0x2c
-	SO_MARK                          = 0x24
-	SO_MAX_PACING_RATE               = 0x2f
-	SO_NOFCS                         = 0x2b
-	SO_NO_CHECK                      = 0xb
-	SO_OOBINLINE                     = 0xa
-	SO_PASSCRED                      = 0x14
-	SO_PASSSEC                       = 0x22
-	SO_PEEK_OFF                      = 0x2a
-	SO_PEERCRED                      = 0x15
-	SO_PEERNAME                      = 0x1c
-	SO_PEERSEC                       = 0x1f
-	SO_PRIORITY                      = 0xc
-	SO_PROTOCOL                      = 0x26
-	SO_RCVBUF                        = 0x8
-	SO_RCVBUFFORCE                   = 0x21
-	SO_RCVLOWAT                      = 0x10
-	SO_RCVTIMEO                      = 0x12
-	SO_REUSEADDR                     = 0x2
-	SO_REUSEPORT                     = 0xf
-	SO_RXQ_OVFL                      = 0x28
-	SO_SECURITY_AUTHENTICATION       = 0x16
-	SO_SECURITY_ENCRYPTION_NETWORK   = 0x18
-	SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
-	SO_SELECT_ERR_QUEUE              = 0x2d
-	SO_SNDBUF                        = 0x7
-	SO_SNDBUFFORCE                   = 0x20
-	SO_SNDLOWAT                      = 0x11
-	SO_SNDTIMEO                      = 0x13
-	SO_TIMESTAMP                     = 0x1d
-	SO_TIMESTAMPING                  = 0x25
-	SO_TIMESTAMPNS                   = 0x23
-	SO_TYPE                          = 0x3
-	SO_WIFI_STATUS                   = 0x29
-	S_BLKSIZE                        = 0x200
-	S_IEXEC                          = 0x40
-	S_IFBLK                          = 0x6000
-	S_IFCHR                          = 0x2000
-	S_IFDIR                          = 0x4000
-	S_IFIFO                          = 0x1000
-	S_IFLNK                          = 0xa000
-	S_IFMT                           = 0xf000
-	S_IFREG                          = 0x8000
-	S_IFSOCK                         = 0xc000
-	S_IREAD                          = 0x100
-	S_IRGRP                          = 0x20
-	S_IROTH                          = 0x4
-	S_IRUSR                          = 0x100
-	S_IRWXG                          = 0x38
-	S_IRWXO                          = 0x7
-	S_IRWXU                          = 0x1c0
-	S_ISGID                          = 0x400
-	S_ISUID                          = 0x800
-	S_ISVTX                          = 0x200
-	S_IWGRP                          = 0x10
-	S_IWOTH                          = 0x2
-	S_IWRITE                         = 0x80
-	S_IWUSR                          = 0x80
-	S_IXGRP                          = 0x8
-	S_IXOTH                          = 0x1
-	S_IXUSR                          = 0x40
-	TCFLSH                           = 0x2000741f
-	TCIFLUSH                         = 0x0
-	TCIOFLUSH                        = 0x2
-	TCOFLUSH                         = 0x1
-	TCP_CONGESTION                   = 0xd
-	TCP_CORK                         = 0x3
-	TCP_DEFER_ACCEPT                 = 0x9
-	TCP_INFO                         = 0xb
-	TCP_KEEPCNT                      = 0x6
-	TCP_KEEPIDLE                     = 0x4
-	TCP_KEEPINTVL                    = 0x5
-	TCP_LINGER2                      = 0x8
-	TCP_MAXSEG                       = 0x2
-	TCP_MAXWIN                       = 0xffff
-	TCP_MAX_WINSHIFT                 = 0xe
-	TCP_MD5SIG                       = 0xe
-	TCP_MD5SIG_MAXKEYLEN             = 0x50
-	TCP_MSS                          = 0x200
-	TCP_NODELAY                      = 0x1
-	TCP_QUICKACK                     = 0xc
-	TCP_SYNCNT                       = 0x7
-	TCP_WINDOW_CLAMP                 = 0xa
-	TCSAFLUSH                        = 0x2
-	TIOCCBRK                         = 0x5428
-	TIOCCONS                         = 0x541d
-	TIOCEXCL                         = 0x540c
-	TIOCGDEV                         = 0x40045432
-	TIOCGETC                         = 0x40067412
-	TIOCGETD                         = 0x5424
-	TIOCGETP                         = 0x40067408
-	TIOCGEXCL                        = 0x40045440
-	TIOCGICOUNT                      = 0x545d
-	TIOCGLCKTRMIOS                   = 0x5456
-	TIOCGLTC                         = 0x40067474
-	TIOCGPGRP                        = 0x40047477
-	TIOCGPKT                         = 0x40045438
-	TIOCGPTLCK                       = 0x40045439
-	TIOCGPTN                         = 0x40045430
-	TIOCGRS485                       = 0x542e
-	TIOCGSERIAL                      = 0x541e
-	TIOCGSID                         = 0x5429
-	TIOCGSOFTCAR                     = 0x5419
-	TIOCGWINSZ                       = 0x40087468
-	TIOCINQ                          = 0x4004667f
-	TIOCLINUX                        = 0x541c
-	TIOCMBIC                         = 0x5417
-	TIOCMBIS                         = 0x5416
-	TIOCMGET                         = 0x5415
-	TIOCMIWAIT                       = 0x545c
-	TIOCMSET                         = 0x5418
-	TIOCM_CAR                        = 0x40
-	TIOCM_CD                         = 0x40
-	TIOCM_CTS                        = 0x20
-	TIOCM_DSR                        = 0x100
-	TIOCM_DTR                        = 0x2
-	TIOCM_LE                         = 0x1
-	TIOCM_LOOP                       = 0x8000
-	TIOCM_OUT1                       = 0x2000
-	TIOCM_OUT2                       = 0x4000
-	TIOCM_RI                         = 0x80
-	TIOCM_RNG                        = 0x80
-	TIOCM_RTS                        = 0x4
-	TIOCM_SR                         = 0x10
-	TIOCM_ST                         = 0x8
-	TIOCNOTTY                        = 0x5422
-	TIOCNXCL                         = 0x540d
-	TIOCOUTQ                         = 0x40047473
-	TIOCPKT                          = 0x5420
-	TIOCPKT_DATA                     = 0x0
-	TIOCPKT_DOSTOP                   = 0x20
-	TIOCPKT_FLUSHREAD                = 0x1
-	TIOCPKT_FLUSHWRITE               = 0x2
-	TIOCPKT_IOCTL                    = 0x40
-	TIOCPKT_NOSTOP                   = 0x10
-	TIOCPKT_START                    = 0x8
-	TIOCPKT_STOP                     = 0x4
-	TIOCSBRK                         = 0x5427
-	TIOCSCTTY                        = 0x540e
-	TIOCSERCONFIG                    = 0x5453
-	TIOCSERGETLSR                    = 0x5459
-	TIOCSERGETMULTI                  = 0x545a
-	TIOCSERGSTRUCT                   = 0x5458
-	TIOCSERGWILD                     = 0x5454
-	TIOCSERSETMULTI                  = 0x545b
-	TIOCSERSWILD                     = 0x5455
-	TIOCSER_TEMT                     = 0x1
-	TIOCSETC                         = 0x80067411
-	TIOCSETD                         = 0x5423
-	TIOCSETN                         = 0x8006740a
-	TIOCSETP                         = 0x80067409
-	TIOCSIG                          = 0x80045436
-	TIOCSLCKTRMIOS                   = 0x5457
-	TIOCSLTC                         = 0x80067475
-	TIOCSPGRP                        = 0x80047476
-	TIOCSPTLCK                       = 0x80045431
-	TIOCSRS485                       = 0x542f
-	TIOCSSERIAL                      = 0x541f
-	TIOCSSOFTCAR                     = 0x541a
-	TIOCSTART                        = 0x2000746e
-	TIOCSTI                          = 0x5412
-	TIOCSTOP                         = 0x2000746f
-	TIOCSWINSZ                       = 0x80087467
-	TIOCVHANGUP                      = 0x5437
-	TOSTOP                           = 0x400000
-	TUNATTACHFILTER                  = 0x801054d5
-	TUNDETACHFILTER                  = 0x801054d6
-	TUNGETFEATURES                   = 0x400454cf
-	TUNGETFILTER                     = 0x401054db
-	TUNGETIFF                        = 0x400454d2
-	TUNGETSNDBUF                     = 0x400454d3
-	TUNGETVNETHDRSZ                  = 0x400454d7
-	TUNSETDEBUG                      = 0x800454c9
-	TUNSETGROUP                      = 0x800454ce
-	TUNSETIFF                        = 0x800454ca
-	TUNSETIFINDEX                    = 0x800454da
-	TUNSETLINK                       = 0x800454cd
-	TUNSETNOCSUM                     = 0x800454c8
-	TUNSETOFFLOAD                    = 0x800454d0
-	TUNSETOWNER                      = 0x800454cc
-	TUNSETPERSIST                    = 0x800454cb
-	TUNSETQUEUE                      = 0x800454d9
-	TUNSETSNDBUF                     = 0x800454d4
-	TUNSETTXFILTER                   = 0x800454d1
-	TUNSETVNETHDRSZ                  = 0x800454d8
-	VDISCARD                         = 0x10
-	VEOF                             = 0x4
-	VEOL                             = 0x6
-	VEOL2                            = 0x8
-	VERASE                           = 0x2
-	VINTR                            = 0x0
-	VKILL                            = 0x3
-	VLNEXT                           = 0xf
-	VMIN                             = 0x5
-	VQUIT                            = 0x1
-	VREPRINT                         = 0xb
-	VSTART                           = 0xd
-	VSTOP                            = 0xe
-	VSUSP                            = 0xc
-	VSWTC                            = 0x9
-	VT0                              = 0x0
-	VT1                              = 0x10000
-	VTDLY                            = 0x10000
-	VTIME                            = 0x7
-	VWERASE                          = 0xa
-	WALL                             = 0x40000000
-	WCLONE                           = 0x80000000
-	WCONTINUED                       = 0x8
-	WEXITED                          = 0x4
-	WNOHANG                          = 0x1
-	WNOTHREAD                        = 0x20000000
-	WNOWAIT                          = 0x1000000
-	WORDSIZE                         = 0x40
-	WSTOPPED                         = 0x2
-	WUNTRACED                        = 0x2
-)
-
-// Errors
-const (
-	E2BIG           = Errno(0x7)
-	EACCES          = Errno(0xd)
-	EADDRINUSE      = Errno(0x62)
-	EADDRNOTAVAIL   = Errno(0x63)
-	EADV            = Errno(0x44)
-	EAFNOSUPPORT    = Errno(0x61)
-	EAGAIN          = Errno(0xb)
-	EALREADY        = Errno(0x72)
-	EBADE           = Errno(0x34)
-	EBADF           = Errno(0x9)
-	EBADFD          = Errno(0x4d)
-	EBADMSG         = Errno(0x4a)
-	EBADR           = Errno(0x35)
-	EBADRQC         = Errno(0x38)
-	EBADSLT         = Errno(0x39)
-	EBFONT          = Errno(0x3b)
-	EBUSY           = Errno(0x10)
-	ECANCELED       = Errno(0x7d)
-	ECHILD          = Errno(0xa)
-	ECHRNG          = Errno(0x2c)
-	ECOMM           = Errno(0x46)
-	ECONNABORTED    = Errno(0x67)
-	ECONNREFUSED    = Errno(0x6f)
-	ECONNRESET      = Errno(0x68)
-	EDEADLK         = Errno(0x23)
-	EDEADLOCK       = Errno(0x3a)
-	EDESTADDRREQ    = Errno(0x59)
-	EDOM            = Errno(0x21)
-	EDOTDOT         = Errno(0x49)
-	EDQUOT          = Errno(0x7a)
-	EEXIST          = Errno(0x11)
-	EFAULT          = Errno(0xe)
-	EFBIG           = Errno(0x1b)
-	EHOSTDOWN       = Errno(0x70)
-	EHOSTUNREACH    = Errno(0x71)
-	EHWPOISON       = Errno(0x85)
-	EIDRM           = Errno(0x2b)
-	EILSEQ          = Errno(0x54)
-	EINPROGRESS     = Errno(0x73)
-	EINTR           = Errno(0x4)
-	EINVAL          = Errno(0x16)
-	EIO             = Errno(0x5)
-	EISCONN         = Errno(0x6a)
-	EISDIR          = Errno(0x15)
-	EISNAM          = Errno(0x78)
-	EKEYEXPIRED     = Errno(0x7f)
-	EKEYREJECTED    = Errno(0x81)
-	EKEYREVOKED     = Errno(0x80)
-	EL2HLT          = Errno(0x33)
-	EL2NSYNC        = Errno(0x2d)
-	EL3HLT          = Errno(0x2e)
-	EL3RST          = Errno(0x2f)
-	ELIBACC         = Errno(0x4f)
-	ELIBBAD         = Errno(0x50)
-	ELIBEXEC        = Errno(0x53)
-	ELIBMAX         = Errno(0x52)
-	ELIBSCN         = Errno(0x51)
-	ELNRNG          = Errno(0x30)
-	ELOOP           = Errno(0x28)
-	EMEDIUMTYPE     = Errno(0x7c)
-	EMFILE          = Errno(0x18)
-	EMLINK          = Errno(0x1f)
-	EMSGSIZE        = Errno(0x5a)
-	EMULTIHOP       = Errno(0x48)
-	ENAMETOOLONG    = Errno(0x24)
-	ENAVAIL         = Errno(0x77)
-	ENETDOWN        = Errno(0x64)
-	ENETRESET       = Errno(0x66)
-	ENETUNREACH     = Errno(0x65)
-	ENFILE          = Errno(0x17)
-	ENOANO          = Errno(0x37)
-	ENOBUFS         = Errno(0x69)
-	ENOCSI          = Errno(0x32)
-	ENODATA         = Errno(0x3d)
-	ENODEV          = Errno(0x13)
-	ENOENT          = Errno(0x2)
-	ENOEXEC         = Errno(0x8)
-	ENOKEY          = Errno(0x7e)
-	ENOLCK          = Errno(0x25)
-	ENOLINK         = Errno(0x43)
-	ENOMEDIUM       = Errno(0x7b)
-	ENOMEM          = Errno(0xc)
-	ENOMSG          = Errno(0x2a)
-	ENONET          = Errno(0x40)
-	ENOPKG          = Errno(0x41)
-	ENOPROTOOPT     = Errno(0x5c)
-	ENOSPC          = Errno(0x1c)
-	ENOSR           = Errno(0x3f)
-	ENOSTR          = Errno(0x3c)
-	ENOSYS          = Errno(0x26)
-	ENOTBLK         = Errno(0xf)
-	ENOTCONN        = Errno(0x6b)
-	ENOTDIR         = Errno(0x14)
-	ENOTEMPTY       = Errno(0x27)
-	ENOTNAM         = Errno(0x76)
-	ENOTRECOVERABLE = Errno(0x83)
-	ENOTSOCK        = Errno(0x58)
-	ENOTSUP         = Errno(0x5f)
-	ENOTTY          = Errno(0x19)
-	ENOTUNIQ        = Errno(0x4c)
-	ENXIO           = Errno(0x6)
-	EOPNOTSUPP      = Errno(0x5f)
-	EOVERFLOW       = Errno(0x4b)
-	EOWNERDEAD      = Errno(0x82)
-	EPERM           = Errno(0x1)
-	EPFNOSUPPORT    = Errno(0x60)
-	EPIPE           = Errno(0x20)
-	EPROTO          = Errno(0x47)
-	EPROTONOSUPPORT = Errno(0x5d)
-	EPROTOTYPE      = Errno(0x5b)
-	ERANGE          = Errno(0x22)
-	EREMCHG         = Errno(0x4e)
-	EREMOTE         = Errno(0x42)
-	EREMOTEIO       = Errno(0x79)
-	ERESTART        = Errno(0x55)
-	ERFKILL         = Errno(0x84)
-	EROFS           = Errno(0x1e)
-	ESHUTDOWN       = Errno(0x6c)
-	ESOCKTNOSUPPORT = Errno(0x5e)
-	ESPIPE          = Errno(0x1d)
-	ESRCH           = Errno(0x3)
-	ESRMNT          = Errno(0x45)
-	ESTALE          = Errno(0x74)
-	ESTRPIPE        = Errno(0x56)
-	ETIME           = Errno(0x3e)
-	ETIMEDOUT       = Errno(0x6e)
-	ETOOMANYREFS    = Errno(0x6d)
-	ETXTBSY         = Errno(0x1a)
-	EUCLEAN         = Errno(0x75)
-	EUNATCH         = Errno(0x31)
-	EUSERS          = Errno(0x57)
-	EWOULDBLOCK     = Errno(0xb)
-	EXDEV           = Errno(0x12)
-	EXFULL          = Errno(0x36)
-)
-
-// Signals
-const (
-	SIGABRT   = Signal(0x6)
-	SIGALRM   = Signal(0xe)
-	SIGBUS    = Signal(0x7)
-	SIGCHLD   = Signal(0x11)
-	SIGCLD    = Signal(0x11)
-	SIGCONT   = Signal(0x12)
-	SIGFPE    = Signal(0x8)
-	SIGHUP    = Signal(0x1)
-	SIGILL    = Signal(0x4)
-	SIGINT    = Signal(0x2)
-	SIGIO     = Signal(0x1d)
-	SIGIOT    = Signal(0x6)
-	SIGKILL   = Signal(0x9)
-	SIGPIPE   = Signal(0xd)
-	SIGPOLL   = Signal(0x1d)
-	SIGPROF   = Signal(0x1b)
-	SIGPWR    = Signal(0x1e)
-	SIGQUIT   = Signal(0x3)
-	SIGSEGV   = Signal(0xb)
-	SIGSTKFLT = Signal(0x10)
-	SIGSTOP   = Signal(0x13)
-	SIGSYS    = Signal(0x1f)
-	SIGTERM   = Signal(0xf)
-	SIGTRAP   = Signal(0x5)
-	SIGTSTP   = Signal(0x14)
-	SIGTTIN   = Signal(0x15)
-	SIGTTOU   = Signal(0x16)
-	SIGUNUSED = Signal(0x1f)
-	SIGURG    = Signal(0x17)
-	SIGUSR1   = Signal(0xa)
-	SIGUSR2   = Signal(0xc)
-	SIGVTALRM = Signal(0x1a)
-	SIGWINCH  = Signal(0x1c)
-	SIGXCPU   = Signal(0x18)
-	SIGXFSZ   = Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:   "operation not permitted",
-	2:   "no such file or directory",
-	3:   "no such process",
-	4:   "interrupted system call",
-	5:   "input/output error",
-	6:   "no such device or address",
-	7:   "argument list too long",
-	8:   "exec format error",
-	9:   "bad file descriptor",
-	10:  "no child processes",
-	11:  "resource temporarily unavailable",
-	12:  "cannot allocate memory",
-	13:  "permission denied",
-	14:  "bad address",
-	15:  "block device required",
-	16:  "device or resource busy",
-	17:  "file exists",
-	18:  "invalid cross-device link",
-	19:  "no such device",
-	20:  "not a directory",
-	21:  "is a directory",
-	22:  "invalid argument",
-	23:  "too many open files in system",
-	24:  "too many open files",
-	25:  "inappropriate ioctl for device",
-	26:  "text file busy",
-	27:  "file too large",
-	28:  "no space left on device",
-	29:  "illegal seek",
-	30:  "read-only file system",
-	31:  "too many links",
-	32:  "broken pipe",
-	33:  "numerical argument out of domain",
-	34:  "numerical result out of range",
-	35:  "resource deadlock avoided",
-	36:  "file name too long",
-	37:  "no locks available",
-	38:  "function not implemented",
-	39:  "directory not empty",
-	40:  "too many levels of symbolic links",
-	42:  "no message of desired type",
-	43:  "identifier removed",
-	44:  "channel number out of range",
-	45:  "level 2 not synchronized",
-	46:  "level 3 halted",
-	47:  "level 3 reset",
-	48:  "link number out of range",
-	49:  "protocol driver not attached",
-	50:  "no CSI structure available",
-	51:  "level 2 halted",
-	52:  "invalid exchange",
-	53:  "invalid request descriptor",
-	54:  "exchange full",
-	55:  "no anode",
-	56:  "invalid request code",
-	57:  "invalid slot",
-	58:  "file locking deadlock error",
-	59:  "bad font file format",
-	60:  "device not a stream",
-	61:  "no data available",
-	62:  "timer expired",
-	63:  "out of streams resources",
-	64:  "machine is not on the network",
-	65:  "package not installed",
-	66:  "object is remote",
-	67:  "link has been severed",
-	68:  "advertise error",
-	69:  "srmount error",
-	70:  "communication error on send",
-	71:  "protocol error",
-	72:  "multihop attempted",
-	73:  "RFS specific error",
-	74:  "bad message",
-	75:  "value too large for defined data type",
-	76:  "name not unique on network",
-	77:  "file descriptor in bad state",
-	78:  "remote address changed",
-	79:  "can not access a needed shared library",
-	80:  "accessing a corrupted shared library",
-	81:  ".lib section in a.out corrupted",
-	82:  "attempting to link in too many shared libraries",
-	83:  "cannot exec a shared library directly",
-	84:  "invalid or incomplete multibyte or wide character",
-	85:  "interrupted system call should be restarted",
-	86:  "streams pipe error",
-	87:  "too many users",
-	88:  "socket operation on non-socket",
-	89:  "destination address required",
-	90:  "message too long",
-	91:  "protocol wrong type for socket",
-	92:  "protocol not available",
-	93:  "protocol not supported",
-	94:  "socket type not supported",
-	95:  "operation not supported",
-	96:  "protocol family not supported",
-	97:  "address family not supported by protocol",
-	98:  "address already in use",
-	99:  "cannot assign requested address",
-	100: "network is down",
-	101: "network is unreachable",
-	102: "network dropped connection on reset",
-	103: "software caused connection abort",
-	104: "connection reset by peer",
-	105: "no buffer space available",
-	106: "transport endpoint is already connected",
-	107: "transport endpoint is not connected",
-	108: "cannot send after transport endpoint shutdown",
-	109: "too many references: cannot splice",
-	110: "connection timed out",
-	111: "connection refused",
-	112: "host is down",
-	113: "no route to host",
-	114: "operation already in progress",
-	115: "operation now in progress",
-	116: "stale NFS file handle",
-	117: "structure needs cleaning",
-	118: "not a XENIX named type file",
-	119: "no XENIX semaphores available",
-	120: "is a named type file",
-	121: "remote I/O error",
-	122: "disk quota exceeded",
-	123: "no medium found",
-	124: "wrong medium type",
-	125: "operation canceled",
-	126: "required key not available",
-	127: "key has expired",
-	128: "key has been revoked",
-	129: "key was rejected by service",
-	130: "owner died",
-	131: "state not recoverable",
-	132: "operation not possible due to RF-kill",
-	133: "memory page has hardware error",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/breakpoint trap",
-	6:  "aborted",
-	7:  "bus error",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "user defined signal 1",
-	11: "segmentation fault",
-	12: "user defined signal 2",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "stack fault",
-	17: "child exited",
-	18: "continued",
-	19: "stopped (signal)",
-	20: "stopped",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "urgent I/O condition",
-	24: "CPU time limit exceeded",
-	25: "file size limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window changed",
-	29: "I/O possible",
-	30: "power failure",
-	31: "bad system call",
-}
diff --git a/src/syscall/zerrors_linux_ppc64le.go b/src/syscall/zerrors_linux_ppc64le.go
deleted file mode 100644
index 73727a4..0000000
--- a/src/syscall/zerrors_linux_ppc64le.go
+++ /dev/null
@@ -1,1904 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-// +build ppc64le,linux
-
-package syscall
-
-const (
-	AF_ALG                           = 0x26
-	AF_APPLETALK                     = 0x5
-	AF_ASH                           = 0x12
-	AF_ATMPVC                        = 0x8
-	AF_ATMSVC                        = 0x14
-	AF_AX25                          = 0x3
-	AF_BLUETOOTH                     = 0x1f
-	AF_BRIDGE                        = 0x7
-	AF_CAIF                          = 0x25
-	AF_CAN                           = 0x1d
-	AF_DECnet                        = 0xc
-	AF_ECONET                        = 0x13
-	AF_FILE                          = 0x1
-	AF_IEEE802154                    = 0x24
-	AF_INET                          = 0x2
-	AF_INET6                         = 0xa
-	AF_IPX                           = 0x4
-	AF_IRDA                          = 0x17
-	AF_ISDN                          = 0x22
-	AF_IUCV                          = 0x20
-	AF_KEY                           = 0xf
-	AF_LLC                           = 0x1a
-	AF_LOCAL                         = 0x1
-	AF_MAX                           = 0x29
-	AF_NETBEUI                       = 0xd
-	AF_NETLINK                       = 0x10
-	AF_NETROM                        = 0x6
-	AF_NFC                           = 0x27
-	AF_PACKET                        = 0x11
-	AF_PHONET                        = 0x23
-	AF_PPPOX                         = 0x18
-	AF_RDS                           = 0x15
-	AF_ROSE                          = 0xb
-	AF_ROUTE                         = 0x10
-	AF_RXRPC                         = 0x21
-	AF_SECURITY                      = 0xe
-	AF_SNA                           = 0x16
-	AF_TIPC                          = 0x1e
-	AF_UNIX                          = 0x1
-	AF_UNSPEC                        = 0x0
-	AF_VSOCK                         = 0x28
-	AF_WANPIPE                       = 0x19
-	AF_X25                           = 0x9
-	ARPHRD_ADAPT                     = 0x108
-	ARPHRD_APPLETLK                  = 0x8
-	ARPHRD_ARCNET                    = 0x7
-	ARPHRD_ASH                       = 0x30d
-	ARPHRD_ATM                       = 0x13
-	ARPHRD_AX25                      = 0x3
-	ARPHRD_BIF                       = 0x307
-	ARPHRD_CAIF                      = 0x336
-	ARPHRD_CAN                       = 0x118
-	ARPHRD_CHAOS                     = 0x5
-	ARPHRD_CISCO                     = 0x201
-	ARPHRD_CSLIP                     = 0x101
-	ARPHRD_CSLIP6                    = 0x103
-	ARPHRD_DDCMP                     = 0x205
-	ARPHRD_DLCI                      = 0xf
-	ARPHRD_ECONET                    = 0x30e
-	ARPHRD_EETHER                    = 0x2
-	ARPHRD_ETHER                     = 0x1
-	ARPHRD_EUI64                     = 0x1b
-	ARPHRD_FCAL                      = 0x311
-	ARPHRD_FCFABRIC                  = 0x313
-	ARPHRD_FCPL                      = 0x312
-	ARPHRD_FCPP                      = 0x310
-	ARPHRD_FDDI                      = 0x306
-	ARPHRD_FRAD                      = 0x302
-	ARPHRD_HDLC                      = 0x201
-	ARPHRD_HIPPI                     = 0x30c
-	ARPHRD_HWX25                     = 0x110
-	ARPHRD_IEEE1394                  = 0x18
-	ARPHRD_IEEE802                   = 0x6
-	ARPHRD_IEEE80211                 = 0x321
-	ARPHRD_IEEE80211_PRISM           = 0x322
-	ARPHRD_IEEE80211_RADIOTAP        = 0x323
-	ARPHRD_IEEE802154                = 0x324
-	ARPHRD_IEEE802154_MONITOR        = 0x325
-	ARPHRD_IEEE802_TR                = 0x320
-	ARPHRD_INFINIBAND                = 0x20
-	ARPHRD_IP6GRE                    = 0x337
-	ARPHRD_IPDDP                     = 0x309
-	ARPHRD_IPGRE                     = 0x30a
-	ARPHRD_IRDA                      = 0x30f
-	ARPHRD_LAPB                      = 0x204
-	ARPHRD_LOCALTLK                  = 0x305
-	ARPHRD_LOOPBACK                  = 0x304
-	ARPHRD_METRICOM                  = 0x17
-	ARPHRD_NETLINK                   = 0x338
-	ARPHRD_NETROM                    = 0x0
-	ARPHRD_NONE                      = 0xfffe
-	ARPHRD_PHONET                    = 0x334
-	ARPHRD_PHONET_PIPE               = 0x335
-	ARPHRD_PIMREG                    = 0x30b
-	ARPHRD_PPP                       = 0x200
-	ARPHRD_PRONET                    = 0x4
-	ARPHRD_RAWHDLC                   = 0x206
-	ARPHRD_ROSE                      = 0x10e
-	ARPHRD_RSRVD                     = 0x104
-	ARPHRD_SIT                       = 0x308
-	ARPHRD_SKIP                      = 0x303
-	ARPHRD_SLIP                      = 0x100
-	ARPHRD_SLIP6                     = 0x102
-	ARPHRD_TUNNEL                    = 0x300
-	ARPHRD_TUNNEL6                   = 0x301
-	ARPHRD_VOID                      = 0xffff
-	ARPHRD_X25                       = 0x10f
-	B0                               = 0x0
-	B1000000                         = 0x17
-	B110                             = 0x3
-	B115200                          = 0x11
-	B1152000                         = 0x18
-	B1200                            = 0x9
-	B134                             = 0x4
-	B150                             = 0x5
-	B1500000                         = 0x19
-	B1800                            = 0xa
-	B19200                           = 0xe
-	B200                             = 0x6
-	B2000000                         = 0x1a
-	B230400                          = 0x12
-	B2400                            = 0xb
-	B2500000                         = 0x1b
-	B300                             = 0x7
-	B3000000                         = 0x1c
-	B3500000                         = 0x1d
-	B38400                           = 0xf
-	B4000000                         = 0x1e
-	B460800                          = 0x13
-	B4800                            = 0xc
-	B50                              = 0x1
-	B500000                          = 0x14
-	B57600                           = 0x10
-	B576000                          = 0x15
-	B600                             = 0x8
-	B75                              = 0x2
-	B921600                          = 0x16
-	B9600                            = 0xd
-	BPF_A                            = 0x10
-	BPF_ABS                          = 0x20
-	BPF_ADD                          = 0x0
-	BPF_ALU                          = 0x4
-	BPF_AND                          = 0x50
-	BPF_B                            = 0x10
-	BPF_DIV                          = 0x30
-	BPF_H                            = 0x8
-	BPF_IMM                          = 0x0
-	BPF_IND                          = 0x40
-	BPF_JA                           = 0x0
-	BPF_JEQ                          = 0x10
-	BPF_JGE                          = 0x30
-	BPF_JGT                          = 0x20
-	BPF_JMP                          = 0x5
-	BPF_JSET                         = 0x40
-	BPF_K                            = 0x0
-	BPF_LD                           = 0x0
-	BPF_LDX                          = 0x1
-	BPF_LEN                          = 0x80
-	BPF_LSH                          = 0x60
-	BPF_MAJOR_VERSION                = 0x1
-	BPF_MAXINSNS                     = 0x1000
-	BPF_MEM                          = 0x60
-	BPF_MEMWORDS                     = 0x10
-	BPF_MINOR_VERSION                = 0x1
-	BPF_MISC                         = 0x7
-	BPF_MOD                          = 0x90
-	BPF_MSH                          = 0xa0
-	BPF_MUL                          = 0x20
-	BPF_NEG                          = 0x80
-	BPF_OR                           = 0x40
-	BPF_RET                          = 0x6
-	BPF_RSH                          = 0x70
-	BPF_ST                           = 0x2
-	BPF_STX                          = 0x3
-	BPF_SUB                          = 0x10
-	BPF_TAX                          = 0x0
-	BPF_TXA                          = 0x80
-	BPF_W                            = 0x0
-	BPF_X                            = 0x8
-	BPF_XOR                          = 0xa0
-	BRKINT                           = 0x2
-	CFLUSH                           = 0xf
-	CLOCAL                           = 0x8000
-	CLONE_CHILD_CLEARTID             = 0x200000
-	CLONE_CHILD_SETTID               = 0x1000000
-	CLONE_DETACHED                   = 0x400000
-	CLONE_FILES                      = 0x400
-	CLONE_FS                         = 0x200
-	CLONE_IO                         = 0x80000000
-	CLONE_NEWIPC                     = 0x8000000
-	CLONE_NEWNET                     = 0x40000000
-	CLONE_NEWNS                      = 0x20000
-	CLONE_NEWPID                     = 0x20000000
-	CLONE_NEWUSER                    = 0x10000000
-	CLONE_NEWUTS                     = 0x4000000
-	CLONE_PARENT                     = 0x8000
-	CLONE_PARENT_SETTID              = 0x100000
-	CLONE_PTRACE                     = 0x2000
-	CLONE_SETTLS                     = 0x80000
-	CLONE_SIGHAND                    = 0x800
-	CLONE_SYSVSEM                    = 0x40000
-	CLONE_THREAD                     = 0x10000
-	CLONE_UNTRACED                   = 0x800000
-	CLONE_VFORK                      = 0x4000
-	CLONE_VM                         = 0x100
-	CREAD                            = 0x800
-	CS5                              = 0x0
-	CS6                              = 0x100
-	CS7                              = 0x200
-	CS8                              = 0x300
-	CSIGNAL                          = 0xff
-	CSIZE                            = 0x300
-	CSTART                           = 0x11
-	CSTATUS                          = 0x0
-	CSTOP                            = 0x13
-	CSTOPB                           = 0x400
-	CSUSP                            = 0x1a
-	DT_BLK                           = 0x6
-	DT_CHR                           = 0x2
-	DT_DIR                           = 0x4
-	DT_FIFO                          = 0x1
-	DT_LNK                           = 0xa
-	DT_REG                           = 0x8
-	DT_SOCK                          = 0xc
-	DT_UNKNOWN                       = 0x0
-	DT_WHT                           = 0xe
-	ECHO                             = 0x8
-	ECHOCTL                          = 0x40
-	ECHOE                            = 0x2
-	ECHOK                            = 0x4
-	ECHOKE                           = 0x1
-	ECHONL                           = 0x10
-	ECHOPRT                          = 0x20
-	ENCODING_DEFAULT                 = 0x0
-	ENCODING_FM_MARK                 = 0x3
-	ENCODING_FM_SPACE                = 0x4
-	ENCODING_MANCHESTER              = 0x5
-	ENCODING_NRZ                     = 0x1
-	ENCODING_NRZI                    = 0x2
-	EPOLLERR                         = 0x8
-	EPOLLET                          = 0x80000000
-	EPOLLHUP                         = 0x10
-	EPOLLIN                          = 0x1
-	EPOLLMSG                         = 0x400
-	EPOLLONESHOT                     = 0x40000000
-	EPOLLOUT                         = 0x4
-	EPOLLPRI                         = 0x2
-	EPOLLRDBAND                      = 0x80
-	EPOLLRDHUP                       = 0x2000
-	EPOLLRDNORM                      = 0x40
-	EPOLLWAKEUP                      = 0x20000000
-	EPOLLWRBAND                      = 0x200
-	EPOLLWRNORM                      = 0x100
-	EPOLL_CLOEXEC                    = 0x80000
-	EPOLL_CTL_ADD                    = 0x1
-	EPOLL_CTL_DEL                    = 0x2
-	EPOLL_CTL_MOD                    = 0x3
-	ETH_P_1588                       = 0x88f7
-	ETH_P_8021AD                     = 0x88a8
-	ETH_P_8021AH                     = 0x88e7
-	ETH_P_8021Q                      = 0x8100
-	ETH_P_802_2                      = 0x4
-	ETH_P_802_3                      = 0x1
-	ETH_P_802_3_MIN                  = 0x600
-	ETH_P_802_EX1                    = 0x88b5
-	ETH_P_AARP                       = 0x80f3
-	ETH_P_AF_IUCV                    = 0xfbfb
-	ETH_P_ALL                        = 0x3
-	ETH_P_AOE                        = 0x88a2
-	ETH_P_ARCNET                     = 0x1a
-	ETH_P_ARP                        = 0x806
-	ETH_P_ATALK                      = 0x809b
-	ETH_P_ATMFATE                    = 0x8884
-	ETH_P_ATMMPOA                    = 0x884c
-	ETH_P_AX25                       = 0x2
-	ETH_P_BATMAN                     = 0x4305
-	ETH_P_BPQ                        = 0x8ff
-	ETH_P_CAIF                       = 0xf7
-	ETH_P_CAN                        = 0xc
-	ETH_P_CANFD                      = 0xd
-	ETH_P_CONTROL                    = 0x16
-	ETH_P_CUST                       = 0x6006
-	ETH_P_DDCMP                      = 0x6
-	ETH_P_DEC                        = 0x6000
-	ETH_P_DIAG                       = 0x6005
-	ETH_P_DNA_DL                     = 0x6001
-	ETH_P_DNA_RC                     = 0x6002
-	ETH_P_DNA_RT                     = 0x6003
-	ETH_P_DSA                        = 0x1b
-	ETH_P_ECONET                     = 0x18
-	ETH_P_EDSA                       = 0xdada
-	ETH_P_FCOE                       = 0x8906
-	ETH_P_FIP                        = 0x8914
-	ETH_P_HDLC                       = 0x19
-	ETH_P_IEEE802154                 = 0xf6
-	ETH_P_IEEEPUP                    = 0xa00
-	ETH_P_IEEEPUPAT                  = 0xa01
-	ETH_P_IP                         = 0x800
-	ETH_P_IPV6                       = 0x86dd
-	ETH_P_IPX                        = 0x8137
-	ETH_P_IRDA                       = 0x17
-	ETH_P_LAT                        = 0x6004
-	ETH_P_LINK_CTL                   = 0x886c
-	ETH_P_LOCALTALK                  = 0x9
-	ETH_P_LOOP                       = 0x60
-	ETH_P_MOBITEX                    = 0x15
-	ETH_P_MPLS_MC                    = 0x8848
-	ETH_P_MPLS_UC                    = 0x8847
-	ETH_P_MVRP                       = 0x88f5
-	ETH_P_PAE                        = 0x888e
-	ETH_P_PAUSE                      = 0x8808
-	ETH_P_PHONET                     = 0xf5
-	ETH_P_PPPTALK                    = 0x10
-	ETH_P_PPP_DISC                   = 0x8863
-	ETH_P_PPP_MP                     = 0x8
-	ETH_P_PPP_SES                    = 0x8864
-	ETH_P_PRP                        = 0x88fb
-	ETH_P_PUP                        = 0x200
-	ETH_P_PUPAT                      = 0x201
-	ETH_P_QINQ1                      = 0x9100
-	ETH_P_QINQ2                      = 0x9200
-	ETH_P_QINQ3                      = 0x9300
-	ETH_P_RARP                       = 0x8035
-	ETH_P_SCA                        = 0x6007
-	ETH_P_SLOW                       = 0x8809
-	ETH_P_SNAP                       = 0x5
-	ETH_P_TDLS                       = 0x890d
-	ETH_P_TEB                        = 0x6558
-	ETH_P_TIPC                       = 0x88ca
-	ETH_P_TRAILER                    = 0x1c
-	ETH_P_TR_802_2                   = 0x11
-	ETH_P_WAN_PPP                    = 0x7
-	ETH_P_WCCP                       = 0x883e
-	ETH_P_X25                        = 0x805
-	EXTA                             = 0xe
-	EXTB                             = 0xf
-	EXTPROC                          = 0x10000000
-	FD_CLOEXEC                       = 0x1
-	FD_SETSIZE                       = 0x400
-	FLUSHO                           = 0x800000
-	F_DUPFD                          = 0x0
-	F_DUPFD_CLOEXEC                  = 0x406
-	F_EXLCK                          = 0x4
-	F_GETFD                          = 0x1
-	F_GETFL                          = 0x3
-	F_GETLEASE                       = 0x401
-	F_GETLK                          = 0x5
-	F_GETLK64                        = 0xc
-	F_GETOWN                         = 0x9
-	F_GETOWN_EX                      = 0x10
-	F_GETPIPE_SZ                     = 0x408
-	F_GETSIG                         = 0xb
-	F_LOCK                           = 0x1
-	F_NOTIFY                         = 0x402
-	F_OK                             = 0x0
-	F_RDLCK                          = 0x0
-	F_SETFD                          = 0x2
-	F_SETFL                          = 0x4
-	F_SETLEASE                       = 0x400
-	F_SETLK                          = 0x6
-	F_SETLK64                        = 0xd
-	F_SETLKW                         = 0x7
-	F_SETLKW64                       = 0xe
-	F_SETOWN                         = 0x8
-	F_SETOWN_EX                      = 0xf
-	F_SETPIPE_SZ                     = 0x407
-	F_SETSIG                         = 0xa
-	F_SHLCK                          = 0x8
-	F_TEST                           = 0x3
-	F_TLOCK                          = 0x2
-	F_ULOCK                          = 0x0
-	F_UNLCK                          = 0x2
-	F_WRLCK                          = 0x1
-	HUPCL                            = 0x4000
-	ICANON                           = 0x100
-	ICMPV6_FILTER                    = 0x1
-	ICRNL                            = 0x100
-	IEXTEN                           = 0x400
-	IFA_F_DADFAILED                  = 0x8
-	IFA_F_DEPRECATED                 = 0x20
-	IFA_F_HOMEADDRESS                = 0x10
-	IFA_F_NODAD                      = 0x2
-	IFA_F_OPTIMISTIC                 = 0x4
-	IFA_F_PERMANENT                  = 0x80
-	IFA_F_SECONDARY                  = 0x1
-	IFA_F_TEMPORARY                  = 0x1
-	IFA_F_TENTATIVE                  = 0x40
-	IFA_MAX                          = 0x7
-	IFF_802_1Q_VLAN                  = 0x1
-	IFF_ALLMULTI                     = 0x200
-	IFF_ATTACH_QUEUE                 = 0x200
-	IFF_AUTOMEDIA                    = 0x4000
-	IFF_BONDING                      = 0x20
-	IFF_BRIDGE_PORT                  = 0x4000
-	IFF_BROADCAST                    = 0x2
-	IFF_DEBUG                        = 0x4
-	IFF_DETACH_QUEUE                 = 0x400
-	IFF_DISABLE_NETPOLL              = 0x1000
-	IFF_DONT_BRIDGE                  = 0x800
-	IFF_DORMANT                      = 0x20000
-	IFF_DYNAMIC                      = 0x8000
-	IFF_EBRIDGE                      = 0x2
-	IFF_ECHO                         = 0x40000
-	IFF_ISATAP                       = 0x80
-	IFF_LIVE_ADDR_CHANGE             = 0x100000
-	IFF_LOOPBACK                     = 0x8
-	IFF_LOWER_UP                     = 0x10000
-	IFF_MACVLAN                      = 0x200000
-	IFF_MACVLAN_PORT                 = 0x2000
-	IFF_MASTER                       = 0x400
-	IFF_MASTER_8023AD                = 0x8
-	IFF_MASTER_ALB                   = 0x10
-	IFF_MASTER_ARPMON                = 0x100
-	IFF_MULTICAST                    = 0x1000
-	IFF_MULTI_QUEUE                  = 0x100
-	IFF_NOARP                        = 0x80
-	IFF_NOFILTER                     = 0x1000
-	IFF_NOTRAILERS                   = 0x20
-	IFF_NO_PI                        = 0x1000
-	IFF_ONE_QUEUE                    = 0x2000
-	IFF_OVS_DATAPATH                 = 0x8000
-	IFF_PERSIST                      = 0x800
-	IFF_POINTOPOINT                  = 0x10
-	IFF_PORTSEL                      = 0x2000
-	IFF_PROMISC                      = 0x100
-	IFF_RUNNING                      = 0x40
-	IFF_SLAVE                        = 0x800
-	IFF_SLAVE_INACTIVE               = 0x4
-	IFF_SLAVE_NEEDARP                = 0x40
-	IFF_SUPP_NOFCS                   = 0x80000
-	IFF_TAP                          = 0x2
-	IFF_TEAM_PORT                    = 0x40000
-	IFF_TUN                          = 0x1
-	IFF_TUN_EXCL                     = 0x8000
-	IFF_TX_SKB_SHARING               = 0x10000
-	IFF_UNICAST_FLT                  = 0x20000
-	IFF_UP                           = 0x1
-	IFF_VNET_HDR                     = 0x4000
-	IFF_VOLATILE                     = 0x70c5a
-	IFF_WAN_HDLC                     = 0x200
-	IFF_XMIT_DST_RELEASE             = 0x400
-	IFNAMSIZ                         = 0x10
-	IGNBRK                           = 0x1
-	IGNCR                            = 0x80
-	IGNPAR                           = 0x4
-	IMAXBEL                          = 0x2000
-	INLCR                            = 0x40
-	INPCK                            = 0x10
-	IN_ACCESS                        = 0x1
-	IN_ALL_EVENTS                    = 0xfff
-	IN_ATTRIB                        = 0x4
-	IN_CLASSA_HOST                   = 0xffffff
-	IN_CLASSA_MAX                    = 0x80
-	IN_CLASSA_NET                    = 0xff000000
-	IN_CLASSA_NSHIFT                 = 0x18
-	IN_CLASSB_HOST                   = 0xffff
-	IN_CLASSB_MAX                    = 0x10000
-	IN_CLASSB_NET                    = 0xffff0000
-	IN_CLASSB_NSHIFT                 = 0x10
-	IN_CLASSC_HOST                   = 0xff
-	IN_CLASSC_NET                    = 0xffffff00
-	IN_CLASSC_NSHIFT                 = 0x8
-	IN_CLOEXEC                       = 0x80000
-	IN_CLOSE                         = 0x18
-	IN_CLOSE_NOWRITE                 = 0x10
-	IN_CLOSE_WRITE                   = 0x8
-	IN_CREATE                        = 0x100
-	IN_DELETE                        = 0x200
-	IN_DELETE_SELF                   = 0x400
-	IN_DONT_FOLLOW                   = 0x2000000
-	IN_EXCL_UNLINK                   = 0x4000000
-	IN_IGNORED                       = 0x8000
-	IN_ISDIR                         = 0x40000000
-	IN_LOOPBACKNET                   = 0x7f
-	IN_MASK_ADD                      = 0x20000000
-	IN_MODIFY                        = 0x2
-	IN_MOVE                          = 0xc0
-	IN_MOVED_FROM                    = 0x40
-	IN_MOVED_TO                      = 0x80
-	IN_MOVE_SELF                     = 0x800
-	IN_NONBLOCK                      = 0x800
-	IN_ONESHOT                       = 0x80000000
-	IN_ONLYDIR                       = 0x1000000
-	IN_OPEN                          = 0x20
-	IN_Q_OVERFLOW                    = 0x4000
-	IN_UNMOUNT                       = 0x2000
-	IPPROTO_AH                       = 0x33
-	IPPROTO_BEETPH                   = 0x5e
-	IPPROTO_COMP                     = 0x6c
-	IPPROTO_DCCP                     = 0x21
-	IPPROTO_DSTOPTS                  = 0x3c
-	IPPROTO_EGP                      = 0x8
-	IPPROTO_ENCAP                    = 0x62
-	IPPROTO_ESP                      = 0x32
-	IPPROTO_FRAGMENT                 = 0x2c
-	IPPROTO_GRE                      = 0x2f
-	IPPROTO_HOPOPTS                  = 0x0
-	IPPROTO_ICMP                     = 0x1
-	IPPROTO_ICMPV6                   = 0x3a
-	IPPROTO_IDP                      = 0x16
-	IPPROTO_IGMP                     = 0x2
-	IPPROTO_IP                       = 0x0
-	IPPROTO_IPIP                     = 0x4
-	IPPROTO_IPV6                     = 0x29
-	IPPROTO_MH                       = 0x87
-	IPPROTO_MTP                      = 0x5c
-	IPPROTO_NONE                     = 0x3b
-	IPPROTO_PIM                      = 0x67
-	IPPROTO_PUP                      = 0xc
-	IPPROTO_RAW                      = 0xff
-	IPPROTO_ROUTING                  = 0x2b
-	IPPROTO_RSVP                     = 0x2e
-	IPPROTO_SCTP                     = 0x84
-	IPPROTO_TCP                      = 0x6
-	IPPROTO_TP                       = 0x1d
-	IPPROTO_UDP                      = 0x11
-	IPPROTO_UDPLITE                  = 0x88
-	IPV6_2292DSTOPTS                 = 0x4
-	IPV6_2292HOPLIMIT                = 0x8
-	IPV6_2292HOPOPTS                 = 0x3
-	IPV6_2292PKTINFO                 = 0x2
-	IPV6_2292PKTOPTIONS              = 0x6
-	IPV6_2292RTHDR                   = 0x5
-	IPV6_ADDRFORM                    = 0x1
-	IPV6_ADD_MEMBERSHIP              = 0x14
-	IPV6_AUTHHDR                     = 0xa
-	IPV6_CHECKSUM                    = 0x7
-	IPV6_DROP_MEMBERSHIP             = 0x15
-	IPV6_DSTOPTS                     = 0x3b
-	IPV6_HOPLIMIT                    = 0x34
-	IPV6_HOPOPTS                     = 0x36
-	IPV6_IPSEC_POLICY                = 0x22
-	IPV6_JOIN_ANYCAST                = 0x1b
-	IPV6_JOIN_GROUP                  = 0x14
-	IPV6_LEAVE_ANYCAST               = 0x1c
-	IPV6_LEAVE_GROUP                 = 0x15
-	IPV6_MTU                         = 0x18
-	IPV6_MTU_DISCOVER                = 0x17
-	IPV6_MULTICAST_HOPS              = 0x12
-	IPV6_MULTICAST_IF                = 0x11
-	IPV6_MULTICAST_LOOP              = 0x13
-	IPV6_NEXTHOP                     = 0x9
-	IPV6_PKTINFO                     = 0x32
-	IPV6_PMTUDISC_DO                 = 0x2
-	IPV6_PMTUDISC_DONT               = 0x0
-	IPV6_PMTUDISC_PROBE              = 0x3
-	IPV6_PMTUDISC_WANT               = 0x1
-	IPV6_RECVDSTOPTS                 = 0x3a
-	IPV6_RECVERR                     = 0x19
-	IPV6_RECVHOPLIMIT                = 0x33
-	IPV6_RECVHOPOPTS                 = 0x35
-	IPV6_RECVPKTINFO                 = 0x31
-	IPV6_RECVRTHDR                   = 0x38
-	IPV6_RECVTCLASS                  = 0x42
-	IPV6_ROUTER_ALERT                = 0x16
-	IPV6_RTHDR                       = 0x39
-	IPV6_RTHDRDSTOPTS                = 0x37
-	IPV6_RTHDR_LOOSE                 = 0x0
-	IPV6_RTHDR_STRICT                = 0x1
-	IPV6_RTHDR_TYPE_0                = 0x0
-	IPV6_RXDSTOPTS                   = 0x3b
-	IPV6_RXHOPOPTS                   = 0x36
-	IPV6_TCLASS                      = 0x43
-	IPV6_UNICAST_HOPS                = 0x10
-	IPV6_V6ONLY                      = 0x1a
-	IPV6_XFRM_POLICY                 = 0x23
-	IP_ADD_MEMBERSHIP                = 0x23
-	IP_ADD_SOURCE_MEMBERSHIP         = 0x27
-	IP_BLOCK_SOURCE                  = 0x26
-	IP_DEFAULT_MULTICAST_LOOP        = 0x1
-	IP_DEFAULT_MULTICAST_TTL         = 0x1
-	IP_DF                            = 0x4000
-	IP_DROP_MEMBERSHIP               = 0x24
-	IP_DROP_SOURCE_MEMBERSHIP        = 0x28
-	IP_FREEBIND                      = 0xf
-	IP_HDRINCL                       = 0x3
-	IP_IPSEC_POLICY                  = 0x10
-	IP_MAXPACKET                     = 0xffff
-	IP_MAX_MEMBERSHIPS               = 0x14
-	IP_MF                            = 0x2000
-	IP_MINTTL                        = 0x15
-	IP_MSFILTER                      = 0x29
-	IP_MSS                           = 0x240
-	IP_MTU                           = 0xe
-	IP_MTU_DISCOVER                  = 0xa
-	IP_MULTICAST_ALL                 = 0x31
-	IP_MULTICAST_IF                  = 0x20
-	IP_MULTICAST_LOOP                = 0x22
-	IP_MULTICAST_TTL                 = 0x21
-	IP_OFFMASK                       = 0x1fff
-	IP_OPTIONS                       = 0x4
-	IP_ORIGDSTADDR                   = 0x14
-	IP_PASSSEC                       = 0x12
-	IP_PKTINFO                       = 0x8
-	IP_PKTOPTIONS                    = 0x9
-	IP_PMTUDISC                      = 0xa
-	IP_PMTUDISC_DO                   = 0x2
-	IP_PMTUDISC_DONT                 = 0x0
-	IP_PMTUDISC_PROBE                = 0x3
-	IP_PMTUDISC_WANT                 = 0x1
-	IP_RECVERR                       = 0xb
-	IP_RECVOPTS                      = 0x6
-	IP_RECVORIGDSTADDR               = 0x14
-	IP_RECVRETOPTS                   = 0x7
-	IP_RECVTOS                       = 0xd
-	IP_RECVTTL                       = 0xc
-	IP_RETOPTS                       = 0x7
-	IP_RF                            = 0x8000
-	IP_ROUTER_ALERT                  = 0x5
-	IP_TOS                           = 0x1
-	IP_TRANSPARENT                   = 0x13
-	IP_TTL                           = 0x2
-	IP_UNBLOCK_SOURCE                = 0x25
-	IP_UNICAST_IF                    = 0x32
-	IP_XFRM_POLICY                   = 0x11
-	ISIG                             = 0x80
-	ISTRIP                           = 0x20
-	IUTF8                            = 0x4000
-	IXANY                            = 0x800
-	IXOFF                            = 0x400
-	IXON                             = 0x200
-	LINUX_REBOOT_CMD_CAD_OFF         = 0x0
-	LINUX_REBOOT_CMD_CAD_ON          = 0x89abcdef
-	LINUX_REBOOT_CMD_HALT            = 0xcdef0123
-	LINUX_REBOOT_CMD_KEXEC           = 0x45584543
-	LINUX_REBOOT_CMD_POWER_OFF       = 0x4321fedc
-	LINUX_REBOOT_CMD_RESTART         = 0x1234567
-	LINUX_REBOOT_CMD_RESTART2        = 0xa1b2c3d4
-	LINUX_REBOOT_CMD_SW_SUSPEND      = 0xd000fce2
-	LINUX_REBOOT_MAGIC1              = 0xfee1dead
-	LINUX_REBOOT_MAGIC2              = 0x28121969
-	LOCK_EX                          = 0x2
-	LOCK_NB                          = 0x4
-	LOCK_SH                          = 0x1
-	LOCK_UN                          = 0x8
-	MADV_DODUMP                      = 0x11
-	MADV_DOFORK                      = 0xb
-	MADV_DONTDUMP                    = 0x10
-	MADV_DONTFORK                    = 0xa
-	MADV_DONTNEED                    = 0x4
-	MADV_HUGEPAGE                    = 0xe
-	MADV_HWPOISON                    = 0x64
-	MADV_MERGEABLE                   = 0xc
-	MADV_NOHUGEPAGE                  = 0xf
-	MADV_NORMAL                      = 0x0
-	MADV_RANDOM                      = 0x1
-	MADV_REMOVE                      = 0x9
-	MADV_SEQUENTIAL                  = 0x2
-	MADV_UNMERGEABLE                 = 0xd
-	MADV_WILLNEED                    = 0x3
-	MAP_ANON                         = 0x20
-	MAP_ANONYMOUS                    = 0x20
-	MAP_DENYWRITE                    = 0x800
-	MAP_EXECUTABLE                   = 0x1000
-	MAP_FILE                         = 0x0
-	MAP_FIXED                        = 0x10
-	MAP_GROWSDOWN                    = 0x100
-	MAP_HUGETLB                      = 0x40000
-	MAP_HUGE_MASK                    = 0x3f
-	MAP_HUGE_SHIFT                   = 0x1a
-	MAP_LOCKED                       = 0x80
-	MAP_NONBLOCK                     = 0x10000
-	MAP_NORESERVE                    = 0x40
-	MAP_POPULATE                     = 0x8000
-	MAP_PRIVATE                      = 0x2
-	MAP_SHARED                       = 0x1
-	MAP_STACK                        = 0x20000
-	MAP_TYPE                         = 0xf
-	MCL_CURRENT                      = 0x2000
-	MCL_FUTURE                       = 0x4000
-	MNT_DETACH                       = 0x2
-	MNT_EXPIRE                       = 0x4
-	MNT_FORCE                        = 0x1
-	MSG_CMSG_CLOEXEC                 = 0x40000000
-	MSG_CONFIRM                      = 0x800
-	MSG_CTRUNC                       = 0x8
-	MSG_DONTROUTE                    = 0x4
-	MSG_DONTWAIT                     = 0x40
-	MSG_EOR                          = 0x80
-	MSG_ERRQUEUE                     = 0x2000
-	MSG_FASTOPEN                     = 0x20000000
-	MSG_FIN                          = 0x200
-	MSG_MORE                         = 0x8000
-	MSG_NOSIGNAL                     = 0x4000
-	MSG_OOB                          = 0x1
-	MSG_PEEK                         = 0x2
-	MSG_PROXY                        = 0x10
-	MSG_RST                          = 0x1000
-	MSG_SYN                          = 0x400
-	MSG_TRUNC                        = 0x20
-	MSG_TRYHARD                      = 0x4
-	MSG_WAITALL                      = 0x100
-	MSG_WAITFORONE                   = 0x10000
-	MS_ACTIVE                        = 0x40000000
-	MS_ASYNC                         = 0x1
-	MS_BIND                          = 0x1000
-	MS_DIRSYNC                       = 0x80
-	MS_INVALIDATE                    = 0x2
-	MS_I_VERSION                     = 0x800000
-	MS_KERNMOUNT                     = 0x400000
-	MS_MANDLOCK                      = 0x40
-	MS_MGC_MSK                       = 0xffff0000
-	MS_MGC_VAL                       = 0xc0ed0000
-	MS_MOVE                          = 0x2000
-	MS_NOATIME                       = 0x400
-	MS_NODEV                         = 0x4
-	MS_NODIRATIME                    = 0x800
-	MS_NOEXEC                        = 0x8
-	MS_NOSUID                        = 0x2
-	MS_NOUSER                        = -0x80000000
-	MS_POSIXACL                      = 0x10000
-	MS_PRIVATE                       = 0x40000
-	MS_RDONLY                        = 0x1
-	MS_REC                           = 0x4000
-	MS_RELATIME                      = 0x200000
-	MS_REMOUNT                       = 0x20
-	MS_RMT_MASK                      = 0x800051
-	MS_SHARED                        = 0x100000
-	MS_SILENT                        = 0x8000
-	MS_SLAVE                         = 0x80000
-	MS_STRICTATIME                   = 0x1000000
-	MS_SYNC                          = 0x4
-	MS_SYNCHRONOUS                   = 0x10
-	MS_UNBINDABLE                    = 0x20000
-	NAME_MAX                         = 0xff
-	NETLINK_ADD_MEMBERSHIP           = 0x1
-	NETLINK_AUDIT                    = 0x9
-	NETLINK_BROADCAST_ERROR          = 0x4
-	NETLINK_CONNECTOR                = 0xb
-	NETLINK_CRYPTO                   = 0x15
-	NETLINK_DNRTMSG                  = 0xe
-	NETLINK_DROP_MEMBERSHIP          = 0x2
-	NETLINK_ECRYPTFS                 = 0x13
-	NETLINK_FIB_LOOKUP               = 0xa
-	NETLINK_FIREWALL                 = 0x3
-	NETLINK_GENERIC                  = 0x10
-	NETLINK_INET_DIAG                = 0x4
-	NETLINK_IP6_FW                   = 0xd
-	NETLINK_ISCSI                    = 0x8
-	NETLINK_KOBJECT_UEVENT           = 0xf
-	NETLINK_NETFILTER                = 0xc
-	NETLINK_NFLOG                    = 0x5
-	NETLINK_NO_ENOBUFS               = 0x5
-	NETLINK_PKTINFO                  = 0x3
-	NETLINK_RDMA                     = 0x14
-	NETLINK_ROUTE                    = 0x0
-	NETLINK_RX_RING                  = 0x6
-	NETLINK_SCSITRANSPORT            = 0x12
-	NETLINK_SELINUX                  = 0x7
-	NETLINK_SOCK_DIAG                = 0x4
-	NETLINK_TX_RING                  = 0x7
-	NETLINK_UNUSED                   = 0x1
-	NETLINK_USERSOCK                 = 0x2
-	NETLINK_XFRM                     = 0x6
-	NLA_ALIGNTO                      = 0x4
-	NLA_F_NESTED                     = 0x8000
-	NLA_F_NET_BYTEORDER              = 0x4000
-	NLA_HDRLEN                       = 0x4
-	NLMSG_ALIGNTO                    = 0x4
-	NLMSG_DONE                       = 0x3
-	NLMSG_ERROR                      = 0x2
-	NLMSG_HDRLEN                     = 0x10
-	NLMSG_MIN_TYPE                   = 0x10
-	NLMSG_NOOP                       = 0x1
-	NLMSG_OVERRUN                    = 0x4
-	NLM_F_ACK                        = 0x4
-	NLM_F_APPEND                     = 0x800
-	NLM_F_ATOMIC                     = 0x400
-	NLM_F_CREATE                     = 0x400
-	NLM_F_DUMP                       = 0x300
-	NLM_F_DUMP_INTR                  = 0x10
-	NLM_F_ECHO                       = 0x8
-	NLM_F_EXCL                       = 0x200
-	NLM_F_MATCH                      = 0x200
-	NLM_F_MULTI                      = 0x2
-	NLM_F_REPLACE                    = 0x100
-	NLM_F_REQUEST                    = 0x1
-	NLM_F_ROOT                       = 0x100
-	NOFLSH                           = 0x80000000
-	OCRNL                            = 0x8
-	OFDEL                            = 0x80
-	OFILL                            = 0x40
-	ONLCR                            = 0x2
-	ONLRET                           = 0x20
-	ONOCR                            = 0x10
-	OPOST                            = 0x1
-	O_ACCMODE                        = 0x3
-	O_APPEND                         = 0x400
-	O_ASYNC                          = 0x2000
-	O_CLOEXEC                        = 0x80000
-	O_CREAT                          = 0x40
-	O_DIRECT                         = 0x20000
-	O_DIRECTORY                      = 0x4000
-	O_DSYNC                          = 0x1000
-	O_EXCL                           = 0x80
-	O_FSYNC                          = 0x101000
-	O_LARGEFILE                      = 0x0
-	O_NDELAY                         = 0x800
-	O_NOATIME                        = 0x40000
-	O_NOCTTY                         = 0x100
-	O_NOFOLLOW                       = 0x8000
-	O_NONBLOCK                       = 0x800
-	O_PATH                           = 0x200000
-	O_RDONLY                         = 0x0
-	O_RDWR                           = 0x2
-	O_RSYNC                          = 0x101000
-	O_SYNC                           = 0x101000
-	O_TMPFILE                        = 0x410000
-	O_TRUNC                          = 0x200
-	O_WRONLY                         = 0x1
-	PACKET_ADD_MEMBERSHIP            = 0x1
-	PACKET_AUXDATA                   = 0x8
-	PACKET_BROADCAST                 = 0x1
-	PACKET_COPY_THRESH               = 0x7
-	PACKET_DROP_MEMBERSHIP           = 0x2
-	PACKET_FANOUT                    = 0x12
-	PACKET_FANOUT_CPU                = 0x2
-	PACKET_FANOUT_FLAG_DEFRAG        = 0x8000
-	PACKET_FANOUT_FLAG_ROLLOVER      = 0x1000
-	PACKET_FANOUT_HASH               = 0x0
-	PACKET_FANOUT_LB                 = 0x1
-	PACKET_FANOUT_RND                = 0x4
-	PACKET_FANOUT_ROLLOVER           = 0x3
-	PACKET_FASTROUTE                 = 0x6
-	PACKET_HDRLEN                    = 0xb
-	PACKET_HOST                      = 0x0
-	PACKET_LOOPBACK                  = 0x5
-	PACKET_LOSS                      = 0xe
-	PACKET_MR_ALLMULTI               = 0x2
-	PACKET_MR_MULTICAST              = 0x0
-	PACKET_MR_PROMISC                = 0x1
-	PACKET_MR_UNICAST                = 0x3
-	PACKET_MULTICAST                 = 0x2
-	PACKET_ORIGDEV                   = 0x9
-	PACKET_OTHERHOST                 = 0x3
-	PACKET_OUTGOING                  = 0x4
-	PACKET_RECV_OUTPUT               = 0x3
-	PACKET_RESERVE                   = 0xc
-	PACKET_RX_RING                   = 0x5
-	PACKET_STATISTICS                = 0x6
-	PACKET_TIMESTAMP                 = 0x11
-	PACKET_TX_HAS_OFF                = 0x13
-	PACKET_TX_RING                   = 0xd
-	PACKET_TX_TIMESTAMP              = 0x10
-	PACKET_VERSION                   = 0xa
-	PACKET_VNET_HDR                  = 0xf
-	PARENB                           = 0x1000
-	PARITY_CRC16_PR0                 = 0x2
-	PARITY_CRC16_PR0_CCITT           = 0x4
-	PARITY_CRC16_PR1                 = 0x3
-	PARITY_CRC16_PR1_CCITT           = 0x5
-	PARITY_CRC32_PR0_CCITT           = 0x6
-	PARITY_CRC32_PR1_CCITT           = 0x7
-	PARITY_DEFAULT                   = 0x0
-	PARITY_NONE                      = 0x1
-	PARMRK                           = 0x8
-	PARODD                           = 0x2000
-	PENDIN                           = 0x20000000
-	PRIO_PGRP                        = 0x1
-	PRIO_PROCESS                     = 0x0
-	PRIO_USER                        = 0x2
-	PROT_EXEC                        = 0x4
-	PROT_GROWSDOWN                   = 0x1000000
-	PROT_GROWSUP                     = 0x2000000
-	PROT_NONE                        = 0x0
-	PROT_READ                        = 0x1
-	PROT_SAO                         = 0x10
-	PROT_WRITE                       = 0x2
-	PR_CAPBSET_DROP                  = 0x18
-	PR_CAPBSET_READ                  = 0x17
-	PR_ENDIAN_BIG                    = 0x0
-	PR_ENDIAN_LITTLE                 = 0x1
-	PR_ENDIAN_PPC_LITTLE             = 0x2
-	PR_FPEMU_NOPRINT                 = 0x1
-	PR_FPEMU_SIGFPE                  = 0x2
-	PR_FP_EXC_ASYNC                  = 0x2
-	PR_FP_EXC_DISABLED               = 0x0
-	PR_FP_EXC_DIV                    = 0x10000
-	PR_FP_EXC_INV                    = 0x100000
-	PR_FP_EXC_NONRECOV               = 0x1
-	PR_FP_EXC_OVF                    = 0x20000
-	PR_FP_EXC_PRECISE                = 0x3
-	PR_FP_EXC_RES                    = 0x80000
-	PR_FP_EXC_SW_ENABLE              = 0x80
-	PR_FP_EXC_UND                    = 0x40000
-	PR_GET_CHILD_SUBREAPER           = 0x25
-	PR_GET_DUMPABLE                  = 0x3
-	PR_GET_ENDIAN                    = 0x13
-	PR_GET_FPEMU                     = 0x9
-	PR_GET_FPEXC                     = 0xb
-	PR_GET_KEEPCAPS                  = 0x7
-	PR_GET_NAME                      = 0x10
-	PR_GET_NO_NEW_PRIVS              = 0x27
-	PR_GET_PDEATHSIG                 = 0x2
-	PR_GET_SECCOMP                   = 0x15
-	PR_GET_SECUREBITS                = 0x1b
-	PR_GET_TID_ADDRESS               = 0x28
-	PR_GET_TIMERSLACK                = 0x1e
-	PR_GET_TIMING                    = 0xd
-	PR_GET_TSC                       = 0x19
-	PR_GET_UNALIGN                   = 0x5
-	PR_MCE_KILL                      = 0x21
-	PR_MCE_KILL_CLEAR                = 0x0
-	PR_MCE_KILL_DEFAULT              = 0x2
-	PR_MCE_KILL_EARLY                = 0x1
-	PR_MCE_KILL_GET                  = 0x22
-	PR_MCE_KILL_LATE                 = 0x0
-	PR_MCE_KILL_SET                  = 0x1
-	PR_SET_CHILD_SUBREAPER           = 0x24
-	PR_SET_DUMPABLE                  = 0x4
-	PR_SET_ENDIAN                    = 0x14
-	PR_SET_FPEMU                     = 0xa
-	PR_SET_FPEXC                     = 0xc
-	PR_SET_KEEPCAPS                  = 0x8
-	PR_SET_MM                        = 0x23
-	PR_SET_MM_ARG_END                = 0x9
-	PR_SET_MM_ARG_START              = 0x8
-	PR_SET_MM_AUXV                   = 0xc
-	PR_SET_MM_BRK                    = 0x7
-	PR_SET_MM_END_CODE               = 0x2
-	PR_SET_MM_END_DATA               = 0x4
-	PR_SET_MM_ENV_END                = 0xb
-	PR_SET_MM_ENV_START              = 0xa
-	PR_SET_MM_EXE_FILE               = 0xd
-	PR_SET_MM_START_BRK              = 0x6
-	PR_SET_MM_START_CODE             = 0x1
-	PR_SET_MM_START_DATA             = 0x3
-	PR_SET_MM_START_STACK            = 0x5
-	PR_SET_NAME                      = 0xf
-	PR_SET_NO_NEW_PRIVS              = 0x26
-	PR_SET_PDEATHSIG                 = 0x1
-	PR_SET_PTRACER                   = 0x59616d61
-	PR_SET_PTRACER_ANY               = -0x1
-	PR_SET_SECCOMP                   = 0x16
-	PR_SET_SECUREBITS                = 0x1c
-	PR_SET_TIMERSLACK                = 0x1d
-	PR_SET_TIMING                    = 0xe
-	PR_SET_TSC                       = 0x1a
-	PR_SET_UNALIGN                   = 0x6
-	PR_TASK_PERF_EVENTS_DISABLE      = 0x1f
-	PR_TASK_PERF_EVENTS_ENABLE       = 0x20
-	PR_TIMING_STATISTICAL            = 0x0
-	PR_TIMING_TIMESTAMP              = 0x1
-	PR_TSC_ENABLE                    = 0x1
-	PR_TSC_SIGSEGV                   = 0x2
-	PR_UNALIGN_NOPRINT               = 0x1
-	PR_UNALIGN_SIGBUS                = 0x2
-	PTRACE_ATTACH                    = 0x10
-	PTRACE_CONT                      = 0x7
-	PTRACE_DETACH                    = 0x11
-	PTRACE_EVENT_CLONE               = 0x3
-	PTRACE_EVENT_EXEC                = 0x4
-	PTRACE_EVENT_EXIT                = 0x6
-	PTRACE_EVENT_FORK                = 0x1
-	PTRACE_EVENT_SECCOMP             = 0x7
-	PTRACE_EVENT_STOP                = 0x80
-	PTRACE_EVENT_VFORK               = 0x2
-	PTRACE_EVENT_VFORK_DONE          = 0x5
-	PTRACE_GETEVENTMSG               = 0x4201
-	PTRACE_GETEVRREGS                = 0x14
-	PTRACE_GETFPREGS                 = 0xe
-	PTRACE_GETREGS                   = 0xc
-	PTRACE_GETREGS64                 = 0x16
-	PTRACE_GETREGSET                 = 0x4204
-	PTRACE_GETSIGINFO                = 0x4202
-	PTRACE_GETSIGMASK                = 0x420a
-	PTRACE_GETVRREGS                 = 0x12
-	PTRACE_GETVSRREGS                = 0x1b
-	PTRACE_GET_DEBUGREG              = 0x19
-	PTRACE_INTERRUPT                 = 0x4207
-	PTRACE_KILL                      = 0x8
-	PTRACE_LISTEN                    = 0x4208
-	PTRACE_O_EXITKILL                = 0x100000
-	PTRACE_O_MASK                    = 0x1000ff
-	PTRACE_O_TRACECLONE              = 0x8
-	PTRACE_O_TRACEEXEC               = 0x10
-	PTRACE_O_TRACEEXIT               = 0x40
-	PTRACE_O_TRACEFORK               = 0x2
-	PTRACE_O_TRACESECCOMP            = 0x80
-	PTRACE_O_TRACESYSGOOD            = 0x1
-	PTRACE_O_TRACEVFORK              = 0x4
-	PTRACE_O_TRACEVFORKDONE          = 0x20
-	PTRACE_PEEKDATA                  = 0x2
-	PTRACE_PEEKSIGINFO               = 0x4209
-	PTRACE_PEEKSIGINFO_SHARED        = 0x1
-	PTRACE_PEEKTEXT                  = 0x1
-	PTRACE_PEEKUSR                   = 0x3
-	PTRACE_POKEDATA                  = 0x5
-	PTRACE_POKETEXT                  = 0x4
-	PTRACE_POKEUSR                   = 0x6
-	PTRACE_SEIZE                     = 0x4206
-	PTRACE_SETEVRREGS                = 0x15
-	PTRACE_SETFPREGS                 = 0xf
-	PTRACE_SETOPTIONS                = 0x4200
-	PTRACE_SETREGS                   = 0xd
-	PTRACE_SETREGS64                 = 0x17
-	PTRACE_SETREGSET                 = 0x4205
-	PTRACE_SETSIGINFO                = 0x4203
-	PTRACE_SETSIGMASK                = 0x420b
-	PTRACE_SETVRREGS                 = 0x13
-	PTRACE_SETVSRREGS                = 0x1c
-	PTRACE_SET_DEBUGREG              = 0x1a
-	PTRACE_SINGLEBLOCK               = 0x100
-	PTRACE_SINGLESTEP                = 0x9
-	PTRACE_SYSCALL                   = 0x18
-	PTRACE_TRACEME                   = 0x0
-	PT_CCR                           = 0x26
-	PT_CTR                           = 0x23
-	PT_DAR                           = 0x29
-	PT_DSCR                          = 0x2c
-	PT_DSISR                         = 0x2a
-	PT_FPR0                          = 0x30
-	PT_FPSCR                         = 0x50
-	PT_LNK                           = 0x24
-	PT_MSR                           = 0x21
-	PT_NIP                           = 0x20
-	PT_ORIG_R3                       = 0x22
-	PT_R0                            = 0x0
-	PT_R1                            = 0x1
-	PT_R10                           = 0xa
-	PT_R11                           = 0xb
-	PT_R12                           = 0xc
-	PT_R13                           = 0xd
-	PT_R14                           = 0xe
-	PT_R15                           = 0xf
-	PT_R16                           = 0x10
-	PT_R17                           = 0x11
-	PT_R18                           = 0x12
-	PT_R19                           = 0x13
-	PT_R2                            = 0x2
-	PT_R20                           = 0x14
-	PT_R21                           = 0x15
-	PT_R22                           = 0x16
-	PT_R23                           = 0x17
-	PT_R24                           = 0x18
-	PT_R25                           = 0x19
-	PT_R26                           = 0x1a
-	PT_R27                           = 0x1b
-	PT_R28                           = 0x1c
-	PT_R29                           = 0x1d
-	PT_R3                            = 0x3
-	PT_R30                           = 0x1e
-	PT_R31                           = 0x1f
-	PT_R4                            = 0x4
-	PT_R5                            = 0x5
-	PT_R6                            = 0x6
-	PT_R7                            = 0x7
-	PT_R8                            = 0x8
-	PT_R9                            = 0x9
-	PT_REGS_COUNT                    = 0x2c
-	PT_RESULT                        = 0x2b
-	PT_SOFTE                         = 0x27
-	PT_TRAP                          = 0x28
-	PT_VR0                           = 0x52
-	PT_VRSAVE                        = 0x94
-	PT_VSCR                          = 0x93
-	PT_VSR0                          = 0x96
-	PT_VSR31                         = 0xd4
-	PT_XER                           = 0x25
-	RLIMIT_AS                        = 0x9
-	RLIMIT_CORE                      = 0x4
-	RLIMIT_CPU                       = 0x0
-	RLIMIT_DATA                      = 0x2
-	RLIMIT_FSIZE                     = 0x1
-	RLIMIT_NOFILE                    = 0x7
-	RLIMIT_STACK                     = 0x3
-	RLIM_INFINITY                    = -0x1
-	RTAX_ADVMSS                      = 0x8
-	RTAX_CWND                        = 0x7
-	RTAX_FEATURES                    = 0xc
-	RTAX_FEATURE_ALLFRAG             = 0x8
-	RTAX_FEATURE_ECN                 = 0x1
-	RTAX_FEATURE_SACK                = 0x2
-	RTAX_FEATURE_TIMESTAMP           = 0x4
-	RTAX_HOPLIMIT                    = 0xa
-	RTAX_INITCWND                    = 0xb
-	RTAX_INITRWND                    = 0xe
-	RTAX_LOCK                        = 0x1
-	RTAX_MAX                         = 0xf
-	RTAX_MTU                         = 0x2
-	RTAX_QUICKACK                    = 0xf
-	RTAX_REORDERING                  = 0x9
-	RTAX_RTO_MIN                     = 0xd
-	RTAX_RTT                         = 0x4
-	RTAX_RTTVAR                      = 0x5
-	RTAX_SSTHRESH                    = 0x6
-	RTAX_UNSPEC                      = 0x0
-	RTAX_WINDOW                      = 0x3
-	RTA_ALIGNTO                      = 0x4
-	RTA_MAX                          = 0x11
-	RTCF_DIRECTSRC                   = 0x4000000
-	RTCF_DOREDIRECT                  = 0x1000000
-	RTCF_LOG                         = 0x2000000
-	RTCF_MASQ                        = 0x400000
-	RTCF_NAT                         = 0x800000
-	RTCF_VALVE                       = 0x200000
-	RTF_ADDRCLASSMASK                = 0xf8000000
-	RTF_ADDRCONF                     = 0x40000
-	RTF_ALLONLINK                    = 0x20000
-	RTF_BROADCAST                    = 0x10000000
-	RTF_CACHE                        = 0x1000000
-	RTF_DEFAULT                      = 0x10000
-	RTF_DYNAMIC                      = 0x10
-	RTF_FLOW                         = 0x2000000
-	RTF_GATEWAY                      = 0x2
-	RTF_HOST                         = 0x4
-	RTF_INTERFACE                    = 0x40000000
-	RTF_IRTT                         = 0x100
-	RTF_LINKRT                       = 0x100000
-	RTF_LOCAL                        = 0x80000000
-	RTF_MODIFIED                     = 0x20
-	RTF_MSS                          = 0x40
-	RTF_MTU                          = 0x40
-	RTF_MULTICAST                    = 0x20000000
-	RTF_NAT                          = 0x8000000
-	RTF_NOFORWARD                    = 0x1000
-	RTF_NONEXTHOP                    = 0x200000
-	RTF_NOPMTUDISC                   = 0x4000
-	RTF_POLICY                       = 0x4000000
-	RTF_REINSTATE                    = 0x8
-	RTF_REJECT                       = 0x200
-	RTF_STATIC                       = 0x400
-	RTF_THROW                        = 0x2000
-	RTF_UP                           = 0x1
-	RTF_WINDOW                       = 0x80
-	RTF_XRESOLVE                     = 0x800
-	RTM_BASE                         = 0x10
-	RTM_DELACTION                    = 0x31
-	RTM_DELADDR                      = 0x15
-	RTM_DELADDRLABEL                 = 0x49
-	RTM_DELLINK                      = 0x11
-	RTM_DELMDB                       = 0x55
-	RTM_DELNEIGH                     = 0x1d
-	RTM_DELQDISC                     = 0x25
-	RTM_DELROUTE                     = 0x19
-	RTM_DELRULE                      = 0x21
-	RTM_DELTCLASS                    = 0x29
-	RTM_DELTFILTER                   = 0x2d
-	RTM_F_CLONED                     = 0x200
-	RTM_F_EQUALIZE                   = 0x400
-	RTM_F_NOTIFY                     = 0x100
-	RTM_F_PREFIX                     = 0x800
-	RTM_GETACTION                    = 0x32
-	RTM_GETADDR                      = 0x16
-	RTM_GETADDRLABEL                 = 0x4a
-	RTM_GETANYCAST                   = 0x3e
-	RTM_GETDCB                       = 0x4e
-	RTM_GETLINK                      = 0x12
-	RTM_GETMDB                       = 0x56
-	RTM_GETMULTICAST                 = 0x3a
-	RTM_GETNEIGH                     = 0x1e
-	RTM_GETNEIGHTBL                  = 0x42
-	RTM_GETNETCONF                   = 0x52
-	RTM_GETQDISC                     = 0x26
-	RTM_GETROUTE                     = 0x1a
-	RTM_GETRULE                      = 0x22
-	RTM_GETTCLASS                    = 0x2a
-	RTM_GETTFILTER                   = 0x2e
-	RTM_MAX                          = 0x57
-	RTM_NEWACTION                    = 0x30
-	RTM_NEWADDR                      = 0x14
-	RTM_NEWADDRLABEL                 = 0x48
-	RTM_NEWLINK                      = 0x10
-	RTM_NEWMDB                       = 0x54
-	RTM_NEWNDUSEROPT                 = 0x44
-	RTM_NEWNEIGH                     = 0x1c
-	RTM_NEWNEIGHTBL                  = 0x40
-	RTM_NEWNETCONF                   = 0x50
-	RTM_NEWPREFIX                    = 0x34
-	RTM_NEWQDISC                     = 0x24
-	RTM_NEWROUTE                     = 0x18
-	RTM_NEWRULE                      = 0x20
-	RTM_NEWTCLASS                    = 0x28
-	RTM_NEWTFILTER                   = 0x2c
-	RTM_NR_FAMILIES                  = 0x12
-	RTM_NR_MSGTYPES                  = 0x48
-	RTM_SETDCB                       = 0x4f
-	RTM_SETLINK                      = 0x13
-	RTM_SETNEIGHTBL                  = 0x43
-	RTNH_ALIGNTO                     = 0x4
-	RTNH_F_DEAD                      = 0x1
-	RTNH_F_ONLINK                    = 0x4
-	RTNH_F_PERVASIVE                 = 0x2
-	RTN_MAX                          = 0xb
-	RTPROT_BIRD                      = 0xc
-	RTPROT_BOOT                      = 0x3
-	RTPROT_DHCP                      = 0x10
-	RTPROT_DNROUTED                  = 0xd
-	RTPROT_GATED                     = 0x8
-	RTPROT_KERNEL                    = 0x2
-	RTPROT_MROUTED                   = 0x11
-	RTPROT_MRT                       = 0xa
-	RTPROT_NTK                       = 0xf
-	RTPROT_RA                        = 0x9
-	RTPROT_REDIRECT                  = 0x1
-	RTPROT_STATIC                    = 0x4
-	RTPROT_UNSPEC                    = 0x0
-	RTPROT_XORP                      = 0xe
-	RTPROT_ZEBRA                     = 0xb
-	RT_CLASS_DEFAULT                 = 0xfd
-	RT_CLASS_LOCAL                   = 0xff
-	RT_CLASS_MAIN                    = 0xfe
-	RT_CLASS_MAX                     = 0xff
-	RT_CLASS_UNSPEC                  = 0x0
-	RUSAGE_CHILDREN                  = -0x1
-	RUSAGE_SELF                      = 0x0
-	RUSAGE_THREAD                    = 0x1
-	SCM_CREDENTIALS                  = 0x2
-	SCM_RIGHTS                       = 0x1
-	SCM_TIMESTAMP                    = 0x1d
-	SCM_TIMESTAMPING                 = 0x25
-	SCM_TIMESTAMPNS                  = 0x23
-	SCM_WIFI_STATUS                  = 0x29
-	SHUT_RD                          = 0x0
-	SHUT_RDWR                        = 0x2
-	SHUT_WR                          = 0x1
-	SIOCADDDLCI                      = 0x8980
-	SIOCADDMULTI                     = 0x8931
-	SIOCADDRT                        = 0x890b
-	SIOCATMARK                       = 0x8905
-	SIOCDARP                         = 0x8953
-	SIOCDELDLCI                      = 0x8981
-	SIOCDELMULTI                     = 0x8932
-	SIOCDELRT                        = 0x890c
-	SIOCDEVPRIVATE                   = 0x89f0
-	SIOCDIFADDR                      = 0x8936
-	SIOCDRARP                        = 0x8960
-	SIOCGARP                         = 0x8954
-	SIOCGIFADDR                      = 0x8915
-	SIOCGIFBR                        = 0x8940
-	SIOCGIFBRDADDR                   = 0x8919
-	SIOCGIFCONF                      = 0x8912
-	SIOCGIFCOUNT                     = 0x8938
-	SIOCGIFDSTADDR                   = 0x8917
-	SIOCGIFENCAP                     = 0x8925
-	SIOCGIFFLAGS                     = 0x8913
-	SIOCGIFHWADDR                    = 0x8927
-	SIOCGIFINDEX                     = 0x8933
-	SIOCGIFMAP                       = 0x8970
-	SIOCGIFMEM                       = 0x891f
-	SIOCGIFMETRIC                    = 0x891d
-	SIOCGIFMTU                       = 0x8921
-	SIOCGIFNAME                      = 0x8910
-	SIOCGIFNETMASK                   = 0x891b
-	SIOCGIFPFLAGS                    = 0x8935
-	SIOCGIFSLAVE                     = 0x8929
-	SIOCGIFTXQLEN                    = 0x8942
-	SIOCGPGRP                        = 0x8904
-	SIOCGRARP                        = 0x8961
-	SIOCGSTAMP                       = 0x8906
-	SIOCGSTAMPNS                     = 0x8907
-	SIOCPROTOPRIVATE                 = 0x89e0
-	SIOCRTMSG                        = 0x890d
-	SIOCSARP                         = 0x8955
-	SIOCSIFADDR                      = 0x8916
-	SIOCSIFBR                        = 0x8941
-	SIOCSIFBRDADDR                   = 0x891a
-	SIOCSIFDSTADDR                   = 0x8918
-	SIOCSIFENCAP                     = 0x8926
-	SIOCSIFFLAGS                     = 0x8914
-	SIOCSIFHWADDR                    = 0x8924
-	SIOCSIFHWBROADCAST               = 0x8937
-	SIOCSIFLINK                      = 0x8911
-	SIOCSIFMAP                       = 0x8971
-	SIOCSIFMEM                       = 0x8920
-	SIOCSIFMETRIC                    = 0x891e
-	SIOCSIFMTU                       = 0x8922
-	SIOCSIFNAME                      = 0x8923
-	SIOCSIFNETMASK                   = 0x891c
-	SIOCSIFPFLAGS                    = 0x8934
-	SIOCSIFSLAVE                     = 0x8930
-	SIOCSIFTXQLEN                    = 0x8943
-	SIOCSPGRP                        = 0x8902
-	SIOCSRARP                        = 0x8962
-	SOCK_CLOEXEC                     = 0x80000
-	SOCK_DCCP                        = 0x6
-	SOCK_DGRAM                       = 0x2
-	SOCK_NONBLOCK                    = 0x800
-	SOCK_PACKET                      = 0xa
-	SOCK_RAW                         = 0x3
-	SOCK_RDM                         = 0x4
-	SOCK_SEQPACKET                   = 0x5
-	SOCK_STREAM                      = 0x1
-	SOL_AAL                          = 0x109
-	SOL_ATM                          = 0x108
-	SOL_DECNET                       = 0x105
-	SOL_ICMPV6                       = 0x3a
-	SOL_IP                           = 0x0
-	SOL_IPV6                         = 0x29
-	SOL_IRDA                         = 0x10a
-	SOL_PACKET                       = 0x107
-	SOL_RAW                          = 0xff
-	SOL_SOCKET                       = 0x1
-	SOL_TCP                          = 0x6
-	SOL_X25                          = 0x106
-	SOMAXCONN                        = 0x80
-	SO_ACCEPTCONN                    = 0x1e
-	SO_ATTACH_FILTER                 = 0x1a
-	SO_BINDTODEVICE                  = 0x19
-	SO_BROADCAST                     = 0x6
-	SO_BSDCOMPAT                     = 0xe
-	SO_BUSY_POLL                     = 0x2e
-	SO_DEBUG                         = 0x1
-	SO_DETACH_FILTER                 = 0x1b
-	SO_DOMAIN                        = 0x27
-	SO_DONTROUTE                     = 0x5
-	SO_ERROR                         = 0x4
-	SO_GET_FILTER                    = 0x1a
-	SO_KEEPALIVE                     = 0x9
-	SO_LINGER                        = 0xd
-	SO_LOCK_FILTER                   = 0x2c
-	SO_MARK                          = 0x24
-	SO_MAX_PACING_RATE               = 0x2f
-	SO_NOFCS                         = 0x2b
-	SO_NO_CHECK                      = 0xb
-	SO_OOBINLINE                     = 0xa
-	SO_PASSCRED                      = 0x14
-	SO_PASSSEC                       = 0x22
-	SO_PEEK_OFF                      = 0x2a
-	SO_PEERCRED                      = 0x15
-	SO_PEERNAME                      = 0x1c
-	SO_PEERSEC                       = 0x1f
-	SO_PRIORITY                      = 0xc
-	SO_PROTOCOL                      = 0x26
-	SO_RCVBUF                        = 0x8
-	SO_RCVBUFFORCE                   = 0x21
-	SO_RCVLOWAT                      = 0x10
-	SO_RCVTIMEO                      = 0x12
-	SO_REUSEADDR                     = 0x2
-	SO_REUSEPORT                     = 0xf
-	SO_RXQ_OVFL                      = 0x28
-	SO_SECURITY_AUTHENTICATION       = 0x16
-	SO_SECURITY_ENCRYPTION_NETWORK   = 0x18
-	SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
-	SO_SELECT_ERR_QUEUE              = 0x2d
-	SO_SNDBUF                        = 0x7
-	SO_SNDBUFFORCE                   = 0x20
-	SO_SNDLOWAT                      = 0x11
-	SO_SNDTIMEO                      = 0x13
-	SO_TIMESTAMP                     = 0x1d
-	SO_TIMESTAMPING                  = 0x25
-	SO_TIMESTAMPNS                   = 0x23
-	SO_TYPE                          = 0x3
-	SO_WIFI_STATUS                   = 0x29
-	S_BLKSIZE                        = 0x200
-	S_IEXEC                          = 0x40
-	S_IFBLK                          = 0x6000
-	S_IFCHR                          = 0x2000
-	S_IFDIR                          = 0x4000
-	S_IFIFO                          = 0x1000
-	S_IFLNK                          = 0xa000
-	S_IFMT                           = 0xf000
-	S_IFREG                          = 0x8000
-	S_IFSOCK                         = 0xc000
-	S_IREAD                          = 0x100
-	S_IRGRP                          = 0x20
-	S_IROTH                          = 0x4
-	S_IRUSR                          = 0x100
-	S_IRWXG                          = 0x38
-	S_IRWXO                          = 0x7
-	S_IRWXU                          = 0x1c0
-	S_ISGID                          = 0x400
-	S_ISUID                          = 0x800
-	S_ISVTX                          = 0x200
-	S_IWGRP                          = 0x10
-	S_IWOTH                          = 0x2
-	S_IWRITE                         = 0x80
-	S_IWUSR                          = 0x80
-	S_IXGRP                          = 0x8
-	S_IXOTH                          = 0x1
-	S_IXUSR                          = 0x40
-	TCFLSH                           = 0x2000741f
-	TCIFLUSH                         = 0x0
-	TCIOFLUSH                        = 0x2
-	TCOFLUSH                         = 0x1
-	TCP_CONGESTION                   = 0xd
-	TCP_COOKIE_IN_ALWAYS             = 0x1
-	TCP_COOKIE_MAX                   = 0x10
-	TCP_COOKIE_MIN                   = 0x8
-	TCP_COOKIE_OUT_NEVER             = 0x2
-	TCP_COOKIE_PAIR_SIZE             = 0x20
-	TCP_COOKIE_TRANSACTIONS          = 0xf
-	TCP_CORK                         = 0x3
-	TCP_DEFER_ACCEPT                 = 0x9
-	TCP_FASTOPEN                     = 0x17
-	TCP_INFO                         = 0xb
-	TCP_KEEPCNT                      = 0x6
-	TCP_KEEPIDLE                     = 0x4
-	TCP_KEEPINTVL                    = 0x5
-	TCP_LINGER2                      = 0x8
-	TCP_MAXSEG                       = 0x2
-	TCP_MAXWIN                       = 0xffff
-	TCP_MAX_WINSHIFT                 = 0xe
-	TCP_MD5SIG                       = 0xe
-	TCP_MD5SIG_MAXKEYLEN             = 0x50
-	TCP_MSS                          = 0x200
-	TCP_MSS_DEFAULT                  = 0x218
-	TCP_MSS_DESIRED                  = 0x4c4
-	TCP_NODELAY                      = 0x1
-	TCP_QUEUE_SEQ                    = 0x15
-	TCP_QUICKACK                     = 0xc
-	TCP_REPAIR                       = 0x13
-	TCP_REPAIR_OPTIONS               = 0x16
-	TCP_REPAIR_QUEUE                 = 0x14
-	TCP_SYNCNT                       = 0x7
-	TCP_S_DATA_IN                    = 0x4
-	TCP_S_DATA_OUT                   = 0x8
-	TCP_THIN_DUPACK                  = 0x11
-	TCP_THIN_LINEAR_TIMEOUTS         = 0x10
-	TCP_TIMESTAMP                    = 0x18
-	TCP_USER_TIMEOUT                 = 0x12
-	TCP_WINDOW_CLAMP                 = 0xa
-	TCSAFLUSH                        = 0x2
-	TIOCCBRK                         = 0x5428
-	TIOCCONS                         = 0x541d
-	TIOCEXCL                         = 0x540c
-	TIOCGDEV                         = 0x40045432
-	TIOCGETC                         = 0x40067412
-	TIOCGETD                         = 0x5424
-	TIOCGETP                         = 0x40067408
-	TIOCGEXCL                        = 0x40045440
-	TIOCGICOUNT                      = 0x545d
-	TIOCGLCKTRMIOS                   = 0x5456
-	TIOCGLTC                         = 0x40067474
-	TIOCGPGRP                        = 0x40047477
-	TIOCGPKT                         = 0x40045438
-	TIOCGPTLCK                       = 0x40045439
-	TIOCGPTN                         = 0x40045430
-	TIOCGRS485                       = 0x542e
-	TIOCGSERIAL                      = 0x541e
-	TIOCGSID                         = 0x5429
-	TIOCGSOFTCAR                     = 0x5419
-	TIOCGWINSZ                       = 0x40087468
-	TIOCINQ                          = 0x4004667f
-	TIOCLINUX                        = 0x541c
-	TIOCMBIC                         = 0x5417
-	TIOCMBIS                         = 0x5416
-	TIOCMGET                         = 0x5415
-	TIOCMIWAIT                       = 0x545c
-	TIOCMSET                         = 0x5418
-	TIOCM_CAR                        = 0x40
-	TIOCM_CD                         = 0x40
-	TIOCM_CTS                        = 0x20
-	TIOCM_DSR                        = 0x100
-	TIOCM_DTR                        = 0x2
-	TIOCM_LE                         = 0x1
-	TIOCM_LOOP                       = 0x8000
-	TIOCM_OUT1                       = 0x2000
-	TIOCM_OUT2                       = 0x4000
-	TIOCM_RI                         = 0x80
-	TIOCM_RNG                        = 0x80
-	TIOCM_RTS                        = 0x4
-	TIOCM_SR                         = 0x10
-	TIOCM_ST                         = 0x8
-	TIOCNOTTY                        = 0x5422
-	TIOCNXCL                         = 0x540d
-	TIOCOUTQ                         = 0x40047473
-	TIOCPKT                          = 0x5420
-	TIOCPKT_DATA                     = 0x0
-	TIOCPKT_DOSTOP                   = 0x20
-	TIOCPKT_FLUSHREAD                = 0x1
-	TIOCPKT_FLUSHWRITE               = 0x2
-	TIOCPKT_IOCTL                    = 0x40
-	TIOCPKT_NOSTOP                   = 0x10
-	TIOCPKT_START                    = 0x8
-	TIOCPKT_STOP                     = 0x4
-	TIOCSBRK                         = 0x5427
-	TIOCSCTTY                        = 0x540e
-	TIOCSERCONFIG                    = 0x5453
-	TIOCSERGETLSR                    = 0x5459
-	TIOCSERGETMULTI                  = 0x545a
-	TIOCSERGSTRUCT                   = 0x5458
-	TIOCSERGWILD                     = 0x5454
-	TIOCSERSETMULTI                  = 0x545b
-	TIOCSERSWILD                     = 0x5455
-	TIOCSER_TEMT                     = 0x1
-	TIOCSETC                         = 0x80067411
-	TIOCSETD                         = 0x5423
-	TIOCSETN                         = 0x8006740a
-	TIOCSETP                         = 0x80067409
-	TIOCSIG                          = 0x80045436
-	TIOCSLCKTRMIOS                   = 0x5457
-	TIOCSLTC                         = 0x80067475
-	TIOCSPGRP                        = 0x80047476
-	TIOCSPTLCK                       = 0x80045431
-	TIOCSRS485                       = 0x542f
-	TIOCSSERIAL                      = 0x541f
-	TIOCSSOFTCAR                     = 0x541a
-	TIOCSTART                        = 0x2000746e
-	TIOCSTI                          = 0x5412
-	TIOCSTOP                         = 0x2000746f
-	TIOCSWINSZ                       = 0x80087467
-	TIOCVHANGUP                      = 0x5437
-	TOSTOP                           = 0x400000
-	TUNATTACHFILTER                  = 0x801054d5
-	TUNDETACHFILTER                  = 0x801054d6
-	TUNGETFEATURES                   = 0x400454cf
-	TUNGETFILTER                     = 0x401054db
-	TUNGETIFF                        = 0x400454d2
-	TUNGETSNDBUF                     = 0x400454d3
-	TUNGETVNETHDRSZ                  = 0x400454d7
-	TUNSETDEBUG                      = 0x800454c9
-	TUNSETGROUP                      = 0x800454ce
-	TUNSETIFF                        = 0x800454ca
-	TUNSETIFINDEX                    = 0x800454da
-	TUNSETLINK                       = 0x800454cd
-	TUNSETNOCSUM                     = 0x800454c8
-	TUNSETOFFLOAD                    = 0x800454d0
-	TUNSETOWNER                      = 0x800454cc
-	TUNSETPERSIST                    = 0x800454cb
-	TUNSETQUEUE                      = 0x800454d9
-	TUNSETSNDBUF                     = 0x800454d4
-	TUNSETTXFILTER                   = 0x800454d1
-	TUNSETVNETHDRSZ                  = 0x800454d8
-	VDISCARD                         = 0x10
-	VEOF                             = 0x4
-	VEOL                             = 0x6
-	VEOL2                            = 0x8
-	VERASE                           = 0x2
-	VINTR                            = 0x0
-	VKILL                            = 0x3
-	VLNEXT                           = 0xf
-	VMIN                             = 0x5
-	VQUIT                            = 0x1
-	VREPRINT                         = 0xb
-	VSTART                           = 0xd
-	VSTOP                            = 0xe
-	VSUSP                            = 0xc
-	VSWTC                            = 0x9
-	VT0                              = 0x0
-	VT1                              = 0x10000
-	VTDLY                            = 0x10000
-	VTIME                            = 0x7
-	VWERASE                          = 0xa
-	WALL                             = 0x40000000
-	WCLONE                           = 0x80000000
-	WCONTINUED                       = 0x8
-	WEXITED                          = 0x4
-	WNOHANG                          = 0x1
-	WNOTHREAD                        = 0x20000000
-	WNOWAIT                          = 0x1000000
-	WORDSIZE                         = 0x40
-	WSTOPPED                         = 0x2
-	WUNTRACED                        = 0x2
-)
-
-// Errors
-const (
-	E2BIG           = Errno(0x7)
-	EACCES          = Errno(0xd)
-	EADDRINUSE      = Errno(0x62)
-	EADDRNOTAVAIL   = Errno(0x63)
-	EADV            = Errno(0x44)
-	EAFNOSUPPORT    = Errno(0x61)
-	EAGAIN          = Errno(0xb)
-	EALREADY        = Errno(0x72)
-	EBADE           = Errno(0x34)
-	EBADF           = Errno(0x9)
-	EBADFD          = Errno(0x4d)
-	EBADMSG         = Errno(0x4a)
-	EBADR           = Errno(0x35)
-	EBADRQC         = Errno(0x38)
-	EBADSLT         = Errno(0x39)
-	EBFONT          = Errno(0x3b)
-	EBUSY           = Errno(0x10)
-	ECANCELED       = Errno(0x7d)
-	ECHILD          = Errno(0xa)
-	ECHRNG          = Errno(0x2c)
-	ECOMM           = Errno(0x46)
-	ECONNABORTED    = Errno(0x67)
-	ECONNREFUSED    = Errno(0x6f)
-	ECONNRESET      = Errno(0x68)
-	EDEADLK         = Errno(0x23)
-	EDEADLOCK       = Errno(0x3a)
-	EDESTADDRREQ    = Errno(0x59)
-	EDOM            = Errno(0x21)
-	EDOTDOT         = Errno(0x49)
-	EDQUOT          = Errno(0x7a)
-	EEXIST          = Errno(0x11)
-	EFAULT          = Errno(0xe)
-	EFBIG           = Errno(0x1b)
-	EHOSTDOWN       = Errno(0x70)
-	EHOSTUNREACH    = Errno(0x71)
-	EHWPOISON       = Errno(0x85)
-	EIDRM           = Errno(0x2b)
-	EILSEQ          = Errno(0x54)
-	EINPROGRESS     = Errno(0x73)
-	EINTR           = Errno(0x4)
-	EINVAL          = Errno(0x16)
-	EIO             = Errno(0x5)
-	EISCONN         = Errno(0x6a)
-	EISDIR          = Errno(0x15)
-	EISNAM          = Errno(0x78)
-	EKEYEXPIRED     = Errno(0x7f)
-	EKEYREJECTED    = Errno(0x81)
-	EKEYREVOKED     = Errno(0x80)
-	EL2HLT          = Errno(0x33)
-	EL2NSYNC        = Errno(0x2d)
-	EL3HLT          = Errno(0x2e)
-	EL3RST          = Errno(0x2f)
-	ELIBACC         = Errno(0x4f)
-	ELIBBAD         = Errno(0x50)
-	ELIBEXEC        = Errno(0x53)
-	ELIBMAX         = Errno(0x52)
-	ELIBSCN         = Errno(0x51)
-	ELNRNG          = Errno(0x30)
-	ELOOP           = Errno(0x28)
-	EMEDIUMTYPE     = Errno(0x7c)
-	EMFILE          = Errno(0x18)
-	EMLINK          = Errno(0x1f)
-	EMSGSIZE        = Errno(0x5a)
-	EMULTIHOP       = Errno(0x48)
-	ENAMETOOLONG    = Errno(0x24)
-	ENAVAIL         = Errno(0x77)
-	ENETDOWN        = Errno(0x64)
-	ENETRESET       = Errno(0x66)
-	ENETUNREACH     = Errno(0x65)
-	ENFILE          = Errno(0x17)
-	ENOANO          = Errno(0x37)
-	ENOBUFS         = Errno(0x69)
-	ENOCSI          = Errno(0x32)
-	ENODATA         = Errno(0x3d)
-	ENODEV          = Errno(0x13)
-	ENOENT          = Errno(0x2)
-	ENOEXEC         = Errno(0x8)
-	ENOKEY          = Errno(0x7e)
-	ENOLCK          = Errno(0x25)
-	ENOLINK         = Errno(0x43)
-	ENOMEDIUM       = Errno(0x7b)
-	ENOMEM          = Errno(0xc)
-	ENOMSG          = Errno(0x2a)
-	ENONET          = Errno(0x40)
-	ENOPKG          = Errno(0x41)
-	ENOPROTOOPT     = Errno(0x5c)
-	ENOSPC          = Errno(0x1c)
-	ENOSR           = Errno(0x3f)
-	ENOSTR          = Errno(0x3c)
-	ENOSYS          = Errno(0x26)
-	ENOTBLK         = Errno(0xf)
-	ENOTCONN        = Errno(0x6b)
-	ENOTDIR         = Errno(0x14)
-	ENOTEMPTY       = Errno(0x27)
-	ENOTNAM         = Errno(0x76)
-	ENOTRECOVERABLE = Errno(0x83)
-	ENOTSOCK        = Errno(0x58)
-	ENOTSUP         = Errno(0x5f)
-	ENOTTY          = Errno(0x19)
-	ENOTUNIQ        = Errno(0x4c)
-	ENXIO           = Errno(0x6)
-	EOPNOTSUPP      = Errno(0x5f)
-	EOVERFLOW       = Errno(0x4b)
-	EOWNERDEAD      = Errno(0x82)
-	EPERM           = Errno(0x1)
-	EPFNOSUPPORT    = Errno(0x60)
-	EPIPE           = Errno(0x20)
-	EPROTO          = Errno(0x47)
-	EPROTONOSUPPORT = Errno(0x5d)
-	EPROTOTYPE      = Errno(0x5b)
-	ERANGE          = Errno(0x22)
-	EREMCHG         = Errno(0x4e)
-	EREMOTE         = Errno(0x42)
-	EREMOTEIO       = Errno(0x79)
-	ERESTART        = Errno(0x55)
-	ERFKILL         = Errno(0x84)
-	EROFS           = Errno(0x1e)
-	ESHUTDOWN       = Errno(0x6c)
-	ESOCKTNOSUPPORT = Errno(0x5e)
-	ESPIPE          = Errno(0x1d)
-	ESRCH           = Errno(0x3)
-	ESRMNT          = Errno(0x45)
-	ESTALE          = Errno(0x74)
-	ESTRPIPE        = Errno(0x56)
-	ETIME           = Errno(0x3e)
-	ETIMEDOUT       = Errno(0x6e)
-	ETOOMANYREFS    = Errno(0x6d)
-	ETXTBSY         = Errno(0x1a)
-	EUCLEAN         = Errno(0x75)
-	EUNATCH         = Errno(0x31)
-	EUSERS          = Errno(0x57)
-	EWOULDBLOCK     = Errno(0xb)
-	EXDEV           = Errno(0x12)
-	EXFULL          = Errno(0x36)
-)
-
-// Signals
-const (
-	SIGABRT   = Signal(0x6)
-	SIGALRM   = Signal(0xe)
-	SIGBUS    = Signal(0x7)
-	SIGCHLD   = Signal(0x11)
-	SIGCLD    = Signal(0x11)
-	SIGCONT   = Signal(0x12)
-	SIGFPE    = Signal(0x8)
-	SIGHUP    = Signal(0x1)
-	SIGILL    = Signal(0x4)
-	SIGINT    = Signal(0x2)
-	SIGIO     = Signal(0x1d)
-	SIGIOT    = Signal(0x6)
-	SIGKILL   = Signal(0x9)
-	SIGPIPE   = Signal(0xd)
-	SIGPOLL   = Signal(0x1d)
-	SIGPROF   = Signal(0x1b)
-	SIGPWR    = Signal(0x1e)
-	SIGQUIT   = Signal(0x3)
-	SIGSEGV   = Signal(0xb)
-	SIGSTKFLT = Signal(0x10)
-	SIGSTOP   = Signal(0x13)
-	SIGSYS    = Signal(0x1f)
-	SIGTERM   = Signal(0xf)
-	SIGTRAP   = Signal(0x5)
-	SIGTSTP   = Signal(0x14)
-	SIGTTIN   = Signal(0x15)
-	SIGTTOU   = Signal(0x16)
-	SIGUNUSED = Signal(0x1f)
-	SIGURG    = Signal(0x17)
-	SIGUSR1   = Signal(0xa)
-	SIGUSR2   = Signal(0xc)
-	SIGVTALRM = Signal(0x1a)
-	SIGWINCH  = Signal(0x1c)
-	SIGXCPU   = Signal(0x18)
-	SIGXFSZ   = Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:   "operation not permitted",
-	2:   "no such file or directory",
-	3:   "no such process",
-	4:   "interrupted system call",
-	5:   "input/output error",
-	6:   "no such device or address",
-	7:   "argument list too long",
-	8:   "exec format error",
-	9:   "bad file descriptor",
-	10:  "no child processes",
-	11:  "resource temporarily unavailable",
-	12:  "cannot allocate memory",
-	13:  "permission denied",
-	14:  "bad address",
-	15:  "block device required",
-	16:  "device or resource busy",
-	17:  "file exists",
-	18:  "invalid cross-device link",
-	19:  "no such device",
-	20:  "not a directory",
-	21:  "is a directory",
-	22:  "invalid argument",
-	23:  "too many open files in system",
-	24:  "too many open files",
-	25:  "inappropriate ioctl for device",
-	26:  "text file busy",
-	27:  "file too large",
-	28:  "no space left on device",
-	29:  "illegal seek",
-	30:  "read-only file system",
-	31:  "too many links",
-	32:  "broken pipe",
-	33:  "numerical argument out of domain",
-	34:  "numerical result out of range",
-	35:  "resource deadlock avoided",
-	36:  "file name too long",
-	37:  "no locks available",
-	38:  "function not implemented",
-	39:  "directory not empty",
-	40:  "too many levels of symbolic links",
-	42:  "no message of desired type",
-	43:  "identifier removed",
-	44:  "channel number out of range",
-	45:  "level 2 not synchronized",
-	46:  "level 3 halted",
-	47:  "level 3 reset",
-	48:  "link number out of range",
-	49:  "protocol driver not attached",
-	50:  "no CSI structure available",
-	51:  "level 2 halted",
-	52:  "invalid exchange",
-	53:  "invalid request descriptor",
-	54:  "exchange full",
-	55:  "no anode",
-	56:  "invalid request code",
-	57:  "invalid slot",
-	58:  "file locking deadlock error",
-	59:  "bad font file format",
-	60:  "device not a stream",
-	61:  "no data available",
-	62:  "timer expired",
-	63:  "out of streams resources",
-	64:  "machine is not on the network",
-	65:  "package not installed",
-	66:  "object is remote",
-	67:  "link has been severed",
-	68:  "advertise error",
-	69:  "srmount error",
-	70:  "communication error on send",
-	71:  "protocol error",
-	72:  "multihop attempted",
-	73:  "RFS specific error",
-	74:  "bad message",
-	75:  "value too large for defined data type",
-	76:  "name not unique on network",
-	77:  "file descriptor in bad state",
-	78:  "remote address changed",
-	79:  "can not access a needed shared library",
-	80:  "accessing a corrupted shared library",
-	81:  ".lib section in a.out corrupted",
-	82:  "attempting to link in too many shared libraries",
-	83:  "cannot exec a shared library directly",
-	84:  "invalid or incomplete multibyte or wide character",
-	85:  "interrupted system call should be restarted",
-	86:  "streams pipe error",
-	87:  "too many users",
-	88:  "socket operation on non-socket",
-	89:  "destination address required",
-	90:  "message too long",
-	91:  "protocol wrong type for socket",
-	92:  "protocol not available",
-	93:  "protocol not supported",
-	94:  "socket type not supported",
-	95:  "operation not supported",
-	96:  "protocol family not supported",
-	97:  "address family not supported by protocol",
-	98:  "address already in use",
-	99:  "cannot assign requested address",
-	100: "network is down",
-	101: "network is unreachable",
-	102: "network dropped connection on reset",
-	103: "software caused connection abort",
-	104: "connection reset by peer",
-	105: "no buffer space available",
-	106: "transport endpoint is already connected",
-	107: "transport endpoint is not connected",
-	108: "cannot send after transport endpoint shutdown",
-	109: "too many references: cannot splice",
-	110: "connection timed out",
-	111: "connection refused",
-	112: "host is down",
-	113: "no route to host",
-	114: "operation already in progress",
-	115: "operation now in progress",
-	116: "stale file handle",
-	117: "structure needs cleaning",
-	118: "not a XENIX named type file",
-	119: "no XENIX semaphores available",
-	120: "is a named type file",
-	121: "remote I/O error",
-	122: "disk quota exceeded",
-	123: "no medium found",
-	124: "wrong medium type",
-	125: "operation canceled",
-	126: "required key not available",
-	127: "key has expired",
-	128: "key has been revoked",
-	129: "key was rejected by service",
-	130: "owner died",
-	131: "state not recoverable",
-	132: "operation not possible due to RF-kill",
-	133: "memory page has hardware error",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/breakpoint trap",
-	6:  "aborted",
-	7:  "bus error",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "user defined signal 1",
-	11: "segmentation fault",
-	12: "user defined signal 2",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "stack fault",
-	17: "child exited",
-	18: "continued",
-	19: "stopped (signal)",
-	20: "stopped",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "urgent I/O condition",
-	24: "CPU time limit exceeded",
-	25: "file size limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window changed",
-	29: "I/O possible",
-	30: "power failure",
-	31: "bad system call",
-}
diff --git a/src/syscall/zerrors_openbsd_arm.go b/src/syscall/zerrors_openbsd_arm.go
deleted file mode 100644
index c49ebcf..0000000
--- a/src/syscall/zerrors_openbsd_arm.go
+++ /dev/null
@@ -1,1584 +0,0 @@
-// mkerrors.sh
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- _const.go
-
-// +build arm,openbsd
-
-package syscall
-
-const (
-	AF_APPLETALK                      = 0x10
-	AF_BLUETOOTH                      = 0x20
-	AF_CCITT                          = 0xa
-	AF_CHAOS                          = 0x5
-	AF_CNT                            = 0x15
-	AF_COIP                           = 0x14
-	AF_DATAKIT                        = 0x9
-	AF_DECnet                         = 0xc
-	AF_DLI                            = 0xd
-	AF_E164                           = 0x1a
-	AF_ECMA                           = 0x8
-	AF_ENCAP                          = 0x1c
-	AF_HYLINK                         = 0xf
-	AF_IMPLINK                        = 0x3
-	AF_INET                           = 0x2
-	AF_INET6                          = 0x18
-	AF_IPX                            = 0x17
-	AF_ISDN                           = 0x1a
-	AF_ISO                            = 0x7
-	AF_KEY                            = 0x1e
-	AF_LAT                            = 0xe
-	AF_LINK                           = 0x12
-	AF_LOCAL                          = 0x1
-	AF_MAX                            = 0x24
-	AF_MPLS                           = 0x21
-	AF_NATM                           = 0x1b
-	AF_NS                             = 0x6
-	AF_OSI                            = 0x7
-	AF_PUP                            = 0x4
-	AF_ROUTE                          = 0x11
-	AF_SIP                            = 0x1d
-	AF_SNA                            = 0xb
-	AF_UNIX                           = 0x1
-	AF_UNSPEC                         = 0x0
-	ARPHRD_ETHER                      = 0x1
-	ARPHRD_FRELAY                     = 0xf
-	ARPHRD_IEEE1394                   = 0x18
-	ARPHRD_IEEE802                    = 0x6
-	B0                                = 0x0
-	B110                              = 0x6e
-	B115200                           = 0x1c200
-	B1200                             = 0x4b0
-	B134                              = 0x86
-	B14400                            = 0x3840
-	B150                              = 0x96
-	B1800                             = 0x708
-	B19200                            = 0x4b00
-	B200                              = 0xc8
-	B230400                           = 0x38400
-	B2400                             = 0x960
-	B28800                            = 0x7080
-	B300                              = 0x12c
-	B38400                            = 0x9600
-	B4800                             = 0x12c0
-	B50                               = 0x32
-	B57600                            = 0xe100
-	B600                              = 0x258
-	B7200                             = 0x1c20
-	B75                               = 0x4b
-	B76800                            = 0x12c00
-	B9600                             = 0x2580
-	BIOCFLUSH                         = 0x20004268
-	BIOCGBLEN                         = 0x40044266
-	BIOCGDIRFILT                      = 0x4004427c
-	BIOCGDLT                          = 0x4004426a
-	BIOCGDLTLIST                      = 0xc008427b
-	BIOCGETIF                         = 0x4020426b
-	BIOCGFILDROP                      = 0x40044278
-	BIOCGHDRCMPLT                     = 0x40044274
-	BIOCGRSIG                         = 0x40044273
-	BIOCGRTIMEOUT                     = 0x400c426e
-	BIOCGSTATS                        = 0x4008426f
-	BIOCIMMEDIATE                     = 0x80044270
-	BIOCLOCK                          = 0x20004276
-	BIOCPROMISC                       = 0x20004269
-	BIOCSBLEN                         = 0xc0044266
-	BIOCSDIRFILT                      = 0x8004427d
-	BIOCSDLT                          = 0x8004427a
-	BIOCSETF                          = 0x80084267
-	BIOCSETIF                         = 0x8020426c
-	BIOCSETWF                         = 0x80084277
-	BIOCSFILDROP                      = 0x80044279
-	BIOCSHDRCMPLT                     = 0x80044275
-	BIOCSRSIG                         = 0x80044272
-	BIOCSRTIMEOUT                     = 0x800c426d
-	BIOCVERSION                       = 0x40044271
-	BPF_A                             = 0x10
-	BPF_ABS                           = 0x20
-	BPF_ADD                           = 0x0
-	BPF_ALIGNMENT                     = 0x4
-	BPF_ALU                           = 0x4
-	BPF_AND                           = 0x50
-	BPF_B                             = 0x10
-	BPF_DIRECTION_IN                  = 0x1
-	BPF_DIRECTION_OUT                 = 0x2
-	BPF_DIV                           = 0x30
-	BPF_H                             = 0x8
-	BPF_IMM                           = 0x0
-	BPF_IND                           = 0x40
-	BPF_JA                            = 0x0
-	BPF_JEQ                           = 0x10
-	BPF_JGE                           = 0x30
-	BPF_JGT                           = 0x20
-	BPF_JMP                           = 0x5
-	BPF_JSET                          = 0x40
-	BPF_K                             = 0x0
-	BPF_LD                            = 0x0
-	BPF_LDX                           = 0x1
-	BPF_LEN                           = 0x80
-	BPF_LSH                           = 0x60
-	BPF_MAJOR_VERSION                 = 0x1
-	BPF_MAXBUFSIZE                    = 0x200000
-	BPF_MAXINSNS                      = 0x200
-	BPF_MEM                           = 0x60
-	BPF_MEMWORDS                      = 0x10
-	BPF_MINBUFSIZE                    = 0x20
-	BPF_MINOR_VERSION                 = 0x1
-	BPF_MISC                          = 0x7
-	BPF_MSH                           = 0xa0
-	BPF_MUL                           = 0x20
-	BPF_NEG                           = 0x80
-	BPF_OR                            = 0x40
-	BPF_RELEASE                       = 0x30bb6
-	BPF_RET                           = 0x6
-	BPF_RSH                           = 0x70
-	BPF_ST                            = 0x2
-	BPF_STX                           = 0x3
-	BPF_SUB                           = 0x10
-	BPF_TAX                           = 0x0
-	BPF_TXA                           = 0x80
-	BPF_W                             = 0x0
-	BPF_X                             = 0x8
-	BRKINT                            = 0x2
-	CFLUSH                            = 0xf
-	CLOCAL                            = 0x8000
-	CREAD                             = 0x800
-	CS5                               = 0x0
-	CS6                               = 0x100
-	CS7                               = 0x200
-	CS8                               = 0x300
-	CSIZE                             = 0x300
-	CSTART                            = 0x11
-	CSTATUS                           = 0xff
-	CSTOP                             = 0x13
-	CSTOPB                            = 0x400
-	CSUSP                             = 0x1a
-	CTL_MAXNAME                       = 0xc
-	CTL_NET                           = 0x4
-	DIOCOSFPFLUSH                     = 0x2000444e
-	DLT_ARCNET                        = 0x7
-	DLT_ATM_RFC1483                   = 0xb
-	DLT_AX25                          = 0x3
-	DLT_CHAOS                         = 0x5
-	DLT_C_HDLC                        = 0x68
-	DLT_EN10MB                        = 0x1
-	DLT_EN3MB                         = 0x2
-	DLT_ENC                           = 0xd
-	DLT_FDDI                          = 0xa
-	DLT_IEEE802                       = 0x6
-	DLT_IEEE802_11                    = 0x69
-	DLT_IEEE802_11_RADIO              = 0x7f
-	DLT_LOOP                          = 0xc
-	DLT_MPLS                          = 0xdb
-	DLT_NULL                          = 0x0
-	DLT_PFLOG                         = 0x75
-	DLT_PFSYNC                        = 0x12
-	DLT_PPP                           = 0x9
-	DLT_PPP_BSDOS                     = 0x10
-	DLT_PPP_ETHER                     = 0x33
-	DLT_PPP_SERIAL                    = 0x32
-	DLT_PRONET                        = 0x4
-	DLT_RAW                           = 0xe
-	DLT_SLIP                          = 0x8
-	DLT_SLIP_BSDOS                    = 0xf
-	DT_BLK                            = 0x6
-	DT_CHR                            = 0x2
-	DT_DIR                            = 0x4
-	DT_FIFO                           = 0x1
-	DT_LNK                            = 0xa
-	DT_REG                            = 0x8
-	DT_SOCK                           = 0xc
-	DT_UNKNOWN                        = 0x0
-	ECHO                              = 0x8
-	ECHOCTL                           = 0x40
-	ECHOE                             = 0x2
-	ECHOK                             = 0x4
-	ECHOKE                            = 0x1
-	ECHONL                            = 0x10
-	ECHOPRT                           = 0x20
-	EMT_TAGOVF                        = 0x1
-	EMUL_ENABLED                      = 0x1
-	EMUL_NATIVE                       = 0x2
-	ENDRUNDISC                        = 0x9
-	ETHERMIN                          = 0x2e
-	ETHERMTU                          = 0x5dc
-	ETHERTYPE_8023                    = 0x4
-	ETHERTYPE_AARP                    = 0x80f3
-	ETHERTYPE_ACCTON                  = 0x8390
-	ETHERTYPE_AEONIC                  = 0x8036
-	ETHERTYPE_ALPHA                   = 0x814a
-	ETHERTYPE_AMBER                   = 0x6008
-	ETHERTYPE_AMOEBA                  = 0x8145
-	ETHERTYPE_AOE                     = 0x88a2
-	ETHERTYPE_APOLLO                  = 0x80f7
-	ETHERTYPE_APOLLODOMAIN            = 0x8019
-	ETHERTYPE_APPLETALK               = 0x809b
-	ETHERTYPE_APPLITEK                = 0x80c7
-	ETHERTYPE_ARGONAUT                = 0x803a
-	ETHERTYPE_ARP                     = 0x806
-	ETHERTYPE_AT                      = 0x809b
-	ETHERTYPE_ATALK                   = 0x809b
-	ETHERTYPE_ATOMIC                  = 0x86df
-	ETHERTYPE_ATT                     = 0x8069
-	ETHERTYPE_ATTSTANFORD             = 0x8008
-	ETHERTYPE_AUTOPHON                = 0x806a
-	ETHERTYPE_AXIS                    = 0x8856
-	ETHERTYPE_BCLOOP                  = 0x9003
-	ETHERTYPE_BOFL                    = 0x8102
-	ETHERTYPE_CABLETRON               = 0x7034
-	ETHERTYPE_CHAOS                   = 0x804
-	ETHERTYPE_COMDESIGN               = 0x806c
-	ETHERTYPE_COMPUGRAPHIC            = 0x806d
-	ETHERTYPE_COUNTERPOINT            = 0x8062
-	ETHERTYPE_CRONUS                  = 0x8004
-	ETHERTYPE_CRONUSVLN               = 0x8003
-	ETHERTYPE_DCA                     = 0x1234
-	ETHERTYPE_DDE                     = 0x807b
-	ETHERTYPE_DEBNI                   = 0xaaaa
-	ETHERTYPE_DECAM                   = 0x8048
-	ETHERTYPE_DECCUST                 = 0x6006
-	ETHERTYPE_DECDIAG                 = 0x6005
-	ETHERTYPE_DECDNS                  = 0x803c
-	ETHERTYPE_DECDTS                  = 0x803e
-	ETHERTYPE_DECEXPER                = 0x6000
-	ETHERTYPE_DECLAST                 = 0x8041
-	ETHERTYPE_DECLTM                  = 0x803f
-	ETHERTYPE_DECMUMPS                = 0x6009
-	ETHERTYPE_DECNETBIOS              = 0x8040
-	ETHERTYPE_DELTACON                = 0x86de
-	ETHERTYPE_DIDDLE                  = 0x4321
-	ETHERTYPE_DLOG1                   = 0x660
-	ETHERTYPE_DLOG2                   = 0x661
-	ETHERTYPE_DN                      = 0x6003
-	ETHERTYPE_DOGFIGHT                = 0x1989
-	ETHERTYPE_DSMD                    = 0x8039
-	ETHERTYPE_ECMA                    = 0x803
-	ETHERTYPE_ENCRYPT                 = 0x803d
-	ETHERTYPE_ES                      = 0x805d
-	ETHERTYPE_EXCELAN                 = 0x8010
-	ETHERTYPE_EXPERDATA               = 0x8049
-	ETHERTYPE_FLIP                    = 0x8146
-	ETHERTYPE_FLOWCONTROL             = 0x8808
-	ETHERTYPE_FRARP                   = 0x808
-	ETHERTYPE_GENDYN                  = 0x8068
-	ETHERTYPE_HAYES                   = 0x8130
-	ETHERTYPE_HIPPI_FP                = 0x8180
-	ETHERTYPE_HITACHI                 = 0x8820
-	ETHERTYPE_HP                      = 0x8005
-	ETHERTYPE_IEEEPUP                 = 0xa00
-	ETHERTYPE_IEEEPUPAT               = 0xa01
-	ETHERTYPE_IMLBL                   = 0x4c42
-	ETHERTYPE_IMLBLDIAG               = 0x424c
-	ETHERTYPE_IP                      = 0x800
-	ETHERTYPE_IPAS                    = 0x876c
-	ETHERTYPE_IPV6                    = 0x86dd
-	ETHERTYPE_IPX                     = 0x8137
-	ETHERTYPE_IPXNEW                  = 0x8037
-	ETHERTYPE_KALPANA                 = 0x8582
-	ETHERTYPE_LANBRIDGE               = 0x8038
-	ETHERTYPE_LANPROBE                = 0x8888
-	ETHERTYPE_LAT                     = 0x6004
-	ETHERTYPE_LBACK                   = 0x9000
-	ETHERTYPE_LITTLE                  = 0x8060
-	ETHERTYPE_LLDP                    = 0x88cc
-	ETHERTYPE_LOGICRAFT               = 0x8148
-	ETHERTYPE_LOOPBACK                = 0x9000
-	ETHERTYPE_MATRA                   = 0x807a
-	ETHERTYPE_MAX                     = 0xffff
-	ETHERTYPE_MERIT                   = 0x807c
-	ETHERTYPE_MICP                    = 0x873a
-	ETHERTYPE_MOPDL                   = 0x6001
-	ETHERTYPE_MOPRC                   = 0x6002
-	ETHERTYPE_MOTOROLA                = 0x818d
-	ETHERTYPE_MPLS                    = 0x8847
-	ETHERTYPE_MPLS_MCAST              = 0x8848
-	ETHERTYPE_MUMPS                   = 0x813f
-	ETHERTYPE_NBPCC                   = 0x3c04
-	ETHERTYPE_NBPCLAIM                = 0x3c09
-	ETHERTYPE_NBPCLREQ                = 0x3c05
-	ETHERTYPE_NBPCLRSP                = 0x3c06
-	ETHERTYPE_NBPCREQ                 = 0x3c02
-	ETHERTYPE_NBPCRSP                 = 0x3c03
-	ETHERTYPE_NBPDG                   = 0x3c07
-	ETHERTYPE_NBPDGB                  = 0x3c08
-	ETHERTYPE_NBPDLTE                 = 0x3c0a
-	ETHERTYPE_NBPRAR                  = 0x3c0c
-	ETHERTYPE_NBPRAS                  = 0x3c0b
-	ETHERTYPE_NBPRST                  = 0x3c0d
-	ETHERTYPE_NBPSCD                  = 0x3c01
-	ETHERTYPE_NBPVCD                  = 0x3c00
-	ETHERTYPE_NBS                     = 0x802
-	ETHERTYPE_NCD                     = 0x8149
-	ETHERTYPE_NESTAR                  = 0x8006
-	ETHERTYPE_NETBEUI                 = 0x8191
-	ETHERTYPE_NOVELL                  = 0x8138
-	ETHERTYPE_NS                      = 0x600
-	ETHERTYPE_NSAT                    = 0x601
-	ETHERTYPE_NSCOMPAT                = 0x807
-	ETHERTYPE_NTRAILER                = 0x10
-	ETHERTYPE_OS9                     = 0x7007
-	ETHERTYPE_OS9NET                  = 0x7009
-	ETHERTYPE_PACER                   = 0x80c6
-	ETHERTYPE_PAE                     = 0x888e
-	ETHERTYPE_PCS                     = 0x4242
-	ETHERTYPE_PLANNING                = 0x8044
-	ETHERTYPE_PPP                     = 0x880b
-	ETHERTYPE_PPPOE                   = 0x8864
-	ETHERTYPE_PPPOEDISC               = 0x8863
-	ETHERTYPE_PRIMENTS                = 0x7031
-	ETHERTYPE_PUP                     = 0x200
-	ETHERTYPE_PUPAT                   = 0x200
-	ETHERTYPE_QINQ                    = 0x88a8
-	ETHERTYPE_RACAL                   = 0x7030
-	ETHERTYPE_RATIONAL                = 0x8150
-	ETHERTYPE_RAWFR                   = 0x6559
-	ETHERTYPE_RCL                     = 0x1995
-	ETHERTYPE_RDP                     = 0x8739
-	ETHERTYPE_RETIX                   = 0x80f2
-	ETHERTYPE_REVARP                  = 0x8035
-	ETHERTYPE_SCA                     = 0x6007
-	ETHERTYPE_SECTRA                  = 0x86db
-	ETHERTYPE_SECUREDATA              = 0x876d
-	ETHERTYPE_SGITW                   = 0x817e
-	ETHERTYPE_SG_BOUNCE               = 0x8016
-	ETHERTYPE_SG_DIAG                 = 0x8013
-	ETHERTYPE_SG_NETGAMES             = 0x8014
-	ETHERTYPE_SG_RESV                 = 0x8015
-	ETHERTYPE_SIMNET                  = 0x5208
-	ETHERTYPE_SLOW                    = 0x8809
-	ETHERTYPE_SNA                     = 0x80d5
-	ETHERTYPE_SNMP                    = 0x814c
-	ETHERTYPE_SONIX                   = 0xfaf5
-	ETHERTYPE_SPIDER                  = 0x809f
-	ETHERTYPE_SPRITE                  = 0x500
-	ETHERTYPE_STP                     = 0x8181
-	ETHERTYPE_TALARIS                 = 0x812b
-	ETHERTYPE_TALARISMC               = 0x852b
-	ETHERTYPE_TCPCOMP                 = 0x876b
-	ETHERTYPE_TCPSM                   = 0x9002
-	ETHERTYPE_TEC                     = 0x814f
-	ETHERTYPE_TIGAN                   = 0x802f
-	ETHERTYPE_TRAIL                   = 0x1000
-	ETHERTYPE_TRANSETHER              = 0x6558
-	ETHERTYPE_TYMSHARE                = 0x802e
-	ETHERTYPE_UBBST                   = 0x7005
-	ETHERTYPE_UBDEBUG                 = 0x900
-	ETHERTYPE_UBDIAGLOOP              = 0x7002
-	ETHERTYPE_UBDL                    = 0x7000
-	ETHERTYPE_UBNIU                   = 0x7001
-	ETHERTYPE_UBNMC                   = 0x7003
-	ETHERTYPE_VALID                   = 0x1600
-	ETHERTYPE_VARIAN                  = 0x80dd
-	ETHERTYPE_VAXELN                  = 0x803b
-	ETHERTYPE_VEECO                   = 0x8067
-	ETHERTYPE_VEXP                    = 0x805b
-	ETHERTYPE_VGLAB                   = 0x8131
-	ETHERTYPE_VINES                   = 0xbad
-	ETHERTYPE_VINESECHO               = 0xbaf
-	ETHERTYPE_VINESLOOP               = 0xbae
-	ETHERTYPE_VITAL                   = 0xff00
-	ETHERTYPE_VLAN                    = 0x8100
-	ETHERTYPE_VLTLMAN                 = 0x8080
-	ETHERTYPE_VPROD                   = 0x805c
-	ETHERTYPE_VURESERVED              = 0x8147
-	ETHERTYPE_WATERLOO                = 0x8130
-	ETHERTYPE_WELLFLEET               = 0x8103
-	ETHERTYPE_X25                     = 0x805
-	ETHERTYPE_X75                     = 0x801
-	ETHERTYPE_XNSSM                   = 0x9001
-	ETHERTYPE_XTP                     = 0x817d
-	ETHER_ADDR_LEN                    = 0x6
-	ETHER_ALIGN                       = 0x2
-	ETHER_CRC_LEN                     = 0x4
-	ETHER_CRC_POLY_BE                 = 0x4c11db6
-	ETHER_CRC_POLY_LE                 = 0xedb88320
-	ETHER_HDR_LEN                     = 0xe
-	ETHER_MAX_DIX_LEN                 = 0x600
-	ETHER_MAX_LEN                     = 0x5ee
-	ETHER_MIN_LEN                     = 0x40
-	ETHER_TYPE_LEN                    = 0x2
-	ETHER_VLAN_ENCAP_LEN              = 0x4
-	EVFILT_AIO                        = -0x3
-	EVFILT_PROC                       = -0x5
-	EVFILT_READ                       = -0x1
-	EVFILT_SIGNAL                     = -0x6
-	EVFILT_SYSCOUNT                   = 0x7
-	EVFILT_TIMER                      = -0x7
-	EVFILT_VNODE                      = -0x4
-	EVFILT_WRITE                      = -0x2
-	EV_ADD                            = 0x1
-	EV_CLEAR                          = 0x20
-	EV_DELETE                         = 0x2
-	EV_DISABLE                        = 0x8
-	EV_ENABLE                         = 0x4
-	EV_EOF                            = 0x8000
-	EV_ERROR                          = 0x4000
-	EV_FLAG1                          = 0x2000
-	EV_ONESHOT                        = 0x10
-	EV_SYSFLAGS                       = 0xf000
-	EXTA                              = 0x4b00
-	EXTB                              = 0x9600
-	EXTPROC                           = 0x800
-	FD_CLOEXEC                        = 0x1
-	FD_SETSIZE                        = 0x400
-	FLUSHO                            = 0x800000
-	F_DUPFD                           = 0x0
-	F_DUPFD_CLOEXEC                   = 0xa
-	F_GETFD                           = 0x1
-	F_GETFL                           = 0x3
-	F_GETLK                           = 0x7
-	F_GETOWN                          = 0x5
-	F_RDLCK                           = 0x1
-	F_SETFD                           = 0x2
-	F_SETFL                           = 0x4
-	F_SETLK                           = 0x8
-	F_SETLKW                          = 0x9
-	F_SETOWN                          = 0x6
-	F_UNLCK                           = 0x2
-	F_WRLCK                           = 0x3
-	HUPCL                             = 0x4000
-	ICANON                            = 0x100
-	ICMP6_FILTER                      = 0x12
-	ICRNL                             = 0x100
-	IEXTEN                            = 0x400
-	IFAN_ARRIVAL                      = 0x0
-	IFAN_DEPARTURE                    = 0x1
-	IFA_ROUTE                         = 0x1
-	IFF_ALLMULTI                      = 0x200
-	IFF_BROADCAST                     = 0x2
-	IFF_CANTCHANGE                    = 0x8e52
-	IFF_DEBUG                         = 0x4
-	IFF_LINK0                         = 0x1000
-	IFF_LINK1                         = 0x2000
-	IFF_LINK2                         = 0x4000
-	IFF_LOOPBACK                      = 0x8
-	IFF_MULTICAST                     = 0x8000
-	IFF_NOARP                         = 0x80
-	IFF_NOTRAILERS                    = 0x20
-	IFF_OACTIVE                       = 0x400
-	IFF_POINTOPOINT                   = 0x10
-	IFF_PROMISC                       = 0x100
-	IFF_RUNNING                       = 0x40
-	IFF_SIMPLEX                       = 0x800
-	IFF_UP                            = 0x1
-	IFNAMSIZ                          = 0x10
-	IFT_1822                          = 0x2
-	IFT_A12MPPSWITCH                  = 0x82
-	IFT_AAL2                          = 0xbb
-	IFT_AAL5                          = 0x31
-	IFT_ADSL                          = 0x5e
-	IFT_AFLANE8023                    = 0x3b
-	IFT_AFLANE8025                    = 0x3c
-	IFT_ARAP                          = 0x58
-	IFT_ARCNET                        = 0x23
-	IFT_ARCNETPLUS                    = 0x24
-	IFT_ASYNC                         = 0x54
-	IFT_ATM                           = 0x25
-	IFT_ATMDXI                        = 0x69
-	IFT_ATMFUNI                       = 0x6a
-	IFT_ATMIMA                        = 0x6b
-	IFT_ATMLOGICAL                    = 0x50
-	IFT_ATMRADIO                      = 0xbd
-	IFT_ATMSUBINTERFACE               = 0x86
-	IFT_ATMVCIENDPT                   = 0xc2
-	IFT_ATMVIRTUAL                    = 0x95
-	IFT_BGPPOLICYACCOUNTING           = 0xa2
-	IFT_BLUETOOTH                     = 0xf8
-	IFT_BRIDGE                        = 0xd1
-	IFT_BSC                           = 0x53
-	IFT_CARP                          = 0xf7
-	IFT_CCTEMUL                       = 0x3d
-	IFT_CEPT                          = 0x13
-	IFT_CES                           = 0x85
-	IFT_CHANNEL                       = 0x46
-	IFT_CNR                           = 0x55
-	IFT_COFFEE                        = 0x84
-	IFT_COMPOSITELINK                 = 0x9b
-	IFT_DCN                           = 0x8d
-	IFT_DIGITALPOWERLINE              = 0x8a
-	IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
-	IFT_DLSW                          = 0x4a
-	IFT_DOCSCABLEDOWNSTREAM           = 0x80
-	IFT_DOCSCABLEMACLAYER             = 0x7f
-	IFT_DOCSCABLEUPSTREAM             = 0x81
-	IFT_DOCSCABLEUPSTREAMCHANNEL      = 0xcd
-	IFT_DS0                           = 0x51
-	IFT_DS0BUNDLE                     = 0x52
-	IFT_DS1FDL                        = 0xaa
-	IFT_DS3                           = 0x1e
-	IFT_DTM                           = 0x8c
-	IFT_DUMMY                         = 0xf1
-	IFT_DVBASILN                      = 0xac
-	IFT_DVBASIOUT                     = 0xad
-	IFT_DVBRCCDOWNSTREAM              = 0x93
-	IFT_DVBRCCMACLAYER                = 0x92
-	IFT_DVBRCCUPSTREAM                = 0x94
-	IFT_ECONET                        = 0xce
-	IFT_ENC                           = 0xf4
-	IFT_EON                           = 0x19
-	IFT_EPLRS                         = 0x57
-	IFT_ESCON                         = 0x49
-	IFT_ETHER                         = 0x6
-	IFT_FAITH                         = 0xf3
-	IFT_FAST                          = 0x7d
-	IFT_FASTETHER                     = 0x3e
-	IFT_FASTETHERFX                   = 0x45
-	IFT_FDDI                          = 0xf
-	IFT_FIBRECHANNEL                  = 0x38
-	IFT_FRAMERELAYINTERCONNECT        = 0x3a
-	IFT_FRAMERELAYMPI                 = 0x5c
-	IFT_FRDLCIENDPT                   = 0xc1
-	IFT_FRELAY                        = 0x20
-	IFT_FRELAYDCE                     = 0x2c
-	IFT_FRF16MFRBUNDLE                = 0xa3
-	IFT_FRFORWARD                     = 0x9e
-	IFT_G703AT2MB                     = 0x43
-	IFT_G703AT64K                     = 0x42
-	IFT_GIF                           = 0xf0
-	IFT_GIGABITETHERNET               = 0x75
-	IFT_GR303IDT                      = 0xb2
-	IFT_GR303RDT                      = 0xb1
-	IFT_H323GATEKEEPER                = 0xa4
-	IFT_H323PROXY                     = 0xa5
-	IFT_HDH1822                       = 0x3
-	IFT_HDLC                          = 0x76
-	IFT_HDSL2                         = 0xa8
-	IFT_HIPERLAN2                     = 0xb7
-	IFT_HIPPI                         = 0x2f
-	IFT_HIPPIINTERFACE                = 0x39
-	IFT_HOSTPAD                       = 0x5a
-	IFT_HSSI                          = 0x2e
-	IFT_HY                            = 0xe
-	IFT_IBM370PARCHAN                 = 0x48
-	IFT_IDSL                          = 0x9a
-	IFT_IEEE1394                      = 0x90
-	IFT_IEEE80211                     = 0x47
-	IFT_IEEE80212                     = 0x37
-	IFT_IEEE8023ADLAG                 = 0xa1
-	IFT_IFGSN                         = 0x91
-	IFT_IMT                           = 0xbe
-	IFT_INFINIBAND                    = 0xc7
-	IFT_INTERLEAVE                    = 0x7c
-	IFT_IP                            = 0x7e
-	IFT_IPFORWARD                     = 0x8e
-	IFT_IPOVERATM                     = 0x72
-	IFT_IPOVERCDLC                    = 0x6d
-	IFT_IPOVERCLAW                    = 0x6e
-	IFT_IPSWITCH                      = 0x4e
-	IFT_ISDN                          = 0x3f
-	IFT_ISDNBASIC                     = 0x14
-	IFT_ISDNPRIMARY                   = 0x15
-	IFT_ISDNS                         = 0x4b
-	IFT_ISDNU                         = 0x4c
-	IFT_ISO88022LLC                   = 0x29
-	IFT_ISO88023                      = 0x7
-	IFT_ISO88024                      = 0x8
-	IFT_ISO88025                      = 0x9
-	IFT_ISO88025CRFPINT               = 0x62
-	IFT_ISO88025DTR                   = 0x56
-	IFT_ISO88025FIBER                 = 0x73
-	IFT_ISO88026                      = 0xa
-	IFT_ISUP                          = 0xb3
-	IFT_L2VLAN                        = 0x87
-	IFT_L3IPVLAN                      = 0x88
-	IFT_L3IPXVLAN                     = 0x89
-	IFT_LAPB                          = 0x10
-	IFT_LAPD                          = 0x4d
-	IFT_LAPF                          = 0x77
-	IFT_LINEGROUP                     = 0xd2
-	IFT_LOCALTALK                     = 0x2a
-	IFT_LOOP                          = 0x18
-	IFT_MEDIAMAILOVERIP               = 0x8b
-	IFT_MFSIGLINK                     = 0xa7
-	IFT_MIOX25                        = 0x26
-	IFT_MODEM                         = 0x30
-	IFT_MPC                           = 0x71
-	IFT_MPLS                          = 0xa6
-	IFT_MPLSTUNNEL                    = 0x96
-	IFT_MSDSL                         = 0x8f
-	IFT_MVL                           = 0xbf
-	IFT_MYRINET                       = 0x63
-	IFT_NFAS                          = 0xaf
-	IFT_NSIP                          = 0x1b
-	IFT_OPTICALCHANNEL                = 0xc3
-	IFT_OPTICALTRANSPORT              = 0xc4
-	IFT_OTHER                         = 0x1
-	IFT_P10                           = 0xc
-	IFT_P80                           = 0xd
-	IFT_PARA                          = 0x22
-	IFT_PFLOG                         = 0xf5
-	IFT_PFLOW                         = 0xf9
-	IFT_PFSYNC                        = 0xf6
-	IFT_PLC                           = 0xae
-	IFT_PON155                        = 0xcf
-	IFT_PON622                        = 0xd0
-	IFT_POS                           = 0xab
-	IFT_PPP                           = 0x17
-	IFT_PPPMULTILINKBUNDLE            = 0x6c
-	IFT_PROPATM                       = 0xc5
-	IFT_PROPBWAP2MP                   = 0xb8
-	IFT_PROPCNLS                      = 0x59
-	IFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5
-	IFT_PROPDOCSWIRELESSMACLAYER      = 0xb4
-	IFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6
-	IFT_PROPMUX                       = 0x36
-	IFT_PROPVIRTUAL                   = 0x35
-	IFT_PROPWIRELESSP2P               = 0x9d
-	IFT_PTPSERIAL                     = 0x16
-	IFT_PVC                           = 0xf2
-	IFT_Q2931                         = 0xc9
-	IFT_QLLC                          = 0x44
-	IFT_RADIOMAC                      = 0xbc
-	IFT_RADSL                         = 0x5f
-	IFT_REACHDSL                      = 0xc0
-	IFT_RFC1483                       = 0x9f
-	IFT_RS232                         = 0x21
-	IFT_RSRB                          = 0x4f
-	IFT_SDLC                          = 0x11
-	IFT_SDSL                          = 0x60
-	IFT_SHDSL                         = 0xa9
-	IFT_SIP                           = 0x1f
-	IFT_SIPSIG                        = 0xcc
-	IFT_SIPTG                         = 0xcb
-	IFT_SLIP                          = 0x1c
-	IFT_SMDSDXI                       = 0x2b
-	IFT_SMDSICIP                      = 0x34
-	IFT_SONET                         = 0x27
-	IFT_SONETOVERHEADCHANNEL          = 0xb9
-	IFT_SONETPATH                     = 0x32
-	IFT_SONETVT                       = 0x33
-	IFT_SRP                           = 0x97
-	IFT_SS7SIGLINK                    = 0x9c
-	IFT_STACKTOSTACK                  = 0x6f
-	IFT_STARLAN                       = 0xb
-	IFT_T1                            = 0x12
-	IFT_TDLC                          = 0x74
-	IFT_TELINK                        = 0xc8
-	IFT_TERMPAD                       = 0x5b
-	IFT_TR008                         = 0xb0
-	IFT_TRANSPHDLC                    = 0x7b
-	IFT_TUNNEL                        = 0x83
-	IFT_ULTRA                         = 0x1d
-	IFT_USB                           = 0xa0
-	IFT_V11                           = 0x40
-	IFT_V35                           = 0x2d
-	IFT_V36                           = 0x41
-	IFT_V37                           = 0x78
-	IFT_VDSL                          = 0x61
-	IFT_VIRTUALIPADDRESS              = 0x70
-	IFT_VIRTUALTG                     = 0xca
-	IFT_VOICEDID                      = 0xd5
-	IFT_VOICEEM                       = 0x64
-	IFT_VOICEEMFGD                    = 0xd3
-	IFT_VOICEENCAP                    = 0x67
-	IFT_VOICEFGDEANA                  = 0xd4
-	IFT_VOICEFXO                      = 0x65
-	IFT_VOICEFXS                      = 0x66
-	IFT_VOICEOVERATM                  = 0x98
-	IFT_VOICEOVERCABLE                = 0xc6
-	IFT_VOICEOVERFRAMERELAY           = 0x99
-	IFT_VOICEOVERIP                   = 0x68
-	IFT_X213                          = 0x5d
-	IFT_X25                           = 0x5
-	IFT_X25DDN                        = 0x4
-	IFT_X25HUNTGROUP                  = 0x7a
-	IFT_X25MLP                        = 0x79
-	IFT_X25PLE                        = 0x28
-	IFT_XETHER                        = 0x1a
-	IGNBRK                            = 0x1
-	IGNCR                             = 0x80
-	IGNPAR                            = 0x4
-	IMAXBEL                           = 0x2000
-	INLCR                             = 0x40
-	INPCK                             = 0x10
-	IN_CLASSA_HOST                    = 0xffffff
-	IN_CLASSA_MAX                     = 0x80
-	IN_CLASSA_NET                     = 0xff000000
-	IN_CLASSA_NSHIFT                  = 0x18
-	IN_CLASSB_HOST                    = 0xffff
-	IN_CLASSB_MAX                     = 0x10000
-	IN_CLASSB_NET                     = 0xffff0000
-	IN_CLASSB_NSHIFT                  = 0x10
-	IN_CLASSC_HOST                    = 0xff
-	IN_CLASSC_NET                     = 0xffffff00
-	IN_CLASSC_NSHIFT                  = 0x8
-	IN_CLASSD_HOST                    = 0xfffffff
-	IN_CLASSD_NET                     = 0xf0000000
-	IN_CLASSD_NSHIFT                  = 0x1c
-	IN_LOOPBACKNET                    = 0x7f
-	IN_RFC3021_HOST                   = 0x1
-	IN_RFC3021_NET                    = 0xfffffffe
-	IN_RFC3021_NSHIFT                 = 0x1f
-	IPPROTO_AH                        = 0x33
-	IPPROTO_CARP                      = 0x70
-	IPPROTO_DIVERT                    = 0x102
-	IPPROTO_DIVERT_INIT               = 0x2
-	IPPROTO_DIVERT_RESP               = 0x1
-	IPPROTO_DONE                      = 0x101
-	IPPROTO_DSTOPTS                   = 0x3c
-	IPPROTO_EGP                       = 0x8
-	IPPROTO_ENCAP                     = 0x62
-	IPPROTO_EON                       = 0x50
-	IPPROTO_ESP                       = 0x32
-	IPPROTO_ETHERIP                   = 0x61
-	IPPROTO_FRAGMENT                  = 0x2c
-	IPPROTO_GGP                       = 0x3
-	IPPROTO_GRE                       = 0x2f
-	IPPROTO_HOPOPTS                   = 0x0
-	IPPROTO_ICMP                      = 0x1
-	IPPROTO_ICMPV6                    = 0x3a
-	IPPROTO_IDP                       = 0x16
-	IPPROTO_IGMP                      = 0x2
-	IPPROTO_IP                        = 0x0
-	IPPROTO_IPCOMP                    = 0x6c
-	IPPROTO_IPIP                      = 0x4
-	IPPROTO_IPV4                      = 0x4
-	IPPROTO_IPV6                      = 0x29
-	IPPROTO_MAX                       = 0x100
-	IPPROTO_MAXID                     = 0x103
-	IPPROTO_MOBILE                    = 0x37
-	IPPROTO_MPLS                      = 0x89
-	IPPROTO_NONE                      = 0x3b
-	IPPROTO_PFSYNC                    = 0xf0
-	IPPROTO_PIM                       = 0x67
-	IPPROTO_PUP                       = 0xc
-	IPPROTO_RAW                       = 0xff
-	IPPROTO_ROUTING                   = 0x2b
-	IPPROTO_RSVP                      = 0x2e
-	IPPROTO_TCP                       = 0x6
-	IPPROTO_TP                        = 0x1d
-	IPPROTO_UDP                       = 0x11
-	IPV6_AUTH_LEVEL                   = 0x35
-	IPV6_AUTOFLOWLABEL                = 0x3b
-	IPV6_CHECKSUM                     = 0x1a
-	IPV6_DEFAULT_MULTICAST_HOPS       = 0x1
-	IPV6_DEFAULT_MULTICAST_LOOP       = 0x1
-	IPV6_DEFHLIM                      = 0x40
-	IPV6_DONTFRAG                     = 0x3e
-	IPV6_DSTOPTS                      = 0x32
-	IPV6_ESP_NETWORK_LEVEL            = 0x37
-	IPV6_ESP_TRANS_LEVEL              = 0x36
-	IPV6_FAITH                        = 0x1d
-	IPV6_FLOWINFO_MASK                = 0xffffff0f
-	IPV6_FLOWLABEL_MASK               = 0xffff0f00
-	IPV6_FRAGTTL                      = 0x78
-	IPV6_HLIMDEC                      = 0x1
-	IPV6_HOPLIMIT                     = 0x2f
-	IPV6_HOPOPTS                      = 0x31
-	IPV6_IPCOMP_LEVEL                 = 0x3c
-	IPV6_JOIN_GROUP                   = 0xc
-	IPV6_LEAVE_GROUP                  = 0xd
-	IPV6_MAXHLIM                      = 0xff
-	IPV6_MAXPACKET                    = 0xffff
-	IPV6_MMTU                         = 0x500
-	IPV6_MULTICAST_HOPS               = 0xa
-	IPV6_MULTICAST_IF                 = 0x9
-	IPV6_MULTICAST_LOOP               = 0xb
-	IPV6_NEXTHOP                      = 0x30
-	IPV6_OPTIONS                      = 0x1
-	IPV6_PATHMTU                      = 0x2c
-	IPV6_PIPEX                        = 0x3f
-	IPV6_PKTINFO                      = 0x2e
-	IPV6_PORTRANGE                    = 0xe
-	IPV6_PORTRANGE_DEFAULT            = 0x0
-	IPV6_PORTRANGE_HIGH               = 0x1
-	IPV6_PORTRANGE_LOW                = 0x2
-	IPV6_RECVDSTOPTS                  = 0x28
-	IPV6_RECVDSTPORT                  = 0x40
-	IPV6_RECVHOPLIMIT                 = 0x25
-	IPV6_RECVHOPOPTS                  = 0x27
-	IPV6_RECVPATHMTU                  = 0x2b
-	IPV6_RECVPKTINFO                  = 0x24
-	IPV6_RECVRTHDR                    = 0x26
-	IPV6_RECVTCLASS                   = 0x39
-	IPV6_RTABLE                       = 0x1021
-	IPV6_RTHDR                        = 0x33
-	IPV6_RTHDRDSTOPTS                 = 0x23
-	IPV6_RTHDR_LOOSE                  = 0x0
-	IPV6_RTHDR_STRICT                 = 0x1
-	IPV6_RTHDR_TYPE_0                 = 0x0
-	IPV6_SOCKOPT_RESERVED1            = 0x3
-	IPV6_TCLASS                       = 0x3d
-	IPV6_UNICAST_HOPS                 = 0x4
-	IPV6_USE_MIN_MTU                  = 0x2a
-	IPV6_V6ONLY                       = 0x1b
-	IPV6_VERSION                      = 0x60
-	IPV6_VERSION_MASK                 = 0xf0
-	IP_ADD_MEMBERSHIP                 = 0xc
-	IP_AUTH_LEVEL                     = 0x14
-	IP_DEFAULT_MULTICAST_LOOP         = 0x1
-	IP_DEFAULT_MULTICAST_TTL          = 0x1
-	IP_DF                             = 0x4000
-	IP_DIVERTFL                       = 0x1022
-	IP_DROP_MEMBERSHIP                = 0xd
-	IP_ESP_NETWORK_LEVEL              = 0x16
-	IP_ESP_TRANS_LEVEL                = 0x15
-	IP_HDRINCL                        = 0x2
-	IP_IPCOMP_LEVEL                   = 0x1d
-	IP_IPSECFLOWINFO                  = 0x24
-	IP_IPSEC_LOCAL_AUTH               = 0x1b
-	IP_IPSEC_LOCAL_CRED               = 0x19
-	IP_IPSEC_LOCAL_ID                 = 0x17
-	IP_IPSEC_REMOTE_AUTH              = 0x1c
-	IP_IPSEC_REMOTE_CRED              = 0x1a
-	IP_IPSEC_REMOTE_ID                = 0x18
-	IP_MAXPACKET                      = 0xffff
-	IP_MAX_MEMBERSHIPS                = 0xfff
-	IP_MF                             = 0x2000
-	IP_MINTTL                         = 0x20
-	IP_MIN_MEMBERSHIPS                = 0xf
-	IP_MSS                            = 0x240
-	IP_MULTICAST_IF                   = 0x9
-	IP_MULTICAST_LOOP                 = 0xb
-	IP_MULTICAST_TTL                  = 0xa
-	IP_OFFMASK                        = 0x1fff
-	IP_OPTIONS                        = 0x1
-	IP_PIPEX                          = 0x22
-	IP_PORTRANGE                      = 0x13
-	IP_PORTRANGE_DEFAULT              = 0x0
-	IP_PORTRANGE_HIGH                 = 0x1
-	IP_PORTRANGE_LOW                  = 0x2
-	IP_RECVDSTADDR                    = 0x7
-	IP_RECVDSTPORT                    = 0x21
-	IP_RECVIF                         = 0x1e
-	IP_RECVOPTS                       = 0x5
-	IP_RECVRETOPTS                    = 0x6
-	IP_RECVRTABLE                     = 0x23
-	IP_RECVTTL                        = 0x1f
-	IP_RETOPTS                        = 0x8
-	IP_RF                             = 0x8000
-	IP_RTABLE                         = 0x1021
-	IP_TOS                            = 0x3
-	IP_TTL                            = 0x4
-	ISIG                              = 0x80
-	ISTRIP                            = 0x20
-	IXANY                             = 0x800
-	IXOFF                             = 0x400
-	IXON                              = 0x200
-	LCNT_OVERLOAD_FLUSH               = 0x6
-	LOCK_EX                           = 0x2
-	LOCK_NB                           = 0x4
-	LOCK_SH                           = 0x1
-	LOCK_UN                           = 0x8
-	MADV_DONTNEED                     = 0x4
-	MADV_FREE                         = 0x6
-	MADV_NORMAL                       = 0x0
-	MADV_RANDOM                       = 0x1
-	MADV_SEQUENTIAL                   = 0x2
-	MADV_SPACEAVAIL                   = 0x5
-	MADV_WILLNEED                     = 0x3
-	MAP_ANON                          = 0x1000
-	MAP_ANONYMOUS                     = 0x1000
-	MAP_COPY                          = 0x2
-	MAP_FILE                          = 0x0
-	MAP_FIXED                         = 0x10
-	MAP_FLAGMASK                      = 0x3ff7
-	MAP_HASSEMAPHORE                  = 0x0
-	MAP_INHERIT                       = 0x0
-	MAP_INHERIT_COPY                  = 0x1
-	MAP_INHERIT_NONE                  = 0x2
-	MAP_INHERIT_SHARE                 = 0x0
-	MAP_INHERIT_ZERO                  = 0x3
-	MAP_NOEXTEND                      = 0x0
-	MAP_NORESERVE                     = 0x0
-	MAP_PRIVATE                       = 0x2
-	MAP_RENAME                        = 0x0
-	MAP_SHARED                        = 0x1
-	MAP_TRYFIXED                      = 0x0
-	MCL_CURRENT                       = 0x1
-	MCL_FUTURE                        = 0x2
-	MSG_BCAST                         = 0x100
-	MSG_CMSG_CLOEXEC                  = 0x800
-	MSG_CTRUNC                        = 0x20
-	MSG_DONTROUTE                     = 0x4
-	MSG_DONTWAIT                      = 0x80
-	MSG_EOR                           = 0x8
-	MSG_MCAST                         = 0x200
-	MSG_NOSIGNAL                      = 0x400
-	MSG_OOB                           = 0x1
-	MSG_PEEK                          = 0x2
-	MSG_TRUNC                         = 0x10
-	MSG_WAITALL                       = 0x40
-	MS_ASYNC                          = 0x1
-	MS_INVALIDATE                     = 0x4
-	MS_SYNC                           = 0x2
-	NAME_MAX                          = 0xff
-	NET_RT_DUMP                       = 0x1
-	NET_RT_FLAGS                      = 0x2
-	NET_RT_IFLIST                     = 0x3
-	NET_RT_MAXID                      = 0x6
-	NET_RT_STATS                      = 0x4
-	NET_RT_TABLE                      = 0x5
-	NOFLSH                            = 0x80000000
-	NOTE_ATTRIB                       = 0x8
-	NOTE_CHILD                        = 0x4
-	NOTE_DELETE                       = 0x1
-	NOTE_EOF                          = 0x2
-	NOTE_EXEC                         = 0x20000000
-	NOTE_EXIT                         = 0x80000000
-	NOTE_EXTEND                       = 0x4
-	NOTE_FORK                         = 0x40000000
-	NOTE_LINK                         = 0x10
-	NOTE_LOWAT                        = 0x1
-	NOTE_PCTRLMASK                    = 0xf0000000
-	NOTE_PDATAMASK                    = 0xfffff
-	NOTE_RENAME                       = 0x20
-	NOTE_REVOKE                       = 0x40
-	NOTE_TRACK                        = 0x1
-	NOTE_TRACKERR                     = 0x2
-	NOTE_TRUNCATE                     = 0x80
-	NOTE_WRITE                        = 0x2
-	OCRNL                             = 0x10
-	ONLCR                             = 0x2
-	ONLRET                            = 0x80
-	ONOCR                             = 0x40
-	ONOEOT                            = 0x8
-	OPOST                             = 0x1
-	O_ACCMODE                         = 0x3
-	O_APPEND                          = 0x8
-	O_ASYNC                           = 0x40
-	O_CLOEXEC                         = 0x10000
-	O_CREAT                           = 0x200
-	O_DIRECTORY                       = 0x20000
-	O_DSYNC                           = 0x80
-	O_EXCL                            = 0x800
-	O_EXLOCK                          = 0x20
-	O_FSYNC                           = 0x80
-	O_NDELAY                          = 0x4
-	O_NOCTTY                          = 0x8000
-	O_NOFOLLOW                        = 0x100
-	O_NONBLOCK                        = 0x4
-	O_RDONLY                          = 0x0
-	O_RDWR                            = 0x2
-	O_RSYNC                           = 0x80
-	O_SHLOCK                          = 0x10
-	O_SYNC                            = 0x80
-	O_TRUNC                           = 0x400
-	O_WRONLY                          = 0x1
-	PARENB                            = 0x1000
-	PARMRK                            = 0x8
-	PARODD                            = 0x2000
-	PENDIN                            = 0x20000000
-	PF_FLUSH                          = 0x1
-	PRIO_PGRP                         = 0x1
-	PRIO_PROCESS                      = 0x0
-	PRIO_USER                         = 0x2
-	PROT_EXEC                         = 0x4
-	PROT_NONE                         = 0x0
-	PROT_READ                         = 0x1
-	PROT_WRITE                        = 0x2
-	RLIMIT_CORE                       = 0x4
-	RLIMIT_CPU                        = 0x0
-	RLIMIT_DATA                       = 0x2
-	RLIMIT_FSIZE                      = 0x1
-	RLIMIT_NOFILE                     = 0x8
-	RLIMIT_STACK                      = 0x3
-	RLIM_INFINITY                     = 0x7fffffffffffffff
-	RTAX_AUTHOR                       = 0x6
-	RTAX_BRD                          = 0x7
-	RTAX_DST                          = 0x0
-	RTAX_GATEWAY                      = 0x1
-	RTAX_GENMASK                      = 0x3
-	RTAX_IFA                          = 0x5
-	RTAX_IFP                          = 0x4
-	RTAX_LABEL                        = 0xa
-	RTAX_MAX                          = 0xb
-	RTAX_NETMASK                      = 0x2
-	RTAX_SRC                          = 0x8
-	RTAX_SRCMASK                      = 0x9
-	RTA_AUTHOR                        = 0x40
-	RTA_BRD                           = 0x80
-	RTA_DST                           = 0x1
-	RTA_GATEWAY                       = 0x2
-	RTA_GENMASK                       = 0x8
-	RTA_IFA                           = 0x20
-	RTA_IFP                           = 0x10
-	RTA_LABEL                         = 0x400
-	RTA_NETMASK                       = 0x4
-	RTA_SRC                           = 0x100
-	RTA_SRCMASK                       = 0x200
-	RTF_ANNOUNCE                      = 0x4000
-	RTF_BLACKHOLE                     = 0x1000
-	RTF_BROADCAST                     = 0x400000
-	RTF_CLONED                        = 0x10000
-	RTF_CLONING                       = 0x100
-	RTF_DONE                          = 0x40
-	RTF_DYNAMIC                       = 0x10
-	RTF_FMASK                         = 0x70f808
-	RTF_GATEWAY                       = 0x2
-	RTF_HOST                          = 0x4
-	RTF_LLINFO                        = 0x400
-	RTF_LOCAL                         = 0x200000
-	RTF_MASK                          = 0x80
-	RTF_MODIFIED                      = 0x20
-	RTF_MPATH                         = 0x40000
-	RTF_MPLS                          = 0x100000
-	RTF_PERMANENT_ARP                 = 0x2000
-	RTF_PROTO1                        = 0x8000
-	RTF_PROTO2                        = 0x4000
-	RTF_PROTO3                        = 0x2000
-	RTF_REJECT                        = 0x8
-	RTF_STATIC                        = 0x800
-	RTF_UP                            = 0x1
-	RTF_USETRAILERS                   = 0x8000
-	RTF_XRESOLVE                      = 0x200
-	RTM_ADD                           = 0x1
-	RTM_CHANGE                        = 0x3
-	RTM_DELADDR                       = 0xd
-	RTM_DELETE                        = 0x2
-	RTM_DESYNC                        = 0x10
-	RTM_GET                           = 0x4
-	RTM_IFANNOUNCE                    = 0xf
-	RTM_IFINFO                        = 0xe
-	RTM_LOCK                          = 0x8
-	RTM_LOSING                        = 0x5
-	RTM_MAXSIZE                       = 0x800
-	RTM_MISS                          = 0x7
-	RTM_NEWADDR                       = 0xc
-	RTM_REDIRECT                      = 0x6
-	RTM_RESOLVE                       = 0xb
-	RTM_RTTUNIT                       = 0xf4240
-	RTM_VERSION                       = 0x5
-	RTV_EXPIRE                        = 0x4
-	RTV_HOPCOUNT                      = 0x2
-	RTV_MTU                           = 0x1
-	RTV_RPIPE                         = 0x8
-	RTV_RTT                           = 0x40
-	RTV_RTTVAR                        = 0x80
-	RTV_SPIPE                         = 0x10
-	RTV_SSTHRESH                      = 0x20
-	RT_TABLEID_MAX                    = 0xff
-	RUSAGE_CHILDREN                   = -0x1
-	RUSAGE_SELF                       = 0x0
-	RUSAGE_THREAD                     = 0x1
-	SCM_RIGHTS                        = 0x1
-	SCM_TIMESTAMP                     = 0x4
-	SHUT_RD                           = 0x0
-	SHUT_RDWR                         = 0x2
-	SHUT_WR                           = 0x1
-	SIOCADDMULTI                      = 0x80206931
-	SIOCAIFADDR                       = 0x8040691a
-	SIOCAIFGROUP                      = 0x80246987
-	SIOCALIFADDR                      = 0x8218691c
-	SIOCATMARK                        = 0x40047307
-	SIOCBRDGADD                       = 0x8054693c
-	SIOCBRDGADDS                      = 0x80546941
-	SIOCBRDGARL                       = 0x806e694d
-	SIOCBRDGDADDR                     = 0x81286947
-	SIOCBRDGDEL                       = 0x8054693d
-	SIOCBRDGDELS                      = 0x80546942
-	SIOCBRDGFLUSH                     = 0x80546948
-	SIOCBRDGFRL                       = 0x806e694e
-	SIOCBRDGGCACHE                    = 0xc0146941
-	SIOCBRDGGFD                       = 0xc0146952
-	SIOCBRDGGHT                       = 0xc0146951
-	SIOCBRDGGIFFLGS                   = 0xc054693e
-	SIOCBRDGGMA                       = 0xc0146953
-	SIOCBRDGGPARAM                    = 0xc03c6958
-	SIOCBRDGGPRI                      = 0xc0146950
-	SIOCBRDGGRL                       = 0xc028694f
-	SIOCBRDGGSIFS                     = 0xc054693c
-	SIOCBRDGGTO                       = 0xc0146946
-	SIOCBRDGIFS                       = 0xc0546942
-	SIOCBRDGRTS                       = 0xc0186943
-	SIOCBRDGSADDR                     = 0xc1286944
-	SIOCBRDGSCACHE                    = 0x80146940
-	SIOCBRDGSFD                       = 0x80146952
-	SIOCBRDGSHT                       = 0x80146951
-	SIOCBRDGSIFCOST                   = 0x80546955
-	SIOCBRDGSIFFLGS                   = 0x8054693f
-	SIOCBRDGSIFPRIO                   = 0x80546954
-	SIOCBRDGSMA                       = 0x80146953
-	SIOCBRDGSPRI                      = 0x80146950
-	SIOCBRDGSPROTO                    = 0x8014695a
-	SIOCBRDGSTO                       = 0x80146945
-	SIOCBRDGSTXHC                     = 0x80146959
-	SIOCDELMULTI                      = 0x80206932
-	SIOCDIFADDR                       = 0x80206919
-	SIOCDIFGROUP                      = 0x80246989
-	SIOCDIFPHYADDR                    = 0x80206949
-	SIOCDLIFADDR                      = 0x8218691e
-	SIOCGETKALIVE                     = 0xc01869a4
-	SIOCGETLABEL                      = 0x8020699a
-	SIOCGETPFLOW                      = 0xc02069fe
-	SIOCGETPFSYNC                     = 0xc02069f8
-	SIOCGETSGCNT                      = 0xc0147534
-	SIOCGETVIFCNT                     = 0xc0147533
-	SIOCGETVLAN                       = 0xc0206990
-	SIOCGHIWAT                        = 0x40047301
-	SIOCGIFADDR                       = 0xc0206921
-	SIOCGIFASYNCMAP                   = 0xc020697c
-	SIOCGIFBRDADDR                    = 0xc0206923
-	SIOCGIFCONF                       = 0xc0086924
-	SIOCGIFDATA                       = 0xc020691b
-	SIOCGIFDESCR                      = 0xc0206981
-	SIOCGIFDSTADDR                    = 0xc0206922
-	SIOCGIFFLAGS                      = 0xc0206911
-	SIOCGIFGATTR                      = 0xc024698b
-	SIOCGIFGENERIC                    = 0xc020693a
-	SIOCGIFGMEMB                      = 0xc024698a
-	SIOCGIFGROUP                      = 0xc0246988
-	SIOCGIFHARDMTU                    = 0xc02069a5
-	SIOCGIFMEDIA                      = 0xc0286936
-	SIOCGIFMETRIC                     = 0xc0206917
-	SIOCGIFMTU                        = 0xc020697e
-	SIOCGIFNETMASK                    = 0xc0206925
-	SIOCGIFPDSTADDR                   = 0xc0206948
-	SIOCGIFPRIORITY                   = 0xc020699c
-	SIOCGIFPSRCADDR                   = 0xc0206947
-	SIOCGIFRDOMAIN                    = 0xc02069a0
-	SIOCGIFRTLABEL                    = 0xc0206983
-	SIOCGIFRXR                        = 0x802069aa
-	SIOCGIFTIMESLOT                   = 0xc0206986
-	SIOCGIFXFLAGS                     = 0xc020699e
-	SIOCGLIFADDR                      = 0xc218691d
-	SIOCGLIFPHYADDR                   = 0xc218694b
-	SIOCGLIFPHYRTABLE                 = 0xc02069a2
-	SIOCGLIFPHYTTL                    = 0xc02069a9
-	SIOCGLOWAT                        = 0x40047303
-	SIOCGPGRP                         = 0x40047309
-	SIOCGSPPPPARAMS                   = 0xc0206994
-	SIOCGVH                           = 0xc02069f6
-	SIOCGVNETID                       = 0xc02069a7
-	SIOCIFCREATE                      = 0x8020697a
-	SIOCIFDESTROY                     = 0x80206979
-	SIOCIFGCLONERS                    = 0xc00c6978
-	SIOCSETKALIVE                     = 0x801869a3
-	SIOCSETLABEL                      = 0x80206999
-	SIOCSETPFLOW                      = 0x802069fd
-	SIOCSETPFSYNC                     = 0x802069f7
-	SIOCSETVLAN                       = 0x8020698f
-	SIOCSHIWAT                        = 0x80047300
-	SIOCSIFADDR                       = 0x8020690c
-	SIOCSIFASYNCMAP                   = 0x8020697d
-	SIOCSIFBRDADDR                    = 0x80206913
-	SIOCSIFDESCR                      = 0x80206980
-	SIOCSIFDSTADDR                    = 0x8020690e
-	SIOCSIFFLAGS                      = 0x80206910
-	SIOCSIFGATTR                      = 0x8024698c
-	SIOCSIFGENERIC                    = 0x80206939
-	SIOCSIFLLADDR                     = 0x8020691f
-	SIOCSIFMEDIA                      = 0xc0206935
-	SIOCSIFMETRIC                     = 0x80206918
-	SIOCSIFMTU                        = 0x8020697f
-	SIOCSIFNETMASK                    = 0x80206916
-	SIOCSIFPHYADDR                    = 0x80406946
-	SIOCSIFPRIORITY                   = 0x8020699b
-	SIOCSIFRDOMAIN                    = 0x8020699f
-	SIOCSIFRTLABEL                    = 0x80206982
-	SIOCSIFTIMESLOT                   = 0x80206985
-	SIOCSIFXFLAGS                     = 0x8020699d
-	SIOCSLIFPHYADDR                   = 0x8218694a
-	SIOCSLIFPHYRTABLE                 = 0x802069a1
-	SIOCSLIFPHYTTL                    = 0x802069a8
-	SIOCSLOWAT                        = 0x80047302
-	SIOCSPGRP                         = 0x80047308
-	SIOCSSPPPPARAMS                   = 0x80206993
-	SIOCSVH                           = 0xc02069f5
-	SIOCSVNETID                       = 0x802069a6
-	SOCK_CLOEXEC                      = 0x8000
-	SOCK_DGRAM                        = 0x2
-	SOCK_NONBLOCK                     = 0x4000
-	SOCK_RAW                          = 0x3
-	SOCK_RDM                          = 0x4
-	SOCK_SEQPACKET                    = 0x5
-	SOCK_STREAM                       = 0x1
-	SOL_SOCKET                        = 0xffff
-	SOMAXCONN                         = 0x80
-	SO_ACCEPTCONN                     = 0x2
-	SO_BINDANY                        = 0x1000
-	SO_BROADCAST                      = 0x20
-	SO_DEBUG                          = 0x1
-	SO_DONTROUTE                      = 0x10
-	SO_ERROR                          = 0x1007
-	SO_KEEPALIVE                      = 0x8
-	SO_LINGER                         = 0x80
-	SO_NETPROC                        = 0x1020
-	SO_OOBINLINE                      = 0x100
-	SO_PEERCRED                       = 0x1022
-	SO_RCVBUF                         = 0x1002
-	SO_RCVLOWAT                       = 0x1004
-	SO_RCVTIMEO                       = 0x1006
-	SO_REUSEADDR                      = 0x4
-	SO_REUSEPORT                      = 0x200
-	SO_RTABLE                         = 0x1021
-	SO_SNDBUF                         = 0x1001
-	SO_SNDLOWAT                       = 0x1003
-	SO_SNDTIMEO                       = 0x1005
-	SO_SPLICE                         = 0x1023
-	SO_TIMESTAMP                      = 0x800
-	SO_TYPE                           = 0x1008
-	SO_USELOOPBACK                    = 0x40
-	TCIFLUSH                          = 0x1
-	TCIOFLUSH                         = 0x3
-	TCOFLUSH                          = 0x2
-	TCP_MAXBURST                      = 0x4
-	TCP_MAXSEG                        = 0x2
-	TCP_MAXWIN                        = 0xffff
-	TCP_MAX_SACK                      = 0x3
-	TCP_MAX_WINSHIFT                  = 0xe
-	TCP_MD5SIG                        = 0x4
-	TCP_MSS                           = 0x200
-	TCP_NODELAY                       = 0x1
-	TCP_NOPUSH                        = 0x10
-	TCP_NSTATES                       = 0xb
-	TCP_SACK_ENABLE                   = 0x8
-	TCSAFLUSH                         = 0x2
-	TIOCCBRK                          = 0x2000747a
-	TIOCCDTR                          = 0x20007478
-	TIOCCONS                          = 0x80047462
-	TIOCDRAIN                         = 0x2000745e
-	TIOCEXCL                          = 0x2000740d
-	TIOCEXT                           = 0x80047460
-	TIOCFLAG_CLOCAL                   = 0x2
-	TIOCFLAG_CRTSCTS                  = 0x4
-	TIOCFLAG_MDMBUF                   = 0x8
-	TIOCFLAG_PPS                      = 0x10
-	TIOCFLAG_SOFTCAR                  = 0x1
-	TIOCFLUSH                         = 0x80047410
-	TIOCGETA                          = 0x402c7413
-	TIOCGETD                          = 0x4004741a
-	TIOCGFLAGS                        = 0x4004745d
-	TIOCGPGRP                         = 0x40047477
-	TIOCGSID                          = 0x40047463
-	TIOCGTSTAMP                       = 0x400c745b
-	TIOCGWINSZ                        = 0x40087468
-	TIOCMBIC                          = 0x8004746b
-	TIOCMBIS                          = 0x8004746c
-	TIOCMGET                          = 0x4004746a
-	TIOCMODG                          = 0x4004746a
-	TIOCMODS                          = 0x8004746d
-	TIOCMSET                          = 0x8004746d
-	TIOCM_CAR                         = 0x40
-	TIOCM_CD                          = 0x40
-	TIOCM_CTS                         = 0x20
-	TIOCM_DSR                         = 0x100
-	TIOCM_DTR                         = 0x2
-	TIOCM_LE                          = 0x1
-	TIOCM_RI                          = 0x80
-	TIOCM_RNG                         = 0x80
-	TIOCM_RTS                         = 0x4
-	TIOCM_SR                          = 0x10
-	TIOCM_ST                          = 0x8
-	TIOCNOTTY                         = 0x20007471
-	TIOCNXCL                          = 0x2000740e
-	TIOCOUTQ                          = 0x40047473
-	TIOCPKT                           = 0x80047470
-	TIOCPKT_DATA                      = 0x0
-	TIOCPKT_DOSTOP                    = 0x20
-	TIOCPKT_FLUSHREAD                 = 0x1
-	TIOCPKT_FLUSHWRITE                = 0x2
-	TIOCPKT_IOCTL                     = 0x40
-	TIOCPKT_NOSTOP                    = 0x10
-	TIOCPKT_START                     = 0x8
-	TIOCPKT_STOP                      = 0x4
-	TIOCREMOTE                        = 0x80047469
-	TIOCSBRK                          = 0x2000747b
-	TIOCSCTTY                         = 0x20007461
-	TIOCSDTR                          = 0x20007479
-	TIOCSETA                          = 0x802c7414
-	TIOCSETAF                         = 0x802c7416
-	TIOCSETAW                         = 0x802c7415
-	TIOCSETD                          = 0x8004741b
-	TIOCSFLAGS                        = 0x8004745c
-	TIOCSIG                           = 0x8004745f
-	TIOCSPGRP                         = 0x80047476
-	TIOCSTART                         = 0x2000746e
-	TIOCSTAT                          = 0x80047465
-	TIOCSTI                           = 0x80017472
-	TIOCSTOP                          = 0x2000746f
-	TIOCSTSTAMP                       = 0x8008745a
-	TIOCSWINSZ                        = 0x80087467
-	TIOCUCNTL                         = 0x80047466
-	TOSTOP                            = 0x400000
-	VDISCARD                          = 0xf
-	VDSUSP                            = 0xb
-	VEOF                              = 0x0
-	VEOL                              = 0x1
-	VEOL2                             = 0x2
-	VERASE                            = 0x3
-	VINTR                             = 0x8
-	VKILL                             = 0x5
-	VLNEXT                            = 0xe
-	VMIN                              = 0x10
-	VQUIT                             = 0x9
-	VREPRINT                          = 0x6
-	VSTART                            = 0xc
-	VSTATUS                           = 0x12
-	VSTOP                             = 0xd
-	VSUSP                             = 0xa
-	VTIME                             = 0x11
-	VWERASE                           = 0x4
-	WALTSIG                           = 0x4
-	WCONTINUED                        = 0x8
-	WCOREFLAG                         = 0x80
-	WNOHANG                           = 0x1
-	WUNTRACED                         = 0x2
-)
-
-// Errors
-const (
-	E2BIG           = Errno(0x7)
-	EACCES          = Errno(0xd)
-	EADDRINUSE      = Errno(0x30)
-	EADDRNOTAVAIL   = Errno(0x31)
-	EAFNOSUPPORT    = Errno(0x2f)
-	EAGAIN          = Errno(0x23)
-	EALREADY        = Errno(0x25)
-	EAUTH           = Errno(0x50)
-	EBADF           = Errno(0x9)
-	EBADRPC         = Errno(0x48)
-	EBUSY           = Errno(0x10)
-	ECANCELED       = Errno(0x58)
-	ECHILD          = Errno(0xa)
-	ECONNABORTED    = Errno(0x35)
-	ECONNREFUSED    = Errno(0x3d)
-	ECONNRESET      = Errno(0x36)
-	EDEADLK         = Errno(0xb)
-	EDESTADDRREQ    = Errno(0x27)
-	EDOM            = Errno(0x21)
-	EDQUOT          = Errno(0x45)
-	EEXIST          = Errno(0x11)
-	EFAULT          = Errno(0xe)
-	EFBIG           = Errno(0x1b)
-	EFTYPE          = Errno(0x4f)
-	EHOSTDOWN       = Errno(0x40)
-	EHOSTUNREACH    = Errno(0x41)
-	EIDRM           = Errno(0x59)
-	EILSEQ          = Errno(0x54)
-	EINPROGRESS     = Errno(0x24)
-	EINTR           = Errno(0x4)
-	EINVAL          = Errno(0x16)
-	EIO             = Errno(0x5)
-	EIPSEC          = Errno(0x52)
-	EISCONN         = Errno(0x38)
-	EISDIR          = Errno(0x15)
-	ELAST           = Errno(0x5b)
-	ELOOP           = Errno(0x3e)
-	EMEDIUMTYPE     = Errno(0x56)
-	EMFILE          = Errno(0x18)
-	EMLINK          = Errno(0x1f)
-	EMSGSIZE        = Errno(0x28)
-	ENAMETOOLONG    = Errno(0x3f)
-	ENEEDAUTH       = Errno(0x51)
-	ENETDOWN        = Errno(0x32)
-	ENETRESET       = Errno(0x34)
-	ENETUNREACH     = Errno(0x33)
-	ENFILE          = Errno(0x17)
-	ENOATTR         = Errno(0x53)
-	ENOBUFS         = Errno(0x37)
-	ENODEV          = Errno(0x13)
-	ENOENT          = Errno(0x2)
-	ENOEXEC         = Errno(0x8)
-	ENOLCK          = Errno(0x4d)
-	ENOMEDIUM       = Errno(0x55)
-	ENOMEM          = Errno(0xc)
-	ENOMSG          = Errno(0x5a)
-	ENOPROTOOPT     = Errno(0x2a)
-	ENOSPC          = Errno(0x1c)
-	ENOSYS          = Errno(0x4e)
-	ENOTBLK         = Errno(0xf)
-	ENOTCONN        = Errno(0x39)
-	ENOTDIR         = Errno(0x14)
-	ENOTEMPTY       = Errno(0x42)
-	ENOTSOCK        = Errno(0x26)
-	ENOTSUP         = Errno(0x5b)
-	ENOTTY          = Errno(0x19)
-	ENXIO           = Errno(0x6)
-	EOPNOTSUPP      = Errno(0x2d)
-	EOVERFLOW       = Errno(0x57)
-	EPERM           = Errno(0x1)
-	EPFNOSUPPORT    = Errno(0x2e)
-	EPIPE           = Errno(0x20)
-	EPROCLIM        = Errno(0x43)
-	EPROCUNAVAIL    = Errno(0x4c)
-	EPROGMISMATCH   = Errno(0x4b)
-	EPROGUNAVAIL    = Errno(0x4a)
-	EPROTONOSUPPORT = Errno(0x2b)
-	EPROTOTYPE      = Errno(0x29)
-	ERANGE          = Errno(0x22)
-	EREMOTE         = Errno(0x47)
-	EROFS           = Errno(0x1e)
-	ERPCMISMATCH    = Errno(0x49)
-	ESHUTDOWN       = Errno(0x3a)
-	ESOCKTNOSUPPORT = Errno(0x2c)
-	ESPIPE          = Errno(0x1d)
-	ESRCH           = Errno(0x3)
-	ESTALE          = Errno(0x46)
-	ETIMEDOUT       = Errno(0x3c)
-	ETOOMANYREFS    = Errno(0x3b)
-	ETXTBSY         = Errno(0x1a)
-	EUSERS          = Errno(0x44)
-	EWOULDBLOCK     = Errno(0x23)
-	EXDEV           = Errno(0x12)
-)
-
-// Signals
-const (
-	SIGABRT   = Signal(0x6)
-	SIGALRM   = Signal(0xe)
-	SIGBUS    = Signal(0xa)
-	SIGCHLD   = Signal(0x14)
-	SIGCONT   = Signal(0x13)
-	SIGEMT    = Signal(0x7)
-	SIGFPE    = Signal(0x8)
-	SIGHUP    = Signal(0x1)
-	SIGILL    = Signal(0x4)
-	SIGINFO   = Signal(0x1d)
-	SIGINT    = Signal(0x2)
-	SIGIO     = Signal(0x17)
-	SIGIOT    = Signal(0x6)
-	SIGKILL   = Signal(0x9)
-	SIGPIPE   = Signal(0xd)
-	SIGPROF   = Signal(0x1b)
-	SIGQUIT   = Signal(0x3)
-	SIGSEGV   = Signal(0xb)
-	SIGSTOP   = Signal(0x11)
-	SIGSYS    = Signal(0xc)
-	SIGTERM   = Signal(0xf)
-	SIGTHR    = Signal(0x20)
-	SIGTRAP   = Signal(0x5)
-	SIGTSTP   = Signal(0x12)
-	SIGTTIN   = Signal(0x15)
-	SIGTTOU   = Signal(0x16)
-	SIGURG    = Signal(0x10)
-	SIGUSR1   = Signal(0x1e)
-	SIGUSR2   = Signal(0x1f)
-	SIGVTALRM = Signal(0x1a)
-	SIGWINCH  = Signal(0x1c)
-	SIGXCPU   = Signal(0x18)
-	SIGXFSZ   = Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:  "operation not permitted",
-	2:  "no such file or directory",
-	3:  "no such process",
-	4:  "interrupted system call",
-	5:  "input/output error",
-	6:  "device not configured",
-	7:  "argument list too long",
-	8:  "exec format error",
-	9:  "bad file descriptor",
-	10: "no child processes",
-	11: "resource deadlock avoided",
-	12: "cannot allocate memory",
-	13: "permission denied",
-	14: "bad address",
-	15: "block device required",
-	16: "device busy",
-	17: "file exists",
-	18: "cross-device link",
-	19: "operation not supported by device",
-	20: "not a directory",
-	21: "is a directory",
-	22: "invalid argument",
-	23: "too many open files in system",
-	24: "too many open files",
-	25: "inappropriate ioctl for device",
-	26: "text file busy",
-	27: "file too large",
-	28: "no space left on device",
-	29: "illegal seek",
-	30: "read-only file system",
-	31: "too many links",
-	32: "broken pipe",
-	33: "numerical argument out of domain",
-	34: "result too large",
-	35: "resource temporarily unavailable",
-	36: "operation now in progress",
-	37: "operation already in progress",
-	38: "socket operation on non-socket",
-	39: "destination address required",
-	40: "message too long",
-	41: "protocol wrong type for socket",
-	42: "protocol not available",
-	43: "protocol not supported",
-	44: "socket type not supported",
-	45: "operation not supported",
-	46: "protocol family not supported",
-	47: "address family not supported by protocol family",
-	48: "address already in use",
-	49: "can't assign requested address",
-	50: "network is down",
-	51: "network is unreachable",
-	52: "network dropped connection on reset",
-	53: "software caused connection abort",
-	54: "connection reset by peer",
-	55: "no buffer space available",
-	56: "socket is already connected",
-	57: "socket is not connected",
-	58: "can't send after socket shutdown",
-	59: "too many references: can't splice",
-	60: "connection timed out",
-	61: "connection refused",
-	62: "too many levels of symbolic links",
-	63: "file name too long",
-	64: "host is down",
-	65: "no route to host",
-	66: "directory not empty",
-	67: "too many processes",
-	68: "too many users",
-	69: "disc quota exceeded",
-	70: "stale NFS file handle",
-	71: "too many levels of remote in path",
-	72: "RPC struct is bad",
-	73: "RPC version wrong",
-	74: "RPC prog. not avail",
-	75: "program version wrong",
-	76: "bad procedure for program",
-	77: "no locks available",
-	78: "function not implemented",
-	79: "inappropriate file type or format",
-	80: "authentication error",
-	81: "need authenticator",
-	82: "IPsec processing failure",
-	83: "attribute not found",
-	84: "illegal byte sequence",
-	85: "no medium found",
-	86: "wrong medium type",
-	87: "value too large to be stored in data type",
-	88: "operation canceled",
-	89: "identifier removed",
-	90: "no message of desired type",
-	91: "not supported",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/BPT trap",
-	6:  "abort trap",
-	7:  "EMT trap",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "bus error",
-	11: "segmentation fault",
-	12: "bad system call",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "urgent I/O condition",
-	17: "stopped (signal)",
-	18: "stopped",
-	19: "continued",
-	20: "child exited",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "I/O possible",
-	24: "cputime limit exceeded",
-	25: "filesize limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window size changes",
-	29: "information request",
-	30: "user defined signal 1",
-	31: "user defined signal 2",
-	32: "thread AST",
-}
diff --git a/src/syscall/zsyscall_darwin_arm.go b/src/syscall/zsyscall_darwin_arm.go
deleted file mode 100644
index f996a50..0000000
--- a/src/syscall/zsyscall_darwin_arm.go
+++ /dev/null
@@ -1,1421 +0,0 @@
-// mksyscall.pl -l32 syscall_bsd.go syscall_darwin.go syscall_darwin_arm.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build arm,darwin
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
-	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
-	wpid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
-	_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
-	_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
-	_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
-	_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
-	r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
-	var _p0 unsafe.Pointer
-	if len(mib) > 0 {
-		_p0 = unsafe.Pointer(&mib[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
-	r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
-	r = int(r0)
-	w = int(r1)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kill(pid int, signum int, posix int) (err error) {
-	_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
-	r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
-	nfd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exchangedata(path1 string, path2 string, options int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path1)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(path2)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
-	Syscall(SYS_EXIT, uintptr(code), 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
-	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
-	_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
-	r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
-	size = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
-	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
-	egid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
-	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
-	gid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
-	pgid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
-	r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
-	pgrp = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
-	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
-	pid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
-	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
-	ppid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
-	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
-	prio = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
-	sid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
-	r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
-	tainted = bool(r0 != 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
-	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
-	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
-	use(unsafe.Pointer(_p0))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
-	use(unsafe.Pointer(_p0))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(buf) > 0 {
-		_p1 = unsafe.Pointer(&buf[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
-	use(unsafe.Pointer(_p0))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(from)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(to)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
-	r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
-	newoffset = int64(int64(r1)<<32 | int64(r0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
-	_, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(name)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setprivexec(flag int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
-	pid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
-	_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
-	r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
-	oldmask = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
-	r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
-	ret = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
-	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
-	r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
-	sec = int32(r0)
-	usec = int32(r1)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
diff --git a/src/syscall/zsyscall_darwin_arm64.go b/src/syscall/zsyscall_darwin_arm64.go
deleted file mode 100644
index c260cc7..0000000
--- a/src/syscall/zsyscall_darwin_arm64.go
+++ /dev/null
@@ -1,1421 +0,0 @@
-// mksyscall.pl syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build arm64,darwin
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
-	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
-	wpid = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	fd = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
-	_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
-	_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
-	fd = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
-	_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
-	_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
-	n = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
-	r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
-	n = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
-	var _p0 unsafe.Pointer
-	if len(mib) > 0 {
-		_p0 = unsafe.Pointer(&mib[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
-	val = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
-	r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
-	r = int(r0)
-	w = int(r1)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kill(pid int, signum int, posix int) (err error) {
-	_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_DUP, uintptr(fd), 0, 0)
-	nfd = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
-	_, _, e1 := RawSyscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exchangedata(path1 string, path2 string, options int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path1)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(path2)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
-	Syscall(SYS_EXIT, uintptr(code), 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
-	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
-	val = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
-	_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
-	r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
-	size = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
-	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
-	egid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
-	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
-	gid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
-	pgid = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
-	r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
-	pgrp = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
-	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
-	pid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
-	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
-	ppid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
-	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
-	prio = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
-	sid = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
-	r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
-	tainted = bool(r0 != 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
-	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
-	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
-	use(unsafe.Pointer(_p0))
-	fd = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
-	use(unsafe.Pointer(_p0))
-	val = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(buf) > 0 {
-		_p1 = unsafe.Pointer(&buf[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
-	use(unsafe.Pointer(_p0))
-	n = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(from)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(to)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
-	r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
-	newoffset = int64(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
-	_, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(name)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setprivexec(flag int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
-	pid = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
-	_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
-	r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
-	oldmask = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
-	r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
-	ret = uintptr(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
-	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
-	n = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
-	n = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
-	r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
-	sec = int64(r0)
-	usec = int32(r1)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
diff --git a/src/syscall/zsyscall_linux_arm64.go b/src/syscall/zsyscall_linux_arm64.go
deleted file mode 100644
index 041e770..0000000
--- a/src/syscall/zsyscall_linux_arm64.go
+++ /dev/null
@@ -1,1725 +0,0 @@
-// mksyscall.pl syscall_linux.go syscall_linux_arm64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build arm64,linux
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
-	use(unsafe.Pointer(_p0))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(buf) > 0 {
-		_p1 = unsafe.Pointer(&buf[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func unlinkat(dirfd int, path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, times *[2]Timeval) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
-	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
-	wpid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(arg)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(source)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(target)
-	if err != nil {
-		return
-	}
-	var _p2 *byte
-	_p2, err = BytePtrFromString(fstype)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	use(unsafe.Pointer(_p2))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
-	r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
-	state = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
-	_, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(events) > 0 {
-		_p0 = unsafe.Pointer(&events[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
-	Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
-	_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
-	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
-	pgid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
-	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
-	pid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
-	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
-	ppid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
-	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
-	prio = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
-	r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
-	tid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	var _p2 unsafe.Pointer
-	if len(dest) > 0 {
-		_p2 = unsafe.Pointer(&dest[0])
-	} else {
-		_p2 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	sz = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(pathname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
-	use(unsafe.Pointer(_p0))
-	watchdesc = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
-	success = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig Signal) (err error) {
-	_, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(dest) > 0 {
-		_p1 = unsafe.Pointer(&dest[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
-	use(unsafe.Pointer(_p0))
-	sz = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
-	_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pause() (err error) {
-	_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(newroot)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(putold)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
-	_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
-	pid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	var _p2 unsafe.Pointer
-	if len(data) > 0 {
-		_p2 = unsafe.Pointer(&data[0])
-	} else {
-		_p2 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
-	Syscall(SYS_SYNC, 0, 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
-	r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
-	n = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tgkill(tgid int, tid int, sig Signal) (err error) {
-	_, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
-	r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
-	ticks = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
-	r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
-	oldmask = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
-	_, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(target)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ustat(dev int, ubuf *Ustat_t) (err error) {
-	_, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Utime(path string, buf *Utimbuf) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
-	_, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
-	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
-	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
-	_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
-	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
-	egid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (euid int) {
-	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
-	euid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
-	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
-	gid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, n int) (err error) {
-	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (off int64, err error) {
-	r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
-	off = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
-	r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
-	r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
-	written = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsgid(gid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsuid(uid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
-	r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
-	n = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, buf *Statfs_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
-	_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
-	r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
-	_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
-	_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(n int, list *_Gid_t) (nn int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
-	nn = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(n int, list *_Gid_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
-	_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
-	_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
-	r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
-	xaddr = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Time(t *Time_t) (tt Time_t, err error) {
-	r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)
-	tt = Time_t(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe2(p *[2]_C_int, flags int) (err error) {
-	_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
diff --git a/src/syscall/zsyscall_linux_ppc64.go b/src/syscall/zsyscall_linux_ppc64.go
deleted file mode 100644
index 4f61114..0000000
--- a/src/syscall/zsyscall_linux_ppc64.go
+++ /dev/null
@@ -1,1798 +0,0 @@
-// mksyscall.pl syscall_linux.go syscall_linux_ppc64x.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build ppc64,linux
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
-	use(unsafe.Pointer(_p0))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(buf) > 0 {
-		_p1 = unsafe.Pointer(&buf[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func unlinkat(dirfd int, path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, times *[2]Timeval) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
-	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
-	wpid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(arg)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(source)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(target)
-	if err != nil {
-		return
-	}
-	var _p2 *byte
-	_p2, err = BytePtrFromString(fstype)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	use(unsafe.Pointer(_p2))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
-	r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
-	state = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
-	_, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(events) > 0 {
-		_p0 = unsafe.Pointer(&events[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
-	Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
-	_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
-	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
-	pgid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
-	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
-	pid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
-	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
-	ppid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
-	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
-	prio = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
-	r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
-	tid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	var _p2 unsafe.Pointer
-	if len(dest) > 0 {
-		_p2 = unsafe.Pointer(&dest[0])
-	} else {
-		_p2 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	sz = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(pathname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
-	use(unsafe.Pointer(_p0))
-	watchdesc = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
-	success = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig Signal) (err error) {
-	_, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(dest) > 0 {
-		_p1 = unsafe.Pointer(&dest[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
-	use(unsafe.Pointer(_p0))
-	sz = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
-	_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pause() (err error) {
-	_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(newroot)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(putold)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
-	_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
-	pid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	var _p2 unsafe.Pointer
-	if len(data) > 0 {
-		_p2 = unsafe.Pointer(&data[0])
-	} else {
-		_p2 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
-	Syscall(SYS_SYNC, 0, 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
-	r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
-	n = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tgkill(tgid int, tid int, sig Signal) (err error) {
-	_, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
-	r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
-	ticks = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
-	r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
-	oldmask = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
-	_, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(target)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ustat(dev int, ubuf *Ustat_t) (err error) {
-	_, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Utime(path string, buf *Utimbuf) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
-	_, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
-	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
-	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(oldfd int, newfd int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
-	_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
-	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
-	egid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (euid int) {
-	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
-	euid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
-	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
-	gid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit() (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ioperm(from int, num int, on int) (err error) {
-	_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Iopl(level int) (err error) {
-	_, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, n int) (err error) {
-	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (off int64, err error) {
-	r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
-	off = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
-	r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
-	r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
-	written = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsgid(gid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsuid(uid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
-	r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
-	n = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, buf *Statfs_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
-	_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
-	r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
-	_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
-	_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(n int, list *_Gid_t) (nn int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
-	nn = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(n int, list *_Gid_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
-	_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
-	_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
-	r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
-	xaddr = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Time(t *Time_t) (tt Time_t, err error) {
-	r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)
-	tt = Time_t(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe2(p *[2]_C_int, flags int) (err error) {
-	_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
diff --git a/src/syscall/zsyscall_linux_ppc64le.go b/src/syscall/zsyscall_linux_ppc64le.go
deleted file mode 100644
index 4073a0f..0000000
--- a/src/syscall/zsyscall_linux_ppc64le.go
+++ /dev/null
@@ -1,1798 +0,0 @@
-// mksyscall.pl syscall_linux.go syscall_linux_ppc64x.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build ppc64le,linux
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
-	use(unsafe.Pointer(_p0))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(buf) > 0 {
-		_p1 = unsafe.Pointer(&buf[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func unlinkat(dirfd int, path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, times *[2]Timeval) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
-	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
-	wpid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(arg)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(source)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(target)
-	if err != nil {
-		return
-	}
-	var _p2 *byte
-	_p2, err = BytePtrFromString(fstype)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	use(unsafe.Pointer(_p2))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
-	r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
-	state = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
-	_, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(events) > 0 {
-		_p0 = unsafe.Pointer(&events[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
-	Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
-	_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
-	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
-	pgid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
-	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
-	pid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
-	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
-	ppid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
-	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
-	prio = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
-	r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
-	tid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	var _p2 unsafe.Pointer
-	if len(dest) > 0 {
-		_p2 = unsafe.Pointer(&dest[0])
-	} else {
-		_p2 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	sz = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(pathname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
-	use(unsafe.Pointer(_p0))
-	watchdesc = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
-	success = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig Signal) (err error) {
-	_, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(dest) > 0 {
-		_p1 = unsafe.Pointer(&dest[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
-	use(unsafe.Pointer(_p0))
-	sz = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
-	_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pause() (err error) {
-	_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(newroot)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(putold)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
-	_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
-	pid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	var _p2 unsafe.Pointer
-	if len(data) > 0 {
-		_p2 = unsafe.Pointer(&data[0])
-	} else {
-		_p2 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
-	Syscall(SYS_SYNC, 0, 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
-	r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
-	n = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tgkill(tgid int, tid int, sig Signal) (err error) {
-	_, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
-	r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
-	ticks = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
-	r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
-	oldmask = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
-	_, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(target)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ustat(dev int, ubuf *Ustat_t) (err error) {
-	_, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Utime(path string, buf *Utimbuf) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
-	_, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
-	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
-	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(oldfd int, newfd int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
-	_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
-	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
-	egid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (euid int) {
-	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
-	euid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
-	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
-	gid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit() (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ioperm(from int, num int, on int) (err error) {
-	_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Iopl(level int) (err error) {
-	_, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, n int) (err error) {
-	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (off int64, err error) {
-	r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
-	off = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
-	r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
-	r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
-	written = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsgid(gid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsuid(uid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
-	r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
-	n = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, buf *Statfs_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
-	_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
-	r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
-	_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
-	_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(n int, list *_Gid_t) (nn int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
-	nn = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(n int, list *_Gid_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
-	_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
-	_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
-	r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
-	xaddr = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Time(t *Time_t) (tt Time_t, err error) {
-	r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)
-	tt = Time_t(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe2(p *[2]_C_int, flags int) (err error) {
-	_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
diff --git a/src/syscall/zsyscall_openbsd_arm.go b/src/syscall/zsyscall_openbsd_arm.go
deleted file mode 100644
index f40fb31..0000000
--- a/src/syscall/zsyscall_openbsd_arm.go
+++ /dev/null
@@ -1,1293 +0,0 @@
-// mksyscall.pl -l32 -openbsd -arm syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build arm,openbsd
-
-package syscall
-
-import "unsafe"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
-	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
-	wpid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
-	_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
-	_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
-	_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
-	_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
-	r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
-	var _p0 unsafe.Pointer
-	if len(mib) > 0 {
-		_p0 = unsafe.Pointer(&mib[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe(p *[2]_C_int) (err error) {
-	_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getdents(fd int, buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
-	r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
-	nfd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
-	Syscall(SYS_EXIT, uintptr(code), 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
-	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
-	_, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
-	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
-	egid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
-	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
-	gid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
-	pgid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
-	r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
-	pgrp = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
-	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
-	pid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
-	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
-	ppid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
-	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
-	prio = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
-	sid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
-	r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
-	tainted = bool(r0 != 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, signum Signal) (err error) {
-	_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
-	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
-	_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
-	use(unsafe.Pointer(_p0))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
-	use(unsafe.Pointer(_p0))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(buf) > 0 {
-		_p1 = unsafe.Pointer(&buf[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
-	use(unsafe.Pointer(_p0))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(from)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(to)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
-	r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)
-	newoffset = int64(int64(r1)<<32 | int64(r0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
-	_, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(name)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
-	pid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
-	_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
-	r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
-	oldmask = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
-	r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)
-	ret = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
-	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
diff --git a/src/syscall/zsysnum_darwin_arm.go b/src/syscall/zsysnum_darwin_arm.go
deleted file mode 100644
index 1d76861..0000000
--- a/src/syscall/zsysnum_darwin_arm.go
+++ /dev/null
@@ -1,347 +0,0 @@
-// mksysnum_darwin.pl /usr/include/sys/syscall.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build arm,darwin
-
-package syscall
-
-const (
-	SYS_SYSCALL                   = 0
-	SYS_EXIT                      = 1
-	SYS_FORK                      = 2
-	SYS_READ                      = 3
-	SYS_WRITE                     = 4
-	SYS_OPEN                      = 5
-	SYS_CLOSE                     = 6
-	SYS_WAIT4                     = 7
-	SYS_LINK                      = 9
-	SYS_UNLINK                    = 10
-	SYS_CHDIR                     = 12
-	SYS_FCHDIR                    = 13
-	SYS_MKNOD                     = 14
-	SYS_CHMOD                     = 15
-	SYS_CHOWN                     = 16
-	SYS_OBREAK                    = 17
-	SYS_OGETFSSTAT                = 18
-	SYS_GETFSSTAT                 = 18
-	SYS_GETPID                    = 20
-	SYS_SETUID                    = 23
-	SYS_GETUID                    = 24
-	SYS_GETEUID                   = 25
-	SYS_PTRACE                    = 26
-	SYS_RECVMSG                   = 27
-	SYS_SENDMSG                   = 28
-	SYS_RECVFROM                  = 29
-	SYS_ACCEPT                    = 30
-	SYS_GETPEERNAME               = 31
-	SYS_GETSOCKNAME               = 32
-	SYS_ACCESS                    = 33
-	SYS_CHFLAGS                   = 34
-	SYS_FCHFLAGS                  = 35
-	SYS_SYNC                      = 36
-	SYS_KILL                      = 37
-	SYS_GETPPID                   = 39
-	SYS_DUP                       = 41
-	SYS_PIPE                      = 42
-	SYS_GETEGID                   = 43
-	SYS_PROFIL                    = 44
-	SYS_SIGACTION                 = 46
-	SYS_GETGID                    = 47
-	SYS_SIGPROCMASK               = 48
-	SYS_GETLOGIN                  = 49
-	SYS_SETLOGIN                  = 50
-	SYS_ACCT                      = 51
-	SYS_SIGPENDING                = 52
-	SYS_SIGALTSTACK               = 53
-	SYS_IOCTL                     = 54
-	SYS_REBOOT                    = 55
-	SYS_REVOKE                    = 56
-	SYS_SYMLINK                   = 57
-	SYS_READLINK                  = 58
-	SYS_EXECVE                    = 59
-	SYS_UMASK                     = 60
-	SYS_CHROOT                    = 61
-	SYS_MSYNC                     = 65
-	SYS_VFORK                     = 66
-	SYS_SBRK                      = 69
-	SYS_SSTK                      = 70
-	SYS_OVADVISE                  = 72
-	SYS_MUNMAP                    = 73
-	SYS_MPROTECT                  = 74
-	SYS_MADVISE                   = 75
-	SYS_MINCORE                   = 78
-	SYS_GETGROUPS                 = 79
-	SYS_SETGROUPS                 = 80
-	SYS_GETPGRP                   = 81
-	SYS_SETPGID                   = 82
-	SYS_SETITIMER                 = 83
-	SYS_SWAPON                    = 85
-	SYS_GETITIMER                 = 86
-	SYS_GETDTABLESIZE             = 89
-	SYS_DUP2                      = 90
-	SYS_FCNTL                     = 92
-	SYS_SELECT                    = 93
-	SYS_FSYNC                     = 95
-	SYS_SETPRIORITY               = 96
-	SYS_SOCKET                    = 97
-	SYS_CONNECT                   = 98
-	SYS_GETPRIORITY               = 100
-	SYS_BIND                      = 104
-	SYS_SETSOCKOPT                = 105
-	SYS_LISTEN                    = 106
-	SYS_SIGSUSPEND                = 111
-	SYS_GETTIMEOFDAY              = 116
-	SYS_GETRUSAGE                 = 117
-	SYS_GETSOCKOPT                = 118
-	SYS_READV                     = 120
-	SYS_WRITEV                    = 121
-	SYS_SETTIMEOFDAY              = 122
-	SYS_FCHOWN                    = 123
-	SYS_FCHMOD                    = 124
-	SYS_SETREUID                  = 126
-	SYS_SETREGID                  = 127
-	SYS_RENAME                    = 128
-	SYS_FLOCK                     = 131
-	SYS_MKFIFO                    = 132
-	SYS_SENDTO                    = 133
-	SYS_SHUTDOWN                  = 134
-	SYS_SOCKETPAIR                = 135
-	SYS_MKDIR                     = 136
-	SYS_RMDIR                     = 137
-	SYS_UTIMES                    = 138
-	SYS_FUTIMES                   = 139
-	SYS_ADJTIME                   = 140
-	SYS_GETHOSTUUID               = 142
-	SYS_SETSID                    = 147
-	SYS_GETPGID                   = 151
-	SYS_SETPRIVEXEC               = 152
-	SYS_PREAD                     = 153
-	SYS_PWRITE                    = 154
-	SYS_NFSSVC                    = 155
-	SYS_STATFS                    = 157
-	SYS_FSTATFS                   = 158
-	SYS_UNMOUNT                   = 159
-	SYS_GETFH                     = 161
-	SYS_QUOTACTL                  = 165
-	SYS_MOUNT                     = 167
-	SYS_CSOPS                     = 169
-	SYS_TABLE                     = 170
-	SYS_WAITID                    = 173
-	SYS_ADD_PROFIL                = 176
-	SYS_KDEBUG_TRACE              = 180
-	SYS_SETGID                    = 181
-	SYS_SETEGID                   = 182
-	SYS_SETEUID                   = 183
-	SYS_SIGRETURN                 = 184
-	SYS_CHUD                      = 185
-	SYS_STAT                      = 188
-	SYS_FSTAT                     = 189
-	SYS_LSTAT                     = 190
-	SYS_PATHCONF                  = 191
-	SYS_FPATHCONF                 = 192
-	SYS_GETRLIMIT                 = 194
-	SYS_SETRLIMIT                 = 195
-	SYS_GETDIRENTRIES             = 196
-	SYS_MMAP                      = 197
-	SYS_LSEEK                     = 199
-	SYS_TRUNCATE                  = 200
-	SYS_FTRUNCATE                 = 201
-	SYS___SYSCTL                  = 202
-	SYS_MLOCK                     = 203
-	SYS_MUNLOCK                   = 204
-	SYS_UNDELETE                  = 205
-	SYS_ATSOCKET                  = 206
-	SYS_ATGETMSG                  = 207
-	SYS_ATPUTMSG                  = 208
-	SYS_ATPSNDREQ                 = 209
-	SYS_ATPSNDRSP                 = 210
-	SYS_ATPGETREQ                 = 211
-	SYS_ATPGETRSP                 = 212
-	SYS_KQUEUE_FROM_PORTSET_NP    = 214
-	SYS_KQUEUE_PORTSET_NP         = 215
-	SYS_MKCOMPLEX                 = 216
-	SYS_STATV                     = 217
-	SYS_LSTATV                    = 218
-	SYS_FSTATV                    = 219
-	SYS_GETATTRLIST               = 220
-	SYS_SETATTRLIST               = 221
-	SYS_GETDIRENTRIESATTR         = 222
-	SYS_EXCHANGEDATA              = 223
-	SYS_SEARCHFS                  = 225
-	SYS_DELETE                    = 226
-	SYS_COPYFILE                  = 227
-	SYS_POLL                      = 230
-	SYS_WATCHEVENT                = 231
-	SYS_WAITEVENT                 = 232
-	SYS_MODWATCH                  = 233
-	SYS_GETXATTR                  = 234
-	SYS_FGETXATTR                 = 235
-	SYS_SETXATTR                  = 236
-	SYS_FSETXATTR                 = 237
-	SYS_REMOVEXATTR               = 238
-	SYS_FREMOVEXATTR              = 239
-	SYS_LISTXATTR                 = 240
-	SYS_FLISTXATTR                = 241
-	SYS_FSCTL                     = 242
-	SYS_INITGROUPS                = 243
-	SYS_POSIX_SPAWN               = 244
-	SYS_NFSCLNT                   = 247
-	SYS_FHOPEN                    = 248
-	SYS_MINHERIT                  = 250
-	SYS_SEMSYS                    = 251
-	SYS_MSGSYS                    = 252
-	SYS_SHMSYS                    = 253
-	SYS_SEMCTL                    = 254
-	SYS_SEMGET                    = 255
-	SYS_SEMOP                     = 256
-	SYS_MSGCTL                    = 258
-	SYS_MSGGET                    = 259
-	SYS_MSGSND                    = 260
-	SYS_MSGRCV                    = 261
-	SYS_SHMAT                     = 262
-	SYS_SHMCTL                    = 263
-	SYS_SHMDT                     = 264
-	SYS_SHMGET                    = 265
-	SYS_SHM_OPEN                  = 266
-	SYS_SHM_UNLINK                = 267
-	SYS_SEM_OPEN                  = 268
-	SYS_SEM_CLOSE                 = 269
-	SYS_SEM_UNLINK                = 270
-	SYS_SEM_WAIT                  = 271
-	SYS_SEM_TRYWAIT               = 272
-	SYS_SEM_POST                  = 273
-	SYS_SEM_GETVALUE              = 274
-	SYS_SEM_INIT                  = 275
-	SYS_SEM_DESTROY               = 276
-	SYS_OPEN_EXTENDED             = 277
-	SYS_UMASK_EXTENDED            = 278
-	SYS_STAT_EXTENDED             = 279
-	SYS_LSTAT_EXTENDED            = 280
-	SYS_FSTAT_EXTENDED            = 281
-	SYS_CHMOD_EXTENDED            = 282
-	SYS_FCHMOD_EXTENDED           = 283
-	SYS_ACCESS_EXTENDED           = 284
-	SYS_SETTID                    = 285
-	SYS_GETTID                    = 286
-	SYS_SETSGROUPS                = 287
-	SYS_GETSGROUPS                = 288
-	SYS_SETWGROUPS                = 289
-	SYS_GETWGROUPS                = 290
-	SYS_MKFIFO_EXTENDED           = 291
-	SYS_MKDIR_EXTENDED            = 292
-	SYS_IDENTITYSVC               = 293
-	SYS_SHARED_REGION_CHECK_NP    = 294
-	SYS_SHARED_REGION_MAP_NP      = 295
-	SYS___PTHREAD_MUTEX_DESTROY   = 301
-	SYS___PTHREAD_MUTEX_INIT      = 302
-	SYS___PTHREAD_MUTEX_LOCK      = 303
-	SYS___PTHREAD_MUTEX_TRYLOCK   = 304
-	SYS___PTHREAD_MUTEX_UNLOCK    = 305
-	SYS___PTHREAD_COND_INIT       = 306
-	SYS___PTHREAD_COND_DESTROY    = 307
-	SYS___PTHREAD_COND_BROADCAST  = 308
-	SYS___PTHREAD_COND_SIGNAL     = 309
-	SYS_GETSID                    = 310
-	SYS_SETTID_WITH_PID           = 311
-	SYS___PTHREAD_COND_TIMEDWAIT  = 312
-	SYS_AIO_FSYNC                 = 313
-	SYS_AIO_RETURN                = 314
-	SYS_AIO_SUSPEND               = 315
-	SYS_AIO_CANCEL                = 316
-	SYS_AIO_ERROR                 = 317
-	SYS_AIO_READ                  = 318
-	SYS_AIO_WRITE                 = 319
-	SYS_LIO_LISTIO                = 320
-	SYS___PTHREAD_COND_WAIT       = 321
-	SYS_IOPOLICYSYS               = 322
-	SYS_MLOCKALL                  = 324
-	SYS_MUNLOCKALL                = 325
-	SYS_ISSETUGID                 = 327
-	SYS___PTHREAD_KILL            = 328
-	SYS___PTHREAD_SIGMASK         = 329
-	SYS___SIGWAIT                 = 330
-	SYS___DISABLE_THREADSIGNAL    = 331
-	SYS___PTHREAD_MARKCANCEL      = 332
-	SYS___PTHREAD_CANCELED        = 333
-	SYS___SEMWAIT_SIGNAL          = 334
-	SYS_PROC_INFO                 = 336
-	SYS_SENDFILE                  = 337
-	SYS_STAT64                    = 338
-	SYS_FSTAT64                   = 339
-	SYS_LSTAT64                   = 340
-	SYS_STAT64_EXTENDED           = 341
-	SYS_LSTAT64_EXTENDED          = 342
-	SYS_FSTAT64_EXTENDED          = 343
-	SYS_GETDIRENTRIES64           = 344
-	SYS_STATFS64                  = 345
-	SYS_FSTATFS64                 = 346
-	SYS_GETFSSTAT64               = 347
-	SYS___PTHREAD_CHDIR           = 348
-	SYS___PTHREAD_FCHDIR          = 349
-	SYS_AUDIT                     = 350
-	SYS_AUDITON                   = 351
-	SYS_GETAUID                   = 353
-	SYS_SETAUID                   = 354
-	SYS_GETAUDIT                  = 355
-	SYS_SETAUDIT                  = 356
-	SYS_GETAUDIT_ADDR             = 357
-	SYS_SETAUDIT_ADDR             = 358
-	SYS_AUDITCTL                  = 359
-	SYS_BSDTHREAD_CREATE          = 360
-	SYS_BSDTHREAD_TERMINATE       = 361
-	SYS_KQUEUE                    = 362
-	SYS_KEVENT                    = 363
-	SYS_LCHOWN                    = 364
-	SYS_STACK_SNAPSHOT            = 365
-	SYS_BSDTHREAD_REGISTER        = 366
-	SYS_WORKQ_OPEN                = 367
-	SYS_WORKQ_OPS                 = 368
-	SYS___MAC_EXECVE              = 380
-	SYS___MAC_SYSCALL             = 381
-	SYS___MAC_GET_FILE            = 382
-	SYS___MAC_SET_FILE            = 383
-	SYS___MAC_GET_LINK            = 384
-	SYS___MAC_SET_LINK            = 385
-	SYS___MAC_GET_PROC            = 386
-	SYS___MAC_SET_PROC            = 387
-	SYS___MAC_GET_FD              = 388
-	SYS___MAC_SET_FD              = 389
-	SYS___MAC_GET_PID             = 390
-	SYS___MAC_GET_LCID            = 391
-	SYS___MAC_GET_LCTX            = 392
-	SYS___MAC_SET_LCTX            = 393
-	SYS_SETLCID                   = 394
-	SYS_GETLCID                   = 395
-	SYS_READ_NOCANCEL             = 396
-	SYS_WRITE_NOCANCEL            = 397
-	SYS_OPEN_NOCANCEL             = 398
-	SYS_CLOSE_NOCANCEL            = 399
-	SYS_WAIT4_NOCANCEL            = 400
-	SYS_RECVMSG_NOCANCEL          = 401
-	SYS_SENDMSG_NOCANCEL          = 402
-	SYS_RECVFROM_NOCANCEL         = 403
-	SYS_ACCEPT_NOCANCEL           = 404
-	SYS_MSYNC_NOCANCEL            = 405
-	SYS_FCNTL_NOCANCEL            = 406
-	SYS_SELECT_NOCANCEL           = 407
-	SYS_FSYNC_NOCANCEL            = 408
-	SYS_CONNECT_NOCANCEL          = 409
-	SYS_SIGSUSPEND_NOCANCEL       = 410
-	SYS_READV_NOCANCEL            = 411
-	SYS_WRITEV_NOCANCEL           = 412
-	SYS_SENDTO_NOCANCEL           = 413
-	SYS_PREAD_NOCANCEL            = 414
-	SYS_PWRITE_NOCANCEL           = 415
-	SYS_WAITID_NOCANCEL           = 416
-	SYS_POLL_NOCANCEL             = 417
-	SYS_MSGSND_NOCANCEL           = 418
-	SYS_MSGRCV_NOCANCEL           = 419
-	SYS_SEM_WAIT_NOCANCEL         = 420
-	SYS_AIO_SUSPEND_NOCANCEL      = 421
-	SYS___SIGWAIT_NOCANCEL        = 422
-	SYS___SEMWAIT_SIGNAL_NOCANCEL = 423
-	SYS___MAC_MOUNT               = 424
-	SYS___MAC_GET_MOUNT           = 425
-	SYS___MAC_GETFSSTAT           = 426
-	SYS_MAXSYSCALL                = 427
-)
diff --git a/src/syscall/zsysnum_darwin_arm64.go b/src/syscall/zsysnum_darwin_arm64.go
deleted file mode 100644
index ddf8e83..0000000
--- a/src/syscall/zsysnum_darwin_arm64.go
+++ /dev/null
@@ -1,358 +0,0 @@
-// mksysnum_darwin.pl /usr/include/sys/syscall.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build arm64,darwin
-
-package syscall
-
-const (
-	SYS_SYSCALL                        = 0
-	SYS_EXIT                           = 1
-	SYS_FORK                           = 2
-	SYS_READ                           = 3
-	SYS_WRITE                          = 4
-	SYS_OPEN                           = 5
-	SYS_CLOSE                          = 6
-	SYS_WAIT4                          = 7
-	SYS_LINK                           = 9
-	SYS_UNLINK                         = 10
-	SYS_CHDIR                          = 12
-	SYS_FCHDIR                         = 13
-	SYS_MKNOD                          = 14
-	SYS_CHMOD                          = 15
-	SYS_CHOWN                          = 16
-	SYS_GETFSSTAT                      = 18
-	SYS_GETPID                         = 20
-	SYS_SETUID                         = 23
-	SYS_GETUID                         = 24
-	SYS_GETEUID                        = 25
-	SYS_PTRACE                         = 26
-	SYS_RECVMSG                        = 27
-	SYS_SENDMSG                        = 28
-	SYS_RECVFROM                       = 29
-	SYS_ACCEPT                         = 30
-	SYS_GETPEERNAME                    = 31
-	SYS_GETSOCKNAME                    = 32
-	SYS_ACCESS                         = 33
-	SYS_CHFLAGS                        = 34
-	SYS_FCHFLAGS                       = 35
-	SYS_SYNC                           = 36
-	SYS_KILL                           = 37
-	SYS_GETPPID                        = 39
-	SYS_DUP                            = 41
-	SYS_PIPE                           = 42
-	SYS_GETEGID                        = 43
-	SYS_SIGACTION                      = 46
-	SYS_GETGID                         = 47
-	SYS_SIGPROCMASK                    = 48
-	SYS_GETLOGIN                       = 49
-	SYS_SETLOGIN                       = 50
-	SYS_ACCT                           = 51
-	SYS_SIGPENDING                     = 52
-	SYS_SIGALTSTACK                    = 53
-	SYS_IOCTL                          = 54
-	SYS_REBOOT                         = 55
-	SYS_REVOKE                         = 56
-	SYS_SYMLINK                        = 57
-	SYS_READLINK                       = 58
-	SYS_EXECVE                         = 59
-	SYS_UMASK                          = 60
-	SYS_CHROOT                         = 61
-	SYS_MSYNC                          = 65
-	SYS_VFORK                          = 66
-	SYS_MUNMAP                         = 73
-	SYS_MPROTECT                       = 74
-	SYS_MADVISE                        = 75
-	SYS_MINCORE                        = 78
-	SYS_GETGROUPS                      = 79
-	SYS_SETGROUPS                      = 80
-	SYS_GETPGRP                        = 81
-	SYS_SETPGID                        = 82
-	SYS_SETITIMER                      = 83
-	SYS_SWAPON                         = 85
-	SYS_GETITIMER                      = 86
-	SYS_GETDTABLESIZE                  = 89
-	SYS_DUP2                           = 90
-	SYS_FCNTL                          = 92
-	SYS_SELECT                         = 93
-	SYS_FSYNC                          = 95
-	SYS_SETPRIORITY                    = 96
-	SYS_SOCKET                         = 97
-	SYS_CONNECT                        = 98
-	SYS_GETPRIORITY                    = 100
-	SYS_BIND                           = 104
-	SYS_SETSOCKOPT                     = 105
-	SYS_LISTEN                         = 106
-	SYS_SIGSUSPEND                     = 111
-	SYS_GETTIMEOFDAY                   = 116
-	SYS_GETRUSAGE                      = 117
-	SYS_GETSOCKOPT                     = 118
-	SYS_READV                          = 120
-	SYS_WRITEV                         = 121
-	SYS_SETTIMEOFDAY                   = 122
-	SYS_FCHOWN                         = 123
-	SYS_FCHMOD                         = 124
-	SYS_SETREUID                       = 126
-	SYS_SETREGID                       = 127
-	SYS_RENAME                         = 128
-	SYS_FLOCK                          = 131
-	SYS_MKFIFO                         = 132
-	SYS_SENDTO                         = 133
-	SYS_SHUTDOWN                       = 134
-	SYS_SOCKETPAIR                     = 135
-	SYS_MKDIR                          = 136
-	SYS_RMDIR                          = 137
-	SYS_UTIMES                         = 138
-	SYS_FUTIMES                        = 139
-	SYS_ADJTIME                        = 140
-	SYS_GETHOSTUUID                    = 142
-	SYS_SETSID                         = 147
-	SYS_GETPGID                        = 151
-	SYS_SETPRIVEXEC                    = 152
-	SYS_PREAD                          = 153
-	SYS_PWRITE                         = 154
-	SYS_NFSSVC                         = 155
-	SYS_STATFS                         = 157
-	SYS_FSTATFS                        = 158
-	SYS_UNMOUNT                        = 159
-	SYS_GETFH                          = 161
-	SYS_QUOTACTL                       = 165
-	SYS_MOUNT                          = 167
-	SYS_CSOPS                          = 169
-	SYS_CSOPS_AUDITTOKEN               = 170
-	SYS_WAITID                         = 173
-	SYS_KDEBUG_TRACE                   = 180
-	SYS_SETGID                         = 181
-	SYS_SETEGID                        = 182
-	SYS_SETEUID                        = 183
-	SYS_SIGRETURN                      = 184
-	SYS_CHUD                           = 185
-	SYS_FDATASYNC                      = 187
-	SYS_STAT                           = 188
-	SYS_FSTAT                          = 189
-	SYS_LSTAT                          = 190
-	SYS_PATHCONF                       = 191
-	SYS_FPATHCONF                      = 192
-	SYS_GETRLIMIT                      = 194
-	SYS_SETRLIMIT                      = 195
-	SYS_GETDIRENTRIES                  = 196
-	SYS_MMAP                           = 197
-	SYS_LSEEK                          = 199
-	SYS_TRUNCATE                       = 200
-	SYS_FTRUNCATE                      = 201
-	SYS___SYSCTL                       = 202
-	SYS_MLOCK                          = 203
-	SYS_MUNLOCK                        = 204
-	SYS_UNDELETE                       = 205
-	SYS_ATSOCKET                       = 206
-	SYS_ATGETMSG                       = 207
-	SYS_ATPUTMSG                       = 208
-	SYS_ATPSNDREQ                      = 209
-	SYS_ATPSNDRSP                      = 210
-	SYS_ATPGETREQ                      = 211
-	SYS_ATPGETRSP                      = 212
-	SYS_OPEN_DPROTECTED_NP             = 216
-	SYS_GETATTRLIST                    = 220
-	SYS_SETATTRLIST                    = 221
-	SYS_GETDIRENTRIESATTR              = 222
-	SYS_EXCHANGEDATA                   = 223
-	SYS_SEARCHFS                       = 225
-	SYS_DELETE                         = 226
-	SYS_COPYFILE                       = 227
-	SYS_FGETATTRLIST                   = 228
-	SYS_FSETATTRLIST                   = 229
-	SYS_POLL                           = 230
-	SYS_WATCHEVENT                     = 231
-	SYS_WAITEVENT                      = 232
-	SYS_MODWATCH                       = 233
-	SYS_GETXATTR                       = 234
-	SYS_FGETXATTR                      = 235
-	SYS_SETXATTR                       = 236
-	SYS_FSETXATTR                      = 237
-	SYS_REMOVEXATTR                    = 238
-	SYS_FREMOVEXATTR                   = 239
-	SYS_LISTXATTR                      = 240
-	SYS_FLISTXATTR                     = 241
-	SYS_FSCTL                          = 242
-	SYS_INITGROUPS                     = 243
-	SYS_POSIX_SPAWN                    = 244
-	SYS_FFSCTL                         = 245
-	SYS_NFSCLNT                        = 247
-	SYS_FHOPEN                         = 248
-	SYS_MINHERIT                       = 250
-	SYS_SEMSYS                         = 251
-	SYS_MSGSYS                         = 252
-	SYS_SHMSYS                         = 253
-	SYS_SEMCTL                         = 254
-	SYS_SEMGET                         = 255
-	SYS_SEMOP                          = 256
-	SYS_MSGCTL                         = 258
-	SYS_MSGGET                         = 259
-	SYS_MSGSND                         = 260
-	SYS_MSGRCV                         = 261
-	SYS_SHMAT                          = 262
-	SYS_SHMCTL                         = 263
-	SYS_SHMDT                          = 264
-	SYS_SHMGET                         = 265
-	SYS_SHM_OPEN                       = 266
-	SYS_SHM_UNLINK                     = 267
-	SYS_SEM_OPEN                       = 268
-	SYS_SEM_CLOSE                      = 269
-	SYS_SEM_UNLINK                     = 270
-	SYS_SEM_WAIT                       = 271
-	SYS_SEM_TRYWAIT                    = 272
-	SYS_SEM_POST                       = 273
-	SYS_SEM_GETVALUE                   = 274
-	SYS_SEM_INIT                       = 275
-	SYS_SEM_DESTROY                    = 276
-	SYS_OPEN_EXTENDED                  = 277
-	SYS_UMASK_EXTENDED                 = 278
-	SYS_STAT_EXTENDED                  = 279
-	SYS_LSTAT_EXTENDED                 = 280
-	SYS_FSTAT_EXTENDED                 = 281
-	SYS_CHMOD_EXTENDED                 = 282
-	SYS_FCHMOD_EXTENDED                = 283
-	SYS_ACCESS_EXTENDED                = 284
-	SYS_SETTID                         = 285
-	SYS_GETTID                         = 286
-	SYS_SETSGROUPS                     = 287
-	SYS_GETSGROUPS                     = 288
-	SYS_SETWGROUPS                     = 289
-	SYS_GETWGROUPS                     = 290
-	SYS_MKFIFO_EXTENDED                = 291
-	SYS_MKDIR_EXTENDED                 = 292
-	SYS_IDENTITYSVC                    = 293
-	SYS_SHARED_REGION_CHECK_NP         = 294
-	SYS_VM_PRESSURE_MONITOR            = 296
-	SYS_PSYNCH_RW_LONGRDLOCK           = 297
-	SYS_PSYNCH_RW_YIELDWRLOCK          = 298
-	SYS_PSYNCH_RW_DOWNGRADE            = 299
-	SYS_PSYNCH_RW_UPGRADE              = 300
-	SYS_PSYNCH_MUTEXWAIT               = 301
-	SYS_PSYNCH_MUTEXDROP               = 302
-	SYS_PSYNCH_CVBROAD                 = 303
-	SYS_PSYNCH_CVSIGNAL                = 304
-	SYS_PSYNCH_CVWAIT                  = 305
-	SYS_PSYNCH_RW_RDLOCK               = 306
-	SYS_PSYNCH_RW_WRLOCK               = 307
-	SYS_PSYNCH_RW_UNLOCK               = 308
-	SYS_PSYNCH_RW_UNLOCK2              = 309
-	SYS_GETSID                         = 310
-	SYS_SETTID_WITH_PID                = 311
-	SYS_PSYNCH_CVCLRPREPOST            = 312
-	SYS_AIO_FSYNC                      = 313
-	SYS_AIO_RETURN                     = 314
-	SYS_AIO_SUSPEND                    = 315
-	SYS_AIO_CANCEL                     = 316
-	SYS_AIO_ERROR                      = 317
-	SYS_AIO_READ                       = 318
-	SYS_AIO_WRITE                      = 319
-	SYS_LIO_LISTIO                     = 320
-	SYS_IOPOLICYSYS                    = 322
-	SYS_PROCESS_POLICY                 = 323
-	SYS_MLOCKALL                       = 324
-	SYS_MUNLOCKALL                     = 325
-	SYS_ISSETUGID                      = 327
-	SYS___PTHREAD_KILL                 = 328
-	SYS___PTHREAD_SIGMASK              = 329
-	SYS___SIGWAIT                      = 330
-	SYS___DISABLE_THREADSIGNAL         = 331
-	SYS___PTHREAD_MARKCANCEL           = 332
-	SYS___PTHREAD_CANCELED             = 333
-	SYS___SEMWAIT_SIGNAL               = 334
-	SYS_PROC_INFO                      = 336
-	SYS_SENDFILE                       = 337
-	SYS_STAT64                         = 338
-	SYS_FSTAT64                        = 339
-	SYS_LSTAT64                        = 340
-	SYS_STAT64_EXTENDED                = 341
-	SYS_LSTAT64_EXTENDED               = 342
-	SYS_FSTAT64_EXTENDED               = 343
-	SYS_GETDIRENTRIES64                = 344
-	SYS_STATFS64                       = 345
-	SYS_FSTATFS64                      = 346
-	SYS_GETFSSTAT64                    = 347
-	SYS___PTHREAD_CHDIR                = 348
-	SYS___PTHREAD_FCHDIR               = 349
-	SYS_AUDIT                          = 350
-	SYS_AUDITON                        = 351
-	SYS_GETAUID                        = 353
-	SYS_SETAUID                        = 354
-	SYS_GETAUDIT_ADDR                  = 357
-	SYS_SETAUDIT_ADDR                  = 358
-	SYS_AUDITCTL                       = 359
-	SYS_BSDTHREAD_CREATE               = 360
-	SYS_BSDTHREAD_TERMINATE            = 361
-	SYS_KQUEUE                         = 362
-	SYS_KEVENT                         = 363
-	SYS_LCHOWN                         = 364
-	SYS_STACK_SNAPSHOT                 = 365
-	SYS_BSDTHREAD_REGISTER             = 366
-	SYS_WORKQ_OPEN                     = 367
-	SYS_WORKQ_KERNRETURN               = 368
-	SYS_KEVENT64                       = 369
-	SYS___OLD_SEMWAIT_SIGNAL           = 370
-	SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL  = 371
-	SYS_THREAD_SELFID                  = 372
-	SYS_LEDGER                         = 373
-	SYS___MAC_EXECVE                   = 380
-	SYS___MAC_SYSCALL                  = 381
-	SYS___MAC_GET_FILE                 = 382
-	SYS___MAC_SET_FILE                 = 383
-	SYS___MAC_GET_LINK                 = 384
-	SYS___MAC_SET_LINK                 = 385
-	SYS___MAC_GET_PROC                 = 386
-	SYS___MAC_SET_PROC                 = 387
-	SYS___MAC_GET_FD                   = 388
-	SYS___MAC_SET_FD                   = 389
-	SYS___MAC_GET_PID                  = 390
-	SYS___MAC_GET_LCID                 = 391
-	SYS___MAC_GET_LCTX                 = 392
-	SYS___MAC_SET_LCTX                 = 393
-	SYS_SETLCID                        = 394
-	SYS_GETLCID                        = 395
-	SYS_READ_NOCANCEL                  = 396
-	SYS_WRITE_NOCANCEL                 = 397
-	SYS_OPEN_NOCANCEL                  = 398
-	SYS_CLOSE_NOCANCEL                 = 399
-	SYS_WAIT4_NOCANCEL                 = 400
-	SYS_RECVMSG_NOCANCEL               = 401
-	SYS_SENDMSG_NOCANCEL               = 402
-	SYS_RECVFROM_NOCANCEL              = 403
-	SYS_ACCEPT_NOCANCEL                = 404
-	SYS_MSYNC_NOCANCEL                 = 405
-	SYS_FCNTL_NOCANCEL                 = 406
-	SYS_SELECT_NOCANCEL                = 407
-	SYS_FSYNC_NOCANCEL                 = 408
-	SYS_CONNECT_NOCANCEL               = 409
-	SYS_SIGSUSPEND_NOCANCEL            = 410
-	SYS_READV_NOCANCEL                 = 411
-	SYS_WRITEV_NOCANCEL                = 412
-	SYS_SENDTO_NOCANCEL                = 413
-	SYS_PREAD_NOCANCEL                 = 414
-	SYS_PWRITE_NOCANCEL                = 415
-	SYS_WAITID_NOCANCEL                = 416
-	SYS_POLL_NOCANCEL                  = 417
-	SYS_MSGSND_NOCANCEL                = 418
-	SYS_MSGRCV_NOCANCEL                = 419
-	SYS_SEM_WAIT_NOCANCEL              = 420
-	SYS_AIO_SUSPEND_NOCANCEL           = 421
-	SYS___SIGWAIT_NOCANCEL             = 422
-	SYS___SEMWAIT_SIGNAL_NOCANCEL      = 423
-	SYS___MAC_MOUNT                    = 424
-	SYS___MAC_GET_MOUNT                = 425
-	SYS___MAC_GETFSSTAT                = 426
-	SYS_FSGETPATH                      = 427
-	SYS_AUDIT_SESSION_SELF             = 428
-	SYS_AUDIT_SESSION_JOIN             = 429
-	SYS_FILEPORT_MAKEPORT              = 430
-	SYS_FILEPORT_MAKEFD                = 431
-	SYS_AUDIT_SESSION_PORT             = 432
-	SYS_PID_SUSPEND                    = 433
-	SYS_PID_RESUME                     = 434
-	SYS_PID_HIBERNATE                  = 435
-	SYS_PID_SHUTDOWN_SOCKETS           = 436
-	SYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438
-	SYS_KAS_INFO                       = 439
-	SYS_MAXSYSCALL                     = 440
-)
diff --git a/src/syscall/zsysnum_linux_arm64.go b/src/syscall/zsysnum_linux_arm64.go
deleted file mode 100644
index d53712c..0000000
--- a/src/syscall/zsysnum_linux_arm64.go
+++ /dev/null
@@ -1,277 +0,0 @@
-// mksysnum_linux.pl /usr/include/asm-generic/unistd.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build arm64,linux
-
-package syscall
-
-const (
-	SYS_IO_SETUP               = 0
-	SYS_IO_DESTROY             = 1
-	SYS_IO_SUBMIT              = 2
-	SYS_IO_CANCEL              = 3
-	SYS_IO_GETEVENTS           = 4
-	SYS_SETXATTR               = 5
-	SYS_LSETXATTR              = 6
-	SYS_FSETXATTR              = 7
-	SYS_GETXATTR               = 8
-	SYS_LGETXATTR              = 9
-	SYS_FGETXATTR              = 10
-	SYS_LISTXATTR              = 11
-	SYS_LLISTXATTR             = 12
-	SYS_FLISTXATTR             = 13
-	SYS_REMOVEXATTR            = 14
-	SYS_LREMOVEXATTR           = 15
-	SYS_FREMOVEXATTR           = 16
-	SYS_GETCWD                 = 17
-	SYS_LOOKUP_DCOOKIE         = 18
-	SYS_EVENTFD2               = 19
-	SYS_EPOLL_CREATE1          = 20
-	SYS_EPOLL_CTL              = 21
-	SYS_EPOLL_PWAIT            = 22
-	SYS_DUP                    = 23
-	SYS_DUP3                   = 24
-	SYS_FCNTL                  = 25
-	SYS_INOTIFY_INIT1          = 26
-	SYS_INOTIFY_ADD_WATCH      = 27
-	SYS_INOTIFY_RM_WATCH       = 28
-	SYS_IOCTL                  = 29
-	SYS_IOPRIO_SET             = 30
-	SYS_IOPRIO_GET             = 31
-	SYS_FLOCK                  = 32
-	SYS_MKNODAT                = 33
-	SYS_MKDIRAT                = 34
-	SYS_UNLINKAT               = 35
-	SYS_SYMLINKAT              = 36
-	SYS_LINKAT                 = 37
-	SYS_RENAMEAT               = 38
-	SYS_UMOUNT2                = 39
-	SYS_MOUNT                  = 40
-	SYS_PIVOT_ROOT             = 41
-	SYS_NFSSERVCTL             = 42
-	SYS_STATFS                 = 43
-	SYS_FSTATFS                = 44
-	SYS_TRUNCATE               = 45
-	SYS_FTRUNCATE              = 46
-	SYS_FALLOCATE              = 47
-	SYS_FACCESSAT              = 48
-	SYS_CHDIR                  = 49
-	SYS_FCHDIR                 = 50
-	SYS_CHROOT                 = 51
-	SYS_FCHMOD                 = 52
-	SYS_FCHMODAT               = 53
-	SYS_FCHOWNAT               = 54
-	SYS_FCHOWN                 = 55
-	SYS_OPENAT                 = 56
-	SYS_CLOSE                  = 57
-	SYS_VHANGUP                = 58
-	SYS_PIPE2                  = 59
-	SYS_QUOTACTL               = 60
-	SYS_GETDENTS64             = 61
-	SYS_LSEEK                  = 62
-	SYS_READ                   = 63
-	SYS_WRITE                  = 64
-	SYS_READV                  = 65
-	SYS_WRITEV                 = 66
-	SYS_PREAD64                = 67
-	SYS_PWRITE64               = 68
-	SYS_PREADV                 = 69
-	SYS_PWRITEV                = 70
-	SYS_SENDFILE               = 71
-	SYS_PSELECT6               = 72
-	SYS_PPOLL                  = 73
-	SYS_SIGNALFD4              = 74
-	SYS_VMSPLICE               = 75
-	SYS_SPLICE                 = 76
-	SYS_TEE                    = 77
-	SYS_READLINKAT             = 78
-	SYS_FSTATAT                = 79
-	SYS_FSTAT                  = 80
-	SYS_SYNC                   = 81
-	SYS_FSYNC                  = 82
-	SYS_FDATASYNC              = 83
-	SYS_SYNC_FILE_RANGE2       = 84
-	SYS_SYNC_FILE_RANGE        = 84
-	SYS_TIMERFD_CREATE         = 85
-	SYS_TIMERFD_SETTIME        = 86
-	SYS_TIMERFD_GETTIME        = 87
-	SYS_UTIMENSAT              = 88
-	SYS_ACCT                   = 89
-	SYS_CAPGET                 = 90
-	SYS_CAPSET                 = 91
-	SYS_PERSONALITY            = 92
-	SYS_EXIT                   = 93
-	SYS_EXIT_GROUP             = 94
-	SYS_WAITID                 = 95
-	SYS_SET_TID_ADDRESS        = 96
-	SYS_UNSHARE                = 97
-	SYS_FUTEX                  = 98
-	SYS_SET_ROBUST_LIST        = 99
-	SYS_GET_ROBUST_LIST        = 100
-	SYS_NANOSLEEP              = 101
-	SYS_GETITIMER              = 102
-	SYS_SETITIMER              = 103
-	SYS_KEXEC_LOAD             = 104
-	SYS_INIT_MODULE            = 105
-	SYS_DELETE_MODULE          = 106
-	SYS_TIMER_CREATE           = 107
-	SYS_TIMER_GETTIME          = 108
-	SYS_TIMER_GETOVERRUN       = 109
-	SYS_TIMER_SETTIME          = 110
-	SYS_TIMER_DELETE           = 111
-	SYS_CLOCK_SETTIME          = 112
-	SYS_CLOCK_GETTIME          = 113
-	SYS_CLOCK_GETRES           = 114
-	SYS_CLOCK_NANOSLEEP        = 115
-	SYS_SYSLOG                 = 116
-	SYS_PTRACE                 = 117
-	SYS_SCHED_SETPARAM         = 118
-	SYS_SCHED_SETSCHEDULER     = 119
-	SYS_SCHED_GETSCHEDULER     = 120
-	SYS_SCHED_GETPARAM         = 121
-	SYS_SCHED_SETAFFINITY      = 122
-	SYS_SCHED_GETAFFINITY      = 123
-	SYS_SCHED_YIELD            = 124
-	SYS_SCHED_GET_PRIORITY_MAX = 125
-	SYS_SCHED_GET_PRIORITY_MIN = 126
-	SYS_SCHED_RR_GET_INTERVAL  = 127
-	SYS_RESTART_SYSCALL        = 128
-	SYS_KILL                   = 129
-	SYS_TKILL                  = 130
-	SYS_TGKILL                 = 131
-	SYS_SIGALTSTACK            = 132
-	SYS_RT_SIGSUSPEND          = 133
-	SYS_RT_SIGACTION           = 134
-	SYS_RT_SIGPROCMASK         = 135
-	SYS_RT_SIGPENDING          = 136
-	SYS_RT_SIGTIMEDWAIT        = 137
-	SYS_RT_SIGQUEUEINFO        = 138
-	SYS_RT_SIGRETURN           = 139
-	SYS_SETPRIORITY            = 140
-	SYS_GETPRIORITY            = 141
-	SYS_REBOOT                 = 142
-	SYS_SETREGID               = 143
-	SYS_SETGID                 = 144
-	SYS_SETREUID               = 145
-	SYS_SETUID                 = 146
-	SYS_SETRESUID              = 147
-	SYS_GETRESUID              = 148
-	SYS_SETRESGID              = 149
-	SYS_GETRESGID              = 150
-	SYS_SETFSUID               = 151
-	SYS_SETFSGID               = 152
-	SYS_TIMES                  = 153
-	SYS_SETPGID                = 154
-	SYS_GETPGID                = 155
-	SYS_GETSID                 = 156
-	SYS_SETSID                 = 157
-	SYS_GETGROUPS              = 158
-	SYS_SETGROUPS              = 159
-	SYS_UNAME                  = 160
-	SYS_SETHOSTNAME            = 161
-	SYS_SETDOMAINNAME          = 162
-	SYS_GETRLIMIT              = 163
-	SYS_SETRLIMIT              = 164
-	SYS_GETRUSAGE              = 165
-	SYS_UMASK                  = 166
-	SYS_PRCTL                  = 167
-	SYS_GETCPU                 = 168
-	SYS_GETTIMEOFDAY           = 169
-	SYS_SETTIMEOFDAY           = 170
-	SYS_ADJTIMEX               = 171
-	SYS_GETPID                 = 172
-	SYS_GETPPID                = 173
-	SYS_GETUID                 = 174
-	SYS_GETEUID                = 175
-	SYS_GETGID                 = 176
-	SYS_GETEGID                = 177
-	SYS_GETTID                 = 178
-	SYS_SYSINFO                = 179
-	SYS_MQ_OPEN                = 180
-	SYS_MQ_UNLINK              = 181
-	SYS_MQ_TIMEDSEND           = 182
-	SYS_MQ_TIMEDRECEIVE        = 183
-	SYS_MQ_NOTIFY              = 184
-	SYS_MQ_GETSETATTR          = 185
-	SYS_MSGGET                 = 186
-	SYS_MSGCTL                 = 187
-	SYS_MSGRCV                 = 188
-	SYS_MSGSND                 = 189
-	SYS_SEMGET                 = 190
-	SYS_SEMCTL                 = 191
-	SYS_SEMTIMEDOP             = 192
-	SYS_SEMOP                  = 193
-	SYS_SHMGET                 = 194
-	SYS_SHMCTL                 = 195
-	SYS_SHMAT                  = 196
-	SYS_SHMDT                  = 197
-	SYS_SOCKET                 = 198
-	SYS_SOCKETPAIR             = 199
-	SYS_BIND                   = 200
-	SYS_LISTEN                 = 201
-	SYS_ACCEPT                 = 202
-	SYS_CONNECT                = 203
-	SYS_GETSOCKNAME            = 204
-	SYS_GETPEERNAME            = 205
-	SYS_SENDTO                 = 206
-	SYS_RECVFROM               = 207
-	SYS_SETSOCKOPT             = 208
-	SYS_GETSOCKOPT             = 209
-	SYS_SHUTDOWN               = 210
-	SYS_SENDMSG                = 211
-	SYS_RECVMSG                = 212
-	SYS_READAHEAD              = 213
-	SYS_BRK                    = 214
-	SYS_MUNMAP                 = 215
-	SYS_MREMAP                 = 216
-	SYS_ADD_KEY                = 217
-	SYS_REQUEST_KEY            = 218
-	SYS_KEYCTL                 = 219
-	SYS_CLONE                  = 220
-	SYS_EXECVE                 = 221
-	SYS_MMAP                   = 222
-	SYS_FADVISE64              = 223
-	SYS_SWAPON                 = 224
-	SYS_SWAPOFF                = 225
-	SYS_MPROTECT               = 226
-	SYS_MSYNC                  = 227
-	SYS_MLOCK                  = 228
-	SYS_MUNLOCK                = 229
-	SYS_MLOCKALL               = 230
-	SYS_MUNLOCKALL             = 231
-	SYS_MINCORE                = 232
-	SYS_MADVISE                = 233
-	SYS_REMAP_FILE_PAGES       = 234
-	SYS_MBIND                  = 235
-	SYS_GET_MEMPOLICY          = 236
-	SYS_SET_MEMPOLICY          = 237
-	SYS_MIGRATE_PAGES          = 238
-	SYS_MOVE_PAGES             = 239
-	SYS_RT_TGSIGQUEUEINFO      = 240
-	SYS_PERF_EVENT_OPEN        = 241
-	SYS_ACCEPT4                = 242
-	SYS_RECVMMSG               = 243
-	SYS_ARCH_SPECIFIC_SYSCALL  = 244
-	SYS_WAIT4                  = 260
-	SYS_PRLIMIT64              = 261
-	SYS_FANOTIFY_INIT          = 262
-	SYS_FANOTIFY_MARK          = 263
-	SYS_NAME_TO_HANDLE_AT      = 264
-	SYS_OPEN_BY_HANDLE_AT      = 265
-	SYS_CLOCK_ADJTIME          = 266
-	SYS_SYNCFS                 = 267
-	SYS_SETNS                  = 268
-	SYS_SENDMMSG               = 269
-	SYS_PROCESS_VM_READV       = 270
-	SYS_PROCESS_VM_WRITEV      = 271
-	SYS_KCMP                   = 272
-	SYS_FINIT_MODULE           = 273
-	SYS_SCHED_SETATTR          = 274
-	SYS_SCHED_GETATTR          = 275
-	SYS_RENAMEAT2              = 276
-	SYS_SECCOMP                = 277
-	SYS_GETRANDOM              = 278
-	SYS_MEMFD_CREATE           = 279
-	SYS_BPF                    = 280
-	SYS_EXECVEAT               = 281
-)
diff --git a/src/syscall/zsysnum_linux_ppc64.go b/src/syscall/zsysnum_linux_ppc64.go
deleted file mode 100644
index 82d253a..0000000
--- a/src/syscall/zsysnum_linux_ppc64.go
+++ /dev/null
@@ -1,353 +0,0 @@
-// mksysnum_linux.pl /usr/include/asm/unistd.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build ppc64,linux
-
-package syscall
-
-const (
-	SYS_RESTART_SYSCALL        = 0
-	SYS_EXIT                   = 1
-	SYS_FORK                   = 2
-	SYS_READ                   = 3
-	SYS_WRITE                  = 4
-	SYS_OPEN                   = 5
-	SYS_CLOSE                  = 6
-	SYS_WAITPID                = 7
-	SYS_CREAT                  = 8
-	SYS_LINK                   = 9
-	SYS_UNLINK                 = 10
-	SYS_EXECVE                 = 11
-	SYS_CHDIR                  = 12
-	SYS_TIME                   = 13
-	SYS_MKNOD                  = 14
-	SYS_CHMOD                  = 15
-	SYS_LCHOWN                 = 16
-	SYS_BREAK                  = 17
-	SYS_OLDSTAT                = 18
-	SYS_LSEEK                  = 19
-	SYS_GETPID                 = 20
-	SYS_MOUNT                  = 21
-	SYS_UMOUNT                 = 22
-	SYS_SETUID                 = 23
-	SYS_GETUID                 = 24
-	SYS_STIME                  = 25
-	SYS_PTRACE                 = 26
-	SYS_ALARM                  = 27
-	SYS_OLDFSTAT               = 28
-	SYS_PAUSE                  = 29
-	SYS_UTIME                  = 30
-	SYS_STTY                   = 31
-	SYS_GTTY                   = 32
-	SYS_ACCESS                 = 33
-	SYS_NICE                   = 34
-	SYS_FTIME                  = 35
-	SYS_SYNC                   = 36
-	SYS_KILL                   = 37
-	SYS_RENAME                 = 38
-	SYS_MKDIR                  = 39
-	SYS_RMDIR                  = 40
-	SYS_DUP                    = 41
-	SYS_PIPE                   = 42
-	SYS_TIMES                  = 43
-	SYS_PROF                   = 44
-	SYS_BRK                    = 45
-	SYS_SETGID                 = 46
-	SYS_GETGID                 = 47
-	SYS_SIGNAL                 = 48
-	SYS_GETEUID                = 49
-	SYS_GETEGID                = 50
-	SYS_ACCT                   = 51
-	SYS_UMOUNT2                = 52
-	SYS_LOCK                   = 53
-	SYS_IOCTL                  = 54
-	SYS_FCNTL                  = 55
-	SYS_MPX                    = 56
-	SYS_SETPGID                = 57
-	SYS_ULIMIT                 = 58
-	SYS_OLDOLDUNAME            = 59
-	SYS_UMASK                  = 60
-	SYS_CHROOT                 = 61
-	SYS_USTAT                  = 62
-	SYS_DUP2                   = 63
-	SYS_GETPPID                = 64
-	SYS_GETPGRP                = 65
-	SYS_SETSID                 = 66
-	SYS_SIGACTION              = 67
-	SYS_SGETMASK               = 68
-	SYS_SSETMASK               = 69
-	SYS_SETREUID               = 70
-	SYS_SETREGID               = 71
-	SYS_SIGSUSPEND             = 72
-	SYS_SIGPENDING             = 73
-	SYS_SETHOSTNAME            = 74
-	SYS_SETRLIMIT              = 75
-	SYS_GETRLIMIT              = 76
-	SYS_GETRUSAGE              = 77
-	SYS_GETTIMEOFDAY           = 78
-	SYS_SETTIMEOFDAY           = 79
-	SYS_GETGROUPS              = 80
-	SYS_SETGROUPS              = 81
-	SYS_SELECT                 = 82
-	SYS_SYMLINK                = 83
-	SYS_OLDLSTAT               = 84
-	SYS_READLINK               = 85
-	SYS_USELIB                 = 86
-	SYS_SWAPON                 = 87
-	SYS_REBOOT                 = 88
-	SYS_READDIR                = 89
-	SYS_MMAP                   = 90
-	SYS_MUNMAP                 = 91
-	SYS_TRUNCATE               = 92
-	SYS_FTRUNCATE              = 93
-	SYS_FCHMOD                 = 94
-	SYS_FCHOWN                 = 95
-	SYS_GETPRIORITY            = 96
-	SYS_SETPRIORITY            = 97
-	SYS_PROFIL                 = 98
-	SYS_STATFS                 = 99
-	SYS_FSTATFS                = 100
-	SYS_IOPERM                 = 101
-	SYS_SOCKETCALL             = 102
-	SYS_SYSLOG                 = 103
-	SYS_SETITIMER              = 104
-	SYS_GETITIMER              = 105
-	SYS_STAT                   = 106
-	SYS_LSTAT                  = 107
-	SYS_FSTAT                  = 108
-	SYS_OLDUNAME               = 109
-	SYS_IOPL                   = 110
-	SYS_VHANGUP                = 111
-	SYS_IDLE                   = 112
-	SYS_VM86                   = 113
-	SYS_WAIT4                  = 114
-	SYS_SWAPOFF                = 115
-	SYS_SYSINFO                = 116
-	SYS_IPC                    = 117
-	SYS_FSYNC                  = 118
-	SYS_SIGRETURN              = 119
-	SYS_CLONE                  = 120
-	SYS_SETDOMAINNAME          = 121
-	SYS_UNAME                  = 122
-	SYS_MODIFY_LDT             = 123
-	SYS_ADJTIMEX               = 124
-	SYS_MPROTECT               = 125
-	SYS_SIGPROCMASK            = 126
-	SYS_CREATE_MODULE          = 127
-	SYS_INIT_MODULE            = 128
-	SYS_DELETE_MODULE          = 129
-	SYS_GET_KERNEL_SYMS        = 130
-	SYS_QUOTACTL               = 131
-	SYS_GETPGID                = 132
-	SYS_FCHDIR                 = 133
-	SYS_BDFLUSH                = 134
-	SYS_SYSFS                  = 135
-	SYS_PERSONALITY            = 136
-	SYS_AFS_SYSCALL            = 137
-	SYS_SETFSUID               = 138
-	SYS_SETFSGID               = 139
-	SYS__LLSEEK                = 140
-	SYS_GETDENTS               = 141
-	SYS__NEWSELECT             = 142
-	SYS_FLOCK                  = 143
-	SYS_MSYNC                  = 144
-	SYS_READV                  = 145
-	SYS_WRITEV                 = 146
-	SYS_GETSID                 = 147
-	SYS_FDATASYNC              = 148
-	SYS__SYSCTL                = 149
-	SYS_MLOCK                  = 150
-	SYS_MUNLOCK                = 151
-	SYS_MLOCKALL               = 152
-	SYS_MUNLOCKALL             = 153
-	SYS_SCHED_SETPARAM         = 154
-	SYS_SCHED_GETPARAM         = 155
-	SYS_SCHED_SETSCHEDULER     = 156
-	SYS_SCHED_GETSCHEDULER     = 157
-	SYS_SCHED_YIELD            = 158
-	SYS_SCHED_GET_PRIORITY_MAX = 159
-	SYS_SCHED_GET_PRIORITY_MIN = 160
-	SYS_SCHED_RR_GET_INTERVAL  = 161
-	SYS_NANOSLEEP              = 162
-	SYS_MREMAP                 = 163
-	SYS_SETRESUID              = 164
-	SYS_GETRESUID              = 165
-	SYS_QUERY_MODULE           = 166
-	SYS_POLL                   = 167
-	SYS_NFSSERVCTL             = 168
-	SYS_SETRESGID              = 169
-	SYS_GETRESGID              = 170
-	SYS_PRCTL                  = 171
-	SYS_RT_SIGRETURN           = 172
-	SYS_RT_SIGACTION           = 173
-	SYS_RT_SIGPROCMASK         = 174
-	SYS_RT_SIGPENDING          = 175
-	SYS_RT_SIGTIMEDWAIT        = 176
-	SYS_RT_SIGQUEUEINFO        = 177
-	SYS_RT_SIGSUSPEND          = 178
-	SYS_PREAD64                = 179
-	SYS_PWRITE64               = 180
-	SYS_CHOWN                  = 181
-	SYS_GETCWD                 = 182
-	SYS_CAPGET                 = 183
-	SYS_CAPSET                 = 184
-	SYS_SIGALTSTACK            = 185
-	SYS_SENDFILE               = 186
-	SYS_GETPMSG                = 187
-	SYS_PUTPMSG                = 188
-	SYS_VFORK                  = 189
-	SYS_UGETRLIMIT             = 190
-	SYS_READAHEAD              = 191
-	SYS_PCICONFIG_READ         = 198
-	SYS_PCICONFIG_WRITE        = 199
-	SYS_PCICONFIG_IOBASE       = 200
-	SYS_MULTIPLEXER            = 201
-	SYS_GETDENTS64             = 202
-	SYS_PIVOT_ROOT             = 203
-	SYS_MADVISE                = 205
-	SYS_MINCORE                = 206
-	SYS_GETTID                 = 207
-	SYS_TKILL                  = 208
-	SYS_SETXATTR               = 209
-	SYS_LSETXATTR              = 210
-	SYS_FSETXATTR              = 211
-	SYS_GETXATTR               = 212
-	SYS_LGETXATTR              = 213
-	SYS_FGETXATTR              = 214
-	SYS_LISTXATTR              = 215
-	SYS_LLISTXATTR             = 216
-	SYS_FLISTXATTR             = 217
-	SYS_REMOVEXATTR            = 218
-	SYS_LREMOVEXATTR           = 219
-	SYS_FREMOVEXATTR           = 220
-	SYS_FUTEX                  = 221
-	SYS_SCHED_SETAFFINITY      = 222
-	SYS_SCHED_GETAFFINITY      = 223
-	SYS_TUXCALL                = 225
-	SYS_IO_SETUP               = 227
-	SYS_IO_DESTROY             = 228
-	SYS_IO_GETEVENTS           = 229
-	SYS_IO_SUBMIT              = 230
-	SYS_IO_CANCEL              = 231
-	SYS_SET_TID_ADDRESS        = 232
-	SYS_FADVISE64              = 233
-	SYS_EXIT_GROUP             = 234
-	SYS_LOOKUP_DCOOKIE         = 235
-	SYS_EPOLL_CREATE           = 236
-	SYS_EPOLL_CTL              = 237
-	SYS_EPOLL_WAIT             = 238
-	SYS_REMAP_FILE_PAGES       = 239
-	SYS_TIMER_CREATE           = 240
-	SYS_TIMER_SETTIME          = 241
-	SYS_TIMER_GETTIME          = 242
-	SYS_TIMER_GETOVERRUN       = 243
-	SYS_TIMER_DELETE           = 244
-	SYS_CLOCK_SETTIME          = 245
-	SYS_CLOCK_GETTIME          = 246
-	SYS_CLOCK_GETRES           = 247
-	SYS_CLOCK_NANOSLEEP        = 248
-	SYS_SWAPCONTEXT            = 249
-	SYS_TGKILL                 = 250
-	SYS_UTIMES                 = 251
-	SYS_STATFS64               = 252
-	SYS_FSTATFS64              = 253
-	SYS_RTAS                   = 255
-	SYS_SYS_DEBUG_SETCONTEXT   = 256
-	SYS_MIGRATE_PAGES          = 258
-	SYS_MBIND                  = 259
-	SYS_GET_MEMPOLICY          = 260
-	SYS_SET_MEMPOLICY          = 261
-	SYS_MQ_OPEN                = 262
-	SYS_MQ_UNLINK              = 263
-	SYS_MQ_TIMEDSEND           = 264
-	SYS_MQ_TIMEDRECEIVE        = 265
-	SYS_MQ_NOTIFY              = 266
-	SYS_MQ_GETSETATTR          = 267
-	SYS_KEXEC_LOAD             = 268
-	SYS_ADD_KEY                = 269
-	SYS_REQUEST_KEY            = 270
-	SYS_KEYCTL                 = 271
-	SYS_WAITID                 = 272
-	SYS_IOPRIO_SET             = 273
-	SYS_IOPRIO_GET             = 274
-	SYS_INOTIFY_INIT           = 275
-	SYS_INOTIFY_ADD_WATCH      = 276
-	SYS_INOTIFY_RM_WATCH       = 277
-	SYS_SPU_RUN                = 278
-	SYS_SPU_CREATE             = 279
-	SYS_PSELECT6               = 280
-	SYS_PPOLL                  = 281
-	SYS_UNSHARE                = 282
-	SYS_SPLICE                 = 283
-	SYS_TEE                    = 284
-	SYS_VMSPLICE               = 285
-	SYS_OPENAT                 = 286
-	SYS_MKDIRAT                = 287
-	SYS_MKNODAT                = 288
-	SYS_FCHOWNAT               = 289
-	SYS_FUTIMESAT              = 290
-	SYS_NEWFSTATAT             = 291
-	SYS_UNLINKAT               = 292
-	SYS_RENAMEAT               = 293
-	SYS_LINKAT                 = 294
-	SYS_SYMLINKAT              = 295
-	SYS_READLINKAT             = 296
-	SYS_FCHMODAT               = 297
-	SYS_FACCESSAT              = 298
-	SYS_GET_ROBUST_LIST        = 299
-	SYS_SET_ROBUST_LIST        = 300
-	SYS_MOVE_PAGES             = 301
-	SYS_GETCPU                 = 302
-	SYS_EPOLL_PWAIT            = 303
-	SYS_UTIMENSAT              = 304
-	SYS_SIGNALFD               = 305
-	SYS_TIMERFD_CREATE         = 306
-	SYS_EVENTFD                = 307
-	SYS_SYNC_FILE_RANGE2       = 308
-	SYS_FALLOCATE              = 309
-	SYS_SUBPAGE_PROT           = 310
-	SYS_TIMERFD_SETTIME        = 311
-	SYS_TIMERFD_GETTIME        = 312
-	SYS_SIGNALFD4              = 313
-	SYS_EVENTFD2               = 314
-	SYS_EPOLL_CREATE1          = 315
-	SYS_DUP3                   = 316
-	SYS_PIPE2                  = 317
-	SYS_INOTIFY_INIT1          = 318
-	SYS_PERF_EVENT_OPEN        = 319
-	SYS_PREADV                 = 320
-	SYS_PWRITEV                = 321
-	SYS_RT_TGSIGQUEUEINFO      = 322
-	SYS_FANOTIFY_INIT          = 323
-	SYS_FANOTIFY_MARK          = 324
-	SYS_PRLIMIT64              = 325
-	SYS_SOCKET                 = 326
-	SYS_BIND                   = 327
-	SYS_CONNECT                = 328
-	SYS_LISTEN                 = 329
-	SYS_ACCEPT                 = 330
-	SYS_GETSOCKNAME            = 331
-	SYS_GETPEERNAME            = 332
-	SYS_SOCKETPAIR             = 333
-	SYS_SEND                   = 334
-	SYS_SENDTO                 = 335
-	SYS_RECV                   = 336
-	SYS_RECVFROM               = 337
-	SYS_SHUTDOWN               = 338
-	SYS_SETSOCKOPT             = 339
-	SYS_GETSOCKOPT             = 340
-	SYS_SENDMSG                = 341
-	SYS_RECVMSG                = 342
-	SYS_RECVMMSG               = 343
-	SYS_ACCEPT4                = 344
-	SYS_NAME_TO_HANDLE_AT      = 345
-	SYS_OPEN_BY_HANDLE_AT      = 346
-	SYS_CLOCK_ADJTIME          = 347
-	SYS_SYNCFS                 = 348
-	SYS_SENDMMSG               = 349
-	SYS_SETNS                  = 350
-	SYS_PROCESS_VM_READV       = 351
-	SYS_PROCESS_VM_WRITEV      = 352
-	SYS_FINIT_MODULE           = 353
-	SYS_KCMP                   = 354
-)
diff --git a/src/syscall/zsysnum_linux_ppc64le.go b/src/syscall/zsysnum_linux_ppc64le.go
deleted file mode 100644
index 3af4e83..0000000
--- a/src/syscall/zsysnum_linux_ppc64le.go
+++ /dev/null
@@ -1,353 +0,0 @@
-// mksysnum_linux.pl /usr/include/powerpc64le-linux-gnu/asm/unistd.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build ppc64le,linux
-
-package syscall
-
-const (
-	SYS_RESTART_SYSCALL        = 0
-	SYS_EXIT                   = 1
-	SYS_FORK                   = 2
-	SYS_READ                   = 3
-	SYS_WRITE                  = 4
-	SYS_OPEN                   = 5
-	SYS_CLOSE                  = 6
-	SYS_WAITPID                = 7
-	SYS_CREAT                  = 8
-	SYS_LINK                   = 9
-	SYS_UNLINK                 = 10
-	SYS_EXECVE                 = 11
-	SYS_CHDIR                  = 12
-	SYS_TIME                   = 13
-	SYS_MKNOD                  = 14
-	SYS_CHMOD                  = 15
-	SYS_LCHOWN                 = 16
-	SYS_BREAK                  = 17
-	SYS_OLDSTAT                = 18
-	SYS_LSEEK                  = 19
-	SYS_GETPID                 = 20
-	SYS_MOUNT                  = 21
-	SYS_UMOUNT                 = 22
-	SYS_SETUID                 = 23
-	SYS_GETUID                 = 24
-	SYS_STIME                  = 25
-	SYS_PTRACE                 = 26
-	SYS_ALARM                  = 27
-	SYS_OLDFSTAT               = 28
-	SYS_PAUSE                  = 29
-	SYS_UTIME                  = 30
-	SYS_STTY                   = 31
-	SYS_GTTY                   = 32
-	SYS_ACCESS                 = 33
-	SYS_NICE                   = 34
-	SYS_FTIME                  = 35
-	SYS_SYNC                   = 36
-	SYS_KILL                   = 37
-	SYS_RENAME                 = 38
-	SYS_MKDIR                  = 39
-	SYS_RMDIR                  = 40
-	SYS_DUP                    = 41
-	SYS_PIPE                   = 42
-	SYS_TIMES                  = 43
-	SYS_PROF                   = 44
-	SYS_BRK                    = 45
-	SYS_SETGID                 = 46
-	SYS_GETGID                 = 47
-	SYS_SIGNAL                 = 48
-	SYS_GETEUID                = 49
-	SYS_GETEGID                = 50
-	SYS_ACCT                   = 51
-	SYS_UMOUNT2                = 52
-	SYS_LOCK                   = 53
-	SYS_IOCTL                  = 54
-	SYS_FCNTL                  = 55
-	SYS_MPX                    = 56
-	SYS_SETPGID                = 57
-	SYS_ULIMIT                 = 58
-	SYS_OLDOLDUNAME            = 59
-	SYS_UMASK                  = 60
-	SYS_CHROOT                 = 61
-	SYS_USTAT                  = 62
-	SYS_DUP2                   = 63
-	SYS_GETPPID                = 64
-	SYS_GETPGRP                = 65
-	SYS_SETSID                 = 66
-	SYS_SIGACTION              = 67
-	SYS_SGETMASK               = 68
-	SYS_SSETMASK               = 69
-	SYS_SETREUID               = 70
-	SYS_SETREGID               = 71
-	SYS_SIGSUSPEND             = 72
-	SYS_SIGPENDING             = 73
-	SYS_SETHOSTNAME            = 74
-	SYS_SETRLIMIT              = 75
-	SYS_GETRLIMIT              = 76
-	SYS_GETRUSAGE              = 77
-	SYS_GETTIMEOFDAY           = 78
-	SYS_SETTIMEOFDAY           = 79
-	SYS_GETGROUPS              = 80
-	SYS_SETGROUPS              = 81
-	SYS_SELECT                 = 82
-	SYS_SYMLINK                = 83
-	SYS_OLDLSTAT               = 84
-	SYS_READLINK               = 85
-	SYS_USELIB                 = 86
-	SYS_SWAPON                 = 87
-	SYS_REBOOT                 = 88
-	SYS_READDIR                = 89
-	SYS_MMAP                   = 90
-	SYS_MUNMAP                 = 91
-	SYS_TRUNCATE               = 92
-	SYS_FTRUNCATE              = 93
-	SYS_FCHMOD                 = 94
-	SYS_FCHOWN                 = 95
-	SYS_GETPRIORITY            = 96
-	SYS_SETPRIORITY            = 97
-	SYS_PROFIL                 = 98
-	SYS_STATFS                 = 99
-	SYS_FSTATFS                = 100
-	SYS_IOPERM                 = 101
-	SYS_SOCKETCALL             = 102
-	SYS_SYSLOG                 = 103
-	SYS_SETITIMER              = 104
-	SYS_GETITIMER              = 105
-	SYS_STAT                   = 106
-	SYS_LSTAT                  = 107
-	SYS_FSTAT                  = 108
-	SYS_OLDUNAME               = 109
-	SYS_IOPL                   = 110
-	SYS_VHANGUP                = 111
-	SYS_IDLE                   = 112
-	SYS_VM86                   = 113
-	SYS_WAIT4                  = 114
-	SYS_SWAPOFF                = 115
-	SYS_SYSINFO                = 116
-	SYS_IPC                    = 117
-	SYS_FSYNC                  = 118
-	SYS_SIGRETURN              = 119
-	SYS_CLONE                  = 120
-	SYS_SETDOMAINNAME          = 121
-	SYS_UNAME                  = 122
-	SYS_MODIFY_LDT             = 123
-	SYS_ADJTIMEX               = 124
-	SYS_MPROTECT               = 125
-	SYS_SIGPROCMASK            = 126
-	SYS_CREATE_MODULE          = 127
-	SYS_INIT_MODULE            = 128
-	SYS_DELETE_MODULE          = 129
-	SYS_GET_KERNEL_SYMS        = 130
-	SYS_QUOTACTL               = 131
-	SYS_GETPGID                = 132
-	SYS_FCHDIR                 = 133
-	SYS_BDFLUSH                = 134
-	SYS_SYSFS                  = 135
-	SYS_PERSONALITY            = 136
-	SYS_AFS_SYSCALL            = 137
-	SYS_SETFSUID               = 138
-	SYS_SETFSGID               = 139
-	SYS__LLSEEK                = 140
-	SYS_GETDENTS               = 141
-	SYS__NEWSELECT             = 142
-	SYS_FLOCK                  = 143
-	SYS_MSYNC                  = 144
-	SYS_READV                  = 145
-	SYS_WRITEV                 = 146
-	SYS_GETSID                 = 147
-	SYS_FDATASYNC              = 148
-	SYS__SYSCTL                = 149
-	SYS_MLOCK                  = 150
-	SYS_MUNLOCK                = 151
-	SYS_MLOCKALL               = 152
-	SYS_MUNLOCKALL             = 153
-	SYS_SCHED_SETPARAM         = 154
-	SYS_SCHED_GETPARAM         = 155
-	SYS_SCHED_SETSCHEDULER     = 156
-	SYS_SCHED_GETSCHEDULER     = 157
-	SYS_SCHED_YIELD            = 158
-	SYS_SCHED_GET_PRIORITY_MAX = 159
-	SYS_SCHED_GET_PRIORITY_MIN = 160
-	SYS_SCHED_RR_GET_INTERVAL  = 161
-	SYS_NANOSLEEP              = 162
-	SYS_MREMAP                 = 163
-	SYS_SETRESUID              = 164
-	SYS_GETRESUID              = 165
-	SYS_QUERY_MODULE           = 166
-	SYS_POLL                   = 167
-	SYS_NFSSERVCTL             = 168
-	SYS_SETRESGID              = 169
-	SYS_GETRESGID              = 170
-	SYS_PRCTL                  = 171
-	SYS_RT_SIGRETURN           = 172
-	SYS_RT_SIGACTION           = 173
-	SYS_RT_SIGPROCMASK         = 174
-	SYS_RT_SIGPENDING          = 175
-	SYS_RT_SIGTIMEDWAIT        = 176
-	SYS_RT_SIGQUEUEINFO        = 177
-	SYS_RT_SIGSUSPEND          = 178
-	SYS_PREAD64                = 179
-	SYS_PWRITE64               = 180
-	SYS_CHOWN                  = 181
-	SYS_GETCWD                 = 182
-	SYS_CAPGET                 = 183
-	SYS_CAPSET                 = 184
-	SYS_SIGALTSTACK            = 185
-	SYS_SENDFILE               = 186
-	SYS_GETPMSG                = 187
-	SYS_PUTPMSG                = 188
-	SYS_VFORK                  = 189
-	SYS_UGETRLIMIT             = 190
-	SYS_READAHEAD              = 191
-	SYS_PCICONFIG_READ         = 198
-	SYS_PCICONFIG_WRITE        = 199
-	SYS_PCICONFIG_IOBASE       = 200
-	SYS_MULTIPLEXER            = 201
-	SYS_GETDENTS64             = 202
-	SYS_PIVOT_ROOT             = 203
-	SYS_MADVISE                = 205
-	SYS_MINCORE                = 206
-	SYS_GETTID                 = 207
-	SYS_TKILL                  = 208
-	SYS_SETXATTR               = 209
-	SYS_LSETXATTR              = 210
-	SYS_FSETXATTR              = 211
-	SYS_GETXATTR               = 212
-	SYS_LGETXATTR              = 213
-	SYS_FGETXATTR              = 214
-	SYS_LISTXATTR              = 215
-	SYS_LLISTXATTR             = 216
-	SYS_FLISTXATTR             = 217
-	SYS_REMOVEXATTR            = 218
-	SYS_LREMOVEXATTR           = 219
-	SYS_FREMOVEXATTR           = 220
-	SYS_FUTEX                  = 221
-	SYS_SCHED_SETAFFINITY      = 222
-	SYS_SCHED_GETAFFINITY      = 223
-	SYS_TUXCALL                = 225
-	SYS_IO_SETUP               = 227
-	SYS_IO_DESTROY             = 228
-	SYS_IO_GETEVENTS           = 229
-	SYS_IO_SUBMIT              = 230
-	SYS_IO_CANCEL              = 231
-	SYS_SET_TID_ADDRESS        = 232
-	SYS_FADVISE64              = 233
-	SYS_EXIT_GROUP             = 234
-	SYS_LOOKUP_DCOOKIE         = 235
-	SYS_EPOLL_CREATE           = 236
-	SYS_EPOLL_CTL              = 237
-	SYS_EPOLL_WAIT             = 238
-	SYS_REMAP_FILE_PAGES       = 239
-	SYS_TIMER_CREATE           = 240
-	SYS_TIMER_SETTIME          = 241
-	SYS_TIMER_GETTIME          = 242
-	SYS_TIMER_GETOVERRUN       = 243
-	SYS_TIMER_DELETE           = 244
-	SYS_CLOCK_SETTIME          = 245
-	SYS_CLOCK_GETTIME          = 246
-	SYS_CLOCK_GETRES           = 247
-	SYS_CLOCK_NANOSLEEP        = 248
-	SYS_SWAPCONTEXT            = 249
-	SYS_TGKILL                 = 250
-	SYS_UTIMES                 = 251
-	SYS_STATFS64               = 252
-	SYS_FSTATFS64              = 253
-	SYS_RTAS                   = 255
-	SYS_SYS_DEBUG_SETCONTEXT   = 256
-	SYS_MIGRATE_PAGES          = 258
-	SYS_MBIND                  = 259
-	SYS_GET_MEMPOLICY          = 260
-	SYS_SET_MEMPOLICY          = 261
-	SYS_MQ_OPEN                = 262
-	SYS_MQ_UNLINK              = 263
-	SYS_MQ_TIMEDSEND           = 264
-	SYS_MQ_TIMEDRECEIVE        = 265
-	SYS_MQ_NOTIFY              = 266
-	SYS_MQ_GETSETATTR          = 267
-	SYS_KEXEC_LOAD             = 268
-	SYS_ADD_KEY                = 269
-	SYS_REQUEST_KEY            = 270
-	SYS_KEYCTL                 = 271
-	SYS_WAITID                 = 272
-	SYS_IOPRIO_SET             = 273
-	SYS_IOPRIO_GET             = 274
-	SYS_INOTIFY_INIT           = 275
-	SYS_INOTIFY_ADD_WATCH      = 276
-	SYS_INOTIFY_RM_WATCH       = 277
-	SYS_SPU_RUN                = 278
-	SYS_SPU_CREATE             = 279
-	SYS_PSELECT6               = 280
-	SYS_PPOLL                  = 281
-	SYS_UNSHARE                = 282
-	SYS_SPLICE                 = 283
-	SYS_TEE                    = 284
-	SYS_VMSPLICE               = 285
-	SYS_OPENAT                 = 286
-	SYS_MKDIRAT                = 287
-	SYS_MKNODAT                = 288
-	SYS_FCHOWNAT               = 289
-	SYS_FUTIMESAT              = 290
-	SYS_NEWFSTATAT             = 291
-	SYS_UNLINKAT               = 292
-	SYS_RENAMEAT               = 293
-	SYS_LINKAT                 = 294
-	SYS_SYMLINKAT              = 295
-	SYS_READLINKAT             = 296
-	SYS_FCHMODAT               = 297
-	SYS_FACCESSAT              = 298
-	SYS_GET_ROBUST_LIST        = 299
-	SYS_SET_ROBUST_LIST        = 300
-	SYS_MOVE_PAGES             = 301
-	SYS_GETCPU                 = 302
-	SYS_EPOLL_PWAIT            = 303
-	SYS_UTIMENSAT              = 304
-	SYS_SIGNALFD               = 305
-	SYS_TIMERFD_CREATE         = 306
-	SYS_EVENTFD                = 307
-	SYS_SYNC_FILE_RANGE2       = 308
-	SYS_FALLOCATE              = 309
-	SYS_SUBPAGE_PROT           = 310
-	SYS_TIMERFD_SETTIME        = 311
-	SYS_TIMERFD_GETTIME        = 312
-	SYS_SIGNALFD4              = 313
-	SYS_EVENTFD2               = 314
-	SYS_EPOLL_CREATE1          = 315
-	SYS_DUP3                   = 316
-	SYS_PIPE2                  = 317
-	SYS_INOTIFY_INIT1          = 318
-	SYS_PERF_EVENT_OPEN        = 319
-	SYS_PREADV                 = 320
-	SYS_PWRITEV                = 321
-	SYS_RT_TGSIGQUEUEINFO      = 322
-	SYS_FANOTIFY_INIT          = 323
-	SYS_FANOTIFY_MARK          = 324
-	SYS_PRLIMIT64              = 325
-	SYS_SOCKET                 = 326
-	SYS_BIND                   = 327
-	SYS_CONNECT                = 328
-	SYS_LISTEN                 = 329
-	SYS_ACCEPT                 = 330
-	SYS_GETSOCKNAME            = 331
-	SYS_GETPEERNAME            = 332
-	SYS_SOCKETPAIR             = 333
-	SYS_SEND                   = 334
-	SYS_SENDTO                 = 335
-	SYS_RECV                   = 336
-	SYS_RECVFROM               = 337
-	SYS_SHUTDOWN               = 338
-	SYS_SETSOCKOPT             = 339
-	SYS_GETSOCKOPT             = 340
-	SYS_SENDMSG                = 341
-	SYS_RECVMSG                = 342
-	SYS_RECVMMSG               = 343
-	SYS_ACCEPT4                = 344
-	SYS_NAME_TO_HANDLE_AT      = 345
-	SYS_OPEN_BY_HANDLE_AT      = 346
-	SYS_CLOCK_ADJTIME          = 347
-	SYS_SYNCFS                 = 348
-	SYS_SENDMMSG               = 349
-	SYS_SETNS                  = 350
-	SYS_PROCESS_VM_READV       = 351
-	SYS_PROCESS_VM_WRITEV      = 352
-	SYS_FINIT_MODULE           = 353
-	SYS_KCMP                   = 354
-)
diff --git a/src/syscall/zsysnum_openbsd_arm.go b/src/syscall/zsysnum_openbsd_arm.go
deleted file mode 100644
index 38b43ca..0000000
--- a/src/syscall/zsysnum_openbsd_arm.go
+++ /dev/null
@@ -1,213 +0,0 @@
-// mksysnum_openbsd.pl
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build arm,openbsd
-
-package syscall
-
-const (
-	SYS_EXIT           = 1   // { void sys_exit(int rval); }
-	SYS_FORK           = 2   // { int sys_fork(void); }
-	SYS_READ           = 3   // { ssize_t sys_read(int fd, void *buf, size_t nbyte); }
-	SYS_WRITE          = 4   // { ssize_t sys_write(int fd, const void *buf, \
-	SYS_OPEN           = 5   // { int sys_open(const char *path, \
-	SYS_CLOSE          = 6   // { int sys_close(int fd); }
-	SYS_GETENTROPY     = 7   // { int sys_getentropy(void *buf, size_t nbyte); }
-	SYS___TFORK        = 8   // { int sys___tfork(const struct __tfork *param, \
-	SYS_LINK           = 9   // { int sys_link(const char *path, const char *link); }
-	SYS_UNLINK         = 10  // { int sys_unlink(const char *path); }
-	SYS_WAIT4          = 11  // { pid_t sys_wait4(pid_t pid, int *status, \
-	SYS_CHDIR          = 12  // { int sys_chdir(const char *path); }
-	SYS_FCHDIR         = 13  // { int sys_fchdir(int fd); }
-	SYS_MKNOD          = 14  // { int sys_mknod(const char *path, mode_t mode, \
-	SYS_CHMOD          = 15  // { int sys_chmod(const char *path, mode_t mode); }
-	SYS_CHOWN          = 16  // { int sys_chown(const char *path, uid_t uid, \
-	SYS_OBREAK         = 17  // { int sys_obreak(char *nsize); } break
-	SYS_GETDTABLECOUNT = 18  // { int sys_getdtablecount(void); }
-	SYS_GETRUSAGE      = 19  // { int sys_getrusage(int who, \
-	SYS_GETPID         = 20  // { pid_t sys_getpid(void); }
-	SYS_MOUNT          = 21  // { int sys_mount(const char *type, const char *path, \
-	SYS_UNMOUNT        = 22  // { int sys_unmount(const char *path, int flags); }
-	SYS_SETUID         = 23  // { int sys_setuid(uid_t uid); }
-	SYS_GETUID         = 24  // { uid_t sys_getuid(void); }
-	SYS_GETEUID        = 25  // { uid_t sys_geteuid(void); }
-	SYS_PTRACE         = 26  // { int sys_ptrace(int req, pid_t pid, caddr_t addr, \
-	SYS_RECVMSG        = 27  // { ssize_t sys_recvmsg(int s, struct msghdr *msg, \
-	SYS_SENDMSG        = 28  // { ssize_t sys_sendmsg(int s, \
-	SYS_RECVFROM       = 29  // { ssize_t sys_recvfrom(int s, void *buf, size_t len, \
-	SYS_ACCEPT         = 30  // { int sys_accept(int s, struct sockaddr *name, \
-	SYS_GETPEERNAME    = 31  // { int sys_getpeername(int fdes, struct sockaddr *asa, \
-	SYS_GETSOCKNAME    = 32  // { int sys_getsockname(int fdes, struct sockaddr *asa, \
-	SYS_ACCESS         = 33  // { int sys_access(const char *path, int amode); }
-	SYS_CHFLAGS        = 34  // { int sys_chflags(const char *path, u_int flags); }
-	SYS_FCHFLAGS       = 35  // { int sys_fchflags(int fd, u_int flags); }
-	SYS_SYNC           = 36  // { void sys_sync(void); }
-	SYS_KILL           = 37  // { int sys_kill(int pid, int signum); }
-	SYS_STAT           = 38  // { int sys_stat(const char *path, struct stat *ub); }
-	SYS_GETPPID        = 39  // { pid_t sys_getppid(void); }
-	SYS_LSTAT          = 40  // { int sys_lstat(const char *path, struct stat *ub); }
-	SYS_DUP            = 41  // { int sys_dup(int fd); }
-	SYS_FSTATAT        = 42  // { int sys_fstatat(int fd, const char *path, \
-	SYS_GETEGID        = 43  // { gid_t sys_getegid(void); }
-	SYS_PROFIL         = 44  // { int sys_profil(caddr_t samples, size_t size, \
-	SYS_KTRACE         = 45  // { int sys_ktrace(const char *fname, int ops, \
-	SYS_SIGACTION      = 46  // { int sys_sigaction(int signum, \
-	SYS_GETGID         = 47  // { gid_t sys_getgid(void); }
-	SYS_SIGPROCMASK    = 48  // { int sys_sigprocmask(int how, sigset_t mask); }
-	SYS_GETLOGIN       = 49  // { int sys_getlogin(char *namebuf, u_int namelen); }
-	SYS_SETLOGIN       = 50  // { int sys_setlogin(const char *namebuf); }
-	SYS_ACCT           = 51  // { int sys_acct(const char *path); }
-	SYS_SIGPENDING     = 52  // { int sys_sigpending(void); }
-	SYS_FSTAT          = 53  // { int sys_fstat(int fd, struct stat *sb); }
-	SYS_IOCTL          = 54  // { int sys_ioctl(int fd, \
-	SYS_REBOOT         = 55  // { int sys_reboot(int opt); }
-	SYS_REVOKE         = 56  // { int sys_revoke(const char *path); }
-	SYS_SYMLINK        = 57  // { int sys_symlink(const char *path, \
-	SYS_READLINK       = 58  // { ssize_t sys_readlink(const char *path, \
-	SYS_EXECVE         = 59  // { int sys_execve(const char *path, \
-	SYS_UMASK          = 60  // { mode_t sys_umask(mode_t newmask); }
-	SYS_CHROOT         = 61  // { int sys_chroot(const char *path); }
-	SYS_GETFSSTAT      = 62  // { int sys_getfsstat(struct statfs *buf, size_t bufsize, \
-	SYS_STATFS         = 63  // { int sys_statfs(const char *path, \
-	SYS_FSTATFS        = 64  // { int sys_fstatfs(int fd, struct statfs *buf); }
-	SYS_FHSTATFS       = 65  // { int sys_fhstatfs(const fhandle_t *fhp, \
-	SYS_VFORK          = 66  // { int sys_vfork(void); }
-	SYS_GETTIMEOFDAY   = 67  // { int sys_gettimeofday(struct timeval *tp, \
-	SYS_SETTIMEOFDAY   = 68  // { int sys_settimeofday(const struct timeval *tv, \
-	SYS_SETITIMER      = 69  // { int sys_setitimer(int which, \
-	SYS_GETITIMER      = 70  // { int sys_getitimer(int which, \
-	SYS_SELECT         = 71  // { int sys_select(int nd, fd_set *in, fd_set *ou, \
-	SYS_KEVENT         = 72  // { int sys_kevent(int fd, \
-	SYS_MUNMAP         = 73  // { int sys_munmap(void *addr, size_t len); }
-	SYS_MPROTECT       = 74  // { int sys_mprotect(void *addr, size_t len, \
-	SYS_MADVISE        = 75  // { int sys_madvise(void *addr, size_t len, \
-	SYS_UTIMES         = 76  // { int sys_utimes(const char *path, \
-	SYS_FUTIMES        = 77  // { int sys_futimes(int fd, \
-	SYS_MINCORE        = 78  // { int sys_mincore(void *addr, size_t len, \
-	SYS_GETGROUPS      = 79  // { int sys_getgroups(int gidsetsize, \
-	SYS_SETGROUPS      = 80  // { int sys_setgroups(int gidsetsize, \
-	SYS_GETPGRP        = 81  // { int sys_getpgrp(void); }
-	SYS_SETPGID        = 82  // { int sys_setpgid(pid_t pid, pid_t pgid); }
-	SYS_SENDSYSLOG     = 83  // { int sys_sendsyslog(const void *buf, size_t nbyte); }
-	SYS_UTIMENSAT      = 84  // { int sys_utimensat(int fd, const char *path, \
-	SYS_FUTIMENS       = 85  // { int sys_futimens(int fd, \
-	SYS_CLOCK_GETTIME  = 87  // { int sys_clock_gettime(clockid_t clock_id, \
-	SYS_CLOCK_SETTIME  = 88  // { int sys_clock_settime(clockid_t clock_id, \
-	SYS_CLOCK_GETRES   = 89  // { int sys_clock_getres(clockid_t clock_id, \
-	SYS_DUP2           = 90  // { int sys_dup2(int from, int to); }
-	SYS_NANOSLEEP      = 91  // { int sys_nanosleep(const struct timespec *rqtp, \
-	SYS_FCNTL          = 92  // { int sys_fcntl(int fd, int cmd, ... void *arg); }
-	SYS_ACCEPT4        = 93  // { int sys_accept4(int s, struct sockaddr *name, \
-	SYS___THRSLEEP     = 94  // { int sys___thrsleep(const volatile void *ident, \
-	SYS_FSYNC          = 95  // { int sys_fsync(int fd); }
-	SYS_SETPRIORITY    = 96  // { int sys_setpriority(int which, id_t who, int prio); }
-	SYS_SOCKET         = 97  // { int sys_socket(int domain, int type, int protocol); }
-	SYS_CONNECT        = 98  // { int sys_connect(int s, const struct sockaddr *name, \
-	SYS_GETDENTS       = 99  // { int sys_getdents(int fd, void *buf, size_t buflen); }
-	SYS_GETPRIORITY    = 100 // { int sys_getpriority(int which, id_t who); }
-	SYS_PIPE2          = 101 // { int sys_pipe2(int *fdp, int flags); }
-	SYS_DUP3           = 102 // { int sys_dup3(int from, int to, int flags); }
-	SYS_SIGRETURN      = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }
-	SYS_BIND           = 104 // { int sys_bind(int s, const struct sockaddr *name, \
-	SYS_SETSOCKOPT     = 105 // { int sys_setsockopt(int s, int level, int name, \
-	SYS_LISTEN         = 106 // { int sys_listen(int s, int backlog); }
-	SYS_CHFLAGSAT      = 107 // { int sys_chflagsat(int fd, const char *path, \
-	SYS_PPOLL          = 109 // { int sys_ppoll(struct pollfd *fds, \
-	SYS_PSELECT        = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, \
-	SYS_SIGSUSPEND     = 111 // { int sys_sigsuspend(int mask); }
-	SYS_GETSOCKOPT     = 118 // { int sys_getsockopt(int s, int level, int name, \
-	SYS_READV          = 120 // { ssize_t sys_readv(int fd, \
-	SYS_WRITEV         = 121 // { ssize_t sys_writev(int fd, \
-	SYS_FCHOWN         = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }
-	SYS_FCHMOD         = 124 // { int sys_fchmod(int fd, mode_t mode); }
-	SYS_SETREUID       = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }
-	SYS_SETREGID       = 127 // { int sys_setregid(gid_t rgid, gid_t egid); }
-	SYS_RENAME         = 128 // { int sys_rename(const char *from, const char *to); }
-	SYS_FLOCK          = 131 // { int sys_flock(int fd, int how); }
-	SYS_MKFIFO         = 132 // { int sys_mkfifo(const char *path, mode_t mode); }
-	SYS_SENDTO         = 133 // { ssize_t sys_sendto(int s, const void *buf, \
-	SYS_SHUTDOWN       = 134 // { int sys_shutdown(int s, int how); }
-	SYS_SOCKETPAIR     = 135 // { int sys_socketpair(int domain, int type, \
-	SYS_MKDIR          = 136 // { int sys_mkdir(const char *path, mode_t mode); }
-	SYS_RMDIR          = 137 // { int sys_rmdir(const char *path); }
-	SYS_ADJTIME        = 140 // { int sys_adjtime(const struct timeval *delta, \
-	SYS_SETSID         = 147 // { int sys_setsid(void); }
-	SYS_QUOTACTL       = 148 // { int sys_quotactl(const char *path, int cmd, \
-	SYS_NFSSVC         = 155 // { int sys_nfssvc(int flag, void *argp); }
-	SYS_GETFH          = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); }
-	SYS_SYSARCH        = 165 // { int sys_sysarch(int op, void *parms); }
-	SYS_PREAD          = 173 // { ssize_t sys_pread(int fd, void *buf, \
-	SYS_PWRITE         = 174 // { ssize_t sys_pwrite(int fd, const void *buf, \
-	SYS_SETGID         = 181 // { int sys_setgid(gid_t gid); }
-	SYS_SETEGID        = 182 // { int sys_setegid(gid_t egid); }
-	SYS_SETEUID        = 183 // { int sys_seteuid(uid_t euid); }
-	SYS_PATHCONF       = 191 // { long sys_pathconf(const char *path, int name); }
-	SYS_FPATHCONF      = 192 // { long sys_fpathconf(int fd, int name); }
-	SYS_SWAPCTL        = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); }
-	SYS_GETRLIMIT      = 194 // { int sys_getrlimit(int which, \
-	SYS_SETRLIMIT      = 195 // { int sys_setrlimit(int which, \
-	SYS_MMAP           = 197 // { void *sys_mmap(void *addr, size_t len, int prot, \
-	SYS_LSEEK          = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, \
-	SYS_TRUNCATE       = 200 // { int sys_truncate(const char *path, int pad, \
-	SYS_FTRUNCATE      = 201 // { int sys_ftruncate(int fd, int pad, off_t length); }
-	SYS___SYSCTL       = 202 // { int sys___sysctl(const int *name, u_int namelen, \
-	SYS_MLOCK          = 203 // { int sys_mlock(const void *addr, size_t len); }
-	SYS_MUNLOCK        = 204 // { int sys_munlock(const void *addr, size_t len); }
-	SYS_GETPGID        = 207 // { pid_t sys_getpgid(pid_t pid); }
-	SYS_UTRACE         = 209 // { int sys_utrace(const char *label, const void *addr, \
-	SYS_SEMGET         = 221 // { int sys_semget(key_t key, int nsems, int semflg); }
-	SYS_MSGGET         = 225 // { int sys_msgget(key_t key, int msgflg); }
-	SYS_MSGSND         = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, \
-	SYS_MSGRCV         = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \
-	SYS_SHMAT          = 228 // { void *sys_shmat(int shmid, const void *shmaddr, \
-	SYS_SHMDT          = 230 // { int sys_shmdt(const void *shmaddr); }
-	SYS_MINHERIT       = 250 // { int sys_minherit(void *addr, size_t len, \
-	SYS_POLL           = 252 // { int sys_poll(struct pollfd *fds, \
-	SYS_ISSETUGID      = 253 // { int sys_issetugid(void); }
-	SYS_LCHOWN         = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); }
-	SYS_GETSID         = 255 // { pid_t sys_getsid(pid_t pid); }
-	SYS_MSYNC          = 256 // { int sys_msync(void *addr, size_t len, int flags); }
-	SYS_PIPE           = 263 // { int sys_pipe(int *fdp); }
-	SYS_FHOPEN         = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); }
-	SYS_PREADV         = 267 // { ssize_t sys_preadv(int fd, \
-	SYS_PWRITEV        = 268 // { ssize_t sys_pwritev(int fd, \
-	SYS_KQUEUE         = 269 // { int sys_kqueue(void); }
-	SYS_MLOCKALL       = 271 // { int sys_mlockall(int flags); }
-	SYS_MUNLOCKALL     = 272 // { int sys_munlockall(void); }
-	SYS_GETRESUID      = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, \
-	SYS_SETRESUID      = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, \
-	SYS_GETRESGID      = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, \
-	SYS_SETRESGID      = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, \
-	SYS_MQUERY         = 286 // { void *sys_mquery(void *addr, size_t len, int prot, \
-	SYS_CLOSEFROM      = 287 // { int sys_closefrom(int fd); }
-	SYS_SIGALTSTACK    = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, \
-	SYS_SHMGET         = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }
-	SYS_SEMOP          = 290 // { int sys_semop(int semid, struct sembuf *sops, \
-	SYS_FHSTAT         = 294 // { int sys_fhstat(const fhandle_t *fhp, \
-	SYS___SEMCTL       = 295 // { int sys___semctl(int semid, int semnum, int cmd, \
-	SYS_SHMCTL         = 296 // { int sys_shmctl(int shmid, int cmd, \
-	SYS_MSGCTL         = 297 // { int sys_msgctl(int msqid, int cmd, \
-	SYS_SCHED_YIELD    = 298 // { int sys_sched_yield(void); }
-	SYS_GETTHRID       = 299 // { pid_t sys_getthrid(void); }
-	SYS___THRWAKEUP    = 301 // { int sys___thrwakeup(const volatile void *ident, \
-	SYS___THREXIT      = 302 // { void sys___threxit(pid_t *notdead); }
-	SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, \
-	SYS___GETCWD       = 304 // { int sys___getcwd(char *buf, size_t len); }
-	SYS_ADJFREQ        = 305 // { int sys_adjfreq(const int64_t *freq, \
-	SYS_SETRTABLE      = 310 // { int sys_setrtable(int rtableid); }
-	SYS_GETRTABLE      = 311 // { int sys_getrtable(void); }
-	SYS_FACCESSAT      = 313 // { int sys_faccessat(int fd, const char *path, \
-	SYS_FCHMODAT       = 314 // { int sys_fchmodat(int fd, const char *path, \
-	SYS_FCHOWNAT       = 315 // { int sys_fchownat(int fd, const char *path, \
-	SYS_LINKAT         = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, \
-	SYS_MKDIRAT        = 318 // { int sys_mkdirat(int fd, const char *path, \
-	SYS_MKFIFOAT       = 319 // { int sys_mkfifoat(int fd, const char *path, \
-	SYS_MKNODAT        = 320 // { int sys_mknodat(int fd, const char *path, \
-	SYS_OPENAT         = 321 // { int sys_openat(int fd, const char *path, int flags, \
-	SYS_READLINKAT     = 322 // { ssize_t sys_readlinkat(int fd, const char *path, \
-	SYS_RENAMEAT       = 323 // { int sys_renameat(int fromfd, const char *from, \
-	SYS_SYMLINKAT      = 324 // { int sys_symlinkat(const char *path, int fd, \
-	SYS_UNLINKAT       = 325 // { int sys_unlinkat(int fd, const char *path, \
-	SYS___SET_TCB      = 329 // { void sys___set_tcb(void *tcb); }
-	SYS___GET_TCB      = 330 // { void *sys___get_tcb(void); }
-)
diff --git a/src/syscall/zsysnum_plan9.go b/src/syscall/zsysnum_plan9.go
deleted file mode 100644
index 07498c4..0000000
--- a/src/syscall/zsysnum_plan9.go
+++ /dev/null
@@ -1,49 +0,0 @@
-// mksysnum_plan9.sh /media/sys/src/libc/9syscall/sys.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-package syscall
-
-const (
-	SYS_SYSR1       = 0
-	SYS_BIND        = 2
-	SYS_CHDIR       = 3
-	SYS_CLOSE       = 4
-	SYS_DUP         = 5
-	SYS_ALARM       = 6
-	SYS_EXEC        = 7
-	SYS_EXITS       = 8
-	SYS_FAUTH       = 10
-	SYS_SEGBRK      = 12
-	SYS_OPEN        = 14
-	SYS_OSEEK       = 16
-	SYS_SLEEP       = 17
-	SYS_RFORK       = 19
-	SYS_PIPE        = 21
-	SYS_CREATE      = 22
-	SYS_FD2PATH     = 23
-	SYS_BRK_        = 24
-	SYS_REMOVE      = 25
-	SYS_NOTIFY      = 28
-	SYS_NOTED       = 29
-	SYS_SEGATTACH   = 30
-	SYS_SEGDETACH   = 31
-	SYS_SEGFREE     = 32
-	SYS_SEGFLUSH    = 33
-	SYS_RENDEZVOUS  = 34
-	SYS_UNMOUNT     = 35
-	SYS_SEMACQUIRE  = 37
-	SYS_SEMRELEASE  = 38
-	SYS_SEEK        = 39
-	SYS_FVERSION    = 40
-	SYS_ERRSTR      = 41
-	SYS_STAT        = 42
-	SYS_FSTAT       = 43
-	SYS_WSTAT       = 44
-	SYS_FWSTAT      = 45
-	SYS_MOUNT       = 46
-	SYS_AWAIT       = 47
-	SYS_PREAD       = 50
-	SYS_PWRITE      = 51
-	SYS_TSEMACQUIRE = 52
-	SYS_NSEC        = 53
-)
diff --git a/src/syscall/ztypes_darwin_arm.go b/src/syscall/ztypes_darwin_arm.go
deleted file mode 100644
index 91c4470..0000000
--- a/src/syscall/ztypes_darwin_arm.go
+++ /dev/null
@@ -1,449 +0,0 @@
-// NOTE: cgo can't generate struct Stat_t and struct Statfs_t yet
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_darwin.go
-
-// +build arm,darwin
-
-package syscall
-
-const (
-	sizeofPtr      = 0x4
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x4
-	sizeofLongLong = 0x8
-)
-
-type (
-	_C_short     int16
-	_C_int       int32
-	_C_long      int32
-	_C_long_long int64
-)
-
-type Timespec struct {
-	Sec  int32
-	Nsec int32
-}
-
-type Timeval struct {
-	Sec  int32
-	Usec int32
-}
-
-type Timeval32 [0]byte
-
-type Rusage struct {
-	Utime    Timeval
-	Stime    Timeval
-	Maxrss   int32
-	Ixrss    int32
-	Idrss    int32
-	Isrss    int32
-	Minflt   int32
-	Majflt   int32
-	Nswap    int32
-	Inblock  int32
-	Oublock  int32
-	Msgsnd   int32
-	Msgrcv   int32
-	Nsignals int32
-	Nvcsw    int32
-	Nivcsw   int32
-}
-
-type Rlimit struct {
-	Cur uint64
-	Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
-	Dev           int32
-	Mode          uint16
-	Nlink         uint16
-	Ino           uint64
-	Uid           uint32
-	Gid           uint32
-	Rdev          int32
-	Atimespec     Timespec
-	Mtimespec     Timespec
-	Ctimespec     Timespec
-	Birthtimespec Timespec
-	Size          int64
-	Blocks        int64
-	Blksize       int32
-	Flags         uint32
-	Gen           uint32
-	Lspare        int32
-	Qspare        [2]int64
-}
-
-type Statfs_t struct {
-	Bsize       uint32
-	Iosize      int32
-	Blocks      uint64
-	Bfree       uint64
-	Bavail      uint64
-	Files       uint64
-	Ffree       uint64
-	Fsid        Fsid
-	Owner       uint32
-	Type        uint32
-	Flags       uint32
-	Fssubtype   uint32
-	Fstypename  [16]int8
-	Mntonname   [1024]int8
-	Mntfromname [1024]int8
-	Reserved    [8]uint32
-}
-
-type Flock_t struct {
-	Start  int64
-	Len    int64
-	Pid    int32
-	Type   int16
-	Whence int16
-}
-
-type Fstore_t struct {
-	Flags      uint32
-	Posmode    int32
-	Offset     int64
-	Length     int64
-	Bytesalloc int64
-}
-
-type Radvisory_t struct {
-	Offset int64
-	Count  int32
-}
-
-type Fbootstraptransfer_t struct {
-	Offset int64
-	Length uint32
-	Buffer *byte
-}
-
-type Log2phys_t struct {
-	Flags       uint32
-	Contigbytes int64
-	Devoffset   int64
-}
-
-type Fsid struct {
-	Val [2]int32
-}
-
-type Dirent struct {
-	Ino       uint64
-	Seekoff   uint64
-	Reclen    uint16
-	Namlen    uint16
-	Type      uint8
-	Name      [1024]int8
-	Pad_cgo_0 [3]byte
-}
-
-type RawSockaddrInet4 struct {
-	Len    uint8
-	Family uint8
-	Port   uint16
-	Addr   [4]byte /* in_addr */
-	Zero   [8]int8
-}
-
-type RawSockaddrInet6 struct {
-	Len      uint8
-	Family   uint8
-	Port     uint16
-	Flowinfo uint32
-	Addr     [16]byte /* in6_addr */
-	Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
-	Len    uint8
-	Family uint8
-	Path   [104]int8
-}
-
-type RawSockaddrDatalink struct {
-	Len    uint8
-	Family uint8
-	Index  uint16
-	Type   uint8
-	Nlen   uint8
-	Alen   uint8
-	Slen   uint8
-	Data   [12]int8
-}
-
-type RawSockaddr struct {
-	Len    uint8
-	Family uint8
-	Data   [14]int8
-}
-
-type RawSockaddrAny struct {
-	Addr RawSockaddr
-	Pad  [92]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
-	Onoff  int32
-	Linger int32
-}
-
-type Iovec struct {
-	Base *byte
-	Len  uint32
-}
-
-type IPMreq struct {
-	Multiaddr [4]byte /* in_addr */
-	Interface [4]byte /* in_addr */
-}
-
-type IPv6Mreq struct {
-	Multiaddr [16]byte /* in6_addr */
-	Interface uint32
-}
-
-type Msghdr struct {
-	Name       *byte
-	Namelen    uint32
-	Iov        *Iovec
-	Iovlen     int32
-	Control    *byte
-	Controllen uint32
-	Flags      int32
-}
-
-type Cmsghdr struct {
-	Len   uint32
-	Level int32
-	Type  int32
-}
-
-type Inet4Pktinfo struct {
-	Ifindex  uint32
-	Spec_dst [4]byte /* in_addr */
-	Addr     [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
-	Addr    [16]byte /* in6_addr */
-	Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
-	Addr RawSockaddrInet6
-	Mtu  uint32
-}
-
-type ICMPv6Filter struct {
-	Filt [8]uint32
-}
-
-const (
-	SizeofSockaddrInet4    = 0x10
-	SizeofSockaddrInet6    = 0x1c
-	SizeofSockaddrAny      = 0x6c
-	SizeofSockaddrUnix     = 0x6a
-	SizeofSockaddrDatalink = 0x14
-	SizeofLinger           = 0x8
-	SizeofIPMreq           = 0x8
-	SizeofIPv6Mreq         = 0x14
-	SizeofMsghdr           = 0x1c
-	SizeofCmsghdr          = 0xc
-	SizeofInet4Pktinfo     = 0xc
-	SizeofInet6Pktinfo     = 0x14
-	SizeofIPv6MTUInfo      = 0x20
-	SizeofICMPv6Filter     = 0x20
-)
-
-const (
-	PTRACE_TRACEME = 0x0
-	PTRACE_CONT    = 0x7
-	PTRACE_KILL    = 0x8
-)
-
-type Kevent_t struct {
-	Ident  uint32
-	Filter int16
-	Flags  uint16
-	Fflags uint32
-	Data   int32
-	Udata  *byte
-}
-
-type FdSet struct {
-	Bits [32]int32
-}
-
-const (
-	SizeofIfMsghdr    = 0x70
-	SizeofIfData      = 0x60
-	SizeofIfaMsghdr   = 0x14
-	SizeofIfmaMsghdr  = 0x10
-	SizeofIfmaMsghdr2 = 0x14
-	SizeofRtMsghdr    = 0x5c
-	SizeofRtMetrics   = 0x38
-)
-
-type IfMsghdr struct {
-	Msglen    uint16
-	Version   uint8
-	Type      uint8
-	Addrs     int32
-	Flags     int32
-	Index     uint16
-	Pad_cgo_0 [2]byte
-	Data      IfData
-}
-
-type IfData struct {
-	Type       uint8
-	Typelen    uint8
-	Physical   uint8
-	Addrlen    uint8
-	Hdrlen     uint8
-	Recvquota  uint8
-	Xmitquota  uint8
-	Unused1    uint8
-	Mtu        uint32
-	Metric     uint32
-	Baudrate   uint32
-	Ipackets   uint32
-	Ierrors    uint32
-	Opackets   uint32
-	Oerrors    uint32
-	Collisions uint32
-	Ibytes     uint32
-	Obytes     uint32
-	Imcasts    uint32
-	Omcasts    uint32
-	Iqdrops    uint32
-	Noproto    uint32
-	Recvtiming uint32
-	Xmittiming uint32
-	Lastchange Timeval
-	Unused2    uint32
-	Hwassist   uint32
-	Reserved1  uint32
-	Reserved2  uint32
-}
-
-type IfaMsghdr struct {
-	Msglen    uint16
-	Version   uint8
-	Type      uint8
-	Addrs     int32
-	Flags     int32
-	Index     uint16
-	Pad_cgo_0 [2]byte
-	Metric    int32
-}
-
-type IfmaMsghdr struct {
-	Msglen    uint16
-	Version   uint8
-	Type      uint8
-	Addrs     int32
-	Flags     int32
-	Index     uint16
-	Pad_cgo_0 [2]byte
-}
-
-type IfmaMsghdr2 struct {
-	Msglen    uint16
-	Version   uint8
-	Type      uint8
-	Addrs     int32
-	Flags     int32
-	Index     uint16
-	Pad_cgo_0 [2]byte
-	Refcount  int32
-}
-
-type RtMsghdr struct {
-	Msglen    uint16
-	Version   uint8
-	Type      uint8
-	Index     uint16
-	Pad_cgo_0 [2]byte
-	Flags     int32
-	Addrs     int32
-	Pid       int32
-	Seq       int32
-	Errno     int32
-	Use       int32
-	Inits     uint32
-	Rmx       RtMetrics
-}
-
-type RtMetrics struct {
-	Locks    uint32
-	Mtu      uint32
-	Hopcount uint32
-	Expire   int32
-	Recvpipe uint32
-	Sendpipe uint32
-	Ssthresh uint32
-	Rtt      uint32
-	Rttvar   uint32
-	Pksent   uint32
-	Filler   [4]uint32
-}
-
-const (
-	SizeofBpfVersion = 0x4
-	SizeofBpfStat    = 0x8
-	SizeofBpfProgram = 0x8
-	SizeofBpfInsn    = 0x8
-	SizeofBpfHdr     = 0x14
-)
-
-type BpfVersion struct {
-	Major uint16
-	Minor uint16
-}
-
-type BpfStat struct {
-	Recv uint32
-	Drop uint32
-}
-
-type BpfProgram struct {
-	Len   uint32
-	Insns *BpfInsn
-}
-
-type BpfInsn struct {
-	Code uint16
-	Jt   uint8
-	Jf   uint8
-	K    uint32
-}
-
-type BpfHdr struct {
-	Tstamp    Timeval
-	Caplen    uint32
-	Datalen   uint32
-	Hdrlen    uint16
-	Pad_cgo_0 [2]byte
-}
-
-type Termios struct {
-	Iflag  uint32
-	Oflag  uint32
-	Cflag  uint32
-	Lflag  uint32
-	Cc     [20]uint8
-	Ispeed uint32
-	Ospeed uint32
-}
diff --git a/src/syscall/ztypes_darwin_arm64.go b/src/syscall/ztypes_darwin_arm64.go
deleted file mode 100644
index 1d65cfd..0000000
--- a/src/syscall/ztypes_darwin_arm64.go
+++ /dev/null
@@ -1,458 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_darwin.go
-
-// +build arm64,darwin
-
-package syscall
-
-const (
-	sizeofPtr      = 0x8
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x8
-	sizeofLongLong = 0x8
-)
-
-type (
-	_C_short     int16
-	_C_int       int32
-	_C_long      int64
-	_C_long_long int64
-)
-
-type Timespec struct {
-	Sec  int64
-	Nsec int64
-}
-
-type Timeval struct {
-	Sec       int64
-	Usec      int32
-	Pad_cgo_0 [4]byte
-}
-
-type Timeval32 struct {
-	Sec  int32
-	Usec int32
-}
-
-type Rusage struct {
-	Utime    Timeval
-	Stime    Timeval
-	Maxrss   int64
-	Ixrss    int64
-	Idrss    int64
-	Isrss    int64
-	Minflt   int64
-	Majflt   int64
-	Nswap    int64
-	Inblock  int64
-	Oublock  int64
-	Msgsnd   int64
-	Msgrcv   int64
-	Nsignals int64
-	Nvcsw    int64
-	Nivcsw   int64
-}
-
-type Rlimit struct {
-	Cur uint64
-	Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
-	Dev           int32
-	Mode          uint16
-	Nlink         uint16
-	Ino           uint64
-	Uid           uint32
-	Gid           uint32
-	Rdev          int32
-	Pad_cgo_0     [4]byte
-	Atimespec     Timespec
-	Mtimespec     Timespec
-	Ctimespec     Timespec
-	Birthtimespec Timespec
-	Size          int64
-	Blocks        int64
-	Blksize       int32
-	Flags         uint32
-	Gen           uint32
-	Lspare        int32
-	Qspare        [2]int64
-}
-
-type Statfs_t struct {
-	Bsize       uint32
-	Iosize      int32
-	Blocks      uint64
-	Bfree       uint64
-	Bavail      uint64
-	Files       uint64
-	Ffree       uint64
-	Fsid        Fsid
-	Owner       uint32
-	Type        uint32
-	Flags       uint32
-	Fssubtype   uint32
-	Fstypename  [16]int8
-	Mntonname   [1024]int8
-	Mntfromname [1024]int8
-	Reserved    [8]uint32
-}
-
-type Flock_t struct {
-	Start  int64
-	Len    int64
-	Pid    int32
-	Type   int16
-	Whence int16
-}
-
-type Fstore_t struct {
-	Flags      uint32
-	Posmode    int32
-	Offset     int64
-	Length     int64
-	Bytesalloc int64
-}
-
-type Radvisory_t struct {
-	Offset    int64
-	Count     int32
-	Pad_cgo_0 [4]byte
-}
-
-type Fbootstraptransfer_t struct {
-	Offset int64
-	Length uint64
-	Buffer *byte
-}
-
-type Log2phys_t struct {
-	Flags       uint32
-	Contigbytes int64
-	Devoffset   int64
-}
-
-type Fsid struct {
-	Val [2]int32
-}
-
-type Dirent struct {
-	Ino       uint64
-	Seekoff   uint64
-	Reclen    uint16
-	Namlen    uint16
-	Type      uint8
-	Name      [1024]int8
-	Pad_cgo_0 [3]byte
-}
-
-type RawSockaddrInet4 struct {
-	Len    uint8
-	Family uint8
-	Port   uint16
-	Addr   [4]byte /* in_addr */
-	Zero   [8]int8
-}
-
-type RawSockaddrInet6 struct {
-	Len      uint8
-	Family   uint8
-	Port     uint16
-	Flowinfo uint32
-	Addr     [16]byte /* in6_addr */
-	Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
-	Len    uint8
-	Family uint8
-	Path   [104]int8
-}
-
-type RawSockaddrDatalink struct {
-	Len    uint8
-	Family uint8
-	Index  uint16
-	Type   uint8
-	Nlen   uint8
-	Alen   uint8
-	Slen   uint8
-	Data   [12]int8
-}
-
-type RawSockaddr struct {
-	Len    uint8
-	Family uint8
-	Data   [14]int8
-}
-
-type RawSockaddrAny struct {
-	Addr RawSockaddr
-	Pad  [92]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
-	Onoff  int32
-	Linger int32
-}
-
-type Iovec struct {
-	Base *byte
-	Len  uint64
-}
-
-type IPMreq struct {
-	Multiaddr [4]byte /* in_addr */
-	Interface [4]byte /* in_addr */
-}
-
-type IPv6Mreq struct {
-	Multiaddr [16]byte /* in6_addr */
-	Interface uint32
-}
-
-type Msghdr struct {
-	Name       *byte
-	Namelen    uint32
-	Pad_cgo_0  [4]byte
-	Iov        *Iovec
-	Iovlen     int32
-	Pad_cgo_1  [4]byte
-	Control    *byte
-	Controllen uint32
-	Flags      int32
-}
-
-type Cmsghdr struct {
-	Len   uint32
-	Level int32
-	Type  int32
-}
-
-type Inet4Pktinfo struct {
-	Ifindex  uint32
-	Spec_dst [4]byte /* in_addr */
-	Addr     [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
-	Addr    [16]byte /* in6_addr */
-	Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
-	Addr RawSockaddrInet6
-	Mtu  uint32
-}
-
-type ICMPv6Filter struct {
-	Filt [8]uint32
-}
-
-const (
-	SizeofSockaddrInet4    = 0x10
-	SizeofSockaddrInet6    = 0x1c
-	SizeofSockaddrAny      = 0x6c
-	SizeofSockaddrUnix     = 0x6a
-	SizeofSockaddrDatalink = 0x14
-	SizeofLinger           = 0x8
-	SizeofIPMreq           = 0x8
-	SizeofIPv6Mreq         = 0x14
-	SizeofMsghdr           = 0x30
-	SizeofCmsghdr          = 0xc
-	SizeofInet4Pktinfo     = 0xc
-	SizeofInet6Pktinfo     = 0x14
-	SizeofIPv6MTUInfo      = 0x20
-	SizeofICMPv6Filter     = 0x20
-)
-
-const (
-	PTRACE_TRACEME = 0x0
-	PTRACE_CONT    = 0x7
-	PTRACE_KILL    = 0x8
-)
-
-type Kevent_t struct {
-	Ident  uint64
-	Filter int16
-	Flags  uint16
-	Fflags uint32
-	Data   int64
-	Udata  *byte
-}
-
-type FdSet struct {
-	Bits [32]int32
-}
-
-const (
-	SizeofIfMsghdr    = 0x70
-	SizeofIfData      = 0x60
-	SizeofIfaMsghdr   = 0x14
-	SizeofIfmaMsghdr  = 0x10
-	SizeofIfmaMsghdr2 = 0x14
-	SizeofRtMsghdr    = 0x5c
-	SizeofRtMetrics   = 0x38
-)
-
-type IfMsghdr struct {
-	Msglen    uint16
-	Version   uint8
-	Type      uint8
-	Addrs     int32
-	Flags     int32
-	Index     uint16
-	Pad_cgo_0 [2]byte
-	Data      IfData
-}
-
-type IfData struct {
-	Type       uint8
-	Typelen    uint8
-	Physical   uint8
-	Addrlen    uint8
-	Hdrlen     uint8
-	Recvquota  uint8
-	Xmitquota  uint8
-	Unused1    uint8
-	Mtu        uint32
-	Metric     uint32
-	Baudrate   uint32
-	Ipackets   uint32
-	Ierrors    uint32
-	Opackets   uint32
-	Oerrors    uint32
-	Collisions uint32
-	Ibytes     uint32
-	Obytes     uint32
-	Imcasts    uint32
-	Omcasts    uint32
-	Iqdrops    uint32
-	Noproto    uint32
-	Recvtiming uint32
-	Xmittiming uint32
-	Lastchange Timeval32
-	Unused2    uint32
-	Hwassist   uint32
-	Reserved1  uint32
-	Reserved2  uint32
-}
-
-type IfaMsghdr struct {
-	Msglen    uint16
-	Version   uint8
-	Type      uint8
-	Addrs     int32
-	Flags     int32
-	Index     uint16
-	Pad_cgo_0 [2]byte
-	Metric    int32
-}
-
-type IfmaMsghdr struct {
-	Msglen    uint16
-	Version   uint8
-	Type      uint8
-	Addrs     int32
-	Flags     int32
-	Index     uint16
-	Pad_cgo_0 [2]byte
-}
-
-type IfmaMsghdr2 struct {
-	Msglen    uint16
-	Version   uint8
-	Type      uint8
-	Addrs     int32
-	Flags     int32
-	Index     uint16
-	Pad_cgo_0 [2]byte
-	Refcount  int32
-}
-
-type RtMsghdr struct {
-	Msglen    uint16
-	Version   uint8
-	Type      uint8
-	Index     uint16
-	Pad_cgo_0 [2]byte
-	Flags     int32
-	Addrs     int32
-	Pid       int32
-	Seq       int32
-	Errno     int32
-	Use       int32
-	Inits     uint32
-	Rmx       RtMetrics
-}
-
-type RtMetrics struct {
-	Locks    uint32
-	Mtu      uint32
-	Hopcount uint32
-	Expire   int32
-	Recvpipe uint32
-	Sendpipe uint32
-	Ssthresh uint32
-	Rtt      uint32
-	Rttvar   uint32
-	Pksent   uint32
-	Filler   [4]uint32
-}
-
-const (
-	SizeofBpfVersion = 0x4
-	SizeofBpfStat    = 0x8
-	SizeofBpfProgram = 0x10
-	SizeofBpfInsn    = 0x8
-	SizeofBpfHdr     = 0x14
-)
-
-type BpfVersion struct {
-	Major uint16
-	Minor uint16
-}
-
-type BpfStat struct {
-	Recv uint32
-	Drop uint32
-}
-
-type BpfProgram struct {
-	Len       uint32
-	Pad_cgo_0 [4]byte
-	Insns     *BpfInsn
-}
-
-type BpfInsn struct {
-	Code uint16
-	Jt   uint8
-	Jf   uint8
-	K    uint32
-}
-
-type BpfHdr struct {
-	Tstamp    Timeval32
-	Caplen    uint32
-	Datalen   uint32
-	Hdrlen    uint16
-	Pad_cgo_0 [2]byte
-}
-
-type Termios struct {
-	Iflag     uint64
-	Oflag     uint64
-	Cflag     uint64
-	Lflag     uint64
-	Cc        [20]uint8
-	Pad_cgo_0 [4]byte
-	Ispeed    uint64
-	Ospeed    uint64
-}
diff --git a/src/syscall/ztypes_linux_arm64.go b/src/syscall/ztypes_linux_arm64.go
deleted file mode 100644
index dcb1178..0000000
--- a/src/syscall/ztypes_linux_arm64.go
+++ /dev/null
@@ -1,596 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -fsigned-char types_linux.go
-
-// +build arm64,linux
-
-package syscall
-
-const (
-	sizeofPtr      = 0x8
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x8
-	sizeofLongLong = 0x8
-	PathMax        = 0x1000
-)
-
-type (
-	_C_short     int16
-	_C_int       int32
-	_C_long      int64
-	_C_long_long int64
-)
-
-type Timespec struct {
-	Sec  int64
-	Nsec int64
-}
-
-type Timeval struct {
-	Sec  int64
-	Usec int64
-}
-
-type Timex struct {
-	Modes     uint32
-	Pad_cgo_0 [4]byte
-	Offset    int64
-	Freq      int64
-	Maxerror  int64
-	Esterror  int64
-	Status    int32
-	Pad_cgo_1 [4]byte
-	Constant  int64
-	Precision int64
-	Tolerance int64
-	Time      Timeval
-	Tick      int64
-	Ppsfreq   int64
-	Jitter    int64
-	Shift     int32
-	Pad_cgo_2 [4]byte
-	Stabil    int64
-	Jitcnt    int64
-	Calcnt    int64
-	Errcnt    int64
-	Stbcnt    int64
-	Tai       int32
-	Pad_cgo_3 [44]byte
-}
-
-type Time_t int64
-
-type Tms struct {
-	Utime  int64
-	Stime  int64
-	Cutime int64
-	Cstime int64
-}
-
-type Utimbuf struct {
-	Actime  int64
-	Modtime int64
-}
-
-type Rusage struct {
-	Utime    Timeval
-	Stime    Timeval
-	Maxrss   int64
-	Ixrss    int64
-	Idrss    int64
-	Isrss    int64
-	Minflt   int64
-	Majflt   int64
-	Nswap    int64
-	Inblock  int64
-	Oublock  int64
-	Msgsnd   int64
-	Msgrcv   int64
-	Nsignals int64
-	Nvcsw    int64
-	Nivcsw   int64
-}
-
-type Rlimit struct {
-	Cur uint64
-	Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
-	Dev               uint64
-	Ino               uint64
-	Mode              uint32
-	Nlink             uint32
-	Uid               uint32
-	Gid               uint32
-	Rdev              uint64
-	X__pad1           uint64
-	Size              int64
-	Blksize           int32
-	X__pad2           int32
-	Blocks            int64
-	Atim              Timespec
-	Mtim              Timespec
-	Ctim              Timespec
-	X__glibc_reserved [2]int32
-}
-
-type Statfs_t struct {
-	Type    int64
-	Bsize   int64
-	Blocks  uint64
-	Bfree   uint64
-	Bavail  uint64
-	Files   uint64
-	Ffree   uint64
-	Fsid    Fsid
-	Namelen int64
-	Frsize  int64
-	Flags   int64
-	Spare   [4]int64
-}
-
-type Dirent struct {
-	Ino       uint64
-	Off       int64
-	Reclen    uint16
-	Type      uint8
-	Name      [256]int8
-	Pad_cgo_0 [5]byte
-}
-
-type Fsid struct {
-	X__val [2]int32
-}
-
-type Flock_t struct {
-	Type      int16
-	Whence    int16
-	Pad_cgo_0 [4]byte
-	Start     int64
-	Len       int64
-	Pid       int32
-	Pad_cgo_1 [4]byte
-}
-
-type RawSockaddrInet4 struct {
-	Family uint16
-	Port   uint16
-	Addr   [4]byte /* in_addr */
-	Zero   [8]uint8
-}
-
-type RawSockaddrInet6 struct {
-	Family   uint16
-	Port     uint16
-	Flowinfo uint32
-	Addr     [16]byte /* in6_addr */
-	Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
-	Family uint16
-	Path   [108]int8
-}
-
-type RawSockaddrLinklayer struct {
-	Family   uint16
-	Protocol uint16
-	Ifindex  int32
-	Hatype   uint16
-	Pkttype  uint8
-	Halen    uint8
-	Addr     [8]uint8
-}
-
-type RawSockaddrNetlink struct {
-	Family uint16
-	Pad    uint16
-	Pid    uint32
-	Groups uint32
-}
-
-type RawSockaddr struct {
-	Family uint16
-	Data   [14]int8
-}
-
-type RawSockaddrAny struct {
-	Addr RawSockaddr
-	Pad  [96]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
-	Onoff  int32
-	Linger int32
-}
-
-type Iovec struct {
-	Base *byte
-	Len  uint64
-}
-
-type IPMreq struct {
-	Multiaddr [4]byte /* in_addr */
-	Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
-	Multiaddr [4]byte /* in_addr */
-	Address   [4]byte /* in_addr */
-	Ifindex   int32
-}
-
-type IPv6Mreq struct {
-	Multiaddr [16]byte /* in6_addr */
-	Interface uint32
-}
-
-type Msghdr struct {
-	Name       *byte
-	Namelen    uint32
-	Pad_cgo_0  [4]byte
-	Iov        *Iovec
-	Iovlen     uint64
-	Control    *byte
-	Controllen uint64
-	Flags      int32
-	Pad_cgo_1  [4]byte
-}
-
-type Cmsghdr struct {
-	Len          uint64
-	Level        int32
-	Type         int32
-	X__cmsg_data [0]uint8
-}
-
-type Inet4Pktinfo struct {
-	Ifindex  int32
-	Spec_dst [4]byte /* in_addr */
-	Addr     [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
-	Addr    [16]byte /* in6_addr */
-	Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
-	Addr RawSockaddrInet6
-	Mtu  uint32
-}
-
-type ICMPv6Filter struct {
-	Data [8]uint32
-}
-
-type Ucred struct {
-	Pid int32
-	Uid uint32
-	Gid uint32
-}
-
-type TCPInfo struct {
-	State          uint8
-	Ca_state       uint8
-	Retransmits    uint8
-	Probes         uint8
-	Backoff        uint8
-	Options        uint8
-	Pad_cgo_0      [2]byte
-	Rto            uint32
-	Ato            uint32
-	Snd_mss        uint32
-	Rcv_mss        uint32
-	Unacked        uint32
-	Sacked         uint32
-	Lost           uint32
-	Retrans        uint32
-	Fackets        uint32
-	Last_data_sent uint32
-	Last_ack_sent  uint32
-	Last_data_recv uint32
-	Last_ack_recv  uint32
-	Pmtu           uint32
-	Rcv_ssthresh   uint32
-	Rtt            uint32
-	Rttvar         uint32
-	Snd_ssthresh   uint32
-	Snd_cwnd       uint32
-	Advmss         uint32
-	Reordering     uint32
-	Rcv_rtt        uint32
-	Rcv_space      uint32
-	Total_retrans  uint32
-}
-
-const (
-	SizeofSockaddrInet4     = 0x10
-	SizeofSockaddrInet6     = 0x1c
-	SizeofSockaddrAny       = 0x70
-	SizeofSockaddrUnix      = 0x6e
-	SizeofSockaddrLinklayer = 0x14
-	SizeofSockaddrNetlink   = 0xc
-	SizeofLinger            = 0x8
-	SizeofIPMreq            = 0x8
-	SizeofIPMreqn           = 0xc
-	SizeofIPv6Mreq          = 0x14
-	SizeofMsghdr            = 0x38
-	SizeofCmsghdr           = 0x10
-	SizeofInet4Pktinfo      = 0xc
-	SizeofInet6Pktinfo      = 0x14
-	SizeofIPv6MTUInfo       = 0x20
-	SizeofICMPv6Filter      = 0x20
-	SizeofUcred             = 0xc
-	SizeofTCPInfo           = 0x68
-)
-
-const (
-	IFA_UNSPEC          = 0x0
-	IFA_ADDRESS         = 0x1
-	IFA_LOCAL           = 0x2
-	IFA_LABEL           = 0x3
-	IFA_BROADCAST       = 0x4
-	IFA_ANYCAST         = 0x5
-	IFA_CACHEINFO       = 0x6
-	IFA_MULTICAST       = 0x7
-	IFLA_UNSPEC         = 0x0
-	IFLA_ADDRESS        = 0x1
-	IFLA_BROADCAST      = 0x2
-	IFLA_IFNAME         = 0x3
-	IFLA_MTU            = 0x4
-	IFLA_LINK           = 0x5
-	IFLA_QDISC          = 0x6
-	IFLA_STATS          = 0x7
-	IFLA_COST           = 0x8
-	IFLA_PRIORITY       = 0x9
-	IFLA_MASTER         = 0xa
-	IFLA_WIRELESS       = 0xb
-	IFLA_PROTINFO       = 0xc
-	IFLA_TXQLEN         = 0xd
-	IFLA_MAP            = 0xe
-	IFLA_WEIGHT         = 0xf
-	IFLA_OPERSTATE      = 0x10
-	IFLA_LINKMODE       = 0x11
-	IFLA_LINKINFO       = 0x12
-	IFLA_NET_NS_PID     = 0x13
-	IFLA_IFALIAS        = 0x14
-	IFLA_MAX            = 0x24
-	RT_SCOPE_UNIVERSE   = 0x0
-	RT_SCOPE_SITE       = 0xc8
-	RT_SCOPE_LINK       = 0xfd
-	RT_SCOPE_HOST       = 0xfe
-	RT_SCOPE_NOWHERE    = 0xff
-	RT_TABLE_UNSPEC     = 0x0
-	RT_TABLE_COMPAT     = 0xfc
-	RT_TABLE_DEFAULT    = 0xfd
-	RT_TABLE_MAIN       = 0xfe
-	RT_TABLE_LOCAL      = 0xff
-	RT_TABLE_MAX        = 0xffffffff
-	RTA_UNSPEC          = 0x0
-	RTA_DST             = 0x1
-	RTA_SRC             = 0x2
-	RTA_IIF             = 0x3
-	RTA_OIF             = 0x4
-	RTA_GATEWAY         = 0x5
-	RTA_PRIORITY        = 0x6
-	RTA_PREFSRC         = 0x7
-	RTA_METRICS         = 0x8
-	RTA_MULTIPATH       = 0x9
-	RTA_FLOW            = 0xb
-	RTA_CACHEINFO       = 0xc
-	RTA_TABLE           = 0xf
-	RTN_UNSPEC          = 0x0
-	RTN_UNICAST         = 0x1
-	RTN_LOCAL           = 0x2
-	RTN_BROADCAST       = 0x3
-	RTN_ANYCAST         = 0x4
-	RTN_MULTICAST       = 0x5
-	RTN_BLACKHOLE       = 0x6
-	RTN_UNREACHABLE     = 0x7
-	RTN_PROHIBIT        = 0x8
-	RTN_THROW           = 0x9
-	RTN_NAT             = 0xa
-	RTN_XRESOLVE        = 0xb
-	RTNLGRP_NONE        = 0x0
-	RTNLGRP_LINK        = 0x1
-	RTNLGRP_NOTIFY      = 0x2
-	RTNLGRP_NEIGH       = 0x3
-	RTNLGRP_TC          = 0x4
-	RTNLGRP_IPV4_IFADDR = 0x5
-	RTNLGRP_IPV4_MROUTE = 0x6
-	RTNLGRP_IPV4_ROUTE  = 0x7
-	RTNLGRP_IPV4_RULE   = 0x8
-	RTNLGRP_IPV6_IFADDR = 0x9
-	RTNLGRP_IPV6_MROUTE = 0xa
-	RTNLGRP_IPV6_ROUTE  = 0xb
-	RTNLGRP_IPV6_IFINFO = 0xc
-	RTNLGRP_IPV6_PREFIX = 0x12
-	RTNLGRP_IPV6_RULE   = 0x13
-	RTNLGRP_ND_USEROPT  = 0x14
-	SizeofNlMsghdr      = 0x10
-	SizeofNlMsgerr      = 0x14
-	SizeofRtGenmsg      = 0x1
-	SizeofNlAttr        = 0x4
-	SizeofRtAttr        = 0x4
-	SizeofIfInfomsg     = 0x10
-	SizeofIfAddrmsg     = 0x8
-	SizeofRtMsg         = 0xc
-	SizeofRtNexthop     = 0x8
-)
-
-type NlMsghdr struct {
-	Len   uint32
-	Type  uint16
-	Flags uint16
-	Seq   uint32
-	Pid   uint32
-}
-
-type NlMsgerr struct {
-	Error int32
-	Msg   NlMsghdr
-}
-
-type RtGenmsg struct {
-	Family uint8
-}
-
-type NlAttr struct {
-	Len  uint16
-	Type uint16
-}
-
-type RtAttr struct {
-	Len  uint16
-	Type uint16
-}
-
-type IfInfomsg struct {
-	Family     uint8
-	X__ifi_pad uint8
-	Type       uint16
-	Index      int32
-	Flags      uint32
-	Change     uint32
-}
-
-type IfAddrmsg struct {
-	Family    uint8
-	Prefixlen uint8
-	Flags     uint8
-	Scope     uint8
-	Index     uint32
-}
-
-type RtMsg struct {
-	Family   uint8
-	Dst_len  uint8
-	Src_len  uint8
-	Tos      uint8
-	Table    uint8
-	Protocol uint8
-	Scope    uint8
-	Type     uint8
-	Flags    uint32
-}
-
-type RtNexthop struct {
-	Len     uint16
-	Flags   uint8
-	Hops    uint8
-	Ifindex int32
-}
-
-const (
-	SizeofSockFilter = 0x8
-	SizeofSockFprog  = 0x10
-)
-
-type SockFilter struct {
-	Code uint16
-	Jt   uint8
-	Jf   uint8
-	K    uint32
-}
-
-type SockFprog struct {
-	Len       uint16
-	Pad_cgo_0 [6]byte
-	Filter    *SockFilter
-}
-
-type InotifyEvent struct {
-	Wd     int32
-	Mask   uint32
-	Cookie uint32
-	Len    uint32
-	Name   [0]int8
-}
-
-const SizeofInotifyEvent = 0x10
-
-type PtraceRegs struct {
-	Regs   [31]uint64
-	Sp     uint64
-	Pc     uint64
-	Pstate uint64
-}
-
-type FdSet struct {
-	Bits [16]int64
-}
-
-type Sysinfo_t struct {
-	Uptime    int64
-	Loads     [3]uint64
-	Totalram  uint64
-	Freeram   uint64
-	Sharedram uint64
-	Bufferram uint64
-	Totalswap uint64
-	Freeswap  uint64
-	Procs     uint16
-	Pad       uint16
-	Pad_cgo_0 [4]byte
-	Totalhigh uint64
-	Freehigh  uint64
-	Unit      uint32
-	X_f       [0]int8
-	Pad_cgo_1 [4]byte
-}
-
-type Utsname struct {
-	Sysname    [65]int8
-	Nodename   [65]int8
-	Release    [65]int8
-	Version    [65]int8
-	Machine    [65]int8
-	Domainname [65]int8
-}
-
-type Ustat_t struct {
-	Tfree     int32
-	Pad_cgo_0 [4]byte
-	Tinode    uint64
-	Fname     [6]int8
-	Fpack     [6]int8
-	Pad_cgo_1 [4]byte
-}
-
-type EpollEvent struct {
-	Events uint32
-	Fd     int32
-	Pad    int32
-}
-
-const (
-	_AT_FDCWD            = -0x64
-	_AT_REMOVEDIR        = 0x200
-	_AT_SYMLINK_NOFOLLOW = 0x100
-)
-
-type Termios struct {
-	Iflag     uint32
-	Oflag     uint32
-	Cflag     uint32
-	Lflag     uint32
-	Line      uint8
-	Cc        [32]uint8
-	Pad_cgo_0 [3]byte
-	Ispeed    uint32
-	Ospeed    uint32
-}
-
-const (
-	IUCLC  = 0x200
-	OLCUC  = 0x2
-	TCGETS = 0x5401
-	TCSETS = 0x5402
-	XCASE  = 0x4
-)
diff --git a/src/syscall/ztypes_linux_ppc64.go b/src/syscall/ztypes_linux_ppc64.go
deleted file mode 100644
index 33d1b7f..0000000
--- a/src/syscall/ztypes_linux_ppc64.go
+++ /dev/null
@@ -1,606 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_linux.go
-
-// +build ppc64,linux
-
-package syscall
-
-const (
-	sizeofPtr      = 0x8
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x8
-	sizeofLongLong = 0x8
-	PathMax        = 0x1000
-)
-
-type (
-	_C_short     int16
-	_C_int       int32
-	_C_long      int64
-	_C_long_long int64
-)
-
-type Timespec struct {
-	Sec  int64
-	Nsec int64
-}
-
-type Timeval struct {
-	Sec  int64
-	Usec int64
-}
-
-type Timex struct {
-	Modes     uint32
-	Pad_cgo_0 [4]byte
-	Offset    int64
-	Freq      int64
-	Maxerror  int64
-	Esterror  int64
-	Status    int32
-	Pad_cgo_1 [4]byte
-	Constant  int64
-	Precision int64
-	Tolerance int64
-	Time      Timeval
-	Tick      int64
-	Ppsfreq   int64
-	Jitter    int64
-	Shift     int32
-	Pad_cgo_2 [4]byte
-	Stabil    int64
-	Jitcnt    int64
-	Calcnt    int64
-	Errcnt    int64
-	Stbcnt    int64
-	Tai       int32
-	Pad_cgo_3 [44]byte
-}
-
-type Time_t int64
-
-type Tms struct {
-	Utime  int64
-	Stime  int64
-	Cutime int64
-	Cstime int64
-}
-
-type Utimbuf struct {
-	Actime  int64
-	Modtime int64
-}
-
-type Rusage struct {
-	Utime    Timeval
-	Stime    Timeval
-	Maxrss   int64
-	Ixrss    int64
-	Idrss    int64
-	Isrss    int64
-	Minflt   int64
-	Majflt   int64
-	Nswap    int64
-	Inblock  int64
-	Oublock  int64
-	Msgsnd   int64
-	Msgrcv   int64
-	Nsignals int64
-	Nvcsw    int64
-	Nivcsw   int64
-}
-
-type Rlimit struct {
-	Cur uint64
-	Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
-	Dev        uint64
-	Ino        uint64
-	Nlink      uint64
-	Mode       uint32
-	Uid        uint32
-	Gid        uint32
-	X__pad2    int32
-	Rdev       uint64
-	Size       int64
-	Blksize    int64
-	Blocks     int64
-	Atim       Timespec
-	Mtim       Timespec
-	Ctim       Timespec
-	X__unused4 uint64
-	X__unused5 uint64
-	X__unused6 uint64
-}
-
-type Statfs_t struct {
-	Type    int64
-	Bsize   int64
-	Blocks  uint64
-	Bfree   uint64
-	Bavail  uint64
-	Files   uint64
-	Ffree   uint64
-	Fsid    Fsid
-	Namelen int64
-	Frsize  int64
-	Flags   int64
-	Spare   [4]int64
-}
-
-type Dirent struct {
-	Ino       uint64
-	Off       int64
-	Reclen    uint16
-	Type      uint8
-	Name      [256]uint8
-	Pad_cgo_0 [5]byte
-}
-
-type Fsid struct {
-	X__val [2]int32
-}
-
-type Flock_t struct {
-	Type      int16
-	Whence    int16
-	Pad_cgo_0 [4]byte
-	Start     int64
-	Len       int64
-	Pid       int32
-	Pad_cgo_1 [4]byte
-}
-
-type RawSockaddrInet4 struct {
-	Family uint16
-	Port   uint16
-	Addr   [4]byte /* in_addr */
-	Zero   [8]uint8
-}
-
-type RawSockaddrInet6 struct {
-	Family   uint16
-	Port     uint16
-	Flowinfo uint32
-	Addr     [16]byte /* in6_addr */
-	Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
-	Family uint16
-	Path   [108]int8
-}
-
-type RawSockaddrLinklayer struct {
-	Family   uint16
-	Protocol uint16
-	Ifindex  int32
-	Hatype   uint16
-	Pkttype  uint8
-	Halen    uint8
-	Addr     [8]uint8
-}
-
-type RawSockaddrNetlink struct {
-	Family uint16
-	Pad    uint16
-	Pid    uint32
-	Groups uint32
-}
-
-type RawSockaddr struct {
-	Family uint16
-	Data   [14]uint8
-}
-
-type RawSockaddrAny struct {
-	Addr RawSockaddr
-	Pad  [96]uint8
-}
-
-type _Socklen uint32
-
-type Linger struct {
-	Onoff  int32
-	Linger int32
-}
-
-type Iovec struct {
-	Base *byte
-	Len  uint64
-}
-
-type IPMreq struct {
-	Multiaddr [4]byte /* in_addr */
-	Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
-	Multiaddr [4]byte /* in_addr */
-	Address   [4]byte /* in_addr */
-	Ifindex   int32
-}
-
-type IPv6Mreq struct {
-	Multiaddr [16]byte /* in6_addr */
-	Interface uint32
-}
-
-type Msghdr struct {
-	Name       *byte
-	Namelen    uint32
-	Pad_cgo_0  [4]byte
-	Iov        *Iovec
-	Iovlen     uint64
-	Control    *byte
-	Controllen uint64
-	Flags      int32
-	Pad_cgo_1  [4]byte
-}
-
-type Cmsghdr struct {
-	Len          uint64
-	Level        int32
-	Type         int32
-	X__cmsg_data [0]uint8
-}
-
-type Inet4Pktinfo struct {
-	Ifindex  int32
-	Spec_dst [4]byte /* in_addr */
-	Addr     [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
-	Addr    [16]byte /* in6_addr */
-	Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
-	Addr RawSockaddrInet6
-	Mtu  uint32
-}
-
-type ICMPv6Filter struct {
-	Data [8]uint32
-}
-
-type Ucred struct {
-	Pid int32
-	Uid uint32
-	Gid uint32
-}
-
-type TCPInfo struct {
-	State          uint8
-	Ca_state       uint8
-	Retransmits    uint8
-	Probes         uint8
-	Backoff        uint8
-	Options        uint8
-	Pad_cgo_0      [2]byte
-	Rto            uint32
-	Ato            uint32
-	Snd_mss        uint32
-	Rcv_mss        uint32
-	Unacked        uint32
-	Sacked         uint32
-	Lost           uint32
-	Retrans        uint32
-	Fackets        uint32
-	Last_data_sent uint32
-	Last_ack_sent  uint32
-	Last_data_recv uint32
-	Last_ack_recv  uint32
-	Pmtu           uint32
-	Rcv_ssthresh   uint32
-	Rtt            uint32
-	Rttvar         uint32
-	Snd_ssthresh   uint32
-	Snd_cwnd       uint32
-	Advmss         uint32
-	Reordering     uint32
-	Rcv_rtt        uint32
-	Rcv_space      uint32
-	Total_retrans  uint32
-}
-
-const (
-	SizeofSockaddrInet4     = 0x10
-	SizeofSockaddrInet6     = 0x1c
-	SizeofSockaddrAny       = 0x70
-	SizeofSockaddrUnix      = 0x6e
-	SizeofSockaddrLinklayer = 0x14
-	SizeofSockaddrNetlink   = 0xc
-	SizeofLinger            = 0x8
-	SizeofIPMreq            = 0x8
-	SizeofIPMreqn           = 0xc
-	SizeofIPv6Mreq          = 0x14
-	SizeofMsghdr            = 0x38
-	SizeofCmsghdr           = 0x10
-	SizeofInet4Pktinfo      = 0xc
-	SizeofInet6Pktinfo      = 0x14
-	SizeofIPv6MTUInfo       = 0x20
-	SizeofICMPv6Filter      = 0x20
-	SizeofUcred             = 0xc
-	SizeofTCPInfo           = 0x68
-)
-
-const (
-	IFA_UNSPEC          = 0x0
-	IFA_ADDRESS         = 0x1
-	IFA_LOCAL           = 0x2
-	IFA_LABEL           = 0x3
-	IFA_BROADCAST       = 0x4
-	IFA_ANYCAST         = 0x5
-	IFA_CACHEINFO       = 0x6
-	IFA_MULTICAST       = 0x7
-	IFLA_UNSPEC         = 0x0
-	IFLA_ADDRESS        = 0x1
-	IFLA_BROADCAST      = 0x2
-	IFLA_IFNAME         = 0x3
-	IFLA_MTU            = 0x4
-	IFLA_LINK           = 0x5
-	IFLA_QDISC          = 0x6
-	IFLA_STATS          = 0x7
-	IFLA_COST           = 0x8
-	IFLA_PRIORITY       = 0x9
-	IFLA_MASTER         = 0xa
-	IFLA_WIRELESS       = 0xb
-	IFLA_PROTINFO       = 0xc
-	IFLA_TXQLEN         = 0xd
-	IFLA_MAP            = 0xe
-	IFLA_WEIGHT         = 0xf
-	IFLA_OPERSTATE      = 0x10
-	IFLA_LINKMODE       = 0x11
-	IFLA_LINKINFO       = 0x12
-	IFLA_NET_NS_PID     = 0x13
-	IFLA_IFALIAS        = 0x14
-	IFLA_MAX            = 0x22
-	RT_SCOPE_UNIVERSE   = 0x0
-	RT_SCOPE_SITE       = 0xc8
-	RT_SCOPE_LINK       = 0xfd
-	RT_SCOPE_HOST       = 0xfe
-	RT_SCOPE_NOWHERE    = 0xff
-	RT_TABLE_UNSPEC     = 0x0
-	RT_TABLE_COMPAT     = 0xfc
-	RT_TABLE_DEFAULT    = 0xfd
-	RT_TABLE_MAIN       = 0xfe
-	RT_TABLE_LOCAL      = 0xff
-	RT_TABLE_MAX        = 0xffffffff
-	RTA_UNSPEC          = 0x0
-	RTA_DST             = 0x1
-	RTA_SRC             = 0x2
-	RTA_IIF             = 0x3
-	RTA_OIF             = 0x4
-	RTA_GATEWAY         = 0x5
-	RTA_PRIORITY        = 0x6
-	RTA_PREFSRC         = 0x7
-	RTA_METRICS         = 0x8
-	RTA_MULTIPATH       = 0x9
-	RTA_FLOW            = 0xb
-	RTA_CACHEINFO       = 0xc
-	RTA_TABLE           = 0xf
-	RTN_UNSPEC          = 0x0
-	RTN_UNICAST         = 0x1
-	RTN_LOCAL           = 0x2
-	RTN_BROADCAST       = 0x3
-	RTN_ANYCAST         = 0x4
-	RTN_MULTICAST       = 0x5
-	RTN_BLACKHOLE       = 0x6
-	RTN_UNREACHABLE     = 0x7
-	RTN_PROHIBIT        = 0x8
-	RTN_THROW           = 0x9
-	RTN_NAT             = 0xa
-	RTN_XRESOLVE        = 0xb
-	RTNLGRP_NONE        = 0x0
-	RTNLGRP_LINK        = 0x1
-	RTNLGRP_NOTIFY      = 0x2
-	RTNLGRP_NEIGH       = 0x3
-	RTNLGRP_TC          = 0x4
-	RTNLGRP_IPV4_IFADDR = 0x5
-	RTNLGRP_IPV4_MROUTE = 0x6
-	RTNLGRP_IPV4_ROUTE  = 0x7
-	RTNLGRP_IPV4_RULE   = 0x8
-	RTNLGRP_IPV6_IFADDR = 0x9
-	RTNLGRP_IPV6_MROUTE = 0xa
-	RTNLGRP_IPV6_ROUTE  = 0xb
-	RTNLGRP_IPV6_IFINFO = 0xc
-	RTNLGRP_IPV6_PREFIX = 0x12
-	RTNLGRP_IPV6_RULE   = 0x13
-	RTNLGRP_ND_USEROPT  = 0x14
-	SizeofNlMsghdr      = 0x10
-	SizeofNlMsgerr      = 0x14
-	SizeofRtGenmsg      = 0x1
-	SizeofNlAttr        = 0x4
-	SizeofRtAttr        = 0x4
-	SizeofIfInfomsg     = 0x10
-	SizeofIfAddrmsg     = 0x8
-	SizeofRtMsg         = 0xc
-	SizeofRtNexthop     = 0x8
-)
-
-type NlMsghdr struct {
-	Len   uint32
-	Type  uint16
-	Flags uint16
-	Seq   uint32
-	Pid   uint32
-}
-
-type NlMsgerr struct {
-	Error int32
-	Msg   NlMsghdr
-}
-
-type RtGenmsg struct {
-	Family uint8
-}
-
-type NlAttr struct {
-	Len  uint16
-	Type uint16
-}
-
-type RtAttr struct {
-	Len  uint16
-	Type uint16
-}
-
-type IfInfomsg struct {
-	Family     uint8
-	X__ifi_pad uint8
-	Type       uint16
-	Index      int32
-	Flags      uint32
-	Change     uint32
-}
-
-type IfAddrmsg struct {
-	Family    uint8
-	Prefixlen uint8
-	Flags     uint8
-	Scope     uint8
-	Index     uint32
-}
-
-type RtMsg struct {
-	Family   uint8
-	Dst_len  uint8
-	Src_len  uint8
-	Tos      uint8
-	Table    uint8
-	Protocol uint8
-	Scope    uint8
-	Type     uint8
-	Flags    uint32
-}
-
-type RtNexthop struct {
-	Len     uint16
-	Flags   uint8
-	Hops    uint8
-	Ifindex int32
-}
-
-const (
-	SizeofSockFilter = 0x8
-	SizeofSockFprog  = 0x10
-)
-
-type SockFilter struct {
-	Code uint16
-	Jt   uint8
-	Jf   uint8
-	K    uint32
-}
-
-type SockFprog struct {
-	Len       uint16
-	Pad_cgo_0 [6]byte
-	Filter    *SockFilter
-}
-
-type InotifyEvent struct {
-	Wd     int32
-	Mask   uint32
-	Cookie uint32
-	Len    uint32
-	Name   [0]uint8
-}
-
-const SizeofInotifyEvent = 0x10
-
-type PtraceRegs struct {
-	Gpr       [32]uint64
-	Nip       uint64
-	Msr       uint64
-	Orig_gpr3 uint64
-	Ctr       uint64
-	Link      uint64
-	Xer       uint64
-	Ccr       uint64
-	Softe     uint64
-	Trap      uint64
-	Dar       uint64
-	Dsisr     uint64
-	Result    uint64
-}
-
-type FdSet struct {
-	Bits [16]int64
-}
-
-type Sysinfo_t struct {
-	Uptime    int64
-	Loads     [3]uint64
-	Totalram  uint64
-	Freeram   uint64
-	Sharedram uint64
-	Bufferram uint64
-	Totalswap uint64
-	Freeswap  uint64
-	Procs     uint16
-	Pad       uint16
-	Pad_cgo_0 [4]byte
-	Totalhigh uint64
-	Freehigh  uint64
-	Unit      uint32
-	X_f       [0]uint8
-	Pad_cgo_1 [4]byte
-}
-
-type Utsname struct {
-	Sysname    [65]uint8
-	Nodename   [65]uint8
-	Release    [65]uint8
-	Version    [65]uint8
-	Machine    [65]uint8
-	Domainname [65]uint8
-}
-
-type Ustat_t struct {
-	Tfree     int32
-	Pad_cgo_0 [4]byte
-	Tinode    uint64
-	Fname     [6]uint8
-	Fpack     [6]uint8
-	Pad_cgo_1 [4]byte
-}
-
-type EpollEvent struct {
-	Events uint32
-	Fd     int32
-	Pad    int32
-}
-
-const (
-	_AT_FDCWD            = -0x64
-	_AT_REMOVEDIR        = 0x200
-	_AT_SYMLINK_NOFOLLOW = 0x100
-)
-
-type Termios struct {
-	Iflag     uint32
-	Oflag     uint32
-	Cflag     uint32
-	Lflag     uint32
-	Line      uint8
-	Cc        [32]uint8
-	Pad_cgo_0 [3]byte
-	Ispeed    uint32
-	Ospeed    uint32
-}
-
-const (
-	IUCLC  = 0x1000
-	OLCUC  = 0x4
-	TCGETS = 0x403c7413
-	TCSETS = 0x803c7414
-	XCASE  = 0x4000
-)
diff --git a/src/syscall/ztypes_linux_ppc64le.go b/src/syscall/ztypes_linux_ppc64le.go
deleted file mode 100644
index 27ca004..0000000
--- a/src/syscall/ztypes_linux_ppc64le.go
+++ /dev/null
@@ -1,606 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_linux.go
-
-// +build ppc64le,linux
-
-package syscall
-
-const (
-	sizeofPtr      = 0x8
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x8
-	sizeofLongLong = 0x8
-	PathMax        = 0x1000
-)
-
-type (
-	_C_short     int16
-	_C_int       int32
-	_C_long      int64
-	_C_long_long int64
-)
-
-type Timespec struct {
-	Sec  int64
-	Nsec int64
-}
-
-type Timeval struct {
-	Sec  int64
-	Usec int64
-}
-
-type Timex struct {
-	Modes     uint32
-	Pad_cgo_0 [4]byte
-	Offset    int64
-	Freq      int64
-	Maxerror  int64
-	Esterror  int64
-	Status    int32
-	Pad_cgo_1 [4]byte
-	Constant  int64
-	Precision int64
-	Tolerance int64
-	Time      Timeval
-	Tick      int64
-	Ppsfreq   int64
-	Jitter    int64
-	Shift     int32
-	Pad_cgo_2 [4]byte
-	Stabil    int64
-	Jitcnt    int64
-	Calcnt    int64
-	Errcnt    int64
-	Stbcnt    int64
-	Tai       int32
-	Pad_cgo_3 [44]byte
-}
-
-type Time_t int64
-
-type Tms struct {
-	Utime  int64
-	Stime  int64
-	Cutime int64
-	Cstime int64
-}
-
-type Utimbuf struct {
-	Actime  int64
-	Modtime int64
-}
-
-type Rusage struct {
-	Utime    Timeval
-	Stime    Timeval
-	Maxrss   int64
-	Ixrss    int64
-	Idrss    int64
-	Isrss    int64
-	Minflt   int64
-	Majflt   int64
-	Nswap    int64
-	Inblock  int64
-	Oublock  int64
-	Msgsnd   int64
-	Msgrcv   int64
-	Nsignals int64
-	Nvcsw    int64
-	Nivcsw   int64
-}
-
-type Rlimit struct {
-	Cur uint64
-	Max uint64
-}
-
-type _Gid_t uint32
-
-type Stat_t struct {
-	Dev                uint64
-	Ino                uint64
-	Nlink              uint64
-	Mode               uint32
-	Uid                uint32
-	Gid                uint32
-	X__pad2            int32
-	Rdev               uint64
-	Size               int64
-	Blksize            int64
-	Blocks             int64
-	Atim               Timespec
-	Mtim               Timespec
-	Ctim               Timespec
-	X__glibc_reserved4 uint64
-	X__glibc_reserved5 uint64
-	X__glibc_reserved6 uint64
-}
-
-type Statfs_t struct {
-	Type    int64
-	Bsize   int64
-	Blocks  uint64
-	Bfree   uint64
-	Bavail  uint64
-	Files   uint64
-	Ffree   uint64
-	Fsid    Fsid
-	Namelen int64
-	Frsize  int64
-	Flags   int64
-	Spare   [4]int64
-}
-
-type Dirent struct {
-	Ino       uint64
-	Off       int64
-	Reclen    uint16
-	Type      uint8
-	Name      [256]uint8
-	Pad_cgo_0 [5]byte
-}
-
-type Fsid struct {
-	X__val [2]int32
-}
-
-type Flock_t struct {
-	Type      int16
-	Whence    int16
-	Pad_cgo_0 [4]byte
-	Start     int64
-	Len       int64
-	Pid       int32
-	Pad_cgo_1 [4]byte
-}
-
-type RawSockaddrInet4 struct {
-	Family uint16
-	Port   uint16
-	Addr   [4]byte /* in_addr */
-	Zero   [8]uint8
-}
-
-type RawSockaddrInet6 struct {
-	Family   uint16
-	Port     uint16
-	Flowinfo uint32
-	Addr     [16]byte /* in6_addr */
-	Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
-	Family uint16
-	Path   [108]int8
-}
-
-type RawSockaddrLinklayer struct {
-	Family   uint16
-	Protocol uint16
-	Ifindex  int32
-	Hatype   uint16
-	Pkttype  uint8
-	Halen    uint8
-	Addr     [8]uint8
-}
-
-type RawSockaddrNetlink struct {
-	Family uint16
-	Pad    uint16
-	Pid    uint32
-	Groups uint32
-}
-
-type RawSockaddr struct {
-	Family uint16
-	Data   [14]uint8
-}
-
-type RawSockaddrAny struct {
-	Addr RawSockaddr
-	Pad  [96]uint8
-}
-
-type _Socklen uint32
-
-type Linger struct {
-	Onoff  int32
-	Linger int32
-}
-
-type Iovec struct {
-	Base *byte
-	Len  uint64
-}
-
-type IPMreq struct {
-	Multiaddr [4]byte /* in_addr */
-	Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
-	Multiaddr [4]byte /* in_addr */
-	Address   [4]byte /* in_addr */
-	Ifindex   int32
-}
-
-type IPv6Mreq struct {
-	Multiaddr [16]byte /* in6_addr */
-	Interface uint32
-}
-
-type Msghdr struct {
-	Name       *byte
-	Namelen    uint32
-	Pad_cgo_0  [4]byte
-	Iov        *Iovec
-	Iovlen     uint64
-	Control    *byte
-	Controllen uint64
-	Flags      int32
-	Pad_cgo_1  [4]byte
-}
-
-type Cmsghdr struct {
-	Len          uint64
-	Level        int32
-	Type         int32
-	X__cmsg_data [0]uint8
-}
-
-type Inet4Pktinfo struct {
-	Ifindex  int32
-	Spec_dst [4]byte /* in_addr */
-	Addr     [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
-	Addr    [16]byte /* in6_addr */
-	Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
-	Addr RawSockaddrInet6
-	Mtu  uint32
-}
-
-type ICMPv6Filter struct {
-	Data [8]uint32
-}
-
-type Ucred struct {
-	Pid int32
-	Uid uint32
-	Gid uint32
-}
-
-type TCPInfo struct {
-	State          uint8
-	Ca_state       uint8
-	Retransmits    uint8
-	Probes         uint8
-	Backoff        uint8
-	Options        uint8
-	Pad_cgo_0      [2]byte
-	Rto            uint32
-	Ato            uint32
-	Snd_mss        uint32
-	Rcv_mss        uint32
-	Unacked        uint32
-	Sacked         uint32
-	Lost           uint32
-	Retrans        uint32
-	Fackets        uint32
-	Last_data_sent uint32
-	Last_ack_sent  uint32
-	Last_data_recv uint32
-	Last_ack_recv  uint32
-	Pmtu           uint32
-	Rcv_ssthresh   uint32
-	Rtt            uint32
-	Rttvar         uint32
-	Snd_ssthresh   uint32
-	Snd_cwnd       uint32
-	Advmss         uint32
-	Reordering     uint32
-	Rcv_rtt        uint32
-	Rcv_space      uint32
-	Total_retrans  uint32
-}
-
-const (
-	SizeofSockaddrInet4     = 0x10
-	SizeofSockaddrInet6     = 0x1c
-	SizeofSockaddrAny       = 0x70
-	SizeofSockaddrUnix      = 0x6e
-	SizeofSockaddrLinklayer = 0x14
-	SizeofSockaddrNetlink   = 0xc
-	SizeofLinger            = 0x8
-	SizeofIPMreq            = 0x8
-	SizeofIPMreqn           = 0xc
-	SizeofIPv6Mreq          = 0x14
-	SizeofMsghdr            = 0x38
-	SizeofCmsghdr           = 0x10
-	SizeofInet4Pktinfo      = 0xc
-	SizeofInet6Pktinfo      = 0x14
-	SizeofIPv6MTUInfo       = 0x20
-	SizeofICMPv6Filter      = 0x20
-	SizeofUcred             = 0xc
-	SizeofTCPInfo           = 0x68
-)
-
-const (
-	IFA_UNSPEC          = 0x0
-	IFA_ADDRESS         = 0x1
-	IFA_LOCAL           = 0x2
-	IFA_LABEL           = 0x3
-	IFA_BROADCAST       = 0x4
-	IFA_ANYCAST         = 0x5
-	IFA_CACHEINFO       = 0x6
-	IFA_MULTICAST       = 0x7
-	IFLA_UNSPEC         = 0x0
-	IFLA_ADDRESS        = 0x1
-	IFLA_BROADCAST      = 0x2
-	IFLA_IFNAME         = 0x3
-	IFLA_MTU            = 0x4
-	IFLA_LINK           = 0x5
-	IFLA_QDISC          = 0x6
-	IFLA_STATS          = 0x7
-	IFLA_COST           = 0x8
-	IFLA_PRIORITY       = 0x9
-	IFLA_MASTER         = 0xa
-	IFLA_WIRELESS       = 0xb
-	IFLA_PROTINFO       = 0xc
-	IFLA_TXQLEN         = 0xd
-	IFLA_MAP            = 0xe
-	IFLA_WEIGHT         = 0xf
-	IFLA_OPERSTATE      = 0x10
-	IFLA_LINKMODE       = 0x11
-	IFLA_LINKINFO       = 0x12
-	IFLA_NET_NS_PID     = 0x13
-	IFLA_IFALIAS        = 0x14
-	IFLA_MAX            = 0x22
-	RT_SCOPE_UNIVERSE   = 0x0
-	RT_SCOPE_SITE       = 0xc8
-	RT_SCOPE_LINK       = 0xfd
-	RT_SCOPE_HOST       = 0xfe
-	RT_SCOPE_NOWHERE    = 0xff
-	RT_TABLE_UNSPEC     = 0x0
-	RT_TABLE_COMPAT     = 0xfc
-	RT_TABLE_DEFAULT    = 0xfd
-	RT_TABLE_MAIN       = 0xfe
-	RT_TABLE_LOCAL      = 0xff
-	RT_TABLE_MAX        = 0xffffffff
-	RTA_UNSPEC          = 0x0
-	RTA_DST             = 0x1
-	RTA_SRC             = 0x2
-	RTA_IIF             = 0x3
-	RTA_OIF             = 0x4
-	RTA_GATEWAY         = 0x5
-	RTA_PRIORITY        = 0x6
-	RTA_PREFSRC         = 0x7
-	RTA_METRICS         = 0x8
-	RTA_MULTIPATH       = 0x9
-	RTA_FLOW            = 0xb
-	RTA_CACHEINFO       = 0xc
-	RTA_TABLE           = 0xf
-	RTN_UNSPEC          = 0x0
-	RTN_UNICAST         = 0x1
-	RTN_LOCAL           = 0x2
-	RTN_BROADCAST       = 0x3
-	RTN_ANYCAST         = 0x4
-	RTN_MULTICAST       = 0x5
-	RTN_BLACKHOLE       = 0x6
-	RTN_UNREACHABLE     = 0x7
-	RTN_PROHIBIT        = 0x8
-	RTN_THROW           = 0x9
-	RTN_NAT             = 0xa
-	RTN_XRESOLVE        = 0xb
-	RTNLGRP_NONE        = 0x0
-	RTNLGRP_LINK        = 0x1
-	RTNLGRP_NOTIFY      = 0x2
-	RTNLGRP_NEIGH       = 0x3
-	RTNLGRP_TC          = 0x4
-	RTNLGRP_IPV4_IFADDR = 0x5
-	RTNLGRP_IPV4_MROUTE = 0x6
-	RTNLGRP_IPV4_ROUTE  = 0x7
-	RTNLGRP_IPV4_RULE   = 0x8
-	RTNLGRP_IPV6_IFADDR = 0x9
-	RTNLGRP_IPV6_MROUTE = 0xa
-	RTNLGRP_IPV6_ROUTE  = 0xb
-	RTNLGRP_IPV6_IFINFO = 0xc
-	RTNLGRP_IPV6_PREFIX = 0x12
-	RTNLGRP_IPV6_RULE   = 0x13
-	RTNLGRP_ND_USEROPT  = 0x14
-	SizeofNlMsghdr      = 0x10
-	SizeofNlMsgerr      = 0x14
-	SizeofRtGenmsg      = 0x1
-	SizeofNlAttr        = 0x4
-	SizeofRtAttr        = 0x4
-	SizeofIfInfomsg     = 0x10
-	SizeofIfAddrmsg     = 0x8
-	SizeofRtMsg         = 0xc
-	SizeofRtNexthop     = 0x8
-)
-
-type NlMsghdr struct {
-	Len   uint32
-	Type  uint16
-	Flags uint16
-	Seq   uint32
-	Pid   uint32
-}
-
-type NlMsgerr struct {
-	Error int32
-	Msg   NlMsghdr
-}
-
-type RtGenmsg struct {
-	Family uint8
-}
-
-type NlAttr struct {
-	Len  uint16
-	Type uint16
-}
-
-type RtAttr struct {
-	Len  uint16
-	Type uint16
-}
-
-type IfInfomsg struct {
-	Family     uint8
-	X__ifi_pad uint8
-	Type       uint16
-	Index      int32
-	Flags      uint32
-	Change     uint32
-}
-
-type IfAddrmsg struct {
-	Family    uint8
-	Prefixlen uint8
-	Flags     uint8
-	Scope     uint8
-	Index     uint32
-}
-
-type RtMsg struct {
-	Family   uint8
-	Dst_len  uint8
-	Src_len  uint8
-	Tos      uint8
-	Table    uint8
-	Protocol uint8
-	Scope    uint8
-	Type     uint8
-	Flags    uint32
-}
-
-type RtNexthop struct {
-	Len     uint16
-	Flags   uint8
-	Hops    uint8
-	Ifindex int32
-}
-
-const (
-	SizeofSockFilter = 0x8
-	SizeofSockFprog  = 0x10
-)
-
-type SockFilter struct {
-	Code uint16
-	Jt   uint8
-	Jf   uint8
-	K    uint32
-}
-
-type SockFprog struct {
-	Len       uint16
-	Pad_cgo_0 [6]byte
-	Filter    *SockFilter
-}
-
-type InotifyEvent struct {
-	Wd     int32
-	Mask   uint32
-	Cookie uint32
-	Len    uint32
-	Name   [0]uint8
-}
-
-const SizeofInotifyEvent = 0x10
-
-type PtraceRegs struct {
-	Gpr       [32]uint64
-	Nip       uint64
-	Msr       uint64
-	Orig_gpr3 uint64
-	Ctr       uint64
-	Link      uint64
-	Xer       uint64
-	Ccr       uint64
-	Softe     uint64
-	Trap      uint64
-	Dar       uint64
-	Dsisr     uint64
-	Result    uint64
-}
-
-type FdSet struct {
-	Bits [16]int64
-}
-
-type Sysinfo_t struct {
-	Uptime    int64
-	Loads     [3]uint64
-	Totalram  uint64
-	Freeram   uint64
-	Sharedram uint64
-	Bufferram uint64
-	Totalswap uint64
-	Freeswap  uint64
-	Procs     uint16
-	Pad       uint16
-	Pad_cgo_0 [4]byte
-	Totalhigh uint64
-	Freehigh  uint64
-	Unit      uint32
-	X_f       [0]uint8
-	Pad_cgo_1 [4]byte
-}
-
-type Utsname struct {
-	Sysname    [65]uint8
-	Nodename   [65]uint8
-	Release    [65]uint8
-	Version    [65]uint8
-	Machine    [65]uint8
-	Domainname [65]uint8
-}
-
-type Ustat_t struct {
-	Tfree     int32
-	Pad_cgo_0 [4]byte
-	Tinode    uint64
-	Fname     [6]uint8
-	Fpack     [6]uint8
-	Pad_cgo_1 [4]byte
-}
-
-type EpollEvent struct {
-	Events uint32
-	Fd     int32
-	Pad    int32
-}
-
-const (
-	_AT_FDCWD            = -0x64
-	_AT_REMOVEDIR        = 0x200
-	_AT_SYMLINK_NOFOLLOW = 0x100
-)
-
-type Termios struct {
-	Iflag     uint32
-	Oflag     uint32
-	Cflag     uint32
-	Lflag     uint32
-	Line      uint8
-	Cc        [32]uint8
-	Pad_cgo_0 [3]byte
-	Ispeed    uint32
-	Ospeed    uint32
-}
-
-const (
-	IUCLC  = 0x1000
-	OLCUC  = 0x4
-	TCGETS = 0x403c7413
-	TCSETS = 0x803c7414
-	XCASE  = 0x4000
-)
diff --git a/src/syscall/ztypes_openbsd_arm.go b/src/syscall/ztypes_openbsd_arm.go
deleted file mode 100644
index e1d8938..0000000
--- a/src/syscall/ztypes_openbsd_arm.go
+++ /dev/null
@@ -1,434 +0,0 @@
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_openbsd.go
-
-// +build arm,openbsd
-
-package syscall
-
-const (
-	sizeofPtr      = 0x4
-	sizeofShort    = 0x2
-	sizeofInt      = 0x4
-	sizeofLong     = 0x4
-	sizeofLongLong = 0x8
-)
-
-type (
-	_C_short     int16
-	_C_int       int32
-	_C_long      int32
-	_C_long_long int64
-)
-
-type Timespec struct {
-	Sec  int64
-	Nsec int32
-}
-
-type Timeval struct {
-	Sec  int64
-	Usec int32
-}
-
-type Rusage struct {
-	Utime    Timeval
-	Stime    Timeval
-	Maxrss   int32
-	Ixrss    int32
-	Idrss    int32
-	Isrss    int32
-	Minflt   int32
-	Majflt   int32
-	Nswap    int32
-	Inblock  int32
-	Oublock  int32
-	Msgsnd   int32
-	Msgrcv   int32
-	Nsignals int32
-	Nvcsw    int32
-	Nivcsw   int32
-}
-
-type Rlimit struct {
-	Cur uint64
-	Max uint64
-}
-
-type _Gid_t uint32
-
-const (
-	S_IFMT   = 0xf000
-	S_IFIFO  = 0x1000
-	S_IFCHR  = 0x2000
-	S_IFDIR  = 0x4000
-	S_IFBLK  = 0x6000
-	S_IFREG  = 0x8000
-	S_IFLNK  = 0xa000
-	S_IFSOCK = 0xc000
-	S_ISUID  = 0x800
-	S_ISGID  = 0x400
-	S_ISVTX  = 0x200
-	S_IRUSR  = 0x100
-	S_IWUSR  = 0x80
-	S_IXUSR  = 0x40
-)
-
-type Stat_t struct {
-	Mode           uint32
-	Dev            int32
-	Ino            uint64
-	Nlink          uint32
-	Uid            uint32
-	Gid            uint32
-	Rdev           int32
-	Atim           Timespec
-	Mtim           Timespec
-	Ctim           Timespec
-	Size           int64
-	Blocks         int64
-	Blksize        int32
-	Flags          uint32
-	Gen            uint32
-	X__st_birthtim Timespec
-}
-
-type Statfs_t struct {
-	F_flags       uint32
-	F_bsize       uint32
-	F_iosize      uint32
-	F_blocks      uint64
-	F_bfree       uint64
-	F_bavail      int64
-	F_files       uint64
-	F_ffree       uint64
-	F_favail      int64
-	F_syncwrites  uint64
-	F_syncreads   uint64
-	F_asyncwrites uint64
-	F_asyncreads  uint64
-	F_fsid        Fsid
-	F_namemax     uint32
-	F_owner       uint32
-	F_ctime       uint64
-	F_fstypename  [16]uint8
-	F_mntonname   [90]uint8
-	F_mntfromname [90]uint8
-	F_mntfromspec [90]uint8
-	Pad_cgo_0     [2]byte
-	Mount_info    [160]byte
-}
-
-type Flock_t struct {
-	Start  int64
-	Len    int64
-	Pid    int32
-	Type   int16
-	Whence int16
-}
-
-type Dirent struct {
-	Fileno       uint64
-	Off          int64
-	Reclen       uint16
-	Type         uint8
-	Namlen       uint8
-	X__d_padding [4]uint8
-	Name         [256]uint8
-}
-
-type Fsid struct {
-	Val [2]int32
-}
-
-type RawSockaddrInet4 struct {
-	Len    uint8
-	Family uint8
-	Port   uint16
-	Addr   [4]byte /* in_addr */
-	Zero   [8]int8
-}
-
-type RawSockaddrInet6 struct {
-	Len      uint8
-	Family   uint8
-	Port     uint16
-	Flowinfo uint32
-	Addr     [16]byte /* in6_addr */
-	Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
-	Len    uint8
-	Family uint8
-	Path   [104]int8
-}
-
-type RawSockaddrDatalink struct {
-	Len    uint8
-	Family uint8
-	Index  uint16
-	Type   uint8
-	Nlen   uint8
-	Alen   uint8
-	Slen   uint8
-	Data   [24]int8
-}
-
-type RawSockaddr struct {
-	Len    uint8
-	Family uint8
-	Data   [14]int8
-}
-
-type RawSockaddrAny struct {
-	Addr RawSockaddr
-	Pad  [92]int8
-}
-
-type _Socklen uint32
-
-type Linger struct {
-	Onoff  int32
-	Linger int32
-}
-
-type Iovec struct {
-	Base *byte
-	Len  uint32
-}
-
-type IPMreq struct {
-	Multiaddr [4]byte /* in_addr */
-	Interface [4]byte /* in_addr */
-}
-
-type IPv6Mreq struct {
-	Multiaddr [16]byte /* in6_addr */
-	Interface uint32
-}
-
-type Msghdr struct {
-	Name       *byte
-	Namelen    uint32
-	Iov        *Iovec
-	Iovlen     uint32
-	Control    *byte
-	Controllen uint32
-	Flags      int32
-}
-
-type Cmsghdr struct {
-	Len   uint32
-	Level int32
-	Type  int32
-}
-
-type Inet6Pktinfo struct {
-	Addr    [16]byte /* in6_addr */
-	Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
-	Addr RawSockaddrInet6
-	Mtu  uint32
-}
-
-type ICMPv6Filter struct {
-	Filt [8]uint32
-}
-
-const (
-	SizeofSockaddrInet4    = 0x10
-	SizeofSockaddrInet6    = 0x1c
-	SizeofSockaddrAny      = 0x6c
-	SizeofSockaddrUnix     = 0x6a
-	SizeofSockaddrDatalink = 0x20
-	SizeofLinger           = 0x8
-	SizeofIPMreq           = 0x8
-	SizeofIPv6Mreq         = 0x14
-	SizeofMsghdr           = 0x1c
-	SizeofCmsghdr          = 0xc
-	SizeofInet6Pktinfo     = 0x14
-	SizeofIPv6MTUInfo      = 0x20
-	SizeofICMPv6Filter     = 0x20
-)
-
-const (
-	PTRACE_TRACEME = 0x0
-	PTRACE_CONT    = 0x7
-	PTRACE_KILL    = 0x8
-)
-
-type Kevent_t struct {
-	Ident  uint32
-	Filter int16
-	Flags  uint16
-	Fflags uint32
-	Data   int64
-	Udata  *byte
-}
-
-type FdSet struct {
-	Bits [32]uint32
-}
-
-const (
-	SizeofIfMsghdr         = 0x98
-	SizeofIfData           = 0x80
-	SizeofIfaMsghdr        = 0x18
-	SizeofIfAnnounceMsghdr = 0x1a
-	SizeofRtMsghdr         = 0x60
-	SizeofRtMetrics        = 0x38
-)
-
-type IfMsghdr struct {
-	Msglen  uint16
-	Version uint8
-	Type    uint8
-	Hdrlen  uint16
-	Index   uint16
-	Tableid uint16
-	Pad1    uint8
-	Pad2    uint8
-	Addrs   int32
-	Flags   int32
-	Xflags  int32
-	Data    IfData
-}
-
-type IfData struct {
-	Type         uint8
-	Addrlen      uint8
-	Hdrlen       uint8
-	Link_state   uint8
-	Mtu          uint32
-	Metric       uint32
-	Pad          uint32
-	Baudrate     uint64
-	Ipackets     uint64
-	Ierrors      uint64
-	Opackets     uint64
-	Oerrors      uint64
-	Collisions   uint64
-	Ibytes       uint64
-	Obytes       uint64
-	Imcasts      uint64
-	Omcasts      uint64
-	Iqdrops      uint64
-	Noproto      uint64
-	Capabilities uint32
-	Lastchange   Timeval
-}
-
-type IfaMsghdr struct {
-	Msglen  uint16
-	Version uint8
-	Type    uint8
-	Hdrlen  uint16
-	Index   uint16
-	Tableid uint16
-	Pad1    uint8
-	Pad2    uint8
-	Addrs   int32
-	Flags   int32
-	Metric  int32
-}
-
-type IfAnnounceMsghdr struct {
-	Msglen  uint16
-	Version uint8
-	Type    uint8
-	Hdrlen  uint16
-	Index   uint16
-	What    uint16
-	Name    [16]uint8
-}
-
-type RtMsghdr struct {
-	Msglen   uint16
-	Version  uint8
-	Type     uint8
-	Hdrlen   uint16
-	Index    uint16
-	Tableid  uint16
-	Priority uint8
-	Mpls     uint8
-	Addrs    int32
-	Flags    int32
-	Fmask    int32
-	Pid      int32
-	Seq      int32
-	Errno    int32
-	Inits    uint32
-	Rmx      RtMetrics
-}
-
-type RtMetrics struct {
-	Pksent   uint64
-	Expire   int64
-	Locks    uint32
-	Mtu      uint32
-	Refcnt   uint32
-	Hopcount uint32
-	Recvpipe uint32
-	Sendpipe uint32
-	Ssthresh uint32
-	Rtt      uint32
-	Rttvar   uint32
-	Pad      uint32
-}
-
-type Mclpool struct{}
-
-const (
-	SizeofBpfVersion = 0x4
-	SizeofBpfStat    = 0x8
-	SizeofBpfProgram = 0x8
-	SizeofBpfInsn    = 0x8
-	SizeofBpfHdr     = 0x14
-)
-
-type BpfVersion struct {
-	Major uint16
-	Minor uint16
-}
-
-type BpfStat struct {
-	Recv uint32
-	Drop uint32
-}
-
-type BpfProgram struct {
-	Len   uint32
-	Insns *BpfInsn
-}
-
-type BpfInsn struct {
-	Code uint16
-	Jt   uint8
-	Jf   uint8
-	K    uint32
-}
-
-type BpfHdr struct {
-	Tstamp    BpfTimeval
-	Caplen    uint32
-	Datalen   uint32
-	Hdrlen    uint16
-	Pad_cgo_0 [2]byte
-}
-
-type BpfTimeval struct {
-	Sec  uint32
-	Usec uint32
-}
-
-type Termios struct {
-	Iflag  uint32
-	Oflag  uint32
-	Cflag  uint32
-	Lflag  uint32
-	Cc     [20]uint8
-	Ispeed int32
-	Ospeed int32
-}
diff --git a/src/text/scanner/example_test.go b/src/text/scanner/example_test.go
deleted file mode 100644
index 1011459..0000000
--- a/src/text/scanner/example_test.go
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package scanner_test
-
-import (
-	"fmt"
-	"strings"
-	"text/scanner"
-)
-
-func Example() {
-	const src = `
-	// This is scanned code.
-	if a > 10 {
-		someParsable = text
-	}`
-	var s scanner.Scanner
-	s.Init(strings.NewReader(src))
-	var tok rune
-	for tok != scanner.EOF {
-		tok = s.Scan()
-		fmt.Println("At position", s.Pos(), ":", s.TokenText())
-	}
-
-	// Output:
-	// At position 3:4 : if
-	// At position 3:6 : a
-	// At position 3:8 : >
-	// At position 3:11 : 10
-	// At position 3:13 : {
-	// At position 4:15 : someParsable
-	// At position 4:17 : =
-	// At position 4:22 : text
-	// At position 5:3 : }
-	// At position 5:3 :
-}
diff --git a/src/text/template/option.go b/src/text/template/option.go
deleted file mode 100644
index addce2d..0000000
--- a/src/text/template/option.go
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains the code to handle template options.
-
-package template
-
-import "strings"
-
-// missingKeyAction defines how to respond to indexing a map with a key that is not present.
-type missingKeyAction int
-
-const (
-	mapInvalid   missingKeyAction = iota // Return an invalid reflect.Value.
-	mapZeroValue                         // Return the zero value for the map element.
-	mapError                             // Error out
-)
-
-type option struct {
-	missingKey missingKeyAction
-}
-
-// Option sets options for the template. Options are described by
-// strings, either a simple string or "key=value". There can be at
-// most one equals sign in an option string. If the option string
-// is unrecognized or otherwise invalid, Option panics.
-//
-// Known options:
-//
-// missingkey: Control the behavior during execution if a map is
-// indexed with a key that is not present in the map.
-//	"missingkey=default" or "missingkey=invalid"
-//		The default behavior: Do nothing and continue execution.
-//		If printed, the result of the index operation is the string
-//		"<no value>".
-//	"missingkey=zero"
-//		The operation returns the zero value for the map type's element.
-//	"missingkey=error"
-//		Execution stops immediately with an error.
-//
-func (t *Template) Option(opt ...string) *Template {
-	t.init()
-	for _, s := range opt {
-		t.setOption(s)
-	}
-	return t
-}
-
-func (t *Template) setOption(opt string) {
-	if opt == "" {
-		panic("empty option string")
-	}
-	elems := strings.Split(opt, "=")
-	switch len(elems) {
-	case 2:
-		// key=value
-		switch elems[0] {
-		case "missingkey":
-			switch elems[1] {
-			case "invalid", "default":
-				t.option.missingKey = mapInvalid
-				return
-			case "zero":
-				t.option.missingKey = mapZeroValue
-				return
-			case "error":
-				t.option.missingKey = mapError
-				return
-			}
-		}
-	}
-	panic("unrecognized option: " + opt)
-}
diff --git a/src/time/zoneinfo_ios.go b/src/time/zoneinfo_ios.go
deleted file mode 100644
index f09166c..0000000
--- a/src/time/zoneinfo_ios.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin
-// +build arm arm64
-
-package time
-
-import "syscall"
-
-var zoneFile string
-
-func init() {
-	wd, err := syscall.Getwd()
-	if err != nil {
-		return
-	}
-
-	// The working directory at initialization is the root of the
-	// app bundle: "/private/.../bundlename.app". That's where we
-	// keep zoneinfo.zip.
-	zoneFile = wd + "/zoneinfo.zip"
-}
-
-func forceZipFileForTesting(zipOnly bool) {
-	// On iOS we only have the zip file.
-}
-
-func initTestingZone() {
-	z, err := loadZoneFile(zoneFile, "America/Los_Angeles")
-	if err != nil {
-		panic("cannot load America/Los_Angeles for testing: " + err.Error())
-	}
-	z.name = "Local"
-	localLoc = *z
-}
-
-func initLocal() {
-	// TODO(crawshaw): [NSTimeZone localTimeZone]
-	localLoc = *UTC
-}
-
-func loadLocation(name string) (*Location, error) {
-	z, err := loadZoneFile(zoneFile, name)
-	if err != nil {
-		return nil, err
-	}
-	z.name = name
-	return z, nil
-}
diff --git a/test/bench/shootout/fasta-1000.txt b/test/bench/shootout/fasta-1000.txt
deleted file mode 100644
index f1caba0..0000000
--- a/test/bench/shootout/fasta-1000.txt
+++ /dev/null
@@ -1,171 +0,0 @@
->ONE Homo sapiens alu
-GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGA
-TCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACT
-AAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAG
-GCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCG
-CCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGT
-GGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCA
-GGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAA
-TTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAG
-AATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCA
-GCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGT
-AATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACC
-AGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTG
-GTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACC
-CGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAG
-AGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTT
-TGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACA
-TGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCT
-GTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGG
-TTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGT
-CTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGG
-CGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCG
-TCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTA
-CTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCG
-AGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCG
-GGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACC
-TGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAA
-TACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGA
-GGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACT
-GCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTC
-ACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGT
-TCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGC
-CGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCG
-CTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTG
-GGCGACAGAGCGAGACTCCG
->TWO IUB ambiguity codes
-cttBtatcatatgctaKggNcataaaSatgtaaaDcDRtBggDtctttataattcBgtcg
-tactDtDagcctatttSVHtHttKtgtHMaSattgWaHKHttttagacatWatgtRgaaa
-NtactMcSMtYtcMgRtacttctWBacgaaatatagScDtttgaagacacatagtVgYgt
-cattHWtMMWcStgttaggKtSgaYaaccWStcgBttgcgaMttBYatcWtgacaYcaga
-gtaBDtRacttttcWatMttDBcatWtatcttactaBgaYtcttgttttttttYaaScYa
-HgtgttNtSatcMtcVaaaStccRcctDaataataStcYtRDSaMtDttgttSagtRRca
-tttHatSttMtWgtcgtatSSagactYaaattcaMtWatttaSgYttaRgKaRtccactt
-tattRggaMcDaWaWagttttgacatgttctacaaaRaatataataaMttcgDacgaSSt
-acaStYRctVaNMtMgtaggcKatcttttattaaaaagVWaHKYagtttttatttaacct
-tacgtVtcVaattVMBcttaMtttaStgacttagattWWacVtgWYagWVRctDattBYt
-gtttaagaagattattgacVatMaacattVctgtBSgaVtgWWggaKHaatKWcBScSWa
-accRVacacaaactaccScattRatatKVtactatatttHttaagtttSKtRtacaaagt
-RDttcaaaaWgcacatWaDgtDKacgaacaattacaRNWaatHtttStgttattaaMtgt
-tgDcgtMgcatBtgcttcgcgaDWgagctgcgaggggVtaaScNatttacttaatgacag
-cccccacatYScaMgtaggtYaNgttctgaMaacNaMRaacaaacaKctacatagYWctg
-ttWaaataaaataRattagHacacaagcgKatacBttRttaagtatttccgatctHSaat
-actcNttMaagtattMtgRtgaMgcataatHcMtaBSaRattagttgatHtMttaaKagg
-YtaaBataSaVatactWtataVWgKgttaaaacagtgcgRatatacatVtHRtVYataSa
-KtWaStVcNKHKttactatccctcatgWHatWaRcttactaggatctataDtDHBttata
-aaaHgtacVtagaYttYaKcctattcttcttaataNDaaggaaaDYgcggctaaWSctBa
-aNtgctggMBaKctaMVKagBaactaWaDaMaccYVtNtaHtVWtKgRtcaaNtYaNacg
-gtttNattgVtttctgtBaWgtaattcaagtcaVWtactNggattctttaYtaaagccgc
-tcttagHVggaYtgtNcDaVagctctctKgacgtatagYcctRYHDtgBattDaaDgccK
-tcHaaStttMcctagtattgcRgWBaVatHaaaataYtgtttagMDMRtaataaggatMt
-ttctWgtNtgtgaaaaMaatatRtttMtDgHHtgtcattttcWattRSHcVagaagtacg
-ggtaKVattKYagactNaatgtttgKMMgYNtcccgSKttctaStatatNVataYHgtNa
-BKRgNacaactgatttcctttaNcgatttctctataScaHtataRagtcRVttacDSDtt
-aRtSatacHgtSKacYagttMHtWataggatgactNtatSaNctataVtttRNKtgRacc
-tttYtatgttactttttcctttaaacatacaHactMacacggtWataMtBVacRaSaatc
-cgtaBVttccagccBcttaRKtgtgcctttttRtgtcagcRttKtaaacKtaaatctcac
-aattgcaNtSBaaccgggttattaaBcKatDagttactcttcattVtttHaaggctKKga
-tacatcBggScagtVcacattttgaHaDSgHatRMaHWggtatatRgccDttcgtatcga
-aacaHtaagttaRatgaVacttagattVKtaaYttaaatcaNatccRttRRaMScNaaaD
-gttVHWgtcHaaHgacVaWtgttScactaagSgttatcttagggDtaccagWattWtRtg
-ttHWHacgattBtgVcaYatcggttgagKcWtKKcaVtgaYgWctgYggVctgtHgaNcV
-taBtWaaYatcDRaaRtSctgaHaYRttagatMatgcatttNattaDttaattgttctaa
-ccctcccctagaWBtttHtBccttagaVaatMcBHagaVcWcagBVttcBtaYMccagat
-gaaaaHctctaacgttagNWRtcggattNatcRaNHttcagtKttttgWatWttcSaNgg
-gaWtactKKMaacatKatacNattgctWtatctaVgagctatgtRaHtYcWcttagccaa
-tYttWttaWSSttaHcaaaaagVacVgtaVaRMgattaVcDactttcHHggHRtgNcctt
-tYatcatKgctcctctatVcaaaaKaaaagtatatctgMtWtaaaacaStttMtcgactt
-taSatcgDataaactaaacaagtaaVctaggaSccaatMVtaaSKNVattttgHccatca
-cBVctgcaVatVttRtactgtVcaattHgtaaattaaattttYtatattaaRSgYtgBag
-aHSBDgtagcacRHtYcBgtcacttacactaYcgctWtattgSHtSatcataaatataHt
-cgtYaaMNgBaatttaRgaMaatatttBtttaaaHHKaatctgatWatYaacttMctctt
-ttVctagctDaaagtaVaKaKRtaacBgtatccaaccactHHaagaagaaggaNaaatBW
-attccgStaMSaMatBttgcatgRSacgttVVtaaDMtcSgVatWcaSatcttttVatag
-ttactttacgatcaccNtaDVgSRcgVcgtgaacgaNtaNatatagtHtMgtHcMtagaa
-attBgtataRaaaacaYKgtRccYtatgaagtaataKgtaaMttgaaRVatgcagaKStc
-tHNaaatctBBtcttaYaBWHgtVtgacagcaRcataWctcaBcYacYgatDgtDHccta
->THREE Homo sapiens frequency
-aacacttcaccaggtatcgtgaaggctcaagattacccagagaacctttgcaatataaga
-atatgtatgcagcattaccctaagtaattatattctttttctgactcaaagtgacaagcc
-ctagtgtatattaaatcggtatatttgggaaattcctcaaactatcctaatcaggtagcc
-atgaaagtgatcaaaaaagttcgtacttataccatacatgaattctggccaagtaaaaaa
-tagattgcgcaaaattcgtaccttaagtctctcgccaagatattaggatcctattactca
-tatcgtgtttttctttattgccgccatccccggagtatctcacccatccttctcttaaag
-gcctaatattacctatgcaaataaacatatattgttgaaaattgagaacctgatcgtgat
-tcttatgtgtaccatatgtatagtaatcacgcgactatatagtgctttagtatcgcccgt
-gggtgagtgaatattctgggctagcgtgagatagtttcttgtcctaatatttttcagatc
-gaatagcttctatttttgtgtttattgacatatgtcgaaactccttactcagtgaaagtc
-atgaccagatccacgaacaatcttcggaatcagtctcgttttacggcggaatcttgagtc
-taacttatatcccgtcgcttactttctaacaccccttatgtatttttaaaattacgttta
-ttcgaacgtacttggcggaagcgttattttttgaagtaagttacattgggcagactcttg
-acattttcgatacgactttctttcatccatcacaggactcgttcgtattgatatcagaag
-ctcgtgatgattagttgtcttctttaccaatactttgaggcctattctgcgaaatttttg
-ttgccctgcgaacttcacataccaaggaacacctcgcaacatgccttcatatccatcgtt
-cattgtaattcttacacaatgaatcctaagtaattacatccctgcgtaaaagatggtagg
-ggcactgaggatatattaccaagcatttagttatgagtaatcagcaatgtttcttgtatt
-aagttctctaaaatagttacatcgtaatgttatctcgggttccgcgaataaacgagatag
-attcattatatatggccctaagcaaaaacctcctcgtattctgttggtaattagaatcac
-acaatacgggttgagatattaattatttgtagtacgaagagatataaaaagatgaacaat
-tactcaagtcaagatgtatacgggatttataataaaaatcgggtagagatctgctttgca
-attcagacgtgccactaaatcgtaatatgtcgcgttacatcagaaagggtaactattatt
-aattaataaagggcttaatcactacatattagatcttatccgatagtcttatctattcgt
-tgtatttttaagcggttctaattcagtcattatatcagtgctccgagttctttattattg
-ttttaaggatgacaaaatgcctcttgttataacgctgggagaagcagactaagagtcgga
-gcagttggtagaatgaggctgcaaaagacggtctcgacgaatggacagactttactaaac
-caatgaaagacagaagtagagcaaagtctgaagtggtatcagcttaattatgacaaccct
-taatacttccctttcgccgaatactggcgtggaaaggttttaaaagtcgaagtagttaga
-ggcatctctcgctcataaataggtagactactcgcaatccaatgtgactatgtaatactg
-ggaacatcagtccgcgatgcagcgtgtttatcaaccgtccccactcgcctggggagacat
-gagaccacccccgtggggattattagtccgcagtaatcgactcttgacaatccttttcga
-ttatgtcatagcaatttacgacagttcagcgaagtgactactcggcgaaatggtattact
-aaagcattcgaacccacatgaatgtgattcttggcaatttctaatccactaaagcttttc
-cgttgaatctggttgtagatatttatataagttcactaattaagatcacggtagtatatt
-gatagtgatgtctttgcaagaggttggccgaggaatttacggattctctattgatacaat
-ttgtctggcttataactcttaaggctgaaccaggcgtttttagacgacttgatcagctgt
-tagaatggtttggactccctctttcatgtcagtaacatttcagccgttattgttacgata
-tgcttgaacaatattgatctaccacacacccatagtatattttataggtcatgctgttac
-ctacgagcatggtattccacttcccattcaatgagtattcaacatcactagcctcagaga
-tgatgacccacctctaataacgtcacgttgcggccatgtgaaacctgaacttgagtagac
-gatatcaagcgctttaaattgcatataacatttgagggtaaagctaagcggatgctttat
-ataatcaatactcaataataagatttgattgcattttagagttatgacacgacatagttc
-actaacgagttactattcccagatctagactgaagtactgatcgagacgatccttacgtc
-gatgatcgttagttatcgacttaggtcgggtctctagcggtattggtacttaaccggaca
-ctatactaataacccatgatcaaagcataacagaatacagacgataatttcgccaacata
-tatgtacagaccccaagcatgagaagctcattgaaagctatcattgaagtcccgctcaca
-atgtgtcttttccagacggtttaactggttcccgggagtcctggagtttcgacttacata
-aatggaaacaatgtattttgctaatttatctatagcgtcatttggaccaatacagaatat
-tatgttgcctagtaatccactataacccgcaagtgctgatagaaaatttttagacgattt
-ataaatgccccaagtatccctcccgtgaatcctccgttatactaattagtattcgttcat
-acgtataccgcgcatatatgaacatttggcgataaggcgcgtgaattgttacgtgacaga
-gatagcagtttcttgtgatatggttaacagacgtacatgaagggaaactttatatctata
-gtgatgcttccgtagaaataccgccactggtctgccaatgatgaagtatgtagctttagg
-tttgtactatgaggctttcgtttgtttgcagagtataacagttgcgagtgaaaaaccgac
-gaatttatactaatacgctttcactattggctacaaaatagggaagagtttcaatcatga
-gagggagtatatggatgctttgtagctaaaggtagaacgtatgtatatgctgccgttcat
-tcttgaaagatacataagcgataagttacgacaattataagcaacatccctaccttcgta
-acgatttcactgttactgcgcttgaaatacactatggggctattggcggagagaagcaga
-tcgcgccgagcatatacgagacctataatgttgatgatagagaaggcgtctgaattgata
-catcgaagtacactttctttcgtagtatctctcgtcctctttctatctccggacacaaga
-attaagttatatatatagagtcttaccaatcatgttgaatcctgattctcagagttcttt
-ggcgggccttgtgatgactgagaaacaatgcaatattgctccaaatttcctaagcaaatt
-ctcggttatgttatgttatcagcaaagcgttacgttatgttatttaaatctggaatgacg
-gagcgaagttcttatgtcggtgtgggaataattcttttgaagacagcactccttaaataa
-tatcgctccgtgtttgtatttatcgaatgggtctgtaaccttgcacaagcaaatcggtgg
-tgtatatatcggataacaattaatacgatgttcatagtgacagtatactgatcgagtcct
-ctaaagtcaattacctcacttaacaatctcattgatgttgtgtcattcccggtatcgccc
-gtagtatgtgctctgattgaccgagtgtgaaccaaggaacatctactaatgcctttgtta
-ggtaagatctctctgaattccttcgtgccaacttaaaacattatcaaaatttcttctact
-tggattaactacttttacgagcatggcaaattcccctgtggaagacggttcattattatc
-ggaaaccttatagaaattgcgtgttgactgaaattagatttttattgtaagagttgcatc
-tttgcgattcctctggtctagcttccaatgaacagtcctcccttctattcgacatcgggt
-ccttcgtacatgtctttgcgatgtaataattaggttcggagtgtggccttaatgggtgca
-actaggaatacaacgcaaatttgctgacatgatagcaaatcggtatgccggcaccaaaac
-gtgctccttgcttagcttgtgaatgagactcagtagttaaataaatccatatctgcaatc
-gattccacaggtattgtccactatctttgaactactctaagagatacaagcttagctgag
-accgaggtgtatatgactacgctgatatctgtaaggtaccaatgcaggcaaagtatgcga
-gaagctaataccggctgtttccagctttataagattaaaatttggctgtcctggcggcct
-cagaattgttctatcgtaatcagttggttcattaattagctaagtacgaggtacaactta
-tctgtcccagaacagctccacaagtttttttacagccgaaacccctgtgtgaatcttaat
-atccaagcgcgttatctgattagagtttacaactcagtattttatcagtacgttttgttt
-ccaacattacccggtatgacaaaatgacgccacgtgtcgaataatggtctgaccaatgta
-ggaagtgaaaagataaatat
diff --git a/test/chanlinear.go b/test/chanlinear.go
deleted file mode 100644
index 55fee4a..0000000
--- a/test/chanlinear.go
+++ /dev/null
@@ -1,94 +0,0 @@
-// +build darwin linux
-// run
-
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test that dequeueing from a pending channel doesn't
-// take linear time.
-
-package main
-
-import (
-	"fmt"
-	"runtime"
-	"time"
-)
-
-// checkLinear asserts that the running time of f(n) is in O(n).
-// tries is the initial number of iterations.
-func checkLinear(typ string, tries int, f func(n int)) {
-	// Depending on the machine and OS, this test might be too fast
-	// to measure with accurate enough granularity. On failure,
-	// make it run longer, hoping that the timing granularity
-	// is eventually sufficient.
-
-	timeF := func(n int) time.Duration {
-		t1 := time.Now()
-		f(n)
-		return time.Since(t1)
-	}
-
-	t0 := time.Now()
-
-	n := tries
-	fails := 0
-	for {
-		runtime.GC()
-		t1 := timeF(n)
-		runtime.GC()
-		t2 := timeF(2 * n)
-
-		// should be 2x (linear); allow up to 3x
-		if t2 < 3*t1 {
-			if false {
-				fmt.Println(typ, "\t", time.Since(t0))
-			}
-			return
-		}
-		// If n ops run in under a second and the ratio
-		// doesn't work out, make n bigger, trying to reduce
-		// the effect that a constant amount of overhead has
-		// on the computed ratio.
-		if t1 < 1*time.Second {
-			n *= 2
-			continue
-		}
-		// Once the test runs long enough for n ops,
-		// try to get the right ratio at least once.
-		// If five in a row all fail, give up.
-		if fails++; fails >= 5 {
-			panic(fmt.Sprintf("%s: too slow: %d channels: %v; %d channels: %v\n",
-				typ, n, t1, 2*n, t2))
-		}
-	}
-}
-
-func main() {
-	checkLinear("chanSelect", 1000, func(n int) {
-		const messages = 10
-		c := make(chan bool) // global channel
-		var a []chan bool    // local channels for each goroutine
-		for i := 0; i < n; i++ {
-			d := make(chan bool)
-			a = append(a, d)
-			go func() {
-				for j := 0; j < messages; j++ {
-					// queue ourselves on the global channel
-					select {
-					case <-c:
-					case <-d:
-					}
-				}
-			}()
-		}
-		for i := 0; i < messages; i++ {
-			// wake each goroutine up, forcing it to dequeue and then enqueue
-			// on the global channel.
-			for _, d := range a {
-				d <- true
-			}
-		}
-	})
-}
diff --git a/test/clearfat.go b/test/clearfat.go
deleted file mode 100644
index 45d5393..0000000
--- a/test/clearfat.go
+++ /dev/null
@@ -1,68 +0,0 @@
-// runoutput
-
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Check that {5,6,8,9}g/ggen.c:clearfat is zeroing the entire object.
-
-package main
-
-import (
-	"bytes"
-	"fmt"
-	"strconv"
-	"strings"
-)
-
-const ntest = 1100
-
-func main() {
-	var decls, calls bytes.Buffer
-
-	for i := 1; i <= ntest; i++ {
-		s := strconv.Itoa(i)
-		decls.WriteString(strings.Replace(decl, "$", s, -1))
-		calls.WriteString(strings.Replace("poison$()\n\tclearfat$()\n\t", "$", s, -1))
-	}
-
-	program = strings.Replace(program, "$DECLS", decls.String(), 1)
-	program = strings.Replace(program, "$CALLS", calls.String(), 1)
-	fmt.Print(program)
-}
-
-var program = `package main
-
-var count int
-
-$DECLS
-
-func main() {
-	$CALLS
-	if count != 0 {
-		println("failed", count, "case(s)")
-	}
-}
-`
-
-const decl = `
-func poison$() {
-	// Grow and poison the stack space that will be used by clearfat$
-	var t [2*$]byte
-	for i := range t {
-		t[i] = 0xff
-	}
-}
-
-func clearfat$() {
-	var t [$]byte
-
-	for _, x := range t {
-		if x != 0 {
-//			println("clearfat$: index", i, "expected 0, got", x)
-			count++
-			break
-		}
-	}
-}
-`
diff --git a/test/closure1.go b/test/closure1.go
deleted file mode 100644
index 5869982..0000000
--- a/test/closure1.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// run
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-func main() {
-	x := 0
-	func() {
-		x = 1
-	}()
-	func() {
-		if x != 1 {
-			panic("x != 1")
-		}
-	}()
-}
\ No newline at end of file
diff --git a/test/closure2.go b/test/closure2.go
deleted file mode 100644
index 4d61b45..0000000
--- a/test/closure2.go
+++ /dev/null
@@ -1,118 +0,0 @@
-// run
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Check that these do not use "by value" capturing,
-// because changes are made to the value during the closure.
-
-package main
-
-func main() {
-	{
-		type X struct {
-			v int
-		}
-		var x X
-		func() {
-			x.v++
-		}()
-		if x.v != 1 {
-			panic("x.v != 1")
-		}
-
-		type Y struct {
-			X
-		}
-		var y Y
-		func() {
-			y.v = 1
-		}()
-		if y.v != 1 {
-			panic("y.v != 1")
-		}
-	}
-
-	{
-		type Z struct {
-			a [3]byte
-		}
-		var z Z
-		func() {
-			i := 0
-			for z.a[1] = 1; i < 10; i++ {
-			}
-		}()
-		if z.a[1] != 1 {
-			panic("z.a[1] != 1")
-		}
-	}
-
-	{
-		w := 0
-		tmp := 0
-		f := func() {
-			if w != 1 {
-				panic("w != 1")
-			}
-		}
-		func() {
-			tmp = w // force capture of w, but do not write to it yet
-			_ = tmp
-			func() {
-				func() {
-					w++ // write in a nested closure
-				}()
-			}()
-		}()
-		f()
-	}
-
-	{
-		var g func() int
-		for i := range [2]int{} {
-			if i == 0 {
-				g = func() int {
-					return i // test that we capture by ref here, i is mutated on every interation
-				}
-			}
-		}
-		if g() != 1 {
-			panic("g() != 1")
-		}
-	}
-
-	{
-		var g func() int
-		q := 0
-		for range [2]int{} {
-			q++
-			g = func() int {
-				return q // test that we capture by ref here
-					 // q++ must on a different decldepth than q declaration
-			}
-		}
-		if g() != 2 {
-			panic("g() != 2")
-		}
-	}
-
-	{
-		var g func() int
-		var a [2]int
-		q := 0
-		for a[func() int {
-			q++
-			return 0
-		}()] = range [2]int{} {
-			g = func() int {
-				return q // test that we capture by ref here
-					 // q++ must on a different decldepth than q declaration
-			}
-		}
-		if g() != 2 {
-			panic("g() != 2")
-		}
-	}
-}
diff --git a/test/escape_array.go b/test/escape_array.go
deleted file mode 100644
index 5da7771..0000000
--- a/test/escape_array.go
+++ /dev/null
@@ -1,122 +0,0 @@
-// errorcheck -0 -m -l
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test escape analysis for arrays and some large things
-
-package foo
-
-var Ssink *string
-
-type U [2]*string
-
-func bar(a, b *string) U { // ERROR "leaking param: a to result ~r2 level=0$" "leaking param: b to result ~r2 level=0$"
-	return U{a, b}
-}
-
-func foo(x U) U { // ERROR "leaking param: x to result ~r1 level=0$"
-	return U{x[1], x[0]}
-}
-
-func bff(a, b *string) U { // ERROR "leaking param: a to result ~r2 level=0$" "leaking param: b to result ~r2 level=0$"
-	return foo(foo(bar(a, b)))
-}
-
-func tbff1() *string {
-	a := "cat"
-	b := "dog"       // ERROR "moved to heap: b$"
-	u := bff(&a, &b) // ERROR "tbff1 &a does not escape$" "tbff1 &b does not escape$"
-	_ = u[0]
-	return &b // ERROR "&b escapes to heap$"
-}
-
-// BAD: need fine-grained analysis to track u[0] and u[1] differently.
-func tbff2() *string {
-	a := "cat"       // ERROR "moved to heap: a$"
-	b := "dog"       // ERROR "moved to heap: b$"
-	u := bff(&a, &b) // ERROR "&a escapes to heap$" "&b escapes to heap$"
-	_ = u[0]
-	return u[1]
-}
-
-func car(x U) *string { // ERROR "leaking param: x to result ~r1 level=0$"
-	return x[0]
-}
-
-// BAD: need fine-grained analysis to track x[0] and x[1] differently.
-func fun(x U, y *string) *string { // ERROR "leaking param: x to result ~r2 level=0$" "leaking param: y to result ~r2 level=0$"
-	x[0] = y
-	return x[1]
-}
-
-func fup(x *U, y *string) *string { // ERROR "leaking param: x to result ~r2 level=1$" "leaking param: y$"
-	x[0] = y // leaking y to heap is intended
-	return x[1]
-}
-
-func fum(x *U, y **string) *string { // ERROR "leaking param: x to result ~r2 level=1$" "leaking param content: y$"
-	x[0] = *y
-	return x[1]
-}
-
-func fuo(x *U, y *U) *string { // ERROR "leaking param: x to result ~r2 level=1$" "leaking param content: y$"
-	x[0] = y[0]
-	return x[1]
-}
-
-// These two tests verify that:
-// small array literals are stack allocated;
-// pointers stored in small array literals do not escape;
-// large array literals are heap allocated;
-// pointers stored in large array literals escape.
-func hugeLeaks1(x **string, y **string) { // ERROR "leaking param content: x" "hugeLeaks1 y does not escape" "mark escaped content: x"
-	a := [10]*string{*y}
-	_ = a
-	// 4 x 4,000,000 exceeds MaxStackVarSize, therefore it must be heap allocated if pointers are 4 bytes or larger.
-	b := [4000000]*string{*x} // ERROR "moved to heap: b"
-	_ = b
-}
-
-func hugeLeaks2(x *string, y *string) { // ERROR "leaking param: x" "hugeLeaks2 y does not escape"
-	a := [10]*string{y}
-	_ = a
-	// 4 x 4,000,000 exceeds MaxStackVarSize, therefore it must be heap allocated if pointers are 4 bytes or larger.
-	b := [4000000]*string{x} // ERROR "moved to heap: b"
-	_ = b
-}
-
-// BAD: x need not leak.
-func doesNew1(x *string, y *string) { // ERROR "leaking param: x" "leaking param: y"
-	a := new([10]*string) // ERROR "new\(\[10\]\*string\) does not escape"
-	a[0] = x
-	b := new([65537]*string) // ERROR "new\(\[65537\]\*string\) escapes to heap"
-	b[0] = y
-}
-
-type a10 struct {
-	s *string
-	i [10]int32
-}
-
-type a65537 struct {
-	s *string
-	i [65537]int32
-}
-
-// BAD: x need not leak.
-func doesNew2(x *string, y *string) { // ERROR "leaking param: x" "leaking param: y"
-	a := new(a10) // ERROR "new\(a10\) does not escape"
-	a.s = x
-	b := new(a65537) // ERROR "new\(a65537\) escapes to heap"
-	b.s = y
-}
-
-// BAD: x need not leak.
-func doesMakeSlice(x *string, y *string) { // ERROR "leaking param: x" "leaking param: y"
-	a := make([]*string, 10) // ERROR "make\(\[\]\*string, 10\) does not escape"
-	a[0] = x
-	b := make([]*string, 65537) // ERROR "make\(\[\]\*string, 65537\) escapes to heap"
-	b[0] = y
-}
diff --git a/test/escape_calls.go b/test/escape_calls.go
deleted file mode 100644
index 8c9a6da..0000000
--- a/test/escape_calls.go
+++ /dev/null
@@ -1,54 +0,0 @@
-// errorcheck -0 -m -l
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test escape analysis for function parameters.
-
-// In this test almost everything is BAD except the simplest cases
-// where input directly flows to output.
-
-package foo
-
-func f(buf []byte) []byte { // ERROR "leaking param: buf to result ~r1 level=0$"
-	return buf
-}
-
-func g(*byte) string
-
-func h(e int) {
-	var x [32]byte // ERROR "moved to heap: x$"
-	g(&f(x[:])[0]) // ERROR "&f\(x\[:\]\)\[0\] escapes to heap$" "x escapes to heap$"
-}
-
-type Node struct {
-	s           string
-	left, right *Node
-}
-
-func walk(np **Node) int { // ERROR "leaking param content: np"
-	n := *np
-	w := len(n.s)
-	if n == nil {
-		return 0
-	}
-	wl := walk(&n.left)  // ERROR "walk &n.left does not escape"
-	wr := walk(&n.right) // ERROR "walk &n.right does not escape"
-	if wl < wr {
-		n.left, n.right = n.right, n.left
-		wl, wr = wr, wl
-	}
-	*np = n
-	return w + wl + wr
-}
-
-// Test for bug where func var f used prototype's escape analysis results.
-func prototype(xyz []string) {} // ERROR "prototype xyz does not escape"
-func bar() {
-	var got [][]string
-	f := prototype
-	f = func(ss []string) { got = append(got, ss) } // ERROR "leaking param: ss" "func literal does not escape"
-	s := "string"
-	f([]string{s}) // ERROR "\[\]string literal escapes to heap"
-}
diff --git a/test/escape_closure.go b/test/escape_closure.go
deleted file mode 100644
index 4cdb06e..0000000
--- a/test/escape_closure.go
+++ /dev/null
@@ -1,147 +0,0 @@
-// errorcheck -0 -m -l
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test escape analysis for closure arguments.
-
-package escape
-
-var sink interface{}
-
-func ClosureCallArgs0() {
-	x := 0         // ERROR "moved to heap: x"
-	func(p *int) { // ERROR "p does not escape" "func literal does not escape"
-		*p = 1
-		// BAD: x should not escape to heap here
-	}(&x) // ERROR "&x escapes to heap"
-}
-
-func ClosureCallArgs1() {
-	x := 0 // ERROR "moved to heap: x"
-	for {
-		func(p *int) { // ERROR "p does not escape" "func literal does not escape"
-			*p = 1
-			// BAD: x should not escape to heap here
-		}(&x) // ERROR "&x escapes to heap"
-	}
-}
-
-func ClosureCallArgs2() {
-	for {
-		// BAD: x should not escape here
-		x := 0         // ERROR "moved to heap: x"
-		func(p *int) { // ERROR "p does not escape" "func literal does not escape"
-			*p = 1
-		}(&x) // ERROR "&x escapes to heap"
-	}
-}
-
-func ClosureCallArgs3() {
-	x := 0         // ERROR "moved to heap: x"
-	func(p *int) { // ERROR "leaking param: p" "func literal does not escape"
-		sink = p // ERROR "p escapes to heap"
-	}(&x) // ERROR "&x escapes to heap"
-}
-
-func ClosureCallArgs4() {
-	// BAD: x should not leak here
-	x := 0                  // ERROR "moved to heap: x"
-	_ = func(p *int) *int { // ERROR "leaking param: p to result ~r1" "func literal does not escape"
-		return p
-	}(&x) // ERROR "&x escapes to heap"
-}
-
-func ClosureCallArgs5() {
-	x := 0                     // ERROR "moved to heap: x"
-	sink = func(p *int) *int { // ERROR "leaking param: p to result ~r1" "func literal does not escape"
-		return p
-	}(&x) // ERROR "&x escapes to heap" "\(func literal\)\(&x\) escapes to heap"
-}
-
-func ClosureCallArgs6() {
-	x := 0         // ERROR "moved to heap: x"
-	func(p *int) { // ERROR "moved to heap: p" "func literal does not escape"
-		sink = &p // ERROR "&p escapes to heap"
-	}(&x) // ERROR "&x escapes to heap"
-}
-
-func ClosureCallArgs7() {
-	var pp *int
-	for {
-		x := 0         // ERROR "moved to heap: x"
-		func(p *int) { // ERROR "leaking param: p" "func literal does not escape"
-			pp = p
-		}(&x) // ERROR "&x escapes to heap"
-	}
-	_ = pp
-}
-
-func ClosureCallArgs8() {
-	x := 0               // ERROR "moved to heap: x"
-	defer func(p *int) { // ERROR "p does not escape" "func literal does not escape"
-		*p = 1
-		// BAD: x should not escape to heap here
-	}(&x) // ERROR "&x escapes to heap"
-}
-
-func ClosureCallArgs9() {
-	// BAD: x should not leak
-	x := 0 // ERROR "moved to heap: x"
-	for {
-		defer func(p *int) { // ERROR "func literal escapes to heap" "p does not escape"
-			*p = 1
-		}(&x) // ERROR "&x escapes to heap"
-	}
-}
-
-func ClosureCallArgs10() {
-	for {
-		x := 0               // ERROR "moved to heap: x"
-		defer func(p *int) { // ERROR "func literal escapes to heap" "p does not escape"
-			*p = 1
-		}(&x) // ERROR "&x escapes to heap"
-	}
-}
-
-func ClosureCallArgs11() {
-	x := 0               // ERROR "moved to heap: x"
-	defer func(p *int) { // ERROR "leaking param: p" "func literal does not escape"
-		sink = p // ERROR "p escapes to heap"
-	}(&x) // ERROR "&x escapes to heap"
-}
-
-func ClosureCallArgs12() {
-	// BAD: x should not leak
-	x := 0                    // ERROR "moved to heap: x"
-	defer func(p *int) *int { // ERROR "leaking param: p to result ~r1" "func literal does not escape"
-		return p
-	}(&x) // ERROR "&x escapes to heap"
-}
-
-func ClosureCallArgs13() {
-	x := 0               // ERROR "moved to heap: x"
-	defer func(p *int) { // ERROR "moved to heap: p" "func literal does not escape"
-		sink = &p // ERROR "&p escapes to heap"
-	}(&x) // ERROR "&x escapes to heap"
-}
-
-func ClosureCallArgs14() {
-	x := 0 // ERROR "moved to heap: x"
-	// BAD: &x should not escape here
-	p := &x                  // ERROR "moved to heap: p" "&x escapes to heap"
-	_ = func(p **int) *int { // ERROR "leaking param: p to result ~r1 level=1" "func literal does not escape"
-		return *p
-		// BAD: p should not escape here
-	}(&p) // ERROR "&p escapes to heap"
-}
-
-func ClosureCallArgs15() {
-	x := 0                      // ERROR "moved to heap: x"
-	p := &x                     // ERROR "moved to heap: p" "&x escapes to heap"
-	sink = func(p **int) *int { // ERROR "leaking param: p to result ~r1 level=1" "func literal does not escape"
-		return *p
-		// BAD: p should not escape here
-	}(&p) // ERROR "&p escapes to heap" "\(func literal\)\(&p\) escapes to heap"
-}
diff --git a/test/escape_field.go b/test/escape_field.go
deleted file mode 100644
index 16d1e74..0000000
--- a/test/escape_field.go
+++ /dev/null
@@ -1,174 +0,0 @@
-// errorcheck -0 -m -l
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test escape analysis with respect to field assignments.
-
-package escape
-
-var sink interface{}
-
-type X struct {
-	p1 *int
-	p2 *int
-	a  [2]*int
-}
-
-type Y struct {
-	x X
-}
-
-func field0() {
-	i := 0 // ERROR "moved to heap: i$"
-	var x X
-	x.p1 = &i   // ERROR "&i escapes to heap$"
-	sink = x.p1 // ERROR "x\.p1 escapes to heap"
-}
-
-func field1() {
-	i := 0 // ERROR "moved to heap: i$"
-	var x X
-	// BAD: &i should not escape
-	x.p1 = &i   // ERROR "&i escapes to heap$"
-	sink = x.p2 // ERROR "x\.p2 escapes to heap"
-}
-
-func field3() {
-	i := 0 // ERROR "moved to heap: i$"
-	var x X
-	x.p1 = &i // ERROR "&i escapes to heap$"
-	sink = x  // ERROR "x escapes to heap"
-}
-
-func field4() {
-	i := 0 // ERROR "moved to heap: i$"
-	var y Y
-	y.x.p1 = &i // ERROR "&i escapes to heap$"
-	x := y.x
-	sink = x // ERROR "x escapes to heap"
-}
-
-func field5() {
-	i := 0 // ERROR "moved to heap: i$"
-	var x X
-	// BAD: &i should not escape here
-	x.a[0] = &i   // ERROR "&i escapes to heap$"
-	sink = x.a[1] // ERROR "x\.a\[1\] escapes to heap"
-}
-
-// BAD: we are not leaking param x, only x.p2
-func field6(x *X) { // ERROR "leaking param content: x$"
-	sink = x.p2 // ERROR "x\.p2 escapes to heap"
-}
-
-func field6a() {
-	i := 0 // ERROR "moved to heap: i$"
-	var x X
-	// BAD: &i should not escape
-	x.p1 = &i  // ERROR "&i escapes to heap$"
-	field6(&x) // ERROR "field6a &x does not escape"
-}
-
-func field7() {
-	i := 0
-	var y Y
-	y.x.p1 = &i // ERROR "field7 &i does not escape$"
-	x := y.x
-	var y1 Y
-	y1.x = x
-	_ = y1.x.p1
-}
-
-func field8() {
-	i := 0 // ERROR "moved to heap: i$"
-	var y Y
-	y.x.p1 = &i // ERROR "&i escapes to heap$"
-	x := y.x
-	var y1 Y
-	y1.x = x
-	sink = y1.x.p1 // ERROR "y1\.x\.p1 escapes to heap"
-}
-
-func field9() {
-	i := 0 // ERROR "moved to heap: i$"
-	var y Y
-	y.x.p1 = &i // ERROR "&i escapes to heap$"
-	x := y.x
-	var y1 Y
-	y1.x = x
-	sink = y1.x // ERROR "y1\.x escapes to heap"
-}
-
-func field10() {
-	i := 0 // ERROR "moved to heap: i$"
-	var y Y
-	// BAD: &i should not escape
-	y.x.p1 = &i // ERROR "&i escapes to heap$"
-	x := y.x
-	var y1 Y
-	y1.x = x
-	sink = y1.x.p2 // ERROR "y1\.x\.p2 escapes to heap"
-}
-
-func field11() {
-	i := 0         // ERROR "moved to heap: i$"
-	x := X{p1: &i} // ERROR "&i escapes to heap$"
-	sink = x.p1    // ERROR "x\.p1 escapes to heap"
-}
-
-func field12() {
-	i := 0 // ERROR "moved to heap: i$"
-	// BAD: &i should not escape
-	x := X{p1: &i} // ERROR "&i escapes to heap$"
-	sink = x.p2    // ERROR "x\.p2 escapes to heap"
-}
-
-func field13() {
-	i := 0          // ERROR "moved to heap: i$"
-	x := &X{p1: &i} // ERROR "&i escapes to heap$" "field13 &X literal does not escape$"
-	sink = x.p1     // ERROR "x\.p1 escapes to heap"
-}
-
-func field14() {
-	i := 0 // ERROR "moved to heap: i$"
-	// BAD: &i should not escape
-	x := &X{p1: &i} // ERROR "&i escapes to heap$" "field14 &X literal does not escape$"
-	sink = x.p2     // ERROR "x\.p2 escapes to heap"
-}
-
-func field15() {
-	i := 0          // ERROR "moved to heap: i$"
-	x := &X{p1: &i} // ERROR "&X literal escapes to heap$" "&i escapes to heap$"
-	sink = x        // ERROR "x escapes to heap"
-}
-
-func field16() {
-	i := 0 // ERROR "moved to heap: i$"
-	var x X
-	// BAD: &i should not escape
-	x.p1 = &i                 // ERROR "&i escapes to heap$"
-	var iface interface{} = x // ERROR "x escapes to heap"
-	x1 := iface.(X)
-	sink = x1.p2 // ERROR "x1\.p2 escapes to heap"
-}
-
-func field17() {
-	i := 0 // ERROR "moved to heap: i$"
-	var x X
-	x.p1 = &i                 // ERROR "&i escapes to heap$"
-	var iface interface{} = x // ERROR "x escapes to heap"
-	x1 := iface.(X)
-	sink = x1.p1 // ERROR "x1\.p1 escapes to heap"
-}
-
-func field18() {
-	i := 0 // ERROR "moved to heap: i$"
-	var x X
-	// BAD: &i should not escape
-	x.p1 = &i                 // ERROR "&i escapes to heap$"
-	var iface interface{} = x // ERROR "x escapes to heap"
-	y, _ := iface.(Y)         // Put X, but extracted Y. The cast will fail, so y is zero initialized.
-	sink = y                  // ERROR "y escapes to heap"
-}
diff --git a/test/escape_iface.go b/test/escape_iface.go
deleted file mode 100644
index 2b1144a..0000000
--- a/test/escape_iface.go
+++ /dev/null
@@ -1,227 +0,0 @@
-// errorcheck -0 -m -l
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test escape analysis for interface conversions.
-
-package escape
-
-var sink interface{}
-
-type M interface {
-	M()
-}
-
-func mescapes(m M) { // ERROR "leaking param: m"
-	sink = m // ERROR "m escapes to heap"
-}
-
-func mdoesnotescape(m M) { // ERROR "m does not escape"
-}
-
-// Tests for type stored directly in iface and with value receiver method.
-type M0 struct {
-	p *int
-}
-
-func (M0) M() {
-}
-
-func efaceEscape0() {
-	{
-		i := 0
-		v := M0{&i} // ERROR "&i does not escape"
-		var x M = v // ERROR "v does not escape"
-		_ = x
-	}
-	{
-		i := 0      // ERROR "moved to heap: i"
-		v := M0{&i} // ERROR "&i escapes to heap"
-		var x M = v // ERROR "v escapes to heap"
-		sink = x    // ERROR "x escapes to heap"
-	}
-	{
-		i := 0
-		v := M0{&i} // ERROR "&i does not escape"
-		var x M = v // ERROR "v does not escape"
-		v1 := x.(M0)
-		_ = v1
-	}
-	{
-		i := 0      // ERROR "moved to heap: i"
-		v := M0{&i} // ERROR "&i escapes to heap"
-		// BAD: v does not escape to heap here
-		var x M = v // ERROR "v escapes to heap"
-		v1 := x.(M0)
-		sink = v1 // ERROR "v1 escapes to heap"
-	}
-	{
-		i := 0      // ERROR "moved to heap: i"
-		v := M0{&i} // ERROR "&i escapes to heap"
-		// BAD: v does not escape to heap here
-		var x M = v // ERROR "v escapes to heap"
-		x.M()
-	}
-	{
-		i := 0      // ERROR "moved to heap: i"
-		v := M0{&i} // ERROR "&i escapes to heap"
-		var x M = v // ERROR "v escapes to heap"
-		mescapes(x)
-	}
-	{
-		i := 0
-		v := M0{&i} // ERROR "&i does not escape"
-		var x M = v // ERROR "v does not escape"
-		mdoesnotescape(x)
-	}
-}
-
-// Tests for type stored indirectly in iface and with value receiver method.
-type M1 struct {
-	p *int
-	x int
-}
-
-func (M1) M() {
-}
-
-func efaceEscape1() {
-	{
-		i := 0
-		v := M1{&i, 0} // ERROR "&i does not escape"
-		var x M = v    // ERROR "v does not escape"
-		_ = x
-	}
-	{
-		i := 0         // ERROR "moved to heap: i"
-		v := M1{&i, 0} // ERROR "&i escapes to heap"
-		var x M = v    // ERROR "v escapes to heap"
-		sink = x       // ERROR "x escapes to heap"
-	}
-	{
-		i := 0
-		v := M1{&i, 0} // ERROR "&i does not escape"
-		var x M = v    // ERROR "v does not escape"
-		v1 := x.(M1)
-		_ = v1
-	}
-	{
-		i := 0         // ERROR "moved to heap: i"
-		v := M1{&i, 0} // ERROR "&i escapes to heap"
-		// BAD: v does not escape to heap here
-		var x M = v // ERROR "v escapes to heap"
-		v1 := x.(M1)
-		sink = v1 // ERROR "v1 escapes to heap"
-	}
-	{
-		i := 0         // ERROR "moved to heap: i"
-		v := M1{&i, 0} // ERROR "&i escapes to heap"
-		// BAD: v does not escape to heap here
-		var x M = v // ERROR "v escapes to heap"
-		x.M()
-	}
-	{
-		i := 0         // ERROR "moved to heap: i"
-		v := M1{&i, 0} // ERROR "&i escapes to heap"
-		var x M = v    // ERROR "v escapes to heap"
-		mescapes(x)
-	}
-	{
-		i := 0
-		v := M1{&i, 0} // ERROR "&i does not escape"
-		var x M = v    // ERROR "v does not escape"
-		mdoesnotescape(x)
-	}
-}
-
-// Tests for type stored directly in iface and with pointer receiver method.
-type M2 struct {
-	p *int
-}
-
-func (*M2) M() {
-}
-
-func efaceEscape2() {
-	{
-		i := 0
-		v := &M2{&i} // ERROR "&i does not escape" "&M2 literal does not escape"
-		var x M = v  // ERROR "v does not escape"
-		_ = x
-	}
-	{
-		i := 0       // ERROR "moved to heap: i"
-		v := &M2{&i} // ERROR "&i escapes to heap" "&M2 literal escapes to heap"
-		var x M = v  // ERROR "v escapes to heap"
-		sink = x     // ERROR "x escapes to heap"
-	}
-	{
-		i := 0
-		v := &M2{&i} // ERROR "&i does not escape" "&M2 literal does not escape"
-		var x M = v  // ERROR "v does not escape"
-		v1 := x.(*M2)
-		_ = v1
-	}
-	{
-		i := 0       // ERROR "moved to heap: i"
-		v := &M2{&i} // ERROR "&i escapes to heap" "&M2 literal escapes to heap"
-		// BAD: v does not escape to heap here
-		var x M = v // ERROR "v escapes to heap"
-		v1 := x.(*M2)
-		sink = v1 // ERROR "v1 escapes to heap"
-	}
-	{
-		i := 0       // ERROR "moved to heap: i"
-		v := &M2{&i} // ERROR "&i escapes to heap" "&M2 literal does not escape"
-		// BAD: v does not escape to heap here
-		var x M = v // ERROR "v does not escape"
-		v1 := x.(*M2)
-		sink = *v1 // ERROR "v1 escapes to heap"
-	}
-	{
-		i := 0       // ERROR "moved to heap: i"
-		v := &M2{&i} // ERROR "&i escapes to heap" "&M2 literal does not escape"
-		// BAD: v does not escape to heap here
-		var x M = v // ERROR "v does not escape"
-		v1, ok := x.(*M2)
-		sink = *v1 // ERROR "v1 escapes to heap"
-		_ = ok
-	}
-	{
-		i := 0       // ERROR "moved to heap: i"
-		v := &M2{&i} // ERROR "&i escapes to heap" "&M2 literal escapes to heap"
-		// BAD: v does not escape to heap here
-		var x M = v // ERROR "v escapes to heap"
-		x.M()
-	}
-	{
-		i := 0       // ERROR "moved to heap: i"
-		v := &M2{&i} // ERROR "&i escapes to heap" "&M2 literal escapes to heap"
-		var x M = v  // ERROR "v escapes to heap"
-		mescapes(x)
-	}
-	{
-		i := 0
-		v := &M2{&i} // ERROR "&i does not escape" "&M2 literal does not escape"
-		var x M = v  // ERROR "v does not escape"
-		mdoesnotescape(x)
-	}
-}
-
-type T1 struct {
-	p *int
-}
-
-type T2 struct {
-	T1 T1
-}
-
-func dotTypeEscape() *T2 { // #11931
-	var x interface{}
-	x = &T1{p: new(int)} // ERROR "new\(int\) escapes to heap" "&T1 literal does not escape"
-	return &T2{
-		T1: *(x.(*T1)), // ERROR "&T2 literal escapes to heap"
-	}
-}
diff --git a/test/escape_indir.go b/test/escape_indir.go
deleted file mode 100644
index fe03c3f..0000000
--- a/test/escape_indir.go
+++ /dev/null
@@ -1,160 +0,0 @@
-// errorcheck -0 -m -l
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test escape analysis when assigning to indirections.
-
-package escape
-
-var sink interface{}
-
-type ConstPtr struct {
-	p *int
-	c ConstPtr2
-	x **ConstPtr
-}
-
-type ConstPtr2 struct {
-	p *int
-	i int
-}
-
-func constptr0() {
-	i := 0           // ERROR "moved to heap: i"
-	x := &ConstPtr{} // ERROR "&ConstPtr literal does not escape"
-	// BAD: i should not escape here
-	x.p = &i // ERROR "&i escapes to heap"
-	_ = x
-}
-
-func constptr01() *ConstPtr {
-	i := 0           // ERROR "moved to heap: i"
-	x := &ConstPtr{} // ERROR "&ConstPtr literal escapes to heap"
-	x.p = &i         // ERROR "&i escapes to heap"
-	return x
-}
-
-func constptr02() ConstPtr {
-	i := 0           // ERROR "moved to heap: i"
-	x := &ConstPtr{} // ERROR "&ConstPtr literal does not escape"
-	x.p = &i         // ERROR "&i escapes to heap"
-	return *x
-}
-
-func constptr03() **ConstPtr {
-	i := 0           // ERROR "moved to heap: i"
-	x := &ConstPtr{} // ERROR "&ConstPtr literal escapes to heap" "moved to heap: x"
-	x.p = &i         // ERROR "&i escapes to heap"
-	return &x        // ERROR "&x escapes to heap"
-}
-
-func constptr1() {
-	i := 0           // ERROR "moved to heap: i"
-	x := &ConstPtr{} // ERROR "&ConstPtr literal escapes to heap"
-	x.p = &i         // ERROR "&i escapes to heap"
-	sink = x         // ERROR "x escapes to heap"
-}
-
-func constptr2() {
-	i := 0           // ERROR "moved to heap: i"
-	x := &ConstPtr{} // ERROR "&ConstPtr literal does not escape"
-	x.p = &i         // ERROR "&i escapes to heap"
-	sink = *x        // ERROR "\*x escapes to heap"
-}
-
-func constptr4() *ConstPtr {
-	p := new(ConstPtr) // ERROR "new\(ConstPtr\) escapes to heap"
-	*p = *&ConstPtr{}  // ERROR "&ConstPtr literal does not escape"
-	return p
-}
-
-func constptr5() *ConstPtr {
-	p := new(ConstPtr) // ERROR "new\(ConstPtr\) escapes to heap"
-	p1 := &ConstPtr{}  // ERROR "&ConstPtr literal does not escape"
-	*p = *p1
-	return p
-}
-
-// BAD: p should not escape here
-func constptr6(p *ConstPtr) { // ERROR "leaking param content: p"
-	p1 := &ConstPtr{} // ERROR "&ConstPtr literal does not escape"
-	*p1 = *p
-	_ = p1
-}
-
-func constptr7() **ConstPtr {
-	p := new(ConstPtr) // ERROR "new\(ConstPtr\) escapes to heap" "moved to heap: p"
-	var tmp ConstPtr2
-	p1 := &tmp // ERROR "&tmp does not escape"
-	p.c = *p1
-	return &p // ERROR "&p escapes to heap"
-}
-
-func constptr8() *ConstPtr {
-	p := new(ConstPtr) // ERROR "new\(ConstPtr\) escapes to heap"
-	var tmp ConstPtr2
-	p.c = *&tmp // ERROR "&tmp does not escape"
-	return p
-}
-
-func constptr9() ConstPtr {
-	p := new(ConstPtr) // ERROR "new\(ConstPtr\) does not escape"
-	var p1 ConstPtr2
-	i := 0    // ERROR "moved to heap: i"
-	p1.p = &i // ERROR "&i escapes to heap"
-	p.c = p1
-	return *p
-}
-
-func constptr10() ConstPtr {
-	x := &ConstPtr{} // ERROR "moved to heap: x" "&ConstPtr literal escapes to heap"
-	i := 0           // ERROR "moved to heap: i"
-	var p *ConstPtr
-	p = &ConstPtr{p: &i, x: &x} // ERROR "&i escapes to heap" "&x escapes to heap" "&ConstPtr literal does not escape"
-	var pp **ConstPtr
-	pp = &p // ERROR "&p does not escape"
-	return **pp
-}
-
-func constptr11() *ConstPtr {
-	i := 0             // ERROR "moved to heap: i"
-	p := new(ConstPtr) // ERROR "new\(ConstPtr\) escapes to heap"
-	p1 := &ConstPtr{}  // ERROR "&ConstPtr literal does not escape"
-	p1.p = &i          // ERROR "&i escapes to heap"
-	*p = *p1
-	return p
-}
-
-func foo(p **int) { // ERROR "foo p does not escape"
-	i := 0 // ERROR "moved to heap: i"
-	y := p
-	*y = &i // ERROR "&i escapes to heap"
-}
-
-func foo1(p *int) { // ERROR "p does not escape"
-	i := 0  // ERROR "moved to heap: i"
-	y := &p // ERROR "&p does not escape"
-	*y = &i // ERROR "&i escapes to heap"
-}
-
-func foo2() {
-	type Z struct {
-		f **int
-	}
-	x := new(int) // ERROR "moved to heap: x" "new\(int\) escapes to heap"
-	sink = &x     // ERROR "&x escapes to heap"
-	var z Z
-	z.f = &x // ERROR "&x does not escape"
-	p := z.f
-	i := 0  // ERROR "moved to heap: i"
-	*p = &i // ERROR "&i escapes to heap"
-}
-
-var global *byte
-
-func f() {
-	var x byte    // ERROR "moved to heap: x"
-	global = &*&x // ERROR "&\(\*\(&x\)\) escapes to heap" "&x escapes to heap"
-}
diff --git a/test/escape_level.go b/test/escape_level.go
deleted file mode 100644
index 867c81a..0000000
--- a/test/escape_level.go
+++ /dev/null
@@ -1,108 +0,0 @@
-// errorcheck -0 -m -l
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test indirection level computation in escape analysis.
-
-package escape
-
-var sink interface{}
-
-func level0() {
-	i := 0     // ERROR "moved to heap: i"
-	p0 := &i   // ERROR "moved to heap: p0" "&i escapes to heap"
-	p1 := &p0  // ERROR "moved to heap: p1" "&p0 escapes to heap"
-	p2 := &p1  // ERROR "moved to heap: p2" "&p1 escapes to heap"
-	sink = &p2 // ERROR "&p2 escapes to heap"
-}
-
-func level1() {
-	i := 0    // ERROR "moved to heap: i"
-	p0 := &i  // ERROR "moved to heap: p0" "&i escapes to heap"
-	p1 := &p0 // ERROR "moved to heap: p1" "&p0 escapes to heap"
-	p2 := &p1 // ERROR "&p1 escapes to heap"
-	sink = p2 // ERROR "p2 escapes to heap"
-}
-
-func level2() {
-	i := 0     // ERROR "moved to heap: i"
-	p0 := &i   // ERROR "moved to heap: p0" "&i escapes to heap"
-	p1 := &p0  // ERROR "&p0 escapes to heap"
-	p2 := &p1  // ERROR "&p1 does not escape"
-	sink = *p2 // ERROR "\*p2 escapes to heap"
-}
-
-func level3() {
-	i := 0      // ERROR "moved to heap: i"
-	p0 := &i    // ERROR "&i escapes to heap"
-	p1 := &p0   // ERROR "&p0 does not escape"
-	p2 := &p1   // ERROR "&p1 does not escape"
-	sink = **p2 // ERROR "\* \(\*p2\) escapes to heap"
-}
-
-func level4() {
-	i := 0     // ERROR "moved to heap: i"
-	p0 := &i   // ERROR "moved to heap: p0" "&i escapes to heap"
-	p1 := &p0  // ERROR "&p0 escapes to heap"
-	p2 := p1   // ERROR "moved to heap: p2"
-	sink = &p2 // ERROR "&p2 escapes to heap"
-}
-
-func level5() {
-	i := 0    // ERROR "moved to heap: i"
-	p0 := &i  // ERROR "moved to heap: p0" "&i escapes to heap"
-	p1 := &p0 // ERROR "&p0 escapes to heap"
-	p2 := p1
-	sink = p2 // ERROR "p2 escapes to heap"
-}
-
-func level6() {
-	i := 0    // ERROR "moved to heap: i"
-	p0 := &i  // ERROR "&i escapes to heap"
-	p1 := &p0 // ERROR "&p0 does not escape"
-	p2 := p1
-	sink = *p2 // ERROR "\*p2 escapes to heap"
-}
-
-func level7() {
-	i := 0    // ERROR "moved to heap: i"
-	p0 := &i  // ERROR "&i escapes to heap"
-	p1 := &p0 // ERROR "&p0 does not escape"
-	// note *p1 == &i
-	p2 := *p1  // ERROR "moved to heap: p2"
-	sink = &p2 // ERROR "&p2 escapes to heap"
-}
-
-func level8() {
-	i := 0    // ERROR "moved to heap: i"
-	p0 := &i  // ERROR "&i escapes to heap"
-	p1 := &p0 // ERROR "&p0 does not escape"
-	p2 := *p1
-	sink = p2 // ERROR "p2 escapes to heap"
-}
-
-func level9() {
-	i := 0
-	p0 := &i  // ERROR "&i does not escape"
-	p1 := &p0 // ERROR "&p0 does not escape"
-	p2 := *p1
-	sink = *p2 // ERROR "\*p2 escapes to heap"
-}
-
-func level10() {
-	i := 0
-	p0 := &i // ERROR "&i does not escape"
-	p1 := *p0
-	p2 := &p1  // ERROR "&p1 does not escape"
-	sink = *p2 // ERROR "\*p2 escapes to heap"
-}
-
-func level11() {
-	i := 0
-	p0 := &i   // ERROR "&i does not escape"
-	p1 := &p0  // ERROR "&p0 does not escape"
-	p2 := **p1 // ERROR "moved to heap: p2"
-	sink = &p2 // ERROR "&p2 escapes to heap"
-}
diff --git a/test/escape_map.go b/test/escape_map.go
deleted file mode 100644
index 868c456..0000000
--- a/test/escape_map.go
+++ /dev/null
@@ -1,107 +0,0 @@
-// errorcheck -0 -m -l
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test escape analysis for maps.
-
-package escape
-
-var sink interface{}
-
-func map0() {
-	m := make(map[*int]*int) // ERROR "make\(map\[\*int\]\*int\) does not escape"
-	// BAD: i should not escape
-	i := 0 // ERROR "moved to heap: i"
-	// BAD: j should not escape
-	j := 0     // ERROR "moved to heap: j"
-	m[&i] = &j // ERROR "&i escapes to heap" "&j escapes to heap"
-	_ = m
-}
-
-func map1() *int {
-	m := make(map[*int]*int) // ERROR "make\(map\[\*int\]\*int\) does not escape"
-	// BAD: i should not escape
-	i := 0       // ERROR "moved to heap: i"
-	j := 0       // ERROR "moved to heap: j"
-	m[&i] = &j   // ERROR "&i escapes to heap" "&j escapes to heap"
-	return m[&i] // ERROR "&i does not escape"
-}
-
-func map2() map[*int]*int {
-	m := make(map[*int]*int) // ERROR "make\(map\[\*int\]\*int\) escapes to heap"
-	i := 0                   // ERROR "moved to heap: i"
-	j := 0                   // ERROR "moved to heap: j"
-	m[&i] = &j               // ERROR "&i escapes to heap" "&j escapes to heap"
-	return m
-}
-
-func map3() []*int {
-	m := make(map[*int]*int) // ERROR "make\(map\[\*int\]\*int\) does not escape"
-	i := 0                   // ERROR "moved to heap: i"
-	// BAD: j should not escape
-	j := 0     // ERROR "moved to heap: j"
-	m[&i] = &j // ERROR "&i escapes to heap" "&j escapes to heap"
-	var r []*int
-	for k := range m {
-		r = append(r, k)
-	}
-	return r
-}
-
-func map4() []*int {
-	m := make(map[*int]*int) // ERROR "make\(map\[\*int\]\*int\) does not escape"
-	// BAD: i should not escape
-	i := 0     // ERROR "moved to heap: i"
-	j := 0     // ERROR "moved to heap: j"
-	m[&i] = &j // ERROR "&i escapes to heap" "&j escapes to heap"
-	var r []*int
-	for k, v := range m {
-		// We want to test exactly "for k, v := range m" rather than "for _, v := range m".
-		// The following if is merely to use (but not leak) k.
-		if k != nil {
-			r = append(r, v)
-		}
-	}
-	return r
-}
-
-func map5(m map[*int]*int) { // ERROR "m does not escape"
-	i := 0     // ERROR "moved to heap: i"
-	j := 0     // ERROR "moved to heap: j"
-	m[&i] = &j // ERROR "&i escapes to heap" "&j escapes to heap"
-}
-
-func map6(m map[*int]*int) { // ERROR "m does not escape"
-	if m != nil {
-		m = make(map[*int]*int) // ERROR "make\(map\[\*int\]\*int\) does not escape"
-	}
-	i := 0     // ERROR "moved to heap: i"
-	j := 0     // ERROR "moved to heap: j"
-	m[&i] = &j // ERROR "&i escapes to heap" "&j escapes to heap"
-}
-
-func map7() {
-	// BAD: i should not escape
-	i := 0 // ERROR "moved to heap: i"
-	// BAD: j should not escape
-	j := 0                     // ERROR "moved to heap: j"
-	m := map[*int]*int{&i: &j} // ERROR "&i escapes to heap" "&j escapes to heap" "literal does not escape"
-	_ = m
-}
-
-func map8() {
-	i := 0                     // ERROR "moved to heap: i"
-	j := 0                     // ERROR "moved to heap: j"
-	m := map[*int]*int{&i: &j} // ERROR "&i escapes to heap" "&j escapes to heap" "literal escapes to heap"
-	sink = m // ERROR "m escapes to heap"
-}
-
-func map9() *int {
-	// BAD: i should not escape
-	i := 0                     // ERROR "moved to heap: i"
-	j := 0                     // ERROR "moved to heap: j"
-	m := map[*int]*int{&i: &j} // ERROR "&i escapes to heap" "&j escapes to heap" "literal does not escape"
-	return m[nil]
-}
diff --git a/test/escape_param.go b/test/escape_param.go
deleted file mode 100644
index cfbcd51..0000000
--- a/test/escape_param.go
+++ /dev/null
@@ -1,353 +0,0 @@
-// errorcheck -0 -m -l
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test escape analysis for function parameters.
-
-// In this test almost everything is BAD except the simplest cases
-// where input directly flows to output.
-
-package escape
-
-var sink interface{}
-
-// in -> out
-func param0(p *int) *int { // ERROR "leaking param: p to result ~r1"
-	return p
-}
-
-func caller0a() {
-	i := 0
-	_ = param0(&i) // ERROR "caller0a &i does not escape$"
-}
-
-func caller0b() {
-	i := 0            // ERROR "moved to heap: i$"
-	sink = param0(&i) // ERROR "&i escapes to heap$" "param0\(&i\) escapes to heap"
-}
-
-// in, in -> out, out
-func param1(p1, p2 *int) (*int, *int) { // ERROR "leaking param: p1 to result ~r2" "leaking param: p2 to result ~r3"
-	return p1, p2
-}
-
-func caller1() {
-	i := 0 // ERROR "moved to heap: i$"
-	j := 0
-	sink, _ = param1(&i, &j) // ERROR "&i escapes to heap$" "caller1 &j does not escape$"
-}
-
-// in -> other in
-func param2(p1 *int, p2 **int) { // ERROR "leaking param: p1$" "param2 p2 does not escape$"
-	*p2 = p1
-}
-
-func caller2a() {
-	i := 0 // ERROR "moved to heap: i$"
-	var p *int
-	param2(&i, &p) // ERROR "&i escapes to heap$" "caller2a &p does not escape$"
-	_ = p
-}
-
-func caller2b() {
-	i := 0 // ERROR "moved to heap: i$"
-	var p *int
-	param2(&i, &p) // ERROR "&i escapes to heap$" "caller2b &p does not escape$"
-	sink = p       // ERROR "p escapes to heap$"
-}
-
-// in -> in
-type Pair struct {
-	p1 *int
-	p2 *int
-}
-
-func param3(p *Pair) { // ERROR "leaking param content: p$"
-	p.p1 = p.p2
-}
-
-func caller3a() {
-	i := 0            // ERROR "moved to heap: i$"
-	j := 0            // ERROR "moved to heap: j$"
-	p := Pair{&i, &j} // ERROR "&i escapes to heap$" "&j escapes to heap$"
-	param3(&p)        // ERROR "caller3a &p does not escape"
-	_ = p
-}
-
-func caller3b() {
-	i := 0            // ERROR "moved to heap: i$"
-	j := 0            // ERROR "moved to heap: j$"
-	p := Pair{&i, &j} // ERROR "&i escapes to heap$" "&j escapes to heap$"
-	param3(&p)        // ERROR "caller3b &p does not escape"
-	sink = p          // ERROR "p escapes to heap$"
-}
-
-// in -> rcvr
-func (p *Pair) param4(i *int) { // ERROR "\(\*Pair\).param4 p does not escape$" "leaking param: i$"
-	p.p1 = i
-}
-
-func caller4a() {
-	i := 0 // ERROR "moved to heap: i$"
-	p := Pair{}
-	p.param4(&i) // ERROR "&i escapes to heap$" "caller4a p does not escape$"
-	_ = p
-}
-
-func caller4b() {
-	i := 0 // ERROR "moved to heap: i$"
-	p := Pair{}
-	p.param4(&i) // ERROR "&i escapes to heap$" "caller4b p does not escape$"
-	sink = p     // ERROR "p escapes to heap$"
-}
-
-// in -> heap
-func param5(i *int) { // ERROR "leaking param: i$"
-	sink = i // ERROR "i escapes to heap$"
-}
-
-func caller5() {
-	i := 0     // ERROR "moved to heap: i$"
-	param5(&i) // ERROR "&i escapes to heap$"
-}
-
-// *in -> heap
-func param6(i ***int) { // ERROR "leaking param content: i$"
-	sink = *i // ERROR "\*i escapes to heap$"
-}
-
-func caller6a() {
-	i := 0      // ERROR "moved to heap: i$"
-	p := &i     // ERROR "&i escapes to heap$" "moved to heap: p$"
-	p2 := &p    // ERROR "&p escapes to heap$"
-	param6(&p2) // ERROR "caller6a &p2 does not escape"
-}
-
-// **in -> heap
-func param7(i ***int) { // ERROR "leaking param content: i$"
-	sink = **i // ERROR "\* \(\*i\) escapes to heap"
-}
-
-func caller7() {
-	i := 0      // ERROR "moved to heap: i$"
-	p := &i     // ERROR "&i escapes to heap$" "moved to heap: p$"
-	p2 := &p    // ERROR "&p escapes to heap$"
-	param7(&p2) // ERROR "caller7 &p2 does not escape"
-}
-
-// **in -> heap
-func param8(i **int) { // ERROR "param8 i does not escape$"
-	sink = **i // ERROR "\* \(\*i\) escapes to heap"
-}
-
-func caller8() {
-	i := 0
-	p := &i    // ERROR "caller8 &i does not escape$"
-	param8(&p) // ERROR "caller8 &p does not escape$"
-}
-
-// *in -> out
-func param9(p ***int) **int { // ERROR "leaking param: p to result ~r1 level=1"
-	return *p
-}
-
-func caller9a() {
-	i := 0
-	p := &i         // ERROR "caller9a &i does not escape"
-	p2 := &p        // ERROR "caller9a &p does not escape"
-	_ = param9(&p2) // ERROR "caller9a &p2 does not escape$"
-}
-
-func caller9b() {
-	i := 0             // ERROR "moved to heap: i$"
-	p := &i            // ERROR "&i escapes to heap$" "moved to heap: p$"
-	p2 := &p           // ERROR "&p escapes to heap$"
-	sink = param9(&p2) // ERROR "caller9b &p2 does not escape$"  "param9\(&p2\) escapes to heap"
-}
-
-// **in -> out
-func param10(p ***int) *int { // ERROR "leaking param: p to result ~r1 level=2"
-	return **p
-}
-
-func caller10a() {
-	i := 0
-	p := &i          // ERROR "caller10a &i does not escape"
-	p2 := &p         // ERROR "caller10a &p does not escape"
-	_ = param10(&p2) // ERROR "caller10a &p2 does not escape$"
-}
-
-func caller10b() {
-	i := 0              // ERROR "moved to heap: i$"
-	p := &i             // ERROR "&i escapes to heap$"
-	p2 := &p            // ERROR "caller10b &p does not escape$"
-	sink = param10(&p2) // ERROR "caller10b &p2 does not escape$" "param10\(&p2\) escapes to heap"
-}
-
-// in escapes to heap (address of param taken and returned)
-func param11(i **int) ***int { // ERROR "moved to heap: i$"
-	return &i // ERROR "&i escapes to heap$"
-}
-
-func caller11a() {
-	i := 0          // ERROR "moved to heap: i"
-	p := &i         // ERROR "moved to heap: p" "&i escapes to heap"
-	_ = param11(&p) // ERROR "&p escapes to heap"
-}
-
-func caller11b() {
-	i := 0             // ERROR "moved to heap: i$"
-	p := &i            // ERROR "&i escapes to heap$" "moved to heap: p$"
-	sink = param11(&p) // ERROR "&p escapes to heap$" "param11\(&p\) escapes to heap"
-}
-
-func caller11c() { // GOOD
-	i := 0              // ERROR "moved to heap: i$"
-	p := &i             // ERROR "moved to heap: p" "&i escapes to heap"
-	sink = *param11(&p) // ERROR "&p escapes to heap" "\*param11\(&p\) escapes to heap"
-}
-
-func caller11d() {
-	i := 0             // ERROR "moved to heap: i$"
-	p := &i            // ERROR "&i escapes to heap" "moved to heap: p"
-	p2 := &p           // ERROR "&p escapes to heap"
-	sink = param11(p2) // ERROR "param11\(p2\) escapes to heap"
-}
-
-// &in -> rcvr
-type Indir struct {
-	p ***int
-}
-
-func (r *Indir) param12(i **int) { // ERROR "\(\*Indir\).param12 r does not escape$" "moved to heap: i$"
-	r.p = &i // ERROR "&i escapes to heap$"
-}
-
-func caller12a() {
-	i := 0  // ERROR "moved to heap: i$"
-	p := &i // ERROR "&i escapes to heap$" "moved to heap: p$"
-	var r Indir
-	r.param12(&p) // ERROR "&p escapes to heap$" "caller12a r does not escape$"
-	_ = r
-}
-
-func caller12b() {
-	i := 0        // ERROR "moved to heap: i$"
-	p := &i       // ERROR "&i escapes to heap$" "moved to heap: p$"
-	r := &Indir{} // ERROR "caller12b &Indir literal does not escape$"
-	r.param12(&p) // ERROR "&p escapes to heap$"
-	_ = r
-}
-
-func caller12c() {
-	i := 0  // ERROR "moved to heap: i$"
-	p := &i // ERROR "&i escapes to heap$" "moved to heap: p$"
-	r := Indir{}
-	r.param12(&p) // ERROR "&p escapes to heap$" "caller12c r does not escape$"
-	sink = r      // ERROR "r escapes to heap$"
-}
-
-func caller12d() {
-	i := 0  // ERROR "moved to heap: i$"
-	p := &i // ERROR "&i escapes to heap$" "moved to heap: p$"
-	r := Indir{}
-	r.param12(&p) // ERROR "&p escapes to heap$" "caller12d r does not escape$"
-	sink = **r.p  // ERROR "\* \(\*r\.p\) escapes to heap"
-}
-
-// in -> value rcvr
-type Val struct {
-	p **int
-}
-
-func (v Val) param13(i *int) { // ERROR "Val.param13 v does not escape$" "leaking param: i$"
-	*v.p = i
-}
-
-func caller13a() {
-	i := 0 // ERROR "moved to heap: i$"
-	var p *int
-	var v Val
-	v.p = &p      // ERROR "caller13a &p does not escape$"
-	v.param13(&i) // ERROR "&i escapes to heap$"
-	_ = v
-}
-
-func caller13b() {
-	i := 0 // ERROR "moved to heap: i$"
-	var p *int
-	v := Val{&p}  // ERROR "caller13b &p does not escape$"
-	v.param13(&i) // ERROR "&i escapes to heap$"
-	_ = v
-}
-
-func caller13c() {
-	i := 0 // ERROR "moved to heap: i$"
-	var p *int
-	v := &Val{&p} // ERROR "caller13c &Val literal does not escape$" "caller13c &p does not escape$"
-	v.param13(&i) // ERROR "&i escapes to heap$"
-	_ = v
-}
-
-func caller13d() {
-	i := 0     // ERROR "moved to heap: i$"
-	var p *int // ERROR "moved to heap: p$"
-	var v Val
-	v.p = &p      // ERROR "&p escapes to heap$"
-	v.param13(&i) // ERROR "&i escapes to heap$"
-	sink = v      // ERROR "v escapes to heap$"
-}
-
-func caller13e() {
-	i := 0        // ERROR "moved to heap: i$"
-	var p *int    // ERROR "moved to heap: p$"
-	v := Val{&p}  // ERROR "&p escapes to heap$"
-	v.param13(&i) // ERROR "&i escapes to heap$"
-	sink = v      // ERROR "v escapes to heap$"
-}
-
-func caller13f() {
-	i := 0        // ERROR "moved to heap: i$"
-	var p *int    // ERROR "moved to heap: p$"
-	v := &Val{&p} // ERROR "&Val literal escapes to heap$" "&p escapes to heap$"
-	v.param13(&i) // ERROR "&i escapes to heap$"
-	sink = v      // ERROR "v escapes to heap$"
-}
-
-func caller13g() {
-	i := 0 // ERROR "moved to heap: i$"
-	var p *int
-	v := Val{&p}  // ERROR "caller13g &p does not escape$"
-	v.param13(&i) // ERROR "&i escapes to heap$"
-	sink = *v.p   // ERROR "\*v\.p escapes to heap"
-}
-
-func caller13h() {
-	i := 0 // ERROR "moved to heap: i$"
-	var p *int
-	v := &Val{&p} // ERROR "caller13h &Val literal does not escape$" "caller13h &p does not escape$"
-	v.param13(&i) // ERROR "&i escapes to heap$"
-	sink = **v.p  // ERROR "\* \(\*v\.p\) escapes to heap"
-}
-
-type Node struct {
-	p *Node
-}
-
-var Sink *Node
-
-func f(x *Node) { // ERROR "leaking param content: x"
-	Sink = &Node{x.p} // ERROR "&Node literal escapes to heap"
-}
-
-func g(x *Node) *Node { // ERROR "leaking param: x to result ~r1 level=0"
-	return &Node{x.p} // ERROR "&Node literal escapes to heap"
-}
-
-func h(x *Node) { // ERROR "leaking param: x"
-	y := &Node{x} // ERROR "h &Node literal does not escape"
-	Sink = g(y)
-	f(y)
-}
diff --git a/test/escape_slice.go b/test/escape_slice.go
deleted file mode 100644
index 0b65997..0000000
--- a/test/escape_slice.go
+++ /dev/null
@@ -1,165 +0,0 @@
-// errorcheck -0 -m -l
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test escape analysis for slices.
-
-package escape
-
-import (
-	"os"
-	"strings"
-)
-
-var sink interface{}
-
-func slice0() {
-	var s []*int
-	// BAD: i should not escape
-	i := 0            // ERROR "moved to heap: i"
-	s = append(s, &i) // ERROR "&i escapes to heap"
-	_ = s
-}
-
-func slice1() *int {
-	var s []*int
-	i := 0            // ERROR "moved to heap: i"
-	s = append(s, &i) // ERROR "&i escapes to heap"
-	return s[0]
-}
-
-func slice2() []*int {
-	var s []*int
-	i := 0            // ERROR "moved to heap: i"
-	s = append(s, &i) // ERROR "&i escapes to heap"
-	return s
-}
-
-func slice3() *int {
-	var s []*int
-	i := 0            // ERROR "moved to heap: i"
-	s = append(s, &i) // ERROR "&i escapes to heap"
-	for _, p := range s {
-		return p
-	}
-	return nil
-}
-
-func slice4(s []*int) { // ERROR "s does not escape"
-	i := 0    // ERROR "moved to heap: i"
-	s[0] = &i // ERROR "&i escapes to heap"
-}
-
-func slice5(s []*int) { // ERROR "s does not escape"
-	if s != nil {
-		s = make([]*int, 10) // ERROR "make\(\[\]\*int, 10\) does not escape"
-	}
-	i := 0    // ERROR "moved to heap: i"
-	s[0] = &i // ERROR "&i escapes to heap"
-}
-
-func slice6() {
-	s := make([]*int, 10) // ERROR "make\(\[\]\*int, 10\) does not escape"
-	// BAD: i should not escape
-	i := 0    // ERROR "moved to heap: i"
-	s[0] = &i // ERROR "&i escapes to heap"
-	_ = s
-}
-
-func slice7() *int {
-	s := make([]*int, 10) // ERROR "make\(\[\]\*int, 10\) does not escape"
-	i := 0                // ERROR "moved to heap: i"
-	s[0] = &i             // ERROR "&i escapes to heap"
-	return s[0]
-}
-
-func slice8() {
-	i := 0
-	s := []*int{&i} // ERROR "&i does not escape" "literal does not escape"
-	_ = s
-}
-
-func slice9() *int {
-	i := 0          // ERROR "moved to heap: i"
-	s := []*int{&i} // ERROR "&i escapes to heap" "literal does not escape"
-	return s[0]
-}
-
-func slice10() []*int {
-	i := 0          // ERROR "moved to heap: i"
-	s := []*int{&i} // ERROR "&i escapes to heap" "literal escapes to heap"
-	return s
-}
-
-func envForDir(dir string) []string { // ERROR "dir does not escape"
-	env := os.Environ()
-	return mergeEnvLists([]string{"PWD=" + dir}, env) // ERROR ".PWD=. \+ dir escapes to heap" "\[\]string literal does not escape"
-}
-
-func mergeEnvLists(in, out []string) []string { // ERROR "leaking param content: in" "leaking param content: out" "leaking param: out to result ~r2 level=0"
-NextVar:
-	for _, inkv := range in {
-		k := strings.SplitAfterN(inkv, "=", 2)[0]
-		for i, outkv := range out {
-			if strings.HasPrefix(outkv, k) {
-				out[i] = inkv
-				continue NextVar
-			}
-		}
-		out = append(out, inkv)
-	}
-	return out
-}
-
-const (
-	IPv4len = 4
-	IPv6len = 16
-)
-
-var v4InV6Prefix = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff}
-
-func IPv4(a, b, c, d byte) IP {
-	p := make(IP, IPv6len) // ERROR "make\(IP, IPv6len\) escapes to heap"
-	copy(p, v4InV6Prefix)
-	p[12] = a
-	p[13] = b
-	p[14] = c
-	p[15] = d
-	return p
-}
-
-type IP []byte
-
-type IPAddr struct {
-	IP   IP
-	Zone string // IPv6 scoped addressing zone
-}
-
-type resolveIPAddrTest struct {
-	network       string
-	litAddrOrName string
-	addr          *IPAddr
-	err           error
-}
-
-var resolveIPAddrTests = []resolveIPAddrTest{
-	{"ip", "127.0.0.1", &IPAddr{IP: IPv4(127, 0, 0, 1)}, nil},
-	{"ip4", "127.0.0.1", &IPAddr{IP: IPv4(127, 0, 0, 1)}, nil},
-	{"ip4:icmp", "127.0.0.1", &IPAddr{IP: IPv4(127, 0, 0, 1)}, nil},
-}
-
-func setupTestData() {
-	resolveIPAddrTests = append(resolveIPAddrTests,
-		[]resolveIPAddrTest{ // ERROR "\[\]resolveIPAddrTest literal does not escape"
-			{"ip",
-				"localhost",
-				&IPAddr{IP: IPv4(127, 0, 0, 1)}, // ERROR "&IPAddr literal escapes to heap"
-				nil},
-			{"ip4",
-				"localhost",
-				&IPAddr{IP: IPv4(127, 0, 0, 1)}, // ERROR "&IPAddr literal escapes to heap"
-				nil},
-		}...)
-}
diff --git a/test/escape_struct_param1.go b/test/escape_struct_param1.go
deleted file mode 100644
index e30e327..0000000
--- a/test/escape_struct_param1.go
+++ /dev/null
@@ -1,298 +0,0 @@
-// errorcheck -0 -m -l
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test escape analysis for *struct function parameters.
-// Note companion strict_param2 checks struct function parameters with similar tests.
-
-package notmain
-
-var Ssink *string
-
-type U struct {
-	_sp  *string
-	_spp **string
-}
-
-type V struct {
-	_u   U
-	_up  *U
-	_upp **U
-}
-
-func (u *U) SP() *string { // ERROR "leaking param: u to result ~r0 level=1$"
-	return u._sp
-}
-
-func (u *U) SPP() **string { // ERROR "leaking param: u to result ~r0 level=1$"
-	return u._spp
-}
-
-func (u *U) SPPi() *string { // ERROR "leaking param: u to result ~r0 level=2$"
-	return *u._spp
-}
-
-func tSPPi() {
-	s := "cat"        // ERROR "moved to heap: s$"
-	ps := &s          // ERROR "&s escapes to heap$"
-	pps := &ps        // ERROR "tSPPi &ps does not escape$"
-	pu := &U{ps, pps} // ERROR "tSPPi &U literal does not escape$"
-	Ssink = pu.SPPi()
-}
-
-func tiSPP() {
-	s := "cat"        // ERROR "moved to heap: s$"
-	ps := &s          // ERROR "&s escapes to heap$"
-	pps := &ps        // ERROR "tiSPP &ps does not escape$"
-	pu := &U{ps, pps} // ERROR "tiSPP &U literal does not escape$"
-	Ssink = *pu.SPP()
-}
-
-// BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of ps
-func tSP() {
-	s := "cat"        // ERROR "moved to heap: s$"
-	ps := &s          // ERROR "&s escapes to heap$" "moved to heap: ps$"
-	pps := &ps        // ERROR "&ps escapes to heap$"
-	pu := &U{ps, pps} // ERROR "tSP &U literal does not escape$"
-	Ssink = pu.SP()
-}
-
-func (v *V) u() U { // ERROR "leaking param: v to result ~r0 level=1$"
-	return v._u
-}
-
-func (v *V) UP() *U { // ERROR "leaking param: v to result ~r0 level=1$"
-	return v._up
-}
-
-func (v *V) UPP() **U { // ERROR "leaking param: v to result ~r0 level=1$"
-	return v._upp
-}
-
-func (v *V) UPPia() *U { // ERROR "leaking param: v to result ~r0 level=2$"
-	return *v._upp
-}
-
-func (v *V) UPPib() *U { // ERROR "leaking param: v to result ~r0 level=2$"
-	return *v.UPP()
-}
-
-func (v *V) USPa() *string { // ERROR "leaking param: v to result ~r0 level=1$"
-	return v._u._sp
-}
-
-func (v *V) USPb() *string { // ERROR "leaking param: v to result ~r0 level=1$"
-	return v.u()._sp
-}
-
-func (v *V) USPPia() *string { // ERROR "leaking param: v to result ~r0 level=2$"
-	return *v._u._spp
-}
-
-func (v *V) USPPib() *string { // ERROR "leaking param: v to result ~r0 level=2$"
-	return v._u.SPPi() // ERROR "\(\*V\).USPPib v._u does not escape$"
-}
-
-func (v *V) UPiSPa() *string { // ERROR "leaking param: v to result ~r0 level=2$"
-	return v._up._sp
-}
-
-func (v *V) UPiSPb() *string { // ERROR "leaking param: v to result ~r0 level=2$"
-	return v._up.SP()
-}
-
-func (v *V) UPiSPc() *string { // ERROR "leaking param: v to result ~r0 level=2$"
-	return v.UP()._sp
-}
-
-func (v *V) UPiSPd() *string { // ERROR "leaking param: v to result ~r0 level=2$"
-	return v.UP().SP()
-}
-
-// BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s3
-func tUPiSPa() {
-	s1 := "ant"
-	s2 := "bat"          // ERROR "moved to heap: s2$"
-	s3 := "cat"          // ERROR "moved to heap: s3$"
-	s4 := "dog"          // ERROR "moved to heap: s4$"
-	s5 := "emu"          // ERROR "moved to heap: s5$"
-	s6 := "fox"          // ERROR "moved to heap: s6$"
-	ps2 := &s2           // ERROR "&s2 escapes to heap$"
-	ps4 := &s4           // ERROR "&s4 escapes to heap$" "moved to heap: ps4$"
-	ps6 := &s6           // ERROR "&s6 escapes to heap$" "moved to heap: ps6$"
-	u1 := U{&s1, &ps2}   // ERROR "tUPiSPa &ps2 does not escape$" "tUPiSPa &s1 does not escape$"
-	u2 := &U{&s3, &ps4}  // ERROR "&ps4 escapes to heap$" "&s3 escapes to heap$" "tUPiSPa &U literal does not escape$"
-	u3 := &U{&s5, &ps6}  // ERROR "&U literal escapes to heap$" "&ps6 escapes to heap$" "&s5 escapes to heap$"
-	v := &V{u1, u2, &u3} // ERROR "tUPiSPa &V literal does not escape$" "tUPiSPa &u3 does not escape$"
-	Ssink = v.UPiSPa()   // Ssink = &s3 (only &s3 really escapes)
-}
-
-// BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s3
-func tUPiSPb() {
-	s1 := "ant"
-	s2 := "bat"          // ERROR "moved to heap: s2$"
-	s3 := "cat"          // ERROR "moved to heap: s3$"
-	s4 := "dog"          // ERROR "moved to heap: s4$"
-	s5 := "emu"          // ERROR "moved to heap: s5$"
-	s6 := "fox"          // ERROR "moved to heap: s6$"
-	ps2 := &s2           // ERROR "&s2 escapes to heap$"
-	ps4 := &s4           // ERROR "&s4 escapes to heap$" "moved to heap: ps4$"
-	ps6 := &s6           // ERROR "&s6 escapes to heap$" "moved to heap: ps6$"
-	u1 := U{&s1, &ps2}   // ERROR "tUPiSPb &ps2 does not escape$" "tUPiSPb &s1 does not escape$"
-	u2 := &U{&s3, &ps4}  // ERROR "&ps4 escapes to heap$" "&s3 escapes to heap$" "tUPiSPb &U literal does not escape$"
-	u3 := &U{&s5, &ps6}  // ERROR "&U literal escapes to heap$" "&ps6 escapes to heap$" "&s5 escapes to heap$"
-	v := &V{u1, u2, &u3} // ERROR "tUPiSPb &V literal does not escape$" "tUPiSPb &u3 does not escape$"
-	Ssink = v.UPiSPb()   // Ssink = &s3 (only &s3 really escapes)
-}
-
-// BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s3
-func tUPiSPc() {
-	s1 := "ant"
-	s2 := "bat"          // ERROR "moved to heap: s2$"
-	s3 := "cat"          // ERROR "moved to heap: s3$"
-	s4 := "dog"          // ERROR "moved to heap: s4$"
-	s5 := "emu"          // ERROR "moved to heap: s5$"
-	s6 := "fox"          // ERROR "moved to heap: s6$"
-	ps2 := &s2           // ERROR "&s2 escapes to heap$"
-	ps4 := &s4           // ERROR "&s4 escapes to heap$" "moved to heap: ps4$"
-	ps6 := &s6           // ERROR "&s6 escapes to heap$" "moved to heap: ps6$"
-	u1 := U{&s1, &ps2}   // ERROR "tUPiSPc &ps2 does not escape$" "tUPiSPc &s1 does not escape$"
-	u2 := &U{&s3, &ps4}  // ERROR "&ps4 escapes to heap$" "&s3 escapes to heap$" "tUPiSPc &U literal does not escape$"
-	u3 := &U{&s5, &ps6}  // ERROR "&U literal escapes to heap$" "&ps6 escapes to heap$" "&s5 escapes to heap$"
-	v := &V{u1, u2, &u3} // ERROR "tUPiSPc &V literal does not escape$" "tUPiSPc &u3 does not escape$"
-	Ssink = v.UPiSPc()   // Ssink = &s3 (only &s3 really escapes)
-}
-
-// BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s3
-func tUPiSPd() {
-	s1 := "ant"
-	s2 := "bat"          // ERROR "moved to heap: s2$"
-	s3 := "cat"          // ERROR "moved to heap: s3$"
-	s4 := "dog"          // ERROR "moved to heap: s4$"
-	s5 := "emu"          // ERROR "moved to heap: s5$"
-	s6 := "fox"          // ERROR "moved to heap: s6$"
-	ps2 := &s2           // ERROR "&s2 escapes to heap$"
-	ps4 := &s4           // ERROR "&s4 escapes to heap$" "moved to heap: ps4$"
-	ps6 := &s6           // ERROR "&s6 escapes to heap$" "moved to heap: ps6$"
-	u1 := U{&s1, &ps2}   // ERROR "tUPiSPd &ps2 does not escape$" "tUPiSPd &s1 does not escape$"
-	u2 := &U{&s3, &ps4}  // ERROR "&ps4 escapes to heap$" "&s3 escapes to heap$" "tUPiSPd &U literal does not escape$"
-	u3 := &U{&s5, &ps6}  // ERROR "&U literal escapes to heap$" "&ps6 escapes to heap$" "&s5 escapes to heap$"
-	v := &V{u1, u2, &u3} // ERROR "tUPiSPd &V literal does not escape$" "tUPiSPd &u3 does not escape$"
-	Ssink = v.UPiSPd()   // Ssink = &s3 (only &s3 really escapes)
-}
-
-func (v V) UPiSPPia() *string { // ERROR "leaking param: v to result ~r0 level=2$"
-	return *v._up._spp
-}
-
-func (v V) UPiSPPib() *string { // ERROR "leaking param: v to result ~r0 level=2$"
-	return v._up.SPPi()
-}
-
-func (v V) UPiSPPic() *string { // ERROR "leaking param: v to result ~r0 level=2$"
-	return *v.UP()._spp // ERROR "V.UPiSPPic v does not escape$"
-}
-
-func (v V) UPiSPPid() *string { // ERROR "leaking param: v to result ~r0 level=2$"
-	return v.UP().SPPi() // ERROR "V.UPiSPPid v does not escape$"
-}
-
-// BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s4
-func tUPiSPPia() {
-	s1 := "ant"
-	s2 := "bat"
-	s3 := "cat"
-	s4 := "dog"          // ERROR "moved to heap: s4$"
-	s5 := "emu"          // ERROR "moved to heap: s5$"
-	s6 := "fox"          // ERROR "moved to heap: s6$"
-	ps2 := &s2           // ERROR "tUPiSPPia &s2 does not escape$"
-	ps4 := &s4           // ERROR "&s4 escapes to heap$"
-	ps6 := &s6           // ERROR "&s6 escapes to heap$" "moved to heap: ps6$"
-	u1 := U{&s1, &ps2}   // ERROR "tUPiSPPia &ps2 does not escape$" "tUPiSPPia &s1 does not escape$"
-	u2 := &U{&s3, &ps4}  // ERROR "tUPiSPPia &U literal does not escape$" "tUPiSPPia &ps4 does not escape$" "tUPiSPPia &s3 does not escape$"
-	u3 := &U{&s5, &ps6}  // ERROR "&ps6 escapes to heap$" "&s5 escapes to heap$" "tUPiSPPia &U literal does not escape$"
-	v := &V{u1, u2, &u3} // ERROR "tUPiSPPia &V literal does not escape$" "tUPiSPPia &u3 does not escape$"
-	Ssink = v.UPiSPPia() // Ssink = *&ps4 = &s4 (only &s4 really escapes)
-}
-
-// BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s4
-func tUPiSPPib() {
-	s1 := "ant"
-	s2 := "bat"
-	s3 := "cat"
-	s4 := "dog"          // ERROR "moved to heap: s4$"
-	s5 := "emu"          // ERROR "moved to heap: s5$"
-	s6 := "fox"          // ERROR "moved to heap: s6$"
-	ps2 := &s2           // ERROR "tUPiSPPib &s2 does not escape$"
-	ps4 := &s4           // ERROR "&s4 escapes to heap$"
-	ps6 := &s6           // ERROR "&s6 escapes to heap$" "moved to heap: ps6$"
-	u1 := U{&s1, &ps2}   // ERROR "tUPiSPPib &ps2 does not escape$" "tUPiSPPib &s1 does not escape$"
-	u2 := &U{&s3, &ps4}  // ERROR "tUPiSPPib &U literal does not escape$" "tUPiSPPib &ps4 does not escape$" "tUPiSPPib &s3 does not escape$"
-	u3 := &U{&s5, &ps6}  // ERROR "&ps6 escapes to heap$" "&s5 escapes to heap$" "tUPiSPPib &U literal does not escape$"
-	v := &V{u1, u2, &u3} // ERROR "tUPiSPPib &V literal does not escape$" "tUPiSPPib &u3 does not escape$"
-	Ssink = v.UPiSPPib() // Ssink = *&ps4 = &s4 (only &s4 really escapes)
-}
-
-// BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s4
-func tUPiSPPic() {
-	s1 := "ant"
-	s2 := "bat"
-	s3 := "cat"
-	s4 := "dog"          // ERROR "moved to heap: s4$"
-	s5 := "emu"          // ERROR "moved to heap: s5$"
-	s6 := "fox"          // ERROR "moved to heap: s6$"
-	ps2 := &s2           // ERROR "tUPiSPPic &s2 does not escape$"
-	ps4 := &s4           // ERROR "&s4 escapes to heap$"
-	ps6 := &s6           // ERROR "&s6 escapes to heap$" "moved to heap: ps6$"
-	u1 := U{&s1, &ps2}   // ERROR "tUPiSPPic &ps2 does not escape$" "tUPiSPPic &s1 does not escape$"
-	u2 := &U{&s3, &ps4}  // ERROR "tUPiSPPic &U literal does not escape$" "tUPiSPPic &ps4 does not escape$" "tUPiSPPic &s3 does not escape$"
-	u3 := &U{&s5, &ps6}  // ERROR "&ps6 escapes to heap$" "&s5 escapes to heap$" "tUPiSPPic &U literal does not escape$"
-	v := &V{u1, u2, &u3} // ERROR "tUPiSPPic &V literal does not escape$" "tUPiSPPic &u3 does not escape$"
-	Ssink = v.UPiSPPic() // Ssink = *&ps4 = &s4 (only &s4 really escapes)
-}
-
-// BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s4
-func tUPiSPPid() {
-	s1 := "ant"
-	s2 := "bat"
-	s3 := "cat"
-	s4 := "dog"          // ERROR "moved to heap: s4$"
-	s5 := "emu"          // ERROR "moved to heap: s5$"
-	s6 := "fox"          // ERROR "moved to heap: s6$"
-	ps2 := &s2           // ERROR "tUPiSPPid &s2 does not escape$"
-	ps4 := &s4           // ERROR "&s4 escapes to heap$"
-	ps6 := &s6           // ERROR "&s6 escapes to heap$" "moved to heap: ps6$"
-	u1 := U{&s1, &ps2}   // ERROR "tUPiSPPid &ps2 does not escape$" "tUPiSPPid &s1 does not escape$"
-	u2 := &U{&s3, &ps4}  // ERROR "tUPiSPPid &U literal does not escape$" "tUPiSPPid &ps4 does not escape$" "tUPiSPPid &s3 does not escape$"
-	u3 := &U{&s5, &ps6}  // ERROR "&ps6 escapes to heap$" "&s5 escapes to heap$" "tUPiSPPid &U literal does not escape$"
-	v := &V{u1, u2, &u3} // ERROR "tUPiSPPid &V literal does not escape$" "tUPiSPPid &u3 does not escape$"
-	Ssink = v.UPiSPPid() // Ssink = *&ps4 = &s4 (only &s4 really escapes)
-}
-
-func (v *V) UPPiSPPia() *string { // ERROR "leaking param: v to result ~r0 level=4$"
-	return *(*v._upp)._spp
-}
-
-// This test isolates the one value that needs to escape, not because
-// it distinguishes fields but because it knows that &s6 is the only
-// value reachable by two indirects from v.
-// The test depends on the level cap in the escape analysis tags
-// being able to encode that fact.
-func tUPPiSPPia() {
-	s1 := "ant"
-	s2 := "bat"
-	s3 := "cat"
-	s4 := "dog"
-	s5 := "emu"
-	s6 := "fox"           // ERROR "moved to heap: s6$"
-	ps2 := &s2            // ERROR "tUPPiSPPia &s2 does not escape$"
-	ps4 := &s4            // ERROR "tUPPiSPPia &s4 does not escape$"
-	ps6 := &s6            // ERROR "&s6 escapes to heap$"
-	u1 := U{&s1, &ps2}    // ERROR "tUPPiSPPia &ps2 does not escape$" "tUPPiSPPia &s1 does not escape$"
-	u2 := &U{&s3, &ps4}   // ERROR "tUPPiSPPia &U literal does not escape$" "tUPPiSPPia &ps4 does not escape$" "tUPPiSPPia &s3 does not escape$"
-	u3 := &U{&s5, &ps6}   // ERROR "tUPPiSPPia &U literal does not escape$" "tUPPiSPPia &ps6 does not escape$" "tUPPiSPPia &s5 does not escape$"
-	v := &V{u1, u2, &u3}  // ERROR "tUPPiSPPia &V literal does not escape$" "tUPPiSPPia &u3 does not escape$"
-	Ssink = v.UPPiSPPia() // Ssink = *&ps6 = &s6 (only &s6 really escapes)
-}
diff --git a/test/escape_struct_param2.go b/test/escape_struct_param2.go
deleted file mode 100644
index c10c336..0000000
--- a/test/escape_struct_param2.go
+++ /dev/null
@@ -1,298 +0,0 @@
-// errorcheck -0 -m -l
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test escape analysis for struct function parameters.
-// Note companion strict_param1 checks *struct function parameters with similar tests.
-
-package notmain
-
-var Ssink *string
-
-type U struct {
-	_sp  *string
-	_spp **string
-}
-
-type V struct {
-	_u   U
-	_up  *U
-	_upp **U
-}
-
-func (u U) SP() *string { // ERROR "leaking param: u to result ~r0 level=0$"
-	return u._sp
-}
-
-func (u U) SPP() **string { // ERROR "leaking param: u to result ~r0 level=0$"
-	return u._spp
-}
-
-func (u U) SPPi() *string { // ERROR "leaking param: u to result ~r0 level=1$"
-	return *u._spp
-}
-
-func tSPPi() {
-	s := "cat"        // ERROR "moved to heap: s$"
-	ps := &s          // ERROR "&s escapes to heap$"
-	pps := &ps        // ERROR "tSPPi &ps does not escape$"
-	pu := &U{ps, pps} // ERROR "tSPPi &U literal does not escape$"
-	Ssink = pu.SPPi()
-}
-
-func tiSPP() {
-	s := "cat"        // ERROR "moved to heap: s$"
-	ps := &s          // ERROR "&s escapes to heap$"
-	pps := &ps        // ERROR "tiSPP &ps does not escape$"
-	pu := &U{ps, pps} // ERROR "tiSPP &U literal does not escape$"
-	Ssink = *pu.SPP()
-}
-
-// BAD: need fine-grained analysis to avoid spurious escape of ps
-func tSP() {
-	s := "cat"        // ERROR "moved to heap: s$"
-	ps := &s          // ERROR "&s escapes to heap$" "moved to heap: ps$"
-	pps := &ps        // ERROR "&ps escapes to heap$"
-	pu := &U{ps, pps} // ERROR "tSP &U literal does not escape$"
-	Ssink = pu.SP()
-}
-
-func (v V) u() U { // ERROR "leaking param: v to result ~r0 level=0$"
-	return v._u
-}
-
-func (v V) UP() *U { // ERROR "leaking param: v to result ~r0 level=0$"
-	return v._up
-}
-
-func (v V) UPP() **U { // ERROR "leaking param: v to result ~r0 level=0$"
-	return v._upp
-}
-
-func (v V) UPPia() *U { // ERROR "leaking param: v to result ~r0 level=1$"
-	return *v._upp
-}
-
-func (v V) UPPib() *U { // ERROR "leaking param: v to result ~r0 level=1$"
-	return *v.UPP()
-}
-
-func (v V) USPa() *string { // ERROR "leaking param: v to result ~r0 level=0$"
-	return v._u._sp
-}
-
-func (v V) USPb() *string { // ERROR "leaking param: v to result ~r0 level=0$"
-	return v.u()._sp
-}
-
-func (v V) USPPia() *string { // ERROR "leaking param: v to result ~r0 level=1$"
-	return *v._u._spp
-}
-
-func (v V) USPPib() *string { // ERROR "leaking param: v to result ~r0 level=1$"
-	return v._u.SPPi()
-}
-
-func (v V) UPiSPa() *string { // ERROR "leaking param: v to result ~r0 level=1$"
-	return v._up._sp
-}
-
-func (v V) UPiSPb() *string { // ERROR "leaking param: v to result ~r0 level=1$"
-	return v._up.SP()
-}
-
-func (v V) UPiSPc() *string { // ERROR "leaking param: v to result ~r0 level=1$"
-	return v.UP()._sp
-}
-
-func (v V) UPiSPd() *string { // ERROR "leaking param: v to result ~r0 level=1$"
-	return v.UP().SP()
-}
-
-// BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s3
-func tUPiSPa() {
-	s1 := "ant"
-	s2 := "bat"          // ERROR "moved to heap: s2$"
-	s3 := "cat"          // ERROR "moved to heap: s3$"
-	s4 := "dog"          // ERROR "moved to heap: s4$"
-	s5 := "emu"          // ERROR "moved to heap: s5$"
-	s6 := "fox"          // ERROR "moved to heap: s6$"
-	ps2 := &s2           // ERROR "&s2 escapes to heap$"
-	ps4 := &s4           // ERROR "&s4 escapes to heap$" "moved to heap: ps4$"
-	ps6 := &s6           // ERROR "&s6 escapes to heap$" "moved to heap: ps6$"
-	u1 := U{&s1, &ps2}   // ERROR "tUPiSPa &ps2 does not escape$" "tUPiSPa &s1 does not escape$"
-	u2 := &U{&s3, &ps4}  // ERROR "&ps4 escapes to heap$" "&s3 escapes to heap$" "tUPiSPa &U literal does not escape$"
-	u3 := &U{&s5, &ps6}  // ERROR "&U literal escapes to heap$" "&ps6 escapes to heap$" "&s5 escapes to heap$"
-	v := &V{u1, u2, &u3} // ERROR "tUPiSPa &V literal does not escape$" "tUPiSPa &u3 does not escape$"
-	Ssink = v.UPiSPa()   // Ssink = &s3 (only &s3 really escapes)
-}
-
-// BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s3
-func tUPiSPb() {
-	s1 := "ant"
-	s2 := "bat"          // ERROR "moved to heap: s2$"
-	s3 := "cat"          // ERROR "moved to heap: s3$"
-	s4 := "dog"          // ERROR "moved to heap: s4$"
-	s5 := "emu"          // ERROR "moved to heap: s5$"
-	s6 := "fox"          // ERROR "moved to heap: s6$"
-	ps2 := &s2           // ERROR "&s2 escapes to heap$"
-	ps4 := &s4           // ERROR "&s4 escapes to heap$" "moved to heap: ps4$"
-	ps6 := &s6           // ERROR "&s6 escapes to heap$" "moved to heap: ps6$"
-	u1 := U{&s1, &ps2}   // ERROR "tUPiSPb &ps2 does not escape$" "tUPiSPb &s1 does not escape$"
-	u2 := &U{&s3, &ps4}  // ERROR "&ps4 escapes to heap$" "&s3 escapes to heap$" "tUPiSPb &U literal does not escape$"
-	u3 := &U{&s5, &ps6}  // ERROR "&U literal escapes to heap$" "&ps6 escapes to heap$" "&s5 escapes to heap$"
-	v := &V{u1, u2, &u3} // ERROR "tUPiSPb &V literal does not escape$" "tUPiSPb &u3 does not escape$"
-	Ssink = v.UPiSPb()   // Ssink = &s3 (only &s3 really escapes)
-}
-
-// BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s3
-func tUPiSPc() {
-	s1 := "ant"
-	s2 := "bat"          // ERROR "moved to heap: s2$"
-	s3 := "cat"          // ERROR "moved to heap: s3$"
-	s4 := "dog"          // ERROR "moved to heap: s4$"
-	s5 := "emu"          // ERROR "moved to heap: s5$"
-	s6 := "fox"          // ERROR "moved to heap: s6$"
-	ps2 := &s2           // ERROR "&s2 escapes to heap$"
-	ps4 := &s4           // ERROR "&s4 escapes to heap$" "moved to heap: ps4$"
-	ps6 := &s6           // ERROR "&s6 escapes to heap$" "moved to heap: ps6$"
-	u1 := U{&s1, &ps2}   // ERROR "tUPiSPc &ps2 does not escape$" "tUPiSPc &s1 does not escape$"
-	u2 := &U{&s3, &ps4}  // ERROR "&ps4 escapes to heap$" "&s3 escapes to heap$" "tUPiSPc &U literal does not escape$"
-	u3 := &U{&s5, &ps6}  // ERROR "&U literal escapes to heap$" "&ps6 escapes to heap$" "&s5 escapes to heap$"
-	v := &V{u1, u2, &u3} // ERROR "tUPiSPc &V literal does not escape$" "tUPiSPc &u3 does not escape$"
-	Ssink = v.UPiSPc()   // Ssink = &s3 (only &s3 really escapes)
-}
-
-// BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s3
-func tUPiSPd() {
-	s1 := "ant"
-	s2 := "bat"          // ERROR "moved to heap: s2$"
-	s3 := "cat"          // ERROR "moved to heap: s3$"
-	s4 := "dog"          // ERROR "moved to heap: s4$"
-	s5 := "emu"          // ERROR "moved to heap: s5$"
-	s6 := "fox"          // ERROR "moved to heap: s6$"
-	ps2 := &s2           // ERROR "&s2 escapes to heap$"
-	ps4 := &s4           // ERROR "&s4 escapes to heap$" "moved to heap: ps4$"
-	ps6 := &s6           // ERROR "&s6 escapes to heap$" "moved to heap: ps6$"
-	u1 := U{&s1, &ps2}   // ERROR "tUPiSPd &ps2 does not escape$" "tUPiSPd &s1 does not escape$"
-	u2 := &U{&s3, &ps4}  // ERROR "&ps4 escapes to heap$" "&s3 escapes to heap$" "tUPiSPd &U literal does not escape$"
-	u3 := &U{&s5, &ps6}  // ERROR "&U literal escapes to heap$" "&ps6 escapes to heap$" "&s5 escapes to heap$"
-	v := &V{u1, u2, &u3} // ERROR "tUPiSPd &V literal does not escape$" "tUPiSPd &u3 does not escape$"
-	Ssink = v.UPiSPd()   // Ssink = &s3 (only &s3 really escapes)
-}
-
-func (v V) UPiSPPia() *string { // ERROR "leaking param: v to result ~r0 level=2$"
-	return *v._up._spp
-}
-
-func (v V) UPiSPPib() *string { // ERROR "leaking param: v to result ~r0 level=2$"
-	return v._up.SPPi()
-}
-
-func (v V) UPiSPPic() *string { // ERROR "leaking param: v to result ~r0 level=2$"
-	return *v.UP()._spp
-}
-
-func (v V) UPiSPPid() *string { // ERROR "leaking param: v to result ~r0 level=2$"
-	return v.UP().SPPi()
-}
-
-// BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s4
-func tUPiSPPia() {
-	s1 := "ant"
-	s2 := "bat"
-	s3 := "cat"
-	s4 := "dog"          // ERROR "moved to heap: s4$"
-	s5 := "emu"          // ERROR "moved to heap: s5$"
-	s6 := "fox"          // ERROR "moved to heap: s6$"
-	ps2 := &s2           // ERROR "tUPiSPPia &s2 does not escape$"
-	ps4 := &s4           // ERROR "&s4 escapes to heap$"
-	ps6 := &s6           // ERROR "&s6 escapes to heap$" "moved to heap: ps6$"
-	u1 := U{&s1, &ps2}   // ERROR "tUPiSPPia &ps2 does not escape$" "tUPiSPPia &s1 does not escape$"
-	u2 := &U{&s3, &ps4}  // ERROR "tUPiSPPia &U literal does not escape$" "tUPiSPPia &ps4 does not escape$" "tUPiSPPia &s3 does not escape$"
-	u3 := &U{&s5, &ps6}  // ERROR "&ps6 escapes to heap$" "&s5 escapes to heap$" "tUPiSPPia &U literal does not escape$"
-	v := &V{u1, u2, &u3} // ERROR "tUPiSPPia &V literal does not escape$" "tUPiSPPia &u3 does not escape$"
-	Ssink = v.UPiSPPia() // Ssink = *&ps4 = &s4 (only &s4 really escapes)
-}
-
-// BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s4
-func tUPiSPPib() {
-	s1 := "ant"
-	s2 := "bat"
-	s3 := "cat"
-	s4 := "dog"          // ERROR "moved to heap: s4$"
-	s5 := "emu"          // ERROR "moved to heap: s5$"
-	s6 := "fox"          // ERROR "moved to heap: s6$"
-	ps2 := &s2           // ERROR "tUPiSPPib &s2 does not escape$"
-	ps4 := &s4           // ERROR "&s4 escapes to heap$"
-	ps6 := &s6           // ERROR "&s6 escapes to heap$" "moved to heap: ps6$"
-	u1 := U{&s1, &ps2}   // ERROR "tUPiSPPib &ps2 does not escape$" "tUPiSPPib &s1 does not escape$"
-	u2 := &U{&s3, &ps4}  // ERROR "tUPiSPPib &U literal does not escape$" "tUPiSPPib &ps4 does not escape$" "tUPiSPPib &s3 does not escape$"
-	u3 := &U{&s5, &ps6}  // ERROR "&ps6 escapes to heap$" "&s5 escapes to heap$" "tUPiSPPib &U literal does not escape$"
-	v := &V{u1, u2, &u3} // ERROR "tUPiSPPib &V literal does not escape$" "tUPiSPPib &u3 does not escape$"
-	Ssink = v.UPiSPPib() // Ssink = *&ps4 = &s4 (only &s4 really escapes)
-}
-
-// BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s4
-func tUPiSPPic() {
-	s1 := "ant"
-	s2 := "bat"
-	s3 := "cat"
-	s4 := "dog"          // ERROR "moved to heap: s4$"
-	s5 := "emu"          // ERROR "moved to heap: s5$"
-	s6 := "fox"          // ERROR "moved to heap: s6$"
-	ps2 := &s2           // ERROR "tUPiSPPic &s2 does not escape$"
-	ps4 := &s4           // ERROR "&s4 escapes to heap$"
-	ps6 := &s6           // ERROR "&s6 escapes to heap$" "moved to heap: ps6$"
-	u1 := U{&s1, &ps2}   // ERROR "tUPiSPPic &ps2 does not escape$" "tUPiSPPic &s1 does not escape$"
-	u2 := &U{&s3, &ps4}  // ERROR "tUPiSPPic &U literal does not escape$" "tUPiSPPic &ps4 does not escape$" "tUPiSPPic &s3 does not escape$"
-	u3 := &U{&s5, &ps6}  // ERROR "&ps6 escapes to heap$" "&s5 escapes to heap$" "tUPiSPPic &U literal does not escape$"
-	v := &V{u1, u2, &u3} // ERROR "tUPiSPPic &V literal does not escape$" "tUPiSPPic &u3 does not escape$"
-	Ssink = v.UPiSPPic() // Ssink = *&ps4 = &s4 (only &s4 really escapes)
-}
-
-// BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s4
-func tUPiSPPid() {
-	s1 := "ant"
-	s2 := "bat"
-	s3 := "cat"
-	s4 := "dog"          // ERROR "moved to heap: s4$"
-	s5 := "emu"          // ERROR "moved to heap: s5$"
-	s6 := "fox"          // ERROR "moved to heap: s6$"
-	ps2 := &s2           // ERROR "tUPiSPPid &s2 does not escape$"
-	ps4 := &s4           // ERROR "&s4 escapes to heap$"
-	ps6 := &s6           // ERROR "&s6 escapes to heap$" "moved to heap: ps6$"
-	u1 := U{&s1, &ps2}   // ERROR "tUPiSPPid &ps2 does not escape$" "tUPiSPPid &s1 does not escape$"
-	u2 := &U{&s3, &ps4}  // ERROR "tUPiSPPid &U literal does not escape$" "tUPiSPPid &ps4 does not escape$" "tUPiSPPid &s3 does not escape$"
-	u3 := &U{&s5, &ps6}  // ERROR "&ps6 escapes to heap$" "&s5 escapes to heap$" "tUPiSPPid &U literal does not escape$"
-	v := &V{u1, u2, &u3} // ERROR "tUPiSPPid &V literal does not escape$" "tUPiSPPid &u3 does not escape$"
-	Ssink = v.UPiSPPid() // Ssink = *&ps4 = &s4 (only &s4 really escapes)
-}
-
-func (v V) UPPiSPPia() *string { // ERROR "leaking param: v to result ~r0 level=3$"
-	return *(*v._upp)._spp
-}
-
-// This test isolates the one value that needs to escape, not because
-// it distinguishes fields but because it knows that &s6 is the only
-// value reachable by two indirects from v.
-// The test depends on the level cap in the escape analysis tags
-// being able to encode that fact.
-func tUPPiSPPia() { // This test is sensitive to the level cap in function summary results.
-	s1 := "ant"
-	s2 := "bat"
-	s3 := "cat"
-	s4 := "dog"
-	s5 := "emu"
-	s6 := "fox"           // ERROR "moved to heap: s6$"
-	ps2 := &s2            // ERROR "tUPPiSPPia &s2 does not escape$"
-	ps4 := &s4            // ERROR "tUPPiSPPia &s4 does not escape$"
-	ps6 := &s6            // ERROR "&s6 escapes to heap$"
-	u1 := U{&s1, &ps2}    // ERROR "tUPPiSPPia &ps2 does not escape$" "tUPPiSPPia &s1 does not escape$"
-	u2 := &U{&s3, &ps4}   // ERROR "tUPPiSPPia &U literal does not escape$" "tUPPiSPPia &ps4 does not escape$" "tUPPiSPPia &s3 does not escape$"
-	u3 := &U{&s5, &ps6}   // ERROR "tUPPiSPPia &U literal does not escape$" "tUPPiSPPia &ps6 does not escape$" "tUPPiSPPia &s5 does not escape$"
-	v := &V{u1, u2, &u3}  // ERROR "tUPPiSPPia &V literal does not escape$" "tUPPiSPPia &u3 does not escape$"
-	Ssink = v.UPPiSPPia() // Ssink = *&ps6 = &s6 (only &s6 really escapes)
-}
diff --git a/test/escape_struct_return.go b/test/escape_struct_return.go
deleted file mode 100644
index b423ebd..0000000
--- a/test/escape_struct_return.go
+++ /dev/null
@@ -1,74 +0,0 @@
-// errorcheck -0 -m -l
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test escape analysis for function parameters.
-
-package foo
-
-var Ssink *string
-
-type U struct {
-	_sp  *string
-	_spp **string
-}
-
-func A(sp *string, spp **string) U { // ERROR "leaking param: sp to result ~r2 level=0$" "leaking param: spp to result ~r2 level=0$"
-	return U{sp, spp}
-}
-
-func B(spp **string) U { // ERROR "leaking param: spp to result ~r1 level=0$" "leaking param: spp to result ~r1 level=1$"
-	return U{*spp, spp}
-}
-
-func tA1() {
-	s := "cat"
-	sp := &s   // ERROR "tA1 &s does not escape$"
-	spp := &sp // ERROR "tA1 &sp does not escape$"
-	u := A(sp, spp)
-	_ = u
-	println(s)
-}
-
-func tA2() {
-	s := "cat"
-	sp := &s   // ERROR "tA2 &s does not escape$"
-	spp := &sp // ERROR "tA2 &sp does not escape$"
-	u := A(sp, spp)
-	println(*u._sp)
-}
-
-func tA3() {
-	s := "cat"
-	sp := &s   // ERROR "tA3 &s does not escape$"
-	spp := &sp // ERROR "tA3 &sp does not escape$"
-	u := A(sp, spp)
-	println(**u._spp)
-}
-
-func tB1() {
-	s := "cat"
-	sp := &s   // ERROR "tB1 &s does not escape$"
-	spp := &sp // ERROR "tB1 &sp does not escape$"
-	u := B(spp)
-	_ = u
-	println(s)
-}
-
-func tB2() {
-	s := "cat"
-	sp := &s   // ERROR "tB2 &s does not escape$"
-	spp := &sp // ERROR "tB2 &sp does not escape$"
-	u := B(spp)
-	println(*u._sp)
-}
-
-func tB3() {
-	s := "cat"
-	sp := &s   // ERROR "tB3 &s does not escape$"
-	spp := &sp // ERROR "tB3 &sp does not escape$"
-	u := B(spp)
-	println(**u._spp)
-}
diff --git a/test/fibo.go b/test/fibo.go
deleted file mode 100644
index 3b816d9..0000000
--- a/test/fibo.go
+++ /dev/null
@@ -1,310 +0,0 @@
-// skip
-
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Usage:
-// fibo <n>     compute fibonacci(n), n must be >= 0
-// fibo -bench  benchmark fibonacci computation (takes about 1 min)
-//
-// Additional flags:
-// -half        add values using two half-digit additions
-// -opt         optimize memory allocation through reuse
-// -short       only print the first 10 digits of very large fibonacci numbers
-
-// Command fibo is a stand-alone test and benchmark to
-// evaluate the performance of bignum arithmetic written
-// entirely in Go.
-package main
-
-import (
-	"flag"
-	"fmt"
-	"math/big" // only used for printing
-	"os"
-	"strconv"
-	"testing"
-	"text/tabwriter"
-	"time"
-)
-
-var (
-	bench = flag.Bool("bench", false, "run benchmarks")
-	half  = flag.Bool("half", false, "use half-digit addition")
-	opt   = flag.Bool("opt", false, "optimize memory usage")
-	short = flag.Bool("short", false, "only print first 10 digits of result")
-)
-
-// A large natural number is represented by a nat, each "digit" is
-// a big.Word; the value zero corresponds to the empty nat slice.
-type nat []big.Word
-
-const W = 1 << (5 + ^big.Word(0)>>63) // big.Word size in bits
-
-// The following methods are extracted from math/big to make this a
-// stand-alone program that can easily be run without dependencies
-// and compiled with different compilers.
-
-func (z nat) make(n int) nat {
-	if n <= cap(z) {
-		return z[:n] // reuse z
-	}
-	// Choosing a good value for e has significant performance impact
-	// because it increases the chance that a value can be reused.
-	const e = 4 // extra capacity
-	return make(nat, n, n+e)
-}
-
-// z = x
-func (z nat) set(x nat) nat {
-	z = z.make(len(x))
-	copy(z, x)
-	return z
-}
-
-// z = x + y
-// (like add, but operating on half-digits at a time)
-func (z nat) halfAdd(x, y nat) nat {
-	m := len(x)
-	n := len(y)
-
-	switch {
-	case m < n:
-		return z.add(y, x)
-	case m == 0:
-		// n == 0 because m >= n; result is 0
-		return z.make(0)
-	case n == 0:
-		// result is x
-		return z.set(x)
-	}
-	// m >= n > 0
-
-	const W2 = W / 2         // half-digit size in bits
-	const M2 = (1 << W2) - 1 // lower half-digit mask
-
-	z = z.make(m + 1)
-	var c big.Word
-	for i := 0; i < n; i++ {
-		// lower half-digit
-		c += x[i]&M2 + y[i]&M2
-		d := c & M2
-		c >>= W2
-		// upper half-digit
-		c += x[i]>>W2 + y[i]>>W2
-		z[i] = c<<W2 | d
-		c >>= W2
-	}
-	for i := n; i < m; i++ {
-		// lower half-digit
-		c += x[i] & M2
-		d := c & M2
-		c >>= W2
-		// upper half-digit
-		c += x[i] >> W2
-		z[i] = c<<W2 | d
-		c >>= W2
-	}
-	if c != 0 {
-		z[m] = c
-		m++
-	}
-	return z[:m]
-}
-
-// z = x + y
-func (z nat) add(x, y nat) nat {
-	m := len(x)
-	n := len(y)
-
-	switch {
-	case m < n:
-		return z.add(y, x)
-	case m == 0:
-		// n == 0 because m >= n; result is 0
-		return z.make(0)
-	case n == 0:
-		// result is x
-		return z.set(x)
-	}
-	// m >= n > 0
-
-	z = z.make(m + 1)
-	var c big.Word
-
-	for i, xi := range x[:n] {
-		yi := y[i]
-		zi := xi + yi + c
-		z[i] = zi
-		// see "Hacker's Delight", section 2-12 (overflow detection)
-		c = ((xi & yi) | ((xi | yi) &^ zi)) >> (W - 1)
-	}
-	for i, xi := range x[n:] {
-		zi := xi + c
-		z[n+i] = zi
-		c = (xi &^ zi) >> (W - 1)
-		if c == 0 {
-			copy(z[n+i+1:], x[i+1:])
-			break
-		}
-	}
-	if c != 0 {
-		z[m] = c
-		m++
-	}
-	return z[:m]
-}
-
-func bitlen(x big.Word) int {
-	n := 0
-	for x > 0 {
-		x >>= 1
-		n++
-	}
-	return n
-}
-
-func (x nat) bitlen() int {
-	if i := len(x); i > 0 {
-		return (i-1)*W + bitlen(x[i-1])
-	}
-	return 0
-}
-
-func (x nat) String() string {
-	const shortLen = 10
-	s := new(big.Int).SetBits(x).String()
-	if *short && len(s) > shortLen {
-		s = s[:shortLen] + "..."
-	}
-	return s
-}
-
-func fibo(n int, half, opt bool) nat {
-	switch n {
-	case 0:
-		return nil
-	case 1:
-		return nat{1}
-	}
-	f0 := nat(nil)
-	f1 := nat{1}
-	if half {
-		if opt {
-			var f2 nat // reuse f2
-			for i := 1; i < n; i++ {
-				f2 = f2.halfAdd(f1, f0)
-				f0, f1, f2 = f1, f2, f0
-			}
-		} else {
-			for i := 1; i < n; i++ {
-				f2 := nat(nil).halfAdd(f1, f0) // allocate a new f2 each time
-				f0, f1 = f1, f2
-			}
-		}
-	} else {
-		if opt {
-			var f2 nat // reuse f2
-			for i := 1; i < n; i++ {
-				f2 = f2.add(f1, f0)
-				f0, f1, f2 = f1, f2, f0
-			}
-		} else {
-			for i := 1; i < n; i++ {
-				f2 := nat(nil).add(f1, f0) // allocate a new f2 each time
-				f0, f1 = f1, f2
-			}
-		}
-	}
-	return f1 // was f2 before shuffle
-}
-
-var tests = []struct {
-	n    int
-	want string
-}{
-	{0, "0"},
-	{1, "1"},
-	{2, "1"},
-	{3, "2"},
-	{4, "3"},
-	{5, "5"},
-	{6, "8"},
-	{7, "13"},
-	{8, "21"},
-	{9, "34"},
-	{10, "55"},
-	{100, "354224848179261915075"},
-	{1000, "43466557686937456435688527675040625802564660517371780402481729089536555417949051890403879840079255169295922593080322634775209689623239873322471161642996440906533187938298969649928516003704476137795166849228875"},
-}
-
-func test(half, opt bool) {
-	for _, test := range tests {
-		got := fibo(test.n, half, opt).String()
-		if got != test.want {
-			fmt.Printf("error: got std fibo(%d) = %s; want %s\n", test.n, got, test.want)
-			os.Exit(1)
-		}
-	}
-}
-
-func selfTest() {
-	if W != 32 && W != 64 {
-		fmt.Printf("error: unexpected wordsize %d", W)
-		os.Exit(1)
-	}
-	for i := 0; i < 4; i++ {
-		test(i&2 == 0, i&1 != 0)
-	}
-}
-
-func doFibo(n int) {
-	start := time.Now()
-	f := fibo(n, *half, *opt)
-	t := time.Since(start)
-	fmt.Printf("fibo(%d) = %s (%d bits, %s)\n", n, f, f.bitlen(), t)
-}
-
-func benchFibo(b *testing.B, n int, half, opt bool) {
-	for i := 0; i < b.N; i++ {
-		fibo(n, half, opt)
-	}
-}
-
-func doBench(half, opt bool) {
-	w := tabwriter.NewWriter(os.Stdout, 0, 8, 2, ' ', tabwriter.AlignRight)
-	fmt.Fprintf(w, "wordsize = %d, half = %v, opt = %v\n", W, half, opt)
-	fmt.Fprintf(w, "n\talloc count\talloc bytes\tns/op\ttime/op\t\n")
-	for n := 1; n <= 1e6; n *= 10 {
-		res := testing.Benchmark(func(b *testing.B) { benchFibo(b, n, half, opt) })
-		fmt.Fprintf(w, "%d\t%d\t%d\t%d\t%s\t\n", n, res.AllocsPerOp(), res.AllocedBytesPerOp(), res.NsPerOp(), time.Duration(res.NsPerOp()))
-	}
-	fmt.Fprintln(w)
-	w.Flush()
-}
-
-func main() {
-	selfTest()
-	flag.Parse()
-
-	if args := flag.Args(); len(args) > 0 {
-		// command-line use
-		fmt.Printf("half = %v, opt = %v, wordsize = %d bits\n", *half, *opt, W)
-		for _, arg := range args {
-			n, err := strconv.Atoi(arg)
-			if err != nil || n < 0 {
-				fmt.Println("invalid argument", arg)
-				continue
-			}
-			doFibo(n)
-		}
-		return
-	}
-
-	if *bench {
-		for i := 0; i < 4; i++ {
-			doBench(i&2 == 0, i&1 != 0)
-		}
-	}
-}
diff --git a/test/fixedbugs/bug369.dir/main.go b/test/fixedbugs/bug369.dir/main.go
deleted file mode 100644
index 1c9e36b..0000000
--- a/test/fixedbugs/bug369.dir/main.go
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2011 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
-	"flag"
-	"os"
-	"runtime"
-	"testing"
-
-	fast "./fast"
-	slow "./slow"
-)
-
-var buf = make([]byte, 1048576)
-
-func BenchmarkFastNonASCII(b *testing.B) {
-	for i := 0; i < b.N; i++ {
-		fast.NonASCII(buf, 0)
-	}
-}
-
-func BenchmarkSlowNonASCII(b *testing.B) {
-	for i := 0; i < b.N; i++ {
-		slow.NonASCII(buf, 0)
-	}
-}
-
-func main() {
-	os.Args = []string{os.Args[0], "-test.benchtime=100ms"}
-	flag.Parse()
-
-	rslow := testing.Benchmark(BenchmarkSlowNonASCII)
-	rfast := testing.Benchmark(BenchmarkFastNonASCII)
-	tslow := rslow.NsPerOp()
-	tfast := rfast.NsPerOp()
-
-	// Optimization should be good for at least 2x, but be forgiving.
-	// On the ARM simulator we see closer to 1.5x.
-	speedup := float64(tslow) / float64(tfast)
-	want := 1.8
-	if runtime.GOARCH == "arm" {
-		want = 1.3
-	}
-	if speedup < want {
-		// TODO(rsc): doesn't work on linux-amd64 or darwin-amd64 builders, nor on
-		// a Lenovo x200 (linux-amd64) laptop.
-		// println("fast:", tfast, "slow:", tslow, "speedup:", speedup, "want:", want)
-		// println("not fast enough")
-		// os.Exit(1)
-	}
-}
diff --git a/test/fixedbugs/bug429_run.go b/test/fixedbugs/bug429_run.go
deleted file mode 100644
index 284033d..0000000
--- a/test/fixedbugs/bug429_run.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// +build !nacl
-// run
-
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Run the bug429.go test.
-
-package main
-
-import (
-	"fmt"
-	"os"
-	"os/exec"
-	"path/filepath"
-	"strings"
-)
-
-func main() {
-	cmd := exec.Command("go", "run", filepath.Join("fixedbugs", "bug429.go"))
-	out, err := cmd.CombinedOutput()
-	if err == nil {
-		fmt.Println("expected deadlock")
-		os.Exit(1)
-	}
-
-	want := "fatal error: all goroutines are asleep - deadlock!"
-	got := string(out)
-	if !strings.Contains(got, want) {
-		fmt.Printf("got:\n%q\nshould contain:\n%q\n", got, want)
-		os.Exit(1)
-	}
-}
diff --git a/test/fixedbugs/bug492.dir/a.go b/test/fixedbugs/bug492.dir/a.go
deleted file mode 100644
index 90917e5..0000000
--- a/test/fixedbugs/bug492.dir/a.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package a
-
-type s struct {
-	s string
-}
-
-func F1(s s) {
-}
-
-func F2() s {
-	return s{""}
-}
diff --git a/test/fixedbugs/bug492.dir/b.go b/test/fixedbugs/bug492.dir/b.go
deleted file mode 100644
index 5b8c4f2..0000000
--- a/test/fixedbugs/bug492.dir/b.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import "./a"
-
-func main() {
-	defer a.F1(a.F2())
-}
diff --git a/test/fixedbugs/bug492.go b/test/fixedbugs/bug492.go
deleted file mode 100644
index 050a9e5..0000000
--- a/test/fixedbugs/bug492.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// rundir
-
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test case that gccgo failed to link.
-
-package ignored
diff --git a/test/fixedbugs/bug493.go b/test/fixedbugs/bug493.go
deleted file mode 100644
index 643e9af..0000000
--- a/test/fixedbugs/bug493.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// compile
-
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test case that gccgo failed to compile.
-
-package p
-
-func F() []string {
-	return []string{""}
-}
-
-var V = append(F())
diff --git a/test/fixedbugs/bug494.go b/test/fixedbugs/bug494.go
deleted file mode 100644
index 42f1879..0000000
--- a/test/fixedbugs/bug494.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// run
-
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Gccgo incorrectly executed functions multiple times when they
-// appeared in a composite literal that required a conversion between
-// different interface types.
-
-package main
-
-type MyInt int
-
-var c MyInt
-
-func (c *MyInt) S(i int) {
-	*c = MyInt(i)
-}
-
-func (c *MyInt) V() int {
-	return int(*c)
-}
-
-type i1 interface {
-	S(int)
-	V() int
-}
-
-type i2 interface {
-	V() int
-}
-
-type s struct {
-	i i2
-}
-
-func f() i1 {
-	c++
-	return &c
-}
-
-func main() {
-	p := &s{f()}
-	if v := p.i.V(); v != 1 {
-		panic(v)
-	}
-	if c != 1 {
-		panic(c)
-	}
-}
diff --git a/test/fixedbugs/bug495.go b/test/fixedbugs/bug495.go
deleted file mode 100644
index dfc0c9f..0000000
--- a/test/fixedbugs/bug495.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// compile
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Gccgo used to give an incorrect error
-// bug495.go:16:2: error: missing statement after label
-
-package p
-
-func F(i int) {
-	switch i {
-	case 0:
-		goto lab
-	lab:
-		fallthrough
-	case 1:
-	}
-}
diff --git a/test/fixedbugs/gcc61204.go b/test/fixedbugs/gcc61204.go
deleted file mode 100644
index 5a5bb16..0000000
--- a/test/fixedbugs/gcc61204.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// compile
-
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// PR61204: Making temporaries for zero-sized types caused an ICE in gccgo.
-// This is a reduction of a program reported by GoSmith.
-
-package main
-
-func main() {
-	type t [0]int
-	var v t
-	v, _ = [0]int{}, 0
-	_ = v
-}
diff --git a/test/fixedbugs/gcc61244.go b/test/fixedbugs/gcc61244.go
deleted file mode 100644
index 7fbc872..0000000
--- a/test/fixedbugs/gcc61244.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// compile
-
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// PR61244: Type descriptors expressions were not traversed, causing an ICE
-// in gccgo when producing the backend representation.
-// This is a reduction of a program reported by GoSmith.
-
-package main
-
-const a = 0
-
-func main() {
-	switch i := (interface{})(a); i.(type) {
-	case [0]string:
-	}
-}
diff --git a/test/fixedbugs/gcc61246.go b/test/fixedbugs/gcc61246.go
deleted file mode 100644
index 4866570..0000000
--- a/test/fixedbugs/gcc61246.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// compile
-
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// PR61246: Switch conditions could be untyped, causing an ICE when the
-// conditions were lowered into temporaries.
-// This is a reduction of a program reported by GoSmith.
-
-package main
-
-func main() {
-	switch 1 != 1 {
-	default:
-	}
-}
diff --git a/test/fixedbugs/gcc61248.go b/test/fixedbugs/gcc61248.go
deleted file mode 100644
index 593c634..0000000
--- a/test/fixedbugs/gcc61248.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// compile
-
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// PR61248: Transformations to recover calls made them fail typechecking in gccgo.
-
-package main
-
-func main() {
-	var f func(int, interface{})
-	go f(0, recover())
-}
diff --git a/test/fixedbugs/gcc61253.go b/test/fixedbugs/gcc61253.go
deleted file mode 100644
index dc125ac..0000000
--- a/test/fixedbugs/gcc61253.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// compile
-
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// PR61253: gccgo incorrectly parsed the
-// `RecvStmt = ExpressionList "=" RecvExpr` production.
-
-package main
-
-func main() {
-	c := make(chan int)
-	v := new(int)
-	b := new(bool)
-	select {
-	case (*v), (*b) = <-c:
-	}
-
-}
diff --git a/test/fixedbugs/gcc61254.go b/test/fixedbugs/gcc61254.go
deleted file mode 100644
index 36ac7d4..0000000
--- a/test/fixedbugs/gcc61254.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// compile
-
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// PR61254: gccgo failed to compile a slice expression with missing indices.
-
-package main
-
-func main() {
-	[][]int{}[:][0][0]++
-}
diff --git a/test/fixedbugs/gcc61255.go b/test/fixedbugs/gcc61255.go
deleted file mode 100644
index a0e6d18..0000000
--- a/test/fixedbugs/gcc61255.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// compile
-
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// PR61255: gccgo failed to compile IncDec statements on variadic functions.
-
-package main
-
-func main() {
-	append([]byte{}, 0)[0]++
-}
diff --git a/test/fixedbugs/gcc61258.go b/test/fixedbugs/gcc61258.go
deleted file mode 100644
index 8474665..0000000
--- a/test/fixedbugs/gcc61258.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// run
-
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// PR61258: gccgo crashed when deleting a zero-sized key from a map.
-
-package main
-
-func main() {
-	delete(make(map[[0]bool]int), [0]bool{})
-}
diff --git a/test/fixedbugs/gcc61264.go b/test/fixedbugs/gcc61264.go
deleted file mode 100644
index d4e05f4..0000000
--- a/test/fixedbugs/gcc61264.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// compile
-
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// PR61264: IncDec statements involving composite literals caused in ICE in gccgo.
-
-package main
-
-func main() {
-        map[int]int{}[0]++
-}
diff --git a/test/fixedbugs/gcc61265.go b/test/fixedbugs/gcc61265.go
deleted file mode 100644
index 42fae36..0000000
--- a/test/fixedbugs/gcc61265.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// compile
-
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// PR61265: The gccgo middle-end failed to represent array composite literals
-// where the elements are zero-sized values.
-// This is a reduction of a program reported by GoSmith.
-
-package p
-
-var a = [1][0]int{B}[0]
-var B = [0]int{}
-var c = [1]struct{}{D}[0]
-var D = struct{}{}
diff --git a/test/fixedbugs/gcc61273.go b/test/fixedbugs/gcc61273.go
deleted file mode 100644
index 2983222..0000000
--- a/test/fixedbugs/gcc61273.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// compile
-
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// PR61273: gccgo failed to compile a SendStmt in the PostStmt of a ForClause
-// that involved predefined constants.
-
-package main
-
-func main() {
-	c := make(chan bool, 1)
-	for ; false; c <- false {
-	}
-}
diff --git a/test/fixedbugs/gcc65755.go b/test/fixedbugs/gcc65755.go
deleted file mode 100644
index e76f4d1..0000000
--- a/test/fixedbugs/gcc65755.go
+++ /dev/null
@@ -1,37 +0,0 @@
-// run
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// PR65755: Incorrect type descriptor for type defined within method.
-
-package main
-
-import "reflect"
-
-type S1 struct{}
-
-func (S1) Fix() string {
-	type s struct {
-		f int
-	}
-	return reflect.TypeOf(s{}).Field(0).Name
-}
-
-type S2 struct{}
-
-func (S2) Fix() string {
-	type s struct {
-		g bool
-	}
-	return reflect.TypeOf(s{}).Field(0).Name
-}
-
-func main() {
-	f1 := S1{}.Fix()
-	f2 := S2{}.Fix()
-	if f1 != "f" || f2 != "g" {
-		panic(f1 + f2)
-	}
-}
diff --git a/test/fixedbugs/issue10047.go b/test/fixedbugs/issue10047.go
deleted file mode 100644
index 1cb9c24..0000000
--- a/test/fixedbugs/issue10047.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// compile
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Issue 10047: gccgo failed to compile a type switch where the switch variable
-// and the base type of a case share the same identifier.
-
-package main
-
-func main() {
-	type t int
-	var p interface{}
-	switch t := p.(type) {
-	case t:
-		_ = t
-	}
-}
diff --git a/test/fixedbugs/issue10066.dir/a.go b/test/fixedbugs/issue10066.dir/a.go
deleted file mode 100644
index 8bb3b30..0000000
--- a/test/fixedbugs/issue10066.dir/a.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package a
-
-import "log"
-
-func Do() {
-	Do2()
-}
-
-func Do2() {
-	println(log.Ldate | log.Ltime | log.Lshortfile)
-}
diff --git a/test/fixedbugs/issue10066.dir/b.go b/test/fixedbugs/issue10066.dir/b.go
deleted file mode 100644
index 46d2f55..0000000
--- a/test/fixedbugs/issue10066.dir/b.go
+++ /dev/null
@@ -1,7 +0,0 @@
-package b
-
-import "./a"
-
-func test() {
-	a.Do()
-}
diff --git a/test/fixedbugs/issue10066.go b/test/fixedbugs/issue10066.go
deleted file mode 100644
index 3ea552f..0000000
--- a/test/fixedbugs/issue10066.go
+++ /dev/null
@@ -1,10 +0,0 @@
-// compiledir
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Issue 10066: constants are printed in the original form
-// in export data. This is the opposite of issue 9076.
-
-package ignored
diff --git a/test/fixedbugs/issue10135.go b/test/fixedbugs/issue10135.go
deleted file mode 100644
index 9985e5a..0000000
--- a/test/fixedbugs/issue10135.go
+++ /dev/null
@@ -1,25 +0,0 @@
-// run
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Issue 10135: append a slice with zero-sized element used
-// to always return a slice with the same data pointer as the
-// old slice, even if it's nil, so this program used to panic
-// with nil pointer dereference because after append, s is a
-// slice with nil data pointer but non-zero len and cap.
-
-package main
-
-type empty struct{}
-
-func main() {
-	var s []empty
-
-	s = append(s, empty{})
-
-	for _, v := range s {
-		_ = v
-	}
-}
diff --git a/test/fixedbugs/issue10219.dir/a.go b/test/fixedbugs/issue10219.dir/a.go
deleted file mode 100644
index c61d02b..0000000
--- a/test/fixedbugs/issue10219.dir/a.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package a
-
-type m struct {
-	S string
-}
-
-var g = struct {
-	m
-	P string
-}{
-	m{"a"},
-	"",
-}
-
-type S struct{}
-
-func (s *S) M(p string) {
-	r := g
-	r.P = p
-}
diff --git a/test/fixedbugs/issue10219.dir/b.go b/test/fixedbugs/issue10219.dir/b.go
deleted file mode 100644
index 09d8911..0000000
--- a/test/fixedbugs/issue10219.dir/b.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package b
-
-import "./a"
-
-func F() *a.S {
-	return &a.S{}
-}
diff --git a/test/fixedbugs/issue10219.dir/c.go b/test/fixedbugs/issue10219.dir/c.go
deleted file mode 100644
index d331495..0000000
--- a/test/fixedbugs/issue10219.dir/c.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package c
-
-import "./b"
-
-func F() {
-	s := b.F()
-	s.M("c")
-}
diff --git a/test/fixedbugs/issue10219.go b/test/fixedbugs/issue10219.go
deleted file mode 100644
index 325818c..0000000
--- a/test/fixedbugs/issue10219.go
+++ /dev/null
@@ -1,10 +0,0 @@
-// compiledir
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Issue 10219: failure of inlinable function that uses embedded types
-// in an anonymous struct via :=.
-
-package ignored
diff --git a/test/fixedbugs/issue10253.go b/test/fixedbugs/issue10253.go
deleted file mode 100644
index fafca6c..0000000
--- a/test/fixedbugs/issue10253.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// run
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// issue 10253: cmd/7g: bad codegen, probably regopt related
-
-package main
-
-func main() {
-	if !eq() {
-		panic("wrong value")
-	}
-}
-
-var text = "abc"
-var s = &str{text}
-
-func eq() bool {
-	return text[0] == s.text[0]
-}
-
-type str struct {
-	text string
-}
diff --git a/test/fixedbugs/issue10284.go b/test/fixedbugs/issue10284.go
deleted file mode 100644
index e89d6f4..0000000
--- a/test/fixedbugs/issue10284.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// compile
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Issue 10284: gccgo failed to allow converting a user-defined
-// type whose underlying type is uintptr to unsafe.Pointer.
-
-package p
-
-import "unsafe"
-
-type T uintptr
-
-var _ unsafe.Pointer = unsafe.Pointer(T(0))
diff --git a/test/fixedbugs/issue10320.go b/test/fixedbugs/issue10320.go
deleted file mode 100644
index 697aad1..0000000
--- a/test/fixedbugs/issue10320.go
+++ /dev/null
@@ -1,55 +0,0 @@
-// run
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Issue 10320: 7g failed to compile a program because it attempted
-// to use ZR as register. Other programs compiled but failed to
-// execute correctly because they clobbered the g register.
-
-package main
-
-func main() {
-	var x00, x01, x02, x03, x04, x05, x06, x07, x08, x09 int
-	var x10, x11, x12, x13, x14, x15, x16, x17, x18, x19 int
-	var x20, x21, x22, x23, x24, x25, x26, x27, x28, x29 int
-	var x30, x31, x32 int
-
-	_ = x00
-	_ = x01
-	_ = x02
-	_ = x03
-	_ = x04
-	_ = x05
-	_ = x06
-	_ = x07
-	_ = x08
-	_ = x09
-
-	_ = x10
-	_ = x11
-	_ = x12
-	_ = x13
-	_ = x14
-	_ = x15
-	_ = x16
-	_ = x17
-	_ = x18
-	_ = x19
-
-	_ = x20
-	_ = x21
-	_ = x22
-	_ = x23
-	_ = x24
-	_ = x25
-	_ = x26
-	_ = x27
-	_ = x28
-	_ = x29
-
-	_ = x30
-	_ = x31
-	_ = x32
-}
diff --git a/test/fixedbugs/issue10332.go b/test/fixedbugs/issue10332.go
deleted file mode 100644
index e00a8b4..0000000
--- a/test/fixedbugs/issue10332.go
+++ /dev/null
@@ -1,25 +0,0 @@
-// run
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// The PkgPath of unexported fields of types defined in package main was incorrectly ""
-
-package main
-
-import (
-	"fmt"
-	"reflect"
-)
-
-type foo struct {
-	bar int
-}
-
-func main() {
-	pkgpath := reflect.ValueOf(foo{}).Type().Field(0).PkgPath
-	if pkgpath != "main" {
-		fmt.Printf("BUG: incorrect PkgPath: %v", pkgpath)
-	}
-}
diff --git a/test/fixedbugs/issue10353.go b/test/fixedbugs/issue10353.go
deleted file mode 100644
index 87771d4..0000000
--- a/test/fixedbugs/issue10353.go
+++ /dev/null
@@ -1,49 +0,0 @@
-// run
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// issue 10253: cmd/gc: incorrect escape analysis of closures
-// Partial call x.foo was not promoted to heap.
-
-package main
-
-func main() {
-	c := make(chan bool)
-	// Create a new goroutine to get a default-size stack segment.
-	go func() {
-		x := new(X)
-		clos(x.foo)()
-		c <- true
-	}()
-	<-c
-}
-
-type X int
-
-func (x *X) foo() {
-}
-
-func clos(x func()) func() {
-	f := func() {
-		print("")
-		x() // This statement crashed, because the partial call was allocated on the old stack.
-	}
-	// Grow stack so that partial call x becomes invalid if allocated on stack.
-	growstack(10000)
-	c := make(chan bool)
-	// Spoil the previous stack segment.
-	go func() {
-		c <- true
-	}()
-	<-c
-	return f
-}
-
-func growstack(x int) {
-	if x == 0 {
-		return
-	}
-	growstack(x - 1)
-}
diff --git a/test/fixedbugs/issue10407.go b/test/fixedbugs/issue10407.go
deleted file mode 100644
index fe033ef..0000000
--- a/test/fixedbugs/issue10407.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// runoutput
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Issue 10407: gccgo failed to remove carriage returns
-// from raw string literals.
-
-package main
-
-import "fmt"
-
-func main() {
-	fmt.Println("package main\nfunc main() { if `a\rb\r\nc` != \"ab\\nc\" { panic(42) }}")
-}
diff --git a/test/fixedbugs/issue10441.go b/test/fixedbugs/issue10441.go
deleted file mode 100644
index 25832fa..0000000
--- a/test/fixedbugs/issue10441.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// build
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package p
-
-func bar() {
-	f := func() {}
-	foo(&f)
-}
-
-func foo(f *func()) func() {
-	defer func() {}() // prevent inlining of foo
-	return *f
-}
diff --git a/test/fixedbugs/issue10486.go b/test/fixedbugs/issue10486.go
deleted file mode 100644
index f346828..0000000
--- a/test/fixedbugs/issue10486.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// run
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Issue 10486.
-// Check stack walk during div by zero fault,
-// especially on software divide systems.
-
-package main
-
-import "runtime"
-
-var A, B int
-
-func divZero() int {
-	defer func() {
-		if p := recover(); p != nil {
-			var pcs [512]uintptr
-			runtime.Callers(2, pcs[:])
-			runtime.GC()
-		}
-	}()
-	return A / B
-}
-
-func main() {
-	A = 1
-	divZero()
-}
diff --git a/test/fixedbugs/issue10607.go b/test/fixedbugs/issue10607.go
deleted file mode 100644
index bf527d0..0000000
--- a/test/fixedbugs/issue10607.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// +build linux,!ppc64,!ppc64le
-// run
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test that a -B option is passed through when using both internal
-// and external linking mode.
-
-package main
-
-import (
-	"fmt"
-	"os"
-	"os/exec"
-	"path/filepath"
-)
-
-func main() {
-	test("internal")
-	test("external")
-}
-
-func test(linkmode string) {
-	out, err := exec.Command("go", "run", "-ldflags", "-B=0x12345678 -linkmode="+linkmode, filepath.Join("fixedbugs", "issue10607a.go")).CombinedOutput()
-	if err != nil {
-		fmt.Printf("BUG: linkmode=%s %v\n%s\n", linkmode, err, out)
-		os.Exit(1)
-	}
-}
diff --git a/test/fixedbugs/issue10607a.go b/test/fixedbugs/issue10607a.go
deleted file mode 100644
index 18bf1a2..0000000
--- a/test/fixedbugs/issue10607a.go
+++ /dev/null
@@ -1,81 +0,0 @@
-// skip
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This is built by issue10607.go with a -B option.
-// Verify that we have one build-id note with the expected value.
-
-package main
-
-import (
-	"bytes"
-	"debug/elf"
-	"fmt"
-	"os"
-)
-
-func main() {
-	f, err := elf.Open("/proc/self/exe")
-	if err != nil {
-		if os.IsNotExist(err) {
-			return
-		}
-		fmt.Fprintln(os.Stderr, "opening /proc/self/exe:", err)
-		os.Exit(1)
-	}
-
-	c := 0
-	fail := false
-	for i, s := range f.Sections {
-		if s.Type != elf.SHT_NOTE {
-			continue
-		}
-
-		d, err := s.Data()
-		if err != nil {
-			fmt.Fprintln(os.Stderr, "reading data of note section %d: %v", i, err)
-			continue
-		}
-
-		for len(d) > 0 {
-			namesz := f.ByteOrder.Uint32(d)
-			descsz := f.ByteOrder.Uint32(d[4:])
-			typ := f.ByteOrder.Uint32(d[8:])
-
-			an := (namesz + 3) &^ 3
-			ad := (descsz + 3) &^ 3
-
-			if int(12+an+ad) > len(d) {
-				fmt.Fprintf(os.Stderr, "note section %d too short for header (%d < 12 + align(%d,4) + align(%d,4))\n", i, len(d), namesz, descsz)
-				break
-			}
-
-			// 3 == NT_GNU_BUILD_ID
-			if typ == 3 && namesz == 4 && bytes.Equal(d[12:16], []byte("GNU\000")) {
-				id := string(d[12+an:12+an+descsz])
-				if id == "\x12\x34\x56\x78" {
-					c++
-				} else {
-					fmt.Fprintf(os.Stderr, "wrong build ID data: %q\n", id)
-					fail = true
-				}
-			}
-
-			d = d[12+an+ad:]
-		}
-	}
-
-	if c == 0 {
-		fmt.Fprintln(os.Stderr, "no build-id note")
-		fail = true
-	} else if c > 1 {
-		fmt.Fprintln(os.Stderr, c, "build-id notes")
-		fail = true
-	}
-
-	if fail {
-		os.Exit(1)
-	}
-}
diff --git a/test/fixedbugs/issue10654.go b/test/fixedbugs/issue10654.go
deleted file mode 100644
index 0600a80..0000000
--- a/test/fixedbugs/issue10654.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// compile
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Issue 10654: Failure to use generated temps
-// for function calls etc. in boolean codegen.
-
-package main
-
-var s string
-
-func main() {
-	if (s == "this") != (s == "that") {
-	}
-}
diff --git a/test/fixedbugs/issue10700.dir/other.go b/test/fixedbugs/issue10700.dir/other.go
deleted file mode 100644
index 12908b9..0000000
--- a/test/fixedbugs/issue10700.dir/other.go
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package other
-
-type Exported interface {
-	Do()
-	secret()
-}
diff --git a/test/fixedbugs/issue10700.dir/test.go b/test/fixedbugs/issue10700.dir/test.go
deleted file mode 100644
index 2033efc..0000000
--- a/test/fixedbugs/issue10700.dir/test.go
+++ /dev/null
@@ -1,49 +0,0 @@
-// errorcheck -0 -m -l
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import "./other"
-
-type Imported interface {
-	Do()
-}
-
-type HasAMethod struct {
-	x int
-}
-
-func (me *HasAMethod) Do() {
-	println(me.x)
-}
-
-func InMyCode(x *Imported, y *HasAMethod, z *other.Exported) {
-	x.Do() // ERROR "x\.Do undefined \(type \*Imported is pointer to interface, not interface\)"
-	x.do() // ERROR "x\.do undefined \(type \*Imported is pointer to interface, not interface\)"
-	(*x).Do()
-	x.Dont()    // ERROR "x\.Dont undefined \(type \*Imported is pointer to interface, not interface\)"
-	(*x).Dont() // ERROR "\(\*x\)\.Dont undefined \(type Imported has no field or method Dont\)"
-
-	y.Do()
-	y.do() // ERROR "y\.do undefined \(type \*HasAMethod has no field or method do, but does have Do\)"
-	(*y).Do()
-	(*y).do()   // ERROR "\(\*y\)\.do undefined \(type HasAMethod has no field or method do, but does have Do\)"
-	y.Dont()    // ERROR "y\.Dont undefined \(type \*HasAMethod has no field or method Dont\)"
-	(*y).Dont() // ERROR "\(\*y\)\.Dont undefined \(type HasAMethod has no field or method Dont\)"
-
-	z.Do() // ERROR "z\.Do undefined \(type \*other\.Exported is pointer to interface, not interface\)"
-	z.do() // ERROR "z\.do undefined \(type \*other\.Exported is pointer to interface, not interface\)"
-	(*z).Do()
-	(*z).do()     // ERROR "\(\*z\)\.do undefined \(type other.Exported has no field or method do, but does have Do\)"
-	z.Dont()      // ERROR "z\.Dont undefined \(type \*other\.Exported is pointer to interface, not interface\)"
-	(*z).Dont()   // ERROR "\(\*z\)\.Dont undefined \(type other\.Exported has no field or method Dont\)"
-	z.secret()    // ERROR "z\.secret undefined \(type \*other\.Exported is pointer to interface, not interface\)"
-	(*z).secret() // ERROR "\(\*z\)\.secret undefined \(cannot refer to unexported field or method secret\)"
-
-}
-
-func main() {
-}
diff --git a/test/fixedbugs/issue10700.go b/test/fixedbugs/issue10700.go
deleted file mode 100644
index 25544ef..0000000
--- a/test/fixedbugs/issue10700.go
+++ /dev/null
@@ -1,7 +0,0 @@
-// errorcheckdir
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package ignored
diff --git a/test/fixedbugs/issue10925.go b/test/fixedbugs/issue10925.go
deleted file mode 100644
index 30add82..0000000
--- a/test/fixedbugs/issue10925.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// run
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import "fmt"
-
-func prototype(xyz []string) {}
-func main() {
-	var got [][]string
-	f := prototype
-	f = func(ss []string) { got = append(got, ss) }
-	for _, s := range []string{"one", "two", "three"} {
-		f([]string{s})
-	}
-	if got[0][0] != "one" || got[1][0] != "two" || got[2][0] != "three" {
-		// Bug's wrong output was [[three] [three] [three]]
-		fmt.Println("Expected [[one] [two] [three]], got", got)
-	}
-}
diff --git a/test/fixedbugs/issue10977.go b/test/fixedbugs/issue10977.go
deleted file mode 100644
index 0b18c70..0000000
--- a/test/fixedbugs/issue10977.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// compile
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package p
-
-type T struct{}
-
-var (
-	t = T{}
-	u = t.New()
-)
-
-func x(T) (int, int) { return 0, 0 }
-
-var _, _ = x(u)
-
-func (T) New() T { return T{} }
diff --git a/test/fixedbugs/issue11053.dir/p.go b/test/fixedbugs/issue11053.dir/p.go
deleted file mode 100644
index e431cb4..0000000
--- a/test/fixedbugs/issue11053.dir/p.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package p
-
-func Int32(i int32) *int32 {
-	return &i
-}
diff --git a/test/fixedbugs/issue11053.dir/p_test.go b/test/fixedbugs/issue11053.dir/p_test.go
deleted file mode 100644
index e0a9555..0000000
--- a/test/fixedbugs/issue11053.dir/p_test.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
-	"fmt"
-	"p"
-)
-
-type I interface {
-	Add(out *P)
-}
-
-type P struct {
-	V *int32
-}
-
-type T struct{}
-
-var x int32 = 42
-
-func Int32x(i int32) *int32 {
-	return &i
-}
-
-func (T) Add(out *P) {
-	out.V = p.Int32(x) // inlined, p.i.2 moved to heap
-}
-
-var PP P
-var out *P = &PP
-
-func F(s I) interface{} {
-	s.Add(out) // not inlined.
-	return out
-}
-
-var s T
-
-func main() {
-	println("Starting")
-	fmt.Sprint(new(int32))
-	resp := F(s).(*P)
-	println("Before, *resp.V=", *resp.V) // Trashes *resp.V in process of printing.
-	println("After,  *resp.V=", *resp.V)
-	if got, want := *resp.V, int32(42); got != want {
-		fmt.Printf("FAIL, got %v, want %v", got, want)
-	}
-}
diff --git a/test/fixedbugs/issue11053.go b/test/fixedbugs/issue11053.go
deleted file mode 100644
index 06005d3..0000000
--- a/test/fixedbugs/issue11053.go
+++ /dev/null
@@ -1,10 +0,0 @@
-// rundir
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Issue 11053: Compiler does not run escape analysis on an inlined
-// generated method wrapper.
-
-package ignored
diff --git a/test/fixedbugs/issue11053.out b/test/fixedbugs/issue11053.out
deleted file mode 100644
index a75f73c..0000000
--- a/test/fixedbugs/issue11053.out
+++ /dev/null
@@ -1,3 +0,0 @@
-Starting
-Before, *resp.V= 42
-After,  *resp.V= 42
diff --git a/test/fixedbugs/issue11256.go b/test/fixedbugs/issue11256.go
deleted file mode 100644
index 69fc3e8..0000000
--- a/test/fixedbugs/issue11256.go
+++ /dev/null
@@ -1,53 +0,0 @@
-// run
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test that stack barriers are reset when a goroutine exits without
-// returning.
-
-package main
-
-import (
-	"runtime"
-	"sync/atomic"
-	"time"
-)
-
-func main() {
-	// Let the garbage collector run concurrently.
-	runtime.GOMAXPROCS(2)
-
-	var x [100][]byte
-
-	for i := range x {
-		var done int32
-
-		go func() {
-			// Use enough stack to get stack barriers, but
-			// not so much that we go over _FixedStack.
-			// There's a very narrow window here on most
-			// OSs, so we basically can't do anything (not
-			// even a time.Sleep or a channel).
-			var buf [1024]byte
-			buf[0]++
-			for atomic.LoadInt32(&done) == 0 {
-				runtime.Gosched()
-			}
-			atomic.StoreInt32(&done, 0)
-			// Exit without unwinding stack barriers.
-			runtime.Goexit()
-		}()
-
-		// Generate some garbage.
-		x[i] = make([]byte, 1024*1024)
-
-		// Give GC some time to install stack barriers in the G.
-		time.Sleep(50 * time.Microsecond)
-		atomic.StoreInt32(&done, 1)
-		for atomic.LoadInt32(&done) == 1 {
-			runtime.Gosched()
-		}
-	}
-}
diff --git a/test/fixedbugs/issue11286.go b/test/fixedbugs/issue11286.go
deleted file mode 100644
index 560b7d4..0000000
--- a/test/fixedbugs/issue11286.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// run
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test that pointer bitmaps of types with large scalar tails are
-// correctly repeated when unrolled into the heap bitmap.
-
-package main
-
-import "runtime"
-
-const D = 57
-
-type T struct {
-	a [D]float64
-	b map[string]int
-	c [D]float64
-}
-
-var ts []T
-
-func main() {
-	ts = make([]T, 4)
-	for i := range ts {
-		ts[i].b = make(map[string]int)
-	}
-	ts[3].b["abc"] = 42
-	runtime.GC()
-	if ts[3].b["abc"] != 42 {
-		panic("bad field value")
-	}
-}
diff --git a/test/fixedbugs/issue11326.go b/test/fixedbugs/issue11326.go
deleted file mode 100644
index fd1fab3..0000000
--- a/test/fixedbugs/issue11326.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// errorcheck
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import "fmt"
-
-func main() {
-	var g = 1e81391777742999 // ERROR "exponent too large"
-	// The next should only cause a problem when converted to float64
-	// by the assignment, but instead the compiler rejects it outright,
-	// rather than mishandle it. Specifically, when handled, 'var h' prints:
-	//	issue11326.go:N: constant 0.93342e+536870911 overflows float64
-	// The rejection of 'var i' is just insurance. It seems to work correctly.
-	// See golang.org/issue/11326.
-	// var h = 1e2147483647     // should be "1.00000e+2147483647 overflows float64"
-	var h = 1e2147483647 // ERROR "exponent too large"
-	// var i = 1e214748364  // should be "1.00000e\+214748364 overflows float64"
-	var i = 1e214748364 // ERROR "exponent too large"
-	var j = 1e21474836  // ERROR "1.00000e\+21474836 overflows float64"
-	var k = 1e2147483   // ERROR "1.00000e\+2147483 overflows float64"
-	var l = 1e214748    // ERROR "1.00000e\+214748 overflows float64"
-	var m = 1e21474     // ERROR "1.00000e\+21474 overflows float64"
-	fmt.Println(g)
-}
diff --git a/test/fixedbugs/issue11326b.go b/test/fixedbugs/issue11326b.go
deleted file mode 100644
index 00effbc..0000000
--- a/test/fixedbugs/issue11326b.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// run
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-func main() {
-	/* TODO(rsc): Should work but does not. See golang.org/issue/11326.
-	{
-		const n = 1e2147483647
-		const d = 1e2147483646
-		x := n / d
-		if x != 10.0 {
-			println("incorrect value:", x)
-		}
-	}
-	{
-		const n = 1e214748364
-		const d = 1e214748363
-		x := n / d
-		if x != 10.0 {
-			println("incorrect value:", x)
-		}
-	}
-	*/
-	{
-		const n = 1e21474836
-		const d = 1e21474835
-		x := n / d
-		if x != 10.0 {
-			println("incorrect value:", x)
-		}
-	}
-	{
-		const n = 1e2147483
-		const d = 1e2147482
-		x := n / d
-		if x != 10.0 {
-			println("incorrect value:", x)
-		}
-	}
-}
diff --git a/test/fixedbugs/issue11369.go b/test/fixedbugs/issue11369.go
deleted file mode 100644
index 9df37c3..0000000
--- a/test/fixedbugs/issue11369.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// run
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test that the half multiply resulting from a division
-// by a constant generates correct code.
-
-package main
-
-func main() {
-	var _ = 7 / "0"[0] // test case from #11369
-	var _ = 1 / "."[0] // test case from #11358
-	var x = 0 / "0"[0]
-	var y = 48 / "0"[0]
-	var z = 5 * 48 / "0"[0]
-	if x != 0 {
-		panic("expected 0")
-	}
-	if y != 1 {
-		panic("expected 1")
-	}
-	if z != 5 {
-		panic("expected 5")
-	}
-}
diff --git a/test/fixedbugs/issue11656.go b/test/fixedbugs/issue11656.go
deleted file mode 100644
index 90385bb..0000000
--- a/test/fixedbugs/issue11656.go
+++ /dev/null
@@ -1,62 +0,0 @@
-// run
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// darwin/386 seems to mangle the PC and SP before
-// it manages to invoke the signal handler, so this test fails there.
-// +build !darwin !386
-//
-// openbsd/386 and netbsd/386 don't work, not sure why.
-// +build !openbsd !386
-// +build !netbsd !386
-//
-// windows doesn't work, because Windows exception handling
-// delivers signals based on the current PC, and that current PC
-// doesn't go into the Go runtime.
-// +build !windows
-//
-// arm64 gets "illegal instruction" (why is the data executable?)
-// and is unable to do the traceback correctly (why?).
-// +build !arm64
-
-package main
-
-import (
-	"runtime"
-	"runtime/debug"
-	"unsafe"
-)
-
-func main() {
-	debug.SetPanicOnFault(true)
-	defer func() {
-		if err := recover(); err == nil {
-			panic("not panicking")
-		}
-		pc, _, _, _ := runtime.Caller(10)
-		f := runtime.FuncForPC(pc)
-		if f == nil || f.Name() != "main.f" {
-			if f == nil {
-				println("no func for ", unsafe.Pointer(pc))
-			} else {
-				println("found func:", f.Name())
-			}
-			panic("cannot find main.f on stack")
-		}
-	}()
-	f(20)
-}
-
-func f(n int) {
-	if n > 0 {
-		f(n - 1)
-	}
-	var f struct {
-		x uintptr
-	}
-	f.x = uintptr(unsafe.Pointer(&f))
-	fn := *(*func())(unsafe.Pointer(&f))
-	fn()
-}
diff --git a/test/fixedbugs/issue11750.go b/test/fixedbugs/issue11750.go
deleted file mode 100644
index 5e6fe60..0000000
--- a/test/fixedbugs/issue11750.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// compile
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Issue 11750: mkdotargslice: typecheck failed
-
-package main
-
-func main() {
-	fn := func(names string) {
-
-	}
-	func(names ...string) {
-		for _, name := range names {
-			fn(name)
-		}
-	}("one", "two")
-}
diff --git a/test/fixedbugs/issue11771.go b/test/fixedbugs/issue11771.go
deleted file mode 100644
index 7691ca6..0000000
--- a/test/fixedbugs/issue11771.go
+++ /dev/null
@@ -1,64 +0,0 @@
-// +build !nacl
-// run
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Issue 11771: Magic comments should ignore carriage returns.
-
-package main
-
-import (
-	"bytes"
-	"fmt"
-	"io/ioutil"
-	"log"
-	"os"
-	"os/exec"
-	"path/filepath"
-	"runtime"
-)
-
-func main() {
-	if runtime.Compiler != "gc" {
-		return
-	}
-
-	dir, err := ioutil.TempDir("", "go-issue11771")
-	if err != nil {
-		log.Fatalf("creating temp dir: %v\n", err)
-	}
-	defer os.RemoveAll(dir)
-
-	// The go:nowritebarrier magic comment is only permitted in
-	// the runtime package.  So we confirm that the compilation
-	// fails.
-
-	var buf bytes.Buffer
-	fmt.Fprintln(&buf, `
-package main
-
-func main() {
-}
-`)
-	fmt.Fprintln(&buf, "//go:nowritebarrier\r")
-	fmt.Fprintln(&buf, `
-func x() {
-}
-`)
-
-	if err := ioutil.WriteFile(filepath.Join(dir, "x.go"), buf.Bytes(), 0666); err != nil {
-		log.Fatal(err)
-	}
-
-	cmd := exec.Command("go", "tool", "compile", "x.go")
-	cmd.Dir = dir
-	output, err := cmd.CombinedOutput()
-	if err == nil {
-		log.Fatal("compile succeeded unexpectedly")
-	}
-	if !bytes.Contains(output, []byte("only allowed in runtime")) {
-		log.Fatalf("wrong error message from compiler; got:\n%s\n", output)
-	}
-}
diff --git a/test/fixedbugs/issue11790.go b/test/fixedbugs/issue11790.go
deleted file mode 100644
index d7669f8..0000000
--- a/test/fixedbugs/issue11790.go
+++ /dev/null
@@ -1,36 +0,0 @@
-// compile
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Issue 11790: Incorrect error following named pointer dereference on field
-
-package main
-
-import "fmt"
-
-type T0 struct {
-	x int
-}
-
-func (*T0) M0() {
-	fmt.Println("M0")
-}
-
-type T2 struct {
-	*T0
-}
-
-type Q *T2
-
-func main() {
-	// If run, expected output is
-	// 42
-	// M0
-	t0 := T0{42}
-	t2 := T2{&t0}
-	var q Q = &t2
-	fmt.Println(q.x) // Comment out either this line or the next line and the program works
-	(*q).T0.M0()
-}
diff --git a/test/fixedbugs/issue12133.go b/test/fixedbugs/issue12133.go
deleted file mode 100644
index 0b66c56..0000000
--- a/test/fixedbugs/issue12133.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// run
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Issue 12133.  The CX register was getting clobbered
-// because we did not keep track of its allocation correctly.
-
-package main
-
-import "fmt"
-
-func main() {
-	want := uint(48)
-	got := f1(48)
-	if got != want {
-		fmt.Println("got", got, ", wanted", want)
-		panic("bad")
-	}
-}
-func f1(v1 uint) uint {
-	switch {
-	} // prevent inlining
-	return v1 >> ((1 >> v1) + (1 >> v1))
-}
diff --git a/test/fixedbugs/issue4365.go b/test/fixedbugs/issue4365.go
deleted file mode 100644
index 04d31f7..0000000
--- a/test/fixedbugs/issue4365.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// errorcheck
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test that fields hide promoted methods.
-// https://golang.org/issue/4365
-
-package main
-
-type T interface {
-        M()
-}
-
-type M struct{}
-
-func (M) M() {}
-
-type Foo struct {
-        M
-}
-
-func main() {
-        var v T = Foo{} // ERROR "has no methods|not a method|cannot use"
-        _ = v
-}
diff --git a/test/fixedbugs/issue5373.go b/test/fixedbugs/issue5373.go
deleted file mode 100644
index 17ce189..0000000
--- a/test/fixedbugs/issue5373.go
+++ /dev/null
@@ -1,71 +0,0 @@
-// run
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Ensure that zeroing range loops have the requisite side-effects.
-
-package main
-
-import (
-	"fmt"
-	"os"
-)
-
-func check(n int) {
-	// When n == 0, i is untouched by the range loop.
-	// Picking an initial value of -1 for i makes the
-	// "want" calculation below correct in all cases.
-	i := -1
-	s := make([]byte, n)
-	for i = range s {
-		s[i] = 0
-	}
-	if want := n - 1; i != want {
-		fmt.Printf("index after range with side-effect = %d want %d\n", i, want)
-		os.Exit(1)
-	}
-
-	i = n + 1
-	// i is shadowed here, so its value should be unchanged.
-	for i := range s {
-		s[i] = 0
-	}
-	if want := n + 1; i != want {
-		fmt.Printf("index after range without side-effect = %d want %d\n", i, want)
-		os.Exit(1)
-	}
-
-	// Index variable whose evaluation has side-effects
-	var x int
-	f := func() int {
-		x++
-		return 0
-	}
-	var a [1]int
-	for a[f()] = range s {
-		s[a[f()]] = 0
-	}
-	if want := n * 2; x != want {
-		fmt.Printf("index function calls = %d want %d\n", x, want)
-		os.Exit(1)
-	}
-
-	// Range expression whose evaluation has side-effects
-	x = 0
-	b := [1][]byte{s}
-	for i := range b[f()] {
-		b[f()][i] = 0
-	}
-	if want := n + 1; x != n+1 {
-		fmt.Printf("range expr function calls = %d want %d\n", x, want)
-		os.Exit(1)
-	}
-}
-
-func main() {
-	check(0)
-	check(1)
-	check(15)
-}
diff --git a/test/fixedbugs/issue6671.go b/test/fixedbugs/issue6671.go
deleted file mode 100644
index b88faa4..0000000
--- a/test/fixedbugs/issue6671.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// errorcheck
-
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Issue 6671: Logical operators should produce untyped bool for untyped operands.
-
-package p
-
-type mybool bool
-
-func _(x, y int) {
-	type mybool bool
-	var b mybool
-	_ = b
-	b = bool(true)             // ERROR "cannot use"
-	b = true                   // permitted as expected
-	b = bool(true) && true     // ERROR "cannot use"
-	b = true && true           // permitted => && returns an untyped bool
-	b = x < y                  // permitted => x < y returns an untyped bool
-	b = true && x < y          // permitted => result of && returns untyped bool
-	b = x < y && x < y         // permitted => result of && returns untyped bool
-	b = x < y || x < y         // permitted => result of || returns untyped bool
-	var c bool = true && x < y // permitted => result of && is bool
-	c = false || x < y         // permitted => result of || returns untyped bool
-	_ = c
-}
diff --git a/test/fixedbugs/issue6866.go b/test/fixedbugs/issue6866.go
deleted file mode 100644
index 1080b27..0000000
--- a/test/fixedbugs/issue6866.go
+++ /dev/null
@@ -1,80 +0,0 @@
-// run
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// WARNING: GENERATED FILE - DO NOT MODIFY MANUALLY!
-// (To generate, in go/types directory: go test -run=Hilbert -H=2 -out="h2.src")
-
-// This program tests arbitrary precision constant arithmetic
-// by generating the constant elements of a Hilbert matrix H,
-// its inverse I, and the product P = H*I. The product should
-// be the identity matrix.
-package main
-
-func main() {
-	if !ok {
-		print()
-		return
-	}
-}
-
-// Hilbert matrix, n = 2
-const (
-	h0_0, h0_1 = 1.0 / (iota + 1), 1.0 / (iota + 2)
-	h1_0, h1_1
-)
-
-// Inverse Hilbert matrix
-const (
-	i0_0 = +1 * b2_1 * b2_1 * b0_0 * b0_0
-	i0_1 = -2 * b2_0 * b3_1 * b1_0 * b1_0
-
-	i1_0 = -2 * b3_1 * b2_0 * b1_1 * b1_1
-	i1_1 = +3 * b3_0 * b3_0 * b2_1 * b2_1
-)
-
-// Product matrix
-const (
-	p0_0 = h0_0*i0_0 + h0_1*i1_0
-	p0_1 = h0_0*i0_1 + h0_1*i1_1
-
-	p1_0 = h1_0*i0_0 + h1_1*i1_0
-	p1_1 = h1_0*i0_1 + h1_1*i1_1
-)
-
-// Verify that product is identity matrix
-const ok = p0_0 == 1 && p0_1 == 0 &&
-	p1_0 == 0 && p1_1 == 1 &&
-	true
-
-func print() {
-	println(p0_0, p0_1)
-	println(p1_0, p1_1)
-}
-
-// Binomials
-const (
-	b0_0 = f0 / (f0 * f0)
-
-	b1_0 = f1 / (f0 * f1)
-	b1_1 = f1 / (f1 * f0)
-
-	b2_0 = f2 / (f0 * f2)
-	b2_1 = f2 / (f1 * f1)
-	b2_2 = f2 / (f2 * f0)
-
-	b3_0 = f3 / (f0 * f3)
-	b3_1 = f3 / (f1 * f2)
-	b3_2 = f3 / (f2 * f1)
-	b3_3 = f3 / (f3 * f0)
-)
-
-// Factorials
-const (
-	f0 = 1
-	f1 = 1
-	f2 = f1 * 2
-	f3 = f2 * 3
-)
diff --git a/test/fixedbugs/issue7740.go b/test/fixedbugs/issue7740.go
deleted file mode 100644
index 8f1afe8..0000000
--- a/test/fixedbugs/issue7740.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// run
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This test computes the precision of the compiler's internal multiprecision floats.
-
-package main
-
-import (
-	"fmt"
-	"math"
-	"runtime"
-)
-
-const ulp = (1.0 + (2.0 / 3.0)) - (5.0 / 3.0)
-
-func main() {
-	// adjust precision depending on compiler
-	var prec float64
-	switch runtime.Compiler {
-	case "gc":
-		prec = 512
-	case "gccgo":
-		prec = 256
-	default:
-		// unknown compiler
-		return
-	}
-	p := 1 - math.Log(math.Abs(ulp))/math.Log(2)
-	if math.Abs(p-prec) > 1e-10 {
-		fmt.Printf("BUG: got %g; want %g\n", p, prec)
-	}
-}
diff --git a/test/fixedbugs/issue7746.go b/test/fixedbugs/issue7746.go
deleted file mode 100644
index 0dc119d..0000000
--- a/test/fixedbugs/issue7746.go
+++ /dev/null
@@ -1,133 +0,0 @@
-// errorcheck
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-const (
-	c0   = 1 << 100
-	c1   = c0 * c0
-	c2   = c1 * c1
-	c3   = c2 * c2 // ERROR "overflow"
-	c4   = c3 * c3
-	c5   = c4 * c4
-	c6   = c5 * c5
-	c7   = c6 * c6
-	c8   = c7 * c7
-	c9   = c8 * c8
-	c10  = c9 * c9
-	c11  = c10 * c10
-	c12  = c11 * c11
-	c13  = c12 * c12
-	c14  = c13 * c13
-	c15  = c14 * c14
-	c16  = c15 * c15
-	c17  = c16 * c16
-	c18  = c17 * c17
-	c19  = c18 * c18
-	c20  = c19 * c19
-	c21  = c20 * c20
-	c22  = c21 * c21
-	c23  = c22 * c22
-	c24  = c23 * c23
-	c25  = c24 * c24
-	c26  = c25 * c25
-	c27  = c26 * c26
-	c28  = c27 * c27
-	c29  = c28 * c28
-	c30  = c29 * c29
-	c31  = c30 * c30
-	c32  = c31 * c31
-	c33  = c32 * c32
-	c34  = c33 * c33
-	c35  = c34 * c34
-	c36  = c35 * c35
-	c37  = c36 * c36
-	c38  = c37 * c37
-	c39  = c38 * c38
-	c40  = c39 * c39
-	c41  = c40 * c40
-	c42  = c41 * c41
-	c43  = c42 * c42
-	c44  = c43 * c43
-	c45  = c44 * c44
-	c46  = c45 * c45
-	c47  = c46 * c46
-	c48  = c47 * c47
-	c49  = c48 * c48
-	c50  = c49 * c49
-	c51  = c50 * c50
-	c52  = c51 * c51
-	c53  = c52 * c52
-	c54  = c53 * c53
-	c55  = c54 * c54
-	c56  = c55 * c55
-	c57  = c56 * c56
-	c58  = c57 * c57
-	c59  = c58 * c58
-	c60  = c59 * c59
-	c61  = c60 * c60
-	c62  = c61 * c61
-	c63  = c62 * c62
-	c64  = c63 * c63
-	c65  = c64 * c64
-	c66  = c65 * c65
-	c67  = c66 * c66
-	c68  = c67 * c67
-	c69  = c68 * c68
-	c70  = c69 * c69
-	c71  = c70 * c70
-	c72  = c71 * c71
-	c73  = c72 * c72
-	c74  = c73 * c73
-	c75  = c74 * c74
-	c76  = c75 * c75
-	c77  = c76 * c76
-	c78  = c77 * c77
-	c79  = c78 * c78
-	c80  = c79 * c79
-	c81  = c80 * c80
-	c82  = c81 * c81
-	c83  = c82 * c82
-	c84  = c83 * c83
-	c85  = c84 * c84
-	c86  = c85 * c85
-	c87  = c86 * c86
-	c88  = c87 * c87
-	c89  = c88 * c88
-	c90  = c89 * c89
-	c91  = c90 * c90
-	c92  = c91 * c91
-	c93  = c92 * c92
-	c94  = c93 * c93
-	c95  = c94 * c94
-	c96  = c95 * c95
-	c97  = c96 * c96
-	c98  = c97 * c97
-	c99  = c98 * c98
-	c100 = c99 * c99
-)
-
-func main() {
-	println(c1 / c1)
-	println(c2 / c2)
-	println(c3 / c3)
-	println(c4 / c4)
-	println(c5 / c5)
-	println(c6 / c6)
-	println(c7 / c7)
-	println(c8 / c8)
-	println(c9 / c9)
-	println(c10 / c10)
-	println(c20 / c20)
-	println(c30 / c30)
-	println(c40 / c40)
-	println(c50 / c50)
-	println(c60 / c60)
-	println(c70 / c70)
-	println(c80 / c80)
-	println(c90 / c90)
-	println(c100 / c100)
-}
diff --git a/test/fixedbugs/issue8154.go b/test/fixedbugs/issue8154.go
deleted file mode 100644
index 92c3cac..0000000
--- a/test/fixedbugs/issue8154.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// compile
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Issue 8154: cmd/5g: ICE in walkexpr walk.c
-
-package main
-
-func main() {
-	c := make(chan int)
-	_ = [1][]func(){[]func(){func() { <-c }}}
-}
diff --git a/test/fixedbugs/issue8183.go b/test/fixedbugs/issue8183.go
deleted file mode 100644
index 7104f1e..0000000
--- a/test/fixedbugs/issue8183.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// errorcheck
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Tests correct reporting of line numbers for errors involving iota,
-// Issue #8183.
-package foo
-
-const (
-	ok = byte(iota + 253)
-	bad
-	barn
-	bard // ERROR "constant 256 overflows byte"
-)
-
-const (
-	c = len([1 - iota]int{})
-	d
-	e // ERROR "array bound must be non-negative" "const initializer len\(composite literal\) is not a constant"
-	f // ERROR "array bound must be non-negative" "const initializer len\(composite literal\) is not a constant"
-)
diff --git a/test/fixedbugs/issue8385.go b/test/fixedbugs/issue8385.go
deleted file mode 100644
index 6447e9f..0000000
--- a/test/fixedbugs/issue8385.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// errorcheck
-
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Issue 8385: provide a more descriptive error when a method expression
-// is called without a receiver.
-
-package main
-
-type Fooer interface {
-	Foo(i, j int)
-}
-
-func f(x int) {
-}
-
-type I interface {
-	M(int)
-}
-type T struct{}
-
-func (t T) M(x int) {
-}
-
-func g() func(int)
-
-func main() {
-	Fooer.Foo(5, 6) // ERROR "not enough arguments in call to method expression Fooer.Foo"
-
-	var i I
-	var t *T
-
-	g()()    // ERROR "not enough arguments in call to g\(\)"
-	f()      // ERROR "not enough arguments in call to f"
-	i.M()    // ERROR "not enough arguments in call to i\.M"
-	I.M()    // ERROR "not enough arguments in call to method expression I\.M"
-	t.M()    // ERROR "not enough arguments in call to t\.M"
-	T.M()    // ERROR "not enough arguments in call to method expression T\.M"
-	(*T).M() // ERROR "not enough arguments in call to method expression \(\*T\)\.M"
-}
diff --git a/test/fixedbugs/issue8501.go b/test/fixedbugs/issue8501.go
deleted file mode 100644
index 90ba096..0000000
--- a/test/fixedbugs/issue8501.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// errorcheck
-
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package p
-
-type T struct {
-	f float64
-}
-
-var t T
-
-func F() {
-	_ = complex(1.0) // ERROR "invalid operation|not enough arguments"
-	_ = complex(t.f) // ERROR "invalid operation|not enough arguments"
-}
diff --git a/test/fixedbugs/issue8620.go b/test/fixedbugs/issue8620.go
deleted file mode 100644
index 30d7a82..0000000
--- a/test/fixedbugs/issue8620.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// run
-
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Issue 8620. Used to fail with -race.
-
-package main
-
-func min(a, b int) int {
-	if a < b {
-		return a
-	}
-	return b
-}
-
-func test(s1, s2 []struct{}) {
-	n := min(len(s1), len(s2))
-	if copy(s1, s2) != n {
-		panic("bad copy result")
-	}
-}
-
-func main() {
-	var b [100]struct{}
-	test(b[:], b[:])
-	test(b[1:], b[:])
-	test(b[:], b[2:])
-}
diff --git a/test/fixedbugs/issue8745.go b/test/fixedbugs/issue8745.go
deleted file mode 100644
index f3a70af..0000000
--- a/test/fixedbugs/issue8745.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// errorcheck
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Check that the error says s[2] is a byte, not a uint8.
-
-package p
-
-func f(s string) {
-	var _ float64 = s[2] // ERROR "cannot use.*type byte.*as type float64"
-}
diff --git a/test/fixedbugs/issue8836.go b/test/fixedbugs/issue8836.go
deleted file mode 100644
index 92c18f6..0000000
--- a/test/fixedbugs/issue8836.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// errorcheck
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Checking that line number is correct in error message.
-
-package main
-
-type Cint int
-
-func foobar(*Cint, Cint, Cint, *Cint)
-
-func main() {
-	a := Cint(1)
-
-	foobar(
-		&a,
-		0,
-		0,
-		42, // ERROR ".*"
-	)
-}
diff --git a/test/fixedbugs/issue9017.go b/test/fixedbugs/issue9017.go
deleted file mode 100644
index e19bac2..0000000
--- a/test/fixedbugs/issue9017.go
+++ /dev/null
@@ -1,57 +0,0 @@
-// errorcheck
-
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Issue 9017: Method selector shouldn't automatically dereference a named pointer type.
-
-package main
-
-type T struct{ x int }
-
-func (T) mT() {}
-
-type S struct {
-	T
-}
-
-func (S) mS() {}
-
-type P *S
-
-type I interface {
-	mT()
-}
-
-func main() {
-	var s S
-	s.T.mT()
-	s.mT() // == s.T.mT()
-
-	var i I
-	_ = i
-	i = s.T
-	i = s
-
-	var ps = &s
-	ps.mS()
-	ps.T.mT()
-	ps.mT() // == ps.T.mT()
-
-	i = ps.T
-	i = ps
-
-	var p P = ps
-	(*p).mS()
-	p.mS() // ERROR "undefined"
-
-	i = *p
-	i = p // ERROR "cannot use|incompatible types"
-
-	p.T.mT()
-	p.mT() // ERROR "undefined"
-
-	i = p.T
-	i = p // ERROR "cannot use|incompatible types"
-}
diff --git a/test/fixedbugs/issue9036.go b/test/fixedbugs/issue9036.go
deleted file mode 100644
index 283159e..0000000
--- a/test/fixedbugs/issue9036.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// errorcheck
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Expects to see error messages on "p" exponents.
-
-package main
-
-import "fmt"
-
-const (
-	x1 = 1.1    // float
-	x2 = 1e10   // float
-	x3 = 0x1e10 // integer (e is a hex digit)
-	x4 = 0x1p10 // ERROR "malformed floating point constant"
-	x5 = 1p10   // ERROR "malformed floating point constant"
-	x6 = 0p0    // ERROR "malformed floating point constant"
-)
-
-func main() {
-	fmt.Printf("%g %T\n", x1, x1)
-	fmt.Printf("%g %T\n", x2, x2)
-	fmt.Printf("%g %T\n", x3, x3)
-	fmt.Printf("%g %T\n", x4, x4)
-	fmt.Printf("%g %T\n", x5, x5)
-	fmt.Printf("%g %T\n", x6, x6)
-}
diff --git a/test/fixedbugs/issue9076.go b/test/fixedbugs/issue9076.go
deleted file mode 100644
index ad1cd5d..0000000
--- a/test/fixedbugs/issue9076.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// errorcheck
-
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Issue 9076: cmd/gc shows computed values in error messages instead of original expression.
-
-package main
-
-import "unsafe"
-
-const Hundred = 100
-var _ int32 = 100/unsafe.Sizeof(int(0)) + 1 // GC_ERROR "100 \/ unsafe.Sizeof\(int\(0\)\) \+ 1"
-var _ int32 = Hundred/unsafe.Sizeof(int(0)) + 1 // GC_ERROR "Hundred \/ unsafe.Sizeof\(int\(0\)\) \+ 1"
diff --git a/test/fixedbugs/issue9083.go b/test/fixedbugs/issue9083.go
deleted file mode 100644
index c92c0a6..0000000
--- a/test/fixedbugs/issue9083.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// errorcheck
-
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Issue 9083: map/chan error messages show non-explicit capacity.
-
-package main
-
-// untyped constant
-const zero = 0
-
-func main() {
-	var x int
-	x = make(map[int]int) // ERROR "cannot use make\(map\[int\]int\)|incompatible"
-	x = make(map[int]int, 0) // ERROR "cannot use make\(map\[int\]int, 0\)|incompatible"
-	x = make(map[int]int, zero) // ERROR "cannot use make\(map\[int\]int, zero\)|incompatible"
-	x = make(chan int) // ERROR "cannot use make\(chan int\)|incompatible"
-	x = make(chan int, 0) // ERROR "cannot use make\(chan int, 0\)|incompatible"
-	x = make(chan int, zero) // ERROR "cannot use make\(chan int, zero\)|incompatible"
-}
diff --git a/test/fixedbugs/issue9355.dir/a.go b/test/fixedbugs/issue9355.dir/a.go
deleted file mode 100644
index 84500c8..0000000
--- a/test/fixedbugs/issue9355.dir/a.go
+++ /dev/null
@@ -1,16 +0,0 @@
-package main
-
-var x struct {
-	a, b, c int64
-	d       struct{ p, q, r int32 }
-	e       [8]byte
-	f       [4]struct{ p, q, r int32 }
-}
-
-var y = &x.b
-var z = &x.d.q
-
-var b [10]byte
-var c = &b[5]
-
-var w = &x.f[3].r
diff --git a/test/fixedbugs/issue9355.go b/test/fixedbugs/issue9355.go
deleted file mode 100644
index 40c9ba9..0000000
--- a/test/fixedbugs/issue9355.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// run
-
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
-	"fmt"
-	"os"
-	"os/exec"
-	"path/filepath"
-	"regexp"
-	"runtime"
-)
-
-func main() {
-	if runtime.Compiler != "gc" || runtime.GOOS == "nacl" {
-		return
-	}
-
-	err := os.Chdir(filepath.Join("fixedbugs", "issue9355.dir"))
-	check(err)
-
-	out := run("go", "tool", "compile", "-S", "a.go")
-	os.Remove("a.o")
-
-	// 6g/8g print the offset as dec, but 5g/9g print the offset as hex.
-	patterns := []string{
-		`rel 0\+\d t=1 \"\"\.x\+8\r?\n`,       // y = &x.b
-		`rel 0\+\d t=1 \"\"\.x\+(28|1c)\r?\n`, // z = &x.d.q
-		`rel 0\+\d t=1 \"\"\.b\+5\r?\n`,       // c = &b[5]
-		`rel 0\+\d t=1 \"\"\.x\+(88|58)\r?\n`, // w = &x.f[3].r
-	}
-	for _, p := range patterns {
-		if ok, err := regexp.Match(p, out); !ok || err != nil {
-			println(string(out))
-			panic("can't find pattern " + p)
-		}
-	}
-}
-
-func run(cmd string, args ...string) []byte {
-	out, err := exec.Command(cmd, args...).CombinedOutput()
-	if err != nil {
-		fmt.Println(string(out))
-		fmt.Println(err)
-		os.Exit(1)
-	}
-	return out
-}
-
-func check(err error) {
-	if err != nil {
-		fmt.Println("BUG:", err)
-		os.Exit(1)
-	}
-}
diff --git a/test/fixedbugs/issue9370.go b/test/fixedbugs/issue9370.go
deleted file mode 100644
index 120af35..0000000
--- a/test/fixedbugs/issue9370.go
+++ /dev/null
@@ -1,127 +0,0 @@
-// errorcheck
-
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Verify that concrete/interface comparisons are
-// typechecked correctly by the compiler.
-
-package main
-
-type I interface {
-	Method()
-}
-
-type C int
-
-func (C) Method() {}
-
-type G func()
-
-func (G) Method() {}
-
-var (
-	e interface{}
-	i I
-	c C
-	n int
-	f func()
-	g G
-)
-
-var (
-	_ = e == c
-	_ = e != c
-	_ = e >= c // ERROR "invalid operation.*not defined"
-	_ = c == e
-	_ = c != e
-	_ = c >= e // ERROR "invalid operation.*not defined"
-
-	_ = i == c
-	_ = i != c
-	_ = i >= c // ERROR "invalid operation.*not defined"
-	_ = c == i
-	_ = c != i
-	_ = c >= i // ERROR "invalid operation.*not defined"
-
-	_ = e == n
-	_ = e != n
-	_ = e >= n // ERROR "invalid operation.*not defined"
-	_ = n == e
-	_ = n != e
-	_ = n >= e // ERROR "invalid operation.*not defined"
-
-	// i and n are not assignable to each other
-	_ = i == n // ERROR "invalid operation.*mismatched types"
-	_ = i != n // ERROR "invalid operation.*mismatched types"
-	_ = i >= n // ERROR "invalid operation.*mismatched types"
-	_ = n == i // ERROR "invalid operation.*mismatched types"
-	_ = n != i // ERROR "invalid operation.*mismatched types"
-	_ = n >= i // ERROR "invalid operation.*mismatched types"
-
-	_ = e == 1
-	_ = e != 1
-	_ = e >= 1 // ERROR "invalid operation.*not defined"
-	_ = 1 == e
-	_ = 1 != e
-	_ = 1 >= e // ERROR "invalid operation.*not defined"
-
-	_ = i == 1 // ERROR "invalid operation.*mismatched types"
-	_ = i != 1 // ERROR "invalid operation.*mismatched types"
-	_ = i >= 1 // ERROR "invalid operation.*mismatched types"
-	_ = 1 == i // ERROR "invalid operation.*mismatched types"
-	_ = 1 != i // ERROR "invalid operation.*mismatched types"
-	_ = 1 >= i // ERROR "invalid operation.*mismatched types"
-
-	_ = e == f // ERROR "invalid operation.*not defined"
-	_ = e != f // ERROR "invalid operation.*not defined"
-	_ = e >= f // ERROR "invalid operation.*not defined"
-	_ = f == e // ERROR "invalid operation.*not defined"
-	_ = f != e // ERROR "invalid operation.*not defined"
-	_ = f >= e // ERROR "invalid operation.*not defined"
-
-	_ = i == f // ERROR "invalid operation.*mismatched types"
-	_ = i != f // ERROR "invalid operation.*mismatched types"
-	_ = i >= f // ERROR "invalid operation.*mismatched types"
-	_ = f == i // ERROR "invalid operation.*mismatched types"
-	_ = f != i // ERROR "invalid operation.*mismatched types"
-	_ = f >= i // ERROR "invalid operation.*mismatched types"
-
-	_ = e == g // ERROR "invalid operation.*not defined"
-	_ = e != g // ERROR "invalid operation.*not defined"
-	_ = e >= g // ERROR "invalid operation.*not defined"
-	_ = g == e // ERROR "invalid operation.*not defined"
-	_ = g != e // ERROR "invalid operation.*not defined"
-	_ = g >= e // ERROR "invalid operation.*not defined"
-
-	_ = i == g // ERROR "invalid operation.*not defined"
-	_ = i != g // ERROR "invalid operation.*not defined"
-	_ = i >= g // ERROR "invalid operation.*not defined"
-	_ = g == i // ERROR "invalid operation.*not defined"
-	_ = g != i // ERROR "invalid operation.*not defined"
-	_ = g >= i // ERROR "invalid operation.*not defined"
-
-	_ = _ == e // ERROR "cannot use _ as value"
-	_ = _ == i // ERROR "cannot use _ as value"
-	_ = _ == c // ERROR "cannot use _ as value"
-	_ = _ == n // ERROR "cannot use _ as value"
-	_ = _ == f // ERROR "cannot use _ as value"
-	_ = _ == g // ERROR "cannot use _ as value"
-
-	_ = e == _ // ERROR "cannot use _ as value"
-	_ = i == _ // ERROR "cannot use _ as value"
-	_ = c == _ // ERROR "cannot use _ as value"
-	_ = n == _ // ERROR "cannot use _ as value"
-	_ = f == _ // ERROR "cannot use _ as value"
-	_ = g == _ // ERROR "cannot use _ as value"
-
-	_ = _ == _ // ERROR "cannot use _ as value"
-
-	_ = e ^ c // ERROR "invalid operation.*mismatched types"
-	_ = c ^ e // ERROR "invalid operation.*mismatched types"
-	_ = 1 ^ e // ERROR "invalid operation.*mismatched types"
-	_ = e ^ 1 // ERROR "invalid operation.*mismatched types"
-	_ = 1 ^ c
-	_ = c ^ 1
-)
diff --git a/test/fixedbugs/issue9521.go b/test/fixedbugs/issue9521.go
deleted file mode 100644
index ef0a5a6..0000000
--- a/test/fixedbugs/issue9521.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// errorcheck
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test that an incorrect use of the blank identifer is caught.
-// Does not compile.
-
-package main
-
-func f() (_, _ []int)         { return }
-func g() (x []int, y float64) { return }
-
-func main() {
-	_ = append(f()) // ERROR "cannot append \[\]int value to \[\]int"
-	_ = append(g()) // ERROR "cannot append float64 value to \[\]int"
-}
diff --git a/test/fixedbugs/issue9604b.go b/test/fixedbugs/issue9604b.go
deleted file mode 100644
index ebbd205..0000000
--- a/test/fixedbugs/issue9604b.go
+++ /dev/null
@@ -1,177 +0,0 @@
-// runoutput
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
-	"fmt"
-	"math/big"
-	"unsafe"
-)
-
-var one = big.NewInt(1)
-
-type _type struct {
-	name   string
-	bits   uint
-	signed bool
-}
-
-// testvalues returns a list of all test values for this type.
-func (t *_type) testvalues() []*big.Int {
-	var a []*big.Int
-
-	a = append(a, big.NewInt(0))
-	a = append(a, big.NewInt(1))
-	a = append(a, big.NewInt(2))
-	if t.signed {
-		a = append(a, big.NewInt(-1))
-		a = append(a, big.NewInt(-2))
-		r := big.NewInt(1)
-		a = append(a, r.Lsh(r, t.bits-1).Sub(r, big.NewInt(1)))
-		r = big.NewInt(1)
-		a = append(a, r.Lsh(r, t.bits-1).Sub(r, big.NewInt(2)))
-		r = big.NewInt(1)
-		a = append(a, r.Lsh(r, t.bits-1).Neg(r))
-		r = big.NewInt(1)
-		a = append(a, r.Lsh(r, t.bits-1).Neg(r).Add(r, big.NewInt(1)))
-	} else {
-		r := big.NewInt(1)
-		a = append(a, r.Lsh(r, t.bits).Sub(r, big.NewInt(1)))
-		r = big.NewInt(1)
-		a = append(a, r.Lsh(r, t.bits).Sub(r, big.NewInt(2)))
-	}
-	return a
-}
-
-// trunc truncates a value to the range of the given type.
-func (t *_type) trunc(x *big.Int) *big.Int {
-	r := new(big.Int)
-	m := new(big.Int)
-	m.Lsh(one, t.bits)
-	m.Sub(m, one)
-	r.And(x, m)
-	if t.signed && r.Bit(int(t.bits)-1) == 1 {
-		m.Neg(one)
-		m.Lsh(m, t.bits)
-		r.Or(r, m)
-	}
-	return r
-}
-
-var types = []_type{
-	_type{"byte", 8, false},
-	_type{"int8", 8, true},
-	_type{"uint8", 8, false},
-	_type{"rune", 32, true},
-	_type{"int16", 16, true},
-	_type{"uint16", 16, false},
-	_type{"int32", 32, true},
-	_type{"uint32", 32, false},
-	_type{"int64", 64, true},
-	_type{"uint64", 64, false},
-	_type{"int", 8 * uint(unsafe.Sizeof(int(0))), true},
-	_type{"uint", 8 * uint(unsafe.Sizeof(uint(0))), false},
-	_type{"uintptr", 8 * uint(unsafe.Sizeof((*byte)(nil))), false},
-}
-
-type binop struct {
-	name string
-	eval func(x, y *big.Int) *big.Int
-}
-
-var binops = []binop{
-	binop{"+", func(x, y *big.Int) *big.Int { return new(big.Int).Add(x, y) }},
-	binop{"-", func(x, y *big.Int) *big.Int { return new(big.Int).Sub(x, y) }},
-	binop{"*", func(x, y *big.Int) *big.Int { return new(big.Int).Mul(x, y) }},
-	binop{"/", func(x, y *big.Int) *big.Int { return new(big.Int).Quo(x, y) }},
-	binop{"%", func(x, y *big.Int) *big.Int { return new(big.Int).Rem(x, y) }},
-	binop{"&", func(x, y *big.Int) *big.Int { return new(big.Int).And(x, y) }},
-	binop{"|", func(x, y *big.Int) *big.Int { return new(big.Int).Or(x, y) }},
-	binop{"^", func(x, y *big.Int) *big.Int { return new(big.Int).Xor(x, y) }},
-	binop{"&^", func(x, y *big.Int) *big.Int { return new(big.Int).AndNot(x, y) }},
-}
-
-type unop struct {
-	name string
-	eval func(x *big.Int) *big.Int
-}
-
-var unops = []unop{
-	unop{"+", func(x *big.Int) *big.Int { return new(big.Int).Set(x) }},
-	unop{"-", func(x *big.Int) *big.Int { return new(big.Int).Neg(x) }},
-	unop{"^", func(x *big.Int) *big.Int { return new(big.Int).Not(x) }},
-}
-
-type shiftop struct {
-	name string
-	eval func(x *big.Int, i uint) *big.Int
-}
-
-var shiftops = []shiftop{
-	shiftop{"<<", func(x *big.Int, i uint) *big.Int { return new(big.Int).Lsh(x, i) }},
-	shiftop{">>", func(x *big.Int, i uint) *big.Int { return new(big.Int).Rsh(x, i) }},
-}
-
-// valname returns the name of n as can be used as part of a variable name.
-func valname(n *big.Int) string {
-	s := fmt.Sprintf("%d", n)
-	if s[0] == '-' {
-		s = "neg" + s[1:]
-	}
-	return s
-}
-
-func main() {
-	fmt.Println("package main")
-
-	// We make variables to hold all the different values we'd like to use.
-	// We use global variables to prevent any constant folding.
-	for _, t := range types {
-		for _, n := range t.testvalues() {
-			fmt.Printf("var %s_%s %s = %d\n", t.name, valname(n), t.name, n)
-		}
-	}
-
-	fmt.Println("func main() {")
-
-	for _, t := range types {
-		// test binary ops
-		for _, op := range binops {
-			for _, x := range t.testvalues() {
-				for _, y := range t.testvalues() {
-					if (op.name == "/" || op.name == "%") && y.Sign() == 0 {
-						continue
-					}
-					r := t.trunc(op.eval(x, y))
-					eqn := fmt.Sprintf("%s_%s %s %s_%s != %d", t.name, valname(x), op.name, t.name, valname(y), r)
-					fmt.Printf("\tif %s { println(\"bad: %s\") }\n", eqn, eqn)
-				}
-			}
-		}
-		// test unary ops
-		for _, op := range unops {
-			for _, x := range t.testvalues() {
-				r := t.trunc(op.eval(x))
-				eqn := fmt.Sprintf("%s %s_%s != %d", op.name, t.name, valname(x), r)
-				fmt.Printf("\tif %s { println(\"bad: %s\") }\n", eqn, eqn)
-			}
-		}
-		// test shifts
-		for _, op := range shiftops {
-			for _, x := range t.testvalues() {
-
-				for _, i := range []uint{0, 1, t.bits - 2, t.bits - 1, t.bits, t.bits + 1} {
-					r := t.trunc(op.eval(x, i))
-					eqn := fmt.Sprintf("%s_%s %s %d != %d", t.name, valname(x), op.name, i, r)
-					fmt.Printf("\tif %s { println(\"bad: %s\") }\n", eqn, eqn)
-				}
-			}
-		}
-	}
-
-	fmt.Println("}")
-}
diff --git a/test/fixedbugs/issue9608.dir/issue9608.go b/test/fixedbugs/issue9608.dir/issue9608.go
deleted file mode 100644
index 56b52cc..0000000
--- a/test/fixedbugs/issue9608.dir/issue9608.go
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-func fail() // unimplemented, to test dead code elimination
-
-// Test dead code elimination in if statements
-func init() {
-	if false {
-		fail()
-	}
-	if 0 == 1 {
-		fail()
-	}
-}
-
-// Test dead code elimination in ordinary switch statements
-func init() {
-	const x = 0
-	switch x {
-	case 1:
-		fail()
-	}
-
-	switch 1 {
-	case x:
-		fail()
-	}
-
-	switch {
-	case false:
-		fail()
-	}
-
-	const a = "a"
-	switch a {
-	case "b":
-		fail()
-	}
-
-	const snowman = '☃'
-	switch snowman {
-	case '☀':
-		fail()
-	}
-
-	const zero = float64(0.0)
-	const one = float64(1.0)
-	switch one {
-	case -1.0:
-		fail()
-	case zero:
-		fail()
-	}
-
-	switch 1.0i {
-	case 1:
-		fail()
-	case -1i:
-		fail()
-	}
-
-	const no = false
-	switch no {
-	case true:
-		fail()
-	}
-}
-
-func main() {
-}
diff --git a/test/fixedbugs/issue9608.go b/test/fixedbugs/issue9608.go
deleted file mode 100644
index 92592d7..0000000
--- a/test/fixedbugs/issue9608.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// rundir
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Issue 9608: dead code elimination in switch statements.
-
-// This has to be done as a package rather than as a file,
-// because run.go runs files with 'go run', which passes the
-// -complete flag to compiler, causing it to complain about
-// the intentionally unimplemented function fail.
-
-package ignored
diff --git a/test/fixedbugs/issue9691.go b/test/fixedbugs/issue9691.go
deleted file mode 100644
index 39c3dfa..0000000
--- a/test/fixedbugs/issue9691.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// run
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-func main() {
-	s := "foo"
-	b := []byte(s)
-	m := make(map[string]int)
-	// Test that map index can be used in range
-	// and that slicebytetostringtmp is not used in this context.
-	for m[string(b)] = range s {
-	}
-	b[0] = 'b'
-	if m["foo"] != 2 {
-		panic("bad")
-	}
-}
diff --git a/test/fixedbugs/issue9731.go b/test/fixedbugs/issue9731.go
deleted file mode 100644
index 286cebd..0000000
--- a/test/fixedbugs/issue9731.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// compile
-
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package p
-
-func f(x interface{}) {
-	switch x := x.(type) {
-	case int:
-		func() {
-			_ = x
-		}()
-	case map[int]int:
-		func() {
-			for range x {
-			}
-		}()
-	}
-}
diff --git a/test/fixedbugs/issue9738.go b/test/fixedbugs/issue9738.go
deleted file mode 100644
index 85319d7..0000000
--- a/test/fixedbugs/issue9738.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// run
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-func F() (x int) {
-	defer func() {
-		if x != 42 {
-			println("BUG: x =", x)
-		}
-	}()
-	return 42
-}
-
-func main() {
-	F()
-}
diff --git a/test/fixedbugs/issue9862.go b/test/fixedbugs/issue9862.go
deleted file mode 100644
index 692a60d..0000000
--- a/test/fixedbugs/issue9862.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// skip
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-var a [1<<31 - 1024]byte
-
-func main() {
-	if a[0] != 0 {
-		panic("bad array")
-	}
-}
diff --git a/test/fixedbugs/issue9862_run.go b/test/fixedbugs/issue9862_run.go
deleted file mode 100644
index be22f40..0000000
--- a/test/fixedbugs/issue9862_run.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// +build !nacl
-// run
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Check for compile or link error.
-
-package main
-
-import (
-	"os/exec"
-	"strings"
-)
-
-func main() {
-	out, err := exec.Command("go", "run", "fixedbugs/issue9862.go").CombinedOutput()
-	outstr := string(out)
-	if err == nil {
-		println("go run issue9862.go succeeded, should have failed\n", outstr)
-		return
-	}
-	if !strings.Contains(outstr, "symbol too large") {
-		println("go run issue9862.go gave unexpected error; want symbol too large:\n", outstr)
-	}
-}
diff --git a/test/inline.go b/test/inline.go
deleted file mode 100644
index 54f7b3e..0000000
--- a/test/inline.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// errorcheck -0 -m
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test, using compiler diagnostic flags, that inlining is working.
-// Compiles but does not run.
-
-package foo
-
-import "unsafe"
-
-func add2(p *byte, n uintptr) *byte { // ERROR "can inline add2" "leaking param: p to result"
-	return (*byte)(add1(unsafe.Pointer(p), n)) // ERROR "inlining call to add1"
-}
-
-func add1(p unsafe.Pointer, x uintptr) unsafe.Pointer { // ERROR "can inline add1" "leaking param: p to result"
-	return unsafe.Pointer(uintptr(p) + x)
-}
-
-func f(x *byte) *byte { // ERROR "can inline f" "leaking param: x to result"
-	return add2(x, 1) // ERROR "inlining call to add2" "inlining call to add1"
-}
diff --git a/test/interface/assertinline.go b/test/interface/assertinline.go
deleted file mode 100644
index faa848a..0000000
--- a/test/interface/assertinline.go
+++ /dev/null
@@ -1,53 +0,0 @@
-// errorcheck -0 -d=typeassert
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package p
-
-func assertptr(x interface{}) *int {
-	return x.(*int) // ERROR "type assertion inlined"
-}
-
-func assertptr2(x interface{}) (*int, bool) {
-	z, ok := x.(*int) // ERROR "type assertion inlined"
-	return z, ok
-}
-
-func assertfunc(x interface{}) func() {
-	return x.(func()) // ERROR "type assertion inlined"
-}
-
-func assertfunc2(x interface{}) (func(), bool) {
-	z, ok := x.(func()) // ERROR "type assertion inlined"
-	return z, ok
-}
-
-// TODO(rsc): struct{*int} is stored directly in the interface
-// and should be possible to fetch back out of the interface,
-// but more of the general data movement code needs to
-// realize that before we can inline the assertion.
-
-func assertstruct(x interface{}) struct{ *int } {
-	return x.(struct{ *int }) // ERROR "type assertion not inlined"
-}
-
-func assertstruct2(x interface{}) (struct{ *int }, bool) {
-	z, ok := x.(struct{ *int }) // ERROR "type assertion not inlined"
-	return z, ok
-}
-
-func assertbig(x interface{}) complex128 {
-	return x.(complex128) // ERROR "type assertion not inlined"
-}
-
-func assertbig2(x interface{}) (complex128, bool) {
-	z, ok := x.(complex128) // ERROR "type assertion not inlined"
-	return z, ok
-}
-
-func assertbig2ok(x interface{}) (complex128, bool) {
-	_, ok := x.(complex128) // ERROR "type assertion [(]ok only[)] inlined"
-	return 0, ok
-}
diff --git a/test/recover4.go b/test/recover4.go
deleted file mode 100644
index cda0813..0000000
--- a/test/recover4.go
+++ /dev/null
@@ -1,73 +0,0 @@
-// +build linux darwin
-// run
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test that if a slice access causes a fault, a deferred func
-// sees the most recent value of the variables it accesses.
-// This is true today; the role of the test is to ensure it stays true.
-//
-// In the test, memcopy is the function that will fault, during dst[i] = src[i].
-// The deferred func recovers from the error and returns, making memcopy
-// return the current value of n. If n is not being flushed to memory
-// after each modification, the result will be a stale value of n.
-//
-// The test is set up by mmapping a 64 kB block of memory and then
-// unmapping a 16 kB hole in the middle of it. Running memcopy
-// on the resulting slice will fault when it reaches the hole.
-
-package main
-
-import (
-	"log"
-	"runtime/debug"
-	"syscall"
-	"unsafe"
-)
-
-func memcopy(dst, src []byte) (n int, err error) {
-	defer func() {
-		err = recover().(error)
-	}()
-
-	for i := 0; i < len(dst) && i < len(src); i++ {
-		dst[i] = src[i]
-		n++
-	}
-	return
-}
-
-func main() {
-	// Turn the eventual fault into a panic, not a program crash,
-	// so that memcopy can recover.
-	debug.SetPanicOnFault(true)
-
-	size := syscall.Getpagesize()
-
-	// Map 16 pages of data with a 4-page hole in the middle.
-	data, err := syscall.Mmap(-1, 0, 16*size, syscall.PROT_READ|syscall.PROT_WRITE, syscall.MAP_ANON|syscall.MAP_PRIVATE)
-	if err != nil {
-		log.Fatalf("mmap: %v", err)
-	}
-
-	// Note: Cannot call syscall.Munmap, because Munmap checks
-	// that you are unmapping a whole region returned by Mmap.
-	// We are trying to unmap just a hole in the middle.
-	if _, _, err := syscall.Syscall(syscall.SYS_MUNMAP, uintptr(unsafe.Pointer(&data[8*size])), uintptr(4*size), 0); err != 0 {
-		log.Fatalf("munmap: %v", err)
-	}
-
-	other := make([]byte, 16*size)
-
-	// Check that memcopy returns the actual amount copied
-	// before the fault (8*size - 5, the offset we skip in the argument).
-	n, err := memcopy(data[5:], other)
-	if err == nil {
-		log.Fatal("no error from memcopy across memory hole")
-	}
-	if n != 8*size-5 {
-		log.Fatal("memcopy returned %d, want %d", n, 8*size-5)
-	}
-}
diff --git a/test/sliceopt.go b/test/sliceopt.go
deleted file mode 100644
index c9d089f..0000000
--- a/test/sliceopt.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// errorcheck -0 -d=append,slice
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Check optimization results for append and slicing.
-
-package main
-
-func a1(x []int, y int) []int {
-	x = append(x, y) // ERROR "append: len-only update"
-	return x
-}
-
-func a2(x []int, y int) []int {
-	return append(x, y) // ERROR "append: full update"
-}
-
-func a3(x *[]int, y int) {
-	*x = append(*x, y) // ERROR "append: len-only update"
-}
-
-func s1(x **[]int, xs **string, i, j int) {
-	var z []int
-	z = (**x)[2:]         // ERROR "slice: omit check for 2nd index"
-	z = (**x)[2:len(**x)] // not yet: "slice: reuse len" "slice: omit check for 2nd index"
-	z = (**x)[2:cap(**x)] // not yet: "slice: reuse cap" "slice: omit check for 2nd index"
-	z = (**x)[i:i]        // ERROR "slice: reuse 1st index" "slice: omit check for 1st index" "slice: result len == 0"
-	z = (**x)[1:i:i]      // ERROR "slice: reuse 2nd index" "slice: omit check for 2nd index" "slice: result cap == result len"
-	z = (**x)[i:j:0]      // ERROR "slice: omit check for 3rd index"
-	z = (**x)[i:0:j]      // ERROR "slice: omit check for 2nd index"
-	z = (**x)[0:i:j]      // ERROR "slice: omit check for 1st index" "slice: skip base adjustment for 1st index 0"
-	z = (**x)[0:]         // ERROR "slice: omit slice operation"
-	z = (**x)[2:8]        // ERROR "slice: omit check for 1st index" "slice: result len == 6"
-	z = (**x)[2:2]        // ERROR "slice: omit check for 1st index" "slice: result len == 0"
-	z = (**x)[0:i]        // ERROR "slice: omit check for 1st index" "slice: skip base adjustment for 1st index 0"
-	z = (**x)[2:i:8]      // ERROR "slice: result cap == 6"
-	z = (**x)[i:2:i]      // ERROR "slice: reuse 1st index" "slice: result cap == 0" "slice: skip base adjustment for cap == 0"
-
-	z = z[0:i]       // ERROR "slice: omit check for 1st index" "slice: result cap not computed" "slice: skip base adjustment for 1st index 0" "slice: len-only update"
-	z = z[0:i : i+1] // ERROR "slice: omit check for 1st index" "slice: skip base adjustment for 1st index 0" "slice: len/cap-only update"
-	z = z[i : i+1]
-
-	println(z)
-
-	var zs string
-	zs = (**xs)[2:]          // ERROR "slice: omit check for 2nd index"
-	zs = (**xs)[2:len(**xs)] // not yet: "slice: reuse len" "slice: omit check for 2nd index"
-	zs = (**xs)[i:i]         // ERROR "slice: reuse 1st index" "slice: omit check for 1st index" "slice: result len == 0" "slice: skip base adjustment for string len == 0"
-	zs = (**xs)[0:]          // ERROR "slice: omit slice operation"
-	zs = (**xs)[2:8]         // ERROR "slice: omit check for 1st index" "slice: result len == 6"
-	zs = (**xs)[2:2]         // ERROR "slice: omit check for 1st index" "slice: result len == 0" "slice: skip base adjustment for string len == 0"
-	zs = (**xs)[0:i]         // ERROR "slice: omit check for 1st index" "slice: skip base adjustment for 1st index 0"
-
-	zs = zs[0:i] // ERROR "slice: omit check for 1st index" "slice: skip base adjustment for 1st index 0" "slice: len-only update"
-	zs = zs[i : i+1]
-	println(zs)
-}
diff --git a/test/writebarrier.go b/test/writebarrier.go
deleted file mode 100644
index 9b741a6..0000000
--- a/test/writebarrier.go
+++ /dev/null
@@ -1,146 +0,0 @@
-// errorcheck -0 -l -d=wb
-
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test where write barriers are and are not emitted.
-
-package p
-
-import "unsafe"
-
-func f(x **byte, y *byte) {
-	*x = y // ERROR "write barrier"
-
-	z := y // no barrier
-	*x = z // ERROR "write barrier"
-}
-
-func f1(x *[]byte, y []byte) {
-	*x = y // ERROR "write barrier"
-
-	z := y // no barrier
-	*x = z // ERROR "write barrier"
-}
-
-func f1a(x *[]byte, y *[]byte) {
-	*x = *y // ERROR "write barrier"
-
-	z := *y // no barrier
-	*x = z  // ERROR "write barrier"
-}
-
-func f2(x *interface{}, y interface{}) {
-	*x = y // ERROR "write barrier"
-
-	z := y // no barrier
-	*x = z // ERROR "write barrier"
-}
-
-func f2a(x *interface{}, y *interface{}) {
-	*x = *y // ERROR "write barrier"
-
-	z := y // no barrier
-	*x = z // ERROR "write barrier"
-}
-
-func f3(x *string, y string) {
-	*x = y // ERROR "write barrier"
-
-	z := y // no barrier
-	*x = z // ERROR "write barrier"
-}
-
-func f3a(x *string, y *string) {
-	*x = *y // ERROR "write barrier"
-
-	z := *y // no barrier
-	*x = z  // ERROR "write barrier"
-}
-
-func f4(x *[2]string, y [2]string) {
-	*x = y // ERROR "write barrier"
-
-	z := y // no barrier
-	*x = z // ERROR "write barrier"
-}
-
-func f4a(x *[2]string, y *[2]string) {
-	*x = *y // ERROR "write barrier"
-
-	z := *y // no barrier
-	*x = z  // ERROR "write barrier"
-}
-
-type T struct {
-	X *int
-	Y int
-	M map[int]int
-}
-
-func f5(t, u *T) {
-	t.X = &u.Y // ERROR "write barrier"
-}
-
-func f6(t *T) {
-	t.M = map[int]int{1: 2} // ERROR "write barrier"
-}
-
-func f7(x, y *int) []*int {
-	var z [3]*int
-	i := 0
-	z[i] = x // ERROR "write barrier"
-	i++
-	z[i] = y // ERROR "write barrier"
-	i++
-	return z[:i]
-}
-
-func f9(x *interface{}, v *byte) {
-	*x = v // ERROR "write barrier"
-}
-
-func f10(x *byte, f func(interface{})) {
-	f(x)
-}
-
-func f11(x *unsafe.Pointer, y unsafe.Pointer) {
-	*x = unsafe.Pointer(uintptr(y) + 1) // ERROR "write barrier"
-}
-
-func f12(x []*int, y *int) []*int {
-	// write barrier for storing y in x's underlying array
-	x = append(x, y) // ERROR "write barrier"
-	return x
-}
-
-func f12a(x []int, y int) []int {
-	// y not a pointer, so no write barriers in this function
-	x = append(x, y)
-	return x
-}
-
-func f13(x []int, y *[]int) {
-	*y = append(x, 1) // ERROR "write barrier"
-}
-
-func f14(y *[]int) {
-	*y = append(*y, 1) // ERROR "write barrier"
-}
-
-type T1 struct {
-	X *int
-}
-
-func f15(x []T1, y T1) []T1 {
-	return append(x, y) // ERROR "write barrier"
-}
-
-type T8 struct {
-	X [8]*int
-}
-
-func f16(x []T8, y T8) []T8 {
-	return append(x, y) // ERROR "write barrier"
-}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-golang/golang.git



More information about the pkg-golang-commits mailing list