Commit Graph

368 Commits

Author SHA1 Message Date
Ian Lance Taylor 42f20102ef libgo: update to go1.8rc3
Reviewed-on: https://go-review.googlesource.com/35844

From-SVN: r244981
2017-01-27 15:01:57 +00:00
Ian Lance Taylor 41d3d0ac40 runtime: fix setting of isarchive
When I updated to Go 1.8, the initsig function moved from
    signal1_unix.go to signal_unix.go, and lost a gccgo-specific change in
    the move.  Add it back.
    
    This would have been caught by the misc/cgo/testcarchive tests in the
    gc repository, but we don't run those in the gccgo repository.  We
    should fix that, somehow.
    
    Reviewed-on: https://go-review.googlesource.com/35839

From-SVN: r244947
2017-01-26 19:07:54 +00:00
Ian Lance Taylor c25edd44a0 libgo: update to go1.8rc2
Fix a bug in the generation of the hash value in reflect.FuncOf.
    
    The merge script missed a bunch of testdata files over the years.
    Copy them over.
    
    Reviewed-on: https://go-review.googlesource.com/35570

From-SVN: r244835
2017-01-23 22:18:42 +00:00
Ian Lance Taylor 4a5b806048 runtime, testing/internal/testdeps: fixes for cgo
Some fixes that permit misc/cgo/test in the master gc repository to
    pass using the current gccgo.
    
    Install testing/internal/testdeps.gox; it is needed by `go test`.
    
    Export runtime.lockedOSThread to enable calling via go:linkname; it is
    used by misc/cgo/test.
    
    Loop on EAGAIN when creating a new thread; this is what the gc code
    does, and misc/cgo/test tests that it works.
    
    Reviewed-on: https://go-review.googlesource.com/35479

From-SVN: r244733
2017-01-20 21:18:37 +00:00
Ian Lance Taylor 5dc8f5d9e6 re PR go/79146 (Bootstrapping go on s390x fails; redefined symbols)
PR go/79146
    math/big: fix build on s390x
    
    Don't build arith_decl_s390x.go for gccgo; it is only for assembly
    code that has not yet been ported to gccgo.
    
    For GCC PR 79146.

From-SVN: r244731
2017-01-20 20:39:10 +00:00
Ian Lance Taylor 198766b648 re PR go/79146 (Bootstrapping go on s390x fails; redefined symbols)
PR go/79146
    crypto/elliptic: explicitly ignore p256_s390x.go
    
    The file only works if used in conjunction with assembly code not
    (yet) written for gccgo.
    
    Fixes GCC PR 79146.

    Reviewed-on: https://go-review.googlesource.com/35477

From-SVN: r244679
2017-01-20 02:27:46 +00:00
Ian Lance Taylor 49947b33ff syscall, golang_org/x/net/lif: fixes for gccgo on Solaris
Reviewed-on: https://go-review.googlesource.com/35390

From-SVN: r244563
2017-01-18 03:37:52 +00:00
Ian Lance Taylor a2a7ea4834 runtime: rename siginfo to _siginfo_t
Since the name siginfo winds up in runtime.inc, this avoids a name
    collision on systems that define "struct siginfo" in the system header
    files.
    
    Reviewed-on: https://go-review.googlesource.com/35239

From-SVN: r244484
2017-01-16 01:21:42 +00:00
Ian Lance Taylor c2047754c3 libgo: update to Go 1.8 release candidate 1
Compiler changes:
      * Change map assignment to use mapassign and assign value directly.
      * Change string iteration to use decoderune, faster for ASCII strings.
      * Change makeslice to take int, and use makeslice64 for larger values.
      * Add new noverflow field to hmap struct used for maps.
    
    Unresolved problems, to be fixed later:
      * Commented out test in go/types/sizes_test.go that doesn't compile.
      * Commented out reflect.TestStructOf test for padding after zero-sized field.
    
    Reviewed-on: https://go-review.googlesource.com/35231

gotools/:
	Updates for Go 1.8rc1.
	* Makefile.am (go_cmd_go_files): Add bug.go.
	(s-zdefaultcc): Write defaultPkgConfig.
	* Makefile.in: Rebuild.

From-SVN: r244456
2017-01-14 00:05:42 +00:00
Ian Lance Taylor 6fcb740ac4 runtime: copy more scheduler code from Go 1.7 runtime
I looked at a diff of proc.go between Go 1.7 and gccgo, and copied
    over all the easy stuff.
    
    Reviewed-on: https://go-review.googlesource.com/35090

From-SVN: r244291
2017-01-10 21:09:00 +00:00
Ian Lance Taylor 0c22e4415f compiler, runtime: drop size arguments to hash/equal functions
Drop the size arguments for the hash/equal functions stored in type
    descriptors.  Types know what size they are.  To make this work,
    generate hash/equal functions for types that can use an identity
    comparison but are not a standard size and alignment.
    
    Drop the multiplications by 33 in the generated hash code and the
    reflect package hash code.  They are not necessary since we started
    passing a seed value around, as the seed includes the hash of the
    earlier values.
    
    Copy the algorithms for standard types from the Go 1.7 runtime,
    replacing the C functions.
    
    Reviewed-on: https://go-review.googlesource.com/34983

From-SVN: r244256
2017-01-10 03:59:20 +00:00
Ian Lance Taylor 2193ad7fbf runtime: copy more of scheduler from Go 1.7 runtime
This started by moving procresize from C to Go so that we can pass the
    right type to the memory allocator when allocating a p, which forced
    the gomaxprocs variable to move from C to Go, and everything else
    followed from that.
    
    Reviewed-on: https://go-review.googlesource.com/34916

From-SVN: r244236
2017-01-09 19:37:19 +00:00
Ian Lance Taylor 0f2a6e84c6 runtime: remove __go_alloc and __go_free
Move allocg and handling of allgs slice from C to Go.
    
    Reviewed-on: https://go-review.googlesource.com/34797

From-SVN: r244036
2017-01-03 22:58:48 +00:00
Ian Lance Taylor b379f8d81f re PR go/78789 (Error: no such instruction: `aesenc %xmm0,%xmm2' when compiling libgo/runtime/aeshash.c)
PR go/78789
    runtime: don't build aeshash.c if the assembler doesn't support it
    
    This is for CentOS 5, whose assembler does not know the aesinc
    instruction.
    
    Fixes GCC PR 78789.
    
    Patch by Uros Bizjak.
    
    Reviewed-on: https://go-review.googlesource.com/34796

From-SVN: r244031
2017-01-03 20:41:54 +00:00
Ian Lance Taylor 0d3dd8fb65 runtime: copy cgo support from Go 1.7 runtime
Remove support for _cgo_allocate.  It was removed from the gc
    toolchain in Go 1.5, so it is unlikely that anybody is trying to use it.
    
    Reviewed-on: https://go-review.googlesource.com/34557

From-SVN: r243805
2016-12-19 18:00:35 +00:00
Ian Lance Taylor 453060a906 runtime: copy memory hash code from Go 1.7
Rewrite the AES hashing code from gc assembler to C code using
    intrinsics.  The resulting code generates the same hash code for the
    same input as the gc code--that doesn't matter as such, but testing it
    ensures that the C code does something useful.
    
    Also change mips64pe32le to mips64p32le in configure script--noticed
    during CL review.
    
    Reviewed-on: https://go-review.googlesource.com/34022

From-SVN: r243445
2016-12-08 16:37:54 +00:00
Ian Lance Taylor b2264b0964 runtime: allocate _panic struct on heap
The gc library allocates a _panic struct on the stack. This does not
    work for gccgo, because when a deferred function recovers the panic we
    unwind the stack up to that point so that returning from the function
    will work correctly.
    
    Allocating on the stack fine if the panic is not recovered, and it
    works fine if the panic is recovered by a function that
    returns. However, it fails if the panic is recovered by a function
    that itself panics, and if that second panic is then recovered by a
    function higher up on the stack. When we unwind the stack to that
    second panic, the g will wind up pointing at a panic farther down on
    the stack. Even then everything will often work fine, except when the
    deferred function catching the second panic makes a bunch of calls
    that use stack space before returning. In that case the code can
    overwrite the panic struct, which will then cause disaster when we
    remove the struct from the linked list, as the link field will be
    garbage. This case is rare enough that all the x86 tests were passing,
    but there was a failure on ppc64le.
    
    Before https://golang.org/cl/33414 we allocated the panic struct on
    the heap, so go back to doing that again.
    
    Fixes golang/go#18228.
    
    Reviewed-on: https://go-review.googlesource.com/34027

From-SVN: r243444
2016-12-08 15:54:30 +00:00
Ian Lance Taylor 6e7f1be7ae runtime: set isarchive in initsig
The library initialization code in go-libmain.c sets the C variable
    runtime_isarchive but failed to set the Go variable runtime.isarchive.
    We don't currently have a way to let C code access an unexported Go
    variable, but fortunately the only time the Go function initsig is
    called with an argument of true is exactly where we want to set
    isarchive.  So let initsig do it.
    
    Reviewed-on: https://go-review.googlesource.com/33753

From-SVN: r243094
2016-12-01 05:47:58 +00:00
Ian Lance Taylor 24f1d7f80e runtime: print C functions in traceback
Since gccgo can trace back through C code as easily as Go code, we
    should print C functions in the traceback.
    
    This worked before https://golang.org/cl/31230 for a dumb reason.  The
    default value for runtime.traceback_cache was, and is, 2 << 2, meaning
    to print all functions.  The old C code for runtime_parsedebugvars
    would return immediately and do nothing if the environment variable
    GODEBUG was not set (if GODEBUG was set it would later call
    setTraceback.  The new Go code for runtime.parsedebugvars does not
    return immediately if GODEBUG is not set, and always calls
    setTraceback.  Either way, if GOTRACEBACK is not set, setTraceback
    would set traceback_cache to 1 << 2, meaning to only print non-runtime
    functions and having the effect of not printing plain C functions.
    
    Keep the current handling of GODEBUG/GOTRACEBACK, which matches the gc
    library, but add an extra check to print C functions by default.
    
    Reviewed-on: https://go-review.googlesource.com/33717

From-SVN: r243083
2016-11-30 20:28:28 +00:00
Ian Lance Taylor fbe9724cc3 runtime: fixes for -buildmode=c-archive
With -buildmode=c-archive, initsig is called before the memory
    allocator has been initialized.  The code was doing a memory
    allocation because of the call to funcPC(sigtramp).  When escape
    analysis is fully implemented, that call should not allocate.  For
    now, finesse the issue by calling a C function to get the C function
    pointer value of sigtramp.
    
    When returning from a call from C to a Go function, a deferred
    function is run to go back to syscall mode.  When the call occurs on a
    non-Go thread, that call sets g to nil, making it impossible to add
    the _defer struct back to the pool.  Just drop it and let the garbage
    collector clean it up.
    
    Reviewed-on: https://go-review.googlesource.com/33675

From-SVN: r242992
2016-11-30 02:09:24 +00:00
Ian Lance Taylor 7239bf746a re PR go/77910 (go: open zversion.go: no such file or directory)
PR go/77910
    cmd/go: don't check standard packages when using gccgo
    
    This copies https://golang.org/cl/33295 to libgo.
    
    This fixes GCC PR 77910.
    
    Reviewed-on: https://go-review.googlesource.com/33471

From-SVN: r242724
2016-11-22 21:04:27 +00:00
Ian Lance Taylor 9d1e3afb54 runtime: rewrite panic/defer code from C to Go
The actual stack unwind code is still in C, but the rest of the code,
    notably all the memory allocation, is now in Go.  The names are changed
    to the names used in the Go 1.7 runtime, but the code is necessarily
    somewhat different.
    
    The __go_makefunc_can_recover function is dropped, as the uses of it
    were removed in https://golang.org/cl/198770044.
    
    Reviewed-on: https://go-review.googlesource.com/33414

From-SVN: r242715
2016-11-22 17:58:04 +00:00
Ian Lance Taylor 092dd2bc33 runtime: move schedt type and sched var from C to Go
This doesn't change any actual code, it just starts using the Go
    definition of the schedt type and the sched variable rather than the C
    definitions.
    
    The schedt type is tweaked slightly for gccgo.  We aren't going to
    release goroutine stacks, so we don't need separate gfreeStack and
    gfreeNostack lists.  We only have one size of defer function, so we
    don't need a list of 5 different pools.
    
    Reviewed-on: https://go-review.googlesource.com/33364

From-SVN: r242600
2016-11-18 17:48:29 +00:00
Ian Lance Taylor d519aeda8b libgo: remove old/regexp and old/template
They were removed from the master Go library in 2012
    (https://golang.org/cl/5979046) but somehow that was not reflected here.
    
    Reviewed-on: https://go-review.googlesource.com/33391

From-SVN: r242592
2016-11-18 14:51:13 +00:00
Ian Lance Taylor 9bd0f0bc6b Correct gcc/go/gofrontend/lex.cc and libgo/aclocal.m4 to the versions in the gofrontend repo...
Correct gcc/go/gofrontend/lex.cc and libgo/aclocal.m4 to the versions
in the gofrontend repo, which is supposed to be the master copy.

Remove a few files in libgo that somehow were not deleted in the past.

From-SVN: r242583
2016-11-18 04:15:46 +00:00
Ian Lance Taylor 54f0deb00f Update libgo/configure to restore it to the master version.
Update a few binary files that were changed in the master gc repo,
copied into the gofrontend repo, but not correctly copied into the GCC
repo.  The changes are all minor and do not affect any actual tests.
Two instances of "http" changed to "https", and two timestamps were
zeroed out.

From-SVN: r242582
2016-11-18 04:05:10 +00:00
Ian Lance Taylor 5302cd0250 runtime, reflect: rewrite Go to FFI type conversion in Go
As we move toward the Go 1.7 garbage collector, it's essential that all
    allocation of values that can contain Go pointers be done using the
    correct type descriptor.  That is simplest if we do all such allocation
    in Go code.  This rewrites the code that converts from a Go type to a
    libffi CIF into Go.
    
    Reviewed-on: https://go-review.googlesource.com/33353

From-SVN: r242578
2016-11-18 00:15:38 +00:00
Ian Lance Taylor 350767bf22 runtime: replace runtime1.goc with Go and C code
A step toward eliminating goc2c.
    
    Drop the exported parfor code; it was needed for tests in the past, but
    no longer is. The Go 1.7 runtime no longer uses parfor.
    
    Reviewed-on: https://go-review.googlesource.com/33324

From-SVN: r242509
2016-11-16 18:33:11 +00:00
Ian Lance Taylor 7b9f5ceef1 runtime: don't crash if signal handler info argument is nil
Apparently on Solaris 10 a SA_SIGINFO signal handler can be invoked with
    a nil info argument.  I would not have believed it but I've now seen it
    happen, and the sigaction man page actually says "If the second argument
    is not equal to NULL, it points to a siginfo_t structure...."  So, if
    that happens, don't crash.
    
    Also fix another case where we want to make sure that &T{} does not
    allocate.
    
    Reviewed-on: https://go-review.googlesource.com/33150

From-SVN: r242403
2016-11-14 23:16:04 +00:00
Ian Lance Taylor 980f9a0a4b runtime: copy signal code from Go 1.7 runtime
Add a little shell script to auto-generate runtime.sigtable from the
    known signal names.
    
    Force the main package to always import the runtime package.  Otherwise
    some runtime package global variables may never be initialized.
    
    Set the syscallsp and syscallpc fields of g when entering a syscall, so
    that the runtime package knows when a g is executing a syscall.
    
    Fix runtime.funcPC to avoid dead store elimination of the interface
    value when the function is inlined.
    
    Reviewed-on: https://go-review.googlesource.com/33025

From-SVN: r242060
2016-11-10 22:53:23 +00:00
Ian Lance Taylor 69907c4ad5 runtime: recreate function called by cgo -gccgo
When using cgo -gccgo calls to C.GoString, C.GoStringN, and C.GoBytes
    are turned into calls to __go_byte_array_to_string and
    __go_string_to_byte_array.  Those functions were removed when the string
    code was copied from Go 1.7, but we still need them for cgo.  While cgo
    should be updated, old versions will exist for some time.
    
    Reviewed-on: https://go-review.googlesource.com/32474

From-SVN: r241743
2016-11-01 14:07:43 +00:00
Ian Lance Taylor 94f56408db compiler, runtime: copy slice code from Go 1.7 runtime
Change the compiler handle append as the gc compiler does: call a
    function to grow the slice, but otherwise assign the new elements
    directly to the final slice.
    
    For the current gccgo memory allocator the slice code has to call
    runtime_newarray, not mallocgc directly, so that the allocator sets the
    TypeInfo_Array bit in the type pointer.
    
    Rename the static function cnew to runtime_docnew, so that the stack
    trace ignores it when ignoring runtime functions.  This was needed to
    fix the runtime/pprof tests on 386.
    
    Reviewed-on: https://go-review.googlesource.com/32218

From-SVN: r241667
2016-10-28 22:34:47 +00:00
Ian Lance Taylor a5742b0158 re PR go/78144 (FAIL: time on systems with tzdata2016g installed)
PR go/78144
    libgo: incorporate fix for timezone test
    
    This brings over the test-only fix for issue 17276 into gccgo/libgo
    (with tzdata-2016g there is a new zone abbreviation).  This is a
    copy of https://golang.org/cl/29995.
    
    Reviewed-on: https://go-review.googlesource.com/32182

From-SVN: r241661
2016-10-28 20:21:52 +00:00
Ian Lance Taylor 0dfeae289c re PR go/78143 (bootstrap broken in libgo on powerpc-linux-gnu)
PR go/78143
    runtime: build lfstack_32bit.go on ppc
    
    Missed a build tag.  This is GCC PR 78143.
    
    Reviewed-on: https://go-review.googlesource.com/32295

From-SVN: r241659
2016-10-28 18:57:36 +00:00
Ian Lance Taylor e597e0533d runtime: copy lfstack code from Go 1.7 runtime
Note that lfstack_64bit.go was modified for Solaris support in a
    different, and better, way than the superseded lfstack.goc code.
    
    Reviewed-on: https://go-review.googlesource.com/31673

From-SVN: r241427
2016-10-21 20:07:06 +00:00
Ian Lance Taylor 6b752cfac4 runtime: rewrite interface code into Go
I started to copy the Go 1.7 interface code, but the gc and gccgo
    representations of interfaces are too different.  So instead I rewrote
    the gccgo interface code from C to Go.  The code is largely the same as
    it was, but the names are more like those used in the gc runtime.
    
    I also copied over the string comparison functions, and tweaked the
    compiler to use eqstring when comparing strings for equality.
    
    Reviewed-on: https://go-review.googlesource.com/31591

From-SVN: r241384
2016-10-20 18:51:35 +00:00
Ian Lance Taylor 29849c91e4 runtime, syscall: force EPOLLET to be positive
The C definition is 1U << 31.  Reportedly on some systems GCC's
    -fgo-dump-spec can print this as -2147483648.
    
    Reviewed-on: https://go-review.googlesource.com/31448

From-SVN: r241347
2016-10-19 16:53:13 +00:00
Ian Lance Taylor 812ba636c7 runtime: copy netpoll code from Go 1.7 runtime
Reviewed-on: https://go-review.googlesource.com/31325

From-SVN: r241307
2016-10-18 14:38:29 +00:00
Ian Lance Taylor 8cce07d1dd runtime: copy rdebug code from Go 1.7 runtime
While we're at it, update the runtime/debug package, and start running
    its testsuite by default.  I'm not sure why runtime/debug was not
    previously updated to 1.7.  Doing that led me to fix some minor aspects
    of runtime.Stack and the C function runtime/debug.readGCStats.
    
    Reviewed-on: https://go-review.googlesource.com/31251

From-SVN: r241261
2016-10-17 16:54:25 +00:00
Ian Lance Taylor 35d9424444 runtime: copy runtime package time code from Go 1.7
Fix handling of function values for -fgo-c-header to generate FuncVal*,
    not simply FuncVal.
    
    While we're here change runtime.nanotime to use clock_gettime with
    CLOCK_MONOTONIC, rather than gettimeofday.  This is what the gc library
    does.  It provides nanosecond precision and a monotonic clock.
    
    Reviewed-on: https://go-review.googlesource.com/31232

From-SVN: r241197
2016-10-15 00:29:06 +00:00
Ian Lance Taylor 1f0be9ee86 runtime: copy mprof code from Go 1.7 runtime
Also create a gccgo version of some of the traceback code in
    traceback_gccgo.go, replacing some code currently in C.
    
    This required modifying the compiler so that when compiling the runtime
    package a slice expression does not cause a local array variable to
    escape to the heap.
    
    Reviewed-on: https://go-review.googlesource.com/31230

From-SVN: r241189
2016-10-14 22:51:46 +00:00
Ian Lance Taylor db2fb304fe runtime: just do file/line lookup in C, move Func to Go
In order to port stack backtraces to Go, we need the ability to look up
    file/line information for PC values without allocating memory.  This
    patch moves the handling of Func from C code to Go code, and simplifies
    the C code to just look up function/file/line/entry information for a PC.
    
    Reviewed-on: https://go-review.googlesource.com/31150

From-SVN: r241172
2016-10-14 17:20:40 +00:00
Ian Lance Taylor d2c4425e86 debug/elf: add sparc64 relocations
This is a backport of https://go-review.googlesource.com/30870.
    
    Reviewed-on: https://go-review.googlesource.com/30916

From-SVN: r241171
2016-10-14 17:16:55 +00:00
Ian Lance Taylor 238fc3441c runtime: copy cpuprof code from Go 1.7 runtime
This replaces runtime/cpuprof.goc with go/runtime/cpuprof.go and adjusts
    the supporting code in runtime/proc.c.
    
    This adds another case where the compiler needs to avoid heap allocation
    in the runtime package: when evaluating a method expression into a
    closure.  Implementing this required moving the relevant code from
    do_get_backend to do_flatten, so that I could easily add a temporary
    variable.  Doing that let me get rid of Bound_method_expression::do_lower.
    
    Reviewed-on: https://go-review.googlesource.com/31050

From-SVN: r241163
2016-10-14 13:36:35 +00:00
Ian Lance Taylor 58f7dab40d runtime: copy mstats code from Go 1.7 runtime
This replaces mem.go and the C runtime_ReadMemStats function with the Go
    1.7 mstats.go.
    
    The GCStats code is commented out for now.  The corresponding gccgo code
    is in runtime/mgc0.c.
    
    The variables memstats and worldsema are shared between the Go code and
    the C code, but are not exported.  To make this work, add temporary
    accessor functions acquireWorldsema, releaseWorldsema, getMstats (the
    latter known as mstats in the C code).
    
    Check the preemptoff field of m when allocating and when considering
    whether to start a GC.  This works with the new stopTheWorld and
    startTheWorld functions in Go, which are essentially the Go 1.7
    versions.
    
    Change the compiler to stack allocate closures when compiling the
    runtime package.  Within the runtime packages closures do not escape.
    This is similar to what the gc compiler does, except that the gc
    compiler, when compiling the runtime package, gives an error if escape
    analysis shows that a closure does escape.  I added this here because
    the Go version of ReadMemStats calls systemstack with a closure, and
    having that allocate memory was causing some tests that measure memory
    allocations to fail.
    
    Reviewed-on: https://go-review.googlesource.com/30972

From-SVN: r241124
2016-10-13 15:24:50 +00:00
Ian Lance Taylor 80b489ebba syscall: don't use pt_regs in clone_linux.c
It's unnecessary and it reportedly breaks the build on arm64 GNU/Linux.
    
    Reviewed-on: https://go-review.googlesource.com/30978

From-SVN: r241084
2016-10-13 04:19:57 +00:00
Ian Lance Taylor 1ad16c5284 compiler, runtime: copy string code from Go 1.7
Add compiler support for turning concatenating strings into a call to
    a runtime function that takes the appropriate number of arguments.
    
    Rename some local variables in mgc0.c to avoid macros that the new
    rune.go causes to appear in runtime.inc.
    
    Reviewed-on: https://go-review.googlesource.com/30827

From-SVN: r241074
2016-10-12 18:17:52 +00:00
Ian Lance Taylor fa8e596366 syscall: mark rawClone as no_split_stack
Reviewed-on: https://go-review.googlesource.com/30955

From-SVN: r241072
2016-10-12 17:42:49 +00:00
Ian Lance Taylor 543f217b7a runtime: copy Go 1.7 runtime semaphore code
This triggered a check in releaseSudog that g.param not nil, because
    libgo uses the param field when starting a goroutine.  Fixed by clearing
    g->param in kickoff in proc.c.
    
    Reviewed-on: https://go-review.googlesource.com/30951

From-SVN: r241067
2016-10-12 15:38:56 +00:00
Ian Lance Taylor c8dc49fb03 syscall, internal/syscall/unix: Fix getrandom, clone on sparc64
Since sparc is a valid architecture, the name of
    getrandom_linux_sparc.go means that it will be ignored on sparc64,
    even though it's whitelisted with a +build line.
    
    On SPARC, clone has a unique return value convention which requires
    some inline assembly to convert it to the normal convention.
    
    Reviewed-on: https://go-review.googlesource.com/30873

From-SVN: r241051
2016-10-12 14:28:05 +00:00